summaryrefslogtreecommitdiff
path: root/board/esd/vom405/vom405.c
diff options
context:
space:
mode:
authorMatthias Fuchs <matthias.fuchs@esd-electronics.com>2009-02-20 10:19:18 +0100
committerWolfgang Denk <wd@denx.de>2009-03-20 22:39:14 +0100
commit049216f045fd8e0f45bcef121c2bb1c7d3de6988 (patch)
treeeb0cb37228f27f5fc9737c0e8e960afa8e2993c9 /board/esd/vom405/vom405.c
parenta59205d1519375d027f97a545ad642ab20fce6f8 (diff)
downloadu-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/vom405/vom405.c')
-rw-r--r--board/esd/vom405/vom405.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/board/esd/vom405/vom405.c b/board/esd/vom405/vom405.c
index 1b1479f..d67b23e 100644
--- a/board/esd/vom405/vom405.c
+++ b/board/esd/vom405/vom405.c
@@ -23,6 +23,7 @@
#include <common.h>
#include <asm/processor.h>
+#include <asm/io.h>
#include <command.h>
#include <malloc.h>
@@ -67,9 +68,11 @@ int board_early_init_f (void)
/*
* Reset CPLD via GPIO12 (CS3) pin
*/
- out32(GPIO0_OR, in32(GPIO0_OR) & ~(0x80000000 >> 12));
+ out_be32((void *)GPIO0_OR,
+ in_be32((void *)GPIO0_OR) & ~(0x80000000 >> 12));
udelay(1000); /* wait 1ms */
- out32(GPIO0_OR, in32(GPIO0_OR) | (0x80000000 >> 12));
+ out_be32((void *)GPIO0_OR,
+ in_be32((void *)GPIO0_OR) | (0x80000000 >> 12));
udelay(1000); /* wait 1ms */
return 0;
@@ -93,7 +96,7 @@ int checkboard (void)
int i = getenv_r ("serial#", str, sizeof(str));
int flashcnt;
int delay;
- volatile unsigned char *led_reg = (unsigned char *)((ulong)CAN_BA + 0x1000);
+ u8 *led_reg = (u8 *)(CAN_BA + 0x1000);
puts ("Board: ");
@@ -103,20 +106,20 @@ int checkboard (void)
puts(str);
}
- printf(" (PLD-Version=%02d)\n", *led_reg);
+ printf(" (PLD-Version=%02d)\n", in_8(led_reg));
/*
* Flash LEDs
*/
for (flashcnt = 0; flashcnt < 3; flashcnt++) {
- *led_reg = 0x40; /* LED_B..D off */
+ out_8(led_reg, 0x40); /* LED_B..D off */
for (delay = 0; delay < 100; delay++)
udelay(1000);
- *led_reg = 0x47; /* LED_B..D on */
+ out_8(led_reg, 0x47); /* LED_B..D on */
for (delay = 0; delay < 50; delay++)
udelay(1000);
}
- *led_reg = 0x40;
+ out_8(led_reg, 0x40);
return 0;
}