upgrade to 2.6.30-rc8
[openwrt.git] / target / linux / gemini / patches / 003-wbd111-static-flash-map.patch
1 --- a/arch/arm/mach-gemini/board-wbd111.c
2 +++ b/arch/arm/mach-gemini/board-wbd111.c
3 @@ -16,6 +16,8 @@
4 #include <linux/skbuff.h>
5 #include <linux/gpio_keys.h>
6 #include <linux/mdio-gpio.h>
7 +#include <linux/mtd/mtd.h>
8 +#include <linux/mtd/partitions.h>
9 #include <asm/mach-types.h>
10 #include <asm/mach/arch.h>
11 #include <asm/mach/time.h>
12 @@ -102,12 +104,51 @@ static struct sys_timer wbd111_timer = {
13 .init = gemini_timer_init,
14 };
15
16 +#ifdef CONFIG_MTD_PARTITIONS
17 +static struct mtd_partition wbd111_partitions[] = {
18 + {
19 + .name = "RedBoot",
20 + .offset = 0,
21 + .size = 0x020000,
22 + .mask_flags = MTD_WRITEABLE,
23 + } , {
24 + .name = "kernel",
25 + .offset = 0x020000,
26 + .size = 0x100000,
27 + } , {
28 + .name = "rootfs",
29 + .offset = 0x120000,
30 + .size = 0x6a0000,
31 + } , {
32 + .name = "VCTL",
33 + .offset = 0x7c0000,
34 + .size = 0x010000,
35 + .mask_flags = MTD_WRITEABLE,
36 + } , {
37 + .name = "cfg",
38 + .offset = 0x7d0000,
39 + .size = 0x010000,
40 + .mask_flags = MTD_WRITEABLE,
41 + } , {
42 + .name = "FIS",
43 + .offset = 0x7e0000,
44 + .size = 0x010000,
45 + .mask_flags = MTD_WRITEABLE,
46 + }
47 +};
48 +#define wbd111_num_partitions ARRAY_SIZE(wbd111_partitions)
49 +#else
50 +#define wbd111_partitions NULL
51 +#define wbd111_num_partitions 0
52 +#endif /* CONFIG_MTD_PARTITIONS */
53 +
54 static void __init wbd111_init(void)
55 {
56 gemini_gpio_init();
57 platform_register_uart();
58 platform_register_watchdog();
59 - platform_register_pflash(SZ_8M, NULL, 0);
60 + platform_register_pflash(SZ_8M, wbd111_partitions,
61 + wbd111_num_partitions);
62 platform_device_register(&wbd111_leds_device);
63 platform_device_register(&wbd111_keys_device);
64 platform_device_register(&wbd111_phy_device);
This page took 0.072857 seconds and 5 git commands to generate.