Skip to content

Commit f82bc13

Browse files
committed
Merge tag 'omap-for-v5.4/fixes-rc4-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/fixes
Three fixes for omaps for v5.4-rc cycle Two regression fixes for omap3 iommu. I missed applying two omap3 related iommu pdata quirks patches earlier because the kbuild test robot produced errors on them for missing dependencies. Fix ti-sysc interconnect target module driver handling for watchdog quirk. I must have tested this earlier only with watchdog service running, but clearly it does not do what it needs to do. * tag 'omap-for-v5.4/fixes-rc4-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: bus: ti-sysc: Fix watchdog quirk handling ARM: OMAP2+: Add pdata for OMAP3 ISP IOMMU ARM: OMAP2+: Plug in device_enable/idle ops for IOMMUs Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Olof Johansson <[email protected]>
2 parents 21397ae + 6aed5a0 commit f82bc13

File tree

2 files changed

+25
-4
lines changed

2 files changed

+25
-4
lines changed

arch/arm/mach-omap2/pdata-quirks.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,13 @@ static struct iommu_platform_data omap3_iommu_pdata = {
8989
.reset_name = "mmu",
9090
.assert_reset = omap_device_assert_hardreset,
9191
.deassert_reset = omap_device_deassert_hardreset,
92+
.device_enable = omap_device_enable,
93+
.device_idle = omap_device_idle,
94+
};
95+
96+
static struct iommu_platform_data omap3_iommu_isp_pdata = {
97+
.device_enable = omap_device_enable,
98+
.device_idle = omap_device_idle,
9299
};
93100

94101
static int omap3_sbc_t3730_twl_callback(struct device *dev,
@@ -424,6 +431,8 @@ static struct iommu_platform_data omap4_iommu_pdata = {
424431
.reset_name = "mmu_cache",
425432
.assert_reset = omap_device_assert_hardreset,
426433
.deassert_reset = omap_device_deassert_hardreset,
434+
.device_enable = omap_device_enable,
435+
.device_idle = omap_device_idle,
427436
};
428437
#endif
429438

@@ -617,6 +626,8 @@ static struct of_dev_auxdata omap_auxdata_lookup[] = {
617626
#ifdef CONFIG_ARCH_OMAP3
618627
OF_DEV_AUXDATA("ti,omap2-iommu", 0x5d000000, "5d000000.mmu",
619628
&omap3_iommu_pdata),
629+
OF_DEV_AUXDATA("ti,omap2-iommu", 0x480bd400, "480bd400.mmu",
630+
&omap3_iommu_isp_pdata),
620631
OF_DEV_AUXDATA("ti,omap3-smartreflex-core", 0x480cb000,
621632
"480cb000.smartreflex", &omap_sr_pdata[OMAP_SR_CORE]),
622633
OF_DEV_AUXDATA("ti,omap3-smartreflex-mpu-iva", 0x480c9000,

drivers/bus/ti-sysc.c

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ static const char * const clock_names[SYSC_MAX_CLOCKS] = {
7474
* @clk_disable_quirk: module specific clock disable quirk
7575
* @reset_done_quirk: module specific reset done quirk
7676
* @module_enable_quirk: module specific enable quirk
77+
* @module_disable_quirk: module specific disable quirk
7778
*/
7879
struct sysc {
7980
struct device *dev;
@@ -100,6 +101,7 @@ struct sysc {
100101
void (*clk_disable_quirk)(struct sysc *sysc);
101102
void (*reset_done_quirk)(struct sysc *sysc);
102103
void (*module_enable_quirk)(struct sysc *sysc);
104+
void (*module_disable_quirk)(struct sysc *sysc);
103105
};
104106

105107
static void sysc_parse_dts_quirks(struct sysc *ddata, struct device_node *np,
@@ -959,6 +961,9 @@ static int sysc_disable_module(struct device *dev)
959961
if (ddata->offsets[SYSC_SYSCONFIG] == -ENODEV)
960962
return 0;
961963

964+
if (ddata->module_disable_quirk)
965+
ddata->module_disable_quirk(ddata);
966+
962967
regbits = ddata->cap->regbits;
963968
reg = sysc_read(ddata, ddata->offsets[SYSC_SYSCONFIG]);
964969

@@ -1248,6 +1253,9 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = {
12481253
SYSC_MODULE_QUIRK_SGX),
12491254
SYSC_QUIRK("wdt", 0, 0, 0x10, 0x14, 0x502a0500, 0xfffff0f0,
12501255
SYSC_MODULE_QUIRK_WDT),
1256+
/* Watchdog on am3 and am4 */
1257+
SYSC_QUIRK("wdt", 0x44e35000, 0, 0x10, 0x14, 0x502a0500, 0xfffff0f0,
1258+
SYSC_MODULE_QUIRK_WDT | SYSC_QUIRK_SWSUP_SIDLE),
12511259

12521260
#ifdef DEBUG
12531261
SYSC_QUIRK("adc", 0, 0, 0x10, -1, 0x47300001, 0xffffffff, 0),
@@ -1440,14 +1448,14 @@ static void sysc_reset_done_quirk_wdt(struct sysc *ddata)
14401448
!(val & 0x10), 100,
14411449
MAX_MODULE_SOFTRESET_WAIT);
14421450
if (error)
1443-
dev_warn(ddata->dev, "wdt disable spr failed\n");
1451+
dev_warn(ddata->dev, "wdt disable step1 failed\n");
14441452

1445-
sysc_write(ddata, wps, 0x5555);
1453+
sysc_write(ddata, spr, 0x5555);
14461454
error = readl_poll_timeout(ddata->module_va + wps, val,
14471455
!(val & 0x10), 100,
14481456
MAX_MODULE_SOFTRESET_WAIT);
14491457
if (error)
1450-
dev_warn(ddata->dev, "wdt disable wps failed\n");
1458+
dev_warn(ddata->dev, "wdt disable step2 failed\n");
14511459
}
14521460

14531461
static void sysc_init_module_quirks(struct sysc *ddata)
@@ -1471,8 +1479,10 @@ static void sysc_init_module_quirks(struct sysc *ddata)
14711479
if (ddata->cfg.quirks & SYSC_MODULE_QUIRK_SGX)
14721480
ddata->module_enable_quirk = sysc_module_enable_quirk_sgx;
14731481

1474-
if (ddata->cfg.quirks & SYSC_MODULE_QUIRK_WDT)
1482+
if (ddata->cfg.quirks & SYSC_MODULE_QUIRK_WDT) {
14751483
ddata->reset_done_quirk = sysc_reset_done_quirk_wdt;
1484+
ddata->module_disable_quirk = sysc_reset_done_quirk_wdt;
1485+
}
14761486
}
14771487

14781488
static int sysc_clockdomain_init(struct sysc *ddata)

0 commit comments

Comments
 (0)