aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/mips/loongson/common/cs5536/cs5536_ehci.c2
-rw-r--r--arch/mips/loongson/common/cs5536/cs5536_ide.c14
-rw-r--r--arch/mips/loongson/common/cs5536/cs5536_ohci.c2
3 files changed, 17 insertions, 1 deletions
diff --git a/arch/mips/loongson/common/cs5536/cs5536_ehci.c b/arch/mips/loongson/common/cs5536/cs5536_ehci.c
index eaf8b86e3318..5b5cbba699b3 100644
--- a/arch/mips/loongson/common/cs5536/cs5536_ehci.c
+++ b/arch/mips/loongson/common/cs5536/cs5536_ehci.c
@@ -49,6 +49,8 @@ void pci_ehci_write_reg(int reg, u32 value)
49 lo |= SOFT_BAR_EHCI_FLAG; 49 lo |= SOFT_BAR_EHCI_FLAG;
50 _wrmsr(GLCP_MSR_REG(GLCP_SOFT_COM), hi, lo); 50 _wrmsr(GLCP_MSR_REG(GLCP_SOFT_COM), hi, lo);
51 } else if ((value & 0x01) == 0x00) { 51 } else if ((value & 0x01) == 0x00) {
52 _rdmsr(USB_MSR_REG(USB_EHCI), &hi, &lo);
53 lo = value;
52 _wrmsr(USB_MSR_REG(USB_EHCI), hi, lo); 54 _wrmsr(USB_MSR_REG(USB_EHCI), hi, lo);
53 55
54 value &= 0xfffffff0; 56 value &= 0xfffffff0;
diff --git a/arch/mips/loongson/common/cs5536/cs5536_ide.c b/arch/mips/loongson/common/cs5536/cs5536_ide.c
index 9a96b5664c78..7ebf17a949a9 100644
--- a/arch/mips/loongson/common/cs5536/cs5536_ide.c
+++ b/arch/mips/loongson/common/cs5536/cs5536_ide.c
@@ -51,6 +51,7 @@ void pci_ide_write_reg(int reg, u32 value)
51 lo |= SOFT_BAR_IDE_FLAG; 51 lo |= SOFT_BAR_IDE_FLAG;
52 _wrmsr(GLCP_MSR_REG(GLCP_SOFT_COM), hi, lo); 52 _wrmsr(GLCP_MSR_REG(GLCP_SOFT_COM), hi, lo);
53 } else if (value & 0x01) { 53 } else if (value & 0x01) {
54 _rdmsr(IDE_MSR_REG(IDE_IO_BAR), &hi, &lo);
54 lo = (value & 0xfffffff0) | 0x1; 55 lo = (value & 0xfffffff0) | 0x1;
55 _wrmsr(IDE_MSR_REG(IDE_IO_BAR), hi, lo); 56 _wrmsr(IDE_MSR_REG(IDE_IO_BAR), hi, lo);
56 57
@@ -65,19 +66,30 @@ void pci_ide_write_reg(int reg, u32 value)
65 _rdmsr(DIVIL_MSR_REG(DIVIL_BALL_OPTS), &hi, &lo); 66 _rdmsr(DIVIL_MSR_REG(DIVIL_BALL_OPTS), &hi, &lo);
66 lo |= 0x01; 67 lo |= 0x01;
67 _wrmsr(DIVIL_MSR_REG(DIVIL_BALL_OPTS), hi, lo); 68 _wrmsr(DIVIL_MSR_REG(DIVIL_BALL_OPTS), hi, lo);
68 } else 69 } else {
70 _rdmsr(IDE_MSR_REG(IDE_CFG), &hi, &lo);
71 lo = value;
69 _wrmsr(IDE_MSR_REG(IDE_CFG), hi, lo); 72 _wrmsr(IDE_MSR_REG(IDE_CFG), hi, lo);
73 }
70 break; 74 break;
71 case PCI_IDE_DTC_REG: 75 case PCI_IDE_DTC_REG:
76 _rdmsr(IDE_MSR_REG(IDE_DTC), &hi, &lo);
77 lo = value;
72 _wrmsr(IDE_MSR_REG(IDE_DTC), hi, lo); 78 _wrmsr(IDE_MSR_REG(IDE_DTC), hi, lo);
73 break; 79 break;
74 case PCI_IDE_CAST_REG: 80 case PCI_IDE_CAST_REG:
81 _rdmsr(IDE_MSR_REG(IDE_CAST), &hi, &lo);
82 lo = value;
75 _wrmsr(IDE_MSR_REG(IDE_CAST), hi, lo); 83 _wrmsr(IDE_MSR_REG(IDE_CAST), hi, lo);
76 break; 84 break;
77 case PCI_IDE_ETC_REG: 85 case PCI_IDE_ETC_REG:
86 _rdmsr(IDE_MSR_REG(IDE_ETC), &hi, &lo);
87 lo = value;
78 _wrmsr(IDE_MSR_REG(IDE_ETC), hi, lo); 88 _wrmsr(IDE_MSR_REG(IDE_ETC), hi, lo);
79 break; 89 break;
80 case PCI_IDE_PM_REG: 90 case PCI_IDE_PM_REG:
91 _rdmsr(IDE_MSR_REG(IDE_INTERNAL_PM), &hi, &lo);
92 lo = value;
81 _wrmsr(IDE_MSR_REG(IDE_INTERNAL_PM), hi, lo); 93 _wrmsr(IDE_MSR_REG(IDE_INTERNAL_PM), hi, lo);
82 break; 94 break;
83 default: 95 default:
diff --git a/arch/mips/loongson/common/cs5536/cs5536_ohci.c b/arch/mips/loongson/common/cs5536/cs5536_ohci.c
index db5900aadd6b..bdedf512baf7 100644
--- a/arch/mips/loongson/common/cs5536/cs5536_ohci.c
+++ b/arch/mips/loongson/common/cs5536/cs5536_ohci.c
@@ -49,6 +49,8 @@ void pci_ohci_write_reg(int reg, u32 value)
49 lo |= SOFT_BAR_OHCI_FLAG; 49 lo |= SOFT_BAR_OHCI_FLAG;
50 _wrmsr(GLCP_MSR_REG(GLCP_SOFT_COM), hi, lo); 50 _wrmsr(GLCP_MSR_REG(GLCP_SOFT_COM), hi, lo);
51 } else if ((value & 0x01) == 0x00) { 51 } else if ((value & 0x01) == 0x00) {
52 _rdmsr(USB_MSR_REG(USB_OHCI), &hi, &lo);
53 lo = value;
52 _wrmsr(USB_MSR_REG(USB_OHCI), hi, lo); 54 _wrmsr(USB_MSR_REG(USB_OHCI), hi, lo);
53 55
54 value &= 0xfffffff0; 56 value &= 0xfffffff0;