Minor Armada 370/XP cleanups
Subsystems (4)
cover Minor Armada 370/XP cleanups
Jason, Greg, Andrew, Sebastian,
Here are three minor cleanups, the first one for mvebu/soc, the two other ones for mvebu/dt. I believe they are fairly self-explanatory.
Thanks!
Thomas
Thomas Petazzoni (3):
ARM: mvebu: remove unneeded ->map_io field for Armada 370/XP
ARM: mvebu: use GPIO DT defines in Armada 370/XP boards
ARM: mvebu: use input DT defines in Armada 370/XP boards
arch/arm/boot/dts/armada-370-mirabox.dts | 7 ++++--- arch/arm/boot/dts/armada-370-rd.dts | 6 ++++-- arch/arm/boot/dts/armada-xp-axpwifiap.dts | 6 ++++-- arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts | 12 +++++++----- arch/arm/mach-mvebu/armada-370-xp.c | 6 ------ 5 files changed, 19 insertions(+), 18 deletions(-)
Signature · 1 line
1.8.3.2
PATCH 1/3 ARM: mvebu: remove unneeded ->map_io field for Armada 370/XP
The ->map_io() implementation of Armada 370/XP simply calls debug_ll_io_init(), which is exactly what the kernel does when ->map_io is NULL. Therefore, there is no need to have a specific ->map_io() implementation in Armada 370/XP.
--- arch/arm/mach-mvebu/armada-370-xp.c | 6 ------ 1 file changed, 6 deletions(-)
arch/arm/mach-mvebu/armada-370-xp.c +0 -6
@@ -31,11 +31,6 @@#include "coherency.h" #include "mvebu-soc-id.h" -static void __init armada_370_xp_map_io (void ) -{ -debug_ll_io_init (); -} -static void __init armada_370_xp_timer_and_clk_init (void ) {of_clk_init (NULL );
@@ -90,7 +85,6 @@ static const char * const armada_370_xp_dt_compat[] = {DT_MACHINE_START (ARMADA_XP_DT ,"Marvell Armada 370/XP (Device Tree)" ) .smp = smp_ops(armada_xp_smp_ops), .init_machine = armada_370_xp_dt_init, - .map_io = armada_370_xp_map_io, .init_time = armada_370_xp_timer_and_clk_init, .restart = mvebu_restart, .dt_compat = armada_370_xp_dt_compat,
Signature · 1 line
1.8.3.2
PATCH 1/3 ARM: mvebu: remove unneeded ->map_io field for Armada 370/XP
Quoted 6 lines · Thomas Petazzoni
The ->map_io() implementation of Armada 370/XP simply calls
debug_ll_io_init(), which is exactly what the kernel does when ->map_io is NULL. Therefore, there is no need to have a specific ->map_io() implementation in Armada 370/XP.Signed-off-by Thomas Petazzoni <[email protected]>
We missed it because the change made in arch/arm/mm/mmu.c was made in the same time than our change in arch/arm/mach-mvebu/armada-370-xp.c to use debug_ll_io_init().
Quoted 29 lines
--- arch/arm/mach-mvebu/armada-370-xp.c | 6 ------ 1 file changed, 6 deletions(-)arch/arm/mach-mvebu/armada-370-xp.c +0
-6@@ -31,11 +31,6 @@#include "coherency.h" #include "mvebu-soc-id.h" -static void __init armada_370_xp_map_io (void ) -{ -debug_ll_io_init (); -} -static void __init armada_370_xp_timer_and_clk_init (void ) {of_clk_init (NULL );@@ -90,7 +85,6 @@ static const char * const armada_370_xp_dt_compat[] = {DT_MACHINE_START (ARMADA_XP_DT ,"Marvell Armada 370/XP (Device Tree)" ) .smp = smp_ops(armada_xp_smp_ops), .init_machine = armada_370_xp_dt_init, - .map_io = armada_370_xp_map_io, .init_time = armada_370_xp_timer_and_clk_init, .restart = mvebu_restart, .dt_compat = armada_370_xp_dt_compat,
Signature · 4 lines
Gregory Clement, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
Jason Cooper
AppliedPATCH 1/3 ARM: mvebu: remove unneeded ->map_io field for Armada 370/XP
In reply to Thomas PetazzoniQuoted 9 lines · Thomas Petazzoni
The ->map_io() implementation of Armada 370/XP simply calls
debug_ll_io_init(), which is exactly what the kernel does when ->map_io is NULL. Therefore, there is no need to have a specific ->map_io() implementation in Armada 370/XP.Signed-off-by Thomas Petazzoni <[email protected]>--- arch/arm/mach-mvebu/armada-370-xp.c | 6 ------ 1 file changed, 6 deletions(-)
Applied to mvebu/soc with Gregory's Ack.
thx,
Jason.
PATCH 2/3 ARM: mvebu: use GPIO DT defines in Armada 370/XP boards
In reply to Thomas PetazzoniInstead of harcoding 0 and 1 for the gpio specifications in the Armada 370/XP boards, use the <dt-bindings/gpio/gpio.h> header file and its GPIO_ACTIVE_HIGH and GPIO_ACTIVE_LOW definitions.
--- arch/arm/boot/dts/armada-370-mirabox.dts | 7 ++++--- arch/arm/boot/dts/armada-370-rd.dts | 3 ++- arch/arm/boot/dts/armada-xp-axpwifiap.dts | 3 ++- arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts | 9 +++++---- 4 files changed, 13 insertions(+), 9 deletions(-)
arch/arm/boot/dts/armada-370-mirabox.dts +4 -3
@@ -9,6 +9,7 @@ */ /dts-v1/; +#include <dt-bindings/gpio/gpio.h> #include "armada-370.dtsi" / {
@@ -73,19 +74,19 @@ green_pwr_led { label = "mirabox:green:pwr"; - gpios = <&gpio1 31 1>; + gpios = <&gpio1 31 GPIO_ACTIVE_LOW>; default-state = "keep"; }; blue_stat_led { label = "mirabox:blue:stat"; - gpios = <&gpio2 0 1>; + gpios = <&gpio2 0 GPIO_ACTIVE_LOW>; default-state = "off"; }; green_stat_led { label = "mirabox:green:stat"; - gpios = <&gpio2 1 1>; + gpios = <&gpio2 1 GPIO_ACTIVE_LOW>; default-state = "off"; }; };
arch/arm/boot/dts/armada-370-rd.dts +2 -1
@@ -12,6 +12,7 @@ */ /dts-v1/; +#include <dt-bindings/gpio/gpio.h> #include "armada-370.dtsi" / {
@@ -101,7 +102,7 @@ button at 1 { label = "Software Button"; linux,code = <116>; - gpios = <&gpio0 6 1>; + gpios = <&gpio0 6 GPIO_ACTIVE_LOW>; }; };
arch/arm/boot/dts/armada-xp-axpwifiap.dts +2 -1
@@ -16,6 +16,7 @@ */ /dts-v1/; +#include <dt-bindings/gpio/gpio.h> #include "armada-xp-mv78230.dtsi" / {
@@ -158,7 +159,7 @@ button at 1 { label = "Factory Reset Button"; linux,code = <141>; /* KEY_SETUP */ - gpios = <&gpio1 1 1>; + gpios = <&gpio1 1 GPIO_ACTIVE_LOW>; }; }; };
arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts +5 -4
@@ -11,6 +11,7 @@ */ /dts-v1/; +#include <dt-bindings/gpio/gpio.h> #include "armada-xp-mv78260.dtsi" / {
@@ -90,19 +91,19 @@ red_led { label = "red_led"; - gpios = <&gpio1 17 1>; + gpios = <&gpio1 17 GPIO_ACTIVE_LOW>; default-state = "off"; }; yellow_led { label = "yellow_led"; - gpios = <&gpio1 19 1>; + gpios = <&gpio1 19 GPIO_ACTIVE_LOW>; default-state = "off"; }; green_led { label = "green_led"; - gpios = <&gpio1 21 1>; + gpios = <&gpio1 21 GPIO_ACTIVE_LOW>; default-state = "keep"; }; };
@@ -115,7 +116,7 @@ button at 1 { label = "Init Button"; linux,code = <116>; - gpios = <&gpio1 28 0>; + gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>; }; };
Signature · 1 line
1.8.3.2
PATCH 2/3 ARM: mvebu: use GPIO DT defines in Armada 370/XP boards
Quoted 5 lines · Thomas Petazzoni
Instead of harcoding 0 and 1 for the gpio specifications in the Armada 370/XP boards, use the <
dt-bindings/gpio/gpio.h> header file and itsGPIO_ACTIVE_HIGHandGPIO_ACTIVE_LOWdefinitions.Signed-off-by Thomas Petazzoni <[email protected]>
Quoted 129 lines
--- arch/arm/boot/dts/armada-370-mirabox.dts | 7 ++++--- arch/arm/boot/dts/armada-370-rd.dts | 3 ++- arch/arm/boot/dts/armada-xp-axpwifiap.dts | 3 ++- arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts | 9 +++++---- 4 files changed, 13 insertions(+), 9 deletions(-)arch/arm/boot/dts/armada-370-mirabox.dts +4
-3@@ -9,6 +9,7 @@ */ /dts-v1/; +#include <dt-bindings/gpio/gpio.h> #include "armada-370.dtsi" / {@@ -73,19 +74,19 @@ green_pwr_led { label = "mirabox:green:pwr"; - gpios = <&gpio1 31 1>; + gpios = <&gpio1 31 GPIO_ACTIVE_LOW>; default-state = "keep"; }; blue_stat_led { label = "mirabox:blue:stat"; - gpios = <&gpio2 0 1>; + gpios = <&gpio2 0 GPIO_ACTIVE_LOW>; default-state = "off"; }; green_stat_led { label = "mirabox:green:stat"; - gpios = <&gpio2 1 1>; + gpios = <&gpio2 1 GPIO_ACTIVE_LOW>; default-state = "off"; }; };arch/arm/boot/dts/armada-370-rd.dts +2
-1@@ -12,6 +12,7 @@ */ /dts-v1/; +#include <dt-bindings/gpio/gpio.h> #include "armada-370.dtsi" / {@@ -101,7 +102,7 @@ button at 1 { label = "Software Button"; linux,code = <116>; - gpios = <&gpio0 6 1>; + gpios = <&gpio0 6 GPIO_ACTIVE_LOW>; }; };arch/arm/boot/dts/armada-xp-axpwifiap.dts +2
-1@@ -16,6 +16,7 @@ */ /dts-v1/; +#include <dt-bindings/gpio/gpio.h> #include "armada-xp-mv78230.dtsi" / {@@ -158,7 +159,7 @@ button at 1 { label = "Factory Reset Button"; linux,code = <141>; /* KEY_SETUP */ - gpios = <&gpio1 1 1>; + gpios = <&gpio1 1 GPIO_ACTIVE_LOW>; }; }; };arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts +5
-4@@ -11,6 +11,7 @@ */ /dts-v1/; +#include <dt-bindings/gpio/gpio.h> #include "armada-xp-mv78260.dtsi" / {@@ -90,19 +91,19 @@ red_led { label = "red_led"; - gpios = <&gpio1 17 1>; + gpios = <&gpio1 17 GPIO_ACTIVE_LOW>; default-state = "off"; }; yellow_led { label = "yellow_led"; - gpios = <&gpio1 19 1>; + gpios = <&gpio1 19 GPIO_ACTIVE_LOW>; default-state = "off"; }; green_led { label = "green_led"; - gpios = <&gpio1 21 1>; + gpios = <&gpio1 21 GPIO_ACTIVE_LOW>; default-state = "keep"; }; };@@ -115,7 +116,7 @@ button at 1 { label = "Init Button"; linux,code = <116>; - gpios = <&gpio1 28 0>; + gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>; }; };
Signature · 4 lines
Gregory Clement, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 2/3 ARM: mvebu: use GPIO DT defines in Armada 370/XP boards
In reply to Thomas PetazzoniQuoted 11 lines · Thomas Petazzoni
Instead of harcoding 0 and 1 for the gpio specifications in the Armada 370/XP boards, use the <
dt-bindings/gpio/gpio.h> header file and itsGPIO_ACTIVE_HIGHandGPIO_ACTIVE_LOWdefinitions.Signed-off-by Thomas Petazzoni <[email protected]>--- arch/arm/boot/dts/armada-370-mirabox.dts | 7 ++++--- arch/arm/boot/dts/armada-370-rd.dts | 3 ++- arch/arm/boot/dts/armada-xp-axpwifiap.dts | 3 ++- arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts | 9 +++++---- 4 files changed, 13 insertions(+), 9 deletions(-)
Patches 2 and 3 applied to mvebu/dt with Gregory's Ack's.
thx,
Jason.
Andrew Lunn
maintainerPATCH 2/3 ARM: mvebu: use GPIO DT defines in Armada 370/XP boards
In reply to Thomas PetazzoniQuoted 17 lines · Thomas Petazzoni
Instead of harcoding 0 and 1 for the gpio specifications in the Armada 370/XP boards, use the <
dt-bindings/gpio/gpio.h> header file and itsGPIO_ACTIVE_HIGHandGPIO_ACTIVE_LOWdefinitions.Signed-off-by Thomas Petazzoni <[email protected]>--- arch/arm/boot/dts/armada-370-mirabox.dts | 7 ++++--- arch/arm/boot/dts/armada-370-rd.dts | 3 ++- arch/arm/boot/dts/armada-xp-axpwifiap.dts | 3 ++- arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts | 9 +++++---- 4 files changed, 13 insertions(+), 9 deletions(-)arch/arm/boot/dts/armada-370-mirabox.dts +0
-0
arch/arm/boot/dts/armada-370-mirabox.dts line 13
Quoted 5 lines
arch/arm/boot/dts/armada-370-mirabox.dts +1
-0@@ -9,6 +9,7 @@ */ /dts-v1/; +#include <dt-bindings/gpio/gpio.h> #include "armada-370.dtsi"
Hi Thomas
What i did for kirkwood is include both gpio.h and input.h in kirkwood.dtsi. Quite a few other systems do that, rather than each .dts file having to include them. However i don't have a strong opinion.
Andrew
PATCH 2/3 ARM: mvebu: use GPIO DT defines in Armada 370/XP boards
Dear Andrew Lunn,
Quoted 4 lines · Andrew Lunn
What i did for kirkwood is include both
gpio.handinput.hinkirkwood.dtsi. Quite a few other systems do that, rather than each .dts file having to include them. However i don't have a strong opinion.
Right, I don't have a strong opinion on this either. I did it this way because a few other .dts files for Armada boards (Netgear NAS) were already including these header files.
I guess it is clearly something that can be factorized later on as the number of Armada boards needing this grows.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 2/3 ARM: mvebu: use GPIO DT defines in Armada 370/XP boards
Quoted 9 lines · Thomas Petazzoni
Dear Andrew Lunn,
Quoted 4 lines · Andrew Lunn
What i did for kirkwood is include both
gpio.handinput.hinkirkwood.dtsi. Quite a few other systems do that, rather than each .dts file having to include them. However i don't have a strong opinion.
Quoted 6 lines
Right, I don't have a strong opinion on this either. I did it this way because a few other .dts files for Armada boards (Netgear NAS) were already including these header files.
I guess it is clearly something that can be factorized later on as the number of Armada boards needing this grows.
Same here, it's cleaner, but it can wait for cleanups next window.
thx,
Jason.
PATCH 3/3 ARM: mvebu: use input DT defines in Armada 370/XP boards
In reply to Thomas PetazzoniInstead of harcoding keycodes specifications in the Armada 370/XP boards, use the <dt-bindings/input/input.h> header file and its keycode definitions.
--- arch/arm/boot/dts/armada-370-rd.dts | 3 ++- arch/arm/boot/dts/armada-xp-axpwifiap.dts | 3 ++- arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-)
arch/arm/boot/dts/armada-370-rd.dts +2 -1
@@ -12,6 +12,7 @@ */ /dts-v1/; +#include <dt-bindings/input/input.h> #include <dt-bindings/gpio/gpio.h> #include "armada-370.dtsi"
@@ -101,7 +102,7 @@ #size-cells = <0>; button at 1 { label = "Software Button"; - linux,code = <116>; + linux,code = <KEY_POWER>; gpios = <&gpio0 6 GPIO_ACTIVE_LOW>; }; };
arch/arm/boot/dts/armada-xp-axpwifiap.dts +2 -1
@@ -17,6 +17,7 @@ /dts-v1/; #include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/input/input.h> #include "armada-xp-mv78230.dtsi" / {
@@ -158,7 +159,7 @@ button at 1 { label = "Factory Reset Button"; - linux,code = <141>; /* KEY_SETUP */ + linux,code = <KEY_SETUP>; gpios = <&gpio1 1 GPIO_ACTIVE_LOW>; }; };
arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts +2 -1
@@ -12,6 +12,7 @@ /dts-v1/; #include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/input/input.h> #include "armada-xp-mv78260.dtsi" / {
@@ -115,7 +116,7 @@ button at 1 { label = "Init Button"; - linux,code = <116>; + linux,code = <KEY_POWER>; gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>; }; };
Signature · 1 line
1.8.3.2
PATCH 3/3 ARM: mvebu: use input DT defines in Armada 370/XP boards
Hi Thomas,
Quoted 3 lines · Thomas Petazzoni
Instead of harcoding keycodes specifications in the Armada 370/XP boards, use the <
dt-bindings/input/input.h> header file and its keycode definitions.
It's easier to read now,
Thanks,
Gregory
Quoted 2 lines
Signed-off-by Thomas Petazzoni <[email protected]>
Quoted 70 lines
--- arch/arm/boot/dts/armada-370-rd.dts | 3 ++- arch/arm/boot/dts/armada-xp-axpwifiap.dts | 3 ++- arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-)arch/arm/boot/dts/armada-370-rd.dts +2
-1@@ -12,6 +12,7 @@ */ /dts-v1/; +#include <dt-bindings/input/input.h> #include <dt-bindings/gpio/gpio.h> #include "armada-370.dtsi"@@ -101,7 +102,7 @@ #size-cells = <0>; button at 1 { label = "Software Button"; - linux,code = <116>; + linux,code = <KEY_POWER>; gpios = <&gpio0 6 GPIO_ACTIVE_LOW>; }; };arch/arm/boot/dts/armada-xp-axpwifiap.dts +2
-1@@ -17,6 +17,7 @@ /dts-v1/; #include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/input/input.h> #include "armada-xp-mv78230.dtsi" / {@@ -158,7 +159,7 @@ button at 1 { label = "Factory Reset Button"; - linux,code = <141>; /* KEY_SETUP */ + linux,code = <KEY_SETUP>; gpios = <&gpio1 1 GPIO_ACTIVE_LOW>; }; };arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts +2
-1@@ -12,6 +12,7 @@ /dts-v1/; #include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/input/input.h> #include "armada-xp-mv78260.dtsi" / {@@ -115,7 +116,7 @@ button at 1 { label = "Init Button"; - linux,code = <116>; + linux,code = <KEY_POWER>; gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>; }; };
Signature · 4 lines
Gregory Clement, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com