From da9091ee3b5f9808c64abb925cefe7b100018614 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 27 Jun 2005 15:24:30 -0700 Subject: [PATCH] ide: it8212 backport for Bartlomiej IDE This lets you throw out the iteraid stuff that has ended up back in due to stupid goings on in the IDE world. Its the same heavily tested code shipped in Fedora/Red Hat products but without the other dependancies on the Bartlomiej IDE layer. Pre-requisite: the ide-disk patch I sent to handle pure LBA devices. Obviously you lose things like hot unplug with the Bartlomiej IDE layer at the moment but that won't matter to most users. The patch does the following - Add IT8211/12 to pci_ids.h - Add Makefile/Kconfig entry - Add it8212 driver No core IDE code is touched by this diff Embedded system testing and the ability to force raid mode off by David Howells Made possible by the ite reference code, documentation and also several clarifications and pieces of assistance provided by ITE themselves Signed-off-by: Alan Cox Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/pci_ids.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/linux') diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index a3961e1d518..1e0bc6a8d65 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -1815,6 +1815,8 @@ #define PCI_VENDOR_ID_ITE 0x1283 #define PCI_DEVICE_ID_ITE_IT8172G 0x8172 #define PCI_DEVICE_ID_ITE_IT8172G_AUDIO 0x0801 +#define PCI_DEVICE_ID_ITE_8211 0x8211 +#define PCI_DEVICE_ID_ITE_8212 0x8212 #define PCI_DEVICE_ID_ITE_8872 0x8872 #define PCI_DEVICE_ID_ITE_IT8330G_0 0xe886 -- cgit v1.2.3 From 1ad275e3e7d253d44f03868e85977c908e334fed Mon Sep 17 00:00:00 2001 From: Dominik Brodowski Date: Mon, 27 Jun 2005 16:28:06 -0700 Subject: [PATCH] pcmcia: device and driver matching The actual matching of pcmcia drivers and pcmcia devices. The original version of this was written by David Woodhouse. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/mod_devicetable.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'include/linux') diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index d6eb7b2efc0..e9651cd8310 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h @@ -175,4 +175,37 @@ struct serio_device_id { }; +/* PCMCIA */ + +struct pcmcia_device_id { + __u16 match_flags; + + __u16 manf_id; + __u16 card_id; + + __u8 func_id; + + /* for real multi-function devices */ + __u8 function; + + /* for pseude multi-function devices */ + __u8 device_no; + + const char * prod_id[4]; + __u32 prod_id_hash[4]; + + /* not matched against */ + kernel_ulong_t driver_info; +}; + +#define PCMCIA_DEV_ID_MATCH_MANF_ID 0x0001 +#define PCMCIA_DEV_ID_MATCH_CARD_ID 0x0002 +#define PCMCIA_DEV_ID_MATCH_FUNC_ID 0x0004 +#define PCMCIA_DEV_ID_MATCH_FUNCTION 0x0008 +#define PCMCIA_DEV_ID_MATCH_PROD_ID1 0x0010 +#define PCMCIA_DEV_ID_MATCH_PROD_ID2 0x0020 +#define PCMCIA_DEV_ID_MATCH_PROD_ID3 0x0040 +#define PCMCIA_DEV_ID_MATCH_PROD_ID4 0x0080 +#define PCMCIA_DEV_ID_MATCH_DEVICE_NO 0x0100 + #endif /* LINUX_MOD_DEVICETABLE_H */ -- cgit v1.2.3 From ea7b38825bba66a81745a706da70a1c81adc95bd Mon Sep 17 00:00:00 2001 From: Dominik Brodowski Date: Mon, 27 Jun 2005 16:28:07 -0700 Subject: [PATCH] pcmcia: match for fake CIS Add another match flag for devices needing a CIS override. The driver will only probe/attach if the CIS has been replaced before. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/mod_devicetable.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/linux') diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index e9651cd8310..c0106d68bb6 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h @@ -196,6 +196,7 @@ struct pcmcia_device_id { /* not matched against */ kernel_ulong_t driver_info; + char * cisfile; }; #define PCMCIA_DEV_ID_MATCH_MANF_ID 0x0001 @@ -207,5 +208,6 @@ struct pcmcia_device_id { #define PCMCIA_DEV_ID_MATCH_PROD_ID3 0x0040 #define PCMCIA_DEV_ID_MATCH_PROD_ID4 0x0080 #define PCMCIA_DEV_ID_MATCH_DEVICE_NO 0x0100 +#define PCMCIA_DEV_ID_MATCH_FAKE_CIS 0x0200 #endif /* LINUX_MOD_DEVICETABLE_H */ -- cgit v1.2.3 From f602ff7eb4e44e7245bfeeba4d078144703fcd76 Mon Sep 17 00:00:00 2001 From: Dominik Brodowski Date: Mon, 27 Jun 2005 16:28:09 -0700 Subject: [PATCH] pcmcia: match "anonymous" cards If a card doesn't provide _any_ information about itself, assume it is a so-called "anonymous" card. pcmciamtd will bind to it if it is configured to do so. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/mod_devicetable.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/linux') diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index c0106d68bb6..8a8dc82a941 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h @@ -209,5 +209,6 @@ struct pcmcia_device_id { #define PCMCIA_DEV_ID_MATCH_PROD_ID4 0x0080 #define PCMCIA_DEV_ID_MATCH_DEVICE_NO 0x0100 #define PCMCIA_DEV_ID_MATCH_FAKE_CIS 0x0200 +#define PCMCIA_DEV_ID_MATCH_ANONYMOUS 0x0400 #endif /* LINUX_MOD_DEVICETABLE_H */ -- cgit v1.2.3 From aecab27aeabaa897d69fc082686df314329830de Mon Sep 17 00:00:00 2001 From: Dominik Brodowski Date: Mon, 27 Jun 2005 16:28:56 -0700 Subject: [PATCH] pcmcia: mod_devicetable.h fix for different sizes in kernel- and userspace The size of pointers may differ between (userspace) modpost and (kernelspace) modules -- so fix mod_devicetable.h to reflect this possibility. Signed-off-by: Dominik Brodowski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/mod_devicetable.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index 8a8dc82a941..9b6d05172ed 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h @@ -191,12 +191,22 @@ struct pcmcia_device_id { /* for pseude multi-function devices */ __u8 device_no; - const char * prod_id[4]; __u32 prod_id_hash[4]; + /* not matched against in kernelspace*/ +#ifdef __KERNEL__ + const char * prod_id[4]; +#else + kernel_ulong_t prod_id[4]; +#endif + /* not matched against */ kernel_ulong_t driver_info; +#ifdef __KERNEL__ char * cisfile; +#else + kernel_ulong_t cisfile; +#endif }; #define PCMCIA_DEV_ID_MATCH_MANF_ID 0x0001 -- cgit v1.2.3