[OpenWrt-Devel] [PATCH 1/4] package: kernel: modules: Enable Dual-Role support for DWC2 USB

2016-05-02 Thread Marek Vasut
Enable configuration option which allows DWC2 USB OTG core
to operate in Dual-Role mode.

Signed-off-by: Marek Vasut 
---
 package/kernel/linux/modules/usb.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/kernel/linux/modules/usb.mk 
b/package/kernel/linux/modules/usb.mk
index 8c5a2ab..b41880b 100644
--- a/package/kernel/linux/modules/usb.mk
+++ b/package/kernel/linux/modules/usb.mk
@@ -488,6 +488,7 @@ define KernelPackage/usb-dwc2
CONFIG_USB_DWC2_VERBOSE=n \
CONFIG_USB_DWC2_TRACK_MISSED_SOFS=n \
CONFIG_USB_DWC2_DEBUG_PERIODIC=n
+   CONFIG_USB_DWC2_DUAL_ROLE=y
   FILES:= \
$(LINUX_DIR)/drivers/usb/dwc2/dwc2.ko \
$(LINUX_DIR)/drivers/usb/dwc2/dwc2_platform.ko@lt4.3
-- 
2.7.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/4] package: kernel: Enable support for DWC2 USB on SoCFPGA

2016-05-02 Thread Marek Vasut
This patch enables the DWC2 modules for the Altera SoCFPGA target.

Signed-off-by: Marek Vasut 
---
 package/kernel/linux/modules/usb.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/kernel/linux/modules/usb.mk 
b/package/kernel/linux/modules/usb.mk
index 0343cbb..22b7f64 100644
--- a/package/kernel/linux/modules/usb.mk
+++ b/package/kernel/linux/modules/usb.mk
@@ -497,7 +497,7 @@ $(eval $(call KernelPackage,usb2-pci))
 
 define KernelPackage/usb-dwc2
   TITLE:=DWC2 USB controller driver
-  
DEPENDS:=+(TARGET_brcm2708||TARGET_at91||TARGET_brcm63xx||TARGET_mxs||TARGET_imx6||TARGET_omap):kmod-usb-gadget
+  
DEPENDS:=+(TARGET_brcm2708||TARGET_at91||TARGET_brcm63xx||TARGET_mxs||TARGET_imx6||TARGET_omap||TARGET_socfpga):kmod-usb-gadget
   KCONFIG:= \
CONFIG_USB_DWC2 \
CONFIG_USB_DWC2_PCI \
-- 
2.7.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/4] package: kernel: modules: Add USB Mass Storage package

2016-05-02 Thread Marek Vasut
Add package which enables building of the USB Mass Storage
support kernel modules (USB MSG).

Signed-off-by: Marek Vasut 
---
 package/kernel/linux/modules/usb.mk | 18 ++
 1 file changed, 18 insertions(+)

diff --git a/package/kernel/linux/modules/usb.mk 
b/package/kernel/linux/modules/usb.mk
index b41880b..0343cbb 100644
--- a/package/kernel/linux/modules/usb.mk
+++ b/package/kernel/linux/modules/usb.mk
@@ -297,6 +297,24 @@ endef
 $(eval $(call KernelPackage,usb-mass-storage-gadget))
 
 
+define KernelPackage/usb-storage-gadget
+  TITLE:=USB Mass Storage Gadget support
+  KCONFIG:=CONFIG_USB_F_MASS_STORAGE
+  DEPENDS:=+kmod-usb-gadget +kmod-usb-lib-composite
+  FILES:= \
+   $(LINUX_DIR)/drivers/usb/gadget/function/usb_f_mass_storage.ko \
+   $(LINUX_DIR)/drivers/usb/gadget/legacy/g_storage.ko
+  AUTOLOAD:=$(call AutoLoad,52,usb_f_mass_storage g_storage)
+  $(call AddDepends/usb)
+endef
+
+define KernelPackage/usb-storage-gadget/description
+  Kernel support for USB Mass Storage Gadget.
+endef
+
+$(eval $(call KernelPackage,usb-storage-gadget))
+
+
 define KernelPackage/usb-uhci
   TITLE:=Support for UHCI controllers
   KCONFIG:= \
