Linux/m68k driver for MNT ZZ9000
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.1 KiB

  1. /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2. #ifndef __ZZ9000_H
  3. #define __ZZ9000_H
  4. #include <linux/zorro.h>
  5. #include "zz9000_regs.h"
  6. /* TODO: Move to zorro_ids.h */
  7. #define ZORRO_MANUF_MNT 0x6d6e
  8. #define ZORRO_PROD_MNT_ZZ9000_ZII ZORRO_ID(MNT, 0x03, 0)
  9. #define ZORRO_PROD_MNT_ZZ9000_ZIII ZORRO_ID(MNT, 0x04, 0)
  10. #define ZZ9000_VERSION "0.1.5.1 beta"
  11. struct zz9000_platform_data {
  12. void __iomem *registers;
  13. void __iomem *eth_rx_mem;
  14. void __iomem *eth_tx_mem;
  15. void __iomem *usb_mem;
  16. void __iomem *fb_mem;
  17. struct resource *res[5];
  18. struct zorro_dev *zdev;
  19. struct fb_info *fb_info;
  20. struct device *sysfs_root;
  21. int fb_size;
  22. };
  23. struct zz9000_platform_data *get_zz9000_data(void);
  24. static inline int is_zorro3(struct zorro_dev *zdev)
  25. {
  26. if (zdev->id == ZORRO_PROD_MNT_ZZ9000_ZIII)
  27. return 1;
  28. return 0;
  29. }
  30. #define zz_readw(x) (z_readw(zz9000_data->registers + (x)))
  31. #define zz_readl(x) (z_readl(zz9000_data->registers + (x)))
  32. #define zz_writew(v, x) z_writew((v), zz9000_data->registers + (x))
  33. #define zz_writel(v, x) z_writel((v), zz9000_data->registers + (x))
  34. #endif