]> git.hungrycats.org Git - linux/commitdiff
Restore physmap configure-time settings according to user requests.
authorJosh Boyer <jwboyer@infradead.org>
Tue, 10 Aug 2004 17:13:52 +0000 (18:13 +0100)
committerDavid Woodhouse <dwmw2@shinybook.infradead.org>
Tue, 10 Aug 2004 17:13:52 +0000 (18:13 +0100)
Patch from Jun Sun.

Signed-Off-By: David Woodhouse <dwmw2@infradead.org>
drivers/mtd/maps/Kconfig
drivers/mtd/maps/physmap.c
include/linux/mtd/physmap.h

index b1ad6567b73547dd546ad4434618fcf8233a7cf3..cdc5bbd166a314ecd927946d7e5b5a60d6efa187 100644 (file)
@@ -1,5 +1,5 @@
 # drivers/mtd/maps/Kconfig
-# $Id: Kconfig,v 1.29 2004/07/15 15:29:17 dwmw2 Exp $
+# $Id: Kconfig,v 1.30 2004/07/21 00:16:14 jwboyer Exp $
 
 menu "Mapping drivers for chip access"
        depends on MTD!=n
@@ -19,7 +19,8 @@ config MTD_PHYSMAP
          command set driver code to communicate with flash chips which
          are mapped physically into the CPU's memory. You will need to
          configure the physical address and size of the flash chips on
-         your particular board as well as the bus width.
+         your particular board as well as the bus width, either statically
+         with config options or at run-time.
 
 config MTD_PHYSMAP_START
        hex "Physical start address of flash mapping"
@@ -30,6 +31,8 @@ config MTD_PHYSMAP_START
          are mapped on your particular target board. Refer to the
          memory map which should hopefully be in the documentation for
          your board.
+         Ignore this option if you use run-time physmap configuration
+         (i.e., run-time calling physmap_configure()).
 
 config MTD_PHYSMAP_LEN
        hex "Physical length of flash mapping"
@@ -42,9 +45,11 @@ config MTD_PHYSMAP_LEN
          than the total amount of flash present. Refer to the memory
          map which should hopefully be in the documentation for your
          board.
+         Ignore this option if you use run-time physmap configuration
+         (i.e., run-time calling physmap_configure()).
 
-config MTD_PHYSMAP_BUSWIDTH
-       int "Bus width in octets"
+config MTD_PHYSMAP_BANKWIDTH
+       int "Bank width in octets"
        depends on MTD_PHYSMAP
        default "2"
        help
@@ -52,6 +57,8 @@ config MTD_PHYSMAP_BUSWIDTH
          in octets. For example, if you have a data bus width of 32
          bits, you would set the bus width octect value to 4. This is
          used internally by the CFI drivers.
+         Ignore this option if you use run-time physmap configuration
+         (i.e., run-time calling physmap_configure()).
 
 config MTD_SUN_UFLASH
        tristate "Sun Microsystems userflash support"
index 8dfd0b233616fbd549e8a9561085670b4e077427..5822ba99c195847622f296938a2d8d81cc8ccc47 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: physmap.c,v 1.33 2004/07/12 14:37:24 dwmw2 Exp $
+ * $Id: physmap.c,v 1.34 2004/07/21 00:16:14 jwboyer Exp $
  *
  * Normal mappings of chips in physical memory
  *
 
 static struct mtd_info *mymtd;
 
-struct map_info physmap_map = {.name = "phys_mapped_flash"};
+struct map_info physmap_map = {
+       .name = "phys_mapped_flash",
+       .phys = CONFIG_MTD_PHYSMAP_START,
+       .size = CONFIG_MTD_PHYSMAP_LEN,
+       .bankwidth = CONFIG_MTD_PHYSMAP_BANKWIDTH,
+};
 
 #ifdef CONFIG_MTD_PARTITIONS
 static struct mtd_partition *mtd_parts;
index d522d43d410d1112364228eeb6f0ad2a42c61bec..05aa4970677f6aaeab52b68191f09ebef98abe2d 100644 (file)
@@ -2,7 +2,7 @@
  * For boards with physically mapped flash and using 
  * drivers/mtd/maps/physmap.c mapping driver.
  *
- * $Id: physmap.h,v 1.2 2004/07/14 17:48:46 dwmw2 Exp $
+ * $Id: physmap.h,v 1.3 2004/07/21 00:16:15 jwboyer Exp $
  *
  * Copyright (C) 2003 MontaVista Software Inc.
  * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net
@@ -33,11 +33,11 @@ extern struct map_info physmap_map;
 /*
  * Board needs to specify the exact mapping during their setup time.
  */
-static inline void physmap_configure(unsigned long addr, unsigned long size, int buswidth, void (*set_vpp)(struct map_info *, int) )
+static inline void physmap_configure(unsigned long addr, unsigned long size, int bankwidth, void (*set_vpp)(struct map_info *, int) )
 {
        physmap_map.phys = addr;
        physmap_map.size = size;
-       physmap_map.buswidth = buswidth;
+       physmap_map.bankwidth = bankwidth;
        physmap_map.set_vpp = set_vpp;
 }