
The KConfig file was updated to indicate support for am57xx SoCs.
Logic was added to the pruss driver to enable the clock for am57xx pruss during the driver probe function.
This patch depends on patches 0001 and 0004 of this patch series.
Signed-off-by: Greg Leonberg greg.leonberg@sunhillo.com --- drivers/soc/ti/Kconfig | 2 +- drivers/soc/ti/pruss.c | 26 ++++++++++++++++++++++---- 2 files changed, 23 insertions(+), 5 deletions(-)
diff --git a/drivers/soc/ti/Kconfig b/drivers/soc/ti/Kconfig index f8d448b..359b346 100644 --- a/drivers/soc/ti/Kconfig +++ b/drivers/soc/ti/Kconfig @@ -41,7 +41,7 @@ config TI_PRUSS
Support for TI PRU-ICSS(G) subsystem.
- Currently supported on AM65xx and AM33xx SoCs + Currently supported on AM65xx, AM57xx, and AM33xx SoCs Say Y here to support the Programmable Realtime Unit (PRU).
endif # SOC_TI diff --git a/drivers/soc/ti/pruss.c b/drivers/soc/ti/pruss.c index f02efea..9c5c67a 100644 --- a/drivers/soc/ti/pruss.c +++ b/drivers/soc/ti/pruss.c @@ -18,8 +18,10 @@ #include <asm/io.h> #include <power-domain.h> #include <ti-pruss.h> -#ifdef CONFIG_AM33XX +#if defined(CONFIG_AM33XX) || defined(CONFIG_OMAP54XX) #include <asm/omap_common.h> +#endif +#ifdef CONFIG_AM33XX #include <asm/arch-am33xx/clock.h> #include <asm/arch-am33xx/hardware_am33xx.h> #include <asm/arch-am33xx/cpu.h> @@ -222,14 +224,28 @@ static int pruss_probe(struct udevice *dev)
if (!data->is_icssg) { u32 *const clk_domains[] = { 0 }; - u32 *const clk_modules_specific_am33xx[] = { + __maybe_unused u32 const clk_modules_hw_auto[] = { 0 }; + __maybe_unused u32 *const clk_modules_specific_am33xx[] = { #ifdef CONFIG_AM33XX &(((struct cm_perpll *)CM_PER)->pruicssclkctrl), #endif 0 }; + __maybe_unused u32 const clk_modules_specific[] = { + #ifdef CONFIG_OMAP54XX + (*prcm)->cm_l4per2_pruss1_clkctrl, + (*prcm)->cm_l4per2_pruss2_clkctrl, + #endif + 0 + };
+ #ifdef CONFIG_AM33XX do_enable_clocks(clk_domains, clk_modules_specific_am33xx, 1); + #else + do_enable_clocks((u32 const *)clk_domains, + clk_modules_hw_auto, + clk_modules_specific, 1); + #endif goto skip_coreclk_mux; }
@@ -258,7 +274,7 @@ skip_coreclk_mux: return 0; }
-static const struct pruss_private_data am33xx_priv_data = { +static const struct pruss_private_data am33xx_am57xx_priv_data = { .is_icssg = false };
@@ -270,7 +286,9 @@ static const struct udevice_id pruss_ids[] = { { .compatible = "ti,am654-icssg", .data = (unsigned long)&k2g_am65x_j7_priv_data}, { .compatible = "ti,am3356-pruss", - .data = (unsigned long)&am33xx_priv_data}, + .data = (unsigned long)&am33xx_am57xx_priv_data}, + { .compatible = "ti,am5728-pruss", + .data = (unsigned long)&am33xx_am57xx_priv_data}, {} };