Skip to content

Commit f50a038

Browse files
zonquetmlind
authored andcommitted
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 <[email protected]> Acked-by: Grant Likely <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
1 parent 504f3c6 commit f50a038

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

arch/arm/mach-omap2/gpmc-nand.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,17 +92,18 @@ static int omap2_nand_gpmc_retime(
9292
static bool gpmc_hwecc_bch_capable(enum omap_ecc ecc_opt)
9393
{
9494
/* support only OMAP3 class */
95-
if (!cpu_is_omap34xx()) {
95+
if (!cpu_is_omap34xx() && !soc_is_am33xx()) {
9696
pr_err("BCH ecc is not supported on this CPU\n");
9797
return 0;
9898
}
9999

100100
/*
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.
101+
* For now, assume 4-bit mode is only supported on OMAP3630 ES1.x, x>=1
102+
* and AM33xx derivates. Other chips may be added if confirmed to work.
103103
*/
104104
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())) {
106107
pr_err("BCH 4-bit mode is not supported on this CPU\n");
107108
return 0;
108109
}

0 commit comments

Comments
 (0)