aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/Kconfig2
-rw-r--r--arch/mips/dec/time.c18
-rw-r--r--arch/mips/include/asm/mc146818-time.h18
-rw-r--r--arch/mips/include/asm/txx9/tx4938.h13
-rw-r--r--arch/mips/oprofile/common.c2
-rw-r--r--arch/mips/oprofile/op_impl.h2
-rw-r--r--arch/mips/oprofile/op_model_rm9000.c2
-rw-r--r--arch/mips/pmc-sierra/yosemite/setup.c30
-rw-r--r--arch/mips/sibyte/swarm/rtc_m41t81.c26
-rw-r--r--arch/mips/sibyte/swarm/rtc_xicor1241.c26
-rw-r--r--arch/mips/txx9/generic/setup_tx4938.c47
-rw-r--r--arch/mips/txx9/rbtx4938/setup.c1
12 files changed, 125 insertions, 62 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index b905744d7915..5f149b030c0f 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -1885,6 +1885,8 @@ config PROBE_INITRD_HEADER
1885 add initrd or initramfs image to the kernel image. 1885 add initrd or initramfs image to the kernel image.
1886 Otherwise, say N. 1886 Otherwise, say N.
1887 1887
1888source "kernel/Kconfig.freezer"
1889
1888menu "Bus options (PCI, PCMCIA, EISA, ISA, TC)" 1890menu "Bus options (PCI, PCMCIA, EISA, ISA, TC)"
1889 1891
1890config HW_HAS_EISA 1892config HW_HAS_EISA
diff --git a/arch/mips/dec/time.c b/arch/mips/dec/time.c
index 3965fda94a89..1359c03ded51 100644
--- a/arch/mips/dec/time.c
+++ b/arch/mips/dec/time.c
@@ -45,12 +45,12 @@ unsigned long read_persistent_clock(void)
45 spin_unlock_irqrestore(&rtc_lock, flags); 45 spin_unlock_irqrestore(&rtc_lock, flags);
46 46
47 if (!(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY) || RTC_ALWAYS_BCD) { 47 if (!(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY) || RTC_ALWAYS_BCD) {
48 sec = BCD2BIN(sec); 48 sec = bcd2bin(sec);
49 min = BCD2BIN(min); 49 min = bcd2bin(min);
50 hour = BCD2BIN(hour); 50 hour = bcd2bin(hour);
51 day = BCD2BIN(day); 51 day = bcd2bin(day);
52 mon = BCD2BIN(mon); 52 mon = bcd2bin(mon);
53 year = BCD2BIN(year); 53 year = bcd2bin(year);
54 } 54 }
55 55
56 year += real_year - 72 + 2000; 56 year += real_year - 72 + 2000;
@@ -83,7 +83,7 @@ int rtc_mips_set_mmss(unsigned long nowtime)
83 83
84 cmos_minutes = CMOS_READ(RTC_MINUTES); 84 cmos_minutes = CMOS_READ(RTC_MINUTES);
85 if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) 85 if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD)
86 cmos_minutes = BCD2BIN(cmos_minutes); 86 cmos_minutes = bcd2bin(cmos_minutes);
87 87
88 /* 88 /*
89 * since we're only adjusting minutes and seconds, 89 * since we're only adjusting minutes and seconds,
@@ -99,8 +99,8 @@ int rtc_mips_set_mmss(unsigned long nowtime)
99 99
100 if (abs(real_minutes - cmos_minutes) < 30) { 100 if (abs(real_minutes - cmos_minutes) < 30) {
101 if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) { 101 if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) {
102 real_seconds = BIN2BCD(real_seconds); 102 real_seconds = bin2bcd(real_seconds);
103 real_minutes = BIN2BCD(real_minutes); 103 real_minutes = bin2bcd(real_minutes);
104 } 104 }
105 CMOS_WRITE(real_seconds, RTC_SECONDS); 105 CMOS_WRITE(real_seconds, RTC_SECONDS);
106 CMOS_WRITE(real_minutes, RTC_MINUTES); 106 CMOS_WRITE(real_minutes, RTC_MINUTES);
diff --git a/arch/mips/include/asm/mc146818-time.h b/arch/mips/include/asm/mc146818-time.h
index cdc379a0a94e..199b45733a95 100644
--- a/arch/mips/include/asm/mc146818-time.h
+++ b/arch/mips/include/asm/mc146818-time.h
@@ -44,7 +44,7 @@ static inline int mc146818_set_rtc_mmss(unsigned long nowtime)
44 44
45 cmos_minutes = CMOS_READ(RTC_MINUTES); 45 cmos_minutes = CMOS_READ(RTC_MINUTES);
46 if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) 46 if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD)
47 BCD_TO_BIN(cmos_minutes); 47 cmos_minutes = bcd2bin(cmos_minutes);
48 48
49 /* 49 /*
50 * since we're only adjusting minutes and seconds, 50 * since we're only adjusting minutes and seconds,
@@ -60,8 +60,8 @@ static inline int mc146818_set_rtc_mmss(unsigned long nowtime)
60 60
61 if (abs(real_minutes - cmos_minutes) < 30) { 61 if (abs(real_minutes - cmos_minutes) < 30) {
62 if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) { 62 if (!(save_control & RTC_DM_BINARY) || RTC_ALWAYS_BCD) {
63 BIN_TO_BCD(real_seconds); 63 real_seconds = bin2bcd(real_seconds);
64 BIN_TO_BCD(real_minutes); 64 real_minutes = bin2bcd(real_minutes);
65 } 65 }
66 CMOS_WRITE(real_seconds, RTC_SECONDS); 66 CMOS_WRITE(real_seconds, RTC_SECONDS);
67 CMOS_WRITE(real_minutes, RTC_MINUTES); 67 CMOS_WRITE(real_minutes, RTC_MINUTES);
@@ -103,12 +103,12 @@ static inline unsigned long mc146818_get_cmos_time(void)
103 } while (sec != CMOS_READ(RTC_SECONDS)); 103 } while (sec != CMOS_READ(RTC_SECONDS));
104 104
105 if (!(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY) || RTC_ALWAYS_BCD) { 105 if (!(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY) || RTC_ALWAYS_BCD) {
106 BCD_TO_BIN(sec); 106 sec = bcd2bin(sec);
107 BCD_TO_BIN(min); 107 min = bcd2bin(min);
108 BCD_TO_BIN(hour); 108 hour = bcd2bin(hour);
109 BCD_TO_BIN(day); 109 day = bcd2bin(day);
110 BCD_TO_BIN(mon); 110 mon = bcd2bin(mon);
111 BCD_TO_BIN(year); 111 year = bcd2bin(year);
112 } 112 }
113 spin_unlock_irqrestore(&rtc_lock, flags); 113 spin_unlock_irqrestore(&rtc_lock, flags);
114 year = mc146818_decode_year(year); 114 year = mc146818_decode_year(year);
diff --git a/arch/mips/include/asm/txx9/tx4938.h b/arch/mips/include/asm/txx9/tx4938.h
index 989e7751135a..0b068154054c 100644
--- a/arch/mips/include/asm/txx9/tx4938.h
+++ b/arch/mips/include/asm/txx9/tx4938.h
@@ -292,4 +292,17 @@ void tx4938_setup_pcierr_irq(void);
292void tx4938_irq_init(void); 292void tx4938_irq_init(void);
293void tx4938_mtd_init(int ch); 293void tx4938_mtd_init(int ch);
294 294
295struct tx4938ide_platform_info {
296 /*
297 * I/O port shift, for platforms with ports that are
298 * constantly spaced and need larger than the 1-byte
299 * spacing used by ata_std_ports().
300 */
301 unsigned int ioport_shift;
302 unsigned int gbus_clock; /* 0 means no PIO mode tuning. */
303 unsigned int ebus_ch;
304};
305
306void tx4938_ata_init(unsigned int irq, unsigned int shift, int tune);
307
295#endif 308#endif
diff --git a/arch/mips/oprofile/common.c b/arch/mips/oprofile/common.c
index dd2fbd6645c1..3bf3354547f6 100644
--- a/arch/mips/oprofile/common.c
+++ b/arch/mips/oprofile/common.c
@@ -32,7 +32,7 @@ static int op_mips_setup(void)
32 return 0; 32 return 0;
33} 33}
34 34
35static int op_mips_create_files(struct super_block * sb, struct dentry * root) 35static int op_mips_create_files(struct super_block *sb, struct dentry *root)
36{ 36{
37 int i; 37 int i;
38 38
diff --git a/arch/mips/oprofile/op_impl.h b/arch/mips/oprofile/op_impl.h
index 2bfc17c30106..f04b54fb37d1 100644
--- a/arch/mips/oprofile/op_impl.h
+++ b/arch/mips/oprofile/op_impl.h
@@ -27,7 +27,7 @@ struct op_counter_config {
27/* Per-architecture configury and hooks. */ 27/* Per-architecture configury and hooks. */
28struct op_mips_model { 28struct op_mips_model {
29 void (*reg_setup) (struct op_counter_config *); 29 void (*reg_setup) (struct op_counter_config *);
30 void (*cpu_setup) (void * dummy); 30 void (*cpu_setup) (void *dummy);
31 int (*init)(void); 31 int (*init)(void);
32 void (*exit)(void); 32 void (*exit)(void);
33 void (*cpu_start)(void *args); 33 void (*cpu_start)(void *args);
diff --git a/arch/mips/oprofile/op_model_rm9000.c b/arch/mips/oprofile/op_model_rm9000.c
index a45d3202894f..3aa81384966d 100644
--- a/arch/mips/oprofile/op_model_rm9000.c
+++ b/arch/mips/oprofile/op_model_rm9000.c
@@ -80,7 +80,7 @@ static void rm9000_cpu_stop(void *args)
80 write_c0_perfcontrol(0); 80 write_c0_perfcontrol(0);
81} 81}
82 82
83static irqreturn_t rm9000_perfcount_handler(int irq, void * dev_id) 83static irqreturn_t rm9000_perfcount_handler(int irq, void *dev_id)
84{ 84{
85 unsigned int control = read_c0_perfcontrol(); 85 unsigned int control = read_c0_perfcontrol();
86 struct pt_regs *regs = get_irq_regs(); 86 struct pt_regs *regs = get_irq_regs();
diff --git a/arch/mips/pmc-sierra/yosemite/setup.c b/arch/mips/pmc-sierra/yosemite/setup.c
index 6537d90a25bb..2d3c0dca275d 100644
--- a/arch/mips/pmc-sierra/yosemite/setup.c
+++ b/arch/mips/pmc-sierra/yosemite/setup.c
@@ -79,14 +79,14 @@ unsigned long read_persistent_clock(void)
79 /* Stop the update to the time */ 79 /* Stop the update to the time */
80 m48t37_base->control = 0x40; 80 m48t37_base->control = 0x40;
81 81
82 year = BCD2BIN(m48t37_base->year); 82 year = bcd2bin(m48t37_base->year);
83 year += BCD2BIN(m48t37_base->century) * 100; 83 year += bcd2bin(m48t37_base->century) * 100;
84 84
85 month = BCD2BIN(m48t37_base->month); 85 month = bcd2bin(m48t37_base->month);
86 day = BCD2BIN(m48t37_base->date); 86 day = bcd2bin(m48t37_base->date);
87 hour = BCD2BIN(m48t37_base->hour); 87 hour = bcd2bin(m48t37_base->hour);
88 min = BCD2BIN(m48t37_base->min); 88 min = bcd2bin(m48t37_base->min);
89 sec = BCD2BIN(m48t37_base->sec); 89 sec = bcd2bin(m48t37_base->sec);
90 90
91 /* Start the update to the time again */ 91 /* Start the update to the time again */
92 m48t37_base->control = 0x00; 92 m48t37_base->control = 0x00;
@@ -113,22 +113,22 @@ int rtc_mips_set_time(unsigned long tim)
113 m48t37_base->control = 0x80; 113 m48t37_base->control = 0x80;
114 114
115 /* year */ 115 /* year */
116 m48t37_base->year = BIN2BCD(tm.tm_year % 100); 116 m48t37_base->year = bin2bcd(tm.tm_year % 100);
117 m48t37_base->century = BIN2BCD(tm.tm_year / 100); 117 m48t37_base->century = bin2bcd(tm.tm_year / 100);
118 118
119 /* month */ 119 /* month */
120 m48t37_base->month = BIN2BCD(tm.tm_mon); 120 m48t37_base->month = bin2bcd(tm.tm_mon);
121 121
122 /* day */ 122 /* day */
123 m48t37_base->date = BIN2BCD(tm.tm_mday); 123 m48t37_base->date = bin2bcd(tm.tm_mday);
124 124
125 /* hour/min/sec */ 125 /* hour/min/sec */
126 m48t37_base->hour = BIN2BCD(tm.tm_hour); 126 m48t37_base->hour = bin2bcd(tm.tm_hour);
127 m48t37_base->min = BIN2BCD(tm.tm_min); 127 m48t37_base->min = bin2bcd(tm.tm_min);
128 m48t37_base->sec = BIN2BCD(tm.tm_sec); 128 m48t37_base->sec = bin2bcd(tm.tm_sec);
129 129
130 /* day of week -- not really used, but let's keep it up-to-date */ 130 /* day of week -- not really used, but let's keep it up-to-date */
131 m48t37_base->day = BIN2BCD(tm.tm_wday + 1); 131 m48t37_base->day = bin2bcd(tm.tm_wday + 1);
132 132
133 /* disable writing */ 133 /* disable writing */
134 m48t37_base->control = 0x00; 134 m48t37_base->control = 0x00;
diff --git a/arch/mips/sibyte/swarm/rtc_m41t81.c b/arch/mips/sibyte/swarm/rtc_m41t81.c
index 26fbff4c15b1..b732600b47f5 100644
--- a/arch/mips/sibyte/swarm/rtc_m41t81.c
+++ b/arch/mips/sibyte/swarm/rtc_m41t81.c
@@ -156,32 +156,32 @@ int m41t81_set_time(unsigned long t)
156 */ 156 */
157 157
158 spin_lock_irqsave(&rtc_lock, flags); 158 spin_lock_irqsave(&rtc_lock, flags);
159 tm.tm_sec = BIN2BCD(tm.tm_sec); 159 tm.tm_sec = bin2bcd(tm.tm_sec);
160 m41t81_write(M41T81REG_SC, tm.tm_sec); 160 m41t81_write(M41T81REG_SC, tm.tm_sec);
161 161
162 tm.tm_min = BIN2BCD(tm.tm_min); 162 tm.tm_min = bin2bcd(tm.tm_min);
163 m41t81_write(M41T81REG_MN, tm.tm_min); 163 m41t81_write(M41T81REG_MN, tm.tm_min);
164 164
165 tm.tm_hour = BIN2BCD(tm.tm_hour); 165 tm.tm_hour = bin2bcd(tm.tm_hour);
166 tm.tm_hour = (tm.tm_hour & 0x3f) | (m41t81_read(M41T81REG_HR) & 0xc0); 166 tm.tm_hour = (tm.tm_hour & 0x3f) | (m41t81_read(M41T81REG_HR) & 0xc0);
167 m41t81_write(M41T81REG_HR, tm.tm_hour); 167 m41t81_write(M41T81REG_HR, tm.tm_hour);
168 168
169 /* tm_wday starts from 0 to 6 */ 169 /* tm_wday starts from 0 to 6 */
170 if (tm.tm_wday == 0) tm.tm_wday = 7; 170 if (tm.tm_wday == 0) tm.tm_wday = 7;
171 tm.tm_wday = BIN2BCD(tm.tm_wday); 171 tm.tm_wday = bin2bcd(tm.tm_wday);
172 m41t81_write(M41T81REG_DY, tm.tm_wday); 172 m41t81_write(M41T81REG_DY, tm.tm_wday);
173 173
174 tm.tm_mday = BIN2BCD(tm.tm_mday); 174 tm.tm_mday = bin2bcd(tm.tm_mday);
175 m41t81_write(M41T81REG_DT, tm.tm_mday); 175 m41t81_write(M41T81REG_DT, tm.tm_mday);
176 176
177 /* tm_mon starts from 0, *ick* */ 177 /* tm_mon starts from 0, *ick* */
178 tm.tm_mon ++; 178 tm.tm_mon ++;
179 tm.tm_mon = BIN2BCD(tm.tm_mon); 179 tm.tm_mon = bin2bcd(tm.tm_mon);
180 m41t81_write(M41T81REG_MO, tm.tm_mon); 180 m41t81_write(M41T81REG_MO, tm.tm_mon);
181 181
182 /* we don't do century, everything is beyond 2000 */ 182 /* we don't do century, everything is beyond 2000 */
183 tm.tm_year %= 100; 183 tm.tm_year %= 100;
184 tm.tm_year = BIN2BCD(tm.tm_year); 184 tm.tm_year = bin2bcd(tm.tm_year);
185 m41t81_write(M41T81REG_YR, tm.tm_year); 185 m41t81_write(M41T81REG_YR, tm.tm_year);
186 spin_unlock_irqrestore(&rtc_lock, flags); 186 spin_unlock_irqrestore(&rtc_lock, flags);
187 187
@@ -209,12 +209,12 @@ unsigned long m41t81_get_time(void)
209 year = m41t81_read(M41T81REG_YR); 209 year = m41t81_read(M41T81REG_YR);
210 spin_unlock_irqrestore(&rtc_lock, flags); 210 spin_unlock_irqrestore(&rtc_lock, flags);
211 211
212 sec = BCD2BIN(sec); 212 sec = bcd2bin(sec);
213 min = BCD2BIN(min); 213 min = bcd2bin(min);
214 hour = BCD2BIN(hour); 214 hour = bcd2bin(hour);
215 day = BCD2BIN(day); 215 day = bcd2bin(day);
216 mon = BCD2BIN(mon); 216 mon = bcd2bin(mon);
217 year = BCD2BIN(year); 217 year = bcd2bin(year);
218 218
219 year += 2000; 219 year += 2000;
220 220
diff --git a/arch/mips/sibyte/swarm/rtc_xicor1241.c b/arch/mips/sibyte/swarm/rtc_xicor1241.c
index ff3e5dabb348..4438b2195c44 100644
--- a/arch/mips/sibyte/swarm/rtc_xicor1241.c
+++ b/arch/mips/sibyte/swarm/rtc_xicor1241.c
@@ -124,18 +124,18 @@ int xicor_set_time(unsigned long t)
124 xicor_write(X1241REG_SR, X1241REG_SR_WEL | X1241REG_SR_RWEL); 124 xicor_write(X1241REG_SR, X1241REG_SR_WEL | X1241REG_SR_RWEL);
125 125
126 /* trivial ones */ 126 /* trivial ones */
127 tm.tm_sec = BIN2BCD(tm.tm_sec); 127 tm.tm_sec = bin2bcd(tm.tm_sec);
128 xicor_write(X1241REG_SC, tm.tm_sec); 128 xicor_write(X1241REG_SC, tm.tm_sec);
129 129
130 tm.tm_min = BIN2BCD(tm.tm_min); 130 tm.tm_min = bin2bcd(tm.tm_min);
131 xicor_write(X1241REG_MN, tm.tm_min); 131 xicor_write(X1241REG_MN, tm.tm_min);
132 132
133 tm.tm_mday = BIN2BCD(tm.tm_mday); 133 tm.tm_mday = bin2bcd(tm.tm_mday);
134 xicor_write(X1241REG_DT, tm.tm_mday); 134 xicor_write(X1241REG_DT, tm.tm_mday);
135 135
136 /* tm_mon starts from 0, *ick* */ 136 /* tm_mon starts from 0, *ick* */
137 tm.tm_mon ++; 137 tm.tm_mon ++;
138 tm.tm_mon = BIN2BCD(tm.tm_mon); 138 tm.tm_mon = bin2bcd(tm.tm_mon);
139 xicor_write(X1241REG_MO, tm.tm_mon); 139 xicor_write(X1241REG_MO, tm.tm_mon);
140 140
141 /* year is split */ 141 /* year is split */
@@ -148,7 +148,7 @@ int xicor_set_time(unsigned long t)
148 tmp = xicor_read(X1241REG_HR); 148 tmp = xicor_read(X1241REG_HR);
149 if (tmp & X1241REG_HR_MIL) { 149 if (tmp & X1241REG_HR_MIL) {
150 /* 24 hour format */ 150 /* 24 hour format */
151 tm.tm_hour = BIN2BCD(tm.tm_hour); 151 tm.tm_hour = bin2bcd(tm.tm_hour);
152 tmp = (tmp & ~0x3f) | (tm.tm_hour & 0x3f); 152 tmp = (tmp & ~0x3f) | (tm.tm_hour & 0x3f);
153 } else { 153 } else {
154 /* 12 hour format, with 0x2 for pm */ 154 /* 12 hour format, with 0x2 for pm */
@@ -157,7 +157,7 @@ int xicor_set_time(unsigned long t)
157 tmp |= 0x20; 157 tmp |= 0x20;
158 tm.tm_hour -= 12; 158 tm.tm_hour -= 12;
159 } 159 }
160 tm.tm_hour = BIN2BCD(tm.tm_hour); 160 tm.tm_hour = bin2bcd(tm.tm_hour);
161 tmp |= tm.tm_hour; 161 tmp |= tm.tm_hour;
162 } 162 }
163 xicor_write(X1241REG_HR, tmp); 163 xicor_write(X1241REG_HR, tmp);
@@ -191,13 +191,13 @@ unsigned long xicor_get_time(void)
191 y2k = xicor_read(X1241REG_Y2K); 191 y2k = xicor_read(X1241REG_Y2K);
192 spin_unlock_irqrestore(&rtc_lock, flags); 192 spin_unlock_irqrestore(&rtc_lock, flags);
193 193
194 sec = BCD2BIN(sec); 194 sec = bcd2bin(sec);
195 min = BCD2BIN(min); 195 min = bcd2bin(min);
196 hour = BCD2BIN(hour); 196 hour = bcd2bin(hour);
197 day = BCD2BIN(day); 197 day = bcd2bin(day);
198 mon = BCD2BIN(mon); 198 mon = bcd2bin(mon);
199 year = BCD2BIN(year); 199 year = bcd2bin(year);
200 y2k = BCD2BIN(y2k); 200 y2k = bcd2bin(y2k);
201 201
202 year += (y2k * 100); 202 year += (y2k * 100);
203 203
diff --git a/arch/mips/txx9/generic/setup_tx4938.c b/arch/mips/txx9/generic/setup_tx4938.c
index af724e53ef91..25819ff1c350 100644
--- a/arch/mips/txx9/generic/setup_tx4938.c
+++ b/arch/mips/txx9/generic/setup_tx4938.c
@@ -16,6 +16,7 @@
16#include <linux/param.h> 16#include <linux/param.h>
17#include <linux/ptrace.h> 17#include <linux/ptrace.h>
18#include <linux/mtd/physmap.h> 18#include <linux/mtd/physmap.h>
19#include <linux/platform_device.h>
19#include <asm/reboot.h> 20#include <asm/reboot.h>
20#include <asm/traps.h> 21#include <asm/traps.h>
21#include <asm/txx9irq.h> 22#include <asm/txx9irq.h>
@@ -335,6 +336,52 @@ void __init tx4938_mtd_init(int ch)
335 txx9_physmap_flash_init(ch, start, size, &pdata); 336 txx9_physmap_flash_init(ch, start, size, &pdata);
336} 337}
337 338
339void __init tx4938_ata_init(unsigned int irq, unsigned int shift, int tune)
340{
341 struct platform_device *pdev;
342 struct resource res[] = {
343 {
344 /* .start and .end are filled in later */
345 .flags = IORESOURCE_MEM,
346 }, {
347 .start = irq,
348 .flags = IORESOURCE_IRQ,
349 },
350 };
351 struct tx4938ide_platform_info pdata = {
352 .ioport_shift = shift,
353 /*
354 * The IDE driver should not change bus timings if other ISA
355 * devices existed.
356 */
357 .gbus_clock = tune ? txx9_gbus_clock : 0,
358 };
359 u64 ebccr;
360 int i;
361
362 if ((__raw_readq(&tx4938_ccfgptr->pcfg) &
363 (TX4938_PCFG_ATA_SEL | TX4938_PCFG_NDF_SEL))
364 != TX4938_PCFG_ATA_SEL)
365 return;
366 for (i = 0; i < 8; i++) {
367 /* check EBCCRn.ISA, EBCCRn.BSZ, EBCCRn.ME */
368 ebccr = __raw_readq(&tx4938_ebuscptr->cr[i]);
369 if ((ebccr & 0x00f00008) == 0x00e00008)
370 break;
371 }
372 if (i == 8)
373 return;
374 pdata.ebus_ch = i;
375 res[0].start = ((ebccr >> 48) << 20) + 0x10000;
376 res[0].end = res[0].start + 0x20000 - 1;
377 pdev = platform_device_alloc("tx4938ide", -1);
378 if (!pdev ||
379 platform_device_add_resources(pdev, res, ARRAY_SIZE(res)) ||
380 platform_device_add_data(pdev, &pdata, sizeof(pdata)) ||
381 platform_device_add(pdev))
382 platform_device_put(pdev);
383}
384
338static void __init tx4938_stop_unused_modules(void) 385static void __init tx4938_stop_unused_modules(void)
339{ 386{
340 __u64 pcfg, rst = 0, ckd = 0; 387 __u64 pcfg, rst = 0, ckd = 0;
diff --git a/arch/mips/txx9/rbtx4938/setup.c b/arch/mips/txx9/rbtx4938/setup.c
index e077cc4d3a59..547ff2920bf0 100644
--- a/arch/mips/txx9/rbtx4938/setup.c
+++ b/arch/mips/txx9/rbtx4938/setup.c
@@ -352,6 +352,7 @@ static void __init rbtx4938_device_init(void)
352 rbtx4938_ne_init(); 352 rbtx4938_ne_init();
353 tx4938_wdt_init(); 353 tx4938_wdt_init();
354 rbtx4938_mtd_init(); 354 rbtx4938_mtd_init();
355 tx4938_ata_init(RBTX4938_IRQ_IOC_ATA, 0, 1);
355 txx9_iocled_init(RBTX4938_LED_ADDR - IO_BASE, -1, 8, 1, "green", NULL); 356 txx9_iocled_init(RBTX4938_LED_ADDR - IO_BASE, -1, 8, 1, "green", NULL);
356} 357}
357 358