[ramips] share common INTC code
[openwrt.git] / target / linux / ramips / files / arch / mips / ralink / rt305x / mach-whr-g300n.c
1 /*
2 * Generic RT305x machine setup
3 *
4 * Copyright (C) 2009 Gabor Juhos <juhosg@openwrt.org>
5 *
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.
9 */
10
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>
16
17 #include <asm/mips_machine.h>
18
19 #include "machine.h"
20 #include "devices.h"
21
22 #ifdef CONFIG_MTD_PARTITIONS
23 static struct mtd_partition whr_g300n_partitions[] = {
24 {
25 .name = "u-boot",
26 .offset = 0,
27 .size = 0x030000,
28 .mask_flags = MTD_WRITEABLE,
29 }, {
30 .name = "u-boot-env",
31 .offset = 0x030000,
32 .size = 0x010000,
33 .mask_flags = MTD_WRITEABLE,
34 }, {
35 .name = "factory",
36 .offset = 0x040000,
37 .size = 0x010000,
38 .mask_flags = MTD_WRITEABLE,
39 }, {
40 .name = "kernel",
41 .offset = 0x050000,
42 .size = 0x090000,
43 }, {
44 .name = "rootfs",
45 .offset = 0x140000,
46 .size = 0x2B0000,
47 }, {
48 .name = "user",
49 .offset = 0x3f0000,
50 .size = 0x010000,
51 }, {
52 .name = "openwrt",
53 .offset = 0x050000,
54 .size = 0x3a0000,
55 }
56 };
57 #endif /* CONFIG_MTD_PARTITIONS */
58
59 static struct physmap_flash_data whr_g300n_flash_data = {
60 #ifdef CONFIG_MTD_PARTITIONS
61 .nr_parts = ARRAY_SIZE(whr_g300n_partitions),
62 .parts = whr_g300n_partitions,
63 #endif
64 };
65
66 static void __init whr_g300n_init(void)
67 {
68 rt305x_register_flash(0, &whr_g300n_flash_data);
69 }
70
71 MIPS_MACHINE(RT305X_MACH_WHR_G300N, "Buffalo WHR-G300N", whr_g300n_init);
This page took 0.043875 seconds and 5 git commands to generate.