From bb57ad4be76d0e2e7f9ec56678235cc9872ff40f Mon Sep 17 00:00:00 2001 From: Matthias Fuchs Date: Fri, 20 Feb 2009 10:19:19 +0100 Subject: ppc4xx: Use correct io accessors for esd 405/440 boards This patch replaces in/out8/16/32 macros by in/out_8/_be16/_be32 macros. Also volatile pointer references are replaced by the new accessors. Signed-off-by: Matthias Fuchs Signed-off-by: Stefan Roese --- board/esd/pci405/pci405.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'board/esd/pci405') diff --git a/board/esd/pci405/pci405.c b/board/esd/pci405/pci405.c index 0602abf9c4..8973f97095 100644 --- a/board/esd/pci405/pci405.c +++ b/board/esd/pci405/pci405.c @@ -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; -- cgit v1.2.1