1 --- a/arch/mips/sibyte/swarm/platform.c
2 +++ b/arch/mips/sibyte/swarm/platform.c
3 @@ -83,3 +83,61 @@ static int __init swarm_pata_init(void)
4 device_initcall(swarm_pata_init);
6 #endif /* defined(CONFIG_SIBYTE_SWARM) || defined(CONFIG_SIBYTE_LITTLESUR) */
8 +#ifdef CONFIG_SIBYTE_RHONE
10 +#include <linux/mtd/partitions.h>
11 +#include <linux/mtd/physmap.h>
13 +static struct mtd_partition flash_parts[] = {
16 + .offset = 0x00000000,
18 + .mask_flags = MTD_WRITEABLE,
22 + .offset = 0x00200000,
26 + .name = "environment",
27 + .offset = 0x00f00000,
29 + .mask_flags = MTD_WRITEABLE,
33 +static struct physmap_flash_data flash_data = {
35 + .nr_parts = ARRAY_SIZE(flash_parts),
36 + .parts = flash_parts,
39 +static struct resource flash_resource = {
40 + .start = 0x1fc00000,
42 + .flags = IORESOURCE_MEM,
45 +static struct platform_device flash_device = {
46 + .name = "physmap-flash",
48 + .resource = &flash_resource,
51 + .platform_data = &flash_data,
55 +static int __init flash_setup(void)
57 + platform_device_register(&flash_device);
62 +device_initcall(flash_setup);
64 +#endif /* CONFIG_SIBYTE_RHONE */