GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / cfe / cfe / arch / mips / board / p6064 / src / p6064_init.S
blob638bdd3c7135f161f7a187eba2e9fe3035415467
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"
53 #include "hd2532.h"
55                 .text
57 /*  *********************************************************************
58     *  Macros
59     ********************************************************************* */
62  * Note:  See "sbdreset.S" for the board_earlyinit routine,
63  * which is basically stolen from PMON.
64  */
68 /*  *********************************************************************
69     *  BOARD_DRAMINFO
70     *  
71     *  Return the address of the DRAM information table.  Note that
72     *  the address must be obtained in a position-independent way,
73     *  so avoid the use of the "la" instruction.
74     *  
75     *  Input parameters: 
76     *      nothing
77     *      
78     *  Return value:
79     *      v0 - DRAM info table, return 0 to use default table
80     ********************************************************************* */
82 LEAF(board_draminfo)
84                 move    v0,zero
85                 j       ra
87 END(board_draminfo)
91 /*  *********************************************************************
92     *  BOARD_SETLEDS(x)
93     *  
94     *  Set LEDs for boot-time progress indication.  Not used if
95     *  the board does not have progress LEDs.  This routine
96     *  must not call any other routines, since it may be invoked
97     *  either from KSEG0 or KSEG1 and it may be invoked 
98     *  whether or not the icache is operational.
99     *  
100     *  Input parameters: 
101     *      a0 - LED value (8 bits per character, 4 characters)
102     *      
103     *  Return value:
104     *      nothing
105     *  
106     *  Registers used:
107     *      t0,t1,t2,t3
108     ********************************************************************* */
110 LEAF(board_setleds)
112                 li      t0,PHYS_TO_K1(LED_BASE+HD2532_CRAM)
114                 rol     a0,a0,8
115                 and     t1,a0,0xFF
116                 sw      t1,HD2532_CHAR(0)(t0)
118                 rol     a0,a0,8
119                 and     t1,a0,0xFF
120                 sw      t1,HD2532_CHAR(1)(t0)
122                 rol     a0,a0,8
123                 and     t1,a0,0xFF
124                 sw      t1,HD2532_CHAR(2)(t0)
126                 rol     a0,a0,8
127                 and     t1,a0,0xFF
128                 sw      t1,HD2532_CHAR(3)(t0)
130                 j       ra
132 END(board_setleds)