diff options
Diffstat (limited to 'arch/arm/mach-ux500')
-rw-r--r-- | arch/arm/mach-ux500/board-mop500.c | 88 | ||||
-rw-r--r-- | arch/arm/mach-ux500/clock.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-ux500/cpu-u8500.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-ux500/include/mach/debug-macro.S | 11 | ||||
-rw-r--r-- | arch/arm/mach-ux500/include/mach/vmalloc.h | 2 |
5 files changed, 97 insertions, 10 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 | ||
112 | static 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) \ | ||
125 | static 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 | |||
138 | U8500_I2C_RESOURCES(0, SZ_4K); | ||
139 | U8500_I2C_RESOURCES(1, SZ_4K); | ||
140 | U8500_I2C_RESOURCES(2, SZ_4K); | ||
141 | U8500_I2C_RESOURCES(3, SZ_4K); | ||
142 | |||
143 | #define U8500_I2C_CONTROLLER(id, _slsu, _tft, _rft, clk, _sm) \ | ||
144 | static 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 | */ | ||
167 | U8500_I2C_CONTROLLER(0, 0xe, 1, 1, 100000, I2C_FREQ_MODE_STANDARD); | ||
168 | U8500_I2C_CONTROLLER(1, 0xe, 1, 1, 100000, I2C_FREQ_MODE_STANDARD); | ||
169 | U8500_I2C_CONTROLLER(2, 0xe, 1, 1, 100000, I2C_FREQ_MODE_STANDARD); | ||
170 | U8500_I2C_CONTROLLER(3, 0xe, 1, 1, 100000, I2C_FREQ_MODE_STANDARD); | ||
171 | |||
172 | #define U8500_I2C_PDEVICE(cid) \ | ||
173 | static 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 | |||
183 | U8500_I2C_PDEVICE(0); | ||
184 | U8500_I2C_PDEVICE(1); | ||
185 | U8500_I2C_PDEVICE(2); | ||
186 | U8500_I2C_PDEVICE(3); | ||
187 | |||
111 | static struct amba_device *amba_devs[] __initdata = { | 188 | static 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 */ | ||
197 | static struct platform_device *platform_devs[] __initdata = { | ||
198 | &i2c_controller0, | ||
199 | &i2c_controller1, | ||
200 | &i2c_controller2, | ||
201 | &i2c_controller3, | ||
116 | }; | 202 | }; |
117 | 203 | ||
118 | static void __init u8500_timer_init(void) | 204 | static 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 | ||
86 | static int __init clk_init(void) | 86 | static 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 | } |
95 | arch_initcall(clk_init); | 92 | arch_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 */ |
35 | static struct map_desc u8500_io_desc[] __initdata = { | 35 | static 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/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 |