Skip to content

Commit b326272

Browse files
committed
Merge tag 'armsoc-late' of git://git.kernel.org/pub/scm/linux/kernel/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
2 parents 1bc2767 + 1aa55ca commit b326272

File tree

20 files changed

+257
-30
lines changed

20 files changed

+257
-30
lines changed

Documentation/devicetree/bindings/arm/cpu-capacity.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ cpus {
9494
};
9595

9696
idle-states {
97-
entry-method = "arm,psci";
97+
entry-method = "psci";
9898

9999
CPU_SLEEP_0: cpu-sleep-0 {
100100
compatible = "arm,idle-state";

Documentation/devicetree/bindings/arm/idle-states.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,8 @@ processor idle states, defined as device tree nodes, are listed.
237237
Value type: <stringlist>
238238
Usage and definition depend on ARM architecture version.
239239
# On ARM v8 64-bit this property is required and must
240-
be one of:
241-
- "psci" (see bindings in [2])
240+
be:
241+
- "psci"
242242
# On ARM 32-bit systems this property is optional
243243

244244
The nodes describing the idle states (state) can only be defined within the
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
* Amlogic audio memory arbiter controller
2+
3+
The Amlogic Audio ARB is a simple device which enables or
4+
disables the access of Audio FIFOs to DDR on AXG based SoC.
5+
6+
Required properties:
7+
- compatible: 'amlogic,meson-axg-audio-arb'
8+
- reg: physical base address of the controller and length of memory
9+
mapped region.
10+
- clocks: phandle to the fifo peripheral clock provided by the audio
11+
clock controller.
12+
- #reset-cells: must be 1.
13+
14+
Example on the A113 SoC:
15+
16+
arb: reset-controller@280 {
17+
compatible = "amlogic,meson-axg-audio-arb";
18+
reg = <0x0 0x280 0x0 0x4>;
19+
#reset-cells = <1>;
20+
clocks = <&clkc_audio AUD_CLKID_DDR_ARB>;
21+
};

arch/arm/mach-rockchip/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ config ARCH_ROCKCHIP
1717
select ARM_GLOBAL_TIMER
1818
select CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK
1919
select ZONE_DMA if ARM_LPAE
20+
select PM
2021
help
2122
Support for Rockchip's Cortex-A9 Single-to-Quad-Core-SoCs
2223
containing the RK2928, RK30xx and RK31xx series.

arch/arm64/Kconfig.platforms

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ config ARCH_ROCKCHIP
158158
select GPIOLIB
159159
select PINCTRL
160160
select PINCTRL_ROCKCHIP
161+
select PM
161162
select ROCKCHIP_TIMER
162163
help
163164
This enables support for the ARMv8 based Rockchip chipsets,

arch/arm64/boot/dts/arm/juno-r1.dts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
};
6464

6565
idle-states {
66-
entry-method = "arm,psci";
66+
entry-method = "psci";
6767

6868
CPU_SLEEP_0: cpu-sleep-0 {
6969
compatible = "arm,idle-state";

arch/arm64/boot/dts/arm/juno-r2.dts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
};
6464

6565
idle-states {
66-
entry-method = "arm,psci";
66+
entry-method = "psci";
6767

6868
CPU_SLEEP_0: cpu-sleep-0 {
6969
compatible = "arm,idle-state";

arch/arm64/boot/dts/arm/juno.dts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
};
6363

6464
idle-states {
65-
entry-method = "arm,psci";
65+
entry-method = "psci";
6666

6767
CPU_SLEEP_0: cpu-sleep-0 {
6868
compatible = "arm,idle-state";

arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
* PSCI node is not added default, U-boot will add missing
4444
* parts if it determines to use PSCI.
4545
*/
46-
entry-method = "arm,psci";
46+
entry-method = "psci";
4747

4848
CPU_PH20: cpu-ph20 {
4949
compatible = "arm,idle-state";

arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
* PSCI node is not added default, U-boot will add missing
8888
* parts if it determines to use PSCI.
8989
*/
90-
entry-method = "arm,psci";
90+
entry-method = "psci";
9191

9292
CPU_PH20: cpu-ph20 {
9393
compatible = "arm,idle-state";

arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
* PSCI node is not added default, U-boot will add missing
8484
* parts if it determines to use PSCI.
8585
*/
86-
entry-method = "arm,psci";
86+
entry-method = "psci";
8787

8888
CPU_PH20: cpu-ph20 {
8989
compatible = "arm,idle-state";

arch/arm64/boot/dts/mediatek/mt2712e.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
};
120120

121121
idle-states {
122-
entry-method = "arm,psci";
122+
entry-method = "psci";
123123

124124
CPU_SLEEP_0: cpu-sleep-0 {
125125
compatible = "arm,idle-state";

arch/arm64/boot/dts/sprd/sc9860.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
};
115115

116116
idle-states{
117-
entry-method = "arm,psci";
117+
entry-method = "psci";
118118

119119
CORE_PD: core_pd {
120120
compatible = "arm,idle-state";

arch/arm64/boot/dts/xilinx/zynqmp.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
};
5959

6060
idle-states {
61-
entry-method = "arm,psci";
61+
entry-method = "psci";
6262

6363
CPU_SLEEP_0: cpu-sleep-0 {
6464
compatible = "arm,idle-state";

drivers/iommu/rockchip-iommu.c

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -521,10 +521,11 @@ static irqreturn_t rk_iommu_irq(int irq, void *dev_id)
521521
u32 int_status;
522522
dma_addr_t iova;
523523
irqreturn_t ret = IRQ_NONE;
524-
int i;
524+
int i, err;
525525

526-
if (WARN_ON(!pm_runtime_get_if_in_use(iommu->dev)))
527-
return 0;
526+
err = pm_runtime_get_if_in_use(iommu->dev);
527+
if (WARN_ON_ONCE(err <= 0))
528+
return ret;
528529

529530
if (WARN_ON(clk_bulk_enable(iommu->num_clocks, iommu->clocks)))
530531
goto out;
@@ -620,11 +621,15 @@ static void rk_iommu_zap_iova(struct rk_iommu_domain *rk_domain,
620621
spin_lock_irqsave(&rk_domain->iommus_lock, flags);
621622
list_for_each(pos, &rk_domain->iommus) {
622623
struct rk_iommu *iommu;
624+
int ret;
623625

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

626628
/* Only zap TLBs of IOMMUs that are powered on. */
627-
if (pm_runtime_get_if_in_use(iommu->dev)) {
629+
ret = pm_runtime_get_if_in_use(iommu->dev);
630+
if (WARN_ON_ONCE(ret < 0))
631+
continue;
632+
if (ret) {
628633
WARN_ON(clk_bulk_enable(iommu->num_clocks,
629634
iommu->clocks));
630635
rk_iommu_zap_lines(iommu, iova, size);
@@ -891,6 +896,7 @@ static void rk_iommu_detach_device(struct iommu_domain *domain,
891896
struct rk_iommu *iommu;
892897
struct rk_iommu_domain *rk_domain = to_rk_domain(domain);
893898
unsigned long flags;
899+
int ret;
894900

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

912-
if (pm_runtime_get_if_in_use(iommu->dev)) {
918+
ret = pm_runtime_get_if_in_use(iommu->dev);
919+
WARN_ON_ONCE(ret < 0);
920+
if (ret > 0) {
913921
rk_iommu_disable(iommu);
914922
pm_runtime_put(iommu->dev);
915923
}
@@ -946,7 +954,8 @@ static int rk_iommu_attach_device(struct iommu_domain *domain,
946954
list_add_tail(&iommu->node, &rk_domain->iommus);
947955
spin_unlock_irqrestore(&rk_domain->iommus_lock, flags);
948956

949-
if (!pm_runtime_get_if_in_use(iommu->dev))
957+
ret = pm_runtime_get_if_in_use(iommu->dev);
958+
if (!ret || WARN_ON_ONCE(ret < 0))
950959
return 0;
951960

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

1154-
i = 0;
1155-
while ((irq = platform_get_irq(pdev, i++)) != -ENXIO) {
1156-
if (irq < 0)
1157-
return irq;
1158-
1159-
err = devm_request_irq(iommu->dev, irq, rk_iommu_irq,
1160-
IRQF_SHARED, dev_name(dev), iommu);
1161-
if (err)
1162-
return err;
1163-
}
1164-
11651163
iommu->reset_disabled = device_property_read_bool(dev,
11661164
"rockchip,disable-mmu-reset");
11671165

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

12191217
pm_runtime_enable(dev);
12201218

1219+
i = 0;
1220+
while ((irq = platform_get_irq(pdev, i++)) != -ENXIO) {
1221+
if (irq < 0)
1222+
return irq;
1223+
1224+
err = devm_request_irq(iommu->dev, irq, rk_iommu_irq,
1225+
IRQF_SHARED, dev_name(dev), iommu);
1226+
if (err) {
1227+
pm_runtime_disable(dev);
1228+
goto err_remove_sysfs;
1229+
}
1230+
}
1231+
12211232
return 0;
12221233
err_remove_sysfs:
12231234
iommu_device_sysfs_remove(&iommu->iommu);

drivers/reset/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,13 @@ config RESET_MESON
7373
help
7474
This enables the reset driver for Amlogic Meson SoCs.
7575

76+
config RESET_MESON_AUDIO_ARB
77+
tristate "Meson Audio Memory Arbiter Reset Driver"
78+
depends on ARCH_MESON || COMPILE_TEST
79+
help
80+
This enables the reset driver for Audio Memory Arbiter of
81+
Amlogic's A113 based SoCs
82+
7683
config RESET_OXNAS
7784
bool
7885

drivers/reset/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ obj-$(CONFIG_RESET_IMX7) += reset-imx7.o
1212
obj-$(CONFIG_RESET_LANTIQ) += reset-lantiq.o
1313
obj-$(CONFIG_RESET_LPC18XX) += reset-lpc18xx.o
1414
obj-$(CONFIG_RESET_MESON) += reset-meson.o
15+
obj-$(CONFIG_RESET_MESON_AUDIO_ARB) += reset-meson-audio-arb.o
1516
obj-$(CONFIG_RESET_OXNAS) += reset-oxnas.o
1617
obj-$(CONFIG_RESET_PISTACHIO) += reset-pistachio.o
1718
obj-$(CONFIG_RESET_QCOM_AOSS) += reset-qcom-aoss.o

drivers/reset/reset-imx7.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ static int imx7_reset_set(struct reset_controller_dev *rcdev,
8181
{
8282
struct imx7_src *imx7src = to_imx7_src(rcdev);
8383
const struct imx7_src_signal *signal = &imx7_src_signals[id];
84-
unsigned int value = 0;
84+
unsigned int value = assert ? signal->bit : 0;
8585

8686
switch (id) {
8787
case IMX7_RESET_PCIEPHY:

0 commit comments

Comments
 (0)