Add initial genpd support for omap PRM driver
Subsystems (6)
Tony Lindgren
maintainerv3 cover Add initial genpd support for omap PRM driver
Hi all,
Here is v3 set of patches to add genpd support to the PRM (Power and Reset Module) driver.
Initially we just add one hardware accelerator power domain for sgx, and one interconnect instance for l4_abe. The rest of the SoC specific domain data is probably best added one SoC at a time based on generated data.
Regards,
Tony
Changes since v2:
- Update binding to clarify a single power domain provider
- Fix maybe unused compile warnings
Changes since v1:
- Dropped clocks from the binding and prm driver as there's no need for them as pointed out by Tero
- Add checking for domain transition bit in pwrstst register as pointed out by Tero
- Add omap_prm_domain_show_state() for CONFIG_DEBUG
Tony Lindgren (6):
dt-bindings: omap: Update PRM binding for genpd
soc: ti: omap-prm: Add basic power domain support
soc: ti: omap-prm: Configure sgx power domain for am3 and am4
soc: ti: omap-prm: Configure omap4 and 5 l4_abe power domain
ARM: dts: Configure am3 and am4 sgx for genpd and drop platform data
ARM: dts: Configure omap4 and 5 l4_abe for genpd and drop platform
data
.../devicetree/bindings/arm/omap/prm-inst.txt | 2 + arch/arm/boot/dts/am33xx.dtsi | 2 + arch/arm/boot/dts/am4372.dtsi | 2 + arch/arm/boot/dts/omap4-l4-abe.dtsi | 6 +- arch/arm/boot/dts/omap4.dtsi | 6 + arch/arm/boot/dts/omap5-l4-abe.dtsi | 6 +- arch/arm/boot/dts/omap5.dtsi | 6 + arch/arm/mach-omap2/Kconfig | 1 + .../omap_hwmod_33xx_43xx_interconnect_data.c | 16 - .../omap_hwmod_33xx_43xx_ipblock_data.c | 40 --- arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 2 - arch/arm/mach-omap2/omap_hwmod_43xx_data.c | 2 - arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 33 --- arch/arm/mach-omap2/omap_hwmod_54xx_data.c | 31 -- drivers/soc/ti/omap_prm.c | 274 +++++++++++++++++- 15 files changed, 298 insertions(+), 131 deletions(-)
Signature · 1 line
2.27.0
Tony Lindgren
maintainerPATCH v3 1/6 dt-bindings: omap: Update PRM binding for genpd
The PRM (Power and Reset Module) has a register to enable and disable the related power domain, so let's update the binding for that.
--- Documentation/devicetree/bindings/arm/omap/prm-inst.txt | 2 ++ 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/arm/omap/prm-inst.txt +2 -0
@@ -18,6 +18,7 @@ Required properties: (base address and length) Optional properties: +- #power-domain-cells: Should be 0 if the instance is a power domain provider. - #reset-cells: Should be 1 if the PRM instance in question supports resets. Example:
@@ -25,5 +26,6 @@ Example: prm_dsp2: prm@1b00 { compatible = "ti,dra7-prm-inst", "ti,omap-prm-inst"; reg = <0x1b00 0x40>; + #power-domain-cells = <0>; #reset-cells = <1>; };
Signature · 1 line
2.27.0
Tony Lindgren
maintainerPATCH v3 2/6 soc: ti: omap-prm: Add basic power domain support
In reply to Tony LindgrenThe PRM controller has currently only support for resets while the power domains are still handled in the platform code.
Let's add basic power domain support to enable and disable a PRM controlled power domain if configured in the devicetree. This can be used for various hardware accelerators, and interconnect instances.
Further support can be added later on as needed for runtime configuration based on domain-idle-states.
--- arch/arm/mach-omap2/Kconfig | 1 + drivers/soc/ti/omap_prm.c | 228 +++++++++++++++++++++++++++++++++++- 2 files changed, 228 insertions(+), 1 deletion(-)
arch/arm/mach-omap2/Kconfig +1 -0
@@ -7,6 +7,7 @@ config ARCH_OMAP2 depends on ARCH_MULTI_V6 select ARCH_OMAP2PLUS select CPU_V6 + select PM_GENERIC_DOMAINS if PM select SOC_HAS_OMAP2_SDRC config ARCH_OMAP3
drivers/soc/ti/omap_prm.c +227 -1
284 lines not on this page · raw message
Signature · 1 line
2.27.0
Tony Lindgren
maintainerPATCH v3 4/6 soc: ti: omap-prm: Configure omap4 and 5 l4_abe power domain
In reply to Tony LindgrenLet's add omap4 and 5 l4_abe interconnect instance for the power domain.
--- drivers/soc/ti/omap_prm.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)
drivers/soc/ti/omap_prm.c +22 -0
@@ -95,6 +95,13 @@ struct omap_reset_data {#define PRM_ST_INTRANSITION BIT(20) +static const struct __maybe_unused omap_prm_domain_map omap_prm_all = { + .usable_modes =BIT (OMAP_PRMD_ON_ACTIVE ) |BIT (OMAP_PRMD_ON_INACTIVE ) | +BIT (OMAP_PRMD_RETENTION ) |BIT (OMAP_PRMD_OFF ), + .statechange =1 , + .logicretstate =1 , +}; +static const struct __maybe_unused omap_prm_domain_map omap_prm_noinact = { .usable_modes =BIT (OMAP_PRMD_ON_ACTIVE ) |BIT (OMAP_PRMD_RETENTION ) |BIT (OMAP_PRMD_OFF ),
@@ -102,6 +109,13 @@ static const struct __maybe_unused omap_prm_domain_map omap_prm_noinact = { .logicretstate = 1, }; +static const struct __maybe_unused omap_prm_domain_map omap_prm_nooff = { + .usable_modes =BIT (OMAP_PRMD_ON_ACTIVE ) |BIT (OMAP_PRMD_ON_INACTIVE ) | +BIT (OMAP_PRMD_RETENTION ), + .statechange =1 , + .logicretstate =1 , +}; +static const struct __maybe_unused omap_prm_domain_map omap_prm_onoff_noauto = { .usable_modes =BIT (OMAP_PRMD_ON_ACTIVE ) |BIT (OMAP_PRMD_OFF ), .statechange =1 ,
@@ -127,6 +141,10 @@ static const struct omap_rst_map rst_map_012[] = {static const struct omap_prm_data omap4_prm_data[] = { { .name ="tesla" , .base =0x4a306400 , .rstctrl =0x10 , .rstst =0x14 , .rstmap = rst_map_01 }, + { + .name ="abe" , .base =0x4a306500 , + .pwrstctrl =0 , .pwrstst =0x4 , .dmap = &omap_prm_all, + }, { .name ="core" , .base =0x4a306700 , .rstctrl =0x210 , .rstst =0x214 , .clkdm_name ="ducati" , .rstmap = rst_map_012 }, { .name ="ivahd" , .base =0x4a306f00 , .rstctrl =0x10 , .rstst =0x14 , .rstmap = rst_map_012 }, { .name ="device" , .base =0x4a307b00 , .rstctrl =0x0 , .rstst =0x4 , .rstmap = rst_map_01, .flags =OMAP_PRM_HAS_RSTCTRL |OMAP_PRM_HAS_NO_CLKDM },
@@ -135,6 +153,10 @@ static const struct omap_prm_data omap4_prm_data[] = {static const struct omap_prm_data omap5_prm_data[] = { { .name ="dsp" , .base =0x4ae06400 , .rstctrl =0x10 , .rstst =0x14 , .rstmap = rst_map_01 }, + { + .name ="abe" , .base =0x4ae06500 , + .pwrstctrl =0 , .pwrstst =0x4 , .dmap = &omap_prm_nooff, + }, { .name ="core" , .base =0x4ae06700 , .rstctrl =0x210 , .rstst =0x214 , .clkdm_name ="ipu" , .rstmap = rst_map_012 }, { .name ="iva" , .base =0x4ae07200 , .rstctrl =0x10 , .rstst =0x14 , .rstmap = rst_map_012 }, { .name ="device" , .base =0x4ae07c00 , .rstctrl =0x0 , .rstst =0x4 , .rstmap = rst_map_01, .flags =OMAP_PRM_HAS_RSTCTRL |OMAP_PRM_HAS_NO_CLKDM },
Signature · 1 line
2.27.0
Tony Lindgren
maintainerPATCH v3 6/6 ARM: dts: Configure omap4 and 5 l4_abe for genpd and drop platform data
In reply to Tony LindgrenWe can power off l4_abe domain when not in use when we configure it for genpd. And with that change, we can now also drop the old unused legacy platform data.
Note that we also need to now use "simple-pm-bus" instead of "simple-bus" for PM runtime to get enabled for the bus.
--- arch/arm/boot/dts/omap4-l4-abe.dtsi | 6 ++-- arch/arm/boot/dts/omap4.dtsi | 6 ++++ arch/arm/boot/dts/omap5-l4-abe.dtsi | 6 ++-- arch/arm/boot/dts/omap5.dtsi | 6 ++++ arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 33 ---------------------- arch/arm/mach-omap2/omap_hwmod_54xx_data.c | 31 -------------------- 6 files changed, 20 insertions(+), 68 deletions(-)
arch/arm/boot/dts/omap4-l4-abe.dtsi +4 -2
@@ -1,14 +1,16 @@ &l4_abe { /* 0x40100000 */ - compatible = "ti,omap4-l4-abe", "simple-bus"; + compatible = "ti,omap4-l4-abe", "simple-pm-bus"; reg = <0x40100000 0x400>, <0x40100400 0x400>; reg-names = "la", "ap"; + power-domains = <&prm_abe>; + /* OMAP4_L4_ABE_CLKCTRL is read-only */ #address-cells = <1>; #size-cells = <1>; ranges = <0x00000000 0x40100000 0x100000>, /* segment 0 */ <0x49000000 0x49000000 0x100000>; segment@0 { /* 0x40100000 */ - compatible = "simple-bus"; + compatible = "simple-pm-bus"; #address-cells = <1>; #size-cells = <1>; ranges =
arch/arm/boot/dts/omap4.dtsi +6 -0
@@ -637,6 +637,12 @@ prm_tesla: prm@400 { #reset-cells = <1>; }; + prm_abe: prm@500 { + compatible = "ti,omap4-prm-inst", "ti,omap-prm-inst"; + reg = <0x500 0x100>; + #power-domain-cells = <0>; + }; + prm_core: prm@700 { compatible = "ti,omap4-prm-inst", "ti,omap-prm-inst"; reg = <0x700 0x100>;
arch/arm/boot/dts/omap5-l4-abe.dtsi +4 -2
@@ -1,14 +1,16 @@ &l4_abe { /* 0x40100000 */ - compatible = "ti,omap5-l4-abe", "simple-bus"; + compatible = "ti,omap5-l4-abe", "simple-pm-bus"; reg = <0x40100000 0x400>, <0x40100400 0x400>; reg-names = "la", "ap"; + power-domains = <&prm_abe>; + /* OMAP5_L4_ABE_CLKCTRL is read-only */ #address-cells = <1>; #size-cells = <1>; ranges = <0x00000000 0x40100000 0x100000>, /* segment 0 */ <0x49000000 0x49000000 0x100000>; segment@0 { /* 0x40100000 */ - compatible = "simple-bus"; + compatible = "simple-pm-bus"; #address-cells = <1>; #size-cells = <1>; ranges =
arch/arm/boot/dts/omap5.dtsi +6 -0
@@ -649,6 +649,12 @@ prm_dsp: prm@400 { #reset-cells = <1>; }; + prm_abe: prm@500 { + compatible = "ti,omap5-prm-inst", "ti,omap-prm-inst"; + reg = <0x500 0x100>; + #power-domain-cells = <0>; + }; + prm_core: prm@700 { compatible = "ti,omap5-prm-inst", "ti,omap-prm-inst"; reg = <0x700 0x100>;
arch/arm/mach-omap2/omap_hwmod_44xx_data.c +0 -33
@@ -124,21 +124,6 @@ static struct omap_hwmod_class omap44xx_l4_hwmod_class = { .name = "l4", }; -/* l4_abe */ -static struct omap_hwmod omap44xx_l4_abe_hwmod = { - .name ="l4_abe" , - .class = &omap44xx_l4_hwmod_class, - .clkdm_name ="abe_clkdm" , - .prcm = { - .omap4 = { - .clkctrl_offs =OMAP4_CM1_ABE_L4ABE_CLKCTRL_OFFSET , - .context_offs =OMAP4_RM_ABE_AESS_CONTEXT_OFFSET , - .lostcontext_mask =OMAP4430_LOSTMEM_AESSMEM_MASK , - .flags =HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT , - }, - }, -}; -/* l4_cfg */ static struct omap_hwmod omap44xx_l4_cfg_hwmod = { .name ="l4_cfg" ,
@@ -935,22 +920,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_3 = { .user = OCP_USER_MPU | OCP_USER_SDMA, }; -/* l3_main_1 -> l4_abe */ -static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l4_abe = { - .master = &omap44xx_l3_main_1_hwmod, - .slave = &omap44xx_l4_abe_hwmod, - .clk ="l3_div_ck" , - .user =OCP_USER_MPU |OCP_USER_SDMA , -}; - -/* mpu -> l4_abe */ -static struct omap_hwmod_ocp_if omap44xx_mpu__l4_abe = { - .master = &omap44xx_mpu_hwmod, - .slave = &omap44xx_l4_abe_hwmod, - .clk ="ocp_abe_iclk" , - .user =OCP_USER_MPU |OCP_USER_SDMA , -}; -/* l3_main_1 -> l4_cfg */ static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l4_cfg = { .master = &omap44xx_l3_main_1_hwmod,
@@ -1178,8 +1147,6 @@ static struct omap_hwmod_ocp_if *omap44xx_hwmod_ocp_ifs[] __initdata = { &omap44xx_l3_main_1__l3_main_3, &omap44xx_l3_main_2__l3_main_3, &omap44xx_l4_cfg__l3_main_3, - &omap44xx_l3_main_1__l4_abe, - &omap44xx_mpu__l4_abe, &omap44xx_l3_main_1__l4_cfg, &omap44xx_l3_main_2__l4_per, &omap44xx_l4_cfg__l4_wkup,
arch/arm/mach-omap2/omap_hwmod_54xx_data.c +0 -31
@@ -121,19 +121,6 @@ static struct omap_hwmod_class omap54xx_l4_hwmod_class = { .name = "l4", }; -/* l4_abe */ -static struct omap_hwmod omap54xx_l4_abe_hwmod = { - .name ="l4_abe" , - .class = &omap54xx_l4_hwmod_class, - .clkdm_name ="abe_clkdm" , - .prcm = { - .omap4 = { - .clkctrl_offs =OMAP54XX_CM_ABE_L4_ABE_CLKCTRL_OFFSET , - .flags =HWMOD_OMAP4_NO_CONTEXT_LOSS_BIT , - }, - }, -}; -/* l4_cfg */ static struct omap_hwmod omap54xx_l4_cfg_hwmod = { .name ="l4_cfg" ,
@@ -547,22 +534,6 @@ static struct omap_hwmod_ocp_if omap54xx_l4_cfg__l3_main_3 = { .user = OCP_USER_MPU | OCP_USER_SDMA, }; -/* l3_main_1 -> l4_abe */ -static struct omap_hwmod_ocp_if omap54xx_l3_main_1__l4_abe = { - .master = &omap54xx_l3_main_1_hwmod, - .slave = &omap54xx_l4_abe_hwmod, - .clk ="abe_iclk" , - .user =OCP_USER_MPU |OCP_USER_SDMA , -}; - -/* mpu -> l4_abe */ -static struct omap_hwmod_ocp_if omap54xx_mpu__l4_abe = { - .master = &omap54xx_mpu_hwmod, - .slave = &omap54xx_l4_abe_hwmod, - .clk ="abe_iclk" , - .user =OCP_USER_MPU |OCP_USER_SDMA , -}; -/* l3_main_1 -> l4_cfg */ static struct omap_hwmod_ocp_if omap54xx_l3_main_1__l4_cfg = { .master = &omap54xx_l3_main_1_hwmod,
@@ -654,8 +625,6 @@ static struct omap_hwmod_ocp_if *omap54xx_hwmod_ocp_ifs[] __initdata = { &omap54xx_l3_main_1__l3_main_3, &omap54xx_l3_main_2__l3_main_3, &omap54xx_l4_cfg__l3_main_3, - &omap54xx_l3_main_1__l4_abe, - &omap54xx_mpu__l4_abe, &omap54xx_l3_main_1__l4_cfg, &omap54xx_l3_main_2__l4_per, &omap54xx_l3_main_1__l4_wkup,
Signature · 1 line
2.27.0
Tony Lindgren
maintainerPATCH v3 5/6 ARM: dts: Configure am3 and am4 sgx for genpd and drop platform data
In reply to Tony LindgrenWe can power off the SGX power domain when not in use when we configure it for genpd. And with that change, we can now also drop the old unused legacy platform data.
--- arch/arm/boot/dts/am33xx.dtsi | 2 + arch/arm/boot/dts/am4372.dtsi | 2 + .../omap_hwmod_33xx_43xx_interconnect_data.c | 16 -------- .../omap_hwmod_33xx_43xx_ipblock_data.c | 40 ------------------- arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 2 - arch/arm/mach-omap2/omap_hwmod_43xx_data.c | 2 - 6 files changed, 4 insertions(+), 60 deletions(-)
arch/arm/boot/dts/am33xx.dtsi +2 -0
@@ -577,6 +577,7 @@ target-module@56000000 { <SYSC_IDLE_SMART>; clocks = <&gfx_l3_clkctrl AM3_GFX_L3_GFX_CLKCTRL 0>; clock-names = "fck"; + power-domains = <&prm_gfx>; resets = <&prm_gfx 0>; reset-names = "rstctrl"; #address-cells = <1>;
@@ -616,6 +617,7 @@ prm_device: prm@f00 { prm_gfx: prm@1100 { compatible = "ti,am3-prm-inst", "ti,omap-prm-inst"; reg = <0x1100 0x100>; + #power-domain-cells = <0>; #reset-cells = <1>; }; };
arch/arm/boot/dts/am4372.dtsi +2 -0
@@ -516,6 +516,7 @@ target-module@56000000 { <SYSC_IDLE_SMART>; clocks = <&gfx_l3_clkctrl AM4_GFX_L3_GFX_CLKCTRL 0>; clock-names = "fck"; + power-domains = <&prm_gfx>; resets = <&prm_gfx 0>; reset-names = "rstctrl"; #address-cells = <1>;
@@ -532,6 +533,7 @@ &prcm { prm_gfx: prm@400 { compatible = "ti,am4-prm-inst", "ti,omap-prm-inst"; reg = <0x400 0x100>; + #power-domain-cells = <0>; #reset-cells = <1>; };
arch/arm/mach-omap2/omap_hwmod_33xx_43xx_interconnect_data.c +0 -16
@@ -74,22 +74,6 @@ struct omap_hwmod_ocp_if am33xx_l3_s__l3_main = { .user = OCP_USER_MPU | OCP_USER_SDMA, }; -/* gfx -> l3 main */ -struct omap_hwmod_ocp_if am33xx_gfx__l3_main = { - .master = &am33xx_gfx_hwmod, - .slave = &am33xx_l3_main_hwmod, - .clk ="dpll_core_m4_ck" , - .user =OCP_USER_MPU |OCP_USER_SDMA , -}; - -/* l3 main -> gfx */ -struct omap_hwmod_ocp_if am33xx_l3_main__gfx = { - .master = &am33xx_l3_main_hwmod, - .slave = &am33xx_gfx_hwmod, - .clk ="dpll_core_m4_ck" , - .user =OCP_USER_MPU |OCP_USER_SDMA , -}; -/* l4 wkup -> rtc */ struct omap_hwmod_ocp_if am33xx_l4_wkup__rtc = { .master = &am33xx_l4_wkup_hwmod,
arch/arm/mach-omap2/omap_hwmod_33xx_43xx_ipblock_data.c +0 -40
@@ -133,30 +133,6 @@ struct omap_hwmod_class am33xx_wkup_m3_hwmod_class = { .name = "wkup_m3", }; -/* gfx */ -/* Pseudo hwmod for reset control purpose only */ -static struct omap_hwmod_class am33xx_gfx_hwmod_class = { - .name ="gfx" , -}; - -static struct omap_hwmod_rst_info am33xx_gfx_resets[] = { - { .name ="gfx" , .rst_shift =0 , .st_shift =0 }, -}; - -struct omap_hwmod am33xx_gfx_hwmod = { - .name ="gfx" , - .class = &am33xx_gfx_hwmod_class, - .clkdm_name ="gfx_l3_clkdm" , - .main_clk ="gfx_fck_div_ck" , - .prcm = { - .omap4 = { - .modulemode =MODULEMODE_SWCTRL , - }, - }, - .rst_lines = am33xx_gfx_resets, - .rst_lines_cnt =ARRAY_SIZE (am33xx_gfx_resets), -}; -/* * 'prcm' class * power and reset manager (whole prcm infrastructure)
@@ -319,22 +295,14 @@ static void omap_hwmod_am33xx_clkctrl(void)CLKCTRL (am33xx_l4_ls_hwmod,AM33XX_CM_PER_L4LS_CLKCTRL_OFFSET );CLKCTRL (am33xx_l4_wkup_hwmod,AM33XX_CM_WKUP_L4WKUP_CLKCTRL_OFFSET );CLKCTRL (am33xx_l3_main_hwmod,AM33XX_CM_PER_L3_CLKCTRL_OFFSET ); -CLKCTRL (am33xx_gfx_hwmod,AM33XX_CM_GFX_GFX_CLKCTRL_OFFSET );CLKCTRL (am33xx_mpu_hwmod ,AM33XX_CM_MPU_MPU_CLKCTRL_OFFSET );CLKCTRL (am33xx_l3_instr_hwmod ,AM33XX_CM_PER_L3_INSTR_CLKCTRL_OFFSET );CLKCTRL (am33xx_ocmcram_hwmod ,AM33XX_CM_PER_OCMCRAM_CLKCTRL_OFFSET ); } -static void omap_hwmod_am33xx_rst (void ) -{ -RSTCTRL (am33xx_gfx_hwmod,AM33XX_RM_GFX_RSTCTRL_OFFSET ); -RSTST (am33xx_gfx_hwmod,AM33XX_RM_GFX_RSTST_OFFSET ); -} -void omap_hwmod_am33xx_reg (void ) {omap_hwmod_am33xx_clkctrl (); -omap_hwmod_am33xx_rst (); }static void omap_hwmod_am43xx_clkctrl (void )
@@ -348,20 +316,12 @@ static void omap_hwmod_am43xx_clkctrl(void)CLKCTRL (am33xx_l4_ls_hwmod,AM43XX_CM_PER_L4LS_CLKCTRL_OFFSET );CLKCTRL (am33xx_l4_wkup_hwmod,AM43XX_CM_WKUP_L4WKUP_CLKCTRL_OFFSET );CLKCTRL (am33xx_l3_main_hwmod,AM43XX_CM_PER_L3_CLKCTRL_OFFSET ); -CLKCTRL (am33xx_gfx_hwmod,AM43XX_CM_GFX_GFX_CLKCTRL_OFFSET );CLKCTRL (am33xx_mpu_hwmod ,AM43XX_CM_MPU_MPU_CLKCTRL_OFFSET );CLKCTRL (am33xx_l3_instr_hwmod ,AM43XX_CM_PER_L3_INSTR_CLKCTRL_OFFSET );CLKCTRL (am33xx_ocmcram_hwmod ,AM43XX_CM_PER_OCMCRAM_CLKCTRL_OFFSET ); } -static void omap_hwmod_am43xx_rst (void ) -{ -RSTCTRL (am33xx_gfx_hwmod,AM43XX_RM_GFX_RSTCTRL_OFFSET ); -RSTST (am33xx_gfx_hwmod,AM43XX_RM_GFX_RSTST_OFFSET ); -} -void omap_hwmod_am43xx_reg (void ) {omap_hwmod_am43xx_clkctrl (); -omap_hwmod_am43xx_rst (); }
arch/arm/mach-omap2/omap_hwmod_33xx_data.c +0 -2
@@ -274,10 +274,8 @@ static struct omap_hwmod_ocp_if *am33xx_hwmod_ocp_ifs[] __initdata = { &am33xx_l3_main__l4_hs, &am33xx_l3_main__l3_s, &am33xx_l3_main__l3_instr, - &am33xx_l3_main__gfx, &am33xx_l3_s__l3_main, &am33xx_wkup_m3__l4_wkup, - &am33xx_gfx__l3_main, &am33xx_l3_main__debugss, &am33xx_l4_wkup__wkup_m3, &am33xx_l4_wkup__control,
arch/arm/mach-omap2/omap_hwmod_43xx_data.c +0 -2
@@ -200,11 +200,9 @@ static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = { &am43xx_l3_main__l4_hs, &am33xx_l3_main__l3_s, &am33xx_l3_main__l3_instr, - &am33xx_l3_main__gfx, &am33xx_l3_s__l3_main, &am43xx_l3_main__emif, &am43xx_wkup_m3__l4_wkup, - &am33xx_gfx__l3_main, &am43xx_l4_wkup__wkup_m3, &am43xx_l4_wkup__control, &am43xx_l4_wkup__smartreflex0,
Signature · 1 line
2.27.0
Tony Lindgren
maintainerPATCH v3 3/6 soc: ti: omap-prm: Configure sgx power domain for am3 and am4
In reply to Tony LindgrenLet's configure only sgx power domain for am3 and am4 to start with.
--- drivers/soc/ti/omap_prm.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-)
drivers/soc/ti/omap_prm.c +22 -2
@@ -95,6 +95,18 @@ struct omap_reset_data {#define PRM_ST_INTRANSITION BIT(20) +static const struct __maybe_unused omap_prm_domain_map omap_prm_noinact = { + .usable_modes =BIT (OMAP_PRMD_ON_ACTIVE ) |BIT (OMAP_PRMD_RETENTION ) | +BIT (OMAP_PRMD_OFF ), + .statechange =1 , + .logicretstate =1 , +}; + +static const struct __maybe_unused omap_prm_domain_map omap_prm_onoff_noauto = { + .usable_modes =BIT (OMAP_PRMD_ON_ACTIVE ) |BIT (OMAP_PRMD_OFF ), + .statechange =1 , +}; +static const struct omap_rst_map rst_map_0[] = { { .rst =0 , .st =0 }, { .rst =-1 },
@@ -156,7 +168,11 @@ static const struct omap_prm_data am3_prm_data[] = { { .name = "per", .base = 0x44e00c00, .rstctrl = 0x0, .rstmap = am3_per_rst_map, .flags = OMAP_PRM_HAS_RSTCTRL, .clkdm_name = "pruss_ocp" }, { .name = "wkup", .base = 0x44e00d00, .rstctrl = 0x0, .rstst = 0xc, .rstmap = am3_wkup_rst_map, .flags = OMAP_PRM_HAS_RSTCTRL | OMAP_PRM_HAS_NO_CLKDM }, { .name = "device", .base = 0x44e00f00, .rstctrl = 0x0, .rstst = 0x8, .rstmap = rst_map_01, .flags = OMAP_PRM_HAS_RSTCTRL | OMAP_PRM_HAS_NO_CLKDM }, - { .name = "gfx", .base = 0x44e01100, .rstctrl = 0x4, .rstst = 0x14, .rstmap = rst_map_0, .clkdm_name = "gfx_l3" }, + { + .name = "gfx", .base = 0x44e01100, + .pwrstctrl = 0, .pwrstst = 0x10, .dmap = &omap_prm_noinact, + .rstctrl = 0x4, .rstst = 0x14, .rstmap = rst_map_0, .clkdm_name = "gfx_l3", + }, { }, };
@@ -172,7 +188,11 @@ static const struct omap_rst_map am4_device_rst_map[] = { };static const struct omap_prm_data am4_prm_data[] = { - { .name ="gfx" , .base =0x44df0400 , .rstctrl =0x10 , .rstst =0x14 , .rstmap = rst_map_0, .clkdm_name ="gfx_l3" }, + { + .name ="gfx" , .base =0x44df0400 , + .pwrstctrl =0 , .pwrstst =0x4 , .dmap = &omap_prm_onoff_noauto, + .rstctrl =0x10 , .rstst =0x14 , .rstmap = rst_map_0, .clkdm_name ="gfx_l3" , + }, { .name ="per" , .base =0x44df0800 , .rstctrl =0x10 , .rstst =0x14 , .rstmap = am4_per_rst_map, .clkdm_name ="pruss_ocp" }, { .name ="wkup" , .base =0x44df2000 , .rstctrl =0x10 , .rstst =0x14 , .rstmap = am3_wkup_rst_map, .flags =OMAP_PRM_HAS_NO_CLKDM }, { .name ="device" , .base =0x44df4000 , .rstctrl =0x0 , .rstst =0x4 , .rstmap = am4_device_rst_map, .flags =OMAP_PRM_HAS_RSTCTRL |OMAP_PRM_HAS_NO_CLKDM },
Signature · 1 line
2.27.0
kernel test robot
build botRe: [PATCH 3/6] soc: ti: omap-prm: Configure sgx power domain for am3 and am4
I love your patch! Perhaps something to improve:
Hi Tony,
I love your patch! Perhaps something to improve:
[auto build test WARNING on omap/for-next]
[also build test WARNING on robh/for-next keystone/next v5.8-rc3 next-20200629] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Tony-Lindgren/Add-initial-genpd-support-for-omap-PRM-driver/20200623-004919 base: https://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git for-next config: arm-randconfig-r011-20200629 (attached as .config) compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project a28d38a6bca1726d56c9b373f4c7dc5264fc7716)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
All warnings (new ones prefixed by >>):
>> drivers/soc/ti/omap_prm.c:98:21: warning: attribute declaration must precede definition [-Wignored-attributes]
static const struct __maybe_unused omap_prm_domain_map omap_prm_noinact = {
^
include/linux/compiler_attributes.h:259:56: note: expanded from macro '__maybe_unused'
#define __maybe_unused __attribute__((__unused__))
^
drivers/soc/ti/omap_prm.c:30:8: note: previous definition is here
struct omap_prm_domain_map {
^
drivers/soc/ti/omap_prm.c:105:21: warning: attribute declaration must precede definition [-Wignored-attributes]
static const struct __maybe_unused omap_prm_domain_map omap_prm_onoff_noauto = {
^
include/linux/compiler_attributes.h:259:56: note: expanded from macro '__maybe_unused'
#define __maybe_unused __attribute__((__unused__))
^
drivers/soc/ti/omap_prm.c:30:8: note: previous definition is here
struct omap_prm_domain_map {
^2 warnings generated.
vim +98 drivers/soc/ti/omap_prm.c
97
> 98 static const struct __maybe_unused omap_prm_domain_map omap_prm_noinact = { 99 .usable_modes = BIT(OMAP_PRMD_ON_ACTIVE) | BIT(OMAP_PRMD_RETENTION) |
100 BIT(OMAP_PRMD_OFF),
101 .statechange = 1,
102 .logicretstate = 1,
103 };
104
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
Tony Lindgren
maintainerRe: [PATCH 3/6] soc: ti: omap-prm: Configure sgx power domain for am3 and am4
Quoted 2 lines · kernel test robot
Quoted 1 line
Quoted 1 line
drivers/soc/ti/omap_prm.c:98:21: warning: attribute declaration must precede definition [-Wignored-attributes]static const struct
__maybe_unusedomap_prm_domain_mapomap_prm_noinact= {
Thanks no more need for __maybe_unused with these patches actually, so I'll just drop those from the series.
Regards,
Tony