-- 
2.7.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 4/4] target: socfpga: Add Altera SoCFPGA support

2016-05-02 Thread Marek Vasut
This patch adds support for the Altera SoCFPGA target.
Both generic target and Terasic SoCkit boards are supported.

Signed-off-by: Marek Vasut 
---
 package/boot/uboot-socfpga/Makefile|  97 +++
 ...ga-Drop-space-after-loadaddr-in-extra-env.patch | 101 +++
 ...fpga-Tweak-SoCkit-default-env-for-OpenWRT.patch |  65 ++
 package/kernel/linux/modules/usb.mk|   4 +-
 target/linux/socfpga/Makefile  |  39 ++
 target/linux/socfpga/base-files.mk |   3 +
 target/linux/socfpga/base-files/etc/fw_env.config  |   3 +
 .../socfpga/base-files/etc/init.d/sockit_vtcon |  15 +
 .../socfpga/base-files/etc/uci-defaults/01_leds|  22 +
 .../socfpga/base-files/etc/uci-defaults/02_network |  25 +
 .../base-files/lib/preinit/03_socfpga_detect   |   9 +
 .../socfpga/base-files/lib/preinit/79_move_config  |  18 +
 target/linux/socfpga/base-files/lib/socfpga.sh |  48 ++
 .../socfpga/base-files/lib/upgrade/platform.sh |  37 ++
 .../linux/socfpga/base-files/lib/upgrade/sockit.sh |  88 +++
 target/linux/socfpga/config-4.4| 695 +
 target/linux/socfpga/image/Config.in   |   5 +
 target/linux/socfpga/image/Makefile| 135 
 .../linux/socfpga/image/gen_socfpga_sdcard_img.sh  |  41 ++
 target/linux/socfpga/image/ubinize.cfg |  13 +
 ...-gpio-altera-Fix-altr-interrupt-type-prop.patch |  45 ++
 ...dwc2-gadget-Repair-DSTS-register-decoding.patch |  36 ++
 ...-dts-Enable-MMC-support-at-correct-place-.patch |  90 +++
 ...ocfpga-Add-support-for-HPS-LEDs-on-SoCKit.patch |  66 ++
 ...ga-Add-support-for-HPS-KEYs-SWs-on-SoCKit.patch | 100 +++
 target/linux/socfpga/profiles/100-generic.mk   |  17 +
 .../linux/socfpga/profiles/110-socfpga_sockit.mk   |  28 +
 27 files changed, 1843 insertions(+), 2 deletions(-)
 create mode 100644 package/boot/uboot-socfpga/Makefile
 create mode 100644 
package/boot/uboot-socfpga/patches/0001-arm-socfpga-Drop-space-after-loadaddr-in-extra-env.patch
 create mode 100644 
package/boot/uboot-socfpga/patches/0002-arm-socfpga-Tweak-SoCkit-default-env-for-OpenWRT.patch
 create mode 100644 target/linux/socfpga/Makefile
 create mode 100644 target/linux/socfpga/base-files.mk
 create mode 100644 target/linux/socfpga/base-files/etc/fw_env.config
 create mode 100755 target/linux/socfpga/base-files/etc/init.d/sockit_vtcon
 create mode 100644 target/linux/socfpga/base-files/etc/uci-defaults/01_leds
 create mode 100644 target/linux/socfpga/base-files/etc/uci-defaults/02_network
 create mode 100644 
target/linux/socfpga/base-files/lib/preinit/03_socfpga_detect
 create mode 100644 target/linux/socfpga/base-files/lib/preinit/79_move_config
 create mode 100755 target/linux/socfpga/base-files/lib/socfpga.sh
 create mode 100755 target/linux/socfpga/base-files/lib/upgrade/platform.sh
 create mode 100644 target/linux/socfpga/base-files/lib/upgrade/sockit.sh
 create mode 100644 target/linux/socfpga/config-4.4
 create mode 100644 target/linux/socfpga/image/Config.in
 create mode 100644 target/linux/socfpga/image/Makefile
 create mode 100755 target/linux/socfpga/image/gen_socfpga_sdcard_img.sh
 create mode 100644 target/linux/socfpga/image/ubinize.cfg
 create mode 100644 
