mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] NOR flash: reduce size of cfiword_t if not using 64-bit bus.
@ 2012-05-05 21:35 Krzysztof Halasa
  2012-05-11 18:40 ` Sascha Hauer
  2012-05-13  9:03 ` Sascha Hauer
  0 siblings, 2 replies; 4+ messages in thread
From: Krzysztof Halasa @ 2012-05-05 21:35 UTC (permalink / raw)
  To: barebox

Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>

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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-05-13  9:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-05 21:35 [PATCH] NOR flash: reduce size of cfiword_t if not using 64-bit bus Krzysztof Halasa
2012-05-11 18:40 ` Sascha Hauer
2012-05-12 19:09   ` Krzysztof Halasa
2012-05-13  9:03 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox