Skip to content

Commit b9a9786

Browse files
committed
Merge tag 'omap-for-v5.12/fixes-rc6-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/fixes
Fixes for omaps for v5.12-rc cycle Fix swapped mmc device order also for omap3 that got changed with the recent PROBE_PREFER_ASYNCHRONOUS changes. While eventually the aliases should be board specific, all the mmc device instances are all there in the SoC, and we do probe them by default so that PM runtime can idle the devices if left enabled from the bootloader. Also included are two compiler warning fixes. * tag 'omap-for-v5.12/fixes-rc6-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: Fix uninitialized sr_inst ARM: dts: Fix swapped mmc order for omap3 ARM: OMAP2+: Fix warning for omap_init_time_of() ARM: OMAP4: PM: update ROM return address for OSWR and OFF ARM: OMAP4: Fix PMIC voltage domains for bionic ARM: dts: Fix moving mmc devices with aliases for omap4 & 5 ARM: dts: Drop duplicate sha2md5_fck to fix clk_disable race Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnd Bergmann <[email protected]>
2 parents aa68a77 + fc85dc4 commit b9a9786

File tree

9 files changed

+57
-12
lines changed

9 files changed

+57
-12
lines changed

arch/arm/boot/dts/omap3.dtsi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
i2c0 = &i2c1;
2525
i2c1 = &i2c2;
2626
i2c2 = &i2c3;
27+
mmc0 = &mmc1;
28+
mmc1 = &mmc2;
29+
mmc2 = &mmc3;
2730
serial0 = &uart1;
2831
serial1 = &uart2;
2932
serial2 = &uart3;

arch/arm/boot/dts/omap4.dtsi

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
i2c1 = &i2c2;
2323
i2c2 = &i2c3;
2424
i2c3 = &i2c4;
25+
mmc0 = &mmc1;
26+
mmc1 = &mmc2;
27+
mmc2 = &mmc3;
28+
mmc3 = &mmc4;
29+
mmc4 = &mmc5;
2530
serial0 = &uart1;
2631
serial1 = &uart2;
2732
serial2 = &uart3;

arch/arm/boot/dts/omap44xx-clocks.dtsi

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -770,14 +770,6 @@
770770
ti,max-div = <2>;
771771
};
772772

773-
sha2md5_fck: sha2md5_fck@15c8 {
774-
#clock-cells = <0>;
775-
compatible = "ti,gate-clock";
776-
clocks = <&l3_div_ck>;
777-
ti,bit-shift = <1>;
778-
reg = <0x15c8>;
779-
};
780-
781773
usb_phy_cm_clk32k: usb_phy_cm_clk32k@640 {
782774
#clock-cells = <0>;
783775
compatible = "ti,gate-clock";

arch/arm/boot/dts/omap5.dtsi

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@
2525
i2c2 = &i2c3;
2626
i2c3 = &i2c4;
2727
i2c4 = &i2c5;
28+
mmc0 = &mmc1;
29+
mmc1 = &mmc2;
30+
mmc2 = &mmc3;
31+
mmc3 = &mmc4;
32+
mmc4 = &mmc5;
2833
serial0 = &uart1;
2934
serial1 = &uart2;
3035
serial2 = &uart3;

arch/arm/mach-omap2/board-generic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ static void __init __maybe_unused omap_generic_init(void)
3333
}
3434

3535
/* Clocks are needed early, see drivers/clocksource for the rest */
36-
void __init __maybe_unused omap_init_time_of(void)
36+
static void __init __maybe_unused omap_init_time_of(void)
3737
{
3838
omap_clk_init();
3939
timer_probe();

arch/arm/mach-omap2/omap-secure.c

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
*/
1010

1111
#include <linux/arm-smccc.h>
12+
#include <linux/cpu_pm.h>
1213
#include <linux/kernel.h>
1314
#include <linux/init.h>
1415
#include <linux/io.h>
@@ -20,6 +21,7 @@
2021

2122
#include "common.h"
2223
#include "omap-secure.h"
24+
#include "soc.h"
2325

2426
static phys_addr_t omap_secure_memblock_base;
2527

@@ -213,3 +215,40 @@ void __init omap_secure_init(void)
213215
{
214216
omap_optee_init_check();
215217
}
218+
219+
/*
220+
* Dummy dispatcher call after core OSWR and MPU off. Updates the ROM return
221+
* address after MMU has been re-enabled after CPU1 has been woken up again.
222+
* Otherwise the ROM code will attempt to use the earlier physical return
223+
* address that got set with MMU off when waking up CPU1. Only used on secure
224+
* devices.
225+
*/
226+
static int cpu_notifier(struct notifier_block *nb, unsigned long cmd, void *v)
227+
{
228+
switch (cmd) {
229+
case CPU_CLUSTER_PM_EXIT:
230+
omap_secure_dispatcher(OMAP4_PPA_SERVICE_0,
231+
FLAG_START_CRITICAL,
232+
0, 0, 0, 0, 0);
233+
break;
234+
default:
235+
break;
236+
}
237+
238+
return NOTIFY_OK;
239+
}
240+
241+
static struct notifier_block secure_notifier_block = {
242+
.notifier_call = cpu_notifier,
243+
};
244+
245+
static int __init secure_pm_init(void)
246+
{
247+
if (omap_type() == OMAP2_DEVICE_TYPE_GP || !soc_is_omap44xx())
248+
return 0;
249+
250+
cpu_pm_register_notifier(&secure_notifier_block);
251+
252+
return 0;
253+
}
254+
omap_arch_initcall(secure_pm_init);

arch/arm/mach-omap2/omap-secure.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
#define OMAP5_DRA7_MON_SET_ACR_INDEX 0x107
5151

5252
/* Secure PPA(Primary Protected Application) APIs */
53+
#define OMAP4_PPA_SERVICE_0 0x21
5354
#define OMAP4_PPA_L2_POR_INDEX 0x23
5455
#define OMAP4_PPA_CPU_ACTRL_SMP_INDEX 0x25
5556

arch/arm/mach-omap2/pmic-cpcap.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,10 +246,10 @@ int __init omap4_cpcap_init(void)
246246
omap_voltage_register_pmic(voltdm, &omap443x_max8952_mpu);
247247

248248
if (of_machine_is_compatible("motorola,droid-bionic")) {
249-
voltdm = voltdm_lookup("mpu");
249+
voltdm = voltdm_lookup("core");
250250
omap_voltage_register_pmic(voltdm, &omap_cpcap_core);
251251

252-
voltdm = voltdm_lookup("mpu");
252+
voltdm = voltdm_lookup("iva");
253253
omap_voltage_register_pmic(voltdm, &omap_cpcap_iva);
254254
} else {
255255
voltdm = voltdm_lookup("core");

arch/arm/mach-omap2/sr_device.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ static const char * const dra7_sr_instances[] = {
188188

189189
int __init omap_devinit_smartreflex(void)
190190
{
191-
const char * const *sr_inst;
191+
const char * const *sr_inst = NULL;
192192
int i, nr_sr = 0;
193193

194194
if (soc_is_omap44xx()) {

0 commit comments

Comments
 (0)