Few more omap patches for the 2.6.36 merge window
Subsystems (3)
Tony Lindgren
maintainercover Few more omap patches for the 2.6.36 merge window
Hi all,
Here are few more small patches from the linux-omap list that have not yet been posted to linux-arm-kernel list for review.
Regards,
Tony
---
Anand Gadiyar (2):
OMAP3630: Add ES1.1 and ES1.2 detection
omap: 3630: disable TLL SAR on 3630 ES1Artem Bityutskiy (1):
omap: device: improve errors handling
arch/arm/mach-omap2/id.c | 28 +++++++++++++++++++++++++--- arch/arm/mach-omap2/powerdomains34xx.h | 12 ++++++++++-- arch/arm/plat-omap/include/plat/cpu.h | 15 +++++++++++---- arch/arm/plat-omap/omap_device.c | 4 +++- 4 files changed, 49 insertions(+), 10 deletions(-)
Signature · 1 line
Signature
Tony Lindgren
maintainerPATCH 1/3 omap: device: improve errors handling
From: Artem Bityutskiy <[email protected]>
Do not forget to check the 'platform_device_add_data()' error code in 'omap_device_build_ss()'.
--- arch/arm/plat-omap/omap_device.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
arch/arm/plat-omap/omap_device.c +3 -1
@@ -407,7 +407,9 @@ struct omap_device *omap_device_build_ss(const char *pdev_name, int pdev_id, od->pdev.num_resources = res_count; od->pdev.resource = res; -platform_device_add_data (&od->pdev, pdata, pdata_len); + ret =platform_device_add_data (&od->pdev, pdata, pdata_len); +if (ret) + goto odbs_exit4; od->pm_lats = pm_lats; od->pm_lats_cnt = pm_lats_cnt;
Tony Lindgren
maintainerPATCH 2/3 OMAP3630: Add ES1.1 and ES1.2 detection
In reply to Tony LindgrenFrom: Anand Gadiyar <[email protected]>
Add revision detection for ES1.1 and ES1.2. Set default revision as ES1.2.
Add CHIP_GE_OMAP3630ES1_1 to detect revisions 1.1 and later. This is needed for at least one feature that is broken in 3630ES1.0 but exists on older (3430 ES3.1) and newer revisions.
Additionally, update some of the CHIP_GE_* macros to use other macros for ease of maintenance.
--- arch/arm/mach-omap2/id.c | 28 +++++++++++++++++++++++++--- arch/arm/plat-omap/include/plat/cpu.h | 15 +++++++++++---- 2 files changed, 36 insertions(+), 7 deletions(-)
arch/arm/mach-omap2/id.c +25 -3
@@ -269,11 +269,27 @@ static void __init omap3_check_revision(void) omap_chip.oc |=CHIP_IS_OMAP3430ES3_1 ;break ;case 0xb891 : -/* FALLTHROUGH */ +/* Handle 36xx devices */ + omap_chip.oc |=CHIP_IS_OMAP3630ES1 ; + +switch (rev) { +case 0 :/* Take care of early samples */ + omap_revision =OMAP3630_REV_ES1_0 ; +break ; +case 1 : + omap_revision =OMAP3630_REV_ES1_1 ; + omap_chip.oc |=CHIP_IS_OMAP3630ES1_1 ; +break ; +case 2 : +default : + omap_revision =OMAP3630_REV_ES1_2 ; + omap_chip.oc |=CHIP_IS_OMAP3630ES1_2 ; +break ; + }default :/* Unknown default to latest silicon rev as default*/ - omap_revision =OMAP3630_REV_ES1_0 ; - omap_chip.oc |=CHIP_IS_OMAP3630ES1 ; + omap_revision =OMAP3630_REV_ES1_2 ; + omap_chip.oc |=CHIP_IS_OMAP3630ES1_2 ; } }
@@ -349,6 +365,12 @@ static void __init omap3_cpuinfo(void)case OMAP_REVBITS_00 :strcpy (cpu_rev,"1.0" );break ; +case OMAP_REVBITS_01 : +strcpy (cpu_rev,"1.1" ); +break ; +case OMAP_REVBITS_02 : +strcpy (cpu_rev,"1.2" ); +break ;case OMAP_REVBITS_10 :strcpy (cpu_rev,"2.0" );break ;
arch/arm/plat-omap/include/plat/cpu.h +11 -4
@@ -66,6 +66,8 @@ unsigned int omap_rev(void);* family. This difference can be handled separately. */ #define OMAP_REVBITS_00 0x00 +#define OMAP_REVBITS_01 0x01 +#define OMAP_REVBITS_02 0x02#define OMAP_REVBITS_10 0x10#define OMAP_REVBITS_20 0x20#define OMAP_REVBITS_30 0x30
@@ -376,6 +378,8 @@ IS_OMAP_TYPE(3517, 0x3517)#define OMAP3430_REV_ES3_1_2 0x34305034#define OMAP3630_REV_ES1_0 0x36300034 +#define OMAP3630_REV_ES1_1 0x36300134 +#define OMAP3630_REV_ES1_2 0x36300234#define OMAP35XX_CLASS 0x35000034#define OMAP3503_REV (v) (OMAP35XX_CLASS | (0x3503 << 16) | (v << 8))
@@ -411,6 +415,8 @@ IS_OMAP_TYPE(3517, 0x3517)#define CHIP_IS_OMAP3430ES3_1 (1 << 6)#define CHIP_IS_OMAP3630ES1 (1 << 7)#define CHIP_IS_OMAP4430ES1 (1 << 8) +#define CHIP_IS_OMAP3630ES1_1 (1 << 9) +#define CHIP_IS_OMAP3630ES1_2 (1 << 10)#define CHIP_IS_OMAP24XX (CHIP_IS_OMAP2420 | CHIP_IS_OMAP2430)
@@ -424,11 +430,12 @@ IS_OMAP_TYPE(3517, 0x3517)*/ #define CHIP_GE_OMAP3430ES2 (CHIP_IS_OMAP3430ES2 | \ CHIP_IS_OMAP3430ES3_0 | \ - CHIP_IS_OMAP3430ES3_1 | \ - CHIP_IS_OMAP3630ES1) + CHIP_GE_OMAP3430ES3_1)#define CHIP_GE_OMAP3430ES3_1 (CHIP_IS_OMAP3430ES3_1 | \ - CHIP_IS_OMAP3630ES1) - + CHIP_IS_OMAP3630ES1 | \ + CHIP_GE_OMAP3630ES1_1) +#define CHIP_GE_OMAP3630ES1_1 (CHIP_IS_OMAP3630ES1_1 | \ + CHIP_IS_OMAP3630ES1_2)int omap_chip_is (struct omap_chip_id oci);void omap2_check_revision (void );
PATCH 2/3 OMAP3630: Add ES1.1 and ES1.2 detection
Tony Lindgren had written, on 08/04/2010 06:33 AM, the following:
Quoted 38 lines
From: Anand Gadiyar <[email protected]>
Add revision detection for ES1.1 and ES1.2. Set default revision as ES1.2.
Add
CHIP_GE_OMAP3630ES1_1to detect revisions 1.1 and later. This is needed for at least one feature that is broken in 3630ES1.0 but exists on older (3430 ES3.1) and newer revisions.Additionally, update some of the CHIP_GE_* macros to use other macros for ease of maintenance.
Signed-off-by Anand Gadiyar <[email protected]>Cc Nishanth Menon <[email protected]>Cc Manjunatha GK <[email protected]>[tony at atomide.com: update to remove fallthrough handling]Signed-off-by Tony Lindgren <[email protected]>--- arch/arm/mach-omap2/id.c | 28 +++++++++++++++++++++++++--- arch/arm/plat-omap/include/plat/cpu.h | 15 +++++++++++---- 2 files changed, 36 insertions(+), 7 deletions(-)arch/arm/mach-omap2/id.c +7
-1@@ -269,11 +269,27 @@ static void __init omap3_check_revision(void) omap_chip.oc |=CHIP_IS_OMAP3430ES3_1 ;break ;case 0xb891 : -/* FALLTHROUGH */ +/* Handle 36xx devices */ + omap_chip.oc |=CHIP_IS_OMAP3630ES1 ; + +switch (rev) { +case 0 :/* Take care of early samples */ + omap_revision =OMAP3630_REV_ES1_0 ; +break ;
arch/arm/mach-omap2/id.c static void __init omap3_check_revision(void) · line 288
Quoted 10 lines
arch/arm/mach-omap2/id.c +10
-0+case 1 : + omap_revision =OMAP3630_REV_ES1_1 ; + omap_chip.oc |=CHIP_IS_OMAP3630ES1_1 ; +break ; +case 2 : +default : + omap_revision =OMAP3630_REV_ES1_2 ; + omap_chip.oc |=CHIP_IS_OMAP3630ES1_2 ; +break ; + }
we need to add a break here. to jump out of the main switch statement. currently with ES1.0 3630, it reports as 3630 ES1.2
Tested and verified on SDP3630 with OMAP3630 ES1.0
Quoted 71 lines
arch/arm/mach-omap2/id.c +8
-2default :/* Unknown default to latest silicon rev as default*/ - omap_revision =OMAP3630_REV_ES1_0 ; - omap_chip.oc |=CHIP_IS_OMAP3630ES1 ; + omap_revision =OMAP3630_REV_ES1_2 ; + omap_chip.oc |=CHIP_IS_OMAP3630ES1_2 ; } }@@ -349,6 +365,12 @@ static void __init omap3_cpuinfo(void)case OMAP_REVBITS_00 :strcpy (cpu_rev,"1.0" );break ; +case OMAP_REVBITS_01 : +strcpy (cpu_rev,"1.1" ); +break ; +case OMAP_REVBITS_02 : +strcpy (cpu_rev,"1.2" ); +break ;case OMAP_REVBITS_10 :strcpy (cpu_rev,"2.0" );break ;arch/arm/plat-omap/include/plat/cpu.h +11
-4@@ -66,6 +66,8 @@ unsigned int omap_rev(void);* family. This difference can be handled separately. */ #define OMAP_REVBITS_00 0x00 +#define OMAP_REVBITS_01 0x01 +#define OMAP_REVBITS_02 0x02#define OMAP_REVBITS_10 0x10#define OMAP_REVBITS_20 0x20#define OMAP_REVBITS_30 0x30@@ -376,6 +378,8 @@ IS_OMAP_TYPE(3517, 0x3517)#define OMAP3430_REV_ES3_1_2 0x34305034#define OMAP3630_REV_ES1_0 0x36300034 +#define OMAP3630_REV_ES1_1 0x36300134 +#define OMAP3630_REV_ES1_2 0x36300234#define OMAP35XX_CLASS 0x35000034#define OMAP3503_REV (v) (OMAP35XX_CLASS | (0x3503 << 16) | (v << 8))@@ -411,6 +415,8 @@ IS_OMAP_TYPE(3517, 0x3517)#define CHIP_IS_OMAP3430ES3_1 (1 << 6)#define CHIP_IS_OMAP3630ES1 (1 << 7)#define CHIP_IS_OMAP4430ES1 (1 << 8) +#define CHIP_IS_OMAP3630ES1_1 (1 << 9) +#define CHIP_IS_OMAP3630ES1_2 (1 << 10)#define CHIP_IS_OMAP24XX (CHIP_IS_OMAP2420 | CHIP_IS_OMAP2430)@@ -424,11 +430,12 @@ IS_OMAP_TYPE(3517, 0x3517)*/ #define CHIP_GE_OMAP3430ES2 (CHIP_IS_OMAP3430ES2 | \ CHIP_IS_OMAP3430ES3_0 | \ - CHIP_IS_OMAP3430ES3_1 | \ - CHIP_IS_OMAP3630ES1) + CHIP_GE_OMAP3430ES3_1)#define CHIP_GE_OMAP3430ES3_1 (CHIP_IS_OMAP3430ES3_1 | \ - CHIP_IS_OMAP3630ES1) - + CHIP_IS_OMAP3630ES1 | \ + CHIP_GE_OMAP3630ES1_1) +#define CHIP_GE_OMAP3630ES1_1 (CHIP_IS_OMAP3630ES1_1 | \ + CHIP_IS_OMAP3630ES1_2)int omap_chip_is (struct omap_chip_id oci);void omap2_check_revision (void );
Signature · 2 lines
Regards, Nishanth Menon
Tony Lindgren
maintainerPATCH 2/3 OMAP3630: Add ES1.1 and ES1.2 detection
Quoted 10 lines · Nishanth Menon
Tony Lindgren had written, on 08/04/2010 06:33 AM, the following:
arch/arm/mach-omap2/id.c static void __init omap3_check_revision(void) · line 288
Quoted 6 lines
From: Anand Gadiyar <[email protected]>
arch/arm/mach-omap2/id.c +5
-0+default : + omap_revision =OMAP3630_REV_ES1_2 ; + omap_chip.oc |=CHIP_IS_OMAP3630ES1_2 ; +break ; + }we need to add a break here. to jump out of the main switch statement. currently with ES1.0 3630, it reports as 3630 ES1.2
Argh.. It's merged already, care to do another patch to fix this?
Quoted 1 line
Tested and verified on SDP3630 with OMAP3630 ES1.0
OK, thanks.
Tony
Tony Lindgren
maintainerPATCH 3/3 omap: 3630: disable TLL SAR on 3630 ES1
In reply to Tony LindgrenFrom: Anand Gadiyar <[email protected]>
USBTLL Save-and-Restore is broken in 3630 ES1.0. Having it enabled could result in incorrect register restores as the OMAP exits off-mode. This could potentially result in unexpected wakeup events.
(Refer 3630 errata ID i579)
This is fixed in ES1.1. So disable it for ES1.0s.
--- arch/arm/mach-omap2/powerdomains34xx.h | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/powerdomains34xx.h +10 -2
@@ -75,12 +75,19 @@ static struct powerdomain mpu_3xxx_pwrdm = { }, }; +/* +* The USBTLL Save-and-Restore mechanism is broken on +* 3430s upto ES3.0 and 3630ES1.0. Hence this feature +* needs to be disabled on these chips. +* Refer: 3430 errata ID i459 and 3630 errata ID i579 +*/ static struct powerdomain core_3xxx_pre_es3_1_pwrdm = { .name ="core_pwrdm" , .prcm_offs =CORE_MOD , .omap_chip =OMAP_CHIP_INIT (CHIP_IS_OMAP3430ES1 |CHIP_IS_OMAP3430ES2 | -CHIP_IS_OMAP3430ES3_0 ), +CHIP_IS_OMAP3430ES3_0 | +CHIP_IS_OMAP3630ES1 ), .pwrsts =PWRSTS_OFF_RET_ON , .pwrsts_logic_ret =PWRSTS_OFF_RET , .banks =2 ,
@@ -97,7 +104,8 @@ static struct powerdomain core_3xxx_pre_es3_1_pwrdm = {static struct powerdomain core_3xxx_es3_1_pwrdm = { .name ="core_pwrdm" , .prcm_offs =CORE_MOD , - .omap_chip =OMAP_CHIP_INIT (CHIP_GE_OMAP3430ES3_1 ), + .omap_chip =OMAP_CHIP_INIT (CHIP_IS_OMAP3430ES3_1 | +CHIP_GE_OMAP3630ES1_1 ), .pwrsts =PWRSTS_OFF_RET_ON , .pwrsts_logic_ret =PWRSTS_OFF_RET , .flags =PWRDM_HAS_HDWR_SAR ,/* for USBTLL only */