4 #include <linux/config.h>
10 #define DISPLAY_SIIMAGE_TIMINGS
12 #define CONFIG_TRY_MMIO_SIIMAGE
13 //#undef CONFIG_TRY_MMIO_SIIMAGE
14 #undef SIIMAGE_VIRTUAL_DMAPIO
15 #undef SIIMAGE_BUFFERED_TASKFILE
16 #undef SIIMAGE_LARGE_DMA
19 typedef struct ide_io_ops_s siimage_iops {
27 #define siiprintk(x...) printk(x)
29 #define siiprintk(x...)
32 #define ADJREG(B,R) ((B)|(R)|((hwif->channel)<<(4+(2*(hwif->mmio)))))
33 #define SELREG(R) ADJREG((0xA0),(R))
34 #define SELADDR(R) ((((unsigned long)hwif->hwif_data)*(hwif->mmio))|SELREG((R)))
35 #define HWIFADDR(R) ((((unsigned long)hwif->hwif_data)*(hwif->mmio))|(R))
36 #define DEVADDR(R) (((unsigned long) pci_get_drvdata(dev))|(R))
39 inline u8 sii_inb (unsigned long port)
41 return (u8) readb(port);
44 inline u16 sii_inw (unsigned long port)
46 return (u16) readw(port);
49 inline void sii_insw (unsigned long port, void *addr, u32 count)
51 __ide_mm_insw(port, addr, count);
54 inline u32 sii_inl (unsigned long port)
56 return (u32) readl(port);
59 inline void sii_insl (unsigned long port, void *addr, u32 count)
61 __ide_mm_insw(port, addr, (count)<<1);
64 inline void sii_outb (u8 value, unsigned long port)
69 inline void sii_outw (u16 value, unsigned long port)
74 inline void sii_outsw (unsigned long port, void *addr, u32 count)
76 __ide_mm_outsw(port, addr, count);
79 inline void sii_outl (u32 value, unsigned long port)
84 inline void sii_outsl (unsigned long port, void *addr, u32 count)
86 __ide_mm_outsw(port, addr, (count)<<1);
89 #if defined(DISPLAY_SIIMAGE_TIMINGS) && defined(CONFIG_PROC_FS)
90 #include <linux/stat.h>
91 #include <linux/proc_fs.h>
93 static char * print_siimage_get_info(char *, struct pci_dev *, int);
94 static int siimage_get_info(char *, char **, off_t, int);
96 static u8 siimage_proc;
98 static ide_pci_host_proc_t siimage_procs[] __initdata = {
102 .get_info = siimage_get_info,
106 #endif /* DISPLAY_SIIMAGE_TIMINGS && CONFIG_PROC_FS */
108 static unsigned int init_chipset_siimage(struct pci_dev *, const char *);
109 static void init_iops_siimage(ide_hwif_t *);
110 static void init_hwif_siimage(ide_hwif_t *);
111 static void init_dma_siimage(ide_hwif_t *, unsigned long);
113 static ide_pci_device_t siimage_chipsets[] __devinitdata = {
115 .vendor = PCI_VENDOR_ID_CMD,
116 .device = PCI_DEVICE_ID_SII_680,
118 .init_chipset = init_chipset_siimage,
119 .init_iops = init_iops_siimage,
120 .init_hwif = init_hwif_siimage,
121 .init_dma = init_dma_siimage,
124 .enablebits = {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
125 .bootable = ON_BOARD,
128 .vendor = PCI_VENDOR_ID_CMD,
129 .device = PCI_DEVICE_ID_SII_3112,
130 .name = "SiI3112 Serial ATA",
131 .init_chipset = init_chipset_siimage,
132 .init_iops = init_iops_siimage,
133 .init_hwif = init_hwif_siimage,
134 .init_dma = init_dma_siimage,
137 .enablebits = {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
138 .bootable = ON_BOARD,
148 #endif /* SIIMAGE_H */