diff options
author | Konstantin Porotchkin <kostap@marvell.com> | 2018-10-23 16:15:12 +0300 |
---|---|---|
committer | Kostya Porotchkin <kostap@marvell.com> | 2018-10-23 18:45:11 +0300 |
commit | 96cc929fd8d30e3714016d28f0ea797a75b4d47d (patch) | |
tree | 48a2ac63c3cc8e9f17a7dd1918136c8ba0b63da3 | |
parent | 4e92011034a0596ddea2b8d33441ea1201e89358 (diff) |
fix: ble: svc: Fix the SVC code for AP807
Stop bypassing SVC procedure for AP807.
Fix makefile for proper handling the SVC_TEST parameter.
Add a missing call to i2c_init() before starting to acess
the AVS corection values stored in i2c EEPROM.
Change-Id: I2743b78500ecc310f2839ac218b636ec0294fd34
Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
Reviewed-on: http://vgitil04.il.marvell.com:8080/60470
Reviewed-by: Igal Liberman <igall@marvell.com>
Tested-by: iSoC Platform CI <ykjenk@marvell.com>
-rw-r--r-- | plat/marvell/a8k/common/a8k_common.mk | 3 | ||||
-rw-r--r-- | plat/marvell/a8k/common/plat_ble_setup.c | 13 |
2 files changed, 6 insertions, 10 deletions
diff --git a/plat/marvell/a8k/common/a8k_common.mk b/plat/marvell/a8k/common/a8k_common.mk index b032b19d..5d52ae77 100644 --- a/plat/marvell/a8k/common/a8k_common.mk +++ b/plat/marvell/a8k/common/a8k_common.mk @@ -15,6 +15,9 @@ MARVELL_COMMON_BASE := plat/marvell/common $(eval $(call add_define,PLAT_FAMILY)) +SVC_TEST := 0 +$(eval $(call add_define,SVC_TEST)) + ERRATA_A72_859971 := 1 # Enable MSS support for a8k family diff --git a/plat/marvell/a8k/common/plat_ble_setup.c b/plat/marvell/a8k/common/plat_ble_setup.c index 3351dabe..5f6950e2 100644 --- a/plat/marvell/a8k/common/plat_ble_setup.c +++ b/plat/marvell/a8k/common/plat_ble_setup.c @@ -263,9 +263,11 @@ static void ble_plat_avs_config(void) static uint32_t avs_update_from_eeprom(uint32_t avs_workpoint) { uint32_t new_wp = avs_workpoint; -#ifdef SVC_TEST +#if SVC_TEST static uint8_t avs_step[2] = {0}; + i2c_init((void *)MVEBU_CP0_I2C_BASE); + if (avs_workpoint == 0) { /* Read EEPROM only the fist time */ i2c_read(AVS_I2C_EEPROM_ADDR, 0x120, 2, avs_step, 2); @@ -321,15 +323,6 @@ static void ble_plat_svc_config(void) if (avs_workpoint) goto set_aws_wp; - /* Due to a bug in A3900 device_id skip SVC config - * TODO: add SVC config once it is decided for a3900 - */ - if (ble_get_ap_type() == CHIP_ID_AP807) { - NOTICE("SVC: SVC is not supported on AP807\n"); - ble_plat_avs_config(); - return; - } - /* Set access to LD0 */ reg_val = mmio_read_32(MVEBU_AP_EFUSE_SRV_CTRL_REG); reg_val &= ~EFUSE_SRV_CTRL_LD_SELECT_OFFS; |