[LEDE-DEV] [PATCH v3 6/6] ipq806x: Enable ubi image for ipq40xx AP-DK04.1-C1 board

2017-05-24 Thread Ram Chandra Jangir
This change enables ubi image for IPQ40xx AP-DK04.1-C1
board, also add sysupgrage support for AP-DK04.1-C1 and
generates a sysupgrade.tar image.

Testing:
 *Tested on IPQ40xx AP-DK04.1-C1:
   a. NAND boot
   b. ubi sysupgrade

Signed-off-by: Ram Chandra Jangir 
---

Changes since v2:
 *Splitted to individual patches

 target/linux/ipq806x/base-files/lib/upgrade/platform.sh | 1 +
 target/linux/ipq806x/image/Makefile | 1 +
 2 files changed, 2 insertions(+)

diff --git a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh 
b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh
index 8970285..fd08db3 100644
--- a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh
@@ -12,6 +12,7 @@ platform_pre_upgrade() {
 
case "$board" in
ap148 |\
+   ap-dk04.1-c1 |\
d7800 |\
nbg6817 |\
r7500 |\
diff --git a/target/linux/ipq806x/image/Makefile 
b/target/linux/ipq806x/image/Makefile
index 6ebcde5..c49a73e 100644
--- a/target/linux/ipq806x/image/Makefile
+++ b/target/linux/ipq806x/image/Makefile
@@ -264,6 +264,7 @@ endef
 
 define Device/AP-DK04.1-C1
$(call Device/FitImage)
+   $(call Device/UbiFit)
DEVICE_DTS := qcom-ipq4019-ap.dk04.1-c1
KERNEL_LOADADDR := 0x80208000
KERNEL_INSTALL := 1
-- 
2.7.2


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


[LEDE-DEV] [PATCH v3 4/6] ipq806x: Add support for custom data mapping in bam_dma dmaengine

2017-05-24 Thread Ram Chandra Jangir
This change adds a new function to support for preparing DMA descriptor
for custom data.

Signed-off-by: Ram Chandra Jangir 
---

Changes since v2:
 *Splitted to individual patches

 ...gine-qcom-bam_dma-Add-custom-data-mapping.patch | 217 +
 1 file changed, 217 insertions(+)
 create mode 100644 
target/linux/ipq806x/patches-4.9/862-dmaengine-qcom-bam_dma-Add-custom-data-mapping.patch

diff --git 
a/target/linux/ipq806x/patches-4.9/862-dmaengine-qcom-bam_dma-Add-custom-data-mapping.patch
 
b/target/linux/ipq806x/patches-4.9/862-dmaengine-qcom-bam_dma-Add-custom-data-mapping.patch
new file mode 100644
index 000..3b26120
--- /dev/null
+++ 
b/target/linux/ipq806x/patches-4.9/862-dmaengine-qcom-bam_dma-Add-custom-data-mapping.patch
@@ -0,0 +1,217 @@
+From 5a7ccdf845d64b385affdcffaf2defbe9848be15 Mon Sep 17 00:00:00 2001
+From: Ram Chandra Jangir 
+Date: Thu, 20 Apr 2017 10:39:00 +0530
+Subject: [PATCH] dmaengine: qcom: bam_dma: Add custom data mapping
+
+Add a new function to support for preparing DMA descriptor
+for custom data.
+
+Signed-off-by: Abhishek Sahu 
+Signed-off-by: Ram Chandra Jangir 
+---
+ drivers/dma/qcom/bam_dma.c   | 97 +---
+ include/linux/dma/qcom_bam_dma.h | 14 ++
+ include/linux/dmaengine.h| 14 ++
+ 3 files changed, 119 insertions(+), 6 deletions(-)
+
+diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c
+index 03c4eb3..bde8d70 100644
+--- a/drivers/dma/qcom/bam_dma.c
 b/drivers/dma/qcom/bam_dma.c
+@@ -49,6 +49,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+
+ #include "../dmaengine.h"
+ #include "../virt-dma.h"
+@@ -61,11 +62,6 @@ struct bam_desc_hw {
+
+ #define BAM_DMA_AUTOSUSPEND_DELAY 100
+
+-#define DESC_FLAG_INT BIT(15)
+-#define DESC_FLAG_EOT BIT(14)
+-#define DESC_FLAG_EOB BIT(13)
+-#define DESC_FLAG_NWD BIT(12)
+-
+ struct bam_async_desc {
+   struct virt_dma_desc vd;
+
+@@ -670,6 +666,93 @@ static struct dma_async_tx_descriptor 
*bam_prep_slave_sg(struct dma_chan *chan,
+ }
+
+ /**
++ * bam_prep_dma_custom_mapping - Prep DMA descriptor from custom data
++ *
++ * @chan: dma channel
++ * @data: custom data
++ * @flags: DMA flags
++ */
++static struct dma_async_tx_descriptor *bam_prep_dma_custom_mapping(
++  struct dma_chan *chan,
++  void *data, unsigned long flags)
++{
++  struct bam_chan *bchan = to_bam_chan(chan);
++  struct bam_device *bdev = bchan->bdev;
++  struct bam_async_desc *async_desc;
++  struct qcom_bam_custom_data *desc_data = data;
++  u32 i;
++  struct bam_desc_hw *desc;
++  unsigned int num_alloc = 0;
++
++
++  if (!is_slave_direction(desc_data->dir)) {
++  dev_err(bdev->dev, "invalid dma direction\n");
++  return NULL;
++  }
++
++  /* calculate number of required entries */
++  for (i = 0; i < desc_data->sgl_cnt; i++)
++  num_alloc += DIV_ROUND_UP(
++  sg_dma_len(_data->bam_sgl[i].sgl), BAM_FIFO_SIZE);
++
++  /* allocate enough room to accommodate the number of entries */
++  async_desc = kzalloc(sizeof(*async_desc) +
++  (num_alloc * sizeof(struct bam_desc_hw)), GFP_NOWAIT);
++
++  if (!async_desc)
++  goto err_out;
++
++  if (flags & DMA_PREP_FENCE)
++  async_desc->flags |= DESC_FLAG_NWD;
++
++  if (flags & DMA_PREP_INTERRUPT)
++  async_desc->flags |= DESC_FLAG_EOT;
++  else
++  async_desc->flags |= DESC_FLAG_INT;
++
++  async_desc->num_desc = num_alloc;
++  async_desc->curr_desc = async_desc->desc;
++  async_desc->dir = desc_data->dir;
++
++  /* fill in temporary descriptors */
++  desc = async_desc->desc;
++  for (i = 0; i < desc_data->sgl_cnt; i++) {
++  unsigned int remainder;
++  unsigned int curr_offset = 0;
++
++  remainder = sg_dma_len(_data->bam_sgl[i].sgl);
++
++  do {
++  desc->addr = cpu_to_le32(
++  sg_dma_address(_data->bam_sgl[i].sgl) +
++   curr_offset);
++
++  if (desc_data->bam_sgl[i].dma_flags)
++  desc->flags |= cpu_to_le16(
++  desc_data->bam_sgl[i].dma_flags);
++
++  if (remainder > BAM_FIFO_SIZE) {
++  desc->size = cpu_to_le16(BAM_FIFO_SIZE);
++  remainder -= BAM_FIFO_SIZE;
++  curr_offset += BAM_FIFO_SIZE;
++  } else {
++  desc->size = cpu_to_le16(remainder);
++  remainder = 0;
++  }
++
++  async_desc->length += desc->size;
++  desc++;
++ 

[LEDE-DEV] [PATCH v3 5/6] ipq806x: add qpic nand and bam dma node's in ipq4019 dts tree

2017-05-24 Thread Ram Chandra Jangir
This change adds QPIC BAM dma and NAND driver node's in IPQ4019
device tree, also enable this for AP-DK04.1 based boards.

Signed-off-by: Ram Chandra Jangir 
---

Changes since v2:
 *Splitted to individual patches

 ...ts-ipq4019-add-nand-and-qpic-bam-dma-node.patch | 172 +
 1 file changed, 172 insertions(+)
 create mode 100644 
target/linux/ipq806x/patches-4.9/863-dts-ipq4019-add-nand-and-qpic-bam-dma-node.patch

diff --git 
a/target/linux/ipq806x/patches-4.9/863-dts-ipq4019-add-nand-and-qpic-bam-dma-node.patch
 
b/target/linux/ipq806x/patches-4.9/863-dts-ipq4019-add-nand-and-qpic-bam-dma-node.patch
new file mode 100644
index 000..44e162b
--- /dev/null
+++ 
b/target/linux/ipq806x/patches-4.9/863-dts-ipq4019-add-nand-and-qpic-bam-dma-node.patch
@@ -0,0 +1,172 @@
+From 02bbf3c46e1e38e9ca699143566903683e3a015d Mon Sep 17 00:00:00 2001
+From: Ram Chandra Jangir 
+Date: Thu, 20 Apr 2017 10:45:00 +0530
+Subject: [PATCH] dts: ipq4019: add nand and qpic bam dma node
+
+This change adds QPIC BAM dma and NAND driver node's in
+IPQ4019 device tree, also enable this for AP-DK04.1 based
+boards.
+
+Signed-off-by: Ram Chandra Jangir 
+---
+ arch/arm/boot/dts/qcom-ipq4019-ap.dk04.1.dtsi | 75 +++
+ arch/arm/boot/dts/qcom-ipq4019.dtsi   | 38 ++
+ 2 files changed, 113 insertions(+)
+
+diff --git a/arch/arm/boot/dts/qcom-ipq4019-ap.dk04.1.dtsi 
b/arch/arm/boot/dts/qcom-ipq4019-ap.dk04.1.dtsi
+index 09fb047..e94954e 100644
+--- a/arch/arm/boot/dts/qcom-ipq4019-ap.dk04.1.dtsi
 b/arch/arm/boot/dts/qcom-ipq4019-ap.dk04.1.dtsi
+@@ -101,6 +101,86 @@
+   bias-bus-hold;
+   };
+   };
++
++  nand_pins: nand_pins {
++
++   mux_1 {
++   pins = "gpio52", "gpio53", "gpio54",
++  "gpio55", "gpio56", "gpio61",
++  "gpio62", "gpio63", "gpio69";
++   function = "qpic_pad";
++   bias-disable;
++   };
++
++  mux_2 {
++  pins = "gpio67";
++  function = "qpic_pad0";
++  bias-disable;
++  };
++
++  mux_3 {
++  pins = "gpio64";
++  function = "qpic_pad1";
++  bias-disable;
++  };
++
++  mux_4 {
++  pins = "gpio65";
++  function = "qpic_pad2";
++  bias-disable;
++  };
++
++  mux_5 {
++  pins = "gpio66";
++  function = "qpic_pad3";
++  bias-disable;
++  };
++
++  mux_6 {
++  pins = "gpio57";
++  function = "qpic_pad4";
++  bias-disable;
++  };
++
++  mux_7 {
++  pins = "gpio58";
++  function = "qpic_pad5";
++  bias-disable;
++  };
++
++  mux_8 {
++  pins = "gpio59";
++  function = "qpic_pad6";
++  bias-disable;
++  };
++
++  mux_9 {
++  pins = "gpio60";
++  function = "qpic_pad7";
++  bias-disable;
++  };
++
++  mux_10 {
++  pins = "gpio68";
++  function = "qpic_pad8";
++  bias-disable;
++  };
++
++  pullups {
++  pins = "gpio52", "gpio53", "gpio58",
++  "gpio59";
++  bias-pull-up;
++  };
++
++  pulldowns {
++  pins = "gpio54", "gpio55", "gpio56",
++  

[LEDE-DEV] [PATCH v3 3/6] ipq806x: Added bam transaction and support additional CSRs

2017-05-24 Thread Ram Chandra Jangir
This change adds support for below:
- Bam transaction which will be used for any NAND request.
- Reset function for NAND BAM transaction
- Add support for additional CSRs.

Signed-off-by: Ram Chandra Jangir 
---

Changes since v2:
 *Splitted to individual patches

 ...nd-Added-bam-transaction-and-support-addi.patch | 1273 
 1 file changed, 1273 insertions(+)
 create mode 100644 
target/linux/ipq806x/patches-4.9/861-qcom-mtd-nand-Added-bam-transaction-and-support-addi.patch

diff --git 
a/target/linux/ipq806x/patches-4.9/861-qcom-mtd-nand-Added-bam-transaction-and-support-addi.patch
 
b/target/linux/ipq806x/patches-4.9/861-qcom-mtd-nand-Added-bam-transaction-and-support-addi.patch
new file mode 100644
index 000..674de77
--- /dev/null
+++ 
b/target/linux/ipq806x/patches-4.9/861-qcom-mtd-nand-Added-bam-transaction-and-support-addi.patch
@@ -0,0 +1,1273 @@
+From 645c7805f2602569263d7ac78050b2c9e91e3377 Mon Sep 17 00:00:00 2001
+From: Ram Chandra Jangir 
+Date: Thu, 20 Apr 2017 10:23:00 +0530
+Subject: [PATCH] qcom: mtd: nand: Added bam transaction and support
+ additional CSRs
+
+This patch adds the following for NAND BAM DMA support
+ - Bam transaction which will be used for any NAND request.
+It contains the array of command elements, command and
+data sgl. This transaction will be resetted before every
+request.
+ - Allocation function for NAND BAM transaction which will be
+called only once at probe time.
+ - Reset function for NAND BAM transaction which will be called
+before any new NAND request.
+ - Add support for additional CSRs.
+NAND_READ_LOCATION - page offset for reading in BAM DMA mode
+NAND_ERASED_CW_DETECT_CFG - status for erased code words
+NAND_BUFFER_STATUS - status for ECC
+
+Signed-off-by: Abhishek Sahu 
+Signed-off-by: Ram Chandra Jangir 
+---
+ drivers/mtd/nand/qcom_nandc.c| 631 +++
+ include/linux/dma/qcom_bam_dma.h | 149 +
+ 2 files changed, 721 insertions(+), 59 deletions(-)
+ create mode 100644 include/linux/dma/qcom_bam_dma.h
+
+diff --git a/drivers/mtd/nand/qcom_nandc.c b/drivers/mtd/nand/qcom_nandc.c
+index 76a0ffc..9d941e3 100644
+--- a/drivers/mtd/nand/qcom_nandc.c
 b/drivers/mtd/nand/qcom_nandc.c
+@@ -22,6 +22,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+
+ /* NANDc reg offsets */
+ #define   NAND_FLASH_CMD  0x00
+@@ -53,6 +54,8 @@
+ #define   NAND_VERSION0xf08
+ #define   NAND_READ_LOCATION_00xf20
+ #define   NAND_READ_LOCATION_10xf24
++#define   NAND_READ_LOCATION_20xf28
++#define   NAND_READ_LOCATION_30xf2c
+
+ /* dummy register offsets, used by write_reg_dma */
+ #define   NAND_DEV_CMD1_RESTORE   0xdead
+@@ -131,6 +134,11 @@
+ #define   ERASED_PAGE (PAGE_ALL_ERASED | PAGE_ERASED)
+ #define   ERASED_CW   (CODEWORD_ALL_ERASED | 
CODEWORD_ERASED)
+
++/* NAND_READ_LOCATION_n bits */
++#define READ_LOCATION_OFFSET   0
++#define READ_LOCATION_SIZE 16
++#define READ_LOCATION_LAST 31
++
+ /* Version Mask */
+ #define   NAND_VERSION_MAJOR_MASK 0xf000
+ #define   NAND_VERSION_MAJOR_SHIFT28
+@@ -148,6 +156,9 @@
+ #define   FETCH_ID0xb
+ #define   RESET_DEVICE0xd
+
++/* NAND_CTRL bits */
++#defineBAM_MODE_EN BIT(0)
++
+ /*
+  * the NAND controller performs reads/writes with ECC in 516 byte chunks.
+  * the driver calls the chunks 'step' or 'codeword' interchangeably
+@@ -169,12 +180,77 @@
+ #define   ECC_BCH_4BITBIT(2)
+ #define   ECC_BCH_8BITBIT(3)
+
++/* Flags used for BAM DMA desc preparation*/
++/* Don't set the EOT in current tx sgl */
++#define DMA_DESC_FLAG_NO_EOT  (0x0001)
++/* Set the NWD flag in current sgl */
++#define DMA_DESC_FLAG_BAM_NWD (0x0002)
++/* Close current sgl and start writing in another sgl */
++#define DMA_DESC_FLAG_BAM_NEXT_SGL(0x0004)
++/*
++ * Erased codeword status is being used two times in single transfer so this
++ * flag will determine the current value of erased codeword status register
++ */
++#define DMA_DESC_ERASED_CW_SET(0x0008)
++
++/* Returns the dma address for reg read buffer */
++#define REG_BUF_DMA_ADDR(chip, vaddr) \
++  ((chip)->reg_read_buf_phys + \
++  ((uint8_t *)(vaddr) - (uint8_t *)(chip)->reg_read_buf))
++
++/* Returns the nand register physical address */
++#define NAND_REG_PHYS_ADDRESS(chip, addr) \
++  ((chip)->base_dma + (addr))
++
++/* command element array size in bam transaction */
++#define BAM_CMD_ELEMENT_SIZE  (256)
++/* command sgl size in bam transaction */
++#define BAM_CMD_SGL_SIZE  (256)
++/* data sgl size in bam transaction */
++#define 

[LEDE-DEV] [PATCH v3 2/6] ipq806x: Add bam_dma support in qcom_nand driver

2017-05-24 Thread Ram Chandra Jangir
The existing qcom_nand driver supports ADM DMA which is mainly
required for ipq806x family based boards,
IPQ40xx based boards uses BAM DMA in NAND driver, so this patch
adds BAM DMA support with compatible string as qcom,ebi2-nandc-bam.

Signed-off-by: Ram Chandra Jangir 
---

Changes since v2:
 *Splitted to individual patches

 ...nd-Add-bam_dma-support-in-qcom_nand-drive.patch | 382 +
 1 file changed, 382 insertions(+)
 create mode 100644 
target/linux/ipq806x/patches-4.9/860-qcom-mtd-nand-Add-bam_dma-support-in-qcom_nand-drive.patch

diff --git 
a/target/linux/ipq806x/patches-4.9/860-qcom-mtd-nand-Add-bam_dma-support-in-qcom_nand-drive.patch
 
b/target/linux/ipq806x/patches-4.9/860-qcom-mtd-nand-Add-bam_dma-support-in-qcom_nand-drive.patch
new file mode 100644
index 000..ad9d1bb
--- /dev/null
+++ 
b/target/linux/ipq806x/patches-4.9/860-qcom-mtd-nand-Add-bam_dma-support-in-qcom_nand-drive.patch
@@ -0,0 +1,382 @@
+From 074036f9de6b8c5fc642e8e2540950f6a35aa804 Mon Sep 17 00:00:00 2001
+From: Ram Chandra Jangir 
+Date: Thu, 20 Apr 2017 10:31:10 +0530
+Subject: [PATCH] qcom: mtd: nand: Add bam_dma support in qcom_nand driver
+
+The current driver only support ADM DMA so this patch adds the
+BAM DMA support in current NAND driver with compatible string
+qcom,ebi2-nandc-bam.
+Added bam channels and data buffers, NAND BAM uses 3 channels:
+command, data tx and data rx, while ADM uses only single channel.
+So this patch adds the BAM channel in device tree and using the
+same in NAND driver allocation function.
+
+Signed-off-by: Ram Chandra Jangir 
+---
+ .../devicetree/bindings/mtd/qcom_nandc.txt |  69 +++--
+ drivers/mtd/nand/qcom_nandc.c  | 160 +
+ 2 files changed, 190 insertions(+), 39 deletions(-)
+
+diff --git a/Documentation/devicetree/bindings/mtd/qcom_nandc.txt 
b/Documentation/devicetree/bindings/mtd/qcom_nandc.txt
+index 70dd511..9e5c9be 100644
+--- a/Documentation/devicetree/bindings/mtd/qcom_nandc.txt
 b/Documentation/devicetree/bindings/mtd/qcom_nandc.txt
+@@ -1,21 +1,26 @@
+ * Qualcomm NAND controller
+
+ Required properties:
+-- compatible: should be "qcom,ipq806x-nand"
++- compatible: "qcom,ipq806x-nand" for IPQ8064 which uses
++  ADM DMA.
++  "qcom,ebi2-nand-bam" - nand drivers using BAM DMA
++  like IPQ4019.
+ - reg:MMIO address range
+ - clocks: must contain core clock and always on clock
+ - clock-names:must contain "core" for the core clock and 
"aon" for the
+   always on clock
+ - dmas:   DMA specifier, consisting of a phandle to the 
ADM DMA
+-  controller node and the channel number to be used for
+-  NAND. Refer to dma.txt and qcom_adm.txt for more details
+-- dma-names:  must be "rxtx"
+-- qcom,cmd-crci:  must contain the ADM command type CRCI block instance
+-  number specified for the NAND controller on the given
+-  platform
+-- qcom,data-crci: must contain the ADM data type CRCI block instance
+-  number specified for the NAND controller on the given
+-  platform
++  or BAM DMA controller node and the channel number to
++  be used for NAND. Refer to dma.txt, qcom_adm.txt(ADM)
++  and qcom_bam_dma.txt(BAM) for more details
++- dma-names:  "rxtx" - ADM
++  "tx", "rx", "cmd" - BAM
++- qcom,cmd-crci:  Only required for ADM DMA. must contain the ADM command
++  type CRCI block instance number specified for the NAND
++  controller on the given platform.
++- qcom,data-crci: Only required for ADM DMA. must contain the ADM data
++  type CRCI block instance number specified for the NAND
++  controller on the given platform.
+ - #address-cells: <1> - subnodes give the chip-select number
+ - #size-cells:<0>
+
+@@ -44,7 +49,7 @@ partition.txt for more detail.
+ Example:
+
+ nand@1ac0 {
+-  compatible = "qcom,ebi2-nandc";
++  compatible = "qcom,ipq806x-nand","qcom.qcom_nand";
+   reg = <0x1ac0 0x800>;
+
+   clocks = < EBI2_CLK>,
+@@ -84,3 +89,45 @@ nand@1ac0 {
+   };
+   };
+ };
++
++nand@79B {
++  compatible = "qcom,ebi2-nandc-bam";
++  reg = <0x79B 0x1000>;
++
++  clocks = < EBI2_CLK>,
++   < EBI2_AON_CLK>;
++  clock-names = "core", "aon";
++
++  dmas = < 0>,
++  < 1>,
++  < 2>;
++  dma-names = "tx", "rx", "cmd";
++
++  #address-cells = <1>;
++  #size-cells = <0>;
++
++  nandcs@0 {
++  compatible = "qcom,nandcs";
++ 

[LEDE-DEV] [PATCH v3 1/6] ipq806x: Add support to configure ipq40xx GPIO_PULL bits

2017-05-24 Thread Ram Chandra Jangir
GPIO_PULL bits configurations in TLMM_GPIO_CFG register
differs for IPQ40xx from rest of the other qcom SoC's.
This change add support to configure the msm_gpio_pull
bits for ipq40xx, It is required to fix the proper
configurations of gpio-pull bits for nand pins mux.

Signed-off-by: Ram Chandra Jangir 
---

Changes since v2:
 *Splitted to individual patches

 ...-Add-support-to-configure-ipq40xx-GPIO_PU.patch | 260 +
 1 file changed, 260 insertions(+)
 create mode 100644 
target/linux/ipq806x/patches-4.9/859-msm-pinctrl-Add-support-to-configure-ipq40xx-GPIO_PU.patch

diff --git 
a/target/linux/ipq806x/patches-4.9/859-msm-pinctrl-Add-support-to-configure-ipq40xx-GPIO_PU.patch
 
b/target/linux/ipq806x/patches-4.9/859-msm-pinctrl-Add-support-to-configure-ipq40xx-GPIO_PU.patch
new file mode 100644
index 000..bac9e78
--- /dev/null
+++ 
b/target/linux/ipq806x/patches-4.9/859-msm-pinctrl-Add-support-to-configure-ipq40xx-GPIO_PU.patch
@@ -0,0 +1,260 @@
+From e77af7de404eb464f7da9e0daeb8b362cc66a7ba Mon Sep 17 00:00:00 2001
+From: Ram Chandra Jangir 
+Date: Tue, 9 May 2017 11:45:00 +0530
+Subject: [PATCH] msm: pinctrl: Add support to configure ipq40xx GPIO_PULL bits
+
+GPIO_PULL bits configurations in TLMM_GPIO_CFG register
+differs for IPQ40xx from rest of the other qcom SoC's.
+This change add support to configure the msm_gpio_pull
+bits for ipq40xx, It is required to fix the proper
+configurations of gpio-pull bits for nand pins mux.
+
+IPQ40xx SoC:
+2'b10: Internal pull up enable.
+2'b11: Unsupport
+
+For other SoC's:
+2'b10: Keeper
+2'b11: Pull-Up
+
+Signed-off-by: Ram Chandra Jangir 
+---
+ drivers/pinctrl/qcom/pinctrl-apq8064.c |  1 +
+ drivers/pinctrl/qcom/pinctrl-apq8084.c |  1 +
+ drivers/pinctrl/qcom/pinctrl-ipq4019.c |  8 
+ drivers/pinctrl/qcom/pinctrl-ipq8064.c |  1 +
+ drivers/pinctrl/qcom/pinctrl-mdm9615.c |  1 +
+ drivers/pinctrl/qcom/pinctrl-msm.c | 21 -
+ drivers/pinctrl/qcom/pinctrl-msm.h | 19 +++
+ drivers/pinctrl/qcom/pinctrl-msm8660.c |  1 +
+ drivers/pinctrl/qcom/pinctrl-msm8916.c |  1 +
+ drivers/pinctrl/qcom/pinctrl-msm8960.c |  1 +
+ drivers/pinctrl/qcom/pinctrl-msm8x74.c |  1 +
+ 11 files changed, 43 insertions(+), 13 deletions(-)
+
+diff --git a/drivers/pinctrl/qcom/pinctrl-apq8064.c 
b/drivers/pinctrl/qcom/pinctrl-apq8064.c
+index cd96699..63e9a7e 100644
+--- a/drivers/pinctrl/qcom/pinctrl-apq8064.c
 b/drivers/pinctrl/qcom/pinctrl-apq8064.c
+@@ -597,6 +597,7 @@ static const struct msm_pinctrl_soc_data apq8064_pinctrl = 
{
+   .groups = apq8064_groups,
+   .ngroups = ARRAY_SIZE(apq8064_groups),
+   .ngpios = NUM_GPIO_PINGROUPS,
++  .gpio_pull = _gpio_pull,
+ };
+
+ static int apq8064_pinctrl_probe(struct platform_device *pdev)
+diff --git a/drivers/pinctrl/qcom/pinctrl-apq8084.c 
b/drivers/pinctrl/qcom/pinctrl-apq8084.c
+index d07e8df..892250e 100644
+--- a/drivers/pinctrl/qcom/pinctrl-apq8084.c
 b/drivers/pinctrl/qcom/pinctrl-apq8084.c
+@@ -1206,6 +1206,7 @@ static const struct msm_pinctrl_soc_data apq8084_pinctrl 
= {
+   .groups = apq8084_groups,
+   .ngroups = ARRAY_SIZE(apq8084_groups),
+   .ngpios = NUM_GPIO_PINGROUPS,
++  .gpio_pull = _gpio_pull,
+ };
+
+ static int apq8084_pinctrl_probe(struct platform_device *pdev)
+diff --git a/drivers/pinctrl/qcom/pinctrl-ipq4019.c 
b/drivers/pinctrl/qcom/pinctrl-ipq4019.c
+index 571eb51..040e03c 100644
+--- a/drivers/pinctrl/qcom/pinctrl-ipq4019.c
 b/drivers/pinctrl/qcom/pinctrl-ipq4019.c
+@@ -1531,6 +1531,13 @@ static const struct msm_pingroup ipq4019_groups[] = {
+   PINGROUP(99, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
+ };
+
++static const struct msm_pinctrl_gpio_pull ipq4019_gpio_pull = {
++  .no_pull = 0,
++  .pull_down = 1,
++  .keeper = 0,
++  .pull_up = 2,
++};
++
+ static const struct msm_pinctrl_soc_data ipq4019_pinctrl = {
+   .pins = ipq4019_pins,
+   .npins = ARRAY_SIZE(ipq4019_pins),
+@@ -1539,6 +1546,7 @@ static const struct msm_pinctrl_soc_data ipq4019_pinctrl 
= {
+   .groups = ipq4019_groups,
+   .ngroups = ARRAY_SIZE(ipq4019_groups),
+   .ngpios = 100,
++  .gpio_pull = _gpio_pull,
+ };
+
+ static int ipq4019_pinctrl_probe(struct platform_device *pdev)
+diff --git a/drivers/pinctrl/qcom/pinctrl-ipq8064.c 
b/drivers/pinctrl/qcom/pinctrl-ipq8064.c
+index bcb29c0..a927251 100644
+--- a/drivers/pinctrl/qcom/pinctrl-ipq8064.c
 b/drivers/pinctrl/qcom/pinctrl-ipq8064.c
+@@ -630,6 +630,7 @@ static const struct msm_pinctrl_soc_data ipq8064_pinctrl = 
{
+   .groups = ipq8064_groups,
+   .ngroups = ARRAY_SIZE(ipq8064_groups),
+   .ngpios = NUM_GPIO_PINGROUPS,
++  .gpio_pull = _gpio_pull,
+ };
+
+ static int ipq8064_pinctrl_probe(struct platform_device *pdev)
+diff --git a/drivers/pinctrl/qcom/pinctrl-mdm9615.c 
b/drivers/pinctrl/qcom/pinctrl-mdm9615.c
+index 

[LEDE-DEV] [PATCH] kernel: update kernel 4.4 to 4.4.69

2017-05-24 Thread Stijn Segers
Bump the 17.01 tree kernel to 4.4.69. Trunk 4.4 and 17.01 4.4 have diverged, 
talked this
through with jow, he was okay with a clean diff against 17.01 and not a 
backported trunk
patch.

The following patches were applied upstream:

* 062-[1-6]-MIPS-* series
* 042-0004-mtd-bcm47xxpart-fix-parsing-first-block

Reintroduced lantiq/patches-4.4/0050-MIPS-Lantiq-Fix-cascaded-IRQ-setup, as 
it was incorrectly included upstream thus dropped from LEDE, but subsequently
reverted upstream. Thanks to Kevin Darbyshire-Bryant for pointing me to it.

  Compile-tested on: ar71xx, ramips/mt7621, x86/64.

  Run-tested on: ar71xx, ramips/mt7621, x86/64.

Signed-off-by: Stijn Segers 
---
 include/kernel-version.mk  |   4 +-
 .../patches-4.4/910-unaligned_access_hacks.patch   |   4 +-
 .../patches-4.4/0029-Add-dwc_otg-driver.patch  |   2 +-
 ...le-CONFIG_MEMCG-but-leave-it-disabled-due.patch |   4 +-
 ...Restore-IO-APIC-irq_chip-retrigger-callba.patch |  46 
 .../brcm63xx/patches-4.4/577-board_VH4032N.patch   |   6 +-
 ...m47xxpart-don-t-fail-because-of-bit-flips.patch |   4 +-
 ...part-fix-parsing-first-block-after-aligne.patch |  40 ---
 .../062-01-MIPS-Introduce-irq_stack.patch  |  70 -
 ...2-MIPS-Stack-unwinding-while-on-IRQ-stack.patch |  42 
 ...hange-28-to-thread_info-if-coming-from-us.patch |  48 -
 ...IPS-Switch-to-the-irq_stack-in-interrupts.patch | 116 -
 ...05-MIPS-Select-HAVE_IRQ_EXIT_ON_IRQ_STACK.patch |  21 
 ...ack-Fix-erroneous-jal-to-plat_irq_dispatc.patch |  35 ---
 .../patches-4.4/630-packet_socket_type.patch   |   4 +-
 .../666-Add-support-for-MAP-E-FMRs-mesh-mode.patch |  22 ++--
 ...jecting-with-source-address-failed-policy.patch |  22 ++--
 ...dwc3-Validate-the-maximum_speed-parameter.patch |   2 +-
 .../096-08-usb-dwc3-remove-num_event_buffers.patch |  12 +--
 .../096-09-usb-dwc3-drop-ev_buffs-array.patch  |   4 +-
 ...b-phy-Add-Qualcomm-DWC3-HS-SS-PHY-drivers.patch |   2 +-
 .../linux/lantiq/patches-4.4/0047-irq-fixes.patch  |   4 +-
 .../0050-MIPS-Lantiq-Fix-cascaded-IRQ-setup.patch  |  87 
 ...mtd-backport-v4.7-0day-patches-from-Boris.patch |   4 +-
 ...mtd-backport-v4.7-0day-patches-from-Boris.patch |   4 +-
 .../100-clk-sunxi-add-dram-gates-support.patch |   2 +-
 .../107-clk-sunxi-add-h3-usbphy-clocks.patch   |   2 +-
 .../110-clk-sunxi-add-ve-for-sun457i.patch |   4 +-
 28 files changed, 143 insertions(+), 474 deletions(-)
 delete mode 100644 
target/linux/brcm2708/patches-4.4/0577-x86-ioapic-Restore-IO-APIC-irq_chip-retrigger-callba.patch
 delete mode 100644 
target/linux/generic/patches-4.4/042-0004-mtd-bcm47xxpart-fix-parsing-first-block-after-aligne.patch
 delete mode 100644 
target/linux/generic/patches-4.4/062-01-MIPS-Introduce-irq_stack.patch
 delete mode 100644 
target/linux/generic/patches-4.4/062-02-MIPS-Stack-unwinding-while-on-IRQ-stack.patch
 delete mode 100644 
target/linux/generic/patches-4.4/062-03-MIPS-Only-change-28-to-thread_info-if-coming-from-us.patch
 delete mode 100644 
target/linux/generic/patches-4.4/062-04-MIPS-Switch-to-the-irq_stack-in-interrupts.patch
 delete mode 100644 
target/linux/generic/patches-4.4/062-05-MIPS-Select-HAVE_IRQ_EXIT_ON_IRQ_STACK.patch
 delete mode 100644 
target/linux/generic/patches-4.4/062-06-MIPS-IRQ-Stack-Fix-erroneous-jal-to-plat_irq_dispatc.patch
 create mode 100644 
target/linux/lantiq/patches-4.4/0050-MIPS-Lantiq-Fix-cascaded-IRQ-setup.patch

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index b56bb237d9..9660969877 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -3,10 +3,10 @@
 LINUX_RELEASE?=1
 
 LINUX_VERSION-3.18 = .43
-LINUX_VERSION-4.4 = .61
+LINUX_VERSION-4.4 = .69
 
 LINUX_KERNEL_HASH-3.18.43 = 
1236e8123a6ce537d5029232560966feed054ae31776fe8481dd7d18cdd5492c
-LINUX_KERNEL_HASH-4.4.61 = 
30dee7164615ad8184eba4ea6f4906b3ceb2fe462a8a4a929c8e9aab8d4a31da
+LINUX_KERNEL_HASH-4.4.69 = 
207bbc50aaf827d667a2762312bd6127887cc669ff7a7270b876e7102b8f84fa
 
 ifdef KERNEL_PATCHVER
   LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER)))
diff --git a/target/linux/ar71xx/patches-4.4/910-unaligned_access_hacks.patch 
b/target/linux/ar71xx/patches-4.4/910-unaligned_access_hacks.patch
index e7df08b0d2..7e3ba4c8d5 100644
--- a/target/linux/ar71xx/patches-4.4/910-unaligned_access_hacks.patch
+++ b/target/linux/ar71xx/patches-4.4/910-unaligned_access_hacks.patch
@@ -310,7 +310,7 @@
if (t->parms.flags & IP6_TNL_F_USE_ORIG_FWMARK)
 --- a/net/ipv6/ip6_tunnel.c
 +++ b/net/ipv6/ip6_tunnel.c
-@@ -1407,7 +1407,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str
+@@ -1409,7 +1409,7 @@ ip6ip6_tnl_xmit(struct sk_buff *skb, str
  
dsfield = ipv6_get_dsfield(ipv6h);
if (t->parms.flags & IP6_TNL_F_USE_ORIG_TCLASS)
@@ -621,7 +621,7 @@
 * XXX skbs on the gro_list have all been parsed 

[LEDE-DEV] Planning v17.01.2

2017-05-24 Thread Jo-Philipp Wich
Hi,

I'd like to start preparing the v17.01.2 release during the upcoming
weekend with the goal to release final binaries within the next week
(~May 29th till June 3rd).

Changes that shall be part of 17.01.2 should be merged until Sunday, the
28th.

You can find the current list of changes since v17.01.1 at
https://lede-project.org/releases/17.01/changelog-17.01.2

The most notable change is a security fix affecting the builtin dropbear
SSH server. While the default configuration does not appear to be
vulnerable, we still should provide updated images as soon as possible.


If you want specific fixes cherry-picked/backported to lede-17.01,
please mention them in a reply to this mail.

If you have any objections to the release time frame, please speak up


Like with the last 17.01.1 service release, there is no dedicated RC
phase planned.


Thanks,
Jo




signature.asc
Description: OpenPGP digital signature
___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH ubox v3] logread: Add support for output template

2017-05-24 Thread Henry Chang
Hi John,

Thanks for responding. I've added the description to the commit
message and resubmitted a v4 patch here:
http://lists.infradead.org/pipermail/lede-dev/2017-May/007725.html

Regards,

Henry

On Wed, May 24, 2017 at 2:30 AM, John Crispin  wrote:
>
>
> On 02/05/17 03:38, Henry Chang wrote:
>>
>> From: Henry Chang 
>
>
> Hi Henry,
>
> the patch fails to explain what it does and why it should be merged. Please
> add that information
>
> John
>
>
>>
>> Signed-off-by: Henry Chang 
>> ---
>>   log/logread.c | 163
>> --
>>   1 file changed, 137 insertions(+), 26 deletions(-)
>>
>> diff --git a/log/logread.c b/log/logread.c
>> index edac1d9..f06dacc 100644
>> --- a/log/logread.c
>> +++ b/log/logread.c
>> @@ -56,10 +56,25 @@ static const struct blobmsg_policy log_policy[] = {
>> [LOG_TIME] = { .name = "time", .type = BLOBMSG_TYPE_INT64 },
>>   };
>>   +enum {
>> +   TPL_FIELD_MESSAGE,
>> +   TPL_FIELD_PRIORITY,
>> +   TPL_FIELD_SOURCE,
>> +   TPL_FIELD_TIMESTAMP,
>> +};
>> +
>> +static const char *TPL_FIELDS[] = {
>> +   [TPL_FIELD_MESSAGE] = "%message%",
>> +   [TPL_FIELD_PRIORITY] = "%priority%",
>> +   [TPL_FIELD_SOURCE] = "%source%",
>> +   [TPL_FIELD_TIMESTAMP] = "%timestamp%",
>> +};
>> +
>>   static struct uloop_timeout retry;
>>   static struct uloop_fd sender;
>>   static regex_t regexp_preg;
>>   static const char *log_file, *log_ip, *log_port, *log_prefix, *pid_file,
>> *hostname, *regexp_pattern;
>> +static const char *log_template;
>>   static int log_type = LOG_STDOUT;
>>   static int log_size, log_udp, log_follow, log_trailer_null = 0;
>>   static int log_timestamp;
>> @@ -102,6 +117,7 @@ static int log_notify(struct blob_attr *msg)
>> struct stat s;
>> char buf[512];
>> char buf_ts[32];
>> +   char buf_p[11];
>> uint32_t p;
>> char *str;
>> time_t t;
>> @@ -137,34 +153,118 @@ static int log_notify(struct blob_attr *msg)
>> regexec(_preg, m, 0, NULL, 0) == REG_NOMATCH)
>> return 0;
>> t = blobmsg_get_u64(tb[LOG_TIME]) / 1000;
>> -   if (log_timestamp) {
>> -   t_ms = blobmsg_get_u64(tb[LOG_TIME]) % 1000;
>> -   snprintf(buf_ts, sizeof(buf_ts), "[%lu.%03u] ",
>> -   (unsigned long)t, t_ms);
>> -   }
>> +   t_ms = blobmsg_get_u64(tb[LOG_TIME]) % 1000;
>> +   snprintf(buf_ts, sizeof(buf_ts), "[%lu.%03u] ", (unsigned long) t,
>> t_ms);
>> c = ctime();
>> p = blobmsg_get_u32(tb[LOG_PRIO]);
>> c[strlen(c) - 1] = '\0';
>> str = blobmsg_format_json(msg, true);
>> +   snprintf(buf_p, sizeof buf_p, "%u", p);
>> +
>> +   if (log_template) {
>> +   size_t len;
>> +   int tpli = -1;
>> +
>> +   if ((len = strlen(log_template) + 1) > sizeof buf) {
>> +   fprintf(stderr, "size of template is larger than
>> the internal buffer\n");
>> +   return 1;
>> +   }
>> +   strncpy(buf, log_template, len);
>> +
>> +   char *substr = buf;
>> +   for (;;) {
>> +   char *substrnext = NULL;
>> +   for (unsigned short i = 0; i < sizeof TPL_FIELDS /
>> sizeof (char *); ++i) {
>> +   char *substrbuf = strstr(substr,
>> TPL_FIELDS[i]);
>> +   if (!substrbuf || (substrnext && substrbuf
>> > substrnext))
>> +   continue;
>> +   substrnext = substrbuf;
>> +   tpli = i;
>> +   }
>> +   if (!substrnext)
>> +   break;
>> +
>> +   substr = substrnext;
>> +   char *field = NULL;
>> +   switch (tpli) {
>> +   case TPL_FIELD_MESSAGE:
>> +   field = m;
>> +   break;
>> +   case TPL_FIELD_PRIORITY:
>> +   field = buf_p;
>> +   break;
>> +   case TPL_FIELD_SOURCE:
>> +   switch (blobmsg_get_u32(tb[LOG_SOURCE])) {
>> +   case SOURCE_KLOG:
>> +   field = "kernel";
>> +   break;
>> +   case SOURCE_SYSLOG:
>> +   field = "syslog";
>> +   break;
>> +   case SOURCE_INTERNAL:
>> +   field = "internal";
>> +   break;
>> +   default:
>> + 

[LEDE-DEV] [PATCH ubox v4] logread: Add support for output template

2017-05-24 Thread Henry Chang
From: Henry Chang 

This patch let the users be able to define the output template, which
means one can decide how the output logs should look like by providing a
template. With this an user can easily integrate the output logs with
the existing log collecting services that only accept certain input
format.

It supports four pre-defined keywords: %message%, %priority%, %source%,
%timestamp%. These keywords will be replaced with the corresponding
information. Any other words in the template will be printed as-is.

Signed-off-by: Henry Chang 
---
 log/logread.c | 163 --
 1 file changed, 137 insertions(+), 26 deletions(-)

diff --git a/log/logread.c b/log/logread.c
index edac1d9..f06dacc 100644
--- a/log/logread.c
+++ b/log/logread.c
@@ -56,10 +56,25 @@ static const struct blobmsg_policy log_policy[] = {
[LOG_TIME] = { .name = "time", .type = BLOBMSG_TYPE_INT64 },
 };
 
+enum {
+   TPL_FIELD_MESSAGE,
+   TPL_FIELD_PRIORITY,
+   TPL_FIELD_SOURCE,
+   TPL_FIELD_TIMESTAMP,
+};
+
+static const char *TPL_FIELDS[] = {
+   [TPL_FIELD_MESSAGE] = "%message%",
+   [TPL_FIELD_PRIORITY] = "%priority%",
+   [TPL_FIELD_SOURCE] = "%source%",
+   [TPL_FIELD_TIMESTAMP] = "%timestamp%",
+};
+
 static struct uloop_timeout retry;
 static struct uloop_fd sender;
 static regex_t regexp_preg;
 static const char *log_file, *log_ip, *log_port, *log_prefix, *pid_file, 
*hostname, *regexp_pattern;
+static const char *log_template;
 static int log_type = LOG_STDOUT;
 static int log_size, log_udp, log_follow, log_trailer_null = 0;
 static int log_timestamp;
@@ -102,6 +117,7 @@ static int log_notify(struct blob_attr *msg)
struct stat s;
char buf[512];
char buf_ts[32];
+   char buf_p[11];
uint32_t p;
char *str;
time_t t;
@@ -137,34 +153,118 @@ static int log_notify(struct blob_attr *msg)
regexec(_preg, m, 0, NULL, 0) == REG_NOMATCH)
return 0;
t = blobmsg_get_u64(tb[LOG_TIME]) / 1000;
-   if (log_timestamp) {
-   t_ms = blobmsg_get_u64(tb[LOG_TIME]) % 1000;
-   snprintf(buf_ts, sizeof(buf_ts), "[%lu.%03u] ",
-   (unsigned long)t, t_ms);
-   }
+   t_ms = blobmsg_get_u64(tb[LOG_TIME]) % 1000;
+   snprintf(buf_ts, sizeof(buf_ts), "[%lu.%03u] ", (unsigned long) t, 
t_ms);
c = ctime();
p = blobmsg_get_u32(tb[LOG_PRIO]);
c[strlen(c) - 1] = '\0';
str = blobmsg_format_json(msg, true);
+   snprintf(buf_p, sizeof buf_p, "%u", p);
+
+   if (log_template) {
+   size_t len;
+   int tpli = -1;
+
+   if ((len = strlen(log_template) + 1) > sizeof buf) {
+   fprintf(stderr, "size of template is larger than the 
internal buffer\n");
+   return 1;
+   }
+   strncpy(buf, log_template, len);
+
+   char *substr = buf;
+   for (;;) {
+   char *substrnext = NULL;
+   for (unsigned short i = 0; i < sizeof TPL_FIELDS / 
sizeof (char *); ++i) {
+   char *substrbuf = strstr(substr, TPL_FIELDS[i]);
+   if (!substrbuf || (substrnext && substrbuf > 
substrnext))
+   continue;
+   substrnext = substrbuf;
+   tpli = i;
+   }
+   if (!substrnext)
+   break;
+
+   substr = substrnext;
+   char *field = NULL;
+   switch (tpli) {
+   case TPL_FIELD_MESSAGE:
+   field = m;
+   break;
+   case TPL_FIELD_PRIORITY:
+   field = buf_p;
+   break;
+   case TPL_FIELD_SOURCE:
+   switch (blobmsg_get_u32(tb[LOG_SOURCE])) {
+   case SOURCE_KLOG:
+   field = "kernel";
+   break;
+   case SOURCE_SYSLOG:
+   field = "syslog";
+   break;
+   case SOURCE_INTERNAL:
+   field = "internal";
+   break;
+   default:
+   field = "-";
+   break;
+   }
+   break;
+   case TPL_FIELD_TIMESTAMP:
+   field = buf_ts;
+

[LEDE-DEV] [PATCH] ramips: remove fictional LEDs from AsiaRF AWM00x device tree

2017-05-24 Thread Russell Senior

Neither the AsiaRF AWM002 or AWM003 actually has an LED on the module
board.  The ld1 and ld2 do not represent actual LEDs.  These pins might
connect to LEDS on an eval board or other carrier board, but that is 
outside the scope of this device tree file.

Signed-off-by: Russell Senior 
---
 target/linux/ramips/dts/AWM002.dtsi | 14 --
 1 file changed, 14 deletions(-)

diff --git a/target/linux/ramips/dts/AWM002.dtsi 
b/target/linux/ramips/dts/AWM002.dtsi
index 9ff64917ea..00a4ddbcf1 100644
--- a/target/linux/ramips/dts/AWM002.dtsi
+++ b/target/linux/ramips/dts/AWM002.dtsi
@@ -3,20 +3,6 @@
 / {
compatible = "AWM002", "ralink,rt5350-soc";
model = "AsiaRF AWM002";
-
-   gpio-leds {
-   compatible = "gpio-leds";
-
-   ld1 {
-   label = "awm002:green:ld1";
-   gpios = < 0 1>;
-   };
-
-   ld2 {
-   label = "awm002:green:ld2";
-   gpios = < 1 1>;
-   };
-   };
 };
 
  {
-- 
2.13.0




-- 
Russell Senior, President
russ...@personaltelco.net

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


Re: [LEDE-DEV] [PATCH 2/3] usbmode: update usb-modeswitch-data to 20170205

2017-05-24 Thread Piotr Dymacz

Hi Felix,

On 24.05.2017 17:54, Felix Fietkau wrote:

On 2017-05-24 17:14, Piotr Dymacz wrote:

Hello Julian,

On 24.05.2017 16:32, Julian Labus wrote:

add support for new hardware


Thanks for taking care of this.

If you want to keep usb-modeswitch-data version bump in a separate 
commit, I suppose that the PKG_RELEASE should be increased, according to 
the "Packaging guidelines" [1].


Or, maybe it make sense to squash both versions update commits.

[1] https://forum.lede-project.org/t/packaging-guidelines/65/2

I think a PKG_RELEASE bump makes no sense here, neither does squashing
the commits together.


OK, PKG_RELEASE value maintaining was always confusing for me.

--
Cheers,
Piotr


Since the commits are going to be pushed at the same time, there will
not be a snapshot build inbetween...

- Felix




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


Re: [LEDE-DEV] [PATCH 2/3] usbmode: update usb-modeswitch-data to 20170205

2017-05-24 Thread Felix Fietkau
On 2017-05-24 17:14, Piotr Dymacz wrote:
> Hello Julian,
> 
> On 24.05.2017 16:32, Julian Labus wrote:
>> add support for new hardware
> 
> Thanks for taking care of this.
> 
> If you want to keep usb-modeswitch-data version bump in a separate 
> commit, I suppose that the PKG_RELEASE should be increased, according to 
> the "Packaging guidelines" [1].
> 
> Or, maybe it make sense to squash both versions update commits.
> 
> [1] https://forum.lede-project.org/t/packaging-guidelines/65/2
I think a PKG_RELEASE bump makes no sense here, neither does squashing
the commits together.
Since the commits are going to be pushed at the same time, there will
not be a snapshot build inbetween...

- Felix

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


Re: [LEDE-DEV] [PATCH] igmpproxy: Set logopts to "-d" to prevent spamming the system log

2017-05-24 Thread Dmitry Tunin
So it is from that CGNAT network. Nothing is wrong with that. It is
internal ISP net. I just do not want to proxy anything from it.
This is off-topic the sugeested patch.

2017-05-24 16:49 GMT+03:00 Andrew McConachie :
>
>
> On 5/24/17 06:27, Dmitry Tunin wrote:
>>
>> For instance:
>>
>> My ISP streams IPTV from 78.107.196.0/22, so I added it to altnet.
>> There is also an internal ISP net, a part of 100.0.0.0/8, where other
>> computers are connected. They send SSDP packages that I do not want to
>> proxy, and I do not add it to altnet.
>> Igmpproxy warns about every received package. OK, I can add
>> 100.0.0.0/8 to altnet, but still I get warnins about "MFT file not
>> found" now and then. These messages are useless.
>>
> Be careful. The IANA reserved netblock for Carrier Grade NAT (CGNAT) is
> 100.64.0.0/10
>
> This is reserved in RFC 6598. I suspect this is what you're seeing, but you
> don't want to also block legitimate traffic.
>
> --Andrew

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


Re: [LEDE-DEV] [PATCH 2/3] usbmode: update usb-modeswitch-data to 20170205

2017-05-24 Thread Julian Labus
Hi Piotr,

I will resubmit the patch tomorrow in a squashed version. I don't see a reason
to have a package version that will never be used. My thought on this was that
it maybe easier to merge because you already had a similar patch in your staging
tree. But as you already unstaged it this isn't a problem.

Regards,
Julian

On 05/24/2017 05:14 PM, Piotr Dymacz wrote:
> If you want to keep usb-modeswitch-data version bump in a separate commit, I 
> suppose that the PKG_RELEASE should be increased, according to the "Packaging 
> guidelines" [1].
> 
> Or, maybe it make sense to squash both versions update commits.
> 
> [1] https://forum.lede-project.org/t/packaging-guidelines/65/2

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


Re: [LEDE-DEV] [PATCH 2/3] usbmode: update usb-modeswitch-data to 20170205

2017-05-24 Thread Piotr Dymacz

Hello Julian,

On 24.05.2017 16:32, Julian Labus wrote:

add support for new hardware


Thanks for taking care of this.

If you want to keep usb-modeswitch-data version bump in a separate 
commit, I suppose that the PKG_RELEASE should be increased, according to 
the "Packaging guidelines" [1].


Or, maybe it make sense to squash both versions update commits.

[1] https://forum.lede-project.org/t/packaging-guidelines/65/2

--
Cheers,
Piotr



Signed-off-by: Julian Labus 
---
  package/utils/usbmode/Makefile | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/utils/usbmode/Makefile b/package/utils/usbmode/Makefile
index a5c9b19ddf..7f0195fdce 100644
--- a/package/utils/usbmode/Makefile
+++ b/package/utils/usbmode/Makefile
@@ -15,7 +15,7 @@ PKG_LICENSE_FILES:=
  
  PKG_MAINTAINER:=Felix Fietkau 
  
-PKG_DATA_VERSION:=20150115

+PKG_DATA_VERSION:=20170205
  PKG_DATA_URL:=http://www.draisberghof.de/usb_modeswitch
  PKG_DATA_PATH:=usb-modeswitch-data-$(PKG_DATA_VERSION)
  PKG_DATA_FILENAME:=$(PKG_DATA_PATH).tar.bz2
@@ -26,7 +26,7 @@ include $(INCLUDE_DIR)/cmake.mk
  define Download/data
FILE:=$(PKG_DATA_FILENAME)
URL:=$(PKG_DATA_URL)
-  HASH:=90549f589835a68279369c3dc0d47eb7338ee3bad09d737e7b85e1ab15bd2d8b
+  HASH:=e2dcfd9d28928d8d8f03381571a23442b3c50d48d343bc40a1a07d01662738d1
  endef
  $(eval $(call Download,data))
  




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


[LEDE-DEV] [PATCH 3/3] usbmode: remove devices with unsupported modes

2017-05-24 Thread Julian Labus
remove files which include the following mode options
BlackberryMode OptionMode PantechMode QuantaMode

Signed-off-by: Julian Labus 
---
 package/utils/usbmode/Makefile | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/package/utils/usbmode/Makefile b/package/utils/usbmode/Makefile
index 7f0195fdce..1b1ef147b6 100644
--- a/package/utils/usbmode/Makefile
+++ b/package/utils/usbmode/Makefile
@@ -40,8 +40,13 @@ endef
 define Build/Prepare
$(Build/Prepare/Default)
tar xvfj $(DL_DIR)/$(PKG_DATA_FILENAME) -C $(PKG_BUILD_DIR)
-   rm -f \
-   
$(PKG_BUILD_DIR)/$(PKG_DATA_PATH)/usb_modeswitch.d/05c6:1000:sVe=GT
+   #remove devices with unsupported modes
+   for filevar in $(PKG_BUILD_DIR)/$(PKG_DATA_PATH)/usb_modeswitch.d/* ; \
+   do \
+   if grep -q -E '(Quanta|Option|Blackberry|Pantech)Mode' 
"filevar" ; then \
+   rm "filevar" ; \
+   fi \
+   done
cp ./data/* $(PKG_BUILD_DIR)/$(PKG_DATA_PATH)/usb_modeswitch.d/
#in order to keep the Lede GIT repo free of filenames with colons,
#we name the files -
-- 
2.11.0


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


[LEDE-DEV] [PATCH 2/3] usbmode: update usb-modeswitch-data to 20170205

2017-05-24 Thread Julian Labus
add support for new hardware

Signed-off-by: Julian Labus 
---
 package/utils/usbmode/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/utils/usbmode/Makefile b/package/utils/usbmode/Makefile
index a5c9b19ddf..7f0195fdce 100644
--- a/package/utils/usbmode/Makefile
+++ b/package/utils/usbmode/Makefile
@@ -15,7 +15,7 @@ PKG_LICENSE_FILES:=
 
 PKG_MAINTAINER:=Felix Fietkau 
 
-PKG_DATA_VERSION:=20150115
+PKG_DATA_VERSION:=20170205
 PKG_DATA_URL:=http://www.draisberghof.de/usb_modeswitch
 PKG_DATA_PATH:=usb-modeswitch-data-$(PKG_DATA_VERSION)
 PKG_DATA_FILENAME:=$(PKG_DATA_PATH).tar.bz2
@@ -26,7 +26,7 @@ include $(INCLUDE_DIR)/cmake.mk
 define Download/data
   FILE:=$(PKG_DATA_FILENAME)
   URL:=$(PKG_DATA_URL)
-  HASH:=90549f589835a68279369c3dc0d47eb7338ee3bad09d737e7b85e1ab15bd2d8b
+  HASH:=e2dcfd9d28928d8d8f03381571a23442b3c50d48d343bc40a1a07d01662738d1
 endef
 $(eval $(call Download,data))
 
-- 
2.11.0


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


[LEDE-DEV] [PATCH 1/3] usbmode: update to latest version

2017-05-24 Thread Julian Labus
453da8e convert-modeswitch.pl: fix message indices

Signed-off-by: Julian Labus 
---
 package/utils/usbmode/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/utils/usbmode/Makefile b/package/utils/usbmode/Makefile
index 6cf495ca4b..a5c9b19ddf 100644
--- a/package/utils/usbmode/Makefile
+++ b/package/utils/usbmode/Makefile
@@ -5,9 +5,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(LEDE_GIT)/project/usbmode.git
-PKG_SOURCE_DATE:=2016-11-21
-PKG_SOURCE_VERSION:=22f041e18df06f19d2df0d5ccc824424ffe003f9
-PKG_MIRROR_HASH:=3c4cc32cdc6968f0e5d2b8e17dba4aa2cde49d4b1e4b3836eec76f3b3f7a324f
+PKG_SOURCE_DATE:=2017-05-24
+PKG_SOURCE_VERSION:=453da8e540b1c53d357b897d6c70372cd4633390
+PKG_MIRROR_HASH:=b4a7132b940192f2e9a74bd890bd7008ede701e1d52284c3ade0cdc7d663929f
 CMAKE_INSTALL:=1
 
 PKG_LICENSE:=GPL-2.0
-- 
2.11.0


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


[LEDE-DEV] [PATCH 0/3] usbmode: update to latest version

2017-05-24 Thread Julian Labus
This updates usbmode to the latest version which fixed wrong indices.
In addition usb-modeswitch-data is updated to the latest version which
supersedes the PR #1067 from Github that is not yet merged upstream but
in the Staging tree of Piotr Dymacz. The third commit add a section to
the Makefile which removes all files for devices with Mode options not
yet supported by usbmode.

Julian Labus (3):
  usbmode: update to latest version
  usbmode: update usb-modeswitch-data to 20170205
  usbmode: remove devices with unsupported modes

 package/utils/usbmode/Makefile | 19 ---
 1 file changed, 12 insertions(+), 7 deletions(-)

-- 
2.11.0


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


Re: [LEDE-DEV] [PATCH] igmpproxy: Set logopts to "-d" to prevent spamming the system log

2017-05-24 Thread Andrew McConachie



On 5/24/17 06:27, Dmitry Tunin wrote:

For instance:

My ISP streams IPTV from 78.107.196.0/22, so I added it to altnet.
There is also an internal ISP net, a part of 100.0.0.0/8, where other
computers are connected. They send SSDP packages that I do not want to
proxy, and I do not add it to altnet.
Igmpproxy warns about every received package. OK, I can add
100.0.0.0/8 to altnet, but still I get warnins about "MFT file not
found" now and then. These messages are useless.

Be careful. The IANA reserved netblock for Carrier Grade NAT (CGNAT) is 
100.64.0.0/10


This is reserved in RFC 6598. I suspect this is what you're seeing, but 
you don't want to also block legitimate traffic.


--Andrew

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


Re: [LEDE-DEV] [PATCH packages] libwebsockets: set PROVIDES for all variants

2017-05-24 Thread Rafał Miłecki
On 30 March 2017 at 12:45, Karl Palsson  wrote:
> From conversations when we were adding this in mosquitto, we
> actually need to rename the default package to use PROVIDES
> properly.
>
> jow pointed out that you can't have PROVIDES == actual package
> name.
>
> Also, libwebsockets is maintained in the packages feed, not here
> on lede-dev.

Karl, please don't drop mailing list when replying.

It's true PKG_NAME is set to libwebsockets, but actual packages are called:
libwebsockets-openssl
libwebsockets-cyassl
libwebsockets-full

Is this a problem to have the same name in PKG_NAME and PROVIDES? I
saw this in openvpn and px5g packages and I think it is working fine.
I believe my testing of this libwebsockets patch also didn't show any
problem.

Jo can you comment on this, please?

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


Re: [LEDE-DEV] [PATCH packages] libwebsockets: bump to 2.2.1

2017-05-24 Thread Rafał Miłecki
On 29 March 2017 at 19:16, Rafał Miłecki  wrote:
> From: Rafał Miłecki 
>
> For changes since 2.0.x see
> https://github.com/warmcat/libwebsockets/blob/v2.2-stable/changelog
>
> Signed-off-by: Rafał Miłecki 

For a reference: patch ignored and not needed anymore since Karl
bumped package on his own in commit 3aab07b0d6528 ("libwebsockets:
bump to 2.2.1").

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


Re: [LEDE-DEV] [PATCH] igmpproxy: Set logopts to "-d" to prevent spamming the system log

2017-05-24 Thread Dmitry Tunin
Hi Felix,

This is a very well known issue with igmpproxy, not only on LEDE/Openwrt.
Obviously there are other ways to silence these warnings. I could
patch the igmpproxy code, or do other things.
But from the point of view of a normal user who installs this package
to watch IPTV or something of this sort of things it is confusing when
syslog is full of warnings.

For instance:

My ISP streams IPTV from 78.107.196.0/22, so I added it to altnet.
There is also an internal ISP net, a part of 100.0.0.0/8, where other
computers are connected. They send SSDP packages that I do not want to
proxy, and I do not add it to altnet.
Igmpproxy warns about every received package. OK, I can add
100.0.0.0/8 to altnet, but still I get warnins about "MFT file not
found" now and then. These messages are useless.

It is quite easy to remove this option, if someone needs these
warnings to configure "altnets". It is also easy to add it there too.

The bottom line is that the default behavior should be without these
warnings to keep  it neat for an end user IMHO.
I think this is the easiest way to do it.

Regards,

Dmitry.

2017-05-24 12:52 GMT+03:00 Felix Fietkau :
> On 2017-05-15 22:04, Dmitry Tunin wrote:
>> This option redirects the igmpproxy to STDERR instead of system log.
>> Without this option the system log is unusable because igmpproxy warns about
>> every SSDP package recieved from wan.
>>
>> Signed-off-by: Dmitry Tunin 
> I think you should reduce the debug level or fix the bogus warnings instead.
>
> - Felix

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


Re: [LEDE-DEV] [PATCH usbmode] fix indices of messages

2017-05-24 Thread Felix Fietkau
On 2017-05-24 11:55, Julian Labus wrote:
> Seems to work as well.
> 
> I ran the script against usb-modeswitch-data-20170205 and don't see wrong 
> indices.
Pushed to usbmode.git, thanks for testing.

- Felix

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


Re: [LEDE-DEV] [PATCH 2/2] kernel: kmod-usb-net-pl: Add support for PL-27A1

2017-05-24 Thread Rafał Miłecki
On 25 April 2017 at 13:07, Roman Spychała  wrote:
> From: Roman Spychała 
>
> Just applying the same patch to 4.4 and 4.9 kernels.
>
> Signed-off-by: Roman Spychała 

Hi Roman,

I can see your patch has been applied by David:
https://patchwork.kernel.org/patch/9690015/

Please feel free to resend this patch but use 0xx prefix instead of 8xx.

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


Re: [LEDE-DEV] [PATCH v5 1/2] ar71xx: Add support for TP-Link MR6400

2017-05-24 Thread John Crispin

Hi


On 02/04/17 15:25, Filip Moc wrote:

You can flash via tftp recovery (serve factory image as /mr6400_tp_recovery.bin
on 192.168.0.66/24, connect to any ethernet port and power on device while
holding the reset button). Flashing via OEM web interface does not work.

Hardware Specification (v1.0 EU):
  - SoC: QCA9531
  - Flash: Winbond W25Q64FV (8MiB)
  - RAM: EtronTech EM6AB160TSE-5G (64MiB)
  - Wireless: SoC platform only (2.4GHz b/g/n, 2x internal antenna)
  - Ethernet: 2NIC (3x100M + 1x100M)
  - WWAN: TP-LINK LTE MODULE (2x external detachable antenna)
  - Power: DC 12V 1A

Signed-off-by: Filip Moc 
---
I am afraind this no longer applies, sorry for the delay and while 
rebasing could you please also add




diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4
index 206ace6..6c70091 100644
--- a/target/linux/ar71xx/config-4.4
+++ b/target/linux/ar71xx/config-4.4
@@ -169,6 +169,7 @@ CONFIG_ATH79_MACH_TL_MR11U=y
  CONFIG_ATH79_MACH_TL_MR13U=y
  CONFIG_ATH79_MACH_TL_MR3020=y
  CONFIG_ATH79_MACH_TL_MR3X20=y
+CONFIG_ATH79_MACH_TL_MR6400=y
  CONFIG_ATH79_MACH_TL_WA701ND_V2=y
  CONFIG_ATH79_MACH_TL_WA7210N_V2=y
  CONFIG_ATH79_MACH_TL_WA801ND_V3=y
the symbol as undefined to the nand and mikrotik config files, otherwise 
the builders will spew errors


John



diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt 
b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
index 514d05d..aaec03c 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
@@ -1358,6 +1358,16 @@ config ATH79_MACH_TL_MR3X20
select ATH79_DEV_M25P80
select ATH79_DEV_USB
  
+config ATH79_MACH_TL_MR6400

+   bool "TP-LINK TL-MR6400 support"
+   select SOC_QCA953X
+   select ATH79_DEV_ETH
+   select ATH79_DEV_GPIO_BUTTONS
+   select ATH79_DEV_LEDS_GPIO
+   select ATH79_DEV_M25P80
+   select ATH79_DEV_USB
+   select ATH79_DEV_WMAC
+
  config ATH79_MACH_TL_WAX50RE
bool "TP-LINK TL-WA750/850RE support"
select SOC_AR934X
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile 
b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
index 6475259..ef2dc40 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile
@@ -174,6 +174,7 @@ obj-$(CONFIG_ATH79_MACH_TL_MR11U)   += 
mach-tl-mr11u.o
  obj-$(CONFIG_ATH79_MACH_TL_MR13U) += mach-tl-mr13u.o
  obj-$(CONFIG_ATH79_MACH_TL_MR3020)+= mach-tl-mr3020.o
  obj-$(CONFIG_ATH79_MACH_TL_MR3X20)+= mach-tl-mr3x20.o
+obj-$(CONFIG_ATH79_MACH_TL_MR6400) += mach-tl-mr6400.o
  obj-$(CONFIG_ATH79_MACH_TL_WA701ND_V2)+= mach-tl-wa701nd-v2.o
  obj-$(CONFIG_ATH79_MACH_TL_WA7210N_V2)+= mach-tl-wa7210n-v2.o
  obj-$(CONFIG_ATH79_MACH_TL_WA801ND_V3)+= mach-tl-wa801nd-v3.o
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-mr6400.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-mr6400.c
new file mode 100644
index 000..be49c89
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-mr6400.c
@@ -0,0 +1,151 @@
+/*
+ * TP-LINK TL-MR6400 board support
+ *
+ *  Copyright (C) 2017 Filip Moc 
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+ * DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE.
+ */
+
+#include 
+#include 
+
+#include 
+
+#include "common.h"
+#include "dev-gpio-buttons.h"
+#include "dev-eth.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-usb.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+
+#define TL_MR6400_GPIO_LTE_POWER   4
+#define TL_MR6400_GPIO_BTN_RESET   12  /* SW2 */
+#define TL_MR6400_GPIO_BTN_RFKILL  14  /* SW3 */
+#define TL_MR6400_GPIO_LED_WAN 0   /* D12 */
+#define TL_MR6400_GPIO_LED_4G  1   /* D11 */
+#define TL_MR6400_GPIO_LED_WPS 3   /* D5  */
+#define TL_MR6400_GPIO_LED_WLAN11  /* D3  */
+#define TL_MR6400_GPIO_LED_POWER   13  /* D2  */
+#define TL_MR6400_GPIO_LED_LAN 16  /* D4  */
+
+#define TL_MR6400_KEYS_POLL_INTERVAL   20 /* msecs */
+#define TL_MR6400_KEYS_DEBOUNCE_INTERVAL (3 * TL_MR6400_KEYS_POLL_INTERVAL)
+
+#define TL_MR6400_WMAC_CALDATA_OFFSET  0x1000
+
+static const char *tl_mr6400_part_probes[] = {
+   "tp-link",
+   NULL,
+};
+
+static struct flash_platform_data tl_mr6400_flash_data = {
+   .part_probes= 

Re: [LEDE-DEV] [PATCH usbmode] fix indices of messages

2017-05-24 Thread Julian Labus
Seems to work as well.

I ran the script against usb-modeswitch-data-20170205 and don't see wrong 
indices.

On 05/24/2017 11:38 AM, Felix Fietkau wrote:
> On 2017-05-18 15:18, Julian Labus wrote:
>> the way how the script checked if a key already exists in a hash
>> leads to wrong indices for %messages.
>>
>> Signed-off-by: Julian Labus 
> The patch looks a bit convoluted. How about this instead?
> 
> --- a/convert-modeswitch.pl
> +++ b/convert-modeswitch.pl
> @@ -9,7 +9,7 @@ sub add_message {
>   my $msg = shift;
>   my $val = $messages{$msg};
>  
> - $val or do {
> + defined($val) or do {
>   $val = $msg_ctr++;
>   $messages{$msg} = $val;
>   };

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


Re: [LEDE-DEV] [PATCH] igmpproxy: Set logopts to "-d" to prevent spamming the system log

2017-05-24 Thread Felix Fietkau
On 2017-05-15 22:04, Dmitry Tunin wrote:
> This option redirects the igmpproxy to STDERR instead of system log.
> Without this option the system log is unusable because igmpproxy warns about
> every SSDP package recieved from wan.
> 
> Signed-off-by: Dmitry Tunin 
I think you should reduce the debug level or fix the bogus warnings instead.

- Felix

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


Re: [LEDE-DEV] [PATCH usbmode] fix indices of messages

2017-05-24 Thread Felix Fietkau
On 2017-05-18 15:18, Julian Labus wrote:
> the way how the script checked if a key already exists in a hash
> leads to wrong indices for %messages.
> 
> Signed-off-by: Julian Labus 
The patch looks a bit convoluted. How about this instead?

--- a/convert-modeswitch.pl
+++ b/convert-modeswitch.pl
@@ -9,7 +9,7 @@ sub add_message {
my $msg = shift;
my $val = $messages{$msg};
 
-   $val or do {
+   defined($val) or do {
$val = $msg_ctr++;
$messages{$msg} = $val;
};

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


Re: [LEDE-DEV] [PATCH ubox v3] logread: Add support for output template

2017-05-24 Thread John Crispin



On 02/05/17 03:38, Henry Chang wrote:

From: Henry Chang 


Hi Henry,

the patch fails to explain what it does and why it should be merged. 
Please add that information


John



Signed-off-by: Henry Chang 
---
  log/logread.c | 163 --
  1 file changed, 137 insertions(+), 26 deletions(-)

diff --git a/log/logread.c b/log/logread.c
index edac1d9..f06dacc 100644
--- a/log/logread.c
+++ b/log/logread.c
@@ -56,10 +56,25 @@ static const struct blobmsg_policy log_policy[] = {
[LOG_TIME] = { .name = "time", .type = BLOBMSG_TYPE_INT64 },
  };
  
+enum {

+   TPL_FIELD_MESSAGE,
+   TPL_FIELD_PRIORITY,
+   TPL_FIELD_SOURCE,
+   TPL_FIELD_TIMESTAMP,
+};
+
+static const char *TPL_FIELDS[] = {
+   [TPL_FIELD_MESSAGE] = "%message%",
+   [TPL_FIELD_PRIORITY] = "%priority%",
+   [TPL_FIELD_SOURCE] = "%source%",
+   [TPL_FIELD_TIMESTAMP] = "%timestamp%",
+};
+
  static struct uloop_timeout retry;
  static struct uloop_fd sender;
  static regex_t regexp_preg;
  static const char *log_file, *log_ip, *log_port, *log_prefix, *pid_file, 
*hostname, *regexp_pattern;
+static const char *log_template;
  static int log_type = LOG_STDOUT;
  static int log_size, log_udp, log_follow, log_trailer_null = 0;
  static int log_timestamp;
@@ -102,6 +117,7 @@ static int log_notify(struct blob_attr *msg)
struct stat s;
char buf[512];
char buf_ts[32];
+   char buf_p[11];
uint32_t p;
char *str;
time_t t;
@@ -137,34 +153,118 @@ static int log_notify(struct blob_attr *msg)
regexec(_preg, m, 0, NULL, 0) == REG_NOMATCH)
return 0;
t = blobmsg_get_u64(tb[LOG_TIME]) / 1000;
-   if (log_timestamp) {
-   t_ms = blobmsg_get_u64(tb[LOG_TIME]) % 1000;
-   snprintf(buf_ts, sizeof(buf_ts), "[%lu.%03u] ",
-   (unsigned long)t, t_ms);
-   }
+   t_ms = blobmsg_get_u64(tb[LOG_TIME]) % 1000;
+   snprintf(buf_ts, sizeof(buf_ts), "[%lu.%03u] ", (unsigned long) t, 
t_ms);
c = ctime();
p = blobmsg_get_u32(tb[LOG_PRIO]);
c[strlen(c) - 1] = '\0';
str = blobmsg_format_json(msg, true);
+   snprintf(buf_p, sizeof buf_p, "%u", p);
+
+   if (log_template) {
+   size_t len;
+   int tpli = -1;
+
+   if ((len = strlen(log_template) + 1) > sizeof buf) {
+   fprintf(stderr, "size of template is larger than the 
internal buffer\n");
+   return 1;
+   }
+   strncpy(buf, log_template, len);
+
+   char *substr = buf;
+   for (;;) {
+   char *substrnext = NULL;
+   for (unsigned short i = 0; i < sizeof TPL_FIELDS / 
sizeof (char *); ++i) {
+   char *substrbuf = strstr(substr, TPL_FIELDS[i]);
+   if (!substrbuf || (substrnext && substrbuf > 
substrnext))
+   continue;
+   substrnext = substrbuf;
+   tpli = i;
+   }
+   if (!substrnext)
+   break;
+
+   substr = substrnext;
+   char *field = NULL;
+   switch (tpli) {
+   case TPL_FIELD_MESSAGE:
+   field = m;
+   break;
+   case TPL_FIELD_PRIORITY:
+   field = buf_p;
+   break;
+   case TPL_FIELD_SOURCE:
+   switch (blobmsg_get_u32(tb[LOG_SOURCE])) {
+   case SOURCE_KLOG:
+   field = "kernel";
+   break;
+   case SOURCE_SYSLOG:
+   field = "syslog";
+   break;
+   case SOURCE_INTERNAL:
+   field = "internal";
+   break;
+   default:
+   field = "-";
+   break;
+   }
+   break;
+   case TPL_FIELD_TIMESTAMP:
+   field = buf_ts;
+   break;
+   }
+   if (!field || tpli < 0)
+   continue;
+
+   char buf2[sizeof buf] = {'\0'};
+   short availen = sizeof buf2 - 1;
+
+   availen -= substr - buf;
+   

Re: [LEDE-DEV] [PATCH] kernel: add kmod-snd-aloop package

2017-05-24 Thread John Crispin



On 25/04/17 09:46, Felix Fietkau wrote:

On 2017-04-25 09:37, Roman Spychała wrote:

From: Roman Spychała 

Signed-off-by: Roman Spychała 

I'm curious, what are you using this for?

- Felix




Hi Roman,

could you answer felix's question ? i am also inclined to not merge this 
as i dont see the purpose of it


John

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


Re: [LEDE-DEV] [PATCH] libre: Add zlib dependency

2017-05-24 Thread John Crispin



On 20/04/17 15:44, Roman Spychała wrote:

From: Roman Spychała 


The patch fails to explain why this is required. please provide that info

John


Signed-off-by: Roman Spychała 
---
  libs/re/Makefile | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libs/re/Makefile b/libs/re/Makefile
index 175a23c..af173f9 100644
--- a/libs/re/Makefile
+++ b/libs/re/Makefile
@@ -26,7 +26,7 @@ define Package/libre
SUBMENU:=Telephony
SECTION:=libs
CATEGORY:=Libraries
-  DEPENDS:=+libopenssl +libpthread
+  DEPENDS:=+libopenssl +libpthread +zlib
TITLE:=Generic library for real-time communications with async IO support
URL:=http://www.creytiv.com/
  endef



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


Re: [LEDE-DEV] [PATCH 2/2] kernel: kmod-usb-net-pl: Add support for PL-27A1

2017-05-24 Thread John Crispin



On 25/04/17 13:20, Bjørn Mork wrote:

Roman Spychała  writes:


diff --git 
a/target/linux/generic/patches-4.4/870-usb-plusb-Add-support-for-PL-27A1.patch 
b/target/linux/generic/patches-4.4/870-usb-plusb-Add-support-for-PL-27A1.patch
new file mode 100644
index 00..794a861993
--- /dev/null
+++ 
b/target/linux/generic/patches-4.4/870-usb-plusb-Add-support-for-PL-27A1.patch
@@ -0,0 +1,72 @@
+From 07ddf5fce9dae47ced9f04653075021301052c99 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Roman=20Spycha=C5=82a?= 
+Date: Thu, 20 Apr 2017 11:40:14 +0200
+Subject: [PATCH] usb: plusb: Add support for PL-27A1
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This patch adds support for the PL-27A1 by adding the appropriate
+USB ID's. This chip is used in the goobay Active USB 3.0 Data Link
+and Unitek Y-3501 cables.

Why do we need LEDE patches for new device IDs?  There is nothing LEDE
specific about this. Surely it can be handled through the normal stable
kernel updates?


Bjørn


I agree on this one, please make sure to send this patch upstream first. 
independent of that I have just merged 1/2.


John


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



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


Re: [LEDE-DEV] [PATCH] imx6: disable UART dma

2017-05-24 Thread John Crispin



On 16/05/17 11:57, Koen Vandeputte wrote:

Fixes these prints on boot:

[   13.785600] imx-uart 202.serial: DMA transaction error.
[   13.793134] imx-uart 202.serial: DMA transaction error.
[   13.798721] imx-uart 202.serial: DMA transaction error.

These error prints can only be seen when viewing the bootlog through
uart.
They are not visible when consulting dmesg.

Based on following upstream patch by Tim Harvey (Gateworks):

https://github.com/Gateworks/openwrt/commit/80a01b6582f94c4547f39d3a25e0a1e9b6eb9877

TX complete DMA messages are getting missed.
This is also currently an issue in mainline.
For now we will disable DMA in serial/imx.c.

This resolves an issue encountered with RS485 transmit.

Signed-off-by: Koen Vandeputte 
---

WARNING!
This patch is based on kernel 4.9.28 and thus needs following patch applied 
first:

"kernel: update kernel 4.9 to 4.9.28"


  target/linux/imx6/patches-4.9/210-disable-uart-dma.patch | 13 +
  1 file changed, 13 insertions(+)
  create mode 100644 target/linux/imx6/patches-4.9/210-disable-uart-dma.patch

diff --git a/target/linux/imx6/patches-4.9/210-disable-uart-dma.patch 
b/target/linux/imx6/patches-4.9/210-disable-uart-dma.patch
new file mode 100644
index 000..a370420
--- /dev/null
+++ b/target/linux/imx6/patches-4.9/210-disable-uart-dma.patch
@@ -0,0 +1,13 @@
+--- a/drivers/tty/serial/imx.c
 b/drivers/tty/serial/imx.c
+@@ -1269,8 +1269,10 @@ static int imx_startup(struct uart_port
+   writel(temp & ~UCR4_DREN, sport->port.membase + UCR4);
+
+   /* Can we enable the DMA support? */
++/*
+   if (!uart_console(port) && !sport->dma_is_inited)
+   imx_uart_dma_init(sport);
++*/
+
+   spin_lock_irqsave(>port.lock, flags);
+   /* Reset fifo's and state machines */

Hi,

please update the patch and make it just remove the lines rather than 
commenting them out. please also make sure that the patch that you are 
adding is annotated explaining why it is required.


John

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


Re: [LEDE-DEV] [OpenWrt-Devel] openwrt and lede - remerge proposal V2

2017-05-24 Thread John Crispin



On 24/05/17 10:13, Paul Oranje wrote:

Who are/will be entitled to an [IRC] project cloak ?
Paul
people with voting rights and probably also regular contributors ... 
that is however unrelated to the remerge discussion and would fall under 
the normal voting system





Op 22 mei 2017, om 19:11 heeft Imre Kaloz  het volgende 
geschreven:

Hi,

On 2017-05-22 03:10, John Crispin wrote:


On 22/05/17 11:02, Rafał Miłecki wrote:

On 05/22/2017 09:40 AM, John Crispin wrote:

*) branding
- the owrt side sees no option of using the lede brand
- a (minor) majority voted for openwrt as a name over lede whilst most people 
said they did not care
- as the last vote had a 100% ACK for a remerge using the owrt brand is the 
only feasible option

Since the project is going to be known/accessible under OpenWrt name now, I
want also mbm and Kaloz to share #openwrt and #openwrt-devel privileges.

There were many times op was needed but mbm/Kaloz weren't around.

I was refused/ignored multiple times when asking for that, so I wanted to
bring it as this point to be clear. Is that OK for you guys?


i'll add it to V3

Sorry Rafal, don't get me wrong but this isn't true. It might haven't been 
documented well (like quite a few things) but you have been told years ago: 
everyone who has a project cloak has access to everything. What have been 
refused is to make a special exception just for you to get it without that.


Imre

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



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


Re: [LEDE-DEV] openwrt and lede - remerge proposal V2

2017-05-24 Thread John Crispin



On 23/05/17 22:42, Hauke Mehrtens wrote:

On 05/22/2017 09:40 AM, John Crispin wrote:

Hi,

here is a V2 of the remerge proposal, I tried to fold all the comments
people made into it, if anything is missing let me know.


 John

.


*) SPI
- nominate a new liaison team (imre and john offer to do this, if anyone
else is interested let us know)

I am ok with you both representing us at the SPI. Is a majority vote
needed (LEDE rules) to put someone else into this position, or what
would be the process? ;-)


this would be handled by our normal voting system



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


Re: [LEDE-DEV] [OpenWrt-Devel] openwrt and lede - remerge proposal V2

2017-05-24 Thread Paul Oranje
Who are/will be entitled to an [IRC] project cloak ?
Paul

> Op 22 mei 2017, om 19:11 heeft Imre Kaloz  het volgende 
> geschreven:
> 
> Hi,
> 
> On 2017-05-22 03:10, John Crispin wrote:
>> 
>> 
>> On 22/05/17 11:02, Rafał Miłecki wrote:
>>> On 05/22/2017 09:40 AM, John Crispin wrote:
 *) branding
 - the owrt side sees no option of using the lede brand
 - a (minor) majority voted for openwrt as a name over lede whilst most 
 people said they did not care
 - as the last vote had a 100% ACK for a remerge using the owrt brand is 
 the only feasible option
>>> 
>>> Since the project is going to be known/accessible under OpenWrt name now, I
>>> want also mbm and Kaloz to share #openwrt and #openwrt-devel privileges.
>>> 
>>> There were many times op was needed but mbm/Kaloz weren't around.
>>> 
>>> I was refused/ignored multiple times when asking for that, so I wanted to
>>> bring it as this point to be clear. Is that OK for you guys?
>>> 
>> i'll add it to V3
> Sorry Rafal, don't get me wrong but this isn't true. It might haven't been 
> documented well (like quite a few things) but you have been told years ago: 
> everyone who has a project cloak has access to everything. What have been 
> refused is to make a special exception just for you to get it without that.
> 
> 
> Imre
> 
> ___
> Lede-dev mailing list
> Lede-dev@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev


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