Re: [LEDE-DEV] [PATCH] brcm2708: backport upstream thermal driver

2017-04-13 Thread Álvaro Fernández Rojas
Maybe you should also provide a new kernel module in modules.mk for this one...

Acked-by: Álvaro Fernández Rojas 

El 02/04/2017 a las 0:34, Rafał Miłecki escribió:
> From: Rafał Miłecki 
> 
> Signed-off-by: Rafał Miłecki 
> ---
>  ...cm2835-add-thermal-driver-for-bcm2835-SoC.patch | 365 
> +
>  1 file changed, 365 insertions(+)
>  create mode 100644 
> target/linux/brcm2708/patches-4.9/081-0001-thermal-bcm2835-add-thermal-driver-for-bcm2835-SoC.patch
> 
> diff --git 
> a/target/linux/brcm2708/patches-4.9/081-0001-thermal-bcm2835-add-thermal-driver-for-bcm2835-SoC.patch
>  
> b/target/linux/brcm2708/patches-4.9/081-0001-thermal-bcm2835-add-thermal-driver-for-bcm2835-SoC.patch
> new file mode 100644
> index 00..a11c542913
> --- /dev/null
> +++ 
> b/target/linux/brcm2708/patches-4.9/081-0001-thermal-bcm2835-add-thermal-driver-for-bcm2835-SoC.patch
> @@ -0,0 +1,365 @@
> +From bcb7dd9ef206f7d646ed8dac6fe7772083714253 Mon Sep 17 00:00:00 2001
> +From: Stefan Wahren 
> +Date: Fri, 31 Mar 2017 20:03:06 +
> +Subject: [PATCH] thermal: bcm2835: add thermal driver for bcm2835 SoC
> +MIME-Version: 1.0
> +Content-Type: text/plain; charset=UTF-8
> +Content-Transfer-Encoding: 8bit
> +
> +Add basic thermal driver for bcm2835 SoC.
> +
> +This driver currently make sure that tsense HW block is set up
> +correctly.
> +
> +Tested-by: Rafał Miłecki 
> +Signed-off-by: Martin Sperl 
> +Signed-off-by: Stefan Wahren 
> +Acked-by: Eric Anholt 
> +Acked-by: Eduardo Valentin 
> +Signed-off-by: Eduardo Valentin 
> +---
> + drivers/thermal/Kconfig   |   8 +
> + drivers/thermal/Makefile  |   1 +
> + drivers/thermal/bcm2835_thermal.c | 314 
> ++
> + 3 files changed, 323 insertions(+)
> + create mode 100644 drivers/thermal/bcm2835_thermal.c
> +
> +--- a/drivers/thermal/Kconfig
>  b/drivers/thermal/Kconfig
> +@@ -434,4 +434,12 @@ depends on (ARCH_QCOM && OF) || COMPILE_
> + source "drivers/thermal/qcom/Kconfig"
> + endmenu
> + 
> ++config BCM2835_THERMAL
> ++tristate "Thermal sensors on bcm2835 SoC"
> ++depends on ARCH_BCM2835 || COMPILE_TEST
> ++depends on HAS_IOMEM
> ++depends on THERMAL_OF
> ++help
> ++  Support for thermal sensors on Broadcom bcm2835 SoCs.
> ++
> + endif
> +--- a/drivers/thermal/Makefile
>  b/drivers/thermal/Makefile
> +@@ -55,3 +55,4 @@ obj-$(CONFIG_TEGRA_SOCTHERM)   += tegra/
> + obj-$(CONFIG_HISI_THERMAL) += hisi_thermal.o
> + obj-$(CONFIG_MTK_THERMAL)   += mtk_thermal.o
> + obj-$(CONFIG_GENERIC_ADC_THERMAL)   += thermal-generic-adc.o
> ++obj-$(CONFIG_BCM2835_THERMAL)   += bcm2835_thermal.o
> +--- /dev/null
>  b/drivers/thermal/bcm2835_thermal.c
> +@@ -0,0 +1,314 @@
> ++/*
> ++ * Driver for Broadcom BCM2835 SoC temperature sensor
> ++ *
> ++ * Copyright (C) 2016 Martin Sperl
> ++ *
> ++ * This program is free software; you can redistribute it and/or modify
> ++ * it under the terms of the GNU General Public License as published by
> ++ * the Free Software Foundation; either version 2 of the License, or
> ++ * (at your option) any later version.
> ++ *
> ++ * This program is distributed in the hope that it will be useful,
> ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
> ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> ++ * GNU General Public License for more details.
> ++ */
> ++
> ++#include 
> ++#include 
> ++#include 
> ++#include 
> ++#include 
> ++#include 
> ++#include 
> ++#include 
> ++#include 
> ++#include 
> ++#include 
> ++#include 
> ++
> ++#define BCM2835_TS_TSENSCTL 0x00
> ++#define BCM2835_TS_TSENSSTAT0x04
> ++
> ++#define BCM2835_TS_TSENSCTL_PRWDW   BIT(0)
> ++#define BCM2835_TS_TSENSCTL_RSTBBIT(1)
> ++
> ++/*
> ++ * bandgap reference voltage in 6 mV increments
> ++ * 000b = 1178 mV, 001b = 1184 mV, ... 111b = 1220 mV
> ++ */
> ++#define BCM2835_TS_TSENSCTL_CTRL_BITS   3
> ++#define BCM2835_TS_TSENSCTL_CTRL_SHIFT  2
> ++#define BCM2835_TS_TSENSCTL_CTRL_MASK   \
> ++GENMASK(BCM2835_TS_TSENSCTL_CTRL_BITS + \
> ++BCM2835_TS_TSENSCTL_CTRL_SHIFT - 1, \
> ++BCM2835_TS_TSENSCTL_CTRL_SHIFT)
> ++#define BCM2835_TS_TSENSCTL_CTRL_DEFAULT1
> ++#define BCM2835_TS_TSENSCTL_EN_INT  BIT(5)
> ++#define BCM2835_TS_TSENSCTL_DIRECT  BIT(6)
> ++#define BCM2835_TS_TSENSCTL_CLR_INT BIT(7)
> ++#define BCM2835_TS_TSENSCTL_THOLD_SHIFT 8
> ++#define BCM2835_TS_TSENSCTL_THOLD_BITS  10
> ++#define BCM2835_TS_TSENSCTL_THOLD_MASK   \
> ++GENMASK(BCM2835_TS_TSENSCTL_THOLD_BITS + \
> ++BCM2835_TS_TSENSCTL_THOLD_SHIFT - 1, \
> ++

Re: [LEDE-DEV] [PATCH] brcm2708: backport upstream sdhost controller driver

2017-04-13 Thread Álvaro Fernández Rojas
You only added CONFIG_MMC_BCM2835_UPSTREAM symbol for bcm2708, missing bcm2709 
and bcm2710, which will break buildbot for those subtargets.

Apart from that, what's the purpose of adding a disabled driver?
Maybe you should create a branch in your staging repo in which this driver is 
enabled by default, in order to see if it works or not.

El 01/04/2017 a las 15:30, Rafał Miłecki escribió:
> From: Rafał Miłecki 
> 
> Signed-off-by: Rafał Miłecki 
> ---
>  target/linux/brcm2708/bcm2708/config-4.9   |1 +
>  ...-Add-new-driver-for-the-sdhost-controller.patch | 1536 
> 
>  ...-Fix-possible-NULL-ptr-dereference-in-bcm.patch |   30 +
>  ...-rename-Kconfig-symbol-to-avoid-downstrea.patch |   40 +
>  4 files changed, 1607 insertions(+)
>  create mode 100644 
> target/linux/brcm2708/patches-4.9/080-0001-mmc-bcm2835-Add-new-driver-for-the-sdhost-controller.patch
>  create mode 100644 
> target/linux/brcm2708/patches-4.9/080-0002-mmc-bcm2835-Fix-possible-NULL-ptr-dereference-in-bcm.patch
>  create mode 100644 
> target/linux/brcm2708/patches-4.9/080-0100-mmc-bcm2835-rename-Kconfig-symbol-to-avoid-downstrea.patch
> 
> diff --git a/target/linux/brcm2708/bcm2708/config-4.9 
> b/target/linux/brcm2708/bcm2708/config-4.9
> index c1bed074c3..76dd1fde18 100644
> --- a/target/linux/brcm2708/bcm2708/config-4.9
> +++ b/target/linux/brcm2708/bcm2708/config-4.9
> @@ -251,6 +251,7 @@ CONFIG_MMC_BCM2835=y
>  CONFIG_MMC_BCM2835_DMA=y
>  CONFIG_MMC_BCM2835_PIO_DMA_BARRIER=2
>  CONFIG_MMC_BCM2835_SDHOST=y
> +# CONFIG_MMC_BCM2835_UPSTREAM is not set
>  CONFIG_MMC_BLOCK=y
>  CONFIG_MMC_BLOCK_MINORS=32
>  CONFIG_MMC_SDHCI=y
> diff --git 
> a/target/linux/brcm2708/patches-4.9/080-0001-mmc-bcm2835-Add-new-driver-for-the-sdhost-controller.patch
>  
> b/target/linux/brcm2708/patches-4.9/080-0001-mmc-bcm2835-Add-new-driver-for-the-sdhost-controller.patch
> new file mode 100644
> index 00..2c0238cad9
> --- /dev/null
> +++ 
> b/target/linux/brcm2708/patches-4.9/080-0001-mmc-bcm2835-Add-new-driver-for-the-sdhost-controller.patch
> @@ -0,0 +1,1536 @@
> +From a7d3e315a02c3154c38d09e51fc9461ba2cac396 Mon Sep 17 00:00:00 2001
> +From: Eric Anholt 
> +Date: Wed, 8 Mar 2017 10:19:03 +0100
> +Subject: [PATCH] mmc: bcm2835: Add new driver for the sdhost controller.
> +
> +The 2835 has two SD controllers: The Arasan sdhci controller (supported
> +by the iproc driver) and a custom sdhost controller.  This patch adds a
> +driver for the latter.
> +
> +The sdhci controller supports both sdcard and sdio.  The sdhost
> +controller supports the sdcard only, but has better performance.  Also
> +note that the rpi3 has sdio wifi, so driving the sdcard with the sdhost
> +controller allows to use the sdhci controller for wifi support.
> +
> +The configuration is done by devicetree via pin muxing.  Both SD
> +controller are available on the same pins (2 pin groups = pin 22 to 27 +
> +pin 48 to 53).  So it's possible to use both SD controllers at the same
> +time with different pin groups.
> +
> +The code was originally written by Phil Elwell in the downstream
> +Rasbperry Pi tree.   In preparation for the upstream merge it was
> +cleaned up and the code base was moderized by Eric Anholt, Stefan
> +Wahren and Gerd Hoffmann.
> +
> +Signed-off-by: Eric Anholt 
> +Signed-off-by: Stefan Wahren 
> +Signed-off-by: Gerd Hoffmann 
> +Signed-off-by: Ulf Hansson 
> +---
> + drivers/mmc/host/Kconfig   |   14 +
> + drivers/mmc/host/Makefile  |1 +
> + drivers/mmc/host/bcm2835.c | 1465 
> 
> + 3 files changed, 1480 insertions(+)
> + create mode 100644 drivers/mmc/host/bcm2835.c
> +
> +--- a/drivers/mmc/host/Kconfig
>  b/drivers/mmc/host/Kconfig
> +@@ -769,6 +769,20 @@ config MMC_TOSHIBA_PCI
> + depends on PCI
> + help
> + 
> ++config MMC_BCM2835
> ++tristate "Broadcom BCM2835 SDHOST MMC Controller support"
> ++depends on ARCH_BCM2835 || COMPILE_TEST
> ++depends on HAS_DMA
> ++help
> ++  This selects the BCM2835 SDHOST MMC controller. If you have
> ++  a BCM2835 platform with SD or MMC devices, say Y or M here.
> ++
> ++  Note that the BCM2835 has two SD controllers: The Arasan
> ++  sdhci controller (supported by MMC_SDHCI_IPROC) and a custom
> ++  sdhost controller (supported by this driver).
> ++
> ++  If unsure, say N.
> ++
> + config MMC_MTK
> + tristate "MediaTek SD/MMC Card Interface support"
> + depends on HAS_DMA
> +--- a/drivers/mmc/host/Makefile
>  b/drivers/mmc/host/Makefile
> +@@ -57,6 +57,7 @@ obj-$(CONFIG_MMC_MOXART)   += moxart-mmc.o
> + obj-$(CONFIG_MMC_SUNXI) += sunxi-mmc.o
> + obj-$(CONFIG_MMC_USDHI6ROL0)+= usdhi6rol0.o
> + obj-$(CONFIG_MMC_TOSHIBA_PCI)   += toshsd.o
> ++obj-$(CONFIG_MMC_BCM2835)   += bcm2835.o
> + 
> + obj-$(CONFIG_MMC_REALTEK_PCI)  

Re: [LEDE-DEV] [PATCH] brcm2708: include upstream bcm2835-rpi-zero DT binary in image

2017-04-13 Thread Álvaro Fernández Rojas
NACK,

If you want to test something with the alternative device trees then you can 
modify a single line while doing so.

Apart from that there are other alternative device trees for the other models, 
so why only adding the pi-zero one?
I guess because that's the one you're using for testing...

BTW, there's another way of using those alternative device trees without adding 
them to config.txt: using --283x when generating the kernel image:
https://github.com/raspberrypi/linux/blob/rpi-4.9.y/scripts/mkknlimg#L47

El 31/03/2017 a las 22:42, Rafał Miłecki escribió:
> From: Rafał Miłecki 
> 
> This allows easier testing/developing/debugging of upstream DTS file.
> Foundation's start.elf doesn't use it on its own so this won't cause any
> regressions. Testing this DTB requires using U-Boot or adding
> device_tree entry to the config.txt.
> 
> Signed-off-by: Rafał Miłecki 
> ---
>  target/linux/brcm2708/image/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target/linux/brcm2708/image/Makefile 
> b/target/linux/brcm2708/image/Makefile
> index 7909c6d814..9c048f5e33 100644
> --- a/target/linux/brcm2708/image/Makefile
> +++ b/target/linux/brcm2708/image/Makefile
> @@ -56,7 +56,7 @@ endef
>  
>  define Device/rpi
>DEVICE_TITLE := Raspberry Pi B/B+/CM/Zero/ZeroW
> -  DEVICE_DTS := bcm2708-rpi-b bcm2708-rpi-b-plus bcm2708-rpi-cm 
> bcm2708-rpi-0-w
> +  DEVICE_DTS := bcm2708-rpi-b bcm2708-rpi-b-plus bcm2708-rpi-cm 
> bcm2708-rpi-0-w bcm2835-rpi-zero
>  endef
>  ifeq ($(SUBTARGET),bcm2708)
>TARGET_DEVICES += rpi
> 

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH] brcm2708: include upstream bcm2835-rpi-zero DT binary in image

