2009-05-15 19:16:47 +00:00
|
|
|
--- a/arch/arm/mach-gemini/board-wbd111.c
|
|
|
|
+++ b/arch/arm/mach-gemini/board-wbd111.c
|
2009-05-15 20:28:19 +00:00
|
|
|
@@ -16,6 +16,8 @@
|
|
|
|
#include <linux/skbuff.h>
|
2009-05-15 19:16:47 +00:00
|
|
|
#include <linux/gpio_keys.h>
|
|
|
|
#include <linux/mdio-gpio.h>
|
2009-05-15 20:28:19 +00:00
|
|
|
+#include <linux/mtd/mtd.h>
|
2009-05-15 19:16:47 +00:00
|
|
|
+#include <linux/mtd/partitions.h>
|
|
|
|
#include <asm/mach-types.h>
|
|
|
|
#include <asm/mach/arch.h>
|
|
|
|
#include <asm/mach/time.h>
|
2009-06-01 18:08:08 +00:00
|
|
|
@@ -102,12 +104,51 @@ static struct sys_timer wbd111_timer = {
|
2009-05-15 19:16:47 +00:00
|
|
|
.init = gemini_timer_init,
|
|
|
|
};
|
|
|
|
|
|
|
|
+#ifdef CONFIG_MTD_PARTITIONS
|
|
|
|
+static struct mtd_partition wbd111_partitions[] = {
|
|
|
|
+ {
|
|
|
|
+ .name = "RedBoot",
|
|
|
|
+ .offset = 0,
|
|
|
|
+ .size = 0x020000,
|
|
|
|
+ .mask_flags = MTD_WRITEABLE,
|
|
|
|
+ } , {
|
|
|
|
+ .name = "kernel",
|
|
|
|
+ .offset = 0x020000,
|
|
|
|
+ .size = 0x100000,
|
|
|
|
+ } , {
|
|
|
|
+ .name = "rootfs",
|
|
|
|
+ .offset = 0x120000,
|
|
|
|
+ .size = 0x6a0000,
|
|
|
|
+ } , {
|
|
|
|
+ .name = "VCTL",
|
|
|
|
+ .offset = 0x7c0000,
|
|
|
|
+ .size = 0x010000,
|
|
|
|
+ .mask_flags = MTD_WRITEABLE,
|
|
|
|
+ } , {
|
|
|
|
+ .name = "cfg",
|
|
|
|
+ .offset = 0x7d0000,
|
|
|
|
+ .size = 0x010000,
|
|
|
|
+ .mask_flags = MTD_WRITEABLE,
|
|
|
|
+ } , {
|
|
|
|
+ .name = "FIS",
|
|
|
|
+ .offset = 0x7e0000,
|
|
|
|
+ .size = 0x010000,
|
|
|
|
+ .mask_flags = MTD_WRITEABLE,
|
|
|
|
+ }
|
|
|
|
+};
|
|
|
|
+#define wbd111_num_partitions ARRAY_SIZE(wbd111_partitions)
|
|
|
|
+#else
|
|
|
|
+#define wbd111_partitions NULL
|
|
|
|
+#define wbd111_num_partitions 0
|
|
|
|
+#endif /* CONFIG_MTD_PARTITIONS */
|
|
|
|
+
|
|
|
|
static void __init wbd111_init(void)
|
|
|
|
{
|
|
|
|
gemini_gpio_init();
|
|
|
|
platform_register_uart();
|
2009-06-01 18:08:08 +00:00
|
|
|
platform_register_watchdog();
|
2009-05-15 19:16:47 +00:00
|
|
|
- platform_register_pflash(SZ_8M, NULL, 0);
|
|
|
|
+ platform_register_pflash(SZ_8M, wbd111_partitions,
|
|
|
|
+ wbd111_num_partitions);
|
|
|
|
platform_device_register(&wbd111_leds_device);
|
|
|
|
platform_device_register(&wbd111_keys_device);
|
|
|
|
platform_device_register(&wbd111_phy_device);
|