aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ep93xx
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-ep93xx')
-rw-r--r--arch/arm/mach-ep93xx/Kconfig14
-rw-r--r--arch/arm/mach-ep93xx/adssphere.c28
-rw-r--r--arch/arm/mach-ep93xx/clock.c2
-rw-r--r--arch/arm/mach-ep93xx/core.c46
-rw-r--r--arch/arm/mach-ep93xx/edb9302.c8
-rw-r--r--arch/arm/mach-ep93xx/edb9302a.c28
-rw-r--r--arch/arm/mach-ep93xx/edb9307.c28
-rw-r--r--arch/arm/mach-ep93xx/edb9312.c8
-rw-r--r--arch/arm/mach-ep93xx/edb9315.c8
-rw-r--r--arch/arm/mach-ep93xx/edb9315a.c28
-rw-r--r--arch/arm/mach-ep93xx/gesbc9312.c29
-rw-r--r--arch/arm/mach-ep93xx/gpio.c6
-rw-r--r--arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h34
-rw-r--r--arch/arm/mach-ep93xx/include/mach/platform.h12
-rw-r--r--arch/arm/mach-ep93xx/include/mach/ts72xx.h2
-rw-r--r--arch/arm/mach-ep93xx/include/mach/uncompress.h21
-rw-r--r--arch/arm/mach-ep93xx/micro9.c34
-rw-r--r--arch/arm/mach-ep93xx/ts72xx.c28
18 files changed, 151 insertions, 213 deletions
diff --git a/arch/arm/mach-ep93xx/Kconfig b/arch/arm/mach-ep93xx/Kconfig
index ea8549bfbef2..5a1b8c05c958 100644
--- a/arch/arm/mach-ep93xx/Kconfig
+++ b/arch/arm/mach-ep93xx/Kconfig
@@ -88,6 +88,20 @@ config MACH_TS72XX
88 Say 'Y' here if you want your kernel to support the 88 Say 'Y' here if you want your kernel to support the
89 Technologic Systems TS-72xx board. 89 Technologic Systems TS-72xx board.
90 90
91choice
92 prompt "Select a UART for early kernel messages"
93
94config EP93XX_EARLY_UART1
95 bool "UART1"
96
97config EP93XX_EARLY_UART2
98 bool "UART2"
99
100config EP93XX_EARLY_UART3
101 bool "UART3"
102
103endchoice
104
91endmenu 105endmenu
92 106
93endif 107endif
diff --git a/arch/arm/mach-ep93xx/adssphere.c b/arch/arm/mach-ep93xx/adssphere.c
index aa1fb352fb8f..561db73ec1ae 100644
--- a/arch/arm/mach-ep93xx/adssphere.c
+++ b/arch/arm/mach-ep93xx/adssphere.c
@@ -18,7 +18,7 @@
18#include <linux/ioport.h> 18#include <linux/ioport.h>
19#include <linux/mtd/physmap.h> 19#include <linux/mtd/physmap.h>
20#include <linux/platform_device.h> 20#include <linux/platform_device.h>
21#include <asm/io.h> 21#include <linux/io.h>
22#include <mach/hardware.h> 22#include <mach/hardware.h>
23#include <asm/mach-types.h> 23#include <asm/mach-types.h>
24#include <asm/mach/arch.h> 24#include <asm/mach/arch.h>
@@ -47,36 +47,12 @@ static struct ep93xx_eth_data adssphere_eth_data = {
47 .phy_id = 1, 47 .phy_id = 1,
48}; 48};
49 49
50static struct resource adssphere_eth_resource[] = {
51 {
52 .start = EP93XX_ETHERNET_PHYS_BASE,
53 .end = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
54 .flags = IORESOURCE_MEM,
55 }, {
56 .start = IRQ_EP93XX_ETHERNET,
57 .end = IRQ_EP93XX_ETHERNET,
58 .flags = IORESOURCE_IRQ,
59 }
60};
61
62static struct platform_device adssphere_eth_device = {
63 .name = "ep93xx-eth",
64 .id = -1,
65 .dev = {
66 .platform_data = &adssphere_eth_data,
67 },
68 .num_resources = 2,
69 .resource = adssphere_eth_resource,
70};
71
72static void __init adssphere_init_machine(void) 50static void __init adssphere_init_machine(void)
73{ 51{
74 ep93xx_init_devices(); 52 ep93xx_init_devices();
75 platform_device_register(&adssphere_flash); 53 platform_device_register(&adssphere_flash);
76 54
77 memcpy(adssphere_eth_data.dev_addr, 55 ep93xx_register_eth(&adssphere_eth_data, 1);
78 (void *)(EP93XX_ETHERNET_BASE + 0x50), 6);
79 platform_device_register(&adssphere_eth_device);
80} 56}
81 57
82MACHINE_START(ADSSPHERE, "ADS Sphere board") 58MACHINE_START(ADSSPHERE, "ADS Sphere board")
diff --git a/arch/arm/mach-ep93xx/clock.c b/arch/arm/mach-ep93xx/clock.c
index 6062e47f2043..8c9f2491dccc 100644
--- a/arch/arm/mach-ep93xx/clock.c
+++ b/arch/arm/mach-ep93xx/clock.c
@@ -15,9 +15,9 @@
15#include <linux/err.h> 15#include <linux/err.h>
16#include <linux/module.h> 16#include <linux/module.h>
17#include <linux/string.h> 17#include <linux/string.h>
18#include <linux/io.h>
18#include <asm/div64.h> 19#include <asm/div64.h>
19#include <mach/hardware.h> 20#include <mach/hardware.h>
20#include <asm/io.h>
21 21
22struct clk { 22struct clk {
23 char *name; 23 char *name;
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index f99f43669392..de53f0be71b9 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -32,6 +32,7 @@
32#include <linux/termios.h> 32#include <linux/termios.h>
33#include <linux/amba/bus.h> 33#include <linux/amba/bus.h>
34#include <linux/amba/serial.h> 34#include <linux/amba/serial.h>
35#include <linux/io.h>
35 36
36#include <asm/types.h> 37#include <asm/types.h>
37#include <asm/setup.h> 38#include <asm/setup.h>
@@ -41,7 +42,6 @@
41#include <asm/system.h> 42#include <asm/system.h>
42#include <asm/tlbflush.h> 43#include <asm/tlbflush.h>
43#include <asm/pgtable.h> 44#include <asm/pgtable.h>
44#include <asm/io.h>
45 45
46#include <asm/mach/map.h> 46#include <asm/mach/map.h>
47#include <asm/mach/time.h> 47#include <asm/mach/time.h>
@@ -157,7 +157,7 @@ static unsigned char gpio_int_type2[3];
157static const u8 int_type1_register_offset[3] = { 0x90, 0xac, 0x4c }; 157static const u8 int_type1_register_offset[3] = { 0x90, 0xac, 0x4c };
158static const u8 int_type2_register_offset[3] = { 0x94, 0xb0, 0x50 }; 158static const u8 int_type2_register_offset[3] = { 0x94, 0xb0, 0x50 };
159static const u8 eoi_register_offset[3] = { 0x98, 0xb4, 0x54 }; 159static const u8 eoi_register_offset[3] = { 0x98, 0xb4, 0x54 };
160static const u8 int_en_register_offset[3] = { 0x9c, 0xb8, 0x5c }; 160static const u8 int_en_register_offset[3] = { 0x9c, 0xb8, 0x58 };
161 161
162void ep93xx_gpio_update_int_params(unsigned port) 162void ep93xx_gpio_update_int_params(unsigned port)
163{ 163{
@@ -192,8 +192,7 @@ static void ep93xx_gpio_ab_irq_handler(unsigned int irq, struct irq_desc *desc)
192 for (i = 0; i < 8; i++) { 192 for (i = 0; i < 8; i++) {
193 if (status & (1 << i)) { 193 if (status & (1 << i)) {
194 int gpio_irq = gpio_to_irq(EP93XX_GPIO_LINE_A(0)) + i; 194 int gpio_irq = gpio_to_irq(EP93XX_GPIO_LINE_A(0)) + i;
195 desc = irq_desc + gpio_irq; 195 generic_handle_irq(gpio_irq);
196 desc_handle_irq(gpio_irq, desc);
197 } 196 }
198 } 197 }
199 198
@@ -202,7 +201,7 @@ static void ep93xx_gpio_ab_irq_handler(unsigned int irq, struct irq_desc *desc)
202 if (status & (1 << i)) { 201 if (status & (1 << i)) {
203 int gpio_irq = gpio_to_irq(EP93XX_GPIO_LINE_B(0)) + i; 202 int gpio_irq = gpio_to_irq(EP93XX_GPIO_LINE_B(0)) + i;
204 desc = irq_desc + gpio_irq; 203 desc = irq_desc + gpio_irq;
205 desc_handle_irq(gpio_irq, desc); 204 generic_handle_irq(gpio_irq);
206 } 205 }
207 } 206 }
208} 207}
@@ -217,7 +216,7 @@ static void ep93xx_gpio_f_irq_handler(unsigned int irq, struct irq_desc *desc)
217 int port_f_idx = ((irq + 1) & 7) ^ 4; /* {19..22,47..50} -> {0..7} */ 216 int port_f_idx = ((irq + 1) & 7) ^ 4; /* {19..22,47..50} -> {0..7} */
218 int gpio_irq = gpio_to_irq(EP93XX_GPIO_LINE_F(0)) + port_f_idx; 217 int gpio_irq = gpio_to_irq(EP93XX_GPIO_LINE_F(0)) + port_f_idx;
219 218
220 desc_handle_irq(gpio_irq, irq_desc + gpio_irq); 219 generic_handle_irq(gpio_irq);
221} 220}
222 221
223static void ep93xx_gpio_irq_ack(unsigned int irq) 222static void ep93xx_gpio_irq_ack(unsigned int irq)
@@ -461,6 +460,41 @@ static struct platform_device ep93xx_ohci_device = {
461 .resource = ep93xx_ohci_resources, 460 .resource = ep93xx_ohci_resources,
462}; 461};
463 462
463static struct ep93xx_eth_data ep93xx_eth_data;
464
465static struct resource ep93xx_eth_resource[] = {
466 {
467 .start = EP93XX_ETHERNET_PHYS_BASE,
468 .end = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
469 .flags = IORESOURCE_MEM,
470 }, {
471 .start = IRQ_EP93XX_ETHERNET,
472 .end = IRQ_EP93XX_ETHERNET,
473 .flags = IORESOURCE_IRQ,
474 }
475};
476
477static struct platform_device ep93xx_eth_device = {
478 .name = "ep93xx-eth",
479 .id = -1,
480 .dev = {
481 .platform_data = &ep93xx_eth_data,
482 },
483 .num_resources = ARRAY_SIZE(ep93xx_eth_resource),
484 .resource = ep93xx_eth_resource,
485};
486
487void __init ep93xx_register_eth(struct ep93xx_eth_data *data, int copy_addr)
488{
489 if (copy_addr) {
490 memcpy(data->dev_addr,
491 (void *)(EP93XX_ETHERNET_BASE + 0x50), 6);
492 }
493
494 ep93xx_eth_data = *data;
495 platform_device_register(&ep93xx_eth_device);
496}
497
464extern void ep93xx_gpio_init(void); 498extern void ep93xx_gpio_init(void);
465 499
466void __init ep93xx_init_devices(void) 500void __init ep93xx_init_devices(void)
diff --git a/arch/arm/mach-ep93xx/edb9302.c b/arch/arm/mach-ep93xx/edb9302.c
index 97550c0ad7b0..e4add5bdccfd 100644
--- a/arch/arm/mach-ep93xx/edb9302.c
+++ b/arch/arm/mach-ep93xx/edb9302.c
@@ -18,7 +18,7 @@
18#include <linux/ioport.h> 18#include <linux/ioport.h>
19#include <linux/mtd/physmap.h> 19#include <linux/mtd/physmap.h>
20#include <linux/platform_device.h> 20#include <linux/platform_device.h>
21#include <asm/io.h> 21#include <linux/io.h>
22#include <mach/hardware.h> 22#include <mach/hardware.h>
23#include <asm/mach-types.h> 23#include <asm/mach-types.h>
24#include <asm/mach/arch.h> 24#include <asm/mach/arch.h>
@@ -43,10 +43,16 @@ static struct platform_device edb9302_flash = {
43 .resource = &edb9302_flash_resource, 43 .resource = &edb9302_flash_resource,
44}; 44};
45 45
46static struct ep93xx_eth_data edb9302_eth_data = {
47 .phy_id = 1,
48};
49
46static void __init edb9302_init_machine(void) 50static void __init edb9302_init_machine(void)
47{ 51{
48 ep93xx_init_devices(); 52 ep93xx_init_devices();
49 platform_device_register(&edb9302_flash); 53 platform_device_register(&edb9302_flash);
54
55 ep93xx_register_eth(&edb9302_eth_data, 1);
50} 56}
51 57
52MACHINE_START(EDB9302, "Cirrus Logic EDB9302 Evaluation Board") 58MACHINE_START(EDB9302, "Cirrus Logic EDB9302 Evaluation Board")
diff --git a/arch/arm/mach-ep93xx/edb9302a.c b/arch/arm/mach-ep93xx/edb9302a.c
index 99b01d44bf1c..02c4405afed7 100644
--- a/arch/arm/mach-ep93xx/edb9302a.c
+++ b/arch/arm/mach-ep93xx/edb9302a.c
@@ -18,7 +18,7 @@
18#include <linux/ioport.h> 18#include <linux/ioport.h>
19#include <linux/mtd/physmap.h> 19#include <linux/mtd/physmap.h>
20#include <linux/platform_device.h> 20#include <linux/platform_device.h>
21#include <asm/io.h> 21#include <linux/io.h>
22#include <mach/hardware.h> 22#include <mach/hardware.h>
23#include <asm/mach-types.h> 23#include <asm/mach-types.h>
24#include <asm/mach/arch.h> 24#include <asm/mach/arch.h>
@@ -47,36 +47,12 @@ static struct ep93xx_eth_data edb9302a_eth_data = {
47 .phy_id = 1, 47 .phy_id = 1,
48}; 48};
49 49
50static struct resource edb9302a_eth_resource[] = {
51 {
52 .start = EP93XX_ETHERNET_PHYS_BASE,
53 .end = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
54 .flags = IORESOURCE_MEM,
55 }, {
56 .start = IRQ_EP93XX_ETHERNET,
57 .end = IRQ_EP93XX_ETHERNET,
58 .flags = IORESOURCE_IRQ,
59 }
60};
61
62static struct platform_device edb9302a_eth_device = {
63 .name = "ep93xx-eth",
64 .id = -1,
65 .dev = {
66 .platform_data = &edb9302a_eth_data,
67 },
68 .num_resources = 2,
69 .resource = edb9302a_eth_resource,
70};
71
72static void __init edb9302a_init_machine(void) 50static void __init edb9302a_init_machine(void)
73{ 51{
74 ep93xx_init_devices(); 52 ep93xx_init_devices();
75 platform_device_register(&edb9302a_flash); 53 platform_device_register(&edb9302a_flash);
76 54
77 memcpy(edb9302a_eth_data.dev_addr, 55 ep93xx_register_eth(&edb9302a_eth_data, 1);
78 (void *)(EP93XX_ETHERNET_BASE + 0x50), 6);
79 platform_device_register(&edb9302a_eth_device);
80} 56}
81 57
82MACHINE_START(EDB9302A, "Cirrus Logic EDB9302A Evaluation Board") 58MACHINE_START(EDB9302A, "Cirrus Logic EDB9302A Evaluation Board")
diff --git a/arch/arm/mach-ep93xx/edb9307.c b/arch/arm/mach-ep93xx/edb9307.c
index 9fb72d01a36c..040edbd2ea05 100644
--- a/arch/arm/mach-ep93xx/edb9307.c
+++ b/arch/arm/mach-ep93xx/edb9307.c
@@ -18,7 +18,7 @@
18#include <linux/ioport.h> 18#include <linux/ioport.h>
19#include <linux/mtd/physmap.h> 19#include <linux/mtd/physmap.h>
20#include <linux/platform_device.h> 20#include <linux/platform_device.h>
21#include <asm/io.h> 21#include <linux/io.h>
22#include <mach/hardware.h> 22#include <mach/hardware.h>
23#include <asm/mach-types.h> 23#include <asm/mach-types.h>
24#include <asm/mach/arch.h> 24#include <asm/mach/arch.h>
@@ -47,36 +47,12 @@ static struct ep93xx_eth_data edb9307_eth_data = {
47 .phy_id = 1, 47 .phy_id = 1,
48}; 48};
49 49
50static struct resource edb9307_eth_resource[] = {
51 {
52 .start = EP93XX_ETHERNET_PHYS_BASE,
53 .end = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
54 .flags = IORESOURCE_MEM,
55 }, {
56 .start = IRQ_EP93XX_ETHERNET,
57 .end = IRQ_EP93XX_ETHERNET,
58 .flags = IORESOURCE_IRQ,
59 }
60};
61
62static struct platform_device edb9307_eth_device = {
63 .name = "ep93xx-eth",
64 .id = -1,
65 .dev = {
66 .platform_data = &edb9307_eth_data,
67 },
68 .num_resources = 2,
69 .resource = edb9307_eth_resource,
70};
71
72static void __init edb9307_init_machine(void) 50static void __init edb9307_init_machine(void)
73{ 51{
74 ep93xx_init_devices(); 52 ep93xx_init_devices();
75 platform_device_register(&edb9307_flash); 53 platform_device_register(&edb9307_flash);
76 54
77 memcpy(edb9307_eth_data.dev_addr, 55 ep93xx_register_eth(&edb9307_eth_data, 1);
78 (void *)(EP93XX_ETHERNET_BASE + 0x50), 6);
79 platform_device_register(&edb9307_eth_device);
80} 56}
81 57
82MACHINE_START(EDB9307, "Cirrus Logic EDB9307 Evaluation Board") 58MACHINE_START(EDB9307, "Cirrus Logic EDB9307 Evaluation Board")
diff --git a/arch/arm/mach-ep93xx/edb9312.c b/arch/arm/mach-ep93xx/edb9312.c
index 87267a574f5e..6853e302bc3a 100644
--- a/arch/arm/mach-ep93xx/edb9312.c
+++ b/arch/arm/mach-ep93xx/edb9312.c
@@ -19,7 +19,7 @@
19#include <linux/ioport.h> 19#include <linux/ioport.h>
20#include <linux/mtd/physmap.h> 20#include <linux/mtd/physmap.h>
21#include <linux/platform_device.h> 21#include <linux/platform_device.h>
22#include <asm/io.h> 22#include <linux/io.h>
23#include <mach/hardware.h> 23#include <mach/hardware.h>
24#include <asm/mach-types.h> 24#include <asm/mach-types.h>
25#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
@@ -44,10 +44,16 @@ static struct platform_device edb9312_flash = {
44 .resource = &edb9312_flash_resource, 44 .resource = &edb9312_flash_resource,
45}; 45};
46 46
47static struct ep93xx_eth_data edb9312_eth_data = {
48 .phy_id = 1,
49};
50
47static void __init edb9312_init_machine(void) 51static void __init edb9312_init_machine(void)
48{ 52{
49 ep93xx_init_devices(); 53 ep93xx_init_devices();
50 platform_device_register(&edb9312_flash); 54 platform_device_register(&edb9312_flash);
55
56 ep93xx_register_eth(&edb9312_eth_data, 1);
51} 57}
52 58
53MACHINE_START(EDB9312, "Cirrus Logic EDB9312 Evaluation Board") 59MACHINE_START(EDB9312, "Cirrus Logic EDB9312 Evaluation Board")
diff --git a/arch/arm/mach-ep93xx/edb9315.c b/arch/arm/mach-ep93xx/edb9315.c
index 7e373950be4d..9469b350d253 100644
--- a/arch/arm/mach-ep93xx/edb9315.c
+++ b/arch/arm/mach-ep93xx/edb9315.c
@@ -18,7 +18,7 @@
18#include <linux/ioport.h> 18#include <linux/ioport.h>
19#include <linux/mtd/physmap.h> 19#include <linux/mtd/physmap.h>
20#include <linux/platform_device.h> 20#include <linux/platform_device.h>
21#include <asm/io.h> 21#include <linux/io.h>
22#include <mach/hardware.h> 22#include <mach/hardware.h>
23#include <asm/mach-types.h> 23#include <asm/mach-types.h>
24#include <asm/mach/arch.h> 24#include <asm/mach/arch.h>
@@ -43,10 +43,16 @@ static struct platform_device edb9315_flash = {
43 .resource = &edb9315_flash_resource, 43 .resource = &edb9315_flash_resource,
44}; 44};
45 45
46static struct ep93xx_eth_data edb9315_eth_data = {
47 .phy_id = 1,
48};
49
46static void __init edb9315_init_machine(void) 50static void __init edb9315_init_machine(void)
47{ 51{
48 ep93xx_init_devices(); 52 ep93xx_init_devices();
49 platform_device_register(&edb9315_flash); 53 platform_device_register(&edb9315_flash);
54
55 ep93xx_register_eth(&edb9315_eth_data, 1);
50} 56}
51 57
52MACHINE_START(EDB9315, "Cirrus Logic EDB9315 Evaluation Board") 58MACHINE_START(EDB9315, "Cirrus Logic EDB9315 Evaluation Board")
diff --git a/arch/arm/mach-ep93xx/edb9315a.c b/arch/arm/mach-ep93xx/edb9315a.c
index 08a7c9bfb689..584457ce7c80 100644
--- a/arch/arm/mach-ep93xx/edb9315a.c
+++ b/arch/arm/mach-ep93xx/edb9315a.c
@@ -18,7 +18,7 @@
18#include <linux/ioport.h> 18#include <linux/ioport.h>
19#include <linux/mtd/physmap.h> 19#include <linux/mtd/physmap.h>
20#include <linux/platform_device.h> 20#include <linux/platform_device.h>
21#include <asm/io.h> 21#include <linux/io.h>
22#include <mach/hardware.h> 22#include <mach/hardware.h>
23#include <asm/mach-types.h> 23#include <asm/mach-types.h>
24#include <asm/mach/arch.h> 24#include <asm/mach/arch.h>
@@ -47,36 +47,12 @@ static struct ep93xx_eth_data edb9315a_eth_data = {
47 .phy_id = 1, 47 .phy_id = 1,
48}; 48};
49 49
50static struct resource edb9315a_eth_resource[] = {
51 {
52 .start = EP93XX_ETHERNET_PHYS_BASE,
53 .end = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
54 .flags = IORESOURCE_MEM,
55 }, {
56 .start = IRQ_EP93XX_ETHERNET,
57 .end = IRQ_EP93XX_ETHERNET,
58 .flags = IORESOURCE_IRQ,
59 }
60};
61
62static struct platform_device edb9315a_eth_device = {
63 .name = "ep93xx-eth",
64 .id = -1,
65 .dev = {
66 .platform_data = &edb9315a_eth_data,
67 },
68 .num_resources = 2,
69 .resource = edb9315a_eth_resource,
70};
71
72static void __init edb9315a_init_machine(void) 50static void __init edb9315a_init_machine(void)
73{ 51{
74 ep93xx_init_devices(); 52 ep93xx_init_devices();
75 platform_device_register(&edb9315a_flash); 53 platform_device_register(&edb9315a_flash);
76 54
77 memcpy(edb9315a_eth_data.dev_addr, 55 ep93xx_register_eth(&edb9315a_eth_data, 1);
78 (void *)(EP93XX_ETHERNET_BASE + 0x50), 6);
79 platform_device_register(&edb9315a_eth_device);
80} 56}
81 57
82MACHINE_START(EDB9315A, "Cirrus Logic EDB9315A Evaluation Board") 58MACHINE_START(EDB9315A, "Cirrus Logic EDB9315A Evaluation Board")
diff --git a/arch/arm/mach-ep93xx/gesbc9312.c b/arch/arm/mach-ep93xx/gesbc9312.c
index 9b41ec1f089e..035b24e31b64 100644
--- a/arch/arm/mach-ep93xx/gesbc9312.c
+++ b/arch/arm/mach-ep93xx/gesbc9312.c
@@ -18,7 +18,7 @@
18#include <linux/ioport.h> 18#include <linux/ioport.h>
19#include <linux/mtd/physmap.h> 19#include <linux/mtd/physmap.h>
20#include <linux/platform_device.h> 20#include <linux/platform_device.h>
21#include <asm/io.h> 21#include <linux/io.h>
22#include <mach/hardware.h> 22#include <mach/hardware.h>
23#include <asm/mach-types.h> 23#include <asm/mach-types.h>
24#include <asm/mach/arch.h> 24#include <asm/mach/arch.h>
@@ -44,36 +44,15 @@ static struct platform_device gesbc9312_flash = {
44}; 44};
45 45
46static struct ep93xx_eth_data gesbc9312_eth_data = { 46static struct ep93xx_eth_data gesbc9312_eth_data = {
47 .phy_id = 1, 47 .phy_id = 1,
48};
49
50static struct resource gesbc9312_eth_resource[] = {
51 {
52 .start = EP93XX_ETHERNET_PHYS_BASE,
53 .end = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
54 .flags = IORESOURCE_MEM,
55 }, {
56 .start = IRQ_EP93XX_ETHERNET,
57 .end = IRQ_EP93XX_ETHERNET,
58 .flags = IORESOURCE_IRQ,
59 }
60};
61
62static struct platform_device gesbc9312_eth_device = {
63 .name = "ep93xx-eth",
64 .id = -1,
65 .dev = {
66 .platform_data = &gesbc9312_eth_data,
67 },
68 .num_resources = 2,
69 .resource = gesbc9312_eth_resource,
70}; 48};
71 49
72static void __init gesbc9312_init_machine(void) 50static void __init gesbc9312_init_machine(void)
73{ 51{
74 ep93xx_init_devices(); 52 ep93xx_init_devices();
75 platform_device_register(&gesbc9312_flash); 53 platform_device_register(&gesbc9312_flash);
76 platform_device_register(&gesbc9312_eth_device); 54
55 ep93xx_register_eth(&gesbc9312_eth_data, 0);
77} 56}
78 57
79MACHINE_START(GESBC9312, "Glomation GESBC-9312-sx") 58MACHINE_START(GESBC9312, "Glomation GESBC-9312-sx")
diff --git a/arch/arm/mach-ep93xx/gpio.c b/arch/arm/mach-ep93xx/gpio.c
index 0f3fb87ca4be..482cf3d2fbcd 100644
--- a/arch/arm/mach-ep93xx/gpio.c
+++ b/arch/arm/mach-ep93xx/gpio.c
@@ -16,9 +16,9 @@
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/module.h> 17#include <linux/module.h>
18#include <linux/seq_file.h> 18#include <linux/seq_file.h>
19#include <linux/io.h>
19 20
20#include <mach/ep93xx-regs.h> 21#include <mach/ep93xx-regs.h>
21#include <asm/io.h>
22#include <asm/gpio.h> 22#include <asm/gpio.h>
23 23
24struct ep93xx_gpio_chip { 24struct ep93xx_gpio_chip {
@@ -141,10 +141,10 @@ static void ep93xx_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
141static struct ep93xx_gpio_chip ep93xx_gpio_banks[] = { 141static struct ep93xx_gpio_chip ep93xx_gpio_banks[] = {
142 EP93XX_GPIO_BANK("A", 0x00, 0x10, 0), 142 EP93XX_GPIO_BANK("A", 0x00, 0x10, 0),
143 EP93XX_GPIO_BANK("B", 0x04, 0x14, 8), 143 EP93XX_GPIO_BANK("B", 0x04, 0x14, 8),
144 EP93XX_GPIO_BANK("C", 0x30, 0x34, 40), 144 EP93XX_GPIO_BANK("C", 0x08, 0x18, 40),
145 EP93XX_GPIO_BANK("D", 0x0c, 0x1c, 24), 145 EP93XX_GPIO_BANK("D", 0x0c, 0x1c, 24),
146 EP93XX_GPIO_BANK("E", 0x20, 0x24, 32), 146 EP93XX_GPIO_BANK("E", 0x20, 0x24, 32),
147 EP93XX_GPIO_BANK("F", 0x08, 0x18, 16), 147 EP93XX_GPIO_BANK("F", 0x30, 0x34, 16),
148 EP93XX_GPIO_BANK("G", 0x38, 0x3c, 48), 148 EP93XX_GPIO_BANK("G", 0x38, 0x3c, 48),
149 EP93XX_GPIO_BANK("H", 0x40, 0x44, 56), 149 EP93XX_GPIO_BANK("H", 0x40, 0x44, 56),
150}; 150};
diff --git a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
index 9f4458c8e070..22d6c9a6e4ca 100644
--- a/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
+++ b/arch/arm/mach-ep93xx/include/mach/ep93xx-regs.h
@@ -6,6 +6,40 @@
6#define __ASM_ARCH_EP93XX_REGS_H 6#define __ASM_ARCH_EP93XX_REGS_H
7 7
8/* 8/*
9 * EP93xx Physical Memory Map:
10 *
11 * The ASDO pin is sampled at system reset to select a synchronous or
12 * asynchronous boot configuration. When ASDO is "1" (i.e. pulled-up)
13 * the synchronous boot mode is selected. When ASDO is "0" (i.e
14 * pulled-down) the asynchronous boot mode is selected.
15 *
16 * In synchronous boot mode nSDCE3 is decoded starting at physical address
17 * 0x00000000 and nCS0 is decoded starting at 0xf0000000. For asynchronous
18 * boot mode they are swapped with nCS0 decoded at 0x00000000 ann nSDCE3
19 * decoded at 0xf0000000.
20 *
21 * There is known errata for the EP93xx dealing with External Memory
22 * Configurations. Please refer to "AN273: EP93xx Silicon Rev E Design
23 * Guidelines" for more information. This document can be found at:
24 *
25 * http://www.cirrus.com/en/pubs/appNote/AN273REV4.pdf
26 */
27
28#define EP93XX_CS0_PHYS_BASE_ASYNC 0x00000000 /* ASDO Pin = 0 */
29#define EP93XX_SDCE3_PHYS_BASE_SYNC 0x00000000 /* ASDO Pin = 1 */
30#define EP93XX_CS1_PHYS_BASE 0x10000000
31#define EP93XX_CS2_PHYS_BASE 0x20000000
32#define EP93XX_CS3_PHYS_BASE 0x30000000
33#define EP93XX_PCMCIA_PHYS_BASE 0x40000000
34#define EP93XX_CS6_PHYS_BASE 0x60000000
35#define EP93XX_CS7_PHYS_BASE 0x70000000
36#define EP93XX_SDCE0_PHYS_BASE 0xc0000000
37#define EP93XX_SDCE1_PHYS_BASE 0xd0000000
38#define EP93XX_SDCE2_PHYS_BASE 0xe0000000
39#define EP93XX_SDCE3_PHYS_BASE_ASYNC 0xf0000000 /* ASDO Pin = 0 */
40#define EP93XX_CS0_PHYS_BASE_SYNC 0xf0000000 /* ASDO Pin = 1 */
41
42/*
9 * EP93xx linux memory map: 43 * EP93xx linux memory map:
10 * 44 *
11 * virt phys size 45 * virt phys size
diff --git a/arch/arm/mach-ep93xx/include/mach/platform.h b/arch/arm/mach-ep93xx/include/mach/platform.h
index b5c182473f5d..db2489d3bda7 100644
--- a/arch/arm/mach-ep93xx/include/mach/platform.h
+++ b/arch/arm/mach-ep93xx/include/mach/platform.h
@@ -4,17 +4,17 @@
4 4
5#ifndef __ASSEMBLY__ 5#ifndef __ASSEMBLY__
6 6
7void ep93xx_map_io(void);
8void ep93xx_init_irq(void);
9void ep93xx_init_time(unsigned long);
10void ep93xx_init_devices(void);
11extern struct sys_timer ep93xx_timer;
12
13struct ep93xx_eth_data 7struct ep93xx_eth_data
14{ 8{
15 unsigned char dev_addr[6]; 9 unsigned char dev_addr[6];
16 unsigned char phy_id; 10 unsigned char phy_id;
17}; 11};
18 12
13void ep93xx_map_io(void);
14void ep93xx_init_irq(void);
15void ep93xx_init_time(unsigned long);
16void ep93xx_register_eth(struct ep93xx_eth_data *data, int copy_addr);
17void ep93xx_init_devices(void);
18extern struct sys_timer ep93xx_timer;
19 19
20#endif 20#endif
diff --git a/arch/arm/mach-ep93xx/include/mach/ts72xx.h b/arch/arm/mach-ep93xx/include/mach/ts72xx.h
index 30b318aa1a1f..34ddec081c40 100644
--- a/arch/arm/mach-ep93xx/include/mach/ts72xx.h
+++ b/arch/arm/mach-ep93xx/include/mach/ts72xx.h
@@ -70,7 +70,7 @@
70 70
71 71
72#ifndef __ASSEMBLY__ 72#ifndef __ASSEMBLY__
73#include <asm/io.h> 73#include <linux/io.h>
74 74
75static inline int board_is_ts7200(void) 75static inline int board_is_ts7200(void)
76{ 76{
diff --git a/arch/arm/mach-ep93xx/include/mach/uncompress.h b/arch/arm/mach-ep93xx/include/mach/uncompress.h
index 1fd2f17de325..16026c2b1c8c 100644
--- a/arch/arm/mach-ep93xx/include/mach/uncompress.h
+++ b/arch/arm/mach-ep93xx/include/mach/uncompress.h
@@ -31,10 +31,19 @@ static void __raw_writel(unsigned int value, unsigned int ptr)
31 *((volatile unsigned int *)ptr) = value; 31 *((volatile unsigned int *)ptr) = value;
32} 32}
33 33
34 34#if defined(CONFIG_EP93XX_EARLY_UART1)
35#define PHYS_UART1_DATA 0x808c0000 35#define UART_BASE EP93XX_UART1_PHYS_BASE
36#define PHYS_UART1_FLAG 0x808c0018 36#elif defined(CONFIG_EP93XX_EARLY_UART2)
37#define UART1_FLAG_TXFF 0x20 37#define UART_BASE EP93XX_UART2_PHYS_BASE
38#elif defined(CONFIG_EP93XX_EARLY_UART3)
39#define UART_BASE EP93XX_UART3_PHYS_BASE
40#else
41#define UART_BASE EP93XX_UART1_PHYS_BASE
42#endif
43
44#define PHYS_UART_DATA (UART_BASE + 0x00)
45#define PHYS_UART_FLAG (UART_BASE + 0x18)
46#define UART_FLAG_TXFF 0x20
38 47
39static inline void putc(int c) 48static inline void putc(int c)
40{ 49{
@@ -42,11 +51,11 @@ static inline void putc(int c)
42 51
43 for (i = 0; i < 1000; i++) { 52 for (i = 0; i < 1000; i++) {
44 /* Transmit fifo not full? */ 53 /* Transmit fifo not full? */
45 if (!(__raw_readb(PHYS_UART1_FLAG) & UART1_FLAG_TXFF)) 54 if (!(__raw_readb(PHYS_UART_FLAG) & UART_FLAG_TXFF))
46 break; 55 break;
47 } 56 }
48 57
49 __raw_writeb(c, PHYS_UART1_DATA); 58 __raw_writeb(c, PHYS_UART_DATA);
50} 59}
51 60
52static inline void flush(void) 61static inline void flush(void)
diff --git a/arch/arm/mach-ep93xx/micro9.c b/arch/arm/mach-ep93xx/micro9.c
index de047a5c8112..c2197236b632 100644
--- a/arch/arm/mach-ep93xx/micro9.c
+++ b/arch/arm/mach-ep93xx/micro9.c
@@ -16,10 +16,9 @@
16#include <linux/mm.h> 16#include <linux/mm.h>
17#include <linux/platform_device.h> 17#include <linux/platform_device.h>
18#include <linux/sched.h> 18#include <linux/sched.h>
19 19#include <linux/io.h>
20#include <linux/mtd/physmap.h> 20#include <linux/mtd/physmap.h>
21 21
22#include <asm/io.h>
23#include <mach/hardware.h> 22#include <mach/hardware.h>
24 23
25#include <asm/mach/arch.h> 24#include <asm/mach/arch.h>
@@ -29,38 +28,9 @@ static struct ep93xx_eth_data micro9_eth_data = {
29 .phy_id = 0x1f, 28 .phy_id = 0x1f,
30}; 29};
31 30
32static struct resource micro9_eth_resource[] = {
33 {
34 .start = EP93XX_ETHERNET_PHYS_BASE,
35 .end = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
36 .flags = IORESOURCE_MEM,
37 }, {
38 .start = IRQ_EP93XX_ETHERNET,
39 .end = IRQ_EP93XX_ETHERNET,
40 .flags = IORESOURCE_IRQ,
41 }
42};
43
44static struct platform_device micro9_eth_device = {
45 .name = "ep93xx-eth",
46 .id = -1,
47 .dev = {
48 .platform_data = &micro9_eth_data,
49 },
50 .num_resources = ARRAY_SIZE(micro9_eth_resource),
51 .resource = micro9_eth_resource,
52};
53
54static void __init micro9_eth_init(void)
55{
56 memcpy(micro9_eth_data.dev_addr,
57 (void *)(EP93XX_ETHERNET_BASE + 0x50), 6);
58 platform_device_register(&micro9_eth_device);
59}
60
61static void __init micro9_init(void) 31static void __init micro9_init(void)
62{ 32{
63 micro9_eth_init(); 33 ep93xx_register_eth(&micro9_eth_data, 1);
64} 34}
65 35
66/* 36/*
diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c
index c3cbff126d0c..b4aa4c054276 100644
--- a/arch/arm/mach-ep93xx/ts72xx.c
+++ b/arch/arm/mach-ep93xx/ts72xx.c
@@ -19,7 +19,7 @@
19#include <linux/mtd/physmap.h> 19#include <linux/mtd/physmap.h>
20#include <linux/platform_device.h> 20#include <linux/platform_device.h>
21#include <linux/m48t86.h> 21#include <linux/m48t86.h>
22#include <asm/io.h> 22#include <linux/io.h>
23#include <mach/hardware.h> 23#include <mach/hardware.h>
24#include <asm/mach-types.h> 24#include <asm/mach-types.h>
25#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
@@ -161,28 +161,6 @@ static struct ep93xx_eth_data ts72xx_eth_data = {
161 .phy_id = 1, 161 .phy_id = 1,
162}; 162};
163 163
164static struct resource ts72xx_eth_resource[] = {
165 {
166 .start = EP93XX_ETHERNET_PHYS_BASE,
167 .end = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
168 .flags = IORESOURCE_MEM,
169 }, {
170 .start = IRQ_EP93XX_ETHERNET,
171 .end = IRQ_EP93XX_ETHERNET,
172 .flags = IORESOURCE_IRQ,
173 }
174};
175
176static struct platform_device ts72xx_eth_device = {
177 .name = "ep93xx-eth",
178 .id = -1,
179 .dev = {
180 .platform_data = &ts72xx_eth_data,
181 },
182 .num_resources = 2,
183 .resource = ts72xx_eth_resource,
184};
185
186static void __init ts72xx_init_machine(void) 164static void __init ts72xx_init_machine(void)
187{ 165{
188 ep93xx_init_devices(); 166 ep93xx_init_devices();
@@ -190,9 +168,7 @@ static void __init ts72xx_init_machine(void)
190 platform_device_register(&ts72xx_flash); 168 platform_device_register(&ts72xx_flash);
191 platform_device_register(&ts72xx_rtc_device); 169 platform_device_register(&ts72xx_rtc_device);
192 170
193 memcpy(ts72xx_eth_data.dev_addr, 171 ep93xx_register_eth(&ts72xx_eth_data, 1);
194 (void *)(EP93XX_ETHERNET_BASE + 0x50), 6);
195 platform_device_register(&ts72xx_eth_device);
196} 172}
197 173
198MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC") 174MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC")