-
- Downloads
net: ti: icssg-prueth: Fix firmware load sequence.
[ Upstream commit 9facce84f4062f782ebde18daa7006a23d40b607 ] Timesync related operations are ran in PRU0 cores for both ICSSG SLICE0 and SLICE1. Currently whenever any ICSSG interface comes up we load the respective firmwares to PRU cores and whenever interface goes down, we stop the resective cores. Due to this, when SLICE0 goes down while SLICE1 is still active, PRU0 firmwares are unloaded and PRU0 core is stopped. This results in clock jump for SLICE1 interface as the timesync related operations are no longer running. As there are interdependencies between SLICE0 and SLICE1 firmwares, fix this by running both PRU0 and PRU1 firmwares as long as at least 1 ICSSG interface is up. Add new flag in prueth struct to check if all firmwares are running and remove the old flag (fw_running). Use emacs_initialized as reference count to load the firmwares for the first and last interface up/down. Moving init_emac_mode and fw_offload_mode API outside of icssg_config to icssg_common_start API as they need to be called only once per firmware boot. Change prueth_emac_restart() to return error code and add error prints inside the caller of this functions in case of any failures. Move prueth_emac_stop() from common to sr1 driver. sr1 and sr2 drivers have different logic handling for stopping the firmwares. While sr1 driver is dependent on emac structure to stop the corresponding pru cores for that slice, for sr2 all the pru cores of both the slices are stopped and is not dependent on emac. So the prueth_emac_stop() function is no longer common and can be moved to sr1 driver. Fixes: c1e0230e ("net: ti: icss-iep: Add IEP driver") Signed-off-by:MD Danish Anwar <danishanwar@ti.com> Signed-off-by:
Meghana Malladi <m-malladi@ti.com> Signed-off-by:
David S. Miller <davem@davemloft.net> Signed-off-by:
Sasha Levin <sashal@kernel.org>
Showing
- drivers/net/ethernet/ti/icssg/icssg_common.c 0 additions, 25 deletionsdrivers/net/ethernet/ti/icssg/icssg_common.c
- drivers/net/ethernet/ti/icssg/icssg_config.c 28 additions, 13 deletionsdrivers/net/ethernet/ti/icssg/icssg_config.c
- drivers/net/ethernet/ti/icssg/icssg_config.h 1 addition, 0 deletionsdrivers/net/ethernet/ti/icssg/icssg_config.h
- drivers/net/ethernet/ti/icssg/icssg_prueth.c 181 additions, 80 deletionsdrivers/net/ethernet/ti/icssg/icssg_prueth.c
- drivers/net/ethernet/ti/icssg/icssg_prueth.h 3 additions, 2 deletionsdrivers/net/ethernet/ti/icssg/icssg_prueth.h
- drivers/net/ethernet/ti/icssg/icssg_prueth_sr1.c 23 additions, 1 deletiondrivers/net/ethernet/ti/icssg/icssg_prueth_sr1.c
Loading
Please register or sign in to comment