[OpenWrt-Devel] [PATCH 1/2] include: add a new ubinize-image build target

2015-08-20 Thread Mathieu Olivari
This new build target can be used to generate a ubinized.bin file,
including the kernel and the FS specified as an argument.

Signed-off-by: Mathieu Olivari 
---
 include/image.mk | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/include/image.mk b/include/image.mk
index 73fc805..f98d871 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -380,6 +380,12 @@ define Build/combined-image
@mv $@.new $@
 endef
 
+define Build/ubinize-image
+   $(if $(filter $(1),$(TARGET_FILESYSTEMS)), \
+   $(call Image/Build/UbinizeImage,$(DEVICE_NAME),--kernel $(word 
1,$^),$(1),$(UBINIZE_OPTS)); \
+   cp $(KDIR)/$(IMG_PREFIX)-$(DEVICE_NAME)-$(1)-ubinized.bin $@)
+endef
+
 define Device/Init
   PROFILES := $(PROFILE)
   DEVICE_NAME := $(1)
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/2] ipq806x: add UBI image generation

2015-08-20 Thread Mathieu Olivari
UBI image will be used to flash in NAND.

Signed-off-by: Mathieu Olivari 
---
 target/linux/ipq806x/image/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/target/linux/ipq806x/image/Makefile 
b/target/linux/ipq806x/image/Makefile
index b64d629..698aeb9 100644
--- a/target/linux/ipq806x/image/Makefile
+++ b/target/linux/ipq806x/image/Makefile
@@ -34,6 +34,8 @@ define Device/Default
KERNEL_INITRAMFS_PREFIX := $$(IMG_PREFIX)-$(1)-initramfs
DEVICE_DTS :=
KERNEL_PREFIX := $$(IMAGE_PREFIX)
+   IMAGES:= ubinized.bin
+   IMAGE/ubinized.bin := ubinize-image squashfs
 endef
 DEVICE_VARS += DEVICE_DTS
 
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/5] ipq806x: add SMEM support

2015-08-14 Thread Mathieu Olivari
2 patches are cherry-picked from the following LKML thread:
*https://lkml.org/lkml/2015/4/11/208

The last patch (036-soc-qcom-add-smem-to-IPQ806x-platforms.patch) is
adding the corresponding DT nodes required for IPQ806x.

Signed-off-by: Mathieu Olivari 
---
 ...soc-qcom-Add-device-tree-binding-for-SMEM.patch |  82 ++
 ...soc-qcom-Add-Shared-Memory-Manager-driver.patch | 841 +
 ...-qcom-add-SMEM-device-node-to-IPQ806x-dts.patch |  36 +
 ...soc-qcom-Add-device-tree-binding-for-SMEM.patch |  82 ++
 ...soc-qcom-Add-Shared-Memory-Manager-driver.patch | 841 +
 ...-qcom-add-SMEM-device-node-to-IPQ806x-dts.patch |  36 +
 6 files changed, 1918 insertions(+)
 create mode 100644 
target/linux/ipq806x/patches-3.18/034-soc-qcom-Add-device-tree-binding-for-SMEM.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/035-soc-qcom-Add-Shared-Memory-Manager-driver.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/036-ARM-qcom-add-SMEM-device-node-to-IPQ806x-dts.patch
 create mode 100644 
target/linux/ipq806x/patches-4.1/034-soc-qcom-Add-device-tree-binding-for-SMEM.patch
 create mode 100644 
target/linux/ipq806x/patches-4.1/035-soc-qcom-Add-Shared-Memory-Manager-driver.patch
 create mode 100644 
target/linux/ipq806x/patches-4.1/036-ARM-qcom-add-SMEM-device-node-to-IPQ806x-dts.patch

diff --git 
a/target/linux/ipq806x/patches-3.18/034-soc-qcom-Add-device-tree-binding-for-SMEM.patch
 
b/target/linux/ipq806x/patches-3.18/034-soc-qcom-Add-device-tree-binding-for-SMEM.patch
new file mode 100644
index 000..d22db22
--- /dev/null
+++ 
b/target/linux/ipq806x/patches-3.18/034-soc-qcom-Add-device-tree-binding-for-SMEM.patch
@@ -0,0 +1,82 @@
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+Subject: [v2,1/2] soc: qcom: Add device tree binding for SMEM
+From: Bjorn Andersson 
+X-Patchwork-Id: 6202201
+Message-Id: <1428795178-24312-1-git-send-email-bjorn.anders...@sonymobile.com>
+To: Rob Herring , Pawel Moll ,
+   Mark Rutland ,
+   Ian Campbell ,
+   Kumar Gala , Jeffrey Hugo , 
+   Andry Gross 
+Cc: ,
+   linux-arm-msm ,
+   
+Date: Sat, 11 Apr 2015 16:32:57 -0700
+
+Add device tree binding documentation for the Qualcom Shared Memory
+manager.
+
+Signed-off-by: Bjorn Andersson 
+
+---
+Changes since v1:
+- None
+
+ .../devicetree/bindings/soc/qcom/qcom,smem.txt | 49 ++
+ 1 file changed, 49 insertions(+)
+ create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,smem.txt
+
+--- /dev/null
 b/Documentation/devicetree/bindings/soc/qcom/qcom,smem.txt
+@@ -0,0 +1,49 @@
++Qualcomm Shared Memory binding
++
++This binding describes the Qualcomm Shared Memory, used to share data between
++various subsystems and OSes in Qualcomm platforms.
++
++- compatible:
++  Usage: required
++  Value type: 
++  Definition: must be:
++  "qcom,smem"
++
++- memory-region:
++  Usage: required
++  Value type: 
++  Definition: handle to memory reservation for main smem memory region.
++
++- reg:
++  Usage: optional
++  Value type: 
++  Definition: base address and size pair for any additional memory areas
++  of the shared memory.
++
++- hwspinlocks:
++  Usage: required
++  Value type: 
++  Definition: reference to a hwspinlock used to protect allocations from
++  the shared memory
++
++= EXAMPLE
++
++  reserved-memory {
++  #address-cells = <1>;
++  #size-cells = <1>;
++  ranges;
++
++  smem_region: smem@fa0 {
++  reg = <0xfa0 0x20>;
++  no-map;
++  };
++  };
++
++  smem@fa0 {
++  compatible = "qcom,smem";
++
++  memory-region = <&smem_region>;
++  reg = <0xfc428000 0x4000>;
++
++  hwlocks = <&tcsr_mutex 3>;
++  };
diff --git 
a/target/linux/ipq806x/patches-3.18/035-soc-qcom-Add-Shared-Memory-Manager-driver.patch
 
b/target/linux/ipq806x/patches-3.18/035-soc-qcom-Add-Shared-Memory-Manager-driver.patch
new file mode 100644
index 000..c8cff1a
--- /dev/null
+++ 
b/target/linux/ipq806x/patches-3.18/035-soc-qcom-Add-Shared-Memory-Manager-driver.patch
@@ -0,0 +1,841 @@
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+Subject: [v2,2/2] soc: qcom: Add Shared Memory Manager driver
+From: Bjorn Andersson 
+X-Patchwork-Id: 6202211
+Message-Id: <1428795178-24312-2-git-send-email-bjorn.anders...@sonymobile.com>
+To: Kumar Gala , Andy Gross ,
+   David Brown , Jeffrey Hugo 
+Cc: , ,
+   
+Date: Sat, 11 Apr 2015 16:32:58 -0700
+
+The Shared Memory Manager driver implements an interface for allocating
+and accessing items in the memory area shared among all of the
+processors in a Qualco

[OpenWrt-Devel] [PATCH 0/5] ipq806x: add support for SMEM based MTD parser

2015-08-14 Thread Mathieu Olivari
This patch sets intents to add a new MTD parser for QCOM parser which
makes use of the information available in SMEM to provide the flash
layout. We're also cherry-picking drivers for SMEM & HW spinlocks from
LKML as dependencies.

This has been tested on AP148, both for NOR & NAND flash. The MTD layout
was detected accurately on both boot methods.

v2:
*rebased and fix conflicts with previous patches
*renamed patch files according to their LKML names
*updated the SMEM parser with comments provided on LKML

Mathieu Olivari (5):
  kernel: move linux,part-probe dt parsing in generic code
  ipq806x: add hwspinlock support
  ipq806x: add SMEM support
  ipq806x: add QCOM SMEM based MTD parser
  ipq806x: switch AP148 to using SMEM based MTD parser

 ...t-add-generic-parsing-of-linux-part-probe.patch | 175 -
 ...t-add-generic-parsing-of-linux-part-probe.patch | 175 +
 .../400-mtd-add-rootfs-split-support.patch |  16 +-
 ...port-for-different-partition-parser-types.patch |   4 +-
 ...mtd-parsers-for-rootfs-and-firmware-split.patch |   6 +-
 .../404-mtd-add-more-helper-functions.patch|   6 +-
 .../405-mtd-old-firmware-uimage-splitter.patch |   4 +-
 .../406-mtd-old-rootfs-squashfs-splitter.patch |   4 +-
 .../411-mtd-partial_eraseblock_write.patch |   8 +-
 .../412-mtd-partial_eraseblock_unlock.patch|   2 +-
 ...t-add-generic-parsing-of-linux-part-probe.patch | 175 +
 .../400-mtd-add-rootfs-split-support.patch |  15 +-
 ...port-for-different-partition-parser-types.patch |   4 +-
 ...mtd-parsers-for-rootfs-and-firmware-split.patch |   6 +-
 .../404-mtd-add-more-helper-functions.patch|   6 +-
 .../405-mtd-old-firmware-uimage-splitter.patch |   4 +-
 .../406-mtd-old-rootfs-squashfs-splitter.patch |   4 +-
 .../411-mtd-partial_eraseblock_write.patch |   8 +-
 .../412-mtd-partial_eraseblock_unlock.patch|   2 +-
 target/linux/ipq806x/config-3.18   |   4 +
 target/linux/ipq806x/config-4.1|   8 +-
 .../patches-3.18/021-add-ap148-partitions.patch|  34 +-
 ...0-hwspinlock-core-add-device-tree-support.patch | 167 
 ...qcom-Add-support-for-Qualcomm-HW-Mutex-bl.patch | 234 ++
 ...spinlock-qcom-Correct-msb-in-regmap_field.patch |  26 +
 ...3-soc-qcom-Add-sfbp-device-to-IPQ806x-dts.patch |  20 +
 ...soc-qcom-Add-device-tree-binding-for-SMEM.patch |  82 ++
 ...soc-qcom-Add-Shared-Memory-Manager-driver.patch | 841 +
 ...36-soc-qcom-add-smem-to-IPQ806x-platforms.patch |  26 +
 .../037-mtd-add-qcom-smem-parser.patch | 253 +++
 ...1-ARM-qcom-add-USB-nodes-to-ipq806x-ap148.patch |   8 +-
 ...-qcom-add-pcie-nodes-to-ipq806x-platforms.patch |   6 +-
 .../patches-3.18/115-add-pcie-aux-clk-dts.patch|   6 +-
 .../157-ARM-DT-ipq8064-Add-ADM-device-node.patch   |   2 +-
 ...-dts-Add-NAND-controller-node-for-ipq806x.patch |   2 +-
 ...nable-NAND-node-on-IPQ8064-AP148-platform.patch |   4 +-
 ...RM-dts-qcom-add-mdio-nodes-to-ap148-db149.patch |   6 +-
 ...-qcom-add-gmac-nodes-to-ipq806x-platforms.patch |   4 +-
 .../patches-4.1/021-add-ap148-partitions.patch |  34 +-
 ...0-hwspinlock-core-add-device-tree-support.patch | 167 
 ...qcom-Add-support-for-Qualcomm-HW-Mutex-bl.patch | 234 ++
 ...spinlock-qcom-Correct-msb-in-regmap_field.patch |  26 +
 ...3-soc-qcom-Add-sfbp-device-to-IPQ806x-dts.patch |  21 +
 ...soc-qcom-Add-device-tree-binding-for-SMEM.patch |  82 ++
 ...soc-qcom-Add-Shared-Memory-Manager-driver.patch | 841 +
 ...36-soc-qcom-add-smem-to-IPQ806x-platforms.patch |  27 +
 .../patches-4.1/037-mtd-add-qcom-smem-parser.patch | 253 +++
 ...-qcom-add-pcie-nodes-to-ipq806x-platforms.patch |   4 +-
 .../patches-4.1/115-add-pcie-aux-clk-dts.patch |   6 +-
 .../patches-4.1/126-add-rpm-to-ipq8064-dts.patch   |   4 +-
 ...m-Add-necessary-DT-data-for-Krait-cpufreq.patch |   4 +-
 .../157-ARM-DT-ipq8064-Add-ADM-device-node.patch   |   2 +-
 ...-dts-Add-NAND-controller-node-for-ipq806x.patch |   2 +-
 ...nable-NAND-node-on-IPQ8064-AP148-platform.patch |   4 +-
 ...RM-dts-qcom-add-mdio-nodes-to-ap148-db149.patch |   6 +-
 ...-qcom-add-gmac-nodes-to-ipq806x-platforms.patch |   4 +-
 56 files changed, 3765 insertions(+), 313 deletions(-)
 delete mode 100644 
target/linux/bcm53xx/patches-4.1/095-mtd-part-add-generic-parsing-of-linux-part-probe.patch
 create mode 100644 
target/linux/generic/patches-3.18/140-mtd-part-add-generic-parsing-of-linux-part-probe.patch
 create mode 100644 
target/linux/generic/patches-4.1/140-mtd-part-add-generic-parsing-of-linux-part-probe.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/030-hwspinlock-core-add-device-tree-support.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/031-hwspinlock-qcom-Add-support-for-Qualcomm-HW-Mutex-bl.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/032-hwspinlock-qcom-Correct-msb-in-regmap_field.patch
 create mode 100644 

[OpenWrt-Devel] [PATCH 4/5] ipq806x: add QCOM SMEM based MTD parser

2015-08-14 Thread Mathieu Olivari
This patch adds a new parser which uses the SMEM available on IPQ and
some other QCOM platforms to map the MTD partitions.

Signed-off-by: Mathieu Olivari 
---
 ...37-mtd-add-SMEM-parser-for-QCOM-platforms.patch | 277 +
 ...37-mtd-add-SMEM-parser-for-QCOM-platforms.patch | 277 +
 2 files changed, 554 insertions(+)
 create mode 100644 
target/linux/ipq806x/patches-3.18/037-mtd-add-SMEM-parser-for-QCOM-platforms.patch
 create mode 100644 
target/linux/ipq806x/patches-4.1/037-mtd-add-SMEM-parser-for-QCOM-platforms.patch

diff --git 
a/target/linux/ipq806x/patches-3.18/037-mtd-add-SMEM-parser-for-QCOM-platforms.patch
 
b/target/linux/ipq806x/patches-3.18/037-mtd-add-SMEM-parser-for-QCOM-platforms.patch
new file mode 100644
index 000..b2c8cd5
--- /dev/null
+++ 
b/target/linux/ipq806x/patches-3.18/037-mtd-add-SMEM-parser-for-QCOM-platforms.patch
@@ -0,0 +1,277 @@
+From 0501f76b138cf1dc11a313bb7a094da524b79337 Mon Sep 17 00:00:00 2001
+From: Mathieu Olivari 
+Date: Thu, 13 Aug 2015 09:53:14 -0700
+Subject: [PATCH 3/3] mtd: add SMEM parser for QCOM platforms
+
+On QCOM platforms using MTD devices storage (such as IPQ806x), SMEM is
+used to store partition layout. This new parser can now be used to read
+SMEM and use it to register an MTD layout according to its content.
+
+Signed-off-by: Mathieu Olivari 
+---
+ drivers/mtd/Kconfig  |   7 ++
+ drivers/mtd/Makefile |   1 +
+ drivers/mtd/qcom_smem_part.c | 231 +++
+ 3 files changed, 239 insertions(+)
+ create mode 100644 drivers/mtd/qcom_smem_part.c
+
+--- a/drivers/mtd/Kconfig
 b/drivers/mtd/Kconfig
+@@ -200,6 +200,13 @@ config MTD_MYLOADER_PARTS
+ You will still need the parsing functions to be called by the driver
+ for your particular device. It won't happen automatically.
+ 
++config MTD_QCOM_SMEM_PARTS
++  tristate "QCOM SMEM partitioning support"
++  depends on QCOM_SMEM
++  help
++This provides partitions parser for QCOM devices using SMEM
++such as IPQ806x.
++
+ comment "User Modules And Translation Layers"
+ 
+ #
+--- /dev/null
 b/drivers/mtd/qcom_smem_part.c
+@@ -0,0 +1,231 @@
++/*
++ * Copyright (c) 2015, The Linux Foundation. All rights reserved.
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 and
++ * only version 2 as published by the Free Software Foundation.
++ *
++ * 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 
++
++/* Processor/host identifier for the application processor */
++#define SMEM_HOST_APPS0
++
++/* SMEM items index */
++#define SMEM_AARM_PARTITION_TABLE 9
++#define SMEM_BOOT_FLASH_TYPE  421
++#define SMEM_BOOT_FLASH_BLOCK_SIZE424
++
++/* SMEM Flash types */
++#define SMEM_FLASH_NAND   2
++#define SMEM_FLASH_SPI6
++
++#define SMEM_PART_NAME_SZ 16
++#define SMEM_PARTS_MAX32
++
++struct smem_partition {
++  char name[SMEM_PART_NAME_SZ];
++  __le32 start;
++  __le32 size;
++  __le32 attr;
++};
++
++struct smem_partition_table {
++  u8 magic[8];
++  __le32 version;
++  __le32 len;
++  struct smem_partition parts[SMEM_PARTS_MAX];
++};
++
++/* SMEM Magic values in partition table */
++static const u8 SMEM_PTABLE_MAGIC[] = {
++  0xaa, 0x73, 0xee, 0x55,
++  0xdb, 0xbd, 0x5e, 0xe3,
++};
++
++static int qcom_smem_get_flash_blksz(u64 **smem_blksz)
++{
++  int ret;
++  size_t size;
++
++  ret = qcom_smem_get(SMEM_HOST_APPS, SMEM_BOOT_FLASH_BLOCK_SIZE,
++  (void **) smem_blksz, &size);
++
++  if (ret < 0) {
++  pr_err("Unable to read flash blksz from SMEM\n");
++  return -ENOENT;
++  }
++
++  if (size != sizeof(**smem_blksz)) {
++  pr_err("Invalid flash blksz size in SMEM\n");
++  return -EINVAL;
++  }
++
++  return 0;
++}
++
++static int qcom_smem_get_flash_type(u64 **smem_flash_type)
++{
++  int ret;
++  size_t size;
++
++  ret = qcom_smem_get(SMEM_HOST_APPS, SMEM_BOOT_FLASH_TYPE,
++  (void **) smem_flash_type, &size);
++
++  if (ret < 0) {
++  pr_err("Unable to read flash type from SMEM\n");
++  return -ENOENT;
++  }
++
++  if (size != sizeof(**smem_flash_type)) {
++  pr_err("Invalid flash type size in SMEM\n");
++  return -EINVAL;
++  }
++
++  return 0;

[OpenWrt-Devel] [PATCH 5/5] ipq806x: switch AP148 to using SMEM based MTD parser

2015-08-14 Thread Mathieu Olivari
*Enable SMEM MTD parser and its dependencies (SMEM & HW spinlocks) in
 the kernel config
*Replaces the MTD layout in DT by the dynamic layout provided by the
 SMEM parser for AP148

Using the OF based parser is still possible on platforms which have a
fixed MTD partition layout.

Signed-off-by: Mathieu Olivari 
---
 target/linux/ipq806x/config-3.18   |  4 +++
 target/linux/ipq806x/config-4.1|  8 ++---
 .../patches-3.18/021-add-ap148-partitions.patch| 34 ++
 ...1-ARM-qcom-add-USB-nodes-to-ipq806x-ap148.patch |  2 +-
 ...-qcom-add-pcie-nodes-to-ipq806x-platforms.patch |  2 +-
 ...nable-NAND-node-on-IPQ8064-AP148-platform.patch |  2 +-
 ...RM-dts-qcom-add-mdio-nodes-to-ap148-db149.patch |  2 +-
 ...-qcom-add-gmac-nodes-to-ipq806x-platforms.patch |  2 +-
 .../patches-4.1/021-add-ap148-partitions.patch | 34 ++
 ...-qcom-add-pcie-nodes-to-ipq806x-platforms.patch |  2 +-
 ...nable-NAND-node-on-IPQ8064-AP148-platform.patch |  2 +-
 ...RM-dts-qcom-add-mdio-nodes-to-ap148-db149.patch |  2 +-
 ...-qcom-add-gmac-nodes-to-ipq806x-platforms.patch |  2 +-
 13 files changed, 35 insertions(+), 63 deletions(-)

diff --git a/target/linux/ipq806x/config-3.18 b/target/linux/ipq806x/config-3.18
index 2a837f5..3d4f8bb 100644
--- a/target/linux/ipq806x/config-3.18
+++ b/target/linux/ipq806x/config-3.18
@@ -206,6 +206,8 @@ CONFIG_HIGHMEM=y
 CONFIG_HIGHPTE=y
 CONFIG_HOTPLUG_CPU=y
 CONFIG_HWMON=y
+CONFIG_HWSPINLOCK=y
+CONFIG_HWSPINLOCK_QCOM=y
 CONFIG_HW_RANDOM=y
 CONFIG_HW_RANDOM_MSM=y
 CONFIG_HZ_FIXED=0
@@ -259,6 +261,7 @@ CONFIG_MTD_M25P80=y
 CONFIG_MTD_NAND=y
 CONFIG_MTD_NAND_ECC=y
 CONFIG_MTD_NAND_QCOM=y
+CONFIG_MTD_QCOM_SMEM_PARTS=y
 CONFIG_MTD_SPI_NOR=y
 CONFIG_MTD_SPLIT_FIRMWARE=y
 CONFIG_MTD_SPLIT_FIT_FW=y
@@ -345,6 +348,7 @@ CONFIG_QCOM_BAM_DMA=y
 CONFIG_QCOM_GSBI=y
 CONFIG_QCOM_HFPLL=y
 CONFIG_QCOM_SCM=y
+CONFIG_QCOM_SMEM=y
 CONFIG_QCOM_WDT=y
 CONFIG_RAS=y
 # CONFIG_RCU_BOOST is not set
diff --git a/target/linux/ipq806x/config-4.1 b/target/linux/ipq806x/config-4.1
index f711dd5..d48943c 100644
--- a/target/linux/ipq806x/config-4.1
+++ b/target/linux/ipq806x/config-4.1
@@ -45,7 +45,6 @@ CONFIG_ARM_CCI400_PMU=y
 CONFIG_ARM_CPU_SUSPEND=y
 CONFIG_ARM_GIC=y
 CONFIG_ARM_HAS_SG_CHAIN=y
-# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set
 CONFIG_ARM_L1_CACHE_SHIFT=6
 CONFIG_ARM_L1_CACHE_SHIFT_6=y
 # CONFIG_ARM_LPAE is not set
@@ -214,6 +213,8 @@ CONFIG_HIGHPTE=y
 CONFIG_HOTPLUG_CPU=y
 # CONFIG_HSU_DMA_PCI is not set
 CONFIG_HWMON=y
+CONFIG_HWSPINLOCK=y
+CONFIG_HWSPINLOCK_QCOM=y
 CONFIG_HW_RANDOM=y
 CONFIG_HW_RANDOM_MSM=y
 CONFIG_HZ_FIXED=0
@@ -240,7 +241,6 @@ CONFIG_KPSS_XCC=y
 CONFIG_KRAITCC=y
 CONFIG_KRAIT_CLOCKS=y
 CONFIG_KRAIT_L2_ACCESSORS=y
-# CONFIG_LEDS_REGULATOR is not set
 CONFIG_LIBFDT=y
 CONFIG_LOCKUP_DETECTOR=y
 CONFIG_LOCK_SPIN_ON_OWNER=y
@@ -268,6 +268,7 @@ CONFIG_MTD_M25P80=y
 CONFIG_MTD_NAND=y
 CONFIG_MTD_NAND_ECC=y
 CONFIG_MTD_NAND_QCOM=y
+CONFIG_MTD_QCOM_SMEM_PARTS=y
 CONFIG_MTD_SPI_NOR=y
 CONFIG_MTD_SPLIT_FIRMWARE=y
 CONFIG_MTD_SPLIT_FIT_FW=y
@@ -357,6 +358,7 @@ CONFIG_QCOM_BAM_DMA=y
 CONFIG_QCOM_GSBI=y
 CONFIG_QCOM_HFPLL=y
 CONFIG_QCOM_SCM=y
+CONFIG_QCOM_SMEM=y
 CONFIG_QCOM_WDT=y
 CONFIG_RAS=y
 # CONFIG_RCU_BOOST is not set
@@ -366,9 +368,7 @@ CONFIG_RD_GZIP=y
 CONFIG_REGMAP=y
 CONFIG_REGMAP_MMIO=y
 CONFIG_REGULATOR=y
-# CONFIG_REGULATOR_DEBUG is not set
 CONFIG_REGULATOR_QCOM_RPM=y
-# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set
 CONFIG_RESET_CONTROLLER=y
 CONFIG_RFS_ACCEL=y
 CONFIG_RPS=y
diff --git a/target/linux/ipq806x/patches-3.18/021-add-ap148-partitions.patch 
b/target/linux/ipq806x/patches-3.18/021-add-ap148-partitions.patch
index 34eb9c0..bfdb30f 100644
--- a/target/linux/ipq806x/patches-3.18/021-add-ap148-partitions.patch
+++ b/target/linux/ipq806x/patches-3.18/021-add-ap148-partitions.patch
@@ -1,35 +1,19 @@
 --- a/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
 +++ b/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
-@@ -78,13 +78,28 @@
+@@ -77,15 +77,7 @@
+   spi-max-frequency = <5000>;
reg = <0>;
  
-   partition@0 {
+-  partition@0 {
 -  label = "rootfs";
 -  reg = <0x0 0x100>;
-+  label = "lowlevel_init";
-+  reg = <0x0 0x1b>;
-   };
- 
-   partition@1 {
+-  };
+-
+-  partition@1 {
 -  label = "scratch";
 -  reg = <0x100 0x100>;
-+  label = "u-boot"

[OpenWrt-Devel] [PATCH 2/5] ipq806x: add hwspinlock support

2015-08-14 Thread Mathieu Olivari
This change cherry-picks the following 3 changes from linux-next:
*fb7737 hwspinlock/core: add device tree support
*19a0f6 hwspinlock: qcom: Add support for Qualcomm HW Mutex block
*bd5717 hwspinlock: qcom: Correct msb in regmap_field

We're also adding a patch to add the hardware spinlock device nodes on
IPQ806x platforms (033-soc-qcom-Add-sfbp-device-to-IPQ806x-dts.patch).

Signed-off-by: Mathieu Olivari 
---
 ...0-hwspinlock-core-add-device-tree-support.patch | 167 +++
 ...qcom-Add-support-for-Qualcomm-HW-Mutex-bl.patch | 234 +
 ...spinlock-qcom-Correct-msb-in-regmap_field.patch |  26 +++
 ...33-ARM-qcom-add-SFPB-nodes-to-IPQ806x-dts.patch |  34 +++
 ...1-ARM-qcom-add-USB-nodes-to-ipq806x-ap148.patch |   9 +-
 ...-qcom-add-pcie-nodes-to-ipq806x-platforms.patch |   4 +-
 .../patches-3.18/115-add-pcie-aux-clk-dts.patch|   6 +-
 .../157-ARM-DT-ipq8064-Add-ADM-device-node.patch   |   5 +-
 ...-dts-Add-NAND-controller-node-for-ipq806x.patch |   5 +-
 ...-qcom-add-gmac-nodes-to-ipq806x-platforms.patch |   5 +-
 ...0-hwspinlock-core-add-device-tree-support.patch | 167 +++
 ...qcom-Add-support-for-Qualcomm-HW-Mutex-bl.patch | 234 +
 ...spinlock-qcom-Correct-msb-in-regmap_field.patch |  26 +++
 ...33-ARM-qcom-add-SFPB-nodes-to-IPQ806x-dts.patch |  33 +++
 ...-qcom-add-pcie-nodes-to-ipq806x-platforms.patch |  10 +-
 .../patches-4.1/115-add-pcie-aux-clk-dts.patch |   6 +-
 .../157-ARM-DT-ipq8064-Add-ADM-device-node.patch   |   5 +-
 ...-dts-Add-NAND-controller-node-for-ipq806x.patch |   5 +-
 ...-qcom-add-gmac-nodes-to-ipq806x-platforms.patch |   5 +-
 19 files changed, 958 insertions(+), 28 deletions(-)
 create mode 100644 
target/linux/ipq806x/patches-3.18/030-hwspinlock-core-add-device-tree-support.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/031-hwspinlock-qcom-Add-support-for-Qualcomm-HW-Mutex-bl.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/032-hwspinlock-qcom-Correct-msb-in-regmap_field.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/033-ARM-qcom-add-SFPB-nodes-to-IPQ806x-dts.patch
 create mode 100644 
target/linux/ipq806x/patches-4.1/030-hwspinlock-core-add-device-tree-support.patch
 create mode 100644 
target/linux/ipq806x/patches-4.1/031-hwspinlock-qcom-Add-support-for-Qualcomm-HW-Mutex-bl.patch
 create mode 100644 
target/linux/ipq806x/patches-4.1/032-hwspinlock-qcom-Correct-msb-in-regmap_field.patch
 create mode 100644 
target/linux/ipq806x/patches-4.1/033-ARM-qcom-add-SFPB-nodes-to-IPQ806x-dts.patch

diff --git 
a/target/linux/ipq806x/patches-3.18/030-hwspinlock-core-add-device-tree-support.patch
 
b/target/linux/ipq806x/patches-3.18/030-hwspinlock-core-add-device-tree-support.patch
new file mode 100644
index 000..04f35b7
--- /dev/null
+++ 
b/target/linux/ipq806x/patches-3.18/030-hwspinlock-core-add-device-tree-support.patch
@@ -0,0 +1,167 @@
+From fb7737e949e31d8a71acee6bbb670f32dbd2a2c0 Mon Sep 17 00:00:00 2001
+From: Suman Anna 
+Date: Wed, 4 Mar 2015 20:01:14 -0600
+Subject: [PATCH] hwspinlock/core: add device tree support
+
+This patch adds a new OF-friendly API of_hwspin_lock_get_id()
+for hwspinlock clients to use/request locks from a hwspinlock
+device instantiated through a device-tree blob. This new API
+can be used by hwspinlock clients to get the id for a specific
+lock using the phandle + args specifier, so that it can be
+requested using the available hwspin_lock_request_specific()
+API.
+
+Signed-off-by: Suman Anna 
+Reviewed-by: Bjorn Andersson 
+[small comment clarification]
+Signed-off-by: Ohad Ben-Cohen 
+---
+ Documentation/hwspinlock.txt | 10 +
+ drivers/hwspinlock/hwspinlock_core.c | 79 
+ include/linux/hwspinlock.h   |  7 
+ 3 files changed, 96 insertions(+)
+
+--- a/Documentation/hwspinlock.txt
 b/Documentation/hwspinlock.txt
+@@ -48,6 +48,16 @@ independent, drivers.
+  ids for predefined purposes.
+  Should be called from a process context (might sleep).
+ 
++  int of_hwspin_lock_get_id(struct device_node *np, int index);
++   - retrieve the global lock id for an OF phandle-based specific lock.
++ This function provides a means for DT users of a hwspinlock module
++ to get the global lock id of a specific hwspinlock, so that it can
++ be requested using the normal hwspin_lock_request_specific() API.
++ The function returns a lock id number on success, -EPROBE_DEFER if
++ the hwspinlock device is not yet registered with the core, or other
++ error values.
++ Should be called from a process context (might sleep).
++
+   int hwspin_lock_free(struct hwspinlock *hwlock);
+- free a previously-assigned hwspinlock; returns 0 on success, or an
+  appropriate error code on failure (e.g. -EINVAL if the hwspinlock
+--- a/drivers/hwspinlock/hwspinlock_core.c
 b/drivers/hwspinlock/hwspinlock_core.c
+@@ -27,6 +27,7 @@
+ #include 
+ #include 
+ #in

[OpenWrt-Devel] [PATCH 1/5] kernel: move linux, part-probe dt parsing in generic code

2015-08-14 Thread Mathieu Olivari
The "linux,part-probe" dts parsing is a pretty neat generic feature.
It has been posted to kernel.org and could easily be reused by all
targets.

This change moves the patch to the 3.18 and 4.1 generic folders, and
makes the feature available to all platforms who may want to use it.

Signed-off-by: Mathieu Olivari 
---
 ...t-add-generic-parsing-of-linux-part-probe.patch | 175 -
 ...t-add-generic-parsing-of-linux-part-probe.patch | 175 +
 .../400-mtd-add-rootfs-split-support.patch |  16 +-
 ...port-for-different-partition-parser-types.patch |   4 +-
 ...mtd-parsers-for-rootfs-and-firmware-split.patch |   6 +-
 .../404-mtd-add-more-helper-functions.patch|   6 +-
 .../405-mtd-old-firmware-uimage-splitter.patch |   4 +-
 .../406-mtd-old-rootfs-squashfs-splitter.patch |   4 +-
 .../411-mtd-partial_eraseblock_write.patch |   8 +-
 .../412-mtd-partial_eraseblock_unlock.patch|   2 +-
 ...t-add-generic-parsing-of-linux-part-probe.patch | 175 +
 .../400-mtd-add-rootfs-split-support.patch |  15 +-
 ...port-for-different-partition-parser-types.patch |   4 +-
 ...mtd-parsers-for-rootfs-and-firmware-split.patch |   6 +-
 .../404-mtd-add-more-helper-functions.patch|   6 +-
 .../405-mtd-old-firmware-uimage-splitter.patch |   4 +-
 .../406-mtd-old-rootfs-squashfs-splitter.patch |   4 +-
 .../411-mtd-partial_eraseblock_write.patch |   8 +-
 .../412-mtd-partial_eraseblock_unlock.patch|   2 +-
 19 files changed, 400 insertions(+), 224 deletions(-)
 delete mode 100644 
target/linux/bcm53xx/patches-4.1/095-mtd-part-add-generic-parsing-of-linux-part-probe.patch
 create mode 100644 
target/linux/generic/patches-3.18/140-mtd-part-add-generic-parsing-of-linux-part-probe.patch
 create mode 100644 
target/linux/generic/patches-4.1/140-mtd-part-add-generic-parsing-of-linux-part-probe.patch

diff --git 
a/target/linux/bcm53xx/patches-4.1/095-mtd-part-add-generic-parsing-of-linux-part-probe.patch
 
b/target/linux/bcm53xx/patches-4.1/095-mtd-part-add-generic-parsing-of-linux-part-probe.patch
deleted file mode 100644
index 686696e..000
--- 
a/target/linux/bcm53xx/patches-4.1/095-mtd-part-add-generic-parsing-of-linux-part-probe.patch
+++ /dev/null
@@ -1,175 +0,0 @@
-From 173b0add0cff6558f950c0cb1eacfb729d482711 Mon Sep 17 00:00:00 2001
-From: Hauke Mehrtens 
-Date: Sun, 17 May 2015 18:48:38 +0200
-Subject: [PATCH 4/8] mtd: part: add generic parsing of linux,part-probe
-
-This moves the linux,part-probe device tree parsing code from
-physmap_of.c to mtdpart.c. Now all drivers can use this feature by just
-providing a reference to their device tree node in struct
-mtd_part_parser_data.
-
-Signed-off-by: Hauke Mehrtens 

- Documentation/devicetree/bindings/mtd/nand.txt | 16 ++
- drivers/mtd/maps/physmap_of.c  | 40 +---
- drivers/mtd/mtdpart.c  | 43 ++
- 3 files changed, 60 insertions(+), 39 deletions(-)
-
 a/Documentation/devicetree/bindings/mtd/nand.txt
-+++ b/Documentation/devicetree/bindings/mtd/nand.txt
-@@ -12,6 +12,22 @@
- - nand-ecc-step-size: integer representing the number of data bytes
- that are covered by a single ECC step.
- 
-+- linux,part-probe: list of name as strings of the partition parser
-+  which should be used to parse the partition table.
-+  They will be tried in the specified ordering and
-+  the next one will be used if the previous one
-+  failed.
-+
-+  Example: linux,part-probe = "cmdlinepart", "ofpart";
-+
-+  This is also the default value, which will be used
-+  if this attribute is not specified. It could be
-+  that the flash driver in use overwrote the default
-+  value and uses some other default.
-+
-+  Possible values are: bcm47xxpart, afs, ar7part,
-+  ofoldpart, ofpart, bcm63xxpart, RedBoot, cmdlinepart
-+
- The ECC strength and ECC step size properties define the correction capability
- of a controller. Together, they say a controller can correct "{strength} bit
- errors per {size} bytes".
 a/drivers/mtd/maps/physmap_of.c
-+++ b/drivers/mtd/maps/physmap_of.c
-@@ -112,45 +112,9 @@ static struct mtd_info *obsolete_probe(s
- static const char * const part_probe_types_def[] = {
-   "cmdlinepart", "RedBoot", "ofpart", "ofoldpart", NULL };
- 
--static const char * const *of_get_probes(struct device_node *dp)
--{
--  const char *cp;
--  int cplen;
--  unsigned int l;
--  unsigned int count;
--  const char **res;
--
--  cp = of_get_property(dp, "linux,part-probe", &cplen);
--  if (cp == NULL)
--  return part_probe_types_

Re: [OpenWrt-Devel] [PATCH 1/5] kernel: move linux, part-probe dt parsing in generic code

2015-08-13 Thread Mathieu Olivari
No; I don't think it was. Patches weren't acked afaik and it doesn't seem to be 
in the next tree.
http://lists.infradead.org/pipermail/linux-mtd/2015-May/059226.html


-Original Message-
From: Rafał Miłecki [mailto:zaj...@gmail.com] 
Sent: Wednesday, August 12, 2015 9:05 PM
To: Mathieu Olivari
Cc: Felix Fietkau; Jonas Gorski; John Crispin; OpenWrt Development List
Subject: Re: [OpenWrt-Devel] [PATCH 1/5] kernel: move linux, part-probe dt 
parsing in generic code

On 13 August 2015 at 04:37, Mathieu Olivari  wrote:
> The "linux,part-probe" dts parsing is a pretty neat generic feature.
> It has been posted to kernel.org and could easily be reused by all 
> targets.

Was it accepted mainline? If so, you should use 0xx prefix for this patch. 
Otherwise it's OK.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 4/5] ipq806x: add QCOM SMEM based MTD parser

2015-08-12 Thread Mathieu Olivari
This patch adds a new parser which uses the SMEM available on IPQ and
some other QCOM platforms to map the MTD partitions.

Signed-off-by: Mathieu Olivari 
---
 .../037-mtd-add-qcom-smem-parser.patch | 253 +
 .../patches-4.1/037-mtd-add-qcom-smem-parser.patch | 253 +
 2 files changed, 506 insertions(+)
 create mode 100644 
target/linux/ipq806x/patches-3.18/037-mtd-add-qcom-smem-parser.patch
 create mode 100644 
target/linux/ipq806x/patches-4.1/037-mtd-add-qcom-smem-parser.patch

diff --git 
a/target/linux/ipq806x/patches-3.18/037-mtd-add-qcom-smem-parser.patch 
b/target/linux/ipq806x/patches-3.18/037-mtd-add-qcom-smem-parser.patch
new file mode 100644
index 000..6ee3ba0
--- /dev/null
+++ b/target/linux/ipq806x/patches-3.18/037-mtd-add-qcom-smem-parser.patch
@@ -0,0 +1,253 @@
+--- a/drivers/mtd/Kconfig
 b/drivers/mtd/Kconfig
+@@ -184,6 +184,13 @@ config MTD_BCM47XX_PARTS
+ This provides partitions parser for devices based on BCM47xx
+ boards.
+ 
++config MTD_QCOM_SMEM_PARTS
++  tristate "QCOM SMEM partitioning support"
++  depends on QCOM_SMEM
++  help
++This provides partitions parser for QCOM devices using SMEM
++such as IPQ806x.
++
+ config MTD_MYLOADER_PARTS
+   tristate "MyLoader partition parsing"
+   depends on ADM5120 || ATH25 || ATH79
+--- a/drivers/mtd/Makefile
 b/drivers/mtd/Makefile
+@@ -16,6 +16,7 @@ obj-$(CONFIG_MTD_AR7_PARTS)  += ar7part.o
+ obj-$(CONFIG_MTD_BCM63XX_PARTS)   += bcm63xxpart.o
+ obj-$(CONFIG_MTD_BCM47XX_PARTS)   += bcm47xxpart.o
+ obj-$(CONFIG_MTD_MYLOADER_PARTS) += myloader.o
++obj-$(CONFIG_MTD_QCOM_SMEM_PARTS) += qcom_smem_part.o
+ 
+ # 'Users' - code which presents functionality to userspace.
+ obj-$(CONFIG_MTD_BLKDEVS) += mtd_blkdevs.o
+--- /dev/null
 b/drivers/mtd/qcom_smem_part.c
+@@ -0,0 +1,224 @@
++/*
++ * Copyright (c) 2015, The Linux Foundation. All rights reserved.
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 and
++ * only version 2 as published by the Free Software Foundation.
++ *
++ * 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 
++
++/* Processor/host identifier for the application processor */
++#define SMEM_HOST_APPS0
++
++/* SMEM items index */
++#define SMEM_AARM_PARTITION_TABLE 9
++#define SMEM_BOOT_FLASH_TYPE  421
++#define SMEM_BOOT_FLASH_BLOCK_SIZE424
++
++/* SMEM Magic values in partition table */
++#define SMEM_PTABLE_MAGIC_1   0x55ee73aa
++#define SMEM_PTABLE_MAGIC_2   0xe35ebddb
++
++/* SMEM Flash types */
++#define SMEM_FLASH_NAND   2
++#define SMEM_FLASH_SPI6
++
++#define SMEM_PART_NAME_SZ 16
++#define SMEM_PARTS_MAX32
++
++struct smem_partition {
++  char name[SMEM_PART_NAME_SZ];
++  uint32_t start;
++  uint32_t size;
++  uint32_t attr;
++};
++
++struct smem_partition_table {
++  uint32_t magic[2];
++  uint32_t version;
++  uint32_t len;
++  struct smem_partition parts[SMEM_PARTS_MAX];
++};
++
++static int qcom_smem_get_flash_blksz(uint64_t **smem_blksz)
++{
++  int ret;
++  size_t size;
++
++  ret = qcom_smem_get(SMEM_HOST_APPS, SMEM_BOOT_FLASH_BLOCK_SIZE,
++  (void **) smem_blksz, &size);
++
++  if (ret < 0) {
++  pr_err("Unable to read flash blksz from SMEM\n");
++  return -ENOENT;
++  }
++
++  if (size != sizeof(**smem_blksz)) {
++  pr_err("Invalid flash blksz size in SMEM\n");
++  return -EINVAL;
++  }
++
++  return 0;
++}
++
++static int qcom_smem_get_flash_type(uint64_t **smem_flash_type) {
++  int ret;
++  size_t size;
++
++  ret = qcom_smem_get(SMEM_HOST_APPS, SMEM_BOOT_FLASH_TYPE,
++  (void **) smem_flash_type, &size);
++
++  if (ret < 0) {
++  pr_err("Unable to read flash type from SMEM\n");
++  return -ENOENT;
++  }
++
++  if (size != sizeof(**smem_flash_type)) {
++  pr_err("Invalid flash type size in SMEM\n");
++  return -EINVAL;
++  }
++
++  return 0;
++}
++
++static int qcom_smem_get_flash_partitions(struct smem_partition_table 
**pparts)
++{
++  int ret;
++  size_t size;
++
++  ret = qcom_smem_get(SMEM_HOST_APPS, SMEM_AARM_PARTITION_TABLE,
++  (void **) pparts, &size);
++
++  if (ret < 0) {
+

[OpenWrt-Devel] [PATCH 3/5] ipq806x: add SMEM support

2015-08-12 Thread Mathieu Olivari
2 patches are cherry-picked from the following LKML thread:
*https://lkml.org/lkml/2015/4/11/208

The last patch (036-soc-qcom-add-smem-to-IPQ806x-platforms.patch) is
adding the corresponding DT nodes required for IPQ806x.

Signed-off-by: Mathieu Olivari 
---
 ...soc-qcom-Add-device-tree-binding-for-SMEM.patch |  82 ++
 ...soc-qcom-Add-Shared-Memory-Manager-driver.patch | 841 +
 ...36-soc-qcom-add-smem-to-IPQ806x-platforms.patch |  26 +
 ...1-ARM-qcom-add-USB-nodes-to-ipq806x-ap148.patch |   4 +-
 ...-qcom-add-pcie-nodes-to-ipq806x-platforms.patch |   4 +-
 .../patches-3.18/115-add-pcie-aux-clk-dts.patch|   6 +-
 .../157-ARM-DT-ipq8064-Add-ADM-device-node.patch   |   2 +-
 ...-dts-Add-NAND-controller-node-for-ipq806x.patch |   2 +-
 ...-qcom-add-gmac-nodes-to-ipq806x-platforms.patch |   2 +-
 ...soc-qcom-Add-device-tree-binding-for-SMEM.patch |  82 ++
 ...soc-qcom-Add-Shared-Memory-Manager-driver.patch | 841 +
 ...36-soc-qcom-add-smem-to-IPQ806x-platforms.patch |  27 +
 ...-qcom-add-pcie-nodes-to-ipq806x-platforms.patch |   2 +-
 .../patches-4.1/115-add-pcie-aux-clk-dts.patch |   6 +-
 .../patches-4.1/126-add-rpm-to-ipq8064-dts.patch   |   4 +-
 ...m-Add-necessary-DT-data-for-Krait-cpufreq.patch |   4 +-
 .../157-ARM-DT-ipq8064-Add-ADM-device-node.patch   |   2 +-
 ...-dts-Add-NAND-controller-node-for-ipq806x.patch |   2 +-
 ...-qcom-add-gmac-nodes-to-ipq806x-platforms.patch |   2 +-
 19 files changed, 1920 insertions(+), 21 deletions(-)
 create mode 100644 
target/linux/ipq806x/patches-3.18/034-soc-qcom-Add-device-tree-binding-for-SMEM.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/035-soc-qcom-Add-Shared-Memory-Manager-driver.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/036-soc-qcom-add-smem-to-IPQ806x-platforms.patch
 create mode 100644 
target/linux/ipq806x/patches-4.1/034-soc-qcom-Add-device-tree-binding-for-SMEM.patch
 create mode 100644 
target/linux/ipq806x/patches-4.1/035-soc-qcom-Add-Shared-Memory-Manager-driver.patch
 create mode 100644 
target/linux/ipq806x/patches-4.1/036-soc-qcom-add-smem-to-IPQ806x-platforms.patch

diff --git 
a/target/linux/ipq806x/patches-3.18/034-soc-qcom-Add-device-tree-binding-for-SMEM.patch
 
b/target/linux/ipq806x/patches-3.18/034-soc-qcom-Add-device-tree-binding-for-SMEM.patch
new file mode 100644
index 000..d22db22
--- /dev/null
+++ 
b/target/linux/ipq806x/patches-3.18/034-soc-qcom-Add-device-tree-binding-for-SMEM.patch
@@ -0,0 +1,82 @@
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+Subject: [v2,1/2] soc: qcom: Add device tree binding for SMEM
+From: Bjorn Andersson 
+X-Patchwork-Id: 6202201
+Message-Id: <1428795178-24312-1-git-send-email-bjorn.anders...@sonymobile.com>
+To: Rob Herring , Pawel Moll ,
+   Mark Rutland ,
+   Ian Campbell ,
+   Kumar Gala , Jeffrey Hugo , 
+   Andry Gross 
+Cc: ,
+   linux-arm-msm ,
+   
+Date: Sat, 11 Apr 2015 16:32:57 -0700
+
+Add device tree binding documentation for the Qualcom Shared Memory
+manager.
+
+Signed-off-by: Bjorn Andersson 
+
+---
+Changes since v1:
+- None
+
+ .../devicetree/bindings/soc/qcom/qcom,smem.txt | 49 ++
+ 1 file changed, 49 insertions(+)
+ create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,smem.txt
+
+--- /dev/null
 b/Documentation/devicetree/bindings/soc/qcom/qcom,smem.txt
+@@ -0,0 +1,49 @@
++Qualcomm Shared Memory binding
++
++This binding describes the Qualcomm Shared Memory, used to share data between
++various subsystems and OSes in Qualcomm platforms.
++
++- compatible:
++  Usage: required
++  Value type: 
++  Definition: must be:
++  "qcom,smem"
++
++- memory-region:
++  Usage: required
++  Value type: 
++  Definition: handle to memory reservation for main smem memory region.
++
++- reg:
++  Usage: optional
++  Value type: 
++  Definition: base address and size pair for any additional memory areas
++  of the shared memory.
++
++- hwspinlocks:
++  Usage: required
++  Value type: 
++  Definition: reference to a hwspinlock used to protect allocations from
++  the shared memory
++
++= EXAMPLE
++
++  reserved-memory {
++  #address-cells = <1>;
++  #size-cells = <1>;
++  ranges;
++
++  smem_region: smem@fa0 {
++  reg = <0xfa0 0x20>;
++  no-map;
++  };
++  };
++
++  smem@fa0 {
++  compatible = "qcom,smem";
++
++  memory-region = <&smem_region>;
++  reg = <0xfc428000 0x4000>;
++
++  hwlocks = <&tcsr_mutex 3>;
++  };
diff --git 
a/target/linux/ipq806x/patches-3.18/035-soc-qcom-Add-Shared-Memory-Manager-driver.patch
 
b/target/linux/ipq806x/patches-3.18/035-so

[OpenWrt-Devel] [PATCH 5/5] ipq806x: switch AP148 to using SMEM based MTD parser

2015-08-12 Thread Mathieu Olivari
*Enable SMEM MTD parser and its dependencies (SMEM & HW spinlocks) in
 the kernel config
*Replaces the MTD layout in DT by the dynamic layout provided by the
 SMEM parser for AP148

Using the OF based parser is still possible on platforms which have a
fixed MTD partition layout.

Signed-off-by: Mathieu Olivari 
---
 target/linux/ipq806x/config-3.18   |  4 +++
 target/linux/ipq806x/config-4.1|  8 ++---
 .../patches-3.18/021-add-ap148-partitions.patch| 34 ++
 ...1-ARM-qcom-add-USB-nodes-to-ipq806x-ap148.patch |  2 +-
 ...-qcom-add-pcie-nodes-to-ipq806x-platforms.patch |  2 +-
 ...nable-NAND-node-on-IPQ8064-AP148-platform.patch |  4 ++-
 ...RM-dts-qcom-add-mdio-nodes-to-ap148-db149.patch |  6 ++--
 ...-qcom-add-gmac-nodes-to-ipq806x-platforms.patch |  2 +-
 .../patches-4.1/021-add-ap148-partitions.patch | 34 ++
 ...-qcom-add-pcie-nodes-to-ipq806x-platforms.patch |  2 +-
 ...nable-NAND-node-on-IPQ8064-AP148-platform.patch |  4 ++-
 ...RM-dts-qcom-add-mdio-nodes-to-ap148-db149.patch |  6 ++--
 ...-qcom-add-gmac-nodes-to-ipq806x-platforms.patch |  2 +-
 13 files changed, 43 insertions(+), 67 deletions(-)

diff --git a/target/linux/ipq806x/config-3.18 b/target/linux/ipq806x/config-3.18
index 2a837f5..3d4f8bb 100644
--- a/target/linux/ipq806x/config-3.18
+++ b/target/linux/ipq806x/config-3.18
@@ -206,6 +206,8 @@ CONFIG_HIGHMEM=y
 CONFIG_HIGHPTE=y
 CONFIG_HOTPLUG_CPU=y
 CONFIG_HWMON=y
+CONFIG_HWSPINLOCK=y
+CONFIG_HWSPINLOCK_QCOM=y
 CONFIG_HW_RANDOM=y
 CONFIG_HW_RANDOM_MSM=y
 CONFIG_HZ_FIXED=0
@@ -259,6 +261,7 @@ CONFIG_MTD_M25P80=y
 CONFIG_MTD_NAND=y
 CONFIG_MTD_NAND_ECC=y
 CONFIG_MTD_NAND_QCOM=y
+CONFIG_MTD_QCOM_SMEM_PARTS=y
 CONFIG_MTD_SPI_NOR=y
 CONFIG_MTD_SPLIT_FIRMWARE=y
 CONFIG_MTD_SPLIT_FIT_FW=y
@@ -345,6 +348,7 @@ CONFIG_QCOM_BAM_DMA=y
 CONFIG_QCOM_GSBI=y
 CONFIG_QCOM_HFPLL=y
 CONFIG_QCOM_SCM=y
+CONFIG_QCOM_SMEM=y
 CONFIG_QCOM_WDT=y
 CONFIG_RAS=y
 # CONFIG_RCU_BOOST is not set
diff --git a/target/linux/ipq806x/config-4.1 b/target/linux/ipq806x/config-4.1
index f711dd5..d48943c 100644
--- a/target/linux/ipq806x/config-4.1
+++ b/target/linux/ipq806x/config-4.1
@@ -45,7 +45,6 @@ CONFIG_ARM_CCI400_PMU=y
 CONFIG_ARM_CPU_SUSPEND=y
 CONFIG_ARM_GIC=y
 CONFIG_ARM_HAS_SG_CHAIN=y
-# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set
 CONFIG_ARM_L1_CACHE_SHIFT=6
 CONFIG_ARM_L1_CACHE_SHIFT_6=y
 # CONFIG_ARM_LPAE is not set
@@ -214,6 +213,8 @@ CONFIG_HIGHPTE=y
 CONFIG_HOTPLUG_CPU=y
 # CONFIG_HSU_DMA_PCI is not set
 CONFIG_HWMON=y
+CONFIG_HWSPINLOCK=y
+CONFIG_HWSPINLOCK_QCOM=y
 CONFIG_HW_RANDOM=y
 CONFIG_HW_RANDOM_MSM=y
 CONFIG_HZ_FIXED=0
@@ -240,7 +241,6 @@ CONFIG_KPSS_XCC=y
 CONFIG_KRAITCC=y
 CONFIG_KRAIT_CLOCKS=y
 CONFIG_KRAIT_L2_ACCESSORS=y
-# CONFIG_LEDS_REGULATOR is not set
 CONFIG_LIBFDT=y
 CONFIG_LOCKUP_DETECTOR=y
 CONFIG_LOCK_SPIN_ON_OWNER=y
@@ -268,6 +268,7 @@ CONFIG_MTD_M25P80=y
 CONFIG_MTD_NAND=y
 CONFIG_MTD_NAND_ECC=y
 CONFIG_MTD_NAND_QCOM=y
+CONFIG_MTD_QCOM_SMEM_PARTS=y
 CONFIG_MTD_SPI_NOR=y
 CONFIG_MTD_SPLIT_FIRMWARE=y
 CONFIG_MTD_SPLIT_FIT_FW=y
@@ -357,6 +358,7 @@ CONFIG_QCOM_BAM_DMA=y
 CONFIG_QCOM_GSBI=y
 CONFIG_QCOM_HFPLL=y
 CONFIG_QCOM_SCM=y
+CONFIG_QCOM_SMEM=y
 CONFIG_QCOM_WDT=y
 CONFIG_RAS=y
 # CONFIG_RCU_BOOST is not set
@@ -366,9 +368,7 @@ CONFIG_RD_GZIP=y
 CONFIG_REGMAP=y
 CONFIG_REGMAP_MMIO=y
 CONFIG_REGULATOR=y
-# CONFIG_REGULATOR_DEBUG is not set
 CONFIG_REGULATOR_QCOM_RPM=y
-# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set
 CONFIG_RESET_CONTROLLER=y
 CONFIG_RFS_ACCEL=y
 CONFIG_RPS=y
diff --git a/target/linux/ipq806x/patches-3.18/021-add-ap148-partitions.patch 
b/target/linux/ipq806x/patches-3.18/021-add-ap148-partitions.patch
index 34eb9c0..bfdb30f 100644
--- a/target/linux/ipq806x/patches-3.18/021-add-ap148-partitions.patch
+++ b/target/linux/ipq806x/patches-3.18/021-add-ap148-partitions.patch
@@ -1,35 +1,19 @@
 --- a/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
 +++ b/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
-@@ -78,13 +78,28 @@
+@@ -77,15 +77,7 @@
+   spi-max-frequency = <5000>;
reg = <0>;
  
-   partition@0 {
+-  partition@0 {
 -  label = "rootfs";
 -  reg = <0x0 0x100>;
-+  label = "lowlevel_init";
-+  reg = <0x0 0x1b>;
-   };
- 
-   partition@1 {
+-  };
+-
+-  partition@1 {
 -  label = "scratch";
 -  reg = <0x100 0x100>;
-+  label = "u-boot"

[OpenWrt-Devel] [PATCH 1/5] kernel: move linux, part-probe dt parsing in generic code

2015-08-12 Thread Mathieu Olivari
The "linux,part-probe" dts parsing is a pretty neat generic feature.
It has been posted to kernel.org and could easily be reused by all
targets.

This change moves the patch to the 3.18 and 4.1 generic folders, and
makes the feature available to all platforms who may want to use it.

Signed-off-by: Mathieu Olivari 
---
 ...t-add-generic-parsing-of-linux-part-probe.patch | 175 -
 ...t-add-generic-parsing-of-linux-part-probe.patch | 175 +
 .../400-mtd-add-rootfs-split-support.patch |  16 +-
 ...port-for-different-partition-parser-types.patch |   4 +-
 ...mtd-parsers-for-rootfs-and-firmware-split.patch |   6 +-
 .../404-mtd-add-more-helper-functions.patch|   6 +-
 .../405-mtd-old-firmware-uimage-splitter.patch |   4 +-
 .../406-mtd-old-rootfs-squashfs-splitter.patch |   4 +-
 .../411-mtd-partial_eraseblock_write.patch |   8 +-
 .../412-mtd-partial_eraseblock_unlock.patch|   2 +-
 ...t-add-generic-parsing-of-linux-part-probe.patch | 175 +
 .../400-mtd-add-rootfs-split-support.patch |  15 +-
 ...port-for-different-partition-parser-types.patch |   4 +-
 ...mtd-parsers-for-rootfs-and-firmware-split.patch |   6 +-
 .../404-mtd-add-more-helper-functions.patch|   6 +-
 .../405-mtd-old-firmware-uimage-splitter.patch |   4 +-
 .../406-mtd-old-rootfs-squashfs-splitter.patch |   4 +-
 .../411-mtd-partial_eraseblock_write.patch |   8 +-
 .../412-mtd-partial_eraseblock_unlock.patch|   2 +-
 19 files changed, 400 insertions(+), 224 deletions(-)
 delete mode 100644 
target/linux/bcm53xx/patches-4.1/095-mtd-part-add-generic-parsing-of-linux-part-probe.patch
 create mode 100644 
target/linux/generic/patches-3.18/140-mtd-part-add-generic-parsing-of-linux-part-probe.patch
 create mode 100644 
target/linux/generic/patches-4.1/140-mtd-part-add-generic-parsing-of-linux-part-probe.patch

diff --git 
a/target/linux/bcm53xx/patches-4.1/095-mtd-part-add-generic-parsing-of-linux-part-probe.patch
 
b/target/linux/bcm53xx/patches-4.1/095-mtd-part-add-generic-parsing-of-linux-part-probe.patch
deleted file mode 100644
index 686696e..000
--- 
a/target/linux/bcm53xx/patches-4.1/095-mtd-part-add-generic-parsing-of-linux-part-probe.patch
+++ /dev/null
@@ -1,175 +0,0 @@
-From 173b0add0cff6558f950c0cb1eacfb729d482711 Mon Sep 17 00:00:00 2001
-From: Hauke Mehrtens 
-Date: Sun, 17 May 2015 18:48:38 +0200
-Subject: [PATCH 4/8] mtd: part: add generic parsing of linux,part-probe
-
-This moves the linux,part-probe device tree parsing code from
-physmap_of.c to mtdpart.c. Now all drivers can use this feature by just
-providing a reference to their device tree node in struct
-mtd_part_parser_data.
-
-Signed-off-by: Hauke Mehrtens 

- Documentation/devicetree/bindings/mtd/nand.txt | 16 ++
- drivers/mtd/maps/physmap_of.c  | 40 +---
- drivers/mtd/mtdpart.c  | 43 ++
- 3 files changed, 60 insertions(+), 39 deletions(-)
-
 a/Documentation/devicetree/bindings/mtd/nand.txt
-+++ b/Documentation/devicetree/bindings/mtd/nand.txt
-@@ -12,6 +12,22 @@
- - nand-ecc-step-size: integer representing the number of data bytes
- that are covered by a single ECC step.
- 
-+- linux,part-probe: list of name as strings of the partition parser
-+  which should be used to parse the partition table.
-+  They will be tried in the specified ordering and
-+  the next one will be used if the previous one
-+  failed.
-+
-+  Example: linux,part-probe = "cmdlinepart", "ofpart";
-+
-+  This is also the default value, which will be used
-+  if this attribute is not specified. It could be
-+  that the flash driver in use overwrote the default
-+  value and uses some other default.
-+
-+  Possible values are: bcm47xxpart, afs, ar7part,
-+  ofoldpart, ofpart, bcm63xxpart, RedBoot, cmdlinepart
-+
- The ECC strength and ECC step size properties define the correction capability
- of a controller. Together, they say a controller can correct "{strength} bit
- errors per {size} bytes".
 a/drivers/mtd/maps/physmap_of.c
-+++ b/drivers/mtd/maps/physmap_of.c
-@@ -112,45 +112,9 @@ static struct mtd_info *obsolete_probe(s
- static const char * const part_probe_types_def[] = {
-   "cmdlinepart", "RedBoot", "ofpart", "ofoldpart", NULL };
- 
--static const char * const *of_get_probes(struct device_node *dp)
--{
--  const char *cp;
--  int cplen;
--  unsigned int l;
--  unsigned int count;
--  const char **res;
--
--  cp = of_get_property(dp, "linux,part-probe", &cplen);
--  if (cp == NULL)
--  return part_probe_types_

[OpenWrt-Devel] [PATCH 2/5] ipq806x: add hwspinlock support

2015-08-12 Thread Mathieu Olivari
This change cherry-picks the following 3 changes from linux-next:
*fb7737 hwspinlock/core: add device tree support
*19a0f6 hwspinlock: qcom: Add support for Qualcomm HW Mutex block
*bd5717 hwspinlock: qcom: Correct msb in regmap_field

We're also adding a patch to add the hardware spinlock device nodes on
IPQ806x platforms (033-soc-qcom-Add-sfbp-device-to-IPQ806x-dts.patch).

Signed-off-by: Mathieu Olivari 
---
 ...0-hwspinlock-core-add-device-tree-support.patch | 167 +++
 ...qcom-Add-support-for-Qualcomm-HW-Mutex-bl.patch | 234 +
 ...spinlock-qcom-Correct-msb-in-regmap_field.patch |  26 +++
 ...3-soc-qcom-Add-sfbp-device-to-IPQ806x-dts.patch |  20 ++
 ...1-ARM-qcom-add-USB-nodes-to-ipq806x-ap148.patch |   6 +-
 ...-qcom-add-pcie-nodes-to-ipq806x-platforms.patch |   4 +-
 .../patches-3.18/115-add-pcie-aux-clk-dts.patch|   6 +-
 .../157-ARM-DT-ipq8064-Add-ADM-device-node.patch   |   2 +-
 ...-dts-Add-NAND-controller-node-for-ipq806x.patch |   2 +-
 ...-qcom-add-gmac-nodes-to-ipq806x-platforms.patch |   2 +-
 ...0-hwspinlock-core-add-device-tree-support.patch | 167 +++
 ...qcom-Add-support-for-Qualcomm-HW-Mutex-bl.patch | 234 +
 ...spinlock-qcom-Correct-msb-in-regmap_field.patch |  26 +++
 ...3-soc-qcom-Add-sfbp-device-to-IPQ806x-dts.patch |  21 ++
 ...-qcom-add-pcie-nodes-to-ipq806x-platforms.patch |   2 +-
 .../patches-4.1/115-add-pcie-aux-clk-dts.patch |   6 +-
 .../patches-4.1/126-add-rpm-to-ipq8064-dts.patch   |   4 +-
 ...m-Add-necessary-DT-data-for-Krait-cpufreq.patch |   4 +-
 .../157-ARM-DT-ipq8064-Add-ADM-device-node.patch   |   2 +-
 ...-dts-Add-NAND-controller-node-for-ipq806x.patch |   2 +-
 ...-qcom-add-gmac-nodes-to-ipq806x-platforms.patch |   2 +-
 21 files changed, 917 insertions(+), 22 deletions(-)
 create mode 100644 
target/linux/ipq806x/patches-3.18/030-hwspinlock-core-add-device-tree-support.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/031-hwspinlock-qcom-Add-support-for-Qualcomm-HW-Mutex-bl.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/032-hwspinlock-qcom-Correct-msb-in-regmap_field.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/033-soc-qcom-Add-sfbp-device-to-IPQ806x-dts.patch
 create mode 100644 
target/linux/ipq806x/patches-4.1/030-hwspinlock-core-add-device-tree-support.patch
 create mode 100644 
target/linux/ipq806x/patches-4.1/031-hwspinlock-qcom-Add-support-for-Qualcomm-HW-Mutex-bl.patch
 create mode 100644 
target/linux/ipq806x/patches-4.1/032-hwspinlock-qcom-Correct-msb-in-regmap_field.patch
 create mode 100644 
target/linux/ipq806x/patches-4.1/033-soc-qcom-Add-sfbp-device-to-IPQ806x-dts.patch

diff --git 
a/target/linux/ipq806x/patches-3.18/030-hwspinlock-core-add-device-tree-support.patch
 
b/target/linux/ipq806x/patches-3.18/030-hwspinlock-core-add-device-tree-support.patch
new file mode 100644
index 000..04f35b7
--- /dev/null
+++ 
b/target/linux/ipq806x/patches-3.18/030-hwspinlock-core-add-device-tree-support.patch
@@ -0,0 +1,167 @@
+From fb7737e949e31d8a71acee6bbb670f32dbd2a2c0 Mon Sep 17 00:00:00 2001
+From: Suman Anna 
+Date: Wed, 4 Mar 2015 20:01:14 -0600
+Subject: [PATCH] hwspinlock/core: add device tree support
+
+This patch adds a new OF-friendly API of_hwspin_lock_get_id()
+for hwspinlock clients to use/request locks from a hwspinlock
+device instantiated through a device-tree blob. This new API
+can be used by hwspinlock clients to get the id for a specific
+lock using the phandle + args specifier, so that it can be
+requested using the available hwspin_lock_request_specific()
+API.
+
+Signed-off-by: Suman Anna 
+Reviewed-by: Bjorn Andersson 
+[small comment clarification]
+Signed-off-by: Ohad Ben-Cohen 
+---
+ Documentation/hwspinlock.txt | 10 +
+ drivers/hwspinlock/hwspinlock_core.c | 79 
+ include/linux/hwspinlock.h   |  7 
+ 3 files changed, 96 insertions(+)
+
+--- a/Documentation/hwspinlock.txt
 b/Documentation/hwspinlock.txt
+@@ -48,6 +48,16 @@ independent, drivers.
+  ids for predefined purposes.
+  Should be called from a process context (might sleep).
+ 
++  int of_hwspin_lock_get_id(struct device_node *np, int index);
++   - retrieve the global lock id for an OF phandle-based specific lock.
++ This function provides a means for DT users of a hwspinlock module
++ to get the global lock id of a specific hwspinlock, so that it can
++ be requested using the normal hwspin_lock_request_specific() API.
++ The function returns a lock id number on success, -EPROBE_DEFER if
++ the hwspinlock device is not yet registered with the core, or other
++ error values.
++ Should be called from a process context (might sleep).
++
+   int hwspin_lock_free(struct hwspinlock *hwlock);
+- free a previously-assigned hwspinlock; returns 0 on success, or an
+  appropriate error code on failure (e.g. -EINVAL if the hwspinlock
+--- a/drivers/hwspi

[OpenWrt-Devel] [PATCH 0/5] ipq806x: add support for SMEM based MTD parser

2015-08-12 Thread Mathieu Olivari
This patch sets intents to add a new MTD parser for QCOM parser which
makes use of the information available in SMEM to provide the flash
layout. We're also cherry-picking drivers for SMEM & HW spinlocks from
LKML as dependencies.

This has been tested on AP148, both for NOR & NAND flash. The MTD layout
was detected accurately on both boot methods.

Mathieu Olivari (5):
  kernel: move linux,part-probe dt parsing in generic code
  ipq806x: add hwspinlock support
  ipq806x: add SMEM support
  ipq806x: add QCOM SMEM based MTD parser
  ipq806x: switch AP148 to using SMEM based MTD parser

 ...t-add-generic-parsing-of-linux-part-probe.patch | 175 -
 ...t-add-generic-parsing-of-linux-part-probe.patch | 175 +
 .../400-mtd-add-rootfs-split-support.patch |  16 +-
 ...port-for-different-partition-parser-types.patch |   4 +-
 ...mtd-parsers-for-rootfs-and-firmware-split.patch |   6 +-
 .../404-mtd-add-more-helper-functions.patch|   6 +-
 .../405-mtd-old-firmware-uimage-splitter.patch |   4 +-
 .../406-mtd-old-rootfs-squashfs-splitter.patch |   4 +-
 .../411-mtd-partial_eraseblock_write.patch |   8 +-
 .../412-mtd-partial_eraseblock_unlock.patch|   2 +-
 ...t-add-generic-parsing-of-linux-part-probe.patch | 175 +
 .../400-mtd-add-rootfs-split-support.patch |  15 +-
 ...port-for-different-partition-parser-types.patch |   4 +-
 ...mtd-parsers-for-rootfs-and-firmware-split.patch |   6 +-
 .../404-mtd-add-more-helper-functions.patch|   6 +-
 .../405-mtd-old-firmware-uimage-splitter.patch |   4 +-
 .../406-mtd-old-rootfs-squashfs-splitter.patch |   4 +-
 .../411-mtd-partial_eraseblock_write.patch |   8 +-
 .../412-mtd-partial_eraseblock_unlock.patch|   2 +-
 target/linux/ipq806x/config-3.18   |   4 +
 target/linux/ipq806x/config-4.1|   8 +-
 .../patches-3.18/021-add-ap148-partitions.patch|  34 +-
 ...0-hwspinlock-core-add-device-tree-support.patch | 167 
 ...qcom-Add-support-for-Qualcomm-HW-Mutex-bl.patch | 234 ++
 ...spinlock-qcom-Correct-msb-in-regmap_field.patch |  26 +
 ...3-soc-qcom-Add-sfbp-device-to-IPQ806x-dts.patch |  20 +
 ...soc-qcom-Add-device-tree-binding-for-SMEM.patch |  82 ++
 ...soc-qcom-Add-Shared-Memory-Manager-driver.patch | 841 +
 ...36-soc-qcom-add-smem-to-IPQ806x-platforms.patch |  26 +
 .../037-mtd-add-qcom-smem-parser.patch | 253 +++
 ...1-ARM-qcom-add-USB-nodes-to-ipq806x-ap148.patch |   8 +-
 ...-qcom-add-pcie-nodes-to-ipq806x-platforms.patch |   6 +-
 .../patches-3.18/115-add-pcie-aux-clk-dts.patch|   6 +-
 .../157-ARM-DT-ipq8064-Add-ADM-device-node.patch   |   2 +-
 ...-dts-Add-NAND-controller-node-for-ipq806x.patch |   2 +-
 ...nable-NAND-node-on-IPQ8064-AP148-platform.patch |   4 +-
 ...RM-dts-qcom-add-mdio-nodes-to-ap148-db149.patch |   6 +-
 ...-qcom-add-gmac-nodes-to-ipq806x-platforms.patch |   4 +-
 .../patches-4.1/021-add-ap148-partitions.patch |  34 +-
 ...0-hwspinlock-core-add-device-tree-support.patch | 167 
 ...qcom-Add-support-for-Qualcomm-HW-Mutex-bl.patch | 234 ++
 ...spinlock-qcom-Correct-msb-in-regmap_field.patch |  26 +
 ...3-soc-qcom-Add-sfbp-device-to-IPQ806x-dts.patch |  21 +
 ...soc-qcom-Add-device-tree-binding-for-SMEM.patch |  82 ++
 ...soc-qcom-Add-Shared-Memory-Manager-driver.patch | 841 +
 ...36-soc-qcom-add-smem-to-IPQ806x-platforms.patch |  27 +
 .../patches-4.1/037-mtd-add-qcom-smem-parser.patch | 253 +++
 ...-qcom-add-pcie-nodes-to-ipq806x-platforms.patch |   4 +-
 .../patches-4.1/115-add-pcie-aux-clk-dts.patch |   6 +-
 .../patches-4.1/126-add-rpm-to-ipq8064-dts.patch   |   4 +-
 ...m-Add-necessary-DT-data-for-Krait-cpufreq.patch |   4 +-
 .../157-ARM-DT-ipq8064-Add-ADM-device-node.patch   |   2 +-
 ...-dts-Add-NAND-controller-node-for-ipq806x.patch |   2 +-
 ...nable-NAND-node-on-IPQ8064-AP148-platform.patch |   4 +-
 ...RM-dts-qcom-add-mdio-nodes-to-ap148-db149.patch |   6 +-
 ...-qcom-add-gmac-nodes-to-ipq806x-platforms.patch |   4 +-
 56 files changed, 3765 insertions(+), 313 deletions(-)
 delete mode 100644 
target/linux/bcm53xx/patches-4.1/095-mtd-part-add-generic-parsing-of-linux-part-probe.patch
 create mode 100644 
target/linux/generic/patches-3.18/140-mtd-part-add-generic-parsing-of-linux-part-probe.patch
 create mode 100644 
target/linux/generic/patches-4.1/140-mtd-part-add-generic-parsing-of-linux-part-probe.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/030-hwspinlock-core-add-device-tree-support.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/031-hwspinlock-qcom-Add-support-for-Qualcomm-HW-Mutex-bl.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/032-hwspinlock-qcom-Correct-msb-in-regmap_field.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/033-soc-qcom-Add-sfbp-device-to-IPQ806x-dts.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/034-soc-qcom-Add-device-tre

[OpenWrt-Devel] [PATCH] ipq806x: disable DMA on the SPI flash

2015-08-10 Thread Mathieu Olivari
Previous patch 6f2905eeb6ce5ddec8d12d677e1f377a940b537b enabled ADM in
the kernel, which causes a kernel panic when accessing the SPI flash.

As a workaround, We'll disable DMA for the flash for now. It was not
enabled previously anyway so we'll just leave it as is.

Reported-by: Jonas Gorski 
Signed-off-by: Mathieu Olivari 
---
 .../157-ARM-DT-ipq8064-Add-ADM-device-node.patch| 13 -
 ...com-dts-Enable-NAND-node-on-IPQ8064-AP148-platform.patch |  2 +-
 .../707-ARM-dts-qcom-add-mdio-nodes-to-ap148-db149.patch|  2 +-
 ...8-ARM-dts-qcom-add-gmac-nodes-to-ipq806x-platforms.patch |  2 +-
 4 files changed, 3 insertions(+), 16 deletions(-)

diff --git 
a/target/linux/ipq806x/patches-3.18/157-ARM-DT-ipq8064-Add-ADM-device-node.patch
 
b/target/linux/ipq806x/patches-3.18/157-ARM-DT-ipq8064-Add-ADM-device-node.patch
index 64b0022..4d9e613 100644
--- 
a/target/linux/ipq806x/patches-3.18/157-ARM-DT-ipq8064-Add-ADM-device-node.patch
+++ 
b/target/linux/ipq806x/patches-3.18/157-ARM-DT-ipq8064-Add-ADM-device-node.patch
@@ -11,19 +11,6 @@ Signed-off-by: Andy Gross 
  arch/arm/boot/dts/qcom-ipq8064.dtsi  | 21 +
  2 files changed, 25 insertions(+)
 
 a/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
-+++ b/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
-@@ -90,6 +90,10 @@
- 
-   cs-gpios = <&qcom_pinmux 20 0>;
- 
-+  dmas = <&adm_dma 6>,
-+  <&adm_dma 5>;
-+  dma-names = "rx", "tx";
-+
-   flash: m25p80@0 {
-   compatible = "s25fl256s1";
-   #address-cells = <1>;
 --- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
 +++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
 @@ -657,5 +657,25 @@
diff --git 
a/target/linux/ipq806x/patches-3.18/165-arm-qcom-dts-Enable-NAND-node-on-IPQ8064-AP148-platform.patch
 
b/target/linux/ipq806x/patches-3.18/165-arm-qcom-dts-Enable-NAND-node-on-IPQ8064-AP148-platform.patch
index 94e4e6b..77be886 100644
--- 
a/target/linux/ipq806x/patches-3.18/165-arm-qcom-dts-Enable-NAND-node-on-IPQ8064-AP148-platform.patch
+++ 
b/target/linux/ipq806x/patches-3.18/165-arm-qcom-dts-Enable-NAND-node-on-IPQ8064-AP148-platform.patch
@@ -57,7 +57,7 @@ arch/arm/boot/dts/qcom-ipq8064-ap148.dts | 36 

};
  
gsbi@1630 {
-@@ -174,5 +199,19 @@
+@@ -170,5 +195,19 @@
pinctrl-0 = <&pcie1_pins>;
pinctrl-names = "default";
};
diff --git 
a/target/linux/ipq806x/patches-3.18/707-ARM-dts-qcom-add-mdio-nodes-to-ap148-db149.patch
 
b/target/linux/ipq806x/patches-3.18/707-ARM-dts-qcom-add-mdio-nodes-to-ap148-db149.patch
index 75ebfe6..da8286a 100644
--- 
a/target/linux/ipq806x/patches-3.18/707-ARM-dts-qcom-add-mdio-nodes-to-ap148-db149.patch
+++ 
b/target/linux/ipq806x/patches-3.18/707-ARM-dts-qcom-add-mdio-nodes-to-ap148-db149.patch
@@ -38,7 +38,7 @@ Signed-off-by: Mathieu Olivari 
};
  
gsbi@1630 {
-@@ -209,6 +219,34 @@
+@@ -205,6 +215,34 @@
nand-ecc-strength = <4>;
nand-bus-width = <8>;
};
diff --git 
a/target/linux/ipq806x/patches-3.18/708-ARM-dts-qcom-add-gmac-nodes-to-ipq806x-platforms.patch
 
b/target/linux/ipq806x/patches-3.18/708-ARM-dts-qcom-add-gmac-nodes-to-ipq806x-platforms.patch
index 72a9f8b..8cfc38b 100644
--- 
a/target/linux/ipq806x/patches-3.18/708-ARM-dts-qcom-add-gmac-nodes-to-ipq806x-platforms.patch
+++ 
b/target/linux/ipq806x/patches-3.18/708-ARM-dts-qcom-add-gmac-nodes-to-ipq806x-platforms.patch
@@ -29,7 +29,7 @@ Signed-off-by: Mathieu Olivari 
};
  
gsbi@1630 {
-@@ -247,6 +257,27 @@
+@@ -243,6 +253,27 @@
reg = <4>;
};
};
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 0/3] ipq806x: add NAND flash support

2015-08-07 Thread Mathieu Olivari
Actually, I was asking myself the same questions yesterday. I was leaning
towards dts for the reasons you mention below as well; the problem is on ref
designs, there is no "standard" layout. The flash layout changes with time
(an AP148 with an old boot binary blob will have a different layout than the
same AP148 with a new boot image), sometimes with a certain application
(some boots will have an SMEM with 2 kernels & 2 rootfs for dual
partitioning). For this reason, and on ref designs, it'd be easier to have
one dts and the kernel adapting at run-time, than multiplying the dts files
and having to pick the right one based on your current SMEM content.

I would agree that it's the exception though; on most retail routers, you
would have one SMEM per SKU, i.e. one layout per dts.

I'm thinking the most flexible way would probably to have the opportunity in
dts to select between "dynamic" smem partitioning, or regular "fixed"
partitioning. Not sure if something like this has ever been done in the
past; but we could explore it.

Thanks,
Mathieu

-Original Message-
From: Felix Fietkau [mailto:n...@openwrt.org] 
Sent: Friday, August 07, 2015 2:11 AM
To: Mathieu Olivari; j...@openwrt.org
Cc: openwrt-devel@lists.openwrt.org
Subject: Re: [PATCH 0/3] ipq806x: add NAND flash support

On 2015-08-07 04:28, Mathieu Olivari wrote:
> This patch serie adds support for the integrated NAND flash controller 
> available on AP148. Most of the patches are backported from LKML, with 
> minor modifications.
> 
> This is kernel level support & enablement for now. Support for proper 
> MTD partitioning will come later and will be necessary to boot from 
> it.
Do you plan on porting the smem stuff for partitioning that QSDK uses, or do
are you going to add partitions to the device tree file?
Unless there's a good reason to avoid it, I'm leaning towards the latter, to
give our kernel more control over what's going on.
For example, I'd like to call the partition with the kernel/fs 'ubi'
instead of 'rootfs', since rootfs is already used to auto-select the root
filesystem partition for auto-mounting.

- Felix
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/3] ipq806x: add NAND flash controller support

2015-08-06 Thread Mathieu Olivari
These patches add support for ipq806x NAND flash controller. Most of
these are cherry-picked & backported from LKML:
*https://lkml.org/lkml/2015/8/3/16

This patch just modifies the kernel code, but doesn't change the config.
It should be harmless.

Signed-off-by: Mathieu Olivari 
---
 .../160-clk-qcom-Add-EBI2-clocks-for-IPQ806x.patch |   74 +
 ...g-to-access-bad-block-markers-in-raw-mode.patch |   84 +
 ...-mtd-nand-Qualcomm-NAND-controller-driver.patch | 2024 
 ...63-dt-bindings-qcom_nandc-Add-DT-bindings.patch |   82 +
 ...-dts-Add-NAND-controller-node-for-ipq806x.patch |   50 +
 ...nable-NAND-node-on-IPQ8064-AP148-platform.patch |   79 +
 ...dd-support-for-NSS-GMAC-clocks-and-resets.patch |   20 +-
 ...RM-dts-qcom-add-mdio-nodes-to-ap148-db149.patch |   11 +-
 ...-qcom-add-gmac-nodes-to-ipq806x-platforms.patch |7 +-
 ...g-to-access-bad-block-markers-in-raw-mode.patch |   84 +
 ...-mtd-nand-Qualcomm-NAND-controller-driver.patch | 2024 
 ...63-dt-bindings-qcom_nandc-Add-DT-bindings.patch |   82 +
 ...-dts-Add-NAND-controller-node-for-ipq806x.patch |   50 +
 ...nable-NAND-node-on-IPQ8064-AP148-platform.patch |   76 +
 ...RM-dts-qcom-add-mdio-nodes-to-ap148-db149.patch |   11 +-
 ...-qcom-add-gmac-nodes-to-ipq806x-platforms.patch |7 +-
 16 files changed, 4739 insertions(+), 26 deletions(-)
 create mode 100644 
target/linux/ipq806x/patches-3.18/160-clk-qcom-Add-EBI2-clocks-for-IPQ806x.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/161-mtd-nand-Create-a-BBT-flag-to-access-bad-block-markers-in-raw-mode.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/162-mtd-nand-Qualcomm-NAND-controller-driver.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/163-dt-bindings-qcom_nandc-Add-DT-bindings.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/164-arm-qcom-dts-Add-NAND-controller-node-for-ipq806x.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/165-arm-qcom-dts-Enable-NAND-node-on-IPQ8064-AP148-platform.patch
 create mode 100644 
target/linux/ipq806x/patches-4.1/161-mtd-nand-Create-a-BBT-flag-to-access-bad-block-markers-in-raw-mode.patch
 create mode 100644 
target/linux/ipq806x/patches-4.1/162-mtd-nand-Qualcomm-NAND-controller-driver.patch
 create mode 100644 
target/linux/ipq806x/patches-4.1/163-dt-bindings-qcom_nandc-Add-DT-bindings.patch
 create mode 100644 
target/linux/ipq806x/patches-4.1/164-arm-qcom-dts-Add-NAND-controller-node-for-ipq806x.patch
 create mode 100644 
target/linux/ipq806x/patches-4.1/165-arm-qcom-dts-Enable-NAND-node-on-IPQ8064-AP148-platform.patch

diff --git 
a/target/linux/ipq806x/patches-3.18/160-clk-qcom-Add-EBI2-clocks-for-IPQ806x.patch
 
b/target/linux/ipq806x/patches-3.18/160-clk-qcom-Add-EBI2-clocks-for-IPQ806x.patch
new file mode 100644
index 000..77d29d8
--- /dev/null
+++ 
b/target/linux/ipq806x/patches-3.18/160-clk-qcom-Add-EBI2-clocks-for-IPQ806x.patch
@@ -0,0 +1,74 @@
+From 4c385b25fab119144bffb255ad77712fe586ac10 Mon Sep 17 00:00:00 2001
+From: Archit Taneja 
+Date: Thu, 2 Apr 2015 11:20:41 +0530
+Subject: [PATCH] clk: qcom: Add EBI2 clocks for IPQ806x
+
+The NAND controller within EBI2 requires EBI2_CLK and
+EBI2_ALWAYS_ON_CLK clocks.  Create structs for these clocks so
+that they can be used by the NAND controller driver. Add an entry
+for EBI2_AON_CLK in the gcc-ipq806x DT binding document.
+
+Signed-off-by: Archit Taneja 
+Signed-off-by: Stephen Boyd 
+---
+ drivers/clk/qcom/gcc-ipq806x.c   | 32 
+ include/dt-bindings/clock/qcom,gcc-ipq806x.h |  1 +
+ 2 files changed, 33 insertions(+)
+
+--- a/drivers/clk/qcom/gcc-ipq806x.c
 b/drivers/clk/qcom/gcc-ipq806x.c
+@@ -2239,6 +2239,36 @@ static struct clk_branch usb_fs1_h_clk =
+   },
+ };
+ 
++static struct clk_branch ebi2_clk = {
++  .hwcg_reg = 0x3b00,
++  .hwcg_bit = 6,
++  .halt_reg = 0x2fcc,
++  .halt_bit = 1,
++  .clkr = {
++  .enable_reg = 0x3b00,
++  .enable_mask = BIT(4),
++  .hw.init = &(struct clk_init_data){
++  .name = "ebi2_clk",
++  .ops = &clk_branch_ops,
++  .flags = CLK_IS_ROOT,
++  },
++  },
++};
++
++static struct clk_branch ebi2_aon_clk = {
++  .halt_reg = 0x2fcc,
++  .halt_bit = 0,
++  .clkr = {
++  .enable_reg = 0x3b00,
++  .enable_mask = BIT(8),
++  .hw.init = &(struct clk_init_data){
++  .name = "ebi2_always_on_clk",
++  .ops = &clk_branch_ops,
++  .flags = CLK_IS_ROOT,
++  },
++  },
++};
++
+ static struct clk_regmap *gcc_ipq806x_clks[] = {
+   [PLL0] = &pll0.clkr,
+   [PLL0_VOTE] = &pll0_vote,
+@@ -2341,6 +2371,8 @@ static struct clk_regmap *gcc_ipq806x_cl
+   [USB_FS1_XCVR_SRC] = &usb_fs1_xcvr_clk_src.

[OpenWrt-Devel] [PATCH 1/3] ipq806x: Add ADM support

2015-08-06 Thread Mathieu Olivari
These are cherry-picked & backported from LKML:
*https://lkml.org/lkml/2015/3/17/19

They are enabled on both 3.18 and 4.1 kernel. Patches 150 to 154 are
applying changes merged since 3.18; they enable mechanisms used by the
ADM driver.

ADM engine is used by the NAND controller, so it is necessary to
bring-up NAND flash support.

Signed-off-by: Mathieu Olivari 
---
 target/linux/ipq806x/config-3.18   |   1 +
 target/linux/ipq806x/config-4.1|   1 +
 ...1-ARM-qcom-add-USB-nodes-to-ipq806x-ap148.patch |   2 +-
 .../150-dmaengine-Rework-dma_chan_get.patch|  70 ++
 ...Remove-the-need-to-declare-device_control.patch |  27 +
 ...ake-channel-allocation-callbacks-optional.patch |  62 ++
 ...engine-Introduce-a-device_config-callback.patch |  51 ++
 ...aengine-Add-device_terminate_all-callback.patch |  47 +
 ...-bindings-qcom_adm-Fix-channel-specifiers.patch |  76 ++
 .../156-dmaengine-Add-ADM-driver.patch | 958 
 .../157-ARM-DT-ipq8064-Add-ADM-device-node.patch   |  54 ++
 ...RM-dts-qcom-add-mdio-nodes-to-ap148-db149.patch |   2 +-
 ...-qcom-add-gmac-nodes-to-ipq806x-platforms.patch |   7 +-
 ...-bindings-qcom_adm-Fix-channel-specifiers.patch |  76 ++
 .../patches-4.1/156-dmaengine-Add-ADM-driver.patch | 962 +
 .../157-ARM-DT-ipq8064-Add-ADM-device-node.patch   |  54 ++
 ...RM-dts-qcom-add-mdio-nodes-to-ap148-db149.patch |   2 +-
 ...-qcom-add-gmac-nodes-to-ipq806x-platforms.patch |   4 +-
 18 files changed, 2448 insertions(+), 8 deletions(-)
 create mode 100644 
target/linux/ipq806x/patches-3.18/150-dmaengine-Rework-dma_chan_get.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/151-dmaengine-Remove-the-need-to-declare-device_control.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/152-dmaengine-Make-channel-allocation-callbacks-optional.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/153-dmaengine-Introduce-a-device_config-callback.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/154-dmaengine-Add-device_terminate_all-callback.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/155-dt-bindings-qcom_adm-Fix-channel-specifiers.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/156-dmaengine-Add-ADM-driver.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/157-ARM-DT-ipq8064-Add-ADM-device-node.patch
 create mode 100644 
target/linux/ipq806x/patches-4.1/155-dt-bindings-qcom_adm-Fix-channel-specifiers.patch
 create mode 100644 
target/linux/ipq806x/patches-4.1/156-dmaengine-Add-ADM-driver.patch
 create mode 100644 
target/linux/ipq806x/patches-4.1/157-ARM-DT-ipq8064-Add-ADM-device-node.patch

diff --git a/target/linux/ipq806x/config-3.18 b/target/linux/ipq806x/config-3.18
index f5bd58e..feedfd9 100644
--- a/target/linux/ipq806x/config-3.18
+++ b/target/linux/ipq806x/config-3.18
@@ -327,6 +327,7 @@ CONFIG_PREEMPT_RCU=y
 CONFIG_PRINTK_TIME=y
 CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_PTP_1588_CLOCK=y
+# CONFIG_QCOM_ADM is not set
 CONFIG_QCOM_BAM_DMA=y
 CONFIG_QCOM_GSBI=y
 CONFIG_QCOM_HFPLL=y
diff --git a/target/linux/ipq806x/config-4.1 b/target/linux/ipq806x/config-4.1
index e3cff2f..0262e7a 100644
--- a/target/linux/ipq806x/config-4.1
+++ b/target/linux/ipq806x/config-4.1
@@ -341,6 +341,7 @@ CONFIG_PREEMPT_RCU=y
 CONFIG_PRINTK_TIME=y
 CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_PTP_1588_CLOCK=y
+# CONFIG_QCOM_ADM is not set
 CONFIG_QCOM_BAM_DMA=y
 CONFIG_QCOM_GSBI=y
 CONFIG_QCOM_HFPLL=y
diff --git 
a/target/linux/ipq806x/patches-3.18/101-ARM-qcom-add-USB-nodes-to-ipq806x-ap148.patch
 
b/target/linux/ipq806x/patches-3.18/101-ARM-qcom-add-USB-nodes-to-ipq806x-ap148.patch
index 8f17397..5fee6ad 100644
--- 
a/target/linux/ipq806x/patches-3.18/101-ARM-qcom-add-USB-nodes-to-ipq806x-ap148.patch
+++ 
b/target/linux/ipq806x/patches-3.18/101-ARM-qcom-add-USB-nodes-to-ipq806x-ap148.patch
@@ -1,6 +1,6 @@
 --- a/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
 +++ b/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
-@@ -109,5 +109,29 @@
+@@ -114,5 +114,29 @@
sata@2900 {
status = "ok";
};
diff --git 
a/target/linux/ipq806x/patches-3.18/150-dmaengine-Rework-dma_chan_get.patch 
b/target/linux/ipq806x/patches-3.18/150-dmaengine-Rework-dma_chan_get.patch
new file mode 100644
index 000..880e67c
--- /dev/null
+++ b/target/linux/ipq806x/patches-3.18/150-dmaengine-Rework-dma_chan_get.patch
@@ -0,0 +1,70 @@
+From d2f4f99db3e9ec8b063cf2e45704e2bb95428317 Mon Sep 17 00:00:00 2001
+From: Maxime Ripard 
+Date: Mon, 17 Nov 2014 14:41:58 +0100
+Subject: [PATCH] dmaengine: Rework dma_chan_get
+
+dma_chan_get uses a rather interesting error handling and code path.
+
+Change it to something more usual in the kernel.
+
+Signed-off-by: Maxime Ripard 
+Acked-by: Laurent Pinchart 
+Signed-off-by: Vinod Koul 
+---
+ drivers/dma/dmaengine.c | 36 +++-
+ 1 file changed, 19 insertions(+), 17 deletions(-)
+
+---

[OpenWrt-Devel] [PATCH 3/3] ipq806x: enable NAND flash support in the kernel

2015-08-06 Thread Mathieu Olivari
Previous patch set backported the recently posted NAND flash driver to
3.18 and 4.1 kernel. This patch now enables it in the kernel config.

There is no change to the partition layout and init yet. But the NAND
flash can be seen in the mtd list on an AP148:

root@OpenWrt:/# cat /proc/mtd
dev:size   erasesize  name
mtd0: 1000 0002 "qcom-nandc"
...

Signed-off-by: Mathieu Olivari 
---
 target/linux/ipq806x/Makefile|  2 +-
 target/linux/ipq806x/config-3.18 | 21 -
 target/linux/ipq806x/config-4.1  | 19 ++-
 3 files changed, 39 insertions(+), 3 deletions(-)

diff --git a/target/linux/ipq806x/Makefile b/target/linux/ipq806x/Makefile
index b6ddfe2..45f83dd 100644
--- a/target/linux/ipq806x/Makefile
+++ b/target/linux/ipq806x/Makefile
@@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk
 ARCH:=arm
 BOARD:=ipq806x
 BOARDNAME:=Qualcomm Atheros IPQ806X
-FEATURES:=squashfs
+FEATURES:=squashfs nand ubifs
 CPU_TYPE:=cortex-a7
 MAINTAINER:=John Crispin 
 
diff --git a/target/linux/ipq806x/config-3.18 b/target/linux/ipq806x/config-3.18
index feedfd9..2a837f5 100644
--- a/target/linux/ipq806x/config-3.18
+++ b/target/linux/ipq806x/config-3.18
@@ -104,6 +104,8 @@ CONFIG_CRC16=y
 # CONFIG_CRC32_SARWATE is not set
 CONFIG_CRC32_SLICEBY8=y
 CONFIG_CROSS_MEMORY_ATTACH=y
+CONFIG_CRYPTO_DEFLATE=y
+CONFIG_CRYPTO_LZO=y
 # CONFIG_CRYPTO_SHA1_ARM_NEON is not set
 # CONFIG_CRYPTO_SHA512_ARM_NEON is not set
 CONFIG_CRYPTO_XZ=y
@@ -251,10 +253,21 @@ CONFIG_MSM_IOMMU=y
 CONFIG_MSM_MMCC_8960=y
 CONFIG_MSM_MMCC_8974=y
 CONFIG_MTD_CMDLINE_PARTS=y
+# CONFIG_MTD_IMPA7 is not set
+CONFIG_MTD_JEDECPROBE=y
 CONFIG_MTD_M25P80=y
+CONFIG_MTD_NAND=y
+CONFIG_MTD_NAND_ECC=y
+CONFIG_MTD_NAND_QCOM=y
 CONFIG_MTD_SPI_NOR=y
 CONFIG_MTD_SPLIT_FIRMWARE=y
 CONFIG_MTD_SPLIT_FIT_FW=y
+CONFIG_MTD_UBI=y
+CONFIG_MTD_UBI_BEB_LIMIT=20
+# CONFIG_MTD_UBI_BLOCK is not set
+# CONFIG_MTD_UBI_FASTMAP is not set
+# CONFIG_MTD_UBI_GLUEBI is not set
+CONFIG_MTD_UBI_WL_THRESHOLD=4096
 CONFIG_MULTI_IRQ_HANDLER=y
 CONFIG_MUTEX_SPIN_ON_OWNER=y
 CONFIG_NEED_DMA_MAP_STATE=y
@@ -327,7 +340,7 @@ CONFIG_PREEMPT_RCU=y
 CONFIG_PRINTK_TIME=y
 CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_PTP_1588_CLOCK=y
-# CONFIG_QCOM_ADM is not set
+CONFIG_QCOM_ADM=y
 CONFIG_QCOM_BAM_DMA=y
 CONFIG_QCOM_GSBI=y
 CONFIG_QCOM_HFPLL=y
@@ -395,6 +408,11 @@ CONFIG_THERMAL_OF=y
 CONFIG_TICK_CPU_ACCOUNTING=y
 CONFIG_TIMER_STATS=y
 CONFIG_TREE_PREEMPT_RCU=y
+CONFIG_UBIFS_FS=y
+# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set
+CONFIG_UBIFS_FS_LZO=y
+CONFIG_UBIFS_FS_XZ=y
+CONFIG_UBIFS_FS_ZLIB=y
 CONFIG_UEVENT_HELPER_PATH=""
 CONFIG_UID16=y
 CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
@@ -416,5 +434,6 @@ CONFIG_XZ_DEC_ARM=y
 CONFIG_XZ_DEC_BCJ=y
 CONFIG_ZBOOT_ROM_BSS=0
 CONFIG_ZBOOT_ROM_TEXT=0
+CONFIG_ZLIB_DEFLATE=y
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZONE_DMA_FLAG=0
diff --git a/target/linux/ipq806x/config-4.1 b/target/linux/ipq806x/config-4.1
index 0262e7a..f711dd5 100644
--- a/target/linux/ipq806x/config-4.1
+++ b/target/linux/ipq806x/config-4.1
@@ -111,6 +111,8 @@ CONFIG_CRC16=y
 # CONFIG_CRC32_SARWATE is not set
 CONFIG_CRC32_SLICEBY8=y
 CONFIG_CROSS_MEMORY_ATTACH=y
+CONFIG_CRYPTO_DEFLATE=y
+CONFIG_CRYPTO_LZO=y
 CONFIG_CRYPTO_XZ=y
 CONFIG_DCACHE_WORD_ACCESS=y
 CONFIG_DEBUG_BUGVERBOSE=y
@@ -263,9 +265,18 @@ CONFIG_MSM_MMCC_8960=y
 CONFIG_MSM_MMCC_8974=y
 CONFIG_MTD_CMDLINE_PARTS=y
 CONFIG_MTD_M25P80=y
+CONFIG_MTD_NAND=y
+CONFIG_MTD_NAND_ECC=y
+CONFIG_MTD_NAND_QCOM=y
 CONFIG_MTD_SPI_NOR=y
 CONFIG_MTD_SPLIT_FIRMWARE=y
 CONFIG_MTD_SPLIT_FIT_FW=y
+CONFIG_MTD_UBI=y
+CONFIG_MTD_UBI_BEB_LIMIT=20
+# CONFIG_MTD_UBI_BLOCK is not set
+# CONFIG_MTD_UBI_FASTMAP is not set
+# CONFIG_MTD_UBI_GLUEBI is not set
+CONFIG_MTD_UBI_WL_THRESHOLD=4096
 CONFIG_MULTI_IRQ_HANDLER=y
 CONFIG_MUTEX_SPIN_ON_OWNER=y
 CONFIG_NEED_DMA_MAP_STATE=y
@@ -341,7 +352,7 @@ CONFIG_PREEMPT_RCU=y
 CONFIG_PRINTK_TIME=y
 CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_PTP_1588_CLOCK=y
-# CONFIG_QCOM_ADM is not set
+CONFIG_QCOM_ADM=y
 CONFIG_QCOM_BAM_DMA=y
 CONFIG_QCOM_GSBI=y
 CONFIG_QCOM_HFPLL=y
@@ -406,6 +417,11 @@ CONFIG_THERMAL_OF=y
 # CONFIG_THUMB2_KERNEL is not set
 CONFIG_TICK_CPU_ACCOUNTING=y
 CONFIG_TIMER_STATS=y
+CONFIG_UBIFS_FS=y
+# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set
+CONFIG_UBIFS_FS_LZO=y
+CONFIG_UBIFS_FS_XZ=y
+CONFIG_UBIFS_FS_ZLIB=y
 CONFIG_UEVENT_HELPER_PATH=""
 CONFIG_UID16=y
 CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
@@ -427,5 +443,6 @@ CONFIG_XZ_DEC_ARM=y
 CONFIG_XZ_DEC_BCJ=y
 CONFIG_ZBOOT_ROM_BSS=0
 CONFIG_ZBOOT_ROM_TEXT=0
+CONFIG_ZLIB_DEFLATE=y
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZONE_DMA_FLAG=0
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 0/3] ipq806x: add NAND flash support

2015-08-06 Thread Mathieu Olivari
This patch serie adds support for the integrated NAND flash controller
available on AP148. Most of the patches are backported from LKML, with
minor modifications.

This is kernel level support & enablement for now. Support for proper
MTD partitioning will come later and will be necessary to boot from
it.

Mathieu Olivari (3):
  ipq806x: Add ADM support
  ipq806x: add NAND flash controller support
  ipq806x: enable NAND flash support in the kernel

 target/linux/ipq806x/Makefile  |2 +-
 target/linux/ipq806x/config-3.18   |   20 +
 target/linux/ipq806x/config-4.1|   18 +
 ...1-ARM-qcom-add-USB-nodes-to-ipq806x-ap148.patch |2 +-
 .../150-dmaengine-Rework-dma_chan_get.patch|   70 +
 ...Remove-the-need-to-declare-device_control.patch |   27 +
 ...ake-channel-allocation-callbacks-optional.patch |   62 +
 ...engine-Introduce-a-device_config-callback.patch |   51 +
 ...aengine-Add-device_terminate_all-callback.patch |   47 +
 ...-bindings-qcom_adm-Fix-channel-specifiers.patch |   76 +
 .../156-dmaengine-Add-ADM-driver.patch |  958 +
 .../157-ARM-DT-ipq8064-Add-ADM-device-node.patch   |   54 +
 .../160-clk-qcom-Add-EBI2-clocks-for-IPQ806x.patch |   74 +
 ...g-to-access-bad-block-markers-in-raw-mode.patch |   84 +
 ...-mtd-nand-Qualcomm-NAND-controller-driver.patch | 2024 
 ...63-dt-bindings-qcom_nandc-Add-DT-bindings.patch |   82 +
 ...-dts-Add-NAND-controller-node-for-ipq806x.patch |   50 +
 ...nable-NAND-node-on-IPQ8064-AP148-platform.patch |   79 +
 ...dd-support-for-NSS-GMAC-clocks-and-resets.patch |   20 +-
 ...RM-dts-qcom-add-mdio-nodes-to-ap148-db149.patch |   11 +-
 ...-qcom-add-gmac-nodes-to-ipq806x-platforms.patch |   10 +-
 ...-bindings-qcom_adm-Fix-channel-specifiers.patch |   76 +
 .../patches-4.1/156-dmaengine-Add-ADM-driver.patch |  962 ++
 .../157-ARM-DT-ipq8064-Add-ADM-device-node.patch   |   54 +
 ...g-to-access-bad-block-markers-in-raw-mode.patch |   84 +
 ...-mtd-nand-Qualcomm-NAND-controller-driver.patch | 2024 
 ...63-dt-bindings-qcom_nandc-Add-DT-bindings.patch |   82 +
 ...-dts-Add-NAND-controller-node-for-ipq806x.patch |   50 +
 ...nable-NAND-node-on-IPQ8064-AP148-platform.patch |   76 +
 ...RM-dts-qcom-add-mdio-nodes-to-ap148-db149.patch |   11 +-
 ...-qcom-add-gmac-nodes-to-ipq806x-platforms.patch |7 +-
 31 files changed, 7218 insertions(+), 29 deletions(-)
 create mode 100644 
target/linux/ipq806x/patches-3.18/150-dmaengine-Rework-dma_chan_get.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/151-dmaengine-Remove-the-need-to-declare-device_control.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/152-dmaengine-Make-channel-allocation-callbacks-optional.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/153-dmaengine-Introduce-a-device_config-callback.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/154-dmaengine-Add-device_terminate_all-callback.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/155-dt-bindings-qcom_adm-Fix-channel-specifiers.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/156-dmaengine-Add-ADM-driver.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/157-ARM-DT-ipq8064-Add-ADM-device-node.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/160-clk-qcom-Add-EBI2-clocks-for-IPQ806x.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/161-mtd-nand-Create-a-BBT-flag-to-access-bad-block-markers-in-raw-mode.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/162-mtd-nand-Qualcomm-NAND-controller-driver.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/163-dt-bindings-qcom_nandc-Add-DT-bindings.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/164-arm-qcom-dts-Add-NAND-controller-node-for-ipq806x.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/165-arm-qcom-dts-Enable-NAND-node-on-IPQ8064-AP148-platform.patch
 create mode 100644 
target/linux/ipq806x/patches-4.1/155-dt-bindings-qcom_adm-Fix-channel-specifiers.patch
 create mode 100644 
target/linux/ipq806x/patches-4.1/156-dmaengine-Add-ADM-driver.patch
 create mode 100644 
target/linux/ipq806x/patches-4.1/157-ARM-DT-ipq8064-Add-ADM-device-node.patch
 create mode 100644 
target/linux/ipq806x/patches-4.1/161-mtd-nand-Create-a-BBT-flag-to-access-bad-block-markers-in-raw-mode.patch
 create mode 100644 
target/linux/ipq806x/patches-4.1/162-mtd-nand-Qualcomm-NAND-controller-driver.patch
 create mode 100644 
target/linux/ipq806x/patches-4.1/163-dt-bindings-qcom_nandc-Add-DT-bindings.patch
 create mode 100644 
target/linux/ipq806x/patches-4.1/164-arm-qcom-dts-Add-NAND-controller-node-for-ipq806x.patch
 create mode 100644 
target/linux/ipq806x/patches-4.1/165-arm-qcom-dts-Enable-NAND-node-on-IPQ8064-AP148-platform.patch

-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
h

[OpenWrt-Devel] [PATCH] scripts: add a new patch-rename.sh script

2015-08-05 Thread Mathieu Olivari
During quilt based development, it is sometimes necessary to reorder
patch files, which can become a tedious process as the patch list gets
bigger. This script can help when doing such operations, by allowing to
increment or decrement the number of multiple patch files at once:

$ ./scripts/patch-rename.sh -i 5 target/linux/generic/1*
Add 5 to all the prefix numbers of all the patch files specified as an
argument.

Signed-off-by: Mathieu Olivari 
---
 scripts/patch-rename.sh | 66 +
 1 file changed, 66 insertions(+)
 create mode 100755 scripts/patch-rename.sh

diff --git a/scripts/patch-rename.sh b/scripts/patch-rename.sh
new file mode 100755
index 000..011d179
--- /dev/null
+++ b/scripts/patch-rename.sh
@@ -0,0 +1,66 @@
+#!/bin/bash
+
+usage() {
+   echo "Usage: `basename $0` [ -i addval ] [ -d decval ] xxx.patch 
yyy.patch ..."
+   echo -e "\t -i ==> increment patch files by \"addval\""
+   echo -e "\t -d ==> decrement patch files by \"decval\""
+   exit 1
+}
+
+_do_rename() {
+   local mod=$1
+   local op=$2
+   local file=$3
+   local oldval newval
+
+   [ -f $file ] || { echo "Can't find file: $file"; exit 1; }
+
+   oldval=$(echo $file | sed 's/.*\/\([0-9]*\)-[^\/]*/\1/')
+   digits=${#oldval}
+   newval=$((${oldval##0*0} $op $mod))
+   # Pad newval to the previous number of characters
+   newval=$(printf "%0${#oldval}d" $newval)
+   rename "s/$oldval/$newval/" $file || { \
+   echo "Can't rename file: $file\n"; \
+   exit 1; \
+   }
+}
+
+dec_patches() {
+   local decval=$1; shift
+   # process the lowest patch first to avoid having conflicting numbers
+   local patchlist=$(echo $@ | sort -n)
+   local oldval newval
+
+   for p in ${patchlist}; do
+   _do_rename $decval - $p
+   done
+}
+
+inc_patches() {
+   local incval=$1; shift
+   # process the highest patch first to avoid having conflicting numbers
+   local patchlist=$(echo $@ | sort -nr)
+   local oldval newval
+
+   for p in ${patchlist}; do
+   _do_rename $incval + $p
+   done
+}
+
+while getopts "i:d:" OPTION; do
+   case $OPTION in
+   i ) INCVAL=$OPTARG;;
+   d ) DECVAL=$OPTARG;;
+   * ) usage;;
+   esac
+done
+
+shift $((OPTIND-1))
+PATCH_LIST=$@
+
+# If the user didn't provide any file, show the usage information
+[ ${#PATCH_LIST} == 0 ] && usage
+
+[ -n "$INCVAL" ] && inc_patches $INCVAL $PATCH_LIST
+[ -n "$DECVAL" ] && dec_patches $DECVAL $PATCH_LIST
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/2] tools/quilt: fix build error during kernel_menuconfig on a cleaned env

2015-08-05 Thread Mathieu Olivari
When running "make kernel_menuconfig" right after "make clean", we error
out with the following message:

Makefile:22: recipe for target 
'.../build_dir/target-arm_cortex-a7_musl-1.1.10_eabi/linux-.../linux-3.18.18/.quilt_checked'
 failed
make[2]: 
[.../build_dir/target-arm_cortex-a7_musl-1.1.10_eabi/linux-.../linux-3.18.18/.quilt_checked]
Error 127 (ignored)

The root cause of the problem is located in the OpenWrt specific quilt
patch, which sets the quilt install directory to $STAGING_DIR/../host.
However, on a clean environment (right after running "make clean"),
$STAGING_DIR doesn't exist. The "quilt" executable doesn't find its
different commands, errors out, and creates this message.

We're fixing it by using $STAGING_DIR_HOST rather than $STAGING_DIR,
which is absolute. It will work even if there is no target directory
yet.

Signed-off-by: Mathieu Olivari 
---
 tools/quilt/patches/000-relocatable.patch | 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/tools/quilt/patches/000-relocatable.patch 
b/tools/quilt/patches/000-relocatable.patch
index 99d7af5..c498627 100644
--- a/tools/quilt/patches/000-relocatable.patch
+++ b/tools/quilt/patches/000-relocatable.patch
@@ -7,9 +7,9 @@
 -export TEXTDOMAINDIR=@LOCALEDIR@
  
 -: ${QUILT_DIR=@QUILT_DIR@}
-+if test -n "$STAGING_DIR"; then
-+  export TEXTDOMAINDIR="$STAGING_DIR/../host/share/locale"
-+  : ${QUILT_DIR=$STAGING_DIR/../host/share/quilt} 
${QUILT_LIB=$STAGING_DIR/../host/lib/quilt}
++if test -n "$STAGING_DIR_HOST"; then
++  export TEXTDOMAINDIR="$STAGING_DIR_HOST/share/locale"
++  : ${QUILT_DIR=$STAGING_DIR_HOST/share/quilt} 
${QUILT_LIB=$STAGING_DIR_HOST/lib/quilt}
 +else
 +  export TEXTDOMAINDIR=@LOCALEDIR@
 +  : ${QUILT_DIR=@QUILT_DIR@}
@@ -25,7 +25,7 @@
  
  setlocale(LC_MESSAGES, "");
 -bindtextdomain("quilt", "@LOCALEDIR@");
-+bindtextdomain("quilt", $ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . 
'/../host/share/locale' : "@LOCALEDIR@");
++bindtextdomain("quilt", $ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . 
'/share/locale' : "@LOCALEDIR@");
  textdomain("quilt");
  
  sub _($) {
@@ -36,8 +36,8 @@
  #  See the COPYING and AUTHORS files for more details.
  
 -: ${QUILT_DIR=@QUILT_DIR@}
-+if test -n "$STAGING_DIR"; then
-+  : ${QUILT_DIR="$STAGING_DIR/../host/share/quilt"}
++if test -n "$STAGING_DIR_HOST"; then
++  : ${QUILT_DIR="$STAGING_DIR_HOST/share/quilt"}
 +else
 +  : ${QUILT_DIR=@QUILT_DIR@}
 +fi
@@ -51,8 +51,8 @@
  
  export TEXTDOMAIN=quilt
 -export TEXTDOMAINDIR=@LOCALEDIR@
-+if [ -n "$STAGING_DIR" ]; then
-+  export TEXTDOMAINDIR="$STAGING_DIR/../host/share/locale"
++if [ -n "$STAGING_DIR_HOST" ]; then
++  export TEXTDOMAINDIR="$STAGING_DIR_HOST/share/locale"
 +else
 +  export TEXTDOMAINDIR=@LOCALEDIR@
 +fi
@@ -66,7 +66,7 @@
  
  setlocale(LC_MESSAGES, "");
 -bindtextdomain("quilt", "@LOCALEDIR@");
-+bindtextdomain("quilt", $ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . 
'/../host/share/locale' : "@LOCALEDIR@");
++bindtextdomain("quilt", $ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . 
'/share/locale' : "@LOCALEDIR@");
  textdomain("quilt");
  
  sub _($) {
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/2] rules.mk: export STAGING_DIR_HOST to sub-makefiles and shells

2015-08-05 Thread Mathieu Olivari
Certains host packages (like quilt) need to know the previously used
install location at run-time. They currently use $STAGING_DIR, which
causes issues on cleaned environment, where $STAGING_DIR doesn't exist
yet.

Signed-off-by: Mathieu Olivari 
---
 rules.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rules.mk b/rules.mk
index 58b9f3e..e67ffd5 100644
--- a/rules.mk
+++ b/rules.mk
@@ -188,7 +188,7 @@ else
 endif
 
 export PATH:=$(TARGET_PATH)
-export STAGING_DIR
+export STAGING_DIR STAGING_DIR_HOST
 export SH_FUNC:=. $(INCLUDE_DIR)/shell.sh;
 
 PKG_CONFIG:=$(STAGING_DIR_HOST)/bin/pkg-config
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 0/2] Fix quilt error when $STAGING_DIR doesn't exist yet

2015-08-05 Thread Mathieu Olivari
This patch has been posted a few weeks ago. Just posting again as a
gentle reminder. Concerns were raised regarding whether the SDK worked
after the modification, which has been confirmed.

Mathieu Olivari (2):
  rules.mk: export STAGING_DIR_HOST to sub-makefiles and shells
  tools/quilt: fix build error during kernel_menuconfig on a cleaned env

 rules.mk  |  2 +-
 tools/quilt/patches/000-relocatable.patch | 18 +-
 2 files changed, 10 insertions(+), 10 deletions(-)

-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 3/4] ipq806x: fix pcie pinmux naming in ipq806x dts

2015-08-04 Thread Mathieu Olivari
Rah; sorry about that, it happens fairly often actually. I reworked the
patch list a couple of times and I thought I tried it after the last one.
Thanks for the fix.

-Original Message-
From: Felix Fietkau [mailto:n...@openwrt.org] 
Sent: Tuesday, August 04, 2015 4:05 PM
To: Mathieu Olivari; j...@openwrt.org; blo...@openwrt.org
Cc: openwrt-devel@lists.openwrt.org
Subject: Re: [PATCH 3/4] ipq806x: fix pcie pinmux naming in ipq806x dts

On 2015-08-04 23:55, Mathieu Olivari wrote:
> PCIe controller nodes are numbers 0/1/2 in the chipset dtsi file, but 
> the pinmux nodes are numbers 1/2/3. We'll make it consistent by 
> changing the pinmux numbering to match the controller's one.
> 
> Signed-off-by: Mathieu Olivari 
> ---
> diff --git 
> a/target/linux/ipq806x/patches-3.18/708-ARM-dts-qcom-add-gmac-nodes-to
> -ipq806x-platforms.patch 
> b/target/linux/ipq806x/patches-3.18/708-ARM-dts-qcom-add-gmac-nodes-to
> -ipq806x-platforms.patch
> index cce30b0..8d6e77a 100644
> --- 
> a/target/linux/ipq806x/patches-3.18/708-ARM-dts-qcom-add-gmac-nodes-to
> -ipq806x-platforms.patch
> +++ b/target/linux/ipq806x/patches-3.18/708-ARM-dts-qcom-add-gmac-node
> +++ s-to-ipq806x-platforms.patch
> @@ -12,7 +12,7 @@ Signed-off-by: Mathieu Olivari 
> 
>  
>  --- a/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
>  +++ b/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
> -@@ -64,6 +64,16 @@
> +@@ -69,6 +69,16 @@
>   bias-disable;
>       };
>   };
> @@ -29,7 +29,7 @@ Signed-off-by: Mathieu Olivari 
>   };
>   
>   gsbi@1630 {
> -@@ -201,5 +211,26 @@
> +@@ -206,5 +216,26 @@
>           reg = <4>;
>   };
>   };
> @@ -116,9 +116,9 @@ Signed-off-by: Mathieu Olivari

>   };
>  --- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
>  +++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
> -@@ -638,5 +638,91 @@
> - dr_mode = "host";
> - };
> +@@ -87,6 +87,92 @@
> + clock-frequency = <32768>;
> + #clock-cells = <0>;
>   };
>  +
>  +nss_common: syscon@0300 {
> @@ -207,4 +207,5 @@ Signed-off-by: Mathieu Olivari

>  +status = "disabled";
>  +};
>   };
> - };
> + 
> + kraitcc: clock-controller {
FYI, this part completely messed up the patch, as it moved the gmac device
tree nodes from /soc to /clocks. I've fixed it up locally and I will commit
the fixed version.

- Felix
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/2] ipq806x: add ethernet (stmmac) support

2015-08-04 Thread Mathieu Olivari
We forgot to enable the stmmac driver for 4.1 kernel, so ethernet
interfaces don't show-up on this kernel.

Signed-off-by: Mathieu Olivari 
---
 target/linux/ipq806x/config-4.1 | 5 +
 1 file changed, 5 insertions(+)

diff --git a/target/linux/ipq806x/config-4.1 b/target/linux/ipq806x/config-4.1
index ffb0334..e3cff2f 100644
--- a/target/linux/ipq806x/config-4.1
+++ b/target/linux/ipq806x/config-4.1
@@ -271,6 +271,7 @@ CONFIG_MUTEX_SPIN_ON_OWNER=y
 CONFIG_NEED_DMA_MAP_STATE=y
 CONFIG_NEON=y
 CONFIG_NET_FLOW_LIMIT=y
+CONFIG_NET_PTP_CLASSIFY=y
 CONFIG_NET_VENDOR_WIZNET=y
 CONFIG_NO_BOOTMEM=y
 CONFIG_NO_HZ=y
@@ -332,12 +333,14 @@ CONFIG_POWER_RESET=y
 # CONFIG_POWER_RESET_BRCMSTB is not set
 CONFIG_POWER_RESET_MSM=y
 CONFIG_POWER_SUPPLY=y
+CONFIG_PPS=y
 CONFIG_PREEMPT=y
 CONFIG_PREEMPT_COUNT=y
 # CONFIG_PREEMPT_NONE is not set
 CONFIG_PREEMPT_RCU=y
 CONFIG_PRINTK_TIME=y
 CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_PTP_1588_CLOCK=y
 CONFIG_QCOM_BAM_DMA=y
 CONFIG_QCOM_GSBI=y
 CONFIG_QCOM_HFPLL=y
@@ -379,6 +382,8 @@ CONFIG_SPI_QUP=y
 CONFIG_SPMI=y
 CONFIG_SPMI_MSM_PMIC_ARB=y
 CONFIG_SRCU=y
+CONFIG_STMMAC_ETH=y
+CONFIG_STMMAC_PLATFORM=y
 CONFIG_STOP_MACHINE=y
 # CONFIG_STRIP_ASM_SYMS is not set
 CONFIG_SUSPEND=y
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/2] ipq806x: refresh kernel configs

2015-08-04 Thread Mathieu Olivari
Remove options which have been moved into the generic config ever since.

Signed-off-by: Mathieu Olivari 
---
 target/linux/ipq806x/config-3.18 |  1 -
 target/linux/ipq806x/config-4.1  | 12 
 2 files changed, 13 deletions(-)

diff --git a/target/linux/ipq806x/config-3.18 b/target/linux/ipq806x/config-3.18
index 4d3b884..f5bd58e 100644
--- a/target/linux/ipq806x/config-3.18
+++ b/target/linux/ipq806x/config-3.18
@@ -410,7 +410,6 @@ CONFIG_WATCHDOG_CORE=y
 # CONFIG_WIZNET_W5300 is not set
 # CONFIG_WL_TI is not set
 # CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set
-# CONFIG_XEN is not set
 CONFIG_XPS=y
 CONFIG_XZ_DEC_ARM=y
 CONFIG_XZ_DEC_BCJ=y
diff --git a/target/linux/ipq806x/config-4.1 b/target/linux/ipq806x/config-4.1
index e80b632..ffb0334 100644
--- a/target/linux/ipq806x/config-4.1
+++ b/target/linux/ipq806x/config-4.1
@@ -4,7 +4,6 @@ CONFIG_ALIGNMENT_TRAP=y
 CONFIG_APQ_GCC_8084=y
 CONFIG_APQ_MMCC_8084=y
 CONFIG_AR8216_PHY=y
-# CONFIG_ARCH_ALPINE is not set
 CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y
 CONFIG_ARCH_HAS_ELF_RANDOMIZE=y
 CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y
@@ -243,8 +242,6 @@ CONFIG_KRAIT_L2_ACCESSORS=y
 CONFIG_LIBFDT=y
 CONFIG_LOCKUP_DETECTOR=y
 CONFIG_LOCK_SPIN_ON_OWNER=y
-# CONFIG_LZ4_COMPRESS is not set
-# CONFIG_LZ4_DECOMPRESS is not set
 CONFIG_LZO_COMPRESS=y
 CONFIG_LZO_DECOMPRESS=y
 CONFIG_MDIO_BITBANG=y
@@ -316,7 +313,6 @@ CONFIG_PHYLIB=y
 CONFIG_PHY_QCOM_IPQ806X_SATA=y
 # CONFIG_PHY_QCOM_UFS is not set
 CONFIG_PINCTRL=y
-# CONFIG_PINCTRL_AMD is not set
 CONFIG_PINCTRL_APQ8064=y
 # CONFIG_PINCTRL_APQ8084 is not set
 CONFIG_PINCTRL_IPQ8064=y
@@ -334,12 +330,7 @@ CONFIG_PM_SLEEP=y
 CONFIG_PM_SLEEP_SMP=y
 CONFIG_POWER_RESET=y
 # CONFIG_POWER_RESET_BRCMSTB is not set
-# CONFIG_POWER_RESET_GPIO is not set
-# CONFIG_POWER_RESET_GPIO_RESTART is not set
-# CONFIG_POWER_RESET_LTC2952 is not set
 CONFIG_POWER_RESET_MSM=y
-# CONFIG_POWER_RESET_SYSCON is not set
-# CONFIG_POWER_RESET_SYSCON_POWEROFF is not set
 CONFIG_POWER_SUPPLY=y
 CONFIG_PREEMPT=y
 CONFIG_PREEMPT_COUNT=y
@@ -352,11 +343,9 @@ CONFIG_QCOM_GSBI=y
 CONFIG_QCOM_HFPLL=y
 CONFIG_QCOM_SCM=y
 CONFIG_QCOM_WDT=y
-# CONFIG_QORIQ_CPUFREQ is not set
 CONFIG_RAS=y
 # CONFIG_RCU_BOOST is not set
 CONFIG_RCU_CPU_STALL_TIMEOUT=21
-# CONFIG_RCU_EXPEDITE_BOOT is not set
 CONFIG_RCU_STALL_COMMON=y
 CONFIG_RD_GZIP=y
 CONFIG_REGMAP=y
@@ -427,7 +416,6 @@ CONFIG_WATCHDOG_CORE=y
 # CONFIG_WIZNET_W5300 is not set
 # CONFIG_WL_TI is not set
 # CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set
-# CONFIG_XEN is not set
 CONFIG_XPS=y
 CONFIG_XZ_DEC_ARM=y
 CONFIG_XZ_DEC_BCJ=y
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/4] ipq806x: fix pcie pinmux naming in ipq806x dts

2015-08-04 Thread Mathieu Olivari
PCIe controller nodes are numbers 0/1/2 in the chipset dtsi file, but
the pinmux nodes are numbers 1/2/3. We'll make it consistent by changing
the pinmux numbering to match the controller's one.

Signed-off-by: Mathieu Olivari 
---
 ...-qcom-add-pcie-nodes-to-ipq806x-platforms.patch | 31 +-
 ...RM-dts-qcom-add-mdio-nodes-to-ap148-db149.patch | 10 +++
 ...-qcom-add-gmac-nodes-to-ipq806x-platforms.patch | 13 -
 ...-qcom-add-pcie-nodes-to-ipq806x-platforms.patch | 25 +
 ...RM-dts-qcom-add-mdio-nodes-to-ap148-db149.patch |  4 +--
 ...-qcom-add-gmac-nodes-to-ipq806x-platforms.patch |  6 ++---
 6 files changed, 41 insertions(+), 48 deletions(-)

diff --git 
a/target/linux/ipq806x/patches-3.18/112-ARM-dts-qcom-add-pcie-nodes-to-ipq806x-platforms.patch
 
b/target/linux/ipq806x/patches-3.18/112-ARM-dts-qcom-add-pcie-nodes-to-ipq806x-platforms.patch
index 80ac25f..bdc91fb 100644
--- 
a/target/linux/ipq806x/patches-3.18/112-ARM-dts-qcom-add-pcie-nodes-to-ipq806x-platforms.patch
+++ 
b/target/linux/ipq806x/patches-3.18/112-ARM-dts-qcom-add-pcie-nodes-to-ipq806x-platforms.patch
@@ -15,11 +15,11 @@ Signed-off-by: Mathieu Olivari 
 
 --- a/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
 +++ b/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
-@@ -30,6 +30,22 @@
+@@ -35,6 +35,22 @@
bias-disable;
};
  
-+  pcie1_pins: pcie1_pinmux {
++  pcie0_pins: pcie0_pinmux {
 +  mux {
 +  pins = "gpio3";
 +  drive-strength = <2>;
@@ -27,7 +27,7 @@ Signed-off-by: Mathieu Olivari 
 +  };
 +  };
 +
-+  pcie2_pins: pcie2_pinmux {
++  pcie1_pins: pcie1_pinmux {
 +  mux {
 +  pins = "gpio48";
 +  drive-strength = <2>;
@@ -38,7 +38,7 @@ Signed-off-by: Mathieu Olivari 
spi_pins: spi_pins {
mux {
pins = "gpio18", "gpio19", "gpio21";
-@@ -133,5 +149,19 @@
+@@ -138,5 +154,19 @@
usb30@1 {
    status = "ok";
};
@@ -46,14 +46,14 @@ Signed-off-by: Mathieu Olivari 
 +  pcie0: pci@1b50 {
 +  status = "ok";
 +  reset-gpio = <&qcom_pinmux 3 0>;
-+  pinctrl-0 = <&pcie1_pins>;
++  pinctrl-0 = <&pcie0_pins>;
 +  pinctrl-names = "default";
 +  };
 +
 +  pcie1: pci@1b70 {
 +  status = "ok";
 +  reset-gpio = <&qcom_pinmux 48 0>;
-+  pinctrl-0 = <&pcie2_pins>;
++          pinctrl-0 = <&pcie1_pins>;
 +  pinctrl-names = "default";
 +  };
};
@@ -64,7 +64,7 @@ Signed-off-by: Mathieu Olivari 
bias-disable;
};
  
-+  pcie1_pins: pcie1_pinmux {
++  pcie0_pins: pcie0_pinmux {
 +          mux {
 +  pins = "gpio3";
 +  drive-strength = <2>;
@@ -72,7 +72,7 @@ Signed-off-by: Mathieu Olivari 
 +  };
 +  };
 +
-+  pcie2_pins: pcie2_pinmux {
++  pcie1_pins: pcie1_pinmux {
 +  mux {
 +  pins = "gpio48";
 +  drive-strength = <2>;
@@ -80,7 +80,7 @@ Signed-off-by: Mathieu Olivari 
 +  };
 +  };
 +
-+  pcie3_pins: pcie3_pinmux {
++  pcie2_pins: pcie2_pinmux {
 +  mux {
 +  pins = "gpio63";
 +  drive-strength = <2>;
@@ -99,21 +99,21 @@ Signed-off-by: Mathieu Olivari 
 +  pcie0: pci@1b50 {
 +  status = "ok";
 +  reset-gpio = <&qcom_pinmux 3 0>;
-+  pinctrl-0 = <&pcie1_pins>;
++  pinctrl-0 = <&pcie0_pins>;
 +  pinctrl-names = "default";
 +  };
 +
 +  pcie1: pci@1b70 {
 +  status = "ok";
 +  reset-gpio = <&qcom_pinmux 48 0>;
-+ 

[OpenWrt-Devel] [PATCH 4/4] ipq806x: fix freeze in PCIe code when booting with an old u-boot

2015-08-04 Thread Mathieu Olivari
Old bootloader (same ones which have DT disabled) don't perform any PCIe
initialization. The consequence is a freeze during PCIe bring-up on
these old u-boot. Same kernel with a newer bootloaders works fine as
they contain the corresponding PCIe init code.

In this change, we'll add the missing init and make sure the kernel
doesn't rely on some preexisting init to get PCIe to work. That includes
the following changes:
*GPIOs: set function & drive strength
*Clocks: add init code for aux & ref clocks
*PCIe driver: additional init of the hardware controller

Tested 3.18 and 4.1 on an AP148 with bootloader branch 0.0.1

Signed-off-by: Mathieu Olivari 
---
 ...-qcom-add-pcie-nodes-to-ipq806x-platforms.patch |  23 +-
 .../patches-3.18/114-pcie-add-ctlr-init.patch  | 278 +
 .../patches-3.18/115-add-pcie-aux-clk-dts.patch|  80 ++
 ...RM-dts-qcom-add-mdio-nodes-to-ap148-db149.patch |   8 +-
 ...-qcom-add-gmac-nodes-to-ipq806x-platforms.patch |   8 +-
 ...-qcom-add-pcie-nodes-to-ipq806x-platforms.patch |  23 +-
 .../patches-4.1/114-pcie-add-ctlr-init.patch   | 278 +
 .../patches-4.1/115-add-pcie-aux-clk-dts.patch |  80 ++
 ...RM-dts-qcom-add-mdio-nodes-to-ap148-db149.patch |   8 +-
 ...-qcom-add-gmac-nodes-to-ipq806x-platforms.patch |  10 +-
 10 files changed, 761 insertions(+), 35 deletions(-)
 create mode 100644 
target/linux/ipq806x/patches-3.18/114-pcie-add-ctlr-init.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/115-add-pcie-aux-clk-dts.patch
 create mode 100644 
target/linux/ipq806x/patches-4.1/114-pcie-add-ctlr-init.patch
 create mode 100644 
target/linux/ipq806x/patches-4.1/115-add-pcie-aux-clk-dts.patch

diff --git 
a/target/linux/ipq806x/patches-3.18/112-ARM-dts-qcom-add-pcie-nodes-to-ipq806x-platforms.patch
 
b/target/linux/ipq806x/patches-3.18/112-ARM-dts-qcom-add-pcie-nodes-to-ipq806x-platforms.patch
index bdc91fb..ed66047 100644
--- 
a/target/linux/ipq806x/patches-3.18/112-ARM-dts-qcom-add-pcie-nodes-to-ipq806x-platforms.patch
+++ 
b/target/linux/ipq806x/patches-3.18/112-ARM-dts-qcom-add-pcie-nodes-to-ipq806x-platforms.patch
@@ -15,14 +15,15 @@ Signed-off-by: Mathieu Olivari 
 
 --- a/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
 +++ b/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
-@@ -35,6 +35,22 @@
+@@ -35,6 +35,24 @@
bias-disable;
};
  
 +  pcie0_pins: pcie0_pinmux {
 +  mux {
 +  pins = "gpio3";
-+  drive-strength = <2>;
++  function = "pcie1_rst";
++  drive-strength = <12>;
 +  bias-disable;
 +  };
 +          };
@@ -30,7 +31,8 @@ Signed-off-by: Mathieu Olivari 
 +  pcie1_pins: pcie1_pinmux {
 +  mux {
 +  pins = "gpio48";
-+  drive-strength = <2>;
++  function = "pcie2_rst";
++  drive-strength = <12>;
 +  bias-disable;
 +          };
 +  };
@@ -38,7 +40,7 @@ Signed-off-by: Mathieu Olivari 
spi_pins: spi_pins {
mux {
pins = "gpio18", "gpio19", "gpio21";
-@@ -138,5 +154,19 @@
+@@ -138,5 +156,19 @@
        usb30@1 {
status = "ok";
};
@@ -60,14 +62,15 @@ Signed-off-by: Mathieu Olivari 
  };
 --- a/arch/arm/boot/dts/qcom-ipq8064-db149.dts
 +++ b/arch/arm/boot/dts/qcom-ipq8064-db149.dts
-@@ -30,6 +30,30 @@
+@@ -30,6 +30,33 @@
bias-disable;
};
  
 +  pcie0_pins: pcie0_pinmux {
 +  mux {
 +  pins = "gpio3";
-+  drive-strength = <2>;
++  function = "pcie1_rst";
++  drive-strength = <12>;
 +      bias-disable;
 +  };
 +  };
@@ -75,7 +78,8 @@ Signed-off-by: Mathieu Olivari 
 +  pcie1_pins: pcie1_pinmux {
 +  mux {
 +  pins = "gpio48";
-+  drive-strength = <2>;
++  function = "pcie2_rst";
++      dr

[OpenWrt-Devel] [PATCH 2/4] ipq806x: add support for non-dt enabled ap148 bootloader

2015-08-04 Thread Mathieu Olivari
Certain AP148 platforms (and derivative) use bootloaders which did not
have DT enabled.
In order to support these old platforms, we'll now make the following
modifications:
*explicitely add the memory node in the AP148 DT: this used to be added
 by new u-boot through a run-time patch mechanism. We'll now add it
 explicitely so it works on boots which don't support that feature. New
 boots will have the node twice, the second one will be ignored.
*add the zImage generation next to the FIT image for AP148.

Other platforms using non-DT enabled bootloaders may want to leverage
this zImage code to generate their own firmare as well.

Signed-off-by: Mathieu Olivari 
---
 target/linux/ipq806x/image/Makefile| 10 ++
 .../ipq806x/patches-3.18/024-ap148-add-memory-node.patch   | 14 ++
 .../ipq806x/patches-4.1/024-ap148-add-memory-node.patch| 14 ++
 ...-ARM-dts-qcom-add-pcie-nodes-to-ipq806x-platforms.patch |  4 ++--
 ...-dts-qcom-Add-necessary-DT-data-for-Krait-cpufreq.patch |  4 ++--
 .../707-ARM-dts-qcom-add-mdio-nodes-to-ap148-db149.patch   |  6 +++---
 ...-ARM-dts-qcom-add-gmac-nodes-to-ipq806x-platforms.patch |  4 ++--
 7 files changed, 47 insertions(+), 9 deletions(-)
 create mode 100644 
target/linux/ipq806x/patches-3.18/024-ap148-add-memory-node.patch
 create mode 100644 
target/linux/ipq806x/patches-4.1/024-ap148-add-memory-node.patch

diff --git a/target/linux/ipq806x/image/Makefile 
b/target/linux/ipq806x/image/Makefile
index 9a1bad8..99e9811 100644
--- a/target/linux/ipq806x/image/Makefile
+++ b/target/linux/ipq806x/image/Makefile
@@ -8,6 +8,15 @@ UBINIZE_OPTS = -m 2048 -p 128KiB
 
 E2SIZE=$(shell echo $$(($(CONFIG_TARGET_ROOTFS_PARTSIZE)*1024)))
 
+define Image/BuildKernel/zImage
+   cat $(KDIR)/zImage $(LINUX_DIR)/arch/arm/boot/dts/$(1).dtb > 
$(KDIR)/zImage-$(1)
+   $(CP) $(KDIR)/zImage-$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-zImage
+ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
+   cat $(KDIR)/zImage-initramfs $(LINUX_DIR)/arch/arm/boot/dts/$(1).dtb > 
$(KDIR)/zImage-initramfs-$(1)
+   $(CP) $(KDIR)/zImage-initramfs-$(1) 
$(BIN_DIR)/$(IMG_PREFIX)-$(1)-zImage-initramfs
+endif
+endef
+
 define Image/BuildKernel/FIT
gzip -9n -c $(KDIR)/Image > $(KDIR)/Image.gz
$(call CompressLzma,$(KDIR)/Image,$(KDIR)/Image.gz)
@@ -26,6 +35,7 @@ endef
 define Image/BuildKernel
$(CP) $(KDIR)/$(IMG_PREFIX)-vmlinux.elf $(BIN_DIR)
$(call Image/BuildKernel/FIT,qcom-ipq8064-ap148)
+   $(call Image/BuildKernel/zImage,qcom-ipq8064-ap148)
$(call Image/BuildKernel/FIT,qcom-ipq8064-db149)
 endef
 
diff --git a/target/linux/ipq806x/patches-3.18/024-ap148-add-memory-node.patch 
b/target/linux/ipq806x/patches-3.18/024-ap148-add-memory-node.patch
new file mode 100644
index 000..f026ed9
--- /dev/null
+++ b/target/linux/ipq806x/patches-3.18/024-ap148-add-memory-node.patch
@@ -0,0 +1,14 @@
+--- a/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
 b/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
+@@ -4,6 +4,11 @@
+   model = "Qualcomm IPQ8064/AP148";
+   compatible = "qcom,ipq8064-ap148", "qcom,ipq8064";
+ 
++  memory@0 {
++  reg = <0x4200 0x1e00>;
++  device_type = "memory";
++  };
++
+   reserved-memory {
+   #address-cells = <1>;
+   #size-cells = <1>;
diff --git a/target/linux/ipq806x/patches-4.1/024-ap148-add-memory-node.patch 
b/target/linux/ipq806x/patches-4.1/024-ap148-add-memory-node.patch
new file mode 100644
index 000..f026ed9
--- /dev/null
+++ b/target/linux/ipq806x/patches-4.1/024-ap148-add-memory-node.patch
@@ -0,0 +1,14 @@
+--- a/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
 b/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
+@@ -4,6 +4,11 @@
+   model = "Qualcomm IPQ8064/AP148";
+   compatible = "qcom,ipq8064-ap148", "qcom,ipq8064";
+ 
++  memory@0 {
++  reg = <0x4200 0x1e00>;
++  device_type = "memory";
++  };
++
+   reserved-memory {
+   #address-cells = <1>;
+   #size-cells = <1>;
diff --git 
a/target/linux/ipq806x/patches-4.1/112-ARM-dts-qcom-add-pcie-nodes-to-ipq806x-platforms.patch
 
b/target/linux/ipq806x/patches-4.1/112-ARM-dts-qcom-add-pcie-nodes-to-ipq806x-platforms.patch
index e7de2bb..e494d32 100644
--- 
a/target/linux/ipq806x/patches-4.1/112-ARM-dts-qcom-add-pcie-nodes-to-ipq806x-platforms.patch
+++ 
b/target/linux/ipq806x/patches-4.1/112-ARM-dts-qcom-add-pcie-nodes-to-ipq806x-platforms.patch
@@ -15,7 +15,7 @@ Signed-off-by: Mathieu Olivari 
 
 --- a/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
 +++ b/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
-@@ -30,6 +30,22 @@
+@@ -35,6 +35,22 @@
bias-disable;
};
  
@@ -38,7 +38,7 @@ Signed-off-by: Mathieu Olivari 
 

Re: [OpenWrt-Devel] [PATCH 2/2] tools/quilt: fix build error during kernel_menuconfig on a cleaned env

2015-08-03 Thread Mathieu Olivari
Hi Jow,
I just tried it out. I confirm the SDK works after the patch as well.
Thanks,
Mathieu

-Original Message-
From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org] On
Behalf Of Jo-Philipp Wich
Sent: Wednesday, July 22, 2015 12:29 AM
To: openwrt-devel@lists.openwrt.org
Subject: Re: [OpenWrt-Devel] [PATCH 2/2] tools/quilt: fix build error during
kernel_menuconfig on a cleaned env

Hi,

this was originally done to fix quilt in the SDK. Did you test it there
after your change?

~ Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/2] tools/quilt: fix build error during kernel_menuconfig on a cleaned env

2015-07-21 Thread Mathieu Olivari
When running "make kernel_menuconfig" right after "make clean", we error
out with the following message:

Makefile:22: recipe for target 
'.../build_dir/target-arm_cortex-a7_musl-1.1.10_eabi/linux-.../linux-3.18.18/.quilt_checked'
 failed
make[2]: 
[.../build_dir/target-arm_cortex-a7_musl-1.1.10_eabi/linux-.../linux-3.18.18/.quilt_checked]
Error 127 (ignored)

The root cause of the problem is located in the OpenWrt specific quilt
patch, which sets the quilt install directory to $STAGING_DIR/../host.
However, on a clean environment (right after running "make clean"),
$STAGING_DIR doesn't exist. The "quilt" executable doesn't find its
different commands, errors out, and creates this message.

We're fixing it by using $STAGING_DIR_HOST rather than $STAGING_DIR,
which is absolute. It will work even if there is no target directory
yet.

Signed-off-by: Mathieu Olivari 
---
 tools/quilt/patches/000-relocatable.patch | 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/tools/quilt/patches/000-relocatable.patch 
b/tools/quilt/patches/000-relocatable.patch
index 99d7af5..c498627 100644
--- a/tools/quilt/patches/000-relocatable.patch
+++ b/tools/quilt/patches/000-relocatable.patch
@@ -7,9 +7,9 @@
 -export TEXTDOMAINDIR=@LOCALEDIR@
  
 -: ${QUILT_DIR=@QUILT_DIR@}
-+if test -n "$STAGING_DIR"; then
-+  export TEXTDOMAINDIR="$STAGING_DIR/../host/share/locale"
-+  : ${QUILT_DIR=$STAGING_DIR/../host/share/quilt} 
${QUILT_LIB=$STAGING_DIR/../host/lib/quilt}
++if test -n "$STAGING_DIR_HOST"; then
++  export TEXTDOMAINDIR="$STAGING_DIR_HOST/share/locale"
++  : ${QUILT_DIR=$STAGING_DIR_HOST/share/quilt} 
${QUILT_LIB=$STAGING_DIR_HOST/lib/quilt}
 +else
 +  export TEXTDOMAINDIR=@LOCALEDIR@
 +  : ${QUILT_DIR=@QUILT_DIR@}
@@ -25,7 +25,7 @@
  
  setlocale(LC_MESSAGES, "");
 -bindtextdomain("quilt", "@LOCALEDIR@");
-+bindtextdomain("quilt", $ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . 
'/../host/share/locale' : "@LOCALEDIR@");
++bindtextdomain("quilt", $ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . 
'/share/locale' : "@LOCALEDIR@");
  textdomain("quilt");
  
  sub _($) {
@@ -36,8 +36,8 @@
  #  See the COPYING and AUTHORS files for more details.
  
 -: ${QUILT_DIR=@QUILT_DIR@}
-+if test -n "$STAGING_DIR"; then
-+  : ${QUILT_DIR="$STAGING_DIR/../host/share/quilt"}
++if test -n "$STAGING_DIR_HOST"; then
++  : ${QUILT_DIR="$STAGING_DIR_HOST/share/quilt"}
 +else
 +  : ${QUILT_DIR=@QUILT_DIR@}
 +fi
@@ -51,8 +51,8 @@
  
  export TEXTDOMAIN=quilt
 -export TEXTDOMAINDIR=@LOCALEDIR@
-+if [ -n "$STAGING_DIR" ]; then
-+  export TEXTDOMAINDIR="$STAGING_DIR/../host/share/locale"
++if [ -n "$STAGING_DIR_HOST" ]; then
++  export TEXTDOMAINDIR="$STAGING_DIR_HOST/share/locale"
 +else
 +  export TEXTDOMAINDIR=@LOCALEDIR@
 +fi
@@ -66,7 +66,7 @@
  
  setlocale(LC_MESSAGES, "");
 -bindtextdomain("quilt", "@LOCALEDIR@");
-+bindtextdomain("quilt", $ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . 
'/../host/share/locale' : "@LOCALEDIR@");
++bindtextdomain("quilt", $ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . 
'/share/locale' : "@LOCALEDIR@");
  textdomain("quilt");
  
  sub _($) {
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/2] rules.mk: export STAGING_DIR_HOST to sub-makefiles and shells

2015-07-21 Thread Mathieu Olivari
Certains host packages (like quilt) need to know the previously used
install location at run-time. They currently use $STAGING_DIR, which
causes issues on cleaned environment, where $STAGING_DIR doesn't exist
yet.

Signed-off-by: Mathieu Olivari 
---
 rules.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rules.mk b/rules.mk
index 58b9f3e..e67ffd5 100644
--- a/rules.mk
+++ b/rules.mk
@@ -188,7 +188,7 @@ else
 endif
 
 export PATH:=$(TARGET_PATH)
-export STAGING_DIR
+export STAGING_DIR STAGING_DIR_HOST
 export SH_FUNC:=. $(INCLUDE_DIR)/shell.sh;
 
 PKG_CONFIG:=$(STAGING_DIR_HOST)/bin/pkg-config
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/2] ipq806x: move stmmac support in the kernel binary

2015-05-29 Thread Mathieu Olivari
Ethernet GMAC is built-in the SoC, so there is no need to enable it as a
module. We'll just assume we need it. That's what is done for other
platform where this driver is used so it'll make things more consistent.

Signed-off-by: Mathieu Olivari 
---
 target/linux/ipq806x/Makefile|  2 +-
 target/linux/ipq806x/config-3.18 | 10 --
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/target/linux/ipq806x/Makefile b/target/linux/ipq806x/Makefile
index da841a6..b6ddfe2 100644
--- a/target/linux/ipq806x/Makefile
+++ b/target/linux/ipq806x/Makefile
@@ -15,7 +15,7 @@ KERNELNAME:=zImage Image dtbs
 
 include $(INCLUDE_DIR)/target.mk
 DEFAULT_PACKAGES += \
-   kmod-leds-gpio kmod-gpio-button-hotplug kmod-stmmac swconfig \
+   kmod-leds-gpio kmod-gpio-button-hotplug swconfig \
kmod-ata-core kmod-ata-ahci kmod-ata-ahci-platform
 
 
diff --git a/target/linux/ipq806x/config-3.18 b/target/linux/ipq806x/config-3.18
index 396c6e3..4d3b884 100644
--- a/target/linux/ipq806x/config-3.18
+++ b/target/linux/ipq806x/config-3.18
@@ -121,6 +121,7 @@ CONFIG_DMA_ENGINE=y
 CONFIG_DMA_OF=y
 CONFIG_DMA_VIRTUAL_CHANNELS=y
 CONFIG_DTC=y
+CONFIG_DWMAC_IPQ806X=y
 # CONFIG_DW_DMAC_CORE is not set
 # CONFIG_DW_DMAC_PCI is not set
 CONFIG_DYNAMIC_DEBUG=y
@@ -212,7 +213,6 @@ CONFIG_I2C_CHARDEV=y
 CONFIG_I2C_COMPAT=y
 CONFIG_I2C_HELPER_AUTO=y
 CONFIG_I2C_QUP=y
-# CONFIG_IEEE802154 is not set
 CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
 CONFIG_INITRAMFS_SOURCE=""
@@ -243,7 +243,6 @@ CONFIG_MFD_SYSCON=y
 CONFIG_MIGHT_HAVE_CACHE_L2X0=y
 CONFIG_MIGHT_HAVE_PCI=y
 CONFIG_MIGRATION=y
-# CONFIG_MMC_SDHCI_MSM is not set
 CONFIG_MODULES_USE_ELF_REL=y
 CONFIG_MSM_GCC_8660=y
 CONFIG_MSM_GCC_8960=y
@@ -261,6 +260,7 @@ CONFIG_MUTEX_SPIN_ON_OWNER=y
 CONFIG_NEED_DMA_MAP_STATE=y
 CONFIG_NEON=y
 CONFIG_NET_FLOW_LIMIT=y
+CONFIG_NET_PTP_CLASSIFY=y
 CONFIG_NET_VENDOR_WIZNET=y
 CONFIG_NO_BOOTMEM=y
 CONFIG_NO_HZ=y
@@ -319,12 +319,14 @@ CONFIG_POWER_RESET=y
 CONFIG_POWER_RESET_MSM=y
 # CONFIG_POWER_RESET_SYSCON is not set
 CONFIG_POWER_SUPPLY=y
+CONFIG_PPS=y
 CONFIG_PREEMPT=y
 CONFIG_PREEMPT_COUNT=y
 # CONFIG_PREEMPT_NONE is not set
 CONFIG_PREEMPT_RCU=y
 CONFIG_PRINTK_TIME=y
 CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_PTP_1588_CLOCK=y
 CONFIG_QCOM_BAM_DMA=y
 CONFIG_QCOM_GSBI=y
 CONFIG_QCOM_HFPLL=y
@@ -366,6 +368,10 @@ CONFIG_SPI_MASTER=y
 CONFIG_SPI_QUP=y
 CONFIG_SPMI=y
 CONFIG_SPMI_MSM_PMIC_ARB=y
+# CONFIG_STMMAC_DA is not set
+CONFIG_STMMAC_DEBUG_FS=y
+CONFIG_STMMAC_ETH=y
+CONFIG_STMMAC_PLATFORM=y
 CONFIG_STOP_MACHINE=y
 # CONFIG_STRIP_ASM_SYMS is not set
 CONFIG_SUSPEND=y
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/2] kernel: remove stmmac kernel package

2015-05-29 Thread Mathieu Olivari
We just moved the stmmac support in the kernel for ipq806x. Therefore,
nobody needs this driver so we'll just get rid of it.

Signed-off-by: Mathieu Olivari 
---
 package/kernel/linux/modules/netdevices.mk | 21 -
 1 file changed, 21 deletions(-)

diff --git a/package/kernel/linux/modules/netdevices.mk 
b/package/kernel/linux/modules/netdevices.mk
index 62fd949..9dd18f3 100644
--- a/package/kernel/linux/modules/netdevices.mk
+++ b/package/kernel/linux/modules/netdevices.mk
@@ -811,27 +811,6 @@ endef
 $(eval $(call KernelPackage,vmxnet3))
 
 
-define KernelPackage/stmmac
-  SUBMENU:=$(NETWORK_DEVICES_MENU)
-  TITLE:=STMicro 10/100/1000 Ethernet driver
-  DEPENDS:=+kmod-mii +kmod-ptp
-  KCONFIG:=CONFIG_NET_VENDOR_STMICRO=y \
- CONFIG_STMMAC_ETH \
- CONFIG_STMMAC_PLATFORM=y \
- CONFIG_STMMAC_DEBUG_FS=y \
- CONFIG_STMMAC_DA=y \
- CONFIG_DWMAC_IPQ806X=y
-  FILES:=$(LINUX_DIR)/drivers/net/ethernet/stmicro/stmmac/stmmac.ko
-  AUTOLOAD:=$(call AutoLoad,50,stmmac.ko)
-endef
-
-define KernelPackage/stmmac/description
-  Kernel module for STMicroelectronics 10/100/1000 Ethernet driver
-endef
-
-$(eval $(call KernelPackage,stmmac))
-
-
 define KernelPackage/spi-ks8995
   SUBMENU:=$(NETWORK_DEVICES_MENU)
   TITLE:=Micrel/Kendin KS8995 Ethernet switch control
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 3/6] kernel: add stmmac as a new kernel package

2015-05-29 Thread Mathieu Olivari
Yeah; that's what I was thinking actually. I'll post a patch today.

-Original Message-
From: Felix Fietkau [mailto:n...@openwrt.org] 
Sent: Friday, May 29, 2015 1:35 PM
To: Mathieu Olivari; blo...@openwrt.org; ka...@openwrt.org
Cc: openwrt-devel@lists.openwrt.org
Subject: Re: [PATCH 3/6] kernel: add stmmac as a new kernel package

On 2015-05-26 23:27, Mathieu Olivari wrote:
> Signed-off-by: Mathieu Olivari 
How about simply enabling stmmac in the target kernel config?

- Felix
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] perf: replace libelf1 select by a depend

2015-05-27 Thread Mathieu Olivari
Perf is in trunk today, but it has no maintainer listed. Somebody probably 
needs to volunteer.
As of the packages I was planning to import, I'm adding the other maintainers 
to the To: list:
- argp-standalone: Ted Hess 
- bzip2: Steven Barth 
- Luiz Angelo Daros de Luca  

Initial proposal is here: https://patchwork.ozlabs.org/patch/473676/

Thanks,
Mathieu
-Original Message-
From: Felix Fietkau [mailto:n...@openwrt.org] 
Sent: Wednesday, May 27, 2015 8:33 AM
To: Mathieu Olivari; 'Luiz Angelo Daros de Luca'; blo...@openwrt.org
Cc: openwrt-devel@lists.openwrt.org
Subject: Re: [OpenWrt-Devel] [PATCH] perf: replace libelf1 select by a depend

On 2015-05-27 02:13, Mathieu Olivari wrote:
> It was not merged; it stayed pending without resolution since then, so 
> I figured I’d find an alternative.
Replacing the select by a depend makes the whole process completely 
counterintuitive, so NACK from me on that.

Any package we add to trunk needs to have a maintainer. Is moving the relevant 
packages to trunk acked by the current package maintainers?

- Felix
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] perf: replace libelf1 select by a depend

2015-05-26 Thread Mathieu Olivari
It was not merged; it stayed pending without resolution since then, so I 
figured I’d find an alternative.

Thanks,

Mathieu

 

From: Luiz Angelo Daros de Luca [mailto:luizl...@gmail.com] 
Sent: Tuesday, May 26, 2015 3:08 PM
To: Mathieu Olivari; n...@openwrt.org; blo...@openwrt.org
Cc: openwrt-devel@lists.openwrt.org
Subject: Re: [OpenWrt-Devel] [PATCH] perf: replace libelf1 select by a depend

 

Hi Mathieu,

So the elfutils import from packages.git was rejected?

 

Regards,

 

Luiz Angelo,

 

Em ter, 26 de mai de 2015 às 18:18, Mathieu Olivari mailto:math...@codeaurora.org> > escreveu:

perf has libelf1 marked as a select, but this package is actually
located in packages.git. As such, the dependency is ignored unless
libelf1 package has been manually installed previously.

To avoid any missing dependency, we'll mark it as a regular depend.
This will make sure the dependency check doesn't silently fail.

Signed-off-by: Mathieu Olivari mailto:math...@codeaurora.org> >
---
 package/devel/perf/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/devel/perf/Makefile b/package/devel/perf/Makefile
index b77e29a..e31a693 100644
--- a/package/devel/perf/Makefile
+++ b/package/devel/perf/Makefile
@@ -19,7 +19,7 @@ include $(INCLUDE_DIR)/package.mk <http://package.mk> 
 define Package/perf
   SECTION:=devel
   CATEGORY:=Development
-  DEPENDS:= @USE_GLIBC +libelf1 +libdw +libpthread +librt +binutils
+  DEPENDS:= libelf1 +libdw +libpthread +librt +binutils
   TITLE:=Linux performance monitoring tool
   VERSION:=$(LINUX_VERSION)-$(PKG_RELEASE)
   URL:=http://www.kernel.org
--
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org <mailto:openwrt-devel@lists.openwrt.org> 
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] scripts/feeds: print the source of packages installed

2015-05-26 Thread Mathieu Olivari
On Tue, May 26, 2015 at 08:12:01AM -0700, Karl Palsson wrote:
> From: Karl Palsson 
> 
> Can be helpful in diagnosing unexpected package overlaps between feeds.
> 
> Signed-off-by: Karl Palsson 
> ---
>  scripts/feeds | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/feeds b/scripts/feeds
> index a6be9cc..e060242 100755
> --- a/scripts/feeds
> +++ b/scripts/feeds
> @@ -498,7 +498,7 @@ sub install_package {
>  
>   defined($override) and $override == 1
>   and warn "Overriding package '$src'\n"
Should we display a similar information for the override case?

> - or warn "Installing package '$src'\n";
> + or warn "Installing package '$src' from $feed->[1]\n";
>  
>   do_install_package($feed, $pkg) == 0 or do {
>   warn "failed.\n";
> -- 
> 2.1.0
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 6/6] qca-nss-gmac: delete package

2015-05-26 Thread Mathieu Olivari
nss-gmac has been replaced by its upstream counterpart "stmmac", to
which we added the SoC glue layer required for it to run on IPQ806x.

Signed-off-by: Mathieu Olivari 
---
 package/kernel/qca-nss-gmac/Makefile   | 50 --
 ...01-nss-gmac-remove-IRQ-flag-IRQF_DISABLED.patch | 15 ---
 2 files changed, 65 deletions(-)
 delete mode 100644 package/kernel/qca-nss-gmac/Makefile
 delete mode 100644 
package/kernel/qca-nss-gmac/patches/001-nss-gmac-remove-IRQ-flag-IRQF_DISABLED.patch

diff --git a/package/kernel/qca-nss-gmac/Makefile 
b/package/kernel/qca-nss-gmac/Makefile
deleted file mode 100644
index a854c54..000
--- a/package/kernel/qca-nss-gmac/Makefile
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-# Copyright (c) 2015 The Linux Foundation. All rights reserved.
-#
-
-include $(TOPDIR)/rules.mk
-include $(INCLUDE_DIR)/kernel.mk
-
-PKG_NAME:=qca-nss-gmac
-PKG_VERSION:=20150408
-PKG_RELEASE:=1
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=git://codeaurora.org/quic/qsdk/oss/lklm/nss-gmac
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=3dcb945b467f8f6b3c81338e63c917f768deb11e
-
-PKG_LICENSE:=ISC
-
-include $(INCLUDE_DIR)/package.mk
-
-define KernelPackage/qca-nss-gmac
-  SECTION:=kernel
-  CATEGORY:=Kernel modules
-  SUBMENU:=Network Devices
-  DEPENDS:=@TARGET_ipq806x
-  TITLE:=Kernel driver for NSS gmac
-  FILES:=$(PKG_BUILD_DIR)/ipq806x/qca-nss-gmac.ko
-  AUTOLOAD:=$(call AutoProbe,qca-nss-gmac)
-endef
-
-define KernelPackage/qca-nss-gmac/Description
-This package contains a NSS driver for QCA chipset
-endef
-
-EXTRA_CFLAGS+= \
-   -DCONFIG_NSS_DEBUG_LEVEL=4 \
-   -I$(PKG_BUILD_DIR)/nss_hal/include \
-   -I$(PKG_BUILD_DIR)/nss_hal/$(BOARD)
-
-define Build/Compile
-   $(MAKE) -C "$(LINUX_DIR)" \
-   CROSS_COMPILE="$(TARGET_CROSS)" \
-   ARCH="$(LINUX_KARCH)" \
-   SUBDIRS="$(PKG_BUILD_DIR)" \
-   EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
-   modules
-endef
-
-$(eval $(call KernelPackage,qca-nss-gmac))
diff --git 
a/package/kernel/qca-nss-gmac/patches/001-nss-gmac-remove-IRQ-flag-IRQF_DISABLED.patch
 
b/package/kernel/qca-nss-gmac/patches/001-nss-gmac-remove-IRQ-flag-IRQF_DISABLED.patch
deleted file mode 100644
index 7bc5bfe..000
--- 
a/package/kernel/qca-nss-gmac/patches/001-nss-gmac-remove-IRQ-flag-IRQF_DISABLED.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/ipq806x/nss_gmac_tx_rx_offload.c 
b/ipq806x/nss_gmac_tx_rx_offload.c
-index bc684a5..383403b 100644
 a/ipq806x/nss_gmac_tx_rx_offload.c
-+++ b/ipq806x/nss_gmac_tx_rx_offload.c
-@@ -896,8 +896,8 @@ int nss_gmac_open(struct net_device *netdev)
-   nss_gmac_rx_refill(gmacdev);
- 
-   /* Register IRQ */
--  err = request_irq(netdev->irq, nss_gmac_handle_irq,
--  IRQF_DISABLED, "nss-gmac", gmacdev);
-+  err = request_irq(netdev->irq, nss_gmac_handle_irq, 0,
-+  "nss-gmac", gmacdev);
-   if (err) {
-   netdev_dbg(netdev, "Mac %d IRQ %d request failed\n",
-   gmacdev->macid, netdev->irq);
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/6] kernel: add stmmac as a new kernel package

2015-05-26 Thread Mathieu Olivari
Signed-off-by: Mathieu Olivari 
---
 package/kernel/linux/modules/netdevices.mk | 21 +
 1 file changed, 21 insertions(+)

diff --git a/package/kernel/linux/modules/netdevices.mk 
b/package/kernel/linux/modules/netdevices.mk
index 9dd18f3..62fd949 100644
--- a/package/kernel/linux/modules/netdevices.mk
+++ b/package/kernel/linux/modules/netdevices.mk
@@ -811,6 +811,27 @@ endef
 $(eval $(call KernelPackage,vmxnet3))
 
 
+define KernelPackage/stmmac
+  SUBMENU:=$(NETWORK_DEVICES_MENU)
+  TITLE:=STMicro 10/100/1000 Ethernet driver
+  DEPENDS:=+kmod-mii +kmod-ptp
+  KCONFIG:=CONFIG_NET_VENDOR_STMICRO=y \
+ CONFIG_STMMAC_ETH \
+ CONFIG_STMMAC_PLATFORM=y \
+ CONFIG_STMMAC_DEBUG_FS=y \
+ CONFIG_STMMAC_DA=y \
+ CONFIG_DWMAC_IPQ806X=y
+  FILES:=$(LINUX_DIR)/drivers/net/ethernet/stmicro/stmmac/stmmac.ko
+  AUTOLOAD:=$(call AutoLoad,50,stmmac.ko)
+endef
+
+define KernelPackage/stmmac/description
+  Kernel module for STMicroelectronics 10/100/1000 Ethernet driver
+endef
+
+$(eval $(call KernelPackage,stmmac))
+
+
 define KernelPackage/spi-ks8995
   SUBMENU:=$(NETWORK_DEVICES_MENU)
   TITLE:=Micrel/Kendin KS8995 Ethernet switch control
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/6] ipq806x: move arm-gic include into pcie patch

2015-05-26 Thread Mathieu Olivari
This include is necessary starting at the PCIe patch, which has a lower
number. So in order to keep the patches consistent, we'll move the
arm-gic include in the first patch who needs it.

Signed-off-by: Mathieu Olivari 
---
 .../112-ARM-dts-qcom-add-pcie-nodes-to-ipq806x-platforms.patch| 3 ++-
 target/linux/ipq806x/patches-3.18/700-add-gmac-dts-suport.patch   | 8 
 .../112-ARM-dts-qcom-add-pcie-nodes-to-ipq806x-platforms.patch| 3 ++-
 target/linux/ipq806x/patches-4.0/700-add-gmac-dts-suport.patch| 8 
 4 files changed, 4 insertions(+), 18 deletions(-)

diff --git 
a/target/linux/ipq806x/patches-3.18/112-ARM-dts-qcom-add-pcie-nodes-to-ipq806x-platforms.patch
 
b/target/linux/ipq806x/patches-3.18/112-ARM-dts-qcom-add-pcie-nodes-to-ipq806x-platforms.patch
index 3c1ae61..7bee560 100644
--- 
a/target/linux/ipq806x/patches-3.18/112-ARM-dts-qcom-add-pcie-nodes-to-ipq806x-platforms.patch
+++ 
b/target/linux/ipq806x/patches-3.18/112-ARM-dts-qcom-add-pcie-nodes-to-ipq806x-platforms.patch
@@ -121,11 +121,12 @@ Signed-off-by: Mathieu Olivari 
#address-cells = <1>;
 --- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
 +++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
-@@ -3,6 +3,7 @@
+@@ -3,6 +3,8 @@
  #include "skeleton.dtsi"
  #include 
  #include 
 +#include 
++#include 
  
  / {
model = "Qualcomm IPQ8064";
diff --git a/target/linux/ipq806x/patches-3.18/700-add-gmac-dts-suport.patch 
b/target/linux/ipq806x/patches-3.18/700-add-gmac-dts-suport.patch
index f0c511a..3c81f88 100644
--- a/target/linux/ipq806x/patches-3.18/700-add-gmac-dts-suport.patch
+++ b/target/linux/ipq806x/patches-3.18/700-add-gmac-dts-suport.patch
@@ -119,14 +119,6 @@
  };
 --- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
 +++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
-@@ -5,6 +5,7 @@
- #include 
- #include 
- #include 
-+#include 
- 
- / {
-   model = "Qualcomm IPQ8064";
 @@ -637,5 +638,42 @@
dr_mode = "host";
};
diff --git 
a/target/linux/ipq806x/patches-4.0/112-ARM-dts-qcom-add-pcie-nodes-to-ipq806x-platforms.patch
 
b/target/linux/ipq806x/patches-4.0/112-ARM-dts-qcom-add-pcie-nodes-to-ipq806x-platforms.patch
index 9009575..ad0a740 100644
--- 
a/target/linux/ipq806x/patches-4.0/112-ARM-dts-qcom-add-pcie-nodes-to-ipq806x-platforms.patch
+++ 
b/target/linux/ipq806x/patches-4.0/112-ARM-dts-qcom-add-pcie-nodes-to-ipq806x-platforms.patch
@@ -121,11 +121,12 @@ Signed-off-by: Mathieu Olivari 
#address-cells = <1>;
 --- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
 +++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
-@@ -3,6 +3,7 @@
+@@ -3,6 +3,8 @@
  #include "skeleton.dtsi"
  #include 
  #include 
 +#include 
++#include 
  
  / {
model = "Qualcomm IPQ8064";
diff --git a/target/linux/ipq806x/patches-4.0/700-add-gmac-dts-suport.patch 
b/target/linux/ipq806x/patches-4.0/700-add-gmac-dts-suport.patch
index 7b628a7..b5a3f19 100644
--- a/target/linux/ipq806x/patches-4.0/700-add-gmac-dts-suport.patch
+++ b/target/linux/ipq806x/patches-4.0/700-add-gmac-dts-suport.patch
@@ -119,14 +119,6 @@
  };
 --- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
 +++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
-@@ -5,6 +5,7 @@
- #include 
- #include 
- #include 
-+#include 
- 
- / {
-   model = "Qualcomm IPQ8064";
 @@ -539,5 +540,42 @@
  
status = "disabled";
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 4/6] ipq806x: enable kernel support for Fixed PHY emulation

2015-05-26 Thread Mathieu Olivari
Most ipq806x platforms use an ethernet switch, and the new upstream
GMAC driver makes use of the Fixed PHY emulation to force the link
settings despite the lack of PHY.

Signed-off-by: Mathieu Olivari 
---
 target/linux/ipq806x/config-3.18 | 1 +
 target/linux/ipq806x/config-4.0  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/target/linux/ipq806x/config-3.18 b/target/linux/ipq806x/config-3.18
index 814f142..cc1f20d 100644
--- a/target/linux/ipq806x/config-3.18
+++ b/target/linux/ipq806x/config-3.18
@@ -125,6 +125,7 @@ CONFIG_DTC=y
 # CONFIG_DW_DMAC_PCI is not set
 CONFIG_DYNAMIC_DEBUG=y
 CONFIG_ETHERNET_PACKET_MANGLE=y
+CONFIG_FIXED_PHY=y
 CONFIG_FREEZER=y
 CONFIG_GENERIC_ALLOCATOR=y
 CONFIG_GENERIC_BUG=y
diff --git a/target/linux/ipq806x/config-4.0 b/target/linux/ipq806x/config-4.0
index 9ce342b..7ec3963 100644
--- a/target/linux/ipq806x/config-4.0
+++ b/target/linux/ipq806x/config-4.0
@@ -128,6 +128,7 @@ CONFIG_DTC=y
 # CONFIG_DW_DMAC_PCI is not set
 CONFIG_DYNAMIC_DEBUG=y
 CONFIG_ETHERNET_PACKET_MANGLE=y
+CONFIG_FIXED_PHY=y
 CONFIG_FREEZER=y
 CONFIG_GENERIC_ALLOCATOR=y
 CONFIG_GENERIC_BUG=y
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/6] kernel: add missing STMMAC options in generic configs

2015-05-26 Thread Mathieu Olivari
STMMAC_PLATFORM and STMMAC_PCI have been added recently in the kernel,
but show up only when STMMAC driver is enabled. So se'll add it in the
generic config, so the kernel build doesn't stall whenever we enable
this driver.

Signed-off-by: Mathieu Olivari 
---
 target/linux/generic/config-3.18 | 2 ++
 target/linux/generic/config-4.0  | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/target/linux/generic/config-3.18 b/target/linux/generic/config-3.18
index 7a38dee..31bac92 100644
--- a/target/linux/generic/config-3.18
+++ b/target/linux/generic/config-3.18
@@ -3837,6 +3837,8 @@ CONFIG_STDBINUTILS=y
 # CONFIG_STE10XP is not set
 # CONFIG_STE_MODEM_RPROC is not set
 # CONFIG_STMMAC_ETH is not set
+# CONFIG_STMMAC_PLATFORM is not set
+# CONFIG_STMMAC_PCI is not set
 CONFIG_STP=y
 # CONFIG_STRICT_DEVMEM is not set
 CONFIG_STRIP_ASM_SYMS=y
diff --git a/target/linux/generic/config-4.0 b/target/linux/generic/config-4.0
index c3bb7fc..8a9cf33 100644
--- a/target/linux/generic/config-4.0
+++ b/target/linux/generic/config-4.0
@@ -3913,6 +3913,8 @@ CONFIG_STDBINUTILS=y
 # CONFIG_STE10XP is not set
 # CONFIG_STE_MODEM_RPROC is not set
 # CONFIG_STMMAC_ETH is not set
+# CONFIG_STMMAC_PLATFORM is not set
+# CONFIG_STMMAC_PCI is not set
 CONFIG_STP=y
 # CONFIG_STRICT_DEVMEM is not set
 CONFIG_STRIP_ASM_SYMS=y
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 0/6] ipq806x: replace qca-nss-gmac by stmmac

2015-05-26 Thread Mathieu Olivari
This patch serie replaces the previously used qca-nss-gmac driver by its
upstream counterpart cherry-picked from the following LKML thread:
*https://lkml.org/lkml/2015/5/26/744

Mathieu Olivari (6):
  ipq806x: move arm-gic include into pcie patch
  kernel: add missing STMMAC options in generic configs
  kernel: add stmmac as a new kernel package
  ipq806x: enable kernel support for Fixed PHY emulation
  ipq806x: replace caf nss-gmac driver by upstream stmmac
  qca-nss-gmac: delete package

 package/kernel/linux/modules/netdevices.mk |  21 +
 package/kernel/qca-nss-gmac/Makefile   |  50 --
 ...01-nss-gmac-remove-IRQ-flag-IRQF_DISABLED.patch |  15 -
 target/linux/generic/config-3.18   |   2 +
 target/linux/generic/config-4.0|   2 +
 target/linux/ipq806x/Makefile  |   2 +-
 target/linux/ipq806x/config-3.18   |   1 +
 target/linux/ipq806x/config-4.0|   1 +
 .../ipq806x/patches-3.18/022-add-db149-dts.patch   | 127 +---
 ...-qcom-add-pcie-nodes-to-ipq806x-platforms.patch |  20 +-
 ...rpm-add-support-for-RPM-controller-SMB208.patch |  11 +-
 ...com-rpm-Add-missing-state-flag-in-call-to.patch |   7 +-
 .../patches-3.18/126-add-rpm-to-ipq8064-dts.patch  |   6 +-
 ...-set_parent-doing-the-wrong-thing-when-IN.patch |   7 +-
 ..._unregister_-divider-gate-mux-to-close-me.patch |   2 +-
 ...m-Add-necessary-DT-data-for-Krait-cpufreq.patch |   8 +-
 .../patches-3.18/700-add-gmac-dts-suport.patch | 172 -
 ...dd-support-for-NSS-GMAC-clocks-and-resets.patch | 733 +
 ...-phy-handle-support-to-the-platform-layer.patch | 105 +++
 ...-error-path-at-the-end-of-stmmac_probe_co.patch |  65 ++
 ...stmmac-add-fixed-link-device-tree-support.patch |  64 ++
 .../704-stmmac-add-ipq806x-glue-layer.patch| 427 
 ...mac-ipq806x-document-device-tree-bindings.patch |  52 ++
 ...mac-create-one-debugfs-dir-per-net-device.patch | 171 +
 ...RM-dts-qcom-add-mdio-nodes-to-ap148-db149.patch | 145 
 ...-qcom-add-gmac-nodes-to-ipq806x-platforms.patch | 210 ++
 .../ipq806x/patches-4.0/022-add-db149-dts.patch| 133 +---
 ...-qcom-add-pcie-nodes-to-ipq806x-platforms.patch |  18 +-
 .../patches-4.0/700-add-gmac-dts-suport.patch  | 172 -
 ...dd-support-for-NSS-GMAC-clocks-and-resets.patch | 733 +
 ...-phy-handle-support-to-the-platform-layer.patch | 105 +++
 ...-error-path-at-the-end-of-stmmac_probe_co.patch |  65 ++
 ...stmmac-add-fixed-link-device-tree-support.patch |  64 ++
 .../704-stmmac-add-ipq806x-glue-layer.patch| 407 
 ...mac-ipq806x-document-device-tree-bindings.patch |  52 ++
 ...mac-create-one-debugfs-dir-per-net-device.patch | 175 +
 ...RM-dts-qcom-add-mdio-nodes-to-ap148-db149.patch | 145 
 ...-qcom-add-gmac-nodes-to-ipq806x-platforms.patch | 210 ++
 38 files changed, 3993 insertions(+), 712 deletions(-)
 delete mode 100644 package/kernel/qca-nss-gmac/Makefile
 delete mode 100644 
package/kernel/qca-nss-gmac/patches/001-nss-gmac-remove-IRQ-flag-IRQF_DISABLED.patch
 delete mode 100644 
target/linux/ipq806x/patches-3.18/700-add-gmac-dts-suport.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/700-clk-qcom-Add-support-for-NSS-GMAC-clocks-and-resets.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/701-stmmac-add-phy-handle-support-to-the-platform-layer.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/702-stmmac-move-error-path-at-the-end-of-stmmac_probe_co.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/703-stmmac-add-fixed-link-device-tree-support.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/704-stmmac-add-ipq806x-glue-layer.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/705-net-stmmac-ipq806x-document-device-tree-bindings.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/706-net-stmmac-create-one-debugfs-dir-per-net-device.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/707-ARM-dts-qcom-add-mdio-nodes-to-ap148-db149.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/708-ARM-dts-qcom-add-gmac-nodes-to-ipq806x-platforms.patch
 delete mode 100644 
target/linux/ipq806x/patches-4.0/700-add-gmac-dts-suport.patch
 create mode 100644 
target/linux/ipq806x/patches-4.0/700-clk-qcom-Add-support-for-NSS-GMAC-clocks-and-resets.patch
 create mode 100644 
target/linux/ipq806x/patches-4.0/701-stmmac-add-phy-handle-support-to-the-platform-layer.patch
 create mode 100644 
target/linux/ipq806x/patches-4.0/702-stmmac-move-error-path-at-the-end-of-stmmac_probe_co.patch
 create mode 100644 
target/linux/ipq806x/patches-4.0/703-stmmac-add-fixed-link-device-tree-support.patch
 create mode 100644 
target/linux/ipq806x/patches-4.0/704-stmmac-add-ipq806x-glue-layer.patch
 create mode 100644 
target/linux/ipq806x/patches-4.0/705-net-stmmac-ipq806x-document-device-tree-bindings.patch
 create mode 100644 
target/linux/ipq806x/patches

[OpenWrt-Devel] [PATCH] perf: replace libelf1 select by a depend

2015-05-26 Thread Mathieu Olivari
perf has libelf1 marked as a select, but this package is actually
located in packages.git. As such, the dependency is ignored unless
libelf1 package has been manually installed previously.

To avoid any missing dependency, we'll mark it as a regular depend.
This will make sure the dependency check doesn't silently fail.

Signed-off-by: Mathieu Olivari 
---
 package/devel/perf/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/devel/perf/Makefile b/package/devel/perf/Makefile
index b77e29a..e31a693 100644
--- a/package/devel/perf/Makefile
+++ b/package/devel/perf/Makefile
@@ -19,7 +19,7 @@ include $(INCLUDE_DIR)/package.mk
 define Package/perf
   SECTION:=devel
   CATEGORY:=Development
-  DEPENDS:= @USE_GLIBC +libelf1 +libdw +libpthread +librt +binutils
+  DEPENDS:= libelf1 +libdw +libpthread +librt +binutils
   TITLE:=Linux performance monitoring tool
   VERSION:=$(LINUX_VERSION)-$(PKG_RELEASE)
   URL:=http://www.kernel.org
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/5] ipq806x: refresh kernel patches

2015-05-20 Thread Mathieu Olivari
Signed-off-by: Mathieu Olivari 
---
 .../011-watchdog-qcom-use-timer-devicetree-binding.patch  | 11 +++
 ...ARM-qcom-add-description-of-KPSS-WDT-for-IPQ8064.patch |  5 -
 target/linux/ipq806x/patches-3.18/022-add-db149-dts.patch |  8 
 ...02-soc-qcom-gsbi-Add-support-for-ADM-CRCI-muxing.patch | 15 +++
 ...10-DT-PCI-qcom-Document-PCIe-devicetree-bindings.patch |  3 ---
 .../300-arch-arm-force-ZRELADDR-on-arch-qcom.patch| 12 +---
 .../patches-4.0/001-spi-qup-Add-DMA-capabilities.patch| 12 ++--
 .../011-watchdog-qcom-use-timer-devicetree-binding.patch  | 11 +++
 ...ARM-qcom-add-description-of-KPSS-WDT-for-IPQ8064.patch |  5 -
 target/linux/ipq806x/patches-4.0/022-add-db149-dts.patch  | 10 +-
 ...10-DT-PCI-qcom-Document-PCIe-devicetree-bindings.patch |  3 ---
 .../300-arch-arm-force-ZRELADDR-on-arch-qcom.patch| 14 ++
 12 files changed, 19 insertions(+), 90 deletions(-)

diff --git 
a/target/linux/ipq806x/patches-3.18/011-watchdog-qcom-use-timer-devicetree-binding.patch
 
b/target/linux/ipq806x/patches-3.18/011-watchdog-qcom-use-timer-devicetree-binding.patch
index 0cd7da1..68489a8 100644
--- 
a/target/linux/ipq806x/patches-3.18/011-watchdog-qcom-use-timer-devicetree-binding.patch
+++ 
b/target/linux/ipq806x/patches-3.18/011-watchdog-qcom-use-timer-devicetree-binding.patch
@@ -14,8 +14,6 @@ Signed-off-by: Mathieu Olivari 
  drivers/watchdog/qcom-wdt.c | 21 +++--
  1 file changed, 15 insertions(+), 6 deletions(-)
 
-diff --git a/drivers/watchdog/qcom-wdt.c b/drivers/watchdog/qcom-wdt.c
-index aa85618..aa03ca8 100644
 --- a/drivers/watchdog/qcom-wdt.c
 +++ b/drivers/watchdog/qcom-wdt.c
 @@ -20,9 +20,9 @@
@@ -31,7 +29,7 @@ index aa85618..aa03ca8 100644
  
  struct qcom_wdt {
struct watchdog_device  wdd;
-@@ -117,6 +117,8 @@ static int qcom_wdt_probe(struct platform_device *pdev)
+@@ -117,6 +117,8 @@ static int qcom_wdt_probe(struct platfor
  {
struct qcom_wdt *wdt;
struct resource *res;
@@ -40,7 +38,7 @@ index aa85618..aa03ca8 100644
int ret;
  
wdt = devm_kzalloc(&pdev->dev, sizeof(*wdt), GFP_KERNEL);
-@@ -124,6 +126,14 @@ static int qcom_wdt_probe(struct platform_device *pdev)
+@@ -124,6 +126,14 @@ static int qcom_wdt_probe(struct platfor
return -ENOMEM;
  
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -55,7 +53,7 @@ index aa85618..aa03ca8 100644
wdt->base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(wdt->base))
return PTR_ERR(wdt->base);
-@@ -203,9 +213,8 @@ static int qcom_wdt_remove(struct platform_device *pdev)
+@@ -203,9 +213,8 @@ static int qcom_wdt_remove(struct platfo
  }
  
  static const struct of_device_id qcom_wdt_of_table[] = {
@@ -67,6 +65,3 @@ index aa85618..aa03ca8 100644
{ },
  };
  MODULE_DEVICE_TABLE(of, qcom_wdt_of_table);
--- 
-1.9.1
-
diff --git 
a/target/linux/ipq806x/patches-3.18/012-ARM-qcom-add-description-of-KPSS-WDT-for-IPQ8064.patch
 
b/target/linux/ipq806x/patches-3.18/012-ARM-qcom-add-description-of-KPSS-WDT-for-IPQ8064.patch
index 24a093a..ae96776 100644
--- 
a/target/linux/ipq806x/patches-3.18/012-ARM-qcom-add-description-of-KPSS-WDT-for-IPQ8064.patch
+++ 
b/target/linux/ipq806x/patches-3.18/012-ARM-qcom-add-description-of-KPSS-WDT-for-IPQ8064.patch
@@ -13,8 +13,6 @@ Signed-off-by: Mathieu Olivari 
  arch/arm/boot/dts/qcom-ipq8064.dtsi | 14 +-
  1 file changed, 13 insertions(+), 1 deletion(-)
 
-diff --git a/arch/arm/boot/dts/qcom-ipq8064.dtsi 
b/arch/arm/boot/dts/qcom-ipq8064.dtsi
-index cb225da..d01f618 100644
 --- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
 +++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
 @@ -60,6 +60,14 @@
@@ -48,6 +46,3 @@ index cb225da..d01f618 100644
cpu-offset = <0x8>;
};
  
--- 
-1.9.1
-
diff --git a/target/linux/ipq806x/patches-3.18/022-add-db149-dts.patch 
b/target/linux/ipq806x/patches-3.18/022-add-db149-dts.patch
index 9a036fb..85a0f72 100644
--- a/target/linux/ipq806x/patches-3.18/022-add-db149-dts.patch
+++ b/target/linux/ipq806x/patches-3.18/022-add-db149-dts.patch
@@ -13,8 +13,6 @@ Signed-off-by: Mathieu Olivari 
  2 files changed, 258 insertions(+)
  create mode 100644 arch/arm/boot/dts/qcom-ipq8064-db149.dts
 
-diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
-index 38c89ca..745360a 100644
 --- a/arch/arm/boot/dts/Makefile
 +++ b/arch/arm/boot/dts/Makefile
 @@ -360,6 +360,7 @@ dtb-$(CONFIG_ARCH_QCOM) += \
@@ -25,9 +23,6 @@ index 38c89ca..745360a 100644
qcom-msm8660-surf.dtb \
qcom-msm8960-cdp.dtb \
qcom-msm8974-sony-xperia-honami.dtb
-diff --git a/arch/arm/boot/dts/qcom-ipq8064-db149.dts 
b/arch/arm/boot/dts/qcom-ipq8064-db149.dts
-new file mode 100644
-index 000..224c54f
 --- /dev/null
 +++ b/arch/arm/boot/dts/qcom-ipq8064-db149.dts
 @@ -0,0 +1,257 @@
@@ -288,6 +28

[OpenWrt-Devel] [PATCH 3/5] ipq806x: add power regulators support

2015-05-20 Thread Mathieu Olivari
Patches are cherry-picked from linux-next. We're also adding the
corresponding config option to the kernel.

Signed-off-by: Mathieu Olivari 
---
 target/linux/ipq806x/config-3.18   |   6 +-
 target/linux/ipq806x/config-4.0|   5 +-
 ...-mfd-qcom-rpm-Driver-for-the-Qualcomm-RPM.patch | 654 +
 .../121-mfd-qcom_rpm-Add-support-for-IPQ8064.patch |  71 +++
 ...tree-bindings-Add-Qualcomm-RPM-DT-binding.patch | 256 
 ...etree-qcom_rpm-Document-IPQ8064-resources.patch |  42 ++
 ...rpm-add-support-for-RPM-controller-SMB208.patch |  63 ++
 ...com-rpm-Add-missing-state-flag-in-call-to.patch |  30 +
 .../patches-3.18/126-add-rpm-to-ipq8064-dts.patch  |  87 +++
 .../patches-3.18/700-add-gmac-dts-suport.patch |   6 +-
 .../121-mfd-qcom_rpm-Add-support-for-IPQ8064.patch |  71 +++
 ...etree-qcom_rpm-Document-IPQ8064-resources.patch |  42 ++
 .../patches-4.0/126-add-rpm-to-ipq8064-dts.patch   |  87 +++
 .../patches-4.0/700-add-gmac-dts-suport.patch  |   6 +-
 14 files changed, 1415 insertions(+), 11 deletions(-)
 create mode 100644 
target/linux/ipq806x/patches-3.18/120-mfd-qcom-rpm-Driver-for-the-Qualcomm-RPM.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/121-mfd-qcom_rpm-Add-support-for-IPQ8064.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/122-mfd-devicetree-bindings-Add-Qualcomm-RPM-DT-binding.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/123-mfd-devicetree-qcom_rpm-Document-IPQ8064-resources.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/124-regulator-rpm-add-support-for-RPM-controller-SMB208.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/125-regulator-qcom-rpm-Add-missing-state-flag-in-call-to.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/126-add-rpm-to-ipq8064-dts.patch
 create mode 100644 
target/linux/ipq806x/patches-4.0/121-mfd-qcom_rpm-Add-support-for-IPQ8064.patch
 create mode 100644 
target/linux/ipq806x/patches-4.0/123-mfd-devicetree-qcom_rpm-Document-IPQ8064-resources.patch
 create mode 100644 
target/linux/ipq806x/patches-4.0/126-add-rpm-to-ipq8064-dts.patch

diff --git a/target/linux/ipq806x/config-3.18 b/target/linux/ipq806x/config-3.18
index d32e989..1e08f36 100644
--- a/target/linux/ipq806x/config-3.18
+++ b/target/linux/ipq806x/config-3.18
@@ -84,7 +84,6 @@ CONFIG_CRC16=y
 # CONFIG_CRC32_SARWATE is not set
 CONFIG_CRC32_SLICEBY8=y
 CONFIG_CROSS_MEMORY_ATTACH=y
-# CONFIG_CRYPTO_DEV_QCE is not set
 # CONFIG_CRYPTO_SHA1_ARM_NEON is not set
 # CONFIG_CRYPTO_SHA512_ARM_NEON is not set
 CONFIG_CRYPTO_XZ=y
@@ -191,6 +190,7 @@ CONFIG_I2C_CHARDEV=y
 CONFIG_I2C_COMPAT=y
 CONFIG_I2C_HELPER_AUTO=y
 CONFIG_I2C_QUP=y
+# CONFIG_IEEE802154 is not set
 CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
 CONFIG_INITRAMFS_SOURCE=""
@@ -211,11 +211,12 @@ CONFIG_LZO_DECOMPRESS=y
 CONFIG_MDIO_BITBANG=y
 CONFIG_MDIO_BOARDINFO=y
 CONFIG_MDIO_GPIO=y
+CONFIG_MFD_QCOM_RPM=y
 # CONFIG_MFD_SPMI_PMIC is not set
+CONFIG_MFD_SYSCON=y
 CONFIG_MIGHT_HAVE_CACHE_L2X0=y
 CONFIG_MIGHT_HAVE_PCI=y
 CONFIG_MIGRATION=y
-# CONFIG_MMC_SDHCI_MSM is not set
 CONFIG_MODULES_USE_ELF_REL=y
 CONFIG_MSM_GCC_8660=y
 CONFIG_MSM_GCC_8960=y
@@ -310,6 +311,7 @@ CONFIG_REGMAP=y
 CONFIG_REGMAP_MMIO=y
 CONFIG_REGULATOR=y
 # CONFIG_REGULATOR_DEBUG is not set
+CONFIG_REGULATOR_QCOM_RPM=y
 # CONFIG_REGULATOR_USERSPACE_CONSUMER is not set
 CONFIG_RESET_CONTROLLER=y
 CONFIG_RFS_ACCEL=y
diff --git a/target/linux/ipq806x/config-4.0 b/target/linux/ipq806x/config-4.0
index 96644cf..61535da 100644
--- a/target/linux/ipq806x/config-4.0
+++ b/target/linux/ipq806x/config-4.0
@@ -52,7 +52,6 @@ CONFIG_ARM_THUMB=y
 CONFIG_ARM_UNWIND=y
 CONFIG_ARM_VIRT_EXT=y
 CONFIG_AT803X_PHY=y
-# CONFIG_BATTERY_GAUGE_LTC2941 is not set
 # CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
 CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
 CONFIG_BOUNCE=y
@@ -221,7 +220,7 @@ CONFIG_LZO_DECOMPRESS=y
 CONFIG_MDIO_BITBANG=y
 CONFIG_MDIO_BOARDINFO=y
 CONFIG_MDIO_GPIO=y
-# CONFIG_MFD_QCOM_RPM is not set
+CONFIG_MFD_QCOM_RPM=y
 # CONFIG_MFD_SPMI_PMIC is not set
 CONFIG_MIGHT_HAVE_CACHE_L2X0=y
 CONFIG_MIGHT_HAVE_PCI=y
@@ -323,6 +322,7 @@ CONFIG_REGMAP=y
 CONFIG_REGMAP_MMIO=y
 CONFIG_REGULATOR=y
 # CONFIG_REGULATOR_DEBUG is not set
+CONFIG_REGULATOR_QCOM_RPM=y
 # CONFIG_REGULATOR_USERSPACE_CONSUMER is not set
 CONFIG_RESET_CONTROLLER=y
 CONFIG_RFS_ACCEL=y
@@ -357,7 +357,6 @@ CONFIG_SWCONFIG=y
 CONFIG_SWIOTLB=y
 CONFIG_SWP_EMULATE=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
-# CONFIG_TEGRA_AHB is not set
 CONFIG_THERMAL=y
 # CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set
 CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
diff --git 
a/target/linux/ipq806x/patches-3.18/120-mfd-qcom-rpm-Driver-for-the-Qualcomm-RPM.patch
 
b/target/linux/ipq806x/patches-3.18/120-mfd-qcom-rpm-Driver-for-the-Qualcomm-RPM.patch
new file mode 100644
index 000..d819142
--- /dev/null
+++ 
b/target/linux/ipq806x/patches-3.18/120-mfd-qcom-rpm-Driver-for-the-Qualcomm-RPM.patch
@@ -0,0 

[OpenWrt-Devel] [PATCH 5/5] ipq806x: enable cpu idle support in kernel conf

2015-05-20 Thread Mathieu Olivari
Signed-off-by: Mathieu Olivari 
---
 target/linux/ipq806x/config-3.18 | 3 +++
 target/linux/ipq806x/config-4.0  | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/target/linux/ipq806x/config-3.18 b/target/linux/ipq806x/config-3.18
index 2f5954c..814f142 100644
--- a/target/linux/ipq806x/config-3.18
+++ b/target/linux/ipq806x/config-3.18
@@ -91,6 +91,9 @@ CONFIG_CPU_FREQ_STAT=y
 # CONFIG_CPU_FREQ_STAT_DETAILS is not set
 CONFIG_CPU_HAS_ASID=y
 # CONFIG_CPU_ICACHE_DISABLE is not set
+CONFIG_CPU_IDLE=y
+CONFIG_CPU_IDLE_GOV_LADDER=y
+CONFIG_CPU_IDLE_GOV_MENU=y
 CONFIG_CPU_PABRT_V7=y
 CONFIG_CPU_PM=y
 CONFIG_CPU_RMAP=y
diff --git a/target/linux/ipq806x/config-4.0 b/target/linux/ipq806x/config-4.0
index 3c739e6..9ce342b 100644
--- a/target/linux/ipq806x/config-4.0
+++ b/target/linux/ipq806x/config-4.0
@@ -94,6 +94,9 @@ CONFIG_CPU_FREQ_STAT=y
 # CONFIG_CPU_FREQ_STAT_DETAILS is not set
 CONFIG_CPU_HAS_ASID=y
 # CONFIG_CPU_ICACHE_DISABLE is not set
+CONFIG_CPU_IDLE=y
+CONFIG_CPU_IDLE_GOV_LADDER=y
+CONFIG_CPU_IDLE_GOV_MENU=y
 CONFIG_CPU_PABRT_V7=y
 CONFIG_CPU_PM=y
 CONFIG_CPU_RMAP=y
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/5] ipq806x: disable i2c device on gsbi4

2015-05-20 Thread Mathieu Olivari
Patch cherry-picked from the following location:
https://chromium-review.googlesource.com/#/c/269931/

Disable the i2c device on gsbi4 and mark gsbi4_h and gsbi4_qup clks as
unused. If they are enabled, clock framework will turn them off at end
of probe. On ipq806x by design gsbi4_qup, gsbi4_h clks and i2c on gsbi4
are meant for RPM usage. So turning them off in kernel is incorrect.

Signed-off-by: Mathieu Olivari 
---
 ...M-dts-ipq806x-Disable-i2c-device-on-gsbi4.patch | 53 ++
 ...1-ARM-qcom-add-USB-nodes-to-ipq806x-ap148.patch |  2 +-
 ...-qcom-add-pcie-nodes-to-ipq806x-platforms.patch |  2 +-
 .../patches-3.18/700-add-gmac-dts-suport.patch |  4 +-
 ...M-dts-ipq806x-Disable-i2c-device-on-gsbi4.patch | 53 ++
 ...-qcom-add-pcie-nodes-to-ipq806x-platforms.patch |  2 +-
 .../patches-4.0/700-add-gmac-dts-suport.patch  |  4 +-
 7 files changed, 113 insertions(+), 7 deletions(-)
 create mode 100644 
target/linux/ipq806x/patches-3.18/023-ARM-dts-ipq806x-Disable-i2c-device-on-gsbi4.patch
 create mode 100644 
target/linux/ipq806x/patches-4.0/023-ARM-dts-ipq806x-Disable-i2c-device-on-gsbi4.patch

diff --git 
a/target/linux/ipq806x/patches-3.18/023-ARM-dts-ipq806x-Disable-i2c-device-on-gsbi4.patch
 
b/target/linux/ipq806x/patches-3.18/023-ARM-dts-ipq806x-Disable-i2c-device-on-gsbi4.patch
new file mode 100644
index 000..319859b
--- /dev/null
+++ 
b/target/linux/ipq806x/patches-3.18/023-ARM-dts-ipq806x-Disable-i2c-device-on-gsbi4.patch
@@ -0,0 +1,53 @@
+--- a/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
 b/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
+@@ -46,15 +46,12 @@
+   serial@1634 {
+   status = "ok";
+   };
+-
+-  i2c4: i2c@1638 {
+-  status = "ok";
+-
+-  clock-frequency = <20>;
+-
+-  pinctrl-0 = <&i2c4_pins>;
+-  pinctrl-names = "default";
+-  };
++  /*
++   * The i2c device on gsbi4 should not be enabled.
++   * On ipq806x designs gsbi4 i2c is meant for exclusive
++   * RPM usage. Turning this on in kernel manifests as
++   * i2c failure for the RPM.
++   */
+   };
+ 
+   gsbi5: gsbi@1a20 {
+--- a/drivers/clk/qcom/gcc-ipq806x.c
 b/drivers/clk/qcom/gcc-ipq806x.c
+@@ -794,7 +794,7 @@ static struct clk_rcg gsbi7_qup_src = {
+   .parent_names = gcc_pxo_pll8,
+   .num_parents = 2,
+   .ops = &clk_rcg_ops,
+-  .flags = CLK_SET_PARENT_GATE,
++  .flags = CLK_SET_PARENT_GATE | CLK_IGNORE_UNUSED,
+   },
+   },
+ };
+@@ -810,7 +810,7 @@ static struct clk_branch gsbi7_qup_clk =
+   .parent_names = (const char *[]){ "gsbi7_qup_src" },
+   .num_parents = 1,
+   .ops = &clk_branch_ops,
+-  .flags = CLK_SET_RATE_PARENT,
++  .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED,
+   },
+   },
+ };
+@@ -858,7 +858,7 @@ static struct clk_branch gsbi4_h_clk = {
+   .hw.init = &(struct clk_init_data){
+   .name = "gsbi4_h_clk",
+   .ops = &clk_branch_ops,
+-  .flags = CLK_IS_ROOT,
++  .flags = CLK_IS_ROOT | CLK_IGNORE_UNUSED,
+   },
+   },
+ };
diff --git 
a/target/linux/ipq806x/patches-3.18/101-ARM-qcom-add-USB-nodes-to-ipq806x-ap148.patch
 
b/target/linux/ipq806x/patches-3.18/101-ARM-qcom-add-USB-nodes-to-ipq806x-ap148.patch
index f1b4164..8f17397 100644
--- 
a/target/linux/ipq806x/patches-3.18/101-ARM-qcom-add-USB-nodes-to-ipq806x-ap148.patch
+++ 
b/target/linux/ipq806x/patches-3.18/101-ARM-qcom-add-USB-nodes-to-ipq806x-ap148.patch
@@ -1,6 +1,6 @@
 --- a/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
 +++ b/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
-@@ -112,5 +112,29 @@
+@@ -109,5 +109,29 @@
sata@2900 {
status = "ok";
};
diff --git 
a/target/linux/ipq806x/patches-3.18/112-ARM-dts-qcom-add-pcie-nodes-to-ipq806x-platforms.patch
 
b/target/linux/ipq806x/patches-3.18/112-ARM-dts-qcom-add-pcie-nodes-to-ipq806x-platforms.patch
index 2613dff..3c1ae61 100644
--- 
a/target/linux/ipq806x/patches-3.18/112-ARM-dts-qcom-add-pcie-nodes-to-ipq806x-platforms.patch
+++ 
b/target/linux/ipq806x/patches-3.18/112-ARM-dts-qcom-add-pcie-nodes-to-ipq806x-platforms.patch
@@ -38,7 +38,7 @@ Signed-off-by: Mathieu Olivari 
spi_pins: spi_pins {
mux {
pins = "

[OpenWrt-Devel] [PATCH 0/5] ipq806x: add frequency scaling support

2015-05-20 Thread Mathieu Olivari
Currently, the IPQ is underclocked and running at whatever frequency was
previously set in the bootloader. This change is done to get it to run
up to max speed (1.4GHz). Different speed requiring different voltage,
we also add support for the power regulators.

Most of these patches are cherry-picked from linux-next and LKML, with a
couple of fixes and backports here and there.

Mathieu Olivari (5):
  ipq806x: refresh kernel patches
  ipq806x: disable i2c device on gsbi4
  ipq806x: add power regulators support
  ipq806x: add & enable cpufreq support
  ipq806x: enable cpu idle support in kernel conf

 target/linux/ipq806x/config-3.18   |  33 +-
 target/linux/ipq806x/config-4.0|  33 +-
 ...atchdog-qcom-use-timer-devicetree-binding.patch |  11 +-
 ...m-add-description-of-KPSS-WDT-for-IPQ8064.patch |   5 -
 .../ipq806x/patches-3.18/022-add-db149-dts.patch   |   8 -
 ...M-dts-ipq806x-Disable-i2c-device-on-gsbi4.patch |  53 ++
 ...1-ARM-qcom-add-USB-nodes-to-ipq806x-ap148.patch |   2 +-
 ...qcom-gsbi-Add-support-for-ADM-CRCI-muxing.patch |  15 +-
 ...CI-qcom-Document-PCIe-devicetree-bindings.patch |   3 -
 ...-qcom-add-pcie-nodes-to-ipq806x-platforms.patch |   2 +-
 ...-mfd-qcom-rpm-Driver-for-the-Qualcomm-RPM.patch | 654 +
 .../121-mfd-qcom_rpm-Add-support-for-IPQ8064.patch |  71 +++
 ...tree-bindings-Add-Qualcomm-RPM-DT-binding.patch | 256 
 ...etree-qcom_rpm-Document-IPQ8064-resources.patch |  42 ++
 ...rpm-add-support-for-RPM-controller-SMB208.patch |  63 ++
 ...com-rpm-Add-missing-state-flag-in-call-to.patch |  30 +
 .../patches-3.18/126-add-rpm-to-ipq8064-dts.patch  |  87 +++
 ...-set_parent-doing-the-wrong-thing-when-IN.patch |  60 ++
 ...-clk-Add-__clk_mux_determine_rate_closest.patch | 120 
 ..._unregister_-divider-gate-mux-to-close-me.patch | 115 
 ...-Add-Krait-L2-register-accessor-functions.patch | 144 +
 ...ux-Split-out-register-accessors-for-reuse.patch | 192 ++
 ...ates-to-downstream-clocks-during-set_rate.patch | 129 
 .../136-clk-Add-safe-switch-hook.patch | 170 ++
 ...dd-support-for-High-Frequency-PLLs-HFPLLs.patch | 351 +++
 .../138-clk-qcom-Add-HFPLL-driver.patch| 206 +++
 .../139-clk-qcom-Add-IPQ806X-s-HFPLLs.patch| 127 
 ...140-clk-qcom-Add-support-for-Krait-clocks.patch | 271 +
 .../141-clk-qcom-Add-KPSS-ACC-GCC-driver.patch | 205 +++
 ...lk-qcom-Add-Krait-clock-controller-driver.patch | 435 ++
 ...-module-to-register-cpufreq-on-Krait-CPUs.patch | 304 ++
 ...m-Add-necessary-DT-data-for-Krait-cpufreq.patch | 100 
 ...ufreq-Add-a-cpufreq-krait-based-on-cpufre.patch | 461 +++
 .../300-arch-arm-force-ZRELADDR-on-arch-qcom.patch |  12 +-
 .../patches-3.18/700-add-gmac-dts-suport.patch |  10 +-
 .../001-spi-qup-Add-DMA-capabilities.patch |  12 +-
 ...atchdog-qcom-use-timer-devicetree-binding.patch |  11 +-
 ...m-add-description-of-KPSS-WDT-for-IPQ8064.patch |   5 -
 .../ipq806x/patches-4.0/022-add-db149-dts.patch|  10 +-
 ...M-dts-ipq806x-Disable-i2c-device-on-gsbi4.patch |  53 ++
 ...CI-qcom-Document-PCIe-devicetree-bindings.patch |   3 -
 ...-qcom-add-pcie-nodes-to-ipq806x-platforms.patch |   2 +-
 .../121-mfd-qcom_rpm-Add-support-for-IPQ8064.patch |  71 +++
 ...etree-qcom_rpm-Document-IPQ8064-resources.patch |  42 ++
 .../patches-4.0/126-add-rpm-to-ipq8064-dts.patch   |  87 +++
 ...-Add-Krait-L2-register-accessor-functions.patch | 144 +
 ...ux-Split-out-register-accessors-for-reuse.patch | 192 ++
 ...ates-to-downstream-clocks-during-set_rate.patch | 130 
 .../patches-4.0/136-clk-Add-safe-switch-hook.patch | 164 ++
 ...dd-support-for-High-Frequency-PLLs-HFPLLs.patch | 351 +++
 .../138-clk-qcom-Add-HFPLL-driver.patch| 206 +++
 .../139-clk-qcom-Add-IPQ806X-s-HFPLLs.patch| 127 
 ...140-clk-qcom-Add-support-for-Krait-clocks.patch | 271 +
 .../141-clk-qcom-Add-KPSS-ACC-GCC-driver.patch | 205 +++
 ...lk-qcom-Add-Krait-clock-controller-driver.patch | 435 ++
 ...-module-to-register-cpufreq-on-Krait-CPUs.patch | 304 ++
 ...m-Add-necessary-DT-data-for-Krait-cpufreq.patch | 100 
 ...ufreq-Add-a-cpufreq-krait-based-on-cpufre.patch | 461 +++
 .../300-arch-arm-force-ZRELADDR-on-arch-qcom.patch |  14 +-
 .../patches-4.0/700-add-gmac-dts-suport.patch  |  10 +-
 60 files changed, 8082 insertions(+), 108 deletions(-)
 create mode 100644 
target/linux/ipq806x/patches-3.18/023-ARM-dts-ipq806x-Disable-i2c-device-on-gsbi4.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/120-mfd-qcom-rpm-Driver-for-the-Qualcomm-RPM.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/121-mfd-qcom_rpm-Add-support-for-IPQ8064.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/122-mfd-devicetree-bindings-Add-Qualcomm-RPM-DT-binding.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/123

[OpenWrt-Devel] [PATCH] generic/4.0: fix error during kernel patch application

2015-05-20 Thread Mathieu Olivari
Commit 5168c9a5702648eb690d32ec821647aca80aeba9 introduced a regression
during patch application on the 4.0 kernel. Some of the patched content
doesn't match the actual code, therefore leading to the following error:
  Applying patch 
generic/667-ipv6-Fixed-source-specific-default-route-handling.patch
  patching file net/ipv6/ip6_output.c
  Hunk #1 FAILED at 886.
  1 out of 1 hunk FAILED -- rejects in file net/ipv6/ip6_output.c
  patching file net/ipv6/route.c
  Hunk #1 succeeded at 2247 (offset 2 lines).
  Patch generic/667-ipv6-Fixed-source-specific-default-route-handling.patch 
does not apply (enforce with -f)

This change just adapts the actual patch to fix what is in kernel 4.0
and make it apply cleanly.

Signed-off-by: Mathieu Olivari 
---
 ...-ipv6-Fixed-source-specific-default-route-handling.patch | 13 +++--
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git 
a/target/linux/generic/patches-4.0/667-ipv6-Fixed-source-specific-default-route-handling.patch
 
b/target/linux/generic/patches-4.0/667-ipv6-Fixed-source-specific-default-route-handling.patch
index b5cc76d..50ac1db 100644
--- 
a/target/linux/generic/patches-4.0/667-ipv6-Fixed-source-specific-default-route-handling.patch
+++ 
b/target/linux/generic/patches-4.0/667-ipv6-Fixed-source-specific-default-route-handling.patch
@@ -24,15 +24,13 @@ Signed-off-by: David S. Miller 
  net/ipv6/route.c  |  5 +++--
  2 files changed, 34 insertions(+), 10 deletions(-)
 
-diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
-index 7fde1f2..c217775 100644
 --- a/net/ipv6/ip6_output.c
 +++ b/net/ipv6/ip6_output.c
-@@ -886,22 +886,45 @@ static int ip6_dst_lookup_tail(struct sock *sk,
+@@ -883,22 +883,45 @@ static int ip6_dst_lookup_tail(struct so
  #endif
int err;
  
--  if (!*dst)
+-  if (*dst == NULL)
 -  *dst = ip6_route_output(net, sk, fl6);
 -
 -  err = (*dst)->error;
@@ -82,11 +80,9 @@ index 7fde1f2..c217775 100644
  #ifdef CONFIG_IPV6_OPTIMISTIC_DAD
/*
 * Here if the dst entry we've looked up
-diff --git a/net/ipv6/route.c b/net/ipv6/route.c
-index 5c48293..d35 100644
 --- a/net/ipv6/route.c
 +++ b/net/ipv6/route.c
-@@ -2245,9 +2245,10 @@ int ip6_route_get_saddr(struct net *net,
+@@ -2247,9 +2247,10 @@ int ip6_route_get_saddr(struct net *net,
unsigned int prefs,
struct in6_addr *saddr)
  {
@@ -99,6 +95,3 @@ index 5c48293..d35 100644
*saddr = rt->rt6i_prefsrc.addr;
else
err = ipv6_dev_get_saddr(net, idev ? idev->dev : NULL,
--- 
-2.1.4
-
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 3/5] elfutils: import package from packages.git

2015-05-18 Thread Mathieu Olivari
I just realized I only replied to part of the question. They should also 
probably be deleted from packages.git.
OpenWrt will ignore them anyway unless the override mechanism is used when 
installing the feeds. 

-Original Message-
From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org] On Behalf 
Of Mathieu Olivari
Sent: Monday, May 18, 2015 7:32 PM
To: 'Luiz Angelo Daros de Luca'; blo...@openwrt.org
Cc: mmccl...@codeaurora.org; openwrt-devel@lists.openwrt.org
Subject: Re: [OpenWrt-Devel] [PATCH 3/5] elfutils: import package from 
packages.git

Yeah; I actually wondered the same question. I’m not sure what we should happen 
in this case.
I’ll let blogic replied as he’s the one who moved perf into openwrt.git.
If these packages are required by the OpenWrt core, then one of the openwrt.git 
maintainer would probably own it. I’m not sure :s
Thanks,
Mathieu


From: Luiz Angelo Daros de Luca [mailto:luizl...@gmail.com] 
Sent: Monday, May 18, 2015 6:43 PM
To: Mathieu Olivari; blo...@openwrt.org
Cc: mmccl...@codeaurora.org; openwrt-devel@lists.openwrt.org
Subject: Re: [OpenWrt-Devel] [PATCH 3/5] elfutils: import package from 
packages.git

I'm curious, as current elfutils packager, how I should play in this import?
Should this package be removed from package.git (but there is no PR for it)?
Or will it be periodically synchronized with packages.git?
Also, as I'm not a core developer, maybe it would be better to a core developer 
to take its maintainance.
Regards,

Em seg, 18 de mai de 2015 20:45, Mathieu Olivari  
escreveu:
elfutils is required by perf. So we'll move this package from
packages.git and make it part of the core distribution.

Signed-off-by: Mathieu Olivari 
---
 package/libs/elfutils/Makefile |   97 +
 .../patches/001-elfutils-portability.patch | 1871 
 .../elfutils/patches/002-argp_standalone.patch |   14 +
 .../libs/elfutils/patches/003-libint-stub.patch|   49 +
 .../elfutils/patches/004-maybe-uninitialized.patch |   11 +
 package/libs/elfutils/patches/004-memcpy_def.patch |   14 +
 .../elfutils/patches/005-build_only_libs.patch |   24 +
 package/libs/elfutils/patches/006-libdw_LIBS.patch |   11 +
 .../libs/elfutils/patches/100-musl-compat.patch|  788 +
 package/libs/elfutils/patches/101-no-fts.patch |  109 ++
 10 files changed, 2988 insertions(+)
 create mode 100644 package/libs/elfutils/Makefile
 create mode 100644 package/libs/elfutils/patches/001-elfutils-portability.patch
 create mode 100644 package/libs/elfutils/patches/002-argp_standalone.patch
 create mode 100644 package/libs/elfutils/patches/003-libint-stub.patch
 create mode 100644 package/libs/elfutils/patches/004-maybe-uninitialized.patch
 create mode 100644 package/libs/elfutils/patches/004-memcpy_def.patch
 create mode 100644 package/libs/elfutils/patches/005-build_only_libs.patch
 create mode 100644 package/libs/elfutils/patches/006-libdw_LIBS.patch
 create mode 100644 package/libs/elfutils/patches/100-musl-compat.patch
 create mode 100644 package/libs/elfutils/patches/101-no-fts.patch

diff --git a/package/libs/elfutils/Makefile b/package/libs/elfutils/Makefile
new file mode 100644
index 000..d3e1552
--- /dev/null
+++ b/package/libs/elfutils/Makefile
@@ -0,0 +1,97 @@
+#
+# Copyright (C) 2010-2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=elfutils
+PKG_VERSION:=0.161
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=http://fedorahosted.org/releases/e/l/$(PKG_NAME)/$(PKG_VERSION)
+PKG_MD5SUM:=e1b9847c9a6a1ad340de8d47a863ec52
+PKG_MAINTAINER:=Luiz Angelo Daros de Luca 
+PKG_LICENSE:=GPL-3.0+
+PKG_LICENSE_FILES:=COPYING COPYING-GPLV2 COPYING-LGPLV3
+
+PKG_INSTALL:=1
+PKG_USE_MIPS16:=0
+
+PKG_BUILD_DEPENDS:=USE_UCLIBC:argp-standalone USE_MUSL:argp-standalone
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
+
+define Package/elfutils/Default
+  SECTION:=libs
+  CATEGORY:=Libraries
+  DEPENDS:=$(INTL_DEPENDS)
+  TITLE:=ELF manipulation libraries
+  URL:=https://fedorahosted.org/elfutils/
+endef
+
+define Package/libasm
+  $(call Package/elfutils/Default)
+  TITLE+= (libasm)
+  DEPENDS:=libelf1
+endef
+
+define Package/libdw
+  $(call Package/elfutils/Default)
+  DEPENDS:=libelf1 +zlib +libbz2
+  TITLE+= (libdw)
+endef
+
+define Package/libelf1
+  $(call Package/elfutils/Default)
+  TITLE+= (libelf)
+endef
+
+ifeq ($(CONFIG_BUILD_NLS),y)
+TARGET_LDFLAGS += "-lintl"
+endif
+
+ifdef CONFIG_USE_UCLIBC
+CONFIGURE_VARS += \
+   LIBS="-largp"
+endif
+
+ifdef CONFIG_USE_MUSL
+CONFIGURE_VARS += \
+   LIBS="-largp"
+endif
+
+CONFIGURE_ARGS += \
+   --disable-werror \
+   --without-lzma
+
+define Build/InstallDev
+   $(INSTALL_DIR) $(1)/usr/include
+   $(CP) $(PKG_INSTALL_DIR)/usr/include/

Re: [OpenWrt-Devel] [PATCH 3/5] elfutils: import package from packages.git

2015-05-18 Thread Mathieu Olivari
Yeah; I actually wondered the same question. I’m not sure what we should happen 
in this case.
I’ll let blogic replied as he’s the one who moved perf into openwrt.git.
If these packages are required by the OpenWrt core, then one of the openwrt.git 
maintainer would probably own it. I’m not sure :s
Thanks,
Mathieu


From: Luiz Angelo Daros de Luca [mailto:luizl...@gmail.com] 
Sent: Monday, May 18, 2015 6:43 PM
To: Mathieu Olivari; blo...@openwrt.org
Cc: mmccl...@codeaurora.org; openwrt-devel@lists.openwrt.org
Subject: Re: [OpenWrt-Devel] [PATCH 3/5] elfutils: import package from 
packages.git

I'm curious, as current elfutils packager, how I should play in this import?
Should this package be removed from package.git (but there is no PR for it)?
Or will it be periodically synchronized with packages.git?
Also, as I'm not a core developer, maybe it would be better to a core developer 
to take its maintainance.
Regards,

Em seg, 18 de mai de 2015 20:45, Mathieu Olivari  
escreveu:
elfutils is required by perf. So we'll move this package from
packages.git and make it part of the core distribution.

Signed-off-by: Mathieu Olivari 
---
 package/libs/elfutils/Makefile |   97 +
 .../patches/001-elfutils-portability.patch | 1871 
 .../elfutils/patches/002-argp_standalone.patch |   14 +
 .../libs/elfutils/patches/003-libint-stub.patch|   49 +
 .../elfutils/patches/004-maybe-uninitialized.patch |   11 +
 package/libs/elfutils/patches/004-memcpy_def.patch |   14 +
 .../elfutils/patches/005-build_only_libs.patch |   24 +
 package/libs/elfutils/patches/006-libdw_LIBS.patch |   11 +
 .../libs/elfutils/patches/100-musl-compat.patch|  788 +
 package/libs/elfutils/patches/101-no-fts.patch |  109 ++
 10 files changed, 2988 insertions(+)
 create mode 100644 package/libs/elfutils/Makefile
 create mode 100644 package/libs/elfutils/patches/001-elfutils-portability.patch
 create mode 100644 package/libs/elfutils/patches/002-argp_standalone.patch
 create mode 100644 package/libs/elfutils/patches/003-libint-stub.patch
 create mode 100644 package/libs/elfutils/patches/004-maybe-uninitialized.patch
 create mode 100644 package/libs/elfutils/patches/004-memcpy_def.patch
 create mode 100644 package/libs/elfutils/patches/005-build_only_libs.patch
 create mode 100644 package/libs/elfutils/patches/006-libdw_LIBS.patch
 create mode 100644 package/libs/elfutils/patches/100-musl-compat.patch
 create mode 100644 package/libs/elfutils/patches/101-no-fts.patch

diff --git a/package/libs/elfutils/Makefile b/package/libs/elfutils/Makefile
new file mode 100644
index 000..d3e1552
--- /dev/null
+++ b/package/libs/elfutils/Makefile
@@ -0,0 +1,97 @@
+#
+# Copyright (C) 2010-2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=elfutils
+PKG_VERSION:=0.161
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=http://fedorahosted.org/releases/e/l/$(PKG_NAME)/$(PKG_VERSION)
+PKG_MD5SUM:=e1b9847c9a6a1ad340de8d47a863ec52
+PKG_MAINTAINER:=Luiz Angelo Daros de Luca 
+PKG_LICENSE:=GPL-3.0+
+PKG_LICENSE_FILES:=COPYING COPYING-GPLV2 COPYING-LGPLV3
+
+PKG_INSTALL:=1
+PKG_USE_MIPS16:=0
+
+PKG_BUILD_DEPENDS:=USE_UCLIBC:argp-standalone USE_MUSL:argp-standalone
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
+
+define Package/elfutils/Default
+  SECTION:=libs
+  CATEGORY:=Libraries
+  DEPENDS:=$(INTL_DEPENDS)
+  TITLE:=ELF manipulation libraries
+  URL:=https://fedorahosted.org/elfutils/
+endef
+
+define Package/libasm
+  $(call Package/elfutils/Default)
+  TITLE+= (libasm)
+  DEPENDS:=libelf1
+endef
+
+define Package/libdw
+  $(call Package/elfutils/Default)
+  DEPENDS:=libelf1 +zlib +libbz2
+  TITLE+= (libdw)
+endef
+
+define Package/libelf1
+  $(call Package/elfutils/Default)
+  TITLE+= (libelf)
+endef
+
+ifeq ($(CONFIG_BUILD_NLS),y)
+TARGET_LDFLAGS += "-lintl"
+endif
+
+ifdef CONFIG_USE_UCLIBC
+CONFIGURE_VARS += \
+   LIBS="-largp"
+endif
+
+ifdef CONFIG_USE_MUSL
+CONFIGURE_VARS += \
+   LIBS="-largp"
+endif
+
+CONFIGURE_ARGS += \
+   --disable-werror \
+   --without-lzma
+
+define Build/InstallDev
+   $(INSTALL_DIR) $(1)/usr/include
+   $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
+   $(INSTALL_DIR) $(1)/usr/lib
+   $(CP) $(PKG_BUILD_DIR)/libasm/libasm.{a,so*} $(1)/usr/lib/
+   $(CP) $(PKG_BUILD_DIR)/libdw/libdw.{a,so*} $(1)/usr/lib/
+   $(CP) $(PKG_BUILD_DIR)/libelf/libelf.{a,so*} $(1)/usr/lib/
+endef
+
+define Package/libasm/install
+   $(INSTALL_DIR) $(1)/usr/lib
+   $(CP) $(PKG_BUILD_DIR)/libasm/libasm.so* $(1)/usr/lib/
+endef
+
+define Package/libdw/install
+   $(INSTALL_DIR) $(1)/usr/lib
+   $(CP) $(PKG_BUILD_DIR)/libdw/libdw.so* $(1)/usr/lib/
+endef
+
+define Package/libelf1/install
+  

[OpenWrt-Devel] [PATCH 3/5] elfutils: import package from packages.git

2015-05-18 Thread Mathieu Olivari
elfutils is required by perf. So we'll move this package from
packages.git and make it part of the core distribution.

Signed-off-by: Mathieu Olivari 
---
 package/libs/elfutils/Makefile |   97 +
 .../patches/001-elfutils-portability.patch | 1871 
 .../elfutils/patches/002-argp_standalone.patch |   14 +
 .../libs/elfutils/patches/003-libint-stub.patch|   49 +
 .../elfutils/patches/004-maybe-uninitialized.patch |   11 +
 package/libs/elfutils/patches/004-memcpy_def.patch |   14 +
 .../elfutils/patches/005-build_only_libs.patch |   24 +
 package/libs/elfutils/patches/006-libdw_LIBS.patch |   11 +
 .../libs/elfutils/patches/100-musl-compat.patch|  788 +
 package/libs/elfutils/patches/101-no-fts.patch |  109 ++
 10 files changed, 2988 insertions(+)
 create mode 100644 package/libs/elfutils/Makefile
 create mode 100644 package/libs/elfutils/patches/001-elfutils-portability.patch
 create mode 100644 package/libs/elfutils/patches/002-argp_standalone.patch
 create mode 100644 package/libs/elfutils/patches/003-libint-stub.patch
 create mode 100644 package/libs/elfutils/patches/004-maybe-uninitialized.patch
 create mode 100644 package/libs/elfutils/patches/004-memcpy_def.patch
 create mode 100644 package/libs/elfutils/patches/005-build_only_libs.patch
 create mode 100644 package/libs/elfutils/patches/006-libdw_LIBS.patch
 create mode 100644 package/libs/elfutils/patches/100-musl-compat.patch
 create mode 100644 package/libs/elfutils/patches/101-no-fts.patch

diff --git a/package/libs/elfutils/Makefile b/package/libs/elfutils/Makefile
new file mode 100644
index 000..d3e1552
--- /dev/null
+++ b/package/libs/elfutils/Makefile
@@ -0,0 +1,97 @@
+#
+# Copyright (C) 2010-2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=elfutils
+PKG_VERSION:=0.161
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=http://fedorahosted.org/releases/e/l/$(PKG_NAME)/$(PKG_VERSION)
+PKG_MD5SUM:=e1b9847c9a6a1ad340de8d47a863ec52
+PKG_MAINTAINER:=Luiz Angelo Daros de Luca 
+PKG_LICENSE:=GPL-3.0+
+PKG_LICENSE_FILES:=COPYING COPYING-GPLV2 COPYING-LGPLV3
+
+PKG_INSTALL:=1
+PKG_USE_MIPS16:=0
+
+PKG_BUILD_DEPENDS:=USE_UCLIBC:argp-standalone USE_MUSL:argp-standalone
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/nls.mk
+
+define Package/elfutils/Default
+  SECTION:=libs
+  CATEGORY:=Libraries
+  DEPENDS:=$(INTL_DEPENDS)
+  TITLE:=ELF manipulation libraries
+  URL:=https://fedorahosted.org/elfutils/
+endef
+
+define Package/libasm
+  $(call Package/elfutils/Default)
+  TITLE+= (libasm)
+  DEPENDS:=libelf1
+endef
+
+define Package/libdw
+  $(call Package/elfutils/Default)
+  DEPENDS:=libelf1 +zlib +libbz2
+  TITLE+= (libdw)
+endef
+
+define Package/libelf1
+  $(call Package/elfutils/Default)
+  TITLE+= (libelf)
+endef
+
+ifeq ($(CONFIG_BUILD_NLS),y)
+TARGET_LDFLAGS += "-lintl"
+endif
+
+ifdef CONFIG_USE_UCLIBC
+CONFIGURE_VARS += \
+   LIBS="-largp"
+endif
+
+ifdef CONFIG_USE_MUSL
+CONFIGURE_VARS += \
+   LIBS="-largp"
+endif
+
+CONFIGURE_ARGS += \
+   --disable-werror \
+   --without-lzma
+
+define Build/InstallDev
+   $(INSTALL_DIR) $(1)/usr/include
+   $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
+   $(INSTALL_DIR) $(1)/usr/lib
+   $(CP) $(PKG_BUILD_DIR)/libasm/libasm.{a,so*} $(1)/usr/lib/
+   $(CP) $(PKG_BUILD_DIR)/libdw/libdw.{a,so*} $(1)/usr/lib/
+   $(CP) $(PKG_BUILD_DIR)/libelf/libelf.{a,so*} $(1)/usr/lib/
+endef
+
+define Package/libasm/install
+   $(INSTALL_DIR) $(1)/usr/lib
+   $(CP) $(PKG_BUILD_DIR)/libasm/libasm.so* $(1)/usr/lib/
+endef
+
+define Package/libdw/install
+   $(INSTALL_DIR) $(1)/usr/lib
+   $(CP) $(PKG_BUILD_DIR)/libdw/libdw.so* $(1)/usr/lib/
+endef
+
+define Package/libelf1/install
+   $(INSTALL_DIR) $(1)/usr/lib
+   $(CP) $(PKG_BUILD_DIR)/libelf/libelf.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libasm))
+$(eval $(call BuildPackage,libdw))
+$(eval $(call BuildPackage,libelf1))
diff --git a/package/libs/elfutils/patches/001-elfutils-portability.patch 
b/package/libs/elfutils/patches/001-elfutils-portability.patch
new file mode 100644
index 000..7539f8b
--- /dev/null
+++ b/package/libs/elfutils/patches/001-elfutils-portability.patch
@@ -0,0 +1,1871 @@
+--- elfutils/backends/ChangeLog
 elfutils/backends/ChangeLog
+@@ -433,6 +433,10 @@
+   * ppc_attrs.c (ppc_check_object_attribute): Handle tag
+   GNU_Power_ABI_Struct_Return.
+ 
++2009-01-23  Roland McGrath  
++
++  * Makefile.am (libebl_%.so): Use $(LD_AS_NEEDED).
++
+ 2008-10-04  Ulrich Drepper  
+ 
+   * i386_reloc.def: Fix entries for TLS_GOTDESC, TLS_DESC_CALL, and
+@@ -760,6 +764,11 @@
+   * sparc_init.c: Likewise.
+   * x86_64_init.c: Likewise.
+ 
++2005-11-22  Roland

[OpenWrt-Devel] [PATCH 4/5] bzip2: import package from packages.git

2015-05-18 Thread Mathieu Olivari
bzip2 is required by elfutils, itself required by perf. So we'll move
this package from packages.git and make it part of the core
distribution.

Signed-off-by: Mathieu Olivari 
---
 package/utils/bzip2/Makefile | 87 
 1 file changed, 87 insertions(+)
 create mode 100644 package/utils/bzip2/Makefile

diff --git a/package/utils/bzip2/Makefile b/package/utils/bzip2/Makefile
new file mode 100644
index 000..493ccc9
--- /dev/null
+++ b/package/utils/bzip2/Makefile
@@ -0,0 +1,87 @@
+#
+# Copyright (C) 2007-2008 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=bzip2
+PKG_VERSION:=1.0.6
+PKG_RELEASE:=2
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://www.bzip.org/$(PKG_VERSION)
+PKG_MD5SUM:=00b516f4704d4a7cb50a1d97e6e8e15b
+PKG_MAINTAINER:=Steven Barth 
+
+PKG_LICENSE:=BZIP2
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/bzip2/Default
+  SUBMENU:=Compression
+  URL:=http://www.bzip.org/
+endef
+
+define Package/libbz2
+$(call Package/bzip2/Default)
+  SECTION:=libs
+  CATEGORY:=Libraries
+  DEPENDS:=
+  TITLE:=bzip2 library.
+endef
+
+define Package/libbz2/description
+   bzip2 is a freely available, patent free, high-quality
+   data compressor. This packages provides libbz2 library.
+endef
+
+define Package/bzip2
+$(call Package/bzip2/Default)
+  SECTION:=utils
+  CATEGORY:=Utilities
+  DEPENDS:=+libbz2
+  TITLE:=bzip2 is a compression utility.
+endef
+
+define Package/bzip2/description
+   bzip2 is a freely available, patent free, high-quality
+   data compressor. This package provides the binary.
+endef
+
+TARGET_CFLAGS += \
+   $(FPIC) \
+   $(TARGET_LDFLAGS)
+
+CONFIGURE_ARGS += --prefix=/usr
+
+MAKE_FLAGS += \
+   -f Makefile-libbz2_so \
+   CFLAGS="$(TARGET_CFLAGS)" \
+   all
+
+define Build/InstallDev
+   $(INSTALL_DIR) $(1)/usr/include
+   $(CP) $(PKG_BUILD_DIR)/bzlib.h $(1)/usr/include/
+   $(INSTALL_DIR) $(1)/usr/lib
+   $(CP) $(PKG_BUILD_DIR)/libbz2.so.$(PKG_VERSION) $(1)/usr/lib/
+   $(LN) libbz2.so.$(PKG_VERSION) $(1)/usr/lib/libbz2.so.1.0
+   $(LN) libbz2.so.$(PKG_VERSION) $(1)/usr/lib/libbz2.so
+endef
+
+define Package/libbz2/install
+   $(INSTALL_DIR) $(1)/usr/lib/
+   $(CP) $(PKG_BUILD_DIR)/libbz2.so.$(PKG_VERSION) $(1)/usr/lib/
+   $(LN) libbz2.so.$(PKG_VERSION) $(1)/usr/lib/libbz2.so.1.0
+endef
+
+define Package/bzip2/install
+   $(INSTALL_DIR) $(1)/usr/bin/
+   $(INSTALL_BIN) $(PKG_BUILD_DIR)/bzip2-shared $(1)/usr/bin/bzip2
+endef
+
+$(eval $(call BuildPackage,libbz2))
+$(eval $(call BuildPackage,bzip2))
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/5] uClibc: elf: Add STT_GNU_IFUNC from glibc

2015-05-18 Thread Mathieu Olivari
perf in upstream Linux kernel 3.17 onwards expects STT_GNU_IFUNC
replicate it from glibc

Patch cherry-picked from:
http://lists.busybox.net/pipermail/uclibc/2015-February/048825.html

Signed-off-by: Mathieu Olivari 
---
 .../012-elf-Add-STT_GNU_IFUNC-from-glibc.patch | 37 ++
 1 file changed, 37 insertions(+)
 create mode 100644 
toolchain/uClibc/patches-0.9.33.2/012-elf-Add-STT_GNU_IFUNC-from-glibc.patch

diff --git 
a/toolchain/uClibc/patches-0.9.33.2/012-elf-Add-STT_GNU_IFUNC-from-glibc.patch 
b/toolchain/uClibc/patches-0.9.33.2/012-elf-Add-STT_GNU_IFUNC-from-glibc.patch
new file mode 100644
index 000..6cecfaa
--- /dev/null
+++ 
b/toolchain/uClibc/patches-0.9.33.2/012-elf-Add-STT_GNU_IFUNC-from-glibc.patch
@@ -0,0 +1,37 @@
+From be58779614b2fe9aa57a9315be9dc004dfd77b3b Mon Sep 17 00:00:00 2001
+From: Vineet Gupta 
+Date: Fri, 20 Feb 2015 15:27:08 +0530
+Subject: [PATCH] elf: Add STT_GNU_IFUNC from glibc
+
+perf in upstream Linux kernel 3.17 onwards expects STT_GNU_IFUNC
+replicate it from glibc
+
+Signed-off-by: Vineet Gupta 
+Signed-off-by: Bernhard Reutner-Fischer 
+---
+ include/elf.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/include/elf.h b/include/elf.h
+index facf09c..917930b 100644
+--- a/include/elf.h
 b/include/elf.h
+@@ -566,6 +566,7 @@ typedef struct
+ #define STB_WEAK  2   /* Weak symbol */
+ #define   STB_NUM 3   /* Number of defined types.  */
+ #define STB_LOOS  10  /* Start of OS-specific */
++#define STB_GNU_UNIQUE10  /* Unique symbol.  */
+ #define STB_HIOS  12  /* End of OS-specific */
+ #define STB_LOPROC13  /* Start of processor-specific */
+ #define STB_HIPROC15  /* End of processor-specific */
+@@ -581,6 +582,7 @@ typedef struct
+ #define STT_TLS   6   /* Symbol is thread-local data 
object*/
+ #define   STT_NUM 7   /* Number of defined types.  */
+ #define STT_LOOS  10  /* Start of OS-specific */
++#define STT_GNU_IFUNC 10  /* Symbol is indirect code object */
+ #define STT_HIOS  12  /* End of OS-specific */
+ #define STT_LOPROC13  /* Start of processor-specific */
+ #define STT_HIPROC15  /* End of processor-specific */
+-- 
+2.1.4
+
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 5/5] perf: remove EGLIBC dependency

2015-05-18 Thread Mathieu Olivari
EGLIBC dependency was required as libelf was not found. But we now fixed
the root cause, so we can remove it. perf works with uClibc again.

Signed-off-by: Mathieu Olivari 
---
 package/devel/perf/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/devel/perf/Makefile b/package/devel/perf/Makefile
index b77e29a..86363ee 100644
--- a/package/devel/perf/Makefile
+++ b/package/devel/perf/Makefile
@@ -19,7 +19,7 @@ include $(INCLUDE_DIR)/package.mk
 define Package/perf
   SECTION:=devel
   CATEGORY:=Development
-  DEPENDS:= @USE_GLIBC +libelf1 +libdw +libpthread +librt +binutils
+  DEPENDS:= +libelf1 +libdw +libpthread +librt +binutils
   TITLE:=Linux performance monitoring tool
   VERSION:=$(LINUX_VERSION)-$(PKG_RELEASE)
   URL:=http://www.kernel.org
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 0/5] perf: fix dependencies & restore uClibc compatibility

2015-05-18 Thread Mathieu Olivari
Commit 9cddeba3a4eb00e85233f0b8ac84b8e8492822ef was removing uClibc
support from perf because it didn't build anymore.
The root cause of this failure was multiple:
*perf needs a uClibc patch to define STT_GNU_IFUNC. Patch has been done
 already to the uClibc project, and just needs to be cherry-picked to
 OpenWrt.
*perf was moved to openwrt.git, but libelf1 (in its dependencies) is
 still located in packages.git. So it ends-up compiling without libelf
 support.

This change set fixes these issues by adding the patch and importing the
missing packages, which allows us to remove the dependency perf has on
eglibc.

Mathieu Olivari (5):
  uClibc: elf: Add STT_GNU_IFUNC from glibc
  argp-standalone: import package from packages.git
  elfutils: import package from packages.git
  bzip2: import package from packages.git
  perf: remove EGLIBC dependency

 package/devel/perf/Makefile|2 +-
 package/libs/argp-standalone/Makefile  |   48 +
 .../patches/001-throw-in-funcdef.patch |   79 +
 package/libs/elfutils/Makefile |   97 +
 .../patches/001-elfutils-portability.patch | 1871 
 .../elfutils/patches/002-argp_standalone.patch |   14 +
 .../libs/elfutils/patches/003-libint-stub.patch|   49 +
 .../elfutils/patches/004-maybe-uninitialized.patch |   11 +
 package/libs/elfutils/patches/004-memcpy_def.patch |   14 +
 .../elfutils/patches/005-build_only_libs.patch |   24 +
 package/libs/elfutils/patches/006-libdw_LIBS.patch |   11 +
 .../libs/elfutils/patches/100-musl-compat.patch|  788 +
 package/libs/elfutils/patches/101-no-fts.patch |  109 ++
 package/utils/bzip2/Makefile   |   87 +
 .../012-elf-Add-STT_GNU_IFUNC-from-glibc.patch |   37 +
 15 files changed, 3240 insertions(+), 1 deletion(-)
 create mode 100644 package/libs/argp-standalone/Makefile
 create mode 100644 
package/libs/argp-standalone/patches/001-throw-in-funcdef.patch
 create mode 100644 package/libs/elfutils/Makefile
 create mode 100644 package/libs/elfutils/patches/001-elfutils-portability.patch
 create mode 100644 package/libs/elfutils/patches/002-argp_standalone.patch
 create mode 100644 package/libs/elfutils/patches/003-libint-stub.patch
 create mode 100644 package/libs/elfutils/patches/004-maybe-uninitialized.patch
 create mode 100644 package/libs/elfutils/patches/004-memcpy_def.patch
 create mode 100644 package/libs/elfutils/patches/005-build_only_libs.patch
 create mode 100644 package/libs/elfutils/patches/006-libdw_LIBS.patch
 create mode 100644 package/libs/elfutils/patches/100-musl-compat.patch
 create mode 100644 package/libs/elfutils/patches/101-no-fts.patch
 create mode 100644 package/utils/bzip2/Makefile
 create mode 100644 
toolchain/uClibc/patches-0.9.33.2/012-elf-Add-STT_GNU_IFUNC-from-glibc.patch

-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/5] argp-standalone: import package from packages.git

2015-05-18 Thread Mathieu Olivari
argp-standalone is required by elfutils, itself required by perf. So
we'll move this package from packages.git and make it part of the core
distribution.

Signed-off-by: Mathieu Olivari 
---
 package/libs/argp-standalone/Makefile  | 48 +
 .../patches/001-throw-in-funcdef.patch | 79 ++
 2 files changed, 127 insertions(+)
 create mode 100644 package/libs/argp-standalone/Makefile
 create mode 100644 
package/libs/argp-standalone/patches/001-throw-in-funcdef.patch

diff --git a/package/libs/argp-standalone/Makefile 
b/package/libs/argp-standalone/Makefile
new file mode 100644
index 000..8cf23fe
--- /dev/null
+++ b/package/libs/argp-standalone/Makefile
@@ -0,0 +1,48 @@
+#
+# Copyright (C) 2007-2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=argp-standalone
+PKG_VERSION:=1.3
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://www.lysator.liu.se/~nisse/misc/
+PKG_MD5SUM:=720704bac078d067111b32444e24ba69
+PKG_MAINTAINER:=Ted Hess 
+
+PKG_LICENSE:=LGPL-2.1
+PKG_LICENSE:=Makefile.am
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/argp-standalone
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=Hierarchial argument parsing broken out from glibc
+  URL:=http://www.lysator.liu.se/~nisse/misc/
+endef
+
+define Package/argp-standalone/description
+  GNU libc hierarchial argument parsing library broken out from glibc.
+endef
+
+MAKE_FLAGS += \
+   CFLAGS="$(TARGET_CFLAGS) $(FPIC)"
+
+
+define Build/InstallDev
+   $(INSTALL_DIR) $(1)/usr/include
+   $(CP)   $(PKG_BUILD_DIR)/argp.h \
+   $(1)/usr/include/
+   $(INSTALL_DIR) $(1)/usr/lib
+   $(CP)   $(PKG_BUILD_DIR)/libargp.a \
+   $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,argp-standalone))
diff --git a/package/libs/argp-standalone/patches/001-throw-in-funcdef.patch 
b/package/libs/argp-standalone/patches/001-throw-in-funcdef.patch
new file mode 100644
index 000..4a90751
--- /dev/null
+++ b/package/libs/argp-standalone/patches/001-throw-in-funcdef.patch
@@ -0,0 +1,79 @@
+# --- T2-COPYRIGHT-NOTE-BEGIN ---
+# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
+# 
+# T2 SDE: package/.../rng-tools/throw-in-funcdef.patch.argp-standalone
+# Copyright (C) 2006 The T2 SDE Project
+# 
+# More information can be found in the files COPYING and README.
+# 
+# This patch file is dual-licensed. It is available under the license the
+# patched project is licensed under, as long as it is an OpenSource license
+# as defined at http://www.opensource.org/ (e.g. BSD, X11) or 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.
+# --- T2-COPYRIGHT-NOTE-END ---
+
+
+No __THROW in function implementation.
+   --jsaw
+
+--- argp-standalone-1.4-test2/argp.h.orig  2006-01-06 02:29:59.0 
+0100
 argp-standalone-1.4-test2/argp.h   2006-01-06 02:41:10.0 +0100
+@@ -560,17 +560,17 @@
+ # endif
+ 
+ # ifndef ARGP_EI
+-#  define ARGP_EI extern __inline__
++#  define ARGP_EI extern inline
+ # endif
+ 
+ ARGP_EI void
+-__argp_usage (__const struct argp_state *__state) __THROW
++__argp_usage (__const struct argp_state *__state)
+ {
+   __argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE);
+ }
+ 
+ ARGP_EI int
+-__option_is_short (__const struct argp_option *__opt) __THROW
++__option_is_short (__const struct argp_option *__opt)
+ {
+   if (__opt->flags & OPTION_DOC)
+ return 0;
+@@ -582,7 +582,7 @@
+ }
+ 
+ ARGP_EI int
+-__option_is_end (__const struct argp_option *__opt) __THROW
++__option_is_end (__const struct argp_option *__opt)
+ {
+   return !__opt->key && !__opt->name && !__opt->doc && !__opt->group;
+ }
+--- argp-standalone-1.4-test2/argp-parse.c.orig2006-01-06 
02:47:48.0 +0100
 argp-standalone-1.4-test2/argp-parse.c 2006-01-06 02:48:16.0 
+0100
+@@ -1290,13 +1290,13 @@
+ /* Defined here, in case a user is not inlining the definitions in
+  * argp.h */
+ void
+-__argp_usage (__const struct argp_state *__state) __THROW
++__argp_usage (__const struct argp_state *__state)
+ {
+   __argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE);
+ }
+ 
+ int
+-__option_is_short (__const struct argp_option *__opt) __THROW
++__option_is_short (__const struct argp_option *__opt) 
+ {
+   if (__opt->flags & OPTION_DOC)
+ return 0;
+@@ -1310,7 +1310,7 @@
+ }
+ 
+ int
+-__option_is_end (__const struct argp_option *__opt) __THROW
++__option_is_end (__const struct argp_option *__opt) 
+ {
+   return !__opt->key && !__opt->name && !__opt->doc && !__opt->group;
+ }
-- 
2.1.4
___

[OpenWrt-Devel] [Patch V2] build: don't call prereq for any package/symlinks rules

2015-05-08 Thread Mathieu Olivari
Most of the time, we want to make sure OpenWrt has been configured and
setup before start running make. However, in case of package/symlinks,
forcing prereq as a dependency creates multiple issues:
*when executed on a clean workspace, it will prompt for user input
 and open a menuconfig window before executing the feeds command
*the only way around that is to provide a .config. However, the "prereq"
 target would then run a "make defconfig", which will remove all the
 packages in the .config but from external feeds, as feeds have not been
 installed yet.

The only way to currently work around this, is to generate a fake config
by running "make defconfig", then "make package/symlinks", copy the real
config (which at this point disregards the previously generated config),
and run make defconfig again. Something like this:

make defconfig
make package/symlinks
cp real.config .config
make defconfig

This change is removing the need for the first defconfig, making the
process more logical for OpenWrt users using the package/symlinks target.

Signed-off-by: Mathieu Olivari 
---
 Makefile| 14 --
 include/toplevel.mk | 14 ++
 2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/Makefile b/Makefile
index 2b08d30..2499304 100644
--- a/Makefile
+++ b/Makefile
@@ -86,20 +86,6 @@ prepare: .config $(tools/stamp-install) 
$(toolchain/stamp-install)
 world: prepare $(target/stamp-compile) $(package/stamp-compile) 
$(package/stamp-install) $(target/stamp-install) FORCE
$(_SINGLE)$(SUBMAKE) -r package/index
 
-# update all feeds, re-create index files, install symlinks
-package/symlinks:
-   $(SCRIPT_DIR)/feeds update -a
-   $(SCRIPT_DIR)/feeds install -a
-
-# re-create index files, install symlinks
-package/symlinks-install:
-   $(SCRIPT_DIR)/feeds update -i
-   $(SCRIPT_DIR)/feeds install -a
-
-# remove all symlinks, don't touch ./feeds
-package/symlinks-clean:
-   $(SCRIPT_DIR)/feeds uninstall -a
-
 .PHONY: clean dirclean prereq prepare world package/symlinks 
package/symlinks-install package/symlinks-clean
 
 endif
diff --git a/include/toplevel.mk b/include/toplevel.mk
index d8651d9..bbeb7eb 100644
--- a/include/toplevel.mk
+++ b/include/toplevel.mk
@@ -193,6 +193,20 @@ else
 
 endif
 
+# update all feeds, re-create index files, install symlinks
+package/symlinks:
+   ./scripts/feeds update -a
+   ./scripts/feeds install -a
+
+# re-create index files, install symlinks
+package/symlinks-install:
+   ./scripts/feeds update -i
+   ./scripts/feeds install -a
+
+# remove all symlinks, don't touch ./feeds
+package/symlinks-clean:
+   ./scripts/feeds uninstall -a
+
 help:
cat README
 
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] ipq806x: add pcie support to ipq806x based platforms

2015-05-05 Thread Mathieu Olivari
This change adds PCIe support to IPQ806x based platforms. The driver is
actually cherry-picked from the following LKML thread:
*https://lwn.net/Articles/643086/ (patches 110-111)

We also add here an additional fix to support multiple PCI controllers
on the same platform (patch 112), and to patch the ap148 & dbs149 DTS
files (patch 113).

Signed-off-by: Mathieu Olivari 
---
 target/linux/ipq806x/config-3.18   |   6 +
 target/linux/ipq806x/config-4.0|  10 +-
 ...CI-qcom-Document-PCIe-devicetree-bindings.patch | 266 
 ...-qcom-Add-Qualcomm-PCIe-controller-driver.patch | 753 +
 ...-qcom-add-pcie-nodes-to-ipq806x-platforms.patch | 268 
 ...tomatically-select-PCI_DOMAINS-if-PCI-is-.patch |  29 +
 .../patches-3.18/700-add-gmac-dts-suport.patch |  19 +-
 ...CI-qcom-Document-PCIe-devicetree-bindings.patch | 266 
 ...-qcom-Add-Qualcomm-PCIe-controller-driver.patch | 753 +
 ...-qcom-add-pcie-nodes-to-ipq806x-platforms.patch | 260 +++
 ...tomatically-select-PCI_DOMAINS-if-PCI-is-.patch |  29 +
 .../patches-4.0/700-add-gmac-dts-suport.patch  |  26 +-
 12 files changed, 2662 insertions(+), 23 deletions(-)
 create mode 100644 
target/linux/ipq806x/patches-3.18/110-DT-PCI-qcom-Document-PCIe-devicetree-bindings.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/111-PCI-qcom-Add-Qualcomm-PCIe-controller-driver.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/112-ARM-dts-qcom-add-pcie-nodes-to-ipq806x-platforms.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/113-ARM-qcom-automatically-select-PCI_DOMAINS-if-PCI-is-.patch
 create mode 100644 
target/linux/ipq806x/patches-4.0/110-DT-PCI-qcom-Document-PCIe-devicetree-bindings.patch
 create mode 100644 
target/linux/ipq806x/patches-4.0/111-PCI-qcom-Add-Qualcomm-PCIe-controller-driver.patch
 create mode 100644 
target/linux/ipq806x/patches-4.0/112-ARM-dts-qcom-add-pcie-nodes-to-ipq806x-platforms.patch
 create mode 100644 
target/linux/ipq806x/patches-4.0/113-ARM-qcom-automatically-select-PCI_DOMAINS-if-PCI-is-.patch

diff --git a/target/linux/ipq806x/config-3.18 b/target/linux/ipq806x/config-3.18
index 8de4cb4..32f4b67 100644
--- a/target/linux/ipq806x/config-3.18
+++ b/target/linux/ipq806x/config-3.18
@@ -257,6 +257,11 @@ CONFIG_OLD_SIGSUSPEND3=y
 CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_PAGE_OFFSET=0xC000
 CONFIG_PCI=y
+CONFIG_PCIEAER=y
+CONFIG_PCIEPORTBUS=y
+CONFIG_PCIE_DW=y
+CONFIG_PCIE_QCOM=y
+CONFIG_PCI_DOMAINS=y
 CONFIG_PCI_MSI=y
 CONFIG_PERF_EVENTS=y
 CONFIG_PERF_USE_VMALLOC=y
@@ -294,6 +299,7 @@ CONFIG_QCOM_BAM_DMA=y
 CONFIG_QCOM_GSBI=y
 CONFIG_QCOM_SCM=y
 CONFIG_QCOM_WDT=y
+CONFIG_RAS=y
 # CONFIG_RCU_BOOST is not set
 CONFIG_RCU_CPU_STALL_TIMEOUT=21
 CONFIG_RCU_CPU_STALL_VERBOSE=y
diff --git a/target/linux/ipq806x/config-4.0 b/target/linux/ipq806x/config-4.0
index c7bbcd9..1786abb 100644
--- a/target/linux/ipq806x/config-4.0
+++ b/target/linux/ipq806x/config-4.0
@@ -266,7 +266,14 @@ CONFIG_OLD_SIGSUSPEND3=y
 CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_PAGE_OFFSET=0xC000
 CONFIG_PCI=y
-# CONFIG_PCI_DOMAINS_GENERIC is not set
+CONFIG_PCIEAER=y
+CONFIG_PCIEPORTBUS=y
+CONFIG_PCIE_DW=y
+CONFIG_PCIE_PME=y
+CONFIG_PCIE_QCOM=y
+CONFIG_PCI_DEBUG=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_PCI_DOMAINS_GENERIC=y
 CONFIG_PCI_MSI=y
 CONFIG_PERF_EVENTS=y
 CONFIG_PERF_USE_VMALLOC=y
@@ -306,6 +313,7 @@ CONFIG_QCOM_BAM_DMA=y
 CONFIG_QCOM_GSBI=y
 CONFIG_QCOM_SCM=y
 CONFIG_QCOM_WDT=y
+CONFIG_RAS=y
 # CONFIG_RCU_BOOST is not set
 CONFIG_RCU_CPU_STALL_TIMEOUT=21
 CONFIG_RCU_STALL_COMMON=y
diff --git 
a/target/linux/ipq806x/patches-3.18/110-DT-PCI-qcom-Document-PCIe-devicetree-bindings.patch
 
b/target/linux/ipq806x/patches-3.18/110-DT-PCI-qcom-Document-PCIe-devicetree-bindings.patch
new file mode 100644
index 000..95398e0
--- /dev/null
+++ 
b/target/linux/ipq806x/patches-3.18/110-DT-PCI-qcom-Document-PCIe-devicetree-bindings.patch
@@ -0,0 +1,266 @@
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+Subject: [v2,3/5] DT: PCI: qcom: Document PCIe devicetree bindings
+From: Stanimir Varbanov 
+X-Patchwork-Id: 6326181
+Message-Id: <1430743338-10441-4-git-send-email-svarba...@mm-sol.com>
+To: Rob Herring , Kumar Gala ,
+   Mark Rutland ,
+   Grant Likely ,
+   Bjorn Helgaas ,
+   Kishon Vijay Abraham I ,
+   Russell King , Arnd Bergmann 
+Cc: linux-arm-...@vger.kernel.org, linux-ker...@vger.kernel.org,
+   linux-arm-ker...@lists.infradead.org, devicet...@vger.kernel.org,
+   linux-...@vger.kernel.org, Mathieu Olivari ,
+   Srinivas Kandagatla ,
+   Stanimir Varbanov 
+Date: Mon,  4 May 2015 15:42:16 +0300
+
+Document Qualcomm PCIe driver devicetree bindings.
+
+Signed-off-by: Stanimir Varbanov 
+
+---
+.../devicetree/bindings/pci/qcom,pcie.txt  |  231 
+ 1 files changed, 231 insertions(+), 0 deletions(-)
+ create mode 100644 Docu

[OpenWrt-Devel] [Patch V2 2/2] ipq806x: add support for zImage kernel

2015-05-04 Thread Mathieu Olivari
This change enable zImage+appended dtb support in ipq806x kernel
options. The zImage will now be generated as part of the kernel
binaries. Platforms which do not have DT support enabled in U-boot
can now make use of it by generating zImage files and appending dtb
to it.

It is not used yet but it is done as a stepping stone for early IPQ806x
platforms, which did not include DT support in U-boot.

Signed-off-by: Mathieu Olivari 
---

Notes:
v2:
 Addressing jogo comments about DTB compat. Current platforms set
 the console bootargs to an incorrect value in the bootloader. So
 we'll disable these options in order to get them from the chosen node
 and have a kernel boot 100% isolated from the bootloader.
 We also disable CONFIG_ATAGS, as we don't need it.

 Disables the following configs:
 *CONFIG_ARM_ATAG_DTB_COMPAT
 *CONFIG_ATAGS

 target/linux/ipq806x/Makefile| 2 +-
 target/linux/ipq806x/config-3.18 | 3 ++-
 target/linux/ipq806x/config-4.0  | 3 ++-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/target/linux/ipq806x/Makefile b/target/linux/ipq806x/Makefile
index 1512b30..f97db74 100644
--- a/target/linux/ipq806x/Makefile
+++ b/target/linux/ipq806x/Makefile
@@ -11,7 +11,7 @@ MAINTAINER:=John Crispin 
 
 KERNEL_PATCHVER:=3.18
 
-KERNELNAME:=Image dtbs
+KERNELNAME:=zImage Image dtbs
 
 include $(INCLUDE_DIR)/target.mk
 DEFAULT_PACKAGES += \
diff --git a/target/linux/ipq806x/config-3.18 b/target/linux/ipq806x/config-3.18
index 8de4cb4..48a7374 100644
--- a/target/linux/ipq806x/config-3.18
+++ b/target/linux/ipq806x/config-3.18
@@ -33,8 +33,10 @@ CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
 CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
 CONFIG_ARM=y
 CONFIG_ARM_AMBA=y
+CONFIG_ARM_APPENDED_DTB=y
 CONFIG_ARM_ARCH_TIMER=y
 CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y
+# CONFIG_ARM_ATAG_DTB_COMPAT is not set
 CONFIG_ARM_CPU_SUSPEND=y
 CONFIG_ARM_GIC=y
 CONFIG_ARM_HAS_SG_CHAIN=y
@@ -48,7 +50,6 @@ CONFIG_ARM_THUMB=y
 CONFIG_ARM_UNWIND=y
 CONFIG_ARM_VIRT_EXT=y
 CONFIG_AT803X_PHY=y
-CONFIG_AUTO_ZRELADDR=y
 # CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
 CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
 CONFIG_BOUNCE=y
diff --git a/target/linux/ipq806x/config-4.0 b/target/linux/ipq806x/config-4.0
index c7bbcd9..9d8ff65 100644
--- a/target/linux/ipq806x/config-4.0
+++ b/target/linux/ipq806x/config-4.0
@@ -34,8 +34,10 @@ CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
 CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
 CONFIG_ARM=y
 CONFIG_ARM_AMBA=y
+CONFIG_ARM_APPENDED_DTB=y
 CONFIG_ARM_ARCH_TIMER=y
 CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y
+# CONFIG_ARM_ATAG_DTB_COMPAT is not set
 CONFIG_ARM_CPU_SUSPEND=y
 CONFIG_ARM_GIC=y
 CONFIG_ARM_HAS_SG_CHAIN=y
@@ -50,7 +52,6 @@ CONFIG_ARM_THUMB=y
 CONFIG_ARM_UNWIND=y
 CONFIG_ARM_VIRT_EXT=y
 CONFIG_AT803X_PHY=y
-CONFIG_AUTO_ZRELADDR=y
 # CONFIG_BATTERY_GAUGE_LTC2941 is not set
 # CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
 CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [Patch V2 1/2] ipq806x: fix boot freeze on zImage kernel

2015-05-04 Thread Mathieu Olivari
ARCH_QCOM is using the ARCH_MULTIPLATFORM option, as now recommended
on most ARM architectures. This automatically calculate ZRELADDR by
masking PHYS_OFFSET with 0xf800.

On IPQ806x though, the first ~20MB of RAM is reserved for the hardware.
In newer bootloader, when DT is used, this is not a problem, we just
reserve this memory in the device tree. But if the bootloader doesn't
have DT support, then ATAGS have to be used. In this case, the ARM
decompressor will position the kernel in this low mem, which will not be
in the RAM section mapped by the bootloader, which means the kernel will
freeze in the middle of the boot process trying to map the memory.

As a work around, this patch allows disabling AUTO_ZRELADDR when
ARCH_QCOM is selected. It makes the zImage usage possible on bootloaders
which don't support device-tree, which is the case on certain early
IPQ806x based designs.

Signed-off-by: Mathieu Olivari 
---

Notes:
v2:
 *add the patch for kernel 4.0

 .../300-arch-arm-force-ZRELADDR-on-arch-qcom.patch | 72 ++
 .../300-arch-arm-force-ZRELADDR-on-arch-qcom.patch | 72 ++
 2 files changed, 144 insertions(+)
 create mode 100644 
target/linux/ipq806x/patches-3.18/300-arch-arm-force-ZRELADDR-on-arch-qcom.patch
 create mode 100644 
target/linux/ipq806x/patches-4.0/300-arch-arm-force-ZRELADDR-on-arch-qcom.patch

diff --git 
a/target/linux/ipq806x/patches-3.18/300-arch-arm-force-ZRELADDR-on-arch-qcom.patch
 
b/target/linux/ipq806x/patches-3.18/300-arch-arm-force-ZRELADDR-on-arch-qcom.patch
new file mode 100644
index 000..82170cd
--- /dev/null
+++ 
b/target/linux/ipq806x/patches-3.18/300-arch-arm-force-ZRELADDR-on-arch-qcom.patch
@@ -0,0 +1,72 @@
+From b12e230f09d4481424e6a5d7e2ae566b6954e83f Mon Sep 17 00:00:00 2001
+From: Mathieu Olivari 
+Date: Wed, 29 Apr 2015 15:21:46 -0700
+Subject: [PATCH] HACK: arch: arm: force ZRELADDR on arch-qcom
+
+ARCH_QCOM is using the ARCH_MULTIPLATFORM option, as now recommended
+on most ARM architectures. This automatically calculate ZRELADDR by
+masking PHYS_OFFSET with 0xf800.
+
+However, on IPQ806x, the first ~20MB of RAM is reserved for the hardware
+network accelerators, and the bootloader removes this section from the
+layout passed from the ATAGS (when used).
+
+For newer bootloader, when DT is used, this is not a problem, we just
+reserve this memory in the device tree. But if the bootloader doesn't
+have DT support, then ATAGS have to be used. In this case, the ARM
+decompressor will position the kernel in this low mem, which will not be
+in the RAM section mapped by the bootloader, which means the kernel will
+freeze in the middle of the boot process trying to map the memory.
+
+As a work around, this patch allows disabling AUTO_ZRELADDR when
+ARCH_QCOM is selected. It makes the zImage usage possible on bootloaders
+which don't support device-tree, which is the case on certain early
+IPQ806x based designs.
+
+Signed-off-by: Mathieu Olivari 
+---
+ arch/arm/Kconfig | 2 +-
+ arch/arm/Makefile| 2 ++
+ arch/arm/mach-qcom/Makefile.boot | 1 +
+ 3 files changed, 4 insertions(+), 1 deletion(-)
+ create mode 100644 arch/arm/mach-qcom/Makefile.boot
+
+diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
+index 89c4b5c..4583ea5 100644
+--- a/arch/arm/Kconfig
 b/arch/arm/Kconfig
+@@ -311,7 +311,7 @@ config ARCH_MULTIPLATFORM
+   select ARCH_WANT_OPTIONAL_GPIOLIB
+   select ARM_HAS_SG_CHAIN
+   select ARM_PATCH_PHYS_VIRT
+-  select AUTO_ZRELADDR
++  select AUTO_ZRELADDR if !ARCH_QCOM
+   select CLKSRC_OF
+   select COMMON_CLK
+   select GENERIC_CLOCKEVENTS
+diff --git a/arch/arm/Makefile b/arch/arm/Makefile
+index 7453352..5d6f8ac 100644
+--- a/arch/arm/Makefile
 b/arch/arm/Makefile
+@@ -240,9 +240,11 @@ MACHINE  := arch/arm/mach-$(word 1,$(machine-y))/
+ else
+ MACHINE  :=
+ endif
++ifeq ($(CONFIG_ARCH_QCOM),)
+ ifeq ($(CONFIG_ARCH_MULTIPLATFORM),y)
+ MACHINE  :=
+ endif
++endif
+ 
+ machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y))
+ platdirs := $(patsubst %,arch/arm/plat-%/,$(sort $(plat-y)))
+diff --git a/arch/arm/mach-qcom/Makefile.boot 
b/arch/arm/mach-qcom/Makefile.boot
+new file mode 100644
+index 000..67a6d5a
+--- /dev/null
 b/arch/arm/mach-qcom/Makefile.boot
+@@ -0,0 +1 @@
++zreladdr-y+= 0x42208000
+-- 
+1.9.1
+
diff --git 
a/target/linux/ipq806x/patches-4.0/300-arch-arm-force-ZRELADDR-on-arch-qcom.patch
 
b/target/linux/ipq806x/patches-4.0/300-arch-arm-force-ZRELADDR-on-arch-qcom.patch
new file mode 100644
index 000..82170cd
--- /dev/null
+++ 
b/target/linux/ipq806x/patches-4.0/300-arch-arm-force-ZRELADDR-on-arch-qcom.patch
@@ -0,0 +1,72 @@
+From b12e230f09d4481424e6a5d7e2ae566b6954e83f Mon Sep 17 00:00:00 2001
+From: Mathieu Olivari 
+Date: Wed, 29 Apr 2015 15:21:46 -0700
+Subject: [PATCH] HACK: arch: arm: force ZRELADDR on arch-qcom
+
+ARCH_QCOM is using the ARCH_MULTIPLATFORM option, as now reco

[OpenWrt-Devel] [PATCH 1/2] ipq806x: fix boot freeze on zImage kernel

2015-04-30 Thread Mathieu Olivari
ARCH_QCOM is using the ARCH_MULTIPLATFORM option, as now recommended
on most ARM architectures. This automatically calculate ZRELADDR by
masking PHYS_OFFSET with 0xf800.

On IPQ806x though, the first ~20MB of RAM is reserved for the hardware.
In newer bootloader, when DT is used, this is not a problem, we just
reserve this memory in the device tree. But if the bootloader doesn't
have DT support, then ATAGS have to be used. In this case, the ARM
decompressor will position the kernel in this low mem, which will not be
in the RAM section mapped by the bootloader, which means the kernel will
freeze in the middle of the boot process trying to map the memory.

As a work around, this patch allows disabling AUTO_ZRELADDR when
ARCH_QCOM is selected. It makes the zImage usage possible on bootloaders
which don't support device-tree, which is the case on certain early
IPQ806x based designs.

Signed-off-by: Mathieu Olivari 
---
 .../300-arch-arm-force-ZRELADDR-on-arch-qcom.patch | 72 ++
 1 file changed, 72 insertions(+)
 create mode 100644 
target/linux/ipq806x/patches-3.18/300-arch-arm-force-ZRELADDR-on-arch-qcom.patch

diff --git 
a/target/linux/ipq806x/patches-3.18/300-arch-arm-force-ZRELADDR-on-arch-qcom.patch
 
b/target/linux/ipq806x/patches-3.18/300-arch-arm-force-ZRELADDR-on-arch-qcom.patch
new file mode 100644
index 000..82170cd
--- /dev/null
+++ 
b/target/linux/ipq806x/patches-3.18/300-arch-arm-force-ZRELADDR-on-arch-qcom.patch
@@ -0,0 +1,72 @@
+From b12e230f09d4481424e6a5d7e2ae566b6954e83f Mon Sep 17 00:00:00 2001
+From: Mathieu Olivari 
+Date: Wed, 29 Apr 2015 15:21:46 -0700
+Subject: [PATCH] HACK: arch: arm: force ZRELADDR on arch-qcom
+
+ARCH_QCOM is using the ARCH_MULTIPLATFORM option, as now recommended
+on most ARM architectures. This automatically calculate ZRELADDR by
+masking PHYS_OFFSET with 0xf800.
+
+However, on IPQ806x, the first ~20MB of RAM is reserved for the hardware
+network accelerators, and the bootloader removes this section from the
+layout passed from the ATAGS (when used).
+
+For newer bootloader, when DT is used, this is not a problem, we just
+reserve this memory in the device tree. But if the bootloader doesn't
+have DT support, then ATAGS have to be used. In this case, the ARM
+decompressor will position the kernel in this low mem, which will not be
+in the RAM section mapped by the bootloader, which means the kernel will
+freeze in the middle of the boot process trying to map the memory.
+
+As a work around, this patch allows disabling AUTO_ZRELADDR when
+ARCH_QCOM is selected. It makes the zImage usage possible on bootloaders
+which don't support device-tree, which is the case on certain early
+IPQ806x based designs.
+
+Signed-off-by: Mathieu Olivari 
+---
+ arch/arm/Kconfig | 2 +-
+ arch/arm/Makefile| 2 ++
+ arch/arm/mach-qcom/Makefile.boot | 1 +
+ 3 files changed, 4 insertions(+), 1 deletion(-)
+ create mode 100644 arch/arm/mach-qcom/Makefile.boot
+
+diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
+index 89c4b5c..4583ea5 100644
+--- a/arch/arm/Kconfig
 b/arch/arm/Kconfig
+@@ -311,7 +311,7 @@ config ARCH_MULTIPLATFORM
+   select ARCH_WANT_OPTIONAL_GPIOLIB
+   select ARM_HAS_SG_CHAIN
+   select ARM_PATCH_PHYS_VIRT
+-  select AUTO_ZRELADDR
++  select AUTO_ZRELADDR if !ARCH_QCOM
+   select CLKSRC_OF
+   select COMMON_CLK
+   select GENERIC_CLOCKEVENTS
+diff --git a/arch/arm/Makefile b/arch/arm/Makefile
+index 7453352..5d6f8ac 100644
+--- a/arch/arm/Makefile
 b/arch/arm/Makefile
+@@ -240,9 +240,11 @@ MACHINE  := arch/arm/mach-$(word 1,$(machine-y))/
+ else
+ MACHINE  :=
+ endif
++ifeq ($(CONFIG_ARCH_QCOM),)
+ ifeq ($(CONFIG_ARCH_MULTIPLATFORM),y)
+ MACHINE  :=
+ endif
++endif
+ 
+ machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y))
+ platdirs := $(patsubst %,arch/arm/plat-%/,$(sort $(plat-y)))
+diff --git a/arch/arm/mach-qcom/Makefile.boot 
b/arch/arm/mach-qcom/Makefile.boot
+new file mode 100644
+index 000..67a6d5a
+--- /dev/null
 b/arch/arm/mach-qcom/Makefile.boot
+@@ -0,0 +1 @@
++zreladdr-y+= 0x42208000
+-- 
+1.9.1
+
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/2] ipq806x: add support for zImage kernel

2015-04-30 Thread Mathieu Olivari
This change enable ATAGS support in ipq806x kernel options, and generate
the zImage as part of the kernel binaries.

Signed-off-by: Mathieu Olivari 
---
 target/linux/ipq806x/Makefile  |  2 +-
 target/linux/ipq806x/config-3.18   |  7 ++-
 target/linux/ipq806x/config-4.0|  8 ++-
 .../300-arch-arm-force-ZRELADDR-on-arch-qcom.patch | 72 ++
 4 files changed, 84 insertions(+), 5 deletions(-)
 create mode 100644 
target/linux/ipq806x/patches-4.0/300-arch-arm-force-ZRELADDR-on-arch-qcom.patch

diff --git a/target/linux/ipq806x/Makefile b/target/linux/ipq806x/Makefile
index 1512b30..f97db74 100644
--- a/target/linux/ipq806x/Makefile
+++ b/target/linux/ipq806x/Makefile
@@ -11,7 +11,7 @@ MAINTAINER:=John Crispin 
 
 KERNEL_PATCHVER:=3.18
 
-KERNELNAME:=Image dtbs
+KERNELNAME:=zImage Image dtbs
 
 include $(INCLUDE_DIR)/target.mk
 DEFAULT_PACKAGES += \
diff --git a/target/linux/ipq806x/config-3.18 b/target/linux/ipq806x/config-3.18
index 8de4cb4..219e2c7 100644
--- a/target/linux/ipq806x/config-3.18
+++ b/target/linux/ipq806x/config-3.18
@@ -33,8 +33,12 @@ CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
 CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
 CONFIG_ARM=y
 CONFIG_ARM_AMBA=y
+CONFIG_ARM_APPENDED_DTB=y
 CONFIG_ARM_ARCH_TIMER=y
 CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y
+CONFIG_ARM_ATAG_DTB_COMPAT=y
+# CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND is not set
+CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y
 CONFIG_ARM_CPU_SUSPEND=y
 CONFIG_ARM_GIC=y
 CONFIG_ARM_HAS_SG_CHAIN=y
@@ -48,7 +52,7 @@ CONFIG_ARM_THUMB=y
 CONFIG_ARM_UNWIND=y
 CONFIG_ARM_VIRT_EXT=y
 CONFIG_AT803X_PHY=y
-CONFIG_AUTO_ZRELADDR=y
+CONFIG_ATAGS=y
 # CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
 CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
 CONFIG_BOUNCE=y
@@ -92,6 +96,7 @@ CONFIG_DEBUG_BUGVERBOSE=y
 CONFIG_DEBUG_GPIO=y
 CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
 CONFIG_DEBUG_PREEMPT=y
+# CONFIG_DEBUG_QCOM_UARTDM is not set
 # CONFIG_DEBUG_UART_8250 is not set
 # CONFIG_DEBUG_UART_PL01X is not set
 # CONFIG_DEBUG_USER is not set
diff --git a/target/linux/ipq806x/config-4.0 b/target/linux/ipq806x/config-4.0
index c7bbcd9..7136424 100644
--- a/target/linux/ipq806x/config-4.0
+++ b/target/linux/ipq806x/config-4.0
@@ -34,8 +34,12 @@ CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
 CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
 CONFIG_ARM=y
 CONFIG_ARM_AMBA=y
+CONFIG_ARM_APPENDED_DTB=y
 CONFIG_ARM_ARCH_TIMER=y
 CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y
+CONFIG_ARM_ATAG_DTB_COMPAT=y
+# CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND is not set
+CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y
 CONFIG_ARM_CPU_SUSPEND=y
 CONFIG_ARM_GIC=y
 CONFIG_ARM_HAS_SG_CHAIN=y
@@ -50,8 +54,7 @@ CONFIG_ARM_THUMB=y
 CONFIG_ARM_UNWIND=y
 CONFIG_ARM_VIRT_EXT=y
 CONFIG_AT803X_PHY=y
-CONFIG_AUTO_ZRELADDR=y
-# CONFIG_BATTERY_GAUGE_LTC2941 is not set
+CONFIG_ATAGS=y
 # CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
 CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
 CONFIG_BOUNCE=y
@@ -348,7 +351,6 @@ CONFIG_SWCONFIG=y
 CONFIG_SWIOTLB=y
 CONFIG_SWP_EMULATE=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
-# CONFIG_TEGRA_AHB is not set
 CONFIG_THERMAL=y
 # CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set
 CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
diff --git 
a/target/linux/ipq806x/patches-4.0/300-arch-arm-force-ZRELADDR-on-arch-qcom.patch
 
b/target/linux/ipq806x/patches-4.0/300-arch-arm-force-ZRELADDR-on-arch-qcom.patch
new file mode 100644
index 000..82170cd
--- /dev/null
+++ 
b/target/linux/ipq806x/patches-4.0/300-arch-arm-force-ZRELADDR-on-arch-qcom.patch
@@ -0,0 +1,72 @@
+From b12e230f09d4481424e6a5d7e2ae566b6954e83f Mon Sep 17 00:00:00 2001
+From: Mathieu Olivari 
+Date: Wed, 29 Apr 2015 15:21:46 -0700
+Subject: [PATCH] HACK: arch: arm: force ZRELADDR on arch-qcom
+
+ARCH_QCOM is using the ARCH_MULTIPLATFORM option, as now recommended
+on most ARM architectures. This automatically calculate ZRELADDR by
+masking PHYS_OFFSET with 0xf800.
+
+However, on IPQ806x, the first ~20MB of RAM is reserved for the hardware
+network accelerators, and the bootloader removes this section from the
+layout passed from the ATAGS (when used).
+
+For newer bootloader, when DT is used, this is not a problem, we just
+reserve this memory in the device tree. But if the bootloader doesn't
+have DT support, then ATAGS have to be used. In this case, the ARM
+decompressor will position the kernel in this low mem, which will not be
+in the RAM section mapped by the bootloader, which means the kernel will
+freeze in the middle of the boot process trying to map the memory.
+
+As a work around, this patch allows disabling AUTO_ZRELADDR when
+ARCH_QCOM is selected. It makes the zImage usage possible on bootloaders
+which don't support device-tree, which is the case on certain early
+IPQ806x based designs.
+
+Signed-off-by: Mathieu Olivari 
+---
+ arch/arm/Kconfig | 2 +-
+ arch/arm/Makefile| 2 ++
+ arch/arm/mach-qcom/Makefile.boot | 1 +

[OpenWrt-Devel] [PATCH 2/2] include: make dtb argument optional in MkFIT

2015-04-30 Thread Mathieu Olivari
As mkits.sh makes the -d argument optional, we'll make this same
argument optional in the MkFIT function as well.

With this change, MkFIT can be used both to generate FIT images with DT,
and without DT.

Signed-off-by: Mathieu Olivari 
---
 include/image.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/image.mk b/include/image.mk
index 788d593..a6237ff 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -121,7 +121,7 @@ endef
 
 define Image/BuildKernel/MkFIT
$(TOPDIR)/scripts/mkits.sh \
-   -D $(1) -o $(KDIR)/fit-$(1).its -k $(2) -d $(3) -C $(4) -a $(5) 
-e $(6) \
+   -D $(1) -o $(KDIR)/fit-$(1).its -k $(2) $(if $(3),-d $(3)) -C 
$(4) -a $(5) -e $(6) \
-A $(ARCH) -v $(LINUX_VERSION)
PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $(KDIR)/fit-$(1).its 
$(KDIR)/fit-$(1)$(7).itb
 endef
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/2] build: make device-tree arg optional in mkits.sh

2015-04-30 Thread Mathieu Olivari
mkits.sh help currently shows dtb file as optional, but generates an
invalid its file when this option is unspecified.

We're fixing this problem by removing the use of the sed command and
just including variables instead.

Signed-off-by: Mathieu Olivari 
---
 scripts/mkits.sh | 40 +---
 1 file changed, 21 insertions(+), 19 deletions(-)

diff --git a/scripts/mkits.sh b/scripts/mkits.sh
index c360c73..6b5100e 100755
--- a/scripts/mkits.sh
+++ b/scripts/mkits.sh
@@ -55,6 +55,25 @@ fi
 
 ARCH_UPPER=`echo $ARCH | tr '[:lower:]' '[:upper:]'`
 
+# Conditionally create fdt information
+if [ -n "${DTB}" ]; then
+   FDT="
+   fdt@1 {
+   description = \"${ARCH_UPPER} OpenWrt ${DEVICE} device 
tree blob\";
+   data = /incbin/(\"${DTB}\");
+   type = \"flat_dt\";
+   arch = \"${ARCH}\";
+   compression = \"none\";
+   hash@1 {
+   algo = \"crc32\";
+   };
+   hash@2 {
+   algo = \"sha1\";
+   };
+   };
+"
+fi
+
 # Create a default, fully populated DTS file
 DATA="/dts-v1/;
 
@@ -80,19 +99,8 @@ DATA="/dts-v1/;
};
};
 
-   fdt@1 {
-   description = \"${ARCH_UPPER} OpenWrt ${DEVICE} device 
tree blob\";
-   data = /incbin/(\"${DTB}\");
-   type = \"flat_dt\";
-   arch = \"${ARCH}\";
-   compression = \"none\";
-   hash@1 {
-   algo = \"crc32\";
-   };
-   hash@2 {
-   algo = \"sha1\";
-   };
-   };
+${FDT}
+
};
 
configurations {
@@ -105,11 +113,5 @@ DATA="/dts-v1/;
};
 };"
 
-# Conditionally strip fdt information out of tree
-if [ -z "${DTB}" ]; then
-   DATA=`echo "$DATA" | sed '/start fdt/,/end fdt/d'`
-   DATA=`echo "$DATA" | sed '/fdt/d'`
-fi
-
 # Write .its file to disk
 echo "$DATA" > ${OUTPUT}
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] generic: add CRYPTO_DEV_QCE option to default config

2015-04-30 Thread Mathieu Olivari
This option has been added in kernel 3.17. It shows-up only when both
ARCH_QCOM and CRYPTO are enabled. So we'll disable these two by default
to avoid stalling the build when these conditions are met.

Signed-off-by: Mathieu Olivari 
---
 target/linux/generic/config-3.18 | 1 +
 target/linux/generic/config-4.0  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/target/linux/generic/config-3.18 b/target/linux/generic/config-3.18
index 8cc909f..13e172f 100644
--- a/target/linux/generic/config-3.18
+++ b/target/linux/generic/config-3.18
@@ -727,6 +727,7 @@ CONFIG_CRYPTO_ALGAPI2=y
 # CONFIG_CRYPTO_DEV_HIFN_795X is not set
 # CONFIG_CRYPTO_DEV_MV_CESA is not set
 # CONFIG_CRYPTO_DEV_QAT_DH895xCC is not set
+# CONFIG_CRYPTO_DEV_QCE is not set
 # CONFIG_CRYPTO_DEV_SAHARA is not set
 # CONFIG_CRYPTO_DEV_TALITOS is not set
 # CONFIG_CRYPTO_DRBG_MENU is not set
diff --git a/target/linux/generic/config-4.0 b/target/linux/generic/config-4.0
index b5c952e..c3bb7fc 100644
--- a/target/linux/generic/config-4.0
+++ b/target/linux/generic/config-4.0
@@ -737,6 +737,7 @@ CONFIG_CRYPTO_ALGAPI2=y
 # CONFIG_CRYPTO_DEV_HIFN_795X is not set
 # CONFIG_CRYPTO_DEV_MV_CESA is not set
 # CONFIG_CRYPTO_DEV_QAT_DH895xCC is not set
+# CONFIG_CRYPTO_DEV_QCE is not set
 # CONFIG_CRYPTO_DEV_SAHARA is not set
 # CONFIG_CRYPTO_DEV_TALITOS is not set
 # CONFIG_CRYPTO_DRBG_MENU is not set
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] build: don't call prereq for any package/symlinks rules

2015-04-28 Thread Mathieu Olivari
make package/symlinks can be used as an alternative to the ./scripts/feeds
command to update & install all feeds available in feeds.conf

Here is the code from the top Makefile:
# update all feeds, re-create index files, install symlinks
package/symlinks:
$(SCRIPT_DIR)/feeds update -a
$(SCRIPT_DIR)/feeds install -a

# re-create index files, install symlinks
package/symlinks-install:
$(SCRIPT_DIR)/feeds update -i
$(SCRIPT_DIR)/feeds install -a

# remove all symlinks, don't touch ./feeds
package/symlinks-clean:
$(SCRIPT_DIR)/feeds uninstall -a

Thanks,
Mathieu

-Original Message-
From: 'Toerless Eckert' [mailto:t...@cs.fau.de] 
Sent: Monday, April 27, 2015 6:46 PM
To: Mathieu Olivari
Cc: 'Mathieu Olivari'; openwrt-devel@lists.openwrt.org
Subject: Re: [OpenWrt-Devel] [PATCH] build: don't call prereq for any
package/symlinks rules

So if "make package/symlinks" is optional, when is it needed ?

Sorry for the beginner q.

On Mon, Apr 27, 2015 at 05:15:36PM -0700, Mathieu Olivari wrote:
> I'm actually talking about the command below:
> $ make package/symlinks
> 
> Right after the git clone, it does open the menuconfig. Which ends-up 
> in generating a .config, which has to be deleted anyway as any package 
> from feed would get removed.
> 
> Thanks,
> Mathieu
> 
> -Original Message-
> From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org] 
> On Behalf Of Toerless Eckert
> Sent: Monday, April 27, 2015 4:59 PM
> To: Mathieu Olivari
> Cc: openwrt-devel@lists.openwrt.org
> Subject: Re: [OpenWrt-Devel] [PATCH] build: don't call prereq for any 
> package/symlinks rules
> 
> 
> Mathieu:
> 
> I can't quite follow your explanations. I ahve been building what 
> looks to me perfectly well working 14.07 images by just doing:
> 
> git clone git://git.openwrt.org/openwrt.git cd openwrt # Clean 
> workspace now
> 
> cp real.config .config
> make defconfig
> make
> 
> Your mail seems to indicate that that supposedly does not work. Can 
> you please tell me what exactly is breaking when i do that ?
> 
> Thanks
> Toerless
> 
> On Mon, Apr 27, 2015 at 04:46:49PM -0700, Mathieu Olivari wrote:
> > Most of the time, we want to make sure OpenWrt has been configured 
> > and setup before start running make. However, in case of 
> > package/symlinks, forcing prereq as a dependency creates multiple
issues:
> > *when executed on a clean workspace, it will prompt for user input 
> > and open a menuconfig window before executing the feeds command *the 
> > only way around that is to provide a .config. However, the "prereq"
> >  target would then run a "make defconfig", which will remove all the 
> > packages in the .config but from external feeds, as feeds have not 
> > been  installed yet.
> > 
> > The only way to currently work around this, is to generate a fake 
> > config by running "make defconfig", then "make package/symlinks", 
> > copy the real config (which at this point disregards the previously 
> > generated config), and run make defconfig again. Something like this:
> > 
> > make defconfig
> > make package/symlinks
> > cp real.config .config
> > make defconfig
> > 
> > This change is removing the need for the first defconfig, making the 
> > process more logical for OpenWrt users using the package/symlinks
target.
> > 
> > Signed-off-by: Mathieu Olivari 
> > ---
> >  include/toplevel.mk | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/include/toplevel.mk b/include/toplevel.mk index 
> > d8651d9..b3b344d 100644
> > --- a/include/toplevel.mk
> > +++ b/include/toplevel.mk
> > @@ -178,6 +178,7 @@ ifeq ($(SDK),1)
> >  else
> >  
> >  %::
> > +ifeq ($(filter package/symlinks%,$(MAKECMDGOALS)),)
> > @+$(PREP_MK) $(NO_TRACE_MAKE) -r -s prereq
> > @( \
> > cp .config tmp/.config; \
> > @@ -186,6 +187,7 @@ else
> > printf "$(_R)WARNING: your configuration is out of
> sync. Please run make menuconfig, oldconfig or defconfig!$(_N)\n" >&2; 
> \
> > fi \
> > )
> > +endif
> > @+$(ULIMIT_FIX) $(SUBMAKE) -r $@ $(if $(WARN_PARALLEL_ERROR), || {
\
> > printf "$(_R)Build failed - please re-run with -j1 to see
> the real error message$(_N)\n" >&2; \
> > false; \
> > --
> > 1.9.1
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

--
---
toerless.eck...@informatik.uni-erlangen.de
/C=de/A=d400/P=uni-erlangen/OU=informatik/S=Eckert/G=Toerless/
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] build: don't call prereq for any package/symlinks rules

2015-04-27 Thread Mathieu Olivari
I'm actually talking about the command below:
$ make package/symlinks

Right after the git clone, it does open the menuconfig. Which ends-up in
generating a .config, which has to be deleted anyway as any package from
feed would get removed.

Thanks,
Mathieu

-Original Message-
From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org] On
Behalf Of Toerless Eckert
Sent: Monday, April 27, 2015 4:59 PM
To: Mathieu Olivari
Cc: openwrt-devel@lists.openwrt.org
Subject: Re: [OpenWrt-Devel] [PATCH] build: don't call prereq for any
package/symlinks rules


Mathieu:

I can't quite follow your explanations. I ahve been building what looks to
me perfectly well working 14.07 images by just doing:

git clone git://git.openwrt.org/openwrt.git cd openwrt # Clean workspace now

cp real.config .config
make defconfig
make

Your mail seems to indicate that that supposedly does not work. Can you
please tell me what exactly is breaking when i do that ?

Thanks
Toerless

On Mon, Apr 27, 2015 at 04:46:49PM -0700, Mathieu Olivari wrote:
> Most of the time, we want to make sure OpenWrt has been configured and 
> setup before start running make. However, in case of package/symlinks, 
> forcing prereq as a dependency creates multiple issues:
> *when executed on a clean workspace, it will prompt for user input  
> and open a menuconfig window before executing the feeds command *the 
> only way around that is to provide a .config. However, the "prereq"
>  target would then run a "make defconfig", which will remove all the  
> packages in the .config but from external feeds, as feeds have not 
> been  installed yet.
> 
> The only way to currently work around this, is to generate a fake 
> config by running "make defconfig", then "make package/symlinks", copy 
> the real config (which at this point disregards the previously 
> generated config), and run make defconfig again. Something like this:
> 
> make defconfig
> make package/symlinks
> cp real.config .config
> make defconfig
> 
> This change is removing the need for the first defconfig, making the 
> process more logical for OpenWrt users using the package/symlinks target.
> 
> Signed-off-by: Mathieu Olivari 
> ---
>  include/toplevel.mk | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/include/toplevel.mk b/include/toplevel.mk index 
> d8651d9..b3b344d 100644
> --- a/include/toplevel.mk
> +++ b/include/toplevel.mk
> @@ -178,6 +178,7 @@ ifeq ($(SDK),1)
>  else
>  
>  %::
> +ifeq ($(filter package/symlinks%,$(MAKECMDGOALS)),)
>   @+$(PREP_MK) $(NO_TRACE_MAKE) -r -s prereq
>   @( \
>   cp .config tmp/.config; \
> @@ -186,6 +187,7 @@ else
>   printf "$(_R)WARNING: your configuration is out of
sync. Please run make menuconfig, oldconfig or defconfig!$(_N)\n" >&2; \
>   fi \
>   )
> +endif
>   @+$(ULIMIT_FIX) $(SUBMAKE) -r $@ $(if $(WARN_PARALLEL_ERROR), || { \
>   printf "$(_R)Build failed - please re-run with -j1 to see
the real error message$(_N)\n" >&2; \
>   false; \
> --
> 1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] build: don't call prereq for any package/symlinks rules

2015-04-27 Thread Mathieu Olivari
Most of the time, we want to make sure OpenWrt has been configured and
setup before start running make. However, in case of package/symlinks,
forcing prereq as a dependency creates multiple issues:
*when executed on a clean workspace, it will prompt for user input
 and open a menuconfig window before executing the feeds command
*the only way around that is to provide a .config. However, the "prereq"
 target would then run a "make defconfig", which will remove all the
 packages in the .config but from external feeds, as feeds have not been
 installed yet.

The only way to currently work around this, is to generate a fake config
by running "make defconfig", then "make package/symlinks", copy the real
config (which at this point disregards the previously generated config),
and run make defconfig again. Something like this:

make defconfig
make package/symlinks
cp real.config .config
make defconfig

This change is removing the need for the first defconfig, making the
process more logical for OpenWrt users using the package/symlinks target.

Signed-off-by: Mathieu Olivari 
---
 include/toplevel.mk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/toplevel.mk b/include/toplevel.mk
index d8651d9..b3b344d 100644
--- a/include/toplevel.mk
+++ b/include/toplevel.mk
@@ -178,6 +178,7 @@ ifeq ($(SDK),1)
 else
 
 %::
+ifeq ($(filter package/symlinks%,$(MAKECMDGOALS)),)
@+$(PREP_MK) $(NO_TRACE_MAKE) -r -s prereq
@( \
cp .config tmp/.config; \
@@ -186,6 +187,7 @@ else
printf "$(_R)WARNING: your configuration is out of 
sync. Please run make menuconfig, oldconfig or defconfig!$(_N)\n" >&2; \
fi \
)
+endif
@+$(ULIMIT_FIX) $(SUBMAKE) -r $@ $(if $(WARN_PARALLEL_ERROR), || { \
printf "$(_R)Build failed - please re-run with -j1 to see the 
real error message$(_N)\n" >&2; \
false; \
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/3] ipq806x: add db149 dts files

2015-04-20 Thread Mathieu Olivari
DB149 is an IPQ806x based development platform. This patch adds the dts
files to support it.

Signed-off-by: Mathieu Olivari 
---
 .../ipq806x/patches-3.18/022-add-db149-dts.patch   | 293 +
 .../ipq806x/patches-4.0/022-add-db149-dts.patch| 293 +
 2 files changed, 586 insertions(+)
 create mode 100644 target/linux/ipq806x/patches-3.18/022-add-db149-dts.patch
 create mode 100644 target/linux/ipq806x/patches-4.0/022-add-db149-dts.patch

diff --git a/target/linux/ipq806x/patches-3.18/022-add-db149-dts.patch 
b/target/linux/ipq806x/patches-3.18/022-add-db149-dts.patch
new file mode 100644
index 000..9a036fb
--- /dev/null
+++ b/target/linux/ipq806x/patches-3.18/022-add-db149-dts.patch
@@ -0,0 +1,293 @@
+From a32d6e7c8fca6371a2614924b89981bc912b6378 Mon Sep 17 00:00:00 2001
+From: Mathieu Olivari 
+Date: Tue, 7 Apr 2015 19:58:58 -0700
+Subject: [PATCH] ARM: dts: qcom: add initial DB149 device-tree
+
+Add basic DB149 (IPQ806x based platform) device-tree. It supports UART,
+SATA, USB2, USB3 and NOR flash.
+
+Signed-off-by: Mathieu Olivari 
+---
+ arch/arm/boot/dts/Makefile   |   1 +
+ arch/arm/boot/dts/qcom-ipq8064-db149.dts | 257 +++
+ 2 files changed, 258 insertions(+)
+ create mode 100644 arch/arm/boot/dts/qcom-ipq8064-db149.dts
+
+diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
+index 38c89ca..745360a 100644
+--- a/arch/arm/boot/dts/Makefile
 b/arch/arm/boot/dts/Makefile
+@@ -360,6 +360,7 @@ dtb-$(CONFIG_ARCH_QCOM) += \
+   qcom-apq8084-ifc6540.dtb \
+   qcom-apq8084-mtp.dtb \
+   qcom-ipq8064-ap148.dtb \
++  qcom-ipq8064-db149.dtb \
+   qcom-msm8660-surf.dtb \
+   qcom-msm8960-cdp.dtb \
+   qcom-msm8974-sony-xperia-honami.dtb
+diff --git a/arch/arm/boot/dts/qcom-ipq8064-db149.dts 
b/arch/arm/boot/dts/qcom-ipq8064-db149.dts
+new file mode 100644
+index 000..224c54f
+--- /dev/null
 b/arch/arm/boot/dts/qcom-ipq8064-db149.dts
+@@ -0,0 +1,257 @@
++#include "qcom-ipq8064-v1.0.dtsi"
++
++/ {
++  model = "Qualcomm IPQ8064/DB149";
++  compatible = "qcom,ipq8064-db149", "qcom,ipq8064";
++
++  reserved-memory {
++  #address-cells = <1>;
++  #size-cells = <1>;
++  ranges;
++  rsvd@4120 {
++  reg = <0x4120 0x30>;
++  no-map;
++  };
++  };
++
++  alias {
++  serial0 = &uart2;
++  };
++
++  chosen {
++  linux,stdout-path = "serial0:115200n8";
++  };
++
++  aliases {
++  mdio-gpio0 = &mdio0;
++  };
++
++  soc {
++  pinmux@80 {
++  pinctrl-0 = <&mdio0_pins &rgmii0_pinmux>;
++  pinctrl-names = "default";
++
++  i2c4_pins: i2c4_pinmux {
++  pins = "gpio12", "gpio13";
++  function = "gsbi4";
++  bias-disable;
++  };
++
++  spi_pins: spi_pins {
++  mux {
++  pins = "gpio18", "gpio19", "gpio21";
++  function = "gsbi5";
++  drive-strength = <10>;
++  bias-none;
++  };
++  };
++
++  mdio0_pins: mdio0_pins {
++  mux {
++  pins = "gpio0", "gpio1";
++  function = "gpio";
++  drive-strength = <8>;
++  bias-disable;
++  };
++  };
++
++  rgmii0_pinmux: rgmii0_pinmux {
++  mux {
++  pins = "gpio2", "gpio66";
++  drive-strength = <8>;
++  bias-disable;
++  };
++  };
++  };
++
++  gsbi2: gsbi@1248 {
++  qcom,mode = ;
++  status = "ok";
++  uart2: serial@1249 {
++  status = "ok";
++  };
++  };
++
++  gsbi5: gsbi@1a20 {
++  qcom,mode = ;
++  status = "ok";
++
++  spi4: spi@1a28 {
++  status = "ok";
++

[OpenWrt-Devel] [PATCH 1/3] ipq806x: enable AT803x driver

2015-04-20 Thread Mathieu Olivari
Certain IPQ806x based platforms are making use of this PHY. So we'll
enable it so it gets detected as such.

Signed-off-by: Mathieu Olivari 
---
 target/linux/ipq806x/config-3.18 | 1 +
 target/linux/ipq806x/config-4.0  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/target/linux/ipq806x/config-3.18 b/target/linux/ipq806x/config-3.18
index 0fcb6f3..8de4cb4 100644
--- a/target/linux/ipq806x/config-3.18
+++ b/target/linux/ipq806x/config-3.18
@@ -47,6 +47,7 @@ CONFIG_ARM_THUMB=y
 # CONFIG_ARM_THUMBEE is not set
 CONFIG_ARM_UNWIND=y
 CONFIG_ARM_VIRT_EXT=y
+CONFIG_AT803X_PHY=y
 CONFIG_AUTO_ZRELADDR=y
 # CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
 CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
diff --git a/target/linux/ipq806x/config-4.0 b/target/linux/ipq806x/config-4.0
index 4d56106..c7bbcd9 100644
--- a/target/linux/ipq806x/config-4.0
+++ b/target/linux/ipq806x/config-4.0
@@ -49,6 +49,7 @@ CONFIG_ARM_THUMB=y
 # CONFIG_ARM_THUMBEE is not set
 CONFIG_ARM_UNWIND=y
 CONFIG_ARM_VIRT_EXT=y
+CONFIG_AT803X_PHY=y
 CONFIG_AUTO_ZRELADDR=y
 # CONFIG_BATTERY_GAUGE_LTC2941 is not set
 # CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/3] ipq806x: add db149 support to OpenWrt init scripts

2015-04-20 Thread Mathieu Olivari
DB149 is a IPQ8064 based platform. This patch adds the init scripts to
detect it, configure the network accordingly, and generate a flashable
image for it.

Signed-off-by: Mathieu Olivari 
---
 target/linux/ipq806x/base-files/etc/uci-defaults/network | 6 ++
 target/linux/ipq806x/base-files/lib/ipq806x.sh   | 3 +++
 target/linux/ipq806x/image/Makefile  | 1 +
 3 files changed, 10 insertions(+)

diff --git a/target/linux/ipq806x/base-files/etc/uci-defaults/network 
b/target/linux/ipq806x/base-files/etc/uci-defaults/network
index 34e9fe4..354cea9 100755
--- a/target/linux/ipq806x/base-files/etc/uci-defaults/network
+++ b/target/linux/ipq806x/base-files/etc/uci-defaults/network
@@ -22,6 +22,12 @@ ap148)
ucidef_add_switch_vlan "switch0" "1" "6 1 2 3 4"
ucidef_add_switch_vlan "switch0" "2" "0 5"
;;
+db149)
+   ucidef_set_interfaces_lan_wan "eth1 eth2 eth3" "eth0"
+   ucidef_add_switch "switch0" "1" "1"
+   ucidef_add_switch_vlan "switch0" "1" "6 1 2 3 4"
+   ucidef_add_switch_vlan "switch0" "2" "0 5"
+   ;;
 *)
echo "Unsupported hardware. Network interfaces not intialized"
;;
diff --git a/target/linux/ipq806x/base-files/lib/ipq806x.sh 
b/target/linux/ipq806x/base-files/lib/ipq806x.sh
index 7c47fa2..2790f3f 100644
--- a/target/linux/ipq806x/base-files/lib/ipq806x.sh
+++ b/target/linux/ipq806x/base-files/lib/ipq806x.sh
@@ -17,6 +17,9 @@ ipq806x_board_detect() {
*"AP148")
name="ap148"
;;
+   *"DB149")
+   name="db149"
+   ;;
esac
 
[ -z "$name" ] && name="unknown"
diff --git a/target/linux/ipq806x/image/Makefile 
b/target/linux/ipq806x/image/Makefile
index 77d191f..e2346e6 100644
--- a/target/linux/ipq806x/image/Makefile
+++ b/target/linux/ipq806x/image/Makefile
@@ -22,6 +22,7 @@ endef
 define Image/BuildKernel
$(CP) $(LINUX_DIR)/vmlinux $(BIN_DIR)/$(IMG_PREFIX)-vmlinux.elf
$(call Image/BuildKernel/FIT,qcom-ipq8064-ap148)
+   $(call Image/BuildKernel/FIT,qcom-ipq8064-db149)
 endef
 
 define Image/Build/squashfs
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 6/6] ipq806x: enable usb3 packages in default profile

2015-04-02 Thread Mathieu Olivari
Default profile already enables usb2 so we'll do the same for usb3 now
that we have support for it.

Signed-off-by: Mathieu Olivari 
---
 target/linux/ipq806x/profiles/default.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/target/linux/ipq806x/profiles/default.mk 
b/target/linux/ipq806x/profiles/default.mk
index ded0164..00e1611 100644
--- a/target/linux/ipq806x/profiles/default.mk
+++ b/target/linux/ipq806x/profiles/default.mk
@@ -9,7 +9,8 @@
 define Profile/Default
NAME:=Default Profile (minimum package set)
PACKAGES:= \
-   kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-ledtrig-usbdev
+   kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-ledtrig-usbdev \
+   kmod-usb3 kmod-usb-dwc3-qcom
 endef
 
 define Profile/Default/Description
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 5/6] ipq806x: add platform usb support

2015-04-02 Thread Mathieu Olivari
This change adds DWC3 QCOM USB phys and TCSR drivers. These are
cherry-picked from the following LKML threads:
*dwc3 qcom: https://lkml.org/lkml/2014/9/12/599
*tcsr: https://lkml.org/lkml/2015/2/9/579

We're also adding an additional patch to add the corresponding dev nodes
in the IPQ806x and AP148 dts files.

Signed-off-by: Mathieu Olivari 
---
 ...b-phy-Add-Qualcomm-DWC3-HS-SS-PHY-drivers.patch | 511 +
 ...1-ARM-qcom-add-USB-nodes-to-ipq806x-ap148.patch | 125 +
 ...qcom-gsbi-Add-support-for-ADM-CRCI-muxing.patch | 258 +++
 .../103-ARM-DT-ipq8064-Add-TCSR-support.patch  |  65 +++
 .../patches-3.18/700-add-gmac-dts-suport.patch |  21 +-
 5 files changed, 969 insertions(+), 11 deletions(-)
 create mode 100644 
target/linux/ipq806x/patches-3.18/100-usb-phy-Add-Qualcomm-DWC3-HS-SS-PHY-drivers.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/101-ARM-qcom-add-USB-nodes-to-ipq806x-ap148.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/102-soc-qcom-gsbi-Add-support-for-ADM-CRCI-muxing.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/103-ARM-DT-ipq8064-Add-TCSR-support.patch

diff --git 
a/target/linux/ipq806x/patches-3.18/100-usb-phy-Add-Qualcomm-DWC3-HS-SS-PHY-drivers.patch
 
b/target/linux/ipq806x/patches-3.18/100-usb-phy-Add-Qualcomm-DWC3-HS-SS-PHY-drivers.patch
new file mode 100644
index 000..25803b8
--- /dev/null
+++ 
b/target/linux/ipq806x/patches-3.18/100-usb-phy-Add-Qualcomm-DWC3-HS-SS-PHY-drivers.patch
@@ -0,0 +1,511 @@
+--- a/drivers/phy/Kconfig
 b/drivers/phy/Kconfig
+@@ -256,4 +256,15 @@ config PHY_STIH41X_USB
+ Enable this to support the USB transceiver that is part of
+ STMicroelectronics STiH41x SoC series.
+ 
++config PHY_QCOM_DWC3
++  tristate "QCOM DWC3 USB PHY support"
++  depends on ARCH_QCOM
++  depends on HAS_IOMEM
++  depends on OF
++  select GENERIC_PHY
++  help
++This option enables support for the Synopsis PHYs present inside the
++Qualcomm USB3.0 DWC3 controller.  This driver supports both HS and SS
++PHY controllers.
++
+ endmenu
+--- a/drivers/phy/Makefile
 b/drivers/phy/Makefile
+@@ -31,3 +31,4 @@ obj-$(CONFIG_PHY_ST_SPEAR1340_MIPHY) +=
+ obj-$(CONFIG_PHY_XGENE)   += phy-xgene.o
+ obj-$(CONFIG_PHY_STIH407_USB) += phy-stih407-usb.o
+ obj-$(CONFIG_PHY_STIH41X_USB) += phy-stih41x-usb.o
++obj-$(CONFIG_PHY_QCOM_DWC3)   += phy-qcom-dwc3.o
+--- /dev/null
 b/drivers/phy/phy-qcom-dwc3.c
+@@ -0,0 +1,483 @@
++/* Copyright (c) 2013-2014, Code Aurora Forum. All rights reserved.
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 and
++ * only version 2 as published by the Free Software Foundation.
++ *
++ * 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 
++
++/**
++ *  USB QSCRATCH Hardware registers
++ */
++#define QSCRATCH_GENERAL_CFG  (0x08)
++#define HSUSB_PHY_CTRL_REG(0x10)
++
++/* PHY_CTRL_REG */
++#define HSUSB_CTRL_DMSEHV_CLAMP   BIT(24)
++#define HSUSB_CTRL_USB2_SUSPEND   BIT(23)
++#define HSUSB_CTRL_UTMI_CLK_ENBIT(21)
++#define   HSUSB_CTRL_UTMI_OTG_VBUS_VALID  BIT(20)
++#define HSUSB_CTRL_USE_CLKCOREBIT(18)
++#define HSUSB_CTRL_DPSEHV_CLAMP   BIT(17)
++#define HSUSB_CTRL_COMMONONN  BIT(11)
++#define HSUSB_CTRL_ID_HV_CLAMPBIT(9)
++#define HSUSB_CTRL_OTGSESSVLD_CLAMP   BIT(8)
++#define HSUSB_CTRL_CLAMP_EN   BIT(7)
++#define HSUSB_CTRL_RETENABLEN BIT(1)
++#define HSUSB_CTRL_PORBIT(0)
++
++/* QSCRATCH_GENERAL_CFG */
++#define HSUSB_GCFG_XHCI_REV   BIT(2)
++
++/**
++ *  USB QSCRATCH Hardware registers
++ */
++#define SSUSB_PHY_CTRL_REG(0x00)
++#define SSUSB_PHY_PARAM_CTRL_1(0x04)
++#define SSUSB_PHY_PARAM_CTRL_2(0x08)
++#define CR_PROTOCOL_DATA_IN_REG   (0x0c)
++#define CR_PROTOCOL_DATA_OUT_REG  (0x10)
++#define CR_PROTOCOL_CAP_ADDR_REG  (0x14)
++#define CR_PROTOCOL_CAP_DATA_REG  (0x18)
++#define CR_PROTOCOL_READ_REG  (0x1c)
++#define CR_PROTOCOL_WRITE_REG (0x20)
++
++/* PHY_CTRL_REG */
++#define SSUSB_CTRL_REF_USE_PADBIT(28)
++#define SSUSB_CTRL_TEST_POWERDOWN BIT(27)
++#define SSUSB_CTRL_LANE0_PWR_PRESENT  BIT(24)
++#define SSUSB_CTRL_SS_PHY_EN  BIT(8)
++#define SSUSB_CTRL_SS_PHY_RESET   BIT(7)
++
++/

[OpenWrt-Devel] [PATCH 1/6] ipq806x: clean-up kernel config file

2015-04-02 Thread Mathieu Olivari
Options that used to be in target config have been added to the generic
config file, so remove them.

Signed-off-by: Mathieu Olivari 
---
 target/linux/ipq806x/config-3.18 | 1 -
 target/linux/ipq806x/config-4.0  | 4 
 2 files changed, 5 deletions(-)

diff --git a/target/linux/ipq806x/config-3.18 b/target/linux/ipq806x/config-3.18
index 43b4950..b2f5571 100644
--- a/target/linux/ipq806x/config-3.18
+++ b/target/linux/ipq806x/config-3.18
@@ -212,7 +212,6 @@ CONFIG_MDIO_GPIO=y
 CONFIG_MIGHT_HAVE_CACHE_L2X0=y
 CONFIG_MIGHT_HAVE_PCI=y
 CONFIG_MIGRATION=y
-# CONFIG_MMC_SDHCI_MSM is not set
 CONFIG_MODULES_USE_ELF_REL=y
 CONFIG_MSM_GCC_8660=y
 CONFIG_MSM_GCC_8960=y
diff --git a/target/linux/ipq806x/config-4.0 b/target/linux/ipq806x/config-4.0
index 5ce4644..8504c96 100644
--- a/target/linux/ipq806x/config-4.0
+++ b/target/linux/ipq806x/config-4.0
@@ -51,7 +51,6 @@ CONFIG_ARM_UNWIND=y
 CONFIG_ARM_VIRT_EXT=y
 CONFIG_AUTO_ZRELADDR=y
 # CONFIG_BATTERY_GAUGE_LTC2941 is not set
-CONFIG_BCMA_DRIVER_PCI=y
 # CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
 CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
 CONFIG_BOUNCE=y
@@ -220,15 +219,12 @@ CONFIG_LZO_DECOMPRESS=y
 CONFIG_MDIO_BITBANG=y
 CONFIG_MDIO_BOARDINFO=y
 CONFIG_MDIO_GPIO=y
-# CONFIG_MFD_DA9150 is not set
 # CONFIG_MFD_QCOM_RPM is not set
-# CONFIG_MFD_RT5033 is not set
 # CONFIG_MFD_SPMI_PMIC is not set
 CONFIG_MIGHT_HAVE_CACHE_L2X0=y
 CONFIG_MIGHT_HAVE_PCI=y
 CONFIG_MIGRATION=y
 CONFIG_MODULES_USE_ELF_REL=y
-# CONFIG_MPLS is not set
 CONFIG_MSM_GCC_8660=y
 CONFIG_MSM_GCC_8960=y
 CONFIG_MSM_GCC_8974=y
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 0/6] Add USB support to ipq806x target

2015-04-02 Thread Mathieu Olivari
This patch set adds USB support to ipq806x.
There are 3 main code areas which we modify:
*target/linux/generic/config-*: add missing option which show-up when
 enabling USB on this target
*target/linux/ipq806x: add patches & update configs accordingly
*package/kernel/linux/modules/usb.mk: add 3 packages for dwc3, dwc3-qcom
 and the corresponding PHYs

Patches only concern 3.18 for now. 4.0 patches will come later as they
get updated & posted on LKML.

Mathieu Olivari (6):
  ipq806x: clean-up kernel config file
  linux: Add missing config options to generic configs
  ipq806x: enable usb support
  kernel: add package for dwc3 & dwc3-qcom drivers
  ipq806x: add platform usb support
  ipq806x: enable usb3 packages in default profile

 package/kernel/linux/modules/usb.mk|  53 +++
 target/linux/generic/config-3.14   |   5 +
 target/linux/generic/config-3.18   |  12 +
 target/linux/generic/config-4.0|  12 +
 target/linux/ipq806x/Makefile  |   2 +-
 target/linux/ipq806x/config-3.18   |   2 +-
 target/linux/ipq806x/config-4.0|   5 +-
 ...b-phy-Add-Qualcomm-DWC3-HS-SS-PHY-drivers.patch | 511 +
 ...1-ARM-qcom-add-USB-nodes-to-ipq806x-ap148.patch | 125 +
 ...qcom-gsbi-Add-support-for-ADM-CRCI-muxing.patch | 258 +++
 .../103-ARM-DT-ipq8064-Add-TCSR-support.patch  |  65 +++
 .../patches-3.18/700-add-gmac-dts-suport.patch |  21 +-
 target/linux/ipq806x/profiles/default.mk   |   3 +-
 13 files changed, 1056 insertions(+), 18 deletions(-)
 create mode 100644 
target/linux/ipq806x/patches-3.18/100-usb-phy-Add-Qualcomm-DWC3-HS-SS-PHY-drivers.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/101-ARM-qcom-add-USB-nodes-to-ipq806x-ap148.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/102-soc-qcom-gsbi-Add-support-for-ADM-CRCI-muxing.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/103-ARM-DT-ipq8064-Add-TCSR-support.patch

-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 4/6] kernel: add package for dwc3 usb driver used on ipq806x

2015-04-02 Thread Mathieu Olivari
Signed-off-by: Mathieu Olivari 
---
 package/kernel/linux/modules/usb.mk | 53 +
 1 file changed, 53 insertions(+)

diff --git a/package/kernel/linux/modules/usb.mk 
b/package/kernel/linux/modules/usb.mk
index 4950ab8..09251fa 100644
--- a/package/kernel/linux/modules/usb.mk
+++ b/package/kernel/linux/modules/usb.mk
@@ -146,6 +146,23 @@ endef
 $(eval $(call KernelPackage,usb-phy-am335x))
 
 
+define KernelPackage/usb-phy-qcom-dwc3
+  TITLE:=DWC3 USB QCOM PHY driver
+  DEPENDS:=@TARGET_ipq806x
+  KCONFIG:= CONFIG_PHY_QCOM_DWC3
+  FILES:= $(LINUX_DIR)/drivers/phy/phy-qcom-dwc3.ko
+  AUTOLOAD:=$(call AutoLoad,45,phy-qcom-dwc3,1)
+  $(call AddDepends/usb)
+endef
+
+define KernelPackage/usb-phy-qcom-dwc3/description
+ This driver provides support for the integrated DesignWare
+ USB3 IP Core within the QCOM SoCs.
+endef
+
+$(eval $(call KernelPackage,usb-phy-qcom-dwc3))
+
+
 define KernelPackage/usb-phy-omap-usb2
   TITLE:=Support for OMAP2 USB PHY
   KCONFIG:= \
@@ -493,6 +510,42 @@ endef
 $(eval $(call KernelPackage,usb2-oxnas))
 
 
+define KernelPackage/usb-dwc3-qcom
+  TITLE:=DWC3 USB QCOM controller driver
+  DEPENDS:=@TARGET_ipq806x +kmod-usb-dwc3 +kmod-usb-phy-dwc3-qcom
+  KCONFIG:= CONFIG_USB_DWC3_QCOM
+  FILES:= $(LINUX_DIR)/drivers/usb/dwc3/dwc3-qcom.ko
+  AUTOLOAD:=$(call AutoLoad,53,dwc3-qcom,1)
+  $(call AddDepends/usb)
+endef
+
+define KernelPackage/usb-dwc3-qcom/description
+ This driver provides support for the integrated DesignWare
+ USB3 IP Core within the QCOM SoCs.
+endef
+
+$(eval $(call KernelPackage,usb-dwc3-qcom))
+
+
+define KernelPackage/usb-dwc3
+  TITLE:=DWC3 USB controller driver
+  KCONFIG:= \
+   CONFIG_USB_DWC3 \
+   CONFIG_USB_DWC3_DEBUG=n \
+   CONFIG_USB_DWC3_VERBOSE=n
+  FILES:= $(LINUX_DIR)/drivers/usb/dwc3/dwc3.ko
+  AUTOLOAD:=$(call AutoLoad,54,dwc3,1)
+  $(call AddDepends/usb)
+endef
+
+define KernelPackage/usb-dwc3/description
+ This driver provides support for the Dual Role SuperSpeed
+ USB Controller based on the Synopsys DesignWare USB3 IP Core
+endef
+
+$(eval $(call KernelPackage,usb-dwc3))
+
+
 define KernelPackage/usb-acm
   TITLE:=Support for modems/isdn controllers
   KCONFIG:=CONFIG_USB_ACM
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/6] linux: Add missing config options to generic configs

2015-04-02 Thread Mathieu Olivari
These missing options have been noticed while enabling the following
configuration options on ipq806x, but they're available in the standard
kernel:
*ARCH_QCOM
*CONFIG_USB_SUPPORT
*CONFIG_USB_DWC3
*CONFIG_MFD_SYSCON

Signed-off-by: Mathieu Olivari 
---
 target/linux/generic/config-3.14 |  5 +
 target/linux/generic/config-3.18 | 12 
 target/linux/generic/config-4.0  | 12 
 3 files changed, 29 insertions(+)

diff --git a/target/linux/generic/config-3.14 b/target/linux/generic/config-3.14
index 846ea1e..735c3e9 100644
--- a/target/linux/generic/config-3.14
+++ b/target/linux/generic/config-3.14
@@ -2860,6 +2860,7 @@ CONFIG_RCU_FANOUT_LEAF=16
 # CONFIG_REGULATOR is not set
 # CONFIG_REGULATOR_ACT8865 is not set
 # CONFIG_REGULATOR_AD5398 is not set
+# CONFIG_REGULATOR_ANATOP is not set
 # CONFIG_REGULATOR_BQ24022 is not set
 # CONFIG_REGULATOR_DA9210 is not set
 # CONFIG_REGULATOR_FAN53555 is not set
@@ -3787,6 +3788,9 @@ CONFIG_USB_DEVICEFS=y
 # CONFIG_USB_DUMMY_HCD is not set
 # CONFIG_USB_DWC2 is not set
 # CONFIG_USB_DWC3 is not set
+# CONFIG_USB_DWC3_EXYNOS is not set
+# CONFIG_USB_DWC3_PCI is not set
+# CONFIG_USB_DWC3_KEYSTONE is not set
 # CONFIG_USB_DWC_OTG_LPM is not set
 # CONFIG_USB_DYNAMIC_MINORS is not set
 # CONFIG_USB_EG20T is not set
@@ -3910,6 +3914,7 @@ CONFIG_USB_GADGET_VBUS_DRAW=2
 # CONFIG_USB_MIDI_GADGET is not set
 # CONFIG_USB_MON is not set
 # CONFIG_USB_MOUSE is not set
+# CONFIG_USB_MSM_OTG is not set
 # CONFIG_USB_MUSB_HDRC is not set
 # CONFIG_USB_MV_U3D is not set
 # CONFIG_USB_MV_UDC is not set
diff --git a/target/linux/generic/config-3.18 b/target/linux/generic/config-3.18
index e4df694..7c05594 100644
--- a/target/linux/generic/config-3.18
+++ b/target/linux/generic/config-3.18
@@ -925,6 +925,7 @@ CONFIG_DQL=y
 # CONFIG_DVB_TUNER_DIB0090 is not set
 # CONFIG_DW_DMAC is not set
 # CONFIG_DW_WATCHDOG is not set
+# CONFIG_DWC3_HOST_USB3_LPM_ENABLE is not set
 # CONFIG_DX_SEP is not set
 # CONFIG_DYNAMIC_DEBUG is not set
 # CONFIG_E100 is not set
@@ -1171,6 +1172,7 @@ CONFIG_GENERIC_TIME=y
 # CONFIG_GPIO_SCH is not set
 # CONFIG_GPIO_SCH311X is not set
 # CONFIG_GPIO_SX150X is not set
+# CONFIG_GPIO_SYSCON is not set
 # CONFIG_GPIO_SYSFS is not set
 # CONFIG_GPIO_TS5500 is not set
 # CONFIG_GPIO_VX855 is not set
@@ -1822,6 +1824,7 @@ CONFIG_LEDS_GPIO_PLATFORM=y
 # CONFIG_LEDS_PCA9685 is not set
 # CONFIG_LEDS_PWM is not set
 # CONFIG_LEDS_RENESAS_TPU is not set
+# CONFIG_LEDS_SYSCON is not set
 # CONFIG_LEDS_TCA6507 is not set
 CONFIG_LEDS_TRIGGERS=y
 # CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
@@ -2836,6 +2839,7 @@ CONFIG_PCI_SYSCALL=y
 # CONFIG_PHYS_ADDR_T_64BIT is not set
 # CONFIG_PHY_EXYNOS_DP_VIDEO is not set
 # CONFIG_PHY_EXYNOS_MIPI_VIDEO is not set
+# CONFIG_PHY_QCOM_DWC3 is not set
 # CONFIG_PHY_SAMSUNG_USB2 is not set
 # CONFIG_PID_IN_CONTEXTIDR is not set
 # CONFIG_PID_NS is not set
@@ -2869,6 +2873,7 @@ CONFIG_PINMUX=y
 # CONFIG_POWER_AVS is not set
 # CONFIG_POWER_RESET is not set
 # CONFIG_POWER_RESET_RESTART is not set
+# CONFIG_POWER_RESET_VERSATILE is not set
 # CONFIG_POWER_SUPPLY is not set
 # CONFIG_POWER_SUPPLY_DEBUG is not set
 # CONFIG_PPC4xx_GPIO is not set
@@ -2994,6 +2999,7 @@ CONFIG_RCU_FANOUT_LEAF=16
 # CONFIG_REGULATOR is not set
 # CONFIG_REGULATOR_ACT8865 is not set
 # CONFIG_REGULATOR_AD5398 is not set
+# CONFIG_REGULATOR_ANATOP is not set
 # CONFIG_REGULATOR_BQ24022 is not set
 # CONFIG_REGULATOR_DA9210 is not set
 # CONFIG_REGULATOR_DA9211 is not set
@@ -4053,11 +4059,16 @@ CONFIG_USB_DEVICEFS=y
 # CONFIG_USB_DWC2_HOST is not set
 # CONFIG_USB_DWC2_PERIPHERAL is not set
 # CONFIG_USB_DWC3 is not set
+# CONFIG_USB_DWC3_EXYNOS is not set
+# CONFIG_USB_DWC3_QCOM is not set
+# CONFIG_USB_DWC3_PCI is not set
+# CONFIG_USB_DWC3_KEYSTONE is not set
 # CONFIG_USB_DWC_OTG_LPM is not set
 # CONFIG_USB_DYNAMIC_MINORS is not set
 # CONFIG_USB_EG20T is not set
 # CONFIG_USB_EHCI_HCD_AT91 is not set
 # CONFIG_USB_EHCI_HCD_PPC_OF is not set
+# CONFIG_USB_EHCI_MSM is not set
 # CONFIG_USB_EHCI_MV is not set
 CONFIG_USB_EHCI_ROOT_HUB_TT=y
 CONFIG_USB_EHCI_TT_NEWSCHED=y
@@ -4181,6 +4192,7 @@ CONFIG_USB_GADGET_VBUS_DRAW=2
 # CONFIG_USB_MIDI_GADGET is not set
 # CONFIG_USB_MON is not set
 # CONFIG_USB_MOUSE is not set
+# CONFIG_USB_MSM_OTG is not set
 # CONFIG_USB_MUSB_HDRC is not set
 # CONFIG_USB_MV_U3D is not set
 # CONFIG_USB_MV_UDC is not set
diff --git a/target/linux/generic/config-4.0 b/target/linux/generic/config-4.0
index 1f4d624..5e92d39 100644
--- a/target/linux/generic/config-4.0
+++ b/target/linux/generic/config-4.0
@@ -943,6 +943,7 @@ CONFIG_DQL=y
 # CONFIG_DVB_TUNER_DIB0090 is not set
 # CONFIG_DW_DMAC is not set
 # CONFIG_DW_WATCHDOG is not set
+# CONFIG_DWC3_HOST_USB3_LPM_ENABLE is not set
 # CONFIG_DX_SEP is not set
 # CONFIG_DYNAMIC_DEBUG is not set
 # CONFIG_E100 is not set
@@ -1191,6 +1192,7 @@ CONFIG_GENERIC_TIME=y
 # CONFIG_GPIO_SCH is not set
 # CONFIG_GPIO_SCH311X is not set
 # CONFIG_GPIO_SX150X is no

[OpenWrt-Devel] [PATCH 3/6] ipq806x: enable usb support

2015-04-02 Thread Mathieu Olivari
This change doesn't make USB functional but it does make it selectable
from a configuration perspective.

Signed-off-by: Mathieu Olivari 
---
 target/linux/ipq806x/config-3.18 | 1 +
 target/linux/ipq806x/config-4.0  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/target/linux/ipq806x/config-3.18 b/target/linux/ipq806x/config-3.18
index b2f5571..e0535d3 100644
--- a/target/linux/ipq806x/config-3.18
+++ b/target/linux/ipq806x/config-3.18
@@ -351,6 +351,7 @@ CONFIG_UEVENT_HELPER_PATH=""
 CONFIG_UID16=y
 CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
 CONFIG_UNINLINE_SPIN_UNLOCK=y
+CONFIG_USB_SUPPORT=y
 CONFIG_USE_OF=y
 CONFIG_VECTORS_BASE=0x
 # CONFIG_VFIO is not set
diff --git a/target/linux/ipq806x/config-4.0 b/target/linux/ipq806x/config-4.0
index 8504c96..4d56106 100644
--- a/target/linux/ipq806x/config-4.0
+++ b/target/linux/ipq806x/config-4.0
@@ -365,6 +365,7 @@ CONFIG_UEVENT_HELPER_PATH=""
 CONFIG_UID16=y
 CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
 CONFIG_UNINLINE_SPIN_UNLOCK=y
+CONFIG_USB_SUPPORT=y
 CONFIG_USE_OF=y
 CONFIG_VECTORS_BASE=0x
 CONFIG_VFP=y
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 4/5] config: add an option to enable KPROBE

2015-03-30 Thread Mathieu Olivari
Signed-off-by: Mathieu Olivari 
---
 config/Config-kernel.in  | 17 +
 include/kernel-defaults.mk   |  1 -
 target/linux/generic/config-3.10 |  4 
 target/linux/generic/config-3.14 |  4 
 target/linux/generic/config-3.18 |  4 
 target/linux/generic/config-4.0  |  4 
 6 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/config/Config-kernel.in b/config/Config-kernel.in
index 8471129..cc8df5a 100644
--- a/config/Config-kernel.in
+++ b/config/Config-kernel.in
@@ -127,6 +127,23 @@ config KERNEL_EARLY_PRINTK
  debugging purposes to send messages over the serial console in early 
boot.
  Enable this to debug early boot problems.
 
+config KERNEL_KPROBES
+   bool "Compile the kernel with kprobes support"
+   default n
+   select KERNEL_FTRACE
+   select KERNEL_PERF_EVENTS
+   help
+ Compiles the kernel with KPROBES support, which allows you to trap
+ at almost any kernel address and execute a callback function.
+ register_kprobe() establishes a probepoint and specifies the
+ callback. Kprobes is useful for kernel debugging, non-intrusive
+ instrumentation and testing.
+ If in doubt, say "N".
+
+config KERNEL_KPROBE_EVENT
+   bool
+   default y if KERNEL_KPROBES
+
 config KERNEL_AIO
bool "Compile the kernel with asynchronous IO support"
default n
diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk
index 3a32209..24d2630 100644
--- a/include/kernel-defaults.mk
+++ b/include/kernel-defaults.mk
@@ -107,7 +107,6 @@ define Kernel/Configure/Default
echo "# CONFIG_KALLSYMS_EXTRA_PASS is not set" >> 
$(LINUX_DIR)/.config.target
echo "# CONFIG_KALLSYMS_ALL is not set" >> $(LINUX_DIR)/.config.target
echo "# CONFIG_KALLSYMS_UNCOMPRESSED is not set" >> 
$(LINUX_DIR)/.config.target
-   echo "# CONFIG_KPROBES is not set" >> $(LINUX_DIR)/.config.target
$(SCRIPT_DIR)/metadata.pl kconfig $(TMP_DIR)/.packageinfo 
$(TOPDIR)/.config $(KERNEL_PATCHVER) > $(LINUX_DIR)/.config.override
$(SCRIPT_DIR)/kconfig.pl 'm+' '+' $(LINUX_DIR)/.config.target /dev/null 
$(LINUX_DIR)/.config.override > $(LINUX_DIR)/.config
$(call Kernel/SetNoInitramfs)
diff --git a/target/linux/generic/config-3.10 b/target/linux/generic/config-3.10
index 4ccc969..c16d04b 100644
--- a/target/linux/generic/config-3.10
+++ b/target/linux/generic/config-3.10
@@ -204,6 +204,7 @@ CONFIG_ARM_DMA_MEM_BUFFERABLE=y
 # CONFIG_ARM_ERRATA_764369 is not set
 # CONFIG_ARM_ERRATA_775420 is not set
 # CONFIG_ARM_ERRATA_798181 is not set
+# CONFIG_ARM_KPROBES_TEST is not set
 # CONFIG_ARM_PATCH_PHYS_VIRT is not set
 # CONFIG_ARM_PSCI is not set
 # CONFIG_ARM_UNWIND is not set
@@ -1551,6 +1552,7 @@ CONFIG_KERNEL_XZ=y
 # CONFIG_KGDB is not set
 # CONFIG_KMEMCHECK is not set
 # CONFIG_KPROBES is not set
+# CONFIG_KPROBES_SANITY_TEST is not set
 # CONFIG_KS8842 is not set
 # CONFIG_KS8851 is not set
 # CONFIG_KS8851_MLL is not set
@@ -2172,6 +2174,7 @@ CONFIG_NET_SCH_FQ_CODEL=y
 # CONFIG_NET_SCH_SFQ is not set
 # CONFIG_NET_SCH_TBF is not set
 # CONFIG_NET_SCH_TEQL is not set
+# CONFIG_NET_TCPPROBE is not set
 # CONFIG_NET_TEAM is not set
 # CONFIG_NET_TULIP is not set
 CONFIG_NET_VENDOR_3COM=y
@@ -2569,6 +2572,7 @@ CONFIG_PPP_MULTILINK=y
 # CONFIG_PPTP is not set
 # CONFIG_PREEMPT is not set
 CONFIG_PREEMPT_NONE=y
+# CONFIG_PREEMPT_TRACER is not set
 # CONFIG_PREEMPT_VOLUNTARY is not set
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_PRINTK=y
diff --git a/target/linux/generic/config-3.14 b/target/linux/generic/config-3.14
index 150c6e3..846ea1e 100644
--- a/target/linux/generic/config-3.14
+++ b/target/linux/generic/config-3.14
@@ -229,6 +229,7 @@ CONFIG_ARM_DMA_MEM_BUFFERABLE=y
 # CONFIG_ARM_ERRATA_773022 is not set
 # CONFIG_ARM_ERRATA_775420 is not set
 # CONFIG_ARM_ERRATA_798181 is not set
+# CONFIG_ARM_KPROBES_TEST is not set
 # CONFIG_ARM_PATCH_PHYS_VIRT is not set
 # CONFIG_ARM_PSCI is not set
 # CONFIG_ARM_PTDUMP is not set
@@ -1687,6 +1688,7 @@ CONFIG_KERNEL_XZ=y
 # CONFIG_KGDB is not set
 # CONFIG_KMEMCHECK is not set
 # CONFIG_KPROBES is not set
+# CONFIG_KPROBES_SANITY_TEST is not set
 # CONFIG_KS8842 is not set
 # CONFIG_KS8851 is not set
 # CONFIG_KS8851_MLL is not set
@@ -2347,6 +2349,7 @@ CONFIG_NET_SCH_FQ_CODEL=y
 # CONFIG_NET_SCH_SFQ is not set
 # CONFIG_NET_SCH_TBF is not set
 # CONFIG_NET_SCH_TEQL is not set
+# CONFIG_NET_TCPPROBE is not set
 # CONFIG_NET_TEAM is not set
 # CONFIG_NET_TULIP is not set
 CONFIG_NET_VENDOR_3COM=y
@@ -2762,6 +2765,7 @@ CONFIG_PPP_MULTILINK=y
 # CONFIG_PPTP is not set
 # CONFIG_PREEMPT is not set
 CONFIG_PREEMPT_NONE=y
+# CONFIG_PREEMPT_TRACER is not set
 # CONFIG_PREEMPT_VOLUNTARY is not set
 CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_PRINTK=y
diff --git a/target/linux/generic/config-3.18 b/target/l

[OpenWrt-Devel] [PATCH 2/5] ipq806x: add support for 4.0 kernel

2015-03-30 Thread Mathieu Olivari
Signed-off-by: Mathieu Olivari 
---
 target/linux/ipq806x/config-4.0| 389 +++
 .../001-spi-qup-Add-DMA-capabilities.patch | 522 +
 ...-v3-spi-qup-Fix-incorrect-block-transfers.patch | 376 +++
 .../003-spi-qup-Ensure-done-detection.patch|  56 +++
 ...atchdog-qcom-use-timer-devicetree-binding.patch |  72 +++
 ...m-add-description-of-KPSS-WDT-for-IPQ8064.patch |  53 +++
 ...-watchdog-entries-to-DT-timer-binding-doc.patch |  50 ++
 .../patches-4.0/020-add-ap148-bootargs.patch   |  46 ++
 .../patches-4.0/021-add-ap148-partitions.patch |  35 ++
 .../patches-4.0/700-add-gmac-dts-suport.patch  | 172 +++
 10 files changed, 1771 insertions(+)
 create mode 100644 target/linux/ipq806x/config-4.0
 create mode 100644 
target/linux/ipq806x/patches-4.0/001-spi-qup-Add-DMA-capabilities.patch
 create mode 100644 
target/linux/ipq806x/patches-4.0/002-v3-spi-qup-Fix-incorrect-block-transfers.patch
 create mode 100644 
target/linux/ipq806x/patches-4.0/003-spi-qup-Ensure-done-detection.patch
 create mode 100644 
target/linux/ipq806x/patches-4.0/011-watchdog-qcom-use-timer-devicetree-binding.patch
 create mode 100644 
target/linux/ipq806x/patches-4.0/012-ARM-qcom-add-description-of-KPSS-WDT-for-IPQ8064.patch
 create mode 100644 
target/linux/ipq806x/patches-4.0/013-ARM-msm-add-watchdog-entries-to-DT-timer-binding-doc.patch
 create mode 100644 
target/linux/ipq806x/patches-4.0/020-add-ap148-bootargs.patch
 create mode 100644 
target/linux/ipq806x/patches-4.0/021-add-ap148-partitions.patch
 create mode 100644 
target/linux/ipq806x/patches-4.0/700-add-gmac-dts-suport.patch

diff --git a/target/linux/ipq806x/config-4.0 b/target/linux/ipq806x/config-4.0
new file mode 100644
index 000..5ce4644
--- /dev/null
+++ b/target/linux/ipq806x/config-4.0
@@ -0,0 +1,389 @@
+CONFIG_ALIGNMENT_TRAP=y
+# CONFIG_AMBA_PL08X is not set
+# CONFIG_APM_EMULATION is not set
+CONFIG_APQ_GCC_8084=y
+CONFIG_APQ_MMCC_8084=y
+CONFIG_AR8216_PHY=y
+CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y
+CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y
+CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y
+CONFIG_ARCH_HAS_SG_CHAIN=y
+CONFIG_ARCH_HAS_TICK_BROADCAST=y
+CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y
+CONFIG_ARCH_HIBERNATION_POSSIBLE=y
+CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
+CONFIG_ARCH_MSM8960=y
+CONFIG_ARCH_MSM8974=y
+CONFIG_ARCH_MSM8X60=y
+CONFIG_ARCH_MULTIPLATFORM=y
+# CONFIG_ARCH_MULTI_CPU_AUTO is not set
+CONFIG_ARCH_MULTI_V6_V7=y
+CONFIG_ARCH_MULTI_V7=y
+CONFIG_ARCH_NR_GPIO=0
+CONFIG_ARCH_QCOM=y
+# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
+# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
+CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y
+CONFIG_ARCH_SUPPORTS_BIG_ENDIAN=y
+CONFIG_ARCH_SUPPORTS_UPROBES=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_ARCH_USE_BUILTIN_BSWAP=y
+CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y
+CONFIG_ARCH_WANT_GENERAL_HUGETLB=y
+CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
+CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
+CONFIG_ARM=y
+CONFIG_ARM_AMBA=y
+CONFIG_ARM_ARCH_TIMER=y
+CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y
+CONFIG_ARM_CPU_SUSPEND=y
+CONFIG_ARM_GIC=y
+CONFIG_ARM_HAS_SG_CHAIN=y
+CONFIG_ARM_L1_CACHE_SHIFT=6
+CONFIG_ARM_L1_CACHE_SHIFT_6=y
+# CONFIG_ARM_LPAE is not set
+CONFIG_ARM_PATCH_PHYS_VIRT=y
+# CONFIG_ARM_SMMU is not set
+# CONFIG_ARM_SP805_WATCHDOG is not set
+CONFIG_ARM_THUMB=y
+# CONFIG_ARM_THUMBEE is not set
+CONFIG_ARM_UNWIND=y
+CONFIG_ARM_VIRT_EXT=y
+CONFIG_AUTO_ZRELADDR=y
+# CONFIG_BATTERY_GAUGE_LTC2941 is not set
+CONFIG_BCMA_DRIVER_PCI=y
+# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
+CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
+CONFIG_BOUNCE=y
+CONFIG_BUILD_BIN2C=y
+# CONFIG_CACHE_L2X0 is not set
+CONFIG_CLEANCACHE=y
+CONFIG_CLKDEV_LOOKUP=y
+CONFIG_CLKSRC_OF=y
+CONFIG_CLKSRC_QCOM=y
+CONFIG_CLONE_BACKWARDS=y
+CONFIG_COMMON_CLK=y
+CONFIG_COMMON_CLK_QCOM=y
+CONFIG_COMPACTION=y
+CONFIG_COREDUMP=y
+CONFIG_CPU_32v6K=y
+CONFIG_CPU_32v7=y
+CONFIG_CPU_ABRT_EV7=y
+# CONFIG_CPU_BIG_ENDIAN is not set
+# CONFIG_CPU_BPREDICT_DISABLE is not set
+CONFIG_CPU_CACHE_V7=y
+CONFIG_CPU_CACHE_VIPT=y
+CONFIG_CPU_COPY_V6=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+CONFIG_CPU_HAS_ASID=y
+# CONFIG_CPU_ICACHE_DISABLE is not set
+CONFIG_CPU_PABRT_V7=y
+CONFIG_CPU_PM=y
+CONFIG_CPU_RMAP=y
+CONFIG_CPU_TLB_V7=y
+CONFIG_CPU_V7=y
+CONFIG_CRC16=y
+# CONFIG_CRC32_SARWATE is not set
+CONFIG_CRC32_SLICEBY8=y
+CONFIG_CROSS_MEMORY_ATTACH=y
+# CONFIG_CRYPTO_SHA1_ARM_NEON is not set
+# CONFIG_CRYPTO_SHA512_ARM_NEON is not set
+CONFIG_CRYPTO_XZ=y
+CONFIG_DCACHE_WORD_ACCESS=y
+CONFIG_DEBUG_BUGVERBOSE=y
+CONFIG_DEBUG_GPIO=y
+CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
+CONFIG_DEBUG_PREEMPT=y
+# CONFIG_DEBUG_UART_8250 is not set
+# CONFIG_DEBUG_USER is not set
+CONFIG_DECOMPRESS_GZIP=y
+CONFIG_DEVMEM=y
+CONFIG_DMADEVICES=y
+CONFIG_DMA_ENGINE=y
+CONFIG_DMA_OF=y
+CONFIG_DMA_VIRTUAL_CHANNELS=y
+CONFIG_DTC=y
+# CONFIG_DW_DMAC_CORE is not set
+# CONFIG_DW_DMAC_PCI is not set
+CONFIG_DYNAMIC_DEBUG=y
+CONFIG_ETHERNET_PACKET_MANGLE=y
+CONFIG

[OpenWrt-Devel] [PATCH 5/5] kernel: upgrade 4.0 to rc6

2015-03-30 Thread Mathieu Olivari
Signed-off-by: Mathieu Olivari 
---
 include/kernel-version.mk  |  4 +--
 .../patches-4.0/668-fix-ipv6-throw-routes.patch| 31 --
 2 files changed, 2 insertions(+), 33 deletions(-)
 delete mode 100644 
target/linux/generic/patches-4.0/668-fix-ipv6-throw-routes.patch

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index 16f76e7..977c8a0 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -7,14 +7,14 @@ LINUX_VERSION-3.10 = .58
 LINUX_VERSION-3.13 = .7
 LINUX_VERSION-3.14 = .35
 LINUX_VERSION-3.18 = .9
-LINUX_VERSION-4.0 = -rc5
+LINUX_VERSION-4.0 = -rc6
 
 LINUX_KERNEL_MD5SUM-3.8.13  = 2af19d06cd47ec459519159cdd10542d
 LINUX_KERNEL_MD5SUM-3.10.58 = 3ff3478b6351143cef22d4b81cf48b01
 LINUX_KERNEL_MD5SUM-3.13.7  = 370adced5e5c1cb1d0d621c2dae2723f
 LINUX_KERNEL_MD5SUM-3.14.35 = e5e92c40d14bc8ae9a8701db4e1cbb27
 LINUX_KERNEL_MD5SUM-3.18.9  = 44cd16ada5eb03589f696f083cd2323b
-LINUX_KERNEL_MD5SUM-4.0-rc5 = b26150c980099ef554b26d07f470e647
+LINUX_KERNEL_MD5SUM-4.0-rc6 = bec0aeeacab2852d9a17ccbfa7e280f8
 
 ifdef KERNEL_PATCHVER
   LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER)))
diff --git a/target/linux/generic/patches-4.0/668-fix-ipv6-throw-routes.patch 
b/target/linux/generic/patches-4.0/668-fix-ipv6-throw-routes.patch
deleted file mode 100644
index 283ffce..000
--- a/target/linux/generic/patches-4.0/668-fix-ipv6-throw-routes.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 9cd600244515bd4540898411ab781a97f0cc387f Mon Sep 17 00:00:00 2001
-From: Steven Barth 
-Date: Thu, 19 Mar 2015 11:54:50 +0100
-Subject: [PATCH] ipv6: fix backtracking for throw routes
-
-for throw routes to trigger evaluation of other policy rules
-EAGAIN needs to be propagated up to fib_rules_lookup
-similar to how its done for IPv4
-
-A simple testcase for verification is:
-
-ip -6 rule add lookup 3 priority 3
-ip -6 route add throw 2001:db8::1
-ip -6 route add 2001:db8::1 via fe80::1 dev wlan0 table 3
-ip route get 2001:db8::1
-
-Signed-off-by: Steven Barth 

- net/ipv6/fib6_rules.c | 1 +
- 1 file changed, 1 insertion(+)
-
 a/net/ipv6/fib6_rules.c
-+++ b/net/ipv6/fib6_rules.c
-@@ -104,6 +104,7 @@ static int fib6_rule_action(struct fib_r
-   goto again;
-   flp6->saddr = saddr;
-   }
-+  err = rt->dst.error;
-   goto out;
-   }
- again:
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/5] ipq806x: clean up kernel conf

2015-03-30 Thread Mathieu Olivari
Signed-off-by: Mathieu Olivari 
---
 target/linux/ipq806x/config-3.18 | 5 -
 1 file changed, 5 deletions(-)

diff --git a/target/linux/ipq806x/config-3.18 b/target/linux/ipq806x/config-3.18
index 97687ac..b2f5571 100644
--- a/target/linux/ipq806x/config-3.18
+++ b/target/linux/ipq806x/config-3.18
@@ -82,7 +82,6 @@ CONFIG_CRC16=y
 # CONFIG_CRC32_SARWATE is not set
 CONFIG_CRC32_SLICEBY8=y
 CONFIG_CROSS_MEMORY_ATTACH=y
-# CONFIG_CRYPTO_DEV_QCE is not set
 # CONFIG_CRYPTO_SHA1_ARM_NEON is not set
 # CONFIG_CRYPTO_SHA512_ARM_NEON is not set
 CONFIG_CRYPTO_XZ=y
@@ -103,10 +102,8 @@ CONFIG_DTC=y
 # CONFIG_DW_DMAC_CORE is not set
 # CONFIG_DW_DMAC_PCI is not set
 CONFIG_DYNAMIC_DEBUG=y
-# CONFIG_EMAC_ROCKCHIP is not set
 CONFIG_ETHERNET_PACKET_MANGLE=y
 CONFIG_FREEZER=y
-CONFIG_FW_LOADER_USER_HELPER=y
 CONFIG_GENERIC_ALLOCATOR=y
 CONFIG_GENERIC_BUG=y
 CONFIG_GENERIC_CLOCKEVENTS=y
@@ -215,7 +212,6 @@ CONFIG_MDIO_GPIO=y
 CONFIG_MIGHT_HAVE_CACHE_L2X0=y
 CONFIG_MIGHT_HAVE_PCI=y
 CONFIG_MIGRATION=y
-# CONFIG_MMC_SDHCI_MSM is not set
 CONFIG_MODULES_USE_ELF_REL=y
 CONFIG_MSM_GCC_8660=y
 CONFIG_MSM_GCC_8960=y
@@ -228,7 +224,6 @@ CONFIG_MTD_M25P80=y
 CONFIG_MTD_SPI_NOR=y
 CONFIG_MTD_SPLIT_FIRMWARE=y
 CONFIG_MTD_SPLIT_FIT_FW=y
-CONFIG_MTD_SPLIT_SUPPORT=y
 CONFIG_MULTI_IRQ_HANDLER=y
 CONFIG_MUTEX_SPIN_ON_OWNER=y
 CONFIG_NEED_DMA_MAP_STATE=y
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/5] ipq806x: move 020-add-ap148-bootargs.patch in patches-3.18

2015-03-30 Thread Mathieu Olivari
Signed-off-by: Mathieu Olivari 
---
 .../patches-3.18/020-add-ap148-bootargs.patch  | 46 ++
 .../ipq806x/patches/020-add-ap148-bootargs.patch   | 46 --
 2 files changed, 46 insertions(+), 46 deletions(-)
 create mode 100644 
target/linux/ipq806x/patches-3.18/020-add-ap148-bootargs.patch
 delete mode 100644 target/linux/ipq806x/patches/020-add-ap148-bootargs.patch

diff --git a/target/linux/ipq806x/patches-3.18/020-add-ap148-bootargs.patch 
b/target/linux/ipq806x/patches-3.18/020-add-ap148-bootargs.patch
new file mode 100644
index 000..a61481e
--- /dev/null
+++ b/target/linux/ipq806x/patches-3.18/020-add-ap148-bootargs.patch
@@ -0,0 +1,46 @@
+--- a/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
 b/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
+@@ -14,6 +14,14 @@
+   };
+   };
+ 
++  alias {
++  serial0 = &uart4;
++  };
++
++  chosen {
++  linux,stdout-path = "serial0:115200n8";
++  };
++
+   soc {
+   pinmux@80 {
+   i2c4_pins: i2c4_pinmux {
+--- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
 b/arch/arm/boot/dts/qcom-ipq8064.dtsi
+@@ -140,7 +140,7 @@
+   ranges;
+   status = "disabled";
+ 
+-  serial@1249 {
++  uart2: serial@1249 {
+   compatible = "qcom,msm-uartdm-v1.3", 
"qcom,msm-uartdm";
+   reg = <0x1249 0x1000>,
+ <0x1248 0x1000>;
+@@ -175,7 +175,7 @@
+   ranges;
+   status = "disabled";
+ 
+-  serial@1634 {
++  uart4: serial@1634 {
+   compatible = "qcom,msm-uartdm-v1.3", 
"qcom,msm-uartdm";
+   reg = <0x1634 0x1000>,
+ <0x1630 0x1000>;
+@@ -209,7 +209,7 @@
+   ranges;
+   status = "disabled";
+ 
+-  serial@1a24 {
++  uart5: serial@1a24 {
+   compatible = "qcom,msm-uartdm-v1.3", 
"qcom,msm-uartdm";
+   reg = <0x1a24 0x1000>,
+ <0x1a20 0x1000>;
diff --git a/target/linux/ipq806x/patches/020-add-ap148-bootargs.patch 
b/target/linux/ipq806x/patches/020-add-ap148-bootargs.patch
deleted file mode 100644
index a61481e..000
--- a/target/linux/ipq806x/patches/020-add-ap148-bootargs.patch
+++ /dev/null
@@ -1,46 +0,0 @@
 a/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
-+++ b/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
-@@ -14,6 +14,14 @@
-   };
-   };
- 
-+  alias {
-+  serial0 = &uart4;
-+  };
-+
-+  chosen {
-+  linux,stdout-path = "serial0:115200n8";
-+  };
-+
-   soc {
-   pinmux@80 {
-   i2c4_pins: i2c4_pinmux {
 a/arch/arm/boot/dts/qcom-ipq8064.dtsi
-+++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
-@@ -140,7 +140,7 @@
-   ranges;
-   status = "disabled";
- 
--  serial@1249 {
-+  uart2: serial@1249 {
-   compatible = "qcom,msm-uartdm-v1.3", 
"qcom,msm-uartdm";
-   reg = <0x1249 0x1000>,
- <0x1248 0x1000>;
-@@ -175,7 +175,7 @@
-   ranges;
-   status = "disabled";
- 
--  serial@1634 {
-+  uart4: serial@1634 {
-   compatible = "qcom,msm-uartdm-v1.3", 
"qcom,msm-uartdm";
-   reg = <0x1634 0x1000>,
- <0x1630 0x1000>;
-@@ -209,7 +209,7 @@
-   ranges;
-   status = "disabled";
- 
--  serial@1a24 {
-+  uart5: serial@1a24 {
-   compatible = "qcom,msm-uartdm-v1.3", 
"qcom,msm-uartdm";
-   reg = <0x1a24 0x1000>,
- <0x1a20 0x1000>;
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/3] ipq806x: fix AP148 boot from NOR

2015-03-13 Thread Mathieu Olivari
This patch allows AP148 to boot from NOR flash.

As we're using a FIT image as kernel (which includes kernel bin + DTB)
we enable the MTD_SPLIT_FIT_FW kernel option, which will detect the FIT
image and automatically split the "firmware" partition into 2 MTD parts
(kernel + rootfs).

The rootfs will then be parsed and split between rootfs + rootfs_data,
as usual.

Signed-off-by: Mathieu Olivari 
---
 target/linux/ipq806x/config-3.18   |  3 ++
 .../patches-3.18/021-add-ap148-partitions.patch| 35 ++
 2 files changed, 38 insertions(+)
 create mode 100644 
target/linux/ipq806x/patches-3.18/021-add-ap148-partitions.patch

diff --git a/target/linux/ipq806x/config-3.18 b/target/linux/ipq806x/config-3.18
index e5ce0e4..97687ac 100644
--- a/target/linux/ipq806x/config-3.18
+++ b/target/linux/ipq806x/config-3.18
@@ -226,6 +226,9 @@ CONFIG_MSM_MMCC_8974=y
 CONFIG_MTD_CMDLINE_PARTS=y
 CONFIG_MTD_M25P80=y
 CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_SPLIT_FIRMWARE=y
+CONFIG_MTD_SPLIT_FIT_FW=y
+CONFIG_MTD_SPLIT_SUPPORT=y
 CONFIG_MULTI_IRQ_HANDLER=y
 CONFIG_MUTEX_SPIN_ON_OWNER=y
 CONFIG_NEED_DMA_MAP_STATE=y
diff --git a/target/linux/ipq806x/patches-3.18/021-add-ap148-partitions.patch 
b/target/linux/ipq806x/patches-3.18/021-add-ap148-partitions.patch
new file mode 100644
index 000..34eb9c0
--- /dev/null
+++ b/target/linux/ipq806x/patches-3.18/021-add-ap148-partitions.patch
@@ -0,0 +1,35 @@
+--- a/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
 b/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
+@@ -78,13 +78,28 @@
+   reg = <0>;
+ 
+   partition@0 {
+-  label = "rootfs";
+-  reg = <0x0 0x100>;
++  label = "lowlevel_init";
++  reg = <0x0 0x1b>;
+   };
+ 
+   partition@1 {
+-  label = "scratch";
+-  reg = <0x100 0x100>;
++  label = "u-boot";
++  reg = <0x1b 0x8>;
++  };
++
++  partition@2 {
++  label = "u-boot-env";
++  reg = <0x23 0x4>;
++  };
++
++  partition@3 {
++  label = "caldata";
++  reg = <0x27 0x4>;
++  };
++
++  partition@4 {
++  label = "firmware";
++  reg = <0x2b 0x1d5>;
+   };
+   };
+   };
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/3] ipq806x: add ap148 bootargs to DT

2015-03-13 Thread Mathieu Olivari
Only one bootargs is really needed: the tty port. All the other
information will use the OpenWrt mechanisms.

Signed-off-by: Mathieu Olivari 
---
 .../ipq806x/patches/020-add-ap148-bootargs.patch   | 46 ++
 1 file changed, 46 insertions(+)
 create mode 100644 target/linux/ipq806x/patches/020-add-ap148-bootargs.patch

diff --git a/target/linux/ipq806x/patches/020-add-ap148-bootargs.patch 
b/target/linux/ipq806x/patches/020-add-ap148-bootargs.patch
new file mode 100644
index 000..a61481e
--- /dev/null
+++ b/target/linux/ipq806x/patches/020-add-ap148-bootargs.patch
@@ -0,0 +1,46 @@
+--- a/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
 b/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
+@@ -14,6 +14,14 @@
+   };
+   };
+ 
++  alias {
++  serial0 = &uart4;
++  };
++
++  chosen {
++  linux,stdout-path = "serial0:115200n8";
++  };
++
+   soc {
+   pinmux@80 {
+   i2c4_pins: i2c4_pinmux {
+--- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
 b/arch/arm/boot/dts/qcom-ipq8064.dtsi
+@@ -140,7 +140,7 @@
+   ranges;
+   status = "disabled";
+ 
+-  serial@1249 {
++  uart2: serial@1249 {
+   compatible = "qcom,msm-uartdm-v1.3", 
"qcom,msm-uartdm";
+   reg = <0x1249 0x1000>,
+ <0x1248 0x1000>;
+@@ -175,7 +175,7 @@
+   ranges;
+   status = "disabled";
+ 
+-  serial@1634 {
++  uart4: serial@1634 {
+   compatible = "qcom,msm-uartdm-v1.3", 
"qcom,msm-uartdm";
+   reg = <0x1634 0x1000>,
+ <0x1630 0x1000>;
+@@ -209,7 +209,7 @@
+   ranges;
+   status = "disabled";
+ 
+-  serial@1a24 {
++  uart5: serial@1a24 {
+   compatible = "qcom,msm-uartdm-v1.3", 
"qcom,msm-uartdm";
+   reg = <0x1a24 0x1000>,
+ <0x1a20 0x1000>;
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/3] kernel: mtdsplit: add support for FIT image

2015-03-13 Thread Mathieu Olivari
If this option is enabled, the FIT image format will be detected and
split by the mtdsplit code. Detection is based upon the FDT magic, which
will trigger the parsing and detection of the rootfs, ending-up in the
creation of the 2 new partitions.

Signed-off-by: Mathieu Olivari 
---
 target/linux/generic/config-3.18   |   1 +
 .../generic/files/drivers/mtd/mtdsplit/Kconfig |   5 +
 .../generic/files/drivers/mtd/mtdsplit/Makefile|   1 +
 .../files/drivers/mtd/mtdsplit/mtdsplit_fit.c  | 140 +
 4 files changed, 147 insertions(+)
 create mode 100644 
target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_fit.c

diff --git a/target/linux/generic/config-3.18 b/target/linux/generic/config-3.18
index ea4d046..4d29a57 100644
--- a/target/linux/generic/config-3.18
+++ b/target/linux/generic/config-3.18
@@ -2241,6 +2241,7 @@ CONFIG_MTD_ROOTFS_SPLIT=y
 CONFIG_MTD_SPLIT=y
 # CONFIG_MTD_SPLIT_FIRMWARE is not set
 CONFIG_MTD_SPLIT_FIRMWARE_NAME="firmware"
+# CONFIG_MTD_SPLIT_FIT_FW is not set
 # CONFIG_MTD_SPLIT_LZMA_FW is not set
 # CONFIG_MTD_SPLIT_SEAMA_FW is not set
 CONFIG_MTD_SPLIT_SQUASHFS_ROOT=y
diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/Kconfig 
b/target/linux/generic/files/drivers/mtd/mtdsplit/Kconfig
index fca6b48..c4e3418 100644
--- a/target/linux/generic/files/drivers/mtd/mtdsplit/Kconfig
+++ b/target/linux/generic/files/drivers/mtd/mtdsplit/Kconfig
@@ -30,6 +30,11 @@ config MTD_SPLIT_UIMAGE_FW
depends on MTD_SPLIT_SUPPORT
select MTD_SPLIT
 
+config MTD_SPLIT_FIT_FW
+   bool "FIT based firmware partition parser"
+   depends on MTD_SPLIT_SUPPORT
+   select MTD_SPLIT
+
 config MTD_SPLIT_LZMA_FW
bool "LZMA compressed kernel based firmware partition parser"
depends on MTD_SPLIT_SUPPORT
diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/Makefile 
b/target/linux/generic/files/drivers/mtd/mtdsplit/Makefile
index 12661ba..e09476b 100644
--- a/target/linux/generic/files/drivers/mtd/mtdsplit/Makefile
+++ b/target/linux/generic/files/drivers/mtd/mtdsplit/Makefile
@@ -2,6 +2,7 @@ obj-$(CONFIG_MTD_SPLIT) += mtdsplit.o
 obj-$(CONFIG_MTD_SPLIT_SEAMA_FW) += mtdsplit_seama.o
 obj-$(CONFIG_MTD_SPLIT_SQUASHFS_ROOT) += mtdsplit_squashfs.o
 obj-$(CONFIG_MTD_SPLIT_UIMAGE_FW) += mtdsplit_uimage.o
+obj-$(CONFIG_MTD_SPLIT_FIT_FW) += mtdsplit_fit.o
 obj-$(CONFIG_MTD_SPLIT_LZMA_FW) += mtdsplit_lzma.o
 obj-$(CONFIG_MTD_SPLIT_TPLINK_FW) += mtdsplit_tplink.o
 obj-$(CONFIG_MTD_SPLIT_TRX_FW) += mtdsplit_trx.o
diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_fit.c 
b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_fit.c
new file mode 100644
index 000..d1087f6
--- /dev/null
+++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_fit.c
@@ -0,0 +1,140 @@
+/*
+ * Copyright (c) 2015 The Linux Foundation
+ * Copyright (C) 2014 Gabor Juhos 
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "mtdsplit.h"
+
+struct fdt_header {
+   uint32_t magic;  /* magic word FDT_MAGIC */
+   uint32_t totalsize;  /* total size of DT block */
+   uint32_t off_dt_struct;  /* offset to structure */
+   uint32_t off_dt_strings; /* offset to strings */
+   uint32_t off_mem_rsvmap; /* offset to memory reserve map */
+   uint32_t version;/* format version */
+   uint32_t last_comp_version;  /* last compatible version */
+
+   /* version 2 fields below */
+   uint32_t boot_cpuid_phys;/* Which physical CPU id we're
+   booting on */
+   /* version 3 fields below */
+   uint32_t size_dt_strings;/* size of the strings block */
+
+   /* version 17 fields below */
+   uint32_t size_dt_struct; /* size of the structure block */
+};
+
+static int
+mtdsplit_fit_parse(struct mtd_info *mtd, struct mtd_partition **pparts,
+  struct mtd_part_parser_data *data)
+{
+   struct fdt_header hdr;
+   size_t hdr_len, retlen;
+   size_t offset;
+   size_t fit_offset, fit_size;
+ 

[OpenWrt-Devel] [PATCH] ipq806x: rename patches in patches-3.18

2015-03-05 Thread Mathieu Olivari
This will allow ipq806x to support multiple kernel version more easily.

Signed-off-by: Mathieu Olivari 
---
 .../001-spi-qup-Add-DMA-capabilities.patch | 522 +
 ...-v3-spi-qup-Fix-incorrect-block-transfers.patch | 376 +++
 .../003-spi-qup-Ensure-done-detection.patch|  56 +++
 ...atchdog-qcom-use-timer-devicetree-binding.patch |  72 +++
 ...m-add-description-of-KPSS-WDT-for-IPQ8064.patch |  53 +++
 ...-watchdog-entries-to-DT-timer-binding-doc.patch |  50 ++
 .../patches-3.18/700-add-gmac-dts-suport.patch | 172 +++
 .../patches/001-spi-qup-Add-DMA-capabilities.patch | 522 -
 ...-v3-spi-qup-Fix-incorrect-block-transfers.patch | 376 ---
 .../003-spi-qup-Ensure-done-detection.patch|  56 ---
 ...atchdog-qcom-use-timer-devicetree-binding.patch |  72 ---
 ...m-add-description-of-KPSS-WDT-for-IPQ8064.patch |  53 ---
 ...-watchdog-entries-to-DT-timer-binding-doc.patch |  50 --
 .../ipq806x/patches/700-add-gmac-dts-suport.patch  | 172 ---
 14 files changed, 1301 insertions(+), 1301 deletions(-)
 create mode 100644 
target/linux/ipq806x/patches-3.18/001-spi-qup-Add-DMA-capabilities.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/002-v3-spi-qup-Fix-incorrect-block-transfers.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/003-spi-qup-Ensure-done-detection.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/011-watchdog-qcom-use-timer-devicetree-binding.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/012-ARM-qcom-add-description-of-KPSS-WDT-for-IPQ8064.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/013-ARM-msm-add-watchdog-entries-to-DT-timer-binding-doc.patch
 create mode 100644 
target/linux/ipq806x/patches-3.18/700-add-gmac-dts-suport.patch
 delete mode 100644 
target/linux/ipq806x/patches/001-spi-qup-Add-DMA-capabilities.patch
 delete mode 100644 
target/linux/ipq806x/patches/002-v3-spi-qup-Fix-incorrect-block-transfers.patch
 delete mode 100644 
target/linux/ipq806x/patches/003-spi-qup-Ensure-done-detection.patch
 delete mode 100644 
target/linux/ipq806x/patches/011-watchdog-qcom-use-timer-devicetree-binding.patch
 delete mode 100644 
target/linux/ipq806x/patches/012-ARM-qcom-add-description-of-KPSS-WDT-for-IPQ8064.patch
 delete mode 100644 
target/linux/ipq806x/patches/013-ARM-msm-add-watchdog-entries-to-DT-timer-binding-doc.patch
 delete mode 100644 target/linux/ipq806x/patches/700-add-gmac-dts-suport.patch

diff --git 
a/target/linux/ipq806x/patches-3.18/001-spi-qup-Add-DMA-capabilities.patch 
b/target/linux/ipq806x/patches-3.18/001-spi-qup-Add-DMA-capabilities.patch
new file mode 100644
index 000..62badd5
--- /dev/null
+++ b/target/linux/ipq806x/patches-3.18/001-spi-qup-Add-DMA-capabilities.patch
@@ -0,0 +1,522 @@
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+Subject: spi: qup: Add DMA capabilities
+From: Andy Gross 
+X-Patchwork-Id: 4432401
+Message-Id: <1403816781-31008-1-git-send-email-agr...@codeaurora.org>
+To: Mark Brown 
+Cc: linux-...@vger.kernel.org, Sagar Dharia ,
+   Daniel Sneddon ,
+   Bjorn Andersson ,
+   "Ivan T. Ivanov" ,
+   linux-ker...@vger.kernel.org, linux-arm-ker...@lists.infradead.org,
+   linux-arm-...@vger.kernel.org, Andy Gross 
+Date: Thu, 26 Jun 2014 16:06:21 -0500
+
+This patch adds DMA capabilities to the spi-qup driver.  If DMA channels are
+present, the QUP will use DMA instead of block mode for transfers to/from SPI
+peripherals for transactions larger than the length of a block.
+
+Signed-off-by: Andy Gross 
+
+---
+.../devicetree/bindings/spi/qcom,spi-qup.txt   |   10 +
+ drivers/spi/spi-qup.c  |  361 ++--
+ 2 files changed, 350 insertions(+), 21 deletions(-)
+
+--- a/Documentation/devicetree/bindings/spi/qcom,spi-qup.txt
 b/Documentation/devicetree/bindings/spi/qcom,spi-qup.txt
+@@ -27,6 +27,11 @@ Optional properties:
+ - spi-max-frequency: Specifies maximum SPI clock frequency,
+  Units - Hz. Definition as per
+  Documentation/devicetree/bindings/spi/spi-bus.txt
++- dmas : Two DMA channel specifiers following the convention 
outlined
++ in bindings/dma/dma.txt
++- dma-names: Names for the dma channels, if present. There must be at
++ least one channel named "tx" for transmit and named "rx" 
for
++ receive.
+ - num-cs: total number of chipselects
+ - cs-gpios:   should specify GPIOs used for chipselects.
+   The gpios will be referred to as reg =  in the SPI child
+@@ -51,6 +56,10 @@ Example:
+   clocks = <&gcc GCC_BLSP2_QUP2_SPI_APPS_CLK>, <&gcc 
GCC_BLSP2_AHB_CLK>;
+   clock-names = "core", "iface";
+ 
++  dmas = <&am

[OpenWrt-Devel] [PATCH 2/4] ipq806x: enable GMAC support in DTS

2015-02-23 Thread Mathieu Olivari
This adds the GMAC entries in the ipq806x dtsi file as well as in the
ap148 specific dts file.

This also adds the MDIO change as well.

Signed-off-by: Mathieu Olivari 
---
 .../ipq806x/patches/700-add-gmac-dts-suport.patch  | 172 +
 1 file changed, 172 insertions(+)
 create mode 100644 target/linux/ipq806x/patches/700-add-gmac-dts-suport.patch

diff --git a/target/linux/ipq806x/patches/700-add-gmac-dts-suport.patch 
b/target/linux/ipq806x/patches/700-add-gmac-dts-suport.patch
new file mode 100644
index 000..89ebe66
--- /dev/null
+++ b/target/linux/ipq806x/patches/700-add-gmac-dts-suport.patch
@@ -0,0 +1,172 @@
+--- a/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
 b/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
+@@ -18,8 +18,15 @@
+   bootargs = "console=ttyMSM0,115200 root=/dev/mtdblock12 
rootfstype=squashfs,jffs2";
+   };
+ 
++  aliases {
++  mdio-gpio0 = &mdio0;
++  };
++
+   soc {
+   pinmux@80 {
++  pinctrl-0 = <&mdio0_pins &rgmii2_pins>;
++  pinctrl-names = "default";
++
+   i2c4_pins: i2c4_pinmux {
+   pins = "gpio12", "gpio13";
+   function = "gsbi4";
+@@ -34,6 +41,25 @@
+   bias-none;
+   };
+   };
++
++  mdio0_pins: mdio0_pins {
++  mux {
++  pins = "gpio0", "gpio1";
++  function = "gpio";
++  drive-strength = <8>;
++  bias-disable;
++  };
++  };
++
++  rgmii2_pins: rgmii2_pins {
++  mux {
++  pins = "gpio27", "gpio28", "gpio29", 
"gpio30", "gpio31", "gpio32",
++ "gpio51", "gpio52", "gpio59", 
"gpio60", "gpio61", "gpio62" ;
++  function = "rgmii2";
++  drive-strength = <8>;
++  bias-disable;
++  };
++  };
+   };
+ 
+   gsbi@1630 {
+@@ -72,6 +98,7 @@
+   #size-cells = <1>;
+   spi-max-frequency = <5000>;
+   reg = <0>;
++  m25p,fast-read;
+ 
+   partition@0 {
+   label = "0:SBL1";
+@@ -148,5 +175,66 @@
+   sata@2900 {
+   status = "ok";
+   };
++
++  mdio0: mdio {
++  compatible = "virtual,mdio-gpio";
++  #address-cells = <1>;
++  #size-cells = <0>;
++  gpios = <&qcom_pinmux 1 0 &qcom_pinmux 0 0>;
++
++  phy0: ethernet-phy@0 {
++  device_type = "ethernet-phy";
++  reg = <0>;
++  qca,ar8327-initvals = <
++  0x4 0x760   /* PAD0_MODE */
++  0x8 0x100   /* PAD5_MODE */
++  0xc 0x80/* PAD6_MODE */
++  0x000e4 0xaa545 /* MAC_POWER_SEL */
++  0x000e0 0xc74164de  /* SGMII_CTRL */
++  0x0007c 0x4e/* PORT0_STATUS */
++  0x00094 0x4e/* PORT6_STATUS */
++  >;
++  };
++
++  phy4: ethernet-phy@4 {
++  device_type = "ethernet-phy";
++  reg = <4>;
++  };
++  };
++
++  nss-gmac-common {
++  reg = <0x0300 0x 0x1bb0 0x 
0x0090 0x4000>;
++  reg-names = "nss_reg_base" , "qsgmii_reg_base", 
"clk_ctl_base";
++  };
++
++  gmac1: ethernet@3720 {
++  status = "ok";
++  phy-mode = "rgmii";
++  qcom,id = <1>;
++  

[OpenWrt-Devel] [PATCH 3/4] kernel: add qca-nss-gmac as a new module

2015-02-23 Thread Mathieu Olivari
This driver is used on IPQ806x to instanciate & drive the ethernet
interfaces.

Signed-off-by: Mathieu Olivari 
---
 package/kernel/qca-nss-gmac/Makefile | 50 
 1 file changed, 50 insertions(+)
 create mode 100644 package/kernel/qca-nss-gmac/Makefile

diff --git a/package/kernel/qca-nss-gmac/Makefile 
b/package/kernel/qca-nss-gmac/Makefile
new file mode 100644
index 000..d994770
--- /dev/null
+++ b/package/kernel/qca-nss-gmac/Makefile
@@ -0,0 +1,50 @@
+#
+# Copyright (c) 2015 The Linux Foundation. All rights reserved.
+#
+
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/kernel.mk
+
+PKG_NAME:=qca-nss-gmac
+PKG_VERSION:=20150210
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=git://codeaurora.org/quic/qsdk/oss/lklm/nss-gmac
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=969aab0aff40a3a5afe70d0f00e783b1c57aaea6
+
+PKG_LICENSE:=ISC
+
+include $(INCLUDE_DIR)/package.mk
+
+define KernelPackage/qca-nss-gmac
+  SECTION:=kernel
+  CATEGORY:=Kernel modules
+  SUBMENU:=Network Devices
+  DEPENDS:=@TARGET_ipq806x
+  TITLE:=Kernel driver for NSS gmac
+  FILES:=$(PKG_BUILD_DIR)/ipq806x/qca-nss-gmac.ko
+  AUTOLOAD:=$(call AutoProbe,qca-nss-gmac)
+endef
+
+define KernelPackage/qca-nss-gmac/Description
+This package contains a NSS driver for QCA chipset
+endef
+
+EXTRA_CFLAGS+= \
+   -DCONFIG_NSS_DEBUG_LEVEL=4 \
+   -I$(PKG_BUILD_DIR)/nss_hal/include \
+   -I$(PKG_BUILD_DIR)/nss_hal/$(BOARD)
+
+define Build/Compile
+   $(MAKE) -C "$(LINUX_DIR)" \
+   CROSS_COMPILE="$(TARGET_CROSS)" \
+   ARCH="$(LINUX_KARCH)" \
+   SUBDIRS="$(PKG_BUILD_DIR)" \
+   EXTRA_CFLAGS="$(EXTRA_CFLAGS)" \
+   modules
+endef
+
+$(eval $(call KernelPackage,qca-nss-gmac))
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 4/4] ipq806x: initialize the network on AP148

2015-02-23 Thread Mathieu Olivari
Signed-off-by: Mathieu Olivari 
---
 .../ipq806x/base-files/etc/uci-defaults/network| 32 ++
 1 file changed, 32 insertions(+)
 create mode 100755 target/linux/ipq806x/base-files/etc/uci-defaults/network

diff --git a/target/linux/ipq806x/base-files/etc/uci-defaults/network 
b/target/linux/ipq806x/base-files/etc/uci-defaults/network
new file mode 100755
index 000..34e9fe4
--- /dev/null
+++ b/target/linux/ipq806x/base-files/etc/uci-defaults/network
@@ -0,0 +1,32 @@
+#!/bin/sh
+#
+# Copyright (c) 2015 The Linux Foundation. All rights reserved.
+# Copyright (C) 2011 OpenWrt.org
+#
+
+[ -e /etc/config/network ] && exit 0
+
+touch /etc/config/network
+
+. /lib/functions/uci-defaults.sh
+. /lib/ipq806x.sh
+
+ucidef_set_interface_loopback
+
+board=$(ipq806x_board_name)
+
+case "$board" in
+ap148)
+   ucidef_set_interfaces_lan_wan "eth1" "eth0"
+   ucidef_add_switch "switch0" "1" "1"
+   ucidef_add_switch_vlan "switch0" "1" "6 1 2 3 4"
+   ucidef_add_switch_vlan "switch0" "2" "0 5"
+   ;;
+*)
+   echo "Unsupported hardware. Network interfaces not intialized"
+   ;;
+esac
+
+uci commit network
+
+exit 0
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/4] ipq806x: enable ar8xxx switch family support

2015-02-23 Thread Mathieu Olivari
Signed-off-by: Mathieu Olivari 
---
 target/linux/ipq806x/config-3.18 | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/target/linux/ipq806x/config-3.18 b/target/linux/ipq806x/config-3.18
index 7cda416..51f2de7 100644
--- a/target/linux/ipq806x/config-3.18
+++ b/target/linux/ipq806x/config-3.18
@@ -3,6 +3,7 @@ CONFIG_ALIGNMENT_TRAP=y
 # CONFIG_APM_EMULATION is not set
 CONFIG_APQ_GCC_8084=y
 CONFIG_APQ_MMCC_8084=y
+CONFIG_AR8216_PHY=y
 CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y
 CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y
 CONFIG_ARCH_HAS_SG_CHAIN=y
@@ -103,7 +104,9 @@ CONFIG_DTC=y
 # CONFIG_DW_DMAC_PCI is not set
 CONFIG_DYNAMIC_DEBUG=y
 # CONFIG_EMAC_ROCKCHIP is not set
+CONFIG_ETHERNET_PACKET_MANGLE=y
 CONFIG_FREEZER=y
+CONFIG_FW_LOADER_USER_HELPER=y
 CONFIG_GENERIC_ALLOCATOR=y
 CONFIG_GENERIC_BUG=y
 CONFIG_GENERIC_CLOCKEVENTS=y
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 0/4] ipq806x: Add ethernet support

2015-02-23 Thread Mathieu Olivari
These 4 changes add ethernet support to IPQ806x. It's using the driver
available on codeaurora.org and updates the corresponding DT information.
Same driver has also been posted to LKML:
https://lkml.org/lkml/2015/1/8/534

Its needs rework for kernel.org upstream acceptance.

Mathieu Olivari (4):
  ipq806x: enable ar8xxx switch family support
  ipq806x: enable GMAC support in DTS
  kernel: add qca-nss-gmac as a new module
  ipq806x: initialize the network on AP148

 package/kernel/qca-nss-gmac/Makefile   |  50 ++
 .../ipq806x/base-files/etc/uci-defaults/network|  32 
 target/linux/ipq806x/config-3.18   |   3 +
 .../ipq806x/patches/700-add-gmac-dts-suport.patch  | 172 +
 4 files changed, 257 insertions(+)
 create mode 100644 package/kernel/qca-nss-gmac/Makefile
 create mode 100755 target/linux/ipq806x/base-files/etc/uci-defaults/network
 create mode 100644 target/linux/ipq806x/patches/700-add-gmac-dts-suport.patch

-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] ipq806x: fix spi read issues observed with SMP enabled

2015-02-23 Thread Mathieu Olivari
This change is fixing the issues observed when booting from NOR flash
with SMP enabled.

Error logs below:
building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of
xref (0 dead, 0 orphan) found.
m25p80 spi32766.0: SPI transfer failed: -110
spi_master spi32766: failed to transfer one message from queue
jffs2: Write of 873 bytes at 0x019001e8 failed. returned 0, retlen 792

Patch is cherry-picked from here:
https://www.codeaurora.org/cgit/quic/qsdk/oss/kernel/linux-msm/commit/drivers/spi/spi-qup.c?h=coconut_20140924&id=4faba89e3ffbb1c5f6232651375b9b3212b50f02

More details in the patch file.

Signed-off-by: Mathieu Olivari 
---
 .../003-spi-qup-Ensure-done-detection.patch| 56 ++
 1 file changed, 56 insertions(+)
 create mode 100644 
target/linux/ipq806x/patches/003-spi-qup-Ensure-done-detection.patch

diff --git 
a/target/linux/ipq806x/patches/003-spi-qup-Ensure-done-detection.patch 
b/target/linux/ipq806x/patches/003-spi-qup-Ensure-done-detection.patch
new file mode 100644
index 000..7052227
--- /dev/null
+++ b/target/linux/ipq806x/patches/003-spi-qup-Ensure-done-detection.patch
@@ -0,0 +1,56 @@
+From 4faba89e3ffbb1c5f6232651375b9b3212b50f02 Mon Sep 17 00:00:00 2001
+From: Andy Gross 
+Date: Thu, 15 Jan 2015 17:56:02 -0800
+Subject: [PATCH] spi: qup: Ensure done detection
+
+This patch fixes an issue where a SPI transaction has completed, but the done
+condition is missed.  This occurs because at the time of interrupt the
+MAX_INPUT_DONE_FLAG is not asserted.  However, in the process of reading blocks
+of data from the FIFO, the last portion of data comes in.
+
+The opflags read at the beginning of the irq handler no longer matches the
+current opflag state.  To get around this condition, the block read function
+should update the opflags so that done detection is correct after the return.
+
+Change-Id: If109e0eeb432f96000d765c4b34dbb2269f8093f
+Signed-off-by: Andy Gross 
+---
+ drivers/spi/spi-qup.c | 12 +++-
+ 1 file changed, 7 insertions(+), 5 deletions(-)
+
+--- a/drivers/spi/spi-qup.c
 b/drivers/spi/spi-qup.c
+@@ -298,7 +298,7 @@ static void spi_qup_fifo_write(struct sp
+ }
+ 
+ static void spi_qup_block_read(struct spi_qup *controller,
+-  struct spi_transfer *xfer)
++  struct spi_transfer *xfer, u32 *opflags)
+ {
+   u32 data;
+   u32 reads_per_blk = controller->in_blk_sz >> 2;
+@@ -327,10 +327,12 @@ static void spi_qup_block_read(struct sp
+ 
+   /*
+* Due to extra stickiness of the QUP_OP_IN_SERVICE_FLAG during block
+-   * reads, it has to be cleared again at the very end
++   * reads, it has to be cleared again at the very end.  However, be sure
++   * to refresh opflags value because MAX_INPUT_DONE_FLAG may now be
++   * present and this is used to determine if transaction is complete
+*/
+-  if (readl_relaxed(controller->base + QUP_OPERATIONAL) &
+-  QUP_OP_MAX_INPUT_DONE_FLAG)
++  *opflags = readl_relaxed(controller->base + QUP_OPERATIONAL);
++  if (*opflags & QUP_OP_MAX_INPUT_DONE_FLAG)
+   writel_relaxed(QUP_OP_IN_SERVICE_FLAG,
+   controller->base + QUP_OPERATIONAL);
+ 
+@@ -633,7 +635,7 @@ static irqreturn_t spi_qup_qup_irq(int i
+   if (!controller->use_dma) {
+   if (opflags & QUP_OP_IN_SERVICE_FLAG) {
+   if (opflags & QUP_OP_IN_BLOCK_READ_REQ)
+-  spi_qup_block_read(controller, xfer);
++  spi_qup_block_read(controller, xfer, &opflags);
+   else
+   spi_qup_fifo_read(controller, xfer);
+   }
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH V2 2/2] ipq806x: fix "reboot" command

2015-02-20 Thread Mathieu Olivari
The watchdog driver already registers a restart notifier, we just have
to enable it in the config and in the DT to fix the "reboot" command.

This is done by integratin the following patch-set:
https://lkml.org/lkml/2015/2/20/610

I'm copy-pasting the description below:
qcom-wdt is currently assuming the presence of a dedicated node in DT
to gets its configuration. However, on msm architecture, the watchdog is
usually part of the timer block. So this patch-set is changing the driver
and slightly enhancing the timer DT bindings to provide the relevant clocks
and interrupts.

Signed-off-by: Mathieu Olivari 
---
 ...atchdog-qcom-use-timer-devicetree-binding.patch | 72 ++
 ...m-add-description-of-KPSS-WDT-for-IPQ8064.patch | 53 
 ...-watchdog-entries-to-DT-timer-binding-doc.patch | 50 +++
 3 files changed, 175 insertions(+)
 create mode 100644 
target/linux/ipq806x/patches/011-watchdog-qcom-use-timer-devicetree-binding.patch
 create mode 100644 
target/linux/ipq806x/patches/012-ARM-qcom-add-description-of-KPSS-WDT-for-IPQ8064.patch
 create mode 100644 
target/linux/ipq806x/patches/013-ARM-msm-add-watchdog-entries-to-DT-timer-binding-doc.patch

diff --git 
a/target/linux/ipq806x/patches/011-watchdog-qcom-use-timer-devicetree-binding.patch
 
b/target/linux/ipq806x/patches/011-watchdog-qcom-use-timer-devicetree-binding.patch
new file mode 100644
index 000..0cd7da1
--- /dev/null
+++ 
b/target/linux/ipq806x/patches/011-watchdog-qcom-use-timer-devicetree-binding.patch
@@ -0,0 +1,72 @@
+From fded70251b1b58f68de1d3757ece9965f0b75452 Mon Sep 17 00:00:00 2001
+From: Mathieu Olivari 
+Date: Thu, 19 Feb 2015 20:19:30 -0800
+Subject: [PATCH 1/3] watchdog: qcom: use timer devicetree binding
+
+MSM watchdog configuration happens in the same register block as the
+timer, so we'll use the same binding as the existing timer.
+
+The qcom-wdt will now be probed when devicetree has an entry compatible
+with "qcom,kpss-timer" or "qcom-scss-timer".
+
+Signed-off-by: Mathieu Olivari 
+---
+ drivers/watchdog/qcom-wdt.c | 21 +++--
+ 1 file changed, 15 insertions(+), 6 deletions(-)
+
+diff --git a/drivers/watchdog/qcom-wdt.c b/drivers/watchdog/qcom-wdt.c
+index aa85618..aa03ca8 100644
+--- a/drivers/watchdog/qcom-wdt.c
 b/drivers/watchdog/qcom-wdt.c
+@@ -20,9 +20,9 @@
+ #include 
+ #include 
+ 
+-#define WDT_RST   0x0
+-#define WDT_EN0x8
+-#define WDT_BITE_TIME 0x24
++#define WDT_RST   0x38
++#define WDT_EN0x40
++#define WDT_BITE_TIME 0x5C
+ 
+ struct qcom_wdt {
+   struct watchdog_device  wdd;
+@@ -117,6 +117,8 @@ static int qcom_wdt_probe(struct platform_device *pdev)
+ {
+   struct qcom_wdt *wdt;
+   struct resource *res;
++  struct device_node *np = pdev->dev.of_node;
++  u32 percpu_offset;
+   int ret;
+ 
+   wdt = devm_kzalloc(&pdev->dev, sizeof(*wdt), GFP_KERNEL);
+@@ -124,6 +126,14 @@ static int qcom_wdt_probe(struct platform_device *pdev)
+   return -ENOMEM;
+ 
+   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++
++  /* We use CPU0's DGT for the watchdog */
++  if (of_property_read_u32(np, "cpu-offset", &percpu_offset))
++  percpu_offset = 0;
++
++  res->start += percpu_offset;
++  res->end += percpu_offset;
++
+   wdt->base = devm_ioremap_resource(&pdev->dev, res);
+   if (IS_ERR(wdt->base))
+   return PTR_ERR(wdt->base);
+@@ -203,9 +213,8 @@ static int qcom_wdt_remove(struct platform_device *pdev)
+ }
+ 
+ static const struct of_device_id qcom_wdt_of_table[] = {
+-  { .compatible = "qcom,kpss-wdt-msm8960", },
+-  { .compatible = "qcom,kpss-wdt-apq8064", },
+-  { .compatible = "qcom,kpss-wdt-ipq8064", },
++  { .compatible = "qcom,kpss-timer" },
++  { .compatible = "qcom,scss-timer" },
+   { },
+ };
+ MODULE_DEVICE_TABLE(of, qcom_wdt_of_table);
+-- 
+1.9.1
+
diff --git 
a/target/linux/ipq806x/patches/012-ARM-qcom-add-description-of-KPSS-WDT-for-IPQ8064.patch
 
b/target/linux/ipq806x/patches/012-ARM-qcom-add-description-of-KPSS-WDT-for-IPQ8064.patch
new file mode 100644
index 000..24a093a
--- /dev/null
+++ 
b/target/linux/ipq806x/patches/012-ARM-qcom-add-description-of-KPSS-WDT-for-IPQ8064.patch
@@ -0,0 +1,53 @@
+From 297cf8136ecd6a56520888fd28948393766b8ee7 Mon Sep 17 00:00:00 2001
+From: Mathieu Olivari 
+Date: Thu, 19 Feb 2015 20:27:39 -0800
+Subject: [PATCH 2/3] ARM: qcom: add description of KPSS WDT for IPQ8064
+
+Add the watchdog related entries to the Krait Processor Sub-system
+(KPSS) timer IPQ8064 devicetree section. Also, add a fixed-clock
+description of SLEEP_CLK, which will do for now.
+
+Signed-off-by: Josh Cartwright 
+Signed-off-by: Mathieu Olivari 
+---
+ arch/arm/boot/dts/qcom-ipq8064.dtsi | 14 +-
+ 1 fi

[OpenWrt-Devel] [PATCH V2 1/2] ipq806x: enable watchdog kernel option

2015-02-20 Thread Mathieu Olivari
Some bootloaders seem to trigger the watchdog during the boot process,
therefore the lack of watchdog driver trigger a reboot a few seconds
after boot. So we'll enable it here to avoid it.

Signed-off-by: Mathieu Olivari 
---
 target/linux/ipq806x/config-3.18 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/target/linux/ipq806x/config-3.18 b/target/linux/ipq806x/config-3.18
index 22d8092..7cda416 100644
--- a/target/linux/ipq806x/config-3.18
+++ b/target/linux/ipq806x/config-3.18
@@ -290,7 +290,7 @@ CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_QCOM_BAM_DMA=y
 CONFIG_QCOM_GSBI=y
 CONFIG_QCOM_SCM=y
-# CONFIG_QCOM_WDT is not set
+CONFIG_QCOM_WDT=y
 # CONFIG_RCU_BOOST is not set
 CONFIG_RCU_CPU_STALL_TIMEOUT=21
 CONFIG_RCU_CPU_STALL_VERBOSE=y
@@ -357,6 +357,7 @@ CONFIG_VECTORS_BASE=0x
 CONFIG_VFP=y
 CONFIG_VFPv3=y
 CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_WATCHDOG_CORE=y
 # CONFIG_WIZNET_W5100 is not set
 # CONFIG_WIZNET_W5300 is not set
 # CONFIG_WL_TI is not set
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


  1   2   >