pata_cs5536: Add support for non-X86_32 platforms
PATCH v3 1/1 pata_cs5536: Add support for non-X86_32 platforms
Changes from v1:
o The driver version is incremented to 0.0.8 as feedback from "Sergei Shtylyov" <[email protected]>.
---
pata_cs5536 does work on the other platforms(e.g. Loongson, a MIPS variant), so, remove the dependency of X86_32 and fix the building errors under the other platforms via only reserving the X86_32 specific parts for X86_32.
pata_amd also supports cs5536 IDE controller, but this one saves about 33k for the compressed kernel image(vmlinuz for MIPS).
--- drivers/ata/Kconfig | 2 +- drivers/ata/pata_cs5536.c | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-)
drivers/ata/Kconfig +1 -1
@@ -366,7 +366,7 @@ config PATA_CS5535 config PATA_CS5536 tristate "CS5536 PATA support" - depends on PCI && X86 && !X86_64 + depends on PCI help This option enables support for the AMD CS5536 companion chip used with the Geode LX processor family.
drivers/ata/pata_cs5536.c +12 -6
@@ -37,10 +37,20 @@#include <linux/delay.h> #include <linux/libata.h> #include <scsi/scsi_host.h> + +#ifdef CONFIG_X86_32 #include <asm/msr.h> +static int use_msr; +module_param_named (msr, use_msr, int,0644 ); +MODULE_PARM_DESC (msr,"Force using MSR to configure IDE function (Default: 0)" ); +#else +#define rdmsr (x, y, z) do { } while (0) +#define wrmsr (x, y, z) do { } while (0) +#define use_msr 0 +#endif #define DRV_NAME "pata_cs5536" -#define DRV_VERSION "0.0.7" +#define DRV_VERSION "0.0.8"enum {CFG =0 ,
@@ -75,8 +85,6 @@ enum { IDE_ETC_NODMA = 0x03, }; -static int use_msr; -static const u32 msr_reg[4 ] = {MSR_IDE_CFG ,MSR_IDE_DTC ,MSR_IDE_CAST ,MSR_IDE_ETC , };
@@ -88,7 +96,7 @@ static const u8 pci_reg[4] = {static inline int cs5536_read (struct pci_dev *pdev,int reg,u32 *val) {if (unlikely (use_msr)) { -u32 dummy; +u32 dummy__maybe_unused ;rdmsr (msr_reg[reg], *val, dummy);return 0 ;
@@ -294,8 +302,6 @@ MODULE_DESCRIPTION("low-level driver for the CS5536 IDE controller");MODULE_LICENSE ("GPL" );MODULE_DEVICE_TABLE (pci, cs5536);MODULE_VERSION (DRV_VERSION ); -module_param_named (msr, use_msr, int,0644 ); -MODULE_PARM_DESC (msr,"Force using MSR to configure IDE function (Default: 0)" );module_init (cs5536_init);module_exit (cs5536_exit);
Signature · 1 line
1.7.1
Hello.
Quoted 4 lines · Wu Zhangjin
Changes from v1:
o The driver version is incremented to 0.0.8 as feedback from "Sergei Shtylyov" <[email protected]>.
Note that this way the maintainer will have to hand edit your patch because
git will automatically drop your description and signoff (they're below ---).
Such comments better follow the --- tearline as I said as they'll be automatically dropped by git in that case.
Quoted 7 lines
---
pata_cs5536does work on the other platforms(e.g. Loongson, a MIPS variant), so, remove the dependency ofX86_32and fix the building errors under the other platforms via only reserving theX86_32specific parts forX86_32.
Quoted 6 lines
pata_amdalso supports cs5536 IDE controller, but this one saves about 33k for the compressed kernel image(vmlinuz for MIPS).Signed-off-by Zhang Le <[email protected]>Signed-off-by Chen Jie <[email protected]>Signed-off-by Wu Zhangjin <[email protected]>
WBR, Sergei
Jeff Garzik
AppliedQuoted 15 lines · Wu Zhangjin
Changes from v1:
o The driver version is incremented to 0.0.8 as feedback from "Sergei Shtylyov"<[email protected]>.
---
pata_cs5536does work on the other platforms(e.g. Loongson, a MIPS variant), so, remove the dependency ofX86_32and fix the building errors under the other platforms via only reserving theX86_32specific parts forX86_32.
pata_amdalso supports cs5536 IDE controller, but this one saves about 33k for the compressed kernel image(vmlinuz for MIPS).
Quoted 7 lines
Signed-off-by Zhang Le<[email protected]>Signed-off-by Chen Jie<[email protected]>Signed-off-by Wu Zhangjin<[email protected]>--- drivers/ata/Kconfig | 2 +- drivers/ata/pata_cs5536.c | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-)
applied, after hand-fixing the comment message (as Sergei noted, automated tools script everything after "---" from the commit message)
Quoted 25 lines · Jeff Garzik
Quoted 16 lines · Wu Zhangjin
Changes from v1:
o The driver version is incremented to 0.0.8 as feedback from "Sergei Shtylyov"<[email protected]>.
---
pata_cs5536does work on the other platforms(e.g. Loongson, a MIPS variant), so, remove the dependency ofX86_32and fix the building errors under the other platforms via only reserving theX86_32specific parts forX86_32.
pata_amdalso supports cs5536 IDE controller, but this one saves about 33k for the compressed kernel image(vmlinuz for MIPS).Quoted 7 lines
Signed-off-by Zhang Le<[email protected]>Signed-off-by Chen Jie<[email protected]>Signed-off-by Wu Zhangjin<[email protected]>---
drivers/ata/Kconfig | 2 +-drivers/ata/pata_cs5536.c| 18 ++++++++++++------2 files changed, 13 insertions(+), 7 deletions(-)
Quoted 3 lines
applied, after hand-fixing the comment message (as Sergei noted, automated tools script everything after "---" from the commit message)
Thanks Jeff and Sergei.
Regards,
Wu Zhangjin