target/linux/socfpga/patches-4.4/0001-dt-bindings-gpio-altera-Fix-altr-interrupt-type-prop.patch
 create mode 100644 
target/linux/socfpga/patches-4.4/0002-usb-dwc2-gadget-Repair-DSTS-register-decoding.patch
 create mode 100644 
target/linux/socfpga/patches-4.4/0003-ARM-socfpga-dts-Enable-MMC-support-at-correct-place-.patch
 create mode 100644 
target/linux/socfpga/patches-4.4/0004-ARM-socfpga-Add-support-for-HPS-LEDs-on-SoCKit.patch
 create mode 100644 
target/linux/socfpga/patches-4.4/0005-ARM-socfpga-Add-support-for-HPS-KEYs-SWs-on-SoCKit.patch
 create mode 100644 target/linux/socfpga/profiles/100-generic.mk
 create mode 100644 target/linux/socfpga/profiles/110-socfpga_sockit.mk

diff --git a/package/boot/uboot-socfpga/Makefile 
b/package/boot/uboot-socfpga/Makefile
new file mode 100644
index 000..42fcb43
--- /dev/null
+++ b/package/boot/uboot-socfpga/Makefile
@@ -0,0 +1,97 @@
+#
+# Copyright (C) 2015 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:=u-boot
+PKG_VERSION:=2016.03
+PKG_RELEASE:=1
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:= \
+   http://mirror2.openwrt.org/sources \
+   ftp://ftp.denx.de/pub/u-boot
+PKG_MD5SUM:=973c1d896be751321cc3aafa564f64b2
+
+PKG_LICENSE:=GPL-2.0 GPL-2.0+
+PKG_LICENSE_FILES:=Licenses/README
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define uboot/Default
+  TITLE:=
+  CONFIG:=
+  IMAGE:=
+endef
+
+define uboot/socfpga_cyclone5_sockit
+  TITLE := U-Boot for Terasic SoCkit board
+  CONFIG := socfpga_sockit

[OpenWrt-Devel] [PATCH] bcm53xx: Move SF mmap patch

2016-05-24 Thread Marek Vasut
The patch adding SPI flash mmap read capability does not compile due to missing
m25p80_rx_nbits() function. Move it to bcm53xx patch directory, where the patch
adding this m25p80_rx_nbits() function resides.

Signed-off-by: Marek Vasut 
---
 .../045-mtd-devices-m25p80-add-support-for-mmap-read-request.patch| 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename target/linux/{generic => 
bcm53xx}/patches-4.4/045-mtd-devices-m25p80-add-support-for-mmap-read-request.patch
 (100%)

diff --git 
a/target/linux/generic/patches-4.4/045-mtd-devices-m25p80-add-support-for-mmap-read-request.patch
 
b/target/linux/bcm53xx/patches-4.4/045-mtd-devices-m25p80-add-support-for-mmap-read-request.patch
similarity index 100%
rename from 
target/linux/generic/patches-4.4/045-mtd-devices-m25p80-add-support-for-mmap-read-request.patch
rename to 
target/linux/bcm53xx/patches-4.4/045-mtd-devices-m25p80-add-support-for-mmap-read-request.patch
-- 
2.7.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] u-boot-socfpga: Update to 2016.05

2016-05-24 Thread Marek Vasut
Update the U-Boot package to upstream 2016.05 version. This version
improves overall performance of the platform, since it fixes cache
problems that prevented the cache from operating fully in previous
releases.

Signed-off-by: Marek Vasut 
---
 package/boot/uboot-socfpga/Makefile|   4 +-
 ...ga-Drop-space-after-loadaddr-in-extra-env.patch | 101 -
 ...pga-Tweak-SoCkit-default-env-for-OpenWRT.patch} |  12 +--
 3 files changed, 8 insertions(+), 109 deletions(-)
 delete mode 100644 
package/boot/uboot-socfpga/patches/0001-arm-socfpga-Drop-space-after-loadaddr-in-extra-env.patch
 rename 
