summaryrefslogtreecommitdiff
path: root/arch/arm/plat-stmp3xxx
diff options
context:
space:
mode:
authorPatrick Turley <patrick.turley@freescale.com>2009-10-28 14:42:59 -0500
committerPatrick Turley <patrick.turley@freescale.com>2009-11-03 21:04:39 -0600
commitcc3f64d11db1d86bc0abdb4b782c05f8d8acdd0c (patch)
treef96b0b5a2a75cb8d4747c70907ee1219f3a8e076 /arch/arm/plat-stmp3xxx
parent61cf4a2aa2821f915d6e48e414ac9f527667acc1 (diff)
ENGR00116542 [MX233_BSP] Simplify the GPMI NAND Flash driver's partitioning
Simplified the partitioning mechanism and, as a side effect, made the GPMI NAND Flash driver usable (it was always crashing the kernel). Signed-off-by: Patrick Turley <patrick.turley@freescale.com>
Diffstat (limited to 'arch/arm/plat-stmp3xxx')
-rw-r--r--arch/arm/plat-stmp3xxx/include/mach/gpmi.h75
1 files changed, 40 insertions, 35 deletions
diff --git a/arch/arm/plat-stmp3xxx/include/mach/gpmi.h b/arch/arm/plat-stmp3xxx/include/mach/gpmi.h
index 24d2a6ca64c7..c0cb85c13b82 100644
--- a/arch/arm/plat-stmp3xxx/include/mach/gpmi.h
+++ b/arch/arm/plat-stmp3xxx/include/mach/gpmi.h
@@ -12,51 +12,56 @@ extern void gpmi_pinmux_free(char *);
/**
* struct gpmi_platform_data - GPMI driver platform data.
*
- * This structure communicates information to the GPMI driver that can't be
- * expressed as resources.
+ * This structure communicates platform-specific information to the GPMI driver
+ * that can't be expressed as resources.
*
- * @io_uA: The current limit, in uA.
- * @uid_offset: The offset into the physical medium of the "Unique ID"
- * area.
- * @uid_size: The size of the "Unique ID" area.
- * @concat_name: The name of an MTD the driver will create by
- * concatenating all the chip partitions named by the
- * concat_parts field.
- * @concat_parts: A list of chip partition names that will be concatenated
- * into a single MTD. The partitions are described in the
- * array at the end of this structure.
- * @chip_count: The number of physical chips for which partitioning
- * information is provided.
- * @chip_parts: An array indexed by physical chip number that contains
- * descriptions of partitions to be applied to the
- * corresponding chip.
- * @part_probe_types: A pointer to a list of strings that identify possible
- * sources of partitioning information. As it happens, only
- * the information appearing in element zero is used.
- * @nr_partitions: The number of partitions to apply to the current chip.
- * @partitions: A pointer to an array of partition descriptions for the
- * current chip.
+ * @io_uA: The current limit, in uA.
+ * @pinmux_handler: A pointer to a function the driver will call to
+ * request or release the pins it needs. Pass true
+ * to request pins, and false to release them.
+ * @boot_area_size_in_bytes: The amount of space reserved for use by the boot
+ * ROM on the first and second chips. If this value is
+ * zero, it indicates we're not reserving any space
+ * for the boot area.
+ * @partition_source_types: An array of strings that name sources of
+ * partitioning information (e.g., the boot loader,
+ * the kernel command line, etc.). The function
+ * parse_mtd_partitions() recognizes these names and
+ * applies the appropriate "plugins" to discover
+ * partitioning information. If any is found, it will
+ * be applied to the "general use" MTD (it will NOT
+ * override the boot area protection mechanism).
+ * @partitions: An optional pointer to an array of partition
+ * descriptions. If the driver finds no partitioning
+ * information elsewhere, it will apply these to the
+ * "general use" MTD (they do NOT override the boot
+ * area protection mechanism).
+ * @partition_count: The number of elements in the partitions array.
+ *
+ * ----- Stay away from the "Unique ID" -- it will be going away soon. -----
+ *
+ * @uid_offset: The offset into the physical medium of the
+ * "Unique ID" area.
+ * @uid_size: The size of the "Unique ID" area.
*/
struct gpmi_platform_data {
- int io_uA;
+ int io_uA;
+
+ int (*pinmux_handler)(bool request);
- u_int32_t uid_offset;
- u_int32_t uid_size;
+ uint32_t boot_area_size_in_bytes;
- char *concat_name;
- char **concat_parts;
+ const char **partition_source_types;
- int (*pinmux) (int req);
+ struct mtd_partition *partitions;
+ unsigned partition_count;
- int chip_count;
+ /* Stay away from the Unique ID - it will be going away soon. */
- struct {
- const char **part_probe_types;
- int nr_partitions;
- struct mtd_partition *partitions;
- } chip_partitions[];
+ u_int32_t uid_offset;
+ u_int32_t uid_size;
};
#endif