Skip to content

Commit 454a079

Browse files
committed
Merge tag 'omap-for-v5.10/fixes-rc5-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/fixes
Fixes for omaps for various issues noticed during the -rc cycle: - Earlier omap4 cpuidle fix was incomplete and needs to use a configured idle state instead - Fix am4 cpsw driver compatible to avoid invalid resource error for the legacy driver - Two kconfig fixes for genpd support that we added for for v5.10 for proper location of the option and adding missing option - Fix ti-sysc reset status checking on enabling modules to ignore quirky modules with reset status only usable when the quirk is activated during reset. Also fix bogus resetdone warning for cpsw and modules with no sysst register reset status bit - Suppress a ti-sysc warning for timers reserved as system timers - Fix the ordering of clocks for dra7 m_can * tag 'omap-for-v5.10/fixes-rc5-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: dra76x: m_can: fix order of clocks bus: ti-sysc: suppress err msg for timers used as clockevent/source ARM: dts: am437x-l4: fix compatible for cpsw switch dt node ARM: OMAP2+: Manage MPU state properly for omap_enter_idle_coupled() bus: ti-sysc: Fix bogus resetdone warning on enable for cpsw bus: ti-sysc: Fix reset status check for modules with quirks ARM: OMAP2+: Fix missing select PM_GENERIC_DOMAINS_OF ARM: OMAP2+: Fix location for select PM_GENERIC_DOMAINS Link: https://lore.kernel.org/r/pull-1606460270-864284@atomide.com Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2 parents 06cedde + 05d5de6 commit 454a079

6 files changed

Lines changed: 30 additions & 17 deletions

File tree

arch/arm/boot/dts/am437x-l4.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@
521521
ranges = <0x0 0x100000 0x8000>;
522522

523523
mac_sw: switch@0 {
524-
compatible = "ti,am4372-cpsw","ti,cpsw-switch";
524+
compatible = "ti,am4372-cpsw-switch", "ti,cpsw-switch";
525525
reg = <0x0 0x4000>;
526526
ranges = <0 0 0x4000>;
527527
clocks = <&cpsw_125mhz_gclk>, <&dpll_clksel_mac_clk>;

arch/arm/boot/dts/dra76x.dtsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>,
3333
<GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>;
3434
interrupt-names = "int0", "int1";
35-
clocks = <&mcan_clk>, <&l3_iclk_div>;
36-
clock-names = "cclk", "hclk";
35+
clocks = <&l3_iclk_div>, <&mcan_clk>;
36+
clock-names = "hclk", "cclk";
3737
bosch,mram-cfg = <0x0 0 0 32 0 0 1 1>;
3838
};
3939
};

arch/arm/mach-omap2/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ config ARCH_OMAP2
77
depends on ARCH_MULTI_V6
88
select ARCH_OMAP2PLUS
99
select CPU_V6
10-
select PM_GENERIC_DOMAINS if PM
1110
select SOC_HAS_OMAP2_SDRC
1211

1312
config ARCH_OMAP3
@@ -106,6 +105,8 @@ config ARCH_OMAP2PLUS
106105
select OMAP_DM_TIMER
107106
select OMAP_GPMC
108107
select PINCTRL
108+
select PM_GENERIC_DOMAINS if PM
109+
select PM_GENERIC_DOMAINS_OF if PM
109110
select RESET_CONTROLLER
110111
select SOC_BUS
111112
select TI_SYSC

arch/arm/mach-omap2/cpuidle44xx.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,16 +175,18 @@ static int omap_enter_idle_coupled(struct cpuidle_device *dev,
175175
if (mpuss_can_lose_context) {
176176
error = cpu_cluster_pm_enter();
177177
if (error) {
178-
omap_set_pwrdm_state(mpu_pd, PWRDM_POWER_ON);
179-
goto cpu_cluster_pm_out;
178+
index = 0;
179+
cx = state_ptr + index;
180+
pwrdm_set_logic_retst(mpu_pd, cx->mpu_logic_state);
181+
omap_set_pwrdm_state(mpu_pd, cx->mpu_state);
182+
mpuss_can_lose_context = 0;
180183
}
181184
}
182185
}
183186

184187
omap4_enter_lowpower(dev->cpu, cx->cpu_state);
185188
cpu_done[dev->cpu] = true;
186189

