g_NCR5380.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /*
  2. * Generic Generic NCR5380 driver defines
  3. *
  4. * Copyright 1993, Drew Eckhardt
  5. * Visionary Computing
  6. * (Unix and Linux consulting and custom programming)
  7. * drew@colorado.edu
  8. * +1 (303) 440-4894
  9. *
  10. * NCR53C400 extensions (c) 1994,1995,1996, Kevin Lentin
  11. * K.Lentin@cs.monash.edu.au
  12. */
  13. #ifndef GENERIC_NCR5380_H
  14. #define GENERIC_NCR5380_H
  15. #ifndef SCSI_G_NCR5380_MEM
  16. #define DRV_MODULE_NAME "g_NCR5380"
  17. #define NCR5380_read(reg) \
  18. inb(instance->io_port + (reg))
  19. #define NCR5380_write(reg, value) \
  20. outb(value, instance->io_port + (reg))
  21. #define NCR5380_implementation_fields \
  22. int c400_ctl_status; \
  23. int c400_blk_cnt; \
  24. int c400_host_buf; \
  25. int io_width;
  26. #else
  27. /* therefore SCSI_G_NCR5380_MEM */
  28. #define DRV_MODULE_NAME "g_NCR5380_mmio"
  29. #define NCR53C400_mem_base 0x3880
  30. #define NCR53C400_host_buffer 0x3900
  31. #define NCR53C400_region_size 0x3a00
  32. #define NCR5380_read(reg) \
  33. readb(((struct NCR5380_hostdata *)shost_priv(instance))->iomem + \
  34. NCR53C400_mem_base + (reg))
  35. #define NCR5380_write(reg, value) \
  36. writeb(value, ((struct NCR5380_hostdata *)shost_priv(instance))->iomem + \
  37. NCR53C400_mem_base + (reg))
  38. #define NCR5380_implementation_fields \
  39. void __iomem *iomem; \
  40. resource_size_t iomem_size; \
  41. int c400_ctl_status; \
  42. int c400_blk_cnt; \
  43. int c400_host_buf;
  44. #endif
  45. #define NCR5380_dma_xfer_len(instance, cmd, phase) \
  46. generic_NCR5380_dma_xfer_len(instance, cmd)
  47. #define NCR5380_dma_recv_setup generic_NCR5380_pread
  48. #define NCR5380_dma_send_setup generic_NCR5380_pwrite
  49. #define NCR5380_dma_residual(instance) (0)
  50. #define NCR5380_intr generic_NCR5380_intr
  51. #define NCR5380_queue_command generic_NCR5380_queue_command
  52. #define NCR5380_abort generic_NCR5380_abort
  53. #define NCR5380_bus_reset generic_NCR5380_bus_reset
  54. #define NCR5380_info generic_NCR5380_info
  55. #define NCR5380_io_delay(x) udelay(x)
  56. #define BOARD_NCR5380 0
  57. #define BOARD_NCR53C400 1
  58. #define BOARD_NCR53C400A 2
  59. #define BOARD_DTC3181E 3
  60. #define BOARD_HP_C2502 4
  61. #endif /* GENERIC_NCR5380_H */