Commit 7f7420f0 authored by Olof Johansson's avatar Olof Johansson

Merge tag 'omap-for-v4.5/fixes-rc1' of...

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

Fixes for omaps with the most intrusive stuff being read-only data
assembly fixes, the other things are mostly board related:

- A series of omap assembly code fixes to fix issues with rodata with
  ARM_KERNMEM_PERMS enabled. We had several places writing to rodata,
  which is bad. The fix in most cases is to load the value from data
  section using a pointer. Let's also enable ARM_KERNMEM_PERMS so
  DEBUG_RODATA gets selected by default. And while testing things,
  I also added few more loadable driver modules to the defconfig that
  I seem to need quite often.

- Fix a long standing omap5 RTC mystery and enable RTC where we need
  to ensure the SoC msecure pin is high so we can write to the RTC
  registers.

- Fix irq types for am437x

- A series of minor dts fixes for sbc-am57x and cl-som-am57x

- Fixes for torpedo dts to make WLAN behave and to remove a duplicate
  i2c rate entry

This series also includes few minor changes that are not stricly
fixes, but would be good to get in during the early -rc cycle:

- Remove legacy mailbox platform data that is no longer needed

- Add the pdata-quirks needed for the new pwm-omap-dmtimer so
  people can use it

- Enable ti,mbox-send-noirq that's needed by wkup_m3 driver

- Enable SPLIT and DWARF4 in omap2plus_defconfig as it makes the
  initramfs quite a bit smaller

