2 * Generic RT288x machine setup
4 * Copyright (C) 2008 Gabor Juhos <juhosg@openwrt.org>
5 * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published
9 * by the Free Software Foundation.
12 #include <linux/init.h>
13 #include <linux/platform_device.h>
14 #include <linux/mtd/mtd.h>
15 #include <linux/mtd/partitions.h>
16 #include <linux/mtd/physmap.h>
18 #include <asm/mips_machine.h>
19 #include <asm/mach-ralink/rt288x.h>
20 #include <asm/mach-ralink/platform.h>
22 #ifdef CONFIG_MTD_PARTITIONS
23 static struct mtd_partition generic_partitions[] = {
28 .mask_flags = MTD_WRITEABLE,
33 .mask_flags = MTD_WRITEABLE,
38 .mask_flags = MTD_WRITEABLE,
45 // .offset = MTDPART_OFS_NXTBLK,
46 // .size = MTDPART_SIZ_FULL,
51 #endif /* CONFIG_MTD_PARTITIONS */
53 static struct physmap_flash_data generic_flash_data = {
54 #ifdef CONFIG_MTD_PARTITIONS
55 .nr_parts = ARRAY_SIZE(generic_partitions),
56 .parts = generic_partitions,
60 static void __init rt288x_generic_init(void)
62 rt288x_register_flash(0, &generic_flash_data);
65 MIPS_MACHINE(RT288X_MACH_GENERIC, "Generic RT288x board", rt288x_generic_init);