2017-04-13 Thread Álvaro Fernández Rojas
Hi Rafał,

Yeah, you're right, but I've been busy with other stuff and I didn't want to 
reply until I had tested your patches.
I will reply now but I haven't been able to test them yet.

Regards,
Álvaro.

El 14/04/2017 a las 0:27, Rafał Miłecki escribió:
> Hi Alvaro,
> 
> On 03/31/2017 10:42 PM, Rafał Miłecki wrote:
>> From: Rafał Miłecki 
>>
>> This allows easier testing/developing/debugging of upstream DTS file.
>> Foundation's start.elf doesn't use it on its own so this won't cause any
>> regressions. Testing this DTB requires using U-Boot or adding
>> device_tree entry to the config.txt.
>>
>> Signed-off-by: Rafał Miłecki 
> 
> I didn't get any response for this or 2 another brcm2708 patches for 2 weeks.
> 
> You are brcm2708 maintainer so I didn't want to push them without your ack but
> I also can't work on brcm2708 having to wait that long every time.
> 
> Would some other solution work for you maybe? Would you be able to provide
> quicker replies or maybe could you give me a green light for pushing brcm2708
> changes on my own?
> 
> Please don't get this question wrong, there is no offence, I'm just looking
> for something that would work well for both of us :)

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH] brcm2708: include upstream bcm2835-rpi-zero DT binary in image