package/boot/uboot-socfpga/patches/{0002-arm-socfpga-Tweak-SoCkit-default-env-for-OpenWRT.patch
 => 0001-arm-socfpga-Tweak-SoCkit-default-env-for-OpenWRT.patch} (91%)

diff --git a/package/boot/uboot-socfpga/Makefile 
b/package/boot/uboot-socfpga/Makefile
index 42fcb43..3fb017f 100644
--- a/package/boot/uboot-socfpga/Makefile
+++ b/package/boot/uboot-socfpga/Makefile
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=u-boot
-PKG_VERSION:=2016.03
+PKG_VERSION:=2016.05
 PKG_RELEASE:=1
 
 
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
@@ -16,7 +16,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:= \
http://mirror2.openwrt.org/sources \
ftp://ftp.denx.de/pub/u-boot
-PKG_MD5SUM:=973c1d896be751321cc3aafa564f64b2
+PKG_MD5SUM:=3a8613d753dfa707c937991a35404510
 
 PKG_LICENSE:=GPL-2.0 GPL-2.0+
 PKG_LICENSE_FILES:=Licenses/README
diff --git 
a/package/boot/uboot-socfpga/patches/0001-arm-socfpga-Drop-space-after-loadaddr-in-extra-env.patch
 
b/package/boot/uboot-socfpga/patches/0001-arm-socfpga-Drop-space-after-loadaddr-in-extra-env.patch
deleted file mode 100644
index 261afef..000
--- 
a/package/boot/uboot-socfpga/patches/0001-arm-socfpga-Drop-space-after-loadaddr-in-extra-env.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-From 04a4c90fee75c95130af1e40880c0927d56b0b61 Mon Sep 17 00:00:00 2001
-From: Marek Vasut 
-Date: Sun, 3 Apr 2016 19:11:12 +0200
-Subject: [PATCH 1/2] arm: socfpga: Drop space after 'loadaddr=' in extra env
-
-There is an incorrect space after loadaddr= in the extra environment,
-so drop it.
-
-Signed-off-by: Marek Vasut 
-Cc: Dinh Nguyen 
-Cc: Chin Liang See 

- include/configs/socfpga_arria5_socdk.h   | 2 +-
- include/configs/socfpga_cyclone5_socdk.h | 2 +-
- include/configs/socfpga_de0_nano_soc.h   | 2 +-
- include/configs/socfpga_sockit.h | 2 +-
- include/configs/socfpga_socrates.h   | 2 +-
- include/configs/socfpga_sr1500.h | 2 +-
- 6 files changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/include/configs/socfpga_arria5_socdk.h 
b/include/configs/socfpga_arria5_socdk.h
-index a0161bc..153f9f8 100644
 a/include/configs/socfpga_arria5_socdk.h
-+++ b/include/configs/socfpga_arria5_socdk.h
-@@ -56,7 +56,7 @@
- /* Extra Environment */
- #define CONFIG_EXTRA_ENV_SETTINGS \
-   "verify=n\0" \
--  "loadaddr= " __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
-+  "loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
-   "ramboot=setenv bootargs " CONFIG_BOOTARGS ";" \
-   "bootm ${loadaddr} - ${fdt_addr}\0" \
-   "bootimage=zImage\0" \
-diff --git a/include/configs/socfpga_cyclone5_socdk.h 
b/include/configs/socfpga_cyclone5_socdk.h
-index c4c4ecb..d7c339e 100644
 a/include/configs/socfpga_cyclone5_socdk.h
-+++ b/include/configs/socfpga_cyclone5_socdk.h
-@@ -56,7 +56,7 @@
- /* Extra Environment */
- #define CONFIG_EXTRA_ENV_SETTINGS \
-   "verify=n\0" \
--  "loadaddr= " __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
-+  "loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
-   "ramboot=setenv bootargs " CONFIG_BOOTARGS ";" \
-   "bootm ${loadaddr} - ${fdt_addr}\0" \
-   "bootimage=zImage\0" \
-diff --git a/include/configs/socfpga_de0_nano_soc.h 
b/include/configs/socfpga_de0_nano_soc.h
-index cbc7396..314b9bf 100644
 a/include/configs/socfpga_de0_nano_soc.h
