From 7971cc408d11e9fb6dd2823f81d3a23465700dd0 Mon Sep 17 00:00:00 2001 From: Chris Packham Date: Mon, 18 Feb 2019 15:46:45 +1300 Subject: ARM: mvebu: kirkwood: remove error message when retrieving mac address Kirkwood has always had the ability to retrieve the local-mac-address from the hardware (usually this was configured by the bootloader). This is particularly useful when dealing with a legacy non-DT aware bootloader. The "error" message just indicated that the board used an old bootloader and in many cases users can't do anything about this. The message probably should have been pr_info() to inform the user that the kernel has been helpful but rather than than let's remove it entirely to make the kernel less noisy. Signed-off-by: Chris Packham Signed-off-by: Gregory CLEMENT --- arch/arm/mach-mvebu/kirkwood.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-mvebu/kirkwood.c b/arch/arm/mach-mvebu/kirkwood.c index 0aa88105d46e..bf3ff0f580c2 100644 --- a/arch/arm/mach-mvebu/kirkwood.c +++ b/arch/arm/mach-mvebu/kirkwood.c @@ -107,8 +107,6 @@ static void __init kirkwood_dt_eth_fixup(void) clk_prepare_enable(clk); /* store MAC address register contents in local-mac-address */ - pr_err(FW_INFO "%pOF: local-mac-address is not set\n", np); - pmac = kzalloc(sizeof(*pmac) + 6, GFP_KERNEL); if (!pmac) goto eth_fixup_no_mem; -- cgit v1.2.3-59-g8ed1b From 8f11b5ab441d3a80de7f079598a548350d3eed0b Mon Sep 17 00:00:00 2001 From: Wen Yang Date: Tue, 5 Mar 2019 19:32:55 +0800 Subject: ARM: mvebu: fix a leaked reference by adding missing of_node_put The call to of_get_next_child returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings: ./arch/arm/mach-mvebu/pm-board.c:135:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 88, but without a corresponding object release within this functio Signed-off-by: Wen Yang Cc: Jason Cooper Cc: Andrew Lunn Cc: Gregory Clement Cc: Sebastian Hesselbarth Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Gregory CLEMENT --- arch/arm/mach-mvebu/pm-board.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-mvebu/pm-board.c b/arch/arm/mach-mvebu/pm-board.c index db17121d7d63..070552511699 100644 --- a/arch/arm/mach-mvebu/pm-board.c +++ b/arch/arm/mach-mvebu/pm-board.c @@ -79,7 +79,7 @@ static void mvebu_armada_pm_enter(void __iomem *sdram_reg, u32 srcmd) static int __init mvebu_armada_pm_init(void) { struct device_node *np; - struct device_node *gpio_ctrl_np; + struct device_node *gpio_ctrl_np = NULL; int ret = 0, i; if (!of_machine_is_compatible("marvell,axp-gp")) @@ -126,18 +126,23 @@ static int __init mvebu_armada_pm_init(void) goto out; } + if (gpio_ctrl_np) + of_node_put(gpio_ctrl_np); gpio_ctrl_np = args.np; pic_raw_gpios[i] = args.args[0]; } gpio_ctrl = of_iomap(gpio_ctrl_np, 0); - if (!gpio_ctrl) - return -ENOMEM; + if (!gpio_ctrl) { + ret = -ENOMEM; + goto out; + } mvebu_pm_suspend_init(mvebu_armada_pm_enter); out: of_node_put(np); + of_node_put(gpio_ctrl_np); return ret; } -- cgit v1.2.3-59-g8ed1b From 3ab2b5fdd1d8fa92dae631b913553e8798be23a7 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Thu, 11 Apr 2019 09:54:02 +0200 Subject: ARM: mvebu: drop unnecessary label The label mvebu_boot_wa_start is not necessary and causes a build issue when building with LLVM's integrated assembler: AS arch/arm/mach-mvebu/pmsu_ll.o arch/arm/mach-mvebu/pmsu_ll.S:59:1: error: invalid symbol redefinition mvebu_boot_wa_start: ^ Drop the label. Signed-off-by: Stefan Agner Acked-by: Nicolas Pitre Signed-off-by: Gregory CLEMENT --- arch/arm/mach-mvebu/pmsu_ll.S | 1 - 1 file changed, 1 deletion(-) (limited to 'arch') diff --git a/arch/arm/mach-mvebu/pmsu_ll.S b/arch/arm/mach-mvebu/pmsu_ll.S index 88651221dbdd..c1fb713e9306 100644 --- a/arch/arm/mach-mvebu/pmsu_ll.S +++ b/arch/arm/mach-mvebu/pmsu_ll.S @@ -56,7 +56,6 @@ ENDPROC(armada_38x_cpu_resume) /* The following code will be executed from SRAM */ ENTRY(mvebu_boot_wa_start) -mvebu_boot_wa_start: ARM_BE8(setend be) adr r0, 1f ldr r0, [r0] @ load the address of the -- cgit v1.2.3-59-g8ed1b From 969ad77c14ab34d0046b013f2502de72647711d1 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Thu, 11 Apr 2019 09:54:03 +0200 Subject: ARM: mvebu: prefix coprocessor operand with p In every other instance where mrc is used the coprocessor operand is prefix with p (e.g. p15). Use the p prefix in this case too. This fixes a build issue when using LLVM's integrated assembler: arch/arm/mach-mvebu/coherency_ll.S:69:6: error: invalid operand for instruction mrc 15, 0, r3, cr0, cr0, 5 ^ arch/arm/mach-mvebu/pmsu_ll.S:19:6: error: invalid operand for instruction mrc 15, 0, r0, cr0, cr0, 5 @ get the CPU ID ^ Signed-off-by: Stefan Agner Acked-by: Nicolas Pitre Signed-off-by: Gregory CLEMENT --- arch/arm/mach-mvebu/coherency_ll.S | 2 +- arch/arm/mach-mvebu/pmsu_ll.S | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-mvebu/coherency_ll.S b/arch/arm/mach-mvebu/coherency_ll.S index 8b2fbc8b6bc6..2d962fe48821 100644 --- a/arch/arm/mach-mvebu/coherency_ll.S +++ b/arch/arm/mach-mvebu/coherency_ll.S @@ -66,7 +66,7 @@ ENDPROC(ll_get_coherency_base) * fabric registers */ ENTRY(ll_get_coherency_cpumask) - mrc 15, 0, r3, cr0, cr0, 5 + mrc p15, 0, r3, cr0, cr0, 5 and r3, r3, #15 mov r2, #(1 << 24) lsl r3, r2, r3 diff --git a/arch/arm/mach-mvebu/pmsu_ll.S b/arch/arm/mach-mvebu/pmsu_ll.S index c1fb713e9306..7aae9a25cfeb 100644 --- a/arch/arm/mach-mvebu/pmsu_ll.S +++ b/arch/arm/mach-mvebu/pmsu_ll.S @@ -16,7 +16,7 @@ ENTRY(armada_38x_scu_power_up) mrc p15, 4, r1, c15, c0 @ get SCU base address orr r1, r1, #0x8 @ SCU CPU Power Status Register - mrc 15, 0, r0, cr0, cr0, 5 @ get the CPU ID + mrc p15, 0, r0, cr0, cr0, 5 @ get the CPU ID and r0, r0, #15 add r1, r1, r0 mov r0, #0x0 -- cgit v1.2.3-59-g8ed1b From 7af2ea3b29b1640f5aafe79d7c110ce66190c04a Mon Sep 17 00:00:00 2001 From: Nicholas Mc Guire Date: Sun, 14 Apr 2019 06:49:50 +0200 Subject: ARM: mvebu: drop return from void function The return statement is unnecessary here - so drop it. Signed-off-by: Nicholas Mc Guire Signed-off-by: Gregory CLEMENT --- arch/arm/mach-mvebu/board-v7.c | 1 - 1 file changed, 1 deletion(-) (limited to 'arch') diff --git a/arch/arm/mach-mvebu/board-v7.c b/arch/arm/mach-mvebu/board-v7.c index 0b10acd7d1b9..d2df5ef9382b 100644 --- a/arch/arm/mach-mvebu/board-v7.c +++ b/arch/arm/mach-mvebu/board-v7.c @@ -136,7 +136,6 @@ static void __init i2c_quirk(void) of_update_property(np, new_compat); } - return; } static void __init mvebu_dt_init(void) -- cgit v1.2.3-59-g8ed1b