diff options
Diffstat (limited to 'arch/ppc/syslib/m8xx_wdt.c')
-rw-r--r-- | arch/ppc/syslib/m8xx_wdt.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/ppc/syslib/m8xx_wdt.c b/arch/ppc/syslib/m8xx_wdt.c index 2ddc857e7fc7..c5ac5ce5d7d2 100644 --- a/arch/ppc/syslib/m8xx_wdt.c +++ b/arch/ppc/syslib/m8xx_wdt.c | |||
@@ -29,8 +29,8 @@ void m8xx_wdt_reset(void) | |||
29 | { | 29 | { |
30 | volatile immap_t *imap = (volatile immap_t *)IMAP_ADDR; | 30 | volatile immap_t *imap = (volatile immap_t *)IMAP_ADDR; |
31 | 31 | ||
32 | imap->im_siu_conf.sc_swsr = 0x556c; /* write magic1 */ | 32 | out_be16(imap->im_siu_conf.sc_swsr, 0x556c); /* write magic1 */ |
33 | imap->im_siu_conf.sc_swsr = 0xaa39; /* write magic2 */ | 33 | out_be16(imap->im_siu_conf.sc_swsr, 0xaa39); /* write magic2 */ |
34 | } | 34 | } |
35 | 35 | ||
36 | static irqreturn_t m8xx_wdt_interrupt(int irq, void *dev, struct pt_regs *regs) | 36 | static irqreturn_t m8xx_wdt_interrupt(int irq, void *dev, struct pt_regs *regs) |
@@ -39,7 +39,7 @@ static irqreturn_t m8xx_wdt_interrupt(int irq, void *dev, struct pt_regs *regs) | |||
39 | 39 | ||
40 | m8xx_wdt_reset(); | 40 | m8xx_wdt_reset(); |
41 | 41 | ||
42 | imap->im_sit.sit_piscr |= PISCR_PS; /* clear irq */ | 42 | out_be16(imap->im_sit.sit_piscr, in_be16(imap->im_sit.sit_piscr | PISCR_PS)); /* clear irq */ |
43 | 43 | ||
44 | return IRQ_HANDLED; | 44 | return IRQ_HANDLED; |
45 | } | 45 | } |
@@ -51,7 +51,7 @@ void __init m8xx_wdt_handler_install(bd_t * binfo) | |||
51 | u32 sypcr; | 51 | u32 sypcr; |
52 | u32 pitrtclk; | 52 | u32 pitrtclk; |
53 | 53 | ||
54 | sypcr = imap->im_siu_conf.sc_sypcr; | 54 | sypcr = in_be32(imap->im_siu_conf.sc_sypcr); |
55 | 55 | ||
56 | if (!(sypcr & 0x04)) { | 56 | if (!(sypcr & 0x04)) { |
57 | printk(KERN_NOTICE "m8xx_wdt: wdt disabled (SYPCR: 0x%08X)\n", | 57 | printk(KERN_NOTICE "m8xx_wdt: wdt disabled (SYPCR: 0x%08X)\n", |
@@ -87,9 +87,9 @@ void __init m8xx_wdt_handler_install(bd_t * binfo) | |||
87 | else | 87 | else |
88 | pitc = pitrtclk * wdt_timeout / binfo->bi_intfreq / 2; | 88 | pitc = pitrtclk * wdt_timeout / binfo->bi_intfreq / 2; |
89 | 89 | ||
90 | imap->im_sit.sit_pitc = pitc << 16; | 90 | out_be32(imap->im_sit.sit_pitc, pitc << 16); |
91 | imap->im_sit.sit_piscr = | 91 | |
92 | (mk_int_int_mask(PIT_INTERRUPT) << 8) | PISCR_PIE | PISCR_PTE; | 92 | out_be16(imap->im_sit.sit_piscr, (mk_int_int_mask(PIT_INTERRUPT) << 8) | PISCR_PIE | PISCR_PTE); |
93 | 93 | ||
94 | if (setup_irq(PIT_INTERRUPT, &m8xx_wdt_irqaction)) | 94 | if (setup_irq(PIT_INTERRUPT, &m8xx_wdt_irqaction)) |
95 | panic("m8xx_wdt: error setting up the watchdog irq!"); | 95 | panic("m8xx_wdt: error setting up the watchdog irq!"); |