Skip to contentSkip to conversation

ARM: SAMSUNG: fix to support for missing cpu specific map_io

PATCH New Kukjin Kim 3 participants 3 messages Jul 30, 2013 – Jul 31, 2013

Subsystems (3)
lore
Share & tools
lore

Kukjin Kim

author
#0 lore raw

PATCH 1/1 ARM: SAMSUNG: fix to support for missing cpu specific map_io

Since commit 7ed76e08 (ARM: EXYNOS: Fix low level debug support) map_io() is not needed for exynos5440 so need to fix to lookup cpu which using map_io(). Without this, kernel boot log complains 'CPU EXYNOS5440 support not enabled' on exynos5440 and panic().

---
 arch/arm/plat-samsung/init.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
arch/arm/plat-samsung/init.c +3 -2
index 3e5c461..50a3ea0 100644
@@ -55,12 +55,13 @@ void __init s3c_init_cpu(unsigned long idcode,
 
 	printk("CPU %s (id 0x%08lx)\n", cpu->name, idcode);
 
-	if (cpu->map_io == NULL || cpu->init == NULL) {
+	if (cpu->init == NULL) {
 		printk(KERN_ERR "CPU %s support not enabled\n", cpu->name);
 		panic("Unsupported Samsung CPU");
 	}
 
-	cpu->map_io();
+	if (cpu->map_io)
+		cpu->map_io();
 }
 
 /* s3c24xx_init_clocks
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/1 ARM: SAMSUNG: fix to support for missing cpu specific map_io

Quoted 16 lines · Kukjin Kim

Since commit 7ed76e08 (ARM: EXYNOS: Fix low level debug support) map_io() is not needed for exynos5440 so need to fix to lookup cpu which using map_io(). Without this, kernel boot log complains 'CPU EXYNOS5440 support not enabled' on exynos5440 and panic().

---
 arch/arm/plat-samsung/init.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
arch/arm/plat-samsung/init.c +0 -0
index 3e5c461..50a3ea0 100644

arch/arm/plat-samsung/init.c void __init s3c_init_cpu(unsigned long idcode, · line 60

Quoted 7 lines
arch/arm/plat-samsung/init.c +1 -1
@@ -55,12 +55,13 @@ void __init s3c_init_cpu(unsigned long idcode,
 
        printk("CPU %s (id 0x%08lx)\n", cpu->name, idcode);
 
-       if (cpu->map_io == NULL || cpu->init == NULL) {
+       if (cpu->init == NULL) {
                printk(KERN_ERR "CPU %s support not enabled\n", cpu->name);
                panic("Unsupported Samsung CPU");

While at it you could probably remove the printk and have that message printed by panic instead?

Signature · 2 lines
With warm regards,
Sachin
#2 lore raw

PATCH 1/1 ARM: SAMSUNG: fix to support for missing cpu specific map_io

Quoted 19 lines · Sachin Kamat
Quoted 17 lines · Kukjin Kim

Since commit 7ed76e08 (ARM: EXYNOS: Fix low level debug support) map_io() is not needed for exynos5440 so need to fix to lookup cpu which using map_io(). Without this, kernel boot log complains 'CPU EXYNOS5440 support not enabled' on exynos5440 and panic().

---
 arch/arm/plat-samsung/init.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
arch/arm/plat-samsung/init.c +0 -0
index 3e5c461..50a3ea0 100644
@@ -55,12 +55,13 @@ void __init s3c_init_cpu(unsigned long idcode,
 
Quoted 5 lines

arch/arm/plat-samsung/init.c void __init s3c_init_cpu(unsigned long idcode,

Quoted 5 lines
arch/arm/plat-samsung/init.c +1 -1
        printk("CPU %s (id 0x%08lx)\n", cpu->name, idcode);
 
-       if (cpu->map_io == NULL || cpu->init == NULL) {
+       if (cpu->init == NULL) {
                printk(KERN_ERR "CPU %s support not enabled\n",

cpu->name);

Quoted 5 lines

arch/arm/plat-samsung/init.c void __init s3c_init_cpu(unsigned long idcode, · line 60

Quoted 1 line
arch/arm/plat-samsung/init.c +0 -0
                panic("Unsupported Samsung CPU");

While at it you could probably remove the printk and have that message printed by panic instead?

If required, it should be handled separately, and it is not critical.

- Kukjin