2017-04-13 Thread Rafał Miłecki

Hi Alvaro,

On 03/31/2017 10:42 PM, Rafał Miłecki wrote:

From: Rafał Miłecki 

This allows easier testing/developing/debugging of upstream DTS file.
Foundation's start.elf doesn't use it on its own so this won't cause any
regressions. Testing this DTB requires using U-Boot or adding
device_tree entry to the config.txt.

Signed-off-by: Rafał Miłecki 


I didn't get any response for this or 2 another brcm2708 patches for 2 weeks.

You are brcm2708 maintainer so I didn't want to push them without your ack but
I also can't work on brcm2708 having to wait that long every time.

Would some other solution work for you maybe? Would you be able to provide
quicker replies or maybe could you give me a green light for pushing brcm2708
changes on my own?

Please don't get this question wrong, there is no offence, I'm just looking
for something that would work well for both of us :)

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH] util-linux: fix build with uclibc

2017-04-13 Thread hauke . mehrtens
From: Hauke Mehrtens 

Fix build of scriptreplay with uClibc.
Some parts of the libm detected were backported to 2.29.2, but some parts
were missing, which are added here.

Signed-off-by: Hauke Mehrtens 
---

This should also go into LEDE-17.01 branch.

 .../001-uclibc_add_libm_to_scriptreplay.patch  | 24 ++
 1 file changed, 24 insertions(+)
 create mode 100644 
