aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ep93xx
diff options
context:
space:
mode:
authorHartley Sweeten <hartleys@visionengravers.com>2009-05-04 14:09:25 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-05-15 15:42:57 -0400
commita2bd40d215b0997e21a0cfd06c1aa474ec3a0944 (patch)
tree116c86ee81826630b1e242051cf124b4a1426f28 /arch/arm/mach-ep93xx
parentb4175b89921fefb2f352472fa6dccb0fc4fb37d9 (diff)
[ARM] 5504/1: ep93xx: Merge all edb93xx platforms
The Cirrus Logic EDB93xx development board platform init files share redundant code. The only differences are in the flash memory configuration, MACH_TYPE, and additional on-board I2C devices. This patch merges all of them into one file. Cc: Lennert Buytenhek <buytenh@wantstofly.org> Cc: Herbert Valerio Riedel <hvr@gnu.org> Cc: Toufeeq Hussain <toufeeq_hussain@infosys.com> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Ryan Mallon <ryan@bluewatersys.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-ep93xx')
-rw-r--r--arch/arm/mach-ep93xx/Kconfig52
-rw-r--r--arch/arm/mach-ep93xx/Makefile8
-rw-r--r--arch/arm/mach-ep93xx/edb9302.c68
-rw-r--r--arch/arm/mach-ep93xx/edb9302a.c68
-rw-r--r--arch/arm/mach-ep93xx/edb9307.c68
-rw-r--r--arch/arm/mach-ep93xx/edb9307a.c80
-rw-r--r--arch/arm/mach-ep93xx/edb9312.c69
-rw-r--r--arch/arm/mach-ep93xx/edb9315.c68
-rw-r--r--arch/arm/mach-ep93xx/edb9315a.c68
-rw-r--r--arch/arm/mach-ep93xx/edb93xx.c217
10 files changed, 253 insertions, 513 deletions
diff --git a/arch/arm/mach-ep93xx/Kconfig b/arch/arm/mach-ep93xx/Kconfig
index 56bddcef6905..9414eb641311 100644
--- a/arch/arm/mach-ep93xx/Kconfig
+++ b/arch/arm/mach-ep93xx/Kconfig
@@ -15,44 +15,62 @@ config MACH_ADSSPHERE
15 Say 'Y' here if you want your kernel to support the ADS 15 Say 'Y' here if you want your kernel to support the ADS
16 Sphere board. 16 Sphere board.
17 17
18config MACH_EDB93XX
19 bool
20 default n
21
22config MACH_EDB9301
23 bool "Support Cirrus Logic EDB9301"
24 select MACH_EDB93XX
25 help
26 Say 'Y' here if you want your kernel to support the Cirrus
27 Logic EDB9301 Evaluation Board.
28
18config MACH_EDB9302 29config MACH_EDB9302
19 bool "Support Cirrus Logic EDB9302" 30 bool "Support Cirrus Logic EDB9302"
31 select MACH_EDB93XX
20 help 32 help
21 Say 'Y' here if you want your kernel to support the Cirrus 33 Say 'Y' here if you want your kernel to support the Cirrus
22 Logic EDB9302 Evaluation Board. 34 Logic EDB9302 Evaluation Board.
23 35
24config MACH_EDB9302A 36config MACH_EDB9302A
25 bool "Support Cirrus Logic EDB9302A" 37 bool "Support Cirrus Logic EDB9302A"
38 select MACH_EDB93XX
26 help 39 help
27 Say 'Y' here if you want your kernel to support the Cirrus 40 Say 'Y' here if you want your kernel to support the Cirrus
28 Logic EDB9302A Evaluation Board. 41 Logic EDB9302A Evaluation Board.
29 42
30config MACH_EDB9307 43config MACH_EDB9307
31 bool "Support Cirrus Logic EDB9307" 44 bool "Support Cirrus Logic EDB9307"
45 select MACH_EDB93XX
32 help 46 help
33 Say 'Y' here if you want your kernel to support the Cirrus 47 Say 'Y' here if you want your kernel to support the Cirrus
34 Logic EDB9307 Evaluation Board. 48 Logic EDB9307 Evaluation Board.
35 49
36config MACH_EDB9307A 50config MACH_EDB9307A
37 bool "Support Cirrus Logic EDB9307A" 51 bool "Support Cirrus Logic EDB9307A"
52 select MACH_EDB93XX
38 help 53 help
39 Say 'Y' here if you want your kernel to support the Cirrus 54 Say 'Y' here if you want your kernel to support the Cirrus
40 Logic EDB9307A Evaluation Board. 55 Logic EDB9307A Evaluation Board.
41 56
42config MACH_EDB9312 57config MACH_EDB9312
43 bool "Support Cirrus Logic EDB9312" 58 bool "Support Cirrus Logic EDB9312"
59 select MACH_EDB93XX
44 help 60 help
45 Say 'Y' here if you want your kernel to support the Cirrus 61 Say 'Y' here if you want your kernel to support the Cirrus
46 Logic EDB9312 Evaluation Board. 62 Logic EDB9312 Evaluation Board.
47 63
48config MACH_EDB9315 64config MACH_EDB9315
49 bool "Support Cirrus Logic EDB9315" 65 bool "Support Cirrus Logic EDB9315"
66 select MACH_EDB93XX
50 help 67 help
51 Say 'Y' here if you want your kernel to support the Cirrus 68 Say 'Y' here if you want your kernel to support the Cirrus
52 Logic EDB9315 Evaluation Board. 69 Logic EDB9315 Evaluation Board.
53 70
54config MACH_EDB9315A 71config MACH_EDB9315A
55 bool "Support Cirrus Logic EDB9315A" 72 bool "Support Cirrus Logic EDB9315A"
73 select MACH_EDB93XX
56 help 74 help
57 Say 'Y' here if you want your kernel to support the Cirrus 75 Say 'Y' here if you want your kernel to support the Cirrus
58 Logic EDB9315A Evaluation Board. 76 Logic EDB9315A Evaluation Board.
@@ -64,29 +82,29 @@ config MACH_GESBC9312
64 GESBC-9312-sx board. 82 GESBC-9312-sx board.
65 83
66config MACH_MICRO9 84config MACH_MICRO9
67 bool 85 bool
68 default n 86 default n
69 87
70config MACH_MICRO9H 88config MACH_MICRO9H
71 bool "Support Contec Hypercontrol Micro9-H" 89 bool "Support Contec Hypercontrol Micro9-H"
72 select MACH_MICRO9 90 select MACH_MICRO9
73 help 91 help
74 Say 'Y' here if you want your kernel to support the 92 Say 'Y' here if you want your kernel to support the
75 Contec Hypercontrol Micro9-H board. 93 Contec Hypercontrol Micro9-H board.
76 94
77config MACH_MICRO9M 95config MACH_MICRO9M
78 bool "Support Contec Hypercontrol Micro9-M" 96 bool "Support Contec Hypercontrol Micro9-M"
79 select MACH_MICRO9 97 select MACH_MICRO9
80 help 98 help
81 Say 'Y' here if you want your kernel to support the 99 Say 'Y' here if you want your kernel to support the
82 Contec Hypercontrol Micro9-M board. 100 Contec Hypercontrol Micro9-M board.
83 101
84config MACH_MICRO9L 102config MACH_MICRO9L
85 bool "Support Contec Hypercontrol Micro9-L" 103 bool "Support Contec Hypercontrol Micro9-L"
86 select MACH_MICRO9 104 select MACH_MICRO9
87 help 105 help
88 Say 'Y' here if you want your kernel to support the 106 Say 'Y' here if you want your kernel to support the
89 Contec Hypercontrol Micro9-L board. 107 Contec Hypercontrol Micro9-L board.
90 108
91config MACH_TS72XX 109config MACH_TS72XX
92 bool "Support Technologic Systems TS-72xx SBC" 110 bool "Support Technologic Systems TS-72xx SBC"
diff --git a/arch/arm/mach-ep93xx/Makefile b/arch/arm/mach-ep93xx/Makefile
index 9522e205b73f..eae6199a9891 100644
--- a/arch/arm/mach-ep93xx/Makefile
+++ b/arch/arm/mach-ep93xx/Makefile
@@ -7,13 +7,7 @@ obj-n :=
7obj- := 7obj- :=
8 8
9obj-$(CONFIG_MACH_ADSSPHERE) += adssphere.o 9obj-$(CONFIG_MACH_ADSSPHERE) += adssphere.o
10obj-$(CONFIG_MACH_EDB9302) += edb9302.o 10obj-$(CONFIG_MACH_EDB93XX) += edb93xx.o
11obj-$(CONFIG_MACH_EDB9302A) += edb9302a.o
12obj-$(CONFIG_MACH_EDB9307) += edb9307.o
13obj-$(CONFIG_MACH_EDB9307A) += edb9307a.o
14obj-$(CONFIG_MACH_EDB9312) += edb9312.o
15obj-$(CONFIG_MACH_EDB9315) += edb9315.o
16obj-$(CONFIG_MACH_EDB9315A) += edb9315a.o
17obj-$(CONFIG_MACH_GESBC9312) += gesbc9312.o 11obj-$(CONFIG_MACH_GESBC9312) += gesbc9312.o
18obj-$(CONFIG_MACH_MICRO9) += micro9.o 12obj-$(CONFIG_MACH_MICRO9) += micro9.o
19obj-$(CONFIG_MACH_TS72XX) += ts72xx.o 13obj-$(CONFIG_MACH_TS72XX) += ts72xx.o
diff --git a/arch/arm/mach-ep93xx/edb9302.c b/arch/arm/mach-ep93xx/edb9302.c
deleted file mode 100644
index 8bf8d7c78f1a..000000000000
--- a/arch/arm/mach-ep93xx/edb9302.c
+++ /dev/null
@@ -1,68 +0,0 @@
1/*
2 * arch/arm/mach-ep93xx/edb9302.c
3 * Cirrus Logic EDB9302 support.
4 *
5 * Copyright (C) 2006 George Kashperko <george@chas.com.ua>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or (at
10 * your option) any later version.
11 */
12
13#include <linux/kernel.h>
14#include <linux/init.h>
15#include <linux/mm.h>
16#include <linux/sched.h>
17#include <linux/interrupt.h>
18#include <linux/ioport.h>
19#include <linux/mtd/physmap.h>
20#include <linux/platform_device.h>
21#include <linux/io.h>
22#include <linux/i2c.h>
23#include <mach/hardware.h>
24#include <asm/mach-types.h>
25#include <asm/mach/arch.h>
26
27static struct physmap_flash_data edb9302_flash_data = {
28 .width = 2,
29};
30
31static struct resource edb9302_flash_resource = {
32 .start = EP93XX_CS6_PHYS_BASE,
33 .end = EP93XX_CS6_PHYS_BASE + SZ_16M - 1,
34 .flags = IORESOURCE_MEM,
35};
36
37static struct platform_device edb9302_flash = {
38 .name = "physmap-flash",
39 .id = 0,
40 .dev = {
41 .platform_data = &edb9302_flash_data,
42 },
43 .num_resources = 1,
44 .resource = &edb9302_flash_resource,
45};
46
47static struct ep93xx_eth_data edb9302_eth_data = {
48 .phy_id = 1,
49};
50
51static void __init edb9302_init_machine(void)
52{
53 ep93xx_init_devices();
54 platform_device_register(&edb9302_flash);
55
56 ep93xx_register_eth(&edb9302_eth_data, 1);
57}
58
59MACHINE_START(EDB9302, "Cirrus Logic EDB9302 Evaluation Board")
60 /* Maintainer: George Kashperko <george@chas.com.ua> */
61 .phys_io = EP93XX_APB_PHYS_BASE,
62 .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
63 .boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100,
64 .map_io = ep93xx_map_io,
65 .init_irq = ep93xx_init_irq,
66 .timer = &ep93xx_timer,
67 .init_machine = edb9302_init_machine,
68MACHINE_END
diff --git a/arch/arm/mach-ep93xx/edb9302a.c b/arch/arm/mach-ep93xx/edb9302a.c
deleted file mode 100644
index a352c57c7b46..000000000000
--- a/arch/arm/mach-ep93xx/edb9302a.c
+++ /dev/null
@@ -1,68 +0,0 @@
1/*
2 * arch/arm/mach-ep93xx/edb9302a.c
3 * Cirrus Logic EDB9302A support.
4 *
5 * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or (at
10 * your option) any later version.
11 */
12
13#include <linux/kernel.h>
14#include <linux/init.h>
15#include <linux/mm.h>
16#include <linux/sched.h>
17#include <linux/interrupt.h>
18#include <linux/ioport.h>
19#include <linux/mtd/physmap.h>
20#include <linux/platform_device.h>
21#include <linux/io.h>
22#include <linux/i2c.h>
23#include <mach/hardware.h>
24#include <asm/mach-types.h>
25#include <asm/mach/arch.h>
26
27static struct physmap_flash_data edb9302a_flash_data = {
28 .width = 2,
29};
30
31static struct resource edb9302a_flash_resource = {
32 .start = EP93XX_CS6_PHYS_BASE,
33 .end = EP93XX_CS6_PHYS_BASE + SZ_16M - 1,
34 .flags = IORESOURCE_MEM,
35};
36
37static struct platform_device edb9302a_flash = {
38 .name = "physmap-flash",
39 .id = 0,
40 .dev = {
41 .platform_data = &edb9302a_flash_data,
42 },
43 .num_resources = 1,
44 .resource = &edb9302a_flash_resource,
45};
46
47static struct ep93xx_eth_data edb9302a_eth_data = {
48 .phy_id = 1,
49};
50
51static void __init edb9302a_init_machine(void)
52{
53 ep93xx_init_devices();
54 platform_device_register(&edb9302a_flash);
55
56 ep93xx_register_eth(&edb9302a_eth_data, 1);
57}
58
59MACHINE_START(EDB9302A, "Cirrus Logic EDB9302A Evaluation Board")
60 /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
61 .phys_io = EP93XX_APB_PHYS_BASE,
62 .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
63 .boot_params = EP93XX_SDCE0_PHYS_BASE + 0x100,
64 .map_io = ep93xx_map_io,
65 .init_irq = ep93xx_init_irq,
66 .timer = &ep93xx_timer,
67 .init_machine = edb9302a_init_machine,
68MACHINE_END
diff --git a/arch/arm/mach-ep93xx/edb9307.c b/arch/arm/mach-ep93xx/edb9307.c
deleted file mode 100644
index 5ab22f63a4eb..000000000000
--- a/arch/arm/mach-ep93xx/edb9307.c
+++ /dev/null
@@ -1,68 +0,0 @@
1/*
2 * arch/arm/mach-ep93xx/edb9307.c
3 * Cirrus Logic EDB9307 support.
4 *
5 * Copyright (C) 2007 Herbert Valerio Riedel <hvr@gnu.org>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or (at
10 * your option) any later version.
11 */
12
13#include <linux/kernel.h>
14#include <linux/init.h>
15#include <linux/mm.h>
16#include <linux/sched.h>
17#include <linux/interrupt.h>
18#include <linux/ioport.h>
19#include <linux/mtd/physmap.h>
20#include <linux/platform_device.h>
21#include <linux/io.h>
22#include <linux/i2c.h>
23#include <mach/hardware.h>
24#include <asm/mach-types.h>
25#include <asm/mach/arch.h>
26
27static struct physmap_flash_data edb9307_flash_data = {
28 .width = 4,
29};
30
31static struct resource edb9307_flash_resource = {
32 .start = EP93XX_CS6_PHYS_BASE,
33 .end = EP93XX_CS6_PHYS_BASE + SZ_32M - 1,
34 .flags = IORESOURCE_MEM,
35};
36
37static struct platform_device edb9307_flash = {
38 .name = "physmap-flash",
39 .id = 0,
40 .dev = {
41 .platform_data = &edb9307_flash_data,
42 },
43 .num_resources = 1,
44 .resource = &edb9307_flash_resource,
45};
46
47static struct ep93xx_eth_data edb9307_eth_data = {
48 .phy_id = 1,
49};
50
51static void __init edb9307_init_machine(void)
52{
53 ep93xx_init_devices();
54 platform_device_register(&edb9307_flash);
55
56 ep93xx_register_eth(&edb9307_eth_data, 1);
57}
58
59MACHINE_START(EDB9307, "Cirrus Logic EDB9307 Evaluation Board")
60 /* Maintainer: Herbert Valerio Riedel <hvr@gnu.org> */
61 .phys_io = EP93XX_APB_PHYS_BASE,
62 .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
63 .boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100,
64 .map_io = ep93xx_map_io,
65 .init_irq = ep93xx_init_irq,
66 .timer = &ep93xx_timer,
67 .init_machine = edb9307_init_machine,
68MACHINE_END
diff --git a/arch/arm/mach-ep93xx/edb9307a.c b/arch/arm/mach-ep93xx/edb9307a.c
deleted file mode 100644
index 6171167d3315..000000000000
--- a/arch/arm/mach-ep93xx/edb9307a.c
+++ /dev/null
@@ -1,80 +0,0 @@
1/*
2 * arch/arm/mach-ep93xx/edb9307a.c
3 * Cirrus Logic EDB9307A support.
4 *
5 * Copyright (C) 2008 H Hartley Sweeten <hsweeten@visionengravers.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or (at
10 * your option) any later version.
11 */
12
13#include <linux/kernel.h>
14#include <linux/init.h>
15#include <linux/mm.h>
16#include <linux/sched.h>
17#include <linux/interrupt.h>
18#include <linux/ioport.h>
19#include <linux/mtd/physmap.h>
20#include <linux/platform_device.h>
21#include <linux/io.h>
22#include <linux/i2c.h>
23#include <mach/hardware.h>
24#include <asm/mach-types.h>
25#include <asm/mach/arch.h>
26
27static struct physmap_flash_data edb9307a_flash_data = {
28 .width = 2,
29};
30
31static struct resource edb9307a_flash_resource = {
32 .start = EP93XX_CS6_PHYS_BASE,
33 .end = EP93XX_CS6_PHYS_BASE + SZ_16M - 1,
34 .flags = IORESOURCE_MEM,
35};
36
37static struct platform_device edb9307a_flash = {
38 .name = "physmap-flash",
39 .id = 0,
40 .dev = {
41 .platform_data = &edb9307a_flash_data,
42 },
43 .num_resources = 1,
44 .resource = &edb9307a_flash_resource,
45};
46
47static struct ep93xx_eth_data edb9307a_eth_data = {
48 .phy_id = 1,
49};
50
51static struct i2c_board_info __initdata edb9307a_i2c_data[] = {
52 {
53 /* On-board battery backed RTC */
54 I2C_BOARD_INFO("isl1208", 0x6f),
55 },
56 /*
57 * The I2C signals are also routed to the Expansion Connector (J4)
58 */
59};
60
61static void __init edb9307a_init_machine(void)
62{
63 ep93xx_init_devices();
64 platform_device_register(&edb9307a_flash);
65
66 ep93xx_register_eth(&edb9307a_eth_data, 1);
67
68 ep93xx_init_i2c(edb9307a_i2c_data, ARRAY_SIZE(edb9307a_i2c_data));
69}
70
71MACHINE_START(EDB9307A, "Cirrus Logic EDB9307A Evaluation Board")
72 /* Maintainer: H Hartley Sweeten <hsweeten@visionengravers.com> */
73 .phys_io = EP93XX_APB_PHYS_BASE,
74 .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
75 .boot_params = EP93XX_SDCE0_PHYS_BASE + 0x100,
76 .map_io = ep93xx_map_io,
77 .init_irq = ep93xx_init_irq,
78 .timer = &ep93xx_timer,
79 .init_machine = edb9307a_init_machine,
80MACHINE_END
diff --git a/arch/arm/mach-ep93xx/edb9312.c b/arch/arm/mach-ep93xx/edb9312.c
deleted file mode 100644
index d7179f66d804..000000000000
--- a/arch/arm/mach-ep93xx/edb9312.c
+++ /dev/null
@@ -1,69 +0,0 @@
1/*
2 * arch/arm/mach-ep93xx/edb9312.c
3 * Cirrus Logic EDB9312 support.
4 *
5 * Copyright (C) 2006 Infosys Technologies Limited
6 * Toufeeq Hussain <toufeeq_hussain@infosys.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or (at
11 * your option) any later version.
12 */
13
14#include <linux/kernel.h>
15#include <linux/init.h>
16#include <linux/mm.h>
17#include <linux/sched.h>
18#include <linux/interrupt.h>
19#include <linux/ioport.h>
20#include <linux/mtd/physmap.h>
21#include <linux/platform_device.h>
22#include <linux/io.h>
23#include <linux/i2c.h>
24#include <mach/hardware.h>
25#include <asm/mach-types.h>
26#include <asm/mach/arch.h>
27
28static struct physmap_flash_data edb9312_flash_data = {
29 .width = 4,
30};
31
32static struct resource edb9312_flash_resource = {
33 .start = EP93XX_CS6_PHYS_BASE,
34 .end = EP93XX_CS6_PHYS_BASE + SZ_32M - 1,
35 .flags = IORESOURCE_MEM,
36};
37
38static struct platform_device edb9312_flash = {
39 .name = "physmap-flash",
40 .id = 0,
41 .dev = {
42 .platform_data = &edb9312_flash_data,
43 },
44 .num_resources = 1,
45 .resource = &edb9312_flash_resource,
46};
47
48static struct ep93xx_eth_data edb9312_eth_data = {
49 .phy_id = 1,
50};
51
52static void __init edb9312_init_machine(void)
53{
54 ep93xx_init_devices();
55 platform_device_register(&edb9312_flash);
56
57 ep93xx_register_eth(&edb9312_eth_data, 1);
58}
59
60MACHINE_START(EDB9312, "Cirrus Logic EDB9312 Evaluation Board")
61 /* Maintainer: Toufeeq Hussain <toufeeq_hussain@infosys.com> */
62 .phys_io = EP93XX_APB_PHYS_BASE,
63 .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
64 .boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100,
65 .map_io = ep93xx_map_io,
66 .init_irq = ep93xx_init_irq,
67 .timer = &ep93xx_timer,
68 .init_machine = edb9312_init_machine,
69MACHINE_END
diff --git a/arch/arm/mach-ep93xx/edb9315.c b/arch/arm/mach-ep93xx/edb9315.c
deleted file mode 100644
index 025af6eaca10..000000000000
--- a/arch/arm/mach-ep93xx/edb9315.c
+++ /dev/null
@@ -1,68 +0,0 @@
1/*
2 * arch/arm/mach-ep93xx/edb9315.c
3 * Cirrus Logic EDB9315 support.
4 *
5 * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or (at
10 * your option) any later version.
11 */
12
13#include <linux/kernel.h>
14#include <linux/init.h>
15#include <linux/mm.h>
16#include <linux/sched.h>
17#include <linux/interrupt.h>
18#include <linux/ioport.h>
19#include <linux/mtd/physmap.h>
20#include <linux/platform_device.h>
21#include <linux/io.h>
22#include <linux/i2c.h>
23#include <mach/hardware.h>
24#include <asm/mach-types.h>
25#include <asm/mach/arch.h>
26
27static struct physmap_flash_data edb9315_flash_data = {
28 .width = 4,
29};
30
31static struct resource edb9315_flash_resource = {
32 .start = EP93XX_CS6_PHYS_BASE,
33 .end = EP93XX_CS6_PHYS_BASE + SZ_32M - 1,
34 .flags = IORESOURCE_MEM,
35};
36
37static struct platform_device edb9315_flash = {
38 .name = "physmap-flash",
39 .id = 0,
40 .dev = {
41 .platform_data = &edb9315_flash_data,
42 },
43 .num_resources = 1,
44 .resource = &edb9315_flash_resource,
45};
46
47static struct ep93xx_eth_data edb9315_eth_data = {
48 .phy_id = 1,
49};
50
51static void __init edb9315_init_machine(void)
52{
53 ep93xx_init_devices();
54 platform_device_register(&edb9315_flash);
55
56 ep93xx_register_eth(&edb9315_eth_data, 1);
57}
58
59MACHINE_START(EDB9315, "Cirrus Logic EDB9315 Evaluation Board")
60 /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
61 .phys_io = EP93XX_APB_PHYS_BASE,
62 .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
63 .boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100,
64 .map_io = ep93xx_map_io,
65 .init_irq = ep93xx_init_irq,
66 .timer = &ep93xx_timer,
67 .init_machine = edb9315_init_machine,
68MACHINE_END
diff --git a/arch/arm/mach-ep93xx/edb9315a.c b/arch/arm/mach-ep93xx/edb9315a.c
deleted file mode 100644
index 4c9cc8a39f5c..000000000000
--- a/arch/arm/mach-ep93xx/edb9315a.c
+++ /dev/null
@@ -1,68 +0,0 @@
1/*
2 * arch/arm/mach-ep93xx/edb9315a.c
3 * Cirrus Logic EDB9315A support.
4 *
5 * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or (at
10 * your option) any later version.
11 */
12
13#include <linux/kernel.h>
14#include <linux/init.h>
15#include <linux/mm.h>
16#include <linux/sched.h>
17#include <linux/interrupt.h>
18#include <linux/ioport.h>
19#include <linux/mtd/physmap.h>
20#include <linux/platform_device.h>
21#include <linux/io.h>
22#include <linux/i2c.h>
23#include <mach/hardware.h>
24#include <asm/mach-types.h>
25#include <asm/mach/arch.h>
26
27static struct physmap_flash_data edb9315a_flash_data = {
28 .width = 2,
29};
30
31static struct resource edb9315a_flash_resource = {
32 .start = EP93XX_CS6_PHYS_BASE,
33 .end = EP93XX_CS6_PHYS_BASE + SZ_16M - 1,
34 .flags = IORESOURCE_MEM,
35};
36
37static struct platform_device edb9315a_flash = {
38 .name = "physmap-flash",
39 .id = 0,
40 .dev = {
41 .platform_data = &edb9315a_flash_data,
42 },
43 .num_resources = 1,
44 .resource = &edb9315a_flash_resource,
45};
46
47static struct ep93xx_eth_data edb9315a_eth_data = {
48 .phy_id = 1,
49};
50
51static void __init edb9315a_init_machine(void)
52{
53 ep93xx_init_devices();
54 platform_device_register(&edb9315a_flash);
55
56 ep93xx_register_eth(&edb9315a_eth_data, 1);
57}
58
59MACHINE_START(EDB9315A, "Cirrus Logic EDB9315A Evaluation Board")
60 /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
61 .phys_io = EP93XX_APB_PHYS_BASE,
62 .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
63 .boot_params = EP93XX_SDCE0_PHYS_BASE + 0x100,
64 .map_io = ep93xx_map_io,
65 .init_irq = ep93xx_init_irq,
66 .timer = &ep93xx_timer,
67 .init_machine = edb9315a_init_machine,
68MACHINE_END
diff --git a/arch/arm/mach-ep93xx/edb93xx.c b/arch/arm/mach-ep93xx/edb93xx.c
new file mode 100644
index 000000000000..e9e45b92457e
--- /dev/null
+++ b/arch/arm/mach-ep93xx/edb93xx.c
@@ -0,0 +1,217 @@
1/*
2 * arch/arm/mach-ep93xx/edb93xx.c
3 * Cirrus Logic EDB93xx Development Board support.
4 *
5 * EDB93XX, EDB9301, EDB9307A
6 * Copyright (C) 2008-2009 H Hartley Sweeten <hsweeten@visionengravers.com>
7 *
8 * EDB9302
9 * Copyright (C) 2006 George Kashperko <george@chas.com.ua>
10 *
11 * EDB9302A, EDB9315, EDB9315A
12 * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org>
13 *
14 * EDB9307
15 * Copyright (C) 2007 Herbert Valerio Riedel <hvr@gnu.org>
16 *
17 * EDB9312
18 * Copyright (C) 2006 Infosys Technologies Limited
19 * Toufeeq Hussain <toufeeq_hussain@infosys.com>
20 *
21 * This program is free software; you can redistribute it and/or modify
22 * it under the terms of the GNU General Public License as published by
23 * the Free Software Foundation; either version 2 of the License, or (at
24 * your option) any later version.
25 */
26
27#include <linux/kernel.h>
28#include <linux/init.h>
29#include <linux/mm.h>
30#include <linux/sched.h>
31#include <linux/interrupt.h>
32#include <linux/ioport.h>
33#include <linux/mtd/physmap.h>
34#include <linux/platform_device.h>
35#include <linux/io.h>
36#include <linux/i2c.h>
37#include <mach/hardware.h>
38#include <asm/mach-types.h>
39#include <asm/mach/arch.h>
40
41static struct physmap_flash_data edb93xx_flash_data;
42
43static struct resource edb93xx_flash_resource = {
44 .flags = IORESOURCE_MEM,
45};
46
47static struct platform_device edb93xx_flash = {
48 .name = "physmap-flash",
49 .id = 0,
50 .dev = {
51 .platform_data = &edb93xx_flash_data,
52 },
53 .num_resources = 1,
54 .resource = &edb93xx_flash_resource,
55};
56
57static void __init __edb93xx_register_flash(unsigned int width,
58 resource_size_t start, resource_size_t size)
59{
60 edb93xx_flash_data.width = width;
61 edb93xx_flash_resource.start = start;
62 edb93xx_flash_resource.end = start + size - 1;
63
64 platform_device_register(&edb93xx_flash);
65}
66
67static void __init edb93xx_register_flash(void)
68{
69 if (machine_is_edb9307() || machine_is_edb9312() ||
70 machine_is_edb9315()) {
71 __edb93xx_register_flash(4, EP93XX_CS6_PHYS_BASE, SZ_32M);
72 } else {
73 __edb93xx_register_flash(2, EP93XX_CS6_PHYS_BASE, SZ_16M);
74 }
75}
76
77static struct ep93xx_eth_data edb93xx_eth_data = {
78 .phy_id = 1,
79};
80
81static struct i2c_board_info __initdata edb93xxa_i2c_data[] = {
82 {
83 I2C_BOARD_INFO("isl1208", 0x6f),
84 },
85};
86
87static struct i2c_board_info __initdata edb93xx_i2c_data[] = {
88 {
89 I2C_BOARD_INFO("ds1337", 0x68),
90 },
91};
92
93static void __init edb93xx_register_i2c(void)
94{
95 if (machine_is_edb9302a() || machine_is_edb9307a() ||
96 machine_is_edb9315a()) {
97 ep93xx_register_i2c(edb93xxa_i2c_data,
98 ARRAY_SIZE(edb93xxa_i2c_data));
99 } else if (machine_is_edb9307() || machine_is_edb9312() ||
100 machine_is_edb9315()) {
101 ep93xx_register_i2c(edb93xx_i2c_data,
102 ARRAY_SIZE(edb93xx_i2c_data));
103 }
104}
105
106static void __init edb93xx_init_machine(void)
107{
108 ep93xx_init_devices();
109 edb93xx_register_flash();
110 ep93xx_register_eth(&edb93xx_eth_data, 1);
111 edb93xx_register_i2c();
112}
113
114
115#ifdef CONFIG_MACH_EDB9301
116MACHINE_START(EDB9301, "Cirrus Logic EDB9301 Evaluation Board")
117 /* Maintainer: H Hartley Sweeten <hsweeten@visionengravers.com> */
118 .phys_io = EP93XX_APB_PHYS_BASE,
119 .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
120 .boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100,
121 .map_io = ep93xx_map_io,
122 .init_irq = ep93xx_init_irq,
123 .timer = &ep93xx_timer,
124 .init_machine = edb93xx_init_machine,
125MACHINE_END
126#endif
127
128#ifdef CONFIG_MACH_EDB9302
129MACHINE_START(EDB9302, "Cirrus Logic EDB9302 Evaluation Board")
130 /* Maintainer: George Kashperko <george@chas.com.ua> */
131 .phys_io = EP93XX_APB_PHYS_BASE,
132 .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
133 .boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100,
134 .map_io = ep93xx_map_io,
135 .init_irq = ep93xx_init_irq,
136 .timer = &ep93xx_timer,
137 .init_machine = edb93xx_init_machine,
138MACHINE_END
139#endif
140
141#ifdef CONFIG_MACH_EDB9302A
142MACHINE_START(EDB9302A, "Cirrus Logic EDB9302A Evaluation Board")
143 /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
144 .phys_io = EP93XX_APB_PHYS_BASE,
145 .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
146 .boot_params = EP93XX_SDCE0_PHYS_BASE + 0x100,
147 .map_io = ep93xx_map_io,
148 .init_irq = ep93xx_init_irq,
149 .timer = &ep93xx_timer,
150 .init_machine = edb93xx_init_machine,
151MACHINE_END
152#endif
153
154#ifdef CONFIG_MACH_EDB9307
155MACHINE_START(EDB9307, "Cirrus Logic EDB9307 Evaluation Board")
156 /* Maintainer: Herbert Valerio Riedel <hvr@gnu.org> */
157 .phys_io = EP93XX_APB_PHYS_BASE,
158 .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
159 .boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100,
160 .map_io = ep93xx_map_io,
161 .init_irq = ep93xx_init_irq,
162 .timer = &ep93xx_timer,
163 .init_machine = edb93xx_init_machine,
164MACHINE_END
165#endif
166
167#ifdef CONFIG_MACH_EDB9307A
168MACHINE_START(EDB9307A, "Cirrus Logic EDB9307A Evaluation Board")
169 /* Maintainer: H Hartley Sweeten <hsweeten@visionengravers.com> */
170 .phys_io = EP93XX_APB_PHYS_BASE,
171 .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
172 .boot_params = EP93XX_SDCE0_PHYS_BASE + 0x100,
173 .map_io = ep93xx_map_io,
174 .init_irq = ep93xx_init_irq,
175 .timer = &ep93xx_timer,
176 .init_machine = edb93xx_init_machine,
177MACHINE_END
178#endif
179
180#ifdef CONFIG_MACH_EDB9312
181MACHINE_START(EDB9312, "Cirrus Logic EDB9312 Evaluation Board")
182 /* Maintainer: Toufeeq Hussain <toufeeq_hussain@infosys.com> */
183 .phys_io = EP93XX_APB_PHYS_BASE,
184 .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
185 .boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100,
186 .map_io = ep93xx_map_io,
187 .init_irq = ep93xx_init_irq,
188 .timer = &ep93xx_timer,
189 .init_machine = edb93xx_init_machine,
190MACHINE_END
191#endif
192
193#ifdef CONFIG_MACH_EDB9315
194MACHINE_START(EDB9315, "Cirrus Logic EDB9315 Evaluation Board")
195 /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
196 .phys_io = EP93XX_APB_PHYS_BASE,
197 .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
198 .boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100,
199 .map_io = ep93xx_map_io,
200 .init_irq = ep93xx_init_irq,
201 .timer = &ep93xx_timer,
202 .init_machine = edb93xx_init_machine,
203MACHINE_END
204#endif
205
206#ifdef CONFIG_MACH_EDB9315A
207MACHINE_START(EDB9315A, "Cirrus Logic EDB9315A Evaluation Board")
208 /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
209 .phys_io = EP93XX_APB_PHYS_BASE,
210 .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
211 .boot_params = EP93XX_SDCE0_PHYS_BASE + 0x100,
212 .map_io = ep93xx_map_io,
213 .init_irq = ep93xx_init_irq,
214 .timer = &ep93xx_timer,
215 .init_machine = edb93xx_init_machine,
216MACHINE_END
217#endif