-+++ b/include/configs/socfpga_de0_nano_soc.h
-@@ -51,7 +51,7 @@
- 
- /* Extra Environment */
- #define CONFIG_EXTRA_ENV_SETTINGS \
--  "loadaddr= " __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
-+  "loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
-   "ramboot=setenv bootargs " CONFIG_BOOTARGS ";" \
-   "bootm ${loadaddr} - ${fdt_addr}\0" \
-   "bootimage=zImage\0" \
-diff --git a/include/configs/socfpga_sockit.h 
b/include/configs/socfpga_sockit.h
-index 95e7ba6..07cfcbf 100644
 a/include/configs/socfpga_sockit.h
-+++ b/include/configs/socfpga_sockit.h
-@@ -52,7 +52,7 @@
- /* Extra Environment */
- #define CONFIG_EXTRA_ENV_SETTINGS \
-   "verify=n\0" \
-- 

[OpenWrt-Devel] [PATCH] toolchain: Backport gcc6 fixes from mainline GCC

2016-05-24 Thread Marek Vasut
   Backported from mainline
   2016-02-19  Jakub Jelinek  
   Bernd Edlinger  

   * Make-lang.in: Invoke gperf with -L C++.
   * cfns.gperf: Remove prototypes for hash and libc_name_p
   inlines.
   * cfns.h: Regenerated.
   * except.c (nothrow_libfn_p): Adjust.

Signed-off-by: Marek Vasut 
---
 ...-Bernd-Edlinger-bernd.edlinger-hotmail.de.patch | 152 +
 1 file changed, 152 insertions(+)
 create mode 100644 
toolchain/gcc/patches/4.8-linaro/005-2016-02-25-Bernd-Edlinger-bernd.edlinger-hotmail.de.patch

diff --git 
a/toolchain/gcc/patches/4.8-linaro/005-2016-02-25-Bernd-Edlinger-bernd.edlinger-hotmail.de.patch
 
b/toolchain/gcc/patches/4.8-linaro/005-2016-02-25-Bernd-Edlinger-bernd.edlinger-hotmail.de.patch
new file mode 100644
index 000..070991e
--- /dev/null
+++ 
b/toolchain/gcc/patches/4.8-linaro/005-2016-02-25-Bernd-Edlinger-bernd.edlinger-hotmail.de.patch
@@ -0,0 +1,152 @@
+From 8c3fa311caa86f61b4e28d1563d1110b44340fb2 Mon Sep 17 00:00:00 2001
+From: edlinger 
+Date: Thu, 25 Feb 2016 15:36:41 +
+Subject: [PATCH] 2016-02-25  Bernd Edlinger  
+
+Backported from mainline
+2016-02-19  Jakub Jelinek  
+Bernd Edlinger  
+
+* Make-lang.in: Invoke gperf with -L C++.
+* cfns.gperf: Remove prototypes for hash and libc_name_p
+inlines.
+* cfns.h: Regenerated.
+* except.c (nothrow_libfn_p): Adjust.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@233721 
138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/cp/Make-lang.in |  2 +-
+ gcc/cp/cfns.gperf   | 10 ++
+ gcc/cp/cfns.h   | 41 ++---
+ gcc/cp/except.c |  3 ++-
+ 4 files changed, 19 insertions(+), 37 deletions(-)
+
+diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in
+index bd1c1d7..a0ea0d4 100644
+--- a/gcc/cp/Make-lang.in
 b/gcc/cp/Make-lang.in
+@@ -111,7 +111,7 @@ else
+ # deleting the $(srcdir)/cp/cfns.h file.
+ $(srcdir)/cp/cfns.h:
+ endif
+-  gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \
++  gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L C++ \
+   $(srcdir)/cp/cfns.gperf --output-file $(srcdir)/cp/cfns.h
+ 
+ #
+diff --git a/gcc/cp/cfns.gperf b/gcc/cp/cfns.gperf
+index 05ca753..d9b16b8 100644
+--- a/gcc/cp/cfns.gperf
 b/gcc/cp/cfns.gperf