package/utils/util-linux/patches/001-uclibc_add_libm_to_scriptreplay.patch

diff --git 
a/package/utils/util-linux/patches/001-uclibc_add_libm_to_scriptreplay.patch 
b/package/utils/util-linux/patches/001-uclibc_add_libm_to_scriptreplay.patch
new file mode 100644
index 000..a291f6a
--- /dev/null
+++ b/package/utils/util-linux/patches/001-uclibc_add_libm_to_scriptreplay.patch
@@ -0,0 +1,24 @@
+From feda4342df1ced25df3d200ed23469e740196c86 Mon Sep 17 00:00:00 2001
+From: Karel Zak 
+Date: Wed, 18 Jan 2017 13:17:21 +0100
+Subject: build-sys: use -lm for scriptreplay if necessary
+
+Reported-by: Bert van Hall 
+Addresses: https://github.com/karelzak/util-linux/pull/397
+Signed-off-by: Karel Zak 
+---
+ configure.ac | 7 +++
+ term-utils/Makemodule.am | 2 +-
+ 2 files changed, 8 insertions(+), 1 deletion(-)
+
+--- a/term-utils/Makemodule.am
 b/term-utils/Makemodule.am
+@@ -21,7 +21,7 @@ if BUILD_SCRIPTREPLAY
+ usrbin_exec_PROGRAMS += scriptreplay
+ dist_man_MANS += term-utils/scriptreplay.1
+ scriptreplay_SOURCES = term-utils/scriptreplay.c
+-scriptreplay_LDADD = $(LDADD) libcommon.la
++scriptreplay_LDADD = $(LDADD) libcommon.la $(MATH_LIBS)
+ endif # BUILD_SCRIPTREPLAY
+ 
+ 
-- 
2.10.1


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH 2/2] ipq806x: Add support for ipq40xx subtarget

