#include <linux/platform_device.h>
#include <linux/spi/spi.h>
#include <linux/spi/flash.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-#include <linux/mtd/physmap.h>
#include <asm/mach-ralink/machine.h>
#include <asm/mach-ralink/dev-gpio-buttons.h>
#define ALL0256N_KEYS_POLL_INTERVAL 20
#define ALL0256N_KEYS_DEBOUNCE_INTERVAL (3 * ALL0256N_KEYS_POLL_INTERVAL)
-static struct mtd_partition all0256n_partitions[] = {
- {
- .name = "u-boot",
- .offset = 0,
- .size = 0x030000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "u-boot-env",
- .offset = 0x030000,
- .size = 0x010000,
- }, {
- .name = "factory",
- .offset = 0x040000,
- .size = 0x010000,
- }, {
- .name = "kernel",
- .offset = 0x050000,
- .size = 0x0D0000,
- }, {
- .name = "rootfs",
- .offset = 0x120000,
- .size = 0x2E0000,
- }, {
- .name = "firmware",
- .offset = 0x050000,
- .size = 0x3B0000,
- }
-};
-
const struct flash_platform_data all0256n_flash = {
.type = "mx25l3205d",
- .parts = all0256n_partitions,
- .nr_parts = ARRAY_SIZE(all0256n_partitions),
};
struct spi_board_info all0256n_spi_slave_info[] __initdata = {
#include <linux/init.h>
#include <linux/platform_device.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-#include <linux/mtd/physmap.h>
#include <asm/mach-ralink/machine.h>
#include <asm/mach-ralink/dev-gpio-buttons.h>
}
};
-static struct mtd_partition argus_atp52b_partitions[] = {
- {
- .name = "bootloader",
- .offset = 0,
- .size = 0x030000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "config",
- .offset = 0x030000,
- .size = 0x010000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "factory",
- .offset = 0x040000,
- .size = 0x010000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "kernel",
- .offset = 0x050000,
- .size = 0x120000,
- }, {
- .name = "rootfs",
- .offset = 0x170000,
- .size = 0x690000,
- }
-};
-
static void __init argus_atp52b_init(void)
{
rt305x_gpio_init(RT305X_GPIO_MODE_GPIO << RT305X_GPIO_MODE_UART0_SHIFT);
- rt305x_flash0_data.nr_parts = ARRAY_SIZE(argus_atp52b_partitions);
- rt305x_flash0_data.parts = argus_atp52b_partitions;
rt305x_register_flash(0);
ramips_register_gpio_leds(-1, ARRAY_SIZE(argus_atp52b_leds_gpio),
#include <linux/init.h>
#include <linux/platform_device.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-#include <linux/mtd/physmap.h>
#include <asm/mach-ralink/machine.h>
#include <asm/mach-ralink/dev-gpio-buttons.h>
#define BC2_KEYS_POLL_INTERVAL 20
#define BC2_KEYS_DEBOUNCE_INTERVAL (3 * BC2_KEYS_POLL_INTERVAL)
-static struct mtd_partition bc2_partitions[] = {
- {
- .name = "u-boot",
- .offset = 0,
- .size = 0x030000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "u-boot-env",
- .offset = 0x030000,
- .size = 0x010000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "factory",
- .offset = 0x040000,
- .size = 0x010000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "kernel",
- .offset = 0x050000,
- .size = 0x0a0000,
- }, {
- .name = "rootfs",
- .offset = 0x150000,
- .size = 0x6b0000,
- }, {
- .name = "firmware",
- .offset = 0x050000,
- .size = 0x7b0000,
- }
-};
-
static struct gpio_led bc2_leds_gpio[] __initdata = {
{
.name = "bc2:blue:usb",
RT305X_GPIO_MODE_UART0_SHIFT) |
RT305X_GPIO_MODE_JTAG);
- rt305x_flash0_data.nr_parts = ARRAY_SIZE(bc2_partitions);
- rt305x_flash0_data.parts = bc2_partitions;
rt305x_register_flash(0);
ramips_register_gpio_leds(-1, ARRAY_SIZE(bc2_leds_gpio),
#include <linux/init.h>
#include <linux/platform_device.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-#include <linux/mtd/physmap.h>
#include <asm/mach-ralink/machine.h>
#include <asm/mach-ralink/dev-gpio-buttons.h>
#define DIR_300B_KEYS_POLL_INTERVAL 20
#define DIR_300B_KEYS_DEBOUNCE_INTERVAL (3 * DIR_300B_KEYS_POLL_INTERVAL)
-static struct mtd_partition dir_300b_partitions[] = {
- {
- .name = "u-boot",
- .offset = 0,
- .size = 0x030000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "devdata",
- .offset = 0x030000,
- .size = 0x010000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "devconf",
- .offset = 0x040000,
- .size = 0x010000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "kernel",
- .offset = 0x050000,
- .size = 0x0d0000,
- }, {
- .name = "rootfs",
- .offset = 0x120000,
- .size = 0x2e0000,
- }, {
- .name = "firmware",
- .offset = 0x050000,
- .size = 0x3b0000,
- }
-};
-
static struct gpio_led dir_300b_leds_gpio[] __initdata = {
{
.name = "d-link:amber:status",
{
rt305x_gpio_init(RT305X_GPIO_MODE_GPIO << RT305X_GPIO_MODE_UART0_SHIFT);
- rt305x_flash0_data.nr_parts = ARRAY_SIZE(dir_300b_partitions);
- rt305x_flash0_data.parts = dir_300b_partitions;
rt305x_register_flash(0);
rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_LLLLW;
#include <linux/init.h>
#include <linux/platform_device.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-#include <linux/mtd/physmap.h>
#include <asm/mach-ralink/machine.h>
#include <asm/mach-ralink/dev-gpio-buttons.h>
#define ESR_9753_KEYS_POLL_INTERVAL 20
#define ESR_9753_KEYS_DEBOUNCE_INTERVAL (3 * ESR_9753_KEYS_POLL_INTERVAL)
-static struct mtd_partition esr_9753_partitions[] = {
- {
- .name = "u-boot",
- .offset = 0,
- .size = 0x030000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "u-boot-env",
- .offset = 0x030000,
- .size = 0x010000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "factory",
- .offset = 0x040000,
- .size = 0x010000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "kernel",
- .offset = 0x050000,
- .size = 0x0a0000,
- }, {
- .name = "rootfs",
- .offset = 0x150000,
- .size = 0x2b0000,
- }, {
- .name = "firmware",
- .offset = 0x050000,
- .size = 0x3b0000,
- }
-};
-
static struct gpio_led esr_9753_leds_gpio[] __initdata = {
{
.name = "esr-9753:orange:power",
{
rt305x_gpio_init(RT305X_GPIO_MODE_GPIO << RT305X_GPIO_MODE_UART0_SHIFT);
- rt305x_flash0_data.nr_parts = ARRAY_SIZE(esr_9753_partitions);
- rt305x_flash0_data.parts = esr_9753_partitions;
rt305x_register_flash(0);
ramips_register_gpio_leds(-1, ARRAY_SIZE(esr_9753_leds_gpio),
#include <linux/init.h>
#include <linux/platform_device.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-#include <linux/mtd/physmap.h>
#include <linux/rtl8366.h>
}
};
-static struct mtd_partition f5d8235v2_partitions[] = {
- {
- .name = "u-boot",
- .offset = 0,
- .size = 0x050000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "kernel and rootfs",
- .offset = 0x050000,
- .size = 0x790000,
- }, {
- .name = "rootfs",
- .offset = 0x1D0000,
- .size = 0x610000,
- }, {
- .name = "nvram",
- .offset = 0x7E0000,
- .size = 0x010000,
- }, {
- .name = "factory",
- .offset = 0x7F0000,
- .size = 0x010000,
- }
-};
-
static struct rtl8366_platform_data f5d8235v2_switch_data = {
.gpio_sda = RT305X_GPIO_I2C_SD,
.gpio_sck = RT305X_GPIO_I2C_SCLK,
RT305X_GPIO_MODE_SPI |
RT305X_GPIO_MODE_MDIO);
- rt305x_flash0_data.nr_parts = ARRAY_SIZE(f5d8235v2_partitions);
- rt305x_flash0_data.parts = f5d8235v2_partitions;
rt305x_register_flash(0);
ramips_register_gpio_leds(-1, ARRAY_SIZE(f5d8235v2_leds_gpio),
#include <linux/init.h>
#include <linux/platform_device.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-#include <linux/mtd/physmap.h>
#include <asm/mach-ralink/machine.h>
#include <asm/mach-ralink/dev-gpio-buttons.h>
#define FONERA20N_KEYS_POLL_INTERVAL 20
#define FONERA20N_KEYS_DEBOUNCE_INTERVAL (3 * FONERA20N_KEYS_POLL_INTERVAL)
-static struct mtd_partition fonera20n_partitions[] = {
- {
- .name = "u-boot",
- .offset = 0,
- .size = 0x030000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "u-boot-env",
- .offset = 0x030000,
- .size = 0x010000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "factory",
- .offset = 0x040000,
- .size = 0x010000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "kernel",
- .offset = 0x050000,
- .size = 0x0a0000,
- }, {
- .name = "rootfs",
- .offset = 0x150000,
- .size = 0x6b0000,
- }, {
- .name = "firmware",
- .offset = 0x050000,
- .size = 0x7b0000,
- }
-};
-
static struct gpio_led fonera20n_leds_gpio[] __initdata = {
{
.name = "fonera20n:orange:wifi",
{
rt305x_gpio_init(RT305X_GPIO_MODE_GPIO << RT305X_GPIO_MODE_UART0_SHIFT);
- rt305x_flash0_data.nr_parts = ARRAY_SIZE(fonera20n_partitions);
- rt305x_flash0_data.parts = fonera20n_partitions;
rt305x_register_flash(0);
ramips_register_gpio_leds(-1, ARRAY_SIZE(fonera20n_leds_gpio),
#include <linux/init.h>
#include <linux/platform_device.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-#include <linux/mtd/physmap.h>
#include <asm/mach-ralink/machine.h>
#include <asm/mach-ralink/dev-gpio-buttons.h>
#define HW550_3G_KEYS_POLL_INTERVAL 20
#define HW550_3G_KEYS_DEBOUNCE_INTERVAL (3 * HW550_3G_KEYS_POLL_INTERVAL)
-static struct mtd_partition hw550_3g_partitions[] = {
- {
- .name = "u-boot",
- .offset = 0,
- .size = 0x030000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "config",
- .offset = 0x030000,
- .size = 0x010000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "factory",
- .offset = 0x040000,
- .size = 0x010000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "kernel",
- .offset = 0x050000,
- .size = 0x0d0000,
- }, {
- .name = "rootfs",
- .offset = 0x120000,
- .size = 0x6e0000,
- }, {
- .name = "firmware",
- .offset = 0x050000,
- .size = 0x7b0000,
- }
-};
-
static struct gpio_led hw550_3g_leds_gpio[] __initdata = {
{
.name = "hw550-3g:green:usb",
{
rt305x_gpio_init(HW550_3G_GPIO_MODE);
- rt305x_flash0_data.nr_parts = ARRAY_SIZE(hw550_3g_partitions);
- rt305x_flash0_data.parts = hw550_3g_partitions;
rt305x_register_flash(0);
rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_WLLLL;
#include <linux/init.h>
#include <linux/platform_device.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-#include <linux/mtd/physmap.h>
#include <asm/mach-ralink/machine.h>
#include <asm/mach-ralink/dev-gpio-buttons.h>
#define MOFI3500_3GN_KEYS_POLL_INTERVAL 20
#define MOFI3500_3GN_KEYS_DEBOUNCE_INTERVAL (3 * MOFI3500_3GN_KEYS_POLL_INTERVAL)
-static struct mtd_partition mofi3500_3gn_partitions[] = {
- {
- .name = "u-boot",
- .offset = 0,
- .size = 0x030000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "config",
- .offset = 0x030000,
- .size = 0x010000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "factory",
- .offset = 0x040000,
- .size = 0x010000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "kernel",
- .offset = 0x050000,
- .size = 0x0d0000,
- }, {
- .name = "rootfs",
- .offset = 0x120000,
- .size = 0x6e0000,
- }, {
- .name = "firmware",
- .offset = 0x050000,
- .size = 0x7b0000,
- }
-};
-
static struct gpio_led mofi3500_3gn_leds_gpio[] __initdata = {
{
.name = "mofi3500-3gn:green:usb",
{
rt305x_gpio_init(MOFI3500_3GN_GPIO_MODE);
- rt305x_flash0_data.nr_parts = ARRAY_SIZE(mofi3500_3gn_partitions);
- rt305x_flash0_data.parts = mofi3500_3gn_partitions;
rt305x_register_flash(0);
rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_LLLLW;
#include <linux/init.h>
#include <linux/platform_device.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-#include <linux/mtd/physmap.h>
#include <asm/mach-ralink/machine.h>
#include <asm/mach-ralink/dev-gpio-buttons.h>
#define NBG_419N_KEYS_POLL_INTERVAL 20
#define NBG_419N_KEYS_DEBOUNCE_INTERVAL (3 * NBG_419N_KEYS_POLL_INTERVAL)
-static struct mtd_partition nbg_419n_partitions[] = {
- {
- .name = "u-boot",
- .offset = 0,
- .size = 0x030000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "config",
- .offset = 0x030000,
- .size = 0x010000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "factory",
- .offset = 0x040000,
- .size = 0x010000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "kernel",
- .offset = 0x050000,
- .size = 0x3b0000,
- }
-};
-
static struct gpio_led nbg_419n_leds_gpio[] __initdata = {
{
.name = "nbg-419n:green:power",
{
rt305x_gpio_init(RT305X_GPIO_MODE_GPIO << RT305X_GPIO_MODE_UART0_SHIFT);
- rt305x_flash0_data.nr_parts = ARRAY_SIZE(nbg_419n_partitions);
- rt305x_flash0_data.parts = nbg_419n_partitions;
rt305x_register_flash(0);
rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_LLLLW;
*/
#include <linux/init.h>
-#include <linux/platform_device.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
#include <linux/spi/spi.h>
-#include <linux/spi/flash.h>
#include <asm/mach-ralink/machine.h>
#include <asm/mach-ralink/dev-gpio-buttons.h>
#define NW718_KEYS_POLL_INTERVAL 20
#define NW718_KEYS_DEBOUNCE_INTERVAL (3 * NW718_KEYS_POLL_INTERVAL)
-static struct mtd_partition nw718_partitions[] = {
- {
- .name = "u-boot",
- .offset = 0,
- .size = 0x030000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "config",
- .offset = 0x030000,
- .size = 0x020000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "factory",
- .offset = 0x050000,
- .size = 0x010000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "kernel",
- .offset = 0x060000,
- .size = 0x090000,
- }, {
- .name = "rootfs",
- .offset = 0x150000,
- .size = 0x2b0000,
- }, {
- .name = "firmware",
- .offset = 0x060000,
- .size = 0x3a0000,
- }
-};
-
-static struct flash_platform_data nw718_flash_data = {
- .nr_parts = ARRAY_SIZE(nw718_partitions),
- .parts = nw718_partitions,
-};
-
static struct gpio_led nw718_leds_gpio[] __initdata = {
{
.name = "nw718:amber:cpu",
.chip_select = 0,
.max_speed_hz = 25000000,
.modalias = "m25p80",
- .platform_data = &nw718_flash_data,
.controller_data = (void *) NW718_GPIO_SPI_CS0,
}
};
#include <linux/init.h>
#include <linux/platform_device.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-#include <linux/mtd/physmap.h>
#include <linux/gpio.h>
#include <asm/mach-ralink/machine.h>
#define OMNI_EMB_GPIO_LED_STATUS 9
#define OMNI_EMB_GPIO_LED_WLAN 14
-static struct mtd_partition emb_partitions[] = {
- {
- .name = "uboot",
- .offset = 0,
- .size = 0x030000,
- }, {
- .name = "uboot-config",
- .offset = 0x030000,
- .size = 0x040000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "factory",
- .offset = 0x040000,
- .size = 0x050000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "linux",
- .offset = 0x050000,
- .size = 0x100000,
- }, {
- .name = "rootfs",
- .offset = 0x150000,
- .size = 0x6B0000,
- }, {
- .name = "firmware",
- .offset = 0x050000,
- .size = 0x7B0000,
- }
-};
-
static struct gpio_led omni_emb_leds_gpio[] __initdata = {
{
.name = "emb:green:status",
ARRAY_SIZE(omni_emb_gpio_buttons),
omni_emb_gpio_buttons);
- rt305x_flash0_data.nr_parts = ARRAY_SIZE(emb_partitions);
- rt305x_flash0_data.parts = emb_partitions;
rt305x_register_flash(0);
-
rt305x_register_ethernet();
rt305x_register_wifi();
rt305x_register_wdt();
#include <linux/init.h>
#include <linux/platform_device.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-#include <linux/mtd/physmap.h>
#include <asm/mach-ralink/machine.h>
#include <asm/mach-ralink/dev-gpio-buttons.h>
#define PWH2004_KEYS_POLL_INTERVAL 20
#define PWH2004_KEYS_DEBOUNCE_INTERVAL (3 * PWH2004_KEYS_POLL_INTERVAL)
-static struct mtd_partition pwh2004_partitions[] = {
- {
- .name = "u-boot",
- .offset = 0,
- .size = 0x030000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "config",
- .offset = 0x030000,
- .size = 0x010000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "factory",
- .offset = 0x040000,
- .size = 0x010000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "kernel",
- .offset = 0x050000,
- .size = 0x7b0000,
- }, {
- .name = "firmware",
- .offset = 0x050000,
- .size = 0x7b0000,
- }
-};
-
static struct gpio_led pwh2004_leds_gpio[] __initdata = {
{
.name = "pwh2004:red:wifi",
{
rt305x_gpio_init(RT305X_GPIO_MODE_GPIO << RT305X_GPIO_MODE_UART0_SHIFT);
- rt305x_flash0_data.nr_parts = ARRAY_SIZE(pwh2004_partitions);
- rt305x_flash0_data.parts = pwh2004_partitions;
rt305x_register_flash(0);
ramips_register_gpio_leds(-1, ARRAY_SIZE(pwh2004_leds_gpio),
#include <linux/platform_device.h>
#include <linux/spi/spi.h>
#include <linux/spi/flash.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
#include <asm/mach-ralink/machine.h>
#include <asm/mach-ralink/dev-gpio-buttons.h>
#define RT_G32B_KEYS_POLL_INTERVAL 20
#define RT_G32B_KEYS_DEBOUNCE_INTERVAL (3 * RT_G32B_KEYS_POLL_INTERVAL)
-static struct mtd_partition rt_g32b_partitions[] = {
- {
- .name = "u-boot",
- .offset = 0,
- .size = 0x030000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "devdata",
- .offset = 0x030000,
- .size = 0x010000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "devconf",
- .offset = 0x040000,
- .size = 0x010000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "kernel",
- .offset = 0x050000,
- .size = 0x0d0000,
- }, {
- .name = "rootfs",
- .offset = 0x120000,
- .size = 0x2e0000,
- }, {
- .name = "firmware",
- .offset = 0x050000,
- .size = 0x3b0000,
- }
-};
-
const struct flash_platform_data rt_g32b_flash = {
.type = "mx25l3205d",
- .parts = rt_g32b_partitions,
- .nr_parts = ARRAY_SIZE(rt_g32b_partitions),
};
struct spi_board_info __initdata rt_g32b_spi_slave_info[] = {
#include <linux/init.h>
#include <linux/platform_device.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-#include <linux/mtd/physmap.h>
#include <asm/mach-ralink/machine.h>
#include <asm/mach-ralink/dev-gpio-buttons.h>
#define SL_R7205_KEYS_POLL_INTERVAL 20
#define SL_R7205_KEYS_DEBOUNCE_INTERVAL (3 * SL_R7205_KEYS_POLL_INTERVAL)
-static struct mtd_partition sl_r7205_partitions[] = {
- {
- .name = "u-boot",
- .offset = 0,
- .size = 0x030000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "u-boot-env",
- .offset = 0x030000,
- .size = 0x010000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "factory",
- .offset = 0x040000,
- .size = 0x010000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "kernel",
- .offset = 0x050000,
- .size = 0x0a0000,
- }, {
- .name = "rootfs",
- .offset = 0x150000,
- .size = 0x2b0000,
- }, {
- .name = "firmware",
- .offset = 0x050000,
- .size = 0x3b0000,
- }
-};
-
static struct gpio_led sl_r7205_leds_gpio[] __initdata = {
{
.name = "sl-r7205:green:wifi",
{
rt305x_gpio_init(RT305X_GPIO_MODE_GPIO << RT305X_GPIO_MODE_UART0_SHIFT);
- rt305x_flash0_data.nr_parts = ARRAY_SIZE(sl_r7205_partitions);
- rt305x_flash0_data.parts = sl_r7205_partitions;
rt305x_register_flash(0);
rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_WLLLL;
#include <linux/init.h>
#include <linux/platform_device.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-#include <linux/mtd/physmap.h>
#include <asm/mach-ralink/machine.h>
#include <asm/mach-ralink/dev-gpio-buttons.h>
#define V22RW_2X2_KEYS_POLL_INTERVAL 20
#define V22RW_2X2_KEYS_DEBOUNCE_INTERVAL (3 * V22RW_2X2_KEYS_POLL_INTERVAL)
-static struct mtd_partition v22rw_2x2_partitions[] = {
- {
- .name = "u-boot",
- .offset = 0,
- .size = 0x030000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "u-boot-env",
- .offset = 0x030000,
- .size = 0x010000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "factory",
- .offset = 0x040000,
- .size = 0x010000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "kernel",
- .offset = 0x050000,
- .size = 0x0a0000,
- }, {
- .name = "rootfs",
- .offset = 0x150000,
- .size = 0x2b0000,
- }, {
- .name = "firmware",
- .offset = 0x050000,
- .size = 0x3b0000,
- }
-};
-
static struct gpio_led v22rw_2x2_leds_gpio[] __initdata = {
{
.name = "v22rw-2x2:green:security",
{
rt305x_gpio_init(RT305X_GPIO_MODE_GPIO << RT305X_GPIO_MODE_UART0_SHIFT);
- rt305x_flash0_data.nr_parts = ARRAY_SIZE(v22rw_2x2_partitions);
- rt305x_flash0_data.parts = v22rw_2x2_partitions;
rt305x_register_flash(0);
rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_LLLLW;
#include <linux/init.h>
#include <linux/platform_device.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-#include <linux/mtd/physmap.h>
#include <asm/mach-ralink/machine.h>
#include <asm/mach-ralink/dev-gpio-buttons.h>
#define W502U_KEYS_POLL_INTERVAL 20
#define W502U_KEYS_DEBOUNCE_INTERVAL (3 * W502U_KEYS_POLL_INTERVAL)
-static struct mtd_partition w502u_partitions[] = {
- {
- .name = "u-boot",
- .offset = 0,
- .size = 0x030000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "config",
- .offset = 0x030000,
- .size = 0x010000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "factory",
- .offset = 0x040000,
- .size = 0x010000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "kernel",
- .offset = 0x050000,
- .size = 0x0d0000,
- }, {
- .name = "rootfs",
- .offset = 0x120000,
- .size = 0x6d0000,
- }, {
- .name = "data3g",
- .offset = 0x7f0000,
- .size = 0x010000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "firmware",
- .offset = 0x050000,
- .size = 0x7a0000,
- }
-};
-
static struct gpio_led w502u_leds_gpio[] __initdata = {
{
.name = "alfa:blue:usb",
rt305x_gpio_init((RT305X_GPIO_MODE_GPIO <<
RT305X_GPIO_MODE_UART0_SHIFT));
- rt305x_flash0_data.nr_parts = ARRAY_SIZE(w502u_partitions);
- rt305x_flash0_data.parts = w502u_partitions;
rt305x_register_flash(0);
rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_WLLLL;
#include <linux/init.h>
#include <linux/platform_device.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-#include <linux/mtd/physmap.h>
#include <asm/mach-ralink/machine.h>
#include <asm/mach-ralink/dev-gpio-buttons.h>
}
};
-static struct mtd_partition wcr150gn_partitions[] = {
- {
- .name = "bootloader",
- .offset = 0,
- .size = 0x030000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "config",
- .offset = 0x030000,
- .size = 0x040000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "factory",
- .offset = 0x040000,
- .size = 0x050000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "kernel",
- .offset = 0x050000,
- .size = 0x0d0000,
- }, {
- .name = "rootfs",
- .offset = 0x120000,
- .size = 0x2e0000,
- }, {
- .name = "firmware",
- .offset = 0x050000,
- .size = 0x3b0000,
- }
-};
-
static void __init wcr150gn_init(void)
{
rt305x_gpio_init(RT305X_GPIO_MODE_GPIO << RT305X_GPIO_MODE_UART0_SHIFT);
- rt305x_flash0_data.nr_parts = ARRAY_SIZE(wcr150gn_partitions);
- rt305x_flash0_data.parts = wcr150gn_partitions;
rt305x_register_flash(0);
ramips_register_gpio_leds(-1, ARRAY_SIZE(wcr150gn_leds_gpio),
#include <linux/init.h>
#include <linux/platform_device.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-#include <linux/mtd/physmap.h>
#include <asm/mach-ralink/machine.h>
#include <asm/mach-ralink/dev-gpio-buttons.h>
#define WHR_G300N_KEYS_POLL_INTERVAL 20
#define WHR_G300N_KEYS_DEBOUNCE_INTERVAL (3 * WHR_G300N_KEYS_POLL_INTERVAL)
-static struct mtd_partition whr_g300n_partitions[] = {
- {
- .name = "u-boot",
- .offset = 0,
- .size = 0x030000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "u-boot-env",
- .offset = 0x030000,
- .size = 0x010000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "factory",
- .offset = 0x040000,
- .size = 0x010000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "kernel",
- .offset = 0x050000,
- .size = 0x090000,
- }, {
- .name = "rootfs",
- .offset = 0x140000,
- .size = 0x2B0000,
- }, {
- .name = "user",
- .offset = 0x3f0000,
- .size = 0x010000,
- }, {
- .name = "firmware",
- .offset = 0x050000,
- .size = 0x3a0000,
- }
-};
-
static struct gpio_led whr_g300n_leds_gpio[] __initdata = {
{
.name = "whr-g300n:red:diag",
{
rt305x_gpio_init(RT305X_GPIO_MODE_GPIO << RT305X_GPIO_MODE_UART0_SHIFT);
- rt305x_flash0_data.nr_parts = ARRAY_SIZE(whr_g300n_partitions);
- rt305x_flash0_data.parts = whr_g300n_partitions;
rt305x_register_flash(0);
rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_LLLLW;
#include <linux/init.h>
#include <linux/platform_device.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-#include <linux/mtd/physmap.h>
#include <asm/mach-ralink/machine.h>
#include <asm/mach-ralink/dev-gpio-buttons.h>
#define WL341V3_KEYS_POLL_INTERVAL 20
#define WL341V3_KEYS_DEBOUNCE_INTERVAL (3 * WL341V3_KEYS_POLL_INTERVAL)
-static struct mtd_partition wl341v3_partitions[] = {
- {
- .name = "u-boot",
- .offset = 0,
- .size = 0x020000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "board-nvram",
- .offset = 0x020000,
- .size = 0x010000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "u-boot-env",
- .offset = 0x030000,
- .size = 0x010000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "kernel",
- .offset = 0x040000,
- .size = 0x0d0000,
- }, {
- .name = "rootfs",
- .offset = 0x110000,
- .size = 0x2e0000,
- }, {
- .name = "signature-eRcOmM",
- .offset = 0x3f0000,
- .size = 0x010000,
- }, {
- .name = "firmware",
- .offset = 0x040000,
- .size = 0x3b0000,
- }, {
- .name = "fullflash",
- .offset = 0x000000,
- .size = 0x400000,
- }
-};
-
static struct gpio_led wl341v3_leds_gpio[] __initdata = {
{
.name = "wl341v3:amber:first",
{
rt305x_gpio_init(RT305X_GPIO_MODE_GPIO << RT305X_GPIO_MODE_UART0_SHIFT);
- rt305x_flash0_data.nr_parts = ARRAY_SIZE(wl341v3_partitions);
- rt305x_flash0_data.parts = wl341v3_partitions;
rt305x_register_flash(0);
rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_WLLLL;
}
};
-static struct mtd_partition wl351_partitions[] = {
- {
- .name = "u-boot",
- .offset = 0,
- .size = 0x030000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "u-boot-env",
- .offset = 0x030000,
- .size = 0x010000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "factory",
- .offset = 0x040000,
- .size = 0x010000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "kernel",
- .offset = 0x050000,
- .size = 0x110000,
- }, {
- .name = "rootfs",
- .offset = 0x160000,
- .size = 0x230000,
- }, {
- .name = "user (jffs2)",
- .offset = 0x3F0000,
- .size = 0x010000,
- }, {
- .name = "firmware",
- .offset = 0x050000,
- .size = 0x3a0000,
- }
-};
-
static struct rtl8366_platform_data wl351_switch_data = {
.gpio_sda = RT305X_GPIO_I2C_SD,
.gpio_sck = RT305X_GPIO_I2C_SCLK,
RT305X_GPIO_MODE_SPI |
RT305X_GPIO_MODE_MDIO);
- rt305x_flash0_data.nr_parts = ARRAY_SIZE(wl351_partitions);
- rt305x_flash0_data.parts = wl351_partitions;
rt305x_register_flash(0);
ramips_register_gpio_leds(-1, ARRAY_SIZE(wl351_leds_gpio),
#include <linux/init.h>
#include <linux/platform_device.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/partitions.h>
-#include <linux/mtd/physmap.h>
#include <asm/mach-ralink/machine.h>
#include <asm/mach-ralink/dev-gpio-buttons.h>
#define WR512_3GN_KEYS_POLL_INTERVAL 20
#define WR512_3GN_KEYS_DEBOUNCE_INTERVAL (3 * WR512_3GN_KEYS_POLL_INTERVAL)
-static struct mtd_partition wr512_3gn_partitions[] = {
- {
- .name = "u-boot",
- .offset = 0,
- .size = 0x030000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "devdata",
- .offset = 0x030000,
- .size = 0x010000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "devconf",
- .offset = 0x040000,
- .size = 0x010000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "kernel",
- .offset = 0x050000,
- .size = 0x0d0000,
- }, {
- .name = "rootfs",
- .offset = 0x120000,
- .size = 0x2e0000,
- }, {
- .name = "firmware",
- .offset = 0x050000,
- .size = 0x3b0000,
- }
-};
-
static struct gpio_led wr512_3gn_leds_gpio[] __initdata = {
{
.name = "wr512:green:3g",
{
rt305x_gpio_init(WR512_3GN_GPIO_MODE);
- rt305x_flash0_data.nr_parts = ARRAY_SIZE(wr512_3gn_partitions);
- rt305x_flash0_data.parts = wr512_3gn_partitions;
rt305x_register_flash(0);
rt305x_esw_data.vlan_config = RT305X_ESW_VLAN_CONFIG_LLLLW;
#include<linux/init.h>
#include<linux/platform_device.h>
-#include<linux/mtd/mtd.h>
-#include<linux/mtd/partitions.h>
-#include<linux/mtd/physmap.h>
#include<linux/gpio.h>
#include<asm/mach-ralink/machine.h>
#define WR6202_GPIO_LED_3G 13
#define WR6202_GPIO_LED_WPS 14
-static struct mtd_partition wr6202_partitions[] = {
- {
- .name = "uboot",
- .offset = 0,
- .size = 0x030000,
- }, {
- .name = "uboot-config",
- .offset = 0x030000,
- .size = 0x040000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "factory",
- .offset = 0x040000,
- .size = 0x050000,
- .mask_flags = MTD_WRITEABLE,
- }, {
- .name = "linux",
- .offset = 0x050000,
- .size = 0x100000,
- }, {
- .name = "rootfs",
- .offset = 0x150000,
- .size = 0x6B0000,
- }
-};
-
static struct gpio_led wr6202_leds_gpio[] __initdata = {
{
.name = "wr6202:blue:wps",
gpio_direction_output(WR6202_GPIO_USB_POWER, 0);
gpio_free(WR6202_GPIO_USB_POWER);
- rt305x_flash0_data.nr_parts = ARRAY_SIZE(wr6202_partitions);
- rt305x_flash0_data.parts = wr6202_partitions;
rt305x_register_flash(0);
rt305x_register_ethernet();