projects/linux·commit dc413a90

Merge tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

dc413a90 · Linus Torvalds <[email protected]> · 2019-05-16 09:19:14 -07:00

Pull ARM SoC-related driver updates from Olof Johansson:
 "Various driver updates for platforms and a couple of the small driver
  subsystems we merge through our tree:

  Among the larger pieces:

   - Power management improvements for TI am335x and am437x (RTC
     suspend/wake)

   - Misc new additions for Amlogic (socinfo updates)

   - ZynqMP FPGA manager

   - Nvidia improvements for reset/powergate handling

   - PMIC wrapper for Mediatek MT8516

   - Misc fixes/improvements for ARM SCMI, TEE, NXP i.MX SCU drivers"

* tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (57 commits)
  soc: aspeed: fix Kconfig
  soc: add aspeed folder and misc drivers
  spi: zynqmp: Fix build break
  soc: imx: Add generic i.MX8 SoC driver
  MAINTAINERS: Update email for Qualcomm SoC maintainer
  memory: tegra: Fix a typos for "fdcdwr2" mc client
  Revert "ARM: tegra: Restore memory arbitration on resume from LP1 on Tegra30+"
  memory: tegra: Replace readl-writel with mc_readl-mc_writel
  memory: tegra: Fix integer overflow on tick value calculation
  memory: tegra: Fix missed registers values latching
  ARM: tegra: cpuidle: Handle tick broadcasting within cpuidle core on Tegra20/30
  optee: allow to work without static shared memory
  soc/tegra: pmc: Move powergate initialisation to probe
  soc/tegra: pmc: Remove reset sysfs entries on error
  soc/tegra: pmc: Fix reset sources and levels
  soc: amlogic: meson-gx-pwrc-vpu: Add support for G12A
  soc: amlogic: meson-gx-pwrc-vpu: Fix power on/off register bitmask
  fpga manager: Adding FPGA Manager support for Xilinx zynqmp
  dt-bindings: fpga: Add bindings for ZynqMP fpga driver
  firmware: xilinx: Add fpga API's
  ...
Commit
dc413a90edbe715bebebe859dc072ef73d490d70
Parents
e8a1d701 · 80d0c649

Merge commit. Changes below are compared with the first parent: e8a1d701.

Changes

71 files changed · +1717 −434

FileStatusAddDelContent
Documentation/devicetree/bindings/fpga/xlnx,zynqmp-pcap-fpga.txtadded+25−0View file
Documentation/devicetree/bindings/soc/mediatek/pwrap.txtmodified+1−0View file
Documentation/xilinx/eemi.txtmodified+2−2View file
MAINTAINERSmodified+1−1View file
arch/arm/mach-omap2/pm33xx-core.cmodified+75−1View file
arch/arm/mach-omap2/sleep43xx.Smodified+3−0View file
arch/arm/mach-tegra/Kconfigmodified+1−0View file
arch/arm/mach-tegra/cpuidle-tegra20.cmodified+2−9View file
arch/arm/mach-tegra/cpuidle-tegra30.cmodified+1−8View file
arch/arm/mach-tegra/iomap.hmodified+0−9View file
arch/arm/mach-tegra/sleep-tegra30.Smodified+0−21View file
drivers/bus/tegra-aconnect.cmodified+46−20View file
drivers/clk/zynqmp/clkc.cmodified+2−2View file
drivers/firmware/arm_scmi/driver.cmodified+4−4View file
drivers/firmware/imx/Makefilemodified+1−1View file
drivers/firmware/imx/imx-scu-irq.cadded+168−0View file
drivers/firmware/imx/imx-scu.cmodified+6−0View file
drivers/firmware/imx/scu-pd.cmodified+64−57View file
drivers/firmware/xilinx/zynqmp-debug.cmodified+4−14View file
drivers/firmware/xilinx/zynqmp.cmodified+55−1View file
drivers/fpga/Kconfigmodified+9−0View file
drivers/fpga/Makefilemodified+1−0View file
drivers/fpga/zynqmp-fpga.cadded+159−0View file
drivers/memory/emif.hmodified+4−0View file
drivers/memory/tegra/mc.cmodified+20−14View file
drivers/memory/tegra/mc.hmodified+1−1View file
drivers/memory/tegra/tegra114.cmodified+2−2View file
drivers/memory/tegra/tegra124.cmodified+2−2View file
drivers/memory/tegra/tegra20.cmodified+14−14View file
drivers/memory/tegra/tegra210.cmodified+1−1View file
drivers/memory/tegra/tegra30.cmodified+2−2View file
drivers/memory/ti-emif-pm.cmodified+3−0View file
drivers/memory/ti-emif-sram-pm.Smodified+41−0View file
drivers/misc/Kconfigmodified+0−24View file
drivers/misc/Makefilemodified+0−3View file
drivers/nvmem/zynqmp_nvmem.cmodified+7−3View file
drivers/reset/reset-zynqmp.cmodified+4−4View file
drivers/rtc/rtc-omap.cmodified+41−8View file
drivers/soc/Kconfigmodified+1−0View file
drivers/soc/Makefilemodified+1−0View file
drivers/soc/amlogic/meson-gx-pwrc-vpu.cmodified+144−16View file
drivers/soc/amlogic/meson-gx-socinfo.cmodified+27−16View file
drivers/soc/aspeed/Kconfigadded+31−0View file
drivers/soc/aspeed/Makefileadded+3−0View file
drivers/misc/aspeed-lpc-ctrl.c → drivers/soc/aspeed/aspeed-lpc-ctrl.crenamed+0−0View file
drivers/misc/aspeed-lpc-snoop.c → drivers/soc/aspeed/aspeed-lpc-snoop.crenamed+0−0View file
drivers/misc/aspeed-p2a-ctrl.c → drivers/soc/aspeed/aspeed-p2a-ctrl.crenamed+0−0View file
drivers/soc/imx/Makefilemodified+1−0View file
drivers/soc/imx/gpc.cmodified+1−3View file
drivers/soc/imx/gpcv2.cmodified+15−28View file
drivers/soc/imx/soc-imx8.cadded+115−0View file
drivers/soc/mediatek/mtk-pmic-wrap.cmodified+109−2View file
drivers/soc/qcom/cmd-db.cmodified+2−2View file
drivers/soc/qcom/qmi_interface.cmodified+2−5View file
drivers/soc/qcom/rmtfs_mem.cmodified+21−0View file
drivers/soc/qcom/rpmh-rsc.cmodified+1−1View file
drivers/soc/renesas/renesas-soc.cmodified+3−0View file
drivers/soc/rockchip/grf.cmodified+2−0View file
drivers/soc/tegra/pmc.cmodified+134−37View file
drivers/soc/ti/Kconfigmodified+3−2View file
drivers/soc/ti/pm33xx.cmodified+223−50View file
drivers/soc/xilinx/zynqmp_pm_domains.cmodified+10−8View file
drivers/soc/xilinx/zynqmp_power.cmodified+6−4View file
drivers/spi/spi-zynqmp-gqspi.cmodified+6−0View file
drivers/tee/optee/core.cmodified+49−31View file
include/linux/firmware/imx/sci.hmodified+5−0View file
include/linux/firmware/xlnx-zynqmp.hmodified+13−1View file
include/linux/platform_data/pm33xx.hmodified+5−0View file
include/linux/reset.hmodified+2−0View file
include/linux/rtc/rtc-omap.hadded+7−0View file
include/linux/ti-emif-sram.hmodified+3−0View file

Only the first 600 diff lines are shown. Download the complete patch.

Documentation/devicetree/bindings/fpga/xlnx,zynqmp-pcap-fpga.txt

View file
diff --git a/Documentation/devicetree/bindings/fpga/xlnx,zynqmp-pcap-fpga.txt b/Documentation/devicetree/bindings/fpga/xlnx,zynqmp-pcap-fpga.txt
new file mode 100644
index 0000000..3052bf6
--- /dev/null
+++ b/Documentation/devicetree/bindings/fpga/xlnx,zynqmp-pcap-fpga.txt
@@ -0,0 +1,25 @@
+Devicetree bindings for Zynq Ultrascale MPSoC FPGA Manager.
+The ZynqMP SoC uses the PCAP (Processor configuration Port) to configure the
+Programmable Logic (PL). The configuration uses the firmware interface.
+
+Required properties:
+- compatible: should contain "xlnx,zynqmp-pcap-fpga"
+
+Example for full FPGA configuration:
+
+ fpga-region0 {
+ compatible = "fpga-region";
+ fpga-mgr = <&zynqmp_pcap>;
+ #address-cells = <0x1>;
+ #size-cells = <0x1>;
+ };
+
+ firmware {
+ zynqmp_firmware: zynqmp-firmware {
+ compatible = "xlnx,zynqmp-firmware";
+ method = "smc";
+ zynqmp_pcap: pcap {
+ compatible = "xlnx,zynqmp-pcap-fpga";
+ };
+ };
+ };

Documentation/devicetree/bindings/soc/mediatek/pwrap.txt

View file
diff --git a/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt b/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt
index 5a2ef17..7a32404 100644
--- a/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt
+++ b/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt
@@ -25,6 +25,7 @@ Required properties in pwrap device node.
"mediatek,mt8135-pwrap" for MT8135 SoCs
"mediatek,mt8173-pwrap" for MT8173 SoCs
"mediatek,mt8183-pwrap" for MT8183 SoCs
+ "mediatek,mt8516-pwrap" for MT8516 SoCs
- interrupts: IRQ for pwrap in SOC
- reg-names: Must include the following entries:
"pwrap": Main registers base

Documentation/xilinx/eemi.txt

View file
diff --git a/Documentation/xilinx/eemi.txt b/Documentation/xilinx/eemi.txt
index 0ab686c..5f39b4f 100644
--- a/Documentation/xilinx/eemi.txt
+++ b/Documentation/xilinx/eemi.txt
@@ -41,8 +41,8 @@ Example of EEMI ops usage:
int ret;
eemi_ops = zynqmp_pm_get_eemi_ops();
- if (!eemi_ops)
- return -ENXIO;
+ if (IS_ERR(eemi_ops))
+ return PTR_ERR(eemi_ops);
ret = eemi_ops->query_data(qdata, ret_payload);

MAINTAINERS

View file
diff --git a/MAINTAINERS b/MAINTAINERS
index 5254b35..005902e 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2043,7 +2043,7 @@ W: http://www.armlinux.org.uk/
S: Maintained
ARM/QUALCOMM SUPPORT
-M: Andy Gross <[email protected]>
+M: Andy Gross <[email protected]>
M: David Brown <[email protected]>
S: Maintained

arch/arm/mach-omap2/pm33xx-core.c

View file
diff --git a/arch/arm/mach-omap2/pm33xx-core.c b/arch/arm/mach-omap2/pm33xx-core.c
index c93b6ef..f11442e 100644
--- a/arch/arm/mach-omap2/pm33xx-core.c
+++ b/arch/arm/mach-omap2/pm33xx-core.c
@@ -10,6 +10,12 @@
#include <asm/suspend.h>
#include <linux/errno.h>
#include <linux/platform_data/pm33xx.h>
+#include <linux/clk.h>
+#include <linux/platform_data/gpio-omap.h>
+#include <linux/pinctrl/pinmux.h>
+#include <linux/wkup_m3_ipc.h>
+#include <linux/of.h>
+#include <linux/rtc.h>
#include "cm33xx.h"
#include "common.h"
@@ -38,6 +44,29 @@ static int am43xx_map_scu(void)
return 0;
}
+static int am33xx_check_off_mode_enable(void)
+{
+ if (enable_off_mode)
+ pr_warn("WARNING: This platform does not support off-mode, entering DeepSleep suspend.\n");
+
+ /* off mode not supported on am335x so return 0 always */
+ return 0;
+}
+
+static int am43xx_check_off_mode_enable(void)
+{
+ /*
+ * Check for am437x-gp-evm which has the right Hardware design to
+ * support this mode reliably.
+ */
+ if (of_machine_is_compatible("ti,am437x-gp-evm") && enable_off_mode)
+ return enable_off_mode;
+ else if (enable_off_mode)
+ pr_warn("WARNING: This platform does not support off-mode, entering DeepSleep suspend.\n");
+
+ return 0;
+}
+
static int amx3_common_init(void)
{
gfx_pwrdm = pwrdm_lookup("gfx_pwrdm");
@@ -141,7 +170,9 @@ static int am43xx_suspend(unsigned int state, int (*fn)(unsigned long),
scu_power_mode(scu_base, SCU_PM_POWEROFF);
ret = cpu_suspend(args, fn);
scu_power_mode(scu_base, SCU_PM_NORMAL);
- amx3_post_suspend_common();
+
+ if (!am43xx_check_off_mode_enable())
+ amx3_post_suspend_common();
return ret;
}
@@ -163,10 +194,48 @@ void __iomem *am43xx_get_rtc_base_addr(void)
return omap_hwmod_get_mpu_rt_va(rtc_oh);
}
+static void am43xx_save_context(void)
+{
+}
+
+static void am33xx_save_context(void)
+{
+ omap_intc_save_context();
+}
+
+static void am33xx_restore_context(void)
+{
+ omap_intc_restore_context();
+}
+
+static void am43xx_restore_context(void)
+{
+ /*
+ * HACK: restore dpll_per_clkdcoldo register contents, to avoid
+ * breaking suspend-resume
+ */
+ writel_relaxed(0x0, AM33XX_L4_WK_IO_ADDRESS(0x44df2e14));
+}
+
+static void am43xx_prepare_rtc_suspend(void)
+{
+ omap_hwmod_enable(rtc_oh);
+}
+
+static void am43xx_prepare_rtc_resume(void)
+{
+ omap_hwmod_idle(rtc_oh);
+}
+
static struct am33xx_pm_platform_data am33xx_ops = {
.init = am33xx_suspend_init,
.soc_suspend = am33xx_suspend,
.get_sram_addrs = amx3_get_sram_addrs,
+ .save_context = am33xx_save_context,
+ .restore_context = am33xx_restore_context,
+ .prepare_rtc_suspend = am43xx_prepare_rtc_suspend,
+ .prepare_rtc_resume = am43xx_prepare_rtc_resume,
+ .check_off_mode_enable = am33xx_check_off_mode_enable,
.get_rtc_base_addr = am43xx_get_rtc_base_addr,
};
@@ -174,6 +243,11 @@ static struct am33xx_pm_platform_data am43xx_ops = {
.init = am43xx_suspend_init,
.soc_suspend = am43xx_suspend,
.get_sram_addrs = amx3_get_sram_addrs,
+ .save_context = am43xx_save_context,
+ .restore_context = am43xx_restore_context,
+ .prepare_rtc_suspend = am43xx_prepare_rtc_suspend,
+ .prepare_rtc_resume = am43xx_prepare_rtc_resume,
+ .check_off_mode_enable = am43xx_check_off_mode_enable,
.get_rtc_base_addr = am43xx_get_rtc_base_addr,
};

arch/arm/mach-omap2/sleep43xx.S

View file
diff --git a/arch/arm/mach-omap2/sleep43xx.S b/arch/arm/mach-omap2/sleep43xx.S
index 5b9343b..0c10314 100644
--- a/arch/arm/mach-omap2/sleep43xx.S
+++ b/arch/arm/mach-omap2/sleep43xx.S
@@ -368,6 +368,9 @@ wait_emif_enable1:
mov r1, #AM43XX_EMIF_POWEROFF_DISABLE
str r1, [r2, #0x0]
+ ldr r1, [r9, #EMIF_PM_RUN_HW_LEVELING]
+ blx r1
+
#ifdef CONFIG_CACHE_L2X0
ldr r2, l2_cache_base
ldr r0, [r2, #L2X0_CTRL]

arch/arm/mach-tegra/Kconfig

View file
diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig
index 63e89e7..3a06ba2 100644
--- a/arch/arm/mach-tegra/Kconfig
+++ b/arch/arm/mach-tegra/Kconfig
@@ -10,6 +10,7 @@ menuconfig ARCH_TEGRA
select HAVE_ARM_SCU if SMP
select HAVE_ARM_TWD if SMP
select PINCTRL
+ select PM
select PM_OPP
select RESET_CONTROLLER
select SOC_BUS

arch/arm/mach-tegra/cpuidle-tegra20.c

View file
diff --git a/arch/arm/mach-tegra/cpuidle-tegra20.c b/arch/arm/mach-tegra/cpuidle-tegra20.c
index 3f24add..6620d61 100644
--- a/arch/arm/mach-tegra/cpuidle-tegra20.c
+++ b/arch/arm/mach-tegra/cpuidle-tegra20.c
@@ -61,7 +61,8 @@ static struct cpuidle_driver tegra_idle_driver = {
.exit_latency = 5000,
.target_residency = 10000,
.power_usage = 0,
- .flags = CPUIDLE_FLAG_COUPLED,
+ .flags = CPUIDLE_FLAG_COUPLED |
+ CPUIDLE_FLAG_TIMER_STOP,
.name = "powered-down",
.desc = "CPU power gated",
},
@@ -136,12 +137,8 @@ static bool tegra20_cpu_cluster_power_down(struct cpuidle_device *dev,
if (tegra20_reset_cpu_1() || !tegra_cpu_rail_off_ready())
return false;
- tick_broadcast_enter();
-
tegra_idle_lp2_last();
- tick_broadcast_exit();
-
if (cpu_online(1))
tegra20_wake_cpu1_from_reset();
@@ -153,14 +150,10 @@ static bool tegra20_idle_enter_lp2_cpu_1(struct cpuidle_device *dev,
struct cpuidle_driver *drv,
int index)
{
- tick_broadcast_enter();
-
cpu_suspend(0, tegra20_sleep_cpu_secondary_finish);
tegra20_cpu_clear_resettable();
- tick_broadcast_exit();
-
return true;
}
#else

arch/arm/mach-tegra/cpuidle-tegra30.c

View file
diff --git a/arch/arm/mach-tegra/cpuidle-tegra30.c b/arch/arm/mach-tegra/cpuidle-tegra30.c
index c141736..c8fe044 100644
--- a/arch/arm/mach-tegra/cpuidle-tegra30.c
+++ b/arch/arm/mach-tegra/cpuidle-tegra30.c
@@ -56,6 +56,7 @@ static struct cpuidle_driver tegra_idle_driver = {
.exit_latency = 2000,
.target_residency = 2200,
.power_usage = 0,
+ .flags = CPUIDLE_FLAG_TIMER_STOP,
.name = "powered-down",
.desc = "CPU power gated",
},
@@ -76,12 +77,8 @@ static bool tegra30_cpu_cluster_power_down(struct cpuidle_device *dev,
return false;
}
- tick_broadcast_enter();
-
tegra_idle_lp2_last();
- tick_broadcast_exit();
-
return true;
}
@@ -90,14 +87,10 @@ static bool tegra30_cpu_core_power_down(struct cpuidle_device *dev,
struct cpuidle_driver *drv,
int index)
{
- tick_broadcast_enter();
-
smp_wmb();
cpu_suspend(0, tegra30_sleep_cpu_secondary_finish);
- tick_broadcast_exit();
-
return true;
}
#else

arch/arm/mach-tegra/iomap.h

View file
diff --git a/arch/arm/mach-tegra/iomap.h b/arch/arm/mach-tegra/iomap.h
index 4af9e92..ba61db7 100644
--- a/arch/arm/mach-tegra/iomap.h
+++ b/arch/arm/mach-tegra/iomap.h
@@ -79,24 +79,15 @@
#define TEGRA_PMC_BASE 0x7000E400
#define TEGRA_PMC_SIZE SZ_256
-#define TEGRA_MC_BASE 0x7000F000
-#define TEGRA_MC_SIZE SZ_1K
-
#define TEGRA_EMC_BASE 0x7000F400
#define TEGRA_EMC_SIZE SZ_1K
-#define TEGRA114_MC_BASE 0x70019000
-#define TEGRA114_MC_SIZE SZ_4K
-
#define TEGRA_EMC0_BASE 0x7001A000
#define TEGRA_EMC0_SIZE SZ_2K
#define TEGRA_EMC1_BASE 0x7001A800
#define TEGRA_EMC1_SIZE SZ_2K
-#define TEGRA124_MC_BASE 0x70019000
-#define TEGRA124_MC_SIZE SZ_4K
-
#define TEGRA124_EMC_BASE 0x7001B000
#define TEGRA124_EMC_SIZE SZ_2K

arch/arm/mach-tegra/sleep-tegra30.S

View file
diff --git a/arch/arm/mach-tegra/sleep-tegra30.S b/arch/arm/mach-tegra/sleep-tegra30.S
index d0b4c48..7727e00 100644
--- a/arch/arm/mach-tegra/sleep-tegra30.S
+++ b/arch/arm/mach-tegra/sleep-tegra30.S
@@ -44,8 +44,6 @@
#define EMC_XM2VTTGENPADCTRL 0x310
#define EMC_XM2VTTGENPADCTRL2 0x314
-#define MC_EMEM_ARB_CFG 0x90
-
#define PMC_CTRL 0x0
#define PMC_CTRL_SIDE_EFFECT_LP0 (1 << 14) /* enter LP0 when CPU pwr gated */
@@ -420,22 +418,6 @@ _pll_m_c_x_done:
movweq r0, #:lower16:TEGRA124_EMC_BASE
movteq r0, #:upper16:TEGRA124_EMC_BASE
- cmp r10, #TEGRA30
- moveq r2, #0x20
- movweq r4, #:lower16:TEGRA_MC_BASE
- movteq r4, #:upper16:TEGRA_MC_BASE
- cmp r10, #TEGRA114
- moveq r2, #0x34
- movweq r4, #:lower16:TEGRA114_MC_BASE
- movteq r4, #:upper16:TEGRA114_MC_BASE
- cmp r10, #TEGRA124
- moveq r2, #0x20
- movweq r4, #:lower16:TEGRA124_MC_BASE
- movteq r4, #:upper16:TEGRA124_MC_BASE
-
- ldr r1, [r5, r2] @ restore MC_EMEM_ARB_CFG
- str r1, [r4, #MC_EMEM_ARB_CFG]
-
exit_self_refresh:
ldr r1, [r5, #0xC] @ restore EMC_XM2VTTGENPADCTRL
str r1, [r0, #EMC_XM2VTTGENPADCTRL]
@@ -564,7 +546,6 @@ tegra30_sdram_pad_address:
.word TEGRA_PMC_BASE + PMC_IO_DPD_STATUS @0x14
.word TEGRA_CLK_RESET_BASE + CLK_RESET_CLK_SOURCE_MSELECT @0x18
.word TEGRA_CLK_RESET_BASE + CLK_RESET_SCLK_BURST @0x1c
- .word TEGRA_MC_BASE + MC_EMEM_ARB_CFG @0x20
tegra30_sdram_pad_address_end:
tegra114_sdram_pad_address:
@@ -581,7 +562,6 @@ tegra114_sdram_pad_address:
.word TEGRA_EMC1_BASE + EMC_AUTO_CAL_INTERVAL @0x28
.word TEGRA_EMC1_BASE + EMC_XM2VTTGENPADCTRL @0x2c
.word TEGRA_EMC1_BASE + EMC_XM2VTTGENPADCTRL2 @0x30
- .word TEGRA114_MC_BASE + MC_EMEM_ARB_CFG @0x34
tegra114_sdram_pad_adress_end:
tegra124_sdram_pad_address:
@@ -593,7 +573,6 @@ tegra124_sdram_pad_address:
.word TEGRA_PMC_BASE + PMC_IO_DPD_STATUS @0x14
.word TEGRA_CLK_RESET_BASE + CLK_RESET_CLK_SOURCE_MSELECT @0x18
.word TEGRA_CLK_RESET_BASE + CLK_RESET_SCLK_BURST @0x1c
- .word TEGRA124_MC_BASE + MC_EMEM_ARB_CFG @0x20
tegra124_sdram_pad_address_end:
tegra30_sdram_pad_size:

drivers/bus/tegra-aconnect.c

View file
diff --git a/drivers/bus/tegra-aconnect.c b/drivers/bus/tegra-aconnect.c
index 084ae28..ac58142 100644
--- a/drivers/bus/tegra-aconnect.c
+++ b/drivers/bus/tegra-aconnect.c
@@ -12,28 +12,38 @@
#include <linux/module.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h>
-#include <linux/pm_clock.h>
#include <linux/pm_runtime.h>
+struct tegra_aconnect {
+ struct clk *ape_clk;
+ struct clk *apb2ape_clk;
+};
+
static int tegra_aconnect_probe(struct platform_device *pdev)
{
- int ret;
+ struct tegra_aconnect *aconnect;
if (!pdev->dev.of_node)
return -EINVAL;
- ret = pm_clk_create(&pdev->dev);
- if (ret)
- return ret;
+ aconnect = devm_kzalloc(&pdev->dev, sizeof(struct tegra_aconnect),
+ GFP_KERNEL);
+ if (!aconnect)
+ return -ENOMEM;
- ret = of_pm_clk_add_clk(&pdev->dev, "ape");
- if (ret)
- goto clk_destroy;
+ aconnect->ape_clk = devm_clk_get(&pdev->dev, "ape");
+ if (IS_ERR(aconnect->ape_clk)) {
+ dev_err(&pdev->dev, "Can't retrieve ape clock\n");
+ return PTR_ERR(aconnect->ape_clk);
+ }
- ret = of_pm_clk_add_clk(&pdev->dev, "apb2ape");
- if (ret)
- goto clk_destroy;
+ aconnect->apb2ape_clk = devm_clk_get(&pdev->dev, "apb2ape");
+ if (IS_ERR(aconnect->apb2ape_clk)) {
+ dev_err(&pdev->dev, "Can't retrieve apb2ape clock\n");
+ return PTR_ERR(aconnect->apb2ape_clk);
+ }
+ dev_set_drvdata(&pdev->dev, aconnect);
pm_runtime_enable(&pdev->dev);
of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev);
@@ -41,35 +51,51 @@ static int tegra_aconnect_probe(struct platform_device *pdev)
dev_info(&pdev->dev, "Tegra ACONNECT bus registered\n");
return 0;
-
-clk_destroy:
- pm_clk_destroy(&pdev->dev);
-
- return ret;
}
static int tegra_aconnect_remove(struct platform_device *pdev)
{
pm_runtime_disable(&pdev->dev);
- pm_clk_destroy(&pdev->dev);
-
return 0;
}
static int tegra_aconnect_runtime_resume(struct device *dev)
{
- return pm_clk_resume(dev);
+ struct tegra_aconnect *aconnect = dev_get_drvdata(dev);
+ int ret;
+
+ ret = clk_prepare_enable(aconnect->ape_clk);
+ if (ret) {
+ dev_err(dev, "ape clk_enable failed: %d\n", ret);
+ return ret;
+ }
+
+ ret = clk_prepare_enable(aconnect->apb2ape_clk);
+ if (ret) {
+ clk_disable_unprepare(aconnect->ape_clk);
+ dev_err(dev, "apb2ape clk_enable failed: %d\n", ret);
+ return ret;
+ }
+
+ return 0;
}
static int tegra_aconnect_runtime_suspend(struct device *dev)
{
- return pm_clk_suspend(dev);
+ struct tegra_aconnect *aconnect = dev_get_drvdata(dev);
+
+ clk_disable_unprepare(aconnect->ape_clk);
+ clk_disable_unprepare(aconnect->apb2ape_clk);
+
+ return 0;
}
static const struct dev_pm_ops tegra_aconnect_pm_ops = {
SET_RUNTIME_PM_OPS(tegra_aconnect_runtime_suspend,
tegra_aconnect_runtime_resume, NULL)
+ SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
+ pm_runtime_force_resume)
};
static const struct of_device_id tegra_aconnect_of_match[] = {

drivers/clk/zynqmp/clkc.c

View file
diff --git a/drivers/clk/zynqmp/clkc.c b/drivers/clk/zynqmp/clkc.c
index 8febd24..a11f93e 100644
--- a/drivers/clk/zynqmp/clkc.c
+++ b/drivers/clk/zynqmp/clkc.c
@@ -739,8 +739,8 @@ static int zynqmp_clock_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
eemi_ops = zynqmp_pm_get_eemi_ops();
- if (!eemi_ops)
- return -ENXIO;
+ if (IS_ERR(eemi_ops))
+ return PTR_ERR(eemi_ops);
ret = zynqmp_clk_setup(dev->of_node);

drivers/firmware/arm_scmi/driver.c

View file
diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c
index 8f952f2..b5bc4c7 100644
--- a/drivers/firmware/arm_scmi/driver.c
+++ b/drivers/firmware/arm_scmi/driver.c
@@ -654,9 +654,7 @@ static int scmi_xfer_info_init(struct scmi_info *sinfo)
static int scmi_mailbox_check(struct device_node *np)
{
- struct of_phandle_args arg;
-
- return of_parse_phandle_with_args(np, "mboxes", "#mbox-cells", 0, &arg);
+ return of_parse_phandle_with_args(np, "mboxes", "#mbox-cells", 0, NULL);
}
static int scmi_mbox_free_channel(int id, void *p, void *data)
@@ -798,7 +796,9 @@ static int scmi_probe(struct platform_device *pdev)
return -EINVAL;
}
- desc = of_match_device(scmi_of_match, dev)->data;
+ desc = of_device_get_match_data(dev);
+ if (!desc)
+ return -EINVAL;
info = devm_kzalloc(dev, sizeof(*info), GFP_KERNEL);
if (!info)

drivers/firmware/imx/Makefile

View file
diff --git a/drivers/firmware/imx/Makefile b/drivers/firmware/imx/Makefile
index 1b2e15b..802c4ad 100644
--- a/drivers/firmware/imx/Makefile
+++ b/drivers/firmware/imx/Makefile
@@ -1,3 +1,3 @@
# SPDX-License-Identifier: GPL-2.0
-obj-$(CONFIG_IMX_SCU) += imx-scu.o misc.o
+obj-$(CONFIG_IMX_SCU) += imx-scu.o misc.o imx-scu-irq.o
obj-$(CONFIG_IMX_SCU_PD) += scu-pd.o

drivers/firmware/imx/imx-scu-irq.c

View file
diff --git a/drivers/firmware/imx/imx-scu-irq.c b/drivers/firmware/imx/imx-scu-irq.c
new file mode 100644
index 0000000..043833a
--- /dev/null
+++ b/drivers/firmware/imx/imx-scu-irq.c
@@ -0,0 +1,168 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2019 NXP
+ *
+ * Implementation of the SCU IRQ functions using MU.
+ *
+ */
+
+#include <dt-bindings/firmware/imx/rsrc.h>
+#include <linux/firmware/imx/ipc.h>
+#include <linux/mailbox_client.h>
+
+#define IMX_SC_IRQ_FUNC_ENABLE 1
+#define IMX_SC_IRQ_FUNC_STATUS 2
+#define IMX_SC_IRQ_NUM_GROUP 4
+
+static u32 mu_resource_id;
+
+struct imx_sc_msg_irq_get_status {
+ struct imx_sc_rpc_msg hdr;
+ union {
+ struct {
+ u16 resource;
+ u8 group;
+ u8 reserved;
+ } __packed req;
+ struct {
+ u32 status;
+ } resp;
+ } data;
+};
+
+struct imx_sc_msg_irq_enable {
+ struct imx_sc_rpc_msg hdr;
+ u32 mask;
+ u16 resource;
+ u8 group;
+ u8 enable;
+} __packed;
+
+static struct imx_sc_ipc *imx_sc_irq_ipc_handle;
+static struct work_struct imx_sc_irq_work;

This diff is incomplete. Download the complete patch.

drivers/firmware/imx/imx-scu.c

View file

This diff is incomplete. Download the complete patch.

drivers/firmware/imx/scu-pd.c

View file

This diff is incomplete. Download the complete patch.

drivers/firmware/xilinx/zynqmp-debug.c

View file

This diff is incomplete. Download the complete patch.

drivers/firmware/xilinx/zynqmp.c

View file

This diff is incomplete. Download the complete patch.

drivers/fpga/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/fpga/Makefile

View file

This diff is incomplete. Download the complete patch.

drivers/fpga/zynqmp-fpga.c

View file

This diff is incomplete. Download the complete patch.

drivers/memory/emif.h

View file

This diff is incomplete. Download the complete patch.

drivers/memory/tegra/mc.c

View file

This diff is incomplete. Download the complete patch.

drivers/memory/tegra/mc.h

View file

This diff is incomplete. Download the complete patch.

drivers/memory/tegra/tegra114.c

View file

This diff is incomplete. Download the complete patch.

drivers/memory/tegra/tegra124.c

View file

This diff is incomplete. Download the complete patch.

drivers/memory/tegra/tegra20.c

View file

This diff is incomplete. Download the complete patch.

drivers/memory/tegra/tegra210.c

View file

This diff is incomplete. Download the complete patch.

drivers/memory/tegra/tegra30.c

View file

This diff is incomplete. Download the complete patch.

drivers/memory/ti-emif-pm.c

View file

This diff is incomplete. Download the complete patch.

drivers/memory/ti-emif-sram-pm.S

View file

This diff is incomplete. Download the complete patch.

drivers/misc/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/misc/Makefile

View file

This diff is incomplete. Download the complete patch.

drivers/nvmem/zynqmp_nvmem.c

View file

This diff is incomplete. Download the complete patch.

drivers/reset/reset-zynqmp.c

View file

This diff is incomplete. Download the complete patch.

drivers/rtc/rtc-omap.c

View file

This diff is incomplete. Download the complete patch.

drivers/soc/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/soc/Makefile

View file

This diff is incomplete. Download the complete patch.

drivers/soc/amlogic/meson-gx-pwrc-vpu.c

View file

This diff is incomplete. Download the complete patch.

drivers/soc/amlogic/meson-gx-socinfo.c

View file

This diff is incomplete. Download the complete patch.

drivers/soc/aspeed/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/soc/aspeed/Makefile

View file

This diff is incomplete. Download the complete patch.

drivers/soc/aspeed/aspeed-lpc-ctrl.c

View file

This diff is incomplete. Download the complete patch.

drivers/soc/aspeed/aspeed-lpc-snoop.c

View file

This diff is incomplete. Download the complete patch.

drivers/soc/aspeed/aspeed-p2a-ctrl.c

View file

This diff is incomplete. Download the complete patch.

drivers/soc/imx/Makefile

View file

This diff is incomplete. Download the complete patch.

drivers/soc/imx/gpc.c

View file

This diff is incomplete. Download the complete patch.

drivers/soc/imx/gpcv2.c

View file

This diff is incomplete. Download the complete patch.

drivers/soc/imx/soc-imx8.c

View file

This diff is incomplete. Download the complete patch.

drivers/soc/mediatek/mtk-pmic-wrap.c

View file

This diff is incomplete. Download the complete patch.

drivers/soc/qcom/cmd-db.c

View file

This diff is incomplete. Download the complete patch.

drivers/soc/qcom/qmi_interface.c

View file

This diff is incomplete. Download the complete patch.

drivers/soc/qcom/rmtfs_mem.c

View file

This diff is incomplete. Download the complete patch.

drivers/soc/qcom/rpmh-rsc.c

View file

This diff is incomplete. Download the complete patch.

drivers/soc/renesas/renesas-soc.c

View file

This diff is incomplete. Download the complete patch.

drivers/soc/rockchip/grf.c

View file

This diff is incomplete. Download the complete patch.

drivers/soc/tegra/pmc.c

View file

This diff is incomplete. Download the complete patch.

drivers/soc/ti/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/soc/ti/pm33xx.c

View file

This diff is incomplete. Download the complete patch.

drivers/soc/xilinx/zynqmp_pm_domains.c

View file

This diff is incomplete. Download the complete patch.

drivers/soc/xilinx/zynqmp_power.c

View file

This diff is incomplete. Download the complete patch.

drivers/spi/spi-zynqmp-gqspi.c

View file

This diff is incomplete. Download the complete patch.

drivers/tee/optee/core.c

View file

This diff is incomplete. Download the complete patch.

include/linux/firmware/imx/sci.h

View file

This diff is incomplete. Download the complete patch.

include/linux/firmware/xlnx-zynqmp.h

View file

This diff is incomplete. Download the complete patch.

include/linux/platform_data/pm33xx.h

View file

This diff is incomplete. Download the complete patch.

include/linux/reset.h

View file

This diff is incomplete. Download the complete patch.

include/linux/rtc/rtc-omap.h

View file

This diff is incomplete. Download the complete patch.

include/linux/ti-emif-sram.h

View file

This diff is incomplete. Download the complete patch.