2017-04-13 Thread Ram Chandra Jangir
This change adds QCA IPQ40xx SoC based board support

Supported IPQ40xx boards:
 - AP-DK01.1-C1 and AP-DK04.1-C1 with nor flash boot.

Network Test:
 - Tested IPv4 and IPv6 connectivity
 - Router can ping device through WAN interface
 - Device on LAN can ping through router.
 - WiFi connectivity AP as well as STA

Signed-off-by: Ram Chandra Jangir 
---
 target/linux/ipq806x/Makefile  |4 +-
 .../ipq806x/base-files/etc/board.d/02_network  |6 +
 .../etc/hotplug.d/firmware/11-ath10k-caldata   |8 +
 target/linux/ipq806x/base-files/lib/ipq806x.sh |6 +
 target/linux/ipq806x/config-4.9|   10 +-
 target/linux/ipq806x/image/Makefile|   30 +-
 target/linux/ipq806x/ipq40xx/config-default|5 +
 target/linux/ipq806x/ipq40xx/target.mk |7 +
 target/linux/ipq806x/modules.mk|   32 +
 ...-Add-support-for-spi-nor-32-MB-flash-and-.patch |  111 ++
 ...9-pinctrl-Updated-various-Pin-definitions.patch | 1332 ++
 ...m-Fix-edma-driver-for-GMAC-avaiable-on-IP.patch | 1937 
 .../854-net-phy-Export-phy-statemachine-API.patch  |   36 +
 .../855-clk-qcom-ipq4019-add-ess-reset.patch   |   58 +
 ...-Fix-mdio-driver-to-work-with-IPQ40xx-SoC.patch |  100 +
 ...arm-dts-Add-ess-switch-device-for-IPQ4019.patch |  486 +
 target/linux/ipq806x/profiles/00-default.mk|3 +-
 17 files changed, 4161 insertions(+), 10 deletions(-)
 create mode 100644 target/linux/ipq806x/ipq40xx/config-default
 create mode 100644 target/linux/ipq806x/ipq40xx/target.mk
 create mode 100644 
target/linux/ipq806x/patches-4.9/851-dts-ipq40xx-Add-support-for-spi-nor-32-MB-flash-and-.patch
 create mode 100644 
target/linux/ipq806x/patches-4.9/852-ipq4019-pinctrl-Updated-various-Pin-definitions.patch
 create mode 100644 
target/linux/ipq806x/patches-4.9/853-net-qualcomm-Fix-edma-driver-for-GMAC-avaiable-on-IP.patch
 create mode 100644 
target/linux/ipq806x/patches-4.9/854-net-phy-Export-phy-statemachine-API.patch
 create mode 100644 
target/linux/ipq806x/patches-4.9/855-clk-qcom-ipq4019-add-ess-reset.patch
 create mode 100644 
target/linux/ipq806x/patches-4.9/857-ipq40xx-Fix-mdio-driver-to-work-with-IPQ40xx-SoC.patch
 create mode 100644 
target/linux/ipq806x/patches-4.9/858-arm-dts-Add-ess-switch-device-for-IPQ4019.patch

diff --git a/target/linux/ipq806x/Makefile b/target/linux/ipq806x/Makefile
index 5a5551c..b5b36e1 100644
--- a/target/linux/ipq806x/Makefile
+++ b/target/linux/ipq806x/Makefile
@@ -8,7 +8,7 @@ BOARDNAME:=Qualcomm Atheros IPQ806X
 FEATURES:=squashfs nand ubifs fpu
 CPU_TYPE:=cortex-a15
 CPU_SUBTYPE:=neon-vfpv4
-SUBTARGETS:=ipq806x
+SUBTARGETS:=ipq806x ipq40xx
 MAINTAINER:=John Crispin 
 
 KERNEL_PATCHVER:=4.9