187-
cpu_cluster_pm_out:
188190
/* Wakeup CPU1 only if it is not offlined */
189191
if (dev->cpu == 0 && cpumask_test_cpu(1, cpu_online_mask)) {
190192

drivers/bus/ti-sysc.c

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,9 @@ static int sysc_wait_softreset(struct sysc *ddata)
227227
u32 sysc_mask, syss_done, rstval;
228228
int syss_offset, error = 0;
229229

230+
if (ddata->cap->regbits->srst_shift < 0)
231+
return 0;
232+
230233
syss_offset = ddata->offsets[SYSC_SYSSTATUS];
231234
sysc_mask = BIT(ddata->cap->regbits->srst_shift);
232235

@@ -970,9 +973,15 @@ static int sysc_enable_module(struct device *dev)
970973
return error;
971974
}
972975
}
973-
error = sysc_wait_softreset(ddata);
974-
if (error)
975-
dev_warn(ddata->dev, "OCP softreset timed out\n");
976+
/*
977+
* Some modules like i2c and hdq1w have unusable reset status unless
978+
* the module reset quirk is enabled. Skip status check on enable.
979+
*/
980+
if (!(ddata->cfg.quirks & SYSC_MODULE_QUIRK_ENA_RESETDONE)) {
981+
error = sysc_wait_softreset(ddata);
982+
if (error)
983+
dev_warn(ddata->dev, "OCP softreset timed out\n");
984+
}
976985
if (ddata->cfg.quirks & SYSC_QUIRK_OPT_CLKS_IN_RESET)
977986
sysc_disable_opt_clocks(ddata);
978987

@@ -1373,17 +1382,17 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = {
13731382
SYSC_QUIRK("hdmi", 0, 0, 0x10, -ENODEV, 0x50030200, 0xffffffff,
13741383
SYSC_QUIRK_OPT_CLKS_NEEDED),
13751384
SYSC_QUIRK("hdq1w", 0, 0, 0x14, 0x18, 0x00000006, 0xffffffff,
1376-
SYSC_MODULE_QUIRK_HDQ1W),
1385+
SYSC_MODULE_QUIRK_HDQ1W | SYSC_MODULE_QUIRK_ENA_RESETDONE),
13771386
SYSC_QUIRK("hdq1w", 0, 0, 0x14, 0x18, 0x0000000a, 0xffffffff,
1378-
SYSC_MODULE_QUIRK_HDQ1W),
1387+
SYSC_MODULE_QUIRK_HDQ1W | SYSC_MODULE_QUIRK_ENA_RESETDONE),
13791388
SYSC_QUIRK("i2c", 0, 0, 0x20, 0x10, 0x00000036, 0x000000ff,
1380-
SYSC_MODULE_QUIRK_I2C),
1389+
SYSC_MODULE_QUIRK_I2C | SYSC_MODULE_QUIRK_ENA_RESETDONE),
13811390
SYSC_QUIRK("i2c", 0, 0, 0x20, 0x10, 0x0000003c, 0x000000ff,
1382-
SYSC_MODULE_QUIRK_I2C),
1391+
SYSC_MODULE_QUIRK_I2C | SYSC_MODULE_QUIRK_ENA_RESETDONE),
13831392
SYSC_QUIRK("i2c", 0, 0, 0x20, 0x10, 0x00000040, 0x000000ff,
1384-
SYSC_MODULE_QUIRK_I2C),
1393+
SYSC_MODULE_QUIRK_I2C | SYSC_MODULE_QUIRK_ENA_RESETDONE),
13851394
SYSC_QUIRK("i2c", 0, 0, 0x10, 0x90, 0x5040000a, 0xfffff0f0,
1386-
SYSC_MODULE_QUIRK_I2C),
1395+
SYSC_MODULE_QUIRK_I2C | SYSC_MODULE_QUIRK_ENA_RESETDONE),
13871396
SYSC_QUIRK("gpu", 0x50000000, 0x14, -ENODEV, -ENODEV, 0x00010201, 0xffffffff, 0),
13881397
SYSC_QUIRK("gpu", 0x50000000, 0xfe00, 0xfe10, -ENODEV, 0x40000000 , 0xffffffff,
13891398
SYSC_MODULE_QUIRK_SGX),
@@ -2880,7 +2889,7 @@ static int sysc_check_active_timer(struct sysc *ddata)
28802889

28812890
if ((ddata->cfg.quirks & SYSC_QUIRK_NO_RESET_ON_INIT) &&
28822891
(ddata->cfg.quirks & SYSC_QUIRK_NO_IDLE))
2883-
return -EBUSY;
2892+
return -ENXIO;
28842893

28852894
return 0;
28862895
}

include/linux/platform_data/ti-sysc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ struct sysc_regbits {
5050
s8 emufree_shift;
5151
};
5252

53+
#define SYSC_MODULE_QUIRK_ENA_RESETDONE BIT(25)
5354
#define SYSC_MODULE_QUIRK_PRUSS BIT(24)
5455
#define SYSC_MODULE_QUIRK_DSS_RESET BIT(23)
5556
#define SYSC_MODULE_QUIRK_RTC_UNLOCK BIT(22)

0 commit comments

Comments
 (0)