source: svn/newcon3bcm2_21bu/rockford/bsp/bcm97552/no-os/src/sde/board.s

Last change on this file was 76, checked in by megakiss, 10 years ago

1W 대기전력을 만족시키기 위하여 POWEROFF시 튜너를 Standby 상태로 함

  • Property svn:executable set to *
File size: 2.7 KB
Line 
1/***************************************************************************
2 *     Copyright (c) 2012-2011, Broadcom Corporation
3 *     All Rights Reserved
4 *     Confidential Property of Broadcom Corporation
5 *
6 *  THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE
7 *  AGREEMENT  BETWEEN THE USER AND BROADCOM.  YOU HAVE NO RIGHT TO USE OR
8 *  EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT.
9 *
10 * $brcm_Workfile: board.s $
11 * $brcm_Revision: Hydra_Software_Devel/1 $
12 * $brcm_Date: 4/28/11 1:38p $
13 *
14 * Module Description:
15 *
16 * Revision History:
17 *
18 * $brcm_Log: /rockford/bsp/bcm97358/no-os/src/sde/board.s $
19 * 
20 * Hydra_Software_Devel/1   4/28/11 1:38p jkim
21 * SWCFE-507: Initial file
22 * 
23 * Hydra_Software_Devel/3   12/8/10 5:18p jkim
24 * SWCFE-399: add support for alt UART
25 * 
26 * Hydra_Software_Devel/2   11/12/10 4:28p jkim
27 * SWCFE-399: indicate that UART0 instead of SDIO is used by writing
28 * scratch register
29 * 
30 * Hydra_Software_Devel/1   11/9/10 4:51p jkim
31 * SWCFE-399: initial files
32 * 
33 * Bsp_Software_Devel/2   3/16/10 1:29p jkim
34 * SW7340-135: 1.  Add SPI flash support.
35 * 
36 * Bsp_Software_Devel/2   11/13/07 12:34p farshidf
37 * PR36869: 7335 CFE
38 * 
39 * Bsp_Software_Devel/2   10/24/07 3:25p farshidf
40 * PR36360: new CFE core
41 *
42
43***************************************************************************/
44#ifndef __ASSEMBLER__
45#define __ASSEMBLER__
46#endif
47#include "bmips.h"
48#include "boardcfg.h"
49#include "bchp_common.h"
50#include "bchp_sun_top_ctrl.h"
51
52.text
53/******************************************************************************
54 * Function: do_board_init
55 * Arguments:   None
56 * Returns:             v0
57 * Description:
58 * Trashes:             
59 *
60 *      pseudo code:
61 *     
62 ******************************************************************************/
63 
64LEAF(do_board_init)
65        move    s0, ra
66
67#if 0
68        /*      set sdio scratch registers to indicate uart0 is used */
69        bal             set_sdio_scratch_reg
70        nop             
71#endif
72
73        jr              s0
74        nop
75END(do_board_init)
76
77/* get_boot_mode:
78 * returns parmaetes in v0
79 * parameters:none
80 * Returns: in v0
81 * 0-6: boot from NAND
82 * 7-9: boot from SPI
83 * 10-11: boot from Parallel NOR
84 */
85 
86LEAF(get_boot_mode)
87
88        /* 
89         * If t2 is <= 6, CFE is to boot from NAND
90         */ 
91        li              t0, PHYS_TO_K1(BCHP_PHYSICAL_OFFSET+BCHP_SUN_TOP_CTRL_STRAP_VALUE_0)
92        lw              t1, 0(t0)
93        li              t0, BCHP_SUN_TOP_CTRL_STRAP_VALUE_0_strap_boot_shape_MASK
94        and             t0, t1, t0
95        srl             t2, t0, BCHP_SUN_TOP_CTRL_STRAP_VALUE_0_strap_boot_shape_SHIFT
96        li              t3, 0x6
97        ble             t2, t3, NAND_BOOT_DEV
98        nop
99
100        /* If t2 is <= 9, CFE is to boot from SPI */
101        li              t3, 0x9
102        ble             t2, t3, SPI_NOR_BOOT_DEV
103        nop
104
105        /* boot from NOR. */
106        li              v0, BOOT_FROM_NOR
107        b               1f
108        nop
109
110NAND_BOOT_DEV:
111        li              v0, BOOT_FROM_NAND
112        b               1f
113        nop
114SPI_NOR_BOOT_DEV:
115        li              v0, BOOT_FROM_SPI
116       
1171:
118        jr              ra
119        nop
120       
121END(get_boot_mode)
122
Note: See TracBrowser for help on using the repository browser.