1 /* *********************************************************************
2 * SB1250 Board Support Package
4 * Board-specific initialization File: VCS_INIT.S
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.
10 * This board support package is for operation in the Verilog
13 * Author: Mitch Lichtenberg (mpl@broadcom.com)
15 *********************************************************************
17 * Copyright 2000,2001,2002,2003
18 * Broadcom Corporation. All rights reserved.
20 * This software is furnished under license and may be used and
21 * copied only in accordance with the following terms and
22 * conditions. Subject to these conditions, you may download,
23 * copy, install, use, modify and distribute modified or unmodified
24 * copies of this software in source and/or binary form. No title
25 * or ownership is transferred hereby.
27 * 1) Any source code used, modified or distributed must reproduce
28 * and retain this copyright notice and list of conditions
29 * as they appear in the source file.
31 * 2) No right is granted to use any trade name, trademark, or
32 * logo of Broadcom Corporation. The "Broadcom Corporation"
33 * name may not be used to endorse or promote products derived
34 * from this software without the prior written permission of
35 * Broadcom Corporation.
37 * 3) THIS SOFTWARE IS PROVIDED "AS-IS" AND ANY EXPRESS OR
38 * IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO, ANY IMPLIED
39 * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
40 * PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT
41 * SHALL BROADCOM BE LIABLE FOR ANY DAMAGES WHATSOEVER, AND IN
42 * PARTICULAR, BROADCOM SHALL NOT BE LIABLE FOR DIRECT, INDIRECT,
43 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
44 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
45 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
46 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
47 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
48 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE), EVEN IF ADVISED OF
49 * THE POSSIBILITY OF SUCH DAMAGE.
50 ********************************************************************* */
54 #include "bsp_config.h"
59 /* *********************************************************************
61 ********************************************************************* */
65 #define CALLKSEG1(x) la k0,x ; or k0,K1BASE ; jal k0
67 #define CALLKSEG1(x) jal x
71 /* *********************************************************************
74 * Initialize board registers. This is the earliest
75 * time the BSP gets control. This routine cannot assume that
76 * memory is operational, and therefore all code in this routine
77 * must run from registers only. The $ra register must not
78 * be modified, as it contains the return address.
80 * This routine will be called from uncached space, before
81 * the caches are initialized. If you want to make
82 * subroutine calls from here, you must use the CALLKSEG1 macro.
84 * Among other things, this is where the GPIO registers get
85 * programmed to make on-board LEDs function, or other startup
86 * that has to be done before anything will work.
93 ********************************************************************* */
103 /* *********************************************************************
106 * Return the address of the DRAM information table. Note that
107 * the address must be obtained in a position-independent way,
108 * so avoid the use of the "la" instruction.
114 * v0 - DRAM info table, return 0 to use default table
115 ********************************************************************* */
126 /* *********************************************************************
129 * Set LEDs for boot-time progress indication. Not used if
130 * the board does not have progress LEDs. This routine
131 * must not call any other routines, since it may be invoked
132 * either from KSEG0 or KSEG1 and it may be invoked
133 * whether or not the icache is operational.
136 * a0 - LED value (8 bits per character, 4 characters)
143 ********************************************************************* */