Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 216897
b: refs/heads/master
c: b245f26
h: refs/heads/master
i:
  216895: 49c998f
v: v3
  • Loading branch information
Tony Lindgren committed Sep 27, 2010
1 parent d988b88 commit a6e63cb
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 24 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3a63833ec3002816a759a49ebda4e229c089114e
refs/heads/master: b245f26f5e45a6513a318835d83eea895d3ab54b
38 changes: 31 additions & 7 deletions trunk/arch/arm/mach-omap2/id.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,6 @@ static void __init omap4_check_revision(void)
u32 idcode;
u16 hawkeye;
u8 rev;
char *rev_name = "ES1.0";

/*
* The IC rev detection is done with hawkeye and rev.
Expand All @@ -309,14 +308,39 @@ static void __init omap4_check_revision(void)
hawkeye = (idcode >> 12) & 0xffff;
rev = (idcode >> 28) & 0xff;

if ((hawkeye == 0xb852) && (rev == 0x0)) {
omap_revision = OMAP4430_REV_ES1_0;
omap_chip.oc |= CHIP_IS_OMAP4430ES1;
pr_info("OMAP%04x %s\n", omap_rev() >> 16, rev_name);
return;
/*
* Few initial ES2.0 samples IDCODE is same as ES1.0
* Use ARM register to detect the correct ES version
*/
if (!rev) {
idcode = read_cpuid(CPUID_ID);
rev = (idcode & 0xf) - 1;
}

switch (hawkeye) {
case 0xb852:
switch (rev) {
case 0:
omap_revision = OMAP4430_REV_ES1_0;
omap_chip.oc |= CHIP_IS_OMAP4430ES1;
break;
case 1:
omap_revision = OMAP4430_REV_ES2_0;
omap_chip.oc |= CHIP_IS_OMAP4430ES2;
break;
default:
omap_revision = OMAP4430_REV_ES2_0;
omap_chip.oc |= CHIP_IS_OMAP4430ES2;
}
break;
default:
/* Unknown default to latest silicon rev as default*/
omap_revision = OMAP4430_REV_ES2_0;
omap_chip.oc |= CHIP_IS_OMAP4430ES2;
}

pr_err("Unknown OMAP4 CPU id\n");
pr_info("OMAP%04x ES%d.0\n",
omap_rev() >> 16, ((omap_rev() >> 12) & 0xf) + 1);
}

#define OMAP3_SHOW_FEATURE(feat) \
Expand Down
10 changes: 7 additions & 3 deletions trunk/arch/arm/mach-omap2/omap4-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,14 @@ static int __init omap_l2_cache_init(void)
omap_smc1(0x102, 0x1);

/*
* 32KB way size, 16-way associativity,
* parity disabled
* 16-way associativity, parity disabled
* Way size - 32KB (es1.0)
* Way size - 64KB (es2.0 +)
*/
l2x0_init(l2cache_base, 0x0e050000, 0xc0000fff);
if (omap_rev() == OMAP4430_REV_ES1_0)
l2x0_init(l2cache_base, 0x0e050000, 0xc0000fff);
else
l2x0_init(l2cache_base, 0x0e070000, 0xc0000fff);

return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/plat-omap/dmtimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ int omap_dm_timer_set_source(struct omap_dm_timer *timer, int source)
* When the functional clock disappears, too quick writes seem
* to cause an abort. XXX Is this still necessary?
*/
__delay(150000);
__delay(300000);

return ret;
}
Expand Down
5 changes: 4 additions & 1 deletion trunk/arch/arm/plat-omap/include/plat/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ IS_OMAP_TYPE(3517, 0x3517)

#define OMAP443X_CLASS 0x44300044
#define OMAP4430_REV_ES1_0 0x44300044
#define OMAP4430_REV_ES2_0 0x44301044

/*
* omap_chip bits
Expand All @@ -417,10 +418,12 @@ IS_OMAP_TYPE(3517, 0x3517)
#define CHIP_IS_OMAP4430ES1 (1 << 8)
#define CHIP_IS_OMAP3630ES1_1 (1 << 9)
#define CHIP_IS_OMAP3630ES1_2 (1 << 10)
#define CHIP_IS_OMAP4430ES2 (1 << 11)

#define CHIP_IS_OMAP24XX (CHIP_IS_OMAP2420 | CHIP_IS_OMAP2430)

#define CHIP_IS_OMAP4430 (CHIP_IS_OMAP4430ES1)
#define CHIP_IS_OMAP4430 (CHIP_IS_OMAP4430ES1 | \
CHIP_IS_OMAP4430ES2)

/*
* "GE" here represents "greater than or equal to" in terms of ES
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/plat-omap/include/plat/uncompress.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ static inline void __arch_decomp_setup(unsigned long arch_id)

/* omap4 based boards using UART3 */
DEBUG_LL_OMAP4(3, omap_4430sdp);
DEBUG_LL_OMAP4(3, omap4_panda);

/* zoom2/3 external uart */
DEBUG_LL_ZOOM(omap_zoom2);
Expand Down
13 changes: 2 additions & 11 deletions trunk/arch/arm/plat-omap/sram.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
#define OMAP4_SRAM_PUB_PA (OMAP4_SRAM_PA + 0x4000)
#define OMAP4_SRAM_PUB_VA (OMAP4_SRAM_VA + 0x4000)

#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3)
#if defined(CONFIG_ARCH_OMAP2PLUS)
#define SRAM_BOOTLOADER_SZ 0x00
#else
#define SRAM_BOOTLOADER_SZ 0x80
Expand Down Expand Up @@ -93,16 +93,7 @@ extern unsigned long omapfb_reserve_sram(unsigned long sram_pstart,
*/
static int is_sram_locked(void)
{
int type = 0;

if (cpu_is_omap44xx())
/* Not yet supported */
return 0;

if (cpu_is_omap242x())
type = omap_rev() & OMAP2_DEVICETYPE_MASK;

if (type == GP_DEVICE) {
if (OMAP2_DEVICE_TYPE_GP == omap_type()) {
/* RAMFW: R/W access to all initiators for all qualifier sets */
if (cpu_is_omap242x()) {
__raw_writel(0xFF, OMAP24XX_VA_REQINFOPERM0); /* all q-vects */
Expand Down

0 comments on commit a6e63cb

Please sign in to comment.