|
@@ -17,6 +17,8 @@
|
|
|
#include "hv_cal_Pinshare.h"
|
|
|
#include "hv_cal_Gpio.h"
|
|
|
#include "hv_vos_Comm.h"
|
|
|
+#include "hv_comm_Event.h"
|
|
|
+#include "hv_chip_Config.h"
|
|
|
#define CHIP_REG_MAX_BIT_NUM 32
|
|
|
|
|
|
const static UINT32 PinshareArray[][4] = {
|
|
@@ -67,7 +69,7 @@ const static UINT32 PinshareArray[][4] = {
|
|
|
{0x11011e1c, 0, 7, 0x29},//reg_gpio10_io_ctrl
|
|
|
{0x11011e00, 15, 17, 0x0},//reg_gpio15_func_sel
|
|
|
{0x11011e20, 8, 15, 0x69},//reg_gpio15_io_ctrl
|
|
|
- {0x11011e00, 18, 20, 0x6},//reg_gpio16_func_sel
|
|
|
+ {0x11011e00, 18, 20, 0x5},//reg_gpio16_func_sel
|
|
|
{0x11011e20, 16, 23, 0x19},//reg_gpio16_io_ctrl
|
|
|
{0x11011e00, 21, 23, 0x5},//reg_gpio17_func_sel
|
|
|
{0x11011e20, 24, 31, 0x19},//reg_gpio17_io_ctrl
|
|
@@ -167,9 +169,9 @@ const static UINT32 PinshareArray[][4] = {
|
|
|
{0x11044804, 0, 0, 0x0},//reg_gpio5_func_sel
|
|
|
{0x11044834, 8, 15, 0x69},//reg_gpio5_io_ctrl
|
|
|
{0x11044804, 1, 1, 0x0},//reg_gpio6_func_sel
|
|
|
- {0x11044834, 16, 23, 0x69},//reg_gpio6_io_ctrl
|
|
|
+ {0x11044834, 16, 23, 0x5f},//reg_gpio6_io_ctrl
|
|
|
{0x11044804, 2, 2, 0x0},//reg_gpio7_func_sel
|
|
|
- {0x11044834, 24, 31, 0x69},//reg_gpio7_io_ctrl
|
|
|
+ {0x11044834, 24, 31, 0x5f},//reg_gpio7_io_ctrl
|
|
|
};
|
|
|
|
|
|
static const UCHAR8 GpioConfig[][3] =
|
|
@@ -187,7 +189,6 @@ static const UCHAR8 GpioConfig[][3] =
|
|
|
{96,1,1},
|
|
|
{98,0,0},
|
|
|
{101,0,0},
|
|
|
- {161,0,0},
|
|
|
{162,0,0},
|
|
|
{186,1,0},
|
|
|
{191,1,0},
|
|
@@ -198,8 +199,8 @@ static const UCHAR8 GpioConfig[][3] =
|
|
|
{211,0,0},
|
|
|
{213,0,0},
|
|
|
{214,0,0},
|
|
|
- {215,0,0},
|
|
|
- {216,0,0},
|
|
|
+ {215,1,1},
|
|
|
+ {216,1,1},
|
|
|
};
|
|
|
|
|
|
const static UINT32 BitMaskArray[CHIP_REG_MAX_BIT_NUM] =
|
|
@@ -256,11 +257,23 @@ VOID Hv_Cal_Pinshare_Init(VOID)
|
|
|
UINT32 uiMask = 0;
|
|
|
UINT32 uiValue = 0;
|
|
|
UINT32 uiBitLength = 0;
|
|
|
+ PowerOnReasonType enReason = POWER_ON_REASON_TYPE_POWER_ON;
|
|
|
+
|
|
|
+ enReason = HV_R32(SW_DUMMY_JTAG);
|
|
|
|
|
|
/*Gpio Default Config*/
|
|
|
uiArrayNum = sizeof (GpioConfig) / sizeof (GpioConfig[0]);
|
|
|
for (uiLoop = 0; uiLoop < uiArrayNum; uiLoop++)
|
|
|
{
|
|
|
+ if (POWER_ON_REASON_TYPE_POWER_OFF != enReason)
|
|
|
+ {
|
|
|
+ /* skip some config here, not input0 or output1. */
|
|
|
+ if (2 == GpioConfig[uiLoop][1])
|
|
|
+ {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
Hv_Cal_Gpio_SetPinLevel(GpioConfig[uiLoop][0], (GpioDir)GpioConfig[uiLoop][2]);
|
|
|
Hv_Cal_Gpio_SetDirection(GpioConfig[uiLoop][0],(GpioLevel)GpioConfig[uiLoop][1]);
|
|
|
}
|