4 * Mikrotik RouterBOARDs 111/112/133/133C/153
6 * Copyright (C) 2007 OpenWrt.org
7 * Copyright (C) 2007 Gabor Juhos <juhosg@freemail.hu>
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the
21 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 * Boston, MA 02110-1301, USA.
26 #include <linux/kernel.h>
27 #include <linux/init.h>
29 #include <asm/bootinfo.h>
32 #include <asm/mach-adm5120/adm5120_board.h>
33 #include <asm/mach-adm5120/adm5120_platform.h>
35 static struct mtd_partition rb1xx_partitions
[] = {
40 .mask_flags
= MTD_WRITEABLE
,
43 .offset
= MTDPART_OFS_APPEND
,
44 .size
= MTDPART_SIZ_FULL
,
48 static struct platform_device
*rb1xx_devices
[] __initdata
= {
49 &adm5120_flash0_device
,
52 static void __init
rb1xx_setup(void)
54 /* setup data for flash0 device */
55 adm5120_flash0_data
.nr_parts
= ARRAY_SIZE(rb1xx_partitions
);
56 adm5120_flash0_data
.parts
= rb1xx_partitions
;
58 /* TODO: setup mac address */
61 static struct adm5120_board rb111_board __initdata
= {
62 .mach_type
= MACH_ADM5120_RB_111
,
63 .name
= "Mikrotik RouterBOARD 111",
64 .board_setup
= rb1xx_setup
,
66 .num_devices
= ARRAY_SIZE(rb1xx_devices
),
67 .devices
= rb1xx_devices
,
70 static struct adm5120_board rb112_board __initdata
= {
71 .mach_type
= MACH_ADM5120_RB_112
,
72 .name
= "Mikrotik RouterBOARD 112",
73 .board_setup
= rb1xx_setup
,
75 .num_devices
= ARRAY_SIZE(rb1xx_devices
),
76 .devices
= rb1xx_devices
,
79 static struct adm5120_board rb133_board __initdata
= {
80 .mach_type
= MACH_ADM5120_RB_133
,
81 .name
= "Mikrotik RouterBOARD 133",
82 .board_setup
= rb1xx_setup
,
84 .num_devices
= ARRAY_SIZE(rb1xx_devices
),
85 .devices
= rb1xx_devices
,
88 static struct adm5120_board rb133c_board __initdata
= {
89 .mach_type
= MACH_ADM5120_RB_133C
,
90 .name
= "Mikrotik RouterBOARD 133C",
91 .board_setup
= rb1xx_setup
,
93 .num_devices
= ARRAY_SIZE(rb1xx_devices
),
94 .devices
= rb1xx_devices
,
97 static struct adm5120_board rb153_board __initdata
= {
98 .mach_type
= MACH_ADM5120_RB_153
,
99 .name
= "Mikrotik RouterBOARD 153",
100 .board_setup
= rb1xx_setup
,
102 .num_devices
= ARRAY_SIZE(rb1xx_devices
),
103 .devices
= rb1xx_devices
,
106 static int __init
register_boards(void)
108 adm5120_board_register(&rb111_board
);
109 adm5120_board_register(&rb112_board
);
110 adm5120_board_register(&rb133_board
);
111 adm5120_board_register(&rb133c_board
);
112 adm5120_board_register(&rb153_board
);
116 pure_initcall(register_boards
);