ppc4xx: program_tlb now uses 64bit physical addess
[u-boot-openmoko.git] / board / ppmc7xx / ppmc7xx.c
blob402ac5e20198b6c0b961bcc90fb4654ddc76f4be
1 /*
2 * ppmc7xx.c
3 * ---------
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
9 */
11 #include <common.h>
12 #include <command.h>
15 /* Define some MPC107 (memory controller) registers */
16 #define MPC107_EUMB_GCR 0xfce41020
17 #define MPC107_EUMB_IACKR 0xfce600a0
20 /* Function prototypes */
21 extern void unlock_ram_in_cache( void );
22 extern void _start_warm(void);
26 * initdram()
28 * This function normally initialises the (S)DRAM of the system. For this board
29 * the SDRAM was already initialised by board_asm_init (see init.S) so we just
30 * return the size of RAM.
32 long initdram( int board_type )
34 return CFG_SDRAM_SIZE;
39 * after_reloc()
41 * This is called after U-Boot has been copied from Flash/ROM to RAM. It gives
42 * us an opportunity to do some additional setup before the rest of the system
43 * is initialised. We don't need to do anything, so we just call board_init_r()
44 * which should never return.
46 void after_reloc( ulong dest_addr, gd_t* gd )
48 /* Jump to the main U-Boot board init code */
49 board_init_r( gd, dest_addr );
54 * checkboard()
56 * We could do some board level checks here, such as working out what version
57 * it is, but for this board we simply display it's name (on the console).
59 int checkboard( void )
61 puts( "Board: Wind River PPMC 7xx/74xx\n" );
62 return 0;
67 * misc_init_r
69 * Used for other setup which needs to be done late in the bring-up phase.
71 int misc_init_r( void )
73 /* Reset the EPIC and clear pending interrupts */
74 out32r(MPC107_EUMB_GCR, 0xa0000000);
75 while( in32r( MPC107_EUMB_GCR ) & 0x80000000 );
76 out32r( MPC107_EUMB_GCR, 0x20000000 );
77 while( in32r( MPC107_EUMB_IACKR ) != 0xff );
79 /* Enable the I-Cache */
80 icache_enable();
82 return 0;
87 * do_reset()
89 * Shell command to reset the board.
91 void do_reset( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[] )
93 printf( "Resetting...\n" );
95 /* Disabe and invalidate cache */
96 icache_disable();
97 dcache_disable();
99 /* Jump to warm start (in RAM) */
100 _start_warm();
102 /* Should never get here */
103 while(1);