@@ -21,7 +21,7 @@ DEFAULT_PACKAGES += \
kmod-ata-core kmod-ata-ahci kmod-ata-ahci-platform \
kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport \
kmod-usb3 kmod-usb-dwc3-of-simple kmod-usb-phy-qcom-dwc3 \
-   kmod-ath10k wpad-mini \
+   kmod-ath10k wpad-mini kmod-switch-ar40xx kmod-ipq40xx-edma \
uboot-envtools
 
 $(eval $(call BuildTarget))
diff --git a/target/linux/ipq806x/base-files/etc/board.d/02_network 
b/target/linux/ipq806x/base-files/etc/board.d/02_network
index 36e0fb3..082105a 100755
--- a/target/linux/ipq806x/base-files/etc/board.d/02_network
+++ b/target/linux/ipq806x/base-files/etc/board.d/02_network
@@ -48,6 +48,12 @@ nbg6817)
ucidef_set_interface_macaddr "lan" "$hw_mac_addr"
ucidef_set_interface_macaddr "wan" "$(macaddr_add $hw_mac_addr 1)"
;;
+ap-dk01.1-c1|\
+ap-dk04.1-c1)
+   ucidef_set_interfaces_lan_wan "eth1" "eth0"
+   ucidef_add_switch "switch0" \
+   "0t@eth1" "1:lan" "2:lan" "3:lan" "4:lan"
+   ;;
 *)
echo "Unsupported hardware. Network interfaces not intialized"
;;
diff --git 
a/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata 
b/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index 6526212..46f3f92 100644
--- a/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -51,6 +51,10 @@ case "$FIRMWARE" in
fritz4040)
/usr/bin/fritz_cal_extract -i 1 -s 0x400 -e 0x207 -l 12064 -o 
/lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader_config")
;;
+   ap-dk01.1-c1 |\
+   ap-dk04.1-c1)
+   ath10kcal_extract "0:ART" 4096 12064
+   ;;
esac
;;
 "ath10k/pre-cal-ahb-a80.wifi.bin")
@@ -58,6 +62,10 @@ case "$FIRMWARE" in
fritz4040)
/usr/bin/fritz_cal_extract -i 1 -s 0x400 -e 0x208 -l 12064 -o 
/lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader_config")
;;
+   ap-dk01.1-c1 |\
+   ap-dk04.1-c1)
+   ath10kcal_extract 

Re: [LEDE-DEV] [PATCH 2/2] target/arc770: switch to 4.9 kernel

2017-04-13 Thread Alexey Brodkin
Hi Felix,

On Wed, 2017-04-12 at 12:04 +0300, Alexey Brodkin wrote:
> Hi Felix,
> 
> 
> On Wed, 2017-04-12 at 10:53 +0200, Felix Fietkau wrote:
> > 
> > On 2017-03-12 17:06, Felix Fietkau wrote:
> > > 
> > > 
> > > On 2017-03-10 17:01, Alexey Brodkin wrote:
> > > > 
> > > > 
> > > > Hi Felix,
> > > > 
> > > > On Fri, 2017-03-10 at 16:59 +0100, Felix Fietkau wrote:
> > > > > 
> > > > > 
> > > > > On 2017-03-10 16:57, Alexey Brodkin wrote:
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > Completely forgot about feeds, sorry.
> > > > > > So what I did now was "./scripts/feed uninstall -a", selected 
> > > > > > ARC770 board,
> > > > > > enabled CONFIG_ALL_KMOD and all got built perfectly fine for me.
> > > > > > 
> > > > > > Any other ideas what's missing in my case?
> > > > > Did you create a fresh config with that option selected?
> > > > 
> > > > I think so because I
> > > > 1. "rm -rf build_dir/ staging_dir/ bin/ tmp .config*"
> > > > 2. "make menuconfig" where selected the board and ALL_KMODS
> > > Please do that with the latest version of my staging tree and send me
> > > the resulting final .config file.
> > Ping? I still have your changes in my staging tree and I'd like to get
> > this resolved soon.
> 
> I do have this on my todo list but was unfortunately super busy
> with other pretty important things.
> 
> Anyways I was about to start looking at this so please
> stay tuned I expect to update you with my findings very soon.

