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.c26
-rw-r--r--arch/arm/mach-ep93xx/core.c37
-rw-r--r--arch/arm/mach-ep93xx/edb9302.c6
-rw-r--r--arch/arm/mach-ep93xx/edb9302a.c26
-rw-r--r--arch/arm/mach-ep93xx/edb9307.c26
-rw-r--r--arch/arm/mach-ep93xx/edb9312.c6
-rw-r--r--arch/arm/mach-ep93xx/edb9315.c6
-rw-r--r--arch/arm/mach-ep93xx/edb9315a.c26
-rw-r--r--arch/arm/mach-ep93xx/gesbc9312.c27
-rw-r--r--arch/arm/mach-ep93xx/gpio.c4
-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/uncompress.h21
-rw-r--r--arch/arm/mach-ep93xx/micro9.c31
-rw-r--r--arch/arm/mach-ep93xx/ts72xx.c26
16 files changed, 134 insertions, 194 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 18f8b1dc8bd0..561db73ec1ae 100644
--- a/arch/arm/mach-ep93xx/adssphere.c
+++ b/arch/arm/mach-ep93xx/adssphere.c
@@ -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/core.c b/arch/arm/mach-ep93xx/core.c
index 1a5af1b262be..7e65d23e14b5 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -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{
@@ -461,6 +461,41 @@ static struct platform_device ep93xx_ohci_device = {
461 .resource = ep93xx_ohci_resources, 461 .resource = ep93xx_ohci_resources,
462}; 462};
463 463
464static struct ep93xx_eth_data ep93xx_eth_data;
465
466static struct resource ep93xx_eth_resource[] = {
467 {
468 .start = EP93XX_ETHERNET_PHYS_BASE,
469 .end = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
470 .flags = IORESOURCE_MEM,
471 }, {
472 .start = IRQ_EP93XX_ETHERNET,
473 .end = IRQ_EP93XX_ETHERNET,
474 .flags = IORESOURCE_IRQ,
475 }
476};
477
478static struct platform_device ep93xx_eth_device = {
479 .name = "ep93xx-eth",
480 .id = -1,
481 .dev = {
482 .platform_data = &ep93xx_eth_data,
483 },
484 .num_resources = ARRAY_SIZE(ep93xx_eth_resource),
485 .resource = ep93xx_eth_resource,
486};
487
488void __init ep93xx_register_eth(struct ep93xx_eth_data *data, int copy_addr)
489{
490 if (copy_addr) {
491 memcpy(data->dev_addr,
492 (void *)(EP93XX_ETHERNET_BASE + 0x50), 6);
493 }
494
495 ep93xx_eth_data = *data;
496 platform_device_register(&ep93xx_eth_device);
497}
498
464extern void ep93xx_gpio_init(void); 499extern void ep93xx_gpio_init(void);
465 500
466void __init ep93xx_init_devices(void) 501void __init ep93xx_init_devices(void)
diff --git a/arch/arm/mach-ep93xx/edb9302.c b/arch/arm/mach-ep93xx/edb9302.c
index 358a83392d04..e4add5bdccfd 100644
--- a/arch/arm/mach-ep93xx/edb9302.c
+++ b/arch/arm/mach-ep93xx/edb9302.c
@@ -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 65cc55cfeac7..02c4405afed7 100644
--- a/arch/arm/mach-ep93xx/edb9302a.c
+++ b/arch/arm/mach-ep93xx/edb9302a.c
@@ -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 551de24d6f25..040edbd2ea05 100644
--- a/arch/arm/mach-ep93xx/edb9307.c
+++ b/arch/arm/mach-ep93xx/edb9307.c
@@ -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 9167e7c8dbc4..6853e302bc3a 100644
--- a/arch/arm/mach-ep93xx/edb9312.c
+++ b/arch/arm/mach-ep93xx/edb9312.c
@@ -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 d267bb644473..9469b350d253 100644
--- a/arch/arm/mach-ep93xx/edb9315.c
+++ b/arch/arm/mach-ep93xx/edb9315.c
@@ -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 6ffe21d81e46..584457ce7c80 100644
--- a/arch/arm/mach-ep93xx/edb9315a.c
+++ b/arch/arm/mach-ep93xx/edb9315a.c
@@ -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 ad57bb1780da..035b24e31b64 100644
--- a/arch/arm/mach-ep93xx/gesbc9312.c
+++ b/arch/arm/mach-ep93xx/gesbc9312.c
@@ -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 5a06ed9eafdc..482cf3d2fbcd 100644
--- a/arch/arm/mach-ep93xx/gpio.c
+++ b/arch/arm/mach-ep93xx/gpio.c
@@ -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/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 06555f372cd1..c2197236b632 100644
--- a/arch/arm/mach-ep93xx/micro9.c
+++ b/arch/arm/mach-ep93xx/micro9.c
@@ -28,38 +28,9 @@ static struct ep93xx_eth_data micro9_eth_data = {
28 .phy_id = 0x1f, 28 .phy_id = 0x1f,
29}; 29};
30 30
31static struct resource micro9_eth_resource[] = {
32 {
33 .start = EP93XX_ETHERNET_PHYS_BASE,
34 .end = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
35 .flags = IORESOURCE_MEM,
36 }, {
37 .start = IRQ_EP93XX_ETHERNET,
38 .end = IRQ_EP93XX_ETHERNET,
39 .flags = IORESOURCE_IRQ,
40 }
41};
42
43static struct platform_device micro9_eth_device = {
44 .name = "ep93xx-eth",
45 .id = -1,
46 .dev = {
47 .platform_data = &micro9_eth_data,
48 },
49 .num_resources = ARRAY_SIZE(micro9_eth_resource),
50 .resource = micro9_eth_resource,
51};
52
53static void __init micro9_eth_init(void)
54{
55 memcpy(micro9_eth_data.dev_addr,
56 (void *)(EP93XX_ETHERNET_BASE + 0x50), 6);
57 platform_device_register(&micro9_eth_device);
58}
59
60static void __init micro9_init(void) 31static void __init micro9_init(void)
61{ 32{
62 micro9_eth_init(); 33 ep93xx_register_eth(&micro9_eth_data, 1);
63} 34}
64 35
65/* 36/*
diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c
index a6959c8bb84f..b4aa4c054276 100644
--- a/arch/arm/mach-ep93xx/ts72xx.c
+++ b/arch/arm/mach-ep93xx/ts72xx.c
@@ -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")