at91: remove MTD_NAND_ATMEL_BUSWIDTH_16 option
[firefly-linux-kernel-4.4.55.git] / arch / arm / mach-at91 / board-at572d940hf_ek.c
index 3929f1c9e4e5ce0fe10bb8ba64c02d4eae27aaed..096b99f4b1f336b8d10ab49c975201ffcee89c89 100644 (file)
@@ -41,6 +41,7 @@
 #include <mach/board.h>
 #include <mach/gpio.h>
 #include <mach/at91sam9_smc.h>
+#include <mach/system_rev.h>
 
 #include "sam9_smc.h"
 #include "generic.h"
@@ -216,11 +217,6 @@ static struct atmel_nand_data __initdata eb_nand_data = {
 /*     .rdy_pin        = AT91_PIN_PC16, */
        .enable_pin     = AT91_PIN_PA15,
        .partition_info = nand_partitions,
-#if defined(CONFIG_MTD_NAND_ATMEL_BUSWIDTH_16)
-       .bus_width_16   = 1,
-#else
-       .bus_width_16   = 0,
-#endif
 };
 
 static struct sam9_smc_config __initdata eb_nand_smc_config = {
@@ -243,6 +239,7 @@ static struct sam9_smc_config __initdata eb_nand_smc_config = {
 
 static void __init eb_add_device_nand(void)
 {
+       ek_nand_data.bus_width_16 = !board_have_nand_8bit();
        /* setup bus-width (8 or 16) */
        if (eb_nand_data.bus_width_16)
                eb_nand_smc_config.mode |= AT91_SMC_DBW_16;