+@@ -1,3 +1,5 @@
++%language=C++
++%define class-name libc_name
+ %{
+ /* Copyright (C) 2000-2014 Free Software Foundation, Inc.
+ 
+@@ -16,14 +18,6 @@ for more details.
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3.  If not see
+ <http://www.gnu.org/licenses/>.  */
+-#ifdef __GNUC__
+-__inline
+-#endif
+-static unsigned int hash (const char *, unsigned int);
+-#ifdef __GNUC__
+-__inline
+-#endif
+-const char * libc_name_p (const char *, unsigned int);
+ %}
+ %%
+ # The standard C library functions, for feeding to gperf; the result is used
+diff --git a/gcc/cp/cfns.h b/gcc/cp/cfns.h
+index c845ddf..65801d1 100644
+--- a/gcc/cp/cfns.h
 b/gcc/cp/cfns.h
+@@ -1,5 +1,5 @@
+-/* ANSI-C code produced by gperf version 3.0.3 */
+-/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C 
cfns.gperf  */
++/* C++ code produced by gperf version 3.0.4 */
++/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L C++ 
--output-file cfns.h cfns.gperf  */
+ 
+ #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
+   && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
+@@ -28,7 +28,7 @@
+ #error "gperf generated tables don't work with this execution character set. 
Please report a bug to ."
+ #endif
+ 
+-#line 1 "cfns.gperf"
++#line 3 "cfns.gperf"
+ 
+ /* Copyright (C) 2000-2014 Free Software Foundation, Inc.
+ 
+@@ -47,25 +47,18 @@ for more details.
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3.  If not see
+ <http://www.gnu.org/licenses/>.  */
+-#ifdef __GNUC__
+-__inline
+-#endif
+-static unsigned int hash (const char *, unsigned int);
+-#ifdef __GNUC__
+-__inline
+-#endif
+-const char * libc_name_p (const char *, unsigned int);
+ /* maximum key range = 391, duplicates = 0 */
+ 
+-#ifdef __GNUC__
+-__inline
+-#else
+-#ifdef __cplusplus
+-inline
+-#endif
+-#endif
+-static unsigned int
+-hash (register const char *str, register unsigned int len)
++class libc_name
++{
++private:
++  static inline unsigned int hash (const char *str, unsigned int len);
++public:
++  static const char *libc_name_p (const char *str, unsigned int len);
++};
++
++inline unsigned int
++libc_name::hash (register const char *str, register unsigned int len)
+ {
+   static const unsi

[OpenWrt-Devel] [PATCH 1/2] package: kernel: dtc: Add device tree compiler package

2016-05-24 Thread Marek Vasut
Add package with the DT compiler v1.4.1 .

Signed-off-by: Marek Vasut 
---
 package/kernel/dtc/Makefile | 36 
 1 file changed, 36 insertions(+)
 create mode 100644 package/kernel/dtc/Makefile

diff --git a/package/kernel/dtc/Makefile b/package/kernel/dtc/Makefile
new file mode 100644
index 000..5155323
--- /dev/null
+++ b/package/kernel/dtc/Makefile
@@ -0,0 +1,36 @@
+#
+# Copyright (C) 2016 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:=dtc
+PKG_VERSION:=1.4.1
+PKG_RELEASE=$(PKG_SOURCE_VERSION)
+
+PKG_SOURCE_URL:=git://git.kernel.org/pub/scm/utils/dtc/dtc.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_VERSION:=302fca9f4c283e1994cf0a5a9ce1cf43ca15e6d2
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
+
+PKG_MAINTAINER:=Marek Vasut 
+PKG_LICENSE:=GPL-2.0+
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/dtc
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=Device Tree Compiler
+endef
+
+define Package/dtc/install
+   $(INSTALL_DIR) $(1)/usr/bin
+   $(INSTALL_BIN) $(PKG_BUILD_DIR)/dtc $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,dtc))
-- 
2.7.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/2] package: kernel: dtc: Add DTO support

2016-05-24 Thread Marek Vasut
Add patch with the DT overlay support into the DTC package.

Signed-off-by: Marek Vasut 
---
 ...ripts-dtc-Update-to-version-with-overlays.patch | 642 +
 1 file changed, 642 insertions(+)
 create mode 100644 
package/kernel/dtc/patches/0001-scripts-dtc-Update-to-version-with-overlays.patch

