Skip to content

Commit 1056124

Browse files
committed
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
2 parents d29778a + ecf5164 commit 1056124

File tree

10 files changed

+48
-24
lines changed

10 files changed

+48
-24
lines changed

arch/arm/mach-omap2/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ config OMAP3_SDRC_AC_TIMING
408408

409409
config OMAP4_ERRATA_I688
410410
bool "OMAP4 errata: Async Bridge Corruption"
411-
depends on ARCH_OMAP4 && !ARCH_MULTIPLATFORM
411+
depends on (ARCH_OMAP4 || SOC_OMAP5) && !ARCH_MULTIPLATFORM
412412
select ARCH_HAS_BARRIERS
413413
help
414414
If a data is stalled inside asynchronous bridge because of back

arch/arm/mach-omap2/dpll3xxx.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -307,10 +307,10 @@ static int omap3_noncore_dpll_program(struct clk_hw_omap *clk, u16 freqsel)
307307
_omap3_noncore_dpll_bypass(clk);
308308

309309
/*
310-
* Set jitter correction. No jitter correction for OMAP4 and 3630
311-
* since freqsel field is no longer present
310+
* Set jitter correction. Jitter correction applicable for OMAP343X
311+
* only since freqsel field is no longer present on other devices.
312312
*/
313-
if (!soc_is_am33xx() && !cpu_is_omap44xx() && !cpu_is_omap3630()) {
313+
if (cpu_is_omap343x()) {
314314
v = __raw_readl(dd->control_reg);
315315
v &= ~dd->freqsel_mask;
316316
v |= freqsel << __ffs(dd->freqsel_mask);
@@ -502,9 +502,8 @@ int omap3_noncore_dpll_set_rate(struct clk_hw *hw, unsigned long rate,
502502
if (dd->last_rounded_rate == 0)
503503
return -EINVAL;
504504

505-
/* No freqsel on AM335x, OMAP4 and OMAP3630 */
506-
if (!soc_is_am33xx() && !cpu_is_omap44xx() &&
507-
!cpu_is_omap3630()) {
505+
/* Freqsel is available only on OMAP343X devices */
506+
if (cpu_is_omap343x()) {
508507
freqsel = _omap3_dpll_compute_freqsel(clk,
509508
dd->last_rounded_n);
510509
WARN_ON(!freqsel);

arch/arm/mach-omap2/id.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -529,22 +529,28 @@ void __init omap5xxx_check_revision(void)
529529
case 0xb942:
530530
switch (rev) {
531531
case 0:
532-
default:
533532
omap_revision = OMAP5430_REV_ES1_0;
533+
break;
534+
case 1:
535+
default:
536+
omap_revision = OMAP5430_REV_ES2_0;
534537
}
535538
break;
536539

537540
case 0xb998:
538541
switch (rev) {
539542
case 0:
540-
default:
541543
omap_revision = OMAP5432_REV_ES1_0;
544+
break;
545+
case 1:
546+
default:
547+
omap_revision = OMAP5432_REV_ES2_0;
542548
}
543549
break;
544550

545551
default:
546552
/* Unknown default to latest silicon rev as default*/
547-
omap_revision = OMAP5430_REV_ES1_0;
553+
omap_revision = OMAP5430_REV_ES2_0;
548554
}
549555

550556
pr_info("OMAP%04x ES%d.0\n",

arch/arm/mach-omap2/io.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,14 @@ static struct map_desc omap54xx_io_desc[] __initdata = {
271271
.length= L4_PER_54XX_SIZE,
272272
.type= MT_DEVICE,
273273
},
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
274282
};
275283
#endif
276284

@@ -323,6 +331,7 @@ void __init omap4_map_io(void)
323331
void __init omap5_map_io(void)
324332
{
325333
iotable_init(omap54xx_io_desc, ARRAY_SIZE(omap54xx_io_desc));
334+
omap_barriers_init();
326335
}
327336
#endif
328337
/*

arch/arm/mach-omap2/omap4-common.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,15 +240,21 @@ void __iomem *omap4_get_sar_ram_base(void)
240240
*/
241241
static int __init omap4_sar_ram_init(void)
242242
{
243+
unsigned long sar_base;
244+
243245
/*
244246
* To avoid code running on other OMAPs in
245247
* multi-omap builds
246248
*/
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
248254
return -ENOMEM;
249255

250256
/* Static mapping, never released */
251-
sar_ram_base = ioremap(OMAP44XX_SAR_RAM_BASE, SZ_16K);
257+
sar_ram_base = ioremap(sar_base, SZ_16K);
252258
if (WARN_ON(!sar_ram_base))
253259
return -ENOMEM;
254260

arch/arm/mach-omap2/omap4-sar-layout.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@
4848
#define SAR_BACKUP_STATUS_WAKEUPGEN0x10
4949

5050
/* WakeUpGen save restore offset from OMAP54XX_SAR_RAM_BASE */
51-
#define OMAP5_WAKEUPGENENB_OFFSET_CPU0(SAR_BANK3_OFFSET + 0x8d4)
52-
#define OMAP5_WAKEUPGENENB_SECURE_OFFSET_CPU0(SAR_BANK3_OFFSET + 0x8e8)
53-
#define OMAP5_WAKEUPGENENB_OFFSET_CPU1(SAR_BANK3_OFFSET + 0x8fc)
54-
#define OMAP5_WAKEUPGENENB_SECURE_OFFSET_CPU1(SAR_BANK3_OFFSET + 0x910)
55-
#define OMAP5_AUXCOREBOOT0_OFFSET(SAR_BANK3_OFFSET + 0x924)
56-
#define OMAP5_AUXCOREBOOT1_OFFSET(SAR_BANK3_OFFSET + 0x928)
57-
#define OMAP5_AMBA_IF_MODE_OFFSET(SAR_BANK3_OFFSET + 0x92c)
51+
#define OMAP5_WAKEUPGENENB_OFFSET_CPU0(SAR_BANK3_OFFSET + 0x9dc)
52+
#define OMAP5_WAKEUPGENENB_SECURE_OFFSET_CPU0(SAR_BANK3_OFFSET + 0x9f0)
53+
#define OMAP5_WAKEUPGENENB_OFFSET_CPU1(SAR_BANK3_OFFSET + 0xa04)
54+
#define OMAP5_WAKEUPGENENB_SECURE_OFFSET_CPU1(SAR_BANK3_OFFSET + 0xa18)
55+
#define OMAP5_AUXCOREBOOT0_OFFSET(SAR_BANK3_OFFSET + 0xa2c)
56+
#define OMAP5_AUXCOREBOOT1_OFFSET(SAR_BANK3_OFFSET + 0x930)
57+
#define OMAP5_AMBA_IF_MODE_OFFSET(SAR_BANK3_OFFSET + 0xa34)
5858
#define OMAP5_SAR_BACKUP_STATUS_OFFSET(SAR_BANK3_OFFSET + 0x800)
5959

6060
#endif

arch/arm/mach-omap2/omap54xx.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,6 @@
2828
#define OMAP54XX_PRCM_MPU_BASE0x48243000
2929
#define OMAP54XX_SCM_BASE0x4a002000
3030
#define OMAP54XX_CTRL_BASE0x4a002800
31+
#define OMAP54XX_SAR_RAM_BASE0x4ae26000
3132

3233
#endif /* __ASM_SOC_OMAP555554XX_H */

arch/arm/mach-omap2/prm44xx.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ static struct prm_reset_src_map omap44xx_prm_reset_src_map[] = {
8181
/* Read a register in a CM/PRM instance in the PRM module */
8282
u32 omap4_prm_read_inst_reg(s16 inst, u16 reg)
8383
{
84-
return __raw_readl(OMAP44XX_PRM_REGADDR(inst, reg));
84+
return __raw_readl(prm_base + inst + reg);
8585
}
8686

8787
/* Write into a register in a CM/PRM instance in the PRM module */
8888
void omap4_prm_write_inst_reg(u32 val, s16 inst, u16 reg)
8989
{
90-
__raw_writel(val, OMAP44XX_PRM_REGADDR(inst, reg));
90+
__raw_writel(val, prm_base + inst + reg);
9191
}
9292

9393
/* 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 = {
650650

651651
int __init omap44xx_prm_init(void)
652652
{
653-
if (!cpu_is_omap44xx())
653+
if (!cpu_is_omap44xx() && !soc_is_omap54xx())
654654
return 0;
655655

656656
return prm_register(&omap44xx_prm_ll_data);

arch/arm/mach-omap2/soc.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,9 @@ IS_OMAP_TYPE(3430, 0x3430)
413413

414414
#define OMAP54XX_CLASS0x54000054
415415
#define OMAP5430_REV_ES1_0(OMAP54XX_CLASS | (0x30 << 16) | (0x10 << 8))
416+
#define OMAP5430_REV_ES2_0(OMAP54XX_CLASS | (0x30 << 16) | (0x20 << 8))
416417
#define OMAP5432_REV_ES1_0(OMAP54XX_CLASS | (0x32 << 16) | (0x10 << 8))
418+
#define OMAP5432_REV_ES2_0(OMAP54XX_CLASS | (0x32 << 16) | (0x20 << 8))
417419

418420
void omap2xxx_check_revision(void);
419421
void omap3xxx_check_revision(void);

arch/arm/mach-omap2/timer.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
#define OMAP2_MPU_SOURCE"sys_ck"
6363
#define OMAP3_MPU_SOURCEOMAP2_MPU_SOURCE
6464
#define OMAP4_MPU_SOURCE"sys_clkin_ck"
65+
#define OMAP5_MPU_SOURCE"sys_clkin"
6566
#define OMAP2_32K_SOURCE"func_32k_ck"
6667
#define OMAP3_32K_SOURCE"omap_32k_fck"
6768
#define OMAP4_32K_SOURCE"sys_32k_ck"
@@ -487,7 +488,7 @@ static void __init realtime_counter_init(void)
487488
pr_err("%s: ioremap failed\n", __func__);
488489
return;
489490
}
490-
sys_clk = clk_get(NULL, "sys_clkin_ck");
491+
sys_clk = clk_get(NULL, OMAP5_MPU_SOURCE);
491492
if (IS_ERR(sys_clk)) {
492493
pr_err("%s: failed to get system clock handle\n", __func__);
493494
iounmap(base);
@@ -616,7 +617,7 @@ void __init omap4_local_timer_init(void)
616617

617618
#ifdef CONFIG_SOC_OMAP5
618619
OMAP_SYS_32K_TIMER_INIT(5, 1, OMAP4_32K_SOURCE, "ti,timer-alwon",
619-
2, OMAP4_MPU_SOURCE);
620+
2, OMAP5_MPU_SOURCE);
620621
void __init omap5_realtime_timer_init(void)
621622
{
622623
int err;

0 commit comments

Comments
 (0)