Skip to content

Commit

Permalink
1.Update GPL-2.0 license info
Browse files Browse the repository at this point in the history
2.Avoid accessing chiplink address to cause exception
  • Loading branch information
yanhong.wang committed May 12, 2021
1 parent 51342b3 commit 86664be
Show file tree
Hide file tree
Showing 23 changed files with 470 additions and 56 deletions.
38 changes: 38 additions & 0 deletions boot/bootmain.c
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
/**
******************************************************************************
* @file bootmain.c
* @author StarFive Technology
* @version V1.0
* @date 06/25/2020
* @brief
******************************************************************************
* @copy
*
* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
* TIME. AS A RESULT, STARFIVE SHALL NOT BE HELD LIABLE FOR ANY
* DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
* FROM THE CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
* CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
*
* COPYRIGHT 2020 Shanghai StarFive Technology Co., Ltd.
*/

#include "sys.h"
#include "spi_flash.h"
#include "spi.h"
Expand Down Expand Up @@ -136,6 +156,24 @@ void BootMain(void)
/*switch to pll mode*/
chip_clk_init();

//for illegal instruction exception
_SET_SYSCON_REG_register50_SCFG_funcshare_pad_ctrl_18(0x00c000c0);

_CLEAR_RESET_rstgen_rstn_usbnoc_axi_;
_CLEAR_RESET_rstgen_rstn_hifi4noc_axi_;

_ENABLE_CLOCK_clk_x2c_axi_;
_CLEAR_RESET_rstgen_rstn_x2c_axi_;

_CLEAR_RESET_rstgen_rstn_dspx2c_axi_;
_CLEAR_RESET_rstgen_rstn_dma1p_axi_;

_ENABLE_CLOCK_clk_msi_apb_;
_CLEAR_RESET_rstgen_rstn_msi_apb_;

_ASSERT_RESET_rstgen_rstn_x2c_axi_;
_CLEAR_RESET_rstgen_rstn_x2c_axi_;
//end for illegal instruction exception
_SET_SYSCON_REG_register69_core1_en(1);
_SET_SYSCON_REG_register104_SCFG_io_padshare_sel(6);
_SET_SYSCON_REG_register32_SCFG_funcshare_pad_ctrl_0(0x00c00000);
Expand Down
21 changes: 20 additions & 1 deletion boot/start.S
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
// See LICENSE for license details.
/**
******************************************************************************
* @file start.S
* @author StarFive Technology
* @version V1.0
* @date 06/25/2020
* @brief
******************************************************************************
* @copy
*
* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
* TIME. AS A RESULT, STARFIVE SHALL NOT BE HELD LIABLE FOR ANY
* DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
* FROM THE CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
* CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
*
* COPYRIGHT 2020 Shanghai StarFive Technology Co., Ltd.
*/

#include "encoding.h"
#include "platform.h"
#include "sys.h"
Expand Down
20 changes: 20 additions & 0 deletions boot/trap.c
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
/**
******************************************************************************
* @file trap.c
* @author StarFive Technology
* @version V1.0
* @date 06/25/2020
* @brief
******************************************************************************
* @copy
*
* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
* TIME. AS A RESULT, STARFIVE SHALL NOT BE HELD LIABLE FOR ANY
* DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
* FROM THE CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
* CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
*
* COPYRIGHT 2020 Shanghai StarFive Technology Co., Ltd.
*/

#include "encoding.h"
#include "uart.h"
#include "comdef.h"
Expand Down
24 changes: 19 additions & 5 deletions common/clkgen_ctrl_macro.h
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,8 +1,22 @@
/******************************************************************
*
* clkgen controller C MACRO generated by ezchip
*
******************************************************************/
/**
******************************************************************************
* @file clkgen_ctrl_macro.h
* @author StarFive Technology
* @version V1.0
* @date 06/25/2020
* @brief
******************************************************************************
* @copy
*
* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
* TIME. AS A RESULT, STARFIVE SHALL NOT BE HELD LIABLE FOR ANY
* DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
* FROM THE CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
* CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
*
* COPYRIGHT 2020 Shanghai StarFive Technology Co., Ltd.
*/

#ifndef _CLKGEN_MACRO_H_
#define _CLKGEN_MACRO_H_
Expand Down
19 changes: 19 additions & 0 deletions common/comdef.h
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/**
******************************************************************************
* @file comdef.h
* @author StarFive Technology
* @version V1.0
* @date 06/25/2020
* @brief
******************************************************************************
* @copy
*
* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
* TIME. AS A RESULT, STARFIVE SHALL NOT BE HELD LIABLE FOR ANY
* DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
* FROM THE CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
* CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
*
* COPYRIGHT 2020 Shanghai StarFive Technology Co., Ltd.
*/



Expand Down
21 changes: 20 additions & 1 deletion common/encoding.h
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
// See LICENSE for license details.
/**
******************************************************************************
* @file encoding.h
* @author StarFive Technology
* @version V1.0
* @date 06/25/2020
* @brief
******************************************************************************
* @copy
*
* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
* TIME. AS A RESULT, STARFIVE SHALL NOT BE HELD LIABLE FOR ANY
* DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
* FROM THE CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
* CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
*
* COPYRIGHT 2020 Shanghai StarFive Technology Co., Ltd.
*/


#ifndef RISCV_CSR_ENCODING_H
#define RISCV_CSR_ENCODING_H
Expand Down
25 changes: 20 additions & 5 deletions common/ezGPIO_fullMux_ctrl_macro.h
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
/******************************************************************
*
* ezGPIO_fullMux controller C MACRO generated by ezchip
*
******************************************************************/
/**
******************************************************************************
* @file ezGPIO_fullMux_ctrl_macro.h
* @author StarFive Technology
* @version V1.0
* @date 06/25/2020
* @brief
******************************************************************************
* @copy
*
* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
* TIME. AS A RESULT, STARFIVE SHALL NOT BE HELD LIABLE FOR ANY
* DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
* FROM THE CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
* CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
*
* COPYRIGHT 2020 Shanghai StarFive Technology Co., Ltd.
*/


#ifndef _EZGPIO_FULLMUX_MACRO_H_
#define _EZGPIO_FULLMUX_MACRO_H_
Expand Down
19 changes: 19 additions & 0 deletions common/platform.h
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/**
******************************************************************************
* @file platform.h
* @author StarFive Technology
* @version V1.0
* @date 06/25/2020
* @brief
******************************************************************************
* @copy
*
* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
* TIME. AS A RESULT, STARFIVE SHALL NOT BE HELD LIABLE FOR ANY
* DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
* FROM THE CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
* CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
*
* COPYRIGHT 2020 Shanghai StarFive Technology Co., Ltd.
*/

#ifndef PLATFORM_H_
#define PLATFORM_H_
Expand Down
25 changes: 20 additions & 5 deletions common/rstgen_ctrl_macro.h
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
/******************************************************************
*
* rstgen controller C MACRO generated by ezchip
*
******************************************************************/
/**
******************************************************************************
* @file rstgen_ctrl_macro.h
* @author StarFive Technology
* @version V1.0
* @date 06/25/2020
* @brief
******************************************************************************
* @copy
*
* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
* TIME. AS A RESULT, STARFIVE SHALL NOT BE HELD LIABLE FOR ANY
* DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
* FROM THE CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
* CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
*
* COPYRIGHT 2020 Shanghai StarFive Technology Co., Ltd.
*/


#ifndef _RSTGEN_MACRO_H_
#define _RSTGEN_MACRO_H_
Expand Down
19 changes: 19 additions & 0 deletions common/sys.h
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/**
******************************************************************************
* @file sys.h
* @author StarFive Technology
* @version V1.0
* @date 06/25/2020
* @brief
******************************************************************************
* @copy
*
* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
* TIME. AS A RESULT, STARFIVE SHALL NOT BE HELD LIABLE FOR ANY
* DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
* FROM THE CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
* CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
*
* COPYRIGHT 2020 Shanghai StarFive Technology Co., Ltd.
*/

#ifndef SYS_H_
#define SYS_H_
Expand Down
25 changes: 20 additions & 5 deletions common/syscon_iopad_ctrl_macro.h
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
/******************************************************************
*
* syscon_iopad_ctrl_top C MACRO generated by ezchip
*
******************************************************************/
/**
******************************************************************************
* @file syscon_iopad_ctrl_macro.h
* @author StarFive Technology
* @version V1.0
* @date 06/25/2020
* @brief
******************************************************************************
* @copy
*
* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
* TIME. AS A RESULT, STARFIVE SHALL NOT BE HELD LIABLE FOR ANY
* DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
* FROM THE CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
* CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
*
* COPYRIGHT 2020 Shanghai StarFive Technology Co., Ltd.
*/


#ifndef _SYSCON_IOPAD_CTRL_MACRO_H_
#define _SYSCON_IOPAD_CTRL_MACRO_H_
Expand Down
25 changes: 20 additions & 5 deletions common/syscon_sysmain_ctrl_macro.h
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
/******************************************************************
*
* syscon_sysmain_ctrl_top C MACRO generated by ezchip
*
******************************************************************/
/**
******************************************************************************
* @file syscon_sysmain_ctrl_macro.h
* @author StarFive Technology
* @version V1.0
* @date 06/25/2020
* @brief
******************************************************************************
* @copy
*
* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
* TIME. AS A RESULT, STARFIVE SHALL NOT BE HELD LIABLE FOR ANY
* DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
* FROM THE CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
* CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
*
* COPYRIGHT 2020 Shanghai StarFive Technology Co., Ltd.
*/


#ifndef _SYSCON_SYSMAIN_CTRL_MACRO_H_
#define _SYSCON_SYSMAIN_CTRL_MACRO_H_
Expand Down
19 changes: 19 additions & 0 deletions common/util.c
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
/**
******************************************************************************
* @file util.c
* @author StarFive Technology
* @version V1.0
* @date 06/25/2020
* @brief
******************************************************************************
* @copy
*
* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
* TIME. AS A RESULT, STARFIVE SHALL NOT BE HELD LIABLE FOR ANY
* DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
* FROM THE CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
* CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
*
* COPYRIGHT 2020 Shanghai StarFive Technology Co., Ltd.
*/

#include "util.h"
#include "comdef.h"
Expand Down
Loading

0 comments on commit 86664be

Please sign in to comment.