]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
m68knommu: switch to using IO access methods in WildFire board code
authorGreg Ungerer <gerg@linux-m68k.org>
Tue, 23 Aug 2016 11:27:16 +0000 (21:27 +1000)
committerGreg Ungerer <gerg@linux-m68k.org>
Mon, 26 Sep 2016 02:02:57 +0000 (12:02 +1000)
Most ColdFire support code has switched to using IO memory access
methods (readb/writeb/etc) when reading and writing internal peripheral
device registers. The WildFire board specific halt code was missed.

As it is now the WildFire code is broken, since all register definitions
were changed to be register addresses only some time ago.

Fix the WildFire board code to use the appropriate IO access functions.

Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
arch/m68k/coldfire/m528x.c

index 45e947aeade4a3f0e01807c9b4fb4d5ac64dfe75..12f9e370d8dde8d8057f42783c7e0903c2b41dad 100644 (file)
@@ -102,14 +102,14 @@ void wildfiremod_halt(void)
        printk(KERN_INFO "WildFireMod hibernating...\n");
 
        /* Set portE.5 to Digital IO */
-       MCF5282_GPIO_PEPAR &= ~(1 << (5 * 2));
+       writew(readw(MCFGPIO_PEPAR) & ~(1 << (5 * 2)), MCFGPIO_PEPAR);
 
        /* Make portE.5 an output */
-       MCF5282_GPIO_DDRE |= (1 << 5);
+       writeb(readb(MCFGPIO_PDDR_E) | (1 << 5), MCFGPIO_PDDR_E);
 
        /* Now toggle portE.5 from low to high */
-       MCF5282_GPIO_PORTE &= ~(1 << 5);
-       MCF5282_GPIO_PORTE |= (1 << 5);
+       writeb(readb(MCFGPIO_PODR_E) & ~(1 << 5), MCFGPIO_PODR_E);
+       writeb(readb(MCFGPIO_PODR_E) | (1 << 5), MCFGPIO_PODR_E);
 
        printk(KERN_EMERG "Failed to hibernate. Halting!\n");
 }