diff --git 
a/package/kernel/dtc/patches/0001-scripts-dtc-Update-to-version-with-overlays.patch
 
b/package/kernel/dtc/patches/0001-scripts-dtc-Update-to-version-with-overlays.patch
new file mode 100644
index 000..605d303
--- /dev/null
+++ 
b/package/kernel/dtc/patches/0001-scripts-dtc-Update-to-version-with-overlays.patch
@@ -0,0 +1,642 @@
+From 5f84cb93eef9f8a8ff7f49d593893f252744d0fe Mon Sep 17 00:00:00 2001
+From: Pantelis Antoniou 
+Date: Wed, 26 Aug 2015 18:28:08 +0300
+Subject: [PATCH] scripts/dtc: Update to version with overlays
+
+Update to mainline dtc with overlay support
+
+Signed-off-by: Pantelis Antoniou 
+---
+ checks.c |  20 +-
+ dtc-lexer.l  |   5 ++
+ dtc-parser.y |  54 ++--
+ dtc.c|  83 ++--
+ dtc.h|  13 +++-
+ livetree.c   | 202 +++
+ treesource.c |   3 +
+ util.c   |   2 +-
+ 8 files changed, 367 insertions(+), 15 deletions(-)
+
+diff --git a/checks.c b/checks.c
+index 3bf0fa4..af25c2b 100644
+--- a/checks.c
 b/checks.c
