Skip to content

Commit

Permalink
Merge tag 'armsoc-late' of git://git.kernel.org/pub/scm/linux/kernel/…
Browse files Browse the repository at this point in the history
…git/arm/arm-soc

Pull ARM SoC late updates from Olof Johansson:
 "A couple of late-merged changes that would be useful to get in this
  merge window:

   - Driver support for reset of audio complex on Meson platforms. The
     audio driver went in this merge window, and these changes have been
     in -next for a while (just not in our tree).

   - Power management fixes for IOMMU on Rockchip platforms, getting
     closer to kexec working on them, including Chromebooks.

   - Another pass updating "arm,psci" -> "psci" for some properties that
     have snuck in since last time it was done"

* tag 'armsoc-late' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  iommu/rockchip: Move irq request past pm_runtime_enable
  iommu/rockchip: Handle errors returned from PM framework
  arm64: rockchip: Force CONFIG_PM on Rockchip systems
  ARM: rockchip: Force CONFIG_PM on Rockchip systems
  arm64: dts: Fix various entry-method properties to reflect documentation
  reset: imx7: Fix always writing bits as 0
  reset: meson: add meson audio arb driver
  reset: meson: add dt-bindings for meson-axg audio arb
  • Loading branch information
torvalds committed Aug 25, 2018
2 parents 1bc2767 + 1aa55ca commit b326272
Show file tree
Hide file tree
Showing 20 changed files with 257 additions and 30 deletions.
2 changes: 1 addition & 1 deletion Documentation/devicetree/bindings/arm/cpu-capacity.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ cpus {
};

idle-states {
entry-method = "arm,psci";
entry-method = "psci";

CPU_SLEEP_0: cpu-sleep-0 {
compatible = "arm,idle-state";
Expand Down
4 changes: 2 additions & 2 deletions Documentation/devicetree/bindings/arm/idle-states.txt
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@ processor idle states, defined as device tree nodes, are listed.
Value type: <stringlist>
Usage and definition depend on ARM architecture version.
# On ARM v8 64-bit this property is required and must
be one of:
- "psci" (see bindings in [2])
be:
- "psci"
# On ARM 32-bit systems this property is optional

The nodes describing the idle states (state) can only be defined within the
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
* Amlogic audio memory arbiter controller

The Amlogic Audio ARB is a simple device which enables or
disables the access of Audio FIFOs to DDR on AXG based SoC.

Required properties:
- compatible: 'amlogic,meson-axg-audio-arb'
- reg: physical base address of the controller and length of memory
mapped region.
- clocks: phandle to the fifo peripheral clock provided by the audio
clock controller.
- #reset-cells: must be 1.

Example on the A113 SoC:

arb: reset-controller@280 {
compatible = "amlogic,meson-axg-audio-arb";
reg = <0x0 0x280 0x0 0x4>;
#reset-cells = <1>;
clocks = <&clkc_audio AUD_CLKID_DDR_ARB>;
};
1 change: 1 addition & 0 deletions arch/arm/mach-rockchip/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ config ARCH_ROCKCHIP
select ARM_GLOBAL_TIMER
select CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK
select ZONE_DMA if ARM_LPAE
select PM
help
Support for Rockchip's Cortex-A9 Single-to-Quad-Core-SoCs
containing the RK2928, RK30xx and RK31xx series.
1 change: 1 addition & 0 deletions arch/arm64/Kconfig.platforms
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ config ARCH_ROCKCHIP
select GPIOLIB
select PINCTRL
select PINCTRL_ROCKCHIP
select PM
select ROCKCHIP_TIMER
help
This enables support for the ARMv8 based Rockchip chipsets,
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/arm/juno-r1.dts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
};

idle-states {
entry-method = "arm,psci";
entry-method = "psci";

CPU_SLEEP_0: cpu-sleep-0 {
compatible = "arm,idle-state";
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/arm/juno-r2.dts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
};

idle-states {
entry-method = "arm,psci";
entry-method = "psci";

CPU_SLEEP_0: cpu-sleep-0 {
compatible = "arm,idle-state";
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/arm/juno.dts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
};

idle-states {
entry-method = "arm,psci";
entry-method = "psci";

CPU_SLEEP_0: cpu-sleep-0 {
compatible = "arm,idle-state";
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
* PSCI node is not added default, U-boot will add missing
* parts if it determines to use PSCI.
*/
entry-method = "arm,psci";
entry-method = "psci";

CPU_PH20: cpu-ph20 {
compatible = "arm,idle-state";
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
* PSCI node is not added default, U-boot will add missing
* parts if it determines to use PSCI.
*/
entry-method = "arm,psci";
entry-method = "psci";

CPU_PH20: cpu-ph20 {
compatible = "arm,idle-state";
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
* PSCI node is not added default, U-boot will add missing
* parts if it determines to use PSCI.
*/
entry-method = "arm,psci";
entry-method = "psci";

CPU_PH20: cpu-ph20 {
compatible = "arm,idle-state";
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/mediatek/mt2712e.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
};

idle-states {
entry-method = "arm,psci";
entry-method = "psci";

CPU_SLEEP_0: cpu-sleep-0 {
compatible = "arm,idle-state";
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/sprd/sc9860.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
};

idle-states{
entry-method = "arm,psci";
entry-method = "psci";

CORE_PD: core_pd {
compatible = "arm,idle-state";
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/xilinx/zynqmp.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
};

idle-states {
entry-method = "arm,psci";
entry-method = "psci";

CPU_SLEEP_0: cpu-sleep-0 {
compatible = "arm,idle-state";
Expand Down
45 changes: 28 additions & 17 deletions drivers/iommu/rockchip-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -521,10 +521,11 @@ static irqreturn_t rk_iommu_irq(int irq, void *dev_id)
u32 int_status;
dma_addr_t iova;
irqreturn_t ret = IRQ_NONE;
int i;
int i, err;

if (WARN_ON(!pm_runtime_get_if_in_use(iommu->dev)))
return 0;
err = pm_runtime_get_if_in_use(iommu->dev);
if (WARN_ON_ONCE(err <= 0))
return ret;

if (WARN_ON(clk_bulk_enable(iommu->num_clocks, iommu->clocks)))
goto out;
Expand Down Expand Up @@ -620,11 +621,15 @@ static void rk_iommu_zap_iova(struct rk_iommu_domain *rk_domain,
spin_lock_irqsave(&rk_domain->iommus_lock, flags);
list_for_each(pos, &rk_domain->iommus) {
struct rk_iommu *iommu;
int ret;

iommu = list_entry(pos, struct rk_iommu, node);

/* Only zap TLBs of IOMMUs that are powered on. */
if (pm_runtime_get_if_in_use(iommu->dev)) {
ret = pm_runtime_get_if_in_use(iommu->dev);
if (WARN_ON_ONCE(ret < 0))
continue;
if (ret) {
WARN_ON(clk_bulk_enable(iommu->num_clocks,
iommu->clocks));
rk_iommu_zap_lines(iommu, iova, size);
Expand Down Expand Up @@ -891,6 +896,7 @@ static void rk_iommu_detach_device(struct iommu_domain *domain,
struct rk_iommu *iommu;
struct rk_iommu_domain *rk_domain = to_rk_domain(domain);
unsigned long flags;
int ret;

/* Allow 'virtual devices' (eg drm) to detach from domain */
iommu = rk_iommu_from_dev(dev);
Expand All @@ -909,7 +915,9 @@ static void rk_iommu_detach_device(struct iommu_domain *domain,
list_del_init(&iommu->node);
spin_unlock_irqrestore(&rk_domain->iommus_lock, flags);

if (pm_runtime_get_if_in_use(iommu->dev)) {
ret = pm_runtime_get_if_in_use(iommu->dev);
WARN_ON_ONCE(ret < 0);
if (ret > 0) {
rk_iommu_disable(iommu);
pm_runtime_put(iommu->dev);
}
Expand Down Expand Up @@ -946,7 +954,8 @@ static int rk_iommu_attach_device(struct iommu_domain *domain,
list_add_tail(&iommu->node, &rk_domain->iommus);
spin_unlock_irqrestore(&rk_domain->iommus_lock, flags);

if (!pm_runtime_get_if_in_use(iommu->dev))
ret = pm_runtime_get_if_in_use(iommu->dev);
if (!ret || WARN_ON_ONCE(ret < 0))
return 0;

ret = rk_iommu_enable(iommu);
Expand Down Expand Up @@ -1151,17 +1160,6 @@ static int rk_iommu_probe(struct platform_device *pdev)
if (iommu->num_mmu == 0)
return PTR_ERR(iommu->bases[0]);

i = 0;
while ((irq = platform_get_irq(pdev, i++)) != -ENXIO) {
if (irq < 0)
return irq;

err = devm_request_irq(iommu->dev, irq, rk_iommu_irq,
IRQF_SHARED, dev_name(dev), iommu);
if (err)
return err;
}

iommu->reset_disabled = device_property_read_bool(dev,
"rockchip,disable-mmu-reset");

Expand Down Expand Up @@ -1218,6 +1216,19 @@ static int rk_iommu_probe(struct platform_device *pdev)

pm_runtime_enable(dev);

i = 0;
while ((irq = platform_get_irq(pdev, i++)) != -ENXIO) {
if (irq < 0)
return irq;

err = devm_request_irq(iommu->dev, irq, rk_iommu_irq,
IRQF_SHARED, dev_name(dev), iommu);
if (err) {
pm_runtime_disable(dev);
goto err_remove_sysfs;
}
}

return 0;
err_remove_sysfs:
iommu_device_sysfs_remove(&iommu->iommu);
Expand Down
7 changes: 7 additions & 0 deletions drivers/reset/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ config RESET_MESON
help
This enables the reset driver for Amlogic Meson SoCs.

config RESET_MESON_AUDIO_ARB
tristate "Meson Audio Memory Arbiter Reset Driver"
depends on ARCH_MESON || COMPILE_TEST
help
This enables the reset driver for Audio Memory Arbiter of
Amlogic's A113 based SoCs

config RESET_OXNAS
bool

Expand Down
1 change: 1 addition & 0 deletions drivers/reset/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ obj-$(CONFIG_RESET_IMX7) += reset-imx7.o
obj-$(CONFIG_RESET_LANTIQ) += reset-lantiq.o
obj-$(CONFIG_RESET_LPC18XX) += reset-lpc18xx.o
obj-$(CONFIG_RESET_MESON) += reset-meson.o
obj-$(CONFIG_RESET_MESON_AUDIO_ARB) += reset-meson-audio-arb.o
obj-$(CONFIG_RESET_OXNAS) += reset-oxnas.o
obj-$(CONFIG_RESET_PISTACHIO) += reset-pistachio.o
obj-$(CONFIG_RESET_QCOM_AOSS) += reset-qcom-aoss.o
Expand Down
2 changes: 1 addition & 1 deletion drivers/reset/reset-imx7.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ static int imx7_reset_set(struct reset_controller_dev *rcdev,
{
struct imx7_src *imx7src = to_imx7_src(rcdev);
const struct imx7_src_signal *signal = &imx7_src_signals[id];
unsigned int value = 0;
unsigned int value = assert ? signal->bit : 0;

switch (id) {
case IMX7_RESET_PCIEPHY:
Expand Down
Loading

0 comments on commit b326272

Please sign in to comment.