aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/sibyte
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2013-01-22 06:59:30 -0500
committerRalf Baechle <ralf@linux-mips.org>2013-02-01 04:00:22 -0500
commit7034228792cc561e79ff8600f02884bd4c80e287 (patch)
tree89b77af37d087d9de236fc5d21f60bf552d0a2c6 /arch/mips/sibyte
parent405ab01c70e18058d9c01a1256769a61fc65413e (diff)
MIPS: Whitespace cleanup.
Having received another series of whitespace patches I decided to do this once and for all rather than dealing with this kind of patches trickling in forever. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/sibyte')
-rw-r--r--arch/mips/sibyte/Platform6
-rw-r--r--arch/mips/sibyte/bcm1480/irq.c8
-rw-r--r--arch/mips/sibyte/common/cfe.c10
-rw-r--r--arch/mips/sibyte/common/sb_tbprof.c18
-rw-r--r--arch/mips/sibyte/sb1250/bus_watcher.c6
-rw-r--r--arch/mips/sibyte/sb1250/irq.c8
-rw-r--r--arch/mips/sibyte/sb1250/setup.c18
-rw-r--r--arch/mips/sibyte/swarm/platform.c4
-rw-r--r--arch/mips/sibyte/swarm/rtc_xicor1241.c50
9 files changed, 64 insertions, 64 deletions
diff --git a/arch/mips/sibyte/Platform b/arch/mips/sibyte/Platform
index 911dfe39c631..d03a07516f83 100644
--- a/arch/mips/sibyte/Platform
+++ b/arch/mips/sibyte/Platform
@@ -9,7 +9,7 @@ platform-$(CONFIG_SIBYTE_BCM1x80) += sibyte/
9# 9#
10# Sibyte SB1250 / BCM1480 family of SOCs 10# Sibyte SB1250 / BCM1480 family of SOCs
11# 11#
12cflags-$(CONFIG_SIBYTE_BCM112X) += \ 12cflags-$(CONFIG_SIBYTE_BCM112X) += \
13 -I$(srctree)/arch/mips/include/asm/mach-sibyte \ 13 -I$(srctree)/arch/mips/include/asm/mach-sibyte \
14 -DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1250_112x_ALL 14 -DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1250_112x_ALL
15 15
@@ -18,11 +18,11 @@ cflags-$(CONFIG_SIBYTE_SB1250) += \
18 -I$(srctree)/arch/mips/include/asm/mach-sibyte \ 18 -I$(srctree)/arch/mips/include/asm/mach-sibyte \
19 -DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1250_112x_ALL 19 -DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1250_112x_ALL
20 20
21cflags-$(CONFIG_SIBYTE_BCM1x55) += \ 21cflags-$(CONFIG_SIBYTE_BCM1x55) += \
22 -I$(srctree)/arch/mips/include/asm/mach-sibyte \ 22 -I$(srctree)/arch/mips/include/asm/mach-sibyte \
23 -DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1480_ALL 23 -DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1480_ALL
24 24
25cflags-$(CONFIG_SIBYTE_BCM1x80) += \ 25cflags-$(CONFIG_SIBYTE_BCM1x80) += \
26 -I$(srctree)/arch/mips/include/asm/mach-sibyte \ 26 -I$(srctree)/arch/mips/include/asm/mach-sibyte \
27 -DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1480_ALL 27 -DSIBYTE_HDR_FEATURES=SIBYTE_HDR_FMASK_1480_ALL
28 28
diff --git a/arch/mips/sibyte/bcm1480/irq.c b/arch/mips/sibyte/bcm1480/irq.c
index 215713e1f3c4..09d6e16a70f1 100644
--- a/arch/mips/sibyte/bcm1480/irq.c
+++ b/arch/mips/sibyte/bcm1480/irq.c
@@ -283,10 +283,10 @@ void __init arch_init_irq(void)
283 for (cpu = 0; cpu < 4; cpu++) { 283 for (cpu = 0; cpu < 4; cpu++) {
284 __raw_writeq(IMR_IP3_VAL, IOADDR(A_BCM1480_IMR_REGISTER(cpu, R_BCM1480_IMR_INTERRUPT_MAP_BASE_H) + 284 __raw_writeq(IMR_IP3_VAL, IOADDR(A_BCM1480_IMR_REGISTER(cpu, R_BCM1480_IMR_INTERRUPT_MAP_BASE_H) +
285 (K_BCM1480_INT_MBOX_0_0 << 3))); 285 (K_BCM1480_INT_MBOX_0_0 << 3)));
286 } 286 }
287 287
288 288
289 /* Clear the mailboxes. The firmware may leave them dirty */ 289 /* Clear the mailboxes. The firmware may leave them dirty */
290 for (cpu = 0; cpu < 4; cpu++) { 290 for (cpu = 0; cpu < 4; cpu++) {
291 __raw_writeq(0xffffffffffffffffULL, 291 __raw_writeq(0xffffffffffffffffULL,
292 IOADDR(A_BCM1480_IMR_REGISTER(cpu, R_BCM1480_IMR_MAILBOX_0_CLR_CPU))); 292 IOADDR(A_BCM1480_IMR_REGISTER(cpu, R_BCM1480_IMR_MAILBOX_0_CLR_CPU)));
@@ -307,7 +307,7 @@ void __init arch_init_irq(void)
307 307
308 /* 308 /*
309 * Note that the timer interrupts are also mapped, but this is 309 * Note that the timer interrupts are also mapped, but this is
310 * done in bcm1480_time_init(). Also, the profiling driver 310 * done in bcm1480_time_init(). Also, the profiling driver
311 * does its own management of IP7. 311 * does its own management of IP7.
312 */ 312 */
313 313
@@ -325,7 +325,7 @@ static inline void dispatch_ip2(void)
325 325
326 /* 326 /*
327 * Default...we've hit an IP[2] interrupt, which means we've got to 327 * Default...we've hit an IP[2] interrupt, which means we've got to
328 * check the 1480 interrupt registers to figure out what to do. Need 328 * check the 1480 interrupt registers to figure out what to do. Need
329 * to detect which CPU we're on, now that smp_affinity is supported. 329 * to detect which CPU we're on, now that smp_affinity is supported.
330 */ 330 */
331 base = A_BCM1480_IMR_MAPPER(cpu); 331 base = A_BCM1480_IMR_MAPPER(cpu);
diff --git a/arch/mips/sibyte/common/cfe.c b/arch/mips/sibyte/common/cfe.c
index 6343011e9902..588e1806a1a3 100644
--- a/arch/mips/sibyte/common/cfe.c
+++ b/arch/mips/sibyte/common/cfe.c
@@ -127,8 +127,8 @@ static __init void prom_meminit(void)
127 if ((initrd_pstart > addr) && 127 if ((initrd_pstart > addr) &&
128 (initrd_pstart < (addr + size))) { 128 (initrd_pstart < (addr + size))) {
129 add_memory_region(addr, 129 add_memory_region(addr,
130 initrd_pstart - addr, 130 initrd_pstart - addr,
131 BOOT_MEM_RAM); 131 BOOT_MEM_RAM);
132 rd_flag = 1; 132 rd_flag = 1;
133 } 133 }
134 if ((initrd_pend > addr) && 134 if ((initrd_pend > addr) &&
@@ -195,7 +195,7 @@ static int __init initrd_setup(char *str)
195 195
196 /* 196 /*
197 *Initrd location comes in the form "<hex size of ramdisk in bytes>@<location in memory>" 197 *Initrd location comes in the form "<hex size of ramdisk in bytes>@<location in memory>"
198 * e.g. initrd=3abfd@80010000. This is set up by the loader. 198 * e.g. initrd=3abfd@80010000. This is set up by the loader.
199 */ 199 */
200 for (tmp = str; *tmp != '@'; tmp++) { 200 for (tmp = str; *tmp != '@'; tmp++) {
201 if (!*tmp) { 201 if (!*tmp) {
@@ -244,7 +244,7 @@ void __init prom_init(void)
244 int *prom_vec = (int *) fw_arg3; 244 int *prom_vec = (int *) fw_arg3;
245 245
246 _machine_restart = cfe_linux_restart; 246 _machine_restart = cfe_linux_restart;
247 _machine_halt = cfe_linux_halt; 247 _machine_halt = cfe_linux_halt;
248 pm_power_off = cfe_linux_halt; 248 pm_power_off = cfe_linux_halt;
249 249
250 /* 250 /*
@@ -299,7 +299,7 @@ void __init prom_init(void)
299#ifdef CONFIG_BLK_DEV_INITRD 299#ifdef CONFIG_BLK_DEV_INITRD
300 { 300 {
301 char *ptr; 301 char *ptr;
302 /* Need to find out early whether we've got an initrd. So scan 302 /* Need to find out early whether we've got an initrd. So scan
303 the list looking now */ 303 the list looking now */
304 for (ptr = arcs_cmdline; *ptr; ptr++) { 304 for (ptr = arcs_cmdline; *ptr; ptr++) {
305 while (*ptr == ' ') { 305 while (*ptr == ' ') {
diff --git a/arch/mips/sibyte/common/sb_tbprof.c b/arch/mips/sibyte/common/sb_tbprof.c
index e8c4538c5f61..2188b39a1251 100644
--- a/arch/mips/sibyte/common/sb_tbprof.c
+++ b/arch/mips/sibyte/common/sb_tbprof.c
@@ -152,7 +152,7 @@ static u64 tb_period;
152 152
153static void arm_tb(void) 153static void arm_tb(void)
154{ 154{
155 u64 scdperfcnt; 155 u64 scdperfcnt;
156 u64 next = (1ULL << 40) - tb_period; 156 u64 next = (1ULL << 40) - tb_period;
157 u64 tb_options = M_SCD_TRACE_CFG_FREEZE_FULL; 157 u64 tb_options = M_SCD_TRACE_CFG_FREEZE_FULL;
158 158
@@ -257,8 +257,8 @@ static irqreturn_t sbprof_pc_intr(int irq, void *dev_id)
257 257
258/* 258/*
259 * Requires: Already called zclk_timer_init with a value that won't 259 * Requires: Already called zclk_timer_init with a value that won't
260 * saturate 40 bits. No subsequent use of SCD performance counters 260 * saturate 40 bits. No subsequent use of SCD performance counters
261 * or trace buffer. 261 * or trace buffer.
262 */ 262 */
263 263
264static int sbprof_zbprof_start(struct file *filp) 264static int sbprof_zbprof_start(struct file *filp)
@@ -288,8 +288,8 @@ static int sbprof_zbprof_start(struct file *filp)
288 288
289 /* 289 /*
290 * We grab this interrupt to prevent others from trying to use 290 * We grab this interrupt to prevent others from trying to use
291 * it, even though we don't want to service the interrupts 291 * it, even though we don't want to service the interrupts
292 * (they only feed into the trace-on-interrupt mechanism) 292 * (they only feed into the trace-on-interrupt mechanism)
293 */ 293 */
294 if (request_irq(K_INT_PERF_CNT, sbprof_pc_intr, 0, DEVNAME " scd perfcnt", &sbp)) { 294 if (request_irq(K_INT_PERF_CNT, sbprof_pc_intr, 0, DEVNAME " scd perfcnt", &sbp)) {
295 free_irq(K_INT_TRACE_FREEZE, &sbp); 295 free_irq(K_INT_TRACE_FREEZE, &sbp);
@@ -298,7 +298,7 @@ static int sbprof_zbprof_start(struct file *filp)
298 298
299 /* 299 /*
300 * I need the core to mask these, but the interrupt mapper to 300 * I need the core to mask these, but the interrupt mapper to
301 * pass them through. I am exploiting my knowledge that 301 * pass them through. I am exploiting my knowledge that
302 * cp0_status masks out IP[5]. krw 302 * cp0_status masks out IP[5]. krw
303 */ 303 */
304#if defined(CONFIG_SIBYTE_BCM1x55) || defined(CONFIG_SIBYTE_BCM1x80) 304#if defined(CONFIG_SIBYTE_BCM1x55) || defined(CONFIG_SIBYTE_BCM1x80)
@@ -328,7 +328,7 @@ static int sbprof_zbprof_start(struct file *filp)
328 __raw_writeq(0, IOADDR(A_ADDR_TRAP_CFG_3)); 328 __raw_writeq(0, IOADDR(A_ADDR_TRAP_CFG_3));
329 329
330 /* Initialize Trace Event 0-7 */ 330 /* Initialize Trace Event 0-7 */
331 /* when interrupt */ 331 /* when interrupt */
332 __raw_writeq(M_SCD_TREVT_INTERRUPT, IOADDR(A_SCD_TRACE_EVENT_0)); 332 __raw_writeq(M_SCD_TREVT_INTERRUPT, IOADDR(A_SCD_TRACE_EVENT_0));
333 __raw_writeq(0, IOADDR(A_SCD_TRACE_EVENT_1)); 333 __raw_writeq(0, IOADDR(A_SCD_TRACE_EVENT_1));
334 __raw_writeq(0, IOADDR(A_SCD_TRACE_EVENT_2)); 334 __raw_writeq(0, IOADDR(A_SCD_TRACE_EVENT_2));
@@ -479,7 +479,7 @@ static ssize_t sbprof_tb_read(struct file *filp, char *buf,
479 return err; 479 return err;
480 } 480 }
481 pr_debug(DEVNAME ": read from sample %d, %d bytes\n", 481 pr_debug(DEVNAME ": read from sample %d, %d bytes\n",
482 cur_sample, cur_count); 482 cur_sample, cur_count);
483 size -= cur_count; 483 size -= cur_count;
484 sample_left -= cur_count; 484 sample_left -= cur_count;
485 if (!sample_left) { 485 if (!sample_left) {
@@ -540,7 +540,7 @@ static const struct file_operations sbprof_tb_fops = {
540 .open = sbprof_tb_open, 540 .open = sbprof_tb_open,
541 .release = sbprof_tb_release, 541 .release = sbprof_tb_release,
542 .read = sbprof_tb_read, 542 .read = sbprof_tb_read,
543 .unlocked_ioctl = sbprof_tb_ioctl, 543 .unlocked_ioctl = sbprof_tb_ioctl,
544 .compat_ioctl = sbprof_tb_ioctl, 544 .compat_ioctl = sbprof_tb_ioctl,
545 .mmap = NULL, 545 .mmap = NULL,
546 .llseek = default_llseek, 546 .llseek = default_llseek,
diff --git a/arch/mips/sibyte/sb1250/bus_watcher.c b/arch/mips/sibyte/sb1250/bus_watcher.c
index 86e6e54dd15d..e651105b3f0b 100644
--- a/arch/mips/sibyte/sb1250/bus_watcher.c
+++ b/arch/mips/sibyte/sb1250/bus_watcher.c
@@ -71,7 +71,7 @@ static void print_summary(uint32_t status, uint32_t l2_err,
71 * already been destructively read out of the registers. 71 * already been destructively read out of the registers.
72 * 72 *
73 * notes: this is currently used by the cache error handler 73 * notes: this is currently used by the cache error handler
74 * should provide locking against the interrupt handler 74 * should provide locking against the interrupt handler
75 */ 75 */
76void check_bus_watcher(void) 76void check_bus_watcher(void)
77{ 77{
@@ -119,7 +119,7 @@ static int bw_print_buffer(char *page, struct bw_stats_struct *stats)
119 (int)G_SCD_BERR_RID(stats->status), 119 (int)G_SCD_BERR_RID(stats->status),
120 (int)G_SCD_BERR_DCODE(stats->status)); 120 (int)G_SCD_BERR_DCODE(stats->status));
121 /* XXXKW indicate multiple errors between printings, or stats 121 /* XXXKW indicate multiple errors between printings, or stats
122 collection (or both)? */ 122 collection (or both)? */
123 if (stats->status & M_SCD_BERR_MULTERRS) 123 if (stats->status & M_SCD_BERR_MULTERRS)
124 len += sprintf(page+len, "Multiple errors observed since last check.\n"); 124 len += sprintf(page+len, "Multiple errors observed since last check.\n");
125 if (stats->status_printed) { 125 if (stats->status_printed) {
@@ -168,7 +168,7 @@ static void create_proc_decoder(struct bw_stats_struct *stats)
168 * sibyte_bw_int - handle bus watcher interrupts and accumulate counts 168 * sibyte_bw_int - handle bus watcher interrupts and accumulate counts
169 * 169 *
170 * notes: possible re-entry due to multiple sources 170 * notes: possible re-entry due to multiple sources
171 * should check/indicate saturation 171 * should check/indicate saturation
172 */ 172 */
173static irqreturn_t sibyte_bw_int(int irq, void *data) 173static irqreturn_t sibyte_bw_int(int irq, void *data)
174{ 174{
diff --git a/arch/mips/sibyte/sb1250/irq.c b/arch/mips/sibyte/sb1250/irq.c
index 340aaf626659..fca0cdb99509 100644
--- a/arch/mips/sibyte/sb1250/irq.c
+++ b/arch/mips/sibyte/sb1250/irq.c
@@ -264,7 +264,7 @@ void __init arch_init_irq(void)
264 IOADDR(A_IMR_REGISTER(1, R_IMR_INTERRUPT_MAP_BASE) + 264 IOADDR(A_IMR_REGISTER(1, R_IMR_INTERRUPT_MAP_BASE) +
265 (K_INT_MBOX_0 << 3))); 265 (K_INT_MBOX_0 << 3)));
266 266
267 /* Clear the mailboxes. The firmware may leave them dirty */ 267 /* Clear the mailboxes. The firmware may leave them dirty */
268 __raw_writeq(0xffffffffffffffffULL, 268 __raw_writeq(0xffffffffffffffffULL,
269 IOADDR(A_IMR_REGISTER(0, R_IMR_MAILBOX_CLR_CPU))); 269 IOADDR(A_IMR_REGISTER(0, R_IMR_MAILBOX_CLR_CPU)));
270 __raw_writeq(0xffffffffffffffffULL, 270 __raw_writeq(0xffffffffffffffffULL,
@@ -277,7 +277,7 @@ void __init arch_init_irq(void)
277 277
278 /* 278 /*
279 * Note that the timer interrupts are also mapped, but this is 279 * Note that the timer interrupts are also mapped, but this is
280 * done in sb1250_time_init(). Also, the profiling driver 280 * done in sb1250_time_init(). Also, the profiling driver
281 * does its own management of IP7. 281 * does its own management of IP7.
282 */ 282 */
283 283
@@ -294,7 +294,7 @@ static inline void dispatch_ip2(void)
294 294
295 /* 295 /*
296 * Default...we've hit an IP[2] interrupt, which means we've got to 296 * Default...we've hit an IP[2] interrupt, which means we've got to
297 * check the 1250 interrupt registers to figure out what to do. Need 297 * check the 1250 interrupt registers to figure out what to do. Need
298 * to detect which CPU we're on, now that smp_affinity is supported. 298 * to detect which CPU we're on, now that smp_affinity is supported.
299 */ 299 */
300 mask = __raw_readq(IOADDR(A_IMR_REGISTER(cpu, 300 mask = __raw_readq(IOADDR(A_IMR_REGISTER(cpu,
@@ -323,7 +323,7 @@ asmlinkage void plat_irq_dispatch(void)
323 if (pending & CAUSEF_IP7) /* CPU performance counter interrupt */ 323 if (pending & CAUSEF_IP7) /* CPU performance counter interrupt */
324 do_IRQ(MIPS_CPU_IRQ_BASE + 7); 324 do_IRQ(MIPS_CPU_IRQ_BASE + 7);
325 else if (pending & CAUSEF_IP4) 325 else if (pending & CAUSEF_IP4)
326 do_IRQ(K_INT_TIMER_0 + cpu); /* sb1250_timer_interrupt() */ 326 do_IRQ(K_INT_TIMER_0 + cpu); /* sb1250_timer_interrupt() */
327 327
328#ifdef CONFIG_SMP 328#ifdef CONFIG_SMP
329 else if (pending & CAUSEF_IP3) 329 else if (pending & CAUSEF_IP3)
diff --git a/arch/mips/sibyte/sb1250/setup.c b/arch/mips/sibyte/sb1250/setup.c
index 92da3155ce07..a14bd4cb0bc0 100644
--- a/arch/mips/sibyte/sb1250/setup.c
+++ b/arch/mips/sibyte/sb1250/setup.c
@@ -203,8 +203,8 @@ void __init sb1250_setup(void)
203 case K_SYS_REVISION_BCM1250_PASS1: 203 case K_SYS_REVISION_BCM1250_PASS1:
204#ifndef CONFIG_SB1_PASS_1_WORKAROUNDS 204#ifndef CONFIG_SB1_PASS_1_WORKAROUNDS
205 printk("@@@@ This is a BCM1250 A0-A2 (Pass 1) board, " 205 printk("@@@@ This is a BCM1250 A0-A2 (Pass 1) board, "
206 "and the kernel doesn't have the proper " 206 "and the kernel doesn't have the proper "
207 "workarounds compiled in. @@@@\n"); 207 "workarounds compiled in. @@@@\n");
208 bad_config = 1; 208 bad_config = 1;
209#endif 209#endif
210 break; 210 break;
@@ -213,28 +213,28 @@ void __init sb1250_setup(void)
213#if !defined(CONFIG_SB1_PASS_2_WORKAROUNDS) || \ 213#if !defined(CONFIG_SB1_PASS_2_WORKAROUNDS) || \
214 !defined(CONFIG_SB1_PASS_2_1_WORKAROUNDS) 214 !defined(CONFIG_SB1_PASS_2_1_WORKAROUNDS)
215 printk("@@@@ This is a BCM1250 A3-A10 board, and the " 215 printk("@@@@ This is a BCM1250 A3-A10 board, and the "
216 "kernel doesn't have the proper workarounds " 216 "kernel doesn't have the proper workarounds "
217 "compiled in. @@@@\n"); 217 "compiled in. @@@@\n");
218 bad_config = 1; 218 bad_config = 1;
219#endif 219#endif
220#ifdef CONFIG_CPU_HAS_PREFETCH 220#ifdef CONFIG_CPU_HAS_PREFETCH
221 printk("@@@@ Prefetches may be enabled in this kernel, " 221 printk("@@@@ Prefetches may be enabled in this kernel, "
222 "but are buggy on this board. @@@@\n"); 222 "but are buggy on this board. @@@@\n");
223 bad_config = 1; 223 bad_config = 1;
224#endif 224#endif
225 break; 225 break;
226 case K_SYS_REVISION_BCM1250_PASS2_2: 226 case K_SYS_REVISION_BCM1250_PASS2_2:
227#ifndef CONFIG_SB1_PASS_2_WORKAROUNDS 227#ifndef CONFIG_SB1_PASS_2_WORKAROUNDS
228 printk("@@@@ This is a BCM1250 B1/B2. board, and the " 228 printk("@@@@ This is a BCM1250 B1/B2. board, and the "
229 "kernel doesn't have the proper workarounds " 229 "kernel doesn't have the proper workarounds "
230 "compiled in. @@@@\n"); 230 "compiled in. @@@@\n");
231 bad_config = 1; 231 bad_config = 1;
232#endif 232#endif
233#if defined(CONFIG_SB1_PASS_2_1_WORKAROUNDS) || \ 233#if defined(CONFIG_SB1_PASS_2_1_WORKAROUNDS) || \
234 !defined(CONFIG_CPU_HAS_PREFETCH) 234 !defined(CONFIG_CPU_HAS_PREFETCH)
235 printk("@@@@ This is a BCM1250 B1/B2, but the kernel is " 235 printk("@@@@ This is a BCM1250 B1/B2, but the kernel is "
236 "conservatively configured for an 'A' stepping. " 236 "conservatively configured for an 'A' stepping. "
237 "@@@@\n"); 237 "@@@@\n");
238#endif 238#endif
239 break; 239 break;
240 default: 240 default:
diff --git a/arch/mips/sibyte/swarm/platform.c b/arch/mips/sibyte/swarm/platform.c
index 097335262fb3..9480c14ec66a 100644
--- a/arch/mips/sibyte/swarm/platform.c
+++ b/arch/mips/sibyte/swarm/platform.c
@@ -13,7 +13,7 @@
13 13
14#define DRV_NAME "pata-swarm" 14#define DRV_NAME "pata-swarm"
15 15
16#define SWARM_IDE_SHIFT 5 16#define SWARM_IDE_SHIFT 5
17#define SWARM_IDE_BASE 0x1f0 17#define SWARM_IDE_BASE 0x1f0
18#define SWARM_IDE_CTRL 0x3f6 18#define SWARM_IDE_CTRL 0x3f6
19 19
@@ -123,7 +123,7 @@ static int __init sb1250_device_init(void)
123 case K_SYS_SOC_TYPE_BCM1120: 123 case K_SYS_SOC_TYPE_BCM1120:
124 case K_SYS_SOC_TYPE_BCM1125: 124 case K_SYS_SOC_TYPE_BCM1125:
125 case K_SYS_SOC_TYPE_BCM1125H: 125 case K_SYS_SOC_TYPE_BCM1125H:
126 case K_SYS_SOC_TYPE_BCM1250_ALT2: /* Hybrid */ 126 case K_SYS_SOC_TYPE_BCM1250_ALT2: /* Hybrid */
127 ret = platform_add_devices(sb1250_devs, 2); 127 ret = platform_add_devices(sb1250_devs, 2);
128 break; 128 break;
129 case K_SYS_SOC_TYPE_BCM1x55: 129 case K_SYS_SOC_TYPE_BCM1x55:
diff --git a/arch/mips/sibyte/swarm/rtc_xicor1241.c b/arch/mips/sibyte/swarm/rtc_xicor1241.c
index 4438b2195c44..178a824b28d4 100644
--- a/arch/mips/sibyte/swarm/rtc_xicor1241.c
+++ b/arch/mips/sibyte/swarm/rtc_xicor1241.c
@@ -4,8 +4,8 @@
4 * Copyright (C) 2002 MontaVista Software Inc. 4 * Copyright (C) 2002 MontaVista Software Inc.
5 * Author: jsun@mvista.com or jsun@junsun.net 5 * Author: jsun@mvista.com or jsun@junsun.net
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify it 7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the 8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your 9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version. 10 * option) any later version.
11 */ 11 */
@@ -28,15 +28,15 @@
28 * Register bits 28 * Register bits
29 */ 29 */
30 30
31#define X1241REG_SR_BAT 0x80 /* currently on battery power */ 31#define X1241REG_SR_BAT 0x80 /* currently on battery power */
32#define X1241REG_SR_RWEL 0x04 /* r/w latch is enabled, can write RTC */ 32#define X1241REG_SR_RWEL 0x04 /* r/w latch is enabled, can write RTC */
33#define X1241REG_SR_WEL 0x02 /* r/w latch is unlocked, can enable r/w now */ 33#define X1241REG_SR_WEL 0x02 /* r/w latch is unlocked, can enable r/w now */
34#define X1241REG_SR_RTCF 0x01 /* clock failed */ 34#define X1241REG_SR_RTCF 0x01 /* clock failed */
35#define X1241REG_BL_BP2 0x80 /* block protect 2 */ 35#define X1241REG_BL_BP2 0x80 /* block protect 2 */
36#define X1241REG_BL_BP1 0x40 /* block protect 1 */ 36#define X1241REG_BL_BP1 0x40 /* block protect 1 */
37#define X1241REG_BL_BP0 0x20 /* block protect 0 */ 37#define X1241REG_BL_BP0 0x20 /* block protect 0 */
38#define X1241REG_BL_WD1 0x10 38#define X1241REG_BL_WD1 0x10
39#define X1241REG_BL_WD0 0x08 39#define X1241REG_BL_WD0 0x08
40#define X1241REG_HR_MIL 0x80 /* military time format */ 40#define X1241REG_HR_MIL 0x80 /* military time format */
41 41
42/* 42/*
@@ -61,50 +61,50 @@
61 61
62static int xicor_read(uint8_t addr) 62static int xicor_read(uint8_t addr)
63{ 63{
64 while (__raw_readq(SMB_CSR(R_SMB_STATUS)) & M_SMB_BUSY) 64 while (__raw_readq(SMB_CSR(R_SMB_STATUS)) & M_SMB_BUSY)
65 ; 65 ;
66 66
67 __raw_writeq((addr >> 8) & 0x7, SMB_CSR(R_SMB_CMD)); 67 __raw_writeq((addr >> 8) & 0x7, SMB_CSR(R_SMB_CMD));
68 __raw_writeq(addr & 0xff, SMB_CSR(R_SMB_DATA)); 68 __raw_writeq(addr & 0xff, SMB_CSR(R_SMB_DATA));
69 __raw_writeq(V_SMB_ADDR(X1241_CCR_ADDRESS) | V_SMB_TT_WR2BYTE, 69 __raw_writeq(V_SMB_ADDR(X1241_CCR_ADDRESS) | V_SMB_TT_WR2BYTE,
70 SMB_CSR(R_SMB_START)); 70 SMB_CSR(R_SMB_START));
71 71
72 while (__raw_readq(SMB_CSR(R_SMB_STATUS)) & M_SMB_BUSY) 72 while (__raw_readq(SMB_CSR(R_SMB_STATUS)) & M_SMB_BUSY)
73 ; 73 ;
74 74
75 __raw_writeq(V_SMB_ADDR(X1241_CCR_ADDRESS) | V_SMB_TT_RD1BYTE, 75 __raw_writeq(V_SMB_ADDR(X1241_CCR_ADDRESS) | V_SMB_TT_RD1BYTE,
76 SMB_CSR(R_SMB_START)); 76 SMB_CSR(R_SMB_START));
77 77
78 while (__raw_readq(SMB_CSR(R_SMB_STATUS)) & M_SMB_BUSY) 78 while (__raw_readq(SMB_CSR(R_SMB_STATUS)) & M_SMB_BUSY)
79 ; 79 ;
80 80
81 if (__raw_readq(SMB_CSR(R_SMB_STATUS)) & M_SMB_ERROR) { 81 if (__raw_readq(SMB_CSR(R_SMB_STATUS)) & M_SMB_ERROR) {
82 /* Clear error bit by writing a 1 */ 82 /* Clear error bit by writing a 1 */
83 __raw_writeq(M_SMB_ERROR, SMB_CSR(R_SMB_STATUS)); 83 __raw_writeq(M_SMB_ERROR, SMB_CSR(R_SMB_STATUS));
84 return -1; 84 return -1;
85 } 85 }
86 86
87 return (__raw_readq(SMB_CSR(R_SMB_DATA)) & 0xff); 87 return (__raw_readq(SMB_CSR(R_SMB_DATA)) & 0xff);
88} 88}
89 89
90static int xicor_write(uint8_t addr, int b) 90static int xicor_write(uint8_t addr, int b)
91{ 91{
92 while (__raw_readq(SMB_CSR(R_SMB_STATUS)) & M_SMB_BUSY) 92 while (__raw_readq(SMB_CSR(R_SMB_STATUS)) & M_SMB_BUSY)
93 ; 93 ;
94 94
95 __raw_writeq(addr, SMB_CSR(R_SMB_CMD)); 95 __raw_writeq(addr, SMB_CSR(R_SMB_CMD));
96 __raw_writeq((addr & 0xff) | ((b & 0xff) << 8), SMB_CSR(R_SMB_DATA)); 96 __raw_writeq((addr & 0xff) | ((b & 0xff) << 8), SMB_CSR(R_SMB_DATA));
97 __raw_writeq(V_SMB_ADDR(X1241_CCR_ADDRESS) | V_SMB_TT_WR3BYTE, 97 __raw_writeq(V_SMB_ADDR(X1241_CCR_ADDRESS) | V_SMB_TT_WR3BYTE,
98 SMB_CSR(R_SMB_START)); 98 SMB_CSR(R_SMB_START));
99 99
100 while (__raw_readq(SMB_CSR(R_SMB_STATUS)) & M_SMB_BUSY) 100 while (__raw_readq(SMB_CSR(R_SMB_STATUS)) & M_SMB_BUSY)
101 ; 101 ;
102 102
103 if (__raw_readq(SMB_CSR(R_SMB_STATUS)) & M_SMB_ERROR) { 103 if (__raw_readq(SMB_CSR(R_SMB_STATUS)) & M_SMB_ERROR) {
104 /* Clear error bit by writing a 1 */ 104 /* Clear error bit by writing a 1 */
105 __raw_writeq(M_SMB_ERROR, SMB_CSR(R_SMB_STATUS)); 105 __raw_writeq(M_SMB_ERROR, SMB_CSR(R_SMB_STATUS));
106 return -1; 106 return -1;
107 } else { 107 } else {
108 return 0; 108 return 0;
109 } 109 }
110} 110}