Skip to contentSkip to conversation

Compiling at91sam9g45 fails with NAND driver enabled

PATCH In review Juergen Beisert 2 participants 2 messages Jan 19, 2011 – Jan 20, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Compiling at91sam9g45 fails with NAND driver enabled

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)

arch/arm/mach-at91/at91sam9g45_devices.c +3 -0
index ddb005a..cb88208 100644
@@ -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
 
 #include "generic.h"
 
Signature · 9 lines
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | Phone: +49-8766-939 228     |
Vertretung Sued/Muenchen, Germany             | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686              | http://www.pengutronix.de/  |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#1 lore raw

Hi Jürgen,

Quoted 12 lines · Juergen Beisert

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)

arch/arm/mach-at91/at91sam9g45_devices.c +0 -0
index ddb005a..cb88208 100644

arch/arm/mach-at91/at91sam9g45_devices.c line 22

Quoted 6 lines
arch/arm/mach-at91/at91sam9g45_devices.c +3 -0
@@ -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

Signature · 9 lines
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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox