Skip to content

Commit

Permalink
Merge branch 'fixes' into for-next
Browse files Browse the repository at this point in the history
* fixes:
  ARM64: dts: meson-gx: fix UART pclk clock name
  ARM: dts: Fix dm814x missing phy-cells property
  ARM: dts: Fix elm interrupt compiler warning
  bus: arm-ccn: fix module unloading Error: Removing state 147 which has instances left.
  bus: arm-cci: Fix use of smp_processor_id() in preemptible context
  bus: arm-ccn: Fix use of smp_processor_id() in preemptible context
  bus: arm-ccn: Simplify code
  bus: arm-ccn: Check memory allocation failure
  bus: arm-ccn: constify attribute_group structures.
  meson-gx-socinfo: Fix package id parsing
  ARM: meson: fix spelling mistake: "Couln't" -> "Couldn't"
  ARM: dts: meson: fix the memory region of the GPIO interrupt controller
  ARM: dts: meson: correct the sort order for the the gpio_intc node
  • Loading branch information
olofj committed Dec 10, 2017
2 parents 8b6eac7 + ce39882 commit 8be0b98
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 30 deletions.
1 change: 1 addition & 0 deletions arch/arm/boot/dts/dm814x.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@
reg = <0x1b00 0x100>;
reg-names = "phy";
ti,ctrl_mod = <&usb_ctrl_mod>;
#phy-cells = <0>;
};
};

Expand Down
18 changes: 9 additions & 9 deletions arch/arm/boot/dts/meson.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,6 @@
reg = <0x7c00 0x200>;
};

gpio_intc: interrupt-controller@9880 {
compatible = "amlogic,meson-gpio-intc";
reg = <0xc1109880 0x10>;
interrupt-controller;
#interrupt-cells = <2>;
amlogic,channel-interrupts = <64 65 66 67 68 69 70 71>;
status = "disabled";
};

hwrng: rng@8100 {
compatible = "amlogic,meson-rng";
reg = <0x8100 0x8>;
Expand Down Expand Up @@ -191,6 +182,15 @@
status = "disabled";
};

gpio_intc: interrupt-controller@9880 {
compatible = "amlogic,meson-gpio-intc";
reg = <0x9880 0x10>;
interrupt-controller;
#interrupt-cells = <2>;
amlogic,channel-interrupts = <64 65 66 67 68 69 70 71>;
status = "disabled";
};

wdt: watchdog@9900 {
compatible = "amlogic,meson6-wdt";
reg = <0x9900 0x8>;
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/omap4.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@
elm: elm@48078000 {
compatible = "ti,am3352-elm";
reg = <0x48078000 0x2000>;
interrupts = <4>;
interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
ti,hwmods = "elm";
status = "disabled";
};
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-meson/platsmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ static void __init meson_smp_prepare_cpus(const char *scu_compatible,

scu_base = of_iomap(node, 0);
if (!scu_base) {
pr_err("Couln't map SCU registers\n");
pr_err("Couldn't map SCU registers\n");
return;
}

Expand Down
4 changes: 2 additions & 2 deletions arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -753,12 +753,12 @@

&uart_B {
clocks = <&xtal>, <&clkc CLKID_UART1>, <&xtal>;
clock-names = "xtal", "core", "baud";
clock-names = "xtal", "pclk", "baud";
};

&uart_C {
clocks = <&xtal>, <&clkc CLKID_UART2>, <&xtal>;
clock-names = "xtal", "core", "baud";
clock-names = "xtal", "pclk", "baud";
};

&vpu {
Expand Down
6 changes: 3 additions & 3 deletions arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@

&uart_A {
clocks = <&xtal>, <&clkc CLKID_UART0>, <&xtal>;
clock-names = "xtal", "core", "baud";
clock-names = "xtal", "pclk", "baud";
};

&uart_AO {
Expand All @@ -703,12 +703,12 @@

&uart_B {
clocks = <&xtal>, <&clkc CLKID_UART1>, <&xtal>;
clock-names = "xtal", "core", "baud";
clock-names = "xtal", "pclk", "baud";
};

&uart_C {
clocks = <&xtal>, <&clkc CLKID_UART2>, <&xtal>;
clock-names = "xtal", "core", "baud";
clock-names = "xtal", "pclk", "baud";
};

&vpu {
Expand Down
7 changes: 5 additions & 2 deletions drivers/bus/arm-cci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1755,14 +1755,17 @@ static int cci_pmu_probe(struct platform_device *pdev)
raw_spin_lock_init(&cci_pmu->hw_events.pmu_lock);
mutex_init(&cci_pmu->reserve_mutex);
atomic_set(&cci_pmu->active_events, 0);
cpumask_set_cpu(smp_processor_id(), &cci_pmu->cpus);
cpumask_set_cpu(get_cpu(), &cci_pmu->cpus);

ret = cci_pmu_init(cci_pmu, pdev);
if (ret)
if (ret) {
put_cpu();
return ret;
}

cpuhp_state_add_instance_nocalls(CPUHP_AP_PERF_ARM_CCI_ONLINE,
&cci_pmu->node);
put_cpu();
pr_info("ARM %s PMU driver probed", cci_pmu->model->name);
return 0;
}
Expand Down
25 changes: 15 additions & 10 deletions drivers/bus/arm-ccn.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ static struct attribute *arm_ccn_pmu_format_attrs[] = {
NULL
};

static struct attribute_group arm_ccn_pmu_format_attr_group = {
static const struct attribute_group arm_ccn_pmu_format_attr_group = {
.name = "format",
.attrs = arm_ccn_pmu_format_attrs,
};
Expand Down Expand Up @@ -451,7 +451,7 @@ static struct arm_ccn_pmu_event arm_ccn_pmu_events[] = {
static struct attribute
*arm_ccn_pmu_events_attrs[ARRAY_SIZE(arm_ccn_pmu_events) + 1];

static struct attribute_group arm_ccn_pmu_events_attr_group = {
static const struct attribute_group arm_ccn_pmu_events_attr_group = {
.name = "events",
.is_visible = arm_ccn_pmu_events_is_visible,
.attrs = arm_ccn_pmu_events_attrs,
Expand Down Expand Up @@ -548,7 +548,7 @@ static struct attribute *arm_ccn_pmu_cmp_mask_attrs[] = {
NULL
};

static struct attribute_group arm_ccn_pmu_cmp_mask_attr_group = {
static const struct attribute_group arm_ccn_pmu_cmp_mask_attr_group = {
.name = "cmp_mask",
.attrs = arm_ccn_pmu_cmp_mask_attrs,
};
Expand All @@ -569,7 +569,7 @@ static struct attribute *arm_ccn_pmu_cpumask_attrs[] = {
NULL,
};

static struct attribute_group arm_ccn_pmu_cpumask_attr_group = {
static const struct attribute_group arm_ccn_pmu_cpumask_attr_group = {
.attrs = arm_ccn_pmu_cpumask_attrs,
};

Expand Down Expand Up @@ -1268,10 +1268,12 @@ static int arm_ccn_pmu_init(struct arm_ccn *ccn)
if (ccn->dt.id == 0) {
name = "ccn";
} else {
int len = snprintf(NULL, 0, "ccn_%d", ccn->dt.id);

name = devm_kzalloc(ccn->dev, len + 1, GFP_KERNEL);
snprintf(name, len + 1, "ccn_%d", ccn->dt.id);
name = devm_kasprintf(ccn->dev, GFP_KERNEL, "ccn_%d",
ccn->dt.id);
if (!name) {
err = -ENOMEM;
goto error_choose_name;
}
}

/* Perf driver registration */
Expand All @@ -1298,7 +1300,7 @@ static int arm_ccn_pmu_init(struct arm_ccn *ccn)
}

/* Pick one CPU which we will use to collect data from CCN... */
cpumask_set_cpu(smp_processor_id(), &ccn->dt.cpu);
cpumask_set_cpu(get_cpu(), &ccn->dt.cpu);

/* Also make sure that the overflow interrupt is handled by this CPU */
if (ccn->irq) {
Expand All @@ -1315,10 +1317,13 @@ static int arm_ccn_pmu_init(struct arm_ccn *ccn)

cpuhp_state_add_instance_nocalls(CPUHP_AP_PERF_ARM_CCN_ONLINE,
&ccn->dt.node);
put_cpu();
return 0;

error_pmu_register:
error_set_affinity:
put_cpu();
error_choose_name:
ida_simple_remove(&arm_ccn_pmu_ida, ccn->dt.id);
for (i = 0; i < ccn->num_xps; i++)
writel(0, ccn->xp[i].base + CCN_XP_DT_CONTROL);
Expand Down Expand Up @@ -1581,8 +1586,8 @@ static int __init arm_ccn_init(void)

static void __exit arm_ccn_exit(void)
{
cpuhp_remove_multi_state(CPUHP_AP_PERF_ARM_CCN_ONLINE);
platform_driver_unregister(&arm_ccn_driver);
cpuhp_remove_multi_state(CPUHP_AP_PERF_ARM_CCN_ONLINE);
}

module_init(arm_ccn_init);
Expand Down
4 changes: 2 additions & 2 deletions drivers/soc/amlogic/meson-gx-socinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
#define AO_SEC_SOCINFO_OFFSET AO_SEC_SD_CFG8

#define SOCINFO_MAJOR GENMASK(31, 24)
#define SOCINFO_MINOR GENMASK(23, 16)
#define SOCINFO_PACK GENMASK(15, 8)
#define SOCINFO_PACK GENMASK(23, 16)
#define SOCINFO_MINOR GENMASK(15, 8)
#define SOCINFO_MISC GENMASK(7, 0)

static const struct meson_gx_soc_id {
Expand Down

0 comments on commit 8be0b98

Please sign in to comment.