[processor-sdk/performance-audio-sr.git] / psdk_cust / pdk_k2g_1_0_1_2_eng / packages / ti / boot / sbl / soc / sbl_soc.h
1 /*
2 * Copyright (C) 2016 Texas Instruments Incorporated - http://www.ti.com/
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the
14 * distribution.
15 *
16 * Neither the name of Texas Instruments Incorporated nor the names of
17 * its contributors may be used to endorse or promote products derived
18 * from this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 *
32 */
34 #ifndef SBL_PRCM_H_
35 #define SBL_PRCM_H_
37 #include <ti/board/board.h>
39 /**
40 * @brief - SBL_socInit() - function to do initialize settings based on soc
41 *
42 * @param none
43 *
44 * @return - int32t
45 * 0 = Init completed successfully
46 * -1 = Error occurred
47 *
48 */
49 int32_t SBL_socInit();
51 void SBL_DSP1BringUp(uint32_t EntryPoint);
53 #if defined(BOOT_QSPI)
54 /**
55 * @brief - SBL_qspiInit() - function to do initialize QSPI
56 *
57 * @param
58 * handle = pointer to return QSPI handle
59 *
60 * @return - int32t
61 * 0 = Init completed successfully
62 * -1 = Error occurred
63 *
64 */
65 int32_t SBL_qspiInit(void *handle);
67 /**
68 * @brief - SBL_qspiFlashWrite() - function to do flash QSPI
69 *
70 * @param
71 * handle = pointer to QSPI handle
72 * src = byte pointer to source
73 * length = size of source to copy
74 * offset = QSPI offset to flash into
75 *
76 * @return - int32t
77 * 0 = Init completed successfully
78 * <0 = Negative value indicate error occurred
79 *
80 */
81 int32_t SBL_qspiFlashWrite(void *handle, uint8_t *src, uint32_t length,
82 uint32_t offset);
84 /**
85 * @brief - SBL_qspiFlashRead() - function to do flash QSPI
86 *
87 * @param
88 * handle = pointer to QSPI handle
89 * dst = byte pointer to destination
90 * length = size of source to copy
91 * offset = QSPI offset to flash into
92 *
93 * @return - int32t
94 * 0 = Init completed successfully
95 * <0 = Negative value indicate error occurred
96 *
97 */
98 int32_t SBL_qspiFlashRead(void *handle, uint8_t *dst, uint32_t length,
99 uint32_t offset);
101 /**
102 * @brief - SBL_qspiClose() - function to do close QSPI handle
103 *
104 * @param
105 * handle = pointer to QSPI handle
106 *
107 * @return - int32t
108 * 0 = Init completed successfully
109 * -1 = Error occurred
110 *
111 */
112 int32_t SBL_qspiClose(void *handle);
114 #endif /* end of BOOT_QSPI definitions */
116 #endif