📄 sym53c8xx_defs.h
字号:
#define inw_l2b inw#define inl_l2b inl#define outw_b2l outw#define outl_b2l outl#elif defined(__sparc__)#define readw_l2b readw#define readl_l2b readl#define writew_b2l writew#define writel_b2l writel#else#error "Support for BIG ENDIAN is only available for PowerPC and SPARC"#endif#else /* little endian */#if defined(__i386__) /* i386 implements full FLAT memory/MMIO model */#define inw_raw inw#define inl_raw inl#define outw_raw outw#define outl_raw outl#define readb_raw(a) (*(volatile unsigned char *) (a))#define readw_raw(a) (*(volatile unsigned short *) (a))#define readl_raw(a) (*(volatile unsigned int *) (a))#define writeb_raw(b,a) ((*(volatile unsigned char *) (a)) = (b))#define writew_raw(b,a) ((*(volatile unsigned short *) (a)) = (b))#define writel_raw(b,a) ((*(volatile unsigned int *) (a)) = (b))#else /* Other little-endian (for now alpha) */#define inw_raw inw#define inl_raw inl#define outw_raw outw#define outl_raw outl#define readw_raw readw#define readl_raw readl#define writew_raw writew#define writel_raw writel#endif#endif#ifdef SCSI_NCR_BIG_ENDIAN#error "The NCR in BIG ENDIAN addressing mode is not (yet) supported"#endif/*** NCR53C8XX Device Ids*/#ifndef PCI_DEVICE_ID_NCR_53C810#define PCI_DEVICE_ID_NCR_53C810 1#endif#ifndef PCI_DEVICE_ID_NCR_53C810AP#define PCI_DEVICE_ID_NCR_53C810AP 5#endif#ifndef PCI_DEVICE_ID_NCR_53C815#define PCI_DEVICE_ID_NCR_53C815 4#endif#ifndef PCI_DEVICE_ID_NCR_53C820#define PCI_DEVICE_ID_NCR_53C820 2#endif#ifndef PCI_DEVICE_ID_NCR_53C825#define PCI_DEVICE_ID_NCR_53C825 3#endif#ifndef PCI_DEVICE_ID_NCR_53C860#define PCI_DEVICE_ID_NCR_53C860 6#endif#ifndef PCI_DEVICE_ID_NCR_53C875#define PCI_DEVICE_ID_NCR_53C875 0xf#endif#ifndef PCI_DEVICE_ID_NCR_53C875J#define PCI_DEVICE_ID_NCR_53C875J 0x8f#endif#ifndef PCI_DEVICE_ID_NCR_53C885#define PCI_DEVICE_ID_NCR_53C885 0xd#endif#ifndef PCI_DEVICE_ID_NCR_53C895#define PCI_DEVICE_ID_NCR_53C895 0xc#endif#ifndef PCI_DEVICE_ID_NCR_53C896#define PCI_DEVICE_ID_NCR_53C896 0xb#endif#ifndef PCI_DEVICE_ID_NCR_53C895A#define PCI_DEVICE_ID_NCR_53C895A 0x12#endif#ifndef PCI_DEVICE_ID_NCR_53C1510D#define PCI_DEVICE_ID_NCR_53C1510D 0xa#endif#ifndef PCI_DEVICE_ID_LSI_53C1010#define PCI_DEVICE_ID_LSI_53C1010 0x20#endif#ifndef PCI_DEVICE_ID_LSI_53C1010_66#define PCI_DEVICE_ID_LSI_53C1010_66 0x21#endif/*** NCR53C8XX devices features table.*/typedef struct { unsigned short device_id; unsigned short revision_id; char *name; unsigned char burst_max; /* log-base-2 of max burst */ unsigned char offset_max; unsigned char nr_divisor; unsigned int features;#define FE_LED0 (1<<0)#define FE_WIDE (1<<1) /* Wide data transfers */#define FE_ULTRA (1<<2) /* Ultra speed 20Mtrans/sec */#define FE_ULTRA2 (1<<3) /* Ultra 2 - 40 Mtrans/sec */#define FE_DBLR (1<<4) /* Clock doubler present */#define FE_QUAD (1<<5) /* Clock quadrupler present */#define FE_ERL (1<<6) /* Enable read line */#define FE_CLSE (1<<7) /* Cache line size enable */#define FE_WRIE (1<<8) /* Write & Invalidate enable */#define FE_ERMP (1<<9) /* Enable read multiple */#define FE_BOF (1<<10) /* Burst opcode fetch */#define FE_DFS (1<<11) /* DMA fifo size */#define FE_PFEN (1<<12) /* Prefetch enable */#define FE_LDSTR (1<<13) /* Load/Store supported */#define FE_RAM (1<<14) /* On chip RAM present */#define FE_CLK80 (1<<15) /* Board clock is 80 MHz */#define FE_RAM8K (1<<16) /* On chip RAM sized 8Kb */#define FE_64BIT (1<<17) /* Supports 64-bit addressing */#define FE_IO256 (1<<18) /* Requires full 256 bytes in PCI space */#define FE_NOPM (1<<19) /* Scripts handles phase mismatch */#define FE_LEDC (1<<20) /* Hardware control of LED */#define FE_DIFF (1<<21) /* Support Differential SCSI */#define FE_ULTRA3 (1<<22) /* Ultra-3 80Mtrans/sec */#define FE_66MHZ (1<<23) /* 66MHz PCI Support */#define FE_CACHE_SET (FE_ERL|FE_CLSE|FE_WRIE|FE_ERMP)#define FE_SCSI_SET (FE_WIDE|FE_ULTRA|FE_ULTRA2|FE_DBLR|FE_QUAD|F_CLK80)#define FE_SPECIAL_SET (FE_CACHE_SET|FE_BOF|FE_DFS|FE_LDSTR|FE_PFEN|FE_RAM)} ncr_chip;/*** DEL 397 - 53C875 Rev 3 - Part Number 609-0392410 - ITEM 3.** Memory Read transaction terminated by a retry followed by ** Memory Read Line command.*/#define FE_CACHE0_SET (FE_CACHE_SET & ~FE_ERL)/*** DEL 397 - 53C875 Rev 3 - Part Number 609-0392410 - ITEM 5.** On paper, this errata is harmless. But it is a good reason for ** using a shorter programmed burst length (64 DWORDS instead of 128).*/#define SCSI_NCR_CHIP_TABLE \{ \ {PCI_DEVICE_ID_NCR_53C810, 0x0f, "810", 4, 8, 4, \ FE_ERL} \ , \ {PCI_DEVICE_ID_NCR_53C810, 0xff, "810a", 4, 8, 4, \ FE_CACHE_SET|FE_LDSTR|FE_PFEN|FE_BOF} \ , \ {PCI_DEVICE_ID_NCR_53C815, 0xff, "815", 4, 8, 4, \ FE_ERL|FE_BOF} \ , \ {PCI_DEVICE_ID_NCR_53C820, 0xff, "820", 4, 8, 4, \ FE_WIDE|FE_ERL} \ , \ {PCI_DEVICE_ID_NCR_53C825, 0x0f, "825", 4, 8, 4, \ FE_WIDE|FE_ERL|FE_BOF|FE_DIFF} \ , \ {PCI_DEVICE_ID_NCR_53C825, 0xff, "825a", 6, 8, 4, \ FE_WIDE|FE_CACHE0_SET|FE_BOF|FE_DFS|FE_LDSTR|FE_PFEN|FE_RAM|FE_DIFF} \ , \ {PCI_DEVICE_ID_NCR_53C860, 0xff, "860", 4, 8, 5, \ FE_ULTRA|FE_CLK80|FE_CACHE_SET|FE_BOF|FE_LDSTR|FE_PFEN} \ , \ {PCI_DEVICE_ID_NCR_53C875, 0x01, "875", 6, 16, 5, \ FE_WIDE|FE_ULTRA|FE_CLK80|FE_CACHE0_SET|FE_BOF|FE_DFS|FE_LDSTR|FE_PFEN|\ FE_RAM|FE_DIFF} \ , \ {PCI_DEVICE_ID_NCR_53C875, 0x0f, "875", 6, 16, 5, \ FE_WIDE|FE_ULTRA|FE_DBLR|FE_CACHE0_SET|FE_BOF|FE_DFS|FE_LDSTR|FE_PFEN| \ FE_RAM|FE_DIFF} \ , \ {PCI_DEVICE_ID_NCR_53C875, 0x1f, "876", 6, 16, 5, \ FE_WIDE|FE_ULTRA|FE_DBLR|FE_CACHE0_SET|FE_BOF|FE_DFS|FE_LDSTR|FE_PFEN| \ FE_RAM|FE_DIFF} \ , \ {PCI_DEVICE_ID_NCR_53C875, 0x2f, "875E", 6, 16, 5, \ FE_WIDE|FE_ULTRA|FE_DBLR|FE_CACHE0_SET|FE_BOF|FE_DFS|FE_LDSTR|FE_PFEN| \ FE_RAM|FE_DIFF} \ , \ {PCI_DEVICE_ID_NCR_53C875, 0xff, "876", 6, 16, 5, \ FE_WIDE|FE_ULTRA|FE_DBLR|FE_CACHE0_SET|FE_BOF|FE_DFS|FE_LDSTR|FE_PFEN| \ FE_RAM|FE_DIFF} \ , \ {PCI_DEVICE_ID_NCR_53C875J,0xff, "875J", 6, 16, 5, \ FE_WIDE|FE_ULTRA|FE_DBLR|FE_CACHE0_SET|FE_BOF|FE_DFS|FE_LDSTR|FE_PFEN| \ FE_RAM} \ , \ {PCI_DEVICE_ID_NCR_53C885, 0xff, "885", 6, 16, 5, \ FE_WIDE|FE_ULTRA|FE_DBLR|FE_CACHE0_SET|FE_BOF|FE_DFS|FE_LDSTR|FE_PFEN| \ FE_RAM|FE_DIFF} \ , \ {PCI_DEVICE_ID_NCR_53C895, 0xff, "895", 6, 31, 7, \ FE_WIDE|FE_ULTRA2|FE_QUAD|FE_CACHE_SET|FE_BOF|FE_DFS|FE_LDSTR|FE_PFEN| \ FE_RAM} \ , \ {PCI_DEVICE_ID_NCR_53C896, 0xff, "896", 6, 31, 7, \ FE_WIDE|FE_ULTRA2|FE_QUAD|FE_CACHE_SET|FE_BOF|FE_DFS|FE_LDSTR|FE_PFEN| \ FE_RAM|FE_RAM8K|FE_64BIT|FE_IO256|FE_NOPM|FE_LEDC} \ , \ {PCI_DEVICE_ID_NCR_53C895A, 0xff, "895a", 6, 31, 7, \ FE_WIDE|FE_ULTRA2|FE_QUAD|FE_CACHE_SET|FE_BOF|FE_DFS|FE_LDSTR|FE_PFEN| \ FE_RAM|FE_RAM8K|FE_64BIT|FE_IO256|FE_NOPM|FE_LEDC} \ , \ {PCI_DEVICE_ID_NCR_53C1510D, 0xff, "1510D", 7, 31, 7, \ FE_WIDE|FE_ULTRA2|FE_QUAD|FE_CACHE_SET|FE_BOF|FE_DFS|FE_LDSTR|FE_PFEN| \ FE_RAM|FE_IO256} \ , \ {PCI_DEVICE_ID_LSI_53C1010, 0xff, "1010", 6, 62, 7, \ FE_WIDE|FE_QUAD|FE_CACHE_SET|FE_BOF|FE_DFS|FE_LDSTR|FE_PFEN| \ FE_RAM|FE_RAM8K|FE_64BIT|FE_IO256|FE_NOPM|FE_LEDC|FE_ULTRA3} \ , \ {PCI_DEVICE_ID_LSI_53C1010_66, 0xff, "1010_66", 6, 62, 7, \ FE_WIDE|FE_QUAD|FE_CACHE_SET|FE_BOF|FE_DFS|FE_LDSTR|FE_PFEN| \ FE_RAM|FE_RAM8K|FE_64BIT|FE_IO256|FE_NOPM|FE_LEDC|FE_ULTRA3|FE_66MHZ} \}/* * List of supported NCR chip ids */#define SCSI_NCR_CHIP_IDS \{ \ PCI_DEVICE_ID_NCR_53C810, \ PCI_DEVICE_ID_NCR_53C815, \ PCI_DEVICE_ID_NCR_53C820, \ PCI_DEVICE_ID_NCR_53C825, \ PCI_DEVICE_ID_NCR_53C860, \ PCI_DEVICE_ID_NCR_53C875, \ PCI_DEVICE_ID_NCR_53C875J, \ PCI_DEVICE_ID_NCR_53C885, \ PCI_DEVICE_ID_NCR_53C895, \ PCI_DEVICE_ID_NCR_53C896, \ PCI_DEVICE_ID_NCR_53C895A, \ PCI_DEVICE_ID_NCR_53C1510D, \ PCI_DEVICE_ID_LSI_53C1010, \ PCI_DEVICE_ID_LSI_53C1010_66 \}/*** Driver setup structure.**** This structure is initialized from linux config options.** It can be overridden at boot-up by the boot command line.*/#define SCSI_NCR_MAX_EXCLUDES 8struct ncr_driver_setup { u_char master_parity; u_char scsi_parity; u_char disconnection; u_char special_features; u_char ultra_scsi; u_char force_sync_nego; u_char reverse_probe; u_char pci_fix_up; u_char use_nvram; u_char verbose; u_char default_tags; u_short default_sync; u_short debug; u_char burst_max; u_char led_pin; u_char max_wide; u_char settle_delay; u_char diff_support; u_char irqm; u_char bus_check; u_char optimize; u_char recovery; u_char host_id; u_short iarb; u_long excludes[SCSI_NCR_MAX_EXCLUDES]; char tag_ctrl[100];};/*** Initial setup.** Can be overriden at startup by a command line.*/#define SCSI_NCR_DRIVER_SETUP \{ \ SCSI_NCR_SETUP_MASTER_PARITY, \ SCSI_NCR_SETUP_SCSI_PARITY, \ SCSI_NCR_SETUP_DISCONNECTION, \ SCSI_NCR_SETUP_SPECIAL_FEATURES, \ SCSI_NCR_SETUP_ULTRA_SCSI, \ SCSI_NCR_SETUP_FORCE_SYNC_NEGO, \ 0, \ 0, \ 1, \ 1, \ SCSI_NCR_SETUP_DEFAULT_TAGS, \ SCSI_NCR_SETUP_DEFAULT_SYNC, \ 0x0200, \ 7, \ SCSI_NCR_SETUP_LED_PIN, \ 1, \ SCSI_NCR_SETUP_SETTLE_TIME, \ SCSI_NCR_SETUP_DIFF_SUPPORT, \ 0, \ 1, \ 0, \ 0, \ 255, \ 0x00 \}/*** Boot fail safe setup.** Override initial setup from boot command line:** ncr53c8xx=safe:y*/#define SCSI_NCR_DRIVER_SAFE_SETUP \{ \ 0, \ 1, \ 0, \ 0, \ 0, \ 0, \ 0, \ 0, \ 1, \ 2, \ 0, \ 255, \ 0x00, \ 255, \ 0, \ 0, \ 10, \ 1, \ 1, \ 1, \ 0, \ 0, \ 255 \}#ifdef SCSI_NCR_NVRAM_SUPPORT/*** Symbios NvRAM data format*/#define SYMBIOS_NVRAM_SIZE 368#define SYMBIOS_NVRAM_ADDRESS 0x100struct Symbios_nvram {/* Header 6 bytes */ u_short type; /* 0x0000 */ u_short byte_count; /* excluding header/trailer */ u_short checksum;/* Controller set up 20 bytes */ u_char v_major; /* 0x00 */ u_char v_minor; /* 0x30 */ u_int32 boot_crc; u_short flags;#define SYMBIOS_SCAM_ENABLE (1)#define SYMBIOS_PARITY_ENABLE (1<<1)#define SYMBIOS_VERBOSE_MSGS (1<<2)#define SYMBIOS_CHS_MAPPING (1<<3)#define SYMBIOS_NO_NVRAM (1<<3) /* ??? */ u_short flags1;#define SYMBIOS_SCAN_HI_LO (1) u_short term_state;#define SYMBIOS_TERM_CANT_PROGRAM (0)#define SYMBIOS_TERM_ENABLED (1)#define SYMBIOS_TERM_DISABLED (2) u_short rmvbl_flags;#define SYMBIOS_RMVBL_NO_SUPPORT (0)#define SYMBIOS_RMVBL_BOOT_DEVICE (1)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -