source: svn/trunk/newcon3bcm2_21bu/dta/src/nexus/bsettop.c @ 29

Last change on this file since 29 was 2, checked in by jglee, 11 years ago

first commit

  • Property svn:executable set to *
File size: 1.9 KB
Line 
1/***************************************************************************
2 *     Copyright (c) 2012, 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:  $
11 * $brcm_Revision:  $
12 * $brcm_Date: $
13 *
14 * Module Description:
15 *
16 * Revision History:
17 *
18 * $brcm_Log:  $
19 *
20 ***************************************************************************/
21#include "nexus_platform.h"
22#include "nexus_avs.h"
23#include "ramheader.h"
24
25#include "serial.h"
26char* g_p_sim_flash = NULL;
27
28void bsettop_init(int id)
29{
30        NEXUS_PlatformSettings platformSettings;
31
32        BSTD_UNUSED(id);
33
34        NEXUS_Platform_GetDefaultSettings(&platformSettings);
35        NEXUS_Platform_Init(&platformSettings);
36#ifdef CONFIG_MONITOR_PVT
37        NEXUS_AvsSettings avsSettings;
38
39        NEXUS_GetAvsSettings(&avsSettings);
40        avsSettings.hardStopOffset = 2;
41        avsSettings.maxVoltageStopOffset = 4;
42        NEXUS_SetAvsSettings(&avsSettings);
43#endif 
44
45#ifdef TEST_BFDS
46        {
47        char *tmp_ptr = BKNI_Malloc(FLASH_SIZE + (2 * 0x10000));
48        g_p_sim_flash = (char*)((((unsigned int)tmp_ptr + 0x10000) / 0x10000) * 0x10000);
49        BKNI_Memset(g_p_sim_flash,0xff,FLASH_SIZE);
50        }
51#endif
52#ifdef NEXUS_UCOS_II
53        serial_init(CONSOLE_UART,115200);
54#endif
55}
56
57void bsettop_uninit(void)
58{
59        NEXUS_Platform_Uninit();
60}
61
62#ifdef TEST_BFDS
63#include "bspi_flash.h"
64bresult bspi_identify(
65                      bspi_settings_t *p_settings   /* [out] SPI flash settings structure */
66                      )
67{
68    p_settings->se_cmd = 0xD8;
69    p_settings->sector_size = 0x10000;
70    p_settings->page_size = 0x100;
71    return b_ok;
72}
73#endif
74
75uint32_t breg_read32(uint32_t addr)
76{
77        uint32_t val;
78        NEXUS_Platform_ReadRegister(addr, &val);
79        return val;
80}
Note: See TracBrowser for help on using the repository browser.