aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMagnus Damm <damm@opensource.se>2012-02-29 07:37:27 -0500
committerRafael J. Wysocki <rjw@sisk.pl>2012-03-12 17:19:41 -0400
commit50e15c34f0072324fee9faaae71b129e8b419913 (patch)
treed545b7300c87a360dfada7ee07a84cd8e2c93902
parent5d7220ec000fe357b8e91b4be66a2b0b061c867f (diff)
ARM: mach-shmobile: sh73a0 map_io and init_early update
Update the sh73a0 SoC and the AG5EVM and Kota2 boards to make use of the functions sh73a0_map_io() and sh73a0_add_early_devices(). Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
-rw-r--r--arch/arm/mach-shmobile/board-ag5evm.c25
-rw-r--r--arch/arm/mach-shmobile/board-kota2.c25
-rw-r--r--arch/arm/mach-shmobile/include/mach/common.h1
-rw-r--r--arch/arm/mach-shmobile/setup-sh73a0.c22
4 files changed, 27 insertions, 46 deletions
diff --git a/arch/arm/mach-shmobile/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c
index 068b754bc348..cd894a200d52 100644
--- a/arch/arm/mach-shmobile/board-ag5evm.c
+++ b/arch/arm/mach-shmobile/board-ag5evm.c
@@ -46,7 +46,6 @@
46#include <mach/common.h> 46#include <mach/common.h>
47#include <asm/mach-types.h> 47#include <asm/mach-types.h>
48#include <asm/mach/arch.h> 48#include <asm/mach/arch.h>
49#include <asm/mach/map.h>
50#include <asm/mach/time.h> 49#include <asm/mach/time.h>
51#include <asm/hardware/gic.h> 50#include <asm/hardware/gic.h>
52#include <asm/hardware/cache-l2x0.h> 51#include <asm/hardware/cache-l2x0.h>
@@ -486,27 +485,6 @@ static struct platform_device *ag5evm_devices[] __initdata = {
486 &sdhi1_device, 485 &sdhi1_device,
487}; 486};
488 487
489static struct map_desc ag5evm_io_desc[] __initdata = {
490 /* create a 1:1 entity map for 0xe6xxxxxx
491 * used by CPGA, INTC and PFC.
492 */
493 {
494 .virtual = 0xe6000000,
495 .pfn = __phys_to_pfn(0xe6000000),
496 .length = 256 << 20,
497 .type = MT_DEVICE_NONSHARED
498 },
499};
500
501static void __init ag5evm_map_io(void)
502{
503 iotable_init(ag5evm_io_desc, ARRAY_SIZE(ag5evm_io_desc));
504
505 /* setup early devices and console here as well */
506 sh73a0_add_early_devices();
507 shmobile_setup_console();
508}
509
510static void __init ag5evm_init(void) 488static void __init ag5evm_init(void)
511{ 489{
512 sh73a0_pinmux_init(); 490 sh73a0_pinmux_init();
@@ -634,7 +612,8 @@ struct sys_timer ag5evm_timer = {
634}; 612};
635 613
636MACHINE_START(AG5EVM, "ag5evm") 614MACHINE_START(AG5EVM, "ag5evm")
637 .map_io = ag5evm_map_io, 615 .map_io = sh73a0_map_io,
616 .init_early = sh73a0_add_early_devices,
638 .nr_irqs = NR_IRQS_LEGACY, 617 .nr_irqs = NR_IRQS_LEGACY,
639 .init_irq = sh73a0_init_irq, 618 .init_irq = sh73a0_init_irq,
640 .handle_irq = gic_handle_irq, 619 .handle_irq = gic_handle_irq,
diff --git a/arch/arm/mach-shmobile/board-kota2.c b/arch/arm/mach-shmobile/board-kota2.c
index c8e7ca23fc06..cfc5f413cf0f 100644
--- a/arch/arm/mach-shmobile/board-kota2.c
+++ b/arch/arm/mach-shmobile/board-kota2.c
@@ -43,7 +43,6 @@
43#include <mach/common.h> 43#include <mach/common.h>
44#include <asm/mach-types.h> 44#include <asm/mach-types.h>
45#include <asm/mach/arch.h> 45#include <asm/mach/arch.h>
46#include <asm/mach/map.h>
47#include <asm/mach/time.h> 46#include <asm/mach/time.h>
48#include <asm/hardware/gic.h> 47#include <asm/hardware/gic.h>
49#include <asm/hardware/cache-l2x0.h> 48#include <asm/hardware/cache-l2x0.h>
@@ -409,27 +408,6 @@ static struct platform_device *kota2_devices[] __initdata = {
409 &sdhi1_device, 408 &sdhi1_device,
410}; 409};
411 410
412static struct map_desc kota2_io_desc[] __initdata = {
413 /* create a 1:1 entity map for 0xe6xxxxxx
414 * used by CPGA, INTC and PFC.
415 */
416 {
417 .virtual = 0xe6000000,
418 .pfn = __phys_to_pfn(0xe6000000),
419 .length = 256 << 20,
420 .type = MT_DEVICE_NONSHARED
421 },
422};
423
424static void __init kota2_map_io(void)
425{
426 iotable_init(kota2_io_desc, ARRAY_SIZE(kota2_io_desc));
427
428 /* setup early devices and console here as well */
429 sh73a0_add_early_devices();
430 shmobile_setup_console();
431}
432
433static void __init kota2_init(void) 411static void __init kota2_init(void)
434{ 412{
435 sh73a0_pinmux_init(); 413 sh73a0_pinmux_init();
@@ -547,7 +525,8 @@ struct sys_timer kota2_timer = {
547}; 525};
548 526
549MACHINE_START(KOTA2, "kota2") 527MACHINE_START(KOTA2, "kota2")
550 .map_io = kota2_map_io, 528 .map_io = sh73a0_map_io,
529 .init_early = sh73a0_add_early_devices,
551 .nr_irqs = NR_IRQS_LEGACY, 530 .nr_irqs = NR_IRQS_LEGACY,
552 .init_irq = sh73a0_init_irq, 531 .init_irq = sh73a0_init_irq,
553 .handle_irq = gic_handle_irq, 532 .handle_irq = gic_handle_irq,
diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h
index 3858b897f98b..a0e0cfb4c545 100644
--- a/arch/arm/mach-shmobile/include/mach/common.h
+++ b/arch/arm/mach-shmobile/include/mach/common.h
@@ -44,6 +44,7 @@ extern struct clk sh7372_extal1_clk;
44extern struct clk sh7372_extal2_clk; 44extern struct clk sh7372_extal2_clk;
45 45
46extern void sh73a0_init_irq(void); 46extern void sh73a0_init_irq(void);
47extern void sh73a0_map_io(void);
47extern void sh73a0_add_early_devices(void); 48extern void sh73a0_add_early_devices(void);
48extern void sh73a0_add_standard_devices(void); 49extern void sh73a0_add_standard_devices(void);
49extern void sh73a0_clock_init(void); 50extern void sh73a0_clock_init(void);
diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c
index 20e71e5cace4..988eeb3782c7 100644
--- a/arch/arm/mach-shmobile/setup-sh73a0.c
+++ b/arch/arm/mach-shmobile/setup-sh73a0.c
@@ -32,9 +32,28 @@
32#include <linux/sh_timer.h> 32#include <linux/sh_timer.h>
33#include <mach/hardware.h> 33#include <mach/hardware.h>
34#include <mach/sh73a0.h> 34#include <mach/sh73a0.h>
35#include <mach/common.h>
35#include <asm/mach-types.h> 36#include <asm/mach-types.h>
37#include <asm/mach/map.h>
36#include <asm/mach/arch.h> 38#include <asm/mach/arch.h>
37 39
40static struct map_desc sh73a0_io_desc[] __initdata = {
41 /* create a 1:1 entity map for 0xe6xxxxxx
42 * used by CPGA, INTC and PFC.
43 */
44 {
45 .virtual = 0xe6000000,
46 .pfn = __phys_to_pfn(0xe6000000),
47 .length = 256 << 20,
48 .type = MT_DEVICE_NONSHARED
49 },
50};
51
52void __init sh73a0_map_io(void)
53{
54 iotable_init(sh73a0_io_desc, ARRAY_SIZE(sh73a0_io_desc));
55}
56
38static struct plat_sci_port scif0_platform_data = { 57static struct plat_sci_port scif0_platform_data = {
39 .mapbase = 0xe6c40000, 58 .mapbase = 0xe6c40000,
40 .flags = UPF_BOOT_AUTOCONF, 59 .flags = UPF_BOOT_AUTOCONF,
@@ -671,4 +690,7 @@ void __init sh73a0_add_early_devices(void)
671{ 690{
672 early_platform_add_devices(sh73a0_early_devices, 691 early_platform_add_devices(sh73a0_early_devices,
673 ARRAY_SIZE(sh73a0_early_devices)); 692 ARRAY_SIZE(sh73a0_early_devices));
693
694 /* setup early console here as well */
695 shmobile_setup_console();
674} 696}