vserver 1.9.5.x5
[linux-2.6.git] / arch / ppc / boot / simple / misc-ev64260.S
1 /*
2  * arch/ppc/boot/simple/misc-ev64260.S
3  *
4  * Host bridge init code for the Marvell/Galileo EV-64260-BP evaluation board
5  * with a GT64260 onboard.
6  *
7  * Author: Mark Greer <mgreer@mvista.com>
8  *
9  * 2001 (c) MontaVista Software, Inc. This file is licensed under
10  * the terms of the GNU General Public License version 2. This program
11  * is licensed "as is" without any warranty of any kind, whether express
12  * or implied.
13  */
14
15 #include <asm/ppc_asm.h>
16 #include <asm/processor.h>
17 #include <asm/cache.h>
18 #include <asm/mv64x60_defs.h>
19 #include <platforms/ev64260.h>
20
21         .globl  mv64x60_board_init
22 mv64x60_board_init:
23         /* DINK doesn't enable 745x timebase, so enable here (Adrian Cox) */
24         mfspr   r25,PVR
25         srwi    r25,r25,16
26         cmplwi  r25,(PVR_7450 >> 16)
27         bne     1f
28         mfspr   r25,HID0
29         oris    r25,r25,(HID0_TBEN >> 16)
30         mtspr   HID0,r25
31 1:
32 #if (CONFIG_MV64X60_NEW_BASE != CONFIG_MV64X60_BASE)
33         li      r23,20
34
35         /*
36          * Change the CS2 window for the UART so that the bootloader
37          * can do I/O thru the UARTs.
38          */
39         addis   r25,0,CONFIG_MV64X60_NEW_BASE@h
40         ori     r25,r25,MV64x60_CPU2DEV_2_BASE
41         addis   r26,0,EV64260_UART_BASE@h
42         srw     r26,r26,r23
43         stwbrx  r26,0,(r25)
44         sync
45
46         addis   r25,0,CONFIG_MV64X60_NEW_BASE@h
47         ori     r25,r25,MV64x60_CPU2DEV_2_SIZE
48         addis   r26,0,EV64260_UART_END@h
49         srw     r26,r26,r23
50         stwbrx  r26,0,(r25)
51         sync
52 #endif
53         blr
54
55 #if defined(CONFIG_SERIAL_MPSC_CONSOLE)
56 .data
57         .globl  mv64x60_console_baud
58 mv64x60_console_baud:
59 .long   EV64260_DEFAULT_BAUD
60
61         .globl  mv64x60_mpsc_clk_src
62 mv64x60_mpsc_clk_src:
63 .long   EV64260_MPSC_CLK_SRC
64
65         .globl  mv64x60_mpsc_clk_freq
66 mv64x60_mpsc_clk_freq:
67 .long   EV64260_MPSC_CLK_FREQ
68 #endif