On Tue, Jan 27, 2015 at 02:14:19PM +0100, Stefan Christ wrote: > The parameters ECC Strength, BadBlockMarkerByte and BadBlockMarkerStartBit in > the FCB structure depends on the nand chip's pagesize and oobsize. Instead of > hardcoding these values into the imx6 bbu handler calculate these values on the > fly. Therefore we export the necessary functions from the nand_mxs driver to > use them in the bbu handler. > > Signed-off-by: Stefan Christ <s.christ@xxxxxxxxx> > --- > arch/arm/mach-imx/Kconfig | 1 + > arch/arm/mach-imx/imx6-bbu-nand.c | 28 +++++------------------ > arch/arm/mach-imx/include/mach/nand_mxs.h | 37 +++++++++++++++++++++++++++++++ > drivers/mtd/nand/nand_mxs.c | 7 +++--- > 4 files changed, 48 insertions(+), 25 deletions(-) > create mode 100644 arch/arm/mach-imx/include/mach/nand_mxs.h > > diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig > index 9ac36e1..42074a2 100644 > --- a/arch/arm/mach-imx/Kconfig > +++ b/arch/arm/mach-imx/Kconfig > @@ -119,6 +119,7 @@ config BAREBOX_UPDATE_IMX6_NAND > depends on BAREBOX_UPDATE > depends on MTD > depends on MTD_WRITE > + select NAND_MXS Please use depends here instead of select. Selecting stuff which has other dependencies often leads to trouble. > diff --git a/drivers/mtd/nand/nand_mxs.c b/drivers/mtd/nand/nand_mxs.c > index 94101a3..4c5bdfa 100644 > --- a/drivers/mtd/nand/nand_mxs.c > +++ b/drivers/mtd/nand/nand_mxs.c > @@ -34,6 +34,7 @@ > #include <stmp-device.h> > #include <asm/mmu.h> > #include <mach/generic.h> > +#include <mach/nand_mxs.h> This breaks compilation on MXS which does not have this file. Choose a location under include/ Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox