diff mbox

[1/2] ARM: hisi: enable L2 driver

Message ID 1396445663-1357-1-git-send-email-haojian.zhuang@linaro.org
State Changes Requested
Headers show

Commit Message

Haojian Zhuang April 2, 2014, 1:34 p.m. UTC
l2x0_of_init() is necessary to enable PL310 L2 cache controller.

Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
---
 arch/arm/mach-hisi/hisilicon.c | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Russell King - ARM Linux April 2, 2014, 5 p.m. UTC | #1
On Wed, Apr 02, 2014 at 09:34:22PM +0800, Haojian Zhuang wrote:
> +static void __init hi3xxx_init(void)
> +{
> +	l2x0_of_init(0, ~0UL);

	l2x0_of_init(0, ~0);

please, no need for a UL suffix on it.
Haojian Zhuang April 3, 2014, 1 a.m. UTC | #2
On 3 April 2014 01:00, Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> On Wed, Apr 02, 2014 at 09:34:22PM +0800, Haojian Zhuang wrote:
>> +static void __init hi3xxx_init(void)
>> +{
>> +     l2x0_of_init(0, ~0UL);
>
>         l2x0_of_init(0, ~0);
>
> please, no need for a UL suffix on it.
>
Got it.

Thanks
Haojian
diff mbox

Patch

diff --git a/arch/arm/mach-hisi/hisilicon.c b/arch/arm/mach-hisi/hisilicon.c
index 741faf3..3a6f244 100644
--- a/arch/arm/mach-hisi/hisilicon.c
+++ b/arch/arm/mach-hisi/hisilicon.c
@@ -17,6 +17,7 @@ 
 #include <linux/of_address.h>
 #include <linux/of_platform.h>
 
+#include <asm/hardware/cache-l2x0.h>
 #include <asm/proc-fns.h>
 
 #include <asm/mach/arch.h>
@@ -51,6 +52,12 @@  static void __init hi3620_map_io(void)
 	iotable_init(hi3620_io_desc, ARRAY_SIZE(hi3620_io_desc));
 }
 
+static void __init hi3xxx_init(void)
+{
+	l2x0_of_init(0, ~0UL);
+	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+}
+
 static void hi3xxx_restart(enum reboot_mode mode, const char *cmd)
 {
 	struct device_node *np;
@@ -86,5 +93,6 @@  DT_MACHINE_START(HI3620, "Hisilicon Hi3620 (Flattened Device Tree)")
 	.map_io		= hi3620_map_io,
 	.dt_compat	= hi3xxx_compat,
 	.smp		= smp_ops(hi3xxx_smp_ops),
+	.init_machine	= hi3xxx_init,
 	.restart	= hi3xxx_restart,
 MACHINE_END