+@@ -465,8 +465,12 @@ static void fixup_phandle_references(struct check *c, 
struct node *dt,
+ 
+   refnode = get_node_by_ref(dt, m->ref);
+   if (! refnode) {
+-  FAIL(c, "Reference to non-existent node or label 
\"%s\"\n",
+-   m->ref);
++  if (!source_is_plugin)
++  FAIL(c, "Reference to non-existent node or "
++  "label \"%s\"\n", m->ref);
++  else /* mark the entry as unresolved */
++  *((cell_t *)(prop->val.val + m->offset)) =
++  cpu_to_fdt32(0x);
+   continue;
+   }
+ 
+@@ -559,7 +563,7 @@ static void check_reg_format(struct check *c, struct node 
*dt,
+   size_cells = node_size_cells(node->parent);
+   entrylen = (addr_cells + size_cells) * sizeof(cell_t);
+ 
+-  if ((prop->val.len % entrylen) != 0)
++  if (!entrylen || (prop->val.len % entrylen) != 0)
+   FAIL(c, "\"reg\" property in %s has invalid length (%d bytes) "
+"(#address-cells == %d, #size-cells == %d)",
+node->fullpath, prop->val.len, addr_cells, size_cells);
+@@ -651,6 +655,15 @@ static void 
check_obsolete_chosen_interrupt_controller(struct check *c,
+ }
+ TREE_WARNING(obsolete_chosen_interrupt_controller, NULL);
+ 
++static void check_deprecated_plugin_syntax(struct check *c,
++ struct node *dt)
++{
++  if (deprecated_plugin_syntax_warning)
++  FAIL(c, "Use '/dts-v1/ /plugin/'; syntax. /dts-v1/; /plugin/; "
++  "is going to be removed in next versions");
++}
++TREE_WARNING(deprecated_plugin_syntax, NULL);
++
+ static struct check *check_table[] = {
+   &duplicate_node_names, &duplicate_property_names,
+   &node_name_chars, &node_name_format, &property_name_chars,
+@@ -668,6 +681,7 @@ static struct check *check_table[] = {
+ 
+   &avoid_default_addr_size,
+   &obsolete_chosen_interrupt_controller,
++  &deprecated_plugin_syntax,
+ 
+   &always_fail,
+ };
+diff --git a/dtc-lexer.l b/dtc-lexer.l
+index 0ee1caf..dd44ba2 100644
+--- a/dtc-lexer.l
 b/dtc-lexer.l
+@@ -113,6 +113,11 @@ static void lexical_error(const char *fmt, ...);
+   return DT_V1;
+   }
+ 
++<*>"/plugin/" {
++  DPRINT("Keyword: /plugin/\n");
++  return DT_PLUGIN;
++  }
++
+ <*>"/memreserve/" {
+   DPRINT("Keyword: /memreserve/\n");
+   BEGIN_DEFAULT();
+diff --git a/dtc-parser.y b/dtc-parser.y
+index ea57e0a..7d9652d 100644
+--- a/dtc-parser.y
 b/dtc-parser.y
+@@ -19,6 +19,7 @@
+  */
+ %{
+ #include 
++#include 
+ 
+ #include "dtc.h"
+ #include "srcpos.h"
+@@ -52,9 +53,11 @@ extern bool treesource_error;
+   struct node *nodelist;
+   struct reserve_info *re;
+   uint64_t integer;
++  bool is_plugin;
+ }
+ 
+ %token DT_V1
++%token DT_PLUGIN
+ %token DT_MEMRESERVE
+ %token DT_LSHIFT DT_RSHIFT DT_LE DT_GE DT_EQ DT_NE DT_AND DT_OR
+ %token DT_BITS
+@@ -71,6 +74,7 @@ extern bool treesource_error;
+ 
+ %type  propdata
+ %type  propdataprefix

Re: [OpenWrt-Devel] [PATCH] bcm53xx: Move SF mmap patch

2016-05-24 Thread Marek Vasut
On 05/24/2016 04:57 PM, Felix Fietkau wrote:
> On 2016-05-24 16:48, Marek Vasut wrote:
>> The patch adding SPI flash mmap read capability does not compile due to 
>> missing
>> m25p80_rx_nbits() function. Move it to bcm53xx patch directory, where the 
>> patch
>> adding this m25p80_rx_nbits() function resides.
> This doesn't make any sense to me. The function is already in the driver
> in 4.4, it is not added by any patch...
> 
> - Felix
> 
Well is there any way to obtain kernel tree with the
target/linux/generic/patches-4.4 applied, so I can base socfpga patches
on top
of it ?

I tried git am on those patches, but that's obviously not possible,
since a lot of these patches were not generated with git-format-patch
or the relevant header was removed.

Thanks

-- 
Best regards,
Marek Vasut
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] bcm53xx: Move SF mmap patch

2016-05-24 Thread Marek Vasut
On 05/24/2016 04:57 PM, Felix Fietkau wrote:
> On 2016-05-24 16:48, Marek Vasut wrote:
>> The patch adding SPI flash mmap read capability does not compile due to 
>> missing
>> m25p80_rx_nbits() function. Move it to bcm53xx patch directory, where the 
>> patch
>> adding this m25p80_rx_nbits() function resides.
> This doesn't make any sense to me. The function is already in the driver
> in 4.4, it is not added by any patch...

OK, please drop this one and I will send a V2 of this too:
[PATCH] target: socfpga: Add support for QSPI NOR boot

-- 
Best regards,
Marek Vasut
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] OpenWrt -> LEDE git tree merge

2017-10-22 Thread Marek Vasut
On 10/22/2017 08:46 PM, Hauke Mehrtens wrote:
> Hi,
> 
> I am working on merging the missing commits from the OpenWrt git
> repository into the LEDE repository.
> 
> Here is a list of all non merge commits from the OpenWrt git repository
> and their corresponding LEDE commit IDs:
> https://github.com/hauke/openwrt-lede-merge/blob/master/commits.csv
> 
> I only looked into the non merge commits and assumed that commits with
> the same title are the same, if this is wrong please point me to some
> place where this causes problems.
> 
> I used this script to generate the csv table:
> https://github.com/hauke/openwrt-lede-merge/blob/master/openwrt-merge.py
> 
> The bigger topics I see are:
> * addition of SoCFPGA target with kernel 4.4 support
>  * Will someone port this to kernel 4.9 or provide me with hardware so I
>can try to port this and test it?

The SoCFPGA support should be pretty decent in 4.9 . To my knowledge,
there are no openwrt socfpga users, they all switched to OE.

> * There are some commits without a Signed-off-by line, I will contact
>   the authors.
> * The realview target was removed from LEDE, but it got an update to
>   kernel 4.4 in OpenWrt, how do we want to handle this? Does anyone need
>   the realview target?
> 
> Hauke
> 


-- 
Best regards,
Marek Vasut
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel