Skip to content

Commit d992fe5

Browse files
committed
Merge tag 'soc-fixes-5.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
Pull ARM SoC fixes from Arnd Bergmann: "Not much to see here. Half the fixes this time are for Qualcomm dts files, fixing small mistakes on certain machines. The other fixes are: - A 5.13 regression fix for freescale QE interrupt controller\ - A fix for TI OMAP gpt12 timer error handling - A randconfig build regression fix for ixp4xx - Another defconfig fix following the CONFIG_FB dependency rework" * tag 'soc-fixes-5.14-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: soc: fsl: qe: fix static checker warning ARM: ixp4xx: fix building both pci drivers ARM: configs: Update the nhk8815_defconfig bus: ti-sysc: Fix error handling for sysc_check_active_timer() soc: fsl: qe: convert QE interrupt controller to platform_device arm64: dts: qcom: sdm845-oneplus: fix reserved-mem arm64: dts: qcom: msm8994-angler: Disable cont_splash_mem arm64: dts: qcom: sc7280: Fixup cpufreq domain info for cpu7 arm64: dts: qcom: msm8992-bullhead: Fix cont_splash_mem mapping arm64: dts: qcom: msm8992-bullhead: Remove PSCI arm64: dts: qcom: c630: fix correct powerdown pin for WSA881x
2 parents f87d643 + 1e16a40 commit d992fe5

File tree

10 files changed

+103
-75
lines changed

10 files changed

+103
-75
lines changed

arch/arm/configs/nhk8815_defconfig

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ CONFIG_SLAB=y
1515
CONFIG_ARCH_NOMADIK=y
1616
CONFIG_MACH_NOMADIK_8815NHK=y
1717
CONFIG_AEABI=y
18-
CONFIG_ZBOOT_ROM_TEXT=0x0
19-
CONFIG_ZBOOT_ROM_BSS=0x0
2018
CONFIG_MODULES=y
2119
CONFIG_MODULE_UNLOAD=y
2220
# CONFIG_BLK_DEV_BSG is not set
@@ -52,9 +50,9 @@ CONFIG_MTD_BLOCK=y
5250
CONFIG_MTD_ONENAND=y
5351
CONFIG_MTD_ONENAND_VERIFY_WRITE=y
5452
CONFIG_MTD_ONENAND_GENERIC=y
55-
CONFIG_MTD_NAND_ECC_SW_HAMMING_SMC=y
5653
CONFIG_MTD_RAW_NAND=y
5754
CONFIG_MTD_NAND_FSMC=y
55+
CONFIG_MTD_NAND_ECC_SW_HAMMING_SMC=y
5856
CONFIG_BLK_DEV_LOOP=y
5957
CONFIG_BLK_DEV_CRYPTOLOOP=y
6058
CONFIG_BLK_DEV_RAM=y
@@ -97,6 +95,7 @@ CONFIG_REGULATOR=y
9795
CONFIG_DRM=y
9896
CONFIG_DRM_PANEL_TPO_TPG110=y
9997
CONFIG_DRM_PL111=y
98+
CONFIG_FB=y
10099
CONFIG_BACKLIGHT_CLASS_DEVICE=y
101100
CONFIG_BACKLIGHT_PWM=y
102101
CONFIG_FRAMEBUFFER_CONSOLE=y
@@ -136,9 +135,8 @@ CONFIG_NLS_ISO8859_15=y
136135
CONFIG_CRYPTO_MD5=y
137136
CONFIG_CRYPTO_SHA1=y
138137
CONFIG_CRYPTO_DES=y
138+
# CONFIG_DEBUG_BUGVERBOSE is not set
139139
CONFIG_DEBUG_INFO=y
140-
# CONFIG_ENABLE_MUST_CHECK is not set
141140
CONFIG_DEBUG_FS=y
142141
# CONFIG_SCHED_DEBUG is not set
143142
# CONFIG_DEBUG_PREEMPT is not set
144-
# CONFIG_DEBUG_BUGVERBOSE is not set

arch/arm/mach-ixp4xx/include/mach/ixp4xx-regs.h

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -218,30 +218,30 @@
218218
/*
219219
* PCI Control/Status Registers
220220
*/
221-
#define IXP4XX_PCI_CSR(x) ((volatile u32 *)(IXP4XX_PCI_CFG_BASE_VIRT+(x)))
222-
223-
#define PCI_NP_AD IXP4XX_PCI_CSR(PCI_NP_AD_OFFSET)
224-
#define PCI_NP_CBE IXP4XX_PCI_CSR(PCI_NP_CBE_OFFSET)
225-
#define PCI_NP_WDATA IXP4XX_PCI_CSR(PCI_NP_WDATA_OFFSET)
226-
#define PCI_NP_RDATA IXP4XX_PCI_CSR(PCI_NP_RDATA_OFFSET)
227-
#define PCI_CRP_AD_CBE IXP4XX_PCI_CSR(PCI_CRP_AD_CBE_OFFSET)
228-
#define PCI_CRP_WDATA IXP4XX_PCI_CSR(PCI_CRP_WDATA_OFFSET)
229-
#define PCI_CRP_RDATA IXP4XX_PCI_CSR(PCI_CRP_RDATA_OFFSET)
230-
#define PCI_CSR IXP4XX_PCI_CSR(PCI_CSR_OFFSET)
231-
#define PCI_ISR IXP4XX_PCI_CSR(PCI_ISR_OFFSET)
232-
#define PCI_INTEN IXP4XX_PCI_CSR(PCI_INTEN_OFFSET)
233-
#define PCI_DMACTRL IXP4XX_PCI_CSR(PCI_DMACTRL_OFFSET)
234-
#define PCI_AHBMEMBASE IXP4XX_PCI_CSR(PCI_AHBMEMBASE_OFFSET)
235-
#define PCI_AHBIOBASE IXP4XX_PCI_CSR(PCI_AHBIOBASE_OFFSET)
236-
#define PCI_PCIMEMBASE IXP4XX_PCI_CSR(PCI_PCIMEMBASE_OFFSET)
237-
#define PCI_AHBDOORBELL IXP4XX_PCI_CSR(PCI_AHBDOORBELL_OFFSET)
238-
#define PCI_PCIDOORBELL IXP4XX_PCI_CSR(PCI_PCIDOORBELL_OFFSET)
239-
#define PCI_ATPDMA0_AHBADDR IXP4XX_PCI_CSR(PCI_ATPDMA0_AHBADDR_OFFSET)
240-
#define PCI_ATPDMA0_PCIADDR IXP4XX_PCI_CSR(PCI_ATPDMA0_PCIADDR_OFFSET)
241-
#define PCI_ATPDMA0_LENADDR IXP4XX_PCI_CSR(PCI_ATPDMA0_LENADDR_OFFSET)
242-
#define PCI_ATPDMA1_AHBADDR IXP4XX_PCI_CSR(PCI_ATPDMA1_AHBADDR_OFFSET)
243-
#define PCI_ATPDMA1_PCIADDR IXP4XX_PCI_CSR(PCI_ATPDMA1_PCIADDR_OFFSET)
244-
#define PCI_ATPDMA1_LENADDR IXP4XX_PCI_CSR(PCI_ATPDMA1_LENADDR_OFFSET)
221+
#define _IXP4XX_PCI_CSR(x) ((volatile u32 *)(IXP4XX_PCI_CFG_BASE_VIRT+(x)))
222+
223+
#define PCI_NP_AD _IXP4XX_PCI_CSR(PCI_NP_AD_OFFSET)
224+
#define PCI_NP_CBE _IXP4XX_PCI_CSR(PCI_NP_CBE_OFFSET)
225+
#define PCI_NP_WDATA _IXP4XX_PCI_CSR(PCI_NP_WDATA_OFFSET)
226+
#define PCI_NP_RDATA _IXP4XX_PCI_CSR(PCI_NP_RDATA_OFFSET)
227+
#define PCI_CRP_AD_CBE _IXP4XX_PCI_CSR(PCI_CRP_AD_CBE_OFFSET)
228+
#define PCI_CRP_WDATA _IXP4XX_PCI_CSR(PCI_CRP_WDATA_OFFSET)
229+
#define PCI_CRP_RDATA _IXP4XX_PCI_CSR(PCI_CRP_RDATA_OFFSET)
230+
#define PCI_CSR _IXP4XX_PCI_CSR(PCI_CSR_OFFSET)
231+
#define PCI_ISR _IXP4XX_PCI_CSR(PCI_ISR_OFFSET)
232+
#define PCI_INTEN _IXP4XX_PCI_CSR(PCI_INTEN_OFFSET)
233+
#define PCI_DMACTRL _IXP4XX_PCI_CSR(PCI_DMACTRL_OFFSET)
234+
#define PCI_AHBMEMBASE _IXP4XX_PCI_CSR(PCI_AHBMEMBASE_OFFSET)
235+
#define PCI_AHBIOBASE _IXP4XX_PCI_CSR(PCI_AHBIOBASE_OFFSET)
236+
#define PCI_PCIMEMBASE _IXP4XX_PCI_CSR(PCI_PCIMEMBASE_OFFSET)
237+
#define PCI_AHBDOORBELL _IXP4XX_PCI_CSR(PCI_AHBDOORBELL_OFFSET)
238+
#define PCI_PCIDOORBELL _IXP4XX_PCI_CSR(PCI_PCIDOORBELL_OFFSET)
239+
#define PCI_ATPDMA0_AHBADDR _IXP4XX_PCI_CSR(PCI_ATPDMA0_AHBADDR_OFFSET)
240+
#define PCI_ATPDMA0_PCIADDR _IXP4XX_PCI_CSR(PCI_ATPDMA0_PCIADDR_OFFSET)
241+
#define PCI_ATPDMA0_LENADDR _IXP4XX_PCI_CSR(PCI_ATPDMA0_LENADDR_OFFSET)
242+
#define PCI_ATPDMA1_AHBADDR _IXP4XX_PCI_CSR(PCI_ATPDMA1_AHBADDR_OFFSET)
243+
#define PCI_ATPDMA1_PCIADDR _IXP4XX_PCI_CSR(PCI_ATPDMA1_PCIADDR_OFFSET)
244+
#define PCI_ATPDMA1_LENADDR _IXP4XX_PCI_CSR(PCI_ATPDMA1_LENADDR_OFFSET)
245245

246246
/*
247247
* PCI register values and bit definitions

arch/arm64/boot/dts/qcom/msm8992-bullhead-rev-101.dts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// SPDX-License-Identifier: GPL-2.0-only
22
/* Copyright (c) 2015, LGE Inc. All rights reserved.
33
* Copyright (c) 2016, The Linux Foundation. All rights reserved.
4+
* Copyright (c) 2021, Petr Vorel <[email protected]>
45
*/
56

67
/dts-v1/;
@@ -9,6 +10,9 @@
910
#include "pm8994.dtsi"
1011
#include "pmi8994.dtsi"
1112

13+
/* cont_splash_mem has different memory mapping */
14+
/delete-node/ &cont_splash_mem;
15+
1216
/ {
1317
model = "LG Nexus 5X";
1418
compatible = "lg,bullhead", "qcom,msm8992";
@@ -17,6 +21,9 @@
1721
qcom,board-id = <0xb64 0>;
1822
qcom,pmic-id = <0x10009 0x1000A 0x0 0x0>;
1923

24+
/* Bullhead firmware doesn't support PSCI */
25+
/delete-node/ psci;
26+
2027
aliases {
2128
serial0 = &blsp1_uart2;
2229
};
@@ -38,6 +45,11 @@
3845
ftrace-size = <0x10000>;
3946
pmsg-size = <0x20000>;
4047
};
48+
49+
cont_splash_mem: memory@3400000 {
50+
reg = <0 0x03400000 0 0x1200000>;
51+
no-map;
52+
};
4153
};
4254
};
4355

arch/arm64/boot/dts/qcom/msm8994-angler-rev-101.dts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
// SPDX-License-Identifier: GPL-2.0-only
22
/* Copyright (c) 2015, Huawei Inc. All rights reserved.
33
* Copyright (c) 2016, The Linux Foundation. All rights reserved.
4+
* Copyright (c) 2021, Petr Vorel <[email protected]>
45
*/
56

67
/dts-v1/;
78

89
#include "msm8994.dtsi"
910

11+
/* Angler's firmware does not report where the memory is allocated */
12+
/delete-node/ &cont_splash_mem;
13+
1014
/ {
1115
model = "Huawei Nexus 6P";
1216
compatible = "huawei,angler", "qcom,msm8994";

arch/arm64/boot/dts/qcom/sc7280.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@
200200
&BIG_CPU_SLEEP_1
201201
&CLUSTER_SLEEP_0>;
202202
next-level-cache = <&L2_700>;
203-
qcom,freq-domain = <&cpufreq_hw 1>;
203+
qcom,freq-domain = <&cpufreq_hw 2>;
204204
#cooling-cells = <2>;
205205
L2_700: l2-cache {
206206
compatible = "cache";

arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
};
7070
rmtfs_upper_guard: memory@f5d01000 {
7171
no-map;
72-
reg = <0 0xf5d01000 0 0x2000>;
72+
reg = <0 0xf5d01000 0 0x1000>;
7373
};
7474

7575
/*
@@ -78,7 +78,7 @@
7878
*/
7979
removed_region: memory@88f00000 {
8080
no-map;
81-
reg = <0 0x88f00000 0 0x200000>;
81+
reg = <0 0x88f00000 0 0x1c00000>;
8282
};
8383

8484
ramoops: ramoops@ac300000 {

arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -700,15 +700,15 @@
700700
left_spkr: wsa8810-left{
701701
compatible = "sdw10217211000";
702702
reg = <0 3>;
703-
powerdown-gpios = <&wcdgpio 2 GPIO_ACTIVE_HIGH>;
703+
powerdown-gpios = <&wcdgpio 1 GPIO_ACTIVE_HIGH>;
704704
#thermal-sensor-cells = <0>;
705705
sound-name-prefix = "SpkrLeft";
706706
#sound-dai-cells = <0>;
707707
};
708708

709709
right_spkr: wsa8810-right{
710710
compatible = "sdw10217211000";
711-
powerdown-gpios = <&wcdgpio 3 GPIO_ACTIVE_HIGH>;
711+
powerdown-gpios = <&wcdgpio 2 GPIO_ACTIVE_HIGH>;
712712
reg = <0 4>;
713713
#thermal-sensor-cells = <0>;
714714
sound-name-prefix = "SpkrRight";

drivers/bus/ti-sysc.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3097,8 +3097,10 @@ static int sysc_probe(struct platform_device *pdev)
30973097
return error;
30983098

30993099
error = sysc_check_active_timer(ddata);
3100-
if (error == -EBUSY)
3100+
if (error == -ENXIO)
31013101
ddata->reserved = true;
3102+
else if (error)
3103+
return error;
31023104

31033105
error = sysc_get_clocks(ddata);
31043106
if (error)

drivers/pci/controller/pci-ixp4xx.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ static int ixp4xx_pci_check_master_abort(struct ixp4xx_pci *p)
145145
return 0;
146146
}
147147

148-
static int ixp4xx_pci_read(struct ixp4xx_pci *p, u32 addr, u32 cmd, u32 *data)
148+
static int ixp4xx_pci_read_indirect(struct ixp4xx_pci *p, u32 addr, u32 cmd, u32 *data)
149149
{
150150
ixp4xx_writel(p, IXP4XX_PCI_NP_AD, addr);
151151

@@ -170,7 +170,7 @@ static int ixp4xx_pci_read(struct ixp4xx_pci *p, u32 addr, u32 cmd, u32 *data)
170170
return ixp4xx_pci_check_master_abort(p);
171171
}
172172

173-
static int ixp4xx_pci_write(struct ixp4xx_pci *p, u32 addr, u32 cmd, u32 data)
173+
static int ixp4xx_pci_write_indirect(struct ixp4xx_pci *p, u32 addr, u32 cmd, u32 data)
174174
{
175175
ixp4xx_writel(p, IXP4XX_PCI_NP_AD, addr);
176176

@@ -308,7 +308,7 @@ static int ixp4xx_pci_read_config(struct pci_bus *bus, unsigned int devfn,
308308
dev_dbg(p->dev, "read_config from %d size %d dev %d:%d:%d address: %08x cmd: %08x\n",
309309
where, size, bus_num, PCI_SLOT(devfn), PCI_FUNC(devfn), addr, cmd);
310310

311-
ret = ixp4xx_pci_read(p, addr, cmd, &val);
311+
ret = ixp4xx_pci_read_indirect(p, addr, cmd, &val);
312312
if (ret)
313313
return PCIBIOS_DEVICE_NOT_FOUND;
314314

@@ -356,7 +356,7 @@ static int ixp4xx_pci_write_config(struct pci_bus *bus, unsigned int devfn,
356356
dev_dbg(p->dev, "write_config_byte %#x to %d size %d dev %d:%d:%d addr: %08x cmd %08x\n",
357357
value, where, size, bus_num, PCI_SLOT(devfn), PCI_FUNC(devfn), addr, cmd);
358358

359-
ret = ixp4xx_pci_write(p, addr, cmd, val);
359+
ret = ixp4xx_pci_write_indirect(p, addr, cmd, val);
360360
if (ret)
361361
return PCIBIOS_DEVICE_NOT_FOUND;
362362

drivers/soc/fsl/qe/qe_ic.c

Lines changed: 48 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include <linux/signal.h>
2424
#include <linux/device.h>
2525
#include <linux/spinlock.h>
26+
#include <linux/platform_device.h>
2627
#include <asm/irq.h>
2728
#include <asm/io.h>
2829
#include <soc/fsl/qe/qe.h>
@@ -53,8 +54,8 @@ struct qe_ic {
5354
struct irq_chip hc_irq;
5455

5556
/* VIRQ numbers of QE high/low irqs */
56-
unsigned int virq_high;
57-
unsigned int virq_low;
57+
int virq_high;
58+
int virq_low;
5859
};
5960

6061
/*
@@ -404,72 +405,83 @@ static void qe_ic_cascade_muxed_mpic(struct irq_desc *desc)
404405
chip->irq_eoi(&desc->irq_data);
405406
}
406407

407-
static void __init qe_ic_init(struct device_node *node)
408+
static int qe_ic_init(struct platform_device *pdev)
408409
{
410+
struct device *dev = &pdev->dev;
409411
void (*low_handler)(struct irq_desc *desc);
410412
void (*high_handler)(struct irq_desc *desc);
411413
struct qe_ic *qe_ic;
412-
struct resource res;
413-
u32 ret;
414+
struct resource *res;
415+
struct device_node *node = pdev->dev.of_node;
414416

415-
ret = of_address_to_resource(node, 0, &res);
416-
if (ret)
417-
return;
417+
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
418+
if (res == NULL) {
419+
dev_err(dev, "no memory resource defined\n");
420+
return -ENODEV;
421+
}
418422

419-
qe_ic = kzalloc(sizeof(*qe_ic), GFP_KERNEL);
423+
qe_ic = devm_kzalloc(dev, sizeof(*qe_ic), GFP_KERNEL);
420424
if (qe_ic == NULL)
421-
return;
425+
return -ENOMEM;
422426

423-
qe_ic->irqhost = irq_domain_add_linear(node, NR_QE_IC_INTS,
424-
&qe_ic_host_ops, qe_ic);
425-
if (qe_ic->irqhost == NULL) {
426-
kfree(qe_ic);
427-
return;
427+
qe_ic->regs = devm_ioremap(dev, res->start, resource_size(res));
428+
if (qe_ic->regs == NULL) {
429+
dev_err(dev, "failed to ioremap() registers\n");
430+
return -ENODEV;
428431
}
429432

430-
qe_ic->regs = ioremap(res.start, resource_size(&res));
431-
432433
qe_ic->hc_irq = qe_ic_irq_chip;
433434

434-
qe_ic->virq_high = irq_of_parse_and_map(node, 0);
435-
qe_ic->virq_low = irq_of_parse_and_map(node, 1);
435+
qe_ic->virq_high = platform_get_irq(pdev, 0);
436+
qe_ic->virq_low = platform_get_irq(pdev, 1);
436437

437-
if (!qe_ic->virq_low) {
438-
printk(KERN_ERR "Failed to map QE_IC low IRQ\n");
439-
kfree(qe_ic);
440-
return;
441-
}
442-
if (qe_ic->virq_high != qe_ic->virq_low) {
438+
if (qe_ic->virq_low <= 0)
439+
return -ENODEV;
440+
441+
if (qe_ic->virq_high > 0 && qe_ic->virq_high != qe_ic->virq_low) {
443442
low_handler = qe_ic_cascade_low;
444443
high_handler = qe_ic_cascade_high;
445444
} else {
446445
low_handler = qe_ic_cascade_muxed_mpic;
447446
high_handler = NULL;
448447
}
449448

449+
qe_ic->irqhost = irq_domain_add_linear(node, NR_QE_IC_INTS,
450+
&qe_ic_host_ops, qe_ic);
451+
if (qe_ic->irqhost == NULL) {
452+
dev_err(dev, "failed to add irq domain\n");
453+
return -ENODEV;
454+
}
455+
450456
qe_ic_write(qe_ic->regs, QEIC_CICR, 0);
451457

452458
irq_set_handler_data(qe_ic->virq_low, qe_ic);
453459
irq_set_chained_handler(qe_ic->virq_low, low_handler);
454460

455-
if (qe_ic->virq_high && qe_ic->virq_high != qe_ic->virq_low) {
461+
if (high_handler) {
456462
irq_set_handler_data(qe_ic->virq_high, qe_ic);
457463
irq_set_chained_handler(qe_ic->virq_high, high_handler);
458464
}
465+
return 0;
459466
}
467+
static const struct of_device_id qe_ic_ids[] = {
468+
{ .compatible = "fsl,qe-ic"},
469+
{ .type = "qeic"},
470+
{},
471+
};
460472

461-
static int __init qe_ic_of_init(void)
473+
static struct platform_driver qe_ic_driver =
462474
{
463-
struct device_node *np;
475+
.driver = {
476+
.name = "qe-ic",
477+
.of_match_table = qe_ic_ids,
478+
},
479+
.probe = qe_ic_init,
480+
};
464481

465-
np = of_find_compatible_node(NULL, NULL, "fsl,qe-ic");
466-
if (!np) {
467-
np = of_find_node_by_type(NULL, "qeic");
468-
if (!np)
469-
return -ENODEV;
470-
}
471-
qe_ic_init(np);
472-
of_node_put(np);
482+
static int __init qe_ic_of_init(void)
483+
{
484+
platform_driver_register(&qe_ic_driver);
473485
return 0;
474486
}
475487
subsys_initcall(qe_ic_of_init);

0 commit comments

Comments
 (0)