X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=board%2Fesd%2Fcanbt%2Fcanbt.c;h=418d3e237edcee14762755adf27c1ac623f7670d;hb=d1c3b27525b664e8c4db6bb173eed51bfc8220de;hp=708101e2ad9c44271415bdf05ba8122a85306d5f;hpb=c231d00f4ef881a1789e11afe5f3aceaa061725d;p=oweals%2Fu-boot.git diff --git a/board/esd/canbt/canbt.c b/board/esd/canbt/canbt.c index 708101e2ad..418d3e237e 100644 --- a/board/esd/canbt/canbt.c +++ b/board/esd/canbt/canbt.c @@ -24,8 +24,14 @@ #include #include "canbt.h" #include +#include #include -#include + +DECLARE_GLOBAL_DATA_PTR; + +/*cmd_boot.c*/ +extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); + /* ------------------------------------------------------------------------- */ @@ -44,20 +50,18 @@ const unsigned char fpgadata[] = { #include "../common/fpga.c" -int board_pre_init (void) +int board_early_init_f (void) { - DECLARE_GLOBAL_DATA_PTR; - - unsigned long cntrl0Reg; + unsigned long CPC0_CR0Reg; int index, len, i; int status; /* * Setup GPIO pins */ - cntrl0Reg = mfdcr (cntrl0) & 0xf0001fff; - cntrl0Reg |= 0x0070f000; - mtdcr (cntrl0, cntrl0Reg); + CPC0_CR0Reg = mfdcr (CPC0_CR0) & 0xf0001fff; + CPC0_CR0Reg |= 0x0070f000; + mtdcr (CPC0_CR0, CPC0_CR0Reg); #ifdef FPGA_DEBUG /* set up serial port with default baudrate */ @@ -114,9 +118,9 @@ int board_pre_init (void) /* * Setup port pins for normal operation */ - out32 (GPIO0_ODR, 0x00000000); /* no open drain pins */ - out32 (GPIO0_TCR, 0x07038100); /* setup for output */ - out32 (GPIO0_OR, 0x07030100); /* set output pins to high (default) */ + out_be32 ((void *)GPIO0_ODR, 0x00000000); /* no open drain pins */ + out_be32 ((void *)GPIO0_TCR, 0x07038100); /* setup for output */ + out_be32 ((void *)GPIO0_OR, 0x07030100); /* set output pins to high (default) */ /* * IRQ 0-15 405GP internally generated; active high; level sensitive @@ -152,7 +156,7 @@ int checkboard (void) { int index; int len; - unsigned char str[64]; + char str[64]; int i = getenv_r ("serial#", str, sizeof (str)); puts ("Board: "); @@ -178,22 +182,3 @@ int checkboard (void) return 0; } - -/* ------------------------------------------------------------------------- */ - -long int initdram (int board_type) -{ - return (16 * 1024 * 1024); -} - -/* ------------------------------------------------------------------------- */ - -int testdram (void) -{ - /* TODO: XXX XXX XXX */ - printf ("test: 16 MB - ok\n"); - - return (0); -} - -/* ------------------------------------------------------------------------- */