[PATCH] NOR flash: reduce size of cfiword_t if not using 64-bit bus.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Krzysztof Hałasa <khc@xxxxxxxxx>

diff --git a/drivers/nor/cfi_flash.h b/drivers/nor/cfi_flash.h
index df482b6..fec0894 100644
--- a/drivers/nor/cfi_flash.h
+++ b/drivers/nor/cfi_flash.h
@@ -30,7 +30,17 @@
 #include <linux/mtd/mtd.h>
 
 typedef unsigned long flash_sect_t;
+
+#if   defined(CONFIG_DRIVER_CFI_BANK_WIDTH_8)
 typedef u64 cfiword_t;
+#elif defined(CONFIG_DRIVER_CFI_BANK_WIDTH_4)
+typedef u32 cfiword_t;
+#elif defined(CONFIG_DRIVER_CFI_BANK_WIDTH_2)
+typedef u16 cfiword_t;
+#else
+typedef u8 cfiword_t;
+#endif
+
 struct cfi_cmd_set;
 
 /*-----------------------------------------------------------------------

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux