Please review and commit this patch.
Regards,
Layne
On Thu, 07 Apr 2011 00:43:22 -0500, Layne Edwards wrote:
> This patch adds support for the D-Link DIR-600 Rev B2 (ramips rt305x).
>
> Signed-off-by: Layne Edwards
>
> Index: target/linux/ramips/files/arch/mips/ralink/rt305x/Kconfig
> ===================================================================
> --- target/linux/ramips/files/arch/mips/ralink/rt305x/Kconfig (revision 26505)
> +++ target/linux/ramips/files/arch/mips/ralink/rt305x/Kconfig (working copy)
> @@ -20,6 +20,12 @@
> select RALINK_DEV_GPIO_BUTTONS
> select RALINK_DEV_GPIO_LEDS
>
> +config RT305X_MACH_DIR_600_REVB
> + bool "D-Link DIR-600 revB board support"
> + default y
> + select RALINK_DEV_GPIO_BUTTONS
> + select RALINK_DEV_GPIO_LEDS
> +
> config RT305X_MACH_V22RW_2X2
> bool "Ralink AP-RT3052-V22RW-2X2 board support"
> default y
> Index: target/linux/ramips/files/arch/mips/ralink/rt305x/mach-dir-600-revb.c
>
===================================================================
> --- target/linux/ramips/files/arch/mips/ralink/rt305x/mach-dir-600-revb.c
> (revision 0)
> +++ target/linux/ramips/files/arch/mips/ralink/rt305x/mach-dir-600-revb.c
> (revision 0)
> @@ -0,0 +1,124 @@
> +/*
> + * D-Link DIR-600 Rev B board support
> + *
> + * Copyright (C) 2011 Layne Edwards
> + *
> + * This program is free software; you can redistribute it and/or modify it
> + * under the terms of the GNU General Public License version 2 as published
> + * by the Free Software Foundation.
> + */
> +
> +#include
> +#include
> +#include
> +#include
> +#include
> +
> +#include
> +#include
> +#include
> +#include
> +#include
> +
> +#include "devices.h"
> +
> +#define DIR_600B_GPIO_LED_STATUS_AMBER 8
> +#define DIR_600B_GPIO_LED_STATUS_GREEN 9
> +#define DIR_600B_GPIO_LED_WPS 13
> +
> +#define DIR_600B_GPIO_BUTTON_WPS 0 /* active low */
> +#define DIR_600B_GPIO_BUTTON_RESET 10 /* active low */
> +
> +#define
DIR_600B_BUTTONS_POLL_INTERVAL 20
> +
> +#ifdef CONFIG_MTD_PARTITIONS
> +static struct mtd_partition dir_600b_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 = 0x0f0000,
> + }, {
> + .name = "rootfs",
> + .offset = 0x140000,
> + .size = 0x2B0000,
> + }, {
> + .name = "openwrt",
> + .offset = 0x050000,
> + .size = 0x3a0000,
> + }
> +};
> +#endif /* CONFIG_MTD_PARTITIONS */
> +
> +static struct physmap_flash_data dir_600b_flash_data = {
> +#ifdef CONFIG_MTD_PARTITIONS
> + .nr_parts = ARRAY_SIZE(dir_600b_partitions),
> + .parts = dir_600b_partitions,
> +#endif
> +};
> +
> +static struct gpio_led dir_600b_leds_gpio[] __initdata = {
> +
{
> + .name = "dir-600b:amber:status",
> + .gpio = DIR_600B_GPIO_LED_STATUS_AMBER,
> + .active_low = 1,
> + }, {
> + .name = "dir-600b:green:status",
> + .gpio = DIR_600B_GPIO_LED_STATUS_GREEN,
> + .active_low = 1,
> + }, {
> + .name = "dir-600b:blue:wps",
> + .gpio = DIR_600B_GPIO_LED_WPS,
> + .active_low = 1,
> + }
> +};
> +
> +static struct gpio_button dir_600b_gpio_buttons[] __initdata = {
> + {
> + .desc = "reset",
> + .type = EV_KEY,
> + .code = KEY_RESTART,
> + .threshold = 3,
> + .gpio = DIR_600B_GPIO_BUTTON_RESET,
> + .active_low = 1,
> + }, {
> + .desc = "wps",
> + .type = EV_KEY,
> + .code = KEY_WPS_BUTTON,
> + .threshold = 3,
> + .gpio = DIR_600B_GPIO_BUTTON_WPS,
> + .active_low = 1,
> + }
> +};
> +
> +static void __init dir_600b_init(void)
> +{
> + rt305x_gpio_init(RT305X_GPIO_MODE_GPIO
Links:
------
[1] mailto:[email protected]
[2] mailto:[email protected]
[3] mailto:[email protected]
[4]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel