[PATCH] Compiling at91sam9g45 fails with NAND driver enabled

Sascha Hauer s.hauer at pengutronix.de
Thu Jan 20 03:31:02 EST 2011


Hi Jürgen,

On Wed, Jan 19, 2011 at 01:27:23PM +0100, Juergen Beisert wrote:
> Enabling the AT91 NAND driver fails with the following error:
> 
> arch/arm/mach-at91/at91sam9g45_devices.c: In function 'at91_add_device_nand':
> arch/arm/mach-at91/at91sam9g45_devices.c:101: error: 'NAND_ECC_HW' undeclared (first use in this function)
> 
> Signed-off-by: Juergen Beisert <jbe at pengutronix.de>
> 
> diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
> index ddb005a..cb88208 100644
> --- a/arch/arm/mach-at91/at91sam9g45_devices.c
> +++ b/arch/arm/mach-at91/at91sam9g45_devices.c
> @@ -17,6 +17,9 @@
>  #include <mach/board.h>
>  #include <mach/gpio.h>
>  #include <mach/io.h>
> +#if defined(CONFIG_NAND_ATMEL)
> +#include <linux/mtd/nand.h>
> +#endif

Please do not ifdef includes. Including it unconditionally is perfectly
fine.

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 |



More information about the barebox mailing list