5 * Main board-specific routines for Wind River PPMC 7xx/74xx board.
7 * By Richard Danter (richard.danter@windriver.com)
8 * Copyright (C) 2005 Wind River Systems
16 /* Define some MPC107 (memory controller) registers */
17 #define MPC107_EUMB_GCR 0xfce41020
18 #define MPC107_EUMB_IACKR 0xfce600a0
21 /* Function prototypes */
22 extern void unlock_ram_in_cache( void );
23 extern void _start_warm(void);
29 * This function normally initialises the (S)DRAM of the system. For this board
30 * the SDRAM was already initialised by board_asm_init (see init.S) so we just
31 * return the size of RAM.
33 phys_size_t initdram( int board_type )
35 return CFG_SDRAM_SIZE;
42 * This is called after U-Boot has been copied from Flash/ROM to RAM. It gives
43 * us an opportunity to do some additional setup before the rest of the system
44 * is initialised. We don't need to do anything, so we just call board_init_r()
45 * which should never return.
47 void after_reloc( ulong dest_addr, gd_t* gd )
49 /* Jump to the main U-Boot board init code */
50 board_init_r( gd, dest_addr );
57 * We could do some board level checks here, such as working out what version
58 * it is, but for this board we simply display it's name (on the console).
60 int checkboard( void )
62 puts( "Board: Wind River PPMC 7xx/74xx\n" );
70 * Used for other setup which needs to be done late in the bring-up phase.
72 int misc_init_r( void )
74 /* Reset the EPIC and clear pending interrupts */
75 out32r(MPC107_EUMB_GCR, 0xa0000000);
76 while( in32r( MPC107_EUMB_GCR ) & 0x80000000 );
77 out32r( MPC107_EUMB_GCR, 0x20000000 );
78 while( in32r( MPC107_EUMB_IACKR ) != 0xff );
80 /* Enable the I-Cache */
90 * Shell command to reset the board.
92 void do_reset( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[] )
94 printf( "Resetting...\n" );
96 /* Disabe and invalidate cache */
100 /* Jump to warm start (in RAM) */
103 /* Should never get here */
107 int board_eth_init(bd_t *bis)
109 return pci_eth_init(bis);