2 * Buffalo WZR-AGL300NH board support
4 * Copyright (C) 2010 Joonas Lahtinen <joonas.lahtinen@gmail.com>
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 as published
8 * by the Free Software Foundation.
11 #include <linux/init.h>
12 #include <linux/platform_device.h>
13 #include <linux/mtd/mtd.h>
14 #include <linux/mtd/partitions.h>
15 #include <linux/mtd/physmap.h>
17 #include <asm/mach-ralink/machine.h>
18 #include <asm/mach-ralink/rt288x.h>
19 #include <asm/mach-ralink/rt288x_regs.h>
24 * MTD layout from stock firmware:
25 * mtd0: 00030000 00010000 "uboot"
26 * mtd1: 00010000 00010000 "uboot_environ"
27 * mtd2: 00010000 00010000 "factory_default"
28 * mtd3: 000b0000 00010000 "linux"
29 * mtd4: 002f0000 00010000 "rootfs"
30 * mtd5: 00010000 00010000 "user_property"
33 static struct mtd_partition wzr_agl300nh_partitions
[] = {
38 .mask_flags
= MTD_WRITEABLE
,
40 .name
= "uboot_environ",
43 .mask_flags
= MTD_WRITEABLE
,
45 .name
= "factory_default",
48 .mask_flags
= MTD_WRITEABLE
,
58 .name
= "user_property",
64 static void __init
wzr_agl300nh_init(void)
66 rt288x_gpio_init(RT2880_GPIO_MODE_UART0
);
68 rt288x_flash0_data
.nr_parts
= ARRAY_SIZE(wzr_agl300nh_partitions
);
69 rt288x_flash0_data
.parts
= wzr_agl300nh_partitions
;
70 rt288x_register_flash(0);
72 rt288x_register_wifi();
73 rt288x_register_wdt();
76 MIPS_MACHINE(RAMIPS_MACH_WZR_AGL300NH
, "WZR-AGL300NH",
77 "Buffalo WZR-AGL300NH", wzr_agl300nh_init
);