pata_rdc: driver for RDC ATA devices
PATCH 1/1 pata_rdc: driver for RDC ATA devices
From: Alan Cox <[email protected]>
Give this a spin.. it ought to be fairly close to what is needed and is just a cut down from the piix driver (upon which that spec is based)
---
drivers/ata/Kconfig | 10 + drivers/ata/Makefile | 1 drivers/ata/pata_rdc.c | 400 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 411 insertions(+), 0 deletions(-) create mode 100644 drivers/ata/pata_rdc.c
drivers/ata/Kconfig +10 -0
@@ -586,6 +586,16 @@ config PATA_RB532 If unsure, say N. +config PATA_RDC + tristate "RDC PATA support" + depends on PCI + help + This option enables basic support for the later RDC PATA controllers + controllers via the new ATA layer. For the RDC 1010, you need to + enable the IT821X driver instead. + + If unsure, say N. + config PATA_RZ1000 tristate "PC Tech RZ1000 PATA support" depends on PCI
drivers/ata/Makefile +1 -0
@@ -57,6 +57,7 @@ obj-$(CONFIG_PATA_PDC_OLD) += pata_pdc202xx_old.o obj-$(CONFIG_PATA_QDI) += pata_qdi.o obj-$(CONFIG_PATA_RADISYS) += pata_radisys.o obj-$(CONFIG_PATA_RB532) += pata_rb532_cf.o +obj-$(CONFIG_PATA_RDC) += pata_rdc.o obj-$(CONFIG_PATA_RZ1000) += pata_rz1000.o obj-$(CONFIG_PATA_SC1200) += pata_sc1200.o obj-$(CONFIG_PATA_SERVERWORKS) += pata_serverworks.o
drivers/ata/pata_rdc.c new file +400 -0
400 lines not on this page · raw message
drivers/ata/pata_rdc.c
Quoted 6 lines · Alan Cox
From: Alan Cox <[email protected]>
drivers/ata/pata_rdc.c new file +0
-0
[]
drivers/ata/pata_rdc.c line 101
Quoted 2 lines
drivers/ata/pata_rdc.c new file +2
-0+static void rdc_set_piomode (struct ata_port *ap,struct ata_device *adev) +{
[]
drivers/ata/pata_rdc.c line 117
Quoted 6 lines
drivers/ata/pata_rdc.c new file +6
-0+static const /* ISP RTC */ +u8 timings[][2 ] = { {0 ,0 }, + {0 ,0 }, + {1 ,0 }, + {2 ,1 }, + {2 ,3 }, };
[]
drivers/ata/pata_rdc.c line 191
Quoted 8 lines
drivers/ata/pata_rdc.c new file +8
-0+static void do_rdc_set_dmamode (struct ata_port *ap,struct ata_device *adev) +{ +static const /* ISP RTC */ +u8 timings[][2 ] = { {0 ,0 }, + {0 ,0 }, + {1 ,0 }, + {2 ,1 }, + {2 ,3 }, };
Maybe consolidate?
The code seems to have many magic constants that might be better #define'd and or'd.
Quoted 4 lines
Maybe consolidate?
The code seems to have many magic constants that might be better #define'd and or'd.
If you've got the spec it doesn't go around trying to award hundreds of bits obscure names so naming them would be silly. If you've not got the spec then whether its WOMBAT_DERANDOMISE or 0x04 doesn't really make any difference to your understanding ;)
(And the spec is public)
It's simply a cut down from ata_piix. If you want to clean up ata_piix a bit then go for it - send patches to Jeff.