]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/esd/pci405/pci405.c
ppc4xx: Use correct io accessors for esd 405/440 boards
[karo-tx-uboot.git] / board / esd / pci405 / pci405.c
index 0602abf9c4806ea02cc23d8e1a1e94945eb36bad..8973f97095c507400eb8c3fc56d3b2689d39166b 100644 (file)
@@ -338,17 +338,17 @@ int checkboard (void)
 }
 
 /* ------------------------------------------------------------------------- */
+#define UART1_MCR 0xef600404
 int wpeeprom(int wp)
 {
        int wp_state = wp;
-       volatile unsigned char *uart1_mcr = (volatile unsigned char *)0xef600404;
 
        if (wp == 1) {
-               *uart1_mcr &= ~0x02;
+               out_8((void *)UART1_MCR, in_8((void *)UART1_MCR) & ~0x02);
        } else if (wp == 0) {
-               *uart1_mcr |= 0x02;
+               out_8((void *)UART1_MCR, in_8((void *)UART1_MCR) | 0x02);
        } else {
-               if (*uart1_mcr & 0x02) {
+               if (in_8((void *)UART1_MCR) & 0x02) {
                        wp_state = 0;
                } else {
                        wp_state = 1;