<div dir="ltr">A kind reminder for a patch.<div><br></div><div>BR,</div><div>Drasko</div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Sep 20, 2015 at 7:30 PM, Drasko DRASKOVIC <span dir="ltr"><<a href="mailto:drasko.draskovic@gmail.com" target="_blank">drasko.draskovic@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Jonas,<br>
I have re-sent (in a spearate e-mail) patch with corrections based on<br>
your comments.<br>
<br>
Best reagrds,<br>
Drasko<br>
<div class="HOEnZb"><div class="h5"><br>
On Fri, Sep 11, 2015 at 2:51 PM, Jonas Gorski <<a href="mailto:jogo@openwrt.org">jogo@openwrt.org</a>> wrote:<br>
> Hi,<br>
><br>
> On Tue, Sep 8, 2015 at 9:00 PM, Drasko DRASKOVIC<br>
> <<a href="mailto:drasko.draskovic@gmail.com">drasko.draskovic@gmail.com</a>> wrote:<br>
>> Subject: [PATCH] [SIGNED-OFF] Add initial support for WeIO board<br>
><br>
> Please version your patches if you change them ([PATCH V2] etc)<br>
>> Add support for WeIO board (<a href="http://we-io.net" rel="noreferrer" target="_blank">http://we-io.net</a>), which is based on<br>
>> Carambola2 board from 8Devices.<br>
>><br>
>> Signed-off-by: Drasko DRASKOVIC <<a href="mailto:drasko.draskovic@gmail.com">drasko.draskovic@gmail.com</a>><br>
>> ---<br>
><br>
> Please keep a changelog here about the changes between submitssions<br>
>> target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 +<br>
>> .../ar71xx/base-files/lib/upgrade/platform.sh | 3 +-<br>
>> target/linux/ar71xx/config-4.1 | 1 +<br>
>> .../linux/ar71xx/files/arch/mips/ath79/mach-weio.c | 145 +++++++++++++++++++++<br>
>> target/linux/ar71xx/generic/profiles/<a href="http://weio.mk" rel="noreferrer" target="_blank">weio.mk</a> | 17 +++<br>
>> target/linux/ar71xx/image/Makefile | 8 ++<br>
>> .../700-MIPS-ath79-openwrt-machines.patch | 21 ++-<br>
><br>
> I don't see you updating etc/uci-defaults/02_network or any of the<br>
> uci-defaults files, so this won't have any proper config.<br>
><br>
><br>
>> 7 files changed, 192 insertions(+), 6 deletions(-)<br>
>> create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c<br>
>> create mode 100644 target/linux/ar71xx/generic/profiles/<a href="http://weio.mk" rel="noreferrer" target="_blank">weio.mk</a><br>
>><br>
>> diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh<br>
>> index e1f345e..e30cac2 100755<br>
>> --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh<br>
>> +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh<br>
>> @@ -832,6 +832,9 @@ ar71xx_board_detect() {<br>
>> *"UniFi AP Pro")<br>
>> name="uap-pro"<br>
>> ;;<br>
>> + *"WeIO")<br>
>> + name="weio"<br>
>> + ;;<br>
>> *WHR-G301N)<br>
>> name="whr-g301n"<br>
>> ;;<br>
>> diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh<br>
>> index c1962e4..b681fb8 100755<br>
>> --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh<br>
>> +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh<br>
>> @@ -250,7 +250,8 @@ platform_check_image() {<br>
>> nbg460n_550n_550nh | \<br>
>> unifi | \<br>
>> unifi-outdoor | \<br>
>> - carambola2 )<br>
>> + carambola2 | \<br>
>> + weio )<br>
>> [ "$magic" != "2705" ] && {<br>
>> echo "Invalid image type."<br>
>> return 1<br>
>> diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1<br>
>> index 21c4601..7d836d9 100644<br>
>> --- a/target/linux/ar71xx/config-4.1<br>
>> +++ b/target/linux/ar71xx/config-4.1<br>
>> @@ -139,6 +139,7 @@ CONFIG_ATH79_MACH_TL_WR941ND=y<br>
>> CONFIG_ATH79_MACH_TUBE2H=y<br>
>> CONFIG_ATH79_MACH_UBNT=y<br>
>> CONFIG_ATH79_MACH_UBNT_XM=y<br>
>> +CONFIG_ATH79_MACH_WEIO=y<br>
>> CONFIG_ATH79_MACH_WHR_HP_G300N=y<br>
>> CONFIG_ATH79_MACH_WLAE_AG300N=y<br>
>> CONFIG_ATH79_MACH_WLR8100=y<br>
>> diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c<br>
>> new file mode 100644<br>
>> index 0000000..791991c<br>
>> --- /dev/null<br>
>> +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-weio.c<br>
>> @@ -0,0 +1,145 @@<br>
>> +/**<br>
>> + * WEIO Web Of Things Platform<br>
>> + *<br>
>> + * Copyright (C) 2013 Drasko DRASKOVIC and Uros PETREVSKI<br>
>> + *<br>
>> + * ## ## ######## #### #######<br>
>> + * ## ## ## ## ## ## ##<br>
>> + * ## ## ## ## ## ## ##<br>
>> + * ## ## ## ###### ## ## ##<br>
>> + * ## ## ## ## ## ## ##<br>
>> + * ## ## ## ## ## ## ##<br>
>> + * ### ### ######## #### #######<br>
>> + *<br>
>> + * Web Of Things Platform<br>
>> + *<br>
>> + * This program is free software; you can redistribute it and/or<br>
>> + * modify it under the terms of the GNU General Public License<br>
>> + * as published by the Free Software Foundation; either version 2<br>
>> + * of the License, or (at your option) any later version.<br>
>> + *<br>
>> + * This program is distributed in the hope that it will be useful,<br>
>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br>
>> + * GNU General Public License for more details.<br>
>> + *<br>
>> + * You should have received a copy of the GNU General Public License<br>
>> + * along with this program; if not, write to the Free Software<br>
>> + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.<br>
>> + *<br>
>> + * Authors :<br>
>> + * Drasko DRASKOVIC <<a href="mailto:drasko.draskovic@gmail.com">drasko.draskovic@gmail.com</a>><br>
>> + * Uros PETREVSKI <<a href="mailto:uros@nodesign.net">uros@nodesign.net</a>><br>
>> + */<br>
>> +<br>
>> +#include <asm/mach-ath79/ath79.h><br>
>> +#include <asm/mach-ath79/ar71xx_regs.h><br>
>> +#include "common.h"<br>
>> +#include "dev-eth.h"<br>
>> +#include "dev-gpio-buttons.h"<br>
>> +#include "dev-leds-gpio.h"<br>
>> +#include "dev-m25p80.h"<br>
>> +#include "dev-spi.h"<br>
>> +#include "dev-usb.h"<br>
>> +#include "dev-wmac.h"<br>
>> +#include "machtypes.h"<br>
>> +#include "linux/i2c-gpio.h"<br>
>> +#include "linux/platform_device.h"<br>
>> +<br>
>> +#define WEIO_GPIO_LED_STA 1<br>
>> +#define WEIO_GPIO_LED_AP 16<br>
>> +<br>
>> +#define WEIO_GPIO_BTN_AP 20<br>
>> +#define WEIO_GPIO_BTN_RESET 23<br>
>> +<br>
>> +#define WEIO_KEYS_POLL_INTERVAL 20 /* msecs */<br>
>> +#define WEIO_KEYS_DEBOUNCE_INTERVAL (3 * WEIO_KEYS_POLL_INTERVAL)<br>
>> +<br>
>> +#define WEIO_MAC0_OFFSET 0x0000<br>
>> +#define WEIO_MAC1_OFFSET 0x0006<br>
>> +#define WEIO_CALDATA_OFFSET 0x1000<br>
>> +#define WEIO_WMAC_MAC_OFFSET 0x1002<br>
><br>
> Please use tabs for indentation and align the values.<br>
><br>
>> +<br>
>> +static struct gpio_led weio_leds_gpio[] __initdata = {<br>
>> + {<br>
>> + .name = "weio:green:sta",<br>
>> + .gpio = WEIO_GPIO_LED_STA,<br>
>> + .active_low = 1,<br>
>> + .default_state = LEDS_GPIO_DEFSTATE_ON,<br>
>> + }, {<br>
>> + .name = "weio:green:ap",<br>
>> + .gpio = WEIO_GPIO_LED_AP,<br>
>> + .active_low = 1,<br>
>> + .default_state = LEDS_GPIO_DEFSTATE_ON,<br>
>> + }<br>
>> +};<br>
><br>
> Please use tabs for indentation. The correct braces placement is<br>
> {<br>
> },<br>
> {<br>
> }<br>
><br>
>> +<br>
>> +static struct gpio_keys_button weio_gpio_keys[] __initdata = {<br>
>> + {<br>
>> + .desc = "ap button",<br>
>> + .type = EV_KEY,<br>
>> + .code = BTN_0,<br>
>> + .debounce_interval = WEIO_KEYS_DEBOUNCE_INTERVAL,<br>
>> + .gpio = WEIO_GPIO_BTN_AP,<br>
>> + .active_low = 1,<br>
>> + },<br>
>> + {<br>
>> + .desc = "soft-reset button",<br>
>> + .type = EV_KEY,<br>
>> + .code = BTN_1,<br>
>> + .debounce_interval = WEIO_KEYS_DEBOUNCE_INTERVAL,<br>
>> + .gpio = WEIO_GPIO_BTN_RESET,<br>
>> + .active_low = 1,<br>
>> + }<br>
>> +};<br>
><br>
> Please use tabs for indentation.<br>
><br>
>> +<br>
>> +static struct i2c_gpio_platform_data weio_i2c_gpio_data = {<br>
>> + .sda_pin = 18,<br>
>> + .scl_pin = 19,<br>
>> +};<br>
><br>
> Please use tabs for indentation.<br>
><br>
>> +<br>
>> +static struct platform_device weio_i2c_gpio = {<br>
>> + .name = "i2c-gpio",<br>
>> + .id = 0,<br>
>> + .dev = {<br>
>> + .platform_data = &weio_i2c_gpio_data,<br>
>> + },<br>
>> +};<br>
><br>
> Please use tabs for indentation.<br>
><br>
>> +<br>
>> +static struct platform_device *weio_devices[] __initdata = {<br>
>> + &weio_i2c_gpio<br>
>> +};<br>
><br>
> Please use tabs for indentation.<br>
><br>
>> +<br>
>> +static void __init weio_common_setup(void)<br>
>> +{<br>
>> + u8 *art = (u8 *) KSEG1ADDR(0x1fff0000);<br>
>> +<br>
>> + ath79_register_m25p80(NULL);<br>
>> + ath79_register_wmac(art + WEIO_CALDATA_OFFSET,<br>
>> + art + WEIO_WMAC_MAC_OFFSET);<br>
><br>
> Plase align the arguments with the opening ( (use spaces for the last < 8 steps)<br>
><br>
>> +}<br>
><br>
> Please use tabs for indentation.<br>
><br>
>> +<br>
>> +static void __init weio_setup(void)<br>
>> +{<br>
>> + weio_common_setup();<br>
>> +<br>
>> +<br>
><br>
> Only one empty line please.<br>
><br>
>> + ath79_gpio_function_disable(AR933X_GPIO_FUNC_ETH_SWITCH_LED0_EN |<br>
>> + AR933X_GPIO_FUNC_ETH_SWITCH_LED1_EN |<br>
>> + AR933X_GPIO_FUNC_ETH_SWITCH_LED2_EN |<br>
>> + AR933X_GPIO_FUNC_ETH_SWITCH_LED3_EN |<br>
>> + AR933X_GPIO_FUNC_ETH_SWITCH_LED4_EN);<br>
><br>
> Plase align the arguments with the opening (<br>
><br>
>> +<br>
>> + platform_add_devices(weio_devices, ARRAY_SIZE(weio_devices));<br>
>> +<br>
>> + ath79_register_leds_gpio(-1, ARRAY_SIZE(weio_leds_gpio),<br>
>> + weio_leds_gpio);<br>
><br>
> Plase align the arguments with the opening (<br>
><br>
>> +<br>
>> + ath79_register_gpio_keys_polled(-1, WEIO_KEYS_POLL_INTERVAL,<br>
>> + ARRAY_SIZE(weio_gpio_keys),<br>
>> + weio_gpio_keys);<br>
><br>
> Plase align the arguments with the opening (<br>
><br>
>> + ath79_register_usb();<br>
><br>
> Please use tabs for indentation.<br>
>> +}<br>
>> +<br>
>> +MIPS_MACHINE(ATH79_MACH_WEIO, "WEIO", "WeIO board from Drasko DRASKOVIC and Uros PETREVSKI",<br>
>> + weio_setup);<br>
>> diff --git a/target/linux/ar71xx/generic/profiles/<a href="http://weio.mk" rel="noreferrer" target="_blank">weio.mk</a> b/target/linux/ar71xx/generic/profiles/<a href="http://weio.mk" rel="noreferrer" target="_blank">weio.mk</a><br>
>> new file mode 100644<br>
>> index 0000000..227cec9<br>
>> --- /dev/null<br>
>> +++ b/target/linux/ar71xx/generic/profiles/<a href="http://weio.mk" rel="noreferrer" target="_blank">weio.mk</a><br>
>> @@ -0,0 +1,17 @@<br>
>> +#<br>
>> +# Copyright (C) 2013 OpenWrt.org<br>
>> +#<br>
>> +# This is free software, licensed under the GNU General Public License v2.<br>
>> +# See /LICENSE for more information.<br>
>> +#<br>
>> +<br>
>> +define Profile/WEIO<br>
>> + NAME:=WeIO<br>
>> + PACKAGES:=kmod-usb-core kmod-usb2<br>
><br>
> No wifi drivers?<br>
><br>
>> +endef<br>
>> +<br>
>> +define Profile/WEIO/Description<br>
>> + Package set optimized for the WeIO board.<br>
>> +endef<br>
>> +<br>
>> +$(eval $(call Profile,WEIO))<br>
>> diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile<br>
>> index e6fe36a..0a37fd1 100644<br>
>> --- a/target/linux/ar71xx/image/Makefile<br>
>> +++ b/target/linux/ar71xx/image/Makefile<br>
>> @@ -179,6 +179,14 @@ define Device/carambola2<br>
>> endef<br>
>> TARGET_DEVICES += carambola2<br>
>><br>
>> +define Device/weio<br>
>> + BOARDNAME = WEIO<br>
>> + IMAGE_SIZE = 16000k<br>
>> + CONSOLE = ttyATH0,115200<br>
>> + MTDPARTS = spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro<br>
>> +endef<br>
>> +TARGET_DEVICES += weio<br>
>> +<br>
>> define Device/wndr3700<br>
>> BOARDNAME = WNDR3700<br>
>> NETGEAR_KERNEL_MAGIC = 0x33373030<br>
>> diff --git a/target/linux/ar71xx/patches-4.1/700-MIPS-ath79-openwrt-machines.patch b/target/linux/ar71xx/patches-4.1/700-MIPS-ath79-openwrt-machines.patch<br>
>> index 02ebd1b..fa9fd0ad 100644<br>
>> --- a/target/linux/ar71xx/patches-4.1/700-MIPS-ath79-openwrt-machines.patch<br>
>> +++ b/target/linux/ar71xx/patches-4.1/700-MIPS-ath79-openwrt-machines.patch<br>
>> @@ -1,6 +1,6 @@<br>
>> --- a/arch/mips/ath79/machtypes.h<br>
>> +++ b/arch/mips/ath79/machtypes.h<br>
>> -@@ -16,24 +16,207 @@<br>
>> +@@ -16,24 +16,208 @@<br>
>><br>
>> enum ath79_mach_type {<br>
>> ATH79_MACH_GENERIC = 0,<br>
>> @@ -176,6 +176,7 @@<br>
>> ATH79_MACH_UBNT_UNIFI_OUTDOOR, /* Ubiquiti UnifiAP Outdoor */<br>
>> + ATH79_MACH_UBNT_UNIFI_OUTDOOR_PLUS, /* Ubiquiti UnifiAP Outdoor+ */<br>
>> ATH79_MACH_UBNT_XM, /* Ubiquiti Networks XM board rev 1.0 */<br>
>> ++ ATH79_MACH_WEIO, /* WeIO board */<br>
>> + ATH79_MACH_WHR_G301N, /* Buffalo WHR-G301N */<br>
>> + ATH79_MACH_WHR_HP_G300N, /* Buffalo WHR-HP-G300N */<br>
>> + ATH79_MACH_WHR_HP_GN, /* Buffalo WHR-HP-GN */<br>
>> @@ -1437,7 +1438,7 @@<br>
>><br>
>> config ATH79_MACH_UBNT_XM<br>
>> bool "Ubiquiti Networks XM/UniFi boards"<br>
>> -@@ -83,6 +1212,97 @@ config ATH79_MACH_UBNT_XM<br>
>> +@@ -83,6 +1212,106 @@ config ATH79_MACH_UBNT_XM<br>
>> Say 'Y' here if you want your kernel to support the<br>
>> Ubiquiti Networks XM (rev 1.0) board.<br>
>><br>
>> @@ -1511,6 +1512,15 @@<br>
>> + select ATH79_DEV_USB<br>
>> + select ATH79_DEV_WMAC<br>
>> +<br>
>> ++config ATH79_MACH_WEIO<br>
>> ++ bool "WeIO board"<br>
>> ++ select SOC_AR933X<br>
>> ++ select ATH79_DEV_GPIO_BUTTONS<br>
>> ++ select ATH79_DEV_LEDS_GPIO<br>
>> ++ select ATH79_DEV_M25P80<br>
>> ++ select ATH79_DEV_USB<br>
>> ++ select ATH79_DEV_WMAC<br>
>> ++<br>
>> +config ATH79_MACH_BHU_BXU2000N2_A<br>
>> + bool "BHU BXU2000n-2 rev. A support"<br>
>> + select SOC_AR934X<br>
>> @@ -1535,7 +1545,7 @@<br>
>> endmenu<br>
>><br>
>> config SOC_AR71XX<br>
>> -@@ -134,7 +1354,10 @@ config ATH79_DEV_DSA<br>
>> +@@ -134,7 +1363,10 @@ config ATH79_DEV_DSA<br>
>> config ATH79_DEV_ETH<br>
>> def_bool n<br>
>><br>
>> @@ -1547,7 +1557,7 @@<br>
>> def_bool n<br>
>><br>
>> config ATH79_DEV_GPIO_BUTTONS<br>
>> -@@ -164,6 +1387,11 @@ config ATH79_PCI_ATH9K_FIXUP<br>
>> +@@ -164,6 +1396,11 @@ config ATH79_PCI_ATH9K_FIXUP<br>
>> def_bool n<br>
>><br>
>> config ATH79_ROUTERBOOT<br>
>> @@ -1561,7 +1571,7 @@<br>
>> endif<br>
>> --- a/arch/mips/ath79/Makefile<br>
>> +++ b/arch/mips/ath79/Makefile<br>
>> -@@ -38,9 +38,133 @@ obj-$(CONFIG_ATH79_ROUTERBOOT) += route<br>
>> +@@ -38,9 +38,134 @@ obj-$(CONFIG_ATH79_ROUTERBOOT) += route<br>
>> #<br>
>> # Machines<br>
>> #<br>
>> @@ -1670,6 +1680,7 @@<br>
>> +obj-$(CONFIG_ATH79_MACH_TUBE2H) += mach-tube2h.o<br>
>> +obj-$(CONFIG_ATH79_MACH_UBNT) += mach-ubnt.o<br>
>> obj-$(CONFIG_ATH79_MACH_UBNT_XM) += mach-ubnt-xm.o<br>
>> ++obj-$(CONFIG_ATH79_MACH_WEIO) += mach-weio.o<br>
>> +obj-$(CONFIG_ATH79_MACH_WHR_HP_G300N) += mach-whr-hp-g300n.o<br>
>> +obj-$(CONFIG_ATH79_MACH_WLAE_AG300N) += mach-wlae-ag300n.o<br>
>> +obj-$(CONFIG_ATH79_MACH_WLR8100) += mach-wlr8100.o<br>
><br>
><br>
> Jonas<br>
</div></div></blockquote></div><br></div></div>