957e0f6839f3adb7d2341c5de2ba3af0df7b0205
[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  * Copyright 2001 MontaVista Software Inc.
10  *
11  * This program is free software; you can redistribute  it and/or modify it
12  * under  the terms of  the GNU General  Public License as published by the
13  * Free Software Foundation;  either version 2 of the  License, or (at your
14  * option) any later version.
15  */
16
17 #include <asm/ppc_asm.h>
18 #include <asm/processor.h>
19 #include <asm/cache.h>
20 #include <asm/mv64x60_defs.h>
21 #include <platforms/ev64260.h>
22
23         .globl  mv64x60_board_init
24 mv64x60_board_init:
25         /* DINK doesn't enable 745x timebase, so enable here (Adrian Cox) */
26         mfspr   r25,PVR
27         srwi    r25,r25,16
28         cmplwi  r25,(PVR_7450 >> 16)
29         bne     1f
30         mfspr   r25,HID0
31         oris    r25,r25,(HID0_TBEN >> 16)
32         mtspr   HID0,r25
33 1:
34 #if (CONFIG_MV64X60_NEW_BASE != CONFIG_MV64X60_BASE)
35         li      r23,20
36
37         /*
38          * Change the CS2 window for the UART so that the bootloader
39          * can do I/O thru the UARTs.
40          */
41         addis   r25,0,CONFIG_MV64X60_NEW_BASE@h
42         ori     r25,r25,MV64x60_CPU2DEV_2_BASE             
43         addis   r26,0,EV64260_UART_BASE@h
44         srw     r26,r26,r23
45         stwbrx  r26,0,(r25)
46         sync
47
48         addis   r25,0,CONFIG_MV64X60_NEW_BASE@h
49         ori     r25,r25,MV64x60_CPU2DEV_2_SIZE
50         addis   r26,0,EV64260_UART_END@h
51         srw     r26,r26,r23
52         stwbrx  r26,0,(r25)
53         sync
54 #endif
55         blr
56
57 #if defined(CONFIG_SERIAL_MPSC_CONSOLE)
58 .data
59         .globl  mv64x60_console_baud
60 mv64x60_console_baud:
61 .long   EV64260_DEFAULT_BAUD
62
63         .globl  mv64x60_mpsc_clk_src
64 mv64x60_mpsc_clk_src:
65 .long   EV64260_MPSC_CLK_SRC
66
67         .globl  mv64x60_mpsc_clk_freq
68 mv64x60_mpsc_clk_freq:
69 .long   EV64260_MPSC_CLK_FREQ
70 #endif