aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Mack <zonque@gmail.com>2012-12-14 05:36:43 -0500
committerTony Lindgren <tony@atomide.com>2013-01-15 17:50:15 -0500
commitf50a0380897d2a5e61b251b07c50ee48fa298cfd (patch)
treee6938333762ab86edd28f3b41ab8804a32a67d03
parent504f3c6d73650d2afeabb86e29bfeb465f2b15df (diff)
ARM: OMAP: gpmc: enable hwecc for AM33xx SoCs
The am33xx is capable of handling bch error correction modes, so enable that feature in the driver. Signed-off-by: Daniel Mack <zonque@gmail.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r--arch/arm/mach-omap2/gpmc-nand.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/arm/mach-omap2/gpmc-nand.c b/arch/arm/mach-omap2/gpmc-nand.c
index 3059f5e8ee85..afc1e8c32d6c 100644
--- a/arch/arm/mach-omap2/gpmc-nand.c
+++ b/arch/arm/mach-omap2/gpmc-nand.c
@@ -92,17 +92,18 @@ static int omap2_nand_gpmc_retime(
92static bool gpmc_hwecc_bch_capable(enum omap_ecc ecc_opt) 92static bool gpmc_hwecc_bch_capable(enum omap_ecc ecc_opt)
93{ 93{
94 /* support only OMAP3 class */ 94 /* support only OMAP3 class */
95 if (!cpu_is_omap34xx()) { 95 if (!cpu_is_omap34xx() && !soc_is_am33xx()) {
96 pr_err("BCH ecc is not supported on this CPU\n"); 96 pr_err("BCH ecc is not supported on this CPU\n");
97 return 0; 97 return 0;
98 } 98 }
99 99
100 /* 100 /*
101 * For now, assume 4-bit mode is only supported on OMAP3630 ES1.x, x>=1. 101 * For now, assume 4-bit mode is only supported on OMAP3630 ES1.x, x>=1
102 * Other chips may be added if confirmed to work. 102 * and AM33xx derivates. Other chips may be added if confirmed to work.
103 */ 103 */
104 if ((ecc_opt == OMAP_ECC_BCH4_CODE_HW) && 104 if ((ecc_opt == OMAP_ECC_BCH4_CODE_HW) &&
105 (!cpu_is_omap3630() || (GET_OMAP_REVISION() == 0))) { 105 (!cpu_is_omap3630() || (GET_OMAP_REVISION() == 0)) &&
106 (!soc_is_am33xx())) {
106 pr_err("BCH 4-bit mode is not supported on this CPU\n"); 107 pr_err("BCH 4-bit mode is not supported on this CPU\n");
107 return 0; 108 return 0;
108 } 109 }