aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2013-04-01 12:30:47 -0400
committerTony Lindgren <tony@atomide.com>2013-04-01 12:30:47 -0400
commit105612489bf59386b46b3f9f034e03f70e57aee6 (patch)
treed6a5d2ba3702a69649ea59c6cb31caadb9941459 /arch
parentd29778a01d5fc4b69ca1e7bc21121536e5c1c31d (diff)
parentecf51648c192377ea2830101b12fc3017bfd2b0c (diff)
Merge branch 'for_3.10/omap5_generic_updates' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux into omap-for-v3.10/fixes-non-critical
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap2/Kconfig2
-rw-r--r--arch/arm/mach-omap2/dpll3xxx.c11
-rw-r--r--arch/arm/mach-omap2/id.c12
-rw-r--r--arch/arm/mach-omap2/io.c9
-rw-r--r--arch/arm/mach-omap2/omap4-common.c10
-rw-r--r--arch/arm/mach-omap2/omap4-sar-layout.h14
-rw-r--r--arch/arm/mach-omap2/omap54xx.h1
-rw-r--r--arch/arm/mach-omap2/prm44xx.c6
-rw-r--r--arch/arm/mach-omap2/soc.h2
-rw-r--r--arch/arm/mach-omap2/timer.c5
10 files changed, 48 insertions, 24 deletions
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 8111cd9ff3e5..b9c0ed3f648c 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -408,7 +408,7 @@ config OMAP3_SDRC_AC_TIMING
408 408
409config OMAP4_ERRATA_I688 409config OMAP4_ERRATA_I688
410 bool "OMAP4 errata: Async Bridge Corruption" 410 bool "OMAP4 errata: Async Bridge Corruption"
411 depends on ARCH_OMAP4 && !ARCH_MULTIPLATFORM 411 depends on (ARCH_OMAP4 || SOC_OMAP5) && !ARCH_MULTIPLATFORM
412 select ARCH_HAS_BARRIERS 412 select ARCH_HAS_BARRIERS
413 help 413 help
414 If a data is stalled inside asynchronous bridge because of back 414 If a data is stalled inside asynchronous bridge because of back
diff --git a/arch/arm/mach-omap2/dpll3xxx.c b/arch/arm/mach-omap2/dpll3xxx.c
index 6e9873ff1844..3a0296cfcace 100644
--- a/arch/arm/mach-omap2/dpll3xxx.c
+++ b/arch/arm/mach-omap2/dpll3xxx.c
@@ -307,10 +307,10 @@ static int omap3_noncore_dpll_program(struct clk_hw_omap *clk, u16 freqsel)
307 _omap3_noncore_dpll_bypass(clk); 307 _omap3_noncore_dpll_bypass(clk);
308 308
309 /* 309 /*
310 * Set jitter correction. No jitter correction for OMAP4 and 3630 310 * Set jitter correction. Jitter correction applicable for OMAP343X
311 * since freqsel field is no longer present 311 * only since freqsel field is no longer present on other devices.
312 */ 312 */
313 if (!soc_is_am33xx() && !cpu_is_omap44xx() && !cpu_is_omap3630()) { 313 if (cpu_is_omap343x()) {
314 v = __raw_readl(dd->control_reg); 314 v = __raw_readl(dd->control_reg);
315 v &= ~dd->freqsel_mask; 315 v &= ~dd->freqsel_mask;
316 v |= freqsel << __ffs(dd->freqsel_mask); 316 v |= freqsel << __ffs(dd->freqsel_mask);
@@ -502,9 +502,8 @@ int omap3_noncore_dpll_set_rate(struct clk_hw *hw, unsigned long rate,
502 if (dd->last_rounded_rate == 0) 502 if (dd->last_rounded_rate == 0)
503 return -EINVAL; 503 return -EINVAL;
504 504
505 /* No freqsel on AM335x, OMAP4 and OMAP3630 */ 505 /* Freqsel is available only on OMAP343X devices */
506 if (!soc_is_am33xx() && !cpu_is_omap44xx() && 506 if (cpu_is_omap343x()) {
507 !cpu_is_omap3630()) {
508 freqsel = _omap3_dpll_compute_freqsel(clk, 507 freqsel = _omap3_dpll_compute_freqsel(clk,
509 dd->last_rounded_n); 508 dd->last_rounded_n);
510 WARN_ON(!freqsel); 509 WARN_ON(!freqsel);
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 8a68f1ec66b9..ff0bc9e51aa7 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -529,22 +529,28 @@ void __init omap5xxx_check_revision(void)
529 case 0xb942: 529 case 0xb942:
530 switch (rev) { 530 switch (rev) {
531 case 0: 531 case 0:
532 default:
533 omap_revision = OMAP5430_REV_ES1_0; 532 omap_revision = OMAP5430_REV_ES1_0;
533 break;
534 case 1:
535 default:
536 omap_revision = OMAP5430_REV_ES2_0;
534 } 537 }
535 break; 538 break;
536 539
537 case 0xb998: 540 case 0xb998:
538 switch (rev) { 541 switch (rev) {
539 case 0: 542 case 0:
540 default:
541 omap_revision = OMAP5432_REV_ES1_0; 543 omap_revision = OMAP5432_REV_ES1_0;
544 break;
545 case 1:
546 default:
547 omap_revision = OMAP5432_REV_ES2_0;
542 } 548 }
543 break; 549 break;
544 550
545 default: 551 default:
546 /* Unknown default to latest silicon rev as default*/ 552 /* Unknown default to latest silicon rev as default*/
547 omap_revision = OMAP5430_REV_ES1_0; 553 omap_revision = OMAP5430_REV_ES2_0;
548 } 554 }
549 555
550 pr_info("OMAP%04x ES%d.0\n", 556 pr_info("OMAP%04x ES%d.0\n",
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 2c3fdd65387b..2bef5a7e6af8 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -271,6 +271,14 @@ static struct map_desc omap54xx_io_desc[] __initdata = {
271 .length = L4_PER_54XX_SIZE, 271 .length = L4_PER_54XX_SIZE,
272 .type = MT_DEVICE, 272 .type = MT_DEVICE,
273 }, 273 },
274#ifdef CONFIG_OMAP4_ERRATA_I688
275 {
276 .virtual = OMAP4_SRAM_VA,
277 .pfn = __phys_to_pfn(OMAP4_SRAM_PA),
278 .length = PAGE_SIZE,
279 .type = MT_MEMORY_SO,
280 },
281#endif
274}; 282};
275#endif 283#endif
276 284
@@ -323,6 +331,7 @@ void __init omap4_map_io(void)
323void __init omap5_map_io(void) 331void __init omap5_map_io(void)
324{ 332{
325 iotable_init(omap54xx_io_desc, ARRAY_SIZE(omap54xx_io_desc)); 333 iotable_init(omap54xx_io_desc, ARRAY_SIZE(omap54xx_io_desc));
334 omap_barriers_init();
326} 335}
327#endif 336#endif
328/* 337/*
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
index 708bb115a27f..2aeb928efdfd 100644
--- a/arch/arm/mach-omap2/omap4-common.c
+++ b/arch/arm/mach-omap2/omap4-common.c
@@ -240,15 +240,21 @@ void __iomem *omap4_get_sar_ram_base(void)
240 */ 240 */
241static int __init omap4_sar_ram_init(void) 241static int __init omap4_sar_ram_init(void)
242{ 242{
243 unsigned long sar_base;
244
243 /* 245 /*
244 * To avoid code running on other OMAPs in 246 * To avoid code running on other OMAPs in
245 * multi-omap builds 247 * multi-omap builds
246 */ 248 */
247 if (!cpu_is_omap44xx()) 249 if (cpu_is_omap44xx())
250 sar_base = OMAP44XX_SAR_RAM_BASE;
251 else if (soc_is_omap54xx())
252 sar_base = OMAP54XX_SAR_RAM_BASE;
253 else
248 return -ENOMEM; 254 return -ENOMEM;
249 255
250 /* Static mapping, never released */ 256 /* Static mapping, never released */
251 sar_ram_base = ioremap(OMAP44XX_SAR_RAM_BASE, SZ_16K); 257 sar_ram_base = ioremap(sar_base, SZ_16K);
252 if (WARN_ON(!sar_ram_base)) 258 if (WARN_ON(!sar_ram_base))
253 return -ENOMEM; 259 return -ENOMEM;
254 260
diff --git a/arch/arm/mach-omap2/omap4-sar-layout.h b/arch/arm/mach-omap2/omap4-sar-layout.h
index e170fe803b04..937417523b8e 100644
--- a/arch/arm/mach-omap2/omap4-sar-layout.h
+++ b/arch/arm/mach-omap2/omap4-sar-layout.h
@@ -48,13 +48,13 @@
48#define SAR_BACKUP_STATUS_WAKEUPGEN 0x10 48#define SAR_BACKUP_STATUS_WAKEUPGEN 0x10
49 49
50/* WakeUpGen save restore offset from OMAP54XX_SAR_RAM_BASE */ 50/* WakeUpGen save restore offset from OMAP54XX_SAR_RAM_BASE */
51#define OMAP5_WAKEUPGENENB_OFFSET_CPU0 (SAR_BANK3_OFFSET + 0x8d4) 51#define OMAP5_WAKEUPGENENB_OFFSET_CPU0 (SAR_BANK3_OFFSET + 0x9dc)
52#define OMAP5_WAKEUPGENENB_SECURE_OFFSET_CPU0 (SAR_BANK3_OFFSET + 0x8e8) 52#define OMAP5_WAKEUPGENENB_SECURE_OFFSET_CPU0 (SAR_BANK3_OFFSET + 0x9f0)
53#define OMAP5_WAKEUPGENENB_OFFSET_CPU1 (SAR_BANK3_OFFSET + 0x8fc) 53#define OMAP5_WAKEUPGENENB_OFFSET_CPU1 (SAR_BANK3_OFFSET + 0xa04)
54#define OMAP5_WAKEUPGENENB_SECURE_OFFSET_CPU1 (SAR_BANK3_OFFSET + 0x910) 54#define OMAP5_WAKEUPGENENB_SECURE_OFFSET_CPU1 (SAR_BANK3_OFFSET + 0xa18)
55#define OMAP5_AUXCOREBOOT0_OFFSET (SAR_BANK3_OFFSET + 0x924) 55#define OMAP5_AUXCOREBOOT0_OFFSET (SAR_BANK3_OFFSET + 0xa2c)
56#define OMAP5_AUXCOREBOOT1_OFFSET (SAR_BANK3_OFFSET + 0x928) 56#define OMAP5_AUXCOREBOOT1_OFFSET (SAR_BANK3_OFFSET + 0x930)
57#define OMAP5_AMBA_IF_MODE_OFFSET (SAR_BANK3_OFFSET + 0x92c) 57#define OMAP5_AMBA_IF_MODE_OFFSET (SAR_BANK3_OFFSET + 0xa34)
58#define OMAP5_SAR_BACKUP_STATUS_OFFSET (SAR_BANK3_OFFSET + 0x800) 58#define OMAP5_SAR_BACKUP_STATUS_OFFSET (SAR_BANK3_OFFSET + 0x800)
59 59
60#endif 60#endif
diff --git a/arch/arm/mach-omap2/omap54xx.h b/arch/arm/mach-omap2/omap54xx.h
index a2582bb3cab3..a086ba15868b 100644
--- a/arch/arm/mach-omap2/omap54xx.h
+++ b/arch/arm/mach-omap2/omap54xx.h
@@ -28,5 +28,6 @@
28#define OMAP54XX_PRCM_MPU_BASE 0x48243000 28#define OMAP54XX_PRCM_MPU_BASE 0x48243000
29#define OMAP54XX_SCM_BASE 0x4a002000 29#define OMAP54XX_SCM_BASE 0x4a002000
30#define OMAP54XX_CTRL_BASE 0x4a002800 30#define OMAP54XX_CTRL_BASE 0x4a002800
31#define OMAP54XX_SAR_RAM_BASE 0x4ae26000
31 32
32#endif /* __ASM_SOC_OMAP555554XX_H */ 33#endif /* __ASM_SOC_OMAP555554XX_H */
diff --git a/arch/arm/mach-omap2/prm44xx.c b/arch/arm/mach-omap2/prm44xx.c
index d35f98aabf7a..415c7e0c9393 100644
--- a/arch/arm/mach-omap2/prm44xx.c
+++ b/arch/arm/mach-omap2/prm44xx.c
@@ -81,13 +81,13 @@ static struct prm_reset_src_map omap44xx_prm_reset_src_map[] = {
81/* Read a register in a CM/PRM instance in the PRM module */ 81/* Read a register in a CM/PRM instance in the PRM module */
82u32 omap4_prm_read_inst_reg(s16 inst, u16 reg) 82u32 omap4_prm_read_inst_reg(s16 inst, u16 reg)
83{ 83{
84 return __raw_readl(OMAP44XX_PRM_REGADDR(inst, reg)); 84 return __raw_readl(prm_base + inst + reg);
85} 85}
86 86
87/* Write into a register in a CM/PRM instance in the PRM module */ 87/* Write into a register in a CM/PRM instance in the PRM module */
88void omap4_prm_write_inst_reg(u32 val, s16 inst, u16 reg) 88void omap4_prm_write_inst_reg(u32 val, s16 inst, u16 reg)
89{ 89{
90 __raw_writel(val, OMAP44XX_PRM_REGADDR(inst, reg)); 90 __raw_writel(val, prm_base + inst + reg);
91} 91}
92 92
93/* Read-modify-write a register in a PRM module. Caller must lock */ 93/* Read-modify-write a register in a PRM module. Caller must lock */
@@ -650,7 +650,7 @@ static struct prm_ll_data omap44xx_prm_ll_data = {
650 650
651int __init omap44xx_prm_init(void) 651int __init omap44xx_prm_init(void)
652{ 652{
653 if (!cpu_is_omap44xx()) 653 if (!cpu_is_omap44xx() && !soc_is_omap54xx())
654 return 0; 654 return 0;
655 655
656 return prm_register(&omap44xx_prm_ll_data); 656 return prm_register(&omap44xx_prm_ll_data);
diff --git a/arch/arm/mach-omap2/soc.h b/arch/arm/mach-omap2/soc.h
index c62116bbc760..18fdeeb3a44a 100644
--- a/arch/arm/mach-omap2/soc.h
+++ b/arch/arm/mach-omap2/soc.h
@@ -413,7 +413,9 @@ IS_OMAP_TYPE(3430, 0x3430)
413 413
414#define OMAP54XX_CLASS 0x54000054 414#define OMAP54XX_CLASS 0x54000054
415#define OMAP5430_REV_ES1_0 (OMAP54XX_CLASS | (0x30 << 16) | (0x10 << 8)) 415#define OMAP5430_REV_ES1_0 (OMAP54XX_CLASS | (0x30 << 16) | (0x10 << 8))
416#define OMAP5430_REV_ES2_0 (OMAP54XX_CLASS | (0x30 << 16) | (0x20 << 8))
416#define OMAP5432_REV_ES1_0 (OMAP54XX_CLASS | (0x32 << 16) | (0x10 << 8)) 417#define OMAP5432_REV_ES1_0 (OMAP54XX_CLASS | (0x32 << 16) | (0x10 << 8))
418#define OMAP5432_REV_ES2_0 (OMAP54XX_CLASS | (0x32 << 16) | (0x20 << 8))
417 419
418void omap2xxx_check_revision(void); 420void omap2xxx_check_revision(void);
419void omap3xxx_check_revision(void); 421void omap3xxx_check_revision(void);
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index 2bdd4cf17a8f..773733fccd83 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -62,6 +62,7 @@
62#define OMAP2_MPU_SOURCE "sys_ck" 62#define OMAP2_MPU_SOURCE "sys_ck"
63#define OMAP3_MPU_SOURCE OMAP2_MPU_SOURCE 63#define OMAP3_MPU_SOURCE OMAP2_MPU_SOURCE
64#define OMAP4_MPU_SOURCE "sys_clkin_ck" 64#define OMAP4_MPU_SOURCE "sys_clkin_ck"
65#define OMAP5_MPU_SOURCE "sys_clkin"
65#define OMAP2_32K_SOURCE "func_32k_ck" 66#define OMAP2_32K_SOURCE "func_32k_ck"
66#define OMAP3_32K_SOURCE "omap_32k_fck" 67#define OMAP3_32K_SOURCE "omap_32k_fck"
67#define OMAP4_32K_SOURCE "sys_32k_ck" 68#define OMAP4_32K_SOURCE "sys_32k_ck"
@@ -487,7 +488,7 @@ static void __init realtime_counter_init(void)
487 pr_err("%s: ioremap failed\n", __func__); 488 pr_err("%s: ioremap failed\n", __func__);
488 return; 489 return;
489 } 490 }
490 sys_clk = clk_get(NULL, "sys_clkin_ck"); 491 sys_clk = clk_get(NULL, OMAP5_MPU_SOURCE);
491 if (IS_ERR(sys_clk)) { 492 if (IS_ERR(sys_clk)) {
492 pr_err("%s: failed to get system clock handle\n", __func__); 493 pr_err("%s: failed to get system clock handle\n", __func__);
493 iounmap(base); 494 iounmap(base);
@@ -616,7 +617,7 @@ void __init omap4_local_timer_init(void)
616 617
617#ifdef CONFIG_SOC_OMAP5 618#ifdef CONFIG_SOC_OMAP5
618OMAP_SYS_32K_TIMER_INIT(5, 1, OMAP4_32K_SOURCE, "ti,timer-alwon", 619OMAP_SYS_32K_TIMER_INIT(5, 1, OMAP4_32K_SOURCE, "ti,timer-alwon",
619 2, OMAP4_MPU_SOURCE); 620 2, OMAP5_MPU_SOURCE);
620void __init omap5_realtime_timer_init(void) 621void __init omap5_realtime_timer_init(void)
621{ 622{
622 int err; 623 int err;