As you might have seen from my email to USB mailing list I
was able to nail down the problem (which apparently has nothing to do
with ARC or any other architecture in particular).

I think it worth waiting for comments on the mailing list.
If everybody is happy with my patch I'll submit it to Lede or
you may just pick it up as well - it applies on top of 4.9 perfectly fine.

FWIW that's a link to my message in linux-usb LM:
http://marc.info/?l=linux-usb=149208684805545=2

-Alexey
___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH netifd] ubus: add interface method to trigger renew event

2017-04-13 Thread Hans Dedecker
On Wed, Apr 12, 2017 at 7:53 PM, Matthias Schiffer
 wrote:
> Not all topology or connectivity changes may be detected by netifd,
> depending on the underlying technology (e.g. VPN software); this adds a way
> to explicitly trigger a renew.
>
> Signed-off-by: Matthias Schiffer 
Acked-by: Hans Dedecker 
> ---
>  interface.c |  9 +
>  interface.h |  1 +
>  ubus.c  | 14 ++
>  3 files changed, 24 insertions(+)
>
> diff --git a/interface.c b/interface.c
> index f150f7d..593b049 100644
> --- a/interface.c
> +++ b/interface.c
> @@ -1076,6 +1076,15 @@ interface_set_down(struct interface *iface)
> return 0;
>  }
>
> +int
> +interface_renew(struct interface *iface)
> +{
> +   if (iface->state == IFS_TEARDOWN || iface->state == IFS_DOWN)
> +   return -1;
> +
> +   return interface_proto_event(iface->proto, PROTO_CMD_RENEW, false);
> +}
> +
>  void
>  interface_start_pending(void)
>  {
> diff --git a/interface.h b/interface.h
> index 1472324..d35fd98 100644
> --- a/interface.h
> +++ b/interface.h
> @@ -184,6 +184,7 @@ void interface_set_available(struct interface *iface, 
> bool new_state);
>  int interface_set_up(struct interface *iface);
>  int interface_set_down(struct interface *iface);
>  void __interface_set_down(struct interface *iface, bool force);
> +int interface_renew(struct interface *iface);
>
>  void interface_set_main_dev(struct interface *iface, struct device *dev);
>  void interface_set_l3_dev(struct interface *iface, struct device *dev);
> diff --git a/ubus.c b/ubus.c
> index 945eca1..6f7c3e1 100644
> --- a/ubus.c
> +++ b/ubus.c
> @@ -378,6 +378,19 @@ netifd_handle_down(struct ubus_context *ctx, struct 
> ubus_object *obj,
> return 0;
>  }
>
> +static int
> +netifd_handle_renew(struct ubus_context *ctx, struct ubus_object *obj,
> +  struct ubus_request_data *req, const char *method,
> +  struct blob_attr *msg)
> +{
> +   struct interface *iface;
> +
> +   iface = container_of(obj, struct interface, ubus);
> +   interface_renew(iface);
> +
> +   return 0;
> +}
> +
>  static void
>  netifd_add_interface_errors(struct blob_buf *b, struct interface *iface)
>  {
> @@ -914,6 +927,7 @@ netifd_handle_set_data(struct ubus_context *ctx, struct 
> ubus_object *obj,
>  static struct ubus_method iface_object_methods[] = {
> { .name = "up", .handler = netifd_handle_up },
> { .name = "down", .handler = netifd_handle_down },
> +   { .name = "renew", .handler = netifd_handle_renew },
> { .name = "status", .handler = netifd_handle_status },
> { .name = "prepare", .handler = netifd_handle_iface_prepare },
> { .name = "dump", .handler = netifd_handle_dump },
> --
> 2.12.2
>

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev