marvell: comphy: start AP FW when comphy AP mode selected

After configuring comphy to AP mode also start AP FW.

Change-Id: Ib28977d7ee643575a818ba17f69dea0b7e8e0df4
Signed-off-by: Grzegorz Jaszczyk <jaz@semihalf.com>
This commit is contained in:
Grzegorz Jaszczyk 2019-04-12 16:57:14 +02:00 committed by Manish Pandey
parent 9b88367323
commit 5a9e46e69c
1 changed files with 6 additions and 0 deletions

View File

@ -11,6 +11,7 @@
#include <common/debug.h>
#include <drivers/delay_timer.h>
#include <mg_conf_cm3/mg_conf_cm3.h>
#include <lib/mmio.h>
#include <lib/spinlock.h>
@ -2231,6 +2232,7 @@ static int mvebu_cp110_comphy_ap_power_on(uint64_t comphy_base,
uint32_t comphy_mode)
{
uint32_t mask, data;
uint8_t ap_nr, cp_nr;
uintptr_t comphy_addr = comphy_addr =
COMPHY_ADDR(comphy_base, comphy_index);
@ -2247,6 +2249,10 @@ static int mvebu_cp110_comphy_ap_power_on(uint64_t comphy_base,
reg_set(comphy_addr + COMMON_PHY_CFG1_REG, data, mask);
debug_exit();
/* Start AP Firmware */
mvebu_cp110_get_ap_and_cp_nr(&ap_nr, &cp_nr, comphy_base);
mg_start_ap_fw(cp_nr);
return 0;
}