aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-sa1100
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-sa1100')
-rw-r--r--arch/arm/mach-sa1100/badge4.c44
-rw-r--r--arch/arm/mach-sa1100/cpu-sa1100.c4
-rw-r--r--arch/arm/mach-sa1100/cpu-sa1110.c3
-rw-r--r--arch/arm/mach-sa1100/generic.c14
-rw-r--r--arch/arm/mach-sa1100/include/mach/SA-1100.h16
-rw-r--r--arch/arm/mach-sa1100/include/mach/hardware.h18
-rw-r--r--arch/arm/mach-sa1100/include/mach/memory.h16
-rw-r--r--arch/arm/mach-sa1100/irq.c4
-rw-r--r--arch/arm/mach-sa1100/neponset.c11
-rw-r--r--arch/arm/mach-sa1100/pleb.c13
-rw-r--r--arch/arm/mach-sa1100/simpad.c2
-rw-r--r--arch/arm/mach-sa1100/ssp.c2
12 files changed, 71 insertions, 76 deletions
diff --git a/arch/arm/mach-sa1100/badge4.c b/arch/arm/mach-sa1100/badge4.c
index 3efefbdd2527..ab5883b39ddf 100644
--- a/arch/arm/mach-sa1100/badge4.c
+++ b/arch/arm/mach-sa1100/badge4.c
@@ -95,19 +95,19 @@ static int __init badge4_sa1111_init(void)
95 * One-hundred-twenty-seven 32 KiW Main Blocks (8128 Ki b) 95 * One-hundred-twenty-seven 32 KiW Main Blocks (8128 Ki b)
96 */ 96 */
97static struct mtd_partition badge4_partitions[] = { 97static struct mtd_partition badge4_partitions[] = {
98 { 98 {
99 .name = "BLOB boot loader", 99 .name = "BLOB boot loader",
100 .offset = 0, 100 .offset = 0,
101 .size = 0x0000A000 101 .size = 0x0000A000
102 }, { 102 }, {
103 .name = "params", 103 .name = "params",
104 .offset = MTDPART_OFS_APPEND, 104 .offset = MTDPART_OFS_APPEND,
105 .size = 0x00006000 105 .size = 0x00006000
106 }, { 106 }, {
107 .name = "root", 107 .name = "root",
108 .offset = MTDPART_OFS_APPEND, 108 .offset = MTDPART_OFS_APPEND,
109 .size = MTDPART_SIZ_FULL 109 .size = MTDPART_SIZ_FULL
110 } 110 }
111}; 111};
112 112
113static struct flash_platform_data badge4_flash_data = { 113static struct flash_platform_data badge4_flash_data = {
@@ -126,7 +126,7 @@ static int five_v_on __initdata = 0;
126 126
127static int __init five_v_on_setup(char *ignore) 127static int __init five_v_on_setup(char *ignore)
128{ 128{
129 five_v_on = 1; 129 five_v_on = 1;
130 return 1; 130 return 1;
131} 131}
132__setup("five_v_on", five_v_on_setup); 132__setup("five_v_on", five_v_on_setup);
@@ -171,15 +171,15 @@ static int __init badge4_init(void)
171 GPCR = BADGE4_GPIO_TESTPT_J7; 171 GPCR = BADGE4_GPIO_TESTPT_J7;
172 GPDR |= BADGE4_GPIO_TESTPT_J7; 172 GPDR |= BADGE4_GPIO_TESTPT_J7;
173 173
174 /* 5V supply rail. */ 174 /* 5V supply rail. */
175 GPCR = BADGE4_GPIO_PCMEN5V; /* initially off */ 175 GPCR = BADGE4_GPIO_PCMEN5V; /* initially off */
176 GPDR |= BADGE4_GPIO_PCMEN5V; 176 GPDR |= BADGE4_GPIO_PCMEN5V;
177 177
178 /* CPLD sdram type inputs; set up by blob */ 178 /* CPLD sdram type inputs; set up by blob */
179 //GPDR |= (BADGE4_GPIO_SDTYP1 | BADGE4_GPIO_SDTYP0); 179 //GPDR |= (BADGE4_GPIO_SDTYP1 | BADGE4_GPIO_SDTYP0);
180 printk(KERN_DEBUG __FILE__ ": SDRAM CPLD typ1=%d typ0=%d\n", 180 printk(KERN_DEBUG __FILE__ ": SDRAM CPLD typ1=%d typ0=%d\n",
181 !!(GPLR & BADGE4_GPIO_SDTYP1), 181 !!(GPLR & BADGE4_GPIO_SDTYP1),
182 !!(GPLR & BADGE4_GPIO_SDTYP0)); 182 !!(GPLR & BADGE4_GPIO_SDTYP0));
183 183
184 /* SA1111 reset pin; set up by blob */ 184 /* SA1111 reset pin; set up by blob */
185 //GPSR = BADGE4_GPIO_SA1111_NRST; 185 //GPSR = BADGE4_GPIO_SA1111_NRST;
@@ -205,8 +205,8 @@ static int __init badge4_init(void)
205 ret = badge4_sa1111_init(); 205 ret = badge4_sa1111_init();
206 if (ret < 0) 206 if (ret < 0)
207 printk(KERN_ERR 207 printk(KERN_ERR
208 "%s: SA-1111 initialization failed (%d)\n", 208 "%s: SA-1111 initialization failed (%d)\n",
209 __func__, ret); 209 __func__, ret);
210 210
211 211
212 /* maybe turn on 5v0 from the start */ 212 /* maybe turn on 5v0 from the start */
@@ -254,7 +254,7 @@ EXPORT_SYMBOL(badge4_set_5V);
254 254
255 255
256static struct map_desc badge4_io_desc[] __initdata = { 256static struct map_desc badge4_io_desc[] __initdata = {
257 { /* SRAM bank 1 */ 257 { /* SRAM bank 1 */
258 .virtual = 0xf1000000, 258 .virtual = 0xf1000000,
259 .pfn = __phys_to_pfn(0x08000000), 259 .pfn = __phys_to_pfn(0x08000000),
260 .length = 0x00100000, 260 .length = 0x00100000,
diff --git a/arch/arm/mach-sa1100/cpu-sa1100.c b/arch/arm/mach-sa1100/cpu-sa1100.c
index da3a898a6d66..f7fa03478efd 100644
--- a/arch/arm/mach-sa1100/cpu-sa1100.c
+++ b/arch/arm/mach-sa1100/cpu-sa1100.c
@@ -88,6 +88,8 @@
88#include <linux/init.h> 88#include <linux/init.h>
89#include <linux/cpufreq.h> 89#include <linux/cpufreq.h>
90 90
91#include <asm/cputype.h>
92
91#include <mach/hardware.h> 93#include <mach/hardware.h>
92 94
93#include "generic.h" 95#include "generic.h"
@@ -240,7 +242,7 @@ static struct cpufreq_driver sa1100_driver = {
240 242
241static int __init sa1100_dram_init(void) 243static int __init sa1100_dram_init(void)
242{ 244{
243 if ((processor_id & CPU_SA1100_MASK) == CPU_SA1100_ID) 245 if (cpu_is_sa1100())
244 return cpufreq_register_driver(&sa1100_driver); 246 return cpufreq_register_driver(&sa1100_driver);
245 else 247 else
246 return -ENODEV; 248 return -ENODEV;
diff --git a/arch/arm/mach-sa1100/cpu-sa1110.c b/arch/arm/mach-sa1100/cpu-sa1110.c
index 029dbfbbafcf..3e4fb214eada 100644
--- a/arch/arm/mach-sa1100/cpu-sa1110.c
+++ b/arch/arm/mach-sa1100/cpu-sa1110.c
@@ -23,10 +23,11 @@
23#include <linux/cpufreq.h> 23#include <linux/cpufreq.h>
24#include <linux/delay.h> 24#include <linux/delay.h>
25#include <linux/init.h> 25#include <linux/init.h>
26#include <linux/io.h>
26 27
27#include <mach/hardware.h> 28#include <mach/hardware.h>
29#include <asm/cputype.h>
28#include <asm/mach-types.h> 30#include <asm/mach-types.h>
29#include <asm/io.h>
30#include <asm/system.h> 31#include <asm/system.h>
31 32
32#include "generic.h" 33#include "generic.h"
diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c
index b422526f6d8b..c1fbd5b5f9c4 100644
--- a/arch/arm/mach-sa1100/generic.c
+++ b/arch/arm/mach-sa1100/generic.c
@@ -42,7 +42,7 @@ EXPORT_SYMBOL(reset_status);
42static const unsigned short cclk_frequency_100khz[NR_FREQS] = { 42static const unsigned short cclk_frequency_100khz[NR_FREQS] = {
43 590, /* 59.0 MHz */ 43 590, /* 59.0 MHz */
44 737, /* 73.7 MHz */ 44 737, /* 73.7 MHz */
45 885, /* 88.5 MHz */ 45 885, /* 88.5 MHz */
46 1032, /* 103.2 MHz */ 46 1032, /* 103.2 MHz */
47 1180, /* 118.0 MHz */ 47 1180, /* 118.0 MHz */
48 1327, /* 132.7 MHz */ 48 1327, /* 132.7 MHz */
@@ -52,10 +52,10 @@ static const unsigned short cclk_frequency_100khz[NR_FREQS] = {
52 1917, /* 191.7 MHz */ 52 1917, /* 191.7 MHz */
53 2064, /* 206.4 MHz */ 53 2064, /* 206.4 MHz */
54 2212, /* 221.2 MHz */ 54 2212, /* 221.2 MHz */
55 2359, /* 235.9 MHz */ 55 2359, /* 235.9 MHz */
56 2507, /* 250.7 MHz */ 56 2507, /* 250.7 MHz */
57 2654, /* 265.4 MHz */ 57 2654, /* 265.4 MHz */
58 2802 /* 280.2 MHz */ 58 2802 /* 280.2 MHz */
59}; 59};
60 60
61#if defined(CONFIG_CPU_FREQ_SA1100) || defined(CONFIG_CPU_FREQ_SA1110) 61#if defined(CONFIG_CPU_FREQ_SA1100) || defined(CONFIG_CPU_FREQ_SA1110)
@@ -113,7 +113,7 @@ unsigned int sa11x0_getspeed(unsigned int cpu)
113#else 113#else
114/* 114/*
115 * We still need to provide this so building without cpufreq works. 115 * We still need to provide this so building without cpufreq works.
116 */ 116 */
117unsigned int cpufreq_get(unsigned int cpu) 117unsigned int cpufreq_get(unsigned int cpu)
118{ 118{
119 return cclk_frequency_100khz[PPCR & 0xf] * 100; 119 return cclk_frequency_100khz[PPCR & 0xf] * 100;
@@ -389,7 +389,7 @@ EXPORT_SYMBOL(sa1100fb_lcd_power);
389 */ 389 */
390 390
391static struct map_desc standard_io_desc[] __initdata = { 391static struct map_desc standard_io_desc[] __initdata = {
392 { /* PCM */ 392 { /* PCM */
393 .virtual = 0xf8000000, 393 .virtual = 0xf8000000,
394 .pfn = __phys_to_pfn(0x80000000), 394 .pfn = __phys_to_pfn(0x80000000),
395 .length = 0x00100000, 395 .length = 0x00100000,
diff --git a/arch/arm/mach-sa1100/include/mach/SA-1100.h b/arch/arm/mach-sa1100/include/mach/SA-1100.h
index 62aaf04a3906..4f7ea012e1e5 100644
--- a/arch/arm/mach-sa1100/include/mach/SA-1100.h
+++ b/arch/arm/mach-sa1100/include/mach/SA-1100.h
@@ -2054,19 +2054,3 @@
2054 /* active display mode) */ 2054 /* active display mode) */
2055#define LCCR3_OutEnH (LCCR3_OEP*0) /* Output Enable active High */ 2055#define LCCR3_OutEnH (LCCR3_OEP*0) /* Output Enable active High */
2056#define LCCR3_OutEnL (LCCR3_OEP*1) /* Output Enable active Low */ 2056#define LCCR3_OutEnL (LCCR3_OEP*1) /* Output Enable active Low */
2057
2058#ifndef __ASSEMBLY__
2059extern unsigned int processor_id;
2060#endif
2061
2062#define CPU_REVISION (processor_id & 15)
2063#define CPU_SA1110_A0 (0)
2064#define CPU_SA1110_B0 (4)
2065#define CPU_SA1110_B1 (5)
2066#define CPU_SA1110_B2 (6)
2067#define CPU_SA1110_B4 (8)
2068
2069#define CPU_SA1100_ID (0x4401a110)
2070#define CPU_SA1100_MASK (0xfffffff0)
2071#define CPU_SA1110_ID (0x6901b110)
2072#define CPU_SA1110_MASK (0xfffffff0)
diff --git a/arch/arm/mach-sa1100/include/mach/hardware.h b/arch/arm/mach-sa1100/include/mach/hardware.h
index 5976435f42c2..b70846c096aa 100644
--- a/arch/arm/mach-sa1100/include/mach/hardware.h
+++ b/arch/arm/mach-sa1100/include/mach/hardware.h
@@ -36,8 +36,26 @@
36#define io_v2p( x ) \ 36#define io_v2p( x ) \
37 ( (((x)&0x00ffffff) | (((x)&(0x30000000>>VIO_SHIFT))<<VIO_SHIFT)) + PIO_START ) 37 ( (((x)&0x00ffffff) | (((x)&(0x30000000>>VIO_SHIFT))<<VIO_SHIFT)) + PIO_START )
38 38
39#define CPU_SA1110_A0 (0)
40#define CPU_SA1110_B0 (4)
41#define CPU_SA1110_B1 (5)
42#define CPU_SA1110_B2 (6)
43#define CPU_SA1110_B4 (8)
44
45#define CPU_SA1100_ID (0x4401a110)
46#define CPU_SA1100_MASK (0xfffffff0)
47#define CPU_SA1110_ID (0x6901b110)
48#define CPU_SA1110_MASK (0xfffffff0)
49
39#ifndef __ASSEMBLY__ 50#ifndef __ASSEMBLY__
40 51
52#include <asm/cputype.h>
53
54#define CPU_REVISION (read_cpuid_id() & 15)
55
56#define cpu_is_sa1100() ((read_cpuid_id() & CPU_SA1100_MASK) == CPU_SA1100_ID)
57#define cpu_is_sa1110() ((read_cpuid_id() & CPU_SA1110_MASK) == CPU_SA1110_ID)
58
41# define __REG(x) (*((volatile unsigned long *)io_p2v(x))) 59# define __REG(x) (*((volatile unsigned long *)io_p2v(x)))
42# define __PREG(x) (io_v2p((unsigned long)&(x))) 60# define __PREG(x) (io_v2p((unsigned long)&(x)))
43 61
diff --git a/arch/arm/mach-sa1100/include/mach/memory.h b/arch/arm/mach-sa1100/include/mach/memory.h
index 29f639e2afc6..1c127b68581d 100644
--- a/arch/arm/mach-sa1100/include/mach/memory.h
+++ b/arch/arm/mach-sa1100/include/mach/memory.h
@@ -40,23 +40,21 @@ void sa1111_adjust_zones(int node, unsigned long *size, unsigned long *holes);
40#define __bus_to_virt(x) __phys_to_virt(x) 40#define __bus_to_virt(x) __phys_to_virt(x)
41 41
42/* 42/*
43 * Because of the wide memory address space between physical RAM banks on the 43 * Because of the wide memory address space between physical RAM banks on the
44 * SA1100, it's much convenient to use Linux's NUMA support to implement our 44 * SA1100, it's much convenient to use Linux's SparseMEM support to implement
45 * memory map representation. Assuming all memory nodes have equal access 45 * our memory map representation. Assuming all memory nodes have equal access
46 * characteristics, we then have generic discontiguous memory support. 46 * characteristics, we then have generic discontiguous memory support.
47 * 47 *
48 * Of course, all this isn't mandatory for SA1100 implementations with only 48 * The sparsemem banks are matched with the physical memory bank addresses
49 * one used memory bank. For those, simply undefine CONFIG_DISCONTIGMEM. 49 * which are incidentally the same as virtual addresses.
50 *
51 * The nodes are matched with the physical memory bank addresses which are
52 * incidentally the same as virtual addresses.
53 * 50 *
54 * node 0: 0xc0000000 - 0xc7ffffff 51 * node 0: 0xc0000000 - 0xc7ffffff
55 * node 1: 0xc8000000 - 0xcfffffff 52 * node 1: 0xc8000000 - 0xcfffffff
56 * node 2: 0xd0000000 - 0xd7ffffff 53 * node 2: 0xd0000000 - 0xd7ffffff
57 * node 3: 0xd8000000 - 0xdfffffff 54 * node 3: 0xd8000000 - 0xdfffffff
58 */ 55 */
59#define NODE_MEM_SIZE_BITS 27 56#define MAX_PHYSMEM_BITS 32
57#define SECTION_SIZE_BITS 27
60 58
61/* 59/*
62 * Cache flushing area - SA1100 zero bank 60 * Cache flushing area - SA1100 zero bank
diff --git a/arch/arm/mach-sa1100/irq.c b/arch/arm/mach-sa1100/irq.c
index 86369a8f0cea..3093d46a9c6f 100644
--- a/arch/arm/mach-sa1100/irq.c
+++ b/arch/arm/mach-sa1100/irq.c
@@ -122,14 +122,12 @@ sa1100_high_gpio_handler(unsigned int irq, struct irq_desc *desc)
122 GEDR = mask; 122 GEDR = mask;
123 123
124 irq = IRQ_GPIO11; 124 irq = IRQ_GPIO11;
125 desc = irq_desc + irq;
126 mask >>= 11; 125 mask >>= 11;
127 do { 126 do {
128 if (mask & 1) 127 if (mask & 1)
129 desc_handle_irq(irq, desc); 128 generic_handle_irq(irq);
130 mask >>= 1; 129 mask >>= 1;
131 irq++; 130 irq++;
132 desc++;
133 } while (mask); 131 } while (mask);
134 132
135 mask = GEDR & 0xfffff800; 133 mask = GEDR & 0xfffff800;
diff --git a/arch/arm/mach-sa1100/neponset.c b/arch/arm/mach-sa1100/neponset.c
index 4856a6bd2482..6ccd175bc4cf 100644
--- a/arch/arm/mach-sa1100/neponset.c
+++ b/arch/arm/mach-sa1100/neponset.c
@@ -33,8 +33,6 @@ neponset_irq_handler(unsigned int irq, struct irq_desc *desc)
33 unsigned int irr; 33 unsigned int irr;
34 34
35 while (1) { 35 while (1) {
36 struct irq_desc *d;
37
38 /* 36 /*
39 * Acknowledge the parent IRQ. 37 * Acknowledge the parent IRQ.
40 */ 38 */
@@ -67,21 +65,18 @@ neponset_irq_handler(unsigned int irq, struct irq_desc *desc)
67 desc->chip->ack(irq); 65 desc->chip->ack(irq);
68 66
69 if (irr & IRR_ETHERNET) { 67 if (irr & IRR_ETHERNET) {
70 d = irq_desc + IRQ_NEPONSET_SMC9196; 68 generic_handle_irq(IRQ_NEPONSET_SMC9196);
71 desc_handle_irq(IRQ_NEPONSET_SMC9196, d);
72 } 69 }
73 70
74 if (irr & IRR_USAR) { 71 if (irr & IRR_USAR) {
75 d = irq_desc + IRQ_NEPONSET_USAR; 72 generic_handle_irq(IRQ_NEPONSET_USAR);
76 desc_handle_irq(IRQ_NEPONSET_USAR, d);
77 } 73 }
78 74
79 desc->chip->unmask(irq); 75 desc->chip->unmask(irq);
80 } 76 }
81 77
82 if (irr & IRR_SA1111) { 78 if (irr & IRR_SA1111) {
83 d = irq_desc + IRQ_NEPONSET_SA1111; 79 generic_handle_irq(IRQ_NEPONSET_SA1111);
84 desc_handle_irq(IRQ_NEPONSET_SA1111, d);
85 } 80 }
86 } 81 }
87} 82}
diff --git a/arch/arm/mach-sa1100/pleb.c b/arch/arm/mach-sa1100/pleb.c
index 83be1c6c5f80..e45d3a1890bc 100644
--- a/arch/arm/mach-sa1100/pleb.c
+++ b/arch/arm/mach-sa1100/pleb.c
@@ -8,11 +8,10 @@
8#include <linux/ioport.h> 8#include <linux/ioport.h>
9#include <linux/platform_device.h> 9#include <linux/platform_device.h>
10#include <linux/irq.h> 10#include <linux/irq.h>
11 11#include <linux/io.h>
12#include <linux/mtd/partitions.h> 12#include <linux/mtd/partitions.h>
13 13
14#include <mach/hardware.h> 14#include <mach/hardware.h>
15#include <asm/io.h>
16#include <asm/setup.h> 15#include <asm/setup.h>
17#include <asm/mach-types.h> 16#include <asm/mach-types.h>
18 17
@@ -39,8 +38,8 @@
39 38
40static struct resource smc91x_resources[] = { 39static struct resource smc91x_resources[] = {
41 [0] = { 40 [0] = {
42 .start = PLEB_ETH0_P, 41 .start = PLEB_ETH0_P,
43 .end = PLEB_ETH0_P | 0x03ffffff, 42 .end = PLEB_ETH0_P | 0x03ffffff,
44 .flags = IORESOURCE_MEM, 43 .flags = IORESOURCE_MEM,
45 }, 44 },
46#if 0 /* Autoprobe instead, to get rising/falling edge characteristic right */ 45#if 0 /* Autoprobe instead, to get rising/falling edge characteristic right */
@@ -87,15 +86,15 @@ static struct resource pleb_flash_resources[] = {
87static struct mtd_partition pleb_partitions[] = { 86static struct mtd_partition pleb_partitions[] = {
88 { 87 {
89 .name = "blob", 88 .name = "blob",
90 .offset = 0, 89 .offset = 0,
91 .size = 0x00020000, 90 .size = 0x00020000,
92 }, { 91 }, {
93 .name = "kernel", 92 .name = "kernel",
94 .offset = MTDPART_OFS_APPEND, 93 .offset = MTDPART_OFS_APPEND,
95 .size = 0x000e0000, 94 .size = 0x000e0000,
96 }, { 95 }, {
97 .name = "rootfs", 96 .name = "rootfs",
98 .offset = MTDPART_OFS_APPEND, 97 .offset = MTDPART_OFS_APPEND,
99 .size = 0x00300000, 98 .size = 0x00300000,
100 } 99 }
101}; 100};
diff --git a/arch/arm/mach-sa1100/simpad.c b/arch/arm/mach-sa1100/simpad.c
index 8dd635317959..3c74534f7fee 100644
--- a/arch/arm/mach-sa1100/simpad.c
+++ b/arch/arm/mach-sa1100/simpad.c
@@ -12,6 +12,7 @@
12#include <linux/platform_device.h> 12#include <linux/platform_device.h>
13#include <linux/mtd/mtd.h> 13#include <linux/mtd/mtd.h>
14#include <linux/mtd/partitions.h> 14#include <linux/mtd/partitions.h>
15#include <linux/io.h>
15 16
16#include <asm/irq.h> 17#include <asm/irq.h>
17#include <mach/hardware.h> 18#include <mach/hardware.h>
@@ -27,7 +28,6 @@
27 28
28#include <linux/serial_core.h> 29#include <linux/serial_core.h>
29#include <linux/ioport.h> 30#include <linux/ioport.h>
30#include <asm/io.h>
31 31
32#include "generic.h" 32#include "generic.h"
33 33
diff --git a/arch/arm/mach-sa1100/ssp.c b/arch/arm/mach-sa1100/ssp.c
index 641f361c56f4..b20ff93b84a5 100644
--- a/arch/arm/mach-sa1100/ssp.c
+++ b/arch/arm/mach-sa1100/ssp.c
@@ -17,8 +17,8 @@
17#include <linux/interrupt.h> 17#include <linux/interrupt.h>
18#include <linux/ioport.h> 18#include <linux/ioport.h>
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/io.h>
20 21
21#include <asm/io.h>
22#include <asm/irq.h> 22#include <asm/irq.h>
23#include <mach/hardware.h> 23#include <mach/hardware.h>
24#include <asm/hardware/ssp.h> 24#include <asm/hardware/ssp.h>