Skip to content

Commit

Permalink
Merge tag 'omap-for-v4.15/fixes-v2-signed' of git://git.kernel.org/pu…
Browse files Browse the repository at this point in the history
…b/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>
  • Loading branch information
Olof Johansson committed Dec 4, 2017
2 parents 8d810a4 + 7cd4a5e commit 0d55f2a
Show file tree
Hide file tree
Showing 37 changed files with 90 additions and 66 deletions.
2 changes: 2 additions & 0 deletions Documentation/devicetree/bindings/usb/am33xx-usb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ usb: usb@47400000 {
reg = <0x47401300 0x100>;
reg-names = "phy";
ti,ctrl_mod = <&ctrl_mod>;
#phy-cells = <0>;
};

usb0: usb@47401000 {
Expand Down Expand Up @@ -141,6 +142,7 @@ usb: usb@47400000 {
reg = <0x47401b00 0x100>;
reg-names = "phy";
ti,ctrl_mod = <&ctrl_mod>;
#phy-cells = <0>;
};

usb1: usb@47401800 {
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/boot/dts/am33xx.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,7 @@
reg-names = "phy";
status = "disabled";
ti,ctrl_mod = <&usb_ctrl_mod>;
#phy-cells = <0>;
};

usb0: usb@47401000 {
Expand Down Expand Up @@ -678,6 +679,7 @@
reg-names = "phy";
status = "disabled";
ti,ctrl_mod = <&usb_ctrl_mod>;
#phy-cells = <0>;
};

usb1: usb@47401800 {
Expand Down
6 changes: 4 additions & 2 deletions arch/arm/boot/dts/am4372.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,8 @@
reg = <0x48038000 0x2000>,
<0x46000000 0x400000>;
reg-names = "mpu", "dat";
interrupts = <80>, <81>;
interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "tx", "rx";
status = "disabled";
dmas = <&edma 8 2>,
Expand All @@ -941,7 +942,8 @@
reg = <0x4803C000 0x2000>,
<0x46400000 0x400000>;
reg-names = "mpu", "dat";
interrupts = <82>, <83>;
interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "tx", "rx";
status = "disabled";
dmas = <&edma 10 2>,
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/boot/dts/am437x-cm-t43.dts
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,8 @@
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&spi0_pins>;
dmas = <&edma 16
&edma 17>;
dmas = <&edma 16 0
&edma 17 0>;
dma-names = "tx0", "rx0";

flash: w25q64cvzpig@0 {
Expand Down
1 change: 1 addition & 0 deletions arch/arm/boot/dts/dm814x.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
reg = <0x47401300 0x100>;
reg-names = "phy";
ti,ctrl_mod = <&usb_ctrl_mod>;
#phy-cells = <0>;
};

usb0: usb@47401000 {
Expand Down
3 changes: 2 additions & 1 deletion arch/arm/boot/dts/logicpd-som-lv-37xx-devkit.dts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@
};

&gpmc {
ranges = <1 0 0x08000000 0x1000000>; /* CS1: 16MB for LAN9221 */
ranges = <0 0 0x30000000 0x1000000 /* CS0: 16MB for NAND */
1 0 0x2c000000 0x1000000>; /* CS1: 16MB for LAN9221 */

ethernet@gpmc {
pinctrl-names = "default";
Expand Down
17 changes: 11 additions & 6 deletions arch/arm/boot/dts/logicpd-som-lv.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@
hsusb2_phy: hsusb2_phy {
compatible = "usb-nop-xceiv";
reset-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>; /* gpio_4 */
#phy-cells = <0>;
};
};

&gpmc {
ranges = <0 0 0x00000000 0x1000000>; /* CS0: 16MB for NAND */
ranges = <0 0 0x30000000 0x1000000>; /* CS0: 16MB for NAND */

nand@0,0 {
compatible = "ti,omap2-nand";
Expand Down Expand Up @@ -121,7 +122,7 @@

&mmc3 {
interrupts-extended = <&intc 94 &omap3_pmx_core2 0x46>;
pinctrl-0 = <&mmc3_pins>;
pinctrl-0 = <&mmc3_pins &wl127x_gpio>;
pinctrl-names = "default";
vmmc-supply = <&wl12xx_vmmc>;
non-removable;
Expand All @@ -132,8 +133,8 @@
wlcore: wlcore@2 {
compatible = "ti,wl1273";
reg = <2>;
interrupt-parent = <&gpio5>;
interrupts = <24 IRQ_TYPE_LEVEL_HIGH>; /* gpio 152 */
interrupt-parent = <&gpio1>;
interrupts = <2 IRQ_TYPE_LEVEL_HIGH>; /* gpio 2 */
ref-clock-frequency = <26000000>;
};
};
Expand All @@ -157,8 +158,6 @@
OMAP3_CORE1_IOPAD(0x2166, PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc2_dat5.sdmmc3_dat1 */
OMAP3_CORE1_IOPAD(0x2168, PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc2_dat6.sdmmc3_dat2 */
OMAP3_CORE1_IOPAD(0x216a, PIN_INPUT_PULLUP | MUX_MODE3) /* sdmmc2_dat6.sdmmc3_dat3 */
OMAP3_CORE1_IOPAD(0x2184, PIN_INPUT_PULLUP | MUX_MODE4) /* mcbsp4_clkx.gpio_152 */
OMAP3_CORE1_IOPAD(0x2a0c, PIN_OUTPUT | MUX_MODE4) /* sys_boot1.gpio_3 */
OMAP3_CORE1_IOPAD(0x21d0, PIN_INPUT_PULLUP | MUX_MODE3) /* mcspi1_cs1.sdmmc3_cmd */
OMAP3_CORE1_IOPAD(0x21d2, PIN_INPUT_PULLUP | MUX_MODE3) /* mcspi1_cs2.sdmmc_clk */
>;
Expand Down Expand Up @@ -228,6 +227,12 @@
OMAP3_WKUP_IOPAD(0x2a0e, PIN_OUTPUT | MUX_MODE4) /* sys_boot2.gpio_4 */
>;
};
wl127x_gpio: pinmux_wl127x_gpio_pin {
pinctrl-single,pins = <
OMAP3_WKUP_IOPAD(0x2a0c, PIN_INPUT | MUX_MODE4) /* sys_boot0.gpio_2 */
OMAP3_WKUP_IOPAD(0x2a0c, PIN_OUTPUT | MUX_MODE4) /* sys_boot1.gpio_3 */
>;
};
};

&omap3_pmx_core2 {
Expand Down
1 change: 1 addition & 0 deletions arch/arm/boot/dts/omap3-beagle-xm.dts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
compatible = "usb-nop-xceiv";
reset-gpios = <&gpio5 19 GPIO_ACTIVE_LOW>; /* gpio_147 */
vcc-supply = <&hsusb2_power>;
#phy-cells = <0>;
};

tfp410: encoder0 {
Expand Down
1 change: 1 addition & 0 deletions arch/arm/boot/dts/omap3-beagle.dts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
compatible = "usb-nop-xceiv";
reset-gpios = <&gpio5 19 GPIO_ACTIVE_LOW>; /* gpio_147 */
vcc-supply = <&hsusb2_power>;
#phy-cells = <0>;
};

sound {
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/boot/dts/omap3-cm-t3x.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,14 @@
hsusb1_phy: hsusb1_phy {
compatible = "usb-nop-xceiv";
vcc-supply = <&hsusb1_power>;
#phy-cells = <0>;
};

/* HS USB Host PHY on PORT 2 */
hsusb2_phy: hsusb2_phy {
compatible = "usb-nop-xceiv";
vcc-supply = <&hsusb2_power>;
#phy-cells = <0>;
};

ads7846reg: ads7846-reg {
Expand Down
1 change: 1 addition & 0 deletions arch/arm/boot/dts/omap3-evm-common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
compatible = "usb-nop-xceiv";
reset-gpios = <&gpio1 21 GPIO_ACTIVE_LOW>; /* gpio_21 */
vcc-supply = <&hsusb2_power>;
#phy-cells = <0>;
};

leds {
Expand Down
1 change: 1 addition & 0 deletions arch/arm/boot/dts/omap3-gta04.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
hsusb2_phy: hsusb2_phy {
compatible = "usb-nop-xceiv";
reset-gpios = <&gpio6 14 GPIO_ACTIVE_LOW>;
#phy-cells = <0>;
};

tv0: connector {
Expand Down
1 change: 1 addition & 0 deletions arch/arm/boot/dts/omap3-igep0020-common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
compatible = "usb-nop-xceiv";
reset-gpios = <&gpio1 24 GPIO_ACTIVE_LOW>; /* gpio_24 */
vcc-supply = <&hsusb1_power>;
#phy-cells = <0>;
};

tfp410: encoder {
Expand Down
1 change: 1 addition & 0 deletions arch/arm/boot/dts/omap3-igep0030-common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
hsusb2_phy: hsusb2_phy {
compatible = "usb-nop-xceiv";
reset-gpios = <&gpio2 22 GPIO_ACTIVE_LOW>; /* gpio_54 */
#phy-cells = <0>;
};
};

Expand Down
1 change: 1 addition & 0 deletions arch/arm/boot/dts/omap3-lilly-a83x.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
hsusb1_phy: hsusb1_phy {
compatible = "usb-nop-xceiv";
vcc-supply = <&reg_vcc3>;
#phy-cells = <0>;
};
};

Expand Down
1 change: 1 addition & 0 deletions arch/arm/boot/dts/omap3-overo-base.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
compatible = "usb-nop-xceiv";
reset-gpios = <&gpio6 23 GPIO_ACTIVE_LOW>; /* gpio_183 */
vcc-supply = <&hsusb2_power>;
#phy-cells = <0>;
};

/* Regulator to trigger the nPoweron signal of the Wifi module */
Expand Down
1 change: 1 addition & 0 deletions arch/arm/boot/dts/omap3-pandora-common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@
compatible = "usb-nop-xceiv";
reset-gpios = <&gpio1 16 GPIO_ACTIVE_LOW>; /* GPIO_16 */
vcc-supply = <&vaux2>;
#phy-cells = <0>;
};

/* HS USB Host VBUS supply
Expand Down
1 change: 1 addition & 0 deletions arch/arm/boot/dts/omap3-tao3530.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
compatible = "usb-nop-xceiv";
reset-gpios = <&gpio6 2 GPIO_ACTIVE_LOW>; /* gpio_162 */
vcc-supply = <&hsusb2_power>;
#phy-cells = <0>;
};

sound {
Expand Down
1 change: 1 addition & 0 deletions arch/arm/boot/dts/omap3.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,7 @@
compatible = "ti,ohci-omap3";
reg = <0x48064400 0x400>;
interrupts = <76>;
remote-wakeup-connected;
};

usbhsehci: ehci@48064800 {
Expand Down
1 change: 1 addition & 0 deletions arch/arm/boot/dts/omap4-droid4-xt894.dts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
/* HS USB Host PHY on PORT 1 */
hsusb1_phy: hsusb1_phy {
compatible = "usb-nop-xceiv";
#phy-cells = <0>;
};

/* LCD regulator from sw5 source */
Expand Down
1 change: 1 addition & 0 deletions arch/arm/boot/dts/omap4-duovero.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
hsusb1_phy: hsusb1_phy {
compatible = "usb-nop-xceiv";
reset-gpios = <&gpio2 30 GPIO_ACTIVE_LOW>; /* gpio_62 */
#phy-cells = <0>;

pinctrl-names = "default";
pinctrl-0 = <&hsusb1phy_pins>;
Expand Down
1 change: 1 addition & 0 deletions arch/arm/boot/dts/omap4-panda-common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
hsusb1_phy: hsusb1_phy {
compatible = "usb-nop-xceiv";
reset-gpios = <&gpio2 30 GPIO_ACTIVE_LOW>; /* gpio_62 */
#phy-cells = <0>;
vcc-supply = <&hsusb1_power>;
clocks = <&auxclk3_ck>;
clock-names = "main_clk";
Expand Down
1 change: 1 addition & 0 deletions arch/arm/boot/dts/omap4-var-som-om44.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@

reset-gpios = <&gpio6 17 GPIO_ACTIVE_LOW>; /* gpio 177 */
vcc-supply = <&vbat>;
#phy-cells = <0>;

clocks = <&auxclk3_ck>;
clock-names = "main_clk";
Expand Down
3 changes: 1 addition & 2 deletions arch/arm/boot/dts/omap4.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -1081,14 +1081,13 @@
usbhsohci: ohci@4a064800 {
compatible = "ti,ohci-omap3";
reg = <0x4a064800 0x400>;
interrupt-parent = <&gic>;
interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
remote-wakeup-connected;
};

usbhsehci: ehci@4a064c00 {
compatible = "ti,ehci-omap";
reg = <0x4a064c00 0x400>;
interrupt-parent = <&gic>;
interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
};
};
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/boot/dts/omap5-board-common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,14 @@
clocks = <&auxclk1_ck>;
clock-names = "main_clk";
clock-frequency = <19200000>;
#phy-cells = <0>;
};

/* HS USB Host PHY on PORT 3 */
hsusb3_phy: hsusb3_phy {
compatible = "usb-nop-xceiv";
reset-gpios = <&gpio3 15 GPIO_ACTIVE_LOW>; /* gpio3_79 ETH_NRESET */
#phy-cells = <0>;
};

tpd12s015: encoder {
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/boot/dts/omap5-cm-t54.dts
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,14 @@
hsusb2_phy: hsusb2_phy {
compatible = "usb-nop-xceiv";
reset-gpios = <&gpio3 12 GPIO_ACTIVE_LOW>; /* gpio3_76 HUB_RESET */
#phy-cells = <0>;
};

/* HS USB Host PHY on PORT 3 */
hsusb3_phy: hsusb3_phy {
compatible = "usb-nop-xceiv";
reset-gpios = <&gpio3 19 GPIO_ACTIVE_LOW>; /* gpio3_83 ETH_RESET */
#phy-cells = <0>;
};

leds {
Expand Down
1 change: 1 addition & 0 deletions arch/arm/boot/dts/omap5.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -940,6 +940,7 @@
compatible = "ti,ohci-omap3";
reg = <0x4a064800 0x400>;
interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
remote-wakeup-connected;
};

usbhsehci: ehci@4a064c00 {
Expand Down
6 changes: 5 additions & 1 deletion arch/arm/mach-omap2/cm_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,17 @@ void __init omap2_set_globals_cm(void __iomem *cm, void __iomem *cm2)
int cm_split_idlest_reg(struct clk_omap_reg *idlest_reg, s16 *prcm_inst,
u8 *idlest_reg_id)
{
int ret;
if (!cm_ll_data->split_idlest_reg) {
WARN_ONCE(1, "cm: %s: no low-level function defined\n",
__func__);
return -EINVAL;
}

return cm_ll_data->split_idlest_reg(idlest_reg, prcm_inst,
ret = cm_ll_data->split_idlest_reg(idlest_reg, prcm_inst,
idlest_reg_id);
*prcm_inst -= cm_base.offset;
return ret;
}

/**
Expand Down Expand Up @@ -337,6 +340,7 @@ int __init omap2_cm_base_init(void)
if (mem) {
mem->pa = res.start + data->offset;
mem->va = data->mem + data->offset;
mem->offset = data->offset;
}

data->np = np;
Expand Down
19 changes: 19 additions & 0 deletions arch/arm/mach-omap2/omap-secure.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,25 @@ phys_addr_t omap_secure_ram_mempool_base(void)
return omap_secure_memblock_base;
}

u32 omap3_save_secure_ram(void __iomem *addr, int size)
{
u32 ret;
u32 param[5];

if (size != OMAP3_SAVE_SECURE_RAM_SZ)
return OMAP3_SAVE_SECURE_RAM_SZ;

param[0] = 4; /* Number of arguments */
param[1] = __pa(addr); /* Physical address for saving */
param[2] = 0;
param[3] = 1;
param[4] = 1;

ret = save_secure_ram_context(__pa(param));

return ret;
}

/**
* rx51_secure_dispatcher: Routine to dispatch secure PPA API calls
* @idx: The PPA API index
Expand Down
4 changes: 4 additions & 0 deletions arch/arm/mach-omap2/omap-secure.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
/* Maximum Secure memory storage size */
#define OMAP_SECURE_RAM_STORAGE (88 * SZ_1K)

#define OMAP3_SAVE_SECURE_RAM_SZ 0x803F

/* Secure low power HAL API index */
#define OMAP4_HAL_SAVESECURERAM_INDEX 0x1a
#define OMAP4_HAL_SAVEHW_INDEX 0x1b
Expand Down Expand Up @@ -65,6 +67,8 @@ extern u32 omap_smc2(u32 id, u32 falg, u32 pargs);
extern u32 omap_smc3(u32 id, u32 process, u32 flag, u32 pargs);
extern phys_addr_t omap_secure_ram_mempool_base(void);
extern int omap_secure_ram_reserve_memblock(void);
extern u32 save_secure_ram_context(u32 args_pa);
extern u32 omap3_save_secure_ram(void __iomem *save_regs, int size);

extern u32 rx51_secure_dispatcher(u32 idx, u32 process, u32 flag, u32 nargs,
u32 arg1, u32 arg2, u32 arg3, u32 arg4);
Expand Down
Loading

0 comments on commit 0d55f2a

Please sign in to comment.