aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ux500
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2010-03-26 10:55:59 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2010-03-26 10:55:59 -0400
commit329f9052dbadf6f4afe2231668bd00c579a4aa10 (patch)
treee080a5c70df40f3ae8cf28a95a3267757668ab97 /arch/arm/mach-ux500
parent395b228858778d3c44f7c413693a6acaa8bb62dc (diff)
parent220bf991b0366cc50a94feede3d7341fa5710ee4 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts: drivers/mtd/nand/sh_flctl.c Maxim's patch to initialise sysfs attributes depends on the patch which actually adds sysfs_attr_init().
Diffstat (limited to 'arch/arm/mach-ux500')
-rw-r--r--arch/arm/mach-ux500/board-mop500.c88
-rw-r--r--arch/arm/mach-ux500/clock.c5
-rw-r--r--arch/arm/mach-ux500/cpu-u8500.c1
-rw-r--r--arch/arm/mach-ux500/include/mach/debug-macro.S11
-rw-r--r--arch/arm/mach-ux500/include/mach/hardware.h8
-rw-r--r--arch/arm/mach-ux500/include/mach/vmalloc.h2
6 files changed, 101 insertions, 14 deletions
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index aa5afbcc90f9..803aec1d6728 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -22,6 +22,7 @@
22#include <asm/mach/arch.h> 22#include <asm/mach/arch.h>
23 23
24#include <plat/mtu.h> 24#include <plat/mtu.h>
25#include <plat/i2c.h>
25 26
26#include <mach/hardware.h> 27#include <mach/hardware.h>
27#include <mach/setup.h> 28#include <mach/setup.h>
@@ -108,11 +109,96 @@ static struct amba_device pl022_device = {
108 .periphid = SSP_PER_ID, 109 .periphid = SSP_PER_ID,
109}; 110};
110 111
112static struct amba_device pl031_device = {
113 .dev = {
114 .init_name = "pl031",
115 },
116 .res = {
117 .start = U8500_RTC_BASE,
118 .end = U8500_RTC_BASE + SZ_4K - 1,
119 .flags = IORESOURCE_MEM,
120 },
121 .irq = {IRQ_RTC_RTT, NO_IRQ},
122};
123
124#define U8500_I2C_RESOURCES(id, size) \
125static struct resource u8500_i2c_resources_##id[] = { \
126 [0] = { \
127 .start = U8500_I2C##id##_BASE, \
128 .end = U8500_I2C##id##_BASE + size - 1, \
129 .flags = IORESOURCE_MEM, \
130 }, \
131 [1] = { \
132 .start = IRQ_I2C##id, \
133 .end = IRQ_I2C##id, \
134 .flags = IORESOURCE_IRQ \
135 } \
136}
137
138U8500_I2C_RESOURCES(0, SZ_4K);
139U8500_I2C_RESOURCES(1, SZ_4K);
140U8500_I2C_RESOURCES(2, SZ_4K);
141U8500_I2C_RESOURCES(3, SZ_4K);
142
143#define U8500_I2C_CONTROLLER(id, _slsu, _tft, _rft, clk, _sm) \
144static struct nmk_i2c_controller u8500_i2c_##id = { \
145 /* \
146 * slave data setup time, which is \
147 * 250 ns,100ns,10ns which is 14,6,2 \
148 * respectively for a 48 Mhz \
149 * i2c clock \
150 */ \
151 .slsu = _slsu, \
152 /* Tx FIFO threshold */ \
153 .tft = _tft, \
154 /* Rx FIFO threshold */ \
155 .rft = _rft, \
156 /* std. mode operation */ \
157 .clk_freq = clk, \
158 .sm = _sm, \
159}
160
161/*
162 * The board uses 4 i2c controllers, initialize all of
163 * them with slave data setup time of 250 ns,
164 * Tx & Rx FIFO threshold values as 1 and standard
165 * mode of operation
166 */
167U8500_I2C_CONTROLLER(0, 0xe, 1, 1, 100000, I2C_FREQ_MODE_STANDARD);
168U8500_I2C_CONTROLLER(1, 0xe, 1, 1, 100000, I2C_FREQ_MODE_STANDARD);
169U8500_I2C_CONTROLLER(2, 0xe, 1, 1, 100000, I2C_FREQ_MODE_STANDARD);
170U8500_I2C_CONTROLLER(3, 0xe, 1, 1, 100000, I2C_FREQ_MODE_STANDARD);
171
172#define U8500_I2C_PDEVICE(cid) \
173static struct platform_device i2c_controller##cid = { \
174 .name = "nmk-i2c", \
175 .id = cid, \
176 .num_resources = 2, \
177 .resource = u8500_i2c_resources_##cid, \
178 .dev = { \
179 .platform_data = &u8500_i2c_##cid \
180 } \
181}
182
183U8500_I2C_PDEVICE(0);
184U8500_I2C_PDEVICE(1);
185U8500_I2C_PDEVICE(2);
186U8500_I2C_PDEVICE(3);
187
111static struct amba_device *amba_devs[] __initdata = { 188static struct amba_device *amba_devs[] __initdata = {
112 &uart0_device, 189 &uart0_device,
113 &uart1_device, 190 &uart1_device,
114 &uart2_device, 191 &uart2_device,
115 &pl022_device, 192 &pl022_device,
193 &pl031_device,
194};
195
196/* add any platform devices here - TODO */
197static struct platform_device *platform_devs[] __initdata = {
198 &i2c_controller0,
199 &i2c_controller1,
200 &i2c_controller2,
201 &i2c_controller3,
116}; 202};
117 203
118static void __init u8500_timer_init(void) 204static void __init u8500_timer_init(void)
@@ -139,6 +225,8 @@ static void __init u8500_init_machine(void)
139 for (i = 0; i < ARRAY_SIZE(amba_devs); i++) 225 for (i = 0; i < ARRAY_SIZE(amba_devs); i++)
140 amba_device_register(amba_devs[i], &iomem_resource); 226 amba_device_register(amba_devs[i], &iomem_resource);
141 227
228 platform_add_devices(platform_devs, ARRAY_SIZE(platform_devs));
229
142 spi_register_board_info(u8500_spi_devices, 230 spi_register_board_info(u8500_spi_devices,
143 ARRAY_SIZE(u8500_spi_devices)); 231 ARRAY_SIZE(u8500_spi_devices));
144 232
diff --git a/arch/arm/mach-ux500/clock.c b/arch/arm/mach-ux500/clock.c
index 20b6ebb6783a..8359a73d0041 100644
--- a/arch/arm/mach-ux500/clock.c
+++ b/arch/arm/mach-ux500/clock.c
@@ -85,11 +85,8 @@ static struct clk_lookup lookups[] = {
85 85
86static int __init clk_init(void) 86static int __init clk_init(void)
87{ 87{
88 int i;
89
90 /* register the clock lookups */ 88 /* register the clock lookups */
91 for (i = 0; i < ARRAY_SIZE(lookups); i++) 89 clkdev_add_table(lookups, ARRAY_SIZE(lookups));
92 clkdev_add(&lookups[i]);
93 return 0; 90 return 0;
94} 91}
95arch_initcall(clk_init); 92arch_initcall(clk_init);
diff --git a/arch/arm/mach-ux500/cpu-u8500.c b/arch/arm/mach-ux500/cpu-u8500.c
index 5f05e5850f71..397bc1f9ed94 100644
--- a/arch/arm/mach-ux500/cpu-u8500.c
+++ b/arch/arm/mach-ux500/cpu-u8500.c
@@ -33,6 +33,7 @@ static struct platform_device *platform_devs[] __initdata = {
33 33
34/* minimum static i/o mapping required to boot U8500 platforms */ 34/* minimum static i/o mapping required to boot U8500 platforms */
35static struct map_desc u8500_io_desc[] __initdata = { 35static struct map_desc u8500_io_desc[] __initdata = {
36 __IO_DEV_DESC(U8500_UART2_BASE, SZ_4K),
36 __IO_DEV_DESC(U8500_GIC_CPU_BASE, SZ_4K), 37 __IO_DEV_DESC(U8500_GIC_CPU_BASE, SZ_4K),
37 __IO_DEV_DESC(U8500_GIC_DIST_BASE, SZ_4K), 38 __IO_DEV_DESC(U8500_GIC_DIST_BASE, SZ_4K),
38 __IO_DEV_DESC(U8500_MTU0_BASE, SZ_4K), 39 __IO_DEV_DESC(U8500_MTU0_BASE, SZ_4K),
diff --git a/arch/arm/mach-ux500/include/mach/debug-macro.S b/arch/arm/mach-ux500/include/mach/debug-macro.S
index 8f21b6a95dce..09cbfda8aee5 100644
--- a/arch/arm/mach-ux500/include/mach/debug-macro.S
+++ b/arch/arm/mach-ux500/include/mach/debug-macro.S
@@ -8,12 +8,13 @@
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 * 9 *
10 */ 10 */
11 .macro addruart,rx 11#include <mach/hardware.h>
12
13 .macro addruart, rx, tmp
12 mrc p15, 0, \rx, c1, c0 14 mrc p15, 0, \rx, c1, c0
13 tst \rx, #1 @MMU enabled? 15 tst \rx, #1 @ MMU enabled?
14 moveq \rx, #0x80000000 @MMU off, Physical address 16 ldreq \rx, =U8500_UART2_BASE @ no, physical address
15 movne \rx, #0xF0000000 @MMU on, Virtual address 17 ldrne \rx, =IO_ADDRESS(U8500_UART2_BASE) @ yes, virtual address
16 orr \rx, \rx, #0x7000
17 .endm 18 .endm
18 19
19#include <asm/hardware/debug-pl01x.S> 20#include <asm/hardware/debug-pl01x.S>
diff --git a/arch/arm/mach-ux500/include/mach/hardware.h b/arch/arm/mach-ux500/include/mach/hardware.h
index 6da650202dc7..04ea836969b3 100644
--- a/arch/arm/mach-ux500/include/mach/hardware.h
+++ b/arch/arm/mach-ux500/include/mach/hardware.h
@@ -68,12 +68,12 @@
68#define U8500_PKAM_BASE (U8500_PER6_BASE + 0x2000) 68#define U8500_PKAM_BASE (U8500_PER6_BASE + 0x2000)
69#define U8500_CRYPTO0_BASE (U8500_PER6_BASE + 0xa000) 69#define U8500_CRYPTO0_BASE (U8500_PER6_BASE + 0xa000)
70#define U8500_CRYPTO1_BASE (U8500_PER6_BASE + 0xb000) 70#define U8500_CRYPTO1_BASE (U8500_PER6_BASE + 0xb000)
71#define U8500_CLKRST6_BASE (U8500_PER7_BASE + 0xf000) 71#define U8500_CLKRST6_BASE (U8500_PER6_BASE + 0xf000)
72 72
73/* per5 base addressess */ 73/* per5 base addressess */
74#define U8500_USBOTG_BASE (U8500_PER5_BASE + 0x00000) 74#define U8500_USBOTG_BASE (U8500_PER5_BASE + 0x00000)
75#define U8500_GPIO5_BASE (U8500_PER5_BASE + 0x1e000) 75#define U8500_GPIO5_BASE (U8500_PER5_BASE + 0x1e000)
76#define U8500_CLKRST5_BASE (U8500_PER7_BASE + 0x1f000) 76#define U8500_CLKRST5_BASE (U8500_PER5_BASE + 0x1f000)
77 77
78/* per4 base addressess */ 78/* per4 base addressess */
79#define U8500_BACKUPRAM0_BASE (U8500_PER4_BASE + 0x0000) 79#define U8500_BACKUPRAM0_BASE (U8500_PER4_BASE + 0x0000)
@@ -95,7 +95,7 @@
95#define U8500_UART2_BASE (U8500_PER3_BASE + 0x7000) 95#define U8500_UART2_BASE (U8500_PER3_BASE + 0x7000)
96#define U8500_SDI5_BASE (U8500_PER3_BASE + 0x8000) 96#define U8500_SDI5_BASE (U8500_PER3_BASE + 0x8000)
97#define U8500_GPIO3_BASE (U8500_PER3_BASE + 0xe000) 97#define U8500_GPIO3_BASE (U8500_PER3_BASE + 0xe000)
98#define U8500_CLKRST3_BASE (U8500_PER7_BASE + 0xf000) 98#define U8500_CLKRST3_BASE (U8500_PER3_BASE + 0xf000)
99 99
100/* per2 base addressess */ 100/* per2 base addressess */
101#define U8500_I2C3_BASE (U8500_PER2_BASE + 0x0000) 101#define U8500_I2C3_BASE (U8500_PER2_BASE + 0x0000)
@@ -123,7 +123,7 @@
123#define U8500_SPI3_BASE (U8500_PER1_BASE + 0x9000) 123#define U8500_SPI3_BASE (U8500_PER1_BASE + 0x9000)
124#define U8500_SLIM0_BASE (U8500_PER1_BASE + 0xa000) 124#define U8500_SLIM0_BASE (U8500_PER1_BASE + 0xa000)
125#define U8500_GPIO1_BASE (U8500_PER1_BASE + 0xe000) 125#define U8500_GPIO1_BASE (U8500_PER1_BASE + 0xe000)
126#define U8500_CLKRST1_BASE (U8500_PER2_BASE + 0xf000) 126#define U8500_CLKRST1_BASE (U8500_PER1_BASE + 0xf000)
127 127
128/* ST-Ericsson modified pl022 id */ 128/* ST-Ericsson modified pl022 id */
129#define SSP_PER_ID 0x01080022 129#define SSP_PER_ID 0x01080022
diff --git a/arch/arm/mach-ux500/include/mach/vmalloc.h b/arch/arm/mach-ux500/include/mach/vmalloc.h
index 86cdbbce1842..a4945cb41172 100644
--- a/arch/arm/mach-ux500/include/mach/vmalloc.h
+++ b/arch/arm/mach-ux500/include/mach/vmalloc.h
@@ -15,4 +15,4 @@
15 * along with this program; if not, write to the Free Software 15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */ 17 */
18#define VMALLOC_END 0xf0000000 18#define VMALLOC_END 0xf0000000UL