Merge tag 'omap-for-v4.15/fixes-v2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes

Fixes for omaps for v4.15-rc cycle with two fixes for hangs with the
rest being compiler warning fixes and fixes for power states and devices
on various boards:

- Fix smatch issue introduced by recent omap device changes for legacy
resources

- Fix SRAM virt to phys related boot hang affecting n900 and other omap3 hs
devices found by pending CMA changes. While it seems that we have not hit
this in other use cases, let's fix it to avoid a nasty and hard to find
suprise as right now there is just luck keeping the SRAM virtual address
to physical address translation working with the 0xffff high_mask.

- Fix am335x reading of domain state registers that only exist for the
PM_CEFUSE domain and produce wrong results for other domains

- Fix missing setting for error code for omap device if allocation fails

- Fix missing modules_offs for omap3 MMC3 affecting n9/n950

- Fix cm_split_idlest() reading reserved registers showing wrong
idlestatus

- Fixes to correct #phy-cells property for compiler warnings that
recently started happening

- Add a missing OHCI remote-wakeup-connected property that I was supposed
to merge after the ohci-omap3 to ohci-platform changes but somehow managed
to drop. I only noticed this was missing while debugging the OHCI/EHCI GPS
and modem hang

- Fix a system hang with GPS or modem connected to the OHCI/EHCI bus that
typically happened within 20 - 40 minutes on an idle system. This turned
out to be an issue caused by using the parent interrupt controller directly
with the WUGEN + GIC stacked interrupt controller domains

- Fixes for logicpd-somlv GPMC for Ethernet and NAND that clearly
have been broken since we changed GPMC to use the interrupt controller
binding for some pins. And fix the wrong pin muxing for WLAN while at it

- Fixes for am437x interrupt and dma properties to fix compiler warnings
that recently started happening

* tag 'omap-for-v4.15/fixes-v2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
ARM: dts: am437x-cm-t43: Correct the dmas property of spi0
ARM: dts: am4372: Correct the interrupts_properties of McASP
ARM: dts: logicpd-somlv: Fix wl127x pinmux
ARM: dts: logicpd-som-lv: Fix gpmc addresses for NAND and enet
ARM: dts: Fix omap4 hang with GPS connected to USB by using wakeupgen
ARM: OMAP2+: Missing error code in omap_device_build()
ARM: AM33xx: PRM: Remove am33xx_pwrdm_read_prev_pwrst function
ARM: OMAP2+: Fix SRAM virt to phys translation for save_secure_ram_context
ARM: dts: Add remote-wakeup-connected for omap OHCI
ARM: dts: am33xx: Add missing #phy-cells to ti,am335x-usb-phy
ARM: dts: omap: Add missing #phy-cells to usb-nop-xceiv
ARM: OMAP2+: Fix smatch found issue for omap_device
ARM: OMAP2/3: CM: fix cm_split_idlest functionality
ARM: OMAP3: hwmod_data: add missing module_offs for MMC3

Signed-off-by: Olof Johansson <olof@lixom.net>

+90 -66
+2
Documentation/devicetree/bindings/usb/am33xx-usb.txt
··· 95 95 reg = <0x47401300 0x100>; 96 96 reg-names = "phy"; 97 97 ti,ctrl_mod = <&ctrl_mod>; 98 + #phy-cells = <0>; 98 99 }; 99 100 100 101 usb0: usb@47401000 { ··· 142 141 reg = <0x47401b00 0x100>; 143 142 reg-names = "phy"; 144 143 ti,ctrl_mod = <&ctrl_mod>; 144 + #phy-cells = <0>; 145 145 }; 146 146 147 147 usb1: usb@47401800 {
+2
arch/arm/boot/dts/am33xx.dtsi
··· 630 630 reg-names = "phy"; 631 631 status = "disabled"; 632 632 ti,ctrl_mod = <&usb_ctrl_mod>; 633 + #phy-cells = <0>; 633 634 }; 634 635 635 636 usb0: usb@47401000 { ··· 679 678 reg-names = "phy"; 680 679 status = "disabled"; 681 680 ti,ctrl_mod = <&usb_ctrl_mod>; 681 + #phy-cells = <0>; 682 682 }; 683 683 684 684 usb1: usb@47401800 {
+4 -2
arch/arm/boot/dts/am4372.dtsi
··· 927 927 reg = <0x48038000 0x2000>, 928 928 <0x46000000 0x400000>; 929 929 reg-names = "mpu", "dat"; 930 - interrupts = <80>, <81>; 930 + interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>, 931 + <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>; 931 932 interrupt-names = "tx", "rx"; 932 933 status = "disabled"; 933 934 dmas = <&edma 8 2>, ··· 942 941 reg = <0x4803C000 0x2000>, 943 942 <0x46400000 0x400000>; 944 943 reg-names = "mpu", "dat"; 945 - interrupts = <82>, <83>; 944 + interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>, 945 + <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>; 946 946 interrupt-names = "tx", "rx"; 947 947 status = "disabled"; 948 948 dmas = <&edma 10 2>,
+2 -2
arch/arm/boot/dts/am437x-cm-t43.dts
··· 301 301 status = "okay"; 302 302 pinctrl-names = "default"; 303 303 pinctrl-0 = <&spi0_pins>; 304 - dmas = <&edma 16 305 - &edma 17>; 304 + dmas = <&edma 16 0 305 + &edma 17 0>; 306 306 dma-names = "tx0", "rx0"; 307 307 308 308 flash: w25q64cvzpig@0 {
+1
arch/arm/boot/dts/dm814x.dtsi
··· 75 75 reg = <0x47401300 0x100>; 76 76 reg-names = "phy"; 77 77 ti,ctrl_mod = <&usb_ctrl_mod>; 78 + #phy-cells = <0>; 78 79 }; 79 80 80 81 usb0: usb@47401000 {
+2 -1
arch/arm/boot/dts/logicpd-som-lv-37xx-devkit.dts
··· 72 72 }; 73 73 74 74 &gpmc { 75 - ranges = <1 0 0x08000000 0x1000000>; /* CS1: 16MB for LAN9221 */ 75 + ranges = <0 0 0x30000000 0x1000000 /* CS0: 16MB for NAND */ 76 + 1 0 0x2c000000 0x1000000>; /* CS1: 16MB for LAN9221 */ 76 77 77 78 ethernet@gpmc { 78 79 pinctrl-names = "default";
+11 -6
arch/arm/boot/dts/logicpd-som-lv.dtsi
··· 33 33 hsusb2_phy: hsusb2_phy { 34 34 compatible = "usb-nop-xceiv"; 35 35 reset-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>; /* gpio_4 */ 36 + #phy-cells = <0>; 36 37 }; 37 38 }; 38 39 39 40 &gpmc { 40 - ranges = <0 0 0x00000000 0x1000000>; /* CS0: 16MB for NAND */ 41 + ranges = <0 0 0x30000000 0x1000000>; /* CS0: 16MB for NAND */ 41 42 42 43 nand@0,0 { 43 44 compatible = "ti,omap2-nand"; ··· 122 121 123 122 &mmc3 { 124 123 interrupts-extended = <&intc 94 &omap3_pmx_core2 0x46>; 125 - pinctrl-0 = <&mmc3_pins>; 124 + pinctrl-0 = <&mmc3_pins &wl127x_gpio>; 126 125 pinctrl-names = "default"; 127 126 vmmc-supply = <&wl12xx_vmmc>; 128 127 non-removable; ··· 133 132 wlcore: wlcore@2 { 134 133 compatible = "ti,wl1273"; 135 134 reg = <2>; 136 - interrupt-parent = <&gpio5>; 137 - interrupts = <24 IRQ_TYPE_LEVEL_HIGH>; /* gpio 152 */ 135 + interrupt-parent = <&gpio1>; 136 + interrupts = <2 IRQ_TYPE_LEVEL_HIGH>; /* gpio 2 */ 138 137 ref-clock-frequency = <26000000>; 139 138 }; 140 139 }; ··· 158 157 OMAP3_CORE1_IOPAD(0x2166, PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc2_dat5.sdmmc3_dat1 */ 159 158 OMAP3_CORE1_IOPAD(0x2168, PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc2_dat6.sdmmc3_dat2 */ 160 159 OMAP3_CORE1_IOPAD(0x216a, PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc2_dat6.sdmmc3_dat3 */ 161 - OMAP3_CORE1_IOPAD(0x2184, PIN_INPUT_PULLUP | MUX_MODE4) /* mcbsp4_clkx.gpio_152 */ 162 - OMAP3_CORE1_IOPAD(0x2a0c, PIN_OUTPUT | MUX_MODE4) /* sys_boot1.gpio_3 */ 163 160 OMAP3_CORE1_IOPAD(0x21d0, PIN_INPUT_PULLUP | MUX_MODE3) /* mcspi1_cs1.sdmmc3_cmd */ 164 161 OMAP3_CORE1_IOPAD(0x21d2, PIN_INPUT_PULLUP | MUX_MODE3) /* mcspi1_cs2.sdmmc_clk */ 165 162 >; ··· 225 226 hsusb2_reset_pin: pinmux_hsusb1_reset_pin { 226 227 pinctrl-single,pins = < 227 228 OMAP3_WKUP_IOPAD(0x2a0e, PIN_OUTPUT | MUX_MODE4) /* sys_boot2.gpio_4 */ 229 + >; 230 + }; 231 + wl127x_gpio: pinmux_wl127x_gpio_pin { 232 + pinctrl-single,pins = < 233 + OMAP3_WKUP_IOPAD(0x2a0c, PIN_INPUT | MUX_MODE4) /* sys_boot0.gpio_2 */ 234 + OMAP3_WKUP_IOPAD(0x2a0c, PIN_OUTPUT | MUX_MODE4) /* sys_boot1.gpio_3 */ 228 235 >; 229 236 }; 230 237 };
+1
arch/arm/boot/dts/omap3-beagle-xm.dts
··· 90 90 compatible = "usb-nop-xceiv"; 91 91 reset-gpios = <&gpio5 19 GPIO_ACTIVE_LOW>; /* gpio_147 */ 92 92 vcc-supply = <&hsusb2_power>; 93 + #phy-cells = <0>; 93 94 }; 94 95 95 96 tfp410: encoder0 {
+1
arch/arm/boot/dts/omap3-beagle.dts
··· 64 64 compatible = "usb-nop-xceiv"; 65 65 reset-gpios = <&gpio5 19 GPIO_ACTIVE_LOW>; /* gpio_147 */ 66 66 vcc-supply = <&hsusb2_power>; 67 + #phy-cells = <0>; 67 68 }; 68 69 69 70 sound {
+2
arch/arm/boot/dts/omap3-cm-t3x.dtsi
··· 43 43 hsusb1_phy: hsusb1_phy { 44 44 compatible = "usb-nop-xceiv"; 45 45 vcc-supply = <&hsusb1_power>; 46 + #phy-cells = <0>; 46 47 }; 47 48 48 49 /* HS USB Host PHY on PORT 2 */ 49 50 hsusb2_phy: hsusb2_phy { 50 51 compatible = "usb-nop-xceiv"; 51 52 vcc-supply = <&hsusb2_power>; 53 + #phy-cells = <0>; 52 54 }; 53 55 54 56 ads7846reg: ads7846-reg {
+1
arch/arm/boot/dts/omap3-evm-common.dtsi
··· 29 29 compatible = "usb-nop-xceiv"; 30 30 reset-gpios = <&gpio1 21 GPIO_ACTIVE_LOW>; /* gpio_21 */ 31 31 vcc-supply = <&hsusb2_power>; 32 + #phy-cells = <0>; 32 33 }; 33 34 34 35 leds {
+1
arch/arm/boot/dts/omap3-gta04.dtsi
··· 120 120 hsusb2_phy: hsusb2_phy { 121 121 compatible = "usb-nop-xceiv"; 122 122 reset-gpios = <&gpio6 14 GPIO_ACTIVE_LOW>; 123 + #phy-cells = <0>; 123 124 }; 124 125 125 126 tv0: connector {
+1
arch/arm/boot/dts/omap3-igep0020-common.dtsi
··· 58 58 compatible = "usb-nop-xceiv"; 59 59 reset-gpios = <&gpio1 24 GPIO_ACTIVE_LOW>; /* gpio_24 */ 60 60 vcc-supply = <&hsusb1_power>; 61 + #phy-cells = <0>; 61 62 }; 62 63 63 64 tfp410: encoder {
+1
arch/arm/boot/dts/omap3-igep0030-common.dtsi
··· 37 37 hsusb2_phy: hsusb2_phy { 38 38 compatible = "usb-nop-xceiv"; 39 39 reset-gpios = <&gpio2 22 GPIO_ACTIVE_LOW>; /* gpio_54 */ 40 + #phy-cells = <0>; 40 41 }; 41 42 }; 42 43
+1
arch/arm/boot/dts/omap3-lilly-a83x.dtsi
··· 51 51 hsusb1_phy: hsusb1_phy { 52 52 compatible = "usb-nop-xceiv"; 53 53 vcc-supply = <&reg_vcc3>; 54 + #phy-cells = <0>; 54 55 }; 55 56 }; 56 57
+1
arch/arm/boot/dts/omap3-overo-base.dtsi
··· 51 51 compatible = "usb-nop-xceiv"; 52 52 reset-gpios = <&gpio6 23 GPIO_ACTIVE_LOW>; /* gpio_183 */ 53 53 vcc-supply = <&hsusb2_power>; 54 + #phy-cells = <0>; 54 55 }; 55 56 56 57 /* Regulator to trigger the nPoweron signal of the Wifi module */
+1
arch/arm/boot/dts/omap3-pandora-common.dtsi
··· 205 205 compatible = "usb-nop-xceiv"; 206 206 reset-gpios = <&gpio1 16 GPIO_ACTIVE_LOW>; /* GPIO_16 */ 207 207 vcc-supply = <&vaux2>; 208 + #phy-cells = <0>; 208 209 }; 209 210 210 211 /* HS USB Host VBUS supply
+1
arch/arm/boot/dts/omap3-tao3530.dtsi
··· 46 46 compatible = "usb-nop-xceiv"; 47 47 reset-gpios = <&gpio6 2 GPIO_ACTIVE_LOW>; /* gpio_162 */ 48 48 vcc-supply = <&hsusb2_power>; 49 + #phy-cells = <0>; 49 50 }; 50 51 51 52 sound {
+1
arch/arm/boot/dts/omap3.dtsi
··· 715 715 compatible = "ti,ohci-omap3"; 716 716 reg = <0x48064400 0x400>; 717 717 interrupts = <76>; 718 + remote-wakeup-connected; 718 719 }; 719 720 720 721 usbhsehci: ehci@48064800 {
+1
arch/arm/boot/dts/omap4-droid4-xt894.dts
··· 73 73 /* HS USB Host PHY on PORT 1 */ 74 74 hsusb1_phy: hsusb1_phy { 75 75 compatible = "usb-nop-xceiv"; 76 + #phy-cells = <0>; 76 77 }; 77 78 78 79 /* LCD regulator from sw5 source */
+1
arch/arm/boot/dts/omap4-duovero.dtsi
··· 43 43 hsusb1_phy: hsusb1_phy { 44 44 compatible = "usb-nop-xceiv"; 45 45 reset-gpios = <&gpio2 30 GPIO_ACTIVE_LOW>; /* gpio_62 */ 46 + #phy-cells = <0>; 46 47 47 48 pinctrl-names = "default"; 48 49 pinctrl-0 = <&hsusb1phy_pins>;
+1
arch/arm/boot/dts/omap4-panda-common.dtsi
··· 89 89 hsusb1_phy: hsusb1_phy { 90 90 compatible = "usb-nop-xceiv"; 91 91 reset-gpios = <&gpio2 30 GPIO_ACTIVE_LOW>; /* gpio_62 */ 92 + #phy-cells = <0>; 92 93 vcc-supply = <&hsusb1_power>; 93 94 clocks = <&auxclk3_ck>; 94 95 clock-names = "main_clk";
+1
arch/arm/boot/dts/omap4-var-som-om44.dtsi
··· 44 44 45 45 reset-gpios = <&gpio6 17 GPIO_ACTIVE_LOW>; /* gpio 177 */ 46 46 vcc-supply = <&vbat>; 47 + #phy-cells = <0>; 47 48 48 49 clocks = <&auxclk3_ck>; 49 50 clock-names = "main_clk";
+1 -2
arch/arm/boot/dts/omap4.dtsi
··· 1081 1081 usbhsohci: ohci@4a064800 { 1082 1082 compatible = "ti,ohci-omap3"; 1083 1083 reg = <0x4a064800 0x400>; 1084 - interrupt-parent = <&gic>; 1085 1084 interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>; 1085 + remote-wakeup-connected; 1086 1086 }; 1087 1087 1088 1088 usbhsehci: ehci@4a064c00 { 1089 1089 compatible = "ti,ehci-omap"; 1090 1090 reg = <0x4a064c00 0x400>; 1091 - interrupt-parent = <&gic>; 1092 1091 interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>; 1093 1092 }; 1094 1093 };
+2
arch/arm/boot/dts/omap5-board-common.dtsi
··· 73 73 clocks = <&auxclk1_ck>; 74 74 clock-names = "main_clk"; 75 75 clock-frequency = <19200000>; 76 + #phy-cells = <0>; 76 77 }; 77 78 78 79 /* HS USB Host PHY on PORT 3 */ 79 80 hsusb3_phy: hsusb3_phy { 80 81 compatible = "usb-nop-xceiv"; 81 82 reset-gpios = <&gpio3 15 GPIO_ACTIVE_LOW>; /* gpio3_79 ETH_NRESET */ 83 + #phy-cells = <0>; 82 84 }; 83 85 84 86 tpd12s015: encoder {
+2
arch/arm/boot/dts/omap5-cm-t54.dts
··· 63 63 hsusb2_phy: hsusb2_phy { 64 64 compatible = "usb-nop-xceiv"; 65 65 reset-gpios = <&gpio3 12 GPIO_ACTIVE_LOW>; /* gpio3_76 HUB_RESET */ 66 + #phy-cells = <0>; 66 67 }; 67 68 68 69 /* HS USB Host PHY on PORT 3 */ 69 70 hsusb3_phy: hsusb3_phy { 70 71 compatible = "usb-nop-xceiv"; 71 72 reset-gpios = <&gpio3 19 GPIO_ACTIVE_LOW>; /* gpio3_83 ETH_RESET */ 73 + #phy-cells = <0>; 72 74 }; 73 75 74 76 leds {
+1
arch/arm/boot/dts/omap5.dtsi
··· 940 940 compatible = "ti,ohci-omap3"; 941 941 reg = <0x4a064800 0x400>; 942 942 interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>; 943 + remote-wakeup-connected; 943 944 }; 944 945 945 946 usbhsehci: ehci@4a064c00 {
+5 -1
arch/arm/mach-omap2/cm_common.c
··· 68 68 int cm_split_idlest_reg(struct clk_omap_reg *idlest_reg, s16 *prcm_inst, 69 69 u8 *idlest_reg_id) 70 70 { 71 + int ret; 71 72 if (!cm_ll_data->split_idlest_reg) { 72 73 WARN_ONCE(1, "cm: %s: no low-level function defined\n", 73 74 __func__); 74 75 return -EINVAL; 75 76 } 76 77 77 - return cm_ll_data->split_idlest_reg(idlest_reg, prcm_inst, 78 + ret = cm_ll_data->split_idlest_reg(idlest_reg, prcm_inst, 78 79 idlest_reg_id); 80 + *prcm_inst -= cm_base.offset; 81 + return ret; 79 82 } 80 83 81 84 /** ··· 340 337 if (mem) { 341 338 mem->pa = res.start + data->offset; 342 339 mem->va = data->mem + data->offset; 340 + mem->offset = data->offset; 343 341 } 344 342 345 343 data->np = np;
+19
arch/arm/mach-omap2/omap-secure.c
··· 73 73 return omap_secure_memblock_base; 74 74 } 75 75 76 + u32 omap3_save_secure_ram(void __iomem *addr, int size) 77 + { 78 + u32 ret; 79 + u32 param[5]; 80 + 81 + if (size != OMAP3_SAVE_SECURE_RAM_SZ) 82 + return OMAP3_SAVE_SECURE_RAM_SZ; 83 + 84 + param[0] = 4; /* Number of arguments */ 85 + param[1] = __pa(addr); /* Physical address for saving */ 86 + param[2] = 0; 87 + param[3] = 1; 88 + param[4] = 1; 89 + 90 + ret = save_secure_ram_context(__pa(param)); 91 + 92 + return ret; 93 + } 94 + 76 95 /** 77 96 * rx51_secure_dispatcher: Routine to dispatch secure PPA API calls 78 97 * @idx: The PPA API index
+4
arch/arm/mach-omap2/omap-secure.h
··· 31 31 /* Maximum Secure memory storage size */ 32 32 #define OMAP_SECURE_RAM_STORAGE (88 * SZ_1K) 33 33 34 + #define OMAP3_SAVE_SECURE_RAM_SZ 0x803F 35 + 34 36 /* Secure low power HAL API index */ 35 37 #define OMAP4_HAL_SAVESECURERAM_INDEX 0x1a 36 38 #define OMAP4_HAL_SAVEHW_INDEX 0x1b ··· 67 65 extern u32 omap_smc3(u32 id, u32 process, u32 flag, u32 pargs); 68 66 extern phys_addr_t omap_secure_ram_mempool_base(void); 69 67 extern int omap_secure_ram_reserve_memblock(void); 68 + extern u32 save_secure_ram_context(u32 args_pa); 69 + extern u32 omap3_save_secure_ram(void __iomem *save_regs, int size); 70 70 71 71 extern u32 rx51_secure_dispatcher(u32 idx, u32 process, u32 flag, u32 nargs, 72 72 u32 arg1, u32 arg2, u32 arg3, u32 arg4);
+5 -5
arch/arm/mach-omap2/omap_device.c
··· 391 391 const char *name; 392 392 int error, irq = 0; 393 393 394 - if (!oh || !oh->od || !oh->od->pdev) { 395 - error = -EINVAL; 396 - goto error; 397 - } 394 + if (!oh || !oh->od || !oh->od->pdev) 395 + return -EINVAL; 398 396 399 397 np = oh->od->pdev->dev.of_node; 400 398 if (!np) { ··· 514 516 goto odbs_exit1; 515 517 516 518 od = omap_device_alloc(pdev, &oh, 1); 517 - if (IS_ERR(od)) 519 + if (IS_ERR(od)) { 520 + ret = PTR_ERR(od); 518 521 goto odbs_exit1; 522 + } 519 523 520 524 ret = platform_device_add_data(pdev, pdata, pdata_len); 521 525 if (ret)
+1
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
··· 1646 1646 .main_clk = "mmchs3_fck", 1647 1647 .prcm = { 1648 1648 .omap2 = { 1649 + .module_offs = CORE_MOD, 1649 1650 .prcm_reg_id = 1, 1650 1651 .module_bit = OMAP3430_EN_MMC3_SHIFT, 1651 1652 .idlest_reg_id = 1,
-4
arch/arm/mach-omap2/pm.h
··· 81 81 /* ... and its pointer from SRAM after copy */ 82 82 extern void (*omap3_do_wfi_sram)(void); 83 83 84 - /* save_secure_ram_context function pointer and size, for copy to SRAM */ 85 - extern int save_secure_ram_context(u32 *addr); 86 - extern unsigned int save_secure_ram_context_sz; 87 - 88 84 extern void omap3_save_scratchpad_contents(void); 89 85 90 86 #define PM_RTA_ERRATUM_i608 (1 << 0)
+4 -9
arch/arm/mach-omap2/pm34xx.c
··· 48 48 #include "prm3xxx.h" 49 49 #include "pm.h" 50 50 #include "sdrc.h" 51 + #include "omap-secure.h" 51 52 #include "sram.h" 52 53 #include "control.h" 53 54 #include "vc.h" ··· 67 66 68 67 static LIST_HEAD(pwrst_list); 69 68 70 - static int (*_omap_save_secure_sram)(u32 *addr); 71 69 void (*omap3_do_wfi_sram)(void); 72 70 73 71 static struct powerdomain *mpu_pwrdm, *neon_pwrdm; ··· 121 121 * will hang the system. 122 122 */ 123 123 pwrdm_set_next_pwrst(mpu_pwrdm, PWRDM_POWER_ON); 124 - ret = _omap_save_secure_sram((u32 *)(unsigned long) 125 - __pa(omap3_secure_ram_storage)); 124 + ret = omap3_save_secure_ram(omap3_secure_ram_storage, 125 + OMAP3_SAVE_SECURE_RAM_SZ); 126 126 pwrdm_set_next_pwrst(mpu_pwrdm, mpu_next_state); 127 127 /* Following is for error tracking, it should not happen */ 128 128 if (ret) { ··· 434 434 * 435 435 * The minimum set of functions is pushed to SRAM for execution: 436 436 * - omap3_do_wfi for erratum i581 WA, 437 - * - save_secure_ram_context for security extensions. 438 437 */ 439 438 void omap_push_sram_idle(void) 440 439 { 441 440 omap3_do_wfi_sram = omap_sram_push(omap3_do_wfi, omap3_do_wfi_sz); 442 - 443 - if (omap_type() != OMAP2_DEVICE_TYPE_GP) 444 - _omap_save_secure_sram = omap_sram_push(save_secure_ram_context, 445 - save_secure_ram_context_sz); 446 441 } 447 442 448 443 static void __init pm_errata_configure(void) ··· 548 553 clkdm_add_wkdep(neon_clkdm, mpu_clkdm); 549 554 if (omap_type() != OMAP2_DEVICE_TYPE_GP) { 550 555 omap3_secure_ram_storage = 551 - kmalloc(0x803F, GFP_KERNEL); 556 + kmalloc(OMAP3_SAVE_SECURE_RAM_SZ, GFP_KERNEL); 552 557 if (!omap3_secure_ram_storage) 553 558 pr_err("Memory allocation failed when allocating for secure sram context\n"); 554 559
+1
arch/arm/mach-omap2/prcm-common.h
··· 528 528 struct omap_domain_base { 529 529 u32 pa; 530 530 void __iomem *va; 531 + s16 offset; 531 532 }; 532 533 533 534 /**
-12
arch/arm/mach-omap2/prm33xx.c
··· 176 176 return v; 177 177 } 178 178 179 - static int am33xx_pwrdm_read_prev_pwrst(struct powerdomain *pwrdm) 180 - { 181 - u32 v; 182 - 183 - v = am33xx_prm_read_reg(pwrdm->prcm_offs, pwrdm->pwrstst_offs); 184 - v &= AM33XX_LASTPOWERSTATEENTERED_MASK; 185 - v >>= AM33XX_LASTPOWERSTATEENTERED_SHIFT; 186 - 187 - return v; 188 - } 189 - 190 179 static int am33xx_pwrdm_set_lowpwrstchange(struct powerdomain *pwrdm) 191 180 { 192 181 am33xx_prm_rmw_reg_bits(AM33XX_LOWPOWERSTATECHANGE_MASK, ··· 346 357 .pwrdm_set_next_pwrst = am33xx_pwrdm_set_next_pwrst, 347 358 .pwrdm_read_next_pwrst = am33xx_pwrdm_read_next_pwrst, 348 359 .pwrdm_read_pwrst = am33xx_pwrdm_read_pwrst, 349 - .pwrdm_read_prev_pwrst = am33xx_pwrdm_read_prev_pwrst, 350 360 .pwrdm_set_logic_retst = am33xx_pwrdm_set_logic_retst, 351 361 .pwrdm_read_logic_pwrst = am33xx_pwrdm_read_logic_pwrst, 352 362 .pwrdm_read_logic_retst = am33xx_pwrdm_read_logic_retst,
+4 -22
arch/arm/mach-omap2/sleep34xx.S
··· 93 93 ENDPROC(enable_omap3630_toggle_l2_on_restore) 94 94 95 95 /* 96 - * Function to call rom code to save secure ram context. This gets 97 - * relocated to SRAM, so it can be all in .data section. Otherwise 98 - * we need to initialize api_params separately. 96 + * Function to call rom code to save secure ram context. 97 + * 98 + * r0 = physical address of the parameters 99 99 */ 100 - .data 101 - .align 3 102 100 ENTRY(save_secure_ram_context) 103 101 stmfd sp!, {r4 - r11, lr} @ save registers on stack 104 - adr r3, api_params @ r3 points to parameters 105 - str r0, [r3,#0x4] @ r0 has sdram address 106 - ldr r12, high_mask 107 - and r3, r3, r12 108 - ldr r12, sram_phy_addr_mask 109 - orr r3, r3, r12 102 + mov r3, r0 @ physical address of parameters 110 103 mov r0, #25 @ set service ID for PPA 111 104 mov r12, r0 @ copy secure service ID in r12 112 105 mov r1, #0 @ set task id for ROM code in r1 ··· 113 120 nop 114 121 nop 115 122 ldmfd sp!, {r4 - r11, pc} 116 - .align 117 - sram_phy_addr_mask: 118 - .word SRAM_BASE_P 119 - high_mask: 120 - .word 0xffff 121 - api_params: 122 - .word 0x4, 0x0, 0x0, 0x1, 0x1 123 123 ENDPROC(save_secure_ram_context) 124 - ENTRY(save_secure_ram_context_sz) 125 - .word . - save_secure_ram_context 126 - 127 - .text 128 124 129 125 /* 130 126 * ======================