Commit:     241651d04d672fb685b2874707016cbbf95931e5
Parent:     d15057b7034d9fdc4259b66a0367c9d8ffcf0620
Author:     David Woodhouse <[EMAIL PROTECTED]>
AuthorDate: Thu Sep 6 09:40:21 2007 +0100
Committer:  David Woodhouse <[EMAIL PROTECTED]>
CommitDate: Thu Sep 6 09:40:21 2007 +0100

    [MTD] Fix CFI build error when no map width or interleave supported
    When building NOR flash support, you have compile-time options for the
    bus width and the number of individual chips which are interleaved
    together onto that bus. The code to deal with arbitrary geometry is a
    bit convoluted, and people want to just configure it for the specific
    hardware they have, to avoid the runtime overhead.
    Selecting _none_ of the available options doesn't make any sense. You
    should have at least one. This makes it build though, since people
    persist in trying.
    Signed-off-by: David Woodhouse <[EMAIL PROTECTED]>
 include/linux/mtd/cfi.h |    9 +++++++++
 include/linux/mtd/map.h |   10 +++++++++-
 2 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/include/linux/mtd/cfi.h b/include/linux/mtd/cfi.h
index 123948b..e17c534 100644
--- a/include/linux/mtd/cfi.h
+++ b/include/linux/mtd/cfi.h
@@ -57,6 +57,15 @@
 #define cfi_interleave_is_8(cfi) (0)
+#ifndef cfi_interleave
+#warning No CONFIG_MTD_CFI_Ix selected. No NOR chip support can work.
+static inline int cfi_interleave(void *cfi)
+       BUG();
+       return 0;
 static inline int cfi_interleave_supported(int i)
        switch (i) {
diff --git a/include/linux/mtd/map.h b/include/linux/mtd/map.h
index 81f3a31..a9fae03 100644
--- a/include/linux/mtd/map.h
+++ b/include/linux/mtd/map.h
@@ -125,7 +125,15 @@
 #ifndef map_bankwidth
-#error "No bus width supported. What's the point?"
+#warning "No CONFIG_MTD_MAP_BANK_WIDTH_xx selected. No NOR chip support can 
+static inline int map_bankwidth(void *map)
+       BUG();
+       return 0;
+#define map_bankwidth_is_large(map) (0)
+#define map_words(map) (0)
 static inline int map_bankwidth_supported(int w)
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to