* [PATCH 01/03] ARM: shmobile: sh73a0: Introduce generic setup callback
@ 2014-09-04 2:28 Magnus Damm
2014-09-04 4:05 ` Simon Horman
2014-09-04 4:15 ` Magnus Damm
0 siblings, 2 replies; 3+ messages in thread
From: Magnus Damm @ 2014-09-04 2:28 UTC (permalink / raw)
To: linux-sh
From: Magnus Damm <damm+renesas@opensource.se>
Add a generic sh73a0 machine setup callback for the upcoming
sh73a0 multiplatform case. Cache needs to be configured, and
legacy clocks must be omitted.
Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
---
arch/arm/mach-shmobile/setup-sh73a0.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
--- 0001/arch/arm/mach-shmobile/setup-sh73a0.c
+++ work/arch/arm/mach-shmobile/setup-sh73a0.c 2014-09-04 10:46:41.000000000 +0900
@@ -33,6 +33,7 @@
#include <linux/platform_data/sh_ipmmu.h>
#include <linux/platform_data/irq-renesas-intc-irqpin.h>
+#include <asm/hardware/cache-l2x0.h>
#include <asm/mach-types.h>
#include <asm/mach/map.h>
#include <asm/mach/arch.h>
@@ -772,8 +773,6 @@ void __init sh73a0_add_early_devices(voi
shmobile_setup_console();
}
-#ifdef CONFIG_USE_OF
-
void __init sh73a0_add_standard_devices_dt(void)
{
/* clocks are setup late during boot in the case of DT */
@@ -784,6 +783,17 @@ void __init sh73a0_add_standard_devices_
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
}
+#ifdef CONFIG_USE_OF
+
+static void __init sh73a0_generic_init(void)
+{
+#ifdef CONFIG_CACHE_L2X0
+ /* Shared attribute override enable, 64K*8way */
+ l2x0_init(IOMEM(0xf0100000), 0x00400000, 0xc20f0fff);
+#endif
+ of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+}
+
static const char *sh73a0_boards_compat_dt[] __initdata = {
"renesas,sh73a0",
NULL,
@@ -793,7 +803,7 @@ DT_MACHINE_START(SH73A0_DT, "Generic SH7
.smp = smp_ops(sh73a0_smp_ops),
.map_io = sh73a0_map_io,
.init_early = sh73a0_init_delay,
- .init_machine = sh73a0_add_standard_devices_dt,
+ .init_machine = sh73a0_generic_init,
.init_late = shmobile_init_late,
.dt_compat = sh73a0_boards_compat_dt,
MACHINE_END
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 01/03] ARM: shmobile: sh73a0: Introduce generic setup callback
2014-09-04 2:28 [PATCH 01/03] ARM: shmobile: sh73a0: Introduce generic setup callback Magnus Damm
@ 2014-09-04 4:05 ` Simon Horman
2014-09-04 4:15 ` Magnus Damm
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2014-09-04 4:05 UTC (permalink / raw)
To: linux-sh
On Thu, Sep 04, 2014 at 11:28:45AM +0900, Magnus Damm wrote:
> From: Magnus Damm <damm+renesas@opensource.se>
>
> Add a generic sh73a0 machine setup callback for the upcoming
> sh73a0 multiplatform case. Cache needs to be configured, and
> legacy clocks must be omitted.
>
> Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
> ---
>
> arch/arm/mach-shmobile/setup-sh73a0.c | 16 +++++++++++++---
> 1 file changed, 13 insertions(+), 3 deletions(-)
>
> --- 0001/arch/arm/mach-shmobile/setup-sh73a0.c
> +++ work/arch/arm/mach-shmobile/setup-sh73a0.c 2014-09-04 10:46:41.000000000 +0900
> @@ -33,6 +33,7 @@
> #include <linux/platform_data/sh_ipmmu.h>
> #include <linux/platform_data/irq-renesas-intc-irqpin.h>
>
> +#include <asm/hardware/cache-l2x0.h>
> #include <asm/mach-types.h>
> #include <asm/mach/map.h>
> #include <asm/mach/arch.h>
> @@ -772,8 +773,6 @@ void __init sh73a0_add_early_devices(voi
> shmobile_setup_console();
> }
>
> -#ifdef CONFIG_USE_OF
> -
Is moving CONFIG_USE_OF from here to a bit further down intentional?
I'm not sure how it fits with the rest of the patch.
> void __init sh73a0_add_standard_devices_dt(void)
> {
> /* clocks are setup late during boot in the case of DT */
> @@ -784,6 +783,17 @@ void __init sh73a0_add_standard_devices_
> of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
> }
>
> +#ifdef CONFIG_USE_OF
> +
> +static void __init sh73a0_generic_init(void)
> +{
> +#ifdef CONFIG_CACHE_L2X0
> + /* Shared attribute override enable, 64K*8way */
> + l2x0_init(IOMEM(0xf0100000), 0x00400000, 0xc20f0fff);
> +#endif
> + of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
> +}
> +
> static const char *sh73a0_boards_compat_dt[] __initdata = {
> "renesas,sh73a0",
> NULL,
> @@ -793,7 +803,7 @@ DT_MACHINE_START(SH73A0_DT, "Generic SH7
> .smp = smp_ops(sh73a0_smp_ops),
> .map_io = sh73a0_map_io,
> .init_early = sh73a0_init_delay,
> - .init_machine = sh73a0_add_standard_devices_dt,
> + .init_machine = sh73a0_generic_init,
> .init_late = shmobile_init_late,
> .dt_compat = sh73a0_boards_compat_dt,
> MACHINE_END
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 01/03] ARM: shmobile: sh73a0: Introduce generic setup callback
2014-09-04 2:28 [PATCH 01/03] ARM: shmobile: sh73a0: Introduce generic setup callback Magnus Damm
2014-09-04 4:05 ` Simon Horman
@ 2014-09-04 4:15 ` Magnus Damm
1 sibling, 0 replies; 3+ messages in thread
From: Magnus Damm @ 2014-09-04 4:15 UTC (permalink / raw)
To: linux-sh
On Thu, Sep 4, 2014 at 1:05 PM, Simon Horman <horms@verge.net.au> wrote:
> On Thu, Sep 04, 2014 at 11:28:45AM +0900, Magnus Damm wrote:
>> From: Magnus Damm <damm+renesas@opensource.se>
>>
>> Add a generic sh73a0 machine setup callback for the upcoming
>> sh73a0 multiplatform case. Cache needs to be configured, and
>> legacy clocks must be omitted.
>>
>> Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
>> ---
>>
>> arch/arm/mach-shmobile/setup-sh73a0.c | 16 +++++++++++++---
>> 1 file changed, 13 insertions(+), 3 deletions(-)
>>
>> --- 0001/arch/arm/mach-shmobile/setup-sh73a0.c
>> +++ work/arch/arm/mach-shmobile/setup-sh73a0.c 2014-09-04 10:46:41.000000000 +0900
>> @@ -33,6 +33,7 @@
>> #include <linux/platform_data/sh_ipmmu.h>
>> #include <linux/platform_data/irq-renesas-intc-irqpin.h>
>>
>> +#include <asm/hardware/cache-l2x0.h>
>> #include <asm/mach-types.h>
>> #include <asm/mach/map.h>
>> #include <asm/mach/arch.h>
>> @@ -772,8 +773,6 @@ void __init sh73a0_add_early_devices(voi
>> shmobile_setup_console();
>> }
>>
>> -#ifdef CONFIG_USE_OF
>> -
>
> Is moving CONFIG_USE_OF from here to a bit further down intentional?
> I'm not sure how it fits with the rest of the patch.
True, I overlooked that, will fix and resend.
Cheers,
/ magnus
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-09-04 4:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-04 2:28 [PATCH 01/03] ARM: shmobile: sh73a0: Introduce generic setup callback Magnus Damm
2014-09-04 4:05 ` Simon Horman
2014-09-04 4:15 ` Magnus Damm
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.