1 --- a/arch/mips/lantiq/machtypes.h
2 +++ b/arch/mips/lantiq/machtypes.h
6 LANTIQ_MACH_GIGASX76X, /* Gigaset SX76x */
9 + LANTIQ_MACH_WBMR, /* WBMR-HP-G300H */
13 --- a/arch/mips/lantiq/xway/Kconfig
14 +++ b/arch/mips/lantiq/xway/Kconfig
16 select LTQ_DEV_GPIO_BUTTONS
19 +config LANTIQ_MACH_WBMR
20 + bool "WBMR-HP-G300H"
21 + select LTQ_DEV_GPIO_BUTTONS
27 --- a/arch/mips/lantiq/xway/Makefile
28 +++ b/arch/mips/lantiq/xway/Makefile
30 obj-$(CONFIG_LANTIQ_MACH_ARV45XX) += mach-arv45xx.o
31 obj-$(CONFIG_LANTIQ_MACH_NETGEAR) += mach-netgear.o
32 obj-$(CONFIG_LANTIQ_MACH_GIGASX76X) += mach-gigasx76x.o
33 +obj-$(CONFIG_LANTIQ_MACH_WBMR) += mach-wbmr.o
34 obj-y += dev-dwc_otg.o
36 +++ b/arch/mips/lantiq/xway/mach-wbmr.c
39 + * This program is free software; you can redistribute it and/or modify it
40 + * under the terms of the GNU General Public License version 2 as published
41 + * by the Free Software Foundation.
43 + * Copyright (C) 2010 John Crispin <blogic@openwrt.org>
46 +#include <linux/init.h>
47 +#include <linux/platform_device.h>
48 +#include <linux/leds.h>
49 +#include <linux/gpio.h>
50 +#include <linux/gpio_buttons.h>
51 +#include <linux/mtd/mtd.h>
52 +#include <linux/mtd/partitions.h>
53 +#include <linux/mtd/physmap.h>
54 +#include <linux/input.h>
56 +#include <lantiq_soc.h>
59 +#include "../machtypes.h"
61 +#include "dev-leds-gpio.h"
62 +#include "dev-dwc_otg.h"
63 +#include "../dev-gpio-buttons.h"
65 +static struct mtd_partition wbmr_partitions[] =
73 + .name = "uboot-env",
83 + .name = "calibration",
84 + .offset = 0x1fe0000,
89 +static struct physmap_flash_data wbmr_flash_data = {
90 + .nr_parts = ARRAY_SIZE(wbmr_partitions),
91 + .parts = wbmr_partitions,
94 +static struct gpio_led
95 +wbmr_leds_gpio[] __initdata = {
96 + { .name = "soc:blue:movie", .gpio = 20, .active_low = 1, },
97 + { .name = "soc:red:internet", .gpio = 18, .active_low = 1, },
98 + { .name = "soc:green:internet", .gpio = 17, .active_low = 1, },
99 + { .name = "soc:green:adsl", .gpio = 16, .active_low = 1, },
100 + { .name = "soc:green:wlan", .gpio = 15, .active_low = 1, },
101 + { .name = "soc:red:security", .gpio = 14, .active_low = 1, },
102 + { .name = "soc:green:power", .gpio = 1, .active_low = 1, },
103 + { .name = "soc:red:power", .gpio = 5, .active_low = 1, },
104 + { .name = "soc:green:usb", .gpio = 28, .active_low = 1, },
107 +static struct gpio_keys_button
108 +wbmr_gpio_keys[] __initdata = {
113 + .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL,
121 + .debounce_interval = LTQ_KEYS_DEBOUNCE_INTERVAL,
127 +static struct ltq_pci_data ltq_pci_data = {
128 + .clock = PCI_CLOCK_INT,
129 + .gpio = PCI_GNT1 | PCI_REQ1,
131 + [14] = INT_NUM_IM0_IRL0 + 22,
135 +static struct ltq_eth_data ltq_eth_data = {
136 + .mii_mode = PHY_INTERFACE_MODE_MII,
142 +#define WMBR_BRN_MAC 0x1fd0024
144 + ltq_add_device_leds_gpio(-1, ARRAY_SIZE(wbmr_leds_gpio), wbmr_leds_gpio);
145 + ltq_register_gpio_keys_polled(-1, LTQ_KEYS_POLL_INTERVAL, ARRAY_SIZE(wbmr_gpio_keys), wbmr_gpio_keys);
146 + ltq_register_nor(&wbmr_flash_data);
147 + ltq_register_pci(<q_pci_data);
148 + memcpy_fromio(<q_eth_data.mac.sa_data,
149 + (void *)KSEG1ADDR(LTQ_FLASH_START + WMBR_BRN_MAC), 6);
150 + ltq_register_etop(<q_eth_data);
151 + xway_register_dwc(36);
154 +MIPS_MACHINE(LANTIQ_MACH_WBMR,