diff options
author | Matthias Fuchs <matthias.fuchs@esd-electronics.com> | 2009-02-20 10:19:18 +0100 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2009-03-20 22:39:14 +0100 |
commit | 049216f045fd8e0f45bcef121c2bb1c7d3de6988 (patch) | |
tree | eb0cb37228f27f5fc9737c0e8e960afa8e2993c9 /board/esd/cms700/cms700.c | |
parent | a59205d1519375d027f97a545ad642ab20fce6f8 (diff) | |
download | u-boot-imx-049216f045fd8e0f45bcef121c2bb1c7d3de6988.zip u-boot-imx-049216f045fd8e0f45bcef121c2bb1c7d3de6988.tar.gz u-boot-imx-049216f045fd8e0f45bcef121c2bb1c7d3de6988.tar.bz2 |
ppc4xx: Use correct io accessors for esd 405 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 <matthias.fuchs@esd.eu>
Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'board/esd/cms700/cms700.c')
-rw-r--r-- | board/esd/cms700/cms700.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/board/esd/cms700/cms700.c b/board/esd/cms700/cms700.c index d0ee193..9a522b2 100644 --- a/board/esd/cms700/cms700.c +++ b/board/esd/cms700/cms700.c @@ -95,14 +95,12 @@ int misc_init_r (void) /* * Check Board Identity: */ - +#define LED_REG (CONFIG_SYS_PLD_BASE + 0x1000) int checkboard (void) { char str[64]; int flashcnt; int delay; - volatile unsigned char *led_reg = (unsigned char *)((ulong)CONFIG_SYS_PLD_BASE + 0x1000); - volatile unsigned char *ver_reg = (unsigned char *)((ulong)CONFIG_SYS_PLD_BASE + 0x1001); puts ("Board: "); @@ -112,20 +110,21 @@ int checkboard (void) puts(str); } - printf(" (PLD-Version=%02d)\n", *ver_reg); + printf(" (PLD-Version=%02d)\n", + in_8((void *)(CONFIG_SYS_PLD_BASE + 0x1001))); /* * Flash LEDs */ for (flashcnt = 0; flashcnt < 3; flashcnt++) { - *led_reg = 0x00; /* LEDs off */ + out_8((void *)LED_REG, 0x00); /* LEDs off */ for (delay = 0; delay < 100; delay++) udelay(1000); - *led_reg = 0x0f; /* LEDs on */ + out_8((void *)LED_REG, 0x0f); /* LEDs on */ for (delay = 0; delay < 50; delay++) udelay(1000); } - *led_reg = 0x70; + out_8((void *)LED_REG, 0x70); return 0; } |