* tag 'omap-for-v4.5/fixes-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (23 commits)
  ARM: dts: am57xx: sbc-am57x: correct Eth PHY settings
  ARM: dts: am57xx: cl-som-am57x: fix CPSW EMAC pinmux
  ARM: dts: am57xx: sbc-am57x: fix UART3 pinmux
  ARM: dts: am57xx: cl-som-am57x: update SPI Flash frequency
  ARM: dts: am57xx: cl-som-am57x: set HOST mode for USB2
  ARM: dts: am57xx: sbc-am57x: fix SB-SOM EEPROM I2C address
  ARM: dts: LogicPD Torpedo: Revert Duplicative Entries
  ARM: dts: am437x: pixcir_tangoc: use correct flags for irq types
  ARM: dts: am4372: fix irq type for arm twd and global timer
  ARM: dts: Fix wl12xx missing clocks that cause hangs
  ARM: OMAP: Add PWM dmtimer platform data quirks
  ARM: omap2plus_defconfig: Enable ARM_KERNMEM_PERMS and few loadable modules
  ARM: OMAP2+: Fix ppa_zero_params and ppa_por_params for rodata
  ARM: OMAP2+: Fix l2_inv_api_params for rodata
  ARM: OMAP2+: Fix save_secure_ram_context for rodata
  ARM: OMAP2+: Fix l2dis_3630 for rodata
  ARM: OMAP2+: Fix wait_dll_lock_timed for rodata
  ARM: OMAP2+: Remove legacy mailbox device instantiation
  ARM: dts: AM4372: Add ti,mbox-send-noirq to wkup_m3 mailbox
  ARM: dts: AM33xx: Add ti,mbox-send-noirq to wkup_m3 mailbox
  ...
Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
parents b83132f7 ab342c77
...@@ -439,6 +439,7 @@ mailbox: mailbox@480C8000 { ...@@ -439,6 +439,7 @@ mailbox: mailbox@480C8000 {
ti,mbox-num-users = <4>; ti,mbox-num-users = <4>;
ti,mbox-num-fifos = <8>; ti,mbox-num-fifos = <8>;
mbox_wkupm3: wkup_m3 { mbox_wkupm3: wkup_m3 {
ti,mbox-send-noirq;
ti,mbox-tx = <0 0 0>; ti,mbox-tx = <0 0 0>;
ti,mbox-rx = <0 0 3>; ti,mbox-rx = <0 0 3>;
}; };
......
...@@ -73,7 +73,7 @@ scu: scu@48240000 { ...@@ -73,7 +73,7 @@ scu: scu@48240000 {
global_timer: timer@48240200 { global_timer: timer@48240200 {
compatible = "arm,cortex-a9-global-timer"; compatible = "arm,cortex-a9-global-timer";
reg = <0x48240200 0x100>; reg = <0x48240200 0x100>;
interrupts = <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_PPI 11 IRQ_TYPE_EDGE_RISING>;
interrupt-parent = <&gic>; interrupt-parent = <&gic>;
clocks = <&mpu_periphclk>; clocks = <&mpu_periphclk>;
}; };
...@@ -81,7 +81,7 @@ global_timer: timer@48240200 { ...@@ -81,7 +81,7 @@ global_timer: timer@48240200 {
local_timer: timer@48240600 { local_timer: timer@48240600 {
compatible = "arm,cortex-a9-twd-timer"; compatible = "arm,cortex-a9-twd-timer";
reg = <0x48240600 0x100>; reg = <0x48240600 0x100>;
interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_PPI 13 IRQ_TYPE_EDGE_RISING>;
interrupt-parent = <&gic>; interrupt-parent = <&gic>;
clocks = <&mpu_periphclk>; clocks = <&mpu_periphclk>;
}; };
...@@ -290,6 +290,7 @@ mailbox: mailbox@480C8000 { ...@@ -290,6 +290,7 @@ mailbox: mailbox@480C8000 {
ti,mbox-num-users = <4>; ti,mbox-num-users = <4>;
ti,mbox-num-fifos = <8>; ti,mbox-num-fifos = <8>;
mbox_wkupm3: wkup_m3 { mbox_wkupm3: wkup_m3 {
ti,mbox-send-noirq;
ti,mbox-tx = <0 0 0>; ti,mbox-tx = <0 0 0>;
ti,mbox-rx = <0 0 3>; ti,mbox-rx = <0 0 3>;
}; };
......
...@@ -590,8 +590,6 @@ pixcir_ts@5c { ...@@ -590,8 +590,6 @@ pixcir_ts@5c {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&pixcir_ts_pins>; pinctrl-0 = <&pixcir_ts_pins>;
reg = <0x5c>; reg = <0x5c>;
interrupt-parent = <&gpio3>;
interrupts = <22 0>;
attb-gpio = <&gpio3 22 GPIO_ACTIVE_HIGH>; attb-gpio = <&gpio3 22 GPIO_ACTIVE_HIGH>;
...@@ -599,7 +597,7 @@ pixcir_ts@5c { ...@@ -599,7 +597,7 @@ pixcir_ts@5c {
* 0x264 represents the offset of padconf register of * 0x264 represents the offset of padconf register of
* gpio3_22 from am43xx_pinmux base. * gpio3_22 from am43xx_pinmux base.
*/ */
interrupts-extended = <&gpio3 22 IRQ_TYPE_NONE>, interrupts-extended = <&gpio3 22 IRQ_TYPE_EDGE_FALLING>,
<&am43xx_pinmux 0x264>; <&am43xx_pinmux 0x264>;
interrupt-names = "tsc", "wakeup"; interrupt-names = "tsc", "wakeup";
......
...@@ -491,7 +491,7 @@ pixcir_ts@5c { ...@@ -491,7 +491,7 @@ pixcir_ts@5c {
pinctrl-0 = <&pixcir_ts_pins>; pinctrl-0 = <&pixcir_ts_pins>;
reg = <0x5c>; reg = <0x5c>;
interrupt-parent = <&gpio1>; interrupt-parent = <&gpio1>;
interrupts = <17 0>; interrupts = <17 IRQ_TYPE_EDGE_FALLING>;
attb-gpio = <&gpio1 17 GPIO_ACTIVE_HIGH>; attb-gpio = <&gpio1 17 GPIO_ACTIVE_HIGH>;
......
...@@ -167,7 +167,7 @@ DRA7XX_CORE_IOPAD(0x35b4, PIN_INPUT_PULLDOWN | MUX_MODE3) /* vin2a_d19.rgmii1_rc ...@@ -167,7 +167,7 @@ DRA7XX_CORE_IOPAD(0x35b4, PIN_INPUT_PULLDOWN | MUX_MODE3) /* vin2a_d19.rgmii1_rc
DRA7XX_CORE_IOPAD(0x35b8, PIN_INPUT_PULLDOWN | MUX_MODE3) /* vin2a_d20.rgmii1_rd3 */ DRA7XX_CORE_IOPAD(0x35b8, PIN_INPUT_PULLDOWN | MUX_MODE3) /* vin2a_d20.rgmii1_rd3 */
DRA7XX_CORE_IOPAD(0x35bc, PIN_INPUT_PULLDOWN | MUX_MODE3) /* vin2a_d21.rgmii1_rd2 */ DRA7XX_CORE_IOPAD(0x35bc, PIN_INPUT_PULLDOWN | MUX_MODE3) /* vin2a_d21.rgmii1_rd2 */
DRA7XX_CORE_IOPAD(0x35c0, PIN_INPUT_PULLDOWN | MUX_MODE3) /* vin2a_d22.rgmii1_rd1 */ DRA7XX_CORE_IOPAD(0x35c0, PIN_INPUT_PULLDOWN | MUX_MODE3) /* vin2a_d22.rgmii1_rd1 */
DRA7XX_CORE_IOPAD(0x35c4, PIN_INPUT_PULLUP | MUX_MODE3) /* vin2a_d23.rgmii1_rd0 */ DRA7XX_CORE_IOPAD(0x35c4, PIN_INPUT_PULLDOWN | MUX_MODE3) /* vin2a_d23.rgmii1_rd0 */
>; >;
}; };
...@@ -492,14 +492,14 @@ &qspi { ...@@ -492,14 +492,14 @@ &qspi {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&qspi1_pins>; pinctrl-0 = <&qspi1_pins>;
spi-max-frequency = <20000000>; spi-max-frequency = <48000000>;
spi_flash: spi_flash@0 { spi_flash: spi_flash@0 {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
compatible = "spansion,m25p80", "jedec,spi-nor"; compatible = "spansion,m25p80", "jedec,spi-nor";
reg = <0>; /* CS0 */ reg = <0>; /* CS0 */
spi-max-frequency = <20000000>; spi-max-frequency = <48000000>;
partition@0 { partition@0 {
label = "uboot"; label = "uboot";
...@@ -559,13 +559,13 @@ &mac { ...@@ -559,13 +559,13 @@ &mac {
&cpsw_emac0 { &cpsw_emac0 {
phy_id = <&davinci_mdio>, <0>; phy_id = <&davinci_mdio>, <0>;
phy-mode = "rgmii"; phy-mode = "rgmii-txid";
dual_emac_res_vlan = <0>; dual_emac_res_vlan = <0>;
}; };
&cpsw_emac1 { &cpsw_emac1 {
phy_id = <&davinci_mdio>, <1>; phy_id = <&davinci_mdio>, <1>;
phy-mode = "rgmii"; phy-mode = "rgmii-txid";
dual_emac_res_vlan = <1>; dual_emac_res_vlan = <1>;
}; };
...@@ -588,7 +588,7 @@ &usb1 { ...@@ -588,7 +588,7 @@ &usb1 {
}; };
&usb2 { &usb2 {
dr_mode = "peripheral"; dr_mode = "host";
}; };
&mcasp3 { &mcasp3 {
......
...@@ -25,8 +25,8 @@ aliases { ...@@ -25,8 +25,8 @@ aliases {
&dra7_pmx_core { &dra7_pmx_core {
uart3_pins_default: uart3_pins_default { uart3_pins_default: uart3_pins_default {
pinctrl-single,pins = < pinctrl-single,pins = <
DRA7XX_CORE_IOPAD(0x37f8, PIN_INPUT_SLEW | MUX_MODE2) /* uart2_ctsn.uart3_rxd */ DRA7XX_CORE_IOPAD(0x3648, PIN_INPUT_SLEW | MUX_MODE0) /* uart3_rxd */
DRA7XX_CORE_IOPAD(0x37fc, PIN_INPUT_SLEW | MUX_MODE1) /* uart2_rtsn.uart3_txd */ DRA7XX_CORE_IOPAD(0x364c, PIN_INPUT_SLEW | MUX_MODE0) /* uart3_txd */
>; >;
}; };
...@@ -108,9 +108,9 @@ &i2c5 { ...@@ -108,9 +108,9 @@ &i2c5 {
pinctrl-0 = <&i2c5_pins_default>; pinctrl-0 = <&i2c5_pins_default>;
clock-frequency = <400000>; clock-frequency = <400000>;
eeprom_base: atmel@50 { eeprom_base: atmel@54 {
compatible = "atmel,24c08"; compatible = "atmel,24c08";
reg = <0x50>; reg = <0x54>;
pagesize = <16>; pagesize = <16>;
}; };
......
...@@ -112,14 +112,6 @@ &i2c3 { ...@@ -112,14 +112,6 @@ &i2c3 {
clock-frequency = <400000>; clock-frequency = <400000>;
}; };
&i2c2 {
clock-frequency = <400000>;
};
&i2c3 {
clock-frequency = <400000>;
};
/* /*
* Only found on the wireless SOM. For the SOM without wireless, the pins for * Only found on the wireless SOM. For the SOM without wireless, the pins for
* MMC3 can be routed with jumpers to the second MMC slot on the devkit and * MMC3 can be routed with jumpers to the second MMC slot on the devkit and
...@@ -143,6 +135,7 @@ wlcore: wlcore@2 { ...@@ -143,6 +135,7 @@ wlcore: wlcore@2 {
interrupt-parent = <&gpio5>; interrupt-parent = <&gpio5>;
interrupts = <24 IRQ_TYPE_LEVEL_HIGH>; /* gpio 152 */ interrupts = <24 IRQ_TYPE_LEVEL_HIGH>; /* gpio 152 */
ref-clock-frequency = <26000000>; ref-clock-frequency = <26000000>;
tcxo-clock-frequency = <26000000>;
}; };
}; };
......
...@@ -130,6 +130,16 @@ sound: sound { ...@@ -130,6 +130,16 @@ sound: sound {
}; };
}; };
&gpio8 {
/* TI trees use GPIO instead of msecure, see also muxing */
p234 {
gpio-hog;
gpios = <10 GPIO_ACTIVE_HIGH>;
output-high;
line-name = "gpio8_234/msecure";
};
};
&omap5_pmx_core { &omap5_pmx_core {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = < pinctrl-0 = <
...@@ -213,6 +223,13 @@ OMAP5_IOPAD(0x1bc, PIN_OUTPUT | MUX_MODE6) /* mcspi1_clk.gpio5_140 */ ...@@ -213,6 +223,13 @@ OMAP5_IOPAD(0x1bc, PIN_OUTPUT | MUX_MODE6) /* mcspi1_clk.gpio5_140 */
>; >;
}; };
/* TI trees use GPIO mode; msecure mode does not work reliably? */
palmas_msecure_pins: palmas_msecure_pins {
pinctrl-single,pins = <
OMAP5_IOPAD(0x180, PIN_OUTPUT | MUX_MODE6) /* gpio8_234 */
>;
};
usbhost_pins: pinmux_usbhost_pins { usbhost_pins: pinmux_usbhost_pins {
pinctrl-single,pins = < pinctrl-single,pins = <
OMAP5_IOPAD(0x0c4, PIN_INPUT | MUX_MODE0) /* usbb2_hsic_strobe */ OMAP5_IOPAD(0x0c4, PIN_INPUT | MUX_MODE0) /* usbb2_hsic_strobe */
...@@ -278,6 +295,12 @@ &omap5_pmx_wkup { ...@@ -278,6 +295,12 @@ &omap5_pmx_wkup {
&usbhost_wkup_pins &usbhost_wkup_pins
>; >;
palmas_sys_nirq_pins: pinmux_palmas_sys_nirq_pins {
pinctrl-single,pins = <
OMAP5_IOPAD(0x068, PIN_INPUT_PULLUP | MUX_MODE0) /* sys_nirq1 */
>;
};
usbhost_wkup_pins: pinmux_usbhost_wkup_pins { usbhost_wkup_pins: pinmux_usbhost_wkup_pins {
pinctrl-single,pins = < pinctrl-single,pins = <
OMAP5_IOPAD(0x05a, PIN_OUTPUT | MUX_MODE0) /* fref_clk1_out, USB hub clk */ OMAP5_IOPAD(0x05a, PIN_OUTPUT | MUX_MODE0) /* fref_clk1_out, USB hub clk */
...@@ -345,6 +368,8 @@ palmas: palmas@48 { ...@@ -345,6 +368,8 @@ palmas: palmas@48 {
interrupt-controller; interrupt-controller;
#interrupt-cells = <2>; #interrupt-cells = <2>;
ti,system-power-controller; ti,system-power-controller;
pinctrl-names = "default";
pinctrl-0 = <&palmas_sys_nirq_pins &palmas_msecure_pins>;
extcon_usb3: palmas_usb { extcon_usb3: palmas_usb {
compatible = "ti,palmas-usb-vid"; compatible = "ti,palmas-usb-vid";
...@@ -358,6 +383,14 @@ clk32kgaudio: palmas_clk32k@1 { ...@@ -358,6 +383,14 @@ clk32kgaudio: palmas_clk32k@1 {
#clock-cells = <0>; #clock-cells = <0>;
}; };
rtc {
compatible = "ti,palmas-rtc";
interrupt-parent = <&palmas>;
interrupts = <8 IRQ_TYPE_NONE>;
ti,backup-battery-chargeable;
ti,backup-battery-charge-high-current;
};
palmas_pmic { palmas_pmic {
compatible = "ti,palmas-pmic"; compatible = "ti,palmas-pmic";
interrupt-parent = <&palmas>; interrupt-parent = <&palmas>;
......
...@@ -50,6 +50,7 @@ CONFIG_SOC_AM33XX=y ...@@ -50,6 +50,7 @@ CONFIG_SOC_AM33XX=y
CONFIG_SOC_AM43XX=y CONFIG_SOC_AM43XX=y
CONFIG_SOC_DRA7XX=y CONFIG_SOC_DRA7XX=y
CONFIG_ARM_THUMBEE=y CONFIG_ARM_THUMBEE=y
CONFIG_ARM_KERNMEM_PERMS=y
CONFIG_ARM_ERRATA_411920=y CONFIG_ARM_ERRATA_411920=y
CONFIG_ARM_ERRATA_430973=y CONFIG_ARM_ERRATA_430973=y
CONFIG_SMP=y CONFIG_SMP=y
...@@ -177,6 +178,7 @@ CONFIG_TI_CPTS=y ...@@ -177,6 +178,7 @@ CONFIG_TI_CPTS=y
CONFIG_AT803X_PHY=y CONFIG_AT803X_PHY=y
CONFIG_SMSC_PHY=y CONFIG_SMSC_PHY=y
CONFIG_USB_USBNET=m CONFIG_USB_USBNET=m
CONFIG_USB_NET_SMSC75XX=m
CONFIG_USB_NET_SMSC95XX=m CONFIG_USB_NET_SMSC95XX=m
CONFIG_USB_ALI_M5632=y CONFIG_USB_ALI_M5632=y
CONFIG_USB_AN2720=y CONFIG_USB_AN2720=y
...@@ -354,6 +356,11 @@ CONFIG_USB_MUSB_DSPS=m ...@@ -354,6 +356,11 @@ CONFIG_USB_MUSB_DSPS=m
CONFIG_USB_INVENTRA_DMA=y CONFIG_USB_INVENTRA_DMA=y
CONFIG_USB_TI_CPPI41_DMA=y CONFIG_USB_TI_CPPI41_DMA=y
CONFIG_USB_DWC3=m CONFIG_USB_DWC3=m
CONFIG_USB_SERIAL=m
CONFIG_USB_SERIAL_GENERIC=y
CONFIG_USB_SERIAL_SIMPLE=m
CONFIG_USB_SERIAL_FTDI_SIO=m
CONFIG_USB_SERIAL_PL2303=m
CONFIG_USB_TEST=m CONFIG_USB_TEST=m
CONFIG_AM335X_PHY_USB=y CONFIG_AM335X_PHY_USB=y
CONFIG_USB_GADGET=m CONFIG_USB_GADGET=m
...@@ -387,6 +394,7 @@ CONFIG_NEW_LEDS=y ...@@ -387,6 +394,7 @@ CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=m CONFIG_LEDS_CLASS=m
CONFIG_LEDS_GPIO=m CONFIG_LEDS_GPIO=m
CONFIG_LEDS_PWM=m CONFIG_LEDS_PWM=m
CONFIG_LEDS_PCA963X=m
CONFIG_LEDS_TRIGGERS=y CONFIG_LEDS_TRIGGERS=y
CONFIG_LEDS_TRIGGER_TIMER=m CONFIG_LEDS_TRIGGER_TIMER=m
CONFIG_LEDS_TRIGGER_ONESHOT=m CONFIG_LEDS_TRIGGER_ONESHOT=m
...@@ -449,6 +457,8 @@ CONFIG_NLS_CODEPAGE_437=y ...@@ -449,6 +457,8 @@ CONFIG_NLS_CODEPAGE_437=y
CONFIG_NLS_ISO8859_1=y CONFIG_NLS_ISO8859_1=y
CONFIG_PRINTK_TIME=y CONFIG_PRINTK_TIME=y
CONFIG_DEBUG_INFO=y CONFIG_DEBUG_INFO=y
CONFIG_DEBUG_INFO_SPLIT=y
CONFIG_DEBUG_INFO_DWARF4=y
CONFIG_MAGIC_SYSRQ=y CONFIG_MAGIC_SYSRQ=y
CONFIG_SCHEDSTATS=y CONFIG_SCHEDSTATS=y
CONFIG_TIMER_STATS=y CONFIG_TIMER_STATS=y
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/pinctrl/machine.h> #include <linux/pinctrl/machine.h>
#include <linux/platform_data/mailbox-omap.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
...@@ -66,32 +65,6 @@ static int __init omap3_l3_init(void) ...@@ -66,32 +65,6 @@ static int __init omap3_l3_init(void)
} }
omap_postcore_initcall(omap3_l3_init); omap_postcore_initcall(omap3_l3_init);
#if defined(CONFIG_OMAP2PLUS_MBOX) || defined(CONFIG_OMAP2PLUS_MBOX_MODULE)
static inline void __init omap_init_mbox(void)
{
struct omap_hwmod *oh;
struct platform_device *pdev;
struct omap_mbox_pdata *pdata;
oh = omap_hwmod_lookup("mailbox");
if (!oh) {
pr_err("%s: unable to find hwmod\n", __func__);
return;
}
if (!oh->dev_attr) {
pr_err("%s: hwmod doesn't have valid attrs\n", __func__);
return;
}
pdata = (struct omap_mbox_pdata *)oh->dev_attr;
pdev = omap_device_build("omap-mailbox", -1, oh, pdata, sizeof(*pdata));
WARN(IS_ERR(pdev), "%s: could not build device, err %ld\n",
__func__, PTR_ERR(pdev));
}
#else
static inline void omap_init_mbox(void) { }
#endif /* CONFIG_OMAP2PLUS_MBOX */
static inline void omap_init_sti(void) {} static inline void omap_init_sti(void) {}
#if defined(CONFIG_SPI_OMAP24XX) || defined(CONFIG_SPI_OMAP24XX_MODULE) #if defined(CONFIG_SPI_OMAP24XX) || defined(CONFIG_SPI_OMAP24XX_MODULE)
...@@ -229,7 +202,6 @@ static int __init omap2_init_devices(void) ...@@ -229,7 +202,6 @@ static int __init omap2_init_devices(void)
* please keep these calls, and their implementations above, * please keep these calls, and their implementations above,
* in alphabetical order so they're easier to sort through. * in alphabetical order so they're easier to sort through.
*/ */
omap_init_mbox();
omap_init_mcspi(); omap_init_mcspi();
omap_init_sham(); omap_init_sham();
omap_init_aes(); omap_init_aes();
......
...@@ -23,6 +23,8 @@ ...@@ -23,6 +23,8 @@
#include <linux/platform_data/pinctrl-single.h> #include <linux/platform_data/pinctrl-single.h>
#include <linux/platform_data/iommu-omap.h> #include <linux/platform_data/iommu-omap.h>
#include <linux/platform_data/wkup_m3.h> #include <linux/platform_data/wkup_m3.h>
#include <linux/platform_data/pwm_omap_dmtimer.h>
#include <plat/dmtimer.h>
#include "common.h" #include "common.h"
#include "common-board-devices.h" #include "common-board-devices.h"
...@@ -449,6 +451,24 @@ void omap_auxdata_legacy_init(struct device *dev) ...@@ -449,6 +451,24 @@ void omap_auxdata_legacy_init(struct device *dev)
dev->platform_data = &twl_gpio_auxdata; dev->platform_data = &twl_gpio_auxdata;
} }
/* Dual mode timer PWM callbacks platdata */
#if IS_ENABLED(CONFIG_OMAP_DM_TIMER)
struct pwm_omap_dmtimer_pdata pwm_dmtimer_pdata = {
.request_by_node = omap_dm_timer_request_by_node,
.free = omap_dm_timer_free,
.enable = omap_dm_timer_enable,
.disable = omap_dm_timer_disable,
.get_fclk = omap_dm_timer_get_fclk,
.start = omap_dm_timer_start,
.stop = omap_dm_timer_stop,
.set_load = omap_dm_timer_set_load,
.set_match = omap_dm_timer_set_match,
.set_pwm = omap_dm_timer_set_pwm,
.set_prescaler = omap_dm_timer_set_prescaler,
.write_counter = omap_dm_timer_write_counter,
};
#endif
/* /*
* Few boards still need auxdata populated before we populate * Few boards still need auxdata populated before we populate
* the dev entries in of_platform_populate(). * the dev entries in of_platform_populate().
...@@ -502,6 +522,9 @@ static struct of_dev_auxdata omap_auxdata_lookup[] __initdata = { ...@@ -502,6 +522,9 @@ static struct of_dev_auxdata omap_auxdata_lookup[] __initdata = {
OF_DEV_AUXDATA("ti,am4372-wkup-m3", 0x44d00000, "44d00000.wkup_m3", OF_DEV_AUXDATA("ti,am4372-wkup-m3", 0x44d00000, "44d00000.wkup_m3",
&wkup_m3_data), &wkup_m3_data),
#endif #endif
#if IS_ENABLED(CONFIG_OMAP_DM_TIMER)
OF_DEV_AUXDATA("ti,omap-dmtimer-pwm", 0, NULL, &pwm_dmtimer_pdata),
#endif
#if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5)
OF_DEV_AUXDATA("ti,omap4-iommu", 0x4a066000, "4a066000.mmu", OF_DEV_AUXDATA("ti,omap4-iommu", 0x4a066000, "4a066000.mmu",
&omap4_iommu_pdata), &omap4_iommu_pdata),
......
...@@ -86,13 +86,18 @@ ENTRY(enable_omap3630_toggle_l2_on_restore) ...@@ -86,13 +86,18 @@ ENTRY(enable_omap3630_toggle_l2_on_restore)
stmfd sp!, {lr} @ save registers on stack stmfd sp!, {lr} @ save registers on stack
/* Setup so that we will disable and enable l2 */ /* Setup so that we will disable and enable l2 */
mov r1, #0x1 mov r1, #0x1
adrl r2, l2dis_3630 @ may be too distant for plain adr adrl r3, l2dis_3630_offset @ may be too distant for plain adr
str r1, [r2] ldr r2, [r3] @ value for offset
str r1, [r2, r3] @ write to l2dis_3630
ldmfd sp!, {pc} @ restore regs and return ldmfd sp!, {pc} @ restore regs and return
ENDPROC(enable_omap3630_toggle_l2_on_restore) ENDPROC(enable_omap3630_toggle_l2_on_restore)
.text /*
/* Function to call rom code to save secure ram context */ * Function to call rom code to save secure ram context. This gets
* relocated to SRAM, so it can be all in .data section. Otherwise
* we need to initialize api_params separately.
*/
.data
.align 3 .align 3
ENTRY(save_secure_ram_context) ENTRY(save_secure_ram_context)
stmfd sp!, {r4 - r11, lr} @ save registers on stack stmfd sp!, {r4 - r11, lr} @ save registers on stack
...@@ -126,6 +131,8 @@ ENDPROC(save_secure_ram_context) ...@@ -126,6 +131,8 @@ ENDPROC(save_secure_ram_context)
ENTRY(save_secure_ram_context_sz) ENTRY(save_secure_ram_context_sz)
.word . - save_secure_ram_context .word . - save_secure_ram_context
.text
/* /*
* ====================== * ======================
* == Idle entry point == * == Idle entry point ==
...@@ -289,12 +296,6 @@ wait_sdrc_ready: ...@@ -289,12 +296,6 @@ wait_sdrc_ready:
bic r5, r5, #0x40 bic r5, r5, #0x40
str r5, [r4] str r5, [r4]
/*
* PC-relative stores lead to undefined behaviour in Thumb-2: use a r7 as a
* base instead.
* Be careful not to clobber r7 when maintaing this code.
*/
is_dll_in_lock_mode: is_dll_in_lock_mode:
/* Is dll in lock mode? */ /* Is dll in lock mode? */
ldr r4, sdrc_dlla_ctrl ldr r4, sdrc_dlla_ctrl
...@@ -302,11 +303,7 @@ is_dll_in_lock_mode: ...@@ -302,11 +303,7 @@ is_dll_in_lock_mode:
tst r5, #0x4 tst r5, #0x4
bne exit_nonoff_modes @ Return if locked bne exit_nonoff_modes @ Return if locked
/* wait till dll locks */ /* wait till dll locks */
adr r7, kick_counter
wait_dll_lock_timed: wait_dll_lock_timed:
ldr r4, wait_dll_lock_counter
add r4, r4, #1
str r4, [r7, #wait_dll_lock_counter - kick_counter]
ldr r4, sdrc_dlla_status ldr r4, sdrc_dlla_status
/* Wait 20uS for lock */ /* Wait 20uS for lock */
mov r6, #8 mov r6, #8
...@@ -330,9 +327,6 @@ kick_dll: ...@@ -330,9 +327,6 @@ kick_dll:
orr r6, r6, #(1<<3) @ enable dll orr r6, r6, #(1<<3) @ enable dll
str r6, [r4] str r6, [r4]
dsb dsb
ldr r4, kick_counter
add r4, r4, #1
str r4, [r7] @ kick_counter
b wait_dll_lock_timed b wait_dll_lock_timed
exit_nonoff_modes: exit_nonoff_modes:
...@@ -360,15 +354,6 @@ sdrc_dlla_status: ...@@ -360,15 +354,6 @@ sdrc_dlla_status:
.word SDRC_DLLA_STATUS_V .word SDRC_DLLA_STATUS_V
sdrc_dlla_ctrl: sdrc_dlla_ctrl:
.word SDRC_DLLA_CTRL_V .word SDRC_DLLA_CTRL_V
/*
* When exporting to userspace while the counters are in SRAM,
* these 2 words need to be at the end to facilitate retrival!
*/
kick_counter:
.word 0
wait_dll_lock_counter:
.word 0
ENTRY(omap3_do_wfi_sz) ENTRY(omap3_do_wfi_sz)
.word . - omap3_do_wfi .word . - omap3_do_wfi
...@@ -437,7 +422,9 @@ ENTRY(omap3_restore) ...@@ -437,7 +422,9 @@ ENTRY(omap3_restore)
cmp r2, #0x0 @ Check if target power state was OFF or RET cmp r2, #0x0 @ Check if target power state was OFF or RET
bne logic_l1_restore bne logic_l1_restore
ldr r0, l2dis_3630 adr r1, l2dis_3630_offset @ address for offset
ldr r0, [r1] @ value for offset
ldr r0, [r1, r0] @ value at l2dis_3630
cmp r0, #0x1 @ should we disable L2 on 3630? cmp r0, #0x1 @ should we disable L2 on 3630?
bne skipl2dis bne skipl2dis
mrc p15, 0, r0, c1, c0, 1 mrc p15, 0, r0, c1, c0, 1
...@@ -449,12 +436,14 @@ skipl2dis: ...@@ -449,12 +436,14 @@ skipl2dis:
and r1, #0x700 and r1, #0x700
cmp r1, #0x300 cmp r1, #0x300
beq l2_inv_gp beq l2_inv_gp
adr r0, l2_inv_api_params_offset
ldr r3, [r0]
add r3, r3, r0 @ r3 points to dummy parameters
mov r0, #40 @ set service ID for PPA mov r0, #40 @ set service ID for PPA
mov r12, r0 @ copy secure Service ID in r12 mov r12, r0 @ copy secure Service ID in r12
mov r1, #0 @ set task id for ROM code in r1 mov r1, #0 @ set task id for ROM code in r1
mov r2, #4 @ set some flags in r2, r6 mov r2, #4 @ set some flags in r2, r6
mov r6, #0xff mov r6, #0xff
adr r3, l2_inv_api_params @ r3 points to dummy parameters
dsb @ data write barrier dsb @ data write barrier
dmb @ data memory barrier dmb @ data memory barrier
smc #1 @ call SMI monitor (smi #1) smc #1 @ call SMI monitor (smi #1)
...@@ -488,8 +477,8 @@ skipl2dis: ...@@ -488,8 +477,8 @@ skipl2dis:
b logic_l1_restore b logic_l1_restore
.align .align
l2_inv_api_params: l2_inv_api_params_offset:
.word 0x1, 0x00 .long l2_inv_api_params - .
l2_inv_gp: l2_inv_gp:
/* Execute smi to invalidate L2 cache */ /* Execute smi to invalidate L2 cache */
mov r12, #0x1 @ set up to invalidate L2 mov r12, #0x1 @ set up to invalidate L2
...@@ -506,7 +495,9 @@ l2_inv_gp: ...@@ -506,7 +495,9 @@ l2_inv_gp:
mov r12, #0x2 mov r12, #0x2
smc #0 @ Call SMI monitor (smieq) smc #0 @ Call SMI monitor (smieq)
logic_l1_restore: logic_l1_restore:
ldr r1, l2dis_3630 adr r0, l2dis_3630_offset @ adress for offset
ldr r1, [r0] @ value for offset
ldr r1, [r0, r1] @ value at l2dis_3630
cmp r1, #0x1 @ Test if L2 re-enable needed on 3630 cmp r1, #0x1 @ Test if L2 re-enable needed on 3630
bne skipl2reen bne skipl2reen
mrc p15, 0, r1, c1, c0, 1 mrc p15, 0, r1, c1, c0, 1
...@@ -535,9 +526,17 @@ control_stat: ...@@ -535,9 +526,17 @@ control_stat:
.word CONTROL_STAT .word CONTROL_STAT
control_mem_rta: control_mem_rta:
.word CONTROL_MEM_RTA_CTRL .word CONTROL_MEM_RTA_CTRL
l2dis_3630_offset:
.long l2dis_3630 - .
.data
l2dis_3630: l2dis_3630:
.word 0 .word 0
.data
l2_inv_api_params:
.word 0x1, 0x00
/* /*
* Internal functions * Internal functions
*/ */
......
...@@ -29,12 +29,6 @@ ...@@ -29,12 +29,6 @@
dsb dsb
.endm .endm
ppa_zero_params:
.word 0x0
ppa_por_params:
.word 1, 0
#ifdef CONFIG_ARCH_OMAP4 #ifdef CONFIG_ARCH_OMAP4
/* /*
...@@ -266,7 +260,9 @@ ENTRY(omap4_cpu_resume) ...@@ -266,7 +260,9 @@ ENTRY(omap4_cpu_resume)
beq skip_ns_smp_enable beq skip_ns_smp_enable
ppa_actrl_retry: ppa_actrl_retry:
mov r0, #OMAP4_PPA_CPU_ACTRL_SMP_INDEX mov r0, #OMAP4_PPA_CPU_ACTRL_SMP_INDEX
adr r3, ppa_zero_params @ Pointer to parameters adr r1, ppa_zero_params_offset
ldr r3, [r1]
add r3, r3, r1 @ Pointer to ppa_zero_params
mov r1, #0x0 @ Process ID mov r1, #0x0 @ Process ID
mov r2, #0x4 @ Flag mov r2, #0x4 @ Flag
mov r6, #0xff mov r6, #0xff
...@@ -303,7 +299,9 @@ skip_ns_smp_enable: ...@@ -303,7 +299,9 @@ skip_ns_smp_enable:
ldr r0, =OMAP4_PPA_L2_POR_INDEX ldr r0, =OMAP4_PPA_L2_POR_INDEX
ldr r1, =OMAP44XX_SAR_RAM_BASE ldr r1, =OMAP44XX_SAR_RAM_BASE
ldr r4, [r1, #L2X0_PREFETCH_CTRL_OFFSET] ldr r4, [r1, #L2X0_PREFETCH_CTRL_OFFSET]
adr r3, ppa_por_params adr r1, ppa_por_params_offset
ldr r3, [r1]
add r3, r3, r1 @ Pointer to ppa_por_params
str r4, [r3, #0x04] str r4, [r3, #0x04]
mov r1, #0x0 @ Process ID mov r1, #0x0 @ Process ID
mov r2, #0x4 @ Flag mov r2, #0x4 @ Flag
...@@ -328,6 +326,8 @@ skip_l2en: ...@@ -328,6 +326,8 @@ skip_l2en:
#endif #endif
b cpu_resume @ Jump to generic resume b cpu_resume @ Jump to generic resume
ppa_por_params_offset:
.long ppa_por_params - .
ENDPROC(omap4_cpu_resume) ENDPROC(omap4_cpu_resume)
#endif /* CONFIG_ARCH_OMAP4 */ #endif /* CONFIG_ARCH_OMAP4 */
...@@ -380,4 +380,13 @@ ENTRY(omap_do_wfi) ...@@ -380,4 +380,13 @@ ENTRY(omap_do_wfi)
nop nop
ldmfd sp!, {pc} ldmfd sp!, {pc}
ppa_zero_params_offset:
.long ppa_zero_params - .
ENDPROC(omap_do_wfi) ENDPROC(omap_do_wfi)
.data
ppa_zero_params:
.word 0
ppa_por_params:
.word 1, 0
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment