GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / cfe / cfe / arch / mips / board / p5064 / src / p5064_init.S
blobfb55b8a7e5979808066112048ac83ca1e50ef6b8
1 /*  *********************************************************************
2     *  P5064 Board Support Package
3     *  
4     *  Board-specific initialization            File: P5064_INIT.S
5     *
6     *  This module contains the assembly-language part of the init
7     *  code for this board support package.  The routine
8     *  "board_earlyinit" lives here.
9     *  
10     *  Author:  Mitch Lichtenberg (mpl@broadcom.com)
11     *  
12     *********************************************************************  
13     *
14     *  Copyright 2000,2001,2002,2003
15     *  Broadcom Corporation. All rights reserved.
16     *  
17     *  This software is furnished under license and may be used and 
18     *  copied only in accordance with the following terms and 
19     *  conditions.  Subject to these conditions, you may download, 
20     *  copy, install, use, modify and distribute modified or unmodified 
21     *  copies of this software in source and/or binary form.  No title 
22     *  or ownership is transferred hereby.
23     *  
24     *  1) Any source code used, modified or distributed must reproduce 
25     *     and retain this copyright notice and list of conditions 
26     *     as they appear in the source file.
27     *  
28     *  2) No right is granted to use any trade name, trademark, or 
29     *     logo of Broadcom Corporation.  The "Broadcom Corporation" 
30     *     name may not be used to endorse or promote products derived 
31     *     from this software without the prior written permission of 
32     *     Broadcom Corporation.
33     *  
34     *  3) THIS SOFTWARE IS PROVIDED "AS-IS" AND ANY EXPRESS OR
35     *     IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO, ANY IMPLIED
36     *     WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 
37     *     PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT 
38     *     SHALL BROADCOM BE LIABLE FOR ANY DAMAGES WHATSOEVER, AND IN 
39     *     PARTICULAR, BROADCOM SHALL NOT BE LIABLE FOR DIRECT, INDIRECT,
40     *     INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 
41     *     (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
42     *     GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
43     *     BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
44     *     OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 
45     *     TORT (INCLUDING NEGLIGENCE OR OTHERWISE), EVEN IF ADVISED OF 
46     *     THE POSSIBILITY OF SUCH DAMAGE.
47     ********************************************************************* */
50 #include "sbmips.h"
51 #include "bsp_config.h"
52 #include "sbd.h"
54                 .text
56 /*  *********************************************************************
57     *  Macros
58     ********************************************************************* */
61  * Note:  See "sbdreset.S" for the board_earlyinit routine,
62  * which is basically stolen from PMON.
63  */
67 /*  *********************************************************************
68     *  BOARD_DRAMINFO
69     *  
70     *  Return the address of the DRAM information table.  Note that
71     *  the address must be obtained in a position-independent way,
72     *  so avoid the use of the "la" instruction.
73     *  
74     *  Input parameters: 
75     *      nothing
76     *      
77     *  Return value:
78     *      v0 - DRAM info table, return 0 to use default table
79     ********************************************************************* */
81 LEAF(board_draminfo)
83                 move    v0,zero
84                 j       ra
86 END(board_draminfo)
90 /*  *********************************************************************
91     *  BOARD_SETLEDS(x)
92     *  
93     *  Set LEDs for boot-time progress indication.  Not used if
94     *  the board does not have progress LEDs.  This routine
95     *  must not call any other routines, since it may be invoked
96     *  either from KSEG0 or KSEG1 and it may be invoked 
97     *  whether or not the icache is operational.
98     *  
99     *  Input parameters: 
100     *      a0 - LED value (8 bits per character, 4 characters)
101     *      
102     *  Return value:
103     *      nothing
104     *  
105     *  Registers used:
106     *      t0,t1,t2,t3
107     ********************************************************************* */
109 #define ALGOR_LEDS LED_BASE             /* from SBD.H */
111 LEAF(board_setleds)
113                 li      t0,PHYS_TO_K1(ALGOR_LEDS)
115                 rol     a0,a0,8
116                 and     t1,a0,0xFF
117                 sw      t1,0x0C(t0)
119                 rol     a0,a0,8
120                 and     t1,a0,0xFF
121                 sw      t1,0x08(t0)
123                 rol     a0,a0,8
124                 and     t1,a0,0xFF
125                 sw      t1,0x04(t0)
127                 rol     a0,a0,8
128                 and     t1,a0,0xFF
129                 sw      t1,0x00(t0)
131                 j       ra
133 END(board_setleds)