aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-omap2/clock3xxx_data.c5
-rw-r--r--arch/arm/mach-omap2/common.c21
-rw-r--r--arch/arm/mach-omap2/control.h6
-rw-r--r--arch/arm/mach-omap2/id.c33
-rw-r--r--arch/arm/mach-omap2/include/mach/entry-macro.S13
-rw-r--r--arch/arm/mach-omap2/io.c22
-rw-r--r--arch/arm/mach-omap2/irq.c5
-rw-r--r--arch/arm/mach-omap2/serial.c8
-rw-r--r--arch/arm/plat-omap/include/plat/hardware.h1
-rw-r--r--arch/arm/plat-omap/include/plat/io.h8
-rw-r--r--arch/arm/plat-omap/include/plat/ti816x.h27
-rw-r--r--arch/arm/plat-omap/io.c5
12 files changed, 144 insertions, 10 deletions
diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c
index 403a4a1d3f9c..f14d986f0b5d 100644
--- a/arch/arm/mach-omap2/clock3xxx_data.c
+++ b/arch/arm/mach-omap2/clock3xxx_data.c
@@ -3471,6 +3471,9 @@ int __init omap3xxx_clk_init(void)
3471 } else if (cpu_is_omap3630()) { 3471 } else if (cpu_is_omap3630()) {
3472 cpu_mask = (RATE_IN_34XX | RATE_IN_36XX); 3472 cpu_mask = (RATE_IN_34XX | RATE_IN_36XX);
3473 cpu_clkflg = CK_36XX; 3473 cpu_clkflg = CK_36XX;
3474 } else if (cpu_is_ti816x()) {
3475 cpu_mask = RATE_IN_TI816X;
3476 cpu_clkflg = CK_TI816X;
3474 } else if (cpu_is_omap34xx()) { 3477 } else if (cpu_is_omap34xx()) {
3475 if (omap_rev() == OMAP3430_REV_ES1_0) { 3478 if (omap_rev() == OMAP3430_REV_ES1_0) {
3476 cpu_mask = RATE_IN_3430ES1; 3479 cpu_mask = RATE_IN_3430ES1;
@@ -3550,7 +3553,7 @@ int __init omap3xxx_clk_init(void)
3550 /* 3553 /*
3551 * Lock DPLL5 and put it in autoidle. 3554 * Lock DPLL5 and put it in autoidle.
3552 */ 3555 */
3553 if (omap_rev() >= OMAP3430_REV_ES2_0) 3556 if (!cpu_is_ti816x() && (omap_rev() >= OMAP3430_REV_ES2_0))
3554 omap3_clk_lock_dpll5(); 3557 omap3_clk_lock_dpll5();
3555 3558
3556 /* Avoid sleeping during omap3_core_dpll_m2_set_rate() */ 3559 /* Avoid sleeping during omap3_core_dpll_m2_set_rate() */
diff --git a/arch/arm/mach-omap2/common.c b/arch/arm/mach-omap2/common.c
index 778929f7e92d..79fb948f8144 100644
--- a/arch/arm/mach-omap2/common.c
+++ b/arch/arm/mach-omap2/common.c
@@ -108,6 +108,27 @@ void __init omap3_map_io(void)
108 omap2_set_globals_3xxx(); 108 omap2_set_globals_3xxx();
109 omap34xx_map_common_io(); 109 omap34xx_map_common_io();
110} 110}
111
112/*
113 * Adjust TAP register base such that omap3_check_revision accesses the correct
114 * TI816X register for checking device ID (it adds 0x204 to tap base while
115 * TI816X DEVICE ID register is at offset 0x600 from control base).
116 */
117#define TI816X_TAP_BASE (TI816X_CTRL_BASE + \
118 TI816X_CONTROL_DEVICE_ID - 0x204)
119
120static struct omap_globals ti816x_globals = {
121 .class = OMAP343X_CLASS,
122 .tap = OMAP2_L4_IO_ADDRESS(TI816X_TAP_BASE),
123 .ctrl = TI816X_CTRL_BASE,
124 .prm = TI816X_PRCM_BASE,
125 .cm = TI816X_PRCM_BASE,
126};
127
128void __init omap2_set_globals_ti816x(void)
129{
130 __omap2_set_globals(&ti816x_globals);
131}
111#endif 132#endif
112 133
113#if defined(CONFIG_ARCH_OMAP4) 134#if defined(CONFIG_ARCH_OMAP4)
diff --git a/arch/arm/mach-omap2/control.h b/arch/arm/mach-omap2/control.h
index f0629ae04102..c2804c1c4efd 100644
--- a/arch/arm/mach-omap2/control.h
+++ b/arch/arm/mach-omap2/control.h
@@ -52,6 +52,9 @@
52#define OMAP343X_CONTROL_PADCONFS_WKUP 0xa00 52#define OMAP343X_CONTROL_PADCONFS_WKUP 0xa00
53#define OMAP343X_CONTROL_GENERAL_WKUP 0xa60 53#define OMAP343X_CONTROL_GENERAL_WKUP 0xa60
54 54
55/* TI816X spefic control submodules */
56#define TI816X_CONTROL_DEVCONF 0x600
57
55/* Control register offsets - read/write with omap_ctrl_{read,write}{bwl}() */ 58/* Control register offsets - read/write with omap_ctrl_{read,write}{bwl}() */
56 59
57#define OMAP2_CONTROL_SYSCONFIG (OMAP2_CONTROL_INTERFACE + 0x10) 60#define OMAP2_CONTROL_SYSCONFIG (OMAP2_CONTROL_INTERFACE + 0x10)
@@ -241,6 +244,9 @@
241#define OMAP3_PADCONF_SAD2D_MSTANDBY 0x250 244#define OMAP3_PADCONF_SAD2D_MSTANDBY 0x250
242#define OMAP3_PADCONF_SAD2D_IDLEACK 0x254 245#define OMAP3_PADCONF_SAD2D_IDLEACK 0x254
243 246
247/* TI816X CONTROL_DEVCONF register offsets */
248#define TI816X_CONTROL_DEVICE_ID (TI816X_CONTROL_DEVCONF + 0x000)
249
244/* 250/*
245 * REVISIT: This list of registers is not comprehensive - there are more 251 * REVISIT: This list of registers is not comprehensive - there are more
246 * that should be added. 252 * that should be added.
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 5f9086c65e48..5c25f1b55235 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -191,12 +191,19 @@ static void __init omap3_check_features(void)
191 if (!cpu_is_omap3505() && !cpu_is_omap3517()) 191 if (!cpu_is_omap3505() && !cpu_is_omap3517())
192 omap3_features |= OMAP3_HAS_IO_WAKEUP; 192 omap3_features |= OMAP3_HAS_IO_WAKEUP;
193 193
194 omap3_features |= OMAP3_HAS_SDRC;
195
194 /* 196 /*
195 * TODO: Get additional info (where applicable) 197 * TODO: Get additional info (where applicable)
196 * e.g. Size of L2 cache. 198 * e.g. Size of L2 cache.
197 */ 199 */
198} 200}
199 201
202static void __init ti816x_check_features(void)
203{
204 omap3_features = OMAP3_HAS_NEON;
205}
206
200static void __init omap3_check_revision(void) 207static void __init omap3_check_revision(void)
201{ 208{
202 u32 cpuid, idcode; 209 u32 cpuid, idcode;
@@ -287,6 +294,20 @@ static void __init omap3_check_revision(void)
287 omap_chip.oc |= CHIP_IS_OMAP3630ES1_2; 294 omap_chip.oc |= CHIP_IS_OMAP3630ES1_2;
288 } 295 }
289 break; 296 break;
297 case 0xb81e:
298 omap_chip.oc = CHIP_IS_TI816X;
299
300 switch (rev) {
301 case 0:
302 omap_revision = TI8168_REV_ES1_0;
303 break;
304 case 1:
305 omap_revision = TI8168_REV_ES1_1;
306 break;
307 default:
308 omap_revision = TI8168_REV_ES1_1;
309 }
310 break;
290 default: 311 default:
291 /* Unknown default to latest silicon rev as default*/ 312 /* Unknown default to latest silicon rev as default*/
292 omap_revision = OMAP3630_REV_ES1_2; 313 omap_revision = OMAP3630_REV_ES1_2;
@@ -372,6 +393,8 @@ static void __init omap3_cpuinfo(void)
372 /* Already set in omap3_check_revision() */ 393 /* Already set in omap3_check_revision() */
373 strcpy(cpu_name, "AM3505"); 394 strcpy(cpu_name, "AM3505");
374 } 395 }
396 } else if (cpu_is_ti816x()) {
397 strcpy(cpu_name, "TI816X");
375 } else if (omap3_has_iva() && omap3_has_sgx()) { 398 } else if (omap3_has_iva() && omap3_has_sgx()) {
376 /* OMAP3430, OMAP3525, OMAP3515, OMAP3503 devices */ 399 /* OMAP3430, OMAP3525, OMAP3515, OMAP3503 devices */
377 strcpy(cpu_name, "OMAP3430/3530"); 400 strcpy(cpu_name, "OMAP3430/3530");
@@ -386,7 +409,7 @@ static void __init omap3_cpuinfo(void)
386 strcpy(cpu_name, "OMAP3503"); 409 strcpy(cpu_name, "OMAP3503");
387 } 410 }
388 411
389 if (cpu_is_omap3630()) { 412 if (cpu_is_omap3630() || cpu_is_ti816x()) {
390 switch (rev) { 413 switch (rev) {
391 case OMAP_REVBITS_00: 414 case OMAP_REVBITS_00:
392 strcpy(cpu_rev, "1.0"); 415 strcpy(cpu_rev, "1.0");
@@ -462,7 +485,13 @@ void __init omap2_check_revision(void)
462 omap24xx_check_revision(); 485 omap24xx_check_revision();
463 } else if (cpu_is_omap34xx()) { 486 } else if (cpu_is_omap34xx()) {
464 omap3_check_revision(); 487 omap3_check_revision();
465 omap3_check_features(); 488
489 /* TI816X doesn't have feature register */
490 if (!cpu_is_ti816x())
491 omap3_check_features();
492 else
493 ti816x_check_features();
494
466 omap3_cpuinfo(); 495 omap3_cpuinfo();
467 return; 496 return;
468 } else if (cpu_is_omap44xx()) { 497 } else if (cpu_is_omap44xx()) {
diff --git a/arch/arm/mach-omap2/include/mach/entry-macro.S b/arch/arm/mach-omap2/include/mach/entry-macro.S
index 81985a665cb3..a48690b90990 100644
--- a/arch/arm/mach-omap2/include/mach/entry-macro.S
+++ b/arch/arm/mach-omap2/include/mach/entry-macro.S
@@ -61,6 +61,14 @@
61 bne 9998f 61 bne 9998f
62 ldr \irqnr, [\base, #0xd8] /* IRQ pending reg 3 */ 62 ldr \irqnr, [\base, #0xd8] /* IRQ pending reg 3 */
63 cmp \irqnr, #0x0 63 cmp \irqnr, #0x0
64 bne 9998f
65
66 /*
67 * ti816x has additional IRQ pending register. Checking this
68 * register on omap2 & omap3 has no effect (read as 0).
69 */
70 ldr \irqnr, [\base, #0xf8] /* IRQ pending reg 4 */
71 cmp \irqnr, #0x0
649998: 729998:
65 ldrne \irqnr, [\base, #INTCPS_SIR_IRQ_OFFSET] 73 ldrne \irqnr, [\base, #INTCPS_SIR_IRQ_OFFSET]
66 and \irqnr, \irqnr, #ACTIVEIRQ_MASK /* Clear spurious bits */ 74 and \irqnr, \irqnr, #ACTIVEIRQ_MASK /* Clear spurious bits */
@@ -133,6 +141,11 @@
133 bne 9999f 141 bne 9999f
134 ldr \irqnr, [\base, #0xd8] /* IRQ pending reg 3 */ 142 ldr \irqnr, [\base, #0xd8] /* IRQ pending reg 3 */
135 cmp \irqnr, #0x0 143 cmp \irqnr, #0x0
144#ifdef CONFIG_SOC_OMAPTI816X
145 bne 9999f
146 ldr \irqnr, [\base, #0xf8] /* IRQ pending reg 4 */
147 cmp \irqnr, #0x0
148#endif
1369999: 1499999:
137 ldrne \irqnr, [\base, #INTCPS_SIR_IRQ_OFFSET] 150 ldrne \irqnr, [\base, #INTCPS_SIR_IRQ_OFFSET]
138 and \irqnr, \irqnr, #ACTIVEIRQ_MASK /* Clear spurious bits */ 151 and \irqnr, \irqnr, #ACTIVEIRQ_MASK /* Clear spurious bits */
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 26a61cf27291..f992a81c3939 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -175,6 +175,18 @@ static struct map_desc omap34xx_io_desc[] __initdata = {
175#endif 175#endif
176}; 176};
177#endif 177#endif
178
179#ifdef CONFIG_SOC_OMAPTI816X
180static struct map_desc omapti816x_io_desc[] __initdata = {
181 {
182 .virtual = L4_34XX_VIRT,
183 .pfn = __phys_to_pfn(L4_34XX_PHYS),
184 .length = L4_34XX_SIZE,
185 .type = MT_DEVICE
186 },
187};
188#endif
189
178#ifdef CONFIG_ARCH_OMAP4 190#ifdef CONFIG_ARCH_OMAP4
179static struct map_desc omap44xx_io_desc[] __initdata = { 191static struct map_desc omap44xx_io_desc[] __initdata = {
180 { 192 {
@@ -267,6 +279,14 @@ void __init omap34xx_map_common_io(void)
267} 279}
268#endif 280#endif
269 281
282#ifdef CONFIG_SOC_OMAPTI816X
283void __init omapti816x_map_common_io(void)
284{
285 iotable_init(omapti816x_io_desc, ARRAY_SIZE(omapti816x_io_desc));
286 _omap2_map_common_io();
287}
288#endif
289
270#ifdef CONFIG_ARCH_OMAP4 290#ifdef CONFIG_ARCH_OMAP4
271void __init omap44xx_map_common_io(void) 291void __init omap44xx_map_common_io(void)
272{ 292{
@@ -398,7 +418,7 @@ void __init omap2_init_common_infrastructure(void)
398void __init omap2_init_common_devices(struct omap_sdrc_params *sdrc_cs0, 418void __init omap2_init_common_devices(struct omap_sdrc_params *sdrc_cs0,
399 struct omap_sdrc_params *sdrc_cs1) 419 struct omap_sdrc_params *sdrc_cs1)
400{ 420{
401 if (cpu_is_omap24xx() || cpu_is_omap34xx()) { 421 if (cpu_is_omap24xx() || omap3_has_sdrc()) {
402 omap2_sdrc_init(sdrc_cs0, sdrc_cs1); 422 omap2_sdrc_init(sdrc_cs0, sdrc_cs1);
403 _omap2_init_reprogram_sdrc(); 423 _omap2_init_reprogram_sdrc();
404 } 424 }
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 23049c487c47..0b9a23d721f4 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -110,7 +110,7 @@ static void omap_mask_irq(struct irq_data *d)
110 unsigned int irq = d->irq; 110 unsigned int irq = d->irq;
111 int offset = irq & (~(IRQ_BITS_PER_REG - 1)); 111 int offset = irq & (~(IRQ_BITS_PER_REG - 1));
112 112
113 if (cpu_is_omap34xx()) { 113 if (cpu_is_omap34xx() && !cpu_is_ti816x()) {
114 int spurious = 0; 114 int spurious = 0;
115 115
116 /* 116 /*
@@ -205,6 +205,9 @@ void __init omap_init_irq(void)
205 205
206 BUG_ON(!base); 206 BUG_ON(!base);
207 207
208 if (cpu_is_ti816x())
209 bank->nr_irqs = 128;
210
208 /* Static mapping, never released */ 211 /* Static mapping, never released */
209 bank->base_reg = ioremap(base, SZ_4K); 212 bank->base_reg = ioremap(base, SZ_4K);
210 if (!bank->base_reg) { 213 if (!bank->base_reg) {
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 74e25cd4bd3a..47eef48b8830 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -486,7 +486,7 @@ static void omap_uart_idle_init(struct omap_uart_state *uart)
486 mod_timer(&uart->timer, jiffies + uart->timeout); 486 mod_timer(&uart->timer, jiffies + uart->timeout);
487 omap_uart_smart_idle_enable(uart, 0); 487 omap_uart_smart_idle_enable(uart, 0);
488 488
489 if (cpu_is_omap34xx()) { 489 if (cpu_is_omap34xx() && !cpu_is_ti816x()) {
490 u32 mod = (uart->num > 1) ? OMAP3430_PER_MOD : CORE_MOD; 490 u32 mod = (uart->num > 1) ? OMAP3430_PER_MOD : CORE_MOD;
491 u32 wk_mask = 0; 491 u32 wk_mask = 0;
492 u32 padconf = 0; 492 u32 padconf = 0;
@@ -762,13 +762,13 @@ void __init omap_serial_init_port(struct omap_board_data *bdata)
762 p->private_data = uart; 762 p->private_data = uart;
763 763
764 /* 764 /*
765 * omap44xx: Never read empty UART fifo 765 * omap44xx, ti816x: Never read empty UART fifo
766 * omap3xxx: Never read empty UART fifo on UARTs 766 * omap3xxx: Never read empty UART fifo on UARTs
767 * with IP rev >=0x52 767 * with IP rev >=0x52
768 */ 768 */
769 uart->regshift = p->regshift; 769 uart->regshift = p->regshift;
770 uart->membase = p->membase; 770 uart->membase = p->membase;
771 if (cpu_is_omap44xx()) 771 if (cpu_is_omap44xx() || cpu_is_ti816x())
772 uart->errata |= UART_ERRATA_FIFO_FULL_ABORT; 772 uart->errata |= UART_ERRATA_FIFO_FULL_ABORT;
773 else if ((serial_read_reg(uart, UART_OMAP_MVER) & 0xFF) 773 else if ((serial_read_reg(uart, UART_OMAP_MVER) & 0xFF)
774 >= UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV) 774 >= UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV)
@@ -850,7 +850,7 @@ void __init omap_serial_init_port(struct omap_board_data *bdata)
850 } 850 }
851 851
852 /* Enable the MDR1 errata for OMAP3 */ 852 /* Enable the MDR1 errata for OMAP3 */
853 if (cpu_is_omap34xx()) 853 if (cpu_is_omap34xx() && !cpu_is_ti816x())
854 uart->errata |= UART_ERRATA_i202_MDR1_ACCESS; 854 uart->errata |= UART_ERRATA_i202_MDR1_ACCESS;
855} 855}
856 856
diff --git a/arch/arm/plat-omap/include/plat/hardware.h b/arch/arm/plat-omap/include/plat/hardware.h
index d5b26adfb890..e87efe1499b8 100644
--- a/arch/arm/plat-omap/include/plat/hardware.h
+++ b/arch/arm/plat-omap/include/plat/hardware.h
@@ -286,5 +286,6 @@
286#include <plat/omap24xx.h> 286#include <plat/omap24xx.h>
287#include <plat/omap34xx.h> 287#include <plat/omap34xx.h>
288#include <plat/omap44xx.h> 288#include <plat/omap44xx.h>
289#include <plat/ti816x.h>
289 290
290#endif /* __ASM_ARCH_OMAP_HARDWARE_H */ 291#endif /* __ASM_ARCH_OMAP_HARDWARE_H */
diff --git a/arch/arm/plat-omap/include/plat/io.h b/arch/arm/plat-omap/include/plat/io.h
index ef4106c13183..427fc8a7c073 100644
--- a/arch/arm/plat-omap/include/plat/io.h
+++ b/arch/arm/plat-omap/include/plat/io.h
@@ -283,6 +283,14 @@ static inline void omap34xx_map_common_io(void)
283} 283}
284#endif 284#endif
285 285
286#ifdef CONFIG_SOC_OMAPTI816X
287extern void omapti816x_map_common_io(void);
288#else
289static inline void omapti816x_map_common_io(void)
290{
291}
292#endif
293
286#ifdef CONFIG_ARCH_OMAP4 294#ifdef CONFIG_ARCH_OMAP4
287extern void omap44xx_map_common_io(void); 295extern void omap44xx_map_common_io(void);
288#else 296#else
diff --git a/arch/arm/plat-omap/include/plat/ti816x.h b/arch/arm/plat-omap/include/plat/ti816x.h
new file mode 100644
index 000000000000..50510f5dda1e
--- /dev/null
+++ b/arch/arm/plat-omap/include/plat/ti816x.h
@@ -0,0 +1,27 @@
1/*
2 * This file contains the address data for various TI816X modules.
3 *
4 * Copyright (C) 2010 Texas Instruments, Inc. - http://www.ti.com/
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation version 2.
9 *
10 * This program is distributed "as is" WITHOUT ANY WARRANTY of any
11 * kind, whether express or implied; without even the implied warranty
12 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15
16#ifndef __ASM_ARCH_TI816X_H
17#define __ASM_ARCH_TI816X_H
18
19#define L4_SLOW_TI816X_BASE 0x48000000
20
21#define TI816X_SCM_BASE 0x48140000
22#define TI816X_CTRL_BASE TI816X_SCM_BASE
23#define TI816X_PRCM_BASE 0x48180000
24
25#define TI816X_ARM_INTC_BASE 0x48200000
26
27#endif /* __ASM_ARCH_TI816X_H */
diff --git a/arch/arm/plat-omap/io.c b/arch/arm/plat-omap/io.c
index f1295fafcd31..f1ecfa9fc61d 100644
--- a/arch/arm/plat-omap/io.c
+++ b/arch/arm/plat-omap/io.c
@@ -85,7 +85,10 @@ void __iomem *omap_ioremap(unsigned long p, size_t size, unsigned int type)
85 } 85 }
86#endif 86#endif
87#ifdef CONFIG_ARCH_OMAP3 87#ifdef CONFIG_ARCH_OMAP3
88 if (cpu_is_omap34xx()) { 88 if (cpu_is_ti816x()) {
89 if (BETWEEN(p, L4_34XX_PHYS, L4_34XX_SIZE))
90 return XLATE(p, L4_34XX_PHYS, L4_34XX_VIRT);
91 } else if (cpu_is_omap34xx()) {
89 if (BETWEEN(p, L3_34XX_PHYS, L3_34XX_SIZE)) 92 if (BETWEEN(p, L3_34XX_PHYS, L3_34XX_SIZE))
90 return XLATE(p, L3_34XX_PHYS, L3_34XX_VIRT); 93 return XLATE(p, L3_34XX_PHYS, L3_34XX_VIRT);
91 if (BETWEEN(p, L4_34XX_PHYS, L4_34XX_SIZE)) 94 if (BETWEEN(p, L4_34XX_PHYS, L4_34XX_SIZE))