* [PATCH 0/4] ARM: Remove boilerplate debug_ll_io_init code
@ 2013-05-13 10:16 ` Maxime Ripard
0 siblings, 0 replies; 24+ messages in thread
From: Maxime Ripard @ 2013-05-13 10:16 UTC (permalink / raw)
To: Rob Herring, Shawn Guo, Arnd Bergmann, Olof Johansson
Cc: Russell King, linux-arm-kernel, linux-kernel, Maxime Ripard
Hi,
The recent introduction of debug_ll_io_init made possible to not rely
anymore on a custom map_io function but on debug_ll_io_init for the
early mapping and then on the various drivers to do the needed mappings for
the kernel to boot.
Some architectures begin to use only this function as the map_io callback in
the machine description.
In order to remove some boilerplate code, make the ARM mm code call
debug_ll_io_init by itself when no .map_io callback is defined.
This has been tested on the sunxi platform.
Thanks,
Maxime
Maxime Ripard (4):
ARM: mmu: Call debug_ll_io_init if no map_io function is specified
ARM: highbank: remove the .map_io declaration
ARM: mxs: remove the .map_io declaration
ARM: sunxi: Remove the .map_io function declaration
arch/arm/mach-highbank/highbank.c | 1 -
arch/arm/mach-mxs/mach-mxs.c | 1 -
arch/arm/mach-sunxi/sunxi.c | 17 -----------------
arch/arm/mach-sunxi/sunxi.h | 20 --------------------
arch/arm/mm/mmu.c | 2 ++
5 files changed, 2 insertions(+), 39 deletions(-)
delete mode 100644 arch/arm/mach-sunxi/sunxi.h
--
1.8.1.2
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 0/4] ARM: Remove boilerplate debug_ll_io_init code
@ 2013-05-13 10:16 ` Maxime Ripard
0 siblings, 0 replies; 24+ messages in thread
From: Maxime Ripard @ 2013-05-13 10:16 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
The recent introduction of debug_ll_io_init made possible to not rely
anymore on a custom map_io function but on debug_ll_io_init for the
early mapping and then on the various drivers to do the needed mappings for
the kernel to boot.
Some architectures begin to use only this function as the map_io callback in
the machine description.
In order to remove some boilerplate code, make the ARM mm code call
debug_ll_io_init by itself when no .map_io callback is defined.
This has been tested on the sunxi platform.
Thanks,
Maxime
Maxime Ripard (4):
ARM: mmu: Call debug_ll_io_init if no map_io function is specified
ARM: highbank: remove the .map_io declaration
ARM: mxs: remove the .map_io declaration
ARM: sunxi: Remove the .map_io function declaration
arch/arm/mach-highbank/highbank.c | 1 -
arch/arm/mach-mxs/mach-mxs.c | 1 -
arch/arm/mach-sunxi/sunxi.c | 17 -----------------
arch/arm/mach-sunxi/sunxi.h | 20 --------------------
arch/arm/mm/mmu.c | 2 ++
5 files changed, 2 insertions(+), 39 deletions(-)
delete mode 100644 arch/arm/mach-sunxi/sunxi.h
--
1.8.1.2
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 1/4] ARM: mmu: Call debug_ll_io_init if no map_io function is specified
2013-05-13 10:16 ` Maxime Ripard
@ 2013-05-13 10:16 ` Maxime Ripard
-1 siblings, 0 replies; 24+ messages in thread
From: Maxime Ripard @ 2013-05-13 10:16 UTC (permalink / raw)
To: Rob Herring, Shawn Guo, Arnd Bergmann, Olof Johansson
Cc: Russell King, linux-arm-kernel, linux-kernel, Maxime Ripard
More and more sub-architectures are using only the debug_ll_io_init
function as the map_io function. Make the core code call this function
if no function is specified in the machine description to remove some
boilerplate code.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
arch/arm/mm/mmu.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index e0d8565..faa36d7 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -1232,6 +1232,8 @@ static void __init devicemaps_init(struct machine_desc *mdesc)
*/
if (mdesc->map_io)
mdesc->map_io();
+ else
+ debug_ll_io_init();
fill_pmd_gaps();
/* Reserve fixed i/o space in VMALLOC region */
--
1.8.1.2
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 1/4] ARM: mmu: Call debug_ll_io_init if no map_io function is specified
@ 2013-05-13 10:16 ` Maxime Ripard
0 siblings, 0 replies; 24+ messages in thread
From: Maxime Ripard @ 2013-05-13 10:16 UTC (permalink / raw)
To: linux-arm-kernel
More and more sub-architectures are using only the debug_ll_io_init
function as the map_io function. Make the core code call this function
if no function is specified in the machine description to remove some
boilerplate code.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
arch/arm/mm/mmu.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index e0d8565..faa36d7 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -1232,6 +1232,8 @@ static void __init devicemaps_init(struct machine_desc *mdesc)
*/
if (mdesc->map_io)
mdesc->map_io();
+ else
+ debug_ll_io_init();
fill_pmd_gaps();
/* Reserve fixed i/o space in VMALLOC region */
--
1.8.1.2
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 2/4] ARM: highbank: remove the .map_io declaration
2013-05-13 10:16 ` Maxime Ripard
@ 2013-05-13 10:16 ` Maxime Ripard
-1 siblings, 0 replies; 24+ messages in thread
From: Maxime Ripard @ 2013-05-13 10:16 UTC (permalink / raw)
To: Rob Herring, Shawn Guo, Arnd Bergmann, Olof Johansson
Cc: Russell King, linux-arm-kernel, linux-kernel, Maxime Ripard
Now that the ARM core code calls debug_ll_io_init, we can remove it from
the machine_desc declaration.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
arch/arm/mach-highbank/highbank.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c
index e7df2dd..dc5d6be 100644
--- a/arch/arm/mach-highbank/highbank.c
+++ b/arch/arm/mach-highbank/highbank.c
@@ -176,7 +176,6 @@ static const char *highbank_match[] __initconst = {
DT_MACHINE_START(HIGHBANK, "Highbank")
.smp = smp_ops(highbank_smp_ops),
- .map_io = debug_ll_io_init,
.init_irq = highbank_init_irq,
.init_time = highbank_timer_init,
.init_machine = highbank_init,
--
1.8.1.2
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 2/4] ARM: highbank: remove the .map_io declaration
@ 2013-05-13 10:16 ` Maxime Ripard
0 siblings, 0 replies; 24+ messages in thread
From: Maxime Ripard @ 2013-05-13 10:16 UTC (permalink / raw)
To: linux-arm-kernel
Now that the ARM core code calls debug_ll_io_init, we can remove it from
the machine_desc declaration.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
arch/arm/mach-highbank/highbank.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c
index e7df2dd..dc5d6be 100644
--- a/arch/arm/mach-highbank/highbank.c
+++ b/arch/arm/mach-highbank/highbank.c
@@ -176,7 +176,6 @@ static const char *highbank_match[] __initconst = {
DT_MACHINE_START(HIGHBANK, "Highbank")
.smp = smp_ops(highbank_smp_ops),
- .map_io = debug_ll_io_init,
.init_irq = highbank_init_irq,
.init_time = highbank_timer_init,
.init_machine = highbank_init,
--
1.8.1.2
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 3/4] ARM: mxs: remove the .map_io declaration
2013-05-13 10:16 ` Maxime Ripard
@ 2013-05-13 10:16 ` Maxime Ripard
-1 siblings, 0 replies; 24+ messages in thread
From: Maxime Ripard @ 2013-05-13 10:16 UTC (permalink / raw)
To: Rob Herring, Shawn Guo, Arnd Bergmann, Olof Johansson
Cc: Russell King, linux-arm-kernel, linux-kernel, Maxime Ripard
Now that the ARM core code calls debug_ll_io_init, we can remove it from
the machine_desc declaration.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
arch/arm/mach-mxs/mach-mxs.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c
index 5b62b64..d67ecc1 100644
--- a/arch/arm/mach-mxs/mach-mxs.c
+++ b/arch/arm/mach-mxs/mach-mxs.c
@@ -434,7 +434,6 @@ static const char *mxs_dt_compat[] __initdata = {
};
DT_MACHINE_START(MXS, "Freescale MXS (Device Tree)")
- .map_io = debug_ll_io_init,
.init_irq = irqchip_init,
.handle_irq = icoll_handle_irq,
.init_time = mxs_timer_init,
--
1.8.1.2
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 3/4] ARM: mxs: remove the .map_io declaration
@ 2013-05-13 10:16 ` Maxime Ripard
0 siblings, 0 replies; 24+ messages in thread
From: Maxime Ripard @ 2013-05-13 10:16 UTC (permalink / raw)
To: linux-arm-kernel
Now that the ARM core code calls debug_ll_io_init, we can remove it from
the machine_desc declaration.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
arch/arm/mach-mxs/mach-mxs.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c
index 5b62b64..d67ecc1 100644
--- a/arch/arm/mach-mxs/mach-mxs.c
+++ b/arch/arm/mach-mxs/mach-mxs.c
@@ -434,7 +434,6 @@ static const char *mxs_dt_compat[] __initdata = {
};
DT_MACHINE_START(MXS, "Freescale MXS (Device Tree)")
- .map_io = debug_ll_io_init,
.init_irq = irqchip_init,
.handle_irq = icoll_handle_irq,
.init_time = mxs_timer_init,
--
1.8.1.2
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 4/4] ARM: sunxi: Remove the .map_io function declaration
2013-05-13 10:16 ` Maxime Ripard
@ 2013-05-13 10:16 ` Maxime Ripard
-1 siblings, 0 replies; 24+ messages in thread
From: Maxime Ripard @ 2013-05-13 10:16 UTC (permalink / raw)
To: Rob Herring, Shawn Guo, Arnd Bergmann, Olof Johansson
Cc: Russell King, linux-arm-kernel, linux-kernel, Maxime Ripard
debug_ll_io_init should be enough to map the needed addresses at boot,
so remove the trivial map_io code, and let the core call
debug_ll_io_init.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
arch/arm/mach-sunxi/sunxi.c | 17 -----------------
arch/arm/mach-sunxi/sunxi.h | 20 --------------------
2 files changed, 37 deletions(-)
delete mode 100644 arch/arm/mach-sunxi/sunxi.h
diff --git a/arch/arm/mach-sunxi/sunxi.c b/arch/arm/mach-sunxi/sunxi.c
index 706ce35..d1b5bc5 100644
--- a/arch/arm/mach-sunxi/sunxi.c
+++ b/arch/arm/mach-sunxi/sunxi.c
@@ -26,8 +26,6 @@
#include <asm/mach/map.h>
#include <asm/system_misc.h>
-#include "sunxi.h"
-
#define SUN4I_WATCHDOG_CTRL_REG 0x00
#define SUN4I_WATCHDOG_CTRL_RESTART (1 << 0)
#define SUN4I_WATCHDOG_MODE_REG 0x04
@@ -81,20 +79,6 @@ static void sunxi_setup_restart(void)
arm_pm_restart = of_id->data;
}
-static struct map_desc sunxi_io_desc[] __initdata = {
- {
- .virtual = (unsigned long) SUNXI_REGS_VIRT_BASE,
- .pfn = __phys_to_pfn(SUNXI_REGS_PHYS_BASE),
- .length = SUNXI_REGS_SIZE,
- .type = MT_DEVICE,
- },
-};
-
-void __init sunxi_map_io(void)
-{
- iotable_init(sunxi_io_desc, ARRAY_SIZE(sunxi_io_desc));
-}
-
static void __init sunxi_timer_init(void)
{
sunxi_init_clocks();
@@ -116,7 +100,6 @@ static const char * const sunxi_board_dt_compat[] = {
DT_MACHINE_START(SUNXI_DT, "Allwinner A1X (Device Tree)")
.init_machine = sunxi_dt_init,
- .map_io = sunxi_map_io,
.init_irq = irqchip_init,
.init_time = sunxi_timer_init,
.dt_compat = sunxi_board_dt_compat,
diff --git a/arch/arm/mach-sunxi/sunxi.h b/arch/arm/mach-sunxi/sunxi.h
deleted file mode 100644
index 33b5871..0000000
--- a/arch/arm/mach-sunxi/sunxi.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Generic definitions for Allwinner SunXi SoCs
- *
- * Copyright (C) 2012 Maxime Ripard
- *
- * Maxime Ripard <maxime.ripard@free-electrons.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __MACH_SUNXI_H
-#define __MACH_SUNXI_H
-
-#define SUNXI_REGS_PHYS_BASE 0x01c00000
-#define SUNXI_REGS_VIRT_BASE IOMEM(0xf1c00000)
-#define SUNXI_REGS_SIZE (SZ_2M + SZ_1M)
-
-#endif /* __MACH_SUNXI_H */
--
1.8.1.2
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH 4/4] ARM: sunxi: Remove the .map_io function declaration
@ 2013-05-13 10:16 ` Maxime Ripard
0 siblings, 0 replies; 24+ messages in thread
From: Maxime Ripard @ 2013-05-13 10:16 UTC (permalink / raw)
To: linux-arm-kernel
debug_ll_io_init should be enough to map the needed addresses at boot,
so remove the trivial map_io code, and let the core call
debug_ll_io_init.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
arch/arm/mach-sunxi/sunxi.c | 17 -----------------
arch/arm/mach-sunxi/sunxi.h | 20 --------------------
2 files changed, 37 deletions(-)
delete mode 100644 arch/arm/mach-sunxi/sunxi.h
diff --git a/arch/arm/mach-sunxi/sunxi.c b/arch/arm/mach-sunxi/sunxi.c
index 706ce35..d1b5bc5 100644
--- a/arch/arm/mach-sunxi/sunxi.c
+++ b/arch/arm/mach-sunxi/sunxi.c
@@ -26,8 +26,6 @@
#include <asm/mach/map.h>
#include <asm/system_misc.h>
-#include "sunxi.h"
-
#define SUN4I_WATCHDOG_CTRL_REG 0x00
#define SUN4I_WATCHDOG_CTRL_RESTART (1 << 0)
#define SUN4I_WATCHDOG_MODE_REG 0x04
@@ -81,20 +79,6 @@ static void sunxi_setup_restart(void)
arm_pm_restart = of_id->data;
}
-static struct map_desc sunxi_io_desc[] __initdata = {
- {
- .virtual = (unsigned long) SUNXI_REGS_VIRT_BASE,
- .pfn = __phys_to_pfn(SUNXI_REGS_PHYS_BASE),
- .length = SUNXI_REGS_SIZE,
- .type = MT_DEVICE,
- },
-};
-
-void __init sunxi_map_io(void)
-{
- iotable_init(sunxi_io_desc, ARRAY_SIZE(sunxi_io_desc));
-}
-
static void __init sunxi_timer_init(void)
{
sunxi_init_clocks();
@@ -116,7 +100,6 @@ static const char * const sunxi_board_dt_compat[] = {
DT_MACHINE_START(SUNXI_DT, "Allwinner A1X (Device Tree)")
.init_machine = sunxi_dt_init,
- .map_io = sunxi_map_io,
.init_irq = irqchip_init,
.init_time = sunxi_timer_init,
.dt_compat = sunxi_board_dt_compat,
diff --git a/arch/arm/mach-sunxi/sunxi.h b/arch/arm/mach-sunxi/sunxi.h
deleted file mode 100644
index 33b5871..0000000
--- a/arch/arm/mach-sunxi/sunxi.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Generic definitions for Allwinner SunXi SoCs
- *
- * Copyright (C) 2012 Maxime Ripard
- *
- * Maxime Ripard <maxime.ripard@free-electrons.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __MACH_SUNXI_H
-#define __MACH_SUNXI_H
-
-#define SUNXI_REGS_PHYS_BASE 0x01c00000
-#define SUNXI_REGS_VIRT_BASE IOMEM(0xf1c00000)
-#define SUNXI_REGS_SIZE (SZ_2M + SZ_1M)
-
-#endif /* __MACH_SUNXI_H */
--
1.8.1.2
^ permalink raw reply related [flat|nested] 24+ messages in thread
* Re: [PATCH 3/4] ARM: mxs: remove the .map_io declaration
2013-05-13 10:16 ` Maxime Ripard
@ 2013-05-14 3:30 ` Shawn Guo
-1 siblings, 0 replies; 24+ messages in thread
From: Shawn Guo @ 2013-05-14 3:30 UTC (permalink / raw)
To: Maxime Ripard
Cc: Rob Herring, Arnd Bergmann, Olof Johansson, Russell King,
linux-arm-kernel, linux-kernel
On Mon, May 13, 2013 at 12:16:08PM +0200, Maxime Ripard wrote:
> Now that the ARM core code calls debug_ll_io_init, we can remove it from
> the machine_desc declaration.
>
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
> ---
> arch/arm/mach-mxs/mach-mxs.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c
> index 5b62b64..d67ecc1 100644
> --- a/arch/arm/mach-mxs/mach-mxs.c
> +++ b/arch/arm/mach-mxs/mach-mxs.c
> @@ -434,7 +434,6 @@ static const char *mxs_dt_compat[] __initdata = {
> };
>
> DT_MACHINE_START(MXS, "Freescale MXS (Device Tree)")
> - .map_io = debug_ll_io_init,
> .init_irq = irqchip_init,
> .handle_irq = icoll_handle_irq,
> .init_time = mxs_timer_init,
> --
> 1.8.1.2
>
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 3/4] ARM: mxs: remove the .map_io declaration
@ 2013-05-14 3:30 ` Shawn Guo
0 siblings, 0 replies; 24+ messages in thread
From: Shawn Guo @ 2013-05-14 3:30 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, May 13, 2013 at 12:16:08PM +0200, Maxime Ripard wrote:
> Now that the ARM core code calls debug_ll_io_init, we can remove it from
> the machine_desc declaration.
>
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
> ---
> arch/arm/mach-mxs/mach-mxs.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c
> index 5b62b64..d67ecc1 100644
> --- a/arch/arm/mach-mxs/mach-mxs.c
> +++ b/arch/arm/mach-mxs/mach-mxs.c
> @@ -434,7 +434,6 @@ static const char *mxs_dt_compat[] __initdata = {
> };
>
> DT_MACHINE_START(MXS, "Freescale MXS (Device Tree)")
> - .map_io = debug_ll_io_init,
> .init_irq = irqchip_init,
> .handle_irq = icoll_handle_irq,
> .init_time = mxs_timer_init,
> --
> 1.8.1.2
>
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 0/4] ARM: Remove boilerplate debug_ll_io_init code
2013-05-13 10:16 ` Maxime Ripard
@ 2013-05-15 22:40 ` Arnd Bergmann
-1 siblings, 0 replies; 24+ messages in thread
From: Arnd Bergmann @ 2013-05-15 22:40 UTC (permalink / raw)
To: Maxime Ripard
Cc: Rob Herring, Shawn Guo, Olof Johansson, Russell King,
linux-arm-kernel, linux-kernel
On Monday 13 May 2013, Maxime Ripard wrote:
> The recent introduction of debug_ll_io_init made possible to not rely
> anymore on a custom map_io function but on debug_ll_io_init for the
> early mapping and then on the various drivers to do the needed mappings for
> the kernel to boot.
>
> Some architectures begin to use only this function as the map_io callback in
> the machine description.
>
> In order to remove some boilerplate code, make the ARM mm code call
> debug_ll_io_init by itself when no .map_io callback is defined.
>
> This has been tested on the sunxi platform.
Great stuff!
I didn't notice the addition of debug_ll_io_init, so this is a nice surprise
for me.
Acked-by: Arnd Bergmann <arnd@arndb.de>
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 0/4] ARM: Remove boilerplate debug_ll_io_init code
@ 2013-05-15 22:40 ` Arnd Bergmann
0 siblings, 0 replies; 24+ messages in thread
From: Arnd Bergmann @ 2013-05-15 22:40 UTC (permalink / raw)
To: linux-arm-kernel
On Monday 13 May 2013, Maxime Ripard wrote:
> The recent introduction of debug_ll_io_init made possible to not rely
> anymore on a custom map_io function but on debug_ll_io_init for the
> early mapping and then on the various drivers to do the needed mappings for
> the kernel to boot.
>
> Some architectures begin to use only this function as the map_io callback in
> the machine description.
>
> In order to remove some boilerplate code, make the ARM mm code call
> debug_ll_io_init by itself when no .map_io callback is defined.
>
> This has been tested on the sunxi platform.
Great stuff!
I didn't notice the addition of debug_ll_io_init, so this is a nice surprise
for me.
Acked-by: Arnd Bergmann <arnd@arndb.de>
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 0/4] ARM: Remove boilerplate debug_ll_io_init code
2013-05-15 22:40 ` Arnd Bergmann
@ 2013-05-16 15:20 ` Maxime Ripard
-1 siblings, 0 replies; 24+ messages in thread
From: Maxime Ripard @ 2013-05-16 15:20 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Rob Herring, Shawn Guo, Olof Johansson, Russell King,
linux-arm-kernel, linux-kernel
Hi Arnd,
Le 16/05/2013 00:40, Arnd Bergmann a écrit :
> On Monday 13 May 2013, Maxime Ripard wrote:
>> The recent introduction of debug_ll_io_init made possible to not rely
>> anymore on a custom map_io function but on debug_ll_io_init for the
>> early mapping and then on the various drivers to do the needed mappings for
>> the kernel to boot.
>>
>> Some architectures begin to use only this function as the map_io callback in
>> the machine description.
>>
>> In order to remove some boilerplate code, make the ARM mm code call
>> debug_ll_io_init by itself when no .map_io callback is defined.
>>
>> This has been tested on the sunxi platform.
>
> Great stuff!
>
> I didn't notice the addition of debug_ll_io_init, so this is a nice surprise
> for me.
Well, you can thank Rob for that, I wasn't involved in it in the first
place :)
> Acked-by: Arnd Bergmann <arnd@arndb.de>
Thanks,
How will we merge this? The first patch would be merged by Russel and
the 3 others by their respective maintainers?
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 0/4] ARM: Remove boilerplate debug_ll_io_init code
@ 2013-05-16 15:20 ` Maxime Ripard
0 siblings, 0 replies; 24+ messages in thread
From: Maxime Ripard @ 2013-05-16 15:20 UTC (permalink / raw)
To: linux-arm-kernel
Hi Arnd,
Le 16/05/2013 00:40, Arnd Bergmann a ?crit :
> On Monday 13 May 2013, Maxime Ripard wrote:
>> The recent introduction of debug_ll_io_init made possible to not rely
>> anymore on a custom map_io function but on debug_ll_io_init for the
>> early mapping and then on the various drivers to do the needed mappings for
>> the kernel to boot.
>>
>> Some architectures begin to use only this function as the map_io callback in
>> the machine description.
>>
>> In order to remove some boilerplate code, make the ARM mm code call
>> debug_ll_io_init by itself when no .map_io callback is defined.
>>
>> This has been tested on the sunxi platform.
>
> Great stuff!
>
> I didn't notice the addition of debug_ll_io_init, so this is a nice surprise
> for me.
Well, you can thank Rob for that, I wasn't involved in it in the first
place :)
> Acked-by: Arnd Bergmann <arnd@arndb.de>
Thanks,
How will we merge this? The first patch would be merged by Russel and
the 3 others by their respective maintainers?
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 2/4] ARM: highbank: remove the .map_io declaration
2013-05-13 10:16 ` Maxime Ripard
@ 2013-05-16 16:15 ` Rob Herring
-1 siblings, 0 replies; 24+ messages in thread
From: Rob Herring @ 2013-05-16 16:15 UTC (permalink / raw)
To: Maxime Ripard
Cc: Shawn Guo, Arnd Bergmann, Olof Johansson, Russell King,
linux-arm-kernel, linux-kernel
On Mon, May 13, 2013 at 5:16 AM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> Now that the ARM core code calls debug_ll_io_init, we can remove it from
> the machine_desc declaration.
>
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Rob Herring <rob.herring@calxeda.com>
> ---
> arch/arm/mach-highbank/highbank.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c
> index e7df2dd..dc5d6be 100644
> --- a/arch/arm/mach-highbank/highbank.c
> +++ b/arch/arm/mach-highbank/highbank.c
> @@ -176,7 +176,6 @@ static const char *highbank_match[] __initconst = {
>
> DT_MACHINE_START(HIGHBANK, "Highbank")
> .smp = smp_ops(highbank_smp_ops),
> - .map_io = debug_ll_io_init,
> .init_irq = highbank_init_irq,
> .init_time = highbank_timer_init,
> .init_machine = highbank_init,
> --
> 1.8.1.2
>
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 2/4] ARM: highbank: remove the .map_io declaration
@ 2013-05-16 16:15 ` Rob Herring
0 siblings, 0 replies; 24+ messages in thread
From: Rob Herring @ 2013-05-16 16:15 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, May 13, 2013 at 5:16 AM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> Now that the ARM core code calls debug_ll_io_init, we can remove it from
> the machine_desc declaration.
>
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Rob Herring <rob.herring@calxeda.com>
> ---
> arch/arm/mach-highbank/highbank.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c
> index e7df2dd..dc5d6be 100644
> --- a/arch/arm/mach-highbank/highbank.c
> +++ b/arch/arm/mach-highbank/highbank.c
> @@ -176,7 +176,6 @@ static const char *highbank_match[] __initconst = {
>
> DT_MACHINE_START(HIGHBANK, "Highbank")
> .smp = smp_ops(highbank_smp_ops),
> - .map_io = debug_ll_io_init,
> .init_irq = highbank_init_irq,
> .init_time = highbank_timer_init,
> .init_machine = highbank_init,
> --
> 1.8.1.2
>
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 1/4] ARM: mmu: Call debug_ll_io_init if no map_io function is specified
2013-05-13 10:16 ` Maxime Ripard
@ 2013-05-16 16:16 ` Rob Herring
-1 siblings, 0 replies; 24+ messages in thread
From: Rob Herring @ 2013-05-16 16:16 UTC (permalink / raw)
To: Maxime Ripard
Cc: Shawn Guo, Arnd Bergmann, Olof Johansson, Russell King,
linux-arm-kernel, linux-kernel
On Mon, May 13, 2013 at 5:16 AM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> More and more sub-architectures are using only the debug_ll_io_init
> function as the map_io function. Make the core code call this function
> if no function is specified in the machine description to remove some
> boilerplate code.
>
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Rob Herring <rob.herring@calxeda.com>
> ---
> arch/arm/mm/mmu.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
> index e0d8565..faa36d7 100644
> --- a/arch/arm/mm/mmu.c
> +++ b/arch/arm/mm/mmu.c
> @@ -1232,6 +1232,8 @@ static void __init devicemaps_init(struct machine_desc *mdesc)
> */
> if (mdesc->map_io)
> mdesc->map_io();
> + else
> + debug_ll_io_init();
> fill_pmd_gaps();
>
> /* Reserve fixed i/o space in VMALLOC region */
> --
> 1.8.1.2
>
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 1/4] ARM: mmu: Call debug_ll_io_init if no map_io function is specified
@ 2013-05-16 16:16 ` Rob Herring
0 siblings, 0 replies; 24+ messages in thread
From: Rob Herring @ 2013-05-16 16:16 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, May 13, 2013 at 5:16 AM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> More and more sub-architectures are using only the debug_ll_io_init
> function as the map_io function. Make the core code call this function
> if no function is specified in the machine description to remove some
> boilerplate code.
>
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Rob Herring <rob.herring@calxeda.com>
> ---
> arch/arm/mm/mmu.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
> index e0d8565..faa36d7 100644
> --- a/arch/arm/mm/mmu.c
> +++ b/arch/arm/mm/mmu.c
> @@ -1232,6 +1232,8 @@ static void __init devicemaps_init(struct machine_desc *mdesc)
> */
> if (mdesc->map_io)
> mdesc->map_io();
> + else
> + debug_ll_io_init();
> fill_pmd_gaps();
>
> /* Reserve fixed i/o space in VMALLOC region */
> --
> 1.8.1.2
>
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 0/4] ARM: Remove boilerplate debug_ll_io_init code
2013-05-16 15:20 ` Maxime Ripard
@ 2013-05-17 13:31 ` Arnd Bergmann
-1 siblings, 0 replies; 24+ messages in thread
From: Arnd Bergmann @ 2013-05-17 13:31 UTC (permalink / raw)
To: Maxime Ripard
Cc: Rob Herring, Shawn Guo, Olof Johansson, Russell King,
linux-arm-kernel, linux-kernel
On Thursday 16 May 2013, Maxime Ripard wrote:
>
> How will we merge this? The first patch would be merged by Russel and
> the 3 others by their respective maintainers?
I think since it's mostly platform code and all trivial, we can merge
it into the next/cleanup branch in arm-soc directly.
Arnd
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 0/4] ARM: Remove boilerplate debug_ll_io_init code
@ 2013-05-17 13:31 ` Arnd Bergmann
0 siblings, 0 replies; 24+ messages in thread
From: Arnd Bergmann @ 2013-05-17 13:31 UTC (permalink / raw)
To: linux-arm-kernel
On Thursday 16 May 2013, Maxime Ripard wrote:
>
> How will we merge this? The first patch would be merged by Russel and
> the 3 others by their respective maintainers?
I think since it's mostly platform code and all trivial, we can merge
it into the next/cleanup branch in arm-soc directly.
Arnd
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 0/4] ARM: Remove boilerplate debug_ll_io_init code
2013-05-17 13:31 ` Arnd Bergmann
@ 2013-05-19 15:13 ` Maxime Ripard
-1 siblings, 0 replies; 24+ messages in thread
From: Maxime Ripard @ 2013-05-19 15:13 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Rob Herring, Shawn Guo, Olof Johansson, Russell King,
linux-arm-kernel, linux-kernel
Hi Arnd,
On Fri, May 17, 2013 at 03:31:16PM +0200, Arnd Bergmann wrote:
> On Thursday 16 May 2013, Maxime Ripard wrote:
>
> >
> > How will we merge this? The first patch would be merged by Russel and
> > the 3 others by their respective maintainers?
>
> I think since it's mostly platform code and all trivial, we can merge
> it into the next/cleanup branch in arm-soc directly.
Ok, then I can probably merge it into the branch with the irqchip_init
patches and send both these cleanups into the same branch in a few
weeks?
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 0/4] ARM: Remove boilerplate debug_ll_io_init code
@ 2013-05-19 15:13 ` Maxime Ripard
0 siblings, 0 replies; 24+ messages in thread
From: Maxime Ripard @ 2013-05-19 15:13 UTC (permalink / raw)
To: linux-arm-kernel
Hi Arnd,
On Fri, May 17, 2013 at 03:31:16PM +0200, Arnd Bergmann wrote:
> On Thursday 16 May 2013, Maxime Ripard wrote:
>
> >
> > How will we merge this? The first patch would be merged by Russel and
> > the 3 others by their respective maintainers?
>
> I think since it's mostly platform code and all trivial, we can merge
> it into the next/cleanup branch in arm-soc directly.
Ok, then I can probably merge it into the branch with the irqchip_init
patches and send both these cleanups into the same branch in a few
weeks?
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 24+ messages in thread
end of thread, other threads:[~2013-05-19 15:13 UTC | newest]
Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-13 10:16 [PATCH 0/4] ARM: Remove boilerplate debug_ll_io_init code Maxime Ripard
2013-05-13 10:16 ` Maxime Ripard
2013-05-13 10:16 ` [PATCH 1/4] ARM: mmu: Call debug_ll_io_init if no map_io function is specified Maxime Ripard
2013-05-13 10:16 ` Maxime Ripard
2013-05-16 16:16 ` Rob Herring
2013-05-16 16:16 ` Rob Herring
2013-05-13 10:16 ` [PATCH 2/4] ARM: highbank: remove the .map_io declaration Maxime Ripard
2013-05-13 10:16 ` Maxime Ripard
2013-05-16 16:15 ` Rob Herring
2013-05-16 16:15 ` Rob Herring
2013-05-13 10:16 ` [PATCH 3/4] ARM: mxs: " Maxime Ripard
2013-05-13 10:16 ` Maxime Ripard
2013-05-14 3:30 ` Shawn Guo
2013-05-14 3:30 ` Shawn Guo
2013-05-13 10:16 ` [PATCH 4/4] ARM: sunxi: Remove the .map_io function declaration Maxime Ripard
2013-05-13 10:16 ` Maxime Ripard
2013-05-15 22:40 ` [PATCH 0/4] ARM: Remove boilerplate debug_ll_io_init code Arnd Bergmann
2013-05-15 22:40 ` Arnd Bergmann
2013-05-16 15:20 ` Maxime Ripard
2013-05-16 15:20 ` Maxime Ripard
2013-05-17 13:31 ` Arnd Bergmann
2013-05-17 13:31 ` Arnd Bergmann
2013-05-19 15:13 ` Maxime Ripard
2013-05-19 15:13 ` Maxime Ripard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.