diff options
-rw-r--r-- | drivers/ata/Kconfig | 2 | ||||
-rw-r--r-- | drivers/ata/pata_cs5536.c | 18 |
2 files changed, 13 insertions, 7 deletions
diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig index 11ec911016c6..cfd04f4e418c 100644 --- a/drivers/ata/Kconfig +++ b/drivers/ata/Kconfig | |||
@@ -366,7 +366,7 @@ config PATA_CS5535 | |||
366 | 366 | ||
367 | config PATA_CS5536 | 367 | config PATA_CS5536 |
368 | tristate "CS5536 PATA support" | 368 | tristate "CS5536 PATA support" |
369 | depends on PCI && X86 && !X86_64 | 369 | depends on PCI |
370 | help | 370 | help |
371 | This option enables support for the AMD CS5536 | 371 | This option enables support for the AMD CS5536 |
372 | companion chip used with the Geode LX processor family. | 372 | companion chip used with the Geode LX processor family. |
diff --git a/drivers/ata/pata_cs5536.c b/drivers/ata/pata_cs5536.c index 21ee23f89e88..a6e6c963b6ae 100644 --- a/drivers/ata/pata_cs5536.c +++ b/drivers/ata/pata_cs5536.c | |||
@@ -37,10 +37,20 @@ | |||
37 | #include <linux/delay.h> | 37 | #include <linux/delay.h> |
38 | #include <linux/libata.h> | 38 | #include <linux/libata.h> |
39 | #include <scsi/scsi_host.h> | 39 | #include <scsi/scsi_host.h> |
40 | |||
41 | #ifdef CONFIG_X86_32 | ||
40 | #include <asm/msr.h> | 42 | #include <asm/msr.h> |
43 | static int use_msr; | ||
44 | module_param_named(msr, use_msr, int, 0644); | ||
45 | MODULE_PARM_DESC(msr, "Force using MSR to configure IDE function (Default: 0)"); | ||
46 | #else | ||
47 | #define rdmsr(x, y, z) do { } while (0) | ||
48 | #define wrmsr(x, y, z) do { } while (0) | ||
49 | #define use_msr 0 | ||
50 | #endif | ||
41 | 51 | ||
42 | #define DRV_NAME "pata_cs5536" | 52 | #define DRV_NAME "pata_cs5536" |
43 | #define DRV_VERSION "0.0.7" | 53 | #define DRV_VERSION "0.0.8" |
44 | 54 | ||
45 | enum { | 55 | enum { |
46 | CFG = 0, | 56 | CFG = 0, |
@@ -75,8 +85,6 @@ enum { | |||
75 | IDE_ETC_NODMA = 0x03, | 85 | IDE_ETC_NODMA = 0x03, |
76 | }; | 86 | }; |
77 | 87 | ||
78 | static int use_msr; | ||
79 | |||
80 | static const u32 msr_reg[4] = { | 88 | static const u32 msr_reg[4] = { |
81 | MSR_IDE_CFG, MSR_IDE_DTC, MSR_IDE_CAST, MSR_IDE_ETC, | 89 | MSR_IDE_CFG, MSR_IDE_DTC, MSR_IDE_CAST, MSR_IDE_ETC, |
82 | }; | 90 | }; |
@@ -88,7 +96,7 @@ static const u8 pci_reg[4] = { | |||
88 | static inline int cs5536_read(struct pci_dev *pdev, int reg, u32 *val) | 96 | static inline int cs5536_read(struct pci_dev *pdev, int reg, u32 *val) |
89 | { | 97 | { |
90 | if (unlikely(use_msr)) { | 98 | if (unlikely(use_msr)) { |
91 | u32 dummy; | 99 | u32 dummy __maybe_unused; |
92 | 100 | ||
93 | rdmsr(msr_reg[reg], *val, dummy); | 101 | rdmsr(msr_reg[reg], *val, dummy); |
94 | return 0; | 102 | return 0; |
@@ -294,8 +302,6 @@ MODULE_DESCRIPTION("low-level driver for the CS5536 IDE controller"); | |||
294 | MODULE_LICENSE("GPL"); | 302 | MODULE_LICENSE("GPL"); |
295 | MODULE_DEVICE_TABLE(pci, cs5536); | 303 | MODULE_DEVICE_TABLE(pci, cs5536); |
296 | MODULE_VERSION(DRV_VERSION); | 304 | MODULE_VERSION(DRV_VERSION); |
297 | module_param_named(msr, use_msr, int, 0644); | ||
298 | MODULE_PARM_DESC(msr, "Force using MSR to configure IDE function (Default: 0)"); | ||
299 | 305 | ||
300 | module_init(cs5536_init); | 306 | module_init(cs5536_init); |
301 | module_exit(cs5536_exit); | 307 | module_exit(cs5536_exit); |