Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 223600
b: refs/heads/master
c: 9272dcc
h: refs/heads/master
v: v3
  • Loading branch information
Wu Zhangjin authored and Jeff Garzik committed Dec 24, 2010
1 parent 0bd990a commit 095c8db
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 687a993339c4f3a63654746230da3aab8bbdbffd
refs/heads/master: 9272dcc232b84ccb027d6861077934055d42764d
2 changes: 1 addition & 1 deletion trunk/drivers/ata/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
18 changes: 12 additions & 6 deletions trunk/drivers/ata/pata_cs5536.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
};
Expand All @@ -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;
Expand Down Expand Up @@ -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);

0 comments on commit 095c8db

Please sign in to comment.