From ian at wheep.co.uk  Thu Jan  1 07:42:08 2015
From: ian at wheep.co.uk (Ian Cass)
Date: Thu, 1 Jan 2015 12:42:08 +0000
Subject: [OpenWrt-Devel] [PATCH] video-core package fix for trunk
Message-ID: <CAJq5muv+MeeAt_OXaXp9s3hb-J9GQS0gCr_U4NycavhkB9khEw@mail.gmail.com>

The latest trunk video-core package Makefile is broken. The newer kernel
builds an additional .ko that needs to be included in the package. Diff
below for package/kernel/linux/modules/video.mk

---
/home/ian/openwrt-trunk/openwrt/package/kernel/linux/modules/video.mk.orig
2015-01-01 12:35:32.260038466 +0000
+++ /home/ian/openwrt-trunk/openwrt/package/kernel/linux/modules/video.mk
2015-01-01 12:33:18.964043056 +0000
@@ -102,6 +102,7 @@ define KernelPackage/video-core
 ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,3.6.0)),1)
   FILES:= \
  $(LINUX_DIR)/drivers/media/$(V4L2_DIR)/v4l2-common.ko \
+ $(LINUX_DIR)/drivers/media/$(V4L2_DIR)/v4l2-dv-timings.ko \
  $(LINUX_DIR)/drivers/media/$(V4L2_DIR)/videodev.ko
   AUTOLOAD:=$(call AutoLoad,60, videodev v4l2-common)
 else
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150101/828be470/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From ian at wheep.co.uk  Thu Jan  1 07:45:28 2015
From: ian at wheep.co.uk (Ian Cass)
Date: Thu, 1 Jan 2015 12:45:28 +0000
Subject: [OpenWrt-Devel] [PATCH] package makefile for kernel module "hdpvr"
Message-ID: <CAJq5muuOWDd+j4uv1dk7Jf0z-OQCpGqxK7Q+2FJNodxUCmedGw@mail.gmail.com>

I've successfully built "hdpvr" driver for OpenWRT. The package diff is
below:-

---
/home/ian/openwrt-trunk/openwrt/package/kernel/linux/modules/video.mk.orig
2015-01-01 12:35:32.260038466 +0000
+++ /home/ian/openwrt-trunk/openwrt/package/kernel/linux/modules/video.mk
2015-01-01 12:42:25.460041447 +0000
@@ -102,6 +102,7 @@ define KernelPackage/video-core
 ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,3.6.0)),1)
   FILES:= \
  $(LINUX_DIR)/drivers/media/$(V4L2_DIR)/v4l2-common.ko \
+ $(LINUX_DIR)/drivers/media/$(V4L2_DIR)/v4l2-dv-timings.ko \
  $(LINUX_DIR)/drivers/media/$(V4L2_DIR)/videodev.ko
   AUTOLOAD:=$(call AutoLoad,60, videodev v4l2-common)
 else
@@ -738,3 +739,19 @@ define KernelPackage/video-gspca-konica/
 endef

 $(eval $(call KernelPackage,video-gspca-konica))
+
+define KernelPackage/video-hdpvr
+  TITLE:=Hauppauge HD PVR device support
+  DEPENDS:=@USB_SUPPORT +kmod-usb-core
+  KCONFIG:=CONFIG_VIDEO_HDPVR
+  FILES:=$(LINUX_DIR)/drivers/media/$(V4L2_USB_DIR)/hdpvr/hdpvr.ko
+  AUTOLOAD:=$(call Autoprobe,hdpvr)
+  $(call AddDepends/video)
+endef
+
+define KernelPackage/video-hdpvr/description
+ Kernel module for Hauppauge HD PVR device support
+endef
+
+$(eval $(call KernelPackage,video-hdpvr))
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150101/581fdf6e/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From fschaefer.oss at googlemail.com  Thu Jan  1 13:05:18 2015
From: fschaefer.oss at googlemail.com (=?UTF-8?B?RnJhbmsgU2Now6RmZXI=?=)
Date: Thu, 01 Jan 2015 19:05:18 +0100
Subject: [OpenWrt-Devel] [PATCH v2 2/2] dnsmasq: fix dependency problems
 of the dnsmasq-full variant.
In-Reply-To: <CAECwjAhCKHD8nv03QcdBeqZequv19TRiLnKoxAzwTrtVoy3uPw@mail.gmail.com>
References: <1419941919-30009-1-git-send-email-yszhou4tech@gmail.com>
 <1419941919-30009-2-git-send-email-yszhou4tech@gmail.com>
 <54A3D0E5.5070308@googlemail.com>
 <CAECwjAhCKHD8nv03QcdBeqZequv19TRiLnKoxAzwTrtVoy3uPw@mail.gmail.com>
Message-ID: <54A58C5E.80403@googlemail.com>


Hi Yousong,

Am 31.12.2014 um 11:48 schrieb Yousong Zhou:
>
> ...
>> tmp/.config-package.in:93:error: recursive dependency detected!
>> tmp/.config-package.in:93:      symbol PACKAGE_dnsmasq-full depends on
>> PACKAGE_dnsmasq_full_ipset
>> tmp/.config-package.in:124:     symbol PACKAGE_dnsmasq_full_ipset
>> depends on PACKAGE_dnsmasq-full
>>
>> If you make a menuconfig, the IPSET build option also doesn't show up
>> unless you have selected DNSSEC...
> There are 2 patches in this series, and the first one is needed to
> avoid the recursive dependency problem [1] from showing up (it's a
> necessary workaround for now).
>
> [1] https://lists.openwrt.org/pipermail/openwrt-devel/2014-December/030211.html

Ah... ok. Didn't notice that it touches ipset.
Works fine, sorry for the noise.


>>> diff --git a/package/network/services/dnsmasq/patches/200-let-makefile-be-aware-of-config-changes.patch b/package/network/services/dnsmasq/patches/200-let-makefile-be-aware-of-config-changes.patch
>>> new file mode 100644
>>> index 0000000..663f0e9
>>> --- /dev/null
>>> +++ b/package/network/services/dnsmasq/patches/200-let-makefile-be-aware-of-config-changes.patch
>>> @@ -0,0 +1,42 @@
>>> +Index: dnsmasq-2.72/Makefile
>>> +===================================================================
>>> +--- dnsmasq-2.72.orig/Makefile       2014-12-30 19:46:10.484921940 +0800
>>> ++++ dnsmasq-2.72/Makefile    2014-12-30 19:56:39.712926794 +0800
>>> +@@ -74,6 +74,10 @@
> <snip>
>
>> Urgh... is it really necessary to patch dnsmasqs native Makefile ?
>> Can you give us a practical and reproducable example that shows the
>> problem you are trying to solve here ?
> Patching Makefile of dnsmasq itself is necessary for the build system
> of OpenWrt and Makefile of dnsmasq to pick up a possibly updated
> config of dnsmasq-full variant.  Otherwise rebuild of dnsmasq-ful may
> not happen as expected when users enable or disable a feature with
> e.g. make menuconfig.

Ok, I can reproduce it now...
Is this patch suitable for upstream inclusion ?

Regards,
Frank
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From daniel at thewiegerts.com  Thu Jan  1 18:39:46 2015
From: daniel at thewiegerts.com (Daniel Wiegert)
Date: Fri, 2 Jan 2015 00:39:46 +0100
Subject: [OpenWrt-Devel] [PATCH] [packages] kernel: kmod-w1 - missing
	netlink support
Message-ID: <CADPUUGFiAfQvmH799LDWvHtgK0c5xqKbTMbNJYrReT5q4FcE9g@mail.gmail.com>

- updated kernel options to include netlink support. Without netlink
support kmod-w1 wont work with owfs / owserver with --w1 flag (
kernel-managed bus masters ) kmod-w1 should really have netlink support!
I've sent this patch one year ago - patchwork.openwrt.org/patch/4679/ still
waiting for it.

diff --git a/package/kernel/linux/
modules/w1.mk b/package/kernel/linux/modules/w1.mk
index c2fc649..dba1fed 100644
--- a/package/kernel/linux/modules/w1.mk
+++ b/package/kernel/linux/modules/w1.mk
@@ -1,5 +1,5 @@
#
-# Copyright (C) 2008-2010 OpenWrt.org
+# Copyright (C) 2008-2013 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@@ -12,8 +12,13 @@ W1_SLAVES_DIR:=$(LINUX_DIR)/drivers/w1/slaves
define KernelPackage/w1
SUBMENU:=$(W1_MENU)
TITLE:=Dallas's 1-wire support
- KCONFIG:=CONFIG_W1
- FILES:=$(LINUX_DIR)/drivers/w1/wire.ko
+ KCONFIG:= \
+ CONFIG_W1 \
+ CONFIG_W1_CON=y \
+ CONFIG_CONNECTOR
+ FILES:= \
+ $(LINUX_DIR)/drivers/w1/wire.ko \
+ $(LINUX_DIR)/drivers/connector/cn.ko
endef

define KernelPackage/w1/description
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150102/ddb39b6c/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From stijn at linux-ipv6.be  Thu Jan  1 21:39:34 2015
From: stijn at linux-ipv6.be (Stijn Tintel)
Date: Fri,  2 Jan 2015 03:39:34 +0100
Subject: [OpenWrt-Devel] [PATCH 1/2] octeon: remove config-default
Message-ID: <1420166375-2604-1-git-send-email-stijn@linux-ipv6.be>

Signed-off-by: Stijn Tintel <stijn at linux-ipv6.be>
---
 target/linux/octeon/config-default | 244 -------------------------------------
 1 file changed, 244 deletions(-)
 delete mode 100644 target/linux/octeon/config-default

diff --git a/target/linux/octeon/config-default b/target/linux/octeon/config-default
deleted file mode 100644
index f83daac..0000000
--- a/target/linux/octeon/config-default
+++ /dev/null
@@ -1,244 +0,0 @@
-CONFIG_64BIT=y
-CONFIG_64BIT_PHYS_ADDR=y
-CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y
-CONFIG_ARCH_DISCARD_MEMBLOCK=y
-CONFIG_ARCH_DMA_ADDR_T_64BIT=y
-CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y
-CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y
-CONFIG_ARCH_HIBERNATION_POSSIBLE=y
-CONFIG_ARCH_PHYS_ADDR_T_64BIT=y
-CONFIG_ARCH_REQUIRE_GPIOLIB=y
-CONFIG_ARCH_SPARSEMEM_ENABLE=y
-CONFIG_ARCH_SUPPORTS_MSI=y
-CONFIG_ARCH_SUSPEND_POSSIBLE=y
-CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y
-CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
-CONFIG_ARCH_WANT_OLD_COMPAT_IPC=y
-# CONFIG_ARPD is not set
-CONFIG_BINFMT_ELF32=y
-CONFIG_BLK_DEV_SD=y
-CONFIG_BLOCK_COMPAT=y
-# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
-CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
-# CONFIG_CAVIUM_CN63XXP1 is not set
-# CONFIG_CAVIUM_OCTEON_2ND_KERNEL is not set
-CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE=2
-CONFIG_CAVIUM_OCTEON_HW_FIX_UNALIGNED=y
-CONFIG_CAVIUM_OCTEON_LOCK_L2=y
-CONFIG_CAVIUM_OCTEON_LOCK_L2_EXCEPTION=y
-CONFIG_CAVIUM_OCTEON_LOCK_L2_INTERRUPT=y
-CONFIG_CAVIUM_OCTEON_LOCK_L2_LOW_LEVEL_INTERRUPT=y
-CONFIG_CAVIUM_OCTEON_LOCK_L2_MEMCPY=y
-CONFIG_CAVIUM_OCTEON_LOCK_L2_TLB=y
-CONFIG_CAVIUM_OCTEON_REFERENCE_BOARD=y
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
-CONFIG_CEVT_R4K=y
-CONFIG_CLONE_BACKWARDS=y
-CONFIG_COMPAT=y
-CONFIG_COMPAT_BRK=y
-CONFIG_COMPAT_NETLINK_MESSAGES=y
-CONFIG_CPU_BIG_ENDIAN=y
-CONFIG_CPU_CAVIUM_OCTEON=y
-CONFIG_CPU_GENERIC_DUMP_TLB=y
-CONFIG_CPU_HAS_PREFETCH=y
-CONFIG_CPU_HAS_SYNC=y
-CONFIG_CPU_MIPSR2=y
-CONFIG_CPU_RMAP=y
-CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y
-CONFIG_CPU_SUPPORTS_HIGHMEM=y
-CONFIG_CPU_SUPPORTS_HUGEPAGES=y
-CONFIG_CRAMFS=y
-CONFIG_CRC16=y
-CONFIG_CRYPTO_CRC32C=y
-CONFIG_CRYPTO_HASH=y
-CONFIG_CRYPTO_HASH2=y
-CONFIG_DEBUG_INFO=y
-CONFIG_DEBUG_SPINLOCK=y
-CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120
-CONFIG_DETECT_HUNG_TASK=y
-CONFIG_DEVKMEM=y
-CONFIG_DMA_COHERENT=y
-CONFIG_DNOTIFY=y
-CONFIG_DTC=y
-CONFIG_EARLY_PRINTK=y
-CONFIG_EDAC_SUPPORT=y
-CONFIG_ENABLE_MUST_CHECK=y
-CONFIG_EXT4_FS=y
-CONFIG_FAT_FS=y
-CONFIG_FRAME_WARN=2048
-CONFIG_FS_MBCACHE=y
-CONFIG_GENERIC_CLOCKEVENTS=y
-CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
-CONFIG_GENERIC_CMOS_UPDATE=y
-CONFIG_GENERIC_IO=y
-CONFIG_GENERIC_IRQ_SHOW=y
-CONFIG_GENERIC_PCI_IOMAP=y
-CONFIG_GENERIC_SMP_IDLE_THREAD=y
-CONFIG_GPIOLIB=y
-CONFIG_GPIO_DEVRES=y
-CONFIG_GPIO_OCTEON=y
-CONFIG_GPIO_SYSFS=y
-# CONFIG_HAMRADIO is not set
-CONFIG_HARDWARE_WATCHPOINTS=y
-CONFIG_HAS_DMA=y
-CONFIG_HAS_IOMEM=y
-CONFIG_HAS_IOPORT=y
-CONFIG_HAVE_64BIT_ALIGNED_ACCESS=y
-CONFIG_HAVE_ARCH_JUMP_LABEL=y
-CONFIG_HAVE_ARCH_KGDB=y
-CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y
-# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set
-CONFIG_HAVE_C_RECORDMCOUNT=y
-CONFIG_HAVE_DEBUG_KMEMLEAK=y
-CONFIG_HAVE_DMA_API_DEBUG=y
-CONFIG_HAVE_DMA_ATTRS=y
-CONFIG_HAVE_DYNAMIC_FTRACE=y
-CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
-CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
-CONFIG_HAVE_FUNCTION_TRACER=y
-CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
-CONFIG_HAVE_GENERIC_DMA_COHERENT=y
-CONFIG_HAVE_GENERIC_HARDIRQS=y
-CONFIG_HAVE_IDE=y
-CONFIG_HAVE_MEMBLOCK=y
-CONFIG_HAVE_MEMBLOCK_NODE_MAP=y
-CONFIG_HAVE_MEMORY_PRESENT=y
-CONFIG_HAVE_MOD_ARCH_SPECIFIC=y
-CONFIG_HAVE_NET_DSA=y
-CONFIG_HAVE_OPROFILE=y
-CONFIG_HAVE_PERF_EVENTS=y
-# CONFIG_HIGH_RES_TIMERS is not set
-CONFIG_HOLES_IN_ZONE=y
-# CONFIG_HUGETLBFS is not set
-CONFIG_HW_HAS_PCI=y
-CONFIG_HW_RANDOM=y
-CONFIG_HW_RANDOM_OCTEON=y
-CONFIG_HZ=250
-# CONFIG_HZ_100 is not set
-CONFIG_HZ_250=y
-CONFIG_HZ_PERIODIC=y
-# CONFIG_I2C_OCTEON is not set
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_IOMMU_HELPER=y
-CONFIG_IRQCHIP=y
-CONFIG_IRQ_DOMAIN=y
-CONFIG_IRQ_FORCED_THREADING=y
-CONFIG_IRQ_WORK=y
-CONFIG_JBD2=y
-CONFIG_KALLSYMS=y
-CONFIG_KEXEC=y
-CONFIG_LIBFDT=y
-CONFIG_MDIO_BOARDINFO=y
-CONFIG_MDIO_OCTEON=y
-CONFIG_MIPS=y
-CONFIG_MIPS32_COMPAT=y
-CONFIG_MIPS32_N32=y
-CONFIG_MIPS32_O32=y
-# CONFIG_MIPS_HUGE_TLB_SUPPORT is not set
-CONFIG_MIPS_L1_CACHE_SHIFT=7
-# CONFIG_MIPS_MACHINE is not set
-CONFIG_MIPS_MT_DISABLED=y
-CONFIG_MIPS_PGD_C0_CONTEXT=y
-CONFIG_MODULES_USE_ELF_REL=y
-CONFIG_MODULES_USE_ELF_RELA=y
-# CONFIG_MTD_CFI_INTELEXT is not set
-CONFIG_MTD_CMDLINE_PARTS=y
-# CONFIG_MTD_COMPLEX_MAPPINGS is not set
-CONFIG_MTD_OF_PARTS=y
-CONFIG_MTD_PHYSMAP=y
-CONFIG_MTD_PHYSMAP_OF=y
-CONFIG_MUTEX_SPIN_ON_OWNER=y
-CONFIG_NEED_SG_DMA_LENGTH=y
-CONFIG_NLS=y
-CONFIG_NLS_CODEPAGE_437=y
-CONFIG_NLS_ISO8859_1=y
-CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
-CONFIG_NR_CPUS=16
-CONFIG_NR_CPUS_DEFAULT_16=y
-CONFIG_OCTEON_ETHERNET=y
-# CONFIG_OCTEON_ILM is not set
-CONFIG_OCTEON_MGMT_ETHERNET=y
-CONFIG_OCTEON_USB=y
-CONFIG_OCTEON_WDT=y
-CONFIG_OF=y
-CONFIG_OF_ADDRESS=y
-CONFIG_OF_DEVICE=y
-CONFIG_OF_EARLY_FLATTREE=y
-CONFIG_OF_FLATTREE=y
-CONFIG_OF_GPIO=y
-CONFIG_OF_IRQ=y
-CONFIG_OF_MDIO=y
-CONFIG_OF_MTD=y
-CONFIG_OF_NET=y
-CONFIG_OF_PCI=y
-CONFIG_OF_PCI_IRQ=y
-CONFIG_PAGEFLAGS_EXTENDED=y
-# CONFIG_PARTITION_ADVANCED is not set
-# CONFIG_PATA_OCTEON_CF is not set
-CONFIG_PCI=y
-CONFIG_PCI_DOMAINS=y
-CONFIG_PERF_USE_VMALLOC=y
-CONFIG_PHYLIB=y
-CONFIG_PHYS_ADDR_T_64BIT=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_POSIX_MQUEUE_SYSCTL=y
-# CONFIG_PREEMPT_RCU is not set
-CONFIG_PROC_PAGE_MONITOR=y
-CONFIG_RCU_STALL_COMMON=y
-CONFIG_RELAY=y
-CONFIG_RFS_ACCEL=y
-CONFIG_RPS=y
-CONFIG_SCHED_DEBUG=y
-CONFIG_SCSI=y
-CONFIG_SECCOMP=y
-CONFIG_SMP=y
-CONFIG_SPARSEMEM=y
-CONFIG_SPARSEMEM_STATIC=y
-# CONFIG_SPI_OCTEON is not set
-CONFIG_SPLIT_PTLOCK_CPUS=999999
-CONFIG_STOP_MACHINE=y
-CONFIG_SWAP_IO_SPACE=y
-CONFIG_SWIOTLB=y
-CONFIG_SYSFS_DEPRECATED=y
-CONFIG_SYSFS_DEPRECATED_V2=y
-CONFIG_SYSVIPC_COMPAT=y
-CONFIG_SYS_HAS_CPU_CAVIUM_OCTEON=y
-CONFIG_SYS_HAS_DMA_OPS=y
-CONFIG_SYS_HAS_EARLY_PRINTK=y
-CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
-CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
-CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
-CONFIG_SYS_SUPPORTS_HOTPLUG_CPU=y
-CONFIG_SYS_SUPPORTS_HUGETLBFS=y
-CONFIG_SYS_SUPPORTS_SMP=y
-CONFIG_TICK_CPU_ACCOUNTING=y
-CONFIG_TREE_RCU=y
-CONFIG_UIDGID_CONVERTED=y
-CONFIG_UNINLINE_SPIN_UNLOCK=y
-CONFIG_USB=y
-CONFIG_USB_ARCH_HAS_XHCI=y
-CONFIG_USB_COMMON=y
-CONFIG_USB_EHCI_BIG_ENDIAN_MMIO=y
-CONFIG_USB_EHCI_HCD=y
-# CONFIG_USB_EHCI_HCD_PLATFORM is not set
-CONFIG_USB_EHCI_PCI=y
-CONFIG_USB_OCTEON2_COMMON=y
-CONFIG_USB_OCTEON_EHCI=y
-CONFIG_USB_OCTEON_OHCI=y
-# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
-CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
-CONFIG_USB_OHCI_HCD=y
-# CONFIG_USB_OHCI_HCD_PLATFORM is not set
-CONFIG_USB_STORAGE=y
-CONFIG_USB_SUPPORT=y
-# CONFIG_USB_UHCI_HCD is not set
-CONFIG_USE_GENERIC_SMP_HELPERS=y
-CONFIG_USE_OF=y
-CONFIG_VFAT_FS=y
-# CONFIG_VLAN_8021Q is not set
-CONFIG_VM_EVENT_COUNTERS=y
-CONFIG_WEAK_ORDERING=y
-CONFIG_XPS=y
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZONE_DMA32=y
-CONFIG_ZONE_DMA_FLAG=0
-- 
2.0.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From stijn at linux-ipv6.be  Thu Jan  1 21:39:35 2015
From: stijn at linux-ipv6.be (Stijn Tintel)
Date: Fri,  2 Jan 2015 03:39:35 +0100
Subject: [OpenWrt-Devel] [PATCH 2/2] octeon: enable VLAN support
In-Reply-To: <1420166375-2604-1-git-send-email-stijn@linux-ipv6.be>
References: <1420166375-2604-1-git-send-email-stijn@linux-ipv6.be>
Message-ID: <1420166375-2604-2-git-send-email-stijn@linux-ipv6.be>

Signed-off-by: Stijn Tintel <stijn at linux-ipv6.be>
---
 target/linux/octeon/config-3.14 | 1 -
 target/linux/octeon/config-3.18 | 1 -
 2 files changed, 2 deletions(-)

diff --git a/target/linux/octeon/config-3.14 b/target/linux/octeon/config-3.14
index baabe91..79f1efe 100644
--- a/target/linux/octeon/config-3.14
+++ b/target/linux/octeon/config-3.14
@@ -232,7 +232,6 @@ CONFIG_USB_SUPPORT=y
 # CONFIG_USB_UHCI_HCD is not set
 CONFIG_USE_OF=y
 CONFIG_VFAT_FS=y
-# CONFIG_VLAN_8021Q is not set
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_WEAK_ORDERING=y
 CONFIG_XPS=y
diff --git a/target/linux/octeon/config-3.18 b/target/linux/octeon/config-3.18
index 280014c..2055aef 100644
--- a/target/linux/octeon/config-3.18
+++ b/target/linux/octeon/config-3.18
@@ -243,7 +243,6 @@ CONFIG_USB_SUPPORT=y
 # CONFIG_USB_UHCI_HCD is not set
 CONFIG_USE_OF=y
 CONFIG_VFAT_FS=y
-# CONFIG_VLAN_8021Q is not set
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_WEAK_ORDERING=y
 CONFIG_XPS=y
-- 
2.0.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From stharward at gmail.com  Thu Jan  1 22:45:44 2015
From: stharward at gmail.com (Soren Harward)
Date: Thu, 1 Jan 2015 22:45:44 -0500
Subject: [OpenWrt-Devel] [PATCH][ar71xx] Mikrotik Routerboard RB2011
 switch fix
In-Reply-To: <CANQojO49PbSS9R96ww04cvJ1nz2Nio4abLuNiCzvkxNdfndEJA@mail.gmail.com>
References: <20141213182237.GA28818@chris>
 <CANQojO49PbSS9R96ww04cvJ1nz2Nio4abLuNiCzvkxNdfndEJA@mail.gmail.com>
Message-ID: <CANQojO4gPEqt0uOmgRm4z+RT-1hKUJ0UB2FihFa6UhmLX=sbYg@mail.gmail.com>

On Sun, Dec 14, 2014 at 4:41 PM, Soren Harward <stharward at gmail.com> wrote:
> On Sat, Dec 13, 2014 at 1:22 PM, Chris Green <cl at isbd.net> wrote:
>> This patch is the same as the Routerboard 951G fix, I've built this
>> and tested it on my rb-2011uias-2hnd.  However we should check that it
>> also works on other/older RB2011 routers which did work OK with the
>> unpatched code.
>
> I'll do that some time around 29 or 30 Dec.

I finally had a chance to test this patch.  I built three separate
images from r43800, with ath79_eth0_pll_data.pll_1000 as 0x06000000
(the current default value), 0x3e000000, and 0x6f000000.  I netbooted
each of them in turn.  All three values seem to work fine with my
router: ten pings to my laptop (hooked up on Eth1) didn't drop any
packets.

I'm attaching my dmesg just in case someone who understands the boot
process of these devices better than I do can maybe figure out what
the difference is between my [working] machine and everyone else's
[non-working] machines.

-- 
Soren Harward
-------------- next part --------------
[    0.000000] Linux version 3.10.36 (soren at jens) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r40803) ) #7 Wed May 21 15:14:49 EDT 2014
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 0001974c (MIPS 74Kc)
[    0.000000] SoC: Atheros AR9344 rev 2
[    0.000000] Clocks: CPU:500.000MHz, DDR:450.000MHz, AHB:450.000MHz, Ref:25.000MHz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    0.000000] User-defined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x07ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x07ffffff]
[    0.000000] On node 0 totalpages: 32768
[    0.000000] free_area_init_node: node 0, pgdat 802cc9b0, node_mem_map 81000000
[    0.000000]   Normal zone: 256 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 32768 pages, LIFO batch:7
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line:  console=ttyS0,115200 parts=1 boot_part_size=4194304 gpio=249387 HZ=250000000 mem=128M kmac=4C:5E:0C:3E:6C:78 board=2011r5 ver=3.10 boot=1 mlc=5 rootfstype=yaffs noinitrd
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 126512k/131072k available (2161k kernel code, 4560k reserved, 433k data, 220k init, 0k highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:51
[    0.060000] Calibrating delay loop... 249.44 BogoMIPS (lpj=1247232)
[    0.070000] pid_max: default: 32768 minimum: 301
[    0.070000] Mount-cache hash table entries: 512
[    0.080000] NET: Registered protocol family 16
[    0.090000] MIPS: machine is Mikrotik RouterBOARD 2011UiAS
[    0.510000] bio: create slab <bio-0> at 0
[    0.510000] Switching to clocksource MIPS
[    0.520000] NET: Registered protocol family 2
[    0.520000] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[    0.530000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.540000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.540000] TCP: reno registered
[    0.550000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.550000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.560000] NET: Registered protocol family 1
[    0.560000] PCI: CLS 0 bytes, default 32
[    0.580000] yaffs: yaffs built May 21 2014 15:03:41 Installing.
[    0.580000] msgmni has been set to 247
[    0.580000] io scheduler noop registered
[    0.590000] io scheduler deadline registered (default)
[    0.590000] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.620000] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A
[    0.630000] console [ttyS0] enabled, bootconsole disabled
[    0.640000] ath79-spi ath79-spi: master is unqueued, this is deprecated
[    0.650000] m25p80 spi0.0: unrecognized JEDEC id c22010
[    0.650000] NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bit), 128MiB, page size: 2048, OOB size: 64
[    0.670000] Scanning device for bad blocks
[    0.790000] Bad eraseblock 925 at 0x0000073a0000
[    0.810000] Creating 3 MTD partitions on "ar934x-nfc":
[    0.810000] 0x000000000000-0x000000040000 : "booter"
[    0.820000] 0x000000040000-0x000000400000 : "kernel"
[    0.820000] 0x000000400000-0x000008000000 : "rootfs"
[    0.830000] mtd: device 2 (rootfs) set to be root filesystem
[    0.840000] mtdsplit: no squashfs found in "rootfs"
[    0.840000] mtdsplit: no squashfs found in "ar934x-nfc"
[    0.860000] libphy: ag71xx_mdio: probed
[    0.900000] switch0: Atheros AR8327 rev. 4 switch registered on ag71xx-mdio.0
[    2.200000] libphy: ag71xx_mdio: probed
[    2.760000] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:00 [uid=004dd034, driver=Atheros AR8216/AR8236/AR8316]
[    2.770000] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RGMII
[    3.330000] ag71xx-mdio.1: Found an AR934X built-in switch
[    4.360000] eth1: Atheros AG71xx at 0xba000000, irq 5, mode:GMII
[    4.360000] TCP: cubic registered
[    4.370000] NET: Registered protocol family 17
[    4.370000] 8021q: 802.1Q VLAN Support v1.8
[    4.380000] yaffs: dev is 32505858 name is "mtdblock2" ro
[    4.380000] yaffs: passed flags ""
[    4.390000] yaffs: yaffs: Attempting MTD mount of 31.2,"mtdblock2"
[    4.390000] yaffs: auto selecting yaffs2
[    4.510000] yaffs: block 894 is bad
[    5.360000] yaffs: yaffs_read_super: is_checkpointed 0
[    5.360000] VFS: Mounted root (yaffs filesystem) readonly on device 31:2.
[    5.370000] Freeing unused kernel memory: 220K (802e9000 - 80320000)
[    6.460000] usbcore: registered new interface driver usbfs
[    6.470000] usbcore: registered new interface driver hub
[    6.470000] usbcore: registered new device driver usb
[    6.480000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    6.490000] ehci-platform: EHCI generic platform driver
[    6.490000] ehci-platform ehci-platform: EHCI Host Controller
[    6.500000] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[    6.510000] ehci-platform ehci-platform: irq 3, io mem 0x1b000000
[    6.540000] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
[    6.540000] hub 1-0:1.0: USB hub found
[    6.550000] hub 1-0:1.0: 1 port detected
[    6.550000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    6.870000] usb 1-1: new full-speed USB device number 2 using ehci-platform
[    8.760000] eth0: link up (1000Mbps/Full duplex)
[    9.920000] eth0: link down
[   11.640000] NET: Registered protocol family 10
[   11.650000] tun: Universal TUN/TAP device driver, 1.6
[   11.650000] tun: (C) 1999-2004 Max Krasnyansky <maxk at qualcomm.com>
[   11.670000] sit: IPv6 over IPv4 tunneling driver
[   11.690000] nf_conntrack version 0.5.0 (1980 buckets, 7920 max)
[   11.720000] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   11.780000] hidraw: raw HID events driver (C) Jiri Kosina
[   11.800000] u32 classifier
[   11.810000]     input device check on
[   11.810000]     Actions configured
[   11.820000] Mirror/redirect action on
[   11.840000] Failed to load ipt action
[   11.870000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   11.960000] usbcore: registered new interface driver usbhid
[   11.970000] usbhid: USB HID core driver
[   12.020000] xt_time: kernel timezone is -0000
[   17.520000] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[   17.530000] IPv6: ADDRCONF(NETDEV_UP): eth1.4: link is not ready
[   17.550000] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   17.550000] IPv6: ADDRCONF(NETDEV_UP): eth0.1: link is not ready
[   17.590000] IPv6: ADDRCONF(NETDEV_UP): eth1.7: link is not ready
[   17.600000] IPv6: ADDRCONF(NETDEV_UP): eth0.5: link is not ready
[   17.620000] IPv6: ADDRCONF(NETDEV_UP): eth0.6: link is not ready
[   17.630000] IPv6: ADDRCONF(NETDEV_UP): eth0.2: link is not ready
[   17.690000] IPv6: ADDRCONF(NETDEV_UP): eth0.3: link is not ready
[   17.750000] IPv6: ADDRCONF(NETDEV_UP): eth1.15: link is not ready
[   17.770000] eth0: link up (1000Mbps/Full duplex)
[   17.820000] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   17.840000] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.1: link becomes ready
[   17.840000] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.2: link becomes ready
[   17.850000] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.3: link becomes ready
[   17.860000] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.5: link becomes ready
[   17.860000] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.6: link becomes ready
[   18.120000] eth1: link up (1000Mbps/Full duplex)
[   18.120000] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[   18.190000] IPv6: ADDRCONF(NETDEV_CHANGE): eth1.4: link becomes ready
[   18.190000] IPv6: ADDRCONF(NETDEV_CHANGE): eth1.7: link becomes ready
[   18.200000] IPv6: ADDRCONF(NETDEV_CHANGE): eth1.15: link becomes ready
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From stharward at gmail.com  Thu Jan  1 22:51:11 2015
From: stharward at gmail.com (Soren Harward)
Date: Thu, 1 Jan 2015 22:51:11 -0500
Subject: [OpenWrt-Devel] [PATCH][ar71xx] Mikrotik Routerboard RB2011
 switch fix
In-Reply-To: <CANQojO4gPEqt0uOmgRm4z+RT-1hKUJ0UB2FihFa6UhmLX=sbYg@mail.gmail.com>
References: <20141213182237.GA28818@chris>
 <CANQojO49PbSS9R96ww04cvJ1nz2Nio4abLuNiCzvkxNdfndEJA@mail.gmail.com>
 <CANQojO4gPEqt0uOmgRm4z+RT-1hKUJ0UB2FihFa6UhmLX=sbYg@mail.gmail.com>
Message-ID: <CANQojO7QexJKBCiPuWWbX+KSX0Lwr14paN2-91-RCQuaS+Ahew@mail.gmail.com>

On Thu, Jan 1, 2015 at 10:45 PM, Soren Harward <stharward at gmail.com> wrote:
> I'm attaching my dmesg just in case someone who understands the boot
> process of these devices better than I do can maybe figure out what
> the difference is between my [working] machine and everyone else's
> [non-working] machines.

Actually, now that I think about it, the answer may be as simple as
that I've got a RB2011UiAS-RM (doesn't have wireless), as opposed to
the RB2011UiAS-2HnD (has wireless).

-- 
Soren Harward
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From stijn at linux-ipv6.be  Fri Jan  2 03:22:32 2015
From: stijn at linux-ipv6.be (Stijn Tintel)
Date: Fri,  2 Jan 2015 09:22:32 +0100
Subject: [OpenWrt-Devel] [PATCH 00/10] kernel/modules: add kmod-crypto-gcm
	and deps
Message-ID: <1420186962-23268-1-git-send-email-stijn@linux-ipv6.be>

This series adds support for Galois/Counter Mode (GCM) and Galois Message
Authentication Code (GMAC), and its dependencies. Some dependencies that were
previously included with other crypto modules have been moved to their own kmod
package.

Runtime tested with strongSwan 5.2.1 on ar71xx, octeon and x86_64.

Stijn Tintel (10):
  kernel/modules: remove superfluous backslash
  kernel/modules: add kmod-crypto-aead
  kernel/modules: kmod-crypto-manager: depend on kmod-crypto-aead
  kernel/modules: remove CRYPTOMGR_MODULES
  kernel/modules: add kmod-crypto-seqiv
  kernel/modules: add kmod-crypto-ctr
  kernel/modules: add kmod-crypto-gf128
  kernel/modules: kmod-crypto-xts: depend on kmod-crypto-gf128
  kernel/modules: add kmod-crypto-ghash
  kernel/modules: add kmod-crypto-gcm

 package/kernel/linux/modules/crypto.mk | 96 +++++++++++++++++++++++++++-------
 1 file changed, 77 insertions(+), 19 deletions(-)

-- 
2.0.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From stijn at linux-ipv6.be  Fri Jan  2 03:22:33 2015
From: stijn at linux-ipv6.be (Stijn Tintel)
Date: Fri,  2 Jan 2015 09:22:33 +0100
Subject: [OpenWrt-Devel] [PATCH 01/10] kernel/modules: remove superfluous
	backslash
In-Reply-To: <1420186962-23268-1-git-send-email-stijn@linux-ipv6.be>
References: <1420186962-23268-1-git-send-email-stijn@linux-ipv6.be>
Message-ID: <1420186962-23268-2-git-send-email-stijn@linux-ipv6.be>

Signed-off-by: Stijn Tintel <stijn at linux-ipv6.be>
---
 package/kernel/linux/modules/crypto.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/kernel/linux/modules/crypto.mk b/package/kernel/linux/modules/crypto.mk
index d9d673c..de3d851 100644
--- a/package/kernel/linux/modules/crypto.mk
+++ b/package/kernel/linux/modules/crypto.mk
@@ -13,7 +13,7 @@ CRYPTO_MODULES = \
 
 CRYPTOMGR_MODULES = \
 	AEAD2=aead \
-	MANAGER2=cryptomgr \
+	MANAGER2=cryptomgr
 
 crypto_confvar=CONFIG_CRYPTO_$(word 1,$(subst =,$(space),$(1)))
 crypto_file=$(LINUX_DIR)/crypto/$(word 2,$(subst =,$(space),$(1))).ko
-- 
2.0.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From stijn at linux-ipv6.be  Fri Jan  2 03:22:34 2015
From: stijn at linux-ipv6.be (Stijn Tintel)
Date: Fri,  2 Jan 2015 09:22:34 +0100
Subject: [OpenWrt-Devel] [PATCH 02/10] kernel/modules: add kmod-crypto-aead
In-Reply-To: <1420186962-23268-1-git-send-email-stijn@linux-ipv6.be>
References: <1420186962-23268-1-git-send-email-stijn@linux-ipv6.be>
Message-ID: <1420186962-23268-3-git-send-email-stijn@linux-ipv6.be>

Signed-off-by: Stijn Tintel <stijn at linux-ipv6.be>
---
 package/kernel/linux/modules/crypto.mk | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/package/kernel/linux/modules/crypto.mk b/package/kernel/linux/modules/crypto.mk
index de3d851..ad1fe4e 100644
--- a/package/kernel/linux/modules/crypto.mk
+++ b/package/kernel/linux/modules/crypto.mk
@@ -39,6 +39,19 @@ define AddDepends/crypto
   DEPENDS+=+kmod-crypto-core $(1)
 endef
 
+define KernelPackage/crypto-aead
+  TITLE:=CryptoAPI AEAD support
+  KCONFIG:= \
+	CONFIG_CRYPTO_AEAD \
+	CONFIG_CRYPTO_AEAD2
+  FILES:=$(LINUX_DIR)/crypto/aead.ko
+  AUTOLOAD:=$(call AutoLoad,09,crypto_aead,1)
+  $(call AddDepends/crypto)
+endef
+
+$(eval $(call KernelPackage,crypto-aead))
+
+
 define KernelPackage/crypto-hash
   TITLE:=CryptoAPI hash support
   KCONFIG:=CONFIG_CRYPTO_HASH
-- 
2.0.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From stijn at linux-ipv6.be  Fri Jan  2 03:22:35 2015
From: stijn at linux-ipv6.be (Stijn Tintel)
Date: Fri,  2 Jan 2015 09:22:35 +0100
Subject: [OpenWrt-Devel] [PATCH 03/10] kernel/modules: kmod-crypto-manager:
	depend on kmod-crypto-aead
In-Reply-To: <1420186962-23268-1-git-send-email-stijn@linux-ipv6.be>
References: <1420186962-23268-1-git-send-email-stijn@linux-ipv6.be>
Message-ID: <1420186962-23268-4-git-send-email-stijn@linux-ipv6.be>

---
 package/kernel/linux/modules/crypto.mk | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/package/kernel/linux/modules/crypto.mk b/package/kernel/linux/modules/crypto.mk
index ad1fe4e..d17f1e1 100644
--- a/package/kernel/linux/modules/crypto.mk
+++ b/package/kernel/linux/modules/crypto.mk
@@ -12,7 +12,6 @@ CRYPTO_MODULES = \
 	BLKCIPHER2=crypto_blkcipher
 
 CRYPTOMGR_MODULES = \
-	AEAD2=aead \
 	MANAGER2=cryptomgr
 
 crypto_confvar=CONFIG_CRYPTO_$(word 1,$(subst =,$(space),$(1)))
@@ -65,9 +64,8 @@ $(eval $(call KernelPackage,crypto-hash))
 
 define KernelPackage/crypto-manager
   TITLE:=CryptoAPI algorithm manager
-  DEPENDS:=+kmod-crypto-hash +kmod-crypto-pcompress
+  DEPENDS:=+kmod-crypto-aead +kmod-crypto-hash +kmod-crypto-pcompress
   KCONFIG:= \
-	CONFIG_CRYPTO_AEAD \
 	CONFIG_CRYPTO_MANAGER \
 	$(foreach mod,$(CRYPTOMGR_MODULES),$(call crypto_confvar,$(mod)))
   FILES:=$(foreach mod,$(CRYPTOMGR_MODULES),$(call crypto_file,$(mod)))
-- 
2.0.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From stijn at linux-ipv6.be  Fri Jan  2 03:22:36 2015
From: stijn at linux-ipv6.be (Stijn Tintel)
Date: Fri,  2 Jan 2015 09:22:36 +0100
Subject: [OpenWrt-Devel] [PATCH 04/10] kernel/modules: remove
	CRYPTOMGR_MODULES
In-Reply-To: <1420186962-23268-1-git-send-email-stijn@linux-ipv6.be>
References: <1420186962-23268-1-git-send-email-stijn@linux-ipv6.be>
Message-ID: <1420186962-23268-5-git-send-email-stijn@linux-ipv6.be>

Signed-off-by: Stijn Tintel <stijn at linux-ipv6.be>
---
 package/kernel/linux/modules/crypto.mk | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/package/kernel/linux/modules/crypto.mk b/package/kernel/linux/modules/crypto.mk
index d17f1e1..04903c3 100644
--- a/package/kernel/linux/modules/crypto.mk
+++ b/package/kernel/linux/modules/crypto.mk
@@ -11,9 +11,6 @@ CRYPTO_MODULES = \
 	ALGAPI2=crypto_algapi \
 	BLKCIPHER2=crypto_blkcipher
 
-CRYPTOMGR_MODULES = \
-	MANAGER2=cryptomgr
-
 crypto_confvar=CONFIG_CRYPTO_$(word 1,$(subst =,$(space),$(1)))
 crypto_file=$(LINUX_DIR)/crypto/$(word 2,$(subst =,$(space),$(1))).ko
 crypto_name=$(if $(findstring y,$($(call crypto_confvar,$(1)))),,$(word 2,$(subst =,$(space),$(1))))
@@ -67,8 +64,8 @@ define KernelPackage/crypto-manager
   DEPENDS:=+kmod-crypto-aead +kmod-crypto-hash +kmod-crypto-pcompress
   KCONFIG:= \
 	CONFIG_CRYPTO_MANAGER \
-	$(foreach mod,$(CRYPTOMGR_MODULES),$(call crypto_confvar,$(mod)))
-  FILES:=$(foreach mod,$(CRYPTOMGR_MODULES),$(call crypto_file,$(mod)))
+	CONFIG_CRYPTO_MANAGER2
+  FILES:=$(LINUX_DIR)/crypto/cryptomgr.ko
   $(call AddDepends/crypto)
 endef
 
-- 
2.0.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From stijn at linux-ipv6.be  Fri Jan  2 03:22:37 2015
From: stijn at linux-ipv6.be (Stijn Tintel)
Date: Fri,  2 Jan 2015 09:22:37 +0100
Subject: [OpenWrt-Devel] [PATCH 05/10] kernel/modules: add kmod-crypto-seqiv
In-Reply-To: <1420186962-23268-1-git-send-email-stijn@linux-ipv6.be>
References: <1420186962-23268-1-git-send-email-stijn@linux-ipv6.be>
Message-ID: <1420186962-23268-6-git-send-email-stijn@linux-ipv6.be>

Signed-off-by: Stijn Tintel <stijn at linux-ipv6.be>
---
 package/kernel/linux/modules/crypto.mk | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/package/kernel/linux/modules/crypto.mk b/package/kernel/linux/modules/crypto.mk
index 04903c3..3193fb0 100644
--- a/package/kernel/linux/modules/crypto.mk
+++ b/package/kernel/linux/modules/crypto.mk
@@ -138,6 +138,17 @@ endef
 
 $(eval $(call KernelPackage,crypto-iv))
 
+define KernelPackage/crypto-seqiv
+  TITLE:=CryptoAPI Sequence Number IV Generator
+  DEPENDS:=+kmod-crypto-aead +kmod-crypto-rng
+  KCONFIG:=CONFIG_CRYPTO_SEQIV
+  FILES:=$(LINUX_DIR)/crypto/seqiv.ko
+  AUTOLOAD:=$(call AutoLoad,09,seqiv)
+  $(call AddDepends/crypto)
+endef
+
+$(eval $(call KernelPackage,crypto-seqiv))
+
 
 define KernelPackage/crypto-hw-talitos
   TITLE:=Freescale integrated security engine (SEC) driver
-- 
2.0.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From stijn at linux-ipv6.be  Fri Jan  2 03:22:38 2015
From: stijn at linux-ipv6.be (Stijn Tintel)
Date: Fri,  2 Jan 2015 09:22:38 +0100
Subject: [OpenWrt-Devel] [PATCH 06/10] kernel/modules: add kmod-crypto-ctr
In-Reply-To: <1420186962-23268-1-git-send-email-stijn@linux-ipv6.be>
References: <1420186962-23268-1-git-send-email-stijn@linux-ipv6.be>
Message-ID: <1420186962-23268-7-git-send-email-stijn@linux-ipv6.be>

Signed-off-by: Stijn Tintel <stijn at linux-ipv6.be>
---
 package/kernel/linux/modules/crypto.mk | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/package/kernel/linux/modules/crypto.mk b/package/kernel/linux/modules/crypto.mk
index 3193fb0..1fd10d9 100644
--- a/package/kernel/linux/modules/crypto.mk
+++ b/package/kernel/linux/modules/crypto.mk
@@ -303,6 +303,17 @@ endef
 
 $(eval $(call KernelPackage,crypto-cbc))
 
+define KernelPackage/crypto-ctr
+  TITLE:=Counter Mode CryptoAPI module
+  DEPENDS:=+kmod-crypto-manager +kmod-crypto-seqiv
+  KCONFIG:=CONFIG_CRYPTO_CTR
+  FILES:=$(LINUX_DIR)/crypto/ctr.ko
+  AUTOLOAD:=$(call AutoLoad,09,ctr)
+  $(call AddDepends/crypto)
+endef
+
+$(eval $(call KernelPackage,crypto-ctr))
+
 define KernelPackage/crypto-pcbc
   TITLE:=Propagating Cipher Block Chaining CryptoAPI module
   DEPENDS:=+kmod-crypto-manager
-- 
2.0.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From stijn at linux-ipv6.be  Fri Jan  2 03:22:39 2015
From: stijn at linux-ipv6.be (Stijn Tintel)
Date: Fri,  2 Jan 2015 09:22:39 +0100
Subject: [OpenWrt-Devel] [PATCH 07/10] kernel/modules: add kmod-crypto-gf128
In-Reply-To: <1420186962-23268-1-git-send-email-stijn@linux-ipv6.be>
References: <1420186962-23268-1-git-send-email-stijn@linux-ipv6.be>
Message-ID: <1420186962-23268-8-git-send-email-stijn@linux-ipv6.be>

Signed-off-by: Stijn Tintel <stijn at linux-ipv6.be>
---
 package/kernel/linux/modules/crypto.mk | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/package/kernel/linux/modules/crypto.mk b/package/kernel/linux/modules/crypto.mk
index 1fd10d9..5d49160 100644
--- a/package/kernel/linux/modules/crypto.mk
+++ b/package/kernel/linux/modules/crypto.mk
@@ -400,6 +400,17 @@ endef
 $(eval $(call KernelPackage,crypto-hmac))
 
 
+define KernelPackage/crypto-gf128
+  TITLE:=GF(2^128) multiplication functions CryptoAPI module
+  KCONFIG:=CONFIG_CRYPTO_GF128MUL
+  FILES:=$(LINUX_DIR)/crypto/gf128mul.ko
+  AUTOLOAD:=$(call AutoLoad,09,gf128mul)
+  $(call AddDepends/crypto)
+endef
+
+$(eval $(call KernelPackage,crypto-gf128))
+
+
 define KernelPackage/crypto-md4
   TITLE:=MD4 digest CryptoAPI module
   DEPENDS:=+kmod-crypto-hash
-- 
2.0.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From stijn at linux-ipv6.be  Fri Jan  2 03:22:40 2015
From: stijn at linux-ipv6.be (Stijn Tintel)
Date: Fri,  2 Jan 2015 09:22:40 +0100
Subject: [OpenWrt-Devel] [PATCH 08/10] kernel/modules: kmod-crypto-xts:
	depend on kmod-crypto-gf128
In-Reply-To: <1420186962-23268-1-git-send-email-stijn@linux-ipv6.be>
References: <1420186962-23268-1-git-send-email-stijn@linux-ipv6.be>
Message-ID: <1420186962-23268-9-git-send-email-stijn@linux-ipv6.be>

Signed-off-by: Stijn Tintel <stijn at linux-ipv6.be>
---
 package/kernel/linux/modules/crypto.mk | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)

diff --git a/package/kernel/linux/modules/crypto.mk b/package/kernel/linux/modules/crypto.mk
index 5d49160..eec7934 100644
--- a/package/kernel/linux/modules/crypto.mk
+++ b/package/kernel/linux/modules/crypto.mk
@@ -594,17 +594,10 @@ $(eval $(call KernelPackage,crypto-test))
 
 define KernelPackage/crypto-xts
   TITLE:=XTS cipher CryptoAPI module
-  DEPENDS:=+kmod-crypto-manager
-  KCONFIG:= \
-	CONFIG_CRYPTO_GF128MUL \
-	CONFIG_CRYPTO_XTS
-  FILES:= \
-	$(LINUX_DIR)/crypto/xts.ko \
-	$(LINUX_DIR)/crypto/gf128mul.ko
-  AUTOLOAD:=$(call AutoLoad,09, \
-	gf128mul \
-	xts \
-  )
+  DEPENDS:=+kmod-crypto-gf128 +kmod-crypto-manager
+  KCONFIG:=CONFIG_CRYPTO_XTS
+  FILES:=$(LINUX_DIR)/crypto/xts.ko
+  AUTOLOAD:=$(call AutoLoad,09,xts)
   $(call AddDepends/crypto)
 endef
 
-- 
2.0.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From stijn at linux-ipv6.be  Fri Jan  2 03:22:41 2015
From: stijn at linux-ipv6.be (Stijn Tintel)
Date: Fri,  2 Jan 2015 09:22:41 +0100
Subject: [OpenWrt-Devel] [PATCH 09/10] kernel/modules: add kmod-crypto-ghash
In-Reply-To: <1420186962-23268-1-git-send-email-stijn@linux-ipv6.be>
References: <1420186962-23268-1-git-send-email-stijn@linux-ipv6.be>
Message-ID: <1420186962-23268-10-git-send-email-stijn@linux-ipv6.be>

Signed-off-by: Stijn Tintel <stijn at linux-ipv6.be>
---
 package/kernel/linux/modules/crypto.mk | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/package/kernel/linux/modules/crypto.mk b/package/kernel/linux/modules/crypto.mk
index eec7934..9d69cce 100644
--- a/package/kernel/linux/modules/crypto.mk
+++ b/package/kernel/linux/modules/crypto.mk
@@ -411,6 +411,18 @@ endef
 $(eval $(call KernelPackage,crypto-gf128))
 
 
+define KernelPackage/crypto-ghash
+  TITLE:=GHASH digest CryptoAPI module
+  DEPENDS:=+kmod-crypto-gf128
+  KCONFIG:=CONFIG_CRYPTO_GHASH
+  FILES:=$(LINUX_DIR)/crypto/ghash-generic.ko
+  AUTOLOAD:=$(call AutoLoad,09,ghash-generic)
+  $(call AddDepends/crypto)
+endef
+
+$(eval $(call KernelPackage,crypto-ghash))
+
+
 define KernelPackage/crypto-md4
   TITLE:=MD4 digest CryptoAPI module
   DEPENDS:=+kmod-crypto-hash
-- 
2.0.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From stijn at linux-ipv6.be  Fri Jan  2 03:22:42 2015
From: stijn at linux-ipv6.be (Stijn Tintel)
Date: Fri,  2 Jan 2015 09:22:42 +0100
Subject: [OpenWrt-Devel] [PATCH 10/10] kernel/modules: add kmod-crypto-gcm
In-Reply-To: <1420186962-23268-1-git-send-email-stijn@linux-ipv6.be>
References: <1420186962-23268-1-git-send-email-stijn@linux-ipv6.be>
Message-ID: <1420186962-23268-11-git-send-email-stijn@linux-ipv6.be>

Signed-off-by: Stijn Tintel <stijn at linux-ipv6.be>
---
 package/kernel/linux/modules/crypto.mk | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/package/kernel/linux/modules/crypto.mk b/package/kernel/linux/modules/crypto.mk
index 9d69cce..73f36be 100644
--- a/package/kernel/linux/modules/crypto.mk
+++ b/package/kernel/linux/modules/crypto.mk
@@ -400,6 +400,18 @@ endef
 $(eval $(call KernelPackage,crypto-hmac))
 
 
+define KernelPackage/crypto-gcm
+  TITLE:=GCM/GMAC CryptoAPI module
+  DEPENDS:=+kmod-crypto-ctr +kmod-crypto-ghash +kmod-crypto-null
+  KCONFIG:=CONFIG_CRYPTO_GCM
+  FILES:=$(LINUX_DIR)/crypto/gcm.ko
+  AUTOLOAD:=$(call AutoLoad,09,gcm)
+  $(call AddDepends/crypto)
+endef
+
+$(eval $(call KernelPackage,crypto-gcm))
+
+
 define KernelPackage/crypto-gf128
   TITLE:=GF(2^128) multiplication functions CryptoAPI module
   KCONFIG:=CONFIG_CRYPTO_GF128MUL
-- 
2.0.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From cl at isbd.net  Fri Jan  2 04:40:07 2015
From: cl at isbd.net (Chris Green)
Date: Fri, 2 Jan 2015 09:40:07 +0000
Subject: [OpenWrt-Devel] [PATCH][ar71xx] Mikrotik Routerboard RB2011
	switch fix
In-Reply-To: <CANQojO7QexJKBCiPuWWbX+KSX0Lwr14paN2-91-RCQuaS+Ahew@mail.gmail.com>
References: <20141213182237.GA28818@chris>
 <CANQojO49PbSS9R96ww04cvJ1nz2Nio4abLuNiCzvkxNdfndEJA@mail.gmail.com>
 <CANQojO4gPEqt0uOmgRm4z+RT-1hKUJ0UB2FihFa6UhmLX=sbYg@mail.gmail.com>
 <CANQojO7QexJKBCiPuWWbX+KSX0Lwr14paN2-91-RCQuaS+Ahew@mail.gmail.com>
Message-ID: <20150102094007.GA698@chris>

On Thu, Jan 01, 2015 at 10:51:11PM -0500, Soren Harward wrote:
> On Thu, Jan 1, 2015 at 10:45 PM, Soren Harward <stharward at gmail.com> wrote:
> > I'm attaching my dmesg just in case someone who understands the boot
> > process of these devices better than I do can maybe figure out what
> > the difference is between my [working] machine and everyone else's
> > [non-working] machines.
> 
> Actually, now that I think about it, the answer may be as simple as
> that I've got a RB2011UiAS-RM (doesn't have wireless), as opposed to
> the RB2011UiAS-2HnD (has wireless).
> 
Could be just that.

My RB2011UiAS-2HnD seems OK with both 0x3e000000 and 0x6f000000 to the
extent that all the wired ethernet ports work whereas with 0x06000000
the five Gigabit ports don't work.

The WiFi works with 0x06000000, I haven't spcifically checked it with
the other values, I'll try and do that today or over the weekend.

-- 
Chris Green
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From stijn at linux-ipv6.be  Fri Jan  2 07:39:22 2015
From: stijn at linux-ipv6.be (Stijn Tintel)
Date: Fri, 02 Jan 2015 13:39:22 +0100
Subject: [OpenWrt-Devel] 090-backport_netfilter_rtcache.patch and IPsec
 routing/connection errors/packet loss
In-Reply-To: <5499E5C0.4070605@linux-ipv6.be>
References: <5494AEFF.3000208@marcant.net>
 <20141219235602.GA4861@breakpoint.cc> <5499BE7B.2030601@marcant.net>
 <5499E5C0.4070605@linux-ipv6.be>
Message-ID: <54A6917A.1000007@linux-ipv6.be>

On 23-12-14 22:59, Stijn Tintel wrote:
> On 23-12-14 20:11, Andre Valentin wrote:
>> Hi!
>>
>> I just recompiled the module and loaded it on the router. But it seems that this does not fix the error. 5 minutes later I got several alerts (ping checks).
> The workaround below seems to work for me. How did you apply this patch
> to the OpenWrt code
>
After updating the other end of the IPsec tunnel, it turns out that the
workaround doesn't entirely fix the problem.

box1 ---- owrt1 ============= owrt2 ---- box2
                           strongSwan IPsec
                              (tunnel mode)

Initially I only had the nf_conntrack_rtcache module on owrt2. That
caused problems like snmpwalk from box1 to box2 hanging after a single
line of output. With the workaround applied, I did no longer see the
problem. I could snmpwalk, ping and SSH from box1 to box2 fine. When I
later updated owrt1 to also have the nf_conntrack_module (+workaround),
the problems were back. This time, snmpwalk from box1 to box2 hangs
after two lines of output.

Kind regards,
Stijn
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From cl at isbd.net  Fri Jan  2 08:24:36 2015
From: cl at isbd.net (Chris Green)
Date: Fri, 2 Jan 2015 13:24:36 +0000
Subject: [OpenWrt-Devel] [PATCH][ar71xx] Mikrotik Routerboard RB2011
	switch fix
In-Reply-To: <20150102094007.GA698@chris>
References: <20141213182237.GA28818@chris>
 <CANQojO49PbSS9R96ww04cvJ1nz2Nio4abLuNiCzvkxNdfndEJA@mail.gmail.com>
 <CANQojO4gPEqt0uOmgRm4z+RT-1hKUJ0UB2FihFa6UhmLX=sbYg@mail.gmail.com>
 <CANQojO7QexJKBCiPuWWbX+KSX0Lwr14paN2-91-RCQuaS+Ahew@mail.gmail.com>
 <20150102094007.GA698@chris>
Message-ID: <20150102132436.GA27062@chris>

On Fri, Jan 02, 2015 at 09:40:07AM +0000, Chris Green wrote:
> On Thu, Jan 01, 2015 at 10:51:11PM -0500, Soren Harward wrote:
> > On Thu, Jan 1, 2015 at 10:45 PM, Soren Harward <stharward at gmail.com> wrote:
> > > I'm attaching my dmesg just in case someone who understands the boot
> > > process of these devices better than I do can maybe figure out what
> > > the difference is between my [working] machine and everyone else's
> > > [non-working] machines.
> > 
> > Actually, now that I think about it, the answer may be as simple as
> > that I've got a RB2011UiAS-RM (doesn't have wireless), as opposed to
> > the RB2011UiAS-2HnD (has wireless).
> > 
> Could be just that.
> 
> My RB2011UiAS-2HnD seems OK with both 0x3e000000 and 0x6f000000 to the
> extent that all the wired ethernet ports work whereas with 0x06000000
> the five Gigabit ports don't work.
> 
> The WiFi works with 0x06000000, I haven't spcifically checked it with
> the other values, I'll try and do that today or over the weekend.
> 
OK, first setup.

I've set the value to 0x3e000000 in mach_rb2011.c in a Barrier Breaker
14.07 build.  Everything seems to work correctly, both the Gigabit
ports and the WiFi.


While I'm here, how do I build a ....sysupgrade.bin image? I'm getting
tired of doing bootp/tftp installs!

-- 
Chris Green
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From daniel at makrotopia.org  Fri Jan  2 08:26:15 2015
From: daniel at makrotopia.org (Daniel Golle)
Date: Fri, 2 Jan 2015 14:26:15 +0100
Subject: [OpenWrt-Devel] [PATCH] all targets: remove all =m kernel config
	symbols
Message-ID: <20150102132609.GA2451@makrotopia.org>

modules build during the kernel compile phase are ignored anyway,
all modules should be built using KernelPackage in
package/kernel/linux/modules/*
selecting the appropriate config symbols there rather than in
target/linux/*/config-*

Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 target/linux/adm5120/config-3.8        |  19 ------
 target/linux/adm8668/config-3.14       |   1 -
 target/linux/avr32/config-3.10         |   5 --
 target/linux/brcm2708/config-3.14      |   3 -
 target/linux/cns21xx/config-3.10       |  10 ---
 target/linux/cns3xxx/config-3.14       |   1 -
 target/linux/cns3xxx/config-3.18       |   1 -
 target/linux/generic/config-3.10       |   2 -
 target/linux/generic/config-3.13       |   3 -
 target/linux/generic/config-3.14       |   3 -
 target/linux/generic/config-3.18       |   5 --
 target/linux/generic/config-3.3        |   1 -
 target/linux/generic/config-3.8        |   2 -
 target/linux/iop32x/config-3.3         |  15 -----
 target/linux/malta/config-3.10         |  30 ---------
 target/linux/malta/config-3.14         |  30 ---------
 target/linux/mpc52xx/config-3.8        |   1 -
 target/linux/mpc83xx/config-3.8        |  53 ---------------
 target/linux/omap24xx/config-3.3       | 115 ---------------------------------
 target/linux/ppc40x/config-3.10        |   5 --
 target/linux/pxa/config-3.3            |  20 ------
 target/linux/ramips/mt7620/config-3.14 |   4 --
 target/linux/ramips/mt7621/config-3.14 |   5 --
 target/linux/ramips/mt7628/config-3.14 |   4 --
 target/linux/ramips/rt288x/config-3.14 |   1 -
 target/linux/ramips/rt305x/config-3.14 |   4 --
 target/linux/ramips/rt3883/config-3.14 |   4 --
 target/linux/sibyte/config-3.3         |   3 -
 target/linux/x86/config-3.14           |   1 -
 29 files changed, 351 deletions(-)

diff --git a/target/linux/adm5120/config-3.8 b/target/linux/adm5120/config-3.8
index b6157d8..a689fc7 100644
--- a/target/linux/adm5120/config-3.8
+++ b/target/linux/adm5120/config-3.8
@@ -42,7 +42,6 @@ CONFIG_ARCH_SUSPEND_POSSIBLE=y
 CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
 CONFIG_ARM_AMBA=y
 # CONFIG_ARM_SP805_WATCHDOG is not set
-CONFIG_ATA=m
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_CEVT_R4K=y
 CONFIG_CEVT_R4K_LIB=y
@@ -103,11 +102,8 @@ CONFIG_HAVE_MEMBLOCK_NODE_MAP=y
 CONFIG_HAVE_MOD_ARCH_SPECIFIC=y
 CONFIG_HAVE_OPROFILE=y
 CONFIG_HAVE_PERF_EVENTS=y
-CONFIG_HID=m
-CONFIG_HOSTAP=m
 CONFIG_HOSTAP_FIRMWARE=y
 # CONFIG_HOSTAP_FIRMWARE_NVRAM is not set
-CONFIG_HOSTAP_PCI=m
 CONFIG_HW_HAS_PCI=y
 CONFIG_HW_RANDOM=y
 CONFIG_HZ=250
@@ -117,18 +113,12 @@ CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
 CONFIG_IMAGE_CMDLINE_HACK=y
 CONFIG_INITRAMFS_SOURCE=""
-CONFIG_INPUT=m
 # CONFIG_IP_MROUTE_MULTIPLE_TABLES is not set
 CONFIG_IRQ_CPU=y
 CONFIG_IRQ_FORCED_THREADING=y
 # CONFIG_LEDS_TRIGGER_ADM5120_SWITCH is not set
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=256
-CONFIG_LIB80211=m
-CONFIG_LIB80211_CRYPT_CCMP=m
-CONFIG_LIB80211_CRYPT_TKIP=m
-CONFIG_LIB80211_CRYPT_WEP=m
-CONFIG_MII=m
 CONFIG_MIPS=y
 CONFIG_MIPS_L1_CACHE_SHIFT=5
 CONFIG_MIPS_MACHINE=y
@@ -143,7 +133,6 @@ CONFIG_MTD_MYLOADER_PARTS=y
 CONFIG_MTD_TRXSPLIT=y
 CONFIG_NEED_DMA_MAP_STATE=y
 CONFIG_NEED_PER_CPU_KM=y
-CONFIG_NLS=m
 CONFIG_NO_EXCEPT_FILL=y
 CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
 CONFIG_NO_HZ=y
@@ -154,8 +143,6 @@ CONFIG_PCI_DISABLE_COMMON_QUIRKS=y
 CONFIG_PCI_DOMAINS=y
 CONFIG_PERF_USE_VMALLOC=y
 # CONFIG_PREEMPT_RCU is not set
-CONFIG_SCSI=m
-CONFIG_SCSI_MOD=m
 # CONFIG_SERIAL_8250 is not set
 CONFIG_SERIAL_AMBA_PL010=y
 CONFIG_SERIAL_AMBA_PL010_CONSOLE=y
@@ -163,7 +150,6 @@ CONFIG_SERIAL_AMBA_PL010_NUMPORTS=2
 # CONFIG_SERIAL_AMBA_PL011 is not set
 CONFIG_SERIO=y
 CONFIG_SERIO_SERPORT=y
-CONFIG_SOFT_WATCHDOG=m
 # CONFIG_SWAP is not set
 CONFIG_SYS_HAS_CPU_MIPS32_R1=y
 CONFIG_SYS_HAS_EARLY_PRINTK=y
@@ -173,15 +159,10 @@ CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
 CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
 CONFIG_TICK_CPU_ACCOUNTING=y
 CONFIG_UIDGID_CONVERTED=y
-CONFIG_USB=m
-CONFIG_USB_ADM5120_HCD=m
 CONFIG_USB_ARCH_HAS_XHCI=y
-CONFIG_USB_COMMON=m
-CONFIG_USB_EHCI_HCD=m
 # CONFIG_USB_EHCI_HCD_PLATFORM is not set
 # CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
 # CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
-CONFIG_USB_OHCI_HCD=m
 # CONFIG_USB_OHCI_HCD_PLATFORM is not set
 CONFIG_USB_SUPPORT=y
 # CONFIG_USB_UHCI_HCD is not set
diff --git a/target/linux/adm8668/config-3.14 b/target/linux/adm8668/config-3.14
index 6d8d3c7..25b3753 100644
--- a/target/linux/adm8668/config-3.14
+++ b/target/linux/adm8668/config-3.14
@@ -27,7 +27,6 @@ CONFIG_DECOMPRESS_LZMA=y
 # CONFIG_DM9102 is not set
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_EARLY_PRINTK=y
-CONFIG_EEPROM_93CX6=m
 CONFIG_GENERIC_ATOMIC64=y
 CONFIG_GENERIC_CLOCKEVENTS=y
 CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
diff --git a/target/linux/avr32/config-3.10 b/target/linux/avr32/config-3.10
index 0fbdffc..91074ae 100644
--- a/target/linux/avr32/config-3.10
+++ b/target/linux/avr32/config-3.10
@@ -10,7 +10,6 @@ CONFIG_ARCH_REQUIRE_GPIOLIB=y
 # CONFIG_ARCH_SPARSEMEM_ENABLE is not set
 CONFIG_ARCH_SUSPEND_POSSIBLE=y
 CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
-CONFIG_AT32AP700X_WDT=m
 CONFIG_ATMEL_TCB_CLKSRC=y
 CONFIG_ATMEL_TCB_CLKSRC_BLOCK=0
 CONFIG_ATMEL_TCLIB=y
@@ -55,7 +54,6 @@ CONFIG_HAVE_GENERIC_HARDIRQS=y
 CONFIG_HAVE_MOD_ARCH_SPECIFIC=y
 CONFIG_HAVE_NET_DSA=y
 CONFIG_HAVE_OPROFILE=y
-CONFIG_I2C=m
 CONFIG_I2C_BOARDINFO=y
 CONFIG_INITRAMFS_SOURCE=""
 CONFIG_IRQ_WORK=y
@@ -64,9 +62,6 @@ CONFIG_LOADER_U_BOOT=y
 CONFIG_LOAD_ADDRESS=0x10000000
 CONFIG_MACB=y
 CONFIG_MDIO_BOARDINFO=y
-CONFIG_MMC=m
-CONFIG_MMC_ATMELMCI=m
-CONFIG_MMC_BLOCK=m
 CONFIG_MODULES_USE_ELF_RELA=y
 # CONFIG_MTD_CFI_INTELEXT is not set
 CONFIG_MTD_CMDLINE_PARTS=y
diff --git a/target/linux/brcm2708/config-3.14 b/target/linux/brcm2708/config-3.14
index a343c4c..5c4c9e7 100644
--- a/target/linux/brcm2708/config-3.14
+++ b/target/linux/brcm2708/config-3.14
@@ -22,8 +22,6 @@ CONFIG_ARM_UNWIND=y
 CONFIG_AVERAGE=y
 # CONFIG_BACKLIGHT_ADP8860 is not set
 # CONFIG_BACKLIGHT_ADP8870 is not set
-CONFIG_BACKLIGHT_CLASS_DEVICE=m
-CONFIG_BACKLIGHT_GENERIC=m
 CONFIG_BACKLIGHT_LCD_SUPPORT=y
 CONFIG_BCM2708_DMAER=y
 CONFIG_BCM2708_GPIO=y
@@ -150,7 +148,6 @@ CONFIG_KERNEL_GZIP=y
 # CONFIG_KERNEL_XZ is not set
 CONFIG_KTIME_SCALAR=y
 # CONFIG_LCD_AMS369FG06 is not set
-CONFIG_LCD_CLASS_DEVICE=m
 # CONFIG_LCD_L4F00242T03 is not set
 # CONFIG_LCD_LD9040 is not set
 # CONFIG_LCD_LMS283GF05 is not set
diff --git a/target/linux/cns21xx/config-3.10 b/target/linux/cns21xx/config-3.10
index 9faa2e4..1c8410b 100644
--- a/target/linux/cns21xx/config-3.10
+++ b/target/linux/cns21xx/config-3.10
@@ -15,7 +15,6 @@ CONFIG_ARM_L1_CACHE_SHIFT=4
 CONFIG_ARM_L1_CACHE_SHIFT_4=y
 CONFIG_ARM_NR_BANKS=8
 # CONFIG_ARPD is not set
-CONFIG_ATA=m
 CONFIG_ATAGS=y
 # CONFIG_CACHE_L2X0 is not set
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
@@ -42,7 +41,6 @@ CONFIG_CPU_TLB_FA=y
 CONFIG_CPU_USE_DOMAINS=y
 CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
 # CONFIG_DEBUG_USER is not set
-CONFIG_DLCI=m
 CONFIG_DLCI_MAX=8
 CONFIG_DMADEVICES=y
 CONFIG_DNOTIFY=y
@@ -100,11 +98,6 @@ CONFIG_HAVE_PROC_CPU=y
 CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
 CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
 CONFIG_HAVE_UID16=y
-CONFIG_HDLC=m
-CONFIG_HDLC_CISCO=m
-CONFIG_HDLC_FR=m
-CONFIG_HDLC_PPP=m
-CONFIG_HDLC_RAW=m
 CONFIG_HWMON=y
 CONFIG_HW_RANDOM=y
 CONFIG_INITRAMFS_SOURCE=""
@@ -123,7 +116,6 @@ CONFIG_MTD_M25P80=y
 CONFIG_NEED_DMA_MAP_STATE=y
 CONFIG_NEED_KUSER_HELPERS=y
 CONFIG_NEED_PER_CPU_KM=y
-CONFIG_NLS=m
 CONFIG_OLD_SIGACTION=y
 CONFIG_OLD_SIGSUSPEND3=y
 CONFIG_PAGEFLAGS_EXTENDED=y
@@ -138,8 +130,6 @@ CONFIG_PLAT_FA_TIME=y
 # CONFIG_PREEMPT_RCU is not set
 # CONFIG_RCU_STALL_COMMON is not set
 # CONFIG_SCHED_HRTICK is not set
-CONFIG_SCSI=m
-CONFIG_SCSI_MOD=m
 # CONFIG_SCSI_MULTI_LUN is not set
 CONFIG_SERIO=y
 CONFIG_SERIO_LIBPS2=y
diff --git a/target/linux/cns3xxx/config-3.14 b/target/linux/cns3xxx/config-3.14
index df132b4..b372392 100644
--- a/target/linux/cns3xxx/config-3.14
+++ b/target/linux/cns3xxx/config-3.14
@@ -136,7 +136,6 @@ CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
 CONFIG_HAVE_UID16=y
 CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
 CONFIG_HWMON=y
-CONFIG_HW_RANDOM=m
 CONFIG_HZ_FIXED=0
 CONFIG_HZ_PERIODIC=y
 CONFIG_I2C=y
diff --git a/target/linux/cns3xxx/config-3.18 b/target/linux/cns3xxx/config-3.18
index a23caf5..a17544f 100644
--- a/target/linux/cns3xxx/config-3.18
+++ b/target/linux/cns3xxx/config-3.18
@@ -147,7 +147,6 @@ CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
 CONFIG_HAVE_UID16=y
 CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
 CONFIG_HWMON=y
-CONFIG_HW_RANDOM=m
 CONFIG_HZ_FIXED=0
 CONFIG_HZ_PERIODIC=y
 CONFIG_I2C=y
diff --git a/target/linux/generic/config-3.10 b/target/linux/generic/config-3.10
index 5df8901..ad00b94 100644
--- a/target/linux/generic/config-3.10
+++ b/target/linux/generic/config-3.10
@@ -2269,7 +2269,6 @@ CONFIG_NF_CONNTRACK_PROCFS=y
 # CONFIG_NF_NAT_AMANDA is not set
 # CONFIG_NF_NAT_FTP is not set
 # CONFIG_NF_NAT_H323 is not set
-CONFIG_NF_NAT_IPV4=m
 # CONFIG_NF_NAT_IPV6 is not set
 # CONFIG_NF_NAT_IRC is not set
 # CONFIG_NF_NAT_NEEDED is not set
@@ -2890,7 +2889,6 @@ CONFIG_SCSI_PROC_FS=y
 # CONFIG_SCSI_U14_34F is not set
 # CONFIG_SCSI_UFSHCD is not set
 # CONFIG_SCSI_ULTRASTOR is not set
-CONFIG_SCSI_WAIT_SCAN=m
 # CONFIG_SDIO_UART is not set
 # CONFIG_SECCOMP is not set
 # CONFIG_SECURITY is not set
diff --git a/target/linux/generic/config-3.13 b/target/linux/generic/config-3.13
index 79261d8..4b82aa0 100644
--- a/target/linux/generic/config-3.13
+++ b/target/linux/generic/config-3.13
@@ -255,7 +255,6 @@ CONFIG_ATA_SFF=y
 # CONFIG_ATH79 is not set
 # CONFIG_ATH9K is not set
 # CONFIG_ATH9K_HTC is not set
-CONFIG_ATH_CARDS=m
 # CONFIG_ATH_DEBUG is not set
 # CONFIG_ATL1 is not set
 # CONFIG_ATL1C is not set
@@ -2393,7 +2392,6 @@ CONFIG_NF_CONNTRACK_PROCFS=y
 # CONFIG_NF_NAT_AMANDA is not set
 # CONFIG_NF_NAT_FTP is not set
 # CONFIG_NF_NAT_H323 is not set
-CONFIG_NF_NAT_IPV4=m
 # CONFIG_NF_NAT_IPV6 is not set
 # CONFIG_NF_NAT_IRC is not set
 # CONFIG_NF_NAT_NEEDED is not set
@@ -3042,7 +3040,6 @@ CONFIG_SCSI_PROC_FS=y
 # CONFIG_SCSI_U14_34F is not set
 # CONFIG_SCSI_UFSHCD is not set
 # CONFIG_SCSI_ULTRASTOR is not set
-CONFIG_SCSI_WAIT_SCAN=m
 # CONFIG_SDIO_UART is not set
 # CONFIG_SECCOMP is not set
 # CONFIG_SECURITY is not set
diff --git a/target/linux/generic/config-3.14 b/target/linux/generic/config-3.14
index 9485ea1..5637b23 100644
--- a/target/linux/generic/config-3.14
+++ b/target/linux/generic/config-3.14
@@ -261,7 +261,6 @@ CONFIG_ATA_SFF=y
 # CONFIG_ATH79 is not set
 # CONFIG_ATH9K is not set
 # CONFIG_ATH9K_HTC is not set
-CONFIG_ATH_CARDS=m
 # CONFIG_ATH_DEBUG is not set
 # CONFIG_ATL1 is not set
 # CONFIG_ATL1C is not set
@@ -2443,7 +2442,6 @@ CONFIG_NF_CONNTRACK_PROCFS=y
 # CONFIG_NF_NAT_AMANDA is not set
 # CONFIG_NF_NAT_FTP is not set
 # CONFIG_NF_NAT_H323 is not set
-CONFIG_NF_NAT_IPV4=m
 # CONFIG_NF_NAT_IPV6 is not set
 # CONFIG_NF_NAT_IRC is not set
 # CONFIG_NF_NAT_NEEDED is not set
@@ -3103,7 +3101,6 @@ CONFIG_SCSI_PROC_FS=y
 # CONFIG_SCSI_U14_34F is not set
 # CONFIG_SCSI_UFSHCD is not set
 # CONFIG_SCSI_ULTRASTOR is not set
-CONFIG_SCSI_WAIT_SCAN=m
 # CONFIG_SDIO_UART is not set
 # CONFIG_SECCOMP is not set
 # CONFIG_SECURITY is not set
diff --git a/target/linux/generic/config-3.18 b/target/linux/generic/config-3.18
index 34782e3..ab30167 100644
--- a/target/linux/generic/config-3.18
+++ b/target/linux/generic/config-3.18
@@ -279,7 +279,6 @@ CONFIG_ATA_SFF=y
 # CONFIG_ATH79 is not set
 # CONFIG_ATH9K is not set
 # CONFIG_ATH9K_HTC is not set
-CONFIG_ATH_CARDS=m
 # CONFIG_ATH_DEBUG is not set
 # CONFIG_ATL1 is not set
 # CONFIG_ATL1C is not set
@@ -2551,12 +2550,10 @@ CONFIG_NF_CONNTRACK_PROCFS=y
 # CONFIG_NF_CT_PROTO_UDPLITE is not set
 # CONFIG_NF_DEFRAG_IPV4 is not set
 # CONFIG_NF_LOG_ARP is not set
-CONFIG_NF_LOG_IPV4=m
 # CONFIG_NF_NAT is not set
 # CONFIG_NF_NAT_AMANDA is not set
 # CONFIG_NF_NAT_FTP is not set
 # CONFIG_NF_NAT_H323 is not set
-CONFIG_NF_NAT_IPV4=m
 # CONFIG_NF_NAT_IPV6 is not set
 # CONFIG_NF_NAT_IRC is not set
 # CONFIG_NF_NAT_MASQUERADE_IPV4 is not set
@@ -2568,7 +2565,6 @@ CONFIG_NF_NAT_IPV4=m
 # CONFIG_NF_NAT_SIP is not set
 # CONFIG_NF_NAT_SNMP_BASIC is not set
 # CONFIG_NF_NAT_TFTP is not set
-CONFIG_NF_REJECT_IPV4=m
 # CONFIG_NF_TABLES is not set
 # CONFIG_NI52 is not set
 # CONFIG_NI65 is not set
@@ -3231,7 +3227,6 @@ CONFIG_SCSI_PROC_FS=y
 # CONFIG_SCSI_U14_34F is not set
 # CONFIG_SCSI_UFSHCD is not set
 # CONFIG_SCSI_ULTRASTOR is not set
-CONFIG_SCSI_WAIT_SCAN=m
 # CONFIG_SDIO_UART is not set
 # CONFIG_SECCOMP is not set
 # CONFIG_SECURITY is not set
diff --git a/target/linux/generic/config-3.3 b/target/linux/generic/config-3.3
index 70330e0..6567bca 100644
--- a/target/linux/generic/config-3.3
+++ b/target/linux/generic/config-3.3
@@ -2482,7 +2482,6 @@ CONFIG_SCSI_PROC_FS=y
 # CONFIG_SCSI_TGT is not set
 # CONFIG_SCSI_U14_34F is not set
 # CONFIG_SCSI_ULTRASTOR is not set
-CONFIG_SCSI_WAIT_SCAN=m
 # CONFIG_SDIO_UART is not set
 # CONFIG_SECCOMP is not set
 # CONFIG_SECURITY is not set
diff --git a/target/linux/generic/config-3.8 b/target/linux/generic/config-3.8
index c27493f..b647075 100644
--- a/target/linux/generic/config-3.8
+++ b/target/linux/generic/config-3.8
@@ -2190,7 +2190,6 @@ CONFIG_NF_CONNTRACK_PROCFS=y
 # CONFIG_NF_NAT_AMANDA is not set
 # CONFIG_NF_NAT_FTP is not set
 # CONFIG_NF_NAT_H323 is not set
-CONFIG_NF_NAT_IPV4=m
 # CONFIG_NF_NAT_IPV6 is not set
 # CONFIG_NF_NAT_IRC is not set
 # CONFIG_NF_NAT_NEEDED is not set
@@ -2782,7 +2781,6 @@ CONFIG_SCSI_PROC_FS=y
 # CONFIG_SCSI_U14_34F is not set
 # CONFIG_SCSI_UFSHCD is not set
 # CONFIG_SCSI_ULTRASTOR is not set
-CONFIG_SCSI_WAIT_SCAN=m
 # CONFIG_SDIO_UART is not set
 # CONFIG_SECCOMP is not set
 # CONFIG_SECURITY is not set
diff --git a/target/linux/iop32x/config-3.3 b/target/linux/iop32x/config-3.3
index 6ce112b..8bdfc73 100644
--- a/target/linux/iop32x/config-3.3
+++ b/target/linux/iop32x/config-3.3
@@ -18,7 +18,6 @@ CONFIG_ARM_PATCH_PHYS_VIRT=y
 # CONFIG_ARM_THUMB is not set
 # CONFIG_ARPD is not set
 CONFIG_ASYNC_TX_ENABLE_CHANNEL_SWITCH=y
-CONFIG_ATA=m
 # CONFIG_CACHE_L2X0 is not set
 CONFIG_CMDLINE="root=/dev/mtdblock2 rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"
 CONFIG_CMDLINE_FROM_BOOTLOADER=y
@@ -34,7 +33,6 @@ CONFIG_CPU_USE_DOMAINS=y
 CONFIG_CPU_XSCALE=y
 # CONFIG_DEBUG_USER is not set
 CONFIG_DECOMPRESS_LZMA=y
-CONFIG_DLCI=m
 CONFIG_DLCI_MAX=8
 CONFIG_DMADEVICES=y
 CONFIG_DMA_ENGINE=y
@@ -81,11 +79,6 @@ CONFIG_HAVE_PROC_CPU=y
 CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
 CONFIG_HAVE_SCHED_CLOCK=y
 CONFIG_HAVE_SPARSE_IRQ=y
-CONFIG_HDLC=m
-CONFIG_HDLC_CISCO=m
-CONFIG_HDLC_FR=m
-CONFIG_HDLC_PPP=m
-CONFIG_HDLC_RAW=m
 CONFIG_HWMON=y
 CONFIG_HW_RANDOM=y
 CONFIG_I2C=y
@@ -110,7 +103,6 @@ CONFIG_MTD_REDBOOT_PARTS=y
 CONFIG_NEED_DMA_MAP_STATE=y
 CONFIG_NEED_PER_CPU_KM=y
 CONFIG_NET_DMA=y
-CONFIG_NLS=m
 CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_PAGE_OFFSET=0xC0000000
 CONFIG_PCI=y
@@ -121,23 +113,16 @@ CONFIG_R8169=y
 CONFIG_RTC_CLASS=y
 CONFIG_RTC_DRV_PCF8563=y
 CONFIG_RTC_DRV_X1205=y
-CONFIG_SCSI=m
-CONFIG_SCSI_MOD=m
 # CONFIG_SCSI_MULTI_LUN is not set
 CONFIG_SPLIT_PTLOCK_CPUS=999999
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
 CONFIG_UID16=y
-CONFIG_USB=m
 CONFIG_USB_ARCH_HAS_XHCI=y
-CONFIG_USB_COMMON=m
-CONFIG_USB_EHCI_HCD=m
 # CONFIG_USB_EHCI_HCD_PLATFORM is not set
 # CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
 # CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
-CONFIG_USB_OHCI_HCD=m
 # CONFIG_USB_OHCI_HCD_PLATFORM is not set
 CONFIG_USB_SUPPORT=y
-CONFIG_USB_UHCI_HCD=m
 CONFIG_VECTORS_BASE=0xffff0000
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_WAN=y
diff --git a/target/linux/malta/config-3.10 b/target/linux/malta/config-3.10
index 5232688..fd8dc3f 100644
--- a/target/linux/malta/config-3.10
+++ b/target/linux/malta/config-3.10
@@ -5,7 +5,6 @@ CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y
 CONFIG_ARCH_MAY_HAVE_PC_FDC=y
 CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
 # CONFIG_ARPD is not set
-CONFIG_AX88796=m
 # CONFIG_AX88796_93CX6 is not set
 CONFIG_BLK_DEV_BSG=y
 CONFIG_BLK_DEV_BSGLIB=y
@@ -16,7 +15,6 @@ CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=4096
 CONFIG_BOARD_SCACHE=y
-CONFIG_BONDING=m
 CONFIG_BOOT_ELF32=y
 CONFIG_BOUNCE=y
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
@@ -40,17 +38,7 @@ CONFIG_CPU_R4K_FPU=y
 # CONFIG_CPU_RM7000 is not set
 CONFIG_CPU_RMAP=y
 CONFIG_CPU_SUPPORTS_HIGHMEM=y
-CONFIG_CRYPTO_ARC4=m
-CONFIG_CRYPTO_BLKCIPHER=m
-CONFIG_CRYPTO_BLKCIPHER2=m
-CONFIG_CRYPTO_ECB=m
-CONFIG_CRYPTO_HASH=m
-CONFIG_CRYPTO_HASH2=m
-CONFIG_CRYPTO_MANAGER=m
 CONFIG_CRYPTO_MANAGER2=y
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_RNG2=m
-CONFIG_CRYPTO_WORKQUEUE=m
 CONFIG_CSRC_GIC=y
 CONFIG_CSRC_R4K=y
 # CONFIG_DEBUG_FS is not set
@@ -58,11 +46,9 @@ CONFIG_DEVKMEM=y
 CONFIG_DMA_MAYBE_COHERENT=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DNOTIFY=y
-CONFIG_DUMMY=m
 CONFIG_DUMMY_CONSOLE=y
 CONFIG_EARLY_PRINTK=y
 CONFIG_ENABLE_MUST_CHECK=y
-CONFIG_EQUALIZER=m
 CONFIG_FIRMWARE_IN_KERNEL=y
 CONFIG_FS_POSIX_ACL=y
 CONFIG_GENERIC_ATOMIC64=y
@@ -107,12 +93,10 @@ CONFIG_HAVE_NET_DSA=y
 CONFIG_HAVE_OPROFILE=y
 CONFIG_HAVE_PCSPKR_PLATFORM=y
 CONFIG_HAVE_PERF_EVENTS=y
-CONFIG_HOSTAP=m
 CONFIG_HOSTAP_FIRMWARE=y
 CONFIG_HOSTAP_FIRMWARE_NVRAM=y
 CONFIG_HW_CONSOLE=y
 CONFIG_HW_HAS_PCI=y
-CONFIG_HW_RANDOM=m
 CONFIG_I8253=y
 CONFIG_I8253_LOCK=y
 CONFIG_I8259=y
@@ -140,14 +124,8 @@ CONFIG_KERNEL_GZIP=y
 # CONFIG_LEDS_TRIGGER_TIMER is not set
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=256
-CONFIG_LIB80211=m
-CONFIG_LIB80211_CRYPT_CCMP=m
-CONFIG_LIB80211_CRYPT_TKIP=m
-CONFIG_LIB80211_CRYPT_WEP=m
 CONFIG_LOG_BUF_SHIFT=15
-CONFIG_MACVLAN=m
 CONFIG_MD=y
-CONFIG_MDIO_BITBANG=m
 CONFIG_MDIO_BOARDINFO=y
 CONFIG_MIPS=y
 CONFIG_MIPS_BONITO64=y
@@ -171,11 +149,9 @@ CONFIG_MODULE_FORCE_UNLOAD=y
 CONFIG_MTD_CFI_STAA=y
 # CONFIG_MTD_COMPLEX_MAPPINGS is not set
 CONFIG_MTD_PHYSMAP=y
-CONFIG_MTD_UBI=m
 CONFIG_MTD_UBI_BEB_LIMIT=20
 # CONFIG_MTD_UBI_BLOCK is not set
 # CONFIG_MTD_UBI_FASTMAP is not set
-CONFIG_MTD_UBI_GLUEBI=m
 CONFIG_MTD_UBI_WL_THRESHOLD=4096
 CONFIG_MUTEX_SPIN_ON_OWNER=y
 CONFIG_NAMESPACES=y
@@ -195,7 +171,6 @@ CONFIG_PCI_GT64XXX_PCI0=y
 CONFIG_PCSPKR_PLATFORM=y
 CONFIG_PERF_EVENTS=y
 CONFIG_PERF_USE_VMALLOC=y
-CONFIG_PHYLIB=m
 CONFIG_PID_NS=y
 # CONFIG_PREEMPT_RCU is not set
 CONFIG_PRINT_QUOTA_WARNING=y
@@ -212,10 +187,7 @@ CONFIG_RFS_ACCEL=y
 CONFIG_RPS=y
 CONFIG_RTC_CLASS=y
 CONFIG_SCSI=y
-CONFIG_SCSI_FC_ATTRS=m
-CONFIG_SCSI_ISCSI_ATTRS=m
 CONFIG_SCSI_NETLINK=y
-CONFIG_SCSI_SPI_ATTRS=m
 CONFIG_SECCOMP=y
 CONFIG_SERIAL_8250_NR_UARTS=4
 CONFIG_SERIAL_8250_RUNTIME_UARTS=4
@@ -250,7 +222,6 @@ CONFIG_SYS_SUPPORTS_ZBOOT=y
 # CONFIG_TCP_CONG_ADVANCED is not set
 CONFIG_TICK_CPU_ACCOUNTING=y
 CONFIG_TREE_RCU=y
-CONFIG_TUN=m
 # CONFIG_UBIFS_FS is not set
 CONFIG_UIDGID_CONVERTED=y
 CONFIG_USB_ARCH_HAS_XHCI=y
@@ -258,7 +229,6 @@ CONFIG_USB_SUPPORT=y
 # CONFIG_USER_NS is not set
 CONFIG_USE_GENERIC_SMP_HELPERS=y
 CONFIG_UTS_NS=y
-CONFIG_VETH=m
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_VT=y
diff --git a/target/linux/malta/config-3.14 b/target/linux/malta/config-3.14
index 91f0aeb..0322b9c 100644
--- a/target/linux/malta/config-3.14
+++ b/target/linux/malta/config-3.14
@@ -6,7 +6,6 @@ CONFIG_ARCH_MAY_HAVE_PC_FDC=y
 CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
 CONFIG_ARCH_MIGHT_HAVE_PC_SERIO=y
 CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
-CONFIG_AX88796=m
 # CONFIG_AX88796_93CX6 is not set
 CONFIG_BLK_DEV_BSG=y
 CONFIG_BLK_DEV_BSGLIB=y
@@ -17,7 +16,6 @@ CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=4096
 CONFIG_BOARD_SCACHE=y
-CONFIG_BONDING=m
 CONFIG_BOOT_ELF32=y
 CONFIG_BOUNCE=y
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
@@ -41,17 +39,7 @@ CONFIG_CPU_R4K_FPU=y
 # CONFIG_CPU_RM7000 is not set
 CONFIG_CPU_RMAP=y
 CONFIG_CPU_SUPPORTS_HIGHMEM=y
-CONFIG_CRYPTO_ARC4=m
-CONFIG_CRYPTO_BLKCIPHER=m
-CONFIG_CRYPTO_BLKCIPHER2=m
-CONFIG_CRYPTO_ECB=m
-CONFIG_CRYPTO_HASH=m
-CONFIG_CRYPTO_HASH2=m
-CONFIG_CRYPTO_MANAGER=m
 CONFIG_CRYPTO_MANAGER2=y
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_RNG2=m
-CONFIG_CRYPTO_WORKQUEUE=m
 CONFIG_CSRC_GIC=y
 CONFIG_CSRC_R4K=y
 # CONFIG_DEBUG_FS is not set
@@ -59,11 +47,9 @@ CONFIG_DEVKMEM=y
 CONFIG_DMA_MAYBE_COHERENT=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DNOTIFY=y
-CONFIG_DUMMY=m
 CONFIG_DUMMY_CONSOLE=y
 CONFIG_EARLY_PRINTK=y
 CONFIG_ENABLE_MUST_CHECK=y
-CONFIG_EQUALIZER=m
 CONFIG_FIRMWARE_IN_KERNEL=y
 CONFIG_FS_POSIX_ACL=y
 CONFIG_GENERIC_ATOMIC64=y
@@ -116,12 +102,10 @@ CONFIG_HAVE_OPROFILE=y
 CONFIG_HAVE_PCSPKR_PLATFORM=y
 CONFIG_HAVE_PERF_EVENTS=y
 CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
-CONFIG_HOSTAP=m
 CONFIG_HOSTAP_FIRMWARE=y
 CONFIG_HOSTAP_FIRMWARE_NVRAM=y
 CONFIG_HW_CONSOLE=y
 CONFIG_HW_HAS_PCI=y
-CONFIG_HW_RANDOM=m
 CONFIG_I8253=y
 CONFIG_I8253_LOCK=y
 CONFIG_I8259=y
@@ -150,14 +134,8 @@ CONFIG_KERNEL_GZIP=y
 # CONFIG_LEDS_TRIGGER_TIMER is not set
 CONFIG_LEGACY_PTYS=y
 CONFIG_LEGACY_PTY_COUNT=256
-CONFIG_LIB80211=m
-CONFIG_LIB80211_CRYPT_CCMP=m
-CONFIG_LIB80211_CRYPT_TKIP=m
-CONFIG_LIB80211_CRYPT_WEP=m
 CONFIG_LOG_BUF_SHIFT=15
-CONFIG_MACVLAN=m
 CONFIG_MD=y
-CONFIG_MDIO_BITBANG=m
 CONFIG_MDIO_BOARDINFO=y
 CONFIG_MIPS=y
 CONFIG_MIPS_BONITO64=y
@@ -183,11 +161,9 @@ CONFIG_MODULE_FORCE_UNLOAD=y
 CONFIG_MTD_CFI_STAA=y
 # CONFIG_MTD_COMPLEX_MAPPINGS is not set
 CONFIG_MTD_PHYSMAP=y
-CONFIG_MTD_UBI=m
 CONFIG_MTD_UBI_BEB_LIMIT=20
 # CONFIG_MTD_UBI_BLOCK is not set
 # CONFIG_MTD_UBI_FASTMAP is not set
-CONFIG_MTD_UBI_GLUEBI=m
 CONFIG_MTD_UBI_WL_THRESHOLD=4096
 CONFIG_MUTEX_SPIN_ON_OWNER=y
 CONFIG_NAMESPACES=y
@@ -208,7 +184,6 @@ CONFIG_PCI_GT64XXX_PCI0=y
 CONFIG_PCSPKR_PLATFORM=y
 CONFIG_PERF_EVENTS=y
 CONFIG_PERF_USE_VMALLOC=y
-CONFIG_PHYLIB=m
 CONFIG_PID_NS=y
 # CONFIG_PREEMPT_RCU is not set
 CONFIG_PRINT_QUOTA_WARNING=y
@@ -225,10 +200,7 @@ CONFIG_RFS_ACCEL=y
 CONFIG_RPS=y
 CONFIG_RTC_CLASS=y
 CONFIG_SCSI=y
-CONFIG_SCSI_FC_ATTRS=m
-CONFIG_SCSI_ISCSI_ATTRS=m
 CONFIG_SCSI_NETLINK=y
-CONFIG_SCSI_SPI_ATTRS=m
 CONFIG_SECCOMP=y
 CONFIG_SERIAL_8250_NR_UARTS=4
 CONFIG_SERIAL_8250_RUNTIME_UARTS=4
@@ -264,7 +236,6 @@ CONFIG_SYS_SUPPORTS_ZBOOT=y
 # CONFIG_TCP_CONG_ADVANCED is not set
 CONFIG_TICK_CPU_ACCOUNTING=y
 CONFIG_TREE_RCU=y
-CONFIG_TUN=m
 # CONFIG_UBIFS_FS is not set
 CONFIG_UIDGID_CONVERTED=y
 CONFIG_USB_ARCH_HAS_XHCI=y
@@ -272,7 +243,6 @@ CONFIG_USB_SUPPORT=y
 # CONFIG_USER_NS is not set
 CONFIG_USE_GENERIC_SMP_HELPERS=y
 CONFIG_UTS_NS=y
-CONFIG_VETH=m
 # CONFIG_VGA_CONSOLE is not set
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_VT=y
diff --git a/target/linux/mpc52xx/config-3.8 b/target/linux/mpc52xx/config-3.8
index 299059e..606d29f 100644
--- a/target/linux/mpc52xx/config-3.8
+++ b/target/linux/mpc52xx/config-3.8
@@ -274,7 +274,6 @@ CONFIG_TICK_CPU_ACCOUNTING=y
 CONFIG_UIDGID_CONVERTED=y
 CONFIG_USB_ARCH_HAS_XHCI=y
 CONFIG_USB_SUPPORT=y
-CONFIG_VIDEO_OUTPUT_CONTROL=m
 # CONFIG_VLAN_8021Q is not set
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_WATCHDOG_NOWAYOUT=y
diff --git a/target/linux/mpc83xx/config-3.8 b/target/linux/mpc83xx/config-3.8
index cedd047..5d7eb38 100644
--- a/target/linux/mpc83xx/config-3.8
+++ b/target/linux/mpc83xx/config-3.8
@@ -35,12 +35,7 @@ CONFIG_CLONE_BACKWARDS=y
 CONFIG_CMDLINE="console=ttyS0,115200 rootfstype=squashfs,yaffs2,jffs2"
 CONFIG_CMDLINE_BOOL=y
 CONFIG_COMPAT_BRK=y
-CONFIG_CONFIGFS_FS=m
-CONFIG_CRC16=m
-CONFIG_CRC7=m
 CONFIG_CRC_CCITT=y
-CONFIG_CRC_ITU_T=m
-CONFIG_CRC_T10DIF=m
 CONFIG_CRYPTO_AEAD=y
 CONFIG_CRYPTO_AEAD2=y
 CONFIG_CRYPTO_AUTHENC=y
@@ -48,19 +43,13 @@ CONFIG_CRYPTO_BLKCIPHER=y
 CONFIG_CRYPTO_BLKCIPHER2=y
 CONFIG_CRYPTO_CBC=y
 CONFIG_CRYPTO_CRC32C=y
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_DES=m
 CONFIG_CRYPTO_DEV_TALITOS=y
-CONFIG_CRYPTO_GF128MUL=m
 CONFIG_CRYPTO_HASH=y
 CONFIG_CRYPTO_HASH2=y
-CONFIG_CRYPTO_HMAC=m
 CONFIG_CRYPTO_HW=y
 CONFIG_CRYPTO_MANAGER=y
 CONFIG_CRYPTO_MANAGER2=y
-CONFIG_CRYPTO_MD5=m
 CONFIG_CRYPTO_RNG2=y
-CONFIG_CRYPTO_SHA1=m
 CONFIG_CRYPTO_WORKQUEUE=y
 CONFIG_DECOMPRESS_LZMA=y
 CONFIG_DEFAULT_CFQ=y
@@ -149,17 +138,7 @@ CONFIG_HW_RANDOM=y
 CONFIG_HZ=250
 # CONFIG_HZ_100 is not set
 CONFIG_HZ_250=y
-CONFIG_INET_AH=m
-CONFIG_INET_DIAG=m
-CONFIG_INET_ESP=m
-CONFIG_INET_IPCOMP=m
 CONFIG_INET_LRO=y
-CONFIG_INET_TCP_DIAG=m
-CONFIG_INET_TUNNEL=m
-CONFIG_INET_XFRM_MODE_BEET=m
-CONFIG_INET_XFRM_MODE_TRANSPORT=m
-CONFIG_INET_XFRM_MODE_TUNNEL=m
-CONFIG_INET_XFRM_TUNNEL=m
 CONFIG_INITRAMFS_SOURCE=""
 CONFIG_INPUT=y
 # CONFIG_INPUT_MISC is not set
@@ -169,7 +148,6 @@ CONFIG_IPIC=y
 CONFIG_IP_PIMSM_V1=y
 CONFIG_IP_PIMSM_V2=y
 CONFIG_IP_ROUTE_CLASSID=y
-CONFIG_IP_SCTP=m
 CONFIG_IRQ_DOMAIN=y
 CONFIG_IRQ_FORCED_THREADING=y
 CONFIG_ISA_DMA_API=y
@@ -229,33 +207,8 @@ CONFIG_MTD_UBI_WL_THRESHOLD=4096
 # CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK is not set
 CONFIG_NEED_PER_CPU_KM=y
 CONFIG_NEED_SG_DMA_LENGTH=y
-CONFIG_NET_CLS_BASIC=m
-CONFIG_NET_CLS_FLOW=m
-CONFIG_NET_CLS_FW=m
-CONFIG_NET_CLS_ROUTE4=m
-CONFIG_NET_CLS_RSVP=m
-CONFIG_NET_CLS_RSVP6=m
-CONFIG_NET_CLS_TCINDEX=m
-CONFIG_NET_CLS_U32=m
 # CONFIG_NET_DMA is not set
 CONFIG_NET_EMATCH=y
-CONFIG_NET_EMATCH_CMP=m
-CONFIG_NET_EMATCH_META=m
-CONFIG_NET_EMATCH_NBYTE=m
-CONFIG_NET_EMATCH_TEXT=m
-CONFIG_NET_EMATCH_U32=m
-CONFIG_NET_IPIP=m
-CONFIG_NET_SCH_CBQ=m
-CONFIG_NET_SCH_DSMARK=m
-CONFIG_NET_SCH_GRED=m
-CONFIG_NET_SCH_HFSC=m
-CONFIG_NET_SCH_HTB=m
-CONFIG_NET_SCH_NETEM=m
-CONFIG_NET_SCH_PRIO=m
-CONFIG_NET_SCH_RED=m
-CONFIG_NET_SCH_SFQ=m
-CONFIG_NET_SCH_TBF=m
-CONFIG_NET_SCH_TEQL=m
 # CONFIG_NONSTATIC_KERNEL is not set
 CONFIG_NR_IRQS=512
 CONFIG_OF=y
@@ -373,9 +326,6 @@ CONFIG_SPI_MASTER=y
 CONFIG_SYSCTL_EXCEPTION_TRACE=y
 CONFIG_TASK_SIZE=0xc0000000
 # CONFIG_TAU is not set
-CONFIG_TEXTSEARCH_BM=m
-CONFIG_TEXTSEARCH_FSM=m
-CONFIG_TEXTSEARCH_KMP=m
 CONFIG_TICK_CPU_ACCOUNTING=y
 CONFIG_TMPFS_POSIX_ACL=y
 # CONFIG_UBIFS_FS is not set
@@ -390,10 +340,7 @@ CONFIG_USB_ARCH_HAS_XHCI=y
 CONFIG_VIA_VELOCITY=y
 CONFIG_VITESSE_PHY=y
 CONFIG_VITESSE_PHY_8601_SKEW=y
-CONFIG_WAN_ROUTER=m
 CONFIG_WORD_SIZE=32
-CONFIG_XFRM_ALGO=m
-CONFIG_XFRM_IPCOMP=m
 CONFIG_XZ_DEC_BCJ=y
 CONFIG_XZ_DEC_POWERPC=y
 CONFIG_YAFFS_9BYTE_TAGS=y
diff --git a/target/linux/omap24xx/config-3.3 b/target/linux/omap24xx/config-3.3
index f3d45f5..b21ee37 100644
--- a/target/linux/omap24xx/config-3.3
+++ b/target/linux/omap24xx/config-3.3
@@ -41,9 +41,6 @@
 # CONFIG_ADIS16060 is not set
 # CONFIG_ADIS16080 is not set
 # CONFIG_ADIS16130 is not set
-CONFIG_ADIS16201=m
-CONFIG_ADIS16203=m
-CONFIG_ADIS16204=m
 # CONFIG_ADIS16209 is not set
 # CONFIG_ADIS16220 is not set
 # CONFIG_ADIS16240 is not set
@@ -93,10 +90,7 @@ CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=4096
 CONFIG_BLK_DEV_SD=y
-CONFIG_BRIDGE=m
-CONFIG_BT=m
 # CONFIG_BT_HCIH4P is not set
-CONFIG_BT_HCIUART=m
 # CONFIG_BT_HCIUART_BCSP is not set
 # CONFIG_CACHE_L2X0 is not set
 CONFIG_CBUS=y
@@ -105,7 +99,6 @@ CONFIG_CBUS_RETU_HEADSET=y
 CONFIG_CBUS_RETU_POWERBUTTON=y
 CONFIG_CBUS_RETU_WDT=y
 CONFIG_CBUS_TAHVO=y
-CONFIG_CBUS_TAHVO_USB=m
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 # CONFIG_CFS_BANDWIDTH is not set
 CONFIG_CGROUPS=y
@@ -161,18 +154,12 @@ CONFIG_CRYPTO_AEAD2=y
 CONFIG_CRYPTO_AES=y
 CONFIG_CRYPTO_ALGAPI=y
 CONFIG_CRYPTO_ALGAPI2=y
-CONFIG_CRYPTO_ARC4=m
-CONFIG_CRYPTO_BLKCIPHER=m
 CONFIG_CRYPTO_BLKCIPHER2=y
-CONFIG_CRYPTO_CBC=m
-CONFIG_CRYPTO_DES=m
 CONFIG_CRYPTO_DEV_OMAP_AES=y
 CONFIG_CRYPTO_DEV_OMAP_SHAM=y
-CONFIG_CRYPTO_ECB=m
 CONFIG_CRYPTO_HASH=y
 CONFIG_CRYPTO_HASH2=y
 CONFIG_CRYPTO_HW=y
-CONFIG_CRYPTO_MANAGER=m
 CONFIG_CRYPTO_MANAGER2=y
 CONFIG_CRYPTO_MD5=y
 CONFIG_CRYPTO_PCOMP2=y
@@ -191,7 +178,6 @@ CONFIG_DNOTIFY=y
 CONFIG_DNS_RESOLVER=y
 CONFIG_DUMMY_CONSOLE=y
 CONFIG_ENABLE_MUST_CHECK=y
-CONFIG_EXPORTFS=m
 CONFIG_EXT4_FS=y
 CONFIG_FAIR_GROUP_SCHED=y
 CONFIG_FAT_FS=y
@@ -269,9 +255,7 @@ CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
 CONFIG_HAVE_SCHED_CLOCK=y
 CONFIG_HAVE_SPARSE_IRQ=y
 CONFIG_HID=y
-CONFIG_HID_APPLE=m
 CONFIG_HID_SUPPORT=y
-CONFIG_HWMON=m
 CONFIG_HW_CONSOLE=y
 CONFIG_HW_RANDOM=y
 CONFIG_HW_RANDOM_OMAP=y
@@ -286,12 +270,8 @@ CONFIG_IIO=y
 # CONFIG_IIO_BUFFER is not set
 # CONFIG_IIO_SIMPLE_DUMMY is not set
 # CONFIG_IIO_TRIGGER is not set
-CONFIG_INET6_XFRM_MODE_BEET=m
-CONFIG_INET6_XFRM_MODE_TRANSPORT=m
-CONFIG_INET6_XFRM_MODE_TUNNEL=m
 CONFIG_INET_DIAG=y
 CONFIG_INET_TCP_DIAG=y
-CONFIG_INET_TUNNEL=m
 # CONFIG_INLINE_READ_UNLOCK is not set
 # CONFIG_INLINE_READ_UNLOCK_IRQ is not set
 # CONFIG_INLINE_SPIN_UNLOCK is not set
@@ -313,17 +293,11 @@ CONFIG_INPUT_TOUCHSCREEN=y
 CONFIG_IOSCHED_CFQ=y
 # CONFIG_IOSCHED_DEADLINE is not set
 CONFIG_IPV6=y
-CONFIG_IPV6_MIP6=m
 CONFIG_IPV6_PRIVACY=y
 CONFIG_IPV6_ROUTER_PREF=y
-CONFIG_IPV6_SIT=m
 # CONFIG_IP_ADVANCED_ROUTER is not set
 # CONFIG_IP_MROUTE is not set
-CONFIG_IR_LIRC_CODEC=m
-CONFIG_IR_MCE_KBD_DECODER=m
-CONFIG_IR_RC5_SZ_DECODER=m
 # CONFIG_IR_REDRAT3 is not set
-CONFIG_IR_SANYO_DECODER=m
 # CONFIG_ISDN is not set
 # CONFIG_ISP1301_OMAP is not set
 CONFIG_JBD2=y
@@ -365,10 +339,7 @@ CONFIG_KTIME_SCALAR=y
 # CONFIG_LEDS_REGULATOR is not set
 CONFIG_LEDS_TRIGGER_BACKLIGHT=y
 CONFIG_LEDS_TRIGGER_GPIO=y
-CONFIG_LIRC=m
 # CONFIG_LIS3L02DQ is not set
-CONFIG_LLC=m
-CONFIG_LOCKD=m
 CONFIG_LOG_BUF_SHIFT=18
 CONFIG_LZO_COMPRESS=y
 CONFIG_LZO_DECOMPRESS=y
@@ -380,25 +351,10 @@ CONFIG_MACH_OMAP2_TUSB6010=y
 # CONFIG_MACH_OMAP_APOLLON is not set
 # CONFIG_MACH_OMAP_GENERIC is not set
 # CONFIG_MACH_OMAP_H4 is not set
-CONFIG_MACVLAN=m
 CONFIG_MAC_PARTITION=y
 # CONFIG_MAX1363 is not set
 # CONFIG_MAX517 is not set
 CONFIG_MEDIA_ATTACH=y
-CONFIG_MEDIA_SUPPORT=m
-CONFIG_MEDIA_TUNER=m
-CONFIG_MEDIA_TUNER_MC44S803=m
-CONFIG_MEDIA_TUNER_MT20XX=m
-CONFIG_MEDIA_TUNER_SIMPLE=m
-CONFIG_MEDIA_TUNER_TDA18271=m
-CONFIG_MEDIA_TUNER_TDA827X=m
-CONFIG_MEDIA_TUNER_TDA8290=m
-CONFIG_MEDIA_TUNER_TDA9887=m
-CONFIG_MEDIA_TUNER_TEA5761=m
-CONFIG_MEDIA_TUNER_TEA5767=m
-CONFIG_MEDIA_TUNER_XC2028=m
-CONFIG_MEDIA_TUNER_XC4000=m
-CONFIG_MEDIA_TUNER_XC5000=m
 CONFIG_MENELAUS=y
 # CONFIG_MFD_T7L66XB is not set
 CONFIG_MMC=y
@@ -409,7 +365,6 @@ CONFIG_MMC_SDHCI_PLTFM=y
 CONFIG_MMC_SPI=y
 CONFIG_MMC_UNSAFE_RESUME=y
 # CONFIG_MOUSE_BCM5974 is not set
-CONFIG_MOUSE_PS2=m
 # CONFIG_MOUSE_PS2_ALPS is not set
 # CONFIG_MOUSE_PS2_ELANTECH is not set
 # CONFIG_MOUSE_PS2_LOGIPS2PP is not set
@@ -434,20 +389,16 @@ CONFIG_MTD_ONENAND_OTP=y
 # CONFIG_MTD_ROOTFS_SPLIT is not set
 CONFIG_MULTI_IRQ_HANDLER=y
 # CONFIG_MUSB_PIO_ONLY is not set
-CONFIG_N810BM=m
 CONFIG_NAMESPACES=y
 CONFIG_NEED_DMA_MAP_STATE=y
 CONFIG_NEED_PER_CPU_KM=y
 # CONFIG_NETPRIO_CGROUP is not set
 # CONFIG_NET_NS is not set
 # CONFIG_NET_SCHED is not set
-CONFIG_NFSD=m
 # CONFIG_NFSD_FAULT_INJECTION is not set
 CONFIG_NFSD_V2_ACL=y
 CONFIG_NFSD_V3_ACL=y
 CONFIG_NFSD_V4=y
-CONFIG_NFS_ACL_SUPPORT=m
-CONFIG_NFS_FS=m
 CONFIG_NFS_USE_KERNEL_DNS=y
 # CONFIG_NFS_USE_LEGACY_DNS is not set
 # CONFIG_NFS_USE_NEW_IDMAPPER is not set
@@ -455,7 +406,6 @@ CONFIG_NFS_V3_ACL=y
 CONFIG_NFS_V4=y
 CONFIG_NFS_V4_1=y
 CONFIG_NLS=y
-CONFIG_NOP_USB_XCEIV=m
 CONFIG_NO_HZ=y
 # CONFIG_OMAP2_DSS is not set
 CONFIG_OMAP_32K_TIMER=y
@@ -484,16 +434,9 @@ CONFIG_PM_CLK=y
 # CONFIG_PM_DEBUG is not set
 CONFIG_PM_RUNTIME=y
 CONFIG_PM_SLEEP=y
-CONFIG_PNFS_FILE_LAYOUT=m
 CONFIG_POSIX_MQUEUE=y
 CONFIG_POSIX_MQUEUE_SYSCTL=y
-CONFIG_PPP=m
-CONFIG_PPP_ASYNC=m
-CONFIG_PPP_BSDCOMP=m
-CONFIG_PPP_DEFLATE=m
-CONFIG_PPP_MPPE=m
 # CONFIG_PPP_MULTILINK is not set
-CONFIG_PPP_SYNC_TTY=m
 CONFIG_PREEMPT=y
 CONFIG_PREEMPT_COUNT=y
 # CONFIG_PREEMPT_NONE is not set
@@ -504,11 +447,8 @@ CONFIG_RCU_BOOST=y
 CONFIG_RCU_BOOST_DELAY=500
 CONFIG_RCU_BOOST_PRIO=1
 # CONFIG_RC_ATI_REMOTE is not set
-CONFIG_RC_CORE=m
 # CONFIG_RC_LOOPBACK is not set
 CONFIG_REGMAP=y
-CONFIG_REGMAP_I2C=m
-CONFIG_REGMAP_SPI=m
 CONFIG_REGULATOR=y
 # CONFIG_REGULATOR_AD5398 is not set
 # CONFIG_REGULATOR_DEBUG is not set
@@ -533,8 +473,6 @@ CONFIG_SCSI=y
 # CONFIG_SENSORS_AK8975 is not set
 # CONFIG_SENSORS_HMC5843 is not set
 # CONFIG_SENSORS_ISL29018 is not set
-CONFIG_SENSORS_LM75=m
-CONFIG_SENSORS_TSL2563=m
 CONFIG_SERIAL_8250_NR_UARTS=4
 CONFIG_SERIAL_8250_RUNTIME_UARTS=4
 CONFIG_SERIAL_OMAP=y
@@ -543,61 +481,29 @@ CONFIG_SERIO=y
 CONFIG_SERIO_LIBPS2=y
 CONFIG_SERIO_SERPORT=y
 # CONFIG_SLAB is not set
-CONFIG_SLHC=m
 CONFIG_SLUB=y
-CONFIG_SND=m
 CONFIG_SND_ARM=y
 # CONFIG_SND_EMU10K1_SEQ is not set
 CONFIG_SND_JACK=y
-CONFIG_SND_MIXER_OSS=m
-CONFIG_SND_OMAP_SOC=m
-CONFIG_SND_OMAP_SOC_MCBSP=m
-CONFIG_SND_OMAP_SOC_N810=m
 # CONFIG_SND_OPL3_LIB_SEQ is not set
 # CONFIG_SND_OPL4_LIB_SEQ is not set
-CONFIG_SND_PCM=m
-CONFIG_SND_PCM_OSS=m
 # CONFIG_SND_RAWMIDI_SEQ is not set
 # CONFIG_SND_SBAWE_SEQ is not set
-CONFIG_SND_SOC=m
 # CONFIG_SND_SOC_ALL_CODECS is not set
-CONFIG_SND_SOC_I2C_AND_SPI=m
-CONFIG_SND_SOC_TLV320AIC3X=m
 CONFIG_SND_SPI=y
 CONFIG_SND_SUPPORT_OLD_API=y
-CONFIG_SND_TIMER=m
 CONFIG_SOC_OMAP2420=y
 # CONFIG_SOC_OMAP2430 is not set
-CONFIG_SOUND=m
 CONFIG_SOUND_OSS_CORE=y
 CONFIG_SOUND_OSS_CORE_PRECLAIM=y
 CONFIG_SPARSE_IRQ=y
-CONFIG_SPEAKUP=m
-CONFIG_SPEAKUP_SYNTH_ACNTPC=m
-CONFIG_SPEAKUP_SYNTH_ACNTSA=m
-CONFIG_SPEAKUP_SYNTH_APOLLO=m
-CONFIG_SPEAKUP_SYNTH_AUDPTR=m
-CONFIG_SPEAKUP_SYNTH_BNS=m
-CONFIG_SPEAKUP_SYNTH_DECEXT=m
-CONFIG_SPEAKUP_SYNTH_DECPC=m
-CONFIG_SPEAKUP_SYNTH_DECTLK=m
-CONFIG_SPEAKUP_SYNTH_DTLK=m
-CONFIG_SPEAKUP_SYNTH_DUMMY=m
-CONFIG_SPEAKUP_SYNTH_KEYPC=m
-CONFIG_SPEAKUP_SYNTH_LTLK=m
-CONFIG_SPEAKUP_SYNTH_SOFT=m
-CONFIG_SPEAKUP_SYNTH_SPKOUT=m
-CONFIG_SPEAKUP_SYNTH_TXPRT=m
 CONFIG_SPI=y
 CONFIG_SPI_MASTER=y
 CONFIG_SPI_OMAP24XX=y
 CONFIG_SPI_TSC2301=y
 # CONFIG_SPI_TSC2301_AUDIO is not set
-CONFIG_STP=m
 # CONFIG_STRIP_ASM_SYMS is not set
-CONFIG_SUNRPC=m
 CONFIG_SUNRPC_BACKCHANNEL=y
-CONFIG_SUNRPC_GSS=m
 CONFIG_SUSPEND=y
 CONFIG_SUSPEND_FREEZER=y
 # CONFIG_SYN_COOKIES is not set
@@ -624,36 +530,22 @@ CONFIG_TOUCHSCREEN_TSC2005=y
 CONFIG_TOUCHSCREEN_TSC2301=y
 # CONFIG_TOUCHSCREEN_TSC_SERIO is not set
 # CONFIG_TSL2583 is not set
-CONFIG_TUN=m
 CONFIG_UACCESS_WITH_MEMCPY=y
 CONFIG_UID16=y
-CONFIG_USB=m
 # CONFIG_USB_ARCH_HAS_EHCI is not set
 # CONFIG_USB_ARCH_HAS_XHCI is not set
 # CONFIG_USB_AUDIO is not set
-CONFIG_USB_COMMON=m
-CONFIG_USB_ETH=m
 # CONFIG_USB_ETH_EEM is not set
 # CONFIG_USB_ETH_RNDIS is not set
-CONFIG_USB_GADGET=m
 CONFIG_USB_GADGET_DUALSPEED=y
-CONFIG_USB_GADGET_MUSB_HDRC=m
 CONFIG_USB_GADGET_VBUS_DRAW=100
-CONFIG_USB_GSPCA=m
-CONFIG_USB_G_NCM=m
-CONFIG_USB_HID=m
 # CONFIG_USB_MUSB_AM35X is not set
-CONFIG_USB_MUSB_HDRC=m
 # CONFIG_USB_MUSB_OMAP2PLUS is not set
-CONFIG_USB_MUSB_TUSB6010=m
-CONFIG_USB_NET_CDC_NCM=m
 # CONFIG_USB_OMAP is not set
 CONFIG_USB_OTG_UTILS=y
 # CONFIG_USB_PWC is not set
-CONFIG_USB_SERIAL=m
 CONFIG_USB_SUPPORT=y
 CONFIG_USB_TUSB_OMAP_DMA=y
-CONFIG_USB_USBNET=m
 # CONFIG_USER_NS is not set
 # CONFIG_V4L_PLATFORM_DRIVERS is not set
 CONFIG_V4L_USB_DRIVERS=y
@@ -662,13 +554,6 @@ CONFIG_VFAT_FS=y
 CONFIG_VFP=y
 CONFIG_VIDEO_CAPTURE_DRIVERS=y
 # CONFIG_VIDEO_CPIA2 is not set
-CONFIG_VIDEO_DEV=m
-CONFIG_VIDEO_IR_I2C=m
-CONFIG_VIDEO_MEDIA=m
-CONFIG_VIDEO_TCM825X=m
-CONFIG_VIDEO_V4L2=m
-CONFIG_VIDEO_V4L2_COMMON=m
-CONFIG_VLAN_8021Q=m
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 CONFIG_VT_CONSOLE_SLEEP=y
diff --git a/target/linux/ppc40x/config-3.10 b/target/linux/ppc40x/config-3.10
index 4ce7cae..1fe9afd 100644
--- a/target/linux/ppc40x/config-3.10
+++ b/target/linux/ppc40x/config-3.10
@@ -111,7 +111,6 @@ CONFIG_IRQ_FORCED_THREADING=y
 CONFIG_ISA_DMA_API=y
 CONFIG_KERNEL_START=0xc0000000
 CONFIG_KILAUEA=y
-CONFIG_LEDS_GPIO=m
 CONFIG_LOWMEM_SIZE=0x30000000
 CONFIG_MAGICBOX=y
 # CONFIG_MAKALU is not set
@@ -131,7 +130,6 @@ CONFIG_NEED_DMA_MAP_STATE=y
 # CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK is not set
 CONFIG_NEED_PER_CPU_KM=y
 CONFIG_NEED_SG_DMA_LENGTH=y
-CONFIG_NLS=m
 # CONFIG_NONSTATIC_KERNEL is not set
 CONFIG_NOT_COHERENT_CACHE=y
 CONFIG_NR_IRQS=512
@@ -216,13 +214,10 @@ CONFIG_SYSCTL_EXCEPTION_TRACE=y
 CONFIG_TASK_SIZE=0xc0000000
 CONFIG_TICK_CPU_ACCOUNTING=y
 CONFIG_UIDGID_CONVERTED=y
-CONFIG_USB=m
 CONFIG_USB_ARCH_HAS_XHCI=y
-CONFIG_USB_COMMON=m
 # CONFIG_USB_EHCI_HCD is not set
 CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
 CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
-CONFIG_USB_OHCI_HCD=m
 CONFIG_USB_OHCI_HCD_PCI=y
 # CONFIG_USB_OHCI_HCD_PLATFORM is not set
 CONFIG_USB_OHCI_HCD_PPC_OF=y
diff --git a/target/linux/pxa/config-3.3 b/target/linux/pxa/config-3.3
index 4085739..c93782f 100644
--- a/target/linux/pxa/config-3.3
+++ b/target/linux/pxa/config-3.3
@@ -24,9 +24,7 @@ CONFIG_ARM_NR_BANKS=8
 CONFIG_ARM_PATCH_PHYS_VIRT=y
 # CONFIG_ARM_THUMB is not set
 # CONFIG_ARPD is not set
-CONFIG_ATA=m
 CONFIG_AUTO_ZRELADDR=y
-CONFIG_BLK_DEV_IDECS=m
 # CONFIG_BLK_DEV_IDEDMA is not set
 # CONFIG_BLK_DEV_INITRD is not set
 # CONFIG_CACHE_L2X0 is not set
@@ -90,12 +88,8 @@ CONFIG_HAVE_PROC_CPU=y
 CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
 CONFIG_HAVE_SCHED_CLOCK=y
 CONFIG_HAVE_SPARSE_IRQ=y
-CONFIG_I2C=m
 CONFIG_I2C_BOARDINFO=y
-CONFIG_I2C_CHARDEV=m
-CONFIG_I2C_PXA=m
 CONFIG_I2C_PXA_SLAVE=y
-CONFIG_IDE=m
 CONFIG_IWMMXT=y
 CONFIG_KTIME_SCALAR=y
 # CONFIG_MACH_ARCOM_ZEUS is not set
@@ -154,14 +148,9 @@ CONFIG_NEED_PER_CPU_KM=y
 # CONFIG_PACKET is not set
 CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_PAGE_OFFSET=0xC0000000
-CONFIG_PATA_PCMCIA=m
 # CONFIG_PATA_PXA is not set
-CONFIG_PCCARD=m
 # CONFIG_PCI_SYSCALL is not set
-CONFIG_PCMCIA=m
 CONFIG_PCMCIA_LOAD_CIS=y
-CONFIG_PCMCIA_PXA2XX=m
-CONFIG_PCMCIA_SOC_COMMON=m
 CONFIG_PERF_USE_VMALLOC=y
 CONFIG_PHYLIB=y
 CONFIG_PLAT_PXA=y
@@ -169,19 +158,11 @@ CONFIG_PLAT_PXA=y
 CONFIG_PXA27x=y
 # CONFIG_PXA_EZX is not set
 # CONFIG_PXA_SHARPSL is not set
-CONFIG_SA1100_WATCHDOG=m
-CONFIG_SCSI=m
-CONFIG_SCSI_MOD=m
 # CONFIG_SCSI_MULTI_LUN is not set
 # CONFIG_SCSI_PROC_FS is not set
 # CONFIG_SERIAL_8250 is not set
 CONFIG_SERIAL_PXA=y
 CONFIG_SERIAL_PXA_CONSOLE=y
-CONFIG_SERIO=m
-CONFIG_SERIO_LIBPS2=m
-CONFIG_SERIO_SERPORT=m
-CONFIG_SMC911X=m
-CONFIG_SMC91X=m
 CONFIG_SMSC911X=y
 # CONFIG_SMSC911X_ARCH_HOOKS is not set
 CONFIG_SPARSE_IRQ=y
@@ -189,7 +170,6 @@ CONFIG_SPLIT_PTLOCK_CPUS=999999
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
 # CONFIG_TRIZEPS_PXA is not set
 CONFIG_UID16=y
-CONFIG_UNIX=m
 CONFIG_VECTORS_BASE=0xffff0000
 # CONFIG_VLAN_8021Q is not set
 CONFIG_XSCALE_PMU=y
diff --git a/target/linux/ramips/mt7620/config-3.14 b/target/linux/ramips/mt7620/config-3.14
index c79fa5e..09d844e 100644
--- a/target/linux/ramips/mt7620/config-3.14
+++ b/target/linux/ramips/mt7620/config-3.14
@@ -88,7 +88,6 @@ CONFIG_HAVE_OPROFILE=y
 CONFIG_HAVE_PERF_EVENTS=y
 CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
 CONFIG_HW_HAS_PCI=y
-CONFIG_HW_RANDOM=m
 CONFIG_HZ_PERIODIC=y
 CONFIG_IMAGE_CMDLINE_HACK=y
 CONFIG_INET_LRO=y
@@ -122,7 +121,6 @@ CONFIG_NET_RALINK_GSW_MT7620=y
 CONFIG_NET_RALINK_MDIO=y
 CONFIG_NET_RALINK_MT7620=y
 # CONFIG_NET_RALINK_RT305X is not set
-CONFIG_NLS=m
 CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
 CONFIG_OF=y
 CONFIG_OF_ADDRESS=y
@@ -173,8 +171,6 @@ CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
 CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
 CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
 CONFIG_TICK_CPU_ACCOUNTING=y
-CONFIG_USB=m
-CONFIG_USB_COMMON=m
 # CONFIG_USB_EHCI_HCD is not set
 CONFIG_USB_PHY=y
 CONFIG_USB_SUPPORT=y
diff --git a/target/linux/ramips/mt7621/config-3.14 b/target/linux/ramips/mt7621/config-3.14
index 9670361..5ca88da 100644
--- a/target/linux/ramips/mt7621/config-3.14
+++ b/target/linux/ramips/mt7621/config-3.14
@@ -86,7 +86,6 @@ CONFIG_HAVE_OPROFILE=y
 CONFIG_HAVE_PERF_EVENTS=y
 CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
 CONFIG_HW_HAS_PCI=y
-CONFIG_HW_RANDOM=m
 CONFIG_HZ_PERIODIC=y
 CONFIG_IMAGE_CMDLINE_HACK=y
 CONFIG_INITRAMFS_SOURCE=""
@@ -126,7 +125,6 @@ CONFIG_NET_RALINK=y
 CONFIG_NET_RALINK_GSW_MT7620=y
 CONFIG_NET_RALINK_MDIO=y
 CONFIG_NET_RALINK_MT7620=y
-CONFIG_NLS=m
 CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
 CONFIG_NR_CPUS=4
 CONFIG_OF=y
@@ -193,14 +191,11 @@ CONFIG_SYS_SUPPORTS_SCHED_SMT=y
 CONFIG_SYS_SUPPORTS_SMP=y
 CONFIG_TICK_CPU_ACCOUNTING=y
 CONFIG_TREE_RCU=y
-CONFIG_USB=m
-CONFIG_USB_COMMON=m
 # CONFIG_USB_EHCI_HCD is not set
 CONFIG_USB_MT7621_XHCI_PLATFORM=y
 CONFIG_USB_PHY=y
 CONFIG_USB_SUPPORT=y
 # CONFIG_USB_UHCI_HCD is not set
-CONFIG_USB_XHCI_HCD=m
 CONFIG_USB_XHCI_PLATFORM=y
 CONFIG_USE_OF=y
 CONFIG_WATCHDOG_CORE=y
diff --git a/target/linux/ramips/mt7628/config-3.14 b/target/linux/ramips/mt7628/config-3.14
index 4296586..e34819e 100644
--- a/target/linux/ramips/mt7628/config-3.14
+++ b/target/linux/ramips/mt7628/config-3.14
@@ -88,7 +88,6 @@ CONFIG_HAVE_OPROFILE=y
 CONFIG_HAVE_PERF_EVENTS=y
 CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
 CONFIG_HW_HAS_PCI=y
-CONFIG_HW_RANDOM=m
 CONFIG_HZ_PERIODIC=y
 CONFIG_ICPLUS_PHY=y
 CONFIG_IMAGE_CMDLINE_HACK=y
@@ -122,7 +121,6 @@ CONFIG_NET_RALINK=y
 CONFIG_NET_RALINK_ESW_RT3052=y
 # CONFIG_NET_RALINK_MT7620 is not set
 CONFIG_NET_RALINK_RT305X=y
-CONFIG_NLS=m
 CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
 CONFIG_OF=y
 CONFIG_OF_ADDRESS=y
@@ -173,8 +171,6 @@ CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
 CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
 CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
 CONFIG_TICK_CPU_ACCOUNTING=y
-CONFIG_USB=m
-CONFIG_USB_COMMON=m
 # CONFIG_USB_EHCI_HCD is not set
 CONFIG_USB_PHY=y
 CONFIG_USB_SUPPORT=y
diff --git a/target/linux/ramips/rt288x/config-3.14 b/target/linux/ramips/rt288x/config-3.14
index 9a95186..b440e7a 100644
--- a/target/linux/ramips/rt288x/config-3.14
+++ b/target/linux/ramips/rt288x/config-3.14
@@ -82,7 +82,6 @@ CONFIG_HAVE_OPROFILE=y
 CONFIG_HAVE_PERF_EVENTS=y
 CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
 CONFIG_HW_HAS_PCI=y
-CONFIG_HW_RANDOM=m
 CONFIG_HZ_PERIODIC=y
 CONFIG_IMAGE_CMDLINE_HACK=y
 CONFIG_INITRAMFS_SOURCE=""
diff --git a/target/linux/ramips/rt305x/config-3.14 b/target/linux/ramips/rt305x/config-3.14
index 0f78926..f681776 100644
--- a/target/linux/ramips/rt305x/config-3.14
+++ b/target/linux/ramips/rt305x/config-3.14
@@ -86,7 +86,6 @@ CONFIG_HAVE_NET_DSA=y
 CONFIG_HAVE_OPROFILE=y
 CONFIG_HAVE_PERF_EVENTS=y
 CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
-CONFIG_HW_RANDOM=m
 CONFIG_HZ_PERIODIC=y
 CONFIG_INITRAMFS_SOURCE=""
 CONFIG_IRQCHIP=y
@@ -114,7 +113,6 @@ CONFIG_NEED_PER_CPU_KM=y
 CONFIG_NET_RALINK=y
 CONFIG_NET_RALINK_ESW_RT3052=y
 CONFIG_NET_RX_BUSY_POLL=y
-CONFIG_NLS=m
 CONFIG_OF=y
 CONFIG_OF_ADDRESS=y
 CONFIG_OF_EARLY_FLATTREE=y
@@ -160,8 +158,6 @@ CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
 CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
 CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
 CONFIG_TICK_CPU_ACCOUNTING=y
-CONFIG_USB=m
-CONFIG_USB_COMMON=m
 # CONFIG_USB_EHCI_HCD is not set
 CONFIG_USB_PHY=y
 CONFIG_USB_SUPPORT=y
diff --git a/target/linux/ramips/rt3883/config-3.14 b/target/linux/ramips/rt3883/config-3.14
index 8093abc..4516fd7 100644
--- a/target/linux/ramips/rt3883/config-3.14
+++ b/target/linux/ramips/rt3883/config-3.14
@@ -85,7 +85,6 @@ CONFIG_HAVE_OPROFILE=y
 CONFIG_HAVE_PERF_EVENTS=y
 CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
 CONFIG_HW_HAS_PCI=y
-CONFIG_HW_RANDOM=m
 CONFIG_HZ_PERIODIC=y
 CONFIG_IMAGE_CMDLINE_HACK=y
 CONFIG_INITRAMFS_SOURCE=""
@@ -117,7 +116,6 @@ CONFIG_NET_RALINK=y
 CONFIG_NET_RALINK_MDIO=y
 CONFIG_NET_RALINK_MDIO_RT2880=y
 CONFIG_NET_RX_BUSY_POLL=y
-CONFIG_NLS=m
 CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
 CONFIG_OF=y
 CONFIG_OF_ADDRESS=y
@@ -171,8 +169,6 @@ CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
 CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
 CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
 CONFIG_TICK_CPU_ACCOUNTING=y
-CONFIG_USB=m
-CONFIG_USB_COMMON=m
 # CONFIG_USB_EHCI_HCD is not set
 CONFIG_USB_PHY=y
 CONFIG_USB_SUPPORT=y
diff --git a/target/linux/sibyte/config-3.3 b/target/linux/sibyte/config-3.3
index 7be8ee1..197165d 100644
--- a/target/linux/sibyte/config-3.3
+++ b/target/linux/sibyte/config-3.3
@@ -14,7 +14,6 @@ CONFIG_CEVT_SB1250=y
 CONFIG_CFE=y
 CONFIG_COMPAT=y
 CONFIG_COMPAT_NETLINK_MESSAGES=y
-CONFIG_CONNECTOR=m
 CONFIG_CPU_BIG_ENDIAN=y
 CONFIG_CPU_HAS_PREFETCH=y
 CONFIG_CPU_HAS_SYNC=y
@@ -60,7 +59,6 @@ CONFIG_HAVE_SYSCALL_WRAPPERS=y
 CONFIG_HWMON=y
 CONFIG_HWMON_DEBUG_CHIP=y
 CONFIG_HW_HAS_PCI=y
-CONFIG_HW_RANDOM=m
 CONFIG_HZ=250
 # CONFIG_HZ_100 is not set
 CONFIG_HZ_250=y
@@ -72,7 +70,6 @@ CONFIG_I2C_SIBYTE=y
 CONFIG_INITRAMFS_ROOT_GID=0
 CONFIG_INITRAMFS_ROOT_UID=0
 CONFIG_INITRAMFS_SOURCE="../../root"
-CONFIG_INPUT=m
 # CONFIG_IP_ROUTE_VERBOSE is not set
 CONFIG_IRQ_CPU=y
 CONFIG_IRQ_FORCED_THREADING=y
diff --git a/target/linux/x86/config-3.14 b/target/linux/x86/config-3.14
index f668e42..591fa17 100644
--- a/target/linux/x86/config-3.14
+++ b/target/linux/x86/config-3.14
@@ -211,7 +211,6 @@ CONFIG_INPUT_KEYBOARD=y
 CONFIG_INSTRUCTION_DECODER=y
 # CONFIG_INTEL_POWERCLAMP is not set
 # CONFIG_IOMMU_STRESS is not set
-CONFIG_IOSF_MBI=m
 CONFIG_IO_DELAY_0X80=y
 # CONFIG_IO_DELAY_0XED is not set
 # CONFIG_IO_DELAY_NONE is not set
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From daniel at makrotopia.org  Fri Jan  2 08:27:38 2015
From: daniel at makrotopia.org (Daniel Golle)
Date: Fri, 2 Jan 2015 14:27:38 +0100
Subject: [OpenWrt-Devel] [PATCH] kernel/hwmon: package pwm-fan kernel module
Message-ID: <20150102132723.GA2459@makrotopia.org>

pwm-fan was introduced in kernel 3.18

Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 package/kernel/linux/modules/hwmon.mk | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/package/kernel/linux/modules/hwmon.mk b/package/kernel/linux/modules/hwmon.mk
index 5b7936a..74af38b 100644
--- a/package/kernel/linux/modules/hwmon.mk
+++ b/package/kernel/linux/modules/hwmon.mk
@@ -290,6 +290,22 @@ endef
 $(eval $(call KernelPackage,hwmon-gpiofan))
 
 
+define KernelPackage/hwmon-pwmfan
+  TITLE:=Generic PWM FAN support
+  KCONFIG:=CONFIG_SENSORS_PWM_FAN
+  FILES:=$(LINUX_DIR)/drivers/hwmon/pwm-fan.ko
+  AUTOLOAD:=$(call AutoLoad,60,pwm-fan)
+  $(call AddDepends/hwmon,+kmod-pwm)
+  DEPENDS+=@!LINUX_3_3 @!LINUX_3_8 @!LINUX_3_10 @!LINUX_3_14
+endef
+
+define KernelPackage/hwmon-pwmfan/description
+  Kernel module for PWM controlled FANs
+endef
+
+$(eval $(call KernelPackage,hwmon-pwmfan))
+
+
 define KernelPackage/hwmon-k10temp
   TITLE:=AMD Family 10h+ temperature sensor
   KCONFIG:=CONFIG_SENSORS_K10TEMP
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From knaack.h at gmx.de  Fri Jan  2 15:22:33 2015
From: knaack.h at gmx.de (Hartmut Knaack)
Date: Fri, 02 Jan 2015 21:22:33 +0100
Subject: [OpenWrt-Devel] [PATCH] [packages] kernel: kmod-w1 - missing
 netlink support
In-Reply-To: <CADPUUGFiAfQvmH799LDWvHtgK0c5xqKbTMbNJYrReT5q4FcE9g@mail.gmail.com>
References: <CADPUUGFiAfQvmH799LDWvHtgK0c5xqKbTMbNJYrReT5q4FcE9g@mail.gmail.com>
Message-ID: <54A6FE09.2060706@gmx.de>

Hi Daniel,
your patch does not comply to the required format. Please read through
https://dev.openwrt.org/wiki/SubmittingPatches (especially section 10)
and http://kerneltrap.org/Linux/Email_Clients_and_Patches before submitting
again.
Thanks,

Hartmut

Daniel Wiegert schrieb am 02.01.2015 um 00:39:
> - updated kernel options to include netlink support. Without netlink support kmod-w1 wont work with owfs / owserver with --w1 flag ( kernel-managed bus masters ) kmod-w1 should really have netlink support!
> I've sent this patch one year ago - patchwork.openwrt.org/patch/4679/ <http://patchwork.openwrt.org/patch/4679/> still waiting for it.
> 
> diff --git a/package/kernel/linux/
> modules/w1.mk <http://w1.mk> b/package/kernel/linux/modules/w1.mk <http://w1.mk>
> index c2fc649..dba1fed 100644
> --- a/package/kernel/linux/modules/w1.mk <http://w1.mk>
> +++ b/package/kernel/linux/modules/w1.mk <http://w1.mk>
> @@ -1,5 +1,5 @@
> #
> -# Copyright (C) 2008-2010 OpenWrt.org
> +# Copyright (C) 2008-2013 OpenWrt.org
> #
> # This is free software, licensed under the GNU General Public License v2.
> # See /LICENSE for more information.
> @@ -12,8 +12,13 @@ W1_SLAVES_DIR:=$(LINUX_DIR)/drivers/w1/slaves
> define KernelPackage/w1
> SUBMENU:=$(W1_MENU)
> TITLE:=Dallas's 1-wire support
> - KCONFIG:=CONFIG_W1
> - FILES:=$(LINUX_DIR)/drivers/w1/wire.ko
> + KCONFIG:= \
> + CONFIG_W1 \
> + CONFIG_W1_CON=y \
> + CONFIG_CONNECTOR
> + FILES:= \
> + $(LINUX_DIR)/drivers/w1/wire.ko \
> + $(LINUX_DIR)/drivers/connector/cn.ko
> endef
> 
> define KernelPackage/w1/description
> 
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From stharward at gmail.com  Fri Jan  2 21:35:26 2015
From: stharward at gmail.com (Soren Harward)
Date: Fri, 2 Jan 2015 21:35:26 -0500
Subject: [OpenWrt-Devel] [PATCH][ar71xx] Mikrotik Routerboard RB2011
 switch fix
In-Reply-To: <20150102132436.GA27062@chris>
References: <20141213182237.GA28818@chris>
 <CANQojO49PbSS9R96ww04cvJ1nz2Nio4abLuNiCzvkxNdfndEJA@mail.gmail.com>
 <CANQojO4gPEqt0uOmgRm4z+RT-1hKUJ0UB2FihFa6UhmLX=sbYg@mail.gmail.com>
 <CANQojO7QexJKBCiPuWWbX+KSX0Lwr14paN2-91-RCQuaS+Ahew@mail.gmail.com>
 <20150102094007.GA698@chris> <20150102132436.GA27062@chris>
Message-ID: <CANQojO7Txj78FSSzgtbFvqcaO4MHUsq=ZR0OBbXmoG3VhzKLTQ@mail.gmail.com>

On Fri, Jan 2, 2015 at 8:24 AM, Chris Green <cl at isbd.net> wrote:
> While I'm here, how do I build a ....sysupgrade.bin image? I'm getting
> tired of doing bootp/tftp installs!

AFAIK, MikroTik's don't have a sysupgrade path, probably because of
strong variability in flash layout among the dozens of RouterBoard/MT
devices.  Yeah, it's not an ideal situation, but it's what we've got
unless sysupgrade becomes a whole lot smarter.

-- 
Soren Harward
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From cl at isbd.net  Sat Jan  3 05:17:51 2015
From: cl at isbd.net (Chris Green)
Date: Sat, 3 Jan 2015 10:17:51 +0000
Subject: [OpenWrt-Devel] [PATCH][ar71xx] Mikrotik Routerboard RB2011
	switch fix
In-Reply-To: <CANQojO7Txj78FSSzgtbFvqcaO4MHUsq=ZR0OBbXmoG3VhzKLTQ@mail.gmail.com>
References: <20141213182237.GA28818@chris>
 <CANQojO49PbSS9R96ww04cvJ1nz2Nio4abLuNiCzvkxNdfndEJA@mail.gmail.com>
 <CANQojO4gPEqt0uOmgRm4z+RT-1hKUJ0UB2FihFa6UhmLX=sbYg@mail.gmail.com>
 <CANQojO7QexJKBCiPuWWbX+KSX0Lwr14paN2-91-RCQuaS+Ahew@mail.gmail.com>
 <20150102094007.GA698@chris> <20150102132436.GA27062@chris>
 <CANQojO7Txj78FSSzgtbFvqcaO4MHUsq=ZR0OBbXmoG3VhzKLTQ@mail.gmail.com>
Message-ID: <20150103101751.GB24474@chris>

On Fri, Jan 02, 2015 at 09:35:26PM -0500, Soren Harward wrote:
> On Fri, Jan 2, 2015 at 8:24 AM, Chris Green <cl at isbd.net> wrote:
> > While I'm here, how do I build a ....sysupgrade.bin image? I'm getting
> > tired of doing bootp/tftp installs!
> 
> AFAIK, MikroTik's don't have a sysupgrade path, probably because of
> strong variability in flash layout among the dozens of RouterBoard/MT
> devices.  Yeah, it's not an ideal situation, but it's what we've got
> unless sysupgrade becomes a whole lot smarter.
> 
Ah, thanks.  I guess I'll just have to continue with the bootp/tftp
then, I'm getting better at it! :-)  At least the RB2011 has an easily
accessible serial console so I cn always talk to it even when I get
the network/LAN configuration thoroughly screwed up (which is quite
often).

-- 
Chris Green
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From mail.gery at gmail.com  Sat Jan  3 13:54:49 2015
From: mail.gery at gmail.com (Gergely Kiss)
Date: Sat, 03 Jan 2015 19:54:49 +0100
Subject: [OpenWrt-Devel] [PATCH] util-linux: fix packaging issues
Message-ID: <54A83AF9.1010000@gmail.com>


From mail.gery at gmail.com  Sat Jan  3 13:09:43 2015
From: mail.gery at gmail.com (Gergely Kiss)
Date: Sat, 3 Jan 2015 19:09:43 +0100
Subject: [PATCH] util-linux: fix packaging issues
Message-ID: <mailman.17.1593078757.4661.openwrt-devel@lists.openwrt.org>

Signed-off-by: Gergely Kiss <mail.gery at gmail.com>
Tested-by: Gergely Kiss <mail.gery at gmail.com>
---

Hi Guys,

contributing some slight fixes for util-linux:

* losetup: missing dependency added
* losetup: include the binary in the package instead of the libtool wrapper script
* shared libraries: include all the symlink variations in the packages

I'd advise to nominate a maintainer for the util-linux package,
PKG_MAINTAINER is not currently set in the Makefile.


Thanks,
Gergely

 package/utils/util-linux/Makefile | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/package/utils/util-linux/Makefile b/package/utils/util-linux/Makefile
index 70a865c..7ce3a77 100644
--- a/package/utils/util-linux/Makefile
+++ b/package/utils/util-linux/Makefile
@@ -248,6 +248,7 @@ endef
 define Package/losetup
 $(call Package/util-linux/Default)
   TITLE:=set up and control loop devices
+  DEPENDS:= +libsmartcols
 endef
 
 define Package/losetup/description
@@ -422,22 +423,22 @@ endef
 
 define Package/libblkid/install
         $(INSTALL_DIR) $(1)/usr/lib
-	$(CP) $(PKG_BUILD_DIR)/.libs/libblkid.so.* $(1)/usr/lib/
+	$(CP) $(PKG_BUILD_DIR)/.libs/libblkid.so* $(1)/usr/lib/
 endef
 
 define Package/libmount/install
         $(INSTALL_DIR) $(1)/usr/lib
-	$(CP) $(PKG_BUILD_DIR)/.libs/libmount.so.* $(1)/usr/lib/
+	$(CP) $(PKG_BUILD_DIR)/.libs/libmount.so* $(1)/usr/lib/
 endef
 
 define Package/libsmartcols/install
         $(INSTALL_DIR) $(1)/usr/lib
-	$(CP) $(PKG_BUILD_DIR)/.libs/libsmartcols.so.* $(1)/usr/lib/
+	$(CP) $(PKG_BUILD_DIR)/.libs/libsmartcols.so* $(1)/usr/lib/
 endef
 
 define Package/libuuid/install
         $(INSTALL_DIR) $(1)/usr/lib
-	$(CP) $(PKG_BUILD_DIR)/.libs/libuuid.so.* $(1)/usr/lib/
+	$(CP) $(PKG_BUILD_DIR)/.libs/libuuid.so* $(1)/usr/lib/
 endef
 
 define Package/agetty/install
@@ -502,7 +503,7 @@ endef
 
 define Package/losetup/install
 	$(INSTALL_DIR) $(1)/usr/sbin
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/losetup $(1)/usr/sbin/
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/losetup $(1)/usr/sbin/
 endef
 
 define Package/lsblk/install
-- 
1.8.3.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From nmav at gnutls.org  Sun Jan  4 05:44:37 2015
From: nmav at gnutls.org (Nikos Mavrogiannopoulos)
Date: Sun, 04 Jan 2015 11:44:37 +0100
Subject: [OpenWrt-Devel] openconnect does not remove default routes [was:
 Some OpenConnect observations]
In-Reply-To: <CAPoCmYLrrL05MhdCUKz+ULM00L7O=PgUxaS=KVJ-_LcSjSeaSA@mail.gmail.com>
References: <CAPoCmY+bKXuBTfiWCaxzQV_=vpE_h8VSVZrYP48n6x8wy+yAoQ@mail.gmail.com>
 <1420326978.2000.5.camel@gnutls.org>
 <CAPoCmYLrrL05MhdCUKz+ULM00L7O=PgUxaS=KVJ-_LcSjSeaSA@mail.gmail.com>
Message-ID: <1420368277.2135.3.camel@gnutls.org>

On Sun, 2015-01-04 at 09:18 +0100, Gottfried Haider wrote:
> Hello Nikos,
> 
> >> * Bringing the VPN interface down again doesn't restore regular
> >> internet access. It seems the routes (and DNS?) that came with the VPN
> >> stay also after running ifdown.
> > I don't seem to have this issue, please provide more information if it
> > persists with the latest packages.
> 
> Those are the routes on a pretty recent OpenWrt snapshot (w/
> openconnect 7.00-4). Please let me now if I can help with anything
> else, or update to an even more recent system.
> 
> Before connecting to the VPN, during, and after (the VPN IP remains as
> destination):
[...]

It seems that you use openconnect to set a default route, and that's why
I couldn't reproduce it. I don't think that openconnect handles default
routes differently, so it could be an issue in netifd. As I see default
routes are registered using proto_add_ipv4_route, and should have been
automatically removed when proto_kill_command is called in
openconnect.sh.

Most probably you'll have to check the log (readlog), and possibly add
some additional logging in:
/lib/netifd/netifd-proto.sh
/lib/netifd/proto/openconnect.sh

Sorry for not being able to help more. Maybe someone in the
openwrt-devel list will be able to help with that.

regards,
Nios
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From yszhou4tech at gmail.com  Sun Jan  4 06:22:18 2015
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Sun, 4 Jan 2015 19:22:18 +0800
Subject: [OpenWrt-Devel] [PATCH v2 2/2] dnsmasq: fix dependency problems
 of the dnsmasq-full variant.
In-Reply-To: <54A58C5E.80403@googlemail.com>
References: <1419941919-30009-1-git-send-email-yszhou4tech@gmail.com>
 <1419941919-30009-2-git-send-email-yszhou4tech@gmail.com>
 <54A3D0E5.5070308@googlemail.com>
 <CAECwjAhCKHD8nv03QcdBeqZequv19TRiLnKoxAzwTrtVoy3uPw@mail.gmail.com>
 <54A58C5E.80403@googlemail.com>
Message-ID: <CAECwjAhHY5BdFhm8gqJDEGqPL3ScB9pNT3srAjrHwBxYiQSimQ@mail.gmail.com>

On 2 January 2015 at 02:05, Frank Sch?fer <fschaefer.oss at googlemail.com> wrote:
>
> Hi Yousong,
>
> Am 31.12.2014 um 11:48 schrieb Yousong Zhou:
>>
>> ...
>>> tmp/.config-package.in:93:error: recursive dependency detected!
>>> tmp/.config-package.in:93:      symbol PACKAGE_dnsmasq-full depends on
>>> PACKAGE_dnsmasq_full_ipset
>>> tmp/.config-package.in:124:     symbol PACKAGE_dnsmasq_full_ipset
>>> depends on PACKAGE_dnsmasq-full
>>>
>>> If you make a menuconfig, the IPSET build option also doesn't show up
>>> unless you have selected DNSSEC...
>> There are 2 patches in this series, and the first one is needed to
>> avoid the recursive dependency problem [1] from showing up (it's a
>> necessary workaround for now).
>>
>> [1] https://lists.openwrt.org/pipermail/openwrt-devel/2014-December/030211.html
>
> Ah... ok. Didn't notice that it touches ipset.
> Works fine, sorry for the noise.
>
>
>>>> diff --git a/package/network/services/dnsmasq/patches/200-let-makefile-be-aware-of-config-changes.patch b/package/network/services/dnsmasq/patches/200-let-makefile-be-aware-of-config-changes.patch
>>>> new file mode 100644
>>>> index 0000000..663f0e9
>>>> --- /dev/null
>>>> +++ b/package/network/services/dnsmasq/patches/200-let-makefile-be-aware-of-config-changes.patch
>>>> @@ -0,0 +1,42 @@
>>>> +Index: dnsmasq-2.72/Makefile
>>>> +===================================================================
>>>> +--- dnsmasq-2.72.orig/Makefile       2014-12-30 19:46:10.484921940 +0800
>>>> ++++ dnsmasq-2.72/Makefile    2014-12-30 19:56:39.712926794 +0800
>>>> +@@ -74,6 +74,10 @@
>> <snip>
>>
>>> Urgh... is it really necessary to patch dnsmasqs native Makefile ?
>>> Can you give us a practical and reproducable example that shows the
>>> problem you are trying to solve here ?
>> Patching Makefile of dnsmasq itself is necessary for the build system
>> of OpenWrt and Makefile of dnsmasq to pick up a possibly updated
>> config of dnsmasq-full variant.  Otherwise rebuild of dnsmasq-ful may
>> not happen as expected when users enable or disable a feature with
>> e.g. make menuconfig.
>
> Ok, I can reproduce it now...
> Is this patch suitable for upstream inclusion ?
>

An fixed up version of this patch is already in upstream dnsmasq now.
But another one has to be applied to fix possible race condition from
happening when doing parallel build.  I am truly sorry but it seems
like there are just too many cases to be tested out in each iteration.

[1] http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2015q1/009068.html

Regards.

               yousong
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From valent.turkovic at gmail.com  Sun Jan  4 12:12:08 2015
From: valent.turkovic at gmail.com (valent.turkovic at gmail.com)
Date: Sun, 4 Jan 2015 18:12:08 +0100
Subject: [OpenWrt-Devel] imagebuilder "no valid architecture" and
 "incompatible with the architectures" errors
In-Reply-To: <CAD=nrE-KnFPyOO7C1byFjYRmog9U=+O9_Ean7LdW8jLvJyQRbg@mail.gmail.com>
References: <CAD=nrE-KnFPyOO7C1byFjYRmog9U=+O9_Ean7LdW8jLvJyQRbg@mail.gmail.com>
Message-ID: <CAD=nrE_giwz9ukEZzKQ8vHNUEePtBTQ6V8HbYCA1gGBCZOJ_8g@mail.gmail.com>

Nobody is seeing these kind of messages?

On Wed, Dec 24, 2014 at 10:32 AM, valent.turkovic at gmail.com <
valent.turkovic at gmail.com> wrote:

> Hi,
> after downloading and unpacking ImageBuilder 14.07 on Lenovo T440s running
> Fedora 21 I get "no valid architecture" errors.
>
> But if I download same ImageBuilder file on my vps build process works
> without errors, why?
>
> Here is full log: http://pastebin.com/raw.php?i=rQUHNkfe
>
> and here is a snippet:
>
> # make image PROFILE=WNDR3600
>
> Package luci version 0.12+svn-r10530-1 has no valid architecture, ignoring.
> Unknown package 'libc'.
> Collected errors:
>  * pkg_hash_fetch_best_installation_candidate: Packages for libc found,
> but incompatible with the architectures configured
>  * opkg_install_cmd: Cannot install package libc.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150104/fa213deb/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From valent.turkovic at gmail.com  Sun Jan  4 18:44:10 2015
From: valent.turkovic at gmail.com (valent.turkovic at gmail.com)
Date: Mon, 5 Jan 2015 00:44:10 +0100
Subject: [OpenWrt-Devel] imagebuilder "no valid architecture" and
 "incompatible with the architectures" errors
In-Reply-To: <CAD=nrE_giwz9ukEZzKQ8vHNUEePtBTQ6V8HbYCA1gGBCZOJ_8g@mail.gmail.com>
References: <CAD=nrE-KnFPyOO7C1byFjYRmog9U=+O9_Ean7LdW8jLvJyQRbg@mail.gmail.com>
 <CAD=nrE_giwz9ukEZzKQ8vHNUEePtBTQ6V8HbYCA1gGBCZOJ_8g@mail.gmail.com>
Message-ID: <CAD=nrE_fLJZtdZ29TNSjerBiYWYp3PZfXJGG_+R7Cf33R2QrhQ@mail.gmail.com>

I have resorted to building docker image with openwrt imagebuilder and all
necessary tools in order to make this issue go away and to make building
images portable and reproducable.

On Sun, Jan 4, 2015 at 6:12 PM, valent.turkovic at gmail.com <
valent.turkovic at gmail.com> wrote:

> Nobody is seeing these kind of messages?
>
> On Wed, Dec 24, 2014 at 10:32 AM, valent.turkovic at gmail.com <
> valent.turkovic at gmail.com> wrote:
>
>> Hi,
>> after downloading and unpacking ImageBuilder 14.07 on Lenovo T440s
>> running Fedora 21 I get "no valid architecture" errors.
>>
>> But if I download same ImageBuilder file on my vps build process works
>> without errors, why?
>>
>> Here is full log: http://pastebin.com/raw.php?i=rQUHNkfe
>>
>> and here is a snippet:
>>
>> # make image PROFILE=WNDR3600
>>
>> Package luci version 0.12+svn-r10530-1 has no valid architecture,
>> ignoring.
>> Unknown package 'libc'.
>> Collected errors:
>>  * pkg_hash_fetch_best_installation_candidate: Packages for libc found,
>> but incompatible with the architectures configured
>>  * opkg_install_cmd: Cannot install package libc.
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150105/4c842c39/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From nmav at gnutls.org  Mon Jan  5 03:31:19 2015
From: nmav at gnutls.org (Nikos Mavrogiannopoulos)
Date: Mon, 5 Jan 2015 09:31:19 +0100
Subject: [OpenWrt-Devel] openconnect does not remove default routes
	[was: Some OpenConnect observations]
In-Reply-To: <CAPoCmY+_Ss2rGXsWhM5H-wR+2yu5m4JfRzGE3Ez7=+ynvq6frA@mail.gmail.com>
References: <CAPoCmY+bKXuBTfiWCaxzQV_=vpE_h8VSVZrYP48n6x8wy+yAoQ@mail.gmail.com>
 <1420326978.2000.5.camel@gnutls.org>
 <CAPoCmYLrrL05MhdCUKz+ULM00L7O=PgUxaS=KVJ-_LcSjSeaSA@mail.gmail.com>
 <1420368277.2135.3.camel@gnutls.org>
 <CAPoCmY+_Ss2rGXsWhM5H-wR+2yu5m4JfRzGE3Ez7=+ynvq6frA@mail.gmail.com>
Message-ID: <CAJU7zaL1UFcg61fTKrt1dGojqvnPsNfkw5eS0ZEqpzteT31Pag@mail.gmail.com>

On Mon, Jan 5, 2015 at 8:00 AM, Gottfried Haider
<gottfried.haider at gmail.com> wrote:
>> It seems that you use openconnect to set a default route, and that's why
>> I couldn't reproduce it. I don't think that openconnect handles default
>> routes differently, so it could be an issue in netifd. As I see default
>> routes are registered using proto_add_ipv4_route, and should have been
>> automatically removed when proto_kill_command is called in
>> openconnect.sh.
>> Most probably you'll have to check the log (readlog), and possibly add
>> some additional logging in:
>> /lib/netifd/netifd-proto.sh
>> /lib/netifd/proto/openconnect.sh
>>
>> Sorry for not being able to help more. Maybe someone in the
>> openwrt-devel list will be able to help with that.
> Thanks for those pointers. I could follow the execution all the way to
> vpnc-script, so openconnect gets called with SIGINT and cleanly closes
> the connection. In the disconnect case in vpnc-script, I only see
> calls to proto_init_update and proto_send_update, whereas in connect
> the script did the heavy lifting to setup those routes... where do
> these calls go, do you happen to know? (primarily trying to figure out
> whether its openconnect or some part of netfid that I should look
> into)

My understanding is that they are rpc, go to netifd daemon, which
calls openconnect.sh shortly after that.

regards,
Nikos
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From cyrus at openwrt.org  Mon Jan  5 05:05:20 2015
From: cyrus at openwrt.org (Steven Barth)
Date: Mon, 05 Jan 2015 11:05:20 +0100
Subject: [OpenWrt-Devel] [PATCH] iproute2: bump version to v3.18.0,
 add package for bridge program
In-Reply-To: <87bnmkxxko.fsf@husum.klickitat.com>
References: <87bnmkxxko.fsf@husum.klickitat.com>
Message-ID: <54AA61E0.7050606@openwrt.org>

Thanks, unfortunately this doesn't compile for me:

ccache_cc -Wall -Wstrict-prototypes  -Wmissing-prototypes 
-Wmissing-declarations -Wold-style-definition -Wformat=2 -O2 -Os -pipe 
-mno-branch-likely -mips32r2 -mtune=34kc -fno-caller-saves 
-fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -mips16 
-minterlink-mips16 -DHAVE_SETNS -ffunction-sections -fdata-sections 
-I../include 
-I/home/steven/workspace/openwrt/staging_dir/target-mips_34kc_musl-1.1.5/usr/include/libnl-tiny 
-I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib\" -DNO_SHARED_LIBS 
-DCONFDIR=\"/etc/iproute2\" -D_GNU_SOURCE -DIPROUTE2_TINY   -c -o 
iplink_bridge_slave.o iplink_bridge_slave.c
In file included from ../include/linux/if_bridge.h:18:0,
                  from iplink_bridge_slave.c:16:
../include/linux/in6.h:40:0: warning: "s6_addr" redefined
  #define s6_addr   in6_u.u6_addr8
  ^
In file included from iplink_bridge_slave.c:14:0:
/home/steven/workspace/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.9-linaro_musl-1.1.5/include/netinet/in.h:32:0: 
note: this is the location of the previous definition
  #define s6_addr __in6_union.__s6_addr
  ^
In file included from ../include/linux/if_bridge.h:18:0,
                  from iplink_bridge_slave.c:16:
../include/linux/in6.h:42:0: warning: "s6_addr16" redefined
  #define s6_addr16  in6_u.u6_addr16
  ^
In file included from iplink_bridge_slave.c:14:0:
/home/steven/workspace/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.9-linaro_musl-1.1.5/include/netinet/in.h:33:0: 
note: this is the location of the previous definition
  #define s6_addr16 __in6_union.__s6_addr16
  ^
In file included from ../include/linux/if_bridge.h:18:0,
                  from iplink_bridge_slave.c:16:
../include/linux/in6.h:43:0: warning: "s6_addr32" redefined
  #define s6_addr32  in6_u.u6_addr32
  ^
In file included from iplink_bridge_slave.c:14:0:
/home/steven/workspace/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.9-linaro_musl-1.1.5/include/netinet/in.h:34:0: 
note: this is the location of the previous definition
  #define s6_addr32 __in6_union.__s6_addr32
  ^
In file included from ../include/linux/if_bridge.h:18:0,
                  from iplink_bridge_slave.c:16:
../include/linux/in6.h:169:0: warning: "IPV6_ADD_MEMBERSHIP" redefined
  #define IPV6_ADD_MEMBERSHIP 20
  ^
In file included from iplink_bridge_slave.c:14:0:
/home/steven/workspace/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.9-linaro_musl-1.1.5/include/netinet/in.h:369:0: 
note: this is the location of the previous definition
  #define IPV6_ADD_MEMBERSHIP     IPV6_JOIN_GROUP
  ^
In file included from ../include/linux/if_bridge.h:18:0,
                  from iplink_bridge_slave.c:16:
../include/linux/in6.h:170:0: warning: "IPV6_DROP_MEMBERSHIP" redefined
  #define IPV6_DROP_MEMBERSHIP 21
  ^
In file included from iplink_bridge_slave.c:14:0:
/home/steven/workspace/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.9-linaro_musl-1.1.5/include/netinet/in.h:370:0: 
note: this is the location of the previous definition
  #define IPV6_DROP_MEMBERSHIP    IPV6_LEAVE_GROUP
  ^
In file included from ../include/linux/if_bridge.h:18:0,
                  from iplink_bridge_slave.c:16:
../include/linux/in6.h:32:8: error: redefinition of 'struct in6_addr'
  struct in6_addr {
         ^
In file included from iplink_bridge_slave.c:14:0:
/home/steven/workspace/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.9-linaro_musl-1.1.5/include/netinet/in.h:24:8: 
note: originally defined here
  struct in6_addr
         ^
In file included from ../include/linux/if_bridge.h:18:0,
                  from iplink_bridge_slave.c:16:
../include/linux/in6.h:49:8: error: redefinition of 'struct sockaddr_in6'
  struct sockaddr_in6 {
         ^
In file included from iplink_bridge_slave.c:14:0:
/home/steven/workspace/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.9-linaro_musl-1.1.5/include/netinet/in.h:36:8: 
note: originally defined here
  struct sockaddr_in6
         ^
In file included from ../include/linux/if_bridge.h:18:0,
                  from iplink_bridge_slave.c:16:
../include/linux/in6.h:59:8: error: redefinition of 'struct ipv6_mreq'
  struct ipv6_mreq {
         ^
In file included from iplink_bridge_slave.c:14:0:
/home/steven/workspace/openwrt/staging_dir/toolchain-mips_34kc_gcc-4.9-linaro_musl-1.1.5/include/netinet/in.h:45:8: 
note: originally defined here
  struct ipv6_mreq
         ^
<builtin>: recipe for target 'iplink_bridge_slave.o' failed
make[4]: *** [iplink_bridge_slave.o] Error 1
make[4]: Leaving directory 
'/home/steven/workspace/openwrt/build_dir/target-mips_34kc_musl-1.1.5/iproute2-tiny/iproute2-3.18.0/ip'
Makefile:45: recipe for target 'all' failed
make[3]: *** [all] Error 2
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From cyrus at openwrt.org  Mon Jan  5 05:14:12 2015
From: cyrus at openwrt.org (Steven Barth)
Date: Mon, 05 Jan 2015 11:14:12 +0100
Subject: [OpenWrt-Devel] [PATCH] util-linux: fix packaging issues
In-Reply-To: <54A83AF9.1010000@gmail.com>
References: <54A83AF9.1010000@gmail.com>
Message-ID: <54AA63F4.8060609@openwrt.org>

Thanks, applied.
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From russell at personaltelco.net  Mon Jan  5 05:28:14 2015
From: russell at personaltelco.net (Russell Senior)
Date: Mon, 05 Jan 2015 02:28:14 -0800
Subject: [OpenWrt-Devel] [PATCH] iproute2: bump version to v3.18.0,
	add package for bridge program
In-Reply-To: <54AA61E0.7050606@openwrt.org> (Steven Barth's message of "Mon,
 05 Jan 2015 11:05:20 +0100")
References: <87bnmkxxko.fsf@husum.klickitat.com> <54AA61E0.7050606@openwrt.org>
Message-ID: <87y4phv7wh.fsf@husum.klickitat.com>

>>>>> "Steven" == Steven Barth <cyrus at openwrt.org> writes:

Steven> Thanks, unfortunately this doesn't compile for me: 

Can you email me your .config?

I'll confess I only test-built it with uClibc.


-- 
Russell Senior, President
russell at personaltelco.net
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From cyrus at openwrt.org  Mon Jan  5 05:40:56 2015
From: cyrus at openwrt.org (Steven Barth)
Date: Mon, 05 Jan 2015 11:40:56 +0100
Subject: [OpenWrt-Devel] [PATCH] iproute2: bump version to v3.18.0,
 add package for bridge program
In-Reply-To: <87y4phv7wh.fsf@husum.klickitat.com>
References: <87bnmkxxko.fsf@husum.klickitat.com>	<54AA61E0.7050606@openwrt.org>
 <87y4phv7wh.fsf@husum.klickitat.com>
Message-ID: <54AA6A38.80603@openwrt.org>


On 05.01.2015 11:28, Russell Senior wrote:
>>>>>> "Steven" == Steven Barth <cyrus at openwrt.org> writes:
> Steven> Thanks, unfortunately this doesn't compile for me:
>
> Can you email me your .config?
>
> I'll confess I only test-built it with uClibc.
Thanks. That is usually sufficient, though we are thinking of evaluating 
musl as a new default libc at some point so we want to keep at least the 
core packages compiling with it at this point.

I'm building with musl as libc and GCC 4.9 linaro as compiler (latter 
should be standard already) all the rest is defaults. I can send you the 
.config if you really want to but its cluttered with all sorts of 
unrelated stuff.

This issue mainly looks like wrong order of inclusions or duplicate 
inclusion of certain headers.
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From gottfried.haider at gmail.com  Mon Jan  5 06:29:41 2015
From: gottfried.haider at gmail.com (Gottfried Haider)
Date: Mon, 5 Jan 2015 12:29:41 +0100
Subject: [OpenWrt-Devel] Default OPKG Configuration for ramips.mt7620
Message-ID: <CAPoCmYKJLLf+VZzUNP9gvva0zAnUXJiHbBago6uX1=+-6XWCCA@mail.gmail.com>

Hello all,

After installing a recent snapshots for the WT3020 (ramips.mt7620) the
system gets configured to use e.g.
http://downloads.openwrt.org/snapshots/trunk/ramips/packages/base
rather than http://downloads.openwrt.org/snapshots/trunk/ramips.mt7620/packages/base
(notice the .mt7620).

I ran into this when a kmod wouldn't install.. changing the URL made
it work. Just posting in case this is simply an oversight in the build
configuration.

Best
Gottfried
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From bittorf at bluebottle.com  Mon Jan  5 06:55:42 2015
From: bittorf at bluebottle.com (Bastian Bittorf)
Date: Mon, 5 Jan 2015 12:55:42 +0100
Subject: [OpenWrt-Devel] Default OPKG Configuration for ramips.mt7620
In-Reply-To: <CAPoCmYKJLLf+VZzUNP9gvva0zAnUXJiHbBago6uX1=+-6XWCCA@mail.gmail.com>
References: <CAPoCmYKJLLf+VZzUNP9gvva0zAnUXJiHbBago6uX1=+-6XWCCA@mail.gmail.com>
Message-ID: <20150105115542.GJ2359@medion.lan>

* Gottfried Haider <gottfried.haider at gmail.com> [05.01.2015 12:54]:
> After installing a recent snapshots for the WT3020 (ramips.mt7620) the
> system gets configured to use e.g.
> http://downloads.openwrt.org/snapshots/trunk/ramips/packages/base
> rather than http://downloads.openwrt.org/snapshots/trunk/ramips.mt7620/packages/base
> (notice the .mt7620).

i also ran into this issue in summer 2014:
https://lists.openwrt.org/pipermail/openwrt-devel/2014-August/027657.html
(no answer yet)

bye, bastian
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From nbd at openwrt.org  Mon Jan  5 08:56:09 2015
From: nbd at openwrt.org (Felix Fietkau)
Date: Mon, 05 Jan 2015 14:56:09 +0100
Subject: [OpenWrt-Devel] [PATCH] [packages] dnsmasq: add option
	--quiet-dhcp
In-Reply-To: <20141225014908.7ebf4d02@erker.lan>
References: <20141225014908.7ebf4d02@erker.lan>
Message-ID: <54AA97F9.7060405@openwrt.org>

On 2014-12-25 01:49, Lars Kruse wrote:
> Hi,
> 
> dnsmasq supports an option "--quiet-dhcp" in order to remove DHCP log messages
> from the system log. We would like to use this option in our wireless community
> in order to reduce the amount of private data (MAC addresses) exposed in the
> logs.
> 
> cheers,
> Lars
> 
> 
> Description:
> 
> add --quiet-dhcp option for dnsmasq (usable via "quiet_dhcp" in UCI)
> 
> This reduces the amount of private information (MAC addresses) being logged.
> 
> Signed-off-by: Lars Kruse <devel at sumpfralle.de>
The description should be first in the email body without "Description:"
You can add extra comments after the --- lines (this ensures that git-am
ignores them).

> ---
> --- a/openwrt/package/network/services/dnsmasq/files/dnsmasq.init
> +++ b/openwrt/package/network/services/dnsmasq/files/dnsmasq.init
What kind of tree was this patch generated from? For the usual git trees
it should be a/package/... instead of a/openwrt/package/...

> @@ -123,6 +123,7 @@ dnsmasq() {
>         append_bool "$cfg" nonwildcard "--bind-interfaces"
>         append_bool "$cfg" fqdn "--dhcp-fqdn"
>         append_bool "$cfg" proxydnssec "--proxy-dnssec"
> +       append_bool "$cfg" quiet_dhcp "--quiet-dhcp"
The patch is whitespace mangled. Please check your email client settings.

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


From mats.dev.list at gmail.com  Mon Jan  5 08:57:26 2015
From: mats.dev.list at gmail.com (Mats Karrman)
Date: Mon, 5 Jan 2015 14:57:26 +0100
Subject: [OpenWrt-Devel] Plans for procd
Message-ID: <CABKbxZe2p9nLrNX8jLdpnh9en_RNXomG2pfT5pajC3+Nv_h3-w@mail.gmail.com>

Hi,

Are there any written down target definition for the procd, i.e. what
functionality
it is supposed to contain?

Specifically; are there any plans to include cgroups management?

Best regards & Happy new year!
Mats
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150105/69422e14/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From jow at openwrt.org  Mon Jan  5 09:09:21 2015
From: jow at openwrt.org (Jo-Philipp Wich)
Date: Mon, 05 Jan 2015 15:09:21 +0100
Subject: [OpenWrt-Devel] [PATCH] [packages] dnsmasq: add option
	--quiet-dhcp
In-Reply-To: <54AA97F9.7060405@openwrt.org>
References: <20141225014908.7ebf4d02@erker.lan> <54AA97F9.7060405@openwrt.org>
Message-ID: <54AA9B11.6030806@openwrt.org>

Hi,

>> --- a/openwrt/package/network/services/dnsmasq/files/dnsmasq.init
>> +++ b/openwrt/package/network/services/dnsmasq/files/dnsmasq.init
> What kind of tree was this patch generated from? For the usual git trees
> it should be a/package/... instead of a/openwrt/package/...
> 
>> @@ -123,6 +123,7 @@ dnsmasq() {
>>         append_bool "$cfg" nonwildcard "--bind-interfaces"
>>         append_bool "$cfg" fqdn "--dhcp-fqdn"
>>         append_bool "$cfg" proxydnssec "--proxy-dnssec"
>> +       append_bool "$cfg" quiet_dhcp "--quiet-dhcp"

Since the other options omit the word separation it is maybe better to
call this one "quietdhcp" for the sake of consistency.

I'd also argue for making this the default...

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


From jonathan at navigue.com  Mon Jan  5 09:33:06 2015
From: jonathan at navigue.com (Jonathan Thibault)
Date: Mon, 05 Jan 2015 09:33:06 -0500
Subject: [OpenWrt-Devel] [PATCH] iproute2: bump version to v3.18.0,
 add package for bridge program
In-Reply-To: <87bnmkxxko.fsf@husum.klickitat.com>
References: <87bnmkxxko.fsf@husum.klickitat.com>
Message-ID: <54AAA0A2.7010706@navigue.com>

It'd probably be nice to add vlan filtering support to the bridge utility.

I submitted a patch to do so earlier

https://lists.openwrt.org/pipermail/openwrt-devel/2014-December/030024.html

On 30/12/14 11:17 PM, Russell Senior wrote:
> Signed-off-by: Russell Senior <russell at personaltelco.net>
>
> ---
>  package/network/utils/iproute2/Makefile                  | 15 +++++++++++++--
>  package/network/utils/iproute2/patches/300-ip_tiny.patch | 15 ++++++++-------
>  2 files changed, 21 insertions(+), 9 deletions(-)
>
> diff --git a/package/network/utils/iproute2/Makefile b/package/network/utils/iproute2/Makefile
> index 9aea05e..13b240e 100644
> --- a/package/network/utils/iproute2/Makefile
> +++ b/package/network/utils/iproute2/Makefile
> @@ -8,12 +8,12 @@
>  include $(TOPDIR)/rules.mk
>  
>  PKG_NAME:=iproute2
> -PKG_VERSION:=3.17.0
> +PKG_VERSION:=3.18.0
>  PKG_RELEASE:=1
>  
>  PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
>  PKG_SOURCE_URL:=http://kernel.org/pub/linux/utils/net/iproute2/
> -PKG_MD5SUM:=b741a02c6dda5818d18011d572874493
> +PKG_MD5SUM:=6f6ad51a00007880460e103367b16057
>  PKG_BUILD_PARALLEL:=1
>  PKG_LICENSE:=GPL-2.0
>  
> @@ -63,6 +63,11 @@ $(call Package/iproute2/Default)
>    TITLE:=Socket statistics utility
>  endef
>  
> +define Package/ip-bridge
> +$(call Package/iproute2/Default)
> +  TITLE:=Bridge utility from iproute2
> +endef
> +
>  ifeq ($(BUILD_VARIANT),tiny)
>    IP_CONFIG_TINY:=y
>  endif
> @@ -135,8 +140,14 @@ define Package/ss/install
>  	$(INSTALL_BIN) $(PKG_BUILD_DIR)/misc/ss $(1)/usr/sbin/
>  endef
>  
> +define Package/ip-bridge/install
> +	$(INSTALL_DIR) $(1)/usr/sbin
> +	$(INSTALL_BIN) $(PKG_BUILD_DIR)/bridge/bridge $(1)/usr/sbin/
> +endef
> +
>  $(eval $(call BuildPackage,ip))
>  $(eval $(call BuildPackage,ip-full))
>  $(eval $(call BuildPackage,tc))
>  $(eval $(call BuildPackage,genl))
>  $(eval $(call BuildPackage,ss))
> +$(eval $(call BuildPackage,ip-bridge))
> diff --git a/package/network/utils/iproute2/patches/300-ip_tiny.patch b/package/network/utils/iproute2/patches/300-ip_tiny.patch
> index 5b0d56c..3620120 100644
> --- a/package/network/utils/iproute2/patches/300-ip_tiny.patch
> +++ b/package/network/utils/iproute2/patches/300-ip_tiny.patch
> @@ -1,6 +1,6 @@
>  --- a/ip/Makefile
>  +++ b/ip/Makefile
> -@@ -15,6 +15,13 @@ ifeq ($(IP_CONFIG_SETNS),y)
> +@@ -16,6 +16,13 @@ ifeq ($(IP_CONFIG_SETNS),y)
>   	CFLAGS += -DHAVE_SETNS
>   endif
>   
> @@ -14,7 +14,7 @@
>   ALLOBJ=$(IPOBJ) $(RTMONOBJ)
>   SCRIPTS=ifcfg rtpr routel routef
>   TARGETS=ip rtmon
> -@@ -42,7 +49,7 @@ else
> +@@ -43,7 +50,7 @@ else
>   
>   ip: static-syms.o
>   static-syms.o: static-syms.h
> @@ -25,7 +25,7 @@
>   		sed -n '/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:extern char \1[] __attribute__((weak)); if (!strcmp(sym, "\1")) return \1;:;p}' $$files ; \
>  --- a/ip/ip.c
>  +++ b/ip/ip.c
> -@@ -66,29 +66,41 @@ static const struct cmd {
> +@@ -69,30 +69,42 @@ static const struct cmd {
>   	int (*func)(int argc, char **argv);
>   } cmds[] = {
>   	{ "address",	do_ipaddr },
> @@ -44,6 +44,7 @@
>   	{ "link",	do_iplink },
>  +#ifndef IPROUTE2_TINY
>   	{ "l2tp",	do_ipl2tp },
> +	{ "fou",	do_ipfou },
>  +#endif
>   	{ "tunnel",	do_iptunnel },
>   	{ "tunl",	do_iptunnel },
> @@ -69,7 +70,7 @@
>   };
>  --- a/lib/utils.c
>  +++ b/lib/utils.c
> -@@ -627,6 +627,7 @@ const char *rt_addr_n2a(int af, int len,
> +@@ -629,6 +629,7 @@ const char *rt_addr_n2a(int af, const vo
>   	case AF_INET:
>   	case AF_INET6:
>   		return inet_ntop(af, addr, buf, buflen);
> @@ -77,7 +78,7 @@
>   	case AF_IPX:
>   		return ipx_ntop(af, addr, buf, buflen);
>   	case AF_DECnet:
> -@@ -635,6 +636,7 @@ const char *rt_addr_n2a(int af, int len,
> +@@ -637,6 +638,7 @@ const char *rt_addr_n2a(int af, const vo
>   		memcpy(dna.a_addr, addr, 2);
>   		return dnet_ntop(af, &dna, buf, buflen);
>   	}
> @@ -85,7 +86,7 @@
>   	default:
>   		return "???";
>   	}
> -@@ -710,6 +712,7 @@ const char *format_host(int af, int len,
> +@@ -712,6 +714,7 @@ const char *format_host(int af, int len,
>   			case AF_INET6:
>   				len = 16;
>   				break;
> @@ -93,7 +94,7 @@
>   			case AF_IPX:
>   				len = 10;
>   				break;
> -@@ -720,6 +723,7 @@ const char *format_host(int af, int len,
> +@@ -722,6 +725,7 @@ const char *format_host(int af, int len,
>   				len = 2;
>   				break;
>   #endif
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From uweber.linux at gmail.com  Mon Jan  5 09:58:34 2015
From: uweber.linux at gmail.com (Ulrich Weber)
Date: Mon, 5 Jan 2015 15:58:34 +0100
Subject: [OpenWrt-Devel] [PATCH] firewall3: fix left shift on 64 bit systems
 in fw3_bitlen2netmask
Message-ID: <20150105145834.GA9004@gir>

otherwise 0.0.0.0/0 is set as 0.0.0.0/255.255.255.255 on x86_64

Signed-off-by: Ulrich Weber <uw at ocedo.com>
---
 utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utils.c b/utils.c
index 71a0f13..b2fbe02 100644
--- a/utils.c
+++ b/utils.c
@@ -803,7 +803,7 @@ fw3_bitlen2netmask(int family, int bits, void *mask)
 			return false;
 
 		v4 = mask;
-		v4->s_addr = htonl(~((1 << (32 - abs(bits))) - 1));
+		v4->s_addr = bits ? htonl(~((1 << (32 - abs(bits))) - 1)) : 0;
 
 		if (bits < 0)
 			v4->s_addr = ~v4->s_addr;
-- 
1.9.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From fschaefer.oss at googlemail.com  Mon Jan  5 11:51:51 2015
From: fschaefer.oss at googlemail.com (=?UTF-8?B?RnJhbmsgU2Now6RmZXI=?=)
Date: Mon, 05 Jan 2015 17:51:51 +0100
Subject: [OpenWrt-Devel] [PATCH v2 2/2] dnsmasq: fix dependency problems
 of the dnsmasq-full variant.
In-Reply-To: <CAECwjAhHY5BdFhm8gqJDEGqPL3ScB9pNT3srAjrHwBxYiQSimQ@mail.gmail.com>
References: <1419941919-30009-1-git-send-email-yszhou4tech@gmail.com>
 <1419941919-30009-2-git-send-email-yszhou4tech@gmail.com>
 <54A3D0E5.5070308@googlemail.com>
 <CAECwjAhCKHD8nv03QcdBeqZequv19TRiLnKoxAzwTrtVoy3uPw@mail.gmail.com>
 <54A58C5E.80403@googlemail.com>
 <CAECwjAhHY5BdFhm8gqJDEGqPL3ScB9pNT3srAjrHwBxYiQSimQ@mail.gmail.com>
Message-ID: <54AAC127.70704@googlemail.com>


Am 04.01.2015 um 12:22 schrieb Yousong Zhou:
>>>>> diff --git a/package/network/services/dnsmasq/patches/200-let-makefile-be-aware-of-config-changes.patch b/package/network/services/dnsmasq/patches/200-let-makefile-be-aware-of-config-changes.patch
>>>>> new file mode 100644
>>>>> index 0000000..663f0e9
>>>>> --- /dev/null
>>>>> +++ b/package/network/services/dnsmasq/patches/200-let-makefile-be-aware-of-config-changes.patch
>>>>> @@ -0,0 +1,42 @@
>>>>> +Index: dnsmasq-2.72/Makefile
>>>>> +===================================================================
>>>>> +--- dnsmasq-2.72.orig/Makefile       2014-12-30 19:46:10.484921940 +0800
>>>>> ++++ dnsmasq-2.72/Makefile    2014-12-30 19:56:39.712926794 +0800
>>>>> +@@ -74,6 +74,10 @@
>>> <snip>
>>>
>>>> Urgh... is it really necessary to patch dnsmasqs native Makefile ?
>>>> Can you give us a practical and reproducable example that shows the
>>>> problem you are trying to solve here ?
>>> Patching Makefile of dnsmasq itself is necessary for the build system
>>> of OpenWrt and Makefile of dnsmasq to pick up a possibly updated
>>> config of dnsmasq-full variant.  Otherwise rebuild of dnsmasq-ful may
>>> not happen as expected when users enable or disable a feature with
>>> e.g. make menuconfig.
>> Ok, I can reproduce it now...
>> Is this patch suitable for upstream inclusion ?
>>
> An fixed up version of this patch is already in upstream dnsmasq now.

Excellent, thanks !

> But another one has to be applied to fix possible race condition from
> happening when doing parallel build.  I am truly sorry but it seems
> like there are just too many cases to be tested out in each iteration.
>
> [1] http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2015q1/009068.html

Anything I can do to help ?
Which cases need to be tested ?

Regards,
Frank


> Regards.
>
>                yousong
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From gottfried.haider at gmail.com  Mon Jan  5 13:11:08 2015
From: gottfried.haider at gmail.com (Gottfried Haider)
Date: Mon, 5 Jan 2015 19:11:08 +0100
Subject: [OpenWrt-Devel] openconnect does not remove default routes
	[was: Some OpenConnect observations]
In-Reply-To: <CAJU7zaL1UFcg61fTKrt1dGojqvnPsNfkw5eS0ZEqpzteT31Pag@mail.gmail.com>
References: <CAPoCmY+bKXuBTfiWCaxzQV_=vpE_h8VSVZrYP48n6x8wy+yAoQ@mail.gmail.com>
 <1420326978.2000.5.camel@gnutls.org>
 <CAPoCmYLrrL05MhdCUKz+ULM00L7O=PgUxaS=KVJ-_LcSjSeaSA@mail.gmail.com>
 <1420368277.2135.3.camel@gnutls.org>
 <CAPoCmY+_Ss2rGXsWhM5H-wR+2yu5m4JfRzGE3Ez7=+ynvq6frA@mail.gmail.com>
 <CAJU7zaL1UFcg61fTKrt1dGojqvnPsNfkw5eS0ZEqpzteT31Pag@mail.gmail.com>
Message-ID: <CAPoCmY+-Dfj5x_fHZt_fmKfWybnaToo8s0ZzXiEcnPnKU=yHUA@mail.gmail.com>

Hello openwrt-devel,

Here's some more debugging information:


The issue is that disconnecting from a openconnect VPN doesn't clean
up all routes (on a recent snapshot):

Before
default         192.168.1.1     0.0.0.0         UG    0      0        0 eth0.2
192.168.0.0     *               255.255.255.0   U     0      0        0 br-lan
192.168.1.0     *               255.255.255.0   U     0      0        0 eth0.2

During
default         *               0.0.0.0         U     0      0
0 vpn-MYVPN
(MYVPN IP)      192.168.1.1     255.255.255.255 UGH   0      0        0 eth0.2
192.168.0.0     *               255.255.255.0   U     0      0        0 br-lan
192.168.1.0     *               255.255.255.0   U     0      0        0 eth0.2
192.168.3.0     *               255.255.255.0   U     0      0
0 vpn-MYVPN

After
(MYVPN IP     ) 192.168.1.1     255.255.255.255 UGH   0      0        0 eth0.2
192.168.0.0     *               255.255.255.0   U     0      0        0 br-lan
192.168.1.0     *               255.255.255.0   U     0      0        0 eth0.2


Following, the log output for running "ifdown MYVPN". I put in some
logger statements at the beginning of openconnect.sh and vpnc-script
to see when these would be invoked. (vpnc-script quite late btw..
looks like netifd already did everything at this point?)

Mon Jan  5 17:40:36 2015 user.notice openconnect: called openconnect.sh
Mon Jan  5 17:40:37 2015 user.notice openconnect: bringing down openconnect
Mon Jan  5 17:40:37 2015 daemon.info openconnect[1245]: Send BYE
packet: Aborted by caller
Mon Jan  5 17:40:37 2015 daemon.notice netifd: Network device
'vpn-MYVPN' link is down
Mon Jan  5 17:40:37 2015 daemon.notice netifd: Interface 'MYVPN' is now down
Mon Jan  5 17:40:37 2015 user.notice openconnect: called vpnc-script
Mon Jan  5 17:40:40 2015 daemon.info dnsmasq[1082]: reading
/tmp/resolv.conf.auto
Mon Jan  5 17:40:40 2015 daemon.info dnsmasq[1082]: using local
addresses only for domain lan
Mon Jan  5 17:40:40 2015 daemon.info dnsmasq[1082]: using nameserver
192.168.1.1#53


I don't know enough about netifd internals, but I looked a bit at
openconnect's side of things:

ifdown MYVPN -> ... -> proto_openconnect_teardown ->
proto_kill_command (sets action 2) -> _proto_notify -> (ubus)

(ubus) -> ... -> netifd_iface_notify_proto -> proto_shell_notify ->
proto_shell_kill_command -> kill(openconnect's pid, SIGINT)

The SIGINT quits openconnect's main loop, sends a goodbye to the
server, -> os_shutdown_tun -> script_config_tun. This forks and
execl()s the vpnc-script in a shell. The parent seems to wait for the
script to finish, closes the tun device, and exits with code 0.

The vpnc-script in turn is trying to call proto_init_update (sets
action 0), proto_send_update -> _proto_notify -> (ubus). _But_, I have
the feeling that this is somehow too late and that the interface is
already cleaned up at this point, as per ordering of the log lines
above? (Not sure if this at all relevant though.)

Not sure what is triggering the "link down" and "interface down" in
netifd.. could it perhaps be that the server, upon receiving the BYE,
closes the connection fast enough before we have a chance to
gracefully clean up?


Thanks in advance
Gottfried

On Mon, Jan 5, 2015 at 9:31 AM, Nikos Mavrogiannopoulos <nmav at gnutls.org> wrote:
> On Mon, Jan 5, 2015 at 8:00 AM, Gottfried Haider
> <gottfried.haider at gmail.com> wrote:
>>> It seems that you use openconnect to set a default route, and that's why
>>> I couldn't reproduce it. I don't think that openconnect handles default
>>> routes differently, so it could be an issue in netifd. As I see default
>>> routes are registered using proto_add_ipv4_route, and should have been
>>> automatically removed when proto_kill_command is called in
>>> openconnect.sh.
>>> Most probably you'll have to check the log (readlog), and possibly add
>>> some additional logging in:
>>> /lib/netifd/netifd-proto.sh
>>> /lib/netifd/proto/openconnect.sh
>>>
>>> Sorry for not being able to help more. Maybe someone in the
>>> openwrt-devel list will be able to help with that.
>> Thanks for those pointers. I could follow the execution all the way to
>> vpnc-script, so openconnect gets called with SIGINT and cleanly closes
>> the connection. In the disconnect case in vpnc-script, I only see
>> calls to proto_init_update and proto_send_update, whereas in connect
>> the script did the heavy lifting to setup those routes... where do
>> these calls go, do you happen to know? (primarily trying to figure out
>> whether its openconnect or some part of netfid that I should look
>> into)
>
> My understanding is that they are rpc, go to netifd daemon, which
> calls openconnect.sh shortly after that.
>
> regards,
> Nikos
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From mark.a.milburn at gmail.com  Mon Jan  5 13:18:15 2015
From: mark.a.milburn at gmail.com (mark milburn)
Date: Mon, 5 Jan 2015 11:18:15 -0700
Subject: [OpenWrt-Devel] Announcement of mac80211 driver support for
 Marvell 88W8864 chip
In-Reply-To: <20141231185440.GC2681@nanopsycho.orion>
References: <689C75E0D210324F8BE88961219F68163F44ECED4A@SC-VEXCH2.marvell.com>
 <20141231185440.GC2681@nanopsycho.orion>
Message-ID: <CAFFfgDy5OXU_RiBQeYJHZOJeWWazrHNOPZjpLEC3XBEkvA-Ucw@mail.gmail.com>

Hi David,
Will Marvell be accepting changes to this code from external
developers?  I'd be happy to help expedite the cleanup process.

Mark

On Wed, Dec 31, 2014 at 11:54 AM, Jiri Pirko <jiri at resnulli.us> wrote:
> Wed, Dec 24, 2014 at 05:04:29PM CET, dlin at marvell.com wrote:
>>Hi all,
>>
>>
>>
>>Marvell is pleased to announce this open source driver for the 88W8864 chip as a joint effort with Linksys.  The 88W8864 features 4x4 MIMO 3-spatial Stream Dual-band 802.11ac enabling 1.3Gbps WLAN PHY rate and support for 80/40/20 MHz channel bandwidths. The 88W8864 is used in the Linksys WRT1900AC and other products.
>>
>>
>>
>>Please note that this is an initial release and we plan to send the driver upstream after cleanup.
>>
>>
>>
>>We do appreciate your feedback and look forward to serving the community with exciting new offerings in the future!
>
>
> Hi.
>
> I took a very quick peek at the sources you sent.
>
> First I would like to thank you for taking the upstream way with this.
> Much appreciated.
>
> I would suggest you to develop your driver inside net-next git:
> http://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/
>
> That would save you time during potential forward port need.
>
> Also, if you use scripts/checkpatch.pl script to check your patches, it
> will reveal many problems to you. The obvious one is lines longer than 80
> chars.
>
> It is always nice to include all needed headers in all .c files. For
> example when you use skb_queue_head_init please include <linux/skbuff.h>
>
> Spotted a comment typo in mwl_fwdl.c:
> "This file implements frimware downloa related functions"
>
> Drop comments like:
> /* PRIVATE FUNCTION DEFINITION
> */
> Not needed.
>
> "MODULE_" macros are usually placed by the end of file.
>
> Module parameters should be always avoided if possible.
>
>
> I suggest you make patch against net-next and send it on
> linux-wireless at vger.kernel.org and netdev at vger.kernel.org mailing lists.
> You will get much more reviewers there.
>
>
> Please do not hesitate to email me in case I can be of any more help.
>
> Thanks!
>
> Jiri
>
>>
>>
>>
>>Thanks, David
>>
>
>
>>_______________________________________________
>>openwrt-devel mailing list
>>openwrt-devel at lists.openwrt.org
>>https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From thewerthfam at gmail.com  Mon Jan  5 18:25:24 2015
From: thewerthfam at gmail.com (Derek & Vicky)
Date: Mon, 05 Jan 2015 18:25:24 -0500
Subject: [OpenWrt-Devel] [OpenWrt] #18539: RTL8192cu driver stability
	issues
In-Reply-To: <066.b5d619d92245ba96eb65b24b305211e9@lists.openwrt.org>
References: <051.0b01a5e79eb67210fb71751da21a4027@lists.openwrt.org>
 <066.b5d619d92245ba96eb65b24b305211e9@lists.openwrt.org>
Message-ID: <54AB1D64.2080708@gmail.com>

I've read in places that the raspberry pi builds include the realtek 
open source drivers.  I don't know if the realtek drivers support AP mode.

On 01/05/2015 10:48 AM, OpenWrt wrote:
> #18539: RTL8192cu driver stability issues
> ----------------------------+-----------------------------------
>    Reporter:  thewerthfam@?  |      Owner:  developers
>        Type:  defect         |     Status:  new
>    Priority:  high           |  Milestone:  Chaos Calmer (trunk)
>   Component:  kernel         |    Version:  Trunk
> Resolution:                 |   Keywords:  kernel driver rtl8192
> ----------------------------+-----------------------------------
>
> Comment (by anonymous):
>
>   i have the same problem.my device is x86.but in the raspberry pi the
>   driver is ok.
>
> --
> Ticket URL: <https://dev.openwrt.org/ticket/18539#comment:3>
> OpenWrt <http://openwrt.org>
> Opensource Wireless Router Technology
>
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From shankarunni at netscape.net  Mon Jan  5 21:36:49 2015
From: shankarunni at netscape.net (Shankar Unni)
Date: Mon, 5 Jan 2015 18:36:49 -0800
Subject: [OpenWrt-Devel] Porting Intel DPDK to openwrt?
Message-ID: <39B427A3-DA0A-432A-94DE-7F82D8B0787B@netscape.net>

Has anyone created a package for DPDK (http://dpdk.org/) on any recent Openwrt version (or master)?  I've been googling like crazy, but I don't find any discussion about DPDK on openwrt anywhere.

If not, I'll try to create something myself.

Thanks,
--
Shankar Unni
shankarunni at netscape.net
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From yegorslists at googlemail.com  Tue Jan  6 02:23:37 2015
From: yegorslists at googlemail.com (yegorslists at googlemail.com)
Date: Tue,  6 Jan 2015 08:23:37 +0100
Subject: [OpenWrt-Devel] [PATCH] list: remove double freeing of section
Message-ID: <1420529017-30472-1-git-send-email-yegorslists@googlemail.com>

From: Yegor Yefremov <yegorslists at googlemail.com>

This error was reported by cppcheck. Compile tested only.

Signed-off-by: Yegor Yefremov <yegorslists at googlemail.com>
---
 list.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/list.c b/list.c
index 0d00f81..46f8943 100644
--- a/list.c
+++ b/list.c
@@ -346,7 +346,6 @@ uci_lookup_ext_section(struct uci_context *ctx, struct uci_ptr *ptr)
 	goto done;
 
 error:
-	free(section);
 	memset(ptr, 0, sizeof(struct uci_ptr));
 	UCI_THROW(ctx, UCI_ERR_INVAL);
 done:
-- 
1.7.7
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From nbd at openwrt.org  Tue Jan  6 06:12:15 2015
From: nbd at openwrt.org (Felix Fietkau)
Date: Tue, 06 Jan 2015 12:12:15 +0100
Subject: [OpenWrt-Devel] [PATCH] list: remove double freeing of section
In-Reply-To: <1420529017-30472-1-git-send-email-yegorslists@googlemail.com>
References: <1420529017-30472-1-git-send-email-yegorslists@googlemail.com>
Message-ID: <54ABC30F.5000008@openwrt.org>

On 2015-01-06 08:23, yegorslists at googlemail.com wrote:
> From: Yegor Yefremov <yegorslists at googlemail.com>
> 
> This error was reported by cppcheck. Compile tested only.
> 
> Signed-off-by: Yegor Yefremov <yegorslists at googlemail.com>
> ---
>  list.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
> 
> diff --git a/list.c b/list.c
> index 0d00f81..46f8943 100644
> --- a/list.c
> +++ b/list.c
> @@ -346,7 +346,6 @@ uci_lookup_ext_section(struct uci_context *ctx, struct uci_ptr *ptr)
>  	goto done;
>  
>  error:
> -	free(section);
>  	memset(ptr, 0, sizeof(struct uci_ptr));
>  	UCI_THROW(ctx, UCI_ERR_INVAL);
False positive - the "done" part is never reached due to the UCI_THROW call.

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


From nbd at openwrt.org  Tue Jan  6 06:18:26 2015
From: nbd at openwrt.org (Felix Fietkau)
Date: Tue, 06 Jan 2015 12:18:26 +0100
Subject: [OpenWrt-Devel] [PATCH] base-files: Enhancements to
	/etc/profile.
In-Reply-To: <owrt-patches-20141225-1@vittgam.net>
References: <owrt-patches-20141225-1@vittgam.net>
Message-ID: <54ABC482.5050400@openwrt.org>

On 2014-12-25 02:28, Vittorio G (VittGam) wrote:
> - Update terminal window title with current directory and hostname like on Ubuntu.
> - Add an optional colored prompt, in case user wants to enable it.
> - Add ll, an useful alias to ls.
> 
> Signed-off-by: Vittorio Gambaletta <openwrt at vittgam.net>
This is a matter of personal preference, which should be put into the
wiki instead of the default /etc/profile.

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


From yegorslists at googlemail.com  Tue Jan  6 06:20:17 2015
From: yegorslists at googlemail.com (Yegor Yefremov)
Date: Tue, 6 Jan 2015 12:20:17 +0100
Subject: [OpenWrt-Devel] [PATCH] list: remove double freeing of section
In-Reply-To: <54ABC30F.5000008@openwrt.org>
References: <1420529017-30472-1-git-send-email-yegorslists@googlemail.com>
 <54ABC30F.5000008@openwrt.org>
Message-ID: <CAGm1_kujz+pautJyH+oRGz4MR8f3UhO63HNF2r3UkFWCb9PPOg@mail.gmail.com>

On Tue, Jan 6, 2015 at 12:12 PM, Felix Fietkau <nbd at openwrt.org> wrote:
> On 2015-01-06 08:23, yegorslists at googlemail.com wrote:
>> From: Yegor Yefremov <yegorslists at googlemail.com>
>>
>> This error was reported by cppcheck. Compile tested only.
>>
>> Signed-off-by: Yegor Yefremov <yegorslists at googlemail.com>
>> ---
>>  list.c |    1 -
>>  1 files changed, 0 insertions(+), 1 deletions(-)
>>
>> diff --git a/list.c b/list.c
>> index 0d00f81..46f8943 100644
>> --- a/list.c
>> +++ b/list.c
>> @@ -346,7 +346,6 @@ uci_lookup_ext_section(struct uci_context *ctx, struct uci_ptr *ptr)
>>       goto done;
>>
>>  error:
>> -     free(section);
>>       memset(ptr, 0, sizeof(struct uci_ptr));
>>       UCI_THROW(ctx, UCI_ERR_INVAL);
> False positive - the "done" part is never reached due to the UCI_THROW call.

OK.

Compiler throws following warning for file.c because of deprecated mktemp usage

file.c:739: warning: the use of `mktemp' is dangerous, better use `mkstemp'

Is this worth fixing?

Yegor
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From yszhou4tech at gmail.com  Tue Jan  6 07:54:29 2015
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Tue, 6 Jan 2015 20:54:29 +0800
Subject: [OpenWrt-Devel] [PATCH] firewall3: fix left shift on 64 bit
 systems in fw3_bitlen2netmask
In-Reply-To: <20150105145834.GA9004@gir>
References: <20150105145834.GA9004@gir>
Message-ID: <CAECwjAgehRdsnJVHZ-+1Xg_pF7q4Qkm=rh1KQY2uJLLbfzDF7g@mail.gmail.com>

On 5 January 2015 at 22:58, Ulrich Weber <uweber.linux at gmail.com> wrote:
> otherwise 0.0.0.0/0 is set as 0.0.0.0/255.255.255.255 on x86_64
>
> Signed-off-by: Ulrich Weber <uw at ocedo.com>
> ---
>  utils.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/utils.c b/utils.c
> index 71a0f13..b2fbe02 100644
> --- a/utils.c
> +++ b/utils.c
> @@ -803,7 +803,7 @@ fw3_bitlen2netmask(int family, int bits, void *mask)
>                         return false;
>
>                 v4 = mask;
> -               v4->s_addr = htonl(~((1 << (32 - abs(bits))) - 1));
> +               v4->s_addr = bits ? htonl(~((1 << (32 - abs(bits))) - 1)) : 0;
>

Quite a catch!  But the culprit should be that shifting a 32-bit
integer left/right by not less than 32 is supposed to be undefined
behaviour in C.

>                 if (bits < 0)
>                         v4->s_addr = ~v4->s_addr;
> --
> 1.9.1
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From openwrt at vittgam.net  Tue Jan  6 08:02:51 2015
From: openwrt at vittgam.net (Vittorio G (VittGam))
Date: Tue, 06 Jan 2015 14:02:51 +0100
Subject: [OpenWrt-Devel] [PATCH] base-files: Enhancements to
	/etc/profile.
In-Reply-To: <54ABC482.5050400@openwrt.org>
References: <owrt-patches-20141225-1@vittgam.net>
 <54ABC482.5050400@openwrt.org>
Message-ID: <66b540533946b387bdf9257657dff655@vittgam.net>

Il 06.01.2015 12:18 Felix Fietkau ha scritto:
> On 2014-12-25 02:28, Vittorio G (VittGam) wrote:
>> - Update terminal window title with current directory and hostname 
>> like on Ubuntu.
>> - Add an optional colored prompt, in case user wants to enable it.
>> - Add ll, an useful alias to ls.
>>
>> Signed-off-by: Vittorio Gambaletta <openwrt at vittgam.net>
> This is a matter of personal preference, which should be put into the
> wiki instead of the default /etc/profile.

Well, the terminal window title and ll alias are standard in many Linux 
distributions, like Ubuntu and its derivatives, so that's why I proposed 
them for inclusion in OpenWrt. The colored prompt is just a personal 
preference instead :)

>
> - Felix

Cheers,
Vittorio
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From mats.dev.list at gmail.com  Tue Jan  6 08:40:15 2015
From: mats.dev.list at gmail.com (Mats Karrman)
Date: Tue, 06 Jan 2015 14:40:15 +0100
Subject: [OpenWrt-Devel] Plans for procd
In-Reply-To: <0000014abbfd3966-befced8d-628b-44a6-99c5-2d65d043f6f1-000000@email.amazonses.com>
References: <CABKbxZe2p9nLrNX8jLdpnh9en_RNXomG2pfT5pajC3+Nv_h3-w@mail.gmail.com>
 <0000014abbfd3966-befced8d-628b-44a6-99c5-2d65d043f6f1-000000@email.amazonses.com>
Message-ID: <54ABE5BF.6080201@gmail.com>

Hi Luka,

On 2015-01-05 22:25, Luka Perkov wrote:
> Hi Mats,
>
> On Mon, Jan 05, 2015 at 02:57:26PM +0100, Mats Karrman wrote:
>> Are there any written down target definition for the procd, i.e. what
>> functionality
>> it is supposed to contain?
> Not that I am aware of.
>
>> Specifically; are there any plans to include cgroups management?
> I've added lxc support to openwrt... I'm curious about your cgroups
> interest. Can you please share more details about it?
>
> Luka
I have been looking at LXC and CGmanager but I think I'm after something
even more lightweight. I have currently no need for the whole virtualization
thing, more something in the line of the ability to by configuration divide
processes into a set of fixed groups and apply restrictions on e.g. memory
and cpu usage. This together with the ability to restart processes that are
killed by OOM would be enough to solve my problem.

I haven't been using procd yet but thought that this could be a nice place
to put that kind of functionality.

BR // Mats
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From karlp at tweak.net.au  Tue Jan  6 08:59:40 2015
From: karlp at tweak.net.au (Karl Palsson)
Date: Tue, 06 Jan 2015 13:59:40 -0000
Subject: [OpenWrt-Devel] Plans for procd
In-Reply-To: <54ABE5BF.6080201@gmail.com>
References: <54ABE5BF.6080201@gmail.com>
Message-ID: <20150106135658-7458-69188-mailpile@palmtree-beeroclock-net>


Mats Karrman <mats.dev.list at gmail.com> wrote:
> I have been looking at LXC and CGmanager but I think I'm after something
> even more lightweight. I have currently no need for the whole
> virtualization
> thing, more something in the line of the ability to by configuration
> divide
> processes into a set of fixed groups and apply restrictions on e.g.
> memory
> and cpu usage. This together with the ability to restart processes that
> are
> killed by OOM would be enough to solve my problem.
> 
> I haven't been using procd yet but thought that this could be a nice
> place
> to put that kind of functionality.

I'm interested in seeing where procd is going in this as well.  I've
been using "monit" for restarting processes that die, or exceed
CPU/memory usage limits.  procd can already restart them when they die,
but the existing procd support for limits:
https://lists.openwrt.org/pipermail/openwrt-devel/2013-December/022793.html
doesn't appear to be particuarly useful for the latter.  Also, I haven't
(yet) found a way of taking any action when these events occur.

Sincerely,
Karl Palsson
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From karlp at tweak.net.au  Tue Jan  6 11:19:38 2015
From: karlp at tweak.net.au (Karl Palsson)
Date: Tue, 06 Jan 2015 16:19:38 -0000
Subject: [OpenWrt-Devel] procd limits usage
Message-ID: <20150106161938-7458-1863-mailpile@palmtree-beeroclock-net>

Hi,

I'm trying out using procd to kill/restart processes that use too much
memory, using the "limits" feature added in
https://lists.openwrt.org/pipermail/openwrt-devel/2013-December/022793.html
and I've confirmed that it's available in the BB branch procd that I'm
testing against.

My init script looks like so...

# cat /etc/init.d/hogger 
#!/bin/sh /etc/rc.common
START=85
USE_PROCD=1
PROCD_DEBUG=1
APP=hogger


start_service() {
    procd_open_instance
    procd_set_param command $APP
    procd_append_param limits data=4000
    procd_set_param respawn
    procd_close_instance
}

Starting this service gives a nice debug output from procd, such as:

# /etc/init.d/hogger start
{ "name": "hogger", "script": "\/etc\/init.d\/hogger", "instances": { "instance1": { "command": [ "hogger" ], "limits": { "data": "4000" }, "respawn": [ ] } } }


The "hogger" application just uses malloc/free to raise/lower it's
memory usage, and /proc/$PID/status shows that the VmData field
increases, eg...



VmPeak:	    4492 kB
VmSize:	    4488 kB
VmRSS:	    1144 kB
VmData:	    1812 kB
....
VmPeak:	    6536 kB
VmSize:	    6536 kB
VmRSS:	    3216 kB
VmData:	    3860 kB
....
VmPeak:	   10632 kB
VmSize:	   10632 kB
VmRSS:	    7308 kB
VmData:	    7956 kB

But procd does nothing that I can see, no logging, no restarting.  Is
this the correct usage? Is there some other way these procd limits are
meant to be used?  The only reference to a procd init script using this
feature is
https://github.com/zqlee/smartproxy/blob/master/files/smartproxy.init

Sincerely,
Karl P
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From harald at ccbib.org  Tue Jan  6 11:46:39 2015
From: harald at ccbib.org (Harald Geyer)
Date: Tue, 06 Jan 2015 17:46:39 +0100
Subject: [OpenWrt-Devel] [PATCH,
	RESEND] package/binutils: actually support the target toolchain
Message-ID: <E1Y8XHD-0001nx-Dq@stardust.g4.wien.funkfeuer.at>

This fixes a bug, where ld on ARM EABI platforms expects OABI code.

Signed-off-by: Harald Geyer <harald at ccbib.org>
---
Resending as I didn't get many comments the first time.
This has been tested by me on mxs and by nwf on kirkwood.

 package/devel/binutils/Makefile |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/package/devel/binutils/Makefile b/package/devel/binutils/Makefile
index cf77690..c5a0717 100644
--- a/package/devel/binutils/Makefile
+++ b/package/devel/binutils/Makefile
@@ -69,6 +69,8 @@ endef
 TARGET_CFLAGS += $(FPIC) -Wno-unused-value
 
 CONFIGURE_ARGS += \
+	--host=$(REAL_GNU_TARGET_NAME) \
+	--target=$(REAL_GNU_TARGET_NAME) \
 	--enable-shared \
 	--enable-install-libiberty \
 	--enable-install-libbfd
-- 
1.7.2.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From yszhou4tech at gmail.com  Wed Jan  7 06:32:31 2015
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Wed, 7 Jan 2015 19:32:31 +0800
Subject: [OpenWrt-Devel] procd limits usage
In-Reply-To: <20150106161938-7458-1863-mailpile@palmtree-beeroclock-net>
References: <20150106161938-7458-1863-mailpile@palmtree-beeroclock-net>
Message-ID: <CAECwjAjRep8dCFPGzXqhUpsPxk9WsWfY__EnpPHM5BteezCo9Q@mail.gmail.com>

On 7 January 2015 at 00:19, Karl Palsson <karlp at tweak.net.au> wrote:
> Hi,
>
> I'm trying out using procd to kill/restart processes that use too much
> memory, using the "limits" feature added in
> https://lists.openwrt.org/pipermail/openwrt-devel/2013-December/022793.html
> and I've confirmed that it's available in the BB branch procd that I'm
> testing against.
>
> My init script looks like so...
>
> # cat /etc/init.d/hogger
> #!/bin/sh /etc/rc.common
> START=85
> USE_PROCD=1
> PROCD_DEBUG=1
> APP=hogger
>
>
> start_service() {
>     procd_open_instance
>     procd_set_param command $APP
>     procd_append_param limits data=4000
>     procd_set_param respawn
>     procd_close_instance
> }
>
> Starting this service gives a nice debug output from procd, such as:
>
> # /etc/init.d/hogger start
> { "name": "hogger", "script": "\/etc\/init.d\/hogger", "instances": { "instance1": { "command": [ "hogger" ], "limits": { "data": "4000" }, "respawn": [ ] } } }
>
>
> The "hogger" application just uses malloc/free to raise/lower it's
> memory usage, and /proc/$PID/status shows that the VmData field
> increases, eg...
>
>
>
> VmPeak:     4492 kB
> VmSize:     4488 kB
> VmRSS:      1144 kB
> VmData:     1812 kB
> ....
> VmPeak:     6536 kB
> VmSize:     6536 kB
> VmRSS:      3216 kB
> VmData:     3860 kB
> ....
> VmPeak:    10632 kB
> VmSize:    10632 kB
> VmRSS:      7308 kB
> VmData:     7956 kB
>

Which libc was in use?  Because RLIMIT_DATA only applies to those
allocated by brk() and sbrk(), while malloc() of glibc may fallback to
mmap() if sbrk() fails.  AFAIK, malloc() of uClibc for MIPS in OpenWrt
utilizes only sbrk() with the default config.

> But procd does nothing that I can see, no logging, no restarting.  Is
> this the correct usage? Is there some other way these procd limits are
> meant to be used?  The only reference to a procd init script using this
> feature is
> https://github.com/zqlee/smartproxy/blob/master/files/smartproxy.init

"as=" (RTLIMIT_AS) is another option you can try.

Regards,

                yousong

>
> Sincerely,
> Karl P
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From nbd at openwrt.org  Wed Jan  7 06:36:28 2015
From: nbd at openwrt.org (Felix Fietkau)
Date: Wed, 07 Jan 2015 12:36:28 +0100
Subject: [OpenWrt-Devel] [PATCH fstools] libblkid-tiny: add btrfs probe
 info
In-Reply-To: <20141222113436.GA868@makrotopia.org>
References: <20141222113436.GA868@makrotopia.org>
Message-ID: <54AD1A3C.8040707@openwrt.org>

On 2014-12-22 12:34, Daniel Golle wrote:
> This only adds the magic for btrfs to show btrfs volumes in
> block detect.
> 
> In order to properly support btrfs with more than one device and avoid
> trying to mount the same device group once for each instance we have to
> make sure that only one device per group will be mounted (btrfs then
> automatically detects all other devices of the group).
> For unmounting, the opposite should be applied: umount if called for
> any of the devices in a mounted device group, unmount the filesystem.
> 
> Signed-off-by: Daniel Golle <daniel at makrotopia.org>
This was missing a change to CMakeLists.txt, fixed that up and applied
the patch.

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


From nbd at openwrt.org  Wed Jan  7 06:38:02 2015
From: nbd at openwrt.org (Felix Fietkau)
Date: Wed, 07 Jan 2015 12:38:02 +0100
Subject: [OpenWrt-Devel] [PATCH] curl: enable "https" protocol
In-Reply-To: <20141227183227.7e045c6e@erker.lan>
References: <20141227183227.7e045c6e@erker.lan>
Message-ID: <54AD1A9A.1030902@openwrt.org>

On 2014-12-27 18:32, Lars Kruse wrote:
> Hi,
> 
> even though SSL-support is configurable for curl, there is currently
> no support for https (just http). The attached patch fixes that.
> 
> Lars
> 
> 
> 
> Provide optional --enable-https flag for curl.
> 
> Signed-off-by: Lars Kruse <devel at sumpfralle.de>
Like the other one, this patch is whitespace damaged and has wrong
formatting for description.

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


From karlp at tweak.net.au  Wed Jan  7 07:16:08 2015
From: karlp at tweak.net.au (Karl Palsson)
Date: Wed, 07 Jan 2015 12:16:08 -0000
Subject: [OpenWrt-Devel] procd limits usage
In-Reply-To: <CAECwjAjRep8dCFPGzXqhUpsPxk9WsWfY__EnpPHM5BteezCo9Q@mail.gmail.com>
References: <CAECwjAjRep8dCFPGzXqhUpsPxk9WsWfY__EnpPHM5BteezCo9Q@mail.gmail.com>
Message-ID: <20150107121306-5326-60528-mailpile@palmtree-beeroclock-net>


Yousong Zhou <yszhou4tech at gmail.com> wrote:
> 
> Which libc was in use?  Because RLIMIT_DATA only applies to those
> allocated by brk() and sbrk(), while malloc() of glibc may fallback to
> mmap() if sbrk() fails.  AFAIK, malloc() of uClibc for MIPS in OpenWrt
> utilizes only sbrk() with the default config.

whatever the default was for "atheros" in OpenWrt 1407.  so, 
uClibc 0.9.33.2
> 
> > But procd does nothing that I can see, no logging, no restarting.  Is
> > this the correct usage? Is there some other way these procd limits are
> > meant to be used?  The only reference to a procd init script using this
> > feature is
> > https://github.com/zqlee/smartproxy/blob/master/files/smartproxy.init
> 
> "as=" (RTLIMIT_AS) is another option you can try.

What does that actually limit?  Matching up names from the procd commit
RTLIMIT_xxx with "man ulimit" for instance isn't always obvious (to me
at least)
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From scbzyhx at gmail.com  Wed Jan  7 07:27:15 2015
From: scbzyhx at gmail.com (Yang Haixiang)
Date: Wed, 7 Jan 2015 20:27:15 +0800
Subject: [OpenWrt-Devel] ubus document
Message-ID: <CAFcUY7DiZOTOCaF5FmUhAVfOcCdcBDVyL4mKKE0gRmzySqXR2Q@mail.gmail.com>

Hi,
I want to add an event handler in ubus. But there is little document about
it. Could someone do me a favor please?
Thanks.

Best Regards
Leo Yang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150107/127c32f2/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From yszhou4tech at gmail.com  Wed Jan  7 08:19:38 2015
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Wed, 7 Jan 2015 21:19:38 +0800
Subject: [OpenWrt-Devel] procd limits usage
In-Reply-To: <20150107121306-5326-60528-mailpile@palmtree-beeroclock-net>
References: <CAECwjAjRep8dCFPGzXqhUpsPxk9WsWfY__EnpPHM5BteezCo9Q@mail.gmail.com>
 <20150107121306-5326-60528-mailpile@palmtree-beeroclock-net>
Message-ID: <CAECwjAhxHh0ByExPG1pr-fNp4C8mF5Cba57xJQDs_s-4SQH1xg@mail.gmail.com>

On 7 January 2015 at 20:16, Karl Palsson <karlp at tweak.net.au> wrote:
>
> Yousong Zhou <yszhou4tech at gmail.com> wrote:
>>
>> Which libc was in use?  Because RLIMIT_DATA only applies to those
>> allocated by brk() and sbrk(), while malloc() of glibc may fallback to
>> mmap() if sbrk() fails.  AFAIK, malloc() of uClibc for MIPS in OpenWrt
>> utilizes only sbrk() with the default config.
>
> whatever the default was for "atheros" in OpenWrt 1407.  so,
> uClibc 0.9.33.2

Okay.  But then I have no idea what's going wrong.  You can try adding
getrlimit() call to hogger to see whether the soft/hard limit has
indeed been imposed before exec() by procd.  BTW, the format of limits
params allows setting both soft and hard limit for each resource type.
As in the following

                procd_set_params limits "data=4000 8000"

If only one value was given, only the soft limit is supposed to be
changed with the hard limit left as it is.

>>
>> > But procd does nothing that I can see, no logging, no restarting.  Is
>> > this the correct usage? Is there some other way these procd limits are
>> > meant to be used?  The only reference to a procd init script using this
>> > feature is
>> > https://github.com/zqlee/smartproxy/blob/master/files/smartproxy.init
>>
>> "as=" (RTLIMIT_AS) is another option you can try.
>
> What does that actually limit?  Matching up names from the procd commit
> RTLIMIT_xxx with "man ulimit" for instance isn't always obvious (to me
> at least)

My bad, should be RLIMIT_AS.
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From karlp at tweak.net.au  Wed Jan  7 09:44:25 2015
From: karlp at tweak.net.au (Karl Palsson)
Date: Wed, 07 Jan 2015 14:44:25 -0000
Subject: [OpenWrt-Devel] procd limits usage
In-Reply-To: <CAECwjAhxHh0ByExPG1pr-fNp4C8mF5Cba57xJQDs_s-4SQH1xg@mail.gmail.com>
References: <CAECwjAhxHh0ByExPG1pr-fNp4C8mF5Cba57xJQDs_s-4SQH1xg@mail.gmail.com>
Message-ID: <20150107134143-5326-74980-mailpile@palmtree-beeroclock-net>


Yousong Zhou <yszhou4tech at gmail.com> wrote:
> 
> Okay.  But then I have no idea what's going wrong.  You can try adding
> getrlimit() call to hogger to see whether the soft/hard limit has
> indeed been imposed before exec() by procd.  BTW, the format of limits
> params allows setting both soft and hard limit for each resource type.
> As in the following
> 
>                 procd_set_params limits "data=4000 8000"
> 
> If only one value was given, only the soft limit is supposed to be
> changed with the hard limit left as it is.

Good to know, and I've tried it in that form now too.

> >
> > What does that actually limit?  Matching up names from the procd commit
> > RTLIMIT_xxx with "man ulimit" for instance isn't always obvious (to me
> > at least)
> 
> My bad, should be RLIMIT_AS.

Ok, was looking in the right spaces now.  _any_ limit on AS stops my
process from starting (or, killing it immediately) I used up to as much
as     procd_append_param limits "as=512000 512000" with no help.

So, I guess that's "working"  I went back to RLIMIT_DATA, and added
getrlimit, and it indeed shows that procd is setting the limits, but it
still has no effect.  

Sincerely,
Karl P

-- 
Sent using Mailpile, Free Software from www.mailpile.is
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From zajec5 at gmail.com  Wed Jan  7 11:07:41 2015
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Wed,  7 Jan 2015 17:07:41 +0100
Subject: [OpenWrt-Devel] [PATCH] fstools: update to the latest git HEAD
Message-ID: <1420646861-7914-1-git-send-email-zajec5@gmail.com>

This allows using UBIFS volume as overlay and adds support for Btrfs.

Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com>
---
 package/system/fstools/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/system/fstools/Makefile b/package/system/fstools/Makefile
index 9e3dde7..a71401d 100644
--- a/package/system/fstools/Makefile
+++ b/package/system/fstools/Makefile
@@ -8,14 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=fstools
-PKG_VERSION:=2014-12-15
+PKG_VERSION:=2015-01-07
 
 PKG_RELEASE=$(PKG_SOURCE_VERSION)
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=git://nbd.name/fstools.git
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=83cf8896a598fb9fc58da0a9bb4f137695f78853
+PKG_SOURCE_VERSION:=6a448a100c7ce8b8b85f262ba1258e54363da9cc
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
 CMAKE_INSTALL:=1
 PKG_CHECK_FORMAT_SECURITY:=0
-- 
1.8.4.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From wigyori at uid0.hu  Wed Jan  7 14:37:44 2015
From: wigyori at uid0.hu (Zoltan HERPAI)
Date: Wed, 7 Jan 2015 20:37:44 +0100 (CET)
Subject: [OpenWrt-Devel] [RFC PATCH] mac80211: brcmfmac: separate SDIO and
	USB support
Message-ID: <alpine.DEB.2.02.1501071946120.29083@trabant.deployis.eu>

This patch will add options to select SDIO and USB support in the brcmfmac 
driver, and not tie it to only support USB. As the driver doesn't build 
the host interface code into separate .ko, the required ones are selected 
via config options.

PCIe support is not added now, can be added later. As of now, only sunxi 
would use the SDIO support for the Ampak modules.

Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
---
Index: package/kernel/mac80211/Makefile
===================================================================
--- package/kernel/mac80211/Makefile	(revision 43857)
+++ package/kernel/mac80211/Makefile	(working copy)
@@ -1477,17 +1477,36 @@

  define KernelPackage/brcmfmac
    $(call KernelPackage/mac80211/Default)
-  TITLE:=Broadcom IEEE802.11n USB FullMAC WLAN driver
+  TITLE:=Broadcom IEEE802.11n USB/SDIO FullMAC WLAN driver
    URL:=http://linuxwireless.org/en/users/Drivers/brcm80211
-  DEPENDS+= @USB_SUPPORT +kmod-usb-core +kmod-cfg80211 + at DRIVER_11N_SUPPORT +kmod-brcmutil
+  DEPENDS+= @(USB_SUPPORT||TARGET_sunxi) +kmod-cfg80211 + at DRIVER_11N_SUPPORT +kmod-brcmutil
    FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/brcm80211/brcmfmac/brcmfmac.ko
    AUTOLOAD:=$(call AutoProbe,brcmfmac)
  endef

  define KernelPackage/brcmfmac/description
- Kernel module for Broadcom IEEE802.11n USB Wireless cards
+ Kernel module for Broadcom IEEE802.11n USB/SDIO Wireless cards
  endef

+define KernelPackage/brcmfmac/config
+    if PACKAGE_kmod-brcmfmac
+
+		config PACKAGE_BRCMFMAC_SDIO
+			depends TARGET_sunxi
+			bool "Broadcom FullMAC SDIO support"
+			help
+			    Say Y if you want to enable SDIO support for the brcmfmac driver.
+
+		config PACKAGE_BRCMFMAC_USB
+			select PACKAGE_kmod-usb-core
+			default y
+			bool "Broadcom FullMAC USB support"
+			help
+			    Say Y if you want to enable USB support for the brcmfmac driver.
+
+    endif
+endef
+
  config_package=$(if $(CONFIG_PACKAGE_kmod-$(1)),m)

  config-y:= \
@@ -1558,8 +1577,9 @@
  config-$(call config_package,brcmutil) += BRCMUTIL
  config-$(call config_package,brcmsmac) += BRCMSMAC
  config-$(call config_package,brcmfmac) += BRCMFMAC
-config-y += BRCMFMAC_USB
+config-$(CONFIG_PACKAGE_BRCMFMAC_USB) += BRCMFMAC_USB
  config-$(CONFIG_PACKAGE_BRCM80211_DEBUG) += BRCMDBG
+config-$(CONFIG_PACKAGE_BRCMFMAC_SDIO) += BRCMFMAC_SDIO

  config-$(call config_package,mac80211-hwsim) += MAC80211_HWSIM

@@ -1969,12 +1989,25 @@

  define KernelPackage/brcmfmac/install
  	$(INSTALL_DIR) $(1)/lib/firmware/brcm
+ifeq ($(CONFIG_PACKAGE_BRCMFMAC_USB),y)
  	$(INSTALL_DATA) \
  		$(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac43236b.bin \
  		$(1)/lib/firmware/brcm/
  	$(INSTALL_DATA) \
  		$(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac43143.bin \
  		$(1)/lib/firmware/brcm/
+endif
+ifeq ($(CONFIG_PACKAGE_BRCMFMAC_SDIO),y)
+	$(INSTALL_DATA) \
+		$(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac4329-sdio.bin \
+		$(1)/lib/firmware/brcm/
+	$(INSTALL_DATA) \
+		$(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac4330-sdio.bin \
+		$(1)/lib/firmware/brcm/
+	$(INSTALL_DATA) \
+		$(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac43362-sdio.bin \
+		$(1)/lib/firmware/brcm/
+endif
  endef

  $(eval $(call KernelPackage,adm8211))
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From christian.schoenebeck at gmail.com  Wed Jan  7 15:06:34 2015
From: christian.schoenebeck at gmail.com (Christian Schoenebeck)
Date: Wed, 07 Jan 2015 21:06:34 +0100
Subject: [OpenWrt-Devel] [Luci2] Problems since 2015-01-05-e28f8f6
Message-ID: <54AD91CA.9000903@gmail.com>

Hi,
I recompiled and installed Luci2 on OpenWrt x86 inside VirtualBox.
I already used the previous version of LuCI2.
Here my findings for the new Version using FireFox 34 installed on Xubuntu 14.10:

- Login screen starts with: "Wrong username or password given!"
- After login I got the following alert boxes:
	Unable to instantiate proto "/luci2/proto/static.js": TypeError: L.NetworkModel is undefined
	Unable to instantiate proto "/luci2/proto/dslite.js": TypeError: L.NetworkModel is undefined
	Unable to instantiate proto "/luci2/proto/dhcpv6.js": TypeError: L.NetworkModel is undefined
	Unable to instantiate proto "/luci2/proto/dhcp.js": TypeError: L.NetworkModel is undefined
	Unable to instantiate proto "/luci2/proto/6to4.js": TypeError: L.NetworkModel is undefined
	Unable to instantiate proto "/luci2/proto/none.js": TypeError: L.NetworkModel is undefined
  after this alerts the "Loading data..." stays permanent.

The directory listing:
root at OpenWrt:/www/luci2/proto# ll
drwxrwxr-x    2 root     root           140 Jan  7 20:29 ./
drwxrwxr-x    7 root     root           379 Jan  7 20:29 ../
-rw-rw-r--    1 root     root          2878 Dec 29 19:15 6in4.js
-rw-rw-r--    1 root     root          1943 Dec 29 19:15 6rd.js
-rw-rw-r--    1 root     root          1022 Dec 29 19:15 6to4.js
-rw-rw-r--    1 root     root          1827 Dec 29 19:15 dhcp.js
-rw-rw-r--    1 root     root          1998 Dec 29 19:15 dhcpv6.js
-rw-rw-r--    1 root     root          1342 Dec 29 19:15 dslite.js
-rw-rw-r--    1 root     root           133 Dec 29 19:15 none.js
-rw-rw-r--    1 root     root          3164 Dec 29 19:15 static.js

root at OpenWrt:/www/luci2# ll
drwxrwxr-x    7 root     root           379 Jan  7 20:29 ./
drwxr-xr-x    5 root     root           110 Jan  7 20:29 ../
-rw-rw-r--    1 root     root         43283 Dec 29 19:15 bootstrap.js
-rw-rw-r--    1 root     root         66829 Jan  5 21:07 cbi.js
drwxrwxr-x    2 root     root            53 Jan  7 20:29 css/
-rw-rw-r--    1 root     root           927 Jan  5 21:07 firewall.js
-rw-rw-r--    1 root     root          2429 Dec 29 19:15 html5.js
drwxrwxr-x    3 root     root           612 Jan  7 20:29 icons/
-rw-rw-r--    1 root     root        268381 Dec 29 19:15 jquery-1.9.1.js
-rw-rw-r--    1 root     root          6574 Dec 29 19:15 jquery.peity.js
-rw-rw-r--    1 root     root         13924 Jan  5 21:07 luci2.js
-rw-rw-r--    1 root     root         30953 Jan  5 21:07 network.js
drwxrwxr-x    2 root     root           140 Jan  7 20:29 proto/
-rw-rw-r--    1 root     root          4047 Dec 29 19:15 respond.min.js
-rw-rw-r--    1 root     root          3943 Jan  5 21:07 rpc.js
-rw-rw-r--    1 root     root          1464 Jan  5 21:07 session.js
-rw-rw-r--    1 root     root          1801 Jan  5 21:07 system.js
drwxrwxr-x    2 root     root           508 Jan  7 20:29 template/
-rw-rw-r--    1 root     root          9852 Jan  5 21:07 uci.js
-rw-rw-r--    1 root     root         30821 Jan  5 21:07 ui.js
drwxrwxr-x    2 root     root           489 Jan  7 20:29 view/
-rw-rw-r--    1 root     root          3425 Jan  5 21:07 wireless.js
-rw-rw-r--    1 root     root         12968 Dec 29 19:15 zoneinfo.json

What did I wrong ?

Cheers,
Christian
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From eschultz at prplfoundation.org  Wed Jan  7 15:28:02 2015
From: eschultz at prplfoundation.org (Eric Schultz)
Date: Wed, 7 Jan 2015 14:28:02 -0600
Subject: [OpenWrt-Devel] Modifying configuration at package install
Message-ID: <CAMkzgA6hdAuK238g8sUE4H=riv1eHZ8TMtoD2OPYfXBuO=fGkw@mail.gmail.com>

I'm trying to create an example package. In it, I want the package to
modify the IP address of the LAN to 10.0.2.15. If I had access to a
running OpenWrt console, I'd use "uci set" to change the ip address.
I'd like to perform this change manually though at package
installation time.

Is there a way to run uci during the Package/install action in the
Makefile? Or is there a better way of making this change?

Thanks,

Eric

-- 
Eric Schultz, Community Manager, prpl Foundation
http://www.prplfoundation.org
eschultz at prplfoundation.org
cell: 920-539-0404
skype: ericschultzwi
@EricPrpl
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From Matthias.Strubel at aod-rpg.de  Wed Jan  7 15:48:30 2015
From: Matthias.Strubel at aod-rpg.de (Matthias Strubel)
Date: Wed, 07 Jan 2015 21:48:30 +0100
Subject: [OpenWrt-Devel] Modifying configuration at package install
In-Reply-To: <CAMkzgA6hdAuK238g8sUE4H=riv1eHZ8TMtoD2OPYfXBuO=fGkw@mail.gmail.com>
References: <CAMkzgA6hdAuK238g8sUE4H=riv1eHZ8TMtoD2OPYfXBuO=fGkw@mail.gmail.com>
Message-ID: <54AD9B9E.40003@aod-rpg.de>

Hi Eric,
yes, you can run scripts at specific points during (un)installation  of a package.
You can find more information here: http://wiki.openwrt.org/doc/devel/packages 

I think you want to use the "Package/postinst" part. 
Some quickly found examples:

https://github.com/openwrt-routing/packages/blob/master/miniupnpd/Makefile
https://github.com/openwrt/packages/blob/master/net/ddns-scripts/Makefile

Hope that helps,
best regards 
Matthias

On 01/07/2015 09:28 PM, Eric Schultz wrote:
> I'm trying to create an example package. In it, I want the package to
> modify the IP address of the LAN to 10.0.2.15. If I had access to a
> running OpenWrt console, I'd use "uci set" to change the ip address.
> I'd like to perform this change manually though at package
> installation time.
> 
> Is there a way to run uci during the Package/install action in the
> Makefile? Or is there a better way of making this change?
> 
> Thanks,
> 
> Eric
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From christian.schoenebeck at gmail.com  Wed Jan  7 15:51:22 2015
From: christian.schoenebeck at gmail.com (Christian Schoenebeck)
Date: Wed, 07 Jan 2015 21:51:22 +0100
Subject: [OpenWrt-Devel] [Luci2] Problems since 2015-01-05-e28f8f6
In-Reply-To: <54AD94BF.7020209@subsignal.org>
References: <54AD91CA.9000903@gmail.com> <54AD94BF.7020209@subsignal.org>
Message-ID: <54AD9C4A.6010007@gmail.com>

Hi,

login window now without "wrong user ..." and no alert boxes
but still hanging at "Loading data..."
I removed old package first and reinstalled the newly compiled 2015-01-07-09dc12a.

Christian

Am 07.01.2015 um 21:19 schrieb Jo-Philipp Wich:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi,
> 
> the proto thing should be fixed now.
> 
> ~ Jow
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.12 (GNU/Linux)
> 
> iEYEARECAAYFAlStlLwACgkQdputYINPTPO0NQCfWAob5N3XcP/DTQ3GJRolhzl2
> pL0AnAsgCEmtKIw8lmNTLMbTAdhfJqGd
> =7HDn
> -----END PGP SIGNATURE-----
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From jow at openwrt.org  Wed Jan  7 16:01:20 2015
From: jow at openwrt.org (Jo-Philipp Wich)
Date: Wed, 07 Jan 2015 22:01:20 +0100
Subject: [OpenWrt-Devel] [Luci2] Problems since 2015-01-05-e28f8f6
In-Reply-To: <54AD9C4A.6010007@gmail.com>
References: <54AD91CA.9000903@gmail.com> <54AD94BF.7020209@subsignal.org>
 <54AD9C4A.6010007@gmail.com>
Message-ID: <54AD9EA0.9080601@openwrt.org>

Hi.

> login window now without "wrong user ..." and no alert boxes
> but still hanging at "Loading data..."

No idea about that, it works fine here. Check your firebug / chrome
debugger console for errors.

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


From christian.schoenebeck at gmail.com  Wed Jan  7 16:26:18 2015
From: christian.schoenebeck at gmail.com (Christian Schoenebeck)
Date: Wed, 07 Jan 2015 22:26:18 +0100
Subject: [OpenWrt-Devel] [Luci2] Problems since 2015-01-05-e28f8f6
In-Reply-To: <54AD9EA0.9080601@openwrt.org>
References: <54AD91CA.9000903@gmail.com> <54AD94BF.7020209@subsignal.org>
 <54AD9C4A.6010007@gmail.com> <54AD9EA0.9080601@openwrt.org>
Message-ID: <54ADA47A.9020001@gmail.com>

2 TypeError: L.NetworkModel is undefined
	
luci2.j... > eval (Zeile 414, Spalte 8)

http://192.168.1.1/luci2/luci2.js line 240 > eval line 579 > eval

Hope this help.

Christian

Am 07.01.2015 um 22:01 schrieb Jo-Philipp Wich:
> Hi.
> 
>> login window now without "wrong user ..." and no alert boxes
>> but still hanging at "Loading data..."
> 
> No idea about that, it works fine here. Check your firebug / chrome
> debugger console for errors.
> 
> ~ Jow
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From jow at openwrt.org  Wed Jan  7 16:29:14 2015
From: jow at openwrt.org (Jo-Philipp Wich)
Date: Wed, 07 Jan 2015 22:29:14 +0100
Subject: [OpenWrt-Devel] [Luci2] Problems since 2015-01-05-e28f8f6
In-Reply-To: <54ADA47A.9020001@gmail.com>
References: <54AD91CA.9000903@gmail.com> <54AD94BF.7020209@subsignal.org>
 <54AD9C4A.6010007@gmail.com> <54AD9EA0.9080601@openwrt.org>
 <54ADA47A.9020001@gmail.com>
Message-ID: <54ADA52A.6080001@openwrt.org>

Hi,

my bad - I forgot to push the updated views as well. Please try again.

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


From christian.schoenebeck at gmail.com  Wed Jan  7 16:35:02 2015
From: christian.schoenebeck at gmail.com (Christian Schoenebeck)
Date: Wed, 07 Jan 2015 22:35:02 +0100
Subject: [OpenWrt-Devel] [Luci2] Problems since 2015-01-05-e28f8f6
In-Reply-To: <54ADA52A.6080001@openwrt.org>
References: <54AD91CA.9000903@gmail.com> <54AD94BF.7020209@subsignal.org>
 <54AD9C4A.6010007@gmail.com> <54AD9EA0.9080601@openwrt.org>
 <54ADA47A.9020001@gmail.com> <54ADA52A.6080001@openwrt.org>
Message-ID: <54ADA686.5020705@gmail.com>

Hi,
that's it. Thanks
Christian

Am 07.01.2015 um 22:29 schrieb Jo-Philipp Wich:
> Hi,
> 
> my bad - I forgot to push the updated views as well. Please try again.
> 
> ~ Jow
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From eschultz at prplfoundation.org  Wed Jan  7 17:06:20 2015
From: eschultz at prplfoundation.org (Eric Schultz)
Date: Wed, 7 Jan 2015 16:06:20 -0600
Subject: [OpenWrt-Devel] Modifying configuration at package install
Message-ID: <CAMkzgA5ZmKT7YP-mF6KLOci-73tmaNHLiE9GRxM82hd=8h0sww@mail.gmail.com>

Matthias,

Thanks for the help. Will these scripts run even if it's the process
of creating a new OpenWrt image? Or only if I installed the opkg from
inside OpenWrt?

I'm looking for a way to change the previously setting on image
creation. For example, the setting is initially set to the default
192.168.1.1 during the build process and when my package is built and
added to the image, it's changed to 10.0.2.15.

I should have been clearer about what I was trying to do :)

Thanks again,

Eric

>Hi Eric,
>yes, you can run scripts at specific points during (un)installation  of a package.
>You can find more information here: http://wiki.openwrt.org/doc/devel/packages
>
>I think you want to use the "Package/postinst" part.
>Some quickly found examples:
>
>https://github.com/openwrt-routing/packages/blob/master/miniupnpd/Makefile
>https://github.com/openwrt/packages/blob/master/net/ddns-scripts/Makefile
>
>Hope that helps,
>best regards
>Matthias
>
>On 01/07/2015 09:28 PM, Eric Schultz wrote:
>> I'm trying to create an example package. In it, I want the package to
>> modify the IP address of the LAN to 10.0.2.15. If I had access to a
>> running OpenWrt console, I'd use "uci set" to change the ip address.
>> I'd like to perform this change manually though at package
>> installation time.
>>
>> Is there a way to run uci during the Package/install action in the
>> Makefile? Or is there a better way of making this change?
>>
>> Thanks,
>>
>> Eric
>>

-- 
Eric Schultz, Community Manager, prpl Foundation
http://www.prplfoundation.org
eschultz at prplfoundation.org
cell: 920-539-0404
skype: ericschultzwi
@EricPrpl
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From jow at openwrt.org  Wed Jan  7 17:11:02 2015
From: jow at openwrt.org (Jo-Philipp Wich)
Date: Wed, 07 Jan 2015 23:11:02 +0100
Subject: [OpenWrt-Devel] Modifying configuration at package install
In-Reply-To: <CAMkzgA5ZmKT7YP-mF6KLOci-73tmaNHLiE9GRxM82hd=8h0sww@mail.gmail.com>
References: <CAMkzgA5ZmKT7YP-mF6KLOci-73tmaNHLiE9GRxM82hd=8h0sww@mail.gmail.com>
Message-ID: <54ADAEF6.30905@openwrt.org>

Hi Eric,

make your package ship an /etc/uci-defaults/99_custom_settings that
executes the appropriate uci set commands.

That script is automatically sourced on the first OpenWrt boot and
deleted afterwards. Make sure it exits with code 0.

You can not rely on postinstall hooks as the network configuration may
not be available at build time, on ar71xx for example it is generated on
the first boot (from /etc/uci-defaults/02_network).

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


From lists at sumpfralle.de  Wed Jan  7 17:50:20 2015
From: lists at sumpfralle.de (Lars Kruse)
Date: Wed, 7 Jan 2015 23:50:20 +0100
Subject: [OpenWrt-Devel] [PATCH] [packages] dnsmasq: add option
	--quiet-dhcp
In-Reply-To: <54AA9B11.6030806@openwrt.org>
References: <20141225014908.7ebf4d02@erker.lan> <54AA97F9.7060405@openwrt.org>
 <54AA9B11.6030806@openwrt.org>
Message-ID: <20150107235020.160603a7@erker.lan>


The --quiet-dhcp setting increases privacy by omitting DHCP lease logs
including MAC addresses.

Signed-off-by: Lars Kruse <devel at sumpfralle.de>

--- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -123,6 +123,7 @@ dnsmasq() {
 	append_bool "$cfg" nonwildcard "--bind-interfaces"
 	append_bool "$cfg" fqdn "--dhcp-fqdn"
 	append_bool "$cfg" proxydnssec "--proxy-dnssec"
+	append_bool "$cfg" quiet_dhcp "--quiet-dhcp"
 
 	append_parm "$cfg" dhcpscript "--dhcp-script"
 	append_parm "$cfg" cachesize "--cache-size"

--

I created the above patch with quilt. Hopefully the format is suitable.
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From s.demeszko at wireless-instruments.com  Thu Jan  8 08:55:09 2015
From: s.demeszko at wireless-instruments.com (=?UTF-8?q?S=C5=82awomir=20Demeszko?=)
Date: Thu,  8 Jan 2015 14:55:09 +0100
Subject: [OpenWrt-Devel] [PATCH uqmi] Add command for listing device
	capabilities
Message-ID: <1420725309-23172-1-git-send-email-s.demeszko@wireless-instruments.com>

Signed-off-by: S?awomir Demeszko <s.demeszko at wireless-instruments.com>
---
 commands-dms.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 commands-dms.h |  2 ++
 2 files changed, 55 insertions(+)

diff --git a/commands-dms.c b/commands-dms.c
index a677052..fcb4b93 100644
--- a/commands-dms.c
+++ b/commands-dms.c
@@ -7,6 +7,59 @@ static struct {
 	char* puk;
 } dms_req_data;
 
+static void cmd_dms_get_capabilities_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
+{
+	void *t, *networks;
+	int i;
+	struct qmi_dms_get_capabilities_response res;
+	const char *radio_cap[] = {
+		[QMI_DMS_RADIO_INTERFACE_CDMA20001X] = "cdma1x",
+		[QMI_DMS_RADIO_INTERFACE_EVDO] = "cdma1xevdo",
+		[QMI_DMS_RADIO_INTERFACE_GSM] = "gsm",
+		[QMI_DMS_RADIO_INTERFACE_UMTS] = "umts",
+		[QMI_DMS_RADIO_INTERFACE_LTE] = "lte",
+	};
+	const char *service_cap[] = {
+		[QMI_DMS_DATA_SERVICE_CAPABILITY_NONE] = "none",
+		[QMI_DMS_DATA_SERVICE_CAPABILITY_CS] = "cs",
+		[QMI_DMS_DATA_SERVICE_CAPABILITY_PS] = "ps",
+		[QMI_DMS_DATA_SERVICE_CAPABILITY_SIMULTANEOUS_CS_PS] = "simultaneous_cs_ps",
+		[QMI_DMS_DATA_SERVICE_CAPABILITY_NON_SIMULTANEOUS_CS_PS] = "non_simultaneous_cs_ps",
+	};
+
+	qmi_parse_dms_get_capabilities_response(msg, &res);
+
+	t = blobmsg_open_table(&status, NULL);
+
+	blobmsg_add_u32(&status, "max_tx_channel_rate", (int32_t) res.data.info.max_tx_channel_rate);
+	blobmsg_add_u32(&status, "max_rx_channel_rate", (int32_t) res.data.info.max_rx_channel_rate);
+	if (res.data.info.data_service_capability >= 0 && res.data.info.data_service_capability < ARRAY_SIZE(service_cap))
+		blobmsg_add_string(&status, "data_service", service_cap[res.data.info.data_service_capability]);
+
+	if(res.data.info.sim_capability == QMI_DMS_SIM_CAPABILITY_NOT_SUPPORTED)
+		blobmsg_add_string(&status, "sim", "not supported");
+	else if(res.data.info.sim_capability == QMI_DMS_SIM_CAPABILITY_SUPPORTED)
+		blobmsg_add_string(&status, "sim", "supported");
+
+	networks = blobmsg_open_array(&status, "networks");
+	for (i = 0; i < res.data.info.radio_interface_list_n; i++) {
+		if (res.data.info.radio_interface_list[i] >= 0 && res.data.info.radio_interface_list[i] < ARRAY_SIZE(radio_cap))
+			blobmsg_add_string(&status, NULL, radio_cap[res.data.info.radio_interface_list[i]]);
+		else
+			blobmsg_add_string(&status, NULL, "unknown");
+	}
+	blobmsg_close_array(&status, networks);
+
+	blobmsg_close_table(&status, t);
+}
+
+static enum qmi_cmd_result
+cmd_dms_get_capabilities_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+	qmi_set_dms_get_capabilities_request(msg);
+	return QMI_CMD_REQUEST;
+}
+
 static const char *get_pin_status(int status)
 {
 	static const char *pin_status[] = {
diff --git a/commands-dms.h b/commands-dms.h
index 925aea3..a370425 100644
--- a/commands-dms.h
+++ b/commands-dms.h
@@ -1,4 +1,5 @@
 #define __uqmi_dms_commands												\
+	__uqmi_command(dms_get_capabilities, get-capabilities, no, QMI_SERVICE_DMS), \
 	__uqmi_command(dms_get_pin_status, get-pin-status, no, QMI_SERVICE_DMS), \
 	__uqmi_command(dms_verify_pin1, verify-pin1, required, QMI_SERVICE_DMS), \
 	__uqmi_command(dms_verify_pin2, verify-pin2, required, QMI_SERVICE_DMS), \
@@ -18,6 +19,7 @@
 	__uqmi_command(dms_reset, reset-dms, no, QMI_SERVICE_DMS) \
 
 #define dms_helptext \
+		"  --get-capabilities:               List device capabilities\n" \
 		"  --get-pin-status:                 Get PIN verification status\n" \
 		"  --verify-pin1 <pin>:              Verify PIN1\n" \
 		"  --verify-pin2 <pin>:              Verify PIN2\n" \
-- 
1.9.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From s.demeszko at wireless-instruments.com  Thu Jan  8 09:15:40 2015
From: s.demeszko at wireless-instruments.com (=?UTF-8?q?S=C5=82awomir=20Demeszko?=)
Date: Thu,  8 Jan 2015 15:15:40 +0100
Subject: [OpenWrt-Devel] [PATCH uqmi] Add missing option for getting tdma
	signal strength
Message-ID: <1420726540-25626-1-git-send-email-s.demeszko@wireless-instruments.com>

Signed-off-by: S?awomir Demeszko <s.demeszko at wireless-instruments.com>
---
 commands-nas.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/commands-nas.c b/commands-nas.c
index be06ee4..831e3f4 100644
--- a/commands-nas.c
+++ b/commands-nas.c
@@ -152,6 +152,11 @@ cmd_nas_get_signal_info_cb(struct qmi_dev *qmi, struct qmi_request *req, struct
 		blobmsg_add_u32(&status, "snr", (int32_t) res.data.lte_signal_strength.snr);
 	}
 
+	if (res.set.tdma_signal_strength) {
+		blobmsg_add_string(&status, "type", "tdma");
+		blobmsg_add_u32(&status, "signal", (int32_t) res.data.tdma_signal_strength);
+	}
+
 	blobmsg_close_table(&status, c);
 }
 
-- 
1.9.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From nbd at openwrt.org  Thu Jan  8 09:38:05 2015
From: nbd at openwrt.org (Felix Fietkau)
Date: Thu, 08 Jan 2015 15:38:05 +0100
Subject: [OpenWrt-Devel] [PATCH uqmi] Add command for listing device
	capabilities
In-Reply-To: <1420725309-23172-1-git-send-email-s.demeszko@wireless-instruments.com>
References: <1420725309-23172-1-git-send-email-s.demeszko@wireless-instruments.com>
Message-ID: <54AE964D.8060506@openwrt.org>

On 2015-01-08 14:55, S?awomir Demeszko wrote:
> Signed-off-by: S?awomir Demeszko <s.demeszko at wireless-instruments.com>
> ---
>  commands-dms.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
>  commands-dms.h |  2 ++
>  2 files changed, 55 insertions(+)
> 
> diff --git a/commands-dms.c b/commands-dms.c
> index a677052..fcb4b93 100644
> --- a/commands-dms.c
> +++ b/commands-dms.c
> @@ -7,6 +7,59 @@ static struct {
>  	char* puk;
>  } dms_req_data;
>  
> +static void cmd_dms_get_capabilities_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
> +{
> +	void *t, *networks;
> +	int i;
> +	struct qmi_dms_get_capabilities_response res;
> +	const char *radio_cap[] = {
> +		[QMI_DMS_RADIO_INTERFACE_CDMA20001X] = "cdma1x",
> +		[QMI_DMS_RADIO_INTERFACE_EVDO] = "cdma1xevdo",
> +		[QMI_DMS_RADIO_INTERFACE_GSM] = "gsm",
> +		[QMI_DMS_RADIO_INTERFACE_UMTS] = "umts",
> +		[QMI_DMS_RADIO_INTERFACE_LTE] = "lte",
> +	};
> +	const char *service_cap[] = {
> +		[QMI_DMS_DATA_SERVICE_CAPABILITY_NONE] = "none",
> +		[QMI_DMS_DATA_SERVICE_CAPABILITY_CS] = "cs",
> +		[QMI_DMS_DATA_SERVICE_CAPABILITY_PS] = "ps",
> +		[QMI_DMS_DATA_SERVICE_CAPABILITY_SIMULTANEOUS_CS_PS] = "simultaneous_cs_ps",
> +		[QMI_DMS_DATA_SERVICE_CAPABILITY_NON_SIMULTANEOUS_CS_PS] = "non_simultaneous_cs_ps",
> +	};
> +
> +	qmi_parse_dms_get_capabilities_response(msg, &res);
> +
> +	t = blobmsg_open_table(&status, NULL);
> +
> +	blobmsg_add_u32(&status, "max_tx_channel_rate", (int32_t) res.data.info.max_tx_channel_rate);
> +	blobmsg_add_u32(&status, "max_rx_channel_rate", (int32_t) res.data.info.max_rx_channel_rate);
> +	if (res.data.info.data_service_capability >= 0 && res.data.info.data_service_capability < ARRAY_SIZE(service_cap))
> +		blobmsg_add_string(&status, "data_service", service_cap[res.data.info.data_service_capability]);
This causes the following warning on my system:

In file included from /Users/nbd/uqmi/commands.c:139:
/Users/nbd/uqmi/commands-dms.c:36:44: error: comparison of unsigned enum expression >= 0 is always true [-Werror,-Wtautological-compare]
        if (res.data.info.data_service_capability >= 0 && res.data.info.data_service_capability < ARRAY_SIZE(service_cap))
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~
/Users/nbd/uqmi/commands-dms.c:46:45: error: comparison of unsigned enum expression >= 0 is always true [-Werror,-Wtautological-compare]
                if (res.data.info.radio_interface_list[i] >= 0 && res.data.info.radio_interface_list[i] < ARRAY_SIZE(radio_cap))
                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~

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

From nbd at openwrt.org  Thu Jan  8 09:38:23 2015
From: nbd at openwrt.org (Felix Fietkau)
Date: Thu, 08 Jan 2015 15:38:23 +0100
Subject: [OpenWrt-Devel] [PATCH uqmi] Add missing option for getting
	tdma signal strength
In-Reply-To: <1420726540-25626-1-git-send-email-s.demeszko@wireless-instruments.com>
References: <1420726540-25626-1-git-send-email-s.demeszko@wireless-instruments.com>
Message-ID: <54AE965F.90303@openwrt.org>

On 2015-01-08 15:15, S?awomir Demeszko wrote:
> Signed-off-by: S?awomir Demeszko <s.demeszko at wireless-instruments.com>
Applied, thanks.

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

From larsg at systemli.org  Thu Jan  8 10:34:23 2015
From: larsg at systemli.org (Lars)
Date: Thu, 08 Jan 2015 16:34:23 +0100
Subject: [OpenWrt-Devel] [PATCH] [package] openvpn: procd_set_param respawn
Message-ID: <54AEA37F.4020703@systemli.org>

From 0c442b23127f58cf4c8c0b96ca67c0335ef86da9 Mon Sep 17 00:00:00 2001
From: Lars Gierth <larsg at systemli.org>
Date: Thu, 8 Jan 2015 16:05:10 +0100
Subject: [PATCH] [package] openvpn: procd_set_param respawn

Makes sure that the openvpn instance gets restarted in case of a crash.

Intentional stops using /etc/init.d/openvpn stop will not result in
respawning. Anything else will, e.g. killall openvpn.

Signed-off-by: Lars Gierth <larsg at systemli.org>
---
 package/network/services/openvpn/files/openvpn.init | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/network/services/openvpn/files/openvpn.init
b/package/network/services/openvpn/files/openvpn.init
index 9822f1e..1e0f384 100644
--- a/package/network/services/openvpn/files/openvpn.init
+++ b/package/network/services/openvpn/files/openvpn.init
@@ -62,6 +62,7 @@ openvpn_add_instance() {
 		--cd "$dir" \
 		--config "$conf"
 	procd_set_param file "$dir/$conf"
+	procd_set_param respawn
 	procd_close_instance
 }

-- 
2.1.0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0x7E86809F.asc
Type: application/pgp-keys
Size: 7893 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150108/c756be6a/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150108/c756be6a/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From a.seppala at gmail.com  Thu Jan  8 11:08:19 2015
From: a.seppala at gmail.com (=?UTF-8?q?Antti=20Sepp=C3=A4l=C3=A4?=)
Date: Thu,  8 Jan 2015 18:08:19 +0200
Subject: [OpenWrt-Devel] [PATCH] igmpproxy: add patch to silence unnecessary
	logging of downstream igmp traffic
Message-ID: <1420733299-18005-1-git-send-email-a.seppala@gmail.com>

This patch adds a simple check to silence logging of messages about
unrecognized igmp packets which originate from devices in local network.

Without this patch igmpproxy floods openwrt syslog with messages such as:
  user.warn igmpproxy[19818]: The source address 192.168.1.175 for group
  239.255.250.250, is not in any valid net for upstream VIF.

Signed-off-by: Antti Sepp?l? <a.seppala at gmail.com>
---
 ...0-Silence-downstream-interface-igmp-messages.patch | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 package/network/services/igmpproxy/patches/020-Silence-downstream-interface-igmp-messages.patch

diff --git a/package/network/services/igmpproxy/patches/020-Silence-downstream-interface-igmp-messages.patch b/package/network/services/igmpproxy/patches/020-Silence-downstream-interface-igmp-messages.patch
new file mode 100644
index 0000000..ccd000c
--- /dev/null
+++ b/package/network/services/igmpproxy/patches/020-Silence-downstream-interface-igmp-messages.patch
@@ -0,0 +1,19 @@
+--- a/src/igmp.c
++++ b/src/igmp.c
+@@ -139,8 +139,14 @@
+                 return;
+             }
+             else if(!isAdressValidForIf(checkVIF, src)) {
+-                my_log(LOG_WARNING, 0, "The source address %s for group %s, is not in any valid net for upstream VIF.",
+-                    inetFmt(src, s1), inetFmt(dst, s2));
++                struct IfDesc *downVIF = getIfByAddress(src);
++                if (downVIF && downVIF->state & IF_STATE_DOWNSTREAM) {
++                    my_log(LOG_NOTICE, 0, "The source address %s for group %s is from downstream VIF. Ignoring.",
++                        inetFmt(src, s1), inetFmt(dst, s2));
++                } else {
++                    my_log(LOG_WARNING, 0, "The source address %s for group %s, is not in any valid net for upstream VIF.",
++                        inetFmt(src, s1), inetFmt(dst, s2));
++                }
+                 return;
+             }
+             
-- 
2.0.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From fhfrediani at gmail.com  Thu Jan  8 11:36:40 2015
From: fhfrediani at gmail.com (Fernando Frediani)
Date: Thu, 08 Jan 2015 14:36:40 -0200
Subject: [OpenWrt-Devel] WRT1900AC - Available firmwares ?
Message-ID: <54AEB218.9020903@gmail.com>

Hi all,

Does anyone here have a Linksys WRT1900AC (that fiasco that suppose to 
be the new generation of WRT54G) ?

I got one a while ago and have been following the firmware development 
for it directly with Belkin people and on the URL - 
https://github.com/wrt1900ac/opensource/tree/master/Barrier-Breaker but 
that showed to be a total failure as they completely abandoned the 
project (GitHub latest update is 6 months old and they don' reply to 
emails anymore).

Many here might have seen all discussions around the subject during the 
initial phase of development especially regarding the open-source 
firmware of their wireless driver, which so far (as far as I know) 
is/was still a binary.

I have been however looking into the OpenWRT Snapshot and can see the 
"mvebu" folder with similar files than Linksys GitHub - 
http://downloads.openwrt.org/snapshots/trunk/mvebu/
Plus with the information on the wiki - 
http://wiki.openwrt.org/toh/linksys/wrt1900ac that the wireless driver 
has been finally released and the issue 'seems' to be resolved I guess.

Can anyone confirm this one downloaded from OpenWRT works for WRT1900AC 
compared to any of the 3 mentioned on the wiki ?

Thanks
Regards,

Fernando
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From n.mavrogiannopoulos at gmail.com  Thu Jan  8 11:43:05 2015
From: n.mavrogiannopoulos at gmail.com (Nikos Mavrogiannopoulos)
Date: Thu, 8 Jan 2015 17:43:05 +0100
Subject: [OpenWrt-Devel] netifd + split dns servers
Message-ID: <CAJU7zaKkujphDiP-aMQQoY-RAr56GO0N4k4auWgNTvbaGM6tew@mail.gmail.com>

Currently a protocol can register a dns server with netifd using the
proto_add_dns_server function. That however, does not allow
registering a DNS server for a specific domain. I checked the netifd
code and there is no provision for that. Would it make sense to add
such functionality to netifd, or should I make openconnect directly
register its split-dns servers with dnsmasq?

regards,
Nikos
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From s.demeszko at wireless-instruments.com  Thu Jan  8 13:08:30 2015
From: s.demeszko at wireless-instruments.com (=?UTF-8?q?S=C5=82awomir=20Demeszko?=)
Date: Thu,  8 Jan 2015 19:08:30 +0100
Subject: [OpenWrt-Devel] [PATCH v2 uqmi] Add command for listing device
	capabilities
In-Reply-To: <54AE964D.8060506@openwrt.org>
References: <1420725309-23172-1-git-send-email-s.demeszko@wireless-instruments.com>
 <54AE964D.8060506@openwrt.org>
Message-ID: <1420740510-22287-1-git-send-email-s.demeszko@wireless-instruments.com>

Signed-off-by: S?awomir Demeszko <s.demeszko at wireless-instruments.com>
---

Sorry, it seems my compiler doesn't suport -Wtautological-compare option,
and I was not warned about this. This condition could be removed, but
as I read it is unspecified if enums are signed or unsigned, it depends
on compiler, so I cast it to signed for comparison. I can't test it,
but should get rid of the warning.

 commands-dms.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 commands-dms.h |  2 ++
 2 files changed, 55 insertions(+)

diff --git a/commands-dms.c b/commands-dms.c
index a677052..563b6d9 100644
--- a/commands-dms.c
+++ b/commands-dms.c
@@ -7,6 +7,59 @@ static struct {
 	char* puk;
 } dms_req_data;
 
+static void cmd_dms_get_capabilities_cb(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg)
+{
+	void *t, *networks;
+	int i;
+	struct qmi_dms_get_capabilities_response res;
+	const char *radio_cap[] = {
+		[QMI_DMS_RADIO_INTERFACE_CDMA20001X] = "cdma1x",
+		[QMI_DMS_RADIO_INTERFACE_EVDO] = "cdma1xevdo",
+		[QMI_DMS_RADIO_INTERFACE_GSM] = "gsm",
+		[QMI_DMS_RADIO_INTERFACE_UMTS] = "umts",
+		[QMI_DMS_RADIO_INTERFACE_LTE] = "lte",
+	};
+	const char *service_cap[] = {
+		[QMI_DMS_DATA_SERVICE_CAPABILITY_NONE] = "none",
+		[QMI_DMS_DATA_SERVICE_CAPABILITY_CS] = "cs",
+		[QMI_DMS_DATA_SERVICE_CAPABILITY_PS] = "ps",
+		[QMI_DMS_DATA_SERVICE_CAPABILITY_SIMULTANEOUS_CS_PS] = "simultaneous_cs_ps",
+		[QMI_DMS_DATA_SERVICE_CAPABILITY_NON_SIMULTANEOUS_CS_PS] = "non_simultaneous_cs_ps",
+	};
+
+	qmi_parse_dms_get_capabilities_response(msg, &res);
+
+	t = blobmsg_open_table(&status, NULL);
+
+	blobmsg_add_u32(&status, "max_tx_channel_rate", (int32_t) res.data.info.max_tx_channel_rate);
+	blobmsg_add_u32(&status, "max_rx_channel_rate", (int32_t) res.data.info.max_rx_channel_rate);
+	if ((int)res.data.info.data_service_capability >= 0 && res.data.info.data_service_capability < ARRAY_SIZE(service_cap))
+		blobmsg_add_string(&status, "data_service", service_cap[res.data.info.data_service_capability]);
+
+	if(res.data.info.sim_capability == QMI_DMS_SIM_CAPABILITY_NOT_SUPPORTED)
+		blobmsg_add_string(&status, "sim", "not supported");
+	else if(res.data.info.sim_capability == QMI_DMS_SIM_CAPABILITY_SUPPORTED)
+		blobmsg_add_string(&status, "sim", "supported");
+
+	networks = blobmsg_open_array(&status, "networks");
+	for (i = 0; i < res.data.info.radio_interface_list_n; i++) {
+		if ((int)res.data.info.radio_interface_list[i] >= 0 && res.data.info.radio_interface_list[i] < ARRAY_SIZE(radio_cap))
+			blobmsg_add_string(&status, NULL, radio_cap[res.data.info.radio_interface_list[i]]);
+		else
+			blobmsg_add_string(&status, NULL, "unknown");
+	}
+	blobmsg_close_array(&status, networks);
+
+	blobmsg_close_table(&status, t);
+}
+
+static enum qmi_cmd_result
+cmd_dms_get_capabilities_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+	qmi_set_dms_get_capabilities_request(msg);
+	return QMI_CMD_REQUEST;
+}
+
 static const char *get_pin_status(int status)
 {
 	static const char *pin_status[] = {
diff --git a/commands-dms.h b/commands-dms.h
index 925aea3..a370425 100644
--- a/commands-dms.h
+++ b/commands-dms.h
@@ -1,4 +1,5 @@
 #define __uqmi_dms_commands												\
+	__uqmi_command(dms_get_capabilities, get-capabilities, no, QMI_SERVICE_DMS), \
 	__uqmi_command(dms_get_pin_status, get-pin-status, no, QMI_SERVICE_DMS), \
 	__uqmi_command(dms_verify_pin1, verify-pin1, required, QMI_SERVICE_DMS), \
 	__uqmi_command(dms_verify_pin2, verify-pin2, required, QMI_SERVICE_DMS), \
@@ -18,6 +19,7 @@
 	__uqmi_command(dms_reset, reset-dms, no, QMI_SERVICE_DMS) \
 
 #define dms_helptext \
+		"  --get-capabilities:               List device capabilities\n" \
 		"  --get-pin-status:                 Get PIN verification status\n" \
 		"  --verify-pin1 <pin>:              Verify PIN1\n" \
 		"  --verify-pin2 <pin>:              Verify PIN2\n" \
-- 
1.9.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From kaloz at openwrt.org  Thu Jan  8 13:59:35 2015
From: kaloz at openwrt.org (Imre Kaloz)
Date: Thu, 08 Jan 2015 19:59:35 +0100
Subject: [OpenWrt-Devel] WRT1900AC - Available firmwares ?
In-Reply-To: <54AEB218.9020903@gmail.com>
References: <54AEB218.9020903@gmail.com>
Message-ID: <op.xr5q1lp92s3iss@ecaz>

Hi,

On Thu, 08 Jan 2015 17:36:40 +0100, Fernando Frediani <fhfrediani at gmail.com> wrote:

> Hi all,
>
> Does anyone here have a Linksys WRT1900AC (that fiasco that suppose to
> be the new generation of WRT54G) ?
>
> I got one a while ago and have been following the firmware development
> for it directly with Belkin people and on the URL -
> https://github.com/wrt1900ac/opensource/tree/master/Barrier-Breaker but
> that showed to be a total failure as they completely abandoned the
> project (GitHub latest update is 6 months old and they don' reply to
> emails anymore).
>
> Many here might have seen all discussions around the subject during the
> initial phase of development especially regarding the open-source
> firmware of their wireless driver, which so far (as far as I know)
> is/was still a binary.

OpenWrt support the Mamba for over 7 months now, but we didn't have a wireless driver. Marvell released an open source driver for that chipset to this list just before Christmas.

> I have been however looking into the OpenWRT Snapshot and can see the
> "mvebu" folder with similar files than Linksys GitHub -
> http://downloads.openwrt.org/snapshots/trunk/mvebu/
> Plus with the information on the wiki -
> http://wiki.openwrt.org/toh/linksys/wrt1900ac that the wireless driver
> has been finally released and the issue 'seems' to be resolved I guess.
>
> Can anyone confirm this one downloaded from OpenWRT works for WRT1900AC
> compared to any of the 3 mentioned on the wiki ?

Anyone can edit the wiki so don't take anything there written in stone. Trunk works on it, but with any new driver, you can run into issues.


Imre
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From fhfrediani at gmail.com  Thu Jan  8 14:10:28 2015
From: fhfrediani at gmail.com (Fernando Frediani)
Date: Thu, 08 Jan 2015 17:10:28 -0200
Subject: [OpenWrt-Devel] WRT1900AC - Available firmwares ?
In-Reply-To: <op.xr5q1lp92s3iss@ecaz>
References: <54AEB218.9020903@gmail.com> <op.xr5q1lp92s3iss@ecaz>
Message-ID: <54AED624.1090803@gmail.com>

Thanks Imre,

I have just upgraded it with your firmware. Works fine so far for most 
of things. Actually some stuff is better than before.

I will proceed with more tests, specially the ones I had been doing and 
reported back to Belkin a while ago to make sure they are gone.

Is there any GitHub or anywhere to report the findings to ?

Thanks
Regards,

Fernando

On 08/01/2015 16:59, Imre Kaloz wrote:
> Hi,
>
> On Thu, 08 Jan 2015 17:36:40 +0100, Fernando Frediani 
> <fhfrediani at gmail.com> wrote:
>
>> Hi all,
>>
>> Does anyone here have a Linksys WRT1900AC (that fiasco that suppose to
>> be the new generation of WRT54G) ?
>>
>> I got one a while ago and have been following the firmware development
>> for it directly with Belkin people and on the URL -
>> https://github.com/wrt1900ac/opensource/tree/master/Barrier-Breaker but
>> that showed to be a total failure as they completely abandoned the
>> project (GitHub latest update is 6 months old and they don' reply to
>> emails anymore).
>>
>> Many here might have seen all discussions around the subject during the
>> initial phase of development especially regarding the open-source
>> firmware of their wireless driver, which so far (as far as I know)
>> is/was still a binary.
>
> OpenWrt support the Mamba for over 7 months now, but we didn't have a 
> wireless driver. Marvell released an open source driver for that 
> chipset to this list just before Christmas.
>
>> I have been however looking into the OpenWRT Snapshot and can see the
>> "mvebu" folder with similar files than Linksys GitHub -
>> http://downloads.openwrt.org/snapshots/trunk/mvebu/
>> Plus with the information on the wiki -
>> http://wiki.openwrt.org/toh/linksys/wrt1900ac that the wireless driver
>> has been finally released and the issue 'seems' to be resolved I guess.
>>
>> Can anyone confirm this one downloaded from OpenWRT works for WRT1900AC
>> compared to any of the 3 mentioned on the wiki ?
>
> Anyone can edit the wiki so don't take anything there written in 
> stone. Trunk works on it, but with any new driver, you can run into 
> issues.
>
>
> Imre
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From kaloz at openwrt.org  Thu Jan  8 14:22:13 2015
From: kaloz at openwrt.org (Imre Kaloz)
Date: Thu, 08 Jan 2015 20:22:13 +0100
Subject: [OpenWrt-Devel] WRT1900AC - Available firmwares ?
In-Reply-To: <54AED624.1090803@gmail.com>
References: <54AEB218.9020903@gmail.com> <op.xr5q1lp92s3iss@ecaz>
 <54AED624.1090803@gmail.com>
Message-ID: <op.xr5r3bu22s3iss@ecaz>

On Thu, 08 Jan 2015 20:10:28 +0100, Fernando Frediani <fhfrediani at gmail.com> wrote:

> I have just upgraded it with your firmware. Works fine so far for most
> of things. Actually some stuff is better than before.

Glad to hear that :)

> I will proceed with more tests, specially the ones I had been doing and
> reported back to Belkin a while ago to make sure they are gone.
>
> Is there any GitHub or anywhere to report the findings to ?

If it's related to core stuff, the OpenWrt bug tracker is the way to go, if the wifi driver, creating a ticket on github.com/kaloz/mwlwifi is what you're looking for.


Imre
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From blogic at openwrt.org  Thu Jan  8 15:30:07 2015
From: blogic at openwrt.org (John Crispin)
Date: Thu, 08 Jan 2015 21:30:07 +0100
Subject: [OpenWrt-Devel] [PATCH] Comgt: Add option to ignore ioctl errors
In-Reply-To: <1419872045-16704-1-git-send-email-malaakso@elisanet.fi>
References: <1419872045-16704-1-git-send-email-malaakso@elisanet.fi>
Message-ID: <54AEE8CF.7060403@openwrt.org>



On 29/12/2014 17:54, Matti Laakso wrote:
> Some Huawei mobile broadband sticks utilizing the NCM protocol expose
> the control channel as a cdc-wdm device node instead of a virtual serial
> port. This device node does not support the serial port ioctls. Add command
> line option to not check whether ioctls are successful so that AT commands
> can also be sent to these devices.
> 

can you instead of calling the ioctl and then ignoring the error change
it to not call the ioctls if the device is not a tty ?



> Signed-off-by: Matti Laakso <malaakso at elisanet.fi>
> ---
>  .../utils/comgt/patches/004-add_force_option.patch | 66 ++++++++++++++++++++++
>  1 file changed, 66 insertions(+)
>  create mode 100644 package/network/utils/comgt/patches/004-add_force_option.patch
> 
> diff --git a/package/network/utils/comgt/patches/004-add_force_option.patch b/package/network/utils/comgt/patches/004-add_force_option.patch
> new file mode 100644
> index 0000000..1690e5c
> --- /dev/null
> +++ b/package/network/utils/comgt/patches/004-add_force_option.patch
> @@ -0,0 +1,66 @@
> +--- a/comgt.c
> ++++ b/comgt.c
> +@@ -91,6 +91,7 @@ unsigned long hstart,hset;
> + char NullString[]={ "" };
> + BOOL lastcharnl=1; /* Indicate that last char printed from getonebyte
> +                                was a nl, so no new one is needed */
> ++BOOL force=0;
> + 
> + 
> + //"open com \"/dev/modem\"\nset com 38400n81\nset senddelay 0.05\nsend \"ATi^m\"\nget 2 \" ^m\" $s\nprint \"Response : \",$s,\"\\n\"\nget 2 \" ^m\" $s\nprint \"Response :\",$s,\"\\n\"\nget 2 \" ^m\" $s\nprint \"Response : \",$s,\"\\n\"\n\n";
> +@@ -920,7 +921,7 @@ BOOL getonoroff(void) {
> + void setcom(void) {
> +   stbuf.c_cflag &= ~(CBAUD | CSIZE | CSTOPB | CLOCAL | PARENB);
> +   stbuf.c_cflag |= (speed | bits | CREAD | clocal | parity | stopbits );
> +-  if (ioctl(comfd, TCSETA, &stbuf) < 0) {
> ++  if (ioctl(comfd, TCSETA, &stbuf) < 0 && !force) {
> +     serror("Can't ioctl set device",1);
> +   }
> + }
> +@@ -1224,7 +1225,7 @@ void doclose(void) {
> +   if(strcmp(token,"hardcom")==0) {
> +     if(comfd== -1) serror("Com device not open",1);
> +     vmsg("Closing device");
> +-    if (ioctl(comfd, TCSETA, &svbuf) < 0) {
> ++    if (ioctl(comfd, TCSETA, &svbuf) < 0 && !force) {
> +       sprintf(msg,"Can't ioctl set device %s.\n",device);
> +       serror(msg,1);
> +     }
> +@@ -1266,7 +1267,7 @@ void opengt(void) {
> +       ext(1);
> +     }
> +   }
> +-  if (ioctl (comfd, TCGETA, &svbuf) < 0) {
> ++  if (ioctl (comfd, TCGETA, &svbuf) < 0 && !force) {
> +     sprintf(msg,"Can't control %s, please try again.\n",device);
> +     serror(msg,1);
> +   }
> +@@ -1303,7 +1304,7 @@ void opendevice(void) {
> +   }
> +   else comfd=0;
> + 
> +-  if (ioctl (comfd, TCGETA, &svbuf) < 0) {
> ++  if (ioctl (comfd, TCGETA, &svbuf) < 0 && !force) {
> +     sprintf(msg,"Can't ioctl get device %s.\n",device);
> +     serror(msg,1);
> +   }
> +@@ -1567,7 +1568,7 @@ int main(int argc,char **argv) {
> +   for(a=0;a<strlen(argv[0]);a++) {
> +     if(argv[0][a]=='/') b=a+1;
> +   }
> +-  while((aa=getopt(argc,argv,"xheVvd:t:sb:"))!= -1) {
> ++  while((aa=getopt(argc,argv,"xheVvd:t:sb:f"))!= -1) {
> +     switch(aa) {
> +       case 0:
> +         ext(0);
> +@@ -1605,6 +1606,10 @@ int main(int argc,char **argv) {
> +         printf("High speed overide (115200 is now 57600).\n");
> +         high_speed =1;
> +         break;
> ++      case 'f':
> ++        force=1;
> ++        vmsg("Ignoring ioctl errors");
> ++        break;
> +       default:
> +         ext(1);
> +     }
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From blogic at openwrt.org  Thu Jan  8 15:30:56 2015
From: blogic at openwrt.org (John Crispin)
Date: Thu, 08 Jan 2015 21:30:56 +0100
Subject: [OpenWrt-Devel] [PATCH 1/3] [Lantiq] [P2812HNUFX] Remove old dts
In-Reply-To: <20141227113206.00002f05@gmail.com>
References: <20141227113206.00002f05@gmail.com>
Message-ID: <54AEE900.9090100@openwrt.org>


On 27/12/2014 11:32, Sylwester Petela wrote:
> Remove unused P2812HNUFX board definition.
> 
> Signed-off-by: Sylwester Petela <sscapi at gmail.com>
> ---

please change the patch to
* make use of 1 dtsi file and 2 dts files
* after applying your patch 1/3 the tree will not build. please remove
old file at the end of the series




> 
> --- a/target/linux/lantiq/dts/P2812HNUFX.dts
> +++ /dev/null
> @@ -1,308 +0,0 @@
> -/dts-v1/;
> -
> -/include/ "vr9.dtsi"
> -
> -/ {
> -	model = "P2812HNUFX - ZyXEL P-2812HNU-Fx";
> -	
> -	chosen {
> -		/*bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";*/
> -	};
> -
> -	memory at 0 {
> -		reg = <0x0 0x8000000>;
> -	};
> -	
> -	fpi at 10000000 {
> -		#address-cells = <1>;
> -		#size-cells = <1>;
> -		compatible = "lantiq,fpi", "simple-bus";
> -		ranges = <0x0 0x10000000 0xEEFFFFF>;
> -		reg = <0x10000000 0xEF00000>;
> -
> -		localbus at 0 {
> -			#address-cells = <2>;
> -			#size-cells = <1>;
> -			compatible = "lantiq,localbus", "simple-bus";
> -
> -			nand-parts at 0 {
> -				compatible = "gen_nand", "lantiq,nand-xway";
> -				lantiq,cs = <1>;
> -				bank-width = <2>;
> -				reg = <0 0x0 0x2000000>;
> -				#address-cells = <1>;
> -				#size-cells = <1>;
> -
> -				partition at 0 {
> -					label = "u-boot";
> -					reg = <0x00000 0x40000>;
> -				};
> -
> -				partition at 40000 {
> -					label = "u-boot environment";
> -					reg = <0x40000 0x20000>;
> -				};
> -
> -				partition at 60000 {
> -					label = "root";
> -					reg = <0x60000 0x7fa0000>;
> -				};
> -			};
> -		};
> -
> -		gpio: pinmux at E100B10 {
> -			compatible = "lantiq,pinctrl-xr9";
> -			pinctrl-names = "default";
> -			pinctrl-0 = <&state_default>;
> -			
> -			interrupt-parent = <&icu0>;
> -			interrupts = <166 135 66 40 41 42 38>;
> -
> -			#gpio-cells = <2>;
> -			gpio-controller;
> -			reg = <0xE100B10 0xA0>;
> -
> -			state_default: pinmux {
> -				mdio {
> -					lantiq,groups = "mdio";
> -					lantiq,function = "mdio";
> -				};
> -				gphy-leds {
> -					lantiq,groups = "gphy0 led1", "gphy1 led1",
> -							"gphy0 led2", "gphy1 led2";
> -					lantiq,function = "gphy";
> -					lantiq,pull = <2>;
> -					lantiq,open-drain = <0>;
> -					lantiq,output = <1>;
> -				};
> -				stp {
> -					lantiq,groups = "stp";
> -					lantiq,function = "stp";
> -					lantiq,pull = <2>;
> -					lantiq,open-drain = <0>;
> -					lantiq,output = <1>;
> -				};
> -				pci {
> -					lantiq,groups = "gnt1", "req1";
> -					lantiq,function = "pci";
> -				};
> -				pci-rst {
> -					lantiq,pins = "io21";
> -					lantiq,pull = <0>;
> -					lantiq,open-drain = <0>;
> -					lantiq,output = <1>;
> -				};
> -				ifxhcd-rst {
> -					lantiq,pins = "io33";
> -					lantiq,pull = <0>;
> -					lantiq,open-drain = <0>;
> -					lantiq,output = <1>;
> -				};
> -				nand {
> -					lantiq,groups = "nand cle", "nand ale",
> -							"nand rd", "nand cs1", "nand rdy";
> -					lantiq,function = "ebu";
> -					lantiq,pull = <1>;
> -				};
> -			};
> -		};
> -
> -		eth at E108000 {
> -			#address-cells = <1>;
> -			#size-cells = <0>;
> -			compatible = "lantiq,xrx200-net";
> -			reg = <	0xE108000 0x3000 /* switch */
> -				0xE10B100 0x70 /* mdio */
> -				0xE10B1D8 0x30 /* mii */
> -				0xE10B308 0x30 /* pmac */
> -			>;
> -			interrupt-parent = <&icu0>;
> -			interrupts = <73 72>;
> -
> -			lan: interface at 0 {
> -				compatible = "lantiq,xrx200-pdi";
> -				#address-cells = <1>;
> -				#size-cells = <0>;
> -				reg = <0>;
> -				mac-address = [ 00 11 22 33 44 55 ];
> -				lantiq,switch;
> -
> -				ethernet at 0 {
> -					compatible = "lantiq,xrx200-pdi-port";
> -					reg = <0>;
> -					phy-mode = "rgmii";
> -					phy-handle = <&phy0>;
> -				};
> -				ethernet at 1 {
> -					compatible = "lantiq,xrx200-pdi-port";
> -					reg = <1>;
> -					phy-mode = "rgmii";
> -					phy-handle = <&phy1>;
> -				};
> -				ethernet at 2 {
> -					compatible = "lantiq,xrx200-pdi-port";
> -					reg = <2>;
> -					phy-mode = "gmii";
> -					phy-handle = <&phy11>;
> -				};
> -				ethernet at 4 {
> -					compatible = "lantiq,xrx200-pdi-port";
> -					reg = <4>;
> -					phy-mode = "gmii";
> -					phy-handle = <&phy13>;
> -				};
> -				ethernet at 5 {
> -					compatible = "lantiq,xrx200-pdi-port";
> -					reg = <5>;
> -					phy-mode = "rgmii";
> -					phy-handle = <&phy5>;
> -				};
> -			};
> -
> -			mdio at 0 {
> -				#address-cells = <1>;
> -				#size-cells = <0>;
> -				compatible = "lantiq,xrx200-mdio";
> -				phy0: ethernet-phy at 0 {
> -					reg = <0x0>;
> -					compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
> -				};
> -				phy1: ethernet-phy at 1 {
> -					reg = <0x1>;
> -					compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
> -				};
> -				phy5: ethernet-phy at 5 {
> -					reg = <0x5>;
> -					compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
> -				};
> -				phy11: ethernet-phy at 11 {
> -					reg = <0x11>;
> -					compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
> -				};
> -				phy13: ethernet-phy at 13 {
> -					reg = <0x13>;
> -					compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
> -				};
> -			};
> -		};
> -
> -		stp: stp at E100BB0 {
> -			compatible = "lantiq,gpio-stp-xway";
> -			reg = <0xE100BB0 0x40>;
> -			#gpio-cells = <2>;
> -			gpio-controller;
> -
> -			lantiq,shadow = <0xffffff>;
> -			lantiq,groups = <0x7>;
> -			/*
> -			lantiq,dsl = <0x3>;
> -			lantiq,phy1 = <0x7>;
> -			lantiq,phy2 = <0x7>;
> -			*/
> -		};
> -
> -		ifxhcd at E101000 {
> -			status = "okay";
> -			gpios = <&gpio 33 0>;
> -			lantiq,portmask = <0x3>;
> -		};
> -
> -		pci at E105400 {
> -			lantiq,bus-clock = <33333333>;
> -			/* lantiq,external-clock; */
> -			lantiq,delay-hi = <0>; /* 0ns delay */
> -			lantiq,delay-lo = <0>; /* 0.0ns delay */
> -			interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
> -			interrupt-map = <
> -				0x7000 0 0 1 &icu0 29 //1 // slot 14, irq 29
> -				>;
> -			gpio-reset = <&gpio 21 0>;
> -			req-mask = <0x1>;	/* GNT1 */
> -			status = "okay";
> -		};
> -	};
> -
> -	gphy-xrx200 {
> -		compatible = "lantiq,phy-xrx200";
> -		firmware = "lantiq/vr9_phy11g_a1x.bin";
> -		phys = [ 00 01 ];
> -	};
> -
> -	gpio-keys-polled {
> -		compatible = "gpio-keys-polled";
> -		#address-cells = <1>;
> -		#size-cells = <0>;
> -		poll-interval = <100>;
> -		reset {
> -			label = "reset";
> -			gpios = <&gpio 39 1>;
> -			linux,code = <0x198>;
> -		};
> -		rfkill {
> -			label = "rfkill";
> -			gpios = <&gpio 1 1>;
> -			linux,code = <0xf7>;
> -		};
> -	};
> -
> -	gpio-leds {
> -		compatible = "gpio-leds";
> -
> -		internet2 {
> -			label = "internet2";
> -			gpios = <&stp 16 1>;
> -		};
> -		internet {
> -			label = "internet";
> -			gpios = <&stp 17 1>;
> -		};
> -		dsl {
> -			label = "dsl";
> -			gpios = <&stp 18 1>;
> -		};
> -		dsl2 {
> -			label = "dsl2";
> -			gpios = <&stp 19 1>;
> -		};
> -		wifi2 {
> -			label = "wifi2";
> -			gpios = <&stp 20 1>;
> -		};
> -		wlan {
> -			label = "wifi";
> -			gpios = <&stp 21 1>;
> -		};
> -		power2 {
> -			label = "power2";
> -			gpios = <&stp 22 1>;
> -		};
> -		power {
> -			label = "power";
> -			gpios = <&stp 23 1>;
> -		};
> -		usb1 {
> -			label = "usb";
> -			gpios = <&gpio 38 1>;
> -		};
> -		usb2 {
> -			label = "usb2";
> -			gpios = <&gpio 44 1>;
> -		};
> -		phone1 {
> -			label = "phone1";
> -			gpios = <&gpio 11 1>;
> -		};
> -		phone1warn {
> -			label = "phone1warn";
> -			gpios = <&gpio 12 1>;
> -		};
> -		phone2 {
> -			label = "phone2";
> -			gpios = <&gpio 28 1>;
> -		};
> -		phone2warn {
> -			label = "phone2warn";
> -			gpios = <&gpio 26 1>;
> -		};
> -	};
> -};
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From osk at exegin.com  Thu Jan  8 15:50:09 2015
From: osk at exegin.com (Owen Kirby)
Date: Thu, 08 Jan 2015 12:50:09 -0800
Subject: [OpenWrt-Devel] procd/inittab with a delayed console
Message-ID: <54AEED81.4090901@exegin.com>

Hi,

I'm not sure if this is a bug with procd's implementation of inittab or 
if I'm just doing something wrong in my inittab. However, we have a 
board that has multiple serial console ports, one of which relies on a 
kernel module and procd refuses to start a console on the second port. 
What seems to be happening is that procd loads inittab before the kernel 
modules are loaded, therefore the tty device doesn't exist yet and the 
check for dev_exist() fails and procd never forks a worker for that console.

I was able to fix it for my board with the following patch, but I'm not 
sure if this is would be the entire fix for the problem since it seems 
like fork_worker() should be a little more graceful in handling tty 
devices that don't exist yet.

Any thoughts or suggestions on better ways to fix this?

Thanks,
Owen

diff --git a/inittab.c b/inittab.c
index 2efbf4d..7b12e10 100644
--- a/inittab.c
+++ b/inittab.c
@@ -161,7 +161,7 @@ static void askfirst(struct init_action *a)
  {
         int i;

-       if (!dev_exist(a->id) || (console && !strcmp(console, a->id))) {
+       if (console && !strcmp(console, a->id)) {
                 DEBUG(4, "Skipping %s\n", a->id);
                 return;
         }
--
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From coroner at pfeifferszilard.hu  Thu Jan  8 17:28:07 2015
From: coroner at pfeifferszilard.hu (=?UTF-8?B?U3ppbMOhcmQgUGZlaWZmZXI=?=)
Date: Thu, 08 Jan 2015 23:28:07 +0100
Subject: [OpenWrt-Devel] Install .pc files of Python
Message-ID: <54AF0477.1020304@pfeifferszilard.hu>

Hi,

.pc files are not copied to the install directory, so python (as a
library) cannot be checked from configure.ac by PKG_CHECK_MODULES. It
caused problem during the port of Zorp GPL to OpenWrt. Possible solution
is attached.

Best regards,
Szil?rd Pfeiffer

From raven at themaw.net  Fri Jan  9 02:06:29 2015
From: raven at themaw.net (Ian Kent)
Date: Fri, 09 Jan 2015 15:06:29 +0800
Subject: [OpenWrt-Devel] WRT1900AC - Available firmwares ?
In-Reply-To: <54AEB218.9020903@gmail.com>
References: <54AEB218.9020903@gmail.com>
Message-ID: <1420787189.2813.9.camel@pluto.fritz.box>

On Thu, 2015-01-08 at 14:36 -0200, Fernando Frediani wrote:
> Hi all,
> 
> Does anyone here have a Linksys WRT1900AC (that fiasco that suppose to 
> be the new generation of WRT54G) ?

Yes and I like it.

As Imre Kaloz says Marvel recently released updated driver source.

It seems to me the major hold up was the development approach used in
the beginning. I think it cost quite a bit of time on what was
essentially a false start.

Now Marvel have chosen to update (pretty much re-wrote) the driver with
the goal of having it accepted into the upstream kernel.

It arrears to have much less code than the original and what looks to me
like ugly hacks to other core OpenWrt subsystems to make the old driver
work are no longer needed so the maintenance burden should be much less
for all concerned.

Over all very good news.

Ian
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From openwrt at vittgam.net  Fri Jan  9 03:16:24 2015
From: openwrt at vittgam.net (Vittorio G (VittGam))
Date: Fri, 09 Jan 2015 09:16:24 +0100
Subject: [OpenWrt-Devel] [PATCH] ramips: HooToo HT-TM02 factory image
 generation.
In-Reply-To: <owrt-patches-20141227-1@vittgam.net>
References: <owrt-patches-20141227-1@vittgam.net>
Message-ID: <eb026eb570e91bbc5dad50703d21f9c3@vittgam.net>

Hi,

What is the reason has this been rejected? Do I need to change 
something?

Thanks,
Vittorio

Il 28.12.2014 13:34 Vittorio G (VittGam) ha scritto:
> The mkhootoofw.sh is a shell script, because official factory images
> are shell scripts by themselves, and it made more sense to me to just
> use a shell script on the build host to put the pieces for the 
> factory
> image file together, rather than reimplement the wheel in C.
>
> The hootoo_mtd_writer is a stripped-down and modified version of mtd
> that includes support for flashing at an offset in the MTD. This is
> needed for the HooToo, because the only usable partition for factory
> flashing is the one labeled "ALL", and we don't want to flash the
> u-boot, u-boot-env and factory partitions too...
>
> The hootoo_mtd_writer binary has been compiled using the toolchain
> contained in the GPL tarball provided by HooToo. (It seems to me from
> some tests that this is the only way to get executables running on 
> the
> stock kernel...)
>
> In order to update the firmware from the web interface you need to
> put a FAT-formatted pendrive in the router USB port, since the
> original firmware needs this as temporary storage, because the RAM is
> quite bloated. Then you upload the OpenWrt factory image generated by
> mkhootoofw.sh, and the script kills unneeded services and partitions
> to free up RAM, backs up the original firmware on the pendrive,
> extracts the hootoo_mtd_writer and the sysupgrade image, flashes the
> sysupgrade image and then reboots.
>
> I've tested the resulting image on the factory firmware, and it
> successfully installed OpenWrt on my HT-TM02.
>
> Signed-off-by: Vittorio Gambaletta <openwrt at vittgam.net>
>
> --- a/target/linux/ramips/image/Makefile
> +++ b/target/linux/ramips/image/Makefile
> @@ -317,6 +317,15 @@
>  	fi
>  endef
>
> +# Build HooToo factory images
> +define BuildFirmware/HooToo8M/squashfs
> +	$(call BuildFirmware/Default8M/$(1),$(1),$(2),$(3))
> +	[ -e "$(call sysupname,$(1),$(2))" ] && \
> +	$(SCRIPT_DIR)/download.pl "$(DL_DIR)" "hootoo_mtd_writer"
> "3d72349cbb1d8e96086a084a6940304d"
> "https://github.com/VittGam/hootoo_mtd_writer/releases/download/1.0/"
> && \
> +	mkhootoofw.sh "$(DL_DIR)/hootoo_mtd_writer" "$(call
> sysupname,$(1),$(2))" "$(call imgname,$(1),$(2))-factory.bin"
> +endef
> +BuildFirmware/HooToo8M/initramfs=$(call
> BuildFirmware/OF/initramfs,$(1),$(2),$(3))
> +
>  #
>  # RT288X Profiles
>  #
> @@ -480,7 +489,7 @@
>  endef
>  Image/Build/Profile/HLKRM04=$(call
> BuildFirmware/HLKRM04/$(1),$(1),hlk-rm04,HLKRM04,HLK-RM02)
>
> -Image/Build/Profile/HT-TM02=$(call
> BuildFirmware/Default8M/$(1),$(1),ht-tm02,HT-TM02)
> +Image/Build/Profile/HT-TM02=$(call
> BuildFirmware/HooToo8M/$(1),$(1),ht-tm02,HT-TM02)
>
>  Image/Build/Profile/M3=$(call BuildFirmware/Poray4M/$(1),$(1),m3,M3)
>
> --- a/tools/firmware-utils/Makefile
> +++ b/tools/firmware-utils/Makefile
> @@ -76,6 +76,7 @@
>
>  define Host/Install
>  	$(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/* $(STAGING_DIR_HOST)/bin/
> +	$(INSTALL_BIN) src/mkhootoofw.sh $(STAGING_DIR_HOST)/bin/
>  endef
>
>  $(eval $(call HostBuild))
> --- /dev/null
> +++ b/tools/firmware-utils/src/mkhootoofw.sh
> @@ -0,0 +1,88 @@
> +#!/bin/sh
> +#
> +# HooToo Factory Firmware Generator for OpenWrt
> +# Copyright (C) 2014 Vittorio Gambaletta <openwrt at vittgam.net>
> +#
> +# This is free software, licensed under the GNU General Public 
> License v2.
> +# See /LICENSE for more information.
> +#
> +# Sources for the hootoo_mtd_writer utility, which must be compiled
> with the GPL
> +# toolchain provided by HooToo for it to work on the factory kernel, 
> can be
> +# found at: https://github.com/VittGam/hootoo_mtd_writer
> +#
> +# Usage: mkhootoofw.sh path-to-hootoo_mtd_writer
> path-to-openwrt-sysupgrade.bin path-to-openwrt-factory.bin
> +#
> +
> +# Write the shellscript stub
> +cat > "${3}.tmp" <<'EOF'
> +SKIP=57
> +
> +echo "Checking firmware checksum..."
> +[ "$CRCSUM" != "`sed '1,3d' "$0" | cksum | sed -e 's/ /Z/' -e 's/
> /Z/' | cut -dZ -f1`" ] && {
> +	echo "Firmware checksum error!"
> +	exit 1
> +}
> +echo "Firmware checksum OK"
> +
> +echo "Killing unneeded services..."
> +killall -9 fileserv ioos upnpd led_control owndns ownhttp vstddns
> udhcpc udhcpd udevd minidlna smbd nmbd
> +sleep 1
> +
> +echo "Unmounting unneeded mounts..."
> +umount /etc
> +umount /boot/tmp
> +umount /usr/local/samba/var
> +umount /opt
> +umount /var
> +
> +echo "Backing up original firmware..."
> +BKPDIRBASE="/data/UsbDisk1/Volume1/OpenWrt-HooToo-Backup-`sed
> 's/:/-/g' < /sys/class/net/ra0/address`-"
> +BKPDIRNUM=1
> +BKPDIR="${BKPDIRBASE}${BKPDIRNUM}"
> +while [ -e "$BKPDIR" ]; do
> +	BKPDIRNUM=$((${BKPDIRNUM}+1))
> +	BKPDIR="${BKPDIRBASE}${BKPDIRNUM}"
> +done
> +echo "Backup directory: ${BKPDIR}"
> +
> +mkdir "$BKPDIR"
> +cp /dev/mtdblock* "${BKPDIR}/" || {
> +	echo "Backup failed!"
> +	exit 1
> +}
> +sync && echo 3 > /proc/sys/vm/drop_caches
> +echo "Backup OK"
> +
> +echo "Extracting OpenWrt firmware..."
> +tail -n +$SKIP "$0" | tar xv -C /tmp/ || {
> +	echo "Extraction of firmware failed!"
> +	exit 1
> +}
> +chmod +x /tmp/hootoo_mtd_writer
> +sync && echo 3 > /proc/sys/vm/drop_caches
> +
> +echo "Writing OpenWrt firmware..."
> +cd /tmp/
> +/tmp/hootoo_mtd_writer /tmp/openwrt.bin ALL 327680 1
> +
> +echo "Upgrade not successful (reboot by hootoo_mtd_writer not 
> happened)..."
> +exit 1
> +END_OF_STUB
> +EOF
> +
> +# Create and append tar archive containing hootoo_mtd_writer and
> sysupgrade image to the factory image file
> +mkdir "${3}-tmpdir"
> +cp "$1" "${3}-tmpdir/hootoo_mtd_writer"
> +cp "$2" "${3}-tmpdir/openwrt.bin"
> +tar cv -C "${3}-tmpdir/" hootoo_mtd_writer openwrt.bin >> "${3}.tmp"
> +rm -rf "${3}-tmpdir"
> +
> +# Generate the final factory image file along with the checksum
> +echo '#!/bin/sh' > "$3"
> +echo '# OpenWrt factory installation for HooToo HT-TM02' >> "$3"
> +echo -n 'CRCSUM=' >> "$3"
> +cksum < "${3}.tmp" | sed -e 's/ /Z/' -e 's/   /Z/' | cut -dZ -f1 >> 
> "$3"
> +cat "${3}.tmp" >> "$3"
> +rm "${3}.tmp"
> +
> +exit 0
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From openwrt at vittgam.net  Fri Jan  9 03:36:32 2015
From: openwrt at vittgam.net (Vittorio G (VittGam))
Date: Fri, 9 Jan 2015 09:36:32 +0100
Subject: [OpenWrt-Devel] [PATCH] [RESEND] [v2] base-files: Use 200ms LED
	timing as before for the new phase preinit_regular.
Message-ID: <owrt-patches-20141225-2-resend@vittgam.net>

This restores normal pre-r43715 200ms blink-period for the System LED we're all accustomed to see while our OpenWrt routers are booting.

Failsafe possibility will now be signalled with a new 100ms blinking, which is easily recognizable from the normal 200ms booting.

So no existing user will be scared by a new 500ms LED pattern, since such a slow pattern could easily be mistaken for something wrong... I was like "ok why my router is collapsing now, is this a bad flash, a kernel panic, or what else" when I've seen it for the first time ;)

Sorry for not having explained myself better in v1 of this patch.

Original:
Preinit, failsafe is possible: 200ms
Preinit, failsafe not possible anymore, booting normally: 200ms
Failsafe entered: 50ms

Now (after preinit_regular has been introduced):
Preinit, failsafe is possible: 200ms
Preinit, failsafe not possible anymore, booting normally: 500ms *here is the "offending" change*
Failsafe entered: 50ms

With my proposed patch:
Preinit, failsafe is possible: 100ms *indicate this condition with a new timing, that prompts the user to press the key if they want to start failsafe*
Preinit, failsafe not possible anymore, booting normally: 200ms *keep this as before*
Failsafe entered: 50ms

Signed-off-by: Vittorio Gambaletta <openwrt at vittgam.net>

diff --git a/package/base-files/files/lib/functions/leds.sh b/package/base-files/files/lib/functions/leds.sh
index 4ac8145..d4d4512 100644
--- a/package/base-files/files/lib/functions/leds.sh
+++ b/package/base-files/files/lib/functions/leds.sh
@@ -60,7 +60,7 @@ status_led_blink_fast() {
 }
 
 status_led_blink_preinit() {
-	led_timer $status_led 200 200
+	led_timer $status_led 100 100
 }
 
 status_led_blink_failsafe() {
@@ -68,5 +68,5 @@ status_led_blink_failsafe() {
 }
 
 status_led_blink_preinit_regular() {
-	led_timer $status_led 500 500
+	led_timer $status_led 200 200
 }
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From openwrt at vittgam.net  Fri Jan  9 03:42:41 2015
From: openwrt at vittgam.net (Vittorio G (VittGam))
Date: Fri, 09 Jan 2015 09:42:41 +0100
Subject: [OpenWrt-Devel] Strange LED behavior on ramips
In-Reply-To: <owrt-mail-20141225-1@vittgam.net>
References: <owrt-mail-20141225-1@vittgam.net>
Message-ID: <d9369f95acbc1cc2ce22765d3239ae9e@vittgam.net>

Hi everybody,

Is nobody else experiencing this on their ramips/rt5350-based router?

Cheers,
Vittorio G

Il 25.12.2014 02:55 Vittorio G (VittGam) ha scritto:
> Hi everybody,
>
> I've got some HooToo HT-TM02 rt5350-based routers, and I've noticed a
> quite weird thing with LEDs.
>
> It seems that the LED handling gets halted for ~100ms every second.
>
> I'm linking to a video to explain this behavior. Here I've set the
> timer trigger for the blue LED to 50ms of delay_on/delay_off (like
> when in failsafe):
>
> https://server2.vittgam.net/openwrt-hootoo.mp4
>
> The halting happens even with other delay times, even on the other
> green LED, and it is also noticeable when using other triggers, like
> netdev.
>
> I think the issue is with the rt5350 LED and/or GPIO driver, so does
> this happen to other ramips routers as well?
>
> Cheers, and Happy Xmas
> Vittorio G
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From dedeckeh at gmail.com  Fri Jan  9 03:48:59 2015
From: dedeckeh at gmail.com (Hans Dedecker)
Date: Fri, 9 Jan 2015 09:48:59 +0100
Subject: [OpenWrt-Devel] netifd + split dns servers
In-Reply-To: <CAJU7zaKkujphDiP-aMQQoY-RAr56GO0N4k4auWgNTvbaGM6tew@mail.gmail.com>
References: <CAJU7zaKkujphDiP-aMQQoY-RAr56GO0N4k4auWgNTvbaGM6tew@mail.gmail.com>
Message-ID: <CAJLcKsHPfBmsK4-3qyvoOcjDokr4xvG-ZtzJDf=gam75aCTn1Q@mail.gmail.com>

On Thu, Jan 8, 2015 at 5:43 PM, Nikos Mavrogiannopoulos
<n.mavrogiannopoulos at gmail.com> wrote:
> Currently a protocol can register a dns server with netifd using the
> proto_add_dns_server function. That however, does not allow
> registering a DNS server for a specific domain. I checked the netifd
> code and there is no provision for that. Would it make sense to add
> such functionality to netifd, or should I make openconnect directly
> register its split-dns servers with dnsmasq?
>
> regards,
> Nikos
Netifd writes the dns servers in /tmp/resolv.conf.auto which are read
by dnsmasq.
However I don't see a way to pass DNS servers for a specific domain
via the resolv.conf.auto file to dnsmasq unless changes are done in
dnsmasq.
If such functionality needs to be supported; the changes will not only
be limited to netifd.
And netifd rewriting dnsmasq.conf seems a bit hacky too me

Br,
Hans
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From n.mavrogiannopoulos at gmail.com  Fri Jan  9 04:40:56 2015
From: n.mavrogiannopoulos at gmail.com (Nikos Mavrogiannopoulos)
Date: Fri, 9 Jan 2015 10:40:56 +0100
Subject: [OpenWrt-Devel] netifd + split dns servers
In-Reply-To: <CAJLcKsHPfBmsK4-3qyvoOcjDokr4xvG-ZtzJDf=gam75aCTn1Q@mail.gmail.com>
References: <CAJU7zaKkujphDiP-aMQQoY-RAr56GO0N4k4auWgNTvbaGM6tew@mail.gmail.com>
 <CAJLcKsHPfBmsK4-3qyvoOcjDokr4xvG-ZtzJDf=gam75aCTn1Q@mail.gmail.com>
Message-ID: <CAJU7zaL=Xsx3J34jV9QOfG1rCHi27m40PW8NTd3uxb4vuMtpDA@mail.gmail.com>

On Fri, Jan 9, 2015 at 9:48 AM, Hans Dedecker <dedeckeh at gmail.com> wrote:
> On Thu, Jan 8, 2015 at 5:43 PM, Nikos Mavrogiannopoulos
> <n.mavrogiannopoulos at gmail.com> wrote:
>> Currently a protocol can register a dns server with netifd using the
>> proto_add_dns_server function. That however, does not allow
>> registering a DNS server for a specific domain. I checked the netifd
>> code and there is no provision for that. Would it make sense to add
>> such functionality to netifd, or should I make openconnect directly
>> register its split-dns servers with dnsmasq?
> Netifd writes the dns servers in /tmp/resolv.conf.auto which are read
> by dnsmasq.
> However I don't see a way to pass DNS servers for a specific domain
> via the resolv.conf.auto file to dnsmasq unless changes are done in
> dnsmasq.
> If such functionality needs to be supported; the changes will not only
> be limited to netifd.
> And netifd rewriting dnsmasq.conf seems a bit hacky too me

The resolv.conf format is very limited, if you rely on it you can only register
global dns servers, and that's all. With dnsmasq, to support split-dns you need
to configure a config directory for dnsmasq, and then place files in
it that contain
with the following format:
server=/domain/address.ip

regards,
Nikos
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From blogic at openwrt.org  Fri Jan  9 04:48:27 2015
From: blogic at openwrt.org (John Crispin)
Date: Fri, 09 Jan 2015 10:48:27 +0100
Subject: [OpenWrt-Devel] [PATCH] ramips: HooToo HT-TM02 factory image
 generation.
In-Reply-To: <eb026eb570e91bbc5dad50703d21f9c3@vittgam.net>
References: <owrt-patches-20141227-1@vittgam.net>
 <eb026eb570e91bbc5dad50703d21f9c3@vittgam.net>
Message-ID: <54AFA3EB.1000007@openwrt.org>



On 09/01/2015 09:16, Vittorio G (VittGam) wrote:
> Hi,
> 
> What is the reason has this been rejected? Do I need to change
> something?
> 
> Thanks, Vittorio
> 
> Il 28.12.2014 13:34 Vittorio G (VittGam) ha scritto:
>> The mkhootoofw.sh is a shell script, because official factory
>> images are shell scripts by themselves, and it made more sense to
>> me to just use a shell script on the build host to put the pieces
>> for the factory image file together, rather than reimplement the
>> wheel in C.
>> 
>> The hootoo_mtd_writer is a stripped-down and modified version of
>> mtd that includes support for flashing at an offset in the MTD.
>> This is needed for the HooToo, because the only usable partition
>> for factory flashing is the one labeled "ALL", and we don't want
>> to flash the u-boot, u-boot-env and factory partitions too...
>> 
>> The hootoo_mtd_writer binary has been compiled using the
>> toolchain contained in the GPL tarball provided by HooToo. (It
>> seems to me from some tests that this is the only way to get
>> executables running on the stock kernel...)
>> 
>> In order to update the firmware from the web interface you need
>> to put a FAT-formatted pendrive in the router USB port, since
>> the original firmware needs this as temporary storage, because
>> the RAM is quite bloated. Then you upload the OpenWrt factory
>> image generated by mkhootoofw.sh, and the script kills unneeded
>> services and partitions to free up RAM, backs up the original
>> firmware on the pendrive, extracts the hootoo_mtd_writer and the
>> sysupgrade image, flashes the sysupgrade image and then reboots.
>> 
>> I've tested the resulting image on the factory firmware, and it 
>> successfully installed OpenWrt on my HT-TM02.
>> 
>> Signed-off-by: Vittorio Gambaletta <openwrt at vittgam.net>
>> 
>> --- a/target/linux/ramips/image/Makefile +++
>> b/target/linux/ramips/image/Makefile @@ -317,6 +317,15 @@ fi 
>> endef
>> 
>> +# Build HooToo factory images +define
>> BuildFirmware/HooToo8M/squashfs +    $(call
>> BuildFirmware/Default8M/$(1),$(1),$(2),$(3)) +    [ -e "$(call
>> sysupname,$(1),$(2))" ] && \ +    $(SCRIPT_DIR)/download.pl
>> "$(DL_DIR)" "hootoo_mtd_writer" 
>> "3d72349cbb1d8e96086a084a6940304d" 
>> "https://github.com/VittGam/hootoo_mtd_writer/releases/download/1.0/"
>>
>> 
&& \
>> +    mkhootoofw.sh "$(DL_DIR)/hootoo_mtd_writer" "$(call 
>> sysupname,$(1),$(2))" "$(call imgname,$(1),$(2))-factory.bin" 
>> +endef +BuildFirmware/HooToo8M/initramfs=$(call 
>> BuildFirmware/OF/initramfs,$(1),$(2),$(3)) +


this bit is really bad. you cannot install a binary from a random
source and use that to flash the unit. the tool needs to be compiled
during the build process


>> # # RT288X Profiles # @@ -480,7 +489,7 @@ endef 
>> Image/Build/Profile/HLKRM04=$(call 
>> BuildFirmware/HLKRM04/$(1),$(1),hlk-rm04,HLKRM04,HLK-RM02)
>> 
>> -Image/Build/Profile/HT-TM02=$(call 
>> BuildFirmware/Default8M/$(1),$(1),ht-tm02,HT-TM02) 
>> +Image/Build/Profile/HT-TM02=$(call 
>> BuildFirmware/HooToo8M/$(1),$(1),ht-tm02,HT-TM02)
>> 
>> Image/Build/Profile/M3=$(call
>> BuildFirmware/Poray4M/$(1),$(1),m3,M3)
>> 
>> --- a/tools/firmware-utils/Makefile +++
>> b/tools/firmware-utils/Makefile @@ -76,6 +76,7 @@
>> 
>> define Host/Install $(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/*
>> $(STAGING_DIR_HOST)/bin/ +    $(INSTALL_BIN) src/mkhootoofw.sh
>> $(STAGING_DIR_HOST)/bin/ endef
>> 
>> $(eval $(call HostBuild)) --- /dev/null +++
>> b/tools/firmware-utils/src/mkhootoofw.sh @@ -0,0 +1,88 @@ 
>> +#!/bin/sh +# +# HooToo Factory Firmware Generator for OpenWrt +#
>> Copyright (C) 2014 Vittorio Gambaletta <openwrt at vittgam.net> +# 
>> +# This is free software, licensed under the GNU General Public 
>> License v2. +# See /LICENSE for more information. +# +# Sources
>> for the hootoo_mtd_writer utility, which must be compiled with
>> the GPL +# toolchain provided by HooToo for it to work on the
>> factory kernel, can be +# found at:
>> https://github.com/VittGam/hootoo_mtd_writer +# +# Usage:
>> mkhootoofw.sh path-to-hootoo_mtd_writer 
>> path-to-openwrt-sysupgrade.bin path-to-openwrt-factory.bin +# + 
>> +# Write the shellscript stub +cat > "${3}.tmp" <<'EOF' +SKIP=57 
>> + +echo "Checking firmware checksum..." +[ "$CRCSUM" != "`sed
>> '1,3d' "$0" | cksum | sed -e 's/ /Z/' -e 's/ /Z/' | cut -dZ -f1`"
>> ] && { +    echo "Firmware checksum error!" +    exit 1 +} +echo
>> "Firmware checksum OK" + +echo "Killing unneeded services..." 
>> +killall -9 fileserv ioos upnpd led_control owndns ownhttp
>> vstddns udhcpc udhcpd udevd minidlna smbd nmbd +sleep 1 + +echo
>> "Unmounting unneeded mounts..." +umount /etc +umount /boot/tmp 
>> +umount /usr/local/samba/var +umount /opt +umount /var + +echo
>> "Backing up original firmware..." 
>> +BKPDIRBASE="/data/UsbDisk1/Volume1/OpenWrt-HooToo-Backup-`sed 
>> 's/:/-/g' < /sys/class/net/ra0/address`-" +BKPDIRNUM=1 
>> +BKPDIR="${BKPDIRBASE}${BKPDIRNUM}" +while [ -e "$BKPDIR" ]; do +
>> BKPDIRNUM=$((${BKPDIRNUM}+1)) +
>> BKPDIR="${BKPDIRBASE}${BKPDIRNUM}" +done +echo "Backup directory:
>> ${BKPDIR}" + +mkdir "$BKPDIR" +cp /dev/mtdblock* "${BKPDIR}/" ||
>> { +    echo "Backup failed!" +    exit 1 +} +sync && echo 3 >
>> /proc/sys/vm/drop_caches +echo "Backup OK" + +echo "Extracting
>> OpenWrt firmware..." +tail -n +$SKIP "$0" | tar xv -C /tmp/ || { 
>> +    echo "Extraction of firmware failed!" +    exit 1 +} +chmod
>> +x /tmp/hootoo_mtd_writer +sync && echo 3 >
>> /proc/sys/vm/drop_caches + +echo "Writing OpenWrt firmware..." 
>> +cd /tmp/ +/tmp/hootoo_mtd_writer /tmp/openwrt.bin ALL 327680 1 
>> + +echo "Upgrade not successful (reboot by hootoo_mtd_writer not 
>> happened)..." +exit 1 +END_OF_STUB +EOF + +# Create and append
>> tar archive containing hootoo_mtd_writer and sysupgrade image to
>> the factory image file +mkdir "${3}-tmpdir" +cp "$1"
>> "${3}-tmpdir/hootoo_mtd_writer" +cp "$2"
>> "${3}-tmpdir/openwrt.bin" +tar cv -C "${3}-tmpdir/"
>> hootoo_mtd_writer openwrt.bin >> "${3}.tmp" +rm -rf
>> "${3}-tmpdir" + +# Generate the final factory image file along
>> with the checksum +echo '#!/bin/sh' > "$3" +echo '# OpenWrt
>> factory installation for HooToo HT-TM02' >> "$3" +echo -n
>> 'CRCSUM=' >> "$3" +cksum < "${3}.tmp" | sed -e 's/ /Z/' -e 's/
>> /Z/' | cut -dZ -f1 >> "$3" +cat "${3}.tmp" >> "$3" +rm
>> "${3}.tmp" + +exit 0 
>> _______________________________________________ openwrt-devel
>> mailing list openwrt-devel at lists.openwrt.org 
>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> _______________________________________________ openwrt-devel
> mailing list openwrt-devel at lists.openwrt.org 
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From zajec5 at gmail.com  Fri Jan  9 04:51:38 2015
From: zajec5 at gmail.com (=?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?=)
Date: Fri, 9 Jan 2015 10:51:38 +0100
Subject: [OpenWrt-Devel] cmake.mk: ignores package CFLAGS
Message-ID: <CACna6rzEt+GTVXDw=_XoCdHH2iTdbiAQ+poSgY1Bc9B4UCJg1Q@mail.gmail.com>

If you look at include/cmake.mk you will notice followiing:
-DCMAKE_BUILD_TYPE=Release
It means that CMake uses CMAKE_C_FLAGS_RELEASE


I've created package and tested it using two variants:

1) TARGET_CFLAGS=-DFOO
This is what I got:
grep FOO build_dir/target-*/test/CMakeCache.txt
CMAKE_CXX_FLAGS:STRING='-DFOO  '
CMAKE_C_FLAGS:STRING='-DFOO  '
My app was compiled *without* FOO

2) CMAKE_OPTIONS=-DCMAKE_C_FLAGS_RELEASE="-DFOO"
This is what I got:
grep FOO build_dir/target-*/test/CMakeCache.txt
CMAKE_C_FLAGS_RELEASE:STRING=-DFOO
My app was compiled *with* FOO


I think there is a bug in cmake.mk. Since we use
-DCMAKE_BUILD_TYPE=Release
we can't really relay on
CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)"
because it will result in
CMAKE_C_FLAGS
instead of
CMAKE_C_FLAGS_RELEASE

-- 
Rafa?
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From nbd at openwrt.org  Fri Jan  9 05:21:18 2015
From: nbd at openwrt.org (Felix Fietkau)
Date: Fri, 09 Jan 2015 11:21:18 +0100
Subject: [OpenWrt-Devel] [PATCH v2 uqmi] Add command for listing device
	capabilities
In-Reply-To: <1420740510-22287-1-git-send-email-s.demeszko@wireless-instruments.com>
References: <1420725309-23172-1-git-send-email-s.demeszko@wireless-instruments.com>
 <54AE964D.8060506@openwrt.org>
 <1420740510-22287-1-git-send-email-s.demeszko@wireless-instruments.com>
Message-ID: <54AFAB9E.3040406@openwrt.org>

On 2015-01-08 19:08, S?awomir Demeszko wrote:
> Signed-off-by: S?awomir Demeszko <s.demeszko at wireless-instruments.com>
> ---
> 
> Sorry, it seems my compiler doesn't suport -Wtautological-compare option,
> and I was not warned about this. This condition could be removed, but
> as I read it is unspecified if enums are signed or unsigned, it depends
> on compiler, so I cast it to signed for comparison. I can't test it,
> but should get rid of the warning.
Applied, thanks.

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

From nbd at openwrt.org  Fri Jan  9 05:25:29 2015
From: nbd at openwrt.org (Felix Fietkau)
Date: Fri, 09 Jan 2015 11:25:29 +0100
Subject: [OpenWrt-Devel] Install .pc files of Python
In-Reply-To: <54AF0477.1020304@pfeifferszilard.hu>
References: <54AF0477.1020304@pfeifferszilard.hu>
Message-ID: <54AFAC99.1090508@openwrt.org>

On 2015-01-08 23:28, Szil?rd Pfeiffer wrote:
> Hi,
> 
> .pc files are not copied to the install directory, so python (as a
> library) cannot be checked from configure.ac by PKG_CHECK_MODULES. It
> caused problem during the port of Zorp GPL to OpenWrt. Possible solution
> is attached.
> 
> Best regards,
> Szil?rd Pfeiffer
Python is maintained on the packages GitHub repository:
https://github.com/openwrt/packages
You should submit an issue or pull request there.

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


From ardeleanalex at gmail.com  Fri Jan  9 05:30:54 2015
From: ardeleanalex at gmail.com (Alexandru Ardelean)
Date: Fri, 9 Jan 2015 12:30:54 +0200
Subject: [OpenWrt-Devel] Install .pc files of Python
In-Reply-To: <54AFAC99.1090508@openwrt.org>
References: <54AF0477.1020304@pfeifferszilard.hu>
 <54AFAC99.1090508@openwrt.org>
Message-ID: <CA+U=Dsp6uZi1-CtqYb9j+Cy7WtVSfi4u83kJuk-1TyPfG-7QCw@mail.gmail.com>

I've already picked up the patch and looking into.
Was going to come back with an answer, but I have some other stuff to look
into.

@Szil?rd: if you want, you can also do a PR on Github. If not, then I'll
apply your patch. Looks good to me.

On Fri, Jan 9, 2015 at 12:25 PM, Felix Fietkau <nbd at openwrt.org> wrote:

> On 2015-01-08 23:28, Szil?rd Pfeiffer wrote:
> > Hi,
> >
> > .pc files are not copied to the install directory, so python (as a
> > library) cannot be checked from configure.ac by PKG_CHECK_MODULES. It
> > caused problem during the port of Zorp GPL to OpenWrt. Possible solution
> > is attached.
> >
> > Best regards,
> > Szil?rd Pfeiffer
> Python is maintained on the packages GitHub repository:
> https://github.com/openwrt/packages
> You should submit an issue or pull request there.
>
> - Felix
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150109/f4aff4a9/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From edgar.soldin at web.de  Fri Jan  9 05:48:08 2015
From: edgar.soldin at web.de (edgar.soldin at web.de)
Date: Fri, 09 Jan 2015 11:48:08 +0100
Subject: [OpenWrt-Devel] [PATCH] [packages] dnsmasq: add option
	--quiet-dhcp
In-Reply-To: <20150107235020.160603a7@erker.lan>
References: <20141225014908.7ebf4d02@erker.lan> <54AA97F9.7060405@openwrt.org>
 <54AA9B11.6030806@openwrt.org> <20150107235020.160603a7@erker.lan>
Message-ID: <54AFB1E8.4010302@web.de>

On 07.01.2015 23:50, Lars Kruse wrote:
> 
> The --quiet-dhcp setting increases privacy by omitting DHCP lease logs
> including MAC addresses.
> 
> Signed-off-by: Lars Kruse <devel at sumpfralle.de>
> 
> --- a/package/network/services/dnsmasq/files/dnsmasq.init
> +++ b/package/network/services/dnsmasq/files/dnsmasq.init
> @@ -123,6 +123,7 @@ dnsmasq() {
>  	append_bool "$cfg" nonwildcard "--bind-interfaces"
>  	append_bool "$cfg" fqdn "--dhcp-fqdn"
>  	append_bool "$cfg" proxydnssec "--proxy-dnssec"
> +	append_bool "$cfg" quiet_dhcp "--quiet-dhcp"
>  
>  	append_parm "$cfg" dhcpscript "--dhcp-script"
>  	append_parm "$cfg" cachesize "--cache-size"

would make sense to use 'quietdhcp' instead of 'quiet_dhcp', as the other options seem to ommit the dashes too.

..ede
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From lists at sumpfralle.de  Fri Jan  9 06:14:10 2015
From: lists at sumpfralle.de (Lars Kruse)
Date: Fri, 9 Jan 2015 12:14:10 +0100
Subject: [OpenWrt-Devel] [PATCH] [packages] dnsmasq: add option
 --quiet-dhcp
In-Reply-To: <54AFB1E8.4010302@web.de>
References: <20141225014908.7ebf4d02@erker.lan> <54AA97F9.7060405@openwrt.org>
 <54AA9B11.6030806@openwrt.org> <20150107235020.160603a7@erker.lan>
 <54AFB1E8.4010302@web.de>
Message-ID: <20150109121410.5ab4f983@erker.lan>


The --quiet-dhcp setting increases privacy by omitting DHCP lease logs including MAC addresses.

Signed-off-by: Lars Kruse <devel at sumpfralle.de>

--- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -123,6 +123,7 @@ dnsmasq() {
 	append_bool "$cfg" nonwildcard "--bind-interfaces"
 	append_bool "$cfg" fqdn "--dhcp-fqdn"
 	append_bool "$cfg" proxydnssec "--proxy-dnssec"
+	append_bool "$cfg" quietdhcp "--quiet-dhcp"
 
 	append_parm "$cfg" dhcpscript "--dhcp-script"
 	append_parm "$cfg" cachesize "--cache-size"


--

> would make sense to use 'quietdhcp' instead of 'quiet_dhcp', as the other
> options seem to ommit the dashes too.

correct - I forgot Jow's previous comment ...

Lars
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From cyrus at openwrt.org  Fri Jan  9 06:25:13 2015
From: cyrus at openwrt.org (Steven Barth)
Date: Fri, 09 Jan 2015 12:25:13 +0100
Subject: [OpenWrt-Devel] netifd + split dns servers
In-Reply-To: <CAJU7zaL=Xsx3J34jV9QOfG1rCHi27m40PW8NTd3uxb4vuMtpDA@mail.gmail.com>
References: <CAJU7zaL=Xsx3J34jV9QOfG1rCHi27m40PW8NTd3uxb4vuMtpDA@mail.gmail.com>
Message-ID: <54AFBA99.9080709@openwrt.org>

Our dnsmasq init script registers /tmp/dnsmasq.d as an additional 
configuration dir, so you can place files there and restart it. However 
I'm not sure as to how much we want netifd to do dnsmasq-specific stuff 
or how we would do it.

Of course the bad thing here again is that dnsmasq doesn't support 
soft-reloading and every time you restart it you lose your dns cache 
etc. etc.

Cheers,

Steven
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From lists at sumpfralle.de  Fri Jan  9 06:26:59 2015
From: lists at sumpfralle.de (Lars Kruse)
Date: Fri, 9 Jan 2015 12:26:59 +0100
Subject: [OpenWrt-Devel] [PATCH] curl: enable "https" protocol
In-Reply-To: <20141227183227.7e045c6e@erker.lan>
References: <20141227183227.7e045c6e@erker.lan>
Message-ID: <20150109122659.271a38ce@erker.lan>

Provide optional --enable-https flag for curl.

Signed-off-by: Lars Kruse <devel at sumpfralle.de>

--- a/package/network/utils/curl/Config.in
+++ b/package/network/utils/curl/Config.in
@@ -53,6 +53,10 @@ config LIBCURL_HTTP
 	bool "Enable HTTP support"
 	default y
 
+config LIBCURL_HTTPS
+	bool "Enable HTTPS support"
+	default n
+
 config LIBCURL_IMAP
 	bool "Enable IMAP support"
 	default n
--- a/package/network/utils/curl/Makefile
+++ b/package/network/utils/curl/Makefile
@@ -37,6 +37,7 @@ PKG_CONFIG_DEPENDS := \
   LIBCURL_GNUTLS \
   LIBCURL_GOPHER \
   LIBCURL_HTTP \
+  LIBCURL_HTTPS \
   LIBCURL_IMAP \
   LIBCURL_LDAP \
   LIBCURL_LDAPS \
@@ -112,6 +113,7 @@ CONFIGURE_ARGS += \
 	$(if $(CONFIG_LIBCURL_GOPHER),--enable,--disable)-gopher \
 	$(if $(CONFIG_LIBCURL_GNUTLS),--with-gnutls="$(STAGING_DIR)/usr",--without-gnutls) \
 	$(if $(CONFIG_LIBCURL_HTTP),--enable,--disable)-http \
+	$(if $(CONFIG_LIBCURL_HTTPS),--enable,--disable)-https \
 	$(if $(CONFIG_LIBCURL_IMAP),--enable,--disable)-imap \
 	$(if $(CONFIG_LIBCURL_LDAP),--enable,--disable)-ldap \
 	$(if $(CONFIG_LIBCURL_LDAPS),--enable,--disable)-ldaps \

--

Sending again with correct formatting.
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From M.Stam at fugro.nl  Fri Jan  9 07:33:18 2015
From: M.Stam at fugro.nl (Stam, Michel [FINT])
Date: Fri, 9 Jan 2015 13:33:18 +0100
Subject: [OpenWrt-Devel] procd/inittab with a delayed console
In-Reply-To: <54AEED81.4090901@exegin.com>
References: <54AEED81.4090901@exegin.com>
Message-ID: <C89EFD3CD56F64468D3D206D683A8D2203B889D8@ldam-msx2.fugro-nl.local>

Hello Owen,

I was wondering, is the kernel driver for your console not placed in
/etc/modules-boot.d ?

/sbin/init executes procd, but prior to doing this executes kmodloader
to load all modules in /etc/modules-boot.d. If your module is mentioned
in this directory, this should load your console driver, thus making it
available before procd checks /etc/inittab.

This, to me, seems the most logical solution, as consoles should be
available to the init process early on during boot, and not hot-plugged
in afterwards. Do you agree?

To put modules in /etc/modules-boot.d, make sure that their
KernelPackage definition contains:
AUTOLOAD:=$(call AutoLoad,<NUM>,<MODULE>,1) 

Where <NUM> is the load order and <MODULE> is the name of your kernel
module (or modules). The presence of the ,1 argument indicates whether
the module is placed in /etc/modules-boot.d or /etc/modules.d.

Kind regards,

Michel Stam
Embedded System Engineer
-------------- next part --------------
An embedded message was scrubbed...
From: "Owen Kirby" <osk at exegin.com>
Subject: [OpenWrt-Devel] procd/inittab with a delayed console
Date: Thu, 8 Jan 2015 21:50:09 +0100
Size: 4099
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150109/e6945a8d/attachment.eml>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From n.mavrogiannopoulos at gmail.com  Fri Jan  9 08:58:31 2015
From: n.mavrogiannopoulos at gmail.com (Nikos Mavrogiannopoulos)
Date: Fri, 9 Jan 2015 14:58:31 +0100
Subject: [OpenWrt-Devel] netifd + split dns servers
In-Reply-To: <54AFBA99.9080709@openwrt.org>
References: <CAJU7zaL=Xsx3J34jV9QOfG1rCHi27m40PW8NTd3uxb4vuMtpDA@mail.gmail.com>
 <54AFBA99.9080709@openwrt.org>
Message-ID: <CAJU7zaK9z8ifvjyC4buO5YDdqCGXK_V_=8K2FazqCC12Jxab4A@mail.gmail.com>

On Fri, Jan 9, 2015 at 12:25 PM, Steven Barth <cyrus at openwrt.org> wrote:
> Our dnsmasq init script registers /tmp/dnsmasq.d as an additional
> configuration dir, so you can place files there and restart it. However I'm
> not sure as to how much we want netifd to do dnsmasq-specific stuff or how
> we would do it.

Well I think that depends on how common use case is to have a dns
server per domain. Currently I think I can handle that in openconnect
directly, but if any other vpn application would like to do that,
they'll have to duplicate that code.

> Of course the bad thing here again is that dnsmasq doesn't support
> soft-reloading and every time you restart it you lose your dns cache etc.
> etc.

Interestingly it supports the 'servers-file' option which would allow
re-loading the domain specific servers without a restart. But even in
that case the cache will be cleared.

regards,
Nikos
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From openwrt at vittgam.net  Fri Jan  9 10:09:13 2015
From: openwrt at vittgam.net (Vittorio G (VittGam))
Date: Fri, 09 Jan 2015 16:09:13 +0100
Subject: [OpenWrt-Devel] [PATCH] ramips: HooToo HT-TM02 factory image
 generation.
In-Reply-To: <54AFA3EB.1000007@openwrt.org>
References: <owrt-patches-20141227-1@vittgam.net>
 <eb026eb570e91bbc5dad50703d21f9c3@vittgam.net>
 <54AFA3EB.1000007@openwrt.org>
Message-ID: <ace1829e51bf498db74944ec109a1bd5@vittgam.net>

Il 09.01.2015 10:48 John Crispin ha scritto:
>>> +    mkhootoofw.sh "$(DL_DIR)/hootoo_mtd_writer" "$(call
>>> sysupname,$(1),$(2))" "$(call imgname,$(1),$(2))-factory.bin"
>>> +endef +BuildFirmware/HooToo8M/initramfs=$(call
>>> BuildFirmware/OF/initramfs,$(1),$(2),$(3)) +
>
>
> this bit is really bad. you cannot install a binary from a random
> source and use that to flash the unit. the tool needs to be compiled
> during the build process

Unfortunately the factory image uses an ancient version of uclibc, so 
binaries compiled with the newer version bundled with OpenWrt do not 
work on it... Anyway I've compiled that binary using the toolchain 
provided by HooToo, and the build is reproducible, so you or anybody 
else can easily verify that I'm not lying. :)

Please let me know if you have a better solution, because in fact this 
is not quite clean.

Cheers,
Vittorio
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From florian at openwrt.org  Fri Jan  9 10:17:36 2015
From: florian at openwrt.org (Florian Fainelli)
Date: Fri, 9 Jan 2015 07:17:36 -0800
Subject: [OpenWrt-Devel] [PATCH] ramips: HooToo HT-TM02 factory image
	generation.
In-Reply-To: <ace1829e51bf498db74944ec109a1bd5@vittgam.net>
References: <owrt-patches-20141227-1@vittgam.net>
 <eb026eb570e91bbc5dad50703d21f9c3@vittgam.net>
 <54AFA3EB.1000007@openwrt.org>
 <ace1829e51bf498db74944ec109a1bd5@vittgam.net>
Message-ID: <CAGVrzcY_KMX7e0PMjX-TAQQYzhoQ-m8y_B5PfC1Oz+NbqpgEjw@mail.gmail.com>

Le 9 janv. 2015 07:09, "Vittorio G (VittGam)" <openwrt at vittgam.net> a ?crit
:
>
> Il 09.01.2015 10:48 John Crispin ha scritto:
>
>>>> +    mkhootoofw.sh "$(DL_DIR)/hootoo_mtd_writer" "$(call
>>>> sysupname,$(1),$(2))" "$(call imgname,$(1),$(2))-factory.bin"
>>>> +endef +BuildFirmware/HooToo8M/initramfs=$(call
>>>> BuildFirmware/OF/initramfs,$(1),$(2),$(3)) +
>>
>>
>>
>> this bit is really bad. you cannot install a binary from a random
>> source and use that to flash the unit. the tool needs to be compiled
>> during the build process
>
>
> Unfortunately the factory image uses an ancient version of uclibc, so
binaries compiled with the newer version bundled with OpenWrt do not work
on it... Anyway I've compiled that binary using the toolchain provided by
HooToo, and the build is reproducible, so you or anybody else can easily
verify that I'm not lying. :)
>
> Please let me know if you have a better solution, because in fact this is
not quite clean.

What about a statically linked binary at least?

>
> Cheers,
> Vittorio
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150109/9b389c6f/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From formywillcancer at gmail.com  Fri Jan  9 10:59:44 2015
From: formywillcancer at gmail.com (zhang zhao)
Date: Fri, 9 Jan 2015 23:59:44 +0800
Subject: [OpenWrt-Devel] info about distance optimization
Message-ID: <CAEsEA0MJ5cmQ7tQxDNysnG+W=aJJQ2FLheGiAqid2uQ9Lx8xCA@mail.gmail.com>

I found there exist distance optimization entry in Luci's wifi configure
page. I think it's interesting and want to go further about it. Hardware
driver programming is not too difficult for me. Anyone have any idea where
should I start from?

Thinks~

-- 
Best Regards,

Zhao Zhang,
Undergraduate from
Dept. of Computer Science & Technology,
Ocean University of China,
Qingdao, China, 266100
Phone 18678430893
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150109/e15dc585/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From openwrt at geoco.de  Fri Jan  9 11:49:26 2015
From: openwrt at geoco.de (geotti)
Date: Fri, 9 Jan 2015 17:49:26 +0100
Subject: [OpenWrt-Devel] Port for Edimax BR-6435ND (RALink 3352F)
Message-ID: <CAFd+ktN0tBn+GGbe0fd_R7w4ib0JqUd=6AxPReh=nbhm1hSG3w@mail.gmail.com>

Hi,

as per https://dev.openwrt.org/wiki/SupportDonate [and subsequently
jow_laptop's comment on irc to write to openwrt-devel] I'm writing here to
offer one or two Edimax BR-6435ND as donation to get an openwrt build for
them.

Apparently the RAlink RT3352 already has seen some attention
(https://dev.openwrt.org/search?q=RT3352&noquickjump=1&changeset=on&ticket=on),
so my uneducated guess is that it should be relatively easy to get openwrt
running.

I've already collected some info about the router my posts here:
https://forum.openwrt.org/viewtopic.php?id=54627
and
https://wikidevi.com/wiki/Intellinet_300N_Wireless_Dual-Band_Router ,
to make it easier to assess the situation.


Thanks in advance,

geotti
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From leitec at staticky.com  Fri Jan  9 12:12:47 2015
From: leitec at staticky.com (Claudio Leite)
Date: Fri,  9 Jan 2015 12:12:47 -0500
Subject: [OpenWrt-Devel] [PATCH 1/4] mvsw6171: rename to 'mvsw61xx'
Message-ID: <1420823570-8706-1-git-send-email-leitec@staticky.com>

In preparation for properly supporting switches
beyond the 88E6171.

Signed-off-by: Claudio Leite <leitec at staticky.com>
---
 target/linux/generic/config-3.14                   |   2 +-
 target/linux/generic/config-3.18                   |   2 +-
 .../linux/generic/files/drivers/net/phy/mvsw6171.c | 866 ---------------------
 .../linux/generic/files/drivers/net/phy/mvsw6171.h | 230 ------
 .../linux/generic/files/drivers/net/phy/mvsw61xx.c | 866 +++++++++++++++++++++
 .../linux/generic/files/drivers/net/phy/mvsw61xx.h | 230 ++++++
 .../generic/patches-3.14/733-phy_mvsw6171.patch    |  23 -
 .../generic/patches-3.14/733-phy_mvsw61xx.patch    |  23 +
 .../generic/patches-3.18/733-phy_mvsw6171.patch    |  23 -
 .../generic/patches-3.18/733-phy_mvsw61xx.patch    |  23 +
 target/linux/kirkwood/config-3.14                  |   2 +-
 target/linux/kirkwood/config-3.18                  |   2 +-
 .../linux/kirkwood/patches-3.14/160-ea4500.patch   |   2 +-
 .../linux/kirkwood/patches-3.18/160-ea4500.patch   |   2 +-
 14 files changed, 1148 insertions(+), 1148 deletions(-)
 delete mode 100644 target/linux/generic/files/drivers/net/phy/mvsw6171.c
 delete mode 100644 target/linux/generic/files/drivers/net/phy/mvsw6171.h
 create mode 100644 target/linux/generic/files/drivers/net/phy/mvsw61xx.c
 create mode 100644 target/linux/generic/files/drivers/net/phy/mvsw61xx.h
 delete mode 100644 target/linux/generic/patches-3.14/733-phy_mvsw6171.patch
 create mode 100644 target/linux/generic/patches-3.14/733-phy_mvsw61xx.patch
 delete mode 100644 target/linux/generic/patches-3.18/733-phy_mvsw6171.patch
 create mode 100644 target/linux/generic/patches-3.18/733-phy_mvsw61xx.patch

diff --git a/target/linux/generic/config-3.14 b/target/linux/generic/config-3.14
index 7b6055a..d888954 100644
--- a/target/linux/generic/config-3.14
+++ b/target/linux/generic/config-3.14
@@ -2144,7 +2144,7 @@ CONFIG_MTD_SPLIT_SQUASHFS_ROOT=y
 # CONFIG_MUTEX_SPIN_ON_OWNER is not set
 # CONFIG_MV643XX_ETH is not set
 # CONFIG_MVMDIO is not set
-# CONFIG_MVSW6171_PHY is not set
+# CONFIG_MVSW61XX_PHY is not set
 # CONFIG_MVSWITCH_PHY is not set
 # CONFIG_MWAVE is not set
 # CONFIG_MWL8K is not set
diff --git a/target/linux/generic/config-3.18 b/target/linux/generic/config-3.18
index ce2ec5c..ab9d071 100644
--- a/target/linux/generic/config-3.18
+++ b/target/linux/generic/config-3.18
@@ -2244,7 +2244,7 @@ CONFIG_MTD_SPLIT_SQUASHFS_ROOT=y
 # CONFIG_MUTEX_SPIN_ON_OWNER is not set
 # CONFIG_MV643XX_ETH is not set
 # CONFIG_MVMDIO is not set
-# CONFIG_MVSW6171_PHY is not set
+# CONFIG_MVSW61XX_PHY is not set
 # CONFIG_MVSWITCH_PHY is not set
 # CONFIG_MWAVE is not set
 # CONFIG_MWL8K is not set
diff --git a/target/linux/generic/files/drivers/net/phy/mvsw6171.c b/target/linux/generic/files/drivers/net/phy/mvsw6171.c
deleted file mode 100644
index 48bb3fc..0000000
--- a/target/linux/generic/files/drivers/net/phy/mvsw6171.c
+++ /dev/null
@@ -1,866 +0,0 @@
-/*
- * Marvell 88E6171 switch driver
- *
- * Copyright (c) 2014 Claudio Leite <leitec at staticky.com>
- *
- * Based on code (c) 2008 Felix Fietkau <nbd at openwrt.org>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License v2 as published by the
- * Free Software Foundation
- */
-
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/init.h>
-#include <linux/list.h>
-#include <linux/mii.h>
-#include <linux/phy.h>
-#include <linux/of.h>
-#include <linux/of_mdio.h>
-#include <linux/delay.h>
-#include <linux/switch.h>
-#include <linux/device.h>
-#include <linux/platform_device.h>
-
-#include "mvsw6171.h"
-
-MODULE_DESCRIPTION("Marvell 88E6171 Switch driver");
-MODULE_AUTHOR("Claudio Leite <leitec at staticky.com>");
-MODULE_LICENSE("GPL v2");
-MODULE_ALIAS("platform:mvsw6171");
-
-/*
- * Register access is done through direct or indirect addressing,
- * depending on how the switch is physically connected.
- *
- * Direct addressing: all port and global registers directly
- *   accessible via an address/register pair
- *
- * Indirect addressing: switch is mapped at a single address,
- *   port and global registers accessible via a single command/data
- *   register pair
- */
-
-static int
-mvsw6171_wait_mask_raw(struct mii_bus *bus, int addr,
-		int reg, u16 mask, u16 val)
-{
-	int i = 100;
-	u16 r;
-
-	do {
-		r = bus->read(bus, addr, reg);
-		if ((r & mask) == val)
-			return 0;
-	} while (--i > 0);
-
-	return -ETIMEDOUT;
-}
-
-static u16
-r16(struct mii_bus *bus, bool indirect, int base_addr, int addr, int reg)
-{
-	u16 ind_addr;
-
-	if (!indirect)
-		return bus->read(bus, addr, reg);
-
-	/* Indirect read: First, make sure switch is free */
-	mvsw6171_wait_mask_raw(bus, base_addr, MV_INDIRECT_REG_CMD,
-			MV_INDIRECT_INPROGRESS, 0);
-
-	/* Load address and request read */
-	ind_addr = MV_INDIRECT_READ | (addr << MV_INDIRECT_ADDR_S) | reg;
-	bus->write(bus, base_addr, MV_INDIRECT_REG_CMD,
-			ind_addr);
-
-	/* Wait until it's ready */
-	mvsw6171_wait_mask_raw(bus, base_addr, MV_INDIRECT_REG_CMD,
-			MV_INDIRECT_INPROGRESS, 0);
-
-	/* Read the requested data */
-	return bus->read(bus, base_addr, MV_INDIRECT_REG_DATA);
-}
-
-static void
-w16(struct mii_bus *bus, bool indirect, int base_addr, int addr,
-		int reg, u16 val)
-{
-	u16 ind_addr;
-
-	if (!indirect) {
-		bus->write(bus, addr, reg, val);
-		return;
-	}
-
-	/* Indirect write: First, make sure switch is free */
-	mvsw6171_wait_mask_raw(bus, base_addr, MV_INDIRECT_REG_CMD,
-			MV_INDIRECT_INPROGRESS, 0);
-
-	/* Load the data to be written */
-	bus->write(bus, base_addr, MV_INDIRECT_REG_DATA, val);
-
-	/* Wait again for switch to be free */
-	mvsw6171_wait_mask_raw(bus, base_addr, MV_INDIRECT_REG_CMD,
-			MV_INDIRECT_INPROGRESS, 0);
-
-	/* Load address, and issue write command */
-	ind_addr = MV_INDIRECT_WRITE | (addr << MV_INDIRECT_ADDR_S) | reg;
-	bus->write(bus, base_addr, MV_INDIRECT_REG_CMD,
-			ind_addr);
-}
-
-/* swconfig support */
-
-static inline u16
-sr16(struct switch_dev *dev, int addr, int reg)
-{
-	struct mvsw6171_state *state = get_state(dev);
-
-	return r16(state->bus, state->is_indirect, state->base_addr, addr, reg);
-}
-
-static inline void
-sw16(struct switch_dev *dev, int addr, int reg, u16 val)
-{
-	struct mvsw6171_state *state = get_state(dev);
-
-	w16(state->bus, state->is_indirect, state->base_addr, addr, reg, val);
-}
-
-static int
-mvsw6171_wait_mask_s(struct switch_dev *dev, int addr,
-		int reg, u16 mask, u16 val)
-{
-	int i = 100;
-	u16 r;
-
-	do {
-		r = sr16(dev, addr, reg) & mask;
-		if (r == val)
-			return 0;
-	} while (--i > 0);
-
-	return -ETIMEDOUT;
-}
-
-static int
-mvsw6171_get_port_mask(struct switch_dev *dev,
-		const struct switch_attr *attr, struct switch_val *val)
-{
-	struct mvsw6171_state *state = get_state(dev);
-	char *buf = state->buf;
-	int port, len, i;
-	u16 reg;
-
-	port = val->port_vlan;
-	reg = sr16(dev, MV_PORTREG(VLANMAP, port)) & MV_PORTS_MASK;
-
-	len = sprintf(buf, "0x%04x: ", reg);
-
-	for (i = 0; i < MV_PORTS; i++) {
-		if (reg & (1 << i))
-			len += sprintf(buf + len, "%d ", i);
-		else if (i == port)
-			len += sprintf(buf + len, "(%d) ", i);
-	}
-
-	val->value.s = buf;
-
-	return 0;
-}
-
-static int
-mvsw6171_get_port_qmode(struct switch_dev *dev,
-		const struct switch_attr *attr, struct switch_val *val)
-{
-	struct mvsw6171_state *state = get_state(dev);
-
-	val->value.i = state->ports[val->port_vlan].qmode;
-
-	return 0;
-}
-
-static int
-mvsw6171_set_port_qmode(struct switch_dev *dev,
-		const struct switch_attr *attr, struct switch_val *val)
-{
-	struct mvsw6171_state *state = get_state(dev);
-
-	state->ports[val->port_vlan].qmode = val->value.i;
-
-	return 0;
-}
-
-static int
-mvsw6171_get_pvid(struct switch_dev *dev, int port, int *val)
-{
-	struct mvsw6171_state *state = get_state(dev);
-
-	*val = state->ports[port].pvid;
-
-	return 0;
-}
-
-static int
-mvsw6171_set_pvid(struct switch_dev *dev, int port, int val)
-{
-	struct mvsw6171_state *state = get_state(dev);
-
-	if (val < 0 || val >= MV_VLANS)
-		return -EINVAL;
-
-	state->ports[port].pvid = (u16)val;
-
-	return 0;
-}
-
-static int
-mvsw6171_get_port_status(struct switch_dev *dev,
-		const struct switch_attr *attr, struct switch_val *val)
-{
-	struct mvsw6171_state *state = get_state(dev);
-	char *buf = state->buf;
-	u16 status, speed;
-	int len;
-
-	status = sr16(dev, MV_PORTREG(STATUS, val->port_vlan));
-	speed = (status & MV_PORT_STATUS_SPEED_MASK) >>
-			MV_PORT_STATUS_SPEED_SHIFT;
-
-	len = sprintf(buf, "link: ");
-	if (status & MV_PORT_STATUS_LINK) {
-		len += sprintf(buf + len, "up, speed: ");
-
-		switch (speed) {
-		case MV_PORT_STATUS_SPEED_10:
-			len += sprintf(buf + len, "10");
-			break;
-		case MV_PORT_STATUS_SPEED_100:
-			len += sprintf(buf + len, "100");
-			break;
-		case MV_PORT_STATUS_SPEED_1000:
-			len += sprintf(buf + len, "1000");
-			break;
-		}
-
-		len += sprintf(buf + len, " Mbps, duplex: ");
-
-		if (status & MV_PORT_STATUS_FDX)
-			len += sprintf(buf + len, "full");
-		else
-			len += sprintf(buf + len, "half");
-	} else {
-		len += sprintf(buf + len, "down");
-	}
-
-	val->value.s = buf;
-
-	return 0;
-}
-
-static int
-mvsw6171_get_port_speed(struct switch_dev *dev,
-		const struct switch_attr *attr, struct switch_val *val)
-{
-	u16 status, speed;
-
-	status = sr16(dev, MV_PORTREG(STATUS, val->port_vlan));
-	speed = (status & MV_PORT_STATUS_SPEED_MASK) >>
-			MV_PORT_STATUS_SPEED_SHIFT;
-
-	val->value.i = 0;
-
-	if (status & MV_PORT_STATUS_LINK) {
-		switch (speed) {
-		case MV_PORT_STATUS_SPEED_10:
-			val->value.i = 10;
-			break;
-		case MV_PORT_STATUS_SPEED_100:
-			val->value.i = 100;
-			break;
-		case MV_PORT_STATUS_SPEED_1000:
-			val->value.i = 1000;
-			break;
-		}
-	}
-
-	return 0;
-}
-
-static int mvsw6171_get_vlan_ports(struct switch_dev *dev,
-		struct switch_val *val)
-{
-	struct mvsw6171_state *state = get_state(dev);
-	int i, j, mode, vno;
-
-	vno = val->port_vlan;
-
-	if (vno <= 0 || vno >= dev->vlans)
-		return -EINVAL;
-
-	for (i = 0, j = 0; i < dev->ports; i++) {
-		if (state->vlans[vno].mask & (1 << i)) {
-			val->value.ports[j].id = i;
-
-			mode = (state->vlans[vno].port_mode >> (i * 4)) & 0xf;
-			if (mode == MV_VTUCTL_EGRESS_TAGGED)
-				val->value.ports[j].flags =
-					(1 << SWITCH_PORT_FLAG_TAGGED);
-			else
-				val->value.ports[j].flags = 0;
-
-			j++;
-		}
-	}
-
-	val->len = j;
-
-	return 0;
-}
-
-static int mvsw6171_set_vlan_ports(struct switch_dev *dev,
-		struct switch_val *val)
-{
-	struct mvsw6171_state *state = get_state(dev);
-	int i, mode, pno, vno;
-
-	vno = val->port_vlan;
-
-	if (vno <= 0 || vno >= dev->vlans)
-		return -EINVAL;
-
-	state->vlans[vno].mask = 0;
-	state->vlans[vno].port_mode = 0;
-
-	if(state->vlans[vno].vid == 0)
-		state->vlans[vno].vid = vno;
-
-	for (i = 0; i < val->len; i++) {
-		pno = val->value.ports[i].id;
-
-		state->vlans[vno].mask |= (1 << pno);
-		if (val->value.ports[i].flags &
-				(1 << SWITCH_PORT_FLAG_TAGGED))
-			mode = MV_VTUCTL_EGRESS_TAGGED;
-		else
-			mode = MV_VTUCTL_EGRESS_UNTAGGED;
-
-		state->vlans[vno].port_mode |= mode << (pno * 4);
-	}
-
-	/*
-	 * DISCARD is nonzero, so it must be explicitly
-	 * set on ports not in the VLAN.
-	 */
-	for (i = 0; i < dev->ports; i++)
-		if (!(state->vlans[vno].mask & (1 << i)))
-			state->vlans[vno].port_mode |=
-				MV_VTUCTL_DISCARD << (i * 4);
-
-	return 0;
-}
-
-static int mvsw6171_get_vlan_port_based(struct switch_dev *dev,
-		const struct switch_attr *attr, struct switch_val *val)
-{
-	struct mvsw6171_state *state = get_state(dev);
-	int vno = val->port_vlan;
-
-	if (vno <= 0 || vno >= dev->vlans)
-		return -EINVAL;
-
-	if (state->vlans[vno].port_based)
-		val->value.i = 1;
-	else
-		val->value.i = 0;
-
-	return 0;
-}
-
-static int mvsw6171_set_vlan_port_based(struct switch_dev *dev,
-		const struct switch_attr *attr, struct switch_val *val)
-{
-	struct mvsw6171_state *state = get_state(dev);
-	int vno = val->port_vlan;
-
-	if (vno <= 0 || vno >= dev->vlans)
-		return -EINVAL;
-
-	if (val->value.i == 1)
-		state->vlans[vno].port_based = true;
-	else
-		state->vlans[vno].port_based = false;
-
-	return 0;
-}
-
-static int mvsw6171_get_vid(struct switch_dev *dev,
-		const struct switch_attr *attr, struct switch_val *val)
-{
-	struct mvsw6171_state *state = get_state(dev);
-	int vno = val->port_vlan;
-
-	if (vno <= 0 || vno >= dev->vlans)
-		return -EINVAL;
-
-	val->value.i = state->vlans[vno].vid;
-
-	return 0;
-}
-
-static int mvsw6171_set_vid(struct switch_dev *dev,
-		const struct switch_attr *attr, struct switch_val *val)
-{
-	struct mvsw6171_state *state = get_state(dev);
-	int vno = val->port_vlan;
-
-	if (vno <= 0 || vno >= dev->vlans)
-		return -EINVAL;
-
-	state->vlans[vno].vid = val->value.i;
-
-	return 0;
-}
-
-static int mvsw6171_get_enable_vlan(struct switch_dev *dev,
-		const struct switch_attr *attr, struct switch_val *val)
-{
-	struct mvsw6171_state *state = get_state(dev);
-
-	val->value.i = state->vlan_enabled;
-
-	return 0;
-}
-
-static int mvsw6171_set_enable_vlan(struct switch_dev *dev,
-		const struct switch_attr *attr, struct switch_val *val)
-{
-	struct mvsw6171_state *state = get_state(dev);
-
-	state->vlan_enabled = val->value.i;
-
-	return 0;
-}
-
-static int mvsw6171_vtu_program(struct switch_dev *dev)
-{
-	struct mvsw6171_state *state = get_state(dev);
-	u16 v1, v2;
-	int i;
-
-	/* Flush */
-	mvsw6171_wait_mask_s(dev, MV_GLOBALREG(VTU_OP),
-			MV_VTUOP_INPROGRESS, 0);
-	sw16(dev, MV_GLOBALREG(VTU_OP),
-			MV_VTUOP_INPROGRESS | MV_VTUOP_VALID);
-
-	/* Write VLAN table */
-	for (i = 1; i < dev->vlans; i++) {
-		if (state->vlans[i].mask == 0 ||
-				state->vlans[i].vid == 0 ||
-				state->vlans[i].port_based == true)
-			continue;
-
-		mvsw6171_wait_mask_s(dev, MV_GLOBALREG(VTU_OP),
-				MV_VTUOP_INPROGRESS, 0);
-
-		sw16(dev, MV_GLOBALREG(VTU_VID),
-				MV_VTUOP_VALID | state->vlans[i].vid);
-
-		v1 = (u16)(state->vlans[i].port_mode & 0xffff);
-		v2 = (u16)((state->vlans[i].port_mode >> 16) & 0xffff);
-
-		sw16(dev, MV_GLOBALREG(VTU_DATA1), v1);
-		sw16(dev, MV_GLOBALREG(VTU_DATA2), v2);
-
-		sw16(dev, MV_GLOBALREG(VTU_OP),
-				MV_VTUOP_INPROGRESS | MV_VTUOP_LOAD);
-		mvsw6171_wait_mask_s(dev, MV_GLOBALREG(VTU_OP),
-				MV_VTUOP_INPROGRESS, 0);
-	}
-
-	return 0;
-}
-
-static void mvsw6171_vlan_port_config(struct switch_dev *dev, int vno)
-{
-	struct mvsw6171_state *state = get_state(dev);
-	int i, mode;
-
-	for (i = 0; i < dev->ports; i++) {
-		if (!(state->vlans[vno].mask & (1 << i)))
-			continue;
-
-		mode = (state->vlans[vno].port_mode >> (i * 4)) & 0xf;
-
-		if(mode != MV_VTUCTL_EGRESS_TAGGED)
-			state->ports[i].pvid = state->vlans[vno].vid;
-
-		if (state->vlans[vno].port_based)
-			state->ports[i].mask |= state->vlans[vno].mask;
-		else
-			state->ports[i].qmode = MV_8021Q_MODE_SECURE;
-	}
-}
-
-static int mvsw6171_update_state(struct switch_dev *dev)
-{
-	struct mvsw6171_state *state = get_state(dev);
-	int i;
-	u16 reg;
-
-	if (!state->registered)
-		return -EINVAL;
-
-	mvsw6171_vtu_program(dev);
-
-	/*
-	 * Set 802.1q-only mode if vlan_enabled is true.
-	 *
-	 * Without this, even if 802.1q is enabled for
-	 * a port/VLAN, it still depends on the port-based
-	 * VLAN mask being set.
-	 *
-	 * With this setting, port-based VLANs are still
-	 * functional, provided the VID is not in the VTU.
-	 */
-	reg = sr16(dev, MV_GLOBAL2REG(SDET_POLARITY));
-
-	if (state->vlan_enabled)
-		reg |= MV_8021Q_VLAN_ONLY;
-	else
-		reg &= ~MV_8021Q_VLAN_ONLY;
-
-	sw16(dev, MV_GLOBAL2REG(SDET_POLARITY), reg);
-
-	/*
-	 * Set port-based VLAN masks on each port
-	 * based only on VLAN definitions known to
-	 * the driver (i.e. in state).
-	 *
-	 * This means any pre-existing port mapping is
-	 * wiped out once our driver is initialized.
-	 */
-	for (i = 0; i < dev->ports; i++) {
-		state->ports[i].mask = 0;
-		state->ports[i].qmode = MV_8021Q_MODE_DISABLE;
-	}
-
-	for (i = 0; i < dev->vlans; i++)
-		mvsw6171_vlan_port_config(dev, i);
-
-	for (i = 0; i < dev->ports; i++) {
-		reg = sr16(dev, MV_PORTREG(VLANID, i)) & ~MV_PVID_MASK;
-		reg |= state->ports[i].pvid;
-		sw16(dev, MV_PORTREG(VLANID, i), reg);
-
-		state->ports[i].mask &= ~(1 << i);
-
-		reg = sr16(dev, MV_PORTREG(VLANMAP, i)) & ~MV_PORTS_MASK;
-		reg |= state->ports[i].mask;
-		sw16(dev, MV_PORTREG(VLANMAP, i), reg);
-
-		reg = sr16(dev, MV_PORTREG(CONTROL2, i)) &
-			~MV_8021Q_MODE_MASK;
-		reg |= state->ports[i].qmode << MV_8021Q_MODE_SHIFT;
-		sw16(dev, MV_PORTREG(CONTROL2, i), reg);
-	}
-
-	return 0;
-}
-
-static int mvsw6171_apply(struct switch_dev *dev)
-{
-	return mvsw6171_update_state(dev);
-}
-
-static int mvsw6171_reset(struct switch_dev *dev)
-{
-	struct mvsw6171_state *state = get_state(dev);
-	int i;
-	u16 reg;
-
-	/* Disable all ports before reset */
-	for (i = 0; i < dev->ports; i++) {
-		reg = sr16(dev, MV_PORTREG(CONTROL, i)) &
-			~MV_PORTCTRL_ENABLED;
-		sw16(dev, MV_PORTREG(CONTROL, i), reg);
-	}
-
-	reg = sr16(dev, MV_GLOBALREG(CONTROL)) | MV_CONTROL_RESET;
-
-	sw16(dev, MV_GLOBALREG(CONTROL), reg);
-	if (mvsw6171_wait_mask_s(dev, MV_GLOBALREG(CONTROL),
-				MV_CONTROL_RESET, 0) < 0)
-		return -ETIMEDOUT;
-
-	for (i = 0; i < dev->ports; i++) {
-		state->ports[i].qmode = 0;
-		state->ports[i].mask = 0;
-		state->ports[i].pvid = 0;
-
-		/* Force flow control off */
-		reg = sr16(dev, MV_PORTREG(FORCE, i)) & ~MV_FORCE_FC_MASK;
-		reg |= MV_FORCE_FC_DISABLE;
-		sw16(dev, MV_PORTREG(FORCE, i), reg);
-
-		/* Set port association vector */
-		sw16(dev, MV_PORTREG(ASSOC, i), (1 << i));
-	}
-
-	for (i = 0; i < dev->vlans; i++) {
-		state->vlans[i].port_based = false;
-		state->vlans[i].mask = 0;
-		state->vlans[i].vid = 0;
-		state->vlans[i].port_mode = 0;
-	}
-
-	state->vlan_enabled = 0;
-
-	mvsw6171_update_state(dev);
-
-	/* Re-enable ports */
-	for (i = 0; i < dev->ports; i++) {
-		reg = sr16(dev, MV_PORTREG(CONTROL, i)) |
-			MV_PORTCTRL_ENABLED;
-		sw16(dev, MV_PORTREG(CONTROL, i), reg);
-	}
-
-	return 0;
-}
-
-enum {
-	MVSW6171_ENABLE_VLAN,
-};
-
-enum {
-	MVSW6171_VLAN_PORT_BASED,
-	MVSW6171_VLAN_ID,
-};
-
-enum {
-	MVSW6171_PORT_MASK,
-	MVSW6171_PORT_QMODE,
-	MVSW6171_PORT_STATUS,
-	MVSW6171_PORT_LINK,
-};
-
-static const struct switch_attr mvsw6171_global[] = {
-	[MVSW6171_ENABLE_VLAN] = {
-		.id = MVSW6171_ENABLE_VLAN,
-		.type = SWITCH_TYPE_INT,
-		.name = "enable_vlan",
-		.description = "Enable 802.1q VLAN support",
-		.get = mvsw6171_get_enable_vlan,
-		.set = mvsw6171_set_enable_vlan,
-	},
-};
-
-static const struct switch_attr mvsw6171_vlan[] = {
-	[MVSW6171_VLAN_PORT_BASED] = {
-		.id = MVSW6171_VLAN_PORT_BASED,
-		.type = SWITCH_TYPE_INT,
-		.name = "port_based",
-		.description = "Use port-based (non-802.1q) VLAN only",
-		.get = mvsw6171_get_vlan_port_based,
-		.set = mvsw6171_set_vlan_port_based,
-	},
-	[MVSW6171_VLAN_ID] = {
-		.id = MVSW6171_VLAN_ID,
-		.type = SWITCH_TYPE_INT,
-		.name = "vid",
-		.description = "Get/set VLAN ID",
-		.get = mvsw6171_get_vid,
-		.set = mvsw6171_set_vid,
-	},
-};
-
-static const struct switch_attr mvsw6171_port[] = {
-	[MVSW6171_PORT_MASK] = {
-		.id = MVSW6171_PORT_MASK,
-		.type = SWITCH_TYPE_STRING,
-		.description = "Port-based VLAN mask",
-		.name = "mask",
-		.get = mvsw6171_get_port_mask,
-		.set = NULL,
-	},
-	[MVSW6171_PORT_QMODE] = {
-		.id = MVSW6171_PORT_QMODE,
-		.type = SWITCH_TYPE_INT,
-		.description = "802.1q mode: 0=off/1=fallback/2=check/3=secure",
-		.name = "qmode",
-		.get = mvsw6171_get_port_qmode,
-		.set = mvsw6171_set_port_qmode,
-	},
-	[MVSW6171_PORT_STATUS] = {
-		.id = MVSW6171_PORT_STATUS,
-		.type = SWITCH_TYPE_STRING,
-		.description = "Return port status",
-		.name = "status",
-		.get = mvsw6171_get_port_status,
-		.set = NULL,
-	},
-	[MVSW6171_PORT_LINK] = {
-		.id = MVSW6171_PORT_LINK,
-		.type = SWITCH_TYPE_INT,
-		.description = "Get link speed",
-		.name = "link",
-		.get = mvsw6171_get_port_speed,
-		.set = NULL,
-	},
-};
-
-static const struct switch_dev_ops mvsw6171_ops = {
-	.attr_global = {
-		.attr = mvsw6171_global,
-		.n_attr = ARRAY_SIZE(mvsw6171_global),
-	},
-	.attr_vlan = {
-		.attr = mvsw6171_vlan,
-		.n_attr = ARRAY_SIZE(mvsw6171_vlan),
-	},
-	.attr_port = {
-		.attr = mvsw6171_port,
-		.n_attr = ARRAY_SIZE(mvsw6171_port),
-	},
-	.get_port_pvid = mvsw6171_get_pvid,
-	.set_port_pvid = mvsw6171_set_pvid,
-	.get_vlan_ports = mvsw6171_get_vlan_ports,
-	.set_vlan_ports = mvsw6171_set_vlan_ports,
-	.apply_config = mvsw6171_apply,
-	.reset_switch = mvsw6171_reset,
-};
-
-/* end swconfig stuff */
-
-static int mvsw6171_probe(struct platform_device *pdev)
-{
-	struct mvsw6171_state *state;
-	struct device_node *np = pdev->dev.of_node;
-	struct device_node *mdio;
-	u32 val;
-	u16 reg;
-	int err;
-
-	state = kzalloc(sizeof(*state), GFP_KERNEL);
-	if (!state)
-		return -ENOMEM;
-
-	mdio = of_parse_phandle(np, "mii-bus", 0);
-	if (!mdio) {
-		dev_err(&pdev->dev, "Couldn't get MII bus handle\n");
-		err = -ENODEV;
-		goto out_err;
-	}
-
-	state->bus = of_mdio_find_bus(mdio);
-	if (!state->bus) {
-		dev_err(&pdev->dev, "Couldn't find MII bus from handle\n");
-		err = -ENODEV;
-		goto out_err;
-	}
-
-	state->is_indirect = of_property_read_bool(np, "is-indirect");
-
-	if (state->is_indirect) {
-		if (of_property_read_u32(np, "reg", &val)) {
-			dev_err(&pdev->dev, "Switch address not specified\n");
-			err = -ENODEV;
-			goto out_err;
-		}
-
-		state->base_addr = val;
-	} else {
-		state->base_addr = MV_BASE;
-	}
-
-	reg = r16(state->bus, state->is_indirect, state->base_addr,
-			MV_PORTREG(IDENT, 0)) & MV_IDENT_MASK;
-	if (reg != MV_IDENT_VALUE) {
-		dev_err(&pdev->dev, "No switch found at 0x%02x\n",
-				state->base_addr);
-		err = -ENODEV;
-		goto out_err;
-	}
-
-	platform_set_drvdata(pdev, state);
-	dev_info(&pdev->dev, "Found %s at %s:%02x\n", MV_IDENT_STR,
-			state->bus->id, state->base_addr);
-
-	dev_info(&pdev->dev, "Using %sdirect addressing\n",
-			(state->is_indirect ? "in" : ""));
-
-	if (of_property_read_u32(np, "cpu-port-0", &val)) {
-		dev_err(&pdev->dev, "CPU port not set\n");
-		err = -ENODEV;
-		goto out_err;
-	}
-
-	state->cpu_port0 = val;
-
-	if (!of_property_read_u32(np, "cpu-port-1", &val))
-		state->cpu_port1 = val;
-	else
-		state->cpu_port1 = -1;
-
-	state->dev.vlans = MV_VLANS;
-	state->dev.cpu_port = state->cpu_port0;
-	state->dev.ports = MV_PORTS;
-	state->dev.name = MV_IDENT_STR;
-	state->dev.ops = &mvsw6171_ops;
-	state->dev.alias = dev_name(&pdev->dev);
-
-	err = register_switch(&state->dev, NULL);
-	if (err < 0)
-		goto out_err;
-
-	state->registered = true;
-
-	return 0;
-out_err:
-	kfree(state);
-	return err;
-}
-
-static int
-mvsw6171_remove(struct platform_device *pdev)
-{
-	struct mvsw6171_state *state = platform_get_drvdata(pdev);
-
-	if (state->registered)
-		unregister_switch(&state->dev);
-
-	kfree(state);
-
-	return 0;
-}
-
-static const struct of_device_id mvsw6171_match[] = {
-	{ .compatible = "marvell,88e6171" },
-	{ }
-};
-MODULE_DEVICE_TABLE(of, mvsw6171_match);
-
-static struct platform_driver mvsw6171_driver = {
-	.probe = mvsw6171_probe,
-	.remove = mvsw6171_remove,
-	.driver = {
-		.name = "mvsw6171",
-		.of_match_table = of_match_ptr(mvsw6171_match),
-		.owner = THIS_MODULE,
-	},
-};
-
-static int __init mvsw6171_module_init(void)
-{
-	return platform_driver_register(&mvsw6171_driver);
-}
-late_initcall(mvsw6171_module_init);
-
-static void __exit mvsw6171_module_exit(void)
-{
-	platform_driver_unregister(&mvsw6171_driver);
-}
-module_exit(mvsw6171_module_exit);
diff --git a/target/linux/generic/files/drivers/net/phy/mvsw6171.h b/target/linux/generic/files/drivers/net/phy/mvsw6171.h
deleted file mode 100644
index 38442c1..0000000
--- a/target/linux/generic/files/drivers/net/phy/mvsw6171.h
+++ /dev/null
@@ -1,230 +0,0 @@
-/*
- * Marvell 88E6171 switch driver
- *
- * Copyright (c) 2014 Claudio Leite <leitec at staticky.com>
- *
- * Based on code (c) 2008 Felix Fietkau <nbd at openwrt.org>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License v2 as published by the
- * Free Software Foundation
- */
-
-#ifndef __MVSW6171_H
-#define __MVSW6171_H
-
-#define MV_PORTS			7
-#define MV_PORTS_MASK			((1 << MV_PORTS) - 1)
-
-#define MV_CPUPORT			6
-
-#define MV_BASE				0x10
-
-#define MV_SWITCHPORT_BASE		0x10
-#define MV_SWITCHPORT(_n)		(MV_SWITCHPORT_BASE + (_n))
-#define MV_SWITCHREGS			(MV_BASE + 0xb)
-
-#define MV_VLANS			64
-
-enum {
-	MV_PORT_STATUS			= 0x00,
-	MV_PORT_FORCE			= 0x01,
-	MV_PORT_PAUSE			= 0x02,
-	MV_PORT_IDENT			= 0x03,
-	MV_PORT_CONTROL			= 0x04,
-	MV_PORT_CONTROL1		= 0x05,
-	MV_PORT_VLANMAP			= 0x06,
-	MV_PORT_VLANID			= 0x07,
-	MV_PORT_CONTROL2		= 0x08,
-	MV_PORT_ASSOC			= 0x0b,
-	MV_PORT_RXCOUNT			= 0x10,
-	MV_PORT_TXCOUNT			= 0x11,
-};
-#define MV_PORTREG(_type, _port) MV_SWITCHPORT(_port), MV_PORT_##_type
-
-enum {
-	MV_PORT_STATUS_FDX		= (1 << 10),
-	MV_PORT_STATUS_LINK		= (1 << 11),
-};
-
-enum {
-	MV_PORT_STATUS_SPEED_10		= 0x00,
-	MV_PORT_STATUS_SPEED_100	= 0x01,
-	MV_PORT_STATUS_SPEED_1000	= 0x02,
-};
-#define MV_PORT_STATUS_SPEED_SHIFT	8
-#define MV_PORT_STATUS_SPEED_MASK	(3 << 8)
-
-enum {
-	MV_PORTCTRL_BLOCK		= (1 << 0),
-	MV_PORTCTRL_LEARN		= (2 << 0),
-	MV_PORTCTRL_ENABLED		= (3 << 0),
-	MV_PORTCTRL_VLANTUN		= (1 << 7),
-	MV_PORTCTRL_EGRESS		= (1 << 12),
-};
-
-#define MV_FORCE_FC_MASK		(3 << 6)
-
-enum {
-	MV_FORCE_FC_ENABLE		= (3 << 6),
-	MV_FORCE_FC_DISABLE		= (1 << 6),
-};
-
-enum {
-	MV_8021Q_EGRESS_UNMODIFIED	= 0x00,
-	MV_8021Q_EGRESS_UNTAGGED	= 0x01,
-	MV_8021Q_EGRESS_TAGGED		= 0x02,
-	MV_8021Q_EGRESS_ADDTAG		= 0x03,
-};
-
-#define MV_8021Q_MODE_SHIFT		10
-#define MV_8021Q_MODE_MASK		(0x3 << MV_8021Q_MODE_SHIFT)
-
-enum {
-	MV_8021Q_MODE_DISABLE		= 0x00,
-	MV_8021Q_MODE_FALLBACK		= 0x01,
-	MV_8021Q_MODE_CHECK		= 0x02,
-	MV_8021Q_MODE_SECURE		= 0x03,
-};
-
-#define MV_PORTASSOC_MONITOR		(1 << 15)
-
-enum {
-	MV_SWITCH_MAC0			= 0x01,
-	MV_SWITCH_MAC1			= 0x02,
-	MV_SWITCH_MAC2			= 0x03,
-	MV_SWITCH_CTRL			= 0x04,
-	MV_SWITCH_ATU_CTRL		= 0x0a,
-	MV_SWITCH_ATU_OP		= 0x0b,
-	MV_SWITCH_ATU_DATA		= 0x0c,
-	MV_SWITCH_ATU_MAC0		= 0x0d,
-	MV_SWITCH_ATU_MAC1		= 0x0e,
-	MV_SWITCH_ATU_MAC2		= 0x0f,
-	MV_SWITCH_GLOBAL		= 0x1b,
-	MV_SWITCH_GLOBAL2		= 0x1c,
-};
-#define MV_SWITCHREG(_type) MV_SWITCHREGS, MV_SWITCH_##_type
-
-enum {
-	MV_SWITCHCTL_EEIE		= (1 << 0),
-	MV_SWITCHCTL_PHYIE		= (1 << 1),
-	MV_SWITCHCTL_ATUDONE		= (1 << 2),
-	MV_SWITCHCTL_ATUIE		= (1 << 3),
-	MV_SWITCHCTL_CTRMODE		= (1 << 8),
-	MV_SWITCHCTL_RELOAD		= (1 << 9),
-	MV_SWITCHCTL_MSIZE		= (1 << 10),
-	MV_SWITCHCTL_DROP		= (1 << 13),
-};
-
-enum {
-#define MV_ATUCTL_AGETIME_MIN		16
-#define MV_ATUCTL_AGETIME_MAX		4080
-#define MV_ATUCTL_AGETIME(_n)		((((_n) / 16) & 0xff) << 4)
-	MV_ATUCTL_ATU_256		= (0 << 12),
-	MV_ATUCTL_ATU_512		= (1 << 12),
-	MV_ATUCTL_ATU_1K		= (2 << 12),
-	MV_ATUCTL_ATUMASK		= (3 << 12),
-	MV_ATUCTL_NO_LEARN		= (1 << 14),
-	MV_ATUCTL_RESET			= (1 << 15),
-};
-
-enum {
-#define MV_ATUOP_DBNUM(_n)		((_n) & 0x0f)
-	MV_ATUOP_NOOP			= (0 << 12),
-	MV_ATUOP_FLUSH_ALL		= (1 << 12),
-	MV_ATUOP_FLUSH_U		= (2 << 12),
-	MV_ATUOP_LOAD_DB		= (3 << 12),
-	MV_ATUOP_GET_NEXT		= (4 << 12),
-	MV_ATUOP_FLUSH_DB		= (5 << 12),
-	MV_ATUOP_FLUSH_DB_UU		= (6 << 12),
-	MV_ATUOP_INPROGRESS		= (1 << 15),
-};
-
-enum {
-	MV_GLOBAL_STATUS		= 0x00,
-	MV_GLOBAL_CONTROL		= 0x04,
-	MV_GLOBAL_VTU_OP		= 0x05,
-	MV_GLOBAL_VTU_VID		= 0x06,
-	MV_GLOBAL_VTU_DATA1		= 0x07,
-	MV_GLOBAL_VTU_DATA2		= 0x08,
-	MV_GLOBAL_VTU_DATA3		= 0x09,
-};
-#define MV_GLOBALREG(_type) MV_SWITCH_GLOBAL, MV_GLOBAL_##_type
-
-enum {
-	MV_GLOBAL2_SDET_POLARITY	= 0x1D,
-};
-#define MV_GLOBAL2REG(_type) MV_SWITCH_GLOBAL2, MV_GLOBAL2_##_type
-
-enum {
-	MV_VTUOP_VALID			= (1 << 12),
-	MV_VTUOP_LOAD			= (3 << 12),
-	MV_VTUOP_INPROGRESS		= (1 << 15),
-};
-
-enum {
-	MV_CONTROL_RESET		= (1 << 15),
-	MV_CONTROL_PPU_ENABLE		= (1 << 14),
-};
-
-enum {
-	MV_VTUCTL_EGRESS_UNMODIFIED	= 0x00,
-	MV_VTUCTL_EGRESS_UNTAGGED	= 0x01,
-	MV_VTUCTL_EGRESS_TAGGED		= 0x02,
-	MV_VTUCTL_DISCARD		= 0x03,
-};
-
-enum {
-	MV_8021Q_VLAN_ONLY		= (1 << 15),
-};
-
-enum {
-	MV_INDIRECT_REG_CMD		= 0,
-	MV_INDIRECT_REG_DATA		= 1,
-};
-
-enum {
-	MV_INDIRECT_INPROGRESS		= 0x8000,
-	MV_INDIRECT_WRITE		= 0x9400,
-	MV_INDIRECT_READ		= 0x9800,
-};
-#define MV_INDIRECT_ADDR_S		5
-
-#define MV_IDENT_MASK			0xffc0
-#define MV_IDENT_VALUE			0x1700
-#define MV_IDENT_STR			"MV88E617x"
-
-#define MV_PVID_MASK			0x0fff
-
-struct mvsw6171_state {
-	struct switch_dev dev;
-	struct mii_bus *bus;
-	int base_addr;
-
-	bool registered;
-	bool is_indirect;
-
-	int cpu_port0;
-	int cpu_port1;
-
-	int vlan_enabled;
-	struct port_state {
-		u16 pvid;
-		u16 mask;
-		u8 qmode;
-	} ports[MV_PORTS];
-
-	struct vlan_state {
-		bool port_based;
-
-		u16 mask;
-		u16 vid;
-		u32 port_mode;
-	} vlans[MV_VLANS];
-
-	char buf[128];
-};
-
-#define get_state(_dev) container_of((_dev), struct mvsw6171_state, dev)
-
-#endif
diff --git a/target/linux/generic/files/drivers/net/phy/mvsw61xx.c b/target/linux/generic/files/drivers/net/phy/mvsw61xx.c
new file mode 100644
index 0000000..7199de0
--- /dev/null
+++ b/target/linux/generic/files/drivers/net/phy/mvsw61xx.c
@@ -0,0 +1,866 @@
+/*
+ * Marvell 88E61xx switch driver
+ *
+ * Copyright (c) 2014 Claudio Leite <leitec at staticky.com>
+ *
+ * Based on code (c) 2008 Felix Fietkau <nbd at openwrt.org>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License v2 as published by the
+ * Free Software Foundation
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/list.h>
+#include <linux/mii.h>
+#include <linux/phy.h>
+#include <linux/of.h>
+#include <linux/of_mdio.h>
+#include <linux/delay.h>
+#include <linux/switch.h>
+#include <linux/device.h>
+#include <linux/platform_device.h>
+
+#include "mvsw61xx.h"
+
+MODULE_DESCRIPTION("Marvell 88E61xx Switch driver");
+MODULE_AUTHOR("Claudio Leite <leitec at staticky.com>");
+MODULE_LICENSE("GPL v2");
+MODULE_ALIAS("platform:mvsw61xx");
+
+/*
+ * Register access is done through direct or indirect addressing,
+ * depending on how the switch is physically connected.
+ *
+ * Direct addressing: all port and global registers directly
+ *   accessible via an address/register pair
+ *
+ * Indirect addressing: switch is mapped at a single address,
+ *   port and global registers accessible via a single command/data
+ *   register pair
+ */
+
+static int
+mvsw61xx_wait_mask_raw(struct mii_bus *bus, int addr,
+		int reg, u16 mask, u16 val)
+{
+	int i = 100;
+	u16 r;
+
+	do {
+		r = bus->read(bus, addr, reg);
+		if ((r & mask) == val)
+			return 0;
+	} while (--i > 0);
+
+	return -ETIMEDOUT;
+}
+
+static u16
+r16(struct mii_bus *bus, bool indirect, int base_addr, int addr, int reg)
+{
+	u16 ind_addr;
+
+	if (!indirect)
+		return bus->read(bus, addr, reg);
+
+	/* Indirect read: First, make sure switch is free */
+	mvsw61xx_wait_mask_raw(bus, base_addr, MV_INDIRECT_REG_CMD,
+			MV_INDIRECT_INPROGRESS, 0);
+
+	/* Load address and request read */
+	ind_addr = MV_INDIRECT_READ | (addr << MV_INDIRECT_ADDR_S) | reg;
+	bus->write(bus, base_addr, MV_INDIRECT_REG_CMD,
+			ind_addr);
+
+	/* Wait until it's ready */
+	mvsw61xx_wait_mask_raw(bus, base_addr, MV_INDIRECT_REG_CMD,
+			MV_INDIRECT_INPROGRESS, 0);
+
+	/* Read the requested data */
+	return bus->read(bus, base_addr, MV_INDIRECT_REG_DATA);
+}
+
+static void
+w16(struct mii_bus *bus, bool indirect, int base_addr, int addr,
+		int reg, u16 val)
+{
+	u16 ind_addr;
+
+	if (!indirect) {
+		bus->write(bus, addr, reg, val);
+		return;
+	}
+
+	/* Indirect write: First, make sure switch is free */
+	mvsw61xx_wait_mask_raw(bus, base_addr, MV_INDIRECT_REG_CMD,
+			MV_INDIRECT_INPROGRESS, 0);
+
+	/* Load the data to be written */
+	bus->write(bus, base_addr, MV_INDIRECT_REG_DATA, val);
+
+	/* Wait again for switch to be free */
+	mvsw61xx_wait_mask_raw(bus, base_addr, MV_INDIRECT_REG_CMD,
+			MV_INDIRECT_INPROGRESS, 0);
+
+	/* Load address, and issue write command */
+	ind_addr = MV_INDIRECT_WRITE | (addr << MV_INDIRECT_ADDR_S) | reg;
+	bus->write(bus, base_addr, MV_INDIRECT_REG_CMD,
+			ind_addr);
+}
+
+/* swconfig support */
+
+static inline u16
+sr16(struct switch_dev *dev, int addr, int reg)
+{
+	struct mvsw61xx_state *state = get_state(dev);
+
+	return r16(state->bus, state->is_indirect, state->base_addr, addr, reg);
+}
+
+static inline void
+sw16(struct switch_dev *dev, int addr, int reg, u16 val)
+{
+	struct mvsw61xx_state *state = get_state(dev);
+
+	w16(state->bus, state->is_indirect, state->base_addr, addr, reg, val);
+}
+
+static int
+mvsw61xx_wait_mask_s(struct switch_dev *dev, int addr,
+		int reg, u16 mask, u16 val)
+{
+	int i = 100;
+	u16 r;
+
+	do {
+		r = sr16(dev, addr, reg) & mask;
+		if (r == val)
+			return 0;
+	} while (--i > 0);
+
+	return -ETIMEDOUT;
+}
+
+static int
+mvsw61xx_get_port_mask(struct switch_dev *dev,
+		const struct switch_attr *attr, struct switch_val *val)
+{
+	struct mvsw61xx_state *state = get_state(dev);
+	char *buf = state->buf;
+	int port, len, i;
+	u16 reg;
+
+	port = val->port_vlan;
+	reg = sr16(dev, MV_PORTREG(VLANMAP, port)) & MV_PORTS_MASK;
+
+	len = sprintf(buf, "0x%04x: ", reg);
+
+	for (i = 0; i < MV_PORTS; i++) {
+		if (reg & (1 << i))
+			len += sprintf(buf + len, "%d ", i);
+		else if (i == port)
+			len += sprintf(buf + len, "(%d) ", i);
+	}
+
+	val->value.s = buf;
+
+	return 0;
+}
+
+static int
+mvsw61xx_get_port_qmode(struct switch_dev *dev,
+		const struct switch_attr *attr, struct switch_val *val)
+{
+	struct mvsw61xx_state *state = get_state(dev);
+
+	val->value.i = state->ports[val->port_vlan].qmode;
+
+	return 0;
+}
+
+static int
+mvsw61xx_set_port_qmode(struct switch_dev *dev,
+		const struct switch_attr *attr, struct switch_val *val)
+{
+	struct mvsw61xx_state *state = get_state(dev);
+
+	state->ports[val->port_vlan].qmode = val->value.i;
+
+	return 0;
+}
+
+static int
+mvsw61xx_get_pvid(struct switch_dev *dev, int port, int *val)
+{
+	struct mvsw61xx_state *state = get_state(dev);
+
+	*val = state->ports[port].pvid;
+
+	return 0;
+}
+
+static int
+mvsw61xx_set_pvid(struct switch_dev *dev, int port, int val)
+{
+	struct mvsw61xx_state *state = get_state(dev);
+
+	if (val < 0 || val >= MV_VLANS)
+		return -EINVAL;
+
+	state->ports[port].pvid = (u16)val;
+
+	return 0;
+}
+
+static int
+mvsw61xx_get_port_status(struct switch_dev *dev,
+		const struct switch_attr *attr, struct switch_val *val)
+{
+	struct mvsw61xx_state *state = get_state(dev);
+	char *buf = state->buf;
+	u16 status, speed;
+	int len;
+
+	status = sr16(dev, MV_PORTREG(STATUS, val->port_vlan));
+	speed = (status & MV_PORT_STATUS_SPEED_MASK) >>
+			MV_PORT_STATUS_SPEED_SHIFT;
+
+	len = sprintf(buf, "link: ");
+	if (status & MV_PORT_STATUS_LINK) {
+		len += sprintf(buf + len, "up, speed: ");
+
+		switch (speed) {
+		case MV_PORT_STATUS_SPEED_10:
+			len += sprintf(buf + len, "10");
+			break;
+		case MV_PORT_STATUS_SPEED_100:
+			len += sprintf(buf + len, "100");
+			break;
+		case MV_PORT_STATUS_SPEED_1000:
+			len += sprintf(buf + len, "1000");
+			break;
+		}
+
+		len += sprintf(buf + len, " Mbps, duplex: ");
+
+		if (status & MV_PORT_STATUS_FDX)
+			len += sprintf(buf + len, "full");
+		else
+			len += sprintf(buf + len, "half");
+	} else {
+		len += sprintf(buf + len, "down");
+	}
+
+	val->value.s = buf;
+
+	return 0;
+}
+
+static int
+mvsw61xx_get_port_speed(struct switch_dev *dev,
+		const struct switch_attr *attr, struct switch_val *val)
+{
+	u16 status, speed;
+
+	status = sr16(dev, MV_PORTREG(STATUS, val->port_vlan));
+	speed = (status & MV_PORT_STATUS_SPEED_MASK) >>
+			MV_PORT_STATUS_SPEED_SHIFT;
+
+	val->value.i = 0;
+
+	if (status & MV_PORT_STATUS_LINK) {
+		switch (speed) {
+		case MV_PORT_STATUS_SPEED_10:
+			val->value.i = 10;
+			break;
+		case MV_PORT_STATUS_SPEED_100:
+			val->value.i = 100;
+			break;
+		case MV_PORT_STATUS_SPEED_1000:
+			val->value.i = 1000;
+			break;
+		}
+	}
+
+	return 0;
+}
+
+static int mvsw61xx_get_vlan_ports(struct switch_dev *dev,
+		struct switch_val *val)
+{
+	struct mvsw61xx_state *state = get_state(dev);
+	int i, j, mode, vno;
+
+	vno = val->port_vlan;
+
+	if (vno <= 0 || vno >= dev->vlans)
+		return -EINVAL;
+
+	for (i = 0, j = 0; i < dev->ports; i++) {
+		if (state->vlans[vno].mask & (1 << i)) {
+			val->value.ports[j].id = i;
+
+			mode = (state->vlans[vno].port_mode >> (i * 4)) & 0xf;
+			if (mode == MV_VTUCTL_EGRESS_TAGGED)
+				val->value.ports[j].flags =
+					(1 << SWITCH_PORT_FLAG_TAGGED);
+			else
+				val->value.ports[j].flags = 0;
+
+			j++;
+		}
+	}
+
+	val->len = j;
+
+	return 0;
+}
+
+static int mvsw61xx_set_vlan_ports(struct switch_dev *dev,
+		struct switch_val *val)
+{
+	struct mvsw61xx_state *state = get_state(dev);
+	int i, mode, pno, vno;
+
+	vno = val->port_vlan;
+
+	if (vno <= 0 || vno >= dev->vlans)
+		return -EINVAL;
+
+	state->vlans[vno].mask = 0;
+	state->vlans[vno].port_mode = 0;
+
+	if(state->vlans[vno].vid == 0)
+		state->vlans[vno].vid = vno;
+
+	for (i = 0; i < val->len; i++) {
+		pno = val->value.ports[i].id;
+
+		state->vlans[vno].mask |= (1 << pno);
+		if (val->value.ports[i].flags &
+				(1 << SWITCH_PORT_FLAG_TAGGED))
+			mode = MV_VTUCTL_EGRESS_TAGGED;
+		else
+			mode = MV_VTUCTL_EGRESS_UNTAGGED;
+
+		state->vlans[vno].port_mode |= mode << (pno * 4);
+	}
+
+	/*
+	 * DISCARD is nonzero, so it must be explicitly
+	 * set on ports not in the VLAN.
+	 */
+	for (i = 0; i < dev->ports; i++)
+		if (!(state->vlans[vno].mask & (1 << i)))
+			state->vlans[vno].port_mode |=
+				MV_VTUCTL_DISCARD << (i * 4);
+
+	return 0;
+}
+
+static int mvsw61xx_get_vlan_port_based(struct switch_dev *dev,
+		const struct switch_attr *attr, struct switch_val *val)
+{
+	struct mvsw61xx_state *state = get_state(dev);
+	int vno = val->port_vlan;
+
+	if (vno <= 0 || vno >= dev->vlans)
+		return -EINVAL;
+
+	if (state->vlans[vno].port_based)
+		val->value.i = 1;
+	else
+		val->value.i = 0;
+
+	return 0;
+}
+
+static int mvsw61xx_set_vlan_port_based(struct switch_dev *dev,
+		const struct switch_attr *attr, struct switch_val *val)
+{
+	struct mvsw61xx_state *state = get_state(dev);
+	int vno = val->port_vlan;
+
+	if (vno <= 0 || vno >= dev->vlans)
+		return -EINVAL;
+
+	if (val->value.i == 1)
+		state->vlans[vno].port_based = true;
+	else
+		state->vlans[vno].port_based = false;
+
+	return 0;
+}
+
+static int mvsw61xx_get_vid(struct switch_dev *dev,
+		const struct switch_attr *attr, struct switch_val *val)
+{
+	struct mvsw61xx_state *state = get_state(dev);
+	int vno = val->port_vlan;
+
+	if (vno <= 0 || vno >= dev->vlans)
+		return -EINVAL;
+
+	val->value.i = state->vlans[vno].vid;
+
+	return 0;
+}
+
+static int mvsw61xx_set_vid(struct switch_dev *dev,
+		const struct switch_attr *attr, struct switch_val *val)
+{
+	struct mvsw61xx_state *state = get_state(dev);
+	int vno = val->port_vlan;
+
+	if (vno <= 0 || vno >= dev->vlans)
+		return -EINVAL;
+
+	state->vlans[vno].vid = val->value.i;
+
+	return 0;
+}
+
+static int mvsw61xx_get_enable_vlan(struct switch_dev *dev,
+		const struct switch_attr *attr, struct switch_val *val)
+{
+	struct mvsw61xx_state *state = get_state(dev);
+
+	val->value.i = state->vlan_enabled;
+
+	return 0;
+}
+
+static int mvsw61xx_set_enable_vlan(struct switch_dev *dev,
+		const struct switch_attr *attr, struct switch_val *val)
+{
+	struct mvsw61xx_state *state = get_state(dev);
+
+	state->vlan_enabled = val->value.i;
+
+	return 0;
+}
+
+static int mvsw61xx_vtu_program(struct switch_dev *dev)
+{
+	struct mvsw61xx_state *state = get_state(dev);
+	u16 v1, v2;
+	int i;
+
+	/* Flush */
+	mvsw61xx_wait_mask_s(dev, MV_GLOBALREG(VTU_OP),
+			MV_VTUOP_INPROGRESS, 0);
+	sw16(dev, MV_GLOBALREG(VTU_OP),
+			MV_VTUOP_INPROGRESS | MV_VTUOP_VALID);
+
+	/* Write VLAN table */
+	for (i = 1; i < dev->vlans; i++) {
+		if (state->vlans[i].mask == 0 ||
+				state->vlans[i].vid == 0 ||
+				state->vlans[i].port_based == true)
+			continue;
+
+		mvsw61xx_wait_mask_s(dev, MV_GLOBALREG(VTU_OP),
+				MV_VTUOP_INPROGRESS, 0);
+
+		sw16(dev, MV_GLOBALREG(VTU_VID),
+				MV_VTUOP_VALID | state->vlans[i].vid);
+
+		v1 = (u16)(state->vlans[i].port_mode & 0xffff);
+		v2 = (u16)((state->vlans[i].port_mode >> 16) & 0xffff);
+
+		sw16(dev, MV_GLOBALREG(VTU_DATA1), v1);
+		sw16(dev, MV_GLOBALREG(VTU_DATA2), v2);
+
+		sw16(dev, MV_GLOBALREG(VTU_OP),
+				MV_VTUOP_INPROGRESS | MV_VTUOP_LOAD);
+		mvsw61xx_wait_mask_s(dev, MV_GLOBALREG(VTU_OP),
+				MV_VTUOP_INPROGRESS, 0);
+	}
+
+	return 0;
+}
+
+static void mvsw61xx_vlan_port_config(struct switch_dev *dev, int vno)
+{
+	struct mvsw61xx_state *state = get_state(dev);
+	int i, mode;
+
+	for (i = 0; i < dev->ports; i++) {
+		if (!(state->vlans[vno].mask & (1 << i)))
+			continue;
+
+		mode = (state->vlans[vno].port_mode >> (i * 4)) & 0xf;
+
+		if(mode != MV_VTUCTL_EGRESS_TAGGED)
+			state->ports[i].pvid = state->vlans[vno].vid;
+
+		if (state->vlans[vno].port_based)
+			state->ports[i].mask |= state->vlans[vno].mask;
+		else
+			state->ports[i].qmode = MV_8021Q_MODE_SECURE;
+	}
+}
+
+static int mvsw61xx_update_state(struct switch_dev *dev)
+{
+	struct mvsw61xx_state *state = get_state(dev);
+	int i;
+	u16 reg;
+
+	if (!state->registered)
+		return -EINVAL;
+
+	mvsw61xx_vtu_program(dev);
+
+	/*
+	 * Set 802.1q-only mode if vlan_enabled is true.
+	 *
+	 * Without this, even if 802.1q is enabled for
+	 * a port/VLAN, it still depends on the port-based
+	 * VLAN mask being set.
+	 *
+	 * With this setting, port-based VLANs are still
+	 * functional, provided the VID is not in the VTU.
+	 */
+	reg = sr16(dev, MV_GLOBAL2REG(SDET_POLARITY));
+
+	if (state->vlan_enabled)
+		reg |= MV_8021Q_VLAN_ONLY;
+	else
+		reg &= ~MV_8021Q_VLAN_ONLY;
+
+	sw16(dev, MV_GLOBAL2REG(SDET_POLARITY), reg);
+
+	/*
+	 * Set port-based VLAN masks on each port
+	 * based only on VLAN definitions known to
+	 * the driver (i.e. in state).
+	 *
+	 * This means any pre-existing port mapping is
+	 * wiped out once our driver is initialized.
+	 */
+	for (i = 0; i < dev->ports; i++) {
+		state->ports[i].mask = 0;
+		state->ports[i].qmode = MV_8021Q_MODE_DISABLE;
+	}
+
+	for (i = 0; i < dev->vlans; i++)
+		mvsw61xx_vlan_port_config(dev, i);
+
+	for (i = 0; i < dev->ports; i++) {
+		reg = sr16(dev, MV_PORTREG(VLANID, i)) & ~MV_PVID_MASK;
+		reg |= state->ports[i].pvid;
+		sw16(dev, MV_PORTREG(VLANID, i), reg);
+
+		state->ports[i].mask &= ~(1 << i);
+
+		reg = sr16(dev, MV_PORTREG(VLANMAP, i)) & ~MV_PORTS_MASK;
+		reg |= state->ports[i].mask;
+		sw16(dev, MV_PORTREG(VLANMAP, i), reg);
+
+		reg = sr16(dev, MV_PORTREG(CONTROL2, i)) &
+			~MV_8021Q_MODE_MASK;
+		reg |= state->ports[i].qmode << MV_8021Q_MODE_SHIFT;
+		sw16(dev, MV_PORTREG(CONTROL2, i), reg);
+	}
+
+	return 0;
+}
+
+static int mvsw61xx_apply(struct switch_dev *dev)
+{
+	return mvsw61xx_update_state(dev);
+}
+
+static int mvsw61xx_reset(struct switch_dev *dev)
+{
+	struct mvsw61xx_state *state = get_state(dev);
+	int i;
+	u16 reg;
+
+	/* Disable all ports before reset */
+	for (i = 0; i < dev->ports; i++) {
+		reg = sr16(dev, MV_PORTREG(CONTROL, i)) &
+			~MV_PORTCTRL_ENABLED;
+		sw16(dev, MV_PORTREG(CONTROL, i), reg);
+	}
+
+	reg = sr16(dev, MV_GLOBALREG(CONTROL)) | MV_CONTROL_RESET;
+
+	sw16(dev, MV_GLOBALREG(CONTROL), reg);
+	if (mvsw61xx_wait_mask_s(dev, MV_GLOBALREG(CONTROL),
+				MV_CONTROL_RESET, 0) < 0)
+		return -ETIMEDOUT;
+
+	for (i = 0; i < dev->ports; i++) {
+		state->ports[i].qmode = 0;
+		state->ports[i].mask = 0;
+		state->ports[i].pvid = 0;
+
+		/* Force flow control off */
+		reg = sr16(dev, MV_PORTREG(FORCE, i)) & ~MV_FORCE_FC_MASK;
+		reg |= MV_FORCE_FC_DISABLE;
+		sw16(dev, MV_PORTREG(FORCE, i), reg);
+
+		/* Set port association vector */
+		sw16(dev, MV_PORTREG(ASSOC, i), (1 << i));
+	}
+
+	for (i = 0; i < dev->vlans; i++) {
+		state->vlans[i].port_based = false;
+		state->vlans[i].mask = 0;
+		state->vlans[i].vid = 0;
+		state->vlans[i].port_mode = 0;
+	}
+
+	state->vlan_enabled = 0;
+
+	mvsw61xx_update_state(dev);
+
+	/* Re-enable ports */
+	for (i = 0; i < dev->ports; i++) {
+		reg = sr16(dev, MV_PORTREG(CONTROL, i)) |
+			MV_PORTCTRL_ENABLED;
+		sw16(dev, MV_PORTREG(CONTROL, i), reg);
+	}
+
+	return 0;
+}
+
+enum {
+	MVSW61XX_ENABLE_VLAN,
+};
+
+enum {
+	MVSW61XX_VLAN_PORT_BASED,
+	MVSW61XX_VLAN_ID,
+};
+
+enum {
+	MVSW61XX_PORT_MASK,
+	MVSW61XX_PORT_QMODE,
+	MVSW61XX_PORT_STATUS,
+	MVSW61XX_PORT_LINK,
+};
+
+static const struct switch_attr mvsw61xx_global[] = {
+	[MVSW61XX_ENABLE_VLAN] = {
+		.id = MVSW61XX_ENABLE_VLAN,
+		.type = SWITCH_TYPE_INT,
+		.name = "enable_vlan",
+		.description = "Enable 802.1q VLAN support",
+		.get = mvsw61xx_get_enable_vlan,
+		.set = mvsw61xx_set_enable_vlan,
+	},
+};
+
+static const struct switch_attr mvsw61xx_vlan[] = {
+	[MVSW61XX_VLAN_PORT_BASED] = {
+		.id = MVSW61XX_VLAN_PORT_BASED,
+		.type = SWITCH_TYPE_INT,
+		.name = "port_based",
+		.description = "Use port-based (non-802.1q) VLAN only",
+		.get = mvsw61xx_get_vlan_port_based,
+		.set = mvsw61xx_set_vlan_port_based,
+	},
+	[MVSW61XX_VLAN_ID] = {
+		.id = MVSW61XX_VLAN_ID,
+		.type = SWITCH_TYPE_INT,
+		.name = "vid",
+		.description = "Get/set VLAN ID",
+		.get = mvsw61xx_get_vid,
+		.set = mvsw61xx_set_vid,
+	},
+};
+
+static const struct switch_attr mvsw61xx_port[] = {
+	[MVSW61XX_PORT_MASK] = {
+		.id = MVSW61XX_PORT_MASK,
+		.type = SWITCH_TYPE_STRING,
+		.description = "Port-based VLAN mask",
+		.name = "mask",
+		.get = mvsw61xx_get_port_mask,
+		.set = NULL,
+	},
+	[MVSW61XX_PORT_QMODE] = {
+		.id = MVSW61XX_PORT_QMODE,
+		.type = SWITCH_TYPE_INT,
+		.description = "802.1q mode: 0=off/1=fallback/2=check/3=secure",
+		.name = "qmode",
+		.get = mvsw61xx_get_port_qmode,
+		.set = mvsw61xx_set_port_qmode,
+	},
+	[MVSW61XX_PORT_STATUS] = {
+		.id = MVSW61XX_PORT_STATUS,
+		.type = SWITCH_TYPE_STRING,
+		.description = "Return port status",
+		.name = "status",
+		.get = mvsw61xx_get_port_status,
+		.set = NULL,
+	},
+	[MVSW61XX_PORT_LINK] = {
+		.id = MVSW61XX_PORT_LINK,
+		.type = SWITCH_TYPE_INT,
+		.description = "Get link speed",
+		.name = "link",
+		.get = mvsw61xx_get_port_speed,
+		.set = NULL,
+	},
+};
+
+static const struct switch_dev_ops mvsw61xx_ops = {
+	.attr_global = {
+		.attr = mvsw61xx_global,
+		.n_attr = ARRAY_SIZE(mvsw61xx_global),
+	},
+	.attr_vlan = {
+		.attr = mvsw61xx_vlan,
+		.n_attr = ARRAY_SIZE(mvsw61xx_vlan),
+	},
+	.attr_port = {
+		.attr = mvsw61xx_port,
+		.n_attr = ARRAY_SIZE(mvsw61xx_port),
+	},
+	.get_port_pvid = mvsw61xx_get_pvid,
+	.set_port_pvid = mvsw61xx_set_pvid,
+	.get_vlan_ports = mvsw61xx_get_vlan_ports,
+	.set_vlan_ports = mvsw61xx_set_vlan_ports,
+	.apply_config = mvsw61xx_apply,
+	.reset_switch = mvsw61xx_reset,
+};
+
+/* end swconfig stuff */
+
+static int mvsw61xx_probe(struct platform_device *pdev)
+{
+	struct mvsw61xx_state *state;
+	struct device_node *np = pdev->dev.of_node;
+	struct device_node *mdio;
+	u32 val;
+	u16 reg;
+	int err;
+
+	state = kzalloc(sizeof(*state), GFP_KERNEL);
+	if (!state)
+		return -ENOMEM;
+
+	mdio = of_parse_phandle(np, "mii-bus", 0);
+	if (!mdio) {
+		dev_err(&pdev->dev, "Couldn't get MII bus handle\n");
+		err = -ENODEV;
+		goto out_err;
+	}
+
+	state->bus = of_mdio_find_bus(mdio);
+	if (!state->bus) {
+		dev_err(&pdev->dev, "Couldn't find MII bus from handle\n");
+		err = -ENODEV;
+		goto out_err;
+	}
+
+	state->is_indirect = of_property_read_bool(np, "is-indirect");
+
+	if (state->is_indirect) {
+		if (of_property_read_u32(np, "reg", &val)) {
+			dev_err(&pdev->dev, "Switch address not specified\n");
+			err = -ENODEV;
+			goto out_err;
+		}
+
+		state->base_addr = val;
+	} else {
+		state->base_addr = MV_BASE;
+	}
+
+	reg = r16(state->bus, state->is_indirect, state->base_addr,
+			MV_PORTREG(IDENT, 0)) & MV_IDENT_MASK;
+	if (reg != MV_IDENT_VALUE) {
+		dev_err(&pdev->dev, "No switch found at 0x%02x\n",
+				state->base_addr);
+		err = -ENODEV;
+		goto out_err;
+	}
+
+	platform_set_drvdata(pdev, state);
+	dev_info(&pdev->dev, "Found %s at %s:%02x\n", MV_IDENT_STR,
+			state->bus->id, state->base_addr);
+
+	dev_info(&pdev->dev, "Using %sdirect addressing\n",
+			(state->is_indirect ? "in" : ""));
+
+	if (of_property_read_u32(np, "cpu-port-0", &val)) {
+		dev_err(&pdev->dev, "CPU port not set\n");
+		err = -ENODEV;
+		goto out_err;
+	}
+
+	state->cpu_port0 = val;
+
+	if (!of_property_read_u32(np, "cpu-port-1", &val))
+		state->cpu_port1 = val;
+	else
+		state->cpu_port1 = -1;
+
+	state->dev.vlans = MV_VLANS;
+	state->dev.cpu_port = state->cpu_port0;
+	state->dev.ports = MV_PORTS;
+	state->dev.name = MV_IDENT_STR;
+	state->dev.ops = &mvsw61xx_ops;
+	state->dev.alias = dev_name(&pdev->dev);
+
+	err = register_switch(&state->dev, NULL);
+	if (err < 0)
+		goto out_err;
+
+	state->registered = true;
+
+	return 0;
+out_err:
+	kfree(state);
+	return err;
+}
+
+static int
+mvsw61xx_remove(struct platform_device *pdev)
+{
+	struct mvsw61xx_state *state = platform_get_drvdata(pdev);
+
+	if (state->registered)
+		unregister_switch(&state->dev);
+
+	kfree(state);
+
+	return 0;
+}
+
+static const struct of_device_id mvsw61xx_match[] = {
+	{ .compatible = "marvell,88e6171" },
+	{ }
+};
+MODULE_DEVICE_TABLE(of, mvsw61xx_match);
+
+static struct platform_driver mvsw61xx_driver = {
+	.probe = mvsw61xx_probe,
+	.remove = mvsw61xx_remove,
+	.driver = {
+		.name = "mvsw61xx",
+		.of_match_table = of_match_ptr(mvsw61xx_match),
+		.owner = THIS_MODULE,
+	},
+};
+
+static int __init mvsw61xx_module_init(void)
+{
+	return platform_driver_register(&mvsw61xx_driver);
+}
+late_initcall(mvsw61xx_module_init);
+
+static void __exit mvsw61xx_module_exit(void)
+{
+	platform_driver_unregister(&mvsw61xx_driver);
+}
+module_exit(mvsw61xx_module_exit);
diff --git a/target/linux/generic/files/drivers/net/phy/mvsw61xx.h b/target/linux/generic/files/drivers/net/phy/mvsw61xx.h
new file mode 100644
index 0000000..bd9d60a
--- /dev/null
+++ b/target/linux/generic/files/drivers/net/phy/mvsw61xx.h
@@ -0,0 +1,230 @@
+/*
+ * Marvell 88E61xx switch driver
+ *
+ * Copyright (c) 2014 Claudio Leite <leitec at staticky.com>
+ *
+ * Based on code (c) 2008 Felix Fietkau <nbd at openwrt.org>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License v2 as published by the
+ * Free Software Foundation
+ */
+
+#ifndef __MVSW61XX_H
+#define __MVSW61XX_H
+
+#define MV_PORTS			7
+#define MV_PORTS_MASK			((1 << MV_PORTS) - 1)
+
+#define MV_CPUPORT			6
+
+#define MV_BASE				0x10
+
+#define MV_SWITCHPORT_BASE		0x10
+#define MV_SWITCHPORT(_n)		(MV_SWITCHPORT_BASE + (_n))
+#define MV_SWITCHREGS			(MV_BASE + 0xb)
+
+#define MV_VLANS			64
+
+enum {
+	MV_PORT_STATUS			= 0x00,
+	MV_PORT_FORCE			= 0x01,
+	MV_PORT_PAUSE			= 0x02,
+	MV_PORT_IDENT			= 0x03,
+	MV_PORT_CONTROL			= 0x04,
+	MV_PORT_CONTROL1		= 0x05,
+	MV_PORT_VLANMAP			= 0x06,
+	MV_PORT_VLANID			= 0x07,
+	MV_PORT_CONTROL2		= 0x08,
+	MV_PORT_ASSOC			= 0x0b,
+	MV_PORT_RXCOUNT			= 0x10,
+	MV_PORT_TXCOUNT			= 0x11,
+};
+#define MV_PORTREG(_type, _port) MV_SWITCHPORT(_port), MV_PORT_##_type
+
+enum {
+	MV_PORT_STATUS_FDX		= (1 << 10),
+	MV_PORT_STATUS_LINK		= (1 << 11),
+};
+
+enum {
+	MV_PORT_STATUS_SPEED_10		= 0x00,
+	MV_PORT_STATUS_SPEED_100	= 0x01,
+	MV_PORT_STATUS_SPEED_1000	= 0x02,
+};
+#define MV_PORT_STATUS_SPEED_SHIFT	8
+#define MV_PORT_STATUS_SPEED_MASK	(3 << 8)
+
+enum {
+	MV_PORTCTRL_BLOCK		= (1 << 0),
+	MV_PORTCTRL_LEARN		= (2 << 0),
+	MV_PORTCTRL_ENABLED		= (3 << 0),
+	MV_PORTCTRL_VLANTUN		= (1 << 7),
+	MV_PORTCTRL_EGRESS		= (1 << 12),
+};
+
+#define MV_FORCE_FC_MASK		(3 << 6)
+
+enum {
+	MV_FORCE_FC_ENABLE		= (3 << 6),
+	MV_FORCE_FC_DISABLE		= (1 << 6),
+};
+
+enum {
+	MV_8021Q_EGRESS_UNMODIFIED	= 0x00,
+	MV_8021Q_EGRESS_UNTAGGED	= 0x01,
+	MV_8021Q_EGRESS_TAGGED		= 0x02,
+	MV_8021Q_EGRESS_ADDTAG		= 0x03,
+};
+
+#define MV_8021Q_MODE_SHIFT		10
+#define MV_8021Q_MODE_MASK		(0x3 << MV_8021Q_MODE_SHIFT)
+
+enum {
+	MV_8021Q_MODE_DISABLE		= 0x00,
+	MV_8021Q_MODE_FALLBACK		= 0x01,
+	MV_8021Q_MODE_CHECK		= 0x02,
+	MV_8021Q_MODE_SECURE		= 0x03,
+};
+
+#define MV_PORTASSOC_MONITOR		(1 << 15)
+
+enum {
+	MV_SWITCH_MAC0			= 0x01,
+	MV_SWITCH_MAC1			= 0x02,
+	MV_SWITCH_MAC2			= 0x03,
+	MV_SWITCH_CTRL			= 0x04,
+	MV_SWITCH_ATU_CTRL		= 0x0a,
+	MV_SWITCH_ATU_OP		= 0x0b,
+	MV_SWITCH_ATU_DATA		= 0x0c,
+	MV_SWITCH_ATU_MAC0		= 0x0d,
+	MV_SWITCH_ATU_MAC1		= 0x0e,
+	MV_SWITCH_ATU_MAC2		= 0x0f,
+	MV_SWITCH_GLOBAL		= 0x1b,
+	MV_SWITCH_GLOBAL2		= 0x1c,
+};
+#define MV_SWITCHREG(_type) MV_SWITCHREGS, MV_SWITCH_##_type
+
+enum {
+	MV_SWITCHCTL_EEIE		= (1 << 0),
+	MV_SWITCHCTL_PHYIE		= (1 << 1),
+	MV_SWITCHCTL_ATUDONE		= (1 << 2),
+	MV_SWITCHCTL_ATUIE		= (1 << 3),
+	MV_SWITCHCTL_CTRMODE		= (1 << 8),
+	MV_SWITCHCTL_RELOAD		= (1 << 9),
+	MV_SWITCHCTL_MSIZE		= (1 << 10),
+	MV_SWITCHCTL_DROP		= (1 << 13),
+};
+
+enum {
+#define MV_ATUCTL_AGETIME_MIN		16
+#define MV_ATUCTL_AGETIME_MAX		4080
+#define MV_ATUCTL_AGETIME(_n)		((((_n) / 16) & 0xff) << 4)
+	MV_ATUCTL_ATU_256		= (0 << 12),
+	MV_ATUCTL_ATU_512		= (1 << 12),
+	MV_ATUCTL_ATU_1K		= (2 << 12),
+	MV_ATUCTL_ATUMASK		= (3 << 12),
+	MV_ATUCTL_NO_LEARN		= (1 << 14),
+	MV_ATUCTL_RESET			= (1 << 15),
+};
+
+enum {
+#define MV_ATUOP_DBNUM(_n)		((_n) & 0x0f)
+	MV_ATUOP_NOOP			= (0 << 12),
+	MV_ATUOP_FLUSH_ALL		= (1 << 12),
+	MV_ATUOP_FLUSH_U		= (2 << 12),
+	MV_ATUOP_LOAD_DB		= (3 << 12),
+	MV_ATUOP_GET_NEXT		= (4 << 12),
+	MV_ATUOP_FLUSH_DB		= (5 << 12),
+	MV_ATUOP_FLUSH_DB_UU		= (6 << 12),
+	MV_ATUOP_INPROGRESS		= (1 << 15),
+};
+
+enum {
+	MV_GLOBAL_STATUS		= 0x00,
+	MV_GLOBAL_CONTROL		= 0x04,
+	MV_GLOBAL_VTU_OP		= 0x05,
+	MV_GLOBAL_VTU_VID		= 0x06,
+	MV_GLOBAL_VTU_DATA1		= 0x07,
+	MV_GLOBAL_VTU_DATA2		= 0x08,
+	MV_GLOBAL_VTU_DATA3		= 0x09,
+};
+#define MV_GLOBALREG(_type) MV_SWITCH_GLOBAL, MV_GLOBAL_##_type
+
+enum {
+	MV_GLOBAL2_SDET_POLARITY	= 0x1D,
+};
+#define MV_GLOBAL2REG(_type) MV_SWITCH_GLOBAL2, MV_GLOBAL2_##_type
+
+enum {
+	MV_VTUOP_VALID			= (1 << 12),
+	MV_VTUOP_LOAD			= (3 << 12),
+	MV_VTUOP_INPROGRESS		= (1 << 15),
+};
+
+enum {
+	MV_CONTROL_RESET		= (1 << 15),
+	MV_CONTROL_PPU_ENABLE		= (1 << 14),
+};
+
+enum {
+	MV_VTUCTL_EGRESS_UNMODIFIED	= 0x00,
+	MV_VTUCTL_EGRESS_UNTAGGED	= 0x01,
+	MV_VTUCTL_EGRESS_TAGGED		= 0x02,
+	MV_VTUCTL_DISCARD		= 0x03,
+};
+
+enum {
+	MV_8021Q_VLAN_ONLY		= (1 << 15),
+};
+
+enum {
+	MV_INDIRECT_REG_CMD		= 0,
+	MV_INDIRECT_REG_DATA		= 1,
+};
+
+enum {
+	MV_INDIRECT_INPROGRESS		= 0x8000,
+	MV_INDIRECT_WRITE		= 0x9400,
+	MV_INDIRECT_READ		= 0x9800,
+};
+#define MV_INDIRECT_ADDR_S		5
+
+#define MV_IDENT_MASK			0xffc0
+#define MV_IDENT_VALUE			0x1700
+#define MV_IDENT_STR			"MV88E617x"
+
+#define MV_PVID_MASK			0x0fff
+
+struct mvsw61xx_state {
+	struct switch_dev dev;
+	struct mii_bus *bus;
+	int base_addr;
+
+	bool registered;
+	bool is_indirect;
+
+	int cpu_port0;
+	int cpu_port1;
+
+	int vlan_enabled;
+	struct port_state {
+		u16 pvid;
+		u16 mask;
+		u8 qmode;
+	} ports[MV_PORTS];
+
+	struct vlan_state {
+		bool port_based;
+
+		u16 mask;
+		u16 vid;
+		u32 port_mode;
+	} vlans[MV_VLANS];
+
+	char buf[128];
+};
+
+#define get_state(_dev) container_of((_dev), struct mvsw61xx_state, dev)
+
+#endif
diff --git a/target/linux/generic/patches-3.14/733-phy_mvsw6171.patch b/target/linux/generic/patches-3.14/733-phy_mvsw6171.patch
deleted file mode 100644
index 775323a..0000000
--- a/target/linux/generic/patches-3.14/733-phy_mvsw6171.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- a/drivers/net/phy/Kconfig
-+++ b/drivers/net/phy/Kconfig
-@@ -131,6 +131,10 @@ config MVSWITCH_PHY
- 	tristate "Driver for Marvell 88E6060 switches"
- 	select ETHERNET_PACKET_MANGLE
- 
-+config MVSW6171_PHY
-+	tristate "Driver for Marvell 88E6171/6172 switches"
-+	select SWCONFIG
-+
- config IP17XX_PHY
- 	tristate "Driver for IC+ IP17xx switches"
- 	select SWCONFIG
---- a/drivers/net/phy/Makefile
-+++ b/drivers/net/phy/Makefile
-@@ -19,6 +19,7 @@ obj-$(CONFIG_BCM87XX_PHY)	+= bcm87xx.o
- obj-$(CONFIG_ICPLUS_PHY)	+= icplus.o
- obj-$(CONFIG_ADM6996_PHY)	+= adm6996.o
- obj-$(CONFIG_MVSWITCH_PHY)	+= mvswitch.o
-+obj-$(CONFIG_MVSW6171_PHY)	+= mvsw6171.o
- obj-$(CONFIG_IP17XX_PHY)	+= ip17xx.o
- obj-$(CONFIG_REALTEK_PHY)	+= realtek.o
- obj-$(CONFIG_AR8216_PHY)	+= ar8216.o ar8327.o
diff --git a/target/linux/generic/patches-3.14/733-phy_mvsw61xx.patch b/target/linux/generic/patches-3.14/733-phy_mvsw61xx.patch
new file mode 100644
index 0000000..45dd4c6
--- /dev/null
+++ b/target/linux/generic/patches-3.14/733-phy_mvsw61xx.patch
@@ -0,0 +1,23 @@
+--- a/drivers/net/phy/Kconfig
++++ b/drivers/net/phy/Kconfig
+@@ -131,6 +131,10 @@ config MVSWITCH_PHY
+ 	tristate "Driver for Marvell 88E6060 switches"
+ 	select ETHERNET_PACKET_MANGLE
+ 
++config MVSW61XX_PHY
++	tristate "Driver for Marvell 88E6171/6172 switches"
++	select SWCONFIG
++
+ config IP17XX_PHY
+ 	tristate "Driver for IC+ IP17xx switches"
+ 	select SWCONFIG
+--- a/drivers/net/phy/Makefile
++++ b/drivers/net/phy/Makefile
+@@ -19,6 +19,7 @@ obj-$(CONFIG_BCM87XX_PHY)	+= bcm87xx.o
+ obj-$(CONFIG_ICPLUS_PHY)	+= icplus.o
+ obj-$(CONFIG_ADM6996_PHY)	+= adm6996.o
+ obj-$(CONFIG_MVSWITCH_PHY)	+= mvswitch.o
++obj-$(CONFIG_MVSW61XX_PHY)	+= mvsw61xx.o
+ obj-$(CONFIG_IP17XX_PHY)	+= ip17xx.o
+ obj-$(CONFIG_REALTEK_PHY)	+= realtek.o
+ obj-$(CONFIG_AR8216_PHY)	+= ar8216.o ar8327.o
diff --git a/target/linux/generic/patches-3.18/733-phy_mvsw6171.patch b/target/linux/generic/patches-3.18/733-phy_mvsw6171.patch
deleted file mode 100644
index 0221fc3..0000000
--- a/target/linux/generic/patches-3.18/733-phy_mvsw6171.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- a/drivers/net/phy/Kconfig
-+++ b/drivers/net/phy/Kconfig
-@@ -143,6 +143,10 @@ config MVSWITCH_PHY
- 	tristate "Driver for Marvell 88E6060 switches"
- 	select ETHERNET_PACKET_MANGLE
- 
-+config MVSW6171_PHY
-+	tristate "Driver for Marvell 88E6171/6172 switches"
-+	select SWCONFIG
-+
- config IP17XX_PHY
- 	tristate "Driver for IC+ IP17xx switches"
- 	select SWCONFIG
---- a/drivers/net/phy/Makefile
-+++ b/drivers/net/phy/Makefile
-@@ -20,6 +20,7 @@ obj-$(CONFIG_BCM87XX_PHY)	+= bcm87xx.o
- obj-$(CONFIG_ICPLUS_PHY)	+= icplus.o
- obj-$(CONFIG_ADM6996_PHY)	+= adm6996.o
- obj-$(CONFIG_MVSWITCH_PHY)	+= mvswitch.o
-+obj-$(CONFIG_MVSW6171_PHY)	+= mvsw6171.o
- obj-$(CONFIG_IP17XX_PHY)	+= ip17xx.o
- obj-$(CONFIG_REALTEK_PHY)	+= realtek.o
- obj-$(CONFIG_AR8216_PHY)	+= ar8216.o ar8327.o
diff --git a/target/linux/generic/patches-3.18/733-phy_mvsw61xx.patch b/target/linux/generic/patches-3.18/733-phy_mvsw61xx.patch
new file mode 100644
index 0000000..041d168
--- /dev/null
+++ b/target/linux/generic/patches-3.18/733-phy_mvsw61xx.patch
@@ -0,0 +1,23 @@
+--- a/drivers/net/phy/Kconfig
++++ b/drivers/net/phy/Kconfig
+@@ -143,6 +143,10 @@ config MVSWITCH_PHY
+ 	tristate "Driver for Marvell 88E6060 switches"
+ 	select ETHERNET_PACKET_MANGLE
+ 
++config MVSW61XX_PHY
++	tristate "Driver for Marvell 88E6171/6172 switches"
++	select SWCONFIG
++
+ config IP17XX_PHY
+ 	tristate "Driver for IC+ IP17xx switches"
+ 	select SWCONFIG
+--- a/drivers/net/phy/Makefile
++++ b/drivers/net/phy/Makefile
+@@ -20,6 +20,7 @@ obj-$(CONFIG_BCM87XX_PHY)	+= bcm87xx.o
+ obj-$(CONFIG_ICPLUS_PHY)	+= icplus.o
+ obj-$(CONFIG_ADM6996_PHY)	+= adm6996.o
+ obj-$(CONFIG_MVSWITCH_PHY)	+= mvswitch.o
++obj-$(CONFIG_MVSW61XX_PHY)	+= mvsw61xx.o
+ obj-$(CONFIG_IP17XX_PHY)	+= ip17xx.o
+ obj-$(CONFIG_REALTEK_PHY)	+= realtek.o
+ obj-$(CONFIG_AR8216_PHY)	+= ar8216.o ar8327.o
diff --git a/target/linux/kirkwood/config-3.14 b/target/linux/kirkwood/config-3.14
index 641b0f8..f510188 100644
--- a/target/linux/kirkwood/config-3.14
+++ b/target/linux/kirkwood/config-3.14
@@ -206,7 +206,7 @@ CONFIG_MVEBU_CLK_COMMON=y
 CONFIG_MVEBU_MBUS=y
 CONFIG_MVMDIO=y
 # CONFIG_MVNETA is not set
-CONFIG_MVSW6171_PHY=y
+CONFIG_MVSW61XX_PHY=y
 CONFIG_NEED_DMA_MAP_STATE=y
 CONFIG_NEED_KUSER_HELPERS=y
 CONFIG_NEED_PER_CPU_KM=y
diff --git a/target/linux/kirkwood/config-3.18 b/target/linux/kirkwood/config-3.18
index b820597..c572a86 100644
--- a/target/linux/kirkwood/config-3.18
+++ b/target/linux/kirkwood/config-3.18
@@ -219,7 +219,7 @@ CONFIG_MVEBU_CLK_COMMON=y
 CONFIG_MVEBU_MBUS=y
 CONFIG_MVMDIO=y
 # CONFIG_MVNETA is not set
-CONFIG_MVSW6171_PHY=y
+CONFIG_MVSW61XX_PHY=y
 CONFIG_NEED_DMA_MAP_STATE=y
 CONFIG_NEED_KUSER_HELPERS=y
 CONFIG_NEED_PER_CPU_KM=y
diff --git a/target/linux/kirkwood/patches-3.14/160-ea4500.patch b/target/linux/kirkwood/patches-3.14/160-ea4500.patch
index eeed2a4..d1301df 100644
--- a/target/linux/kirkwood/patches-3.14/160-ea4500.patch
+++ b/target/linux/kirkwood/patches-3.14/160-ea4500.patch
@@ -121,7 +121,7 @@
 +		};
 +	};
 +
-+	mvsw6171 {
++	mvsw61xx {
 +		compatible = "marvell,88e6171";
 +		status = "okay";
 +		reg = <0x10>;
diff --git a/target/linux/kirkwood/patches-3.18/160-ea4500.patch b/target/linux/kirkwood/patches-3.18/160-ea4500.patch
index 7456b13..386b5ea 100644
--- a/target/linux/kirkwood/patches-3.18/160-ea4500.patch
+++ b/target/linux/kirkwood/patches-3.18/160-ea4500.patch
@@ -121,7 +121,7 @@
 +		};
 +	};
 +
-+	mvsw6171 {
++	mvsw61xx {
 +		compatible = "marvell,88e6171";
 +		status = "okay";
 +		reg = <0x10>;
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From leitec at staticky.com  Fri Jan  9 12:12:48 2015
From: leitec at staticky.com (Claudio Leite)
Date: Fri,  9 Jan 2015 12:12:48 -0500
Subject: [OpenWrt-Devel] [PATCH 2/4] mvsw61xx: rework chip recognition
In-Reply-To: <1420823570-8706-1-git-send-email-leitec@staticky.com>
References: <1420823570-8706-1-git-send-email-leitec@staticky.com>
Message-ID: <1420823570-8706-2-git-send-email-leitec@staticky.com>

Recognizes 88E6171/6172/6176 at the moment.

Signed-off-by: Claudio Leite <leitec at staticky.com>
---
 .../linux/generic/files/drivers/net/phy/mvsw61xx.c | 27 ++++++++++++++++------
 .../linux/generic/files/drivers/net/phy/mvsw61xx.h | 14 ++++++++---
 2 files changed, 31 insertions(+), 10 deletions(-)

diff --git a/target/linux/generic/files/drivers/net/phy/mvsw61xx.c b/target/linux/generic/files/drivers/net/phy/mvsw61xx.c
index 7199de0..865bd11 100644
--- a/target/linux/generic/files/drivers/net/phy/mvsw61xx.c
+++ b/target/linux/generic/files/drivers/net/phy/mvsw61xx.c
@@ -740,8 +740,8 @@ static int mvsw61xx_probe(struct platform_device *pdev)
 	struct mvsw61xx_state *state;
 	struct device_node *np = pdev->dev.of_node;
 	struct device_node *mdio;
+	char *model_str;
 	u32 val;
-	u16 reg;
 	int err;
 
 	state = kzalloc(sizeof(*state), GFP_KERNEL);
@@ -776,17 +776,28 @@ static int mvsw61xx_probe(struct platform_device *pdev)
 		state->base_addr = MV_BASE;
 	}
 
-	reg = r16(state->bus, state->is_indirect, state->base_addr,
-			MV_PORTREG(IDENT, 0)) & MV_IDENT_MASK;
-	if (reg != MV_IDENT_VALUE) {
-		dev_err(&pdev->dev, "No switch found at 0x%02x\n",
+	state->model = r16(state->bus, state->is_indirect, state->base_addr,
+				MV_PORTREG(IDENT, 0)) & MV_IDENT_MASK;
+
+	switch(state->model) {
+	case MV_IDENT_VALUE_6171:
+		model_str = MV_IDENT_STR_6171;
+		break;
+	case MV_IDENT_VALUE_6172:
+		model_str = MV_IDENT_STR_6172;
+		break;
+	case MV_IDENT_VALUE_6176:
+		model_str = MV_IDENT_STR_6176;
+		break;
+	default:
+		dev_err(&pdev->dev, "No compatible switch found at 0x%02x\n",
 				state->base_addr);
 		err = -ENODEV;
 		goto out_err;
 	}
 
 	platform_set_drvdata(pdev, state);
-	dev_info(&pdev->dev, "Found %s at %s:%02x\n", MV_IDENT_STR,
+	dev_info(&pdev->dev, "Found %s at %s:%02x\n", model_str,
 			state->bus->id, state->base_addr);
 
 	dev_info(&pdev->dev, "Using %sdirect addressing\n",
@@ -808,7 +819,7 @@ static int mvsw61xx_probe(struct platform_device *pdev)
 	state->dev.vlans = MV_VLANS;
 	state->dev.cpu_port = state->cpu_port0;
 	state->dev.ports = MV_PORTS;
-	state->dev.name = MV_IDENT_STR;
+	state->dev.name = model_str;
 	state->dev.ops = &mvsw61xx_ops;
 	state->dev.alias = dev_name(&pdev->dev);
 
@@ -839,6 +850,8 @@ mvsw61xx_remove(struct platform_device *pdev)
 
 static const struct of_device_id mvsw61xx_match[] = {
 	{ .compatible = "marvell,88e6171" },
+	{ .compatible = "marvell,88e6172" },
+	{ .compatible = "marvell,88e6176" },
 	{ }
 };
 MODULE_DEVICE_TABLE(of, mvsw61xx_match);
diff --git a/target/linux/generic/files/drivers/net/phy/mvsw61xx.h b/target/linux/generic/files/drivers/net/phy/mvsw61xx.h
index bd9d60a..d61d21f 100644
--- a/target/linux/generic/files/drivers/net/phy/mvsw61xx.h
+++ b/target/linux/generic/files/drivers/net/phy/mvsw61xx.h
@@ -190,9 +190,16 @@ enum {
 };
 #define MV_INDIRECT_ADDR_S		5
 
-#define MV_IDENT_MASK			0xffc0
-#define MV_IDENT_VALUE			0x1700
-#define MV_IDENT_STR			"MV88E617x"
+#define MV_IDENT_MASK			0xfff0
+
+#define MV_IDENT_VALUE_6171		0x1710
+#define MV_IDENT_STR_6171		"MV88E6171"
+
+#define MV_IDENT_VALUE_6172		0x1720
+#define MV_IDENT_STR_6172		"MV88E6172"
+
+#define MV_IDENT_VALUE_6176		0x1760
+#define MV_IDENT_STR_6176		"MV88E6176"
 
 #define MV_PVID_MASK			0x0fff
 
@@ -200,6 +207,7 @@ struct mvsw61xx_state {
 	struct switch_dev dev;
 	struct mii_bus *bus;
 	int base_addr;
+	u16 model;
 
 	bool registered;
 	bool is_indirect;
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From leitec at staticky.com  Fri Jan  9 12:12:49 2015
From: leitec at staticky.com (Claudio Leite)
Date: Fri,  9 Jan 2015 12:12:49 -0500
Subject: [OpenWrt-Devel] [PATCH 3/4] mvsw61xx: clean up and expand register
	definitions
In-Reply-To: <1420823570-8706-1-git-send-email-leitec@staticky.com>
References: <1420823570-8706-1-git-send-email-leitec@staticky.com>
Message-ID: <1420823570-8706-3-git-send-email-leitec@staticky.com>

- eliminate MV_CPUPORT; not necessary since we define
  the CPU port(s) via Device Tree

- add STU and expand VTU operations

- update register names to match those of 88E61xx rather than
  mvswitch's 88E6060

- use more consistent formatting

Signed-off-by: Claudio Leite <leitec at staticky.com>
---
 .../linux/generic/files/drivers/net/phy/mvsw61xx.c | 14 ++---
 .../linux/generic/files/drivers/net/phy/mvsw61xx.h | 65 ++++++++++++++--------
 2 files changed, 50 insertions(+), 29 deletions(-)

diff --git a/target/linux/generic/files/drivers/net/phy/mvsw61xx.c b/target/linux/generic/files/drivers/net/phy/mvsw61xx.c
index 865bd11..7ddb13e 100644
--- a/target/linux/generic/files/drivers/net/phy/mvsw61xx.c
+++ b/target/linux/generic/files/drivers/net/phy/mvsw61xx.c
@@ -454,7 +454,7 @@ static int mvsw61xx_vtu_program(struct switch_dev *dev)
 	mvsw61xx_wait_mask_s(dev, MV_GLOBALREG(VTU_OP),
 			MV_VTUOP_INPROGRESS, 0);
 	sw16(dev, MV_GLOBALREG(VTU_OP),
-			MV_VTUOP_INPROGRESS | MV_VTUOP_VALID);
+			MV_VTUOP_INPROGRESS | MV_VTUOP_PURGE);
 
 	/* Write VLAN table */
 	for (i = 1; i < dev->vlans; i++) {
@@ -467,7 +467,7 @@ static int mvsw61xx_vtu_program(struct switch_dev *dev)
 				MV_VTUOP_INPROGRESS, 0);
 
 		sw16(dev, MV_GLOBALREG(VTU_VID),
-				MV_VTUOP_VALID | state->vlans[i].vid);
+				MV_VTU_VID_VALID | state->vlans[i].vid);
 
 		v1 = (u16)(state->vlans[i].port_mode & 0xffff);
 		v2 = (u16)((state->vlans[i].port_mode >> 16) & 0xffff);
@@ -585,7 +585,7 @@ static int mvsw61xx_reset(struct switch_dev *dev)
 	/* Disable all ports before reset */
 	for (i = 0; i < dev->ports; i++) {
 		reg = sr16(dev, MV_PORTREG(CONTROL, i)) &
-			~MV_PORTCTRL_ENABLED;
+			~MV_PORTCTRL_FORWARDING;
 		sw16(dev, MV_PORTREG(CONTROL, i), reg);
 	}
 
@@ -602,9 +602,9 @@ static int mvsw61xx_reset(struct switch_dev *dev)
 		state->ports[i].pvid = 0;
 
 		/* Force flow control off */
-		reg = sr16(dev, MV_PORTREG(FORCE, i)) & ~MV_FORCE_FC_MASK;
-		reg |= MV_FORCE_FC_DISABLE;
-		sw16(dev, MV_PORTREG(FORCE, i), reg);
+		reg = sr16(dev, MV_PORTREG(PHYCTL, i)) & ~MV_PHYCTL_FC_MASK;
+		reg |= MV_PHYCTL_FC_DISABLE;
+		sw16(dev, MV_PORTREG(PHYCTL, i), reg);
 
 		/* Set port association vector */
 		sw16(dev, MV_PORTREG(ASSOC, i), (1 << i));
@@ -624,7 +624,7 @@ static int mvsw61xx_reset(struct switch_dev *dev)
 	/* Re-enable ports */
 	for (i = 0; i < dev->ports; i++) {
 		reg = sr16(dev, MV_PORTREG(CONTROL, i)) |
-			MV_PORTCTRL_ENABLED;
+			MV_PORTCTRL_FORWARDING;
 		sw16(dev, MV_PORTREG(CONTROL, i), reg);
 	}
 
diff --git a/target/linux/generic/files/drivers/net/phy/mvsw61xx.h b/target/linux/generic/files/drivers/net/phy/mvsw61xx.h
index d61d21f..8bd6f9a 100644
--- a/target/linux/generic/files/drivers/net/phy/mvsw61xx.h
+++ b/target/linux/generic/files/drivers/net/phy/mvsw61xx.h
@@ -2,6 +2,7 @@
  * Marvell 88E61xx switch driver
  *
  * Copyright (c) 2014 Claudio Leite <leitec at staticky.com>
+ * Copyright (c) 2014 Nikita Nazarenko <nnazarenko at radiofid.com>
  *
  * Based on code (c) 2008 Felix Fietkau <nbd at openwrt.org>
  *
@@ -16,8 +17,6 @@
 #define MV_PORTS			7
 #define MV_PORTS_MASK			((1 << MV_PORTS) - 1)
 
-#define MV_CPUPORT			6
-
 #define MV_BASE				0x10
 
 #define MV_SWITCHPORT_BASE		0x10
@@ -28,8 +27,8 @@
 
 enum {
 	MV_PORT_STATUS			= 0x00,
-	MV_PORT_FORCE			= 0x01,
-	MV_PORT_PAUSE			= 0x02,
+	MV_PORT_PHYCTL			= 0x01,
+	MV_PORT_JAMCTL			= 0x02,
 	MV_PORT_IDENT			= 0x03,
 	MV_PORT_CONTROL			= 0x04,
 	MV_PORT_CONTROL1		= 0x05,
@@ -37,8 +36,10 @@ enum {
 	MV_PORT_VLANID			= 0x07,
 	MV_PORT_CONTROL2		= 0x08,
 	MV_PORT_ASSOC			= 0x0b,
-	MV_PORT_RXCOUNT			= 0x10,
-	MV_PORT_TXCOUNT			= 0x11,
+	MV_PORT_RX_DISCARD_LOW		= 0x10,
+	MV_PORT_RX_DISCARD_HIGH		= 0x11,
+	MV_PORT_IN_FILTERED		= 0x12,
+	MV_PORT_OUT_ACCEPTED		= 0x13,
 };
 #define MV_PORTREG(_type, _port) MV_SWITCHPORT(_port), MV_PORT_##_type
 
@@ -56,18 +57,19 @@ enum {
 #define MV_PORT_STATUS_SPEED_MASK	(3 << 8)
 
 enum {
-	MV_PORTCTRL_BLOCK		= (1 << 0),
-	MV_PORTCTRL_LEARN		= (2 << 0),
-	MV_PORTCTRL_ENABLED		= (3 << 0),
+	MV_PORTCTRL_DISABLED		= (0 << 0),
+	MV_PORTCTRL_BLOCKING		= (1 << 0),
+	MV_PORTCTRL_LEARNING		= (2 << 0),
+	MV_PORTCTRL_FORWARDING		= (3 << 0),
 	MV_PORTCTRL_VLANTUN		= (1 << 7),
 	MV_PORTCTRL_EGRESS		= (1 << 12),
 };
 
-#define MV_FORCE_FC_MASK		(3 << 6)
+#define MV_PHYCTL_FC_MASK		(3 << 6)
 
 enum {
-	MV_FORCE_FC_ENABLE		= (3 << 6),
-	MV_FORCE_FC_DISABLE		= (1 << 6),
+	MV_PHYCTL_FC_ENABLE		= (3 << 6),
+	MV_PHYCTL_FC_DISABLE		= (1 << 6),
 };
 
 enum {
@@ -87,12 +89,16 @@ enum {
 	MV_8021Q_MODE_SECURE		= 0x03,
 };
 
+enum {
+	MV_8021Q_VLAN_ONLY		= (1 << 15),
+};
+
 #define MV_PORTASSOC_MONITOR		(1 << 15)
 
 enum {
-	MV_SWITCH_MAC0			= 0x01,
-	MV_SWITCH_MAC1			= 0x02,
-	MV_SWITCH_MAC2			= 0x03,
+	MV_SWITCH_ATU_FID0		= 0x01,
+	MV_SWITCH_ATU_FID1		= 0x02,
+	MV_SWITCH_ATU_SID		= 0x03,
 	MV_SWITCH_CTRL			= 0x04,
 	MV_SWITCH_ATU_CTRL		= 0x0a,
 	MV_SWITCH_ATU_OP		= 0x0b,
@@ -142,24 +148,36 @@ enum {
 
 enum {
 	MV_GLOBAL_STATUS		= 0x00,
+	MV_GLOBAL_ATU_FID		= 0x01,
+	MV_GLOBAL_VTU_FID		= 0x02,
+	MV_GLOBAL_VTU_SID		= 0x03,
 	MV_GLOBAL_CONTROL		= 0x04,
 	MV_GLOBAL_VTU_OP		= 0x05,
 	MV_GLOBAL_VTU_VID		= 0x06,
 	MV_GLOBAL_VTU_DATA1		= 0x07,
 	MV_GLOBAL_VTU_DATA2		= 0x08,
 	MV_GLOBAL_VTU_DATA3		= 0x09,
+	MV_GLOBAL_CONTROL2		= 0x1c,
 };
 #define MV_GLOBALREG(_type) MV_SWITCH_GLOBAL, MV_GLOBAL_##_type
 
 enum {
-	MV_GLOBAL2_SDET_POLARITY	= 0x1D,
+	MV_GLOBAL2_SDET_POLARITY	= 0x1d,
 };
 #define MV_GLOBAL2REG(_type) MV_SWITCH_GLOBAL2, MV_GLOBAL2_##_type
 
 enum {
-	MV_VTUOP_VALID			= (1 << 12),
+	MV_VTU_VID_VALID		= (1 << 12),
+};
+
+enum {
+	MV_VTUOP_PURGE			= (1 << 12),
 	MV_VTUOP_LOAD			= (3 << 12),
 	MV_VTUOP_INPROGRESS		= (1 << 15),
+	MV_VTUOP_STULOAD		= (5 << 12),
+	MV_VTUOP_VTU_GET_NEXT		= (4 << 12),
+	MV_VTUOP_STU_GET_NEXT		= (6 << 12),
+	MV_VTUOP_GET_VIOLATION		= (7 << 12),
 };
 
 enum {
@@ -168,14 +186,17 @@ enum {
 };
 
 enum {
-	MV_VTUCTL_EGRESS_UNMODIFIED	= 0x00,
-	MV_VTUCTL_EGRESS_UNTAGGED	= 0x01,
-	MV_VTUCTL_EGRESS_TAGGED		= 0x02,
-	MV_VTUCTL_DISCARD		= 0x03,
+	MV_VTUCTL_EGRESS_UNMODIFIED	= (0 << 0),
+	MV_VTUCTL_EGRESS_UNTAGGED	= (1 << 0),
+	MV_VTUCTL_EGRESS_TAGGED		= (2 << 0),
+	MV_VTUCTL_DISCARD		= (3 << 0),
 };
 
 enum {
-	MV_8021Q_VLAN_ONLY		= (1 << 15),
+	MV_STUCTL_STATE_DISABLED	= (0 << 0),
+	MV_STUCTL_STATE_BLOCKING	= (1 << 0),
+	MV_STUCTL_STATE_LEARNING	= (2 << 0),
+	MV_STUCTL_STATE_FORWARDING	= (3 << 0),
 };
 
 enum {
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From leitec at staticky.com  Fri Jan  9 12:12:50 2015
From: leitec at staticky.com (Claudio Leite)
Date: Fri,  9 Jan 2015 12:12:50 -0500
Subject: [OpenWrt-Devel] [PATCH 4/4] mvsw61xx: track and set per-VLAN port
	state in STU
In-Reply-To: <1420823570-8706-1-git-send-email-leitec@staticky.com>
References: <1420823570-8706-1-git-send-email-leitec@staticky.com>
Message-ID: <1420823570-8706-4-git-send-email-leitec@staticky.com>

Since the driver doesn't know anything about (M)STP
we just hard-set the ports to be enabled if they are
part of the VLAN.

Signed-off-by: Claudio Leite <leitec at staticky.com>
---
 .../linux/generic/files/drivers/net/phy/mvsw61xx.c | 38 ++++++++++++++++++----
 .../linux/generic/files/drivers/net/phy/mvsw61xx.h |  1 +
 2 files changed, 32 insertions(+), 7 deletions(-)

diff --git a/target/linux/generic/files/drivers/net/phy/mvsw61xx.c b/target/linux/generic/files/drivers/net/phy/mvsw61xx.c
index 7ddb13e..116f6cf 100644
--- a/target/linux/generic/files/drivers/net/phy/mvsw61xx.c
+++ b/target/linux/generic/files/drivers/net/phy/mvsw61xx.c
@@ -2,6 +2,7 @@
  * Marvell 88E61xx switch driver
  *
  * Copyright (c) 2014 Claudio Leite <leitec at staticky.com>
+ * Copyright (c) 2014 Nikita Nazarenko <nnazarenko at radiofid.com>
  *
  * Based on code (c) 2008 Felix Fietkau <nbd at openwrt.org>
  *
@@ -27,6 +28,7 @@
 
 MODULE_DESCRIPTION("Marvell 88E61xx Switch driver");
 MODULE_AUTHOR("Claudio Leite <leitec at staticky.com>");
+MODULE_AUTHOR("Nikita Nazarenko <nnazarenko at radiofid.com>");
 MODULE_LICENSE("GPL v2");
 MODULE_ALIAS("platform:mvsw61xx");
 
@@ -333,6 +335,7 @@ static int mvsw61xx_set_vlan_ports(struct switch_dev *dev,
 
 	state->vlans[vno].mask = 0;
 	state->vlans[vno].port_mode = 0;
+	state->vlans[vno].port_sstate = 0;
 
 	if(state->vlans[vno].vid == 0)
 		state->vlans[vno].vid = vno;
@@ -348,6 +351,8 @@ static int mvsw61xx_set_vlan_ports(struct switch_dev *dev,
 			mode = MV_VTUCTL_EGRESS_UNTAGGED;
 
 		state->vlans[vno].port_mode |= mode << (pno * 4);
+		state->vlans[vno].port_sstate |=
+			MV_STUCTL_STATE_FORWARDING << (pno * 4 + 2);
 	}
 
 	/*
@@ -447,7 +452,7 @@ static int mvsw61xx_set_enable_vlan(struct switch_dev *dev,
 static int mvsw61xx_vtu_program(struct switch_dev *dev)
 {
 	struct mvsw61xx_state *state = get_state(dev);
-	u16 v1, v2;
+	u16 v1, v2, s1, s2;
 	int i;
 
 	/* Flush */
@@ -466,14 +471,32 @@ static int mvsw61xx_vtu_program(struct switch_dev *dev)
 		mvsw61xx_wait_mask_s(dev, MV_GLOBALREG(VTU_OP),
 				MV_VTUOP_INPROGRESS, 0);
 
-		sw16(dev, MV_GLOBALREG(VTU_VID),
-				MV_VTU_VID_VALID | state->vlans[i].vid);
+		/* Write per-VLAN port state into STU */
+		s1 = (u16) (state->vlans[i].port_sstate & 0xffff);
+		s2 = (u16) ((state->vlans[i].port_sstate >> 16) & 0xffff);
+
+		sw16(dev, MV_GLOBALREG(VTU_VID), MV_VTU_VID_VALID);
+		sw16(dev, MV_GLOBALREG(VTU_SID), i);
+		sw16(dev, MV_GLOBALREG(VTU_DATA1), s1);
+		sw16(dev, MV_GLOBALREG(VTU_DATA2), s2);
+		sw16(dev, MV_GLOBALREG(VTU_DATA3), 0);
+
+		sw16(dev, MV_GLOBALREG(VTU_OP),
+				MV_VTUOP_INPROGRESS | MV_VTUOP_STULOAD);
+		mvsw61xx_wait_mask_s(dev, MV_GLOBALREG(VTU_OP),
+				MV_VTUOP_INPROGRESS, 0);
 
-		v1 = (u16)(state->vlans[i].port_mode & 0xffff);
-		v2 = (u16)((state->vlans[i].port_mode >> 16) & 0xffff);
+		/* Write VLAN information into VTU */
+		v1 = (u16) (state->vlans[i].port_mode & 0xffff);
+		v2 = (u16) ((state->vlans[i].port_mode >> 16) & 0xffff);
 
+		sw16(dev, MV_GLOBALREG(VTU_VID),
+				MV_VTU_VID_VALID | state->vlans[i].vid);
+		sw16(dev, MV_GLOBALREG(VTU_SID), i);
+		sw16(dev, MV_GLOBALREG(VTU_FID), 0);
 		sw16(dev, MV_GLOBALREG(VTU_DATA1), v1);
 		sw16(dev, MV_GLOBALREG(VTU_DATA2), v2);
+		sw16(dev, MV_GLOBALREG(VTU_DATA3), 0);
 
 		sw16(dev, MV_GLOBALREG(VTU_OP),
 				MV_VTUOP_INPROGRESS | MV_VTUOP_LOAD);
@@ -514,8 +537,6 @@ static int mvsw61xx_update_state(struct switch_dev *dev)
 	if (!state->registered)
 		return -EINVAL;
 
-	mvsw61xx_vtu_program(dev);
-
 	/*
 	 * Set 802.1q-only mode if vlan_enabled is true.
 	 *
@@ -568,6 +589,8 @@ static int mvsw61xx_update_state(struct switch_dev *dev)
 		sw16(dev, MV_PORTREG(CONTROL2, i), reg);
 	}
 
+	mvsw61xx_vtu_program(dev);
+
 	return 0;
 }
 
@@ -615,6 +638,7 @@ static int mvsw61xx_reset(struct switch_dev *dev)
 		state->vlans[i].mask = 0;
 		state->vlans[i].vid = 0;
 		state->vlans[i].port_mode = 0;
+		state->vlans[i].port_sstate = 0;
 	}
 
 	state->vlan_enabled = 0;
diff --git a/target/linux/generic/files/drivers/net/phy/mvsw61xx.h b/target/linux/generic/files/drivers/net/phy/mvsw61xx.h
index 8bd6f9a..61e134c 100644
--- a/target/linux/generic/files/drivers/net/phy/mvsw61xx.h
+++ b/target/linux/generic/files/drivers/net/phy/mvsw61xx.h
@@ -249,6 +249,7 @@ struct mvsw61xx_state {
 		u16 mask;
 		u16 vid;
 		u32 port_mode;
+		u32 port_sstate;
 	} vlans[MV_VLANS];
 
 	char buf[128];
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From karlp at tweak.net.au  Fri Jan  9 12:51:48 2015
From: karlp at tweak.net.au (Karl Palsson)
Date: Fri, 09 Jan 2015 17:51:48 -0000
Subject: [OpenWrt-Devel] procd/inittab with a delayed console
In-Reply-To: <C89EFD3CD56F64468D3D206D683A8D2203B889D8@ldam-msx2.fugro-nl.local>
References: <C89EFD3CD56F64468D3D206D683A8D2203B889D8@ldam-msx2.fugro-nl.local>
Message-ID: <20150109175026-5326-92159-mailpile@palmtree-beeroclock-net>


"Stam, Michel [FINT]" <M.Stam at fugro.nl> wrote:
> This, to me, seems the most logical solution, as consoles should be
> available to the init process early on during boot, and not hot-plugged
> in afterwards. Do you agree?


Well, I don't.   What about a usb serial port?  I'd like to plug in the
usb cable, providing vbus to power up a cp210x, which then becomes a new
/dev/ttyUSBxxx and I'd like inittab to offer me a console there.  It's not there at boot though...

Sincerely,
Karl P
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From mhei at heimpold.de  Fri Jan  9 13:33:49 2015
From: mhei at heimpold.de (Michael Heimpold)
Date: Fri, 09 Jan 2015 19:33:49 +0100
Subject: [OpenWrt-Devel] procd/inittab with a delayed console
In-Reply-To: <20150109175026-5326-92159-mailpile@palmtree-beeroclock-net>
References: <C89EFD3CD56F64468D3D206D683A8D2203B889D8@ldam-msx2.fugro-nl.local>
 <20150109175026-5326-92159-mailpile@palmtree-beeroclock-net>
Message-ID: <5644309.PftmH1Bpz9@kerker>

Am Freitag, 9. Januar 2015, 17:51:48 schrieb Karl Palsson:
> 
> "Stam, Michel [FINT]" <M.Stam at fugro.nl> wrote:
> > This, to me, seems the most logical solution, as consoles should be
> > available to the init process early on during boot, and not hot-plugged
> > in afterwards. Do you agree?
> 
> 
> Well, I don't.   What about a usb serial port?  I'd like to plug in the
> usb cable, providing vbus to power up a cp210x, which then becomes a new
> /dev/ttyUSBxxx and I'd like inittab to offer me a console there.  It's not there at boot though...

+1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From osk at exegin.com  Fri Jan  9 16:15:39 2015
From: osk at exegin.com (Owen Kirby)
Date: Fri, 09 Jan 2015 13:15:39 -0800
Subject: [OpenWrt-Devel] procd/inittab with a delayed console
In-Reply-To: <20150109175026-5326-92159-mailpile@palmtree-beeroclock-net>
References: <C89EFD3CD56F64468D3D206D683A8D2203B889D8@ldam-msx2.fugro-nl.local>
 <20150109175026-5326-92159-mailpile@palmtree-beeroclock-net>
Message-ID: <54B044FB.6050304@exegin.com>


On 15-01-09 09:51 AM, Karl Palsson wrote:
> "Stam, Michel [FINT]" <M.Stam at fugro.nl> wrote:
>> This, to me, seems the most logical solution, as consoles should be
>> available to the init process early on during boot, and not hot-plugged
>> in afterwards. Do you agree?
>
> Well, I don't.   What about a usb serial port?  I'd like to plug in the
> usb cable, providing vbus to power up a cp210x, which then becomes a new
> /dev/ttyUSBxxx and I'd like inittab to offer me a console there.  It's not there at boot though...
>
This is actually very close to what we're doing on this board, it has 
two console ports: one
is a UART which the bootloader and kernel are using, and a second 
console port which is really
just a USB device controller. The UART lines are a pain to get to 
without a soldering iron so
under AA and BB we would just connect a laptop into the USB port and get 
a console on the router.

However, it's not quite real hotplugging since /dev/ttyGS0 is present 
whenever the driver is
loaded, just that it depends on the USB gadget drivers which get loaded 
a little too late for
inittab to find it. Hotplugging does sound like a cool feature though.

Cheers,
Owen
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From osk at exegin.com  Fri Jan  9 16:51:22 2015
From: osk at exegin.com (Owen Kirby)
Date: Fri, 09 Jan 2015 13:51:22 -0800
Subject: [OpenWrt-Devel] procd/inittab with a delayed console
In-Reply-To: <C89EFD3CD56F64468D3D206D683A8D2203B889D8@ldam-msx2.fugro-nl.local>
References: <54AEED81.4090901@exegin.com>
 <C89EFD3CD56F64468D3D206D683A8D2203B889D8@ldam-msx2.fugro-nl.local>
Message-ID: <54B04D5A.3040509@exegin.com>

Michel,

Thanks for the suggestion, this particular driver was being loaded from
/etc/modules.d, however even when I moved it into /etc/modules-boot.d it
still doesn't create /dev/ttyGS0 in time for procd to start the console.

I'll try fiddling around with the load order to see if I can get it
working without my changes to procd

Thanks,
Owen

On 15-01-09 04:33 AM, Stam, Michel [FINT] wrote:
> Hello Owen,
>
> I was wondering, is the kernel driver for your console not placed in
> /etc/modules-boot.d ?
>
> /sbin/init executes procd, but prior to doing this executes kmodloader
> to load all modules in /etc/modules-boot.d. If your module is mentioned
> in this directory, this should load your console driver, thus making it
> available before procd checks /etc/inittab.
>
> This, to me, seems the most logical solution, as consoles should be
> available to the init process early on during boot, and not hot-plugged
> in afterwards. Do you agree?
>
> To put modules in /etc/modules-boot.d, make sure that their
> KernelPackage definition contains:
> AUTOLOAD:=$(call AutoLoad,<NUM>,<MODULE>,1)
>
> Where <NUM> is the load order and <MODULE> is the name of your kernel
> module (or modules). The presence of the ,1 argument indicates whether
> the module is placed in /etc/modules-boot.d or /etc/modules.d.
>
> Kind regards,
>
> Michel Stam
> Embedded System Engineer
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From mark.a.milburn at gmail.com  Fri Jan  9 18:21:10 2015
From: mark.a.milburn at gmail.com (Mark Milburn)
Date: Fri,  9 Jan 2015 16:21:10 -0700
Subject: [OpenWrt-Devel] [PATCH] [mvebu] use mvsw61xx
Message-ID: <1420845670-29239-1-git-send-email-mark.a.milburn@gmail.com>

Use Claudio's renamed mvsw6171 driver.
Depends upon https://patchwork.ozlabs.org/patch/427183/ patchset.

Signed-off-by: Mark Milburn <mark.a.milburn at gmail.com>
---
 target/linux/mvebu/config-3.14 | 2 +-
 target/linux/mvebu/config-3.18 | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/mvebu/config-3.14 b/target/linux/mvebu/config-3.14
index 17a5d64..d3f6584 100644
--- a/target/linux/mvebu/config-3.14
+++ b/target/linux/mvebu/config-3.14
@@ -209,7 +209,7 @@ CONFIG_MVEBU_DEVBUS=y
 CONFIG_MVEBU_MBUS=y
 CONFIG_MVMDIO=y
 CONFIG_MVNETA=y
-CONFIG_MVSW6171_PHY=y
+CONFIG_MVSW61XX_PHY=y
 CONFIG_MV_XOR=y
 CONFIG_NEED_DMA_MAP_STATE=y
 # CONFIG_NEON is not set
diff --git a/target/linux/mvebu/config-3.18 b/target/linux/mvebu/config-3.18
index 54639f8..9b2b480 100644
--- a/target/linux/mvebu/config-3.18
+++ b/target/linux/mvebu/config-3.18
@@ -247,7 +247,7 @@ CONFIG_MVEBU_DEVBUS=y
 CONFIG_MVEBU_MBUS=y
 CONFIG_MVMDIO=y
 CONFIG_MVNETA=y
-CONFIG_MVSW6171_PHY=y
+CONFIG_MVSW61XX_PHY=y
 CONFIG_MV_XOR=y
 CONFIG_NEED_DMA_MAP_STATE=y
 # CONFIG_NEON is not set
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From openwrt at vittgam.net  Fri Jan  9 18:56:25 2015
From: openwrt at vittgam.net (Vittorio G (VittGam))
Date: Sat, 10 Jan 2015 00:56:25 +0100
Subject: [OpenWrt-Devel] [PATCH] ramips: HooToo HT-TM02 factory image
 generation.
In-Reply-To: <CAGVrzcY_KMX7e0PMjX-TAQQYzhoQ-m8y_B5PfC1Oz+NbqpgEjw@mail.gmail.com>
References: <owrt-patches-20141227-1@vittgam.net>
 <eb026eb570e91bbc5dad50703d21f9c3@vittgam.net>
 <54AFA3EB.1000007@openwrt.org>
 <ace1829e51bf498db74944ec109a1bd5@vittgam.net>
 <CAGVrzcY_KMX7e0PMjX-TAQQYzhoQ-m8y_B5PfC1Oz+NbqpgEjw@mail.gmail.com>
Message-ID: <de80ce49cd4356c81ab12ad2f089f015@vittgam.net>

Il 09.01.2015 16:17 Florian Fainelli ha scritto:

> What about a statically linked binary at least?

Of course I've missed the obvious thing here. :) Thanks for the 
suggestion! I'm going to try this as soon as I've some spare time (in a 
week or so). Otherwise the code is on my github if you want to try to do 
it in the meantime (and you have the hardware...).

Cheers,
Vittorio G
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From mattlee2nix at gmail.com  Fri Jan  9 22:42:22 2015
From: mattlee2nix at gmail.com (Matt Lee)
Date: Fri, 9 Jan 2015 22:42:22 -0500
Subject: [OpenWrt-Devel] How to acces init mtd partition on RB2011-UiAS
Message-ID: <CACF2x9KJ7avvi3s-r=BPQzNDh9m7Z_Q0NfM4Rb+GBKUhb9_DUQ@mail.gmail.com>

Hi,

How can I access to init mtd partition? Actually I'm only seeing this:

dev:    size   erasesize  name
mtd0: 00040000 00020000 "booter"
mtd1: 003c0000 00020000 "kernel"
mtd2: 07c00000 00020000 "rootfs"
I would like to access to mtd partition: routerboot, hard_config, bios and
softconfig from the user space.

thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150109/8b5cbc1f/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From gianluca at sottospazio.it  Sat Jan 10 06:54:22 2015
From: gianluca at sottospazio.it (Gianluca Anzolin)
Date: Sat, 10 Jan 2015 12:54:22 +0100
Subject: [OpenWrt-Devel] pivot_overlay doesn't work anymore
Message-ID: <54B112EE.4080303@sottospazio.it>

Hi,

I just tried to install the latest CC trunk (r43901) on my netgear 
wndr4300, a router with NAND flash on that uses UBIFS.

I noticed that I cannot use an external /overlay anymore: while I can 
mount the usb drive on any mountpoint, the '/overlay' target in 
/etc/config/fstab is ignored and the rootfs is never switched to the new 
device.

The funny fact is that on another different router this doesn't happen: 
that router however doesn't rely on UBIFS since it uses NOR flash.

So I tried to revert the latest change relevant to fstools (git-svn-id: 
svn://svn.openwrt.org/openwrt/trunk at 43868 
3c298f89-4303-0410-b956-a3cf2f4a3e73) and pivot_overlay began to work again.

I understand that commit is only an upgrade to the latest HEAD of 
fstools: before starting to bisect I thought someone working on the code 
could have an idea on what's really happening.

I'll try to bisect this evening if needed.

Thank you,

Gianluca
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From nemesis at ninux.org  Sat Jan 10 07:46:43 2015
From: nemesis at ninux.org (Nemesis)
Date: Sat, 10 Jan 2015 13:46:43 +0100
Subject: [OpenWrt-Devel] JSON data interchange format for networks
Message-ID: <54B11F33.2020908@ninux.org>

Hi everybody,

in the past 2months some people have been working on a simple idea,
which would bring a lot of benefits to many peopleand that for some
strange reason has not been implemented yet, probably because the effort
is more "human" than technical, as many different people have to work
together and come to agreements.

But here's the idea:

Immagine you could export adevice configuration in JSON format and
reimport that somewhere else,like monitoring software, node database, or
whatever you need.
Something like this:
https://github.com/interop-dev/json-for-networks/blob/master/examples/device-configuration.json

Immagine you could extract monitoring data with a simple JSONthat has a
similar structure to the device configuration, that would enable
different software to play well with one another, instead of building
silos that don't talk to each other.
Something like this:
https://github.com/interop-dev/json-for-networks/blob/master/examples/monitoring-data.json

Immagine the olsr json info plugin, or the json output by batman, but
instead of being all different,they shared a common structure, and
differed only in the key/value pairs that are specific to their protocol.
That would be easier to parse for who develops software to represent
those topologies visually.
Something like this:
https://github.com/interop-dev/json-for-networks/blob/master/examples/network-routes.json

Now, this is not some weird utopic idea. A similar thing has been done
in the GIS field: *GeoJSON*.
You can pass GeoJSON to any GIS library, written in any language, and it
will understand what is that you are passing. You can visualize that
GeoJSON on a map with leaflet or openlayers, you can useit to calculate
distances and stuff on the server side, you can output on an HTTP API,
or whatever.

Here there's a very early draft of the spec:
https://github.com/interop-dev/json-for-networks

Before we start implementing it in softwares like node databases,
monitoring systems and firmwares, we would love to have some feedback
from you guys as everybody in our communities use OpenWRT.

We would like to know if anyone else has been working on a similar idea
and we would like to have constructive critical feedback and improve our
early spec before starting to prototype.

If anybody will be at Fosdem we can also discuss in person there.

Cheers to all and hope to see many of you at the next battlemesh in
Slovenia.

Federico Capoano (aka Nemesis)
Ninux.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150110/f0e535ba/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From zajec5 at gmail.com  Sat Jan 10 09:41:12 2015
From: zajec5 at gmail.com (=?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?=)
Date: Sat, 10 Jan 2015 15:41:12 +0100
Subject: [OpenWrt-Devel] pivot_overlay doesn't work anymore
In-Reply-To: <54B112EE.4080303@sottospazio.it>
References: <54B112EE.4080303@sottospazio.it>
Message-ID: <CACna6rxTc4AZq1KVyUBy+og0GXFpGtH9OjkDvvfvuNx8NNsiig@mail.gmail.com>

On 10 January 2015 at 12:54, Gianluca Anzolin <gianluca at sottospazio.it> wrote:
> I just tried to install the latest CC trunk (r43901) on my netgear wndr4300,
> a router with NAND flash on that uses UBIFS.
>
> I noticed that I cannot use an external /overlay anymore: while I can mount
> the usb drive on any mountpoint, the '/overlay' target in /etc/config/fstab
> is ignored and the rootfs is never switched to the new device.
>
> The funny fact is that on another different router this doesn't happen: that
> router however doesn't rely on UBIFS since it uses NOR flash.
>
> So I tried to revert the latest change relevant to fstools (git-svn-id:
> svn://svn.openwrt.org/openwrt/trunk at 43868
> 3c298f89-4303-0410-b956-a3cf2f4a3e73) and pivot_overlay began to work again.
>
> I understand that commit is only an upgrade to the latest HEAD of fstools:
> before starting to bisect I thought someone working on the code could have
> an idea on what's really happening.
>
> I'll try to bisect this evening if needed.

I guess I broke something, but I can't really say what and why. It
works for me, but obviously there are maaaany different possible
setups.

You can see the list of fstools commits using following URL:
http://nbd.name/gitweb.cgi?p=fstools.git;a=shortlog

I'll need you to bisect them by changing PKG_SOURCE_VERSION in the
package/system/fstools/Makefile

What do we know so far:
BAD 6a448a100c7ce8b8b85f262ba1258e54363da9cc
??? 1e4579556ca54bdf9ccb86933c64bc6094c04e9a
??? 0bc9aa72941d2e361e77b5ff7c4a742e1de98cc2
??? a5076ad9c92895c54eb384b224e7af1a914f1fd9
??? 9847f4e2769d0d808a846724f8dd74b83280fdd8
??? 1a57eb9b7cc5e772d1090a23c51fdd4a01ec5df0
??? 25a65a42bb0b2eb0b6c89b1803c703aadae8196b
??? 35056038c02a7cbd18b57a5f46a373d564c69693
GOOD 83cf8896a598fb9fc58da0a9bb4f137695f78853

So please open package/system/fstools/Makefile and change
PKG_SOURCE_VERSION to something from the middle of above list. You can
start e.g. from 9847f4e2769d0d808a846724f8dd74b83280fdd8.
After you change PKG_SOURCE_VERSION to
9847f4e2769d0d808a846724f8dd74b83280fdd8, recompile OpenWrt, install
it and try.

Using above way, please find the first bad commit.
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From braulio at eita.org.br  Sat Jan 10 09:50:47 2015
From: braulio at eita.org.br (=?UTF-8?Q?Br=C3=A1ulio_Bhavamitra?=)
Date: Sat, 10 Jan 2015 11:50:47 -0300
Subject: [OpenWrt-Devel] [OFF] Can't join openwrt-users
Message-ID: <CAJri6_sOyBZ6y_h=QdP60_Os-0O0xYYegeAzbnX3AMkq-3ou6A@mail.gmail.com>

Hello all,

Sorry to post this here, but I really can't subscribe to the openwrt-users.
I've tried with two different emails and I never receive the confirmation
email (also checked spam). Anybody could help?

cheers,
br?ulio

-- 
"Lute pela sua ideologia. Seja um com sua ideologia. Viva pela sua
ideologia. Morra por sua ideologia" P.R. Sarkar

EITA - Educa??o, Informa??o e Tecnologias para Autogest?o
http://cirandas.net/brauliobo
http://eita.org.br

"Paramapurusha ? meu pai e Parama Prakriti ? minha m?e. O universo ? meu
lar e todos n?s somos cidad?os deste cosmo. Este universo ? a imagina??o da
Mente Macroc?smica, e todas as entidades est?o sendo criadas, preservadas e
destru?das nas fases de extrovers?o e introvers?o do fluxo imaginativo
c?smico. No ?mbito pessoal, quando uma pessoa imagina algo em sua mente,
naquele momento, essa pessoa ? a ?nica propriet?ria daquilo que ela
imagina, e ningu?m mais. Quando um ser humano criado mentalmente caminha
por um milharal tamb?m imaginado, a pessoa imaginada n?o ? a propriedade
desse milharal, pois ele pertence ao indiv?duo que o est? imaginando. Este
universo foi criado na imagina??o de Brahma, a Entidade Suprema, por isso
a propriedade deste universo ? de Brahma, e n?o dos microcosmos que tamb?m
foram criados pela imagina??o de Brahma. Nenhuma propriedade deste mundo,
mut?vel ou imut?vel, pertence a um indiv?duo em particular; tudo ? o
patrim?nio comum de todos."
Restante do texto em
http://cirandas.net/brauliobo/blog/a-problematica-de-hoje-em-dia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150110/44e7cd6c/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From gianluca at sottospazio.it  Sat Jan 10 11:04:20 2015
From: gianluca at sottospazio.it (Gianluca Anzolin)
Date: Sat, 10 Jan 2015 17:04:20 +0100
Subject: [OpenWrt-Devel] pivot_overlay doesn't work anymore
In-Reply-To: <CACna6rxTc4AZq1KVyUBy+og0GXFpGtH9OjkDvvfvuNx8NNsiig@mail.gmail.com>
References: <54B112EE.4080303@sottospazio.it>
 <CACna6rxTc4AZq1KVyUBy+og0GXFpGtH9OjkDvvfvuNx8NNsiig@mail.gmail.com>
Message-ID: <20150110160420.GA20752@sottospazio.it>

On Sat, Jan 10, 2015 at 03:41:12PM +0100, Rafa? Mi?ecki wrote:
> I'll need you to bisect them by changing PKG_SOURCE_VERSION in the
> package/system/fstools/Makefile
> 
> What do we know so far:
> BAD 6a448a100c7ce8b8b85f262ba1258e54363da9cc
> ??? 1e4579556ca54bdf9ccb86933c64bc6094c04e9a
> ??? 0bc9aa72941d2e361e77b5ff7c4a742e1de98cc2
> ??? a5076ad9c92895c54eb384b224e7af1a914f1fd9
> ??? 9847f4e2769d0d808a846724f8dd74b83280fdd8
> ??? 1a57eb9b7cc5e772d1090a23c51fdd4a01ec5df0
> ??? 25a65a42bb0b2eb0b6c89b1803c703aadae8196b
> ??? 35056038c02a7cbd18b57a5f46a373d564c69693
> GOOD 83cf8896a598fb9fc58da0a9bb4f137695f78853
> 
> So please open package/system/fstools/Makefile and change
> PKG_SOURCE_VERSION to something from the middle of above list. You can
> start e.g. from 9847f4e2769d0d808a846724f8dd74b83280fdd8.
> After you change PKG_SOURCE_VERSION to
> 9847f4e2769d0d808a846724f8dd74b83280fdd8, recompile OpenWrt, install
> it and try.
> 
> Using above way, please find the first bad commit.

I bisected the commits and... I can't reproduce the bug anymore. I'm puzzled, I
tried many times.

It seems it was a problem between the keyboard and chair :-)

I'm sorry, I apologize for the time you lost on this non-issue.

Gianluca
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From br1 at einfach.org  Sat Jan 10 11:15:07 2015
From: br1 at einfach.org (Bruno Randolf)
Date: Sat, 10 Jan 2015 16:15:07 +0000
Subject: [OpenWrt-Devel] Dual Wifi for OpenWRT
Message-ID: <54B1500B.8080307@einfach.org>

Hello!

Does anyone know a hardware platform with 2 or more wifi interfaces
which can both be used in the 2.4 GHz band?

I just went thru the table of hardware looking for boards which have
more than one wifi. Unfortunately all of the consumer APs tagged with
2WNIC seem to have 1 wifi for 2.4GHz and one for 5GHz. The few other
boards which can support more than one wifi (RouterBoard, Complex,
Gateworks) are miniPCI or mPCIe based and look like "developer boards"
meaning one has to get the board, cards, casing separately and assemble
it manually...

Is there really no readily availabe HW with more than one wifi? I'm
puzzled...

Thanks for any pointers...
bruno
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From gianluca at sottospazio.it  Sat Jan 10 12:54:51 2015
From: gianluca at sottospazio.it (Gianluca Anzolin)
Date: Sat, 10 Jan 2015 18:54:51 +0100
Subject: [OpenWrt-Devel] [PATCH] procd: reorder the arguments of command
	invocations
Message-ID: <1420912491-21359-1-git-send-email-gianluca@sottospazio.it>

Some commands in the script /lib/upgrade/nand.sh (provided by
procd) use option arguments after non-option arguments.

This unfortunately doesn't work with musl because it doesn't yet support
permutations of the arguments: when getopt finds a non-option argument
it returns -1 and ignores any option which may follow.

One visible side effect is that sysupgrade doesn't work with musl/NAND
tarballs.

The following patch reorders the command invocations by placing the
options before any non-option argument.

Tested on a Netgear WNDR4300 built with ubifs support and musl libc.

Signed-off-by: Gianluca Anzolin <gianluca at sottospazio.it>
---
 package/system/procd/files/nand.sh | 40 +++++++++++++++++++-------------------
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/package/system/procd/files/nand.sh b/package/system/procd/files/nand.sh
index 7fb9343..a22381d 100644
--- a/package/system/procd/files/nand.sh
+++ b/package/system/procd/files/nand.sh
@@ -58,7 +58,7 @@ nand_get_magic_long() {
 }
 
 get_magic_long_tar() {
-	( tar xf $1 $2 -O | dd bs=4 count=1 | hexdump -v -n 4 -e '1/1 "%02x"') 2> /dev/null
+	( tar -O -xf $1 $2 | dd bs=4 count=1 | hexdump -v -n 4 -e '1/1 "%02x"') 2> /dev/null
 }
 
 identify_magic() {
@@ -132,13 +132,13 @@ nand_upgrade_prepare_ubi() {
 	fi
 
 	if [ ! "$ubidev" ]; then
-		ubiformat /dev/mtd$mtdnum -y
+		ubiformat -y /dev/mtd$mtdnum
 		ubiattach -m "$mtdnum"
 		sync
 		ubidev="$( nand_find_ubi "$CI_UBIPART" )"
 		[ "$has_env" -gt 0 ] && {
-			ubimkvol /dev/$ubidev -n 0 -N ubootenv -s 1MiB
-			ubimkvol /dev/$ubidev -n 1 -N ubootenv2 -s 1MiB
+			ubimkvol -n 0 -N ubootenv -s 1MiB /dev/$ubidev
+			ubimkvol -n 1 -N ubootenv2 -s 1MiB /dev/$ubidev
 		}
 	fi
 
@@ -157,13 +157,13 @@ nand_upgrade_prepare_ubi() {
 	fi
 
 	# kill volumes
-	[ "$kern_ubivol" ] && ubirmvol /dev/$ubidev -N kernel || true
-	[ "$root_ubivol" ] && ubirmvol /dev/$ubidev -N rootfs || true
-	[ "$data_ubivol" ] && ubirmvol /dev/$ubidev -N rootfs_data || true
+	[ "$kern_ubivol" ] && ubirmvol -N kernel /dev/$ubidev || true
+	[ "$root_ubivol" ] && ubirmvol -N rootfs /dev/$ubidev || true
+	[ "$data_ubivol" ] && ubirmvol -N rootfs_data /dev/$ubidev || true
 
 	# update kernel
 	if [ "$has_kernel" = "1" ]; then
-		if ! ubimkvol /dev/$ubidev -N kernel -s $kernel_length; then
+		if ! ubimkvol -N kernel -s $kernel_length /dev/$ubidev ; then
 			echo "cannot create kernel volume"
 			return 1;
 		fi
@@ -176,14 +176,14 @@ nand_upgrade_prepare_ubi() {
 	else
 		root_size_param="-s $rootfs_length"
 	fi
-	if ! ubimkvol /dev/$ubidev -N rootfs $root_size_param; then
+	if ! ubimkvol -N rootfs $root_size_param /dev/$ubidev ; then
 		echo "cannot create rootfs volume"
 		return 1;
 	fi
 
 	# create rootfs_data for non-ubifs rootfs
 	if [ "$rootfs_type" != "ubifs" ]; then
-		if ! ubimkvol /dev/$ubidev -N rootfs_data -m; then
+		if ! ubimkvol -N rootfs_data -m /dev/$ubidev ; then
 			echo "cannot initialize rootfs_data volume"
 			return 1
 		fi
@@ -219,7 +219,7 @@ nand_upgrade_ubinized() {
 	local mtddev="/dev/mtd${mtdnum}"
 	ubidetach -p "${mtddev}" || true
 	sync
-	ubiformat "${mtddev}" -y -f "${ubi_file}"
+	ubiformat -y -f "${mtddev}" "${ubi_file}"
 	ubiattach -p "${mtddev}"
 	nand_do_upgrade_success
 }
@@ -232,7 +232,7 @@ nand_upgrade_ubifs() {
 	
 	local ubidev="$( nand_find_ubi "$CI_UBIPART" )"
 	local root_ubivol="$(nand_find_volume $ubidev rootfs)"
-	ubiupdatevol /dev/$root_ubivol -s $rootfs_length $1
+	ubiupdatevol -s $rootfs_length /dev/$root_ubivol $1
 
 	nand_do_upgrade_success
 }
@@ -242,8 +242,8 @@ nand_upgrade_tar() {
 	local board_name="$(cat /tmp/sysinfo/board_name)"
 	local kernel_mtd="$(find_mtd_index $CI_KERNPART)"
 
-	local kernel_length=`(tar xf $tar_file sysupgrade-$board_name/kernel -O | wc -c) 2> /dev/null`
-	local rootfs_length=`(tar xf $tar_file sysupgrade-$board_name/root -O | wc -c) 2> /dev/null`
+	local kernel_length=`(tar -O -xf $tar_file sysupgrade-$board_name/kernel | wc -c) 2> /dev/null`
+	local rootfs_length=`(tar -O -xf $tar_file sysupgrade-$board_name/root | wc -c) 2> /dev/null`
 
 	local rootfs_type="$(identify_tar "$tar_file" sysupgrade-$board_name/root)"
 
@@ -251,7 +251,7 @@ nand_upgrade_tar() {
 	local has_env=0
 
 	[ "$kernel_length" != 0 -a -n "$kernel_mtd" ] && {
-		tar xf $tar_file sysupgrade-$board_name/kernel -O | mtd write - $CI_KERNPART
+		tar -O -xf $tar_file sysupgrade-$board_name/kernel | mtd write - $CI_KERNPART
 	}
 	[ "$kernel_length" = 0 -o ! -z "$kernel_mtd" ] && has_kernel=0
 
@@ -260,13 +260,13 @@ nand_upgrade_tar() {
 	local ubidev="$( nand_find_ubi "$CI_UBIPART" )"
 	[ "$has_kernel" = "1" ] && {
 		local kern_ubivol="$(nand_find_volume $ubidev kernel)"
-	 	tar xf $tar_file sysupgrade-$board_name/kernel -O | \
-			ubiupdatevol /dev/$kern_ubivol -s $kernel_length -
+		tar -O -xf $tar_file sysupgrade-$board_name/kernel | \
+			ubiupdatevol -s $kernel_length /dev/$kern_ubivol -
 	}
 
 	local root_ubivol="$(nand_find_volume $ubidev rootfs)"
-	tar xf $tar_file sysupgrade-$board_name/root -O | \
-		ubiupdatevol /dev/$root_ubivol -s $rootfs_length -
+	tar -O -xf $tar_file sysupgrade-$board_name/root | \
+		ubiupdatevol -s $rootfs_length /dev/$root_ubivol -
 
 	nand_do_upgrade_success
 }
@@ -340,7 +340,7 @@ append sysupgrade_pre_upgrade nand_upgrade_stage1
 nand_do_platform_check() {
 	local board_name="$1"
 	local tar_file="$2"
-	local control_length=`(tar xf $tar_file sysupgrade-$board_name/CONTROL -O | wc -c) 2> /dev/null`
+	local control_length=`(tar -O -xf $tar_file sysupgrade-$board_name/CONTROL | wc -c) 2> /dev/null`
 	local file_type="$(identify $2)"
 
 	[ "$control_length" = 0 -a "$file_type" != "ubi" -a "$file_type" != "ubifs" ] && {
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From aczlan+openwrt at gmail.com  Sat Jan 10 12:58:03 2015
From: aczlan+openwrt at gmail.com (Aaron Z)
Date: Sat, 10 Jan 2015 12:58:03 -0500
Subject: [OpenWrt-Devel] Dual Wifi for OpenWRT
In-Reply-To: <54B1500B.8080307@einfach.org>
References: <54B1500B.8080307@einfach.org>
Message-ID: <CAKNoO9pJqgwG+n7h=0kRS12ygZrsUdFio7+7tyc=iOS2Yh1qcA@mail.gmail.com>

As in to run on 2 different 2.4ghz channels, or to just provide 2
SSIDs? Most platforms can run multiple SSIDs, I personally have
several Linksys WRT54GL and TPLink TL-WR1043ND (HW versions 1 and 2)
devices that happily run 3 SSIDs (all in AP mode, all on the same
channel).

Aaron Z
A human being should be able to change a diaper, plan an invasion,
butcher a hog, conn a ship, design a building, write a sonnet, balance
accounts, build a wall, set a bone, comfort the dying, take orders,
give orders, cooperate, act alone, solve equations, analyze a new
problem, pitch manure, program a computer, cook a tasty meal, fight
efficiently, die gallantly. Specialization is for insects.
? Robert Heinlein, Time Enough for Love

On Sat, Jan 10, 2015 at 11:15 AM, Bruno Randolf <br1 at einfach.org> wrote:
> Hello!
>
> Does anyone know a hardware platform with 2 or more wifi interfaces
> which can both be used in the 2.4 GHz band?
>
> I just went thru the table of hardware looking for boards which have
> more than one wifi. Unfortunately all of the consumer APs tagged with
> 2WNIC seem to have 1 wifi for 2.4GHz and one for 5GHz. The few other
> boards which can support more than one wifi (RouterBoard, Complex,
> Gateworks) are miniPCI or mPCIe based and look like "developer boards"
> meaning one has to get the board, cards, casing separately and assemble
> it manually...
>
> Is there really no readily availabe HW with more than one wifi? I'm
> puzzled...
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From daniel at makrotopia.org  Sat Jan 10 13:06:56 2015
From: daniel at makrotopia.org (Daniel Golle)
Date: Sat, 10 Jan 2015 19:06:56 +0100
Subject: [OpenWrt-Devel] [PATCH 1/7] kernel: add missing symbols for 3.18
Message-ID: <20150110180650.GA27554@makrotopia.org>

Augmented by iptables modules, if they are enabled.
oldconfig hangs and asks for them if *tables modules are not selected.

Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 target/linux/generic/config-3.18 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/target/linux/generic/config-3.18 b/target/linux/generic/config-3.18
index ce2ec5c..1927a18 100644
--- a/target/linux/generic/config-3.18
+++ b/target/linux/generic/config-3.18
@@ -2552,6 +2552,8 @@ CONFIG_NF_CONNTRACK_PROCFS=y
 # CONFIG_NF_CT_PROTO_UDPLITE is not set
 # CONFIG_NF_DEFRAG_IPV4 is not set
 # CONFIG_NF_LOG_ARP is not set
+# CONFIG_NF_LOG_IPV4 is not set
+# CONFIG_NF_REJECT_IPV4 is not set
 # CONFIG_NF_NAT is not set
 # CONFIG_NF_NAT_AMANDA is not set
 # CONFIG_NF_NAT_FTP is not set
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From daniel at makrotopia.org  Sat Jan 10 13:08:33 2015
From: daniel at makrotopia.org (Daniel Golle)
Date: Sat, 10 Jan 2015 19:08:33 +0100
Subject: [OpenWrt-Devel] [PATCH 2/7] uboot-sunxi: use git source instead of
	giant patch
Message-ID: <20150110180826.GA27562@makrotopia.org>

3e1ded1fff32d8af8cc5eec22c56797621ea6649 is one commit before
125738e819a3b9d15210794b3dcef9f4d9bcf866 which bumps the version to -rc4.

Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 package/boot/uboot-sunxi/Makefile                  |    15 +-
 ...-3e1ded1fff32d8af8cc5eec22c56797621ea6649.patch | 25006 -------------------
 2 files changed, 9 insertions(+), 25012 deletions(-)
 delete mode 100644 package/boot/uboot-sunxi/patches/001-u-boot-trunk-3e1ded1fff32d8af8cc5eec22c56797621ea6649.patch

diff --git a/package/boot/uboot-sunxi/Makefile b/package/boot/uboot-sunxi/Makefile
index eb66cab..d61e4a3 100644
--- a/package/boot/uboot-sunxi/Makefile
+++ b/package/boot/uboot-sunxi/Makefile
@@ -8,12 +8,15 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=u-boot
-PKG_VERSION:=2015.01-rc3
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:= \
-	http://mirror2.openwrt.org/sources \
-	ftp://ftp.denx.de/pub/u-boot
-PKG_SOURCE_VERSION:=e680848838ca20a60d43b66a218d865b
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=git://git.denx.de/u-boot.git
+PKG_VERSION:=2015.01-rc4
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=125738e819a3b9d15210794b3dcef9f4d9bcf866
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.bz2
+
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 
 PKG_LICENSE:=GPL-2.0 GPL-2.0+
diff --git a/package/boot/uboot-sunxi/patches/001-u-boot-trunk-3e1ded1fff32d8af8cc5eec22c56797621ea6649.patch b/package/boot/uboot-sunxi/patches/001-u-boot-trunk-3e1ded1fff32d8af8cc5eec22c56797621ea6649.patch
deleted file mode 100644
index fc99523..0000000
--- a/package/boot/uboot-sunxi/patches/001-u-boot-trunk-3e1ded1fff32d8af8cc5eec22c56797621ea6649.patch
+++ /dev/null
@@ -1,25006 +0,0 @@
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/bcm281xx/clk-bcm281xx.c u-boot/arch/arm/cpu/armv7/bcm281xx/clk-bcm281xx.c
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/bcm281xx/clk-bcm281xx.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/bcm281xx/clk-bcm281xx.c	2015-01-01 17:34:32.005507318 +0100
-@@ -209,6 +209,10 @@
- 	.gate		= SW_ONLY_GATE(0x0360, 20, 4),
- };
- 
-+static struct bus_clk_data usb_otg_ahb_data = {
-+	.gate		= HW_SW_GATE_AUTO(0x0348, 16, 0, 1),
-+};
-+
- static struct bus_clk_data sdio1_ahb_data = {
- 	.gate		= HW_SW_GATE_AUTO(0x0358, 16, 0, 1),
- };
-@@ -331,6 +335,17 @@
-  */
- 
- /* KPM bus clocks */
-+static struct bus_clock usb_otg_ahb_clk = {
-+	.clk = {
-+		.name = "usb_otg_ahb_clk",
-+		.parent = &kpm_ccu_clk.clk,
-+		.ops = &bus_clk_ops,
-+		.ccu_clk_mgr_base = KONA_MST_CLK_BASE_ADDR,
-+	},
-+	.freq_tbl = master_ahb_freq_tbl,
-+	.data = &usb_otg_ahb_data,
-+};
-+
- static struct bus_clock sdio1_ahb_clk = {
- 	.clk = {
- 		.name = "sdio1_ahb_clk",
-@@ -541,6 +556,7 @@
- 	CLK_LK(bsc2),
- 	CLK_LK(bsc3),
- 	/* Bus clocks */
-+	CLK_LK(usb_otg_ahb),
- 	CLK_LK(sdio1_ahb),
- 	CLK_LK(sdio2_ahb),
- 	CLK_LK(sdio3_ahb),
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/bcm281xx/clk-usb-otg.c u-boot/arch/arm/cpu/armv7/bcm281xx/clk-usb-otg.c
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/bcm281xx/clk-usb-otg.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/bcm281xx/clk-usb-otg.c	2015-01-01 17:34:32.005507318 +0100
-@@ -0,0 +1,27 @@
-+/*
-+ * Copyright 2014 Broadcom Corporation.
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <asm/errno.h>
-+#include <asm/arch/sysmap.h>
-+#include "clk-core.h"
-+
-+/* Enable appropriate clocks for the USB OTG port */
-+int clk_usb_otg_enable(void *base)
-+{
-+	char *ahbstr;
-+
-+	switch ((u32) base) {
-+	case HSOTG_BASE_ADDR:
-+		ahbstr = "usb_otg_ahb_clk";
-+		break;
-+	default:
-+		printf("%s: base 0x%p not found\n", __func__, base);
-+		return -EINVAL;
-+	}
-+
-+	return clk_get_and_enable(ahbstr);
-+}
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/bcm281xx/Makefile u-boot/arch/arm/cpu/armv7/bcm281xx/Makefile
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/bcm281xx/Makefile	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/bcm281xx/Makefile	2015-01-01 17:34:32.005507318 +0100
-@@ -10,3 +10,4 @@
- obj-y	+= clk-sdio.o
- obj-y	+= clk-bsc.o
- obj-$(CONFIG_BCM_SF2_ETH) += clk-eth.o
-+obj-y	+= clk-usb-otg.o
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/kona-common/clk-stubs.c u-boot/arch/arm/cpu/armv7/kona-common/clk-stubs.c
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/kona-common/clk-stubs.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/kona-common/clk-stubs.c	2015-01-01 17:34:32.009507252 +0100
-@@ -19,3 +19,8 @@
- {
- 	return 0;
- }
-+
-+int __weak clk_usb_otg_enable(void *base)
-+{
-+	return 0;
-+}
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/ls102xa/cpu.c u-boot/arch/arm/cpu/armv7/ls102xa/cpu.c
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/ls102xa/cpu.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/ls102xa/cpu.c	2015-01-01 17:34:32.009507252 +0100
-@@ -12,6 +12,8 @@
- #include <netdev.h>
- #include <fsl_esdhc.h>
- 
-+#include "fsl_epu.h"
-+
- DECLARE_GLOBAL_DATA_PTR;
- 
- #if defined(CONFIG_DISPLAY_CPUINFO)
-@@ -101,3 +103,35 @@
- 
- 	return 0;
- }
-+
-+int arch_cpu_init(void)
-+{
-+	void *epu_base = (void *)(CONFIG_SYS_DCSRBAR + EPU_BLOCK_OFFSET);
-+
-+	/*
-+	 * After wakeup from deep sleep, Clear EPU registers
-+	 * as early as possible to prevent from possible issue.
-+	 * It's also safe to clear at normal boot.
-+	 */
-+	fsl_epu_clean(epu_base);
-+
-+	return 0;
-+}
-+
-+#if defined(CONFIG_ARMV7_NONSEC) || defined(CONFIG_ARMV7_VIRT)
-+/* Set the address at which the secondary core starts from.*/
-+void smp_set_core_boot_addr(unsigned long addr, int corenr)
-+{
-+	struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
-+
-+	out_be32(&gur->scratchrw[0], addr);
-+}
-+
-+/* Release the secondary core from holdoff state and kick it */
-+void smp_kick_all_cpus(void)
-+{
-+	struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
-+
-+	out_be32(&gur->brrl, 0x2);
-+}
-+#endif
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/ls102xa/fdt.c u-boot/arch/arm/cpu/armv7/ls102xa/fdt.c
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/ls102xa/fdt.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/ls102xa/fdt.c	2015-01-01 17:34:32.009507252 +0100
-@@ -91,7 +91,7 @@
- 	}
- 
- 	do_fixup_by_prop_u32(blob, "device_type", "soc",
--			     4, "bus-frequency", busclk / 2, 1);
-+			     4, "bus-frequency", busclk, 1);
- 
- 	ft_fixup_enet_phy_connect_type(blob);
- 
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/ls102xa/fsl_epu.c u-boot/arch/arm/cpu/armv7/ls102xa/fsl_epu.c
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/ls102xa/fsl_epu.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/ls102xa/fsl_epu.c	2015-01-01 17:34:32.009507252 +0100
-@@ -0,0 +1,57 @@
-+/*
-+ * Copyright 2014 Freescale Semiconductor, Inc.
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <asm/io.h>
-+
-+#include "fsl_epu.h"
-+
-+/**
-+ * fsl_epu_clean - Clear EPU registers
-+ */
-+void fsl_epu_clean(void *epu_base)
-+{
-+	u32 offset;
-+
-+	/* follow the exact sequence to clear the registers */
-+	/* Clear EPACRn */
-+	for (offset = EPACR0; offset <= EPACR15; offset += EPACR_STRIDE)
-+		out_be32(epu_base + offset, 0);
-+
-+	/* Clear EPEVTCRn */
-+	for (offset = EPEVTCR0; offset <= EPEVTCR9; offset += EPEVTCR_STRIDE)
-+		out_be32(epu_base + offset, 0);
-+
-+	/* Clear EPGCR */
-+	out_be32(epu_base + EPGCR, 0);
-+
-+	/* Clear EPSMCRn */
-+	for (offset = EPSMCR0; offset <= EPSMCR15; offset += EPSMCR_STRIDE)
-+		out_be32(epu_base + offset, 0);
-+
-+	/* Clear EPCCRn */
-+	for (offset = EPCCR0; offset <= EPCCR31; offset += EPCCR_STRIDE)
-+		out_be32(epu_base + offset, 0);
-+
-+	/* Clear EPCMPRn */
-+	for (offset = EPCMPR0; offset <= EPCMPR31; offset += EPCMPR_STRIDE)
-+		out_be32(epu_base + offset, 0);
-+
-+	/* Clear EPCTRn */
-+	for (offset = EPCTR0; offset <= EPCTR31; offset += EPCTR_STRIDE)
-+		out_be32(epu_base + offset, 0);
-+
-+	/* Clear EPIMCRn */
-+	for (offset = EPIMCR0; offset <= EPIMCR31; offset += EPIMCR_STRIDE)
-+		out_be32(epu_base + offset, 0);
-+
-+	/* Clear EPXTRIGCRn */
-+	out_be32(epu_base + EPXTRIGCR, 0);
-+
-+	/* Clear EPECRn */
-+	for (offset = EPECR0; offset <= EPECR15; offset += EPECR_STRIDE)
-+		out_be32(epu_base + offset, 0);
-+}
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/ls102xa/fsl_epu.h u-boot/arch/arm/cpu/armv7/ls102xa/fsl_epu.h
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/ls102xa/fsl_epu.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/ls102xa/fsl_epu.h	2015-01-01 17:34:32.009507252 +0100
-@@ -0,0 +1,68 @@
-+/*
-+ * Copyright 2014 Freescale Semiconductor, Inc.
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#ifndef __FSL_EPU_H
-+#define __FSL_EPU_H
-+
-+#include <asm/types.h>
-+
-+#define FSL_STRIDE_4B	4
-+#define FSL_STRIDE_8B	8
-+
-+/* Block offsets */
-+#define EPU_BLOCK_OFFSET	0x00000000
-+
-+/* EPGCR (Event Processor Global Control Register) */
-+#define EPGCR		0x000
-+
-+/* EPEVTCR0-9 (Event Processor EVT Pin Control Registers) */
-+#define EPEVTCR0	0x050
-+#define EPEVTCR9	0x074
-+#define EPEVTCR_STRIDE	FSL_STRIDE_4B
-+
-+/* EPXTRIGCR (Event Processor Crosstrigger Control Register) */
-+#define EPXTRIGCR	0x090
-+
-+/* EPIMCR0-31 (Event Processor Input Mux Control Registers) */
-+#define EPIMCR0		0x100
-+#define EPIMCR31	0x17C
-+#define EPIMCR_STRIDE	FSL_STRIDE_4B
-+
-+/* EPSMCR0-15 (Event Processor SCU Mux Control Registers) */
-+#define EPSMCR0		0x200
-+#define EPSMCR15	0x278
-+#define EPSMCR_STRIDE	FSL_STRIDE_8B
-+
-+/* EPECR0-15 (Event Processor Event Control Registers) */
-+#define EPECR0		0x300
-+#define EPECR15		0x33C
-+#define EPECR_STRIDE	FSL_STRIDE_4B
-+
-+/* EPACR0-15 (Event Processor Action Control Registers) */
-+#define EPACR0		0x400
-+#define EPACR15		0x43C
-+#define EPACR_STRIDE	FSL_STRIDE_4B
-+
-+/* EPCCRi0-15 (Event Processor Counter Control Registers) */
-+#define EPCCR0		0x800
-+#define EPCCR15		0x83C
-+#define EPCCR31		0x87C
-+#define EPCCR_STRIDE	FSL_STRIDE_4B
-+
-+/* EPCMPR0-15 (Event Processor Counter Compare Registers) */
-+#define EPCMPR0		0x900
-+#define EPCMPR15	0x93C
-+#define EPCMPR31	0x97C
-+#define EPCMPR_STRIDE	FSL_STRIDE_4B
-+
-+/* EPCTR0-31 (Event Processor Counter Register) */
-+#define EPCTR0		0xA00
-+#define EPCTR31		0xA7C
-+#define EPCTR_STRIDE	FSL_STRIDE_4B
-+
-+void fsl_epu_clean(void *epu_base);
-+
-+#endif
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/ls102xa/Makefile u-boot/arch/arm/cpu/armv7/ls102xa/Makefile
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/ls102xa/Makefile	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/ls102xa/Makefile	2015-01-01 17:34:32.009507252 +0100
-@@ -7,6 +7,8 @@
- obj-y	+= cpu.o
- obj-y	+= clock.o
- obj-y	+= timer.o
-+obj-y	+= fsl_epu.o
- 
- obj-$(CONFIG_OF_LIBFDT) += fdt.o
- obj-$(CONFIG_SYS_HAS_SERDES) += fsl_ls1_serdes.o ls102xa_serdes.o
-+obj-$(CONFIG_SPL) += spl.o
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/ls102xa/spl.c u-boot/arch/arm/cpu/armv7/ls102xa/spl.c
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/ls102xa/spl.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/ls102xa/spl.c	2015-01-01 17:34:32.009507252 +0100
-@@ -0,0 +1,33 @@
-+/*
-+ * Copyright 2014 Freescale Semiconductor, Inc.
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <spl.h>
-+
-+u32 spl_boot_device(void)
-+{
-+#ifdef CONFIG_SPL_MMC_SUPPORT
-+	return BOOT_DEVICE_MMC1;
-+#endif
-+	return BOOT_DEVICE_NAND;
-+}
-+
-+u32 spl_boot_mode(void)
-+{
-+	switch (spl_boot_device()) {
-+	case BOOT_DEVICE_MMC1:
-+#ifdef CONFIG_SPL_FAT_SUPPORT
-+		return MMCSD_MODE_FAT;
-+#else
-+		return MMCSD_MODE_RAW;
-+#endif
-+	case BOOT_DEVICE_NAND:
-+		return 0;
-+	default:
-+		puts("spl: error: unsupported device\n");
-+		hang();
-+	}
-+}
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/Makefile u-boot/arch/arm/cpu/armv7/Makefile
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/Makefile	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/Makefile	2015-01-01 17:34:32.001507383 +0100
-@@ -56,6 +56,7 @@
- obj-$(CONFIG_RMOBILE) += rmobile/
- obj-$(CONFIG_ARCH_S5PC1XX) += s5pc1xx/
- obj-$(CONFIG_SOCFPGA) += socfpga/
-+obj-$(if $(filter stv0991,$(SOC)),y) += stv0991/
- obj-$(CONFIG_ARCH_SUNXI) += sunxi/
- obj-$(CONFIG_TEGRA20) += tegra20/
- obj-$(CONFIG_U8500) += u8500/
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/mx6/clock.c u-boot/arch/arm/cpu/armv7/mx6/clock.c
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/mx6/clock.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/mx6/clock.c	2015-01-01 17:34:32.009507252 +0100
-@@ -443,7 +443,7 @@
- 	struct anatop_regs __iomem *anatop =
- 		(struct anatop_regs __iomem *)ANATOP_BASE_ADDR;
- 
--	if (freq < ENET_25MHz || freq > ENET_125MHz)
-+	if (freq < ENET_25MHZ || freq > ENET_125MHZ)
- 		return -EINVAL;
- 
- 	reg = readl(&anatop->pll_enet);
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/nonsec_virt.S u-boot/arch/arm/cpu/armv7/nonsec_virt.S
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/nonsec_virt.S	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/nonsec_virt.S	2015-01-01 17:34:32.013507186 +0100
-@@ -169,11 +169,11 @@
-  * we do this here instead.
-  * But first check if we have the generic timer.
-  */
--#ifdef CONFIG_SYS_CLK_FREQ
-+#ifdef CONFIG_TIMER_CLK_FREQ
- 	mrc	p15, 0, r0, c0, c1, 1		@ read ID_PFR1
- 	and	r0, r0, #CPUID_ARM_GENTIMER_MASK	@ mask arch timer bits
- 	cmp	r0, #(1 << CPUID_ARM_GENTIMER_SHIFT)
--	ldreq	r1, =CONFIG_SYS_CLK_FREQ
-+	ldreq	r1, =CONFIG_TIMER_CLK_FREQ
- 	mcreq	p15, 0, r1, c14, c0, 0		@ write CNTFRQ
- #endif
- 
-@@ -191,6 +191,9 @@
- 	wfi
- 	ldr	r1, =CONFIG_SMP_PEN_ADDR	@ load start address
- 	ldr	r1, [r1]
-+#ifdef CONFIG_PEN_ADDR_BIG_ENDIAN
-+	rev	r1, r1
-+#endif
- 	cmp	r0, r1			@ make sure we dont execute this code
- 	beq	smp_waitloop		@ again (due to a spurious wakeup)
- 	mov	r0, r1
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/socfpga/freeze_controller.c u-boot/arch/arm/cpu/armv7/socfpga/freeze_controller.c
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/socfpga/freeze_controller.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/socfpga/freeze_controller.c	2015-01-01 17:34:32.021507054 +0100
-@@ -38,8 +38,7 @@
- 	/* Freeze channel 0 to 2 */
- 	for (channel_id = 0; channel_id <= 2; channel_id++) {
- 		ioctrl_reg_offset = (u32)(
--			&freeze_controller_base->vioctrl +
--			(channel_id << SYSMGR_FRZCTRL_VIOCTRL_SHIFT));
-+			&freeze_controller_base->vioctrl + channel_id);
- 
- 		/*
- 		 * Assert active low enrnsl, plniotri
-@@ -120,8 +119,7 @@
- 	/* Thaw channel 0 to 2 */
- 	for (channel_id = 0; channel_id <= 2; channel_id++) {
- 		ioctrl_reg_offset
--			= (u32)(&freeze_controller_base->vioctrl
--				+ (channel_id << SYSMGR_FRZCTRL_VIOCTRL_SHIFT));
-+			= (u32)(&freeze_controller_base->vioctrl + channel_id);
- 
- 		/*
- 		 * Assert active low bhniotri signal and
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/socfpga/reset_manager.c u-boot/arch/arm/cpu/armv7/socfpga/reset_manager.c
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/socfpga/reset_manager.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/socfpga/reset_manager.c	2015-01-01 17:34:32.021507054 +0100
-@@ -110,6 +110,6 @@
- {
- 	const void *reset = &reset_manager_base->per_mod_reset;
- 
--	clrbits_le32(reset, 1 << RSTMGR_PERMODRST_SPIM0_LSB);
--	clrbits_le32(reset, 1 << RSTMGR_PERMODRST_SPIM1_LSB);
-+	clrbits_le32(reset, (1 << RSTMGR_PERMODRST_SPIM0_LSB) |
-+		     (1 << RSTMGR_PERMODRST_SPIM1_LSB));
- }
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/stv0991/clock.c u-boot/arch/arm/cpu/armv7/stv0991/clock.c
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/stv0991/clock.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/stv0991/clock.c	2015-01-01 17:34:32.025506990 +0100
-@@ -0,0 +1,41 @@
-+/*
-+ * (C) Copyright 2014
-+ * Vikas Manocha, ST Micoelectronics, vikas.manocha at st.com.
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <asm/io.h>
-+#include <asm/arch/hardware.h>
-+#include <asm/arch/stv0991_cgu.h>
-+#include<asm/arch/stv0991_periph.h>
-+
-+static struct stv0991_cgu_regs *const stv0991_cgu_regs = \
-+				(struct stv0991_cgu_regs *) (CGU_BASE_ADDR);
-+
-+void enable_pll1(void)
-+{
-+	/* pll1 already configured for 1000Mhz, just need to enable it */
-+	writel(readl(&stv0991_cgu_regs->pll1_ctrl) & ~(0x01),
-+			&stv0991_cgu_regs->pll1_ctrl);
-+}
-+
-+void clock_setup(int peripheral)
-+{
-+	switch (peripheral) {
-+	case UART_CLOCK_CFG:
-+		writel(UART_CLK_CFG, &stv0991_cgu_regs->uart_freq);
-+		break;
-+	case ETH_CLOCK_CFG:
-+		enable_pll1();
-+		writel(ETH_CLK_CFG, &stv0991_cgu_regs->eth_freq);
-+
-+		/* Clock selection for ethernet tx_clk & rx_clk*/
-+		writel((readl(&stv0991_cgu_regs->eth_ctrl) & ETH_CLK_MASK)
-+				| ETH_CLK_CTRL, &stv0991_cgu_regs->eth_ctrl);
-+
-+		break;
-+	default:
-+		break;
-+	}
-+}
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/stv0991/lowlevel.S u-boot/arch/arm/cpu/armv7/stv0991/lowlevel.S
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/stv0991/lowlevel.S	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/stv0991/lowlevel.S	2015-01-01 17:34:32.025506990 +0100
-@@ -0,0 +1,12 @@
-+/*
-+ * (C) Copyright 2014 stmicroelectronics
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <config.h>
-+#include <linux/linkage.h>
-+
-+ENTRY(lowlevel_init)
-+	mov	pc, lr
-+ENDPROC(lowlevel_init)
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/stv0991/Makefile u-boot/arch/arm/cpu/armv7/stv0991/Makefile
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/stv0991/Makefile	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/stv0991/Makefile	2015-01-01 17:34:32.025506990 +0100
-@@ -0,0 +1,9 @@
-+#
-+# (C) Copyright 2014
-+# Vikas Manocha, ST Microelectronics, vikas.manocha at stcom
-+#
-+# SPDX-License-Identifier:	GPL-2.0+
-+#
-+
-+obj-y	:= timer.o clock.o pinmux.o reset.o
-+obj-y	+= lowlevel.o
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/stv0991/pinmux.c u-boot/arch/arm/cpu/armv7/stv0991/pinmux.c
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/stv0991/pinmux.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/stv0991/pinmux.c	2015-01-01 17:34:32.025506990 +0100
-@@ -0,0 +1,62 @@
-+/*
-+ * (C) Copyright 2014
-+ * Vikas Manocha, ST Micoelectronics, vikas.manocha at st.com.
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <asm/io.h>
-+#include <asm/arch/stv0991_creg.h>
-+#include <asm/arch/stv0991_periph.h>
-+#include <asm/arch/hardware.h>
-+
-+static struct stv0991_creg *const stv0991_creg = \
-+			(struct stv0991_creg *)CREG_BASE_ADDR;
-+
-+int stv0991_pinmux_config(int peripheral)
-+{
-+	switch (peripheral) {
-+	case UART_GPIOC_30_31:
-+		/* SSDA/SSCL pad muxing to UART Rx/Dx */
-+		writel((readl(&stv0991_creg->mux12) & GPIOC_31_MUX_MASK) |
-+				CFG_GPIOC_31_UART_RX,
-+				&stv0991_creg->mux12);
-+		writel((readl(&stv0991_creg->mux12) & GPIOC_30_MUX_MASK) |
-+				CFG_GPIOC_30_UART_TX,
-+				&stv0991_creg->mux12);
-+		/* SSDA/SSCL pad config to push pull*/
-+		writel((readl(&stv0991_creg->cfg_pad6) & GPIOC_31_MODE_MASK) |
-+				CFG_GPIOC_31_MODE_PP,
-+				&stv0991_creg->cfg_pad6);
-+		writel((readl(&stv0991_creg->cfg_pad6) & GPIOC_30_MODE_MASK) |
-+				CFG_GPIOC_30_MODE_HIGH,
-+				&stv0991_creg->cfg_pad6);
-+		break;
-+	case UART_GPIOB_16_17:
-+		/* ethernet rx_6/7 to UART Rx/Dx */
-+		writel((readl(&stv0991_creg->mux7) & GPIOB_17_MUX_MASK) |
-+				CFG_GPIOB_17_UART_RX,
-+				&stv0991_creg->mux7);
-+		writel((readl(&stv0991_creg->mux7) & GPIOB_16_MUX_MASK) |
-+				CFG_GPIOB_16_UART_TX,
-+				&stv0991_creg->mux7);
-+		break;
-+	case ETH_GPIOB_10_31_C_0_4:
-+		writel(readl(&stv0991_creg->mux6) & 0x000000FF,
-+				&stv0991_creg->mux6);
-+		writel(0x00000000, &stv0991_creg->mux7);
-+		writel(0x00000000, &stv0991_creg->mux8);
-+		writel(readl(&stv0991_creg->mux9) & 0xFFF00000,
-+				&stv0991_creg->mux9);
-+		/* Ethernet Voltage configuration to 1.8V*/
-+		writel((readl(&stv0991_creg->vdd_pad1) & VDD_ETH_PS_MASK) |
-+				ETH_VDD_CFG, &stv0991_creg->vdd_pad1);
-+		writel((readl(&stv0991_creg->vdd_pad1) & VDD_ETH_PS_MASK) |
-+				ETH_M_VDD_CFG, &stv0991_creg->vdd_pad1);
-+
-+		break;
-+	default:
-+		break;
-+	}
-+	return 0;
-+}
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/stv0991/reset.c u-boot/arch/arm/cpu/armv7/stv0991/reset.c
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/stv0991/reset.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/stv0991/reset.c	2015-01-01 17:34:32.025506990 +0100
-@@ -0,0 +1,26 @@
-+/*
-+ * (C) Copyright 2014
-+ * Vikas Manocha, ST Micoelectronics, vikas.manocha at st.com.
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <asm/io.h>
-+#include <asm/arch/stv0991_wdru.h>
-+void reset_cpu(ulong ignored)
-+{
-+	puts("System is going to reboot ...\n");
-+	/*
-+	 * This 1 second delay will allow the above message
-+	 * to be printed before reset
-+	 */
-+	udelay((1000 * 1000));
-+
-+	/* Setting bit 1 of the WDRU unit will reset the SoC */
-+	writel(WDRU_RST_SYS, &stv0991_wd_ru_ptr->wdru_ctrl1);
-+
-+	/* system will restart */
-+	while (1)
-+		;
-+}
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/stv0991/timer.c u-boot/arch/arm/cpu/armv7/stv0991/timer.c
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/stv0991/timer.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/stv0991/timer.c	2015-01-01 17:34:32.025506990 +0100
-@@ -0,0 +1,114 @@
-+/*
-+ * (C) Copyright 2014
-+ * Vikas Manocha, ST Micoelectronics, vikas.manocha at st.com.
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <asm/io.h>
-+#include <asm/arch-stv0991/hardware.h>
-+#include <asm/arch-stv0991/stv0991_cgu.h>
-+#include <asm/arch-stv0991/stv0991_gpt.h>
-+
-+static struct stv0991_cgu_regs *const stv0991_cgu_regs = \
-+				(struct stv0991_cgu_regs *) (CGU_BASE_ADDR);
-+
-+#define READ_TIMER()	(readl(&gpt1_regs_ptr->cnt) & GPT_FREE_RUNNING)
-+#define GPT_RESOLUTION	(CONFIG_STV0991_HZ_CLOCK / CONFIG_STV0991_HZ)
-+
-+DECLARE_GLOBAL_DATA_PTR;
-+
-+#define timestamp gd->arch.tbl
-+#define lastdec gd->arch.lastinc
-+
-+int timer_init(void)
-+{
-+	/* Timer1 clock configuration */
-+	writel(TIMER1_CLK_CFG, &stv0991_cgu_regs->tim_freq);
-+	writel(readl(&stv0991_cgu_regs->cgu_enable_2) |
-+			TIMER1_CLK_EN, &stv0991_cgu_regs->cgu_enable_2);
-+
-+	/* Stop the timer */
-+	writel(readl(&gpt1_regs_ptr->cr1) & ~GPT_CR1_CEN, &gpt1_regs_ptr->cr1);
-+	writel(GPT_PRESCALER_128, &gpt1_regs_ptr->psc);
-+	/* Configure timer for auto-reload */
-+	writel(readl(&gpt1_regs_ptr->cr1) | GPT_MODE_AUTO_RELOAD,
-+			&gpt1_regs_ptr->cr1);
-+
-+	/* load value for free running */
-+	writel(GPT_FREE_RUNNING, &gpt1_regs_ptr->arr);
-+
-+	/* start timer */
-+	writel(readl(&gpt1_regs_ptr->cr1) | GPT_CR1_CEN,
-+			&gpt1_regs_ptr->cr1);
-+
-+	/* Reset the timer */
-+	lastdec = READ_TIMER();
-+	timestamp = 0;
-+
-+	return 0;
-+}
-+
-+/*
-+ * timer without interrupts
-+ */
-+ulong get_timer(ulong base)
-+{
-+	return (get_timer_masked() / GPT_RESOLUTION) - base;
-+}
-+
-+void __udelay(unsigned long usec)
-+{
-+	ulong tmo;
-+	ulong start = get_timer_masked();
-+	ulong tenudelcnt = CONFIG_STV0991_HZ_CLOCK / (1000 * 100);
-+	ulong rndoff;
-+
-+	rndoff = (usec % 10) ? 1 : 0;
-+
-+	/* tenudelcnt timer tick gives 10 microsecconds delay */
-+	tmo = ((usec / 10) + rndoff) * tenudelcnt;
-+
-+	while ((ulong) (get_timer_masked() - start) < tmo)
-+		;
-+}
-+
-+ulong get_timer_masked(void)
-+{
-+	ulong now = READ_TIMER();
-+
-+	if (now >= lastdec) {
-+		/* normal mode */
-+		timestamp += now - lastdec;
-+	} else {
-+		/* we have an overflow ... */
-+		timestamp += now + GPT_FREE_RUNNING - lastdec;
-+	}
-+	lastdec = now;
-+
-+	return timestamp;
-+}
-+
-+void udelay_masked(unsigned long usec)
-+{
-+	return udelay(usec);
-+}
-+
-+/*
-+ * This function is derived from PowerPC code (read timebase as long long).
-+ * On ARM it just returns the timer value.
-+ */
-+unsigned long long get_ticks(void)
-+{
-+	return get_timer(0);
-+}
-+
-+/*
-+ * This function is derived from PowerPC code (timebase clock frequency).
-+ * On ARM it returns the number of timer ticks per second.
-+ */
-+ulong get_tbclk(void)
-+{
-+	return CONFIG_STV0991_HZ;
-+}
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/tegra124/Kconfig u-boot/arch/arm/cpu/armv7/tegra124/Kconfig
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/tegra124/Kconfig	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/tegra124/Kconfig	2015-01-01 17:34:32.025506990 +0100
-@@ -6,6 +6,15 @@
- config TARGET_JETSON_TK1
- 	bool "NVIDIA Tegra124 Jetson TK1 board"
- 
-+config TARGET_NYAN_BIG
-+	bool "Google/NVIDIA Nyan-big Chrombook"
-+	help
-+	  Nyan Big is a Tegra124 clamshell board that is very similar
-+	  to venice2, but it has a different panel, the sdcard CD and WP
-+	  sense are flipped, and it has a different revision of the AS3722
-+	  PMIC. The retail name is the Acer Chromebook 13 CB5-311-T7NN
-+	  (13.3-inch HD, NVIDIA Tegra K1, 2GB).
-+
- config TARGET_VENICE2
- 	bool "NVIDIA Tegra124 Venice2"
- 
-@@ -15,6 +24,7 @@
- 	default "tegra124"
- 
- source "board/nvidia/jetson-tk1/Kconfig"
-+source "board/nvidia/nyan-big/Kconfig"
- source "board/nvidia/venice2/Kconfig"
- 
- endif
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/uniphier/init_page_table.c u-boot/arch/arm/cpu/armv7/uniphier/init_page_table.c
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/uniphier/init_page_table.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/uniphier/init_page_table.c	2015-01-01 17:34:32.029506924 +0100
-@@ -17,11 +17,7 @@
- #define REG	DEVICE	/* IO Register: Device */
- #define DDR	DEVICE	/* DDR SDRAM: Device */
- 
--#ifdef CONFIG_SPL_BUILD
- #define IS_SPL_TEXT_AREA(x)	((x) == ((CONFIG_SPL_TEXT_BASE) >> 20))
--#else
--#define IS_SPL_TEXT_AREA(x)	((x) == ((CONFIG_SYS_TEXT_BASE) >> 20))
--#endif
- 
- #define IS_INIT_STACK_AREA(x)	((x) == ((CONFIG_SYS_INIT_SP_ADDR) >> 20))
- 
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/vf610/generic.c u-boot/arch/arm/cpu/armv7/vf610/generic.c
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/vf610/generic.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/vf610/generic.c	2015-01-01 17:34:32.029506924 +0100
-@@ -265,20 +265,21 @@
- 
- 	cause = readl(&src_regs->srsr);
- 	writel(cause, &src_regs->srsr);
--	cause &= 0xff;
- 
--	switch (cause) {
--	case 0x08:
--		return "WDOG";
--	case 0x20:
-+	if (cause & SRC_SRSR_POR_RST)
-+		return "POWER ON RESET";
-+	else if (cause & SRC_SRSR_WDOG_A5)
-+		return "WDOG A5";
-+	else if (cause & SRC_SRSR_WDOG_M4)
-+		return "WDOG M4";
-+	else if (cause & SRC_SRSR_JTAG_RST)
- 		return "JTAG HIGH-Z";
--	case 0x80:
-+	else if (cause & SRC_SRSR_SW_RST)
-+		return "SW RESET";
-+	else if (cause & SRC_SRSR_RESETB)
- 		return "EXTERNAL RESET";
--	case 0xfd:
--		return "POR";
--	default:
-+	else
- 		return "unknown reset";
--	}
- }
- 
- int print_cpuinfo(void)
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/tegra20-common/pmu.c u-boot/arch/arm/cpu/tegra20-common/pmu.c
---- u-boot-2015.01-rc3/arch/arm/cpu/tegra20-common/pmu.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/cpu/tegra20-common/pmu.c	2015-01-01 17:34:32.037506793 +0100
-@@ -6,6 +6,7 @@
-  */
- 
- #include <common.h>
-+#include <i2c.h>
- #include <tps6586x.h>
- #include <asm/io.h>
- #include <asm/arch/tegra.h>
-@@ -23,9 +24,13 @@
- #define VDD_TRANSITION_STEP	0x06	/* 150mv */
- #define VDD_TRANSITION_RATE	0x06	/* 3.52mv/us */
- 
-+#define PMI_I2C_ADDRESS	0x34	/* chip requires this address */
-+
- int pmu_set_nominal(void)
- {
--	int core, cpu, bus;
-+	struct udevice *bus, *dev;
-+	int core, cpu;
-+	int ret;
- 
- 	/* by default, the table has been filled with T25 settings */
- 	switch (tegra_get_chip_sku()) {
-@@ -42,12 +47,18 @@
- 		return -1;
- 	}
- 
--	bus = tegra_i2c_get_dvc_bus_num();
--	if (bus == -1) {
-+	ret = tegra_i2c_get_dvc_bus(&bus);
-+	if (ret) {
- 		debug("%s: Cannot find DVC I2C bus\n", __func__);
--		return -1;
-+		return ret;
- 	}
--	tps6586x_init(bus);
-+	ret = i2c_get_chip(bus, PMI_I2C_ADDRESS, &dev);
-+	if (ret) {
-+		debug("%s: Cannot find DVC I2C chip\n", __func__);
-+		return ret;
-+	}
-+
-+	tps6586x_init(dev);
- 	tps6586x_set_pwm_mode(TPS6586X_PWM_SM1);
- 	return tps6586x_adjust_sm0_sm1(core, cpu, VDD_TRANSITION_STEP,
- 				VDD_TRANSITION_RATE, VDD_RELATION);
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/u-boot-spl.lds u-boot/arch/arm/cpu/u-boot-spl.lds
---- u-boot-2015.01-rc3/arch/arm/cpu/u-boot-spl.lds	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/cpu/u-boot-spl.lds	2015-01-01 17:34:32.037506793 +0100
-@@ -32,6 +32,9 @@
- 	}
- 
- 	. = ALIGN(4);
-+	.u_boot_list : {
-+		KEEP(*(SORT(.u_boot_list*_i2c_*)));
-+	}
- 
- 	. = .;
- #ifdef CONFIG_SPL_DM
-diff -ruN u-boot-2015.01-rc3/arch/arm/dts/cros-ec-keyboard.dtsi u-boot/arch/arm/dts/cros-ec-keyboard.dtsi
---- u-boot-2015.01-rc3/arch/arm/dts/cros-ec-keyboard.dtsi	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/dts/cros-ec-keyboard.dtsi	2015-01-01 17:34:32.037506793 +0100
-@@ -0,0 +1,105 @@
-+/*
-+ * Keyboard dts fragment for devices that use cros-ec-keyboard
-+ *
-+ * Copyright (c) 2014 Google, Inc
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation.
-+*/
-+
-+#include <dt-bindings/input/input.h>
-+
-+&cros_ec {
-+	keyboard-controller {
-+		compatible = "google,cros-ec-keyb";
-+		keypad,num-rows = <8>;
-+		keypad,num-columns = <13>;
-+		google,needs-ghost-filter;
-+
-+		linux,keymap = <
-+			MATRIX_KEY(0x00, 0x01, KEY_LEFTMETA)
-+			MATRIX_KEY(0x00, 0x02, KEY_F1)
-+			MATRIX_KEY(0x00, 0x03, KEY_B)
-+			MATRIX_KEY(0x00, 0x04, KEY_F10)
-+			MATRIX_KEY(0x00, 0x06, KEY_N)
-+			MATRIX_KEY(0x00, 0x08, KEY_EQUAL)
-+			MATRIX_KEY(0x00, 0x0a, KEY_RIGHTALT)
-+
-+			MATRIX_KEY(0x01, 0x01, KEY_ESC)
-+			MATRIX_KEY(0x01, 0x02, KEY_F4)
-+			MATRIX_KEY(0x01, 0x03, KEY_G)
-+			MATRIX_KEY(0x01, 0x04, KEY_F7)
-+			MATRIX_KEY(0x01, 0x06, KEY_H)
-+			MATRIX_KEY(0x01, 0x08, KEY_APOSTROPHE)
-+			MATRIX_KEY(0x01, 0x09, KEY_F9)
-+			MATRIX_KEY(0x01, 0x0b, KEY_BACKSPACE)
-+
-+			MATRIX_KEY(0x02, 0x00, KEY_LEFTCTRL)
-+			MATRIX_KEY(0x02, 0x01, KEY_TAB)
-+			MATRIX_KEY(0x02, 0x02, KEY_F3)
-+			MATRIX_KEY(0x02, 0x03, KEY_T)
-+			MATRIX_KEY(0x02, 0x04, KEY_F6)
-+			MATRIX_KEY(0x02, 0x05, KEY_RIGHTBRACE)
-+			MATRIX_KEY(0x02, 0x06, KEY_Y)
-+			MATRIX_KEY(0x02, 0x07, KEY_102ND)
-+			MATRIX_KEY(0x02, 0x08, KEY_LEFTBRACE)
-+			MATRIX_KEY(0x02, 0x09, KEY_F8)
-+
-+			MATRIX_KEY(0x03, 0x01, KEY_GRAVE)
-+			MATRIX_KEY(0x03, 0x02, KEY_F2)
-+			MATRIX_KEY(0x03, 0x03, KEY_5)
-+			MATRIX_KEY(0x03, 0x04, KEY_F5)
-+			MATRIX_KEY(0x03, 0x06, KEY_6)
-+			MATRIX_KEY(0x03, 0x08, KEY_MINUS)
-+			MATRIX_KEY(0x03, 0x0b, KEY_BACKSLASH)
-+
-+			MATRIX_KEY(0x04, 0x00, KEY_RIGHTCTRL)
-+			MATRIX_KEY(0x04, 0x01, KEY_A)
-+			MATRIX_KEY(0x04, 0x02, KEY_D)
-+			MATRIX_KEY(0x04, 0x03, KEY_F)
-+			MATRIX_KEY(0x04, 0x04, KEY_S)
-+			MATRIX_KEY(0x04, 0x05, KEY_K)
-+			MATRIX_KEY(0x04, 0x06, KEY_J)
-+			MATRIX_KEY(0x04, 0x08, KEY_SEMICOLON)
-+			MATRIX_KEY(0x04, 0x09, KEY_L)
-+			MATRIX_KEY(0x04, 0x0a, KEY_BACKSLASH)
-+			MATRIX_KEY(0x04, 0x0b, KEY_ENTER)
-+
-+			MATRIX_KEY(0x05, 0x01, KEY_Z)
-+			MATRIX_KEY(0x05, 0x02, KEY_C)
-+			MATRIX_KEY(0x05, 0x03, KEY_V)
-+			MATRIX_KEY(0x05, 0x04, KEY_X)
-+			MATRIX_KEY(0x05, 0x05, KEY_COMMA)
-+			MATRIX_KEY(0x05, 0x06, KEY_M)
-+			MATRIX_KEY(0x05, 0x07, KEY_LEFTSHIFT)
-+			MATRIX_KEY(0x05, 0x08, KEY_SLASH)
-+			MATRIX_KEY(0x05, 0x09, KEY_DOT)
-+			MATRIX_KEY(0x05, 0x0b, KEY_SPACE)
-+
-+			MATRIX_KEY(0x06, 0x01, KEY_1)
-+			MATRIX_KEY(0x06, 0x02, KEY_3)
-+			MATRIX_KEY(0x06, 0x03, KEY_4)
-+			MATRIX_KEY(0x06, 0x04, KEY_2)
-+			MATRIX_KEY(0x06, 0x05, KEY_8)
-+			MATRIX_KEY(0x06, 0x06, KEY_7)
-+			MATRIX_KEY(0x06, 0x08, KEY_0)
-+			MATRIX_KEY(0x06, 0x09, KEY_9)
-+			MATRIX_KEY(0x06, 0x0a, KEY_LEFTALT)
-+			MATRIX_KEY(0x06, 0x0b, KEY_DOWN)
-+			MATRIX_KEY(0x06, 0x0c, KEY_RIGHT)
-+
-+			MATRIX_KEY(0x07, 0x01, KEY_Q)
-+			MATRIX_KEY(0x07, 0x02, KEY_E)
-+			MATRIX_KEY(0x07, 0x03, KEY_R)
-+			MATRIX_KEY(0x07, 0x04, KEY_W)
-+			MATRIX_KEY(0x07, 0x05, KEY_I)
-+			MATRIX_KEY(0x07, 0x06, KEY_U)
-+			MATRIX_KEY(0x07, 0x07, KEY_RIGHTSHIFT)
-+			MATRIX_KEY(0x07, 0x08, KEY_P)
-+			MATRIX_KEY(0x07, 0x09, KEY_O)
-+			MATRIX_KEY(0x07, 0x0b, KEY_UP)
-+			MATRIX_KEY(0x07, 0x0c, KEY_LEFT)
-+		>;
-+	};
-+};
-diff -ruN u-boot-2015.01-rc3/arch/arm/dts/include/dt-bindings/pinctrl/pinctrl-tegra.h u-boot/arch/arm/dts/include/dt-bindings/pinctrl/pinctrl-tegra.h
-diff -ruN u-boot-2015.01-rc3/arch/arm/dts/include/dt-bindings/reset/altr,rst-mgr.h u-boot/arch/arm/dts/include/dt-bindings/reset/altr,rst-mgr.h
-diff -ruN u-boot-2015.01-rc3/arch/arm/dts/Makefile u-boot/arch/arm/dts/Makefile
---- u-boot-2015.01-rc3/arch/arm/dts/Makefile	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/dts/Makefile	2015-01-01 17:34:32.037506793 +0100
-@@ -31,6 +31,7 @@
- 	tegra30-tec-ng.dtb \
- 	tegra114-dalmore.dtb \
- 	tegra124-jetson-tk1.dtb \
-+	tegra124-nyan-big.dtb \
- 	tegra124-venice2.dtb
- dtb-$(CONFIG_ARCH_UNIPHIER) += \
- 	uniphier-ph1-sld3-ref.dtb \
-diff -ruN u-boot-2015.01-rc3/arch/arm/dts/socfpga_cyclone5.dtsi u-boot/arch/arm/dts/socfpga_cyclone5.dtsi
---- u-boot-2015.01-rc3/arch/arm/dts/socfpga_cyclone5.dtsi	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/dts/socfpga_cyclone5.dtsi	2015-01-01 17:34:32.041506727 +0100
-@@ -1,18 +1,7 @@
- /*
-  *  Copyright (C) 2012 Altera Corporation <www.altera.com>
-  *
-- * This program is free software; you can redistribute it and/or modify
-- * it under the terms of the GNU General Public License as published by
-- * the Free Software Foundation; either version 2 of the License, or
-- * (at your option) any later version.
-- *
-- * This program is distributed in the hope that it will be useful,
-- * but WITHOUT ANY WARRANTY; without even the implied warranty of
-- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- * GNU General Public License for more details.
-- *
-- * You should have received a copy of the GNU General Public License
-- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
-+ * SPDX-License-Identifier:	GPL-2.0+
-  */
- 
- /dts-v1/;
-diff -ruN u-boot-2015.01-rc3/arch/arm/dts/socfpga_cyclone5_socrates.dts u-boot/arch/arm/dts/socfpga_cyclone5_socrates.dts
---- u-boot-2015.01-rc3/arch/arm/dts/socfpga_cyclone5_socrates.dts	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/dts/socfpga_cyclone5_socrates.dts	2015-01-01 17:34:32.041506727 +0100
-@@ -1,18 +1,7 @@
- /*
-  *  Copyright (C) 2014 Steffen Trumtrar <s.trumtrar at pengutronix.de>
-  *
-- * This program is free software; you can redistribute it and/or modify
-- * it under the terms of the GNU General Public License as published by
-- * the Free Software Foundation; either version 2 of the License, or
-- * (at your option) any later version.
-- *
-- * This program is distributed in the hope that it will be useful,
-- * but WITHOUT ANY WARRANTY; without even the implied warranty of
-- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- * GNU General Public License for more details.
-- *
-- * You should have received a copy of the GNU General Public License
-- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
-+ * SPDX-License-Identifier:	GPL-2.0+
-  */
- 
- #include "socfpga_cyclone5.dtsi"
-@@ -25,6 +14,12 @@
- 		bootargs = "console=ttyS0,115200";
- 	};
- 
-+ 	aliases {
-+		spi0 = "/spi at ff705000";		/* QSPI */
-+		spi1 = "/spi at fff00000";
-+		spi2 = "/spi at fff01000";
-+ 	};
-+
- 	memory {
- 		name = "memory";
- 		device_type = "memory";
-@@ -48,3 +43,23 @@
- &mmc {
- 	status = "okay";
- };
-+
-+&qspi {
-+	status = "okay";
-+
-+	flash0: n25q00 at 0 {
-+		#address-cells = <1>;
-+		#size-cells = <1>;
-+		compatible = "n25q00";
-+		reg = <0>;      /* chip select */
-+		spi-max-frequency = <50000000>;
-+		m25p,fast-read;
-+		page-size = <256>;
-+		block-size = <16>; /* 2^16, 64KB */
-+		read-delay = <4>;  /* delay value in read data capture register */
-+		tshsl-ns = <50>;
-+		tsd2d-ns = <50>;
-+		tchsh-ns = <4>;
-+		tslch-ns = <4>;
-+	};
-+};
-diff -ruN u-boot-2015.01-rc3/arch/arm/dts/socfpga.dtsi u-boot/arch/arm/dts/socfpga.dtsi
---- u-boot-2015.01-rc3/arch/arm/dts/socfpga.dtsi	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/dts/socfpga.dtsi	2015-01-01 17:34:32.041506727 +0100
-@@ -1,18 +1,7 @@
- /*
-  *  Copyright (C) 2012 Altera <www.altera.com>
-  *
-- * This program is free software; you can redistribute it and/or modify
-- * it under the terms of the GNU General Public License as published by
-- * the Free Software Foundation; either version 2 of the License, or
-- * (at your option) any later version.
-- *
-- * This program is distributed in the hope that it will be useful,
-- * but WITHOUT ANY WARRANTY; without even the implied warranty of
-- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- * GNU General Public License for more details.
-- *
-- * You should have received a copy of the GNU General Public License
-- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
-+ * SPDX-License-Identifier:	GPL-2.0+
-  */
- 
- #include "skeleton.dtsi"
-@@ -639,6 +628,49 @@
- 			clock-names = "biu", "ciu";
- 		};
- 
-+		qspi: spi at ff705000 {
-+			compatible = "cadence,qspi";
-+			#address-cells = <1>;
-+			#size-cells = <0>;
-+			reg = <0xff705000 0x1000>,
-+				<0xffa00000 0x1000>;
-+			interrupts = <0 151 4>;
-+			clocks = <&qspi_clk>;
-+			ext-decoder = <0>;  /* external decoder */
-+			num-chipselect = <4>;
-+			fifo-depth = <128>;
-+			bus-num = <2>;
-+			status = "disabled";
-+		};
-+
-+		spi0: spi at fff00000 {
-+			compatible = "snps,dw-spi-mmio";
-+			#address-cells = <1>;
-+			#size-cells = <0>;
-+			reg = <0xfff00000 0x1000>;
-+			interrupts = <0 154 4>;
-+			num-chipselect = <4>;
-+			bus-num = <0>;
-+			tx-dma-channel = <&pdma 16>;
-+			rx-dma-channel = <&pdma 17>;
-+			clocks = <&per_base_clk>;
-+			status = "disabled";
-+		};
-+
-+		spi1: spi at fff01000 {
-+			compatible = "snps,dw-spi-mmio";
-+			#address-cells = <1>;
-+			#size-cells = <0>;
-+			reg = <0xfff01000 0x1000>;
-+			interrupts = <0 156 4>;
-+			num-chipselect = <4>;
-+			bus-num = <1>;
-+			tx-dma-channel = <&pdma 20>;
-+			rx-dma-channel = <&pdma 21>;
-+			clocks = <&per_base_clk>;
-+			status = "disabled";
-+		};
-+
- 		/* Local timer */
- 		timer at fffec600 {
- 			compatible = "arm,cortex-a9-twd-timer";
-diff -ruN u-boot-2015.01-rc3/arch/arm/dts/tegra124.dtsi u-boot/arch/arm/dts/tegra124.dtsi
---- u-boot-2015.01-rc3/arch/arm/dts/tegra124.dtsi	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/dts/tegra124.dtsi	2015-01-01 17:34:32.041506727 +0100
-@@ -1,5 +1,6 @@
- #include <dt-bindings/clock/tegra124-car.h>
- #include <dt-bindings/gpio/tegra-gpio.h>
-+#include <dt-bindings/pinctrl/pinctrl-tegra.h>
- #include <dt-bindings/interrupt-controller/arm-gic.h>
- 
- #include "skeleton.dtsi"
-@@ -192,6 +193,16 @@
- 		status = "disabled";
- 	};
- 
-+	pwm: pwm at 7000a000 {
-+		compatible = "nvidia,tegra124-pwm", "nvidia,tegra20-pwm";
-+		reg = <0x7000a000 0x100>;
-+		#pwm-cells = <2>;
-+		clocks = <&tegra_car TEGRA124_CLK_PWM>;
-+		resets = <&tegra_car 17>;
-+		reset-names = "pwm";
-+		status = "disabled";
-+	};
-+
- 	spi at 7000d400 {
- 		compatible = "nvidia,tegra124-spi", "nvidia,tegra114-spi";
- 		reg = <0x7000d400 0x200>;
-@@ -290,6 +301,109 @@
- 		status = "disabled";
- 	};
- 
-+	ahub at 70300000 {
-+		compatible = "nvidia,tegra124-ahub";
-+		reg = <0x70300000 0x200>,
-+		      <0x70300800 0x800>,
-+		      <0x70300200 0x600>;
-+		interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
-+		clocks = <&tegra_car TEGRA124_CLK_D_AUDIO>,
-+			 <&tegra_car TEGRA124_CLK_APBIF>;
-+		clock-names = "d_audio", "apbif";
-+		resets = <&tegra_car 106>, /* d_audio */
-+			 <&tegra_car 107>, /* apbif */
-+			 <&tegra_car 30>,  /* i2s0 */
-+			 <&tegra_car 11>,  /* i2s1 */
-+			 <&tegra_car 18>,  /* i2s2 */
-+			 <&tegra_car 101>, /* i2s3 */
-+			 <&tegra_car 102>, /* i2s4 */
-+			 <&tegra_car 108>, /* dam0 */
-+			 <&tegra_car 109>, /* dam1 */
-+			 <&tegra_car 110>, /* dam2 */
-+			 <&tegra_car 10>,  /* spdif */
-+			 <&tegra_car 153>, /* amx */
-+			 <&tegra_car 185>, /* amx1 */
-+			 <&tegra_car 154>, /* adx */
-+			 <&tegra_car 180>, /* adx1 */
-+			 <&tegra_car 186>, /* afc0 */
-+			 <&tegra_car 187>, /* afc1 */
-+			 <&tegra_car 188>, /* afc2 */
-+			 <&tegra_car 189>, /* afc3 */
-+			 <&tegra_car 190>, /* afc4 */
-+			 <&tegra_car 191>; /* afc5 */
-+		reset-names = "d_audio", "apbif", "i2s0", "i2s1", "i2s2",
-+			      "i2s3", "i2s4", "dam0", "dam1", "dam2",
-+			      "spdif", "amx", "amx1", "adx", "adx1",
-+			      "afc0", "afc1", "afc2", "afc3", "afc4", "afc5";
-+		dmas = <&apbdma 1>, <&apbdma 1>,
-+		       <&apbdma 2>, <&apbdma 2>,
-+		       <&apbdma 3>, <&apbdma 3>,
-+		       <&apbdma 4>, <&apbdma 4>,
-+		       <&apbdma 6>, <&apbdma 6>,
-+		       <&apbdma 7>, <&apbdma 7>,
-+		       <&apbdma 12>, <&apbdma 12>,
-+		       <&apbdma 13>, <&apbdma 13>,
-+		       <&apbdma 14>, <&apbdma 14>,
-+		       <&apbdma 29>, <&apbdma 29>;
-+		dma-names = "rx0", "tx0", "rx1", "tx1", "rx2", "tx2",
-+			    "rx3", "tx3", "rx4", "tx4", "rx5", "tx5",
-+			    "rx6", "tx6", "rx7", "tx7", "rx8", "tx8",
-+			    "rx9", "tx9";
-+		ranges;
-+		#address-cells = <1>;
-+		#size-cells = <1>;
-+
-+		tegra_i2s0: i2s at 70301000 {
-+			compatible = "nvidia,tegra124-i2s";
-+			reg = <0x70301000 0x100>;
-+			nvidia,ahub-cif-ids = <4 4>;
-+			clocks = <&tegra_car TEGRA124_CLK_I2S0>;
-+			resets = <&tegra_car 30>;
-+			reset-names = "i2s";
-+			status = "disabled";
-+		};
-+
-+		tegra_i2s1: i2s at 70301100 {
-+			compatible = "nvidia,tegra124-i2s";
-+			reg = <0x70301100 0x100>;
-+			nvidia,ahub-cif-ids = <5 5>;
-+			clocks = <&tegra_car TEGRA124_CLK_I2S1>;
-+			resets = <&tegra_car 11>;
-+			reset-names = "i2s";
-+			status = "disabled";
-+		};
-+
-+		tegra_i2s2: i2s at 70301200 {
-+			compatible = "nvidia,tegra124-i2s";
-+			reg = <0x70301200 0x100>;
-+			nvidia,ahub-cif-ids = <6 6>;
-+			clocks = <&tegra_car TEGRA124_CLK_I2S2>;
-+			resets = <&tegra_car 18>;
-+			reset-names = "i2s";
-+			status = "disabled";
-+		};
-+
-+		tegra_i2s3: i2s at 70301300 {
-+			compatible = "nvidia,tegra124-i2s";
-+			reg = <0x70301300 0x100>;
-+			nvidia,ahub-cif-ids = <7 7>;
-+			clocks = <&tegra_car TEGRA124_CLK_I2S3>;
-+			resets = <&tegra_car 101>;
-+			reset-names = "i2s";
-+			status = "disabled";
-+		};
-+
-+		tegra_i2s4: i2s at 70301400 {
-+			compatible = "nvidia,tegra124-i2s";
-+			reg = <0x70301400 0x100>;
-+			nvidia,ahub-cif-ids = <8 8>;
-+			clocks = <&tegra_car TEGRA124_CLK_I2S4>;
-+			resets = <&tegra_car 102>;
-+			reset-names = "i2s";
-+			status = "disabled";
-+		};
-+	};
-+
- 	usb at 7d000000 {
- 		compatible = "nvidia,tegra124-ehci", "nvidia,tegra30-ehci";
- 		reg = <0x7d000000 0x4000>;
-diff -ruN u-boot-2015.01-rc3/arch/arm/dts/tegra124-jetson-tk1.dts u-boot/arch/arm/dts/tegra124-jetson-tk1.dts
---- u-boot-2015.01-rc3/arch/arm/dts/tegra124-jetson-tk1.dts	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/dts/tegra124-jetson-tk1.dts	2015-01-01 17:34:32.041506727 +0100
-@@ -16,7 +16,6 @@
- 		i2c2 = "/i2c at 7000c400";
- 		i2c3 = "/i2c at 7000c500";
- 		i2c4 = "/i2c at 7000c700";
--		i2c5 = "/i2c at 7000d100";
- 		sdhci0 = "/sdhci at 700b0600";
- 		sdhci1 = "/sdhci at 700b0400";
- 		spi0 = "/spi at 7000d400";
-diff -ruN u-boot-2015.01-rc3/arch/arm/dts/tegra124-nyan-big.dts u-boot/arch/arm/dts/tegra124-nyan-big.dts
---- u-boot-2015.01-rc3/arch/arm/dts/tegra124-nyan-big.dts	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/dts/tegra124-nyan-big.dts	2015-01-01 17:34:32.041506727 +0100
-@@ -0,0 +1,365 @@
-+/dts-v1/;
-+
-+#include <dt-bindings/input/input.h>
-+#include "tegra124.dtsi"
-+
-+/ {
-+	model = "Acer Chromebook 13 CB5-311";
-+	compatible = "google,nyan-big", "nvidia,tegra124";
-+
-+	aliases {
-+		console = &uarta;
-+		i2c0 = "/i2c at 7000d000";
-+		i2c1 = "/i2c at 7000c000";
-+		i2c2 = "/i2c at 7000c400";
-+		i2c3 = "/i2c at 7000c500";
-+		i2c4 = "/i2c at 7000c700";
-+		i2c5 = "/i2c at 7000d100";
-+		rtc0 = "/i2c at 0,7000d000/pmic at 40";
-+		rtc1 = "/rtc at 0,7000e000";
-+		sdhci0 = "/sdhci at 700b0600";
-+		sdhci1 = "/sdhci at 700b0400";
-+		spi0 = "/spi at 7000d400";
-+		spi1 = "/spi at 7000da00";
-+		usb0 = "/usb at 7d000000";
-+		usb1 = "/usb at 7d008000";
-+	};
-+
-+	memory {
-+		reg = <0x80000000 0x80000000>;
-+	};
-+
-+	serial at 70006000 {
-+		/* Debug connector on the bottom of the board near SD card. */
-+		status = "okay";
-+	};
-+
-+	pwm at 7000a000 {
-+		status = "okay";
-+	};
-+
-+	i2c at 7000c000 {
-+		status = "okay";
-+		clock-frequency = <100000>;
-+
-+		acodec: audio-codec at 10 {
-+			compatible = "maxim,max98090";
-+			reg = <0x10>;
-+			interrupt-parent = <&gpio>;
-+			interrupts = <TEGRA_GPIO(H, 4) GPIO_ACTIVE_HIGH>;
-+		};
-+
-+		temperature-sensor at 4c {
-+			compatible = "ti,tmp451";
-+			reg = <0x4c>;
-+			interrupt-parent = <&gpio>;
-+			interrupts = <TEGRA_GPIO(I, 6) IRQ_TYPE_LEVEL_LOW>;
-+
-+			#thermal-sensor-cells = <1>;
-+		};
-+	};
-+
-+	i2c at 7000c400 {
-+		status = "okay";
-+		clock-frequency = <100000>;
-+	};
-+
-+	i2c at 7000c500 {
-+		status = "okay";
-+		clock-frequency = <400000>;
-+
-+		tpm at 20 {
-+			compatible = "infineon,slb9645tt";
-+			reg = <0x20>;
-+		};
-+	};
-+
-+	hdmi_ddc: i2c at 7000c700 {
-+		status = "okay";
-+		clock-frequency = <100000>;
-+	};
-+
-+	i2c at 7000d000 {
-+		status = "okay";
-+		clock-frequency = <400000>;
-+
-+		pmic: pmic at 40 {
-+			compatible = "ams,as3722";
-+			reg = <0x40>;
-+			interrupts = <0 86 IRQ_TYPE_LEVEL_HIGH>;
-+
-+			ams,system-power-controller;
-+
-+			#interrupt-cells = <2>;
-+			interrupt-controller;
-+
-+			gpio-controller;
-+			#gpio-cells = <2>;
-+
-+			pinctrl-names = "default";
-+			pinctrl-0 = <&as3722_default>;
-+
-+			as3722_default: pinmux {
-+				gpio0 {
-+					pins = "gpio0";
-+					function = "gpio";
-+					bias-pull-down;
-+				};
-+
-+				gpio1 {
-+					pins = "gpio1";
-+					function = "gpio";
-+					bias-pull-up;
-+				};
-+
-+				gpio2_4_7 {
-+					pins = "gpio2", "gpio4", "gpio7";
-+					function = "gpio";
-+					bias-pull-up;
-+				};
-+
-+				gpio3_6 {
-+					pins = "gpio3", "gpio6";
-+					bias-high-impedance;
-+				};
-+
-+				gpio5 {
-+					pins = "gpio5";
-+					function = "clk32k-out";
-+					bias-pull-down;
-+				};
-+			};
-+		};
-+	};
-+
-+	spi at 7000d400 {
-+		status = "okay";
-+
-+		cros_ec: cros-ec at 0 {
-+			compatible = "google,cros-ec-spi";
-+			spi-max-frequency = <3000000>;
-+			interrupt-parent = <&gpio>;
-+			interrupts = <TEGRA_GPIO(C, 7) IRQ_TYPE_LEVEL_LOW>;
-+			reg = <0>;
-+
-+			google,cros-ec-spi-msg-delay = <2000>;
-+
-+			i2c-tunnel {
-+				compatible = "google,cros-ec-i2c-tunnel";
-+				#address-cells = <1>;
-+				#size-cells = <0>;
-+
-+				google,remote-bus = <0>;
-+
-+				charger: bq24735 at 9 {
-+					compatible = "ti,bq24735";
-+					reg = <0x9>;
-+					interrupt-parent = <&gpio>;
-+					interrupts = <TEGRA_GPIO(J, 0)
-+							GPIO_ACTIVE_HIGH>;
-+					ti,ac-detect-gpios = <&gpio
-+							TEGRA_GPIO(J, 0)
-+							GPIO_ACTIVE_HIGH>;
-+				};
-+
-+				battery: sbs-battery at b {
-+					compatible = "sbs,sbs-battery";
-+					reg = <0xb>;
-+					sbs,i2c-retry-count = <2>;
-+					sbs,poll-retry-count = <10>;
-+					power-supplies = <&charger>;
-+				};
-+			};
-+		};
-+	};
-+
-+	spi at 7000da00 {
-+		status = "okay";
-+		spi-max-frequency = <25000000>;
-+
-+		flash at 0 {
-+			compatible = "winbond,w25q32dw";
-+			reg = <0>;
-+		};
-+	};
-+
-+	pmc at 7000e400 {
-+		nvidia,invert-interrupt;
-+		nvidia,suspend-mode = <0>;
-+		nvidia,cpu-pwr-good-time = <500>;
-+		nvidia,cpu-pwr-off-time = <300>;
-+		nvidia,core-pwr-good-time = <641 3845>;
-+		nvidia,core-pwr-off-time = <61036>;
-+		nvidia,core-power-req-active-high;
-+		nvidia,sys-clock-req-active-high;
-+	};
-+
-+	hda at 70030000 {
-+		status = "okay";
-+	};
-+
-+	sdhci at 700b0000 { /* WiFi/BT on this bus */
-+		status = "okay";
-+		power-gpios = <&gpio TEGRA_GPIO(X, 7) GPIO_ACTIVE_HIGH>;
-+		bus-width = <4>;
-+		no-1-8-v;
-+		non-removable;
-+	};
-+
-+	sdhci at 700b0400 { /* SD Card on this bus */
-+		status = "okay";
-+		cd-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_LOW>;
-+		power-gpios = <&gpio TEGRA_GPIO(R, 0) GPIO_ACTIVE_HIGH>;
-+		wp-gpios = <&gpio TEGRA_GPIO(Q, 4) GPIO_ACTIVE_LOW>;
-+		bus-width = <4>;
-+		no-1-8-v;
-+	};
-+
-+	sdhci at 700b0600 { /* eMMC on this bus */
-+		status = "okay";
-+		bus-width = <8>;
-+		no-1-8-v;
-+		non-removable;
-+	};
-+
-+	ahub at 70300000 {
-+		i2s at 70301100 {
-+			status = "okay";
-+		};
-+	};
-+
-+	usb at 7d000000 { /* Rear external USB port. */
-+		status = "okay";
-+	};
-+
-+	usb-phy at 7d000000 {
-+		status = "okay";
-+	};
-+
-+	usb at 7d004000 { /* Internal webcam. */
-+		status = "okay";
-+	};
-+
-+	usb-phy at 7d004000 {
-+		status = "okay";
-+	};
-+
-+	usb at 7d008000 { /* Left external USB port. */
-+		status = "okay";
-+	};
-+
-+	usb-phy at 7d008000 {
-+		status = "okay";
-+	};
-+
-+	backlight: backlight {
-+		compatible = "pwm-backlight";
-+
-+		enable-gpios = <&gpio TEGRA_GPIO(H, 2) GPIO_ACTIVE_HIGH>;
-+		pwms = <&pwm 1 1000000>;
-+
-+		default-brightness-level = <224>;
-+		brightness-levels =
-+			<  0   1   2   3   4   5   6   7
-+			   8   9  10  11  12  13  14  15
-+			  16  17  18  19  20  21  22  23
-+			  24  25  26  27  28  29  30  31
-+			  32  33  34  35  36  37  38  39
-+			  40  41  42  43  44  45  46  47
-+			  48  49  50  51  52  53  54  55
-+			  56  57  58  59  60  61  62  63
-+			  64  65  66  67  68  69  70  71
-+			  72  73  74  75  76  77  78  79
-+			  80  81  82  83  84  85  86  87
-+			  88  89  90  91  92  93  94  95
-+			  96  97  98  99 100 101 102 103
-+			 104 105 106 107 108 109 110 111
-+			 112 113 114 115 116 117 118 119
-+			 120 121 122 123 124 125 126 127
-+			 128 129 130 131 132 133 134 135
-+			 136 137 138 139 140 141 142 143
-+			 144 145 146 147 148 149 150 151
-+			 152 153 154 155 156 157 158 159
-+			 160 161 162 163 164 165 166 167
-+			 168 169 170 171 172 173 174 175
-+			 176 177 178 179 180 181 182 183
-+			 184 185 186 187 188 189 190 191
-+			 192 193 194 195 196 197 198 199
-+			 200 201 202 203 204 205 206 207
-+			 208 209 210 211 212 213 214 215
-+			 216 217 218 219 220 221 222 223
-+			 224 225 226 227 228 229 230 231
-+			 232 233 234 235 236 237 238 239
-+			 240 241 242 243 244 245 246 247
-+			 248 249 250 251 252 253 254 255
-+			 256>;
-+	};
-+
-+	clocks {
-+		compatible = "simple-bus";
-+		#address-cells = <1>;
-+		#size-cells = <0>;
-+
-+		clk32k_in: clock at 0 {
-+			compatible = "fixed-clock";
-+			reg = <0>;
-+			#clock-cells = <0>;
-+			clock-frequency = <32768>;
-+		};
-+	};
-+
-+	gpio-keys {
-+		compatible = "gpio-keys";
-+
-+		lid {
-+			label = "Lid";
-+			gpios = <&gpio TEGRA_GPIO(R, 4) GPIO_ACTIVE_LOW>;
-+			linux,input-type = <5>;
-+			linux,code = <KEY_RESERVED>;
-+			debounce-interval = <1>;
-+			gpio-key,wakeup;
-+		};
-+
-+		power {
-+			label = "Power";
-+			gpios = <&gpio TEGRA_GPIO(Q, 0) GPIO_ACTIVE_LOW>;
-+			linux,code = <KEY_POWER>;
-+			debounce-interval = <30>;
-+			gpio-key,wakeup;
-+		};
-+	};
-+
-+	panel: panel {
-+		compatible = "auo,b133xtn01";
-+
-+		backlight = <&backlight>;
-+	};
-+
-+	sound {
-+		compatible = "nvidia,tegra-audio-max98090-nyan-big",
-+			     "nvidia,tegra-audio-max98090";
-+		nvidia,model = "Acer Chromebook 13";
-+
-+		nvidia,audio-routing =
-+			"Headphones", "HPR",
-+			"Headphones", "HPL",
-+			"Speakers", "SPKR",
-+			"Speakers", "SPKL",
-+			"Mic Jack", "MICBIAS",
-+			"DMICL", "Int Mic",
-+			"DMICR", "Int Mic",
-+			"IN34", "Mic Jack";
-+
-+		nvidia,i2s-controller = <&tegra_i2s1>;
-+		nvidia,audio-codec = <&acodec>;
-+
-+		clocks = <&tegra_car TEGRA124_CLK_PLL_A>,
-+			 <&tegra_car TEGRA124_CLK_PLL_A_OUT0>,
-+			 <&tegra_car TEGRA124_CLK_EXTERN1>;
-+		clock-names = "pll_a", "pll_a_out0", "mclk";
-+
-+		nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(I, 7) GPIO_ACTIVE_HIGH>;
-+	};
-+};
-+
-+#include "cros-ec-keyboard.dtsi"
-diff -ruN u-boot-2015.01-rc3/arch/arm/dts/tegra30-tec-ng.dts u-boot/arch/arm/dts/tegra30-tec-ng.dts
---- u-boot-2015.01-rc3/arch/arm/dts/tegra30-tec-ng.dts	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/dts/tegra30-tec-ng.dts	2015-01-01 17:34:32.045506662 +0100
-@@ -6,6 +6,10 @@
- 	model = "Avionic Design Tamonten? NG Evaluation Carrier";
- 	compatible = "ad,tec-ng", "nvidia,tegra30";
- 
-+	aliases {
-+		i2c0 = "/i2c at 7000c400";
-+	};
-+
- 	/* GEN2 */
- 	i2c at 7000c400 {
- 		status = "okay";
-diff -ruN u-boot-2015.01-rc3/arch/arm/dts/uniphier-ph1-ld4-ref.dts u-boot/arch/arm/dts/uniphier-ph1-ld4-ref.dts
---- u-boot-2015.01-rc3/arch/arm/dts/uniphier-ph1-ld4-ref.dts	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/dts/uniphier-ph1-ld4-ref.dts	2015-01-01 17:34:32.045506662 +0100
-@@ -25,10 +25,10 @@
- 	};
- 
- 	aliases {
--		uart0 = &uart0;
--		uart1 = &uart1;
--		uart2 = &uart2;
--		uart3 = &uart3;
-+		serial0 = &uart0;
-+		serial1 = &uart1;
-+		serial2 = &uart2;
-+		serial3 = &uart3;
- 		i2c0 = &i2c0;
- 		i2c1 = &i2c1;
- 		i2c2 = &i2c2;
-diff -ruN u-boot-2015.01-rc3/arch/arm/dts/uniphier-ph1-pro4-ref.dts u-boot/arch/arm/dts/uniphier-ph1-pro4-ref.dts
---- u-boot-2015.01-rc3/arch/arm/dts/uniphier-ph1-pro4-ref.dts	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/dts/uniphier-ph1-pro4-ref.dts	2015-01-01 17:34:32.045506662 +0100
-@@ -25,10 +25,10 @@
- 	};
- 
- 	aliases {
--		uart0 = &uart0;
--		uart1 = &uart1;
--		uart2 = &uart2;
--		uart3 = &uart3;
-+		serial0 = &uart0;
-+		serial1 = &uart1;
-+		serial2 = &uart2;
-+		serial3 = &uart3;
- 		i2c0 = &i2c0;
- 		i2c1 = &i2c1;
- 		i2c2 = &i2c2;
-diff -ruN u-boot-2015.01-rc3/arch/arm/dts/uniphier-ph1-sld3-ref.dts u-boot/arch/arm/dts/uniphier-ph1-sld3-ref.dts
---- u-boot-2015.01-rc3/arch/arm/dts/uniphier-ph1-sld3-ref.dts	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/dts/uniphier-ph1-sld3-ref.dts	2015-01-01 17:34:32.045506662 +0100
-@@ -25,9 +25,9 @@
- 	};
- 
- 	aliases {
--		uart0 = &uart0;
--		uart1 = &uart1;
--		uart2 = &uart2;
-+		serial0 = &uart0;
-+		serial1 = &uart1;
-+		serial2 = &uart2;
- 		i2c0 = &i2c0;
- 		i2c1 = &i2c1;
- 		i2c2 = &i2c2;
-diff -ruN u-boot-2015.01-rc3/arch/arm/dts/uniphier-ph1-sld8-ref.dts u-boot/arch/arm/dts/uniphier-ph1-sld8-ref.dts
---- u-boot-2015.01-rc3/arch/arm/dts/uniphier-ph1-sld8-ref.dts	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/dts/uniphier-ph1-sld8-ref.dts	2015-01-01 17:34:32.045506662 +0100
-@@ -25,10 +25,10 @@
- 	};
- 
- 	aliases {
--		uart0 = &uart0;
--		uart1 = &uart1;
--		uart2 = &uart2;
--		uart3 = &uart3;
-+		serial0 = &uart0;
-+		serial1 = &uart1;
-+		serial2 = &uart2;
-+		serial3 = &uart3;
- 		i2c0 = &i2c0;
- 		i2c1 = &i2c1;
- 		i2c2 = &i2c2;
-diff -ruN u-boot-2015.01-rc3/arch/arm/imx-common/cpu.c u-boot/arch/arm/imx-common/cpu.c
---- u-boot-2015.01-rc3/arch/arm/imx-common/cpu.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/imx-common/cpu.c	2015-01-01 17:34:32.045506662 +0100
-@@ -206,6 +206,9 @@
- {
- #if defined(CONFIG_CMD_SATA)
- 	sata_stop();
-+#if defined(CONFIG_MX6)
-+	disable_sata_clock();
-+#endif
- #endif
- #if defined(CONFIG_VIDEO_IPUV3)
- 	/* disable video before launching O/S */
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-bcm281xx/sysmap.h u-boot/arch/arm/include/asm/arch-bcm281xx/sysmap.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-bcm281xx/sysmap.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-bcm281xx/sysmap.h	2015-01-01 17:34:32.053506531 +0100
-@@ -13,6 +13,8 @@
- #define ESUB_CLK_BASE_ADDR	0x38000000
- #define ESW_CONTRL_BASE_ADDR	0x38200000
- #define GPIO2_BASE_ADDR		0x35003000
-+#define HSOTG_BASE_ADDR		0x3f120000
-+#define HSOTG_CTRL_BASE_ADDR	0x3f130000
- #define KONA_MST_CLK_BASE_ADDR	0x3f001000
- #define KONA_SLV_CLK_BASE_ADDR	0x3e011000
- #define PMU_BSC_BASE_ADDR	0x3500d000
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-bcm2835/mbox.h u-boot/arch/arm/include/asm/arch-bcm2835/mbox.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-bcm2835/mbox.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-bcm2835/mbox.h	2015-01-01 17:34:32.053506531 +0100
-@@ -140,6 +140,7 @@
- #define BCM2835_BOARD_REV_B_REV2_f	0xf
- #define BCM2835_BOARD_REV_B_PLUS	0x10
- #define BCM2835_BOARD_REV_CM		0x11
-+#define BCM2835_BOARD_REV_A_PLUS	0x12
- 
- struct bcm2835_mbox_tag_get_board_rev {
- 	struct bcm2835_mbox_tag_hdr tag_hdr;
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-ls102xa/config.h u-boot/arch/arm/include/asm/arch-ls102xa/config.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-ls102xa/config.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-ls102xa/config.h	2015-01-01 17:34:32.065506333 +0100
-@@ -11,11 +11,17 @@
- 
- #define OCRAM_BASE_ADDR				0x10000000
- #define OCRAM_SIZE				0x00020000
-+#define OCRAM_BASE_S_ADDR			0x10010000
-+#define OCRAM_S_SIZE				0x00010000
- 
- #define CONFIG_SYS_IMMR				0x01000000
-+#define CONFIG_SYS_DCSRBAR			0x20000000
-+
-+#define CONFIG_SYS_DCSR_DCFG_ADDR	(CONFIG_SYS_DCSRBAR + 0x00220000)
- 
- #define CONFIG_SYS_FSL_DDR_ADDR			(CONFIG_SYS_IMMR + 0x00080000)
- #define CONFIG_SYS_CCI400_ADDR			(CONFIG_SYS_IMMR + 0x00180000)
-+#define CONFIG_SYS_FSL_CSU_ADDR                 (CONFIG_SYS_IMMR + 0x00510000)
- #define CONFIG_SYS_IFC_ADDR			(CONFIG_SYS_IMMR + 0x00530000)
- #define CONFIG_SYS_FSL_ESDHC_ADDR		(CONFIG_SYS_IMMR + 0x00560000)
- #define CONFIG_SYS_FSL_SCFG_ADDR		(CONFIG_SYS_IMMR + 0x00570000)
-@@ -52,6 +58,9 @@
- 
- #define LPUART_BASE				(CONFIG_SYS_IMMR + 0x01950000)
- 
-+#define CONFIG_SYS_PCIE1_ADDR			(CONFIG_SYS_IMMR + 0x2400000)
-+#define CONFIG_SYS_PCIE2_ADDR			(CONFIG_SYS_IMMR + 0x2500000)
-+
- #ifdef CONFIG_DDR_SPD
- #define CONFIG_SYS_FSL_DDR_BE
- #define CONFIG_VERY_BIG_RAM
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h u-boot/arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h	2015-01-01 17:34:32.065506333 +0100
-@@ -17,6 +17,9 @@
- #define SOC_VER_LS1021		0x11
- #define SOC_VER_LS1022		0x12
- 
-+#define CCSR_BRR_OFFSET		0xe4
-+#define CCSR_SCRATCHRW1_OFFSET	0x200
-+
- #define RCWSR0_SYS_PLL_RAT_SHIFT	25
- #define RCWSR0_SYS_PLL_RAT_MASK		0x1f
- #define RCWSR0_MEM_PLL_RAT_SHIFT	16
-@@ -29,6 +32,11 @@
- #define ARCH_TIMER_CTRL_ENABLE		(1 << 0)
- #define SYS_COUNTER_CTRL_ENABLE		(1 << 24)
- 
-+#define DCFG_CCSR_PORSR1_RCW_MASK	0xff800000
-+#define DCFG_CCSR_PORSR1_RCW_SRC_I2C	0x24800000
-+
-+#define DCFG_DCSR_PORCR1		0
-+
- struct sys_info {
- 	unsigned long freq_processor[CONFIG_MAX_CPUS];
- 	unsigned long freq_systembus;
-@@ -98,6 +106,7 @@
- #define SCFG_ETSECDMAMCR_LE_BD_FR	0xf8001a0f
- #define SCFG_ETSECCMCR_GE2_CLK125	0x04000000
- #define SCFG_PIXCLKCR_PXCKEN		0x80000000
-+#define SCFG_QSPI_CLKSEL		0xc0100000
- 
- /* Supplemental Configuration Unit */
- struct ccsr_scfg {
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-ls102xa/ls102xa_stream_id.h u-boot/arch/arm/include/asm/arch-ls102xa/ls102xa_stream_id.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-ls102xa/ls102xa_stream_id.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-ls102xa/ls102xa_stream_id.h	2015-01-01 17:34:32.065506333 +0100
-@@ -0,0 +1,17 @@
-+/*
-+ * Copyright 2014 Freescale Semiconductor, Inc.
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#ifndef __FSL_LS102XA_STREAM_ID_H_
-+#define __FSL_LS102XA_STREAM_ID_H_
-+
-+struct smmu_stream_id {
-+	uint16_t offset;
-+	uint16_t stream_id;
-+	char dev_name[32];
-+};
-+
-+void ls102xa_config_smmu_stream_id(struct smmu_stream_id *id, uint32_t num);
-+#endif
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-ls102xa/ns_access.h u-boot/arch/arm/include/asm/arch-ls102xa/ns_access.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-ls102xa/ns_access.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-ls102xa/ns_access.h	2015-01-01 17:34:32.065506333 +0100
-@@ -0,0 +1,118 @@
-+/*
-+ * Copyright 2014 Freescale Semiconductor, Inc.
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#ifndef __FSL_NS_ACCESS_H_
-+#define __FSL_NS_ACCESS_H_
-+
-+enum csu_cslx_access {
-+	CSU_NS_SUP_R = 0x08,
-+	CSU_NS_SUP_W = 0x80,
-+	CSU_NS_SUP_RW = 0x88,
-+	CSU_NS_USER_R = 0x04,
-+	CSU_NS_USER_W = 0x40,
-+	CSU_NS_USER_RW = 0x44,
-+	CSU_S_SUP_R = 0x02,
-+	CSU_S_SUP_W = 0x20,
-+	CSU_S_SUP_RW = 0x22,
-+	CSU_S_USER_R = 0x01,
-+	CSU_S_USER_W = 0x10,
-+	CSU_S_USER_RW = 0x11,
-+	CSU_ALL_RW = 0xff,
-+};
-+
-+enum csu_cslx_ind {
-+	CSU_CSLX_PCIE2_IO = 0,
-+	CSU_CSLX_PCIE1_IO,
-+	CSU_CSLX_MG2TPR_IP,
-+	CSU_CSLX_IFC_MEM,
-+	CSU_CSLX_OCRAM,
-+	CSU_CSLX_GIC,
-+	CSU_CSLX_PCIE1,
-+	CSU_CSLX_OCRAM2,
-+	CSU_CSLX_QSPI_MEM,
-+	CSU_CSLX_PCIE2,
-+	CSU_CSLX_SATA,
-+	CSU_CSLX_USB3,
-+	CSU_CSLX_SERDES = 32,
-+	CSU_CSLX_QDMA,
-+	CSU_CSLX_LPUART2,
-+	CSU_CSLX_LPUART1,
-+	CSU_CSLX_LPUART4,
-+	CSU_CSLX_LPUART3,
-+	CSU_CSLX_LPUART6,
-+	CSU_CSLX_LPUART5,
-+	CSU_CSLX_DSPI2 = 40,
-+	CSU_CSLX_DSPI1,
-+	CSU_CSLX_QSPI,
-+	CSU_CSLX_ESDHC,
-+	CSU_CSLX_2D_ACE,
-+	CSU_CSLX_IFC,
-+	CSU_CSLX_I2C1,
-+	CSU_CSLX_USB2,
-+	CSU_CSLX_I2C3,
-+	CSU_CSLX_I2C2,
-+	CSU_CSLX_DUART2 = 50,
-+	CSU_CSLX_DUART1,
-+	CSU_CSLX_WDT2,
-+	CSU_CSLX_WDT1,
-+	CSU_CSLX_EDMA,
-+	CSU_CSLX_SYS_CNT,
-+	CSU_CSLX_DMA_MUX2,
-+	CSU_CSLX_DMA_MUX1,
-+	CSU_CSLX_DDR,
-+	CSU_CSLX_QUICC,
-+	CSU_CSLX_DCFG_CCU_RCPM = 60,
-+	CSU_CSLX_SECURE_BOOTROM,
-+	CSU_CSLX_SFP,
-+	CSU_CSLX_TMU,
-+	CSU_CSLX_SECURE_MONITOR,
-+	CSU_CSLX_RESERVED0,
-+	CSU_CSLX_ETSEC1,
-+	CSU_CSLX_SEC5_5,
-+	CSU_CSLX_ETSEC3,
-+	CSU_CSLX_ETSEC2,
-+	CSU_CSLX_GPIO2 = 70,
-+	CSU_CSLX_GPIO1,
-+	CSU_CSLX_GPIO4,
-+	CSU_CSLX_GPIO3,
-+	CSU_CSLX_PLATFORM_CONT,
-+	CSU_CSLX_CSU,
-+	CSU_CSLX_ASRC,
-+	CSU_CSLX_SPDIF,
-+	CSU_CSLX_FLEXCAN2,
-+	CSU_CSLX_FLEXCAN1,
-+	CSU_CSLX_FLEXCAN4 = 80,
-+	CSU_CSLX_FLEXCAN3,
-+	CSU_CSLX_SAI2,
-+	CSU_CSLX_SAI1,
-+	CSU_CSLX_SAI4,
-+	CSU_CSLX_SAI3,
-+	CSU_CSLX_FTM2,
-+	CSU_CSLX_FTM1,
-+	CSU_CSLX_FTM4,
-+	CSU_CSLX_FTM3,
-+	CSU_CSLX_FTM6 = 90,
-+	CSU_CSLX_FTM5,
-+	CSU_CSLX_FTM8,
-+	CSU_CSLX_FTM7,
-+	CSU_CSLX_COP_DCSR,
-+	CSU_CSLX_EPU,
-+	CSU_CSLX_GDI,
-+	CSU_CSLX_DDI,
-+	CSU_CSLX_RESERVED1,
-+	CSU_CSLX_USB3_PHY = 117,
-+	CSU_CSLX_RESERVED2,
-+	CSU_CSLX_MAX,
-+};
-+
-+struct csu_ns_dev {
-+	unsigned long ind;
-+	uint32_t val;
-+};
-+
-+void enable_devices_ns_access(struct csu_ns_dev *ns_dev, uint32_t num);
-+
-+#endif
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-ls102xa/spl.h u-boot/arch/arm/include/asm/arch-ls102xa/spl.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-ls102xa/spl.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-ls102xa/spl.h	2015-01-01 17:34:32.065506333 +0100
-@@ -0,0 +1,20 @@
-+/*
-+ * Copyright 2014 Freescale Semiconductor, Inc.
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#ifndef __ASM_ARCH_SPL_H__
-+#define __ASM_ARCH_SPL_H__
-+
-+#define BOOT_DEVICE_NONE	0
-+#define BOOT_DEVICE_XIP		1
-+#define BOOT_DEVICE_XIPWAIT	2
-+#define BOOT_DEVICE_NAND	3
-+#define BOOT_DEVICE_ONENAND	4
-+#define BOOT_DEVICE_MMC1	5
-+#define BOOT_DEVICE_MMC2	6
-+#define BOOT_DEVICE_MMC2_2	7
-+#define BOOT_DEVICE_SPI		10
-+
-+#endif	/* __ASM_ARCH_SPL_H__ */
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-mx6/clock.h u-boot/arch/arm/include/asm/arch-mx6/clock.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-mx6/clock.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-mx6/clock.h	2015-01-01 17:34:32.073506203 +0100
-@@ -43,10 +43,10 @@
- };
- 
- enum enet_freq {
--	ENET_25MHz,
--	ENET_50MHz,
--	ENET_100MHz,
--	ENET_125MHz,
-+	ENET_25MHZ,
-+	ENET_50MHZ,
-+	ENET_100MHZ,
-+	ENET_125MHZ,
- };
- 
- u32 imx_get_uartclk(void);
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-mx6/mx6sl_pins.h u-boot/arch/arm/include/asm/arch-mx6/mx6sl_pins.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-mx6/mx6sl_pins.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-mx6/mx6sl_pins.h	2015-01-01 17:34:32.073506203 +0100
-@@ -53,5 +53,10 @@
- 	MX6_PAD_FEC_REF_CLK__FEC_REF_OUT			= IOMUX_PAD(0x424, 0x134, 0x10, 0x000, 0, 0),
- 	MX6_PAD_FEC_RX_ER__GPIO_4_19				= IOMUX_PAD(0x0428, 0x0138, 5, 0x0000, 0, 0),
- 	MX6_PAD_FEC_TX_CLK__GPIO_4_21				= IOMUX_PAD(0x0434, 0x0144, 5, 0x0000, 0, 0),
-+
-+	MX6_PAD_EPDC_PWRCOM__ANATOP_USBOTG1_ID			= IOMUX_PAD(0x03D0, 0x00E0, 4, 0x05DC, 0, 0),
-+
-+	MX6_PAD_KEY_COL4__USB_USBOTG1_PWR			= IOMUX_PAD(0x0484, 0x017C, 6, 0x0000, 0, 0),
-+	MX6_PAD_KEY_COL5__USB_USBOTG2_PWR			= IOMUX_PAD(0x0488, 0x0180, 6, 0x0000, 0, 0),
- };
- #endif	/* __ASM_ARCH_MX6_MX6SL_PINS_H__ */
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-rmobile/mmc.h u-boot/arch/arm/include/asm/arch-rmobile/mmc.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-rmobile/mmc.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-rmobile/mmc.h	2015-01-01 17:34:32.085506005 +0100
-@@ -0,0 +1,14 @@
-+/*
-+ * Renesas SuperH MMCIF driver.
-+ *
-+ * Copyright (C)  2014 Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj at renesas.com>
-+ * Copyright (C)  2014 Renesas Electronics Corporation
-+ *
-+ * SPDX-License-Identifier: GPL-2.0
-+ */
-+#ifndef _RMOBILE_MMC_H_
-+#define _RMOBILE_MMC_H_
-+
-+int mmcif_mmc_init(void);
-+
-+#endif /* _RMOBILE_MMC_H_ */
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-rmobile/r8a7790.h u-boot/arch/arm/include/asm/arch-rmobile/r8a7790.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-rmobile/r8a7790.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-rmobile/r8a7790.h	2015-01-01 17:34:32.085506005 +0100
-@@ -15,6 +15,19 @@
- #define CONFIG_SYS_I2C_SH_BASE2	0xE6520000
- #define CONFIG_SYS_I2C_SH_BASE3	0xE60B0000
- 
-+/* Module stop control/status register bits */
-+#define MSTP0_BITS	0x00640801
-+#define MSTP1_BITS	0xDB6E9BDF
-+#define MSTP2_BITS	0x300DA1FC
-+#define MSTP3_BITS	0xF08CF831
-+#define MSTP4_BITS	0x80000184
-+#define MSTP5_BITS	0x44C00046
-+#define MSTP7_BITS	0x07F30718
-+#define MSTP8_BITS	0x01F0FF84
-+#define MSTP9_BITS	0xF5979FCF
-+#define MSTP10_BITS	0xFFFEFFE0
-+#define MSTP11_BITS	0x00000000
-+
- #define R8A7790_CUT_ES2X	2
- #define IS_R8A7790_ES2()	\
- 	(rmobile_get_cpu_rev_integer() == R8A7790_CUT_ES2X)
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-rmobile/r8a7791.h u-boot/arch/arm/include/asm/arch-rmobile/r8a7791.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-rmobile/r8a7791.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-rmobile/r8a7791.h	2015-01-01 17:34:32.089505941 +0100
-@@ -51,6 +51,19 @@
- #define DBSC3_1_QOS_W15_BASE	0xE67A2F00
- #define DBSC3_1_DBADJ2		0xE67A00C8
- 
-+/* Module stop control/status register bits */
-+#define MSTP0_BITS	0x00640801
-+#define MSTP1_BITS	0x9B6C9B5A
-+#define MSTP2_BITS	0x100D21FC
-+#define MSTP3_BITS	0xF08CD810
-+#define MSTP4_BITS	0x800001C4
-+#define MSTP5_BITS	0x44C00046
-+#define MSTP7_BITS	0x05BFE618
-+#define MSTP8_BITS	0x40C0FE85
-+#define MSTP9_BITS	0xFF979FFF
-+#define MSTP10_BITS	0xFFFEFFE0
-+#define MSTP11_BITS	0x000001C0
-+
- #define R8A7791_CUT_ES2X	2
- #define IS_R8A7791_ES2()	\
- 	(rmobile_get_cpu_rev_integer() == R8A7791_CUT_ES2X)
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-rmobile/r8a7793.h u-boot/arch/arm/include/asm/arch-rmobile/r8a7793.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-rmobile/r8a7793.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-rmobile/r8a7793.h	2015-01-01 17:34:32.089505941 +0100
-@@ -56,6 +56,20 @@
- /*
-  * R8A7793 I/O Product Information
-  */
-+
-+/* Module stop control/status register bits */
-+#define MSTP0_BITS	0x00640801
-+#define MSTP1_BITS	0x9B6C9B5A
-+#define MSTP2_BITS	0x100D21FC
-+#define MSTP3_BITS	0xF08CD810
-+#define MSTP4_BITS	0x800001C4
-+#define MSTP5_BITS	0x44C00046
-+#define MSTP7_BITS	0x05BFE618
-+#define MSTP8_BITS	0x40C0FE85
-+#define MSTP9_BITS	0xFF979FFF
-+#define MSTP10_BITS	0xFFFEFFE0
-+#define MSTP11_BITS	0x000001C0
-+
- #define R8A7793_CUT_ES2X	2
- #define IS_R8A7793_ES2() \
- 	(rmobile_get_cpu_rev_integer() == R8A7793_CUT_ES2X)
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-rmobile/r8a7794.h u-boot/arch/arm/include/asm/arch-rmobile/r8a7794.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-rmobile/r8a7794.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-rmobile/r8a7794.h	2015-01-01 17:34:32.089505941 +0100
-@@ -14,4 +14,17 @@
- /* SH-I2C */
- #define CONFIG_SYS_I2C_SH_BASE2	0xE60B0000
- 
-+/* Module stop control/status register bits */
-+#define MSTP0_BITS	0x00440801
-+#define MSTP1_BITS	0x936899DA
-+#define MSTP2_BITS	0x100D21FC
-+#define MSTP3_BITS	0xE084D810
-+#define MSTP4_BITS	0x800001C4
-+#define MSTP5_BITS	0x40C00044
-+#define MSTP7_BITS	0x013FE618
-+#define MSTP8_BITS	0x40803C05
-+#define MSTP9_BITS	0xFB879FEE
-+#define MSTP10_BITS	0xFFFEFFE0
-+#define MSTP11_BITS	0x000001C0
-+
- #endif /* __ASM_ARCH_R8A7794_H */
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-rmobile/rcar-base.h u-boot/arch/arm/include/asm/arch-rmobile/rcar-base.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-rmobile/rcar-base.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-rmobile/rcar-base.h	2015-01-01 17:34:32.089505941 +0100
-@@ -29,6 +29,45 @@
- #define SCIF4_BASE		0xE6EE0000
- #define SCIF5_BASE		0xE6EE8000
- 
-+/* Module stop status register */
-+#define MSTPSR0			0xE6150030
-+#define MSTPSR1			0xE6150038
-+#define MSTPSR2			0xE6150040
-+#define MSTPSR3			0xE6150048
-+#define MSTPSR4			0xE615004C
-+#define MSTPSR5			0xE615003C
-+#define MSTPSR7			0xE61501C4
-+#define MSTPSR8			0xE61509A0
-+#define MSTPSR9			0xE61509A4
-+#define MSTPSR10		0xE61509A8
-+#define MSTPSR11		0xE61509AC
-+
-+/* Realtime module stop control register */
-+#define RMSTPCR0		0xE6150110
-+#define RMSTPCR1		0xE6150114
-+#define RMSTPCR2		0xE6150118
-+#define RMSTPCR3		0xE615011C
-+#define RMSTPCR4		0xE6150120
-+#define RMSTPCR5		0xE6150124
-+#define RMSTPCR7		0xE615012C
-+#define RMSTPCR8		0xE6150980
-+#define RMSTPCR9		0xE6150984
-+#define RMSTPCR10		0xE6150988
-+#define RMSTPCR11		0xE615098C
-+
-+/* System module stop control register */
-+#define SMSTPCR0		0xE6150130
-+#define SMSTPCR1		0xE6150134
-+#define SMSTPCR2		0xE6150138
-+#define SMSTPCR3		0xE615013C
-+#define SMSTPCR4		0xE6150140
-+#define SMSTPCR5		0xE6150144
-+#define SMSTPCR7		0xE615014C
-+#define SMSTPCR8		0xE6150990
-+#define SMSTPCR9		0xE6150994
-+#define SMSTPCR10		0xE6150998
-+#define SMSTPCR11		0xE615099C
-+
- /*
-  * SH-I2C
-  * Ch2 and ch3 are different address. These are defined
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-rmobile/rcar-mstp.h u-boot/arch/arm/include/asm/arch-rmobile/rcar-mstp.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-rmobile/rcar-mstp.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-rmobile/rcar-mstp.h	2015-01-01 17:34:32.089505941 +0100
-@@ -0,0 +1,109 @@
-+/*
-+ * arch/arm/include/asm/arch-rmobile/rcar-mstp.h
-+ *
-+ * Copyright (C) 2013, 2014 Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj at renesas.com>
-+ * Copyright (C) 2013, 2014 Renesas Electronics Corporation
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0
-+ */
-+
-+#ifndef __ASM_ARCH_RCAR_MSTP_H
-+#define __ASM_ARCH_RCAR_MSTP_H
-+
-+#define mstp_setbits(type, addr, saddr, set) \
-+		out_##type((saddr), in_##type(addr) | (set))
-+#define mstp_clrbits(type, addr, saddr, clear) \
-+		out_##type((saddr), in_##type(addr) & ~(clear))
-+#define mstp_setclrbits(type, addr, set, clear) \
-+		out_##type((addr), (in_##type(addr) | (set)) & ~(clear))
-+#define mstp_setbits_le32(addr, saddr, set) \
-+		mstp_setbits(le32, addr, saddr, set)
-+#define mstp_clrbits_le32(addr, saddr, clear) \
-+		mstp_clrbits(le32, addr, saddr, clear)
-+#define mstp_setclrbits_le32(addr, set, clear) \
-+		mstp_setclrbits(le32, addr, set, clear)
-+
-+#ifndef CONFIG_SMSTP0_ENA
-+#define CONFIG_SMSTP0_ENA	0x00
-+#endif
-+#ifndef CONFIG_SMSTP1_ENA
-+#define CONFIG_SMSTP1_ENA	0x00
-+#endif
-+#ifndef CONFIG_SMSTP2_ENA
-+#define CONFIG_SMSTP2_ENA	0x00
-+#endif
-+#ifndef CONFIG_SMSTP3_ENA
-+#define CONFIG_SMSTP3_ENA	0x00
-+#endif
-+#ifndef CONFIG_SMSTP4_ENA
-+#define CONFIG_SMSTP4_ENA	0x00
-+#endif
-+#ifndef CONFIG_SMSTP5_ENA
-+#define CONFIG_SMSTP5_ENA	0x00
-+#endif
-+#ifndef CONFIG_SMSTP6_ENA
-+#define CONFIG_SMSTP6_ENA	0x00
-+#endif
-+#ifndef CONFIG_SMSTP7_ENA
-+#define CONFIG_SMSTP7_ENA	0x00
-+#endif
-+#ifndef CONFIG_SMSTP8_ENA
-+#define CONFIG_SMSTP8_ENA	0x00
-+#endif
-+#ifndef CONFIG_SMSTP9_ENA
-+#define CONFIG_SMSTP9_ENA	0x00
-+#endif
-+#ifndef CONFIG_SMSTP10_ENA
-+#define CONFIG_SMSTP10_ENA	0x00
-+#endif
-+#ifndef CONFIG_SMSTP11_ENA
-+#define CONFIG_SMSTP11_ENA	0x00
-+#endif
-+
-+#ifndef CONFIG_RMSTP0_ENA
-+#define CONFIG_RMSTP0_ENA	0x00
-+#endif
-+#ifndef CONFIG_RMSTP1_ENA
-+#define CONFIG_RMSTP1_ENA	0x00
-+#endif
-+#ifndef CONFIG_RMSTP2_ENA
-+#define CONFIG_RMSTP2_ENA	0x00
-+#endif
-+#ifndef CONFIG_RMSTP3_ENA
-+#define CONFIG_RMSTP3_ENA	0x00
-+#endif
-+#ifndef CONFIG_RMSTP4_ENA
-+#define CONFIG_RMSTP4_ENA	0x00
-+#endif
-+#ifndef CONFIG_RMSTP5_ENA
-+#define CONFIG_RMSTP5_ENA	0x00
-+#endif
-+#ifndef CONFIG_RMSTP6_ENA
-+#define CONFIG_RMSTP6_ENA	0x00
-+#endif
-+#ifndef CONFIG_RMSTP7_ENA
-+#define CONFIG_RMSTP7_ENA	0x00
-+#endif
-+#ifndef CONFIG_RMSTP8_ENA
-+#define CONFIG_RMSTP8_ENA	0x00
-+#endif
-+#ifndef CONFIG_RMSTP9_ENA
-+#define CONFIG_RMSTP9_ENA	0x00
-+#endif
-+#ifndef CONFIG_RMSTP10_ENA
-+#define CONFIG_RMSTP10_ENA	0x00
-+#endif
-+#ifndef CONFIG_RMSTP11_ENA
-+#define CONFIG_RMSTP11_ENA	0x00
-+#endif
-+
-+struct mstp_ctl {
-+	u32 s_addr;
-+	u32 s_dis;
-+	u32 s_ena;
-+	u32 r_addr;
-+	u32 r_dis;
-+	u32 r_ena;
-+};
-+
-+#endif /* __ASM_ARCH_RCAR_MSTP_H */
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-socfpga/clock_manager.h u-boot/arch/arm/include/asm/arch-socfpga/clock_manager.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-socfpga/clock_manager.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-socfpga/clock_manager.h	2015-01-01 17:34:32.089505941 +0100
-@@ -14,6 +14,7 @@
- unsigned int cm_get_l4_sp_clk_hz(void);
- unsigned int cm_get_mmc_controller_clk_hz(void);
- unsigned int cm_get_qspi_controller_clk_hz(void);
-+unsigned int cm_get_spi_controller_clk_hz(void);
- #endif
- 
- typedef struct {
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-socfpga/freeze_controller.h u-boot/arch/arm/include/asm/arch-socfpga/freeze_controller.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-socfpga/freeze_controller.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-socfpga/freeze_controller.h	2015-01-01 17:34:32.089505941 +0100
-@@ -42,7 +42,6 @@
- #define SYSMGR_FRZCTRL_HWCTRL_VIO1REQ_MASK 0x00000001
- #define SYSMGR_FRZCTRL_HWCTRL_VIO1STATE_ENUM_FROZEN 0x2
- #define SYSMGR_FRZCTRL_HWCTRL_VIO1STATE_ENUM_THAWED 0x1
--#define SYSMGR_FRZCTRL_VIOCTRL_SHIFT 0x2
- 
- void sys_mgr_frzctrl_freeze_req(void);
- void sys_mgr_frzctrl_thaw_req(void);
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-socfpga/scan_manager.h u-boot/arch/arm/include/asm/arch-socfpga/scan_manager.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-socfpga/scan_manager.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-socfpga/scan_manager.h	2015-01-01 17:34:32.089505941 +0100
-@@ -13,6 +13,7 @@
- 	u32	padding[2];
- 	u32	fifo_single_byte;
- 	u32	fifo_double_byte;
-+	u32	fifo_triple_byte;
- 	u32	fifo_quad_byte;
- };
- 
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-stv0991/gpio.h u-boot/arch/arm/include/asm/arch-stv0991/gpio.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-stv0991/gpio.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-stv0991/gpio.h	2015-01-01 17:34:32.093505875 +0100
-@@ -0,0 +1,22 @@
-+/*
-+ * (C) Copyright 2014
-+ * Vikas Manocha, ST Micoelectronics, vikas.manocha at st.com
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#ifndef __ASM_ARCH_STV0991_GPIO_H
-+#define __ASM_ARCH_STV0991_GPIO_H
-+
-+enum gpio_direction {
-+	GPIO_DIRECTION_IN,
-+	GPIO_DIRECTION_OUT,
-+};
-+
-+struct gpio_regs {
-+	u32 data;		/* offset 0x0 */
-+	u32 reserved[0xff];	/* 0x4--0x3fc */
-+	u32 dir;		/* offset 0x400 */
-+};
-+
-+#endif	/* __ASM_ARCH_STV0991_GPIO_H */
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-stv0991/hardware.h u-boot/arch/arm/include/asm/arch-stv0991/hardware.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-stv0991/hardware.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-stv0991/hardware.h	2015-01-01 17:34:32.093505875 +0100
-@@ -0,0 +1,73 @@
-+/*
-+ * (C) Copyright 2014
-+ * Vikas Manocha, STMicroelectronics, <vikas.manocha at st.com>
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#ifndef _ASM_ARCH_HARDWARE_H
-+#define _ASM_ARCH_HARDWARE_H
-+
-+/* STV0991 */
-+#define SRAM0_BASE_ADDR                          0x00000000UL
-+#define SRAM1_BASE_ADDR                          0x00068000UL
-+#define SRAM2_BASE_ADDR                          0x000D0000UL
-+#define SRAM3_BASE_ADDR                          0x00138000UL
-+#define CFS_SRAM0_BASE_ADDR                      0x00198000UL
-+#define CFS_SRAM1_BASE_ADDR                      0x001B8000UL
-+#define FAST_SRAM_BASE_ADDR                      0x001D8000UL
-+#define FLASH_BASE_ADDR                          0x40000000UL
-+#define PL310_BASE_ADDR                          0x70000000UL
-+#define HSAXIM_BASE_ADDR                         0x70100000UL
-+#define IMGSS_BASE_ADDR                          0x70200000UL
-+#define ADC_BASE_ADDR                            0x80000000UL
-+#define GPIOA_BASE_ADDR                          0x80001000UL
-+#define GPIOB_BASE_ADDR                          0x80002000UL
-+#define GPIOC_BASE_ADDR                          0x80003000UL
-+#define HDM_BASE_ADDR                            0x80004000UL
-+#define THSENS_BASE_ADDR                         0x80200000UL
-+#define GPTIMER2_BASE_ADDR                       0x80201000UL
-+#define GPTIMER1_BASE_ADDR                       0x80202000UL
-+#define QSPI_BASE_ADDR                           0x80203000UL
-+#define CGU_BASE_ADDR                            0x80204000UL
-+#define CREG_BASE_ADDR                           0x80205000UL
-+#define PEC_BASE_ADDR                            0x80206000UL
-+#define WDRU_BASE_ADDR                           0x80207000UL
-+#define BSEC_BASE_ADDR                           0x80208000UL
-+#define DAP_ROM_BASE_ADDR                        0x80210000UL
-+#define SOC_CTI_BASE_ADDR                        0x80211000UL
-+#define TPIU_BASE_ADDR                           0x80212000UL
-+#define TMC_ETF_BASE_ADDR                        0x80213000UL
-+#define R4_ETM_BASE_ADDR                         0x80214000UL
-+#define R4_CTI_BASE_ADDR                         0x80215000UL
-+#define R4_DBG_BASE_ADDR                         0x80216000UL
-+#define GMAC_BASE_ADDR                           0x80300000UL
-+#define RNSS_BASE_ADDR                           0x80302000UL
-+#define CRYP_BASE_ADDR                           0x80303000UL
-+#define HASH_BASE_ADDR                           0x80304000UL
-+#define GPDMA_BASE_ADDR                          0x80305000UL
-+#define ISA_BASE_ADDR                            0x8032A000UL
-+#define HCI_BASE_ADDR                            0x80400000UL
-+#define I2C1_BASE_ADDR                           0x80401000UL
-+#define I2C2_BASE_ADDR                           0x80402000UL
-+#define SAI_BASE_ADDR                            0x80403000UL
-+#define USI_BASE_ADDR                            0x80404000UL
-+#define SPI1_BASE_ADDR                           0x80405000UL
-+#define UART_BASE_ADDR                           0x80406000UL
-+#define SPI2_BASE_ADDR                           0x80500000UL
-+#define CAN_BASE_ADDR                            0x80501000UL
-+#define USART1_BASE_ADDR                         0x80502000UL
-+#define USART2_BASE_ADDR                         0x80503000UL
-+#define USART3_BASE_ADDR                         0x80504000UL
-+#define USART4_BASE_ADDR                         0x80505000UL
-+#define USART5_BASE_ADDR                         0x80506000UL
-+#define USART6_BASE_ADDR                         0x80507000UL
-+#define SDI2_BASE_ADDR                           0x80600000UL
-+#define SDI1_BASE_ADDR                           0x80601000UL
-+#define VICA_BASE_ADDR                           0x81000000UL
-+#define VICB_BASE_ADDR                           0x81001000UL
-+#define STM_CHANNELS_BASE_ADDR                   0x81100000UL
-+#define STM_BASE_ADDR                            0x81110000UL
-+#define SROM_BASE_ADDR                           0xFFFF0000UL
-+
-+#endif /* _ASM_ARCH_HARDWARE_H */
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-stv0991/stv0991_cgu.h u-boot/arch/arm/include/asm/arch-stv0991/stv0991_cgu.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-stv0991/stv0991_cgu.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-stv0991/stv0991_cgu.h	2015-01-01 17:34:32.093505875 +0100
-@@ -0,0 +1,116 @@
-+/*
-+ * (C) Copyright 2014
-+ * Vikas Manocha, ST Micoelectronics, vikas.manocha at st.com
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#ifndef _STV0991_CGU_H
-+#define _STV0991_CGU_H
-+
-+struct stv0991_cgu_regs {
-+	u32 cpu_freq;		/* offset 0x0 */
-+	u32 icn2_freq;		/* offset 0x4 */
-+	u32 dma_freq;		/* offset 0x8 */
-+	u32 isp_freq;		/* offset 0xc */
-+	u32 h264_freq;		/* offset 0x10 */
-+	u32 osif_freq;		/* offset 0x14 */
-+	u32 ren_freq;		/* offset 0x18 */
-+	u32 tim_freq;		/* offset 0x1c */
-+	u32 sai_freq;		/* offset 0x20 */
-+	u32 eth_freq;		/* offset 0x24 */
-+	u32 i2c_freq;		/* offset 0x28 */
-+	u32 spi_freq;		/* offset 0x2c */
-+	u32 uart_freq;		/* offset 0x30 */
-+	u32 qspi_freq;		/* offset 0x34 */
-+	u32 sdio_freq;		/* offset 0x38 */
-+	u32 usi_freq;		/* offset 0x3c */
-+	u32 can_line_freq;	/* offset 0x40 */
-+	u32 debug_freq;		/* offset 0x44 */
-+	u32 trace_freq;		/* offset 0x48 */
-+	u32 stm_freq;		/* offset 0x4c */
-+	u32 eth_ctrl;		/* offset 0x50 */
-+	u32 reserved[3];	/* offset 0x54 */
-+	u32 osc_ctrl;		/* offset 0x60 */
-+	u32 pll1_ctrl;		/* offset 0x64 */
-+	u32 pll1_freq;		/* offset 0x68 */
-+	u32 pll1_fract;		/* offset 0x6c */
-+	u32 pll1_spread;	/* offset 0x70 */
-+	u32 pll1_status;	/* offset 0x74 */
-+	u32 pll2_ctrl;		/* offset 0x78 */
-+	u32 pll2_freq;		/* offset 0x7c */
-+	u32 pll2_fract;		/* offset 0x80 */
-+	u32 pll2_spread;	/* offset 0x84 */
-+	u32 pll2_status;	/* offset 0x88 */
-+	u32 cgu_enable_1;	/* offset 0x8c */
-+	u32 cgu_enable_2;	/* offset 0x90 */
-+	u32 cgu_isp_pulse;	/* offset 0x94 */
-+	u32 cgu_h264_pulse;	/* offset 0x98 */
-+	u32 cgu_osif_pulse;	/* offset 0x9c */
-+	u32 cgu_ren_pulse;	/* offset 0xa0 */
-+
-+};
-+
-+/* CGU Timer */
-+#define CLK_TMR_OSC			0
-+#define CLK_TMR_MCLK			1
-+#define CLK_TMR_PLL1			2
-+#define CLK_TMR_PLL2			3
-+#define MDIV_SHIFT_TMR			3
-+#define DIV_SHIFT_TMR			6
-+
-+#define TIMER1_CLK_CFG			(0 << DIV_SHIFT_TMR \
-+					| 0 << MDIV_SHIFT_TMR | CLK_TMR_MCLK)
-+
-+/* Clock Enable/Disable */
-+
-+#define TIMER1_CLK_EN			(1 << 15)
-+
-+/* CGU Uart config */
-+#define CLK_UART_MCLK			0
-+#define CLK_UART_PLL1			1
-+#define CLK_UART_PLL2			2
-+
-+#define MDIV_SHIFT_UART			3
-+#define DIV_SHIFT_UART			6
-+
-+#define UART_CLK_CFG			(4 << DIV_SHIFT_UART \
-+					| 1 << MDIV_SHIFT_UART | CLK_UART_MCLK)
-+
-+/* CGU Ethernet clock config */
-+#define CLK_ETH_MCLK			0
-+#define CLK_ETH_PLL1			1
-+#define CLK_ETH_PLL2			2
-+
-+#define MDIV_SHIFT_ETH			3
-+#define DIV_SHIFT_ETH			6
-+#define DIV_ETH_125			9
-+#define DIV_ETH_50			12
-+#define DIV_ETH_P2P			15
-+
-+#define ETH_CLK_CFG			(4 << DIV_ETH_P2P | 4 << DIV_ETH_50 \
-+					| 1 << DIV_ETH_125 \
-+					| 0 << DIV_SHIFT_ETH \
-+					| 3 << MDIV_SHIFT_ETH | CLK_ETH_PLL1)
-+ /* CGU Ethernet control */
-+
-+#define ETH_CLK_TX_EXT_PHY		0
-+#define ETH_CLK_TX_125M			1
-+#define ETH_CLK_TX_25M			2
-+#define ETH_CLK_TX_2M5			3
-+#define ETH_CLK_TX_DIS			7
-+
-+#define ETH_CLK_RX_EXT_PHY		0
-+#define ETH_CLK_RX_25M			1
-+#define ETH_CLK_RX_2M5			2
-+#define ETH_CLK_RX_DIS			3
-+#define RX_CLK_SHIFT			3
-+#define ETH_CLK_MASK			~(0x1F)
-+
-+#define ETH_PHY_MODE_GMII		0
-+#define ETH_PHY_MODE_RMII		1
-+#define ETH_PHY_CLK_DIS			1
-+
-+#define ETH_CLK_CTRL			(ETH_CLK_RX_EXT_PHY << RX_CLK_SHIFT \
-+					| ETH_CLK_TX_EXT_PHY)
-+#endif
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-stv0991/stv0991_creg.h u-boot/arch/arm/include/asm/arch-stv0991/stv0991_creg.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-stv0991/stv0991_creg.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-stv0991/stv0991_creg.h	2015-01-01 17:34:32.093505875 +0100
-@@ -0,0 +1,95 @@
-+/*
-+ * (C) Copyright 2014
-+ * Vikas Manocha, ST Micoelectronics, vikas.manocha at st.com
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#ifndef _STV0991_CREG_H
-+#define _STV0991_CREG_H
-+
-+struct stv0991_creg {
-+	u32 version;		/* offset 0x0 */
-+	u32 hdpctl;		/* offset 0x4 */
-+	u32 hdpval;		/* offset 0x8 */
-+	u32 hdpgposet;		/* offset 0xc */
-+	u32 hdpgpoclr;		/* offset 0x10 */
-+	u32 hdpgpoval;		/* offset 0x14 */
-+	u32 stm_mux;		/* offset 0x18 */
-+	u32 sysctrl_1;		/* offset 0x1c */
-+	u32 sysctrl_2;		/* offset 0x20 */
-+	u32 sysctrl_3;		/* offset 0x24 */
-+	u32 sysctrl_4;		/* offset 0x28 */
-+	u32 reserved_1[0x35];	/* offset 0x2C-0xFC */
-+	u32 mux1;		/* offset 0x100 */
-+	u32 mux2;		/* offset 0x104 */
-+	u32 mux3;		/* offset 0x108 */
-+	u32 mux4;		/* offset 0x10c */
-+	u32 mux5;		/* offset 0x110 */
-+	u32 mux6;		/* offset 0x114 */
-+	u32 mux7;		/* offset 0x118 */
-+	u32 mux8;		/* offset 0x11c */
-+	u32 mux9;		/* offset 0x120 */
-+	u32 mux10;		/* offset 0x124 */
-+	u32 mux11;		/* offset 0x128 */
-+	u32 mux12;		/* offset 0x12c */
-+	u32 mux13;		/* offset 0x130 */
-+	u32 reserved_2[0x33];	/* offset 0x134-0x1FC */
-+	u32 cfg_pad1;		/* offset 0x200 */
-+	u32 cfg_pad2;		/* offset 0x204 */
-+	u32 cfg_pad3;		/* offset 0x208 */
-+	u32 cfg_pad4;		/* offset 0x20c */
-+	u32 cfg_pad5;		/* offset 0x210 */
-+	u32 cfg_pad6;		/* offset 0x214 */
-+	u32 cfg_pad7;		/* offset 0x218 */
-+	u32 reserved_3[0x39];	/* offset 0x21C-0x2FC */
-+	u32 vdd_pad1;		/* offset 0x300 */
-+	u32 vdd_pad2;		/* offset 0x304 */
-+	u32 reserved_4[0x3e];	/* offset 0x308-0x3FC */
-+	u32 vdd_comp1;		/* offset 0x400 */
-+};
-+
-+/* CREG MUX 12 register */
-+#define GPIOC_30_MUX_SHIFT	24
-+#define GPIOC_30_MUX_MASK	~(1 << GPIOC_30_MUX_SHIFT)
-+#define CFG_GPIOC_30_UART_TX	(1 << GPIOC_30_MUX_SHIFT)
-+
-+#define GPIOC_31_MUX_SHIFT	28
-+#define GPIOC_31_MUX_MASK	~(1 << GPIOC_31_MUX_SHIFT)
-+#define CFG_GPIOC_31_UART_RX	(1 << GPIOC_31_MUX_SHIFT)
-+
-+/* CREG MUX 7 register */
-+#define GPIOB_16_MUX_SHIFT	0
-+#define GPIOB_16_MUX_MASK	~(1 << GPIOB_16_MUX_SHIFT)
-+#define CFG_GPIOB_16_UART_TX	(1 << GPIOB_16_MUX_SHIFT)
-+
-+#define GPIOB_17_MUX_SHIFT	4
-+#define GPIOB_17_MUX_MASK	~(1 << GPIOB_17_MUX_SHIFT)
-+#define CFG_GPIOB_17_UART_RX	(1 << GPIOB_17_MUX_SHIFT)
-+
-+/* CREG CFG_PAD6 register */
-+
-+#define GPIOC_31_MODE_SHIFT	30
-+#define GPIOC_31_MODE_MASK	~(1 << GPIOC_31_MODE_SHIFT)
-+#define CFG_GPIOC_31_MODE_OD	(0 << GPIOC_31_MODE_SHIFT)
-+#define CFG_GPIOC_31_MODE_PP	(1 << GPIOC_31_MODE_SHIFT)
-+
-+#define GPIOC_30_MODE_SHIFT	28
-+#define GPIOC_30_MODE_MASK	~(1 << GPIOC_30_MODE_SHIFT)
-+#define CFG_GPIOC_30_MODE_LOW	(0 << GPIOC_30_MODE_SHIFT)
-+#define CFG_GPIOC_30_MODE_HIGH	(1 << GPIOC_30_MODE_SHIFT)
-+
-+/* CREG Ethernet pad config */
-+
-+#define VDD_ETH_PS_1V8		0
-+#define VDD_ETH_PS_2V5		2
-+#define VDD_ETH_PS_3V3		3
-+#define VDD_ETH_PS_MASK		0x3
-+
-+#define VDD_ETH_PS_SHIFT	12
-+#define ETH_VDD_CFG		(VDD_ETH_PS_1V8 << VDD_ETH_PS_SHIFT)
-+
-+#define VDD_ETH_M_PS_SHIFT	28
-+#define ETH_M_VDD_CFG		(VDD_ETH_PS_1V8 << VDD_ETH_M_PS_SHIFT)
-+
-+#endif
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-stv0991/stv0991_defs.h u-boot/arch/arm/include/asm/arch-stv0991/stv0991_defs.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-stv0991/stv0991_defs.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-stv0991/stv0991_defs.h	2015-01-01 17:34:32.093505875 +0100
-@@ -0,0 +1,16 @@
-+/*
-+ * (C) Copyright 2014
-+ * Vikas Manocha, ST Micoelectronics, vikas.manocha at st.com.
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#ifndef __STV0991_DEFS_H__
-+#define __STV0991_DEFS_H__
-+#include <asm/arch/stv0991_periph.h>
-+
-+extern int stv0991_pinmux_config(enum periph_id);
-+extern int clock_setup(enum periph_clock);
-+
-+#endif
-+
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-stv0991/stv0991_gpt.h u-boot/arch/arm/include/asm/arch-stv0991/stv0991_gpt.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-stv0991/stv0991_gpt.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-stv0991/stv0991_gpt.h	2015-01-01 17:34:32.093505875 +0100
-@@ -0,0 +1,43 @@
-+/*
-+ * (C) Copyright 2014
-+ * Vikas Manocha, ST Micoelectronics, vikas.manocha at st.com.
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#ifndef _STV0991_GPT_H
-+#define _STV0991_GPT_H
-+
-+#include <asm/arch-stv0991/hardware.h>
-+
-+struct gpt_regs {
-+	u32 cr1;
-+	u32 cr2;
-+	u32 reserved_1;
-+	u32 dier;	/* dma_int_en */
-+	u32 sr;		/* status reg */
-+	u32 egr;	/* event gen */
-+	u32 reserved_2[3];	/* offset 0x18--0x20*/
-+	u32 cnt;
-+	u32 psc;
-+	u32 arr;
-+};
-+
-+struct gpt_regs *const gpt1_regs_ptr =
-+	(struct gpt_regs *) GPTIMER1_BASE_ADDR;
-+
-+/* Timer control1 register  */
-+#define GPT_CR1_CEN			0x0001
-+#define GPT_MODE_AUTO_RELOAD		(1 << 7)
-+
-+/* Timer prescalar reg */
-+#define GPT_PRESCALER_128		0x128
-+
-+/* Auto reload register for free running config */
-+#define GPT_FREE_RUNNING		0xFFFF
-+
-+/* Timer, HZ specific defines */
-+#define CONFIG_STV0991_HZ		1000
-+#define CONFIG_STV0991_HZ_CLOCK		(27*1000*1000)/GPT_PRESCALER_128
-+
-+#endif
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-stv0991/stv0991_periph.h u-boot/arch/arm/include/asm/arch-stv0991/stv0991_periph.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-stv0991/stv0991_periph.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-stv0991/stv0991_periph.h	2015-01-01 17:34:32.093505875 +0100
-@@ -0,0 +1,44 @@
-+/*
-+ * (C) Copyright 2014
-+ * Vikas Manocha, ST Micoelectronics, vikas.manocha at st.com.
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#ifndef __ASM_ARM_ARCH_PERIPH_H
-+#define __ASM_ARM_ARCH_PERIPH_H
-+
-+/*
-+ * Peripherals required for pinmux configuration. List will
-+ * grow with support for more devices getting added.
-+ * Numbering based on interrupt table.
-+ *
-+ */
-+enum periph_id {
-+	UART_GPIOC_30_31 = 0,
-+	UART_GPIOB_16_17,
-+	ETH_GPIOB_10_31_C_0_4,
-+	PERIPH_ID_I2C0,
-+	PERIPH_ID_I2C1,
-+	PERIPH_ID_I2C2,
-+	PERIPH_ID_I2C3,
-+	PERIPH_ID_I2C4,
-+	PERIPH_ID_I2C5,
-+	PERIPH_ID_I2C6,
-+	PERIPH_ID_I2C7,
-+	PERIPH_ID_SPI0,
-+	PERIPH_ID_SPI1,
-+	PERIPH_ID_SPI2,
-+	PERIPH_ID_SDMMC0,
-+	PERIPH_ID_SDMMC1,
-+	PERIPH_ID_SDMMC2,
-+	PERIPH_ID_SDMMC3,
-+	PERIPH_ID_I2S1,
-+};
-+
-+enum periph_clock {
-+	UART_CLOCK_CFG = 0,
-+	ETH_CLOCK_CFG,
-+};
-+
-+#endif /* __ASM_ARM_ARCH_PERIPH_H */
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-stv0991/stv0991_wdru.h u-boot/arch/arm/include/asm/arch-stv0991/stv0991_wdru.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-stv0991/stv0991_wdru.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-stv0991/stv0991_wdru.h	2015-01-01 17:34:32.093505875 +0100
-@@ -0,0 +1,28 @@
-+/*
-+ * (C) Copyright 2014
-+ * Vikas Manocha, ST Micoelectronics, vikas.manocha at st.com
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#ifndef _STV0991_WD_RST_H
-+#define _STV0991_WD_RST_H
-+#include <asm/arch-stv0991/hardware.h>
-+
-+struct stv0991_wd_ru {
-+	u32 wdru_config;
-+	u32 wdru_ctrl1;
-+	u32 wdru_ctrl2;
-+	u32 wdru_tim;
-+	u32 wdru_count;
-+	u32 wdru_stat;
-+	u32 wdru_wrlock;
-+};
-+
-+struct stv0991_wd_ru *const stv0991_wd_ru_ptr = \
-+		(struct stv0991_wd_ru *)WDRU_BASE_ADDR;
-+
-+/* Watchdog control register */
-+#define WDRU_RST_SYS		0x1
-+
-+#endif
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-tegra/tegra_i2c.h u-boot/arch/arm/include/asm/arch-tegra/tegra_i2c.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-tegra/tegra_i2c.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-tegra/tegra_i2c.h	2015-01-01 17:34:32.097505809 +0100
-@@ -167,6 +167,6 @@
-  *
-  * @return number of bus, or -1 if there is no DVC active
-  */
--int tegra_i2c_get_dvc_bus_num(void);
-+int tegra_i2c_get_dvc_bus(struct udevice **busp);
- 
- #endif	/* _TEGRA_I2C_H_ */
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-vf610/imx-regs.h u-boot/arch/arm/include/asm/arch-vf610/imx-regs.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-vf610/imx-regs.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-vf610/imx-regs.h	2015-01-01 17:34:32.109505612 +0100
-@@ -256,6 +256,14 @@
- #define DDRMC_CR161_TODTH_RD(v)				(((v) & 0xf) << 8)
- #define DDRMC_CR161_TODTH_WR(v)				((v) & 0xf)
- 
-+/* System Reset Controller (SRC) */
-+#define SRC_SRSR_SW_RST					(0x1 << 18)
-+#define SRC_SRSR_RESETB					(0x1 << 7)
-+#define SRC_SRSR_JTAG_RST				(0x1 << 5)
-+#define SRC_SRSR_WDOG_M4				(0x1 << 4)
-+#define SRC_SRSR_WDOG_A5				(0x1 << 3)
-+#define SRC_SRSR_POR_RST				(0x1 << 0)
-+
- #if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__))
- #include <asm/types.h>
- 
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/kona-common/clk.h u-boot/arch/arm/include/asm/kona-common/clk.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/kona-common/clk.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/include/asm/kona-common/clk.h	2015-01-01 17:34:32.113505547 +0100
-@@ -25,5 +25,6 @@
- struct clk *clk_get_parent(struct clk *clk);
- int clk_sdio_enable(void *base, u32 rate, u32 *actual_ratep);
- int clk_bsc_enable(void *base);
-+int clk_usb_otg_enable(void *base);
- 
- #endif
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/pcie_layerscape.h u-boot/arch/arm/include/asm/pcie_layerscape.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/pcie_layerscape.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/include/asm/pcie_layerscape.h	2015-01-01 17:34:32.125505350 +0100
-@@ -0,0 +1,13 @@
-+/*
-+ * Copyright 2014 Freescale Semiconductor, Inc.
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#ifndef __PCIE_LAYERSCAPE_H_
-+#define __PCIE_LAYERSCAPE_H_
-+
-+void pci_init_board(void);
-+void ft_pcie_setup(void *blob, bd_t *bd);
-+
-+#endif
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/semihosting.h u-boot/arch/arm/include/asm/semihosting.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/semihosting.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/include/asm/semihosting.h	2015-01-01 17:34:32.125505350 +0100
-@@ -12,10 +12,6 @@
-  * code for more information.
-  */
- int smh_load(const char *fname, void *memp, int avail, int verbose);
--int smh_read(int fd, void *memp, int len);
--int smh_open(const char *fname, char *modestr);
--int smh_close(int fd);
--int smh_len_fd(int fd);
--int smh_len(const char *fname);
-+long smh_len(const char *fname);
- 
- #endif /* __SEMIHOSTING_H__ */
-diff -ruN u-boot-2015.01-rc3/arch/arm/Kconfig u-boot/arch/arm/Kconfig
---- u-boot-2015.01-rc3/arch/arm/Kconfig	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/Kconfig	2015-01-01 17:34:31.989507580 +0100
-@@ -341,6 +341,10 @@
- 	bool "Support spear600"
- 	select CPU_ARM926EJS
- 
-+config TARGET_STV0991
-+	bool "Support stv0991"
-+	select CPU_V7
-+
- config TARGET_X600
- 	bool "Support x600"
- 	select CPU_ARM926EJS
-@@ -650,6 +654,7 @@
- 
- config TARGET_TBS2910
- 	bool "Support tbs2910"
-+	select CPU_V7
- 
- config TARGET_TQMA6
- 	bool "TQ Systems TQMa6 board"
-@@ -728,12 +733,14 @@
- 	select ARM64
- 
- config TARGET_LS1021AQDS
--	bool "Support ls1021aqds_nor"
-+	bool "Support ls1021aqds"
- 	select CPU_V7
-+	select SUPPORT_SPL
- 
- config TARGET_LS1021ATWR
--	bool "Support ls1021atwr_nor"
-+	bool "Support ls1021atwr"
- 	select CPU_V7
-+	select SUPPORT_SPL
- 
- config TARGET_BALLOON3
- 	bool "Support balloon3"
-@@ -793,6 +800,7 @@
- 	bool "Panasonic UniPhier platform"
- 	select CPU_V7
- 	select SUPPORT_SPL
-+	select SPL
- 	select OF_CONTROL if !SPL_BUILD
- 
- endchoice
-@@ -953,6 +961,7 @@
- source "board/spear/x600/Kconfig"
- source "board/st-ericsson/snowball/Kconfig"
- source "board/st-ericsson/u8500/Kconfig"
-+source "board/st/stv0991/Kconfig"
- source "board/sunxi/Kconfig"
- source "board/syteco/jadecpu/Kconfig"
- source "board/syteco/zmx25/Kconfig"
-diff -ruN u-boot-2015.01-rc3/arch/arm/lib/semihosting.c u-boot/arch/arm/lib/semihosting.c
---- u-boot-2015.01-rc3/arch/arm/lib/semihosting.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/lib/semihosting.c	2015-01-01 17:34:32.133505219 +0100
-@@ -26,9 +26,9 @@
- /*
-  * Call the handler
-  */
--static int smh_trap(unsigned int sysnum, void *addr)
-+static long smh_trap(unsigned int sysnum, void *addr)
- {
--	register int result asm("r0");
-+	register long result asm("r0");
- #if defined(CONFIG_ARM64)
- 	asm volatile ("hlt #0xf000" : "=r" (result) : "0"(sysnum), "r"(addr));
- #else
-@@ -39,167 +39,164 @@
- }
- 
- /*
-- * Open, load a file into memory, and close it. Check that the available space
-- * is sufficient to store the entire file. Return the bytes actually read from
-- * the file as seen by the read function. The verbose flag enables some extra
-- * printing of successful read status.
-+ * Open a file on the host. Mode is "r" or "rb" currently. Returns a file
-+ * descriptor or -1 on error.
-  */
--int smh_load(const char *fname, void *memp, int avail, int verbose)
-+static long smh_open(const char *fname, char *modestr)
- {
--	int ret, fd, len;
--
--	ret = -1;
--
--	debug("%s: fname \'%s\', avail %u, memp %p\n", __func__, fname,
--	      avail, memp);
--
--	/* Open the file */
--	fd = smh_open(fname, "rb");
--	if (fd == -1)
--		return ret;
-+	long fd;
-+	unsigned long mode;
-+	struct smh_open_s {
-+		const char *fname;
-+		unsigned long mode;
-+		size_t len;
-+	} open;
- 
--	/* Get the file length */
--	ret = smh_len_fd(fd);
--	if (ret == -1) {
--		smh_close(fd);
--		return ret;
--	}
-+	debug("%s: file \'%s\', mode \'%s\'\n", __func__, fname, modestr);
- 
--	/* Check that the file will fit in the supplied buffer */
--	if (ret > avail) {
--		printf("%s: ERROR ret %d, avail %u\n", __func__, ret,
--		       avail);
--		smh_close(fd);
--		return ret;
-+	/* Check the file mode */
-+	if (!(strcmp(modestr, "r"))) {
-+		mode = MODE_READ;
-+	} else if (!(strcmp(modestr, "rb"))) {
-+		mode = MODE_READBIN;
-+	} else {
-+		printf("%s: ERROR mode \'%s\' not supported\n", __func__,
-+		       modestr);
-+		return -1;
- 	}
- 
--	len = ret;
--
--	/* Read the file into the buffer */
--	ret = smh_read(fd, memp, len);
--	if (ret == 0) {
--		/* Print successful load information if requested */
--		if (verbose) {
--			printf("\n%s\n", fname);
--			printf("    0x%8p dest\n", memp);
--			printf("    0x%08x size\n", len);
--			printf("    0x%08x avail\n", avail);
--		}
--	}
-+	open.fname = fname;
-+	open.len = strlen(fname);
-+	open.mode = mode;
- 
--	/* Close the file */
--	smh_close(fd);
-+	/* Open the file on the host */
-+	fd = smh_trap(SYSOPEN, &open);
-+	if (fd == -1)
-+		printf("%s: ERROR fd %ld for file \'%s\'\n", __func__, fd,
-+		       fname);
- 
--	return ret;
-+	return fd;
- }
- 
- /*
-  * Read 'len' bytes of file into 'memp'. Returns 0 on success, else failure
-  */
--int smh_read(int fd, void *memp, int len)
-+static long smh_read(long fd, void *memp, size_t len)
- {
--	int ret;
-+	long ret;
- 	struct smh_read_s {
--		int fd;
-+		long fd;
- 		void *memp;
--		int len;
-+		size_t len;
- 	} read;
- 
--	debug("%s: fd %d, memp %p, len %d\n", __func__, fd, memp, len);
-+	debug("%s: fd %ld, memp %p, len %lu\n", __func__, fd, memp, len);
- 
- 	read.fd = fd;
- 	read.memp = memp;
- 	read.len = len;
- 
- 	ret = smh_trap(SYSREAD, &read);
--	if (ret == 0) {
--		return 0;
--	} else {
-+	if (ret < 0) {
- 		/*
- 		 * The ARM handler allows for returning partial lengths,
- 		 * but in practice this never happens so rather than create
- 		 * hard to maintain partial read loops and such, just fail
- 		 * with an error message.
- 		 */
--		printf("%s: ERROR ret %d, fd %d, len %u memp %p\n",
-+		printf("%s: ERROR ret %ld, fd %ld, len %lu memp %p\n",
- 		       __func__, ret, fd, len, memp);
-+		return -1;
- 	}
--	return ret;
-+
-+	return 0;
- }
- 
- /*
-- * Open a file on the host. Mode is "r" or "rb" currently. Returns a file
-- * descriptor or -1 on error.
-+ * Close the file using the file descriptor
-  */
--int smh_open(const char *fname, char *modestr)
-+static long smh_close(long fd)
- {
--	int ret, fd, mode;
--	struct smh_open_s {
--		const char *fname;
--		unsigned int mode;
--		unsigned int len;
--	} open;
-+	long ret;
- 
--	debug("%s: file \'%s\', mode \'%s\'\n", __func__, fname, modestr);
--
--	ret = -1;
-+	debug("%s: fd %ld\n", __func__, fd);
- 
--	/* Check the file mode */
--	if (!(strcmp(modestr, "r"))) {
--		mode = MODE_READ;
--	} else if (!(strcmp(modestr, "rb"))) {
--		mode = MODE_READBIN;
--	} else {
--		printf("%s: ERROR mode \'%s\' not supported\n", __func__,
--		       modestr);
--		return ret;
--	}
--
--	open.fname = fname;
--	open.len = strlen(fname);
--	open.mode = mode;
--
--	/* Open the file on the host */
--	fd = smh_trap(SYSOPEN, &open);
--	if (fd == -1)
--		printf("%s: ERROR fd %d for file \'%s\'\n", __func__, fd,
--		       fname);
-+	ret = smh_trap(SYSCLOSE, &fd);
-+	if (ret == -1)
-+		printf("%s: ERROR fd %ld\n", __func__, fd);
- 
--	return fd;
-+	return ret;
- }
- 
- /*
-- * Close the file using the file descriptor
-+ * Get the file length from the file descriptor
-  */
--int smh_close(int fd)
-+static long smh_len_fd(long fd)
- {
--	int ret;
--	long fdlong;
-+	long ret;
- 
--	debug("%s: fd %d\n", __func__, fd);
-+	debug("%s: fd %ld\n", __func__, fd);
- 
--	fdlong = (long)fd;
--	ret = smh_trap(SYSCLOSE, &fdlong);
-+	ret = smh_trap(SYSFLEN, &fd);
- 	if (ret == -1)
--		printf("%s: ERROR fd %d\n", __func__, fd);
-+		printf("%s: ERROR ret %ld, fd %ld\n", __func__, ret, fd);
- 
- 	return ret;
- }
- 
- /*
-- * Get the file length from the file descriptor
-+ * Open, load a file into memory, and close it. Check that the available space
-+ * is sufficient to store the entire file. Return the bytes actually read from
-+ * the file as seen by the read function. The verbose flag enables some extra
-+ * printing of successful read status.
-  */
--int smh_len_fd(int fd)
-+int smh_load(const char *fname, void *memp, int avail, int verbose)
- {
--	int ret;
--	long fdlong;
-+	long ret;
-+	long fd;
-+	size_t len;
- 
--	debug("%s: fd %d\n", __func__, fd);
-+	ret = -1;
- 
--	fdlong = (long)fd;
--	ret = smh_trap(SYSFLEN, &fdlong);
--	if (ret == -1)
--		printf("%s: ERROR ret %d\n", __func__, ret);
-+	debug("%s: fname \'%s\', avail %u, memp %p\n", __func__, fname,
-+	      avail, memp);
-+
-+	/* Open the file */
-+	fd = smh_open(fname, "rb");
-+	if (fd == -1)
-+		return -1;
-+
-+	/* Get the file length */
-+	ret = smh_len_fd(fd);
-+	if (ret == -1) {
-+		smh_close(fd);
-+		return -1;
-+	}
-+
-+	/* Check that the file will fit in the supplied buffer */
-+	if (ret > avail) {
-+		printf("%s: ERROR ret %ld, avail %u\n", __func__, ret,
-+		       avail);
-+		smh_close(fd);
-+		return -1;
-+	}
-+
-+	len = ret;
-+
-+	/* Read the file into the buffer */
-+	ret = smh_read(fd, memp, len);
-+	if (ret == 0) {
-+		/* Print successful load information if requested */
-+		if (verbose) {
-+			printf("\n%s\n", fname);
-+			printf("    0x%8p dest\n", memp);
-+			printf("    0x%08lx size\n", len);
-+			printf("    0x%08x avail\n", avail);
-+		}
-+	}
-+
-+	/* Close the file */
-+	smh_close(fd);
- 
- 	return ret;
- }
-@@ -207,26 +204,32 @@
- /*
-  * Get the file length from the filename
-  */
--int smh_len(const char *fname)
-+long smh_len(const char *fname)
- {
--	int ret, fd, len;
-+	long ret;
-+	long fd;
-+	long len;
- 
- 	debug("%s: file \'%s\'\n", __func__, fname);
- 
- 	/* Open the file */
- 	fd = smh_open(fname, "rb");
--	if (fd == -1)
-+	if (fd < 0)
- 		return fd;
- 
- 	/* Get the file length */
- 	len = smh_len_fd(fd);
-+	if (len < 0) {
-+		smh_close(fd);
-+		return len;
-+	}
- 
- 	/* Close the file */
- 	ret = smh_close(fd);
--	if (ret == -1)
-+	if (ret < 0)
- 		return ret;
- 
--	debug("%s: returning len %d\n", __func__, len);
-+	debug("%s: returning len %ld\n", __func__, len);
- 
- 	/* Return the file length (or -1 error indication) */
- 	return len;
-diff -ruN u-boot-2015.01-rc3/arch/microblaze/dts/include/dt-bindings/pinctrl/pinctrl-tegra.h u-boot/arch/microblaze/dts/include/dt-bindings/pinctrl/pinctrl-tegra.h
-diff -ruN u-boot-2015.01-rc3/arch/microblaze/dts/include/dt-bindings/reset/altr,rst-mgr.h u-boot/arch/microblaze/dts/include/dt-bindings/reset/altr,rst-mgr.h
-diff -ruN u-boot-2015.01-rc3/arch/powerpc/cpu/mpc85xx/p5040_ids.c u-boot/arch/powerpc/cpu/mpc85xx/p5040_ids.c
---- u-boot-2015.01-rc3/arch/powerpc/cpu/mpc85xx/p5040_ids.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/powerpc/cpu/mpc85xx/p5040_ids.c	2015-01-01 17:34:32.221503777 +0100
-@@ -49,23 +49,23 @@
- 
- #ifdef CONFIG_SYS_DPAA_FMAN
- struct liodn_id_table fman1_liodn_tbl[] = {
--	SET_FMAN_RX_1G_LIODN(1, 0, 6),
--	SET_FMAN_RX_1G_LIODN(1, 1, 7),
--	SET_FMAN_RX_1G_LIODN(1, 2, 8),
--	SET_FMAN_RX_1G_LIODN(1, 3, 9),
--	SET_FMAN_RX_1G_LIODN(1, 4, 10),
--	SET_FMAN_RX_10G_LIODN(1, 0, 11),
-+	SET_FMAN_RX_1G_LIODN(1, 0, 11),
-+	SET_FMAN_RX_1G_LIODN(1, 1, 12),
-+	SET_FMAN_RX_1G_LIODN(1, 2, 13),
-+	SET_FMAN_RX_1G_LIODN(1, 3, 14),
-+	SET_FMAN_RX_1G_LIODN(1, 4, 15),
-+	SET_FMAN_RX_10G_LIODN(1, 0, 16),
- };
- int fman1_liodn_tbl_sz = ARRAY_SIZE(fman1_liodn_tbl);
- 
- #if (CONFIG_SYS_NUM_FMAN == 2)
- struct liodn_id_table fman2_liodn_tbl[] = {
--	SET_FMAN_RX_1G_LIODN(2, 0, 12),
--	SET_FMAN_RX_1G_LIODN(2, 1, 13),
--	SET_FMAN_RX_1G_LIODN(2, 2, 14),
--	SET_FMAN_RX_1G_LIODN(2, 3, 15),
--	SET_FMAN_RX_1G_LIODN(2, 4, 16),
--	SET_FMAN_RX_10G_LIODN(2, 0, 17),
-+	SET_FMAN_RX_1G_LIODN(2, 0, 17),
-+	SET_FMAN_RX_1G_LIODN(2, 1, 18),
-+	SET_FMAN_RX_1G_LIODN(2, 2, 19),
-+	SET_FMAN_RX_1G_LIODN(2, 3, 20),
-+	SET_FMAN_RX_1G_LIODN(2, 4, 21),
-+	SET_FMAN_RX_10G_LIODN(2, 0, 22),
- };
- int fman2_liodn_tbl_sz = ARRAY_SIZE(fman2_liodn_tbl);
- #endif
-diff -ruN u-boot-2015.01-rc3/arch/powerpc/cpu/mpc85xx/portals.c u-boot/arch/powerpc/cpu/mpc85xx/portals.c
---- u-boot-2015.01-rc3/arch/powerpc/cpu/mpc85xx/portals.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/powerpc/cpu/mpc85xx/portals.c	2015-01-01 17:34:32.221503777 +0100
-@@ -14,9 +14,46 @@
- #include <asm/fsl_portals.h>
- #include <asm/fsl_liodn.h>
- 
-+#define MAX_BPORTALS (CONFIG_SYS_BMAN_CINH_SIZE / CONFIG_SYS_BMAN_SP_CINH_SIZE)
-+#define MAX_QPORTALS (CONFIG_SYS_QMAN_CINH_SIZE / CONFIG_SYS_QMAN_SP_CINH_SIZE)
-+static void inhibit_portals(void __iomem *addr, int max_portals,
-+			int arch_max_portals, int portal_cinh_size)
-+{
-+	uint32_t val;
-+	int i;
-+
-+	/* arch_max_portals is the maximum based on memory size. This includes
-+	 * the reserved memory in the SoC.  max_portals the number of physical
-+	 * portals in the SoC */
-+	if (max_portals > arch_max_portals) {
-+		printf("ERROR: portal config error\n");
-+		max_portals = arch_max_portals;
-+	}
-+
-+	for (i = 0; i < max_portals; i++) {
-+		out_be32(addr, -1);
-+		val = in_be32(addr);
-+		if (!val) {
-+			printf("ERROR: Stopped after %d portals\n", i);
-+			goto done;
-+		}
-+		addr += portal_cinh_size;
-+	}
-+#ifdef DEBUG
-+	printf("Cleared %d portals\n", i);
-+#endif
-+done:
-+
-+	return;
-+}
-+
- void setup_portals(void)
- {
- 	ccsr_qman_t *qman = (void *)CONFIG_SYS_FSL_QMAN_ADDR;
-+	void __iomem *bpaddr = (void *)CONFIG_SYS_BMAN_CINH_BASE +
-+				CONFIG_SYS_BMAN_SWP_ISDR_REG;
-+	void __iomem *qpaddr = (void *)CONFIG_SYS_QMAN_CINH_BASE +
-+				CONFIG_SYS_QMAN_SWP_ISDR_REG;
- #ifdef CONFIG_FSL_CORENET
- 	int i;
- 
-@@ -38,6 +75,12 @@
- 	out_be32(&qman->qcsp_bare, (u32)(CONFIG_SYS_QMAN_MEM_PHYS >> 32));
- #endif
- 	out_be32(&qman->qcsp_bar, (u32)CONFIG_SYS_QMAN_MEM_PHYS);
-+
-+	/* Change default state of BMan ISDR portals to all 1s */
-+	inhibit_portals(bpaddr, CONFIG_SYS_BMAN_NUM_PORTALS, MAX_BPORTALS,
-+			CONFIG_SYS_BMAN_SP_CINH_SIZE);
-+	inhibit_portals(qpaddr, CONFIG_SYS_QMAN_NUM_PORTALS, MAX_QPORTALS,
-+			CONFIG_SYS_QMAN_SP_CINH_SIZE);
- }
- 
- /* Update portal containter to match LAW setup of portal in phy map */
-diff -ruN u-boot-2015.01-rc3/arch/powerpc/cpu/mpc85xx/tlb.c u-boot/arch/powerpc/cpu/mpc85xx/tlb.c
---- u-boot-2015.01-rc3/arch/powerpc/cpu/mpc85xx/tlb.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/powerpc/cpu/mpc85xx/tlb.c	2015-01-01 17:34:32.221503777 +0100
-@@ -299,12 +299,16 @@
- {
- 	unsigned int ram_tlb_address = (unsigned int)CONFIG_SYS_DDR_SDRAM_BASE;
- 	u64 memsize = (u64)memsize_in_meg << 20;
-+	u64 size;
- 
--	memsize = min(memsize, (u64)CONFIG_MAX_MEM_MAPPED);
--	memsize = tlb_map_range(ram_tlb_address, p_addr, memsize, TLB_MAP_RAM);
-+	size = min(memsize, (u64)CONFIG_MAX_MEM_MAPPED);
-+	size = tlb_map_range(ram_tlb_address, p_addr, size, TLB_MAP_RAM);
- 
--	if (memsize)
--		print_size(memsize, " left unmapped\n");
-+	if (size || memsize > CONFIG_MAX_MEM_MAPPED) {
-+		print_size(memsize > CONFIG_MAX_MEM_MAPPED ?
-+			   memsize - CONFIG_MAX_MEM_MAPPED + size : size,
-+			   " left unmapped\n");
-+	}
- 
- 	return memsize_in_meg;
- }
-diff -ruN u-boot-2015.01-rc3/arch/powerpc/cpu/mpc8xxx/fdt.c u-boot/arch/powerpc/cpu/mpc8xxx/fdt.c
---- u-boot-2015.01-rc3/arch/powerpc/cpu/mpc8xxx/fdt.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/powerpc/cpu/mpc8xxx/fdt.c	2015-01-01 17:34:32.225503711 +0100
-@@ -73,110 +73,6 @@
- }
- #endif /* defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx) */
- 
--#if defined(CONFIG_HAS_FSL_DR_USB) || defined(CONFIG_HAS_FSL_MPH_USB)
--static int fdt_fixup_usb_mode_phy_type(void *blob, const char *mode,
--				const char *phy_type, int start_offset)
--{
--	const char *compat_dr = "fsl-usb2-dr";
--	const char *compat_mph = "fsl-usb2-mph";
--	const char *prop_mode = "dr_mode";
--	const char *prop_type = "phy_type";
--	const char *node_type = NULL;
--	int node_offset;
--	int err;
--
--	node_offset = fdt_node_offset_by_compatible(blob,
--			start_offset, compat_mph);
--	if (node_offset < 0) {
--		node_offset = fdt_node_offset_by_compatible(blob,
--			start_offset, compat_dr);
--		if (node_offset < 0) {
--			printf("WARNING: could not find compatible"
--				" node %s or %s: %s.\n", compat_mph,
--				compat_dr, fdt_strerror(node_offset));
--			return -1;
--		} else
--			node_type = compat_dr;
--	} else
--		node_type = compat_mph;
--
--	if (mode) {
--		err = fdt_setprop(blob, node_offset, prop_mode, mode,
--				  strlen(mode) + 1);
--		if (err < 0)
--			printf("WARNING: could not set %s for %s: %s.\n",
--			       prop_mode, node_type, fdt_strerror(err));
--	}
--
--	if (phy_type) {
--		err = fdt_setprop(blob, node_offset, prop_type, phy_type,
--				  strlen(phy_type) + 1);
--		if (err < 0)
--			printf("WARNING: could not set %s for %s: %s.\n",
--			       prop_type, node_type, fdt_strerror(err));
--	}
--
--	return node_offset;
--}
--
--void fdt_fixup_dr_usb(void *blob, bd_t *bd)
--{
--	const char *modes[] = { "host", "peripheral", "otg" };
--	const char *phys[] = { "ulpi", "utmi" };
--	int usb_mode_off = -1;
--	int usb_phy_off = -1;
--	char str[5];
--	int i, j;
--
--	for (i = 1; i <= CONFIG_USB_MAX_CONTROLLER_COUNT; i++) {
--		const char *dr_mode_type = NULL;
--		const char *dr_phy_type = NULL;
--		int mode_idx = -1, phy_idx = -1;
--		snprintf(str, 5, "%s%d", "usb", i);
--		if (hwconfig(str)) {
--			for (j = 0; j < ARRAY_SIZE(modes); j++) {
--				if (hwconfig_subarg_cmp(str, "dr_mode",
--						modes[j])) {
--					mode_idx = j;
--					break;
--				}
--			}
--
--			for (j = 0; j < ARRAY_SIZE(phys); j++) {
--				if (hwconfig_subarg_cmp(str, "phy_type",
--						phys[j])) {
--					phy_idx = j;
--					break;
--				}
--			}
--
--			if (mode_idx < 0 && phy_idx < 0) {
--				printf("WARNING: invalid phy or mode\n");
--				return;
--			}
--
--			if (mode_idx > -1)
--				dr_mode_type = modes[mode_idx];
--
--			if (phy_idx > -1)
--				dr_phy_type = phys[phy_idx];
--		}
--
--		usb_mode_off = fdt_fixup_usb_mode_phy_type(blob,
--			dr_mode_type, NULL, usb_mode_off);
--
--		if (usb_mode_off < 0)
--			return;
--
--		usb_phy_off = fdt_fixup_usb_mode_phy_type(blob,
--			NULL, dr_phy_type, usb_phy_off);
--
--		if (usb_phy_off < 0)
--			return;
--	}
--}
--#endif /* defined(CONFIG_HAS_FSL_DR_USB) || defined(CONFIG_HAS_FSL_MPH_USB) */
--
- /*
-  * update crypto node properties to a specified revision of the SEC
-  * called with sec_rev == 0 if not on an E processor
-diff -ruN u-boot-2015.01-rc3/arch/sandbox/dts/include/dt-bindings/pinctrl/pinctrl-tegra.h u-boot/arch/sandbox/dts/include/dt-bindings/pinctrl/pinctrl-tegra.h
-diff -ruN u-boot-2015.01-rc3/arch/sandbox/dts/include/dt-bindings/reset/altr,rst-mgr.h u-boot/arch/sandbox/dts/include/dt-bindings/reset/altr,rst-mgr.h
-diff -ruN u-boot-2015.01-rc3/arch/sandbox/dts/sandbox.dts u-boot/arch/sandbox/dts/sandbox.dts
---- u-boot-2015.01-rc3/arch/sandbox/dts/sandbox.dts	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/sandbox/dts/sandbox.dts	2015-01-01 17:34:32.241503449 +0100
-@@ -134,6 +134,23 @@
- 		num-gpios = <20>;
- 	};
- 
-+	i2c at 0 {
-+		#address-cells = <1>;
-+		#size-cells = <0>;
-+		reg = <0>;
-+		compatible = "sandbox,i2c";
-+		clock-frequency = <400000>;
-+		eeprom at 2c {
-+			reg = <0x2c>;
-+			compatible = "i2c-eeprom";
-+			emul {
-+				compatible = "sandbox,i2c-eeprom";
-+				sandbox,filename = "i2c.bin";
-+				sandbox,size = <128>;
-+			};
-+		};
-+	};
-+
- 	spi at 0 {
- 		#address-cells = <1>;
- 		#size-cells = <0>;
-diff -ruN u-boot-2015.01-rc3/arch/sandbox/include/asm/test.h u-boot/arch/sandbox/include/asm/test.h
---- u-boot-2015.01-rc3/arch/sandbox/include/asm/test.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/sandbox/include/asm/test.h	2015-01-01 17:34:32.241503449 +0100
-@@ -0,0 +1,26 @@
-+/*
-+ * Test-related constants for sandbox
-+ *
-+ * Copyright (c) 2014 Google, Inc
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#ifndef __ASM_TEST_H
-+#define __ASM_TEST_H
-+
-+/* The sandbox driver always permits an I2C device with this address */
-+#define SANDBOX_I2C_TEST_ADDR	0x59
-+
-+enum sandbox_i2c_eeprom_test_mode {
-+	SIE_TEST_MODE_NONE,
-+	/* Permits read/write of only one byte per I2C transaction */
-+	SIE_TEST_MODE_SINGLE_BYTE,
-+};
-+
-+void sandbox_i2c_eeprom_set_test_mode(struct udevice *dev,
-+				      enum sandbox_i2c_eeprom_test_mode mode);
-+
-+void sandbox_i2c_eeprom_set_offset_len(struct udevice *dev, int offset_len);
-+
-+#endif
-diff -ruN u-boot-2015.01-rc3/arch/x86/cpu/ivybridge/cpu.c u-boot/arch/x86/cpu/ivybridge/cpu.c
---- u-boot-2015.01-rc3/arch/x86/cpu/ivybridge/cpu.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/cpu/ivybridge/cpu.c	2015-01-01 17:34:32.249503317 +0100
-@@ -263,6 +263,7 @@
- static int report_bist_failure(void)
- {
- 	if (gd->arch.bist != 0) {
-+		post_code(POST_BIST_FAILURE);
- 		printf("BIST failed: %08x\n", gd->arch.bist);
- 		return -EFAULT;
- 	}
-diff -ruN u-boot-2015.01-rc3/arch/x86/cpu/ivybridge/microcode_intel.c u-boot/arch/x86/cpu/ivybridge/microcode_intel.c
---- u-boot-2015.01-rc3/arch/x86/cpu/ivybridge/microcode_intel.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/cpu/ivybridge/microcode_intel.c	2015-01-01 17:34:32.249503317 +0100
-@@ -40,6 +40,8 @@
- 	update->data = fdt_getprop(blob, node, "data", &update->size);
- 	if (!update->data)
- 		return -EINVAL;
-+	update->data += 48;
-+	update->size -= 48;
- 
- 	update->header_version = fdtdec_get_int(blob, node,
- 						"intel,header-version", 0);
-@@ -48,17 +50,17 @@
- 	update->date_code = fdtdec_get_int(blob, node,
- 					   "intel,date-code", 0);
- 	update->processor_signature = fdtdec_get_int(blob, node,
--					"intel.processor-signature", 0);
-+					"intel,processor-signature", 0);
- 	update->checksum = fdtdec_get_int(blob, node, "intel,checksum", 0);
- 	update->loader_revision = fdtdec_get_int(blob, node,
--						 "loader-revision", 0);
-+						 "intel,loader-revision", 0);
- 	update->processor_flags = fdtdec_get_int(blob, node,
--						 "processor-flags", 0);
-+						 "intel,processor-flags", 0);
- 
- 	return 0;
- }
- 
--static uint32_t microcode_read_rev(void)
-+static inline uint32_t microcode_read_rev(void)
- {
- 	/*
- 	 * Some Intel CPUs can be very finicky about the CPUID sequence used.
-@@ -114,6 +116,7 @@
- {
- 	struct microcode_update cpu, update;
- 	const void *blob = gd->fdt_blob;
-+	int skipped;
- 	int count;
- 	int node;
- 	int ret;
-@@ -121,12 +124,13 @@
- 	microcode_read_cpu(&cpu);
- 	node = 0;
- 	count = 0;
-+	skipped = 0;
- 	do {
- 		node = fdtdec_next_compatible(blob, node,
- 					      COMPAT_INTEL_MICROCODE);
- 		if (node < 0) {
- 			debug("%s: Found %d updates\n", __func__, count);
--			return count ? 0 : -ENOENT;
-+			return count ? 0 : skipped ? -EEXIST : -ENOENT;
- 		}
- 
- 		ret = microcode_decode_node(blob, node, &update);
-@@ -135,12 +139,15 @@
- 			      ret);
- 			return ret;
- 		}
--		if (update.processor_signature == cpu.processor_signature &&
--		    (update.processor_flags & cpu.processor_flags)) {
--			debug("%s: Update already exists\n", __func__);
--			return -EEXIST;
-+		if (!(update.processor_signature == cpu.processor_signature &&
-+		      (update.processor_flags & cpu.processor_flags))) {
-+			debug("%s: Skipping non-matching update, sig=%x, pf=%x\n",
-+			      __func__, update.processor_signature,
-+			      update.processor_flags);
-+			skipped++;
-+			continue;
- 		}
--
-+		ret = microcode_read_rev();
- 		wrmsr(0x79, (ulong)update.data, 0);
- 		debug("microcode: updated to revision 0x%x date=%04x-%02x-%02x\n",
- 		      microcode_read_rev(), update.date_code & 0xffff,
-diff -ruN u-boot-2015.01-rc3/arch/x86/cpu/ivybridge/sdram.c u-boot/arch/x86/cpu/ivybridge/sdram.c
---- u-boot-2015.01-rc3/arch/x86/cpu/ivybridge/sdram.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/cpu/ivybridge/sdram.c	2015-01-01 17:34:32.253503252 +0100
-@@ -177,7 +177,7 @@
- 
- 	debug("PEI data at %p, size %x:\n", pei_data, sizeof(*pei_data));
- 
--	data = (char *)CONFIG_X86_MRC_START;
-+	data = (char *)CONFIG_X86_MRC_ADDR;
- 	if (data) {
- 		int rv;
- 		int (*func)(struct pei_data *);
-diff -ruN u-boot-2015.01-rc3/arch/x86/cpu/Makefile u-boot/arch/x86/cpu/Makefile
---- u-boot-2015.01-rc3/arch/x86/cpu/Makefile	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/cpu/Makefile	2015-01-01 17:34:32.249503317 +0100
-@@ -15,6 +15,7 @@
- obj-$(CONFIG_SYS_COREBOOT) += coreboot/
- obj-$(CONFIG_NORTHBRIDGE_INTEL_SANDYBRIDGE) += ivybridge/
- obj-$(CONFIG_NORTHBRIDGE_INTEL_IVYBRIDGE) += ivybridge/
-+obj-$(CONFIG_INTEL_QUEENSBAY) += queensbay/
- obj-y += lapic.o
- obj-$(CONFIG_PCI) += pci.o
- obj-y += turbo.o
-diff -ruN u-boot-2015.01-rc3/arch/x86/cpu/queensbay/fsp_configs.c u-boot/arch/x86/cpu/queensbay/fsp_configs.c
---- u-boot-2015.01-rc3/arch/x86/cpu/queensbay/fsp_configs.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/cpu/queensbay/fsp_configs.c	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,20 @@
-+/*
-+ * Copyright (C) 2013, Intel Corporation
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	Intel
-+ */
-+
-+#include <common.h>
-+#include <asm/arch/fsp/fsp_support.h>
-+
-+void update_fsp_upd(struct upd_region *fsp_upd)
-+{
-+	/* Override any UPD setting if required */
-+
-+	/* Uncomment the line below to enable DEBUG message */
-+	/* fsp_upd->serial_dbgport_type = 1; */
-+
-+	/* Examples on how to initialize the pointers in UPD region */
-+	/* fsp_upd->pcd_example = (EXAMPLE_DATA *)&example; */
-+}
-diff -ruN u-boot-2015.01-rc3/arch/x86/cpu/queensbay/fsp_support.c u-boot/arch/x86/cpu/queensbay/fsp_support.c
---- u-boot-2015.01-rc3/arch/x86/cpu/queensbay/fsp_support.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/cpu/queensbay/fsp_support.c	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,401 @@
-+/*
-+ * Copyright (C) 2013, Intel Corporation
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	Intel
-+ */
-+
-+#include <common.h>
-+#include <asm/arch/fsp/fsp_support.h>
-+#include <asm/post.h>
-+
-+/**
-+ * Compares two GUIDs
-+ *
-+ * If the GUIDs are identical then true is returned.
-+ * If there are any bit differences in the two GUIDs, then false is returned.
-+ *
-+ * @guid1:        A pointer to a 128 bit GUID.
-+ * @guid2:        A pointer to a 128 bit GUID.
-+ *
-+ * @retval true:  guid1 and guid2 are identical.
-+ * @retval false: guid1 and guid2 are not identical.
-+ */
-+static bool compare_guid(const struct efi_guid *guid1,
-+			 const struct efi_guid *guid2)
-+{
-+	if (memcmp(guid1, guid2, sizeof(struct efi_guid)) == 0)
-+		return true;
-+	else
-+		return false;
-+}
-+
-+u32 __attribute__((optimize("O0"))) find_fsp_header(void)
-+{
-+	/*
-+	 * This function may be called before the a stack is established,
-+	 * so special care must be taken. First, it cannot declare any local
-+	 * variable using stack. Only register variable can be used here.
-+	 * Secondly, some compiler version will add prolog or epilog code
-+	 * for the C function. If so the function call may not work before
-+	 * stack is ready.
-+	 *
-+	 * GCC 4.8.1 has been verified to be working for the following codes.
-+	 */
-+	volatile register u8 *fsp asm("eax");
-+
-+	/* Initalize the FSP base */
-+	fsp = (u8 *)CONFIG_FSP_ADDR;
-+
-+	/* Check the FV signature, _FVH */
-+	if (((struct fv_header *)fsp)->sign == EFI_FVH_SIGNATURE) {
-+		/* Go to the end of the FV header and align the address */
-+		fsp += ((struct fv_header *)fsp)->ext_hdr_off;
-+		fsp += ((struct fv_ext_header *)fsp)->ext_hdr_size;
-+		fsp  = (u8 *)(((u32)fsp + 7) & 0xFFFFFFF8);
-+	} else {
-+		fsp  = 0;
-+	}
-+
-+	/* Check the FFS GUID */
-+	if (fsp &&
-+	    ((struct ffs_file_header *)fsp)->name.data1 == FSP_GUID_DATA1 &&
-+	    ((struct ffs_file_header *)fsp)->name.data2 == FSP_GUID_DATA2 &&
-+	    ((struct ffs_file_header *)fsp)->name.data3 == FSP_GUID_DATA3 &&
-+	    ((struct ffs_file_header *)fsp)->name.data4[0] == FSP_GUID_DATA4_0 &&
-+	    ((struct ffs_file_header *)fsp)->name.data4[1] == FSP_GUID_DATA4_1 &&
-+	    ((struct ffs_file_header *)fsp)->name.data4[2] == FSP_GUID_DATA4_2 &&
-+	    ((struct ffs_file_header *)fsp)->name.data4[3] == FSP_GUID_DATA4_3 &&
-+	    ((struct ffs_file_header *)fsp)->name.data4[4] == FSP_GUID_DATA4_4 &&
-+	    ((struct ffs_file_header *)fsp)->name.data4[5] == FSP_GUID_DATA4_5 &&
-+	    ((struct ffs_file_header *)fsp)->name.data4[6] == FSP_GUID_DATA4_6 &&
-+	    ((struct ffs_file_header *)fsp)->name.data4[7] == FSP_GUID_DATA4_7) {
-+		/* Add the FFS header size to find the raw section header */
-+		fsp += sizeof(struct ffs_file_header);
-+	} else {
-+		fsp = 0;
-+	}
-+
-+	if (fsp &&
-+	    ((struct raw_section *)fsp)->type == EFI_SECTION_RAW) {
-+		/* Add the raw section header size to find the FSP header */
-+		fsp += sizeof(struct raw_section);
-+	} else {
-+		fsp = 0;
-+	}
-+
-+	return (u32)fsp;
-+}
-+
-+void fsp_continue(struct shared_data *shared_data, u32 status, void *hob_list)
-+{
-+	u32 stack_len;
-+	u32 stack_base;
-+	u32 stack_top;
-+
-+	post_code(POST_MRC);
-+
-+	assert(status == 0);
-+
-+	/* Get the migrated stack in normal memory */
-+	stack_base = (u32)fsp_get_bootloader_tmp_mem(hob_list, &stack_len);
-+	assert(stack_base != 0);
-+	stack_top  = stack_base + stack_len - sizeof(u32);
-+
-+	/*
-+	 * Old stack base is stored at the very end of the stack top,
-+	 * use it to calculate the migrated shared data base
-+	 */
-+	shared_data = (struct shared_data *)(stack_base +
-+			((u32)shared_data - *(u32 *)stack_top));
-+
-+	/* The boot loader main function entry */
-+	fsp_init_done(hob_list);
-+}
-+
-+void fsp_init(u32 stack_top, u32 boot_mode, void *nvs_buf)
-+{
-+	struct shared_data shared_data;
-+	fsp_init_f init;
-+	struct fsp_init_params params;
-+	struct fspinit_rtbuf rt_buf;
-+	struct vpd_region *fsp_vpd;
-+	struct fsp_header *fsp_hdr;
-+	struct fsp_init_params *params_ptr;
-+	struct upd_region *fsp_upd;
-+
-+	fsp_hdr = (struct fsp_header *)find_fsp_header();
-+	if (fsp_hdr == NULL) {
-+		/* No valid FSP info header was found */
-+		panic("Invalid FSP header");
-+	}
-+
-+	fsp_upd = (struct upd_region *)&shared_data.fsp_upd;
-+	memset(&rt_buf, 0, sizeof(struct fspinit_rtbuf));
-+
-+	/* Reserve a gap in stack top */
-+	rt_buf.common.stack_top = (u32 *)stack_top - 32;
-+	rt_buf.common.boot_mode = boot_mode;
-+	rt_buf.common.upd_data = (struct upd_region *)fsp_upd;
-+
-+	/* Get VPD region start */
-+	fsp_vpd = (struct vpd_region *)(fsp_hdr->img_base +
-+			fsp_hdr->cfg_region_off);
-+
-+	/* Verifify the VPD data region is valid */
-+	assert((fsp_vpd->img_rev == VPD_IMAGE_REV) &&
-+	       (fsp_vpd->sign == VPD_IMAGE_ID));
-+
-+	/* Copy default data from Flash */
-+	memcpy(fsp_upd, (void *)(fsp_hdr->img_base + fsp_vpd->upd_offset),
-+	       sizeof(struct upd_region));
-+
-+	/* Verifify the UPD data region is valid */
-+	assert(fsp_upd->terminator == UPD_TERMINATOR);
-+
-+	/* Override any UPD setting if required */
-+	update_fsp_upd(fsp_upd);
-+
-+	memset(&params, 0, sizeof(struct fsp_init_params));
-+	params.nvs_buf = nvs_buf;
-+	params.rt_buf = (struct fspinit_rtbuf *)&rt_buf;
-+	params.continuation = (fsp_continuation_f)asm_continuation;
-+
-+	init = (fsp_init_f)(fsp_hdr->img_base + fsp_hdr->fsp_init);
-+	params_ptr = &params;
-+
-+	shared_data.fsp_hdr = fsp_hdr;
-+	shared_data.stack_top = (u32 *)stack_top;
-+
-+	post_code(POST_PRE_MRC);
-+
-+	/*
-+	 * Use ASM code to ensure the register value in EAX & ECX
-+	 * will be passed into BlContinuationFunc
-+	 */
-+	asm volatile (
-+		"pushl	%0;"
-+		"call	*%%eax;"
-+		".global asm_continuation;"
-+		"asm_continuation:;"
-+		"movl	%%ebx, %%eax;"		/* shared_data */
-+		"movl	4(%%esp), %%edx;"	/* status */
-+		"movl	8(%%esp), %%ecx;"	/* hob_list */
-+		"jmp	fsp_continue;"
-+		: : "m"(params_ptr), "a"(init), "b"(&shared_data)
-+	);
-+
-+	/*
-+	 * Should never get here.
-+	 * Control will continue from fsp_continue.
-+	 * This line below is to prevent the compiler from optimizing
-+	 * structure intialization.
-+	 *
-+	 * DO NOT REMOVE!
-+	 */
-+	init(&params);
-+}
-+
-+u32 fsp_notify(struct fsp_header *fsp_hdr, u32 phase)
-+{
-+	fsp_notify_f notify;
-+	struct fsp_notify_params params;
-+	struct fsp_notify_params *params_ptr;
-+	u32 status;
-+
-+	if (!fsp_hdr)
-+		fsp_hdr = (struct fsp_header *)find_fsp_header();
-+
-+	if (fsp_hdr == NULL) {
-+		/* No valid FSP info header */
-+		panic("Invalid FSP header");
-+	}
-+
-+	notify = (fsp_notify_f)(fsp_hdr->img_base + fsp_hdr->fsp_notify);
-+	params.phase = phase;
-+	params_ptr = &params;
-+
-+	/*
-+	 * Use ASM code to ensure correct parameter is on the stack for
-+	 * FspNotify as U-Boot is using different ABI from FSP
-+	 */
-+	asm volatile (
-+		"pushl	%1;"		/* push notify phase */
-+		"call	*%%eax;"	/* call FspNotify */
-+		"addl	$4, %%esp;"	/* clean up the stack */
-+		: "=a"(status) : "m"(params_ptr), "a"(notify), "m"(*params_ptr)
-+	);
-+
-+	return status;
-+}
-+
-+u32 fsp_get_usable_lowmem_top(const void *hob_list)
-+{
-+	union hob_pointers hob;
-+	phys_addr_t phys_start;
-+	u32 top;
-+
-+	/* Get the HOB list for processing */
-+	hob.raw = (void *)hob_list;
-+
-+	/* * Collect memory ranges */
-+	top = FSP_LOWMEM_BASE;
-+	while (!end_of_hob(hob)) {
-+		if (get_hob_type(hob) == HOB_TYPE_RES_DESC) {
-+			if (hob.res_desc->type == RES_SYS_MEM) {
-+				phys_start = hob.res_desc->phys_start;
-+				/* Need memory above 1MB to be collected here */
-+				if (phys_start >= FSP_LOWMEM_BASE &&
-+				    phys_start < (phys_addr_t)FSP_HIGHMEM_BASE)
-+					top += (u32)(hob.res_desc->len);
-+			}
-+		}
-+		hob.raw = get_next_hob(hob);
-+	}
-+
-+	return top;
-+}
-+
-+u64 fsp_get_usable_highmem_top(const void *hob_list)
-+{
-+	union hob_pointers hob;
-+	phys_addr_t phys_start;
-+	u64 top;
-+
-+	/* Get the HOB list for processing */
-+	hob.raw = (void *)hob_list;
-+
-+	/* Collect memory ranges */
-+	top = FSP_HIGHMEM_BASE;
-+	while (!end_of_hob(hob)) {
-+		if (get_hob_type(hob) == HOB_TYPE_RES_DESC) {
-+			if (hob.res_desc->type == RES_SYS_MEM) {
-+				phys_start = hob.res_desc->phys_start;
-+				/* Need memory above 1MB to be collected here */
-+				if (phys_start >= (phys_addr_t)FSP_HIGHMEM_BASE)
-+					top += (u32)(hob.res_desc->len);
-+			}
-+		}
-+		hob.raw = get_next_hob(hob);
-+	}
-+
-+	return top;
-+}
-+
-+u64 fsp_get_reserved_mem_from_guid(const void *hob_list, u64 *len,
-+				   struct efi_guid *guid)
-+{
-+	union hob_pointers hob;
-+
-+	/* Get the HOB list for processing */
-+	hob.raw = (void *)hob_list;
-+
-+	/* Collect memory ranges */
-+	while (!end_of_hob(hob)) {
-+		if (get_hob_type(hob) == HOB_TYPE_RES_DESC) {
-+			if (hob.res_desc->type == RES_MEM_RESERVED) {
-+				if (compare_guid(&hob.res_desc->owner, guid)) {
-+					if (len)
-+						*len = (u32)(hob.res_desc->len);
-+
-+					return (u64)(hob.res_desc->phys_start);
-+				}
-+			}
-+		}
-+		hob.raw = get_next_hob(hob);
-+	}
-+
-+	return 0;
-+}
-+
-+u32 fsp_get_fsp_reserved_mem(const void *hob_list, u32 *len)
-+{
-+	const struct efi_guid guid = FSP_HOB_RESOURCE_OWNER_FSP_GUID;
-+	u64 length;
-+	u32 base;
-+
-+	base = (u32)fsp_get_reserved_mem_from_guid(hob_list,
-+			&length, (struct efi_guid *)&guid);
-+	if ((len != 0) && (base != 0))
-+		*len = (u32)length;
-+
-+	return base;
-+}
-+
-+u32 fsp_get_tseg_reserved_mem(const void *hob_list, u32 *len)
-+{
-+	const struct efi_guid guid = FSP_HOB_RESOURCE_OWNER_TSEG_GUID;
-+	u64 length;
-+	u32 base;
-+
-+	base = (u32)fsp_get_reserved_mem_from_guid(hob_list,
-+			&length, (struct efi_guid *)&guid);
-+	if ((len != 0) && (base != 0))
-+		*len = (u32)length;
-+
-+	return base;
-+}
-+
-+void *fsp_get_next_hob(u16 type, const void *hob_list)
-+{
-+	union hob_pointers hob;
-+
-+	assert(hob_list != NULL);
-+
-+	hob.raw = (u8 *)hob_list;
-+
-+	/* Parse the HOB list until end of list or matching type is found */
-+	while (!end_of_hob(hob)) {
-+		if (get_hob_type(hob) == type)
-+			return hob.raw;
-+
-+		hob.raw = get_next_hob(hob);
-+	}
-+
-+	return NULL;
-+}
-+
-+void *fsp_get_next_guid_hob(const struct efi_guid *guid, const void *hob_list)
-+{
-+	union hob_pointers hob;
-+
-+	hob.raw = (u8 *)hob_list;
-+	while ((hob.raw = fsp_get_next_hob(HOB_TYPE_GUID_EXT,
-+			hob.raw)) != NULL) {
-+		if (compare_guid(guid, &hob.guid->name))
-+			break;
-+		hob.raw = get_next_hob(hob);
-+	}
-+
-+	return hob.raw;
-+}
-+
-+void *fsp_get_guid_hob_data(const void *hob_list, u32 *len,
-+			    struct efi_guid *guid)
-+{
-+	u8 *guid_hob;
-+
-+	guid_hob = fsp_get_next_guid_hob(guid, hob_list);
-+	if (guid_hob == NULL) {
-+		return NULL;
-+	} else {
-+		if (len)
-+			*len = get_guid_hob_data_size(guid_hob);
-+
-+		return get_guid_hob_data(guid_hob);
-+	}
-+}
-+
-+void *fsp_get_nvs_data(const void *hob_list, u32 *len)
-+{
-+	const struct efi_guid guid = FSP_NON_VOLATILE_STORAGE_HOB_GUID;
-+
-+	return fsp_get_guid_hob_data(hob_list, len, (struct efi_guid *)&guid);
-+}
-+
-+void *fsp_get_bootloader_tmp_mem(const void *hob_list, u32 *len)
-+{
-+	const struct efi_guid guid = FSP_BOOTLOADER_TEMP_MEM_HOB_GUID;
-+
-+	return fsp_get_guid_hob_data(hob_list, len, (struct efi_guid *)&guid);
-+}
-diff -ruN u-boot-2015.01-rc3/arch/x86/cpu/queensbay/Kconfig u-boot/arch/x86/cpu/queensbay/Kconfig
---- u-boot-2015.01-rc3/arch/x86/cpu/queensbay/Kconfig	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/cpu/queensbay/Kconfig	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,79 @@
-+#
-+# Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+#
-+# SPDX-License-Identifier:	GPL-2.0+
-+#
-+
-+config INTEL_QUEENSBAY
-+	bool
-+	select HAVE_FSP
-+	select HAVE_CMC
-+
-+if INTEL_QUEENSBAY
-+
-+config HAVE_FSP
-+	bool "Add an Firmware Support Package binary"
-+	help
-+	  Select this option to add an Firmware Support Package binary to
-+	  the resulting U-Boot image. It is a binary blob which U-Boot uses
-+	  to set up SDRAM and other chipset specific initialization.
-+
-+	  Note: Without this binary U-Boot will not be able to set up its
-+	  SDRAM so will not boot.
-+
-+config FSP_FILE
-+	string "Firmware Support Package binary filename"
-+	depends on HAVE_FSP
-+	default "fsp.bin"
-+	help
-+	  The filename of the file to use as Firmware Support Package binary
-+	  in the board directory.
-+
-+config FSP_ADDR
-+	hex "Firmware Support Package binary location"
-+	depends on HAVE_FSP
-+	default 0xfffc0000
-+	help
-+	  FSP is not Position Independent Code (PIC) and the whole FSP has to
-+	  be rebased if it is placed at a location which is different from the
-+	  perferred base address specified during the FSP build. Use Intel's
-+	  Binary Configuration Tool (BCT) to do the rebase.
-+
-+	  The default base address of 0xfffc0000 indicates that the binary must
-+	  be located at offset 0xc0000 from the beginning of a 1MB flash device.
-+
-+config FSP_TEMP_RAM_ADDR
-+	hex
-+	default 0x2000000
-+	help
-+	  Stack top address which is used in FspInit after DRAM is ready and
-+	  CAR is disabled.
-+
-+config HAVE_CMC
-+	bool "Add a Chipset Micro Code state machine binary"
-+	help
-+	  Select this option to add a Chipset Micro Code state machine binary
-+	  to the resulting U-Boot image. It is a 64K data block of machine
-+	  specific code which must be put in the flash for the processor to
-+	  access when powered up before system BIOS is executed.
-+
-+config CMC_FILE
-+	string "Chipset Micro Code state machine filename"
-+	depends on HAVE_CMC
-+	default "cmc.bin"
-+	help
-+	  The filename of the file to use as Chipset Micro Code state machine
-+	  binary in the board directory.
-+
-+config CMC_ADDR
-+	hex "Chipset Micro Code state machine binary location"
-+	depends on HAVE_CMC
-+	default 0xfffb0000
-+	help
-+	  The location of the CMC binary is determined by a strap. It must be
-+	  put in flash at a location matching the strap-determined base address.
-+
-+	  The default base address of 0xfffb0000 indicates that the binary must
-+	  be located at offset 0xb0000 from the beginning of a 1MB flash device.
-+
-+endif
-diff -ruN u-boot-2015.01-rc3/arch/x86/cpu/queensbay/Makefile u-boot/arch/x86/cpu/queensbay/Makefile
---- u-boot-2015.01-rc3/arch/x86/cpu/queensbay/Makefile	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/cpu/queensbay/Makefile	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,9 @@
-+#
-+# Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+#
-+# SPDX-License-Identifier:	GPL-2.0+
-+#
-+
-+obj-y += tnc_car.o tnc_dram.o tnc.o topcliff.o
-+obj-y += fsp_configs.o fsp_support.o
-+obj-$(CONFIG_PCI) += tnc_pci.o
-diff -ruN u-boot-2015.01-rc3/arch/x86/cpu/queensbay/tnc.c u-boot/arch/x86/cpu/queensbay/tnc.c
---- u-boot-2015.01-rc3/arch/x86/cpu/queensbay/tnc.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/cpu/queensbay/tnc.c	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,72 @@
-+/*
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <asm/io.h>
-+#include <asm/pci.h>
-+#include <asm/post.h>
-+#include <asm/arch/tnc.h>
-+#include <asm/arch/fsp/fsp_support.h>
-+#include <asm/processor.h>
-+
-+static void unprotect_spi_flash(void)
-+{
-+	u32 bc;
-+
-+	bc = pci_read_config32(PCH_LPC_DEV, 0xd8);
-+	bc |= 0x1;	/* unprotect the flash */
-+	pci_write_config32(PCH_LPC_DEV, 0xd8, bc);
-+}
-+
-+int arch_cpu_init(void)
-+{
-+	struct pci_controller *hose;
-+	int ret;
-+
-+	post_code(POST_CPU_INIT);
-+#ifdef CONFIG_SYS_X86_TSC_TIMER
-+	timer_set_base(rdtsc());
-+#endif
-+
-+	ret = x86_cpu_init_f();
-+	if (ret)
-+		return ret;
-+
-+	ret = pci_early_init_hose(&hose);
-+	if (ret)
-+		return ret;
-+
-+	unprotect_spi_flash();
-+
-+	return 0;
-+}
-+
-+int print_cpuinfo(void)
-+{
-+	post_code(POST_CPU_INFO);
-+	return default_print_cpuinfo();
-+}
-+
-+void reset_cpu(ulong addr)
-+{
-+	/* cold reset */
-+	outb(0x06, PORT_RESET);
-+}
-+
-+void board_final_cleanup(void)
-+{
-+	u32 status;
-+
-+	/* call into FspNotify */
-+	debug("Calling into FSP (notify phase INIT_PHASE_BOOT): ");
-+	status = fsp_notify(NULL, INIT_PHASE_BOOT);
-+	if (status != FSP_SUCCESS)
-+		debug("fail, error code %x\n", status);
-+	else
-+		debug("OK\n");
-+
-+	return;
-+}
-diff -ruN u-boot-2015.01-rc3/arch/x86/cpu/queensbay/tnc_car.S u-boot/arch/x86/cpu/queensbay/tnc_car.S
---- u-boot-2015.01-rc3/arch/x86/cpu/queensbay/tnc_car.S	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/cpu/queensbay/tnc_car.S	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,124 @@
-+/*
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <config.h>
-+#include <asm/post.h>
-+
-+.globl car_init
-+car_init:
-+	/*
-+	 * Note: ebp holds the BIST value (built-in self test) so far, but ebp
-+	 * will be destroyed through the FSP call, thus we have to test the
-+	 * BIST value here before we call into FSP.
-+	 */
-+	test	%ebp, %ebp
-+	jz	car_init_start
-+	post_code(POST_BIST_FAILURE)
-+	jmp	die
-+
-+car_init_start:
-+	post_code(POST_CAR_START)
-+	lea	find_fsp_header_romstack, %esp
-+	jmp	find_fsp_header
-+
-+find_fsp_header_ret:
-+	/* EAX points to FSP_INFO_HEADER */
-+	mov	%eax, %ebp
-+
-+	/* sanity test */
-+	cmp	$CONFIG_FSP_ADDR, %eax
-+	jb	die
-+
-+	/* calculate TempRamInitEntry address */
-+	mov	0x30(%ebp), %eax
-+	add	0x1c(%ebp), %eax
-+
-+	/* call FSP TempRamInitEntry to setup temporary stack */
-+	lea	temp_ram_init_romstack, %esp
-+	jmp	*%eax
-+
-+temp_ram_init_ret:
-+	addl	$4, %esp
-+	cmp	$0, %eax
-+	jnz	car_init_fail
-+
-+	post_code(POST_CAR_CPU_CACHE)
-+
-+	/*
-+	 * The FSP TempRamInit initializes the ecx and edx registers to
-+	 * point to a temporary but writable memory range (Cache-As-RAM).
-+	 * ecx: the start of this temporary memory range,
-+	 * edx: the end of this range.
-+	 */
-+
-+	/* stack grows down from top of CAR */
-+	movl	%edx, %esp
-+
-+	/*
-+	 * TODO:
-+	 *
-+	 * According to FSP architecture spec, the fsp_init() will not return
-+	 * to its caller, instead it requires the bootloader to provide a
-+	 * so-called continuation function to pass into the FSP as a parameter
-+	 * of fsp_init, and fsp_init() will call that continuation function
-+	 * directly.
-+	 *
-+	 * The call to fsp_init() may need to be moved out of the car_init()
-+	 * to cpu_init_f() with the help of some inline assembly codes.
-+	 * Note there is another issue that fsp_init() will setup another stack
-+	 * using the fsp_init parameter stack_top after DRAM is initialized,
-+	 * which means any data on the previous stack (on the CAR) gets lost
-+	 * (ie: U-Boot global_data). FSP is supposed to support such scenario,
-+	 * however it does not work. This should be revisited in the future.
-+	 */
-+	movl	$CONFIG_FSP_TEMP_RAM_ADDR, %eax
-+	xorl	%edx, %edx
-+	xorl	%ecx, %ecx
-+	call	fsp_init
-+
-+.global fsp_init_done
-+fsp_init_done:
-+	/*
-+	 * We come here from FspInit with eax pointing to the HOB list.
-+	 * Save eax to esi temporarily.
-+	 */
-+	movl	%eax, %esi
-+	/*
-+	 * Re-initialize the ebp (BIST) to zero, as we already reach here
-+	 * which means we passed BIST testing before.
-+	 */
-+	xorl	%ebp, %ebp
-+	jmp	car_init_ret
-+
-+car_init_fail:
-+	post_code(POST_CAR_FAILURE)
-+
-+die:
-+	hlt
-+	jmp	die
-+	hlt
-+
-+	/*
-+	 * The function call before CAR initialization is tricky. It cannot
-+	 * be called using the 'call' instruction but only the 'jmp' with
-+	 * the help of a handcrafted stack in the ROM. The stack needs to
-+	 * contain the function return address as well as the parameters.
-+	 */
-+	.balign	4
-+find_fsp_header_romstack:
-+	.long	find_fsp_header_ret
-+
-+	.balign	4
-+temp_ram_init_romstack:
-+	.long	temp_ram_init_ret
-+	.long	temp_ram_init_params
-+temp_ram_init_params:
-+_dt_ucode_base_size:
-+	/* These next two fields are filled in by ifdtool */
-+	.long	0			/* microcode base */
-+	.long	0			/* microcode size */
-+	.long	CONFIG_SYS_MONITOR_BASE	/* code region base */
-+	.long	CONFIG_SYS_MONITOR_LEN	/* code region size */
-diff -ruN u-boot-2015.01-rc3/arch/x86/cpu/queensbay/tnc_dram.c u-boot/arch/x86/cpu/queensbay/tnc_dram.c
---- u-boot-2015.01-rc3/arch/x86/cpu/queensbay/tnc_dram.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/cpu/queensbay/tnc_dram.c	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,78 @@
-+/*
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <asm/arch/fsp/fsp_support.h>
-+#include <asm/e820.h>
-+#include <asm/post.h>
-+
-+DECLARE_GLOBAL_DATA_PTR;
-+
-+int dram_init(void)
-+{
-+	phys_size_t ram_size = 0;
-+	union hob_pointers hob;
-+
-+	hob.raw = gd->arch.hob_list;
-+	while (!end_of_hob(hob)) {
-+		if (get_hob_type(hob) == HOB_TYPE_RES_DESC) {
-+			if (hob.res_desc->type == RES_SYS_MEM ||
-+			    hob.res_desc->type == RES_MEM_RESERVED) {
-+				ram_size += hob.res_desc->len;
-+			}
-+		}
-+		hob.raw = get_next_hob(hob);
-+	}
-+
-+	gd->ram_size = ram_size;
-+	post_code(POST_DRAM);
-+
-+	return 0;
-+}
-+
-+void dram_init_banksize(void)
-+{
-+	gd->bd->bi_dram[0].start = 0;
-+	gd->bd->bi_dram[0].size = gd->ram_size;
-+}
-+
-+/*
-+ * This function looks for the highest region of memory lower than 4GB which
-+ * has enough space for U-Boot where U-Boot is aligned on a page boundary.
-+ * It overrides the default implementation found elsewhere which simply
-+ * picks the end of ram, wherever that may be. The location of the stack,
-+ * the relocation address, and how far U-Boot is moved by relocation are
-+ * set in the global data structure.
-+ */
-+ulong board_get_usable_ram_top(ulong total_size)
-+{
-+	return fsp_get_usable_lowmem_top(gd->arch.hob_list);
-+}
-+
-+unsigned install_e820_map(unsigned max_entries, struct e820entry *entries)
-+{
-+	unsigned num_entries = 0;
-+
-+	union hob_pointers hob;
-+
-+	hob.raw = gd->arch.hob_list;
-+
-+	while (!end_of_hob(hob)) {
-+		if (get_hob_type(hob) == HOB_TYPE_RES_DESC) {
-+			entries[num_entries].addr = hob.res_desc->phys_start;
-+			entries[num_entries].size = hob.res_desc->len;
-+
-+			if (hob.res_desc->type == RES_SYS_MEM)
-+				entries[num_entries].type = E820_RAM;
-+			else if (hob.res_desc->type == RES_MEM_RESERVED)
-+				entries[num_entries].type = E820_RESERVED;
-+		}
-+		hob.raw = get_next_hob(hob);
-+		num_entries++;
-+	}
-+
-+	return num_entries;
-+}
-diff -ruN u-boot-2015.01-rc3/arch/x86/cpu/queensbay/tnc_pci.c u-boot/arch/x86/cpu/queensbay/tnc_pci.c
---- u-boot-2015.01-rc3/arch/x86/cpu/queensbay/tnc_pci.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/cpu/queensbay/tnc_pci.c	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,61 @@
-+/*
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <pci.h>
-+#include <asm/pci.h>
-+#include <asm/arch/fsp/fsp_support.h>
-+
-+DECLARE_GLOBAL_DATA_PTR;
-+
-+void board_pci_setup_hose(struct pci_controller *hose)
-+{
-+	hose->first_busno = 0;
-+	hose->last_busno = 0;
-+
-+	/* PCI memory space */
-+	pci_set_region(hose->regions + 0,
-+		       CONFIG_PCI_MEM_BUS,
-+		       CONFIG_PCI_MEM_PHYS,
-+		       CONFIG_PCI_MEM_SIZE,
-+		       PCI_REGION_MEM);
-+
-+	/* PCI IO space */
-+	pci_set_region(hose->regions + 1,
-+		       CONFIG_PCI_IO_BUS,
-+		       CONFIG_PCI_IO_PHYS,
-+		       CONFIG_PCI_IO_SIZE,
-+		       PCI_REGION_IO);
-+
-+	pci_set_region(hose->regions + 2,
-+		       CONFIG_PCI_PREF_BUS,
-+		       CONFIG_PCI_PREF_PHYS,
-+		       CONFIG_PCI_PREF_SIZE,
-+		       PCI_REGION_PREFETCH);
-+
-+	pci_set_region(hose->regions + 3,
-+		       0,
-+		       0,
-+		       gd->ram_size,
-+		       PCI_REGION_MEM | PCI_REGION_SYS_MEMORY);
-+
-+	hose->region_count = 4;
-+}
-+
-+int board_pci_post_scan(struct pci_controller *hose)
-+{
-+	u32 status;
-+
-+	/* call into FspNotify */
-+	debug("Calling into FSP (notify phase INIT_PHASE_PCI): ");
-+	status = fsp_notify(NULL, INIT_PHASE_PCI);
-+	if (status != FSP_SUCCESS)
-+		debug("fail, error code %x\n", status);
-+	else
-+		debug("OK\n");
-+
-+	return 0;
-+}
-diff -ruN u-boot-2015.01-rc3/arch/x86/cpu/queensbay/topcliff.c u-boot/arch/x86/cpu/queensbay/topcliff.c
---- u-boot-2015.01-rc3/arch/x86/cpu/queensbay/topcliff.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/cpu/queensbay/topcliff.c	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,47 @@
-+/*
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <errno.h>
-+#include <malloc.h>
-+#include <pci.h>
-+#include <pci_ids.h>
-+#include <sdhci.h>
-+
-+static struct pci_device_id mmc_supported[] = {
-+	{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TCF_SDIO_0 },
-+	{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TCF_SDIO_1 },
-+	{ }
-+};
-+
-+int cpu_mmc_init(bd_t *bis)
-+{
-+	struct sdhci_host *mmc_host;
-+	pci_dev_t devbusfn;
-+	u32 iobase;
-+	int ret;
-+	int i;
-+
-+	for (i = 0; i < ARRAY_SIZE(mmc_supported); i++) {
-+		devbusfn =  pci_find_devices(mmc_supported, i);
-+		if (devbusfn == -1)
-+			return -ENODEV;
-+
-+		mmc_host = (struct sdhci_host *)malloc(sizeof(struct sdhci_host));
-+		if (!mmc_host)
-+			return -ENOMEM;
-+
-+		mmc_host->name = "Topcliff SDHCI";
-+		pci_read_config_dword(devbusfn, PCI_BASE_ADDRESS_0, &iobase);
-+		mmc_host->ioaddr = (void *)iobase;
-+		mmc_host->quirks = 0;
-+		ret = add_sdhci(mmc_host, 0, 0);
-+		if (ret)
-+			return ret;
-+	}
-+
-+	return 0;
-+}
-diff -ruN u-boot-2015.01-rc3/arch/x86/cpu/start.S u-boot/arch/x86/cpu/start.S
---- u-boot-2015.01-rc3/arch/x86/cpu/start.S	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/cpu/start.S	2015-01-01 17:34:32.253503252 +0100
-@@ -1,5 +1,5 @@
- /*
-- *  U-boot - x86 Startup Code
-+ *  U-Boot - x86 Startup Code
-  *
-  * (C) Copyright 2008-2011
-  * Graeme Russ, <graeme.russ at gmail.com>
-@@ -17,6 +17,7 @@
- #include <asm/processor.h>
- #include <asm/processor-flags.h>
- #include <generated/generic-asm-offsets.h>
-+#include <generated/asm-offsets.h>
- 
- .section .text
- .code32
-@@ -74,6 +75,7 @@
- 	jmp	car_init
- .globl car_init_ret
- car_init_ret:
-+#ifndef CONFIG_HAVE_FSP
- 	/*
- 	 * We now have CONFIG_SYS_CAR_SIZE bytes of Cache-As-RAM (or SRAM,
- 	 * or fully initialised SDRAM - we really don't care which)
-@@ -94,6 +96,12 @@
- #ifdef CONFIG_DCACHE_RAM_MRC_VAR_SIZE
- 	subl	$CONFIG_DCACHE_RAM_MRC_VAR_SIZE, %esp
- #endif
-+#else
-+	/*
-+	 * When we get here after car_init, esp points to a temporary stack
-+	 * and esi holds the HOB list address returned by the FSP.
-+	 */
-+#endif
- 
- 	/* Reserve space on stack for global data */
- 	subl	$GENERATED_GBL_DATA_SIZE, %esp
-@@ -108,6 +116,13 @@
- 	movl	%esp, %edi
- 	rep	stosb
- 
-+#ifdef CONFIG_HAVE_FSP
-+	/* Store HOB list */
-+	movl	%esp, %edx
-+	addl	$GD_HOB_LIST, %edx
-+	movl	%esi, (%edx)
-+#endif
-+
- 	/* Setup first parameter to setup_gdt, pointer to global_data */
- 	movl	%esp, %eax
- 
-diff -ruN u-boot-2015.01-rc3/arch/x86/dts/chromebook_link.dts u-boot/arch/x86/dts/chromebook_link.dts
---- u-boot-2015.01-rc3/arch/x86/dts/chromebook_link.dts	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/dts/chromebook_link.dts	2015-01-01 17:34:32.253503252 +0100
-@@ -214,10 +214,10 @@
- 
- 	microcode {
- 		update at 0 {
--#include "m12206a7_00000028.dtsi"
-+#include "microcode/m12206a7_00000029.dtsi"
- 		};
- 		update at 1 {
--#include "m12306a9_00000017.dtsi"
-+#include "microcode/m12306a9_0000001b.dtsi"
- 		};
- 	};
- 
-diff -ruN u-boot-2015.01-rc3/arch/x86/dts/coreboot.dtsi u-boot/arch/x86/dts/coreboot.dtsi
---- u-boot-2015.01-rc3/arch/x86/dts/coreboot.dtsi	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/dts/coreboot.dtsi	2015-01-01 17:34:32.253503252 +0100
-@@ -6,7 +6,7 @@
- 	};
- 
- 	serial {
--		compatible = "coreboot-uart";
-+		compatible = "x86-uart";
- 		reg = <0x3f8 0x10>;
- 		reg-shift = <0>;
- 		io-mapped = <1>;
-diff -ruN u-boot-2015.01-rc3/arch/x86/dts/crownbay.dts u-boot/arch/x86/dts/crownbay.dts
---- u-boot-2015.01-rc3/arch/x86/dts/crownbay.dts	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/dts/crownbay.dts	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,60 @@
-+/*
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+/dts-v1/;
-+
-+/include/ "coreboot.dtsi"
-+
-+/ {
-+	#address-cells = <1>;
-+	#size-cells = <1>;
-+	model = "Intel Crown Bay";
-+	compatible = "intel,crownbay", "intel,queensbay";
-+
-+	config {
-+		silent_console = <0>;
-+	};
-+
-+	gpioa {
-+		compatible = "intel,ich6-gpio";
-+		u-boot,dm-pre-reloc;
-+		reg = <0 0x20>;
-+		bank-name = "A";
-+	};
-+
-+	gpiob {
-+		compatible = "intel,ich6-gpio";
-+		u-boot,dm-pre-reloc;
-+		reg = <0x20 0x20>;
-+		bank-name = "B";
-+	};
-+
-+	serial {
-+		reg = <0x3f8 8>;
-+		clock-frequency = <115200>;
-+	};
-+
-+	chosen { };
-+	memory { device_type = "memory"; reg = <0 0>; };
-+
-+	spi {
-+		#address-cells = <1>;
-+		#size-cells = <0>;
-+		compatible = "intel,ich7";
-+		spi-flash at 0 {
-+			reg = <0>;
-+			compatible = "sst,25vf016b", "spi-flash";
-+			memory-map = <0xffe00000 0x00200000>;
-+		};
-+	};
-+
-+	microcode {
-+		update at 0 {
-+#include "microcode/m0220661105_cv.dtsi"
-+		};
-+	};
-+
-+};
-diff -ruN u-boot-2015.01-rc3/arch/x86/dts/include/dt-bindings/pinctrl/pinctrl-tegra.h u-boot/arch/x86/dts/include/dt-bindings/pinctrl/pinctrl-tegra.h
-diff -ruN u-boot-2015.01-rc3/arch/x86/dts/include/dt-bindings/reset/altr,rst-mgr.h u-boot/arch/x86/dts/include/dt-bindings/reset/altr,rst-mgr.h
-diff -ruN u-boot-2015.01-rc3/arch/x86/dts/link.dts u-boot/arch/x86/dts/link.dts
---- u-boot-2015.01-rc3/arch/x86/dts/link.dts	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/dts/link.dts	2015-01-01 17:34:32.253503252 +0100
-@@ -214,10 +214,10 @@
- 
- 	microcode {
- 		update at 0 {
--#include "m12206a7_00000028.dtsi"
-+#include "microcode/m12206a7_00000029.dtsi"
- 		};
- 		update at 1 {
--#include "m12306a9_00000017.dtsi"
-+#include "microcode/m12306a9_0000001b.dtsi"
- 		};
- 	};
- 
-diff -ruN u-boot-2015.01-rc3/arch/x86/dts/m12206a7_00000028.dtsi u-boot/arch/x86/dts/m12206a7_00000028.dtsi
---- u-boot-2015.01-rc3/arch/x86/dts/m12206a7_00000028.dtsi	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/dts/m12206a7_00000028.dtsi	1970-01-01 01:00:00.000000000 +0100
-@@ -1,622 +0,0 @@
--/*
-- * Copyright (c) <1995-2013>, Intel Corporation.
-- * All rights reserved.
-- *
-- * Redistribution. Redistribution and use in binary form, without modification, are
-- * permitted provided that the following conditions are met:
-- *	.Redistributions must reproduce the above copyright notice and the following
-- * disclaimer in the documentation and/or other materials provided with the
-- * distribution.
-- * Neither the name of Intel Corporation nor the names of its suppliers may be used
-- * to endorse or promote products derived from this software without specific prior
-- * written permission.
-- *	.No reverse engineering, decompilation, or disassembly of this software is
-- * permitted.
-- *	."Binary form" includes any format commonly used for electronic conveyance
-- * which is a reversible, bit-exact translation of binary representation to ASCII or
-- * ISO text, for example, "uuencode."
-- *
-- * DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
-- * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
-- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-- * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- *
-- *---
-- * This is a device tree fragment. Use #include to add these properties to a
-- * node.
-- */
--
--compatible = "intel,microcode";
--intel,header-version = <1>;
--intel,update-revision = <0x28>;
--intel,date-code = <0x04242012>;
--intel,processor-signature = <0x000206a7>;
--intel,checksum = <0xf3e9935d>;
--intel,loader-revision = <1>;
--intel,processor-flags = <0x12>;
--
--/* The 48-byte public header is omitted. */
--data = <
--	0x00000000	0x000000a1	0x00020001	0x00000028
--	0x00000000	0x00000000	0x20120423	0x000008f1
--	0x00000001	0x000206a7	0x00000000	0x00000000
--	0x00000000	0x00000000	0x00000000	0x00000000
--	0x00000000	0x000008f1	0x00000000	0x00000000
--	0x00000000	0x00000000	0x00000000	0x00000000
--	0x52b813ac	0xdb8994c7	0x70e9f6bb	0x9d6db2ff
--	0xf4d70f5d	0x5b1eccf6	0xac59106f	0x0ae2e2c1
--	0x1a7bbeb1	0x355a1d62	0x2e7eb594	0x09f8dea9
--	0x432a49e4	0xbf520253	0xdafa4010	0x893a858a
--	0x766e0efb	0xd91e196d	0x838bd2ef	0xe5146494
--	0xd515f413	0x29704828	0xe85598b6	0xdcbe6c51
--	0x88eabbfa	0xa1e8909f	0xd8931721	0x35386554
--	0x089a78a7	0xd9914775	0xd4644748	0x1556a4dc
--	0xf44448f6	0xd054d7db	0xf30f2b7d	0x5ae223d0
--	0xcbbb48b0	0x5c8b0383	0x177de157	0x9c1e5f73
--	0x2ec28289	0xd72a7b6c	0x823b6eb2	0x35e02171
--	0xba8deae4	0x06f4d468	0x13dbafaa	0x72b419f1
--	0x033385b5	0x05806920	0x4c6034cf	0x9bd117dc
--	0x976e2d04	0x250330f0	0x7250b5e1	0x184980c2
--	0x12a9d7d6	0x1bc808f9	0xae79994f	0xc6f87901
--	0xc0e3132f	0x671491c5	0x236cad39	0x37889d9c
--	0x67f7c3f3	0x964a6be5	0xbcced7da	0x57eeaa6e
--	0x7bca1522	0x654fee4c	0x2a1ca5d9	0xa1803cf3
--	0x00000011	0x8c316d2c	0x17603b7e	0x32e42981
--	0xc26c1400	0xf0fbccb6	0xeab6b43a	0x11d456a5
--	0x5b912d46	0x15195fe0	0x542f6db3	0x0b7f212e
--	0x47718dd9	0x7c41b108	0x06c21111	0x4445d5ea
--	0xb4fb8128	0xe07404a6	0x8d503da4	0x78fc7e44
--	0xb9919656	0x9968c797	0x87f26ab0	0x23bb1af7
--	0x1ec5d761	0x26f30d2c	0x7cdb747c	0xe4d42033
--	0x8a5d4801	0x768aff57	0xbcfd5d11	0x7c853c2d
--	0x231e6207	0x8b1988a6	0xd68fdb75	0x58dcb417
--	0x44422ef9	0x2a186ebb	0x7d27e85f	0x36ac31f7
--	0x1e487e77	0x2b0b8c37	0xd8ba682f	0x2cba791b
--	0xe6d3dece	0x1b2c2a99	0x4e5decab	0xfbd313a3
--	0xdbc78294	0x5a80cce7	0x2d8e0f0b	0xcf564f71
--	0x073d1f37	0x25162870	0x96cdb85b	0x9c553048
--	0x24eba740	0xfc0f352e	0x0c83be68	0x89b5076c
--	0xc39c4355	0x6a4cf25c	0x2bbd2682	0xc524fdb9
--	0x7ea19bae	0x191ad6f1	0xd3fbf3bf	0x21bf77fa
--	0x8f77fec4	0x0f90f635	0xe55e165c	0x868d58c0
--	0x966bc0ad	0x6c276364	0x9d8f7eff	0x4b7925d4
--	0x8b2f9326	0x4ab7b47e	0x33a9087c	0xf31ab949
--	0x69831dfb	0x4711a215	0x8128c1fa	0x8481c213
--	0x7401b01b	0xfdcfdc50	0xd6b55266	0xae9b23ac
--	0xfa2ad275	0xa225bb45	0x4dd720c4	0x760a20e6
--	0x5f1223c9	0x2f334372	0x6e1dcdab	0xe8ee8638
--	0x1c19ba8a	0xef9341c4	0x360aaa9d	0x90452ea9
--	0x65852446	0xe9398fa3	0xbba6a631	0x1a3e90b9
--	0xe2a73a56	0x6e8c0747	0x35c7c53d	0xcc1ac842
--	0x183356af	0xb6e98608	0x987b43c2	0xa8a3cfd2
--	0xc2c5fce0	0xcc3af64a	0xd6d3a291	0xe59ad1f5
--	0x124ca513	0x9522b50a	0x25150477	0xa2eb5797
--	0x7fc63626	0x648c48e3	0x9f5797ff	0x2307b84d
--	0x980625a4	0xabc05983	0x24980807	0x773c4f99
--	0x3407b872	0x07c3657a	0xa2cd9e48	0x49c1e6a8
--	0xa881b84c	0xf804d72c	0xb5319d2a	0x3e39780f
--	0x97518822	0x0acd54c2	0x0721a9ff	0x10e1d2fd
--	0xa7b6db77	0x845b1a56	0xef00160e	0x6b41bfd5
--	0xc994df0d	0xcf44a5ca	0x794b36a4	0xf9fdb127
--	0x922a1366	0x822aa8a9	0x4b137bd5	0x5722a49f
--	0x8933719a	0x17edc1a9	0x079d9538	0x21fae7d5
--	0xe534fd73	0x9d3038d5	0x48c3a056	0x5b22d58a
--	0x6f142866	0xf1d767cd	0xb51ad5a6	0x34a0ef85
--	0x0111703e	0xca4b3a30	0xa0f3c34d	0x9d48775a
--	0x3f2059f9	0xf2fe2c36	0x588861a9	0xed5bd9fe
--	0x8231f7cb	0x8c115969	0x3f82ba00	0x21b3730c
--	0xba757997	0x3ec0bb2c	0x16f11def	0x5d4356c6
--	0xdc2e0bc2	0x58c1eb6e	0x313ede0c	0xb68fcc52
--	0x84d3e1b5	0xcc6d9201	0x95046196	0x276b527b
--	0x80a4a729	0xe782916d	0x5cf09e0b	0x98aaf9fa
--	0x1de6dd43	0xab4f1962	0x49ece734	0x81455488
--	0xc2597b61	0x5b22af85	0x646f7b94	0x09213a1f
--	0x08edf7e4	0x963d343c	0x059ba888	0xb4e804ed
--	0xe7cc826c	0xf87bafc7	0xeecaec10	0x8e60919c
--	0xbf14c996	0xd3dcaee3	0xb8fa0b7e	0x81563c6e
--	0x7f59a258	0x2f344446	0x374d8aa6	0x9b6de5c9
--	0xbf992857	0xbc5b94fc	0x28adb080	0x17e41044
--	0xb87b469e	0xda504d12	0xf21bef8b	0xce75c1e3
--	0xdbd92c83	0x58bba0af	0x77b42977	0x506cfd75
--	0x1139e875	0x6ce5fe43	0xc6a5d7b3	0x87f9e628
--	0x7b5c500b	0x130066b3	0x789b611f	0xec8c1ba9
--	0xb7e6872d	0xaf828cd6	0xc28d3316	0x2a91f6d0
--	0xc725f063	0x065ac531	0x4f9ef4b8	0x2b9d927e
--	0xaf54f3f9	0x7c924f72	0xda1d77ad	0xff00db67
--	0xaf4f03c0	0xb4f4ee64	0x169e64e5	0x04653ac0
--	0xed51cb70	0xfeaff0e5	0x51dbf346	0x072a2407
--	0x23fb74f4	0x9a906eef	0x5d6fc3f0	0xbc3c374c
--	0x1cf9f063	0x919015d9	0x5b3e9d07	0xd6209d8b
--	0xa3710b3d	0x90ad23b8	0x420ceedc	0x58e8371f
--	0x5d419d1f	0xb8acd13f	0x7d100d6d	0x210c10d1
--	0xcd0a697e	0x5023db4b	0x33e6d8e7	0x44bbe6b4
--	0x827e859f	0x6ca4cc81	0x661bb2c3	0x71209ee8
--	0xb8c3ffaf	0xd1075f51	0xba1eae10	0x728b0a6a
--	0xe4af7a2f	0xca9bcf2e	0xb249a631	0xdce6be47
--	0x5c910321	0x425c3c27	0x33083e43	0xdea067ae
--	0xea594a23	0x41b75c2c	0x3a401a95	0xd33cd88a
--	0xc295cad0	0x67f48045	0x1dc9ad4c	0x4bc48864
--	0x53991b6e	0x7aadde5f	0x2b0bf775	0x06ba5380
--	0x9eb874be	0x2c4b967a	0x1bcc342f	0xe875001b
--	0x15b5642d	0x5be99c9d	0xcb210ace	0x1b4924ad
--	0x3793ed81	0x8b983114	0x3ec33981	0x75ec71e7
--	0x8b5b7df3	0x834756f4	0x100fad01	0x70037fdf
--	0x0cef9a36	0x3d9e3a2d	0x38b48efd	0xfc4034b6
--	0xa32e29dd	0x388944bc	0xc1c15614	0x3877e9c7
--	0xa5e733fa	0xa621bd53	0x4b651df6	0xce082970
--	0x85f30d6f	0x729a5c87	0x31dd7ba9	0xdb495828
--	0x7b12c698	0x953495c9	0x6b5f99e7	0x2cc42fa8
--	0x697ac512	0x1be679de	0xc116d305	0x94a36606
--	0x9e5e141e	0x874affed	0x58d40b0b	0x5e3cf5e5
--	0x5d05e9a9	0x06840efc	0xd2f98b21	0xa1e83ab2
--	0x4f726202	0xa6394535	0x62a02403	0x9f2167ec
--	0x4f9fc77b	0x98073be4	0x2bc781fa	0xfc8e4c89
--	0xc7179b97	0x692cf793	0x708ff7bb	0x12ecba93
--	0xacd06e21	0x202bef76	0x03852241	0xe84e02a1
--	0xf1f9ac8d	0xcee61aef	0x61a4f235	0xd22991eb
--	0x67a81345	0x375a15c6	0xe8fae8a3	0xb4ff2b37
--	0x339ee4ea	0x14ffadc3	0xf49340dd	0xf285e568
--	0x00fc6970	0x369c52d1	0x4f55368f	0x3f4d75f1
--	0x6a73b603	0x963c1f59	0x171e2bdc	0x72bac76b
--	0x9e2e5c32	0x307f7c3f	0xd3b48637	0x3a917acf
--	0xea52a65f	0xecd209fb	0xf0ad84bf	0xd4bdea70
--	0xa2647b38	0xce040b49	0xc6d5f13d	0x5d942c52
--	0xf8edc042	0x798fdefd	0x4b074246	0x1cb1873a
--	0x6793c186	0x23b9c774	0x77bb0202	0xc519b3aa
--	0xa30c09a2	0xe1f6669a	0xb7eddb8d	0x7aaa91d6
--	0x076a3789	0x0ac47791	0x1e503404	0x44fe8c54
--	0xf3cbbf49	0xd3234eef	0x0d898b3f	0xe854984b
--	0xe3986de9	0x923a5c76	0x2ee9abca	0x1a9fedbe
--	0xdf76dcd1	0xea07936b	0xcdaaf247	0xe62d98fa
--	0xa99c7f7b	0x34fc84d4	0x03a35111	0xad5675c8
--	0xcc64075b	0x408203f9	0x846e1f08	0xe934019e
--	0x423d1223	0x2f04f9e3	0xee1dbf40	0x65edc60f
--	0x097aa22f	0x7058a2b7	0x41c8a0a5	0xa68aa391
--	0x0f345c40	0x667517e6	0x860838ba	0x6dae933b
--	0x764d5919	0x6673fa0f	0xf0a5e97d	0x4262ebbe
--	0x64b413f2	0xd2c4145a	0x0b2c11f3	0xfdfe9f93
--	0x96c77107	0x1399fdda	0xf599f215	0xb504da5d
--	0xf8a95268	0x9ed1ef87	0x9ae33cfb	0x3b21f1ef
--	0xc6d447c2	0xe0694d4e	0x967febab	0xc13f631d
--	0x8393bfba	0x37438788	0x1724194d	0x8e77a045
--	0x20e2483c	0xb961c2fc	0x485cf593	0xb3462621
--	0xcb2959b8	0x10307e19	0xf71fbbfd	0xdda641e1
--	0x0daf5f66	0x56d85178	0x145f6749	0xebc46ed1
--	0x5593c249	0x94561f51	0x534cc654	0xca7c8814
--	0xb59a578c	0x40b2b614	0xeaf3437a	0x198d5b4e
--	0xf245fa53	0xfb75e0b0	0xa363c46d	0xc43b5468
--	0xdf036413	0xc59f5a36	0xd8ff4381	0xa3af3e36
--	0x7af63462	0x414526d7	0x7bdc41c5	0xa416f1e7
--	0x6987d9ad	0x472c5499	0x4f10ee37	0x47bb7ff7
--	0xc7f2e621	0x820008f7	0x33a475db	0x91ff5d72
--	0x0517401c	0x73d067c8	0xe417b69d	0xb86d9903
--	0x1ac9a032	0x74bbf582	0x8b65596e	0x883be34c
--	0x95dcc26f	0xe232c646	0xfae9c19f	0x35cb5273
--	0x6a94d095	0xfff6ca91	0xb9c40eb5	0xd351dcac
--	0xc90d464f	0x9b609642	0x15663b56	0x15f7f88d
--	0x22499f60	0x417fd6c5	0x2dc36fe2	0x712bf66a
--	0x22f1fba8	0x531b8092	0x40d269b6	0x1d227898
--	0xeb6ff35b	0x2490ac31	0xc958ed65	0x3ce6ffb7
--	0x9338a806	0x3beadfe2	0x1c361ac9	0x53d0e3b0
--	0x91d46102	0x4d57045f	0xb5c8afb3	0xfd2c9e7d
--	0x3d578410	0x2adb9406	0x10df7459	0x90abccfb
--	0xe3f217ed	0xef5f4e09	0x74925ce4	0x169b5879
--	0xfeff4ad5	0xb300dd1d	0xc96022ba	0x72da501b
--	0x1e694296	0x9efa33cb	0x0dc3ee6c	0x0ac4e7ea
--	0x73041130	0xf0e6a295	0xc46bdb6a	0x6a927044
--	0xd217ceca	0x0b744007	0xd5a2bafb	0x4220cd92
--	0x70d3352a	0x5ee4f661	0xfa07e5c0	0x155542d9
--	0x4a39fba0	0xcec0552d	0x30c1d8ef	0xbef9d21e
--	0x183879aa	0x5b3f30a8	0x54a06db4	0xef876e4e
--	0x5e823680	0x53e2a353	0xc9aa4112	0x13a56ee5
--	0x848859fd	0x0ba2b801	0xec15260f	0x7bb22672
--	0x1a097332	0xb141339f	0x752a67d9	0xdae373f3
--	0x3c8cfd49	0x2dfaf2a9	0x95820c6c	0x956b39a2
--	0x1ca0d24e	0x1312b978	0x7280e1bd	0xa7a7c2ff
--	0x0b48e987	0xb6083e55	0x4b4b82f4	0x9c6104ad
--	0xcb93beca	0xe1c34035	0x34de740d	0xbb151baa
--	0x71f5942f	0x1eaac228	0x0c68331b	0x3d2a1dd0
--	0xe7a3d41a	0x7253acae	0xfd4de230	0x79988d80
--	0x4468f19b	0xac4440fd	0x6e8a6ef3	0x5736adf8
--	0xded67716	0x1f1d5a4b	0x96c5f451	0x85bae181
--	0x1293ab28	0xc2ba53c2	0x729ff4cf	0x60218df8
--	0xc2870138	0x6127d844	0x89604e9e	0xd2b9ad4e
--	0x4f6ded9f	0xdd263849	0x1633bd92	0x64b03a24
--	0x96dabd4d	0x6e85d235	0x1ab69ad0	0x9aa80454
--	0x6b9041e0	0x106c7e9a	0x8f54812f	0xa274efe4
--	0xe45d6695	0xf3aa7bd3	0x6a5a2a63	0xe36f3525
--	0x6238fa4b	0x7d6cb06f	0x16d3b4a2	0xf3b04822
--	0x638f1a60	0x0e1875fa	0x1c0292b9	0x6b519ea4
--	0x9faba37b	0x209341ec	0x83c9061f	0x3387dfe8
--	0xc7f12ceb	0x2bef45d7	0x8f8acb47	0x35d9741b
--	0x7009f514	0xfd003802	0x6f9489c5	0xe2ea2504
--	0x910e996a	0xcc81d016	0x3280730d	0xdedfef59
--	0x5a7357cc	0x8fe8dd39	0x15543fe5	0x976c4207
--	0xe41cf62b	0x0ba6b4b5	0x5c3b7ced	0xa6c5b72b
--	0x72ad3b4d	0xff143181	0x2b78a157	0x7fe231a5
--	0x6ff0538a	0xe58ed1ac	0x81a311a5	0xefaa54b8
--	0xf04a797e	0xce6e69c7	0xdc810726	0x7bab7be3
--	0xdd5923e8	0x5a2413ed	0x31cef794	0x73dfd806
--	0x1b9223c1	0x0c370882	0x04fa3b68	0x87c50bc1
--	0x1d78c90f	0xf4e2cee6	0xebea941b	0x73e5838f
--	0xca8d39a6	0xe004296b	0x28cf8a0e	0x7c73e7ef
--	0x26a296c2	0x789d4c72	0xd1490265	0xd9a9e843
--	0xf03504c3	0xfae6dffb	0x7a48f00d	0x51e369c8
--	0xcb3eeee6	0x0625e936	0xe93d0d7d	0xfb15ba6b
--	0xec5c76da	0x8fdf44f1	0xa036653a	0x5730c4a3
--	0xe5bfe6dd	0x0b8c091f	0x3b51558c	0x403748f4
--	0xf4007f86	0x952b5db6	0x5524d8ba	0x8046409a
--	0xe3fc61a9	0x66f4ea56	0x5645150b	0xdb2bec15
--	0x50672218	0x7f40e87d	0x2b8359f8	0x438787dc
--	0x7f221597	0xf8b1590c	0x4f468251	0xff586d05
--	0xb9195380	0x0ee09e0b	0x2fa7dbd9	0xd197b327
--	0xa0dbad58	0xb485681f	0x5ef0937c	0x1e07ebb6
--	0xcb49fe3f	0xc2427cd9	0x6c2c5298	0x4a2e171a
--	0xa7f333a8	0xb3609ad6	0x94e374d6	0x0e1eb64d
--	0x22c3367d	0xcdf89975	0x647aceef	0x16727c9c
--	0xf476ae53	0x35a1212e	0x0db768b8	0xfff8b53d
--	0xbd4fe45e	0xab28a5a3	0x59cec0af	0x28bcd1ef
--	0x6f43ad69	0x2658a059	0x27aee0ec	0x4e8bbd15
--	0xa9fdcf04	0xc9aa329f	0x687f010f	0x5c968a07
--	0xb894e607	0x0e1cba22	0x2f00f203	0xe8e133ac
--	0x494a4746	0xe8bdff9a	0xf69791a2	0x64179ce2
--	0xbfd10dc6	0xc026f6d8	0x4871923a	0x8946b277
--	0x609f49a4	0x6466df1b	0xd8c3c131	0x46ef0291
--	0x0fdce8b6	0x2b9aedb7	0x225c4520	0x72b332cf
--	0x4e220d47	0xf2f69c36	0x2c23fad9	0x57a2a918
--	0xe017409c	0x490819af	0xf2121afd	0x951ff7ff
--	0x40363fcf	0x5078b94e	0x9e4be775	0xee97ef16
--	0xdb3a2390	0x17d42af9	0x96f56a51	0x1b4c2934
--	0xc866315c	0x2b746f99	0x9a3b73f6	0xa1e081fc
--	0xa9d07ebd	0xa6359fae	0xdf50d099	0x55304e01
--	0xfe5aaa81	0x1e74267d	0x38b1d2d7	0x8633e9af
--	0x99b013df	0x3aa05831	0x86279736	0xd2b464e0
--	0xdf036a9f	0xe8162915	0x876c0d4f	0x4beb7d0e
--	0xfec9b170	0x46bc9df4	0x46cb88fa	0x0cb5904d
--	0x2e2961cf	0x7ea5dc1a	0x60670df2	0xf935ca32
--	0x67e6777b	0x8bacc97a	0x5cd07248	0x32e483e6
--	0xfdf09b0d	0xca57150b	0x3f432d09	0xdea2d7db
--	0x9f6a2954	0x6f07dff3	0x4133f394	0x60272f97
--	0x1b98c9ec	0x2ab648d9	0xb5df14a8	0x0d2c38f2
--	0x5dfde2c4	0x7cb43ca3	0x8d0c6c01	0xe80ea41e
--	0x5f58b71e	0x4ca9fef2	0xabd201a4	0x50905c08
--	0xca8ba387	0x5592922b	0xfa4e05f5	0xceb64b14
--	0x0845c5bd	0x518d369b	0x727e570c	0x1daaab31
--	0x801e8b9c	0xec6568f3	0xd4c3760f	0x40a78d22
--	0x38af58b5	0xc406a76e	0x8c3a7779	0x18272c42
--	0x45cf7b70	0xa6f3c0f3	0x88021e41	0xda662504
--	0xe97aa709	0xe93bafe0	0x8862ed5f	0x35bc8268
--	0xf5a41551	0x3dd3bb21	0x1af0cf11	0x08fe1ad7
--	0x53ecae41	0x01a4a8ae	0xfed636b7	0xf09323e6
--	0x73b9b253	0x7ebd7ce2	0x7074b4de	0x21c719b2
--	0x50982743	0xd23cfd27	0x136a1f4a	0x23260f6e
--	0xfad89dcd	0x57586681	0xadc4fba5	0xad0f71b8
--	0x91a3f188	0x20d62385	0xfecda9cb	0x33d67776
--	0x2abb0e6c	0x0ad16087	0x486332da	0x2928d342
--	0xf6d1b174	0x5e133a4e	0x72fc0ad4	0x940578b8
--	0x320a42b1	0x9cbda7d4	0xf2a36135	0x00ab8de3
--	0x5bad9000	0x5778e633	0x3952763d	0xe0e58583
--	0xdfb0bf19	0xb11914b6	0xa67da7a1	0x8d9a9f81
--	0x638cbcf7	0x83bf931d	0x8703b0dd	0xcab30fa4
--	0xd6db2ee6	0x5cc2e5ac	0x717e636b	0xfdcbc760
--	0x563b3b25	0x0e4df458	0x9efb8fa7	0x95aaa7a1
--	0xf05b6680	0x5e237e59	0xc884018a	0x177b5a30
--	0x3ea2c9bc	0xd0325ee6	0xb1dae51b	0x812ee29d
--	0x6d58db21	0xb787fa68	0xfd092294	0x09683dd3
--	0xfe0d6405	0xfdd99aad	0x78744a59	0x936738e6
--	0x6ad6cba7	0x370f7f8f	0xd208c214	0x12239384
--	0xbe71f0e7	0xfc0ef264	0xc04e4a49	0x354f9cf3
--	0xf5d7572c	0x07839ad0	0x834a003d	0x23ba26e2
--	0xf4049ecf	0x5ff402b2	0xff9d6769	0x074ebe6d
--	0xdc829da1	0xc3d7697d	0x973efe4f	0xfc2a9165
--	0x126dc518	0x0b824ca4	0xc438fb70	0xb7b0ee00
--	0xbe56afd9	0xa3d8defd	0x971455ae	0xc11ffde7
--	0x346e619a	0xb41111a9	0x6004b62e	0x896c668d
--	0x738e458c	0x351f9fdd	0xe771b2ba	0xad6d7464
--	0x719b57c2	0x6f6a4611	0x8a676f2d	0xb8db1c43
--	0x3f102641	0x51bffdbc	0xb7862565	0x5d8dd231
--	0x7a79bd39	0xfa472894	0x0fd1d2ff	0x64cf589a
--	0x38234d7a	0x5c9acefd	0x8eb0b9f8	0x761e1c95
--	0xf2fe78fa	0xe06220d7	0xaf82a919	0xf4e196e1
--	0xa17c8935	0x06d08d16	0x6bad807b	0xf410805d
--	0x4ff2bce6	0x3297c81f	0x06e35353	0xbe1f5e1c
--	0x65d1cb92	0x0dc69b2f	0xac55d597	0x636ff24c
--	0xe2e4f2ba	0x63d64922	0x4b2e9f71	0xad2279ec
--	0x5f0b5c0e	0xac688638	0x35613358	0xf5531360
--	0x54a304e8	0x27ebfe65	0x977b5a3c	0x3dc5e10c
--	0x73b32ee9	0x3a2c9454	0x30a149c6	0x31e5b55c
--	0x2c10854f	0x745cd38a	0x2853a27b	0x6629e355
--	0x0bb67e39	0x5469184d	0x694a9bb6	0x0a0ca25f
--	0xa878c5de	0xee15fd46	0x23d92ff8	0x02328404
--	0x1c9402b5	0xa46b6ce0	0xefc3e947	0x0e9312ad
--	0x5830ae9e	0xe30e32f2	0x9db8ee81	0xe8aeebbc
--	0x30675c83	0x447278c2	0xab2bad3b	0x08ba3d0c
--	0x1124e681	0x3691242d	0x903c8d2b	0x3281c312
--	0x22af690f	0xd69a150c	0x57622c5b	0x29313c73
--	0x6ab2d7c6	0x39b06dad	0x6e1f9f81	0x03324986
--	0x53a49093	0x7654eba3	0x2527245a	0x9af596fb
--	0x818ffb3a	0xa3817173	0x6a2c4b80	0xfcc42ad5
--	0xfb1bbb69	0x3a3720a2	0x90a89bcf	0xed80308d
--	0x7753cb1c	0x1c2654a5	0xb01ee4af	0x81091e85
--	0x9067b3f1	0x2e2b9b5e	0x9fb0c7d1	0x78fd9f69
--	0x5771c46d	0xacdf498d	0xfd8b8e77	0x4c15fa61
--	0x607120ce	0x18a298d8	0x73716420	0x65e5e06a
--	0x18c53e04	0x35b84427	0xcd82b522	0x9a7d26bb
--	0xd56b4b74	0x49b47fe8	0x63178dc6	0x0bac0f46
--	0xc8b0755a	0x9bbaaf1f	0x18131d2b	0xcc019330
--	0x0ceb89bb	0x8808c2d6	0xfb5bd86c	0x6c945b71
--	0xdc911924	0x4ebb8d35	0x44e46d08	0xabfee615
--	0xf456931f	0x7a244955	0x0bffce7d	0x5533ca5f
--	0xb1b2c636	0x4f29075e	0x64012561	0x7aa5e7c7
--	0x9c8a0666	0x9698782d	0x3481ad8f	0x21a55b19
--	0x735aa45d	0x4245b9c4	0x0d4c3fdc	0xd1b10966
--	0x7035fcde	0xc2257947	0x4a37271a	0x9da464a9
--	0x228adbf8	0xbf309e03	0x096f560a	0xa2b8ca78
--	0x427702cd	0x35a99cf5	0x99811758	0x6953db58
--	0xec07533e	0xe95838b9	0x61c71654	0xc9cce595
--	0x275af106	0xc8697af3	0xb3f27e58	0x411d8d30
--	0xd0d90ecd	0x1503b9dc	0x76bf070e	0x49f89ef0
--	0x7333b083	0x53f9c44b	0x8330c3a2	0x6a1119c3
--	0xca555f2b	0x3d51fc6f	0xac7b3320	0xf8e42cdf
--	0x053753fe	0xc122336f	0x94d289c6	0x088b5a64
--	0xc3aac7f0	0x96a76344	0x2ff05828	0x9b4f2af3
--	0x46de6a46	0x4ed29d98	0xe2ab7634	0x27481ddc
--	0x300ca71f	0xce7ac539	0x88240e09	0xb1a14e78
--	0x2addd4c5	0xb3a7f320	0xe91f549b	0x6881c45b
--	0x0e381c47	0x1018feb4	0x64679650	0xe62281cc
--	0x670ee6d4	0x0d226160	0x947b7f08	0xbc595a74
--	0x2380c0b3	0xc0235785	0x63b41221	0x80b9cc31
--	0x3231b4ae	0x33ed5718	0xf2c5c90f	0xdd3b03ea
--	0x67dfca08	0x453e9d29	0xa2bdecbf	0x5e9a3181
--	0xad17aea2	0xff0a8f13	0xdf946849	0xcfbbecb7
--	0xb0a602d7	0xb1a820c6	0xfe7abbc8	0x7f70790d
--	0xeb5f8863	0x266d3cc1	0xbd552a44	0xe19b1b3d
--	0x856aefbd	0x51c11f1e	0xde661b7f	0x61c075d2
--	0xd0f6a834	0xff1d0d37	0x6793d1c2	0x70c133a5
--	0x20c4d2cf	0x8c80d4d3	0x61ebe382	0x788b74df
--	0x11c56903	0x535889ba	0x0a9c7380	0xf9de2837
--	0x09437fe7	0x1627c6b2	0xb943bdb8	0x69bc29b2
--	0xee9795a4	0x83c992e0	0x95437918	0x8ce166a2
--	0x56b56b66	0xb0680941	0x623d38a9	0x2add07ad
--	0xe583ba09	0x96f6532a	0x3eff4696	0x2a8a6b0b
--	0x905b913b	0xafc01673	0xe871e006	0x2c2339ad
--	0x248438e5	0x96d83e53	0xb3a75d6b	0x2258cf63
--	0x69ff39bf	0x95727173	0xc3ac09d5	0xea8d2c06
--	0x0e7c0a4b	0x144fcade	0x28a9a5a3	0x97c11ae8
--	0x89865e3d	0x1640cd32	0xe3e551f8	0x1f7ba770
--	0x6d23fb31	0x11eceae3	0xc8ccb8ee	0x46dd0bb0
--	0xd01a46ff	0x0504adf5	0xec6e170e	0x2e3d7ac5
--	0x70f893ac	0xaf9963db	0x061e283c	0xf0ad248f
--	0x2fe97e19	0x881fd340	0xc686c9d5	0x88ea8ba5
--	0x92f05cd7	0xd6716148	0x6fc47fc3	0x2c51d9b9
--	0xd50a7faf	0x4eccacd1	0x7c92f802	0xa63ffc83
--	0x7cb0ab1d	0x4492e81b	0x7d906554	0x43306ba1
--	0x73a5d57a	0xe57a05d6	0x6850b964	0xefed595c
--	0x7754978f	0x629e8236	0x62ec4dde	0x247439ee
--	0x8b9982fa	0x4eece5c2	0x48599175	0x0fdc752c
--	0xecd87b12	0x94936c75	0x17a45ea1	0x80a899ac
--	0x22a39ee7	0x745730b6	0x03ea4daf	0x4a7570d7
--	0x307621fa	0x7322e0a7	0x3a8e0316	0x454e46f7
--	0x08773750	0x156dcaad	0x5562bc06	0xa23a1ee3
--	0x20435211	0x1d679ea0	0xb220e205	0x682cc1a6
--	0xd64a71c7	0x3ca7f8e3	0x2e92f253	0xa7cfdd0b
--	0xd62b4053	0xf5c5f641	0xbf72dde1	0xdcb716c1
--	0xe2f7b05d	0xa03145ea	0xc09828d2	0x7dae7916
--	0x6fb97c79	0xb3a85204	0x998a9c7b	0x5f42ba8c
--	0xd9c628b3	0x6b17bacb	0xa889b716	0x450ff97d
--	0xe9166f3c	0x2d20777b	0x82a003ae	0x2c7ae0aa
--	0x6011a9fe	0xfeed34be	0x1328f67e	0xf61003a3
--	0xfaecdf20	0xee18c81e	0x731a0302	0x11a39e60
--	0x355d78dc	0x99088f2c	0xcf253759	0x97347603
--	0x736f71f1	0x37e4b395	0x9cc74540	0xf7e39994
--	0xf01c5f64	0xbec519f1	0xa79c1067	0x76000d5e
--	0x1ac85b6e	0x51e5b7a3	0x62a97ddf	0x6f20096a
--	0x2af51e77	0xea5554f6	0xb4e581da	0xc1ac4ba8
--	0xc8f22bf7	0x9e254d3b	0xd7dd62f6	0x6461ae3e
--	0x423e1f10	0xf143e7b9	0x18c73b04	0xa43de614
--	0x2da8d02f	0x9befa706	0xc01dcd49	0xa278f1e0
--	0xd85f3177	0x6b6679fd	0x1ccef04e	0x53af9252
--	0x34d751db	0xc8d32c86	0x3d725097	0xa64ed581
--	0xd090c42f	0x9e92bf3f	0x6f82b089	0xd42728eb
--	0x3dd651e0	0x1985bc52	0x4b0f4159	0x0f99bd7f
--	0xe2597023	0xca0cae4c	0xce48a894	0x7249dd88
--	0x8e146632	0xb4be1d6c	0x790ae7e5	0x6747b657
--	0x52143947	0xa2e42ed3	0xea359617	0x6ca01a11
--	0x35c5e2dc	0xc97b78fc	0x5db6db2a	0x80fe3414
--	0x27da19d4	0xd7431d04	0xa91e9110	0x7d8ecb23
--	0x2508700a	0xc8c71ed9	0xd28835af	0x018c2887
--	0x3d0a6fab	0x3e8523d6	0xd0688dee	0xe5c3865c
--	0x838d72e4	0x6bb73a1d	0x497a59ca	0xf77c56de
--	0x38ecb72e	0xa55e3565	0x04b12c92	0x1aec9997
--	0x037c340a	0xef0d04c3	0x78f74bd6	0xdec9b9e8
--	0xd95b61ea	0x5528e8f5	0x4ecd325c	0x88ffdc0b
--	0xb337ac61	0x899d90e7	0xb5eeb978	0x8295d9ae
--	0x1ed8978b	0xa8849eda	0x8633b4a3	0xb8c858b5
--	0xbe3c4375	0x28b9e84e	0xb2a26def	0x22f8f66b
--	0x3a4aed99	0x0c4914ea	0xad103249	0xba5a5eff
--	0x8a052461	0x26938899	0x915c6ed7	0xe6268ad9
--	0x246e8c74	0x75f3c196	0xc3e725d6	0x92e02549
--	0x1f78a5cb	0xeada57e5	0x40f14906	0x0215e49c
--	0x57c06bae	0xc1896b87	0x0cd40a63	0x60741d80
--	0x11a69899	0x80fed942	0x0497e115	0x56697b55
--	0xba89c3d4	0x27d6b7c5	0xddff87b0	0xd3b1ff2f
--	0x3160e528	0x9cca1286	0x13b4fdf1	0x38cdd907
--	0xb50c4597	0x4c151714	0x1cab86c7	0x23126a3e
--	0xe26e9749	0x289a0d0e	0xc4004640	0x9d33928d
--	0x33b691a2	0x15ed6e6b	0x6e773980	0xadd59678
--	0x188ba49f	0x08da4c6d	0x6d150d0b	0x0c6c7b98
--	0xc8e1df7e	0xb8b1e692	0x5e89fd35	0xcb253d24
--	0xfc6ee27c	0x8013de3d	0x1d38012b	0xe50a8f7b
--	0x7d410ff1	0xceee4e9f	0x0e8094b6	0xaa1a5f57
--	0xb395a551	0xbd62b2ae	0x5d7b34c8	0xbd2d6195
--	0x33af4109	0x0769ff18	0x9c6cc123	0x78ee6eb6
--	0x412644e7	0x70e0c6f4	0xf45d8fc6	0x0435f5af
--	0xd43622b7	0x27409d5b	0x6dd04e8f	0x9f02ecf5
--	0xca415f7d	0xc9f439c2	0x7198e539	0x20476b75
--	0x3cdd8dd8	0xce17fbb0	0xa5bc115e	0xb0ee52c1
--	0x0b074cfa	0xd26d4f99	0x3b43320b	0x230b680b
--	0x9908f2d2	0xcbcb1952	0xf45a2f53	0x7b4564c6
--	0xcf2fd983	0x414fe4b2	0x55ea7f11	0x63e8117d
--	0xe8954052	0x7c2ea344	0x97a02aaf	0x6ca874c3
--	0x1ae5b4ee	0x41754eae	0x6954abe0	0x115ddcda
--	0x9a27968b	0x32a53e65	0xffe47b2f	0x4fe7e5a7
--	0x6016dedc	0xb3c0893e	0x9626776d	0x5ec773f9
--	0x1104e01c	0x1473cfb3	0x43b2cedf	0x8ca9d119
--	0x7f1bc844	0xd8bb7387	0xba90d2ef	0x2bb0dcf4
--	0x2340f124	0xa5bd514c	0x50afab05	0x718f5ad5
--	0x7c03fad9	0x71d00d2d	0x1c31fdc2	0x4a938809
--	0x40945ded	0x437f2a0d	0x83c10d64	0xd224c6ab
--	0x0cd44481	0xb0040966	0x27fd6e7f	0x6ff45d4c
--	0xab057ad1	0x8fa4e5d4	0xac50270c	0x6e4926ca
--	0xc5721498	0x2529b458	0x40ee2ad5	0xde5e21f2
--	0xea8964ca	0x56766e60	0xdc3b8702	0xa93528d4
--	0x28d7713d	0x42edf022	0x59774dd8	0x200ff942
--	0xe7a4d769	0xd8c4ef5e	0xe177f715	0xe9d53cd6
--	0xc11270bb	0xb25977e5	0xb80867b4	0xfb48468b
--	0xdbf166a8	0x49700d85	0x0f85f98a	0xa7ca7a75
--	0x109817ce	0xca243f19	0x8bed7688	0x9a1c8231
--	0x94f0ce97	0xc36309ca	0x90ecac24	0x67e7e0de
--	0x86b18d62	0x18c7b7a5	0x622f5d3a	0x47e1e067
--	0xdc96b94d	0xe4a03beb	0x59d17692	0x040abc0d
--	0x44a5ae50	0x3d3dab7d	0xc18dfd30	0x2802b9d9
--	0x6818379f	0x56db41d7	0x97cbf039	0xe41d6a32
--	0x64b5fb01	0x6506e0b4	0xd60a3234	0xdf3573d2
--	0xac148579	0xe7f46ac0	0x05e1c763	0x904a5aa9
--	0xc7ca1ee0	0xe0c3b047	0x5e36e1bc	0x447a9141
--	0xe24654df	0x9853a49b	0x6a29cedb	0x022f00dc
--	0x6df2a7a7	0x3636da02	0x72bb9c81	0x4f0e0918
--	0xd649f4a5	0xbb0c81f9	0xc0ba93fd	0xc1b390f1
--	0xda84e720	0x1aea0064	0xf3ee67e1	0xb874ef4a
--	0x82467ce6	0x59abf506	0xafbf145a	0x9a4cf8a1
--	0x17247c89	0xd8669398	0x1796eaf7	0xbc2d24a9
--	0xcb486570	0x17a9db23	0x3e6504f0	0x08684517
--	0x2723ab28	0x7081b814	0x8a265a04	0x697e6d8b
--	0x69b146dc	0x6434c182	0x27ec8101	0x864405c5
--	0xfff86c9e	0x3052d8a6	0x23d283db	0x492970e8
--	0xbc6c64c3	0x46d8f98b	0xe16e7ff3	0x731e4f82
--	0xbd26b1af	0x6b30e6c1	0xff192fce	0x097e0bba
--	0x49df63a5	0x2fdc3f01	0x50aae053	0x60177b8f
--	0x1949eb85	0xa46084ce	0x9658f694	0xcb951fbc
--	0xc53806d9	0x63a17d30	0x3b3f86c2	0x8a37aa6c
--	0xedf8fe5c	0x87aee1d3	0x8c680126	0xfd8b27a6
--	0x231fa106	0x69358c25	0x4502c348	0xc107861c
--	0x46280e70	0xcf6067ac	0xf6a04ff3	0x3e488677
--	0x6f3fb4c1	0xeec1f758	0x560e1c48	0xb604c06b
--	0x69e34b1e	0x8ef41dec	0x854cea22	0x726581d7
--	0x55ea91f3	0x38ae4053	0x5ff7389d	0x6952cbf6
--	0x09aa0fc1	0xcccb1d50	0x5c1a633a	0xde1eba46
--	0x797212d8	0xa943fb3d	0x6063a1a8	0xbe68ef36
--	0x6ba0d5ba	0x0dbe2061	0x47711712	0x62679807
--	0x6f34009e	0xe6fe8f18	0x66a6a64b	0x3f80f472
--	0xe953d5e0	0xbcd8196a	0x086faad0	0x49da7f16
--	0x7f2199a5	0x55af4af2	0x085b4d38	0x22e634bd
--	0x6cff0416	0x343466f4	0xd121a7a6	0x6caa3942
--	0xe4f365a2	0xd832eb0c	0x616728e5	0xcca4c71a
--	0x4010cdc2	0xd0f1d1cb	0x5e695f89	0x27719206
--	0x0ec92854	0x76144a1b	0x49808021	0x12457a1b
--	0xdde7aa5c	0x8f1a077f	0x110a4a5a	0xb3a5ad31
--	0xaacebf8f	0x66ff7f33	0xa2340971	0xfb4c7e82
--	0x8dd536d7	0xafd2021a	0x72aa9c6e	0x22df6952
--	0x83c4b4fb	0xba515555	0x93eee8f0	0x22d0ed5a
--	0xbec05586	0x83828f28	0xe0d7f930	0xac0f0199
--	0xef6d76f9	0xf56ebdf8	0xf67323c9	0x8b805745
--	0xce5902c0	0xfa2ce3da	0x10f836dd	0xe1ac6d97
--	0xa0e415ea	0xbb7c32ad	0xc421f3b0	0x8166e898
--	0x74e7a73c	0xf454b82a	0x631369b1	0xe30ed23f
--	0xdaa1c75b	0xe7c9c6a7	0x5f33c375	0x99c05187
--	0xf2d6e6ae	0xcd2045b8	0x92ff3009	0x15082015
--	0xd1a1580e	0xdce25f9b	0x21984a75	0xa9be5388
--	0x099a5372	0x3ab9bcfa	0xdb9069aa	0x49a99be6
--	0x42a9ee0b	0xfe32d832	0x24e11ad3	0xd16f596b
--	0xb95982cc	0x754ab1c8	0x42ffa128	0x539e823d
--	0x28e0f976	0x262ddfc0	0x2a16e7ad	0x49b5acd9
--	0x931f3def	0xdc419b84	0x8412cc3c	0x81056cd9
--	0x91933e1f	0x57710b15	0xa55d2696	0x87d88724
--	0xd4fedfdc	0xcc3825c6	0x397f382f	0x80f9b6ba
--	0xcdd6d59f	0x24b984d8	0x8f1c5bcf	0x25bcef1d
--	0x00dc603a	0x76fd94c2	0xa267a7dc	0xa6e90a6a
--	0x5c5916d6	0x065a52cf	0xa28d3263	0x9b17b72d
--	0xb8436b48	0x1b1c2391	0x1fda3395	0xa6cecbcb
--	0xbc4ec502	0x1766b590	0x5945fbd6	0x6a124405
--	0xf92d06f2	0xe24694b7	0xf6befd08	0x8266cf5c
--	0x03ed670a	0x5f98be62	0xf27b7e2e	0x598cf22c
--	0x2e855591	0x879815fb	0x153799c6	0x3820faf6
--	0x3d3a2cc6	0xdbb6dece	0x1a3c46b2	0x5031bdda
--	0x47894c03	0xe43661fe	0x7a6ee548	0xa5ca9779
--	0x6aa9e105	0xbc8505a3	0xa03b860a	0x448faeb9
--	0x367de4a9	0xc9779c7d	0x6535ad8c	0x4b7fcacc
--	0xb2db5c10	0x0ab41ec6	0xe528ab90	0x5e6f03da
--	0x98bc76d3	0xf38df42e	0xea59b039	0x1c2eaa28
--	0xca30dac5	0xdb0eb8c6	0x60063860	0x18823f8d
--	0x164e2f28	0x7cbbe080	0x70a12315	0xb08f44d9
--	0x5fbb9453	0x4bc62738	0x9fa15ffc	0xe4033ca1
--	0xc9dfbc13	0x58245d7d	0x588113aa	0x8f5a6ac8
--	0x92588a60	0x26330c74	0xb2aaf0e3	0x24ada1ea
--	0xa9e973ae	0x624b73e7	0x4ef961db	0x95ede155
--	0xf2bb86ff	0x96bc79d9	0x95cd646b	0x1c3af453
--	0xf60fa711	0x10905115	0x0e24b740	0x169bb227
--	0x34cee6f0	0x990980db	0x18d8ace5	0xd4c87504
--	0x29515d32	0x2e5d9c04	0x87dffa60	0x12e815d1
--	0x021db8e9	0x2c5a42fd	0x6e3a1a13	0x88889ab5
--	0x3bc915a6	0x608919c5	0xd310a970	0xea8f3218
--	0x949f55bc	0x9ed7aadd	0x6d990157	0x181f1c2f
--	0xa940df64	0xf3be8c39	0x7ca2e699	0x7b4f07f9
--	0x89e83fee	0xe66b9493	0x54fc3d17	0xa63d2d46
--	0xd5e835d5	0x910e0144	0xecf67025	0x1fa6a93a
--	0xe692dbca	0x466af681	0xc2bc808c	0xbb4ebd60
--	0x74d5c729	0xa283ad25	0x1e66fa23	0x6d372988
--	0x753c9fcb	0x1742efdb	0x5b68cf15	0x372a0e33
--	0xaa3a7ebd	0xa0e944d5	0x95d5cbb4	0x4fb6020b
--	0xced927b0	0xb2afea78	0xd0646b72	0x1622fad4
--	0x4672c6b6	0x736ae4f8	0x8d46a4db	0x0e6a432e
--	0xe0a30a98	0x4c2bcf4f	0xd87acedd	0x19682d7a
--	0xf97c025c	0x55d8feb3	0xbcd4d2ff	0x236c6f9f
--	0x8ba0246d	0x42812f73	0x327636f5	0xc92cd30a
--	0x08a69d9d	0xc735a946	0x82eca01f	0xda0753a0
--	0x7077b1d1	0x17b05834	0xfa24bc02	0xf49f4473
--	0x8f9ac6b4	0xa880c630	0xf7457b4d	0xd5f829e4
--	0x25c49a99	0x1176a997	0xbb2d2009	0x61d35764
--	0xa322c752	0x6ef3ae02	0x5faae6f8	0x9a52acf1
--	0x19176f43	0x43843b07	0x14efc471	0xee474403
--	0x319c4857	0xa19adcf0	0xc0a466e1	0x02db14ad
--	0xb7f211f3	0x72aa6ca6	0x0eb9bffe	0x48a6d284
--	0x9a93a2ee	0xac09fc5f	0x92a62c4f	0xd34f0271
--	0xffb348c7	0xf229b6e2	0xc68ec1ca	0x19577dbc
--	0x069a10bf	0xf64ac347	0xf7c3c848	0x81975294
--	0x6376e550	0x93b53440	0x8bb17daa	0xc4c64c07
--	0xcaeff293	0xd51497b0	0x33da3565	0xa73d5def
--	0x4bf4dcde	0xfb470fcd	0xca7db864	0x7ef17022
--	0x47567363	0xd8fb8d74	0xa68c3c72	0x8202e4f3
--	0x75bf1798	0x16a70fd2	0xcc3b697f	0xab9a1075
--	0x13f56ef3	0x269d0302	0xcb655a43	0xc9a4de88
--	0xfb8363de	0xff40f36d	0xd2555489	0x647a7995
--	0xfd8eda6e	0xa3958c9a	0x20e029b4	0xbed3e225
--	0xa7df5f17	0x63bc3c1a	0x337ecc9d	0x6c329508
--	0x786aa47e	0x1db5b093	0xc0acd73b	0xf9587237
--	0x243e5d40	0xd3623c3a	0x338c4740	0xb672140e
--	0x43640a9b	0xb7ef3f6a	0x44151074	0x749bcc46
--	0xfa1f103b	0x0fefb19e	0x58855538	0x138ad276
--	0x2641fd80	0x297d99d0	0xfaa63ba2	0x00b6f11a
--	0x3793fb6b	0x124763a1	0x8b9419ac	0x56abf9eb
--	0xdbf83419	0x43570571	0x37299cd8	0x8b201e62
--	0xa4058fa5	0xb320e91b	0xbe7d40b7	0x4eca3b2d
--	0x8519c155	0xf4b17021	0x9e4c572a	0xdc1f9e16
--	0x39a589a3	0xa6cfc7a8	0x5b986910	0x64e150e7
--	0x60b6f2c1	0x02bacd3f	0x2f3b5a5c	0xc6f453a8
--	0x15a87a7e	0x76104a14	0xafa2ef63	0x2cd48dbe
--	0x3c7abddc	0xd786ea5a	0x4f65867a	0x355cda38
--	0x2ae03d9e	0x4f11f6be	0xfc0a0034	0xde4ea602
--	0x21ff83ea	0x0f12d913	0xedf4da28	0xc96d8fd1
--	0xd7e82c3c	0xfec63bdc	0x37a456d7	0x3007e18c
--	0x091a47b6	0x82f1c641	0x82219cce	0x3e7e6993
--	0x7b3a2115	0x0b8e1a02	0x40f88213	0xfa2f9c21
--	>;
-diff -ruN u-boot-2015.01-rc3/arch/x86/dts/m12306a9_00000017.dtsi u-boot/arch/x86/dts/m12306a9_00000017.dtsi
---- u-boot-2015.01-rc3/arch/x86/dts/m12306a9_00000017.dtsi	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/dts/m12306a9_00000017.dtsi	1970-01-01 01:00:00.000000000 +0100
-@@ -1,750 +0,0 @@
--/*
-- * Copyright (c) <1995-2013>, Intel Corporation.
-- * All rights reserved.
-- *
-- * Redistribution. Redistribution and use in binary form, without modification, are
-- * permitted provided that the following conditions are met:
-- *	.Redistributions must reproduce the above copyright notice and the following
-- * disclaimer in the documentation and/or other materials provided with the
-- * distribution.
-- * Neither the name of Intel Corporation nor the names of its suppliers may be used
-- * to endorse or promote products derived from this software without specific prior
-- * written permission.
-- *	.No reverse engineering, decompilation, or disassembly of this software is
-- * permitted.
-- *	."Binary form" includes any format commonly used for electronic conveyance
-- * which is a reversible, bit-exact translation of binary representation to ASCII or
-- * ISO text, for example, "uuencode."
-- *
-- * DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
-- * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
-- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-- * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- *
-- *---
-- * This is a device tree fragment. Use #include to add these properties to a
-- * node.
-- */
--
--compatible = "intel,microcode";
--intel,header-version = <1>;
--intel,update-revision = <0x17>;
--intel,date-code = <0x01092013>;
--intel,processor-signature = <0x000306a9>;
--intel,checksum = <0x3546450b>;
--intel,loader-revision = <1>;
--intel,processor-flags = <0x12>;
--
--/* The 48-byte public header is omitted. */
--data = <
--	0x00000000	0x000000a1	0x00020001	0x00000017
--	0x00000000	0x00000000	0x20130107	0x00000a61
--	0x00000001	0x000306a9	0x00000000	0x00000000
--	0x00000000	0x00000000	0x00000000	0x00000000
--	0x00000000	0x00000000	0x00000000	0x00000000
--	0x00000000	0x00000000	0x00000000	0x00000000
--	0x86c5b0d4	0xf6978804	0x7f4f5870	0x6319dc3c
--	0xbb3b7d61	0x33cf9075	0xe8424658	0xf611a357
--	0x5a3401db	0x42caecce	0xb4d8e75e	0xe6dbaf24
--	0x7861b35f	0x6bd717bc	0x23b9b731	0x82ec1ac8
--	0x20337b64	0x5396dbf1	0x59973bff	0x724bc7e9
--	0x5237193b	0x0b8647c1	0x6a0d0e16	0xbf9ddb5b
--	0xace2cc1c	0xad707638	0x056f102f	0xa37e60f8
--	0x76255642	0xfb86e030	0xb8069a40	0x367795f1
--	0x653fb05e	0xab7f14ad	0xb6e8a8e1	0xd2598d20
--	0x2eba3f68	0x78b372f1	0xba8d13f8	0x1f1de861
--	0x97f951d5	0x8097c728	0x27dbf904	0xb97906a8
--	0xffe7a4ac	0x4b947668	0xc1dbd726	0x2adcf777
--	0x63b1bcf0	0x818e2a1b	0x49aa907b	0x2faf5e8d
--	0xae842352	0x82707fae	0x0aa12b41	0xa0bae11c
--	0xb4298c47	0xd2b4099c	0x4ff625f2	0xcd2630d4
--	0x79850981	0x05dbf57d	0xb05b81a5	0x56e73ec7
--	0x95cb3897	0xe262bda5	0xb2c6e288	0xcb7f8e77
--	0x72b8bdd3	0x3f400494	0x63ade65b	0xbc4adc71
--	0x00000011	0x06c0f8ff	0x0eb63d77	0xc54cdabf
--	0x76bc8860	0xdd142643	0xe7bfc220	0x17aa0a91
--	0x4fd676ba	0x4b6b1a15	0x2a1a1c16	0x4fed6de0
--	0x8c3d6bcf	0xbb319bf6	0xa82532f1	0x7c8ce014
--	0xb830a38b	0xec25bc6b	0x61c8a8a9	0x49a21dba
--	0xfcf8bad0	0x7372f29c	0x1f7fbcdd	0xc2ff42f4
--	0x780878f0	0xc967068e	0xe19cc3c9	0x155e6646
--	0x75235c43	0x9aaf3741	0x9dfd116d	0x0f031b6a
--	0x4963e039	0x6918daa8	0x7f0ca4ab	0xd77dad79
--	0x2f8847e8	0xf79c82a4	0x6a6aaad4	0x24f07dbc
--	0x895d3f6a	0xc96b2eb0	0xff50228f	0x573d364a
--	0x5fca9d56	0x3c11c35b	0x3e90fb12	0xc4604067
--	0x5c980234	0x7c42e0c7	0x60cca3de	0x637a4644
--	0xedc43956	0xb0efb4e1	0xe94716fa	0xa6478f51
--	0x33965654	0xdf6b40a3	0x48ac1b18	0xd6723c94
--	0xf040d6d1	0xaf850470	0xe2bcde48	0xb90a4998
--	0x8f620105	0x3d592878	0x2f697bad	0x9f7721d9
--	0xec34444a	0xb0594770	0xd7180f9f	0xa510a168
--	0x460563b0	0x5d4f34f4	0x21dfc16b	0x051de344
--	0xa57bc344	0xff2c7863	0xf0bc063d	0xf5a89004
--	0x79a81dab	0x9e8cb974	0x2309b0a4	0xa47a46de
--	0xcf9c0c44	0xf761c817	0x67ab642c	0x0db4422f
--	0xca3616fc	0x79e66c8a	0xd56a3332	0x5e0f338b
--	0x5814cb3a	0xed1b9a4d	0x47d59f72	0x25b03786
--	0x3edd1d42	0x8cd947cd	0x706e6ebd	0x82c2bada
--	0x1bf6a96b	0x77dd859a	0xda35335f	0x22fab458
--	0xd0661fd8	0x02bb4a42	0xe2a2bcdb	0x0616580e
--	0xd35be23f	0xc206d16c	0x401218be	0x51107c3d
--	0xba84b8be	0xace4d8f2	0x505b9b28	0xc517034b
--	0xac5ba582	0x7419fe54	0x43493cb1	0x2fe0a66e
--	0x206039b5	0x07569011	0x230ce53d	0x168d427f
--	0xbfe0bd10	0x82bf11be	0x5b55475b	0x5490a0e9
--	0x1c3c1e3c	0xacad77de	0x1666512f	0xfc3250d8
--	0x930a6312	0xdd85c066	0x1b95c18f	0xc8bbd3b0
--	0x1bb2a34e	0x642c7653	0x0f536213	0x1f7ab4eb
--	0xaa5ef677	0xe6ac9581	0xd7a2fe73	0xd417dc79
--	0x455a6877	0xae825a40	0xe0c98bec	0xac39ba49
--	0x299d9bd9	0x957d0bb0	0x1645111b	0xe9da4beb
--	0x1b005ce7	0xddb742ce	0x6c5f3ffc	0x24f74d2c
--	0xf4ace044	0xb21bc7ba	0x338002dc	0x240effa1
--	0xd208ae00	0xfe8c2b5c	0x9a457293	0xd9365ac4
--	0x98f24244	0xf6d1aaea	0x7b874350	0x1ba4086b
--	0x1d3bf168	0x2bb6f4fa	0xb27f8477	0x8da836f6
--	0xa8762693	0xc377fa64	0x74cfd979	0x90435c25
--	0x29d80e17	0xc3503c9c	0xaacd2178	0x232c748d
--	0x6fecd3ba	0x00fb4aa0	0xbac3ee19	0x6e5c63e3
--	0x17823c14	0x0e9d33bc	0x0fa9de06	0x998b14b2
--	0xfdd8c80d	0x01b0591b	0xf70bc4ce	0xb278c496
--	0xa7e30708	0x69cf8420	0x14f8b744	0x8bb8a0ff
--	0x168f6db0	0x95da6db2	0xf96d121d	0x67fd06f7
--	0xcd81d278	0x8693d095	0x15e1a24c	0xe5f554f2
--	0x499874e8	0x30fc0785	0x0f4fa1b9	0x65c93dad
--	0xd939bf24	0xdad29721	0xf253b752	0xf6ff59da
--	0xc5dfaffc	0xf0071f34	0xdb0db8b0	0x24475e2d
--	0x2a4d5b8a	0xf7624bea	0x3fdcbc90	0xb5a66e35
--	0xd0f08636	0x24643caa	0xc5d08e83	0xb134c55c
--	0x8e3653c7	0x34496b0c	0x6b2aeebc	0x2fbab601
--	0x105613a2	0x7babd55d	0xa01af846	0x248be690
--	0xed27917c	0x26ee6e13	0xa1dac5fe	0x852ed91a
--	0xfc83fcca	0xdf479c33	0xfd6efe96	0xdc62521b
--	0xa37d2a8c	0x1d2bad9e	0x4287614f	0xc4f7b62c
--	0x2aab0562	0xec6d4226	0x52853fb4	0x264e3507
--	0x1c3af366	0x33269776	0x81b8529d	0x115530dc
--	0xe035f98f	0x433d1b6c	0x1ea6daea	0xecfd2ad2
--	0xa57a0c22	0x1dbe3e12	0x6fafe41b	0x8e579e35
--	0x6c493fbb	0x034dd4f9	0xd17cd6f2	0x05c5cfa8
--	0xd9bffa39	0x0fc16e9c	0x831b88c8	0x7e7dce3e
--	0x3320bc7f	0xd5abafaa	0x217ab526	0xade2597d
--	0xf01b00f2	0xc9e34b72	0x00a4cb0b	0xdc198512
--	0xdc7cc8a1	0x89db07b5	0x6c2153ea	0xb8bdb8aa
--	0xdf8a1ae8	0xa517f6b1	0xd32569d9	0x37e79008
--	0x3c7527c3	0x7d5b2d3b	0xb31cb907	0x35db7f6c
--	0x0ab0cd65	0x75feaded	0x7c8260a9	0x5bc04f56
--	0x2fac9f60	0xd7b3a2c0	0x2b393634	0xc2df7f43
--	0x1ff2fa9f	0xc81af169	0x188b1f4e	0x08bf6f86
--	0x5ab2f188	0x0a71eb64	0x03b57501	0xa684fc23
--	0xa729ffef	0xe3b4a709	0xf9eb97d2	0x01506c95
--	0x0d9285f5	0x8e1ee93c	0x7d15a0d8	0xd9390673
--	0xf116ebd8	0x7e68798b	0x3dc8412e	0x5a9a04b4
--	0xe3805f51	0x00493bb1	0x4ec65ca2	0x2aedd69a
--	0x7f2a5b18	0x9994ac32	0x476f3703	0x7d3da882
--	0x5635f55f	0x7a0887e0	0x0af46feb	0xfc2f3591
--	0x02e29400	0x70fd3234	0xc549379e	0xaf34fa5a
--	0x5bf7c649	0xeb183cff	0xa236d508	0x4525ab64
--	0xc4301026	0xf281df99	0x0b298e46	0x9b7c1a99
--	0xc4b24e77	0xea536992	0x5a39e37c	0x570fb6df
--	0xae5d5c49	0x01142cc2	0xda05d3f1	0x337bf65c
--	0x3c986598	0xbecefd30	0xb5e34c2a	0xe7c3847f
--	0x18cb24b4	0x71278c26	0x4b8d6caa	0xaf7c300e
--	0xfb6ce9b8	0x94c4b785	0x67275f17	0x59498cf5
--	0xca8eeec6	0x3374e7a6	0x649affac	0x9049ba78
--	0xff9d3908	0xaceec446	0x225ece3a	0xac1d4fec
--	0xdc050fed	0x04e3ed8a	0xb303d8e9	0xe9d26aff
--	0x0a98691d	0xf243492d	0xe3b42f00	0x6c21a97b
--	0xa385ae98	0x14ba3f4d	0xc0215cc1	0xe1ba6c0d
--	0x412bbbe4	0x39f95d1c	0x593bd878	0x45d3066a
--	0x9fcee8a1	0x3f29b2fa	0xc9ae58ee	0xed6def92
--	0x6c8f2182	0xdba64e20	0x276c2c21	0x81ea9dfe
--	0x20ae00b2	0x8c2d2724	0x66c09f5c	0x24908e2e
--	0xfecf8194	0x6be61e94	0xcdf5d7db	0x98b829a3
--	0x4241ab07	0x1207ef2f	0x96e7b073	0x766293ea
--	0x58eb0882	0xf12a6426	0x741b074b	0xbd4302cb
--	0x909b6c4f	0x1c4949cc	0xd4d6a3e9	0x442b74b3
--	0xbc8cb3f9	0x0efad89a	0xa2ceff3d	0xecdf86bb
--	0x46a4a72e	0xe9d8abe4	0x94c91479	0xe99a80b9
--	0x1072b708	0xb8318ad3	0x0685426f	0x3e89a0d8
--	0x0b7c438e	0xb4b577d0	0x046599e2	0xd0ef85f2
--	0x3566d2d2	0x43ade22b	0x8753a78a	0x8f6d8e02
--	0xbdf33e56	0x8b2b6696	0x22a5e911	0xd0e0f4eb
--	0x42729c29	0x425921fb	0x82f7634e	0x2c145fd5
--	0xff59deeb	0x018a5372	0x33c4e11a	0xc001c097
--	0xf250cfcf	0x2f682912	0x21f40dc0	0x883196aa
--	0xcd5c58d0	0x7c329754	0x481c450e	0x9411c6c0
--	0x69a9df82	0xacb01a1a	0xc0b569a7	0x0b7fd1a9
--	0x4c339ad3	0xb0d9e211	0x07098664	0x14a5cff9
--	0x53beae37	0x4e173257	0x4e1d2e6c	0xce981dd1
--	0x45d6204f	0x3c193268	0x4f51ac3c	0x5ecffa12
--	0x48068ee9	0xde12270f	0x0a0aa980	0xd6fe8ca2
--	0x97d51da8	0xccf2db36	0xb3ad0598	0xbc56eb56
--	0x0adf5e5e	0x9e320aa1	0x8ebb75ef	0x3973a323
--	0x7e3d87e0	0x2c0d1858	0x83b7fa0c	0x36effdb5
--	0xcd9eba1a	0xab5b5790	0xa48fbf00	0x536e2ae9
--	0x2f2a3f61	0x05706a73	0xd2dfed08	0x7e4626b1
--	0x172c6ced	0xbf2e44ba	0x15aefc2e	0x9cf56c37
--	0x663c6695	0x04cece5f	0x4ce00027	0x465b1cd4
--	0x333dc2c7	0xce41f1f1	0x6dd8503b	0x52b79af7
--	0x564c81de	0x0e5e2daf	0x869753f5	0x16667889
--	0xe1acaf08	0x38ffbb0b	0x83400589	0x5144052f
--	0xa3819950	0xd21501c5	0x1bdadeda	0x0a874e2b
--	0x05480284	0xe8f76f11	0x582cad8a	0x0553f942
--	0xb6451cb9	0x76bdc86f	0x96ffe0c7	0xc630eba2
--	0xa82ec683	0x5902ef45	0xc362248c	0x18c412a9
--	0x1d09c103	0x2355ed98	0x5ec5c718	0x5037e359
--	0x1508f804	0x09cfea9d	0xa16cbdfa	0x5f962b17
--	0x85a35a27	0xa048dd30	0x6fe7ba90	0x0dc20150
--	0xcb56daa0	0x4188fb20	0xb4182598	0xa1bc5dd7
--	0x8c11e0bf	0x2104df35	0x025e74b8	0x79d177df
--	0xad74bb77	0x4b2419aa	0xe374add2	0x411593d5
--	0x796778da	0x9e43a420	0x4a2e0860	0xefb48578
--	0x47cafbdb	0xea15924d	0x70ac1467	0xf52fd888
--	0xd2df4bd6	0xc1fc63bb	0x119ab88e	0x0e147ead
--	0xa85bd8b5	0xc2e61ddb	0xd566417d	0x6bb9f9ec
--	0x69bbcf1e	0x24d46989	0x3caf067f	0x58151211
--	0xc2a6b6e5	0xb233416f	0x3da28155	0xf9cd9385
--	0x7a530045	0x1eab05ce	0xb86ed141	0xa8f13a5b
--	0xf9819f81	0x66d5d5c5	0x148c1a02	0x496d3c56
--	0x370dcd45	0x5f13f0b6	0xdd4eaeed	0x8dbad50d
--	0x0747ce54	0x69d2adcc	0xfb69c18f	0xd44ea186
--	0x74ab7537	0x0c642449	0x88b096cf	0x3a8ad683
--	0x408cd7aa	0x6daa6708	0xb267b312	0xa4225c7a
--	0x7a56dce7	0x6a8d497d	0x8837bcbb	0x6125397c
--	0xeb51d233	0x362bdde9	0x689657f7	0x32d09e1f
--	0x753a3d39	0xf77db5b2	0x8057908a	0xef12815d
--	0x594fffe6	0xcf3402c5	0x1a0d4923	0xca547b2f
--	0xaf9d604d	0x5d2e30f3	0xffe18005	0xe29bb0d9
--	0x36fc10f9	0x3720aac6	0x37bc1ad3	0x47d000ae
--	0xa4b0da0a	0xa178228b	0xdd9374e6	0xa1f3df5f
--	0x9ae2e451	0x21c4aceb	0x8f9fb226	0x5190b712
--	0x70253633	0x9c9cb5f1	0xc9178689	0x551c1a2d
--	0x6db67cc0	0xcf1b1ade	0x48449272	0xd18634f1
--	0x9d9c3de7	0x19025530	0x121d78d4	0xae4a39e1
--	0x62850819	0xf3d4af6a	0xe5ad5b80	0xfa053c7d
--	0x7ed68b9a	0xdbde2894	0x4b5c04de	0x65178203
--	0x9181cdd8	0xb17e27b9	0x0e29b338	0x50156ab4
--	0xf7726438	0x178108d6	0x1d8dc6b7	0xc3e7512f
--	0x0eb8339c	0xe2684a6f	0x7668ed31	0xd0ed6eda
--	0x4342a534	0x03840286	0xad1e6969	0xa9a6c98d
--	0x1bf77774	0xd32fc9d8	0x405620d2	0x8ab19efc
--	0xce4d7506	0x6f4eaae4	0x3e830dbd	0x76818782
--	0xfde4ee8d	0x1953cd0f	0xd47be276	0xf2480bc0
--	0xd1010013	0x2dd56a58	0x083084f4	0xc91b0ad6
--	0xc2524e12	0xa60710f2	0x3d955047	0xce380846
--	0x0f6dec2b	0x604d1492	0x5ca43ee1	0x6b51a626
--	0x350d5483	0x8d99ae30	0xcba06491	0xcc0185eb
--	0x7b64caa6	0x2f1754db	0xca0691f1	0x6219efb6
--	0x43291db0	0x259d3f12	0xeaf6ef9f	0x5f0e065b
--	0xad576541	0x8615a414	0x81124bdf	0x62b855a9
--	0xabdc529f	0x01bfdf75	0x10e4c656	0xf8e86f78
--	0x1fbe10d1	0xa6873c2c	0xdf83dcd8	0x20d35872
--	0xf46f2861	0x22f3d642	0xfdcda29a	0x16adbdb4
--	0x01e5844c	0x011e5454	0xf5432b04	0xd5f6a80d
--	0xb081fab6	0x64fc2fbd	0x4ca76e0f	0x3a8d8b29
--	0x3f03ec12	0x58e2bf6c	0x24f2b8b1	0x108e414f
--	0xe76a02ab	0xcb525af9	0x623ba7a3	0x31412c27
--	0x69c2f5db	0xd5546d8b	0x8200d2c9	0xf1e34a71
--	0x393e24dd	0x2b867933	0x0596e778	0xc5112b49
--	0xf433cdea	0xbc505e7b	0xf64bb064	0x1e892633
--	0xbf17307b	0x9118de2c	0x6b1d61a8	0x1945519c
--	0x32638ca4	0x5e436733	0x3dc20ff6	0x9babf127
--	0x485c1555	0x0d0c4e2d	0xc4d5d718	0x8cfffc16
--	0xf64050db	0xaa4ef416	0x8d398a00	0xe4a16eca
--	0x5d9d9314	0xefa2bf1c	0x05917dd4	0xca5f1660
--	0x59642534	0x02639b9f	0x12b895df	0xb2deaf0e
--	0x20d8f0b9	0x04d8342c	0xa1ba5f57	0xa26cdb06
--	0xca732ca8	0xdce0c561	0xf5e4b205	0xc05f5cfb
--	0xba4a41a6	0xaf219d7b	0xce08df01	0xa02bbdb9
--	0xc1adbc20	0xcb9ae4fd	0xd828cfb5	0x690b17db
--	0xd29ae8bc	0x8fc71289	0xd6fc9cf6	0x61c7a6fc
--	0x8e8012d5	0xd3320498	0x36e80084	0x0036d3ab
--	0x53141aae	0x987d0cba	0x57581df5	0xace4704c
--	0x3ce49642	0x991556c1	0x6cb0b984	0xac15e528
--	0xe7d208ca	0x2486d1c5	0x93b6623e	0x340b7622
--	0xe7e1cf7b	0x3cdeed88	0xa23c849a	0xcc6e8b3b
--	0x292add5a	0x17763ee1	0x9f87203e	0x72cf4551
--	0x2053e66f	0x06c3a411	0xb61c2e0c	0xa4a7f3ae
--	0x0ff87dbb	0x03999ed8	0x48aacedc	0x2e126ef3
--	0x799441bb	0xaee15b4d	0xea08bf54	0x47248787
--	0xb60afc11	0x8c3d6a20	0x7c04f801	0xb902760e
--	0x319040eb	0x370bbd5d	0x9a1dd5e6	0x63f7da1d
--	0xb3784eac	0x3b304dea	0x987ada9f	0x2b6b1cda
--	0xf9241003	0x0d3d16f2	0x1185dcbf	0x519b7a5f
--	0xeb612361	0x28b57da5	0xdeb8419a	0x0ba13122
--	0x062e28fa	0x5ffb9b36	0xb1258247	0x8337401f
--	0xed1f6423	0x730cafe6	0xf728c690	0xe40557eb
--	0xc4951a15	0x04a988a9	0xbf5fe18c	0x2766e40a
--	0xe4d74d13	0x8638d052	0x8eefeaf2	0x9ad07978
--	0x32042a87	0x4385f38d	0xc9b48f02	0x02ab0ae7
--	0x9eaeb632	0xf386c14d	0x8b1c2ab2	0xad432a24
--	0xfc5bd462	0x2d7ac5fe	0x45dff5c6	0xa235e1a6
--	0x825b770c	0x5568471b	0xa7ac3a3a	0xfcc6e40c
--	0x0c1be59c	0x77685a3c	0x5b1bafbd	0x40b8a139
--	0x3dd1bf01	0xb6651001	0xf2915a6a	0x16fe1cf2
--	0xe78467d1	0x4bec9fb1	0x88615320	0xa3920831
--	0xed4afac7	0x206cffba	0x96c42567	0xcc2b5215
--	0x7ca0193f	0x0e1a60e5	0xf3892c10	0x2ceee7b2
--	0x110d3311	0x9a322e7e	0x3cb7e5fc	0x3fb971c1
--	0x59971332	0x08386001	0xe4a2444d	0x17d9c47f
--	0x9f53c4a5	0xdb54e5c2	0xfaac9f08	0x975c07c6
--	0x8a6e6bcd	0x4392053a	0x6473bef8	0x4b3b91a3
--	0xfb7e8ebc	0x46c6ffed	0x04939839	0x71b93766
--	0x47e4f74a	0x786545c8	0x77f55b59	0xdf8e992d
--	0x60a0d2a5	0x6cc8a5cb	0x113ee95c	0xa378558d
--	0x5d3b8bd9	0x3c95b2a8	0x6efa3682	0x9535dd34
--	0x3e29974d	0xa477d069	0x2dbf58d2	0x165edae3
--	0xea25d53d	0x44e3ef71	0xba6341cf	0xc61b964c
--	0x4612838b	0x62151b9e	0xc1de2511	0xa364130c
--	0xa9710643	0x1a436c70	0x97030b09	0x5cef28e0
--	0xd5197e49	0x02b9ffa8	0x1b52dc7b	0x04f9428b
--	0x01ebed2a	0x1eaecbee	0xc53c4d54	0x3e34c125
--	0x05b4f37a	0x6e3d042b	0xf1c1f40d	0x39cfe9e1
--	0xd2938e89	0xa14b9846	0xb1333676	0x31068254
--	0x4b627e4b	0xb5185882	0x101b52bc	0x73e05abf
--	0x68a4e24c	0x67e301f4	0x6bf8b538	0xc502e1e1
--	0xc3889b5b	0xdfbc6d96	0x4239d0e1	0xbf3667ab
--	0xb0c4cb00	0x3efdcffd	0x7cd9661d	0x4f5eca03
--	0x0ef218dd	0x464f0826	0x048fc539	0x6a1c63fe
--	0x76cc341a	0x1ae2945c	0x7a339006	0x858fdc20
--	0x2a4a7270	0xd4cbe12c	0x7b27e5d8	0x998cf520
--	0x4795ccf7	0x52e15388	0x86aa7b96	0xff1845fa
--	0xd49d1061	0x035b6a80	0x1df18220	0x28fc4fd1
--	0xa8e8f333	0x3a9240a6	0x41a4caca	0xee736b6f
--	0xdfa7ce4b	0xd4bf5c0c	0x4e62f6d3	0xe98ae9b4
--	0x7f544550	0x2b0706df	0x8fb2e752	0x546af9d1
--	0x8517758f	0x53f522fc	0x03bd1819	0x6fd264e2
--	0x16839ef8	0x44a1200d	0xcd5a586b	0x1ead251c
--	0xf58dd3be	0x80217ce7	0x0367ff42	0x2d8f2ce8
--	0xe8a0a689	0xba33e366	0x5dc7980d	0x005c0eaf
--	0xc0c44118	0x5553076a	0xdaf39389	0x703e09eb
--	0xc54c8112	0x4a26135c	0x36a46f2b	0xdc93ee12
--	0x7060db72	0x7778befc	0xe028fc55	0x52e86278
--	0xd0b00188	0x6ed5565a	0xb5e2785c	0x3608bffa
--	0x55c3f5a3	0xe1e41afa	0x08a227fe	0x94c793ce
--	0x650934f7	0xddc36524	0x6dac40de	0x9eec3ceb
--	0x8fe3d1cc	0x3cebab86	0x61e4d63a	0x5382ea11
--	0xa90c9495	0x0277ccb3	0x412cecc1	0x5853c945
--	0x97df9a48	0x364d9b10	0x7e8c9bf1	0x6b4974ef
--	0xd3dbaeeb	0x6626dd26	0x2b746d2c	0xfb762155
--	0xf942f687	0x1317d1b5	0x0c989def	0x5f4c0ed6
--	0x31aebbd3	0x51cd8d5b	0x3d729511	0xc07c8f23
--	0xa7f3e6f7	0x7683dba9	0x5f051d5c	0x750437f5
--	0x1b9ffe98	0xa4de609b	0x4c498e9a	0x18dfc535
--	0x376c6c34	0x19a57039	0xa70e93eb	0x7e966bc7
--	0xb6e9d77a	0x3ab98e5f	0x1607125e	0xe8845aa3
--	0xa20a2d80	0xb17ac63b	0xa07a9790	0x71e5a14f
--	0xb6b5fc78	0x4c610f86	0xb57b21b6	0x1bcfb3ac
--	0xbf812998	0xd429986b	0x02b837e9	0x0823aca8
--	0xd8a85194	0x708bad39	0xff94ef19	0xc3599461
--	0xaee622f6	0xa8b5a808	0xf801b298	0x0aeb35b7
--	0x4db4bf27	0xfa31c205	0xa047dc66	0x7e0ae406
--	0x2ceea6cb	0xef0ef96f	0x4cc4fdba	0x6161256f
--	0x94505fd1	0xbced5596	0xbf9e36a5	0x271e68bd
--	0x7a3308b6	0xef1af50d	0xb55ede06	0x6783e602
--	0x1152acf0	0xdc644ccd	0x1b692da3	0x59f6886b
--	0xd7236158	0xe39d75a6	0xe7026697	0x25496283
--	0xb6b0a61c	0x09d0931c	0xe8d459a1	0x1a124097
--	0x88e50621	0xf2ed18ff	0x37681783	0x4afa1ffc
--	0x8a96ec4a	0x4474a860	0x274591b1	0x59df3968
--	0x34f56fb9	0xce821f96	0x7ec825b2	0x6ed4a9bf
--	0x687253cf	0xa511c1d3	0xaf2bd6f0	0xd1ce1a5c
--	0x241dd505	0x39037238	0x0c761934	0x53181db5
--	0x11ad47ec	0x915a527b	0x748bc970	0xeb8f2669
--	0xb8bfd5af	0xd8d19145	0x0361ff58	0x6dc6e2f2
--	0x1fd06556	0x120db4c5	0xbd704c8b	0x70a1a57c
--	0x27543851	0x095403a6	0x28171887	0x640e7c92
--	0xb48fd7d1	0x62ad2774	0x224767cd	0x347b8843
--	0x821ca7f3	0xf94749c6	0x2bc7f40f	0x700cc1d8
--	0x50d50832	0xc2f9465c	0xa6e1cbaa	0xe0f5e934
--	0x7f33617f	0x8876cb07	0x408c24fe	0xc0cfcdf7
--	0x39152b72	0xa0ba80ab	0x301a73eb	0x6e704f6c
--	0x3b73c24b	0xd433f861	0x43192007	0xa56d2ca4
--	0x2d28bd5d	0x14f4c9cd	0xb7fe189c	0x031e1818
--	0xf8f4133e	0xdc8e7727	0x4f8f5a06	0xe7b114cd
--	0x5cb9ff12	0xdb4c5a53	0xed956df5	0xf3634f5f
--	0x6cce1cc2	0x5393f9ac	0x1184c2f7	0x0b6fd240
--	0x64771374	0xaafed1a1	0xbdc55bcf	0x976414ef
--	0x6a333e56	0x0c5cefb2	0xff2574e0	0x11b059ef
--	0xff8b7f2a	0x9651e97b	0x594fe89b	0x7be60f6a
--	0x7b7695ac	0x612036f7	0x5be0d4fa	0x25855737
--	0x12e32ee2	0x8e86130f	0x46d75d41	0x3769d438
--	0xd14752d4	0x1612ad6d	0x8f86f2a0	0x63e01251
--	0x9a44ac4a	0x49fdb148	0xe1757062	0x42798804
--	0xf21f46c1	0xed0a3794	0x5528add4	0xeddc0c90
--	0x7f188ce8	0x59568b7a	0x8e25d50f	0x9277c492
--	0x955c6e6a	0x79f94a59	0x3a65fb08	0xceb23267
--	0x7d8dce01	0xd15c492d	0xa35f005c	0x0e7cba9a
--	0x950485d9	0x2d92e448	0x4aced016	0x0d10136d
--	0x3d2ec365	0xd982e881	0xe81940d2	0xb1a84849
--	0xdb30d967	0x9f51d3d4	0x4fbe18a9	0xef21cd28
--	0x5d3cba6c	0xaa89b02b	0xbe1e9526	0xa20a918e
--	0x0c26bd72	0x8372eff8	0xcf7ab414	0x1d3ab83f
--	0xfd2c8f79	0x4929f77e	0x2416e8df	0x65dcaaca
--	0x58fbf7b3	0x1c4a3089	0x9bfb6e26	0xc7338ac9
--	0x88e5ad26	0xc62bb3d4	0xad6d36f5	0x6445167d
--	0xe9de8daf	0xc391c6bc	0xa78b4558	0x0216bcdd
--	0xbd4365b9	0xb0a874b2	0xe95e9453	0x77296b9a
--	0x49803c1e	0xc01fd0ed	0x165a9d5d	0xf7da6442
--	0x4c00818d	0xaad5bfca	0xdb252937	0x0e4e0f74
--	0x0c2738e8	0xd075b8ba	0xe3b2df11	0x8aee60a4
--	0x36052cd8	0xb4aa190b	0x413e7155	0x3e7e646d
--	0x807e6eea	0x97993e6f	0xa5129ff5	0x98e01bca
--	0xa8bd70c9	0x8800721e	0xb3407ffa	0x266b2f99
--	0xd9da73ee	0xa06f634a	0xcaae53b1	0xd98e53c6
--	0x49368291	0xc89485fe	0x938a8a29	0xb57f77cc
--	0x58c867de	0xcdac8a84	0xf4d57b6f	0xc6daf080
--	0xe3d9c67f	0x0264b194	0xc3b2ca50	0x6d214667
--	0x88503872	0x549ed8cf	0xe827689f	0xcbe94e2e
--	0x4a02516d	0x24ddcfa1	0x3cbc736e	0x34c88707
--	0x9f4c9376	0x4ced4d41	0xfdbabfb5	0xafd291d9
--	0x2fa602a3	0x53e19d9c	0x44422427	0xf85e2c53
--	0x40e91ef7	0x02646045	0x3d1fa703	0x1613b99f
--	0xa108de10	0xf9cb3d04	0x7b9f9523	0x007d74b1
--	0x961771dc	0x2e49fe1b	0x5fefe27d	0x54737b43
--	0xa11d7c40	0x7f0cc2d9	0x67c6533e	0xd1ab10fa
--	0xb1950645	0x536087d2	0xd6937b40	0xc35960c1
--	0x2df0c356	0xecb5ab53	0x61e08998	0x1671bdd0
--	0xd72935b5	0xdf1a9d7c	0x70b1aa4e	0xa9272818
--	0x1f7b8d55	0xc7292a0f	0xda7af847	0x190076ad
--	0x58370ba6	0x3020fb4e	0xff8a4b30	0x13818958
--	0x6ba1ca38	0x6a90d39b	0x5e180929	0x206e8a22
--	0x0568f241	0x5f83ad21	0xef05e5c6	0x21d0521c
--	0xe7886eff	0x68eebbce	0x550c1659	0xa0843444
--	0x19468c2b	0x539cb9b8	0xa4b18b62	0xdab0680e
--	0x1b254dbc	0x47068aaf	0xa8193743	0x44b60b88
--	0x90c07337	0x2e55666a	0x632f4b23	0x68af10db
--	0x8e29f54b	0x5f436bcd	0x8bf81d55	0xb640ccc5
--	0x2e4ab6a9	0x198697a5	0x8a1c8481	0x572fb679
--	0x7597c416	0x608fd45e	0x57c8c7f4	0xe151d349
--	0xed9e17bb	0xa66f2816	0x8175fe68	0xd57d91ad
--	0x79df0711	0x7a349868	0x13403cd4	0x7d974c60
--	0x8860ce70	0x2e6d62ea	0x8916e2f2	0x0e336838
--	0xf54d382d	0xc4e172c8	0x94bfcfbf	0x5fa53172
--	0x2933cecd	0x4d5b8439	0x0ca0e6e4	0x8ef87b00
--	0x2fdd121c	0x24beae76	0xa85b47f4	0x4e38af2e
--	0x12b8734a	0xf698abf4	0xde2c2d93	0xeb100795
--	0x8ab19df8	0x93a6f4d1	0x43c4b2cb	0xbaff7c4a
--	0xf52b1471	0x72804f4f	0x0c0ca257	0x1dc24c77
--	0xbad7203b	0x3a998fa0	0x9cb20388	0x7ef1fb3b
--	0xbae66020	0x9a22144f	0x39ac47db	0x3f145996
--	0x05a32b6c	0xd201a2ec	0xd868727f	0x08b2df4f
--	0x4583bbfa	0x9a422baa	0xa6a2e8f5	0x236310ec
--	0x5aafc3cf	0x344156a6	0x6f964ceb	0xed0495ae
--	0xb5638c98	0x2c8e84ba	0x63d8c7a5	0xec956b66
--	0x69c54f32	0x767874ec	0xe8fb6ce1	0x68b1c780
--	0xe4b861e4	0x2787cc38	0x4b2202e7	0x23b476be
--	0xecdf296f	0x094aa000	0xe95ef073	0x4182ebb5
--	0x30daa31a	0xef68cb68	0x2fbcf6bc	0x21c52620
--	0x19abf83e	0x4de7528c	0x05fe4c05	0x32c2a1e9
--	0x8c23abdb	0xabba9a90	0xa6a215c1	0x891f915c
--	0x667cd65a	0xaa5a9b2c	0x689fd1e9	0x42b52c95
--	0xd9872e76	0x05dd5278	0xc19798f7	0x8d031d86
--	0x25690670	0x165f4b19	0x76b51d6f	0x61cd8232
--	0x7b530271	0xa8e9326c	0xd952e94d	0x56a7021b
--	0x128be860	0x4da40144	0xeb4ac3d5	0x82b7ff5a
--	0xea2abda7	0x690a9ebc	0x33562378	0x6bc91b2f
--	0x46134185	0x8fb77fb2	0x029518a2	0xe1fa1f4c
--	0xf78783b9	0x5d8ebe63	0x103e8050	0x924085bf
--	0x80593f2e	0x5be4bcb6	0xcb935edd	0x882d0a5f
--	0x7deb8205	0xcdc0fe2e	0x9c333db4	0x1d0c888d
--	0xf8dc3575	0x2f901125	0x6bf48cdb	0x98ab6fb4
--	0x491d7df2	0xa064922e	0xbbb86c70	0x88aad77d
--	0xfcff0669	0xb0c47c1c	0x0fcc6fe1	0x50df8a83
--	0x014460e4	0xb014e6ab	0xbeff4bc5	0x8d939fae
--	0xd750ae17	0x42dd29c9	0xdb1cbf70	0x82265be9
--	0xd11afd6a	0x21834e1c	0xd11e3c3a	0xbe568139
--	0x6cf92d50	0x9304ebf1	0xf177046b	0xa5b127a5
--	0xfb57e4a7	0xf94291df	0x0f089d58	0x07395b5f
--	0xde4ba5b9	0xf7371fc5	0xae44f190	0xd529271d
--	0xbcaea246	0xfa777c0b	0xad3bab9f	0x0d6251ec
--	0x6f4fa894	0xc39273e2	0x7710fcc3	0x81f08a5d
--	0x395b54ee	0x87295638	0x57398bb0	0xfd46c7c9
--	0x3f1dafc6	0x548479b7	0x37c42fba	0xa2130147
--	0x99dc0bb0	0x3596c5cf	0xbcca6bec	0x418735ed
--	0xfcd4273d	0xee141135	0x8457cf47	0x95fe7220
--	0x041aaf8a	0x6e947153	0xc963afa7	0x09390a74
--	0xc40dffd3	0x4208039c	0x319b1f84	0x42b6b3b7
--	0xade789da	0x83338c91	0xf2d74712	0xe80011dd
--	0xdd61645e	0x286fc63a	0x26e2fb23	0xfef2b4ea
--	0x3290efb8	0x595a0c17	0x6cd9bea9	0x7be1338e
--	0xe0ff2c09	0x1b93aea5	0xbbd97e91	0x5e1ae1e7
--	0x7c6c078b	0x0b9b3a03	0x43d38011	0x824cd94b
--	0x9725170d	0x87ce6f33	0x60525d85	0xc0a5e853
--	0x242e613b	0xebf72857	0xcb500fc6	0x0de5c3f0
--	0x382b625d	0x08840e50	0xcef30663	0x1bc848b6
--	0xefa78141	0x81b860d6	0x4eb125fe	0x7e125296
--	0x276a5558	0x45caa775	0x7c6ec23c	0x5dcddd08
--	0xc41aa32d	0x6a2851b1	0xb69ae1c1	0x8f603c43
--	0x763497f2	0x73344cbd	0xcffd175c	0xfccf5a91
--	0xb2318bf7	0x66ac628f	0xa98fa975	0xb68e5426
--	0x27555715	0x5157a93f	0x666fd404	0xb37fcc40
--	0x563b0512	0xb70f8446	0xe10d257f	0x73793ef2
--	0x31a84915	0xe0de9489	0x08dfa368	0x9169d4fd
--	0xc14f5c9a	0x92e6db4f	0xa30b6cec	0xca04670e
--	0x8a664367	0xe8984e70	0x1c96a39c	0x655f9abd
--	0x6999a190	0x76267621	0x0f49f963	0x8ddad3a1
--	0x51fdab6a	0xaf0d6863	0x23b71bdb	0x32818c8a
--	0x6398044d	0x26c60bec	0xb0b631fa	0x938f69c7
--	0x52f11913	0x1e6fbe7a	0x92dcd409	0x419bfeae
--	0xb147bb96	0xbac5bf9d	0x08de155a	0xde8ca968
--	0x20aef902	0x62df25a8	0x64a4042f	0xef19da4e
--	0xc75fd112	0xc9863e47	0xaccfdbcb	0xd29b6090
--	0x6dc67b4a	0xa84b3cd6	0x45a0e708	0xd28673bd
--	0x00bebebe	0xd5e518d7	0xc63d647c	0xa28f5f6d
--	0x3372edc8	0xa1c44ed1	0x88e61d44	0x5e095835
--	0x2d8713ce	0x6791a885	0xae89c04a	0xf1dc5105
--	0x6423f3b7	0xf4e2f384	0x2d2761a7	0x38ea905d
--	0xa263d776	0xd1936fa6	0x2fc54081	0x429a25c2
--	0x13f6c5df	0xffffa6c1	0xfaf82002	0xe4bbb103
--	0x2fc0c622	0x669ee281	0xec785fda	0x91156b25
--	0xa9f4444e	0x354fdfc2	0x7c5f5069	0x72ae591b
--	0x73bfd64e	0x6b96d744	0xf261daaa	0x2de15dae
--	0xedaba9c2	0xf287b3fd	0x8b2097b6	0x589934c0
--	0x7edc2a73	0x469b16eb	0x247b9a22	0x8b7e6c7b
--	0x3e71ffe2	0x5275f242	0x032a211f	0x977bff60
--	0x4306ad03	0x6a212383	0xceb36448	0xa2a79209
--	0xe3842f42	0xcee0cbe7	0x37cdb626	0x29a0a515
--	0x2857ead6	0x981d5d9b	0xf0ff9b06	0x95de8cad
--	0x4dcb565b	0x065d585d	0xe7eb754b	0x278fa774
--	0xe4d8fb7a	0xe152f018	0xfb7bb25e	0x50323b64
--	0xba618e43	0xf8cb1c61	0x1b6dce25	0xb4fc7867
--	0x2a7fb213	0xea9e646e	0x3f9b735b	0x5640315d
--	0x0793ba5b	0x71ff31fb	0x4b41f1d6	0xb1538146
--	0x336f4272	0xf176d509	0xb7fc03c5	0xd6a1c927
--	0x56a68c10	0x8b4740cd	0x14c54f8a	0xf07ad8a9
--	0xa8403db8	0x37c23f2b	0xdca69aba	0x4b39ef9d
--	0x2af13bdb	0x6baace1f	0x8c7ca0d2	0xba86bd02
--	0x2a74681c	0x5542ae58	0xc36709e2	0x82b34568
--	0x26ea06be	0xd4bf458c	0xde209de7	0xa311b4e5
--	0xdc00e139	0x7d305958	0xc5d76ed7	0x0943a285
--	0x48ce4e29	0xe371bd9a	0xfe6a6501	0x4167d215
--	0x402e47ba	0x588458be	0xbf4bcf37	0xf7fa27a8
--	0xb725f91a	0xc17f5c07	0xce771dbe	0x66f9d592
--	0xe8521ed4	0x42f75171	0x343b3e74	0x2d5448b5
--	0x2d1fca8c	0xd7a32431	0xc29a88d2	0xffb07fd7
--	0xcca0333f	0x43204f2f	0x866c1867	0xcb215814
--	0xfcb67d4f	0x423680be	0xdf22f6d6	0x03373eda
--	0x3bd202e3	0xd8972fe3	0xb7733d70	0x7a472c76
--	0x6cc8a627	0x3b27e643	0xa3475f3f	0x87ffb286
--	0xf823d69f	0x6d57c38e	0xa0fd464e	0x53e2e341
--	0xaaab23ef	0x439429ef	0x55ba2a2b	0x4da5ea4c
--	0xc1fe05fc	0x874b7a34	0x9a875956	0x713ccc90
--	0x49afcff2	0x5905dc0b	0x1f5dddb7	0x8ef5c1d9
--	0xf60eca50	0x25172569	0x3525639a	0x25804bbe
--	0x5729cd49	0x17f84e66	0xc540d86d	0x51524bc9
--	0x9a6e9901	0xf5bcc70e	0xf7a73ffd	0x54509c8f
--	0xec58b8a4	0x9993703b	0x6ef45fc4	0x5ce3a507
--	0x1d73c611	0x8780e8ff	0xc7d2e02b	0x0bc825f2
--	0x02f75fca	0xe80c0758	0x24646fe9	0xd378ff5a
--	0x592c5619	0x6c80372e	0x1f7351d1	0x4db5182d
--	0x3985fdfb	0x16ca9158	0x58ee1ae4	0xaf2b9fa0
--	0xe97f60ce	0xbb911e68	0x01748fa0	0xaef578d3
--	0xc3736418	0x8ab0deb5	0x0de16af1	0xb8369f7b
--	0x68e43c12	0x914ca0f6	0xe950ef28	0x834eff90
--	0x51adb952	0xc42ee4ce	0xf70ab4a5	0xbf9fc916
--	0xed9444b1	0x845a6a1e	0xf92e7b64	0xb9ca8a1b
--	0xa9cdfcd0	0xb5956bc8	0xb8520e59	0xdde7aa57
--	0xb41d390f	0x364aef3c	0xf39d4482	0x8b4e651e
--	0x0b82f5fb	0x7960e81c	0x12ed7b84	0xe9f123ca
--	0x88a64db2	0xa0c714cb	0x57b01471	0x80ff31a6
--	0x7571d8cd	0x857035d9	0x0508587c	0x594a4a42
--	0x011503e5	0x27c75e55	0x03264f62	0x9316ed1d
--	0x36e5cd1e	0xfa9b23b4	0x5bc8c606	0x0902bd38
--	0xd6745c69	0x6fa73118	0xa50f7b94	0xc529e962
--	0x28738486	0x7b85a599	0x2c495a35	0x85f2cbef
--	0xa09dfe51	0x1c763ab2	0x4effdb5c	0x506586f0
--	0xec182a58	0x45293146	0xaf8d78b8	0xa89bd228
--	0xec24826a	0x752cc421	0xbf36aa46	0x6760e225
--	0xe15d0987	0x6fa9bdf3	0x6837c755	0x9426d654
--	0x14b48f5b	0x5d70567d	0x63a14f92	0x809d5361
--	0x3b6e2729	0x84ce5415	0x7eaca6e0	0x9b467302
--	0x8f39d484	0x8e78398c	0x33108b33	0xdc07005c
--	0xbdc2500f	0x35f1f452	0x9d254e3d	0xfa61eb21
--	0x2ab6c7aa	0x83561fdc	0x8735d598	0x416e8591
--	0xfe10e93a	0x18da409d	0xab6d0bfd	0x675baaf1
--	0x287fdd24	0x6b50b63c	0x8c08abca	0x871a59c9
--	0x41bb2ae4	0xfba9abdf	0xb46491c7	0x4e433d5a
--	0x01e4fbda	0x0bc40399	0x3bdb61c2	0x3cf051ba
--	0x910daa46	0x8d4065d6	0x270667eb	0xf6d42459
--	0x01993a1b	0x00a95dda	0x6ed5a693	0xed4fbf7b
--	0x24dbb70f	0x67fd62ee	0xcef5f0a4	0x9e65b798
--	0x9a9913fd	0x3d0e7190	0x4265b4e4	0x80bfc46f
--	0x6b354d2c	0x2b90a987	0xc989cb75	0x773e6b64
--	0x55325e9f	0x18816a56	0x07413406	0x5177ae31
--	0x24a19ef7	0xdac405a4	0xdca2d3b4	0xab7c7b70
--	0x42b5de0e	0xfcf918a5	0xa54d934b	0xcaa9eab6
--	0x50e63e2a	0x4b168926	0xb2442913	0x594c0f94
--	0xf387f31f	0x4d716749	0xc8433297	0x34c1a5de
--	0xe929008e	0x5644251b	0x736476d0	0x0d00aee7
--	0xf20b2f64	0x5e158173	0x9af3e568	0x5f19fa7e
--	0xb23b2861	0x8659ee6e	0x94058a64	0x66ec4fb1
--	0x37cd6a4a	0xbd2944fe	0x0ea44ec6	0xe7d64c24
--	0x75a170e3	0xb4a9479c	0x2215716a	0x64a8a574
--	0x257e86ab	0x86bae993	0x3030352b	0x15cb88bc
--	0x576363a0	0x61138c36	0x7cc4fe7f	0x648977a8
--	0x0ef71fec	0x1c60df47	0xc75f70ea	0x88509798
--	0x172b407a	0xf888e400	0xef33cd15	0x5976757d
--	0xf8cfef13	0xbf024380	0xbb9c1b02	0xe4c38ec9
--	0xf30fce01	0x8efa5213	0xf4b48aad	0xc94c3a37
--	0xeb1bcece	0x09a18b56	0x4e83c0d3	0x6fcf9f77
--	0xf52f4d76	0xf3368a12	0x33b2797f	0x627b6e41
--	0xefd05154	0xa83ae2a0	0xea211129	0xd25723d5
--	0x7bbb0e3b	0x7131f088	0x5dd5193f	0xef5aa905
--	0x39f77be7	0xa21b48c1	0x1ded01c1	0x5cf98c5f
--	0x6e23d207	0xd7e7dadf	0x5932ed1a	0x2a729061
--	0x29a89f4a	0xac0e8447	0x01ff4205	0x8b1456c6
--	0x3fba0156	0x658c03f7	0x5c69f968	0xf6570582
--	0x21bb0145	0x8683bf5b	0xa4b6eba5	0x4ccfe5cb
--	0xd202898c	0xbd2411cc	0xc2fc702a	0x5c39b695
--	0x87584ccf	0xeae3c735	0xc472b6f9	0x4249f637
--	0x3fa89c0e	0xce5a8bd7	0xbb28138b	0xc080ecb1
--	0x9cbf1916	0xd70424e9	0x75cc4ed1	0xa575f3e9
--	0x1c571f68	0xe2906205	0xc26520cf	0xf9c1fc8e
--	0x61c982de	0x1af6cfcc	0xaf397c9a	0x46830771
--	0x623d98bb	0xda7b52fa	0x5a3c57d3	0xfa35d2f0
--	0x4783df19	0x6ad07325	0x487406f4	0x3fae5152
--	0x189137cb	0xd98a644e	0x17ffe880	0xeb6aa9f7
--	0x67184e3e	0xe475734b	0x0f1113c2	0x39a4df47
--	0xbf8f6ec9	0xe13a4d8b	0x63ec02f5	0xdfe7d75d
--	0x1379034c	0x5db7314a	0xa9d9ad3e	0xfaaed8f2
--	0xf0fb6074	0x12f27b84	0xc97a92bb	0xae5e3bb7
--	0x5f7fc2bf	0x00cbc1f7	0x9360a4d9	0x3632ba04
--	0xad044c83	0xeda13ec1	0x34a214c0	0xcf9c972a
--	0x96352243	0xf1a35357	0x2d77bc30	0x8485bbad
--	0x67fbaa99	0x8035b1a5	0x8ca763c0	0x109d7887
--	0xa1c35cd8	0xdc79e308	0x4495404d	0x64419226
--	0xacdcea08	0x9545c0ef	0x5493e09e	0x7fe16336
--	0x41381aa2	0x5c344f46	0xb40cab9f	0xc43951c4
--	0xd86e52a5	0xb141d934	0xd78efcff	0xf37ec320
--	0xc184a45b	0xf4a57954	0xc8aed0bd	0xe602c15a
--	0x71a6b48b	0xce837428	0x02733706	0xc4a4a044
--	0xa75efb97	0xcb63d62e	0xd0580b5a	0xce499087
--	0xc12bf4ca	0x9c995345	0x1d8adfbc	0xe62fd60e
--	0xccbf5412	0x6161f8d0	0x64268e34	0x565d066b
--	0x1896b63f	0x838f8f2a	0x1e314a00	0xac470276
--	0x1879cfdf	0x4702d7f9	0x83b4d777	0x81fcb068
--	0x1b6da94d	0xd075ed01	0x3c7734e8	0x56389a0b
--	0x0743b9cd	0xb6b0bf0d	0x63107ab9	0x193172bc
--	0xc7b84c8e	0x982ce2aa	0xb8e387a6	0xc264a4b0
--	0x2ac6c802	0xb89ea335	0x052332a4	0x49932ecc
--	0xb940f808	0xa7a09330	0x19f3f49d	0x7aef6b5a
--	0x201d8ed0	0xf29aac4b	0x8ae2ac0f	0x998c1ca7
--	0x665c3927	0xab4ef641	0xf136710d	0x9644ee9b
--	0x34efae96	0x4c596035	0x8cfe8b3b	0x5d9f742e
--	0xab2c63ca	0x017d864d	0xd0604d6e	0xab24eee0
--	0x75916a9a	0xad0d1167	0xbeb47775	0x6ac822d1
--	0x776907aa	0x9e9377f2	0x438c5d81	0xd70e9964
--	0x1c09c914	0xab90e5cf	0x31cee523	0x26ba6ea7
--	0xef00781d	0x622b886d	0x36a54031	0x88b1221c
--	0x666333f5	0x60e1c93e	0x5e4d0e0a	0x3ee6ff69
--	0xceb4c76b	0xa5deb4f8	0x0668ced8	0x30225378
--	0x6697cf37	0xc5d9661d	0x089eab85	0x7684a876
--	0x018a81af	0x221a7fb2	0x31d80de0	0x9f18ae90
--	0xa29c9af0	0xc3e2b00f	0xda0edbab	0x7ee9cd2a
--	0x3ab0f88e	0x02c58228	0x606fa7aa	0x7776cb0a
--	0x4e8ad99c	0x3b527469	0x58123d62	0x4ce428d2
--	0xee91a210	0x466ba2cc	0x043c57b9	0xaf7bdd43
--	0x98e76fee	0x8f3eac1b	0x00dffd6c	0x6fcb1c6a
--	0x5cb90573	0x485d4505	0x0df5418a	0x26eafe35
--	0x0faddf3e	0x4e972930	0xe113c823	0xe45944d1
--	0xa646077f	0xc1708ae5	0x6ba07c20	0xc7e4e234
--	0xc6754ed5	0xbd6e85aa	0x8cc1756e	0x02afda29
--	0x72809597	0x75b6f5a1	0x61141874	0x1774047f
--	0x7a10afed	0xfac2c4ad	0x42cf5c99	0x24f0350e
--	0x042f2864	0xfab55b67	0xc8ead5bc	0x914e9512
--	0x77c8ef6b	0x8369aeb1	0x71bc947f	0x0c6b49d8
--	0x8ddd0513	0x028ad10d	0x99a1b28f	0xe6cfbdc8
--	0x7978b4a6	0x3ebbade8	0x9985f5cf	0x431f42f1
--	0x004372b2	0x18b67f68	0x20111c21	0xbb6f77ff
--	0x1783b030	0xa045d7d1	0x0e9c7e09	0x3ccbd95f
--	0x0b84a2ed	0xf0ee3325	0x63f2e126	0x5ec4c67b
--	0x2ca782cc	0xcaf20d04	0x8b59d515	0x3212aa33
--	0x335ca0c3	0x6f9e0cdd	0x4d4bf189	0x44d2fa0c
--	0x5abe9396	0x492794ee	0x10dcfcb1	0x9acda9bd
--	0xe8aa2803	0x3f1b9605	0x3e2ecb5a	0x971bfa8a
--	0xcbf141d2	0x0afafe10	0x2fc906a6	0xefad20c0
--	0x9e922581	0xe69142cc	0xc9c0ba82	0xc069e640
--	0xb99c08b6	0x4b62ca1f	0xf3c5767a	0x6ab088c7
--	0x8f0f0c0b	0x6726f64a	0x9711a3cd	0x46462571
--	0x3a58350e	0xa2561911	0xe24dfdfe	0x97443fdc
--	0xf80540be	0x069978bf	0xb38a359b	0x8e574f62
--	0x69aea75c	0xdc753fcb	0x2a74002c	0xced027b4
--	0xda993254	0x03409b83	0xf827331d	0x75fb3271
--	0x01ad839d	0x68520842	0xca65c45c	0x1a3db5a0
--	0x91d37dd3	0x6168c0fb	0x935f5a08	0x002007c3
--	0x42eb4760	0xdab3a804	0x72a6297e	0x905c32d9
--	0x81abcfa9	0x1b21d04a	0x5a1289ae	0x424e7183
--	0xc207906c	0x31fe9134	0x5eb2e5af	0xc9253fc7
--	0xc32be24f	0xe5474cbd	0xeff6e1b0	0x710e5e69
--	0xe6c4c538	0x96b5f1de	0x2abc9c35	0xddbd1a92
--	0x8aca40d7	0xe359c238	0x954718f4	0x18b157e5
--	0xeeed790e	0x6948a963	0x24e70bfb	0x4d681547
--	0xf68369a7	0x5b54409a	0x1f0b787a	0xc2610047
--	0x0f8bd269	0xd7c8c154	0x9dee62d9	0xd4738ed8
--	0x1a66c6b1	0x5bad5a5b	0xb110311a	0xfaec6802
--	0x6b750f2d	0xcbf8d0e0	0x11edaf4b	0xf64a07bb
--	0x422e7c15	0xb1732663	0x1ff404f0	0x2d5052b0
--	0x6e45356c	0x7e2201e8	0x7c5ebcd1	0x1cb4425a
--	0xb1539a64	0xa2e4459f	0xcf1ade8a	0xfc476473
--	0xf4147deb	0x2afbdd77	0xff01fabc	0x6597408a
--	0x0951220b	0x6750f3ec	0x0a242763	0xf3d71c05
--	0x84cb1c26	0xdb7a81bd	0x7aea1a5d	0x7e719a48
--	0xc5c12fe1	0x0ce2e988	0x29ecc6f0	0x5ede901a
--	0xda8399b1	0x31c05d6b	0xe1956aff	0x59ed7c3d
--	0x60832637	0x9bcb7cac	0x63c530d1	0x14c677de
--	0x9225ed18	0x065327c9	0xd1ff6a0e	0x5516517e
--	0x53c6f5c2	0xed5983cf	0xaa1d18b9	0xbe300d7f
--	0xadc525a7	0x07ea81b6	0xfc517a09	0x4ead3f86
--	0x45435f41	0x2efa58df	0x02348ebc	0x30ed6783
--	0x190b4fb9	0x85c55d6e	0xc9ed8896	0x416ee113
--	0x9b3536d9	0x30577cc0	0xbc4b88c8	0xcda59612
--	0xdfe2bd89	0xd60cde71	0x98843881	0xcc1f32f2
--	0x18b3f643	0x671a14ca	0xd6482a47	0xac6a7d38
--	0x1897da16	0x91b6fcb3	0xf199bb35	0xd38c00ba
--	0xa8c946b6	0x52a1ad37	0xd38ed2d4	0xa1d6f81d
--	0x5af6865b	0xebdb858f	0xb844b110	0x53201ea2
--	0x08870945	0x10c869de	0x19849613	0xdb35d3ed
--	0xd68ebd6e	0x1056fd48	0xf1a0e305	0xe3982ebd
--	0x6f7cc391	0x5956374a	0xf414a5a2	0x325119ab
--	0x99ee1f96	0x6f044bd9	0x8374805b	0xb55c366c
--	0xa2c77051	0x68f199e5	0xd36a9714	0x878f847b
--	0xec0394ae	0x86d0584b	0xf4df66b9	0x451cd039
--	0xf4de06ae	0x35dd0554	0x818a342f	0xeefdbfc9
--	0x5b4e9edd	0x22d9313a	0x3b710d60	0x6deaeb4c
--	0xa9e26512	0x98d31867	0x3c2c2d61	0x7eb5ce41
--	0x40890db6	0x7a3aa660	0x3ef4f306	0x7322881f
--	0x49dac4d5	0x96efe685	0x27bb7f49	0xbb955283
--	0x79c5f2b7	0xff599c28	0x28ee7f5e	0x9f324b73
--	0x45edb7cf	0x39a8b79c	0xd0919c6e	0xe149b29d
--	0x62f5f82e	0xebcfa23e	0xd4d68937	0x54270090
--	0x958af0d4	0xa1e4e799	0xaf68ac19	0x82a84f4e
--	0x50f67b84	0xd5e59629	0xf5fdf24c	0xab1d63c5
--	0x30835807	0x431fce5f	0xe5f96f4d	0x3f6b4802
--	0x14010be8	0xdca45ae5	0xc82709af	0xff76ce2c
--	0x8b222c22	0x73a2d948	0xa8d59cea	0x8c31849e
--	0x469c2e5f	0x3777ee84	0x5fdfa5da	0x02ef9bb2
--	0x792d3194	0xbed63f21	0x0b6dc5f1	0xc9d7fe08
--	0x6df7883d	0x366566cf	0xef772769	0x37826465
--	0x1cdc3086	0xa69ff7b6	0x235012ea	0x292f7e75
--	0x30bdd0fd	0xffdc9df1	0x95c6d570	0xec206204
--	0xc6cd42cb	0xc0d6dfd9	0xb7a16b71	0x17fa527e
--	0x295f2c79	0x990f9820	0x8b8f447d	0x193f9ad1
--	0xebddb2af	0x5dd532eb	0xf1bbd8e8	0x3444a3f4
--	0x18ccce93	0x05edeb4f	0xc4a6b935	0xba37aab0
--	0x96076ba4	0x250dc2f7	0xc4093548	0x030e777d
--	0x7ea40933	0x8da7b1dd	0x59c0b79f	0x807d437c
--	0xf5233ddf	0x54c1983f	0xfc18771b	0xe74b85f0
--	0xdbd725b5	0x70cdd153	0x4ffe300c	0xfda4bdae
--	0xf4ac75d2	0x91c4e15a	0x34d92b97	0x16356a79
--	>;
-diff -ruN u-boot-2015.01-rc3/arch/x86/dts/Makefile u-boot/arch/x86/dts/Makefile
---- u-boot-2015.01-rc3/arch/x86/dts/Makefile	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/dts/Makefile	2015-01-01 17:34:32.253503252 +0100
-@@ -1,6 +1,7 @@
- dtb-y += link.dtb \
- 	chromebook_link.dtb \
--	alex.dtb
-+	alex.dtb \
-+	crownbay.dtb
- 
- targets += $(dtb-y)
- 
-diff -ruN u-boot-2015.01-rc3/arch/x86/dts/microcode/m0220661105_cv.dtsi u-boot/arch/x86/dts/microcode/m0220661105_cv.dtsi
---- u-boot-2015.01-rc3/arch/x86/dts/microcode/m0220661105_cv.dtsi	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/dts/microcode/m0220661105_cv.dtsi	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,368 @@
-+/*
-+ * Copyright (c) <1995-2014>, Intel Corporation.
-+ * All rights reserved.
-+ * Redistribution. Redistribution and use in binary form, without modification, are
-+ * permitted provided that the following conditions are met:
-+ *	.Redistributions must reproduce the above copyright notice and the following
-+ * disclaimer in the documentation and/or other materials provided with the
-+ * distribution.
-+ *	.Neither the name of Intel Corporation nor the names of its suppliers may be used
-+ * to endorse or promote products derived from this software without specific prior
-+ * written permission.
-+ *	.No reverse engineering, decompilation, or disassembly of this software is
-+ * permitted.
-+ *	."Binary form" includes any format commonly used for electronic conveyance
-+ * which is a reversible, bit-exact translation of binary representation to ASCII or
-+ * ISO text, for example, "uuencode."
-+ * DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
-+ * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
-+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-+ * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-+ * ---
-+ * This is a device tree fragment. Use #include to add these properties to a
-+ * node.
-+ *
-+ * Date: Sat Sep 13 22:51:38 CST 2014
-+ */
-+
-+compatible = "intel,microcode";
-+intel,header-version = <1>;
-+intel,update-revision = <0x105>;
-+intel,date-code = <0x7182011>;
-+intel,processor-signature = <0x20661>;
-+intel,checksum = <0x52558795>;
-+intel,loader-revision = <1>;
-+intel,processor-flags = <0x2>;
-+
-+/* The first 48-bytes are the public header which repeats the above data */
-+data = <
-+	0x01000000	0x05010000	0x11201807	0x61060200
-+	0x95875552	0x01000000	0x02000000	0xd0130000
-+	0x00140000	0x00000000	0x00000000	0x00000000
-+	0x00000000	0xa1000000	0x01000200	0x05010000
-+	0x19000000	0x00010500	0x15071120	0x01040000
-+	0x01000000	0x61060200	0x00000000	0x00000000
-+	0x00000000	0x00000000	0x00000000	0x00000000
-+	0x00000000	0x00000000	0x00000000	0x00000000
-+	0x00000000	0x00000000	0x00000000	0x00000000
-+	0x9557a557	0x7d7a0fe3	0x8e2fbe53	0x0db9e346
-+	0xd35c00d6	0x21bb34b7	0x662b6406	0xa0425035
-+	0x3d028208	0xcb843695	0xee06be0a	0x9817efa7
-+	0xb86c0d16	0x45f70c93	0x79fdc3af	0xd5f30da7
-+	0x460f62b0	0x238a0470	0xf0ec95bf	0x97b9c176
-+	0x6d612851	0x69b9b4b6	0x1df769cc	0xe11674df
-+	0x1b579adf	0xc8bcc050	0xcdb3e285	0x327592c1
-+	0xbeb6047a	0x977f6be5	0xc4854052	0x27f38b66
-+	0x4ca5eab3	0xf806decc	0x2be4b409	0x460a3b03
-+	0xde2f6e0f	0x53ce08b3	0x3ef0ef93	0x4e013088
-+	0x226f8a5c	0x57f7d291	0x8d640bf7	0x8a998907
-+	0x40464dd8	0x804ef3e5	0x647e35f3	0xeabee2d1
-+	0x3a5ce9c7	0x4d7ee530	0x564321ec	0x9e85107e
-+	0xd595581d	0xcbf6efde	0xed3010ed	0x3d607e82
-+	0xe32d4b6b	0xd06fec83	0xf39240a6	0xe487988d
-+	0xddbefcbe	0xefaf1121	0x96bf9acb	0xacce795c
-+	0x7fa5f89b	0xbe440e5d	0xb6d3a3dc	0xcad17290
-+	0x503ae748	0x04c80b8d	0xd394ea6a	0x3e4072c3
-+	0x11000000	0x0b0ae65d	0xc6c53cbd	0xd52a6c2d
-+	0x84cc192f	0x89498e7d	0x89270686	0xe68105e0
-+	0x4073a570	0xd3338d8e	0x51193152	0x7266182f
-+	0x980553fa	0x51b89c90	0xd13b6151	0xe6e40a91
-+	0x0ab997d8	0x2d0a443b	0x9d3d566d	0x820402d1
-+	0xdbe79fcc	0x7c5e0b45	0xaf94216d	0xbf717950
-+	0x520b3dd4	0x566a3396	0x0b6f794f	0xc5dfeda5
-+	0x71ba0f02	0x4839a5ed	0x39a4e4a6	0xe567c652
-+	0x0e044997	0x84a0effd	0x09c67178	0x89a815c8
-+	0xac821555	0xd6719303	0x582b964e	0xfe3a53f6
-+	0x241b9b8b	0xc6e65457	0x623a4e0a	0x590d7d03
-+	0xe50e7ce1	0x4bca4700	0xf24f5eff	0x1f1b20d9
-+	0x77e3227e	0x699b5e5d	0x9aa5f621	0xff08bba0
-+	0xf17ce716	0x0f5336f5	0xbce055a7	0x8cea9dac
-+	0x8e09d26c	0x66c3ddf0	0xbec71660	0x75248cd2
-+	0x29afcf8d	0xa5ade5ce	0xf68bace5	0x63b513cd
-+	0x4736a842	0x4dbf80df	0x4e85fbdf	0x4dce3d56
-+	0xf2150fdc	0xc4232709	0xffdc3e3a	0x92b72a3d
-+	0x9ffce715	0x682959d1	0x091ba33c	0x0f1dc729
-+	0x2f29a924	0x1df72429	0x19b0365d	0x2d5a3cd8
-+	0x20617351	0x109074f9	0xf232874a	0x40d79569
-+	0x97dbe4c6	0xa3b66845	0xa04d2faa	0x6dce9a96
-+	0xd4963c67	0xd4516f76	0x64a0b04d	0x0b87ddfe
-+	0xd8a5305d	0x717ecf67	0x77189035	0x40542ed4
-+	0x5a180ff1	0xb2042e2c	0x6639819b	0x0f0756c3
-+	0xf939bd70	0x25efe0d6	0x3eb65ae9	0x39a057d2
-+	0xb2595655	0xf808b4fd	0xe22d0593	0x76256500
-+	0x0eeee6ee	0x6895d1cf	0x9fc117a7	0xd19e5f15
-+	0xf677f085	0x1ecdb30d	0x704d0975	0x9099f42e
-+	0x421be0b2	0xd02548bd	0x3a16e675	0x7d8b051d
-+	0x9d24480f	0xbc006432	0x184da9ec	0xbad7abef
-+	0x299f58aa	0xc1a249fa	0x8d9d31f3	0xe73cda17
-+	0xf41ac993	0x7b88d3bb	0xf349c676	0xb8341361
-+	0x1b69bc01	0x98e0bfd2	0xf31db8d9	0xeb49b275
-+	0xabc40133	0xfb7d0701	0xcd5ff353	0x4eaceb8d
-+	0x67aac555	0x6d81693b	0xe81c555d	0x5d7f3688
-+	0xd4347083	0xcd861b1d	0xd332f2cb	0x43130028
-+	0x7f1a1c51	0xe2ce3af2	0xdff5076e	0x6ef21237
-+	0xf65fc8c4	0xbd28ff14	0xd70f49a3	0x4f559249
-+	0xd6fe7530	0x1fe89b4a	0xc1cc8975	0x2fd705c5
-+	0xf2993d77	0x60f2e3da	0xe3ca3c44	0xbd0f70b1
-+	0x0d333d10	0xa29a6aa1	0x43b5a6d4	0x30d15a08
-+	0x6df9564a	0xea09045d	0x54ca3f5a	0xfbcfa037
-+	0x6dd64d1b	0xa4a8995c	0x1f4298f0	0x3f4d9a86
-+	0x924ee146	0xc2e3f464	0xc247747f	0x8bf5c7d7
-+	0xf8f0b05d	0xf65a115f	0x4b1ae4e5	0xe131e187
-+	0xfaf713c1	0x5ff88660	0xcd4916b0	0x448028e0
-+	0x140711ca	0xffe77575	0x8b7740bd	0x82b6ed95
-+	0xd94d9647	0x2623c011	0xd54fba11	0x30a7050b
-+	0x28fe4069	0x70b8bf7d	0xf786eb6d	0xe39db734
-+	0xa3290669	0x8747e1d6	0x35804a42	0x1c26ed60
-+	0x30a8880f	0x8170a277	0xa1d97657	0x6ebcb3ed
-+	0x3bb6ce89	0xff808c1b	0xc919fd1e	0x911d8b14
-+	0xcbf41a24	0x82abc738	0xfb5e988e	0x328aa123
-+	0xf19146e3	0x587baa80	0xd105e811	0x83b09389
-+	0xa29fc554	0xe3831a28	0x183f8de7	0x4ef5656e
-+	0xcc940baf	0x938bf4b4	0x90627bae	0x14fc3cdb
-+	0x75e45681	0xf912c1b3	0x7a5b8a0f	0x3b970524
-+	0x6a74d34a	0xb3da9fe6	0x847a3bd8	0xfc4f7dd6
-+	0x88fd7f3b	0xbcd74a15	0x3afed836	0x17e31cd0
-+	0x5d866dcb	0x0ab69608	0xe334f0fb	0x7181d4a3
-+	0x8dc87560	0xd9c94d6f	0x491c2c91	0xca295ed6
-+	0xfb8dcd79	0xeb4d3f89	0xec581071	0x0457ebc6
-+	0x6b63590b	0x9dde4b79	0x3dc0a0aa	0x41ec8a1e
-+	0xfb2ab80e	0x07adc629	0xb8534a4f	0xd0d23901
-+	0xcfd024da	0x47c4163a	0xc89d26bb	0xe5cac48c
-+	0x17c7fbba	0xd992f42e	0x466f5e35	0xce48304e
-+	0x394683c8	0xef6e6b7a	0xb9d1242d	0xb961debd
-+	0x432a3dff	0xa4931ea7	0xd9f03907	0xc29e9ce6
-+	0x4fccf4c9	0xbf234555	0x0b6a6771	0xb29f29ef
-+	0x7edc4bfd	0x781dcf74	0x4ae31020	0x1ab72d9b
-+	0x0ac457e2	0xf9291e09	0xd4084918	0xa540d999
-+	0x223408d3	0x0bd039aa	0xaf0dd904	0x9cfd6a01
-+	0x826c6bca	0x8e41a96d	0xa56fc4ee	0x6a7509fb
-+	0x5cd2e6fc	0xb89aa158	0xb1e5d3f5	0x92ccd05e
-+	0x995d5acb	0x5ed1dc08	0x75038dac	0x4377c835
-+	0x265d66d8	0x3692096f	0xcd69ee59	0x310df351
-+	0x087e3133	0xe89e2d58	0x137fd054	0x00f3562b
-+	0x2ae304e5	0x9db0316d	0x6868cec6	0xb249ccec
-+	0x9f602c90	0xd3715e7c	0x3fcc8a62	0xa1c1e065
-+	0x5b4281d4	0x124dfd7e	0xe9d21462	0x77cbc940
-+	0xf915f2a5	0x66df82fc	0xa8c67c56	0xac4d461b
-+	0x836deb52	0x95fbb48d	0x3454b6bd	0xd87d7a64
-+	0xe64d32b8	0xc44c2aa0	0x3e213c1f	0x4d31b94d
-+	0x4640be5e	0xe127234b	0x9ca54856	0xac7d093f
-+	0x03d0508b	0x30f5121d	0x6e347d91	0x47772312
-+	0x318ea26e	0xad3f6902	0xb5598746	0x8be3b65b
-+	0xc8bbd31d	0x24691564	0xee77d2e8	0x3581944e
-+	0xeff8eed5	0xa29ea86c	0xc2597492	0x23c1c118
-+	0x7810c079	0xb966ee47	0x823e9954	0x9e558c0a
-+	0x74759c12	0x193c6b4e	0x7544597d	0x65c9bf8a
-+	0x68f5e263	0x718c679b	0xc8dc50ba	0x5f5ab841
-+	0xc3eaf579	0xc2072358	0x62481939	0xffe7e686
-+	0x201f3215	0x1d88dc8e	0x28fb4002	0x40c56ec5
-+	0xb7bcce00	0xd52f5042	0x84498e04	0xcc97fb7d
-+	0x64035e93	0xcd3478a4	0x15d63309	0xa9e47b85
-+	0xe835e45f	0x9de598b7	0x94f569f7	0x56689b0c
-+	0x381f9173	0x708b3e52	0xc81f0649	0x12113041
-+	0x4694aae2	0x69040fc0	0xe4ba7bf4	0xfadc5729
-+	0xc168381f	0x1985f118	0xab0ca720	0xf0150799
-+	0x42690e4a	0x71af3be9	0x9325f3b8	0x36575996
-+	0x4dc1dca7	0x7e534c37	0x01830a21	0x221eef4f
-+	0x18698322	0x57a80837	0x483ae2d8	0xef905b54
-+	0xe01827de	0xae9a8ff1	0x0058be7b	0x052632ad
-+	0x9df5c90b	0xb763fc7a	0x5535c95c	0x8eb5916a
-+	0x75fde5cc	0x57d8eeab	0x0dcc35c6	0xbf11c88f
-+	0x69142118	0x4f35c928	0x7966066c	0xb2d13b4b
-+	0xdad06d34	0xb5d8f5c7	0xe0bb11e6	0x8a36325d
-+	0xc1122d64	0xcf07a1a5	0xfe7ce9b1	0x176b624b
-+	0x4de883fd	0x00a9024b	0x3d3f7271	0x5072895d
-+	0x2634e158	0x2f3c9a35	0x95e374d1	0x65e66528
-+	0x47766433	0x4cb805ff	0xbc8f0319	0x6d5055a5
-+	0x4932e8c2	0xa93fbb4d	0x87f08bd9	0xf5e5706e
-+	0x409af40e	0x017edf5c	0xc5394c71	0x6fb97b6d
-+	0x7b5ddb6b	0x0256adfe	0x76d337e2	0xa3327113
-+	0xfbb4cb29	0xea68ca27	0xa76a865e	0x8cdb2dd3
-+	0x902642bd	0x16772269	0xb2341eaf	0x858fa943
-+	0xb087fac9	0xd17de85b	0x3d9c248a	0x0bdcf2d0
-+	0x874fc03c	0xf19f2591	0x190c06a9	0xc6b5c3ea
-+	0x472b6245	0xdb9f8201	0x46d27a0d	0x52218ffe
-+	0xece78c44	0x3ef6e38a	0xfcf19b65	0x536c840c
-+	0x86d363e8	0xaa852826	0xde17e3ec	0xa9c3b45b
-+	0xd322302a	0x48f03728	0x2f60d01a	0x3b356752
-+	0x8a869fd4	0x055d04f4	0x765074fb	0xb0b5c2d1
-+	0x865ad360	0x0cb6c6e8	0x5de9cf99	0x863938d3
-+	0xd4d9aeea	0x0babfa86	0x172cfb57	0x972d8f4f
-+	0xe9aeeb95	0x6acbe297	0xf2459e42	0x415fdd12
-+	0x84b2e67b	0x47d2d466	0x44bc85a4	0x1a55b957
-+	0xe4d01142	0xbf4ea387	0x5651e1a2	0x19124703
-+	0x8aaed1b2	0x841f3ecd	0xc6d6cc4f	0x1f2d8565
-+	0xba08e74a	0x68e5ecf4	0x07af5ef4	0xdd5a43a9
-+	0x6086c705	0x37ced045	0x0fb05ca6	0x35f39f3b
-+	0xda1ecbef	0x1daf6d76	0x5481d7ed	0xc51e8385
-+	0xa705e11e	0x127d2a7f	0x654d4710	0x1a34370e
-+	0xf8496ea4	0x4392b6ec	0x2f209933	0x9c5ab017
-+	0xa4f7b837	0x33e0a7d0	0x98fb0635	0xdefc042a
-+	0xc7a1f6b5	0x47107766	0xd06acfba	0xb8ac2a93
-+	0xe21cca44	0xf0150492	0xd4de2e01	0xe0d6e9a5
-+	0xa758b5df	0x2e1c31c0	0xc4794495	0x3d9cc157
-+	0xf94aa4f7	0xc2325855	0xcf9ddd12	0xaa70e611
-+	0x2b2404b8	0x75d87f38	0xa2a6f772	0x61abfa04
-+	0x23b61fb0	0x87f4067f	0x355abf99	0x2c4e6c48
-+	0x2dc8a3b2	0x119b08b5	0x3f1f6d09	0x374372f0
-+	0x24d79d32	0xef2b58be	0x461ab91c	0x1d31267e
-+	0x8b1b2c7e	0x27a4f103	0x1686c7c3	0x55af0d87
-+	0x61c2503b	0x9ffcca7f	0xc3cbdd07	0xd49a4f3c
-+	0x9ddc2ac9	0x335e1b2a	0xd8dcfc08	0x6e83f11c
-+	0x53de9e30	0x7b774670	0x15a97571	0x1ecacf66
-+	0x26581520	0xeee3496b	0x1fdf8174	0x4ddd3c61
-+	0xaa504fc2	0x0b09792e	0x9b81d1c7	0x10765c95
-+	0xd3e7b9d1	0xefdb38f9	0x4c44d38e	0xaaf8fd08
-+	0xceb22e7c	0x5ac74242	0x6baee02d	0x5c7eaa5b
-+	0x27265dca	0x614c3b5e	0x2994874d	0x486d48a3
-+	0x5945c4f9	0xe465f343	0x934e55de	0x633199a2
-+	0x147222cc	0x9bbb0c16	0x6a7e7ef1	0xb7bce9b5
-+	0x13413d18	0x628231af	0x0fd2d58c	0x4cbafba0
-+	0xa930fae6	0x91733823	0xe06f99c3	0xda3b57b7
-+	0x04b8a9dd	0x53451e33	0x11fde5fd	0x0e35bcb8
-+	0x3a5799d4	0x3893f9c0	0x6b9d0e1d	0xf8d948ce
-+	0xa33a6628	0x7d09792d	0xd74b3719	0x0afb4de0
-+	0xfaa5a685	0xecf7f8ac	0xcf34b855	0x89453b4d
-+	0x12f028c3	0x45edc3fd	0x792c43fc	0x2b054962
-+	0xb8799a92	0x0ab38d61	0xa6c6a76d	0x7670cdbd
-+	0xf878b511	0x9a3474ba	0x478673f0	0x7398bba8
-+	0x4fa10ff5	0xf0a1931c	0xd5938e03	0xe9a23c28
-+	0x7bea2a5b	0xf7a8db22	0xb94ae0e3	0x2abe6385
-+	0x0ef2cc36	0x6b997544	0x1e8cc4f1	0x69a5b182
-+	0x54f9b7c7	0x8fe56cba	0xc7c12fcc	0x8d689865
-+	0x2d6ef011	0xc6a1b740	0x66af0a76	0x76018cdd
-+	0x30661377	0xcf1fcf93	0x08046423	0xdf9371c8
-+	0x1795ec3e	0xf5ea09c6	0xe462de69	0xd7da78a1
-+	0xd8bda1eb	0x1179f53a	0x2b394767	0x3ba153a7
-+	0xf9c85bd7	0x5700c827	0x8478ac99	0x080a2f52
-+	0xdd1c18f1	0x579cea67	0x345c56ce	0x4563f16a
-+	0xfa1a5b74	0x0b6e233e	0xadc7bd9a	0xbee6d2f0
-+	0xa249f3ef	0xcdea9b77	0xeaaed82e	0xcc4448a7
-+	0x34f7cafb	0x7621bb44	0x4965b0eb	0xe6d6b8bf
-+	0x3c683b25	0x33bcb5fe	0x3f376249	0x5b40dc67
-+	0x658bf6aa	0x7f0c5d0d	0x61514591	0xeb3bb83f
-+	0xc2e208dd	0xe82f08f2	0x6ef75ae5	0x9c11bc0d
-+	0x289c0553	0x1578ce5d	0xb7f05c0e	0x818c5ebd
-+	0xe566ec9b	0xc6995b3f	0x0c02aac3	0x2b4264b3
-+	0xf9cad304	0x5b0479fb	0xf8ce8d6f	0xb7d80d8b
-+	0x41a0d223	0x71ec8a7a	0xc9d74d41	0x245c5988
-+	0xf607fc59	0xf1c7b6ab	0x142ef712	0xbf607800
-+	0x281e5911	0xad9a3e63	0x87b59384	0x7ebdc04c
-+	0x6f47867b	0xb6a304ac	0x289f65e7	0x335fc866
-+	0x77eb11b3	0xb70c25b2	0x70b43d52	0x684d46c0
-+	0x0940459b	0xde739ede	0x0b438a29	0xb713e77e
-+	0x71f539b7	0x8b2f0f7b	0x8d8ab95d	0x42cde8c9
-+	0x08c259d1	0x021eda69	0x2af81ddc	0xc7d13028
-+	0x05abfa20	0x6a61008b	0xfc62557f	0xd6d731b2
-+	0xb080aca3	0x6acae4a3	0xab33d2bc	0x7983c177
-+	0xdf0c357d	0xb8dcb956	0x9c214460	0xfeb75d75
-+	0x9b3d468b	0xd2c3106c	0xb1bd118e	0xf26df6a8
-+	0x11b9c4d2	0x031357f9	0xf7af8a12	0x70fef26c
-+	0xe5d8b8d5	0xf6746fd8	0xd6cc3266	0x4158e59f
-+	0xa38fbfcb	0x01c61ff6	0x44c7c4e6	0xf26db3aa
-+	0x46bb6d84	0x0a794535	0x1d5eab72	0x42345de7
-+	0x0c7e6d47	0x8bacc223	0xb7334b8d	0x3d9d951b
-+	0x18f4afc4	0x9c0cb708	0x53b71b82	0x603e8350
-+	0x6f2df978	0x0c6f3f0f	0x661ebca9	0x30788bd0
-+	0x982959c0	0x50aa1351	0x672297c1	0xa490a756
-+	0x21c9e911	0x977e172e	0x0446db50	0x49b711c1
-+	0xbc6d54c7	0x0fe0adb4	0xc4ec0fe4	0xae6d09b6
-+	0x316cfa53	0xba68cc8b	0x104bdbe9	0xc31639a3
-+	0x812a97fb	0xa1c6884b	0xc884d473	0xe3057c15
-+	0x5ee879a3	0x5abe8262	0xb906bbde	0xfd98fcbd
-+	0x6ae15c96	0x44a17e0e	0x28acfa15	0xb345122c
-+	0x6ddc4244	0x005eb369	0x22d038bc	0x0d226e4f
-+	0x64c7ed6c	0x7964b8d9	0xbc5d668d	0x99155e56
-+	0x9979151c	0x65312a00	0x0271d338	0x64867293
-+	0xed0d26fb	0xe69c5f02	0x93fd6871	0xf5702656
-+	0x4fad1c2b	0x20f8c272	0x438b964a	0x87ff3fa2
-+	0x6706537a	0x437b5709	0x6fb797dd	0x85679fab
-+	0x00da6b51	0xeecc5540	0x2998791c	0xc36d40ef
-+	0xb545e334	0x9ace5e06	0x8a9e6c54	0xc341d0cd
-+	0x1478a2d4	0xb81413bd	0x80601f72	0xa1b250b9
-+	0x1cb7f5ce	0xefad630c	0x32325fcc	0x29e3474d
-+	0x6a7ae043	0x879ee630	0xdc1e8a55	0x7ae794a8
-+	0x4ee38039	0x2ff4947a	0x53bb84b1	0x8f0b077d
-+	0xaa4c543b	0x9aa88443	0xeb31a017	0xf3485983
-+	0xe53b855c	0x6e17aec6	0x726458a6	0x5acf4345
-+	0xa1b95c5a	0x30668c67	0x47fb5dc7	0x8aafbff4
-+	0x4b94ef01	0x07bd6231	0x544afcf3	0xfdffca2f
-+	0xce847471	0xe90abc6e	0xf05e3cc1	0xf602a9c8
-+	0x8f104b51	0x1ae3da07	0xd07dfc04	0x561d9373
-+	0x6f6cc833	0xac982489	0x3c0f8afd	0xfab974d0
-+	0x397e135e	0x8edb3eb4	0x452b9509	0x3972829d
-+	0x639e3981	0x1c758ec1	0x11428fa5	0xe8308fa7
-+	0x571d71b9	0x94e40c2b	0x1aaaa397	0xce9283ae
-+	0x599bbb93	0x51c04bf7	0x556bc74f	0xf6e6e799
-+	0xc34191e0	0x5f06bce6	0x9f63ecd1	0x54437905
-+	0xf8f9bd50	0xde82cbf6	0xe11a9949	0x9d312bfa
-+	0xe712e3db	0xb57eabc9	0x57682068	0xc91c2e3c
-+	0x681e4fbd	0x0ecd3452	0xcc893248	0xf13f0600
-+	0x9a8a9194	0xb4c1cd29	0xd504d8f2	0xee6c5b8a
-+	0x211c9958	0x7a4f9c30	0x32775708	0xda97bf03
-+	0xf7035e57	0xbe77d547	0x37accd1e	0x6c537775
-+	0x8d63b752	0x7fec4a3c	0x94211d9e	0x60bfeb2a
-+	0xebd47130	0x747d52fc	0x8434f487	0xac9091cc
-+	0x8f8b228f	0xb77f96a1	0xc21fede9	0xa9e2678a
-+	0xbc815194	0x54d677ac	0x66c11faf	0xfb666595
-+	0x01e5e973	0x5c990d0c	0xf2cea425	0x5b516ff8
-+	0x8c932784	0xd18feb32	0xb5acd3d3	0x1703b89a
-+	0x34fb512c	0x0ac83386	0xd58c5728	0x5c018ed6
-+	0xbe0908a0	0xd490b0e9	0x0ec94527	0x2f281499
-+	0x471df723	0x03eddc08	0x9b99d975	0x11535b70
-+	0x5802288c	0xb3512d42	0x415a9c0d	0x52dbd146
-+	0x8b0c59bf	0xd8160cc7	0xe37dee6e	0xfd5211cc
-+	0x5635ff4d	0x8d783398	0xc11f5d62	0x54ca73b4
-+	0xc3ebdf96	0x835e7883	0x9cd03137	0xe4b4f709
-+	0xdbde6d86	0x2b562b2d	0xfecc0df5	0x172a5ec2
-+	0x568b52b9	0xf542957c	0xd738b325	0x49c49aaf
-+	0x6eb4c9ad	0x363f4978	0xac4b0cb3	0x4ec8dca8
-+	0x7a2ec2ba	0x10ff39bc	0x8b8748d5	0x6a86e67b
-+	0x0d81e2b6	0xf4bde138	0x02249333	0xab0c7acf
-+	0x4ce5e894	0x1656dad7	0x46c59329	0xa849fea0
-+	0x3d0400be	0x6898c4f7	0xd866ff9a	0x84a5b170
-+	0xc997009e	0x80524f6e	0xc80fb5dd	0x5bde0181
-+	0x0bb0c8a8	0xe5a6b9e4	0xd4753f0a	0xda9bf0c6
-+	0xd6dd041b	0x4c7338f0	0xa223bd71	0x23b58f4a
-+	0xf6e127dc	0x1777033d	0x5b057a0f	0xe08af0bf
-+	0x17c07032	0xbbc3f27f	0xac6dc98b	0x921e2f12
-+	0xcf32236d	0x6cb700a8	0xa3b4e5cc	0xe9b65d73
-+	0xca7d6f44	0x7b5917f6	0x7b80dd21	0x5ee87e45
-+	0x86799f71	0x0667e036	0x8f97dcca	0xc4bfd5d9
-+	0x90737eed	0x41b5a457	0xc6c96301	0xf8933e95
-+	0xe51c2456	0x00c661f4	0x8a0e1aaa	0x92aa4181
-+	0x1e3f8638	0xd481a14a	0xaf637189	0x91622fb3
-+	0x4450865d	0x4202b431	0x5248342b	0x01ff713b
-+	0xe33b5ec5	0x912d6856	0x10deb2ac	0x9072c180
-+	0x24d792af	0xa39c5dfd	0xb4c94140	0xfeb32004
-+	0xa174dae8	0x49da7dfc	0xa4db1090	0x7d2a998b
-+	0xb7eba69b	0x9b824871	0x3557bd1d	0xd3a73d9b
-+	0xf225310b	0xad1ffcf6	0x2d5f075b	0x592de6f4
-+	0x69e438f4	0x4ed8cac4	0xa79c947f	0xb95f9590
-+	0xb8ede5c9	0x0b1c9229	0x85a4b30e	0x65149920
-+	0x433461a8	0x186fda4f	0xbaee7097	0xd3cac1bd
-+	0x8bc32ca2	0x914f1512	0x9b619478	0x582a53c9
-+	0x4e624a00	0x77e445ec	0x6f823159	0xa9c4766b
-+	0x0dd6ad28	0xfabdadc5	0x704bfd95	0x08645056
-+	0xe1939821	0x76650b62	0x8876941a	0xf812239f
-+	0x2869ce13	0xa4d292c7	0xecba40fd	0x83d2fd8f
-+	0xdd45ccc0	0x7c12b7cb	0xdc0a20bb	0x0d9be34d
-+	0x4dd16a9d	0x25835446	0xb94d8c21	0x97ca8010
-+	0xddd09324	0x95ffe31f	0xa86136c9	0x828ac571
-+	0x9aa7fc00	0x382cc48c	0x015f7186	0xc3fd040d
-+	0x505408e0	0x21cdc34c	0xbd266059	0x6e2f673e
-+	0xe4523c1b	0x3ba56bb3	0x1c343938	0xabc0df54
-+	0x8ba4f1e8	0xfbd4c592	0xb678c884	0xff3be2f1
-+	0xca013570	0xfb0598df	0x3cb9cc1d	0xe3ba8ca3
-+	0xc3d7ecee	0x0ae84a0b	0x0d70f0c3	0x963110ff
-+	>;
-diff -ruN u-boot-2015.01-rc3/arch/x86/dts/microcode/m12206a7_00000029.dtsi u-boot/arch/x86/dts/microcode/m12206a7_00000029.dtsi
---- u-boot-2015.01-rc3/arch/x86/dts/microcode/m12206a7_00000029.dtsi	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/dts/microcode/m12206a7_00000029.dtsi	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,686 @@
-+/*
-+ * Copyright (c) <1995-2014>, Intel Corporation.
-+ * All rights reserved.
-+ * Redistribution. Redistribution and use in binary form, without modification, are
-+ * permitted provided that the following conditions are met:
-+ *	.Redistributions must reproduce the above copyright notice and the following
-+ * disclaimer in the documentation and/or other materials provided with the
-+ * distribution.
-+ *	.Neither the name of Intel Corporation nor the names of its suppliers may be used
-+ * to endorse or promote products derived from this software without specific prior
-+ * written permission.
-+ *	.No reverse engineering, decompilation, or disassembly of this software is
-+ * permitted.
-+ *	."Binary form" includes any format commonly used for electronic conveyance
-+ * which is a reversible, bit-exact translation of binary representation to ASCII or
-+ * ISO text, for example, "uuencode."
-+ * DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
-+ * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
-+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-+ * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-+ * ---
-+ * This is a device tree fragment. Use #include to add these properties to a
-+ * node.
-+ */
-+
-+compatible = "intel,microcode";
-+intel,header-version = <1>;
-+intel,update-revision = <0x29>;
-+intel,date-code = <0x6122013>;
-+intel,processor-signature = <0x206a7>;
-+intel,checksum = <0xc9c91df0>;
-+intel,loader-revision = <1>;
-+intel,processor-flags = <0x12>;
-+
-+/* The first 48-bytes are the public header which repeats the above data */
-+data = <
-+	0x01000000	0x29000000	0x13201206	0xa7060200
-+	0xf01dc9c9	0x01000000	0x12000000	0xd0270000
-+	0x00280000	0x00000000	0x00000000	0x00000000
-+	0x00000000	0xa1000000	0x01000200	0x29000000
-+	0x00000000	0x00000000	0x11061320	0xd1090000
-+	0x01000000	0xa7060200	0x00000000	0x00000000
-+	0x00000000	0x00000000	0x00000000	0x00000000
-+	0x00000000	0xd1090000	0x00000000	0x00000000
-+	0x00000000	0x00000000	0x00000000	0x00000000
-+	0xfd2a2f68	0x82ac7ebb	0xa4916328	0x7480b81b
-+	0xd329a777	0x25750339	0x9a8f7a9b	0xf1da9cb8
-+	0xb1be7b1a	0x621d5a35	0x94b57e2e	0xa9def809
-+	0xe4492a43	0x530252bf	0x1040fada	0x8a853a89
-+	0xfb0e6e76	0x6d191ed9	0xefd28b83	0x946414e5
-+	0x13f415d5	0x28487029	0xb69855e8	0x516cbedc
-+	0xfabbea88	0x9f90e8a1	0x211793d8	0x54653835
-+	0xa7789a08	0x754791d9	0x484764d4	0xdca45615
-+	0xf64844f4	0xdbd754d0	0x7d2b0ff3	0xd023e25a
-+	0xb048bbcb	0x83038b5c	0x57e17d17	0x735f1e9c
-+	0x8982c22e	0x6c7b2ad7	0xb26e3b82	0x7121e035
-+	0xe4ea8dba	0x68d4f406	0xaaafdb13	0xf119b472
-+	0xb5853303	0x20698005	0xcf34604c	0xdc17d19b
-+	0x042d6e97	0xf0300325	0xe1b55072	0xc2804918
-+	0xd6d7a912	0xf908c81b	0x4f9979ae	0x0179f8c6
-+	0x2f13e3c0	0xc5911467	0x39ad6c23	0x9c9d8837
-+	0xf3c3f767	0xe56b4a96	0xdad7cebc	0x6eaaee57
-+	0x2215ca7b	0x4cee4f65	0xd9a51c2a	0xf33c80a1
-+	0x11000000	0x0b468bda	0x0b57c7cb	0x885fad4b
-+	0x8a37307a	0x68cc7d5b	0xb6395b55	0x583626b8
-+	0x21efe98d	0xa516cc42	0xf5b978b1	0x585d8a11
-+	0xdd5f2ee4	0x17b1c7eb	0xb6f005ea	0x9ecc6ac6
-+	0x82c0f1b2	0x25a114fb	0xa6086296	0x93da75f4
-+	0x0695ff88	0xd413dd65	0xccf7609e	0xb7718aa8
-+	0x334406dd	0x28de253f	0xfb43ca83	0xa4674656
-+	0x7392e05f	0x9b062c62	0x17571892	0xb5811cbf
-+	0x9d64666b	0xa01c1500	0x5893e418	0x07ba6ed1
-+	0x0eebedd8	0x299a52bf	0xdfdb6191	0x4e846b26
-+	0x298b7431	0x576f4479	0xf5317e04	0xc9492745
-+	0x167c42e3	0x0c0cd705	0x82756ce5	0xe81ba860
-+	0x536c357c	0xc27433fa	0x41c8078f	0x1ff779d0
-+	0x73ddd76d	0xe606c66c	0xe0ad45bf	0xfebdc310
-+	0xcb2aa836	0x39903a79	0xe53d5dc1	0x0cb6a1ff
-+	0xe6091d08	0xcb2961d8	0xd38987ff	0x2bd624fd
-+	0xfb4e484a	0x8c60efbb	0x0ed088b5	0x5a142b04
-+	0xa737bab1	0x44da29a2	0xc046ecb1	0xe7ccefdc
-+	0x81895d2d	0x41266fa8	0x52a5e25e	0xcfeac133
-+	0x252b0737	0xec54b6c8	0xe1c9ebf6	0x25180c1a
-+	0xea65b9e2	0x5e9ada96	0x08559e07	0x414fcece
-+	0xdb4927f7	0xa229106d	0x6a7db273	0x8ac6a901
-+	0x00a87e4d	0x14fd1e2a	0x63a5fa87	0x5ca223c5
-+	0xc0c980c1	0x42c447ef	0x5b274187	0x75bd6279
-+	0xdb44dae2	0x60856af1	0x777caf5f	0x298e810a
-+	0x93f4f418	0x9e1ddf3f	0x6f589046	0x18ea149c
-+	0x4a5ce4b0	0x529db285	0x3c2dde59	0x1d680e51
-+	0x3a62d819	0xdf4c01d2	0x432a8f06	0x70a37043
-+	0x4a0d4baf	0x0d3395be	0xfce0391f	0x5228aac2
-+	0x9dd9b00e	0x6149f393	0x6fee1d85	0x1d3628cb
-+	0x107076de	0xd99fe940	0xa227eec2	0xc97d8119
-+	0xcf2fa8b2	0x821dac93	0x518875f2	0xd18d1d47
-+	0x3e27fdcb	0x47823f98	0x20d42c1e	0x9a58812b
-+	0xe0987435	0x1426f12f	0x61d6f627	0x5c58d415
-+	0xe5ca80de	0x9e11e526	0xbccc0f94	0xb49cec4d
-+	0x357f947c	0xbef0e2f2	0x5b9b2596	0xddc87ff7
-+	0x5f2705f8	0xa25f2be7	0xbb45a165	0xe49ef6d5
-+	0xe76e250a	0x75584c7d	0x7900da7b	0xee0e3360
-+	0x6988740c	0x4aa56944	0x2d485383	0xef45f5d5
-+	0x0df4b0f7	0x48199182	0x5b33c21c	0x8f2483c1
-+	0x8aae6c50	0xaf406ccb	0xb7522bda	0xeafb64de
-+	0x9a9b1fd7	0x3ab46c34	0x0ec5f025	0xe5bc9668
-+	0xdb108e78	0xd6152ac8	0xc382ec93	0x5abc2565
-+	0x4f256030	0x856f6eb5	0xb589dc96	0x3de80942
-+	0x49d20a05	0x8e3ac21b	0x0262ecc7	0x5f1bce89
-+	0xec50198c	0x0115b078	0xf67d94e3	0x1cc3682b
-+	0xfb2d4ab0	0x4d6ce252	0x1d7aace9	0xf7e99257
-+	0xc1235e85	0x8129ee72	0xb6cfbb13	0x6b851ab5
-+	0x430633d1	0xe9ed33e9	0xfe85a42a	0xb4583c0a
-+	0x35a65f5e	0x5fb0bc81	0xe16db440	0x7d022cf2
-+	0x8f832920	0x20ed9ad4	0x6a4ace8b	0xf4c85869
-+	0xf17dd57b	0x277ae0d5	0xb5f59c50	0x35d099a5
-+	0x9ce955ae	0xcb200000	0xcedc4073	0x2a2ba8b2
-+	0xa1b53439	0x46ced775	0x59069604	0x6488f5d8
-+	0x2bc0af55	0x643178a2	0x36f62be3	0x2606f0a1
-+	0x3057cf8a	0xc28f4a3d	0x708e8020	0xb3fccf9a
-+	0x29b79fa7	0x35622d93	0x85eb0e68	0x80fa3b59
-+	0x143f340f	0x20e17166	0x169fe55d	0x698f3655
-+	0x0bc8b45b	0xde3aaf6c	0xbd597266	0x75505401
-+	0x44d0095d	0x4c00f346	0xfb9ef2c6	0xee70ef96
-+	0xae807621	0xfbbe7490	0x9c0a283e	0x01a8058d
-+	0x1be53568	0x0b8dc8a8	0x45afb745	0x3ee1ff58
-+	0xe772e14e	0x3ca4e729	0x6973e751	0x764f244e
-+	0xca8d1621	0x6c4fb15c	0xae972e6d	0x3d26c6d3
-+	0x5ca8f450	0x6328d65c	0x2e7cd88c	0x87dddcc1
-+	0xcbbdefc6	0x1ab8c0cc	0xd21e503a	0x20c11d27
-+	0x2f0adc1d	0xc24240d2	0xc73aa069	0x99afc53e
-+	0xcab27e40	0xbe107ccb	0x8ad5f0ae	0x9024c188
-+	0xe02bb39d	0xdb784309	0xf91acb54	0x4d15b75d
-+	0xd339c237	0x3b556619	0xf69f91f6	0xca6fcfd4
-+	0xb5ddf471	0x0698490e	0xb0855c30	0xe2b34b13
-+	0x3c979248	0xc0484a59	0xb4cf9f4f	0x7975f2ac
-+	0x602259d3	0x89364c24	0x37f29913	0x0b4c88a0
-+	0x23f0b663	0x309c13d2	0x80a3d12c	0x4c866e87
-+	0xea7e29c0	0xbc33db6e	0x3c3af584	0x63da0de7
-+	0x9bc6bf5f	0x3b948269	0x4d41b09b	0x5724dd20
-+	0x4e16618b	0x5917781f	0x4bdec762	0x562cc3fd
-+	0x50e59d92	0xb3edea05	0xa6ceaa68	0x60af473d
-+	0x78a99aca	0xd60ba313	0xe502992c	0x0c25c2ba
-+	0x476eebd4	0xe7e23958	0xc4ac2757	0x0d6695ec
-+	0x7664b4f0	0xb87ed0a5	0xdcf23b2a	0x76d38802
-+	0x21699284	0x87b80e7c	0xf0e34f45	0x4bb84bc8
-+	0x0316744a	0x26de0ed4	0xb25ff5e3	0x31445bb1
-+	0xaccc5b87	0x271b976a	0xcdf5663b	0xe142d271
-+	0x1af28339	0x7d304ca4	0x11ee6243	0xdf70fbc3
-+	0xb8d88f25	0x4c2d9626	0x8eb72c77	0xceee1817
-+	0x4e1b35f7	0x6c261f67	0xa32a2801	0x67ace2af
-+	0x7c87f8c1	0xca6f2505	0x982269dc	0x137080a9
-+	0xe40fa78a	0x3897a66a	0xdc5d0ff7	0x58016e44
-+	0x21bcc988	0xf2a4df15	0x9fb021d4	0xca59e882
-+	0x3673d08e	0x7cf5d500	0xd41ab9df	0xc17b4a58
-+	0x2cb85aa3	0x01103427	0x5a8fac5b	0x7ac856b2
-+	0xb1532563	0x1b94b518	0xadea3bfa	0x597109a9
-+	0xf28df608	0xc2bf64bf	0xf517bb53	0x61b7d5ad
-+	0xa4a38e9d	0xa9fdc597	0xf990f2f1	0x00466640
-+	0xcecd06a7	0x5eef09d3	0xb67a08ae	0xd780d8a0
-+	0x07641a71	0x9dc9f7b9	0x5f0b5a44	0x94dfe40f
-+	0x6db0cf7c	0x3fe72d11	0xb2443ea3	0xe051f336
-+	0x4ec8a6a4	0x11201430	0xb44e2b28	0x5bd018b0
-+	0x444ba2bf	0xa63031eb	0x147f9826	0x3fc56ac1
-+	0xd3a75ad3	0xc3f71815	0x340bd72b	0x3e5a488d
-+	0x0cd8fb05	0x17791534	0x68e7321c	0x1489c701
-+	0xa39f2d71	0x7cbbd9f9	0x42cba365	0x024f7d9a
-+	0x29ef2da1	0x1eb9c4e6	0xc8b24985	0x9c33412c
-+	0x5fd3003d	0x7f0793b9	0x497b6ef4	0x3af648f2
-+	0x22f4a1db	0xac8500c7	0x3b1a859a	0x57921c78
-+	0xb0efd82e	0x8e60452d	0xd86ed85f	0xc1ae73d1
-+	0x633d83dd	0x7dbee7f6	0x46ef5590	0x027f2d50
-+	0x3c81bcf1	0x37a3940d	0xc92d0a8f	0x270cd02d
-+	0xaeed9d1c	0xb6d76bcd	0xda27f251	0x1625a683
-+	0xf2d1302d	0x3f95bc0e	0xdb4b36e0	0x96fe1e6e
-+	0x1dcbca54	0x57d44867	0x14aada62	0xf20f5444
-+	0x9ccf560e	0xb8d178af	0x9affe58e	0x8e3bd741
-+	0x7dff29e9	0x3c1998e5	0x9909e1df	0x1bbbd50f
-+	0xfda14fdb	0xb66fb65e	0xe646d5f3	0x71f41791
-+	0xbca50c12	0x57c6d2a2	0x8f5c750f	0x48f87301
-+	0x9103acac	0xef185c41	0x6dbe9524	0x3c040c16
-+	0x211dc2ac	0xa61925bb	0x20bfb41a	0x98253e77
-+	0x4d5ea3b8	0xc2b11b6d	0x7f072104	0x58340448
-+	0x596e3090	0x72484d15	0xf5e5d16b	0xc1b9faca
-+	0x5c786fdb	0xdcd97509	0x73d21aa9	0x2a90c7ae
-+	0x396ed0b1	0xa23e63da	0xea20cb1b	0xb2bb359b
-+	0xb5df6ff5	0xdbc470b4	0xa6fd8d97	0x9458f6d0
-+	0x97434866	0x2c9521c4	0xc51f6ad2	0xa33fb3b5
-+	0xb26915d7	0x3ef363da	0x9ff9f5c7	0xfa236e60
-+	0xa12b879d	0x2f98bd3b	0x95282ca8	0x64f90513
-+	0xc03d2962	0xb13b82f8	0xfdc2eb41	0xc39dcf3b
-+	0x95a409af	0xbaba6e7e	0x0d028543	0xc5b9426b
-+	0x35f5727b	0x8f3b9f8c	0x6e7b85d8	0x2cfa9b2e
-+	0x2a7117cb	0xa41f3fe5	0xbe17ff18	0x0f4a8be4
-+	0x20b9003a	0xebce04ff	0xd6f276d6	0x9fc66d07
-+	0x83f40250	0x560eaffe	0x92be2ddd	0xdb0ff83e
-+	0x424f0605	0xb3cf76a4	0x167725c5	0xe3b513e2
-+	0xc31a1a72	0x9f7161a4	0x25707dd1	0xdb5f2a91
-+	0x85db06af	0x78443bf6	0xebbd8e7d	0x7909e5fe
-+	0x618237a6	0xe6dea70c	0xcd3299c2	0x7736d40a
-+	0x044cda94	0x6cec190e	0xb9652583	0x51946c01
-+	0xcba67203	0x0dae0f1d	0x6d0dff0d	0x85756bf7
-+	0x1db9e08a	0x88977944	0xa6252c60	0x06ff1a07
-+	0x1b8d319f	0x884f10eb	0xbdeb7feb	0xe1681bb9
-+	0xb5f0cefc	0x5359534d	0x6de87cf9	0x94a78727
-+	0x15c17557	0x398876df	0x2f85f258	0xa0284d4b
-+	0x4879ca57	0xb5ab7844	0xb402fde8	0xd520cb53
-+	0x8a601365	0x8853b510	0x1e0538f6	0x0135f899
-+	0xa78c7bba	0xa33c8ccc	0x6cf0da00	0xa5f96757
-+	0x94714373	0x79413ed2	0x27c7b9cd	0xda172153
-+	0xeeeee91b	0x959d8437	0x660efcda	0x2a6ab94a
-+	0x8913d65f	0x24246350	0xf6c85ab5	0xf6b696f7
-+	0xd75840c8	0x046b7435	0xb55474fc	0xd8d8bab0
-+	0x265e79e0	0x0dd030b3	0x826a182c	0x38f1121b
-+	0xeb33b5cb	0xe3ca835b	0xe8850761	0x25955d7a
-+	0xbb6b7fb4	0xbc02ca0f	0x1b03bd1f	0xdd1a59d6
-+	0x5d48f10b	0x35e35688	0x1411d34a	0x6131c664
-+	0xc1b8b277	0x1bc8afd3	0x886f0c09	0xc1b6b517
-+	0x74ec9ecb	0xee2d43a5	0xbc0f122a	0xd1911c88
-+	0xc7e39b2e	0xa60c39b0	0x942fce7e	0xc8c2a2b6
-+	0x51978cc2	0xad8d9ed2	0xcc2b0c3d	0xf6aff0f7
-+	0xbfb3920a	0xd25aa79c	0x67d87d44	0xf612df60
-+	0xf06dbe9f	0xd4ab61da	0xd96c6b1b	0xb39ab4b7
-+	0x3368a90d	0x39c8bd81	0xf4ba5ead	0x6fe656ad
-+	0x93b946dc	0x2181219e	0x7b98805d	0x675af3fd
-+	0x59760289	0x934b4803	0x4189f27d	0x9503a5fd
-+	0x42aaa076	0x6b4bd024	0x86c826e9	0xe0370ff4
-+	0x1bfdf980	0xc487f797	0xd4754c3b	0x1098b2e8
-+	0x05753a1c	0x3833ede3	0x5f1065ec	0x40cb562e
-+	0x8d4fc418	0x392290d2	0x622d2e29	0x55df1f46
-+	0x4ae0893e	0x24ddf8a9	0x302a64dc	0xc93f7504
-+	0xde8e1674	0x033acbcd	0xc9732a64	0x6f7a7da3
-+	0x72b7c43a	0xb5110e6a	0x00865c19	0xaf5e00f7
-+	0x0a80b55d	0x6e638c0c	0x3771d602	0xb4a95ae7
-+	0x01ba3cff	0x42e350eb	0xedb1d897	0x82f0cfff
-+	0x98e79055	0x6b0cc62e	0x8ce1735b	0x62645395
-+	0xd99fc208	0x86ee3066	0xc8f13758	0x2378d582
-+	0xad41c218	0xc3954b87	0x47acab9a	0x69126227
-+	0xbf778357	0xc5a7b76c	0xb96894c4	0x89e2dd88
-+	0x27cc53b7	0x2187116c	0xd397c13b	0x578a6686
-+	0xe3e58b11	0xdc3e4d40	0x69f064f5	0xdfb64348
-+	0x42291e77	0xacc21c46	0x5444d976	0x616bcdc1
-+	0x01ffb3bd	0x5cb926e5	0xbd763a24	0xbf224c70
-+	0xdeca1d57	0xded1cc56	0x9b6cbcd2	0xee6efaf4
-+	0x44d634ff	0xf33334c6	0xd275d66b	0x6a1a4c9d
-+	0xbd675ae0	0x6289d1c1	0x053aeaf0	0x8a170aa1
-+	0xe12cfbb9	0x0ae15a94	0x1dab08f3	0x9a2657ab
-+	0x8348417f	0x9572e6dc	0x9c69e518	0x5397dfa1
-+	0xe46120cd	0xad4457fa	0x0106a79d	0x40b191be
-+	0xbb64bccb	0x9dda8fb0	0xc74fe994	0x64ac0ef1
-+	0x3a57986c	0x86e8dc78	0xbb055d88	0x7a1243da
-+	0x585cafe1	0x8968ad92	0x5b73bf26	0xccf77edc
-+	0x10ac1643	0x5738ba43	0x3d39ecee	0x57fd555b
-+	0x36ee9d5b	0xec9115fb	0x4250e03f	0x9e4fd6a6
-+	0xc547b01e	0x9c84f42a	0x37756616	0x217cb517
-+	0x33da3c5e	0xa0a7ae6f	0x8ddb7b99	0xbd84ac35
-+	0x644ec4e0	0xaa62a7ac	0x71795f77	0xd5f67163
-+	0x77dcc227	0x59f09342	0xf6666ce4	0x1e164a0c
-+	0x011e205b	0xc4a80a0c	0x7fd31f1d	0x05ccae4c
-+	0x39b6abfb	0xf4b7ac82	0x39d38e89	0x14c1e7f3
-+	0xdb3bb53b	0x02577ec5	0x7bc12087	0x65ccc2bd
-+	0x72492c6e	0xa6ae0062	0x965946ea	0x58e5f31a
-+	0xfdfd7770	0x052afb9c	0x889b8358	0x2dd65c3e
-+	0x55418587	0x445af0e9	0x43fe6671	0xae45e776
-+	0x2c25d02c	0x44805865	0xaa3a70c5	0x7dd55d11
-+	0x3499f5d7	0xc12e4a51	0x9ef98a38	0x5462e98c
-+	0x0f73c72f	0xd0481aa2	0x56bccd0e	0x64143a1a
-+	0xa7913ef6	0x0ca932ae	0x3739ec96	0xac5d38d5
-+	0xe9c8c754	0xd56e855b	0x950cadcc	0x91cb2e5e
-+	0x6e170c11	0x1eb66637	0xf641b0ae	0x8ba43c21
-+	0x3f43b8af	0x8f1596e7	0xb614d1ae	0xac99c14c
-+	0xe7beddce	0x5757f98b	0xfec1cf89	0x19608162
-+	0x96479a49	0x1f089d9e	0xc2e4ac47	0x1cdea563
-+	0x027f57a7	0xc0ba57c6	0x6eb2faa1	0x8e85c333
-+	0xc391dfd2	0xe2c0bcbf	0xc1f87d66	0xb597d958
-+	0x3655d5a3	0x2d9adaaf	0x8efd0aa0	0x05d65caf
-+	0xa28991d9	0x28b6d7cf	0xdcb48013	0x65e75783
-+	0x8b8b77ed	0xa4b36df8	0xa8ccfb9d	0xd0a1734c
-+	0x2dc97601	0x35d81082	0x2e6d26f8	0xf3baf2c5
-+	0x416084dc	0xd8b84ad5	0xa06b9edb	0x45c2b0b6
-+	0x553c973a	0xbbcda1bf	0xca154d25	0x7a781012
-+	0x4864ea32	0x0784f663	0x27656507	0xb359d4dd
-+	0x43d4c165	0x69b844c7	0x31b1b9e2	0x0f3420f8
-+	0x3cd2e455	0x201920cb	0x93018659	0x5c4a08f0
-+	0x3a0d094b	0x5448c1ed	0xc888d1a2	0x4826cb64
-+	0x625da2c7	0x12110d40	0x5cd8e76b	0x26e09eb5
-+	0x8c6aab45	0x6dd192c6	0x937f1252	0xc927efc5
-+	0x4c5bf11c	0xdd62c6fa	0xeef59620	0xbffc2d5b
-+	0xb90299f0	0xb24df71b	0x76656678	0x550b3228
-+	0x01536098	0x4fbfe03c	0xa82d0c31	0x2eec9bb6
-+	0x752e6720	0x26322556	0x5d94bd64	0xa2e1122a
-+	0x25899986	0xb63d5cc2	0x9222b055	0xbf4f0bcf
-+	0x3d182483	0xc7bb9999	0x97ffc8c1	0xa6500a8b
-+	0xb8b97382	0x3f6f39b0	0xcaca9f6c	0x7b67941d
-+	0x7875ea1e	0x3ff25c0d	0x4cff1a40	0xb5a351ef
-+	0x556a59e5	0x011e995f	0x25a7a5e9	0xedc8707a
-+	0x42b4ddfa	0xa51a3ddd	0x9c9f1d73	0xc8f24ef3
-+	0xfcd73118	0x1a61c16f	0x1e2fa7c7	0x1f49826a
-+	0xd8418fe9	0x726358a8	0x6a0857fa	0x6804ccc1
-+	0x78a55fa0	0xc3e41419	0x60416b10	0x2afe46d8
-+	0x0c0ba2f7	0xd3dfa8ca	0xfa474ea2	0x8e763446
-+	0x1f664c64	0x6a8d06cf	0x1b891114	0xa27c1a28
-+	0x98ddd324	0x26cc9fb8	0x544078da	0x03acbeee
-+	0xc3f3b761	0x56797b83	0xf04ac5a1	0x8603b17f
-+	0xb8989b96	0x28c7be17	0xb750b4a6	0x84b2f7f8
-+	0x32138f9b	0x7661c86b	0xb7517518	0xf2a961c6
-+	0x240a0100	0x100c5b96	0xa1931730	0x18513938
-+	0xdf2baa73	0xd6b55cce	0xf89cab59	0x238c90c3
-+	0x4799f50d	0x29cd7942	0x62677a47	0x7261f326
-+	0x4ff7da96	0x294ba5e9	0xb6474251	0x96de1b44
-+	0x9d84552f	0x1103468f	0xcfd063af	0x5d8a0b6c
-+	0x172670ac	0xc1a9b97f	0x0a278773	0x08b48bb5
-+	0x392b3563	0x8f65e926	0x4be71f10	0x7615e05e
-+	0x98b0c931	0x50bf9779	0x5baa97aa	0xb6e26fe4
-+	0x2c40971a	0xe5d739f0	0xa7e30500	0xc724895c
-+	0xc7a3f44a	0x5b381b1b	0xa7a478c7	0x219f567c
-+	0x42d7a960	0xaae6780f	0xa96c56d1	0xe3787bf4
-+	0x743f3a5e	0x6b99c9e1	0x36cf72b0	0x784ab5c2
-+	0x5113773d	0x625393af	0x62c4da61	0x05422921
-+	0x339711f3	0x3ee04f5e	0xf3a778b9	0x55e1bcf7
-+	0xe49e5a9f	0x5f0935f6	0xa13e17f5	0x3028d23b
-+	0xac9a6fd9	0x14006013	0xbf1b3fb2	0xce785f7b
-+	0x83942244	0xd299d59b	0xf8c0593b	0x71c74beb
-+	0x7561a1f5	0xb133ace7	0x15d5d4c1	0x21c3bb29
-+	0x6ab1c2c7	0xee20d3dd	0xcfd62c54	0xedf9a43e
-+	0x0e23222c	0x5eef5bc2	0xe7426bd0	0x42db58e9
-+	0x62ffe203	0xd63163c5	0x8dbbcb48	0x9e16d9c7
-+	0xb6d51e39	0xbee5a6c4	0x5d0bd775	0xeded86db
-+	0x9eb1454f	0x6217eb64	0xa4b76ae7	0xe3481698
-+	0x6d576cec	0xe751f610	0x1473bd83	0x4aaead8c
-+	0xff4a602b	0x01ed092b	0x310f16cb	0x2e199177
-+	0x693a8ad1	0xf5e520d1	0x1713d604	0xfff1225c
-+	0x644c81b8	0x1adf5032	0x79058d81	0x7aafda08
-+	0x80b6c9df	0x6f927c46	0x307bcaa6	0x0a1aac12
-+	0x7d20bdae	0xd0e9c9a7	0x4530bebc	0xf1dbac36
-+	0xdee3e8a9	0xa96d2aca	0x291c6944	0x436cfac8
-+	0x9dd501c3	0x696e0c6b	0xa85d7036	0xca1c1321
-+	0xcb802235	0xae614fec	0x4f0cf745	0x08604468
-+	0x93bd00f3	0xf39eb605	0x89a8f420	0x18a7f61a
-+	0xa0aebc3b	0x723e6ba9	0xed00f2a0	0x231b43d5
-+	0x37c81702	0x891ffeb9	0x122de4f5	0x90f16757
-+	0x1eb06046	0x21d5cdd1	0x75fd0e6f	0x7d595ae9
-+	0xeb8ed50e	0x7bfd8696	0x3b91f3e4	0xd629e74a
-+	0x1650dfcd	0xda48163d	0x2f8f5aba	0xbc40ee60
-+	0x5291b6b0	0xb059d788	0x1ed5f092	0x65b7a885
-+	0x44503d18	0x3a2893c8	0xaf3dab25	0x8ee0a8e5
-+	0xf82f0696	0xf4fe9322	0x863feff8	0x2cfee629
-+	0xacd8bcbc	0xb3791232	0xdd694c06	0x2a606479
-+	0xaed9bc38	0x49a126fd	0x2a9c7581	0xaf43095c
-+	0xb97acc90	0xca7a25b6	0x06adceb3	0xc8bf7269
-+	0x6eeb0c59	0xa953657b	0x8e175c3a	0x9facc87c
-+	0x4c143d0b	0xb4467fe4	0x372b6cbf	0x2099b361
-+	0xb8ac2cfe	0xb9a798d0	0x15b8b336	0xdab5d568
-+	0xb53a4dda	0x00ce1ef7	0xefef7644	0x41823aa2
-+	0xcb8d307d	0x3baf1baa	0x7124a219	0x8d2820df
-+	0xf3b8cfed	0x95e55a1b	0x8199fa40	0x631042fc
-+	0xf7886353	0x3592b875	0x3b516841	0xac7aa00a
-+	0x3dbfec52	0x9b91e8d6	0x0a8ffce6	0xd11429db
-+	0x92392bec	0xe194095b	0x253d7425	0x6b55919c
-+	0x4c11de8c	0x10b46ae6	0x5902c153	0x9509ace0
-+	0xbb65fc04	0x648a35e0	0xab728bec	0x738effb4
-+	0x416f95fd	0xee30a0da	0xcbaf3cb4	0x312fdeda
-+	0xcdb5aaf3	0xcc631b82	0xe3bf4d97	0x37e2a1b5
-+	0x2920c6b2	0x0d995ad3	0x11af607c	0xcacf31d6
-+	0x781496f2	0x9e478c0e	0xc4c14545	0x89ba2ab0
-+	0xdb1a8262	0xbb924c65	0xad836a24	0x4374fbd6
-+	0xd45a10df	0xd4158c0f	0xd4e88c1a	0xee8b8e23
-+	0x3472ee5c	0xc0a0de0c	0xb1ba04dd	0x7be6532b
-+	0x0101669b	0x2a56f032	0x12879eef	0xa600458f
-+	0x20a96992	0xa2e7910d	0x13235ef1	0xb1185320
-+	0x418ffba7	0xc0ba01af	0x27571c7a	0xde5b661f
-+	0xdd359089	0x6ae76b8d	0x095784d0	0x400a29fd
-+	0x5b3276cc	0x774c4e38	0x6a85e14f	0x37d8d1bd
-+	0x2007cea4	0x3e6942be	0x1a49828d	0xea4d84ff
-+	0x681b5a30	0xd8ff8440	0xac19844b	0x7553a6d0
-+	0x389fb0a2	0x1b0526fc	0xa193b9e0	0xb9987cb7
-+	0x6f14d980	0x0507f958	0xf6a1354f	0xcb9e49d8
-+	0x5a4e1d3f	0x10d8c348	0xb77cf166	0x5097503d
-+	0xf0e17ed5	0x72a2e029	0xddc756b8	0x0a0e30e8
-+	0xf12c6bc7	0x809db2c5	0x243fee9c	0xd2b57957
-+	0xc1b19244	0x8d59262c	0xff94c28e	0x2050edc2
-+	0xa4806d15	0x02026bf6	0x2d95c9d1	0xeb336e65
-+	0x84bcf6ac	0xe53b97b7	0x954eedc9	0xf22209fe
-+	0xf4771bc0	0x1e405f04	0x1d0ec592	0xcd479333
-+	0xdfeb3738	0x0ae23cb7	0x03d509c5	0x837a5e1a
-+	0x634a4467	0x7ee22185	0x102f5326	0x5d002daf
-+	0xea4e31ce	0x1d2be82e	0x5ebe1ad6	0x354259bd
-+	0xdaed312d	0x1e598ea0	0xd6a2b9af	0x76eb9bbb
-+	0x338645d3	0x4d3236f8	0x777011eb	0x0221d076
-+	0x22dee347	0x1e35037e	0x2f34d4c5	0xdda03e2e
-+	0xa541311d	0x3acf0087	0xb435b17c	0x08b8210e
-+	0x7c77f156	0xe20025f2	0xea0e32a9	0xbf766fd1
-+	0x8b6c4f43	0xf6ca80f1	0x07d1d342	0x272b865d
-+	0x8261aed7	0xf3bbe9cf	0x5835370f	0xfaaf4623
-+	0x8cb5a665	0xe6c92e5f	0x22ce69f6	0x61e16f89
-+	0xf15ec311	0xbacaf7b4	0x1317e388	0xa1869c49
-+	0x328da67f	0xd818a8fb	0x6f4c7613	0xcc13480c
-+	0x06789788	0xa7b4e1a8	0x0d8fed7b	0x48308fe3
-+	0xbe5ff9e2	0x7e7a74ee	0x4ffbb70c	0x551895c8
-+	0x734ffc0e	0x82b8b8d6	0xdf710f9c	0xc3df529d
-+	0xf175e377	0xcec6194f	0xc3443fb1	0x52655208
-+	0x94be229e	0x3279939e	0x771647a1	0x34c9a15a
-+	0xaae80baa	0x0b32ec13	0x6d59b440	0x50ddd10b
-+	0x98c166cd	0xfd465f40	0x74eabbc2	0x6dcb95c0
-+	0xddef6f85	0x54348377	0x905f31bd	0xbde86f48
-+	0x1322356f	0x90f3d5f2	0x5d2d4de3	0x2d5253a5
-+	0x729b8879	0x41839289	0x845f8061	0xf5ffcf8b
-+	0xf25ec4d7	0x30570dda	0xcc69f64b	0xeb024bde
-+	0xc847bf80	0xeb8c5624	0x4e4d28eb	0x43f6cc1e
-+	0x8c201bfb	0x1475f9cc	0xde13b005	0x11fd9342
-+	0x07617ac9	0x2fec6867	0x5b30a62e	0x5a8c91f7
-+	0x47208b6f	0x680a22af	0x60fd0ebd	0x229ebe44
-+	0x568c37d6	0xa3eb78b7	0x6f06f502	0x1b183db2
-+	0xd48e4d35	0x4fb23b3d	0x57d7dc0b	0x3d34b427
-+	0x0415552f	0x1bbe91d1	0x74e7ecf8	0xb1fdc30e
-+	0x466a69f5	0xfddf86b3	0xfb61fd48	0xae250961
-+	0x6a99bcec	0x2142c5c8	0x1c08d4ea	0xe8f849c2
-+	0xa3cb1614	0x43ac8702	0x22b50659	0x92dc3644
-+	0x7a40a305	0x4a1e0780	0xfb638be0	0xb0912795
-+	0x522a688e	0x1133c55d	0x0544a27b	0x3c56a574
-+	0x748502e1	0xaee58228	0x30ae0736	0x41a029ad
-+	0xa1e3d0e1	0xa9b66582	0x6ec07231	0xda4dba0d
-+	0x41db8fa0	0x731529eb	0x87f679d3	0x593d1579
-+	0x10935a3c	0x793d7b44	0xac680a86	0x1d01ec27
-+	0x6d669681	0xef056753	0x96aab271	0xae070e5f
-+	0x3321dc26	0xa5ea33a2	0xf8f14406	0xdc755c9d
-+	0x7f8e3210	0xc2fd90cd	0x34c102d7	0xe1c744a7
-+	0xa79f623f	0x07507959	0x34d28c67	0x26cbff85
-+	0xfa24075b	0x618dcdfc	0x64d52c6e	0xce650b7d
-+	0xcc414394	0xadc52ceb	0x43667ed0	0xa04f518d
-+	0xe52196a2	0xbcb7e578	0x2ed0486e	0x4d669b00
-+	0xf765e153	0xd2f097df	0x4ef97542	0xfa31d688
-+	0x1698d42e	0x3d828d65	0x222355aa	0xf2c37eb2
-+	0x3da4052b	0x198577ae	0x819590ff	0x5ab919a5
-+	0x673d5552	0xd2fa9d52	0xb711b72c	0xabd9c188
-+	0xb73a4ce5	0x2d20447b	0x3d19d4c4	0x4bbe86d0
-+	0xd205021c	0xe9875ec2	0x8dcb01f3	0x6e109fec
-+	0x60a3a693	0x2fb6b975	0x0ed26de1	0x7487f920
-+	0x83092880	0x4d5fcb5d	0x72b047d0	0xa256dcdd
-+	0xfef28251	0x41e36ee6	0xd91e2c20	0x7698357b
-+	0xb3684b1a	0x272311be	0x32860f75	0x44a6cc61
-+	0x63e3f66f	0x5a1497b7	0xeddf5a57	0xcdd4577c
-+	0x3cc63cd3	0xf7e72773	0x3fc9bb40	0x97ce4118
-+	0x1438da68	0x7a32210b	0x2aa07598	0x04e858ca
-+	0x850e0082	0x0b0f78d1	0xb178c391	0x9a2e231e
-+	0xa8f3b67b	0x2a08ea99	0x340d101b	0x42973ffa
-+	0x755ae5cf	0x201213c4	0x445e44f7	0x15a872c8
-+	0x857b94f3	0x24c023ab	0xb203df2a	0xc4711de8
-+	0xd1faaeea	0x1eb857b6	0x8c1b712b	0x11ad0f2a
-+	0xc64cf474	0xff6c128c	0xff13eac3	0xc4952e8f
-+	0xacdac9d1	0xb8c2f092	0x38d50a33	0xaeec4534
-+	0xa661a7ee	0x4d19a2bd	0x0f2d95e4	0x9a221827
-+	0xc9fe071f	0xe53486d7	0x1dc5426c	0x848eea4c
-+	0x607f616b	0x41a301f6	0xeadc389c	0x1f109048
-+	0x249f14da	0x2a20d362	0x7c93cd00	0x7ca633e8
-+	0xe50fb5a4	0xace8f92f	0x49638c89	0x478b4371
-+	0x60d70e8b	0x0bfb8bfb	0x6cac803d	0x702996e4
-+	0x15a35d2c	0xd68a2d93	0xe025d5ee	0xd8ca8c86
-+	0x295393d3	0xce1be3f8	0x0ee6bd15	0xd6735f38
-+	0x311495e6	0x7eb8bc83	0xea53551f	0x4fa9a90d
-+	0xe16a9ea0	0x651eb233	0x95f0afec	0xc687ed29
-+	0x0cd3abc8	0x132bb8b4	0xd70dadd3	0x538e630a
-+	0x98481e4c	0x0d7e6f1b	0x3986b2de	0xbe0924dd
-+	0x1d14608e	0x189f553e	0x7a6b7786	0x48bae520
-+	0xed56a3cf	0x795b4c6f	0x8670597a	0x40eb02ab
-+	0xf9b0b287	0xec9f86c3	0xe9a8c3a1	0xe6860542
-+	0x387ad930	0x8676e402	0x633f0709	0xd661d134
-+	0x011c1396	0xabf1f3f5	0x3fd76128	0x7be75289
-+	0xa6046e69	0xf3713680	0xa2ed30c5	0x893df28d
-+	0x197b8543	0x9860bef6	0xf6930c5c	0x6c0c379b
-+	0x0b0026e1	0x3ca86896	0xa7ea0bdc	0xca94413f
-+	0x6cbe8d16	0xd3e4edf9	0xb06efcef	0x3a8934c6
-+	0x00195592	0xa978bf0c	0x7435b0d1	0x3b17d97c
-+	0x0438684e	0x576ced8e	0x648683fc	0x362a8a87
-+	0x493fd86f	0x6bbe0476	0x16f74de4	0xbfeaaba8
-+	0xe6b90728	0xdc252878	0xe0b72eac	0x0872f52c
-+	0x2bab1521	0xa6c0d894	0x9f2b3726	0xd392e334
-+	0x785f82ce	0x15bba4af	0xb55cd743	0x6e8e9cf8
-+	0x047fd2e7	0x1fdfe424	0x8d4820e5	0xce7dd8c3
-+	0x88c82282	0x31ef9a76	0x1881fc38	0x3932a9da
-+	0x65bbfefb	0xe00f33b6	0xdd0754aa	0x1f596051
-+	0x704dfd7b	0x2604be1b	0x08b6c4f5	0x3f244085
-+	0xd89c65e3	0xcc4cdb71	0x143a2681	0x1bd3d004
-+	0x009460ff	0x86e314a5	0xb1aff86f	0xaa2599df
-+	0xbf68de69	0x355c8267	0x9588dbed	0xe47edd9b
-+	0x266b2ddd	0x129b0b01	0x6e6622a6	0xb3ea4a00
-+	0x802abd6b	0x7a268c1d	0x9f5a7b41	0x6f4aba0e
-+	0xe279b988	0x660ef08f	0xf4207beb	0xfa0168f6
-+	0x93266ea0	0xedfef092	0x302b5e5f	0x7278d2be
-+	0x58a494ab	0x8f53a302	0xf5e766de	0x1ef717bf
-+	0x45e2d6fd	0xf593b066	0xaea0f1e1	0x1bd1e027
-+	0xf853ba21	0x1127c5c4	0x8aa43b18	0xf1fba0b8
-+	0xe1cfb0b8	0xa9f9fef6	0x1320f1ab	0x5f7dfc74
-+	0x30f11ab4	0xaf47a3cc	0x9c190830	0xac085edb
-+	0x8b4db7c8	0x771ec065	0x6d5f3c3f	0xb8815437
-+	0x20d3c99c	0x00823c74	0x24d63cae	0x7587e453
-+	0x1a3fd67b	0xa5b361cd	0x789d168b	0x98a93943
-+	0xd7505c0a	0xa923b38d	0x46097a4f	0x814e41dc
-+	0x0f50f2de	0xbb548368	0xc48273d4	0xf27b6798
-+	0x9a6b5231	0x68491e7b	0x3f482179	0x89ea3b35
-+	0xa7525ffd	0xf8f1f616	0x07859572	0x738cb4b3
-+	0x8937c6dd	0xf5988c71	0x4874905e	0x677a8c17
-+	0xd58df987	0xc4210078	0xe6b1c480	0x7a91e14d
-+	0xa1228a7a	0x09057467	0x6cd59ec7	0x6ba93248
-+	0xb8e263cb	0xd3305730	0xaec36ee6	0xc773d0b5
-+	0x2895f8ec	0x6c9f5fb5	0xd32a21a5	0xcea9d058
-+	0xfa97282f	0x5559ceb4	0x5a0bf57c	0xf3cd99b5
-+	0x2771f6c4	0xfcc9a35d	0x5143417e	0x7c6f9db7
-+	0xb47cb7df	0xe7dde37b	0x70a07531	0xe25e06a2
-+	0x3bbb7d30	0xaf41b085	0xe664f973	0xee2c7ab7
-+	0xef8eb1b5	0xfba67f7d	0xd71568dc	0xbbff3339
-+	0xdf49725d	0xbc0e7edc	0x5361e6d3	0xb0978c73
-+	0x1320540a	0xa9843a06	0x34099c74	0x4bdddd23
-+	0x18680496	0x44f9cc19	0x6de71a34	0xe4eae858
-+	0x3349a819	0x28400571	0x10a55fe9	0x05672399
-+	0xb376eadd	0xed4b1a35	0xe79d0a4f	0xca8d0601
-+	0x78a7b066	0x8ea59a40	0x7be112a2	0xe99ea438
-+	0x44bd9efa	0x6e5227a1	0x70325aef	0x777282e9
-+	0xb579c189	0x4ee92bc9	0x0d0236dd	0xb57cf232
-+	0xb815e184	0xd05823e4	0x0c9490b8	0x70a5fa56
-+	0xdf0f178a	0x99d27374	0x1aba9e05	0x18378c3d
-+	0x86991118	0x3a199a70	0x90b2a2cf	0x67a6923b
-+	0x0975e5f2	0xf50fb0a3	0xbffbd67a	0xce6371e7
-+	0x203564ef	0xb1d7a395	0x201cb1c4	0x30085e3c
-+	0xfb2c66b4	0xf80ae969	0x1d407625	0x0bca1a0f
-+	0xb62c078f	0x83efbf38	0xbd7b0a69	0x7d9bb66a
-+	0x46b5c885	0xb256d753	0x0b5d008e	0x1756d5bf
-+	0xa9ffdaf6	0x01231fcb	0x8c69e461	0xbb2ad661
-+	0x29dee8f7	0xf1f23d56	0xd5e90ffa	0x48d9d93e
-+	0x77b26e95	0x49c47953	0x7565da8e	0x41a6124a
-+	0xfce69643	0x55f99554	0xa5501d6e	0x5738b726
-+	0x4c989c96	0x93cbe27e	0x20ff3d38	0xf4787a09
-+	0xfa3520e4	0x26b2dc11	0xb701c94b	0xcd8857ee
-+	0xb4b07229	0x0bbcf1a7	0x3d31cd32	0x08ced413
-+	0x3da04c1d	0x7bdf1787	0x344f510d	0x53a02e8e
-+	0x7e295418	0xa5ed24b3	0x3a5a2c98	0x34947e44
-+	0xb398bfcb	0x7c0ea498	0x18db3289	0xec646beb
-+	0x2e8ed766	0x5aff9ee3	0x497dc7fa	0xa70c3be4
-+	0xfc9306c4	0x729f532c	0xd87d61d0	0x635fadbd
-+	0x1efb1234	0x66fdb543	0xf5b86d07	0x3a4836fd
-+	0x9caf7dd3	0x8a9d9e5b	0x179529ac	0xa9a3fee8
-+	0x4cfa4495	0x791b8b7a	0xc503fc2b	0x1e07d0e5
-+	0x0561cfae	0xb5e7c403	0x0809744a	0xea84c654
-+	0x23614fd6	0x23ae773f	0x545be2c5	0x3585b8b4
-+	0xcad8b6ed	0x088a56c0	0x81054caf	0xecb13d9f
-+	0x44bd49f7	0x90a3da4a	0xf4b04300	0x32a2b69f
-+	0x44bed501	0x85cb54ef	0x85dde589	0xe410132b
-+	0x1c2e41c7	0x3d28cc9b	0x4df948de	0xaa058c37
-+	0xb82cf615	0xfa0574f8	0xd0391f5d	0xfb2b98b3
-+	0x3ce5585d	0x80ca4d6a	0x4b138f75	0x721ccc65
-+	0x496a3e37	0x4a8dd025	0x2d77b3db	0x65800ff3
-+	0x1d2df03e	0xb4b12a59	0x4c6a5b9b	0x17413fda
-+	0x4e938a09	0x7e3aa03a	0xf86cc8f3	0x972cd7b7
-+	0x871849b1	0x0c0879d2	0xc7c652a9	0xe9531ae1
-+	0x541142d9	0x4f731afa	0x9c43e538	0x866b695d
-+	0x4a4c4076	0x1e8aa293	0x51bc1eaa	0x5f57d28a
-+	0x142eb7f5	0x14096954	0xae0e9eb3	0xef732983
-+	0x70187474	0x3569b88a	0xfd3a3c61	0x54f0e2d0
-+	0x7afff032	0xa89cd23d	0x658114ec	0x434ccbc9
-+	0xc25f33c7	0x1b6e9a7a	0xd97bd017	0x3b7489d7
-+	0x67129c97	0x333ee180	0x04bf73ae	0x4731105f
-+	0x09d589f9	0x7d5a67a3	0x3e8fcb8c	0x2090c536
-+	0x14a623c0	0x21a247fb	0xe117bbe6	0xe98bbd1c
-+	0x09e23674	0x02f09f22	0xba7f9f45	0xd18573b6
-+	0xa6eb18fb	0xe01a7904	0xa8869f58	0x82ec81ee
-+	0xf4549f1a	0xfa0f6085	0x1cf809e9	0xe603d078
-+	0x13525306	0xd5611c7a	0x2c92b32b	0x5fdc0c0a
-+	0x0b3aaced	0xa40059b7	0x27c42499	0xcc619db5
-+	0x9f9b7841	0xfdca5eb2	0x2d3e833a	0x2830a6a0
-+	0x4c81f3b0	0x3ec8a8bd	0x50b95605	0x33a9d515
-+	0x7fe14795	0x4ff1d83d	0xef92fbfe	0x87f4faed
-+	0x35d5fc69	0xd8764a49	0xec81abfe	0x634a2ed8
-+	0x9635825a	0x0943624c	0x5eea8464	0x578e2344
-+	0x551bd5af	0xca02915b	0xea419d8c	0x9d0fa00e
-+	0xf3633f48	0xc6ad62ae	0x1eeef6ab	0x21ab106a
-+	0xe325954d	0x60457916	0x6ac9168c	0xea8a9d6f
-+	0x14772361	0x7630452f	0x8795e1de	0x21144d8d
-+	0xe7996dd2	0x45aff64a	0xfa62c37f	0x3f5a04cf
-+	0x250f988b	0x7985d243	0x1f717008	0x7908d22f
-+	0x4fc0d5d5	0x856d9819	0xccfab84e	0x3fec2a74
-+	0xe75c1af6	0xe2682ac3	0x2f08e560	0x7133d2a0
-+	0x63e5fcca	0x3a17438f	0x9cb826c8	0x06a2f3cd
-+	0x4bac2001	0x50596ba4	0xe74758d4	0x64d17e0a
-+	0x08fc5b67	0xb0d62f6e	0x95eb8e15	0xd51bfa64
-+	0x421c68b9	0xdd1526a8	0xfb7ea10e	0xab21193a
-+	0x4b1186dc	0x77bbfd82	0x1ab08e9f	0x871659a5
-+	0x1658fd5f	0xa04f322d	0xf50ed273	0xb8d411a7
-+	0x8056489c	0xfbd858ae	0xd70f7d88	0x3c5cbc78
-+	0xf53ec2be	0x1d2228e2	0x8b53aace	0x212454d9
-+	0x76ea1d2e	0x9ca66373	0x9f6679c2	0x51c48b56
-+	0x47348811	0x8abc0a27	0x60050980	0x5d290483
-+	0x7ea8504f	0xde186466	0x91219d4c	0xa73144ed
-+	0xb5f36fa4	0xa37912b8	0x02625bd3	0x3bc2d9ed
-+	0x2e623844	0xa9a751af	0xf0ba18af	0x4433e06e
-+	0xca7cda24	0x686c9163	0x86a437c1	0xf8c17120
-+	0xed50542e	0x62b61fa1	0x600e47b6	0xdff86df8
-+	0x77502dd5	0xea5d75ac	0x095a06e4	0xa18efafd
-+	0xfbd01eaa	0x27a1cb0a	0x3dfcab8e	0x07be7250
-+	0x086cb680	0x2c1ddcf4	0x6fa79784	0xcd874edb
-+	0xa383d520	0xa5c0d1cd	0x2e09cd9a	0x34d645c4
-+	0xf6b9b98d	0xe8e80ab0	0x39b78c60	0x6098b6f2
-+	0xc3c13e53	0x88c9fd83	0x60c9e766	0xf49c4c2d
-+	0x79e3d3d3	0xbfade7d5	0x6ba57dc1	0x3069e3ad
-+	0x59632e2b	0xb86e871e	0x2dd63287	0x9704b283
-+	0x343a6cb3	0x37d7950d	0x283f262d	0xd49d5f75
-+	0xdacc49b7	0x5952e045	0xc0fefa19	0x69effce3
-+	0x5b2a3c0b	0x3757339f	0x18584f8a	0x77a80760
-+	0x5fcdadc0	0xc9b4df80	0xfa521be0	0xbcfc8ecb
-+	0xfd3f8eb8	0xbee4739a	0x139caf94	0xbdea1cd7
-+	0xab158240	0x233fd8dc	0x8ec63274	0x34eee6d8
-+	0x4603b2f8	0xae544fc5	0xcd444551	0x2b2b349a
-+	0x0a562524	0xb2e02518	0x577b1125	0x8b3c1ff9
-+	0xfd27d88c	0x2ad77d04	0x1f82a54e	0x20254fdc
-+	0xee8e63cf	0x8df3fa2f	0x9ffc7c43	0x421ae12f
-+	0x9b166441	0xb74a5a4f	0xdad0511e	0x0a8ee5e9
-+	0x8fe86041	0x37ef90ea	0x3fcf8380	0x87288691
-+	0x384b8b8a	0x98d8a45f	0x995443d7	0x6c617236
-+	0x9a40f76f	0x9f30733f	0xfdbf3927	0x7b4c0281
-+	0x9e87e64f	0x9802938c	0x65f9de31	0x829c3eda
-+	0x0a1d2f4a	0x22e0e854	0x30045b70	0xbf84a44f
-+	0xc2c30b57	0x47c5ff90	0xaea87e93	0x99c69ae5
-+	0x1080e89f	0xc2896e80	0x09ba0cb2	0xd16ee263
-+	0xe05337b0	0xef1d8359	0xc1d4b102	0x08620117
-+	0x2e4ab2bf	0x05dc3af8	0xc7ab866b	0xeee05983
-+	0xd0a00c19	0x96996791	0x75ac6042	0x29001ada
-+	0x13440a23	0x2b1eca42	0x4cddfd68	0x81a98384
-+	0x6bcda226	0xa8594443	0x92f26e53	0x434de4ec
-+	0x07596ee2	0x4c8ea6ed	0x5596054d	0xaffe0ef4
-+	0x6dc1ab64	0x20bc006b	0xad4e3933	0xe6df0d3f
-+	0xfb3ca9ee	0xc2895a4e	0x8fed0d43	0xa5ed7985
-+	0xc364f083	0xc397a806	0x7b651ff9	0x1d7e22e5
-+	0xfd02f57d	0x5f16a429	0x8612177a	0xd36b8983
-+	0xd87b0303	0xeaa632b0	0x57dff2b2	0x19772dd0
-+	0x51317bfc	0x28404b1f	0x9e35d818	0x9c771bb7
-+	0x6d42a5c1	0xa6030578	0x9c844d5f	0x95d5eb7f
-+	0xdf15f5ec	0xf0f8c86e	0xf8ebfd20	0xae32d9b5
-+	0x4ce2b066	0x776f0149	0xda8a429f	0x0e895a79
-+	0xbe62c881	0xf9c051d8	0xcaa48f97	0x9e8dcb1b
-+	0x69cafc21	0x411f1bff	0x4f4d71dd	0x102cf709
-+	0x974ebe53	0x7373aea6	0xef2a7ec1	0xedabaccc
-+	0xdac969c4	0xe010b562	0xb6880570	0xa7a7f5d4
-+	0x3c6464f2	0x96dea774	0x1614a588	0x06074080
-+	0xb37304f0	0x99da7dda	0xd3e36214	0xb27b7cae
-+	0xb4cef0b3	0xa435dc77	0x9d1c1a15	0x616993f4
-+	0xb8a5ec8f	0xdce1ff5a	0xaaea14c4	0xa5d2172f
-+	0x90c8c636	0x49c0b81e	0xff9db895	0x4252b336
-+	0xd420b5ce	0x87b35be4	0xae32bda2	0x441092d9
-+	0x321e8583	0x7d863719	0x3c888147	0x3f2bb9f6
-+	0xd1daf5f1	0x682f2ffe	0xae62e280	0xcf8f928a
-+	0x4a7237f5	0x6f3a55af	0xb91dba98	0x9b83b723
-+	0x0e857ed8	0xd5ac567d	0xaf8bf791	0x23f8269a
-+	0xe369638f	0x6a88edb1	0x5ff0be07	0x5c02b513
-+	0x7d22f89e	0x2f865c08	0x9cc0d56e	0x31c87205
-+	0x420508f2	0x95a21602	0x04d838e3	0x353353e8
-+	0x7ca1feb6	0x61c6f7dc	0xf78a68eb	0x918f2ac1
-+	0x413037a4	0x09692d1c	0xc8eceb54	0xb1bf975a
-+	0x2ab63552	0x467bceeb	0x408bf024	0xeaed2b31
-+	0x3255158b	0x8d9c6617	0xe450350f	0x615cf5f3
-+	0x1a7fd744	0x27a0da59	0x43298211	0x77392298
-+	0x9511e81a	0x08a2c2dc	0x3d6f1113	0x967e6586
-+	0xd1726b35	0xb9292da6	0xaa6f8ad4	0x0f13b47f
-+	0x34b96cea	0xebd9487d	0xfe533d60	0x41bcdc60
-+	0x364c8c79	0x32be8bb8	0x1395ead9	0x9e85e474
-+	0x146b6fbc	0xc93267cf	0xcdda98d4	0xccfb2835
-+	0xe779dbd5	0xf9288237	0x2073e129	0x16fe4ab8
-+	0x34ca576d	0xac313eb7	0x5deb3b4d	0x1727510b
-+	0xc168a414	0x332cd921	0xe38e8123	0x9a2c1aef
-+	0x80f5d1d9	0x7c88c923	0x8af17577	0x59ae1408
-+	0xffa5e565	0xb418ab13	0xdd6376aa	0x45cd70d9
-+	0x3c3a06a2	0xbc555669	0x34d1fc08	0xc2aa934a
-+	0x385416e2	0x91ceeadb	0xe06c9cef	0x0394dbd4
-+	0x43e7c657	0x296d7621	0x55dafcba	0x808b836b
-+	0x61c41f0c	0xd9689bc5	0x3a531ffd	0x8417ed30
-+	0x3f3f8616	0x641eb4a9	0x24964006	0xe8d2612a
-+	0x3b916d7c	0x5603319f	0x29007523	0xc9c7dc1c
-+	0xd1f7212e	0x22ac1932	0x05c39a5a	0xd55081ce
-+	0x589ae996	0xa998fcbe	0xd8df5512	0xef7d7a01
-+	>;
-diff -ruN u-boot-2015.01-rc3/arch/x86/dts/microcode/m12306a9_0000001b.dtsi u-boot/arch/x86/dts/microcode/m12306a9_0000001b.dtsi
---- u-boot-2015.01-rc3/arch/x86/dts/microcode/m12306a9_0000001b.dtsi	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/dts/microcode/m12306a9_0000001b.dtsi	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,814 @@
-+/*
-+ * Copyright (c) <1995-2014>, Intel Corporation.
-+ * All rights reserved.
-+ * Redistribution. Redistribution and use in binary form, without modification, are
-+ * permitted provided that the following conditions are met:
-+ *	.Redistributions must reproduce the above copyright notice and the following
-+ * disclaimer in the documentation and/or other materials provided with the
-+ * distribution.
-+ *	.Neither the name of Intel Corporation nor the names of its suppliers may be used
-+ * to endorse or promote products derived from this software without specific prior
-+ * written permission.
-+ *	.No reverse engineering, decompilation, or disassembly of this software is
-+ * permitted.
-+ *	."Binary form" includes any format commonly used for electronic conveyance
-+ * which is a reversible, bit-exact translation of binary representation to ASCII or
-+ * ISO text, for example, "uuencode."
-+ * DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
-+ * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
-+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-+ * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-+ * ---
-+ * This is a device tree fragment. Use #include to add these properties to a
-+ * node.
-+ */
-+
-+compatible = "intel,microcode";
-+intel,header-version = <1>;
-+intel,update-revision = <0x1b>;
-+intel,date-code = <0x5292014>;
-+intel,processor-signature = <0x306a9>;
-+intel,checksum = <0x579ae07a>;
-+intel,loader-revision = <1>;
-+intel,processor-flags = <0x12>;
-+
-+/* The first 48-bytes are the public header which repeats the above data */
-+data = <
-+	0x01000000	0x1b000000	0x14202905	0xa9060300
-+	0x7ae09a57	0x01000000	0x12000000	0xd02f0000
-+	0x00300000	0x00000000	0x00000000	0x00000000
-+	0x00000000	0xa1000000	0x01000200	0x1b000000
-+	0x00000000	0x00000000	0x16051420	0x610b0000
-+	0x01000000	0xa9060300	0x00000000	0x00000000
-+	0x00000000	0x00000000	0x00000000	0x00000000
-+	0x00000000	0x00000000	0x00000000	0x00000000
-+	0x00000000	0x00000000	0x00000000	0x00000000
-+	0xc2b13ad8	0x6ce74fea	0xd364ad12	0xf6404a69
-+	0xc89041e4	0x217fa2f6	0x6ff6e43f	0x79cde4eb
-+	0xdb01345a	0xceecca42	0x5ee7d8b4	0x24afdbe6
-+	0x5fb36178	0xbc17d76b	0x31b7b923	0xc81aec82
-+	0x647b3320	0xf1db9653	0xff3b9759	0xe9c74b72
-+	0x3b193752	0xc147860b	0x160e0d6a	0x5bdb9dbf
-+	0x1ccce2ac	0x387670ad	0x2f106f05	0xf8607ea3
-+	0x42562576	0x30e086fb	0x409a06b8	0xf1957736
-+	0x5eb03f65	0xad147fab	0xe1a8e8b6	0x208d59d2
-+	0x683fba2e	0xf172b378	0xf8138dba	0x61e81d1f
-+	0xd551f997	0x28c79780	0x04f9db27	0xa80679b9
-+	0xaca4e7ff	0x6876944b	0x26d7dbc1	0x77f7dc2a
-+	0xf0bcb163	0x1b2a8e81	0x7b90aa49	0x8d5eaf2f
-+	0x522384ae	0xae7f7082	0x412ba10a	0x1ce1baa0
-+	0x478c29b4	0x9c09b4d2	0xf225f64f	0xd43026cd
-+	0x81098579	0x7df5db05	0xa5815bb0	0xc73ee756
-+	0x9738cb95	0xa5bd62e2	0x88e2c6b2	0x778e7fcb
-+	0xd3bdb872	0x9404403f	0x5be6ad63	0x71dc4abc
-+	0x11000000	0xd350099c	0x242d0996	0x1a4ddff8
-+	0xd7f1f03b	0x77590eb8	0x45c3ad79	0x3b714d23
-+	0xa85ba322	0x31851c5a	0x540fe0ce	0x38692bd6
-+	0xe3d9927b	0xb33428b5	0xcf0ac8d2	0xd3646604
-+	0xca88adc7	0x8afc41c8	0x721432b3	0x8fd19454
-+	0x26344e0d	0x3acf6c28	0xbda18c21	0x526d52ac
-+	0xf8d37e15	0x09305e37	0xf6907871	0xdb56cc21
-+	0x6802cccc	0x6693c8a3	0x0f4dbe32	0x0d924103
-+	0xee9242a7	0x5f867a13	0x2f65a246	0x6b35ad05
-+	0x39fb7da1	0xd69cb7d8	0x45869424	0x4768b466
-+	0xe3ace365	0xa85eea7c	0xa59939d9	0x2ae32fb9
-+	0xa20b1559	0x8865f3d3	0xbe02e023	0x4199575b
-+	0x0c43089a	0x0d57b287	0xd37544ad	0xcd4573b4
-+	0xa96b7485	0x05b67259	0x117414ca	0x2ba24577
-+	0x439db14d	0xf82c5833	0x54ec9806	0xf8282306
-+	0x1de7d3cf	0xf7a76dc2	0xcd897f60	0x0bb1decd
-+	0xae58efb0	0x743c07af	0x48adffb5	0x262260e7
-+	0xaa9fa071	0x9a9ef7c0	0x98e861eb	0x14a48871
-+	0x0b4c3292	0xad851820	0xe0f7f45c	0xd71366c5
-+	0xc63a2f01	0xd02f23c6	0x49645eb3	0x2365fe48
-+	0x44817f1f	0x576ee68e	0x396b6134	0xd9fc4857
-+	0x9a771368	0xda5f2693	0x6ad30ec2	0xc8d08171
-+	0xe40bcd42	0xf82291a8	0x3094a8b1	0xd3edffa3
-+	0x5d5fb5e6	0x93802a7e	0xdf0ff376	0x09ebeae6
-+	0x35091690	0xe938ec68	0xd203065b	0xcf2e8172
-+	0x85282b27	0xe59fb64d	0x4b2ad981	0xeb5dde75
-+	0xc07eac26	0xa78c969e	0x74165d84	0x61c4cfc8
-+	0x740452f3	0xe5f6435e	0xb712e157	0xac49215d
-+	0x5be5e61b	0x09f46a94	0xde5cd48d	0xe3ed6b11
-+	0x2e8173de	0xabb6759b	0x46ffc47e	0x0cd84607
-+	0x6046c26d	0x19356116	0xe1da098e	0x8e1bbe9f
-+	0x5c8d6c20	0xa17cfe55	0x101a1f91	0xd64aef70
-+	0xef2e7b34	0xbb428dc4	0xf2252a3d	0x8ab3f6c0
-+	0x161db4ef	0xfdbf4f9c	0xb5bf9f19	0x414ea8b5
-+	0xc3db5422	0xfc3934f2	0x635a8253	0x86260b8c
-+	0xa4c0e59a	0xa45d24cd	0x4a25da59	0x7a568be1
-+	0x4ae3587e	0xbc77a3e8	0x70723657	0x9abcabaf
-+	0xe0a95d4e	0x25519f22	0x3ee1d340	0x2ddc2ca8
-+	0x04ae20c3	0xc143f7c1	0x4a79e4d6	0x19377b64
-+	0x2ab0d3f5	0xd3f19f6d	0xc8dc880e	0xf577dab6
-+	0x69b6ac46	0x37d4af3b	0x0999bc85	0x3d9fbbf5
-+	0xb9387ac9	0xc148824f	0x4d11f5f7	0x1ff4594b
-+	0x59beb5b7	0x29474f52	0x68e6b2b9	0x4b60966e
-+	0x5e40a736	0xdeff5ef2	0xe623bbc1	0x50407021
-+	0x34ec34ec	0x131b3d57	0x628bda97	0x58152b10
-+	0xdd830410	0xf953e469	0xea4c8d25	0xd79d7ba0
-+	0x7a4da4f4	0x887d6841	0x7ff1e41f	0xdeffc5dd
-+	0x8354cb26	0xb133716f	0xae73deaa	0x292e200b
-+	0x9a9400f9	0x7a5d21c3	0x590d4799	0x1333b4a3
-+	0x782bbe3f	0x314fcb2c	0x475a1cca	0x4cd07c7f
-+	0x7a69a5fe	0xaef5a52a	0x0e9957f3	0xf7d86f6b
-+	0xd0983d0b	0xdffd48b9	0xbeea1e9c	0x19de4c7a
-+	0x46487695	0x5719e4e5	0x6dab39ac	0x856bf2bb
-+	0xc0644339	0xe60e92ee	0xc328b5e5	0x2d0c31e9
-+	0xeb73f1f4	0x7b577248	0x361159ba	0xd0f7002b
-+	0x5fa816ae	0x11ace78c	0xab62e0da	0xc924891a
-+	0x1d5800e7	0x4f90e04a	0x21374c9b	0xa3350e64
-+	0xcb9c1901	0xcc350b3d	0x5c3e5932	0x3cc6261d
-+	0xc3b54acc	0x849cf200	0x1425fad1	0xb3a479d9
-+	0xfd4dfda8	0x62973133	0xdd528736	0xd7e62e0e
-+	0x6921e1d6	0x7e41d7f0	0x74397b86	0xf739079a
-+	0x4ff82d1b	0x38b6fcdc	0xb20e36bb	0x0cef9b7d
-+	0xa737fdf3	0x1d18ef1a	0xc2c5dda1	0xdb16c5e7
-+	0xbfa99b2a	0xf83f2c10	0x883c8183	0xad10014d
-+	0xcf9f6321	0x5e0c079c	0x3ddd3d29	0x306325e0
-+	0xebdaff05	0xa88741be	0x181fbf20	0xa58a3a1c
-+	0x1f7c7165	0x7f5f5141	0x12576e50	0x9db22976
-+	0xd1fbe204	0x6ca2025a	0x10c15009	0x920649fa
-+	0xf42d3035	0x79efbc73	0xad2bde6c	0xb4e317ab
-+	0x1f7358be	0x447d850f	0x9bb2d1ee	0x3545cea3
-+	0x78eff6bc	0xaa86e51f	0x6383ada5	0x0c969d05
-+	0xadd720e6	0x92f77e04	0xda58e24d	0x401bd323
-+	0xdac090fd	0x9dc372b2	0x86726956	0xc508fde7
-+	0x20ec1cf1	0x29fdb66a	0xa3f7e3b2	0x5ffa58ac
-+	0x653c0106	0xf0d01026	0x55feffa1	0x661399b6
-+	0x5b23998d	0x91add159	0xbf917f02	0x87ef6fee
-+	0x64c4d653	0xbfadf48f	0x23f3ebcd	0x67869030
-+	0x3b90b7ae	0x19efc2a4	0x26596a35	0xaaa5fcf9
-+	0x5a14fd14	0xebeb9c9f	0x72224625	0x3a2c0009
-+	0xbe5a09af	0x5aad7b74	0x7d92261a	0x8bd722bb
-+	0xfff48488	0x0379b991	0x750cdaf8	0x83d3ec67
-+	0x2f582115	0xfdeca132	0x889817f9	0x2bcccbb5
-+	0x58107ba4	0xb57e016c	0xbbc45c80	0x5f14439f
-+	0x6e71c73c	0x5e18e93f	0x43c07fca	0x6d49bc66
-+	0x6641a788	0x234f48cc	0x9e18222c	0x86efa566
-+	0x450ad39c	0xbc3ef112	0x98e7d17c	0x5334659e
-+	0x9919cb9c	0x9fb4f0c5	0x2ea90893	0xc70453a6
-+	0xe83cc486	0x454da884	0x4cba0511	0xfb83f2aa
-+	0x0cf7ec27	0x20ef41bb	0x08355d0e	0x732798dc
-+	0x1689d337	0x61bf955b	0xa10d3f79	0x05fe9c6a
-+	0x1cbbc776	0x42e00326	0xf92509f4	0x71488be8
-+	0x3d92da26	0x839acf18	0x6dae5781	0xeecfcc85
-+	0xc63c0f72	0xcd79f887	0x677dd4c5	0x167c779a
-+	0x3359b45d	0x48f974f6	0xbd7debdb	0xd57d5935
-+	0x41beb132	0x1574e273	0x417a8fb4	0x46ca9d85
-+	0x859f3434	0x7cd1675e	0x1fb4e8b2	0xc55de45b
-+	0x4be8afa5	0x193c1260	0xd4225590	0x255fb988
-+	0xde63caee	0x96108c66	0xacc2b48a	0xad2992d2
-+	0xdd4cf4ad	0x0f6f5246	0xaf20d77d	0xf1c81d1f
-+	0x0db57bac	0xbb39c168	0xb78944a1	0x4ea55714
-+	0x0bb537be	0x5824ab81	0xdb9345fe	0xab0606d4
-+	0x12a8b9c2	0x90001c30	0x12c7197e	0x603cae66
-+	0xe2cb6b47	0xab0f94ba	0x28091fbd	0xb79d112d
-+	0xc53a69b4	0x7de8c3bd	0x4aee880f	0x5a5dd399
-+	0x850105e4	0x366d8714	0x4da7971b	0xc3a0013f
-+	0xfbc2461e	0x65954a32	0x4c8f348e	0x3ddf0054
-+	0xc615725a	0x3021e167	0x4a88ec0c	0xd69c44b1
-+	0xb21cd2b1	0x08e16586	0x90f02d12	0x554afff3
-+	0x65067d72	0x8c310d6a	0xd62ab40d	0x443bda33
-+	0xb6eac5c1	0xd0cd461e	0xaf200f23	0x41fd1b8e
-+	0x84e74a66	0x15b0bc4a	0x13fb1a4e	0xb36bf139
-+	0xeeaa0c1c	0xa91d6fab	0x64c99859	0xc049d5ae
-+	0x38921c4f	0x92b2f269	0x5c867fd7	0x41bd4d62
-+	0x70009a4c	0x85a37897	0xe228af8e	0x9ef4f31e
-+	0x891bbb42	0x3c09f291	0x32c29325	0x88f9ee6c
-+	0x81a0bc38	0xfef31889	0x8d2e3f79	0xc5e405f7
-+	0xb78e4127	0x3d61f392	0x3427d259	0x9f0bb662
-+	0xfe6ffb44	0x57e1e8c2	0xd4abd164	0xd0449914
-+	0x5bd5fe60	0x873601a5	0x0b07ae28	0xf4aac893
-+	0xb9c8f9f5	0xe3a514ed	0x9da193c2	0x55ebeca0
-+	0xa9d8f9bd	0x0a37dcc7	0x3f1d9f15	0x0bc645d8
-+	0xb808085a	0xc79b0f4e	0x0286eafc	0xefc87a56
-+	0xf1225ab8	0x58ac6a9c	0x9227ea3c	0x82deed0f
-+	0xff0f8edb	0x3c29a1b6	0x6d777dae	0xbeeee7d2
-+	0x0bdca157	0xf8d9d18d	0x52fda265	0x630da310
-+	0x4f660e86	0x1c985fc0	0x68f1c993	0xf4ae63bf
-+	0x3ec5373e	0xf6a10f89	0x2b19bd61	0x8aab04b4
-+	0x75653336	0x4be6689f	0xc2631812	0xc6d386f4
-+	0x93a6268a	0x4e5851ad	0xc2b47fdd	0x5acbd226
-+	0xd2aaf25f	0xbe83081c	0xe57eb32e	0x00debc3c
-+	0xcd8d7dbe	0x7cf67994	0xba17c779	0x34c19529
-+	0x5cf29a31	0xe10b7d8e	0x7b116896	0xf702de15
-+	0x6ee2e8cd	0x2f3a12d0	0x0e2a4666	0xbc1333e7
-+	0x2b653c7f	0x36e282a5	0x0ca0544a	0x2255b148
-+	0x5e413d5b	0x0fc88547	0x81e3073f	0xbcef6576
-+	0x12b29e93	0x233bef85	0xd41790ed	0x4f4dbf15
-+	0x20dea3d6	0x25f86504	0xb13177fb	0xee626fbb
-+	0x2f7529e3	0x6157578f	0xeee068f6	0xc97c5909
-+	0x053c28cb	0x6f540d47	0x692bb599	0x7004243d
-+	0x1c5620cd	0x0ca53749	0x9d7d6a4b	0xb8e504f7
-+	0xdd138f32	0x4d2fd525	0x676904b1	0x67b90411
-+	0x6777ede4	0xc1fbe02f	0xd7eb61fe	0x1c62f909
-+	0x91cfdb29	0x293a8d72	0x4475e4dc	0xba9d955f
-+	0x5413cb0b	0x952694f7	0x3b8eede3	0x33f1f6cc
-+	0x61c2604a	0x244f8403	0x862316a5	0x2e0387fc
-+	0xb3b3c699	0x418f5b0b	0x89a49abb	0x6c325320
-+	0xa952f0c0	0x72454ccd	0xaa272d96	0xf05e80d4
-+	0x1dceb03a	0xdb00d312	0x96cbcca4	0xc87c31f7
-+	0x96b17422	0xdba12c7d	0xedaac717	0x99b1da89
-+	0x48f3e07e	0xbace3088	0x71937740	0xd754a585
-+	0x31784510	0x36d08e4c	0x4e8e2396	0x081fe566
-+	0x0cd2092c	0xec932481	0xfae11d02	0xcb3b8609
-+	0xe20559f2	0xa2330b46	0x2beec857	0x86911540
-+	0x5e8e1895	0x4f42f3cf	0x8e32bede	0x78285f4c
-+	0xaf267610	0x9dc86091	0x6adf9b99	0xfc91da24
-+	0xc987356d	0x78f260f0	0x9cc6f796	0x1d6aa013
-+	0x5f1922de	0x54d065e8	0x8a7c3cea	0x13768df3
-+	0x4e8858b2	0x712b5b8d	0x0b64c3be	0x3845ef6a
-+	0xff77b842	0x83a497a5	0x77f15aaf	0xccfc6df7
-+	0x20084d31	0xaacdde0d	0x4059b446	0xb940b3a7
-+	0x3fa88d6f	0x3162ec66	0x43cc767b	0x2a2a6916
-+	0xd0dea02d	0x5b9f11a1	0xec36c7a9	0x6d7eb6ce
-+	0x4506fc1a	0x1c3e362e	0x9e2b0f99	0x547e6ba7
-+	0x6b8169ea	0xbd89401a	0x2cf5ea6a	0x100e6249
-+	0x47ef40de	0x063a0b33	0xb1f49499	0x3026e75d
-+	0x3b6d951b	0x6212fd9a	0x5073aa23	0x9bd609b2
-+	0x760cf7bf	0xe6766d03	0xff811dac	0xa461d069
-+	0xf40e74b3	0xec113577	0xa2cf15e0	0x6f43a20a
-+	0x43f52321	0x96896eb8	0x480c1129	0x35190a4d
-+	0x29a80a08	0x8ce4dd2c	0xf4b40d21	0x2324ef9a
-+	0xf3f2b54d	0x7a0cc79e	0x3e9d973e	0x2d28dd0a
-+	0x1a5e9aae	0x5abb6fab	0x215bade0	0x39e678c3
-+	0xd6543c64	0x1652e0d4	0xca2f5303	0x0a6879bf
-+	0x24841561	0x05c559e7	0xa1ac6c48	0x3fc52191
-+	0x29527695	0xb977ce60	0x04589311	0xaff7180b
-+	0xdeb08866	0xd62d8f6a	0xa6f62306	0xfdef1235
-+	0x1946ad8d	0x1d49fa21	0xac486c1e	0x3ca80491
-+	0xba8c2a76	0x06ce9ac6	0xcbfbc465	0x675c4ada
-+	0x1eb6b108	0x27d03a7a	0x606144e6	0x2eedb163
-+	0x64d8d1b7	0xe7695fde	0x75d593a5	0xe7f00f68
-+	0xc3c45a5a	0x522c4164	0x37833c3d	0xddfda19e
-+	0xd7b9f984	0x77e6ea85	0xd148df03	0x89989155
-+	0x80fd8f07	0x3adafce3	0xf4e07aa6	0x6ea417b4
-+	0xd1732fad	0xd13cba8a	0x01729b17	0xb9e666be
-+	0x48addea4	0xffb3a560	0x4a96d730	0x0349777c
-+	0xbf355e6a	0xb5055554	0x22442c5e	0xd8bda1b4
-+	0xb0a088ab	0xef18b9a6	0x11ecc51d	0xd59247f1
-+	0xf86fe339	0x17752dba	0x0bfacac1	0xdef25155
-+	0x035b4275	0x02a3f293	0x8466a5bc	0xf376864f
-+	0x04265d7d	0xc6fc5aa3	0x36adf7ec	0x4e16af5b
-+	0xe3b28d5a	0xa49c6535	0x2b05f03b	0x46d5d914
-+	0xfcae58a0	0xda644349	0x656d72c0	0x75d47095
-+	0x302a9fad	0x4e245aaf	0xe2a3e852	0xa9b73076
-+	0x8d9a2469	0xe7c05607	0x1c17b4b3	0xc2e63302
-+	0x49fa365d	0xabf1f5dd	0xc850b090	0xdced47ac
-+	0xd60b15d7	0xb25efb14	0x33f9a3af	0xd011cc8f
-+	0xf0414eaf	0xff212e84	0x9e2fbd61	0xf6636285
-+	0xd892696a	0x6d9ffc34	0x253ad380	0xffb7ed45
-+	0xaae31520	0xadba81d1	0x7f1e41bf	0xcd7e1eb7
-+	0x9dabd0e9	0x5de91eeb	0xe9fa68ed	0x3fae0c6a
-+	0x6da21b40	0xac743c3a	0x19228523	0xf5098069
-+	0xf647fe8d	0x95666621	0xa2a3613d	0xe6278031
-+	0x6901cfe4	0x3bf132be	0xc3314ee8	0x5b8261b8
-+	0x9b724149	0xd0838d83	0xb0d05c76	0x57295707
-+	0xcb11fd8f	0xfdce9b20	0x346449b6	0xe8b44745
-+	0xc0784ff6	0xe6083a3f	0xb0b87142	0xd2df2210
-+	0x7b9dc719	0x961585df	0x359390ec	0x0d40e1f0
-+	0x56436a52	0x8ccb0d80	0x78066e70	0xcfd04ac4
-+	0xd850a6a2	0x00612831	0x19e74acb	0x5a80989e
-+	0x0d7b151c	0xca9bee4e	0x2fea9d99	0xfdd7ec3c
-+	0x3a73b4e7	0xa70068d1	0x38aff576	0x4c861c14
-+	0x2e23b093	0x0e429806	0x8cce23dd	0xb0ce104f
-+	0x1684bf8d	0xb2756213	0xa64c594a	0xdd8ee144
-+	0xda5316cc	0x76dc877f	0xa1c5fe35	0xb5e04383
-+	0xc9e10000	0x8ac58408	0xf6d7e781	0xbda6cdc5
-+	0x81517c56	0xdee2ba90	0x3cbfc247	0x4c84887c
-+	0xa722c632	0x4767a4b3	0xe83b79a3	0x7f100150
-+	0x1074198a	0x220260db	0x1c940f4a	0x92c42619
-+	0x56dc9f64	0x1c0f7eef	0x3694f4e8	0x5b4b63d0
-+	0xe784afaf	0xcdcdb039	0xf7040a88	0x47f2d84b
-+	0x143a94b5	0xf68f4fab	0xf6640462	0x3cd6b1c1
-+	0x7fbe0e60	0x700ee673	0x030e877f	0x60779cb8
-+	0xddb6933d	0xe46f377f	0x9f9c43c9	0xce0f0d58
-+	0xe6bf42a4	0xae09f51b	0x295e8cf0	0x140df2b9
-+	0xfb04c209	0xb6d46f7b	0xa86e0c91	0x64fc624d
-+	0xa7a8760d	0xdac844b4	0xbe1491b0	0xad480684
-+	0xea874ca4	0x3535e483	0xd49365c9	0x83f2c050
-+	0x05ec206f	0x7fe3b010	0xb72aadbf	0x40b3a286
-+	0xafe395a8	0x3506d4af	0x9c4e33e7	0x0259eba9
-+	0x0daecf5c	0x264c008c	0x898bdada	0x0f3ac833
-+	0x7ef5f3f8	0x41934050	0xc3bda261	0xab624dd0
-+	0x5d93609b	0x495a5f1f	0x34119efb	0x3bfd15fd
-+	0x49255da9	0x3ab2d260	0x15ce2006	0xd466d454
-+	0x3d052ca5	0x567977cc	0x7f8b8657	0xd9b34f42
-+	0x36c65ff5	0x5f96bffb	0x2d32daf1	0xb301cf05
-+	0x933435e1	0x316fb1ae	0x48be2982	0x657c3286
-+	0x1916c189	0xa3a030b5	0xe4c7bce9	0x6a762931
-+	0x1e90df3b	0xe9084ef0	0x1236cfe1	0x7239326c
-+	0x29bd4dfe	0xaa01cc46	0x93e514ef	0x4e376f6d
-+	0x14087975	0x9cdad6f9	0x86b31bd6	0x2c206281
-+	0xe178b367	0x4943f013	0x9f97c9dd	0xe848fb0d
-+	0x7d19e49e	0xde4d9b1c	0xee7f552b	0xadea7634
-+	0x605ab7c5	0xef66b062	0xaf369aec	0x39a96463
-+	0xb39ed4e0	0xf4c38bbd	0x48565c84	0xcb4ccad7
-+	0x37b656c4	0xa5291b2c	0xba05d037	0x0027ff97
-+	0xec2034c9	0xa19abaff	0x99dd50bb	0x44bd5f0b
-+	0x8cc4193d	0xe1dca3f4	0xae2896c9	0x992105a5
-+	0x46b04aed	0x3ca454cd	0x9a0e86a3	0xfdb3702e
-+	0xf2ddfd7c	0x6b7ca41e	0xe49f2227	0x4839351f
-+	0x201f1173	0xc9af9d40	0x7942ef65	0xf35e5867
-+	0xe5358390	0x0beff1a6	0xd057a81e	0x89830387
-+	0xe496a246	0x45007e0b	0x62c34ed5	0xc2170342
-+	0xa095780e	0x00682a8d	0xfab7e24d	0x207cb6f9
-+	0x7d5c8058	0xb0164454	0xee8b6d44	0x0aa01190
-+	0x70637e84	0x1268c1cb	0xf7a1eb80	0xbe90b153
-+	0xcdc765f5	0x5841d605	0x00141f5d	0x475f8d3a
-+	0xff60a6f1	0x5f7a2e3a	0x30d3f150	0xd9a22f7e
-+	0xdded3241	0xfb05ea5e	0x4093fd88	0xb11f5a9e
-+	0xf1b36594	0xc7579059	0x7f66c5e6	0x8fdb1095
-+	0x46ff7f62	0x70925647	0x207287e3	0x6bddfe5d
-+	0x240fb596	0xc91784fd	0x28acd7f8	0x7cfbc9da
-+	0x2d6b3cc8	0xf8e9aaf5	0x489616b8	0x9ed70056
-+	0x586bca94	0x6a95971e	0xa2238b5e	0xc9a06325
-+	0xb90882a9	0xb5b3ffab	0xae4b2beb	0x5aa0ee34
-+	0x52e23123	0x9a019e1c	0x84b0f00c	0xba2cf495
-+	0xca4108dc	0x9272b0e7	0x760b209d	0x3e294274
-+	0xb8f0316a	0xb666af5b	0xcf436e91	0x365dd253
-+	0xbf11262e	0xdfa3f8ee	0xd6e0ab96	0xd8a639f8
-+	0xcba8b31f	0x58940e1a	0xa4bf5e3a	0x7f8cec5e
-+	0xb5ec87d4	0xb7924503	0xe2bff3a9	0xc7ec4445
-+	0x1e94324c	0xccf28ba8	0x2294b594	0xad297087
-+	0x18624369	0xa017851f	0xc635302f	0x802becac
-+	0xe631eaeb	0x386589dc	0x780823c4	0x7b989c1d
-+	0x94554d93	0xfc22d343	0xb8edbd0e	0x8bc08005
-+	0x998a234e	0x507d3976	0xf1f9833c	0x522a2971
-+	0x2765433f	0xe1ef356f	0xd45d5fd5	0x8d3294d3
-+	0xabcffdba	0x9b7a6338	0x2f261e1f	0x891fdbd0
-+	0x67008f6c	0x23d96866	0x057410ec	0x2f360684
-+	0x8380c618	0xc968f3ae	0x91ac868d	0xdb5cc503
-+	0xf092b320	0x73ef35c1	0x0fada995	0x56316744
-+	0xde2290fc	0x7070dee5	0xcf1cd6ab	0xf1a47253
-+	0x2c53b495	0x8952b433	0xa5b47637	0x9dfe09ae
-+	0x2fb36206	0xcb1dec3f	0xec188994	0x10407824
-+	0x91f27ffe	0xd461edb0	0xc3779ae4	0xe3f9bede
-+	0x183a107a	0x0122654f	0xe319bba5	0xe75c33cc
-+	0xc657ea24	0xe5490f98	0x653d01c7	0xce09c546
-+	0x631ea29b	0x81278443	0x0cd4dd3c	0x6b7da4ff
-+	0xacf1363c	0x563ed879	0xe8420e5b	0x43adcc25
-+	0xc6ff7dd8	0x21e26910	0xa4b4f3be	0xaea31be5
-+	0xc241c837	0x07178d5d	0x2b69f8b3	0x3bc0b4e6
-+	0x429c50c1	0xe493ba56	0x5933b099	0x237b2036
-+	0x0e807425	0xe450e510	0xd72a6007	0xc1459771
-+	0xe9b22ad9	0xb25e452b	0xeda83668	0xb00e8d93
-+	0x12b8f351	0x703ed783	0x901c6109	0x72b3e601
-+	0x099cfb54	0x7fc68f6b	0xda7f436b	0x1dd70c40
-+	0x5a57914c	0xddc3fe51	0xf1b692dc	0xe8b066bd
-+	0xaa7b0d19	0x4a593520	0xd3bb712f	0x1e1b4c0e
-+	0xe651f456	0x4fd0e108	0xdef8932f	0x3de33c3a
-+	0x4c189801	0x62c607ea	0x708e8086	0xf1b9d204
-+	0x19656d6f	0x216430e3	0xc8bab24c	0x4ea84e4f
-+	0x659f0cea	0x4e7bad1d	0x7f4d77d5	0xf6d114a2
-+	0x6d8038b8	0x8d56f1fb	0x2f015191	0x0b3770bf
-+	0xd81e40db	0xfe66c348	0xffd1d3bf	0x07021042
-+	0x8ce5e26a	0xcdaa21ca	0x1bd4b85d	0xfabd423f
-+	0xba6814e4	0xaa5fe624	0xb2591597	0x81e601e5
-+	0xf3601f5f	0xf4dbb30a	0x0950789f	0xbe9b1f70
-+	0x35faf9cf	0x9f27e299	0xf9c1075e	0x09b04ac9
-+	0x2bb3cb1e	0x8c197668	0x8dffa14f	0xda4a57de
-+	0x5e0f0a9a	0xd1521120	0x31c26430	0x46a75d9c
-+	0x6c7e1a50	0xda1db6de	0xaef50782	0xd32d301c
-+	0xa4688102	0x77c6bc1a	0x3c7e2525	0xcbd4284f
-+	0x5f493a22	0xb35abf25	0xc996f4ff	0x009f0c05
-+	0x6143581f	0x7a864557	0xd0e1d52f	0x0725f9fa
-+	0xdcc0b294	0xc3609ee2	0x75373ce8	0x1ffd4ead
-+	0x331b82b2	0xfa833542	0x43c00611	0x7ab1215a
-+	0x099bb7f3	0x1c95dc3b	0xbbfb8231	0xf62659ba
-+	0xf9cc6fbc	0x030b6f56	0x793603cb	0xe7c48d71
-+	0x9754aa20	0x41710095	0x35b92718	0xf464fca0
-+	0x4ad77ab4	0xd5582574	0xe0552ad4	0x7393e896
-+	0x34920ff9	0xd0a44180	0x2e523669	0x81d5573c
-+	0x1959ad82	0xfb153a03	0x1cfa615f	0x8b302a87
-+	0x4e4eea7e	0x21ca24c2	0x5a971dcd	0x788e063e
-+	0x2c9beb8d	0xb3b98af9	0x24079012	0xbdec8a61
-+	0xc41752df	0x8d2c0a3d	0xe960ac61	0x658cae63
-+	0x891956fa	0xd0d1a216	0xbc37b8fb	0x5e2c3009
-+	0xd600a7ad	0x47c7c30c	0x8fbd13f4	0xbae4d97c
-+	0xdd15d643	0x71440bb6	0x3fccfa22	0x1ef82308
-+	0x2c48907e	0xf6ad303e	0xc1ed250f	0x6f9204f8
-+	0x19062b0a	0xfe8ab325	0x379e8b1b	0x8116d220
-+	0xc6d4d8cc	0x624098ee	0x3e6aad4d	0xbce3ace2
-+	0xba349982	0x7439dd11	0x6ac6d240	0x9f2cf9c6
-+	0x3dff687d	0xe5b6f2c9	0xbe1645a3	0x39a39bfb
-+	0x7956d69e	0x50d22da6	0xb7e32b7a	0xf4144b4e
-+	0xb94151a5	0xee36b1b1	0xc8cd8d65	0x5e571859
-+	0x0db49c4b	0xd9d71cd9	0x4bc017ca	0xc81d5130
-+	0x0c9660c7	0xe4b12b28	0x5549e753	0x97a9fa4a
-+	0x0dac4813	0x7854b977	0x7c8cc619	0xe4166449
-+	0x020ae016	0x02448146	0xa3924345	0x1542cba9
-+	0x461583ad	0x7bf66ddd	0xaff59684	0x398b370c
-+	0x5ffbd30c	0x87900806	0x0891afff	0x7aa84ad3
-+	0x62e35158	0x995e545a	0x6ff3779d	0xa05bdc9b
-+	0x777a7e83	0x53643dc4	0xd77d4704	0x422ec993
-+	0xabd03cd1	0xcb6ad4b7	0xa94c512d	0x6562975c
-+	0x63b27747	0xecc0955d	0xd965b2b6	0xc67b64c5
-+	0xfd69b042	0xfe7314c4	0x9f807bbe	0xafaba4d7
-+	0xbd63eb72	0x811a8901	0x7ea1be4d	0x7316f0fa
-+	0xa6cf004c	0xc17d9363	0xe3fe88d2	0xe60faddc
-+	0x5d3a1b02	0x8a9f1ed3	0xebfb9234	0xbc453cf2
-+	0x190085ca	0x369a1df9	0x55721790	0xb071a9f3
-+	0x0697bfc2	0x65753b76	0x177d720f	0x1563979f
-+	0x970c4dd8	0x511aec5d	0x19878647	0xc17280ee
-+	0xe61c4188	0x7a4c0756	0xdb49157b	0x0d461f37
-+	0xcf0bc73b	0x1c6e7ac1	0x683a9e1e	0x0dd9ae7c
-+	0x72be0902	0x85a22cd8	0x8b98d2dc	0x2f3a9ff1
-+	0x4540314d	0x3a4e344f	0x3ada6bee	0x3408b829
-+	0x711ba0cb	0x0c92ae4a	0x621bc5f1	0x908043da
-+	0x8f8ac31f	0xed15f127	0x731dc6d9	0xdc6eb058
-+	0x6815eb3e	0xaca3d9e0	0xef7b5c61	0xfea2a032
-+	0xd3c76315	0x0f88f4c8	0x291b8710	0xa5ef8346
-+	0xcab00448	0x78ef9fb3	0xebf0388d	0x33f2a5da
-+	0xc41190f2	0x0cb6bcf7	0x0afe5680	0xef88d3ea
-+	0xc0e10f4d	0x7e028bfb	0x933657d9	0x6f61fcd0
-+	0x7e03e392	0x23258472	0xfb16ab16	0xfaf74a5b
-+	0x7ab0a634	0x8346df0a	0xc3c93451	0xdff93a32
-+	0x3920a816	0xc3331312	0xa6a2270c	0x10025010
-+	0xa8f4d842	0x36b96367	0x77a30dad	0xe1bd6d0c
-+	0xf3ddb722	0x9412e861	0x4e7cd927	0xef243451
-+	0x41d7258f	0x6eb34be2	0x026ef296	0x46112337
-+	0x656c8c07	0x18deff2a	0x5be15cbb	0xbaed3a53
-+	0xc795a134	0xdcb1350b	0x758b6482	0xc6cd0e88
-+	0x9be9d4f6	0x1ec7c2da	0xc5c1fe49	0x3e86e8f1
-+	0x09126f9e	0x96772352	0xa4d5c70b	0xc6f1f2d6
-+	0x3c22e595	0xd5ccf006	0x48f6167e	0x415dfe21
-+	0xf49891e0	0xab4c4a7c	0xcd9b336f	0x5777d2af
-+	0x6a8ad930	0x3f47c079	0x72286c81	0x44b565fc
-+	0x5ff87a6d	0x6aad7ebe	0x66535422	0x4dfcef23
-+	0xc0ffcc8b	0x6e2cfe00	0xf1e7e1f4	0x06e46379
-+	0xce1bf7c8	0x70fec576	0xe9d0014a	0x844f7b07
-+	0xb7a27720	0x4a62dde1	0x39207994	0xe12e7ef1
-+	0x75f2152c	0xec05cfff	0xac67a90a	0xbb9f0c88
-+	0x8fe2e008	0x58e15130	0xd54c4808	0x71fc616c
-+	0x02564be1	0xf3d121e1	0x904f4a7e	0x7eaa8b70
-+	0x893d8579	0xeb94b6a0	0x4c84f056	0xebf49f0a
-+	0x2b2fb4cc	0xb6014008	0x1fe0a076	0x9e7af7eb
-+	0xc168be50	0x61653283	0x2016760c	0x57c36535
-+	0x720405de	0xb4924329	0xb1189d2c	0x9dd8f5c0
-+	0x2a5f1ab8	0x49580b2e	0xacbbd3d3	0x3261e254
-+	0x7a827ba0	0xfc91f0bc	0x2b02ba34	0x96edf03b
-+	0xfd7fd36a	0x24edb430	0xafc7e2cb	0x0a8cd505
-+	0x22ed5205	0xb42ca58f	0x24fc4009	0xf064cb61
-+	0xa564a202	0xe42a9b54	0xd2a28338	0xca1f1a5a
-+	0xbe51905d	0x9a960bd5	0x4238b656	0xfb08649e
-+	0x76c93495	0xaccc0877	0xc465148e	0xa2bc11d6
-+	0x84a54419	0x2a2ddd16	0xd9e1d2e4	0x622bbcfb
-+	0xcf0608d2	0x93a26458	0x2b666698	0x0645f585
-+	0xed3df83d	0xf6e81a41	0xce11e962	0x93c27f84
-+	0x30f41197	0x659aba68	0x57c01eea	0x2a4cc4de
-+	0xecf2f07d	0x3340329a	0x1084f771	0x9d4c351c
-+	0x32d28528	0xa3b947ae	0x78fce7f7	0x14d0290c
-+	0x7b7ac82e	0x7de381ad	0xa907d620	0xc31ae25b
-+	0x513a2723	0xd8cc3457	0x8fe676a6	0x04039d12
-+	0xdce5a5ff	0xcc0af574	0x1406d489	0x3393d517
-+	0x004cfc81	0xeffe2eba	0xf2ee0c96	0xacac4889
-+	0x6484e7d3	0xdecdce02	0x029dacc5	0x95c52292
-+	0x0dfaa257	0x7150527a	0x0b59ab84	0x3a915b26
-+	0x2624fe20	0x46309564	0x704261ba	0xdf434f92
-+	0x2eb248c1	0x26d555d7	0xc75d81f5	0xbd0185b8
-+	0xf53b1298	0x059b9353	0x7821a25e	0x4d7fe1cc
-+	0x811b5179	0xe42e22a9	0x4fb78808	0xd6841c31
-+	0xd9edb88a	0x9b433474	0x1c54ca12	0x4887f63d
-+	0xf1b21006	0x8f7761fe	0x62a15331	0x6b35788c
-+	0x4a5a9edf	0xfdee39c8	0xed95d818	0xe087b392
-+	0xcdc89907	0x5ee58605	0xd4d7290b	0x46f8d2ce
-+	0x6c9c3f65	0xd129f26e	0xd8cd5b87	0x2bc19529
-+	0x7ab5b036	0xc44a6fbf	0x76fb68b1	0x6bffe654
-+	0x482067f6	0xf8ed9d43	0xdad6bd63	0xa9ac77a2
-+	0x76e6c089	0xe24ba46c	0x420ccbe3	0xfb09b718
-+	0x83ec3694	0xf76e47d9	0x5f3a8859	0xe85f7fcd
-+	0x61f1d09a	0x35065817	0x88bf5c6b	0xfbb9f76d
-+	0x8b68fca3	0xed95dcb5	0xc2ff7cf1	0x855a2958
-+	0xf7d28d92	0xb61802f7	0xf9814028	0xac8703c5
-+	0x4ce8c7cd	0x1876cfe3	0x851c045a	0x56b3d146
-+	0xe7abf1e7	0xdc46d720	0xd1e35c3a	0x2243ff60
-+	0xc257c828	0x16513009	0xcb797d5d	0xe0f2cb11
-+	0xf7e40b66	0x721e0495	0xce72e9b7	0x32eeedcf
-+	0xf5dc5e01	0x355de93e	0xc20ad627	0x95aa436a
-+	0xe69cab2b	0x511fef1c	0x18522a80	0x203e240f
-+	0x882fb1f6	0xfed4db9a	0xa4bf7193	0x420df144
-+	0x84791341	0xdb4767a1	0x8c0b40fb	0xcfa5c5d2
-+	0x2783cad4	0xcf8dd48c	0x051037a0	0xc2994140
-+	0xaf2a0a2e	0x29619774	0xffd83edd	0x1e346b24
-+	0xb058a539	0x8118011a	0xb1722fcf	0x4f89c7b1
-+	0x0e6f2f4b	0xdb155d1d	0x21d21cf9	0x25ba315b
-+	0x7a17b541	0x3f23c32b	0x301e0881	0x9b0ad7f7
-+	0x8adfccee	0x6c2f2975	0xbc9c318d	0x8d220d3b
-+	0x33d2d0c1	0x5bc2dbf5	0xe0290856	0xedd38c75
-+	0x56642fea	0xf7f5609b	0x5bdb0058	0x511dfc07
-+	0xc6b0b515	0xeac6f4af	0x7da3a898	0x50452011
-+	0x4668042b	0x4055890e	0x7bd41459	0x9b98f96a
-+	0xc516cb64	0x15313f77	0x04f6816a	0xd622931a
-+	0xbe2be61e	0xd549a421	0x380373c2	0xabb7123d
-+	0xc54b9d3b	0x5a130630	0xafff90c4	0x50f5b4ce
-+	0x75b0ecf0	0x16078950	0x44d547f1	0x8353af66
-+	0x587bb496	0xf8f3c68a	0xd3b06119	0xef05594d
-+	0xd403c928	0xf12b06bf	0x2b78eb2d	0x7de9106d
-+	0x4966726e	0xa8b5ef1a	0x1c42a3f6	0xd55aa69b
-+	0xe409c51f	0x93533259	0xc6d9dbf5	0xb4d63a17
-+	0xaaf73aaa	0xe485f5d5	0x753f0d34	0x1a3e6dde
-+	0x41183e36	0x2ec20e27	0x6b66bead	0xfc5f1d42
-+	0xfecdf91f	0xb7066b78	0x8ed6da1c	0xbbeb87d7
-+	0x8a72de9b	0x1e0e2f97	0xc377f532	0xedbdeb81
-+	0x0f5b9e33	0x6ae7ebf2	0xca7440df	0xe9c3eefd
-+	0x4bd50433	0xc25a6b95	0x9d2bd1e2	0x70709639
-+	0x9050c202	0x7cbd2f1d	0x41443fa5	0x63dd89b1
-+	0xb2607a0e	0x88c1417d	0x1631dbb0	0x13508ae3
-+	0x4e78d90c	0x19811ae0	0x4bc827fb	0x459a55aa
-+	0x52c0fd8d	0x8359500c	0x6a886312	0xbe704e33
-+	0x441b7c24	0x5121c79c	0x86066830	0x1a0d013f
-+	0xe78bfa0b	0x3f9e3ffc	0x7b3abb16	0xfc24b9ee
-+	0x4f543a26	0x0619ad49	0x6a20077e	0xc8191371
-+	0xd1d2876f	0x8b83645d	0x48330de1	0xe132ea1a
-+	0xdc077f5a	0xfd14dd79	0xf606c198	0xec47c478
-+	0x17c3f14f	0x334fd708	0xe39cf072	0x39f543c2
-+	0xebab93a2	0xf7febed4	0x79971f6b	0x888858d4
-+	0xdfd11199	0xafe72dfa	0x13f30ff8	0x6141ada3
-+	0x5fe75eb0	0x75dcecd6	0x70fb1b33	0x073f9823
-+	0x7afb726d	0x04b10ea5	0x6c881a5b	0x945a5c69
-+	0x2ecb950a	0xb384f045	0xe5eb9ac8	0xa46dfd3b
-+	0xb8185584	0xc095b417	0x86173c80	0x6a509180
-+	0x4eddcc32	0xf408ac80	0x0833ae99	0x58ca79b2
-+	0x2eac5d79	0x85c2deb7	0x400e6a01	0xdc6caa56
-+	0x706176e7	0xa5dadc8f	0x0d4969de	0x259553d9
-+	0x52425195	0x7d074da3	0x784ef596	0x8580e28c
-+	0xbaa52874	0x71abf00e	0x8434cb32	0xc3a8ffe2
-+	0x6ec52581	0xa4cd744f	0xd5820757	0x7e257e4d
-+	0xb7428f60	0xb55fd824	0xd454c529	0x8de72e07
-+	0xf84abcb4	0x30b7c926	0x5140a1d2	0x4e9550c6
-+	0x18826ed6	0xf561a8eb	0x28c7cde6	0xe91022ea
-+	0x73cdc0ef	0x32bea752	0xc7a0138d	0xa0af6cd3
-+	0x52c4736d	0x0b459241	0x2156a8d8	0x0d32a2ad
-+	0x49bb6600	0x8752c2bd	0x45d0a0ec	0xc89f9bc3
-+	0x76d775a6	0x963f0a6b	0xb5d100fc	0x2731528b
-+	0x2719d1a1	0x2b201af5	0xc337ea7b	0x70ce1c8f
-+	0x8cb21437	0x9869038c	0x53e9458e	0x624904e5
-+	0xcb7cdad7	0x13b9bba7	0xc66ec1ae	0x86bbb14d
-+	0x018c25ad	0x88573452	0x4165b4bd	0xa719f640
-+	0xd4b8227a	0xdace857f	0x701c449e	0xa835c09e
-+	0xef8e4608	0x72ec0d91	0xe88703ac	0xb6470c3d
-+	0x0cae0aff	0xae650f6c	0x384c382e	0x5d4b6275
-+	0x6691c449	0xfba67785	0xe3a5b7b7	0xfb72c85e
-+	0x09056be6	0x15e28bd0	0xb6be7e9e	0xd97fac13
-+	0x1e6023bc	0x0f28cfbd	0x840eeee5	0xd208ac51
-+	0x12b36d98	0xd28885de	0x108c3e86	0xff2ae965
-+	0x09b446c4	0xe453ba28	0x42c997ac	0x880e22f3
-+	0x0eeee913	0x5a0c9803	0xf080f33c	0x47e99f76
-+	0xa62e02f6	0x38283513	0x5ecad92f	0xaef2a1eb
-+	0xa5cdc2c5	0xd5e6ae58	0x03dbffd9	0xc24ddb4f
-+	0xaaeecc9d	0xdbeb2dfc	0xfda7e5a0	0x8e537029
-+	0x8ae38058	0xfce24682	0xcdd46b74	0x0cc2b384
-+	0x89cd2e8b	0xe955abd6	0x82c64f39	0x716c7713
-+	0x70dbaa6c	0x271b7a9c	0x332e6234	0x8d081fed
-+	0xb47ac8d3	0x818af259	0x6d97d09f	0x7aaca213
-+	0x2124cd22	0x70fc4cbc	0x02988745	0x29e28390
-+	0x2b11e888	0xe62b3826	0x8c6260e9	0x2b2d9036
-+	0xc3cd85c3	0x3a08e1a7	0xf406364f	0x6ff5f0d9
-+	0xc0c2a847	0x076cac4b	0x85eea1ab	0xbe6d6dbc
-+	0xdffbd36d	0xf1bb8934	0xae696cac	0xfe51475b
-+	0x6bce710a	0x83d6ff0d	0x44cb120f	0xd0c01d5a
-+	0x997f8469	0xdaad8626	0xdff160f7	0xf2954b72
-+	0xd4efa312	0x07035ee6	0x03e8dbb0	0x5a33d382
-+	0xc6527dc6	0x0b7391a3	0xfe568e01	0x24c28c70
-+	0x76e65ea0	0xeafaf171	0x1ab4ebfa	0x4ff66462
-+	0xc9949824	0x776d25fe	0x3689d8f9	0x1ec65a2c
-+	0x746581f5	0x227209d2	0xbff7bc69	0x91b4c927
-+	0x171c5962	0xb4dd5f85	0x72e4917a	0xd01ff1af
-+	0x9c6ba703	0xdb9d9be6	0xae1cf2c5	0x48b85c21
-+	0x9628b693	0xa8d2e2f7	0x856584db	0x1b33821e
-+	0xff5de311	0x4126d04c	0xf00ac027	0x54bdaa98
-+	0xa3dd5b0a	0xce2b2558	0xea5f50d8	0xb2e88f18
-+	0x19590981	0x6dae2c0a	0xbfd758bc	0x2897e93c
-+	0x3ba5d054	0x2d809b4c	0x3de6aa52	0xea171509
-+	0x7d8b7b44	0x19a1ad1c	0xe99b2657	0x98ac56e9
-+	0xc2150187	0x63a12506	0x4ffc1739	0x50e2ca6c
-+	0x4f2ff10c	0xb7323ff6	0x81d9f57a	0x5146beee
-+	0xa1f45456	0xf6ce5d75	0xdff7be9a	0x75ab2dc9
-+	0x5ff2901a	0xec756ab3	0x8a5e0299	0xc4e248ce
-+	0x248502e8	0xd8c62cf1	0xc7001b23	0xf7c636d2
-+	0xefbb67e1	0xec507025	0x1820ac19	0x39e1624c
-+	0x4ee603b2	0xb70e1c67	0xaf9376fc	0x371af05b
-+	0xa19209fe	0x8ecdf499	0x9a607cb2	0xcbe61a2c
-+	0x9f4e950c	0xb9a1546f	0xe718f140	0xc75d5d02
-+	0xabe66af2	0xecc54d7b	0xb4373489	0x22254496
-+	0x4b4b7f7c	0x40dde60e	0xfe621a3e	0xa6605c67
-+	0x5cf6a3a2	0x75df88a3	0xbf0749b0	0x705a0a04
-+	0xf3cae078	0x392bdebd	0x98878e65	0x0f5a2be5
-+	0xec172835	0xf610cc90	0xac6ff369	0x0a71c173
-+	0x8eae2d62	0x2ccbb630	0xd3b702ea	0x1626bfff
-+	0xdb4a6975	0xd2a936f7	0x0bb63194	0x5d9120dd
-+	0x5860e04e	0x3baeca91	0x95a621db	0xa6d23aaf
-+	0xfebcfa2d	0xa5ed89cf	0x2192280a	0x72322cb8
-+	0xd79e14d2	0x0528ce06	0x1c6a8f9c	0x6703407c
-+	0x93819694	0x6c554390	0x7875452a	0xf45d2757
-+	0xe0458d1d	0x335f6179	0x48989cc9	0xdc16cec8
-+	0x9e2c0ee5	0x78daabe2	0x2069e8eb	0x0e87f238
-+	0x0a928dda	0xc66e14b3	0x2a6c4031	0x73821630
-+	0x8b8c4a40	0x243702b7	0xded80901	0x5de34802
-+	0xea029b73	0x59a47771	0xe747d796	0xe80aea8d
-+	0x0bd01815	0x76fe1f68	0xa345fc34	0x73737383
-+	0x76753b6c	0x57dcba56	0xb11d6b21	0x81dc371e
-+	0x311f4ea0	0x3b4b2522	0xe8a66ef4	0x1932df0c
-+	0x9f3790d6	0x0d0478a3	0x7dd0a24b	0xeb581381
-+	0x6fe8ff06	0xe34c2d69	0x26842e15	0xe9a39562
-+	0x78f2d7d1	0x79ab33f5	0x197df69c	0x38a9a004
-+	0x9391dba9	0xfbb4b7c5	0xa97bb70f	0x0720b57b
-+	0xd9b26325	0x3ed1a3fc	0x11f5aba0	0x6e6a53ef
-+	0xe2ce236e	0x30994468	0x9d4369cd	0xcb6b5b5c
-+	0x61a0945c	0x090e7dea	0x5d9b676a	0xd474cb52
-+	0x8ebf1af3	0x35f2a70b	0x417d48a0	0x45062dcc
-+	0x841d8d90	0x30f8e590	0x1c935ad3	0x29313e0c
-+	0x46ecf673	0x4998b596	0x95f23529	0xf31bd581
-+	0x1b32045a	0x90432d28	0xa2a6c268	0xbf40fcae
-+	0x4104b314	0x02677221	0xa99231ac	0xe28abada
-+	0xd7d72a73	0xf1b2ce4c	0xf753f8be	0x9d7fc1c7
-+	0x9a0e7a7a	0xf04ccf32	0x58433f5f	0xab9a6d51
-+	0x71262b1c	0x48f84d91	0x897670bb	0x47dd10cb
-+	0xac7ef74d	0x78dc3e54	0x30b17eaa	0xc8f46618
-+	0xc636fe3b	0x86ac06e3	0xfb8edd16	0xed357170
-+	0xbfd34bf8	0xaeb9571a	0x4eec6a50	0xe881a1b7
-+	0x8a1cbbde	0xc6c077b6	0xaeda1441	0xf990296a
-+	0xc91e87d6	0xad0ca921	0x855537b6	0xfc0da57d
-+	0xf8427d87	0x9ece7413	0xc5d4b4c9	0x2fca7822
-+	0xa1888443	0xd3bf617e	0xab21ce7d	0xe63b5f53
-+	0x828501c5	0x81a39da9	0xb8cfb4c6	0x6b23b8dc
-+	0x853fe425	0xba262321	0x34f11b05	0x8044aea4
-+	0x67a3f99d	0x51e8afb7	0x04efcf27	0x7773f9ff
-+	0x8abceec1	0xd75d87a2	0x7e30d774	0xdd7a42f2
-+	0x2ca6ad73	0x27d4e62f	0xbc228d26	0x035a7713
-+	0x5dbcc13a	0x792a97da	0x56cf9fc2	0x5906fa3e
-+	0x97a3147c	0x85e59863	0x19ad1f49	0x1af659a8
-+	0xddc6a273	0xd254a195	0x44d83a00	0x3b7c5fa7
-+	0xcaf756aa	0x68ad08b9	0xfc57da12	0x3b278f24
-+	0xbd165574	0x3cf597ca	0xdeb872ba	0x543eb2f5
-+	0xfabc0d4f	0x0799c544	0x3d71181d	0x22c8a598
-+	0xb82840fc	0x1a198d19	0xf529a0ea	0x2f65bc24
-+	0xe979f99d	0xff8617b4	0x376e5abb	0xb095a03e
-+	0xa36b1107	0x2dacf004	0xe4c565e1	0xc96463cd
-+	0x3b495e2d	0x4a2c2cd7	0xa0053fc2	0x6c82a085
-+	0x6b801c45	0xc1481d77	0x6d95dc15	0x44dc8bf6
-+	0x3eed7d25	0x901a6b49	0x2797e953	0x502ad2c3
-+	0x8491c3f2	0x3ce059eb	0x992c1a76	0x6c56d2a2
-+	0xcf1878a7	0x10574487	0x5a2f85e6	0xf94e418e
-+	0x4c149aed	0x9381b5a3	0x79c90da4	0x635e696e
-+	0x243073ba	0x67504105	0xe82ac957	0xaccda7b3
-+	0x29bdd624	0xd0c1533c	0xbc080065	0x8d617329
-+	0x27e6f74a	0x31e87692	0x50a3857d	0xc5b1ec3f
-+	0x4f03be5f	0xa35fde17	0x537a59bb	0x793d1eb5
-+	0xc11a0588	0x067e5593	0x102532c3	0x4024b312
-+	0x32504cf4	0x4ddc0e9a	0xad5b1d24	0x41081874
-+	0xf94fced4	0x16f39da6	0x9bdfbe58	0xc5615db4
-+	0x1fdd769d	0x4278b52e	0x4525b8b6	0x7feed258
-+	0xe0b4348b	0xb4925ccc	0x5547cc88	0x3f7f5443
-+	0x5b8cc6d3	0xbe6a15cf	0x7308c088	0xde4219df
-+	0x4685593c	0xc4ae83a3	0xaea72ff0	0x403b0c08
-+	0xe533a9aa	0xed46be76	0x4390bcd0	0x683a9f3f
-+	0x338b5cd3	0x7cd59689	0x2eb11aec	0x74e91cfd
-+	0x7ae588aa	0x0eadf94e	0x30a6b42f	0x1965f165
-+	0xd96de54b	0x06c85abf	0x1bbc0ab8	0x79f3ddd0
-+	0x871fd58d	0x498dd69d	0x9197dd0e	0x6cbb3a4f
-+	0x8a1f2a01	0x0d9cf747	0x80e66655	0x770d2b25
-+	0x567bd3eb	0x59583c5a	0x58afeddd	0x9296d0e3
-+	0xcf5af62c	0xf48b4c78	0x746f657e	0xe543b903
-+	0x24603809	0xd1bceeea	0x16d04950	0x2a7c754b
-+	0x4ea8bb99	0x9daecb97	0x3045b9a9	0x4a3e84d9
-+	0x5487e79f	0xd6145e57	0xc3b17f6f	0x14448bb6
-+	0x8e8529f5	0xf895acb9	0x6605c0f0	0x52d00ca9
-+	0xabf6e3e9	0x8f36e307	0xa7a15442	0x55144801
-+	0x69b028b2	0x8ab3b912	0xb493f80e	0x2dc9fdfa
-+	0x1b091fbf	0x1bce6b31	0x79eb414e	0xe5f86ea0
-+	0x39ef7dbd	0x2f86faf0	0xec366923	0xe770c7be
-+	0x74e4aa61	0xef3b9da0	0xd77bd8be	0xfd13d3cb
-+	0x4e8023c6	0x3d993904	0xfcb2f700	0xa14b753b
-+	0xde16c1c3	0x983c5a86	0x52ba5e61	0x1d67b044
-+	0x0f9a302d	0x2f13b653	0x769cbb97	0xea3e1cbd
-+	0x5791778c	0x540fcff1	0x5e6c53f2	0xc9cbac0f
-+	0x40ceadf0	0x648713d3	0xb5347ada	0xfe280079
-+	0xb8389f3f	0x5a6be26a	0x8e683d28	0x6a3e8e3a
-+	0x97ecac7a	0x70b648f1	0xe4eca20e	0x088cd0b4
-+	0xbad30405	0x0f77e382	0x673cdf65	0x438af1f0
-+	0x0b4f4eea	0xf0cc34e9	0x374a3c04	0x4370d27d
-+	0xc3e1e84d	0x141205c2	0xfa831e8d	0x32f2f10a
-+	0x77899366	0xc9d07590	0x9b6f2286	0xcac96a03
-+	0xf822808b	0x265606cd	0xbeef275d	0x73415b15
-+	0x4c87250e	0xf95a8c8a	0xdc8d6166	0x68522e63
-+	0xb9becc14	0x7b5f20be	0x3d158dab	0xa73b1716
-+	0x3b2cac15	0xf0498939	0xb60653bf	0x33fafc0e
-+	0x3b416955	0x3addca50	0x16ab21cf	0xd18cbdb6
-+	0x3b29b87b	0xa6fb7e4b	0x6634147f	0x44283b1e
-+	0x430ae726	0xa907ab82	0x2baa6706	0x621d2390
-+	0x15944559	0x2516c807	0x7d1eeb61	0xe2714121
-+	0x288d3998	0x47713cbb	0xa1ce3c1e	0x0c29b6dd
-+	0x9923131c	0x2dd19cfa	0x83d0ece5	0x78474c7b
-+	0x92dee4f0	0xba5cb0f7	0x780c1d41	0x50da5a89
-+	0xe303cebb	0xe8d5a2bd	0x7d6269a9	0xb75484f1
-+	0x33ee8186	0x085b7657	0x7b1c7863	0xdb1a43ce
-+	0x3d0c4bf0	0x302c1292	0x81e42216	0xee1f2c9d
-+	0x822451ab	0xcefd8067	0x8330dc41	0x14492542
-+	0xf038f54d	0x90a1abf9	0xc3067a77	0x40d9a42c
-+	0x127285c1	0x80ad15ff	0xaf4854e2	0xa47874f4
-+	0x2ed59760	0x67252c6a	0xe2830f38	0x8150c00c
-+	0x16f61cca	0x1331f815	0x2d832d17	0x163c6010
-+	0x69464e2f	0x99940411	0xbce5e85f	0x43d39ef2
-+	0x9b7224dc	0x28652b6d	0x331a7632	0x127f669e
-+	0x44a034ad	0xe95d2cec	0x3d83fefb	0xfa6d40a2
-+	0x9b535bf4	0xc83411ce	0xd661655b	0x64bcd8d2
-+	0xd99e1570	0x7dc4d877	0x9756b210	0x7623dc0d
-+	0x484dd33f	0xe7bca204	0xa06efbc5	0xa358c03f
-+	0x362cb282	0xe40e6d04	0x17ab9f5e	0x79a71a09
-+	0x804bf1a9	0x6bca7d73	0x5504a4ff	0xd3946f75
-+	0x18b0b9d4	0xd85993cc	0x94d000a5	0x8dda1609
-+	0x30afb8f6	0xb3c99c3c	0x7686d59d	0x68b719db
-+	0xdc7b3edb	0xedb76012	0xbfa0ba3b	0x280b829d
-+	0x72fcf1aa	0xe3d8f83c	0x088a57cf	0x95156217
-+	0x3306eb47	0x1d09cf54	0x1391876f	0x5b15ecde
-+	0xb46104e1	0x8d8f2593	0x90ee50cc	0x78dad4b2
-+	0xfd96daee	0xdbf15e95	0xfc859faa	0xdb4422a5
-+	0xa00eeab6	0x525232c6	0x9b665668	0x8a70518b
-+	0xbb27f7ac	0xb066b096	0x25754db6	0xe8c7d748
-+	0xd4e8d361	0x380dd246	0x9bdf15e6	0x6823c660
-+	0x5d408fe7	0xe59a5a89	0x1eb7523b	0x4997158e
-+	0xfa6214d2	0x03b35025	0x9aeff33c	0x20a38aad
-+	0x522f79cd	0x4141f19c	0xc58cd2bd	0xc816da37
-+	0x62c6f8d9	0xc15ea9f4	0x138d1f45	0xd36cef03
-+	0x88183bd6	0xe0de9036	0xefcbe8fc	0x5ebdce26
-+	0x9e83b01b	0xd35f6747	0x552951f1	0x4e20dd66
-+	0x419702b1	0x45446e7c	0x7ce5616b	0x6152e3a8
-+	0xffd572e1	0x4fab25b0	0x07563b80	0x98720ee7
-+	0x176d29bf	0x21cbd730	0xbde74431	0x09a8cce2
-+	0xc15e548e	0xe6a92b4b	0x14f17e74	0x75f7817b
-+	0x592143e8	0x113dbd25	0x5f7d7160	0xbdd8b1e0
-+	0x6ce045e5	0x53b27b2d	0x371c8aa8	0xa4da8be0
-+	0xf1f6df4e	0x9519bac4	0x6d6169cf	0x7846253f
-+	0xccb95d95	0x6ad11a98	0x4a3bd21d	0x5389f44c
-+	0x7c07ef3a	0xb983ca57	0xcf7f290d	0x4ec516f1
-+	0xa7711e70	0x818d45a9	0x49db6441	0xd032fc2a
-+	0x657df4d3	0xe37e6809	0x459a22da	0x41df8aa5
-+	0x462108a6	0x65177d27	0x1ddffa9f	0x7fa6631b
-+	0xdd7a414c	0x6351f0d1	0x1b38a419	0x6b529c8e
-+	0x167745e4	0xcac35897	0x3d7bf419	0xd59ed67a
-+	0x6486b2c9	0x9ae4fc90	0x8f608920	0xd35335c0
-+	0x8f113cba	0x0fcc11a1	0xdc180fbf	0x57a99319
-+	0x2c54185f	0x764c18d0	0x4f84b111	0x30a11040
-+	0xd15620af	0x496af145	0x263b2de2	0x3ff103dd
-+	0x38484dac	0xf143a3bc	0xb62c0de6	0xb122c545
-+	0x72f10466	0x63728442	0xee0117c9	0x2309f14b
-+	0x4ccdd5de	0x37ae022d	0x2ee7f050	0xf2aa9af6
-+	0xcd314a20	0x86954941	0x97215303	0xcd7e1687
-+	0x1dab6672	0x1c920209	0x41102dae	0x8b21c8ab
-+	0x6f70b04b	0x2988b209	0x86e6f033	0x5eb91718
-+	0x925b3c40	0xdcad0288	0x0ee98331	0xc3096ceb
-+	0x9fa04740	0x3ce3fb23	0x90d75cbd	0xeab21768
-+	0xaca5db0a	0x1c440578	0x762cb728	0x315a699f
-+	0xcd2b6490	0x11e3e267	0xa10d1bbc	0x23ac26d3
-+	0xc0c7c268	0x37ecf7ac	0x28de6fe5	0x6fb8e3e8
-+	0x583d1131	0x8370812a	0x3afd5d58	0x4569a06e
-+	0xf27ad86f	0x0db6a631	0x9add5128	0x1748c9fd
-+	0xc46e3c57	0x4c0df93e	0xc595c544	0x397f7e7e
-+	0x241f4086	0x7d7ed51b	0x56027473	0x656a6110
-+	0x970a8011	0xf9c7beb5	0xc6cb9957	0xb7426461
-+	0x62d3d89d	0xf99d48ca	0x3e4d4a88	0x9f751b71
-+	0xfa020205	0xa3124337	0x59935869	0x98c58314
-+	0xff7c4385	0x69191265	0xaf85ebb9	0xe434cda2
-+	0xb1ad3e0e	0x221d32e1	0x022d73a0	0xd676ce06
-+	0xab7f0c21	0x915c2444	0xf5bdaba2	0x74e4e789
-+	0x11ff0d95	0x58c53feb	0xa54eb847	0x9af982ae
-+	0x8d721596	0x73510fe4	0x95e3bd19	0xd82f8359
-+	0xc09cdd5b	0xc07f57a4	0xbece605b	0xa8a43c5b
-+	0x0acbeb6d	0x3c5cd8ce	0xb631050d	0xd558c921
-+	0xcb5054c2	0xefb06252	0x40d2e2cc	0x14ffe6ff
-+	0x761001a9	0xad64e7a5	0xb55618b4	0x2a40a1fc
-+	0x2cbe6d40	0x2bc18fc1	0x196e7092	0x3c137791
-+	0xa799eb23	0x1156feb9	0xd55d7ed1	0x0149c315
-+	0xae77081f	0xfe724690	0x55ed2fd7	0x04b18cd7
-+	0x691583f4	0xb1be4fde	0x19ae1cf7	0x3250140b
-+	0x35daeeb2	0xc9459a84	0xea2c19e1	0x57f8c9cb
-+	0xe05e07a4	0xcc77a363	0x43afd702	0x48305862
-+	0x6c4b459f	0x66ed6178	0x26be9f81	0xeac41ee5
-+	0xbe5e2e6b	0x177f9068	0xede56c48	0x438b3811
-+	0xd5bd7ee4	0xc027d1a8	0xc1c0f725	0x48d4d4eb
-+	0x6ffa28d5	0xbd6ac9eb	0xd497781d	0x24d3a154
-+	0x409bb5c0	0x8079bf76	0x90a522dc	0x19bf7033
-+	0x1a529b6e	0xe5207e4d	0x3d49b7bc	0x3eca6d54
-+	0xa37681a6	0xaa9a62e4	0xe54aa1e1	0xb91e7157
-+	0x8cce8f65	0xbcbbd62c	0x7fa477b5	0x44f46b50
-+	0x54263fcf	0x529cbb5d	0x8923e390	0x0778d6d7
-+	0x0cc0503f	0x02c374ce	0xb89c3e5c	0x25b1b353
-+	0xb227cb2d	0x44108698	0x5e5968c2	0x82c48632
-+	0x0b8f4209	0x1a241879	0x9edca6f1	0xa1fa51ab
-+	0x206db0c6	0xbfbbbe98	0xa71c91f6	0xa1b28056
-+	0xb8bfaaa9	0xa5914f75	0x77d26574	0xacfd459d
-+	0x77f7cab2	0x249ebf26	0xef902bdd	0x77f6e48d
-+	0x82497035	0x93333a9d	0x34ea9953	0x8f08d41c
-+	>;
-diff -ruN u-boot-2015.01-rc3/arch/x86/include/asm/arch-coreboot/gpio.h u-boot/arch/x86/include/asm/arch-coreboot/gpio.h
---- u-boot-2015.01-rc3/arch/x86/include/asm/arch-coreboot/gpio.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/include/asm/arch-coreboot/gpio.h	2015-01-01 17:34:32.253503252 +0100
-@@ -7,4 +7,7 @@
- #ifndef _X86_ARCH_GPIO_H_
- #define _X86_ARCH_GPIO_H_
- 
-+/* Where in config space is the register that points to the GPIO registers? */
-+#define PCI_CFG_GPIOBASE 0x48
-+
- #endif /* _X86_ARCH_GPIO_H_ */
-diff -ruN u-boot-2015.01-rc3/arch/x86/include/asm/arch-ivybridge/gpio.h u-boot/arch/x86/include/asm/arch-ivybridge/gpio.h
---- u-boot-2015.01-rc3/arch/x86/include/asm/arch-ivybridge/gpio.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/include/asm/arch-ivybridge/gpio.h	2015-01-01 17:34:32.253503252 +0100
-@@ -7,4 +7,7 @@
- #ifndef _X86_ARCH_GPIO_H_
- #define _X86_ARCH_GPIO_H_
- 
-+/* Where in config space is the register that points to the GPIO registers? */
-+#define PCI_CFG_GPIOBASE 0x48
-+
- #endif /* _X86_ARCH_GPIO_H_ */
-diff -ruN u-boot-2015.01-rc3/arch/x86/include/asm/arch-ivybridge/pei_data.h u-boot/arch/x86/include/asm/arch-ivybridge/pei_data.h
---- u-boot-2015.01-rc3/arch/x86/include/asm/arch-ivybridge/pei_data.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/include/asm/arch-ivybridge/pei_data.h	2015-01-01 17:34:32.253503252 +0100
-@@ -7,6 +7,8 @@
- #ifndef ASM_ARCH_PEI_DATA_H
- #define ASM_ARCH_PEI_DATA_H
- 
-+#include <linux/linkage.h>
-+
- struct pch_usb3_controller_settings {
- 	/* 0: Disable, 1: Enable, 2: Auto, 3: Smart Auto */
- 	uint16_t mode;
-diff -ruN u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/fsp/fsp_api.h u-boot/arch/x86/include/asm/arch-queensbay/fsp/fsp_api.h
---- u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/fsp/fsp_api.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/include/asm/arch-queensbay/fsp/fsp_api.h	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,55 @@
-+/*
-+ * Copyright (C) 2013, Intel Corporation
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	Intel
-+ */
-+
-+#ifndef __FSP_API_H__
-+#define __FSP_API_H__
-+
-+/*
-+ * FspInit continuation function prototype.
-+ * Control will be returned to this callback function after FspInit API call.
-+ */
-+typedef void (*fsp_continuation_f)(u32 status, void *hob_list);
-+
-+struct fsp_init_params {
-+	/* Non-volatile storage buffer pointer */
-+	void			*nvs_buf;
-+	/* Runtime buffer pointer */
-+	void			*rt_buf;
-+	/* Continuation function address */
-+	fsp_continuation_f	continuation;
-+};
-+
-+struct common_buf {
-+	/*
-+	 * Stack top pointer used by the bootloader. The new stack frame will be
-+	 * set up at this location after FspInit API call.
-+	 */
-+	u32	*stack_top;
-+	u32	boot_mode;	/* Current system boot mode */
-+	void	*upd_data;	/* User platform configuraiton data region */
-+	u32	reserved[7];	/* Reserved */
-+};
-+
-+enum fsp_phase {
-+	/* Notification code for post PCI enuermation */
-+	INIT_PHASE_PCI	= 0x20,
-+	/* Notification code before transfering control to the payload */
-+	INIT_PHASE_BOOT	= 0x40
-+};
-+
-+struct fsp_notify_params {
-+	/* Notification phase used for NotifyPhase API */
-+	enum fsp_phase	phase;
-+};
-+
-+/* FspInit API function prototype */
-+typedef u32 (*fsp_init_f)(struct fsp_init_params *params);
-+
-+/* FspNotify API function prototype */
-+typedef u32 (*fsp_notify_f)(struct fsp_notify_params *params);
-+
-+#endif
-diff -ruN u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/fsp/fsp_bootmode.h u-boot/arch/x86/include/asm/arch-queensbay/fsp/fsp_bootmode.h
---- u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/fsp/fsp_bootmode.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/include/asm/arch-queensbay/fsp/fsp_bootmode.h	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,24 @@
-+/*
-+ * Copyright (C) 2013, Intel Corporation
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	Intel
-+ */
-+
-+#ifndef __FSP_BOOT_MODE_H__
-+#define __FSP_BOOT_MODE_H__
-+
-+/* 0x21 - 0xf..f are reserved */
-+#define BOOT_FULL_CONFIG		0x00
-+#define BOOT_MINIMAL_CONFIG		0x01
-+#define BOOT_NO_CONFIG_CHANGES		0x02
-+#define BOOT_FULL_CONFIG_PLUS_DIAG	0x03
-+#define BOOT_DEFAULT_SETTINGS		0x04
-+#define BOOT_ON_S4_RESUME		0x05
-+#define BOOT_ON_S5_RESUME		0x06
-+#define BOOT_ON_S2_RESUME		0x10
-+#define BOOT_ON_S3_RESUME		0x11
-+#define BOOT_ON_FLASH_UPDATE		0x12
-+#define BOOT_IN_RECOVERY_MODE		0x20
-+
-+#endif
-diff -ruN u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/fsp/fsp_ffs.h u-boot/arch/x86/include/asm/arch-queensbay/fsp/fsp_ffs.h
---- u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/fsp/fsp_ffs.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/include/asm/arch-queensbay/fsp/fsp_ffs.h	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,154 @@
-+/*
-+ * Copyright (C) 2013, Intel Corporation
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	Intel
-+ */
-+
-+#ifndef __FSP_FFS_H__
-+#define __FSP_FFS_H__
-+
-+/* Used to verify the integrity of the file */
-+union __packed ffs_integrity {
-+	struct {
-+		/*
-+		 * The IntegrityCheck.checksum.header field is an 8-bit
-+		 * checksum of the file header. The State and
-+		 * IntegrityCheck.checksum.file fields are assumed to be zero
-+		 * and the checksum is calculated such that the entire header
-+		 * sums to zero.
-+		 */
-+		u8	header;
-+		/*
-+		 * If the FFS_ATTRIB_CHECKSUM (see definition below) bit of
-+		 * the Attributes field is set to one, the
-+		 * IntegrityCheck.checksum.file field is an 8-bit checksum of
-+		 * the file data. If the FFS_ATTRIB_CHECKSUM bit of the
-+		 * Attributes field is cleared to zero, the
-+		 * IntegrityCheck.checksum.file field must be initialized with
-+		 * a value of 0xAA. The IntegrityCheck.checksum.file field is
-+		 * valid any time the EFI_FILE_DATA_VALID bit is set in the
-+		 * State field.
-+		 */
-+		u8	file;
-+	} checksum;
-+
-+	/* This is the full 16 bits of the IntegrityCheck field */
-+	u16	checksum16;
-+};
-+
-+/*
-+ * Each file begins with the header that describe the
-+ * contents and state of the files.
-+ */
-+struct __packed ffs_file_header {
-+	/*
-+	 * This GUID is the file name.
-+	 * It is used to uniquely identify the file.
-+	 */
-+	struct efi_guid		name;
-+	/* Used to verify the integrity of the file */
-+	union ffs_integrity	integrity;
-+	/* Identifies the type of file */
-+	u8			type;
-+	/* Declares various file attribute bits */
-+	u8			attr;
-+	/* The length of the file in bytes, including the FFS header */
-+	u8			size[3];
-+	/*
-+	 * Used to track the state of the file throughout the life of
-+	 * the file from creation to deletion.
-+	 */
-+	u8			state;
-+};
-+
-+struct __packed ffs_file_header2 {
-+	/*
-+	 * This GUID is the file name. It is used to uniquely identify the file.
-+	 * There may be only one instance of a file with the file name GUID of
-+	 * Name in any given firmware volume, except if the file type is
-+	 * EFI_FV_FILE_TYPE_FFS_PAD.
-+	 */
-+	struct efi_guid		name;
-+	/* Used to verify the integrity of the file */
-+	union ffs_integrity	integrity;
-+	/* Identifies the type of file */
-+	u8			type;
-+	/* Declares various file attribute bits */
-+	u8			attr;
-+	/*
-+	 * The length of the file in bytes, including the FFS header.
-+	 * The length of the file data is either
-+	 * (size - sizeof(struct ffs_file_header)). This calculation means a
-+	 * zero-length file has a size of 24 bytes, which is
-+	 * sizeof(struct ffs_file_header). Size is not required to be a
-+	 * multiple of 8 bytes. Given a file F, the next file header is located
-+	 * at the next 8-byte aligned firmware volume offset following the last
-+	 * byte of the file F.
-+	 */
-+	u8			size[3];
-+	/*
-+	 * Used to track the state of the file throughout the life of
-+	 * the file from creation to deletion.
-+	 */
-+	u8			state;
-+	/*
-+	 * If FFS_ATTRIB_LARGE_FILE is set in attr, then ext_size exists
-+	 * and size must be set to zero.
-+	 * If FFS_ATTRIB_LARGE_FILE is not set then
-+	 * struct ffs_file_header is used.
-+	 */
-+	u32			ext_size;
-+};
-+
-+/*
-+ * Pseudo type. It is used as a wild card when retrieving sections.
-+ * The section type EFI_SECTION_ALL matches all section types.
-+ */
-+#define EFI_SECTION_ALL				0x00
-+
-+/* Encapsulation section Type values */
-+#define EFI_SECTION_COMPRESSION			0x01
-+#define EFI_SECTION_GUID_DEFINED		0x02
-+#define EFI_SECTION_DISPOSABLE			0x03
-+
-+/* Leaf section Type values */
-+#define EFI_SECTION_PE32			0x10
-+#define EFI_SECTION_PIC				0x11
-+#define EFI_SECTION_TE				0x12
-+#define EFI_SECTION_DXE_DEPEX			0x13
-+#define EFI_SECTION_VERSION			0x14
-+#define EFI_SECTION_USER_INTERFACE		0x15
-+#define EFI_SECTION_COMPATIBILITY16		0x16
-+#define EFI_SECTION_FIRMWARE_VOLUME_IMAGE	0x17
-+#define EFI_SECTION_FREEFORM_SUBTYPE_GUID	0x18
-+#define EFI_SECTION_RAW				0x19
-+#define EFI_SECTION_PEI_DEPEX			0x1B
-+#define EFI_SECTION_SMM_DEPEX			0x1C
-+
-+/* Common section header */
-+struct __packed raw_section {
-+	/*
-+	 * A 24-bit unsigned integer that contains the total size of
-+	 * the section in bytes, including the EFI_COMMON_SECTION_HEADER.
-+	 */
-+	u8	size[3];
-+	u8	type;
-+};
-+
-+struct __packed raw_section2 {
-+	/*
-+	 * A 24-bit unsigned integer that contains the total size of
-+	 * the section in bytes, including the EFI_COMMON_SECTION_HEADER.
-+	 */
-+	u8	size[3];
-+	u8	type;
-+	/*
-+	 * If size is 0xFFFFFF, then ext_size contains the size of
-+	 * the section. If size is not equal to 0xFFFFFF, then this
-+	 * field does not exist.
-+	 */
-+	u32	ext_size;
-+};
-+
-+#endif
-diff -ruN u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/fsp/fsp_fv.h u-boot/arch/x86/include/asm/arch-queensbay/fsp/fsp_fv.h
---- u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/fsp/fsp_fv.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/include/asm/arch-queensbay/fsp/fsp_fv.h	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,137 @@
-+/*
-+ * Copyright (C) 2013, Intel Corporation
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	Intel
-+ */
-+
-+#ifndef __FSP_FV___
-+#define __FSP_FV___
-+
-+/* Value of EFI_FV_FILE_ATTRIBUTES */
-+#define EFI_FV_FILE_ATTR_ALIGNMENT	0x0000001F
-+#define EFI_FV_FILE_ATTR_FIXED		0x00000100
-+#define EFI_FV_FILE_ATTR_MEMORY_MAPPED	0x00000200
-+
-+/* Attributes bit definitions */
-+#define EFI_FVB2_READ_DISABLED_CAP	0x00000001
-+#define EFI_FVB2_READ_ENABLED_CAP	0x00000002
-+#define EFI_FVB2_READ_STATUS		0x00000004
-+#define EFI_FVB2_WRITE_DISABLED_CAP	0x00000008
-+#define EFI_FVB2_WRITE_ENABLED_CAP	0x00000010
-+#define EFI_FVB2_WRITE_STATUS		0x00000020
-+#define EFI_FVB2_LOCK_CAP		0x00000040
-+#define EFI_FVB2_LOCK_STATUS		0x00000080
-+#define EFI_FVB2_STICKY_WRITE		0x00000200
-+#define EFI_FVB2_MEMORY_MAPPED		0x00000400
-+#define EFI_FVB2_ERASE_POLARITY		0x00000800
-+#define EFI_FVB2_READ_LOCK_CAP		0x00001000
-+#define EFI_FVB2_READ_LOCK_STATUS	0x00002000
-+#define EFI_FVB2_WRITE_LOCK_CAP		0x00004000
-+#define EFI_FVB2_WRITE_LOCK_STATUS	0x00008000
-+#define EFI_FVB2_ALIGNMENT		0x001F0000
-+#define EFI_FVB2_ALIGNMENT_1		0x00000000
-+#define EFI_FVB2_ALIGNMENT_2		0x00010000
-+#define EFI_FVB2_ALIGNMENT_4		0x00020000
-+#define EFI_FVB2_ALIGNMENT_8		0x00030000
-+#define EFI_FVB2_ALIGNMENT_16		0x00040000
-+#define EFI_FVB2_ALIGNMENT_32		0x00050000
-+#define EFI_FVB2_ALIGNMENT_64		0x00060000
-+#define EFI_FVB2_ALIGNMENT_128		0x00070000
-+#define EFI_FVB2_ALIGNMENT_256		0x00080000
-+#define EFI_FVB2_ALIGNMENT_512		0x00090000
-+#define EFI_FVB2_ALIGNMENT_1K		0x000A0000
-+#define EFI_FVB2_ALIGNMENT_2K		0x000B0000
-+#define EFI_FVB2_ALIGNMENT_4K		0x000C0000
-+#define EFI_FVB2_ALIGNMENT_8K		0x000D0000
-+#define EFI_FVB2_ALIGNMENT_16K		0x000E0000
-+#define EFI_FVB2_ALIGNMENT_32K		0x000F0000
-+#define EFI_FVB2_ALIGNMENT_64K		0x00100000
-+#define EFI_FVB2_ALIGNMENT_128K		0x00110000
-+#define EFI_FVB2_ALIGNMENT_256K		0x00120000
-+#define EFI_FVB2_ALIGNMENT_512K		0x00130000
-+#define EFI_FVB2_ALIGNMENT_1M		0x00140000
-+#define EFI_FVB2_ALIGNMENT_2M		0x00150000
-+#define EFI_FVB2_ALIGNMENT_4M		0x00160000
-+#define EFI_FVB2_ALIGNMENT_8M		0x00170000
-+#define EFI_FVB2_ALIGNMENT_16M		0x00180000
-+#define EFI_FVB2_ALIGNMENT_32M		0x00190000
-+#define EFI_FVB2_ALIGNMENT_64M		0x001A0000
-+#define EFI_FVB2_ALIGNMENT_128M		0x001B0000
-+#define EFI_FVB2_ALIGNMENT_256M		0x001C0000
-+#define EFI_FVB2_ALIGNMENT_512M		0x001D0000
-+#define EFI_FVB2_ALIGNMENT_1G		0x001E0000
-+#define EFI_FVB2_ALIGNMENT_2G		0x001F0000
-+
-+struct fv_blkmap_entry {
-+	/* The number of sequential blocks which are of the same size */
-+	u32	num_blocks;
-+	/* The size of the blocks */
-+	u32	length;
-+};
-+
-+/* Describes the features and layout of the firmware volume */
-+struct fv_header {
-+	/*
-+	 * The first 16 bytes are reserved to allow for the reset vector of
-+	 * processors whose reset vector is at address 0.
-+	 */
-+	u8			zero_vec[16];
-+	/*
-+	 * Declares the file system with which the firmware volume
-+	 * is formatted.
-+	 */
-+	struct efi_guid		fs_guid;
-+	/*
-+	 * Length in bytes of the complete firmware volume, including
-+	 * the header.
-+	 */
-+	u64			fv_len;
-+	/* Set to EFI_FVH_SIGNATURE */
-+	u32			sign;
-+	/*
-+	 * Declares capabilities and power-on defaults for the firmware
-+	 * volume.
-+	 */
-+	u32			attr;
-+	/* Length in bytes of the complete firmware volume header */
-+	u16			hdr_len;
-+	/*
-+	 * A 16-bit checksum of the firmware volume header.
-+	 * A valid header sums to zero.
-+	 */
-+	u16			checksum;
-+	/*
-+	 * Offset, relative to the start of the header, of the extended
-+	 * header (EFI_FIRMWARE_VOLUME_EXT_HEADER) or zero if there is
-+	 * no extended header.
-+	 */
-+	u16			ext_hdr_off;
-+	/* This field must always be set to zero */
-+	u8			reserved[1];
-+	/*
-+	 * Set to 2. Future versions of this specification may define new
-+	 * header fields and will increment the Revision field accordingly.
-+	 */
-+	u8			rev;
-+	/*
-+	 * An array of run-length encoded FvBlockMapEntry structures.
-+	 * The array is terminated with an entry of {0,0}.
-+	 */
-+	struct fv_blkmap_entry	block_map[1];
-+};
-+
-+#define EFI_FVH_SIGNATURE	SIGNATURE_32('_', 'F', 'V', 'H')
-+
-+/* Firmware Volume Header Revision definition */
-+#define EFI_FVH_REVISION	0x02
-+
-+/* Extension header pointed by ExtHeaderOffset of volume header */
-+struct fv_ext_header {
-+	/* firmware volume name */
-+	struct efi_guid		fv_name;
-+	/* Size of the rest of the extension header including this structure */
-+	u32			ext_hdr_size;
-+};
-+
-+#endif
-diff -ruN u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/fsp/fsp_hob.h u-boot/arch/x86/include/asm/arch-queensbay/fsp/fsp_hob.h
---- u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/fsp/fsp_hob.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/include/asm/arch-queensbay/fsp/fsp_hob.h	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,340 @@
-+/*
-+ * Copyright (C) 2013, Intel Corporation
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	Intel
-+ */
-+
-+#ifndef __FSP_HOB_H__
-+#define __FSP_HOB_H__
-+
-+/* Type of HOB Header */
-+#define HOB_TYPE_MEM_ALLOC	0x0002
-+#define HOB_TYPE_RES_DESC	0x0003
-+#define HOB_TYPE_GUID_EXT	0x0004
-+#define HOB_TYPE_UNUSED		0xFFFE
-+#define HOB_TYPE_EOH		0xFFFF
-+
-+/*
-+ * Describes the format and size of the data inside the HOB.
-+ * All HOBs must contain this generic HOB header.
-+ */
-+struct hob_header {
-+	u16	type;		/* HOB type */
-+	u16	len;		/* HOB length */
-+	u32	reserved;	/* always zero */
-+};
-+
-+/* Enumeration of memory types introduced in UEFI */
-+enum efi_mem_type {
-+	EFI_RESERVED_MEMORY_TYPE,
-+	/*
-+	 * The code portions of a loaded application.
-+	 * (Note that UEFI OS loaders are UEFI applications.)
-+	 */
-+	EFI_LOADER_CODE,
-+	/*
-+	 * The data portions of a loaded application and
-+	 * the default data allocation type used by an application
-+	 * to allocate pool memory.
-+	 */
-+	EFI_LOADER_DATA,
-+	/* The code portions of a loaded Boot Services Driver */
-+	EFI_BOOT_SERVICES_CODE,
-+	/*
-+	 * The data portions of a loaded Boot Serves Driver and
-+	 * the default data allocation type used by a Boot Services
-+	 * Driver to allocate pool memory.
-+	 */
-+	EFI_BOOT_SERVICES_DATA,
-+	/* The code portions of a loaded Runtime Services Driver */
-+	EFI_RUNTIME_SERVICES_CODE,
-+	/*
-+	 * The data portions of a loaded Runtime Services Driver and
-+	 * the default data allocation type used by a Runtime Services
-+	 * Driver to allocate pool memory.
-+	 */
-+	EFI_RUNTIME_SERVICES_DATA,
-+	/* Free (unallocated) memory */
-+	EFI_CONVENTIONAL_MEMORY,
-+	/* Memory in which errors have been detected */
-+	EFI_UNUSABLE_MEMORY,
-+	/* Memory that holds the ACPI tables */
-+	EFI_ACPI_RECLAIM_MEMORY,
-+	/* Address space reserved for use by the firmware */
-+	EFI_ACPI_MEMORY_NVS,
-+	/*
-+	 * Used by system firmware to request that a memory-mapped IO region
-+	 * be mapped by the OS to a virtual address so it can be accessed by
-+	 * EFI runtime services.
-+	 */
-+	EFI_MMAP_IO,
-+	/*
-+	 * System memory-mapped IO region that is used to translate
-+	 * memory cycles to IO cycles by the processor.
-+	 */
-+	EFI_MMAP_IO_PORT,
-+	/*
-+	 * Address space reserved by the firmware for code that is
-+	 * part of the processor.
-+	 */
-+	EFI_PAL_CODE,
-+	EFI_MAX_MEMORY_TYPE
-+};
-+
-+/*
-+ * Describes all memory ranges used during the HOB producer phase that
-+ * exist outside the HOB list. This HOB type describes how memory is used,
-+ * not the physical attributes of memory.
-+ */
-+struct hob_mem_alloc {
-+	struct hob_header	hdr;
-+	/*
-+	 * A GUID that defines the memory allocation region's type and purpose,
-+	 * as well as other fields within the memory allocation HOB. This GUID
-+	 * is used to define the additional data within the HOB that may be
-+	 * present for the memory allocation HOB. Type efi_guid is defined in
-+	 * InstallProtocolInterface() in the UEFI 2.0 specification.
-+	 */
-+	struct efi_guid		name;
-+	/*
-+	 * The base address of memory allocated by this HOB.
-+	 * Type phys_addr_t is defined in AllocatePages() in the UEFI 2.0
-+	 * specification.
-+	 */
-+	phys_addr_t		mem_base;
-+	/* The length in bytes of memory allocated by this HOB */
-+	phys_size_t		mem_len;
-+	/*
-+	 * Defines the type of memory allocated by this HOB.
-+	 * The memory type definition follows the EFI_MEMORY_TYPE definition.
-+	 * Type EFI_MEMORY_TYPE is defined in AllocatePages() in the UEFI 2.0
-+	 * specification.
-+	 */
-+	enum efi_mem_type	mem_type;
-+	/* padding */
-+	u8			reserved[4];
-+};
-+
-+/* Value of ResourceType in HOB_RES_DESC */
-+#define RES_SYS_MEM		0x00000000
-+#define RES_MMAP_IO		0x00000001
-+#define RES_IO			0x00000002
-+#define RES_FW_DEVICE		0x00000003
-+#define RES_MMAP_IO_PORT	0x00000004
-+#define RES_MEM_RESERVED	0x00000005
-+#define RES_IO_RESERVED		0x00000006
-+#define RES_MAX_MEM_TYPE	0x00000007
-+
-+/*
-+ * These types can be ORed together as needed.
-+ *
-+ * The first three enumerations describe settings
-+ * The rest of the settings describe capabilities
-+ */
-+#define RES_ATTR_PRESENT			0x00000001
-+#define RES_ATTR_INITIALIZED			0x00000002
-+#define RES_ATTR_TESTED				0x00000004
-+#define RES_ATTR_SINGLE_BIT_ECC			0x00000008
-+#define RES_ATTR_MULTIPLE_BIT_ECC		0x00000010
-+#define RES_ATTR_ECC_RESERVED_1			0x00000020
-+#define RES_ATTR_ECC_RESERVED_2			0x00000040
-+#define RES_ATTR_READ_PROTECTED			0x00000080
-+#define RES_ATTR_WRITE_PROTECTED		0x00000100
-+#define RES_ATTR_EXECUTION_PROTECTED		0x00000200
-+#define RES_ATTR_UNCACHEABLE			0x00000400
-+#define RES_ATTR_WRITE_COMBINEABLE		0x00000800
-+#define RES_ATTR_WRITE_THROUGH_CACHEABLE	0x00001000
-+#define RES_ATTR_WRITE_BACK_CACHEABLE		0x00002000
-+#define RES_ATTR_16_BIT_IO			0x00004000
-+#define RES_ATTR_32_BIT_IO			0x00008000
-+#define RES_ATTR_64_BIT_IO			0x00010000
-+#define RES_ATTR_UNCACHED_EXPORTED		0x00020000
-+
-+/*
-+ * Describes the resource properties of all fixed, nonrelocatable resource
-+ * ranges found on the processor host bus during the HOB producer phase.
-+ */
-+struct hob_res_desc {
-+	struct hob_header	hdr;
-+	/*
-+	 * A GUID representing the owner of the resource. This GUID is
-+	 * used by HOB consumer phase components to correlate device
-+	 * ownership of a resource.
-+	 */
-+	struct efi_guid		owner;
-+	u32			type;
-+	u32			attr;
-+	/* The physical start address of the resource region */
-+	phys_addr_t		phys_start;
-+	/* The number of bytes of the resource region */
-+	phys_size_t		len;
-+};
-+
-+/*
-+ * Allows writers of executable content in the HOB producer phase to
-+ * maintain and manage HOBs with specific GUID.
-+ */
-+struct hob_guid {
-+	struct hob_header	hdr;
-+	/* A GUID that defines the contents of this HOB */
-+	struct efi_guid		name;
-+	/* GUID specific data goes here */
-+};
-+
-+/* Union of all the possible HOB Types */
-+union hob_pointers {
-+	struct hob_header	*hdr;
-+	struct hob_mem_alloc	*mem_alloc;
-+	struct hob_res_desc	*res_desc;
-+	struct hob_guid		*guid;
-+	u8			*raw;
-+};
-+
-+/**
-+ * get_hob_type() - return the type of a HOB
-+ *
-+ * This macro returns the type field from the HOB header for the
-+ * HOB specified by hob.
-+ *
-+ * @hob:    A pointer to a HOB.
-+ *
-+ * @return: HOB type.
-+ */
-+static inline u16 get_hob_type(union hob_pointers hob)
-+{
-+	return hob.hdr->type;
-+}
-+
-+/**
-+ * get_hob_length() - return the length, in bytes, of a HOB
-+ *
-+ * This macro returns the len field from the HOB header for the
-+ * HOB specified by hob.
-+ *
-+ * @hob:    A pointer to a HOB.
-+ *
-+ * @return: HOB length.
-+ */
-+static inline u16 get_hob_length(union hob_pointers hob)
-+{
-+	return hob.hdr->len;
-+}
-+
-+/**
-+ * get_next_hob() - return a pointer to the next HOB in the HOB list
-+ *
-+ * This macro returns a pointer to HOB that follows the HOB specified by hob
-+ * in the HOB List.
-+ *
-+ * @hob:    A pointer to a HOB.
-+ *
-+ * @return: A pointer to the next HOB in the HOB list.
-+ */
-+static inline void *get_next_hob(union hob_pointers hob)
-+{
-+	return (void *)(*(u8 **)&(hob) + get_hob_length(hob));
-+}
-+
-+/**
-+ * end_of_hob() - determine if a HOB is the last HOB in the HOB list
-+ *
-+ * This macro determine if the HOB specified by hob is the last HOB in the
-+ * HOB list.  If hob is last HOB in the HOB list, then true is returned.
-+ * Otherwise, false is returned.
-+ *
-+ * @hob:          A pointer to a HOB.
-+ *
-+ * @retval true:  The HOB specified by hob is the last HOB in the HOB list.
-+ * @retval false: The HOB specified by hob is not the last HOB in the HOB list.
-+ */
-+static inline bool end_of_hob(union hob_pointers hob)
-+{
-+	return get_hob_type(hob) == HOB_TYPE_EOH;
-+}
-+
-+/**
-+ * get_guid_hob_data() - return a pointer to data buffer from a HOB of
-+ *                       type HOB_TYPE_GUID_EXT
-+ *
-+ * This macro returns a pointer to the data buffer in a HOB specified by hob.
-+ * hob is assumed to be a HOB of type HOB_TYPE_GUID_EXT.
-+ *
-+ * @hob:    A pointer to a HOB.
-+ *
-+ * @return: A pointer to the data buffer in a HOB.
-+ */
-+static inline void *get_guid_hob_data(u8 *hob)
-+{
-+	return (void *)(hob + sizeof(struct hob_guid));
-+}
-+
-+/**
-+ * get_guid_hob_data_size() - return the size of the data buffer from a HOB
-+ *                            of type HOB_TYPE_GUID_EXT
-+ *
-+ * This macro returns the size, in bytes, of the data buffer in a HOB
-+ * specified by hob. hob is assumed to be a HOB of type HOB_TYPE_GUID_EXT.
-+ *
-+ * @hob:    A pointer to a HOB.
-+ *
-+ * @return: The size of the data buffer.
-+ */
-+static inline u16 get_guid_hob_data_size(u8 *hob)
-+{
-+	union hob_pointers hob_p = *(union hob_pointers *)hob;
-+	return get_hob_length(hob_p) - sizeof(struct hob_guid);
-+}
-+
-+/* FSP specific GUID HOB definitions */
-+#define FSP_GUID_DATA1		0x912740be
-+#define FSP_GUID_DATA2		0x2284
-+#define FSP_GUID_DATA3		0x4734
-+#define FSP_GUID_DATA4_0	0xb9
-+#define FSP_GUID_DATA4_1	0x71
-+#define FSP_GUID_DATA4_2	0x84
-+#define FSP_GUID_DATA4_3	0xb0
-+#define FSP_GUID_DATA4_4	0x27
-+#define FSP_GUID_DATA4_5	0x35
-+#define FSP_GUID_DATA4_6	0x3f
-+#define FSP_GUID_DATA4_7	0x0c
-+
-+#define FSP_HEADER_GUID \
-+	{ \
-+	FSP_GUID_DATA1, FSP_GUID_DATA2, FSP_GUID_DATA3, \
-+	{ FSP_GUID_DATA4_0, FSP_GUID_DATA4_1, FSP_GUID_DATA4_2, \
-+	  FSP_GUID_DATA4_3, FSP_GUID_DATA4_4, FSP_GUID_DATA4_5, \
-+	  FSP_GUID_DATA4_6, FSP_GUID_DATA4_7 } \
-+	}
-+
-+#define FSP_NON_VOLATILE_STORAGE_HOB_GUID \
-+	{ \
-+	0x721acf02, 0x4d77, 0x4c2a, \
-+	{ 0xb3, 0xdc, 0x27, 0xb, 0x7b, 0xa9, 0xe4, 0xb0 } \
-+	}
-+
-+#define FSP_BOOTLOADER_TEMP_MEM_HOB_GUID \
-+	{ \
-+	0xbbcff46c, 0xc8d3, 0x4113, \
-+	{ 0x89, 0x85, 0xb9, 0xd4, 0xf3, 0xb3, 0xf6, 0x4e } \
-+	}
-+
-+#define FSP_HOB_RESOURCE_OWNER_FSP_GUID \
-+	{ \
-+	0x69a79759, 0x1373, 0x4367, \
-+	{ 0xa6, 0xc4, 0xc7, 0xf5, 0x9e, 0xfd, 0x98, 0x6e } \
-+	}
-+
-+#define FSP_HOB_RESOURCE_OWNER_TSEG_GUID \
-+	{ \
-+	0xd038747c, 0xd00c, 0x4980, \
-+	{ 0xb3, 0x19, 0x49, 0x01, 0x99, 0xa4, 0x7d, 0x55 } \
-+	}
-+
-+#define FSP_HOB_RESOURCE_OWNER_GRAPHICS_GUID \
-+	{ \
-+	0x9c7c3aa7, 0x5332, 0x4917, \
-+	{ 0x82, 0xb9, 0x56, 0xa5, 0xf3, 0xe6, 0x2a, 0x07 } \
-+	}
-+
-+#endif
-diff -ruN u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/fsp/fsp_infoheader.h u-boot/arch/x86/include/asm/arch-queensbay/fsp/fsp_infoheader.h
---- u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/fsp/fsp_infoheader.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/include/asm/arch-queensbay/fsp/fsp_infoheader.h	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,32 @@
-+/*
-+ * Copyright (C) 2013, Intel Corporation
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	Intel
-+ */
-+
-+#ifndef _FSP_HEADER_H_
-+#define _FSP_HEADER_H_
-+
-+#define FSP_HEADER_OFF	0x94	/* Fixed FSP header offset in the FSP image */
-+
-+struct __packed fsp_header {
-+	u32	sign;			/* 'FSPH' */
-+	u32	hdr_len;		/* header length */
-+	u8	reserved1[3];
-+	u8	hdr_rev;		/* header rev */
-+	u32	img_rev;		/* image rev */
-+	char	img_id[8];		/* signature string */
-+	u32	img_size;		/* image size */
-+	u32	img_base;		/* image base */
-+	u32	img_attr;		/* image attribute */
-+	u32	cfg_region_off;		/* configuration region offset */
-+	u32	cfg_region_size;	/* configuration region size */
-+	u32	api_num;		/* number of API entries */
-+	u32	fsp_tempram_init;	/* tempram_init offset */
-+	u32	fsp_init;		/* fsp_init offset */
-+	u32	fsp_notify;		/* fsp_notify offset */
-+	u32	reserved2;
-+};
-+
-+#endif
-diff -ruN u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/fsp/fsp_platform.h u-boot/arch/x86/include/asm/arch-queensbay/fsp/fsp_platform.h
---- u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/fsp/fsp_platform.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/include/asm/arch-queensbay/fsp/fsp_platform.h	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,15 @@
-+/*
-+ * Copyright (C) 2013, Intel Corporation
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	Intel
-+ */
-+
-+#ifndef __FSP_PLATFORM_H__
-+#define __FSP_PLATFORM_H__
-+
-+struct fspinit_rtbuf {
-+	struct common_buf	common;	/* FSP common runtime data structure */
-+};
-+
-+#endif
-diff -ruN u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/fsp/fsp_support.h u-boot/arch/x86/include/asm/arch-queensbay/fsp/fsp_support.h
---- u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/fsp/fsp_support.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/include/asm/arch-queensbay/fsp/fsp_support.h	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,207 @@
-+/*
-+ * Copyright (C) 2013, Intel Corporation
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	Intel
-+ */
-+
-+#ifndef __FSP_SUPPORT_H__
-+#define __FSP_SUPPORT_H__
-+
-+#include "fsp_types.h"
-+#include "fsp_fv.h"
-+#include "fsp_ffs.h"
-+#include "fsp_api.h"
-+#include "fsp_hob.h"
-+#include "fsp_platform.h"
-+#include "fsp_infoheader.h"
-+#include "fsp_bootmode.h"
-+#include "fsp_vpd.h"
-+
-+struct shared_data {
-+	struct fsp_header	*fsp_hdr;
-+	u32			*stack_top;
-+	struct upd_region	fsp_upd;
-+};
-+
-+#define FSP_LOWMEM_BASE		0x100000UL
-+#define FSP_HIGHMEM_BASE	0x100000000ULL
-+
-+/**
-+ * FSP Continuation assembly helper routine
-+ *
-+ * This routine jumps to the C version of FSP continuation function
-+ */
-+void asm_continuation(void);
-+
-+/**
-+ * FSP initialization complete
-+ *
-+ * This is the function that indicates FSP initialization is complete and jumps
-+ * back to the bootloader with HOB list pointer as the parameter.
-+ *
-+ * @hob_list:    HOB list pointer
-+ */
-+void fsp_init_done(void *hob_list);
-+
-+/**
-+ * FSP Continuation function
-+ *
-+ * @shared_data: Shared data base before stack migration
-+ * @status:      Always 0
-+ * @hob_list:    HOB list pointer
-+ *
-+ * @retval:      Never returns
-+ */
-+void fsp_continue(struct shared_data *shared_data, u32 status,
-+		  void *hob_list);
-+
-+/**
-+ * Find FSP header offset in FSP image
-+ *
-+ * @retval: the offset of FSP header. If signature is invalid, returns 0.
-+ */
-+u32 find_fsp_header(void);
-+
-+/**
-+ * FSP initialization wrapper function.
-+ *
-+ * @stack_top: bootloader stack top address
-+ * @boot_mode: boot mode defined in fsp_bootmode.h
-+ * @nvs_buf:   Non-volatile memory buffer pointer
-+ */
-+void fsp_init(u32 stack_top, u32 boot_mode, void *nvs_buf);
-+
-+/**
-+ * FSP notification wrapper function
-+ *
-+ * @fsp_hdr: Pointer to FSP information header
-+ * @phase:   FSP initialization phase defined in enum fsp_phase
-+ *
-+ * @retval:  compatible status code with EFI_STATUS defined in PI spec
-+ */
-+u32 fsp_notify(struct fsp_header *fsp_hdr, u32 phase);
-+
-+/**
-+ * This function retrieves the top of usable low memory.
-+ *
-+ * @hob_list: A HOB list pointer.
-+ *
-+ * @retval:   Usable low memory top.
-+ */
-+u32 fsp_get_usable_lowmem_top(const void *hob_list);
-+
-+/**
-+ * This function retrieves the top of usable high memory.
-+ *
-+ * @hob_list: A HOB list pointer.
-+ *
-+ * @retval:   Usable high memory top.
-+ */
-+u64 fsp_get_usable_highmem_top(const void *hob_list);
-+
-+/**
-+ * This function retrieves a special reserved memory region.
-+ *
-+ * @hob_list: A HOB list pointer.
-+ * @len:      A pointer to the GUID HOB data buffer length.
-+ *            If the GUID HOB is located, the length will be updated.
-+ * @guid:     A pointer to the owner guild.
-+ *
-+ * @retval:   Reserved region start address.
-+ *            0 if this region does not exist.
-+ */
-+u64 fsp_get_reserved_mem_from_guid(const void *hob_list,
-+				   u64 *len, struct efi_guid *guid);
-+
-+/**
-+ * This function retrieves the FSP reserved normal memory.
-+ *
-+ * @hob_list: A HOB list pointer.
-+ * @len:      A pointer to the FSP reserved memory length buffer.
-+ *            If the GUID HOB is located, the length will be updated.
-+ * @retval:   FSP reserved memory base
-+ *            0 if this region does not exist.
-+ */
-+u32 fsp_get_fsp_reserved_mem(const void *hob_list, u32 *len);
-+
-+/**
-+ * This function retrieves the TSEG reserved normal memory.
-+ *
-+ * @hob_list:      A HOB list pointer.
-+ * @len:           A pointer to the TSEG reserved memory length buffer.
-+ *                 If the GUID HOB is located, the length will be updated.
-+ *
-+ * @retval NULL:   Failed to find the TSEG reserved memory.
-+ * @retval others: TSEG reserved memory base.
-+ */
-+u32 fsp_get_tseg_reserved_mem(const void *hob_list, u32 *len);
-+
-+/**
-+ * Returns the next instance of a HOB type from the starting HOB.
-+ *
-+ * @type:     HOB type to search
-+ * @hob_list: A pointer to the HOB list
-+ *
-+ * @retval:   A HOB object with matching type; Otherwise NULL.
-+ */
-+void *fsp_get_next_hob(u16 type, const void *hob_list);
-+
-+/**
-+ * Returns the next instance of the matched GUID HOB from the starting HOB.
-+ *
-+ * @guid:     GUID to search
-+ * @hob_list: A pointer to the HOB list
-+ *
-+ * @retval:   A HOB object with matching GUID; Otherwise NULL.
-+ */
-+void *fsp_get_next_guid_hob(const struct efi_guid *guid, const void *hob_list);
-+
-+/**
-+ * This function retrieves a GUID HOB data buffer and size.
-+ *
-+ * @hob_list:      A HOB list pointer.
-+ * @len:           A pointer to the GUID HOB data buffer length.
-+ *                 If the GUID HOB is located, the length will be updated.
-+ * @guid           A pointer to HOB GUID.
-+ *
-+ * @retval NULL:   Failed to find the GUID HOB.
-+ * @retval others: GUID HOB data buffer pointer.
-+ */
-+void *fsp_get_guid_hob_data(const void *hob_list, u32 *len,
-+			    struct efi_guid *guid);
-+
-+/**
-+ * This function retrieves FSP Non-volatile Storage HOB buffer and size.
-+ *
-+ * @hob_list:      A HOB list pointer.
-+ * @len:           A pointer to the NVS data buffer length.
-+ *                 If the HOB is located, the length will be updated.
-+ *
-+ * @retval NULL:   Failed to find the NVS HOB.
-+ * @retval others: FSP NVS data buffer pointer.
-+ */
-+void *fsp_get_nvs_data(const void *hob_list, u32 *len);
-+
-+/**
-+ * This function retrieves Bootloader temporary stack buffer and size.
-+ *
-+ * @hob_list:      A HOB list pointer.
-+ * @len:           A pointer to the bootloader temporary stack length.
-+ *                 If the HOB is located, the length will be updated.
-+ *
-+ * @retval NULL:   Failed to find the bootloader temporary stack HOB.
-+ * @retval others: Bootloader temporary stackbuffer pointer.
-+ */
-+void *fsp_get_bootloader_tmp_mem(const void *hob_list, u32 *len);
-+
-+/**
-+ * This function overrides the default configurations in the UPD data region.
-+ *
-+ * @fsp_upd: A pointer to the upd_region data strcture
-+ *
-+ * @return:  None
-+ */
-+void update_fsp_upd(struct upd_region *fsp_upd);
-+
-+#endif
-diff -ruN u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/fsp/fsp_types.h u-boot/arch/x86/include/asm/arch-queensbay/fsp/fsp_types.h
---- u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/fsp/fsp_types.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/include/asm/arch-queensbay/fsp/fsp_types.h	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,82 @@
-+/*
-+ * Copyright (C) 2013, Intel Corporation
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	Intel
-+ */
-+
-+#ifndef __FSP_TYPES_H__
-+#define __FSP_TYPES_H__
-+
-+/* 128 bit buffer containing a unique identifier value */
-+struct efi_guid {
-+	u32	data1;
-+	u16	data2;
-+	u16	data3;
-+	u8	data4[8];
-+};
-+
-+/**
-+ * Returns a 16-bit signature built from 2 ASCII characters.
-+ *
-+ * This macro returns a 16-bit value built from the two ASCII characters
-+ * specified by A and B.
-+ *
-+ * @A: The first ASCII character.
-+ * @B: The second ASCII character.
-+ *
-+ * @return: A 16-bit value built from the two ASCII characters specified by
-+ *          A and B.
-+ */
-+#define SIGNATURE_16(A, B)	((A) | (B << 8))
-+
-+/**
-+ * Returns a 32-bit signature built from 4 ASCII characters.
-+ *
-+ * This macro returns a 32-bit value built from the four ASCII characters
-+ * specified by A, B, C, and D.
-+ *
-+ * @A: The first ASCII character.
-+ * @B: The second ASCII character.
-+ * @C: The third ASCII character.
-+ * @D: The fourth ASCII character.
-+ *
-+ * @return: A 32-bit value built from the two ASCII characters specified by
-+ *          A, B, C and D.
-+ */
-+#define SIGNATURE_32(A, B, C, D)	\
-+	(SIGNATURE_16(A, B) | (SIGNATURE_16(C, D) << 16))
-+
-+/**
-+ * Returns a 64-bit signature built from 8 ASCII characters.
-+ *
-+ * This macro returns a 64-bit value built from the eight ASCII characters
-+ * specified by A, B, C, D, E, F, G,and H.
-+ *
-+ * @A: The first ASCII character.
-+ * @B: The second ASCII character.
-+ * @C: The third ASCII character.
-+ * @D: The fourth ASCII character.
-+ * @E: The fifth ASCII character.
-+ * @F: The sixth ASCII character.
-+ * @G: The seventh ASCII character.
-+ * @H: The eighth ASCII character.
-+ *
-+ * @return: A 64-bit value built from the two ASCII characters specified by
-+ *          A, B, C, D, E, F, G and H.
-+ */
-+#define SIGNATURE_64(A, B, C, D, E, F, G, H)	\
-+	(SIGNATURE_32(A, B, C, D) | ((u64)(SIGNATURE_32(E, F, G, H)) << 32))
-+
-+/*
-+ * Define FSP API return status code.
-+ * Compatiable with EFI_STATUS defined in PI Spec.
-+ */
-+#define FSP_SUCCESS		0
-+#define FSP_INVALID_PARAM	0x80000002
-+#define FSP_UNSUPPORTED		0x80000003
-+#define FSP_DEVICE_ERROR	0x80000007
-+#define FSP_NOT_FOUND		0x8000000E
-+#define FSP_ALREADY_STARTED	0x80000014
-+
-+#endif
-diff -ruN u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/fsp/fsp_vpd.h u-boot/arch/x86/include/asm/arch-queensbay/fsp/fsp_vpd.h
---- u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/fsp/fsp_vpd.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/include/asm/arch-queensbay/fsp/fsp_vpd.h	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,56 @@
-+/*
-+ * Copyright (C) 2013, Intel Corporation
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * This file is automatically generated. Please do NOT modify !!!
-+ *
-+ * SPDX-License-Identifier:	Intel
-+ */
-+
-+#ifndef __VPDHEADER_H__
-+#define __VPDHEADER_H__
-+
-+#define UPD_TERMINATOR	0x55AA
-+
-+struct __packed upd_region {
-+	u64	sign;			/* Offset 0x0000 */
-+	u64	reserved;		/* Offset 0x0008 */
-+	u8	dummy[240];		/* Offset 0x0010 */
-+	u8	hda_verb_header[12];	/* Offset 0x0100 */
-+	u32	hda_verb_length;	/* Offset 0x010C */
-+	u8	hda_verb_data0[16];	/* Offset 0x0110 */
-+	u8	hda_verb_data1[16];	/* Offset 0x0120 */
-+	u8	hda_verb_data2[16];	/* Offset 0x0130 */
-+	u8	hda_verb_data3[16];	/* Offset 0x0140 */
-+	u8	hda_verb_data4[16];	/* Offset 0x0150 */
-+	u8	hda_verb_data5[16];	/* Offset 0x0160 */
-+	u8	hda_verb_data6[16];	/* Offset 0x0170 */
-+	u8	hda_verb_data7[16];	/* Offset 0x0180 */
-+	u8	hda_verb_data8[16];	/* Offset 0x0190 */
-+	u8	hda_verb_data9[16];	/* Offset 0x01A0 */
-+	u8	hda_verb_data10[16];	/* Offset 0x01B0 */
-+	u8	hda_verb_data11[16];	/* Offset 0x01C0 */
-+	u8	hda_verb_data12[16];	/* Offset 0x01D0 */
-+	u8	hda_verb_data13[16];	/* Offset 0x01E0 */
-+	u8	hda_verb_pad[47];	/* Offset 0x01F0 */
-+	u16	terminator;		/* Offset 0x021F */
-+};
-+
-+#define VPD_IMAGE_ID	0x445056574F4E4E4D	/* 'MNNOWVPD' */
-+#define VPD_IMAGE_REV	0x00000301
-+
-+struct __packed vpd_region {
-+	u64	sign;			/* Offset 0x0000 */
-+	u32	img_rev;		/* Offset 0x0008 */
-+	u32	upd_offset;		/* Offset 0x000C */
-+	u8	unused[16];		/* Offset 0x0010 */
-+	u32	fsp_res_memlen;		/* Offset 0x0020 */
-+	u8	disable_pcie1;		/* Offset 0x0024 */
-+	u8	disable_pcie2;		/* Offset 0x0025 */
-+	u8	disable_pcie3;		/* Offset 0x0026 */
-+	u8	enable_azalia;		/* Offset 0x0027 */
-+	u8	legacy_seg_decode;	/* Offset 0x0028 */
-+	u8	pcie_port_ioh;		/* Offset 0x0029 */
-+};
-+
-+#endif
-diff -ruN u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/gpio.h u-boot/arch/x86/include/asm/arch-queensbay/gpio.h
---- u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/gpio.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/include/asm/arch-queensbay/gpio.h	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,13 @@
-+/*
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#ifndef _X86_ARCH_GPIO_H_
-+#define _X86_ARCH_GPIO_H_
-+
-+/* Where in config space is the register that points to the GPIO registers? */
-+#define PCI_CFG_GPIOBASE 0x44
-+
-+#endif /* _X86_ARCH_GPIO_H_ */
-diff -ruN u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/tnc.h u-boot/arch/x86/include/asm/arch-queensbay/tnc.h
---- u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/tnc.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/include/asm/arch-queensbay/tnc.h	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,15 @@
-+/*
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#ifndef _X86_ARCH_TNC_H_
-+#define _X86_ARCH_TNC_H_
-+
-+#include <pci.h>
-+
-+/* PCI Configuration Space (D31:F0): LPC */
-+#define PCH_LPC_DEV	PCI_BDF(0, 0x1f, 0)
-+
-+#endif /* _X86_ARCH_TNC_H_ */
-diff -ruN u-boot-2015.01-rc3/arch/x86/include/asm/config.h u-boot/arch/x86/include/asm/config.h
---- u-boot-2015.01-rc3/arch/x86/include/asm/config.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/include/asm/config.h	2015-01-01 17:34:32.257503186 +0100
-@@ -10,6 +10,5 @@
- #define CONFIG_SYS_GENERIC_BOARD
- #define CONFIG_LMB
- #define CONFIG_SYS_BOOT_RAMDISK_HIGH
--#define asmlinkage __attribute__((regparm(0)))
- 
- #endif
-diff -ruN u-boot-2015.01-rc3/arch/x86/include/asm/global_data.h u-boot/arch/x86/include/asm/global_data.h
---- u-boot-2015.01-rc3/arch/x86/include/asm/global_data.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/include/asm/global_data.h	2015-01-01 17:34:32.257503186 +0100
-@@ -47,6 +47,9 @@
- 	enum pei_boot_mode_t pei_boot_mode;
- 	const struct pch_gpio_map *gpio_map;	/* board GPIO map */
- 	struct memory_info meminfo;	/* Memory information */
-+#ifdef CONFIG_HAVE_FSP
-+	void	*hob_list;		/* FSP HOB list */
-+#endif
- };
- 
- #endif
-diff -ruN u-boot-2015.01-rc3/arch/x86/include/asm/gpio.h u-boot/arch/x86/include/asm/gpio.h
---- u-boot-2015.01-rc3/arch/x86/include/asm/gpio.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/include/asm/gpio.h	2015-01-01 17:34:32.257503186 +0100
-@@ -11,7 +11,7 @@
- #include <asm-generic/gpio.h>
- 
- struct ich6_bank_platdata {
--	uint32_t base_addr;
-+	uint16_t base_addr;
- 	const char *bank_name;
- };
- 
-@@ -147,6 +147,7 @@
- 	} set3;
- };
- 
-+void setup_pch_gpios(u16 gpiobase, const struct pch_gpio_map *gpio);
- void ich_gpio_set_gpio_map(const struct pch_gpio_map *map);
- 
- #endif /* _X86_GPIO_H_ */
-diff -ruN u-boot-2015.01-rc3/arch/x86/include/asm/ibmpc.h u-boot/arch/x86/include/asm/ibmpc.h
---- u-boot-2015.01-rc3/arch/x86/include/asm/ibmpc.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/include/asm/ibmpc.h	2015-01-01 17:34:32.257503186 +0100
-@@ -18,4 +18,7 @@
- #define SYSCTLA         0x92
- #define SLAVE_PIC       0xa0
- 
-+#define UART0_BASE	0x3f8
-+#define UART1_BASE	0x2f8
-+
- #endif
-diff -ruN u-boot-2015.01-rc3/arch/x86/include/asm/linkage.h u-boot/arch/x86/include/asm/linkage.h
---- u-boot-2015.01-rc3/arch/x86/include/asm/linkage.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/include/asm/linkage.h	2015-01-01 17:34:32.257503186 +0100
-@@ -0,0 +1,6 @@
-+#ifndef _ASM_X86_LINKAGE_H
-+#define _ASM_X86_LINKAGE_H
-+
-+#define asmlinkage CPP_ASMLINKAGE __attribute__((regparm(0)))
-+
-+#endif /* _ASM_X86_LINKAGE_H */
-diff -ruN u-boot-2015.01-rc3/arch/x86/include/asm/pnp_def.h u-boot/arch/x86/include/asm/pnp_def.h
---- u-boot-2015.01-rc3/arch/x86/include/asm/pnp_def.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/include/asm/pnp_def.h	2015-01-01 17:34:32.257503186 +0100
-@@ -0,0 +1,90 @@
-+/*
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * Adapted from coreboot src/include/device/pnp_def.h
-+ * and arch/x86/include/arch/io.h
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#ifndef _ASM_PNP_DEF_H_
-+#define _ASM_PNP_DEF_H_
-+
-+#include <asm/io.h>
-+
-+#define PNP_IDX_EN   0x30
-+#define PNP_IDX_IO0  0x60
-+#define PNP_IDX_IO1  0x62
-+#define PNP_IDX_IO2  0x64
-+#define PNP_IDX_IO3  0x66
-+#define PNP_IDX_IRQ0 0x70
-+#define PNP_IDX_IRQ1 0x72
-+#define PNP_IDX_DRQ0 0x74
-+#define PNP_IDX_DRQ1 0x75
-+#define PNP_IDX_MSC0 0xf0
-+#define PNP_IDX_MSC1 0xf1
-+
-+/* Generic functions for pnp devices */
-+
-+/*
-+ * pnp device is a 16-bit integer composed of its i/o port address at high byte
-+ * and logic function number at low byte.
-+ */
-+#define PNP_DEV(PORT, FUNC) (((PORT) << 8) | (FUNC))
-+
-+static inline void pnp_write_config(uint16_t dev, uint8_t reg, uint8_t value)
-+{
-+	uint8_t port = dev >> 8;
-+
-+	outb(reg, port);
-+	outb(value, port + 1);
-+}
-+
-+static inline uint8_t pnp_read_config(uint16_t dev, uint8_t reg)
-+{
-+	uint8_t port = dev >> 8;
-+
-+	outb(reg, port);
-+	return inb(port + 1);
-+}
-+
-+static inline void pnp_set_logical_device(uint16_t dev)
-+{
-+	uint8_t device = dev & 0xff;
-+
-+	pnp_write_config(dev, 0x07, device);
-+}
-+
-+static inline void pnp_set_enable(uint16_t dev, int enable)
-+{
-+	pnp_write_config(dev, PNP_IDX_EN, enable ? 1 : 0);
-+}
-+
-+static inline int pnp_read_enable(uint16_t dev)
-+{
-+	return !!pnp_read_config(dev, PNP_IDX_EN);
-+}
-+
-+static inline void pnp_set_iobase(uint16_t dev, uint8_t index, uint16_t iobase)
-+{
-+	pnp_write_config(dev, index + 0, (iobase >> 8) & 0xff);
-+	pnp_write_config(dev, index + 1, iobase & 0xff);
-+}
-+
-+static inline uint16_t pnp_read_iobase(uint16_t dev, uint8_t index)
-+{
-+	return ((uint16_t)(pnp_read_config(dev, index)) << 8) |
-+		pnp_read_config(dev, index + 1);
-+}
-+
-+static inline void pnp_set_irq(uint16_t dev, uint8_t index, unsigned irq)
-+{
-+	pnp_write_config(dev, index, irq);
-+}
-+
-+static inline void pnp_set_drq(uint16_t dev, uint8_t index, unsigned drq)
-+{
-+	pnp_write_config(dev, index, drq & 0xff);
-+}
-+
-+#endif /* _ASM_PNP_DEF_H_ */
-diff -ruN u-boot-2015.01-rc3/arch/x86/include/asm/post.h u-boot/arch/x86/include/asm/post.h
---- u-boot-2015.01-rc3/arch/x86/include/asm/post.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/include/asm/post.h	2015-01-01 17:34:32.257503186 +0100
-@@ -33,6 +33,8 @@
- #define POST_LAPIC		0x30
- 
- #define POST_RAM_FAILURE	0xea
-+#define POST_BIST_FAILURE	0xeb
-+#define POST_CAR_FAILURE	0xec
- 
- /* Output a post code using al - value must be 0 to 0xff */
- #ifdef __ASSEMBLY__
-diff -ruN u-boot-2015.01-rc3/arch/x86/Kconfig u-boot/arch/x86/Kconfig
---- u-boot-2015.01-rc3/arch/x86/Kconfig	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/Kconfig	2015-01-01 17:34:32.249503317 +0100
-@@ -32,6 +32,15 @@
- 	  and it provides a 2560x1700 high resolution touch-enabled LCD
- 	  display.
- 
-+config TARGET_CROWNBAY
-+	bool "Support Intel Crown Bay CRB"
-+	help
-+	  This is the Intel Crown Bay Customer Reference Board. It contains
-+	  the Intel Atom Processor E6xx populated on the COM Express module
-+	  with 1GB DDR2 soldered down memory and a carrier board with the
-+	  Intel Platform Controller Hub EG20T, other system components and
-+	  peripheral connectors for PCIe/SATA/USB/LAN/SD/UART/Audio/LVDS.
-+
- endchoice
- 
- config RAMBASE
-@@ -61,9 +70,85 @@
- config SMM_TSEG_SIZE
- 	hex
- 
-+config BOARD_ROMSIZE_KB_512
-+	bool
-+config BOARD_ROMSIZE_KB_1024
-+	bool
-+config BOARD_ROMSIZE_KB_2048
-+	bool
-+config BOARD_ROMSIZE_KB_4096
-+	bool
-+config BOARD_ROMSIZE_KB_8192
-+	bool
-+config BOARD_ROMSIZE_KB_16384
-+	bool
-+
-+choice
-+	prompt "ROM chip size"
-+	default UBOOT_ROMSIZE_KB_512 if BOARD_ROMSIZE_KB_512
-+	default UBOOT_ROMSIZE_KB_1024 if BOARD_ROMSIZE_KB_1024
-+	default UBOOT_ROMSIZE_KB_2048 if BOARD_ROMSIZE_KB_2048
-+	default UBOOT_ROMSIZE_KB_4096 if BOARD_ROMSIZE_KB_4096
-+	default UBOOT_ROMSIZE_KB_8192 if BOARD_ROMSIZE_KB_8192
-+	default UBOOT_ROMSIZE_KB_16384 if BOARD_ROMSIZE_KB_16384
-+	help
-+	  Select the size of the ROM chip you intend to flash U-Boot on.
-+
-+	  The build system will take care of creating a u-boot.rom file
-+	  of the matching size.
-+
-+config UBOOT_ROMSIZE_KB_512
-+	bool "512 KB"
-+	help
-+	  Choose this option if you have a 512 KB ROM chip.
-+
-+config UBOOT_ROMSIZE_KB_1024
-+	bool "1024 KB (1 MB)"
-+	help
-+	  Choose this option if you have a 1024 KB (1 MB) ROM chip.
-+
-+config UBOOT_ROMSIZE_KB_2048
-+	bool "2048 KB (2 MB)"
-+	help
-+	  Choose this option if you have a 2048 KB (2 MB) ROM chip.
-+
-+config UBOOT_ROMSIZE_KB_4096
-+	bool "4096 KB (4 MB)"
-+	help
-+	  Choose this option if you have a 4096 KB (4 MB) ROM chip.
-+
-+config UBOOT_ROMSIZE_KB_8192
-+	bool "8192 KB (8 MB)"
-+	help
-+	  Choose this option if you have a 8192 KB (8 MB) ROM chip.
-+
-+config UBOOT_ROMSIZE_KB_16384
-+	bool "16384 KB (16 MB)"
-+	help
-+	  Choose this option if you have a 16384 KB (16 MB) ROM chip.
-+
-+endchoice
-+
-+# Map the config names to an integer (KB).
-+config UBOOT_ROMSIZE_KB
-+	int
-+	default 512 if UBOOT_ROMSIZE_KB_512
-+	default 1024 if UBOOT_ROMSIZE_KB_1024
-+	default 2048 if UBOOT_ROMSIZE_KB_2048
-+	default 4096 if UBOOT_ROMSIZE_KB_4096
-+	default 8192 if UBOOT_ROMSIZE_KB_8192
-+	default 16384 if UBOOT_ROMSIZE_KB_16384
-+
-+# Map the config names to a hex value (bytes).
- config ROM_SIZE
- 	hex
--	default 0x800000
-+	default 0x80000 if UBOOT_ROMSIZE_KB_512
-+	default 0x100000 if UBOOT_ROMSIZE_KB_1024
-+	default 0x200000 if UBOOT_ROMSIZE_KB_2048
-+	default 0x400000 if UBOOT_ROMSIZE_KB_4096
-+	default 0x800000 if UBOOT_ROMSIZE_KB_8192
-+	default 0xc00000 if UBOOT_ROMSIZE_KB_12288
-+	default 0x1000000 if UBOOT_ROMSIZE_KB_16384
- 
- config HAVE_INTEL_ME
- 	bool "Platform requires Intel Management Engine"
-@@ -234,8 +319,12 @@
- 
- source "arch/x86/cpu/ivybridge/Kconfig"
- 
-+source "arch/x86/cpu/queensbay/Kconfig"
-+
- source "board/coreboot/coreboot/Kconfig"
- 
- source "board/google/chromebook_link/Kconfig"
- 
-+source "board/intel/crownbay/Kconfig"
-+
- endmenu
-diff -ruN u-boot-2015.01-rc3/arch/x86/lib/asm-offsets.c u-boot/arch/x86/lib/asm-offsets.c
---- u-boot-2015.01-rc3/arch/x86/lib/asm-offsets.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/lib/asm-offsets.c	2015-01-01 17:34:32.257503186 +0100
-@@ -17,6 +17,9 @@
- 
- int main(void)
- {
--	DEFINE(GENERATED_GD_RELOC_OFF, offsetof(gd_t, reloc_off));
-+	DEFINE(GD_BIST, offsetof(gd_t, arch.bist));
-+#ifdef CONFIG_HAVE_FSP
-+	DEFINE(GD_HOB_LIST, offsetof(gd_t, arch.hob_list));
-+#endif
- 	return 0;
- }
-diff -ruN u-boot-2015.01-rc3/arch/x86/lib/bios.c u-boot/arch/x86/lib/bios.c
---- u-boot-2015.01-rc3/arch/x86/lib/bios.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/lib/bios.c	2015-01-01 17:34:32.257503186 +0100
-@@ -9,6 +9,7 @@
- #include <common.h>
- #include <bios_emul.h>
- #include <vbe.h>
-+#include <linux/linkage.h>
- #include <asm/cache.h>
- #include <asm/processor.h>
- #include <asm/i8259.h>
-diff -ruN u-boot-2015.01-rc3/arch/x86/lib/bios.h u-boot/arch/x86/lib/bios.h
---- u-boot-2015.01-rc3/arch/x86/lib/bios.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/lib/bios.h	2015-01-01 17:34:32.257503186 +0100
-@@ -10,6 +10,8 @@
- #ifndef _X86_LIB_BIOS_H
- #define _X86_LIB_BIOS_H
- 
-+#include <linux/linkage.h>
-+
- #define REALMODE_BASE		0x600
- 
- #ifdef __ASSEMBLY__
-diff -ruN u-boot-2015.01-rc3/arch/x86/lib/cmd_hob.c u-boot/arch/x86/lib/cmd_hob.c
---- u-boot-2015.01-rc3/arch/x86/lib/cmd_hob.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/lib/cmd_hob.c	2015-01-01 17:34:32.257503186 +0100
-@@ -0,0 +1,65 @@
-+/*
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <command.h>
-+#include <linux/compiler.h>
-+#include <asm/arch/fsp/fsp_support.h>
-+
-+DECLARE_GLOBAL_DATA_PTR;
-+
-+static char *hob_type[] = {
-+	"reserved",
-+	"Hand-off",
-+	"Memory Allocation",
-+	"Resource Descriptor",
-+	"GUID Extension",
-+	"Firmware Volume",
-+	"CPU",
-+	"Memory Pool",
-+	"reserved",
-+	"Firmware Volume 2",
-+	"Load PEIM Unused",
-+	"UEFI Capsule",
-+};
-+
-+int do_hob(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
-+{
-+	union hob_pointers hob;
-+	u16 type;
-+	char *desc;
-+	int i = 0;
-+
-+	hob.raw = (u8 *)gd->arch.hob_list;
-+
-+	printf("HOB list address: 0x%08x\n\n", (unsigned int)hob.raw);
-+
-+	printf("No. | Address  | Type                | Length in Bytes\n");
-+	printf("----|----------|---------------------|----------------\n");
-+	while (!end_of_hob(hob)) {
-+		printf("%-3d | %08x | ", i, (unsigned int)hob.raw);
-+		type = get_hob_type(hob);
-+		if (type == HOB_TYPE_UNUSED)
-+			desc = "*Unused*";
-+		else if (type == HOB_TYPE_EOH)
-+			desc = "*END OF HOB*";
-+		else if (type >= 0 && type <= ARRAY_SIZE(hob_type))
-+			desc = hob_type[type];
-+		else
-+			desc = "*Invalid Type*";
-+		printf("%-19s | %-15d\n", desc, get_hob_length(hob));
-+		hob.raw = get_next_hob(hob);
-+		i++;
-+	}
-+
-+	return 0;
-+}
-+
-+U_BOOT_CMD(
-+	hob,	1,	1,	do_hob,
-+	"print Firmware Support Package (FSP) Hand-Off Block information",
-+	""
-+);
-diff -ruN u-boot-2015.01-rc3/arch/x86/lib/Makefile u-boot/arch/x86/lib/Makefile
---- u-boot-2015.01-rc3/arch/x86/lib/Makefile	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/lib/Makefile	2015-01-01 17:34:32.257503186 +0100
-@@ -10,6 +10,7 @@
- obj-y += bios_interrupts.o
- obj-$(CONFIG_CMD_BOOTM) += bootm.o
- obj-y	+= cmd_boot.o
-+obj-$(CONFIG_HAVE_FSP) += cmd_hob.o
- obj-y	+= gcc.o
- obj-y	+= init_helpers.o
- obj-y	+= interrupts.o
-diff -ruN u-boot-2015.01-rc3/board/altera/socfpga/MAINTAINERS u-boot/board/altera/socfpga/MAINTAINERS
---- u-boot-2015.01-rc3/board/altera/socfpga/MAINTAINERS	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/altera/socfpga/MAINTAINERS	2015-01-01 17:34:32.269502990 +0100
-@@ -5,3 +5,8 @@
- F:	board/altera/socfpga/
- F:	include/configs/socfpga_cyclone5.h
- F:	configs/socfpga_cyclone5_defconfig
-+
-+SOCRATES BOARD
-+M:	Stefan Roese <sr at denx.de>
-+S:	Maintained
-+F:	configs/socfpga_socrates_defconfig
-diff -ruN u-boot-2015.01-rc3/board/altera/socfpga/socfpga_cyclone5.c u-boot/board/altera/socfpga/socfpga_cyclone5.c
---- u-boot-2015.01-rc3/board/altera/socfpga/socfpga_cyclone5.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/altera/socfpga/socfpga_cyclone5.c	2015-01-01 17:34:32.273502924 +0100
-@@ -12,7 +12,9 @@
- #include <usb/s3c_udc.h>
- #include <usb_mass_storage.h>
- 
-+#include <micrel.h>
- #include <netdev.h>
-+#include <phy.h>
- 
- DECLARE_GLOBAL_DATA_PTR;
- 
-@@ -44,6 +46,42 @@
- 	return 0;
- }
- 
-+/*
-+ * PHY configuration
-+ */
-+#ifdef CONFIG_PHY_MICREL_KSZ9021
-+int board_phy_config(struct phy_device *phydev)
-+{
-+	int ret;
-+	/*
-+	 * These skew settings for the KSZ9021 ethernet phy is required for ethernet
-+	 * to work reliably on most flavors of cyclone5 boards.
-+	 */
-+	ret = ksz9021_phy_extended_write(phydev,
-+					 MII_KSZ9021_EXT_RGMII_RX_DATA_SKEW,
-+					 0x0);
-+	if (ret)
-+		return ret;
-+
-+	ret = ksz9021_phy_extended_write(phydev,
-+					 MII_KSZ9021_EXT_RGMII_TX_DATA_SKEW,
-+					 0x0);
-+	if (ret)
-+		return ret;
-+
-+	ret = ksz9021_phy_extended_write(phydev,
-+					 MII_KSZ9021_EXT_RGMII_CLOCK_SKEW,
-+					 0xf0f0);
-+	if (ret)
-+		return ret;
-+
-+	if (phydev->drv->config)
-+		return phydev->drv->config(phydev);
-+
-+	return 0;
-+}
-+#endif
-+
- #ifdef CONFIG_USB_GADGET
- struct s3c_plat_otg_data socfpga_otg_data = {
- 	.regs_otg	= CONFIG_USB_DWC2_REG_ADDR,
-diff -ruN u-boot-2015.01-rc3/board/aristainetos/aristainetos.c u-boot/board/aristainetos/aristainetos.c
---- u-boot-2015.01-rc3/board/aristainetos/aristainetos.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/aristainetos/aristainetos.c	2015-01-01 17:34:32.281502792 +0100
-@@ -301,7 +301,7 @@
- 	/* clear gpr1[14], gpr1[18:17] to select anatop clock */
- 	clrsetbits_le32(&iomuxc_regs->gpr[1], IOMUX_GPR1_FEC_MASK, 0);
- 
--	ret = enable_fec_anatop_clock(ENET_50MHz);
-+	ret = enable_fec_anatop_clock(ENET_50MHZ);
- 	if (ret)
- 		return ret;
- 
-diff -ruN u-boot-2015.01-rc3/board/armltd/vexpress64/MAINTAINERS u-boot/board/armltd/vexpress64/MAINTAINERS
---- u-boot-2015.01-rc3/board/armltd/vexpress64/MAINTAINERS	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/armltd/vexpress64/MAINTAINERS	2015-01-01 17:34:32.281502792 +0100
-@@ -6,6 +6,6 @@
- F:	configs/vexpress_aemv8a_defconfig
- 
- VEXPRESS_AEMV8A_SEMI BOARD
--M:	Steve Rae <srae at broadcom.com>
-+M:	Linus Walleij <linus.walleij at linaro.org>
- S:	Maintained
- F:	configs/vexpress_aemv8a_semi_defconfig
-diff -ruN u-boot-2015.01-rc3/board/avionic-design/common/tamonten-ng.c u-boot/board/avionic-design/common/tamonten-ng.c
---- u-boot-2015.01-rc3/board/avionic-design/common/tamonten-ng.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/avionic-design/common/tamonten-ng.c	2015-01-01 17:34:32.285502727 +0100
-@@ -6,6 +6,7 @@
-  */
- 
- #include <common.h>
-+#include <dm.h>
- #include <asm/arch/pinmux.h>
- #include <asm/arch/gp_padctrl.h>
- #include <asm/arch/gpio.h>
-@@ -51,8 +52,15 @@
- 
- void pmu_write(uchar reg, uchar data)
- {
--	i2c_set_bus_num(4);	/* PMU is on bus 4 */
--	i2c_write(PMU_I2C_ADDRESS, reg, 1, &data, 1);
-+	struct udevice *dev;
-+	int ret;
-+
-+	ret = i2c_get_chip_for_busnum(4, PMU_I2C_ADDRESS, &dev);
-+	if (ret) {
-+		debug("%s: Cannot find PMIC I2C chip\n", __func__);
-+		return;
-+	}
-+	i2c_write(dev, reg, &data, 1);
- }
- 
- /*
-diff -ruN u-boot-2015.01-rc3/board/coreboot/coreboot/coreboot.c u-boot/board/coreboot/coreboot/coreboot.c
---- u-boot-2015.01-rc3/board/coreboot/coreboot/coreboot.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/coreboot/coreboot/coreboot.c	2015-01-01 17:34:32.305502399 +0100
-@@ -6,6 +6,7 @@
- 
- #include <common.h>
- #include <cros_ec.h>
-+#include <asm/gpio.h>
- 
- int arch_early_init_r(void)
- {
-@@ -14,3 +15,8 @@
- 
- 	return 0;
- }
-+
-+void setup_pch_gpios(u16 gpiobase, const struct pch_gpio_map *gpio)
-+{
-+	return;
-+}
-diff -ruN u-boot-2015.01-rc3/board/freescale/common/arm_sleep.c u-boot/board/freescale/common/arm_sleep.c
---- u-boot-2015.01-rc3/board/freescale/common/arm_sleep.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/freescale/common/arm_sleep.c	2015-01-01 17:34:32.357501547 +0100
-@@ -0,0 +1,95 @@
-+/*
-+ * Copyright 2014 Freescale Semiconductor, Inc.
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <asm/io.h>
-+#if !defined(CONFIG_ARMV7_NONSEC) || !defined(CONFIG_ARMV7_VIRT)
-+#error " Deep sleep needs non-secure mode support. "
-+#else
-+#include <asm/secure.h>
-+#endif
-+#include <asm/armv7.h>
-+#include <asm/cache.h>
-+
-+#if defined(CONFIG_LS102XA)
-+#include <asm/arch/immap_ls102xa.h>
-+#endif
-+
-+#include "sleep.h"
-+
-+DECLARE_GLOBAL_DATA_PTR;
-+
-+void __weak board_mem_sleep_setup(void)
-+{
-+}
-+
-+void __weak board_sleep_prepare(void)
-+{
-+}
-+
-+bool is_warm_boot(void)
-+{
-+	struct ccsr_gur __iomem *gur = (void *)CONFIG_SYS_FSL_GUTS_ADDR;
-+
-+	if (in_be32(&gur->crstsr) & DCFG_CCSR_CRSTSR_WDRFR)
-+		return 1;
-+
-+	return 0;
-+}
-+
-+void fsl_dp_disable_console(void)
-+{
-+	gd->flags |= GD_FLG_SILENT | GD_FLG_DISABLE_CONSOLE;
-+}
-+
-+/*
-+ * When wakeup from deep sleep, the first 128 bytes space
-+ * will be used to do DDR training which corrupts the data
-+ * in there. This function will restore them.
-+ */
-+static void dp_ddr_restore(void)
-+{
-+	u64 *src, *dst;
-+	int i;
-+	struct ccsr_scfg __iomem *scfg = (void *)CONFIG_SYS_FSL_SCFG_ADDR;
-+
-+	/* get the address of ddr date from SPARECR3 */
-+	src = (u64 *)in_le32(&scfg->sparecr[2]);
-+	dst = (u64 *)CONFIG_SYS_SDRAM_BASE;
-+
-+	for (i = 0; i < DDR_BUFF_LEN / 8; i++)
-+		*dst++ = *src++;
-+
-+	flush_dcache_all();
-+}
-+
-+static void dp_resume_prepare(void)
-+{
-+	dp_ddr_restore();
-+	board_sleep_prepare();
-+	armv7_init_nonsec();
-+	cleanup_before_linux();
-+}
-+
-+int fsl_dp_resume(void)
-+{
-+	u32 start_addr;
-+	void (*kernel_resume)(void);
-+	struct ccsr_scfg __iomem *scfg = (void *)CONFIG_SYS_FSL_SCFG_ADDR;
-+
-+	if (!is_warm_boot())
-+		return 0;
-+
-+	dp_resume_prepare();
-+
-+	/* Get the entry address and jump to kernel */
-+	start_addr = in_le32(&scfg->sparecr[1]);
-+	debug("Entry address is 0x%08x\n", start_addr);
-+	kernel_resume = (void (*)(void))start_addr;
-+	secure_ram_addr(_do_nonsec_entry)(kernel_resume, 0, 0, 0);
-+
-+	return 0;
-+}
-diff -ruN u-boot-2015.01-rc3/board/freescale/common/ls102xa_stream_id.c u-boot/board/freescale/common/ls102xa_stream_id.c
---- u-boot-2015.01-rc3/board/freescale/common/ls102xa_stream_id.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/freescale/common/ls102xa_stream_id.c	2015-01-01 17:34:32.357501547 +0100
-@@ -0,0 +1,18 @@
-+/*
-+ * Copyright 2014 Freescale Semiconductor
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <asm/io.h>
-+#include <asm/arch/ls102xa_stream_id.h>
-+
-+void ls102xa_config_smmu_stream_id(struct smmu_stream_id *id, uint32_t num)
-+{
-+	uint32_t *scfg = (uint32_t *)CONFIG_SYS_FSL_SCFG_ADDR;
-+	int i;
-+
-+	for (i = 0; i < num; i++)
-+		out_be32(scfg + id[i].offset, id[i].stream_id);
-+}
-diff -ruN u-boot-2015.01-rc3/board/freescale/common/Makefile u-boot/board/freescale/common/Makefile
---- u-boot-2015.01-rc3/board/freescale/common/Makefile	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/freescale/common/Makefile	2015-01-01 17:34:32.357501547 +0100
-@@ -37,6 +37,12 @@
- 
- obj-$(CONFIG_FSL_DIU_CH7301)	+= diu_ch7301.o
- 
-+ifdef CONFIG_ARM
-+obj-$(CONFIG_DEEP_SLEEP)		+= arm_sleep.o
-+else
-+obj-$(CONFIG_DEEP_SLEEP)		+= mpc85xx_sleep.o
-+endif
-+
- obj-$(CONFIG_FSL_DCU_SII9022A)    += dcu_sii9022a.o
- 
- obj-$(CONFIG_MPC8541CDS)	+= cds_pci_ft.o
-@@ -56,10 +62,14 @@
- obj-$(CONFIG_ZM7300)		+= zm7300.o
- obj-$(CONFIG_POWER_PFUZE100)	+= pfuze.o
- 
-+obj-$(CONFIG_LS102XA_STREAM_ID)	+= ls102xa_stream_id.o
-+
- # deal with common files for P-series corenet based devices
- obj-$(CONFIG_P2041RDB)	+= p_corenet/
- obj-$(CONFIG_P3041DS)	+= p_corenet/
- obj-$(CONFIG_P4080DS)	+= p_corenet/
- obj-$(CONFIG_P5020DS)	+= p_corenet/
- obj-$(CONFIG_P5040DS)	+= p_corenet/
-+
-+obj-$(CONFIG_LS102XA_NS_ACCESS)	+= ns_access.o
- endif
-diff -ruN u-boot-2015.01-rc3/board/freescale/common/mpc85xx_sleep.c u-boot/board/freescale/common/mpc85xx_sleep.c
---- u-boot-2015.01-rc3/board/freescale/common/mpc85xx_sleep.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/freescale/common/mpc85xx_sleep.c	2015-01-01 17:34:32.357501547 +0100
-@@ -0,0 +1,88 @@
-+/*
-+ * Copyright 2014 Freescale Semiconductor, Inc.
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <asm/immap_85xx.h>
-+#include "sleep.h"
-+
-+DECLARE_GLOBAL_DATA_PTR;
-+
-+void __weak board_mem_sleep_setup(void)
-+{
-+}
-+
-+void __weak board_sleep_prepare(void)
-+{
-+}
-+
-+bool is_warm_boot(void)
-+{
-+	struct ccsr_gur __iomem *gur = (void *)CONFIG_SYS_MPC85xx_GUTS_ADDR;
-+
-+	if (in_be32(&gur->scrtsr[0]) & DCFG_CCSR_CRSTSR_WDRFR)
-+		return 1;
-+
-+	return 0;
-+}
-+
-+void fsl_dp_disable_console(void)
-+{
-+	gd->flags |= GD_FLG_SILENT | GD_FLG_DISABLE_CONSOLE;
-+}
-+
-+/*
-+ * When wakeup from deep sleep, the first 128 bytes space
-+ * will be used to do DDR training which corrupts the data
-+ * in there. This function will restore them.
-+ */
-+static void dp_ddr_restore(void)
-+{
-+	volatile u64 *src, *dst;
-+	int i;
-+	struct ccsr_scfg __iomem *scfg = (void *)CONFIG_SYS_MPC85xx_SCFG;
-+
-+	/* get the address of ddr date from SPARECR3 */
-+	src = (u64 *)in_be32(&scfg->sparecr[2]);
-+	dst = (u64 *)CONFIG_SYS_SDRAM_BASE;
-+
-+	for (i = 0; i < DDR_BUFF_LEN / 8; i++)
-+		*dst++ = *src++;
-+
-+	flush_dcache();
-+}
-+
-+static void dp_resume_prepare(void)
-+{
-+	dp_ddr_restore();
-+
-+	board_sleep_prepare();
-+
-+	l2cache_init();
-+#if defined(CONFIG_RAMBOOT_PBL)
-+	disable_cpc_sram();
-+#endif
-+	enable_cpc();
-+}
-+
-+int fsl_dp_resume(void)
-+{
-+	u32 start_addr;
-+	void (*kernel_resume)(void);
-+	struct ccsr_scfg __iomem *scfg = (void *)CONFIG_SYS_MPC85xx_SCFG;
-+
-+	if (!is_warm_boot())
-+		return 0;
-+
-+	dp_resume_prepare();
-+
-+	/* Get the entry address and jump to kernel */
-+	start_addr = in_be32(&scfg->sparecr[1]);
-+	debug("Entry address is 0x%08x\n", start_addr);
-+	kernel_resume = (void (*)(void))start_addr;
-+	kernel_resume();
-+
-+	return 0;
-+}
-diff -ruN u-boot-2015.01-rc3/board/freescale/common/ns_access.c u-boot/board/freescale/common/ns_access.c
---- u-boot-2015.01-rc3/board/freescale/common/ns_access.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/freescale/common/ns_access.c	2015-01-01 17:34:32.357501547 +0100
-@@ -0,0 +1,30 @@
-+/*
-+ * Copyright 2014 Freescale Semiconductor
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <asm/io.h>
-+#include <asm/arch/ns_access.h>
-+
-+void enable_devices_ns_access(struct csu_ns_dev *ns_dev, uint32_t num)
-+{
-+	u32 *base = (u32 *)CONFIG_SYS_FSL_CSU_ADDR;
-+	u32 *reg;
-+	uint32_t val;
-+	int i;
-+
-+	for (i = 0; i < num; i++) {
-+		reg = base + ns_dev[i].ind / 2;
-+		val = in_be32(reg);
-+		if (ns_dev[i].ind % 2 == 0) {
-+			val &= 0x0000ffff;
-+			val |= ns_dev[i].val << 16;
-+		} else {
-+			val &= 0xffff0000;
-+			val |= ns_dev[i].val;
-+		}
-+		out_be32(reg, val);
-+	}
-+}
-diff -ruN u-boot-2015.01-rc3/board/freescale/common/qixis.h u-boot/board/freescale/common/qixis.h
---- u-boot-2015.01-rc3/board/freescale/common/qixis.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/freescale/common/qixis.h	2015-01-01 17:34:32.357501547 +0100
-@@ -100,8 +100,15 @@
- void qixis_write_i2c(unsigned int reg, u8 value);
- #endif
- 
-+#if defined(CONFIG_QIXIS_I2C_ACCESS) && defined(CONFIG_SYS_I2C_FPGA_ADDR)
-+#define QIXIS_READ(reg) qixis_read_i2c(offsetof(struct qixis, reg))
-+#define QIXIS_WRITE(reg, value) \
-+	qixis_write_i2c(offsetof(struct qixis, reg), value)
-+#else
- #define QIXIS_READ(reg) qixis_read(offsetof(struct qixis, reg))
- #define QIXIS_WRITE(reg, value) qixis_write(offsetof(struct qixis, reg), value)
-+#endif
-+
- #ifdef CONFIG_SYS_I2C_FPGA_ADDR
- #define QIXIS_READ_I2C(reg) qixis_read_i2c(offsetof(struct qixis, reg))
- #define QIXIS_WRITE_I2C(reg, value) \
-diff -ruN u-boot-2015.01-rc3/board/freescale/common/sleep.h u-boot/board/freescale/common/sleep.h
---- u-boot-2015.01-rc3/board/freescale/common/sleep.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/freescale/common/sleep.h	2015-01-01 17:34:32.357501547 +0100
-@@ -0,0 +1,21 @@
-+/*
-+ * Copyright 2014 Freescale Semiconductor, Inc.
-+ *
-+ * SPDX-License-Identifier: GPL-2.0+
-+ */
-+
-+#ifndef __SLEEP_H
-+#define __SLEEP_H
-+
-+#define DCFG_CCSR_CRSTSR_WDRFR	(1 << 3)
-+#define DDR_BUFF_LEN			128
-+
-+/* determine if it is a wakeup from deep sleep */
-+bool is_warm_boot(void);
-+
-+/* disable console output */
-+void fsl_dp_disable_console(void);
-+
-+/* clean up everything and jump to kernel */
-+int fsl_dp_resume(void);
-+#endif
-diff -ruN u-boot-2015.01-rc3/board/freescale/ls1021aqds/ddr.c u-boot/board/freescale/ls1021aqds/ddr.c
---- u-boot-2015.01-rc3/board/freescale/ls1021aqds/ddr.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/freescale/ls1021aqds/ddr.c	2015-01-01 17:34:32.361501481 +0100
-@@ -153,9 +153,12 @@
- {
- 	phys_size_t dram_size;
- 
-+#if defined(CONFIG_SPL_BUILD) || !defined(CONFIG_SPL)
- 	puts("Initializing DDR....using SPD\n");
- 	dram_size = fsl_ddr_sdram();
--
-+#else
-+	dram_size =  fsl_ddr_sdram_size();
-+#endif
- 	return dram_size;
- }
- 
-diff -ruN u-boot-2015.01-rc3/board/freescale/ls1021aqds/ls1021aqds.c u-boot/board/freescale/ls1021aqds/ls1021aqds.c
---- u-boot-2015.01-rc3/board/freescale/ls1021aqds/ls1021aqds.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/freescale/ls1021aqds/ls1021aqds.c	2015-01-01 17:34:32.361501481 +0100
-@@ -8,12 +8,17 @@
- #include <i2c.h>
- #include <asm/io.h>
- #include <asm/arch/immap_ls102xa.h>
-+#include <asm/arch/ns_access.h>
- #include <asm/arch/clock.h>
- #include <asm/arch/fsl_serdes.h>
-+#include <asm/arch/ls102xa_stream_id.h>
-+#include <asm/pcie_layerscape.h>
-+#include <hwconfig.h>
- #include <mmc.h>
- #include <fsl_esdhc.h>
- #include <fsl_ifc.h>
- #include <fsl_sec.h>
-+#include <spl.h>
- 
- #include "../common/qixis.h"
- #include "ls1021aqds_qixis.h"
-@@ -21,9 +26,22 @@
- #include "../../../drivers/qe/qe.h"
- #endif
- 
-+#define PIN_MUX_SEL_CAN		0x03
-+#define PIN_MUX_SEL_IIC2	0xa0
-+#define PIN_MUX_SEL_RGMII	0x00
-+#define PIN_MUX_SEL_SAI		0x0c
-+#define PIN_MUX_SEL_SDHC	0x00
-+
-+#define SET_SDHC_MUX_SEL(reg, value)	((reg & 0x0f) | value)
-+#define SET_EC_MUX_SEL(reg, value)	((reg & 0xf0) | value)
- DECLARE_GLOBAL_DATA_PTR;
- 
- enum {
-+	MUX_TYPE_CAN,
-+	MUX_TYPE_IIC2,
-+	MUX_TYPE_RGMII,
-+	MUX_TYPE_SAI,
-+	MUX_TYPE_SDHC,
- 	MUX_TYPE_SD_PCI4,
- 	MUX_TYPE_SD_PC_SA_SG_SG,
- 	MUX_TYPE_SD_PC_SA_PC_SG,
-@@ -32,11 +50,20 @@
- 
- int checkboard(void)
- {
-+#ifndef CONFIG_QSPI_BOOT
- 	char buf[64];
-+#endif
-+#if !defined(CONFIG_SD_BOOT) && !defined(CONFIG_QSPI_BOOT)
- 	u8 sw;
-+#endif
- 
- 	puts("Board: LS1021AQDS\n");
- 
-+#ifdef CONFIG_SD_BOOT
-+	puts("SD\n");
-+#elif CONFIG_QSPI_BOOT
-+	puts("QSPI\n");
-+#else
- 	sw = QIXIS_READ(brdcfg[0]);
- 	sw = (sw & QIXIS_LBMAP_MASK) >> QIXIS_LBMAP_SHIFT;
- 
-@@ -50,13 +77,16 @@
- 		printf("IFCCard\n");
- 	else
- 		printf("invalid setting of SW%u\n", QIXIS_LBMAP_SWITCH);
-+#endif
- 
-+#ifndef CONFIG_QSPI_BOOT
- 	printf("Sys ID:0x%02x, Sys Ver: 0x%02x\n",
- 	       QIXIS_READ(id), QIXIS_READ(arch));
- 
- 	printf("FPGA:  v%d (%s), build %d\n",
- 	       (int)QIXIS_READ(scver), qixis_read_tag(buf),
- 	       (int)qixis_read_minor());
-+#endif
- 
- 	return 0;
- }
-@@ -101,8 +131,27 @@
- 	return 66666666;
- }
- 
-+int select_i2c_ch_pca9547(u8 ch)
-+{
-+	int ret;
-+
-+	ret = i2c_write(I2C_MUX_PCA_ADDR_PRI, 0, 1, &ch, 1);
-+	if (ret) {
-+		puts("PCA: failed to select proper channel\n");
-+		return ret;
-+	}
-+
-+	return 0;
-+}
-+
- int dram_init(void)
- {
-+	/*
-+	 * When resuming from deep sleep, the I2C channel may not be
-+	 * in the default channel. So, switch to the default channel
-+	 * before accessing DDR SPD.
-+	 */
-+	select_i2c_ch_pca9547(I2C_MUX_CH_DEFAULT);
- 	gd->ram_size = initdram(0);
- 
- 	return 0;
-@@ -121,19 +170,6 @@
- }
- #endif
- 
--int select_i2c_ch_pca9547(u8 ch)
--{
--	int ret;
--
--	ret = i2c_write(I2C_MUX_PCA_ADDR_PRI, 0, 1, &ch, 1);
--	if (ret) {
--		puts("PCA: failed to select proper channel\n");
--		return ret;
--	}
--
--	return 0;
--}
--
- int board_early_init_f(void)
- {
- 	struct ccsr_scfg *scfg = (struct ccsr_scfg *)CONFIG_SYS_FSL_SCFG_ADDR;
-@@ -148,6 +184,10 @@
- 	init_early_memctl_regs();
- #endif
- 
-+#ifdef CONFIG_FSL_QSPI
-+	out_be32(&scfg->qspi_cfg, SCFG_QSPI_CLKSEL);
-+#endif
-+
- 	/* Workaround for the issue that DDR could not respond to
- 	 * barrier transaction which is generated by executing DSB/ISB
- 	 * instruction. Set CCI-400 control override register to
-@@ -158,13 +198,75 @@
- 	return 0;
- }
- 
-+#ifdef CONFIG_SPL_BUILD
-+void board_init_f(ulong dummy)
-+{
-+	struct ccsr_cci400 *cci = (struct ccsr_cci400 *)CONFIG_SYS_CCI400_ADDR;
-+
-+#ifdef CONFIG_NAND_BOOT
-+	struct ccsr_gur __iomem *gur = (void *)CONFIG_SYS_FSL_GUTS_ADDR;
-+	u32 porsr1, pinctl;
-+
-+	/*
-+	 * There is LS1 SoC issue where NOR, FPGA are inaccessible during
-+	 * NAND boot because IFC signals > IFC_AD7 are not enabled.
-+	 * This workaround changes RCW source to make all signals enabled.
-+	 */
-+	porsr1 = in_be32(&gur->porsr1);
-+	pinctl = ((porsr1 & ~(DCFG_CCSR_PORSR1_RCW_MASK)) |
-+		 DCFG_CCSR_PORSR1_RCW_SRC_I2C);
-+	out_be32((unsigned int *)(CONFIG_SYS_DCSR_DCFG_ADDR + DCFG_DCSR_PORCR1),
-+		 pinctl);
-+#endif
-+
-+	/* Set global data pointer */
-+	gd = &gdata;
-+
-+	/* Clear the BSS */
-+	memset(__bss_start, 0, __bss_end - __bss_start);
-+
-+#ifdef CONFIG_FSL_IFC
-+	init_early_memctl_regs();
-+#endif
-+
-+	get_clocks();
-+
-+	preloader_console_init();
-+
-+#ifdef CONFIG_SPL_I2C_SUPPORT
-+	i2c_init_all();
-+#endif
-+	out_le32(&cci->ctrl_ord, CCI400_CTRLORD_TERM_BARRIER);
-+
-+	dram_init();
-+
-+	board_init_r(NULL, 0);
-+}
-+#endif
-+
- int config_board_mux(int ctrl_type)
- {
--	u8 reg12;
-+	u8 reg12, reg14;
- 
- 	reg12 = QIXIS_READ(brdcfg[12]);
-+	reg14 = QIXIS_READ(brdcfg[14]);
- 
- 	switch (ctrl_type) {
-+	case MUX_TYPE_CAN:
-+		reg14 = SET_EC_MUX_SEL(reg14, PIN_MUX_SEL_CAN);
-+		break;
-+	case MUX_TYPE_IIC2:
-+		reg14 = SET_SDHC_MUX_SEL(reg14, PIN_MUX_SEL_IIC2);
-+		break;
-+	case MUX_TYPE_RGMII:
-+		reg14 = SET_EC_MUX_SEL(reg14, PIN_MUX_SEL_RGMII);
-+		break;
-+	case MUX_TYPE_SAI:
-+		reg14 = SET_EC_MUX_SEL(reg14, PIN_MUX_SEL_SAI);
-+		break;
-+	case MUX_TYPE_SDHC:
-+		reg14 = SET_SDHC_MUX_SEL(reg14, PIN_MUX_SEL_SDHC);
-+		break;
- 	case MUX_TYPE_SD_PCI4:
- 		reg12 = 0x38;
- 		break;
-@@ -183,6 +285,7 @@
- 	}
- 
- 	QIXIS_WRITE(brdcfg[12], reg12);
-+	QIXIS_WRITE(brdcfg[14], reg14);
- 
- 	return 0;
- }
-@@ -216,15 +319,154 @@
- 	return 0;
- }
- 
--#if defined(CONFIG_MISC_INIT_R)
- int misc_init_r(void)
- {
-+	int conflict_flag;
-+
-+	/* some signals can not enable simultaneous*/
-+	conflict_flag = 0;
-+	if (hwconfig("sdhc"))
-+		conflict_flag++;
-+	if (hwconfig("iic2"))
-+		conflict_flag++;
-+	if (conflict_flag > 1) {
-+		printf("WARNING: pin conflict !\n");
-+		return 0;
-+	}
-+
-+	conflict_flag = 0;
-+	if (hwconfig("rgmii"))
-+		conflict_flag++;
-+	if (hwconfig("can"))
-+		conflict_flag++;
-+	if (hwconfig("sai"))
-+		conflict_flag++;
-+	if (conflict_flag > 1) {
-+		printf("WARNING: pin conflict !\n");
-+		return 0;
-+	}
-+
-+	if (hwconfig("can"))
-+		config_board_mux(MUX_TYPE_CAN);
-+	else if (hwconfig("rgmii"))
-+		config_board_mux(MUX_TYPE_RGMII);
-+	else if (hwconfig("sai"))
-+		config_board_mux(MUX_TYPE_SAI);
-+
-+	if (hwconfig("iic2"))
-+		config_board_mux(MUX_TYPE_IIC2);
-+	else if (hwconfig("sdhc"))
-+		config_board_mux(MUX_TYPE_SDHC);
-+
- #ifdef CONFIG_FSL_CAAM
- 	return sec_init();
- #endif
-+	return 0;
- }
-+
-+#ifdef CONFIG_LS102XA_NS_ACCESS
-+static struct csu_ns_dev ns_dev[] = {
-+	{ CSU_CSLX_PCIE2_IO, CSU_ALL_RW },
-+	{ CSU_CSLX_PCIE1_IO, CSU_ALL_RW },
-+	{ CSU_CSLX_MG2TPR_IP, CSU_ALL_RW },
-+	{ CSU_CSLX_IFC_MEM, CSU_ALL_RW },
-+	{ CSU_CSLX_OCRAM, CSU_ALL_RW },
-+	{ CSU_CSLX_GIC, CSU_ALL_RW },
-+	{ CSU_CSLX_PCIE1, CSU_ALL_RW },
-+	{ CSU_CSLX_OCRAM2, CSU_ALL_RW },
-+	{ CSU_CSLX_QSPI_MEM, CSU_ALL_RW },
-+	{ CSU_CSLX_PCIE2, CSU_ALL_RW },
-+	{ CSU_CSLX_SATA, CSU_ALL_RW },
-+	{ CSU_CSLX_USB3, CSU_ALL_RW },
-+	{ CSU_CSLX_SERDES, CSU_ALL_RW },
-+	{ CSU_CSLX_QDMA, CSU_ALL_RW },
-+	{ CSU_CSLX_LPUART2, CSU_ALL_RW },
-+	{ CSU_CSLX_LPUART1, CSU_ALL_RW },
-+	{ CSU_CSLX_LPUART4, CSU_ALL_RW },
-+	{ CSU_CSLX_LPUART3, CSU_ALL_RW },
-+	{ CSU_CSLX_LPUART6, CSU_ALL_RW },
-+	{ CSU_CSLX_LPUART5, CSU_ALL_RW },
-+	{ CSU_CSLX_DSPI2, CSU_ALL_RW },
-+	{ CSU_CSLX_DSPI1, CSU_ALL_RW },
-+	{ CSU_CSLX_QSPI, CSU_ALL_RW },
-+	{ CSU_CSLX_ESDHC, CSU_ALL_RW },
-+	{ CSU_CSLX_2D_ACE, CSU_ALL_RW },
-+	{ CSU_CSLX_IFC, CSU_ALL_RW },
-+	{ CSU_CSLX_I2C1, CSU_ALL_RW },
-+	{ CSU_CSLX_USB2, CSU_ALL_RW },
-+	{ CSU_CSLX_I2C3, CSU_ALL_RW },
-+	{ CSU_CSLX_I2C2, CSU_ALL_RW },
-+	{ CSU_CSLX_DUART2, CSU_ALL_RW },
-+	{ CSU_CSLX_DUART1, CSU_ALL_RW },
-+	{ CSU_CSLX_WDT2, CSU_ALL_RW },
-+	{ CSU_CSLX_WDT1, CSU_ALL_RW },
-+	{ CSU_CSLX_EDMA, CSU_ALL_RW },
-+	{ CSU_CSLX_SYS_CNT, CSU_ALL_RW },
-+	{ CSU_CSLX_DMA_MUX2, CSU_ALL_RW },
-+	{ CSU_CSLX_DMA_MUX1, CSU_ALL_RW },
-+	{ CSU_CSLX_DDR, CSU_ALL_RW },
-+	{ CSU_CSLX_QUICC, CSU_ALL_RW },
-+	{ CSU_CSLX_DCFG_CCU_RCPM, CSU_ALL_RW },
-+	{ CSU_CSLX_SECURE_BOOTROM, CSU_ALL_RW },
-+	{ CSU_CSLX_SFP, CSU_ALL_RW },
-+	{ CSU_CSLX_TMU, CSU_ALL_RW },
-+	{ CSU_CSLX_SECURE_MONITOR, CSU_ALL_RW },
-+	{ CSU_CSLX_RESERVED0, CSU_ALL_RW },
-+	{ CSU_CSLX_ETSEC1, CSU_ALL_RW },
-+	{ CSU_CSLX_SEC5_5, CSU_ALL_RW },
-+	{ CSU_CSLX_ETSEC3, CSU_ALL_RW },
-+	{ CSU_CSLX_ETSEC2, CSU_ALL_RW },
-+	{ CSU_CSLX_GPIO2, CSU_ALL_RW },
-+	{ CSU_CSLX_GPIO1, CSU_ALL_RW },
-+	{ CSU_CSLX_GPIO4, CSU_ALL_RW },
-+	{ CSU_CSLX_GPIO3, CSU_ALL_RW },
-+	{ CSU_CSLX_PLATFORM_CONT, CSU_ALL_RW },
-+	{ CSU_CSLX_CSU, CSU_ALL_RW },
-+	{ CSU_CSLX_ASRC, CSU_ALL_RW },
-+	{ CSU_CSLX_SPDIF, CSU_ALL_RW },
-+	{ CSU_CSLX_FLEXCAN2, CSU_ALL_RW },
-+	{ CSU_CSLX_FLEXCAN1, CSU_ALL_RW },
-+	{ CSU_CSLX_FLEXCAN4, CSU_ALL_RW },
-+	{ CSU_CSLX_FLEXCAN3, CSU_ALL_RW },
-+	{ CSU_CSLX_SAI2, CSU_ALL_RW },
-+	{ CSU_CSLX_SAI1, CSU_ALL_RW },
-+	{ CSU_CSLX_SAI4, CSU_ALL_RW },
-+	{ CSU_CSLX_SAI3, CSU_ALL_RW },
-+	{ CSU_CSLX_FTM2, CSU_ALL_RW },
-+	{ CSU_CSLX_FTM1, CSU_ALL_RW },
-+	{ CSU_CSLX_FTM4, CSU_ALL_RW },
-+	{ CSU_CSLX_FTM3, CSU_ALL_RW },
-+	{ CSU_CSLX_FTM6, CSU_ALL_RW },
-+	{ CSU_CSLX_FTM5, CSU_ALL_RW },
-+	{ CSU_CSLX_FTM8, CSU_ALL_RW },
-+	{ CSU_CSLX_FTM7, CSU_ALL_RW },
-+	{ CSU_CSLX_COP_DCSR, CSU_ALL_RW },
-+	{ CSU_CSLX_EPU, CSU_ALL_RW },
-+	{ CSU_CSLX_GDI, CSU_ALL_RW },
-+	{ CSU_CSLX_DDI, CSU_ALL_RW },
-+	{ CSU_CSLX_RESERVED1, CSU_ALL_RW },
-+	{ CSU_CSLX_USB3_PHY, CSU_ALL_RW },
-+	{ CSU_CSLX_RESERVED2, CSU_ALL_RW },
-+};
- #endif
- 
-+struct smmu_stream_id dev_stream_id[] = {
-+	{ 0x100, 0x01, "ETSEC MAC1" },
-+	{ 0x104, 0x02, "ETSEC MAC2" },
-+	{ 0x108, 0x03, "ETSEC MAC3" },
-+	{ 0x10c, 0x04, "PEX1" },
-+	{ 0x110, 0x05, "PEX2" },
-+	{ 0x114, 0x06, "qDMA" },
-+	{ 0x118, 0x07, "SATA" },
-+	{ 0x11c, 0x08, "USB3" },
-+	{ 0x120, 0x09, "QE" },
-+	{ 0x124, 0x0a, "eSDHC" },
-+	{ 0x128, 0x0b, "eMA" },
-+	{ 0x14c, 0x0c, "2D-ACE" },
-+	{ 0x150, 0x0d, "USB2" },
-+	{ 0x18c, 0x0e, "DEBUG" },
-+};
-+
- int board_init(void)
- {
- 	struct ccsr_cci400 *cci = (struct ccsr_cci400 *)CONFIG_SYS_CCI400_ADDR;
-@@ -247,6 +489,13 @@
- 	config_serdes_mux();
- #endif
- 
-+	ls102xa_config_smmu_stream_id(dev_stream_id,
-+				      ARRAY_SIZE(dev_stream_id));
-+
-+#ifdef CONFIG_LS102XA_NS_ACCESS
-+	enable_devices_ns_access(ns_dev, ARRAY_SIZE(ns_dev));
-+#endif
-+
- #ifdef CONFIG_U_QE
- 	u_qe_init();
- #endif
-@@ -258,6 +507,10 @@
- {
- 	ft_cpu_setup(blob, bd);
- 
-+#ifdef CONFIG_PCIE_LAYERSCAPE
-+	ft_pcie_setup(blob, bd);
-+#endif
-+
- 	return 0;
- }
- 
-diff -ruN u-boot-2015.01-rc3/board/freescale/ls1021aqds/ls102xa_pbi.cfg u-boot/board/freescale/ls1021aqds/ls102xa_pbi.cfg
---- u-boot-2015.01-rc3/board/freescale/ls1021aqds/ls102xa_pbi.cfg	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/freescale/ls1021aqds/ls102xa_pbi.cfg	2015-01-01 17:34:32.361501481 +0100
-@@ -0,0 +1,12 @@
-+#PBI commands
-+
-+09570200 ffffffff
-+09570158 00000300
-+8940007c 21f47300
-+
-+#Configure Scratch register
-+09ee0200 10000000
-+#Configure alternate space
-+09570158 00001000
-+#Flush PBL data
-+096100c0 000FFFFF
-diff -ruN u-boot-2015.01-rc3/board/freescale/ls1021aqds/ls102xa_rcw_nand.cfg u-boot/board/freescale/ls1021aqds/ls102xa_rcw_nand.cfg
---- u-boot-2015.01-rc3/board/freescale/ls1021aqds/ls102xa_rcw_nand.cfg	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/freescale/ls1021aqds/ls102xa_rcw_nand.cfg	2015-01-01 17:34:32.361501481 +0100
-@@ -0,0 +1,7 @@
-+#PBL preamble and RCW header
-+aa55aa55 01ee0100
-+# serdes protocol
-+0608000a 00000000 00000000 00000000
-+60000000 00407900 e0106a00 21046000
-+00000000 00000000 00000000 00038000
-+00000000 001b7200 00000000 00000000
-diff -ruN u-boot-2015.01-rc3/board/freescale/ls1021aqds/ls102xa_rcw_sd.cfg u-boot/board/freescale/ls1021aqds/ls102xa_rcw_sd.cfg
---- u-boot-2015.01-rc3/board/freescale/ls1021aqds/ls102xa_rcw_sd.cfg	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/freescale/ls1021aqds/ls102xa_rcw_sd.cfg	2015-01-01 17:34:32.361501481 +0100
-@@ -0,0 +1,14 @@
-+#PBL preamble and RCW header
-+aa55aa55 01ee0100
-+
-+#enable IFC, disable QSPI and DSPI
-+0608000a 00000000 00000000 00000000
-+60000000 00407900 60040a00 21046000
-+00000000 00000000 00000000 00038000
-+00000000 001b7200 00000000 00000000
-+
-+#disable IFC, enable QSPI and DSPI
-+#0608000a 00000000 00000000 00000000
-+#60000000 00407900 60040a00 21046000
-+#00000000 00000000 00000000 00038000
-+#20024800 001b7200 00000000 00000000
-diff -ruN u-boot-2015.01-rc3/board/freescale/ls1021aqds/MAINTAINERS u-boot/board/freescale/ls1021aqds/MAINTAINERS
---- u-boot-2015.01-rc3/board/freescale/ls1021aqds/MAINTAINERS	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/freescale/ls1021aqds/MAINTAINERS	2015-01-01 17:34:32.361501481 +0100
-@@ -6,3 +6,6 @@
- F:	configs/ls1021aqds_nor_defconfig
- F:	configs/ls1021aqds_ddr4_nor_defconfig
- F:	configs/ls1021aqds_nor_SECURE_BOOT_defconfig
-+F:	configs/ls1021aqds_sdcard_defconfig
-+F:	configs/ls1021aqds_qspi_defconfig
-+F:	configs/ls1021aqds_nand_defconfig
-diff -ruN u-boot-2015.01-rc3/board/freescale/ls1021atwr/ls1021atwr.c u-boot/board/freescale/ls1021atwr/ls1021atwr.c
---- u-boot-2015.01-rc3/board/freescale/ls1021atwr/ls1021atwr.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/freescale/ls1021atwr/ls1021atwr.c	2015-01-01 17:34:32.361501481 +0100
-@@ -8,8 +8,11 @@
- #include <i2c.h>
- #include <asm/io.h>
- #include <asm/arch/immap_ls102xa.h>
-+#include <asm/arch/ns_access.h>
- #include <asm/arch/clock.h>
- #include <asm/arch/fsl_serdes.h>
-+#include <asm/arch/ls102xa_stream_id.h>
-+#include <asm/pcie_layerscape.h>
- #include <mmc.h>
- #include <fsl_esdhc.h>
- #include <fsl_ifc.h>
-@@ -17,6 +20,7 @@
- #include <fsl_mdio.h>
- #include <tsec.h>
- #include <fsl_sec.h>
-+#include <spl.h>
- #ifdef CONFIG_U_QE
- #include "../../../drivers/qe/qe.h"
- #endif
-@@ -70,6 +74,7 @@
- 	u8 rev2;		/* Reserved */
- };
- 
-+#ifndef CONFIG_QSPI_BOOT
- static void convert_serdes_mux(int type, int need_reset);
- 
- void cpld_show(void)
-@@ -105,11 +110,14 @@
- 	       in_8(&cpld_data->serdes_mux));
- #endif
- }
-+#endif
- 
- int checkboard(void)
- {
- 	puts("Board: LS1021ATWR\n");
-+#ifndef CONFIG_QSPI_BOOT
- 	cpld_show();
-+#endif
- 
- 	return 0;
- }
-@@ -218,6 +226,7 @@
- }
- #endif
- 
-+#ifndef CONFIG_QSPI_BOOT
- int config_serdes_mux(void)
- {
- 	struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
-@@ -249,6 +258,7 @@
- 
- 	return 0;
- }
-+#endif
- 
- int board_early_init_f(void)
- {
-@@ -267,9 +277,135 @@
- 	out_be32(&scfg->pixclkcr, SCFG_PIXCLKCR_PXCKEN);
- #endif
- 
-+#ifdef CONFIG_FSL_QSPI
-+	out_be32(&scfg->qspi_cfg, SCFG_QSPI_CLKSEL);
-+#endif
-+
- 	return 0;
- }
- 
-+#ifdef CONFIG_SPL_BUILD
-+void board_init_f(ulong dummy)
-+{
-+	/* Set global data pointer */
-+	gd = &gdata;
-+
-+	/* Clear the BSS */
-+	memset(__bss_start, 0, __bss_end - __bss_start);
-+
-+	get_clocks();
-+
-+	preloader_console_init();
-+
-+	dram_init();
-+
-+	board_init_r(NULL, 0);
-+}
-+#endif
-+
-+#ifdef CONFIG_LS102XA_NS_ACCESS
-+static struct csu_ns_dev ns_dev[] = {
-+	{ CSU_CSLX_PCIE2_IO, CSU_ALL_RW },
-+	{ CSU_CSLX_PCIE1_IO, CSU_ALL_RW },
-+	{ CSU_CSLX_MG2TPR_IP, CSU_ALL_RW },
-+	{ CSU_CSLX_IFC_MEM, CSU_ALL_RW },
-+	{ CSU_CSLX_OCRAM, CSU_ALL_RW },
-+	{ CSU_CSLX_GIC, CSU_ALL_RW },
-+	{ CSU_CSLX_PCIE1, CSU_ALL_RW },
-+	{ CSU_CSLX_OCRAM2, CSU_ALL_RW },
-+	{ CSU_CSLX_QSPI_MEM, CSU_ALL_RW },
-+	{ CSU_CSLX_PCIE2, CSU_ALL_RW },
-+	{ CSU_CSLX_SATA, CSU_ALL_RW },
-+	{ CSU_CSLX_USB3, CSU_ALL_RW },
-+	{ CSU_CSLX_SERDES, CSU_ALL_RW },
-+	{ CSU_CSLX_QDMA, CSU_ALL_RW },
-+	{ CSU_CSLX_LPUART2, CSU_ALL_RW },
-+	{ CSU_CSLX_LPUART1, CSU_ALL_RW },
-+	{ CSU_CSLX_LPUART4, CSU_ALL_RW },
-+	{ CSU_CSLX_LPUART3, CSU_ALL_RW },
-+	{ CSU_CSLX_LPUART6, CSU_ALL_RW },
-+	{ CSU_CSLX_LPUART5, CSU_ALL_RW },
-+	{ CSU_CSLX_DSPI2, CSU_ALL_RW },
-+	{ CSU_CSLX_DSPI1, CSU_ALL_RW },
-+	{ CSU_CSLX_QSPI, CSU_ALL_RW },
-+	{ CSU_CSLX_ESDHC, CSU_ALL_RW },
-+	{ CSU_CSLX_2D_ACE, CSU_ALL_RW },
-+	{ CSU_CSLX_IFC, CSU_ALL_RW },
-+	{ CSU_CSLX_I2C1, CSU_ALL_RW },
-+	{ CSU_CSLX_USB2, CSU_ALL_RW },
-+	{ CSU_CSLX_I2C3, CSU_ALL_RW },
-+	{ CSU_CSLX_I2C2, CSU_ALL_RW },
-+	{ CSU_CSLX_DUART2, CSU_ALL_RW },
-+	{ CSU_CSLX_DUART1, CSU_ALL_RW },
-+	{ CSU_CSLX_WDT2, CSU_ALL_RW },
-+	{ CSU_CSLX_WDT1, CSU_ALL_RW },
-+	{ CSU_CSLX_EDMA, CSU_ALL_RW },
-+	{ CSU_CSLX_SYS_CNT, CSU_ALL_RW },
-+	{ CSU_CSLX_DMA_MUX2, CSU_ALL_RW },
-+	{ CSU_CSLX_DMA_MUX1, CSU_ALL_RW },
-+	{ CSU_CSLX_DDR, CSU_ALL_RW },
-+	{ CSU_CSLX_QUICC, CSU_ALL_RW },
-+	{ CSU_CSLX_DCFG_CCU_RCPM, CSU_ALL_RW },
-+	{ CSU_CSLX_SECURE_BOOTROM, CSU_ALL_RW },
-+	{ CSU_CSLX_SFP, CSU_ALL_RW },
-+	{ CSU_CSLX_TMU, CSU_ALL_RW },
-+	{ CSU_CSLX_SECURE_MONITOR, CSU_ALL_RW },
-+	{ CSU_CSLX_RESERVED0, CSU_ALL_RW },
-+	{ CSU_CSLX_ETSEC1, CSU_ALL_RW },
-+	{ CSU_CSLX_SEC5_5, CSU_ALL_RW },
-+	{ CSU_CSLX_ETSEC3, CSU_ALL_RW },
-+	{ CSU_CSLX_ETSEC2, CSU_ALL_RW },
-+	{ CSU_CSLX_GPIO2, CSU_ALL_RW },
-+	{ CSU_CSLX_GPIO1, CSU_ALL_RW },
-+	{ CSU_CSLX_GPIO4, CSU_ALL_RW },
-+	{ CSU_CSLX_GPIO3, CSU_ALL_RW },
-+	{ CSU_CSLX_PLATFORM_CONT, CSU_ALL_RW },
-+	{ CSU_CSLX_CSU, CSU_ALL_RW },
-+	{ CSU_CSLX_ASRC, CSU_ALL_RW },
-+	{ CSU_CSLX_SPDIF, CSU_ALL_RW },
-+	{ CSU_CSLX_FLEXCAN2, CSU_ALL_RW },
-+	{ CSU_CSLX_FLEXCAN1, CSU_ALL_RW },
-+	{ CSU_CSLX_FLEXCAN4, CSU_ALL_RW },
-+	{ CSU_CSLX_FLEXCAN3, CSU_ALL_RW },
-+	{ CSU_CSLX_SAI2, CSU_ALL_RW },
-+	{ CSU_CSLX_SAI1, CSU_ALL_RW },
-+	{ CSU_CSLX_SAI4, CSU_ALL_RW },
-+	{ CSU_CSLX_SAI3, CSU_ALL_RW },
-+	{ CSU_CSLX_FTM2, CSU_ALL_RW },
-+	{ CSU_CSLX_FTM1, CSU_ALL_RW },
-+	{ CSU_CSLX_FTM4, CSU_ALL_RW },
-+	{ CSU_CSLX_FTM3, CSU_ALL_RW },
-+	{ CSU_CSLX_FTM6, CSU_ALL_RW },
-+	{ CSU_CSLX_FTM5, CSU_ALL_RW },
-+	{ CSU_CSLX_FTM8, CSU_ALL_RW },
-+	{ CSU_CSLX_FTM7, CSU_ALL_RW },
-+	{ CSU_CSLX_COP_DCSR, CSU_ALL_RW },
-+	{ CSU_CSLX_EPU, CSU_ALL_RW },
-+	{ CSU_CSLX_GDI, CSU_ALL_RW },
-+	{ CSU_CSLX_DDI, CSU_ALL_RW },
-+	{ CSU_CSLX_RESERVED1, CSU_ALL_RW },
-+	{ CSU_CSLX_USB3_PHY, CSU_ALL_RW },
-+	{ CSU_CSLX_RESERVED2, CSU_ALL_RW },
-+};
-+#endif
-+
-+struct smmu_stream_id dev_stream_id[] = {
-+	{ 0x100, 0x01, "ETSEC MAC1" },
-+	{ 0x104, 0x02, "ETSEC MAC2" },
-+	{ 0x108, 0x03, "ETSEC MAC3" },
-+	{ 0x10c, 0x04, "PEX1" },
-+	{ 0x110, 0x05, "PEX2" },
-+	{ 0x114, 0x06, "qDMA" },
-+	{ 0x118, 0x07, "SATA" },
-+	{ 0x11c, 0x08, "USB3" },
-+	{ 0x120, 0x09, "QE" },
-+	{ 0x124, 0x0a, "eSDHC" },
-+	{ 0x128, 0x0b, "eMA" },
-+	{ 0x14c, 0x0c, "2D-ACE" },
-+	{ 0x150, 0x0d, "USB2" },
-+	{ 0x18c, 0x0e, "DEBUG" },
-+};
-+
- int board_init(void)
- {
- 	struct ccsr_cci400 *cci = (struct ccsr_cci400 *)CONFIG_SYS_CCI400_ADDR;
-@@ -284,8 +420,17 @@
- 
- #ifndef CONFIG_SYS_FSL_NO_SERDES
- 	fsl_serdes_init();
-+#ifndef CONFIG_QSPI_BOOT
- 	config_serdes_mux();
- #endif
-+#endif
-+
-+	ls102xa_config_smmu_stream_id(dev_stream_id,
-+				      ARRAY_SIZE(dev_stream_id));
-+
-+#ifdef CONFIG_LS102XA_NS_ACCESS
-+	enable_devices_ns_access(ns_dev, ARRAY_SIZE(ns_dev));
-+#endif
- 
- #ifdef CONFIG_U_QE
- 	u_qe_init();
-@@ -307,6 +452,10 @@
- {
- 	ft_cpu_setup(blob, bd);
- 
-+#ifdef CONFIG_PCIE_LAYERSCAPE
-+	ft_pcie_setup(blob, bd);
-+#endif
-+
- 	return 0;
- }
- 
-@@ -329,6 +478,7 @@
- 	return (((val) >> 8) & 0x00ff) | (((val) << 8) & 0xff00);
- }
- 
-+#ifndef CONFIG_QSPI_BOOT
- static void convert_flash_bank(char bank)
- {
- 	struct cpld_data *cpld_data = (void *)(CONFIG_SYS_CPLD_BASE);
-@@ -511,3 +661,4 @@
- 	"	-change lane C & lane D to PCIeX2\n"
- 	"\nWARNING: If you aren't familiar with the setting of serdes, don't try to change anything!\n"
- );
-+#endif
-diff -ruN u-boot-2015.01-rc3/board/freescale/ls1021atwr/ls102xa_pbi.cfg u-boot/board/freescale/ls1021atwr/ls102xa_pbi.cfg
---- u-boot-2015.01-rc3/board/freescale/ls1021atwr/ls102xa_pbi.cfg	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/freescale/ls1021atwr/ls102xa_pbi.cfg	2015-01-01 17:34:32.361501481 +0100
-@@ -0,0 +1,12 @@
-+#PBI commands
-+
-+09570200 ffffffff
-+09570158 00000300
-+8940007c 21f47300
-+
-+#Configure Scratch register
-+09ee0200 10000000
-+#Configure alternate space
-+09570158 00001000
-+#Flush PBL data
-+096100c0 000FFFFF
-diff -ruN u-boot-2015.01-rc3/board/freescale/ls1021atwr/ls102xa_rcw_sd.cfg u-boot/board/freescale/ls1021atwr/ls102xa_rcw_sd.cfg
---- u-boot-2015.01-rc3/board/freescale/ls1021atwr/ls102xa_rcw_sd.cfg	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/freescale/ls1021atwr/ls102xa_rcw_sd.cfg	2015-01-01 17:34:32.361501481 +0100
-@@ -0,0 +1,14 @@
-+#PBL preamble and RCW header
-+aa55aa55 01ee0100
-+
-+#enable IFC, disable QSPI and DSPI
-+0608000a 00000000 00000000 00000000
-+20000000 00407900 60040a00 21046000
-+00000000 00000000 00000000 00038000
-+00080000 881b7340 00000000 00000000
-+
-+#disable IFC, enable QSPI and DSPI
-+#0608000a 00000000 00000000 00000000
-+#20000000 00407900 60040a00 21046000
-+#00000000 00000000 00000000 00038000
-+#20084800 881b7340 00000000 00000000
-diff -ruN u-boot-2015.01-rc3/board/freescale/ls1021atwr/MAINTAINERS u-boot/board/freescale/ls1021atwr/MAINTAINERS
---- u-boot-2015.01-rc3/board/freescale/ls1021atwr/MAINTAINERS	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/freescale/ls1021atwr/MAINTAINERS	2015-01-01 17:34:32.361501481 +0100
-@@ -5,3 +5,5 @@
- F:	include/configs/ls1021atwr.h
- F:	configs/ls1021atwr_nor_defconfig
- F:	configs/ls1021atwr_nor_SECURE_BOOT_defconfig
-+F:	configs/ls1021atwr_sdcard_defconfig
-+F:	configs/ls1021atwr_qspi_defconfig
-diff -ruN u-boot-2015.01-rc3/board/freescale/mx6slevk/mx6slevk.c u-boot/board/freescale/mx6slevk/mx6slevk.c
---- u-boot-2015.01-rc3/board/freescale/mx6slevk/mx6slevk.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/freescale/mx6slevk/mx6slevk.c	2015-01-01 17:34:32.381501153 +0100
-@@ -20,6 +20,8 @@
- #include <fsl_esdhc.h>
- #include <mmc.h>
- #include <netdev.h>
-+#include <usb.h>
-+#include <usb/ehci-fsl.h>
- 
- DECLARE_GLOBAL_DATA_PTR;
- 
-@@ -234,10 +236,52 @@
- 	/* clear gpr1[14], gpr1[18:17] to select anatop clock */
- 	clrsetbits_le32(&iomuxc_regs->gpr[1], IOMUX_GPR1_FEC_MASK, 0);
- 
--	return enable_fec_anatop_clock(ENET_50MHz);
-+	return enable_fec_anatop_clock(ENET_50MHZ);
- }
- #endif
- 
-+#ifdef CONFIG_USB_EHCI_MX6
-+#define USB_OTHERREGS_OFFSET	0x800
-+#define UCTRL_PWR_POL		(1 << 9)
-+
-+static iomux_v3_cfg_t const usb_otg_pads[] = {
-+	/* OTG1 */
-+	MX6_PAD_KEY_COL4__USB_USBOTG1_PWR | MUX_PAD_CTRL(NO_PAD_CTRL),
-+	MX6_PAD_EPDC_PWRCOM__ANATOP_USBOTG1_ID | MUX_PAD_CTRL(NO_PAD_CTRL),
-+	/* OTG2 */
-+	MX6_PAD_KEY_COL5__USB_USBOTG2_PWR | MUX_PAD_CTRL(NO_PAD_CTRL)
-+};
-+
-+static void setup_usb(void)
-+{
-+	imx_iomux_v3_setup_multiple_pads(usb_otg_pads,
-+					 ARRAY_SIZE(usb_otg_pads));
-+}
-+
-+int board_usb_phy_mode(int port)
-+{
-+	if (port == 1)
-+		return USB_INIT_HOST;
-+	else
-+		return usb_phy_mode(port);
-+}
-+
-+int board_ehci_hcd_init(int port)
-+{
-+	u32 *usbnc_usb_ctrl;
-+
-+	if (port > 1)
-+		return -EINVAL;
-+
-+	usbnc_usb_ctrl = (u32 *)(USB_BASE_ADDR + USB_OTHERREGS_OFFSET +
-+				 port * 4);
-+
-+	/* Set Power polarity */
-+	setbits_le32(usbnc_usb_ctrl, UCTRL_PWR_POL);
-+
-+	return 0;
-+}
-+#endif
- 
- int board_early_init_f(void)
- {
-@@ -256,6 +300,11 @@
- #ifdef	CONFIG_FEC_MXC
- 	setup_fec();
- #endif
-+
-+#ifdef CONFIG_USB_EHCI_MX6
-+	setup_usb();
-+#endif
-+
- 	return 0;
- }
- 
-diff -ruN u-boot-2015.01-rc3/board/freescale/mx6sxsabresd/mx6sxsabresd.c u-boot/board/freescale/mx6sxsabresd/mx6sxsabresd.c
---- u-boot-2015.01-rc3/board/freescale/mx6sxsabresd/mx6sxsabresd.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/freescale/mx6sxsabresd/mx6sxsabresd.c	2015-01-01 17:34:32.381501153 +0100
-@@ -26,6 +26,8 @@
- #include <power/pmic.h>
- #include <power/pfuze100_pmic.h>
- #include "../common/pfuze.h"
-+#include <usb.h>
-+#include <usb/ehci-fsl.h>
- 
- DECLARE_GLOBAL_DATA_PTR;
- 
-@@ -168,7 +170,7 @@
- 	reg |= BM_ANADIG_PLL_ENET_REF_25M_ENABLE;
- 	writel(reg, &anatop->pll_enet);
- 
--	return enable_fec_anatop_clock(ENET_125MHz);
-+	return enable_fec_anatop_clock(ENET_125MHZ);
- }
- 
- int board_eth_init(bd_t *bis)
-@@ -212,6 +214,49 @@
- 	return 0;
- }
- 
-+#ifdef CONFIG_USB_EHCI_MX6
-+#define USB_OTHERREGS_OFFSET	0x800
-+#define UCTRL_PWR_POL		(1 << 9)
-+
-+static iomux_v3_cfg_t const usb_otg_pads[] = {
-+	/* OGT1 */
-+	MX6_PAD_GPIO1_IO09__USB_OTG1_PWR | MUX_PAD_CTRL(NO_PAD_CTRL),
-+	MX6_PAD_GPIO1_IO10__ANATOP_OTG1_ID | MUX_PAD_CTRL(NO_PAD_CTRL),
-+	/* OTG2 */
-+	MX6_PAD_GPIO1_IO12__USB_OTG2_PWR | MUX_PAD_CTRL(NO_PAD_CTRL)
-+};
-+
-+static void setup_usb(void)
-+{
-+	imx_iomux_v3_setup_multiple_pads(usb_otg_pads,
-+					 ARRAY_SIZE(usb_otg_pads));
-+}
-+
-+int board_usb_phy_mode(int port)
-+{
-+	if (port == 1)
-+		return USB_INIT_HOST;
-+	else
-+		return usb_phy_mode(port);
-+}
-+
-+int board_ehci_hcd_init(int port)
-+{
-+	u32 *usbnc_usb_ctrl;
-+
-+	if (port > 1)
-+		return -EINVAL;
-+
-+	usbnc_usb_ctrl = (u32 *)(USB_BASE_ADDR + USB_OTHERREGS_OFFSET +
-+				 port * 4);
-+
-+	/* Set Power polarity */
-+	setbits_le32(usbnc_usb_ctrl, UCTRL_PWR_POL);
-+
-+	return 0;
-+}
-+#endif
-+
- int board_phy_config(struct phy_device *phydev)
- {
- 	/*
-@@ -242,6 +287,10 @@
- 	/* Active high for ncp692 */
- 	gpio_direction_output(IMX_GPIO_NR(4, 16) , 1);
- 
-+#ifdef CONFIG_USB_EHCI_MX6
-+	setup_usb();
-+#endif
-+
- 	return 0;
- }
- 
-@@ -322,7 +371,6 @@
- 	return 0;
- }
- 
--
- int board_init(void)
- {
- 	/* Address of boot parameters */
-diff -ruN u-boot-2015.01-rc3/board/freescale/t104xrdb/ddr.c u-boot/board/freescale/t104xrdb/ddr.c
---- u-boot-2015.01-rc3/board/freescale/t104xrdb/ddr.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/freescale/t104xrdb/ddr.c	2015-01-01 17:34:32.389501022 +0100
-@@ -11,6 +11,7 @@
- #include <fsl_ddr_sdram.h>
- #include <fsl_ddr_dimm_params.h>
- #include <asm/fsl_law.h>
-+#include <asm/mpc85xx_gpio.h>
- #include "ddr.h"
- 
- DECLARE_GLOBAL_DATA_PTR;
-@@ -109,6 +110,19 @@
- 	popts->ddr_cdr2 = DDR_CDR2_ODT(DDR_CDR_ODT_75ohm);
- }
- 
-+#if defined(CONFIG_DEEP_SLEEP)
-+void board_mem_sleep_setup(void)
-+{
-+	void __iomem *cpld_base = (void *)CONFIG_SYS_CPLD_BASE;
-+
-+	/* does not provide HW signals for power management */
-+	clrbits_8(cpld_base + 0x17, 0x40);
-+	/* Disable MCKE isolation */
-+	gpio_set_value(2, 0);
-+	udelay(1);
-+}
-+#endif
-+
- phys_size_t initdram(int board_type)
- {
- 	phys_size_t dram_size;
-@@ -124,5 +138,10 @@
- #else
- 	dram_size =  fsl_ddr_sdram_size();
- #endif
-+
-+#if defined(CONFIG_DEEP_SLEEP) && !defined(CONFIG_SPL_BUILD)
-+	fsl_dp_resume();
-+#endif
-+
- 	return dram_size;
- }
-diff -ruN u-boot-2015.01-rc3/board/freescale/t104xrdb/spl.c u-boot/board/freescale/t104xrdb/spl.c
---- u-boot-2015.01-rc3/board/freescale/t104xrdb/spl.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/freescale/t104xrdb/spl.c	2015-01-01 17:34:32.389501022 +0100
-@@ -11,7 +11,7 @@
- #include <mmc.h>
- #include <fsl_esdhc.h>
- #include <spi_flash.h>
--#include <asm/mpc85xx_gpio.h>
-+#include "../common/sleep.h"
- 
- DECLARE_GLOBAL_DATA_PTR;
- 
-@@ -64,8 +64,8 @@
- 
- #ifdef CONFIG_DEEP_SLEEP
- 	/* disable the console if boot from deep sleep */
--	if (in_be32(&gur->scrtsr[0]) & (1 << 3))
--		gd->flags |= GD_FLG_SILENT | GD_FLG_DISABLE_CONSOLE;
-+	if (is_warm_boot())
-+		fsl_dp_disable_console();
- #endif
- 	/* compiler optimization barrier needed for GCC >= 3.4 */
- 	__asm__ __volatile__("" : : : "memory");
-@@ -132,16 +132,3 @@
- 	nand_boot();
- #endif
- }
--
--#ifdef CONFIG_DEEP_SLEEP
--void board_mem_sleep_setup(void)
--{
--	void __iomem *cpld_base = (void *)CONFIG_SYS_CPLD_BASE;
--
--	/* does not provide HW signals for power management */
--	clrbits_8(cpld_base + 0x17, 0x40);
--	/* Disable MCKE isolation */
--	gpio_set_value(2, 0);
--	udelay(1);
--}
--#endif
-diff -ruN u-boot-2015.01-rc3/board/freescale/t104xrdb/t104xrdb.c u-boot/board/freescale/t104xrdb/t104xrdb.c
---- u-boot-2015.01-rc3/board/freescale/t104xrdb/t104xrdb.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/freescale/t104xrdb/t104xrdb.c	2015-01-01 17:34:32.389501022 +0100
-@@ -17,8 +17,7 @@
- #include <asm/fsl_portals.h>
- #include <asm/fsl_liodn.h>
- #include <fm_eth.h>
--#include <asm/mpc85xx_gpio.h>
--
-+#include "../common/sleep.h"
- #include "t104xrdb.h"
- #include "cpld.h"
- 
-@@ -44,6 +43,16 @@
- 	return 0;
- }
- 
-+int board_early_init_f(void)
-+{
-+#if defined(CONFIG_DEEP_SLEEP)
-+	if (is_warm_boot())
-+		fsl_dp_disable_console();
-+#endif
-+
-+	return 0;
-+}
-+
- int board_early_init_r(void)
- {
- #ifdef CONFIG_SYS_FLASH_BASE
-@@ -113,14 +122,3 @@
- 
- 	return 0;
- }
--
--#ifdef CONFIG_DEEP_SLEEP
--void board_mem_sleep_setup(void)
--{
--	/* does not provide HW signals for power management */
--	CPLD_WRITE(misc_ctl_status, (CPLD_READ(misc_ctl_status) & ~0x40));
--	/* Disable MCKE isolation */
--	gpio_set_value(2, 0);
--	udelay(1);
--}
--#endif
-diff -ruN u-boot-2015.01-rc3/board/google/chromebook_link/Kconfig u-boot/board/google/chromebook_link/Kconfig
---- u-boot-2015.01-rc3/board/google/chromebook_link/Kconfig	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/google/chromebook_link/Kconfig	2015-01-01 17:34:32.401500826 +0100
-@@ -19,6 +19,7 @@
- 	select SOUTHBRIDGE_INTEL_C216
- 	select HAVE_ACPI_RESUME
- 	select MARK_GRAPHICS_MEM_WRCOMB
-+	select BOARD_ROMSIZE_KB_8192
- 
- config MMCONF_BASE_ADDRESS
- 	hex
-diff -ruN u-boot-2015.01-rc3/board/google/chromebook_link/link.c u-boot/board/google/chromebook_link/link.c
---- u-boot-2015.01-rc3/board/google/chromebook_link/link.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/google/chromebook_link/link.c	2015-01-01 17:34:32.401500826 +0100
-@@ -7,6 +7,9 @@
- #include <common.h>
- #include <cros_ec.h>
- #include <asm/gpio.h>
-+#include <asm/io.h>
-+#include <asm/pci.h>
-+#include <asm/arch/pch.h>
- 
- int arch_early_init_r(void)
- {
-@@ -121,3 +124,40 @@
- 
- 	return 0;
- }
-+
-+void setup_pch_gpios(u16 gpiobase, const struct pch_gpio_map *gpio)
-+{
-+	/* GPIO Set 1 */
-+	if (gpio->set1.level)
-+		outl(*((u32 *)gpio->set1.level), gpiobase + GP_LVL);
-+	if (gpio->set1.mode)
-+		outl(*((u32 *)gpio->set1.mode), gpiobase + GPIO_USE_SEL);
-+	if (gpio->set1.direction)
-+		outl(*((u32 *)gpio->set1.direction), gpiobase + GP_IO_SEL);
-+	if (gpio->set1.reset)
-+		outl(*((u32 *)gpio->set1.reset), gpiobase + GP_RST_SEL1);
-+	if (gpio->set1.invert)
-+		outl(*((u32 *)gpio->set1.invert), gpiobase + GPI_INV);
-+	if (gpio->set1.blink)
-+		outl(*((u32 *)gpio->set1.blink), gpiobase + GPO_BLINK);
-+
-+	/* GPIO Set 2 */
-+	if (gpio->set2.level)
-+		outl(*((u32 *)gpio->set2.level), gpiobase + GP_LVL2);
-+	if (gpio->set2.mode)
-+		outl(*((u32 *)gpio->set2.mode), gpiobase + GPIO_USE_SEL2);
-+	if (gpio->set2.direction)
-+		outl(*((u32 *)gpio->set2.direction), gpiobase + GP_IO_SEL2);
-+	if (gpio->set2.reset)
-+		outl(*((u32 *)gpio->set2.reset), gpiobase + GP_RST_SEL2);
-+
-+	/* GPIO Set 3 */
-+	if (gpio->set3.level)
-+		outl(*((u32 *)gpio->set3.level), gpiobase + GP_LVL3);
-+	if (gpio->set3.mode)
-+		outl(*((u32 *)gpio->set3.mode), gpiobase + GPIO_USE_SEL3);
-+	if (gpio->set3.direction)
-+		outl(*((u32 *)gpio->set3.direction), gpiobase + GP_IO_SEL3);
-+	if (gpio->set3.reset)
-+		outl(*((u32 *)gpio->set3.reset), gpiobase + GP_RST_SEL3);
-+}
-diff -ruN u-boot-2015.01-rc3/board/intel/crownbay/crownbay.c u-boot/board/intel/crownbay/crownbay.c
---- u-boot-2015.01-rc3/board/intel/crownbay/crownbay.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/intel/crownbay/crownbay.c	2015-01-01 17:34:32.405500760 +0100
-@@ -0,0 +1,32 @@
-+/*
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <asm/ibmpc.h>
-+#include <asm/pnp_def.h>
-+#include <netdev.h>
-+#include <smsc_lpc47m.h>
-+
-+#define SERIAL_DEV PNP_DEV(0x2e, 4)
-+
-+DECLARE_GLOBAL_DATA_PTR;
-+
-+int board_early_init_f(void)
-+{
-+	lpc47m_enable_serial(SERIAL_DEV, UART0_BASE);
-+
-+	return 0;
-+}
-+
-+void setup_pch_gpios(u16 gpiobase, const struct pch_gpio_map *gpio)
-+{
-+	return;
-+}
-+
-+int board_eth_init(bd_t *bis)
-+{
-+	return pci_eth_init(bis);
-+}
-diff -ruN u-boot-2015.01-rc3/board/intel/crownbay/Kconfig u-boot/board/intel/crownbay/Kconfig
---- u-boot-2015.01-rc3/board/intel/crownbay/Kconfig	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/intel/crownbay/Kconfig	2015-01-01 17:34:32.405500760 +0100
-@@ -0,0 +1,20 @@
-+if TARGET_CROWNBAY
-+
-+config SYS_BOARD
-+	default "crownbay"
-+
-+config SYS_VENDOR
-+	default "intel"
-+
-+config SYS_SOC
-+	default "queensbay"
-+
-+config SYS_CONFIG_NAME
-+	default "crownbay"
-+
-+config BOARD_SPECIFIC_OPTIONS # dummy
-+	def_bool y
-+	select INTEL_QUEENSBAY
-+	select BOARD_ROMSIZE_KB_1024
-+
-+endif
-diff -ruN u-boot-2015.01-rc3/board/intel/crownbay/MAINTAINERS u-boot/board/intel/crownbay/MAINTAINERS
---- u-boot-2015.01-rc3/board/intel/crownbay/MAINTAINERS	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/intel/crownbay/MAINTAINERS	2015-01-01 17:34:32.405500760 +0100
-@@ -0,0 +1,6 @@
-+INTEL CROWNBAY BOARD
-+M:	Bin Meng <bmeng.cn at gmail.com>
-+S:	Maintained
-+F:	board/intel/crownbay/
-+F:	include/configs/crownbay.h
-+F:	configs/crownbay_defconfig
-diff -ruN u-boot-2015.01-rc3/board/intel/crownbay/Makefile u-boot/board/intel/crownbay/Makefile
---- u-boot-2015.01-rc3/board/intel/crownbay/Makefile	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/intel/crownbay/Makefile	2015-01-01 17:34:32.405500760 +0100
-@@ -0,0 +1,7 @@
-+#
-+# Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+#
-+# SPDX-License-Identifier:	GPL-2.0+
-+#
-+
-+obj-y	+= crownbay.o start.o
-diff -ruN u-boot-2015.01-rc3/board/intel/crownbay/start.S u-boot/board/intel/crownbay/start.S
---- u-boot-2015.01-rc3/board/intel/crownbay/start.S	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/intel/crownbay/start.S	2015-01-01 17:34:32.405500760 +0100
-@@ -0,0 +1,9 @@
-+/*
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+.globl early_board_init
-+early_board_init:
-+	jmp	early_board_init_ret
-diff -ruN u-boot-2015.01-rc3/board/nvidia/cardhu/cardhu.c u-boot/board/nvidia/cardhu/cardhu.c
---- u-boot-2015.01-rc3/board/nvidia/cardhu/cardhu.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/nvidia/cardhu/cardhu.c	2015-01-01 17:34:32.449500039 +0100
-@@ -6,6 +6,7 @@
-  */
- 
- #include <common.h>
-+#include <dm.h>
- #include <asm/arch/pinmux.h>
- #include <asm/arch/gp_padctrl.h>
- #include "pinmux-config-cardhu.h"
-@@ -37,17 +38,23 @@
-  */
- void board_sdmmc_voltage_init(void)
- {
-+	struct udevice *dev;
- 	uchar reg, data_buffer[1];
-+	int ret;
- 	int i;
- 
--	i2c_set_bus_num(0);	/* PMU is on bus 0 */
-+	ret = i2c_get_chip_for_busnum(0, PMU_I2C_ADDRESS, &dev);
-+	if (ret) {
-+		debug("%s: Cannot find PMIC I2C chip\n", __func__);
-+		return;
-+	}
- 
- 	/* TPS659110: LDO5_REG = 3.3v, ACTIVE to SDMMC1 */
- 	data_buffer[0] = 0x65;
- 	reg = 0x32;
- 
- 	for (i = 0; i < MAX_I2C_RETRY; ++i) {
--		if (i2c_write(PMU_I2C_ADDRESS, reg, 1, data_buffer, 1))
-+		if (i2c_write(dev, reg, data_buffer, 1))
- 			udelay(100);
- 	}
- 
-@@ -56,7 +63,7 @@
- 	reg = 0x67;
- 
- 	for (i = 0; i < MAX_I2C_RETRY; ++i) {
--		if (i2c_write(PMU_I2C_ADDRESS, reg, 1, data_buffer, 1))
-+		if (i2c_write(dev, reg, data_buffer, 1))
- 			udelay(100);
- 	}
- }
-diff -ruN u-boot-2015.01-rc3/board/nvidia/common/board.c u-boot/board/nvidia/common/board.c
---- u-boot-2015.01-rc3/board/nvidia/common/board.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/nvidia/common/board.c	2015-01-01 17:34:32.453499973 +0100
-@@ -113,10 +113,6 @@
- 	power_det_init();
- 
- #ifdef CONFIG_SYS_I2C_TEGRA
--#ifndef CONFIG_SYS_I2C_INIT_BOARD
--#error "You must define CONFIG_SYS_I2C_INIT_BOARD to use i2c on Nvidia boards"
--#endif
--	i2c_init_board();
- # ifdef CONFIG_TEGRA_PMU
- 	if (pmu_set_nominal())
- 		debug("Failed to select nominal voltages\n");
-diff -ruN u-boot-2015.01-rc3/board/nvidia/dalmore/dalmore.c u-boot/board/nvidia/dalmore/dalmore.c
---- u-boot-2015.01-rc3/board/nvidia/dalmore/dalmore.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/nvidia/dalmore/dalmore.c	2015-01-01 17:34:32.453499973 +0100
-@@ -15,6 +15,7 @@
-  */
- 
- #include <common.h>
-+#include <dm.h>
- #include <asm/arch/pinmux.h>
- #include <asm/arch/gp_padctrl.h>
- #include "pinmux-config-dalmore.h"
-@@ -50,18 +51,21 @@
-  */
- void board_sdmmc_voltage_init(void)
- {
-+	struct udevice *dev;
- 	uchar reg, data_buffer[1];
- 	int ret;
- 
--	ret = i2c_set_bus_num(0);/* PMU is on bus 0 */
--	if (ret)
--		printf("%s: i2c_set_bus_num returned %d\n", __func__, ret);
-+	ret = i2c_get_chip_for_busnum(0, PMU_I2C_ADDRESS, &dev);
-+	if (ret) {
-+		debug("%s: Cannot find PMIC I2C chip\n", __func__);
-+		return;
-+	}
- 
- 	/* TPS65913: LDO9_VOLTAGE = 3.3V */
- 	data_buffer[0] = 0x31;
- 	reg = 0x61;
- 
--	ret = i2c_write(PMU_I2C_ADDRESS, reg, 1, data_buffer, 1);
-+	ret = i2c_write(dev, reg, data_buffer, 1);
- 	if (ret)
- 		printf("%s: PMU i2c_write %02X<-%02X returned %d\n",
- 			__func__, reg, data_buffer[0], ret);
-@@ -70,7 +74,7 @@
- 	data_buffer[0] = 0x01;
- 	reg = 0x60;
- 
--	ret = i2c_write(PMU_I2C_ADDRESS, reg, 1, data_buffer, 1);
-+	ret = i2c_write(dev, reg, data_buffer, 1);
- 	if (ret)
- 		printf("%s: PMU i2c_write %02X<-%02X returned %d\n",
- 			__func__, reg, data_buffer[0], ret);
-@@ -79,7 +83,12 @@
- 	data_buffer[0] = 0x03;
- 	reg = 0x14;
- 
--	ret = i2c_write(BAT_I2C_ADDRESS, reg, 1, data_buffer, 1);
-+	ret = i2c_get_chip_for_busnum(0, BAT_I2C_ADDRESS, &dev);
-+	if (ret) {
-+		debug("%s: Cannot find charger I2C chip\n", __func__);
-+		return;
-+	}
-+	ret = i2c_write(dev, reg, data_buffer, 1);
- 	if (ret)
- 		printf("%s: BAT i2c_write %02X<-%02X returned %d\n",
- 			__func__, reg, data_buffer[0], ret);
-diff -ruN u-boot-2015.01-rc3/board/nvidia/nyan-big/Kconfig u-boot/board/nvidia/nyan-big/Kconfig
---- u-boot-2015.01-rc3/board/nvidia/nyan-big/Kconfig	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/nvidia/nyan-big/Kconfig	2015-01-01 17:34:32.453499973 +0100
-@@ -0,0 +1,24 @@
-+if TARGET_NYAN_BIG
-+
-+config SYS_CPU
-+	string
-+	default "arm720t" if SPL_BUILD
-+	default "armv7" if !SPL_BUILD
-+
-+config SYS_BOARD
-+	string
-+	default "nyan-big"
-+
-+config SYS_VENDOR
-+	string
-+	default "nvidia"
-+
-+config SYS_SOC
-+	string
-+	default "tegra124"
-+
-+config SYS_CONFIG_NAME
-+	string
-+	default "nyan-big"
-+
-+endif
-diff -ruN u-boot-2015.01-rc3/board/nvidia/nyan-big/MAINTAINERS u-boot/board/nvidia/nyan-big/MAINTAINERS
---- u-boot-2015.01-rc3/board/nvidia/nyan-big/MAINTAINERS	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/nvidia/nyan-big/MAINTAINERS	2015-01-01 17:34:32.453499973 +0100
-@@ -0,0 +1,6 @@
-+NORRIN BOARD
-+M:	Allen Martin <amartin at nvidia.com>
-+S:	Maintained
-+F:	board/nvidia/nyan-big/
-+F:	include/configs/nyan-big.h
-+F:	configs/nyan-big_defconfig
-diff -ruN u-boot-2015.01-rc3/board/nvidia/nyan-big/Makefile u-boot/board/nvidia/nyan-big/Makefile
---- u-boot-2015.01-rc3/board/nvidia/nyan-big/Makefile	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/nvidia/nyan-big/Makefile	2015-01-01 17:34:32.453499973 +0100
-@@ -0,0 +1,9 @@
-+#
-+# (C) Copyright 2014
-+# NVIDIA Corporation <www.nvidia.com>
-+#
-+# SPDX-License-Identifier:     GPL-2.0+
-+#
-+
-+obj-y	+= ../venice2/as3722_init.o
-+obj-y	+= nyan-big.o
-diff -ruN u-boot-2015.01-rc3/board/nvidia/nyan-big/nyan-big.c u-boot/board/nvidia/nyan-big/nyan-big.c
---- u-boot-2015.01-rc3/board/nvidia/nyan-big/nyan-big.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/nvidia/nyan-big/nyan-big.c	2015-01-01 17:34:32.453499973 +0100
-@@ -0,0 +1,27 @@
-+/*
-+ * (C) Copyright 2014
-+ * NVIDIA Corporation <www.nvidia.com>
-+ *
-+ * SPDX-License-Identifier:     GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <asm/arch/gpio.h>
-+#include <asm/arch/pinmux.h>
-+#include "pinmux-config-nyan-big.h"
-+
-+/*
-+ * Routine: pinmux_init
-+ * Description: Do individual peripheral pinmux configs
-+ */
-+void pinmux_init(void)
-+{
-+	gpio_config_table(nyan_big_gpio_inits,
-+			  ARRAY_SIZE(nyan_big_gpio_inits));
-+
-+	pinmux_config_pingrp_table(nyan_big_pingrps,
-+				   ARRAY_SIZE(nyan_big_pingrps));
-+
-+	pinmux_config_drvgrp_table(nyan_big_drvgrps,
-+				   ARRAY_SIZE(nyan_big_drvgrps));
-+}
-diff -ruN u-boot-2015.01-rc3/board/nvidia/nyan-big/pinmux-config-nyan-big.h u-boot/board/nvidia/nyan-big/pinmux-config-nyan-big.h
---- u-boot-2015.01-rc3/board/nvidia/nyan-big/pinmux-config-nyan-big.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/nvidia/nyan-big/pinmux-config-nyan-big.h	2015-01-01 17:34:32.453499973 +0100
-@@ -0,0 +1,287 @@
-+/*
-+ * Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved.
-+ *
-+ * SPDX-License-Identifier: GPL-2.0+
-+ */
-+
-+#ifndef _PINMUX_CONFIG_NYAN_BIG_H_
-+#define _PINMUX_CONFIG_NYAN_BIG_H_
-+
-+#define GPIO_INIT(_gpio, _init)				\
-+	{						\
-+		.gpio	= GPIO_P##_gpio,		\
-+		.init	= TEGRA_GPIO_INIT_##_init,	\
-+	}
-+
-+static const struct tegra_gpio_config nyan_big_gpio_inits[] = {
-+	/*        gpio, init_val */
-+	GPIO_INIT(A0,   IN),
-+	GPIO_INIT(C7,   IN),
-+	GPIO_INIT(G0,   IN),
-+	GPIO_INIT(G1,   IN),
-+	GPIO_INIT(G2,   IN),
-+	GPIO_INIT(G3,   IN),
-+	GPIO_INIT(H2,   IN),
-+	GPIO_INIT(H4,   IN),
-+	GPIO_INIT(H6,   IN),
-+	GPIO_INIT(H7,   OUT1),
-+	GPIO_INIT(I0,   IN),
-+	GPIO_INIT(I1,   IN),
-+	GPIO_INIT(I5,   OUT1),
-+	GPIO_INIT(I6,   IN),
-+	GPIO_INIT(I7,   IN),
-+	GPIO_INIT(J0,   IN),
-+	GPIO_INIT(J7,   IN),
-+	GPIO_INIT(K1,   OUT0),
-+	GPIO_INIT(K2,   IN),
-+	GPIO_INIT(K4,   OUT0),
-+	GPIO_INIT(K6,   OUT0),
-+	GPIO_INIT(K7,   IN),
-+	GPIO_INIT(N7,   IN),
-+	GPIO_INIT(P2,   OUT0),
-+	GPIO_INIT(Q0,   IN),
-+	GPIO_INIT(Q2,   IN),
-+	GPIO_INIT(Q3,   IN),
-+	GPIO_INIT(Q6,   IN),
-+	GPIO_INIT(Q7,   IN),
-+	GPIO_INIT(R0,   OUT0),
-+	GPIO_INIT(R1,   IN),
-+	GPIO_INIT(R4,   IN),
-+	GPIO_INIT(R7,   IN),
-+	GPIO_INIT(S3,   OUT0),
-+	GPIO_INIT(S4,   OUT0),
-+	GPIO_INIT(S7,   IN),
-+	GPIO_INIT(T1,   IN),
-+	GPIO_INIT(U4,   IN),
-+	GPIO_INIT(U5,   IN),
-+	GPIO_INIT(U6,   IN),
-+	GPIO_INIT(V0,   IN),
-+	GPIO_INIT(W3,   IN),
-+	GPIO_INIT(X1,   IN),
-+	GPIO_INIT(X4,   IN),
-+	GPIO_INIT(X7,   OUT0),
-+};
-+
-+#define PINCFG(_pingrp, _mux, _pull, _tri, _io, _od, _rcv_sel)	\
-+	{							\
-+		.pingrp		= PMUX_PINGRP_##_pingrp,	\
-+		.func		= PMUX_FUNC_##_mux,		\
-+		.pull		= PMUX_PULL_##_pull,		\
-+		.tristate	= PMUX_TRI_##_tri,		\
-+		.io		= PMUX_PIN_##_io,		\
-+		.od		= PMUX_PIN_OD_##_od,		\
-+		.rcv_sel	= PMUX_PIN_RCV_SEL_##_rcv_sel,	\
-+		.lock		= PMUX_PIN_LOCK_DEFAULT,	\
-+		.ioreset	= PMUX_PIN_IO_RESET_DEFAULT,	\
-+	}
-+
-+static const struct pmux_pingrp_config nyan_big_pingrps[] = {
-+	/*     pingrp,                 mux,         pull,   tri,      e_input, od,      rcv_sel */
-+	PINCFG(CLK_32K_OUT_PA0,        DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(UART3_CTS_N_PA1,        GMI,         DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(DAP2_FS_PA2,            I2S1,        NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(DAP2_SCLK_PA3,          I2S1,        NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(DAP2_DIN_PA4,           I2S1,        NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(DAP2_DOUT_PA5,          I2S1,        NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(SDMMC3_CLK_PA6,         SDMMC3,      NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(SDMMC3_CMD_PA7,         SDMMC3,      UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PB0,                    RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PB1,                    RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(SDMMC3_DAT3_PB4,        SDMMC3,      UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(SDMMC3_DAT2_PB5,        SDMMC3,      UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(SDMMC3_DAT1_PB6,        SDMMC3,      UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(SDMMC3_DAT0_PB7,        SDMMC3,      UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(UART3_RTS_N_PC0,        GMI,         DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(UART2_TXD_PC2,          IRDA,        DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(UART2_RXD_PC3,          IRDA,        DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(GEN1_I2C_SCL_PC4,       I2C1,        NORMAL, NORMAL,   INPUT,   ENABLE,  DEFAULT),
-+	PINCFG(GEN1_I2C_SDA_PC5,       I2C1,        NORMAL, NORMAL,   INPUT,   ENABLE,  DEFAULT),
-+	PINCFG(PC7,                    DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PG0,                    DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PG1,                    DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PG2,                    DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PG3,                    DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PG4,                    SPI4,        NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PG5,                    SPI4,        NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PG6,                    SPI4,        NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PG7,                    SPI4,        NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PH0,                    GMI,         DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PH1,                    PWM1,        NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PH2,                    DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PH3,                    GMI,         DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PH4,                    DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PH5,                    RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PH6,                    DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PH7,                    DEFAULT,     NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PI0,                    DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PI1,                    DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PI2,                    RSVD4,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PI3,                    SPI4,        NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PI4,                    GMI,         DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PI5,                    DEFAULT,     UP,     NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PI6,                    DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PI7,                    DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PJ0,                    DEFAULT,     UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PJ2,                    RSVD1,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(UART2_CTS_N_PJ5,        GMI,         DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(UART2_RTS_N_PJ6,        GMI,         DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PJ7,                    DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PK0,                    RSVD1,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PK1,                    DEFAULT,     NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PK2,                    DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PK3,                    GMI,         DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PK4,                    DEFAULT,     UP,     NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(SPDIF_OUT_PK5,          RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(SPDIF_IN_PK6,           DEFAULT,     DOWN,   NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PK7,                    DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(DAP1_FS_PN0,            RSVD4,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(DAP1_DIN_PN1,           RSVD4,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(DAP1_DOUT_PN2,          I2S0,        DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(DAP1_SCLK_PN3,          RSVD4,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(USB_VBUS_EN0_PN4,       USB,         NORMAL, NORMAL,   INPUT,   ENABLE,  DEFAULT),
-+	PINCFG(USB_VBUS_EN1_PN5,       USB,         NORMAL, NORMAL,   INPUT,   ENABLE,  DEFAULT),
-+	PINCFG(HDMI_INT_PN7,           DEFAULT,     DOWN,   NORMAL,   INPUT,   DEFAULT, NORMAL),
-+	PINCFG(ULPI_DATA7_PO0,         ULPI,        DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(ULPI_DATA0_PO1,         ULPI,        DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(ULPI_DATA1_PO2,         ULPI,        DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(ULPI_DATA2_PO3,         ULPI,        DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(ULPI_DATA3_PO4,         ULPI,        DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(ULPI_DATA4_PO5,         ULPI,        DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(ULPI_DATA5_PO6,         ULPI,        DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(ULPI_DATA6_PO7,         ULPI,        DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(DAP3_FS_PP0,            I2S2,        DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(DAP3_DIN_PP1,           I2S2,        DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(DAP3_DOUT_PP2,          DEFAULT,     NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(DAP3_SCLK_PP3,          RSVD3,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(DAP4_FS_PP4,            RSVD4,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(DAP4_DIN_PP5,           RSVD3,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(DAP4_DOUT_PP6,          RSVD4,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(DAP4_SCLK_PP7,          RSVD3,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(KB_COL0_PQ0,            DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(KB_COL1_PQ1,            RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(KB_COL2_PQ2,            DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(KB_COL3_PQ3,            DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(KB_COL4_PQ4,            SDMMC3,      UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(KB_COL5_PQ5,            RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(KB_COL6_PQ6,            DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(KB_COL7_PQ7,            DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(KB_ROW0_PR0,            DEFAULT,     NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(KB_ROW1_PR1,            DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(KB_ROW2_PR2,            RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(KB_ROW3_PR3,            KBC,         DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(KB_ROW4_PR4,            DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(KB_ROW5_PR5,            RSVD3,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(KB_ROW6_PR6,            KBC,         DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(KB_ROW7_PR7,            DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(KB_ROW8_PS0,            RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(KB_ROW9_PS1,            UARTA,       DOWN,   NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(KB_ROW10_PS2,           UARTA,       NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(KB_ROW11_PS3,           DEFAULT,     NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(KB_ROW12_PS4,           DEFAULT,     NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(KB_ROW13_PS5,           RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(KB_ROW14_PS6,           RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(KB_ROW15_PS7,           DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(KB_ROW16_PT0,           RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(KB_ROW17_PT1,           DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(GEN2_I2C_SCL_PT5,       I2C2,        NORMAL, NORMAL,   INPUT,   ENABLE,  DEFAULT),
-+	PINCFG(GEN2_I2C_SDA_PT6,       I2C2,        NORMAL, NORMAL,   INPUT,   ENABLE,  DEFAULT),
-+	PINCFG(SDMMC4_CMD_PT7,         SDMMC4,      NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PU0,                    RSVD4,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PU1,                    RSVD1,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PU2,                    RSVD1,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PU3,                    GMI,         DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PU4,                    DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PU5,                    DEFAULT,     UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PU6,                    DEFAULT,     UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PV0,                    DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PV1,                    RSVD1,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(SDMMC3_CD_N_PV2,        SDMMC3,      UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(SDMMC1_WP_N_PV3,        SDMMC1,      DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(DDC_SCL_PV4,            I2C4,        NORMAL, NORMAL,   INPUT,   DEFAULT, NORMAL),
-+	PINCFG(DDC_SDA_PV5,            I2C4,        NORMAL, NORMAL,   INPUT,   DEFAULT, NORMAL),
-+	PINCFG(GPIO_W2_AUD_PW2,        RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(GPIO_W3_AUD_PW3,        DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(DAP_MCLK1_PW4,          EXTPERIPH1,  NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(CLK2_OUT_PW5,           RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(UART3_TXD_PW6,          RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(UART3_RXD_PW7,          RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(DVFS_PWM_PX0,           CLDVFS,      NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(GPIO_X1_AUD_PX1,        DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(DVFS_CLK_PX2,           CLDVFS,      NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(GPIO_X3_AUD_PX3,        RSVD4,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(GPIO_X4_AUD_PX4,        DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(GPIO_X5_AUD_PX5,        RSVD4,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(GPIO_X6_AUD_PX6,        GMI,         DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(GPIO_X7_AUD_PX7,        DEFAULT,     NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(ULPI_CLK_PY0,           SPI1,        NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(ULPI_DIR_PY1,           SPI1,        NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(ULPI_NXT_PY2,           SPI1,        NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(ULPI_STP_PY3,           SPI1,        NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(SDMMC1_DAT3_PY4,        SDMMC1,      UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(SDMMC1_DAT2_PY5,        SDMMC1,      UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(SDMMC1_DAT1_PY6,        SDMMC1,      UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(SDMMC1_DAT0_PY7,        SDMMC1,      UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(SDMMC1_CLK_PZ0,         SDMMC1,      NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(SDMMC1_CMD_PZ1,         SDMMC1,      UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PWR_I2C_SCL_PZ6,        I2CPWR,      NORMAL, NORMAL,   INPUT,   ENABLE,  DEFAULT),
-+	PINCFG(PWR_I2C_SDA_PZ7,        I2CPWR,      NORMAL, NORMAL,   INPUT,   ENABLE,  DEFAULT),
-+	PINCFG(SDMMC4_DAT0_PAA0,       SDMMC4,      UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(SDMMC4_DAT1_PAA1,       SDMMC4,      UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(SDMMC4_DAT2_PAA2,       SDMMC4,      UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(SDMMC4_DAT3_PAA3,       SDMMC4,      UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(SDMMC4_DAT4_PAA4,       SDMMC4,      UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(SDMMC4_DAT5_PAA5,       SDMMC4,      UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(SDMMC4_DAT6_PAA6,       SDMMC4,      UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(SDMMC4_DAT7_PAA7,       SDMMC4,      UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PBB0,                   VGP6,        DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(CAM_I2C_SCL_PBB1,       RSVD3,       DOWN,   TRISTATE, OUTPUT,  DISABLE, DEFAULT),
-+	PINCFG(CAM_I2C_SDA_PBB2,       RSVD3,       DOWN,   TRISTATE, OUTPUT,  DISABLE, DEFAULT),
-+	PINCFG(PBB3,                   VGP3,        DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PBB4,                   VGP4,        DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PBB5,                   RSVD3,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PBB6,                   RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PBB7,                   RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(CAM_MCLK_PCC0,          VI,          DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PCC1,                   RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PCC2,                   RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(SDMMC4_CLK_PCC4,        SDMMC4,      NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(CLK2_REQ_PCC5,          RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PEX_L0_RST_N_PDD1,      RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PEX_L0_CLKREQ_N_PDD2,   RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PEX_WAKE_N_PDD3,        RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PEX_L1_RST_N_PDD5,      RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PEX_L1_CLKREQ_N_PDD6,   RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(CLK3_OUT_PEE0,          RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(CLK3_REQ_PEE1,          RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(DAP_MCLK1_REQ_PEE2,     RSVD4,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(HDMI_CEC_PEE3,          CEC,         NORMAL, NORMAL,   INPUT,   ENABLE,  DEFAULT),
-+	PINCFG(SDMMC3_CLK_LB_OUT_PEE4, SDMMC3,      NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(SDMMC3_CLK_LB_IN_PEE5,  SDMMC3,      UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(DP_HPD_PFF0,            DP,          UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(USB_VBUS_EN2_PFF1,      RSVD2,       DOWN,   TRISTATE, OUTPUT,  DISABLE, DEFAULT),
-+	PINCFG(PFF2,                   RSVD2,       DOWN,   TRISTATE, OUTPUT,  DISABLE, DEFAULT),
-+	PINCFG(CORE_PWR_REQ,           PWRON,       NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(CPU_PWR_REQ,            CPU,         NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PWR_INT_N,              PMI,         NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(RESET_OUT_N,            RESET_OUT_N, NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(OWR,                    RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, NORMAL),
-+	PINCFG(CLK_32K_IN,             CLK,         NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(JTAG_RTCK,              RTCK,        NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+};
-+
-+#define DRVCFG(_drvgrp, _slwf, _slwr, _drvup, _drvdn, _lpmd, _schmt, _hsm) \
-+	{						\
-+		.drvgrp = PMUX_DRVGRP_##_drvgrp,	\
-+		.slwf   = _slwf,			\
-+		.slwr   = _slwr,			\
-+		.drvup  = _drvup,			\
-+		.drvdn  = _drvdn,			\
-+		.lpmd   = PMUX_LPMD_##_lpmd,		\
-+		.schmt  = PMUX_SCHMT_##_schmt,		\
-+		.hsm    = PMUX_HSM_##_hsm,		\
-+	}
-+
-+static const struct pmux_drvgrp_config nyan_big_drvgrps[] = {
-+};
-+
-+#endif /* PINMUX_CONFIG_NYAN_BIG_H */
-diff -ruN u-boot-2015.01-rc3/board/nvidia/venice2/as3722_init.h u-boot/board/nvidia/venice2/as3722_init.h
---- u-boot-2015.01-rc3/board/nvidia/venice2/as3722_init.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/nvidia/venice2/as3722_init.h	2015-01-01 17:34:32.453499973 +0100
-@@ -18,7 +18,7 @@
- #define AS3722_LDO6VOLTAGE_REG	0x16	/* VDD_SDMMC */
- #define AS3722_LDCONTROL_REG	0x4E
- 
--#ifdef CONFIG_TARGET_JETSON_TK1
-+#if defined(CONFIG_TARGET_JETSON_TK1) || defined(CONFIG_TARGET_NYAN_BIG)
- #define AS3722_SD0VOLTAGE_DATA	(0x3C00 | AS3722_SD0VOLTAGE_REG)
- #else
- #define AS3722_SD0VOLTAGE_DATA	(0x2800 | AS3722_SD0VOLTAGE_REG)
-diff -ruN u-boot-2015.01-rc3/board/nvidia/whistler/whistler.c u-boot/board/nvidia/whistler/whistler.c
---- u-boot-2015.01-rc3/board/nvidia/whistler/whistler.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/nvidia/whistler/whistler.c	2015-01-01 17:34:32.453499973 +0100
-@@ -6,6 +6,7 @@
-  */
- 
- #include <common.h>
-+#include <dm.h>
- #include <asm/io.h>
- #include <asm/arch/tegra.h>
- #include <asm/arch/clock.h>
-@@ -21,23 +22,26 @@
-  */
- void pin_mux_mmc(void)
- {
-+	struct udevice *dev;
- 	uchar val;
- 	int ret;
- 
- 	/* Turn on MAX8907B LDO12 to 2.8V for J40 power */
--	ret = i2c_set_bus_num(0);
--	if (ret)
--		printf("i2c_set_bus_num failed: %d\n", ret);
-+	ret = i2c_get_chip_for_busnum(0, 0x3c, &dev);
-+	if (ret) {
-+		printf("%s: Cannot find MAX8907B I2C chip\n", __func__);
-+		return;
-+	}
- 	val = 0x29;
--	ret = i2c_write(0x3c, 0x46, 1, &val, 1);
-+	ret = i2c_write(dev, 0x46, &val, 1);
- 	if (ret)
- 		printf("i2c_write 0 0x3c 0x46 failed: %d\n", ret);
- 	val = 0x00;
--	ret = i2c_write(0x3c, 0x45, 1, &val, 1);
-+	ret = i2c_write(dev, 0x45, &val, 1);
- 	if (ret)
- 		printf("i2c_write 0 0x3c 0x45 failed: %d\n", ret);
- 	val = 0x1f;
--	ret = i2c_write(0x3c, 0x44, 1, &val, 1);
-+	ret = i2c_write(dev, 0x44, &val, 1);
- 	if (ret)
- 		printf("i2c_write 0 0x3c 0x44 failed: %d\n", ret);
- 
-@@ -49,6 +53,7 @@
- /* this is a weak define that we are overriding */
- void pin_mux_usb(void)
- {
-+	struct udevice *dev;
- 	uchar val;
- 	int ret;
- 
-@@ -59,15 +64,17 @@
- 	 */
- 
- 	/* Turn on TAC6416's GPIO 0+1 for USB1/3's VBUS */
--	ret = i2c_set_bus_num(0);
--	if (ret)
--		printf("i2c_set_bus_num failed: %d\n", ret);
-+	ret = i2c_get_chip_for_busnum(0, 0x20, &dev);
-+	if (ret) {
-+		printf("%s: Cannot find TAC6416 I2C chip\n", __func__);
-+		return;
-+	}
- 	val = 0x03;
--	ret = i2c_write(0x20, 2, 1, &val, 1);
-+	ret = i2c_write(dev, 2, &val, 1);
- 	if (ret)
- 		printf("i2c_write 0 0x20 2 failed: %d\n", ret);
- 	val = 0xfc;
--	ret = i2c_write(0x20, 6, 1, &val, 1);
-+	ret = i2c_write(dev, 6, &val, 1);
- 	if (ret)
- 		printf("i2c_write 0 0x20 6 failed: %d\n", ret);
- }
-diff -ruN u-boot-2015.01-rc3/board/raspberrypi/rpi/rpi.c u-boot/board/raspberrypi/rpi/rpi.c
---- u-boot-2015.01-rc3/board/raspberrypi/rpi/rpi.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/raspberrypi/rpi/rpi.c	2015-01-01 17:34:32.469499711 +0100
-@@ -24,6 +24,7 @@
- #include <asm/arch/mbox.h>
- #include <asm/arch/sdhci.h>
- #include <asm/global_data.h>
-+#include <dm/platform_data/serial_pl01x.h>
- 
- DECLARE_GLOBAL_DATA_PTR;
- 
-@@ -36,6 +37,17 @@
- 	.platdata = &gpio_platdata,
- };
- 
-+static const struct pl01x_serial_platdata serial_platdata = {
-+	.base = 0x20201000,
-+	.type = TYPE_PL011,
-+	.clock = 3000000,
-+};
-+
-+U_BOOT_DEVICE(bcm2835_serials) = {
-+	.name = "serial_pl01x",
-+	.platdata = &serial_platdata,
-+};
-+
- struct msg_get_arm_mem {
- 	struct bcm2835_mbox_hdr hdr;
- 	struct bcm2835_mbox_tag_get_arm_mem get_arm_mem;
-@@ -70,58 +82,82 @@
- static const struct {
- 	const char *name;
- 	const char *fdtfile;
-+	bool has_onboard_eth;
- } models[] = {
-+	[0] = {
-+		"Unknown model",
-+		"bcm2835-rpi-other.dtb",
-+		false,
-+	},
- 	[BCM2835_BOARD_REV_B_I2C0_2] = {
- 		"Model B (no P5)",
- 		"bcm2835-rpi-b-i2c0.dtb",
-+		true,
- 	},
- 	[BCM2835_BOARD_REV_B_I2C0_3] = {
- 		"Model B (no P5)",
- 		"bcm2835-rpi-b-i2c0.dtb",
-+		true,
- 	},
- 	[BCM2835_BOARD_REV_B_I2C1_4] = {
- 		"Model B",
- 		"bcm2835-rpi-b.dtb",
-+		true,
- 	},
- 	[BCM2835_BOARD_REV_B_I2C1_5] = {
- 		"Model B",
- 		"bcm2835-rpi-b.dtb",
-+		true,
- 	},
- 	[BCM2835_BOARD_REV_B_I2C1_6] = {
- 		"Model B",
- 		"bcm2835-rpi-b.dtb",
-+		true,
- 	},
- 	[BCM2835_BOARD_REV_A_7] = {
- 		"Model A",
- 		"bcm2835-rpi-a.dtb",
-+		false,
- 	},
- 	[BCM2835_BOARD_REV_A_8] = {
- 		"Model A",
- 		"bcm2835-rpi-a.dtb",
-+		false,
- 	},
- 	[BCM2835_BOARD_REV_A_9] = {
- 		"Model A",
- 		"bcm2835-rpi-a.dtb",
-+		false,
- 	},
- 	[BCM2835_BOARD_REV_B_REV2_d] = {
- 		"Model B rev2",
- 		"bcm2835-rpi-b-rev2.dtb",
-+		true,
- 	},
- 	[BCM2835_BOARD_REV_B_REV2_e] = {
- 		"Model B rev2",
- 		"bcm2835-rpi-b-rev2.dtb",
-+		true,
- 	},
- 	[BCM2835_BOARD_REV_B_REV2_f] = {
- 		"Model B rev2",
- 		"bcm2835-rpi-b-rev2.dtb",
-+		true,
- 	},
- 	[BCM2835_BOARD_REV_B_PLUS] = {
- 		"Model B+",
- 		"bcm2835-rpi-b-plus.dtb",
-+		true,
- 	},
- 	[BCM2835_BOARD_REV_CM] = {
- 		"Compute Module",
- 		"bcm2835-rpi-cm.dtb",
-+		false,
-+	},
-+	[BCM2835_BOARD_REV_A_PLUS] = {
-+		"Model A+",
-+		"bcm2835-rpi-a-plus.dtb",
-+		false,
- 	},
- };
- 
-@@ -154,9 +190,6 @@
- 		return;
- 
- 	fdtfile = models[rpi_board_rev].fdtfile;
--	if (!fdtfile)
--		fdtfile = "bcm2835-rpi-other.dtb";
--
- 	setenv("fdtfile", fdtfile);
- }
- 
-@@ -165,6 +198,9 @@
- 	ALLOC_ALIGN_BUFFER(struct msg_get_mac_address, msg, 1, 16);
- 	int ret;
- 
-+	if (!models[rpi_board_rev].has_onboard_eth)
-+		return;
-+
- 	if (getenv("usbethaddr"))
- 		return;
- 
-@@ -231,12 +267,17 @@
- 	}
- 
- 	rpi_board_rev = msg->get_board_rev.body.resp.rev;
--	if (rpi_board_rev >= ARRAY_SIZE(models))
-+	if (rpi_board_rev >= ARRAY_SIZE(models)) {
-+		printf("RPI: Board rev %u outside known range\n",
-+		       rpi_board_rev);
- 		rpi_board_rev = 0;
-+	}
-+	if (!models[rpi_board_rev].name) {
-+		printf("RPI: Board rev %u unknown\n", rpi_board_rev);
-+		rpi_board_rev = 0;
-+	}
- 
- 	name = models[rpi_board_rev].name;
--	if (!name)
--		name = "Unknown model";
- 	printf("RPI model: %s\n", name);
- }
- 
-diff -ruN u-boot-2015.01-rc3/board/renesas/alt/alt.c u-boot/board/renesas/alt/alt.c
---- u-boot-2015.01-rc3/board/renesas/alt/alt.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/renesas/alt/alt.c	2015-01-01 17:34:32.473499645 +0100
-@@ -15,6 +15,8 @@
- #include <asm/arch/sys_proto.h>
- #include <asm/gpio.h>
- #include <asm/arch/rmobile.h>
-+#include <asm/arch/rcar-mstp.h>
-+#include <asm/arch/mmc.h>
- #include <netdev.h>
- #include <miiphy.h>
- #include <i2c.h>
-@@ -37,30 +39,11 @@
- 	qos_init();
- }
- 
--#define MSTPSR1		0xE6150038
--#define SMSTPCR1	0xE6150134
- #define TMU0_MSTP125	(1 << 25)
--
--#define MSTPSR7		0xE61501C4
--#define SMSTPCR7	0xE615014C
- #define SCIF2_MSTP719	(1 << 19)
--
--#define MSTPSR8		0xE61509A0
--#define SMSTPCR8	0xE6150990
- #define ETHER_MSTP813	(1 << 13)
--
--#define MSTPSR3		0xE6150048
--#define SMSTPCR3	0xE615013C
- #define IIC1_MSTP323	(1 << 23)
--
--#define mstp_setbits(type, addr, saddr, set) \
--	out_##type((saddr), in_##type(addr) | (set))
--#define mstp_clrbits(type, addr, saddr, clear) \
--	out_##type((saddr), in_##type(addr) & ~(clear))
--#define mstp_setbits_le32(addr, saddr, set) \
--	mstp_setbits(le32, addr, saddr, set)
--#define mstp_clrbits_le32(addr, saddr, clear)   \
--	mstp_clrbits(le32, addr, saddr, clear)
-+#define MMC0_MSTP315	(1 << 15)
- 
- int board_early_init_f(void)
- {
-@@ -76,15 +59,13 @@
- 	/* IIC1 / sh-i2c ch1 */
- 	mstp_clrbits_le32(MSTPSR3, SMSTPCR3, IIC1_MSTP323);
- 
-+#ifdef CONFIG_SH_MMCIF
-+	/* MMC */
-+	mstp_clrbits_le32(MSTPSR3, SMSTPCR3, MMC0_MSTP315);
-+#endif
- 	return 0;
- }
- 
--void arch_preboot_os(void)
--{
--	/* Disable TMU0 */
--	mstp_setbits_le32(MSTPSR1, SMSTPCR1, TMU0_MSTP125);
--}
--
- int board_init(void)
- {
- 	/* adress of boot parameters */
-@@ -145,6 +126,19 @@
- #endif
- }
- 
-+int board_mmc_init(bd_t *bis)
-+{
-+	int ret = 0;
-+
-+#ifdef CONFIG_SH_MMCIF
-+	gpio_request(GPIO_GP_4_31, NULL);
-+	gpio_set_value(GPIO_GP_4_31, 1);
-+
-+	ret = mmcif_mmc_init();
-+#endif
-+	return ret;
-+}
-+
- int dram_init(void)
- {
- 	gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
-diff -ruN u-boot-2015.01-rc3/board/renesas/alt/Makefile u-boot/board/renesas/alt/Makefile
---- u-boot-2015.01-rc3/board/renesas/alt/Makefile	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/renesas/alt/Makefile	2015-01-01 17:34:32.473499645 +0100
-@@ -6,4 +6,4 @@
- # SPDX-License-Identifier: GPL-2.0
- #
- 
--obj-y	:= alt.o qos.o
-+obj-y	:= alt.o qos.o ../rcar-gen2-common/common.o
-diff -ruN u-boot-2015.01-rc3/board/renesas/gose/gose.c u-boot/board/renesas/gose/gose.c
---- u-boot-2015.01-rc3/board/renesas/gose/gose.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/renesas/gose/gose.c	2015-01-01 17:34:32.473499645 +0100
-@@ -15,6 +15,7 @@
- #include <asm/arch/sys_proto.h>
- #include <asm/gpio.h>
- #include <asm/arch/rmobile.h>
-+#include <asm/arch/rcar-mstp.h>
- #include <netdev.h>
- #include <miiphy.h>
- #include <i2c.h>
-@@ -41,27 +42,10 @@
- 	qos_init();
- }
- 
--#define MSTPSR1		0xE6150038
--#define SMSTPCR1	0xE6150134
- #define TMU0_MSTP125	(1 << 25)
--
--#define MSTPSR7		0xE61501C4
--#define SMSTPCR7	0xE615014C
- #define SCIF0_MSTP721	(1 << 21)
--
--#define MSTPSR8		0xE61509A0
--#define SMSTPCR8	0xE6150990
- #define ETHER_MSTP813	(1 << 13)
- 
--#define mstp_setbits(type, addr, saddr, set) \
--	out_##type((saddr), in_##type(addr) | (set))
--#define mstp_clrbits(type, addr, saddr, clear) \
--	out_##type((saddr), in_##type(addr) & ~(clear))
--#define mstp_setbits_le32(addr, saddr, set) \
--	mstp_setbits(le32, addr, saddr, set)
--#define mstp_clrbits_le32(addr, saddr, clear) \
--	mstp_clrbits(le32, addr, saddr, clear)
--
- int board_early_init_f(void)
- {
- 	/* TMU0 */
-@@ -76,16 +60,6 @@
- 	return 0;
- }
- 
--#define TSTR0		0x04
--#define TSTR0_STR0	0x01
--void arch_preboot_os(void)
--{
--	/* stop TMU0 */
--	mstp_clrbits_le32(TMU_BASE + TSTR0, TMU_BASE + TSTR0, TSTR0_STR0);
--	/* Disable TMU0 */
--	mstp_setbits_le32(MSTPSR1, SMSTPCR1, TMU0_MSTP125);
--}
--
- #define PUPR5		0xE6060114
- #define PUPR5_ETH	0x3FFC0000
- #define PUPR5_ETH_MAGIC	(1 << 27)
-diff -ruN u-boot-2015.01-rc3/board/renesas/gose/Makefile u-boot/board/renesas/gose/Makefile
---- u-boot-2015.01-rc3/board/renesas/gose/Makefile	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/renesas/gose/Makefile	2015-01-01 17:34:32.473499645 +0100
-@@ -6,4 +6,4 @@
- # SPDX-License-Identifier: GPL-2.0
- #
- 
--obj-y	:= gose.o qos.o
-+obj-y	:= gose.o qos.o ../rcar-gen2-common/common.o
-diff -ruN u-boot-2015.01-rc3/board/renesas/koelsch/koelsch.c u-boot/board/renesas/koelsch/koelsch.c
---- u-boot-2015.01-rc3/board/renesas/koelsch/koelsch.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/renesas/koelsch/koelsch.c	2015-01-01 17:34:32.473499645 +0100
-@@ -16,6 +16,7 @@
- #include <asm/arch/sys_proto.h>
- #include <asm/gpio.h>
- #include <asm/arch/rmobile.h>
-+#include <asm/arch/rcar-mstp.h>
- #include <netdev.h>
- #include <miiphy.h>
- #include <i2c.h>
-@@ -43,27 +44,10 @@
- 	qos_init();
- }
- 
--#define MSTPSR1		0xE6150038
--#define SMSTPCR1	0xE6150134
- #define TMU0_MSTP125	(1 << 25)
--
--#define MSTPSR7		0xE61501C4
--#define SMSTPCR7	0xE615014C
- #define SCIF0_MSTP721	(1 << 21)
--
--#define MSTPSR8		0xE61509A0
--#define SMSTPCR8	0xE6150990
- #define ETHER_MSTP813	(1 << 13)
- 
--#define mstp_setbits(type, addr, saddr, set) \
--	out_##type((saddr), in_##type(addr) | (set))
--#define mstp_clrbits(type, addr, saddr, clear) \
--	out_##type((saddr), in_##type(addr) & ~(clear))
--#define mstp_setbits_le32(addr, saddr, set) \
--	mstp_setbits(le32, addr, saddr, set)
--#define mstp_clrbits_le32(addr, saddr, clear)   \
--	mstp_clrbits(le32, addr, saddr, clear)
--
- int board_early_init_f(void)
- {
- 	mstp_clrbits_le32(MSTPSR1, SMSTPCR1, TMU0_MSTP125);
-@@ -77,12 +61,6 @@
- 	return 0;
- }
- 
--void arch_preboot_os(void)
--{
--	/* Disable TMU0 */
--	mstp_setbits_le32(MSTPSR1, SMSTPCR1, TMU0_MSTP125);
--}
--
- /* LSI pin pull-up control */
- #define PUPR5 0xe6060114
- #define PUPR5_ETH 0x3FFC0000
-diff -ruN u-boot-2015.01-rc3/board/renesas/koelsch/Makefile u-boot/board/renesas/koelsch/Makefile
---- u-boot-2015.01-rc3/board/renesas/koelsch/Makefile	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/renesas/koelsch/Makefile	2015-01-01 17:34:32.473499645 +0100
-@@ -6,4 +6,4 @@
- # SPDX-License-Identifier: GPL-2.0
- #
- 
--obj-y	:= koelsch.o qos.o
-+obj-y	:= koelsch.o qos.o ../rcar-gen2-common/common.o
-diff -ruN u-boot-2015.01-rc3/board/renesas/lager/lager.c u-boot/board/renesas/lager/lager.c
---- u-boot-2015.01-rc3/board/renesas/lager/lager.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/renesas/lager/lager.c	2015-01-01 17:34:32.473499645 +0100
-@@ -18,8 +18,11 @@
- #include <asm/arch/sys_proto.h>
- #include <asm/gpio.h>
- #include <asm/arch/rmobile.h>
-+#include <asm/arch/rcar-mstp.h>
-+#include <asm/arch/mmc.h>
- #include <miiphy.h>
- #include <i2c.h>
-+#include <mmc.h>
- #include "qos.h"
- 
- DECLARE_GLOBAL_DATA_PTR;
-@@ -50,26 +53,10 @@
- 	qos_init();
- }
- 
--#define MSTPSR1	0xE6150038
--#define SMSTPCR1	0xE6150134
- #define TMU0_MSTP125	(1 << 25)
--
--#define MSTPSR7	0xE61501C4
--#define SMSTPCR7	0xE615014C
- #define SCIF0_MSTP721	(1 << 21)
--
--#define MSTPSR8	0xE61509A0
--#define SMSTPCR8	0xE6150990
- #define ETHER_MSTP813	(1 << 13)
--
--#define mstp_setbits(type, addr, saddr, set) \
--	out_##type((saddr), in_##type(addr) | (set))
--#define mstp_clrbits(type, addr, saddr, clear) \
--	out_##type((saddr), in_##type(addr) & ~(clear))
--#define mstp_setbits_le32(addr, saddr, set)	\
--		mstp_setbits(le32, addr, saddr, set)
--#define mstp_clrbits_le32(addr, saddr, clear)	\
--		mstp_clrbits(le32, addr, saddr, clear)
-+#define MMC1_MSTP305    (1 << 5)
- 
- int board_early_init_f(void)
- {
-@@ -79,16 +66,12 @@
- 	mstp_clrbits_le32(MSTPSR7, SMSTPCR7, SCIF0_MSTP721);
- 	/* ETHER */
- 	mstp_clrbits_le32(MSTPSR8, SMSTPCR8, ETHER_MSTP813);
-+	/* eMMC */
-+	mstp_clrbits_le32(MSTPSR3, SMSTPCR3, MMC1_MSTP305);
- 
- 	return 0;
- }
- 
--void arch_preboot_os(void)
--{
--	/* Disable TMU0 */
--	mstp_setbits_le32(MSTPSR1, SMSTPCR1, TMU0_MSTP125);
--}
--
- DECLARE_GLOBAL_DATA_PTR;
- int board_init(void)
- {
-@@ -163,6 +146,28 @@
- 	return 0;
- }
- 
-+int board_mmc_init(bd_t *bis)
-+{
-+	int ret = 0;
-+
-+#ifdef CONFIG_SH_MMCIF
-+	gpio_request(GPIO_FN_MMC1_D0, NULL);
-+	gpio_request(GPIO_FN_MMC1_D1, NULL);
-+	gpio_request(GPIO_FN_MMC1_D2, NULL);
-+	gpio_request(GPIO_FN_MMC1_D3, NULL);
-+	gpio_request(GPIO_FN_MMC1_D4, NULL);
-+	gpio_request(GPIO_FN_MMC1_D5, NULL);
-+	gpio_request(GPIO_FN_MMC1_D6, NULL);
-+	gpio_request(GPIO_FN_MMC1_D7, NULL);
-+	gpio_request(GPIO_FN_MMC1_CLK, NULL);
-+	gpio_request(GPIO_FN_MMC1_CMD, NULL);
-+
-+	ret = mmcif_mmc_init();
-+#endif
-+	return ret;
-+}
-+
-+
- int dram_init(void)
- {
- 	gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
-diff -ruN u-boot-2015.01-rc3/board/renesas/lager/Makefile u-boot/board/renesas/lager/Makefile
---- u-boot-2015.01-rc3/board/renesas/lager/Makefile	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/renesas/lager/Makefile	2015-01-01 17:34:32.473499645 +0100
-@@ -6,4 +6,4 @@
- # SPDX-License-Identifier: GPL-2.0
- #
- 
--obj-y	:= lager.o qos.o
-+obj-y	:= lager.o qos.o ../rcar-gen2-common/common.o
-diff -ruN u-boot-2015.01-rc3/board/renesas/rcar-gen2-common/common.c u-boot/board/renesas/rcar-gen2-common/common.c
---- u-boot-2015.01-rc3/board/renesas/rcar-gen2-common/common.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/renesas/rcar-gen2-common/common.c	2015-01-01 17:34:32.477499579 +0100
-@@ -0,0 +1,59 @@
-+/*
-+ * board/renesas/rcar-gen2-common/common.c
-+ *
-+ * Copyright (C) 2013 Renesas Electronics Corporation
-+ * Copyright (C) 2013 Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj at renesas.com>
-+ *
-+ * SPDX-License-Identifier: GPL-2.0
-+ */
-+
-+#include <common.h>
-+#include <asm/io.h>
-+#include <asm/arch/sys_proto.h>
-+#include <asm/arch/rmobile.h>
-+#include <asm/arch/rcar-mstp.h>
-+
-+#define TSTR0		0x04
-+#define TSTR0_STR0	0x01
-+
-+static struct mstp_ctl mstptbl[] = {
-+	{ SMSTPCR0, MSTP0_BITS, CONFIG_SMSTP0_ENA,
-+		RMSTPCR0, MSTP0_BITS, CONFIG_RMSTP0_ENA },
-+	{ SMSTPCR1, MSTP1_BITS, CONFIG_SMSTP1_ENA,
-+		RMSTPCR1, MSTP1_BITS, CONFIG_RMSTP1_ENA },
-+	{ SMSTPCR2, MSTP2_BITS, CONFIG_SMSTP2_ENA,
-+		RMSTPCR2, MSTP2_BITS, CONFIG_RMSTP2_ENA },
-+	{ SMSTPCR3, MSTP3_BITS, CONFIG_SMSTP3_ENA,
-+		RMSTPCR3, MSTP3_BITS, CONFIG_RMSTP3_ENA },
-+	{ SMSTPCR4, MSTP4_BITS, CONFIG_SMSTP4_ENA,
-+		RMSTPCR4, MSTP4_BITS, CONFIG_RMSTP4_ENA },
-+	{ SMSTPCR5, MSTP5_BITS, CONFIG_SMSTP5_ENA,
-+		RMSTPCR5, MSTP5_BITS, CONFIG_RMSTP5_ENA },
-+	/* No MSTP6 */
-+	{ SMSTPCR7, MSTP7_BITS, CONFIG_SMSTP7_ENA,
-+		RMSTPCR7, MSTP7_BITS, CONFIG_RMSTP7_ENA },
-+	{ SMSTPCR8, MSTP8_BITS, CONFIG_SMSTP8_ENA,
-+		RMSTPCR8, MSTP8_BITS, CONFIG_RMSTP8_ENA },
-+	{ SMSTPCR9, MSTP9_BITS, CONFIG_SMSTP9_ENA,
-+		RMSTPCR9, MSTP9_BITS, CONFIG_RMSTP9_ENA },
-+	{ SMSTPCR10, MSTP10_BITS, CONFIG_SMSTP10_ENA,
-+		 RMSTPCR10, MSTP10_BITS, CONFIG_RMSTP10_ENA },
-+	{ SMSTPCR11, MSTP11_BITS, CONFIG_SMSTP1_ENA,
-+		 RMSTPCR11, MSTP11_BITS, CONFIG_RMSTP11_ENA },
-+};
-+
-+void arch_preboot_os(void)
-+{
-+	int i;
-+
-+	/* stop TMU0 */
-+	mstp_clrbits_le32(TMU_BASE + TSTR0, TMU_BASE + TSTR0, TSTR0_STR0);
-+
-+	/* Stop module clock */
-+	for (i = 0; i < ARRAY_SIZE(mstptbl); i++) {
-+		mstp_setclrbits_le32(mstptbl[i].s_addr, mstptbl[i].s_dis,
-+				     mstptbl[i].s_ena);
-+		mstp_setclrbits_le32(mstptbl[i].r_addr, mstptbl[i].r_dis,
-+				     mstptbl[i].r_ena);
-+	}
-+}
-diff -ruN u-boot-2015.01-rc3/board/solidrun/hummingboard/hummingboard.c u-boot/board/solidrun/hummingboard/hummingboard.c
---- u-boot-2015.01-rc3/board/solidrun/hummingboard/hummingboard.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/solidrun/hummingboard/hummingboard.c	2015-01-01 17:34:32.497499251 +0100
-@@ -146,7 +146,7 @@
- {
- 	struct iomuxc *const iomuxc_regs = (struct iomuxc *)IOMUXC_BASE_ADDR;
- 
--	int ret = enable_fec_anatop_clock(ENET_25MHz);
-+	int ret = enable_fec_anatop_clock(ENET_25MHZ);
- 	if (ret)
- 		return ret;
- 
-diff -ruN u-boot-2015.01-rc3/board/st/stv0991/Kconfig u-boot/board/st/stv0991/Kconfig
---- u-boot-2015.01-rc3/board/st/stv0991/Kconfig	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/st/stv0991/Kconfig	2015-01-01 17:34:32.501499185 +0100
-@@ -0,0 +1,23 @@
-+if TARGET_STV0991
-+
-+config SYS_CPU
-+	string
-+	default "armv7"
-+
-+config SYS_BOARD
-+	string
-+	default "stv0991"
-+
-+config SYS_VENDOR
-+	string
-+	default "st"
-+
-+config SYS_SOC
-+	string
-+	default "stv0991"
-+
-+config SYS_CONFIG_NAME
-+	string
-+	default "stv0991"
-+
-+endif
-diff -ruN u-boot-2015.01-rc3/board/st/stv0991/MAINTAINERS u-boot/board/st/stv0991/MAINTAINERS
---- u-boot-2015.01-rc3/board/st/stv0991/MAINTAINERS	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/st/stv0991/MAINTAINERS	2015-01-01 17:34:32.501499185 +0100
-@@ -0,0 +1,5 @@
-+STV0991 APPLICATION BOARD
-+M:	Vikas Manocha <vikas.manocha at st.com>
-+S:	Maintained
-+F:	board/st/stv0991/
-+F:	include/configs/stv0991.h
-diff -ruN u-boot-2015.01-rc3/board/st/stv0991/Makefile u-boot/board/st/stv0991/Makefile
---- u-boot-2015.01-rc3/board/st/stv0991/Makefile	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/st/stv0991/Makefile	2015-01-01 17:34:32.501499185 +0100
-@@ -0,0 +1,8 @@
-+#
-+# (C) Copyright 2014
-+# Vikas Manocha, ST Microelectronics, vikas.manocha at stcom
-+#
-+# SPDX-License-Identifier:	GPL-2.0+
-+#
-+
-+obj-y	:= stv0991.o
-diff -ruN u-boot-2015.01-rc3/board/st/stv0991/stv0991.c u-boot/board/st/stv0991/stv0991.c
---- u-boot-2015.01-rc3/board/st/stv0991/stv0991.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/st/stv0991/stv0991.c	2015-01-01 17:34:32.501499185 +0100
-@@ -0,0 +1,104 @@
-+/*
-+ * (C) Copyright 2014
-+ * Vikas Manocha, ST Micoelectronics, vikas.manocha at st.com.
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <miiphy.h>
-+#include <asm/arch/stv0991_periph.h>
-+#include <asm/arch/stv0991_defs.h>
-+#include <asm/arch/hardware.h>
-+#include <asm/arch/gpio.h>
-+#include <netdev.h>
-+#include <asm/io.h>
-+#include <dm/platdata.h>
-+#include <dm/platform_data/serial_pl01x.h>
-+
-+DECLARE_GLOBAL_DATA_PTR;
-+
-+struct gpio_regs *const gpioa_regs =
-+		(struct gpio_regs *) GPIOA_BASE_ADDR;
-+
-+static const struct pl01x_serial_platdata serial_platdata = {
-+	.base = 0x80406000,
-+	.type = TYPE_PL011,
-+	.clock = 2700 * 1000,
-+};
-+
-+U_BOOT_DEVICE(stv09911_serials) = {
-+	.name = "serial_pl01x",
-+	.platdata = &serial_platdata,
-+};
-+
-+#ifdef CONFIG_SHOW_BOOT_PROGRESS
-+void show_boot_progress(int progress)
-+{
-+	printf("%i\n", progress);
-+}
-+#endif
-+
-+void enable_eth_phy(void)
-+{
-+	/* Set GPIOA_06 pad HIGH (Appli board)*/
-+	writel(readl(&gpioa_regs->dir) | 0x40, &gpioa_regs->dir);
-+	writel(readl(&gpioa_regs->data) | 0x40, &gpioa_regs->data);
-+}
-+int board_eth_enable(void)
-+{
-+	stv0991_pinmux_config(ETH_GPIOB_10_31_C_0_4);
-+	clock_setup(ETH_CLOCK_CFG);
-+	enable_eth_phy();
-+	return 0;
-+}
-+
-+/*
-+ * Miscellaneous platform dependent initialisations
-+ */
-+int board_init(void)
-+{
-+	board_eth_enable();
-+	return 0;
-+}
-+
-+int board_uart_init(void)
-+{
-+	stv0991_pinmux_config(UART_GPIOC_30_31);
-+	clock_setup(UART_CLOCK_CFG);
-+	return 0;
-+}
-+
-+#ifdef CONFIG_BOARD_EARLY_INIT_F
-+int board_early_init_f(void)
-+{
-+	board_uart_init();
-+	return 0;
-+}
-+#endif
-+
-+int dram_init(void)
-+{
-+	gd->ram_size = PHYS_SDRAM_1_SIZE;
-+	return 0;
-+}
-+
-+void dram_init_banksize(void)
-+{
-+	gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
-+	gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
-+}
-+
-+#ifdef CONFIG_CMD_NET
-+int board_eth_init(bd_t *bis)
-+{
-+	int ret = 0;
-+
-+#if defined(CONFIG_DESIGNWARE_ETH)
-+	u32 interface = PHY_INTERFACE_MODE_MII;
-+	if (designware_initialize(GMAC_BASE_ADDR, interface) >= 0)
-+		ret++;
-+#endif
-+	return ret;
-+}
-+#endif
-diff -ruN u-boot-2015.01-rc3/board/tbs/tbs2910/Kconfig u-boot/board/tbs/tbs2910/Kconfig
---- u-boot-2015.01-rc3/board/tbs/tbs2910/Kconfig	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/tbs/tbs2910/Kconfig	2015-01-01 17:34:32.505499121 +0100
-@@ -1,23 +1,15 @@
- if TARGET_TBS2910
- 
--config SYS_CPU
--	string
--	default "armv7"
--
- config SYS_BOARD
--	string
- 	default "tbs2910"
- 
- config SYS_VENDOR
--	string
- 	default "tbs"
- 
- config SYS_SOC
--	string
- 	default "mx6"
- 
- config SYS_CONFIG_NAME
--	string
- 	default "tbs2910"
- 
- endif
-diff -ruN u-boot-2015.01-rc3/board/toradex/apalis_t30/apalis_t30.c u-boot/board/toradex/apalis_t30/apalis_t30.c
---- u-boot-2015.01-rc3/board/toradex/apalis_t30/apalis_t30.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/toradex/apalis_t30/apalis_t30.c	2015-01-01 17:34:32.509499055 +0100
-@@ -6,7 +6,7 @@
-  */
- 
- #include <common.h>
--
-+#include <dm.h>
- #include <asm/arch/gp_padctrl.h>
- #include <asm/arch/pinmux.h>
- #include <asm/gpio.h>
-@@ -38,23 +38,20 @@
- #ifdef CONFIG_PCI_TEGRA
- int tegra_pcie_board_init(void)
- {
--	unsigned int old_bus;
-+	struct udevice *dev;
- 	u8 addr, data[1];
- 	int err;
- 
--	old_bus = i2c_get_bus_num();
--
--	err = i2c_set_bus_num(0);
-+	err = i2c_get_chip_for_busnum(0, PMU_I2C_ADDRESS, &dev);
- 	if (err) {
--		debug("failed to set I2C bus\n");
-+		debug("%s: Cannot find PMIC I2C chip\n", __func__);
- 		return err;
- 	}
--
- 	/* TPS659110: VDD2_OP_REG = 1.05V */
- 	data[0] = 0x27;
- 	addr = 0x25;
- 
--	err = i2c_write(PMU_I2C_ADDRESS, addr, 1, data, 1);
-+	err = i2c_write(dev, addr, data, 1);
- 	if (err) {
- 		debug("failed to set VDD supply\n");
- 		return err;
-@@ -64,7 +61,7 @@
- 	data[0] = 0x0D;
- 	addr = 0x24;
- 
--	err = i2c_write(PMU_I2C_ADDRESS, addr, 1, data, 1);
-+	err = i2c_write(dev, addr, data, 1);
- 	if (err) {
- 		debug("failed to enable VDD supply\n");
- 		return err;
-@@ -74,14 +71,12 @@
- 	data[0] = 0x0D;
- 	addr = 0x35;
- 
--	err = i2c_write(PMU_I2C_ADDRESS, addr, 1, data, 1);
-+	err = i2c_write(dev, addr, data, 1);
- 	if (err) {
- 		debug("failed to set AVDD supply\n");
- 		return err;
- 	}
- 
--	i2c_set_bus_num(old_bus);
--
- 	return 0;
- }
- 
-diff -ruN u-boot-2015.01-rc3/common/board_f.c u-boot/common/board_f.c
---- u-boot-2015.01-rc3/common/board_f.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/common/board_f.c	2015-01-01 17:34:32.521498858 +0100
-@@ -813,7 +813,9 @@
- #endif
- 	setup_mon_len,
- 	setup_fdt,
-+#ifdef CONFIG_TRACE
- 	trace_early_init,
-+#endif
- 	initf_malloc,
- #if defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx)
- 	/* TODO: can this go into arch_cpu_init()? */
-diff -ruN u-boot-2015.01-rc3/common/cmd_dfu.c u-boot/common/cmd_dfu.c
---- u-boot-2015.01-rc3/common/cmd_dfu.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/common/cmd_dfu.c	2015-01-01 17:34:32.525498793 +0100
-@@ -38,10 +38,10 @@
- 
- 	int controller_index = simple_strtoul(usb_controller, NULL, 0);
- 	board_usb_init(controller_index, USB_INIT_DEVICE);
--	dfu_clear_detach();
-+	g_dnl_clear_detach();
- 	g_dnl_register("usb_dnl_dfu");
- 	while (1) {
--		if (dfu_detach()) {
-+		if (g_dnl_detach()) {
- 			/*
- 			 * Check if USB bus reset is performed after detach,
- 			 * which indicates that -R switch has been passed to
-@@ -74,7 +74,7 @@
- 	if (dfu_reset)
- 		run_command("reset", 0);
- 
--	dfu_clear_detach();
-+	g_dnl_clear_detach();
- 
- 	return ret;
- }
-diff -ruN u-boot-2015.01-rc3/common/cmd_fastboot.c u-boot/common/cmd_fastboot.c
---- u-boot-2015.01-rc3/common/cmd_fastboot.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/common/cmd_fastboot.c	2015-01-01 17:34:32.525498793 +0100
-@@ -15,17 +15,21 @@
- {
- 	int ret;
- 
-+	g_dnl_clear_detach();
- 	ret = g_dnl_register("usb_dnl_fastboot");
- 	if (ret)
- 		return ret;
- 
- 	while (1) {
-+		if (g_dnl_detach())
-+			break;
- 		if (ctrlc())
- 			break;
- 		usb_gadget_handle_interrupts();
- 	}
- 
- 	g_dnl_unregister();
-+	g_dnl_clear_detach();
- 	return CMD_RET_SUCCESS;
- }
- 
-diff -ruN u-boot-2015.01-rc3/common/cmd_hash.c u-boot/common/cmd_hash.c
---- u-boot-2015.01-rc3/common/cmd_hash.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/common/cmd_hash.c	2015-01-01 17:34:32.529498727 +0100
-@@ -18,9 +18,9 @@
- static int do_hash(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
- {
- 	char *s;
--#ifdef CONFIG_HASH_VERIFY
- 	int flags = HASH_FLAG_ENV;
- 
-+#ifdef CONFIG_HASH_VERIFY
- 	if (argc < 4)
- 		return CMD_RET_USAGE;
- 	if (!strcmp(argv[1], "-v")) {
-@@ -28,8 +28,6 @@
- 		argc--;
- 		argv++;
- 	}
--#else
--	const int flags = HASH_FLAG_ENV;
- #endif
- 	/* Move forward to 'algorithm' parameter */
- 	argc--;
-@@ -40,19 +38,19 @@
- }
- 
- #ifdef CONFIG_HASH_VERIFY
--U_BOOT_CMD(
--	hash,	6,	1,	do_hash,
--	"compute hash message digest",
--	"algorithm address count [[*]sum_dest]\n"
--		"    - compute message digest [save to env var / *address]\n"
--	"hash -v algorithm address count [*]sum\n"
--		"    - verify hash of memory area with env var / *address"
--);
-+#define HARGS 6
- #else
-+#define HARGS 5
-+#endif
-+
- U_BOOT_CMD(
--	hash,	5,	1,	do_hash,
--	"compute message digest",
--	"algorithm address count [[*]sum_dest]\n"
-+	hash,	HARGS,	1,	do_hash,
-+	"compute hash message digest",
-+	"algorithm address count [[*]hash_dest]\n"
- 		"    - compute message digest [save to env var / *address]"
--);
-+#ifdef CONFIG_HASH_VERIFY
-+	"\nhash -v algorithm address count [*]hash\n"
-+		"    - verify message digest of memory area to immediate value, \n"
-+		"      env var or *address"
- #endif
-+);
-diff -ruN u-boot-2015.01-rc3/common/cmd_i2c.c u-boot/common/cmd_i2c.c
---- u-boot-2015.01-rc3/common/cmd_i2c.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/common/cmd_i2c.c	2015-01-01 17:34:32.529498727 +0100
-@@ -69,8 +69,10 @@
- #include <bootretry.h>
- #include <cli.h>
- #include <command.h>
-+#include <dm.h>
- #include <edid.h>
- #include <environment.h>
-+#include <errno.h>
- #include <i2c.h>
- #include <malloc.h>
- #include <asm/byteorder.h>
-@@ -117,6 +119,60 @@
- 
- #define DISP_LINE_LEN	16
- 
-+/*
-+ * Default for driver model is to use the chip's existing address length.
-+ * For legacy code, this is not stored, so we need to use a suitable
-+ * default.
-+ */
-+#ifdef CONFIG_DM_I2C
-+#define DEFAULT_ADDR_LEN	(-1)
-+#else
-+#define DEFAULT_ADDR_LEN	1
-+#endif
-+
-+#ifdef CONFIG_DM_I2C
-+static struct udevice *i2c_cur_bus;
-+
-+static int i2c_set_bus_num(unsigned int busnum)
-+{
-+	struct udevice *bus;
-+	int ret;
-+
-+	ret = uclass_get_device_by_seq(UCLASS_I2C, busnum, &bus);
-+	if (ret) {
-+		debug("%s: No bus %d\n", __func__, busnum);
-+		return ret;
-+	}
-+	i2c_cur_bus = bus;
-+
-+	return 0;
-+}
-+
-+static int i2c_get_cur_bus(struct udevice **busp)
-+{
-+	if (!i2c_cur_bus) {
-+		puts("No I2C bus selected\n");
-+		return -ENODEV;
-+	}
-+	*busp = i2c_cur_bus;
-+
-+	return 0;
-+}
-+
-+static int i2c_get_cur_bus_chip(uint chip_addr, struct udevice **devp)
-+{
-+	struct udevice *bus;
-+	int ret;
-+
-+	ret = i2c_get_cur_bus(&bus);
-+	if (ret)
-+		return ret;
-+
-+	return i2c_get_chip(bus, chip_addr, devp);
-+}
-+
-+#endif
-+
- /**
-  * i2c_init_board() - Board-specific I2C bus init
-  *
-@@ -143,7 +199,7 @@
-  *
-  * Returns I2C bus speed in Hz.
-  */
--#if !defined(CONFIG_SYS_I2C)
-+#if !defined(CONFIG_SYS_I2C) && !defined(CONFIG_DM_I2C)
- /*
-  * TODO: Implement architecture-specific get/set functions
-  * Should go away, if we switched completely to new multibus support
-@@ -182,12 +238,12 @@
-  *
-  * Returns the address length.
-  */
--static uint get_alen(char *arg)
-+static uint get_alen(char *arg, int default_len)
- {
- 	int	j;
- 	int	alen;
- 
--	alen = 1;
-+	alen = default_len;
- 	for (j = 0; j < 8; j++) {
- 		if (arg[j] == '.') {
- 			alen = arg[j+1] - '0';
-@@ -227,8 +283,13 @@
- static int do_i2c_read ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
- {
- 	u_char	chip;
--	uint	devaddr, alen, length;
-+	uint	devaddr, length;
-+	int alen;
- 	u_char  *memaddr;
-+	int ret;
-+#ifdef CONFIG_DM_I2C
-+	struct udevice *dev;
-+#endif
- 
- 	if (argc != 5)
- 		return CMD_RET_USAGE;
-@@ -243,7 +304,7 @@
- 	 * 2 bytes long.  Some day it might be 3 bytes long :-).
- 	 */
- 	devaddr = simple_strtoul(argv[2], NULL, 16);
--	alen = get_alen(argv[2]);
-+	alen = get_alen(argv[2], DEFAULT_ADDR_LEN);
- 	if (alen > 3)
- 		return CMD_RET_USAGE;
- 
-@@ -257,18 +318,31 @@
- 	 */
- 	memaddr = (u_char *)simple_strtoul(argv[4], NULL, 16);
- 
--	if (i2c_read(chip, devaddr, alen, memaddr, length) != 0) {
--		i2c_report_err(-1, I2C_ERR_READ);
--		return 1;
--	}
-+#ifdef CONFIG_DM_I2C
-+	ret = i2c_get_cur_bus_chip(chip, &dev);
-+	if (!ret && alen != -1)
-+		ret = i2c_set_chip_offset_len(dev, alen);
-+	if (!ret)
-+		ret = i2c_read(dev, devaddr, memaddr, length);
-+#else
-+	ret = i2c_read(chip, devaddr, alen, memaddr, length);
-+#endif
-+	if (ret)
-+		return i2c_report_err(ret, I2C_ERR_READ);
-+
- 	return 0;
- }
- 
- static int do_i2c_write(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
- {
- 	u_char	chip;
--	uint	devaddr, alen, length;
-+	uint	devaddr, length;
-+	int alen;
- 	u_char  *memaddr;
-+	int ret;
-+#ifdef CONFIG_DM_I2C
-+	struct udevice *dev;
-+#endif
- 
- 	if (argc != 5)
- 		return cmd_usage(cmdtp);
-@@ -288,7 +362,7 @@
- 	 * 2 bytes long.  Some day it might be 3 bytes long :-).
- 	 */
- 	devaddr = simple_strtoul(argv[3], NULL, 16);
--	alen = get_alen(argv[3]);
-+	alen = get_alen(argv[3], DEFAULT_ADDR_LEN);
- 	if (alen > 3)
- 		return cmd_usage(cmdtp);
- 
-@@ -297,10 +371,22 @@
- 	 */
- 	length = simple_strtoul(argv[4], NULL, 16);
- 
-+#ifdef CONFIG_DM_I2C
-+	ret = i2c_get_cur_bus_chip(chip, &dev);
-+	if (!ret && alen != -1)
-+		ret = i2c_set_chip_offset_len(dev, alen);
-+	if (ret)
-+		return i2c_report_err(ret, I2C_ERR_WRITE);
-+#endif
-+
- 	while (length-- > 0) {
--		if (i2c_write(chip, devaddr++, alen, memaddr++, 1) != 0) {
--			return i2c_report_err(-1, I2C_ERR_WRITE);
--		}
-+#ifdef CONFIG_DM_I2C
-+		ret = i2c_write(dev, devaddr++, memaddr++, 1);
-+#else
-+		ret = i2c_write(chip, devaddr++, alen, memaddr++, 1);
-+#endif
-+		if (ret)
-+			return i2c_report_err(ret, I2C_ERR_WRITE);
- /*
-  * No write delay with FRAM devices.
-  */
-@@ -311,6 +397,38 @@
- 	return 0;
- }
- 
-+#ifdef CONFIG_DM_I2C
-+static int do_i2c_flags(cmd_tbl_t *cmdtp, int flag, int argc,
-+			char *const argv[])
-+{
-+	struct udevice *dev;
-+	uint flags;
-+	int chip;
-+	int ret;
-+
-+	if (argc < 2)
-+		return CMD_RET_USAGE;
-+
-+	chip = simple_strtoul(argv[1], NULL, 16);
-+	ret = i2c_get_cur_bus_chip(chip, &dev);
-+	if (ret)
-+		return i2c_report_err(ret, I2C_ERR_READ);
-+
-+	if (argc > 2) {
-+		flags = simple_strtoul(argv[2], NULL, 16);
-+		ret = i2c_set_chip_flags(dev, flags);
-+	} else  {
-+		ret = i2c_get_chip_flags(dev, &flags);
-+		if (!ret)
-+			printf("%x\n", flags);
-+	}
-+	if (ret)
-+		return i2c_report_err(ret, I2C_ERR_READ);
-+
-+	return 0;
-+}
-+#endif
-+
- /**
-  * do_i2c_md() - Handle the "i2c md" command-line command
-  * @cmdtp:	Command data struct pointer
-@@ -327,8 +445,13 @@
- static int do_i2c_md ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
- {
- 	u_char	chip;
--	uint	addr, alen, length;
-+	uint	addr, length;
-+	int alen;
- 	int	j, nbytes, linebytes;
-+	int ret;
-+#ifdef CONFIG_DM_I2C
-+	struct udevice *dev;
-+#endif
- 
- 	/* We use the last specified parameters, unless new ones are
- 	 * entered.
-@@ -356,7 +479,7 @@
- 		 * 2 bytes long.  Some day it might be 3 bytes long :-).
- 		 */
- 		addr = simple_strtoul(argv[2], NULL, 16);
--		alen = get_alen(argv[2]);
-+		alen = get_alen(argv[2], DEFAULT_ADDR_LEN);
- 		if (alen > 3)
- 			return CMD_RET_USAGE;
- 
-@@ -368,6 +491,14 @@
- 			length = simple_strtoul(argv[3], NULL, 16);
- 	}
- 
-+#ifdef CONFIG_DM_I2C
-+	ret = i2c_get_cur_bus_chip(chip, &dev);
-+	if (!ret && alen != -1)
-+		ret = i2c_set_chip_offset_len(dev, alen);
-+	if (ret)
-+		return i2c_report_err(ret, I2C_ERR_READ);
-+#endif
-+
- 	/*
- 	 * Print the lines.
- 	 *
-@@ -381,8 +512,13 @@
- 
- 		linebytes = (nbytes > DISP_LINE_LEN) ? DISP_LINE_LEN : nbytes;
- 
--		if (i2c_read(chip, addr, alen, linebuf, linebytes) != 0)
--			i2c_report_err(-1, I2C_ERR_READ);
-+#ifdef CONFIG_DM_I2C
-+		ret = i2c_read(dev, addr, linebuf, linebytes);
-+#else
-+		ret = i2c_read(chip, addr, alen, linebuf, linebytes);
-+#endif
-+		if (ret)
-+			i2c_report_err(ret, I2C_ERR_READ);
- 		else {
- 			printf("%04x:", addr);
- 			cp = linebuf;
-@@ -429,9 +565,13 @@
- {
- 	uchar	chip;
- 	ulong	addr;
--	uint	alen;
-+	int	alen;
- 	uchar	byte;
- 	int	count;
-+	int ret;
-+#ifdef CONFIG_DM_I2C
-+	struct udevice *dev;
-+#endif
- 
- 	if ((argc < 4) || (argc > 5))
- 		return CMD_RET_USAGE;
-@@ -445,10 +585,17 @@
- 	 * Address is always specified.
- 	 */
- 	addr = simple_strtoul(argv[2], NULL, 16);
--	alen = get_alen(argv[2]);
-+	alen = get_alen(argv[2], DEFAULT_ADDR_LEN);
- 	if (alen > 3)
- 		return CMD_RET_USAGE;
- 
-+#ifdef CONFIG_DM_I2C
-+	ret = i2c_get_cur_bus_chip(chip, &dev);
-+	if (!ret && alen != -1)
-+		ret = i2c_set_chip_offset_len(dev, alen);
-+	if (ret)
-+		return i2c_report_err(ret, I2C_ERR_WRITE);
-+#endif
- 	/*
- 	 * Value to write is always specified.
- 	 */
-@@ -463,8 +610,13 @@
- 		count = 1;
- 
- 	while (count-- > 0) {
--		if (i2c_write(chip, addr++, alen, &byte, 1) != 0)
--			i2c_report_err(-1, I2C_ERR_WRITE);
-+#ifdef CONFIG_DM_I2C
-+		ret = i2c_write(dev, addr++, &byte, 1);
-+#else
-+		ret = i2c_write(chip, addr++, alen, &byte, 1);
-+#endif
-+		if (ret)
-+			i2c_report_err(ret, I2C_ERR_WRITE);
- 		/*
- 		 * Wait for the write to complete.  The write can take
- 		 * up to 10mSec (we allow a little more time).
-@@ -499,11 +651,15 @@
- {
- 	uchar	chip;
- 	ulong	addr;
--	uint	alen;
-+	int	alen;
- 	int	count;
- 	uchar	byte;
- 	ulong	crc;
- 	ulong	err;
-+	int ret = 0;
-+#ifdef CONFIG_DM_I2C
-+	struct udevice *dev;
-+#endif
- 
- 	if (argc < 4)
- 		return CMD_RET_USAGE;
-@@ -517,10 +673,17 @@
- 	 * Address is always specified.
- 	 */
- 	addr = simple_strtoul(argv[2], NULL, 16);
--	alen = get_alen(argv[2]);
-+	alen = get_alen(argv[2], DEFAULT_ADDR_LEN);
- 	if (alen > 3)
- 		return CMD_RET_USAGE;
- 
-+#ifdef CONFIG_DM_I2C
-+	ret = i2c_get_cur_bus_chip(chip, &dev);
-+	if (!ret && alen != -1)
-+		ret = i2c_set_chip_offset_len(dev, alen);
-+	if (ret)
-+		return i2c_report_err(ret, I2C_ERR_READ);
-+#endif
- 	/*
- 	 * Count is always specified
- 	 */
-@@ -534,13 +697,18 @@
- 	crc = 0;
- 	err = 0;
- 	while (count-- > 0) {
--		if (i2c_read(chip, addr, alen, &byte, 1) != 0)
-+#ifdef CONFIG_DM_I2C
-+		ret = i2c_read(dev, addr, &byte, 1);
-+#else
-+		ret = i2c_read(chip, addr, alen, &byte, 1);
-+#endif
-+		if (ret)
- 			err++;
- 		crc = crc32 (crc, &byte, 1);
- 		addr++;
- 	}
- 	if (err > 0)
--		i2c_report_err(-1, I2C_ERR_READ);
-+		i2c_report_err(ret, I2C_ERR_READ);
- 	else
- 		printf ("%08lx\n", crc);
- 
-@@ -568,10 +736,14 @@
- {
- 	uchar	chip;
- 	ulong	addr;
--	uint	alen;
-+	int	alen;
- 	ulong	data;
- 	int	size = 1;
- 	int	nbytes;
-+	int ret;
-+#ifdef CONFIG_DM_I2C
-+	struct udevice *dev;
-+#endif
- 
- 	if (argc != 3)
- 		return CMD_RET_USAGE;
-@@ -601,19 +773,32 @@
- 		 * Address is always specified.
- 		 */
- 		addr = simple_strtoul(argv[2], NULL, 16);
--		alen = get_alen(argv[2]);
-+		alen = get_alen(argv[2], DEFAULT_ADDR_LEN);
- 		if (alen > 3)
- 			return CMD_RET_USAGE;
- 	}
- 
-+#ifdef CONFIG_DM_I2C
-+	ret = i2c_get_cur_bus_chip(chip, &dev);
-+	if (!ret && alen != -1)
-+		ret = i2c_set_chip_offset_len(dev, alen);
-+	if (ret)
-+		return i2c_report_err(ret, I2C_ERR_WRITE);
-+#endif
-+
- 	/*
- 	 * Print the address, followed by value.  Then accept input for
- 	 * the next value.  A non-converted value exits.
- 	 */
- 	do {
- 		printf("%08lx:", addr);
--		if (i2c_read(chip, addr, alen, (uchar *)&data, size) != 0)
--			i2c_report_err(-1, I2C_ERR_READ);
-+#ifdef CONFIG_DM_I2C
-+		ret = i2c_read(dev, addr, (uchar *)&data, size);
-+#else
-+		ret = i2c_read(chip, addr, alen, (uchar *)&data, size);
-+#endif
-+		if (ret)
-+			i2c_report_err(ret, I2C_ERR_READ);
- 		else {
- 			data = cpu_to_be32(data);
- 			if (size == 1)
-@@ -655,8 +840,15 @@
- 				 * good enough to not time out
- 				 */
- 				bootretry_reset_cmd_timeout();
--				if (i2c_write(chip, addr, alen, (uchar *)&data, size) != 0)
--					i2c_report_err(-1, I2C_ERR_WRITE);
-+#ifdef CONFIG_DM_I2C
-+				ret = i2c_write(dev, addr, (uchar *)&data,
-+						size);
-+#else
-+				ret = i2c_write(chip, addr, alen,
-+						(uchar *)&data, size);
-+#endif
-+				if (ret)
-+					i2c_report_err(ret, I2C_ERR_WRITE);
- #ifdef CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS
- 				udelay(CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS * 1000);
- #endif
-@@ -697,6 +889,13 @@
- 	int k, skip;
- 	unsigned int bus = GET_BUS_NUM;
- #endif	/* NOPROBES */
-+	int ret;
-+#ifdef CONFIG_DM_I2C
-+	struct udevice *bus, *dev;
-+
-+	if (i2c_get_cur_bus(&bus))
-+		return CMD_RET_FAILURE;
-+#endif
- 
- 	if (argc == 2)
- 		addr = simple_strtol(argv[1], 0, 16);
-@@ -717,7 +916,12 @@
- 		if (skip)
- 			continue;
- #endif
--		if (i2c_probe(j) == 0) {
-+#ifdef CONFIG_DM_I2C
-+		ret = i2c_probe(bus, j, 0, &dev);
-+#else
-+		ret = i2c_probe(j);
-+#endif
-+		if (ret == 0) {
- 			printf(" %02X", j);
- 			found++;
- 		}
-@@ -754,11 +958,15 @@
- static int do_i2c_loop(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
- {
- 	u_char	chip;
--	ulong	alen;
-+	int alen;
- 	uint	addr;
- 	uint	length;
- 	u_char	bytes[16];
- 	int	delay;
-+	int ret;
-+#ifdef CONFIG_DM_I2C
-+	struct udevice *dev;
-+#endif
- 
- 	if (argc < 3)
- 		return CMD_RET_USAGE;
-@@ -772,9 +980,16 @@
- 	 * Address is always specified.
- 	 */
- 	addr = simple_strtoul(argv[2], NULL, 16);
--	alen = get_alen(argv[2]);
-+	alen = get_alen(argv[2], DEFAULT_ADDR_LEN);
- 	if (alen > 3)
- 		return CMD_RET_USAGE;
-+#ifdef CONFIG_DM_I2C
-+	ret = i2c_get_cur_bus_chip(chip, &dev);
-+	if (!ret && alen != -1)
-+		ret = i2c_set_chip_offset_len(dev, alen);
-+	if (ret)
-+		return i2c_report_err(ret, I2C_ERR_WRITE);
-+#endif
- 
- 	/*
- 	 * Length is the number of objects, not number of bytes.
-@@ -794,8 +1009,13 @@
- 	 * Run the loop...
- 	 */
- 	while (1) {
--		if (i2c_read(chip, addr, alen, bytes, length) != 0)
--			i2c_report_err(-1, I2C_ERR_READ);
-+#ifdef CONFIG_DM_I2C
-+		ret = i2c_read(dev, addr, bytes, length);
-+#else
-+		ret = i2c_read(chip, addr, alen, bytes, length);
-+#endif
-+		if (ret)
-+			i2c_report_err(ret, I2C_ERR_READ);
- 		udelay(delay);
- 	}
- 
-@@ -1345,6 +1565,10 @@
- {
- 	u_char chip;
- 	struct edid1_info edid;
-+	int ret;
-+#ifdef CONFIG_DM_I2C
-+	struct udevice *dev;
-+#endif
- 
- 	if (argc < 2) {
- 		cmd_usage(cmdtp);
-@@ -1352,10 +1576,15 @@
- 	}
- 
- 	chip = simple_strtoul(argv[1], NULL, 16);
--	if (i2c_read(chip, 0, 1, (uchar *)&edid, sizeof(edid)) != 0) {
--		i2c_report_err(-1, I2C_ERR_READ);
--		return 1;
--	}
-+#ifdef CONFIG_DM_I2C
-+	ret = i2c_get_cur_bus_chip(chip, &dev);
-+	if (!ret)
-+		ret = i2c_read(dev, 0, (uchar *)&edid, sizeof(edid));
-+#else
-+	ret = i2c_read(chip, 0, 1, (uchar *)&edid, sizeof(edid));
-+#endif
-+	if (ret)
-+		return i2c_report_err(ret, I2C_ERR_READ);
- 
- 	if (edid_check_info(&edid)) {
- 		puts("Content isn't valid EDID.\n");
-@@ -1437,17 +1666,28 @@
-  * Returns zero on success, CMD_RET_USAGE in case of misuse and negative
-  * on error.
-  */
--#if defined(CONFIG_SYS_I2C) || defined(CONFIG_I2C_MULTI_BUS)
-+#if defined(CONFIG_SYS_I2C) || defined(CONFIG_I2C_MULTI_BUS) || \
-+		defined(CONFIG_DM_I2C)
- static int do_i2c_bus_num(cmd_tbl_t *cmdtp, int flag, int argc,
- 				char * const argv[])
- {
- 	int		ret = 0;
--	unsigned int	bus_no;
-+	int	bus_no;
- 
--	if (argc == 1)
-+	if (argc == 1) {
- 		/* querying current setting */
--		printf("Current bus is %d\n", i2c_get_bus_num());
--	else {
-+#ifdef CONFIG_DM_I2C
-+		struct udevice *bus;
-+
-+		if (!i2c_get_cur_bus(&bus))
-+			bus_no = bus->seq;
-+		else
-+			bus_no = -1;
-+#else
-+		bus_no = i2c_get_bus_num();
-+#endif
-+		printf("Current bus is %d\n", bus_no);
-+	} else {
- 		bus_no = simple_strtoul(argv[1], NULL, 10);
- #if defined(CONFIG_SYS_I2C)
- 		if (bus_no >= CONFIG_SYS_NUM_I2C_BUSES) {
-@@ -1478,13 +1718,28 @@
- {
- 	int speed, ret=0;
- 
--	if (argc == 1)
-+#ifdef CONFIG_DM_I2C
-+	struct udevice *bus;
-+
-+	if (i2c_get_cur_bus(&bus))
-+		return 1;
-+#endif
-+	if (argc == 1) {
-+#ifdef CONFIG_DM_I2C
-+		speed = i2c_get_bus_speed(bus);
-+#else
-+		speed = i2c_get_bus_speed();
-+#endif
- 		/* querying current speed */
--		printf("Current bus speed=%d\n", i2c_get_bus_speed());
--	else {
-+		printf("Current bus speed=%d\n", speed);
-+	} else {
- 		speed = simple_strtoul(argv[1], NULL, 10);
- 		printf("Setting bus speed to %d Hz\n", speed);
-+#ifdef CONFIG_DM_I2C
-+		ret = i2c_set_bus_speed(bus, speed);
-+#else
- 		ret = i2c_set_bus_speed(speed);
-+#endif
- 		if (ret)
- 			printf("Failure changing bus speed (%d)\n", ret);
- 	}
-@@ -1532,7 +1787,16 @@
-  */
- static int do_i2c_reset(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
- {
--#if defined(CONFIG_SYS_I2C)
-+#if defined(CONFIG_DM_I2C)
-+	struct udevice *bus;
-+
-+	if (i2c_get_cur_bus(&bus))
-+		return CMD_RET_FAILURE;
-+	if (i2c_deblock(bus)) {
-+		printf("Error: Not supported by the driver\n");
-+		return CMD_RET_FAILURE;
-+	}
-+#elif defined(CONFIG_SYS_I2C)
- 	i2c_init(I2C_ADAP->speed, I2C_ADAP->slaveaddr);
- #else
- 	i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
-@@ -1546,7 +1810,7 @@
- #endif
- 	U_BOOT_CMD_MKENT(crc32, 3, 1, do_i2c_crc, "", ""),
- #if defined(CONFIG_SYS_I2C) || \
--	defined(CONFIG_I2C_MULTI_BUS)
-+	defined(CONFIG_I2C_MULTI_BUS) || defined(CONFIG_DM_I2C)
- 	U_BOOT_CMD_MKENT(dev, 1, 1, do_i2c_bus_num, "", ""),
- #endif  /* CONFIG_I2C_MULTI_BUS */
- #if defined(CONFIG_I2C_EDID)
-@@ -1560,6 +1824,9 @@
- 	U_BOOT_CMD_MKENT(probe, 0, 1, do_i2c_probe, "", ""),
- 	U_BOOT_CMD_MKENT(read, 5, 1, do_i2c_read, "", ""),
- 	U_BOOT_CMD_MKENT(write, 5, 0, do_i2c_write, "", ""),
-+#ifdef CONFIG_DM_I2C
-+	U_BOOT_CMD_MKENT(flags, 2, 1, do_i2c_flags, "", ""),
-+#endif
- 	U_BOOT_CMD_MKENT(reset, 0, 1, do_i2c_reset, "", ""),
- #if defined(CONFIG_CMD_SDRAM)
- 	U_BOOT_CMD_MKENT(sdram, 1, 1, do_sdram, "", ""),
-@@ -1610,7 +1877,7 @@
- #endif
- 	"crc32 chip address[.0, .1, .2] count - compute CRC32 checksum\n"
- #if defined(CONFIG_SYS_I2C) || \
--	defined(CONFIG_I2C_MULTI_BUS)
-+	defined(CONFIG_I2C_MULTI_BUS) || defined(CONFIG_DM_I2C)
- 	"i2c dev [dev] - show or set current I2C bus\n"
- #endif  /* CONFIG_I2C_MULTI_BUS */
- #if defined(CONFIG_I2C_EDID)
-@@ -1622,8 +1889,11 @@
- 	"i2c mw chip address[.0, .1, .2] value [count] - write to I2C device (fill)\n"
- 	"i2c nm chip address[.0, .1, .2] - write to I2C device (constant address)\n"
- 	"i2c probe [address] - test for and show device(s) on the I2C bus\n"
--	"i2c read chip address[.0, .1, .2] length memaddress - read to memory \n"
-+	"i2c read chip address[.0, .1, .2] length memaddress - read to memory\n"
- 	"i2c write memaddress chip address[.0, .1, .2] length - write memory to i2c\n"
-+#ifdef CONFIG_DM_I2C
-+	"i2c flags chip [flags] - set or get chip flags\n"
-+#endif
- 	"i2c reset - re-init the I2C Controller\n"
- #if defined(CONFIG_CMD_SDRAM)
- 	"i2c sdram chip - print SDRAM configuration information\n"
-diff -ruN u-boot-2015.01-rc3/common/cmd_mmc.c u-boot/common/cmd_mmc.c
---- u-boot-2015.01-rc3/common/cmd_mmc.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/common/cmd_mmc.c	2015-01-01 17:34:32.529498727 +0100
-@@ -90,7 +90,8 @@
- 	puts("Capacity: ");
- 	print_size(mmc->capacity, "\n");
- 
--	printf("Bus Width: %d-bit\n", mmc->bus_width);
-+	printf("Bus Width: %d-bit%s\n", mmc->bus_width,
-+			mmc->ddr_mode ? " DDR" : "");
- }
- static struct mmc *init_mmc_device(int dev, bool force_init)
- {
-diff -ruN u-boot-2015.01-rc3/common/fb_mmc.c u-boot/common/fb_mmc.c
---- u-boot-2015.01-rc3/common/fb_mmc.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/common/fb_mmc.c	2015-01-01 17:34:32.537498596 +0100
-@@ -4,12 +4,17 @@
-  * SPDX-License-Identifier:	GPL-2.0+
-  */
- 
-+#include <config.h>
- #include <common.h>
- #include <fb_mmc.h>
- #include <part.h>
- #include <aboot.h>
- #include <sparse_format.h>
- 
-+#ifndef CONFIG_FASTBOOT_GPT_NAME
-+#define CONFIG_FASTBOOT_GPT_NAME GPT_ENTRY_NAME
-+#endif
-+
- /* The 64 defined bytes plus the '\0' */
- #define RESPONSE_LEN	(64 + 1)
- 
-@@ -62,7 +67,6 @@
- void fb_mmc_flash_write(const char *cmd, void *download_buffer,
- 			unsigned int download_bytes, char *response)
- {
--	int ret;
- 	block_dev_desc_t *dev_desc;
- 	disk_partition_t info;
- 
-@@ -76,8 +80,24 @@
- 		return;
- 	}
- 
--	ret = get_partition_info_efi_by_name(dev_desc, cmd, &info);
--	if (ret) {
-+	if (strcmp(cmd, CONFIG_FASTBOOT_GPT_NAME) == 0) {
-+		printf("%s: updating MBR, Primary and Backup GPT(s)\n",
-+		       __func__);
-+		if (is_valid_gpt_buf(dev_desc, download_buffer)) {
-+			printf("%s: invalid GPT - refusing to write to flash\n",
-+			       __func__);
-+			fastboot_fail("invalid GPT partition");
-+			return;
-+		}
-+		if (write_mbr_and_gpt_partitions(dev_desc, download_buffer)) {
-+			printf("%s: writing GPT partitions failed\n", __func__);
-+			fastboot_fail("writing GPT partitions failed");
-+			return;
-+		}
-+		printf("........ success\n");
-+		fastboot_okay("");
-+		return;
-+	} else if (get_partition_info_efi_by_name(dev_desc, cmd, &info)) {
- 		error("cannot find partition: '%s'\n", cmd);
- 		fastboot_fail("cannot find partition");
- 		return;
-diff -ruN u-boot-2015.01-rc3/common/hash.c u-boot/common/hash.c
---- u-boot-2015.01-rc3/common/hash.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/common/hash.c	2015-01-01 17:34:32.537498596 +0100
-@@ -256,7 +256,7 @@
- 			env_var = 1;
- 	}
- 
--	if (env_var) {
-+	if (!env_var) {
- 		ulong addr;
- 		void *buf;
- 
-@@ -347,7 +347,7 @@
- {
- 	ulong addr, len;
- 
--	if (argc < 2)
-+	if ((argc < 2) || ((flags & HASH_FLAG_VERIFY) && (argc < 3)))
- 		return CMD_RET_USAGE;
- 
- 	addr = simple_strtoul(*argv++, NULL, 16);
-@@ -380,8 +380,6 @@
- #else
- 		if (0) {
- #endif
--			if (!argc)
--				return CMD_RET_USAGE;
- 			if (parse_verify_sum(algo, *argv, vsum,
- 					flags & HASH_FLAG_ENV)) {
- 				printf("ERROR: %s does not contain a valid "
-diff -ruN u-boot-2015.01-rc3/configs/armadillo-800eva_defconfig u-boot/configs/armadillo-800eva_defconfig
---- u-boot-2015.01-rc3/configs/armadillo-800eva_defconfig	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/configs/armadillo-800eva_defconfig	2015-01-01 17:34:32.557498268 +0100
-@@ -1,3 +1,3 @@
- CONFIG_ARM=y
--+S:CONFIG_RMOBILE=y
-+CONFIG_RMOBILE=y
- CONFIG_TARGET_ARMADILLO_800EVA=y
-diff -ruN u-boot-2015.01-rc3/configs/crownbay_defconfig u-boot/configs/crownbay_defconfig
---- u-boot-2015.01-rc3/configs/crownbay_defconfig	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/configs/crownbay_defconfig	2015-01-01 17:34:32.561498202 +0100
-@@ -0,0 +1,6 @@
-+CONFIG_SYS_EXTRA_OPTIONS="SYS_TEXT_BASE=0xfff00000"
-+CONFIG_X86=y
-+CONFIG_TARGET_CROWNBAY=y
-+CONFIG_OF_CONTROL=y
-+CONFIG_OF_SEPARATE=y
-+CONFIG_DEFAULT_DEVICE_TREE="crownbay"
-diff -ruN u-boot-2015.01-rc3/configs/kzm9g_defconfig u-boot/configs/kzm9g_defconfig
---- u-boot-2015.01-rc3/configs/kzm9g_defconfig	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/configs/kzm9g_defconfig	2015-01-01 17:34:32.561498202 +0100
-@@ -1,3 +1,3 @@
- CONFIG_ARM=y
--+S:CONFIG_RMOBILE=y
-+CONFIG_RMOBILE=y
- CONFIG_TARGET_KZM9G=y
-diff -ruN u-boot-2015.01-rc3/configs/ls1021aqds_nand_defconfig u-boot/configs/ls1021aqds_nand_defconfig
---- u-boot-2015.01-rc3/configs/ls1021aqds_nand_defconfig	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/configs/ls1021aqds_nand_defconfig	2015-01-01 17:34:32.561498202 +0100
-@@ -0,0 +1,4 @@
-+CONFIG_SPL=y
-+CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SPL_FSL_PBL,NAND_BOOT"
-++S:CONFIG_ARM=y
-++S:CONFIG_TARGET_LS1021AQDS=y
-diff -ruN u-boot-2015.01-rc3/configs/ls1021aqds_qspi_defconfig u-boot/configs/ls1021aqds_qspi_defconfig
---- u-boot-2015.01-rc3/configs/ls1021aqds_qspi_defconfig	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/configs/ls1021aqds_qspi_defconfig	2015-01-01 17:34:32.561498202 +0100
-@@ -0,0 +1,3 @@
-+CONFIG_SYS_EXTRA_OPTIONS="QSPI_BOOT"
-++S:CONFIG_ARM=y
-++S:CONFIG_TARGET_LS1021AQDS=y
-diff -ruN u-boot-2015.01-rc3/configs/ls1021aqds_sdcard_defconfig u-boot/configs/ls1021aqds_sdcard_defconfig
---- u-boot-2015.01-rc3/configs/ls1021aqds_sdcard_defconfig	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/configs/ls1021aqds_sdcard_defconfig	2015-01-01 17:34:32.565498136 +0100
-@@ -0,0 +1,4 @@
-+CONFIG_SPL=y
-+CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SPL_FSL_PBL,SD_BOOT"
-++S:CONFIG_ARM=y
-++S:CONFIG_TARGET_LS1021AQDS=y
-diff -ruN u-boot-2015.01-rc3/configs/ls1021atwr_qspi_defconfig u-boot/configs/ls1021atwr_qspi_defconfig
---- u-boot-2015.01-rc3/configs/ls1021atwr_qspi_defconfig	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/configs/ls1021atwr_qspi_defconfig	2015-01-01 17:34:32.565498136 +0100
-@@ -0,0 +1,3 @@
-+CONFIG_SYS_EXTRA_OPTIONS="QSPI_BOOT"
-++S:CONFIG_ARM=y
-++S:CONFIG_TARGET_LS1021ATWR=y
-diff -ruN u-boot-2015.01-rc3/configs/ls1021atwr_sdcard_defconfig u-boot/configs/ls1021atwr_sdcard_defconfig
---- u-boot-2015.01-rc3/configs/ls1021atwr_sdcard_defconfig	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/configs/ls1021atwr_sdcard_defconfig	2015-01-01 17:34:32.565498136 +0100
-@@ -0,0 +1,4 @@
-+CONFIG_SPL=y
-+CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SPL_FSL_PBL,SD_BOOT"
-++S:CONFIG_ARM=y
-++S:CONFIG_TARGET_LS1021ATWR=y
-diff -ruN u-boot-2015.01-rc3/configs/nyan-big_defconfig u-boot/configs/nyan-big_defconfig
---- u-boot-2015.01-rc3/configs/nyan-big_defconfig	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/configs/nyan-big_defconfig	2015-01-01 17:34:32.565498136 +0100
-@@ -0,0 +1,5 @@
-++S:CONFIG_ARM=y
-++S:CONFIG_TEGRA=y
-++S:CONFIG_TEGRA124=y
-++S:CONFIG_TARGET_NYAN_BIG=y
-+CONFIG_DEFAULT_DEVICE_TREE="tegra124-nyan-big"
-diff -ruN u-boot-2015.01-rc3/configs/ph1_ld4_defconfig u-boot/configs/ph1_ld4_defconfig
---- u-boot-2015.01-rc3/configs/ph1_ld4_defconfig	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/configs/ph1_ld4_defconfig	2015-01-01 17:34:32.565498136 +0100
-@@ -1,4 +1,3 @@
--CONFIG_SPL=y
- CONFIG_FIT=y
- CONFIG_FIT_VERBOSE=y
- +S:CONFIG_ARM=y
-diff -ruN u-boot-2015.01-rc3/configs/ph1_pro4_defconfig u-boot/configs/ph1_pro4_defconfig
---- u-boot-2015.01-rc3/configs/ph1_pro4_defconfig	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/configs/ph1_pro4_defconfig	2015-01-01 17:34:32.565498136 +0100
-@@ -1,4 +1,3 @@
--CONFIG_SPL=y
- CONFIG_FIT=y
- CONFIG_FIT_VERBOSE=y
- +S:CONFIG_ARM=y
-diff -ruN u-boot-2015.01-rc3/configs/ph1_sld8_defconfig u-boot/configs/ph1_sld8_defconfig
---- u-boot-2015.01-rc3/configs/ph1_sld8_defconfig	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/configs/ph1_sld8_defconfig	2015-01-01 17:34:32.565498136 +0100
-@@ -1,4 +1,3 @@
--CONFIG_SPL=y
- CONFIG_FIT=y
- CONFIG_FIT_VERBOSE=y
- +S:CONFIG_ARM=y
-diff -ruN u-boot-2015.01-rc3/configs/stv0991_defconfig u-boot/configs/stv0991_defconfig
---- u-boot-2015.01-rc3/configs/stv0991_defconfig	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/configs/stv0991_defconfig	2015-01-01 17:34:32.569498072 +0100
-@@ -0,0 +1,3 @@
-+CONFIG_SYS_EXTRA_OPTIONS="stv0991"
-+CONFIG_ARM=y
-+CONFIG_TARGET_STV0991=y
-diff -ruN u-boot-2015.01-rc3/disk/part_efi.c u-boot/disk/part_efi.c
---- u-boot-2015.01-rc3/disk/part_efi.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/disk/part_efi.c	2015-01-01 17:34:32.573498006 +0100
-@@ -69,6 +69,107 @@
- 			sizeof(efi_guid_t));
- }
- 
-+static int validate_gpt_header(gpt_header *gpt_h, lbaint_t lba,
-+		lbaint_t lastlba)
-+{
-+	uint32_t crc32_backup = 0;
-+	uint32_t calc_crc32;
-+
-+	/* Check the GPT header signature */
-+	if (le64_to_cpu(gpt_h->signature) != GPT_HEADER_SIGNATURE) {
-+		printf("%s signature is wrong: 0x%llX != 0x%llX\n",
-+		       "GUID Partition Table Header",
-+		       le64_to_cpu(gpt_h->signature),
-+		       GPT_HEADER_SIGNATURE);
-+		return -1;
-+	}
-+
-+	/* Check the GUID Partition Table CRC */
-+	memcpy(&crc32_backup, &gpt_h->header_crc32, sizeof(crc32_backup));
-+	memset(&gpt_h->header_crc32, 0, sizeof(gpt_h->header_crc32));
-+
-+	calc_crc32 = efi_crc32((const unsigned char *)gpt_h,
-+		le32_to_cpu(gpt_h->header_size));
-+
-+	memcpy(&gpt_h->header_crc32, &crc32_backup, sizeof(crc32_backup));
-+
-+	if (calc_crc32 != le32_to_cpu(crc32_backup)) {
-+		printf("%s CRC is wrong: 0x%x != 0x%x\n",
-+		       "GUID Partition Table Header",
-+		       le32_to_cpu(crc32_backup), calc_crc32);
-+		return -1;
-+	}
-+
-+	/*
-+	 * Check that the my_lba entry points to the LBA that contains the GPT
-+	 */
-+	if (le64_to_cpu(gpt_h->my_lba) != lba) {
-+		printf("GPT: my_lba incorrect: %llX != " LBAF "\n",
-+		       le64_to_cpu(gpt_h->my_lba),
-+		       lba);
-+		return -1;
-+	}
-+
-+	/*
-+	 * Check that the first_usable_lba and that the last_usable_lba are
-+	 * within the disk.
-+	 */
-+	if (le64_to_cpu(gpt_h->first_usable_lba) > lastlba) {
-+		printf("GPT: first_usable_lba incorrect: %llX > " LBAF "\n",
-+		       le64_to_cpu(gpt_h->first_usable_lba), lastlba);
-+		return -1;
-+	}
-+	if (le64_to_cpu(gpt_h->last_usable_lba) > lastlba) {
-+		printf("GPT: last_usable_lba incorrect: %llX > " LBAF "\n",
-+		       le64_to_cpu(gpt_h->last_usable_lba), lastlba);
-+		return -1;
-+	}
-+
-+	debug("GPT: first_usable_lba: %llX last_usable_lba: %llX last lba: "
-+	      LBAF "\n", le64_to_cpu(gpt_h->first_usable_lba),
-+	      le64_to_cpu(gpt_h->last_usable_lba), lastlba);
-+
-+	return 0;
-+}
-+
-+static int validate_gpt_entries(gpt_header *gpt_h, gpt_entry *gpt_e)
-+{
-+	uint32_t calc_crc32;
-+
-+	/* Check the GUID Partition Table Entry Array CRC */
-+	calc_crc32 = efi_crc32((const unsigned char *)gpt_e,
-+		le32_to_cpu(gpt_h->num_partition_entries) *
-+		le32_to_cpu(gpt_h->sizeof_partition_entry));
-+
-+	if (calc_crc32 != le32_to_cpu(gpt_h->partition_entry_array_crc32)) {
-+		printf("%s: 0x%x != 0x%x\n",
-+		       "GUID Partition Table Entry Array CRC is wrong",
-+		       le32_to_cpu(gpt_h->partition_entry_array_crc32),
-+		       calc_crc32);
-+		return -1;
-+	}
-+
-+	return 0;
-+}
-+
-+static void prepare_backup_gpt_header(gpt_header *gpt_h)
-+{
-+	uint32_t calc_crc32;
-+	uint64_t val;
-+
-+	/* recalculate the values for the Backup GPT Header */
-+	val = le64_to_cpu(gpt_h->my_lba);
-+	gpt_h->my_lba = gpt_h->alternate_lba;
-+	gpt_h->alternate_lba = cpu_to_le64(val);
-+	gpt_h->partition_entry_lba =
-+			cpu_to_le64(le64_to_cpu(gpt_h->last_usable_lba) + 1);
-+	gpt_h->header_crc32 = 0;
-+
-+	calc_crc32 = efi_crc32((const unsigned char *)gpt_h,
-+			       le32_to_cpu(gpt_h->header_size));
-+	gpt_h->header_crc32 = cpu_to_le32(calc_crc32);
-+}
-+
- #ifdef CONFIG_EFI_PARTITION
- /*
-  * Public Functions (include/part.h)
-@@ -259,7 +360,6 @@
- 	const int pte_blk_cnt = BLOCK_CNT((gpt_h->num_partition_entries
- 					   * sizeof(gpt_entry)), dev_desc);
- 	u32 calc_crc32;
--	u64 val;
- 
- 	debug("max lba: %x\n", (u32) dev_desc->lba);
- 	/* Setup the Protective MBR */
-@@ -284,15 +384,7 @@
- 	    != pte_blk_cnt)
- 		goto err;
- 
--	/* recalculate the values for the Backup GPT Header */
--	val = le64_to_cpu(gpt_h->my_lba);
--	gpt_h->my_lba = gpt_h->alternate_lba;
--	gpt_h->alternate_lba = cpu_to_le64(val);
--	gpt_h->header_crc32 = 0;
--
--	calc_crc32 = efi_crc32((const unsigned char *)gpt_h,
--			      le32_to_cpu(gpt_h->header_size));
--	gpt_h->header_crc32 = cpu_to_le32(calc_crc32);
-+	prepare_backup_gpt_header(gpt_h);
- 
- 	if (dev_desc->block_write(dev_desc->dev,
- 				  (lbaint_t)le64_to_cpu(gpt_h->last_usable_lba)
-@@ -455,6 +547,97 @@
- 	free(gpt_h);
- 	return ret;
- }
-+
-+int is_valid_gpt_buf(block_dev_desc_t *dev_desc, void *buf)
-+{
-+	gpt_header *gpt_h;
-+	gpt_entry *gpt_e;
-+
-+	/* determine start of GPT Header in the buffer */
-+	gpt_h = buf + (GPT_PRIMARY_PARTITION_TABLE_LBA *
-+		       dev_desc->blksz);
-+	if (validate_gpt_header(gpt_h, GPT_PRIMARY_PARTITION_TABLE_LBA,
-+				dev_desc->lba))
-+		return -1;
-+
-+	/* determine start of GPT Entries in the buffer */
-+	gpt_e = buf + (le64_to_cpu(gpt_h->partition_entry_lba) *
-+		       dev_desc->blksz);
-+	if (validate_gpt_entries(gpt_h, gpt_e))
-+		return -1;
-+
-+	return 0;
-+}
-+
-+int write_mbr_and_gpt_partitions(block_dev_desc_t *dev_desc, void *buf)
-+{
-+	gpt_header *gpt_h;
-+	gpt_entry *gpt_e;
-+	int gpt_e_blk_cnt;
-+	lbaint_t lba;
-+	int cnt;
-+
-+	if (is_valid_gpt_buf(dev_desc, buf))
-+		return -1;
-+
-+	/* determine start of GPT Header in the buffer */
-+	gpt_h = buf + (GPT_PRIMARY_PARTITION_TABLE_LBA *
-+		       dev_desc->blksz);
-+
-+	/* determine start of GPT Entries in the buffer */
-+	gpt_e = buf + (le64_to_cpu(gpt_h->partition_entry_lba) *
-+		       dev_desc->blksz);
-+	gpt_e_blk_cnt = BLOCK_CNT((le32_to_cpu(gpt_h->num_partition_entries) *
-+				   le32_to_cpu(gpt_h->sizeof_partition_entry)),
-+				  dev_desc);
-+
-+	/* write MBR */
-+	lba = 0;	/* MBR is always at 0 */
-+	cnt = 1;	/* MBR (1 block) */
-+	if (dev_desc->block_write(dev_desc->dev, lba, cnt, buf) != cnt) {
-+		printf("%s: failed writing '%s' (%d blks at 0x" LBAF ")\n",
-+		       __func__, "MBR", cnt, lba);
-+		return 1;
-+	}
-+
-+	/* write Primary GPT */
-+	lba = GPT_PRIMARY_PARTITION_TABLE_LBA;
-+	cnt = 1;	/* GPT Header (1 block) */
-+	if (dev_desc->block_write(dev_desc->dev, lba, cnt, gpt_h) != cnt) {
-+		printf("%s: failed writing '%s' (%d blks at 0x" LBAF ")\n",
-+		       __func__, "Primary GPT Header", cnt, lba);
-+		return 1;
-+	}
-+
-+	lba = le64_to_cpu(gpt_h->partition_entry_lba);
-+	cnt = gpt_e_blk_cnt;
-+	if (dev_desc->block_write(dev_desc->dev, lba, cnt, gpt_e) != cnt) {
-+		printf("%s: failed writing '%s' (%d blks at 0x" LBAF ")\n",
-+		       __func__, "Primary GPT Entries", cnt, lba);
-+		return 1;
-+	}
-+
-+	prepare_backup_gpt_header(gpt_h);
-+
-+	/* write Backup GPT */
-+	lba = le64_to_cpu(gpt_h->partition_entry_lba);
-+	cnt = gpt_e_blk_cnt;
-+	if (dev_desc->block_write(dev_desc->dev, lba, cnt, gpt_e) != cnt) {
-+		printf("%s: failed writing '%s' (%d blks at 0x" LBAF ")\n",
-+		       __func__, "Backup GPT Entries", cnt, lba);
-+		return 1;
-+	}
-+
-+	lba = le64_to_cpu(gpt_h->my_lba);
-+	cnt = 1;	/* GPT Header (1 block) */
-+	if (dev_desc->block_write(dev_desc->dev, lba, cnt, gpt_h) != cnt) {
-+		printf("%s: failed writing '%s' (%d blks at 0x" LBAF ")\n",
-+		       __func__, "Backup GPT Header", cnt, lba);
-+		return 1;
-+	}
-+
-+	return 0;
-+}
- #endif
- 
- /*
-@@ -511,10 +694,6 @@
- static int is_gpt_valid(block_dev_desc_t *dev_desc, u64 lba,
- 			gpt_header *pgpt_head, gpt_entry **pgpt_pte)
- {
--	u32 crc32_backup = 0;
--	u32 calc_crc32;
--	u64 lastlba;
--
- 	if (!dev_desc || !pgpt_head) {
- 		printf("%s: Invalid Argument(s)\n", __func__);
- 		return 0;
-@@ -527,55 +706,8 @@
- 		return 0;
- 	}
- 
--	/* Check the GPT header signature */
--	if (le64_to_cpu(pgpt_head->signature) != GPT_HEADER_SIGNATURE) {
--		printf("GUID Partition Table Header signature is wrong:"
--			"0x%llX != 0x%llX\n",
--			le64_to_cpu(pgpt_head->signature),
--			GPT_HEADER_SIGNATURE);
--		return 0;
--	}
--
--	/* Check the GUID Partition Table CRC */
--	memcpy(&crc32_backup, &pgpt_head->header_crc32, sizeof(crc32_backup));
--	memset(&pgpt_head->header_crc32, 0, sizeof(pgpt_head->header_crc32));
--
--	calc_crc32 = efi_crc32((const unsigned char *)pgpt_head,
--		le32_to_cpu(pgpt_head->header_size));
--
--	memcpy(&pgpt_head->header_crc32, &crc32_backup, sizeof(crc32_backup));
--
--	if (calc_crc32 != le32_to_cpu(crc32_backup)) {
--		printf("GUID Partition Table Header CRC is wrong:"
--			"0x%x != 0x%x\n",
--		       le32_to_cpu(crc32_backup), calc_crc32);
--		return 0;
--	}
--
--	/* Check that the my_lba entry points to the LBA that contains the GPT */
--	if (le64_to_cpu(pgpt_head->my_lba) != lba) {
--		printf("GPT: my_lba incorrect: %llX != %" PRIX64 "\n",
--		       le64_to_cpu(pgpt_head->my_lba),
--		       lba);
-+	if (validate_gpt_header(pgpt_head, (lbaint_t)lba, dev_desc->lba))
- 		return 0;
--	}
--
--	/* Check the first_usable_lba and last_usable_lba are within the disk. */
--	lastlba = (u64)dev_desc->lba;
--	if (le64_to_cpu(pgpt_head->first_usable_lba) > lastlba) {
--		printf("GPT: first_usable_lba incorrect: %llX > %" PRIX64 "\n",
--		       le64_to_cpu(pgpt_head->first_usable_lba), lastlba);
--		return 0;
--	}
--	if (le64_to_cpu(pgpt_head->last_usable_lba) > lastlba) {
--		printf("GPT: last_usable_lba incorrect: %llX > %" PRIX64 "\n",
--		       le64_to_cpu(pgpt_head->last_usable_lba), lastlba);
--		return 0;
--	}
--
--	debug("GPT: first_usable_lba: %llX last_usable_lba %llX last lba %"
--	      PRIX64 "\n", le64_to_cpu(pgpt_head->first_usable_lba),
--	      le64_to_cpu(pgpt_head->last_usable_lba), lastlba);
- 
- 	/* Read and allocate Partition Table Entries */
- 	*pgpt_pte = alloc_read_gpt_entries(dev_desc, pgpt_head);
-@@ -584,17 +716,7 @@
- 		return 0;
- 	}
- 
--	/* Check the GUID Partition Table Entry Array CRC */
--	calc_crc32 = efi_crc32((const unsigned char *)*pgpt_pte,
--		le32_to_cpu(pgpt_head->num_partition_entries) *
--		le32_to_cpu(pgpt_head->sizeof_partition_entry));
--
--	if (calc_crc32 != le32_to_cpu(pgpt_head->partition_entry_array_crc32)) {
--		printf("GUID Partition Table Entry Array CRC is wrong:"
--			"0x%x != 0x%x\n",
--			le32_to_cpu(pgpt_head->partition_entry_array_crc32),
--			calc_crc32);
--
-+	if (validate_gpt_entries(pgpt_head, *pgpt_pte)) {
- 		free(*pgpt_pte);
- 		return 0;
- 	}
-diff -ruN u-boot-2015.01-rc3/doc/README.x86 u-boot/doc/README.x86
---- u-boot-2015.01-rc3/doc/README.x86	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/doc/README.x86	2015-01-01 17:34:32.597497612 +0100
-@@ -0,0 +1,126 @@
-+#
-+# Copyright (C) 2014, Simon Glass <sjg at chromium.org>
-+# Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+#
-+# SPDX-License-Identifier:	GPL-2.0+
-+#
-+
-+U-Boot on x86
-+=============
-+
-+This document describes the information about U-Boot running on x86 targets,
-+including supported boards, build instructions, todo list, etc.
-+
-+Status
-+------
-+U-Boot supports running as a coreboot [1] payload on x86. So far only Link
-+(Chromebook Pixel) has been tested, but it should work with minimal adjustments
-+on other x86 boards since coreboot deals with most of the low-level details.
-+
-+U-Boot also supports booting directly from x86 reset vector without coreboot,
-+aka raw support or bare support. Currently Link and Intel Crown Bay board
-+support running U-Boot 'bare metal'.
-+
-+As for loading OS, U-Boot supports directly booting a 32-bit or 64-bit Linux
-+kernel as part of a FIT image. It also supports a compressed zImage.
-+
-+Build Instructions
-+------------------
-+Building U-Boot as a coreboot payload is just like building U-Boot for targets
-+on other architectures, like below:
-+
-+$ make coreboot-x86_defconfig
-+$ make all
-+
-+Building ROM version of U-Boot (hereafter referred to as u-boot.rom) is a
-+little bit tricky, as generally it requires several binary blobs which are not
-+shipped in the U-Boot source tree. Due to this reason, the u-boot.rom build is
-+not turned on by default in the U-Boot source tree. Firstly, you need turn it
-+on by uncommenting the following line in the main U-Boot Makefile:
-+
-+# ALL-$(CONFIG_X86_RESET_VECTOR) += u-boot.rom
-+
-+Link-specific instructions:
-+
-+First, you need the following binary blobs:
-+
-+* descriptor.bin - Intel flash descriptor
-+* me.bin - Intel Management Engine
-+* mrc.bin - Memory Reference Code, which sets up SDRAM
-+* video ROM - sets up the display
-+
-+You can get these binary blobs by:
-+
-+$ git clone http://review.coreboot.org/p/blobs.git
-+$ cd blobs
-+
-+Find the following files:
-+
-+* ./mainboard/google/link/descriptor.bin
-+* ./mainboard/google/link/me.bin
-+* ./northbridge/intel/sandybridge/systemagent-ivybridge.bin
-+
-+The 3rd one should be renamed to mrc.bin.
-+As for the video ROM, you can get it here [2].
-+Make sure all these binary blobs are put in the board directory.
-+
-+Now you can build U-Boot and obtain u-boot.rom:
-+
-+$ make chromebook_link_defconfig
-+$ make all
-+
-+Intel Crown Bay specific instructions:
-+
-+U-Boot support of Intel Crown Bay board [3] relies on a binary blob called
-+Firmware Support Package [4] to perform all the necessary initialization steps
-+as documented in the BIOS Writer Guide, including initialization of the CPU,
-+memory controller, chipset and certain bus interfaces.
-+
-+Download the Intel FSP for Atom E6xx series and Platform Controller Hub EG20T,
-+install it on your host and locate the FSP binary blob. Note this platform
-+also requires a Chipset Micro Code (CMC) state machine binary to be present in
-+the SPI flash where u-boot.rom resides, and this CMC binary blob can be found
-+in this FSP package too.
-+
-+* ./FSP/QUEENSBAY_FSP_GOLD_001_20-DECEMBER-2013.fd
-+* ./Microcode/C0_22211.BIN
-+
-+Rename the first one to fsp.bin and second one to cmc.bin and put them in the
-+board directory.
-+
-+Now you can build U-Boot and obtaim u-boot.rom
-+
-+$ make crownbay_defconfig
-+$ make all
-+
-+CPU Microcode
-+-------------
-+Modern CPU usually requires a special bit stream called microcode [5] to be
-+loaded on the processor after power up in order to function properly. U-Boot
-+has already integrated these as hex dumps in the source tree.
-+
-+Driver Model
-+------------
-+x86 has been converted to use driver model for serial and GPIO.
-+
-+Device Tree
-+-----------
-+x86 uses device tree to configure the board thus requires CONFIG_OF_CONTROL to
-+be turned on. Not every device on the board is configured via devie tree, but
-+more and more devices will be added as time goes by. Check out the directory
-+arch/x86/dts/ for these device tree source files.
-+
-+TODO List
-+---------
-+- MTRR support (for performance)
-+- Audio
-+- Chrome OS verified boot
-+- SMI and ACPI support, to provide platform info and facilities to Linux
-+
-+References
-+----------
-+[1] http://www.coreboot.org
-+[2] http://www.coreboot.org/~stepan/pci8086,0166.rom
-+[3] http://www.intel.com/content/www/us/en/embedded/design-tools/evaluation-platforms/atom-e660-eg20t-development-kit.html
-+[4] http://www.intel.com/fsp
-+[5] http://en.wikipedia.org/wiki/Microcode
-diff -ruN u-boot-2015.01-rc3/drivers/bios_emulator/besys.c u-boot/drivers/bios_emulator/besys.c
---- u-boot-2015.01-rc3/drivers/bios_emulator/besys.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/bios_emulator/besys.c	2015-01-01 17:34:32.605497481 +0100
-@@ -48,8 +48,8 @@
- ****************************************************************************/
- 
- #define __io
--#include <asm/io.h>
- #include <common.h>
-+#include <asm/io.h>
- #include "biosemui.h"
- 
- /*------------------------- Global Variables ------------------------------*/
-diff -ruN u-boot-2015.01-rc3/drivers/bios_emulator/bios.c u-boot/drivers/bios_emulator/bios.c
---- u-boot-2015.01-rc3/drivers/bios_emulator/bios.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/bios_emulator/bios.c	2015-01-01 17:34:32.605497481 +0100
-@@ -42,8 +42,8 @@
- ****************************************************************************/
- 
- #define __io
--#include <asm/io.h>
- #include <common.h>
-+#include <asm/io.h>
- #include "biosemui.h"
- 
- /*----------------------------- Implementation ----------------------------*/
-diff -ruN u-boot-2015.01-rc3/drivers/block/dwc_ahsata.c u-boot/drivers/block/dwc_ahsata.c
---- u-boot-2015.01-rc3/drivers/block/dwc_ahsata.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/block/dwc_ahsata.c	2015-01-01 17:34:32.613497350 +0100
-@@ -594,22 +594,24 @@
- 
- int reset_sata(int dev)
- {
--	struct ahci_probe_ent *probe_ent =
--			(struct ahci_probe_ent *)sata_dev_desc[dev].priv;
--	struct sata_host_regs *host_mmio =
--			(struct sata_host_regs *)probe_ent->mmio_base;
-+	struct ahci_probe_ent *probe_ent;
-+	struct sata_host_regs *host_mmio;
- 
- 	if (dev < 0 || dev > (CONFIG_SYS_SATA_MAX_DEVICE - 1)) {
- 		printf("The sata index %d is out of ranges\n\r", dev);
- 		return -1;
- 	}
- 
-+	probe_ent = (struct ahci_probe_ent *)sata_dev_desc[dev].priv;
-+	if (NULL == probe_ent)
-+		/* not initialized, so nothing to reset */
-+		return 0;
-+
-+	host_mmio = (struct sata_host_regs *)probe_ent->mmio_base;
- 	setbits_le32(&host_mmio->ghc, SATA_HOST_GHC_HR);
- 	while (readl(&host_mmio->ghc) & SATA_HOST_GHC_HR)
- 		udelay(100);
- 
--	disable_sata_clock();
--
- 	return 0;
- }
- 
-diff -ruN u-boot-2015.01-rc3/drivers/core/device.c u-boot/drivers/core/device.c
---- u-boot-2015.01-rc3/drivers/core/device.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/core/device.c	2015-01-01 17:34:32.621497219 +0100
-@@ -234,7 +234,7 @@
- void *dev_get_platdata(struct udevice *dev)
- {
- 	if (!dev) {
--		dm_warn("%s: null device", __func__);
-+		dm_warn("%s: null device\n", __func__);
- 		return NULL;
- 	}
- 
-@@ -244,7 +244,7 @@
- void *dev_get_priv(struct udevice *dev)
- {
- 	if (!dev) {
--		dm_warn("%s: null device", __func__);
-+		dm_warn("%s: null device\n", __func__);
- 		return NULL;
- 	}
- 
-@@ -254,7 +254,7 @@
- void *dev_get_parentdata(struct udevice *dev)
- {
- 	if (!dev) {
--		dm_warn("%s: null device", __func__);
-+		dm_warn("%s: null device\n", __func__);
- 		return NULL;
- 	}
- 
-diff -ruN u-boot-2015.01-rc3/drivers/crypto/fsl/jr.c u-boot/drivers/crypto/fsl/jr.c
---- u-boot-2015.01-rc3/drivers/crypto/fsl/jr.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/crypto/fsl/jr.c	2015-01-01 17:34:32.621497219 +0100
-@@ -246,7 +246,7 @@
- 	struct result op;
- 	int ret = 0;
- 
--	memset(&op, sizeof(op), 0);
-+	memset(&op, 0, sizeof(op));
- 
- 	ret = jr_enqueue(desc, desc_done, &op);
- 	if (ret) {
-diff -ruN u-boot-2015.01-rc3/drivers/ddr/fsl/arm_ddr_gen3.c u-boot/drivers/ddr/fsl/arm_ddr_gen3.c
---- u-boot-2015.01-rc3/drivers/ddr/fsl/arm_ddr_gen3.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/ddr/fsl/arm_ddr_gen3.c	2015-01-01 17:34:32.621497219 +0100
-@@ -92,7 +92,6 @@
- 	ddr_out32(&ddr->timing_cfg_0, regs->timing_cfg_0);
- 	ddr_out32(&ddr->timing_cfg_1, regs->timing_cfg_1);
- 	ddr_out32(&ddr->timing_cfg_2, regs->timing_cfg_2);
--	ddr_out32(&ddr->sdram_cfg_2, regs->ddr_sdram_cfg_2);
- 	ddr_out32(&ddr->sdram_mode, regs->ddr_sdram_mode);
- 	ddr_out32(&ddr->sdram_mode_2, regs->ddr_sdram_mode_2);
- 	ddr_out32(&ddr->sdram_mode_3, regs->ddr_sdram_mode_3);
-@@ -105,9 +104,6 @@
- 	ddr_out32(&ddr->sdram_interval, regs->ddr_sdram_interval);
- 	ddr_out32(&ddr->sdram_data_init, regs->ddr_data_init);
- 	ddr_out32(&ddr->sdram_clk_cntl, regs->ddr_sdram_clk_cntl);
--	ddr_out32(&ddr->init_addr, regs->ddr_init_addr);
--	ddr_out32(&ddr->init_ext_addr, regs->ddr_init_ext_addr);
--
- 	ddr_out32(&ddr->timing_cfg_4, regs->timing_cfg_4);
- 	ddr_out32(&ddr->timing_cfg_5, regs->timing_cfg_5);
- 	ddr_out32(&ddr->ddr_zq_cntl, regs->ddr_zq_cntl);
-@@ -128,7 +124,24 @@
- 	ddr_out32(&ddr->ddr_sdram_rcw_1, regs->ddr_sdram_rcw_1);
- 	ddr_out32(&ddr->ddr_sdram_rcw_2, regs->ddr_sdram_rcw_2);
- 	ddr_out32(&ddr->ddr_cdr1, regs->ddr_cdr1);
--	ddr_out32(&ddr->ddr_cdr2, regs->ddr_cdr2);
-+#ifdef CONFIG_DEEP_SLEEP
-+	if (is_warm_boot()) {
-+		ddr_out32(&ddr->sdram_cfg_2,
-+			  regs->ddr_sdram_cfg_2 & ~SDRAM_CFG2_D_INIT);
-+		ddr_out32(&ddr->init_addr, CONFIG_SYS_SDRAM_BASE);
-+		ddr_out32(&ddr->init_ext_addr, DDR_INIT_ADDR_EXT_UIA);
-+
-+		/* DRAM VRef will not be trained */
-+		ddr_out32(&ddr->ddr_cdr2,
-+			  regs->ddr_cdr2 & ~DDR_CDR2_VREF_TRAIN_EN);
-+	} else
-+#endif
-+	{
-+		ddr_out32(&ddr->sdram_cfg_2, regs->ddr_sdram_cfg_2);
-+		ddr_out32(&ddr->init_addr, regs->ddr_init_addr);
-+		ddr_out32(&ddr->init_ext_addr, regs->ddr_init_ext_addr);
-+		ddr_out32(&ddr->ddr_cdr2, regs->ddr_cdr2);
-+	}
- 	ddr_out32(&ddr->err_disable, regs->err_disable);
- 	ddr_out32(&ddr->err_int_en, regs->err_int_en);
- 	for (i = 0; i < 32; i++) {
-@@ -167,8 +180,20 @@
- 	udelay(500);
- 	asm volatile("dsb sy;isb");
- 
-+#ifdef CONFIG_DEEP_SLEEP
-+	if (is_warm_boot()) {
-+		/* enter self-refresh */
-+		temp_sdram_cfg = ddr_in32(&ddr->sdram_cfg_2);
-+		temp_sdram_cfg |= SDRAM_CFG2_FRC_SR;
-+		ddr_out32(&ddr->sdram_cfg_2, temp_sdram_cfg);
-+		/* do board specific memory setup */
-+		board_mem_sleep_setup();
-+
-+		temp_sdram_cfg = (ddr_in32(&ddr->sdram_cfg) | SDRAM_CFG_BI);
-+	} else
-+#endif
-+		temp_sdram_cfg = ddr_in32(&ddr->sdram_cfg) & ~SDRAM_CFG_BI;
- 	/* Let the controller go */
--	temp_sdram_cfg = ddr_in32(&ddr->sdram_cfg) & ~SDRAM_CFG_BI;
- 	ddr_out32(&ddr->sdram_cfg, temp_sdram_cfg | SDRAM_CFG_MEM_EN);
- 	asm volatile("dsb sy;isb");
- 
-@@ -211,4 +236,12 @@
- 
- 	if (timeout <= 0)
- 		printf("Waiting for D_INIT timeout. Memory may not work.\n");
-+#ifdef CONFIG_DEEP_SLEEP
-+	if (is_warm_boot()) {
-+		/* exit self-refresh */
-+		temp_sdram_cfg = ddr_in32(&ddr->sdram_cfg_2);
-+		temp_sdram_cfg &= ~SDRAM_CFG2_FRC_SR;
-+		ddr_out32(&ddr->sdram_cfg_2, temp_sdram_cfg);
-+	}
-+#endif
- }
-diff -ruN u-boot-2015.01-rc3/drivers/ddr/fsl/ctrl_regs.c u-boot/drivers/ddr/fsl/ctrl_regs.c
---- u-boot-2015.01-rc3/drivers/ddr/fsl/ctrl_regs.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/ddr/fsl/ctrl_regs.c	2015-01-01 17:34:32.625497153 +0100
-@@ -324,6 +324,7 @@
- #elif defined(CONFIG_SYS_FSL_DDR3)
- 	unsigned int data_rate = get_ddr_freq(0);
- 	int txp;
-+	unsigned int ip_rev;
- 	int odt_overlap;
- 	/*
- 	 * (tXARD and tXARDS). Empirical?
-@@ -336,7 +337,25 @@
- 	 */
- 	txp = max((int)mclk_ps * 3, (mclk_ps > 1540 ? 7500 : 6000));
- 
--	tmrd_mclk = 4;
-+	ip_rev = fsl_ddr_get_version();
-+	if (ip_rev >= 0x40700) {
-+		/*
-+		 * MRS_CYC = max(tMRD, tMOD)
-+		 * tMRD = 4nCK (8nCK for RDIMM)
-+		 * tMOD = max(12nCK, 15ns)
-+		 */
-+		tmrd_mclk = max((unsigned int)12, picos_to_mclk(15000));
-+	} else {
-+		/*
-+		 * MRS_CYC = tMRD
-+		 * tMRD = 4nCK (8nCK for RDIMM)
-+		 */
-+		if (popts->registered_dimm_en)
-+			tmrd_mclk = 8;
-+		else
-+			tmrd_mclk = 4;
-+	}
-+
- 	/* set the turnaround time */
- 
- 	/*
-diff -ruN u-boot-2015.01-rc3/drivers/ddr/fsl/fsl_ddr_gen4.c u-boot/drivers/ddr/fsl/fsl_ddr_gen4.c
---- u-boot-2015.01-rc3/drivers/ddr/fsl/fsl_ddr_gen4.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/ddr/fsl/fsl_ddr_gen4.c	2015-01-01 17:34:32.625497153 +0100
-@@ -103,7 +103,6 @@
- 	ddr_out32(&ddr->dq_map_1, regs->dq_map_1);
- 	ddr_out32(&ddr->dq_map_2, regs->dq_map_2);
- 	ddr_out32(&ddr->dq_map_3, regs->dq_map_3);
--	ddr_out32(&ddr->sdram_cfg_2, regs->ddr_sdram_cfg_2);
- 	ddr_out32(&ddr->sdram_cfg_3, regs->ddr_sdram_cfg_3);
- 	ddr_out32(&ddr->sdram_mode, regs->ddr_sdram_mode);
- 	ddr_out32(&ddr->sdram_mode_2, regs->ddr_sdram_mode_2);
-@@ -124,8 +123,6 @@
- 	ddr_out32(&ddr->sdram_md_cntl, regs->ddr_sdram_md_cntl);
- 	ddr_out32(&ddr->sdram_interval, regs->ddr_sdram_interval);
- 	ddr_out32(&ddr->sdram_data_init, regs->ddr_data_init);
--	ddr_out32(&ddr->init_addr, regs->ddr_init_addr);
--	ddr_out32(&ddr->init_ext_addr, regs->ddr_init_ext_addr);
- 	ddr_out32(&ddr->ddr_wrlvl_cntl, regs->ddr_wrlvl_cntl);
- #ifndef CONFIG_SYS_FSL_DDR_EMU
- 	/*
-@@ -147,7 +144,24 @@
- 	ddr_out32(&ddr->ddr_sdram_rcw_5, regs->ddr_sdram_rcw_5);
- 	ddr_out32(&ddr->ddr_sdram_rcw_6, regs->ddr_sdram_rcw_6);
- 	ddr_out32(&ddr->ddr_cdr1, regs->ddr_cdr1);
--	ddr_out32(&ddr->ddr_cdr2, regs->ddr_cdr2);
-+#ifdef CONFIG_DEEP_SLEEP
-+	if (is_warm_boot()) {
-+		ddr_out32(&ddr->sdram_cfg_2,
-+			  regs->ddr_sdram_cfg_2 & ~SDRAM_CFG2_D_INIT);
-+		ddr_out32(&ddr->init_addr, CONFIG_SYS_SDRAM_BASE);
-+		ddr_out32(&ddr->init_ext_addr, DDR_INIT_ADDR_EXT_UIA);
-+
-+		/* DRAM VRef will not be trained */
-+		ddr_out32(&ddr->ddr_cdr2,
-+			  regs->ddr_cdr2 & ~DDR_CDR2_VREF_TRAIN_EN);
-+	} else
-+#endif
-+	{
-+		ddr_out32(&ddr->sdram_cfg_2, regs->ddr_sdram_cfg_2);
-+		ddr_out32(&ddr->init_addr, regs->ddr_init_addr);
-+		ddr_out32(&ddr->init_ext_addr, regs->ddr_init_ext_addr);
-+		ddr_out32(&ddr->ddr_cdr2, regs->ddr_cdr2);
-+	}
- 	ddr_out32(&ddr->err_disable, regs->err_disable);
- 	ddr_out32(&ddr->err_int_en, regs->err_int_en);
- 	for (i = 0; i < 32; i++) {
-@@ -187,8 +201,20 @@
- 	mb();
- 	isb();
- 
-+#ifdef CONFIG_DEEP_SLEEP
-+	if (is_warm_boot()) {
-+		/* enter self-refresh */
-+		temp_sdram_cfg = ddr_in32(&ddr->sdram_cfg_2);
-+		temp_sdram_cfg |= SDRAM_CFG2_FRC_SR;
-+		ddr_out32(&ddr->sdram_cfg_2, temp_sdram_cfg);
-+		/* do board specific memory setup */
-+		board_mem_sleep_setup();
-+
-+		temp_sdram_cfg = (ddr_in32(&ddr->sdram_cfg) | SDRAM_CFG_BI);
-+	} else
-+#endif
-+		temp_sdram_cfg = ddr_in32(&ddr->sdram_cfg) & ~SDRAM_CFG_BI;
- 	/* Let the controller go */
--	temp_sdram_cfg = ddr_in32(&ddr->sdram_cfg) & ~SDRAM_CFG_BI;
- 	ddr_out32(&ddr->sdram_cfg, temp_sdram_cfg | SDRAM_CFG_MEM_EN);
- 	mb();
- 	isb();
-@@ -233,4 +259,12 @@
- 
- 	if (timeout <= 0)
- 		printf("Waiting for D_INIT timeout. Memory may not work.\n");
-+#ifdef CONFIG_DEEP_SLEEP
-+	if (is_warm_boot()) {
-+		/* exit self-refresh */
-+		temp_sdram_cfg = ddr_in32(&ddr->sdram_cfg_2);
-+		temp_sdram_cfg &= ~SDRAM_CFG2_FRC_SR;
-+		ddr_out32(&ddr->sdram_cfg_2, temp_sdram_cfg);
-+	}
-+#endif
- }
-diff -ruN u-boot-2015.01-rc3/drivers/ddr/fsl/mpc85xx_ddr_gen3.c u-boot/drivers/ddr/fsl/mpc85xx_ddr_gen3.c
---- u-boot-2015.01-rc3/drivers/ddr/fsl/mpc85xx_ddr_gen3.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/ddr/fsl/mpc85xx_ddr_gen3.c	2015-01-01 17:34:32.625497153 +0100
-@@ -15,8 +15,6 @@
- #error Invalid setting for CONFIG_CHIP_SELECTS_PER_CTRL
- #endif
- 
--DECLARE_GLOBAL_DATA_PTR;
--
- /*
-  * regs has the to-be-set values for DDR controller registers
-  * ctrl_num is the DDR controller number
-@@ -44,16 +42,6 @@
- 	u32 save1, save2;
- #endif
- 
--#ifdef CONFIG_DEEP_SLEEP
--	const ccsr_gur_t *gur = (void __iomem *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
--	bool sleep_flag = 0;
--#endif
--
--#ifdef CONFIG_DEEP_SLEEP
--	if (in_be32(&gur->scrtsr[0]) & (1 << 3))
--		sleep_flag = 1;
--#endif
--
- 	switch (ctrl_num) {
- 	case 0:
- 		ddr = (void *)CONFIG_SYS_FSL_DDR_ADDR;
-@@ -130,13 +118,6 @@
- 	out_be32(&ddr->timing_cfg_0, regs->timing_cfg_0);
- 	out_be32(&ddr->timing_cfg_1, regs->timing_cfg_1);
- 	out_be32(&ddr->timing_cfg_2, regs->timing_cfg_2);
--#ifdef CONFIG_DEEP_SLEEP
--	if (sleep_flag)
--		out_be32(&ddr->sdram_cfg_2,
--			 regs->ddr_sdram_cfg_2 & ~SDRAM_CFG2_D_INIT);
--	else
--#endif
--		out_be32(&ddr->sdram_cfg_2, regs->ddr_sdram_cfg_2);
- 	out_be32(&ddr->sdram_mode, regs->ddr_sdram_mode);
- 	out_be32(&ddr->sdram_mode_2, regs->ddr_sdram_mode_2);
- 	out_be32(&ddr->sdram_mode_3, regs->ddr_sdram_mode_3);
-@@ -149,17 +130,6 @@
- 	out_be32(&ddr->sdram_interval, regs->ddr_sdram_interval);
- 	out_be32(&ddr->sdram_data_init, regs->ddr_data_init);
- 	out_be32(&ddr->sdram_clk_cntl, regs->ddr_sdram_clk_cntl);
--#ifdef CONFIG_DEEP_SLEEP
--	if (sleep_flag) {
--		out_be32(&ddr->init_addr, 0);
--		out_be32(&ddr->init_ext_addr, (1 << 31));
--	} else
--#endif
--	{
--		out_be32(&ddr->init_addr, regs->ddr_init_addr);
--		out_be32(&ddr->init_ext_addr, regs->ddr_init_ext_addr);
--	}
--
- 	out_be32(&ddr->timing_cfg_4, regs->timing_cfg_4);
- 	out_be32(&ddr->timing_cfg_5, regs->timing_cfg_5);
- 	out_be32(&ddr->ddr_zq_cntl, regs->ddr_zq_cntl);
-@@ -180,7 +150,24 @@
- 	out_be32(&ddr->ddr_sdram_rcw_1, regs->ddr_sdram_rcw_1);
- 	out_be32(&ddr->ddr_sdram_rcw_2, regs->ddr_sdram_rcw_2);
- 	out_be32(&ddr->ddr_cdr1, regs->ddr_cdr1);
--	out_be32(&ddr->ddr_cdr2, regs->ddr_cdr2);
-+#ifdef CONFIG_DEEP_SLEEP
-+	if (is_warm_boot()) {
-+		out_be32(&ddr->sdram_cfg_2,
-+			 regs->ddr_sdram_cfg_2 & ~SDRAM_CFG2_D_INIT);
-+		out_be32(&ddr->init_addr, CONFIG_SYS_SDRAM_BASE);
-+		out_be32(&ddr->init_ext_addr, DDR_INIT_ADDR_EXT_UIA);
-+
-+		/* DRAM VRef will not be trained */
-+		out_be32(&ddr->ddr_cdr2,
-+			 regs->ddr_cdr2 & ~DDR_CDR2_VREF_TRAIN_EN);
-+	} else
-+#endif
-+	{
-+		out_be32(&ddr->sdram_cfg_2, regs->ddr_sdram_cfg_2);
-+		out_be32(&ddr->init_addr, regs->ddr_init_addr);
-+		out_be32(&ddr->init_ext_addr, regs->ddr_init_ext_addr);
-+		out_be32(&ddr->ddr_cdr2, regs->ddr_cdr2);
-+	}
- 	out_be32(&ddr->err_disable, regs->err_disable);
- 	out_be32(&ddr->err_int_en, regs->err_int_en);
- 	for (i = 0; i < 32; i++) {
-@@ -400,21 +387,17 @@
- 	asm volatile("sync;isync");
- 
- #ifdef CONFIG_DEEP_SLEEP
--	if (sleep_flag) {
-+	if (is_warm_boot()) {
- 		/* enter self-refresh */
--		setbits_be32(&ddr->sdram_cfg_2, (1 << 31));
-+		setbits_be32(&ddr->sdram_cfg_2, SDRAM_CFG2_FRC_SR);
- 		/* do board specific memory setup */
- 		board_mem_sleep_setup();
--	}
--#endif
--
--	/* Let the controller go */
--#ifdef CONFIG_DEEP_SLEEP
--	if (sleep_flag)
- 		temp_sdram_cfg = (in_be32(&ddr->sdram_cfg) | SDRAM_CFG_BI);
--	else
-+	} else
- #endif
- 		temp_sdram_cfg = (in_be32(&ddr->sdram_cfg) & ~SDRAM_CFG_BI);
-+
-+	/* Let the controller go */
- 	out_be32(&ddr->sdram_cfg, temp_sdram_cfg | SDRAM_CFG_MEM_EN);
- 	asm volatile("sync;isync");
- 
-@@ -566,8 +549,8 @@
- 	}
- #endif /* CONFIG_SYS_FSL_ERRATUM_DDR111_DDR134 */
- #ifdef CONFIG_DEEP_SLEEP
--	if (sleep_flag)
-+	if (is_warm_boot())
- 		/* exit self-refresh */
--		clrbits_be32(&ddr->sdram_cfg_2, (1 << 31));
-+		clrbits_be32(&ddr->sdram_cfg_2, SDRAM_CFG2_FRC_SR);
- #endif
- }
-diff -ruN u-boot-2015.01-rc3/drivers/dfu/dfu.c u-boot/drivers/dfu/dfu.c
---- u-boot-2015.01-rc3/drivers/dfu/dfu.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/dfu/dfu.c	2015-01-01 17:34:32.629497087 +0100
-@@ -17,7 +17,6 @@
- #include <linux/list.h>
- #include <linux/compiler.h>
- 
--static bool dfu_detach_request;
- static LIST_HEAD(dfu_list);
- static int dfu_alt_num;
- static int alt_num_cnt;
-@@ -39,21 +38,6 @@
- 	return true;
- }
- 
--bool dfu_detach(void)
--{
--	return dfu_detach_request;
--}
--
--void dfu_trigger_detach(void)
--{
--	dfu_detach_request = true;
--}
--
--void dfu_clear_detach(void)
--{
--	dfu_detach_request = false;
--}
--
- static int dfu_find_alt_num(const char *s)
- {
- 	int i = 0;
-@@ -111,8 +95,12 @@
- 		return dfu_buf;
- 
- 	s = getenv("dfu_bufsiz");
--	dfu_buf_size = s ? (unsigned long)simple_strtol(s, NULL, 16) :
--			CONFIG_SYS_DFU_DATA_BUF_SIZE;
-+	if (s)
-+		dfu_buf_size = (unsigned long)simple_strtol(s, NULL, 0);
-+
-+	if (!s || !dfu_buf_size)
-+		dfu_buf_size = CONFIG_SYS_DFU_DATA_BUF_SIZE;
-+
- 	if (dfu->max_buf_size && dfu_buf_size > dfu->max_buf_size)
- 		dfu_buf_size = dfu->max_buf_size;
- 
-@@ -544,10 +532,35 @@
- int dfu_get_alt(char *name)
- {
- 	struct dfu_entity *dfu;
-+	char *str;
- 
- 	list_for_each_entry(dfu, &dfu_list, list) {
--		if (!strncmp(dfu->name, name, strlen(dfu->name)))
--			return dfu->alt;
-+		if (dfu->name[0] != '/') {
-+			if (!strncmp(dfu->name, name, strlen(dfu->name)))
-+				return dfu->alt;
-+		} else {
-+			/*
-+			 * One must also consider absolute path
-+			 * (/boot/bin/uImage) available at dfu->name when
-+			 * compared "plain" file name (uImage)
-+			 *
-+			 * It is the case for e.g. thor gadget where lthor SW
-+			 * sends only the file name, so only the very last part
-+			 * of path must be checked for equality
-+			 */
-+
-+			str = strstr(dfu->name, name);
-+			if (!str)
-+				continue;
-+
-+			/*
-+			 * Check if matching substring is the last element of
-+			 * dfu->name (uImage)
-+			 */
-+			if (strlen(dfu->name) ==
-+			    ((str - dfu->name) + strlen(name)))
-+				return dfu->alt;
-+		}
- 	}
- 
- 	return -ENODEV;
-diff -ruN u-boot-2015.01-rc3/drivers/dfu/dfu_mmc.c u-boot/drivers/dfu/dfu_mmc.c
---- u-boot-2015.01-rc3/drivers/dfu/dfu_mmc.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/dfu/dfu_mmc.c	2015-01-01 17:34:32.629497087 +0100
-@@ -40,10 +40,16 @@
- static int mmc_block_op(enum dfu_op op, struct dfu_entity *dfu,
- 			u64 offset, void *buf, long *len)
- {
--	struct mmc *mmc = find_mmc_device(dfu->data.mmc.dev_num);
-+	struct mmc *mmc;
- 	u32 blk_start, blk_count, n = 0;
- 	int ret, part_num_bkp = 0;
- 
-+	mmc = find_mmc_device(dfu->data.mmc.dev_num);
-+	if (!mmc) {
-+		error("Device MMC %d - not found!", dfu->data.mmc.dev_num);
-+		return -ENODEV;
-+	}
-+
- 	/*
- 	 * We must ensure that we work in lba_blk_size chunks, so ALIGN
- 	 * this value.
-diff -ruN u-boot-2015.01-rc3/drivers/gpio/intel_ich6_gpio.c u-boot/drivers/gpio/intel_ich6_gpio.c
---- u-boot-2015.01-rc3/drivers/gpio/intel_ich6_gpio.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/gpio/intel_ich6_gpio.c	2015-01-01 17:34:32.637496957 +0100
-@@ -34,69 +34,21 @@
- #include <asm/gpio.h>
- #include <asm/io.h>
- #include <asm/pci.h>
--#ifdef CONFIG_X86_RESET_VECTOR
--#include <asm/arch/pch.h>
--#define SUPPORT_GPIO_SETUP
--#endif
- 
- #define GPIO_PER_BANK	32
- 
--/* Where in config space is the register that points to the GPIO registers? */
--#define PCI_CFG_GPIOBASE 0x48
--
- struct ich6_bank_priv {
- 	/* These are I/O addresses */
--	uint32_t use_sel;
--	uint32_t io_sel;
--	uint32_t lvl;
-+	uint16_t use_sel;
-+	uint16_t io_sel;
-+	uint16_t lvl;
- };
- 
--#ifdef SUPPORT_GPIO_SETUP
--static void setup_pch_gpios(const struct pch_gpio_map *gpio)
--{
--	u16 gpiobase = pci_read_config16(PCH_LPC_DEV, GPIO_BASE) & 0xfffc;
--
--	/* GPIO Set 1 */
--	if (gpio->set1.level)
--		outl(*((u32 *)gpio->set1.level), gpiobase + GP_LVL);
--	if (gpio->set1.mode)
--		outl(*((u32 *)gpio->set1.mode), gpiobase + GPIO_USE_SEL);
--	if (gpio->set1.direction)
--		outl(*((u32 *)gpio->set1.direction), gpiobase + GP_IO_SEL);
--	if (gpio->set1.reset)
--		outl(*((u32 *)gpio->set1.reset), gpiobase + GP_RST_SEL1);
--	if (gpio->set1.invert)
--		outl(*((u32 *)gpio->set1.invert), gpiobase + GPI_INV);
--	if (gpio->set1.blink)
--		outl(*((u32 *)gpio->set1.blink), gpiobase + GPO_BLINK);
--
--	/* GPIO Set 2 */
--	if (gpio->set2.level)
--		outl(*((u32 *)gpio->set2.level), gpiobase + GP_LVL2);
--	if (gpio->set2.mode)
--		outl(*((u32 *)gpio->set2.mode), gpiobase + GPIO_USE_SEL2);
--	if (gpio->set2.direction)
--		outl(*((u32 *)gpio->set2.direction), gpiobase + GP_IO_SEL2);
--	if (gpio->set2.reset)
--		outl(*((u32 *)gpio->set2.reset), gpiobase + GP_RST_SEL2);
--
--	/* GPIO Set 3 */
--	if (gpio->set3.level)
--		outl(*((u32 *)gpio->set3.level), gpiobase + GP_LVL3);
--	if (gpio->set3.mode)
--		outl(*((u32 *)gpio->set3.mode), gpiobase + GPIO_USE_SEL3);
--	if (gpio->set3.direction)
--		outl(*((u32 *)gpio->set3.direction), gpiobase + GP_IO_SEL3);
--	if (gpio->set3.reset)
--		outl(*((u32 *)gpio->set3.reset), gpiobase + GP_RST_SEL3);
--}
--
- /* TODO: Move this to device tree, or platform data */
- void ich_gpio_set_gpio_map(const struct pch_gpio_map *map)
- {
- 	gd->arch.gpio_map = map;
- }
--#endif /* SUPPORT_GPIO_SETUP */
- 
- static int gpio_ich6_ofdata_to_platdata(struct udevice *dev)
- {
-@@ -105,7 +57,7 @@
- 	u8 tmpbyte;
- 	u16 tmpword;
- 	u32 tmplong;
--	u32 gpiobase;
-+	u16 gpiobase;
- 	int offset;
- 
- 	/* Where should it be? */
-@@ -164,11 +116,15 @@
- 	/*
- 	 * GPIOBASE moved to its current offset with ICH6, but prior to
- 	 * that it was unused (or undocumented). Check that it looks
--	 * okay: not all ones or zeros, and mapped to I/O space (bit 0).
-+	 * okay: not all ones or zeros.
-+	 *
-+	 * Note we don't need check bit0 here, because the Tunnel Creek
-+	 * GPIO base address register bit0 is reserved (read returns 0),
-+	 * while on the Ivybridge the bit0 is used to indicate it is an
-+	 * I/O space.
- 	 */
- 	tmplong = pci_read_config32(pci_dev, PCI_CFG_GPIOBASE);
--	if (tmplong == 0x00000000 || tmplong == 0xffffffff ||
--	    !(tmplong & 0x00000001)) {
-+	if (tmplong == 0x00000000 || tmplong == 0xffffffff) {
- 		debug("%s: unexpected GPIOBASE value\n", __func__);
- 		return -ENODEV;
- 	}
-@@ -179,7 +135,7 @@
- 	 * at the offset that we just read. Bit 0 indicates that it's
- 	 * an I/O address, not a memory address, so mask that off.
- 	 */
--	gpiobase = tmplong & 0xfffffffe;
-+	gpiobase = tmplong & 0xfffe;
- 	offset = fdtdec_get_int(gd->fdt_blob, dev->of_offset, "reg", -1);
- 	if (offset == -1) {
- 		debug("%s: Invalid register offset %d\n", __func__, offset);
-@@ -198,12 +154,11 @@
- 	struct gpio_dev_priv *uc_priv = dev->uclass_priv;
- 	struct ich6_bank_priv *bank = dev_get_priv(dev);
- 
--#ifdef SUPPORT_GPIO_SETUP
- 	if (gd->arch.gpio_map) {
--		setup_pch_gpios(gd->arch.gpio_map);
-+		setup_pch_gpios(plat->base_addr, gd->arch.gpio_map);
- 		gd->arch.gpio_map = NULL;
- 	}
--#endif
-+
- 	uc_priv->gpio_count = GPIO_PER_BANK;
- 	uc_priv->bank_name = plat->bank_name;
- 	bank->use_sel = plat->base_addr;
-@@ -251,6 +206,8 @@
- 	struct ich6_bank_priv *bank = dev_get_priv(dev);
- 	u32 tmplong;
- 
-+	gpio_set_value(offset, value);
-+
- 	tmplong = inl(bank->io_sel);
- 	tmplong &= ~(1UL << offset);
- 	outl(bank->io_sel, tmplong);
-diff -ruN u-boot-2015.01-rc3/drivers/i2c/i2c-emul-uclass.c u-boot/drivers/i2c/i2c-emul-uclass.c
---- u-boot-2015.01-rc3/drivers/i2c/i2c-emul-uclass.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/drivers/i2c/i2c-emul-uclass.c	2015-01-01 17:34:32.645496825 +0100
-@@ -0,0 +1,14 @@
-+/*
-+ * Copyright (c) 2014 Google, Inc
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <dm.h>
-+#include <i2c.h>
-+
-+UCLASS_DRIVER(i2c_emul) = {
-+	.id		= UCLASS_I2C_EMUL,
-+	.name		= "i2c_emul",
-+};
-diff -ruN u-boot-2015.01-rc3/drivers/i2c/i2c-uclass.c u-boot/drivers/i2c/i2c-uclass.c
---- u-boot-2015.01-rc3/drivers/i2c/i2c-uclass.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/drivers/i2c/i2c-uclass.c	2015-01-01 17:34:32.645496825 +0100
-@@ -0,0 +1,466 @@
-+/*
-+ * Copyright (c) 2014 Google, Inc
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <dm.h>
-+#include <errno.h>
-+#include <fdtdec.h>
-+#include <i2c.h>
-+#include <malloc.h>
-+#include <dm/device-internal.h>
-+#include <dm/lists.h>
-+#include <dm/root.h>
-+
-+DECLARE_GLOBAL_DATA_PTR;
-+
-+#define I2C_MAX_OFFSET_LEN	4
-+
-+/**
-+ * i2c_setup_offset() - Set up a new message with a chip offset
-+ *
-+ * @chip:	Chip to use
-+ * @offset:	Byte offset within chip
-+ * @offset_buf:	Place to put byte offset
-+ * @msg:	Message buffer
-+ * @return 0 if OK, -EADDRNOTAVAIL if the offset length is 0. In that case the
-+ * message is still set up but will not contain an offset.
-+ */
-+static int i2c_setup_offset(struct dm_i2c_chip *chip, uint offset,
-+			    uint8_t offset_buf[], struct i2c_msg *msg)
-+{
-+	int offset_len;
-+
-+	msg->addr = chip->chip_addr;
-+	msg->flags = chip->flags & DM_I2C_CHIP_10BIT ? I2C_M_TEN : 0;
-+	msg->len = chip->offset_len;
-+	msg->buf = offset_buf;
-+	if (!chip->offset_len)
-+		return -EADDRNOTAVAIL;
-+	assert(chip->offset_len <= I2C_MAX_OFFSET_LEN);
-+	offset_len = chip->offset_len;
-+	while (offset_len--)
-+		*offset_buf++ = offset >> (8 * offset_len);
-+
-+	return 0;
-+}
-+
-+static int i2c_read_bytewise(struct udevice *dev, uint offset,
-+			     uint8_t *buffer, int len)
-+{
-+	struct dm_i2c_chip *chip = dev_get_parentdata(dev);
-+	struct udevice *bus = dev_get_parent(dev);
-+	struct dm_i2c_ops *ops = i2c_get_ops(bus);
-+	struct i2c_msg msg[2], *ptr;
-+	uint8_t offset_buf[I2C_MAX_OFFSET_LEN];
-+	int ret;
-+	int i;
-+
-+	for (i = 0; i < len; i++) {
-+		if (i2c_setup_offset(chip, offset + i, offset_buf, msg))
-+			return -EINVAL;
-+		ptr = msg + 1;
-+		ptr->addr = chip->chip_addr;
-+		ptr->flags = msg->flags | I2C_M_RD;
-+		ptr->len = 1;
-+		ptr->buf = &buffer[i];
-+		ptr++;
-+
-+		ret = ops->xfer(bus, msg, ptr - msg);
-+		if (ret)
-+			return ret;
-+	}
-+
-+	return 0;
-+}
-+
-+static int i2c_write_bytewise(struct udevice *dev, uint offset,
-+			     const uint8_t *buffer, int len)
-+{
-+	struct dm_i2c_chip *chip = dev_get_parentdata(dev);
-+	struct udevice *bus = dev_get_parent(dev);
-+	struct dm_i2c_ops *ops = i2c_get_ops(bus);
-+	struct i2c_msg msg[1];
-+	uint8_t buf[I2C_MAX_OFFSET_LEN + 1];
-+	int ret;
-+	int i;
-+
-+	for (i = 0; i < len; i++) {
-+		if (i2c_setup_offset(chip, offset + i, buf, msg))
-+			return -EINVAL;
-+		buf[msg->len++] = buffer[i];
-+
-+		ret = ops->xfer(bus, msg, 1);
-+		if (ret)
-+			return ret;
-+	}
-+
-+	return 0;
-+}
-+
-+int i2c_read(struct udevice *dev, uint offset, uint8_t *buffer, int len)
-+{
-+	struct dm_i2c_chip *chip = dev_get_parentdata(dev);
-+	struct udevice *bus = dev_get_parent(dev);
-+	struct dm_i2c_ops *ops = i2c_get_ops(bus);
-+	struct i2c_msg msg[2], *ptr;
-+	uint8_t offset_buf[I2C_MAX_OFFSET_LEN];
-+	int msg_count;
-+
-+	if (!ops->xfer)
-+		return -ENOSYS;
-+	if (chip->flags & DM_I2C_CHIP_RD_ADDRESS)
-+		return i2c_read_bytewise(dev, offset, buffer, len);
-+	ptr = msg;
-+	if (!i2c_setup_offset(chip, offset, offset_buf, ptr))
-+		ptr++;
-+
-+	if (len) {
-+		ptr->addr = chip->chip_addr;
-+		ptr->flags = chip->flags & DM_I2C_CHIP_10BIT ? I2C_M_TEN : 0;
-+		ptr->flags |= I2C_M_RD;
-+		ptr->len = len;
-+		ptr->buf = buffer;
-+		ptr++;
-+	}
-+	msg_count = ptr - msg;
-+
-+	return ops->xfer(bus, msg, msg_count);
-+}
-+
-+int i2c_write(struct udevice *dev, uint offset, const uint8_t *buffer, int len)
-+{
-+	struct dm_i2c_chip *chip = dev_get_parentdata(dev);
-+	struct udevice *bus = dev_get_parent(dev);
-+	struct dm_i2c_ops *ops = i2c_get_ops(bus);
-+	struct i2c_msg msg[1];
-+
-+	if (!ops->xfer)
-+		return -ENOSYS;
-+
-+	if (chip->flags & DM_I2C_CHIP_WR_ADDRESS)
-+		return i2c_write_bytewise(dev, offset, buffer, len);
-+	/*
-+	 * The simple approach would be to send two messages here: one to
-+	 * set the offset and one to write the bytes. However some drivers
-+	 * will not be expecting this, and some chips won't like how the
-+	 * driver presents this on the I2C bus.
-+	 *
-+	 * The API does not support separate offset and data. We could extend
-+	 * it with a flag indicating that there is data in the next message
-+	 * that needs to be processed in the same transaction. We could
-+	 * instead add an additional buffer to each message. For now, handle
-+	 * this in the uclass since it isn't clear what the impact on drivers
-+	 * would be with this extra complication. Unfortunately this means
-+	 * copying the message.
-+	 *
-+	 * Use the stack for small messages, malloc() for larger ones. We
-+	 * need to allow space for the offset (up to 4 bytes) and the message
-+	 * itself.
-+	 */
-+	if (len < 64) {
-+		uint8_t buf[I2C_MAX_OFFSET_LEN + len];
-+
-+		i2c_setup_offset(chip, offset, buf, msg);
-+		msg->len += len;
-+		memcpy(buf + chip->offset_len, buffer, len);
-+
-+		return ops->xfer(bus, msg, 1);
-+	} else {
-+		uint8_t *buf;
-+		int ret;
-+
-+		buf = malloc(I2C_MAX_OFFSET_LEN + len);
-+		if (!buf)
-+			return -ENOMEM;
-+		i2c_setup_offset(chip, offset, buf, msg);
-+		msg->len += len;
-+		memcpy(buf + chip->offset_len, buffer, len);
-+
-+		ret = ops->xfer(bus, msg, 1);
-+		free(buf);
-+		return ret;
-+	}
-+}
-+
-+/**
-+ * i2c_probe_chip() - probe for a chip on a bus
-+ *
-+ * @bus:	Bus to probe
-+ * @chip_addr:	Chip address to probe
-+ * @flags:	Flags for the chip
-+ * @return 0 if found, -ENOSYS if the driver is invalid, -EREMOTEIO if the chip
-+ * does not respond to probe
-+ */
-+static int i2c_probe_chip(struct udevice *bus, uint chip_addr,
-+			  enum dm_i2c_chip_flags chip_flags)
-+{
-+	struct dm_i2c_ops *ops = i2c_get_ops(bus);
-+	struct i2c_msg msg[1];
-+	int ret;
-+
-+	if (ops->probe_chip) {
-+		ret = ops->probe_chip(bus, chip_addr, chip_flags);
-+		if (!ret || ret != -ENOSYS)
-+			return ret;
-+	}
-+
-+	if (!ops->xfer)
-+		return -ENOSYS;
-+
-+	/* Probe with a zero-length message */
-+	msg->addr = chip_addr;
-+	msg->flags = chip_flags & DM_I2C_CHIP_10BIT ? I2C_M_TEN : 0;
-+	msg->len = 0;
-+	msg->buf = NULL;
-+
-+	return ops->xfer(bus, msg, 1);
-+}
-+
-+static int i2c_bind_driver(struct udevice *bus, uint chip_addr,
-+			   struct udevice **devp)
-+{
-+	struct dm_i2c_chip chip;
-+	char name[30], *str;
-+	struct udevice *dev;
-+	int ret;
-+
-+	snprintf(name, sizeof(name), "generic_%x", chip_addr);
-+	str = strdup(name);
-+	ret = device_bind_driver(bus, "i2c_generic_chip_drv", str, &dev);
-+	debug("%s:  device_bind_driver: ret=%d\n", __func__, ret);
-+	if (ret)
-+		goto err_bind;
-+
-+	/* Tell the device what we know about it */
-+	memset(&chip, '\0', sizeof(chip));
-+	chip.chip_addr = chip_addr;
-+	chip.offset_len = 1;	/* we assume */
-+	ret = device_probe_child(dev, &chip);
-+	debug("%s:  device_probe_child: ret=%d\n", __func__, ret);
-+	if (ret)
-+		goto err_probe;
-+
-+	*devp = dev;
-+	return 0;
-+
-+err_probe:
-+	device_unbind(dev);
-+err_bind:
-+	free(str);
-+	return ret;
-+}
-+
-+int i2c_get_chip(struct udevice *bus, uint chip_addr, struct udevice **devp)
-+{
-+	struct udevice *dev;
-+
-+	debug("%s: Searching bus '%s' for address %02x: ", __func__,
-+	      bus->name, chip_addr);
-+	for (device_find_first_child(bus, &dev); dev;
-+			device_find_next_child(&dev)) {
-+		struct dm_i2c_chip store;
-+		struct dm_i2c_chip *chip = dev_get_parentdata(dev);
-+		int ret;
-+
-+		if (!chip) {
-+			chip = &store;
-+			i2c_chip_ofdata_to_platdata(gd->fdt_blob,
-+						    dev->of_offset, chip);
-+		}
-+		if (chip->chip_addr == chip_addr) {
-+			ret = device_probe(dev);
-+			debug("found, ret=%d\n", ret);
-+			if (ret)
-+				return ret;
-+			*devp = dev;
-+			return 0;
-+		}
-+	}
-+	debug("not found\n");
-+	return i2c_bind_driver(bus, chip_addr, devp);
-+}
-+
-+int i2c_get_chip_for_busnum(int busnum, int chip_addr, struct udevice **devp)
-+{
-+	struct udevice *bus;
-+	int ret;
-+
-+	ret = uclass_get_device_by_seq(UCLASS_I2C, busnum, &bus);
-+	if (ret) {
-+		debug("Cannot find I2C bus %d\n", busnum);
-+		return ret;
-+	}
-+	ret = i2c_get_chip(bus, chip_addr, devp);
-+	if (ret) {
-+		debug("Cannot find I2C chip %02x on bus %d\n", chip_addr,
-+		      busnum);
-+		return ret;
-+	}
-+
-+	return 0;
-+}
-+
-+int i2c_probe(struct udevice *bus, uint chip_addr, uint chip_flags,
-+	      struct udevice **devp)
-+{
-+	int ret;
-+
-+	*devp = NULL;
-+
-+	/* First probe that chip */
-+	ret = i2c_probe_chip(bus, chip_addr, chip_flags);
-+	debug("%s: bus='%s', address %02x, ret=%d\n", __func__, bus->name,
-+	      chip_addr, ret);
-+	if (ret)
-+		return ret;
-+
-+	/* The chip was found, see if we have a driver, and probe it */
-+	ret = i2c_get_chip(bus, chip_addr, devp);
-+	debug("%s:  i2c_get_chip: ret=%d\n", __func__, ret);
-+
-+	return ret;
-+}
-+
-+int i2c_set_bus_speed(struct udevice *bus, unsigned int speed)
-+{
-+	struct dm_i2c_ops *ops = i2c_get_ops(bus);
-+	struct dm_i2c_bus *i2c = bus->uclass_priv;
-+	int ret;
-+
-+	/*
-+	 * If we have a method, call it. If not then the driver probably wants
-+	 * to deal with speed changes on the next transfer. It can easily read
-+	 * the current speed from this uclass
-+	 */
-+	if (ops->set_bus_speed) {
-+		ret = ops->set_bus_speed(bus, speed);
-+		if (ret)
-+			return ret;
-+	}
-+	i2c->speed_hz = speed;
-+
-+	return 0;
-+}
-+
-+/*
-+ * i2c_get_bus_speed:
-+ *
-+ *  Returns speed of selected I2C bus in Hz
-+ */
-+int i2c_get_bus_speed(struct udevice *bus)
-+{
-+	struct dm_i2c_ops *ops = i2c_get_ops(bus);
-+	struct dm_i2c_bus *i2c = bus->uclass_priv;
-+
-+	if (!ops->get_bus_speed)
-+		return i2c->speed_hz;
-+
-+	return ops->get_bus_speed(bus);
-+}
-+
-+int i2c_set_chip_flags(struct udevice *dev, uint flags)
-+{
-+	struct udevice *bus = dev->parent;
-+	struct dm_i2c_chip *chip = dev_get_parentdata(dev);
-+	struct dm_i2c_ops *ops = i2c_get_ops(bus);
-+	int ret;
-+
-+	if (ops->set_flags) {
-+		ret = ops->set_flags(dev, flags);
-+		if (ret)
-+			return ret;
-+	}
-+	chip->flags = flags;
-+
-+	return 0;
-+}
-+
-+int i2c_get_chip_flags(struct udevice *dev, uint *flagsp)
-+{
-+	struct dm_i2c_chip *chip = dev_get_parentdata(dev);
-+
-+	*flagsp = chip->flags;
-+
-+	return 0;
-+}
-+
-+int i2c_set_chip_offset_len(struct udevice *dev, uint offset_len)
-+{
-+	struct dm_i2c_chip *chip = dev_get_parentdata(dev);
-+
-+	if (offset_len > I2C_MAX_OFFSET_LEN)
-+		return -EINVAL;
-+	chip->offset_len = offset_len;
-+
-+	return 0;
-+}
-+
-+int i2c_deblock(struct udevice *bus)
-+{
-+	struct dm_i2c_ops *ops = i2c_get_ops(bus);
-+
-+	/*
-+	 * We could implement a software deblocking here if we could get
-+	 * access to the GPIOs used by I2C, and switch them to GPIO mode
-+	 * and then back to I2C. This is somewhat beyond our powers in
-+	 * driver model at present, so for now just fail.
-+	 *
-+	 * See https://patchwork.ozlabs.org/patch/399040/
-+	 */
-+	if (!ops->deblock)
-+		return -ENOSYS;
-+
-+	return ops->deblock(bus);
-+}
-+
-+int i2c_chip_ofdata_to_platdata(const void *blob, int node,
-+				struct dm_i2c_chip *chip)
-+{
-+	chip->offset_len = 1;	/* default */
-+	chip->flags = 0;
-+	chip->chip_addr = fdtdec_get_int(gd->fdt_blob, node, "reg", -1);
-+	if (chip->chip_addr == -1) {
-+		debug("%s: I2C Node '%s' has no 'reg' property\n", __func__,
-+		      fdt_get_name(blob, node, NULL));
-+		return -EINVAL;
-+	}
-+
-+	return 0;
-+}
-+
-+static int i2c_post_probe(struct udevice *dev)
-+{
-+	struct dm_i2c_bus *i2c = dev->uclass_priv;
-+
-+	i2c->speed_hz = fdtdec_get_int(gd->fdt_blob, dev->of_offset,
-+				     "clock-frequency", 100000);
-+
-+	return i2c_set_bus_speed(dev, i2c->speed_hz);
-+}
-+
-+int i2c_post_bind(struct udevice *dev)
-+{
-+	/* Scan the bus for devices */
-+	return dm_scan_fdt_node(dev, gd->fdt_blob, dev->of_offset, false);
-+}
-+
-+UCLASS_DRIVER(i2c) = {
-+	.id		= UCLASS_I2C,
-+	.name		= "i2c",
-+	.per_device_auto_alloc_size = sizeof(struct dm_i2c_bus),
-+	.post_bind	= i2c_post_bind,
-+	.post_probe	= i2c_post_probe,
-+};
-+
-+UCLASS_DRIVER(i2c_generic) = {
-+	.id		= UCLASS_I2C_GENERIC,
-+	.name		= "i2c_generic",
-+};
-+
-+U_BOOT_DRIVER(i2c_generic_chip_drv) = {
-+	.name		= "i2c_generic_chip_drv",
-+	.id		= UCLASS_I2C_GENERIC,
-+};
-diff -ruN u-boot-2015.01-rc3/drivers/i2c/Makefile u-boot/drivers/i2c/Makefile
---- u-boot-2015.01-rc3/drivers/i2c/Makefile	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/i2c/Makefile	2015-01-01 17:34:32.641496891 +0100
-@@ -4,6 +4,7 @@
- #
- # SPDX-License-Identifier:	GPL-2.0+
- #
-+obj-$(CONFIG_DM_I2C) += i2c-uclass.o
- 
- obj-$(CONFIG_SYS_I2C_ADI) += adi_i2c.o
- obj-$(CONFIG_I2C_MV) += mv_i2c.o
-@@ -26,6 +27,7 @@
- obj-$(CONFIG_SYS_I2C_PPC4XX) += ppc4xx_i2c.o
- obj-$(CONFIG_SYS_I2C_RCAR) += rcar_i2c.o
- obj-$(CONFIG_SYS_I2C_S3C24X0) += s3c24x0_i2c.o
-+obj-$(CONFIG_SYS_I2C_SANDBOX) += sandbox_i2c.o i2c-emul-uclass.o
- obj-$(CONFIG_SYS_I2C_SH) += sh_i2c.o
- obj-$(CONFIG_SYS_I2C_SOFT) += soft_i2c.o
- obj-$(CONFIG_SYS_I2C_TEGRA) += tegra_i2c.o
-diff -ruN u-boot-2015.01-rc3/drivers/i2c/sandbox_i2c.c u-boot/drivers/i2c/sandbox_i2c.c
---- u-boot-2015.01-rc3/drivers/i2c/sandbox_i2c.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/drivers/i2c/sandbox_i2c.c	2015-01-01 17:34:32.649496760 +0100
-@@ -0,0 +1,111 @@
-+/*
-+ * Simulate an I2C port
-+ *
-+ * Copyright (c) 2014 Google, Inc
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <dm.h>
-+#include <errno.h>
-+#include <fdtdec.h>
-+#include <i2c.h>
-+#include <asm/test.h>
-+#include <dm/lists.h>
-+#include <dm/device-internal.h>
-+#include <dm/root.h>
-+
-+DECLARE_GLOBAL_DATA_PTR;
-+
-+struct dm_sandbox_i2c_emul_priv {
-+	struct udevice *emul;
-+};
-+
-+static int get_emul(struct udevice *dev, struct udevice **devp,
-+		    struct dm_i2c_ops **opsp)
-+{
-+	struct dm_i2c_chip *priv;
-+	int ret;
-+
-+	*devp = NULL;
-+	*opsp = NULL;
-+	priv = dev_get_parentdata(dev);
-+	if (!priv->emul) {
-+		ret = dm_scan_fdt_node(dev, gd->fdt_blob, dev->of_offset,
-+				       false);
-+		if (ret)
-+			return ret;
-+
-+		ret = device_get_child(dev, 0, &priv->emul);
-+		if (ret)
-+			return ret;
-+	}
-+	*devp = priv->emul;
-+	*opsp = i2c_get_ops(priv->emul);
-+
-+	return 0;
-+}
-+
-+static int sandbox_i2c_xfer(struct udevice *bus, struct i2c_msg *msg,
-+			    int nmsgs)
-+{
-+	struct dm_i2c_bus *i2c = bus->uclass_priv;
-+	struct dm_i2c_ops *ops;
-+	struct udevice *emul, *dev;
-+	bool is_read;
-+	int ret;
-+
-+	/* Special test code to return success but with no emulation */
-+	if (msg->addr == SANDBOX_I2C_TEST_ADDR)
-+		return 0;
-+
-+	ret = i2c_get_chip(bus, msg->addr, &dev);
-+	if (ret)
-+		return ret;
-+
-+	ret = get_emul(dev, &emul, &ops);
-+	if (ret)
-+		return ret;
-+
-+	/*
-+	 * For testing, don't allow writing above 100KHz for writes and
-+	 * 400KHz for reads
-+	 */
-+	is_read = nmsgs > 1;
-+	if (i2c->speed_hz > (is_read ? 400000 : 100000))
-+		return -EINVAL;
-+	return ops->xfer(emul, msg, nmsgs);
-+}
-+
-+static const struct dm_i2c_ops sandbox_i2c_ops = {
-+	.xfer		= sandbox_i2c_xfer,
-+};
-+
-+static int sandbox_i2c_child_pre_probe(struct udevice *dev)
-+{
-+	struct dm_i2c_chip *i2c_chip = dev_get_parentdata(dev);
-+
-+	/* Ignore our test address */
-+	if (i2c_chip->chip_addr == SANDBOX_I2C_TEST_ADDR)
-+		return 0;
-+	if (dev->of_offset == -1)
-+		return 0;
-+
-+	return i2c_chip_ofdata_to_platdata(gd->fdt_blob, dev->of_offset,
-+					   i2c_chip);
-+}
-+
-+static const struct udevice_id sandbox_i2c_ids[] = {
-+	{ .compatible = "sandbox,i2c" },
-+	{ }
-+};
-+
-+U_BOOT_DRIVER(i2c_sandbox) = {
-+	.name	= "i2c_sandbox",
-+	.id	= UCLASS_I2C,
-+	.of_match = sandbox_i2c_ids,
-+	.per_child_auto_alloc_size = sizeof(struct dm_i2c_chip),
-+	.child_pre_probe = sandbox_i2c_child_pre_probe,
-+	.ops	= &sandbox_i2c_ops,
-+};
-diff -ruN u-boot-2015.01-rc3/drivers/i2c/tegra_i2c.c u-boot/drivers/i2c/tegra_i2c.c
---- u-boot-2015.01-rc3/drivers/i2c/tegra_i2c.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/i2c/tegra_i2c.c	2015-01-01 17:34:32.649496760 +0100
-@@ -7,6 +7,8 @@
-  */
- 
- #include <common.h>
-+#include <dm.h>
-+#include <errno.h>
- #include <fdtdec.h>
- #include <i2c.h>
- #include <asm/io.h>
-@@ -19,6 +21,12 @@
- 
- DECLARE_GLOBAL_DATA_PTR;
- 
-+enum i2c_type {
-+	TYPE_114,
-+	TYPE_STD,
-+	TYPE_DVC,
-+};
-+
- /* Information about i2c controller */
- struct i2c_bus {
- 	int			id;
-@@ -27,20 +35,17 @@
- 	int			pinmux_config;
- 	struct i2c_control	*control;
- 	struct i2c_ctlr		*regs;
--	int			is_dvc;	/* DVC type, rather than I2C */
--	int			is_scs;	/* single clock source (T114+) */
-+	enum i2c_type		type;
- 	int			inited;	/* bus is inited */
- };
- 
--static struct i2c_bus i2c_controllers[TEGRA_I2C_NUM_CONTROLLERS];
--
- static void set_packet_mode(struct i2c_bus *i2c_bus)
- {
- 	u32 config;
- 
- 	config = I2C_CNFG_NEW_MASTER_FSM_MASK | I2C_CNFG_PACKET_MODE_MASK;
- 
--	if (i2c_bus->is_dvc) {
-+	if (i2c_bus->type == TYPE_DVC) {
- 		struct dvc_ctlr *dvc = (struct dvc_ctlr *)i2c_bus->regs;
- 
- 		writel(config, &dvc->cnfg);
-@@ -65,6 +70,9 @@
- 
- static void i2c_init_controller(struct i2c_bus *i2c_bus)
- {
-+	if (!i2c_bus->speed)
-+		return;
-+	debug("%s: speed=%d\n", __func__, i2c_bus->speed);
- 	/*
- 	 * Use PLLP - DP-04508-001_v06 datasheet indicates a divisor of 8
- 	 * here, in section 23.3.1, but in fact we seem to need a factor of
-@@ -73,7 +81,7 @@
- 	clock_start_periph_pll(i2c_bus->periph_id, CLOCK_ID_PERIPH,
- 		i2c_bus->speed * 2 * 8);
- 
--	if (i2c_bus->is_scs) {
-+	if (i2c_bus->type == TYPE_114) {
- 		/*
- 		 * T114 I2C went to a single clock source for standard/fast and
- 		 * HS clock speeds. The new clock rate setting calculation is:
-@@ -98,7 +106,7 @@
- 	i2c_reset_controller(i2c_bus);
- 
- 	/* Configure I2C controller. */
--	if (i2c_bus->is_dvc) {	/* only for DVC I2C */
-+	if (i2c_bus->type == TYPE_DVC) {	/* only for DVC I2C */
- 		struct dvc_ctlr *dvc = (struct dvc_ctlr *)i2c_bus->regs;
- 
- 		setbits_le32(&dvc->ctrl3, DVC_CTRL_REG3_I2C_HW_SW_PROG_MASK);
-@@ -272,7 +280,7 @@
- 	return error;
- }
- 
--static int tegra_i2c_write_data(struct i2c_bus *bus, u32 addr, u8 *data,
-+static int tegra_i2c_write_data(struct i2c_bus *i2c_bus, u32 addr, u8 *data,
- 				u32 len, bool end_with_repeated_start)
- {
- 	int error;
-@@ -286,14 +294,14 @@
- 	trans_info.num_bytes = len;
- 	trans_info.is_10bit_address = 0;
- 
--	error = send_recv_packets(bus, &trans_info);
-+	error = send_recv_packets(i2c_bus, &trans_info);
- 	if (error)
- 		debug("tegra_i2c_write_data: Error (%d) !!!\n", error);
- 
- 	return error;
- }
- 
--static int tegra_i2c_read_data(struct i2c_bus *bus, u32 addr, u8 *data,
-+static int tegra_i2c_read_data(struct i2c_bus *i2c_bus, u32 addr, u8 *data,
- 			       u32 len)
- {
- 	int error;
-@@ -305,52 +313,32 @@
- 	trans_info.num_bytes = len;
- 	trans_info.is_10bit_address = 0;
- 
--	error = send_recv_packets(bus, &trans_info);
-+	error = send_recv_packets(i2c_bus, &trans_info);
- 	if (error)
- 		debug("tegra_i2c_read_data: Error (%d) !!!\n", error);
- 
- 	return error;
- }
- 
--#ifndef CONFIG_OF_CONTROL
--#error "Please enable device tree support to use this driver"
--#endif
--
--/**
-- * Check that a bus number is valid and return a pointer to it
-- *
-- * @param bus_num	Bus number to check / return
-- * @return pointer to bus, if valid, else NULL
-- */
--static struct i2c_bus *tegra_i2c_get_bus(struct i2c_adapter *adap)
-+static int tegra_i2c_set_bus_speed(struct udevice *dev, unsigned int speed)
- {
--	struct i2c_bus *bus;
-+	struct i2c_bus *i2c_bus = dev_get_priv(dev);
- 
--	bus = &i2c_controllers[adap->hwadapnr];
--	if (!bus->inited) {
--		debug("%s: Bus %u not available\n", __func__, adap->hwadapnr);
--		return NULL;
--	}
--
--	return bus;
--}
--
--static unsigned int tegra_i2c_set_bus_speed(struct i2c_adapter *adap,
--			unsigned int speed)
--{
--	struct i2c_bus *bus;
--
--	bus = tegra_i2c_get_bus(adap);
--	if (!bus)
--		return 0;
--	bus->speed = speed;
--	i2c_init_controller(bus);
-+	i2c_bus->speed = speed;
-+	i2c_init_controller(i2c_bus);
- 
- 	return 0;
- }
- 
--static int i2c_get_config(const void *blob, int node, struct i2c_bus *i2c_bus)
-+static int tegra_i2c_probe(struct udevice *dev)
- {
-+	struct i2c_bus *i2c_bus = dev_get_priv(dev);
-+	const void *blob = gd->fdt_blob;
-+	int node = dev->of_offset;
-+	bool is_dvc;
-+
-+	i2c_bus->id = dev->seq;
-+	i2c_bus->type = dev_get_of_data(dev);
- 	i2c_bus->regs = (struct i2c_ctlr *)fdtdec_get_addr(blob, node, "reg");
- 
- 	/*
-@@ -358,7 +346,6 @@
- 	 * far no one needs anything other than the default.
- 	 */
- 	i2c_bus->pinmux_config = FUNCMUX_DEFAULT;
--	i2c_bus->speed = fdtdec_get_int(blob, node, "clock-frequency", 0);
- 	i2c_bus->periph_id = clock_decode_periph_id(blob, node);
- 
- 	/*
-@@ -371,107 +358,25 @@
- 	 *		i2c_bus->pinmux_config = FUNCMUX_I2C2_PTA;
- 	 */
- 	if (i2c_bus->periph_id == -1)
--		return -FDT_ERR_NOTFOUND;
-+		return -EINVAL;
- 
--	return 0;
--}
--
--/*
-- * Process a list of nodes, adding them to our list of I2C ports.
-- *
-- * @param blob		fdt blob
-- * @param node_list	list of nodes to process (any <=0 are ignored)
-- * @param count		number of nodes to process
-- * @param is_dvc	1 if these are DVC ports, 0 if standard I2C
-- * @param is_scs	1 if this HW uses a single clock source (T114+)
-- * @return 0 if ok, -1 on error
-- */
--static int process_nodes(const void *blob, int node_list[], int count,
--			 int is_dvc, int is_scs)
--{
--	struct i2c_bus *i2c_bus;
--	int i;
--
--	/* build the i2c_controllers[] for each controller */
--	for (i = 0; i < count; i++) {
--		int node = node_list[i];
--
--		if (node <= 0)
--			continue;
--
--		i2c_bus = &i2c_controllers[i];
--		i2c_bus->id = i;
--
--		if (i2c_get_config(blob, node, i2c_bus)) {
--			printf("i2c_init_board: failed to decode bus %d\n", i);
--			return -1;
--		}
--
--		i2c_bus->is_scs = is_scs;
--
--		i2c_bus->is_dvc = is_dvc;
--		if (is_dvc) {
--			i2c_bus->control =
--				&((struct dvc_ctlr *)i2c_bus->regs)->control;
--		} else {
--			i2c_bus->control = &i2c_bus->regs->control;
--		}
--		debug("%s: controller bus %d at %p, periph_id %d, speed %d: ",
--		      is_dvc ? "dvc" : "i2c", i, i2c_bus->regs,
--		      i2c_bus->periph_id, i2c_bus->speed);
--		i2c_init_controller(i2c_bus);
--		debug("ok\n");
--		i2c_bus->inited = 1;
--
--		/* Mark position as used */
--		node_list[i] = -1;
-+	is_dvc = dev_get_of_data(dev) == TYPE_DVC;
-+	if (is_dvc) {
-+		i2c_bus->control =
-+			&((struct dvc_ctlr *)i2c_bus->regs)->control;
-+	} else {
-+		i2c_bus->control = &i2c_bus->regs->control;
- 	}
-+	i2c_init_controller(i2c_bus);
-+	debug("%s: controller bus %d at %p, periph_id %d, speed %d: ",
-+	      is_dvc ? "dvc" : "i2c", dev->seq, i2c_bus->regs,
-+	      i2c_bus->periph_id, i2c_bus->speed);
- 
- 	return 0;
- }
- 
--/* Sadly there is no error return from this function */
--void i2c_init_board(void)
--{
--	int node_list[TEGRA_I2C_NUM_CONTROLLERS];
--	const void *blob = gd->fdt_blob;
--	int count;
--
--	/* First check for newer (T114+) I2C ports */
--	count = fdtdec_find_aliases_for_id(blob, "i2c",
--			COMPAT_NVIDIA_TEGRA114_I2C, node_list,
--			TEGRA_I2C_NUM_CONTROLLERS);
--	if (process_nodes(blob, node_list, count, 0, 1))
--		return;
--
--	/* Now get the older (T20/T30) normal I2C ports */
--	count = fdtdec_find_aliases_for_id(blob, "i2c",
--			COMPAT_NVIDIA_TEGRA20_I2C, node_list,
--			TEGRA_I2C_NUM_CONTROLLERS);
--	if (process_nodes(blob, node_list, count, 0, 0))
--		return;
--
--	/* Now look for dvc ports */
--	count = fdtdec_add_aliases_for_id(blob, "i2c",
--			COMPAT_NVIDIA_TEGRA20_DVC, node_list,
--			TEGRA_I2C_NUM_CONTROLLERS);
--	if (process_nodes(blob, node_list, count, 1, 0))
--		return;
--}
--
--static void tegra_i2c_init(struct i2c_adapter *adap, int speed, int slaveaddr)
--{
--	/* No i2c support prior to relocation */
--	if (!(gd->flags & GD_FLG_RELOC))
--		return;
--
--	/* This will override the speed selected in the fdt for that port */
--	debug("i2c_init(speed=%u, slaveaddr=0x%x)\n", speed, slaveaddr);
--	i2c_set_bus_speed(speed);
--}
--
- /* i2c write version without the register address */
--static int i2c_write_data(struct i2c_bus *bus, uchar chip, uchar *buffer,
-+static int i2c_write_data(struct i2c_bus *i2c_bus, uchar chip, uchar *buffer,
- 			  int len, bool end_with_repeated_start)
- {
- 	int rc;
-@@ -484,7 +389,7 @@
- 	debug("\n");
- 
- 	/* Shift 7-bit address over for lower-level i2c functions */
--	rc = tegra_i2c_write_data(bus, chip << 1, buffer, len,
-+	rc = tegra_i2c_write_data(i2c_bus, chip << 1, buffer, len,
- 				  end_with_repeated_start);
- 	if (rc)
- 		debug("i2c_write_data(): rc=%d\n", rc);
-@@ -493,14 +398,14 @@
- }
- 
- /* i2c read version without the register address */
--static int i2c_read_data(struct i2c_bus *bus, uchar chip, uchar *buffer,
--				int len)
-+static int i2c_read_data(struct i2c_bus *i2c_bus, uchar chip, uchar *buffer,
-+			 int len)
- {
- 	int rc;
- 
- 	debug("inside i2c_read_data():\n");
- 	/* Shift 7-bit address over for lower-level i2c functions */
--	rc = tegra_i2c_read_data(bus, chip << 1, buffer, len);
-+	rc = tegra_i2c_read_data(i2c_bus, chip << 1, buffer, len);
- 	if (rc) {
- 		debug("i2c_read_data(): rc=%d\n", rc);
- 		return rc;
-@@ -516,132 +421,99 @@
- }
- 
- /* Probe to see if a chip is present. */
--static int tegra_i2c_probe(struct i2c_adapter *adap, uchar chip)
-+static int tegra_i2c_probe_chip(struct udevice *bus, uint chip_addr,
-+				uint chip_flags)
- {
--	struct i2c_bus *bus;
-+	struct i2c_bus *i2c_bus = dev_get_priv(bus);
- 	int rc;
--	uchar reg;
-+	u8 reg;
- 
--	debug("i2c_probe: addr=0x%x\n", chip);
--	bus = tegra_i2c_get_bus(adap);
--	if (!bus)
--		return 1;
--	reg = 0;
--	rc = i2c_write_data(bus, chip, &reg, 1, false);
--	if (rc) {
--		debug("Error probing 0x%x.\n", chip);
--		return 1;
--	}
--	return 0;
-+	/* Shift 7-bit address over for lower-level i2c functions */
-+	rc = tegra_i2c_write_data(i2c_bus, chip_addr << 1, &reg, sizeof(reg),
-+				  false);
-+
-+	return rc;
- }
- 
--static int i2c_addr_ok(const uint addr, const int alen)
-+static int tegra_i2c_xfer(struct udevice *bus, struct i2c_msg *msg,
-+			  int nmsgs)
- {
--	/* We support 7 or 10 bit addresses, so one or two bytes each */
--	return alen == 1 || alen == 2;
--}
-+	struct i2c_bus *i2c_bus = dev_get_priv(bus);
-+	int ret;
- 
--/* Read bytes */
--static int tegra_i2c_read(struct i2c_adapter *adap, uchar chip, uint addr,
--			int alen, uchar *buffer, int len)
--{
--	struct i2c_bus *bus;
--	uint offset;
--	int i;
--
--	debug("i2c_read: chip=0x%x, addr=0x%x, alen=0x%x len=0x%x\n",
--	      chip, addr, alen, len);
--	bus = tegra_i2c_get_bus(adap);
--	if (!bus)
--		return 1;
--	if (!i2c_addr_ok(addr, alen)) {
--		debug("i2c_read: Bad address %x.%d.\n", addr, alen);
--		return 1;
--	}
--	for (offset = 0; offset < len; offset++) {
--		if (alen) {
--			uchar data[alen];
--			for (i = 0; i < alen; i++) {
--				data[alen - i - 1] =
--					(addr + offset) >> (8 * i);
--			}
--			if (i2c_write_data(bus, chip, data, alen, true)) {
--				debug("i2c_read: error sending (0x%x)\n",
--					addr);
--				return 1;
--			}
-+	debug("i2c_xfer: %d messages\n", nmsgs);
-+	for (; nmsgs > 0; nmsgs--, msg++) {
-+		bool next_is_read = nmsgs > 1 && (msg[1].flags & I2C_M_RD);
-+
-+		debug("i2c_xfer: chip=0x%x, len=0x%x\n", msg->addr, msg->len);
-+		if (msg->flags & I2C_M_RD) {
-+			ret = i2c_read_data(i2c_bus, msg->addr, msg->buf,
-+					    msg->len);
-+		} else {
-+			ret = i2c_write_data(i2c_bus, msg->addr, msg->buf,
-+					     msg->len, next_is_read);
- 		}
--		if (i2c_read_data(bus, chip, buffer + offset, 1)) {
--			debug("i2c_read: error reading (0x%x)\n", addr);
--			return 1;
-+		if (ret) {
-+			debug("i2c_write: error sending\n");
-+			return -EREMOTEIO;
- 		}
- 	}
- 
- 	return 0;
- }
- 
--/* Write bytes */
--static int tegra_i2c_write(struct i2c_adapter *adap, uchar chip, uint addr,
--			int alen, uchar *buffer, int len)
--{
--	struct i2c_bus *bus;
--	uint offset;
--	int i;
--
--	debug("i2c_write: chip=0x%x, addr=0x%x, alen=0x%x len=0x%x\n",
--	      chip, addr, alen, len);
--	bus = tegra_i2c_get_bus(adap);
--	if (!bus)
--		return 1;
--	if (!i2c_addr_ok(addr, alen)) {
--		debug("i2c_write: Bad address %x.%d.\n", addr, alen);
--		return 1;
--	}
--	for (offset = 0; offset < len; offset++) {
--		uchar data[alen + 1];
--		for (i = 0; i < alen; i++)
--			data[alen - i - 1] = (addr + offset) >> (8 * i);
--		data[alen] = buffer[offset];
--		if (i2c_write_data(bus, chip, data, alen + 1, false)) {
--			debug("i2c_write: error sending (0x%x)\n", addr);
--			return 1;
-+int tegra_i2c_get_dvc_bus(struct udevice **busp)
-+{
-+	struct udevice *bus;
-+
-+	for (uclass_first_device(UCLASS_I2C, &bus);
-+	     bus;
-+	     uclass_next_device(&bus)) {
-+		if (dev_get_of_data(bus) == TYPE_DVC) {
-+			*busp = bus;
-+			return 0;
- 		}
- 	}
- 
--	return 0;
-+	return -ENODEV;
- }
- 
--int tegra_i2c_get_dvc_bus_num(void)
--{
--	int i;
-+static const struct dm_i2c_ops tegra_i2c_ops = {
-+	.xfer		= tegra_i2c_xfer,
-+	.probe_chip	= tegra_i2c_probe_chip,
-+	.set_bus_speed	= tegra_i2c_set_bus_speed,
-+};
- 
--	for (i = 0; i < TEGRA_I2C_NUM_CONTROLLERS; i++) {
--		struct i2c_bus *bus = &i2c_controllers[i];
-+static int tegra_i2c_child_pre_probe(struct udevice *dev)
-+{
-+	struct dm_i2c_chip *i2c_chip = dev_get_parentdata(dev);
- 
--		if (bus->inited && bus->is_dvc)
--			return i;
--	}
-+	if (dev->of_offset == -1)
-+		return 0;
-+	return i2c_chip_ofdata_to_platdata(gd->fdt_blob, dev->of_offset,
-+					   i2c_chip);
-+}
- 
--	return -1;
-+static int tegra_i2c_ofdata_to_platdata(struct udevice *dev)
-+{
-+	return 0;
- }
- 
--/*
-- * Register soft i2c adapters
-- */
--U_BOOT_I2C_ADAP_COMPLETE(tegra0, tegra_i2c_init, tegra_i2c_probe,
--			 tegra_i2c_read, tegra_i2c_write,
--			 tegra_i2c_set_bus_speed, 100000, 0, 0)
--U_BOOT_I2C_ADAP_COMPLETE(tegra1, tegra_i2c_init, tegra_i2c_probe,
--			 tegra_i2c_read, tegra_i2c_write,
--			 tegra_i2c_set_bus_speed, 100000, 0, 1)
--U_BOOT_I2C_ADAP_COMPLETE(tegra2, tegra_i2c_init, tegra_i2c_probe,
--			 tegra_i2c_read, tegra_i2c_write,
--			 tegra_i2c_set_bus_speed, 100000, 0, 2)
--U_BOOT_I2C_ADAP_COMPLETE(tegra3, tegra_i2c_init, tegra_i2c_probe,
--			 tegra_i2c_read, tegra_i2c_write,
--			 tegra_i2c_set_bus_speed, 100000, 0, 3)
--#if TEGRA_I2C_NUM_CONTROLLERS > 4
--U_BOOT_I2C_ADAP_COMPLETE(tegra4, tegra_i2c_init, tegra_i2c_probe,
--			 tegra_i2c_read, tegra_i2c_write,
--			 tegra_i2c_set_bus_speed, 100000, 0, 4)
--#endif
-+static const struct udevice_id tegra_i2c_ids[] = {
-+	{ .compatible = "nvidia,tegra114-i2c", .data = TYPE_114 },
-+	{ .compatible = "nvidia,tegra20-i2c", .data = TYPE_STD },
-+	{ .compatible = "nvidia,tegra20-i2c-dvc", .data = TYPE_DVC },
-+	{ }
-+};
-+
-+U_BOOT_DRIVER(i2c_tegra) = {
-+	.name	= "i2c_tegra",
-+	.id	= UCLASS_I2C,
-+	.of_match = tegra_i2c_ids,
-+	.ofdata_to_platdata = tegra_i2c_ofdata_to_platdata,
-+	.probe	= tegra_i2c_probe,
-+	.per_child_auto_alloc_size = sizeof(struct dm_i2c_chip),
-+	.child_pre_probe = tegra_i2c_child_pre_probe,
-+	.priv_auto_alloc_size = sizeof(struct i2c_bus),
-+	.ops	= &tegra_i2c_ops,
-+};
-diff -ruN u-boot-2015.01-rc3/drivers/misc/i2c_eeprom.c u-boot/drivers/misc/i2c_eeprom.c
---- u-boot-2015.01-rc3/drivers/misc/i2c_eeprom.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/drivers/misc/i2c_eeprom.c	2015-01-01 17:34:32.649496760 +0100
-@@ -0,0 +1,51 @@
-+/*
-+ * Copyright (c) 2014 Google, Inc
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <dm.h>
-+#include <i2c.h>
-+#include <i2c_eeprom.h>
-+
-+static int i2c_eeprom_read(struct udevice *dev, int offset, uint8_t *buf,
-+			   int size)
-+{
-+	return -ENODEV;
-+}
-+
-+static int i2c_eeprom_write(struct udevice *dev, int offset,
-+			    const uint8_t *buf, int size)
-+{
-+	return -ENODEV;
-+}
-+
-+struct i2c_eeprom_ops i2c_eeprom_std_ops = {
-+	.read	= i2c_eeprom_read,
-+	.write	= i2c_eeprom_write,
-+};
-+
-+int i2c_eeprom_std_probe(struct udevice *dev)
-+{
-+	return 0;
-+}
-+
-+static const struct udevice_id i2c_eeprom_std_ids[] = {
-+	{ .compatible = "i2c-eeprom" },
-+	{ }
-+};
-+
-+U_BOOT_DRIVER(i2c_eeprom_std) = {
-+	.name		= "i2c_eeprom",
-+	.id		= UCLASS_I2C_EEPROM,
-+	.of_match	= i2c_eeprom_std_ids,
-+	.probe		= i2c_eeprom_std_probe,
-+	.priv_auto_alloc_size = sizeof(struct i2c_eeprom),
-+	.ops		= &i2c_eeprom_std_ops,
-+};
-+
-+UCLASS_DRIVER(i2c_eeprom) = {
-+	.id		= UCLASS_I2C_EEPROM,
-+	.name		= "i2c_eeprom",
-+};
-diff -ruN u-boot-2015.01-rc3/drivers/misc/i2c_eeprom_emul.c u-boot/drivers/misc/i2c_eeprom_emul.c
---- u-boot-2015.01-rc3/drivers/misc/i2c_eeprom_emul.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/drivers/misc/i2c_eeprom_emul.c	2015-01-01 17:34:32.649496760 +0100
-@@ -0,0 +1,168 @@
-+/*
-+ * Simulate an I2C eeprom
-+ *
-+ * Copyright (c) 2014 Google, Inc
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <dm.h>
-+#include <fdtdec.h>
-+#include <i2c.h>
-+#include <malloc.h>
-+#include <asm/test.h>
-+
-+#ifdef DEBUG
-+#define debug_buffer print_buffer
-+#else
-+#define debug_buffer(x, ...)
-+#endif
-+
-+DECLARE_GLOBAL_DATA_PTR;
-+
-+struct sandbox_i2c_flash_plat_data {
-+	enum sandbox_i2c_eeprom_test_mode test_mode;
-+	const char *filename;
-+	int offset_len;		/* Length of an offset in bytes */
-+	int size;		/* Size of data buffer */
-+};
-+
-+struct sandbox_i2c_flash {
-+	uint8_t *data;
-+};
-+
-+void sandbox_i2c_eeprom_set_test_mode(struct udevice *dev,
-+				      enum sandbox_i2c_eeprom_test_mode mode)
-+{
-+	struct sandbox_i2c_flash_plat_data *plat = dev_get_platdata(dev);
-+
-+	plat->test_mode = mode;
-+}
-+
-+void sandbox_i2c_eeprom_set_offset_len(struct udevice *dev, int offset_len)
-+{
-+	struct sandbox_i2c_flash_plat_data *plat = dev_get_platdata(dev);
-+
-+	plat->offset_len = offset_len;
-+}
-+
-+static int sandbox_i2c_eeprom_xfer(struct udevice *emul, struct i2c_msg *msg,
-+				  int nmsgs)
-+{
-+	struct sandbox_i2c_flash *priv = dev_get_priv(emul);
-+	uint offset = 0;
-+
-+	debug("\n%s\n", __func__);
-+	debug_buffer(0, priv->data, 1, 16, 0);
-+	for (; nmsgs > 0; nmsgs--, msg++) {
-+		struct sandbox_i2c_flash_plat_data *plat =
-+				dev_get_platdata(emul);
-+		int len;
-+		u8 *ptr;
-+
-+		if (!plat->size)
-+			return -ENODEV;
-+		if (msg->addr + msg->len > plat->size) {
-+			debug("%s: Address %x, len %x is outside range 0..%x\n",
-+			      __func__, msg->addr, msg->len, plat->size);
-+			return -EINVAL;
-+		}
-+		len = msg->len;
-+		debug("   %s: msg->len=%d",
-+		      msg->flags & I2C_M_RD ? "read" : "write",
-+		      msg->len);
-+		if (msg->flags & I2C_M_RD) {
-+			if (plat->test_mode == SIE_TEST_MODE_SINGLE_BYTE)
-+				len = 1;
-+			debug(", offset %x, len %x: ", offset, len);
-+			memcpy(msg->buf, priv->data + offset, len);
-+			memset(msg->buf + len, '\xff', msg->len - len);
-+			debug_buffer(0, msg->buf, 1, msg->len, 0);
-+		} else if (len >= plat->offset_len) {
-+			int i;
-+
-+			ptr = msg->buf;
-+			for (i = 0; i < plat->offset_len; i++, len--)
-+				offset = (offset << 8) | *ptr++;
-+			debug(", set offset %x: ", offset);
-+			debug_buffer(0, msg->buf, 1, msg->len, 0);
-+			if (plat->test_mode == SIE_TEST_MODE_SINGLE_BYTE)
-+				len = min(len, 1);
-+
-+			/* For testing, map offsets into our limited buffer */
-+			for (i = 24; i > 0; i -= 8) {
-+				if (offset > (1 << i)) {
-+					offset = (offset >> i) |
-+						(offset & ((1 << i) - 1));
-+					offset += i;
-+				}
-+			}
-+			memcpy(priv->data + offset, ptr, len);
-+		}
-+	}
-+	debug_buffer(0, priv->data, 1, 16, 0);
-+
-+	return 0;
-+}
-+
-+struct dm_i2c_ops sandbox_i2c_emul_ops = {
-+	.xfer = sandbox_i2c_eeprom_xfer,
-+};
-+
-+static int sandbox_i2c_eeprom_ofdata_to_platdata(struct udevice *dev)
-+{
-+	struct sandbox_i2c_flash_plat_data *plat = dev_get_platdata(dev);
-+
-+	plat->size = fdtdec_get_int(gd->fdt_blob, dev->of_offset,
-+				    "sandbox,size", 32);
-+	plat->filename = fdt_getprop(gd->fdt_blob, dev->of_offset,
-+				     "sandbox,filename", NULL);
-+	if (!plat->filename) {
-+		debug("%s: No filename for device '%s'\n", __func__,
-+		      dev->name);
-+		return -EINVAL;
-+	}
-+	plat->test_mode = SIE_TEST_MODE_NONE;
-+	plat->offset_len = 1;
-+
-+	return 0;
-+}
-+
-+static int sandbox_i2c_eeprom_probe(struct udevice *dev)
-+{
-+	struct sandbox_i2c_flash_plat_data *plat = dev_get_platdata(dev);
-+	struct sandbox_i2c_flash *priv = dev_get_priv(dev);
-+
-+	priv->data = calloc(1, plat->size);
-+	if (!priv->data)
-+		return -ENOMEM;
-+
-+	return 0;
-+}
-+
-+static int sandbox_i2c_eeprom_remove(struct udevice *dev)
-+{
-+	struct sandbox_i2c_flash *priv = dev_get_priv(dev);
-+
-+	free(priv->data);
-+
-+	return 0;
-+}
-+
-+static const struct udevice_id sandbox_i2c_ids[] = {
-+	{ .compatible = "sandbox,i2c-eeprom" },
-+	{ }
-+};
-+
-+U_BOOT_DRIVER(sandbox_i2c_emul) = {
-+	.name		= "sandbox_i2c_eeprom_emul",
-+	.id		= UCLASS_I2C_EMUL,
-+	.of_match	= sandbox_i2c_ids,
-+	.ofdata_to_platdata = sandbox_i2c_eeprom_ofdata_to_platdata,
-+	.probe		= sandbox_i2c_eeprom_probe,
-+	.remove		= sandbox_i2c_eeprom_remove,
-+	.priv_auto_alloc_size = sizeof(struct sandbox_i2c_flash),
-+	.platdata_auto_alloc_size = sizeof(struct sandbox_i2c_flash_plat_data),
-+	.ops		= &sandbox_i2c_emul_ops,
-+};
-diff -ruN u-boot-2015.01-rc3/drivers/misc/Makefile u-boot/drivers/misc/Makefile
---- u-boot-2015.01-rc3/drivers/misc/Makefile	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/misc/Makefile	2015-01-01 17:34:32.649496760 +0100
-@@ -15,11 +15,16 @@
- obj-$(CONFIG_CROS_EC_SPI) += cros_ec_spi.o
- obj-$(CONFIG_FSL_IIM) += fsl_iim.o
- obj-$(CONFIG_GPIO_LED) += gpio_led.o
-+obj-$(CONFIG_I2C_EEPROM) += i2c_eeprom.o
- obj-$(CONFIG_FSL_MC9SDZ60) += mc9sdz60.o
- obj-$(CONFIG_MXC_OCOTP) += mxc_ocotp.o
- obj-$(CONFIG_MXS_OCOTP) += mxs_ocotp.o
- obj-$(CONFIG_NS87308) += ns87308.o
- obj-$(CONFIG_PDSP188x) += pdsp188x.o
-+ifdef CONFIG_DM_I2C
-+obj-$(CONFIG_SANDBOX) += i2c_eeprom_emul.o
-+endif
-+obj-$(CONFIG_SMSC_LPC47M) += smsc_lpc47m.o
- obj-$(CONFIG_STATUS_LED) += status_led.o
- obj-$(CONFIG_TWL4030_LED) += twl4030_led.o
- obj-$(CONFIG_FSL_IFC) += fsl_ifc.o
-diff -ruN u-boot-2015.01-rc3/drivers/misc/mxc_ocotp.c u-boot/drivers/misc/mxc_ocotp.c
---- u-boot-2015.01-rc3/drivers/misc/mxc_ocotp.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/misc/mxc_ocotp.c	2015-01-01 17:34:32.649496760 +0100
-@@ -81,8 +81,6 @@
- 	err = !!(readl(&regs->ctrl) & BM_CTRL_ERROR);
- 	clear_error(regs);
- 
--	enable_ocotp_clk(0);
--
- 	if (err) {
- 		printf("mxc_ocotp %s(): Access protect error\n", caller);
- 		return -EIO;
-diff -ruN u-boot-2015.01-rc3/drivers/misc/mxs_ocotp.c u-boot/drivers/misc/mxs_ocotp.c
---- u-boot-2015.01-rc3/drivers/misc/mxs_ocotp.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/misc/mxs_ocotp.c	2015-01-01 17:34:32.649496760 +0100
-@@ -187,6 +187,8 @@
- 	uint32_t hclk_val, vddio_val;
- 	int ret;
- 
-+	mxs_ocotp_clear_error();
-+
- 	/* Make sure the banks are closed for reading. */
- 	ret = mxs_ocotp_read_bank_open(0);
- 	if (ret) {
-@@ -221,13 +223,17 @@
- 		goto fail;
- 	}
- 
-+	/* Check for errors */
-+	if (readl(&ocotp_regs->hw_ocotp_ctrl) & OCOTP_CTRL_ERROR) {
-+		puts("Failed writing fuses!\n");
-+		ret = -EPERM;
-+		goto fail;
-+	}
-+
- fail:
- 	mxs_ocotp_scale_vddio(0, &vddio_val);
--	ret = mxs_ocotp_scale_hclk(0, &hclk_val);
--	if (ret) {
-+	if (mxs_ocotp_scale_hclk(0, &hclk_val))
- 		puts("Failed scaling up the HCLK!\n");
--		return ret;
--	}
- 
- 	return ret;
- }
-diff -ruN u-boot-2015.01-rc3/drivers/misc/smsc_lpc47m.c u-boot/drivers/misc/smsc_lpc47m.c
---- u-boot-2015.01-rc3/drivers/misc/smsc_lpc47m.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/drivers/misc/smsc_lpc47m.c	2015-01-01 17:34:32.649496760 +0100
-@@ -0,0 +1,33 @@
-+/*
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <asm/io.h>
-+#include <asm/pnp_def.h>
-+
-+static void pnp_enter_conf_state(u16 dev)
-+{
-+	u16 port = dev >> 8;
-+
-+	outb(0x55, port);
-+}
-+
-+static void pnp_exit_conf_state(u16 dev)
-+{
-+	u16 port = dev >> 8;
-+
-+	outb(0xaa, port);
-+}
-+
-+void lpc47m_enable_serial(u16 dev, u16 iobase)
-+{
-+	pnp_enter_conf_state(dev);
-+	pnp_set_logical_device(dev);
-+	pnp_set_enable(dev, 0);
-+	pnp_set_iobase(dev, PNP_IDX_IO0, iobase);
-+	pnp_set_enable(dev, 1);
-+	pnp_exit_conf_state(dev);
-+}
-diff -ruN u-boot-2015.01-rc3/drivers/mmc/dw_mmc.c u-boot/drivers/mmc/dw_mmc.c
---- u-boot-2015.01-rc3/drivers/mmc/dw_mmc.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/mmc/dw_mmc.c	2015-01-01 17:34:32.653496694 +0100
-@@ -318,7 +318,7 @@
- 	dwmci_writel(host, DWMCI_CTYPE, ctype);
- 
- 	regs = dwmci_readl(host, DWMCI_UHS_REG);
--	if (mmc->card_caps & MMC_MODE_DDR_52MHz)
-+	if (mmc->ddr_mode)
- 		regs |= DWMCI_DDR_MODE;
- 	else
- 		regs &= DWMCI_DDR_MODE;
-diff -ruN u-boot-2015.01-rc3/drivers/mmc/exynos_dw_mmc.c u-boot/drivers/mmc/exynos_dw_mmc.c
---- u-boot-2015.01-rc3/drivers/mmc/exynos_dw_mmc.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/mmc/exynos_dw_mmc.c	2015-01-01 17:34:32.653496694 +0100
-@@ -101,7 +101,7 @@
- 	host->get_mmc_clk = exynos_dwmci_get_clk;
- 	/* Add the mmc channel to be registered with mmc core */
- 	if (add_dwmci(host, DWMMC_MAX_FREQ, DWMMC_MIN_FREQ)) {
--		debug("dwmmc%d registration failed\n", index);
-+		printf("DWMMC%d registration failed\n", index);
- 		return -1;
- 	}
- 	return 0;
-@@ -146,7 +146,7 @@
- 	flag = host->buswidth == 8 ? PINMUX_FLAG_8BIT_MODE : PINMUX_FLAG_NONE;
- 	err = exynos_pinmux_config(host->dev_id, flag);
- 	if (err) {
--		debug("DWMMC not configure\n");
-+		printf("DWMMC%d not configure\n", index);
- 		return err;
- 	}
- 
-@@ -162,21 +162,22 @@
- 	/* Extract device id for each mmc channel */
- 	host->dev_id = pinmux_decode_periph_id(blob, node);
- 
-+	host->dev_index = fdtdec_get_int(blob, node, "index", host->dev_id);
-+	if (host->dev_index == host->dev_id)
-+		host->dev_index = host->dev_id - PERIPH_ID_SDMMC0;
-+
-+
- 	/* Get the bus width from the device node */
- 	host->buswidth = fdtdec_get_int(blob, node, "samsung,bus-width", 0);
- 	if (host->buswidth <= 0) {
--		debug("DWMMC: Can't get bus-width\n");
-+		printf("DWMMC%d: Can't get bus-width\n", host->dev_index);
- 		return -EINVAL;
- 	}
- 
--	host->dev_index = fdtdec_get_int(blob, node, "index", host->dev_id);
--	if (host->dev_index == host->dev_id)
--		host->dev_index = host->dev_id - PERIPH_ID_SDMMC0;
--
- 	/* Set the base address from the device node */
- 	base = fdtdec_get_addr(blob, node, "reg");
- 	if (!base) {
--		debug("DWMMC: Can't get base address\n");
-+		printf("DWMMC%d: Can't get base address\n", host->dev_index);
- 		return -EINVAL;
- 	}
- 	host->ioaddr = (void *)base;
-@@ -184,7 +185,8 @@
- 	/* Extract the timing info from the node */
- 	err =  fdtdec_get_int_array(blob, node, "samsung,timing", timing, 3);
- 	if (err) {
--		debug("Can't get sdr-timings for devider\n");
-+		printf("DWMMC%d: Can't get sdr-timings for devider\n",
-+				host->dev_index);
- 		return -EINVAL;
- 	}
- 
-@@ -214,7 +216,7 @@
- 		host = &dwmci_host[i];
- 		err = exynos_dwmci_get_config(blob, node, host);
- 		if (err) {
--			debug("%s: failed to decode dev %d\n", __func__, i);
-+			printf("%s: failed to decode dev %d\n", __func__, i);
- 			return err;
- 		}
- 
-diff -ruN u-boot-2015.01-rc3/drivers/mmc/mmc.c u-boot/drivers/mmc/mmc.c
---- u-boot-2015.01-rc3/drivers/mmc/mmc.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/mmc/mmc.c	2015-01-01 17:34:32.653496694 +0100
-@@ -159,7 +159,7 @@
- {
- 	struct mmc_cmd cmd;
- 
--	if (mmc->card_caps & MMC_MODE_DDR_52MHz)
-+	if (mmc->ddr_mode)
- 		return 0;
- 
- 	cmd.cmdidx = MMC_CMD_SET_BLOCKLEN;
-@@ -486,7 +486,7 @@
- 	char cardtype;
- 	int err;
- 
--	mmc->card_caps = 0;
-+	mmc->card_caps = MMC_MODE_4BIT | MMC_MODE_8BIT;
- 
- 	if (mmc_host_is_spi(mmc))
- 		return 0;
-@@ -519,7 +519,7 @@
- 
- 	/* High Speed is set, there are two types: 52MHz and 26MHz */
- 	if (cardtype & EXT_CSD_CARD_TYPE_52) {
--		if (cardtype & EXT_CSD_CARD_TYPE_DDR_52)
-+		if (cardtype & EXT_CSD_CARD_TYPE_DDR_1_8V)
- 			mmc->card_caps |= MMC_MODE_DDR_52MHz;
- 		mmc->card_caps |= MMC_MODE_HS_52MHz | MMC_MODE_HS;
- 	} else {
-@@ -1001,6 +1001,9 @@
- 		case 6:
- 			mmc->version = MMC_VERSION_4_5;
- 			break;
-+		case 7:
-+			mmc->version = MMC_VERSION_5_0;
-+			break;
- 		}
- 
- 		/*
-@@ -1022,6 +1025,21 @@
- 			mmc->erase_grp_size =
- 				ext_csd[EXT_CSD_HC_ERASE_GRP_SIZE] *
- 					MMC_MAX_BLOCK_LEN * 1024;
-+			/*
-+			 * if high capacity and partition setting completed
-+			 * SEC_COUNT is valid even if it is smaller than 2 GiB
-+			 * JEDEC Standard JESD84-B45, 6.2.4
-+			 */
-+			if (mmc->high_capacity &&
-+			    (ext_csd[EXT_CSD_PARTITION_SETTING] &
-+			     EXT_CSD_PARTITION_SETTING_COMPLETED)) {
-+				capacity = (ext_csd[EXT_CSD_SEC_CNT]) |
-+					(ext_csd[EXT_CSD_SEC_CNT + 1] << 8) |
-+					(ext_csd[EXT_CSD_SEC_CNT + 2] << 16) |
-+					(ext_csd[EXT_CSD_SEC_CNT + 3] << 24);
-+				capacity *= MMC_MAX_BLOCK_LEN;
-+				mmc->capacity_user = capacity;
-+			}
- 		} else {
- 			/* Calculate the group size from the csd value. */
- 			int erase_gsz, erase_gmul;
-@@ -1103,8 +1121,10 @@
- 
- 		/* An array to map CSD bus widths to host cap bits */
- 		static unsigned ext_to_hostcaps[] = {
--			[EXT_CSD_DDR_BUS_WIDTH_4] = MMC_MODE_DDR_52MHz,
--			[EXT_CSD_DDR_BUS_WIDTH_8] = MMC_MODE_DDR_52MHz,
-+			[EXT_CSD_DDR_BUS_WIDTH_4] =
-+				MMC_MODE_DDR_52MHz | MMC_MODE_4BIT,
-+			[EXT_CSD_DDR_BUS_WIDTH_8] =
-+				MMC_MODE_DDR_52MHz | MMC_MODE_8BIT,
- 			[EXT_CSD_BUS_WIDTH_4] = MMC_MODE_4BIT,
- 			[EXT_CSD_BUS_WIDTH_8] = MMC_MODE_8BIT,
- 		};
-@@ -1116,13 +1136,13 @@
- 
- 		for (idx=0; idx < ARRAY_SIZE(ext_csd_bits); idx++) {
- 			unsigned int extw = ext_csd_bits[idx];
-+			unsigned int caps = ext_to_hostcaps[extw];
- 
- 			/*
--			 * Check to make sure the controller supports
--			 * this bus width, if it's more than 1
-+			 * Check to make sure the card and controller support
-+			 * these capabilities
- 			 */
--			if (extw != EXT_CSD_BUS_WIDTH_1 &&
--					!(mmc->cfg->host_caps & ext_to_hostcaps[extw]))
-+			if ((mmc->card_caps & caps) != caps)
- 				continue;
- 
- 			err = mmc_switch(mmc, EXT_CSD_CMD_SET_NORMAL,
-@@ -1131,26 +1151,33 @@
- 			if (err)
- 				continue;
- 
-+			mmc->ddr_mode = (caps & MMC_MODE_DDR_52MHz) ? 1 : 0;
- 			mmc_set_bus_width(mmc, widths[idx]);
- 
- 			err = mmc_send_ext_csd(mmc, test_csd);
--			/* Only compare read only fields */
--			if (!err && ext_csd[EXT_CSD_PARTITIONING_SUPPORT] \
--				    == test_csd[EXT_CSD_PARTITIONING_SUPPORT]
--				 && ext_csd[EXT_CSD_HC_WP_GRP_SIZE] \
--				    == test_csd[EXT_CSD_HC_WP_GRP_SIZE] \
--				 && ext_csd[EXT_CSD_REV] \
--				    == test_csd[EXT_CSD_REV]
--				 && ext_csd[EXT_CSD_HC_ERASE_GRP_SIZE] \
--				    == test_csd[EXT_CSD_HC_ERASE_GRP_SIZE]
--				 && memcmp(&ext_csd[EXT_CSD_SEC_CNT], \
--					&test_csd[EXT_CSD_SEC_CNT], 4) == 0) {
- 
--				mmc->card_caps |= ext_to_hostcaps[extw];
-+			if (err)
-+				continue;
-+
-+			/* Only compare read only fields */
-+			if (ext_csd[EXT_CSD_PARTITIONING_SUPPORT]
-+				== test_csd[EXT_CSD_PARTITIONING_SUPPORT] &&
-+			    ext_csd[EXT_CSD_HC_WP_GRP_SIZE]
-+				== test_csd[EXT_CSD_HC_WP_GRP_SIZE] &&
-+			    ext_csd[EXT_CSD_REV]
-+				== test_csd[EXT_CSD_REV] &&
-+			    ext_csd[EXT_CSD_HC_ERASE_GRP_SIZE]
-+				== test_csd[EXT_CSD_HC_ERASE_GRP_SIZE] &&
-+			    memcmp(&ext_csd[EXT_CSD_SEC_CNT],
-+				   &test_csd[EXT_CSD_SEC_CNT], 4) == 0)
- 				break;
--			}
-+			else
-+				err = SWITCH_ERR;
- 		}
- 
-+		if (err)
-+			return err;
-+
- 		if (mmc->card_caps & MMC_MODE_HS) {
- 			if (mmc->card_caps & MMC_MODE_HS_52MHz)
- 				mmc->tran_speed = 52000000;
-@@ -1161,6 +1188,12 @@
- 
- 	mmc_set_clock(mmc, mmc->tran_speed);
- 
-+	/* Fix the block length for DDR mode */
-+	if (mmc->ddr_mode) {
-+		mmc->read_bl_len = MMC_MAX_BLOCK_LEN;
-+		mmc->write_bl_len = MMC_MAX_BLOCK_LEN;
-+	}
-+
- 	/* fill in device description */
- 	mmc->block_dev.lun = 0;
- 	mmc->block_dev.type = 0;
-@@ -1306,6 +1339,7 @@
- 	if (err)
- 		return err;
- 
-+	mmc->ddr_mode = 0;
- 	mmc_set_bus_width(mmc, 1);
- 	mmc_set_clock(mmc, 1);
- 
-@@ -1408,8 +1442,11 @@
- 
- 		printf("%s: %d", m->cfg->name, m->block_dev.dev);
- 
--		if (entry->next != &mmc_devices)
--			printf("%c ", separator);
-+		if (entry->next != &mmc_devices) {
-+			printf("%c", separator);
-+			if (separator != '\n')
-+				puts (" ");
-+		}
- 	}
- 
- 	printf("\n");
-diff -ruN u-boot-2015.01-rc3/drivers/mtd/nand/fsl_ifc_nand.c u-boot/drivers/mtd/nand/fsl_ifc_nand.c
---- u-boot-2015.01-rc3/drivers/mtd/nand/fsl_ifc_nand.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/mtd/nand/fsl_ifc_nand.c	2015-01-01 17:34:32.657496629 +0100
-@@ -292,7 +292,7 @@
- 	struct fsl_ifc *ifc = ctrl->regs;
- 	u32 timeo = (CONFIG_SYS_HZ * 10) / 1000;
- 	u32 time_start;
--	u32 eccstat[4];
-+	u32 eccstat[4] = {0};
- 	int i;
- 
- 	/* set the chip select for NAND Transaction */
-diff -ruN u-boot-2015.01-rc3/drivers/mtd/nand/fsl_ifc_spl.c u-boot/drivers/mtd/nand/fsl_ifc_spl.c
---- u-boot-2015.01-rc3/drivers/mtd/nand/fsl_ifc_spl.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/mtd/nand/fsl_ifc_spl.c	2015-01-01 17:34:32.657496629 +0100
-@@ -254,3 +254,13 @@
- 	uboot = (void *)CONFIG_SYS_NAND_U_BOOT_START;
- 	uboot();
- }
-+
-+#ifndef CONFIG_SPL_NAND_INIT
-+void nand_init(void)
-+{
-+}
-+
-+void nand_deselect(void)
-+{
-+}
-+#endif
-diff -ruN u-boot-2015.01-rc3/drivers/mtd/spi/sf_internal.h u-boot/drivers/mtd/spi/sf_internal.h
---- u-boot-2015.01-rc3/drivers/mtd/spi/sf_internal.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/mtd/spi/sf_internal.h	2015-01-01 17:34:32.665496498 +0100
-@@ -23,13 +23,16 @@
- /* Enum list - Full read commands */
- enum spi_read_cmds {
- 	ARRAY_SLOW		= 1 << 0,
--	DUAL_OUTPUT_FAST	= 1 << 1,
--	DUAL_IO_FAST		= 1 << 2,
--	QUAD_OUTPUT_FAST	= 1 << 3,
--	QUAD_IO_FAST		= 1 << 4,
-+	ARRAY_FAST		= 1 << 1,
-+	DUAL_OUTPUT_FAST	= 1 << 2,
-+	DUAL_IO_FAST		= 1 << 3,
-+	QUAD_OUTPUT_FAST	= 1 << 4,
-+	QUAD_IO_FAST		= 1 << 5,
- };
- 
--#define RD_EXTN	(ARRAY_SLOW | DUAL_OUTPUT_FAST | DUAL_IO_FAST)
-+/* Normal - Extended - Full command set */
-+#define RD_NORM	(ARRAY_SLOW | ARRAY_FAST)
-+#define RD_EXTN	(RD_NORM | DUAL_OUTPUT_FAST | DUAL_IO_FAST)
- #define RD_FULL	(RD_EXTN | QUAD_OUTPUT_FAST | QUAD_IO_FAST)
- 
- /* sf param flags */
-@@ -37,9 +40,13 @@
- 	SECT_4K		= 1 << 0,
- 	SECT_32K	= 1 << 1,
- 	E_FSR		= 1 << 2,
--	WR_QPP		= 1 << 3,
-+	SST_BP		= 1 << 3,
-+	SST_WP		= 1 << 4,
-+	WR_QPP		= 1 << 5,
- };
- 
-+#define SST_WR		(SST_BP | SST_WP)
-+
- #define SPI_FLASH_3B_ADDR_LEN		3
- #define SPI_FLASH_CMD_LEN		(1 + SPI_FLASH_3B_ADDR_LEN)
- #define SPI_FLASH_16MB_BOUN		0x1000000
-@@ -101,12 +108,13 @@
- 
- /* SST specific */
- #ifdef CONFIG_SPI_FLASH_SST
--# define SST_WP		0x01	/* Supports AAI word program */
- # define CMD_SST_BP		0x02    /* Byte Program */
- # define CMD_SST_AAI_WP	0xAD	/* Auto Address Incr Word Program */
- 
- int sst_write_wp(struct spi_flash *flash, u32 offset, size_t len,
- 		const void *buf);
-+int sst_write_bp(struct spi_flash *flash, u32 offset, size_t len,
-+		const void *buf);
- #endif
- 
- /**
-diff -ruN u-boot-2015.01-rc3/drivers/mtd/spi/sf_ops.c u-boot/drivers/mtd/spi/sf_ops.c
---- u-boot-2015.01-rc3/drivers/mtd/spi/sf_ops.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/mtd/spi/sf_ops.c	2015-01-01 17:34:32.665496498 +0100
-@@ -517,4 +517,35 @@
- 	spi_release_bus(flash->spi);
- 	return ret;
- }
-+
-+int sst_write_bp(struct spi_flash *flash, u32 offset, size_t len,
-+		const void *buf)
-+{
-+	size_t actual;
-+	int ret;
-+
-+	ret = spi_claim_bus(flash->spi);
-+	if (ret) {
-+		debug("SF: Unable to claim SPI bus\n");
-+		return ret;
-+	}
-+
-+	for (actual = 0; actual < len; actual++) {
-+		ret = sst_byte_write(flash, offset, buf + actual);
-+		if (ret) {
-+			debug("SF: sst byte program failed\n");
-+			break;
-+		}
-+		offset++;
-+	}
-+
-+	if (!ret)
-+		ret = spi_flash_cmd_write_disable(flash);
-+
-+	debug("SF: sst: program %s %zu bytes @ 0x%zx\n",
-+	      ret ? "failure" : "success", len, offset - actual);
-+
-+	spi_release_bus(flash->spi);
-+	return ret;
-+}
- #endif
-diff -ruN u-boot-2015.01-rc3/drivers/mtd/spi/sf_params.c u-boot/drivers/mtd/spi/sf_params.c
---- u-boot-2015.01-rc3/drivers/mtd/spi/sf_params.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/mtd/spi/sf_params.c	2015-01-01 17:34:32.665496498 +0100
-@@ -15,42 +15,42 @@
- /* SPI/QSPI flash device params structure */
- const struct spi_flash_params spi_flash_params_table[] = {
- #ifdef CONFIG_SPI_FLASH_ATMEL		/* ATMEL */
--	{"AT45DB011D",	   0x1f2200, 0x0,	64 * 1024,     4,	0,		    SECT_4K},
--	{"AT45DB021D",	   0x1f2300, 0x0,	64 * 1024,     8,	0,		    SECT_4K},
--	{"AT45DB041D",	   0x1f2400, 0x0,	64 * 1024,     8,	0,		    SECT_4K},
--	{"AT45DB081D",	   0x1f2500, 0x0,	64 * 1024,    16,	0,		    SECT_4K},
--	{"AT45DB161D",	   0x1f2600, 0x0,	64 * 1024,    32,	0,		    SECT_4K},
--	{"AT45DB321D",	   0x1f2700, 0x0,	64 * 1024,    64,	0,		    SECT_4K},
--	{"AT45DB641D",	   0x1f2800, 0x0,	64 * 1024,   128,	0,		    SECT_4K},
--	{"AT25DF321",      0x1f4701, 0x0,	64 * 1024,    64,	0,		    SECT_4K},
-+	{"AT45DB011D",	   0x1f2200, 0x0,	64 * 1024,     4, RD_NORM,		    SECT_4K},
-+	{"AT45DB021D",	   0x1f2300, 0x0,	64 * 1024,     8, RD_NORM,		    SECT_4K},
-+	{"AT45DB041D",	   0x1f2400, 0x0,	64 * 1024,     8, RD_NORM,		    SECT_4K},
-+	{"AT45DB081D",	   0x1f2500, 0x0,	64 * 1024,    16, RD_NORM,		    SECT_4K},
-+	{"AT45DB161D",	   0x1f2600, 0x0,	64 * 1024,    32, RD_NORM,		    SECT_4K},
-+	{"AT45DB321D",	   0x1f2700, 0x0,	64 * 1024,    64, RD_NORM,		    SECT_4K},
-+	{"AT45DB641D",	   0x1f2800, 0x0,	64 * 1024,   128, RD_NORM,		    SECT_4K},
-+	{"AT25DF321",      0x1f4701, 0x0,	64 * 1024,    64, RD_NORM,		    SECT_4K},
- #endif
- #ifdef CONFIG_SPI_FLASH_EON		/* EON */
--	{"EN25Q32B",	   0x1c3016, 0x0,	64 * 1024,    64,	0,			  0},
--	{"EN25Q64",	   0x1c3017, 0x0,	64 * 1024,   128,	0,		    SECT_4K},
--	{"EN25Q128B",	   0x1c3018, 0x0,       64 * 1024,   256,	0,			  0},
--	{"EN25S64",	   0x1c3817, 0x0,	64 * 1024,   128,	0,			  0},
-+	{"EN25Q32B",	   0x1c3016, 0x0,	64 * 1024,    64, RD_NORM,			  0},
-+	{"EN25Q64",	   0x1c3017, 0x0,	64 * 1024,   128, RD_NORM,		    SECT_4K},
-+	{"EN25Q128B",	   0x1c3018, 0x0,       64 * 1024,   256, RD_NORM,			  0},
-+	{"EN25S64",	   0x1c3817, 0x0,	64 * 1024,   128, RD_NORM,			  0},
- #endif
- #ifdef CONFIG_SPI_FLASH_GIGADEVICE	/* GIGADEVICE */
--	{"GD25Q64B",	   0xc84017, 0x0,	64 * 1024,   128,	0,		    SECT_4K},
--	{"GD25LQ32",	   0xc86016, 0x0,	64 * 1024,    64,	0,		    SECT_4K},
-+	{"GD25Q64B",	   0xc84017, 0x0,	64 * 1024,   128, RD_NORM,		    SECT_4K},
-+	{"GD25LQ32",	   0xc86016, 0x0,	64 * 1024,    64, RD_NORM,		    SECT_4K},
- #endif
- #ifdef CONFIG_SPI_FLASH_MACRONIX	/* MACRONIX */
--	{"MX25L2006E",	   0xc22012, 0x0,	64 * 1024,     4,	0,			  0},
--	{"MX25L4005",	   0xc22013, 0x0,	64 * 1024,     8,	0,			  0},
--	{"MX25L8005",	   0xc22014, 0x0,	64 * 1024,    16,	0,			  0},
--	{"MX25L1605D",	   0xc22015, 0x0,	64 * 1024,    32,	0,			  0},
--	{"MX25L3205D",	   0xc22016, 0x0,	64 * 1024,    64,	0,			  0},
--	{"MX25L6405D",	   0xc22017, 0x0,	64 * 1024,   128,	0,			  0},
-+	{"MX25L2006E",	   0xc22012, 0x0,	64 * 1024,     4, RD_NORM,			  0},
-+	{"MX25L4005",	   0xc22013, 0x0,	64 * 1024,     8, RD_NORM,			  0},
-+	{"MX25L8005",	   0xc22014, 0x0,	64 * 1024,    16, RD_NORM,			  0},
-+	{"MX25L1605D",	   0xc22015, 0x0,	64 * 1024,    32, RD_NORM,			  0},
-+	{"MX25L3205D",	   0xc22016, 0x0,	64 * 1024,    64, RD_NORM,			  0},
-+	{"MX25L6405D",	   0xc22017, 0x0,	64 * 1024,   128, RD_NORM,			  0},
- 	{"MX25L12805",	   0xc22018, 0x0,	64 * 1024,   256, RD_FULL,		     WR_QPP},
- 	{"MX25L25635F",	   0xc22019, 0x0,	64 * 1024,   512, RD_FULL,		     WR_QPP},
- 	{"MX25L51235F",	   0xc2201a, 0x0,	64 * 1024,  1024, RD_FULL,		     WR_QPP},
- 	{"MX25L12855E",	   0xc22618, 0x0,	64 * 1024,   256, RD_FULL,		     WR_QPP},
- #endif
- #ifdef CONFIG_SPI_FLASH_SPANSION	/* SPANSION */
--	{"S25FL008A",	   0x010213, 0x0,	64 * 1024,    16,	0,			  0},
--	{"S25FL016A",	   0x010214, 0x0,	64 * 1024,    32,	0,			  0},
--	{"S25FL032A",	   0x010215, 0x0,	64 * 1024,    64,	0,			  0},
--	{"S25FL064A",	   0x010216, 0x0,	64 * 1024,   128,	0,			  0},
-+	{"S25FL008A",	   0x010213, 0x0,	64 * 1024,    16, RD_NORM,			  0},
-+	{"S25FL016A",	   0x010214, 0x0,	64 * 1024,    32, RD_NORM,			  0},
-+	{"S25FL032A",	   0x010215, 0x0,	64 * 1024,    64, RD_NORM,			  0},
-+	{"S25FL064A",	   0x010216, 0x0,	64 * 1024,   128, RD_NORM,			  0},
- 	{"S25FL128P_256K", 0x012018, 0x0300,   256 * 1024,    64, RD_FULL,		     WR_QPP},
- 	{"S25FL128P_64K",  0x012018, 0x0301,    64 * 1024,   256, RD_FULL,		     WR_QPP},
- 	{"S25FL032P",	   0x010215, 0x4d00,    64 * 1024,    64, RD_FULL,		     WR_QPP},
-@@ -64,17 +64,17 @@
- 	{"S25FL512S_512K", 0x010220, 0x4f00,   256 * 1024,   256, RD_FULL,		     WR_QPP},
- #endif
- #ifdef CONFIG_SPI_FLASH_STMICRO		/* STMICRO */
--	{"M25P10",	   0x202011, 0x0,	32 * 1024,     4,	0,			  0},
--	{"M25P20",	   0x202012, 0x0,       64 * 1024,     4,	0,			  0},
--	{"M25P40",	   0x202013, 0x0,       64 * 1024,     8,	0,			  0},
--	{"M25P80",	   0x202014, 0x0,       64 * 1024,    16,	0,			  0},
--	{"M25P16",	   0x202015, 0x0,       64 * 1024,    32,	0,			  0},
--	{"M25PE16",	   0x208015, 0x1000,    64 * 1024,    32,	0,			  0},
-+	{"M25P10",	   0x202011, 0x0,	32 * 1024,     4, RD_NORM,			  0},
-+	{"M25P20",	   0x202012, 0x0,       64 * 1024,     4, RD_NORM,			  0},
-+	{"M25P40",	   0x202013, 0x0,       64 * 1024,     8, RD_NORM,			  0},
-+	{"M25P80",	   0x202014, 0x0,       64 * 1024,    16, RD_NORM,			  0},
-+	{"M25P16",	   0x202015, 0x0,       64 * 1024,    32, RD_NORM,			  0},
-+	{"M25PE16",	   0x208015, 0x1000,    64 * 1024,    32, RD_NORM,			  0},
- 	{"M25PX16",	   0x207115, 0x1000,    64 * 1024,    32, RD_EXTN,			  0},
--	{"M25P32",	   0x202016, 0x0,       64 * 1024,    64,	0,			  0},
--	{"M25P64",	   0x202017, 0x0,       64 * 1024,   128,	0,			  0},
--	{"M25P128",	   0x202018, 0x0,      256 * 1024,    64,	0,			  0},
--	{"M25PX64",	   0x207117, 0x0,       64 * 1024,   128,	0,		    SECT_4K},
-+	{"M25P32",	   0x202016, 0x0,       64 * 1024,    64, RD_NORM,			  0},
-+	{"M25P64",	   0x202017, 0x0,       64 * 1024,   128, RD_NORM,			  0},
-+	{"M25P128",	   0x202018, 0x0,      256 * 1024,    64, RD_NORM,			  0},
-+	{"M25PX64",	   0x207117, 0x0,       64 * 1024,   128, RD_NORM,		    SECT_4K},
- 	{"N25Q32",	   0x20ba16, 0x0,       64 * 1024,    64, RD_FULL,	   WR_QPP | SECT_4K},
- 	{"N25Q32A",	   0x20bb16, 0x0,       64 * 1024,    64, RD_FULL,	   WR_QPP | SECT_4K},
- 	{"N25Q64",	   0x20ba17, 0x0,       64 * 1024,   128, RD_FULL,	   WR_QPP | SECT_4K},
-@@ -89,25 +89,25 @@
- 	{"N25Q1024A",	   0x20bb21, 0x0,       64 * 1024,  2048, RD_FULL, WR_QPP | E_FSR | SECT_4K},
- #endif
- #ifdef CONFIG_SPI_FLASH_SST		/* SST */
--	{"SST25VF040B",	   0xbf258d, 0x0,	64 * 1024,     8,	0,          SECT_4K | SST_WP},
--	{"SST25VF080B",	   0xbf258e, 0x0,	64 * 1024,    16,	0,	    SECT_4K | SST_WP},
--	{"SST25VF016B",	   0xbf2541, 0x0,	64 * 1024,    32,	0,	    SECT_4K | SST_WP},
--	{"SST25VF032B",	   0xbf254a, 0x0,	64 * 1024,    64,	0,	    SECT_4K | SST_WP},
--	{"SST25VF064C",	   0xbf254b, 0x0,	64 * 1024,   128,	0,		     SECT_4K},
--	{"SST25WF512",	   0xbf2501, 0x0,	64 * 1024,     1,	0,	    SECT_4K | SST_WP},
--	{"SST25WF010",	   0xbf2502, 0x0,	64 * 1024,     2,       0,          SECT_4K | SST_WP},
--	{"SST25WF020",	   0xbf2503, 0x0,	64 * 1024,     4,       0,	    SECT_4K | SST_WP},
--	{"SST25WF040",	   0xbf2504, 0x0,	64 * 1024,     8,       0,	    SECT_4K | SST_WP},
--	{"SST25WF080",	   0xbf2505, 0x0,	64 * 1024,    16,       0,	    SECT_4K | SST_WP},
-+	{"SST25VF040B",	   0xbf258d, 0x0,	64 * 1024,     8, RD_NORM,          SECT_4K | SST_WR},
-+	{"SST25VF080B",	   0xbf258e, 0x0,	64 * 1024,    16, RD_NORM,	    SECT_4K | SST_WR},
-+	{"SST25VF016B",	   0xbf2541, 0x0,	64 * 1024,    32, RD_NORM,	    SECT_4K | SST_WR},
-+	{"SST25VF032B",	   0xbf254a, 0x0,	64 * 1024,    64, RD_NORM,	    SECT_4K | SST_WR},
-+	{"SST25VF064C",	   0xbf254b, 0x0,	64 * 1024,   128, RD_NORM,		     SECT_4K},
-+	{"SST25WF512",	   0xbf2501, 0x0,	64 * 1024,     1, RD_NORM,	    SECT_4K | SST_WR},
-+	{"SST25WF010",	   0xbf2502, 0x0,	64 * 1024,     2, RD_NORM,          SECT_4K | SST_WR},
-+	{"SST25WF020",	   0xbf2503, 0x0,	64 * 1024,     4, RD_NORM,	    SECT_4K | SST_WR},
-+	{"SST25WF040",	   0xbf2504, 0x0,	64 * 1024,     8, RD_NORM,	    SECT_4K | SST_WR},
-+	{"SST25WF080",	   0xbf2505, 0x0,	64 * 1024,    16, RD_NORM,	    SECT_4K | SST_WR},
- #endif
- #ifdef CONFIG_SPI_FLASH_WINBOND		/* WINBOND */
--	{"W25P80",	   0xef2014, 0x0,	64 * 1024,    16,	0,		           0},
--	{"W25P16",	   0xef2015, 0x0,	64 * 1024,    32,	0,		           0},
--	{"W25P32",	   0xef2016, 0x0,	64 * 1024,    64,	0,		           0},
--	{"W25X40",	   0xef3013, 0x0,	64 * 1024,     8,	0,		     SECT_4K},
--	{"W25X16",	   0xef3015, 0x0,	64 * 1024,    32,	0,		     SECT_4K},
--	{"W25X32",	   0xef3016, 0x0,	64 * 1024,    64,	0,		     SECT_4K},
--	{"W25X64",	   0xef3017, 0x0,	64 * 1024,   128,	0,		     SECT_4K},
-+	{"W25P80",	   0xef2014, 0x0,	64 * 1024,    16, RD_NORM,		           0},
-+	{"W25P16",	   0xef2015, 0x0,	64 * 1024,    32, RD_NORM,		           0},
-+	{"W25P32",	   0xef2016, 0x0,	64 * 1024,    64, RD_NORM,		           0},
-+	{"W25X40",	   0xef3013, 0x0,	64 * 1024,     8, RD_NORM,		     SECT_4K},
-+	{"W25X16",	   0xef3015, 0x0,	64 * 1024,    32, RD_NORM,		     SECT_4K},
-+	{"W25X32",	   0xef3016, 0x0,	64 * 1024,    64, RD_NORM,		     SECT_4K},
-+	{"W25X64",	   0xef3017, 0x0,	64 * 1024,   128, RD_NORM,		     SECT_4K},
- 	{"W25Q80BL",	   0xef4014, 0x0,	64 * 1024,    16, RD_FULL,	    WR_QPP | SECT_4K},
- 	{"W25Q16CL",	   0xef4015, 0x0,	64 * 1024,    32, RD_FULL,	    WR_QPP | SECT_4K},
- 	{"W25Q32BV",	   0xef4016, 0x0,	64 * 1024,    64, RD_FULL,	    WR_QPP | SECT_4K},
-diff -ruN u-boot-2015.01-rc3/drivers/mtd/spi/sf_probe.c u-boot/drivers/mtd/spi/sf_probe.c
---- u-boot-2015.01-rc3/drivers/mtd/spi/sf_probe.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/mtd/spi/sf_probe.c	2015-01-01 17:34:32.665496498 +0100
-@@ -24,6 +24,7 @@
- /* Read commands array */
- static u8 spi_read_cmds_array[] = {
- 	CMD_READ_ARRAY_SLOW,
-+	CMD_READ_ARRAY_FAST,
- 	CMD_READ_DUAL_OUTPUT_FAST,
- 	CMD_READ_DUAL_IO_FAST,
- 	CMD_READ_QUAD_OUTPUT_FAST,
-@@ -135,8 +136,12 @@
- #ifndef CONFIG_DM_SPI_FLASH
- 	flash->write = spi_flash_cmd_write_ops;
- #if defined(CONFIG_SPI_FLASH_SST)
--	if (params->flags & SST_WP)
--		flash->write = sst_write_wp;
-+	if (params->flags & SST_WR) {
-+		if (flash->spi->op_mode_tx & SPI_OPM_TX_BP)
-+			flash->write = sst_write_bp;
-+		else
-+			flash->write = sst_write_wp;
-+	}
- #endif
- 	flash->erase = spi_flash_cmd_erase_ops;
- 	flash->read = spi_flash_cmd_read_ops;
-diff -ruN u-boot-2015.01-rc3/drivers/net/fm/init.c u-boot/drivers/net/fm/init.c
---- u-boot-2015.01-rc3/drivers/net/fm/init.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/net/fm/init.c	2015-01-01 17:34:32.677496300 +0100
-@@ -247,17 +247,17 @@
- 	}
- 
- #ifdef CONFIG_SYS_FMAN_V3
-+#ifndef CONFIG_FSL_FM_10GEC_REGULAR_NOTATION
- 	/*
--	 * Physically FM1_DTSEC9 and FM1_10GEC1 use the same dual-role MAC, when
--	 * FM1_10GEC1 is enabled and  FM1_DTSEC9 is disabled, ensure that the
--	 * dual-role MAC is not disabled, ditto for other dual-role MACs.
-+	 * On T2/T4 SoCs, physically FM1_DTSEC9 and FM1_10GEC1 use the same
-+	 * dual-role MAC, when FM1_10GEC1 is enabled and  FM1_DTSEC9
-+	 * is disabled, ensure that the dual-role MAC is not disabled,
-+	 * ditto for other dual-role MACs.
- 	 */
- 	if (((info->port == FM1_DTSEC9) && (PORT_IS_ENABLED(FM1_10GEC1)))  ||
- 	    ((info->port == FM1_DTSEC10) && (PORT_IS_ENABLED(FM1_10GEC2))) ||
--	    ((info->port == FM1_DTSEC1) && (PORT_IS_ENABLED(FM1_10GEC1)))  ||
- 	    ((info->port == FM1_DTSEC1) && (PORT_IS_ENABLED(FM1_10GEC3)))  ||
- 	    ((info->port == FM1_DTSEC2) && (PORT_IS_ENABLED(FM1_10GEC4)))  ||
--	    ((info->port == FM1_10GEC1) && (PORT_IS_ENABLED(FM1_DTSEC1)))  ||
- 	    ((info->port == FM1_10GEC1) && (PORT_IS_ENABLED(FM1_DTSEC9)))  ||
- 	    ((info->port == FM1_10GEC2) && (PORT_IS_ENABLED(FM1_DTSEC10))) ||
- 	    ((info->port == FM1_10GEC3) && (PORT_IS_ENABLED(FM1_DTSEC1)))  ||
-@@ -269,6 +269,17 @@
- 	    ((info->port == FM2_10GEC1) && (PORT_IS_ENABLED(FM2_DTSEC9)))	||
- 	    ((info->port == FM2_10GEC2) && (PORT_IS_ENABLED(FM2_DTSEC10)))
- #endif
-+#else
-+	/* FM1_DTSECx and FM1_10GECx use the same dual-role MAC */
-+	if (((info->port == FM1_DTSEC1) && (PORT_IS_ENABLED(FM1_10GEC1)))  ||
-+	    ((info->port == FM1_DTSEC2) && (PORT_IS_ENABLED(FM1_10GEC2)))  ||
-+	    ((info->port == FM1_DTSEC3) && (PORT_IS_ENABLED(FM1_10GEC3)))  ||
-+	    ((info->port == FM1_DTSEC4) && (PORT_IS_ENABLED(FM1_10GEC4)))  ||
-+	    ((info->port == FM1_10GEC1) && (PORT_IS_ENABLED(FM1_DTSEC1)))  ||
-+	    ((info->port == FM1_10GEC2) && (PORT_IS_ENABLED(FM1_DTSEC2)))  ||
-+	    ((info->port == FM1_10GEC3) && (PORT_IS_ENABLED(FM1_DTSEC3)))  ||
-+	    ((info->port == FM1_10GEC4) && (PORT_IS_ENABLED(FM1_DTSEC4)))
-+#endif
- 	)
- 		return;
- #endif
-diff -ruN u-boot-2015.01-rc3/drivers/pci/Makefile u-boot/drivers/pci/Makefile
---- u-boot-2015.01-rc3/drivers/pci/Makefile	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/pci/Makefile	2015-01-01 17:34:32.685496170 +0100
-@@ -17,3 +17,4 @@
- obj-$(CONFIG_SH7780_PCI) +=pci_sh7780.o
- obj-$(CONFIG_TSI108_PCI) += tsi108_pci.o
- obj-$(CONFIG_WINBOND_83C553) += w83c553f.o
-+obj-$(CONFIG_PCIE_LAYERSCAPE) += pcie_layerscape.o
-diff -ruN u-boot-2015.01-rc3/drivers/pci/pcie_layerscape.c u-boot/drivers/pci/pcie_layerscape.c
---- u-boot-2015.01-rc3/drivers/pci/pcie_layerscape.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/drivers/pci/pcie_layerscape.c	2015-01-01 17:34:32.689496104 +0100
-@@ -0,0 +1,51 @@
-+/*
-+ * Copyright 2014 Freescale Semiconductor, Inc.
-+ * Layerscape PCIe driver
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <asm/arch/fsl_serdes.h>
-+#include <pci.h>
-+#include <asm/io.h>
-+#include <asm/pcie_layerscape.h>
-+
-+#ifdef CONFIG_OF_BOARD_SETUP
-+#include <libfdt.h>
-+#include <fdt_support.h>
-+
-+static void ft_pcie_ls_setup(void *blob, const char *pci_compat,
-+			     unsigned long ctrl_addr, enum srds_prtcl dev)
-+{
-+	int off;
-+
-+	off = fdt_node_offset_by_compat_reg(blob, pci_compat,
-+					    (phys_addr_t)ctrl_addr);
-+	if (off < 0)
-+		return;
-+
-+	if (!is_serdes_configured(dev))
-+		fdt_set_node_status(blob, off, FDT_STATUS_DISABLED, 0);
-+}
-+
-+void ft_pcie_setup(void *blob, bd_t *bd)
-+{
-+	#ifdef CONFIG_PCIE1
-+	ft_pcie_ls_setup(blob, FSL_PCIE_COMPAT, CONFIG_SYS_PCIE1_ADDR, PCIE1);
-+	#endif
-+
-+	#ifdef CONFIG_PCIE2
-+	ft_pcie_ls_setup(blob, FSL_PCIE_COMPAT, CONFIG_SYS_PCIE2_ADDR, PCIE2);
-+	#endif
-+}
-+
-+#else
-+void ft_pcie_setup(void *blob, bd_t *bd)
-+{
-+}
-+#endif
-+
-+void pci_init_board(void)
-+{
-+}
-diff -ruN u-boot-2015.01-rc3/drivers/power/tps6586x.c u-boot/drivers/power/tps6586x.c
---- u-boot-2015.01-rc3/drivers/power/tps6586x.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/power/tps6586x.c	2015-01-01 17:34:32.693496038 +0100
-@@ -10,9 +10,7 @@
- #include <asm/io.h>
- #include <i2c.h>
- 
--static int bus_num;		/* I2C bus we are on */
--#define I2C_ADDRESS		0x34	/* chip requires this address */
--static char inited;		/* 1 if we have been inited */
-+static struct udevice *tps6586x_dev;
- 
- enum {
- 	/* Registers that we access */
-@@ -37,13 +35,9 @@
- 	int	i;
- 	uchar	data;
- 	int	retval = -1;
--	int	old_bus_num;
--
--	old_bus_num = i2c_get_bus_num();
--	i2c_set_bus_num(bus_num);
- 
- 	for (i = 0; i < MAX_I2C_RETRY; ++i) {
--		if (!i2c_read(I2C_ADDRESS, reg, 1, &data, 1)) {
-+		if (!i2c_read(tps6586x_dev, reg,  &data, 1)) {
- 			retval = (int)data;
- 			goto exit;
- 		}
-@@ -53,7 +47,6 @@
- 	}
- 
- exit:
--	i2c_set_bus_num(old_bus_num);
- 	debug("pmu_read %x=%x\n", reg, retval);
- 	if (retval < 0)
- 		debug("%s: failed to read register %#x: %d\n", __func__, reg,
-@@ -65,13 +58,9 @@
- {
- 	int	i;
- 	int	retval = -1;
--	int	old_bus_num;
--
--	old_bus_num = i2c_get_bus_num();
--	i2c_set_bus_num(bus_num);
- 
- 	for (i = 0; i < MAX_I2C_RETRY; ++i) {
--		if (!i2c_write(I2C_ADDRESS, reg, 1, data, len)) {
-+		if (!i2c_write(tps6586x_dev, reg, data, len)) {
- 			retval = 0;
- 			goto exit;
- 		}
-@@ -81,7 +70,6 @@
- 	}
- 
- exit:
--	i2c_set_bus_num(old_bus_num);
- 	debug("pmu_write %x=%x: ", reg, retval);
- 	for (i = 0; i < len; i++)
- 		debug("%x ", data[i]);
-@@ -163,7 +151,7 @@
- 	uchar val;
- 	int ret;
- 
--	assert(inited);
-+	assert(tps6586x_dev);
- 	ret = tps6586x_read(PFM_MODE);
- 	if (ret != -1) {
- 		val = (uchar)ret;
-@@ -184,7 +172,7 @@
- 	int sm0, sm1;
- 	int bad;
- 
--	assert(inited);
-+	assert(tps6586x_dev);
- 
- 	/* get current voltage settings */
- 	if (read_voltages(&sm0, &sm1)) {
-@@ -255,10 +243,9 @@
- 	return bad ? -1 : 0;
- }
- 
--int tps6586x_init(int bus)
-+int tps6586x_init(struct udevice *dev)
- {
--	bus_num = bus;
--	inited = 1;
-+	tps6586x_dev = dev;
- 
- 	return 0;
- }
-diff -ruN u-boot-2015.01-rc3/drivers/qe/qe.c u-boot/drivers/qe/qe.c
---- u-boot-2015.01-rc3/drivers/qe/qe.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/qe/qe.c	2015-01-01 17:34:32.693496038 +0100
-@@ -13,6 +13,9 @@
- #include "asm/io.h"
- #include "linux/immap_qe.h"
- #include "qe.h"
-+#ifdef CONFIG_LS102XA
-+#include <asm/arch/immap_ls102xa.h>
-+#endif
- 
- #define MPC85xx_DEVDISR_QE_DISABLE	0x1
- 
-@@ -335,8 +338,12 @@
- 	size_t length;
- 	const struct qe_header *hdr;
- #ifdef CONFIG_DEEP_SLEEP
-+#ifdef CONFIG_LS102XA
-+	struct ccsr_gur __iomem *gur = (void *)CONFIG_SYS_FSL_GUTS_ADDR;
-+#else
- 	ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
- #endif
-+#endif
- 	if (!firmware) {
- 		printf("Invalid address\n");
- 		return -EINVAL;
-@@ -470,8 +477,12 @@
- 	size_t length;
- 	const struct qe_header *hdr;
- #ifdef CONFIG_DEEP_SLEEP
-+#ifdef CONFIG_LS102XA
-+	struct ccsr_gur __iomem *gur = (void *)CONFIG_SYS_FSL_GUTS_ADDR;
-+#else
- 	ccsr_gur_t __iomem *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
- #endif
-+#endif
- 	if (!firmware) {
- 		printf("Invalid address\n");
- 		return -EINVAL;
-diff -ruN u-boot-2015.01-rc3/drivers/serial/Makefile u-boot/drivers/serial/Makefile
---- u-boot-2015.01-rc3/drivers/serial/Makefile	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/serial/Makefile	2015-01-01 17:34:32.697495972 +0100
-@@ -43,7 +43,7 @@
- obj-$(CONFIG_TEGRA_SERIAL) += serial_tegra.o
- obj-$(CONFIG_UNIPHIER_SERIAL) += serial_uniphier.o
- obj-$(CONFIG_OMAP_SERIAL) += serial_omap.o
--obj-$(CONFIG_COREBOOT_SERIAL) += serial_coreboot.o
-+obj-$(CONFIG_X86_SERIAL) += serial_x86.o
- 
- ifndef CONFIG_SPL_BUILD
- obj-$(CONFIG_USB_TTY) += usbtty.o
-diff -ruN u-boot-2015.01-rc3/drivers/serial/serial_coreboot.c u-boot/drivers/serial/serial_coreboot.c
---- u-boot-2015.01-rc3/drivers/serial/serial_coreboot.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/serial/serial_coreboot.c	1970-01-01 01:00:00.000000000 +0100
-@@ -1,38 +0,0 @@
--/*
-- * Copyright (c) 2014 Google, Inc
-- *
-- * SPDX-License-Identifier:	GPL-2.0+
-- */
--
--#include <common.h>
--#include <dm.h>
--#include <ns16550.h>
--#include <serial.h>
--
--static const struct udevice_id coreboot_serial_ids[] = {
--	{ .compatible = "coreboot-uart" },
--	{ }
--};
--
--static int coreboot_serial_ofdata_to_platdata(struct udevice *dev)
--{
--	struct ns16550_platdata *plat = dev_get_platdata(dev);
--	int ret;
--
--	ret = ns16550_serial_ofdata_to_platdata(dev);
--	if (ret)
--		return ret;
--	plat->clock = 1843200;
--
--	return 0;
--}
--U_BOOT_DRIVER(serial_ns16550) = {
--	.name	= "serial_coreboot",
--	.id	= UCLASS_SERIAL,
--	.of_match = coreboot_serial_ids,
--	.ofdata_to_platdata = coreboot_serial_ofdata_to_platdata,
--	.platdata_auto_alloc_size = sizeof(struct ns16550_platdata),
--	.priv_auto_alloc_size = sizeof(struct NS16550),
--	.probe = ns16550_serial_probe,
--	.ops	= &ns16550_serial_ops,
--};
-diff -ruN u-boot-2015.01-rc3/drivers/serial/serial_pl01x.c u-boot/drivers/serial/serial_pl01x.c
---- u-boot-2015.01-rc3/drivers/serial/serial_pl01x.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/serial/serial_pl01x.c	2015-01-01 17:34:32.697495972 +0100
-@@ -348,6 +348,7 @@
- 	.probe = pl01x_serial_probe,
- 	.ops	= &pl01x_serial_ops,
- 	.flags = DM_FLAG_PRE_RELOC,
-+	.priv_auto_alloc_size = sizeof(struct pl01x_priv),
- };
- 
- #endif
-diff -ruN u-boot-2015.01-rc3/drivers/serial/serial_x86.c u-boot/drivers/serial/serial_x86.c
---- u-boot-2015.01-rc3/drivers/serial/serial_x86.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/drivers/serial/serial_x86.c	2015-01-01 17:34:32.697495972 +0100
-@@ -0,0 +1,38 @@
-+/*
-+ * Copyright (c) 2014 Google, Inc
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <dm.h>
-+#include <ns16550.h>
-+#include <serial.h>
-+
-+static const struct udevice_id x86_serial_ids[] = {
-+	{ .compatible = "x86-uart" },
-+	{ }
-+};
-+
-+static int x86_serial_ofdata_to_platdata(struct udevice *dev)
-+{
-+	struct ns16550_platdata *plat = dev_get_platdata(dev);
-+	int ret;
-+
-+	ret = ns16550_serial_ofdata_to_platdata(dev);
-+	if (ret)
-+		return ret;
-+	plat->clock = 1843200;
-+
-+	return 0;
-+}
-+U_BOOT_DRIVER(serial_ns16550) = {
-+	.name	= "serial_x86",
-+	.id	= UCLASS_SERIAL,
-+	.of_match = x86_serial_ids,
-+	.ofdata_to_platdata = x86_serial_ofdata_to_platdata,
-+	.platdata_auto_alloc_size = sizeof(struct ns16550_platdata),
-+	.priv_auto_alloc_size = sizeof(struct NS16550),
-+	.probe = ns16550_serial_probe,
-+	.ops	= &ns16550_serial_ops,
-+};
-diff -ruN u-boot-2015.01-rc3/drivers/spi/cadence_qspi_apb.c u-boot/drivers/spi/cadence_qspi_apb.c
---- u-boot-2015.01-rc3/drivers/spi/cadence_qspi_apb.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/drivers/spi/cadence_qspi_apb.c	2015-01-01 17:34:32.701495908 +0100
-@@ -0,0 +1,898 @@
-+/*
-+ * Copyright (C) 2012 Altera Corporation <www.altera.com>
-+ * All rights reserved.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ *  - Redistributions of source code must retain the above copyright
-+ *    notice, this list of conditions and the following disclaimer.
-+ *  - Redistributions in binary form must reproduce the above copyright
-+ *    notice, this list of conditions and the following disclaimer in the
-+ *    documentation and/or other materials provided with the distribution.
-+ *  - Neither the name of the Altera Corporation nor the
-+ *    names of its contributors may be used to endorse or promote products
-+ *    derived from this software without specific prior written permission.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-+ * ARE DISCLAIMED. IN NO EVENT SHALL ALTERA CORPORATION BE LIABLE FOR ANY
-+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-+ */
-+
-+#include <common.h>
-+#include <asm/io.h>
-+#include <asm/errno.h>
-+#include "cadence_qspi.h"
-+
-+#define CQSPI_REG_POLL_US			(1) /* 1us */
-+#define CQSPI_REG_RETRY				(10000)
-+#define CQSPI_POLL_IDLE_RETRY			(3)
-+
-+#define CQSPI_FIFO_WIDTH			(4)
-+
-+/* Controller sram size in word */
-+#define CQSPI_REG_SRAM_SIZE_WORD		(128)
-+#define CQSPI_REG_SRAM_RESV_WORDS		(2)
-+#define CQSPI_REG_SRAM_PARTITION_WR		(1)
-+#define CQSPI_REG_SRAM_PARTITION_RD		\
-+	(CQSPI_REG_SRAM_SIZE_WORD - CQSPI_REG_SRAM_RESV_WORDS)
-+#define CQSPI_REG_SRAM_THRESHOLD_WORDS		(50)
-+
-+/* Transfer mode */
-+#define CQSPI_INST_TYPE_SINGLE			(0)
-+#define CQSPI_INST_TYPE_DUAL			(1)
-+#define CQSPI_INST_TYPE_QUAD			(2)
-+
-+#define CQSPI_STIG_DATA_LEN_MAX			(8)
-+#define CQSPI_INDIRECTTRIGGER_ADDR_MASK		(0xFFFFF)
-+
-+#define CQSPI_DUMMY_CLKS_PER_BYTE		(8)
-+#define CQSPI_DUMMY_BYTES_MAX			(4)
-+
-+
-+#define CQSPI_REG_SRAM_FILL_THRESHOLD	\
-+	((CQSPI_REG_SRAM_SIZE_WORD / 2) * CQSPI_FIFO_WIDTH)
-+/****************************************************************************
-+ * Controller's configuration and status register (offset from QSPI_BASE)
-+ ****************************************************************************/
-+#define	CQSPI_REG_CONFIG			0x00
-+#define	CQSPI_REG_CONFIG_CLK_POL_LSB		1
-+#define	CQSPI_REG_CONFIG_CLK_PHA_LSB		2
-+#define	CQSPI_REG_CONFIG_ENABLE_MASK		(1 << 0)
-+#define	CQSPI_REG_CONFIG_DIRECT_MASK		(1 << 7)
-+#define	CQSPI_REG_CONFIG_DECODE_MASK		(1 << 9)
-+#define	CQSPI_REG_CONFIG_XIP_IMM_MASK		(1 << 18)
-+#define	CQSPI_REG_CONFIG_CHIPSELECT_LSB		10
-+#define	CQSPI_REG_CONFIG_BAUD_LSB		19
-+#define	CQSPI_REG_CONFIG_IDLE_LSB		31
-+#define	CQSPI_REG_CONFIG_CHIPSELECT_MASK	0xF
-+#define	CQSPI_REG_CONFIG_BAUD_MASK		0xF
-+
-+#define	CQSPI_REG_RD_INSTR			0x04
-+#define	CQSPI_REG_RD_INSTR_OPCODE_LSB		0
-+#define	CQSPI_REG_RD_INSTR_TYPE_INSTR_LSB	8
-+#define	CQSPI_REG_RD_INSTR_TYPE_ADDR_LSB	12
-+#define	CQSPI_REG_RD_INSTR_TYPE_DATA_LSB	16
-+#define	CQSPI_REG_RD_INSTR_MODE_EN_LSB		20
-+#define	CQSPI_REG_RD_INSTR_DUMMY_LSB		24
-+#define	CQSPI_REG_RD_INSTR_TYPE_INSTR_MASK	0x3
-+#define	CQSPI_REG_RD_INSTR_TYPE_ADDR_MASK	0x3
-+#define	CQSPI_REG_RD_INSTR_TYPE_DATA_MASK	0x3
-+#define	CQSPI_REG_RD_INSTR_DUMMY_MASK		0x1F
-+
-+#define	CQSPI_REG_WR_INSTR			0x08
-+#define	CQSPI_REG_WR_INSTR_OPCODE_LSB		0
-+
-+#define	CQSPI_REG_DELAY				0x0C
-+#define	CQSPI_REG_DELAY_TSLCH_LSB		0
-+#define	CQSPI_REG_DELAY_TCHSH_LSB		8
-+#define	CQSPI_REG_DELAY_TSD2D_LSB		16
-+#define	CQSPI_REG_DELAY_TSHSL_LSB		24
-+#define	CQSPI_REG_DELAY_TSLCH_MASK		0xFF
-+#define	CQSPI_REG_DELAY_TCHSH_MASK		0xFF
-+#define	CQSPI_REG_DELAY_TSD2D_MASK		0xFF
-+#define	CQSPI_REG_DELAY_TSHSL_MASK		0xFF
-+
-+#define	CQSPI_READLCAPTURE			0x10
-+#define	CQSPI_READLCAPTURE_BYPASS_LSB		0
-+#define	CQSPI_READLCAPTURE_DELAY_LSB		1
-+#define	CQSPI_READLCAPTURE_DELAY_MASK		0xF
-+
-+#define	CQSPI_REG_SIZE				0x14
-+#define	CQSPI_REG_SIZE_ADDRESS_LSB		0
-+#define	CQSPI_REG_SIZE_PAGE_LSB			4
-+#define	CQSPI_REG_SIZE_BLOCK_LSB		16
-+#define	CQSPI_REG_SIZE_ADDRESS_MASK		0xF
-+#define	CQSPI_REG_SIZE_PAGE_MASK		0xFFF
-+#define	CQSPI_REG_SIZE_BLOCK_MASK		0x3F
-+
-+#define	CQSPI_REG_SRAMPARTITION			0x18
-+#define	CQSPI_REG_INDIRECTTRIGGER		0x1C
-+
-+#define	CQSPI_REG_REMAP				0x24
-+#define	CQSPI_REG_MODE_BIT			0x28
-+
-+#define	CQSPI_REG_SDRAMLEVEL			0x2C
-+#define	CQSPI_REG_SDRAMLEVEL_RD_LSB		0
-+#define	CQSPI_REG_SDRAMLEVEL_WR_LSB		16
-+#define	CQSPI_REG_SDRAMLEVEL_RD_MASK		0xFFFF
-+#define	CQSPI_REG_SDRAMLEVEL_WR_MASK		0xFFFF
-+
-+#define	CQSPI_REG_IRQSTATUS			0x40
-+#define	CQSPI_REG_IRQMASK			0x44
-+
-+#define	CQSPI_REG_INDIRECTRD			0x60
-+#define	CQSPI_REG_INDIRECTRD_START_MASK		(1 << 0)
-+#define	CQSPI_REG_INDIRECTRD_CANCEL_MASK	(1 << 1)
-+#define	CQSPI_REG_INDIRECTRD_INPROGRESS_MASK	(1 << 2)
-+#define	CQSPI_REG_INDIRECTRD_DONE_MASK		(1 << 5)
-+
-+#define	CQSPI_REG_INDIRECTRDWATERMARK		0x64
-+#define	CQSPI_REG_INDIRECTRDSTARTADDR		0x68
-+#define	CQSPI_REG_INDIRECTRDBYTES		0x6C
-+
-+#define	CQSPI_REG_CMDCTRL			0x90
-+#define	CQSPI_REG_CMDCTRL_EXECUTE_MASK		(1 << 0)
-+#define	CQSPI_REG_CMDCTRL_INPROGRESS_MASK	(1 << 1)
-+#define	CQSPI_REG_CMDCTRL_DUMMY_LSB		7
-+#define	CQSPI_REG_CMDCTRL_WR_BYTES_LSB		12
-+#define	CQSPI_REG_CMDCTRL_WR_EN_LSB		15
-+#define	CQSPI_REG_CMDCTRL_ADD_BYTES_LSB		16
-+#define	CQSPI_REG_CMDCTRL_ADDR_EN_LSB		19
-+#define	CQSPI_REG_CMDCTRL_RD_BYTES_LSB		20
-+#define	CQSPI_REG_CMDCTRL_RD_EN_LSB		23
-+#define	CQSPI_REG_CMDCTRL_OPCODE_LSB		24
-+#define	CQSPI_REG_CMDCTRL_DUMMY_MASK		0x1F
-+#define	CQSPI_REG_CMDCTRL_WR_BYTES_MASK		0x7
-+#define	CQSPI_REG_CMDCTRL_ADD_BYTES_MASK	0x3
-+#define	CQSPI_REG_CMDCTRL_RD_BYTES_MASK		0x7
-+#define	CQSPI_REG_CMDCTRL_OPCODE_MASK		0xFF
-+
-+#define	CQSPI_REG_INDIRECTWR			0x70
-+#define	CQSPI_REG_INDIRECTWR_START_MASK		(1 << 0)
-+#define	CQSPI_REG_INDIRECTWR_CANCEL_MASK	(1 << 1)
-+#define	CQSPI_REG_INDIRECTWR_INPROGRESS_MASK	(1 << 2)
-+#define	CQSPI_REG_INDIRECTWR_DONE_MASK		(1 << 5)
-+
-+#define	CQSPI_REG_INDIRECTWRWATERMARK		0x74
-+#define	CQSPI_REG_INDIRECTWRSTARTADDR		0x78
-+#define	CQSPI_REG_INDIRECTWRBYTES		0x7C
-+
-+#define	CQSPI_REG_CMDADDRESS			0x94
-+#define	CQSPI_REG_CMDREADDATALOWER		0xA0
-+#define	CQSPI_REG_CMDREADDATAUPPER		0xA4
-+#define	CQSPI_REG_CMDWRITEDATALOWER		0xA8
-+#define	CQSPI_REG_CMDWRITEDATAUPPER		0xAC
-+
-+#define CQSPI_REG_IS_IDLE(base)					\
-+	((readl(base + CQSPI_REG_CONFIG) >>		\
-+		CQSPI_REG_CONFIG_IDLE_LSB) & 0x1)
-+
-+#define CQSPI_CAL_DELAY(tdelay_ns, tref_ns, tsclk_ns)		\
-+	((((tdelay_ns) - (tsclk_ns)) / (tref_ns)))
-+
-+#define CQSPI_GET_RD_SRAM_LEVEL(reg_base)			\
-+	(((readl(reg_base + CQSPI_REG_SDRAMLEVEL)) >>	\
-+	CQSPI_REG_SDRAMLEVEL_RD_LSB) & CQSPI_REG_SDRAMLEVEL_RD_MASK)
-+
-+#define CQSPI_GET_WR_SRAM_LEVEL(reg_base)			\
-+	(((readl(reg_base + CQSPI_REG_SDRAMLEVEL)) >>	\
-+	CQSPI_REG_SDRAMLEVEL_WR_LSB) & CQSPI_REG_SDRAMLEVEL_WR_MASK)
-+
-+static unsigned int cadence_qspi_apb_cmd2addr(const unsigned char *addr_buf,
-+	unsigned int addr_width)
-+{
-+	unsigned int addr;
-+
-+	addr = (addr_buf[0] << 16) | (addr_buf[1] << 8) | addr_buf[2];
-+
-+	if (addr_width == 4)
-+		addr = (addr << 8) | addr_buf[3];
-+
-+	return addr;
-+}
-+
-+static void cadence_qspi_apb_read_fifo_data(void *dest,
-+	const void *src_ahb_addr, unsigned int bytes)
-+{
-+	unsigned int temp;
-+	int remaining = bytes;
-+	unsigned int *dest_ptr = (unsigned int *)dest;
-+	unsigned int *src_ptr = (unsigned int *)src_ahb_addr;
-+
-+	while (remaining > 0) {
-+		if (remaining >= CQSPI_FIFO_WIDTH) {
-+			*dest_ptr = readl(src_ptr);
-+			remaining -= CQSPI_FIFO_WIDTH;
-+		} else {
-+			/* dangling bytes */
-+			temp = readl(src_ptr);
-+			memcpy(dest_ptr, &temp, remaining);
-+			break;
-+		}
-+		dest_ptr++;
-+	}
-+
-+	return;
-+}
-+
-+static void cadence_qspi_apb_write_fifo_data(const void *dest_ahb_addr,
-+	const void *src, unsigned int bytes)
-+{
-+	unsigned int temp;
-+	int remaining = bytes;
-+	unsigned int *dest_ptr = (unsigned int *)dest_ahb_addr;
-+	unsigned int *src_ptr = (unsigned int *)src;
-+
-+	while (remaining > 0) {
-+		if (remaining >= CQSPI_FIFO_WIDTH) {
-+			writel(*src_ptr, dest_ptr);
-+			remaining -= sizeof(unsigned int);
-+		} else {
-+			/* dangling bytes */
-+			memcpy(&temp, src_ptr, remaining);
-+			writel(temp, dest_ptr);
-+			break;
-+		}
-+		src_ptr++;
-+	}
-+
-+	return;
-+}
-+
-+/* Read from SRAM FIFO with polling SRAM fill level. */
-+static int qspi_read_sram_fifo_poll(const void *reg_base, void *dest_addr,
-+			const void *src_addr,  unsigned int num_bytes)
-+{
-+	unsigned int remaining = num_bytes;
-+	unsigned int retry;
-+	unsigned int sram_level = 0;
-+	unsigned char *dest = (unsigned char *)dest_addr;
-+
-+	while (remaining > 0) {
-+		retry = CQSPI_REG_RETRY;
-+		while (retry--) {
-+			sram_level = CQSPI_GET_RD_SRAM_LEVEL(reg_base);
-+			if (sram_level)
-+				break;
-+			udelay(1);
-+		}
-+
-+		if (!retry) {
-+			printf("QSPI: No receive data after polling for %d times\n",
-+			       CQSPI_REG_RETRY);
-+			return -1;
-+		}
-+
-+		sram_level *= CQSPI_FIFO_WIDTH;
-+		sram_level = sram_level > remaining ? remaining : sram_level;
-+
-+		/* Read data from FIFO. */
-+		cadence_qspi_apb_read_fifo_data(dest, src_addr, sram_level);
-+		dest += sram_level;
-+		remaining -= sram_level;
-+		udelay(1);
-+	}
-+	return 0;
-+}
-+
-+/* Write to SRAM FIFO with polling SRAM fill level. */
-+static int qpsi_write_sram_fifo_push(struct cadence_spi_platdata *plat,
-+				const void *src_addr, unsigned int num_bytes)
-+{
-+	const void *reg_base = plat->regbase;
-+	void *dest_addr = plat->ahbbase;
-+	unsigned int retry = CQSPI_REG_RETRY;
-+	unsigned int sram_level;
-+	unsigned int wr_bytes;
-+	unsigned char *src = (unsigned char *)src_addr;
-+	int remaining = num_bytes;
-+	unsigned int page_size = plat->page_size;
-+	unsigned int sram_threshold_words = CQSPI_REG_SRAM_THRESHOLD_WORDS;
-+
-+	while (remaining > 0) {
-+		retry = CQSPI_REG_RETRY;
-+		while (retry--) {
-+			sram_level = CQSPI_GET_WR_SRAM_LEVEL(reg_base);
-+			if (sram_level <= sram_threshold_words)
-+				break;
-+		}
-+		if (!retry) {
-+			printf("QSPI: SRAM fill level (0x%08x) not hit lower expected level (0x%08x)",
-+			       sram_level, sram_threshold_words);
-+			return -1;
-+		}
-+		/* Write a page or remaining bytes. */
-+		wr_bytes = (remaining > page_size) ?
-+					page_size : remaining;
-+
-+		cadence_qspi_apb_write_fifo_data(dest_addr, src, wr_bytes);
-+		src += wr_bytes;
-+		remaining -= wr_bytes;
-+	}
-+
-+	return 0;
-+}
-+
-+void cadence_qspi_apb_controller_enable(void *reg_base)
-+{
-+	unsigned int reg;
-+	reg = readl(reg_base + CQSPI_REG_CONFIG);
-+	reg |= CQSPI_REG_CONFIG_ENABLE_MASK;
-+	writel(reg, reg_base + CQSPI_REG_CONFIG);
-+	return;
-+}
-+
-+void cadence_qspi_apb_controller_disable(void *reg_base)
-+{
-+	unsigned int reg;
-+	reg = readl(reg_base + CQSPI_REG_CONFIG);
-+	reg &= ~CQSPI_REG_CONFIG_ENABLE_MASK;
-+	writel(reg, reg_base + CQSPI_REG_CONFIG);
-+	return;
-+}
-+
-+/* Return 1 if idle, otherwise return 0 (busy). */
-+static unsigned int cadence_qspi_wait_idle(void *reg_base)
-+{
-+	unsigned int start, count = 0;
-+	/* timeout in unit of ms */
-+	unsigned int timeout = 5000;
-+
-+	start = get_timer(0);
-+	for ( ; get_timer(start) < timeout ; ) {
-+		if (CQSPI_REG_IS_IDLE(reg_base))
-+			count++;
-+		else
-+			count = 0;
-+		/*
-+		 * Ensure the QSPI controller is in true idle state after
-+		 * reading back the same idle status consecutively
-+		 */
-+		if (count >= CQSPI_POLL_IDLE_RETRY)
-+			return 1;
-+	}
-+
-+	/* Timeout, still in busy mode. */
-+	printf("QSPI: QSPI is still busy after poll for %d times.\n",
-+	       CQSPI_REG_RETRY);
-+	return 0;
-+}
-+
-+void cadence_qspi_apb_readdata_capture(void *reg_base,
-+				unsigned int bypass, unsigned int delay)
-+{
-+	unsigned int reg;
-+	cadence_qspi_apb_controller_disable(reg_base);
-+
-+	reg = readl(reg_base + CQSPI_READLCAPTURE);
-+
-+	if (bypass)
-+		reg |= (1 << CQSPI_READLCAPTURE_BYPASS_LSB);
-+	else
-+		reg &= ~(1 << CQSPI_READLCAPTURE_BYPASS_LSB);
-+
-+	reg &= ~(CQSPI_READLCAPTURE_DELAY_MASK
-+		<< CQSPI_READLCAPTURE_DELAY_LSB);
-+
-+	reg |= ((delay & CQSPI_READLCAPTURE_DELAY_MASK)
-+		<< CQSPI_READLCAPTURE_DELAY_LSB);
-+
-+	writel(reg, reg_base + CQSPI_READLCAPTURE);
-+
-+	cadence_qspi_apb_controller_enable(reg_base);
-+	return;
-+}
-+
-+void cadence_qspi_apb_config_baudrate_div(void *reg_base,
-+	unsigned int ref_clk_hz, unsigned int sclk_hz)
-+{
-+	unsigned int reg;
-+	unsigned int div;
-+
-+	cadence_qspi_apb_controller_disable(reg_base);
-+	reg = readl(reg_base + CQSPI_REG_CONFIG);
-+	reg &= ~(CQSPI_REG_CONFIG_BAUD_MASK << CQSPI_REG_CONFIG_BAUD_LSB);
-+
-+	div = ref_clk_hz / sclk_hz;
-+
-+	if (div > 32)
-+		div = 32;
-+
-+	/* Check if even number. */
-+	if ((div & 1)) {
-+		div = (div / 2);
-+	} else {
-+		if (ref_clk_hz % sclk_hz)
-+			/* ensure generated SCLK doesn't exceed user
-+			specified sclk_hz */
-+			div = (div / 2);
-+		else
-+			div = (div / 2) - 1;
-+	}
-+
-+	debug("%s: ref_clk %dHz sclk %dHz Div 0x%x\n", __func__,
-+	      ref_clk_hz, sclk_hz, div);
-+
-+	div = (div & CQSPI_REG_CONFIG_BAUD_MASK) << CQSPI_REG_CONFIG_BAUD_LSB;
-+	reg |= div;
-+	writel(reg, reg_base + CQSPI_REG_CONFIG);
-+
-+	cadence_qspi_apb_controller_enable(reg_base);
-+	return;
-+}
-+
-+void cadence_qspi_apb_set_clk_mode(void *reg_base,
-+	unsigned int clk_pol, unsigned int clk_pha)
-+{
-+	unsigned int reg;
-+
-+	cadence_qspi_apb_controller_disable(reg_base);
-+	reg = readl(reg_base + CQSPI_REG_CONFIG);
-+	reg &= ~(1 <<
-+		(CQSPI_REG_CONFIG_CLK_POL_LSB | CQSPI_REG_CONFIG_CLK_PHA_LSB));
-+
-+	reg |= ((clk_pol & 0x1) << CQSPI_REG_CONFIG_CLK_POL_LSB);
-+	reg |= ((clk_pha & 0x1) << CQSPI_REG_CONFIG_CLK_PHA_LSB);
-+
-+	writel(reg, reg_base + CQSPI_REG_CONFIG);
-+
-+	cadence_qspi_apb_controller_enable(reg_base);
-+	return;
-+}
-+
-+void cadence_qspi_apb_chipselect(void *reg_base,
-+	unsigned int chip_select, unsigned int decoder_enable)
-+{
-+	unsigned int reg;
-+
-+	cadence_qspi_apb_controller_disable(reg_base);
-+
-+	debug("%s : chipselect %d decode %d\n", __func__, chip_select,
-+	      decoder_enable);
-+
-+	reg = readl(reg_base + CQSPI_REG_CONFIG);
-+	/* docoder */
-+	if (decoder_enable) {
-+		reg |= CQSPI_REG_CONFIG_DECODE_MASK;
-+	} else {
-+		reg &= ~CQSPI_REG_CONFIG_DECODE_MASK;
-+		/* Convert CS if without decoder.
-+		 * CS0 to 4b'1110
-+		 * CS1 to 4b'1101
-+		 * CS2 to 4b'1011
-+		 * CS3 to 4b'0111
-+		 */
-+		chip_select = 0xF & ~(1 << chip_select);
-+	}
-+
-+	reg &= ~(CQSPI_REG_CONFIG_CHIPSELECT_MASK
-+			<< CQSPI_REG_CONFIG_CHIPSELECT_LSB);
-+	reg |= (chip_select & CQSPI_REG_CONFIG_CHIPSELECT_MASK)
-+			<< CQSPI_REG_CONFIG_CHIPSELECT_LSB;
-+	writel(reg, reg_base + CQSPI_REG_CONFIG);
-+
-+	cadence_qspi_apb_controller_enable(reg_base);
-+	return;
-+}
-+
-+void cadence_qspi_apb_delay(void *reg_base,
-+	unsigned int ref_clk, unsigned int sclk_hz,
-+	unsigned int tshsl_ns, unsigned int tsd2d_ns,
-+	unsigned int tchsh_ns, unsigned int tslch_ns)
-+{
-+	unsigned int ref_clk_ns;
-+	unsigned int sclk_ns;
-+	unsigned int tshsl, tchsh, tslch, tsd2d;
-+	unsigned int reg;
-+
-+	cadence_qspi_apb_controller_disable(reg_base);
-+
-+	/* Convert to ns. */
-+	ref_clk_ns = (1000000000) / ref_clk;
-+
-+	/* Convert to ns. */
-+	sclk_ns = (1000000000) / sclk_hz;
-+
-+	/* Plus 1 to round up 1 clock cycle. */
-+	tshsl = CQSPI_CAL_DELAY(tshsl_ns, ref_clk_ns, sclk_ns) + 1;
-+	tchsh = CQSPI_CAL_DELAY(tchsh_ns, ref_clk_ns, sclk_ns) + 1;
-+	tslch = CQSPI_CAL_DELAY(tslch_ns, ref_clk_ns, sclk_ns) + 1;
-+	tsd2d = CQSPI_CAL_DELAY(tsd2d_ns, ref_clk_ns, sclk_ns) + 1;
-+
-+	reg = ((tshsl & CQSPI_REG_DELAY_TSHSL_MASK)
-+			<< CQSPI_REG_DELAY_TSHSL_LSB);
-+	reg |= ((tchsh & CQSPI_REG_DELAY_TCHSH_MASK)
-+			<< CQSPI_REG_DELAY_TCHSH_LSB);
-+	reg |= ((tslch & CQSPI_REG_DELAY_TSLCH_MASK)
-+			<< CQSPI_REG_DELAY_TSLCH_LSB);
-+	reg |= ((tsd2d & CQSPI_REG_DELAY_TSD2D_MASK)
-+			<< CQSPI_REG_DELAY_TSD2D_LSB);
-+	writel(reg, reg_base + CQSPI_REG_DELAY);
-+
-+	cadence_qspi_apb_controller_enable(reg_base);
-+	return;
-+}
-+
-+void cadence_qspi_apb_controller_init(struct cadence_spi_platdata *plat)
-+{
-+	unsigned reg;
-+
-+	cadence_qspi_apb_controller_disable(plat->regbase);
-+
-+	/* Configure the device size and address bytes */
-+	reg = readl(plat->regbase + CQSPI_REG_SIZE);
-+	/* Clear the previous value */
-+	reg &= ~(CQSPI_REG_SIZE_PAGE_MASK << CQSPI_REG_SIZE_PAGE_LSB);
-+	reg &= ~(CQSPI_REG_SIZE_BLOCK_MASK << CQSPI_REG_SIZE_BLOCK_LSB);
-+	reg |= (plat->page_size << CQSPI_REG_SIZE_PAGE_LSB);
-+	reg |= (plat->block_size << CQSPI_REG_SIZE_BLOCK_LSB);
-+	writel(reg, plat->regbase + CQSPI_REG_SIZE);
-+
-+	/* Configure the remap address register, no remap */
-+	writel(0, plat->regbase + CQSPI_REG_REMAP);
-+
-+	/* Disable all interrupts */
-+	writel(0, plat->regbase + CQSPI_REG_IRQMASK);
-+
-+	cadence_qspi_apb_controller_enable(plat->regbase);
-+	return;
-+}
-+
-+static int cadence_qspi_apb_exec_flash_cmd(void *reg_base,
-+	unsigned int reg)
-+{
-+	unsigned int retry = CQSPI_REG_RETRY;
-+
-+	/* Write the CMDCTRL without start execution. */
-+	writel(reg, reg_base + CQSPI_REG_CMDCTRL);
-+	/* Start execute */
-+	reg |= CQSPI_REG_CMDCTRL_EXECUTE_MASK;
-+	writel(reg, reg_base + CQSPI_REG_CMDCTRL);
-+
-+	while (retry--) {
-+		reg = readl(reg_base + CQSPI_REG_CMDCTRL);
-+		if ((reg & CQSPI_REG_CMDCTRL_INPROGRESS_MASK) == 0)
-+			break;
-+		udelay(1);
-+	}
-+
-+	if (!retry) {
-+		printf("QSPI: flash command execution timeout\n");
-+		return -EIO;
-+	}
-+
-+	/* Polling QSPI idle status. */
-+	if (!cadence_qspi_wait_idle(reg_base))
-+		return -EIO;
-+
-+	return 0;
-+}
-+
-+/* For command RDID, RDSR. */
-+int cadence_qspi_apb_command_read(void *reg_base,
-+	unsigned int cmdlen, const u8 *cmdbuf, unsigned int rxlen,
-+	u8 *rxbuf)
-+{
-+	unsigned int reg;
-+	unsigned int read_len;
-+	int status;
-+
-+	if (!cmdlen || rxlen > CQSPI_STIG_DATA_LEN_MAX || rxbuf == NULL) {
-+		printf("QSPI: Invalid input arguments cmdlen %d rxlen %d\n",
-+		       cmdlen, rxlen);
-+		return -EINVAL;
-+	}
-+
-+	reg = cmdbuf[0] << CQSPI_REG_CMDCTRL_OPCODE_LSB;
-+
-+	reg |= (0x1 << CQSPI_REG_CMDCTRL_RD_EN_LSB);
-+
-+	/* 0 means 1 byte. */
-+	reg |= (((rxlen - 1) & CQSPI_REG_CMDCTRL_RD_BYTES_MASK)
-+		<< CQSPI_REG_CMDCTRL_RD_BYTES_LSB);
-+	status = cadence_qspi_apb_exec_flash_cmd(reg_base, reg);
-+	if (status != 0)
-+		return status;
-+
-+	reg = readl(reg_base + CQSPI_REG_CMDREADDATALOWER);
-+
-+	/* Put the read value into rx_buf */
-+	read_len = (rxlen > 4) ? 4 : rxlen;
-+	memcpy(rxbuf, &reg, read_len);
-+	rxbuf += read_len;
-+
-+	if (rxlen > 4) {
-+		reg = readl(reg_base + CQSPI_REG_CMDREADDATAUPPER);
-+
-+		read_len = rxlen - read_len;
-+		memcpy(rxbuf, &reg, read_len);
-+	}
-+	return 0;
-+}
-+
-+/* For commands: WRSR, WREN, WRDI, CHIP_ERASE, BE, etc. */
-+int cadence_qspi_apb_command_write(void *reg_base, unsigned int cmdlen,
-+	const u8 *cmdbuf, unsigned int txlen,  const u8 *txbuf)
-+{
-+	unsigned int reg = 0;
-+	unsigned int addr_value;
-+	unsigned int wr_data;
-+	unsigned int wr_len;
-+
-+	if (!cmdlen || cmdlen > 5 || txlen > 8 || cmdbuf == NULL) {
-+		printf("QSPI: Invalid input arguments cmdlen %d txlen %d\n",
-+		       cmdlen, txlen);
-+		return -EINVAL;
-+	}
-+
-+	reg |= cmdbuf[0] << CQSPI_REG_CMDCTRL_OPCODE_LSB;
-+
-+	if (cmdlen == 4 || cmdlen == 5) {
-+		/* Command with address */
-+		reg |= (0x1 << CQSPI_REG_CMDCTRL_ADDR_EN_LSB);
-+		/* Number of bytes to write. */
-+		reg |= ((cmdlen - 2) & CQSPI_REG_CMDCTRL_ADD_BYTES_MASK)
-+			<< CQSPI_REG_CMDCTRL_ADD_BYTES_LSB;
-+		/* Get address */
-+		addr_value = cadence_qspi_apb_cmd2addr(&cmdbuf[1],
-+			cmdlen >= 5 ? 4 : 3);
-+
-+		writel(addr_value, reg_base + CQSPI_REG_CMDADDRESS);
-+	}
-+
-+	if (txlen) {
-+		/* writing data = yes */
-+		reg |= (0x1 << CQSPI_REG_CMDCTRL_WR_EN_LSB);
-+		reg |= ((txlen - 1) & CQSPI_REG_CMDCTRL_WR_BYTES_MASK)
-+			<< CQSPI_REG_CMDCTRL_WR_BYTES_LSB;
-+
-+		wr_len = txlen > 4 ? 4 : txlen;
-+		memcpy(&wr_data, txbuf, wr_len);
-+		writel(wr_data, reg_base +
-+			CQSPI_REG_CMDWRITEDATALOWER);
-+
-+		if (txlen > 4) {
-+			txbuf += wr_len;
-+			wr_len = txlen - wr_len;
-+			memcpy(&wr_data, txbuf, wr_len);
-+			writel(wr_data, reg_base +
-+				CQSPI_REG_CMDWRITEDATAUPPER);
-+		}
-+	}
-+
-+	/* Execute the command */
-+	return cadence_qspi_apb_exec_flash_cmd(reg_base, reg);
-+}
-+
-+/* Opcode + Address (3/4 bytes) + dummy bytes (0-4 bytes) */
-+int cadence_qspi_apb_indirect_read_setup(struct cadence_spi_platdata *plat,
-+	unsigned int cmdlen, const u8 *cmdbuf)
-+{
-+	unsigned int reg;
-+	unsigned int rd_reg;
-+	unsigned int addr_value;
-+	unsigned int dummy_clk;
-+	unsigned int dummy_bytes;
-+	unsigned int addr_bytes;
-+
-+	/*
-+	 * Identify addr_byte. All NOR flash device drivers are using fast read
-+	 * which always expecting 1 dummy byte, 1 cmd byte and 3/4 addr byte.
-+	 * With that, the length is in value of 5 or 6. Only FRAM chip from
-+	 * ramtron using normal read (which won't need dummy byte).
-+	 * Unlikely NOR flash using normal read due to performance issue.
-+	 */
-+	if (cmdlen >= 5)
-+		/* to cater fast read where cmd + addr + dummy */
-+		addr_bytes = cmdlen - 2;
-+	else
-+		/* for normal read (only ramtron as of now) */
-+		addr_bytes = cmdlen - 1;
-+
-+	/* Setup the indirect trigger address */
-+	writel(((u32)plat->ahbbase & CQSPI_INDIRECTTRIGGER_ADDR_MASK),
-+	       plat->regbase + CQSPI_REG_INDIRECTTRIGGER);
-+
-+	/* Configure SRAM partition for read. */
-+	writel(CQSPI_REG_SRAM_PARTITION_RD, plat->regbase +
-+	       CQSPI_REG_SRAMPARTITION);
-+
-+	/* Configure the opcode */
-+	rd_reg = cmdbuf[0] << CQSPI_REG_RD_INSTR_OPCODE_LSB;
-+
-+#if (CONFIG_SPI_FLASH_QUAD == 1)
-+	/* Instruction and address at DQ0, data at DQ0-3. */
-+	rd_reg |= CQSPI_INST_TYPE_QUAD << CQSPI_REG_RD_INSTR_TYPE_DATA_LSB;
-+#endif
-+
-+	/* Get address */
-+	addr_value = cadence_qspi_apb_cmd2addr(&cmdbuf[1], addr_bytes);
-+	writel(addr_value, plat->regbase + CQSPI_REG_INDIRECTRDSTARTADDR);
-+
-+	/* The remaining lenght is dummy bytes. */
-+	dummy_bytes = cmdlen - addr_bytes - 1;
-+	if (dummy_bytes) {
-+		if (dummy_bytes > CQSPI_DUMMY_BYTES_MAX)
-+			dummy_bytes = CQSPI_DUMMY_BYTES_MAX;
-+
-+		rd_reg |= (1 << CQSPI_REG_RD_INSTR_MODE_EN_LSB);
-+#if defined(CONFIG_SPL_SPI_XIP) && defined(CONFIG_SPL_BUILD)
-+		writel(0x0, plat->regbase + CQSPI_REG_MODE_BIT);
-+#else
-+		writel(0xFF, plat->regbase + CQSPI_REG_MODE_BIT);
-+#endif
-+
-+		/* Convert to clock cycles. */
-+		dummy_clk = dummy_bytes * CQSPI_DUMMY_CLKS_PER_BYTE;
-+		/* Need to minus the mode byte (8 clocks). */
-+		dummy_clk -= CQSPI_DUMMY_CLKS_PER_BYTE;
-+
-+		if (dummy_clk)
-+			rd_reg |= (dummy_clk & CQSPI_REG_RD_INSTR_DUMMY_MASK)
-+				<< CQSPI_REG_RD_INSTR_DUMMY_LSB;
-+	}
-+
-+	writel(rd_reg, plat->regbase + CQSPI_REG_RD_INSTR);
-+
-+	/* set device size */
-+	reg = readl(plat->regbase + CQSPI_REG_SIZE);
-+	reg &= ~CQSPI_REG_SIZE_ADDRESS_MASK;
-+	reg |= (addr_bytes - 1);
-+	writel(reg, plat->regbase + CQSPI_REG_SIZE);
-+	return 0;
-+}
-+
-+int cadence_qspi_apb_indirect_read_execute(struct cadence_spi_platdata *plat,
-+	unsigned int rxlen, u8 *rxbuf)
-+{
-+	unsigned int reg;
-+
-+	writel(rxlen, plat->regbase + CQSPI_REG_INDIRECTRDBYTES);
-+
-+	/* Start the indirect read transfer */
-+	writel(CQSPI_REG_INDIRECTRD_START_MASK,
-+	       plat->regbase + CQSPI_REG_INDIRECTRD);
-+
-+	if (qspi_read_sram_fifo_poll(plat->regbase, (void *)rxbuf,
-+				     (const void *)plat->ahbbase, rxlen))
-+		goto failrd;
-+
-+	/* Check flash indirect controller */
-+	reg = readl(plat->regbase + CQSPI_REG_INDIRECTRD);
-+	if (!(reg & CQSPI_REG_INDIRECTRD_DONE_MASK)) {
-+		reg = readl(plat->regbase + CQSPI_REG_INDIRECTRD);
-+		printf("QSPI: indirect completion status error with reg 0x%08x\n",
-+		       reg);
-+		goto failrd;
-+	}
-+
-+	/* Clear indirect completion status */
-+	writel(CQSPI_REG_INDIRECTRD_DONE_MASK,
-+	       plat->regbase + CQSPI_REG_INDIRECTRD);
-+	return 0;
-+
-+failrd:
-+	/* Cancel the indirect read */
-+	writel(CQSPI_REG_INDIRECTRD_CANCEL_MASK,
-+	       plat->regbase + CQSPI_REG_INDIRECTRD);
-+	return -1;
-+}
-+
-+/* Opcode + Address (3/4 bytes) */
-+int cadence_qspi_apb_indirect_write_setup(struct cadence_spi_platdata *plat,
-+	unsigned int cmdlen, const u8 *cmdbuf)
-+{
-+	unsigned int reg;
-+	unsigned int addr_bytes = cmdlen > 4 ? 4 : 3;
-+
-+	if (cmdlen < 4 || cmdbuf == NULL) {
-+		printf("QSPI: iInvalid input argument, len %d cmdbuf 0x%08x\n",
-+		       cmdlen, (unsigned int)cmdbuf);
-+		return -EINVAL;
-+	}
-+	/* Setup the indirect trigger address */
-+	writel(((u32)plat->ahbbase & CQSPI_INDIRECTTRIGGER_ADDR_MASK),
-+	       plat->regbase + CQSPI_REG_INDIRECTTRIGGER);
-+
-+	writel(CQSPI_REG_SRAM_PARTITION_WR,
-+	       plat->regbase + CQSPI_REG_SRAMPARTITION);
-+
-+	/* Configure the opcode */
-+	reg = cmdbuf[0] << CQSPI_REG_WR_INSTR_OPCODE_LSB;
-+	writel(reg, plat->regbase + CQSPI_REG_WR_INSTR);
-+
-+	/* Setup write address. */
-+	reg = cadence_qspi_apb_cmd2addr(&cmdbuf[1], addr_bytes);
-+	writel(reg, plat->regbase + CQSPI_REG_INDIRECTWRSTARTADDR);
-+
-+	reg = readl(plat->regbase + CQSPI_REG_SIZE);
-+	reg &= ~CQSPI_REG_SIZE_ADDRESS_MASK;
-+	reg |= (addr_bytes - 1);
-+	writel(reg, plat->regbase + CQSPI_REG_SIZE);
-+	return 0;
-+}
-+
-+int cadence_qspi_apb_indirect_write_execute(struct cadence_spi_platdata *plat,
-+	unsigned int txlen, const u8 *txbuf)
-+{
-+	unsigned int reg = 0;
-+	unsigned int retry;
-+
-+	/* Configure the indirect read transfer bytes */
-+	writel(txlen, plat->regbase + CQSPI_REG_INDIRECTWRBYTES);
-+
-+	/* Start the indirect write transfer */
-+	writel(CQSPI_REG_INDIRECTWR_START_MASK,
-+	       plat->regbase + CQSPI_REG_INDIRECTWR);
-+
-+	if (qpsi_write_sram_fifo_push(plat, (const void *)txbuf, txlen))
-+		goto failwr;
-+
-+	/* Wait until last write is completed (FIFO empty) */
-+	retry = CQSPI_REG_RETRY;
-+	while (retry--) {
-+		reg = CQSPI_GET_WR_SRAM_LEVEL(plat->regbase);
-+		if (reg == 0)
-+			break;
-+
-+		udelay(1);
-+	}
-+
-+	if (reg != 0) {
-+		printf("QSPI: timeout for indirect write\n");
-+		goto failwr;
-+	}
-+
-+	/* Check flash indirect controller status */
-+	retry = CQSPI_REG_RETRY;
-+	while (retry--) {
-+		reg = readl(plat->regbase + CQSPI_REG_INDIRECTWR);
-+		if (reg & CQSPI_REG_INDIRECTWR_DONE_MASK)
-+			break;
-+		udelay(1);
-+	}
-+
-+	if (!(reg & CQSPI_REG_INDIRECTWR_DONE_MASK)) {
-+		printf("QSPI: indirect completion status error with reg 0x%08x\n",
-+		       reg);
-+		goto failwr;
-+	}
-+
-+	/* Clear indirect completion status */
-+	writel(CQSPI_REG_INDIRECTWR_DONE_MASK,
-+	       plat->regbase + CQSPI_REG_INDIRECTWR);
-+	return 0;
-+
-+failwr:
-+	/* Cancel the indirect write */
-+	writel(CQSPI_REG_INDIRECTWR_CANCEL_MASK,
-+	       plat->regbase + CQSPI_REG_INDIRECTWR);
-+	return -1;
-+}
-+
-+void cadence_qspi_apb_enter_xip(void *reg_base, char xip_dummy)
-+{
-+	unsigned int reg;
-+
-+	/* enter XiP mode immediately and enable direct mode */
-+	reg = readl(reg_base + CQSPI_REG_CONFIG);
-+	reg |= CQSPI_REG_CONFIG_ENABLE_MASK;
-+	reg |= CQSPI_REG_CONFIG_DIRECT_MASK;
-+	reg |= CQSPI_REG_CONFIG_XIP_IMM_MASK;
-+	writel(reg, reg_base + CQSPI_REG_CONFIG);
-+
-+	/* keep the XiP mode */
-+	writel(xip_dummy, reg_base + CQSPI_REG_MODE_BIT);
-+
-+	/* Enable mode bit at devrd */
-+	reg = readl(reg_base + CQSPI_REG_RD_INSTR);
-+	reg |= (1 << CQSPI_REG_RD_INSTR_MODE_EN_LSB);
-+	writel(reg, reg_base + CQSPI_REG_RD_INSTR);
-+}
-diff -ruN u-boot-2015.01-rc3/drivers/spi/cadence_qspi.c u-boot/drivers/spi/cadence_qspi.c
---- u-boot-2015.01-rc3/drivers/spi/cadence_qspi.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/drivers/spi/cadence_qspi.c	2015-01-01 17:34:32.701495908 +0100
-@@ -0,0 +1,345 @@
-+/*
-+ * Copyright (C) 2012
-+ * Altera Corporation <www.altera.com>
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <dm.h>
-+#include <fdtdec.h>
-+#include <malloc.h>
-+#include <spi.h>
-+#include <asm/errno.h>
-+#include "cadence_qspi.h"
-+
-+#define CQSPI_STIG_READ			0
-+#define CQSPI_STIG_WRITE		1
-+#define CQSPI_INDIRECT_READ		2
-+#define CQSPI_INDIRECT_WRITE		3
-+
-+DECLARE_GLOBAL_DATA_PTR;
-+
-+static int cadence_spi_write_speed(struct udevice *bus, uint hz)
-+{
-+	struct cadence_spi_platdata *plat = bus->platdata;
-+	struct cadence_spi_priv *priv = dev_get_priv(bus);
-+
-+	cadence_qspi_apb_config_baudrate_div(priv->regbase,
-+					     CONFIG_CQSPI_REF_CLK, hz);
-+
-+	/* Reconfigure delay timing if speed is changed. */
-+	cadence_qspi_apb_delay(priv->regbase, CONFIG_CQSPI_REF_CLK, hz,
-+			       plat->tshsl_ns, plat->tsd2d_ns,
-+			       plat->tchsh_ns, plat->tslch_ns);
-+
-+	return 0;
-+}
-+
-+/* Calibration sequence to determine the read data capture delay register */
-+static int spi_calibration(struct udevice *bus)
-+{
-+	struct cadence_spi_platdata *plat = bus->platdata;
-+	struct cadence_spi_priv *priv = dev_get_priv(bus);
-+	void *base = priv->regbase;
-+	u8 opcode_rdid = 0x9F;
-+	unsigned int idcode = 0, temp = 0;
-+	int err = 0, i, range_lo = -1, range_hi = -1;
-+
-+	/* start with slowest clock (1 MHz) */
-+	cadence_spi_write_speed(bus, 1000000);
-+
-+	/* configure the read data capture delay register to 0 */
-+	cadence_qspi_apb_readdata_capture(base, 1, 0);
-+
-+	/* Enable QSPI */
-+	cadence_qspi_apb_controller_enable(base);
-+
-+	/* read the ID which will be our golden value */
-+	err = cadence_qspi_apb_command_read(base, 1, &opcode_rdid,
-+		3, (u8 *)&idcode);
-+	if (err) {
-+		puts("SF: Calibration failed (read)\n");
-+		return err;
-+	}
-+
-+	/* use back the intended clock and find low range */
-+	cadence_spi_write_speed(bus, plat->max_hz);
-+	for (i = 0; i < CQSPI_READ_CAPTURE_MAX_DELAY; i++) {
-+		/* Disable QSPI */
-+		cadence_qspi_apb_controller_disable(base);
-+
-+		/* reconfigure the read data capture delay register */
-+		cadence_qspi_apb_readdata_capture(base, 1, i);
-+
-+		/* Enable back QSPI */
-+		cadence_qspi_apb_controller_enable(base);
-+
-+		/* issue a RDID to get the ID value */
-+		err = cadence_qspi_apb_command_read(base, 1, &opcode_rdid,
-+			3, (u8 *)&temp);
-+		if (err) {
-+			puts("SF: Calibration failed (read)\n");
-+			return err;
-+		}
-+
-+		/* search for range lo */
-+		if (range_lo == -1 && temp == idcode) {
-+			range_lo = i;
-+			continue;
-+		}
-+
-+		/* search for range hi */
-+		if (range_lo != -1 && temp != idcode) {
-+			range_hi = i - 1;
-+			break;
-+		}
-+		range_hi = i;
-+	}
-+
-+	if (range_lo == -1) {
-+		puts("SF: Calibration failed (low range)\n");
-+		return err;
-+	}
-+
-+	/* Disable QSPI for subsequent initialization */
-+	cadence_qspi_apb_controller_disable(base);
-+
-+	/* configure the final value for read data capture delay register */
-+	cadence_qspi_apb_readdata_capture(base, 1, (range_hi + range_lo) / 2);
-+	debug("SF: Read data capture delay calibrated to %i (%i - %i)\n",
-+	      (range_hi + range_lo) / 2, range_lo, range_hi);
-+
-+	/* just to ensure we do once only when speed or chip select change */
-+	priv->qspi_calibrated_hz = plat->max_hz;
-+	priv->qspi_calibrated_cs = spi_chip_select(bus);
-+
-+	return 0;
-+}
-+
-+static int cadence_spi_set_speed(struct udevice *bus, uint hz)
-+{
-+	struct cadence_spi_platdata *plat = bus->platdata;
-+	struct cadence_spi_priv *priv = dev_get_priv(bus);
-+	int err;
-+
-+	/* Disable QSPI */
-+	cadence_qspi_apb_controller_disable(priv->regbase);
-+
-+	cadence_spi_write_speed(bus, hz);
-+
-+	/* Calibration required for different SCLK speed or chip select */
-+	if (priv->qspi_calibrated_hz != plat->max_hz ||
-+	    priv->qspi_calibrated_cs != spi_chip_select(bus)) {
-+		err = spi_calibration(bus);
-+		if (err)
-+			return err;
-+	}
-+
-+	/* Enable QSPI */
-+	cadence_qspi_apb_controller_enable(priv->regbase);
-+
-+	debug("%s: speed=%d\n", __func__, hz);
-+
-+	return 0;
-+}
-+
-+static int cadence_spi_probe(struct udevice *bus)
-+{
-+	struct cadence_spi_platdata *plat = bus->platdata;
-+	struct cadence_spi_priv *priv = dev_get_priv(bus);
-+
-+	priv->regbase = plat->regbase;
-+	priv->ahbbase = plat->ahbbase;
-+
-+	if (!priv->qspi_is_init) {
-+		cadence_qspi_apb_controller_init(plat);
-+		priv->qspi_is_init = 1;
-+	}
-+
-+	return 0;
-+}
-+
-+static int cadence_spi_set_mode(struct udevice *bus, uint mode)
-+{
-+	struct cadence_spi_priv *priv = dev_get_priv(bus);
-+	unsigned int clk_pol = (mode & SPI_CPOL) ? 1 : 0;
-+	unsigned int clk_pha = (mode & SPI_CPHA) ? 1 : 0;
-+
-+	/* Disable QSPI */
-+	cadence_qspi_apb_controller_disable(priv->regbase);
-+
-+	/* Set SPI mode */
-+	cadence_qspi_apb_set_clk_mode(priv->regbase, clk_pol, clk_pha);
-+
-+	/* Enable QSPI */
-+	cadence_qspi_apb_controller_enable(priv->regbase);
-+
-+	return 0;
-+}
-+
-+static int cadence_spi_xfer(struct udevice *dev, unsigned int bitlen,
-+			    const void *dout, void *din, unsigned long flags)
-+{
-+	struct udevice *bus = dev->parent;
-+	struct cadence_spi_platdata *plat = bus->platdata;
-+	struct cadence_spi_priv *priv = dev_get_priv(bus);
-+	void *base = priv->regbase;
-+	u8 *cmd_buf = priv->cmd_buf;
-+	size_t data_bytes;
-+	int err = 0;
-+	u32 mode = CQSPI_STIG_WRITE;
-+
-+	if (flags & SPI_XFER_BEGIN) {
-+		/* copy command to local buffer */
-+		priv->cmd_len = bitlen / 8;
-+		memcpy(cmd_buf, dout, priv->cmd_len);
-+	}
-+
-+	if (flags == (SPI_XFER_BEGIN | SPI_XFER_END)) {
-+		/* if start and end bit are set, the data bytes is 0. */
-+		data_bytes = 0;
-+	} else {
-+		data_bytes = bitlen / 8;
-+	}
-+	debug("%s: len=%d [bytes]\n", __func__, data_bytes);
-+
-+	/* Set Chip select */
-+	cadence_qspi_apb_chipselect(base, spi_chip_select(dev),
-+				    CONFIG_CQSPI_DECODER);
-+
-+	if ((flags & SPI_XFER_END) || (flags == 0)) {
-+		if (priv->cmd_len == 0) {
-+			printf("QSPI: Error, command is empty.\n");
-+			return -1;
-+		}
-+
-+		if (din && data_bytes) {
-+			/* read */
-+			/* Use STIG if no address. */
-+			if (!CQSPI_IS_ADDR(priv->cmd_len))
-+				mode = CQSPI_STIG_READ;
-+			else
-+				mode = CQSPI_INDIRECT_READ;
-+		} else if (dout && !(flags & SPI_XFER_BEGIN)) {
-+			/* write */
-+			if (!CQSPI_IS_ADDR(priv->cmd_len))
-+				mode = CQSPI_STIG_WRITE;
-+			else
-+				mode = CQSPI_INDIRECT_WRITE;
-+		}
-+
-+		switch (mode) {
-+		case CQSPI_STIG_READ:
-+			err = cadence_qspi_apb_command_read(
-+				base, priv->cmd_len, cmd_buf,
-+				data_bytes, din);
-+
-+		break;
-+		case CQSPI_STIG_WRITE:
-+			err = cadence_qspi_apb_command_write(base,
-+				priv->cmd_len, cmd_buf,
-+				data_bytes, dout);
-+		break;
-+		case CQSPI_INDIRECT_READ:
-+			err = cadence_qspi_apb_indirect_read_setup(plat,
-+				priv->cmd_len, cmd_buf);
-+			if (!err) {
-+				err = cadence_qspi_apb_indirect_read_execute
-+				(plat, data_bytes, din);
-+			}
-+		break;
-+		case CQSPI_INDIRECT_WRITE:
-+			err = cadence_qspi_apb_indirect_write_setup
-+				(plat, priv->cmd_len, cmd_buf);
-+			if (!err) {
-+				err = cadence_qspi_apb_indirect_write_execute
-+				(plat, data_bytes, dout);
-+			}
-+		break;
-+		default:
-+			err = -1;
-+			break;
-+		}
-+
-+		if (flags & SPI_XFER_END) {
-+			/* clear command buffer */
-+			memset(cmd_buf, 0, sizeof(priv->cmd_buf));
-+			priv->cmd_len = 0;
-+		}
-+	}
-+
-+	return err;
-+}
-+
-+static int cadence_spi_ofdata_to_platdata(struct udevice *bus)
-+{
-+	struct cadence_spi_platdata *plat = bus->platdata;
-+	const void *blob = gd->fdt_blob;
-+	int node = bus->of_offset;
-+	int subnode;
-+	u32 data[4];
-+	int ret;
-+
-+	/* 2 base addresses are needed, lets get them from the DT */
-+	ret = fdtdec_get_int_array(blob, node, "reg", data, ARRAY_SIZE(data));
-+	if (ret) {
-+		printf("Error: Can't get base addresses (ret=%d)!\n", ret);
-+		return -ENODEV;
-+	}
-+
-+	plat->regbase = (void *)data[0];
-+	plat->ahbbase = (void *)data[2];
-+
-+	/* Use 500KHz as a suitable default */
-+	plat->max_hz = fdtdec_get_int(blob, node, "spi-max-frequency",
-+				      500000);
-+
-+	/* All other paramters are embedded in the child node */
-+	subnode = fdt_first_subnode(blob, node);
-+	if (!subnode) {
-+		printf("Error: subnode with SPI flash config missing!\n");
-+		return -ENODEV;
-+	}
-+
-+	/* Read other parameters from DT */
-+	plat->page_size = fdtdec_get_int(blob, subnode, "page-size", 256);
-+	plat->block_size = fdtdec_get_int(blob, subnode, "block-size", 16);
-+	plat->tshsl_ns = fdtdec_get_int(blob, subnode, "tshsl-ns", 200);
-+	plat->tsd2d_ns = fdtdec_get_int(blob, subnode, "tsd2d-ns", 255);
-+	plat->tchsh_ns = fdtdec_get_int(blob, subnode, "tchsh-ns", 20);
-+	plat->tslch_ns = fdtdec_get_int(blob, subnode, "tslch-ns", 20);
-+
-+	debug("%s: regbase=%p ahbbase=%p max-frequency=%d page-size=%d\n",
-+	      __func__, plat->regbase, plat->ahbbase, plat->max_hz,
-+	      plat->page_size);
-+
-+	return 0;
-+}
-+
-+static const struct dm_spi_ops cadence_spi_ops = {
-+	.xfer		= cadence_spi_xfer,
-+	.set_speed	= cadence_spi_set_speed,
-+	.set_mode	= cadence_spi_set_mode,
-+	/*
-+	 * cs_info is not needed, since we require all chip selects to be
-+	 * in the device tree explicitly
-+	 */
-+};
-+
-+static const struct udevice_id cadence_spi_ids[] = {
-+	{ .compatible = "cadence,qspi" },
-+	{ }
-+};
-+
-+U_BOOT_DRIVER(cadence_spi) = {
-+	.name = "cadence_spi",
-+	.id = UCLASS_SPI,
-+	.of_match = cadence_spi_ids,
-+	.ops = &cadence_spi_ops,
-+	.ofdata_to_platdata = cadence_spi_ofdata_to_platdata,
-+	.platdata_auto_alloc_size = sizeof(struct cadence_spi_platdata),
-+	.priv_auto_alloc_size = sizeof(struct cadence_spi_priv),
-+	.per_child_auto_alloc_size = sizeof(struct spi_slave),
-+	.probe = cadence_spi_probe,
-+};
-diff -ruN u-boot-2015.01-rc3/drivers/spi/cadence_qspi.h u-boot/drivers/spi/cadence_qspi.h
---- u-boot-2015.01-rc3/drivers/spi/cadence_qspi.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/drivers/spi/cadence_qspi.h	2015-01-01 17:34:32.701495908 +0100
-@@ -0,0 +1,76 @@
-+/*
-+ * Copyright (C) 2012
-+ * Altera Corporation <www.altera.com>
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#ifndef __CADENCE_QSPI_H__
-+#define __CADENCE_QSPI_H__
-+
-+#define CQSPI_IS_ADDR(cmd_len)		(cmd_len > 1 ? 1 : 0)
-+
-+#define CQSPI_NO_DECODER_MAX_CS		4
-+#define CQSPI_DECODER_MAX_CS		16
-+#define CQSPI_READ_CAPTURE_MAX_DELAY	16
-+
-+struct cadence_spi_platdata {
-+	unsigned int	max_hz;
-+	void		*regbase;
-+	void		*ahbbase;
-+
-+	u32		page_size;
-+	u32		block_size;
-+	u32		tshsl_ns;
-+	u32		tsd2d_ns;
-+	u32		tchsh_ns;
-+	u32		tslch_ns;
-+};
-+
-+struct cadence_spi_priv {
-+	void		*regbase;
-+	void		*ahbbase;
-+	size_t		cmd_len;
-+	u8		cmd_buf[32];
-+	size_t		data_len;
-+
-+	int		qspi_is_init;
-+	unsigned int	qspi_calibrated_hz;
-+	unsigned int	qspi_calibrated_cs;
-+};
-+
-+/* Functions call declaration */
-+void cadence_qspi_apb_controller_init(struct cadence_spi_platdata *plat);
-+void cadence_qspi_apb_controller_enable(void *reg_base_addr);
-+void cadence_qspi_apb_controller_disable(void *reg_base_addr);
-+
-+int cadence_qspi_apb_command_read(void *reg_base_addr,
-+	unsigned int cmdlen, const u8 *cmdbuf, unsigned int rxlen, u8 *rxbuf);
-+int cadence_qspi_apb_command_write(void *reg_base_addr,
-+	unsigned int cmdlen, const u8 *cmdbuf,
-+	unsigned int txlen,  const u8 *txbuf);
-+
-+int cadence_qspi_apb_indirect_read_setup(struct cadence_spi_platdata *plat,
-+	unsigned int cmdlen, const u8 *cmdbuf);
-+int cadence_qspi_apb_indirect_read_execute(struct cadence_spi_platdata *plat,
-+	unsigned int rxlen, u8 *rxbuf);
-+int cadence_qspi_apb_indirect_write_setup(struct cadence_spi_platdata *plat,
-+	unsigned int cmdlen, const u8 *cmdbuf);
-+int cadence_qspi_apb_indirect_write_execute(struct cadence_spi_platdata *plat,
-+	unsigned int txlen, const u8 *txbuf);
-+
-+void cadence_qspi_apb_chipselect(void *reg_base,
-+	unsigned int chip_select, unsigned int decoder_enable);
-+void cadence_qspi_apb_set_clk_mode(void *reg_base_addr,
-+	unsigned int clk_pol, unsigned int clk_pha);
-+void cadence_qspi_apb_config_baudrate_div(void *reg_base,
-+	unsigned int ref_clk_hz, unsigned int sclk_hz);
-+void cadence_qspi_apb_delay(void *reg_base,
-+	unsigned int ref_clk, unsigned int sclk_hz,
-+	unsigned int tshsl_ns, unsigned int tsd2d_ns,
-+	unsigned int tchsh_ns, unsigned int tslch_ns);
-+void cadence_qspi_apb_enter_xip(void *reg_base, char xip_dummy);
-+void cadence_qspi_apb_readdata_capture(void *reg_base,
-+	unsigned int bypass, unsigned int delay);
-+
-+#endif /* __CADENCE_QSPI_H__ */
-diff -ruN u-boot-2015.01-rc3/drivers/spi/designware_spi.c u-boot/drivers/spi/designware_spi.c
---- u-boot-2015.01-rc3/drivers/spi/designware_spi.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/drivers/spi/designware_spi.c	2015-01-01 17:34:32.701495908 +0100
-@@ -0,0 +1,426 @@
-+/*
-+ * Designware master SPI core controller driver
-+ *
-+ * Copyright (C) 2014 Stefan Roese <sr at denx.de>
-+ *
-+ * Very loosely based on the Linux driver:
-+ * drivers/spi/spi-dw.c, which is:
-+ * Copyright (c) 2009, Intel Corporation.
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0
-+ */
-+
-+#include <common.h>
-+#include <dm.h>
-+#include <errno.h>
-+#include <malloc.h>
-+#include <spi.h>
-+#include <fdtdec.h>
-+#include <linux/compat.h>
-+#include <asm/io.h>
-+#include <asm/arch/clock_manager.h>
-+
-+DECLARE_GLOBAL_DATA_PTR;
-+
-+/* Register offsets */
-+#define DW_SPI_CTRL0			0x00
-+#define DW_SPI_CTRL1			0x04
-+#define DW_SPI_SSIENR			0x08
-+#define DW_SPI_MWCR			0x0c
-+#define DW_SPI_SER			0x10
-+#define DW_SPI_BAUDR			0x14
-+#define DW_SPI_TXFLTR			0x18
-+#define DW_SPI_RXFLTR			0x1c
-+#define DW_SPI_TXFLR			0x20
-+#define DW_SPI_RXFLR			0x24
-+#define DW_SPI_SR			0x28
-+#define DW_SPI_IMR			0x2c
-+#define DW_SPI_ISR			0x30
-+#define DW_SPI_RISR			0x34
-+#define DW_SPI_TXOICR			0x38
-+#define DW_SPI_RXOICR			0x3c
-+#define DW_SPI_RXUICR			0x40
-+#define DW_SPI_MSTICR			0x44
-+#define DW_SPI_ICR			0x48
-+#define DW_SPI_DMACR			0x4c
-+#define DW_SPI_DMATDLR			0x50
-+#define DW_SPI_DMARDLR			0x54
-+#define DW_SPI_IDR			0x58
-+#define DW_SPI_VERSION			0x5c
-+#define DW_SPI_DR			0x60
-+
-+/* Bit fields in CTRLR0 */
-+#define SPI_DFS_OFFSET			0
-+
-+#define SPI_FRF_OFFSET			4
-+#define SPI_FRF_SPI			0x0
-+#define SPI_FRF_SSP			0x1
-+#define SPI_FRF_MICROWIRE		0x2
-+#define SPI_FRF_RESV			0x3
-+
-+#define SPI_MODE_OFFSET			6
-+#define SPI_SCPH_OFFSET			6
-+#define SPI_SCOL_OFFSET			7
-+
-+#define SPI_TMOD_OFFSET			8
-+#define SPI_TMOD_MASK			(0x3 << SPI_TMOD_OFFSET)
-+#define	SPI_TMOD_TR			0x0		/* xmit & recv */
-+#define SPI_TMOD_TO			0x1		/* xmit only */
-+#define SPI_TMOD_RO			0x2		/* recv only */
-+#define SPI_TMOD_EPROMREAD		0x3		/* eeprom read mode */
-+
-+#define SPI_SLVOE_OFFSET		10
-+#define SPI_SRL_OFFSET			11
-+#define SPI_CFS_OFFSET			12
-+
-+/* Bit fields in SR, 7 bits */
-+#define SR_MASK				0x7f		/* cover 7 bits */
-+#define SR_BUSY				(1 << 0)
-+#define SR_TF_NOT_FULL			(1 << 1)
-+#define SR_TF_EMPT			(1 << 2)
-+#define SR_RF_NOT_EMPT			(1 << 3)
-+#define SR_RF_FULL			(1 << 4)
-+#define SR_TX_ERR			(1 << 5)
-+#define SR_DCOL				(1 << 6)
-+
-+#define RX_TIMEOUT			1000		/* timeout in ms */
-+
-+struct dw_spi_platdata {
-+	s32 frequency;		/* Default clock frequency, -1 for none */
-+	void __iomem *regs;
-+};
-+
-+struct dw_spi_priv {
-+	void __iomem *regs;
-+	unsigned int freq;		/* Default frequency */
-+	unsigned int mode;
-+
-+	int bits_per_word;
-+	u8 cs;			/* chip select pin */
-+	u8 tmode;		/* TR/TO/RO/EEPROM */
-+	u8 type;		/* SPI/SSP/MicroWire */
-+	int len;
-+
-+	u32 fifo_len;		/* depth of the FIFO buffer */
-+	void *tx;
-+	void *tx_end;
-+	void *rx;
-+	void *rx_end;
-+};
-+
-+static inline u32 dw_readl(struct dw_spi_priv *priv, u32 offset)
-+{
-+	return __raw_readl(priv->regs + offset);
-+}
-+
-+static inline void dw_writel(struct dw_spi_priv *priv, u32 offset, u32 val)
-+{
-+	__raw_writel(val, priv->regs + offset);
-+}
-+
-+static inline u16 dw_readw(struct dw_spi_priv *priv, u32 offset)
-+{
-+	return __raw_readw(priv->regs + offset);
-+}
-+
-+static inline void dw_writew(struct dw_spi_priv *priv, u32 offset, u16 val)
-+{
-+	__raw_writew(val, priv->regs + offset);
-+}
-+
-+static int dw_spi_ofdata_to_platdata(struct udevice *bus)
-+{
-+	struct dw_spi_platdata *plat = bus->platdata;
-+	const void *blob = gd->fdt_blob;
-+	int node = bus->of_offset;
-+
-+	plat->regs = (struct dw_spi *)fdtdec_get_addr(blob, node, "reg");
-+
-+	/* Use 500KHz as a suitable default */
-+	plat->frequency = fdtdec_get_int(blob, node, "spi-max-frequency",
-+					500000);
-+	debug("%s: regs=%p max-frequency=%d\n", __func__, plat->regs,
-+	      plat->frequency);
-+
-+	return 0;
-+}
-+
-+static inline void spi_enable_chip(struct dw_spi_priv *priv, int enable)
-+{
-+	dw_writel(priv, DW_SPI_SSIENR, (enable ? 1 : 0));
-+}
-+
-+/* Restart the controller, disable all interrupts, clean rx fifo */
-+static void spi_hw_init(struct dw_spi_priv *priv)
-+{
-+	spi_enable_chip(priv, 0);
-+	dw_writel(priv, DW_SPI_IMR, 0xff);
-+	spi_enable_chip(priv, 1);
-+
-+	/*
-+	 * Try to detect the FIFO depth if not set by interface driver,
-+	 * the depth could be from 2 to 256 from HW spec
-+	 */
-+	if (!priv->fifo_len) {
-+		u32 fifo;
-+
-+		for (fifo = 2; fifo <= 257; fifo++) {
-+			dw_writew(priv, DW_SPI_TXFLTR, fifo);
-+			if (fifo != dw_readw(priv, DW_SPI_TXFLTR))
-+				break;
-+		}
-+
-+		priv->fifo_len = (fifo == 257) ? 0 : fifo;
-+		dw_writew(priv, DW_SPI_TXFLTR, 0);
-+	}
-+	debug("%s: fifo_len=%d\n", __func__, priv->fifo_len);
-+}
-+
-+static int dw_spi_probe(struct udevice *bus)
-+{
-+	struct dw_spi_platdata *plat = dev_get_platdata(bus);
-+	struct dw_spi_priv *priv = dev_get_priv(bus);
-+
-+	priv->regs = plat->regs;
-+	priv->freq = plat->frequency;
-+
-+	/* Currently only bits_per_word == 8 supported */
-+	priv->bits_per_word = 8;
-+
-+	priv->tmode = 0; /* Tx & Rx */
-+
-+	/* Basic HW init */
-+	spi_hw_init(priv);
-+
-+	return 0;
-+}
-+
-+/* Return the max entries we can fill into tx fifo */
-+static inline u32 tx_max(struct dw_spi_priv *priv)
-+{
-+	u32 tx_left, tx_room, rxtx_gap;
-+
-+	tx_left = (priv->tx_end - priv->tx) / (priv->bits_per_word >> 3);
-+	tx_room = priv->fifo_len - dw_readw(priv, DW_SPI_TXFLR);
-+
-+	/*
-+	 * Another concern is about the tx/rx mismatch, we
-+	 * thought about using (priv->fifo_len - rxflr - txflr) as
-+	 * one maximum value for tx, but it doesn't cover the
-+	 * data which is out of tx/rx fifo and inside the
-+	 * shift registers. So a control from sw point of
-+	 * view is taken.
-+	 */
-+	rxtx_gap = ((priv->rx_end - priv->rx) - (priv->tx_end - priv->tx)) /
-+		(priv->bits_per_word >> 3);
-+
-+	return min3(tx_left, tx_room, (u32)(priv->fifo_len - rxtx_gap));
-+}
-+
-+/* Return the max entries we should read out of rx fifo */
-+static inline u32 rx_max(struct dw_spi_priv *priv)
-+{
-+	u32 rx_left = (priv->rx_end - priv->rx) / (priv->bits_per_word >> 3);
-+
-+	return min_t(u32, rx_left, dw_readw(priv, DW_SPI_RXFLR));
-+}
-+
-+static void dw_writer(struct dw_spi_priv *priv)
-+{
-+	u32 max = tx_max(priv);
-+	u16 txw = 0;
-+
-+	while (max--) {
-+		/* Set the tx word if the transfer's original "tx" is not null */
-+		if (priv->tx_end - priv->len) {
-+			if (priv->bits_per_word == 8)
-+				txw = *(u8 *)(priv->tx);
-+			else
-+				txw = *(u16 *)(priv->tx);
-+		}
-+		dw_writew(priv, DW_SPI_DR, txw);
-+		debug("%s: tx=0x%02x\n", __func__, txw);
-+		priv->tx += priv->bits_per_word >> 3;
-+	}
-+}
-+
-+static int dw_reader(struct dw_spi_priv *priv)
-+{
-+	unsigned start = get_timer(0);
-+	u32 max;
-+	u16 rxw;
-+
-+	/* Wait for rx data to be ready */
-+	while (rx_max(priv) == 0) {
-+		if (get_timer(start) > RX_TIMEOUT)
-+			return -ETIMEDOUT;
-+	}
-+
-+	max = rx_max(priv);
-+
-+	while (max--) {
-+		rxw = dw_readw(priv, DW_SPI_DR);
-+		debug("%s: rx=0x%02x\n", __func__, rxw);
-+
-+		/*
-+		 * Care about rx only if the transfer's original "rx" is
-+		 * not null
-+		 */
-+		if (priv->rx_end - priv->len) {
-+			if (priv->bits_per_word == 8)
-+				*(u8 *)(priv->rx) = rxw;
-+			else
-+				*(u16 *)(priv->rx) = rxw;
-+		}
-+		priv->rx += priv->bits_per_word >> 3;
-+	}
-+
-+	return 0;
-+}
-+
-+static int poll_transfer(struct dw_spi_priv *priv)
-+{
-+	int ret;
-+
-+	do {
-+		dw_writer(priv);
-+		ret = dw_reader(priv);
-+		if (ret < 0)
-+			return ret;
-+	} while (priv->rx_end > priv->rx);
-+
-+	return 0;
-+}
-+
-+static int dw_spi_xfer(struct udevice *dev, unsigned int bitlen,
-+		       const void *dout, void *din, unsigned long flags)
-+{
-+	struct udevice *bus = dev->parent;
-+	struct dw_spi_priv *priv = dev_get_priv(bus);
-+	const u8 *tx = dout;
-+	u8 *rx = din;
-+	int ret = 0;
-+	u32 cr0 = 0;
-+	u32 cs;
-+
-+	/* spi core configured to do 8 bit transfers */
-+	if (bitlen % 8) {
-+		debug("Non byte aligned SPI transfer.\n");
-+		return -1;
-+	}
-+
-+	cr0 = (priv->bits_per_word - 1) | (priv->type << SPI_FRF_OFFSET) |
-+		(priv->mode << SPI_MODE_OFFSET) |
-+		(priv->tmode << SPI_TMOD_OFFSET);
-+
-+	if (rx && tx)
-+		priv->tmode = SPI_TMOD_TR;
-+	else if (rx)
-+		priv->tmode = SPI_TMOD_RO;
-+	else
-+		priv->tmode = SPI_TMOD_TO;
-+
-+	cr0 &= ~SPI_TMOD_MASK;
-+	cr0 |= (priv->tmode << SPI_TMOD_OFFSET);
-+
-+	priv->len = bitlen >> 3;
-+	debug("%s: rx=%p tx=%p len=%d [bytes]\n", __func__, rx, tx, priv->len);
-+
-+	priv->tx = (void *)tx;
-+	priv->tx_end = priv->tx + priv->len;
-+	priv->rx = rx;
-+	priv->rx_end = priv->rx + priv->len;
-+
-+	/* Disable controller before writing control registers */
-+	spi_enable_chip(priv, 0);
-+
-+	debug("%s: cr0=%08x\n", __func__, cr0);
-+	/* Reprogram cr0 only if changed */
-+	if (dw_readw(priv, DW_SPI_CTRL0) != cr0)
-+		dw_writew(priv, DW_SPI_CTRL0, cr0);
-+
-+	/*
-+	 * Configure the desired SS (slave select 0...3) in the controller
-+	 * The DW SPI controller will activate and deactivate this CS
-+	 * automatically. So no cs_activate() etc is needed in this driver.
-+	 */
-+	cs = spi_chip_select(dev);
-+	dw_writel(priv, DW_SPI_SER, 1 << cs);
-+
-+	/* Enable controller after writing control registers */
-+	spi_enable_chip(priv, 1);
-+
-+	/* Start transfer in a polling loop */
-+	ret = poll_transfer(priv);
-+
-+	return ret;
-+}
-+
-+static int dw_spi_set_speed(struct udevice *bus, uint speed)
-+{
-+	struct dw_spi_platdata *plat = bus->platdata;
-+	struct dw_spi_priv *priv = dev_get_priv(bus);
-+	u16 clk_div;
-+
-+	if (speed > plat->frequency)
-+		speed = plat->frequency;
-+
-+	/* Disable controller before writing control registers */
-+	spi_enable_chip(priv, 0);
-+
-+	/* clk_div doesn't support odd number */
-+	clk_div = cm_get_spi_controller_clk_hz() / speed;
-+	clk_div = (clk_div + 1) & 0xfffe;
-+	dw_writel(priv, DW_SPI_BAUDR, clk_div);
-+
-+	/* Enable controller after writing control registers */
-+	spi_enable_chip(priv, 1);
-+
-+	priv->freq = speed;
-+	debug("%s: regs=%p speed=%d clk_div=%d\n", __func__, priv->regs,
-+	      priv->freq, clk_div);
-+
-+	return 0;
-+}
-+
-+static int dw_spi_set_mode(struct udevice *bus, uint mode)
-+{
-+	struct dw_spi_priv *priv = dev_get_priv(bus);
-+
-+	/*
-+	 * Can't set mode yet. Since this depends on if rx, tx, or
-+	 * rx & tx is requested. So we have to defer this to the
-+	 * real transfer function.
-+	 */
-+	priv->mode = mode;
-+	debug("%s: regs=%p, mode=%d\n", __func__, priv->regs, priv->mode);
-+
-+	return 0;
-+}
-+
-+static const struct dm_spi_ops dw_spi_ops = {
-+	.xfer		= dw_spi_xfer,
-+	.set_speed	= dw_spi_set_speed,
-+	.set_mode	= dw_spi_set_mode,
-+	/*
-+	 * cs_info is not needed, since we require all chip selects to be
-+	 * in the device tree explicitly
-+	 */
-+};
-+
-+static const struct udevice_id dw_spi_ids[] = {
-+	{ .compatible = "snps,dw-spi-mmio" },
-+	{ }
-+};
-+
-+U_BOOT_DRIVER(dw_spi) = {
-+	.name = "dw_spi",
-+	.id = UCLASS_SPI,
-+	.of_match = dw_spi_ids,
-+	.ops = &dw_spi_ops,
-+	.ofdata_to_platdata = dw_spi_ofdata_to_platdata,
-+	.platdata_auto_alloc_size = sizeof(struct dw_spi_platdata),
-+	.priv_auto_alloc_size = sizeof(struct dw_spi_priv),
-+	.per_child_auto_alloc_size = sizeof(struct spi_slave),
-+	.probe = dw_spi_probe,
-+};
-diff -ruN u-boot-2015.01-rc3/drivers/spi/ich.c u-boot/drivers/spi/ich.c
---- u-boot-2015.01-rc3/drivers/spi/ich.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/spi/ich.c	2015-01-01 17:34:32.701495908 +0100
-@@ -141,6 +141,15 @@
- 	ich->slave.max_write_size = ctlr.databytes;
- 	ich->speed = max_hz;
- 
-+	/*
-+	 * ICH 7 SPI controller only supports array read command
-+	 * and byte program command for SST flash
-+	 */
-+	if (ctlr.ich_version == 7) {
-+		ich->slave.op_mode_rx = SPI_OPM_RX_AS;
-+		ich->slave.op_mode_tx = SPI_OPM_TX_BP;
-+	}
-+
- 	return &ich->slave;
- }
- 
-@@ -158,7 +167,8 @@
-  */
- static int get_ich_version(uint16_t device_id)
- {
--	if (device_id == PCI_DEVICE_ID_INTEL_TGP_LPC)
-+	if (device_id == PCI_DEVICE_ID_INTEL_TGP_LPC ||
-+	    device_id == PCI_DEVICE_ID_INTEL_ITC_LPC)
- 		return 7;
- 
- 	if ((device_id >= PCI_DEVICE_ID_INTEL_COUGARPOINT_LPC_MIN &&
-@@ -483,8 +493,6 @@
- 	struct spi_trans *trans = &ich->trans;
- 	unsigned type = flags & (SPI_XFER_BEGIN | SPI_XFER_END);
- 	int using_cmd = 0;
--	/* Align read transactions to 64-byte boundaries */
--	char buff[ctlr.databytes];
- 
- 	/* Ee don't support writing partial bytes. */
- 	if (bitlen % 8) {
-@@ -632,14 +640,9 @@
- 	 */
- 	while (trans->bytesout || trans->bytesin) {
- 		uint32_t data_length;
--		uint32_t aligned_offset;
--		uint32_t diff;
--
--		aligned_offset = trans->offset & ~(ctlr.databytes - 1);
--		diff = trans->offset - aligned_offset;
- 
- 		/* SPI addresses are 24 bit only */
--		ich_writel(aligned_offset & 0x00FFFFFF, ctlr.addr);
-+		ich_writel(trans->offset & 0x00FFFFFF, ctlr.addr);
- 
- 		if (trans->bytesout)
- 			data_length = min(trans->bytesout, ctlr.databytes);
-@@ -673,13 +676,7 @@
- 		}
- 
- 		if (trans->bytesin) {
--			if (diff) {
--				data_length -= diff;
--				read_reg(ctlr.data, buff, ctlr.databytes);
--				memcpy(trans->in, buff + diff, data_length);
--			} else {
--				read_reg(ctlr.data, trans->in, data_length);
--			}
-+			read_reg(ctlr.data, trans->in, data_length);
- 			spi_use_in(trans, data_length);
- 			if (with_address)
- 				trans->offset += data_length;
-diff -ruN u-boot-2015.01-rc3/drivers/spi/Makefile u-boot/drivers/spi/Makefile
---- u-boot-2015.01-rc3/drivers/spi/Makefile	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/spi/Makefile	2015-01-01 17:34:32.701495908 +0100
-@@ -23,9 +23,11 @@
- obj-$(CONFIG_ATMEL_SPI) += atmel_spi.o
- obj-$(CONFIG_BFIN_SPI) += bfin_spi.o
- obj-$(CONFIG_BFIN_SPI6XX) += bfin_spi6xx.o
-+obj-$(CONFIG_CADENCE_QSPI) += cadence_qspi.o cadence_qspi_apb.o
- obj-$(CONFIG_CF_SPI) += cf_spi.o
- obj-$(CONFIG_CF_QSPI) += cf_qspi.o
- obj-$(CONFIG_DAVINCI_SPI) += davinci_spi.o
-+obj-$(CONFIG_DESIGNWARE_SPI) += designware_spi.o
- obj-$(CONFIG_EXYNOS_SPI) += exynos_spi.o
- obj-$(CONFIG_FTSSP010_SPI) += ftssp010_spi.o
- obj-$(CONFIG_ICH_SPI) +=  ich.o
-diff -ruN u-boot-2015.01-rc3/drivers/thermal/imx_thermal.c u-boot/drivers/thermal/imx_thermal.c
---- u-boot-2015.01-rc3/drivers/thermal/imx_thermal.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/thermal/imx_thermal.c	2015-01-01 17:34:32.705495842 +0100
-@@ -156,8 +156,6 @@
- 	if (fuse == 0 || fuse == ~0) {
- 		printf("CPU:   Thermal invalid data, fuse: 0x%x\n", fuse);
- 		return -EPERM;
--	} else {
--		printf("CPU:   Thermal calibration data: 0x%x\n", fuse);
- 	}
- 
- 	*priv = fuse;
-diff -ruN u-boot-2015.01-rc3/drivers/usb/gadget/atmel_usba_udc.c u-boot/drivers/usb/gadget/atmel_usba_udc.c
---- u-boot-2015.01-rc3/drivers/usb/gadget/atmel_usba_udc.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/usb/gadget/atmel_usba_udc.c	2015-01-01 17:34:32.709495776 +0100
-@@ -1062,7 +1062,6 @@
- 	if ((epstatus & epctrl) & USBA_RX_BK_RDY) {
- 		DBG(DBG_BUS, "%s: RX data ready\n", ep->ep.name);
- 		receive_data(ep);
--		usba_ep_writel(ep, CLR_STA, USBA_RX_BK_RDY);
- 	}
- }
- 
-diff -ruN u-boot-2015.01-rc3/drivers/usb/gadget/ether.c u-boot/drivers/usb/gadget/ether.c
---- u-boot-2015.01-rc3/drivers/usb/gadget/ether.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/usb/gadget/ether.c	2015-01-01 17:34:32.709495776 +0100
-@@ -852,30 +852,6 @@
- DEFINE_CACHE_ALIGN_BUFFER(u8, status_req, STATUS_BYTECOUNT);
- #endif
- 
--
--/**
-- * strlcpy - Copy a %NUL terminated string into a sized buffer
-- * @dest: Where to copy the string to
-- * @src: Where to copy the string from
-- * @size: size of destination buffer
-- *
-- * Compatible with *BSD: the result is always a valid
-- * NUL-terminated string that fits in the buffer (unless,
-- * of course, the buffer size is zero). It does not pad
-- * out the result like strncpy() does.
-- */
--size_t strlcpy(char *dest, const char *src, size_t size)
--{
--	size_t ret = strlen(src);
--
--	if (size) {
--		size_t len = (ret >= size) ? size - 1 : ret;
--		memcpy(dest, src, len);
--		dest[len] = '\0';
--	}
--	return ret;
--}
--
- /*============================================================================*/
- 
- /*
-diff -ruN u-boot-2015.01-rc3/drivers/usb/gadget/f_dfu.c u-boot/drivers/usb/gadget/f_dfu.c
---- u-boot-2015.01-rc3/drivers/usb/gadget/f_dfu.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/usb/gadget/f_dfu.c	2015-01-01 17:34:32.709495776 +0100
-@@ -366,7 +366,7 @@
- 		to_runtime_mode(f_dfu);
- 		f_dfu->dfu_state = DFU_STATE_appIDLE;
- 
--		dfu_trigger_detach();
-+		g_dnl_trigger_detach();
- 		break;
- 	default:
- 		f_dfu->dfu_state = DFU_STATE_dfuERROR;
-diff -ruN u-boot-2015.01-rc3/drivers/usb/gadget/f_fastboot.c u-boot/drivers/usb/gadget/f_fastboot.c
---- u-boot-2015.01-rc3/drivers/usb/gadget/f_fastboot.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/usb/gadget/f_fastboot.c	2015-01-01 17:34:32.709495776 +0100
-@@ -480,6 +480,17 @@
- 	fastboot_tx_write_str("OKAY");
- }
- 
-+static void do_exit_on_complete(struct usb_ep *ep, struct usb_request *req)
-+{
-+	g_dnl_trigger_detach();
-+}
-+
-+static void cb_continue(struct usb_ep *ep, struct usb_request *req)
-+{
-+	fastboot_func->in_req->complete = do_exit_on_complete;
-+	fastboot_tx_write_str("OKAY");
-+}
-+
- #ifdef CONFIG_FASTBOOT_FLASH
- static void cb_flash(struct usb_ep *ep, struct usb_request *req)
- {
-@@ -520,6 +531,9 @@
- 	}, {
- 		.cmd = "boot",
- 		.cb = cb_boot,
-+	}, {
-+		.cmd = "continue",
-+		.cb = cb_continue,
- 	},
- #ifdef CONFIG_FASTBOOT_FLASH
- 	{
-diff -ruN u-boot-2015.01-rc3/drivers/usb/gadget/f_thor.c u-boot/drivers/usb/gadget/f_thor.c
---- u-boot-2015.01-rc3/drivers/usb/gadget/f_thor.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/usb/gadget/f_thor.c	2015-01-01 17:34:32.709495776 +0100
-@@ -205,12 +205,24 @@
- 
- static int download_tail(long long int left, int cnt)
- {
--	struct dfu_entity *dfu_entity = dfu_get_entity(alt_setting_num);
--	void *transfer_buffer = dfu_get_buf(dfu_entity);
-+	struct dfu_entity *dfu_entity;
-+	void *transfer_buffer;
- 	int ret;
- 
- 	debug("%s: left: %llu cnt: %d\n", __func__, left, cnt);
- 
-+	dfu_entity = dfu_get_entity(alt_setting_num);
-+	if (!dfu_entity) {
-+		error("Alt setting: %d entity not found!\n", alt_setting_num);
-+		return -ENOENT;
-+	}
-+
-+	transfer_buffer = dfu_get_buf(dfu_entity);
-+	if (!transfer_buffer) {
-+		error("Transfer buffer not allocated!");
-+		return -ENXIO;
-+	}
-+
- 	if (left) {
- 		ret = dfu_write(dfu_entity, transfer_buffer, left, cnt++);
- 		if (ret) {
-diff -ruN u-boot-2015.01-rc3/drivers/usb/gadget/g_dnl.c u-boot/drivers/usb/gadget/g_dnl.c
---- u-boot-2015.01-rc3/drivers/usb/gadget/g_dnl.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/usb/gadget/g_dnl.c	2015-01-01 17:34:32.709495776 +0100
-@@ -163,6 +163,23 @@
- 	return -EOPNOTSUPP;
- }
- 
-+static bool g_dnl_detach_request;
-+
-+bool g_dnl_detach(void)
-+{
-+	return g_dnl_detach_request;
-+}
-+
-+void g_dnl_trigger_detach(void)
-+{
-+	g_dnl_detach_request = true;
-+}
-+
-+void g_dnl_clear_detach(void)
-+{
-+	g_dnl_detach_request = false;
-+}
-+
- static int g_dnl_get_bcd_device_number(struct usb_composite_dev *cdev)
- {
- 	struct usb_gadget *gadget = cdev->gadget;
-diff -ruN u-boot-2015.01-rc3/drivers/usb/host/ehci-fsl.c u-boot/drivers/usb/host/ehci-fsl.c
---- u-boot-2015.01-rc3/drivers/usb/host/ehci-fsl.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/usb/host/ehci-fsl.c	2015-01-01 17:34:32.713495710 +0100
-@@ -15,9 +15,14 @@
- #include <usb/ehci-fsl.h>
- #include <hwconfig.h>
- #include <fsl_usb.h>
-+#include <fdt_support.h>
- 
- #include "ehci.h"
- 
-+#ifndef CONFIG_USB_MAX_CONTROLLER_COUNT
-+#define CONFIG_USB_MAX_CONTROLLER_COUNT 1
-+#endif
-+
- static void set_txfifothresh(struct usb_ehci *, u32);
- 
- /* Check USB PHY clock valid */
-@@ -158,3 +163,184 @@
- 	cmd |= TXFIFO_THRESH(txfifo_thresh);
- 	ehci_writel(&ehci->txfilltuning, cmd);
- }
-+
-+#if defined(CONFIG_HAS_FSL_DR_USB) || defined(CONFIG_HAS_FSL_MPH_USB)
-+static int fdt_fixup_usb_mode_phy_type(void *blob, const char *mode,
-+				       const char *phy_type, int start_offset)
-+{
-+	const char *compat_dr = "fsl-usb2-dr";
-+	const char *compat_mph = "fsl-usb2-mph";
-+	const char *prop_mode = "dr_mode";
-+	const char *prop_type = "phy_type";
-+	const char *node_type = NULL;
-+	int node_offset;
-+	int err;
-+
-+	node_offset = fdt_node_offset_by_compatible(blob,
-+						    start_offset, compat_mph);
-+	if (node_offset < 0) {
-+		node_offset = fdt_node_offset_by_compatible(blob,
-+							    start_offset,
-+							    compat_dr);
-+		if (node_offset < 0) {
-+			printf("WARNING: could not find compatible node: %s",
-+			       fdt_strerror(node_offset));
-+			return -1;
-+		}
-+		node_type = compat_dr;
-+	} else {
-+		node_type = compat_mph;
-+	}
-+
-+	if (mode) {
-+		err = fdt_setprop(blob, node_offset, prop_mode, mode,
-+				  strlen(mode) + 1);
-+		if (err < 0)
-+			printf("WARNING: could not set %s for %s: %s.\n",
-+			       prop_mode, node_type, fdt_strerror(err));
-+	}
-+
-+	if (phy_type) {
-+		err = fdt_setprop(blob, node_offset, prop_type, phy_type,
-+				  strlen(phy_type) + 1);
-+		if (err < 0)
-+			printf("WARNING: could not set %s for %s: %s.\n",
-+			       prop_type, node_type, fdt_strerror(err));
-+	}
-+
-+	return node_offset;
-+}
-+
-+static const char *fdt_usb_get_node_type(void *blob, int start_offset,
-+					 int *node_offset)
-+{
-+	const char *compat_dr = "fsl-usb2-dr";
-+	const char *compat_mph = "fsl-usb2-mph";
-+	const char *node_type = NULL;
-+
-+	*node_offset = fdt_node_offset_by_compatible(blob, start_offset,
-+						     compat_mph);
-+	if (*node_offset < 0) {
-+		*node_offset = fdt_node_offset_by_compatible(blob,
-+							     start_offset,
-+							     compat_dr);
-+		if (*node_offset < 0) {
-+			printf("ERROR: could not find compatible node: %s\n",
-+			       fdt_strerror(*node_offset));
-+		} else {
-+			node_type = compat_dr;
-+		}
-+	} else {
-+		node_type = compat_mph;
-+	}
-+
-+	return node_type;
-+}
-+
-+static int fdt_fixup_usb_erratum(void *blob, const char *prop_erratum,
-+				 int start_offset)
-+{
-+	int node_offset, err;
-+	const char *node_type = NULL;
-+
-+	node_type = fdt_usb_get_node_type(blob, start_offset, &node_offset);
-+	if (!node_type)
-+		return -1;
-+
-+	err = fdt_setprop(blob, node_offset, prop_erratum, NULL, 0);
-+	if (err < 0) {
-+		printf("ERROR: could not set %s for %s: %s.\n",
-+		       prop_erratum, node_type, fdt_strerror(err));
-+	}
-+
-+	return node_offset;
-+}
-+
-+void fdt_fixup_dr_usb(void *blob, bd_t *bd)
-+{
-+	static const char * const modes[] = { "host", "peripheral", "otg" };
-+	static const char * const phys[] = { "ulpi", "utmi" };
-+	int usb_erratum_a006261_off = -1;
-+	int usb_erratum_a007075_off = -1;
-+	int usb_erratum_a007792_off = -1;
-+	int usb_mode_off = -1;
-+	int usb_phy_off = -1;
-+	char str[5];
-+	int i, j;
-+
-+	for (i = 1; i <= CONFIG_USB_MAX_CONTROLLER_COUNT; i++) {
-+		const char *dr_mode_type = NULL;
-+		const char *dr_phy_type = NULL;
-+		int mode_idx = -1, phy_idx = -1;
-+
-+		snprintf(str, 5, "%s%d", "usb", i);
-+		if (hwconfig(str)) {
-+			for (j = 0; j < ARRAY_SIZE(modes); j++) {
-+				if (hwconfig_subarg_cmp(str, "dr_mode",
-+							modes[j])) {
-+					mode_idx = j;
-+					break;
-+				}
-+			}
-+
-+			for (j = 0; j < ARRAY_SIZE(phys); j++) {
-+				if (hwconfig_subarg_cmp(str, "phy_type",
-+							phys[j])) {
-+					phy_idx = j;
-+					break;
-+				}
-+			}
-+
-+			if (mode_idx < 0 && phy_idx < 0) {
-+				printf("WARNING: invalid phy or mode\n");
-+				return;
-+			}
-+
-+			if (mode_idx > -1)
-+				dr_mode_type = modes[mode_idx];
-+
-+			if (phy_idx > -1)
-+				dr_phy_type = phys[phy_idx];
-+		}
-+
-+		usb_mode_off = fdt_fixup_usb_mode_phy_type(blob,
-+							   dr_mode_type, NULL,
-+							   usb_mode_off);
-+
-+		if (usb_mode_off < 0)
-+			return;
-+
-+		usb_phy_off = fdt_fixup_usb_mode_phy_type(blob,
-+							  NULL, dr_phy_type,
-+							  usb_phy_off);
-+
-+		if (usb_phy_off < 0)
-+			return;
-+
-+		if (has_erratum_a006261()) {
-+			usb_erratum_a006261_off =  fdt_fixup_usb_erratum
-+						   (blob,
-+						    "fsl,usb-erratum-a006261",
-+						    usb_erratum_a006261_off);
-+			if (usb_erratum_a006261_off < 0)
-+				return;
-+		}
-+		if (has_erratum_a007075()) {
-+			usb_erratum_a007075_off =  fdt_fixup_usb_erratum
-+						   (blob,
-+						    "fsl,usb-erratum-a007075",
-+						    usb_erratum_a007075_off);
-+			if (usb_erratum_a007075_off < 0)
-+				return;
-+		}
-+		if (has_erratum_a007792()) {
-+			usb_erratum_a007792_off =  fdt_fixup_usb_erratum
-+						   (blob,
-+						    "fsl,usb-erratum-a007792",
-+						    usb_erratum_a007792_off);
-+			if (usb_erratum_a007792_off < 0)
-+				return;
-+		}
-+	}
-+}
-+#endif
-diff -ruN u-boot-2015.01-rc3/drivers/usb/host/ehci-hcd.c u-boot/drivers/usb/host/ehci-hcd.c
---- u-boot-2015.01-rc3/drivers/usb/host/ehci-hcd.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/usb/host/ehci-hcd.c	2015-01-01 17:34:32.713495710 +0100
-@@ -971,7 +971,6 @@
- 	qh_list->qh_link = cpu_to_hc32((uint32_t)qh_list | QH_LINK_TYPE_QH);
- 	qh_list->qh_endpt1 = cpu_to_hc32(QH_ENDPT1_H(1) |
- 						QH_ENDPT1_EPS(USB_SPEED_HIGH));
--	qh_list->qh_curtd = cpu_to_hc32(QT_NEXT_TERMINATE);
- 	qh_list->qh_overlay.qt_next = cpu_to_hc32(QT_NEXT_TERMINATE);
- 	qh_list->qh_overlay.qt_altnext = cpu_to_hc32(QT_NEXT_TERMINATE);
- 	qh_list->qh_overlay.qt_token =
-diff -ruN u-boot-2015.01-rc3/drivers/usb/host/ehci-mx6.c u-boot/drivers/usb/host/ehci-mx6.c
---- u-boot-2015.01-rc3/drivers/usb/host/ehci-mx6.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/usb/host/ehci-mx6.c	2015-01-01 17:34:32.713495710 +0100
-@@ -160,7 +160,7 @@
- 	val |= (USBPHY_CTRL_ENUTMILEVEL2 | USBPHY_CTRL_ENUTMILEVEL3);
- 	__raw_writel(val, phy_ctrl);
- 
--	return val & USBPHY_CTRL_OTG_ID;
-+	return 0;
- }
- 
- /* Base address for this IP block is 0x02184800 */
-@@ -193,6 +193,28 @@
- 	__raw_writel(val, ctrl);
- }
- 
-+int usb_phy_mode(int port)
-+{
-+	void __iomem *phy_reg;
-+	void __iomem *phy_ctrl;
-+	u32 val;
-+
-+	phy_reg = (void __iomem *)phy_bases[port];
-+	phy_ctrl = (void __iomem *)(phy_reg + USBPHY_CTRL);
-+
-+	val = __raw_readl(phy_ctrl);
-+
-+	if (val & USBPHY_CTRL_OTG_ID)
-+		return USB_INIT_DEVICE;
-+	else
-+		return USB_INIT_HOST;
-+}
-+
-+int __weak board_usb_phy_mode(int port)
-+{
-+	return usb_phy_mode(port);
-+}
-+
- int __weak board_ehci_hcd_init(int port)
- {
- 	return 0;
-@@ -221,7 +243,8 @@
- 	usb_power_config(index);
- 	usb_oc_config(index);
- 	usb_internal_phy_clock_gate(index, 1);
--	type = usb_phy_enable(index, ehci) ? USB_INIT_DEVICE : USB_INIT_HOST;
-+	usb_phy_enable(index, ehci);
-+	type = board_usb_phy_mode(index);
- 
- 	*hccr = (struct ehci_hccr *)((uint32_t)&ehci->caplength);
- 	*hcor = (struct ehci_hcor *)((uint32_t)*hccr +
-diff -ruN u-boot-2015.01-rc3/.git/config u-boot/.git/config
---- u-boot-2015.01-rc3/.git/config	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/.git/config	2015-01-01 17:34:31.953508170 +0100
-@@ -0,0 +1,11 @@
-+[core]
-+	repositoryformatversion = 0
-+	filemode = true
-+	bare = false
-+	logallrefupdates = true
-+[remote "origin"]
-+	fetch = +refs/heads/*:refs/remotes/origin/*
-+	url = git://git.denx.de/u-boot.git
-+[branch "master"]
-+	remote = origin
-+	merge = refs/heads/master
-diff -ruN u-boot-2015.01-rc3/.git/description u-boot/.git/description
---- u-boot-2015.01-rc3/.git/description	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/.git/description	2015-01-01 17:34:05.785937163 +0100
-@@ -0,0 +1 @@
-+Unnamed repository; edit this file 'description' to name the repository.
-diff -ruN u-boot-2015.01-rc3/.git/HEAD u-boot/.git/HEAD
---- u-boot-2015.01-rc3/.git/HEAD	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/.git/HEAD	2015-01-01 17:34:31.953508170 +0100
-@@ -0,0 +1 @@
-+ref: refs/heads/master
-diff -ruN u-boot-2015.01-rc3/.git/hooks/applypatch-msg.sample u-boot/.git/hooks/applypatch-msg.sample
---- u-boot-2015.01-rc3/.git/hooks/applypatch-msg.sample	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/.git/hooks/applypatch-msg.sample	2015-01-01 17:34:05.793937033 +0100
-@@ -0,0 +1,15 @@
-+#!/bin/sh
-+#
-+# An example hook script to check the commit log message taken by
-+# applypatch from an e-mail message.
-+#
-+# The hook should exit with non-zero status after issuing an
-+# appropriate message if it wants to stop the commit.  The hook is
-+# allowed to edit the commit message file.
-+#
-+# To enable this hook, rename this file to "applypatch-msg".
-+
-+. git-sh-setup
-+test -x "$GIT_DIR/hooks/commit-msg" &&
-+	exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"}
-+:
-diff -ruN u-boot-2015.01-rc3/.git/hooks/commit-msg.sample u-boot/.git/hooks/commit-msg.sample
---- u-boot-2015.01-rc3/.git/hooks/commit-msg.sample	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/.git/hooks/commit-msg.sample	2015-01-01 17:34:05.793937033 +0100
-@@ -0,0 +1,24 @@
-+#!/bin/sh
-+#
-+# An example hook script to check the commit log message.
-+# Called by "git commit" with one argument, the name of the file
-+# that has the commit message.  The hook should exit with non-zero
-+# status after issuing an appropriate message if it wants to stop the
-+# commit.  The hook is allowed to edit the commit message file.
-+#
-+# To enable this hook, rename this file to "commit-msg".
-+
-+# Uncomment the below to add a Signed-off-by line to the message.
-+# Doing this in a hook is a bad idea in general, but the prepare-commit-msg
-+# hook is more suited to it.
-+#
-+# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
-+# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
-+
-+# This example catches duplicate Signed-off-by lines.
-+
-+test "" = "$(grep '^Signed-off-by: ' "$1" |
-+	 sort | uniq -c | sed -e '/^[ 	]*1[ 	]/d')" || {
-+	echo >&2 Duplicate Signed-off-by lines.
-+	exit 1
-+}
-diff -ruN u-boot-2015.01-rc3/.git/hooks/post-update.sample u-boot/.git/hooks/post-update.sample
---- u-boot-2015.01-rc3/.git/hooks/post-update.sample	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/.git/hooks/post-update.sample	2015-01-01 17:34:05.797936967 +0100
-@@ -0,0 +1,8 @@
-+#!/bin/sh
-+#
-+# An example hook script to prepare a packed repository for use over
-+# dumb transports.
-+#
-+# To enable this hook, rename this file to "post-update".
-+
-+exec git update-server-info
-diff -ruN u-boot-2015.01-rc3/.git/hooks/pre-applypatch.sample u-boot/.git/hooks/pre-applypatch.sample
---- u-boot-2015.01-rc3/.git/hooks/pre-applypatch.sample	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/.git/hooks/pre-applypatch.sample	2015-01-01 17:34:05.793937033 +0100
-@@ -0,0 +1,14 @@
-+#!/bin/sh
-+#
-+# An example hook script to verify what is about to be committed
-+# by applypatch from an e-mail message.
-+#
-+# The hook should exit with non-zero status after issuing an
-+# appropriate message if it wants to stop the commit.
-+#
-+# To enable this hook, rename this file to "pre-applypatch".
-+
-+. git-sh-setup
-+test -x "$GIT_DIR/hooks/pre-commit" &&
-+	exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"}
-+:
-diff -ruN u-boot-2015.01-rc3/.git/hooks/pre-commit.sample u-boot/.git/hooks/pre-commit.sample
---- u-boot-2015.01-rc3/.git/hooks/pre-commit.sample	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/.git/hooks/pre-commit.sample	2015-01-01 17:34:05.793937033 +0100
-@@ -0,0 +1,50 @@
-+#!/bin/sh
-+#
-+# An example hook script to verify what is about to be committed.
-+# Called by "git commit" with no arguments.  The hook should
-+# exit with non-zero status after issuing an appropriate message if
-+# it wants to stop the commit.
-+#
-+# To enable this hook, rename this file to "pre-commit".
-+
-+if git rev-parse --verify HEAD >/dev/null 2>&1
-+then
-+	against=HEAD
-+else
-+	# Initial commit: diff against an empty tree object
-+	against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
-+fi
-+
-+# If you want to allow non-ascii filenames set this variable to true.
-+allownonascii=$(git config hooks.allownonascii)
-+
-+# Redirect output to stderr.
-+exec 1>&2
-+
-+# Cross platform projects tend to avoid non-ascii filenames; prevent
-+# them from being added to the repository. We exploit the fact that the
-+# printable range starts at the space character and ends with tilde.
-+if [ "$allownonascii" != "true" ] &&
-+	# Note that the use of brackets around a tr range is ok here, (it's
-+	# even required, for portability to Solaris 10's /usr/bin/tr), since
-+	# the square bracket bytes happen to fall in the designated range.
-+	test $(git diff --cached --name-only --diff-filter=A -z $against |
-+	  LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0
-+then
-+	echo "Error: Attempt to add a non-ascii file name."
-+	echo
-+	echo "This can cause problems if you want to work"
-+	echo "with people on other platforms."
-+	echo
-+	echo "To be portable it is advisable to rename the file ..."
-+	echo
-+	echo "If you know what you are doing you can disable this"
-+	echo "check using:"
-+	echo
-+	echo "  git config hooks.allownonascii true"
-+	echo
-+	exit 1
-+fi
-+
-+# If there are whitespace errors, print the offending file names and fail.
-+exec git diff-index --check --cached $against --
-diff -ruN u-boot-2015.01-rc3/.git/hooks/prepare-commit-msg.sample u-boot/.git/hooks/prepare-commit-msg.sample
---- u-boot-2015.01-rc3/.git/hooks/prepare-commit-msg.sample	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/.git/hooks/prepare-commit-msg.sample	2015-01-01 17:34:05.801936901 +0100
-@@ -0,0 +1,36 @@
-+#!/bin/sh
-+#
-+# An example hook script to prepare the commit log message.
-+# Called by "git commit" with the name of the file that has the
-+# commit message, followed by the description of the commit
-+# message's source.  The hook's purpose is to edit the commit
-+# message file.  If the hook fails with a non-zero status,
-+# the commit is aborted.
-+#
-+# To enable this hook, rename this file to "prepare-commit-msg".
-+
-+# This hook includes three examples.  The first comments out the
-+# "Conflicts:" part of a merge commit.
-+#
-+# The second includes the output of "git diff --name-status -r"
-+# into the message, just before the "git status" output.  It is
-+# commented because it doesn't cope with --amend or with squashed
-+# commits.
-+#
-+# The third example adds a Signed-off-by line to the message, that can
-+# still be edited.  This is rarely a good idea.
-+
-+case "$2,$3" in
-+  merge,)
-+    /usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;;
-+
-+# ,|template,)
-+#   /usr/bin/perl -i.bak -pe '
-+#      print "\n" . `git diff --cached --name-status -r`
-+#	 if /^#/ && $first++ == 0' "$1" ;;
-+
-+  *) ;;
-+esac
-+
-+# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
-+# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
-diff -ruN u-boot-2015.01-rc3/.git/hooks/pre-rebase.sample u-boot/.git/hooks/pre-rebase.sample
---- u-boot-2015.01-rc3/.git/hooks/pre-rebase.sample	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/.git/hooks/pre-rebase.sample	2015-01-01 17:34:05.801936901 +0100
-@@ -0,0 +1,169 @@
-+#!/bin/sh
-+#
-+# Copyright (c) 2006, 2008 Junio C Hamano
-+#
-+# The "pre-rebase" hook is run just before "git rebase" starts doing
-+# its job, and can prevent the command from running by exiting with
-+# non-zero status.
-+#
-+# The hook is called with the following parameters:
-+#
-+# $1 -- the upstream the series was forked from.
-+# $2 -- the branch being rebased (or empty when rebasing the current branch).
-+#
-+# This sample shows how to prevent topic branches that are already
-+# merged to 'next' branch from getting rebased, because allowing it
-+# would result in rebasing already published history.
-+
-+publish=next
-+basebranch="$1"
-+if test "$#" = 2
-+then
-+	topic="refs/heads/$2"
-+else
-+	topic=`git symbolic-ref HEAD` ||
-+	exit 0 ;# we do not interrupt rebasing detached HEAD
-+fi
-+
-+case "$topic" in
-+refs/heads/??/*)
-+	;;
-+*)
-+	exit 0 ;# we do not interrupt others.
-+	;;
-+esac
-+
-+# Now we are dealing with a topic branch being rebased
-+# on top of master.  Is it OK to rebase it?
-+
-+# Does the topic really exist?
-+git show-ref -q "$topic" || {
-+	echo >&2 "No such branch $topic"
-+	exit 1
-+}
-+
-+# Is topic fully merged to master?
-+not_in_master=`git rev-list --pretty=oneline ^master "$topic"`
-+if test -z "$not_in_master"
-+then
-+	echo >&2 "$topic is fully merged to master; better remove it."
-+	exit 1 ;# we could allow it, but there is no point.
-+fi
-+
-+# Is topic ever merged to next?  If so you should not be rebasing it.
-+only_next_1=`git rev-list ^master "^$topic" ${publish} | sort`
-+only_next_2=`git rev-list ^master           ${publish} | sort`
-+if test "$only_next_1" = "$only_next_2"
-+then
-+	not_in_topic=`git rev-list "^$topic" master`
-+	if test -z "$not_in_topic"
-+	then
-+		echo >&2 "$topic is already up-to-date with master"
-+		exit 1 ;# we could allow it, but there is no point.
-+	else
-+		exit 0
-+	fi
-+else
-+	not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"`
-+	/usr/bin/perl -e '
-+		my $topic = $ARGV[0];
-+		my $msg = "* $topic has commits already merged to public branch:\n";
-+		my (%not_in_next) = map {
-+			/^([0-9a-f]+) /;
-+			($1 => 1);
-+		} split(/\n/, $ARGV[1]);
-+		for my $elem (map {
-+				/^([0-9a-f]+) (.*)$/;
-+				[$1 => $2];
-+			} split(/\n/, $ARGV[2])) {
-+			if (!exists $not_in_next{$elem->[0]}) {
-+				if ($msg) {
-+					print STDERR $msg;
-+					undef $msg;
-+				}
-+				print STDERR " $elem->[1]\n";
-+			}
-+		}
-+	' "$topic" "$not_in_next" "$not_in_master"
-+	exit 1
-+fi
-+
-+<<\DOC_END
-+
-+This sample hook safeguards topic branches that have been
-+published from being rewound.
-+
-+The workflow assumed here is:
-+
-+ * Once a topic branch forks from "master", "master" is never
-+   merged into it again (either directly or indirectly).
-+
-+ * Once a topic branch is fully cooked and merged into "master",
-+   it is deleted.  If you need to build on top of it to correct
-+   earlier mistakes, a new topic branch is created by forking at
-+   the tip of the "master".  This is not strictly necessary, but
-+   it makes it easier to keep your history simple.
-+
-+ * Whenever you need to test or publish your changes to topic
-+   branches, merge them into "next" branch.
-+
-+The script, being an example, hardcodes the publish branch name
-+to be "next", but it is trivial to make it configurable via
-+$GIT_DIR/config mechanism.
-+
-+With this workflow, you would want to know:
-+
-+(1) ... if a topic branch has ever been merged to "next".  Young
-+    topic branches can have stupid mistakes you would rather
-+    clean up before publishing, and things that have not been
-+    merged into other branches can be easily rebased without
-+    affecting other people.  But once it is published, you would
-+    not want to rewind it.
-+
-+(2) ... if a topic branch has been fully merged to "master".
-+    Then you can delete it.  More importantly, you should not
-+    build on top of it -- other people may already want to
-+    change things related to the topic as patches against your
-+    "master", so if you need further changes, it is better to
-+    fork the topic (perhaps with the same name) afresh from the
-+    tip of "master".
-+
-+Let's look at this example:
-+
-+		   o---o---o---o---o---o---o---o---o---o "next"
-+		  /       /           /           /
-+		 /   a---a---b A     /           /
-+		/   /               /           /
-+	       /   /   c---c---c---c B         /
-+	      /   /   /             \         /
-+	     /   /   /   b---b C     \       /
-+	    /   /   /   /             \     /
-+    ---o---o---o---o---o---o---o---o---o---o---o "master"
-+
-+
-+A, B and C are topic branches.
-+
-+ * A has one fix since it was merged up to "next".
-+
-+ * B has finished.  It has been fully merged up to "master" and "next",
-+   and is ready to be deleted.
-+
-+ * C has not merged to "next" at all.
-+
-+We would want to allow C to be rebased, refuse A, and encourage
-+B to be deleted.
-+
-+To compute (1):
-+
-+	git rev-list ^master ^topic next
-+	git rev-list ^master        next
-+
-+	if these match, topic has not merged in next at all.
-+
-+To compute (2):
-+
-+	git rev-list master..topic
-+
-+	if this is empty, it is fully merged to "master".
-+
-+DOC_END
-diff -ruN u-boot-2015.01-rc3/.git/hooks/update.sample u-boot/.git/hooks/update.sample
---- u-boot-2015.01-rc3/.git/hooks/update.sample	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/.git/hooks/update.sample	2015-01-01 17:34:05.793937033 +0100
-@@ -0,0 +1,128 @@
-+#!/bin/sh
-+#
-+# An example hook script to blocks unannotated tags from entering.
-+# Called by "git receive-pack" with arguments: refname sha1-old sha1-new
-+#
-+# To enable this hook, rename this file to "update".
-+#
-+# Config
-+# ------
-+# hooks.allowunannotated
-+#   This boolean sets whether unannotated tags will be allowed into the
-+#   repository.  By default they won't be.
-+# hooks.allowdeletetag
-+#   This boolean sets whether deleting tags will be allowed in the
-+#   repository.  By default they won't be.
-+# hooks.allowmodifytag
-+#   This boolean sets whether a tag may be modified after creation. By default
-+#   it won't be.
-+# hooks.allowdeletebranch
-+#   This boolean sets whether deleting branches will be allowed in the
-+#   repository.  By default they won't be.
-+# hooks.denycreatebranch
-+#   This boolean sets whether remotely creating branches will be denied
-+#   in the repository.  By default this is allowed.
-+#
-+
-+# --- Command line
-+refname="$1"
-+oldrev="$2"
-+newrev="$3"
-+
-+# --- Safety check
-+if [ -z "$GIT_DIR" ]; then
-+	echo "Don't run this script from the command line." >&2
-+	echo " (if you want, you could supply GIT_DIR then run" >&2
-+	echo "  $0 <ref> <oldrev> <newrev>)" >&2
-+	exit 1
-+fi
-+
-+if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then
-+	echo "Usage: $0 <ref> <oldrev> <newrev>" >&2
-+	exit 1
-+fi
-+
-+# --- Config
-+allowunannotated=$(git config --bool hooks.allowunannotated)
-+allowdeletebranch=$(git config --bool hooks.allowdeletebranch)
-+denycreatebranch=$(git config --bool hooks.denycreatebranch)
-+allowdeletetag=$(git config --bool hooks.allowdeletetag)
-+allowmodifytag=$(git config --bool hooks.allowmodifytag)
-+
-+# check for no description
-+projectdesc=$(sed -e '1q' "$GIT_DIR/description")
-+case "$projectdesc" in
-+"Unnamed repository"* | "")
-+	echo "*** Project description file hasn't been set" >&2
-+	exit 1
-+	;;
-+esac
-+
-+# --- Check types
-+# if $newrev is 0000...0000, it's a commit to delete a ref.
-+zero="0000000000000000000000000000000000000000"
-+if [ "$newrev" = "$zero" ]; then
-+	newrev_type=delete
-+else
-+	newrev_type=$(git cat-file -t $newrev)
-+fi
-+
-+case "$refname","$newrev_type" in
-+	refs/tags/*,commit)
-+		# un-annotated tag
-+		short_refname=${refname##refs/tags/}
-+		if [ "$allowunannotated" != "true" ]; then
-+			echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2
-+			echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2
-+			exit 1
-+		fi
-+		;;
-+	refs/tags/*,delete)
-+		# delete tag
-+		if [ "$allowdeletetag" != "true" ]; then
-+			echo "*** Deleting a tag is not allowed in this repository" >&2
-+			exit 1
-+		fi
-+		;;
-+	refs/tags/*,tag)
-+		# annotated tag
-+		if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1
-+		then
-+			echo "*** Tag '$refname' already exists." >&2
-+			echo "*** Modifying a tag is not allowed in this repository." >&2
-+			exit 1
-+		fi
-+		;;
-+	refs/heads/*,commit)
-+		# branch
-+		if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then
-+			echo "*** Creating a branch is not allowed in this repository" >&2
-+			exit 1
-+		fi
-+		;;
-+	refs/heads/*,delete)
-+		# delete branch
-+		if [ "$allowdeletebranch" != "true" ]; then
-+			echo "*** Deleting a branch is not allowed in this repository" >&2
-+			exit 1
-+		fi
-+		;;
-+	refs/remotes/*,commit)
-+		# tracking branch
-+		;;
-+	refs/remotes/*,delete)
-+		# delete tracking branch
-+		if [ "$allowdeletebranch" != "true" ]; then
-+			echo "*** Deleting a tracking branch is not allowed in this repository" >&2
-+			exit 1
-+		fi
-+		;;
-+	*)
-+		# Anything else (is there anything else?)
-+		echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2
-+		exit 1
-+		;;
-+esac
-+
-+# --- Finished
-+exit 0
-Binary files u-boot-2015.01-rc3/.git/index and u-boot/.git/index differ
-diff -ruN u-boot-2015.01-rc3/.git/info/exclude u-boot/.git/info/exclude
---- u-boot-2015.01-rc3/.git/info/exclude	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/.git/info/exclude	2015-01-01 17:34:05.789937097 +0100
-@@ -0,0 +1,6 @@
-+# git ls-files --others --exclude-from=.git/info/exclude
-+# Lines that start with '#' are comments.
-+# For a project mostly in C, the following would be a good set of
-+# exclude patterns (uncomment them if you want to use them):
-+# *.[oa]
-+# *~
-diff -ruN u-boot-2015.01-rc3/.git/logs/HEAD u-boot/.git/logs/HEAD
---- u-boot-2015.01-rc3/.git/logs/HEAD	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/.git/logs/HEAD	2015-01-01 17:34:31.953508170 +0100
-@@ -0,0 +1 @@
-+0000000000000000000000000000000000000000 125738e819a3b9d15210794b3dcef9f4d9bcf866 Zoltan HERPAI <wigyori at uid0.hu> 1420130071 +0100	clone: from git://git.denx.de/u-boot.git
-diff -ruN u-boot-2015.01-rc3/.git/logs/refs/heads/master u-boot/.git/logs/refs/heads/master
---- u-boot-2015.01-rc3/.git/logs/refs/heads/master	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/.git/logs/refs/heads/master	2015-01-01 17:34:31.953508170 +0100
-@@ -0,0 +1 @@
-+0000000000000000000000000000000000000000 125738e819a3b9d15210794b3dcef9f4d9bcf866 Zoltan HERPAI <wigyori at uid0.hu> 1420130071 +0100	clone: from git://git.denx.de/u-boot.git
-diff -ruN u-boot-2015.01-rc3/.git/logs/refs/remotes/origin/HEAD u-boot/.git/logs/refs/remotes/origin/HEAD
---- u-boot-2015.01-rc3/.git/logs/refs/remotes/origin/HEAD	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/.git/logs/refs/remotes/origin/HEAD	2015-01-01 17:34:31.953508170 +0100
-@@ -0,0 +1 @@
-+0000000000000000000000000000000000000000 125738e819a3b9d15210794b3dcef9f4d9bcf866 Zoltan HERPAI <wigyori at uid0.hu> 1420130071 +0100	clone: from git://git.denx.de/u-boot.git
-Binary files u-boot-2015.01-rc3/.git/objects/pack/pack-e62dd83e4128e234ff5dabb586722d23d1bae06c.idx and u-boot/.git/objects/pack/pack-e62dd83e4128e234ff5dabb586722d23d1bae06c.idx differ
-Binary files u-boot-2015.01-rc3/.git/objects/pack/pack-e62dd83e4128e234ff5dabb586722d23d1bae06c.pack and u-boot/.git/objects/pack/pack-e62dd83e4128e234ff5dabb586722d23d1bae06c.pack differ
-diff -ruN u-boot-2015.01-rc3/.git/packed-refs u-boot/.git/packed-refs
---- u-boot-2015.01-rc3/.git/packed-refs	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/.git/packed-refs	2015-01-01 17:34:31.865509612 +0100
-@@ -0,0 +1,388 @@
-+# pack-refs with: peeled 
-+125738e819a3b9d15210794b3dcef9f4d9bcf866 refs/remotes/origin/master
-+ece0d370144fdecb6f3ed5738ffe96f5b12f9e96 refs/remotes/origin/next
-+cd5b2b9941d5b6f6596787ebdb03c215d91fc44d refs/remotes/origin/origin
-+f20393c5e787b3776c179d20f82a86bda124d651 refs/remotes/origin/u-boot-2009.11.y
-+e8ae0fa5edd152b2b29c470b88429be4cdcd2c46 refs/remotes/origin/u-boot-2013.01.y
-+be360d9824d653780ebd3ffc08f1938a8e3dd747 refs/tags/DENX-2005-10-29-2350
-+384ae02506f0673070a3516b1858f058a07f85f3 refs/tags/LABEL_2002_11_05_0120
-+56f94be3ef63732384063e110277ed89701b6471 refs/tags/LABEL_2002_11_05_1735
-+7f6c2cbc2bc0721c41bb776242c0b18ec70328e4 refs/tags/LABEL_2002_11_10_2310
-+1d0350ed0b1b0f63e3fb5db6b19397b84a2ea1c7 refs/tags/LABEL_2002_11_11_2211
-+2262cfeef91458b01a1bfe3812ccbbfdf8b82807 refs/tags/LABEL_2002_11_18_0115
-+ea909b7604306a400ee3abf57e2fa7b2dde5dde1 refs/tags/LABEL_2002_11_22_0015
-+a6c7ad2f65afaa717ba19cbf9d8d138b5f10ccf9 refs/tags/LABEL_2002_12_03_2230
-+7c7a23bd5a0bc149d2edd665ec46381726b24e0c refs/tags/LABEL_2002_12_07_0120
-+288b3d7f5a54c987ecdfc5add4c7c25d36a9a3e1 refs/tags/LABEL_2002_12_21_0040
-+13122b4f1d6d00d6d4993ef56d9b5c5bd24f431e refs/tags/LABEL_2002_12_28_1700
-+d0fb80c3021e15853895e9ae45ab9368d0fb52fa refs/tags/LABEL_2003_01_11_1050
-+608c91460b37fd9fe0088a0ce813a443f116a8d5 refs/tags/LABEL_2003_01_14_0055
-+6069ff265362ef6239749b5f598b137f407b821e refs/tags/LABEL_2003_02_28_0150
-+43d9616cffb4a130e1620e3e33fc9bc1bcabe399 refs/tags/LABEL_2003_03_06_0050
-+db2f721ffcf9693086a7e5c6c7015f2019e7f52e refs/tags/LABEL_2003_03_06_0200
-+500545cc6b83958209128bffa825b3c842a21a4e refs/tags/LABEL_2003_03_06_1440
-+1cb8e980c41e86760fa93de63f4e4cf643bef9d9 refs/tags/LABEL_2003_03_06_2255
-+1957dd29d980ecb197c3a6dbe4f6609dae135a1d refs/tags/LABEL_2003_03_14_2150
-+10f670178cce29d7f078ca622f0eeafd6903748a refs/tags/LABEL_2003_03_25_1830
-+ac6dbb85b7f080d923013bff4e1d5267cb6f8a5a refs/tags/LABEL_2003_03_26_1300
-+cdd8a0f1517b89349265465bf334db32e2304b45 refs/tags/LABEL_2003_03_27_1900
-+3e38691e8f7aa0d9b498d76c7279ddec6e4946f3 refs/tags/LABEL_2003_04_05_0300
-+4a6fd34b267dbf4a72080ab9a085bb45c63660fb refs/tags/LABEL_2003_04_15_1900
-+7aa78614716b7bd7bdf68553f261ad0d5a12826a refs/tags/LABEL_2003_05_03_1700
-+45219c46605f9b933ab454738ee4ce543d5b70d6 refs/tags/LABEL_2003_05_12_2355
-+7f70e85309c6367138c0ebd14abdd49964b8d50a refs/tags/LABEL_2003_05_20_1630
-+82226bf4d2fe87076d7f5d7e2677fdd5d0e35fc2 refs/tags/LABEL_2003_05_20_2250
-+c8c3a8be2dd09e51d7dc33f431e3a638ac5688f2 refs/tags/LABEL_2003_05_22_2230
-+5d232d0e7ea982d859d028ab482d95eb68460b19 refs/tags/LABEL_2003_05_23_0055
-+4c3b21a5f915988e3d9681cf9cb566bb7bd56859 refs/tags/LABEL_2003_05_23_1450
-+3b57fe0a70b903f4db66c558bb9828bc58acf06b refs/tags/LABEL_2003_05_30_1450
-+7a8e9bed17d7924a9c5c4699b1f6a3a0359524ed refs/tags/LABEL_2003_05_31_2115
-+682011ff6968198da14b89e40d9f55b00f6d91f7 refs/tags/LABEL_2003_06_04_0200
-+a3ed3996cdb9fca78329f6aca62d235263b7da90 refs/tags/LABEL_2003_06_05_2140
-+71f9511803de65a3b98d2f592d418da1d1539f13 refs/tags/LABEL_2003_06_16_0055
-+9a0e21a3a87830f66a93c17d1bca66fd12d860ae refs/tags/LABEL_2003_06_22_1530
-+b783edaee8252bfdba3f7b3fd29519a81ce71e42 refs/tags/LABEL_2003_06_26_2220
-+8bde7f776c77b343aca29b8c7b58464d915ac245 refs/tags/LABEL_2003_06_27_2340
-+91a0ce965d5905c37fff45555b7e3113b9359c8f refs/tags/LABEL_2003_06_28_0050-stable
-+ef0630617e0f52dabb2cf7073df281e680073ec1 refs/tags/LABEL_2003_06_28_0130-stable
-+ed579b4210cc5341d511e090239ca697e91ad728 refs/tags/LABEL_2003_06_28_1800-stable
-+eeacb89cb311fe273fef0f20b2bacf589b36f8f4 refs/tags/LABEL_2003_06_29_0145
-+7152b1d0b3f8beec8c297d64664e41b4c4ef610a refs/tags/LABEL_2003_09_06_0055
-+4f7cb08ee7b48a511a9cd2398fd4a243ca2733c7 refs/tags/LABEL_2003_09_12_0110
-+f5300ab241898c490231e59229e6312aa862ce52 refs/tags/LABEL_2003_09_12_1745
-+531716e1710083f91d9fa351f89d18e271b5c577 refs/tags/LABEL_2003_09_13_2100
-+34b3049a60a37e180d73332ccddf706c049a0515 refs/tags/LABEL_2003_09_16_2310
-+80369866a482b923f0398f4c8172865282559f5b refs/tags/LABEL_2003_09_18_2045
-+bb65a312675f3cd1923a5cbe325ad9ca1703fc58 refs/tags/LABEL_2003_10_01_1830
-+fbe4b5cbdea438ccec0d93de443f367f3ba46196 refs/tags/LABEL_2003_10_06_2355
-+a0ff7f2eda50de4d4096265a086c94ac640fab7c refs/tags/LABEL_2003_10_09_1515
-+5da627a424b3ad2d38a81886ba4a18e5123a6788 refs/tags/LABEL_2003_10_09_2320
-+f72da3406bf6f1c1bce9aa03b07d070413a916af refs/tags/LABEL_2003_10_10_1200
-+2d5b561e2bfdee8552a99b2cf93016cce2a74895 refs/tags/LABEL_2003_10_14_2140
-+42d1f0394bef0624fc9664714d54bb137931d6a6 refs/tags/LABEL_2003_10_16_0200
-+d7281f41094bee59eca958de3c04995a2f79034a refs/tags/LABEL_2003_10_20_0025
-+b4757cee52597ab5a67c30a1bf2a3208209e1ccb refs/tags/LABEL_2003_11_26_MKR
-+fa1399ed127c8be507bf182dc7d8d61a54938d79 refs/tags/LABEL_2003_12_06_1550
-+5e4be00fb037feb6476125d044b98e0e22b70d31 refs/tags/LABEL_2004_01_21_2110
-+6876609446980c3055bbd32c195a63330e21d8e6 refs/tags/LABEL_2004_01_29_1030
-+a2d18bb7d31e7b971386fef505ff0218f3b6e893 refs/tags/LABEL_2004_02_11_2240
-+cf56e1101957c09cb4aafcf28a89658c4649c511 refs/tags/LABEL_2004_02_20_2310
-+5cfbab3d822cb690be6d4f1793aab0cea761134c refs/tags/LABEL_2004_02_24_0305
-+232c150a250bb2fcb894b15d67c65df2458e271f refs/tags/LABEL_2004_03_12_0130
-+42dfe7a1844cbad7114038aaf03828acb7a84414 refs/tags/LABEL_2004_03_14_2340
-+d9df1f4e662441c487f96a4e1f91caa9297afdd9 refs/tags/LABEL_2004_03_16_2330
-+b79a11cc2bda7a4d5e00444427a0d06b4e86a990 refs/tags/LABEL_2004_03_25_1630
-+998eaaecd46ee5f00550e30e606cb5556e0b9345 refs/tags/LABEL_2004_04_18_2135
-+5cf91d6bdc3e60bd43f9ba1bbb97a43ee49b2b2d refs/tags/LABEL_2004_04_23_2240
-+e4cc71aa4403c82f0b3e89087024f83832ece9ec refs/tags/LABEL_2004_05_19_2335
-+69459791268d48c7081802dbc7a51d4e42c8a8cd refs/tags/LABEL_2004_05_29_1850
-+021bfcd3c624ce88f739f01ba4220197bdd47a5e refs/tags/LABEL_2004_06_24_1800
-+e94d2cd9d1dc0f58b18e7c31fc9345129b1a44fb refs/tags/LABEL_2004_07_01_1200
-+31a649234ee4051e96cf45285cdf2dbfa668d30c refs/tags/LABEL_2004_08_28_2355
-+7ca202f566a6e9dc3d0dd0216e82ad1a48f50f19 refs/tags/LABEL_2004_08_29_0045
-+eedcd078fe1434d93b84322c4e14c52f80282a41 refs/tags/LABEL_2004_09_09_0000
-+8b74bf31fe57edfc502f94e905977304eac943ca refs/tags/LABEL_2004_10_12_0110
-+14699a22cf47b83995d19877d2b938b2270defc0 refs/tags/LABEL_2004_10_20_0020
-+cacfab588a897c369a4906818c5ed4bc40a450c5 refs/tags/LABEL_2004_11_17_2222
-+ed54e6212518262d27abe5e6de3c608d5ebceafb refs/tags/LABEL_2004_11_25_0035
-+f7d1572bf51619554f278cb543ef0445baa3a1f8 refs/tags/LABEL_2004_12_18_2335
-+bff96b0e6bdf8551e8468b111177c553e4994db2 refs/tags/LABEL_2004_12_19_1100
-+08f272787a93cb11338fd81ab92a7439a361e3b2 refs/tags/LABEL_2004_12_19_2240
-+400ab719c6025c176c50bcdff342384222d7424b refs/tags/LABEL_2004_12_20_1220
-+436be29cad60a46ed5983120aff71909d8f234a3 refs/tags/LABEL_2005_01_31_2245
-+e799d3755e83c70bf8c92977190d1777b390a8de refs/tags/LABEL_2005_02_07_2045
-+b9649854f6ffdeaad23daec21013552cef2e05f0 refs/tags/LABEL_2005_02_08_1615
-+e58cf2a0cfeb357faa134af1e12b96f4109af360 refs/tags/LABEL_2005_02_28_0050
-+f4733a0764741966a5e842968166b40fb062d577 refs/tags/LABEL_2005_03_06_0225
-+911d08f6ae244c6407fff268585e5b9544ce8adb refs/tags/LABEL_2005_03_15_0125
-+f5c5ef4a1fa7dcf90fd74f795a131d07377406ab refs/tags/LABEL_2005_04_05_1830
-+12b43d515c62682fcf7b578f31920a2be49142fe refs/tags/LABEL_2005_04_05_2345
-+5e5f9ed254e20b830fef5f42a52ac0bbdc92a57e refs/tags/LABEL_2005_04_14_0115
-+412babe304b948e1e3a909f8d2eb091b83f700d5 refs/tags/LABEL_2005_05_05_1920
-+ed16fefcbaf99a67a7dd7639898dbc896c70cb1b refs/tags/LABEL_2005_05_09_1245
-+9dd41a7b0c5c94d74c25edfdd6393c656669c09a refs/tags/LABEL_2005_05_13_0050
-+88804d19e2bf36c9eaefadbd7199c093c900953b refs/tags/LABEL_2005_07_04_0202
-+dafba16e6fc1837381c8e74c4891ad6965cf54ab refs/tags/LABEL_2005_08_12_0050
-+053b40fa0c90d885b00c29c9c4490924801809f7 refs/tags/LABEL_2005_09_15_2320
-+eb394f56db3e05d00891d6dc36a00df0025cf255 refs/tags/LABEL_2006_03_12_0025
-+^84ef51a632063e8cb57b2e9a4252497512831ffe
-+9bf86baaa3b35b25baa2d664e2f7f6cafad689ee refs/tags/LABEL_2006_04_18_1106
-+^8419c013048b1f15f3fa2fc7c0463d860a04ee3e
-+7a4978bc272e20c7febd15d76786c7d9b86a98cd refs/tags/LABEL_2006_05_10_1800
-+^977b50f86824fe3c262ef7efce5dbb7ddaf8a48f
-+c7071e6d645a8e13adb0d4cea2caad27213fa62f refs/tags/LABEL_2006_05_19_1133
-+^5770a1e488621a9e7e344afed7c921ff4e715a63
-+b11752921b5d22dcfda237e035a86470993e887b refs/tags/LABEL_2006_06_30_2020
-+^3f7a63e6a34c5b435864c860c1563117e45d1c35
-+2f91a3d0f8a73665423eb6ab17689c67f05e0887 refs/tags/U-Boot-0_2_0
-+60fbe254243ec461ec73da13132be098db33d3fa refs/tags/U-Boot-0_3_0
-+02c9bed451b36f3b1f11d5fe617da4fe4b9f9ab7 refs/tags/U-Boot-0_3_1
-+993cad9364c6b87ae429d1ed1130d8153f6f027e refs/tags/U-Boot-0_4_0
-+b0fce99bfc116c2ddb4506268d6e4a0a7054478d refs/tags/U-Boot-0_4_1
-+f12e568ca45f6c56b5a6d52a43524987e141abe7 refs/tags/U-Boot-0_4_2
-+ad12965db5d145f7cf7595cbeaf03b3402f42897 refs/tags/U-Boot-0_4_3
-+945af8d723a29e9b6289d84250745ed0dc16fc81 refs/tags/U-Boot-0_4_4
-+ae3af05ec986a8ac66dadb5eafe13db2d4a02c5c refs/tags/U-Boot-0_4_5
-+e0ac62d798ce60ec5d43125d4786e58b0d881836 refs/tags/U-Boot-0_4_6
-+0cb61d7dddb0d8c087f6df46a74815950668c97b refs/tags/U-Boot-0_4_7
-+7205e4075d8b50e4dd89fe39ed03860b23cbb704 refs/tags/U-Boot-0_4_8
-+b13fb01a62708492cae4b33c4d6fa9ae127905f4 refs/tags/U-Boot-1_0_0
-+b299e41a0d34bf96202d9bbb72739bdd9414b0cc refs/tags/U-Boot-1_0_1
-+198ea9e294e38cea49f9f2d9b911bdfdd20e48dc refs/tags/U-Boot-1_0_2
-+f525c8a1476945b078ce4ffe6cf768c286cbf8cc refs/tags/U-Boot-1_1_0
-+08f1080c9cbde2a500e6efe8bc5647a68f183c91 refs/tags/U-Boot-1_1_1
-+15c7a8efd2f7275e5b3249aac305f2598a998645 refs/tags/U-Boot-1_1_2
-+2893ecbf3e5b983970138289b759baf45a327ff3 refs/tags/U-Boot-1_1_3
-+74ad4b4fef966ab4cc7192b5b3808ec95e60570b refs/tags/U-Boot-1_1_4
-+^e6b6d16de73de6a76e2ec4338291e828b860f040
-+b7487ff5a5d41e379809509b9a07546e73577dc8 refs/tags/U-Boot-1_1_5
-+^ba999c531ed16ec749b2b6f4b0133cee38842b91
-+ba89ef3908907cf55a5bff6ba211b8d8c2b08800 refs/tags/U-Boot-1_1_6
-+^c59200443072353044aa4bf737a5a60f9a9af231
-+eb8fae4983cfe07fe7c785f483f2278b6146463a refs/tags/U-Boot-1_2_0
-+^f4eb54529bb3664c3a562e488b460fe075f79d67
-+d9af3c87df93e1a8126b1a52adf8db978e9a0d40 refs/tags/U_BOOT_0_1_0
-+69a193a815e7f0b35eeeb013a1f1e0cd9e590f92 refs/tags/v1.3.0
-+^9a337ddc154a10a26f117fd147b009abcdeba75a
-+6b894f3c3eac06420acad28e70621c5ba410b321 refs/tags/v1.3.0-rc1
-+^ff7640c9ead8806b5d827f2b29f9cb2632add729
-+a5d674296b4a991efdb708a9c8d6c78d4e47f565 refs/tags/v1.3.0-rc2
-+^66dcad3a9a53e0766d90e0084123bd8529522fb0
-+bf58489ae2e0de9bd2d7a6ebdbfdb655b48f0c09 refs/tags/v1.3.0-rc3
-+^636400198228d96983c06657b17f760f5989958e
-+409530dcb489cf4c24fab977ca041dac27ff9f28 refs/tags/v1.3.0-rc4
-+^5947f6999aafa7c54c1390983d264a8463dfea8e
-+2006af48494237562529cfdb111681149e0f13e9 refs/tags/v1.3.1
-+^41be969f4957115ed7b1fe8b890bfaee99d7a7a2
-+b67a97f26c406e9116fc85f5dcad4917b7a1c801 refs/tags/v1.3.1-rc1
-+^8d4f040a3c15036a6ea25a9c39e7d89fefa8440d
-+2b0e9596bac7d2776431657488db88703ba1d441 refs/tags/v1.3.2
-+^30f1806f60978d707b0cff2d7bf89d141fc24290
-+1dec865fbd4b229061233c504166443f623335db refs/tags/v1.3.2-rc1
-+^67a4389e39ad853d65b72e2b7cad15c7e8291147
-+c19f1e9b9a8794d488221a9cc3a60db03b7ccc5a refs/tags/v1.3.2-rc2
-+^b29661fc1151077776454288051bc9a488351ce8
-+955a05aa4445c5652c53e06254d420d7dffd49a6 refs/tags/v1.3.2-rc3
-+^661bad63a076a96c39c64f136915f146725af92b
-+01348d89a001323ae51dda449decea61092e008b refs/tags/v1.3.3
-+^180a90abdae72587c0f679edf8991455e559440d
-+33a7d077fd81772d263a4e91a5aebe585c5362ca refs/tags/v1.3.3-rc1
-+^fd7531c1e9d56b9e5e06d2c0e02b798dab72f70c
-+5ee1a6e902f3b76f672587bb7be4600ab9af1c34 refs/tags/v1.3.3-rc2
-+^76617299358ebba260ecc02d33e8e75d8d13dd3b
-+239f0883ea3a9f511f8925619d30a0dc9ea8fe01 refs/tags/v1.3.3-rc3
-+^6adf61dc4cb5c53a2df990cbc8df2bceacbfd869
-+5978b7d69fc40ee9512a6c1b5a3216019ee8e847 refs/tags/v1.3.4
-+^cd82919e6c8a73b363a26f34b734923844e52d1c
-+7cbbab2ab61f4f726fac1ff6b8bf2dfd26f2b3ba refs/tags/v1.3.4-rc1
-+^699f05125509249072a0b865c8d35520d97cd501
-+69be245e15510af0756aafb01020f9752ff7e066 refs/tags/v1.3.4-rc2
-+^4b50cd12a3b3c644153c4cf393f4a4c12289e5aa
-+624c2d518b6dfc652db6fcbc969bbd93f9821322 refs/tags/v2008.10
-+^b59b16ca24bc7e77ec113021a6d77b9b32fcf192
-+3033c74cb0ad3dfbb1733a36f72f2f4496ba1863 refs/tags/v2008.10-rc1
-+^8b9e4787641719d709bfa2ebeb72e8bd4952bee7
-+2071c4239c250da6c8cbc93aa1d74b503acb2507 refs/tags/v2008.10-rc2
-+^c0d2f87d6c450128b88e73eea715fa3654f65b6c
-+789d45f945bc37e721b91923388a91a4f4fcbedb refs/tags/v2008.10-rc3
-+^b4dbacf69a669a17487054552fc2761149dd6767
-+c2d264a1e4540f09e7098a42d094bf6724567043 refs/tags/v2009.01
-+^72d15e705bc3983884105cb7755c7ba80e74a0a5
-+866b1cc6f942be4e2669c17e390cd552abc68e3e refs/tags/v2009.01-rc1
-+^aced78d852d0b009e8aaa1445af8cb40861ee549
-+35ca1e5e625049dbad16ce4cb273e5af47706a23 refs/tags/v2009.01-rc2
-+^0e3ece33801e377be67ffa29f083421ad820f28b
-+79f73ea6d9d81ce14a839fa4cc24d1a3ad0975fc refs/tags/v2009.01-rc3
-+^635e5f8fc82365e6e9734b3132bc95135a6de679
-+661e77d04058f94336f621e41b7b341a3b503833 refs/tags/v2009.03
-+^e60beb13cf0135dc71c541021487b5ccc4d269cb
-+0eb92888fc505ffc6bc58a5e7bedc0ae127279fa refs/tags/v2009.03-rc1
-+^32688e572ff96715b41420e9a7f280db6c399b65
-+0e34d8aa7974c11a5fd9afe983e9c277e02ef358 refs/tags/v2009.03-rc2
-+^b3dd629e78870ba2dc9f8032978721c0fa02a856
-+d70da93b038dbee50cb3e84cc0db25aab424a772 refs/tags/v2009.06
-+^6b1f78ae6ad037382ad430b07064105c88f7ac02
-+4cb5ec6e36792f300ecbe4e67eb6931848e0bace refs/tags/v2009.06-rc1
-+^6b8edfde22acc574b5532e9f086e6a7287a9bc78
-+210d415558d01a195f98360b127e3f4eb3bb933b refs/tags/v2009.06-rc2
-+^a2e0ffcf2d9a22c582a93e84a4bef20fd3877f47
-+95bd78f93cfc903186e88fc58deac036c401cfbc refs/tags/v2009.06-rc3
-+^580611cb0932143fc2d7a735cfa9ce1ef34d6002
-+e99ab567a1a6848b871a9af8cab3ad2c0c49647a refs/tags/v2009.08
-+^3d35d87d5482de23cd5dc4d7721b1086107cae50
-+e2447f7b3a5336462dd3bebf9a10fc368461b023 refs/tags/v2009.08-rc1
-+^94978e19f31d225b4f7d97c4acbac1ecfaeb8f69
-+6f03d260e53b1263471e5c3e690ddfe43b53d959 refs/tags/v2009.08-rc2
-+^eb1a4d0a471505c169bef19a73a60f8641f0b875
-+9ab87511114da4af82dbdf745edc7478d3e3f274 refs/tags/v2009.08-rc3
-+^963f2f611741f8d9c38bd7caf20ae8c95cab7b3f
-+bd1e74b1989e22fe19f8809cacfbf9cbbf4eaf20 refs/tags/v2009.11
-+^a200a7c04d89853d2a1395b96d8ca5e3dd754551
-+815f048382dc123c29baa41238a89f820876bf1e refs/tags/v2009.11-rc1
-+^4946775c6db52dba28f72ba3525764b54f1d4593
-+4c682c60e20b5624868ed6aa214d073cfb8dc0a6 refs/tags/v2009.11-rc2
-+^0fc52948bda0734431cb528ee4fd82f1dec8c7b5
-+9fd828dddea4306b99670d07366fe3f7c1052d08 refs/tags/v2009.11.1
-+^f20393c5e787b3776c179d20f82a86bda124d651
-+65bc917e953601b09965e5fcdfbe4f6c75547e50 refs/tags/v2010.03
-+^ca6e1c136ddb720c3bb2cc043b99f7f06bc46c55
-+537c2a51feed445384aa43e482e4ddc0b5549a75 refs/tags/v2010.03-rc1
-+^93910edb595a88d394da3eb2cf5148096155dfe9
-+273a6decf55982f7a5263d17559b94281f36caf7 refs/tags/v2010.03-rc2
-+^152dda3d94e97ede7af3f9560a59a659384d4585
-+3ef91195a43e6a229290977d70bb913008db2dc9 refs/tags/v2010.03-rc3
-+^2883cc2d48e99fd1873ef8af03fee7966611b735
-+41d5718ee6fb36a1282cde6c86b55f83b62278e1 refs/tags/v2010.06
-+^a59e27997637a2395ae2cc7f809127f24119a167
-+096e50e0a8934f4e083d43d5711d611eebe82607 refs/tags/v2010.06-rc1
-+^01f03bda5b22e5aeae5f02fd537da97a41485c73
-+a42fe9aa726cd3d64c3fcf11eea0bc531ee8d281 refs/tags/v2010.06-rc2
-+^a9046b9e1aeeedc66ddf1d00474ad0ce8c6aa6e4
-+17d61cb4e86f3dc4e7deaa0042fe6d6a6afff8f3 refs/tags/v2010.06-rc3
-+^482126e27b3dbf0e69a6445da8b94b3551adf05d
-+f7b386b1df73ff213287eed6ca1b74bb91da1b05 refs/tags/v2010.09
-+^1e4e5ef0469050f014aee1204dae8a9ab6053e49
-+c988fb931f8c8f5d9ce1fc6ca2c20219bcd0fc10 refs/tags/v2010.09-rc1
-+^2d941de9d5c7ba00dc19787dfa0aac2949fd00fb
-+09012d353eaf26310dc3ddb1915a3d3504ab9a27 refs/tags/v2010.09-rc2
-+^07517e7f4f582d1607adbc444bab75af3ac4a7f9
-+d0e3a3f4574f1f51ae3d7c5605b7ea5c6df929d4 refs/tags/v2010.12
-+^250ef029844be2cb98635f265359396866d1749f
-+5aeba5ba231ccceba84dd2311b1dae645b75bfdc refs/tags/v2010.12-rc1
-+^908614f20f7f0f5df736eed21b88e81ebbf14e86
-+a1904f2bc34e97d79483bcefc35b188620ee9089 refs/tags/v2010.12-rc2
-+^d0d2271f8c62e830ec65fb069b6d12dd708e3e2f
-+9bde025ff24c811c02d2a7e6451a57ea63895b3a refs/tags/v2010.12-rc3
-+^3ac45988ab1605baaf83bd3acb80a197c9a208c2
-+b29fbb347698286935bfc401c08499a6f63479de refs/tags/v2011.03
-+^19b54a701811220221fc4d5089a2bb18892018ca
-+2360c73ed79d91fe75c297c8a62b2810e8eef281 refs/tags/v2011.03-rc1
-+^42d44f631c4e8e5359775bdc098f2fffde4e5c05
-+38c5af4db86a3e7feaff5092b136722c53784c03 refs/tags/v2011.03-rc2
-+^cb815e5ff979e36d68df130a810d34de4bf93289
-+54d5e1052f16fe5e3337600f485b13b4c6204972 refs/tags/v2011.06
-+^b1af6f532e0d348b153d5c148369229d24af361a
-+4d0984f19a46afd17d1ca843deacc5bbedd95eda refs/tags/v2011.06-rc1
-+^7a82c208143bbc774ffcb4e53239410f867a0794
-+1b885e3346f4e06463949dcca3f9444d3d76eeda refs/tags/v2011.06-rc2
-+^6f4dd40cddbd69c56fec1285fee02cbd5a3833d8
-+0431724fde21417139eb1209ea8b562235c64c6e refs/tags/v2011.06-rc3
-+^79cfe422615c010a75ece41662a05cd432ada389
-+58fb473021fd5377db6cb934ea7032da885f80b7 refs/tags/v2011.09
-+^1d5e7fb403257d62f0f2419cb83fdf6b0f02f215
-+86773b53d37288d8ad16f27b93fd948ff11f8012 refs/tags/v2011.09-rc1
-+^6ceb0135f96d73063ffbaab5be7ce23933367388
-+00e61f6907d4ecc2e41f4ba61da74e7cc8665e29 refs/tags/v2011.09-rc2
-+^bc196029f53c2d82eb9a12eb8b66e696b6284941
-+d0b049d45ae734fa473894ae6fd9f4d7d2437cc5 refs/tags/v2011.12
-+^cba9a894fdb1cb49b60fcd1d1d6919cbd7995dd5
-+ee26bfcef5eb5cb4481eb073924cddc22ea2e423 refs/tags/v2011.12-rc1
-+^5738946be46c513fd945d3e1d8f8a0fa718b7c58
-+db9c62b847eab7d42b396ee59cbf4e5e75f02fc6 refs/tags/v2011.12-rc2
-+^901de79a3792c81aefcbf207a34049e63f21362b
-+d18276f86b5bed7646749a6a81ae94af79578d5f refs/tags/v2011.12-rc3
-+^be662e9a6b7bf27cb7bc06de18f3c51b2ea80160
-+5910ada22359d6cd06b9299f1ef6020a1ea2b893 refs/tags/v2012.04
-+^2790bf69dc12fb9aeb9836904e5f57c7f83d5552
-+bf41e44b53ad476c47da12f985115d2f073c716d refs/tags/v2012.04-rc1
-+^c008b6f6dd6b8965e9a7654ffbce75bb9ff7a3b5
-+b9c6ec5eb3eaa4471b32e92f48d6df2867020738 refs/tags/v2012.04-rc2
-+^f5cdc11775c4b7fdbf52a6dd2f463d329804ab11
-+d2062de0a3356d2e5c4b9ee6b7c805f0ac5cef37 refs/tags/v2012.04-rc3
-+^fb14b6b2f680363678b4e6a75eb9f3f0d79111fa
-+b75d3092239fc5e0e05571d91a380eb8d90d2f45 refs/tags/v2012.04.01
-+^415d386877df49eb051b85ef74fa59a16dc17c7d
-+d8679b1a4e01cfc7e90be484f4feafdcf153f3a1 refs/tags/v2012.07
-+^190649fb4309d1bc0fe7732fd0f951cb6440f935
-+ea406aa0f20923152f447108f189bd6e84f2b082 refs/tags/v2012.07-rc1
-+^211e47549b668c7cdd8658c0413a272f0d0495d4
-+5f4bc90c127618f5022d0086d329bbacab9c2b9b refs/tags/v2012.07-rc2
-+^8b10652d6d9cc05023b5a6b73840078066f95a50
-+473fff580bfa77b2f4b4dcecbb63ede28f8da5fa refs/tags/v2012.07-rc3
-+^c627faf637f5fe091bdb6846a52b16983e97b262
-+5aad5045f59029384c11058970caa31de2cfa514 refs/tags/v2012.10
-+^6528ff0109d81c1f21d20f9f1370782bccf87bcb
-+91c92e05eb518c1697c64e30e6887aa59a4fde44 refs/tags/v2012.10-rc1
-+^ee1f4caaa2a3f79d692155eec8a4c7289d60e106
-+3b07d3f76ca3b0bb41b463291f8456918ecc7df9 refs/tags/v2012.10-rc2
-+^221953d41dea8dce027b9ce6beee700d97ac2c83
-+7f2daf884129488975dd5f41d87730b26532e128 refs/tags/v2012.10-rc3
-+^c7c63221439ad87a8c05e7b42f9eae32ec7cc2d4
-+35c192cf449860aec8766e20a51bf2052a1dc968 refs/tags/v2013.01
-+^3a9d879f6f64585b819af728b53be0a05037fe0d
-+02eac6cbf79f854495705a5cf074b9b31ebdef47 refs/tags/v2013.01-rc1
-+^3ae7b240ad8c723d02aa79654220a07049b7ae4d
-+e99406154b90847a729cfef176c5b0681b8fbf62 refs/tags/v2013.01-rc2
-+^ebbf0d20aa85f623c49b7ed3349ebfea450c152d
-+32811f96f8259013d054deddb4d3b67a3d3092aa refs/tags/v2013.01-rc3
-+^6fb4d74e59750b43f00d460c569e8a30c67c5bb0
-+8512592e47cc968d2d6eb788acde761ebc3acbf6 refs/tags/v2013.01.01
-+^e8ae0fa5edd152b2b29c470b88429be4cdcd2c46
-+eb34b5ea26363ff349dee46ec6fb90fbc2198495 refs/tags/v2013.04
-+^d10f68ae47b67acab8b110b5c605dde4197a1820
-+734a826d8508b7ca8131381f1fb9ad36e7e98432 refs/tags/v2013.04-rc1
-+^2536850d7cd90bdb75bf3ff86838f913392b68db
-+8a7f04c4b3fe8ecb0b8af5c285cd2e252f60482e refs/tags/v2013.04-rc2
-+^c8142633e169665b246352918df5b76fd243bb71
-+83be647fa85edeb64c98d2d61114ca30de30e308 refs/tags/v2013.04-rc3
-+^cba6494f24d711ba63afb22b1ee691a41fee121c
-+9e96446a0bf49683dad66708579873a3b6c4f068 refs/tags/v2013.07
-+^62c175fbb8a0f9a926c88294ea9f7e88eb898f6c
-+7a42d4e7aa2788b653927904e03ec20793823a19 refs/tags/v2013.07-rc1
-+^216a793cc1702227fd4ad624080f585038d1fa45
-+4d5aaff0a76a07d28051134d7301d25a74a3a32e refs/tags/v2013.07-rc2
-+^e6bf18dba2a21bebf2c421b1c2e188225f6485a1
-+3060931a37a2417275a24400a6eb60abeb1a176a refs/tags/v2013.07-rc3
-+^68c517eafcb060aa8ef92ed2620f0f41c5275d89
-+2d65a6b5a3f069ea92ee33c1c925d79610af12d0 refs/tags/v2013.10
-+^183acb700378a8cfc5d50a01a65de93fb2c24586
-+ff92b6e5cf51421163e4ea1d29004eeffd6b6a99 refs/tags/v2013.10-rc1
-+^40a60c6e8bdd00330310eaa351c9391e74d0bc2c
-+bab9dca36165be177a74ff31eabda75f94e26599 refs/tags/v2013.10-rc2
-+^fb18fa95a14ae875ef0a5421cd9fecc00c7c3a4c
-+c1d48b0698c9b7ddf342f5808d3a4a973317c2dc refs/tags/v2013.10-rc3
-+^46ef4faed18196472eb95216b2f74c1397ecf024
-+c99ec7332286341649cd5337eb1bbeabdff13a3a refs/tags/v2013.10-rc4
-+^0c5274e6f3231a3a28dafc1204b3f71a3534c520
-+e3fbee81eccebfd6c91609f6bc4b4aec3a017131 refs/tags/v2014.01
-+^b44bd2c73c4cfb6e3b9e7f8cf987e8e39aa74a0b
-+0b3dd5f23cf6eeb9ec84da8c77d8c7d1e7d23680 refs/tags/v2014.01-rc1
-+^d19ad726bcd5d9106f7ba9c750462fcc369f1020
-+e68eecb2d896ddef422984ae6d52793099b74e9a refs/tags/v2014.01-rc2
-+^fd44194945714a478fab6407c04453caaef0bac9
-+5f60aba0d3f6b827de8dc7e0850c1050f655b572 refs/tags/v2014.01-rc3
-+^cddb6b8304bfbc34f43920051256de7fe6c4c0ab
-+5b3ba909f4f881add7756d820f2eb67d3e31b112 refs/tags/v2014.04
-+^dda0dbfc69f3d560c87f5be85f127ed862ea6721
-+9574fdf82ff62a7086b257c89c01bde937a0c45e refs/tags/v2014.04-rc1
-+^0a8e823ad0c5a602c93c2e8a54caf622ade6d3fb
-+4017dac218f34783977c36af8f65984a57ace7e3 refs/tags/v2014.04-rc2
-+^8ee950dd273aef6a074d41bf2ee4ef11d6f848fb
-+ba34c9404626f23a41ef07bcdf3e7e5cbf133b82 refs/tags/v2014.04-rc3
-+^c494eaf409cb8db9a5a513e9bdfac20b7a83daca
-+590a74953a76f2b4cc552bd85b475ea54ba02f66 refs/tags/v2014.07
-+^524123a70761110c5cf3ccc5f52f6d4da071b959
-+2db93972561773246cb7498bf1ee73e3d34fa697 refs/tags/v2014.07-rc1
-+^3e41c54ad8099951d57c3c5a0f5ebc6e8becf70c
-+3472f37f1ce4d2737476b4ec7c768c04afe20046 refs/tags/v2014.07-rc2
-+^0116f40bbc269c57566d69e0db8cb9da2e194d33
-+d3b233a6a320688e22419134d6f7bb23e9c0332b refs/tags/v2014.07-rc3
-+^76b21026ceb5a6a83fc53b0ecdf425f240318022
-+9019e02a9d98f6788035ea352289a5afdbbf133d refs/tags/v2014.07-rc4
-+^a176ff0705351bf6d993a8f15e081bfa2ba2e1af
-+d96885d68127e270d16484c0fbc252953a2bf2e8 refs/tags/v2014.10
-+^c43fd23cf619856b0763a64a6a3bcf3663058c49
-+49fe41ad45d09cf083db39ce4a2653d903fbe1a7 refs/tags/v2014.10-rc1
-+^e76b933e02e1b38e48754c435e9dba1c0deeb3c6
-+8d6f7381cd8f915f6599044b1848a8a6a7faff02 refs/tags/v2014.10-rc2
-+^d6c1ffc7d23f4fe4ae8c91101861055b8e1501b6
-+1f254ba729e8b21ccba3c9caf02bf358a0e8d136 refs/tags/v2014.10-rc3
-+^742de9076e8a8f44b77794b43e6175d86b897996
-+a013989f700d43f79af64fb74b05b2f333a60c7d refs/tags/v2015.01-rc1
-+^9906090f527153afddc5aa64d37cb5f89c6ee129
-+77831f3e5f83e12b4e7df418e7d43977b189031d refs/tags/v2015.01-rc2
-+^2a82ec77d27ef5f860a107c4b764643a655dceeb
-+ecb091a9035a9c89a57b7fbd6cdf1db1c5ee9a80 refs/tags/v2015.01-rc3
-+^32fdf0e4d82bdca5d64d86330e461e59685f9959
-+9305547115a8073900fec5e8f3938b93c675f2c2 refs/tags/v2015.01-rc4
-+^125738e819a3b9d15210794b3dcef9f4d9bcf866
-diff -ruN u-boot-2015.01-rc3/.git/refs/heads/master u-boot/.git/refs/heads/master
---- u-boot-2015.01-rc3/.git/refs/heads/master	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/.git/refs/heads/master	2015-01-01 17:34:31.953508170 +0100
-@@ -0,0 +1 @@
-+125738e819a3b9d15210794b3dcef9f4d9bcf866
-diff -ruN u-boot-2015.01-rc3/.git/refs/remotes/origin/HEAD u-boot/.git/refs/remotes/origin/HEAD
---- u-boot-2015.01-rc3/.git/refs/remotes/origin/HEAD	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/.git/refs/remotes/origin/HEAD	2015-01-01 17:34:31.937508433 +0100
-@@ -0,0 +1 @@
-+ref: refs/remotes/origin/master
-diff -ruN u-boot-2015.01-rc3/include/common.h u-boot/include/common.h
---- u-boot-2015.01-rc3/include/common.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/common.h	2015-01-01 17:34:32.757494989 +0100
-@@ -70,12 +70,6 @@
- #ifdef	CONFIG_4xx
- #include <asm/ppc4xx.h>
- #endif
--#ifdef CONFIG_ARM
--#define asmlinkage	/* nothing */
--#endif
--#ifdef CONFIG_X86
--#define asmlinkage __attribute__((regparm(0)))
--#endif
- #ifdef CONFIG_BLACKFIN
- #include <asm/blackfin.h>
- #endif
-diff -ruN u-boot-2015.01-rc3/include/config_fallbacks.h u-boot/include/config_fallbacks.h
---- u-boot-2015.01-rc3/include/config_fallbacks.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/config_fallbacks.h	2015-01-01 17:34:32.757494989 +0100
-@@ -79,6 +79,10 @@
- #define CONFIG_SYS_PROMPT	"=> "
- #endif
- 
-+#ifndef CONFIG_SYS_PBSIZE
-+#define CONFIG_SYS_PBSIZE	(CONFIG_SYS_CBSIZE + 128)
-+#endif
-+
- #ifndef CONFIG_FIT_SIGNATURE
- #define CONFIG_IMAGE_FORMAT_LEGACY
- #endif
-@@ -87,4 +91,10 @@
- #undef CONFIG_IMAGE_FORMAT_LEGACY
- #endif
- 
-+#ifdef CONFIG_DM_I2C
-+# ifdef CONFIG_SYS_I2C
-+#  error "Cannot define CONFIG_SYS_I2C when CONFIG_DM_I2C is used"
-+# endif
-+#endif
-+
- #endif	/* __CONFIG_FALLBACKS_H */
-diff -ruN u-boot-2015.01-rc3/include/configs/alt.h u-boot/include/configs/alt.h
---- u-boot-2015.01-rc3/include/configs/alt.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/alt.h	2015-01-01 17:34:32.777494661 +0100
-@@ -95,4 +95,23 @@
- #define CONFIG_USB_EHCI_RMOBILE
- #define CONFIG_USB_MAX_CONTROLLER_COUNT	2
- 
-+/* MMCIF */
-+#define CONFIG_MMC
-+#define CONFIG_GENERIC_MMC
-+#define CONFIG_CMD_MMC
-+
-+#define CONFIG_SH_MMCIF
-+#define CONFIG_SH_MMCIF_ADDR		0xee200000
-+#define CONFIG_SH_MMCIF_CLK		48000000
-+
-+/* Module stop status bits */
-+/* INTC-RT */
-+#define CONFIG_SMSTP0_ENA	0x00400000
-+/* MSIF */
-+#define CONFIG_SMSTP2_ENA	0x00002000
-+/* INTC-SYS, IRQC */
-+#define CONFIG_SMSTP4_ENA	0x00000180
-+/* SCIF2 */
-+#define CONFIG_SMSTP7_ENA	0x00080000
-+
- #endif /* __ALT_H */
-diff -ruN u-boot-2015.01-rc3/include/configs/apalis_t30.h u-boot/include/configs/apalis_t30.h
---- u-boot-2015.01-rc3/include/configs/apalis_t30.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/apalis_t30.h	2015-01-01 17:34:32.777494661 +0100
-@@ -26,10 +26,7 @@
- 
- /* I2C */
- #define CONFIG_SYS_I2C_TEGRA
--#define CONFIG_SYS_I2C_INIT_BOARD
--#define CONFIG_SYS_I2C_SPEED		100000
- #define CONFIG_CMD_I2C
--#define CONFIG_SYS_I2C
- 
- /* SD/MMC */
- #define CONFIG_MMC
-diff -ruN u-boot-2015.01-rc3/include/configs/B4860QDS.h u-boot/include/configs/B4860QDS.h
---- u-boot-2015.01-rc3/include/configs/B4860QDS.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/B4860QDS.h	2015-01-01 17:34:32.757494989 +0100
-@@ -641,6 +641,14 @@
- #define CONFIG_SYS_BMAN_MEM_PHYS	CONFIG_SYS_BMAN_MEM_BASE
- #endif
- #define CONFIG_SYS_BMAN_MEM_SIZE	0x02000000
-+#define CONFIG_SYS_BMAN_SP_CENA_SIZE	0x4000
-+#define CONFIG_SYS_BMAN_SP_CINH_SIZE	0x1000
-+#define CONFIG_SYS_BMAN_CENA_BASE	CONFIG_SYS_BMAN_MEM_BASE
-+#define CONFIG_SYS_BMAN_CENA_SIZE	(CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_CINH_BASE	(CONFIG_SYS_BMAN_MEM_BASE + \
-+					CONFIG_SYS_BMAN_CENA_SIZE)
-+#define CONFIG_SYS_BMAN_CINH_SIZE	(CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_SWP_ISDR_REG	0xE08
- #define CONFIG_SYS_QMAN_NUM_PORTALS	25
- #define CONFIG_SYS_QMAN_MEM_BASE	0xf6000000
- #ifdef CONFIG_PHYS_64BIT
-@@ -649,6 +657,14 @@
- #define CONFIG_SYS_QMAN_MEM_PHYS	CONFIG_SYS_QMAN_MEM_BASE
- #endif
- #define CONFIG_SYS_QMAN_MEM_SIZE	0x02000000
-+#define CONFIG_SYS_QMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_QMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_QMAN_CENA_BASE       CONFIG_SYS_QMAN_MEM_BASE
-+#define CONFIG_SYS_QMAN_CENA_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_CINH_BASE       (CONFIG_SYS_QMAN_MEM_BASE + \
-+					CONFIG_SYS_QMAN_CENA_SIZE)
-+#define CONFIG_SYS_QMAN_CINH_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_SWP_ISDR_REG	0xE08
- 
- #define CONFIG_SYS_DPAA_FMAN
- 
-diff -ruN u-boot-2015.01-rc3/include/configs/beaver.h u-boot/include/configs/beaver.h
---- u-boot-2015.01-rc3/include/configs/beaver.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/beaver.h	2015-01-01 17:34:32.781494596 +0100
-@@ -40,10 +40,7 @@
- 
- /* I2C */
- #define CONFIG_SYS_I2C_TEGRA
--#define CONFIG_SYS_I2C_INIT_BOARD
--#define CONFIG_SYS_I2C_SPEED		100000
- #define CONFIG_CMD_I2C
--#define CONFIG_SYS_I2C
- 
- /* SD/MMC */
- #define CONFIG_MMC
-diff -ruN u-boot-2015.01-rc3/include/configs/BSC9131RDB.h u-boot/include/configs/BSC9131RDB.h
---- u-boot-2015.01-rc3/include/configs/BSC9131RDB.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/BSC9131RDB.h	2015-01-01 17:34:32.757494989 +0100
-@@ -11,6 +11,9 @@
- #ifndef __CONFIG_H
- #define __CONFIG_H
- 
-+#define CONFIG_SYS_GENERIC_BOARD
-+#define CONFIG_DISPLAY_BOARDINFO
-+
- #ifdef CONFIG_BSC9131RDB
- #define CONFIG_BSC9131
- #define CONFIG_NAND_FSL_IFC
-diff -ruN u-boot-2015.01-rc3/include/configs/BSC9132QDS.h u-boot/include/configs/BSC9132QDS.h
---- u-boot-2015.01-rc3/include/configs/BSC9132QDS.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/BSC9132QDS.h	2015-01-01 17:34:32.761494923 +0100
-@@ -11,6 +11,9 @@
- #ifndef __CONFIG_H
- #define __CONFIG_H
- 
-+#define CONFIG_SYS_GENERIC_BOARD
-+#define CONFIG_DISPLAY_BOARDINFO
-+
- #ifdef CONFIG_BSC9132QDS
- #define CONFIG_BSC9132
- #endif
-diff -ruN u-boot-2015.01-rc3/include/configs/cardhu.h u-boot/include/configs/cardhu.h
---- u-boot-2015.01-rc3/include/configs/cardhu.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/cardhu.h	2015-01-01 17:34:32.785494529 +0100
-@@ -43,12 +43,7 @@
- 
- /* I2C */
- #define CONFIG_SYS_I2C_TEGRA
--#define CONFIG_SYS_I2C_INIT_BOARD
--#define CONFIG_I2C_MULTI_BUS
--#define CONFIG_SYS_MAX_I2C_BUS		TEGRA_I2C_NUM_CONTROLLERS
--#define CONFIG_SYS_I2C_SPEED		100000
- #define CONFIG_CMD_I2C
--#define CONFIG_SYS_I2C
- 
- /* SD/MMC */
- #define CONFIG_MMC
-diff -ruN u-boot-2015.01-rc3/include/configs/chromebook_link.h u-boot/include/configs/chromebook_link.h
---- u-boot-2015.01-rc3/include/configs/chromebook_link.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/chromebook_link.h	2015-01-01 17:34:32.785494529 +0100
-@@ -25,10 +25,10 @@
- 
- #define CONFIG_X86_RESET_VECTOR
- #define CONFIG_NR_DRAM_BANKS			8
--#define CONFIG_X86_MRC_START			0xfffa0000
-+#define CONFIG_X86_MRC_ADDR			0xfffa0000
- #define CONFIG_CACHE_MRC_SIZE_KB		512
- 
--#define CONFIG_COREBOOT_SERIAL
-+#define CONFIG_X86_SERIAL
- 
- #define CONFIG_SCSI_DEV_LIST		{PCI_VENDOR_ID_INTEL, \
- 			PCI_DEVICE_ID_INTEL_NM10_AHCI},	      \
-@@ -39,7 +39,7 @@
- 	{PCI_VENDOR_ID_INTEL,		\
- 			PCI_DEVICE_ID_INTEL_PANTHERPOINT_AHCI_MOBILE}
- 
--#define CONFIG_X86_OPTION_ROM_FILENAME		pci8086,0166.bin
-+#define CONFIG_X86_OPTION_ROM_FILE		pci8086,0166.bin
- #define CONFIG_X86_OPTION_ROM_ADDR		0xfff90000
- #define CONFIG_VIDEO_X86
- 
-diff -ruN u-boot-2015.01-rc3/include/configs/colibri_t30.h u-boot/include/configs/colibri_t30.h
---- u-boot-2015.01-rc3/include/configs/colibri_t30.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/colibri_t30.h	2015-01-01 17:34:32.785494529 +0100
-@@ -25,10 +25,7 @@
- 
- /* I2C */
- #define CONFIG_SYS_I2C_TEGRA
--#define CONFIG_SYS_I2C_INIT_BOARD
--#define CONFIG_SYS_I2C_SPEED		100000
- #define CONFIG_CMD_I2C
--#define CONFIG_SYS_I2C
- 
- /* SD/MMC */
- #define CONFIG_MMC
-diff -ruN u-boot-2015.01-rc3/include/configs/coreboot.h u-boot/include/configs/coreboot.h
---- u-boot-2015.01-rc3/include/configs/coreboot.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/coreboot.h	2015-01-01 17:34:32.785494529 +0100
-@@ -49,7 +49,7 @@
- 	{PCI_VENDOR_ID_INTEL,		\
- 			PCI_DEVICE_ID_INTEL_PANTHERPOINT_AHCI_MOBILE}
- 
--#define CONFIG_COREBOOT_SERIAL
-+#define CONFIG_X86_SERIAL
- 
- #define CONFIG_STD_DEVICES_SETTINGS     "stdin=usbkbd,vga,serial\0" \
- 					"stdout=vga,serial,cbmem\0" \
-diff -ruN u-boot-2015.01-rc3/include/configs/corenet_ds.h u-boot/include/configs/corenet_ds.h
---- u-boot-2015.01-rc3/include/configs/corenet_ds.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/corenet_ds.h	2015-01-01 17:34:32.785494529 +0100
-@@ -495,6 +495,14 @@
- #define CONFIG_SYS_BMAN_MEM_PHYS	CONFIG_SYS_BMAN_MEM_BASE
- #endif
- #define CONFIG_SYS_BMAN_MEM_SIZE	0x00200000
-+#define CONFIG_SYS_BMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_BMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_BMAN_CENA_BASE       CONFIG_SYS_BMAN_MEM_BASE
-+#define CONFIG_SYS_BMAN_CENA_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_CINH_BASE       (CONFIG_SYS_BMAN_MEM_BASE + \
-+					CONFIG_SYS_BMAN_CENA_SIZE)
-+#define CONFIG_SYS_BMAN_CINH_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_SWP_ISDR_REG	0xE08
- #define CONFIG_SYS_QMAN_NUM_PORTALS	10
- #define CONFIG_SYS_QMAN_MEM_BASE	0xf4200000
- #ifdef CONFIG_PHYS_64BIT
-@@ -503,6 +511,14 @@
- #define CONFIG_SYS_QMAN_MEM_PHYS	CONFIG_SYS_QMAN_MEM_BASE
- #endif
- #define CONFIG_SYS_QMAN_MEM_SIZE	0x00200000
-+#define CONFIG_SYS_QMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_QMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_QMAN_CENA_BASE       CONFIG_SYS_QMAN_MEM_BASE
-+#define CONFIG_SYS_QMAN_CENA_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_CINH_BASE       (CONFIG_SYS_QMAN_MEM_BASE + \
-+					CONFIG_SYS_QMAN_CENA_SIZE)
-+#define CONFIG_SYS_QMAN_CINH_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_SWP_ISDR_REG	0xE08
- 
- #define CONFIG_SYS_DPAA_FMAN
- #define CONFIG_SYS_DPAA_PME
-diff -ruN u-boot-2015.01-rc3/include/configs/crownbay.h u-boot/include/configs/crownbay.h
---- u-boot-2015.01-rc3/include/configs/crownbay.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/include/configs/crownbay.h	2015-01-01 17:34:32.785494529 +0100
-@@ -0,0 +1,61 @@
-+/*
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+/*
-+ * board/config.h - configuration options, board specific
-+ */
-+
-+#ifndef __CONFIG_H
-+#define __CONFIG_H
-+
-+#include <configs/x86-common.h>
-+
-+#define CONFIG_SYS_MONITOR_LEN		(1 << 20)
-+#define CONFIG_SYS_X86_START16		0xfffff800
-+#define CONFIG_BOARD_EARLY_INIT_F
-+
-+#define CONFIG_X86_RESET_VECTOR
-+#define CONFIG_NR_DRAM_BANKS		1
-+
-+#define CONFIG_X86_SERIAL
-+#define CONFIG_SMSC_LPC47M
-+
-+#define CONFIG_PCI_MEM_BUS		0x40000000
-+#define CONFIG_PCI_MEM_PHYS		CONFIG_PCI_MEM_BUS
-+#define CONFIG_PCI_MEM_SIZE		0x80000000
-+
-+#define CONFIG_PCI_PREF_BUS		0xc0000000
-+#define CONFIG_PCI_PREF_PHYS		CONFIG_PCI_PREF_BUS
-+#define CONFIG_PCI_PREF_SIZE		0x20000000
-+
-+#define CONFIG_PCI_IO_BUS		0x2000
-+#define CONFIG_PCI_IO_PHYS		CONFIG_PCI_IO_BUS
-+#define CONFIG_PCI_IO_SIZE		0xe000
-+
-+#define CONFIG_SYS_EARLY_PCI_INIT
-+#define CONFIG_PCI_PNP
-+#define CONFIG_E1000
-+
-+#define CONFIG_STD_DEVICES_SETTINGS     "stdin=serial\0" \
-+					"stdout=serial\0" \
-+					"stderr=serial\0"
-+
-+#define CONFIG_SCSI_DEV_LIST            \
-+	{PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TCF_SATA}
-+
-+#define CONFIG_SPI_FLASH_SST
-+
-+#define CONFIG_MMC
-+#define CONFIG_SDHCI
-+#define CONFIG_GENERIC_MMC
-+#define CONFIG_MMC_SDMA
-+#define CONFIG_CMD_MMC
-+
-+/* Video is not supported */
-+#undef CONFIG_VIDEO
-+#undef CONFIG_CFB_CONSOLE
-+
-+#endif	/* __CONFIG_H */
-diff -ruN u-boot-2015.01-rc3/include/configs/dalmore.h u-boot/include/configs/dalmore.h
---- u-boot-2015.01-rc3/include/configs/dalmore.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/dalmore.h	2015-01-01 17:34:32.789494465 +0100
-@@ -36,12 +36,7 @@
- 
- /* I2C */
- #define CONFIG_SYS_I2C_TEGRA
--#define CONFIG_SYS_I2C_INIT_BOARD
--#define CONFIG_I2C_MULTI_BUS
--#define CONFIG_SYS_MAX_I2C_BUS		TEGRA_I2C_NUM_CONTROLLERS
--#define CONFIG_SYS_I2C_SPEED		100000
- #define CONFIG_CMD_I2C
--#define CONFIG_SYS_I2C
- 
- /* SD/MMC */
- #define CONFIG_MMC
-diff -ruN u-boot-2015.01-rc3/include/configs/gose.h u-boot/include/configs/gose.h
---- u-boot-2015.01-rc3/include/configs/gose.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/gose.h	2015-01-01 17:34:32.793494399 +0100
-@@ -91,4 +91,14 @@
- #define CONFIG_USB_EHCI_RMOBILE
- #define CONFIG_USB_MAX_CONTROLLER_COUNT	2
- 
-+/* Module stop status bits */
-+/* INTC-RT */
-+#define CONFIG_SMSTP0_ENA	0x00400000
-+/* MSIF */
-+#define CONFIG_SMSTP2_ENA	0x00002000
-+/* INTC-SYS, IRQC */
-+#define CONFIG_SMSTP4_ENA	0x00000180
-+/* SCIF0 */
-+#define CONFIG_SMSTP7_ENA	0x00200000
-+
- #endif	/* __GOSE_H */
-diff -ruN u-boot-2015.01-rc3/include/configs/jetson-tk1.h u-boot/include/configs/jetson-tk1.h
---- u-boot-2015.01-rc3/include/configs/jetson-tk1.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/jetson-tk1.h	2015-01-01 17:34:32.797494333 +0100
-@@ -25,12 +25,7 @@
- 
- /* I2C */
- #define CONFIG_SYS_I2C_TEGRA
--#define CONFIG_SYS_I2C_INIT_BOARD
--#define CONFIG_I2C_MULTI_BUS
--#define CONFIG_SYS_MAX_I2C_BUS		TEGRA_I2C_NUM_CONTROLLERS
--#define CONFIG_SYS_I2C_SPEED		100000
- #define CONFIG_CMD_I2C
--#define CONFIG_SYS_I2C
- 
- /* SD/MMC */
- #define CONFIG_MMC
-diff -ruN u-boot-2015.01-rc3/include/configs/km/kmp204x-common.h u-boot/include/configs/km/kmp204x-common.h
---- u-boot-2015.01-rc3/include/configs/km/kmp204x-common.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/km/kmp204x-common.h	2015-01-01 17:34:32.797494333 +0100
-@@ -339,10 +339,26 @@
- #define CONFIG_SYS_BMAN_MEM_BASE	0xf4000000
- #define CONFIG_SYS_BMAN_MEM_PHYS	0xff4000000ull
- #define CONFIG_SYS_BMAN_MEM_SIZE	0x00200000
-+#define CONFIG_SYS_BMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_BMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_BMAN_CENA_BASE       CONFIG_SYS_BMAN_MEM_BASE
-+#define CONFIG_SYS_BMAN_CENA_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_CINH_BASE       (CONFIG_SYS_BMAN_MEM_BASE + \
-+					CONFIG_SYS_BMAN_CENA_SIZE)
-+#define CONFIG_SYS_BMAN_CINH_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_SWP_ISDR_REG	0xE08
- #define CONFIG_SYS_QMAN_NUM_PORTALS	10
- #define CONFIG_SYS_QMAN_MEM_BASE	0xf4200000
- #define CONFIG_SYS_QMAN_MEM_PHYS	0xff4200000ull
- #define CONFIG_SYS_QMAN_MEM_SIZE	0x00200000
-+#define CONFIG_SYS_QMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_QMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_QMAN_CENA_BASE       CONFIG_SYS_QMAN_MEM_BASE
-+#define CONFIG_SYS_QMAN_CENA_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_CINH_BASE       (CONFIG_SYS_QMAN_MEM_BASE + \
-+					CONFIG_SYS_QMAN_CENA_SIZE)
-+#define CONFIG_SYS_QMAN_CINH_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_SWP_ISDR_REG	0xE08
- 
- #define CONFIG_SYS_DPAA_FMAN
- #define CONFIG_SYS_DPAA_PME
-diff -ruN u-boot-2015.01-rc3/include/configs/koelsch.h u-boot/include/configs/koelsch.h
---- u-boot-2015.01-rc3/include/configs/koelsch.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/koelsch.h	2015-01-01 17:34:32.797494333 +0100
-@@ -92,4 +92,15 @@
- #define CONFIG_USB_MAX_CONTROLLER_COUNT	2
- #define CONFIG_USB_STORAGE
- 
-+
-+/* Module stop status bits */
-+/* INTC-RT */
-+#define CONFIG_SMSTP0_ENA	0x00400000
-+/* MSIF*/
-+#define CONFIG_SMSTP2_ENA	0x00002000
-+/* INTC-SYS, IRQC */
-+#define CONFIG_SMSTP4_ENA	0x00000180
-+/* SCIF0 */
-+#define CONFIG_SMSTP7_ENA	0x00200000
-+
- #endif	/* __KOELSCH_H */
-diff -ruN u-boot-2015.01-rc3/include/configs/lager.h u-boot/include/configs/lager.h
---- u-boot-2015.01-rc3/include/configs/lager.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/lager.h	2015-01-01 17:34:32.797494333 +0100
-@@ -93,4 +93,23 @@
- #define CONFIG_USB_MAX_CONTROLLER_COUNT	3
- #define CONFIG_USB_STORAGE
- 
-+/* MMC */
-+#define CONFIG_MMC
-+#define CONFIG_CMD_MMC
-+#define CONFIG_GENERIC_MMC
-+
-+#define CONFIG_SH_MMCIF
-+#define CONFIG_SH_MMCIF_ADDR		0xEE220000
-+#define CONFIG_SH_MMCIF_CLK		97500000
-+
-+/* Module stop status bits */
-+/* INTC-RT */
-+#define CONFIG_SMSTP0_ENA	0x00400000
-+/* MSIF */
-+#define CONFIG_SMSTP2_ENA	0x00002000
-+/* INTC-SYS, IRQC */
-+#define CONFIG_SMSTP4_ENA	0x00000180
-+/* SCIF0 */
-+#define CONFIG_SMSTP7_ENA	0x00200000
-+
- #endif	/* __LAGER_H */
-diff -ruN u-boot-2015.01-rc3/include/configs/ls1021aqds.h u-boot/include/configs/ls1021aqds.h
---- u-boot-2015.01-rc3/include/configs/ls1021aqds.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/ls1021aqds.h	2015-01-01 17:34:32.797494333 +0100
-@@ -37,8 +37,85 @@
- unsigned long get_board_ddr_clk(void);
- #endif
- 
-+#ifdef CONFIG_QSPI_BOOT
-+#define CONFIG_SYS_CLK_FREQ		100000000
-+#define CONFIG_DDR_CLK_FREQ		100000000
-+#define CONFIG_QIXIS_I2C_ACCESS
-+#else
- #define CONFIG_SYS_CLK_FREQ		get_board_sys_clk()
- #define CONFIG_DDR_CLK_FREQ		get_board_ddr_clk()
-+#endif
-+
-+#ifdef CONFIG_RAMBOOT_PBL
-+#define CONFIG_SYS_FSL_PBL_PBI	board/freescale/ls1021aqds/ls102xa_pbi.cfg
-+#endif
-+
-+#ifdef CONFIG_SD_BOOT
-+#define CONFIG_SYS_FSL_PBL_RCW	board/freescale/ls1021aqds/ls102xa_rcw_sd.cfg
-+#define CONFIG_SPL_FRAMEWORK
-+#define CONFIG_SPL_LDSCRIPT	"arch/$(ARCH)/cpu/u-boot-spl.lds"
-+#define CONFIG_SPL_LIBCOMMON_SUPPORT
-+#define CONFIG_SPL_LIBGENERIC_SUPPORT
-+#define CONFIG_SPL_ENV_SUPPORT
-+#define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT
-+#define CONFIG_SPL_I2C_SUPPORT
-+#define CONFIG_SPL_WATCHDOG_SUPPORT
-+#define CONFIG_SPL_SERIAL_SUPPORT
-+#define CONFIG_SPL_DRIVERS_MISC_SUPPORT
-+#define CONFIG_SPL_MMC_SUPPORT
-+#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR		0xe8
-+#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS		0x400
-+
-+#define CONFIG_SPL_TEXT_BASE		0x10000000
-+#define CONFIG_SPL_MAX_SIZE		0x1a000
-+#define CONFIG_SPL_STACK		0x1001d000
-+#define CONFIG_SPL_PAD_TO		0x1c000
-+#define CONFIG_SYS_TEXT_BASE		0x82000000
-+
-+#define CONFIG_SYS_SPL_MALLOC_START	0x80200000
-+#define CONFIG_SYS_SPL_MALLOC_SIZE	0x100000
-+#define CONFIG_SPL_BSS_START_ADDR	0x80100000
-+#define CONFIG_SPL_BSS_MAX_SIZE		0x80000
-+#define CONFIG_SYS_MONITOR_LEN		0x80000
-+#endif
-+
-+#ifdef CONFIG_QSPI_BOOT
-+#define CONFIG_SYS_TEXT_BASE		0x40010000
-+#define CONFIG_SYS_NO_FLASH
-+#endif
-+
-+#ifdef CONFIG_NAND_BOOT
-+#define CONFIG_SYS_FSL_PBL_RCW	board/freescale/ls1021aqds/ls102xa_rcw_nand.cfg
-+#define CONFIG_SPL_FRAMEWORK
-+#define CONFIG_SPL_LDSCRIPT	"arch/$(ARCH)/cpu/u-boot-spl.lds"
-+#define CONFIG_SPL_LIBCOMMON_SUPPORT
-+#define CONFIG_SPL_LIBGENERIC_SUPPORT
-+#define CONFIG_SPL_ENV_SUPPORT
-+#define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT
-+#define CONFIG_SPL_I2C_SUPPORT
-+#define CONFIG_SPL_WATCHDOG_SUPPORT
-+#define CONFIG_SPL_SERIAL_SUPPORT
-+#define CONFIG_SPL_NAND_SUPPORT
-+#define CONFIG_SPL_DRIVERS_MISC_SUPPORT
-+
-+#define CONFIG_SPL_TEXT_BASE		0x10000000
-+#define CONFIG_SPL_MAX_SIZE		0x1a000
-+#define CONFIG_SPL_STACK		0x1001d000
-+#define CONFIG_SPL_PAD_TO		0x1c000
-+#define CONFIG_SYS_TEXT_BASE		0x82000000
-+
-+#define CONFIG_SYS_NAND_U_BOOT_SIZE	(400 << 10)
-+#define CONFIG_SYS_NAND_U_BOOT_OFFS	CONFIG_SPL_PAD_TO
-+#define CONFIG_SYS_NAND_PAGE_SIZE	2048
-+#define CONFIG_SYS_NAND_U_BOOT_DST	CONFIG_SYS_TEXT_BASE
-+#define CONFIG_SYS_NAND_U_BOOT_START	CONFIG_SYS_TEXT_BASE
-+
-+#define CONFIG_SYS_SPL_MALLOC_START	0x80200000
-+#define CONFIG_SYS_SPL_MALLOC_SIZE	0x100000
-+#define CONFIG_SPL_BSS_START_ADDR	0x80100000
-+#define CONFIG_SPL_BSS_MAX_SIZE		0x80000
-+#define CONFIG_SYS_MONITOR_LEN		0x80000
-+#endif
- 
- #ifndef CONFIG_SYS_TEXT_BASE
- #define CONFIG_SYS_TEXT_BASE		0x67f80000
-@@ -71,13 +148,15 @@
- 
- #define CONFIG_FSL_CAAM			/* Enable CAAM */
- 
--#if !defined(CONFIG_SDCARD) && !defined(CONFIG_NAND) && !defined(CONFIG_SPI)
-+#if !defined(CONFIG_SD_BOOT) && !defined(CONFIG_NAND_BOOT) && \
-+	!defined(CONFIG_QSPI_BOOT)
- #define CONFIG_U_QE
- #endif
- 
- /*
-  * IFC Definitions
-  */
-+#ifndef CONFIG_QSPI_BOOT
- #define CONFIG_FSL_IFC
- #define CONFIG_SYS_FLASH_BASE		0x60000000
- #define CONFIG_SYS_FLASH_BASE_PHYS	CONFIG_SYS_FLASH_BASE
-@@ -170,6 +249,7 @@
- #define CONFIG_CMD_NAND
- 
- #define CONFIG_SYS_NAND_BLOCK_SIZE	(128 * 1024)
-+#endif
- 
- /*
-  * QIXIS Definitions
-@@ -214,6 +294,40 @@
- #define CONFIG_SYS_FPGA_FTIM3		0x0
- #endif
- 
-+#if defined(CONFIG_NAND_BOOT)
-+#define CONFIG_SYS_CSPR0_EXT		CONFIG_SYS_NAND_CSPR_EXT
-+#define CONFIG_SYS_CSPR0		CONFIG_SYS_NAND_CSPR
-+#define CONFIG_SYS_AMASK0		CONFIG_SYS_NAND_AMASK
-+#define CONFIG_SYS_CSOR0		CONFIG_SYS_NAND_CSOR
-+#define CONFIG_SYS_CS0_FTIM0		CONFIG_SYS_NAND_FTIM0
-+#define CONFIG_SYS_CS0_FTIM1		CONFIG_SYS_NAND_FTIM1
-+#define CONFIG_SYS_CS0_FTIM2		CONFIG_SYS_NAND_FTIM2
-+#define CONFIG_SYS_CS0_FTIM3		CONFIG_SYS_NAND_FTIM3
-+#define CONFIG_SYS_CSPR1_EXT		CONFIG_SYS_NOR0_CSPR_EXT
-+#define CONFIG_SYS_CSPR1		CONFIG_SYS_NOR0_CSPR
-+#define CONFIG_SYS_AMASK1		CONFIG_SYS_NOR_AMASK
-+#define CONFIG_SYS_CSOR1		CONFIG_SYS_NOR_CSOR
-+#define CONFIG_SYS_CS1_FTIM0		CONFIG_SYS_NOR_FTIM0
-+#define CONFIG_SYS_CS1_FTIM1		CONFIG_SYS_NOR_FTIM1
-+#define CONFIG_SYS_CS1_FTIM2		CONFIG_SYS_NOR_FTIM2
-+#define CONFIG_SYS_CS1_FTIM3		CONFIG_SYS_NOR_FTIM3
-+#define CONFIG_SYS_CSPR2_EXT		CONFIG_SYS_NOR1_CSPR_EXT
-+#define CONFIG_SYS_CSPR2		CONFIG_SYS_NOR1_CSPR
-+#define CONFIG_SYS_AMASK2		CONFIG_SYS_NOR_AMASK
-+#define CONFIG_SYS_CSOR2		CONFIG_SYS_NOR_CSOR
-+#define CONFIG_SYS_CS2_FTIM0		CONFIG_SYS_NOR_FTIM0
-+#define CONFIG_SYS_CS2_FTIM1		CONFIG_SYS_NOR_FTIM1
-+#define CONFIG_SYS_CS2_FTIM2		CONFIG_SYS_NOR_FTIM2
-+#define CONFIG_SYS_CS2_FTIM3		CONFIG_SYS_NOR_FTIM3
-+#define CONFIG_SYS_CSPR3_EXT		CONFIG_SYS_FPGA_CSPR_EXT
-+#define CONFIG_SYS_CSPR3		CONFIG_SYS_FPGA_CSPR
-+#define CONFIG_SYS_AMASK3		CONFIG_SYS_FPGA_AMASK
-+#define CONFIG_SYS_CSOR3		CONFIG_SYS_FPGA_CSOR
-+#define CONFIG_SYS_CS3_FTIM0		CONFIG_SYS_FPGA_FTIM0
-+#define CONFIG_SYS_CS3_FTIM1		CONFIG_SYS_FPGA_FTIM1
-+#define CONFIG_SYS_CS3_FTIM2		CONFIG_SYS_FPGA_FTIM2
-+#define CONFIG_SYS_CS3_FTIM3		CONFIG_SYS_FPGA_FTIM3
-+#else
- #define CONFIG_SYS_CSPR0_EXT		CONFIG_SYS_NOR0_CSPR_EXT
- #define CONFIG_SYS_CSPR0		CONFIG_SYS_NOR0_CSPR
- #define CONFIG_SYS_AMASK0		CONFIG_SYS_NOR_AMASK
-@@ -246,6 +360,7 @@
- #define CONFIG_SYS_CS3_FTIM1		CONFIG_SYS_FPGA_FTIM1
- #define CONFIG_SYS_CS3_FTIM2		CONFIG_SYS_FPGA_FTIM2
- #define CONFIG_SYS_CS3_FTIM3		CONFIG_SYS_FPGA_FTIM3
-+#endif
- 
- /*
-  * Serial Port
-@@ -279,6 +394,21 @@
- #define CONFIG_FSL_ESDHC
- #define CONFIG_GENERIC_MMC
- 
-+#define CONFIG_CMD_FAT
-+#define CONFIG_DOS_PARTITION
-+
-+/* QSPI */
-+#ifdef CONFIG_QSPI_BOOT
-+#define CONFIG_FSL_QSPI
-+#define QSPI0_AMBA_BASE			0x40000000
-+#define FSL_QSPI_FLASH_SIZE		(1 << 24)
-+#define FSL_QSPI_FLASH_NUM		2
-+
-+#define CONFIG_CMD_SF
-+#define CONFIG_SPI_FLASH
-+#define CONFIG_SPI_FLASH_SPANSION
-+#endif
-+
- /*
-  * USB
-  */
-@@ -341,6 +471,14 @@
- #endif
- 
- #endif
-+
-+/* PCIe */
-+#define CONFIG_PCI		/* Enable PCI/PCIE */
-+#define CONFIG_PCIE1		/* PCIE controler 1 */
-+#define CONFIG_PCIE2		/* PCIE controler 2 */
-+#define CONFIG_PCIE_LAYERSCAPE	/* Use common FSL Layerscape PCIe code */
-+#define FSL_PCIE_COMPAT "fsl,ls1021a-pcie"
-+
- #define CONFIG_CMD_PING
- #define CONFIG_CMD_DHCP
- #define CONFIG_CMD_MII
-@@ -348,7 +486,20 @@
- 
- #define CONFIG_CMDLINE_TAG
- #define CONFIG_CMDLINE_EDITING
-+
-+#ifdef CONFIG_QSPI_BOOT
-+#undef CONFIG_CMD_IMLS
-+#else
- #define CONFIG_CMD_IMLS
-+#endif
-+
-+#define CONFIG_ARMV7_NONSEC
-+#define CONFIG_ARMV7_VIRT
-+#define CONFIG_PEN_ADDR_BIG_ENDIAN
-+#define CONFIG_LS102XA_NS_ACCESS
-+#define CONFIG_SMP_PEN_ADDR		0x01ee0200
-+#define CONFIG_TIMER_CLK_FREQ		12500000
-+#define CONFIG_ARMV7_SECURE_BASE	OCRAM_BASE_S_ADDR
- 
- #define CONFIG_HWCONFIG
- #define HWCONFIG_BUFFER_SIZE		128
-@@ -385,6 +536,8 @@
- 
- #define CONFIG_SYS_LOAD_ADDR		0x82000000
- 
-+#define CONFIG_LS102XA_STREAM_ID
-+
- /*
-  * Stack sizes
-  * The stack sizes are set up in start.S using the settings below
-@@ -396,17 +549,37 @@
- #define CONFIG_SYS_INIT_SP_ADDR \
- 	(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
- 
-+#ifdef CONFIG_SPL_BUILD
-+#define CONFIG_SYS_MONITOR_BASE CONFIG_SPL_TEXT_BASE
-+#else
- #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE    /* start of monitor */
-+#endif
- 
- /*
-  * Environment
-  */
- #define CONFIG_ENV_OVERWRITE
- 
-+#if defined(CONFIG_SD_BOOT)
-+#define CONFIG_ENV_OFFSET		0x100000
-+#define CONFIG_ENV_IS_IN_MMC
-+#define CONFIG_SYS_MMC_ENV_DEV		0
-+#define CONFIG_ENV_SIZE			0x2000
-+#elif defined(CONFIG_QSPI_BOOT)
-+#define CONFIG_ENV_IS_IN_SPI_FLASH
-+#define CONFIG_ENV_SIZE			0x2000          /* 8KB */
-+#define CONFIG_ENV_OFFSET		0x100000        /* 1MB */
-+#define CONFIG_ENV_SECT_SIZE		0x10000
-+#elif defined(CONFIG_NAND_BOOT)
-+#define CONFIG_ENV_IS_IN_NAND
-+#define CONFIG_ENV_SIZE			0x2000
-+#define CONFIG_ENV_OFFSET		(10 * CONFIG_SYS_NAND_BLOCK_SIZE)
-+#else
- #define CONFIG_ENV_IS_IN_FLASH
- #define CONFIG_ENV_ADDR		(CONFIG_SYS_MONITOR_BASE - CONFIG_ENV_SECT_SIZE)
- #define CONFIG_ENV_SIZE			0x2000
- #define CONFIG_ENV_SECT_SIZE		0x20000 /* 128K (one sector) */
-+#endif
- 
- #define CONFIG_OF_LIBFDT
- #define CONFIG_OF_BOARD_SETUP
-diff -ruN u-boot-2015.01-rc3/include/configs/ls1021atwr.h u-boot/include/configs/ls1021atwr.h
---- u-boot-2015.01-rc3/include/configs/ls1021atwr.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/ls1021atwr.h	2015-01-01 17:34:32.797494333 +0100
-@@ -35,6 +35,43 @@
- #define CONFIG_SYS_CLK_FREQ		100000000
- #define CONFIG_DDR_CLK_FREQ		100000000
- 
-+#ifdef CONFIG_RAMBOOT_PBL
-+#define CONFIG_SYS_FSL_PBL_PBI	board/freescale/ls1021atwr/ls102xa_pbi.cfg
-+#endif
-+
-+#ifdef CONFIG_SD_BOOT
-+#define CONFIG_SYS_FSL_PBL_RCW	board/freescale/ls1021atwr/ls102xa_rcw_sd.cfg
-+#define CONFIG_SPL_FRAMEWORK
-+#define CONFIG_SPL_LDSCRIPT	"arch/$(ARCH)/cpu/u-boot-spl.lds"
-+#define CONFIG_SPL_LIBCOMMON_SUPPORT
-+#define CONFIG_SPL_LIBGENERIC_SUPPORT
-+#define CONFIG_SPL_ENV_SUPPORT
-+#define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT
-+#define CONFIG_SPL_I2C_SUPPORT
-+#define CONFIG_SPL_WATCHDOG_SUPPORT
-+#define CONFIG_SPL_SERIAL_SUPPORT
-+#define CONFIG_SPL_MMC_SUPPORT
-+#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR		0xe8
-+#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS		0x400
-+
-+#define CONFIG_SPL_TEXT_BASE		0x10000000
-+#define CONFIG_SPL_MAX_SIZE		0x1a000
-+#define CONFIG_SPL_STACK		0x1001d000
-+#define CONFIG_SPL_PAD_TO		0x1c000
-+#define CONFIG_SYS_TEXT_BASE		0x82000000
-+
-+#define CONFIG_SYS_SPL_MALLOC_START	0x80200000
-+#define CONFIG_SYS_SPL_MALLOC_SIZE	0x100000
-+#define CONFIG_SPL_BSS_START_ADDR	0x80100000
-+#define CONFIG_SPL_BSS_MAX_SIZE		0x80000
-+#define CONFIG_SYS_MONITOR_LEN		0x80000
-+#endif
-+
-+#ifdef CONFIG_QSPI_BOOT
-+#define CONFIG_SYS_TEXT_BASE		0x40010000
-+#define CONFIG_SYS_NO_FLASH
-+#endif
-+
- #ifndef CONFIG_SYS_TEXT_BASE
- #define CONFIG_SYS_TEXT_BASE		0x67f80000
- #endif
-@@ -50,13 +87,15 @@
- 
- #define CONFIG_FSL_CAAM			/* Enable CAAM */
- 
--#if !defined(CONFIG_SDCARD) && !defined(CONFIG_NAND) && !defined(CONFIG_SPI)
-+#if !defined(CONFIG_SD_BOOT) && !defined(CONFIG_NAND_BOOT) && \
-+	!defined(CONFIG_QSPI_BOOT)
- #define CONFIG_U_QE
- #endif
- 
- /*
-  * IFC Definitions
-  */
-+#ifndef CONFIG_QSPI_BOOT
- #define CONFIG_FSL_IFC
- #define CONFIG_SYS_FLASH_BASE		0x60000000
- #define CONFIG_SYS_FLASH_BASE_PHYS	CONFIG_SYS_FLASH_BASE
-@@ -100,6 +139,7 @@
- 
- #define CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS
- #define CONFIG_SYS_WRITE_SWAPPED_DATA
-+#endif
- 
- /* CPLD */
- 
-@@ -180,6 +220,21 @@
- #define CONFIG_FSL_ESDHC
- #define CONFIG_GENERIC_MMC
- 
-+#define CONFIG_CMD_FAT
-+#define CONFIG_DOS_PARTITION
-+
-+/* QSPI */
-+#ifdef CONFIG_QSPI_BOOT
-+#define CONFIG_FSL_QSPI
-+#define QSPI0_AMBA_BASE			0x40000000
-+#define FSL_QSPI_FLASH_SIZE		(1 << 24)
-+#define FSL_QSPI_FLASH_NUM		2
-+
-+#define CONFIG_CMD_SF
-+#define CONFIG_SPI_FLASH
-+#define CONFIG_SPI_FLASH_STMICRO
-+#endif
-+
- /*
-  * Video
-  */
-@@ -236,6 +291,13 @@
- #define CONFIG_HAS_ETH2
- #endif
- 
-+/* PCIe */
-+#define CONFIG_PCI		/* Enable PCI/PCIE */
-+#define CONFIG_PCIE1		/* PCIE controler 1 */
-+#define CONFIG_PCIE2		/* PCIE controler 2 */
-+#define CONFIG_PCIE_LAYERSCAPE	/* Use common FSL Layerscape PCIe code */
-+#define FSL_PCIE_COMPAT "fsl,ls1021a-pcie"
-+
- #define CONFIG_CMD_PING
- #define CONFIG_CMD_DHCP
- #define CONFIG_CMD_MII
-@@ -243,7 +305,20 @@
- 
- #define CONFIG_CMDLINE_TAG
- #define CONFIG_CMDLINE_EDITING
-+
-+#ifdef CONFIG_QSPI_BOOT
-+#undef CONFIG_CMD_IMLS
-+#else
- #define CONFIG_CMD_IMLS
-+#endif
-+
-+#define CONFIG_ARMV7_NONSEC
-+#define CONFIG_ARMV7_VIRT
-+#define CONFIG_PEN_ADDR_BIG_ENDIAN
-+#define CONFIG_LS102XA_NS_ACCESS
-+#define CONFIG_SMP_PEN_ADDR		0x01ee0200
-+#define CONFIG_TIMER_CLK_FREQ		12500000
-+#define CONFIG_ARMV7_SECURE_BASE	OCRAM_BASE_S_ADDR
- 
- #define CONFIG_HWCONFIG
- #define HWCONFIG_BUFFER_SIZE		128
-@@ -277,6 +352,8 @@
- 
- #define CONFIG_SYS_LOAD_ADDR		0x82000000
- 
-+#define CONFIG_LS102XA_STREAM_ID
-+
- /*
-  * Stack sizes
-  * The stack sizes are set up in start.S using the settings below
-@@ -288,7 +365,11 @@
- #define CONFIG_SYS_INIT_SP_ADDR \
- 	(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
- 
-+#ifdef CONFIG_SPL_BUILD
-+#define CONFIG_SYS_MONITOR_BASE CONFIG_SPL_TEXT_BASE
-+#else
- #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE    /* start of monitor */
-+#endif
- 
- #define CONFIG_SYS_QE_FW_ADDR     0x67f40000
- 
-@@ -297,10 +378,22 @@
-  */
- #define CONFIG_ENV_OVERWRITE
- 
-+#if defined(CONFIG_SD_BOOT)
-+#define CONFIG_ENV_OFFSET		0x100000
-+#define CONFIG_ENV_IS_IN_MMC
-+#define CONFIG_SYS_MMC_ENV_DEV		0
-+#define CONFIG_ENV_SIZE			0x20000
-+#elif defined(CONFIG_QSPI_BOOT)
-+#define CONFIG_ENV_IS_IN_SPI_FLASH
-+#define CONFIG_ENV_SIZE			0x2000
-+#define CONFIG_ENV_OFFSET		0x100000
-+#define CONFIG_ENV_SECT_SIZE		0x10000
-+#else
- #define CONFIG_ENV_IS_IN_FLASH
- #define CONFIG_ENV_ADDR		(CONFIG_SYS_MONITOR_BASE - CONFIG_ENV_SECT_SIZE)
- #define CONFIG_ENV_SIZE			0x20000
- #define CONFIG_ENV_SECT_SIZE		0x20000 /* 128K (one sector) */
-+#endif
- 
- #define CONFIG_OF_LIBFDT
- #define CONFIG_OF_BOARD_SETUP
-diff -ruN u-boot-2015.01-rc3/include/configs/mx53loco.h u-boot/include/configs/mx53loco.h
---- u-boot-2015.01-rc3/include/configs/mx53loco.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/mx53loco.h	2015-01-01 17:34:32.801494268 +0100
-@@ -94,6 +94,7 @@
- /* Command definition */
- #include <config_cmd_default.h>
- #define CONFIG_CMD_BOOTZ
-+#define CONFIG_SUPPORT_RAW_INITRD
- 
- #undef CONFIG_CMD_IMLS
- 
-diff -ruN u-boot-2015.01-rc3/include/configs/mx6sabre_common.h u-boot/include/configs/mx6sabre_common.h
---- u-boot-2015.01-rc3/include/configs/mx6sabre_common.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/mx6sabre_common.h	2015-01-01 17:34:32.801494268 +0100
-@@ -220,9 +220,6 @@
- #define CONFIG_SYS_PROMPT_HUSH_PS2     "> "
- #define CONFIG_AUTO_COMPLETE
- #define CONFIG_SYS_CBSIZE              256
--
--/* Print Buffer Size */
--#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
- #define CONFIG_SYS_MAXARGS             16
- #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
- 
-diff -ruN u-boot-2015.01-rc3/include/configs/mx6slevk.h u-boot/include/configs/mx6slevk.h
---- u-boot-2015.01-rc3/include/configs/mx6slevk.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/mx6slevk.h	2015-01-01 17:34:32.805494202 +0100
-@@ -209,6 +209,20 @@
- #define CONFIG_SF_DEFAULT_MODE		SPI_MODE_0
- #endif
- 
-+/* USB Configs */
-+#define CONFIG_CMD_USB
-+#ifdef CONFIG_CMD_USB
-+#define CONFIG_USB_EHCI
-+#define CONFIG_USB_EHCI_MX6
-+#define CONFIG_USB_STORAGE
-+#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
-+#define CONFIG_USB_HOST_ETHER
-+#define CONFIG_USB_ETHER_ASIX
-+#define CONFIG_MXC_USB_PORTSC		(PORT_PTS_UTMI | PORT_PTS_PTW)
-+#define CONFIG_MXC_USB_FLAGS		0
-+#define CONFIG_USB_MAX_CONTROLLER_COUNT	2
-+#endif
-+
- #define CONFIG_SYS_FSL_USDHC_NUM	3
- #if defined(CONFIG_ENV_IS_IN_MMC)
- #define CONFIG_SYS_MMC_ENV_DEV		1	/* SDHC2*/
-diff -ruN u-boot-2015.01-rc3/include/configs/mx6sxsabresd.h u-boot/include/configs/mx6sxsabresd.h
---- u-boot-2015.01-rc3/include/configs/mx6sxsabresd.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/mx6sxsabresd.h	2015-01-01 17:34:32.805494202 +0100
-@@ -198,6 +198,20 @@
- #define CONFIG_PHYLIB
- #define CONFIG_PHY_ATHEROS
- 
-+
-+#define CONFIG_CMD_USB
-+#ifdef CONFIG_CMD_USB
-+#define CONFIG_USB_EHCI
-+#define CONFIG_USB_EHCI_MX6
-+#define CONFIG_USB_STORAGE
-+#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
-+#define CONFIG_USB_HOST_ETHER
-+#define CONFIG_USB_ETHER_ASIX
-+#define CONFIG_MXC_USB_PORTSC  (PORT_PTS_UTMI | PORT_PTS_PTW)
-+#define CONFIG_MXC_USB_FLAGS   0
-+#define CONFIG_USB_MAX_CONTROLLER_COUNT 2
-+#endif
-+
- #define CONFIG_CMD_PCI
- #ifdef CONFIG_CMD_PCI
- #define CONFIG_PCI
-@@ -208,6 +222,16 @@
- #define CONFIG_PCIE_IMX_POWER_GPIO	IMX_GPIO_NR(2, 1)
- #endif
- 
-+#define CONFIG_DM
-+#define CONFIG_DM_THERMAL
-+#define CONFIG_SYS_MALLOC_F_LEN	(1 << 10)
-+#define CONFIG_IMX6_THERMAL
-+
-+#define CONFIG_CMD_FUSE
-+#if defined(CONFIG_CMD_FUSE) || defined(CONFIG_IMX6_THERMAL)
-+#define CONFIG_MXC_OCOTP
-+#endif
-+
- /* FLASH and environment organization */
- #define CONFIG_SYS_NO_FLASH
- 
-diff -ruN u-boot-2015.01-rc3/include/configs/nyan-big.h u-boot/include/configs/nyan-big.h
---- u-boot-2015.01-rc3/include/configs/nyan-big.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/include/configs/nyan-big.h	2015-01-01 17:34:32.805494202 +0100
-@@ -0,0 +1,74 @@
-+/*
-+ * (C) Copyright 2014
-+ * NVIDIA Corporation <www.nvidia.com>
-+ *
-+ * SPDX-License-Identifier:     GPL-2.0+
-+ */
-+
-+#ifndef __CONFIG_H
-+#define __CONFIG_H
-+
-+#include <linux/sizes.h>
-+
-+#include "tegra124-common.h"
-+
-+/* High-level configuration options */
-+#define V_PROMPT			"Tegra124 (Nyan-big) # "
-+#define CONFIG_TEGRA_BOARD_STRING	"Google/NVIDIA Nyan-big"
-+
-+/* Board-specific serial config */
-+#define CONFIG_SERIAL_MULTI
-+#define CONFIG_TEGRA_ENABLE_UARTA
-+#define CONFIG_SYS_NS16550_COM1		NV_PA_APB_UARTA_BASE
-+
-+#define CONFIG_BOARD_EARLY_INIT_F
-+
-+/* I2C */
-+#define CONFIG_SYS_I2C_TEGRA
-+#define CONFIG_CMD_I2C
-+
-+/* SD/MMC */
-+#define CONFIG_MMC
-+#define CONFIG_GENERIC_MMC
-+#define CONFIG_TEGRA_MMC
-+#define CONFIG_CMD_MMC
-+
-+/* Environment in eMMC, at the end of 2nd "boot sector" */
-+#define CONFIG_ENV_IS_IN_MMC
-+#define CONFIG_SYS_MMC_ENV_DEV		0
-+#define CONFIG_SYS_MMC_ENV_PART		2
-+#define CONFIG_ENV_OFFSET		(-CONFIG_ENV_SIZE)
-+
-+/* SPI */
-+#define CONFIG_TEGRA114_SPI		/* Compatible w/ Tegra114 SPI */
-+#define CONFIG_TEGRA114_SPI_CTRLS	6
-+#define CONFIG_SPI_FLASH
-+#define CONFIG_SPI_FLASH_WINBOND
-+#define CONFIG_SF_DEFAULT_MODE         SPI_MODE_0
-+#define CONFIG_SF_DEFAULT_SPEED        24000000
-+#define CONFIG_CMD_SPI
-+#define CONFIG_CMD_SF
-+#define CONFIG_SPI_FLASH_SIZE          (4 << 20)
-+
-+/* USB Host support */
-+#define CONFIG_USB_EHCI
-+#define CONFIG_USB_EHCI_TEGRA
-+#define CONFIG_USB_MAX_CONTROLLER_COUNT	2
-+#define CONFIG_USB_STORAGE
-+#define CONFIG_CMD_USB
-+
-+/* USB networking support */
-+#define CONFIG_USB_HOST_ETHER
-+#define CONFIG_USB_ETHER_ASIX
-+
-+/* General networking support */
-+#define CONFIG_CMD_NET
-+#define CONFIG_CMD_DHCP
-+
-+#define CONFIG_FIT
-+#define CONFIG_OF_LIBFDT
-+
-+#include "tegra-common-usb-gadget.h"
-+#include "tegra-common-post.h"
-+
-+#endif /* __CONFIG_H */
-diff -ruN u-boot-2015.01-rc3/include/configs/P1023RDB.h u-boot/include/configs/P1023RDB.h
---- u-boot-2015.01-rc3/include/configs/P1023RDB.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/P1023RDB.h	2015-01-01 17:34:32.769494793 +0100
-@@ -347,9 +347,25 @@
- #define CONFIG_SYS_QMAN_MEM_BASE	0xff000000
- #define CONFIG_SYS_QMAN_MEM_PHYS	CONFIG_SYS_QMAN_MEM_BASE
- #define CONFIG_SYS_QMAN_MEM_SIZE	0x00200000
-+#define CONFIG_SYS_QMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_QMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_QMAN_CENA_BASE       CONFIG_SYS_QMAN_MEM_BASE
-+#define CONFIG_SYS_QMAN_CENA_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_CINH_BASE       (CONFIG_SYS_QMAN_MEM_BASE + \
-+					CONFIG_SYS_QMAN_CENA_SIZE)
-+#define CONFIG_SYS_QMAN_CINH_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_SWP_ISDR_REG	0xE08
- #define CONFIG_SYS_BMAN_MEM_BASE	0xff200000
- #define CONFIG_SYS_BMAN_MEM_PHYS	CONFIG_SYS_BMAN_MEM_BASE
- #define CONFIG_SYS_BMAN_MEM_SIZE	0x00200000
-+#define CONFIG_SYS_BMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_BMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_BMAN_CENA_BASE       CONFIG_SYS_BMAN_MEM_BASE
-+#define CONFIG_SYS_BMAN_CENA_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_CINH_BASE       (CONFIG_SYS_BMAN_MEM_BASE + \
-+					CONFIG_SYS_BMAN_CENA_SIZE)
-+#define CONFIG_SYS_BMAN_CINH_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_SWP_ISDR_REG	0xE08
- 
- /* For FM */
- #define CONFIG_SYS_DPAA_FMAN
-diff -ruN u-boot-2015.01-rc3/include/configs/P2041RDB.h u-boot/include/configs/P2041RDB.h
---- u-boot-2015.01-rc3/include/configs/P2041RDB.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/P2041RDB.h	2015-01-01 17:34:32.769494793 +0100
-@@ -13,6 +13,8 @@
- 
- #define CONFIG_P2041RDB
- #define CONFIG_PHYS_64BIT
-+#define CONFIG_SYS_GENERIC_BOARD
-+#define CONFIG_DISPLAY_BOARDINFO
- #define CONFIG_PPC_P2041
- 
- #ifdef CONFIG_RAMBOOT_PBL
-@@ -489,6 +491,14 @@
- #define CONFIG_SYS_BMAN_MEM_PHYS	CONFIG_SYS_BMAN_MEM_BASE
- #endif
- #define CONFIG_SYS_BMAN_MEM_SIZE	0x00200000
-+#define CONFIG_SYS_BMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_BMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_BMAN_CENA_BASE       CONFIG_SYS_BMAN_MEM_BASE
-+#define CONFIG_SYS_BMAN_CENA_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_CINH_BASE       (CONFIG_SYS_BMAN_MEM_BASE + \
-+					CONFIG_SYS_BMAN_CENA_SIZE)
-+#define CONFIG_SYS_BMAN_CINH_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_SWP_ISDR_REG	0xE08
- #define CONFIG_SYS_QMAN_NUM_PORTALS	10
- #define CONFIG_SYS_QMAN_MEM_BASE	0xf4200000
- #ifdef CONFIG_PHYS_64BIT
-@@ -497,6 +507,14 @@
- #define CONFIG_SYS_QMAN_MEM_PHYS	CONFIG_SYS_QMAN_MEM_BASE
- #endif
- #define CONFIG_SYS_QMAN_MEM_SIZE	0x00200000
-+#define CONFIG_SYS_QMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_QMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_QMAN_CENA_BASE       CONFIG_SYS_QMAN_MEM_BASE
-+#define CONFIG_SYS_QMAN_CENA_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_CINH_BASE       (CONFIG_SYS_QMAN_MEM_BASE + \
-+					CONFIG_SYS_QMAN_CENA_SIZE)
-+#define CONFIG_SYS_QMAN_CINH_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_SWP_ISDR_REG	0xE08
- 
- #define CONFIG_SYS_DPAA_FMAN
- #define CONFIG_SYS_DPAA_PME
-diff -ruN u-boot-2015.01-rc3/include/configs/rcar-gen2-common.h u-boot/include/configs/rcar-gen2-common.h
---- u-boot-2015.01-rc3/include/configs/rcar-gen2-common.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/rcar-gen2-common.h	2015-01-01 17:34:32.809494137 +0100
-@@ -28,6 +28,9 @@
- #define CONFIG_CMD_FAT
- #define CONFIG_CMD_SF
- #define CONFIG_CMD_SPI
-+#define CONFIG_CMD_EXT2
-+#define CONFIG_CMD_EXT4
-+#define CONFIG_CMD_EXT4_WRITE
- 
- #define CONFIG_SYS_THUMB_BUILD
- #define CONFIG_SYS_GENERIC_BOARD
-@@ -36,6 +39,7 @@
- #define CONFIG_FAT_WRITE
- #define CONFIG_DOS_PARTITION
- #define CONFIG_SUPPORT_VFAT
-+#define CONFIG_FS_EXT4
- #define CONFIG_EXT4_WRITE
- 
- #define CONFIG_CMDLINE_TAG
-diff -ruN u-boot-2015.01-rc3/include/configs/rpi.h u-boot/include/configs/rpi.h
---- u-boot-2015.01-rc3/include/configs/rpi.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/rpi.h	2015-01-01 17:34:32.809494137 +0100
-@@ -34,6 +34,7 @@
- #define CONFIG_DM
- #define CONFIG_CMD_DM
- #define CONFIG_DM_GPIO
-+#define CONFIG_DM_SERIAL
- 
- /* Memory layout */
- #define CONFIG_NR_DRAM_BANKS		1
-@@ -51,6 +52,7 @@
- 					 CONFIG_SYS_SDRAM_SIZE - \
- 					 GENERATED_GBL_DATA_SIZE)
- #define CONFIG_SYS_MALLOC_LEN		SZ_4M
-+#define CONFIG_SYS_MALLOC_F_LEN		(1 << 10)
- #define CONFIG_SYS_MEMTEST_START	0x00100000
- #define CONFIG_SYS_MEMTEST_END		0x00200000
- #define CONFIG_LOADADDR			0x00200000
-@@ -92,9 +94,7 @@
- #endif
- 
- /* Console UART */
--#define CONFIG_PL011_SERIAL
--#define CONFIG_PL011_CLOCK		3000000
--#define CONFIG_PL01x_PORTS		{ (void *)0x20201000 }
-+#define CONFIG_PL01X_SERIAL
- #define CONFIG_CONS_INDEX		0
- #define CONFIG_BAUDRATE			115200
- 
-diff -ruN u-boot-2015.01-rc3/include/configs/sandbox.h u-boot/include/configs/sandbox.h
---- u-boot-2015.01-rc3/include/configs/sandbox.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/sandbox.h	2015-01-01 17:34:32.809494137 +0100
-@@ -112,6 +112,12 @@
- #define CONFIG_SPI_FLASH_STMICRO
- #define CONFIG_SPI_FLASH_WINBOND
- 
-+#define CONFIG_DM_I2C
-+#define CONFIG_CMD_I2C
-+#define CONFIG_SYS_I2C_SANDBOX
-+#define CONFIG_I2C_EDID
-+#define CONFIG_I2C_EEPROM
-+
- /* Memory things - we don't really want a memory test */
- #define CONFIG_SYS_LOAD_ADDR		0x00000000
- #define CONFIG_SYS_MEMTEST_START	0x00100000
-diff -ruN u-boot-2015.01-rc3/include/configs/seaboard.h u-boot/include/configs/seaboard.h
---- u-boot-2015.01-rc3/include/configs/seaboard.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/seaboard.h	2015-01-01 17:34:32.813494071 +0100
-@@ -37,10 +37,7 @@
- 
- /* I2C */
- #define CONFIG_SYS_I2C_TEGRA
--#define CONFIG_SYS_I2C_INIT_BOARD
--#define CONFIG_SYS_I2C_SPEED		100000
- #define CONFIG_CMD_I2C
--#define CONFIG_SYS_I2C
- 
- /* SD/MMC */
- #define CONFIG_MMC
-diff -ruN u-boot-2015.01-rc3/include/configs/socfpga_common.h u-boot/include/configs/socfpga_common.h
---- u-boot-2015.01-rc3/include/configs/socfpga_common.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/socfpga_common.h	2015-01-01 17:34:32.813494071 +0100
-@@ -159,7 +159,7 @@
- #define CONFIG_SYS_MMC_MAX_BLK_COUNT	256	/* FIXME -- SPL only? */
- #endif
- 
-- /*
-+/*
-  * I2C support
-  */
- #define CONFIG_SYS_I2C
-@@ -187,6 +187,37 @@
- #define CONFIG_CMD_I2C
- 
- /*
-+ * QSPI support
-+ */
-+#ifdef CONFIG_OF_CONTROL	/* QSPI is controlled via DT */
-+#define CONFIG_CMD_DM
-+#define CONFIG_DM
-+#define CONFIG_DM_SPI
-+#define CONFIG_DM_SPI_FLASH
-+#define CONFIG_CADENCE_QSPI
-+/* Enable multiple SPI NOR flash manufacturers */
-+#define CONFIG_SPI_FLASH		/* SPI flash subsystem */
-+#define CONFIG_SPI_FLASH_STMICRO	/* Micron/Numonyx flash */
-+#define CONFIG_SPI_FLASH_SPANSION	/* Spansion flash */
-+#define CONFIG_SPI_FLASH_MTD
-+/* QSPI reference clock */
-+#ifndef __ASSEMBLY__
-+unsigned int cm_get_qspi_controller_clk_hz(void);
-+#define CONFIG_CQSPI_REF_CLK		cm_get_qspi_controller_clk_hz()
-+#endif
-+#define CONFIG_CQSPI_DECODER		0
-+#define CONFIG_CMD_SF
-+#endif
-+
-+#ifdef CONFIG_OF_CONTROL	/* DW SPI is controlled via DT */
-+#define CONFIG_CMD_DM
-+#define CONFIG_DM
-+#define CONFIG_DM_SPI
-+#define CONFIG_DESIGNWARE_SPI
-+#define CONFIG_CMD_SPI
-+#endif
-+
-+/*
-  * Serial Driver
-  */
- #define CONFIG_SYS_NS16550
-diff -ruN u-boot-2015.01-rc3/include/configs/stv0991.h u-boot/include/configs/stv0991.h
---- u-boot-2015.01-rc3/include/configs/stv0991.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/include/configs/stv0991.h	2015-01-01 17:34:32.813494071 +0100
-@@ -0,0 +1,95 @@
-+/*
-+ * (C) Copyright 2014
-+ * Vikas Manocha, STMicroelectronics, <vikas.manocha at st.com>
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#ifndef __CONFIG_STV0991_H
-+#define __CONFIG_STV0991_H
-+#define CONFIG_SYS_DCACHE_OFF
-+#define CONFIG_SYS_EXCEPTION_VECTORS_HIGH
-+#define CONFIG_BOARD_EARLY_INIT_F
-+
-+#define CONFIG_SYS_CORTEX_R4
-+
-+#define CONFIG_SYS_GENERIC_BOARD
-+#define CONFIG_SYS_NO_FLASH
-+
-+/* ram memory-related information */
-+#define CONFIG_NR_DRAM_BANKS			1
-+#define PHYS_SDRAM_1				0x00000000
-+#define CONFIG_SYS_SDRAM_BASE			PHYS_SDRAM_1
-+#define PHYS_SDRAM_1_SIZE			0x00198000
-+
-+#define CONFIG_ENV_SIZE				0x10000
-+#define CONFIG_ENV_IS_IN_FLASH
-+#define CONFIG_ENV_ADDR				\
-+	(PHYS_SDRAM_1_SIZE - CONFIG_ENV_SIZE)
-+#define CONFIG_SYS_MAXARGS			16
-+#define CONFIG_SYS_MALLOC_LEN			(CONFIG_ENV_SIZE + 16 * 1024)
-+#define CONFIG_SYS_MALLOC_F_LEN			0x2000
-+
-+#define CONFIG_DM
-+/* serial port (PL011) configuration */
-+#define CONFIG_BAUDRATE				115200
-+#ifdef CONFIG_DM
-+#define CONFIG_DM_SERIAL
-+#define CONFIG_PL01X_SERIAL
-+#else
-+#define CONFIG_SYS_SERIAL0                     0x80406000
-+#define CONFIG_CONS_INDEX			0
-+#define CONFIG_PL011_SERIAL
-+#define CONFIG_PL01x_PORTS                     {(void *)CONFIG_SYS_SERIAL0}
-+#define CONFIG_PL011_CLOCK                     (2700 * 1000)
-+#endif
-+
-+/* user interface */
-+#define CONFIG_SYS_PROMPT			"STV0991> "
-+#define CONFIG_SYS_CBSIZE			1024
-+#define CONFIG_SYS_PBSIZE			(CONFIG_SYS_CBSIZE \
-+						+sizeof(CONFIG_SYS_PROMPT) + 16)
-+
-+/* MISC */
-+#define CONFIG_SYS_LOAD_ADDR			0x00000000
-+#define CONFIG_SYS_INIT_RAM_SIZE		0x8000
-+#define CONFIG_SYS_INIT_RAM_ADDR		0x00190000
-+#define CONFIG_SYS_INIT_SP_OFFSET		\
-+	(CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
-+/* U-boot Load Address */
-+#define CONFIG_SYS_TEXT_BASE			0x00010000
-+#define CONFIG_SYS_INIT_SP_ADDR			\
-+	(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
-+
-+/* GMAC related configs */
-+
-+#define CONFIG_MII
-+#define CONFIG_PHYLIB
-+#define CONFIG_CMD_NET
-+#define CONFIG_DESIGNWARE_ETH
-+#define CONFIG_DW_ALTDESCRIPTOR
-+#define CONFIG_PHY_MICREL
-+
-+/* Command support defines */
-+#define CONFIG_CMD_PING
-+#define CONFIG_PHY_RESET_DELAY			10000		/* in usec */
-+
-+#include "config_cmd_default.h"
-+#undef CONFIG_CMD_SAVEENV
-+
-+#define CONFIG_SYS_MEMTEST_START               0x0000
-+#define CONFIG_SYS_MEMTEST_END                 1024*1024
-+#define CONFIG_CMD_MEMTEST
-+
-+/* Misc configuration */
-+#define CONFIG_SYS_LONGHELP
-+#define CONFIG_CMDLINE_EDITING
-+
-+#define CONFIG_BOOTDELAY                       3
-+#define CONFIG_BOOTCOMMAND                     "go 0x40040000"
-+#define CONFIG_AUTOBOOT_KEYED
-+#define CONFIG_AUTOBOOT_STOP_STR               " "
-+#define CONFIG_AUTOBOOT_PROMPT                 \
-+	"Hit SPACE in %d seconds to stop autoboot.\n", bootdelay
-+
-+#endif /* __CONFIG_H */
-diff -ruN u-boot-2015.01-rc3/include/configs/sun7i.h u-boot/include/configs/sun7i.h
---- u-boot-2015.01-rc3/include/configs/sun7i.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/sun7i.h	2015-01-01 17:34:32.813494071 +0100
-@@ -25,6 +25,7 @@
- #define CONFIG_ARMV7_PSCI		1
- #define CONFIG_ARMV7_SECURE_BASE	SUNXI_SRAM_B_BASE
- #define CONFIG_SYS_CLK_FREQ		24000000
-+#define CONFIG_TIMER_CLK_FREQ		CONFIG_SYS_CLK_FREQ
- 
- /*
-  * Include common sunxi configuration where most the settings are
-diff -ruN u-boot-2015.01-rc3/include/configs/T102xQDS.h u-boot/include/configs/T102xQDS.h
---- u-boot-2015.01-rc3/include/configs/T102xQDS.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/T102xQDS.h	2015-01-01 17:34:32.773494727 +0100
-@@ -720,7 +720,7 @@
- /* Qman/Bman */
- #ifndef CONFIG_NOBQFMAN
- #define CONFIG_SYS_DPAA_QBMAN		/* Support Q/Bman */
--#define CONFIG_SYS_BMAN_NUM_PORTALS	25
-+#define CONFIG_SYS_BMAN_NUM_PORTALS	10
- #define CONFIG_SYS_BMAN_MEM_BASE	0xf4000000
- #ifdef CONFIG_PHYS_64BIT
- #define CONFIG_SYS_BMAN_MEM_PHYS	0xff4000000ull
-@@ -728,7 +728,15 @@
- #define CONFIG_SYS_BMAN_MEM_PHYS	CONFIG_SYS_BMAN_MEM_BASE
- #endif
- #define CONFIG_SYS_BMAN_MEM_SIZE	0x02000000
--#define CONFIG_SYS_QMAN_NUM_PORTALS	25
-+#define CONFIG_SYS_BMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_BMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_BMAN_CENA_BASE       CONFIG_SYS_BMAN_MEM_BASE
-+#define CONFIG_SYS_BMAN_CENA_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_CINH_BASE       (CONFIG_SYS_BMAN_MEM_BASE + \
-+					CONFIG_SYS_BMAN_CENA_SIZE)
-+#define CONFIG_SYS_BMAN_CINH_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_SWP_ISDR_REG	0xE08
-+#define CONFIG_SYS_QMAN_NUM_PORTALS	10
- #define CONFIG_SYS_QMAN_MEM_BASE	0xf6000000
- #ifdef CONFIG_PHYS_64BIT
- #define CONFIG_SYS_QMAN_MEM_PHYS	0xff6000000ull
-@@ -736,6 +744,14 @@
- #define CONFIG_SYS_QMAN_MEM_PHYS	CONFIG_SYS_QMAN_MEM_BASE
- #endif
- #define CONFIG_SYS_QMAN_MEM_SIZE	0x02000000
-+#define CONFIG_SYS_QMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_QMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_QMAN_CENA_BASE       CONFIG_SYS_QMAN_MEM_BASE
-+#define CONFIG_SYS_QMAN_CENA_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_CINH_BASE       (CONFIG_SYS_QMAN_MEM_BASE + \
-+					CONFIG_SYS_QMAN_CENA_SIZE)
-+#define CONFIG_SYS_QMAN_CINH_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_SWP_ISDR_REG	0xE08
- 
- #define CONFIG_SYS_DPAA_FMAN
- 
-diff -ruN u-boot-2015.01-rc3/include/configs/T102xRDB.h u-boot/include/configs/T102xRDB.h
---- u-boot-2015.01-rc3/include/configs/T102xRDB.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/T102xRDB.h	2015-01-01 17:34:32.773494727 +0100
-@@ -677,7 +677,7 @@
- /* Qman/Bman */
- #ifndef CONFIG_NOBQFMAN
- #define CONFIG_SYS_DPAA_QBMAN		/* Support Q/Bman */
--#define CONFIG_SYS_BMAN_NUM_PORTALS	25
-+#define CONFIG_SYS_BMAN_NUM_PORTALS	10
- #define CONFIG_SYS_BMAN_MEM_BASE	0xf4000000
- #ifdef CONFIG_PHYS_64BIT
- #define CONFIG_SYS_BMAN_MEM_PHYS	0xff4000000ull
-@@ -685,7 +685,15 @@
- #define CONFIG_SYS_BMAN_MEM_PHYS	CONFIG_SYS_BMAN_MEM_BASE
- #endif
- #define CONFIG_SYS_BMAN_MEM_SIZE	0x02000000
--#define CONFIG_SYS_QMAN_NUM_PORTALS	25
-+#define CONFIG_SYS_BMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_BMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_BMAN_CENA_BASE       CONFIG_SYS_BMAN_MEM_BASE
-+#define CONFIG_SYS_BMAN_CENA_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_CINH_BASE       (CONFIG_SYS_BMAN_MEM_BASE + \
-+					CONFIG_SYS_BMAN_CENA_SIZE)
-+#define CONFIG_SYS_BMAN_CINH_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_SWP_ISDR_REG	0xE08
-+#define CONFIG_SYS_QMAN_NUM_PORTALS	10
- #define CONFIG_SYS_QMAN_MEM_BASE	0xf6000000
- #ifdef CONFIG_PHYS_64BIT
- #define CONFIG_SYS_QMAN_MEM_PHYS	0xff6000000ull
-@@ -693,6 +701,14 @@
- #define CONFIG_SYS_QMAN_MEM_PHYS	CONFIG_SYS_QMAN_MEM_BASE
- #endif
- #define CONFIG_SYS_QMAN_MEM_SIZE	0x02000000
-+#define CONFIG_SYS_QMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_QMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_QMAN_CENA_BASE       CONFIG_SYS_QMAN_MEM_BASE
-+#define CONFIG_SYS_QMAN_CENA_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_CINH_BASE       (CONFIG_SYS_QMAN_MEM_BASE + \
-+					CONFIG_SYS_QMAN_CENA_SIZE)
-+#define CONFIG_SYS_QMAN_CINH_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_SWP_ISDR_REG	0xE08
- 
- #define CONFIG_SYS_DPAA_FMAN
- 
-diff -ruN u-boot-2015.01-rc3/include/configs/T1040QDS.h u-boot/include/configs/T1040QDS.h
---- u-boot-2015.01-rc3/include/configs/T1040QDS.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/T1040QDS.h	2015-01-01 17:34:32.773494727 +0100
-@@ -605,14 +605,30 @@
- /* Qman/Bman */
- #ifndef CONFIG_NOBQFMAN
- #define CONFIG_SYS_DPAA_QBMAN		/* Support Q/Bman */
--#define CONFIG_SYS_BMAN_NUM_PORTALS	25
-+#define CONFIG_SYS_BMAN_NUM_PORTALS	10
- #define CONFIG_SYS_BMAN_MEM_BASE	0xf4000000
- #define CONFIG_SYS_BMAN_MEM_PHYS	0xff4000000ull
- #define CONFIG_SYS_BMAN_MEM_SIZE	0x02000000
--#define CONFIG_SYS_QMAN_NUM_PORTALS	25
-+#define CONFIG_SYS_BMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_BMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_BMAN_CENA_BASE       CONFIG_SYS_BMAN_MEM_BASE
-+#define CONFIG_SYS_BMAN_CENA_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_CINH_BASE       (CONFIG_SYS_BMAN_MEM_BASE + \
-+					CONFIG_SYS_BMAN_CENA_SIZE)
-+#define CONFIG_SYS_BMAN_CINH_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_SWP_ISDR_REG	0xE08
-+#define CONFIG_SYS_QMAN_NUM_PORTALS	10
- #define CONFIG_SYS_QMAN_MEM_BASE	0xf6000000
- #define CONFIG_SYS_QMAN_MEM_PHYS	0xff6000000ull
- #define CONFIG_SYS_QMAN_MEM_SIZE	0x02000000
-+#define CONFIG_SYS_QMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_QMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_QMAN_CENA_BASE       CONFIG_SYS_QMAN_MEM_BASE
-+#define CONFIG_SYS_QMAN_CENA_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_CINH_BASE       (CONFIG_SYS_QMAN_MEM_BASE + \
-+					CONFIG_SYS_QMAN_CENA_SIZE)
-+#define CONFIG_SYS_QMAN_CINH_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_SWP_ISDR_REG	0xE08
- 
- #define CONFIG_SYS_DPAA_FMAN
- #define CONFIG_SYS_DPAA_PME
-diff -ruN u-boot-2015.01-rc3/include/configs/T104xRDB.h u-boot/include/configs/T104xRDB.h
---- u-boot-2015.01-rc3/include/configs/T104xRDB.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/T104xRDB.h	2015-01-01 17:34:32.773494727 +0100
-@@ -104,7 +104,10 @@
- 
- /* support deep sleep */
- #define CONFIG_DEEP_SLEEP
-+#if defined(CONFIG_DEEP_SLEEP)
-+#define CONFIG_BOARD_EARLY_INIT_F
- #define CONFIG_SILENT_CONSOLE
-+#endif
- 
- #ifndef CONFIG_SYS_TEXT_BASE
- #define CONFIG_SYS_TEXT_BASE	0xeff40000
-@@ -636,14 +639,30 @@
- /* Qman/Bman */
- #ifndef CONFIG_NOBQFMAN
- #define CONFIG_SYS_DPAA_QBMAN		/* Support Q/Bman */
--#define CONFIG_SYS_BMAN_NUM_PORTALS	25
-+#define CONFIG_SYS_BMAN_NUM_PORTALS	10
- #define CONFIG_SYS_BMAN_MEM_BASE	0xf4000000
- #define CONFIG_SYS_BMAN_MEM_PHYS	0xff4000000ull
- #define CONFIG_SYS_BMAN_MEM_SIZE	0x02000000
--#define CONFIG_SYS_QMAN_NUM_PORTALS	25
-+#define CONFIG_SYS_BMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_BMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_BMAN_CENA_BASE       CONFIG_SYS_BMAN_MEM_BASE
-+#define CONFIG_SYS_BMAN_CENA_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_CINH_BASE       (CONFIG_SYS_BMAN_MEM_BASE + \
-+					CONFIG_SYS_BMAN_CENA_SIZE)
-+#define CONFIG_SYS_BMAN_CINH_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_SWP_ISDR_REG	0xE08
-+#define CONFIG_SYS_QMAN_NUM_PORTALS	10
- #define CONFIG_SYS_QMAN_MEM_BASE	0xf6000000
- #define CONFIG_SYS_QMAN_MEM_PHYS	0xff6000000ull
- #define CONFIG_SYS_QMAN_MEM_SIZE	0x02000000
-+#define CONFIG_SYS_QMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_QMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_QMAN_CENA_BASE       CONFIG_SYS_QMAN_MEM_BASE
-+#define CONFIG_SYS_QMAN_CENA_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_CINH_BASE       (CONFIG_SYS_QMAN_MEM_BASE + \
-+					CONFIG_SYS_QMAN_CENA_SIZE)
-+#define CONFIG_SYS_QMAN_CINH_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_SWP_ISDR_REG	0xE08
- 
- #define CONFIG_SYS_DPAA_FMAN
- #define CONFIG_SYS_DPAA_PME
-diff -ruN u-boot-2015.01-rc3/include/configs/T208xQDS.h u-boot/include/configs/T208xQDS.h
---- u-boot-2015.01-rc3/include/configs/T208xQDS.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/T208xQDS.h	2015-01-01 17:34:32.773494727 +0100
-@@ -634,10 +634,26 @@
- #define CONFIG_SYS_BMAN_MEM_BASE	0xf4000000
- #define CONFIG_SYS_BMAN_MEM_PHYS	0xff4000000ull
- #define CONFIG_SYS_BMAN_MEM_SIZE	0x02000000
-+#define CONFIG_SYS_BMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_BMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_BMAN_CENA_BASE       CONFIG_SYS_BMAN_MEM_BASE
-+#define CONFIG_SYS_BMAN_CENA_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_CINH_BASE       (CONFIG_SYS_BMAN_MEM_BASE + \
-+					CONFIG_SYS_BMAN_CENA_SIZE)
-+#define CONFIG_SYS_BMAN_CINH_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_SWP_ISDR_REG    0xE08
- #define CONFIG_SYS_QMAN_NUM_PORTALS	18
- #define CONFIG_SYS_QMAN_MEM_BASE	0xf6000000
- #define CONFIG_SYS_QMAN_MEM_PHYS	0xff6000000ull
- #define CONFIG_SYS_QMAN_MEM_SIZE	0x02000000
-+#define CONFIG_SYS_QMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_QMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_QMAN_CENA_BASE       CONFIG_SYS_QMAN_MEM_BASE
-+#define CONFIG_SYS_QMAN_CENA_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_CINH_BASE       (CONFIG_SYS_QMAN_MEM_BASE + \
-+					CONFIG_SYS_QMAN_CENA_SIZE)
-+#define CONFIG_SYS_QMAN_CINH_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_SWP_ISDR_REG	0xE08
- 
- #define CONFIG_SYS_DPAA_FMAN
- #define CONFIG_SYS_DPAA_PME
-diff -ruN u-boot-2015.01-rc3/include/configs/T208xRDB.h u-boot/include/configs/T208xRDB.h
---- u-boot-2015.01-rc3/include/configs/T208xRDB.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/T208xRDB.h	2015-01-01 17:34:32.773494727 +0100
-@@ -567,10 +567,26 @@
- #define CONFIG_SYS_BMAN_MEM_BASE	0xf4000000
- #define CONFIG_SYS_BMAN_MEM_PHYS	0xff4000000ull
- #define CONFIG_SYS_BMAN_MEM_SIZE	0x02000000
-+#define CONFIG_SYS_BMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_BMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_BMAN_CENA_BASE       CONFIG_SYS_BMAN_MEM_BASE
-+#define CONFIG_SYS_BMAN_CENA_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_CINH_BASE       (CONFIG_SYS_BMAN_MEM_BASE + \
-+					CONFIG_SYS_BMAN_CENA_SIZE)
-+#define CONFIG_SYS_BMAN_CINH_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_SWP_ISDR_REG	0xE08
- #define CONFIG_SYS_QMAN_NUM_PORTALS	18
- #define CONFIG_SYS_QMAN_MEM_BASE	0xf6000000
- #define CONFIG_SYS_QMAN_MEM_PHYS	0xff6000000ull
- #define CONFIG_SYS_QMAN_MEM_SIZE	0x02000000
-+#define CONFIG_SYS_QMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_QMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_QMAN_CENA_BASE       CONFIG_SYS_QMAN_MEM_BASE
-+#define CONFIG_SYS_QMAN_CENA_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_CINH_BASE       (CONFIG_SYS_QMAN_MEM_BASE + \
-+					CONFIG_SYS_QMAN_CENA_SIZE)
-+#define CONFIG_SYS_QMAN_CINH_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_SWP_ISDR_REG	0xE08
- 
- #define CONFIG_SYS_DPAA_FMAN
- #define CONFIG_SYS_DPAA_PME
-diff -ruN u-boot-2015.01-rc3/include/configs/T4240EMU.h u-boot/include/configs/T4240EMU.h
---- u-boot-2015.01-rc3/include/configs/T4240EMU.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/T4240EMU.h	2015-01-01 17:34:32.773494727 +0100
-@@ -85,10 +85,26 @@
- #define CONFIG_SYS_BMAN_MEM_BASE	0xf4000000
- #define CONFIG_SYS_BMAN_MEM_PHYS	0xff4000000ull
- #define CONFIG_SYS_BMAN_MEM_SIZE	0x02000000
-+#define CONFIG_SYS_BMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_BMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_BMAN_CENA_BASE       CONFIG_SYS_BMAN_MEM_BASE
-+#define CONFIG_SYS_BMAN_CENA_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_CINH_BASE       (CONFIG_SYS_BMAN_MEM_BASE + \
-+					CONFIG_SYS_BMAN_CENA_SIZE)
-+#define CONFIG_SYS_BMAN_CINH_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_SWP_ISDR_REG    0xE08
- #define CONFIG_SYS_QMAN_NUM_PORTALS	50
- #define CONFIG_SYS_QMAN_MEM_BASE	0xf6000000
- #define CONFIG_SYS_QMAN_MEM_PHYS	0xff6000000ull
- #define CONFIG_SYS_QMAN_MEM_SIZE	0x02000000
-+#define CONFIG_SYS_QMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_QMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_QMAN_CENA_BASE       CONFIG_SYS_QMAN_MEM_BASE
-+#define CONFIG_SYS_QMAN_CENA_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_CINH_BASE       (CONFIG_SYS_QMAN_MEM_BASE + \
-+					CONFIG_SYS_QMAN_CENA_SIZE)
-+#define CONFIG_SYS_QMAN_CINH_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_SWP_ISDR_REG	0xE08
- 
- #define CONFIG_SYS_DPAA_FMAN
- #define CONFIG_SYS_DPAA_PME
-diff -ruN u-boot-2015.01-rc3/include/configs/T4240QDS.h u-boot/include/configs/T4240QDS.h
---- u-boot-2015.01-rc3/include/configs/T4240QDS.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/T4240QDS.h	2015-01-01 17:34:32.773494727 +0100
-@@ -417,10 +417,26 @@
- #define CONFIG_SYS_BMAN_MEM_BASE	0xf4000000
- #define CONFIG_SYS_BMAN_MEM_PHYS	0xff4000000ull
- #define CONFIG_SYS_BMAN_MEM_SIZE	0x02000000
-+#define CONFIG_SYS_BMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_BMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_BMAN_CENA_BASE       CONFIG_SYS_BMAN_MEM_BASE
-+#define CONFIG_SYS_BMAN_CENA_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_CINH_BASE       (CONFIG_SYS_BMAN_MEM_BASE + \
-+					CONFIG_SYS_BMAN_CENA_SIZE)
-+#define CONFIG_SYS_BMAN_CINH_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_SWP_ISDR_REG    0xE08
- #define CONFIG_SYS_QMAN_NUM_PORTALS	50
- #define CONFIG_SYS_QMAN_MEM_BASE	0xf6000000
- #define CONFIG_SYS_QMAN_MEM_PHYS	0xff6000000ull
- #define CONFIG_SYS_QMAN_MEM_SIZE	0x02000000
-+#define CONFIG_SYS_QMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_QMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_QMAN_CENA_BASE       CONFIG_SYS_QMAN_MEM_BASE
-+#define CONFIG_SYS_QMAN_CENA_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_CINH_BASE       (CONFIG_SYS_QMAN_MEM_BASE + \
-+					CONFIG_SYS_QMAN_CENA_SIZE)
-+#define CONFIG_SYS_QMAN_CINH_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_SWP_ISDR_REG	0xE08
- 
- #define CONFIG_SYS_DPAA_FMAN
- #define CONFIG_SYS_DPAA_PME
-diff -ruN u-boot-2015.01-rc3/include/configs/T4240RDB.h u-boot/include/configs/T4240RDB.h
---- u-boot-2015.01-rc3/include/configs/T4240RDB.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/T4240RDB.h	2015-01-01 17:34:32.773494727 +0100
-@@ -12,6 +12,8 @@
- 
- #define CONFIG_T4240RDB
- #define CONFIG_PHYS_64BIT
-+#define CONFIG_SYS_GENERIC_BOARD
-+#define CONFIG_DISPLAY_BOARDINFO
- 
- #define CONFIG_FSL_SATA_V2
- #define CONFIG_PCIE4
-@@ -577,10 +579,26 @@
- #define CONFIG_SYS_BMAN_MEM_BASE	0xf4000000
- #define CONFIG_SYS_BMAN_MEM_PHYS	0xff4000000ull
- #define CONFIG_SYS_BMAN_MEM_SIZE	0x02000000
-+#define CONFIG_SYS_BMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_BMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_BMAN_CENA_BASE       CONFIG_SYS_BMAN_MEM_BASE
-+#define CONFIG_SYS_BMAN_CENA_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_CINH_BASE       (CONFIG_SYS_BMAN_MEM_BASE + \
-+					CONFIG_SYS_BMAN_CENA_SIZE)
-+#define CONFIG_SYS_BMAN_CINH_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_SWP_ISDR_REG    0xE08
- #define CONFIG_SYS_QMAN_NUM_PORTALS	50
- #define CONFIG_SYS_QMAN_MEM_BASE	0xf6000000
- #define CONFIG_SYS_QMAN_MEM_PHYS	0xff6000000ull
- #define CONFIG_SYS_QMAN_MEM_SIZE	0x02000000
-+#define CONFIG_SYS_QMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_QMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_QMAN_CENA_BASE       CONFIG_SYS_QMAN_MEM_BASE
-+#define CONFIG_SYS_QMAN_CENA_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_CINH_BASE       (CONFIG_SYS_QMAN_MEM_BASE + \
-+					CONFIG_SYS_QMAN_CENA_SIZE)
-+#define CONFIG_SYS_QMAN_CINH_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_SWP_ISDR_REG	0xE08
- 
- #define CONFIG_SYS_DPAA_FMAN
- #define CONFIG_SYS_DPAA_PME
-diff -ruN u-boot-2015.01-rc3/include/configs/tbs2910.h u-boot/include/configs/tbs2910.h
---- u-boot-2015.01-rc3/include/configs/tbs2910.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/tbs2910.h	2015-01-01 17:34:32.817494006 +0100
-@@ -167,7 +167,7 @@
- #define CONFIG_USB_STORAGE
- #define CONFIG_USB_KEYBOARD
- #ifdef CONFIG_USB_KEYBOARD
--#define CONFIG_SYS_USB_EVENT_POLL
-+#define CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE
- #define CONFIG_SYS_STDIO_DEREGISTER
- #define CONFIG_PREBOOT "if hdmidet; then usb start; fi"
- #endif /* CONFIG_USB_KEYBOARD */
-diff -ruN u-boot-2015.01-rc3/include/configs/tec-ng.h u-boot/include/configs/tec-ng.h
---- u-boot-2015.01-rc3/include/configs/tec-ng.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/tec-ng.h	2015-01-01 17:34:32.817494006 +0100
-@@ -23,12 +23,7 @@
- 
- /* I2C */
- #define CONFIG_SYS_I2C_TEGRA
--#define CONFIG_SYS_I2C_INIT_BOARD
--#define CONFIG_I2C_MULTI_BUS
--#define CONFIG_SYS_MAX_I2C_BUS		TEGRA_I2C_NUM_CONTROLLERS
--#define CONFIG_SYS_I2C_SPEED		100000
- #define CONFIG_CMD_I2C
--#define CONFIG_SYS_I2C
- 
- /* SD/MMC */
- #define CONFIG_MMC
-diff -ruN u-boot-2015.01-rc3/include/configs/tegra114-common.h u-boot/include/configs/tegra114-common.h
---- u-boot-2015.01-rc3/include/configs/tegra114-common.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/tegra114-common.h	2015-01-01 17:34:32.817494006 +0100
-@@ -76,9 +76,6 @@
- #define CONFIG_SYS_SPL_MALLOC_START	0x80090000
- #define CONFIG_SPL_STACK		0x800ffffc
- 
--/* Total I2C ports on Tegra114 */
--#define TEGRA_I2C_NUM_CONTROLLERS	5
--
- /* For USB EHCI controller */
- #define CONFIG_EHCI_IS_TDI
- #define CONFIG_USB_EHCI_TXFIFO_THRESH	0x10
-diff -ruN u-boot-2015.01-rc3/include/configs/tegra124-common.h u-boot/include/configs/tegra124-common.h
---- u-boot-2015.01-rc3/include/configs/tegra124-common.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/tegra124-common.h	2015-01-01 17:34:32.817494006 +0100
-@@ -68,9 +68,6 @@
- #define CONFIG_SYS_SPL_MALLOC_START	0x80090000
- #define CONFIG_SPL_STACK		0x800ffffc
- 
--/* Total I2C ports on Tegra124 */
--#define TEGRA_I2C_NUM_CONTROLLERS	5
--
- /* For USB EHCI controller */
- #define CONFIG_EHCI_IS_TDI
- #define CONFIG_USB_EHCI_TXFIFO_THRESH	0x10
-diff -ruN u-boot-2015.01-rc3/include/configs/tegra20-common.h u-boot/include/configs/tegra20-common.h
---- u-boot-2015.01-rc3/include/configs/tegra20-common.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/tegra20-common.h	2015-01-01 17:34:32.817494006 +0100
-@@ -97,9 +97,6 @@
- #define CONFIG_EHCI_IS_TDI
- #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 1
- 
--/* Total I2C ports on Tegra20 */
--#define TEGRA_I2C_NUM_CONTROLLERS	4
--
- #define CONFIG_SYS_NAND_SELF_INIT
- #define CONFIG_SYS_NAND_ONFI_DETECTION
- 
-diff -ruN u-boot-2015.01-rc3/include/configs/tegra30-common.h u-boot/include/configs/tegra30-common.h
---- u-boot-2015.01-rc3/include/configs/tegra30-common.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/tegra30-common.h	2015-01-01 17:34:32.817494006 +0100
-@@ -73,9 +73,6 @@
- #define CONFIG_SYS_SPL_MALLOC_START	0x80090000
- #define CONFIG_SPL_STACK		0x800ffffc
- 
--/* Total I2C ports on Tegra30 */
--#define TEGRA_I2C_NUM_CONTROLLERS	5
--
- /* For USB EHCI controller */
- #define CONFIG_EHCI_IS_TDI
- #define CONFIG_USB_EHCI_TXFIFO_THRESH	0x10
-diff -ruN u-boot-2015.01-rc3/include/configs/tegra-common.h u-boot/include/configs/tegra-common.h
---- u-boot-2015.01-rc3/include/configs/tegra-common.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/tegra-common.h	2015-01-01 17:34:32.817494006 +0100
-@@ -26,6 +26,7 @@
- #endif
- #define CONFIG_DM_SPI
- #define CONFIG_DM_SPI_FLASH
-+#define CONFIG_DM_I2C
- 
- #define CONFIG_SYS_TIMER_RATE		1000000
- #define CONFIG_SYS_TIMER_COUNTER	NV_PA_TMRUS_BASE
-diff -ruN u-boot-2015.01-rc3/include/configs/trimslice.h u-boot/include/configs/trimslice.h
---- u-boot-2015.01-rc3/include/configs/trimslice.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/trimslice.h	2015-01-01 17:34:32.817494006 +0100
-@@ -34,10 +34,7 @@
- 
- /* I2C */
- #define CONFIG_SYS_I2C_TEGRA
--#define CONFIG_SYS_I2C_INIT_BOARD
--#define CONFIG_SYS_I2C_SPEED		100000
- #define CONFIG_CMD_I2C
--#define CONFIG_SYS_I2C
- 
- /* SD/MMC */
- #define CONFIG_MMC
-diff -ruN u-boot-2015.01-rc3/include/configs/uniphier.h u-boot/include/configs/uniphier.h
---- u-boot-2015.01-rc3/include/configs/uniphier.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/uniphier.h	2015-01-01 17:34:32.817494006 +0100
-@@ -187,6 +187,8 @@
- #define CONFIG_FAT_WRITE
- #define CONFIG_DOS_PARTITION
- 
-+#define CONFIG_CMD_DM
-+
- /* memtest works on */
- #define CONFIG_SYS_MEMTEST_START	CONFIG_SYS_SDRAM_BASE
- #define CONFIG_SYS_MEMTEST_END		(CONFIG_SYS_SDRAM_BASE + 0x01000000)
-@@ -273,7 +275,11 @@
- #define CONFIG_SYS_SPL_MALLOC_START	(0x0ff00000)
- #define CONFIG_SYS_SPL_MALLOC_SIZE	(0x00004000)
- 
-+#ifdef CONFIG_SPL_BUILD
- #define CONFIG_SYS_INIT_SP_ADDR		(0x0ff08000)
-+#else
-+#define CONFIG_SYS_INIT_SP_ADDR		((CONFIG_SYS_TEXT_BASE) - 0x00001000)
-+#endif
- 
- #define CONFIG_SPL_FRAMEWORK
- #define CONFIG_SPL_NAND_SUPPORT
-diff -ruN u-boot-2015.01-rc3/include/configs/venice2.h u-boot/include/configs/venice2.h
---- u-boot-2015.01-rc3/include/configs/venice2.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/venice2.h	2015-01-01 17:34:32.821493940 +0100
-@@ -25,12 +25,7 @@
- 
- /* I2C */
- #define CONFIG_SYS_I2C_TEGRA
--#define CONFIG_SYS_I2C_INIT_BOARD
--#define CONFIG_I2C_MULTI_BUS
--#define CONFIG_SYS_MAX_I2C_BUS		TEGRA_I2C_NUM_CONTROLLERS
--#define CONFIG_SYS_I2C_SPEED		100000
- #define CONFIG_CMD_I2C
--#define CONFIG_SYS_I2C
- 
- /* SD/MMC */
- #define CONFIG_MMC
-diff -ruN u-boot-2015.01-rc3/include/configs/vexpress_aemv8a.h u-boot/include/configs/vexpress_aemv8a.h
---- u-boot-2015.01-rc3/include/configs/vexpress_aemv8a.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/vexpress_aemv8a.h	2015-01-01 17:34:32.821493940 +0100
-@@ -8,6 +8,9 @@
- #ifndef __VEXPRESS_AEMV8A_H
- #define __VEXPRESS_AEMV8A_H
- 
-+/* We use generic board for v8 Versatile Express */
-+#define CONFIG_SYS_GENERIC_BOARD
-+
- #ifdef CONFIG_BASE_FVP
- #ifndef CONFIG_SEMIHOSTING
- #error CONFIG_BASE_FVP requires CONFIG_SEMIHOSTING
-@@ -25,8 +28,6 @@
- 
- /*#define CONFIG_ARMV8_SWITCH_TO_EL1*/
- 
--/*#define CONFIG_SYS_GENERIC_BOARD*/
--
- #define CONFIG_SYS_NO_FLASH
- 
- #define CONFIG_SUPPORT_RAW_INITRD
-diff -ruN u-boot-2015.01-rc3/include/configs/whistler.h u-boot/include/configs/whistler.h
---- u-boot-2015.01-rc3/include/configs/whistler.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/whistler.h	2015-01-01 17:34:32.821493940 +0100
-@@ -26,10 +26,7 @@
- 
- /* I2C */
- #define CONFIG_SYS_I2C_TEGRA
--#define CONFIG_SYS_I2C_INIT_BOARD
--#define CONFIG_SYS_I2C_SPEED		100000
- #define CONFIG_CMD_I2C
--#define CONFIG_SYS_I2C
- 
- /* SD/MMC */
- #define CONFIG_MMC
-diff -ruN u-boot-2015.01-rc3/include/dfu.h u-boot/include/dfu.h
---- u-boot-2015.01-rc3/include/dfu.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/dfu.h	2015-01-01 17:34:32.825493874 +0100
-@@ -150,9 +150,6 @@
- char *dfu_extract_token(char** e, int *n);
- void dfu_trigger_reset(void);
- int dfu_get_alt(char *name);
--bool dfu_detach(void);
--void dfu_trigger_detach(void);
--void dfu_clear_detach(void);
- int dfu_init_env_entities(char *interface, char *devstr);
- unsigned char *dfu_get_buf(struct dfu_entity *dfu);
- unsigned char *dfu_free_buf(void);
-diff -ruN u-boot-2015.01-rc3/include/dm/uclass-id.h u-boot/include/dm/uclass-id.h
---- u-boot-2015.01-rc3/include/dm/uclass-id.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/dm/uclass-id.h	2015-01-01 17:34:32.825493874 +0100
-@@ -19,6 +19,7 @@
- 	UCLASS_TEST_FDT,
- 	UCLASS_TEST_BUS,
- 	UCLASS_SPI_EMUL,	/* sandbox SPI device emulator */
-+	UCLASS_I2C_EMUL,	/* sandbox I2C device emulator */
- 	UCLASS_SIMPLE_BUS,
- 
- 	/* U-Boot uclasses start here */
-@@ -29,6 +30,9 @@
- 	UCLASS_SPI_FLASH,	/* SPI flash */
- 	UCLASS_CROS_EC,	/* Chrome OS EC */
- 	UCLASS_THERMAL,		/* Thermal sensor */
-+	UCLASS_I2C,		/* I2C bus */
-+	UCLASS_I2C_GENERIC,	/* Generic I2C device */
-+	UCLASS_I2C_EEPROM,	/* I2C EEPROM device */
- 
- 	UCLASS_COUNT,
- 	UCLASS_INVALID = -1,
-diff -ruN u-boot-2015.01-rc3/include/dm/ut.h u-boot/include/dm/ut.h
---- u-boot-2015.01-rc3/include/dm/ut.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/dm/ut.h	2015-01-01 17:34:32.825493874 +0100
-@@ -89,6 +89,18 @@
- 	}								\
- }
- 
-+/* Assert that a pointer is not NULL */
-+#define ut_assertnonnull(expr) {					\
-+	const void *val = (expr);					\
-+									\
-+	if (val == NULL) {						\
-+		ut_failf(dms, __FILE__, __LINE__, __func__,		\
-+			 #expr " = NULL",				\
-+			 "Expected non-null, got NULL");		\
-+		return -1;						\
-+	}								\
-+}
-+
- /* Assert that an operation succeeds (returns 0) */
- #define ut_assertok(cond)	ut_asserteq(0, cond)
- 
-diff -ruN u-boot-2015.01-rc3/include/dt-bindings/pinctrl/pinctrl-tegra.h u-boot/include/dt-bindings/pinctrl/pinctrl-tegra.h
---- u-boot-2015.01-rc3/include/dt-bindings/pinctrl/pinctrl-tegra.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/include/dt-bindings/pinctrl/pinctrl-tegra.h	2015-01-01 17:34:32.825493874 +0100
-@@ -0,0 +1,45 @@
-+/*
-+ * This header provides constants for Tegra pinctrl bindings.
-+ *
-+ * Copyright (c) 2013, NVIDIA CORPORATION.  All rights reserved.
-+ *
-+ * Author: Laxman Dewangan <ldewangan at nvidia.com>
-+ *
-+ * This program is free software; you can redistribute it and/or modify it
-+ * under the terms and conditions of the GNU General Public License,
-+ * version 2, as published by the Free Software Foundation.
-+ *
-+ * This program is distributed in the hope 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.
-+ */
-+
-+#ifndef _DT_BINDINGS_PINCTRL_TEGRA_H
-+#define _DT_BINDINGS_PINCTRL_TEGRA_H
-+
-+/*
-+ * Enable/disable for diffeent dt properties. This is applicable for
-+ * properties nvidia,enable-input, nvidia,tristate, nvidia,open-drain,
-+ * nvidia,lock, nvidia,rcv-sel, nvidia,high-speed-mode, nvidia,schmitt.
-+ */
-+#define TEGRA_PIN_DISABLE				0
-+#define TEGRA_PIN_ENABLE				1
-+
-+#define TEGRA_PIN_PULL_NONE				0
-+#define TEGRA_PIN_PULL_DOWN				1
-+#define TEGRA_PIN_PULL_UP				2
-+
-+/* Low power mode driver */
-+#define TEGRA_PIN_LP_DRIVE_DIV_8			0
-+#define TEGRA_PIN_LP_DRIVE_DIV_4			1
-+#define TEGRA_PIN_LP_DRIVE_DIV_2			2
-+#define TEGRA_PIN_LP_DRIVE_DIV_1			3
-+
-+/* Rising/Falling slew rate */
-+#define TEGRA_PIN_SLEW_RATE_FASTEST			0
-+#define TEGRA_PIN_SLEW_RATE_FAST			1
-+#define TEGRA_PIN_SLEW_RATE_SLOW			2
-+#define TEGRA_PIN_SLEW_RATE_SLOWEST			3
-+
-+#endif
-diff -ruN u-boot-2015.01-rc3/include/dt-bindings/reset/altr,rst-mgr.h u-boot/include/dt-bindings/reset/altr,rst-mgr.h
---- u-boot-2015.01-rc3/include/dt-bindings/reset/altr,rst-mgr.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/dt-bindings/reset/altr,rst-mgr.h	2015-01-01 17:34:32.825493874 +0100
-@@ -1,14 +1,7 @@
- /*
-  * Copyright (c) 2014, Steffen Trumtrar <s.trumtrar at pengutronix.de>
-  *
-- * This software is licensed under the terms of the GNU General Public
-- * License version 2, as published by the Free Software Foundation, and
-- * may be copied, distributed, and modified under those terms.
-- *
-- * 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.
-+ * SPDX-License-Identifier:	GPL-2.0
-  */
- 
- #ifndef _DT_BINDINGS_RESET_ALTR_RST_MGR_H
-diff -ruN u-boot-2015.01-rc3/include/errno.h u-boot/include/errno.h
---- u-boot-2015.01-rc3/include/errno.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/errno.h	2015-01-01 17:34:32.829493808 +0100
-@@ -6,4 +6,7 @@
- 
- #define __set_errno(val) do { errno = val; } while (0)
- 
-+#ifdef CONFIG_ERRNO_STR
-+const char *errno_str(int errno);
-+#endif
- #endif /* _ERRNO_H */
-diff -ruN u-boot-2015.01-rc3/include/fsl_ddr_sdram.h u-boot/include/fsl_ddr_sdram.h
---- u-boot-2015.01-rc3/include/fsl_ddr_sdram.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/fsl_ddr_sdram.h	2015-01-01 17:34:32.829493808 +0100
-@@ -114,6 +114,7 @@
- #define SDRAM_CFG_2T_EN			0x00008000
- #define SDRAM_CFG_BI			0x00000001
- 
-+#define SDRAM_CFG2_FRC_SR		0x80000000
- #define SDRAM_CFG2_D_INIT		0x00000010
- #define SDRAM_CFG2_ODT_CFG_MASK		0x00600000
- #define SDRAM_CFG2_ODT_NEVER		0
-@@ -163,6 +164,7 @@
- #define DDR_CDR1_ODT(x) ((x & DDR_CDR1_ODT_MASK) << DDR_CDR1_ODT_SHIFT)
- #define DDR_CDR2_ODT(x) (x & DDR_CDR2_ODT_MASK)
- #define DDR_CDR2_VREF_OVRD(x)	(0x00008080 | ((((x) - 37) & 0x3F) << 8))
-+#define DDR_CDR2_VREF_TRAIN_EN	0x00000080
- 
- #if (defined(CONFIG_SYS_FSL_DDR_VER) && \
- 	(CONFIG_SYS_FSL_DDR_VER >= FSL_DDR_VER_4_7))
-@@ -202,6 +204,8 @@
- #define DDR_CDR_ODT_120ohm	0x6
- #endif
- 
-+#define DDR_INIT_ADDR_EXT_UIA	(1 << 31)
-+
- /* Record of register values computed */
- typedef struct fsl_ddr_cfg_regs_s {
- 	struct {
-@@ -414,9 +418,11 @@
- int board_need_mem_reset(void)
- 	__attribute__((weak, alias("__board_need_mem_reset")));
- 
--void __weak board_mem_sleep_setup(void)
--{
--}
-+#if defined(CONFIG_DEEP_SLEEP)
-+void board_mem_sleep_setup(void);
-+bool is_warm_boot(void);
-+int fsl_dp_resume(void);
-+#endif
- 
- /*
-  * The 85xx boards have a common prototype for fixed_sdram so put the
-diff -ruN u-boot-2015.01-rc3/include/fsl_usb.h u-boot/include/fsl_usb.h
---- u-boot-2015.01-rc3/include/fsl_usb.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/fsl_usb.h	2015-01-01 17:34:32.829493808 +0100
-@@ -145,6 +145,25 @@
- 	return SVR_SOC_VER(get_svr()) == SVR_T4240 &&
- 		IS_SVR_REV(get_svr(), 2, 0);
- }
-+
-+static inline bool has_erratum_a007792(void)
-+{
-+	u32 svr = get_svr();
-+	u32 soc = SVR_SOC_VER(svr);
-+
-+	switch (soc) {
-+	case SVR_T4240:
-+	case SVR_T4160:
-+		return IS_SVR_REV(svr, 2, 0);
-+	case SVR_T1040:
-+		return IS_SVR_REV(svr, 1, 0);
-+	case SVR_T2080:
-+	case SVR_T2081:
-+		return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 1, 1);
-+	}
-+	return false;
-+}
-+
- #else
- static inline bool has_erratum_a006261(void)
- {
-@@ -161,5 +180,9 @@
- 	return false;
- }
- 
-+static inline bool has_erratum_a007792(void)
-+{
-+	return false;
-+}
- #endif
- #endif /*_ASM_FSL_USB_H_ */
-diff -ruN u-boot-2015.01-rc3/include/g_dnl.h u-boot/include/g_dnl.h
---- u-boot-2015.01-rc3/include/g_dnl.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/g_dnl.h	2015-01-01 17:34:32.829493808 +0100
-@@ -39,4 +39,8 @@
- void g_dnl_unregister(void);
- void g_dnl_set_serialnumber(char *);
- 
-+bool g_dnl_detach(void);
-+void g_dnl_trigger_detach(void);
-+void g_dnl_clear_detach(void);
-+
- #endif /* __G_DOWNLOAD_H_ */
-diff -ruN u-boot-2015.01-rc3/include/i2c_eeprom.h u-boot/include/i2c_eeprom.h
---- u-boot-2015.01-rc3/include/i2c_eeprom.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/include/i2c_eeprom.h	2015-01-01 17:34:32.833493744 +0100
-@@ -0,0 +1,19 @@
-+/*
-+ * Copyright (c) 2014 Google, Inc
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#ifndef __I2C_EEPROM
-+#define __I2C_EEPROM
-+
-+struct i2c_eeprom_ops {
-+	int (*read)(struct udevice *dev, int offset, uint8_t *buf, int size);
-+	int (*write)(struct udevice *dev, int offset, const uint8_t *buf,
-+		     int size);
-+};
-+
-+struct i2c_eeprom {
-+};
-+
-+#endif
-diff -ruN u-boot-2015.01-rc3/include/i2c.h u-boot/include/i2c.h
---- u-boot-2015.01-rc3/include/i2c.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/i2c.h	2015-01-01 17:34:32.833493744 +0100
-@@ -18,6 +18,355 @@
- #define _I2C_H_
- 
- /*
-+ * For now there are essentially two parts to this file - driver model
-+ * here at the top, and the older code below (with CONFIG_SYS_I2C being
-+ * most recent). The plan is to migrate everything to driver model.
-+ * The driver model structures and API are separate as they are different
-+ * enough as to be incompatible for compilation purposes.
-+ */
-+
-+#ifdef CONFIG_DM_I2C
-+
-+enum dm_i2c_chip_flags {
-+	DM_I2C_CHIP_10BIT	= 1 << 0, /* Use 10-bit addressing */
-+	DM_I2C_CHIP_RD_ADDRESS	= 1 << 1, /* Send address for each read byte */
-+	DM_I2C_CHIP_WR_ADDRESS	= 1 << 2, /* Send address for each write byte */
-+};
-+
-+/**
-+ * struct dm_i2c_chip - information about an i2c chip
-+ *
-+ * An I2C chip is a device on the I2C bus. It sits at a particular address
-+ * and normally supports 7-bit or 10-bit addressing.
-+ *
-+ * To obtain this structure, use dev_get_parentdata(dev) where dev is the
-+ * chip to examine.
-+ *
-+ * @chip_addr:	Chip address on bus
-+ * @offset_len: Length of offset in bytes. A single byte offset can
-+ *		represent up to 256 bytes. A value larger than 1 may be
-+ *		needed for larger devices.
-+ * @flags:	Flags for this chip (dm_i2c_chip_flags)
-+ * @emul: Emulator for this chip address (only used for emulation)
-+ */
-+struct dm_i2c_chip {
-+	uint chip_addr;
-+	uint offset_len;
-+	uint flags;
-+#ifdef CONFIG_SANDBOX
-+	struct udevice *emul;
-+#endif
-+};
-+
-+/**
-+ * struct dm_i2c_bus- information about an i2c bus
-+ *
-+ * An I2C bus contains 0 or more chips on it, each at its own address. The
-+ * bus can operate at different speeds (measured in Hz, typically 100KHz
-+ * or 400KHz).
-+ *
-+ * To obtain this structure, use bus->uclass_priv where bus is the I2C
-+ * bus udevice.
-+ *
-+ * @speed_hz: Bus speed in hertz (typically 100000)
-+ */
-+struct dm_i2c_bus {
-+	int speed_hz;
-+};
-+
-+/**
-+ * i2c_read() - read bytes from an I2C chip
-+ *
-+ * To obtain an I2C device (called a 'chip') given the I2C bus address you
-+ * can use i2c_get_chip(). To obtain a bus by bus number use
-+ * uclass_get_device_by_seq(UCLASS_I2C, <bus number>).
-+ *
-+ * To set the address length of a devce use i2c_set_addr_len(). It
-+ * defaults to 1.
-+ *
-+ * @dev:	Chip to read from
-+ * @offset:	Offset within chip to start reading
-+ * @buffer:	Place to put data
-+ * @len:	Number of bytes to read
-+ *
-+ * @return 0 on success, -ve on failure
-+ */
-+int i2c_read(struct udevice *dev, uint offset, uint8_t *buffer,
-+	     int len);
-+
-+/**
-+ * i2c_write() - write bytes to an I2C chip
-+ *
-+ * See notes for i2c_read() above.
-+ *
-+ * @dev:	Chip to write to
-+ * @offset:	Offset within chip to start writing
-+ * @buffer:	Buffer containing data to write
-+ * @len:	Number of bytes to write
-+ *
-+ * @return 0 on success, -ve on failure
-+ */
-+int i2c_write(struct udevice *dev, uint offset, const uint8_t *buffer,
-+	      int len);
-+
-+/**
-+ * i2c_probe() - probe a particular chip address
-+ *
-+ * This can be useful to check for the existence of a chip on the bus.
-+ * It is typically implemented by writing the chip address to the bus
-+ * and checking that the chip replies with an ACK.
-+ *
-+ * @bus:	Bus to probe
-+ * @chip_addr:	7-bit address to probe (10-bit and others are not supported)
-+ * @chip_flags:	Flags for the probe (see enum dm_i2c_chip_flags)
-+ * @devp:	Returns the device found, or NULL if none
-+ * @return 0 if a chip was found at that address, -ve if not
-+ */
-+int i2c_probe(struct udevice *bus, uint chip_addr, uint chip_flags,
-+	      struct udevice **devp);
-+
-+/**
-+ * i2c_set_bus_speed() - set the speed of a bus
-+ *
-+ * @bus:	Bus to adjust
-+ * @speed:	Requested speed in Hz
-+ * @return 0 if OK, -EINVAL for invalid values
-+ */
-+int i2c_set_bus_speed(struct udevice *bus, unsigned int speed);
-+
-+/**
-+ * i2c_get_bus_speed() - get the speed of a bus
-+ *
-+ * @bus:	Bus to check
-+ * @return speed of selected I2C bus in Hz, -ve on error
-+ */
-+int i2c_get_bus_speed(struct udevice *bus);
-+
-+/**
-+ * i2c_set_chip_flags() - set flags for a chip
-+ *
-+ * Typically addresses are 7 bits, but for 10-bit addresses you should set
-+ * flags to DM_I2C_CHIP_10BIT. All accesses will then use 10-bit addressing.
-+ *
-+ * @dev:	Chip to adjust
-+ * @flags:	New flags
-+ * @return 0 if OK, -EINVAL if value is unsupported, other -ve value on error
-+ */
-+int i2c_set_chip_flags(struct udevice *dev, uint flags);
-+
-+/**
-+ * i2c_get_chip_flags() - get flags for a chip
-+ *
-+ * @dev:	Chip to check
-+ * @flagsp:	Place to put flags
-+ * @return 0 if OK, other -ve value on error
-+ */
-+int i2c_get_chip_flags(struct udevice *dev, uint *flagsp);
-+
-+/**
-+ * i2c_set_offset_len() - set the offset length for a chip
-+ *
-+ * The offset used to access a chip may be up to 4 bytes long. Typically it
-+ * is only 1 byte, which is enough for chips with 256 bytes of memory or
-+ * registers. The default value is 1, but you can call this function to
-+ * change it.
-+ *
-+ * @offset_len:	New offset length value (typically 1 or 2)
-+ */
-+
-+int i2c_set_chip_offset_len(struct udevice *dev, uint offset_len);
-+/**
-+ * i2c_deblock() - recover a bus that is in an unknown state
-+ *
-+ * See the deblock() method in 'struct dm_i2c_ops' for full information
-+ *
-+ * @bus:	Bus to recover
-+ * @return 0 if OK, -ve on error
-+ */
-+int i2c_deblock(struct udevice *bus);
-+
-+/*
-+ * Not all of these flags are implemented in the U-Boot API
-+ */
-+enum dm_i2c_msg_flags {
-+	I2C_M_TEN		= 0x0010, /* ten-bit chip address */
-+	I2C_M_RD		= 0x0001, /* read data, from slave to master */
-+	I2C_M_STOP		= 0x8000, /* send stop after this message */
-+	I2C_M_NOSTART		= 0x4000, /* no start before this message */
-+	I2C_M_REV_DIR_ADDR	= 0x2000, /* invert polarity of R/W bit */
-+	I2C_M_IGNORE_NAK	= 0x1000, /* continue after NAK */
-+	I2C_M_NO_RD_ACK		= 0x0800, /* skip the Ack bit on reads */
-+	I2C_M_RECV_LEN		= 0x0400, /* length is first received byte */
-+};
-+
-+/**
-+ * struct i2c_msg - an I2C message
-+ *
-+ * @addr:	Slave address
-+ * @flags:	Flags (see enum dm_i2c_msg_flags)
-+ * @len:	Length of buffer in bytes, may be 0 for a probe
-+ * @buf:	Buffer to send/receive, or NULL if no data
-+ */
-+struct i2c_msg {
-+	uint addr;
-+	uint flags;
-+	uint len;
-+	u8 *buf;
-+};
-+
-+/**
-+ * struct i2c_msg_list - a list of I2C messages
-+ *
-+ * This is called i2c_rdwr_ioctl_data in Linux but the name does not seem
-+ * appropriate in U-Boot.
-+ *
-+ * @msg:	Pointer to i2c_msg array
-+ * @nmsgs:	Number of elements in the array
-+ */
-+struct i2c_msg_list {
-+	struct i2c_msg *msgs;
-+	uint nmsgs;
-+};
-+
-+/**
-+ * struct dm_i2c_ops - driver operations for I2C uclass
-+ *
-+ * Drivers should support these operations unless otherwise noted. These
-+ * operations are intended to be used by uclass code, not directly from
-+ * other code.
-+ */
-+struct dm_i2c_ops {
-+	/**
-+	 * xfer() - transfer a list of I2C messages
-+	 *
-+	 * @bus:	Bus to read from
-+	 * @msg:	List of messages to transfer
-+	 * @nmsgs:	Number of messages in the list
-+	 * @return 0 if OK, -EREMOTEIO if the slave did not ACK a byte,
-+	 *	-ECOMM if the speed cannot be supported, -EPROTO if the chip
-+	 *	flags cannot be supported, other -ve value on some other error
-+	 */
-+	int (*xfer)(struct udevice *bus, struct i2c_msg *msg, int nmsgs);
-+
-+	/**
-+	 * probe_chip() - probe for the presense of a chip address
-+	 *
-+	 * This function is optional. If omitted, the uclass will send a zero
-+	 * length message instead.
-+	 *
-+	 * @bus:	Bus to probe
-+	 * @chip_addr:	Chip address to probe
-+	 * @chip_flags:	Probe flags (enum dm_i2c_chip_flags)
-+	 * @return 0 if chip was found, -EREMOTEIO if not, -ENOSYS to fall back
-+	 * to default probem other -ve value on error
-+	 */
-+	int (*probe_chip)(struct udevice *bus, uint chip_addr, uint chip_flags);
-+
-+	/**
-+	 * set_bus_speed() - set the speed of a bus (optional)
-+	 *
-+	 * The bus speed value will be updated by the uclass if this function
-+	 * does not return an error. This method is optional - if it is not
-+	 * provided then the driver can read the speed from
-+	 * bus->uclass_priv->speed_hz
-+	 *
-+	 * @bus:	Bus to adjust
-+	 * @speed:	Requested speed in Hz
-+	 * @return 0 if OK, -EINVAL for invalid values
-+	 */
-+	int (*set_bus_speed)(struct udevice *bus, unsigned int speed);
-+
-+	/**
-+	 * get_bus_speed() - get the speed of a bus (optional)
-+	 *
-+	 * Normally this can be provided by the uclass, but if you want your
-+	 * driver to check the bus speed by looking at the hardware, you can
-+	 * implement that here. This method is optional. This method would
-+	 * normally be expected to return bus->uclass_priv->speed_hz.
-+	 *
-+	 * @bus:	Bus to check
-+	 * @return speed of selected I2C bus in Hz, -ve on error
-+	 */
-+	int (*get_bus_speed)(struct udevice *bus);
-+
-+	/**
-+	 * set_flags() - set the flags for a chip (optional)
-+	 *
-+	 * This is generally implemented by the uclass, but drivers can
-+	 * check the value to ensure that unsupported options are not used.
-+	 * This method is optional. If provided, this method will always be
-+	 * called when the flags change.
-+	 *
-+	 * @dev:	Chip to adjust
-+	 * @flags:	New flags value
-+	 * @return 0 if OK, -EINVAL if value is unsupported
-+	 */
-+	int (*set_flags)(struct udevice *dev, uint flags);
-+
-+	/**
-+	 * deblock() - recover a bus that is in an unknown state
-+	 *
-+	 * I2C is a synchronous protocol and resets of the processor in the
-+	 * middle of an access can block the I2C Bus until a powerdown of
-+	 * the full unit is done. This is because slaves can be stuck
-+	 * waiting for addition bus transitions for a transaction that will
-+	 * never complete. Resetting the I2C master does not help. The only
-+	 * way is to force the bus through a series of transitions to make
-+	 * sure that all slaves are done with the transaction. This method
-+	 * performs this 'deblocking' if support by the driver.
-+	 *
-+	 * This method is optional.
-+	 */
-+	int (*deblock)(struct udevice *bus);
-+};
-+
-+#define i2c_get_ops(dev)	((struct dm_i2c_ops *)(dev)->driver->ops)
-+
-+/**
-+ * i2c_get_chip() - get a device to use to access a chip on a bus
-+ *
-+ * This returns the device for the given chip address. The device can then
-+ * be used with calls to i2c_read(), i2c_write(), i2c_probe(), etc.
-+ *
-+ * @bus:	Bus to examine
-+ * @chip_addr:	Chip address for the new device
-+ * @devp:	Returns pointer to new device if found or -ENODEV if not
-+ *		found
-+ */
-+int i2c_get_chip(struct udevice *bus, uint chip_addr, struct udevice **devp);
-+
-+/**
-+ * i2c_get_chip() - get a device to use to access a chip on a bus number
-+ *
-+ * This returns the device for the given chip address on a particular bus
-+ * number.
-+ *
-+ * @busnum:	Bus number to examine
-+ * @chip_addr:	Chip address for the new device
-+ * @devp:	Returns pointer to new device if found or -ENODEV if not
-+ *		found
-+ */
-+int i2c_get_chip_for_busnum(int busnum, int chip_addr, struct udevice **devp);
-+
-+/**
-+ * i2c_chip_ofdata_to_platdata() - Decode standard I2C platform data
-+ *
-+ * This decodes the chip address from a device tree node and puts it into
-+ * its dm_i2c_chip structure. This should be called in your driver's
-+ * ofdata_to_platdata() method.
-+ *
-+ * @blob:	Device tree blob
-+ * @node:	Node offset to read from
-+ * @spi:	Place to put the decoded information
-+ */
-+int i2c_chip_ofdata_to_platdata(const void *blob, int node,
-+				struct dm_i2c_chip *chip);
-+
-+#endif
-+
-+#ifndef CONFIG_DM_I2C
-+
-+/*
-  * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
-  *
-  * The implementation MUST NOT use static or global variables if the
-@@ -451,4 +800,7 @@
-  * @return 0 if port was reset, -1 if not found
-  */
- int i2c_reset_port_fdt(const void *blob, int node);
-+
-+#endif /* !CONFIG_DM_I2C */
-+
- #endif	/* _I2C_H_ */
-diff -ruN u-boot-2015.01-rc3/include/linux/linkage.h u-boot/include/linux/linkage.h
---- u-boot-2015.01-rc3/include/linux/linkage.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/linux/linkage.h	2015-01-01 17:34:32.837493678 +0100
-@@ -17,7 +17,9 @@
- #define CPP_ASMLINKAGE
- #endif
- 
-+#ifndef asmlinkage
- #define asmlinkage CPP_ASMLINKAGE
-+#endif
- 
- #define SYMBOL_NAME_STR(X)	#X
- #define SYMBOL_NAME(X)		X
-diff -ruN u-boot-2015.01-rc3/include/linux/string.h u-boot/include/linux/string.h
---- u-boot-2015.01-rc3/include/linux/string.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/linux/string.h	2015-01-01 17:34:32.837493678 +0100
-@@ -30,6 +30,9 @@
- #ifndef __HAVE_ARCH_STRNCPY
- extern char * strncpy(char *,const char *, __kernel_size_t);
- #endif
-+#ifndef __HAVE_ARCH_STRLCPY
-+size_t strlcpy(char *, const char *, size_t);
-+#endif
- #ifndef __HAVE_ARCH_STRCAT
- extern char * strcat(char *, const char *);
- #endif
-diff -ruN u-boot-2015.01-rc3/include/mmc.h u-boot/include/mmc.h
---- u-boot-2015.01-rc3/include/mmc.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/mmc.h	2015-01-01 17:34:32.841493612 +0100
-@@ -31,6 +31,7 @@
- #define MMC_VERSION_4_3		(MMC_VERSION_MMC | 0x403)
- #define MMC_VERSION_4_41	(MMC_VERSION_MMC | 0x429)
- #define MMC_VERSION_4_5		(MMC_VERSION_MMC | 0x405)
-+#define MMC_VERSION_5_0		(MMC_VERSION_MMC | 0x500)
- 
- #define MMC_MODE_HS		(1 << 0)
- #define MMC_MODE_HS_52MHz	(1 << 1)
-@@ -147,6 +148,7 @@
-  * EXT_CSD fields
-  */
- #define EXT_CSD_GP_SIZE_MULT		143	/* R/W */
-+#define EXT_CSD_PARTITION_SETTING	155	/* R/W */
- #define EXT_CSD_PARTITIONS_ATTRIBUTE	156	/* R/W */
- #define EXT_CSD_PARTITIONING_SUPPORT	160	/* RO */
- #define EXT_CSD_RST_N_FUNCTION		162	/* R/W */
-@@ -197,6 +199,8 @@
- #define EXT_CSD_BOOT_BUS_WIDTH_RESET(x)	(x << 2)
- #define EXT_CSD_BOOT_BUS_WIDTH_WIDTH(x)	(x)
- 
-+#define EXT_CSD_PARTITION_SETTING_COMPLETED	(1 << 0)
-+
- #define R1_ILLEGAL_COMMAND		(1 << 22)
- #define R1_APP_CMD			(1 << 5)
- 
-@@ -314,6 +318,7 @@
- 	char init_in_progress;	/* 1 if we have done mmc_start_init() */
- 	char preinit;		/* start init as early as possible */
- 	uint op_cond_response;	/* the response byte from the last op_cond */
-+	int ddr_mode;
- };
- 
- int mmc_register(struct mmc *mmc);
-diff -ruN u-boot-2015.01-rc3/include/part.h u-boot/include/part.h
---- u-boot-2015.01-rc3/include/part.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/part.h	2015-01-01 17:34:32.845493546 +0100
-@@ -244,6 +244,26 @@
-  */
- int gpt_restore(block_dev_desc_t *dev_desc, char *str_disk_guid,
- 		disk_partition_t *partitions, const int parts_count);
-+
-+/**
-+ * is_valid_gpt_buf() - Ensure that the Primary GPT information is valid
-+ *
-+ * @param dev_desc - block device descriptor
-+ * @param buf - buffer which contains the MBR and Primary GPT info
-+ *
-+ * @return - '0' on success, otherwise error
-+ */
-+int is_valid_gpt_buf(block_dev_desc_t *dev_desc, void *buf);
-+
-+/**
-+ * write_mbr_and_gpt_partitions() - write MBR, Primary GPT and Backup GPT
-+ *
-+ * @param dev_desc - block device descriptor
-+ * @param buf - buffer which contains the MBR and Primary GPT info
-+ *
-+ * @return - '0' on success, otherwise error
-+ */
-+int write_mbr_and_gpt_partitions(block_dev_desc_t *dev_desc, void *buf);
- #endif
- 
- #endif /* _PART_H */
-diff -ruN u-boot-2015.01-rc3/include/pci_ids.h u-boot/include/pci_ids.h
---- u-boot-2015.01-rc3/include/pci_ids.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/pci_ids.h	2015-01-01 17:34:32.845493546 +0100
-@@ -2998,6 +2998,14 @@
- #define PCI_DEVICE_ID_INTEL_82454NX     0x84cb
- #define PCI_DEVICE_ID_INTEL_84460GX	0x84ea
- #define PCI_DEVICE_ID_INTEL_IXP4XX	0x8500
-+#define PCI_DEVICE_ID_INTEL_TCF_GBE	0x8802
-+#define PCI_DEVICE_ID_INTEL_TCF_SDIO_0	0x8809
-+#define PCI_DEVICE_ID_INTEL_TCF_SDIO_1	0x880a
-+#define PCI_DEVICE_ID_INTEL_TCF_SATA	0x880b
-+#define PCI_DEVICE_ID_INTEL_TCF_UART_0	0x8811
-+#define PCI_DEVICE_ID_INTEL_TCF_UART_1	0x8812
-+#define PCI_DEVICE_ID_INTEL_TCF_UART_2	0x8813
-+#define PCI_DEVICE_ID_INTEL_TCF_UART_3	0x8814
- #define PCI_DEVICE_ID_INTEL_IXP2800	0x9004
- #define PCI_DEVICE_ID_INTEL_S21152BB	0xb152
- 
-diff -ruN u-boot-2015.01-rc3/include/smsc_lpc47m.h u-boot/include/smsc_lpc47m.h
---- u-boot-2015.01-rc3/include/smsc_lpc47m.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/include/smsc_lpc47m.h	2015-01-01 17:34:32.849493480 +0100
-@@ -0,0 +1,19 @@
-+/*
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#ifndef _SMSC_LPC47M_H_
-+#define _SMSC_LPC47M_H_
-+
-+/**
-+ * Configure the base I/O port of the specified serial device and enable the
-+ * serial device.
-+ *
-+ * @dev: High 8 bits = Super I/O port, low 8 bits = logical device number.
-+ * @iobase: Processor I/O port address to assign to this serial device.
-+ */
-+void lpc47m_enable_serial(u16 dev, u16 iobase);
-+
-+#endif /* _SMSC_LPC47M_H_ */
-diff -ruN u-boot-2015.01-rc3/include/spi.h u-boot/include/spi.h
---- u-boot-2015.01-rc3/include/spi.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/spi.h	2015-01-01 17:34:32.849493480 +0100
-@@ -34,6 +34,7 @@
- 
- /* SPI TX operation modes */
- #define SPI_OPM_TX_QPP		(1 << 0)
-+#define SPI_OPM_TX_BP		(1 << 1)
- 
- /* SPI RX operation modes */
- #define SPI_OPM_RX_AS		(1 << 0)
-diff -ruN u-boot-2015.01-rc3/include/tps6586x.h u-boot/include/tps6586x.h
---- u-boot-2015.01-rc3/include/tps6586x.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/tps6586x.h	2015-01-01 17:34:32.849493480 +0100
-@@ -44,9 +44,9 @@
-  * Set up the TPS6586X I2C bus number. This will be used for all operations
-  * on the device. This function must be called before using other functions.
-  *
-- * @param bus	I2C bus number containing the TPS6586X chip
-+ * @param bus	I2C bus containing the TPS6586X chip
-  * @return 0 (always succeeds)
-  */
--int tps6586x_init(int bus);
-+int tps6586x_init(struct udevice *bus);
- 
- #endif	/* _TPS6586X_H_ */
-diff -ruN u-boot-2015.01-rc3/include/usb/ehci-fsl.h u-boot/include/usb/ehci-fsl.h
---- u-boot-2015.01-rc3/include/usb/ehci-fsl.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/usb/ehci-fsl.h	2015-01-01 17:34:32.853493416 +0100
-@@ -280,7 +280,9 @@
- #define MXC_EHCI_IPPUE_DOWN		(1 << 10)
- #define MXC_EHCI_IPPUE_UP		(1 << 11)
- 
-+int usb_phy_mode(int port);
- /* Board-specific initialization */
- int board_ehci_hcd_init(int port);
-+int board_usb_phy_mode(int port);
- 
- #endif /* _EHCI_FSL_H */
-diff -ruN u-boot-2015.01-rc3/lib/asm-offsets.c u-boot/lib/asm-offsets.c
---- u-boot-2015.01-rc3/lib/asm-offsets.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/lib/asm-offsets.c	2015-01-01 17:34:32.857493350 +0100
-@@ -31,9 +31,6 @@
- #ifdef CONFIG_SYS_MALLOC_F_LEN
- 	DEFINE(GD_MALLOC_BASE, offsetof(struct global_data, malloc_base));
- #endif
--#ifdef CONFIG_X86
--	DEFINE(GD_BIST, offsetof(struct global_data, arch.bist));
--#endif
- 
- #if defined(CONFIG_ARM)
- 
-diff -ruN u-boot-2015.01-rc3/lib/errno_str.c u-boot/lib/errno_str.c
---- u-boot-2015.01-rc3/lib/errno_str.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/lib/errno_str.c	2015-01-01 17:34:32.857493350 +0100
-@@ -0,0 +1,147 @@
-+/*
-+ * Copyright (C) 2014 Samsung Electronics
-+ * Przemyslaw Marczak <p.marczak at samsung.com>
-+ *
-+ * SDPX-License-Identifier:	GPL-2.0+
-+ */
-+#include <common.h>
-+#include <errno.h>
-+
-+#define ERRNO_MSG(errno, msg)	msg
-+#define SAME_AS(x)		(const char *)&errno_message[x]
-+
-+static const char * const errno_message[] = {
-+	ERRNO_MSG(0, "Success"),
-+	ERRNO_MSG(EPERM, "Operation not permitted"),
-+	ERRNO_MSG(ENOEN, "No such file or directory"),
-+	ERRNO_MSG(ESRCH, "No such process"),
-+	ERRNO_MSG(EINTR, "Interrupted system call"),
-+	ERRNO_MSG(EIO, "I/O error"),
-+	ERRNO_MSG(ENXIO, "No such device or address"),
-+	ERRNO_MSG(E2BIG, "Argument list too long"),
-+	ERRNO_MSG(ENOEXEC, "Exec format error"),
-+	ERRNO_MSG(EBADF, "Bad file number"),
-+	ERRNO_MSG(ECHILD, "No child processes"),
-+	ERRNO_MSG(EAGAIN, "Try again"),
-+	ERRNO_MSG(ENOMEM, "Out of memory"),
-+	ERRNO_MSG(EACCES, "Permission denied"),
-+	ERRNO_MSG(EFAULT, "Bad address"),
-+	ERRNO_MSG(ENOTBL, "Block device required"),
-+	ERRNO_MSG(EBUSY, "Device or resource busy"),
-+	ERRNO_MSG(EEXIST, "File exists"),
-+	ERRNO_MSG(EXDEV, "Cross-device link"),
-+	ERRNO_MSG(ENODEV, "No such device"),
-+	ERRNO_MSG(ENOTDIR, "Not a directory"),
-+	ERRNO_MSG(EISDIR, "Is a directory"),
-+	ERRNO_MSG(EINVAL, "Invalid argument"),
-+	ERRNO_MSG(ENFILE, "File table overflow"),
-+	ERRNO_MSG(EMFILE, "Too many open files"),
-+	ERRNO_MSG(ENOTTY, "Not a typewriter"),
-+	ERRNO_MSG(ETXTBSY, "Text file busy"),
-+	ERRNO_MSG(EFBIG, "File too large"),
-+	ERRNO_MSG(ENOSPC, "No space left on device"),
-+	ERRNO_MSG(ESPIPE, "Illegal seek"),
-+	ERRNO_MSG(EROFS, "Read-only file system"),
-+	ERRNO_MSG(EMLINK, "Too many links"),
-+	ERRNO_MSG(EPIPE, "Broken pipe"),
-+	ERRNO_MSG(EDOM, "Math argument out of domain of func"),
-+	ERRNO_MSG(ERANGE, "Math result not representable"),
-+	ERRNO_MSG(EDEADLK, "Resource deadlock would occur"),
-+	ERRNO_MSG(ENAMETOOLONG, "File name too long"),
-+	ERRNO_MSG(ENOLCK, "No record locks available"),
-+	ERRNO_MSG(ENOSYS, "Function not implemented"),
-+	ERRNO_MSG(ENOTEMPTY, "Directory not empty"),
-+	ERRNO_MSG(ELOOP, "Too many symbolic links encountered"),
-+	ERRNO_MSG(EWOULDBLOCK, SAME_AS(EAGAIN)),
-+	ERRNO_MSG(ENOMSG, "No message of desired type"),
-+	ERRNO_MSG(EIDRM, "Identifier removed"),
-+	ERRNO_MSG(ECHRNG, "Channel number out of range"),
-+	ERRNO_MSG(EL2NSYNC, "Level 2 not synchronized"),
-+	ERRNO_MSG(EL3HLT, "Level 3 halted"),
-+	ERRNO_MSG(EL3RST, "Level 3 reset"),
-+	ERRNO_MSG(ELNRNG, "Link number out of range"),
-+	ERRNO_MSG(EUNATCH, "Protocol driver not attached"),
-+	ERRNO_MSG(ENOCSI, "No CSI structure available"),
-+	ERRNO_MSG(EL2HLT, "Level 2 halted"),
-+	ERRNO_MSG(EBADE, "Invalid exchange"),
-+	ERRNO_MSG(EBADR, "Invalid request descriptor"),
-+	ERRNO_MSG(EXFULL, "Exchange full"),
-+	ERRNO_MSG(ENOANO, "No anode"),
-+	ERRNO_MSG(EBADRQC, "Invalid request code"),
-+	ERRNO_MSG(EBADSLT, "Invalid slot"),
-+	ERRNO_MSG(EDEADLOCK, SAME_AS(EDEADLK)),
-+	ERRNO_MSG(EBFONT, "Bad font file format"),
-+	ERRNO_MSG(ENOSTR, "Device not a stream"),
-+	ERRNO_MSG(ENODATA, "No data available"),
-+	ERRNO_MSG(ETIME, "Timer expired"),
-+	ERRNO_MSG(ENOSR, "Out of streams resources"),
-+	ERRNO_MSG(ENONET, "Machine is not on the network"),
-+	ERRNO_MSG(ENOPKG, "Package not installed"),
-+	ERRNO_MSG(EREMOTE, "Object is remote"),
-+	ERRNO_MSG(ENOLINK, "Link has been severed"),
-+	ERRNO_MSG(EADV, "Advertise error"),
-+	ERRNO_MSG(ESRMNT, "Srmount error"),
-+	ERRNO_MSG(ECOMM, "Communication error on send"),
-+	ERRNO_MSG(EPROTO, "Protocol error"),
-+	ERRNO_MSG(EMULTIHOP, "Multihop attempted"),
-+	ERRNO_MSG(EDOTDOT, "RFS specific error"),
-+	ERRNO_MSG(EBADMSG, "Not a data message"),
-+	ERRNO_MSG(EOVERFLOW, "Value too large for defined data type"),
-+	ERRNO_MSG(ENOTUNIQ, "Name not unique on network"),
-+	ERRNO_MSG(EBADFD, "File descriptor in bad state"),
-+	ERRNO_MSG(EREMCHG, "Remote address changed"),
-+	ERRNO_MSG(ELIBACC, "Can not access a needed shared library"),
-+	ERRNO_MSG(ELIBBAD, "Accessing a corrupted shared library"),
-+	ERRNO_MSG(ELIBSCN, ".lib section in a.out corrupted"),
-+	ERRNO_MSG(ELIBMAX, "Attempting to link in too many shared libraries"),
-+	ERRNO_MSG(ELIBEXEC, "Cannot exec a shared library directly"),
-+	ERRNO_MSG(EILSEQ, "Illegal byte sequence"),
-+	ERRNO_MSG(ERESTART, "Interrupted system call should be restarted"),
-+	ERRNO_MSG(ESTRPIPE, "Streams pipe error"),
-+	ERRNO_MSG(EUSERS, "Too many users"),
-+	ERRNO_MSG(ENOTSOCK, "Socket operation on non-socket"),
-+	ERRNO_MSG(EDESTADDRREQ, "Destination address required"),
-+	ERRNO_MSG(EMSGSIZE, "Message too long"),
-+	ERRNO_MSG(EPROTOTYPE, "Protocol wrong type for socket"),
-+	ERRNO_MSG(ENOPROTOOPT, "Protocol not available"),
-+	ERRNO_MSG(EPROTONOSUPPORT, "Protocol not supported"),
-+	ERRNO_MSG(ESOCKTNOSUPPORT, "Socket type not supported"),
-+	ERRNO_MSG(EOPNOTSUPP, "Operation not supported on transport endpoint"),
-+	ERRNO_MSG(EPFNOSUPPORT, "Protocol family not supported"),
-+	ERRNO_MSG(AFNOSUPPORT, "Address family not supported by protocol"),
-+	ERRNO_MSG(EADDRINUSE, "Address already in use"),
-+	ERRNO_MSG(EADDRNOTAVAIL, "Cannot assign requested address"),
-+	ERRNO_MSG(ENETDOWN, "Network is down"),
-+	ERRNO_MSG(ENETUNREACH, "Network is unreachable"),
-+	ERRNO_MSG(ENETRESET, "Network dropped connection because of reset"),
-+	ERRNO_MSG(ECONNABORTED, "Software caused connection abort"),
-+	ERRNO_MSG(ECONNRESET, "Connection reset by peer"),
-+	ERRNO_MSG(ENOBUFS, "No buffer space available"),
-+	ERRNO_MSG(EISCONN, "Transport endpoint is already connected"),
-+	ERRNO_MSG(ENOTCONN, "Transport endpoint is not connected"),
-+	ERRNO_MSG(ESHUTDOWN, "Cannot send after transport endpoint shutdown"),
-+	ERRNO_MSG(ETOOMANYREFS, "Too many references: cannot splice"),
-+	ERRNO_MSG(ETIMEDOUT, "Connection timed out"),
-+	ERRNO_MSG(ECONNREFUSED, "Connection refused"),
-+	ERRNO_MSG(EHOSTDOWN, "Host is down"),
-+	ERRNO_MSG(EHOSTUNREACH, "No route to host"),
-+	ERRNO_MSG(EALREADY, "Operation already in progress"),
-+	ERRNO_MSG(EINPROGRESS, "Operation now in progress"),
-+	ERRNO_MSG(ESTALE, "Stale NFS file handle"),
-+	ERRNO_MSG(EUCLEAN, "Structure needs cleaning"),
-+	ERRNO_MSG(ENOTNAM, "Not a XENIX named type file"),
-+	ERRNO_MSG(ENAVAIL, "No XENIX semaphores available"),
-+	ERRNO_MSG(EISNAM, "Is a named type file"),
-+	ERRNO_MSG(EREMOTEIO, "Remote I/O error"),
-+	ERRNO_MSG(EDQUOT, "Quota exceeded"),
-+	ERRNO_MSG(ENOMEDIUM, "No medium found"),
-+	ERRNO_MSG(EMEDIUMTYPE, "Wrong medium type"),
-+};
-+
-+const char *errno_str(int errno)
-+{
-+	if (errno >= 0)
-+		return errno_message[0];
-+
-+	return errno_message[abs(errno)];
-+}
-diff -ruN u-boot-2015.01-rc3/lib/initcall.c u-boot/lib/initcall.c
---- u-boot-2015.01-rc3/lib/initcall.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/lib/initcall.c	2015-01-01 17:34:32.861493284 +0100
-@@ -19,7 +19,11 @@
- 
- 		if (gd->flags & GD_FLG_RELOC)
- 			reloc_ofs = gd->reloc_off;
--		debug("initcall: %p\n", (char *)*init_fnc_ptr - reloc_ofs);
-+		debug("initcall: %p", (char *)*init_fnc_ptr - reloc_ofs);
-+		if (gd->flags & GD_FLG_RELOC)
-+			debug(" (relocated to %p)\n", (char *)*init_fnc_ptr);
-+		else
-+			debug("\n");
- 		ret = (*init_fnc_ptr)();
- 		if (ret) {
- 			printf("initcall sequence %p failed at call %p (err=%d)\n",
-diff -ruN u-boot-2015.01-rc3/lib/Makefile u-boot/lib/Makefile
---- u-boot-2015.01-rc3/lib/Makefile	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/lib/Makefile	2015-01-01 17:34:32.857493350 +0100
-@@ -51,6 +51,7 @@
- obj-$(CONFIG_ADDR_MAP) += addr_map.o
- obj-y += hashtable.o
- obj-y += errno.o
-+obj-$(CONFIG_ERRNO_STR) += errno_str.o
- obj-y += display_options.o
- obj-$(CONFIG_BCH) += bch.o
- obj-y += crc32.o
-diff -ruN u-boot-2015.01-rc3/lib/string.c u-boot/lib/string.c
---- u-boot-2015.01-rc3/lib/string.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/lib/string.c	2015-01-01 17:34:32.861493284 +0100
-@@ -102,6 +102,31 @@
- }
- #endif
- 
-+#ifndef __HAVE_ARCH_STRLCPY
-+/**
-+ * strlcpy - Copy a C-string into a sized buffer
-+ * @dest: Where to copy the string to
-+ * @src: Where to copy the string from
-+ * @size: size of destination buffer
-+ *
-+ * Compatible with *BSD: the result is always a valid
-+ * NUL-terminated string that fits in the buffer (unless,
-+ * of course, the buffer size is zero). It does not pad
-+ * out the result like strncpy() does.
-+ */
-+size_t strlcpy(char *dest, const char *src, size_t size)
-+{
-+	size_t ret = strlen(src);
-+
-+	if (size) {
-+		size_t len = (ret >= size) ? size - 1 : ret;
-+		memcpy(dest, src, len);
-+		dest[len] = '\0';
-+	}
-+	return ret;
-+}
-+#endif
-+
- #ifndef __HAVE_ARCH_STRCAT
- /**
-  * strcat - Append one %NUL-terminated string to another
-diff -ruN u-boot-2015.01-rc3/MAINTAINERS u-boot/MAINTAINERS
---- u-boot-2015.01-rc3/MAINTAINERS	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/MAINTAINERS	2015-01-01 17:34:31.981507711 +0100
-@@ -128,6 +128,12 @@
- F:	arch/arm/cpu/arm926ejs/spear/
- F:	arch/arm/include/asm/arch-spear/
- 
-+ARM STM STV0991
-+M:	Vikas Manocha <vikas.manocha at st.com>
-+S:	Maintained
-+F:	arch/arm/cpu/armv7/stv0991/
-+F:	arch/arm/include/asm/arch-stv0991/
-+
- ARM SUNXI
- M:	Ian Campbell <ijc at hellion.org.uk>
- M:	Hans De Goede <hdegoede at redhat.com>
-diff -ruN u-boot-2015.01-rc3/Makefile u-boot/Makefile
---- u-boot-2015.01-rc3/Makefile	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/Makefile	2015-01-01 17:34:31.981507711 +0100
-@@ -1,7 +1,7 @@
- VERSION = 2015
- PATCHLEVEL = 01
- SUBLEVEL =
--EXTRAVERSION = -rc3
-+EXTRAVERSION = -rc4
- NAME =
- 
- # *DOCUMENTATION*
-@@ -946,27 +946,43 @@
- ifneq ($(CONFIG_X86_RESET_VECTOR),)
- rom: u-boot.rom FORCE
- 
--u-boot.rom: u-boot-x86-16bit.bin u-boot-dtb.bin \
--		$(srctree)/board/$(BOARDDIR)/mrc.bin
--	$(objtree)/tools/ifdtool -c -r $(CONFIG_ROM_SIZE) u-boot.tmp
--	if [ -n "$(CONFIG_HAVE_INTEL_ME)" ]; then \
--		$(objtree)/tools/ifdtool -D \
--			$(srctree)/board/$(BOARDDIR)/descriptor.bin u-boot.tmp; \
--		$(objtree)/tools/ifdtool \
--			-i ME:$(srctree)/board/$(BOARDDIR)/me.bin u-boot.tmp; \
--	fi
--	$(objtree)/tools/ifdtool -w \
--		$(CONFIG_SYS_TEXT_BASE):$(objtree)/u-boot-dtb.bin u-boot.tmp
--	$(objtree)/tools/ifdtool -w \
--		$(CONFIG_X86_MRC_START):$(srctree)/board/$(BOARDDIR)/mrc.bin \
--		u-boot.tmp
--	$(objtree)/tools/ifdtool -w \
--		$(CONFIG_SYS_X86_START16):$(objtree)/u-boot-x86-16bit.bin \
--		u-boot.tmp
--	$(objtree)/tools/ifdtool -w \
--		$(CONFIG_X86_OPTION_ROM_ADDR):$(srctree)/board/$(BOARDDIR)/$(CONFIG_X86_OPTION_ROM_FILENAME) \
--		u-boot.tmp
--	mv u-boot.tmp $@
-+IFDTOOL=$(objtree)/tools/ifdtool
-+IFDTOOL_FLAGS  = -f 0:$(objtree)/u-boot.dtb
-+IFDTOOL_FLAGS += -m 0x$(shell $(NM) u-boot |grep _dt_ucode_base_size |cut -d' ' -f1)
-+IFDTOOL_FLAGS += -U $(CONFIG_SYS_TEXT_BASE):$(objtree)/u-boot.bin
-+IFDTOOL_FLAGS += -w $(CONFIG_SYS_X86_START16):$(objtree)/u-boot-x86-16bit.bin
-+
-+ifneq ($(CONFIG_HAVE_INTEL_ME),)
-+IFDTOOL_ME_FLAGS  = -D $(srctree)/board/$(BOARDDIR)/descriptor.bin
-+IFDTOOL_ME_FLAGS += -i ME:$(srctree)/board/$(BOARDDIR)/me.bin
-+endif
-+
-+ifneq ($(CONFIG_HAVE_MRC),)
-+IFDTOOL_FLAGS += -w $(CONFIG_X86_MRC_ADDR):$(srctree)/board/$(BOARDDIR)/mrc.bin
-+endif
-+
-+ifneq ($(CONFIG_HAVE_FSP),)
-+IFDTOOL_FLAGS += -w $(CONFIG_FSP_ADDR):$(srctree)/board/$(BOARDDIR)/$(CONFIG_FSP_FILE)
-+endif
-+
-+ifneq ($(CONFIG_HAVE_CMC),)
-+IFDTOOL_FLAGS += -w $(CONFIG_CMC_ADDR):$(srctree)/board/$(BOARDDIR)/$(CONFIG_CMC_FILE)
-+endif
-+
-+ifneq ($(CONFIG_X86_OPTION_ROM_ADDR),)
-+IFDTOOL_FLAGS += -w $(CONFIG_X86_OPTION_ROM_ADDR):$(srctree)/board/$(BOARDDIR)/$(CONFIG_X86_OPTION_ROM_FILE)
-+endif
-+
-+quiet_cmd_ifdtool = IFDTOOL $@
-+cmd_ifdtool  = $(IFDTOOL) -c -r $(CONFIG_ROM_SIZE) u-boot.tmp;
-+ifneq ($(CONFIG_HAVE_INTEL_ME),)
-+cmd_ifdtool += $(IFDTOOL) $(IFDTOOL_ME_FLAGS) u-boot.tmp;
-+endif
-+cmd_ifdtool += $(IFDTOOL) $(IFDTOOL_FLAGS) u-boot.tmp;
-+cmd_ifdtool += mv u-boot.tmp $@
-+
-+u-boot.rom: u-boot-x86-16bit.bin u-boot-dtb.bin
-+	$(call if_changed,ifdtool)
- 
- OBJCOPYFLAGS_u-boot-x86-16bit.bin := -O binary -j .start16 -j .resetvec
- u-boot-x86-16bit.bin: u-boot FORCE
-@@ -999,15 +1015,22 @@
- #concatenated with u-boot binary. It is need by PowerPC SoC having
- #internal SRAM <= 512KB.
- MKIMAGEFLAGS_u-boot-spl.pbl = -n $(srctree)/$(CONFIG_SYS_FSL_PBL_RCW:"%"=%) \
--		-R $(srctree)/$(CONFIG_SYS_FSL_PBL_PBI:"%"=%) -T pblimage
-+		-R $(srctree)/$(CONFIG_SYS_FSL_PBL_PBI:"%"=%) -T pblimage \
-+		-A $(ARCH) -a $(CONFIG_SPL_TEXT_BASE)
- 
- spl/u-boot-spl.pbl: spl/u-boot-spl.bin FORCE
- 	$(call if_changed,mkimage)
- 
-+ifeq ($(ARCH),arm)
-+UBOOT_BINLOAD := u-boot.img
-+else
-+UBOOT_BINLOAD := u-boot.bin
-+endif
-+
- OBJCOPYFLAGS_u-boot-with-spl-pbl.bin = -I binary -O binary --pad-to=$(CONFIG_SPL_PAD_TO) \
- 			  --gap-fill=0xff
- 
--u-boot-with-spl-pbl.bin: spl/u-boot-spl.pbl u-boot.bin FORCE
-+u-boot-with-spl-pbl.bin: spl/u-boot-spl.pbl $(UBOOT_BINLOAD) FORCE
- 	$(call if_changed,pad_cat)
- 
- # PPC4xx needs the SPL at the end of the image, since the reset vector
-diff -ruN u-boot-2015.01-rc3/README u-boot/README
---- u-boot-2015.01-rc3/README	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/README	2015-01-01 17:34:31.985507645 +0100
-@@ -1773,6 +1773,15 @@
- 		regarding the non-volatile storage device. Define this to
- 		the eMMC device that fastboot should use to store the image.
- 
-+		CONFIG_FASTBOOT_GPT_NAME
-+		The fastboot "flash" command supports writing the downloaded
-+		image to the Protective MBR and the Primary GUID Partition
-+		Table. (Additionally, this downloaded image is post-processed
-+		to generate and write the Backup GUID Partition Table.)
-+		This occurs when the specified "partition name" on the
-+		"fastboot flash" command line matches this value.
-+		Default is GPT_ENTRY_NAME (currently "gpt") if undefined.
-+
- - Journaling Flash filesystem support:
- 		CONFIG_JFFS2_NAND, CONFIG_JFFS2_NAND_OFF, CONFIG_JFFS2_NAND_SIZE,
- 		CONFIG_JFFS2_NAND_DEV
-diff -ruN u-boot-2015.01-rc3/scripts/binutils-version.sh u-boot/scripts/binutils-version.sh
---- u-boot-2015.01-rc3/scripts/binutils-version.sh	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/scripts/binutils-version.sh	2015-01-01 17:34:32.877493022 +0100
-@@ -14,7 +14,9 @@
- 	exit 1
- fi
- 
--MAJOR=$($gas --version | head -1 | awk '{print $NF}' | cut -d . -f 1)
--MINOR=$($gas --version | head -1 | awk '{print $NF}' | cut -d . -f 2)
-+version_string=$($gas --version | head -1 | sed -e 's/.*) *\([0-9.]*\).*/\1/' )
-+
-+MAJOR=$(echo $version_string | cut -d . -f 1)
-+MINOR=$(echo $version_string | cut -d . -f 2)
- 
- printf "%02d%02d\\n" $MAJOR $MINOR
-diff -ruN u-boot-2015.01-rc3/snapshot.commit u-boot/snapshot.commit
---- u-boot-2015.01-rc3/snapshot.commit	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/snapshot.commit	2015-01-01 17:34:32.885492891 +0100
-@@ -1 +1 @@
--32fdf0e4d82bdca5d64d86330e461e59685f9959  Mon, 8 Dec 2014 16:35:08 -0500
-+$Format:%H  %cD$
-diff -ruN u-boot-2015.01-rc3/test/dm/cmd_dm.c u-boot/test/dm/cmd_dm.c
---- u-boot-2015.01-rc3/test/dm/cmd_dm.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/test/dm/cmd_dm.c	2015-01-01 17:34:32.885492891 +0100
-@@ -16,17 +16,65 @@
- #include <dm/test.h>
- #include <dm/uclass-internal.h>
- 
-+static void show_devices(struct udevice *dev, int depth, int last_flag)
-+{
-+	int i, is_last;
-+	struct udevice *child;
-+	char class_name[12];
-+
-+	/* print the first 11 characters to not break the tree-format. */
-+	strlcpy(class_name, dev->uclass->uc_drv->name, sizeof(class_name));
-+	printf(" %-11s [ %c ]    ", class_name,
-+	       dev->flags & DM_FLAG_ACTIVATED ? '+' : ' ');
-+
-+	for (i = depth; i >= 0; i--) {
-+		is_last = (last_flag >> i) & 1;
-+		if (i) {
-+			if (is_last)
-+				printf("    ");
-+			else
-+				printf("|   ");
-+		} else {
-+			if (is_last)
-+				printf("`-- ");
-+			else
-+				printf("|-- ");
-+		}
-+	}
-+
-+	printf("%s\n", dev->name);
-+
-+	list_for_each_entry(child, &dev->child_head, sibling_node) {
-+		is_last = list_is_last(&child->sibling_node, &dev->child_head);
-+		show_devices(child, depth + 1, (last_flag << 1) | is_last);
-+	}
-+}
-+
-+static int do_dm_dump_all(cmd_tbl_t *cmdtp, int flag, int argc,
-+			  char * const argv[])
-+{
-+	struct udevice *root;
-+
-+	root = dm_root();
-+	if (root) {
-+		printf(" Class       Probed   Name\n");
-+		printf("----------------------------------------\n");
-+		show_devices(root, -1, 0);
-+	}
-+
-+	return 0;
-+}
-+
- /**
-  * dm_display_line() - Display information about a single device
-  *
-  * Displays a single line of information with an option prefix
-  *
-  * @dev:	Device to display
-- * @buf:	Prefix to display at the start of the line
-  */
--static void dm_display_line(struct udevice *dev, char *buf)
-+static void dm_display_line(struct udevice *dev)
- {
--	printf("%s- %c %s @ %08lx", buf,
-+	printf("- %c %s @ %08lx",
- 	       dev->flags & DM_FLAG_ACTIVATED ? '*' : ' ',
- 	       dev->name, (ulong)map_to_sysmem(dev));
- 	if (dev->req_seq != -1)
-@@ -34,53 +82,6 @@
- 	puts("\n");
- }
- 
--static int display_succ(struct udevice *in, char *buf)
--{
--	int len;
--	int ip = 0;
--	char local[16];
--	struct udevice *pos, *n, *prev = NULL;
--
--	dm_display_line(in, buf);
--
--	if (list_empty(&in->child_head))
--		return 0;
--
--	len = strlen(buf);
--	strncpy(local, buf, sizeof(local));
--	snprintf(local + len, 2, "|");
--	if (len && local[len - 1] == '`')
--		local[len - 1] = ' ';
--
--	list_for_each_entry_safe(pos, n, &in->child_head, sibling_node) {
--		if (ip++)
--			display_succ(prev, local);
--		prev = pos;
--	}
--
--	snprintf(local + len, 2, "`");
--	display_succ(prev, local);
--
--	return 0;
--}
--
--static int dm_dump(struct udevice *dev)
--{
--	if (!dev)
--		return -EINVAL;
--	return display_succ(dev, "");
--}
--
--static int do_dm_dump_all(cmd_tbl_t *cmdtp, int flag, int argc,
--			  char * const argv[])
--{
--	struct udevice *root;
--
--	root = dm_root();
--	printf("ROOT %08lx\n", (ulong)map_to_sysmem(root));
--	return dm_dump(root);
--}
--
- static int do_dm_dump_uclass(cmd_tbl_t *cmdtp, int flag, int argc,
- 			     char * const argv[])
- {
-@@ -99,7 +100,7 @@
- 		if (list_empty(&uc->dev_head))
- 			continue;
- 		list_for_each_entry(dev, &uc->dev_head, uclass_node) {
--			dm_display_line(dev, "");
-+			dm_display_line(dev);
- 		}
- 		puts("\n");
- 	}
-diff -ruN u-boot-2015.01-rc3/test/dm/i2c.c u-boot/test/dm/i2c.c
---- u-boot-2015.01-rc3/test/dm/i2c.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/test/dm/i2c.c	2015-01-01 17:34:32.885492891 +0100
-@@ -0,0 +1,216 @@
-+/*
-+ * Copyright (C) 2013 Google, Inc
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ *
-+ * Note: Test coverage does not include 10-bit addressing
-+ */
-+
-+#include <common.h>
-+#include <dm.h>
-+#include <fdtdec.h>
-+#include <i2c.h>
-+#include <dm/device-internal.h>
-+#include <dm/test.h>
-+#include <dm/uclass-internal.h>
-+#include <dm/ut.h>
-+#include <dm/util.h>
-+#include <asm/state.h>
-+#include <asm/test.h>
-+
-+static const int busnum;
-+static const int chip = 0x2c;
-+
-+/* Test that we can find buses and chips */
-+static int dm_test_i2c_find(struct dm_test_state *dms)
-+{
-+	struct udevice *bus, *dev;
-+	const int no_chip = 0x10;
-+
-+	ut_asserteq(-ENODEV, uclass_find_device_by_seq(UCLASS_I2C, busnum,
-+						       false, &bus));
-+
-+	/*
-+	 * i2c_post_bind() will bind devices to chip selects. Check this then
-+	 * remove the emulation and the slave device.
-+	 */
-+	ut_assertok(uclass_get_device_by_seq(UCLASS_I2C, busnum, &bus));
-+	ut_assertok(i2c_probe(bus, chip, 0, &dev));
-+	ut_asserteq(-ENODEV, i2c_probe(bus, no_chip, 0, &dev));
-+	ut_asserteq(-ENODEV, uclass_get_device_by_seq(UCLASS_I2C, 1, &bus));
-+
-+	return 0;
-+}
-+DM_TEST(dm_test_i2c_find, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
-+
-+static int dm_test_i2c_read_write(struct dm_test_state *dms)
-+{
-+	struct udevice *bus, *dev;
-+	uint8_t buf[5];
-+
-+	ut_assertok(uclass_get_device_by_seq(UCLASS_I2C, busnum, &bus));
-+	ut_assertok(i2c_get_chip(bus, chip, &dev));
-+	ut_assertok(i2c_read(dev, 0, buf, 5));
-+	ut_assertok(memcmp(buf, "\0\0\0\0\0", sizeof(buf)));
-+	ut_assertok(i2c_write(dev, 2, (uint8_t *)"AB", 2));
-+	ut_assertok(i2c_read(dev, 0, buf, 5));
-+	ut_assertok(memcmp(buf, "\0\0AB\0", sizeof(buf)));
-+
-+	return 0;
-+}
-+DM_TEST(dm_test_i2c_read_write, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
-+
-+static int dm_test_i2c_speed(struct dm_test_state *dms)
-+{
-+	struct udevice *bus, *dev;
-+	uint8_t buf[5];
-+
-+	ut_assertok(uclass_get_device_by_seq(UCLASS_I2C, busnum, &bus));
-+	ut_assertok(i2c_get_chip(bus, chip, &dev));
-+	ut_assertok(i2c_set_bus_speed(bus, 100000));
-+	ut_assertok(i2c_read(dev, 0, buf, 5));
-+	ut_assertok(i2c_set_bus_speed(bus, 400000));
-+	ut_asserteq(400000, i2c_get_bus_speed(bus));
-+	ut_assertok(i2c_read(dev, 0, buf, 5));
-+	ut_asserteq(-EINVAL, i2c_write(dev, 0, buf, 5));
-+
-+	return 0;
-+}
-+DM_TEST(dm_test_i2c_speed, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
-+
-+static int dm_test_i2c_offset_len(struct dm_test_state *dms)
-+{
-+	struct udevice *bus, *dev;
-+	uint8_t buf[5];
-+
-+	ut_assertok(uclass_get_device_by_seq(UCLASS_I2C, busnum, &bus));
-+	ut_assertok(i2c_get_chip(bus, chip, &dev));
-+	ut_assertok(i2c_set_chip_offset_len(dev, 1));
-+	ut_assertok(i2c_read(dev, 0, buf, 5));
-+
-+	/* This is not supported by the uclass */
-+	ut_asserteq(-EINVAL, i2c_set_chip_offset_len(dev, 5));
-+
-+	return 0;
-+}
-+DM_TEST(dm_test_i2c_offset_len, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
-+
-+static int dm_test_i2c_probe_empty(struct dm_test_state *dms)
-+{
-+	struct udevice *bus, *dev;
-+
-+	ut_assertok(uclass_get_device_by_seq(UCLASS_I2C, busnum, &bus));
-+	ut_assertok(i2c_probe(bus, SANDBOX_I2C_TEST_ADDR, 0, &dev));
-+
-+	return 0;
-+}
-+DM_TEST(dm_test_i2c_probe_empty, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
-+
-+static int dm_test_i2c_bytewise(struct dm_test_state *dms)
-+{
-+	struct udevice *bus, *dev;
-+	struct udevice *eeprom;
-+	uint8_t buf[5];
-+
-+	ut_assertok(uclass_get_device_by_seq(UCLASS_I2C, busnum, &bus));
-+	ut_assertok(i2c_get_chip(bus, chip, &dev));
-+	ut_assertok(i2c_read(dev, 0, buf, 5));
-+	ut_assertok(memcmp(buf, "\0\0\0\0\0", sizeof(buf)));
-+
-+	/* Tell the EEPROM to only read/write one register at a time */
-+	ut_assertok(uclass_first_device(UCLASS_I2C_EMUL, &eeprom));
-+	ut_assertnonnull(eeprom);
-+	sandbox_i2c_eeprom_set_test_mode(eeprom, SIE_TEST_MODE_SINGLE_BYTE);
-+
-+	/* Now we only get the first byte - the rest will be 0xff */
-+	ut_assertok(i2c_read(dev, 0, buf, 5));
-+	ut_assertok(memcmp(buf, "\0\xff\xff\xff\xff", sizeof(buf)));
-+
-+	/* If we do a separate transaction for each byte, it works */
-+	ut_assertok(i2c_set_chip_flags(dev, DM_I2C_CHIP_RD_ADDRESS));
-+	ut_assertok(i2c_read(dev, 0, buf, 5));
-+	ut_assertok(memcmp(buf, "\0\0\0\0\0", sizeof(buf)));
-+
-+	/* This will only write A */
-+	ut_assertok(i2c_set_chip_flags(dev, 0));
-+	ut_assertok(i2c_write(dev, 2, (uint8_t *)"AB", 2));
-+	ut_assertok(i2c_read(dev, 0, buf, 5));
-+	ut_assertok(memcmp(buf, "\0\xff\xff\xff\xff", sizeof(buf)));
-+
-+	/* Check that the B was ignored */
-+	ut_assertok(i2c_set_chip_flags(dev, DM_I2C_CHIP_RD_ADDRESS));
-+	ut_assertok(i2c_read(dev, 0, buf, 5));
-+	ut_assertok(memcmp(buf, "\0\0A\0\0\0", sizeof(buf)));
-+
-+	/* Now write it again with the new flags, it should work */
-+	ut_assertok(i2c_set_chip_flags(dev, DM_I2C_CHIP_WR_ADDRESS));
-+	ut_assertok(i2c_write(dev, 2, (uint8_t *)"AB", 2));
-+	ut_assertok(i2c_read(dev, 0, buf, 5));
-+	ut_assertok(memcmp(buf, "\0\xff\xff\xff\xff", sizeof(buf)));
-+
-+	ut_assertok(i2c_set_chip_flags(dev, DM_I2C_CHIP_WR_ADDRESS |
-+						DM_I2C_CHIP_RD_ADDRESS));
-+	ut_assertok(i2c_read(dev, 0, buf, 5));
-+	ut_assertok(memcmp(buf, "\0\0AB\0\0", sizeof(buf)));
-+
-+	/* Restore defaults */
-+	sandbox_i2c_eeprom_set_test_mode(eeprom, SIE_TEST_MODE_NONE);
-+	ut_assertok(i2c_set_chip_flags(dev, 0));
-+
-+	return 0;
-+}
-+DM_TEST(dm_test_i2c_bytewise, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
-+
-+static int dm_test_i2c_offset(struct dm_test_state *dms)
-+{
-+	struct udevice *eeprom;
-+	struct udevice *dev;
-+	uint8_t buf[5];
-+
-+	ut_assertok(i2c_get_chip_for_busnum(busnum, chip, &dev));
-+
-+	/* Do a transfer so we can find the emulator */
-+	ut_assertok(i2c_read(dev, 0, buf, 5));
-+	ut_assertok(uclass_first_device(UCLASS_I2C_EMUL, &eeprom));
-+
-+	/* Offset length 0 */
-+	sandbox_i2c_eeprom_set_offset_len(eeprom, 0);
-+	ut_assertok(i2c_set_chip_offset_len(dev, 0));
-+	ut_assertok(i2c_write(dev, 10 /* ignored */, (uint8_t *)"AB", 2));
-+	ut_assertok(i2c_read(dev, 0, buf, 5));
-+	ut_assertok(memcmp(buf, "AB\0\0\0\0", sizeof(buf)));
-+
-+	/* Offset length 1 */
-+	sandbox_i2c_eeprom_set_offset_len(eeprom, 1);
-+	ut_assertok(i2c_set_chip_offset_len(dev, 1));
-+	ut_assertok(i2c_write(dev, 2, (uint8_t *)"AB", 2));
-+	ut_assertok(i2c_read(dev, 0, buf, 5));
-+	ut_assertok(memcmp(buf, "ABAB\0", sizeof(buf)));
-+
-+	/* Offset length 2 */
-+	sandbox_i2c_eeprom_set_offset_len(eeprom, 2);
-+	ut_assertok(i2c_set_chip_offset_len(dev, 2));
-+	ut_assertok(i2c_write(dev, 0x210, (uint8_t *)"AB", 2));
-+	ut_assertok(i2c_read(dev, 0x210, buf, 5));
-+	ut_assertok(memcmp(buf, "AB\0\0\0", sizeof(buf)));
-+
-+	/* Offset length 3 */
-+	sandbox_i2c_eeprom_set_offset_len(eeprom, 2);
-+	ut_assertok(i2c_set_chip_offset_len(dev, 2));
-+	ut_assertok(i2c_write(dev, 0x410, (uint8_t *)"AB", 2));
-+	ut_assertok(i2c_read(dev, 0x410, buf, 5));
-+	ut_assertok(memcmp(buf, "AB\0\0\0", sizeof(buf)));
-+
-+	/* Offset length 4 */
-+	sandbox_i2c_eeprom_set_offset_len(eeprom, 2);
-+	ut_assertok(i2c_set_chip_offset_len(dev, 2));
-+	ut_assertok(i2c_write(dev, 0x420, (uint8_t *)"AB", 2));
-+	ut_assertok(i2c_read(dev, 0x420, buf, 5));
-+	ut_assertok(memcmp(buf, "AB\0\0\0", sizeof(buf)));
-+
-+	/* Restore defaults */
-+	sandbox_i2c_eeprom_set_offset_len(eeprom, 1);
-+
-+	return 0;
-+}
-+DM_TEST(dm_test_i2c_offset, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
-diff -ruN u-boot-2015.01-rc3/test/dm/Makefile u-boot/test/dm/Makefile
---- u-boot-2015.01-rc3/test/dm/Makefile	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/test/dm/Makefile	2015-01-01 17:34:32.885492891 +0100
-@@ -20,4 +20,5 @@
- obj-$(CONFIG_DM_GPIO) += gpio.o
- obj-$(CONFIG_DM_SPI) += spi.o
- obj-$(CONFIG_DM_SPI_FLASH) += sf.o
-+obj-$(CONFIG_DM_I2C) += i2c.o
- endif
-diff -ruN u-boot-2015.01-rc3/test/dm/test.dts u-boot/test/dm/test.dts
---- u-boot-2015.01-rc3/test/dm/test.dts	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/test/dm/test.dts	2015-01-01 17:34:32.885492891 +0100
-@@ -93,6 +93,23 @@
- 		num-gpios = <10>;
- 	};
- 
-+	i2c at 0 {
-+		#address-cells = <1>;
-+		#size-cells = <0>;
-+		reg = <0>;
-+		compatible = "sandbox,i2c";
-+		clock-frequency = <100000>;
-+		eeprom at 2c {
-+			reg = <0x2c>;
-+			compatible = "i2c-eeprom";
-+			emul {
-+				compatible = "sandbox,i2c-eeprom";
-+				sandbox,filename = "i2c.bin";
-+				sandbox,size = <256>;
-+			};
-+		};
-+	};
-+
- 	spi at 0 {
- 		#address-cells = <1>;
- 		#size-cells = <0>;
-diff -ruN u-boot-2015.01-rc3/test/ums/ums_gadget_test.sh u-boot/test/ums/ums_gadget_test.sh
---- u-boot-2015.01-rc3/test/ums/ums_gadget_test.sh	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/test/ums/ums_gadget_test.sh	2015-01-01 17:34:32.885492891 +0100
-@@ -11,6 +11,7 @@
- 
- COLOUR_RED="\33[31m"
- COLOUR_GREEN="\33[32m"
-+COLOUR_ORANGE="\33[33m"
- COLOUR_DEFAULT="\33[0m"
- 
- DIR=./
-@@ -59,8 +60,15 @@
-     fi
- 
-     cp ./$1 $MNT_DIR
--    umount $MNT_DIR
- 
-+    while true; do
-+	umount $MNT_DIR > /dev/null 2>&1
-+	if [ $? -eq 0 ]; then
-+	    break
-+	fi
-+	printf "$COLOUR_ORANGE\tSleeping to wait for umount...$COLOUR_DEFAULT\n"
-+	sleep 1
-+    done
- 
-     echo -n "TX: "
-     calculate_md5sum $1
-diff -ruN u-boot-2015.01-rc3/tools/buildman/README u-boot/tools/buildman/README
---- u-boot-2015.01-rc3/tools/buildman/README	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/tools/buildman/README	2015-01-01 17:34:32.885492891 +0100
-@@ -42,7 +42,7 @@
- Buildman is a builder. It is not make, although it runs make. It does not
- produce any useful output on the terminal while building, except for
- progress information (except with -v, see below). All the output (errors,
--warnings and binaries if you are ask for them) is stored in output
-+warnings and binaries if you ask for them) is stored in output
- directories, which you can look at while the build is progressing, or when
- it is finished.
- 
-@@ -121,7 +121,7 @@
- means to build all arm boards except nvidia, freescale and anything ending
- with 'ball'.
- 
--It is convenient to use the -n option to see whaat will be built based on
-+It is convenient to use the -n option to see what will be built based on
- the subset given.
- 
- Buildman does not store intermediate object files. It optionally copies
-@@ -371,7 +371,7 @@
- 
- 
- To find out how the build went, ask for a summary with -s. You can do this
--either before the build completes (presumably in another terminal) or or
-+either before the build completes (presumably in another terminal) or
- afterwards. Let's work through an example of how this is used:
- 
- $ ./tools/buildman/buildman -b lcd9b -s
-@@ -439,7 +439,7 @@
- 
- At commit 16, the error moves - you can see that the old error at line 120
- is fixed, but there is a new one at line 126. This is probably only because
--we added some code and moved the broken line father down the file.
-+we added some code and moved the broken line further down the file.
- 
- If many boards have the same error, then -e will display the error only
- once. This makes the output as concise as possible. To see which boards have
-@@ -647,8 +647,8 @@
- board was built) and by 96 bytes for powerpc. This increase was offset in both
- cases by reductions in rodata and data/bss.
- 
--Shown below the summary lines is the sizes for each board. Below each board
--is the sizes for each function. This information starts with:
-+Shown below the summary lines are the sizes for each board. Below each board
-+are the sizes for each function. This information starts with:
- 
-    add - number of functions added / removed
-    grow - number of functions which grew / shrunk
-@@ -817,7 +817,7 @@
- This has mostly be written in my spare time as a response to my difficulties
- in testing large series of patches. Apart from tidying up there is quite a
- bit of scope for improvement. Things like better error diffs and easier
--access to log files. Also it would be nice it buildman could 'hunt' for
-+access to log files. Also it would be nice if buildman could 'hunt' for
- problems, perhaps by building a few boards for each arch, or checking
- commits for changed files and building only boards which use those files.
- 
-diff -ruN u-boot-2015.01-rc3/tools/ifdtool.c u-boot/tools/ifdtool.c
---- u-boot-2015.01-rc3/tools/ifdtool.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/tools/ifdtool.c	2015-01-01 17:34:32.893492759 +0100
-@@ -18,6 +18,7 @@
- #include <unistd.h>
- #include <sys/types.h>
- #include <sys/stat.h>
-+#include <libfdt.h>
- #include "ifdtool.h"
- 
- #undef DEBUG
-@@ -32,6 +33,18 @@
- #define FLREG_BASE(reg)		((reg & 0x00000fff) << 12);
- #define FLREG_LIMIT(reg)	(((reg & 0x0fff0000) >> 4) | 0xfff);
- 
-+enum input_file_type_t {
-+	IF_normal,
-+	IF_fdt,
-+	IF_uboot,
-+};
-+
-+struct input_file {
-+	char *fname;
-+	unsigned int addr;
-+	enum input_file_type_t type;
-+};
-+
- /**
-  * find_fd() - Find the flash description in the ROM image
-  *
-@@ -54,7 +67,8 @@
- 		return NULL;
- 	}
- 
--	debug("Found Flash Descriptor signature at 0x%08x\n", i);
-+	debug("Found Flash Descriptor signature at 0x%08lx\n",
-+	      (char *)ptr - image);
- 
- 	return (struct fdbar_t *)ptr;
- }
-@@ -464,6 +478,16 @@
- 	return ret;
- }
- 
-+static int perror_fname(const char *fmt, const char *fname)
-+{
-+	char msg[strlen(fmt) + strlen(fname) + 1];
-+
-+	sprintf(msg, fmt, fname);
-+	perror(msg);
-+
-+	return -1;
-+}
-+
- /**
-  * write_image() - Write the image to a file
-  *
-@@ -480,10 +504,10 @@
- 
- 	new_fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR |
- 		      S_IWUSR | S_IRGRP | S_IROTH);
--	if (write(new_fd, image, size) != size) {
--		perror("Error while writing");
--		return -1;
--	}
-+	if (new_fd < 0)
-+		return perror_fname("Could not open file '%s'", filename);
-+	if (write(new_fd, image, size) != size)
-+		return perror_fname("Could not write file '%s'", filename);
- 	close(new_fd);
- 
- 	return 0;
-@@ -585,14 +609,10 @@
- 	int fd = open(fname, O_RDONLY);
- 	struct stat buf;
- 
--	if (fd == -1) {
--		perror("Could not open file");
--		return -1;
--	}
--	if (fstat(fd, &buf) == -1) {
--		perror("Could not stat file");
--		return -1;
--	}
-+	if (fd == -1)
-+		return perror_fname("Could not open file '%s'", fname);
-+	if (fstat(fd, &buf) == -1)
-+		return perror_fname("Could not stat file '%s'", fname);
- 	*sizep = buf.st_size;
- 	debug("File %s is %d bytes\n", fname, *sizep);
- 
-@@ -686,7 +706,7 @@
-  *			0xffffffff so use an address relative to that. For an
-  *			8MB ROM the start address is 0xfff80000.
-  * @write_fname:	Filename to add to the image
-- * @return 0 if OK, -ve on error
-+ * @return number of bytes written if OK, -ve on error
-  */
- static int write_data(char *image, int size, unsigned int addr,
- 		      const char *write_fname)
-@@ -698,7 +718,7 @@
- 	if (write_fd < 0)
- 		return write_fd;
- 
--	offset = addr + size;
-+	offset = (uint32_t)(addr + size);
- 	debug("Writing %s to offset %#x\n", write_fname, offset);
- 
- 	if (offset < 0 || offset + write_size > size) {
-@@ -714,6 +734,68 @@
- 
- 	close(write_fd);
- 
-+	return write_size;
-+}
-+
-+/**
-+ * write_uboot() - Write U-Boot, device tree and microcode pointer
-+ *
-+ * This writes U-Boot into a place in the flash, followed by its device tree.
-+ * The microcode pointer is written so that U-Boot can find the microcode in
-+ * the device tree very early in boot.
-+ *
-+ * @image:	Pointer to image
-+ * @size:	Size of image in bytes
-+ * @uboot:	Input file information for u-boot.bin
-+ * @fdt:	Input file information for u-boot.dtb
-+ * @ucode_ptr:	Address in U-Boot where the microcode pointer should be placed
-+ * @return 0 if OK, -ve on error
-+ */
-+static int write_uboot(char *image, int size, struct input_file *uboot,
-+		       struct input_file *fdt, unsigned int ucode_ptr)
-+{
-+	const void *blob;
-+	const char *data;
-+	int uboot_size;
-+	uint32_t *ptr;
-+	int data_size;
-+	int offset;
-+	int node;
-+	int ret;
-+
-+	uboot_size = write_data(image, size, uboot->addr, uboot->fname);
-+	if (uboot_size < 0)
-+		return uboot_size;
-+	fdt->addr = uboot->addr + uboot_size;
-+	debug("U-Boot size %#x, FDT at %#x\n", uboot_size, fdt->addr);
-+	ret = write_data(image, size, fdt->addr, fdt->fname);
-+	if (ret < 0)
-+		return ret;
-+
-+	if (ucode_ptr) {
-+		blob = (void *)image + (uint32_t)(fdt->addr + size);
-+		debug("DTB at %lx\n", (char *)blob - image);
-+		node = fdt_node_offset_by_compatible(blob, 0,
-+						     "intel,microcode");
-+		if (node < 0) {
-+			debug("No microcode found in FDT: %s\n",
-+			      fdt_strerror(node));
-+			return -ENOENT;
-+		}
-+		data = fdt_getprop(blob, node, "data", &data_size);
-+		if (!data) {
-+			debug("No microcode data found in FDT: %s\n",
-+			      fdt_strerror(data_size));
-+			return -ENOENT;
-+		}
-+		offset = ucode_ptr - uboot->addr;
-+		ptr = (void *)image + offset;
-+		ptr[0] = uboot->addr + (data - image);
-+		ptr[1] = data_size;
-+		debug("Wrote microcode pointer at %x: addr=%x, size=%x\n",
-+		      ucode_ptr, ptr[0], ptr[1]);
-+	}
-+
- 	return 0;
- }
- 
-@@ -732,6 +814,7 @@
- 	       "   -x | --extract:                   extract intel fd modules\n"
- 	       "   -i | --inject <region>:<module>   inject file <module> into region <region>\n"
- 	       "   -w | --write <addr>:<file>        write file to appear at memory address <addr>\n"
-+	       "                                     multiple files can be written simultaneously\n"
- 	       "   -s | --spifreq <20|33|50>         set the SPI frequency\n"
- 	       "   -e | --em100                      set SPI frequency to 20MHz and disable\n"
- 	       "                                     Dual Output Fast Read Support\n"
-@@ -778,17 +861,20 @@
- 	int mode_spifreq = 0, mode_em100 = 0, mode_locked = 0;
- 	int mode_unlocked = 0, mode_write = 0, mode_write_descriptor = 0;
- 	int create = 0;
--	char *region_type_string = NULL, *src_fname = NULL;
--	char *addr_str = NULL;
-+	char *region_type_string = NULL, *inject_fname = NULL;
-+	char *desc_fname = NULL, *addr_str = NULL;
- 	int region_type = -1, inputfreq = 0;
- 	enum spi_frequency spifreq = SPI_FREQUENCY_20MHZ;
--	unsigned int addr = 0;
-+	struct input_file input_file[WRITE_MAX], *ifile, *fdt = NULL;
-+	unsigned char wr_idx, wr_num = 0;
- 	int rom_size = -1;
- 	bool write_it;
- 	char *filename;
- 	char *outfile = NULL;
- 	struct stat buf;
- 	int size = 0;
-+	unsigned int ucode_ptr = 0;
-+	bool have_uboot = false;
- 	int bios_fd;
- 	char *image;
- 	int ret;
-@@ -798,18 +884,21 @@
- 		{"descriptor", 1, NULL, 'D'},
- 		{"em100", 0, NULL, 'e'},
- 		{"extract", 0, NULL, 'x'},
-+		{"fdt", 1, NULL, 'f'},
- 		{"inject", 1, NULL, 'i'},
- 		{"lock", 0, NULL, 'l'},
-+		{"microcode", 1, NULL, 'm'},
- 		{"romsize", 1, NULL, 'r'},
- 		{"spifreq", 1, NULL, 's'},
- 		{"unlock", 0, NULL, 'u'},
-+		{"uboot", 1, NULL, 'U'},
- 		{"write", 1, NULL, 'w'},
- 		{"version", 0, NULL, 'v'},
- 		{"help", 0, NULL, 'h'},
- 		{0, 0, 0, 0}
- 	};
- 
--	while ((opt = getopt_long(argc, argv, "cdD:ehi:lr:s:uvw:x?",
-+	while ((opt = getopt_long(argc, argv, "cdD:ef:hi:lm:r:s:uU:vw:x?",
- 				  long_options, &option_index)) != EOF) {
- 		switch (opt) {
- 		case 'c':
-@@ -820,14 +909,14 @@
- 			break;
- 		case 'D':
- 			mode_write_descriptor = 1;
--			src_fname = optarg;
-+			desc_fname = optarg;
- 			break;
- 		case 'e':
- 			mode_em100 = 1;
- 			break;
- 		case 'i':
- 			if (get_two_words(optarg, &region_type_string,
--					  &src_fname)) {
-+					  &inject_fname)) {
- 				print_usage(argv[0]);
- 				exit(EXIT_FAILURE);
- 			}
-@@ -852,6 +941,9 @@
- 		case 'l':
- 			mode_locked = 1;
- 			break;
-+		case 'm':
-+			ucode_ptr = strtoul(optarg, NULL, 0);
-+			break;
- 		case 'r':
- 			rom_size = strtol(optarg, NULL, 0);
- 			debug("ROM size %d\n", rom_size);
-@@ -885,12 +977,29 @@
- 			exit(EXIT_SUCCESS);
- 			break;
- 		case 'w':
-+		case 'U':
-+		case 'f':
-+			ifile = &input_file[wr_num];
- 			mode_write = 1;
--			if (get_two_words(optarg, &addr_str, &src_fname)) {
--				print_usage(argv[0]);
--				exit(EXIT_FAILURE);
-+			if (wr_num < WRITE_MAX) {
-+				if (get_two_words(optarg, &addr_str,
-+						  &ifile->fname)) {
-+					print_usage(argv[0]);
-+					exit(EXIT_FAILURE);
-+				}
-+				ifile->addr = strtol(optarg, NULL, 0);
-+				ifile->type = opt == 'f' ? IF_fdt :
-+					opt == 'U' ? IF_uboot : IF_normal;
-+				if (ifile->type == IF_fdt)
-+					fdt = ifile;
-+				else if (ifile->type == IF_uboot)
-+					have_uboot = true;
-+				wr_num++;
-+			} else {
-+				fprintf(stderr,
-+					"The number of files to write simultaneously exceeds the limitation (%d)\n",
-+					WRITE_MAX);
- 			}
--			addr = strtol(optarg, NULL, 0);
- 			break;
- 		case 'x':
- 			mode_extract = 1;
-@@ -941,6 +1050,13 @@
- 		exit(EXIT_FAILURE);
- 	}
- 
-+	if (have_uboot && !fdt) {
-+		fprintf(stderr,
-+			"You must supply a device tree file for U-Boot\n\n");
-+		print_usage(argv[0]);
-+		exit(EXIT_FAILURE);
-+	}
-+
- 	filename = argv[optind];
- 	if (optind + 2 != argc)
- 		outfile = argv[optind + 1];
-@@ -997,13 +1113,27 @@
- 	}
- 
- 	if (mode_write_descriptor)
--		ret = write_data(image, size, -size, src_fname);
-+		ret = write_data(image, size, -size, desc_fname);
- 
- 	if (mode_inject)
--		ret = inject_region(image, size, region_type, src_fname);
-+		ret = inject_region(image, size, region_type, inject_fname);
- 
--	if (mode_write)
--		ret = write_data(image, size, addr, src_fname);
-+	if (mode_write) {
-+		for (wr_idx = 0; wr_idx < wr_num; wr_idx++) {
-+			ifile = &input_file[wr_idx];
-+			if (ifile->type == IF_fdt) {
-+				continue;
-+			} else if (ifile->type == IF_uboot) {
-+				ret = write_uboot(image, size, ifile, fdt,
-+						  ucode_ptr);
-+			} else {
-+				ret = write_data(image, size, ifile->addr,
-+					 ifile->fname);
-+			}
-+			if (ret < 0)
-+				break;
-+		}
-+	}
- 
- 	if (mode_spifreq)
- 		set_spi_frequency(image, size, spifreq);
-@@ -1035,5 +1165,5 @@
- 	free(image);
- 	close(bios_fd);
- 
--	return ret ? 1 : 0;
-+	return ret < 0 ? 1 : 0;
- }
-diff -ruN u-boot-2015.01-rc3/tools/ifdtool.h u-boot/tools/ifdtool.h
---- u-boot-2015.01-rc3/tools/ifdtool.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/tools/ifdtool.h	2015-01-01 17:34:32.893492759 +0100
-@@ -14,6 +14,8 @@
- 
- #define IFDTOOL_VERSION "1.1-U-Boot"
- 
-+#define WRITE_MAX	16
-+
- enum spi_frequency {
- 	SPI_FREQUENCY_20MHZ = 0,
- 	SPI_FREQUENCY_33MHZ = 1,
-diff -ruN u-boot-2015.01-rc3/tools/Makefile u-boot/tools/Makefile
---- u-boot-2015.01-rc3/tools/Makefile	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/tools/Makefile	2015-01-01 17:34:32.885492891 +0100
-@@ -126,6 +126,7 @@
- hostprogs-$(CONFIG_EXYNOS5420) += mkexynosspl
- HOSTCFLAGS_mkexynosspl.o := -pedantic
- 
-+ifdtool-objs := $(LIBFDT_OBJS) ifdtool.o
- hostprogs-$(CONFIG_X86) += ifdtool
- 
- hostprogs-$(CONFIG_MX23) += mxsboot
-diff -ruN u-boot-2015.01-rc3/tools/microcode-tool u-boot/tools/microcode-tool
---- u-boot-2015.01-rc3/tools/microcode-tool	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/tools/microcode-tool	2015-01-01 17:34:32.897492694 +0100
-@@ -0,0 +1,253 @@
-+#!/usr/bin/env python
-+#
-+# Copyright (c) 2014 Google, Inc
-+#
-+# SPDX-License-Identifier:      GPL-2.0+
-+#
-+# Intel microcode update tool
-+
-+from optparse import OptionParser
-+import os
-+import re
-+import struct
-+import sys
-+
-+MICROCODE_DIR = 'arch/x86/dts/microcode'
-+
-+class Microcode:
-+    """Holds information about the microcode for a particular model of CPU.
-+
-+    Attributes:
-+        name:  Name of the CPU this microcode is for, including any version
-+                   information (e.g. 'm12206a7_00000029')
-+        model: Model code string (this is cpuid(1).eax, e.g. '206a7')
-+        words: List of hex words containing the microcode. The first 16 words
-+                   are the public header.
-+    """
-+    def __init__(self, name, data):
-+        self.name = name
-+        # Convert data into a list of hex words
-+        self.words = []
-+        for value in ''.join(data).split(','):
-+            hexval = value.strip()
-+            if hexval:
-+                self.words.append(int(hexval, 0))
-+
-+        # The model is in the 4rd hex word
-+        self.model = '%x' % self.words[3]
-+
-+def ParseFile(fname):
-+    """Parse a micrcode.dat file and return the component parts
-+
-+    Args:
-+        fname: Filename to parse
-+    Returns:
-+        3-Tuple:
-+            date:         String containing date from the file's header
-+            license_text: List of text lines for the license file
-+            microcodes:   List of Microcode objects from the file
-+    """
-+    re_date = re.compile('/\* *(.* [0-9]{4}) *\*/$')
-+    re_license = re.compile('/[^-*+] *(.*)$')
-+    re_name = re.compile('/\* *(.*)\.inc *\*/', re.IGNORECASE)
-+    microcodes = {}
-+    license_text = []
-+    date = ''
-+    data = []
-+    name = None
-+    with open(fname) as fd:
-+        for line in fd:
-+            line = line.rstrip()
-+            m_date = re_date.match(line)
-+            m_license = re_license.match(line)
-+            m_name = re_name.match(line)
-+            if m_name:
-+                if name:
-+                    microcodes[name] = Microcode(name, data)
-+                name = m_name.group(1).lower()
-+                data = []
-+            elif m_license:
-+                license_text.append(m_license.group(1))
-+            elif m_date:
-+                date = m_date.group(1)
-+            else:
-+                data.append(line)
-+    if name:
-+        microcodes[name] = Microcode(name, data)
-+    return date, license_text, microcodes
-+
-+def List(date, microcodes, model):
-+    """List the available microcode chunks
-+
-+    Args:
-+        date:           Date of the microcode file
-+        microcodes:     Dict of Microcode objects indexed by name
-+        model:          Model string to search for, or None
-+    """
-+    print 'Date: %s' % date
-+    if model:
-+        mcode_list, tried = FindMicrocode(microcodes, model.lower())
-+        print 'Matching models %s:' % (', '.join(tried))
-+    else:
-+        print 'All models:'
-+        mcode_list = [microcodes[m] for m in microcodes.keys()]
-+    for mcode in mcode_list:
-+        print '%-20s: model %s' % (mcode.name, mcode.model)
-+
-+def FindMicrocode(microcodes, model):
-+    """Find all the microcode chunks which match the given model.
-+
-+    This model is something like 306a9 (the value returned in eax from
-+    cpuid(1) when running on Intel CPUs). But we allow a partial match,
-+    omitting the last 1 or two characters to allow many families to have the
-+    same microcode.
-+
-+    If the model name is ambiguous we return a list of matches.
-+
-+    Args:
-+        microcodes: Dict of Microcode objects indexed by name
-+        model:      String containing model name to find
-+    Returns:
-+        Tuple:
-+            List of matching Microcode objects
-+            List of abbreviations we tried
-+    """
-+    # Allow a full name to be used
-+    mcode = microcodes.get(model)
-+    if mcode:
-+        return [mcode], []
-+
-+    tried = []
-+    found = []
-+    for i in range(3):
-+        abbrev = model[:-i] if i else model
-+        tried.append(abbrev)
-+        for mcode in microcodes.values():
-+            if mcode.model.startswith(abbrev):
-+                found.append(mcode)
-+        if found:
-+            break
-+    return found, tried
-+
-+def CreateFile(date, license_text, mcode, outfile):
-+    """Create a microcode file in U-Boot's .dtsi format
-+
-+    Args:
-+        date:       String containing date of original microcode file
-+        license:    List of text lines for the license file
-+        mcode:      Microcode object to write
-+        outfile:    Filename to write to ('-' for stdout)
-+    """
-+    out = '''/*%s
-+ * ---
-+ * This is a device tree fragment. Use #include to add these properties to a
-+ * node.
-+ *
-+ * Date: %s
-+ */
-+
-+compatible = "intel,microcode";
-+intel,header-version = <%d>;
-+intel,update-revision = <%#x>;
-+intel,date-code = <%#x>;
-+intel,processor-signature = <%#x>;
-+intel,checksum = <%#x>;
-+intel,loader-revision = <%d>;
-+intel,processor-flags = <%#x>;
-+
-+/* The first 48-bytes are the public header which repeats the above data */
-+data = <%s
-+\t>;'''
-+    words = ''
-+    for i in range(len(mcode.words)):
-+        if not (i & 3):
-+            words += '\n'
-+        val = mcode.words[i]
-+        # Change each word so it will be little-endian in the FDT
-+        # This data is needed before RAM is available on some platforms so we
-+        # cannot do an endianness swap on boot.
-+        val = struct.unpack("<I", struct.pack(">I", val))[0]
-+        words += '\t%#010x' % val
-+
-+    # Take care to avoid adding a space before a tab
-+    text = ''
-+    for line in license_text:
-+        if line[0] == '\t':
-+            text += '\n *' + line
-+        else:
-+            text += '\n * ' + line
-+    args = [text, date]
-+    args += [mcode.words[i] for i in range(7)]
-+    args.append(words)
-+    if outfile == '-':
-+        print out % tuple(args)
-+    else:
-+        if not outfile:
-+            if not os.path.exists(MICROCODE_DIR):
-+                print >> sys.stderr, "Creating directory '%s'" % MICROCODE_DIR
-+                os.makedirs(MICROCODE_DIR)
-+            outfile = os.path.join(MICROCODE_DIR, mcode.name + '.dtsi')
-+            print >> sys.stderr, "Writing microcode for '%s' to '%s'" % (
-+                     mcode.name, outfile)
-+        with open(outfile, 'w') as fd:
-+            print >> fd, out % tuple(args)
-+
-+def MicrocodeTool():
-+    """Run the microcode tool"""
-+    commands = 'create,license,list'.split(',')
-+    parser = OptionParser()
-+    parser.add_option('-d', '--mcfile', type='string', action='store',
-+                    help='Name of microcode.dat file')
-+    parser.add_option('-m', '--model', type='string', action='store',
-+                    help='Model name to extract')
-+    parser.add_option('-o', '--outfile', type='string', action='store',
-+                    help='Filename to use for output (- for stdout), default is'
-+                    ' %s/<name>.dtsi' % MICROCODE_DIR)
-+    parser.usage += """ command
-+
-+    Process an Intel microcode file (use -h for help). Commands:
-+
-+       create     Create microcode .dtsi file for a model
-+       list       List available models in microcode file
-+       license    Print the license
-+
-+    Typical usage:
-+
-+       ./tools/microcode-tool -d microcode.dat -m 306a create
-+
-+    This will find the appropriate file and write it to %s.""" % MICROCODE_DIR
-+
-+    (options, args) = parser.parse_args()
-+    if not args:
-+        parser.error('Please specify a command')
-+    cmd = args[0]
-+    if cmd not in commands:
-+        parser.error("Unknown command '%s'" % cmd)
-+
-+    if not options.mcfile:
-+        parser.error('You must specify a microcode file')
-+    date, license_text, microcodes = ParseFile(options.mcfile)
-+
-+    if cmd == 'list':
-+        List(date, microcodes, options.model)
-+    elif cmd == 'license':
-+        print '\n'.join(license_text)
-+    elif cmd == 'create':
-+        if not options.model:
-+            parser.error('You must specify a model to create')
-+        model = options.model.lower()
-+        mcode_list, tried = FindMicrocode(microcodes, model)
-+        if not mcode_list:
-+            parser.error("Unknown model '%s' (%s) - try 'list' to list" %
-+                        (model, ', '.join(tried)))
-+        if len(mcode_list) > 1:
-+            parser.error("Ambiguous model '%s' (%s) matched %s - try 'list' "
-+                        "to list or specify a particular file" %
-+                        (model, ', '.join(tried),
-+                        ', '.join([m.name for m in mcode_list])))
-+        CreateFile(date, license_text, mcode_list[0], options.outfile)
-+    else:
-+        parser.error("Unknown command '%s'" % cmd)
-+
-+if __name__ == "__main__":
-+    MicrocodeTool()
-diff -ruN u-boot-2015.01-rc3/tools/microcode-tool.py u-boot/tools/microcode-tool.py
---- u-boot-2015.01-rc3/tools/microcode-tool.py	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/tools/microcode-tool.py	2015-01-01 17:34:32.897492694 +0100
-@@ -0,0 +1,253 @@
-+#!/usr/bin/env python
-+#
-+# Copyright (c) 2014 Google, Inc
-+#
-+# SPDX-License-Identifier:      GPL-2.0+
-+#
-+# Intel microcode update tool
-+
-+from optparse import OptionParser
-+import os
-+import re
-+import struct
-+import sys
-+
-+MICROCODE_DIR = 'arch/x86/dts/microcode'
-+
-+class Microcode:
-+    """Holds information about the microcode for a particular model of CPU.
-+
-+    Attributes:
-+        name:  Name of the CPU this microcode is for, including any version
-+                   information (e.g. 'm12206a7_00000029')
-+        model: Model code string (this is cpuid(1).eax, e.g. '206a7')
-+        words: List of hex words containing the microcode. The first 16 words
-+                   are the public header.
-+    """
-+    def __init__(self, name, data):
-+        self.name = name
-+        # Convert data into a list of hex words
-+        self.words = []
-+        for value in ''.join(data).split(','):
-+            hexval = value.strip()
-+            if hexval:
-+                self.words.append(int(hexval, 0))
-+
-+        # The model is in the 4rd hex word
-+        self.model = '%x' % self.words[3]
-+
-+def ParseFile(fname):
-+    """Parse a micrcode.dat file and return the component parts
-+
-+    Args:
-+        fname: Filename to parse
-+    Returns:
-+        3-Tuple:
-+            date:         String containing date from the file's header
-+            license_text: List of text lines for the license file
-+            microcodes:   List of Microcode objects from the file
-+    """
-+    re_date = re.compile('/\* *(.* [0-9]{4}) *\*/$')
-+    re_license = re.compile('/[^-*+] *(.*)$')
-+    re_name = re.compile('/\* *(.*)\.inc *\*/', re.IGNORECASE)
-+    microcodes = {}
-+    license_text = []
-+    date = ''
-+    data = []
-+    name = None
-+    with open(fname) as fd:
-+        for line in fd:
-+            line = line.rstrip()
-+            m_date = re_date.match(line)
-+            m_license = re_license.match(line)
-+            m_name = re_name.match(line)
-+            if m_name:
-+                if name:
-+                    microcodes[name] = Microcode(name, data)
-+                name = m_name.group(1).lower()
-+                data = []
-+            elif m_license:
-+                license_text.append(m_license.group(1))
-+            elif m_date:
-+                date = m_date.group(1)
-+            else:
-+                data.append(line)
-+    if name:
-+        microcodes[name] = Microcode(name, data)
-+    return date, license_text, microcodes
-+
-+def List(date, microcodes, model):
-+    """List the available microcode chunks
-+
-+    Args:
-+        date:           Date of the microcode file
-+        microcodes:     Dict of Microcode objects indexed by name
-+        model:          Model string to search for, or None
-+    """
-+    print 'Date: %s' % date
-+    if model:
-+        mcode_list, tried = FindMicrocode(microcodes, model.lower())
-+        print 'Matching models %s:' % (', '.join(tried))
-+    else:
-+        print 'All models:'
-+        mcode_list = [microcodes[m] for m in microcodes.keys()]
-+    for mcode in mcode_list:
-+        print '%-20s: model %s' % (mcode.name, mcode.model)
-+
-+def FindMicrocode(microcodes, model):
-+    """Find all the microcode chunks which match the given model.
-+
-+    This model is something like 306a9 (the value returned in eax from
-+    cpuid(1) when running on Intel CPUs). But we allow a partial match,
-+    omitting the last 1 or two characters to allow many families to have the
-+    same microcode.
-+
-+    If the model name is ambiguous we return a list of matches.
-+
-+    Args:
-+        microcodes: Dict of Microcode objects indexed by name
-+        model:      String containing model name to find
-+    Returns:
-+        Tuple:
-+            List of matching Microcode objects
-+            List of abbreviations we tried
-+    """
-+    # Allow a full name to be used
-+    mcode = microcodes.get(model)
-+    if mcode:
-+        return [mcode], []
-+
-+    tried = []
-+    found = []
-+    for i in range(3):
-+        abbrev = model[:-i] if i else model
-+        tried.append(abbrev)
-+        for mcode in microcodes.values():
-+            if mcode.model.startswith(abbrev):
-+                found.append(mcode)
-+        if found:
-+            break
-+    return found, tried
-+
-+def CreateFile(date, license_text, mcode, outfile):
-+    """Create a microcode file in U-Boot's .dtsi format
-+
-+    Args:
-+        date:       String containing date of original microcode file
-+        license:    List of text lines for the license file
-+        mcode:      Microcode object to write
-+        outfile:    Filename to write to ('-' for stdout)
-+    """
-+    out = '''/*%s
-+ * ---
-+ * This is a device tree fragment. Use #include to add these properties to a
-+ * node.
-+ *
-+ * Date: %s
-+ */
-+
-+compatible = "intel,microcode";
-+intel,header-version = <%d>;
-+intel,update-revision = <%#x>;
-+intel,date-code = <%#x>;
-+intel,processor-signature = <%#x>;
-+intel,checksum = <%#x>;
-+intel,loader-revision = <%d>;
-+intel,processor-flags = <%#x>;
-+
-+/* The first 48-bytes are the public header which repeats the above data */
-+data = <%s
-+\t>;'''
-+    words = ''
-+    for i in range(len(mcode.words)):
-+        if not (i & 3):
-+            words += '\n'
-+        val = mcode.words[i]
-+        # Change each word so it will be little-endian in the FDT
-+        # This data is needed before RAM is available on some platforms so we
-+        # cannot do an endianness swap on boot.
-+        val = struct.unpack("<I", struct.pack(">I", val))[0]
-+        words += '\t%#010x' % val
-+
-+    # Take care to avoid adding a space before a tab
-+    text = ''
-+    for line in license_text:
-+        if line[0] == '\t':
-+            text += '\n *' + line
-+        else:
-+            text += '\n * ' + line
-+    args = [text, date]
-+    args += [mcode.words[i] for i in range(7)]
-+    args.append(words)
-+    if outfile == '-':
-+        print out % tuple(args)
-+    else:
-+        if not outfile:
-+            if not os.path.exists(MICROCODE_DIR):
-+                print >> sys.stderr, "Creating directory '%s'" % MICROCODE_DIR
-+                os.makedirs(MICROCODE_DIR)
-+            outfile = os.path.join(MICROCODE_DIR, mcode.name + '.dtsi')
-+            print >> sys.stderr, "Writing microcode for '%s' to '%s'" % (
-+                     mcode.name, outfile)
-+        with open(outfile, 'w') as fd:
-+            print >> fd, out % tuple(args)
-+
-+def MicrocodeTool():
-+    """Run the microcode tool"""
-+    commands = 'create,license,list'.split(',')
-+    parser = OptionParser()
-+    parser.add_option('-d', '--mcfile', type='string', action='store',
-+                    help='Name of microcode.dat file')
-+    parser.add_option('-m', '--model', type='string', action='store',
-+                    help='Model name to extract')
-+    parser.add_option('-o', '--outfile', type='string', action='store',
-+                    help='Filename to use for output (- for stdout), default is'
-+                    ' %s/<name>.dtsi' % MICROCODE_DIR)
-+    parser.usage += """ command
-+
-+    Process an Intel microcode file (use -h for help). Commands:
-+
-+       create     Create microcode .dtsi file for a model
-+       list       List available models in microcode file
-+       license    Print the license
-+
-+    Typical usage:
-+
-+       ./tools/microcode-tool -d microcode.dat -m 306a create
-+
-+    This will find the appropriate file and write it to %s.""" % MICROCODE_DIR
-+
-+    (options, args) = parser.parse_args()
-+    if not args:
-+        parser.error('Please specify a command')
-+    cmd = args[0]
-+    if cmd not in commands:
-+        parser.error("Unknown command '%s'" % cmd)
-+
-+    if not options.mcfile:
-+        parser.error('You must specify a microcode file')
-+    date, license_text, microcodes = ParseFile(options.mcfile)
-+
-+    if cmd == 'list':
-+        List(date, microcodes, options.model)
-+    elif cmd == 'license':
-+        print '\n'.join(license_text)
-+    elif cmd == 'create':
-+        if not options.model:
-+            parser.error('You must specify a model to create')
-+        model = options.model.lower()
-+        mcode_list, tried = FindMicrocode(microcodes, model)
-+        if not mcode_list:
-+            parser.error("Unknown model '%s' (%s) - try 'list' to list" %
-+                        (model, ', '.join(tried)))
-+        if len(mcode_list) > 1:
-+            parser.error("Ambiguous model '%s' (%s) matched %s - try 'list' "
-+                        "to list or specify a particular file" %
-+                        (model, ', '.join(tried),
-+                        ', '.join([m.name for m in mcode_list])))
-+        CreateFile(date, license_text, mcode_list[0], options.outfile)
-+    else:
-+        parser.error("Unknown command '%s'" % cmd)
-+
-+if __name__ == "__main__":
-+    MicrocodeTool()
-diff -ruN u-boot-2015.01-rc3/tools/pblimage.c u-boot/tools/pblimage.c
---- u-boot-2015.01-rc3/tools/pblimage.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/tools/pblimage.c	2015-01-01 17:34:32.905492563 +0100
-@@ -1,5 +1,5 @@
- /*
-- * Copyright 2012 Freescale Semiconductor, Inc.
-+ * Copyright 2012-2014 Freescale Semiconductor, Inc.
-  *
-  * SPDX-License-Identifier:	GPL-2.0+
-  */
-@@ -8,6 +8,10 @@
- #include "pblimage.h"
- #include "pbl_crc32.h"
- 
-+#define roundup(x, y)		((((x) + ((y) - 1)) / (y)) * (y))
-+#define PBL_ACS_CONT_CMD	0x81000000
-+#define PBL_ADDR_24BIT_MASK	0x00ffffff
-+
- /*
-  * Initialize to an invalid value.
-  */
-@@ -22,6 +26,13 @@
- static char *fname = "Unknown";
- static int lineno = -1;
- static struct pbl_header pblimage_header;
-+static int uboot_size;
-+static int arch_flag;
-+
-+static uint32_t pbl_cmd_initaddr;
-+static uint32_t pbi_crc_cmd1;
-+static uint32_t pbi_crc_cmd2;
-+static uint32_t pbl_end_cmd[4];
- 
- static union
- {
-@@ -38,20 +49,6 @@
-  * start offset by subtracting the size of the u-boot image from the
-  * top of the allowable 24-bit range.
-  */
--static void init_next_pbl_cmd(FILE *fp_uboot)
--{
--	struct stat st;
--	int fd = fileno(fp_uboot);
--
--	if (fstat(fd, &st) == -1) {
--		printf("Error: Could not determine u-boot image size. %s\n",
--			strerror(errno));
--		exit(EXIT_FAILURE);
--	}
--
--	next_pbl_cmd = 0x82000000 - st.st_size;
--}
--
- static void generate_pbl_cmd(void)
- {
- 	uint32_t val = next_pbl_cmd;
-@@ -66,11 +63,15 @@
- 
- static void pbl_fget(size_t size, FILE *stream)
- {
--	unsigned char c;
-+	unsigned char c = 0xff;
- 	int c_temp;
- 
--	while (size && (c_temp = fgetc(stream)) != EOF) {
--		c = (unsigned char)c_temp;
-+	while (size) {
-+		c_temp = fgetc(stream);
-+		if (c_temp != EOF)
-+			c = (unsigned char)c_temp;
-+		else if ((c_temp == EOF) && (arch_flag == IH_ARCH_ARM))
-+			c = 0xff;
- 		*pmem_buf++ = c;
- 		pbl_size++;
- 		size--;
-@@ -80,8 +81,8 @@
- /* load split u-boot with PBI command 81xxxxxx. */
- static void load_uboot(FILE *fp_uboot)
- {
--	init_next_pbl_cmd(fp_uboot);
--	while (next_pbl_cmd < 0x82000000) {
-+	next_pbl_cmd = pbl_cmd_initaddr - uboot_size;
-+	while (next_pbl_cmd < pbl_cmd_initaddr) {
- 		generate_pbl_cmd();
- 		pbl_fget(64, fp_uboot);
- 	}
-@@ -154,8 +155,6 @@
- /* write end command and crc command to memory. */
- static void add_end_cmd(void)
- {
--	uint32_t pbl_end_cmd[4] = {0x09138000, 0x00000000,
--		0x091380c0, 0x00000000};
- 	uint32_t crc32_pbl;
- 	int i;
- 	unsigned char *p = (unsigned char *)&pbl_end_cmd;
-@@ -172,8 +171,8 @@
- 
- 	/* Add PBI CRC command. */
- 	*pmem_buf++ = 0x08;
--	*pmem_buf++ = 0x13;
--	*pmem_buf++ = 0x80;
-+	*pmem_buf++ = pbi_crc_cmd1;
-+	*pmem_buf++ = pbi_crc_cmd2;
- 	*pmem_buf++ = 0x40;
- 	pbl_size += 4;
- 
-@@ -184,17 +183,6 @@
- 	*pmem_buf++ = (crc32_pbl >> 8) & 0xff;
- 	*pmem_buf++ = (crc32_pbl) & 0xff;
- 	pbl_size += 4;
--
--	if ((pbl_size % 16) != 0) {
--		for (i = 0; i < 8; i++) {
--			*pmem_buf++ = 0x0;
--			pbl_size++;
--		}
--	}
--	if ((pbl_size % 16 != 0)) {
--		printf("Error: Bad size of image file\n");
--		exit(EXIT_FAILURE);
--	}
- }
- 
- void pbl_load_uboot(int ifd, struct image_tool_params *params)
-@@ -268,12 +256,64 @@
- 	/*nothing need to do, pbl_load_uboot takes care of whole file. */
- }
- 
-+int pblimage_check_params(struct image_tool_params *params)
-+{
-+	FILE *fp_uboot;
-+	int fd;
-+	struct stat st;
-+
-+	if (!params)
-+		return EXIT_FAILURE;
-+
-+	fp_uboot = fopen(params->datafile, "r");
-+	if (fp_uboot == NULL) {
-+		printf("Error: %s open failed\n", params->datafile);
-+		exit(EXIT_FAILURE);
-+	}
-+	fd = fileno(fp_uboot);
-+
-+	if (fstat(fd, &st) == -1) {
-+		printf("Error: Could not determine u-boot image size. %s\n",
-+		       strerror(errno));
-+		exit(EXIT_FAILURE);
-+	}
-+
-+	/* For the variable size, we need to pad it to 64 byte boundary */
-+	uboot_size = roundup(st.st_size, 64);
-+
-+	if (params->arch == IH_ARCH_ARM) {
-+		arch_flag = IH_ARCH_ARM;
-+		pbi_crc_cmd1 = 0x61;
-+		pbi_crc_cmd2 = 0;
-+		pbl_cmd_initaddr = params->addr & PBL_ADDR_24BIT_MASK;
-+		pbl_cmd_initaddr |= PBL_ACS_CONT_CMD;
-+		pbl_cmd_initaddr |= uboot_size;
-+		pbl_end_cmd[0] = 0x09610000;
-+		pbl_end_cmd[1] = 0x00000000;
-+		pbl_end_cmd[2] = 0x096100c0;
-+		pbl_end_cmd[3] = 0x00000000;
-+	} else if (params->arch == IH_ARCH_PPC) {
-+		arch_flag = IH_ARCH_PPC;
-+		pbi_crc_cmd1 = 0x13;
-+		pbi_crc_cmd2 = 0x80;
-+		pbl_cmd_initaddr = 0x82000000;
-+		pbl_end_cmd[0] = 0x09138000;
-+		pbl_end_cmd[1] = 0x00000000;
-+		pbl_end_cmd[2] = 0x091380c0;
-+		pbl_end_cmd[3] = 0x00000000;
-+	}
-+
-+	next_pbl_cmd = pbl_cmd_initaddr;
-+	return 0;
-+};
-+
- /* pblimage parameters */
- static struct image_type_params pblimage_params = {
- 	.name		= "Freescale PBL Boot Image support",
- 	.header_size	= sizeof(struct pbl_header),
- 	.hdr		= (void *)&pblimage_header,
- 	.check_image_type = pblimage_check_image_types,
-+	.check_params	= pblimage_check_params,
- 	.verify_header	= pblimage_verify_header,
- 	.print_header	= pblimage_print_header,
- 	.set_header	= pblimage_set_header,
-- 
2.2.1

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From daniel at makrotopia.org  Sat Jan 10 13:09:05 2015
From: daniel at makrotopia.org (Daniel Golle)
Date: Sat, 10 Jan 2015 19:09:05 +0100
Subject: [OpenWrt-Devel] [PATCH 3/7] uboot-sunxi: fix bananapro target
Message-ID: <20150110180859.GA27572@makrotopia.org>

At least making sure stuff compiles before committing would be nice.

Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 package/boot/uboot-sunxi/patches/003-add-lemaker-bananapro.diff | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/boot/uboot-sunxi/patches/003-add-lemaker-bananapro.diff b/package/boot/uboot-sunxi/patches/003-add-lemaker-bananapro.diff
index 1d2677c..23d0ebf 100644
--- a/package/boot/uboot-sunxi/patches/003-add-lemaker-bananapro.diff
+++ b/package/boot/uboot-sunxi/patches/003-add-lemaker-bananapro.diff
@@ -5,7 +5,7 @@ diff -ruN u-boot-2015.01-rc3.old/board/sunxi/Makefile u-boot-2015.01-rc3/board/s
  obj-$(CONFIG_TARGET_AUXTEK_T004)	+= dram_a10s_olinuxino_m.o
  obj-$(CONFIG_TARGET_BA10_TV_BOX)	+= dram_sun4i_384_1024_iow8.o
  obj-$(CONFIG_TARGET_BANANAPI)		+= dram_bananapi.o
-+obj-$(CONFIG_TARGET_BANANAPI)		+= dram_bananapi.o
++obj-$(CONFIG_TARGET_BANANAPRO)		+= dram_bananapi.o
  obj-$(CONFIG_TARGET_CUBIEBOARD)		+= dram_cubieboard.o
  obj-$(CONFIG_TARGET_CUBIEBOARD2)	+= dram_cubieboard2.o
  obj-$(CONFIG_TARGET_CUBIETRUCK)		+= dram_cubietruck.o
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From daniel at makrotopia.org  Sat Jan 10 13:09:22 2015
From: daniel at makrotopia.org (Daniel Golle)
Date: Sat, 10 Jan 2015 19:09:22 +0100
Subject: [OpenWrt-Devel] [PATCH 4/7] sunxi: fix DTS syntax in bananapro
	device tree
Message-ID: <20150110180916.GA27578@makrotopia.org>

add missing semicolon

Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 target/linux/sunxi/patches-3.18/301-add-bananapro.diff | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/sunxi/patches-3.18/301-add-bananapro.diff b/target/linux/sunxi/patches-3.18/301-add-bananapro.diff
index 47454e9..2634240 100644
--- a/target/linux/sunxi/patches-3.18/301-add-bananapro.diff
+++ b/target/linux/sunxi/patches-3.18/301-add-bananapro.diff
@@ -90,7 +90,7 @@ diff -ruN old/arch/arm/boot/dts/sun7i-a20-bananapro.dts new/arch/arm/boot/dts/su
 +			#size-cells = <0>;
 +
 +			pinctrl-names = "default";
-+			pinctrl-0 = <&mmc3_pins_a>
++			pinctrl-0 = <&mmc3_pins_a>;
 +			vmmc-supply = <&reg_vmmc3>;
 +			bus-width = <4>;
 +			non-removable;
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From daniel at makrotopia.org  Sat Jan 10 13:10:04 2015
From: daniel at makrotopia.org (Daniel Golle)
Date: Sat, 10 Jan 2015 19:10:04 +0100
Subject: [OpenWrt-Devel] [PATCH 5/7] sunxi: merge upstream devicetree
 improvements for bananapro
Message-ID: <20150110180956.GA27585@makrotopia.org>

merges DTS published on linux devicetree mailing list.

Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 .../sunxi/patches-3.18/301-add-bananapro.diff      | 57 +++++++++++++++++++---
 1 file changed, 49 insertions(+), 8 deletions(-)

diff --git a/target/linux/sunxi/patches-3.18/301-add-bananapro.diff b/target/linux/sunxi/patches-3.18/301-add-bananapro.diff
index 2634240..a5d7154 100644
--- a/target/linux/sunxi/patches-3.18/301-add-bananapro.diff
+++ b/target/linux/sunxi/patches-3.18/301-add-bananapro.diff
@@ -12,27 +12,28 @@ diff -ruN old/arch/arm/boot/dts/Makefile new/arch/arm/boot/dts/Makefile
 diff -ruN old/arch/arm/boot/dts/sun7i-a20-bananapro.dts new/arch/arm/boot/dts/sun7i-a20-bananapro.dts
 --- old/arch/arm/boot/dts/sun7i-a20-bananapro.dts	1970-01-01 01:00:00.000000000 +0100
 +++ new/arch/arm/boot/dts/sun7i-a20-bananapro.dts	2015-01-06 09:31:18.290582574 +0100
-@@ -0,0 +1,232 @@
+@@ -0,0 +1,273 @@
 +/*
 + * Copyright 2014 Zoltan HERPAI <wigyori at uid0.hu>
++ * Copyright 2015 Hans de Goede <hdegoede at xxxxxxxxxx>
 + *
 + * This file is dual-licensed: you can use it either under the terms
 + * of the GPL or the X11 license, at your option. Note that this dual
 + * licensing only applies to this file, and not this project as a
 + * whole.
 + *
-+ *  a) This library is free software; you can redistribute it and/or
++ *  a) This file is free software; you can redistribute it and/or
 + *     modify it under the terms of the GNU General Public License as
 + *     published by the Free Software Foundation; either version 2 of the
 + *     License, or (at your option) any later version.
 + *
-+ *     This library is distributed in the hope that it will be useful,
++ *     This file 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.
 + *
 + *     You should have received a copy of the GNU General Public
-+ *     License along with this library; if not, write to the Free
++ *     License along with this file; if not, write to the Free
 + *     Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
 + *     MA 02110-1301 USA
 + *
@@ -132,6 +133,20 @@ diff -ruN old/arch/arm/boot/dts/sun7i-a20-bananapro.dts new/arch/arm/boot/dts/su
 +		};
 +
 +		pinctrl at 01c20800 {
++			usb1_vbus_pin_bananapro: usb1_vbus_pin at 0 {
++				allwinner,pins = "PH0";
++				allwinner,function = "gpio_out";
++				allwinner,drive = <0>;
++				allwinner,pull = <0>;
++			};
++
++			usb2_vbus_pin_bananapro: usb2_vbus_pin at 0 {
++				allwinner,pins = "PH1";
++				allwinner,function = "gpio_out";
++				allwinner,drive = <0>;
++				allwinner,pull = <0>;
++			};
++
 +			mmc0_cd_pin_bananapro: mmc0_cd_pin at 0 {
 +				allwinner,pins = "PH10";
 +				allwinner,function = "gpio_in";
@@ -139,6 +154,13 @@ diff -ruN old/arch/arm/boot/dts/sun7i-a20-bananapro.dts new/arch/arm/boot/dts/su
 +				allwinner,pull = <1>;
 +			};
 +
++			vmmc3_pin_bananapro: vmmc3_pin at 0 {
++				allwinner,pins = "PH22";
++				allwinner,function = "gpio_out";
++				allwinner,drive = <0>;
++				allwinner,pull = <0>;
++			};
++
 +			gmac_power_pin_bananapro: gmac_power_pin at 0 {
 +				allwinner,pins = "PH23";
 +				allwinner,function = "gpio_out";
@@ -147,7 +169,7 @@ diff -ruN old/arch/arm/boot/dts/sun7i-a20-bananapro.dts new/arch/arm/boot/dts/su
 +			};
 +
 +			led_pins_bananapro: led_pins at 0 {
-+				allwinner,pins = "PH24";
++				allwinner,pins = "PH24", "PG2";
 +				allwinner,function = "gpio_out";
 +				allwinner,drive = <0>;
 +				allwinner,pull = <0>;
@@ -166,9 +188,9 @@ diff -ruN old/arch/arm/boot/dts/sun7i-a20-bananapro.dts new/arch/arm/boot/dts/su
 +			status = "okay";
 +		};
 +
-+		uart3: serial at 01c28c00 {
++		uart2: serial at 01c28800 {
 +			pinctrl-names = "default";
-+			pinctrl-0 = <&uart3_pins_b>;
++			pinctrl-0 = <&uart2_pins_a>;
 +			status = "okay";
 +		};
 +
@@ -223,13 +245,21 @@ diff -ruN old/arch/arm/boot/dts/sun7i-a20-bananapro.dts new/arch/arm/boot/dts/su
 +			label = "bananapro:green:usr";
 +			gpios = <&pio 7 24 0>;
 +		};
++		blue {
++			label = "bananapro:blue:usr";
++			gpios = <&pio 6 2 0>;
++		};
 +	};
 +
 +	reg_usb1_vbus: usb1-vbus {
++		pinctrl-0 = <&usb1_vbus_pin_bananapro>;
++		gpio = <&pio 7 0 0>; /* PH0 */
 +		status = "okay";
 +	};
 +
 +	reg_usb2_vbus: usb2-vbus {
++		pinctrl-0 = <&usb2_vbus_pin_bananapro>;
++		gpio = <&pio 7 1 0>; /* PH1 */
 +		status = "okay";
 +	};
 +
@@ -240,8 +270,19 @@ diff -ruN old/arch/arm/boot/dts/sun7i-a20-bananapro.dts new/arch/arm/boot/dts/su
 +		regulator-name = "gmac-3v3";
 +		regulator-min-microvolt = <3300000>;
 +		regulator-max-microvolt = <3300000>;
-+		startup-delay-us = <50000>;
++		startup-delay-us = <100000>;
 +		enable-active-high;
 +		gpio = <&pio 7 23 0>;
 +	};
++
++	reg_vmmc3: vmmc3 {
++		compatible = "regulator-fixed";
++		pinctrl-names = "default";
++		pinctrl-0 = <&vmmc3_pin_bananapro>;
++		regulator-name = "vmmc3";
++		regulator-min-microvolt = <3300000>;
++		regulator-max-microvolt = <3300000>;
++		enable-active-high;
++		gpio = <&pio 7 22 0>;
++	};
 +};
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From daniel at makrotopia.org  Sat Jan 10 13:10:22 2015
From: daniel at makrotopia.org (Daniel Golle)
Date: Sat, 10 Jan 2015 19:10:22 +0100
Subject: [OpenWrt-Devel] [PATCH 6/7] uboot-sunxi: add support for Lamobo R1
Message-ID: <20150110181017.GA27591@makrotopia.org>

Seems to be identical with bananapi, however, sdcard image generation
scripts currently depend on having u-boot named the same as the profile.

Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 package/boot/uboot-sunxi/Makefile                  |  5 +++
 .../uboot-sunxi/patches/004-add-lamobo-r1.patch    | 37 ++++++++++++++++++++++
 2 files changed, 42 insertions(+)
 create mode 100644 package/boot/uboot-sunxi/patches/004-add-lamobo-r1.patch

diff --git a/package/boot/uboot-sunxi/Makefile b/package/boot/uboot-sunxi/Makefile
index d61e4a3..6571088 100644
--- a/package/boot/uboot-sunxi/Makefile
+++ b/package/boot/uboot-sunxi/Makefile
@@ -86,6 +86,10 @@ define uboot/Linksprite_pcDuino3
   TITLE:=U-Boot for Linksprite pcDuino3
 endef  
 
+define uboot/Lamobo-R1
+  TITLE:=U-Boot for Lamobo R1
+endef
+
 UBOOTS:= \
 	A10-OLinuXino-Lime \
 	A13-OLinuXino \
@@ -101,6 +105,7 @@ UBOOTS:= \
 	OLIMEX-A13-SOM \
 	Linksprite_pcDuino \
 	Linksprite_pcDuino3 \
+	Lamobo-R1 \
 
 define Package/uboot/template
 define Package/uboot-sunxi-$(1)
diff --git a/package/boot/uboot-sunxi/patches/004-add-lamobo-r1.patch b/package/boot/uboot-sunxi/patches/004-add-lamobo-r1.patch
new file mode 100644
index 0000000..7f52cce
--- /dev/null
+++ b/package/boot/uboot-sunxi/patches/004-add-lamobo-r1.patch
@@ -0,0 +1,37 @@
+Index: u-boot-2015.01-rc4/board/sunxi/Makefile
+===================================================================
+--- u-boot-2015.01-rc4.orig/board/sunxi/Makefile
++++ u-boot-2015.01-rc4/board/sunxi/Makefile
+@@ -23,6 +23,7 @@ obj-$(CONFIG_TARGET_AUXTEK_T004)	+= dram
+ obj-$(CONFIG_TARGET_BA10_TV_BOX)	+= dram_sun4i_384_1024_iow8.o
+ obj-$(CONFIG_TARGET_BANANAPI)		+= dram_bananapi.o
+ obj-$(CONFIG_TARGET_BANANAPRO)		+= dram_bananapi.o
++obj-$(CONFIG_TARGET_LAMOBO_R1)		+= dram_bananapi.o
+ obj-$(CONFIG_TARGET_CUBIEBOARD)		+= dram_cubieboard.o
+ obj-$(CONFIG_TARGET_CUBIEBOARD2)	+= dram_cubieboard2.o
+ obj-$(CONFIG_TARGET_CUBIETRUCK)		+= dram_cubietruck.o
+Index: u-boot-2015.01-rc4/board/sunxi/gmac.c
+===================================================================
+--- u-boot-2015.01-rc4.orig/board/sunxi/gmac.c
++++ u-boot-2015.01-rc4/board/sunxi/gmac.c
+@@ -34,7 +34,7 @@ int sunxi_gmac_initialize(bd_t *bis)
+ 	 * need to set bits 10-12 GTXDC "GMAC Transmit Clock Delay Chain"
+ 	 * of the GMAC clk register to 3.
+ 	 */
+-#ifdef CONFIG_TARGET_BANANAPI
++#if defined(CONFIG_TARGET_BANANAPI) || defined(CONFIG_TARGET_LAMOBO_R1)
+ 	setbits_le32(&ccm->gmac_clk_cfg, 0x3 << 10);
+ #endif
+ 
+Index: u-boot-2015.01-rc4/configs/Lamobo-R1_defconfig
+===================================================================
+--- /dev/null
++++ u-boot-2015.01-rc4/configs/Lamobo-R1_defconfig
+@@ -0,0 +1,7 @@
++CONFIG_SPL=y
++CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_GMAC,RGMII,MACPWR=SUNXI_GPH(23),AHCI,USB_EHCI"
++CONFIG_FDTFILE="sun7i-a20-lamobo-r1.dtb"
+++S:CONFIG_ARM=y
+++S:CONFIG_ARCH_SUNXI=y
+++S:CONFIG_MACH_SUN7I=y
+++S:CONFIG_TARGET_LAMOBO_R1=y
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From daniel at makrotopia.org  Sat Jan 10 13:11:04 2015
From: daniel at makrotopia.org (Daniel Golle)
Date: Sat, 10 Jan 2015 19:11:04 +0100
Subject: [OpenWrt-Devel] [PATCH 7/7] sunxi: add support for Lamobo R1
Message-ID: <20150110181058.GA27599@makrotopia.org>

Initial support for BananaPi-R1 aka Lamobo-R1.

Based on patchset form Wang Yi <wangyi8848 at gmail.com> published on
https://github.com/Lamobo/Lamobo-R1-OpenWrt

Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 target/linux/sunxi/config-3.18                     |   7 +
 target/linux/sunxi/image/Makefile                  |   7 +-
 .../patches-3.18/302-dt-sun7i-add-lamobo-r1.patch  | 221 +++++++++++++++++++++
 target/linux/sunxi/profiles/lamobo-r1.mk           |  19 ++
 4 files changed, 253 insertions(+), 1 deletion(-)
 mode change 100644 => 100755 target/linux/sunxi/image/Makefile
 create mode 100644 target/linux/sunxi/patches-3.18/302-dt-sun7i-add-lamobo-r1.patch
 create mode 100644 target/linux/sunxi/profiles/lamobo-r1.mk

diff --git a/target/linux/sunxi/config-3.18 b/target/linux/sunxi/config-3.18
index 44b5d89..3dfe903 100644
--- a/target/linux/sunxi/config-3.18
+++ b/target/linux/sunxi/config-3.18
@@ -58,6 +58,11 @@ CONFIG_AUDIT=y
 CONFIG_AUDIT_GENERIC=y
 CONFIG_AUTO_ZRELADDR=y
 CONFIG_AVERAGE=y
+CONFIG_B53=y
+# CONFIG_B53_MMAP_DRIVER is not set
+CONFIG_B53_PHY_DRIVER=y
+CONFIG_B53_PHY_FIXUP=y
+# CONFIG_B53_SRAB_DRIVER is not set
 CONFIG_BINFMT_MISC=y
 CONFIG_BLK_CGROUP=y
 CONFIG_BLK_DEV_SD=y
@@ -305,6 +310,7 @@ CONFIG_MFD_SUN6I_PRCM=y
 CONFIG_MIGHT_HAVE_CACHE_L2X0=y
 CONFIG_MIGHT_HAVE_PCI=y
 CONFIG_MIGRATION=y
+CONFIG_MII=y
 CONFIG_MMC=y
 CONFIG_MMC_BLOCK=y
 # CONFIG_MMC_BLOCK_BOUNCE is not set
@@ -448,6 +454,7 @@ CONFIG_STRICT_DEVMEM=y
 CONFIG_SUN4I_TIMER=y
 CONFIG_SUN5I_HSTIMER=y
 CONFIG_SUNXI_WATCHDOG=y
+CONFIG_SWCONFIG=y
 CONFIG_SWIOTLB=y
 CONFIG_SWP_EMULATE=y
 CONFIG_SYSFS_SYSCALL=y
diff --git a/target/linux/sunxi/image/Makefile b/target/linux/sunxi/image/Makefile
old mode 100644
new mode 100755
index 3fb41c1..81ec8d8
--- a/target/linux/sunxi/image/Makefile
+++ b/target/linux/sunxi/image/Makefile
@@ -24,7 +24,8 @@ BOARDS:= \
 	sun7i-a20-cubietruck \
 	sun7i-a20-olinuxino-lime \
 	sun7i-a20-olinuxino-micro \
-	sun7i-a20-pcduino3
+	sun7i-a20-pcduino3 \
+	sun7i-a20-lamobo-r1
 
 define Image/BuildKernel
 	mkimage -A arm -O linux -T kernel -C none \
@@ -88,6 +89,10 @@ define Image/Build/Profile/Bananapro
 	$(call Image/Build/SDCard,$(1),sun7i-a20-bananapro)
 endef
 
+define Image/Build/Profile/Lamobo-R1
+	$(call Image/Build/SDCard,$(1),sun7i-a20-lamobo-r1)
+endef
+
 define Image/Build/Profile/Cubieboard
 	$(call Image/Build/SDCard,$(1),sun4i-a10-cubieboard)
 endef
diff --git a/target/linux/sunxi/patches-3.18/302-dt-sun7i-add-lamobo-r1.patch b/target/linux/sunxi/patches-3.18/302-dt-sun7i-add-lamobo-r1.patch
new file mode 100644
index 0000000..e8288ca
--- /dev/null
+++ b/target/linux/sunxi/patches-3.18/302-dt-sun7i-add-lamobo-r1.patch
@@ -0,0 +1,221 @@
+--- a/arch/arm/boot/dts/Makefile
++++ b/arch/arm/boot/dts/Makefile
+@@ -441,6 +441,7 @@ dtb-$(CONFIG_MACH_SUN7I) += \
+ 	sun7i-a20-cubietruck.dtb \
+ 	sun7i-a20-hummingbird.dtb \
+ 	sun7i-a20-i12-tvbox.dtb \
++	sun7i-a20-lamobo-r1.dtb \
+ 	sun7i-a20-olinuxino-lime.dtb \
+ 	sun7i-a20-olinuxino-micro.dtb \
+ 	sun7i-a20-pcduino3.dtb
+--- a/arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts        2015-01-09 12:02:32.479031636 +0100
++++ b/arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts        2015-01-09 12:02:32.479031636 +0100
+@@ -0,0 +1,208 @@
++/*
++ * Copyright 2014 Zoltan HERPAI
++ * Zoltan HERPAI <wigyori at uid0.hu>
++ *
++ * The code contained herein is licensed under the GNU General Public
++ * License. You may obtain a copy of the GNU General Public License
++ * Version 2 or later at the following locations:
++ *
++ * http://www.opensource.org/licenses/gpl-license.html
++ * http://www.gnu.org/copyleft/gpl.html
++ */
++
++/dts-v1/;
++/include/ "sun7i-a20.dtsi"
++/include/ "sunxi-common-regulators.dtsi"
++#include <dt-bindings/input/input.h>
++
++/ {
++	model = "Lamobo R1";
++	compatible = "lamobo,lamobo-r1", "allwinner,sun7i-a20";
++
++	aliases {
++		spi0 = &spi1;
++		spi1 = &spi2;
++	};
++
++	soc at 01c00000 {
++		spi1: spi at 01c06000 {
++			pinctrl-names = "default";
++			pinctrl-0 = <&spi1_pins_a>;
++			status = "okay";
++		};
++
++		spi2: spi at 01c17000 {
++			pinctrl-names = "default";
++			pinctrl-0 = <&spi2_pins_a>;
++			status = "okay";
++		};
++
++		mmc0: mmc at 01c0f000 {
++			pinctrl-names = "default", "default";
++			pinctrl-0 = <&mmc0_pins_a>;
++			pinctrl-1 = <&mmc0_cd_pin_lamobo>;
++			cd-gpios = <&pio 7 10 0>; /* PH10 */
++			status = "okay";
++		};
++
++		usbphy: phy at 01c13400 {
++			usb1_vbus-supply = <&reg_usb1_vbus>;
++			usb2_vbus-supply = <&reg_usb2_vbus>;
++			status = "okay";
++		};
++
++		ehci0: usb at 01c14000 {
++			status = "okay";
++		};
++
++		ohci0: usb at 01c14400 {
++			status = "okay";
++		};
++
++		ahci: sata at 01c18000 {
++			target-supply = <&reg_ahci_5v>;
++			status = "okay";
++		};
++
++		ehci1: usb at 01c1c000 {
++			status = "okay";
++		};
++
++		ohci1: usb at 01c1c400 {
++			status = "okay";
++		};
++
++		pinctrl at 01c20800 {
++			led_pins_lamobo: led_pins at 0 {
++				allwinner,pins = "PH2";
++				allwinner,function = "gpio_out";
++				allwinner,drive = <1>;
++				allwinner,pull = <0>;
++			};
++
++			mmc0_cd_pin_lamobo: mmc0_cd_pin at 0 {
++				allwinner,pins = "PH10";
++				allwinner,function = "gpio_in";
++				allwinner,drive = <0>;
++				allwinner,pull = <1>;
++			};
++
++			gmac_power_pin_lamobo: gmac_power_pin at 0 {
++				allwinner,pins = "PH23";
++				allwinner,function = "gpio_out";
++				allwinner,drive = <0>;
++				allwinner,pull = <0>;
++			};
++		};
++
++		lradc: lradc at 01c22800 {
++			allwinner,chan0-step = <200>;
++			linux,chan0-keycodes = <KEY_VOLUMEUP KEY_VOLUMEDOWN
++						KEY_MENU KEY_SEARCH KEY_HOME
++						KEY_ESC KEY_ENTER>;
++			status = "okay";
++		};
++
++		ir0: ir at 01c21800 {
++			pinctrl-names = "default";
++			pinctrl-0 = <&ir0_pins_a>;
++			status = "okay";
++		};
++
++		uart0: serial at 01c28000 {
++			pinctrl-names = "default";
++			pinctrl-0 = <&uart0_pins_a>;
++			status = "okay";
++		};
++
++		uart6: serial at 01c29800 {
++			pinctrl-names = "default";
++			pinctrl-0 = <&uart6_pins_a>;
++			status = "okay";
++		};
++
++		uart7: serial at 01c29c00 {
++			pinctrl-names = "default";
++			pinctrl-0 = <&uart7_pins_a>;
++			status = "okay";
++		};
++
++		i2c0: i2c at 01c2ac00 {
++			pinctrl-names = "default";
++			pinctrl-0 = <&i2c0_pins_a>;
++			status = "okay";
++
++			axp209: axp20x at 34 {
++				compatible = "x-powers,axp209";
++				reg = <0x34>;
++				interrupt-parent = <&nmi_intc>;
++				interrupts = <0 8>;
++
++				interrupt-controller;
++				#interrupt-cells = <1>;
++			};
++		};
++
++		i2c1: i2c at 01c2b000 {
++			pinctrl-names = "default";
++			pinctrl-0 = <&i2c1_pins_a>;
++			status = "okay";
++		};
++
++		i2c2: i2c at 01c2b400 {
++			pinctrl-names = "default";
++			pinctrl-0 = <&i2c2_pins_a>;
++			status = "okay";
++		};
++
++		gmac: ethernet at 01c50000 {
++			pinctrl-names = "default";
++			pinctrl-0 = <&gmac_pins_rgmii_a>;
++			phy = <&phy1>;
++			phy-mode = "rgmii";
++			phy-supply = <&reg_gmac_3v3>;
++			status = "okay";
++
++			phy1: ethernet-phy at 1 {
++				reg = <1>;
++			};
++		};
++	};
++
++	leds {
++		compatible = "gpio-leds";
++		pinctrl-names = "default";
++		pinctrl-0 = <&led_pins_lamobo>;
++
++		green {
++			label = "lamobo:green:usr";
++			gpios = <&pio 7 2 0>;
++			default-state = "on";
++		};
++	};
++
++	reg_ahci_5v: ahci-5v {
++			status = "okay";
++	};
++
++	reg_usb1_vbus: usb1-vbus {
++			status = "okay";
++	};
++
++	reg_usb2_vbus: usb2-vbus {
++			status = "okay";
++	};
++
++	reg_gmac_3v3: gmac-3v3 {
++			compatible = "regulator-fixed";
++			pinctrl-names = "default";
++			pinctrl-0 = <&gmac_power_pin_lamobo>;
++			regulator-name = "gmac-3v3";
++			regulator-min-microvolt = <3300000>;
++			regulator-max-microvolt = <3300000>;
++			startup-delay-us = <100000>;
++			enable-active-high;
++			gpio = <&pio 7 23 0>;
++			status = "okay";
++	};
++};
diff --git a/target/linux/sunxi/profiles/lamobo-r1.mk b/target/linux/sunxi/profiles/lamobo-r1.mk
new file mode 100644
index 0000000..4e8bf43
--- /dev/null
+++ b/target/linux/sunxi/profiles/lamobo-r1.mk
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2013 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/Lamobo-R1
+	NAME:=Lamobo R1
+	PACKAGES:=\
+		uboot-sunxi-Lamobo-R1 kmod-ata-sunxi kmod-b53 kmod-swconfig \
+		kmod-rtl8192cu swconfig wpad-mini
+endef
+
+define Profile/Lamobo-R1/Description
+	Package set optimized for the Lamobo R1
+endef
+
+$(eval $(call Profile,Lamobo-R1))
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From bittorf at bluebottle.com  Sat Jan 10 13:27:07 2015
From: bittorf at bluebottle.com (Bastian Bittorf)
Date: Sat, 10 Jan 2015 19:27:07 +0100
Subject: [OpenWrt-Devel] Dual Wifi for OpenWRT
In-Reply-To: <CAKNoO9pJqgwG+n7h=0kRS12ygZrsUdFio7+7tyc=iOS2Yh1qcA@mail.gmail.com>
References: <54B1500B.8080307@einfach.org>
 <CAKNoO9pJqgwG+n7h=0kRS12ygZrsUdFio7+7tyc=iOS2Yh1qcA@mail.gmail.com>
Message-ID: <20150110182707.GY2359@medion.lan>

* Aaron Z <aczlan+openwrt at gmail.com> [10.01.2015 19:09]:
> > Does anyone know a hardware platform with 2 or more wifi interfaces
> > which can both be used in the 2.4 GHz band?

We simply connect several AP's together (ethernet) and let
do the mesh-routing-daemon OLSR the rest.

bye, bastian
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From wigyori at uid0.hu  Sat Jan 10 13:42:48 2015
From: wigyori at uid0.hu (Zoltan HERPAI)
Date: Sat, 10 Jan 2015 19:42:48 +0100 (CET)
Subject: [OpenWrt-Devel] [PATCH 1/7] kernel: add missing symbols for 3.18
In-Reply-To: <20150110180650.GA27554@makrotopia.org>
References: <20150110180650.GA27554@makrotopia.org>
Message-ID: <alpine.DEB.2.02.1501101940180.29083@trabant.deployis.eu>

Hi,

On Sat, 10 Jan 2015, Daniel Golle wrote:

> Augmented by iptables modules, if they are enabled.
> oldconfig hangs and asks for them if *tables modules are not selected.
>
> Signed-off-by: Daniel Golle <daniel at makrotopia.org>
> ---
> target/linux/generic/config-3.18 | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/target/linux/generic/config-3.18 b/target/linux/generic/config-3.18
> index ce2ec5c..1927a18 100644
> --- a/target/linux/generic/config-3.18
> +++ b/target/linux/generic/config-3.18
> @@ -2552,6 +2552,8 @@ CONFIG_NF_CONNTRACK_PROCFS=y
> # CONFIG_NF_CT_PROTO_UDPLITE is not set
> # CONFIG_NF_DEFRAG_IPV4 is not set
> # CONFIG_NF_LOG_ARP is not set
> +# CONFIG_NF_LOG_IPV4 is not set
> +# CONFIG_NF_REJECT_IPV4 is not set
> # CONFIG_NF_NAT is not set
> # CONFIG_NF_NAT_AMANDA is not set
> # CONFIG_NF_NAT_FTP is not set

This one was added as part of r43912 already - thanks. Based on the 
first mvebu 3.18 build, further similar ones are expected.

Regards,
-w-
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From wigyori at uid0.hu  Sat Jan 10 13:48:46 2015
From: wigyori at uid0.hu (Zoltan HERPAI)
Date: Sat, 10 Jan 2015 19:48:46 +0100 (CET)
Subject: [OpenWrt-Devel] [PATCH 7/7] sunxi: add support for Lamobo R1
In-Reply-To: <20150110181058.GA27599@makrotopia.org>
References: <20150110181058.GA27599@makrotopia.org>
Message-ID: <alpine.DEB.2.02.1501101946000.29083@trabant.deployis.eu>

Hi,

On Sat, 10 Jan 2015, Daniel Golle wrote:

> Initial support for BananaPi-R1 aka Lamobo-R1.
>
> Based on patchset form Wang Yi <wangyi8848 at gmail.com> published on
> https://github.com/Lamobo/Lamobo-R1-OpenWrt

Thanks for submitting this. Did you have a chance to verify the switch 
working? I have read various results around it.

Regards,
-w-
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From wigyori at uid0.hu  Sat Jan 10 14:15:29 2015
From: wigyori at uid0.hu (Zoltan HERPAI)
Date: Sat, 10 Jan 2015 20:15:29 +0100 (CET)
Subject: [OpenWrt-Devel] [PATCH 3/7] uboot-sunxi: fix bananapro target
In-Reply-To: <20150110180859.GA27572@makrotopia.org>
References: <20150110180859.GA27572@makrotopia.org>
Message-ID: <alpine.DEB.2.02.1501102013110.29083@trabant.deployis.eu>

Hi,

On Sat, 10 Jan 2015, Daniel Golle wrote:

> At least making sure stuff compiles before committing would be nice.
>
> Signed-off-by: Daniel Golle <daniel at makrotopia.org>
> ---
> package/boot/uboot-sunxi/patches/003-add-lemaker-bananapro.diff | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/package/boot/uboot-sunxi/patches/003-add-lemaker-bananapro.diff b/package/boot/uboot-sunxi/patches/003-add-lemaker-bananapro.diff
> index 1d2677c..23d0ebf 100644
> --- a/package/boot/uboot-sunxi/patches/003-add-lemaker-bananapro.diff
> +++ b/package/boot/uboot-sunxi/patches/003-add-lemaker-bananapro.diff
> @@ -5,7 +5,7 @@ diff -ruN u-boot-2015.01-rc3.old/board/sunxi/Makefile u-boot-2015.01-rc3/board/s
>  obj-$(CONFIG_TARGET_AUXTEK_T004)	+= dram_a10s_olinuxino_m.o
>  obj-$(CONFIG_TARGET_BA10_TV_BOX)	+= dram_sun4i_384_1024_iow8.o
>  obj-$(CONFIG_TARGET_BANANAPI)		+= dram_bananapi.o
> -+obj-$(CONFIG_TARGET_BANANAPI)		+= dram_bananapi.o
> ++obj-$(CONFIG_TARGET_BANANAPRO)		+= dram_bananapi.o
>  obj-$(CONFIG_TARGET_CUBIEBOARD)		+= dram_cubieboard.o
>  obj-$(CONFIG_TARGET_CUBIEBOARD2)	+= dram_cubieboard2.o
>  obj-$(CONFIG_TARGET_CUBIETRUCK)		+= dram_cubietruck.o

This was missed during patch shuffling - thanks, applied in r43921.

Regards,
-w-
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From wigyori at uid0.hu  Sat Jan 10 15:04:03 2015
From: wigyori at uid0.hu (Zoltan HERPAI)
Date: Sat, 10 Jan 2015 21:04:03 +0100 (CET)
Subject: [OpenWrt-Devel] [PATCH 5/7] sunxi: merge upstream devicetree
 improvements for bananapro
In-Reply-To: <20150110180956.GA27585@makrotopia.org>
References: <20150110180956.GA27585@makrotopia.org>
Message-ID: <alpine.DEB.2.02.1501102059000.29083@trabant.deployis.eu>

Hi,

On Sat, 10 Jan 2015, Daniel Golle wrote:

> merges DTS published on linux devicetree mailing list.

Thanks for this - didn't spot that Hans beat me with a few days on the 
file. Pushed in the published patch, and will patch in the 
brcmfmac-related stuff later.

Thanks,
-w-
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From david at lang.hm  Sat Jan 10 15:38:54 2015
From: david at lang.hm (David Lang)
Date: Sat, 10 Jan 2015 12:38:54 -0800 (PST)
Subject: [OpenWrt-Devel] Dual Wifi for OpenWRT
In-Reply-To: <54B1500B.8080307@einfach.org>
References: <54B1500B.8080307@einfach.org>
Message-ID: <alpine.DEB.2.02.1501101234460.2080@nftneq.ynat.uz>

On Sat, 10 Jan 2015, Bruno Randolf wrote:

>
> Does anyone know a hardware platform with 2 or more wifi interfaces
> which can both be used in the 2.4 GHz band?

I would not expect to find consumer hardware that had two radios on the 2.4GHz 
band, the problems that you would run into trying to keep the output of one 
radio from deafening the other (if not outright popping the receiver amps) would 
be significant (to say the least). It could be done, but it would take antenna 
setups that you just don't see mass produced to even get started.

Even the "enterprise" grade hardware that has multiple radios tends to have 
problems with this. It takes having very directional antennas to try and keep as 
much of the signal away from the other radio to even start.

What is it that you are trying to accomplish?

David Lang
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From br1 at einfach.org  Sat Jan 10 15:56:37 2015
From: br1 at einfach.org (Bruno Randolf)
Date: Sat, 10 Jan 2015 20:56:37 +0000
Subject: [OpenWrt-Devel] Dual Wifi for OpenWRT
In-Reply-To: <alpine.DEB.2.02.1501101234460.2080@nftneq.ynat.uz>
References: <54B1500B.8080307@einfach.org>
 <alpine.DEB.2.02.1501101234460.2080@nftneq.ynat.uz>
Message-ID: <54B19205.7090807@einfach.org>

On 01/10/2015 08:38 PM, David Lang wrote:
> I would not expect to find consumer hardware that had two radios on the
> 2.4GHz band, the problems that you would run into trying to keep the
> output of one radio from deafening the other (if not outright popping
> the receiver amps) would be significant (to say the least). It could be
> done, but it would take antenna setups that you just don't see mass
> produced to even get started.

Right, that is a good explanation why no consumer HW with this feature
exists.

> Even the "enterprise" grade hardware that has multiple radios tends to
> have problems with this. It takes having very directional antennas to
> try and keep as much of the signal away from the other radio to even start.

Hmm... Yes antenna placement is important and difficult, but I know
setups where this works quite well. E.g. using RouterStation Pro with 3
MiniPCI cards (ath5k/ath9k).

> What is it that you are trying to accomplish?

For one part I'm trying to find alternatives to that RouterStationPro
board which is EOL.

But in the current case I actually want to have one or more radios in
monitor mode (running "horst", switching thru channels) and another one
for connectivity (mesh). In this case the interference problems you
mention don't exist, but I admit that this is not a very usual
use-case... ;)

bruno
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From david at lang.hm  Sat Jan 10 16:05:34 2015
From: david at lang.hm (David Lang)
Date: Sat, 10 Jan 2015 13:05:34 -0800 (PST)
Subject: [OpenWrt-Devel] Dual Wifi for OpenWRT
In-Reply-To: <54B19205.7090807@einfach.org>
References: <54B1500B.8080307@einfach.org>
 <alpine.DEB.2.02.1501101234460.2080@nftneq.ynat.uz>
 <54B19205.7090807@einfach.org>
Message-ID: <alpine.DEB.2.02.1501101302010.2080@nftneq.ynat.uz>

On Sat, 10 Jan 2015, Bruno Randolf wrote:

> On 01/10/2015 08:38 PM, David Lang wrote:
>> I would not expect to find consumer hardware that had two radios on the
>> 2.4GHz band, the problems that you would run into trying to keep the
>> output of one radio from deafening the other (if not outright popping
>> the receiver amps) would be significant (to say the least). It could be
>> done, but it would take antenna setups that you just don't see mass
>> produced to even get started.
>
> Right, that is a good explanation why no consumer HW with this feature
> exists.
>
>> Even the "enterprise" grade hardware that has multiple radios tends to
>> have problems with this. It takes having very directional antennas to
>> try and keep as much of the signal away from the other radio to even start.
>
> Hmm... Yes antenna placement is important and difficult, but I know
> setups where this works quite well. E.g. using RouterStation Pro with 3
> MiniPCI cards (ath5k/ath9k).
>
>> What is it that you are trying to accomplish?
>
> For one part I'm trying to find alternatives to that RouterStationPro
> board which is EOL.
>
> But in the current case I actually want to have one or more radios in
> monitor mode (running "horst", switching thru channels) and another one
> for connectivity (mesh). In this case the interference problems you
> mention don't exist, but I admit that this is not a very usual
> use-case... ;)

In that case you re probably best off adding a USB wifi interface to a router.

In terms of antennas, try going with high-gain omnidirectional antennas and 
position them directly above each other (omnidirectional antennas have a 'blind 
spot' directly above and below the antenna, so if you position them so that each 
is in the blind spot of the other you have the best chance of it working, and 
high gain antennas are going to have flatter patterns, making them more 
forgiving)

David Lang
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From ale+owrt at clearmind.me  Sun Jan 11 05:34:19 2015
From: ale+owrt at clearmind.me (Alessandro Di Federico)
Date: Sun, 11 Jan 2015 11:34:19 +0100
Subject: [OpenWrt-Devel] [PATCH] Support for building an hardened OpenWRT
Message-ID: <E1YAGTe-0001Vv-Ae@clearmind.me>

From: Alessandro Di Federico <ale+owrt at clearmind.me>

Introduce configuration options to build an "hardened" OpenWRT.

Options to enable Stack-Smashing Protection, FORTIFY_SOURCE and RELRO
have been introduced.

uClibc makefile now automatically detects if SSP support is necessary.

hostapd makefile has been fixed to use "^" as sed separator since
using a comma was problematic when using "-Wl,-z,now" and the like in
TARGET_CFLAGS.

Currently enabling SSP on user space depends on enabling SSP kernel
side, this is due to the fact that TARGET_CFLAGS are used to build
kernel modules (at least). Suggestions on how to avoid this are welcome.
Using "select" instead of "depends on" doesn't seem to work with choice
entries.

Tested with a lantiq (WBMR) router, GCC 4.8, uClibc and a subset of
the available packages.
Needs to be tested with GCC 4.9 and the remaining packages.
PIE not currently included.

Signed-off-by: Alessandro Di Federico <ale+owrt at clearmind.me>
---
 config/Config-build.in                    | 88 +++++++++++++++++++++++++++----
 include/package.mk                        | 36 +++++++++++++
 package/network/services/hostapd/Makefile |  2 +-
 toolchain/uClibc/common.mk                |  1 +
 4 files changed, 117 insertions(+), 10 deletions(-)

diff --git a/config/Config-build.in b/config/Config-build.in
index 89cf964..a0c30a6 100644
--- a/config/Config-build.in
+++ b/config/Config-build.in
@@ -97,15 +97,6 @@ menu "Global build settings"
 
 		  If you are unsure, select N.
 
-	config PKG_CHECK_FORMAT_SECURITY
-		bool
-		prompt "Enable gcc format-security"
-		default n
-		help
-		  Add -Wformat -Werror=format-security to the CFLAGS.  You can disable
-		  this per package by adding PKG_CHECK_FORMAT_SECURITY:=0 in the package
-		  Makefile.
-
 	config PKG_BUILD_USE_JOBSERVER
 		bool
 		prompt "Use top-level make jobserver for packages"
@@ -216,4 +207,83 @@ menu "Global build settings"
 			bool "libstdc++"
 	endchoice
 
+	comment "Hardening build options"
+
+	config PKG_CHECK_FORMAT_SECURITY
+		bool
+		prompt "Enable gcc format-security"
+		default n
+		help
+		  Add -Wformat -Werror=format-security to the CFLAGS.  You can disable
+		  this per package by adding PKG_CHECK_FORMAT_SECURITY:=0 in the package
+		  Makefile.
+
+	choice
+		prompt "User space Stack-Smashing Protection"
+		default PKG_CC_STACKPROTECTOR_NONE
+		help
+		  Enable GCC Stack Smashing Protection (SSP) for userspace applications
+		config PKG_CC_STACKPROTECTOR_NONE
+			bool "None"
+		config PKG_CC_STACKPROTECTOR_REGULAR
+			bool "Regular"
+			select SSP_SUPPORT
+			depends on KERNEL_CC_STACKPROTECTOR_REGULAR
+		config PKG_CC_STACKPROTECTOR_STRONG
+			depends on GCC_VERSION_4_9_LINARO
+			select SSP_SUPPORT
+			depends on KERNEL_CC_STACKPROTECTOR_STRONG
+			bool "Strong"
+	endchoice
+
+	choice
+		prompt "Kernel space Stack-Smashing Protection"
+		default KERNEL_CC_STACKPROTECTOR_NONE
+		help
+		  Enable GCC Stack-Smashing Protection (SSP) for the kernel
+		config KERNEL_CC_STACKPROTECTOR_NONE
+			bool "None"
+		config KERNEL_CC_STACKPROTECTOR_REGULAR
+			bool "Regular"
+		config KERNEL_CC_STACKPROTECTOR_STRONG
+			depends on GCC_VERSION_4_9_LINARO
+			bool "Strong"
+	endchoice
+
+	choice
+		prompt "Enable buffer-overflows detction (FORTIFY_SOURCE)"
+		help
+		  Enable the _FORTIFY_SOURCE macro which introduces additional
+		  checks to detect buffer-overflows in the following standard library
+		  functions: memcpy, mempcpy, memmove, memset, strcpy, stpcpy,
+		  strncpy, strcat, strncat, sprintf, vsprintf, snprintf, vsnprintf,
+		  gets.  "Conservative" (_FORTIFY_SOURCE set to 1) only introduces
+		  checks that sholdn't change the behavior of conforming programs,
+		  while "aggressive" (_FORTIFY_SOURCES set to 2) some more checking is
+		  added, but some conforming programs might fail.
+		config PKG_FORTIFY_SOURCE_NONE
+			bool "None"
+		config PKG_FORTIFY_SOURCE_1
+			bool "Conservative"
+		config PKG_FORTIFY_SOURCE_2
+			bool "Aggressive"
+	endchoice
+
+	choice
+		prompt "Enable RELRO protection"
+		help
+		  Enable a link-time protection know as RELRO (Relocation Read Only)
+		  which helps to protect from certain type of exploitation techniques
+		  altering the content of some ELF sections. "Partial" RELRO makes the
+		  .dynamic section not writeable after initialization, introducing
+		  almost no performance penalty, while "full" RELRO also marks the GOT
+		  as read-only at the cost of initializing all of it at startup.
+		config PKG_RELRO_NONE
+			bool "None"
+		config PKG_RELRO_PARTIAL
+			bool "Partial"
+		config PKG_RELRO_FULL
+			bool "Full"
+	endchoice
+
 endmenu
diff --git a/include/package.mk b/include/package.mk
index a1b90da..2c34a58 100644
--- a/include/package.mk
+++ b/include/package.mk
@@ -15,6 +15,12 @@ PKG_MD5SUM ?= unknown
 PKG_BUILD_PARALLEL ?=
 PKG_USE_MIPS16 ?= 1
 PKG_CHECK_FORMAT_SECURITY ?= 1
+PKG_CC_STACKPROTECTOR_REGULAR ?= 1
+PKG_CC_STACKPROTECTOR_STRONG ?= 1
+PKG_FORTIFY_SOURCE_1 ?= 1
+PKG_FORTIFY_SOURCE_2 ?= 1
+PKG_RELRO_PARTIAL ?= 1
+PKG_RELRO_FULL ?= 1
 
 ifneq ($(CONFIG_PKG_BUILD_USE_JOBSERVER),)
   MAKE_J:=$(if $(MAKE_JOBSERVER),$(MAKE_JOBSERVER) -j)
@@ -39,6 +45,36 @@ ifdef CONFIG_PKG_CHECK_FORMAT_SECURITY
     TARGET_CFLAGS += -Wformat -Werror=format-security
   endif
 endif
+ifdef CONFIG_PKG_CC_STACKPROTECTOR_REGULAR
+  ifeq ($(strip $(PKG_CC_STACKPROTECTOR_REGULAR)),1)
+    TARGET_CFLAGS += -fstack-protector
+  endif
+endif
+ifdef CONFIG_PKG_CC_STACKPROTECTOR_STRONG
+  ifeq ($(strip $(PKG_CC_STACKPROTECTOR_STRONG)),1)
+    TARGET_CFLAGS += -fstack-protector-strong
+  endif
+endif
+ifdef CONFIG_PKG_FORTIFY_SOURCE_1
+  ifeq ($(strip $(PKG_FORTIFY_SOURCE_1)),1)
+    TARGET_CFLAGS += -D_FORTIFY_SOURCE=1
+  endif
+endif
+ifdef CONFIG_PKG_FORTIFY_SOURCE_2
+  ifeq ($(strip $(PKG_FORTIFY_SOURCE_2)),1)
+    TARGET_CFLAGS += -D_FORTIFY_SOURCE=2
+  endif
+endif
+ifdef CONFIG_PKG_RELRO_PARTIAL
+  ifeq ($(strip $(PKG_RELRO_PARTIAL)),1)
+    TARGET_CFLAGS += -Wl,-z,relro
+  endif
+endif
+ifdef CONFIG_PKG_RELRO_FULL
+  ifeq ($(strip $(PKG_RELRO_FULL)),1)
+    TARGET_CFLAGS += -Wl,-z,now -Wl,-z,relro
+  endif
+endif
 
 include $(INCLUDE_DIR)/prereq.mk
 include $(INCLUDE_DIR)/host.mk
diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile
index 19d536e..6bdf534 100644
--- a/package/network/services/hostapd/Makefile
+++ b/package/network/services/hostapd/Makefile
@@ -294,7 +294,7 @@ define Build/Compile/wpad
 	echo ` \
 		$(call Build/RunMake,hostapd,-s MULTICALL=1 dump_cflags); \
 		$(call Build/RunMake,wpa_supplicant,-s MULTICALL=1 dump_cflags) | \
-		sed -e 's,-n ,,g' -e 's,$(TARGET_CFLAGS),,' \
+		sed -e 's,-n ,,g' -e 's^$(TARGET_CFLAGS)^^' \
 	` > $(PKG_BUILD_DIR)/.cflags
 	+$(call Build/RunMake,hostapd, \
 		CFLAGS="$$$$(cat $(PKG_BUILD_DIR)/.cflags)" \
diff --git a/toolchain/uClibc/common.mk b/toolchain/uClibc/common.mk
index e507dc6..435e4c2 100644
--- a/toolchain/uClibc/common.mk
+++ b/toolchain/uClibc/common.mk
@@ -80,6 +80,7 @@ define Host/Configure
 		-e 's,^.*UCLIBC_HAS_SHADOW.*,UCLIBC_HAS_SHADOW=$(if $(CONFIG_SHADOW_PASSWORDS),y,n),g' \
 		-e 's,^.*UCLIBC_HAS_LOCALE.*,UCLIBC_HAS_LOCALE=$(if $(CONFIG_BUILD_NLS),y,n),g' \
 		-e 's,^.*UCLIBC_BUILD_ALL_LOCALE.*,UCLIBC_BUILD_ALL_LOCALE=$(if $(CONFIG_BUILD_NLS),y,n),g' \
+		-e 's,^.*UCLIBC_HAS_SSP.*,UCLIBC_HAS_SSP=$(if $(or $(CONFIG_PKG_CC_STACKPROTECTOR_REGULAR),$(CONFIG_PKG_CC_STACKPROTECTOR_STRONG)),y,n),g' \
 		$(HOST_BUILD_DIR)/.config.new
 	cmp -s $(HOST_BUILD_DIR)/.config.new $(HOST_BUILD_DIR)/.config.last || { \
 		cp $(HOST_BUILD_DIR)/.config.new $(HOST_BUILD_DIR)/.config && \
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From openwrt at rogerpueyo.com  Sun Jan 11 06:48:14 2015
From: openwrt at rogerpueyo.com (openwrt at rogerpueyo.com)
Date: Sun, 11 Jan 2015 12:48:14 +0100
Subject: [OpenWrt-Devel] [PATCH] [ar71xx] Add support for MERCURY MAC1200R
Message-ID: <1420976894-12794-1-git-send-email-openwrt@rogerpueyo.com>

From: Roger Pueyo Centelles <roger.pueyo at guifi.net>

---
 target/linux/ar71xx/base-files/etc/diag.sh         |   3 +
 .../ar71xx/base-files/etc/uci-defaults/01_leds     |   5 +
 .../ar71xx/base-files/etc/uci-defaults/02_network  |   1 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh       |   6 +
 .../ar71xx/base-files/lib/upgrade/platform.sh      |   1 +
 target/linux/ar71xx/config-3.14                    |   1 +
 .../files/arch/mips/ath79/mach-mc-mac1200r.c       | 157 +++++++++++++++++++++
 target/linux/ar71xx/generic/profiles/mercury.mk    |  17 +++
 target/linux/ar71xx/image/Makefile                 |   1 +
 .../736-MIPS-ath79-add-MC-MAC1200R-support.patch   |  39 +++++
 10 files changed, 231 insertions(+)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-mc-mac1200r.c
 create mode 100644 target/linux/ar71xx/generic/profiles/mercury.mk
 create mode 100644 target/linux/ar71xx/patches-3.14/736-MIPS-ath79-add-MC-MAC1200R-support.patch

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
index 06b96a3..388727f 100755
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -105,6 +105,9 @@ get_status_led() {
 	ls-sr71)
 		status_led="ubnt:green:d22"
 		;;
+	mc-mac1200r)
+		status_led="mercury:green:system"
+		;;
 	mr600)
 		status_led="mr600:orange:power"
 		;;
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index 296ea57..dc5dfa1 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -166,6 +166,11 @@ hornet-ub)
 	ucidef_set_led_usbdev "usb" "USB" "alfa:blue:usb" "1-1"
 	;;
 
+mc-mac1200r)
+	ucidef_set_led_wlan "wlan2g" "WLAN2G" "mercury:green:wlan2g" "phy1tpt"
+	ucidef_set_led_wlan "wlan5g" "WLAN5G" "mercury:green:wlan5g" "phy0tpt"
+	;;
+
 mr600)
 	ucidef_set_led_wlan "wlan58" "WLAN58" "mr600:green:wlan58" "phy0tpt"
 	;;
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index b4b6cb3..8151470 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -367,6 +367,7 @@ dir-615-e1 |\
 dir-615-e4 |\
 hiwifi-hc6361 |\
 ja76pf |\
+mc-mac1200r|\
 mynet-n600 |\
 oolite |\
 qihoo-c301 |\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 9b056e9..3ce63aa 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -97,6 +97,9 @@ tplink_board_detect() {
 	"015300"*)
 		model="EasyLink EL-MINI"
 		;;
+	"120000"*)
+		model="MERCURY MAC1200R"
+		;;
 	"3C0001"*)
 		model="OOLITE"
 		;;
@@ -432,6 +435,9 @@ ar71xx_board_detect() {
 	*LS-SR71)
 		name="ls-sr71"
 		;;
+	*"MAC1200R")
+		name="mc-mac1200r"
+		;;
 	*MR600v2)
 		name="mr600v2"
 		;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 6dabf4e..7153614 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -297,6 +297,7 @@ platform_check_image() {
 	el-m150 | \
 	el-mini | \
 	gl-inet | \
+	mc-mac1200r | \
 	oolite | \
 	smart-300 | \
 	tl-mr10u | \
diff --git a/target/linux/ar71xx/config-3.14 b/target/linux/ar71xx/config-3.14
index b6fa4ab..a99c082 100644
--- a/target/linux/ar71xx/config-3.14
+++ b/target/linux/ar71xx/config-3.14
@@ -64,6 +64,7 @@ CONFIG_ATH79_MACH_HIWIFI_HC6361=y
 CONFIG_ATH79_MACH_HORNET_UB=y
 CONFIG_ATH79_MACH_JA76PF=y
 CONFIG_ATH79_MACH_JWAP003=y
+CONFIG_ATH79_MACH_MC_MAC1200R=y
 CONFIG_ATH79_MACH_MR600=y
 CONFIG_ATH79_MACH_MR900=y
 CONFIG_ATH79_MACH_MYNET_N600=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-mc-mac1200r.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-mc-mac1200r.c
new file mode 100644
index 0000000..6b92b9c
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-mc-mac1200r.c
@@ -0,0 +1,157 @@
+/*
+ *  MERCURY MAC1200R board support
+ *
+ *  Copyright (C) 2012 Gabor Juhos <juhosg at openwrt.org>
+ *  Copyright (C) 2013 Gui Iribarren <gui at altermundi.net>
+ *
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License version 2 as published
+ *  by the Free Software Foundation.
+ */
+
+#include <linux/pci.h>
+#include <linux/phy.h>
+#include <linux/gpio.h>
+#include <linux/platform_device.h>
+#include <linux/ath9k_platform.h>
+#include <linux/ar8216_platform.h>
+
+#include <asm/mach-ath79/ar71xx_regs.h>
+
+#include "common.h"
+#include "dev-ap9x-pci.h"
+#include "dev-eth.h"
+#include "dev-gpio-buttons.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-spi.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+
+#define MAC1200R_GPIO_LED_WLAN2G	13
+#define MAC1200R_GPIO_LED_WLAN5G	17
+#define MAC1200R_GPIO_LED_SYSTEM	14
+#define MAC1200R_GPIO_LED_WPS		11
+#define MAC1200R_GPIO_LED_WAN		12
+#define MAC1200R_GPIO_LED_LAN1		15
+#define MAC1200R_GPIO_LED_LAN2		21
+#define MAC1200R_GPIO_LED_LAN3		22
+#define MAC1200R_GPIO_LED_LAN4		20
+
+#define MAC1200R_GPIO_BTN_WPS		16
+
+#define MAC1200R_KEYS_POLL_INTERVAL	20	/* msecs */
+#define MAC1200R_KEYS_DEBOUNCE_INTERVAL	(3 * MAC1200R_KEYS_POLL_INTERVAL)
+
+#define MAC1200R_MAC0_OFFSET		0
+#define MAC1200R_MAC1_OFFSET		6
+#define MAC1200R_WMAC_CALDATA_OFFSET	0x1000
+#define MAC1200R_PCIE_CALDATA_OFFSET	0x5000
+
+static const char *mac1200r_part_probes[] = {
+	"tp-link",
+	NULL,
+};
+
+static struct flash_platform_data mac1200r_flash_data = {
+	.part_probes	= mac1200r_part_probes,
+};
+
+static struct gpio_led mac1200r_leds_gpio[] __initdata = {
+	{
+		.name		= "mercury:green:wps",
+		.gpio		= MAC1200R_GPIO_LED_WPS,
+		.active_low	= 1,
+	},
+	{
+		.name		= "mercury:green:system",
+		.gpio		= MAC1200R_GPIO_LED_SYSTEM,
+		.active_low	= 1,
+	},
+	{
+		.name		= "mercury:green:wlan2g",
+		.gpio		= MAC1200R_GPIO_LED_WLAN2G,
+		.active_low	= 1,
+	},
+	{
+		.name		= "mercury:green:wlan5g",
+		.gpio		= MAC1200R_GPIO_LED_WLAN5G,
+		.active_low	= 1,
+	},
+};
+
+static struct gpio_keys_button mac1200r_gpio_keys[] __initdata = {
+	{
+		.desc		= "WPS button",
+		.type		= EV_KEY,
+		.code		= KEY_WPS_BUTTON,
+		.debounce_interval = MAC1200R_KEYS_DEBOUNCE_INTERVAL,
+		.gpio		= MAC1200R_GPIO_BTN_WPS,
+		.active_low	= 1,
+	},
+};
+
+
+static void __init mac1200r_setup(void)
+{
+	u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
+	u8 *art = (u8 *) KSEG1ADDR(0x1fff0000);
+	u8 tmpmac[ETH_ALEN];
+
+	ath79_register_m25p80(&mac1200r_flash_data);
+
+	ath79_register_leds_gpio(-1, ARRAY_SIZE(mac1200r_leds_gpio),
+					mac1200r_leds_gpio);
+
+	ath79_register_gpio_keys_polled(-1, MAC1200R_KEYS_POLL_INTERVAL,
+					ARRAY_SIZE(mac1200r_gpio_keys),
+					mac1200r_gpio_keys);
+
+	ath79_init_mac(tmpmac, mac, 0);
+
+	ath79_register_wmac(art + MAC1200R_WMAC_CALDATA_OFFSET, tmpmac);
+
+	ath79_init_mac(tmpmac, mac, 1);
+	//ap9x_pci_setup_wmac_led_pin(0, 0);
+
+	ap91_pci_init(art + MAC1200R_PCIE_CALDATA_OFFSET, tmpmac);
+
+	ath79_setup_ar934x_eth_cfg(AR934X_ETH_CFG_SW_ONLY_MODE);
+
+	ath79_register_mdio(1, 0x0);
+
+	/* LAN */
+	ath79_init_mac(ath79_eth1_data.mac_addr, mac, -1);
+
+	/* GMAC1 is connected to the internal switch */
+	ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII;
+
+	ath79_register_eth(1);
+
+	/* WAN */
+	ath79_init_mac(ath79_eth0_data.mac_addr, mac, 2);
+
+	/* GMAC0 is connected to the PHY4 of the internal switch */
+	ath79_switch_data.phy4_mii_en = 1;
+	ath79_switch_data.phy_poll_mask = BIT(4);
+	ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
+	ath79_eth0_data.phy_mask = BIT(4);
+	ath79_eth0_data.mii_bus_dev = &ath79_mdio1_device.dev;
+
+	ath79_register_eth(0);
+
+	ath79_gpio_output_select(MAC1200R_GPIO_LED_LAN1,
+				 AR934X_GPIO_OUT_LED_LINK3);
+	ath79_gpio_output_select(MAC1200R_GPIO_LED_LAN2,
+				 AR934X_GPIO_OUT_LED_LINK2);
+	ath79_gpio_output_select(MAC1200R_GPIO_LED_LAN3,
+				 AR934X_GPIO_OUT_LED_LINK1);
+	ath79_gpio_output_select(MAC1200R_GPIO_LED_LAN4,
+				 AR934X_GPIO_OUT_LED_LINK0);
+	ath79_gpio_output_select(MAC1200R_GPIO_LED_WAN,
+				 AR934X_GPIO_OUT_LED_LINK4);
+}
+
+MIPS_MACHINE(ATH79_MACH_MC_MAC1200R, "MC-MAC1200R",
+	     "MERCURY MAC1200R",
+	     mac1200r_setup);
diff --git a/target/linux/ar71xx/generic/profiles/mercury.mk b/target/linux/ar71xx/generic/profiles/mercury.mk
new file mode 100644
index 0000000..8ce864d
--- /dev/null
+++ b/target/linux/ar71xx/generic/profiles/mercury.mk
@@ -0,0 +1,17 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+
+define Profile/MAC1200R
+	NAME:=MERCURY MAC1200R
+	PACKAGES:=kmod-ath10k
+endef
+
+define Profile/MAC1200R/Description
+	Package set optimized for the MERCURY MAC1200R.
+endef
+$(eval $(call Profile,MAC1200R))
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
index ef52f46..9621e0b 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -1380,6 +1380,7 @@ $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,ELM150,el-m150,EL-M150,ttyATH0,11
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,ELMINI,el-mini,EL-MINI,ttyATH0,115200,0x01530001,1,8Mlzma))
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,GLINET6408A,gl-inet-6408A-v1,GL-INET,ttyATH0,115200,0x08000001,1,8Mlzma))
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,GLINET6416A,gl-inet-6416A-v1,GL-INET,ttyATH0,115200,0x08000001,1,16Mlzma))
+$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,MAC1200R,mc-mac1200r,MC-MAC1200R,ttyS0,115200,0x12000001,1,8Mlzma))
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLMR10U,tl-mr10u-v1,TL-MR10U,ttyATH0,115200,0x00100101,1,4Mlzma))
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLMR11UV1,tl-mr11u-v1,TL-MR11U,ttyATH0,115200,0x00110101,1,4Mlzma))
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLMR11UV2,tl-mr11u-v2,TL-MR11U,ttyATH0,115200,0x00110102,1,4Mlzma))
diff --git a/target/linux/ar71xx/patches-3.14/736-MIPS-ath79-add-MC-MAC1200R-support.patch b/target/linux/ar71xx/patches-3.14/736-MIPS-ath79-add-MC-MAC1200R-support.patch
new file mode 100644
index 0000000..bb4d584
--- /dev/null
+++ b/target/linux/ar71xx/patches-3.14/736-MIPS-ath79-add-MC-MAC1200R-support.patch
@@ -0,0 +1,39 @@
+--- a/arch/mips/ath79/Kconfig
++++ b/arch/mips/ath79/Kconfig
+@@ -374,6 +374,16 @@
+	select ATH79_DEV_LEDS_GPIO
+	select ATH79_DEV_M25P80
+
++config ATH79_MACH_MC_MAC1200R
++	bool "MERCURY MAC1200R board support"
++	select SOC_AR934X
++	select ATH79_DEV_AP9X_PCI if PCI
++	select ATH79_DEV_ETH
++	select ATH79_DEV_GPIO_BUTTONS
++	select ATH79_DEV_LEDS_GPIO
++	select ATH79_DEV_M25P80
++	select ATH79_DEV_WMAC
++
+ config ATH79_MACH_RB4XX
+	bool "MikroTik RouterBOARD 4xx series support"
+	select SOC_AR71XX
+--- a/arch/mips/ath79/Makefile
++++ b/arch/mips/ath79/Makefile
+@@ -66,6 +66,7 @@
+ obj-$(CONFIG_ATH79_MACH_JA76PF)		+= mach-ja76pf.o
+ obj-$(CONFIG_ATH79_MACH_JWAP003)	+= mach-jwap003.o
+ obj-$(CONFIG_ATH79_MACH_HORNET_UB)	+= mach-hornet-ub.o
++obj-$(CONFIG_ATH79_MACH_MC_MAC1200R)     += mach-mc-mac1200r.o
+ obj-$(CONFIG_ATH79_MACH_MR600)		+= mach-mr600.o
+ obj-$(CONFIG_ATH79_MACH_MYNET_N600)	+= mach-mynet-n600.o
+ obj-$(CONFIG_ATH79_MACH_MYNET_REXT)	+= mach-mynet-rext.o
+--- a/arch/mips/ath79/machtypes.h
++++ b/arch/mips/ath79/machtypes.h
+@@ -89,6 +89,7 @@
+	ATH79_MACH_TEW_673GRU,		/* TRENDnet TEW-673GRU */
+	ATH79_MACH_TEW_712BR,		/* TRENDnet TEW-712BR */
+	ATH79_MACH_TEW_732BR,		/* TRENDnet TEW-732BR */
++	ATH79_MACH_MC_MAC1200R,		/* MERCURY MAC1200R*/
+	ATH79_MACH_TL_MR10U,		/* TP-LINK TL-MR10U */
+	ATH79_MACH_TL_MR11U,		/* TP-LINK TL-MR11U */
+	ATH79_MACH_TL_MR13U,		/* TP-LINK TL-MR13U */
-- 
2.1.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From nbd at openwrt.org  Sun Jan 11 07:13:45 2015
From: nbd at openwrt.org (Felix Fietkau)
Date: Sun, 11 Jan 2015 13:13:45 +0100
Subject: [OpenWrt-Devel] [PATCH] procd: reorder the arguments of command
 invocations
In-Reply-To: <1420912491-21359-1-git-send-email-gianluca@sottospazio.it>
References: <1420912491-21359-1-git-send-email-gianluca@sottospazio.it>
Message-ID: <54B268F9.6080706@openwrt.org>

On 2015-01-10 18:54, Gianluca Anzolin wrote:
> Some commands in the script /lib/upgrade/nand.sh (provided by
> procd) use option arguments after non-option arguments.
> 
> This unfortunately doesn't work with musl because it doesn't yet support
> permutations of the arguments: when getopt finds a non-option argument
> it returns -1 and ignores any option which may follow.
> 
> One visible side effect is that sysupgrade doesn't work with musl/NAND
> tarballs.
> 
> The following patch reorders the command invocations by placing the
> options before any non-option argument.
> 
> Tested on a Netgear WNDR4300 built with ubifs support and musl libc.
> 
> Signed-off-by: Gianluca Anzolin <gianluca at sottospazio.it>
It seems that musl git now supports argv permutation. I'm going to merge
the git changes since the last release soon.

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


From gianluca at sottospazio.it  Sun Jan 11 07:58:01 2015
From: gianluca at sottospazio.it (Gianluca Anzolin)
Date: Sun, 11 Jan 2015 13:58:01 +0100
Subject: [OpenWrt-Devel] [PATCH] procd: reorder the arguments of command
 invocations
In-Reply-To: <54B268F9.6080706@openwrt.org>
References: <1420912491-21359-1-git-send-email-gianluca@sottospazio.it>
 <54B268F9.6080706@openwrt.org>
Message-ID: <54B27359.8030201@sottospazio.it>

Il 11/01/2015 13:13, Felix Fietkau ha scritto:
> On 2015-01-10 18:54, Gianluca Anzolin wrote:
>> Some commands in the script /lib/upgrade/nand.sh (provided by
>> procd) use option arguments after non-option arguments.
>>
>> This unfortunately doesn't work with musl because it doesn't yet support
>> permutations of the arguments: when getopt finds a non-option argument
>> it returns -1 and ignores any option which may follow.
>>
>> One visible side effect is that sysupgrade doesn't work with musl/NAND
>> tarballs.
>>
>> The following patch reorders the command invocations by placing the
>> options before any non-option argument.
>>
>> Tested on a Netgear WNDR4300 built with ubifs support and musl libc.
>>
>> Signed-off-by: Gianluca Anzolin <gianluca at sottospazio.it>
> It seems that musl git now supports argv permutation. I'm going to merge
> the git changes since the last release soon.
>
> - Felix
Fair enough, thank you.

Gianluca
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From gianluca at sottospazio.it  Sun Jan 11 08:09:57 2015
From: gianluca at sottospazio.it (Gianluca Anzolin)
Date: Sun, 11 Jan 2015 14:09:57 +0100
Subject: [OpenWrt-Devel] [PATCH] procd: reorder the arguments of command
 invocations
In-Reply-To: <54B27359.8030201@sottospazio.it>
References: <1420912491-21359-1-git-send-email-gianluca@sottospazio.it>
 <54B268F9.6080706@openwrt.org> <54B27359.8030201@sottospazio.it>
Message-ID: <54B27625.50108@sottospazio.it>

Il 11/01/2015 13:58, Gianluca Anzolin ha scritto:
> Il 11/01/2015 13:13, Felix Fietkau ha scritto:
>> It seems that musl git now supports argv permutation. I'm going to merge
>> the git changes since the last release soon.
>>
>> - Felix
> Fair enough, thank you.
>
> Gianluca

However I'm a bit worried that permutations are supported only for 
getopt_long() not getopt().

 From a cursory look at the source of busybox's tar and ubi-tools it 
seems they use getopt_long() fortunately. But there are packages in 
ubi-tools which use std getopt().

Gianluca
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From sscapi at gmail.com  Sun Jan 11 11:49:05 2015
From: sscapi at gmail.com (Sylwester Petela (ScApi))
Date: Sun, 11 Jan 2015 17:49:05 +0100
Subject: [OpenWrt-Devel] [PATCH 1/3 v3] [Lantiq] [P2812HNUFX] Add device
 tree for P2812HNUF1 and P2812HNUF3
Message-ID: <20150111174905.000044a7@gmail.com>

Add device tree for P2812HNUF1 and P2812HNUF3.

Signed-off-by: Sylwester Petela <sscapi at gmail.com>
---
 target/linux/lantiq/dts/P2812HNUF1.dts             | 106 +++++++
 target/linux/lantiq/dts/P2812HNUF3.dts             | 109 ++++++++
 target/linux/lantiq/dts/P2812HNUFX.dtsi            | 257 +++++++++++++++++
 3 files changed, 472 insertions(+)

diff --git a/target/linux/lantiq/dts/P2812HNUF1.dts b/target/linux/lantiq/dts/P2812HNUF1.dts
index e69de29..24ded3e 100644
--- a/target/linux/lantiq/dts/P2812HNUF1.dts
+++ b/target/linux/lantiq/dts/P2812HNUF1.dts
@@ -0,0 +1,106 @@
+/dts-v1/;
+
+/include/ "P2812HNUFX.dtsi"
+
+/ {
+	model = "P2812HNUF1 - ZyXEL P-2812HNU-F1";
+
+	fpi at 10000000 {
+		localbus at 0 {
+			nand-parts at 0 {
+				compatible = "gen_nand", "lantiq,nand-xway";
+				lantiq,cs = <1>;
+				bank-width = <2>;
+				reg = <0 0x0 0x2000000>;
+				#address-cells = <1>;
+				#size-cells = <1>;
+
+				partition at 0 {
+					label = "uboot";
+					reg = <0x00000 0x40000>;
+				};
+				partition at 40000 {
+					label = "uboot-env";
+					reg = <0x40000 0x20000>;
+				};
+				partition at 60000 {
+					label = "kernel";
+					reg = <0x60000 0x200000>;
+				};
+				partition at 260000 {
+					label = "ubi";
+					reg = <0x260000 0x7da0000>;
+				};
+			};
+		};
+		pcie at d900000 {
+			status = "disabled";
+		};
+	};
+
+	ralink_eep {
+		compatible = "ralink,eeprom";
+		ralink,eeprom = "RT3062.eeprom";
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		internet_red {				/* red */
+			label = "internet_red";
+			gpios = <&stp 16 1>;
+		};
+		internet_green {
+			label = "internet_green";	/* green */
+			gpios = <&stp 17 1>;
+		};
+		dsl {
+			label = "dsl";
+			gpios = <&stp 18 1>;
+		};
+		dsl2 {
+			label = "dsl2";
+			gpios = <&stp 19 1>;
+		};
+		wireless_red {				/* red */
+			label = "wireless_red";
+			gpios = <&stp 20 1>;
+		};
+		wireless_green {			/* green */
+			label = "wireless_green";
+			gpios = <&stp 21 1>;
+		};
+		power {					/* red */
+			label = "power";
+			gpios = <&stp 22 1>;
+		};
+		power2 {				/* green */
+			label = "power2";
+			gpios = <&stp 23 1>;
+		};
+		usb1 {					/* green */
+			label = "usb1";
+			gpios = <&gpio 38 1>;
+		};
+		usb2 {					/* green */
+			label = "usb2";
+			gpios = <&gpio 44 1>;
+		};
+		phone1 {				/* green */
+			label = "phone1";
+			gpios = <&gpio 11 1>;
+		};
+		phone1warn {				/* red */
+			label = "phone1warn";
+			gpios = <&gpio 12 1>;
+		};
+		phone2warn {				/* red */
+			label = "phone2warn";
+			gpios = <&gpio 26 1>;
+		};
+		phone2 {				/* green */
+			label = "phone2";
+			gpios = <&gpio 28 1>;
+		};
+	};
+};
diff --git a/target/linux/lantiq/dts/P2812HNUF3.dts b/target/linux/lantiq/dts/P2812HNUF3.dts
index e69de29..5d25c3c 100644
--- a/target/linux/lantiq/dts/P2812HNUF3.dts
+++ b/target/linux/lantiq/dts/P2812HNUF3.dts
@@ -0,0 +1,109 @@
+/dts-v1/;
+
+/include/ "P2812HNUFX.dtsi"
+
+/ {
+	model = "P2812HNUF3 - ZyXEL P-2812HNU-F3";
+
+	fpi at 10000000 {
+		localbus at 0 {
+			nor-boot at 0 {
+				compatible = "lantiq,nor";
+				bank-width = <2>;
+				reg = <0 0x0 0x800000>;
+				#address-cells = <1>;
+				#size-cells = <1>;
+
+				partition at 0 {
+					label = "uboot";
+					reg = <0x0 0x50000>;
+					read-only;
+				};
+				partition at 50000 {
+					label = "uboot-env";
+					reg = <0x50000 0x10000>;
+				};
+				partition at 60000 {
+					label = "unused";
+					reg = <0x60000 0x7a0000>;
+				};
+			};
+
+			nand-parts at 0 {
+				compatible = "gen_nand", "lantiq,nand-xway";
+				lantiq,cs = <1>;
+				bank-width = <2>;
+				reg = <1 0x0 0x2000000>;
+				#address-cells = <1>;
+				#size-cells = <1>;
+
+				partition at 0 {
+					label = "kernel";
+					reg = <0x0 0x200000>;
+				};
+				partition at 200000 {
+					label = "ubi";
+					reg = <0x200000 0x7e00000>;
+				};
+			};
+		};
+	};
+
+	ralink_eep {
+		compatible = "ralink,eeprom";
+		ralink,eeprom = "RT3092.eeprom";
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		internet2 {
+			label = "internet2";
+			gpios = <&stp 16 1>;
+		};
+		internet {
+			label = "internet";
+			gpios = <&stp 17 1>;
+		};
+		dsl {
+			label = "dsl";
+			gpios = <&stp 18 1>;
+		};
+		dsl2 {
+			label = "dsl2";
+			gpios = <&stp 19 1>;
+		};
+		wireless_red {
+			label = "wireless_red";
+			gpios = <&stp 20 1>;
+		};
+		wireless_green {
+			label = "wireless_green";
+			gpios = <&stp 21 1>;
+		};
+		power2 {
+			label = "power2";
+			gpios = <&stp 22 1>;
+		};
+		power {
+			label = "power";
+			gpios = <&stp 23 1>;
+		};
+		phone1 {
+			label = "phone1";
+			gpios = <&gpio 11 1>;
+		};
+		phone1warn {
+			label = "phone1warn";
+			gpios = <&gpio 12 1>;
+		};
+		phone2 {
+			label = "phone2";
+			gpios = <&gpio 28 1>;
+		};
+		phone2warn {
+			label = "phone2warn";
+			gpios = <&gpio 26 1>;
+		};
+	};
+};
diff --git a/target/linux/lantiq/dts/P2812HNUFX.dtsi b/target/linux/lantiq/dts/P2812HNUFX.dtsi
index e69de29..e571eb6 100644
--- a/target/linux/lantiq/dts/P2812HNUFX.dtsi
+++ b/target/linux/lantiq/dts/P2812HNUFX.dtsi
@@ -0,0 +1,257 @@
+/include/ "vr9.dtsi"
+
+/ {
+	chosen {
+		bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
+	};
+
+	memory at 0 {
+		reg = <0x0 0x8000000>;
+	};
+
+        fpi at 10000000 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "lantiq,fpi", "simple-bus";
+		ranges = <0x0 0x10000000 0xEEFFFFF>;
+		reg = <0x10000000 0xEF00000>;
+
+		localbus at 0 {
+			#address-cells = <2>;
+			#size-cells = <1>;
+			ranges = <0 0 0x0 0x3ffffff /* addrsel0 */
+				1 0 0x4000000 0x4000010>; /* addsel1 */
+			compatible = "lantiq,localbus", "simple-bus";
+		};
+
+		gpio: pinmux at E100B10 {
+			compatible = "lantiq,pinctrl-xr9";
+			pinctrl-names = "default";
+			pinctrl-0 = <&state_default>;
+			
+			interrupt-parent = <&icu0>;
+			interrupts = <166 135 66 40 41 42 38>;
+
+			#gpio-cells = <2>;
+			gpio-controller;
+			reg = <0xE100B10 0xA0>;
+
+			state_default: pinmux {
+				exin3 {
+					lantiq,groups = "exin3";
+					lantiq,function = "exin";
+				};
+				mdio {
+					lantiq,groups = "mdio";
+					lantiq,function = "mdio";
+				};
+				gphy-leds {
+					lantiq,groups = "gphy0 led1", "gphy1 led1",
+							"gphy0 led2", "gphy1 led2";
+					lantiq,function = "gphy";
+					lantiq,pull = <2>;
+					lantiq,open-drain = <0>;
+					lantiq,output = <1>;
+				};
+				stp {
+					lantiq,groups = "stp";
+					lantiq,function = "stp";
+					lantiq,pull = <2>;
+					lantiq,open-drain = <0>;
+					lantiq,output = <1>;
+				};
+				pci-in {
+					lantiq,groups = "req1";
+					lantiq,function = "pci";
+					lantiq,output = <0>;
+					lantiq,open-drain = <1>;
+					lantiq,pull = <2>;
+				};
+				pci-out {
+					lantiq,groups = "gnt1";
+					lantiq,function = "pci";
+					lantiq,output = <1>;
+					lantiq,open-drain = <0>;
+					lantiq,pull = <0>;
+				};
+				pci_rst {
+					lantiq,pins = "io21";
+					lantiq,output = <1>;
+					lantiq,open-drain = <0>;
+					lantiq,pull = <2>;
+				};
+				pcie-rst {
+					lantiq,pins = "io38";
+					lantiq,pull = <0>;
+					lantiq,output = <1>;
+				};
+				ifxhcd-rst {
+					lantiq,pins = "io33";
+					lantiq,pull = <0>;
+					lantiq,open-drain = <0>;
+					lantiq,output = <1>;
+				};
+				nand_out {
+					lantiq,groups = "nand cle", "nand ale";
+					lantiq,function = "ebu";
+					lantiq,output = <1>;
+					lantiq,open-drain = <0>;
+					lantiq,pull = <0>;
+				};
+				nand_cs1 {
+					lantiq,groups = "nand cs1";
+					lantiq,function = "ebu";
+					lantiq,open-drain = <0>;
+					lantiq,pull = <0>;
+				};
+			};
+		};
+
+		eth at E108000 {
+			#address-cells = <1>;
+			#size-cells = <0>;
+			compatible = "lantiq,xrx200-net";
+			reg = < 0xE108000 0x3000	/* switch */
+				0xE10B100 0x70		/* mdio */
+				0xE10B1D8 0x30		/* mii */
+				0xE10B308 0x30 >;	/* pmac */
+			interrupt-parent = <&icu0>;
+			interrupts = <73 72>;
+
+			lan: interface at 0 {
+				compatible = "lantiq,xrx200-pdi";
+				#address-cells = <1>;
+				#size-cells = <0>;
+				reg = <0>;
+				mac-address = [ 00 11 22 33 44 55 ];
+				lantiq,switch;
+
+				ethernet at 0 {
+					compatible = "lantiq,xrx200-pdi-port";
+					reg = <0>;
+					phy-mode = "rgmii";
+					phy-handle = <&phy0>;
+				};
+				ethernet at 1 {
+					compatible = "lantiq,xrx200-pdi-port";
+					reg = <1>;
+					phy-mode = "rgmii";
+					phy-handle = <&phy1>;
+				};
+				ethernet at 2 {
+					compatible = "lantiq,xrx200-pdi-port";
+					reg = <2>;
+					phy-mode = "gmii";
+					phy-handle = <&phy11>;
+				};
+				ethernet at 4 {
+					compatible = "lantiq,xrx200-pdi-port";
+					reg = <4>;
+					phy-mode = "gmii";
+					phy-handle = <&phy13>;
+				};
+				ethernet at 5 {
+					compatible = "lantiq,xrx200-pdi-port";
+					reg = <5>;
+					phy-mode = "rgmii";
+					phy-handle = <&phy5>;
+				};
+			};
+
+			mdio at 0 {
+				#address-cells = <1>;
+				#size-cells = <0>;
+				compatible = "lantiq,xrx200-mdio";
+
+				phy0: ethernet-phy at 0 {
+					reg = <0x0>;
+					compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
+				};
+				phy1: ethernet-phy at 1 {
+					reg = <0x1>;
+					compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
+				};
+				phy5: ethernet-phy at 5 {
+					reg = <0x5>;
+					compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
+				};
+				phy11: ethernet-phy at 11 {
+					reg = <0x11>;
+					compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
+				};
+				phy13: ethernet-phy at 13 {
+					reg = <0x13>;
+					compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
+				};
+			};
+		};
+
+		stp: stp at E100BB0 {
+			compatible = "lantiq,gpio-stp-xway";
+			reg = <0xE100BB0 0x40>;
+			#gpio-cells = <2>;
+			gpio-controller;
+
+			lantiq,shadow = <0xffffff>;
+			lantiq,groups = <0x7>;
+			lantiq,dsl = <0x0>;
+			lantiq,phy1 = <0x0>;
+			lantiq,phy2 = <0x0>;
+		};
+
+		ifxhcd at E101000 {
+			status = "okay";
+			gpios = <&gpio 33 0>;
+			lantiq,portmask = <0x3>;
+		};
+
+		pci at E105400 {
+			status = "okay";
+			#address-cells = <3>;
+			#size-cells = <2>;
+			#interrupt-cells = <1>;
+			compatible = "lantiq,pci-xway";
+			bus-range = <0x0 0x0>;
+			ranges = <0x2000000 0 0x8000000 0x8000000 0 0x2000000   /* pci memory */
+				0x1000000 0 0x00000000 0xAE00000 0 0x200000>; /* io space */
+			reg = <0x7000000 0x8000         /* config space */
+				0xE105400 0x400>;       /* pci bridge */
+			lantiq,bus-clock = <33333333>;
+			/*lantiq,external-clock;*/
+			lantiq,delay-hi = <0>; /* 0ns delay */
+			lantiq,delay-lo = <0>; /* 0.0ns delay */
+			interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
+			interrupt-map = <
+				0x7000 0 0 1 &icu0 30 1 // slot 14, irq 30
+				>;
+			gpio-reset = <&gpio 21 0>;
+			req-mask = <0x1>;	/* GNT1 */
+		};
+	};
+
+	gphy-xrx200 {
+		compatible = "lantiq,phy-xrx200";
+		firmware1 = "lantiq/vr9_phy11g_a1x.bin";	/*VR9 1.1*/
+		firmware2 = "lantiq/vr9_phy11g_a2x.bin";	/*VR9 1.2*/
+		phys = [ 00 01 ];
+	};
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <100>;
+
+		reset {
+			label = "reset";
+			gpios = <&gpio 39 1>;
+			linux,code = <0x198>;
+		};
+
+		rfkill {
+			label = "rfkill";
+			gpios = <&gpio 1 1>;
+			linux,code = <0xf7>;
+		};
+	};
+};
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From sscapi at gmail.com  Sun Jan 11 11:49:13 2015
From: sscapi at gmail.com (Sylwester Petela (ScApi))
Date: Sun, 11 Jan 2015 17:49:13 +0100
Subject: [OpenWrt-Devel] [PATCH 2/3 v3] [Lantiq] [P2812HNUFX] Add profile
 and userspace for P2812HNUF1/3, switch from UBI_GLUEBI to UBI_BLOCK
Message-ID: <20150111174913.00005c0b@gmail.com>

Add profile and userspace for P2812HNUF1/3, switch from UBI_GLUEBI to UBI_BLOCK

Signed-off-by: Sylwester Petela <sscapi at gmail.com>
---
 .../lantiq/base-files/etc/uci-defaults/01_leds     |   7 +
 .../lantiq/base-files/etc/uci-defaults/02_network  |   4 +-
 .../lantiq/base-files/lib/upgrade/platform.sh      |   2 +-
 target/linux/lantiq/image/Makefile                 |   8 +-
 target/linux/lantiq/xrx200/config-default          |   4 +-
 target/linux/lantiq/xrx200/profiles/zyxel.mk       |  25 +-
 6 files changed, 38 insertions(+), 12 deletions(-)

diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/01_leds b/target/linux/lantiq/base-files/etc/uci-defaults/01_leds
index 10ba2a1..3502eb2 100644
--- a/target/linux/lantiq/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/lantiq/base-files/etc/uci-defaults/01_leds
@@ -37,6 +37,13 @@ VGV7519)
 	ucidef_set_led_netdev "internet_yellow" "internet_yellow" "internet_yellow" "nas0"
 	ucidef_set_led_netdev "broadband_yellow" "broadband_yellow" "broadband_yellow" "pppoe-wan"
 	;;
+P2812HNUF*)
+	ucidef_set_led_default "power" "power" "power" "0"
+	ucidef_set_led_default "power2" "power2" "power2" "1"
+	ucidef_set_led_wlan "wireless_green" "wireless_green" "wireless_green" "phy0radio"
+	ucidef_set_led_netdev "dsl" "dsl" "dsl" "nas0"
+	ucidef_set_led_netdev "internet_green" "internet_green" "internet_green" "pppoe-wan"
+	;;
 *)
 	;;
 esac
diff --git a/target/linux/lantiq/base-files/etc/uci-defaults/02_network b/target/linux/lantiq/base-files/etc/uci-defaults/02_network
index 1df83a6..f9cac7c 100644
--- a/target/linux/lantiq/base-files/etc/uci-defaults/02_network
+++ b/target/linux/lantiq/base-files/etc/uci-defaults/02_network
@@ -145,7 +145,9 @@ P2601HNFX)
 	ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 5t"
 	;;
 
-P2812HNUFX)
+P2812HNUF*)
+	lan_mac=$(mtd_get_mac_ascii uboot-env ethaddr)
+	wan_mac=$(macaddr_add "$lan_mac" 1)
 	ucidef_set_interface_lan 'eth0.1'
 	ucidef_add_switch "switch0" "1" "1"
 	ucidef_add_switch_vlan "switch0" "1" "0 1 2 4 5 6t"
diff --git a/target/linux/lantiq/base-files/lib/upgrade/platform.sh b/target/linux/lantiq/base-files/lib/upgrade/platform.sh
index 84f15c4..1688d3a 100755
--- a/target/linux/lantiq/base-files/lib/upgrade/platform.sh
+++ b/target/linux/lantiq/base-files/lib/upgrade/platform.sh
@@ -7,7 +7,7 @@ platform_check_image() {
 	local board=$(lantiq_board_name)
 
 	case "$board" in
-		BTHOMEHUBV2B|BTHOMEHUBV3A )
+		BTHOMEHUBV2B|BTHOMEHUBV3A|P2812HNUF* )
 			nand_do_platform_check $board $1
 			return $?;
 			;;
diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile
index 623f93b..82f0e6f 100644
--- a/target/linux/lantiq/image/Makefile
+++ b/target/linux/lantiq/image/Makefile
@@ -400,9 +400,11 @@ endif
 ifeq ($(CONFIG_TARGET_lantiq_xrx200),y)
 
 # VR9
-Image/BuildKernel/Profile/P2812HNUFX=$(call Image/BuildKernel/Template,P2812HNUFX)
-Image/InstallKernel/Template/P2812HNUFX=$(call Image/InstallKernel/Template,P2812HNUFX)
-Image/Build/Profile/P2812HNUFX=$(call Image/Build/$(1),$(1),P2812HNUFX)
+Image/BuildKernel/Profile/P2812HNUF1=$(call Image/BuildKernel/Template,P2812HNUF1)
+Image/Build/Profile/P2812HNUF1=$(call Image/BuildNAND/$(1),$(1),P2812HNUF1)
+
+Image/BuildKernel/Profile/P2812HNUF3=$(call Image/BuildKernel/Template,P2812HNUF3)
+Image/Build/Profile/P2812HNUF3=$(call Image/BuildNAND/$(1),$(1),P2812HNUF3)
 
 Image/BuildKernel/Profile/ARV7519RW22=$(call Image/BuildKernel/Template,ARV7519RW22,$(1))
 Image/Build/Profile/ARV7519RW22=$(call Image/Build/$(1),$(1),ARV7519RW22)
diff --git a/target/linux/lantiq/xrx200/config-default b/target/linux/lantiq/xrx200/config-default
index 09dfbdd..73dad50 100644
--- a/target/linux/lantiq/xrx200/config-default
+++ b/target/linux/lantiq/xrx200/config-default
@@ -30,9 +30,9 @@ CONFIG_MTD_NAND_XWAY=y
 # CONFIG_MTD_SM_COMMON is not set
 CONFIG_MTD_UBI=y
 CONFIG_MTD_UBI_BEB_LIMIT=20
-# CONFIG_MTD_UBI_BLOCK is not set
+CONFIG_MTD_UBI_BLOCK=y
 # CONFIG_MTD_UBI_FASTMAP is not set
-CONFIG_MTD_UBI_GLUEBI=y
+# CONFIG_MTD_UBI_GLUEBI is not set
 CONFIG_MTD_UBI_WL_THRESHOLD=4096
 CONFIG_NLS=y
 CONFIG_PCIE_LANTIQ=y
diff --git a/target/linux/lantiq/xrx200/profiles/zyxel.mk b/target/linux/lantiq/xrx200/profiles/zyxel.mk
index e758a50..d388368 100644
--- a/target/linux/lantiq/xrx200/profiles/zyxel.mk
+++ b/target/linux/lantiq/xrx200/profiles/zyxel.mk
@@ -1,5 +1,5 @@
-define Profile/P2812HNUFX
-  NAME:=ZyXEL P-2812HNU-Fx
+define Profile/P2812HNUF1
+  NAME:=ZyXEL P-2812HNU-F1
   PACKAGES:=kmod-rt2800-pci wpad-mini \
 	kmod-ltq-deu-vr9 kmod-ltq-hcd-vr9 \
 	kmod-ltq-vdsl-vr9-mei kmod-ltq-vdsl-vr9 \
@@ -8,7 +8,23 @@ define Profile/P2812HNUFX
 	swconfig
 endef
 
-P2812HNUFX_UBIFS_OPTS:="-m 2048 -e 126KiB -c 4096"
-P2812HNUFX_UBI_OPTS:="-m 2048 -p 128KiB -s 512"
+P2812HNUF1_UBIFS_OPTS:="-m 2048 -e 126KiB -c 4096"
+P2812HNUF1_UBI_OPTS:="-m 2048 -p 128KiB -s 512"
 
-$(eval $(call Profile,P2812HNUFX))
+$(eval $(call Profile,P2812HNUF1))
+
+define Profile/P2812HNUF3
+  NAME:=ZyXEL P-2812HNU-F3
+  PACKAGES:=kmod-rt2800-pci wpad-mini \
+	kmod-ltq-deu-vr9 kmod-ltq-hcd-vr9 \
+	kmod-ltq-vdsl-vr9-mei kmod-ltq-vdsl-vr9 \
+	kmod-ltq-atm-vr9 ltq-vdsl-vr9-fw-installer \
+	ltq-vdsl-app ppp-mod-pppoa \
+	swconfig
+endef
+
+P2812HNUF3_UBIFS_OPTS:="-m 2048 -e 126KiB -c 4096"
+P2812HNUF3_UBI_OPTS:="-m 2048 -p 128KiB -s 512"
+
+$(eval $(call Profile,P2812HNUF3))
+
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From sscapi at gmail.com  Sun Jan 11 11:49:21 2015
From: sscapi at gmail.com (Sylwester Petela (ScApi))
Date: Sun, 11 Jan 2015 17:49:21 +0100
Subject: [OpenWrt-Devel] [PATCH 3/3 v3] [Lantiq] [P2812HNUFX] Remove old
	P2812HNUFX dts
Message-ID: <20150111174921.00003db8@gmail.com>

Remove unused P2812HNUFX board definition.

Signed-off-by: Sylwester Petela <sscapi at gmail.com>
---
 target/linux/lantiq/dts/P2812HNUFX.dts             | 308 ---------------------
 1 files changed, 0 insertions(+), 308 deletions(-)

diff --git a/target/linux/lantiq/dts/P2812HNUFX.dts b/target/linux/lantiq/dts/P2812HNUFX.dts
deleted file mode 100644
index 5af10d4..0000000
--- a/target/linux/lantiq/dts/P2812HNUFX.dts
+++ /dev/null
@@ -1,308 +0,0 @@
-/dts-v1/;
-
-/include/ "vr9.dtsi"
-
-/ {
-	model = "P2812HNUFX - ZyXEL P-2812HNU-Fx";
-	
-	chosen {
-		/*bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";*/
-	};
-
-	memory at 0 {
-		reg = <0x0 0x8000000>;
-	};
-	
-	fpi at 10000000 {
-		#address-cells = <1>;
-		#size-cells = <1>;
-		compatible = "lantiq,fpi", "simple-bus";
-		ranges = <0x0 0x10000000 0xEEFFFFF>;
-		reg = <0x10000000 0xEF00000>;
-
-		localbus at 0 {
-			#address-cells = <2>;
-			#size-cells = <1>;
-			compatible = "lantiq,localbus", "simple-bus";
-
-			nand-parts at 0 {
-				compatible = "gen_nand", "lantiq,nand-xway";
-				lantiq,cs = <1>;
-				bank-width = <2>;
-				reg = <0 0x0 0x2000000>;
-				#address-cells = <1>;
-				#size-cells = <1>;
-
-				partition at 0 {
-					label = "u-boot";
-					reg = <0x00000 0x40000>;
-				};
-
-				partition at 40000 {
-					label = "u-boot environment";
-					reg = <0x40000 0x20000>;
-				};
-
-				partition at 60000 {
-					label = "root";
-					reg = <0x60000 0x7fa0000>;
-				};
-			};
-		};
-
-		gpio: pinmux at E100B10 {
-			compatible = "lantiq,pinctrl-xr9";
-			pinctrl-names = "default";
-			pinctrl-0 = <&state_default>;
-			
-			interrupt-parent = <&icu0>;
-			interrupts = <166 135 66 40 41 42 38>;
-
-			#gpio-cells = <2>;
-			gpio-controller;
-			reg = <0xE100B10 0xA0>;
-
-			state_default: pinmux {
-				mdio {
-					lantiq,groups = "mdio";
-					lantiq,function = "mdio";
-				};
-				gphy-leds {
-					lantiq,groups = "gphy0 led1", "gphy1 led1",
-							"gphy0 led2", "gphy1 led2";
-					lantiq,function = "gphy";
-					lantiq,pull = <2>;
-					lantiq,open-drain = <0>;
-					lantiq,output = <1>;
-				};
-				stp {
-					lantiq,groups = "stp";
-					lantiq,function = "stp";
-					lantiq,pull = <2>;
-					lantiq,open-drain = <0>;
-					lantiq,output = <1>;
-				};
-				pci {
-					lantiq,groups = "gnt1", "req1";
-					lantiq,function = "pci";
-				};
-				pci-rst {
-					lantiq,pins = "io21";
-					lantiq,pull = <0>;
-					lantiq,open-drain = <0>;
-					lantiq,output = <1>;
-				};
-				ifxhcd-rst {
-					lantiq,pins = "io33";
-					lantiq,pull = <0>;
-					lantiq,open-drain = <0>;
-					lantiq,output = <1>;
-				};
-				nand {
-					lantiq,groups = "nand cle", "nand ale",
-							"nand rd", "nand cs1", "nand rdy";
-					lantiq,function = "ebu";
-					lantiq,pull = <1>;
-				};
-			};
-		};
-
-		eth at E108000 {
-			#address-cells = <1>;
-			#size-cells = <0>;
-			compatible = "lantiq,xrx200-net";
-			reg = <	0xE108000 0x3000 /* switch */
-				0xE10B100 0x70 /* mdio */
-				0xE10B1D8 0x30 /* mii */
-				0xE10B308 0x30 /* pmac */
-			>;
-			interrupt-parent = <&icu0>;
-			interrupts = <73 72>;
-
-			lan: interface at 0 {
-				compatible = "lantiq,xrx200-pdi";
-				#address-cells = <1>;
-				#size-cells = <0>;
-				reg = <0>;
-				mac-address = [ 00 11 22 33 44 55 ];
-				lantiq,switch;
-
-				ethernet at 0 {
-					compatible = "lantiq,xrx200-pdi-port";
-					reg = <0>;
-					phy-mode = "rgmii";
-					phy-handle = <&phy0>;
-				};
-				ethernet at 1 {
-					compatible = "lantiq,xrx200-pdi-port";
-					reg = <1>;
-					phy-mode = "rgmii";
-					phy-handle = <&phy1>;
-				};
-				ethernet at 2 {
-					compatible = "lantiq,xrx200-pdi-port";
-					reg = <2>;
-					phy-mode = "gmii";
-					phy-handle = <&phy11>;
-				};
-				ethernet at 4 {
-					compatible = "lantiq,xrx200-pdi-port";
-					reg = <4>;
-					phy-mode = "gmii";
-					phy-handle = <&phy13>;
-				};
-				ethernet at 5 {
-					compatible = "lantiq,xrx200-pdi-port";
-					reg = <5>;
-					phy-mode = "rgmii";
-					phy-handle = <&phy5>;
-				};
-			};
-
-			mdio at 0 {
-				#address-cells = <1>;
-				#size-cells = <0>;
-				compatible = "lantiq,xrx200-mdio";
-				phy0: ethernet-phy at 0 {
-					reg = <0x0>;
-					compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
-				};
-				phy1: ethernet-phy at 1 {
-					reg = <0x1>;
-					compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
-				};
-				phy5: ethernet-phy at 5 {
-					reg = <0x5>;
-					compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
-				};
-				phy11: ethernet-phy at 11 {
-					reg = <0x11>;
-					compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
-				};
-				phy13: ethernet-phy at 13 {
-					reg = <0x13>;
-					compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
-				};
-			};
-		};
-
-		stp: stp at E100BB0 {
-			compatible = "lantiq,gpio-stp-xway";
-			reg = <0xE100BB0 0x40>;
-			#gpio-cells = <2>;
-			gpio-controller;
-
-			lantiq,shadow = <0xffffff>;
-			lantiq,groups = <0x7>;
-			/*
-			lantiq,dsl = <0x3>;
-			lantiq,phy1 = <0x7>;
-			lantiq,phy2 = <0x7>;
-			*/
-		};
-
-		ifxhcd at E101000 {
-			status = "okay";
-			gpios = <&gpio 33 0>;
-			lantiq,portmask = <0x3>;
-		};
-
-		pci at E105400 {
-			lantiq,bus-clock = <33333333>;
-			/* lantiq,external-clock; */
-			lantiq,delay-hi = <0>; /* 0ns delay */
-			lantiq,delay-lo = <0>; /* 0.0ns delay */
-			interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
-			interrupt-map = <
-				0x7000 0 0 1 &icu0 29 //1 // slot 14, irq 29
-				>;
-			gpio-reset = <&gpio 21 0>;
-			req-mask = <0x1>;	/* GNT1 */
-			status = "okay";
-		};
-	};
-
-	gphy-xrx200 {
-		compatible = "lantiq,phy-xrx200";
-		firmware = "lantiq/vr9_phy11g_a1x.bin";
-		phys = [ 00 01 ];
-	};
-
-	gpio-keys-polled {
-		compatible = "gpio-keys-polled";
-		#address-cells = <1>;
-		#size-cells = <0>;
-		poll-interval = <100>;
-		reset {
-			label = "reset";
-			gpios = <&gpio 39 1>;
-			linux,code = <0x198>;
-		};
-		rfkill {
-			label = "rfkill";
-			gpios = <&gpio 1 1>;
-			linux,code = <0xf7>;
-		};
-	};
-
-	gpio-leds {
-		compatible = "gpio-leds";
-
-		internet2 {
-			label = "internet2";
-			gpios = <&stp 16 1>;
-		};
-		internet {
-			label = "internet";
-			gpios = <&stp 17 1>;
-		};
-		dsl {
-			label = "dsl";
-			gpios = <&stp 18 1>;
-		};
-		dsl2 {
-			label = "dsl2";
-			gpios = <&stp 19 1>;
-		};
-		wifi2 {
-			label = "wifi2";
-			gpios = <&stp 20 1>;
-		};
-		wlan {
-			label = "wifi";
-			gpios = <&stp 21 1>;
-		};
-		power2 {
-			label = "power2";
-			gpios = <&stp 22 1>;
-		};
-		power {
-			label = "power";
-			gpios = <&stp 23 1>;
-		};
-		usb1 {
-			label = "usb";
-			gpios = <&gpio 38 1>;
-		};
-		usb2 {
-			label = "usb2";
-			gpios = <&gpio 44 1>;
-		};
-		phone1 {
-			label = "phone1";
-			gpios = <&gpio 11 1>;
-		};
-		phone1warn {
-			label = "phone1warn";
-			gpios = <&gpio 12 1>;
-		};
-		phone2 {
-			label = "phone2";
-			gpios = <&gpio 28 1>;
-		};
-		phone2warn {
-			label = "phone2warn";
-			gpios = <&gpio 26 1>;
-		};
-	};
-};
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From luka at openwrt.org  Sun Jan 11 12:23:39 2015
From: luka at openwrt.org (Luka Perkov)
Date: Sun, 11 Jan 2015 18:23:39 +0100
Subject: [OpenWrt-Devel] [PATCH 1/4] mvsw6171: rename to 'mvsw61xx'
In-Reply-To: <1420823570-8706-1-git-send-email-leitec@staticky.com>
References: <1420823570-8706-1-git-send-email-leitec@staticky.com>
Message-ID: <20150111172339.GC2999@t530.lan>

Hi Claudio,

On Fri, Jan 09, 2015 at 12:12:47PM -0500, Claudio Leite wrote:
> In preparation for properly supporting switches
> beyond the 88E6171.
> 
> Signed-off-by: Claudio Leite <leitec at staticky.com>
> ---

Series applied in r43935-r43938. I added minor modifications to mvebu
target in the first patch. Thank you!

Regards,
Luka
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From luka at openwrt.org  Sun Jan 11 12:24:33 2015
From: luka at openwrt.org (Luka Perkov)
Date: Sun, 11 Jan 2015 18:24:33 +0100
Subject: [OpenWrt-Devel] [PATCH] [mvebu] use mvsw61xx
In-Reply-To: <1420845670-29239-1-git-send-email-mark.a.milburn@gmail.com>
References: <1420845670-29239-1-git-send-email-mark.a.milburn@gmail.com>
Message-ID: <20150111172433.GD2999@t530.lan>

Hi Mark,

On Fri, Jan 09, 2015 at 04:21:10PM -0700, Mark Milburn wrote:
> Use Claudio's renamed mvsw6171 driver.
> Depends upon https://patchwork.ozlabs.org/patch/427183/ patchset.
> 
> Signed-off-by: Mark Milburn <mark.a.milburn at gmail.com>
> ---
>  target/linux/mvebu/config-3.14 | 2 +-
>  target/linux/mvebu/config-3.18 | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

Applied as a part of r43938. Thank you!

Luka
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From gio at eigenlab.org  Sun Jan 11 12:47:06 2015
From: gio at eigenlab.org (Gioacchino Mazzurco)
Date: Sun, 11 Jan 2015 18:47:06 +0100
Subject: [OpenWrt-Devel] [PATCH] [ar71xx] Add support for MERCURY
	MAC1200R
In-Reply-To: <1420976894-12794-1-git-send-email-openwrt@rogerpueyo.com>
References: <1420976894-12794-1-git-send-email-openwrt@rogerpueyo.com>
Message-ID: <1452815.uI1v7X2ClP@giomium>

Does openwrt supports 802.11ac with this router?
Seller claim 802.11ac wireless + 1200Mbit ethernet speed (Gigabit?)

Thanks!
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From nbd at openwrt.org  Sun Jan 11 13:28:19 2015
From: nbd at openwrt.org (Felix Fietkau)
Date: Sun, 11 Jan 2015 19:28:19 +0100
Subject: [OpenWrt-Devel] [PATCH] procd: reorder the arguments of command
 invocations
In-Reply-To: <54B27625.50108@sottospazio.it>
References: <1420912491-21359-1-git-send-email-gianluca@sottospazio.it>
 <54B268F9.6080706@openwrt.org> <54B27359.8030201@sottospazio.it>
 <54B27625.50108@sottospazio.it>
Message-ID: <54B2C0C3.1040703@openwrt.org>

On 2015-01-11 14:09, Gianluca Anzolin wrote:
> Il 11/01/2015 13:58, Gianluca Anzolin ha scritto:
>> Il 11/01/2015 13:13, Felix Fietkau ha scritto:
>>> It seems that musl git now supports argv permutation. I'm going to merge
>>> the git changes since the last release soon.
>>>
>>> - Felix
>> Fair enough, thank you.
>>
>> Gianluca
> 
> However I'm a bit worried that permutations are supported only for 
> getopt_long() not getopt().
> 
>  From a cursory look at the source of busybox's tar and ubi-tools it 
> seems they use getopt_long() fortunately. But there are packages in 
> ubi-tools which use std getopt().
Please test r43939 and check if the scripts work now.

Thanks,

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


From gianluca at sottospazio.it  Sun Jan 11 15:05:43 2015
From: gianluca at sottospazio.it (Gianluca Anzolin)
Date: Sun, 11 Jan 2015 21:05:43 +0100
Subject: [OpenWrt-Devel] [PATCH] procd: reorder the arguments of command
 invocations
In-Reply-To: <54B2C0C3.1040703@openwrt.org>
References: <1420912491-21359-1-git-send-email-gianluca@sottospazio.it>
 <54B268F9.6080706@openwrt.org> <54B27359.8030201@sottospazio.it>
 <54B27625.50108@sottospazio.it> <54B2C0C3.1040703@openwrt.org>
Message-ID: <54B2D797.20903@sottospazio.it>

Il 11/01/2015 19:28, Felix Fietkau ha scritto:
> On 2015-01-11 14:09, Gianluca Anzolin wrote:
>> Il 11/01/2015 13:58, Gianluca Anzolin ha scritto:
>>> Il 11/01/2015 13:13, Felix Fietkau ha scritto:
>>>> It seems that musl git now supports argv permutation. I'm going to merge
>>>> the git changes since the last release soon.
>>>>
>>>> - Felix
>>> Fair enough, thank you.
>>>
>>> Gianluca
>> However I'm a bit worried that permutations are supported only for
>> getopt_long() not getopt().
>>
>>   From a cursory look at the source of busybox's tar and ubi-tools it
>> seems they use getopt_long() fortunately. But there are packages in
>> ubi-tools which use std getopt().
> Please test r43939 and check if the scripts work now.
>
> Thanks,
>
> - Felix
After an endless recompilation I can confirm that in r43939 sysupgrade 
works even without reording the arguments in /lib/upgrade/nand.sh

Thank you.

Gianluca
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From gio at eigenlab.org  Sun Jan 11 16:25:09 2015
From: gio at eigenlab.org (Gioacchino Mazzurco)
Date: Sun, 11 Jan 2015 22:25:09 +0100
Subject: [OpenWrt-Devel] [PATCH] [ar71xx] Add support for MERCURY
	MAC1200R
In-Reply-To: <CAPH4JEJJe+LHtRT2LER02zgnFZC3ft2wyeo27YsgtJ8Q7DKuVQ@mail.gmail.com>
References: <1420976894-12794-1-git-send-email-openwrt@rogerpueyo.com>
 <1452815.uI1v7X2ClP@giomium>
 <CAPH4JEJJe+LHtRT2LER02zgnFZC3ft2wyeo27YsgtJ8Q7DKuVQ@mail.gmail.com>
Message-ID: <1854798.rQ8Qqp3W33@giomium>

On Sunday, January 11, 2015 09:30:34 PM Roger Pueyo Centelles wrote:
> Apparently it does :)

Cool!


> The device has two radios:
>  - 802.11abgn AR9344 SoC, ath9k, working OK
>  - 802.11ac QCA988x, ath10k, working in AP and STA modes

Doesn't support adhoc nor 802.11s with the 802.11ac :( , does it?


> Ethernet ports are 10/100 :(

It make no sense :(
Why did they do such a stupid design?
Moreover they advertise it as 1200Mbis lan -_-

Thanks!!
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From rogerpueyo at gmail.com  Sun Jan 11 16:53:37 2015
From: rogerpueyo at gmail.com (Roger Pueyo Centelles)
Date: Sun, 11 Jan 2015 22:53:37 +0100
Subject: [OpenWrt-Devel] [PATCH] [ar71xx] Add support for MERCURY
	MAC1200R
In-Reply-To: <1854798.rQ8Qqp3W33@giomium>
References: <1420976894-12794-1-git-send-email-openwrt@rogerpueyo.com>
 <1452815.uI1v7X2ClP@giomium>
 <CAPH4JEJJe+LHtRT2LER02zgnFZC3ft2wyeo27YsgtJ8Q7DKuVQ@mail.gmail.com>
 <1854798.rQ8Qqp3W33@giomium>
Message-ID: <CAPH4JE+NmaPxY+MZJpb=+e65_Qns+M9o08zLp-B6ssWr-6+ONg@mail.gmail.com>

No adhoc nor 802.11s with the current ath10k firmware. Actually, that's
what I want it for. It's a pity the driver is not fully open source.

I've tried with firmware 999.999.0.x (
http://wireless.kernel.org/en/users/Drivers/ath10k/firmware) but it the
wireless interface is not operational and I get a bunch of kernel errors.

I agree, it doesn't make much sense to put a 10/100 switch, but it must be
cheaper than a Gb one.

Cheers,

2015-01-11 22:25 GMT+01:00 Gioacchino Mazzurco <gio at eigenlab.org>:

> On Sunday, January 11, 2015 09:30:34 PM Roger Pueyo Centelles wrote:
> > Apparently it does :)
>
> Cool!
>
>
> > The device has two radios:
> >  - 802.11abgn AR9344 SoC, ath9k, working OK
> >  - 802.11ac QCA988x, ath10k, working in AP and STA modes
>
> Doesn't support adhoc nor 802.11s with the 802.11ac :( , does it?
>
>
> > Ethernet ports are 10/100 :(
>
> It make no sense :(
> Why did they do such a stupid design?
> Moreover they advertise it as 1200Mbis lan -_-
>
> Thanks!!
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150111/aa9432d6/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From ldpinney at gmail.com  Sun Jan 11 17:02:17 2015
From: ldpinney at gmail.com (L. D. Pinney)
Date: Sun, 11 Jan 2015 16:02:17 -0600
Subject: [OpenWrt-Devel] [PATCH] [ramips] : add support for Kingston MLWG2
Message-ID: <1421013737-23834-1-git-send-email-ldpinney@gmail.com>

This patch adds support for the Kingston Mobilelite Wireless G2 (MLWG2)

http://wiki.openwrt.org/toh/kingston/mlwg2

https://github.com/gmacario/kingston-mlwg2-hack/wiki/Testing-OpenWrt-on-MLWG2

Tested-by: Gianpaolo Macario <gmacario at gmail.com>

Signed-off-by: L. D. Pinney <ldpinney at gmail.com>

---

 target/linux/ramips/base-files/etc/board.d/01_leds     |   4 +++
 target/linux/ramips/base-files/etc/board.d/02_network  |   3 ++
 target/linux/ramips/base-files/etc/diag.sh             |   3 ++
 target/linux/ramips/base-files/lib/ramips.sh           |   3 ++
 target/linux/ramips/base-files/lib/upgrade/platform.sh |   1 +
 target/linux/ramips/dts/MLWG2.dts                      | 118 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 target/linux/ramips/image/Makefile                     |   2 ++
 7 files changed, 134 insertions(+)

diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds
index 405a6c0..23e310e 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -130,6 +130,10 @@ case $board in
 		set_wifi_led "kingston:blue:wifi"
 		ucidef_set_led_default "system" "system" "kingston:blue:system" "1"
 		;;
+	mlwg2)
+		set_wifi_led "kingston:blue:wifi"
+		ucidef_set_led_default "system" "system" "kingston:blue:system" "1"
+		;;
 	mofi3500-3gn)
 		set_usb_led "mofi3500-3gn:green:usb"
 		;;
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
index a86466e..aad1197 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -61,6 +61,9 @@ ramips_setup_interfaces()
 	mlw221)
 		ucidef_set_interface_lan "eth0.2"
 		;;
+	mlwg2)
+		ucidef_set_interface_lan "eth0.1"
+		;;
 
 	wizard8800 | \
 	wl-330n | \
diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh
index 103dfcd..65ef0db 100755
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -88,6 +88,9 @@ get_status_led() {
 	mlw221)
 		status_led="kingston:blue:status"
 		;;
+	mlwg2)
+		status_led="kingston:blue:system"
+		;;
 	mofi3500-3gn)
 		status_led="mofi3500-3gn:green:status"
 		;;
diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh
index 540da33..379713b 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -187,6 +187,9 @@ ramips_board_detect() {
 	*"Kingston MLW221")
 		name="mlw221"
 		;;
+	*"Kingston MLWG2")
+		name="mlwg2"
+		;;
 	*"Linksys E1700")
 		name="e1700"
 		;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 95cad63..b5eecfc 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -58,6 +58,7 @@ platform_check_image() {
 	m3 | \
 	m4 | \
 	mlw221 | \
+	mlwg2 | \
 	mofi3500-3gn | \
 	mpr-a1 | \
 	mpr-a2 | \
diff --git a/target/linux/ramips/dts/MLWG2.dts b/target/linux/ramips/dts/MLWG2.dts
index e69de29..c7ce146 100644
--- a/target/linux/ramips/dts/MLWG2.dts
+++ b/target/linux/ramips/dts/MLWG2.dts
@@ -0,0 +1,118 @@
+/dts-v1/;
+
+/include/ "mt7620n.dtsi"
+
+/ {
+	compatible = "mlwG2", "ralink,mt7620n-soc";
+	model = "Kingston MLWG2";
+
+	palmbus at 10000000 {
+		gpio0: gpio at 600 {
+			status = "okay";
+		};
+
+		gpio2: gpio at 660 {
+                       status = "okay";
+		};
+
+		gpio3: gpio at 688 {
+			status = "okay";
+		};
+
+		spi at b00 {
+			status = "okay";
+
+			m25p80 at 0 {
+				#address-cells = <1>;
+				#size-cells = <1>;
+				compatible = "mx25l12805d";
+				reg = <0 0>;
+				linux,modalias = "m25p80";
+				spi-max-frequency = <10000000>;
+
+				partition at 0 {
+					label = "u-boot";
+					reg = <0x0 0x30000>;
+					read-only;
+				};
+
+				partition at 30000 {
+					label = "u-boot-env";
+					reg = <0x30000 0x10000>;
+					read-only;
+				};
+
+				factory: partition at 40000 {
+					label = "factory";
+					reg = <0x40000 0x10000>;
+					read-only;
+				};
+
+				partition at 50000 {
+					label = "firmware";
+					reg = <0x50000 0xf60000>;
+				};
+
+				partition at fb0000 {
+					label = "user-config";
+					reg = <0xfb0000 0x50000>;
+				};
+			};
+		};
+	};
+
+	ehci at 101c0000 {
+		status = "okay";
+	};
+
+	ohci at 101c1000 {
+		status = "okay";
+	};
+
+	ethernet at 10100000 {
+		mtd-mac-address = <&factory 0x4>;
+		ralink,port-map = "wllll";
+	};
+
+	wmac at 10180000 {
+		ralink,mtd-eeprom = <&factory 0>;
+	};
+
+	pinctrl {
+		state_default: pinctrl0 {
+			default {
+				ralink,group = "i2c", "ephy", "wled";
+				ralink,function = "gpio";
+			};
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+		system {
+			label = "kingston:blue:system";
+			gpios = <&gpio2 3 1>;
+		};
+		wifi {
+			label = "kingston:blue:wifi";
+			gpios = <&gpio3 0 1>;
+		};
+	};
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		reset {
+			label = "reset";
+			gpios = <&gpio0 1 1>;
+			linux,code = <0x198>;
+		};
+		system {
+			label = "system";
+			gpios = <&gpio0 2 1>;
+			linux,code = <0x211>;
+		};
+	};
+};
diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile
index 82cadd7..21c8a8d 100644
--- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile
@@ -828,6 +828,7 @@ Image/Build/Profile/MZK-750DHP=$(call BuildFirmware/Default8M/$(1),$(1),mzk-750d
 Image/Build/Profile/Y1=$(call BuildFirmware/Default16M/$(1),$(1),Lenovo-y1,Y1)
 Image/Build/Profile/Y1S=$(call BuildFirmware/Default16M/$(1),$(1),Lenovo-y1s,Y1S)
 Image/Build/Profile/MLW221=$(call BuildFirmware/Default16M/$(1),$(1),mlw221,MLW221)
+Image/Build/Profile/MLWG2=$(call BuildFirmware/Default16M/$(1),$(1),mlwg2,MLWG2)
 Image/Build/Profile/WMR300=$(call BuildFirmware/Default8M/$(1),$(1),wmr-300,WMR300)
 Image/Build/Profile/RT-N14U=$(call BuildFirmware/Default8M/$(1),$(1),rt-n14u,RT-N14U)
 Image/Build/Profile/WR8305RT=$(call BuildFirmware/Default8M/$(1),$(1),wr8305rt,WR8305RT)
@@ -855,6 +856,7 @@ define Image/Build/Profile/Default
 	$(call Image/Build/Profile/Y1,$(1))
 	$(call Image/Build/Profile/Y1S,$(1))
 	$(call Image/Build/Profile/MLW221,$(1))
+	$(call Image/Build/Profile/MLWG2,$(1))
 	$(call Image/Build/Profile/WMR300,$(1))
 	$(call Image/Build/Profile/RT-N14U,$(1))
 	$(call Image/Build/Profile/WR8305RT,$(1))
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From br1 at einfach.org  Sun Jan 11 18:21:21 2015
From: br1 at einfach.org (Bruno Randolf)
Date: Sun, 11 Jan 2015 23:21:21 +0000
Subject: [OpenWrt-Devel] [PATCH] [ar71xx] Add support for MERCURY
	MAC1200R
In-Reply-To: <1854798.rQ8Qqp3W33@giomium>
References: <1420976894-12794-1-git-send-email-openwrt@rogerpueyo.com>
 <1452815.uI1v7X2ClP@giomium>
 <CAPH4JEJJe+LHtRT2LER02zgnFZC3ft2wyeo27YsgtJ8Q7DKuVQ@mail.gmail.com>
 <1854798.rQ8Qqp3W33@giomium>
Message-ID: <54B30571.3070408@einfach.org>

On 01/11/2015 09:25 PM, Gioacchino Mazzurco wrote:
>> The device has two radios:
>>  - 802.11abgn AR9344 SoC, ath9k, working OK
>>  - 802.11ac QCA988x, ath10k, working in AP and STA modes

Interesting device. Can you post more specs, or add to the TOH wiki?

Thanks,
bruno
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From dlin at marvell.com  Sun Jan 11 22:46:21 2015
From: dlin at marvell.com (David Lin)
Date: Sun, 11 Jan 2015 19:46:21 -0800
Subject: [OpenWrt-Devel] Announcement of mac80211 driver support for
 Marvell 88W8864 chip
In-Reply-To: <20141231185440.GC2681@nanopsycho.orion>
References: <689C75E0D210324F8BE88961219F68163F44ECED4A@SC-VEXCH2.marvell.com>
 <20141231185440.GC2681@nanopsycho.orion>
Message-ID: <689C75E0D210324F8BE88961219F68163F45160679@SC-VEXCH2.marvell.com>

Hi Jiri,

	It is always nice to include all needed headers in all .c files. For example when you use skb_queue_head_init please include <linux/skbuff.h>
	Spotted a comment typo in mwl_fwdl.c:
	"This file implements frimware downloa related functions"
	"MODULE_" macros are usually placed by the end of file.

	--> Modifications should be included in next release.

	Drop comments like:
	/* PRIVATE FUNCTION DEFINITION
	*/
	Not needed.

	--> Unless it is really forbidden, I will keep this comment.

	I would suggest you to develop your driver inside net-next git:
	http://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/
	That would save you time during potential forward port need.
	Also, if you use scripts/checkpatch.pl script to check your patches, it will reveal many problems to you. The obvious one is lines longer than 80 chars.
	Module parameters should be always avoided if possible.
	I suggest you make patch against net-next and send it on linux-wireless at vger.kernel.org and netdev at vger.kernel.org mailing lists.
	You will get much more reviewers there.

	--> After major problems reported from community are fixed, I will try to apply patch against net-next as suggested by you. Lines longer than 80 chars and avoiding module parameters would be checked at that time.

	Note: Once if a version is ready for release, I will add patch to https://github.com/kaloz/mwlwifi.

Regards
David

-----Original Message-----
From: Jiri Pirko [mailto:jiri at resnulli.us] 
Sent: Thursday, January 01, 2015 2:55 AM
To: David Lin
Cc: openwrt-devel at lists.openwrt.org; Imre Kaloz
Subject: Re: [OpenWrt-Devel] Announcement of mac80211 driver support for Marvell 88W8864 chip

Wed, Dec 24, 2014 at 05:04:29PM CET, dlin at marvell.com wrote:
>Hi all,
>
>
>
>Marvell is pleased to announce this open source driver for the 88W8864 chip as a joint effort with Linksys.  The 88W8864 features 4x4 MIMO 3-spatial Stream Dual-band 802.11ac enabling 1.3Gbps WLAN PHY rate and support for 80/40/20 MHz channel bandwidths. The 88W8864 is used in the Linksys WRT1900AC and other products.
>
>
>
>Please note that this is an initial release and we plan to send the driver upstream after cleanup.
>
>
>
>We do appreciate your feedback and look forward to serving the community with exciting new offerings in the future!


Hi.

I took a very quick peek at the sources you sent.

First I would like to thank you for taking the upstream way with this.
Much appreciated.

I would suggest you to develop your driver inside net-next git:
http://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/

That would save you time during potential forward port need.

Also, if you use scripts/checkpatch.pl script to check your patches, it will reveal many problems to you. The obvious one is lines longer than 80 chars.

It is always nice to include all needed headers in all .c files. For example when you use skb_queue_head_init please include <linux/skbuff.h>

Spotted a comment typo in mwl_fwdl.c:
"This file implements frimware downloa related functions"

Drop comments like:
/* PRIVATE FUNCTION DEFINITION
*/
Not needed.

"MODULE_" macros are usually placed by the end of file.

Module parameters should be always avoided if possible.


I suggest you make patch against net-next and send it on linux-wireless at vger.kernel.org and netdev at vger.kernel.org mailing lists.
You will get much more reviewers there.


Please do not hesitate to email me in case I can be of any more help.

Thanks!

Jiri

>
>
>
>Thanks, David
>


>_______________________________________________
>openwrt-devel mailing list
>openwrt-devel at lists.openwrt.org
>https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From russell at personaltelco.net  Mon Jan 12 07:33:10 2015
From: russell at personaltelco.net (Russell Senior)
Date: Mon, 12 Jan 2015 04:33:10 -0800
Subject: [OpenWrt-Devel] [PATCH v2 1/3] iproute2: bump version to 3.18.0
In-Reply-To: <54AA61E0.7050606@openwrt.org>
References: <54AA61E0.7050606@openwrt.org>
Message-ID: <1421065992-16733-1-git-send-email-russell@personaltelco.net>

Signed-off-by: Russell Senior <russell at personaltelco.net>
---
 package/network/utils/iproute2/Makefile                  |  6 +++---
 package/network/utils/iproute2/patches/300-ip_tiny.patch | 15 ++++++++-------
 2 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/package/network/utils/iproute2/Makefile b/package/network/utils/iproute2/Makefile
index 9aea05e..a49b061 100644
--- a/package/network/utils/iproute2/Makefile
+++ b/package/network/utils/iproute2/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2014 OpenWrt.org
+# Copyright (C) 2006-2015 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=iproute2
-PKG_VERSION:=3.17.0
+PKG_VERSION:=3.18.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=http://kernel.org/pub/linux/utils/net/iproute2/
-PKG_MD5SUM:=b741a02c6dda5818d18011d572874493
+PKG_MD5SUM:=6f6ad51a00007880460e103367b16057
 PKG_BUILD_PARALLEL:=1
 PKG_LICENSE:=GPL-2.0
 
diff --git a/package/network/utils/iproute2/patches/300-ip_tiny.patch b/package/network/utils/iproute2/patches/300-ip_tiny.patch
index 5b0d56c..3620120 100644
--- a/package/network/utils/iproute2/patches/300-ip_tiny.patch
+++ b/package/network/utils/iproute2/patches/300-ip_tiny.patch
@@ -1,6 +1,6 @@
 --- a/ip/Makefile
 +++ b/ip/Makefile
-@@ -15,6 +15,13 @@ ifeq ($(IP_CONFIG_SETNS),y)
+@@ -16,6 +16,13 @@ ifeq ($(IP_CONFIG_SETNS),y)
  	CFLAGS += -DHAVE_SETNS
  endif
  
@@ -14,7 +14,7 @@
  ALLOBJ=$(IPOBJ) $(RTMONOBJ)
  SCRIPTS=ifcfg rtpr routel routef
  TARGETS=ip rtmon
-@@ -42,7 +49,7 @@ else
+@@ -43,7 +50,7 @@ else
  
  ip: static-syms.o
  static-syms.o: static-syms.h
@@ -25,7 +25,7 @@
  		sed -n '/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:extern char \1[] __attribute__((weak)); if (!strcmp(sym, "\1")) return \1;:;p}' $$files ; \
 --- a/ip/ip.c
 +++ b/ip/ip.c
-@@ -66,29 +66,41 @@ static const struct cmd {
+@@ -69,30 +69,42 @@ static const struct cmd {
  	int (*func)(int argc, char **argv);
  } cmds[] = {
  	{ "address",	do_ipaddr },
@@ -44,6 +44,7 @@
  	{ "link",	do_iplink },
 +#ifndef IPROUTE2_TINY
  	{ "l2tp",	do_ipl2tp },
+	{ "fou",	do_ipfou },
 +#endif
  	{ "tunnel",	do_iptunnel },
  	{ "tunl",	do_iptunnel },
@@ -69,7 +70,7 @@
  };
 --- a/lib/utils.c
 +++ b/lib/utils.c
-@@ -627,6 +627,7 @@ const char *rt_addr_n2a(int af, int len,
+@@ -629,6 +629,7 @@ const char *rt_addr_n2a(int af, const vo
  	case AF_INET:
  	case AF_INET6:
  		return inet_ntop(af, addr, buf, buflen);
@@ -77,7 +78,7 @@
  	case AF_IPX:
  		return ipx_ntop(af, addr, buf, buflen);
  	case AF_DECnet:
-@@ -635,6 +636,7 @@ const char *rt_addr_n2a(int af, int len,
+@@ -637,6 +638,7 @@ const char *rt_addr_n2a(int af, const vo
  		memcpy(dna.a_addr, addr, 2);
  		return dnet_ntop(af, &dna, buf, buflen);
  	}
@@ -85,7 +86,7 @@
  	default:
  		return "???";
  	}
-@@ -710,6 +712,7 @@ const char *format_host(int af, int len,
+@@ -712,6 +714,7 @@ const char *format_host(int af, int len,
  			case AF_INET6:
  				len = 16;
  				break;
@@ -93,7 +94,7 @@
  			case AF_IPX:
  				len = 10;
  				break;
-@@ -720,6 +723,7 @@ const char *format_host(int af, int len,
+@@ -722,6 +725,7 @@ const char *format_host(int af, int len,
  				len = 2;
  				break;
  #endif
-- 
2.1.3
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From russell at personaltelco.net  Mon Jan 12 07:33:11 2015
From: russell at personaltelco.net (Russell Senior)
Date: Mon, 12 Jan 2015 04:33:11 -0800
Subject: [OpenWrt-Devel] [PATCH v2 2/3] iproute2: fix header problem for musl
In-Reply-To: <1421065992-16733-1-git-send-email-russell@personaltelco.net>
References: <54AA61E0.7050606@openwrt.org>
 <1421065992-16733-1-git-send-email-russell@personaltelco.net>
Message-ID: <1421065992-16733-2-git-send-email-russell@personaltelco.net>

iproute2 includes "sanitized" linux kernel headers, which work fine for uClibc, however
with musl there is some header conflict, principally some ipv6 structure redefinition.  This
patch removes <linux/in6.h> from include/linux/if_bridge.h to solve the problem.

Signed-off-by: Russell Senior <russell at personaltelco.net>
---
 .../utils/iproute2/patches/910-sanitize_headers_for_musl.patch | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 package/network/utils/iproute2/patches/910-sanitize_headers_for_musl.patch

diff --git a/package/network/utils/iproute2/patches/910-sanitize_headers_for_musl.patch b/package/network/utils/iproute2/patches/910-sanitize_headers_for_musl.patch
new file mode 100644
index 0000000..ca1125d
--- /dev/null
+++ b/package/network/utils/iproute2/patches/910-sanitize_headers_for_musl.patch
@@ -0,0 +1,10 @@
+--- a/include/linux/if_bridge.h
++++ b/include/linux/if_bridge.h
+@@ -15,7 +15,6 @@
+ 
+ #include <linux/types.h>
+ #include <linux/if_ether.h>
+-#include <linux/in6.h>
+ 
+ #define SYSFS_BRIDGE_ATTR	"bridge"
+ #define SYSFS_BRIDGE_FDB	"brforward"
-- 
2.1.3
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From russell at personaltelco.net  Mon Jan 12 07:33:12 2015
From: russell at personaltelco.net (Russell Senior)
Date: Mon, 12 Jan 2015 04:33:12 -0800
Subject: [OpenWrt-Devel] [PATCH v2 3/3] iproute2: add package for bridge
	program
In-Reply-To: <1421065992-16733-1-git-send-email-russell@personaltelco.net>
References: <54AA61E0.7050606@openwrt.org>
 <1421065992-16733-1-git-send-email-russell@personaltelco.net>
Message-ID: <1421065992-16733-3-git-send-email-russell@personaltelco.net>

The 'bridge' program has been part of iproute2 for a while, and it was once
declared[1] to the the intended longterm replacement for bridge-utils, but
its features are still mostly distinct[2] from the venerable brctl.

[1] http://lwn.net/Articles/435845/
[2] http://sgros-students.blogspot.com/2013/11/comparison-of-brctl-and-bridge-commands.html

Signed-off-by: Russell Senior <russell at personaltelco.net>
---
 package/network/utils/iproute2/Makefile | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/package/network/utils/iproute2/Makefile b/package/network/utils/iproute2/Makefile
index a49b061..ad14ac4 100644
--- a/package/network/utils/iproute2/Makefile
+++ b/package/network/utils/iproute2/Makefile
@@ -58,6 +58,11 @@ $(call Package/iproute2/Default)
   TITLE:=General netlink utility frontend
 endef
 
+define Package/ip-bridge
+$(call Package/iproute2/Default)
+  TITLE:=Bridge configuration utility from iproute2
+endef
+
 define Package/ss
 $(call Package/iproute2/Default)
   TITLE:=Socket statistics utility
@@ -130,6 +135,11 @@ define Package/genl/install
 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/genl/genl $(1)/usr/sbin/
 endef
 
+define Package/ip-bridge/install
+	$(INSTALL_DIR) $(1)/usr/sbin
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/bridge/bridge $(1)/usr/sbin/
+endef
+
 define Package/ss/install
 	$(INSTALL_DIR) $(1)/usr/sbin
 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/misc/ss $(1)/usr/sbin/
@@ -139,4 +149,5 @@ $(eval $(call BuildPackage,ip))
 $(eval $(call BuildPackage,ip-full))
 $(eval $(call BuildPackage,tc))
 $(eval $(call BuildPackage,genl))
+$(eval $(call BuildPackage,ip-bridge))
 $(eval $(call BuildPackage,ss))
-- 
2.1.3
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From rogerpueyo at gmail.com  Mon Jan 12 07:36:53 2015
From: rogerpueyo at gmail.com (Roger Pueyo Centelles)
Date: Mon, 12 Jan 2015 13:36:53 +0100
Subject: [OpenWrt-Devel] [PATCH] [ar71xx] Add support for MERCURY
	MAC1200R
In-Reply-To: <54B30571.3070408@einfach.org>
References: <1420976894-12794-1-git-send-email-openwrt@rogerpueyo.com>
 <1452815.uI1v7X2ClP@giomium>
 <CAPH4JEJJe+LHtRT2LER02zgnFZC3ft2wyeo27YsgtJ8Q7DKuVQ@mail.gmail.com>
 <1854798.rQ8Qqp3W33@giomium> <54B30571.3070408@einfach.org>
Message-ID: <CAPH4JE+xguGa-WHP6QWwDya_SQD4vJL5hf6SHeu0X6enDw_SxA@mail.gmail.com>

Hi,

Please check http://wiki.openwrt.org/toh/mercury/mac1200r

Regards,

Roger

2015-01-12 0:21 GMT+01:00 Bruno Randolf <br1 at einfach.org>:

> On 01/11/2015 09:25 PM, Gioacchino Mazzurco wrote:
> >> The device has two radios:
> >>  - 802.11abgn AR9344 SoC, ath9k, working OK
> >>  - 802.11ac QCA988x, ath10k, working in AP and STA modes
>
> Interesting device. Can you post more specs, or add to the TOH wiki?
>
> Thanks,
> bruno
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150112/0fd55ff5/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From dedeckeh at gmail.com  Mon Jan 12 14:07:55 2015
From: dedeckeh at gmail.com (Hans Dedecker)
Date: Mon, 12 Jan 2015 20:07:55 +0100
Subject: [OpenWrt-Devel] [PATCH] netifd: Make interface identifier of
	delegated IPv6 address configurable
Message-ID: <1421089675-4961-1-git-send-email-dedeckeh@gmail.com>

The ip6ifaceid UCI interface parameter makes the interface identifier of the delegated IPv6 address configurable.
The parameter can have the following values:
    eui64 : Interface identifier is generated from the interface's MAC address
    random : Interface identifier is generated randomly
    fixed value : Interface identifier is a fixed value (eg ::1:2)

The latter is the default value with a fixed value of ::1 for backwards compatibility

Signed-off-by: Hans Dedecker <dedeckeh at gmail.com>
Signed-off-by: Joeri Barbarien <joeri.barbarien at gmail.com>

---
 interface-ip.c | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++---
 interface-ip.h |  1 +
 interface.c    | 35 +++++++++++++++++++++++++++++++
 interface.h    |  8 +++++++
 4 files changed, 107 insertions(+), 3 deletions(-)

diff --git a/interface-ip.c b/interface-ip.c
index 6659f8b..1a22ce6 100644
--- a/interface-ip.c
+++ b/interface-ip.c
@@ -648,6 +648,56 @@ interface_update_host_route(struct vlist_tree *tree,
 	}
 }
 
+static void
+random_ifaceid(struct in6_addr *addr)
+{
+	static bool initialized = false;
+	struct timeval t;
+
+	if (!initialized) {
+		long int seed = 0;
+		gettimeofday(&t, NULL);
+		seed = t.tv_sec ^ t.tv_usec ^ getpid();
+		srand48(seed);
+		initialized = true;
+	}
+	addr->s6_addr32[2] = (uint32_t)mrand48();
+	addr->s6_addr32[3] = (uint32_t)mrand48();
+}
+
+static void
+eui64_ifaceid(struct interface *iface, struct in6_addr *addr)
+{
+	/* get mac address */
+	uint8_t *macaddr = iface->l3_dev.dev->settings.macaddr;
+	uint8_t *ifaceid = addr->s6_addr + 8;
+	memcpy(ifaceid,macaddr,3);
+	memcpy(ifaceid + 5,macaddr + 3, 3);
+	ifaceid[3] = 0xff;
+	ifaceid[4] = 0xfe;
+	ifaceid[0] ^= 0x02;
+}
+
+static void
+generate_ifaceid(struct interface *iface, struct in6_addr *addr)
+{
+	/* generate new iface id */
+	switch (iface->assignment_iface_id_selection) {
+	case IFID_FIXED:
+		/* fixed */
+		/* copy host part from assignment_fixed_iface_id */
+		memcpy(addr->s6_addr + 8, iface->assignment_fixed_iface_id.s6_addr + 8, 8);
+		break;
+	case IFID_RANDOM:
+		/* randomize last 64 bits */
+		random_ifaceid(addr);
+		break;
+	case IFID_EUI64:
+		/* eui64 */
+		eui64_ifaceid(iface, addr);
+		break;
+	}
+}
 
 static void
 interface_set_prefix_address(struct device_prefix_assignment *assignment,
@@ -661,9 +711,16 @@ interface_set_prefix_address(struct device_prefix_assignment *assignment,
 
 	struct device_addr addr;
 	memset(&addr, 0, sizeof(addr));
-	addr.addr.in6 = prefix->addr;
-	addr.addr.in6.s6_addr32[1] |= htonl(assignment->assigned);
-	addr.addr.in6.s6_addr[15] += 1;
+
+	if (IN6_IS_ADDR_UNSPECIFIED(&assignment->addr)) {
+		addr.addr.in6 = prefix->addr;
+		addr.addr.in6.s6_addr32[1] |= htonl(assignment->assigned);
+		generate_ifaceid(iface, &addr.addr.in6);
+		assignment->addr = addr.addr.in6;
+	}
+	else
+		addr.addr.in6 = assignment->addr;
+
 	addr.mask = assignment->length;
 	addr.flags = DEVADDR_INET6;
 	addr.preferred_until = prefix->preferred_until;
@@ -775,6 +832,7 @@ static void interface_update_prefix_assignments(struct device_prefix *prefix, bo
 	c->assigned = 1 << (64 - prefix->length);
 	c->length = 64;
 	c->name[0] = 0;
+	c->addr = in6addr_any;
 	list_add(&c->head, &prefix->assignments);
 
 	// Excluded prefix
@@ -784,6 +842,7 @@ static void interface_update_prefix_assignments(struct device_prefix *prefix, bo
 		c->assigned = ntohl(prefix->excl_addr.s6_addr32[1]) &
 				((1 << (64 - prefix->length)) - 1);
 		c->length = prefix->excl_length;
+		c->addr = in6addr_any;
 		memcpy(c->name, name, sizeof(name));
 		list_add(&c->head, &prefix->assignments);
 	}
@@ -815,6 +874,7 @@ static void interface_update_prefix_assignments(struct device_prefix *prefix, bo
 		c = malloc(sizeof(*c) + namelen);
 		c->length = iface->assignment_length;
 		c->assigned = iface->assignment_hint;
+		c->addr = in6addr_any;
 		c->enabled = false;
 		memcpy(c->name, iface->name, namelen);
 
diff --git a/interface-ip.h b/interface-ip.h
index a5612e5..7c4a8ae 100644
--- a/interface-ip.h
+++ b/interface-ip.h
@@ -59,6 +59,7 @@ struct device_prefix_assignment {
 	struct list_head head;
 	int32_t assigned;
 	uint8_t length;
+	struct in6_addr addr;
 	bool enabled;
 	char name[];
 };
diff --git a/interface.c b/interface.c
index 83d7f94..4ab2431 100644
--- a/interface.c
+++ b/interface.c
@@ -43,6 +43,7 @@ enum {
 	IFACE_ATTR_IP6TABLE,
 	IFACE_ATTR_IP6CLASS,
 	IFACE_ATTR_DELEGATE,
+	IFACE_ATTR_IP6IFACEID,
 	IFACE_ATTR_FORCE_LINK,
 	IFACE_ATTR_MAX
 };
@@ -63,6 +64,7 @@ static const struct blobmsg_policy iface_attrs[IFACE_ATTR_MAX] = {
 	[IFACE_ATTR_IP6TABLE] = { .name = "ip6table", .type = BLOBMSG_TYPE_STRING },
 	[IFACE_ATTR_IP6CLASS] = { .name = "ip6class", .type = BLOBMSG_TYPE_ARRAY },
 	[IFACE_ATTR_DELEGATE] = { .name = "delegate", .type = BLOBMSG_TYPE_BOOL },
+	[IFACE_ATTR_IP6IFACEID] = { .name = "ip6ifaceid", .type = BLOBMSG_TYPE_STRING },
 	[IFACE_ATTR_FORCE_LINK] = { .name = "force_link", .type = BLOBMSG_TYPE_BOOL },
 };
 
@@ -423,6 +425,10 @@ interface_merge_assignment_data(struct interface *old, struct interface *new)
 {
 	bool changed = (old->assignment_hint != new->assignment_hint ||
 			old->assignment_length != new->assignment_length ||
+			old->assignment_iface_id_selection != new->assignment_iface_id_selection ||
+			(old->assignment_iface_id_selection == IFID_FIXED &&
+			 memcmp(&old->assignment_fixed_iface_id, &new->assignment_fixed_iface_id,
+				sizeof(old->assignment_fixed_iface_id))) ||
 			list_empty(&old->assignment_classes) != list_empty(&new->assignment_classes));
 
 	struct interface_assignment_class *c;
@@ -455,6 +461,8 @@ interface_merge_assignment_data(struct interface *old, struct interface *new)
 	if (changed) {
 		old->assignment_hint = new->assignment_hint;
 		old->assignment_length = new->assignment_length;
+		old->assignment_iface_id_selection = new->assignment_iface_id_selection;
+		old->assignment_fixed_iface_id = new->assignment_fixed_iface_id;
 		interface_refresh_assignments(true);
 	}
 }
@@ -703,6 +711,33 @@ interface_alloc(const char *name, struct blob_attr *config)
 	if ((cur = tb[IFACE_ATTR_IP6ASSIGN]))
 		iface->assignment_length = blobmsg_get_u32(cur);
 
+	/* defaults */
+	iface->assignment_iface_id_selection = IFID_FIXED;
+	iface->assignment_fixed_iface_id = in6addr_any;
+	iface->assignment_fixed_iface_id.s6_addr[15] = 1;
+
+	if ((cur = tb[IFACE_ATTR_IP6IFACEID])) {
+		const char *ifaceid = blobmsg_data(cur);
+		if (!strcmp(ifaceid, "random")) {
+			iface->assignment_iface_id_selection = IFID_RANDOM;
+		}
+		else if (!strcmp(ifaceid, "eui64")) {
+			iface->assignment_iface_id_selection = IFID_EUI64;
+		}
+		else {
+			/* we expect an IPv6 address with network id zero here -> fixed iface id
+			   if we cannot parse -> revert to iface id 1 */
+			if (inet_pton(AF_INET6,ifaceid,&iface->assignment_fixed_iface_id) != 1 ||
+					iface->assignment_fixed_iface_id.s6_addr32[0] != 0 ||
+					iface->assignment_fixed_iface_id.s6_addr32[1] != 0) {
+				iface->assignment_fixed_iface_id = in6addr_any;
+				iface->assignment_fixed_iface_id.s6_addr[15] = 1;
+				netifd_log_message(L_WARNING, "Failed to parse ip6ifaceid for interface '%s', \
+							falling back to iface id 1.\n", iface->name);
+			}
+		}
+	}
+
 	iface->assignment_hint = -1;
 	if ((cur = tb[IFACE_ATTR_IP6HINT]))
 		iface->assignment_hint = strtol(blobmsg_get_string(cur), NULL, 16) &
diff --git a/interface.h b/interface.h
index 90087fc..8eeb7db 100644
--- a/interface.h
+++ b/interface.h
@@ -41,6 +41,12 @@ enum interface_config_state {
 	IFC_REMOVE
 };
 
+enum interface_id_selection_type {
+	IFID_FIXED,
+	IFID_RANDOM,
+	IFID_EUI64
+};
+
 enum interface_update_flags {
 	IUF_ADDRESS	= (1 << 0),
 	IUF_ROUTE	= (1 << 1),
@@ -139,6 +145,8 @@ struct interface {
 	unsigned int ip6table;
 
 	/* IPv6 assignment parameters */
+	enum interface_id_selection_type assignment_iface_id_selection;
+	struct in6_addr assignment_fixed_iface_id;
 	uint8_t assignment_length;
 	int32_t assignment_hint;
 	struct list_head assignment_classes;
-- 
1.9.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From hkallweit1 at gmail.com  Mon Jan 12 14:16:28 2015
From: hkallweit1 at gmail.com (Heiner Kallweit)
Date: Mon, 12 Jan 2015 20:16:28 +0100
Subject: [OpenWrt-Devel] [PATCH 0/6] ar8216: patch series for AR8327/AR8337
Message-ID: <54B41D8C.1090201@gmail.com>

Patches 1-3 are improvements w/o functional change.

Patches 4 allows to control EEE PHY sleep mode per port via swconfig.
Motivation is that as workaround for issues with certain link partners
EEE was disabled in general.
Still the default is to initially disable EEE on all ports, however the
brave now have the option to enable EEE on selected ports.

Patch 5 displays autonegotiated EEE capabilities as part of the get_link
attribute. Note that enabling/disabling PHY EEE sleep mode is independent
of autonegotiated EEE capabilities. Even if PHY EEE sleep mode is disabled
the switch advertises EEE capabilities to the link partner.
This might still allow the link partner to sleep if network is inactive.

Patch 6 displays autonegotiated rx/tx flow control as part of the get_link
attribute. So far this was the case in forced mode only.

Heiner Kallweit (6):
  ar8216: define all switch_addr structs as const
  ar8216: replace ar8xxx_rmw with ar8xxx_reg_set where appropriate
  ar8216: introduce ar8xxx_reg_clear complementing ar8xxx_reg_set
  ar8216: introduce enable_eee swconfig attribute to control 802.3az EEE per port
  ar8216: add 802.3az EEE info to swconfig get_link attribute
  ar8216: display flow control info in swconfig get_link in case of autonegatiation too

 .../linux/generic/files/drivers/net/phy/ar8216.c   |  60 ++++---
 .../linux/generic/files/drivers/net/phy/ar8216.h   |  18 +++
 .../linux/generic/files/drivers/net/phy/ar8327.c   | 175 ++++++++++++++++++---
 .../linux/generic/files/drivers/net/phy/ar8327.h   |   5 +
 .../linux/generic/files/drivers/net/phy/swconfig.c |   4 +-
 target/linux/generic/files/include/linux/switch.h  |   2 +
 6 files changed, 216 insertions(+), 48 deletions(-)

-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From hkallweit1 at gmail.com  Mon Jan 12 14:16:39 2015
From: hkallweit1 at gmail.com (Heiner Kallweit)
Date: Mon, 12 Jan 2015 20:16:39 +0100
Subject: [OpenWrt-Devel] [PATCH 1/6] ar8216: define all switch_addr structs
	as const
Message-ID: <54B41D97.6030701@gmail.com>

Define all switch_addr structs as const.

Signed-off-by: Heiner Kallweit <hkallweit1 at gmail.com>
---
 target/linux/generic/files/drivers/net/phy/ar8216.c | 6 +++---
 target/linux/generic/files/drivers/net/phy/ar8327.c | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c
index b88e9ec..906dc7a 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.c
@@ -1277,7 +1277,7 @@ unlock:
 	return ret;
 }
 
-static struct switch_attr ar8xxx_sw_attr_globals[] = {
+static const struct switch_attr ar8xxx_sw_attr_globals[] = {
 	{
 		.type = SWITCH_TYPE_INT,
 		.name = "enable_vlan",
@@ -1326,7 +1326,7 @@ static struct switch_attr ar8xxx_sw_attr_globals[] = {
  	},
 };
 
-struct switch_attr ar8xxx_sw_attr_port[2] = {
+const struct switch_attr ar8xxx_sw_attr_port[2] = {
 	{
 		.type = SWITCH_TYPE_NOVAL,
 		.name = "reset_mib",
@@ -1342,7 +1342,7 @@ struct switch_attr ar8xxx_sw_attr_port[2] = {
 	},
 };
 
-struct switch_attr ar8xxx_sw_attr_vlan[1] = {
+const struct switch_attr ar8xxx_sw_attr_vlan[1] = {
 	{
 		.type = SWITCH_TYPE_INT,
 		.name = "vid",
diff --git a/target/linux/generic/files/drivers/net/phy/ar8327.c b/target/linux/generic/files/drivers/net/phy/ar8327.c
index 77ee4bf..38c11cb 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8327.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8327.c
@@ -30,8 +30,8 @@
 #include "ar8327.h"
 
 extern const struct ar8xxx_mib_desc ar8236_mibs[39];
-extern struct switch_attr ar8xxx_sw_attr_port[2];
-extern struct switch_attr ar8xxx_sw_attr_vlan[1];
+extern const struct switch_attr ar8xxx_sw_attr_port[2];
+extern const struct switch_attr ar8xxx_sw_attr_vlan[1];
 
 static u32
 ar8327_get_pad_cfg(struct ar8327_pad_cfg *cfg)
@@ -896,7 +896,7 @@ ar8327_set_mirror_regs(struct ar8xxx_priv *priv)
 			   AR8327_PORT_HOL_CTRL1_EG_MIRROR_EN);
 }
 
-static struct switch_attr ar8327_sw_attr_globals[] = {
+static const struct switch_attr ar8327_sw_attr_globals[] = {
 	{
 		.type = SWITCH_TYPE_INT,
 		.name = "enable_vlan",
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From hkallweit1 at gmail.com  Mon Jan 12 14:16:48 2015
From: hkallweit1 at gmail.com (Heiner Kallweit)
Date: Mon, 12 Jan 2015 20:16:48 +0100
Subject: [OpenWrt-Devel] [PATCH 2/6] ar8216: replace ar8xxx_rmw with
 ar8xxx_reg_set where appropriate
Message-ID: <54B41DA0.5080903@gmail.com>

Replace ar8xxx_rmw with ar8xxx_reg_set where appropriate.

Signed-off-by: Heiner Kallweit <hkallweit1 at gmail.com>
---
 target/linux/generic/files/drivers/net/phy/ar8216.c | 13 +++++--------
 target/linux/generic/files/drivers/net/phy/ar8327.c |  6 ++----
 2 files changed, 7 insertions(+), 12 deletions(-)

diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c
index 906dc7a..76dfcf4 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.c
@@ -742,12 +742,11 @@ ar8236_init_globals(struct ar8xxx_priv *priv)
 		   AR8316_GCTRL_MTU, 9018 + 8 + 2);
 
 	/* enable cpu port to receive arp frames */
-	ar8xxx_rmw(priv, AR8216_REG_ATU_CTRL,
-		   AR8236_ATU_CTRL_RES, AR8236_ATU_CTRL_RES);
+	ar8xxx_reg_set(priv, AR8216_REG_ATU_CTRL,
+		   AR8236_ATU_CTRL_RES);
 
 	/* enable cpu port to receive multicast and broadcast frames */
-	ar8xxx_rmw(priv, AR8216_REG_FLOOD_MASK,
-		   AR8236_FM_CPU_BROADCAST_EN | AR8236_FM_CPU_BCAST_FWD_EN,
+	ar8xxx_reg_set(priv, AR8216_REG_FLOOD_MASK,
 		   AR8236_FM_CPU_BROADCAST_EN | AR8236_FM_CPU_BCAST_FWD_EN);
 
 	/* Enable MIB counters */
@@ -979,13 +978,11 @@ ar8216_set_mirror_regs(struct ar8xxx_priv *priv)
 		   (priv->monitor_port << AR8216_GLOBAL_CPUPORT_MIRROR_PORT_S));
 
 	if (priv->mirror_rx)
-		ar8xxx_rmw(priv, AR8216_REG_PORT_CTRL(priv->source_port),
-			   AR8216_PORT_CTRL_MIRROR_RX,
+		ar8xxx_reg_set(priv, AR8216_REG_PORT_CTRL(priv->source_port),
 			   AR8216_PORT_CTRL_MIRROR_RX);
 
 	if (priv->mirror_tx)
-		ar8xxx_rmw(priv, AR8216_REG_PORT_CTRL(priv->source_port),
-			   AR8216_PORT_CTRL_MIRROR_TX,
+		ar8xxx_reg_set(priv, AR8216_REG_PORT_CTRL(priv->source_port),
 			   AR8216_PORT_CTRL_MIRROR_TX);
 }
 
diff --git a/target/linux/generic/files/drivers/net/phy/ar8327.c b/target/linux/generic/files/drivers/net/phy/ar8327.c
index 38c11cb..b69c33b 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8327.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8327.c
@@ -886,13 +886,11 @@ ar8327_set_mirror_regs(struct ar8xxx_priv *priv)
 		   (priv->monitor_port << AR8327_FWD_CTRL0_MIRROR_PORT_S));
 
 	if (priv->mirror_rx)
-		ar8xxx_rmw(priv, AR8327_REG_PORT_LOOKUP(priv->source_port),
-			   AR8327_PORT_LOOKUP_ING_MIRROR_EN,
+		ar8xxx_reg_set(priv, AR8327_REG_PORT_LOOKUP(priv->source_port),
 			   AR8327_PORT_LOOKUP_ING_MIRROR_EN);
 
 	if (priv->mirror_tx)
-		ar8xxx_rmw(priv, AR8327_REG_PORT_HOL_CTRL1(priv->source_port),
-			   AR8327_PORT_HOL_CTRL1_EG_MIRROR_EN,
+		ar8xxx_reg_set(priv, AR8327_REG_PORT_HOL_CTRL1(priv->source_port),
 			   AR8327_PORT_HOL_CTRL1_EG_MIRROR_EN);
 }
 
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From hkallweit1 at gmail.com  Mon Jan 12 14:16:59 2015
From: hkallweit1 at gmail.com (Heiner Kallweit)
Date: Mon, 12 Jan 2015 20:16:59 +0100
Subject: [OpenWrt-Devel] [PATCH 3/6] ar8216: introduce ar8xxx_reg_clear
	complementing ar8xxx_reg_set
Message-ID: <54B41DAB.5050504@gmail.com>

Introduce ar8xxx_reg_clear complementing ar8xxx_reg_set.

Signed-off-by: Heiner Kallweit <hkallweit1 at gmail.com>
---
 target/linux/generic/files/drivers/net/phy/ar8216.c | 10 ++++------
 target/linux/generic/files/drivers/net/phy/ar8216.h |  6 ++++++
 target/linux/generic/files/drivers/net/phy/ar8327.c | 10 ++++------
 3 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c
index 76dfcf4..2fd4425 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.c
@@ -957,13 +957,11 @@ ar8216_set_mirror_regs(struct ar8xxx_priv *priv)
 		   AR8216_GLOBAL_CPUPORT_MIRROR_PORT,
 		   (0xF << AR8216_GLOBAL_CPUPORT_MIRROR_PORT_S));
 	for (port = 0; port < AR8216_NUM_PORTS; port++) {
-		ar8xxx_rmw(priv, AR8216_REG_PORT_CTRL(port),
-			   AR8216_PORT_CTRL_MIRROR_RX,
-			   0);
+		ar8xxx_reg_clear(priv, AR8216_REG_PORT_CTRL(port),
+			   AR8216_PORT_CTRL_MIRROR_RX);
 
-		ar8xxx_rmw(priv, AR8216_REG_PORT_CTRL(port),
-			   AR8216_PORT_CTRL_MIRROR_TX,
-			   0);
+		ar8xxx_reg_clear(priv, AR8216_REG_PORT_CTRL(port),
+			   AR8216_PORT_CTRL_MIRROR_TX);
 	}
 
 	/* now enable mirroring if necessary */
diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.h b/target/linux/generic/files/drivers/net/phy/ar8216.h
index 50f2252..d3d0443 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.h
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.h
@@ -536,4 +536,10 @@ ar8xxx_reg_set(struct ar8xxx_priv *priv, int reg, u32 val)
 	ar8xxx_rmw(priv, reg, 0, val);
 }
 
+static inline void
+ar8xxx_reg_clear(struct ar8xxx_priv *priv, int reg, u32 val)
+{
+	ar8xxx_rmw(priv, reg, val, 0);
+}
+
 #endif
diff --git a/target/linux/generic/files/drivers/net/phy/ar8327.c b/target/linux/generic/files/drivers/net/phy/ar8327.c
index b69c33b..f6d07c1 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8327.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8327.c
@@ -865,13 +865,11 @@ ar8327_set_mirror_regs(struct ar8xxx_priv *priv)
 		   AR8327_FWD_CTRL0_MIRROR_PORT,
 		   (0xF << AR8327_FWD_CTRL0_MIRROR_PORT_S));
 	for (port = 0; port < AR8327_NUM_PORTS; port++) {
-		ar8xxx_rmw(priv, AR8327_REG_PORT_LOOKUP(port),
-			   AR8327_PORT_LOOKUP_ING_MIRROR_EN,
-			   0);
+		ar8xxx_reg_clear(priv, AR8327_REG_PORT_LOOKUP(port),
+			   AR8327_PORT_LOOKUP_ING_MIRROR_EN);
 
-		ar8xxx_rmw(priv, AR8327_REG_PORT_HOL_CTRL1(port),
-			   AR8327_PORT_HOL_CTRL1_EG_MIRROR_EN,
-			   0);
+		ar8xxx_reg_clear(priv, AR8327_REG_PORT_HOL_CTRL1(port),
+			   AR8327_PORT_HOL_CTRL1_EG_MIRROR_EN);
 	}
 
 	/* now enable mirroring if necessary */
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From hkallweit1 at gmail.com  Mon Jan 12 14:17:19 2015
From: hkallweit1 at gmail.com (Heiner Kallweit)
Date: Mon, 12 Jan 2015 20:17:19 +0100
Subject: [OpenWrt-Devel] [PATCH 4/6] ar8216: introduce enable_eee swconfig
 attribute to control 802.3az EEE per port
Message-ID: <54B41DBF.5030108@gmail.com>

Users reported network issues with AR8327 which turned out to be caused
by EEE not working correctly with certain link partners (ticket 14597).
The workaround was to disable EEE on all ports (changeset 41577).

The issue was with certain link partners only, therefore this patch
allows to control usage of EEE per port via swconfig.
Still the default is to initially disable EEE on all ports.

Successfully tested on a TL-WDR4900 (AR8327 rev.4)

Signed-off-by: Heiner Kallweit <hkallweit1 at gmail.com>
---
 .../linux/generic/files/drivers/net/phy/ar8216.c   |  14 ++-
 .../linux/generic/files/drivers/net/phy/ar8216.h   |   9 ++
 .../linux/generic/files/drivers/net/phy/ar8327.c   | 113 ++++++++++++++++++---
 .../linux/generic/files/drivers/net/phy/ar8327.h   |   3 +
 4 files changed, 122 insertions(+), 17 deletions(-)

diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c
index 2fd4425..99d0e82 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.c
@@ -1041,6 +1041,7 @@ int
 ar8xxx_sw_reset_switch(struct switch_dev *dev)
 {
 	struct ar8xxx_priv *priv = swdev_to_ar8xxx(dev);
+	const struct ar8xxx_chip *chip = priv->chip;
 	int i;
 
 	mutex_lock(&priv->reg_mutex);
@@ -1052,18 +1053,18 @@ ar8xxx_sw_reset_switch(struct switch_dev *dev)
 
 	/* Configure all ports */
 	for (i = 0; i < dev->ports; i++)
-		priv->chip->init_port(priv, i);
+		chip->init_port(priv, i);
 
 	priv->mirror_rx = false;
 	priv->mirror_tx = false;
 	priv->source_port = 0;
 	priv->monitor_port = 0;
 
-	priv->chip->init_globals(priv);
+	chip->init_globals(priv);
 
 	mutex_unlock(&priv->reg_mutex);
 
-	return ar8xxx_sw_hw_apply(dev);
+	return chip->sw_hw_apply(dev);
 }
 
 int
@@ -1194,7 +1195,7 @@ ar8xxx_sw_get_mirror_source_port(struct switch_dev *dev,
 	return 0;
 }
 
-static int
+int
 ar8xxx_sw_set_port_reset_mib(struct switch_dev *dev,
 			     const struct switch_attr *attr,
 			     struct switch_val *val)
@@ -1224,7 +1225,7 @@ unlock:
 	return ret;
 }
 
-static int
+int
 ar8xxx_sw_get_port_mib(struct switch_dev *dev,
 		       const struct switch_attr *attr,
 		       struct switch_val *val)
@@ -1390,6 +1391,7 @@ static const struct ar8xxx_chip ar8216_chip = {
 	.vtu_flush = ar8216_vtu_flush,
 	.vtu_load_vlan = ar8216_vtu_load_vlan,
 	.set_mirror_regs = ar8216_set_mirror_regs,
+	.sw_hw_apply = ar8xxx_sw_hw_apply,
 
 	.num_mibs = ARRAY_SIZE(ar8216_mibs),
 	.mib_decs = ar8216_mibs,
@@ -1416,6 +1418,7 @@ static const struct ar8xxx_chip ar8236_chip = {
 	.vtu_flush = ar8216_vtu_flush,
 	.vtu_load_vlan = ar8216_vtu_load_vlan,
 	.set_mirror_regs = ar8216_set_mirror_regs,
+	.sw_hw_apply = ar8xxx_sw_hw_apply,
 
 	.num_mibs = ARRAY_SIZE(ar8236_mibs),
 	.mib_decs = ar8236_mibs,
@@ -1442,6 +1445,7 @@ static const struct ar8xxx_chip ar8316_chip = {
 	.vtu_flush = ar8216_vtu_flush,
 	.vtu_load_vlan = ar8216_vtu_load_vlan,
 	.set_mirror_regs = ar8216_set_mirror_regs,
+	.sw_hw_apply = ar8xxx_sw_hw_apply,
 
 	.num_mibs = ARRAY_SIZE(ar8236_mibs),
 	.mib_decs = ar8236_mibs,
diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.h b/target/linux/generic/files/drivers/net/phy/ar8216.h
index d3d0443..4089a17 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.h
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.h
@@ -371,6 +371,7 @@ struct ar8xxx_chip {
 	void (*vtu_load_vlan)(struct ar8xxx_priv *priv, u32 vid, u32 port_mask);
 	void (*phy_fixup)(struct ar8xxx_priv *priv, int phy);
 	void (*set_mirror_regs)(struct ar8xxx_priv *priv);
+	int (*sw_hw_apply)(struct switch_dev *dev);
 
 	const struct ar8xxx_mib_desc *mib_decs;
 	unsigned num_mibs;
@@ -487,6 +488,14 @@ int
 ar8xxx_sw_get_port_link(struct switch_dev *dev, int port,
 			struct switch_port_link *link);
 int
+ar8xxx_sw_set_port_reset_mib(struct switch_dev *dev,
+                             const struct switch_attr *attr,
+                             struct switch_val *val);
+int
+ar8xxx_sw_get_port_mib(struct switch_dev *dev,
+                       const struct switch_attr *attr,
+                       struct switch_val *val);
+int
 ar8216_wait_bit(struct ar8xxx_priv *priv, int reg, u32 mask, u32 val);
 
 static inline struct ar8xxx_priv *
diff --git a/target/linux/generic/files/drivers/net/phy/ar8327.c b/target/linux/generic/files/drivers/net/phy/ar8327.c
index f6d07c1..0971f80 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8327.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8327.c
@@ -30,7 +30,6 @@
 #include "ar8327.h"
 
 extern const struct ar8xxx_mib_desc ar8236_mibs[39];
-extern const struct switch_attr ar8xxx_sw_attr_port[2];
 extern const struct switch_attr ar8xxx_sw_attr_vlan[1];
 
 static u32
@@ -651,7 +650,9 @@ ar8327_cleanup(struct ar8xxx_priv *priv)
 static void
 ar8327_init_globals(struct ar8xxx_priv *priv)
 {
+	struct ar8327_data *data = priv->chip_data;
 	u32 t;
+	int i;
 
 	/* enable CPU port and disable mirror port */
 	t = AR8327_FWD_CTRL0_CPU_PORT_EN |
@@ -672,14 +673,9 @@ ar8327_init_globals(struct ar8xxx_priv *priv)
 	ar8xxx_reg_set(priv, AR8327_REG_MODULE_EN,
 		       AR8327_MODULE_EN_MIB);
 
-	/* Disable EEE on all ports due to stability issues */
-	t = ar8xxx_read(priv, AR8327_REG_EEE_CTRL);
-	t |= AR8327_EEE_CTRL_DISABLE_PHY(0) |
-	     AR8327_EEE_CTRL_DISABLE_PHY(1) |
-	     AR8327_EEE_CTRL_DISABLE_PHY(2) |
-	     AR8327_EEE_CTRL_DISABLE_PHY(3) |
-	     AR8327_EEE_CTRL_DISABLE_PHY(4);
-	ar8xxx_write(priv, AR8327_REG_EEE_CTRL, t);
+	/* Disable EEE on all phy's due to stability issues */
+	for (i = 0; i < AR8XXX_NUM_PHYS; i++)
+		data->eee[i] = false;
 }
 
 static void
@@ -892,6 +888,73 @@ ar8327_set_mirror_regs(struct ar8xxx_priv *priv)
 			   AR8327_PORT_HOL_CTRL1_EG_MIRROR_EN);
 }
 
+static int
+ar8327_sw_set_eee(struct switch_dev *dev,
+		  const struct switch_attr *attr,
+		  struct switch_val *val)
+{
+	struct ar8xxx_priv *priv = swdev_to_ar8xxx(dev);
+	struct ar8327_data *data = priv->chip_data;
+	int port = val->port_vlan;
+	int phy;
+
+	if (port >= dev->ports)
+		return -EINVAL;
+	if (port == 0 || port == 6)
+		return -EOPNOTSUPP;
+
+	phy = port - 1;
+
+	data->eee[phy] = !!(val->value.i);
+
+	return 0;
+}
+
+static int
+ar8327_sw_get_eee(struct switch_dev *dev,
+		  const struct switch_attr *attr,
+		  struct switch_val *val)
+{
+	struct ar8xxx_priv *priv = swdev_to_ar8xxx(dev);
+	const struct ar8327_data *data = priv->chip_data;
+	int port = val->port_vlan;
+	int phy;
+
+	if (port >= dev->ports)
+		return -EINVAL;
+	if (port == 0 || port == 6)
+		return -EOPNOTSUPP;
+
+	phy = port - 1;
+
+	val->value.i = data->eee[phy];
+
+	return 0;
+}
+
+static int
+ar8327_sw_hw_apply(struct switch_dev *dev)
+{
+	struct ar8xxx_priv *priv = swdev_to_ar8xxx(dev);
+	const struct ar8327_data *data = priv->chip_data;
+	int ret, i;
+
+	ret = ar8xxx_sw_hw_apply(dev);
+	if (ret)
+		return ret;
+
+	for (i=0; i < AR8XXX_NUM_PHYS; i++) {
+		if (data->eee[i])
+			ar8xxx_reg_clear(priv, AR8327_REG_EEE_CTRL,
+			       AR8327_EEE_CTRL_DISABLE_PHY(i));
+		else
+			ar8xxx_reg_set(priv, AR8327_REG_EEE_CTRL,
+			       AR8327_EEE_CTRL_DISABLE_PHY(i));
+	}
+
+	return 0;
+}
+
 static const struct switch_attr ar8327_sw_attr_globals[] = {
 	{
 		.type = SWITCH_TYPE_INT,
@@ -941,14 +1004,38 @@ static const struct switch_attr ar8327_sw_attr_globals[] = {
  	},
 };
 
+static const struct switch_attr ar8327_sw_attr_port[] = {
+	{
+		.type = SWITCH_TYPE_NOVAL,
+		.name = "reset_mib",
+		.description = "Reset single port MIB counters",
+		.set = ar8xxx_sw_set_port_reset_mib,
+	},
+	{
+		.type = SWITCH_TYPE_STRING,
+		.name = "mib",
+		.description = "Get port's MIB counters",
+		.set = NULL,
+		.get = ar8xxx_sw_get_port_mib,
+	},
+	{
+		.type = SWITCH_TYPE_INT,
+		.name = "enable_eee",
+		.description = "Enable EEE PHY sleep mode",
+		.set = ar8327_sw_set_eee,
+		.get = ar8327_sw_get_eee,
+		.max = 1,
+	},
+};
+
 static const struct switch_dev_ops ar8327_sw_ops = {
 	.attr_global = {
 		.attr = ar8327_sw_attr_globals,
 		.n_attr = ARRAY_SIZE(ar8327_sw_attr_globals),
 	},
 	.attr_port = {
-		.attr = ar8xxx_sw_attr_port,
-		.n_attr = ARRAY_SIZE(ar8xxx_sw_attr_port),
+		.attr = ar8327_sw_attr_port,
+		.n_attr = ARRAY_SIZE(ar8327_sw_attr_port),
 	},
 	.attr_vlan = {
 		.attr = ar8xxx_sw_attr_vlan,
@@ -958,7 +1045,7 @@ static const struct switch_dev_ops ar8327_sw_ops = {
 	.set_port_pvid = ar8xxx_sw_set_pvid,
 	.get_vlan_ports = ar8327_sw_get_ports,
 	.set_vlan_ports = ar8327_sw_set_ports,
-	.apply_config = ar8xxx_sw_hw_apply,
+	.apply_config = ar8327_sw_hw_apply,
 	.reset_switch = ar8xxx_sw_reset_switch,
 	.get_port_link = ar8xxx_sw_get_port_link,
 };
@@ -987,6 +1074,7 @@ const struct ar8xxx_chip ar8327_chip = {
 	.vtu_load_vlan = ar8327_vtu_load_vlan,
 	.phy_fixup = ar8327_phy_fixup,
 	.set_mirror_regs = ar8327_set_mirror_regs,
+	.sw_hw_apply = ar8327_sw_hw_apply,
 
 	.num_mibs = ARRAY_SIZE(ar8236_mibs),
 	.mib_decs = ar8236_mibs,
@@ -1017,6 +1105,7 @@ const struct ar8xxx_chip ar8337_chip = {
 	.vtu_load_vlan = ar8327_vtu_load_vlan,
 	.phy_fixup = ar8327_phy_fixup,
 	.set_mirror_regs = ar8327_set_mirror_regs,
+	.sw_hw_apply = ar8327_sw_hw_apply,
 
 	.num_mibs = ARRAY_SIZE(ar8236_mibs),
 	.mib_decs = ar8236_mibs,
diff --git a/target/linux/generic/files/drivers/net/phy/ar8327.h b/target/linux/generic/files/drivers/net/phy/ar8327.h
index c606972..1877f00 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8327.h
+++ b/target/linux/generic/files/drivers/net/phy/ar8327.h
@@ -219,6 +219,9 @@ struct ar8327_data {
 
 	struct ar8327_led **leds;
 	unsigned int num_leds;
+
+	/* all fields below are cleared on reset */
+	bool eee[AR8XXX_NUM_PHYS];
 };
 
 #endif
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From hkallweit1 at gmail.com  Mon Jan 12 14:18:21 2015
From: hkallweit1 at gmail.com (Heiner Kallweit)
Date: Mon, 12 Jan 2015 20:18:21 +0100
Subject: [OpenWrt-Devel] [PATCH 5/6] ar8216: add 802.3az EEE info to
	swconfig get_link attribute
Message-ID: <54B41DFD.8060305@gmail.com>

AR8327/AR8337 allow to read the result of EEE autonegotiation.
If EEE is autonegotiated between the link partners, display
this as part of the swconfig get_link attribute.

eee100:  100MBit EEE supported by both link partners
eee1000: 1GBit EEE supported by both link partners

Signed-off-by: Heiner Kallweit <hkallweit1 at gmail.com>
---
 .../linux/generic/files/drivers/net/phy/ar8216.c   | 17 +++++++++++++++
 .../linux/generic/files/drivers/net/phy/ar8216.h   |  3 +++
 .../linux/generic/files/drivers/net/phy/ar8327.c   | 24 ++++++++++++++++++++++
 .../linux/generic/files/drivers/net/phy/swconfig.c |  4 +++-
 target/linux/generic/files/include/linux/switch.h  |  2 ++
 5 files changed, 49 insertions(+), 1 deletion(-)

diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c
index 99d0e82..90484d6 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.c
@@ -332,6 +332,20 @@ ar8xxx_phy_mmd_write(struct ar8xxx_priv *priv, int phy_addr, u16 addr, u16 data)
 	mutex_unlock(&bus->mdio_lock);
 }
 
+u16
+ar8xxx_phy_mmd_read(struct ar8xxx_priv *priv, int phy_addr, u16 addr)
+{
+	struct mii_bus *bus = priv->mii_bus;
+	u16 data;
+
+	mutex_lock(&bus->mdio_lock);
+	bus->write(bus, phy_addr, MII_ATH_MMD_ADDR, addr);
+	data = bus->read(bus, phy_addr, MII_ATH_MMD_DATA);
+	mutex_unlock(&bus->mdio_lock);
+
+	return data;
+}
+
 static int
 ar8xxx_reg_wait(struct ar8xxx_priv *priv, u32 reg, u32 mask, u32 val,
 		unsigned timeout)
@@ -453,6 +467,9 @@ ar8216_read_port_link(struct ar8xxx_priv *priv, int port,
 	link->tx_flow = !!(status & AR8216_PORT_STATUS_TXFLOW);
 	link->rx_flow = !!(status & AR8216_PORT_STATUS_RXFLOW);
 
+	if (link->aneg && link->duplex && priv->chip->read_port_eee_status)
+		link->eee = priv->chip->read_port_eee_status(priv, port);
+
 	speed = (status & AR8216_PORT_STATUS_SPEED) >>
 		 AR8216_PORT_STATUS_SPEED_S;
 
diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.h b/target/linux/generic/files/drivers/net/phy/ar8216.h
index 4089a17..8487c3e 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.h
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.h
@@ -366,6 +366,7 @@ struct ar8xxx_chip {
 	void (*init_port)(struct ar8xxx_priv *priv, int port);
 	void (*setup_port)(struct ar8xxx_priv *priv, int port, u32 members);
 	u32 (*read_port_status)(struct ar8xxx_priv *priv, int port);
+	u32 (*read_port_eee_status)(struct ar8xxx_priv *priv, int port);
 	int (*atu_flush)(struct ar8xxx_priv *priv);
 	void (*vtu_flush)(struct ar8xxx_priv *priv);
 	void (*vtu_load_vlan)(struct ar8xxx_priv *priv, u32 vid, u32 port_mask);
@@ -432,6 +433,8 @@ ar8xxx_phy_dbg_write(struct ar8xxx_priv *priv, int phy_addr,
 		     u16 dbg_addr, u16 dbg_data);
 void
 ar8xxx_phy_mmd_write(struct ar8xxx_priv *priv, int phy_addr, u16 addr, u16 data);
+u16
+ar8xxx_phy_mmd_read(struct ar8xxx_priv *priv, int phy_addr, u16 addr);
 void
 ar8xxx_phy_init(struct ar8xxx_priv *priv);
 int
diff --git a/target/linux/generic/files/drivers/net/phy/ar8327.c b/target/linux/generic/files/drivers/net/phy/ar8327.c
index 0971f80..c0262d7 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8327.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8327.c
@@ -25,6 +25,7 @@
 #include <linux/workqueue.h>
 #include <linux/of_device.h>
 #include <linux/leds.h>
+#include <linux/mdio.h>
 
 #include "ar8216.h"
 #include "ar8327.h"
@@ -712,6 +713,27 @@ ar8327_read_port_status(struct ar8xxx_priv *priv, int port)
 	return ar8xxx_read(priv, AR8327_REG_PORT_STATUS(port));
 }
 
+static u32
+ar8327_read_port_eee_status(struct ar8xxx_priv *priv, int port)
+{
+	int phy;
+	u16 t;
+
+	if (port >= priv->dev.ports)
+		return 0;
+
+	if (port == 0 || port == 6)
+		return 0;
+
+	phy = port - 1;
+
+	/* EEE Ability Auto-negotiation Result */
+	ar8xxx_phy_mmd_write(priv, phy, 0x7, 0x8000);
+	t = ar8xxx_phy_mmd_read(priv, phy, 0x4007);
+
+	return mmd_eee_adv_to_ethtool_adv_t(t);
+}
+
 static int
 ar8327_atu_flush(struct ar8xxx_priv *priv)
 {
@@ -1069,6 +1091,7 @@ const struct ar8xxx_chip ar8327_chip = {
 	.init_port = ar8327_init_port,
 	.setup_port = ar8327_setup_port,
 	.read_port_status = ar8327_read_port_status,
+	.read_port_eee_status = ar8327_read_port_eee_status,
 	.atu_flush = ar8327_atu_flush,
 	.vtu_flush = ar8327_vtu_flush,
 	.vtu_load_vlan = ar8327_vtu_load_vlan,
@@ -1100,6 +1123,7 @@ const struct ar8xxx_chip ar8337_chip = {
 	.init_port = ar8327_init_port,
 	.setup_port = ar8327_setup_port,
 	.read_port_status = ar8327_read_port_status,
+	.read_port_eee_status = ar8327_read_port_eee_status,
 	.atu_flush = ar8327_atu_flush,
 	.vtu_flush = ar8327_vtu_flush,
 	.vtu_load_vlan = ar8327_vtu_load_vlan,
diff --git a/target/linux/generic/files/drivers/net/phy/swconfig.c b/target/linux/generic/files/drivers/net/phy/swconfig.c
index 4f2df4c..b0ba90d 100644
--- a/target/linux/generic/files/drivers/net/phy/swconfig.c
+++ b/target/linux/generic/files/drivers/net/phy/swconfig.c
@@ -167,12 +167,14 @@ swconfig_get_link(struct switch_dev *dev, const struct switch_attr *attr,
 
 	if (link.link)
 		len = snprintf(dev->buf, sizeof(dev->buf),
-			       "port:%d link:up speed:%s %s-duplex %s%s%s",
+			       "port:%d link:up speed:%s %s-duplex %s%s%s%s%s",
 			       val->port_vlan,
 			       swconfig_speed_str(link.speed),
 			       link.duplex ? "full" : "half",
 			       link.tx_flow ? "txflow " : "",
 			       link.rx_flow ?	"rxflow " : "",
+			       link.eee & ADVERTISED_100baseT_Full ? "eee100 " : "",
+			       link.eee & ADVERTISED_1000baseT_Full ? "eee1000 " : "",
 			       link.aneg ? "auto" : "");
 	else
 		len = snprintf(dev->buf, sizeof(dev->buf), "port:%d link:down",
diff --git a/target/linux/generic/files/include/linux/switch.h b/target/linux/generic/files/include/linux/switch.h
index b53431e..4291364 100644
--- a/target/linux/generic/files/include/linux/switch.h
+++ b/target/linux/generic/files/include/linux/switch.h
@@ -54,6 +54,8 @@ struct switch_port_link {
 	bool tx_flow;
 	bool rx_flow;
 	enum switch_port_speed speed;
+	/* in ethtool adv_t format */
+	u32 eee;
 };
 
 struct switch_port_stats {
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From hkallweit1 at gmail.com  Mon Jan 12 14:18:49 2015
From: hkallweit1 at gmail.com (Heiner Kallweit)
Date: Mon, 12 Jan 2015 20:18:49 +0100
Subject: [OpenWrt-Devel] [PATCH 6/6] ar8216: display flow control info in
 swconfig get_link in case of autonegatiation too
Message-ID: <54B41E19.1090201@gmail.com>

The swconfig get_link attribute (at least) on AR8327/AR8337 doesn't
consider the autonegotiated flow control.
AR8327/AR8337 provide the info about autonegotiated rx/tx flow control
in bits 10 and 11 of the port status register.
Use these values to display info about autonegotiated rx/tx flow
control as part of the get_link attribute.

Successfully tested on TL-WDR4900 (AR8327 rev.4) and
TL-WDR4300 (AR8327 rev.2).

Signed-off-by: Heiner Kallweit <hkallweit1 at gmail.com>
---
 target/linux/generic/files/drivers/net/phy/ar8327.c | 18 +++++++++++++++++-
 target/linux/generic/files/drivers/net/phy/ar8327.h |  2 ++
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/target/linux/generic/files/drivers/net/phy/ar8327.c b/target/linux/generic/files/drivers/net/phy/ar8327.c
index c0262d7..12b825f 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8327.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8327.c
@@ -710,7 +710,23 @@ ar8327_init_port(struct ar8xxx_priv *priv, int port)
 static u32
 ar8327_read_port_status(struct ar8xxx_priv *priv, int port)
 {
-	return ar8xxx_read(priv, AR8327_REG_PORT_STATUS(port));
+	u32 t;
+
+	t = ar8xxx_read(priv, AR8327_REG_PORT_STATUS(port));
+	/* map the flow control autoneg result bits to the flow control bits
+	 * used in forced mode to allow ar8216_read_port_link detect
+	 * flow control properly if autoneg is used
+	 */
+	if (t & AR8216_PORT_STATUS_LINK_UP &&
+	    t & AR8216_PORT_STATUS_LINK_AUTO) {
+		t &= ~(AR8216_PORT_STATUS_TXFLOW | AR8216_PORT_STATUS_RXFLOW);
+		if (t & AR8327_PORT_STATUS_TXFLOW_AUTO)
+			t |= AR8216_PORT_STATUS_TXFLOW;
+		if (t & AR8327_PORT_STATUS_RXFLOW_AUTO)
+			t |= AR8216_PORT_STATUS_RXFLOW;
+	}
+
+	return t;
 }
 
 static u32
diff --git a/target/linux/generic/files/drivers/net/phy/ar8327.h b/target/linux/generic/files/drivers/net/phy/ar8327.h
index 1877f00..f0ef013 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8327.h
+++ b/target/linux/generic/files/drivers/net/phy/ar8327.h
@@ -84,6 +84,8 @@
 #define   AR8327_MAX_FRAME_SIZE_MTU		BITS(0, 14)
 
 #define AR8327_REG_PORT_STATUS(_i)		(0x07c + (_i) * 4)
+#define   AR8327_PORT_STATUS_TXFLOW_AUTO	BIT(10)
+#define   AR8327_PORT_STATUS_RXFLOW_AUTO	BIT(11)
 
 #define AR8327_REG_HEADER_CTRL			0x098
 #define AR8327_REG_PORT_HEADER(_i)		(0x09c + (_i) * 4)
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From eschultz at prplfoundation.org  Mon Jan 12 15:36:16 2015
From: eschultz at prplfoundation.org (Eric Schultz)
Date: Mon, 12 Jan 2015 14:36:16 -0600
Subject: [OpenWrt-Devel] [PATCH] Initramfs image copied to bin for malta
	builds
Message-ID: <54B43040.3080402@prplfoundation.org>

Malta ramdisk images are no longer copied to output due to a recent change.
This change reimplements copying of ramdisk images for Malta builds.

Signed-off-by: Eric Schultz <eschultz at prplfoundation.org>
---
 target/linux/malta/image/Makefile | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/target/linux/malta/image/Makefile b/target/linux/malta/image/Makefile
index db2637a..c8f15fd 100644
--- a/target/linux/malta/image/Makefile
+++ b/target/linux/malta/image/Makefile
@@ -37,6 +37,11 @@ define Image/Build/squashfs
     $(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
 endef
 
+define Image/Build/Initramfs
+	cp $(KDIR)/vmlinux-initramfs.elf $(BIN_DIR)/$(IMG_PREFIX)-vmlinux-initramfs.elf
+	cp $(KDIR)/vmlinux-initramfs $(BIN_DIR)/$(IMG_PREFIX)-vmlinux-initramfs.bin
+endef
+
 define Image/Build
 	$(call Image/Build/$(1))
 	dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
-- 
2.1.0
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From wouter at blue-gate.be  Mon Jan 12 16:21:40 2015
From: wouter at blue-gate.be (Wouter Paesen)
Date: Mon, 12 Jan 2015 22:21:40 +0100
Subject: [OpenWrt-Devel] [PATCH] Add kmod-w1-slave-ds2413
Message-ID: <54B43AE4.5070804@blue-gate.be>

This patch adds support for building the ds2413 one-wire kernel module.

Signed-off-by: Wouter Paesen <wouter at blue-gate.be>
--- trunk/package/kernel/linux/modules/w1.mk    (revision 43950)
+++ trunk/package/kernel/linux/modules/w1.mk    (working copy)
@@ -174,3 +174,19 @@
  endef

  $(eval $(call KernelPackage,w1-slave-ds2760))
+
+define KernelPackage/w1-slave-ds2413
+  TITLE:=DS2413 2 Ch. Addressable Switch
+  KCONFIG:= \
+        CONFIG_W1_SLAVE_DS2413
+  FILES:=$(W1_SLAVES_DIR)/w1_ds2413.ko
+  AUTOLOAD:=$(call AutoProbe,w1_ds2413)
+  $(call AddDepends/w1)
+endef
+
+define KernelPackage/w1-slave-ds2413/description
+ Kernel module for 1-wire DS2413 Dual Channel Addressable Switch support
+endef
+
+$(eval $(call KernelPackage,w1-slave-ds2413))
+
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From mark.a.milburn at gmail.com  Mon Jan 12 20:15:20 2015
From: mark.a.milburn at gmail.com (Mark Milburn)
Date: Mon, 12 Jan 2015 18:15:20 -0700
Subject: [OpenWrt-Devel] [PATCH] [mvebu] WRT1900AC set default switch config
Message-ID: <1421111720-18571-1-git-send-email-mark.a.milburn@gmail.com>

Set the default configuration for the switch so that is consistent with how it
was configured by u-Boot.  These changes are essentially identical to:
https://dev.openwrt.org/browser/trunk/target/linux/kirkwood/base-files/etc/uci-defaults/02_network?rev=43750
---
 .../linux/mvebu/base-files/etc/uci-defaults/02_network   | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/target/linux/mvebu/base-files/etc/uci-defaults/02_network b/target/linux/mvebu/base-files/etc/uci-defaults/02_network
index 8b1ed6a..a17b239 100644
--- a/target/linux/mvebu/base-files/etc/uci-defaults/02_network
+++ b/target/linux/mvebu/base-files/etc/uci-defaults/02_network
@@ -7,6 +7,19 @@
 
 touch /etc/config/network
 
+add_port_based_vlan() {
+        local device=$1
+	local vlan=$2
+	local ports=$3
+	uci batch <<EOF
+add network switch_vlan
+set network. at switch_vlan[-1].device='$device'
+set network. at switch_vlan[-1].vlan='$vlan'
+set network. at switch_vlan[-1].ports='$ports'
+set network. at switch_vlan[-1].port_based='1'
+EOF
+}
+
 . /lib/functions/uci-defaults.sh
 . /lib/mvebu.sh
 
@@ -17,6 +30,9 @@ board=$(mvebu_board_name)
 case "$board" in
 armada-xp-mamba)
 	ucidef_set_interfaces_lan_wan "eth0" "eth1"
+	ucidef_add_switch "switch0" "1" "0"
+	add_port_based_vlan "switch0" "1" "0 1 2 3 5"
+	add_port_based_vlan "switch0" "2" "4 6"
 	;;
 
 *)
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From mark.a.milburn at gmail.com  Mon Jan 12 20:20:49 2015
From: mark.a.milburn at gmail.com (mark milburn)
Date: Mon, 12 Jan 2015 18:20:49 -0700
Subject: [OpenWrt-Devel] [PATCH] [mvebu] WRT1900AC set default switch
	config
In-Reply-To: <1421111720-18571-1-git-send-email-mark.a.milburn@gmail.com>
References: <1421111720-18571-1-git-send-email-mark.a.milburn@gmail.com>
Message-ID: <CAFFfgDxrRaeX=+GEgB5fDMj3uPsbdcoRNPEDfrHkvs-hhSe0Lg@mail.gmail.com>

Oops.  forgot to --signoff.  resubmitting.

On Mon, Jan 12, 2015 at 6:15 PM, Mark Milburn <mark.a.milburn at gmail.com> wrote:
> Set the default configuration for the switch so that is consistent with how it
> was configured by u-Boot.  These changes are essentially identical to:
> https://dev.openwrt.org/browser/trunk/target/linux/kirkwood/base-files/etc/uci-defaults/02_network?rev=43750
> ---
>  .../linux/mvebu/base-files/etc/uci-defaults/02_network   | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
>
> diff --git a/target/linux/mvebu/base-files/etc/uci-defaults/02_network b/target/linux/mvebu/base-files/etc/uci-defaults/02_network
> index 8b1ed6a..a17b239 100644
> --- a/target/linux/mvebu/base-files/etc/uci-defaults/02_network
> +++ b/target/linux/mvebu/base-files/etc/uci-defaults/02_network
> @@ -7,6 +7,19 @@
>
>  touch /etc/config/network
>
> +add_port_based_vlan() {
> +        local device=$1
> +       local vlan=$2
> +       local ports=$3
> +       uci batch <<EOF
> +add network switch_vlan
> +set network. at switch_vlan[-1].device='$device'
> +set network. at switch_vlan[-1].vlan='$vlan'
> +set network. at switch_vlan[-1].ports='$ports'
> +set network. at switch_vlan[-1].port_based='1'
> +EOF
> +}
> +
>  . /lib/functions/uci-defaults.sh
>  . /lib/mvebu.sh
>
> @@ -17,6 +30,9 @@ board=$(mvebu_board_name)
>  case "$board" in
>  armada-xp-mamba)
>         ucidef_set_interfaces_lan_wan "eth0" "eth1"
> +       ucidef_add_switch "switch0" "1" "0"
> +       add_port_based_vlan "switch0" "1" "0 1 2 3 5"
> +       add_port_based_vlan "switch0" "2" "4 6"
>         ;;
>
>  *)
> --
> 2.2.1
>
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From mark.a.milburn at gmail.com  Mon Jan 12 20:30:30 2015
From: mark.a.milburn at gmail.com (Mark Milburn)
Date: Mon, 12 Jan 2015 18:30:30 -0700
Subject: [OpenWrt-Devel] [PATCH] [mvebu] WRT1900AC set default switch config
In-Reply-To: <1421111720-18571-1-git-send-email-mark.a.milburn@gmail.com>
References: <1421111720-18571-1-git-send-email-mark.a.milburn@gmail.com>
Message-ID: <1421112630-18804-1-git-send-email-mark.a.milburn@gmail.com>

Set the default configuration for the switch so that is consistent with how it
was configured by u-Boot.  These changes are essentially identical to:
https://dev.openwrt.org/browser/trunk/target/linux/kirkwood/base-files/etc/uci-defaults/02_network?rev=43750

Signed-off-by: Mark Milburn <mark.a.milburn at gmail.com>
---
 .../linux/mvebu/base-files/etc/uci-defaults/02_network   | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/target/linux/mvebu/base-files/etc/uci-defaults/02_network b/target/linux/mvebu/base-files/etc/uci-defaults/02_network
index 8b1ed6a..a17b239 100644
--- a/target/linux/mvebu/base-files/etc/uci-defaults/02_network
+++ b/target/linux/mvebu/base-files/etc/uci-defaults/02_network
@@ -7,6 +7,19 @@
 
 touch /etc/config/network
 
+add_port_based_vlan() {
+        local device=$1
+	local vlan=$2
+	local ports=$3
+	uci batch <<EOF
+add network switch_vlan
+set network. at switch_vlan[-1].device='$device'
+set network. at switch_vlan[-1].vlan='$vlan'
+set network. at switch_vlan[-1].ports='$ports'
+set network. at switch_vlan[-1].port_based='1'
+EOF
+}
+
 . /lib/functions/uci-defaults.sh
 . /lib/mvebu.sh
 
@@ -17,6 +30,9 @@ board=$(mvebu_board_name)
 case "$board" in
 armada-xp-mamba)
 	ucidef_set_interfaces_lan_wan "eth0" "eth1"
+	ucidef_add_switch "switch0" "1" "0"
+	add_port_based_vlan "switch0" "1" "0 1 2 3 5"
+	add_port_based_vlan "switch0" "2" "4 6"
 	;;
 
 *)
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From raven at themaw.net  Mon Jan 12 21:41:12 2015
From: raven at themaw.net (Ian Kent)
Date: Tue, 13 Jan 2015 10:41:12 +0800
Subject: [OpenWrt-Devel] Announcement of mac80211 driver support for
 Marvell 88W8864 chip
In-Reply-To: <689C75E0D210324F8BE88961219F68163F45160679@SC-VEXCH2.marvell.com>
References: <689C75E0D210324F8BE88961219F68163F44ECED4A@SC-VEXCH2.marvell.com>
 <20141231185440.GC2681@nanopsycho.orion>
 <689C75E0D210324F8BE88961219F68163F45160679@SC-VEXCH2.marvell.com>
Message-ID: <1421116872.2707.18.camel@pluto.fritz.box>

Hi David,

Please forgive the top posting.

I don't think that the kernel programming style guidelines recommend
against it and I also don't know if checkpatch.pl will complain about it
but personally I find the additional blank lines in things like the
below actually make the code harder to read:

struct hostcmd_header {

        u16 cmd;
        u16 len;
        u8 seq_num;
        u8 macid;
        u16 result;

} __packed;

and 
        if ((conf->chandef.width == NL80211_CHAN_WIDTH_20_NOHT) ||
            (conf->chandef.width == NL80211_CHAN_WIDTH_20)) {

                width = CH_20_MHz_WIDTH;
                sub_ch = NO_EXT_CHANNEL;

        } else if (conf->chandef.width == NL80211_CHAN_WIDTH_40) {

Certainly we all have own own preferences about what is more readable
for ourselves but please re-consider whether this really does aid
readability.

One other thing to consider about using checkpatch.pl is that the
changes it reports are strongly recommended to be made, based on the
kernel coding style guide, but if you feel strongly about some of the
needed changes you can try and make a case for what you believe aids
readability more so than the recommended changes.

It might not be my place to ask but I'm having some problems with the
driver. I've started to become familiar with the code and, after a
while, may have some questions. This is likely to be a little tedious
for you since mac80211 and wireless is not my area in the kernel. 

Would you mind discussing them here on the list or would you rather me
wait for the next update (don't feel obligated, I'll survive)?

Ian

On Sun, 2015-01-11 at 19:46 -0800, David Lin wrote:
> Hi Jiri,
> 
> 	It is always nice to include all needed headers in all .c files. For example when you use skb_queue_head_init please include <linux/skbuff.h>
> 	Spotted a comment typo in mwl_fwdl.c:
> 	"This file implements frimware downloa related functions"
> 	"MODULE_" macros are usually placed by the end of file.
> 
> 	--> Modifications should be included in next release.
> 
> 	Drop comments like:
> 	/* PRIVATE FUNCTION DEFINITION
> 	*/
> 	Not needed.
> 
> 	--> Unless it is really forbidden, I will keep this comment.
> 
> 	I would suggest you to develop your driver inside net-next git:
> 	http://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/
> 	That would save you time during potential forward port need.
> 	Also, if you use scripts/checkpatch.pl script to check your patches, it will reveal many problems to you. The obvious one is lines longer than 80 chars.
> 	Module parameters should be always avoided if possible.
> 	I suggest you make patch against net-next and send it on linux-wireless at vger.kernel.org and netdev at vger.kernel.org mailing lists.
> 	You will get much more reviewers there.
> 
> 	--> After major problems reported from community are fixed, I will try to apply patch against net-next as suggested by you. Lines longer than 80 chars and avoiding module parameters would be checked at that time.
> 
> 	Note: Once if a version is ready for release, I will add patch to https://github.com/kaloz/mwlwifi.
> 
> Regards
> David
> 
> -----Original Message-----
> From: Jiri Pirko [mailto:jiri at resnulli.us] 
> Sent: Thursday, January 01, 2015 2:55 AM
> To: David Lin
> Cc: openwrt-devel at lists.openwrt.org; Imre Kaloz
> Subject: Re: [OpenWrt-Devel] Announcement of mac80211 driver support for Marvell 88W8864 chip
> 
> Wed, Dec 24, 2014 at 05:04:29PM CET, dlin at marvell.com wrote:
> >Hi all,
> >
> >
> >
> >Marvell is pleased to announce this open source driver for the 88W8864 chip as a joint effort with Linksys.  The 88W8864 features 4x4 MIMO 3-spatial Stream Dual-band 802.11ac enabling 1.3Gbps WLAN PHY rate and support for 80/40/20 MHz channel bandwidths. The 88W8864 is used in the Linksys WRT1900AC and other products.
> >
> >
> >
> >Please note that this is an initial release and we plan to send the driver upstream after cleanup.
> >
> >
> >
> >We do appreciate your feedback and look forward to serving the community with exciting new offerings in the future!
> 
> 
> Hi.
> 
> I took a very quick peek at the sources you sent.
> 
> First I would like to thank you for taking the upstream way with this.
> Much appreciated.
> 
> I would suggest you to develop your driver inside net-next git:
> http://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/
> 
> That would save you time during potential forward port need.
> 
> Also, if you use scripts/checkpatch.pl script to check your patches, it will reveal many problems to you. The obvious one is lines longer than 80 chars.
> 
> It is always nice to include all needed headers in all .c files. For example when you use skb_queue_head_init please include <linux/skbuff.h>
> 
> Spotted a comment typo in mwl_fwdl.c:
> "This file implements frimware downloa related functions"
> 
> Drop comments like:
> /* PRIVATE FUNCTION DEFINITION
> */
> Not needed.
> 
> "MODULE_" macros are usually placed by the end of file.
> 
> Module parameters should be always avoided if possible.
> 
> 
> I suggest you make patch against net-next and send it on linux-wireless at vger.kernel.org and netdev at vger.kernel.org mailing lists.
> You will get much more reviewers there.
> 
> 
> Please do not hesitate to email me in case I can be of any more help.
> 
> Thanks!
> 
> Jiri
> 
> >
> >
> >
> >Thanks, David
> >
> 
> 
> >_______________________________________________
> >openwrt-devel mailing list
> >openwrt-devel at lists.openwrt.org
> >https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From dlin at marvell.com  Mon Jan 12 22:03:12 2015
From: dlin at marvell.com (David Lin)
Date: Mon, 12 Jan 2015 19:03:12 -0800
Subject: [OpenWrt-Devel] Announcement of mac80211 driver support for
 Marvell 88W8864 chip
In-Reply-To: <1421116872.2707.18.camel@pluto.fritz.box>
References: <689C75E0D210324F8BE88961219F68163F44ECED4A@SC-VEXCH2.marvell.com>
 <20141231185440.GC2681@nanopsycho.orion>
 <689C75E0D210324F8BE88961219F68163F45160679@SC-VEXCH2.marvell.com>
 <1421116872.2707.18.camel@pluto.fritz.box>
Message-ID: <689C75E0D210324F8BE88961219F68163F45244A2B@SC-VEXCH2.marvell.com>

Hi Ian,

	1. I will take off these additional blank lines.
	2. I work for problems reported from community. If you do find problems for the driver, please let me know.

Thanks
David

-----Original Message-----
From: Ian Kent [mailto:raven at themaw.net] 
Sent: Tuesday, January 13, 2015 10:41 AM
To: David Lin
Cc: Jiri Pirko; openwrt-devel at lists.openwrt.org; Imre Kaloz
Subject: Re: [OpenWrt-Devel] Announcement of mac80211 driver support for Marvell 88W8864 chip

Hi David,

Please forgive the top posting.

I don't think that the kernel programming style guidelines recommend against it and I also don't know if checkpatch.pl will complain about it but personally I find the additional blank lines in things like the below actually make the code harder to read:

struct hostcmd_header {

        u16 cmd;
        u16 len;
        u8 seq_num;
        u8 macid;
        u16 result;

} __packed;

and 
        if ((conf->chandef.width == NL80211_CHAN_WIDTH_20_NOHT) ||
            (conf->chandef.width == NL80211_CHAN_WIDTH_20)) {

                width = CH_20_MHz_WIDTH;
                sub_ch = NO_EXT_CHANNEL;

        } else if (conf->chandef.width == NL80211_CHAN_WIDTH_40) {

Certainly we all have own own preferences about what is more readable for ourselves but please re-consider whether this really does aid readability.

One other thing to consider about using checkpatch.pl is that the changes it reports are strongly recommended to be made, based on the kernel coding style guide, but if you feel strongly about some of the needed changes you can try and make a case for what you believe aids readability more so than the recommended changes.

It might not be my place to ask but I'm having some problems with the driver. I've started to become familiar with the code and, after a while, may have some questions. This is likely to be a little tedious for you since mac80211 and wireless is not my area in the kernel. 

Would you mind discussing them here on the list or would you rather me wait for the next update (don't feel obligated, I'll survive)?

Ian

On Sun, 2015-01-11 at 19:46 -0800, David Lin wrote:
> Hi Jiri,
> 
> 	It is always nice to include all needed headers in all .c files. For example when you use skb_queue_head_init please include <linux/skbuff.h>
> 	Spotted a comment typo in mwl_fwdl.c:
> 	"This file implements frimware downloa related functions"
> 	"MODULE_" macros are usually placed by the end of file.
> 
> 	--> Modifications should be included in next release.
> 
> 	Drop comments like:
> 	/* PRIVATE FUNCTION DEFINITION
> 	*/
> 	Not needed.
> 
> 	--> Unless it is really forbidden, I will keep this comment.
> 
> 	I would suggest you to develop your driver inside net-next git:
> 	http://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/
> 	That would save you time during potential forward port need.
> 	Also, if you use scripts/checkpatch.pl script to check your patches, it will reveal many problems to you. The obvious one is lines longer than 80 chars.
> 	Module parameters should be always avoided if possible.
> 	I suggest you make patch against net-next and send it on linux-wireless at vger.kernel.org and netdev at vger.kernel.org mailing lists.
> 	You will get much more reviewers there.
> 
> 	--> After major problems reported from community are fixed, I will try to apply patch against net-next as suggested by you. Lines longer than 80 chars and avoiding module parameters would be checked at that time.
> 
> 	Note: Once if a version is ready for release, I will add patch to https://github.com/kaloz/mwlwifi.
> 
> Regards
> David
> 
> -----Original Message-----
> From: Jiri Pirko [mailto:jiri at resnulli.us]
> Sent: Thursday, January 01, 2015 2:55 AM
> To: David Lin
> Cc: openwrt-devel at lists.openwrt.org; Imre Kaloz
> Subject: Re: [OpenWrt-Devel] Announcement of mac80211 driver support 
> for Marvell 88W8864 chip
> 
> Wed, Dec 24, 2014 at 05:04:29PM CET, dlin at marvell.com wrote:
> >Hi all,
> >
> >
> >
> >Marvell is pleased to announce this open source driver for the 88W8864 chip as a joint effort with Linksys.  The 88W8864 features 4x4 MIMO 3-spatial Stream Dual-band 802.11ac enabling 1.3Gbps WLAN PHY rate and support for 80/40/20 MHz channel bandwidths. The 88W8864 is used in the Linksys WRT1900AC and other products.
> >
> >
> >
> >Please note that this is an initial release and we plan to send the driver upstream after cleanup.
> >
> >
> >
> >We do appreciate your feedback and look forward to serving the community with exciting new offerings in the future!
> 
> 
> Hi.
> 
> I took a very quick peek at the sources you sent.
> 
> First I would like to thank you for taking the upstream way with this.
> Much appreciated.
> 
> I would suggest you to develop your driver inside net-next git:
> http://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/
> 
> That would save you time during potential forward port need.
> 
> Also, if you use scripts/checkpatch.pl script to check your patches, it will reveal many problems to you. The obvious one is lines longer than 80 chars.
> 
> It is always nice to include all needed headers in all .c files. For 
> example when you use skb_queue_head_init please include 
> <linux/skbuff.h>
> 
> Spotted a comment typo in mwl_fwdl.c:
> "This file implements frimware downloa related functions"
> 
> Drop comments like:
> /* PRIVATE FUNCTION DEFINITION
> */
> Not needed.
> 
> "MODULE_" macros are usually placed by the end of file.
> 
> Module parameters should be always avoided if possible.
> 
> 
> I suggest you make patch against net-next and send it on linux-wireless at vger.kernel.org and netdev at vger.kernel.org mailing lists.
> You will get much more reviewers there.
> 
> 
> Please do not hesitate to email me in case I can be of any more help.
> 
> Thanks!
> 
> Jiri
> 
> >
> >
> >
> >Thanks, David
> >
> 
> 
> >_______________________________________________
> >openwrt-devel mailing list
> >openwrt-devel at lists.openwrt.org
> >https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From raven at themaw.net  Mon Jan 12 23:07:39 2015
From: raven at themaw.net (Ian Kent)
Date: Tue, 13 Jan 2015 12:07:39 +0800
Subject: [OpenWrt-Devel] Announcement of mac80211 driver support for
 Marvell 88W8864 chip
In-Reply-To: <689C75E0D210324F8BE88961219F68163F45244A2B@SC-VEXCH2.marvell.com>
References: <689C75E0D210324F8BE88961219F68163F44ECED4A@SC-VEXCH2.marvell.com>
 <20141231185440.GC2681@nanopsycho.orion>
 <689C75E0D210324F8BE88961219F68163F45160679@SC-VEXCH2.marvell.com>
 <1421116872.2707.18.camel@pluto.fritz.box>
 <689C75E0D210324F8BE88961219F68163F45244A2B@SC-VEXCH2.marvell.com>
Message-ID: <1421122059.2707.27.camel@pluto.fritz.box>

On Mon, 2015-01-12 at 19:03 -0800, David Lin wrote:
> Hi Ian,
> 
> 	1. I will take off these additional blank lines.
> 	2. I work for problems reported from community. If you do find problems for the driver, please let me know.

Thanks David.

I've posted an issue description at
https://github.com/kaloz/mwlwifi/issues along with the others but,
sadly, I suspect there's really not enough detailed information to work
with in these.

I'm still trying to work out how isr and tasklets work together and how
the locking works within them. I don't have experience with device
drivers since file systems are more my area, actually more the VFS than
anything, necessarily, as I'm the autofs maintainer, ;)

> 
> Thanks
> David
> 
> -----Original Message-----
> From: Ian Kent [mailto:raven at themaw.net] 
> Sent: Tuesday, January 13, 2015 10:41 AM
> To: David Lin
> Cc: Jiri Pirko; openwrt-devel at lists.openwrt.org; Imre Kaloz
> Subject: Re: [OpenWrt-Devel] Announcement of mac80211 driver support for Marvell 88W8864 chip
> 
> Hi David,
> 
> Please forgive the top posting.
> 
> I don't think that the kernel programming style guidelines recommend against it and I also don't know if checkpatch.pl will complain about it but personally I find the additional blank lines in things like the below actually make the code harder to read:
> 
> struct hostcmd_header {
> 
>         u16 cmd;
>         u16 len;
>         u8 seq_num;
>         u8 macid;
>         u16 result;
> 
> } __packed;
> 
> and 
>         if ((conf->chandef.width == NL80211_CHAN_WIDTH_20_NOHT) ||
>             (conf->chandef.width == NL80211_CHAN_WIDTH_20)) {
> 
>                 width = CH_20_MHz_WIDTH;
>                 sub_ch = NO_EXT_CHANNEL;
> 
>         } else if (conf->chandef.width == NL80211_CHAN_WIDTH_40) {
> 
> Certainly we all have own own preferences about what is more readable for ourselves but please re-consider whether this really does aid readability.
> 
> One other thing to consider about using checkpatch.pl is that the changes it reports are strongly recommended to be made, based on the kernel coding style guide, but if you feel strongly about some of the needed changes you can try and make a case for what you believe aids readability more so than the recommended changes.
> 
> It might not be my place to ask but I'm having some problems with the driver. I've started to become familiar with the code and, after a while, may have some questions. This is likely to be a little tedious for you since mac80211 and wireless is not my area in the kernel. 
> 
> Would you mind discussing them here on the list or would you rather me wait for the next update (don't feel obligated, I'll survive)?
> 
> Ian
> 
> On Sun, 2015-01-11 at 19:46 -0800, David Lin wrote:
> > Hi Jiri,
> > 
> > 	It is always nice to include all needed headers in all .c files. For example when you use skb_queue_head_init please include <linux/skbuff.h>
> > 	Spotted a comment typo in mwl_fwdl.c:
> > 	"This file implements frimware downloa related functions"
> > 	"MODULE_" macros are usually placed by the end of file.
> > 
> > 	--> Modifications should be included in next release.
> > 
> > 	Drop comments like:
> > 	/* PRIVATE FUNCTION DEFINITION
> > 	*/
> > 	Not needed.
> > 
> > 	--> Unless it is really forbidden, I will keep this comment.
> > 
> > 	I would suggest you to develop your driver inside net-next git:
> > 	http://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/
> > 	That would save you time during potential forward port need.
> > 	Also, if you use scripts/checkpatch.pl script to check your patches, it will reveal many problems to you. The obvious one is lines longer than 80 chars.
> > 	Module parameters should be always avoided if possible.
> > 	I suggest you make patch against net-next and send it on linux-wireless at vger.kernel.org and netdev at vger.kernel.org mailing lists.
> > 	You will get much more reviewers there.
> > 
> > 	--> After major problems reported from community are fixed, I will try to apply patch against net-next as suggested by you. Lines longer than 80 chars and avoiding module parameters would be checked at that time.
> > 
> > 	Note: Once if a version is ready for release, I will add patch to https://github.com/kaloz/mwlwifi.
> > 
> > Regards
> > David
> > 
> > -----Original Message-----
> > From: Jiri Pirko [mailto:jiri at resnulli.us]
> > Sent: Thursday, January 01, 2015 2:55 AM
> > To: David Lin
> > Cc: openwrt-devel at lists.openwrt.org; Imre Kaloz
> > Subject: Re: [OpenWrt-Devel] Announcement of mac80211 driver support 
> > for Marvell 88W8864 chip
> > 
> > Wed, Dec 24, 2014 at 05:04:29PM CET, dlin at marvell.com wrote:
> > >Hi all,
> > >
> > >
> > >
> > >Marvell is pleased to announce this open source driver for the 88W8864 chip as a joint effort with Linksys.  The 88W8864 features 4x4 MIMO 3-spatial Stream Dual-band 802.11ac enabling 1.3Gbps WLAN PHY rate and support for 80/40/20 MHz channel bandwidths. The 88W8864 is used in the Linksys WRT1900AC and other products.
> > >
> > >
> > >
> > >Please note that this is an initial release and we plan to send the driver upstream after cleanup.
> > >
> > >
> > >
> > >We do appreciate your feedback and look forward to serving the community with exciting new offerings in the future!
> > 
> > 
> > Hi.
> > 
> > I took a very quick peek at the sources you sent.
> > 
> > First I would like to thank you for taking the upstream way with this.
> > Much appreciated.
> > 
> > I would suggest you to develop your driver inside net-next git:
> > http://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/
> > 
> > That would save you time during potential forward port need.
> > 
> > Also, if you use scripts/checkpatch.pl script to check your patches, it will reveal many problems to you. The obvious one is lines longer than 80 chars.
> > 
> > It is always nice to include all needed headers in all .c files. For 
> > example when you use skb_queue_head_init please include 
> > <linux/skbuff.h>
> > 
> > Spotted a comment typo in mwl_fwdl.c:
> > "This file implements frimware downloa related functions"
> > 
> > Drop comments like:
> > /* PRIVATE FUNCTION DEFINITION
> > */
> > Not needed.
> > 
> > "MODULE_" macros are usually placed by the end of file.
> > 
> > Module parameters should be always avoided if possible.
> > 
> > 
> > I suggest you make patch against net-next and send it on linux-wireless at vger.kernel.org and netdev at vger.kernel.org mailing lists.
> > You will get much more reviewers there.
> > 
> > 
> > Please do not hesitate to email me in case I can be of any more help.
> > 
> > Thanks!
> > 
> > Jiri
> > 
> > >
> > >
> > >
> > >Thanks, David
> > >
> > 
> > 
> > >_______________________________________________
> > >openwrt-devel mailing list
> > >openwrt-devel at lists.openwrt.org
> > >https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> > _______________________________________________
> > openwrt-devel mailing list
> > openwrt-devel at lists.openwrt.org
> > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From cat at vv.carleton.ca  Tue Jan 13 00:31:51 2015
From: cat at vv.carleton.ca (Catalin Patulea)
Date: Tue, 13 Jan 2015 00:31:51 -0500
Subject: [OpenWrt-Devel] ddns-scripts 2.0.1-1 breaks freedns.afraid.org?
Message-ID: <CAE2LqH+-uRuHVyRj5vQZTc5sg_-Rdgv38+4THzdHYAxBdPYh0w@mail.gmail.com>

Hi Christian,

I use ddns-scripts with freedns.afraid.org. Here is the service line for it:

#freedns.afraid.org is weird, you just need an update code, for which
we use the password variable
"freedns.afraid.org"
"http://freedns.afraid.org/dynamic/update.php?[PASSWORD]&address=[IP]"

So I was leaving the "username" option empty and setting password to
the "update code". This worked fine. But since 07d3672d, ddns-scripts
now checks that $password is set and fails like this:

Tue Jan 13 00:17:30 2015 user.warn ddns-scripts[3685]: myddns: Service
section not correctly configured! - TERMINATE

Due to this line I think:
https://github.com/openwrt/packages/blob/master/net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_updater.sh#L161

What do you think? Should the check be relaxed?

I can work around it by setting 'username' to an ignored value.. but
that seems ugly.

Catalin
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From cat at vv.carleton.ca  Tue Jan 13 00:53:45 2015
From: cat at vv.carleton.ca (Catalin Patulea)
Date: Tue, 13 Jan 2015 00:53:45 -0500
Subject: [OpenWrt-Devel] ddns-scripts "sleep 10" before updating?
Message-ID: <CAE2LqHL5T0RTVPWuoY73M5bMi_0x1S3KhRb8GpVz0Fkm4Zcp8g@mail.gmail.com>

Hi Christian, curious about something else..

In dynamic_dns_updater.sh there's a "sleep 10":
# we need time here because hotplug.d is fired by netifd
# but IP addresses are not set by DHCP/DHCPv6 etc.
write_log 7 "Waiting 10 seconds for interfaces to fully come up"
sleep 10 &
PID_SLEEP=$!
wait $PID_SLEEP # enable trap-handler
PID_SLEEP=0

https://github.com/openwrt/packages/blob/master/net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_updater.sh#L218

But on my system (trunk r43888) it seems when ifup event comes,
address is already set:

Tue Jan 13 00:46:59 2015 kern.info kernel: [ 2621.360000] eth1: link
up (1000Mbps/Full duplex)
Tue Jan 13 00:46:59 2015 daemon.notice netifd: Network device 'eth1' link is up
Tue Jan 13 00:46:59 2015 daemon.notice netifd: Interface 'wan' has
link connectivity
Tue Jan 13 00:46:59 2015 daemon.notice netifd: Interface 'wan' is setting up now
Tue Jan 13 00:46:59 2015 daemon.notice netifd: wan (9426): udhcpc
(v1.22.1) started
Tue Jan 13 00:46:59 2015 daemon.notice netifd: wan (9426): Sending discover...
Tue Jan 13 00:46:59 2015 daemon.notice netifd: wan (9426): Sending
select for 198.48.205.121...
Tue Jan 13 00:46:59 2015 daemon.notice netifd: wan (9426): Lease of
198.48.205.121 obtained, lease time 69146
Tue Jan 13 00:46:59 2015 daemon.notice netifd: Interface 'wan6' is
setting up now
Tue Jan 13 00:46:59 2015 daemon.notice netifd: Interface 'wan' is now up
Tue Jan 13 00:47:00 2015 user.notice root: hotplug iface: DEVICE=eth1
ACTION=ifup
Tue Jan 13 00:47:00 2015 user.notice root: 3: eth1:
<BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc tbf state UP group
default qlen 1000
Tue Jan 13 00:47:00 2015 user.notice root:     link/ether
10:6f:3f:e7:00:b6 brd ff:ff:ff:ff:ff:ff
Tue Jan 13 00:47:00 2015 user.notice root:     inet 198.48.205.121/27
brd 198.48.205.127 scope global eth1
Tue Jan 13 00:47:00 2015 user.notice root:        valid_lft forever
preferred_lft forever
Tue Jan 13 00:47:00 2015 user.notice root:     inet6
fe80::126f:3fff:fee7:b6/64 scope link
Tue Jan 13 00:47:00 2015 user.notice root:        valid_lft forever
preferred_lft forever

I added those last few lines using a debug script in
/etc/hotplug.d/iface to see what the state of the interface was.

It would be cool not to sleep I think, so the update happens as soon
as the interface gets an address.

Looking at netifd/DESIGN it says:

Interfaces
----------
[...]
state:
  IFS_SETUP:
    The interface is currently being configured by the protocol handler
  IFS_UP:
    The interface is fully configured

and the scripts in /etc/hotplug.d/iface are called only for IFS_UP, so
I think this behaviour is reliable.

In what case did you see the need for a "sleep 10"?

Catalin
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From mikko.hissa at werzek.com  Tue Jan 13 02:58:37 2015
From: mikko.hissa at werzek.com (Mikko Hissa)
Date: Tue, 13 Jan 2015 09:58:37 +0200
Subject: [OpenWrt-Devel] hostapd disconnects with Apple devices.
Message-ID: <2F3C9E15-9CE4-42C8-A995-C86D2251B46D@werzek.com>

Hi everyone,

If I recall correctly, since June/July 2014, Apple devices get constantly disconnected from AP.
A simple fix is to disable hostapd's disassoc_low_ack. I saw this behaviour on iPads, iPhones, MacBooks, iMacs etc.
Should the default setting be altered?

Best regards,
Mikko
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From jow at openwrt.org  Tue Jan 13 03:05:14 2015
From: jow at openwrt.org (Jo-Philipp Wich)
Date: Tue, 13 Jan 2015 09:05:14 +0100
Subject: [OpenWrt-Devel] ddns-scripts 2.0.1-1 breaks freedns.afraid.org?
In-Reply-To: <CAE2LqH+-uRuHVyRj5vQZTc5sg_-Rdgv38+4THzdHYAxBdPYh0w@mail.gmail.com>
References: <CAE2LqH+-uRuHVyRj5vQZTc5sg_-Rdgv38+4THzdHYAxBdPYh0w@mail.gmail.com>
Message-ID: <54B4D1BA.5060804@openwrt.org>

Hi,

a good solution would be to look what placeholders are used in the
service url template and check if those are all set. So if the url has
no [USERNAME] then option username is not checked either.

Granted, it is a bit harder to implement but would match the
expectations of the common user I guess.

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


From luigi.tarenga at gmail.com  Tue Jan 13 05:42:43 2015
From: luigi.tarenga at gmail.com (Luigi Tarenga)
Date: Tue, 13 Jan 2015 11:42:43 +0100
Subject: [OpenWrt-Devel] [PATCH] added support for TL-WA701ND v2
Message-ID: <CAKkO-EinbAzDt0x+nCmOaxxxyyUCo_prWA1XHd1D5CkT19h0Uw@mail.gmail.com>

hello everybody,
I'm happy to write you my first patch to add support for a new device.

I started from the support for WR703N as template and corrected
the gpio leds and buttons. I remove a couple of command the take
online the USB power (I think is not needed since no USB port is available
and I don't see USB pinout on the board, maybe I will check better).

I hope someone can take a review of this patch and commit it against
the official tree.

There is just one thing I still have to check: return back to original
firmware and see if you can upload the factory image in the firmware
upgrade toolbox and it pass the hwid/verid checks. I think yes since
I used the same values as found in the stock firmware. I will update you
in a couple of day about this. Until now I used uboot to flash it.

looking for your feedback
regards
Luigi

here follow the patch against git 0484ab40b5f6783e1e155f46be3afb4a94d41670  :

Signed-off-by: Luigi Tarenga <luigi.tarenga at gmail.com>
---

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh
b/target/linux/ar71xx/base-files/etc/diag.sh
index fa07f39..eb96338 100755
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -195,6 +195,7 @@ get_status_led() {
     tl-mr3220-v2 | \
     tl-mr3420 | \
     tl-mr3420-v2 | \
+    tl-wa701nd-v2 | \
     tl-wa801nd-v2 | \
     tl-wa901nd | \
     tl-wa901nd-v2 | \
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index 5b9dbe7..51c2bca 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -275,7 +275,11 @@ tl-wa850re)
     ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "tp-link:blue:signal5"
"wlan0" "80" "100" "-79" "13"
     ;;

-tl-wa860re)
+tl-wa701nd-v2 | \
+tl-wa830re-v2 | \
+tl-wa860re | \
+tl-wa801nd-v2 | \
+tl-wa901nd-v3)
     ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
     ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
     ;;
@@ -333,11 +337,6 @@ tl-wr841n-v8)
     ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
     ;;

-tl-wa830re-v2)
-    ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
-    ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
-    ;;
-
 tl-wr841n-v9)
     ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth1"
     ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x10"
@@ -357,12 +356,6 @@ tl-wr842n-v2)
     ucidef_set_led_usbdev "usb" "USB" "tp-link:green:3g" "1-1"
     ;;

-tl-wa801nd-v2 | \
-tl-wa901nd-v3)
-    ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
-    ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
-    ;;
-
 tl-wr941nd | \
 tl-wr1041n-v2)
     ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index c5cfd67..4be30b8 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -301,6 +301,7 @@ tl-mr13u |\
 tl-mr3020 |\
 tl-mr3040 |\
 tl-mr3040-v2 |\
+tl-wa701nd-v2 |\
 tl-wa750re |\
 tl-wa850re |\
 tl-wa830re-v2 |\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 1e96b6d..df35775 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -571,6 +571,9 @@ ar71xx_board_detect() {
     *"TL-MR3420 v2")
         name="tl-mr3420-v2"
         ;;
+    *"TL-WA701ND v2")
+        name="tl-wa701nd-v2"
+        ;;
     *TL-WA750RE)
         name="tl-wa750re"
         ;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 846954c..eeaac6a 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -269,6 +269,7 @@ platform_check_image() {
     tl-mr3220-v2 | \
     tl-mr3420 | \
     tl-mr3420-v2 | \
+    tl-wa701nd-v2 | \
     tl-wa7510n | \
     tl-wa750re | \
     tl-wa850re | \
diff --git a/target/linux/ar71xx/config-3.10 b/target/linux/ar71xx/config-3.10
index 9a8378a..482914a 100644
--- a/target/linux/ar71xx/config-3.10
+++ b/target/linux/ar71xx/config-3.10
@@ -88,6 +88,7 @@ CONFIG_ATH79_MACH_TL_MR11U=y
 CONFIG_ATH79_MACH_TL_MR13U=y
 CONFIG_ATH79_MACH_TL_MR3020=y
 CONFIG_ATH79_MACH_TL_MR3X20=y
+CONFIG_ATH79_MACH_TL_WA701ND_V2=y
 CONFIG_ATH79_MACH_TL_WA830RE_V2=y
 CONFIG_ATH79_MACH_TL_WA901ND=y
 CONFIG_ATH79_MACH_TL_WA901ND_V2=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa701nd-v2.c
b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa701nd-v2.c
new file mode 100644
index 0000000..aab92b3
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa701nd-v2.c
@@ -0,0 +1,116 @@
+/*
+ *  TP-LINK TL-WA701ND v2 board support
+ *
+ *  Copyright (C) 2015 Luigi Tarenga <luigi.tarenga at gmail.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License version 2 as published
+ *  by the Free Software Foundation.
+ */
+
+#include <linux/gpio.h>
+
+#include <asm/mach-ath79/ath79.h>
+
+#include "dev-eth.h"
+#include "dev-gpio-buttons.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-usb.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+
+#define TL_WA701NDV2_GPIO_LED_WLAN    0
+#define TL_WA701NDV2_GPIO_LED_QSS    1
+#define TL_WA701NDV2_GPIO_LED_LAN    17
+#define TL_WA701NDV2_GPIO_LED_SYSTEM    27
+
+#define TL_WA701NDV2_GPIO_BTN_RESET    11
+#define TL_WA701NDV2_GPIO_BTN_QSS    26
+
+#define TL_WA701NDV2_GPIO_USB_POWER    8
+
+#define TL_WA701NDV2_KEYS_POLL_INTERVAL    20    /* msecs */
+#define TL_WA701NDV2_KEYS_DEBOUNCE_INTERVAL    (3 *
TL_WA701NDV2_KEYS_POLL_INTERVAL)
+
+static const char *tl_wa701ndv2_part_probes[] = {
+    "tp-link",
+    NULL,
+};
+
+static struct flash_platform_data tl_wa701ndv2_flash_data = {
+    .part_probes    = tl_wa701ndv2_part_probes,
+};
+
+static struct gpio_led tl_wa701ndv2_leds_gpio[] __initdata = {
+    {
+        .name        = "tp-link:green:wlan",
+        .gpio        = TL_WA701NDV2_GPIO_LED_WLAN,
+        .active_low    = 0,
+    }, {
+        .name        = "tp-link:green:qss",
+        .gpio        = TL_WA701NDV2_GPIO_LED_QSS,
+        .active_low    = 0,
+    }, {
+        .name        = "tp-link:green:lan",
+        .gpio        = TL_WA701NDV2_GPIO_LED_LAN,
+        .active_low    = 1,
+    }, {
+        .name        = "tp-link:green:system",
+        .gpio        = TL_WA701NDV2_GPIO_LED_SYSTEM,
+        .active_low    = 1,
+        }
+};
+
+static struct gpio_keys_button tl_wa701ndv2_gpio_keys[] __initdata = {
+    {
+        .desc        = "reset",
+        .type        = EV_KEY,
+        .code        = KEY_RESTART,
+        .debounce_interval = TL_WA701NDV2_KEYS_DEBOUNCE_INTERVAL,
+        .gpio        = TL_WA701NDV2_GPIO_BTN_RESET,
+        .active_low    = 0,
+    } , {
+                .desc        = "qss",
+                .type        = EV_KEY,
+                .code        = KEY_WPS_BUTTON,
+                .debounce_interval = TL_WA701NDV2_KEYS_DEBOUNCE_INTERVAL,
+                .gpio        = TL_WA701NDV2_GPIO_BTN_QSS,
+                .active_low    = 0,
+        }
+
+};
+
+static void __init tl_wa701ndv2_setup(void)
+{
+    u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
+    u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
+
+    /* disable PHY_SWAP and PHY_ADDR_SWAP bits */
+    ath79_setup_ar933x_phy4_switch(false, false);
+
+    ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wa701ndv2_leds_gpio),
+                 tl_wa701ndv2_leds_gpio);
+
+    ath79_register_gpio_keys_polled(-1, TL_WA701NDV2_KEYS_POLL_INTERVAL,
+                    ARRAY_SIZE(tl_wa701ndv2_gpio_keys),
+                    tl_wa701ndv2_gpio_keys);
+
+    gpio_request_one(TL_WA701NDV2_GPIO_USB_POWER,
+             GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
+             "USB power");
+    ath79_register_usb();
+
+    ath79_register_m25p80(&tl_wa701ndv2_flash_data);
+    ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
+    /* ath79_init_mac(ath79_eth1_data.mac_addr, mac, -1); */
+
+    ath79_register_mdio(0, 0x0);
+    ath79_register_eth(0);
+    ath79_register_eth(1);
+
+    ath79_register_wmac(ee, mac);
+}
+
+MIPS_MACHINE(ATH79_MACH_TL_WA701ND_V2, "TL-WA701ND-v2",
+         "TP-LINK TL-WA701ND v2", tl_wa701ndv2_setup);
diff --git a/target/linux/ar71xx/image/Makefile
b/target/linux/ar71xx/image/Makefile
index 683c238..425fcc5 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -1163,7 +1163,7 @@ $(eval $(call
SingleProfile,TPLINKOLD,squashfs-only,TLWR841NV15,tl-wr841nd-v1.5,
 $(eval $(call SingleProfile,TPLINK,64kraw,RNXN360RT,rnx-n360rt,TL-WR941ND,ttyS0,115200,0x09410002,0x00420001,4M))
 $(eval $(call SingleProfile,TPLINK,64kraw,TLMR3220V1,tl-mr3220-v1,TL-MR3220,ttyS0,115200,0x32200001,1,4M))
 $(eval $(call SingleProfile,TPLINK,64kraw,TLMR3420V1,tl-mr3420-v1,TL-MR3420,ttyS0,115200,0x34200001,1,4M))
-$(eval $(call SingleProfile,TPLINK,64kraw,TLWA701,tl-wa701n-v1,TL-WA901ND,ttyS0,115200,0x07010001,1,4M))
+$(eval $(call SingleProfile,TPLINK,64kraw,TLWA701NV1,tl-wa701n-v1,TL-WA901ND,ttyS0,115200,0x07010001,1,4M))
 $(eval $(call SingleProfile,TPLINK,64kraw,TLWA730REV1,tl-wa730rev1,TL-WA901ND,ttyS0,115200,0x07300001,1,4M))
 $(eval $(call SingleProfile,TPLINK,64kraw,TLWA7510NV1,tl-wa7510n,TL-WA7510N,ttyS0,115200,0x75100001,1,4M))
 $(eval $(call SingleProfile,TPLINK,64kraw,TLWA801NV1,tl-wa801nd-v1,TL-WA901ND,ttyS0,115200,0x08010001,1,4M))
@@ -1199,6 +1199,7 @@ $(eval $(call
SingleProfile,TPLINK-LZMA,64kraw,TLMR3040V1,tl-mr3040-v1,TL-MR3040
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLMR3040V2,tl-mr3040-v2,TL-MR3040-v2,ttyATH0,115200,0x30400002,1,4Mlzma))
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLMR3220V2,tl-mr3220-v2,TL-MR3220-v2,ttyATH0,115200,0x32200002,1,4Mlzma))
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLMR3420V2,tl-mr3420-v2,TL-MR3420-v2,ttyS0,115200,0x34200002,1,4Mlzma))
+$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWA701NV2,tl-wa701nd-v2,TL-WA701ND-v2,ttyATH0,115200,0x07010002,1,4Mlzma))
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR703,tl-wr703n-v1,TL-WR703N,ttyATH0,115200,0x07030101,1,4Mlzma))
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR710,tl-wr710n-v1,TL-WR710N,ttyATH0,115200,0x07100001,1,8Mlzma))
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR720NV3,tl-wr720n-v3,TL-WR720N-v3,ttyATH0,115200,0x07200103,1,4Mlzma))
@@ -1276,6 +1277,7 @@ $(eval $(call MultiProfile,TLMR11U,TLMR11UV1 TLMR11UV2))
 $(eval $(call MultiProfile,TLMR3040,TLMR3040V1 TLMR3040V2))
 $(eval $(call MultiProfile,TLMR3220,TLMR3220V1 TLMR3220V2))
 $(eval $(call MultiProfile,TLMR3420,TLMR3420V1 TLMR3420V2))
+$(eval $(call MultiProfile,TLWA701,TLWA701NV1 TLWA701NV2))
 $(eval $(call MultiProfile,TLWA730RE,TLWA730REV1))
 $(eval $(call MultiProfile,TLWA801,TLWA801NV1 TLWA801NV2))
 $(eval $(call MultiProfile,TLWA830,TLWA830RV1 TLWA830RV2))
diff --git a/target/linux/ar71xx/patches-3.10/729-MIPS-ath79-add-TL-WA701NDv2-support.patch
b/target/linux/ar71xx/patches-3.10/729-MIPS-ath79-add-TL-WA701NDv2-support.patch
new file mode 100644
index 0000000..b0de43f
--- /dev/null
+++ b/target/linux/ar71xx/patches-3.10/729-MIPS-ath79-add-TL-WA701NDv2-support.patch
@@ -0,0 +1,45 @@
+Index: linux-3.10.49/arch/mips/ath79/machtypes.h
+===================================================================
+--- linux-3.10.49.orig/arch/mips/ath79/machtypes.h
++++ linux-3.10.49/arch/mips/ath79/machtypes.h
+@@ -118,6 +118,7 @@ enum ath79_mach_type {
+     ATH79_MACH_TL_MR3220_V2,    /* TP-LINK TL-MR3220 v2 */
+     ATH79_MACH_TL_MR3420,        /* TP-LINK TL-MR3420 */
+     ATH79_MACH_TL_MR3420_V2,    /* TP-LINK TL-MR3420 v2 */
++    ATH79_MACH_TL_WA701ND_V2,    /* TP-LINK TL-WA701ND v2 */
+     ATH79_MACH_TL_WA750RE,        /* TP-LINK TL-WA750RE */
+     ATH79_MACH_TL_WA7510N_V1,    /* TP-LINK TL-WA7510N v1*/
+     ATH79_MACH_TL_WA850RE,        /* TP-LINK TL-WA850RE */
+Index: linux-3.10.49/arch/mips/ath79/Kconfig
+===================================================================
+--- linux-3.10.49.orig/arch/mips/ath79/Kconfig
++++ linux-3.10.49/arch/mips/ath79/Kconfig
+@@ -713,6 +713,16 @@ config ATH79_MACH_TL_MR3X20
+     select ATH79_DEV_M25P80
+     select ATH79_DEV_USB
+
++config ATH79_MACH_TL_WA701ND_V2
++    bool "TP-LINK TL-WA701ND v2 support"
++    select SOC_AR933X
++    select ATH79_DEV_ETH
++    select ATH79_DEV_GPIO_BUTTONS
++    select ATH79_DEV_LEDS_GPIO
++    select ATH79_DEV_M25P80
++    select ATH79_DEV_USB
++    select ATH79_DEV_WMAC
++
+ config ATH79_MACH_TL_WAX50RE
+     bool "TP-LINK TL-WA750/850RE support"
+     select SOC_AR934X
+Index: linux-3.10.49/arch/mips/ath79/Makefile
+===================================================================
+--- linux-3.10.49.orig/arch/mips/ath79/Makefile
++++ linux-3.10.49/arch/mips/ath79/Makefile
+@@ -101,6 +101,7 @@ obj-$(CONFIG_ATH79_MACH_TL_MR11U)    += mac
+ obj-$(CONFIG_ATH79_MACH_TL_MR13U)    += mach-tl-mr13u.o
+ obj-$(CONFIG_ATH79_MACH_TL_MR3020)    += mach-tl-mr3020.o
+ obj-$(CONFIG_ATH79_MACH_TL_MR3X20)    += mach-tl-mr3x20.o
++obj-$(CONFIG_ATH79_MACH_TL_WA701ND_V2)    += mach-tl-wa701nd-v2.o
+ obj-$(CONFIG_ATH79_MACH_TL_WAX50RE)     += mach-tl-wax50re.o
+ obj-$(CONFIG_ATH79_MACH_TL_WA830RE_V2)    += mach-tl-wa830re-v2.o
+ obj-$(CONFIG_ATH79_MACH_TL_WA901ND)    += mach-tl-wa901nd.o
diff --git a/tools/firmware-utils/src/mktplinkfw.c
b/tools/firmware-utils/src/mktplinkfw.c
index a6aab59..0a5e4c3 100644
--- a/tools/firmware-utils/src/mktplinkfw.c
+++ b/tools/firmware-utils/src/mktplinkfw.c
@@ -40,6 +40,7 @@
 #define HWID_TL_MR3420_V1    0x34200001
 #define HWID_TL_MR3420_V2    0x34200002
 #define HWID_TL_WA701N_V1    0x07010001
+#define HWID_TL_WA701N_V2    0x07010002
 #define HWID_TL_WA7510N_V1    0x75100001
 #define HWID_TL_WA801ND_V1    0x08010001
 #define HWID_TL_WA830RE_V1    0x08300010
@@ -254,6 +255,11 @@ static struct board_info boards[] = {
         .hw_rev        = 1,
         .layout_id    = "4M",
     }, {
+        .id        = "TL-WA701Nv2",
+        .hw_id        = HWID_TL_WA701N_V2,
+        .hw_rev        = 1,
+        .layout_id    = "4Mlzma",
+    }, {
         .id        = "TL-WA7510N",
         .hw_id        = HWID_TL_WA7510N_V1,
         .hw_rev        = 1,
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From kim.demey at gmail.com  Tue Jan 13 06:27:39 2015
From: kim.demey at gmail.com (Kim De Mey)
Date: Tue, 13 Jan 2015 12:27:39 +0100
Subject: [OpenWrt-Devel] [PATCH] firewall3: Immediate continue when no
	source is specified as it is used later on (seg fault)
Message-ID: <1421148459-7260-1-git-send-email-kim.demey@gmail.com>

A segmentation fault is currently possible when redir->_src is null and later
the check on redir->_src->masq is done in the line:
if (redir->reflection && redir->_dest && redir->_src->masq)

Proposed fix: continue immediately when redir->_src is null.
---
 redirects.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/redirects.c b/redirects.c
index a30c540..c627607 100644
--- a/redirects.c
+++ b/redirects.c
@@ -306,7 +306,11 @@ fw3_load_redirects(struct fw3_state *state, struct uci_package *p)
 			if (redir->src.any)
 				warn_elem(e, "must not have source '*' for DNAT target");
 			else if (!redir->_src)
+			{
 				warn_elem(e, "has no source specified");
+				fw3_free_redirect(redir);
+				continue;
+			}
 			else
 			{
 				set(redir->_src->flags, FW3_FAMILY_V4, redir->target);
-- 
1.7.9.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From jow at openwrt.org  Tue Jan 13 06:49:27 2015
From: jow at openwrt.org (Jo-Philipp Wich)
Date: Tue, 13 Jan 2015 12:49:27 +0100
Subject: [OpenWrt-Devel] [PATCH] firewall3: Immediate continue when no
 source is specified as it is used later on (seg fault)
In-Reply-To: <1421148459-7260-1-git-send-email-kim.demey@gmail.com>
References: <1421148459-7260-1-git-send-email-kim.demey@gmail.com>
Message-ID: <54B50647.6020209@openwrt.org>

Hi,

thank you for the patch.

Since there already is a generic free further down I decided to move the
offending code blocks into the else clause wich sets valid = true, see
http://nbd.name/gitweb.cgi?p=firewall3.git;a=commit;h=adf87f3a36328b949ed777068b14d975b429f9ad

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


From christian.schoenebeck at gmail.com  Tue Jan 13 08:56:42 2015
From: christian.schoenebeck at gmail.com (Christian Schoenebeck)
Date: Tue, 13 Jan 2015 14:56:42 +0100
Subject: [OpenWrt-Devel] ddns-scripts "sleep 10" before updating?
In-Reply-To: <CAE2LqHL5T0RTVPWuoY73M5bMi_0x1S3KhRb8GpVz0Fkm4Zcp8g@mail.gmail.com>
References: <CAE2LqHL5T0RTVPWuoY73M5bMi_0x1S3KhRb8GpVz0Fkm4Zcp8g@mail.gmail.com>
Message-ID: <54B5241A.2020105@gmail.com>

Hi Catalin,

there might be a change somewhere in the past inside netifd.

When I started creating the scripts I tested with the old scripts and had seen that when the scripts try to detect local IP from the "wan" that it fails because no data available.
from my point of view 10 seconds to wait before sending an update to the ddns provider is not a big deal because it takes up to 5 minutes until "nslookup [yourhost] 8.8.8.8" gives you back a static answer after a change.
So Google's mameserver need up to 5 Minutes to sync themselves.

I'm currently in office, but I will do some additional tests later at home.

Christian
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From luigi.tarenga at gmail.com  Tue Jan 13 09:05:47 2015
From: luigi.tarenga at gmail.com (Luigi Tarenga)
Date: Tue, 13 Jan 2015 15:05:47 +0100
Subject: [OpenWrt-Devel] [PATCH] added support for TL-WA701ND v2
In-Reply-To: <CAKkO-EinbAzDt0x+nCmOaxxxyyUCo_prWA1XHd1D5CkT19h0Uw@mail.gmail.com>
References: <CAKkO-EinbAzDt0x+nCmOaxxxyyUCo_prWA1XHd1D5CkT19h0Uw@mail.gmail.com>
Message-ID: <CAKkO-EjTi-ct79cwYwYeZoDzo_RFHQDMvrS6xwLWfNdZmd1VZg@mail.gmail.com>

> There is just one thing I still have to check: return back to original
> firmware and see if you can upload the factory image in the firmware
> upgrade toolbox and it pass the hwid/verid checks. I think yes since
> I used the same values as found in the stock firmware. I will update you
> in a couple of day about this. Until now I used uboot to flash it.

checked right now, I reverted back to original firmware and from this I'm
able to flash openwrt-ar71xx-generic-tl-wa701nd-v2-squashfs-factory.bin

I forgot to say that I'm working on a TL-701ND v2.2

I wait for any feedback
regards
Luigi
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From kim.demey at gmail.com  Tue Jan 13 09:11:28 2015
From: kim.demey at gmail.com (Kim De Mey)
Date: Tue, 13 Jan 2015 15:11:28 +0100
Subject: [OpenWrt-Devel] [PATCH] firewall3: Immediate continue when no
 source is specified as it is used later on (seg fault)
In-Reply-To: <54B50647.6020209@openwrt.org>
References: <1421148459-7260-1-git-send-email-kim.demey@gmail.com>
 <54B50647.6020209@openwrt.org>
Message-ID: <CAKc2HpYueBVEp_tOOMiiZPAZZ4M70cxok+3EsZwur4G5zN8PGw@mail.gmail.com>

On 13 January 2015 at 12:49, Jo-Philipp Wich <jow at openwrt.org> wrote:
> Hi,
>
> thank you for the patch.
>
> Since there already is a generic free further down I decided to move the
> offending code blocks into the else clause wich sets valid = true, see
> http://nbd.name/gitweb.cgi?p=firewall3.git;a=commit;h=adf87f3a36328b949ed777068b14d975b429f9ad
>
> ~ Jow

Hello,

That looks like a cleaner way to fix it indeed. Thanks!

Kim
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From christian.schoenebeck at gmail.com  Tue Jan 13 09:14:40 2015
From: christian.schoenebeck at gmail.com (Christian Schoenebeck)
Date: Tue, 13 Jan 2015 15:14:40 +0100
Subject: [OpenWrt-Devel] ddns-scripts 2.0.1-1 breaks freedns.afraid.org?
In-Reply-To: <54B4D1BA.5060804@openwrt.org>
References: <CAE2LqH+-uRuHVyRj5vQZTc5sg_-Rdgv38+4THzdHYAxBdPYh0w@mail.gmail.com>
 <54B4D1BA.5060804@openwrt.org>
Message-ID: <54B52850.30708@gmail.com>

I put it on the TODO list.
Thanks for feedback
Christian
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From yilun.zhou at duke.edu  Tue Jan 13 10:06:17 2015
From: yilun.zhou at duke.edu (Yilun Zhou)
Date: Tue, 13 Jan 2015 15:06:17 +0000
Subject: [OpenWrt-Devel] Wrong Network Configuration File Fails Everything
Message-ID: <1421161577637.24486@duke.edu>

Hi,

I am experimenting with OpenWRT Attitude Adjustment on NETGEAR WNDR3800. I accidentally wrote wrong network configuration file and committed it. Now I cannot interact with the router anymore. The wifi is still being created but there is no Internet. I tried to SSH into the router from device that is connected via Ethernet cable or wifi but neither works. Then I did a factory reset following https://forum.openwrt.org/viewtopic.php?pid=148789#p148789 . I can see the Power LED flashing green rapidly so I should be in FailSafe mode. However, I can't telnet into the router. On Windows taskbar (bottom right corner of desktop) I can see that the Ethernet connection is "working in progress" (a circle is rotating in front of the icon). Has anyone experienced this issue before and how can I solve it?

Thanks,

Yilun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150113/672d2ea4/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From maxime.ripard at free-electrons.com  Tue Jan 13 10:56:37 2015
From: maxime.ripard at free-electrons.com (Maxime Ripard)
Date: Tue, 13 Jan 2015 16:56:37 +0100
Subject: [OpenWrt-Devel] [PATCH 0/9] mvebu: Fix flash support and support
	for A38x
Message-ID: <1421164606-3222-1-git-send-email-maxime.ripard@free-electrons.com>

Hi,

This serie aims at finally fixing the already supported mvebu boards
images, since none of them actually work on the boards except for the
WRT1900AC.

This is the follow-up of two previous attempts at doing that:
https://lists.openwrt.org/pipermail/openwrt-devel/2014-October/028593.html
https://lists.openwrt.org/pipermail/openwrt-devel/2014-December/029899.html

This one, yet another approach has been taken, similar to the one used
for the ar71xx, where each profiles are split in a various number of
subprofiles (1-X), each subprofile representing a combination of a DT
name and its associated UBI options.

It builds up on that to then introduce support for two Armada
385-based evaluations boards from Marvell.

Let me know what you think,
Maxime

Maxime Ripard (9):
  mvebu: Replace the padjffs2 call by the generic definition
  mvebu: Switch to the generic mkuimage macro
  kernel: Allow ubi autoattach to run on NOR flash
  mvebu: Add sub-profiles
  mvebu: Add NOR sub-profile implementation
  mvebu: Fix NAND and NOR options
  mvebu: Switch to 3.18
  mvebu: Add the Armada 385 Reference Design support
  mvebu: Add Armada 385 DB AP support

 ...tach-mtd-device-named-ubi-or-data-on-boot.patch |   5 +-
 ...tach-mtd-device-named-ubi-or-data-on-boot.patch |   5 +-
 ...tach-mtd-device-named-ubi-or-data-on-boot.patch |   5 +-
 target/linux/mvebu/Makefile                        |   2 +-
 target/linux/mvebu/image/Makefile                  | 137 ++++++++++---
 ...nctrl-mvebu-a38x-Add-UART1-muxing-options.patch |  43 ++++
 .../013-ARM-mvebu-a38x-Fix-node-names.patch        |  98 +++++++++
 ...M-mvebu-Add-a-number-of-pinctrl-functions.patch |  70 +++++++
 ...dd-Armada-385-Access-Point-Development-Bo.patch | 220 +++++++++++++++++++++
 ...-mvebu-A385-AP-Enable-the-NAND-controller.patch |  39 ++++
 .../020-armada-385-rd-mtd-partitions.patch         |  24 +++
 .../021-ARM-mvebu-385-ap-Add-partitions.patch      |  39 ++++
 12 files changed, 652 insertions(+), 35 deletions(-)
 create mode 100644 target/linux/mvebu/patches-3.18/012-pinctrl-mvebu-a38x-Add-UART1-muxing-options.patch
 create mode 100644 target/linux/mvebu/patches-3.18/013-ARM-mvebu-a38x-Fix-node-names.patch
 create mode 100644 target/linux/mvebu/patches-3.18/014-ARM-mvebu-Add-a-number-of-pinctrl-functions.patch
 create mode 100644 target/linux/mvebu/patches-3.18/015-ARM-mvebu-Add-Armada-385-Access-Point-Development-Bo.patch
 create mode 100644 target/linux/mvebu/patches-3.18/016-ARM-mvebu-A385-AP-Enable-the-NAND-controller.patch
 create mode 100644 target/linux/mvebu/patches-3.18/020-armada-385-rd-mtd-partitions.patch
 create mode 100644 target/linux/mvebu/patches-3.18/021-ARM-mvebu-385-ap-Add-partitions.patch

-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From maxime.ripard at free-electrons.com  Tue Jan 13 10:56:38 2015
From: maxime.ripard at free-electrons.com (Maxime Ripard)
Date: Tue, 13 Jan 2015 16:56:38 +0100
Subject: [OpenWrt-Devel] [PATCH 1/9] mvebu: Replace the padjffs2 call by the
	generic definition
In-Reply-To: <1421164606-3222-1-git-send-email-maxime.ripard@free-electrons.com>
References: <1421164606-3222-1-git-send-email-maxime.ripard@free-electrons.com>
Message-ID: <1421164606-3222-2-git-send-email-maxime.ripard@free-electrons.com>

The mvebu image Makefile directly calls the padjffs2 utility, while there's an
generic make function to do just that. Switch to it

Signed-off-by: Maxime Ripard <maxime.ripard at free-electrons.com>
---
 target/linux/mvebu/image/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/mvebu/image/Makefile b/target/linux/mvebu/image/Makefile
index 92571e215342..f265dc43d25d 100644
--- a/target/linux/mvebu/image/Makefile
+++ b/target/linux/mvebu/image/Makefile
@@ -44,7 +44,7 @@ define Image/BuildKernel
 endef
 
 define Image/Build/squashfs
-	$(STAGING_DIR_HOST)/bin/padjffs2 $(KDIR)/root.squashfs 128
+	$(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
 	$(foreach nandboard,$(NANDBOARDS),$(call Image/Build/UbinizeImage,$(nandboard),,squashfs,$(UBI_OPTS));)
 	( \
 		dd if=$(KDIR)/uImage-armada-xp-mamba bs=3072k conv=sync; \
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From maxime.ripard at free-electrons.com  Tue Jan 13 10:56:39 2015
From: maxime.ripard at free-electrons.com (Maxime Ripard)
Date: Tue, 13 Jan 2015 16:56:39 +0100
Subject: [OpenWrt-Devel] [PATCH 2/9] mvebu: Switch to the generic mkuimage
	macro
In-Reply-To: <1421164606-3222-1-git-send-email-maxime.ripard@free-electrons.com>
References: <1421164606-3222-1-git-send-email-maxime.ripard@free-electrons.com>
Message-ID: <1421164606-3222-3-git-send-email-maxime.ripard@free-electrons.com>

The mvebu image makefile define something almost identical to the generic
implementation found in include/image.mk.

Switch to this implementation.

Signed-off-by: Maxime Ripard <maxime.ripard at free-electrons.com>
---
 target/linux/mvebu/image/Makefile | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/target/linux/mvebu/image/Makefile b/target/linux/mvebu/image/Makefile
index f265dc43d25d..6e00346fe29a 100644
--- a/target/linux/mvebu/image/Makefile
+++ b/target/linux/mvebu/image/Makefile
@@ -24,15 +24,12 @@ KDIR_TMP:=$(KDIR)/tmp
 
 UIMAGE:=$(BIN_DIR)/$(IMG_PREFIX)-uImage
 
-define Image/Build/MkuImage
-	mkimage -A arm -O linux -T kernel -a $(LOADADDR) -C none -e $(LOADADDR) \
-	-n 'ARM OpenWrt Linux-$(LINUX_VERSION)' -d $(1) $(2);
-endef
-
 define Image/Build/DTB
 	cp $(KDIR)/zImage$(2) $(KDIR)/zImage$(2)-$(1);
 	cat $(DTS_DIR)/$(1).dtb >> $(KDIR)/zImage$(2)-$(1);
-	$(call Image/Build/MkuImage,$(KDIR)/zImage$(2)-$(1),$(KDIR)/uImage$(2)-$(1))
+	$(call Image/BuildKernel/MkuImage, \
+		none, $(LOADADDR), $(LOADADDR), \
+		$(KDIR)/zImage$(2)-$(1), $(KDIR)/uImage$(2)-$(1))
 	cp $(KDIR)/uImage$(2)-$(1) $(UIMAGE)$(2)-$(1);
 endef
 
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From maxime.ripard at free-electrons.com  Tue Jan 13 10:56:40 2015
From: maxime.ripard at free-electrons.com (Maxime Ripard)
Date: Tue, 13 Jan 2015 16:56:40 +0100
Subject: [OpenWrt-Devel] [PATCH 3/9] kernel: Allow ubi autoattach to run on
	NOR flash
In-Reply-To: <1421164606-3222-1-git-send-email-maxime.ripard@free-electrons.com>
References: <1421164606-3222-1-git-send-email-maxime.ripard@free-electrons.com>
Message-ID: <1421164606-3222-4-git-send-email-maxime.ripard@free-electrons.com>

Some devices out there only have a NOR flash to store the rootfs on.

While using UBI is arguable on this kind of NAND, this is something that should
be supported.

Signed-off-by: Maxime Ripard <maxime.ripard at free-electrons.com>
---
 .../490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch   | 5 +++--
 .../490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch   | 5 +++--
 .../490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch   | 5 +++--
 3 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/target/linux/generic/patches-3.10/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch b/target/linux/generic/patches-3.10/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch
index 002a79ab73d1..27ed474127b3 100644
--- a/target/linux/generic/patches-3.10/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch
+++ b/target/linux/generic/patches-3.10/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch
@@ -11,7 +11,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 
 --- a/drivers/mtd/ubi/build.c
 +++ b/drivers/mtd/ubi/build.c
-@@ -1207,6 +1207,48 @@ static struct mtd_info * __init open_mtd
+@@ -1207,6 +1207,49 @@ static struct mtd_info * __init open_mtd
  	return mtd;
  }
  
@@ -43,6 +43,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 +
 +		/* auto-add only media types where UBI makes sense */
 +		if (mtd->type == MTD_NANDFLASH ||
++		    mtd->type == MTD_NORFLASH ||
 +		    mtd->type == MTD_DATAFLASH ||
 +		    mtd->type == MTD_MLCNANDFLASH) {
 +			mutex_lock(&ubi_devices_mutex);
@@ -60,7 +61,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  static int __init ubi_init(void)
  {
  	int err, i, k;
-@@ -1290,6 +1332,12 @@ static int __init ubi_init(void)
+@@ -1290,6 +1333,12 @@ static int __init ubi_init(void)
  		}
  	}
  
diff --git a/target/linux/generic/patches-3.14/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch b/target/linux/generic/patches-3.14/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch
index 67600ae97218..d7b20b81f5f2 100644
--- a/target/linux/generic/patches-3.14/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch
+++ b/target/linux/generic/patches-3.14/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch
@@ -11,7 +11,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 
 --- a/drivers/mtd/ubi/build.c
 +++ b/drivers/mtd/ubi/build.c
-@@ -1209,6 +1209,48 @@ static struct mtd_info * __init open_mtd
+@@ -1209,6 +1209,49 @@ static struct mtd_info * __init open_mtd
  	return mtd;
  }
  
@@ -43,6 +43,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 +
 +		/* auto-add only media types where UBI makes sense */
 +		if (mtd->type == MTD_NANDFLASH ||
++		    mtd->type == MTD_NORFLASH ||
 +		    mtd->type == MTD_DATAFLASH ||
 +		    mtd->type == MTD_MLCNANDFLASH) {
 +			mutex_lock(&ubi_devices_mutex);
@@ -60,7 +61,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  static int __init ubi_init(void)
  {
  	int err, i, k;
-@@ -1298,6 +1340,12 @@ static int __init ubi_init(void)
+@@ -1298,6 +1341,12 @@ static int __init ubi_init(void)
  		}
  	}
  
diff --git a/target/linux/generic/patches-3.18/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch b/target/linux/generic/patches-3.18/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch
index 67600ae97218..d7b20b81f5f2 100644
--- a/target/linux/generic/patches-3.18/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch
+++ b/target/linux/generic/patches-3.18/490-ubi-auto-attach-mtd-device-named-ubi-or-data-on-boot.patch
@@ -11,7 +11,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 
 --- a/drivers/mtd/ubi/build.c
 +++ b/drivers/mtd/ubi/build.c
-@@ -1209,6 +1209,48 @@ static struct mtd_info * __init open_mtd
+@@ -1209,6 +1209,49 @@ static struct mtd_info * __init open_mtd
  	return mtd;
  }
  
@@ -43,6 +43,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 +
 +		/* auto-add only media types where UBI makes sense */
 +		if (mtd->type == MTD_NANDFLASH ||
++		    mtd->type == MTD_NORFLASH ||
 +		    mtd->type == MTD_DATAFLASH ||
 +		    mtd->type == MTD_MLCNANDFLASH) {
 +			mutex_lock(&ubi_devices_mutex);
@@ -60,7 +61,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  static int __init ubi_init(void)
  {
  	int err, i, k;
-@@ -1298,6 +1340,12 @@ static int __init ubi_init(void)
+@@ -1298,6 +1341,12 @@ static int __init ubi_init(void)
  		}
  	}
  
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From maxime.ripard at free-electrons.com  Tue Jan 13 10:56:41 2015
From: maxime.ripard at free-electrons.com (Maxime Ripard)
Date: Tue, 13 Jan 2015 16:56:41 +0100
Subject: [OpenWrt-Devel] [PATCH 4/9] mvebu: Add sub-profiles
In-Reply-To: <1421164606-3222-1-git-send-email-maxime.ripard@free-electrons.com>
References: <1421164606-3222-1-git-send-email-maxime.ripard@free-electrons.com>
Message-ID: <1421164606-3222-5-git-send-email-maxime.ripard@free-electrons.com>

In order to support the various board NAND layout that we support, introduce a
sub-profile similar to the one used by ar71xx.

These subprofiles provide a default implementation for most of the building
functions, while allowing each sub-profile to override any of these operations
in order to have a more specific behaviour, like Mamba expects for example.

Signed-off-by: Maxime Ripard <maxime.ripard at free-electrons.com>
---
 target/linux/mvebu/image/Makefile | 96 ++++++++++++++++++++++++++++++---------
 1 file changed, 74 insertions(+), 22 deletions(-)

diff --git a/target/linux/mvebu/image/Makefile b/target/linux/mvebu/image/Makefile
index 6e00346fe29a..0b69d4b38f34 100644
--- a/target/linux/mvebu/image/Makefile
+++ b/target/linux/mvebu/image/Makefile
@@ -7,18 +7,10 @@
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/image.mk
 
-TARGET_DTBS := armada-xp-db armada-370-db armada-xp-openblocks-ax3-4 armada-370-mirabox \
-		armada-370-rd armada-xp-gp armada-xp-mamba
-
-NANDBOARDS := armada-xp-mamba
-
 LOADADDR:=0x00008000
 
 JFFS2_BLOCKSIZE = 128k
 
-UBIFS_OPTS = -F -m 2048 -e 124KiB -c 4096 -U
-UBI_OPTS = -m 2048 -p 128KiB -s 512 -O 2048
-
 KDIR_TMP:=$(KDIR)/tmp
 
 
@@ -33,16 +25,70 @@ define Image/Build/DTB
 	cp $(KDIR)/uImage$(2)-$(1) $(UIMAGE)$(2)-$(1);
 endef
 
-define Image/BuildKernel
-	$(foreach dtb,$(TARGET_DTBS),$(call Image/Build/DTB,$(dtb)))
- ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
-	$(call Image/Build/Initramfs)
- endif
+# $(1): Profile Name
+# $(2): DTB Name
+# $(3): Erase Block Size
+# $(4): Page Size
+# $(5): Sub-Page Size (optional)
+define NANDProfile
+  define Image/BuildKernel/Profile/$(1)
+	$(call Image/Build/DTB,$(2))
+    ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
+	$(call Image/Build/Profile,$(1)/Initramfs)
+    endif
+  endef
+
+  define Image/Build/Profile/$(1)/BuildSysupgrade
+	$(call Image/Build/SysupgradeNAND,$(2),$$(1),$(KDIR)/uImage-$(2))
+  endef
+
+  define Image/Build/Profile/$(1)/Initramfs
+	$(call Image/Build/DTB,$(2),-initramfs)
+  endef
+
+  define Image/Build/Profile/$(1)/squashfs
+	$(call Image/Build/UbinizeImage,$(2),,squashfs, -p $(3) -m $(4) $(if $(5),-s $(5)))
+	cp $(KDIR)/$$(IMG_PREFIX)-$(2)-squashfs-ubinized.bin $(BIN_DIR)
+  endef
+
+  PROFILES_LIST += $(1)
 endef
 
-define Image/Build/squashfs
-	$(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
-	$(foreach nandboard,$(NANDBOARDS),$(call Image/Build/UbinizeImage,$(nandboard),,squashfs,$(UBI_OPTS));)
+# $(1): Profile Name
+# $(2): Sub Profiles list
+define MultiProfile
+  define Image/BuildKernel/Profile/$(1)
+	$(foreach profile, $(2),
+		$(call Image/BuildKernel/Profile/$(profile)))
+  endef
+
+  define Image/Build/Profile/$(1)/BuildSysupgrade
+	$(foreach profile, $(2),
+		$(call Image/Build/Profile/$(profile)/BuildSysupgrade,$$(1)))
+  endef
+
+  define Image/Build/Profile/$(1)/Initramfs
+	$(foreach profile, $(2),
+		$(call Image/Build/Profile/$(profile)/Initramfs))
+  endef
+
+  define Image/Build/Profile/$(1)/squashfs
+	$(foreach profile, $(2),
+		$(call Image/Build/Profile/$(profile)/squashfs))
+  endef
+endef
+
+# Boards with NAND, with subpages
+$(eval $(call NANDProfile,370-DB,armada-370-db,128KiB,2048,512))
+$(eval $(call NANDProfile,370-RD,armada-370-rd,128KiB,2048,512))
+$(eval $(call NANDProfile,Mamba,armada-xp-mamba,128KiB,2048,512))
+$(eval $(call NANDProfile,Mirabox,armada-370-mirabox,128KiB,2048,512))
+$(eval $(call NANDProfile,OpenBlocks-AX-3-4,armada-xp-openblocks-ax3-4,128KiB,2048,512))
+$(eval $(call NANDProfile,XP-DB,armada-xp-db,128KiB,2048,512))
+$(eval $(call NANDProfile,XP-GP,armada-xp-gp,128KiB,2048,512))
+
+define Image/Build/Profile/Mamba/squashfs
+	$(call Image/Build/UbinizeImage,armada-xp-mamba,,squashfs, -p 128KiB -m 2048 -s 512)
 	( \
 		dd if=$(KDIR)/uImage-armada-xp-mamba bs=3072k conv=sync; \
 		dd if=$(KDIR)/$(IMG_PREFIX)-armada-xp-mamba-squashfs-ubinized.bin \
@@ -50,20 +96,26 @@ define Image/Build/squashfs
 	) > $(BIN_DIR)/$(IMG_PREFIX)-armada-xp-mamba-squashfs-factory.img
 endef
 
-define Image/Build/Initramfs
-	$(foreach dtb,$(TARGET_DTBS),$(call Image/Build/DTB,$(dtb),-initramfs))
+$(eval $(call MultiProfile,Generic,$(PROFILES_LIST)))
+$(eval $(call MultiProfile,Evalboards,$(PROFILES_LIST)))
+
+define Image/BuildKernel
+	$(call Image/BuildKernel/Profile/$(PROFILE))
 endef
 
-define BuildSysupgrade
-	$(call Image/Build/SysupgradeNAND,$(2),$(1),$(KDIR)/uImage-$(2))
+define Image/Build/squashfs
+	# Align the squashfs image size before calling the profiles,
+	# otherwise the size would keep growing
+	$(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
+	$(call Image/Build/Profile/$(PROFILE)/squashfs)
 endef
 
 define Image/Build
 	$(call Image/Build/$(1))
 	dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
-	$(foreach nandboard,$(NANDBOARDS),$(call BuildSysupgrade,$(1),$(nandboard));)
+	$(call Image/Build/Profile/$(PROFILE)/BuildSysupgrade,$(1))
 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
-	$(call Image/Build/Initramfs)
+	$(call Image/Build/Profile/$(PROFILE)/Initramfs)
 endif
 endef
 
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From maxime.ripard at free-electrons.com  Tue Jan 13 10:56:42 2015
From: maxime.ripard at free-electrons.com (Maxime Ripard)
Date: Tue, 13 Jan 2015 16:56:42 +0100
Subject: [OpenWrt-Devel] [PATCH 5/9] mvebu: Add NOR sub-profile
	implementation
In-Reply-To: <1421164606-3222-1-git-send-email-maxime.ripard@free-electrons.com>
References: <1421164606-3222-1-git-send-email-maxime.ripard@free-electrons.com>
Message-ID: <1421164606-3222-6-git-send-email-maxime.ripard@free-electrons.com>

While we supported only the NAND so far, some boards use a NOR, which requires
a different set of UBI options.

Add a new subprofile type for such boards.

Signed-off-by: Maxime Ripard <maxime.ripard at free-electrons.com>
---
 target/linux/mvebu/image/Makefile | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/target/linux/mvebu/image/Makefile b/target/linux/mvebu/image/Makefile
index 0b69d4b38f34..40a06c3e1443 100644
--- a/target/linux/mvebu/image/Makefile
+++ b/target/linux/mvebu/image/Makefile
@@ -55,6 +55,32 @@ define NANDProfile
 endef
 
 # $(1): Profile Name
+# $(2): DTB Name
+# $(3): Erase Block Size
+define NORProfile
+  define Image/BuildKernel/Profile/$(1)
+	$(call Image/Build/DTB,$(2))
+    ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
+	$(call Image/Build/Profile,$(1)/Initramfs)
+    endif
+  endef
+
+  define Image/Build/Profile/$(1)/BuildSysupgrade
+	$(call Image/Build/SysupgradeNAND,$(2),$$(1),$(KDIR)/uImage-$(2))
+  endef
+
+  define Image/Build/Profile/$(1)/Initramfs
+	$(call Image/Build/DTB,$(2),-initramfs)
+  endef
+
+  define Image/Build/Profile/$(1)/squashfs
+	$(call Image/Build/UbinizeImage,$(2),,squashfs, -p $(3) -m 1)
+  endef
+
+  PROFILES_LIST += $(1)
+endef
+
+# $(1): Profile Name
 # $(2): Sub Profiles list
 define MultiProfile
   define Image/BuildKernel/Profile/$(1)
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From maxime.ripard at free-electrons.com  Tue Jan 13 10:56:43 2015
From: maxime.ripard at free-electrons.com (Maxime Ripard)
Date: Tue, 13 Jan 2015 16:56:43 +0100
Subject: [OpenWrt-Devel] [PATCH 6/9] mvebu: Fix NAND and NOR options
In-Reply-To: <1421164606-3222-1-git-send-email-maxime.ripard@free-electrons.com>
References: <1421164606-3222-1-git-send-email-maxime.ripard@free-electrons.com>
Message-ID: <1421164606-3222-7-git-send-email-maxime.ripard@free-electrons.com>

All the boards but Mamba had wrong UBI options so far, making it impossible to
flash the built image on their storage medium.

Fix all of the supported boards in order to make the generated images useful.

Tested on a Mirabox, an Armada XP GP and an Openblocks AX3, and used the NAND
chip datasheet for the others.

Signed-off-by: Maxime Ripard <maxime.ripard at free-electrons.com>
---
 target/linux/mvebu/image/Makefile | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/target/linux/mvebu/image/Makefile b/target/linux/mvebu/image/Makefile
index 40a06c3e1443..a10e1f052fbe 100644
--- a/target/linux/mvebu/image/Makefile
+++ b/target/linux/mvebu/image/Makefile
@@ -104,14 +104,18 @@ define MultiProfile
   endef
 endef
 
+# Boards with NAND, without subpages
+$(eval $(call NANDProfile,370-DB,armada-370-db,512KiB,4096))
+$(eval $(call NANDProfile,370-RD,armada-370-rd,512KiB,4096))
+$(eval $(call NANDProfile,Mirabox,armada-370-mirabox,512KiB,4096))
+$(eval $(call NANDProfile,XP-DB,armada-xp-db,512KiB,4096))
+$(eval $(call NANDProfile,XP-GP,armada-xp-gp,512KiB,4096))
+
 # Boards with NAND, with subpages
-$(eval $(call NANDProfile,370-DB,armada-370-db,128KiB,2048,512))
-$(eval $(call NANDProfile,370-RD,armada-370-rd,128KiB,2048,512))
 $(eval $(call NANDProfile,Mamba,armada-xp-mamba,128KiB,2048,512))
-$(eval $(call NANDProfile,Mirabox,armada-370-mirabox,128KiB,2048,512))
-$(eval $(call NANDProfile,OpenBlocks-AX-3-4,armada-xp-openblocks-ax3-4,128KiB,2048,512))
-$(eval $(call NANDProfile,XP-DB,armada-xp-db,128KiB,2048,512))
-$(eval $(call NANDProfile,XP-GP,armada-xp-gp,128KiB,2048,512))
+
+# Boards with NOR
+$(eval $(call NORProfile,OpenBlocks-AX-3-4,armada-xp-openblocks-ax3-4,128KiB))
 
 define Image/Build/Profile/Mamba/squashfs
 	$(call Image/Build/UbinizeImage,armada-xp-mamba,,squashfs, -p 128KiB -m 2048 -s 512)
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From maxime.ripard at free-electrons.com  Tue Jan 13 10:56:44 2015
From: maxime.ripard at free-electrons.com (Maxime Ripard)
Date: Tue, 13 Jan 2015 16:56:44 +0100
Subject: [OpenWrt-Devel] [PATCH 7/9] mvebu: Switch to 3.18
In-Reply-To: <1421164606-3222-1-git-send-email-maxime.ripard@free-electrons.com>
References: <1421164606-3222-1-git-send-email-maxime.ripard@free-electrons.com>
Message-ID: <1421164606-3222-8-git-send-email-maxime.ripard@free-electrons.com>

The 3.16 kernel introduced support for the A38x SoC family. In order to support
them, switch to the newer 3.18 kernel.

Signed-off-by: Maxime Ripard <maxime.ripard at free-electrons.com>
---
 target/linux/mvebu/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/mvebu/Makefile b/target/linux/mvebu/Makefile
index 8dd0e617143e..724e6ed75e7e 100644
--- a/target/linux/mvebu/Makefile
+++ b/target/linux/mvebu/Makefile
@@ -14,7 +14,7 @@ CPU_TYPE:=cortex-a9
 CPU_SUBTYPE:=vfpv3
 MAINTAINER:=Imre Kaloz <kaloz at openwrt.org>
 
-KERNEL_PATCHVER:=3.14
+KERNEL_PATCHVER:=3.18
 
 include $(INCLUDE_DIR)/target.mk
 
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From maxime.ripard at free-electrons.com  Tue Jan 13 10:56:45 2015
From: maxime.ripard at free-electrons.com (Maxime Ripard)
Date: Tue, 13 Jan 2015 16:56:45 +0100
Subject: [OpenWrt-Devel] [PATCH 8/9] mvebu: Add the Armada 385 Reference
	Design support
In-Reply-To: <1421164606-3222-1-git-send-email-maxime.ripard@free-electrons.com>
References: <1421164606-3222-1-git-send-email-maxime.ripard@free-electrons.com>
Message-ID: <1421164606-3222-9-git-send-email-maxime.ripard@free-electrons.com>

Signed-off-by: Maxime Ripard <maxime.ripard at free-electrons.com>
---
 target/linux/mvebu/image/Makefile                  |  1 +
 .../020-armada-385-rd-mtd-partitions.patch         | 24 ++++++++++++++++++++++
 2 files changed, 25 insertions(+)
 create mode 100644 target/linux/mvebu/patches-3.18/020-armada-385-rd-mtd-partitions.patch

diff --git a/target/linux/mvebu/image/Makefile b/target/linux/mvebu/image/Makefile
index a10e1f052fbe..6d9b0afc0511 100644
--- a/target/linux/mvebu/image/Makefile
+++ b/target/linux/mvebu/image/Makefile
@@ -115,6 +115,7 @@ $(eval $(call NANDProfile,XP-GP,armada-xp-gp,512KiB,4096))
 $(eval $(call NANDProfile,Mamba,armada-xp-mamba,128KiB,2048,512))
 
 # Boards with NOR
+$(eval $(call NORProfile,385-RD,armada-385-rd,256KiB))
 $(eval $(call NORProfile,OpenBlocks-AX-3-4,armada-xp-openblocks-ax3-4,128KiB))
 
 define Image/Build/Profile/Mamba/squashfs
diff --git a/target/linux/mvebu/patches-3.18/020-armada-385-rd-mtd-partitions.patch b/target/linux/mvebu/patches-3.18/020-armada-385-rd-mtd-partitions.patch
new file mode 100644
index 000000000000..8a1eac449ffe
--- /dev/null
+++ b/target/linux/mvebu/patches-3.18/020-armada-385-rd-mtd-partitions.patch
@@ -0,0 +1,24 @@
+--- a/arch/arm/boot/dts/armada-385-rd.dts
++++ b/arch/arm/boot/dts/armada-385-rd.dts
+@@ -42,6 +42,21 @@
+ 					compatible = "st,m25p128";
+ 					reg = <0>; /* Chip select 0 */
+ 					spi-max-frequency = <108000000>;
++
++					partition at 0 {
++						label = "uboot";
++						reg = <0 0x400000>;
++					};
++
++					partition at 1 {
++						label = "kernel";
++						reg = <0x400000 0x200000>;
++					};
++
++					partition at 2 {
++						label = "data";
++						reg = <0x600000 0xa00000>;
++					};
+ 				};
+ 			};
+ 
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From maxime.ripard at free-electrons.com  Tue Jan 13 10:56:46 2015
From: maxime.ripard at free-electrons.com (Maxime Ripard)
Date: Tue, 13 Jan 2015 16:56:46 +0100
Subject: [OpenWrt-Devel] [PATCH 9/9] mvebu: Add Armada 385 DB AP support
In-Reply-To: <1421164606-3222-1-git-send-email-maxime.ripard@free-electrons.com>
References: <1421164606-3222-1-git-send-email-maxime.ripard@free-electrons.com>
Message-ID: <1421164606-3222-10-git-send-email-maxime.ripard@free-electrons.com>

The Armada 385 DB AP board is a reference design board for access
points.

Signed-off-by: Maxime Ripard <maxime.ripard at free-electrons.com>
---
 target/linux/mvebu/image/Makefile                  |   1 +
 ...nctrl-mvebu-a38x-Add-UART1-muxing-options.patch |  43 ++++
 .../013-ARM-mvebu-a38x-Fix-node-names.patch        |  98 +++++++++
 ...M-mvebu-Add-a-number-of-pinctrl-functions.patch |  70 +++++++
 ...dd-Armada-385-Access-Point-Development-Bo.patch | 220 +++++++++++++++++++++
 ...-mvebu-A385-AP-Enable-the-NAND-controller.patch |  39 ++++
 .../021-ARM-mvebu-385-ap-Add-partitions.patch      |  39 ++++
 7 files changed, 510 insertions(+)
 create mode 100644 target/linux/mvebu/patches-3.18/012-pinctrl-mvebu-a38x-Add-UART1-muxing-options.patch
 create mode 100644 target/linux/mvebu/patches-3.18/013-ARM-mvebu-a38x-Fix-node-names.patch
 create mode 100644 target/linux/mvebu/patches-3.18/014-ARM-mvebu-Add-a-number-of-pinctrl-functions.patch
 create mode 100644 target/linux/mvebu/patches-3.18/015-ARM-mvebu-Add-Armada-385-Access-Point-Development-Bo.patch
 create mode 100644 target/linux/mvebu/patches-3.18/016-ARM-mvebu-A385-AP-Enable-the-NAND-controller.patch
 create mode 100644 target/linux/mvebu/patches-3.18/021-ARM-mvebu-385-ap-Add-partitions.patch

diff --git a/target/linux/mvebu/image/Makefile b/target/linux/mvebu/image/Makefile
index 6d9b0afc0511..471855294136 100644
--- a/target/linux/mvebu/image/Makefile
+++ b/target/linux/mvebu/image/Makefile
@@ -107,6 +107,7 @@ endef
 # Boards with NAND, without subpages
 $(eval $(call NANDProfile,370-DB,armada-370-db,512KiB,4096))
 $(eval $(call NANDProfile,370-RD,armada-370-rd,512KiB,4096))
+$(eval $(call NANDProfile,385-DB-AP,armada-385-db-ap,256KiB,4096))
 $(eval $(call NANDProfile,Mirabox,armada-370-mirabox,512KiB,4096))
 $(eval $(call NANDProfile,XP-DB,armada-xp-db,512KiB,4096))
 $(eval $(call NANDProfile,XP-GP,armada-xp-gp,512KiB,4096))
diff --git a/target/linux/mvebu/patches-3.18/012-pinctrl-mvebu-a38x-Add-UART1-muxing-options.patch b/target/linux/mvebu/patches-3.18/012-pinctrl-mvebu-a38x-Add-UART1-muxing-options.patch
new file mode 100644
index 000000000000..cd85d9d15526
--- /dev/null
+++ b/target/linux/mvebu/patches-3.18/012-pinctrl-mvebu-a38x-Add-UART1-muxing-options.patch
@@ -0,0 +1,43 @@
+From a95308d88c07e0093aedae7e64f92cb1e165f592 Mon Sep 17 00:00:00 2001
+From: Maxime Ripard <maxime.ripard at free-electrons.com>
+Date: Fri, 5 Dec 2014 15:44:57 +0100
+Subject: [PATCH] pinctrl: mvebu: a38x: Add UART1 muxing options
+
+The MPP19 and MMP20 pins also have the ability to be muxed to the uart1
+function.
+
+Add this case to the pinctrl driver.
+
+Signed-off-by: Maxime Ripard <maxime.ripard at free-electrons.com>
+Acked-by: Jason Cooper <jason at lakedaemon.net>
+Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
+---
+ drivers/pinctrl/mvebu/pinctrl-armada-38x.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-38x.c b/drivers/pinctrl/mvebu/pinctrl-armada-38x.c
+index 224c6cff6aa2..7302f66f4f19 100644
+--- a/drivers/pinctrl/mvebu/pinctrl-armada-38x.c
++++ b/drivers/pinctrl/mvebu/pinctrl-armada-38x.c
+@@ -145,14 +145,16 @@ static struct mvebu_mpp_mode armada_38x_mpp_modes[] = {
+ 		 MPP_VAR_FUNCTION(2, "ptp",   "event_req",  V_88F6810_PLUS),
+ 		 MPP_VAR_FUNCTION(3, "pcie0", "clkreq",     V_88F6810_PLUS),
+ 		 MPP_VAR_FUNCTION(4, "sata1", "prsnt",      V_88F6810_PLUS),
+-		 MPP_VAR_FUNCTION(5, "ua0",   "cts",        V_88F6810_PLUS)),
++		 MPP_VAR_FUNCTION(5, "ua0",   "cts",        V_88F6810_PLUS),
++		 MPP_VAR_FUNCTION(6, "ua1",   "rxd",        V_88F6810_PLUS)),
+ 	MPP_MODE(20,
+ 		 MPP_VAR_FUNCTION(0, "gpio",  NULL,         V_88F6810_PLUS),
+ 		 MPP_VAR_FUNCTION(1, "ge0",   "txclk",      V_88F6810_PLUS),
+ 		 MPP_VAR_FUNCTION(2, "ptp",   "clk",        V_88F6810_PLUS),
+ 		 MPP_VAR_FUNCTION(3, "pcie1", "rstout",     V_88F6820_PLUS),
+ 		 MPP_VAR_FUNCTION(4, "sata0", "prsnt",      V_88F6810_PLUS),
+-		 MPP_VAR_FUNCTION(5, "ua0",   "rts",        V_88F6810_PLUS)),
++		 MPP_VAR_FUNCTION(5, "ua0",   "rts",        V_88F6810_PLUS),
++		 MPP_VAR_FUNCTION(6, "ua1",   "txd",        V_88F6810_PLUS)),
+ 	MPP_MODE(21,
+ 		 MPP_VAR_FUNCTION(0, "gpio",  NULL,         V_88F6810_PLUS),
+ 		 MPP_VAR_FUNCTION(1, "spi0",  "cs1",        V_88F6810_PLUS),
+-- 
+2.2.1
+
diff --git a/target/linux/mvebu/patches-3.18/013-ARM-mvebu-a38x-Fix-node-names.patch b/target/linux/mvebu/patches-3.18/013-ARM-mvebu-a38x-Fix-node-names.patch
new file mode 100644
index 000000000000..7b506e75a897
--- /dev/null
+++ b/target/linux/mvebu/patches-3.18/013-ARM-mvebu-a38x-Fix-node-names.patch
@@ -0,0 +1,98 @@
+From 4a25432b13090b57d257fa0ffb6712d8acf94523 Mon Sep 17 00:00:00 2001
+From: Maxime Ripard <maxime.ripard at free-electrons.com>
+Date: Thu, 8 Jan 2015 18:38:05 +0100
+Subject: [PATCH 1/4] ARM: mvebu: a38x: Fix node names
+
+Some nodes in the DTs have a reg property but no unit name in their node name.
+
+This contradicts the way the ePAPR defines the node names. Fix this.
+
+Signed-off-by: Maxime Ripard <maxime.ripard at free-electrons.com>
+Acked-by: Gregory CLEMENT <gregory.clement at free-electrons.com>
+Signed-off-by: Gregory CLEMENT <gregory.clement at free-electrons.com>
+Signed-off-by: Andrew Lunn <andrew at lunn.ch>
+---
+ arch/arm/boot/dts/armada-380.dtsi   | 2 +-
+ arch/arm/boot/dts/armada-385-db.dts | 2 +-
+ arch/arm/boot/dts/armada-385-rd.dts | 2 +-
+ arch/arm/boot/dts/armada-385.dtsi   | 2 +-
+ arch/arm/boot/dts/armada-38x.dtsi   | 4 ++--
+ 5 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/arch/arm/boot/dts/armada-380.dtsi b/arch/arm/boot/dts/armada-380.dtsi
+index 4173a8ab34e7..13400ce88c54 100644
+--- a/arch/arm/boot/dts/armada-380.dtsi
++++ b/arch/arm/boot/dts/armada-380.dtsi
+@@ -32,7 +32,7 @@
+ 
+ 	soc {
+ 		internal-regs {
+-			pinctrl {
++			pinctrl at 18000 {
+ 				compatible = "marvell,mv88f6810-pinctrl";
+ 				reg = <0x18000 0x20>;
+ 			};
+diff --git a/arch/arm/boot/dts/armada-385-db.dts b/arch/arm/boot/dts/armada-385-db.dts
+index 2aaa9d2ac284..212605ccc7b6 100644
+--- a/arch/arm/boot/dts/armada-385-db.dts
++++ b/arch/arm/boot/dts/armada-385-db.dts
+@@ -74,7 +74,7 @@
+ 				phy-mode = "rgmii-id";
+ 			};
+ 
+-			mdio {
++			mdio at 72004 {
+ 				phy0: ethernet-phy at 0 {
+ 					reg = <0>;
+ 				};
+diff --git a/arch/arm/boot/dts/armada-385-rd.dts b/arch/arm/boot/dts/armada-385-rd.dts
+index aaca2861dc87..74a3bfe6efd7 100644
+--- a/arch/arm/boot/dts/armada-385-rd.dts
++++ b/arch/arm/boot/dts/armada-385-rd.dts
+@@ -67,7 +67,7 @@
+ 			};
+ 
+ 
+-			mdio {
++			mdio at 72004 {
+ 				phy0: ethernet-phy at 0 {
+ 					reg = <0>;
+ 				};
+diff --git a/arch/arm/boot/dts/armada-385.dtsi b/arch/arm/boot/dts/armada-385.dtsi
+index 6283d7912f71..5249a4d3c207 100644
+--- a/arch/arm/boot/dts/armada-385.dtsi
++++ b/arch/arm/boot/dts/armada-385.dtsi
+@@ -37,7 +37,7 @@
+ 
+ 	soc {
+ 		internal-regs {
+-			pinctrl {
++			pinctrl at 18000 {
+ 				compatible = "marvell,mv88f6820-pinctrl";
+ 				reg = <0x18000 0x20>;
+ 			};
+diff --git a/arch/arm/boot/dts/armada-38x.dtsi b/arch/arm/boot/dts/armada-38x.dtsi
+index 74391dace9e7..ada1f206028b 100644
+--- a/arch/arm/boot/dts/armada-38x.dtsi
++++ b/arch/arm/boot/dts/armada-38x.dtsi
+@@ -193,7 +193,7 @@
+ 				status = "disabled";
+ 			};
+ 
+-			pinctrl {
++			pinctrl at 18000 {
+ 				compatible = "marvell,mv88f6820-pinctrl";
+ 				reg = <0x18000 0x20>;
+ 			};
+@@ -373,7 +373,7 @@
+ 				status = "disabled";
+ 			};
+ 
+-			mdio {
++			mdio at 72004 {
+ 				#address-cells = <1>;
+ 				#size-cells = <0>;
+ 				compatible = "marvell,orion-mdio";
+-- 
+2.2.1
+
diff --git a/target/linux/mvebu/patches-3.18/014-ARM-mvebu-Add-a-number-of-pinctrl-functions.patch b/target/linux/mvebu/patches-3.18/014-ARM-mvebu-Add-a-number-of-pinctrl-functions.patch
new file mode 100644
index 000000000000..7e27ae2b41f8
--- /dev/null
+++ b/target/linux/mvebu/patches-3.18/014-ARM-mvebu-Add-a-number-of-pinctrl-functions.patch
@@ -0,0 +1,70 @@
+From 91b4c91f919abffa72cbf7545a944252f8e4f775 Mon Sep 17 00:00:00 2001
+From: Maxime Ripard <maxime.ripard at free-electrons.com>
+Date: Thu, 8 Jan 2015 18:38:08 +0100
+Subject: [PATCH 3/4] ARM: mvebu: Add a number of pinctrl functions
+
+Some pinctrl functions can be shared with all DTS out there, since they are
+generic, SoC-wide muxing options. Add a number of these to the DTSI to avoid
+duplication.
+
+Signed-off-by: Maxime Ripard <maxime.ripard at free-electrons.com>
+Acked-by: Gregory CLEMENT <gregory.clement at free-electrons.com>
+Signed-off-by: Gregory CLEMENT <gregory.clement at free-electrons.com>
+Signed-off-by: Andrew Lunn <andrew at lunn.ch>
+---
+ arch/arm/boot/dts/armada-38x.dtsi | 39 +++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 39 insertions(+)
+
+diff --git a/arch/arm/boot/dts/armada-38x.dtsi b/arch/arm/boot/dts/armada-38x.dtsi
+index 40200084c6c8..98885c58be29 100644
+--- a/arch/arm/boot/dts/armada-38x.dtsi
++++ b/arch/arm/boot/dts/armada-38x.dtsi
+@@ -195,6 +195,45 @@
+ 
+ 			pinctrl at 18000 {
+ 				reg = <0x18000 0x20>;
++
++				ge0_rgmii_pins: ge-rgmii-pins-0 {
++					marvell,pins = "mpp6", "mpp7", "mpp8",
++						       "mpp9", "mpp10", "mpp11",
++						       "mpp12", "mpp13", "mpp14",
++						       "mpp15", "mpp16", "mpp17";
++					marvell,function = "ge0";
++				};
++
++				i2c0_pins: i2c-pins-0 {
++					marvell,pins = "mpp2", "mpp3";
++					marvell,function = "i2c0";
++				};
++
++				mdio_pins: mdio-pins {
++					marvell,pins = "mpp4", "mpp5";
++					marvell,function = "ge";
++				};
++
++				ref_clk0_pins: ref-clk-pins-0 {
++					marvell,pins = "mpp45";
++					marvell,function = "ref";
++				};
++
++				spi1_pins: spi-pins-1 {
++					marvell,pins = "mpp56", "mpp57", "mpp58",
++						       "mpp59";
++					marvell,function = "spi1";
++				};
++
++				uart0_pins: uart-pins-0 {
++					marvell,pins = "mpp0", "mpp1";
++					marvell,function = "ua0";
++				};
++
++				uart1_pins: uart-pins-1 {
++					marvell,pins = "mpp19", "mpp20";
++					marvell,function = "ua1";
++				};
+ 			};
+ 
+ 			gpio0: gpio at 18100 {
+-- 
+2.2.1
+
diff --git a/target/linux/mvebu/patches-3.18/015-ARM-mvebu-Add-Armada-385-Access-Point-Development-Bo.patch b/target/linux/mvebu/patches-3.18/015-ARM-mvebu-Add-Armada-385-Access-Point-Development-Bo.patch
new file mode 100644
index 000000000000..a40c957fb3b6
--- /dev/null
+++ b/target/linux/mvebu/patches-3.18/015-ARM-mvebu-Add-Armada-385-Access-Point-Development-Bo.patch
@@ -0,0 +1,220 @@
+From e5ee12817e9eac891c6b2a340f64d94d9abd355f Mon Sep 17 00:00:00 2001
+From: Maxime Ripard <maxime.ripard at free-electrons.com>
+Date: Thu, 8 Jan 2015 18:38:09 +0100
+Subject: [PATCH 4/4] ARM: mvebu: Add Armada 385 Access Point Development Board
+ support
+
+The A385-AP is a board produced by Marvell that holds 3 mPCIe slot, a 16MB
+SPI-NOR, 3 Gigabit Ethernet ports, USB3 and NAND flash storage.
+
+[gregory.clement at free-electrons.com: switch the license to the dual
+X11/GPL with the agreement of the author]
+
+Signed-off-by: Maxime Ripard <maxime.ripard at free-electrons.com>
+Signed-off-by: Gregory CLEMENT <gregory.clement at free-electrons.com>
+Signed-off-by: Andrew Lunn <andrew at lunn.ch>
+---
+ arch/arm/boot/dts/Makefile             |   1 +
+ arch/arm/boot/dts/armada-385-db-ap.dts | 178 +++++++++++++++++++++++++++++++++
+ 2 files changed, 179 insertions(+)
+ create mode 100644 arch/arm/boot/dts/armada-385-db-ap.dts
+
+diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
+index 6dc9c17f9ff5..d34837104949 100644
+--- a/arch/arm/boot/dts/Makefile
++++ b/arch/arm/boot/dts/Makefile
+@@ -536,6 +536,7 @@ dtb-$(CONFIG_MACH_ARMADA_375) += \
+ 	armada-375-db.dtb
+ dtb-$(CONFIG_MACH_ARMADA_38X) += \
+ 	armada-385-db.dtb \
++	armada-385-db-ap.dtb \
+ 	armada-385-rd.dtb
+ dtb-$(CONFIG_MACH_ARMADA_XP) += \
+ 	armada-xp-axpwifiap.dtb \
+diff --git a/arch/arm/boot/dts/armada-385-db-ap.dts b/arch/arm/boot/dts/armada-385-db-ap.dts
+new file mode 100644
+index 000000000000..57b9119fb3e0
+--- /dev/null
++++ b/arch/arm/boot/dts/armada-385-db-ap.dts
+@@ -0,0 +1,178 @@
++/*
++ * Device Tree file for Marvell Armada 385 Access Point Development board
++ * (DB-88F6820-AP)
++ *
++ *  Copyright (C) 2014 Marvell
++ *
++ * Nadav Haklai <nadavh at marvell.com>
++ *
++ * This file is dual-licensed: you can use it either under the terms
++ * of the GPL or the X11 license, at your option. Note that this dual
++ * licensing only applies to this file, and not this project as a
++ * whole.
++ *
++ *  a) This file is licensed under the terms of the GNU General Public
++ *     License version 2.  This program is licensed "as is" without
++ *     any warranty of any kind, whether express or implied.
++ *
++ * Or, alternatively,
++ *
++ *  b) Permission is hereby granted, free of charge, to any person
++ *     obtaining a copy of this software and associated documentation
++ *     files (the "Software"), to deal in the Software without
++ *     restriction, including without limitation the rights to use,
++ *     copy, modify, merge, publish, distribute, sublicense, and/or
++ *     sell copies of the Software, and to permit persons to whom the
++ *     Software is furnished to do so, subject to the following
++ *     conditions:
++ *
++ *     The above copyright notice and this permission notice shall be
++ *     included in all copies or substantial portions of the Software.
++ *
++ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
++ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
++ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
++ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
++ *     OTHER DEALINGS IN THE SOFTWARE.
++ */
++
++/dts-v1/;
++#include "armada-385.dtsi"
++
++#include <dt-bindings/gpio/gpio.h>
++
++/ {
++	model = "Marvell Armada 385 Access Point Development Board";
++	compatible = "marvell,a385-db-ap", "marvell,armada385", "marvell,armada38x";
++
++	chosen {
++		bootargs = "console=ttyS0,115200";
++		stdout-path = &uart1;
++	};
++
++	memory {
++		device_type = "memory";
++		reg = <0x00000000 0x80000000>; /* 2GB */
++	};
++
++	soc {
++		ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
++			  MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000>;
++
++		internal-regs {
++			spi1: spi at 10680 {
++				pinctrl-names = "default";
++				pinctrl-0 = <&spi1_pins>;
++				status = "okay";
++
++				spi-flash at 0 {
++					#address-cells = <1>;
++					#size-cells = <1>;
++					compatible = "st,m25p128";
++					reg = <0>; /* Chip select 0 */
++					spi-max-frequency = <54000000>;
++				};
++			};
++
++			i2c0: i2c at 11000 {
++				pinctrl-names = "default";
++				pinctrl-0 = <&i2c0_pins>;
++				status = "okay";
++
++				/*
++				 * This bus is wired to two EEPROM
++				 * sockets, one of which holding the
++				 * board ID used by the	bootloader.
++				 * Erasing this EEPROM's content will
++				 * brick the board.
++				 * Use this bus with caution.
++				 */
++			};
++
++			mdio at 72004 {
++				pinctrl-names = "default";
++				pinctrl-0 = <&mdio_pins>;
++
++				phy0: ethernet-phy at 1 {
++					reg = <1>;
++				};
++
++				phy1: ethernet-phy at 4 {
++					reg = <4>;
++				};
++
++				phy2: ethernet-phy at 6 {
++					reg = <6>;
++				};
++			};
++
++			/* UART0 is exposed through the JP8 connector */
++			uart0: serial at 12000 {
++				pinctrl-names = "default";
++				pinctrl-0 = <&uart0_pins>;
++				status = "okay";
++			};
++
++			/*
++			 * UART1 is exposed through a FTDI chip
++			 * wired to the mini-USB connector
++			 */
++			uart1: serial at 12100 {
++				pinctrl-names = "default";
++				pinctrl-0 = <&uart1_pins>;
++				status = "okay";
++			};
++
++			ethernet at 30000 {
++				status = "okay";
++				phy = <&phy2>;
++				phy-mode = "sgmii";
++			};
++
++			ethernet at 34000 {
++				status = "okay";
++				phy = <&phy1>;
++				phy-mode = "sgmii";
++			};
++
++			ethernet at 70000 {
++				pinctrl-names = "default";
++
++				/*
++				 * The Reference Clock 0 is used to
++				 * provide a clock to the PHY
++				 */
++				pinctrl-0 = <&ge0_rgmii_pins>, <&ref_clk0_pins>;
++				status = "okay";
++				phy = <&phy0>;
++				phy-mode = "rgmii-id";
++			};
++		};
++
++		pcie-controller {
++			status = "okay";
++
++			/*
++			 * The three PCIe units are accessible through
++			 * standard mini-PCIe slots on the board.
++			 */
++			pcie at 1,0 {
++				/* Port 0, Lane 0 */
++				status = "okay";
++			};
++
++			pcie at 2,0 {
++				/* Port 1, Lane 0 */
++				status = "okay";
++			};
++
++			pcie at 3,0 {
++				/* Port 2, Lane 0 */
++				status = "okay";
++			};
++		};
++	};
++};
+-- 
+2.2.1
+
diff --git a/target/linux/mvebu/patches-3.18/016-ARM-mvebu-A385-AP-Enable-the-NAND-controller.patch b/target/linux/mvebu/patches-3.18/016-ARM-mvebu-A385-AP-Enable-the-NAND-controller.patch
new file mode 100644
index 000000000000..85a951154714
--- /dev/null
+++ b/target/linux/mvebu/patches-3.18/016-ARM-mvebu-A385-AP-Enable-the-NAND-controller.patch
@@ -0,0 +1,39 @@
+From 7eb1f09ec8e25aa2fc3f6fc5fc9405d9f917d503 Mon Sep 17 00:00:00 2001
+From: Maxime Ripard <maxime.ripard at free-electrons.com>
+Date: Thu, 11 Dec 2014 14:14:58 +0100
+Subject: [PATCH 1/2] ARM: mvebu: A385-AP: Enable the NAND controller
+
+The A385 AP has a 1GB NAND chip. Enable it.
+
+Signed-off-by: Maxime Ripard <maxime.ripard at free-electrons.com>
+---
+ arch/arm/boot/dts/armada-385-db-ap.dts | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+diff --git a/arch/arm/boot/dts/armada-385-db-ap.dts b/arch/arm/boot/dts/armada-385-db-ap.dts
+index 3a51531eb37b..02db04867d8f 100644
+--- a/arch/arm/boot/dts/armada-385-db-ap.dts
++++ b/arch/arm/boot/dts/armada-385-db-ap.dts
+@@ -122,6 +122,19 @@
+ 				phy = <&phy0>;
+ 				phy-mode = "rgmii-id";
+ 			};
++
++			nfc: flash at d0000 {
++				status = "okay";
++				#address-cells = <1>;
++				#size-cells = <1>;
++
++				num-cs = <1>;
++				nand-ecc-strength = <4>;
++				nand-ecc-step-size = <512>;
++				marvell,nand-keep-config;
++				marvell,nand-enable-arbiter;
++				nand-on-flash-bbt;
++			};
+ 		};
+ 
+ 		pcie-controller {
+-- 
+2.2.1
+
diff --git a/target/linux/mvebu/patches-3.18/021-ARM-mvebu-385-ap-Add-partitions.patch b/target/linux/mvebu/patches-3.18/021-ARM-mvebu-385-ap-Add-partitions.patch
new file mode 100644
index 000000000000..de7241026c5e
--- /dev/null
+++ b/target/linux/mvebu/patches-3.18/021-ARM-mvebu-385-ap-Add-partitions.patch
@@ -0,0 +1,39 @@
+From 9861f93a59142a3131870df2521eb2deb73026d7 Mon Sep 17 00:00:00 2001
+From: Maxime Ripard <maxime.ripard at free-electrons.com>
+Date: Tue, 13 Jan 2015 11:14:09 +0100
+Subject: [PATCH 2/2] ARM: mvebu: 385-ap: Add partitions
+
+Signed-off-by: Maxime Ripard <maxime.ripard at free-electrons.com>
+---
+ arch/arm/boot/dts/armada-385-db-ap.dts | 15 +++++++++++++++
+ 1 file changed, 15 insertions(+)
+
+diff --git a/arch/arm/boot/dts/armada-385-db-ap.dts b/arch/arm/boot/dts/armada-385-db-ap.dts
+index 02db04867d8f..2a58443e2504 100644
+--- a/arch/arm/boot/dts/armada-385-db-ap.dts
++++ b/arch/arm/boot/dts/armada-385-db-ap.dts
+@@ -134,6 +134,21 @@
+ 				marvell,nand-keep-config;
+ 				marvell,nand-enable-arbiter;
+ 				nand-on-flash-bbt;
++
++				mtd0 at 00000000 {
++					label = "U-Boot";
++					reg = <0x00000000 0x00800000>;
++				};
++
++				mtd1 at 00800000 {
++					label = "uImage";
++					reg = <0x00800000 0x00800000>;
++				};
++
++				mtd2 at 01000000 {
++					label = "Root";
++					reg = <0x01000000 0x3f000000>;
++				};
+ 			};
+ 		};
+ 
+-- 
+2.2.1
+
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From helmut.schaa at googlemail.com  Tue Jan 13 11:22:20 2015
From: helmut.schaa at googlemail.com (Helmut Schaa)
Date: Tue, 13 Jan 2015 17:22:20 +0100
Subject: [OpenWrt-Devel] [PATCH] toolchain: Add libatomic when using
	external toolchain
Message-ID: <1421166140-29651-1-git-send-email-helmut.schaa@googlemail.com>

Otherwise libatomic cannot be used in conjunction with external toolchains.

Signed-off-by: Helmut Schaa <helmut.schaa at googlemail.com>
---
 package/libs/toolchain/Makefile | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/package/libs/toolchain/Makefile b/package/libs/toolchain/Makefile
index 1a75e90..42b9935 100644
--- a/package/libs/toolchain/Makefile
+++ b/package/libs/toolchain/Makefile
@@ -604,6 +604,15 @@ else
 	exit 0
   endef
 
+  define Package/libatomic/install
+	for file in $(call qstrip,$(CONFIG_LIBATOMIC_FILE_SPEC)); do \
+		dir=`dirname $$$$file` ; \
+		$(INSTALL_DIR) $(1)/$$$$dir ; \
+		$(CP) $(call qstrip,$(CONFIG_LIBATOMIC_ROOT_DIR))/$$$$file $(1)/$$$$dir/ ; \
+	done ; \
+	exit 0
+  endef
+
   define Package/ldd/install
 	for file in $(call qstrip,$(CONFIG_LDD_FILE_SPEC)); do \
 		dir=`dirname $$$$file` ; \
-- 
1.8.4.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From malaakso at elisanet.fi  Tue Jan 13 12:00:24 2015
From: malaakso at elisanet.fi (Matti Laakso)
Date: Tue, 13 Jan 2015 19:00:24 +0200
Subject: [OpenWrt-Devel] [PATCH] comgt: Allow using non-TTY devices
In-Reply-To: <54AEE8CF.7060403@openwrt.org>
References: <54AEE8CF.7060403@openwrt.org>
Message-ID: <1421168424-27146-1-git-send-email-malaakso@elisanet.fi>

Some Huawei mobile broadband sticks utilizing the NCM protocol expose
the control channel as a cdc-wdm device node instead of a virtual TTY.
This device node does not support the terminal ioctls. This patch
adds a check whether the provided device is a TTY or not and does not
attempt to use the terminal ioctls if they are not supported.

Signed-off-by: Matti Laakso <malaakso at elisanet.fi>
---
diff --git a/package/network/utils/comgt/patches/004-check_tty.patch b/package/network/utils/comgt/patches/004-check_tty.patch
new file mode 100644
index 0000000..d269bce
--- /dev/null
+++ b/package/network/utils/comgt/patches/004-check_tty.patch
@@ -0,0 +1,177 @@
+--- a/comgt.c
++++ b/comgt.c
+@@ -91,6 +91,7 @@ unsigned long hstart,hset;
+ char NullString[]={ "" };
+ BOOL lastcharnl=1; /* Indicate that last char printed from getonebyte
+                                was a nl, so no new one is needed */
++BOOL tty=1;
+ 
+ 
+ //"open com \"/dev/modem\"\nset com 38400n81\nset senddelay 0.05\nsend \"ATi^m\"\nget 2 \" ^m\" $s\nprint \"Response : \",$s,\"\\n\"\nget 2 \" ^m\" $s\nprint \"Response :\",$s,\"\\n\"\nget 2 \" ^m\" $s\nprint \"Response : \",$s,\"\\n\"\n\n";
+@@ -918,10 +919,12 @@ BOOL getonoroff(void) {
+ }
+ 
+ void setcom(void) {
+-  stbuf.c_cflag &= ~(CBAUD | CSIZE | CSTOPB | CLOCAL | PARENB);
+-  stbuf.c_cflag |= (speed | bits | CREAD | clocal | parity | stopbits );
+-  if (ioctl(comfd, TCSETA, &stbuf) < 0) {
+-    serror("Can't ioctl set device",1);
++  if (tty) {
++    stbuf.c_cflag &= ~(CBAUD | CSIZE | CSTOPB | CLOCAL | PARENB);
++    stbuf.c_cflag |= (speed | bits | CREAD | clocal | parity | stopbits );
++    if (ioctl(comfd, TCSETA, &stbuf) < 0) {
++      serror("Can't ioctl set device",1);
++    }
+   }
+ }
+ 
+@@ -1224,9 +1227,11 @@ void doclose(void) {
+   if(strcmp(token,"hardcom")==0) {
+     if(comfd== -1) serror("Com device not open",1);
+     vmsg("Closing device");
+-    if (ioctl(comfd, TCSETA, &svbuf) < 0) {
+-      sprintf(msg,"Can't ioctl set device %s.\n",device);
+-      serror(msg,1);
++    if (tty) {
++      if (ioctl(comfd, TCSETA, &svbuf) < 0) {
++        sprintf(msg,"Can't ioctl set device %s.\n",device);
++        serror(msg,1);
++      }
+     }
+     close(comfd);
+     comfd= -1;
+@@ -1266,26 +1271,32 @@ void opengt(void) {
+       ext(1);
+     }
+   }
+-  if (ioctl (comfd, TCGETA, &svbuf) < 0) {
+-    sprintf(msg,"Can't control %s, please try again.\n",device);
+-    serror(msg,1);
++  if (isatty (comfd))
++    tty=1;
++  else
++    tty=0;
++  if (tty) {
++    if (ioctl (comfd, TCGETA, &svbuf) < 0) {
++      sprintf(msg,"Can't control %s, please try again.\n",device);
++      serror(msg,1);
++    }
++    ioctl(comfd, TCGETA, &stbuf);
++    speed=stbuf.c_cflag & CBAUD;
++    if (high_speed == 0)  strcpy(cspeed,"115200");
++    else strcpy(cspeed,"57600");
++    bits=stbuf.c_cflag & CSIZE;
++    clocal=stbuf.c_cflag & CLOCAL;
++    stopbits=stbuf.c_cflag & CSTOPB;
++    parity=stbuf.c_cflag & (PARENB | PARODD);
++    stbuf.c_iflag &= ~(IGNCR | ICRNL | IUCLC | INPCK | IXON | IXANY | IGNPAR );
++    stbuf.c_oflag &= ~(OPOST | OLCUC | OCRNL | ONLCR | ONLRET);
++    stbuf.c_lflag &= ~(ICANON | ECHO | ECHOE | ECHONL);
++    stbuf.c_lflag &= ~(ECHO | ECHOE);
++    stbuf.c_cc[VMIN] = 1;
++    stbuf.c_cc[VTIME] = 0;
++    stbuf.c_cc[VEOF] = 1;
+   }
+   setenv("COMGTDEVICE",device,1);
+-  ioctl(comfd, TCGETA, &stbuf);
+-  speed=stbuf.c_cflag & CBAUD;
+-  if (high_speed == 0)  strcpy(cspeed,"115200");
+-  else strcpy(cspeed,"57600");
+-  bits=stbuf.c_cflag & CSIZE;
+-  clocal=stbuf.c_cflag & CLOCAL;
+-  stopbits=stbuf.c_cflag & CSTOPB;
+-  parity=stbuf.c_cflag & (PARENB | PARODD);
+-  stbuf.c_iflag &= ~(IGNCR | ICRNL | IUCLC | INPCK | IXON | IXANY | IGNPAR );
+-  stbuf.c_oflag &= ~(OPOST | OLCUC | OCRNL | ONLCR | ONLRET);
+-  stbuf.c_lflag &= ~(ICANON | ECHO | ECHOE | ECHONL);
+-  stbuf.c_lflag &= ~(ECHO | ECHOE);
+-  stbuf.c_cc[VMIN] = 1;
+-  stbuf.c_cc[VTIME] = 0;
+-  stbuf.c_cc[VEOF] = 1;
+   setcom();
+   dormir(200000); /* Wait a bit (DTR raise) */
+   sprintf(msg,"Opened %s as FD %d",device,comfd);
+@@ -1302,45 +1313,50 @@ void opendevice(void) {
+     }
+   }
+   else comfd=0;
+-
+-  if (ioctl (comfd, TCGETA, &svbuf) < 0) {
+-    sprintf(msg,"Can't ioctl get device %s.\n",device);
+-    serror(msg,1);
+-  }
+-  ioctl(comfd, TCGETA, &stbuf);
+-  speed=stbuf.c_cflag & CBAUD;
+-  switch(speed) {
+-    case B0: strcpy(cspeed,"0");break;
+-    case B50: strcpy(cspeed,"50");break;
+-    case B75: strcpy(cspeed,"75");break;
+-    case B110: strcpy(cspeed,"110");break;
+-    case B300: strcpy(cspeed,"300");break;
+-    case B600: strcpy(cspeed,"600");break;
+-    case B1200: strcpy(cspeed,"1200");break;
+-    case B2400: strcpy(cspeed,"2400");break;
+-    case B4800: strcpy(cspeed,"4800");break;
+-    case B9600: strcpy(cspeed,"9600");break;
+-    case B19200: strcpy(cspeed,"19200");break;
+-    case B38400: strcpy(cspeed,"38400");break;
+-    case B115200:
++  if (isatty (comfd))
++    tty=1;
++  else
++    tty=0;
++  if (tty) {
++    if (ioctl (comfd, TCGETA, &svbuf) < 0) {
++      sprintf(msg,"Can't ioctl get device %s.\n",device);
++      serror(msg,1);
++    }
++    ioctl(comfd, TCGETA, &stbuf);
++    speed=stbuf.c_cflag & CBAUD;
++    switch(speed) {
++      case B0: strcpy(cspeed,"0");break;
++      case B50: strcpy(cspeed,"50");break;
++      case B75: strcpy(cspeed,"75");break;
++      case B110: strcpy(cspeed,"110");break;
++      case B300: strcpy(cspeed,"300");break;
++      case B600: strcpy(cspeed,"600");break;
++      case B1200: strcpy(cspeed,"1200");break;
++      case B2400: strcpy(cspeed,"2400");break;
++      case B4800: strcpy(cspeed,"4800");break;
++      case B9600: strcpy(cspeed,"9600");break;
++      case B19200: strcpy(cspeed,"19200");break;
++      case B38400: strcpy(cspeed,"38400");break;
++      case B115200:
+                 {
+                   if (high_speed == 0) strcpy(cspeed,"115200");
+                   else strcpy(cspeed,"57600");
+                   break;
+                 }
+-    case B460800: strcpy(cspeed, "460800");break;
++      case B460800: strcpy(cspeed, "460800");break;
++    }
++    bits=stbuf.c_cflag & CSIZE;
++    clocal=stbuf.c_cflag & CLOCAL;
++    stopbits=stbuf.c_cflag & CSTOPB;
++    parity=stbuf.c_cflag & (PARENB | PARODD);
++    stbuf.c_iflag &= ~(IGNCR | ICRNL | IUCLC | INPCK | IXON | IXANY | IGNPAR );
++    stbuf.c_oflag &= ~(OPOST | OLCUC | OCRNL | ONLCR | ONLRET);
++    stbuf.c_lflag &= ~(ICANON | ECHO | ECHOE | ECHONL);
++    stbuf.c_lflag &= ~(ECHO | ECHOE);
++    stbuf.c_cc[VMIN] = 1;
++    stbuf.c_cc[VTIME] = 0;
++    stbuf.c_cc[VEOF] = 1;
+   }
+-  bits=stbuf.c_cflag & CSIZE;
+-  clocal=stbuf.c_cflag & CLOCAL;
+-  stopbits=stbuf.c_cflag & CSTOPB;
+-  parity=stbuf.c_cflag & (PARENB | PARODD);
+-  stbuf.c_iflag &= ~(IGNCR | ICRNL | IUCLC | INPCK | IXON | IXANY | IGNPAR );
+-  stbuf.c_oflag &= ~(OPOST | OLCUC | OCRNL | ONLCR | ONLRET);
+-  stbuf.c_lflag &= ~(ICANON | ECHO | ECHOE | ECHONL);
+-  stbuf.c_lflag &= ~(ECHO | ECHOE);
+-  stbuf.c_cc[VMIN] = 1;
+-  stbuf.c_cc[VTIME] = 0;
+-  stbuf.c_cc[VEOF] = 1;
+   setcom();
+   dormir(200000); /* Wait a bit (DTR raise) */
+   sprintf(msg,"Opened %s as FD %d",device,comfd);
-- 
2.1.0
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From sami at olmari.fi  Tue Jan 13 13:34:14 2015
From: sami at olmari.fi (Sami Olmari)
Date: Tue, 13 Jan 2015 20:34:14 +0200
Subject: [OpenWrt-Devel] Wrong Network Configuration File Fails
	Everything
In-Reply-To: <1421161577637.24486@duke.edu>
References: <1421161577637.24486@duke.edu>
Message-ID: <CAENOc+x5jFu0rPTihbHD231kT6Om-zZ=UhRPdFcO4ns3_J336A@mail.gmail.com>

Set static IP for your computer, like 192.168.1.10, subnet
255.255.255.0 and try then.

 Sami Olmari

On Tue, Jan 13, 2015 at 5:06 PM, Yilun Zhou <yilun.zhou at duke.edu> wrote:
> Hi,
>
> I am experimenting with OpenWRT Attitude Adjustment on NETGEAR WNDR3800. I
> accidentally wrote wrong network configuration file and committed it. Now I
> cannot interact with the router anymore. The wifi is still being created but
> there is no Internet. I tried to SSH into the router from device that is
> connected via Ethernet cable or wifi but neither works. Then I did a factory
> reset following https://forum.openwrt.org/viewtopic.php?pid=148789#p148789 .
> I can see the Power LED flashing green rapidly so I should be in FailSafe
> mode. However, I can't telnet into the router. On Windows taskbar (bottom
> right corner of desktop) I can see that the Ethernet connection is "working
> in progress" (a circle is rotating in front of the icon). Has anyone
> experienced this issue before and how can I solve it?
>
> Thanks,
>
> Yilun
>
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From ppvazquezfer at gmail.com  Tue Jan 13 15:57:16 2015
From: ppvazquezfer at gmail.com (=?ISO-8859-1?B?Sm9z6SBW4XpxdWV6?=)
Date: Tue, 13 Jan 2015 21:57:16 +0100
Subject: [OpenWrt-Devel] [RFC PATCH] mac80211: brcmfmac: separate SDIO
 and USB support
In-Reply-To: <alpine.DEB.2.02.1501130841050.16924@trabant.deployis.eu>
References: <alpine.DEB.2.02.1501071946120.29083@trabant.deployis.eu>
 <CAFXQaeLVQoDkKU-sTuOyNtXPLEHFYVjLEVd4pQBXD47TfhpUFw@mail.gmail.com>
 <alpine.DEB.2.02.1501130841050.16924@trabant.deployis.eu>
Message-ID: <CAFXQaeJO5cu57Kmz7a=iZE0PSKOuPmXyf_C=S+J1ctGWFyFOLg@mail.gmail.com>

2015-01-13 8:46 GMT+01:00, Zoltan HERPAI <wigyori at uid0.hu>:
> I haven't seen any flags that does SDIO_SUPPORT or something similar. It's
> either removing "depend on USB_SUPPORT" or add dependencies for the
> targets that'll use the SDIO part. Do you know of other approach?
>
> Thanks,
> -w-
>
You are right: there isn't SDIO_SUPPORT flag. I suggested to delete
sunxi dependency because maybe in the future will be support for other
boards that belong to different targets that will need sdio support to
make the wifi work.
Anyway, while only sunxi based boards need it, the patch can be left
as is to avoid confusion.

Regards:

Pepe

> On Tue, 13 Jan 2015, Jos? V?zquez wrote:
>
>> IMHO make sdio selecton depends only on sunxi is not a good idea.
>>
>> 2015-01-07 20:37 GMT+01:00, Zoltan HERPAI <wigyori at uid0.hu>:
>>> This patch will add options to select SDIO and USB support in the
>>> brcmfmac
>>> driver, and not tie it to only support USB. As the driver doesn't build
>>> the host interface code into separate .ko, the required ones are
>>> selected
>>> via config options.
>>>
>>> PCIe support is not added now, can be added later. As of now, only sunxi
>>> would use the SDIO support for the Ampak modules.
>>>
>>> Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
>>> ---
>>> Index: package/kernel/mac80211/Makefile
>>> ===================================================================
>>> --- package/kernel/mac80211/Makefile	(revision 43857)
>>> +++ package/kernel/mac80211/Makefile	(working copy)
>>> @@ -1477,17 +1477,36 @@
>>>
>>>   define KernelPackage/brcmfmac
>>>     $(call KernelPackage/mac80211/Default)
>>> -  TITLE:=Broadcom IEEE802.11n USB FullMAC WLAN driver
>>> +  TITLE:=Broadcom IEEE802.11n USB/SDIO FullMAC WLAN driver
>>>     URL:=http://linuxwireless.org/en/users/Drivers/brcm80211
>>> -  DEPENDS+= @USB_SUPPORT +kmod-usb-core +kmod-cfg80211
>>> + at DRIVER_11N_SUPPORT
>>> +kmod-brcmutil
>>> +  DEPENDS+= @(USB_SUPPORT||TARGET_sunxi) +kmod-cfg80211
>>> + at DRIVER_11N_SUPPORT +kmod-brcmutil
>>>
>>> FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/brcm80211/brcmfmac/brcmfmac.ko
>>>     AUTOLOAD:=$(call AutoProbe,brcmfmac)
>>>   endef
>>>
>>>   define KernelPackage/brcmfmac/description
>>> - Kernel module for Broadcom IEEE802.11n USB Wireless cards
>>> + Kernel module for Broadcom IEEE802.11n USB/SDIO Wireless cards
>>>   endef
>>>
>>> +define KernelPackage/brcmfmac/config
>>> +    if PACKAGE_kmod-brcmfmac
>>> +
>>> +		config PACKAGE_BRCMFMAC_SDIO
>>> +			depends TARGET_sunxi
>>> +			bool "Broadcom FullMAC SDIO support"
>>> +			help
>>> +			    Say Y if you want to enable SDIO support for the brcmfmac
>>> driver.
>>> +
>>> +		config PACKAGE_BRCMFMAC_USB
>>> +			select PACKAGE_kmod-usb-core
>>> +			default y
>>> +			bool "Broadcom FullMAC USB support"
>>> +			help
>>> +			    Say Y if you want to enable USB support for the brcmfmac driver.
>>> +
>>> +    endif
>>> +endef
>>> +
>>>   config_package=$(if $(CONFIG_PACKAGE_kmod-$(1)),m)
>>>
>>>   config-y:= \
>>> @@ -1558,8 +1577,9 @@
>>>   config-$(call config_package,brcmutil) += BRCMUTIL
>>>   config-$(call config_package,brcmsmac) += BRCMSMAC
>>>   config-$(call config_package,brcmfmac) += BRCMFMAC
>>> -config-y += BRCMFMAC_USB
>>> +config-$(CONFIG_PACKAGE_BRCMFMAC_USB) += BRCMFMAC_USB
>>>   config-$(CONFIG_PACKAGE_BRCM80211_DEBUG) += BRCMDBG
>>> +config-$(CONFIG_PACKAGE_BRCMFMAC_SDIO) += BRCMFMAC_SDIO
>>>
>>>   config-$(call config_package,mac80211-hwsim) += MAC80211_HWSIM
>>>
>>> @@ -1969,12 +1989,25 @@
>>>
>>>   define KernelPackage/brcmfmac/install
>>>   	$(INSTALL_DIR) $(1)/lib/firmware/brcm
>>> +ifeq ($(CONFIG_PACKAGE_BRCMFMAC_USB),y)
>>>   	$(INSTALL_DATA) \
>>>   		$(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac43236b.bin
>>> \
>>>   		$(1)/lib/firmware/brcm/
>>>   	$(INSTALL_DATA) \
>>>   		$(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac43143.bin
>>> \
>>>   		$(1)/lib/firmware/brcm/
>>> +endif
>>> +ifeq ($(CONFIG_PACKAGE_BRCMFMAC_SDIO),y)
>>> +	$(INSTALL_DATA) \
>>> +		$(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac4329-sdio.bin
>>> \
>>> +		$(1)/lib/firmware/brcm/
>>> +	$(INSTALL_DATA) \
>>> +		$(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac4330-sdio.bin
>>> \
>>> +		$(1)/lib/firmware/brcm/
>>> +	$(INSTALL_DATA) \
>>> +		$(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac43362-sdio.bin
>>> \
>>> +		$(1)/lib/firmware/brcm/
>>> +endif
>>>   endef
>>>
>>>   $(eval $(call KernelPackage,adm8211))
>>> _______________________________________________
>>> openwrt-devel mailing list
>>> openwrt-devel at lists.openwrt.org
>>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>>>
>>
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From mark.a.milburn at gmail.com  Tue Jan 13 16:18:13 2015
From: mark.a.milburn at gmail.com (mark milburn)
Date: Tue, 13 Jan 2015 14:18:13 -0700
Subject: [OpenWrt-Devel] [RFC] [mvebu] WRT1900AC syscfg as overlay
Message-ID: <CAFFfgDxb9+VnavrbD85C1jaOy0Wggf3Dz-x+xCTyGp7UsL0tMg@mail.gmail.com>

I believe this is the appropriate forum for discussing this.  Let me
know if this is not the case.

I think that employing the syscfg partition as the overlayfs is not
useful for this device, and for at least one case, harmful.

The current setup that allows for a primary and alternate firmware
image to be loaded is useful, it adds insurance if you aren't using
the squashfs failsafe.  However:

1.  If a configuration problem prevents the device from booting, or
renders the device effectively inaccessible, booting to the alternate
image may not allow the device to be recovered.  I think this negates
the utility of having an alternate image.

2.  One cannot test two different configurations effectively using two
different boot images.

Provided it does not affect the ability of a user to flash his or her
firmware back to a manufacturer image, I would suggest that mtdparts
be redefined and syscfg removed.
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From linus.luessing at c0d3.blue  Tue Jan 13 18:12:33 2015
From: linus.luessing at c0d3.blue (Linus =?utf-8?Q?L=C3=BCssing?=)
Date: Wed, 14 Jan 2015 00:12:33 +0100
Subject: [OpenWrt-Devel] [PATCH] kernel: bridge: multicast: backport a
 few more fixes for 3.10
In-Reply-To: <1419909056-7614-1-git-send-email-linus.luessing@c0d3.blue>
References: <1419909056-7614-1-git-send-email-linus.luessing@c0d3.blue>
Message-ID: <20150113231233.GG2812@odroid>

On Tue, Dec 30, 2014 at 04:10:56AM +0100, Linus L?ssing wrote:
> The following patches unfortunately didn't hit the kernel stable
> branches yet, therefore cherrypicking them for OpenWRT here:
> 
> * bridge: fix netfilter/NF_BR_LOCAL_OUT for own, locally generated queries
> * bridge: multicast: enable snooping on general queries only
> * bridge: multicast: add sanity check for general query destination
> 
> Signed-off-by: Linus L?ssing <linus.luessing at c0d3.blue>
> ---
>  .../patches-3.10/070-net_bridge_backports.patch    |  193 ++++++++++++++++----
>  .../644-bridge_optimize_netfilter_hooks.patch      |    6 +-
>  2 files changed, 162 insertions(+), 37 deletions(-)
> 

Bump
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From lynxis at fe80.eu  Wed Jan 14 04:56:02 2015
From: lynxis at fe80.eu (Alexander Couzens)
Date: Wed, 14 Jan 2015 10:56:02 +0100
Subject: [OpenWrt-Devel] [PATCH] mdns: install uci package as config
Message-ID: <1421229362-2522-1-git-send-email-lynxis@fe80.eu>

Signed-off-by: Alexander Couzens <lynxis at fe80.eu>
---
 package/network/services/mdns/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/network/services/mdns/Makefile b/package/network/services/mdns/Makefile
index 1c89ca6..690f547 100644
--- a/package/network/services/mdns/Makefile
+++ b/package/network/services/mdns/Makefile
@@ -36,7 +36,7 @@ define Package/mdns/install
 	$(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d $(1)/etc/config
 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/mdns $(1)/usr/sbin/
 	$(INSTALL_BIN) ./files/mdns.init $(1)/etc/init.d/mdns
-	$(INSTALL_BIN) ./files/mdns.config $(1)/etc/config/mdns
+	$(INSTALL_CONF) ./files/mdns.config $(1)/etc/config/mdns
 endef
 
 $(eval $(call BuildPackage,mdns))
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From luka at openwrt.org  Wed Jan 14 05:03:29 2015
From: luka at openwrt.org (Luka Perkov)
Date: Wed, 14 Jan 2015 11:03:29 +0100
Subject: [OpenWrt-Devel] [PATCH] mdns: install uci package as config
In-Reply-To: <1421229362-2522-1-git-send-email-lynxis@fe80.eu>
References: <1421229362-2522-1-git-send-email-lynxis@fe80.eu>
Message-ID: <20150114100329.GC24487@t530.lan>

On Wed, Jan 14, 2015 at 10:56:02AM +0100, Alexander Couzens wrote:
> Signed-off-by: Alexander Couzens <lynxis at fe80.eu>
> ---
>  package/network/services/mdns/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied in r43967. Thanks!

Luka
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From zajec5 at gmail.com  Wed Jan 14 06:43:25 2015
From: zajec5 at gmail.com (=?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?=)
Date: Wed, 14 Jan 2015 12:43:25 +0100
Subject: [OpenWrt-Devel] [PATCH 3/9] kernel: Allow ubi autoattach to run
	on NOR flash
In-Reply-To: <1421164606-3222-4-git-send-email-maxime.ripard@free-electrons.com>
References: <1421164606-3222-1-git-send-email-maxime.ripard@free-electrons.com>
 <1421164606-3222-4-git-send-email-maxime.ripard@free-electrons.com>
Message-ID: <CACna6rz5APOgGThwFSDC8RG_2xhYYVSLyv2Qdv=4nnT_Pa7o=g@mail.gmail.com>

On 13 January 2015 at 16:56, Maxime Ripard
<maxime.ripard at free-electrons.com> wrote:
> Some devices out there only have a NOR flash to store the rootfs on.
>
> While using UBI is arguable on this kind of NAND, this is something that should
> be supported.

So why use UBI at all? Doesn't it make more sense to stick to the
JFFS2? You should be even able to easily create 2 different image
types (one for NOR, one for NAND) in one target (see bcm53xx).
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From kaloz at openwrt.org  Wed Jan 14 06:44:39 2015
From: kaloz at openwrt.org (Imre Kaloz)
Date: Wed, 14 Jan 2015 12:44:39 +0100
Subject: [OpenWrt-Devel] [PATCH 1/9] mvebu: Replace the padjffs2 call by
 the generic definition
In-Reply-To: <1421164606-3222-2-git-send-email-maxime.ripard@free-electrons.com>
References: <1421164606-3222-1-git-send-email-maxime.ripard@free-electrons.com>
 <1421164606-3222-2-git-send-email-maxime.ripard@free-electrons.com>
Message-ID: <op.xsgawpj82s3iss@ecaz>

Thanks, applied in 43968.


Imre

On Tue, 13 Jan 2015 16:56:38 +0100, Maxime Ripard  
<maxime.ripard at free-electrons.com> wrote:

> The mvebu image Makefile directly calls the padjffs2 utility, while  
> there's an
> generic make function to do just that. Switch to it
>
> Signed-off-by: Maxime Ripard <maxime.ripard at free-electrons.com>
> ---
>  target/linux/mvebu/image/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/target/linux/mvebu/image/Makefile  
> b/target/linux/mvebu/image/Makefile
> index 92571e215342..f265dc43d25d 100644
> --- a/target/linux/mvebu/image/Makefile
> +++ b/target/linux/mvebu/image/Makefile
> @@ -44,7 +44,7 @@ define Image/BuildKernel
>  endef
> define Image/Build/squashfs
> -	$(STAGING_DIR_HOST)/bin/padjffs2 $(KDIR)/root.squashfs 128
> +	$(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
>  	$(foreach nandboard,$(NANDBOARDS),$(call  
> Image/Build/UbinizeImage,$(nandboard),,squashfs,$(UBI_OPTS));)
>  	( \
>  		dd if=$(KDIR)/uImage-armada-xp-mamba bs=3072k conv=sync; \
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From kaloz at openwrt.org  Wed Jan 14 06:44:53 2015
From: kaloz at openwrt.org (Imre Kaloz)
Date: Wed, 14 Jan 2015 12:44:53 +0100
Subject: [OpenWrt-Devel] [PATCH 2/9] mvebu: Switch to the generic
	mkuimage macro
In-Reply-To: <1421164606-3222-3-git-send-email-maxime.ripard@free-electrons.com>
References: <1421164606-3222-1-git-send-email-maxime.ripard@free-electrons.com>
 <1421164606-3222-3-git-send-email-maxime.ripard@free-electrons.com>
Message-ID: <op.xsgaw3d12s3iss@ecaz>

Thanks, applied in 43969.


Imre

On Tue, 13 Jan 2015 16:56:39 +0100, Maxime Ripard  
<maxime.ripard at free-electrons.com> wrote:

> The mvebu image makefile define something almost identical to the generic
> implementation found in include/image.mk.
>
> Switch to this implementation.
>
> Signed-off-by: Maxime Ripard <maxime.ripard at free-electrons.com>
> ---
>  target/linux/mvebu/image/Makefile | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/target/linux/mvebu/image/Makefile  
> b/target/linux/mvebu/image/Makefile
> index f265dc43d25d..6e00346fe29a 100644
> --- a/target/linux/mvebu/image/Makefile
> +++ b/target/linux/mvebu/image/Makefile
> @@ -24,15 +24,12 @@ KDIR_TMP:=$(KDIR)/tmp
> UIMAGE:=$(BIN_DIR)/$(IMG_PREFIX)-uImage
> -define Image/Build/MkuImage
> -	mkimage -A arm -O linux -T kernel -a $(LOADADDR) -C none -e  
> $(LOADADDR) \
> -	-n 'ARM OpenWrt Linux-$(LINUX_VERSION)' -d $(1) $(2);
> -endef
> -
>  define Image/Build/DTB
>  	cp $(KDIR)/zImage$(2) $(KDIR)/zImage$(2)-$(1);
>  	cat $(DTS_DIR)/$(1).dtb >> $(KDIR)/zImage$(2)-$(1);
> -	$(call  
> Image/Build/MkuImage,$(KDIR)/zImage$(2)-$(1),$(KDIR)/uImage$(2)-$(1))
> +	$(call Image/BuildKernel/MkuImage, \
> +		none, $(LOADADDR), $(LOADADDR), \
> +		$(KDIR)/zImage$(2)-$(1), $(KDIR)/uImage$(2)-$(1))
>  	cp $(KDIR)/uImage$(2)-$(1) $(UIMAGE)$(2)-$(1);
>  endef
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From kaloz at openwrt.org  Wed Jan 14 06:46:31 2015
From: kaloz at openwrt.org (Imre Kaloz)
Date: Wed, 14 Jan 2015 12:46:31 +0100
Subject: [OpenWrt-Devel] [PATCH 7/9] mvebu: Switch to 3.18
In-Reply-To: <1421164606-3222-8-git-send-email-maxime.ripard@free-electrons.com>
References: <1421164606-3222-1-git-send-email-maxime.ripard@free-electrons.com>
 <1421164606-3222-8-git-send-email-maxime.ripard@free-electrons.com>
Message-ID: <op.xsgazthk2s3iss@ecaz>

Dopped this one, mvebu gained initial 3.18 support in r41232 and already  
uses that by default since r43893.


Imre

On Tue, 13 Jan 2015 16:56:44 +0100, Maxime Ripard  
<maxime.ripard at free-electrons.com> wrote:

> The 3.16 kernel introduced support for the A38x SoC family. In order to  
> support
> them, switch to the newer 3.18 kernel.
>
> Signed-off-by: Maxime Ripard <maxime.ripard at free-electrons.com>
> ---
>  target/linux/mvebu/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/target/linux/mvebu/Makefile b/target/linux/mvebu/Makefile
> index 8dd0e617143e..724e6ed75e7e 100644
> --- a/target/linux/mvebu/Makefile
> +++ b/target/linux/mvebu/Makefile
> @@ -14,7 +14,7 @@ CPU_TYPE:=cortex-a9
>  CPU_SUBTYPE:=vfpv3
>  MAINTAINER:=Imre Kaloz <kaloz at openwrt.org>
> -KERNEL_PATCHVER:=3.14
> +KERNEL_PATCHVER:=3.18
> include $(INCLUDE_DIR)/target.mk
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From kaloz at openwrt.org  Wed Jan 14 06:48:17 2015
From: kaloz at openwrt.org (Imre Kaloz)
Date: Wed, 14 Jan 2015 12:48:17 +0100
Subject: [OpenWrt-Devel] [PATCH 3/9] kernel: Allow ubi autoattach to run
	on NOR flash
In-Reply-To: <1421164606-3222-4-git-send-email-maxime.ripard@free-electrons.com>
References: <1421164606-3222-1-git-send-email-maxime.ripard@free-electrons.com>
 <1421164606-3222-4-git-send-email-maxime.ripard@free-electrons.com>
Message-ID: <op.xsga2rz82s3iss@ecaz>

Maxime,

On Tue, 13 Jan 2015 16:56:40 +0100, Maxime Ripard  
<maxime.ripard at free-electrons.com> wrote:

> Some devices out there only have a NOR flash to store the rootfs on.
>
> While using UBI is arguable on this kind of NAND, this is something that  
> should
> be supported.
>

Could you explain me, why would we want that? For NOR we use  
squashfs+jffs2 everywhere.


Thanks,

Imre
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From kaloz at openwrt.org  Wed Jan 14 06:50:55 2015
From: kaloz at openwrt.org (Imre Kaloz)
Date: Wed, 14 Jan 2015 12:50:55 +0100
Subject: [OpenWrt-Devel] [PATCH 8/9] mvebu: Add the Armada 385 Reference
	Design support
In-Reply-To: <1421164606-3222-9-git-send-email-maxime.ripard@free-electrons.com>
References: <1421164606-3222-1-git-send-email-maxime.ripard@free-electrons.com>
 <1421164606-3222-9-git-send-email-maxime.ripard@free-electrons.com>
Message-ID: <op.xsga65ws2s3iss@ecaz>

On Tue, 13 Jan 2015 16:56:45 +0100, Maxime Ripard
<maxime.ripard at free-electrons.com> wrote:

> ++					partition at 2 {
> ++						label = "data";
> ++						reg = <0x600000 0xa00000>;
> ++					};
> + 				};
> + 			};
> +

This one should be called "rootfs". The image/Makefile change should be  
part of the UBI on NOR discussion/patch, so please make that one a  
separate.


Thanks,

Imre
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From kaloz at openwrt.org  Wed Jan 14 06:52:56 2015
From: kaloz at openwrt.org (Imre Kaloz)
Date: Wed, 14 Jan 2015 12:52:56 +0100
Subject: [OpenWrt-Devel] [PATCH 9/9] mvebu: Add Armada 385 DB AP support
In-Reply-To: <1421164606-3222-10-git-send-email-maxime.ripard@free-electrons.com>
References: <1421164606-3222-1-git-send-email-maxime.ripard@free-electrons.com>
 <1421164606-3222-10-git-send-email-maxime.ripard@free-electrons.com>
Message-ID: <op.xsgbaijz2s3iss@ecaz>

On Tue, 13 Jan 2015 16:56:46 +0100, Maxime Ripard  
<maxime.ripard at free-electrons.com> wrote:

> +diff --git a/arch/arm/boot/dts/armada-385-db-ap.dts  
> b/arch/arm/boot/dts/armada-385-db-ap.dts
> +index 02db04867d8f..2a58443e2504 100644
> +--- a/arch/arm/boot/dts/armada-385-db-ap.dts
> ++++ b/arch/arm/boot/dts/armada-385-db-ap.dts
> +@@ -134,6 +134,21 @@
> + 				marvell,nand-keep-config;
> + 				marvell,nand-enable-arbiter;
> + 				nand-on-flash-bbt;
> ++
> ++				mtd0 at 00000000 {
> ++					label = "U-Boot";
> ++					reg = <0x00000000 0x00800000>;
> ++				};
> ++
> ++				mtd1 at 00800000 {
> ++					label = "uImage";
> ++					reg = <0x00800000 0x00800000>;
> ++				};
> ++
> ++				mtd2 at 01000000 {
> ++					label = "Root";
> ++					reg = <0x01000000 0x3f000000>;
> ++				};
> + 			};
> + 		};
> +

I think this should be "u-boot", "kernel" and (at least in OpenWrt), "ubi".


Thanks,

Imre
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From kaloz at openwrt.org  Wed Jan 14 07:03:49 2015
From: kaloz at openwrt.org (Imre Kaloz)
Date: Wed, 14 Jan 2015 13:03:49 +0100
Subject: [OpenWrt-Devel] [PATCH 4/9] mvebu: Add sub-profiles
In-Reply-To: <1421164606-3222-5-git-send-email-maxime.ripard@free-electrons.com>
References: <1421164606-3222-1-git-send-email-maxime.ripard@free-electrons.com>
 <1421164606-3222-5-git-send-email-maxime.ripard@free-electrons.com>
Message-ID: <op.xsgbsndg2s3iss@ecaz>

Hi Maxime,

On Tue, 13 Jan 2015 16:56:41 +0100, Maxime Ripard  
<maxime.ripard at free-electrons.com> wrote:

> +$(eval $(call MultiProfile,Generic,$(PROFILES_LIST)))
> +$(eval $(call MultiProfile,Evalboards,$(PROFILES_LIST)))

Profile names should be sourced from the profiles.

> -	$(foreach nandboard,$(NANDBOARDS),$(call  
> BuildSysupgrade,$(1),$(nandboard));)
> +	$(call Image/Build/Profile/$(PROFILE)/BuildSysupgrade,$(1))

UBI and BuildSysUpgrade is there for NAND only.

On boards with nor (unless you come up with a really good reason to hack  
UBI) you should stick to squashfs+jffs2. Also, each NOR based board should  
have "firmware" partition and use the OpenWrt MTDSPLIT framework and  
should have a single, flashable firmware image file created instead of  
separate uImage+rootfs stuff.


Imre
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From nbd at openwrt.org  Wed Jan 14 07:07:39 2015
From: nbd at openwrt.org (Felix Fietkau)
Date: Wed, 14 Jan 2015 13:07:39 +0100
Subject: [OpenWrt-Devel] [PATCH 2/9] mvebu: Switch to the generic
 mkuimage macro
In-Reply-To: <1421164606-3222-3-git-send-email-maxime.ripard@free-electrons.com>
References: <1421164606-3222-1-git-send-email-maxime.ripard@free-electrons.com>
 <1421164606-3222-3-git-send-email-maxime.ripard@free-electrons.com>
Message-ID: <54B65C0B.4020400@openwrt.org>

On 2015-01-13 16:56, Maxime Ripard wrote:
> The mvebu image makefile define something almost identical to the generic
> implementation found in include/image.mk.
> 
> Switch to this implementation.
> 
> Signed-off-by: Maxime Ripard <maxime.ripard at free-electrons.com>
FYI, my rework of the image makefile code is in the tree now. You can
find examples in the ramips target (mt7621 based devices), and in ar71xx
(carambola2, wndr3*00).

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


From kaloz at openwrt.org  Wed Jan 14 07:12:27 2015
From: kaloz at openwrt.org (Imre Kaloz)
Date: Wed, 14 Jan 2015 13:12:27 +0100
Subject: [OpenWrt-Devel] [PATCH] Initramfs image copied to bin for malta
	builds
In-Reply-To: <54B43040.3080402@prplfoundation.org>
References: <54B43040.3080402@prplfoundation.org>
Message-ID: <op.xsgb61nr2s3iss@ecaz>

On Mon, 12 Jan 2015 21:36:16 +0100, Eric Schultz  
<eschultz at prplfoundation.org> wrote:

> Malta ramdisk images are no longer copied to output due to a recent  
> change.
> This change reimplements copying of ramdisk images for Malta builds.

Merged in r43970, thank you.


Imre
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From maxime.ripard at free-electrons.com  Wed Jan 14 07:37:37 2015
From: maxime.ripard at free-electrons.com (Maxime Ripard)
Date: Wed, 14 Jan 2015 13:37:37 +0100
Subject: [OpenWrt-Devel] [PATCH 3/9] kernel: Allow ubi autoattach to run
	on NOR flash
In-Reply-To: <CACna6rz5APOgGThwFSDC8RG_2xhYYVSLyv2Qdv=4nnT_Pa7o=g@mail.gmail.com>
References: <1421164606-3222-1-git-send-email-maxime.ripard@free-electrons.com>
 <1421164606-3222-4-git-send-email-maxime.ripard@free-electrons.com>
 <CACna6rz5APOgGThwFSDC8RG_2xhYYVSLyv2Qdv=4nnT_Pa7o=g@mail.gmail.com>
Message-ID: <20150114123737.GR4891@lukather>

On Wed, Jan 14, 2015 at 12:43:25PM +0100, Rafa? Mi?ecki wrote:
> On 13 January 2015 at 16:56, Maxime Ripard
> <maxime.ripard at free-electrons.com> wrote:
> > Some devices out there only have a NOR flash to store the rootfs on.
> >
> > While using UBI is arguable on this kind of NAND, this is something that should
> > be supported.
> 
> So why use UBI at all? Doesn't it make more sense to stick to the
> JFFS2? You should be even able to easily create 2 different image
> types (one for NOR, one for NAND) in one target (see bcm53xx).

The Openblocks AX3 has a fairly large NOR (128MB) which would make
JFFS2 a rather poor choice, and the UBI overhead wouldn't be that bad.

The A385-RD board has a much smaller SPI-NOR (16MB) though, so we
could use jffs2 there, but I wasn't seeing much point at creating a
whole new layout just for a single board.

That does make sense though.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150114/0372bcf8/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From kaloz at openwrt.org  Wed Jan 14 08:21:38 2015
From: kaloz at openwrt.org (Imre Kaloz)
Date: Wed, 14 Jan 2015 14:21:38 +0100
Subject: [OpenWrt-Devel] [RFC] [mvebu] WRT1900AC syscfg as overlay
In-Reply-To: <CAFFfgDxb9+VnavrbD85C1jaOy0Wggf3Dz-x+xCTyGp7UsL0tMg@mail.gmail.com>
References: <CAFFfgDxb9+VnavrbD85C1jaOy0Wggf3Dz-x+xCTyGp7UsL0tMg@mail.gmail.com>
Message-ID: <op.xsgfece72s3iss@ecaz>

Hi Mark,

On Tue, 13 Jan 2015 22:18:13 +0100, mark milburn  
<mark.a.milburn at gmail.com> wrote:

> I believe this is the appropriate forum for discussing this.  Let me
> know if this is not the case.
>
> I think that employing the syscfg partition as the overlayfs is not
> useful for this device, and for at least one case, harmful.
>
> The current setup that allows for a primary and alternate firmware
> image to be loaded is useful, it adds insurance if you aren't using
> the squashfs failsafe.  However:
>
> 1.  If a configuration problem prevents the device from booting, or
> renders the device effectively inaccessible, booting to the alternate
> image may not allow the device to be recovered.  I think this negates
> the utility of having an alternate image.

> 2.  One cannot test two different configurations effectively using two
> different boot images.
>
> Provided it does not affect the ability of a user to flash his or her
> firmware back to a manufacturer image, I would suggest that mtdparts
> be redefined and syscfg removed.

Mainline OpenWrt doesn't use syscfg as the overlay, we only use it to  
store the backup tarfile (if you choose to keep it) upon sysupgrading.


Imre
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From wigyori at uid0.hu  Wed Jan 14 08:22:02 2015
From: wigyori at uid0.hu (Zoltan HERPAI)
Date: Wed, 14 Jan 2015 14:22:02 +0100 (CET)
Subject: [OpenWrt-Devel] [RFC PATCH] mac80211: brcmfmac: separate SDIO
 and USB support
In-Reply-To: <CAFXQaeJO5cu57Kmz7a=iZE0PSKOuPmXyf_C=S+J1ctGWFyFOLg@mail.gmail.com>
References: <alpine.DEB.2.02.1501071946120.29083@trabant.deployis.eu>
 <CAFXQaeLVQoDkKU-sTuOyNtXPLEHFYVjLEVd4pQBXD47TfhpUFw@mail.gmail.com>
 <alpine.DEB.2.02.1501130841050.16924@trabant.deployis.eu>
 <CAFXQaeJO5cu57Kmz7a=iZE0PSKOuPmXyf_C=S+J1ctGWFyFOLg@mail.gmail.com>
Message-ID: <alpine.DEB.2.02.1501141348300.16924@trabant.deployis.eu>

Jose,

On Tue, 13 Jan 2015, Jos? V?zquez wrote:

> 2015-01-13 8:46 GMT+01:00, Zoltan HERPAI <wigyori at uid0.hu>:
>> I haven't seen any flags that does SDIO_SUPPORT or something similar. It's
>> either removing "depend on USB_SUPPORT" or add dependencies for the
>> targets that'll use the SDIO part. Do you know of other approach?
>>
>> Thanks,
>> -w-
>>
> You are right: there isn't SDIO_SUPPORT flag. I suggested to delete
> sunxi dependency because maybe in the future will be support for other
> boards that belong to different targets that will need sdio support to
> make the wifi work.
> Anyway, while only sunxi based boards need it, the patch can be left
> as is to avoid confusion.

Further targets which require this package can be added later - so far 
sunxi is the only one which needs the SDIO support in brcmfmac, unless 
someone comes up with another.

sunxi has USB_SUPPORT, but I wanted to indicate that to enable the SDIO 
part, one does not need to have it, and can be extended easily.

Thanks,
-w-

>> On Tue, 13 Jan 2015, Jos? V?zquez wrote:
>>
>>> IMHO make sdio selecton depends only on sunxi is not a good idea.
>>>
>>> 2015-01-07 20:37 GMT+01:00, Zoltan HERPAI <wigyori at uid0.hu>:
>>>> This patch will add options to select SDIO and USB support in the
>>>> brcmfmac
>>>> driver, and not tie it to only support USB. As the driver doesn't build
>>>> the host interface code into separate .ko, the required ones are
>>>> selected
>>>> via config options.
>>>>
>>>> PCIe support is not added now, can be added later. As of now, only sunxi
>>>> would use the SDIO support for the Ampak modules.
>>>>
>>>> Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
>>>> ---
>>>> Index: package/kernel/mac80211/Makefile
>>>> ===================================================================
>>>> --- package/kernel/mac80211/Makefile	(revision 43857)
>>>> +++ package/kernel/mac80211/Makefile	(working copy)
>>>> @@ -1477,17 +1477,36 @@
>>>>
>>>>   define KernelPackage/brcmfmac
>>>>     $(call KernelPackage/mac80211/Default)
>>>> -  TITLE:=Broadcom IEEE802.11n USB FullMAC WLAN driver
>>>> +  TITLE:=Broadcom IEEE802.11n USB/SDIO FullMAC WLAN driver
>>>>     URL:=http://linuxwireless.org/en/users/Drivers/brcm80211
>>>> -  DEPENDS+= @USB_SUPPORT +kmod-usb-core +kmod-cfg80211
>>>> + at DRIVER_11N_SUPPORT
>>>> +kmod-brcmutil
>>>> +  DEPENDS+= @(USB_SUPPORT||TARGET_sunxi) +kmod-cfg80211
>>>> + at DRIVER_11N_SUPPORT +kmod-brcmutil
>>>>
>>>> FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/brcm80211/brcmfmac/brcmfmac.ko
>>>>     AUTOLOAD:=$(call AutoProbe,brcmfmac)
>>>>   endef
>>>>
>>>>   define KernelPackage/brcmfmac/description
>>>> - Kernel module for Broadcom IEEE802.11n USB Wireless cards
>>>> + Kernel module for Broadcom IEEE802.11n USB/SDIO Wireless cards
>>>>   endef
>>>>
>>>> +define KernelPackage/brcmfmac/config
>>>> +    if PACKAGE_kmod-brcmfmac
>>>> +
>>>> +		config PACKAGE_BRCMFMAC_SDIO
>>>> +			depends TARGET_sunxi
>>>> +			bool "Broadcom FullMAC SDIO support"
>>>> +			help
>>>> +			    Say Y if you want to enable SDIO support for the brcmfmac
>>>> driver.
>>>> +
>>>> +		config PACKAGE_BRCMFMAC_USB
>>>> +			select PACKAGE_kmod-usb-core
>>>> +			default y
>>>> +			bool "Broadcom FullMAC USB support"
>>>> +			help
>>>> +			    Say Y if you want to enable USB support for the brcmfmac driver.
>>>> +
>>>> +    endif
>>>> +endef
>>>> +
>>>>   config_package=$(if $(CONFIG_PACKAGE_kmod-$(1)),m)
>>>>
>>>>   config-y:= \
>>>> @@ -1558,8 +1577,9 @@
>>>>   config-$(call config_package,brcmutil) += BRCMUTIL
>>>>   config-$(call config_package,brcmsmac) += BRCMSMAC
>>>>   config-$(call config_package,brcmfmac) += BRCMFMAC
>>>> -config-y += BRCMFMAC_USB
>>>> +config-$(CONFIG_PACKAGE_BRCMFMAC_USB) += BRCMFMAC_USB
>>>>   config-$(CONFIG_PACKAGE_BRCM80211_DEBUG) += BRCMDBG
>>>> +config-$(CONFIG_PACKAGE_BRCMFMAC_SDIO) += BRCMFMAC_SDIO
>>>>
>>>>   config-$(call config_package,mac80211-hwsim) += MAC80211_HWSIM
>>>>
>>>> @@ -1969,12 +1989,25 @@
>>>>
>>>>   define KernelPackage/brcmfmac/install
>>>>   	$(INSTALL_DIR) $(1)/lib/firmware/brcm
>>>> +ifeq ($(CONFIG_PACKAGE_BRCMFMAC_USB),y)
>>>>   	$(INSTALL_DATA) \
>>>>   		$(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac43236b.bin
>>>> \
>>>>   		$(1)/lib/firmware/brcm/
>>>>   	$(INSTALL_DATA) \
>>>>   		$(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac43143.bin
>>>> \
>>>>   		$(1)/lib/firmware/brcm/
>>>> +endif
>>>> +ifeq ($(CONFIG_PACKAGE_BRCMFMAC_SDIO),y)
>>>> +	$(INSTALL_DATA) \
>>>> +		$(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac4329-sdio.bin
>>>> \
>>>> +		$(1)/lib/firmware/brcm/
>>>> +	$(INSTALL_DATA) \
>>>> +		$(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac4330-sdio.bin
>>>> \
>>>> +		$(1)/lib/firmware/brcm/
>>>> +	$(INSTALL_DATA) \
>>>> +		$(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac43362-sdio.bin
>>>> \
>>>> +		$(1)/lib/firmware/brcm/
>>>> +endif
>>>>   endef
>>>>
>>>>   $(eval $(call KernelPackage,adm8211))
>>>> _______________________________________________
>>>> openwrt-devel mailing list
>>>> openwrt-devel at lists.openwrt.org
>>>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>>>>
>>>
>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From valent.turkovic at gmail.com  Wed Jan 14 10:05:33 2015
From: valent.turkovic at gmail.com (valent.turkovic at gmail.com)
Date: Wed, 14 Jan 2015 16:05:33 +0100
Subject: [OpenWrt-Devel] Is Linksys/Belkin lying (again) about being open
 source (WRT1200AC router) ?
Message-ID: <CAD=nrE-Dbhcv36M9KKg26V3u35vr1i4TYqrazKJ4Jf0PPzrT=Q@mail.gmail.com>

Linksys/Belking marketing is again doing one thing and saying another?

This time they say that WRT1200AC router is open source:
http://www.zdnet.com/article/ces-2015-linksys-1200ac-an-inexpensive-open-source-802-11ac-wi-fi-router/

I have tracked progress with WRT1900AC and saw how they failed to give us
open source driver, so I hope that this time they will actually keep their
(marketing) promise.

I really, really, really hope that this time they have reached out and
contacted any of you OpenWrt developers and that we will get truly open
source driver from them.

So please let us know if any of you have heard anything regarding WRT1200AC
router and it's drivers.

Cheers,
Valent.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150114/a4a887d3/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From kaloz at openwrt.org  Wed Jan 14 10:10:54 2015
From: kaloz at openwrt.org (Imre Kaloz)
Date: Wed, 14 Jan 2015 16:10:54 +0100
Subject: [OpenWrt-Devel] Is Linksys/Belkin lying (again) about being
 open source (WRT1200AC router) ?
In-Reply-To: <CAD=nrE-Dbhcv36M9KKg26V3u35vr1i4TYqrazKJ4Jf0PPzrT=Q@mail.gmail.com>
References: <CAD=nrE-Dbhcv36M9KKg26V3u35vr1i4TYqrazKJ4Jf0PPzrT=Q@mail.gmail.com>
Message-ID: <op.xsgkggs52s3iss@ecaz>

On Wed, 14 Jan 2015 16:05:33 +0100, valent.turkovic at gmail.com  
<valent.turkovic at gmail.com> wrote:

> Linksys/Belking marketing is again doing one thing and saying another?
>
> This time they say that WRT1200AC router is open source:
> http://www.zdnet.com/article/ces-2015-linksys-1200ac-an-inexpensive-open-source-802-11ac-wi-fi-router/
>
> I have tracked progress with WRT1900AC and saw how they failed to give us
> open source driver, so I hope that this time they will actually keep  
> their
> (marketing) promise.

Marvell released a new wifi driver at the end and they are working on  
fixing up the reported bugs.

> I really, really, really hope that this time they have reached out and
> contacted any of you OpenWrt developers and that we will get truly open
> source driver from them.
>
> So please let us know if any of you have heard anything regarding  
> WRT1200AC
> router and it's drivers.

I'll work on the support for that unit, don't worry :)


Imre
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From mark.a.milburn at gmail.com  Wed Jan 14 13:14:13 2015
From: mark.a.milburn at gmail.com (mark milburn)
Date: Wed, 14 Jan 2015 11:14:13 -0700
Subject: [OpenWrt-Devel] [RFC] [mvebu] WRT1900AC syscfg as overlay
In-Reply-To: <op.xsgfece72s3iss@ecaz>
References: <CAFFfgDxb9+VnavrbD85C1jaOy0Wggf3Dz-x+xCTyGp7UsL0tMg@mail.gmail.com>
 <op.xsgfece72s3iss@ecaz>
Message-ID: <CAFFfgDx13mvO0cqSmg5U7VwhtPuVQeVO6TS0DXMh+D31=YrJtw@mail.gmail.com>

I should have looked at the code before posting.  :)

On Wed, Jan 14, 2015 at 6:21 AM, Imre Kaloz <kaloz at openwrt.org> wrote:
> Hi Mark,
>
>
> On Tue, 13 Jan 2015 22:18:13 +0100, mark milburn <mark.a.milburn at gmail.com>
> wrote:
>
>> I believe this is the appropriate forum for discussing this.  Let me
>> know if this is not the case.
>>
>> I think that employing the syscfg partition as the overlayfs is not
>> useful for this device, and for at least one case, harmful.
>>
>> The current setup that allows for a primary and alternate firmware
>> image to be loaded is useful, it adds insurance if you aren't using
>> the squashfs failsafe.  However:
>>
>> 1.  If a configuration problem prevents the device from booting, or
>> renders the device effectively inaccessible, booting to the alternate
>> image may not allow the device to be recovered.  I think this negates
>> the utility of having an alternate image.
>
>
>> 2.  One cannot test two different configurations effectively using two
>> different boot images.
>>
>> Provided it does not affect the ability of a user to flash his or her
>> firmware back to a manufacturer image, I would suggest that mtdparts
>> be redefined and syscfg removed.
>
>
> Mainline OpenWrt doesn't use syscfg as the overlay, we only use it to store
> the backup tarfile (if you choose to keep it) upon sysupgrading.
>
>
> Imre
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From gianluca at sottospazio.it  Wed Jan 14 14:19:20 2015
From: gianluca at sottospazio.it (Gianluca Anzolin)
Date: Wed, 14 Jan 2015 20:19:20 +0100
Subject: [OpenWrt-Devel] Hardlock in ath9k
Message-ID: <54B6C138.9090206@sottospazio.it>

Hi,

I was just testing this evening, just for fun, a new build with the just 
released musl libc (1.1.6) on my new router (Archer C7) but 
unfortunately it bricked my router.

Initially I feared that I did something wrong when updating the libc but 
this turned out not to be the case.

With the help of a serial cable I noticed that the router freezed when 
trying to bring up the wireless interface (in the NG band).

I skimmed through the commits and reverted the last ath9k commit:

git-svn-id: svn://svn.openwrt.org/openwrt/trunk at 43971 
3c298f89-4303-0410-b956-a3cf2f4a3e73

I rebuilt the image and the router worked.

I haven't had the time to look at the actual commit yet, I just wanted 
to let you know.

Gianluca
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From lobl.pavel at gmail.com  Wed Jan 14 19:14:43 2015
From: lobl.pavel at gmail.com (=?UTF-8?q?Pavel=20L=C3=B6bl?=)
Date: Thu, 15 Jan 2015 01:14:43 +0100
Subject: [OpenWrt-Devel] [PATCH] ramips: add i2c pingroup to the pinmux for
	rt-n14u
Message-ID: <1421280883-3369-1-git-send-email-lobl.pavel@gmail.com>

i2c pins are wired to wps a reset button

Signed-off-by: Pavel L?bl <lobl.pavel at gmail.com>
---
 target/linux/ramips/dts/RT-N14U.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ramips/dts/RT-N14U.dts b/target/linux/ramips/dts/RT-N14U.dts
index 66ac0fc..d95d32d 100644
--- a/target/linux/ramips/dts/RT-N14U.dts
+++ b/target/linux/ramips/dts/RT-N14U.dts
@@ -73,7 +73,7 @@
 	pinctrl {
 		state_default: pinctrl0 {
 			default {
-				ralink,group = "ephy", "wled";
+				ralink,group = "ephy", "wled", "i2c";
 				ralink,function = "gpio";
 			};
 		};
-- 
2.1.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From nbd at openwrt.org  Wed Jan 14 22:25:52 2015
From: nbd at openwrt.org (Felix Fietkau)
Date: Thu, 15 Jan 2015 04:25:52 +0100
Subject: [OpenWrt-Devel] Hardlock in ath9k
In-Reply-To: <54B6C138.9090206@sottospazio.it>
References: <54B6C138.9090206@sottospazio.it>
Message-ID: <54B73340.7000000@openwrt.org>

On 2015-01-14 20:19, Gianluca Anzolin wrote:
> Hi,
> 
> I was just testing this evening, just for fun, a new build with the just 
> released musl libc (1.1.6) on my new router (Archer C7) but 
> unfortunately it bricked my router.
> 
> Initially I feared that I did something wrong when updating the libc but 
> this turned out not to be the case.
> 
> With the help of a serial cable I noticed that the router freezed when 
> trying to bring up the wireless interface (in the NG band).
> 
> I skimmed through the commits and reverted the last ath9k commit:
> 
> git-svn-id: svn://svn.openwrt.org/openwrt/trunk at 43971 
> 3c298f89-4303-0410-b956-a3cf2f4a3e73
> 
> I rebuilt the image and the router worked.
> 
> I haven't had the time to look at the actual commit yet, I just wanted 
> to let you know.
Please try applying http://nbd.name/ath79-irq-disable.patch to your
kernel tree and see if it fixes the issue.

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


From cat at vv.carleton.ca  Thu Jan 15 00:07:24 2015
From: cat at vv.carleton.ca (Catalin Patulea)
Date: Thu, 15 Jan 2015 00:07:24 -0500
Subject: [OpenWrt-Devel] ddns-scripts 2.0.1-1 breaks freedns.afraid.org?
In-Reply-To: <54B52850.30708@gmail.com>
References: <CAE2LqH+-uRuHVyRj5vQZTc5sg_-Rdgv38+4THzdHYAxBdPYh0w@mail.gmail.com>
 <54B4D1BA.5060804@openwrt.org> <54B52850.30708@gmail.com>
Message-ID: <CAE2LqHKHpB++pacYxt812RY2EpUkx3PNgz7+61vS2+aiueumBA@mail.gmail.com>

I've opened a pull request for this (and other misc fixes):
https://github.com/openwrt/packages/pull/779

On Tue, Jan 13, 2015 at 9:14 AM, Christian Schoenebeck
<christian.schoenebeck at gmail.com> wrote:
> I put it on the TODO list.
> Thanks for feedback
> Christian
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From cat at vv.carleton.ca  Thu Jan 15 00:17:41 2015
From: cat at vv.carleton.ca (Catalin Patulea)
Date: Thu, 15 Jan 2015 00:17:41 -0500
Subject: [OpenWrt-Devel] ddns-scripts "sleep 10" before updating?
In-Reply-To: <54B5241A.2020105@gmail.com>
References: <CAE2LqHL5T0RTVPWuoY73M5bMi_0x1S3KhRb8GpVz0Fkm4Zcp8g@mail.gmail.com>
 <54B5241A.2020105@gmail.com>
Message-ID: <CAE2LqH+tHYRD+Zy3xABd=6_hRXY_hj-x3+wKwEV+EwMukFtXAA@mail.gmail.com>

On Tue, Jan 13, 2015 at 8:56 AM, Christian Schoenebeck
<christian.schoenebeck at gmail.com> wrote:
> from my point of view 10 seconds to wait before sending an update to the ddns provider is not a big deal because it takes up to 5 minutes until "nslookup [yourhost] 8.8.8.8" gives you back a static answer after a change.
> So Google's mameserver need up to 5 Minutes to sync themselves.
How did you conclude about the 5 minutes? Technically caching DNS
servers should respect the TTL of the original record. RFC 1035 even
allows zero TTL to prevent caching. I agree that some servers may
actually impose a minimum TTL, but ddns-scripts should not make any
assumptions about this.

In my case, I have DDNS records which are rarely accessed (are not
likely to be cached by intermediate DNS servers). When a client makes
a DNS request for my DDNS name, it will be forwarded the entire way to
the authoritative DNS server. So the openwrt update latency dominates
the delay, not TTL expiration, so it's useful for me to update ASAP
after the interfaces gets an address.

Are you still planning on running some tests on your side?
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From gch981213 at gmail.com  Thu Jan 15 00:28:06 2015
From: gch981213 at gmail.com (=?UTF-8?B?6YOt5Lyg6Yic?=)
Date: Thu, 15 Jan 2015 13:28:06 +0800
Subject: [OpenWrt-Devel] [PATCH] [ar71xx] Add support for MERCURY
	MAC1200R
In-Reply-To: <1420976894-12794-1-git-send-email-openwrt@rogerpueyo.com>
References: <1420976894-12794-1-git-send-email-openwrt@rogerpueyo.com>
Message-ID: <CAJsYDVJTFBWXumYTN0Yv1Syh7mO7KvJXY86VjjMseR5=MpukJQ@mail.gmail.com>

2015-01-11 19:48 GMT+08:00  <openwrt at rogerpueyo.com>:
> From: Roger Pueyo Centelles <roger.pueyo at guifi.net>
>
> ---
>  target/linux/ar71xx/base-files/etc/diag.sh         |   3 +
>  .../ar71xx/base-files/etc/uci-defaults/01_leds     |   5 +
>  .../ar71xx/base-files/etc/uci-defaults/02_network  |   1 +
>  target/linux/ar71xx/base-files/lib/ar71xx.sh       |   6 +
>  .../ar71xx/base-files/lib/upgrade/platform.sh      |   1 +
>  target/linux/ar71xx/config-3.14                    |   1 +
>  .../files/arch/mips/ath79/mach-mc-mac1200r.c       | 157
+++++++++++++++++++++
>  target/linux/ar71xx/generic/profiles/mercury.mk    |  17 +++
>  target/linux/ar71xx/image/Makefile                 |   1 +
>  .../736-MIPS-ath79-add-MC-MAC1200R-support.patch   |  39 +++++
>  10 files changed, 231 insertions(+)
>  create mode 100644
target/linux/ar71xx/files/arch/mips/ath79/mach-mc-mac1200r.c
>  create mode 100644 target/linux/ar71xx/generic/profiles/mercury.mk
>  create mode 100644
target/linux/ar71xx/patches-3.14/736-MIPS-ath79-add-MC-MAC1200R-support.patch
>
> diff --git a/target/linux/ar71xx/base-files/etc/diag.sh
b/target/linux/ar71xx/base-files/etc/diag.sh
> index 06b96a3..388727f 100755
> --- a/target/linux/ar71xx/base-files/etc/diag.sh
> +++ b/target/linux/ar71xx/base-files/etc/diag.sh
> @@ -105,6 +105,9 @@ get_status_led() {
>         ls-sr71)
>                 status_led="ubnt:green:d22"
>                 ;;
> +       mc-mac1200r)
> +               status_led="mercury:green:system"
> +               ;;
>         mr600)
>                 status_led="mr600:orange:power"
>                 ;;
> diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
> index 296ea57..dc5dfa1 100755
> --- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
> +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
> @@ -166,6 +166,11 @@ hornet-ub)
>         ucidef_set_led_usbdev "usb" "USB" "alfa:blue:usb" "1-1"
>         ;;
>
> +mc-mac1200r)
> +       ucidef_set_led_wlan "wlan2g" "WLAN2G" "mercury:green:wlan2g"
"phy1tpt"

I think the following line is incorrect:
> +       ucidef_set_led_wlan "wlan5g" "WLAN5G" "mercury:green:wlan5g"
"phy0tpt"
There is no LED trigger called 'phy0tpt' so I think we should use netdev
trigger like this:
ucidef_set_led_netdev "wlan5g" "WLAN5G" "mercury:green:wlan5g" "wlan0"


> +       ;;
> +
>  mr600)
>         ucidef_set_led_wlan "wlan58" "WLAN58" "mr600:green:wlan58"
"phy0tpt"
>         ;;
> diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
> index b4b6cb3..8151470 100755
> --- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
> +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
> @@ -367,6 +367,7 @@ dir-615-e1 |\
>  dir-615-e4 |\
>  hiwifi-hc6361 |\
>  ja76pf |\
> +mc-mac1200r|\
>  mynet-n600 |\
>  oolite |\
>  qihoo-c301 |\
> diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
> index 9b056e9..3ce63aa 100755
> --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
> +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
> @@ -97,6 +97,9 @@ tplink_board_detect() {
>         "015300"*)
>                 model="EasyLink EL-MINI"
>                 ;;
> +       "120000"*)
> +               model="MERCURY MAC1200R"
> +               ;;
>         "3C0001"*)
>                 model="OOLITE"
>                 ;;
> @@ -432,6 +435,9 @@ ar71xx_board_detect() {
>         *LS-SR71)
>                 name="ls-sr71"
>                 ;;
> +       *"MAC1200R")
> +               name="mc-mac1200r"
> +               ;;
>         *MR600v2)
>                 name="mr600v2"
>                 ;;
> diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
> index 6dabf4e..7153614 100755
> --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
> +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
> @@ -297,6 +297,7 @@ platform_check_image() {
>         el-m150 | \
>         el-mini | \
>         gl-inet | \
> +       mc-mac1200r | \
>         oolite | \
>         smart-300 | \
>         tl-mr10u | \
> diff --git a/target/linux/ar71xx/config-3.14
b/target/linux/ar71xx/config-3.14
> index b6fa4ab..a99c082 100644
> --- a/target/linux/ar71xx/config-3.14
> +++ b/target/linux/ar71xx/config-3.14
> @@ -64,6 +64,7 @@ CONFIG_ATH79_MACH_HIWIFI_HC6361=y
>  CONFIG_ATH79_MACH_HORNET_UB=y
>  CONFIG_ATH79_MACH_JA76PF=y
>  CONFIG_ATH79_MACH_JWAP003=y
> +CONFIG_ATH79_MACH_MC_MAC1200R=y
>  CONFIG_ATH79_MACH_MR600=y
>  CONFIG_ATH79_MACH_MR900=y
>  CONFIG_ATH79_MACH_MYNET_N600=y
> diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-mc-mac1200r.c
b/target/linux/ar71xx/files/arch/mips/ath79/mach-mc-mac1200r.c
> new file mode 100644
> index 0000000..6b92b9c
> --- /dev/null
> +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-mc-mac1200r.c
> @@ -0,0 +1,157 @@
> +/*
> + *  MERCURY MAC1200R board support
> + *
> + *  Copyright (C) 2012 Gabor Juhos <juhosg at openwrt.org>
> + *  Copyright (C) 2013 Gui Iribarren <gui at altermundi.net>
> + *
> + *  This program is free software; you can redistribute it and/or modify
it
> + *  under the terms of the GNU General Public License version 2 as
published
> + *  by the Free Software Foundation.
> + */
> +
> +#include <linux/pci.h>
> +#include <linux/phy.h>
> +#include <linux/gpio.h>
> +#include <linux/platform_device.h>
> +#include <linux/ath9k_platform.h>
> +#include <linux/ar8216_platform.h>
> +
> +#include <asm/mach-ath79/ar71xx_regs.h>
> +
> +#include "common.h"
> +#include "dev-ap9x-pci.h"
> +#include "dev-eth.h"
> +#include "dev-gpio-buttons.h"
> +#include "dev-leds-gpio.h"
> +#include "dev-m25p80.h"
> +#include "dev-spi.h"
> +#include "dev-wmac.h"
> +#include "machtypes.h"
> +
> +#define MAC1200R_GPIO_LED_WLAN2G       13
> +#define MAC1200R_GPIO_LED_WLAN5G       17
> +#define MAC1200R_GPIO_LED_SYSTEM       14
> +#define MAC1200R_GPIO_LED_WPS          11
> +#define MAC1200R_GPIO_LED_WAN          12
> +#define MAC1200R_GPIO_LED_LAN1         15
> +#define MAC1200R_GPIO_LED_LAN2         21
> +#define MAC1200R_GPIO_LED_LAN3         22
> +#define MAC1200R_GPIO_LED_LAN4         20
> +
> +#define MAC1200R_GPIO_BTN_WPS          16
> +
> +#define MAC1200R_KEYS_POLL_INTERVAL    20      /* msecs */
> +#define MAC1200R_KEYS_DEBOUNCE_INTERVAL        (3 *
MAC1200R_KEYS_POLL_INTERVAL)
> +
> +#define MAC1200R_MAC0_OFFSET           0
> +#define MAC1200R_MAC1_OFFSET           6
> +#define MAC1200R_WMAC_CALDATA_OFFSET   0x1000
> +#define MAC1200R_PCIE_CALDATA_OFFSET   0x5000
> +
> +static const char *mac1200r_part_probes[] = {
> +       "tp-link",
> +       NULL,
> +};
> +
> +static struct flash_platform_data mac1200r_flash_data = {
> +       .part_probes    = mac1200r_part_probes,
> +};
> +
> +static struct gpio_led mac1200r_leds_gpio[] __initdata = {
> +       {
> +               .name           = "mercury:green:wps",
> +               .gpio           = MAC1200R_GPIO_LED_WPS,
> +               .active_low     = 1,
> +       },
> +       {
> +               .name           = "mercury:green:system",
> +               .gpio           = MAC1200R_GPIO_LED_SYSTEM,
> +               .active_low     = 1,
> +       },
> +       {
> +               .name           = "mercury:green:wlan2g",
> +               .gpio           = MAC1200R_GPIO_LED_WLAN2G,
> +               .active_low     = 1,
> +       },
> +       {
> +               .name           = "mercury:green:wlan5g",
> +               .gpio           = MAC1200R_GPIO_LED_WLAN5G,
> +               .active_low     = 1,
> +       },
> +};
> +

Although the key is called WPS/RESET , I think a reset button is more
important than a WPS button.That's just my personal opinion :)
> +static struct gpio_keys_button mac1200r_gpio_keys[] __initdata = {
> +       {
> +               .desc           = "WPS button",
> +               .type           = EV_KEY,
> +               .code           = KEY_WPS_BUTTON,
> +               .debounce_interval = MAC1200R_KEYS_DEBOUNCE_INTERVAL,
> +               .gpio           = MAC1200R_GPIO_BTN_WPS,
> +               .active_low     = 1,
> +       },
> +};


> +
> +
> +static void __init mac1200r_setup(void)
> +{
> +       u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
> +       u8 *art = (u8 *) KSEG1ADDR(0x1fff0000);
> +       u8 tmpmac[ETH_ALEN];
> +
> +       ath79_register_m25p80(&mac1200r_flash_data);
> +
> +       ath79_register_leds_gpio(-1, ARRAY_SIZE(mac1200r_leds_gpio),
> +                                       mac1200r_leds_gpio);
> +
> +       ath79_register_gpio_keys_polled(-1, MAC1200R_KEYS_POLL_INTERVAL,
> +                                       ARRAY_SIZE(mac1200r_gpio_keys),
> +                                       mac1200r_gpio_keys);
> +
> +       ath79_init_mac(tmpmac, mac, 0);
> +
> +       ath79_register_wmac(art + MAC1200R_WMAC_CALDATA_OFFSET, tmpmac);
> +
> +       ath79_init_mac(tmpmac, mac, 1);
> +       //ap9x_pci_setup_wmac_led_pin(0, 0);
> +


> +       ap91_pci_init(art + MAC1200R_PCIE_CALDATA_OFFSET, tmpmac);
What? I think this function is only able to load CALDATA for ath9k
devices.Maybe I'm wrong:)

> +
> +       ath79_setup_ar934x_eth_cfg(AR934X_ETH_CFG_SW_ONLY_MODE);
> +
> +       ath79_register_mdio(1, 0x0);
> +
> +       /* LAN */
> +       ath79_init_mac(ath79_eth1_data.mac_addr, mac, -1);
> +
> +       /* GMAC1 is connected to the internal switch */
> +       ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII;
> +
> +       ath79_register_eth(1);
> +
> +       /* WAN */
> +       ath79_init_mac(ath79_eth0_data.mac_addr, mac, 2);
> +
> +       /* GMAC0 is connected to the PHY4 of the internal switch */
> +       ath79_switch_data.phy4_mii_en = 1;
> +       ath79_switch_data.phy_poll_mask = BIT(4);
> +       ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
> +       ath79_eth0_data.phy_mask = BIT(4);
> +       ath79_eth0_data.mii_bus_dev = &ath79_mdio1_device.dev;
> +
> +       ath79_register_eth(0);
> +
> +       ath79_gpio_output_select(MAC1200R_GPIO_LED_LAN1,
> +                                AR934X_GPIO_OUT_LED_LINK3);
> +       ath79_gpio_output_select(MAC1200R_GPIO_LED_LAN2,
> +                                AR934X_GPIO_OUT_LED_LINK2);
> +       ath79_gpio_output_select(MAC1200R_GPIO_LED_LAN3,
> +                                AR934X_GPIO_OUT_LED_LINK1);
> +       ath79_gpio_output_select(MAC1200R_GPIO_LED_LAN4,
> +                                AR934X_GPIO_OUT_LED_LINK0);
> +       ath79_gpio_output_select(MAC1200R_GPIO_LED_WAN,
> +                                AR934X_GPIO_OUT_LED_LINK4);
> +}
> +
> +MIPS_MACHINE(ATH79_MACH_MC_MAC1200R, "MC-MAC1200R",
> +            "MERCURY MAC1200R",
> +            mac1200r_setup);
> diff --git a/target/linux/ar71xx/generic/profiles/mercury.mk
b/target/linux/ar71xx/generic/profiles/mercury.mk
> new file mode 100644
> index 0000000..8ce864d
> --- /dev/null
> +++ b/target/linux/ar71xx/generic/profiles/mercury.mk
> @@ -0,0 +1,17 @@
> +#
> +# Copyright (C) 2015 OpenWrt.org
> +#
> +# This is free software, licensed under the GNU General Public License
v2.
> +# See /LICENSE for more information.
> +#
> +
> +
> +define Profile/MAC1200R
> +       NAME:=MERCURY MAC1200R
> +       PACKAGES:=kmod-ath10k
> +endef
> +
> +define Profile/MAC1200R/Description
> +       Package set optimized for the MERCURY MAC1200R.
> +endef
> +$(eval $(call Profile,MAC1200R))
> diff --git a/target/linux/ar71xx/image/Makefile
b/target/linux/ar71xx/image/Makefile
> index ef52f46..9621e0b 100644
> --- a/target/linux/ar71xx/image/Makefile
> +++ b/target/linux/ar71xx/image/Makefile
> @@ -1380,6 +1380,7 @@ $(eval $(call
SingleProfile,TPLINK-LZMA,64kraw,ELM150,el-m150,EL-M150,ttyATH0,11
>  $(eval $(call
SingleProfile,TPLINK-LZMA,64kraw,ELMINI,el-mini,EL-MINI,ttyATH0,115200,0x01530001,1,8Mlzma))
>  $(eval $(call
SingleProfile,TPLINK-LZMA,64kraw,GLINET6408A,gl-inet-6408A-v1,GL-INET,ttyATH0,115200,0x08000001,1,8Mlzma))
>  $(eval $(call
SingleProfile,TPLINK-LZMA,64kraw,GLINET6416A,gl-inet-6416A-v1,GL-INET,ttyATH0,115200,0x08000001,1,16Mlzma))


> +$(eval $(call
SingleProfile,TPLINK-LZMA,64kraw,MAC1200R,mc-mac1200r,MC-MAC1200R,ttyS0,115200,0x12000001,1,8Mlzma))
The factory image is broken since TP-LINK started to use a new firmware
format with RSA signature in China.This should be introduced in the TOH
wiki I think:)

>  $(eval $(call
SingleProfile,TPLINK-LZMA,64kraw,TLMR10U,tl-mr10u-v1,TL-MR10U,ttyATH0,115200,0x00100101,1,4Mlzma))
>  $(eval $(call
SingleProfile,TPLINK-LZMA,64kraw,TLMR11UV1,tl-mr11u-v1,TL-MR11U,ttyATH0,115200,0x00110101,1,4Mlzma))
>  $(eval $(call
SingleProfile,TPLINK-LZMA,64kraw,TLMR11UV2,tl-mr11u-v2,TL-MR11U,ttyATH0,115200,0x00110102,1,4Mlzma))
> diff --git
a/target/linux/ar71xx/patches-3.14/736-MIPS-ath79-add-MC-MAC1200R-support.patch
b/target/linux/ar71xx/patches-3.14/736-MIPS-ath79-add-MC-MAC1200R-support.patch
> new file mode 100644
> index 0000000..bb4d584
> --- /dev/null
> +++
b/target/linux/ar71xx/patches-3.14/736-MIPS-ath79-add-MC-MAC1200R-support.patch
> @@ -0,0 +1,39 @@
> +--- a/arch/mips/ath79/Kconfig
> ++++ b/arch/mips/ath79/Kconfig
> +@@ -374,6 +374,16 @@
> +       select ATH79_DEV_LEDS_GPIO
> +       select ATH79_DEV_M25P80
> +
> ++config ATH79_MACH_MC_MAC1200R
> ++      bool "MERCURY MAC1200R board support"
> ++      select SOC_AR934X
> ++      select ATH79_DEV_AP9X_PCI if PCI
> ++      select ATH79_DEV_ETH
> ++      select ATH79_DEV_GPIO_BUTTONS
> ++      select ATH79_DEV_LEDS_GPIO
> ++      select ATH79_DEV_M25P80
> ++      select ATH79_DEV_WMAC
> ++
> + config ATH79_MACH_RB4XX
> +       bool "MikroTik RouterBOARD 4xx series support"
> +       select SOC_AR71XX
> +--- a/arch/mips/ath79/Makefile
> ++++ b/arch/mips/ath79/Makefile
> +@@ -66,6 +66,7 @@
> + obj-$(CONFIG_ATH79_MACH_JA76PF)               += mach-ja76pf.o
> + obj-$(CONFIG_ATH79_MACH_JWAP003)      += mach-jwap003.o
> + obj-$(CONFIG_ATH79_MACH_HORNET_UB)    += mach-hornet-ub.o
> ++obj-$(CONFIG_ATH79_MACH_MC_MAC1200R)     += mach-mc-mac1200r.o
> + obj-$(CONFIG_ATH79_MACH_MR600)                += mach-mr600.o
> + obj-$(CONFIG_ATH79_MACH_MYNET_N600)   += mach-mynet-n600.o
> + obj-$(CONFIG_ATH79_MACH_MYNET_REXT)   += mach-mynet-rext.o
> +--- a/arch/mips/ath79/machtypes.h
> ++++ b/arch/mips/ath79/machtypes.h
> +@@ -89,6 +89,7 @@
> +       ATH79_MACH_TEW_673GRU,          /* TRENDnet TEW-673GRU */
> +       ATH79_MACH_TEW_712BR,           /* TRENDnet TEW-712BR */
> +       ATH79_MACH_TEW_732BR,           /* TRENDnet TEW-732BR */
> ++      ATH79_MACH_MC_MAC1200R,         /* MERCURY MAC1200R*/
> +       ATH79_MACH_TL_MR10U,            /* TP-LINK TL-MR10U */
> +       ATH79_MACH_TL_MR11U,            /* TP-LINK TL-MR11U */
> +       ATH79_MACH_TL_MR13U,            /* TP-LINK TL-MR13U */
> --
> 2.1.4
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Ah... I'm not sure I've describe what I think correctly because of my bad
english.Sorry:-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150115/7864cbc8/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From zajec5 at gmail.com  Thu Jan 15 01:54:05 2015
From: zajec5 at gmail.com (=?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?=)
Date: Thu, 15 Jan 2015 07:54:05 +0100
Subject: [OpenWrt-Devel] How to enable EARLY_PRINTK by default on ARM target?
Message-ID: <CACna6rzzUWgP1nUe2x1nHLORv9fADQRPBZAdQSXSVahzRPHaEw@mail.gmail.com>

I wanted bcm53xx kernels to be compiled with EARLY_PRINTK by default.
This is safe, we enable "earlyprintk" using bootargs on tested devices
only.

So I have config option enabled in default configs:
> grep EARLY_PRINTK target/linux/bcm53xx/config-3.1*
target/linux/bcm53xx/config-3.14:CONFIG_EARLY_PRINTK=y
target/linux/bcm53xx/config-3.18:CONFIG_EARLY_PRINTK=y

However it gets overwritten by KERNEL_EARLY_PRINTK defined in
config/Config-kernel.in.

KERNEL_EARLY_PRINTK:
1) depends on arm - so non-ARM targets are not affected
2) default n - which disables it by default

-- 
Rafa?
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From zajec5 at gmail.com  Thu Jan 15 06:42:51 2015
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Thu, 15 Jan 2015 12:42:51 +0100
Subject: [OpenWrt-Devel] [PATCH libubox 1/2] usock: add helper waiting for
	socket to be ready
Message-ID: <1421322172-6939-1-git-send-email-zajec5@gmail.com>

Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com>
---
 usock.c | 30 ++++++++++++++++++++++++++++++
 usock.h | 11 +++++++++++
 2 files changed, 41 insertions(+)

diff --git a/usock.c b/usock.c
index 04ed4ee..39909c1 100644
--- a/usock.c
+++ b/usock.c
@@ -117,3 +117,33 @@ int usock(int type, const char *host, const char *service) {
 	usock_set_flags(sock, type);
 	return sock;
 }
+
+int usock_wait_ready(int fd, int msecs) {
+	fd_set fds;
+	struct timeval tv;
+	int res;
+
+	FD_ZERO(&fds);
+	FD_SET(fd, &fds);
+
+	tv.tv_sec = msecs / 1000;
+	tv.tv_usec = (msecs % 1000) * 1000;
+
+	res = select(fd + 1, NULL, &fds, NULL, &tv);
+	if (res < 0) {
+		return errno;
+	} else if (res == 0) {
+		return -ETIMEDOUT;
+	} else {
+		int err = 0;
+		socklen_t optlen = sizeof(err);
+
+		res = getsockopt(fd, SOL_SOCKET, SO_ERROR, &err, &optlen);
+		if (res)
+			return errno;
+		if (err)
+			return err;
+	}
+
+	return 0;
+}
diff --git a/usock.h b/usock.h
index 8f30add..c97fc40 100644
--- a/usock.h
+++ b/usock.h
@@ -32,4 +32,15 @@
 
 int usock(int type, const char *host, const char *service);
 
+/**
+ * Wait for a socket to become ready.
+ *
+ * This may be useful for users of USOCK_NONBLOCK to wait (with a timeout)
+ * for a socket.
+ *
+ * @param fd file descriptor of socket
+ * @param msecs timeout in microseconds
+ */
+int usock_wait_ready(int fd, int msecs);
+
 #endif /* USOCK_H_ */
-- 
1.8.4.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From zajec5 at gmail.com  Thu Jan 15 06:42:52 2015
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Thu, 15 Jan 2015 12:42:52 +0100
Subject: [OpenWrt-Devel] [PATCH libubox 2/2] usock: set socket flags right
	after creating it
In-Reply-To: <1421322172-6939-1-git-send-email-zajec5@gmail.com>
References: <1421322172-6939-1-git-send-email-zajec5@gmail.com>
Message-ID: <1421322172-6939-2-git-send-email-zajec5@gmail.com>

Otherwise some flags like USOCK_NONBLOCK wouldn't work as expected
(O_NONBLOCK affects connect behavior).

Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com>
---
 usock.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/usock.c b/usock.c
index 39909c1..7bde620 100644
--- a/usock.c
+++ b/usock.c
@@ -38,7 +38,7 @@ static void usock_set_flags(int sock, unsigned int type)
 		fcntl(sock, F_SETFL, fcntl(sock, F_GETFL) | O_NONBLOCK);
 }
 
-static int usock_connect(struct sockaddr *sa, int sa_len, int family, int socktype, bool server)
+static int usock_connect(int type, struct sockaddr *sa, int sa_len, int family, int socktype, bool server)
 {
 	int sock;
 
@@ -46,6 +46,8 @@ static int usock_connect(struct sockaddr *sa, int sa_len, int family, int sockty
 	if (sock < 0)
 		return -1;
 
+	usock_set_flags(sock, type);
+
 	if (server) {
 		const int one = 1;
 		setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one));
@@ -62,7 +64,7 @@ static int usock_connect(struct sockaddr *sa, int sa_len, int family, int sockty
 	return -1;
 }
 
-static int usock_unix(const char *host, int socktype, bool server)
+static int usock_unix(int type, const char *host, int socktype, bool server)
 {
 	struct sockaddr_un sun = {.sun_family = AF_UNIX};
 
@@ -72,7 +74,7 @@ static int usock_unix(const char *host, int socktype, bool server)
 	}
 	strcpy(sun.sun_path, host);
 
-	return usock_connect((struct sockaddr*)&sun, sizeof(sun), AF_UNIX, socktype, server);
+	return usock_connect(type, (struct sockaddr*)&sun, sizeof(sun), AF_UNIX, socktype, server);
 }
 
 static int usock_inet(int type, const char *host, const char *service, int socktype, bool server)
@@ -92,7 +94,7 @@ static int usock_inet(int type, const char *host, const char *service, int sockt
 		return -1;
 
 	for (rp = result; rp != NULL; rp = rp->ai_next) {
-		sock = usock_connect(rp->ai_addr, rp->ai_addrlen, rp->ai_family, socktype, server);
+		sock = usock_connect(type, rp->ai_addr, rp->ai_addrlen, rp->ai_family, socktype, server);
 		if (sock >= 0)
 			break;
 	}
@@ -107,14 +109,13 @@ int usock(int type, const char *host, const char *service) {
 	int sock;
 
 	if (type & USOCK_UNIX)
-		sock = usock_unix(host, socktype, server);
+		sock = usock_unix(type, host, socktype, server);
 	else
 		sock = usock_inet(type, host, service, socktype, server);
 
 	if (sock < 0)
 		return -1;
 
-	usock_set_flags(sock, type);
 	return sock;
 }
 
-- 
1.8.4.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From gianluca at sottospazio.it  Thu Jan 15 06:48:09 2015
From: gianluca at sottospazio.it (Gianluca Anzolin)
Date: Thu, 15 Jan 2015 12:48:09 +0100
Subject: [OpenWrt-Devel] Hardlock in ath9k
In-Reply-To: <54B73340.7000000@openwrt.org>
References: <54B6C138.9090206@sottospazio.it> <54B73340.7000000@openwrt.org>
Message-ID: <54B7A8F9.9040700@sottospazio.it>

Il 15/01/2015 04:25, Felix Fietkau ha scritto:
> On 2015-01-14 20:19, Gianluca Anzolin wrote:
>> Hi,
>>
>> I was just testing this evening, just for fun, a new build with the just
>> released musl libc (1.1.6) on my new router (Archer C7) but
>> unfortunately it bricked my router.
>>
>> Initially I feared that I did something wrong when updating the libc but
>> this turned out not to be the case.
>>
>> With the help of a serial cable I noticed that the router freezed when
>> trying to bring up the wireless interface (in the NG band).
>>
>> I skimmed through the commits and reverted the last ath9k commit:
>>
>> git-svn-id: svn://svn.openwrt.org/openwrt/trunk at 43971
>> 3c298f89-4303-0410-b956-a3cf2f4a3e73
>>
>> I rebuilt the image and the router worked.
>>
>> I haven't had the time to look at the actual commit yet, I just wanted
>> to let you know.
> Please try applying http://nbd.name/ath79-irq-disable.patch to your
> kernel tree and see if it fixes the issue.
>
> - Felix
I still get freezes when bringing up the wifi interface even with that 
patch applied

Gianluca
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From nbd at openwrt.org  Thu Jan 15 06:49:33 2015
From: nbd at openwrt.org (Felix Fietkau)
Date: Thu, 15 Jan 2015 12:49:33 +0100
Subject: [OpenWrt-Devel] [PATCH libubox 1/2] usock: add helper waiting
 for socket to be ready
In-Reply-To: <1421322172-6939-1-git-send-email-zajec5@gmail.com>
References: <1421322172-6939-1-git-send-email-zajec5@gmail.com>
Message-ID: <54B7A94D.4060402@openwrt.org>

On 2015-01-15 12:42, Rafa? Mi?ecki wrote:
> Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com>
> ---
>  usock.c | 30 ++++++++++++++++++++++++++++++
>  usock.h | 11 +++++++++++
>  2 files changed, 41 insertions(+)
> 
> diff --git a/usock.c b/usock.c
> index 04ed4ee..39909c1 100644
> --- a/usock.c
> +++ b/usock.c
> @@ -117,3 +117,33 @@ int usock(int type, const char *host, const char *service) {
>  	usock_set_flags(sock, type);
>  	return sock;
>  }
> +
> +int usock_wait_ready(int fd, int msecs) {
> +	fd_set fds;
> +	struct timeval tv;
> +	int res;
> +
> +	FD_ZERO(&fds);
> +	FD_SET(fd, &fds);
> +
> +	tv.tv_sec = msecs / 1000;
> +	tv.tv_usec = (msecs % 1000) * 1000;
> +
> +	res = select(fd + 1, NULL, &fds, NULL, &tv);
Wouldn't it be better to use poll() here? The fd bitmask crap that
select uses is quite ugly.

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

From zajec5 at gmail.com  Thu Jan 15 06:50:20 2015
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Thu, 15 Jan 2015 12:50:20 +0100
Subject: [OpenWrt-Devel] [PATCH uclient] http: wait for socket to be ready
	before using it
Message-ID: <1421322620-7419-1-git-send-email-zajec5@gmail.com>

This is required as we use USOCK_NONBLOCK.

Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com>
---
 uclient-http.c | 5 +++++
 uclient.h      | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/uclient-http.c b/uclient-http.c
index c25e52f..82bef8a 100644
--- a/uclient-http.c
+++ b/uclient-http.c
@@ -108,6 +108,7 @@ static int uclient_do_connect(struct uclient_http *uh, const char *port)
 {
 	socklen_t sl;
 	int fd;
+	int err;
 
 	if (uh->uc.url->port)
 		port = uh->uc.url->port;
@@ -116,6 +117,10 @@ static int uclient_do_connect(struct uclient_http *uh, const char *port)
 	if (fd < 0)
 		return -1;
 
+	err = usock_wait_ready(fd, UCLIENT_DEFAULT_CONNECTION_TIMEOUT_MS);
+	if (err)
+		return err;
+
 	ustream_fd_init(&uh->ufd, fd);
 
 	memset(&uh->uc.local_addr, 0, sizeof(uh->uc.local_addr));
diff --git a/uclient.h b/uclient.h
index d5a0d5b..d90b00a 100644
--- a/uclient.h
+++ b/uclient.h
@@ -24,6 +24,8 @@
 #include <libubox/ustream.h>
 #include <libubox/ustream-ssl.h>
 
+#define UCLIENT_DEFAULT_CONNECTION_TIMEOUT_MS		30000
+
 struct uclient_cb;
 struct uclient_backend;
 
-- 
1.8.4.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From nbd at openwrt.org  Thu Jan 15 06:55:53 2015
From: nbd at openwrt.org (Felix Fietkau)
Date: Thu, 15 Jan 2015 12:55:53 +0100
Subject: [OpenWrt-Devel] Hardlock in ath9k
In-Reply-To: <54B7A8F9.9040700@sottospazio.it>
References: <54B6C138.9090206@sottospazio.it> <54B73340.7000000@openwrt.org>
 <54B7A8F9.9040700@sottospazio.it>
Message-ID: <54B7AAC9.6010900@openwrt.org>

On 2015-01-15 12:48, Gianluca Anzolin wrote:
> Il 15/01/2015 04:25, Felix Fietkau ha scritto:
>> On 2015-01-14 20:19, Gianluca Anzolin wrote:
>>> Hi,
>>>
>>> I was just testing this evening, just for fun, a new build with the just
>>> released musl libc (1.1.6) on my new router (Archer C7) but
>>> unfortunately it bricked my router.
>>>
>>> Initially I feared that I did something wrong when updating the libc but
>>> this turned out not to be the case.
>>>
>>> With the help of a serial cable I noticed that the router freezed when
>>> trying to bring up the wireless interface (in the NG band).
>>>
>>> I skimmed through the commits and reverted the last ath9k commit:
>>>
>>> git-svn-id: svn://svn.openwrt.org/openwrt/trunk at 43971
>>> 3c298f89-4303-0410-b956-a3cf2f4a3e73
>>>
>>> I rebuilt the image and the router worked.
>>>
>>> I haven't had the time to look at the actual commit yet, I just wanted
>>> to let you know.
>> Please try applying http://nbd.name/ath79-irq-disable.patch to your
>> kernel tree and see if it fixes the issue.
>>
>> - Felix
> I still get freezes when bringing up the wifi interface even with that 
> patch applied
I just finished debugging this and I'm going to commit fixes very soon.
Turns out it was a rather nasty cascade of bugs.

My patch would have fixed the bug of being unable to disable the
WMAC/PCI interrupts, however disable_irq() on MIPS CPU irqs is
completely broken as well (and has been for many years).
This led to some nasty IRQ storms.

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


From zajec5 at gmail.com  Thu Jan 15 06:59:18 2015
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Thu, 15 Jan 2015 12:59:18 +0100
Subject: [OpenWrt-Devel] [PATCH V2 libubox 1/2] usock: add helper waiting
	for socket to be ready
In-Reply-To: <1421322172-6939-1-git-send-email-zajec5@gmail.com>
References: <1421322172-6939-1-git-send-email-zajec5@gmail.com>
Message-ID: <1421323158-8033-1-git-send-email-zajec5@gmail.com>

Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com>
---
V2: Use poll instead of select
---
 usock.c | 27 +++++++++++++++++++++++++++
 usock.h | 11 +++++++++++
 2 files changed, 38 insertions(+)

diff --git a/usock.c b/usock.c
index 04ed4ee..5bdd3ff 100644
--- a/usock.c
+++ b/usock.c
@@ -20,6 +20,7 @@
 #include <sys/socket.h>
 #include <sys/un.h>
 #include <netdb.h>
+#include <poll.h>
 #include <stdlib.h>
 #include <unistd.h>
 #include <fcntl.h>
@@ -117,3 +118,29 @@ int usock(int type, const char *host, const char *service) {
 	usock_set_flags(sock, type);
 	return sock;
 }
+
+int usock_wait_ready(int fd, int msecs) {
+	struct pollfd fds[1];
+	int res;
+
+	fds[0].fd = fd;
+	fds[0].events = POLLOUT;
+
+	res = poll(fds, 1, msecs);
+	if (res < 0) {
+		return errno;
+	} else if (res == 0) {
+		return -ETIMEDOUT;
+	} else {
+		int err = 0;
+		socklen_t optlen = sizeof(err);
+
+		res = getsockopt(fd, SOL_SOCKET, SO_ERROR, &err, &optlen);
+		if (res)
+			return errno;
+		if (err)
+			return err;
+	}
+
+	return 0;
+}
diff --git a/usock.h b/usock.h
index 8f30add..c97fc40 100644
--- a/usock.h
+++ b/usock.h
@@ -32,4 +32,15 @@
 
 int usock(int type, const char *host, const char *service);
 
+/**
+ * Wait for a socket to become ready.
+ *
+ * This may be useful for users of USOCK_NONBLOCK to wait (with a timeout)
+ * for a socket.
+ *
+ * @param fd file descriptor of socket
+ * @param msecs timeout in microseconds
+ */
+int usock_wait_ready(int fd, int msecs);
+
 #endif /* USOCK_H_ */
-- 
1.8.4.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From nbd at openwrt.org  Thu Jan 15 07:12:07 2015
From: nbd at openwrt.org (Felix Fietkau)
Date: Thu, 15 Jan 2015 13:12:07 +0100
Subject: [OpenWrt-Devel] [PATCH V2 libubox 1/2] usock: add helper
 waiting for socket to be ready
In-Reply-To: <1421323158-8033-1-git-send-email-zajec5@gmail.com>
References: <1421322172-6939-1-git-send-email-zajec5@gmail.com>
 <1421323158-8033-1-git-send-email-zajec5@gmail.com>
Message-ID: <54B7AE97.4080304@openwrt.org>

On 2015-01-15 12:59, Rafa? Mi?ecki wrote:
> Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com>
> ---
> V2: Use poll instead of select
Both applied, thanks.

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

From nbd at openwrt.org  Thu Jan 15 07:17:50 2015
From: nbd at openwrt.org (Felix Fietkau)
Date: Thu, 15 Jan 2015 13:17:50 +0100
Subject: [OpenWrt-Devel] [PATCH uclient] http: wait for socket to be
 ready before using it
In-Reply-To: <1421322620-7419-1-git-send-email-zajec5@gmail.com>
References: <1421322620-7419-1-git-send-email-zajec5@gmail.com>
Message-ID: <54B7AFEE.5010905@openwrt.org>

On 2015-01-15 12:50, Rafa? Mi?ecki wrote:
> This is required as we use USOCK_NONBLOCK.
Are you sure? Theoretically, ustream should already handle it properly.
The first write fails if the socket is not connected yet, so ustream
will buffer the data and send it out again once epoll tells it that the
fd is writable.

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

From zajec5 at gmail.com  Thu Jan 15 07:25:19 2015
From: zajec5 at gmail.com (=?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?=)
Date: Thu, 15 Jan 2015 13:25:19 +0100
Subject: [OpenWrt-Devel] [PATCH uclient] http: wait for socket to be
	ready before using it
In-Reply-To: <54B7AFEE.5010905@openwrt.org>
References: <1421322620-7419-1-git-send-email-zajec5@gmail.com>
 <54B7AFEE.5010905@openwrt.org>
Message-ID: <CACna6rzaTmGiXFqt80Q_6rpiWZU_515rVLvTLPjX1r-efVqLiA@mail.gmail.com>

On 15 January 2015 at 13:17, Felix Fietkau <nbd at openwrt.org> wrote:
> On 2015-01-15 12:50, Rafa? Mi?ecki wrote:
>> This is required as we use USOCK_NONBLOCK.
> Are you sure? Theoretically, ustream should already handle it properly.
> The first write fails if the socket is not connected yet, so ustream
> will buffer the data and send it out again once epoll tells it that the
> fd is writable.

Maybe we were just thinking about different issues? See two of mine below:

1) time ./uclient-fetch http://192.168.0.1/
Downloading 'http://192.168.0.1/'
Connecting to Unknown:32533
HTTP error 401
real    0m0.008s

(this Unknown:32533 should be IP + port)

2) time ./uclient-fetch http://192.168.1.15/
Downloading 'http://192.168.1.15/'
Connecting to Unknown:32656
real    2m7.191s

(so it finally silently quits, but it takes 2 minutes, more than one
could want to wait)

-- 
Rafa?
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From karlp at tweak.net.au  Thu Jan 15 09:24:15 2015
From: karlp at tweak.net.au (Karl Palsson)
Date: Thu, 15 Jan 2015 14:24:15 +0000
Subject: [OpenWrt-Devel] [PATCH] kernel: add references to openwrt
	alternative button handling
Message-ID: <1421331855-10284-1-git-send-email-karlp@tweak.net.au>

From: Karl Palsson <karlp at remake.is>

Add documentation that makes it easier to find the alternative,
recommended, and default handling for buttons in OpenWrt.

Signed-off-by: Karl Palsson <karlp at tweak.net.au>
---

I was having a hard time discovering buttons, and getting conflicts after
enabling the input-gpio-keys* modules.  zajec on IRC suggested I could submit
patches to improve the docs and hopefully help with discovering
gpio-button-hotplug.

 package/kernel/linux/modules/input.mk | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/package/kernel/linux/modules/input.mk b/package/kernel/linux/modules/input.mk
index 32adc1e..f42cbae 100644
--- a/package/kernel/linux/modules/input.mk
+++ b/package/kernel/linux/modules/input.mk
@@ -82,6 +82,9 @@ endef
 define KernelPackage/input-gpio-keys/description
  This driver implements support for buttons connected
  to GPIO pins of various CPUs (and some other chips).
+
+ See also gpio-button-hotplug which is an alternative, lower overhead
+ implementation that generates uevents instead of kernel input events.
 endef
 
 $(eval $(call KernelPackage,input-gpio-keys))
@@ -101,6 +104,9 @@ endef
 
 define KernelPackage/input-gpio-keys-polled/description
  Kernel module for support polled GPIO keys input device
+
+ See also gpio-button-hotplug which is an alternative, lower overhead
+ implementation that generates uevents instead of kernel input events.
 endef
 
 $(eval $(call KernelPackage,input-gpio-keys-polled))
-- 
1.8.3.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From zajec5 at gmail.com  Thu Jan 15 10:40:50 2015
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Thu, 15 Jan 2015 16:40:50 +0100
Subject: [OpenWrt-Devel] [PATCH uclient] support for connection timeout
Message-ID: <1421336450-10781-1-git-send-email-zajec5@gmail.com>

Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com>
---
 uclient-fetch.c |  4 ++++
 uclient.c       | 25 ++++++++++++++++++++++++-
 uclient.h       |  4 ++++
 3 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/uclient-fetch.c b/uclient-fetch.c
index 22f15c6..0617a02 100644
--- a/uclient-fetch.c
+++ b/uclient-fetch.c
@@ -194,6 +194,10 @@ static void handle_uclient_error(struct uclient *cl, int code)
 		type = "Connection failed";
 		error_ret = 4;
 		break;
+	case UCLIENT_ERROR_TIMEDOUT:
+		type = "Connection timed out";
+		error_ret = 4;
+		break;
 	case UCLIENT_ERROR_SSL_INVALID_CERT:
 		type = "Invalid SSL certificate";
 		ignore = !verify;
diff --git a/uclient.c b/uclient.c
index ab2d5b6..a405179 100644
--- a/uclient.c
+++ b/uclient.c
@@ -207,12 +207,31 @@ int uclient_write(struct uclient *cl, char *buf, int len)
 	return cl->backend->write(cl, buf, len);
 }
 
+static void uclient_request_timeout(struct uloop_timeout *timeout)
+{
+	struct uclient *cl = container_of(timeout, struct uclient, request_timeout);
+
+	if (cl->backend->disconnect)
+		cl->backend->disconnect(cl);
+
+	uclient_backend_set_error(cl, UCLIENT_ERROR_TIMEDOUT);
+}
+
 int uclient_request(struct uclient *cl)
 {
+	int err;
+
 	if (!cl->backend->request)
 		return -1;
 
-	return cl->backend->request(cl);
+	err = cl->backend->request(cl);
+	if (err)
+		return err;
+
+	cl->request_timeout.cb = uclient_request_timeout;
+	uloop_timeout_set(&cl->request_timeout, UCLIENT_DEFAULT_CONNECTION_TIMEOUT_MS);
+
+	return 0;
 }
 
 int uclient_read(struct uclient *cl, char *buf, int len)
@@ -225,6 +244,8 @@ int uclient_read(struct uclient *cl, char *buf, int len)
 
 void uclient_disconnect(struct uclient *cl)
 {
+	uloop_timeout_cancel(&cl->request_timeout);
+
 	if (!cl->backend->disconnect)
 		return;
 
@@ -243,6 +264,8 @@ static void __uclient_backend_change_state(struct uloop_timeout *timeout)
 
 static void uclient_backend_change_state(struct uclient *cl)
 {
+	uloop_timeout_cancel(&cl->request_timeout);
+
 	cl->timeout.cb = __uclient_backend_change_state;
 	uloop_timeout_set(&cl->timeout, 1);
 }
diff --git a/uclient.h b/uclient.h
index d5a0d5b..095d894 100644
--- a/uclient.h
+++ b/uclient.h
@@ -24,12 +24,15 @@
 #include <libubox/ustream.h>
 #include <libubox/ustream-ssl.h>
 
+#define UCLIENT_DEFAULT_CONNECTION_TIMEOUT_MS		30000
+
 struct uclient_cb;
 struct uclient_backend;
 
 enum uclient_error_code {
 	UCLIENT_ERROR_UNKNOWN,
 	UCLIENT_ERROR_CONNECT,
+	UCLIENT_ERROR_TIMEDOUT,
 	UCLIENT_ERROR_SSL_INVALID_CERT,
 	UCLIENT_ERROR_SSL_CN_MISMATCH,
 	UCLIENT_ERROR_MISSING_SSL_CONTEXT,
@@ -67,6 +70,7 @@ struct uclient {
 	int status_code;
 	struct blob_attr *meta;
 
+	struct uloop_timeout request_timeout;
 	struct uloop_timeout timeout;
 };
 
-- 
1.8.4.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From gianluca at sottospazio.it  Thu Jan 15 11:49:17 2015
From: gianluca at sottospazio.it (Gianluca Anzolin)
Date: Thu, 15 Jan 2015 17:49:17 +0100
Subject: [OpenWrt-Devel] Hardlock in ath9k
In-Reply-To: <54B7AAC9.6010900@openwrt.org>
References: <54B6C138.9090206@sottospazio.it> <54B73340.7000000@openwrt.org>
 <54B7A8F9.9040700@sottospazio.it> <54B7AAC9.6010900@openwrt.org>
Message-ID: <54B7EF8D.3000105@sottospazio.it>

Il 15/01/2015 12:55, Felix Fietkau ha scritto:
> On 2015-01-15 12:48, Gianluca Anzolin wrote:
>> Il 15/01/2015 04:25, Felix Fietkau ha scritto:
>>> On 2015-01-14 20:19, Gianluca Anzolin wrote:
>>>> Hi,
>>>>
>>>> I was just testing this evening, just for fun, a new build with the just
>>>> released musl libc (1.1.6) on my new router (Archer C7) but
>>>> unfortunately it bricked my router.
>>>>
>>>> Initially I feared that I did something wrong when updating the libc but
>>>> this turned out not to be the case.
>>>>
>>>> With the help of a serial cable I noticed that the router freezed when
>>>> trying to bring up the wireless interface (in the NG band).
>>>>
>>>> I skimmed through the commits and reverted the last ath9k commit:
>>>>
>>>> git-svn-id: svn://svn.openwrt.org/openwrt/trunk at 43971
>>>> 3c298f89-4303-0410-b956-a3cf2f4a3e73
>>>>
>>>> I rebuilt the image and the router worked.
>>>>
>>>> I haven't had the time to look at the actual commit yet, I just wanted
>>>> to let you know.
>>> Please try applying http://nbd.name/ath79-irq-disable.patch to your
>>> kernel tree and see if it fixes the issue.
>>>
>>> - Felix
>> I still get freezes when bringing up the wifi interface even with that
>> patch applied
> I just finished debugging this and I'm going to commit fixes very soon.
> Turns out it was a rather nasty cascade of bugs.
>
> My patch would have fixed the bug of being unable to disable the
> WMAC/PCI interrupts, however disable_irq() on MIPS CPU irqs is
> completely broken as well (and has been for many years).
> This led to some nasty IRQ storms.
>
> - Felix
I've just tested r43975 and it works.

Thank you

Gianluca
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From mikebrady at eircom.net  Thu Jan 15 13:14:20 2015
From: mikebrady at eircom.net (Mike Brady)
Date: Thu, 15 Jan 2015 18:14:20 +0000
Subject: [OpenWrt-Devel] [PATCH] add pkgconfig information for popt library
Message-ID: <20150115181420.GA61788@aillwee.com>

Modify makefile to record pkgconfig information for the popt library.

Signed-off-by: Mike Brady <mikebrady at eircom.net>
---
 package/libs/popt/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/package/libs/popt/Makefile b/package/libs/popt/Makefile
index bd2e6e2..b31b311 100644
--- a/package/libs/popt/Makefile
+++ b/package/libs/popt/Makefile
@@ -45,6 +45,8 @@ define Build/InstallDev
 	$(CP) $(PKG_INSTALL_DIR)/usr/include/popt.h $(1)/usr/include/
 	$(INSTALL_DIR) $(1)/usr/lib
 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpopt.{a,so*} $(1)/usr/lib/
+	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/popt.pc $(1)/usr/lib/pkgconfig/
 endef
 
 define Package/libpopt/install
-- 
1.9.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From nbd at openwrt.org  Thu Jan 15 13:16:59 2015
From: nbd at openwrt.org (Felix Fietkau)
Date: Thu, 15 Jan 2015 19:16:59 +0100
Subject: [OpenWrt-Devel] [PATCH uclient] support for connection timeout
In-Reply-To: <1421336450-10781-1-git-send-email-zajec5@gmail.com>
References: <1421336450-10781-1-git-send-email-zajec5@gmail.com>
Message-ID: <54B8041B.3080702@openwrt.org>

On 2015-01-15 16:40, Rafa? Mi?ecki wrote:
> Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com>
> ---
>  uclient-fetch.c |  4 ++++
>  uclient.c       | 25 ++++++++++++++++++++++++-
>  uclient.h       |  4 ++++
>  3 files changed, 32 insertions(+), 1 deletion(-)
> 
> diff --git a/uclient.c b/uclient.c
> index ab2d5b6..a405179 100644
> --- a/uclient.c
> +++ b/uclient.c
> @@ -207,12 +207,31 @@ int uclient_write(struct uclient *cl, char *buf, int len)
>  	return cl->backend->write(cl, buf, len);
>  }
>  
> +static void uclient_request_timeout(struct uloop_timeout *timeout)
> +{
> +	struct uclient *cl = container_of(timeout, struct uclient, request_timeout);
> +
> +	if (cl->backend->disconnect)
> +		cl->backend->disconnect(cl);
> +
> +	uclient_backend_set_error(cl, UCLIENT_ERROR_TIMEDOUT);
> +}
> +
>  int uclient_request(struct uclient *cl)
>  {
> +	int err;
> +
>  	if (!cl->backend->request)
>  		return -1;
>  
> -	return cl->backend->request(cl);
> +	err = cl->backend->request(cl);
> +	if (err)
> +		return err;
> +
> +	cl->request_timeout.cb = uclient_request_timeout;
> +	uloop_timeout_set(&cl->request_timeout, UCLIENT_DEFAULT_CONNECTION_TIMEOUT_MS);
Please store the timeout value in struct uclient and initialize it at
alloc time. I don't like forced hardcoded values.

> +
> +	return 0;
>  }
>  
>  int uclient_read(struct uclient *cl, char *buf, int len)
> @@ -225,6 +244,8 @@ int uclient_read(struct uclient *cl, char *buf, int len)
>  
>  void uclient_disconnect(struct uclient *cl)
>  {
> +	uloop_timeout_cancel(&cl->request_timeout);
> +
>  	if (!cl->backend->disconnect)
>  		return;
>  
> @@ -243,6 +264,8 @@ static void __uclient_backend_change_state(struct uloop_timeout *timeout)
>  
>  static void uclient_backend_change_state(struct uclient *cl)
>  {
> +	uloop_timeout_cancel(&cl->request_timeout);
> +
>  	cl->timeout.cb = __uclient_backend_change_state;
>  	uloop_timeout_set(&cl->timeout, 1);
>  }
The timeout should be cancelled or refreshed when the HTTP response is
received, and on new incoming data. It should probably be cancelled if
the receive buffer is full (since the data reception is throttled by the
user).

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

From lobl.pavel at gmail.com  Thu Jan 15 13:47:00 2015
From: lobl.pavel at gmail.com (=?UTF-8?q?Pavel=20L=C3=B6bl?=)
Date: Thu, 15 Jan 2015 19:47:00 +0100
Subject: [OpenWrt-Devel] [PATCH] ramips: fix default led configuration for
	rt-n14u
Message-ID: <1421347620-15235-1-git-send-email-lobl.pavel@gmail.com>

use new helper function to generate default led configuration

Signed-off-by: Pavel L?bl <lobl.pavel at gmail.com>
---
 target/linux/ramips/base-files/etc/board.d/01_leds | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds
index 405a6c0..c42b31f 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -191,8 +191,8 @@ case $board in
 		;;
 	rt-n14u)
 		ucidef_set_led_default "power" "power" "asus:blue:power" "1"
-		ucidef_set_led_interafce "lan" "asus:blue:lan"
-		ucidef_set_led_netdev "wan" "asus:blue:wan"
+		ucidef_set_led_netdev "lan" "lan" "asus:blue:lan" eth0.1
+		ucidef_set_led_netdev "wan" "wan" "asus:blue:wan" eth0.2
 		set_wifi_led "asus:blue:air"
 		set_usb_led "asus:blue:usb"
 		;;
-- 
2.1.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From christian.schoenebeck at gmail.com  Thu Jan 15 15:28:17 2015
From: christian.schoenebeck at gmail.com (Christian Schoenebeck)
Date: Thu, 15 Jan 2015 21:28:17 +0100
Subject: [OpenWrt-Devel] ddns-scripts "sleep 10" before updating?
In-Reply-To: <CAE2LqH+tHYRD+Zy3xABd=6_hRXY_hj-x3+wKwEV+EwMukFtXAA@mail.gmail.com>
References: <CAE2LqHL5T0RTVPWuoY73M5bMi_0x1S3KhRb8GpVz0Fkm4Zcp8g@mail.gmail.com>	<54B5241A.2020105@gmail.com>
 <CAE2LqH+tHYRD+Zy3xABd=6_hRXY_hj-x3+wKwEV+EwMukFtXAA@mail.gmail.com>
Message-ID: <54B822E1.1050606@gmail.com>

Am 15.01.2015 um 06:17 schrieb Catalin Patulea:
> On Tue, Jan 13, 2015 at 8:56 AM, Christian Schoenebeck
> <christian.schoenebeck at gmail.com> wrote:
>> from my point of view 10 seconds to wait before sending an update to the ddns provider is not a big deal because it takes up to 5 minutes until "nslookup [yourhost] 8.8.8.8" gives you back a static answer after a change.
>> So Google's mameserver need up to 5 Minutes to sync themselves.
> How did you conclude about the 5 minutes? Technically caching DNS
> servers should respect the TTL of the original record. RFC 1035 even
> allows zero TTL to prevent caching. I agree that some servers may
> actually impose a minimum TTL, but ddns-scripts should not make any
> assumptions about this.
> 
> In my case, I have DDNS records which are rarely accessed (are not
> likely to be cached by intermediate DNS servers). When a client makes
> a DNS request for my DDNS name, it will be forwarded the entire way to
> the authoritative DNS server. So the openwrt update latency dominates
> the delay, not TTL expiration, so it's useful for me to update ASAP
> after the interfaces gets an address.
> 
> Are you still planning on running some tests on your side?
> 
I did some quick test. You are right that netifd calls hotplug now if ip-setup finished.
I also looked into my email history and found the point where this sleep comes into the script.
I did a lot of testing with a user using satellite Internet connection.
He quickly gets his IP from the modem but he needs to use a global dns server to verify his registered ip via tcp 
because the modem buffers all udp dns requests not looking for any timeouts.
For him it takes same seconds until the connection was established to the web after getting his ip from the modem.

The "5 minutes" I tested the easy way.
On my ubuntu box I ran nslookup for my own ddns-address against Google's public dns in an endless loop.
Then I send out a new ip to my ddns provider via ddns-scripts and wait.
The longest time it takes to have a stable answer from nslookup was 4 minutes 10 seconds.
Plus reserve = 5 minutes. Also the reason why check_interval minimum is set to 5 minutes = 300 seconds
in line 176 of dynamic_dns_updater.sh.
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From daniel at makrotopia.org  Thu Jan 15 15:50:43 2015
From: daniel at makrotopia.org (Daniel Golle)
Date: Thu, 15 Jan 2015 21:50:43 +0100
Subject: [OpenWrt-Devel] [PATCH 1/2] sunxi: implement board_detect for
	device-tree kernels
Message-ID: <20150115205038.GA6594@makrotopia.org>

board_detect previously relied on parsing the kernel cmdline
out of the U-Boot environment stored on the the MMC card in order
to get the board= parameter.
Use /proc/device-tree/model instead.

Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 target/linux/sunxi/base-files/lib/sunxi.sh | 168 ++++++++++++++++++++++-------
 1 file changed, 130 insertions(+), 38 deletions(-)

diff --git a/target/linux/sunxi/base-files/lib/sunxi.sh b/target/linux/sunxi/base-files/lib/sunxi.sh
index adf9f84..b0a3874 100644
--- a/target/linux/sunxi/base-files/lib/sunxi.sh
+++ b/target/linux/sunxi/base-files/lib/sunxi.sh
@@ -1,45 +1,137 @@
 #!/bin/sh
 
 # defaults
-SUNXI_BOARD_NAME="generic sunxi"
-SUNXI_BOARD_MODEL="generic sunxi"
-SUNXI_ENV_DEV=/dev/mmcblk0
-
-#Helper functions 
-get_cmdline_opt() 
-{
-cat /proc/cmdline | awk -F$1= '{print $2}' | awk '{print $1}'
-}
+SUNXI_BOARD_NAME="generic"
+SUNXI_BOARD_MODEL="Generic sunxi board"
 
-#Since fw_getenv doesn't work with blockdevs let's make a hack
-uboot_getenv() 
-{
-    dd if=$SUNXI_ENV_DEV bs=1024 skip=544 count=128 2>dev/null |\strings|grep $1|cut -d"=" -f2
-}
+sunxi_board_detect() {
+	local board
+	local model
 
-#Actual routines go below
-sunxi_env_dev()
-{
-    local dev
-    dev=`get_cmdline_opt root|cut -d"p" -f1`
-    SUNXI_ENV_DEV=$dev
-    echo "probing $dev for uboot env data"
-}
+	[ -e "/tmp/sysinfo/" ] || mkdir -p "/tmp/sysinfo/"
 
-sunxi_board_detect() {
-    local board
-    local model
-    sunxi_env_dev
-    [ -e "/tmp/sysinfo/" ] || mkdir -p "/tmp/sysinfo/"
-    board="`uboot_getenv wrt_board`"
-    model="`uboot_getenv wrt_model`"
-    if [ "$board" != "" ]; then
-	SUNXI_BOARD_NAME="$board"
-    fi
-    if [ "$model" != "" ]; then
-	SUNXI_BOARD_MODEL="$model"
-    fi
-    echo "$SUNXI_BOARD_NAME" > /tmp/sysinfo/board_name
-    echo "$SUNXI_BOARD_MODEL" > /tmp/sysinfo/model
-    echo "Detected $SUNXI_BOARD_NAME // $SUNXI_BOARD_MODEL"
+	model="$( cat /proc/device-tree/model )"
+
+	case "$model" in
+		"Mele A1000")
+			board="a1000"
+			;;
+
+		"BA10 tvbox")
+			board="ba10-tvbox"
+			;;
+
+		"Cubietech Cubieboard")
+			board="cubieboard"
+			;;
+
+		"Miniand Hackberry")
+			board="hackberry"
+			;;
+
+		"INet-97F Rev 02")
+			board="inet97fv2"
+			;;
+
+		"PineRiver Mini X-Plus")
+			board="mini-xplus"
+			;;
+
+		"Olimex A10-OLinuXino-LIME")
+			board="olinuxino-lime"
+			;;
+
+		"LinkSprite pcDuino")
+			board="pcduino"
+			;;
+
+		"Olimex A10s-Olinuxino Micro")
+			board="olinuxino-micro"
+			;;
+
+		"R7 A10s hdmi tv-stick")
+			board="r7-tv-dongle"
+			;;
+
+		"HSG H702")
+			board="hsg-h702"
+			;;
+
+		"Olimex A13-Olinuxino")
+			board="olinuxino"
+			;;
+
+		"Olimex A13-Olinuxino Micro")
+			board="olinuxino-micro"
+			;;
+
+		"Allwinner A31 APP4 EVB1 Evaluation Board")
+			board="app4-evb1"
+			;;
+
+		"WITS A31 Colombus Evaluation Board")
+			board="colombus"
+			;;
+
+		"Merrii A31 Hummingbird")
+			board="hummingbird"
+			;;
+
+		"Mele M9 / A1000G Quad top set box")
+			board="m9"
+			;;
+
+		"LeMaker Banana Pi")
+			board="bananapi"
+			;;
+
+		"LeMaker Banana Pro")
+			board="bananapro"
+			;;
+
+		"Cubietech Cubieboard2")
+			board="cubieboard2"
+			;;
+
+		"Cubietech Cubietruck")
+			board="cubietruck"
+			;;
+
+		"Merrii A20 Hummingbird")
+			board="hummingbird"
+			;;
+
+		"I12 / Q5 / QT840A A20 tvbox")
+			board="i12-tvbox"
+			;;
+
+		"Olimex A20-OLinuXino-LIME")
+			board="olinuxino-lime"
+			;;
+
+		"Olimex A20-Olinuxino Micro")
+			board="olinuxino-micro"
+			;;
+
+		"LinkSprite pcDuino3")
+			board="pcduino3"
+			;;
+
+		"Ippo Q8H Dual Core Tablet (v5)")
+			board="ippo-q8h-v5"
+			;;
+	esac
+
+	if [ "$board" != "" ]; then
+		SUNXI_BOARD_NAME="$board"
+	fi
+
+	if [ "$model" != "" ]; then
+		SUNXI_BOARD_MODEL="$model"
+	fi
+
+
+	echo "$SUNXI_BOARD_NAME" > /tmp/sysinfo/board_name
+	echo "$SUNXI_BOARD_MODEL" > /tmp/sysinfo/model
+	echo "Detected $SUNXI_BOARD_NAME // $SUNXI_BOARD_MODEL"
 }
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From daniel at makrotopia.org  Thu Jan 15 15:51:22 2015
From: daniel at makrotopia.org (Daniel Golle)
Date: Thu, 15 Jan 2015 21:51:22 +0100
Subject: [OpenWrt-Devel] [PATCH 2/2] sunxi: introduce sunxi_board_name() in
	/lib/sunxi.sh
Message-ID: <20150115205117.GA6603@makrotopia.org>

Simiarl to other hardware targets, this can then be used for board-specific
stuff in preinit and uci-default scripts.

Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 target/linux/sunxi/base-files/lib/sunxi.sh | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/target/linux/sunxi/base-files/lib/sunxi.sh b/target/linux/sunxi/base-files/lib/sunxi.sh
index b0a3874..af9b5eb 100644
--- a/target/linux/sunxi/base-files/lib/sunxi.sh
+++ b/target/linux/sunxi/base-files/lib/sunxi.sh
@@ -135,3 +135,12 @@ sunxi_board_detect() {
 	echo "$SUNXI_BOARD_MODEL" > /tmp/sysinfo/model
 	echo "Detected $SUNXI_BOARD_NAME // $SUNXI_BOARD_MODEL"
 }
+
+sunxi_board_name() {
+	local name
+
+	[ -f /tmp/sysinfo/board_name ] && name=$(cat /tmp/sysinfo/board_name)
+	[ -z "$name" ] && name="unknown"
+
+	echo "$name"
+}
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From chunkeey at googlemail.com  Thu Jan 15 16:47:19 2015
From: chunkeey at googlemail.com (Christian Lamparter)
Date: Thu, 15 Jan 2015 22:47:19 +0100
Subject: [OpenWrt-Devel] [PATCH] ramips: add support for Intenso Memory 2
	Move USB 3.0
Message-ID: <2766551.4pBuPnbTJq@debian64>

This adds support for a rt5350-based "portable nas" solution
from Intenso. The board comes with 32M RAM and 8M Flash, the
built-in HDD is connected/accessible via a usb3.0<->sata
bridge VLI VL701.

The device has 1 Ethernet port (100M/10M), 1 micro b usb 3.0
socket (for charging the battery, or accessing the hdd directly).
Wireless connectivity is provided by the rt5350 SoC [i.e.:
802.11n 1x1 2.4 GHz with a pcb antenna.]

Serial, leds, wifi, ethernet and usb are tested and
as far as I can tell: they are working fine (tm).

Signed-off-by: Christian Lamparter <chunkeey at googlemail.com>
---
Any comments/suggestions or wishes? Most of the work is
based/taken from other devices. So apart from some non-obvious
stuff, it should all be fine too. 

What is a bit unique: the way of flashing the device. This
will require a tftp server [hardcoded to 192.168.1.201]
and a few cables to the uart. I'll write a "how to flash 
openwrt on a m2m" once this patch [or a better version] is
accepted.

Regards,
Christian
---
 target/linux/ramips/base-files/etc/board.d/01_leds |   4 +
 .../linux/ramips/base-files/etc/board.d/02_network |   5 +
 target/linux/ramips/base-files/etc/diag.sh         |   3 +
 target/linux/ramips/base-files/lib/ramips.sh       |   3 +
 .../ramips/base-files/lib/upgrade/platform.sh      |   1 +
 target/linux/ramips/dts/M2M.dts                    | 113 +++++++++++++++++++++
 target/linux/ramips/image/Makefile                 |   3 +
 target/linux/ramips/rt305x/profiles/m2m.mk         |  21 ++++
 8 files changed, 153 insertions(+)
 create mode 100644 target/linux/ramips/dts/M2M.dts
 create mode 100644 target/linux/ramips/rt305x/profiles/m2m.mk

diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds
index 405a6c0..7b29ac0 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -148,6 +148,10 @@ case $board in
 	nw718)
 		set_usb_led "nw718:amber:usb"
 		;;
+	m2m)
+		set_wifi_led "m2m:blue:wifi"
+		ucidef_set_led_netdev "eth" "Ethernet" "m2m:green:wan" "eth0"
+		;;
 	omni-emb-hpm)
 		ucidef_set_led_default "power" "POWER" "emb:orange:power" "1"
 		ucidef_set_led_netdev "eth" "ETH" "emb:green:eth" "eth0"
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
index a86466e..e425510 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -62,6 +62,11 @@ ramips_setup_interfaces()
 		ucidef_set_interface_lan "eth0.2"
 		;;
 
+	m2m)
+		ucidef_add_switch "switch0" "4"
+		ucidef_set_interface_lan "eth0"
+		;;
+
 	wizard8800 | \
 	wl-330n | \
 	wmr300)
diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh
index 103dfcd..c43cb54 100755
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -79,6 +79,9 @@ get_status_led() {
 	hw550-3g)
 		status_led="hw550-3g:green:status"
 		;;
+	m2m)
+		status_led="m2m:blue:wifi"
+		;;
 	m3)
 		status_led="m3:blue:status"
 		;;
diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh
index 540da33..f783065 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -211,6 +211,9 @@ ramips_board_detect() {
 	*"NW718")
 		name="nw718"
 		;;
+	*"Intenso Memory 2 Move")
+		name="m2m"
+		;;
 	*"Omnima EMB HPM")
 		name="omni-emb-hpm"
 		;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 95cad63..2d48192 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -55,6 +55,7 @@ platform_check_image() {
 	ht-tm02 | \
 	hw550-3g | \
 	ip2202 | \
+	m2m | \
 	m3 | \
 	m4 | \
 	mlw221 | \
diff --git a/target/linux/ramips/dts/M2M.dts b/target/linux/ramips/dts/M2M.dts
new file mode 100644
index 0000000..aa98991
--- /dev/null
+++ b/target/linux/ramips/dts/M2M.dts
@@ -0,0 +1,113 @@
+/dts-v1/;
+
+/include/ "rt5350.dtsi"
+
+/ {
+	compatible = "M2M", "ralink,rt5350-soc";
+	model = "Intenso Memory 2 Move";
+
+	chosen {
+		bootargs = "console=ttyS1,57600n8 root=/dev/mtdblock5";
+	};
+
+	palmbus at 10000000 {
+		uart at 500 {
+			status = "okay";
+		};
+
+		spi at b00 {
+			status = "okay";
+			m25p80 at 0 {
+				#address-cells = <1>;
+				#size-cells = <1>;
+				compatible = "mx25l6405d";
+				reg = <0 0>;
+				linux,modalias = "m25p80", "mx25l6405d";
+				spi-max-frequency = <10000000>;
+
+				partition at 0 {
+					label = "Bootloader";
+					reg = <0x0 0x30000>;
+					read-only;
+				};
+
+				partition at 30000 {
+					label = "Config";
+					reg = <0x30000 0x10000>;
+					read-only;
+				};
+
+				factory: partition at 40000 {
+					label = "Factory";
+					reg = <0x40000 0x10000>;
+					read-only;
+				};
+
+				partition at 50000 {
+					label = "firmware";
+					reg = <0x50000 0x7b0000>;
+				};
+			};
+		};
+	};
+
+	pinctrl {
+		state_default: pinctrl0 {
+			gpio {
+				ralink,group = "i2c", "jtag", "uartf";
+				ralink,function = "gpio";
+			};
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+		wifi {
+			label = "m2m:blue:wifi";
+			gpios = <&gpio0 7 1>;
+		};
+		wan {
+			label = "m2m:green:wan";
+			gpios = <&gpio0 12 1>;
+		};
+	};
+
+	gpio-keys-polled {
+		gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+			power {
+				label = "power";
+				gpios = <&gpio0 1 1>;
+				linux,code = <0x116>;
+			};
+			reset {
+				label = "reset";
+				gpios = <&gpio0 10 1>;
+				linux,code = <0x198>;
+			};
+		};
+	};
+
+	ethernet at 10100000 {
+		mtd-mac-address = <&factory 0x28>;
+	};
+
+	esw at 10110000 {
+		ralink,portmap = <0x2f>;
+	};
+
+	ehci at 101c0000 {
+		status = "okay";
+	};
+
+	ohci at 101c1000 {
+		status = "okay";
+	};
+
+	wmac at 10180000 {
+		ralink,mtd-eeprom = <&factory 0x0>;
+	};
+};
diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile
index 82cadd7..e385966 100644
--- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile
@@ -546,6 +546,8 @@ Image/Build/Profile/NCS601W=$(call BuildFirmware/Default8M/$(1),$(1),ncs601W,NCS
 nw718_mtd_size=3801088
 Image/Build/Profile/NW718=$(call BuildFirmware/CustomFlashFactory/$(1),$(1),nw718m,NW718,$(nw718_mtd_size),ARA1B4NCRNW718;1,factory)
 
+Image/Build/Profile/M2M=$(call BuildFirmware/Default8M/$(1),$(1),m2m,M2M,Linux Kernel Image)
+
 Image/Build/Profile/OMNI-EMB=$(call BuildFirmware/Default8M/$(1),$(1),omni-emb,OMNI-EMB)
 
 Image/Build/Profile/OMNI-PLUG=$(call BuildFirmware/Default8M/$(1),$(1),omni-plug,OMNI-PLUG)
@@ -694,6 +696,7 @@ define Image/Build/Profile/Default
 	$(call Image/Build/Profile/HT-TM02,$(1))
 	$(call Image/Build/Profile/HW550-3G,$(1))
 	$(call Image/Build/Profile/IP2202,$(1))
+	$(call Image/Build/Profile/M2M,$(1))
 	$(call Image/Build/Profile/M3,$(1))
 	$(call Image/Build/Profile/M4,$(1))
 	$(call Image/Build/Profile/MOFI3500-3GN,$(1))
diff --git a/target/linux/ramips/rt305x/profiles/m2m.mk b/target/linux/ramips/rt305x/profiles/m2m.mk
new file mode 100644
index 0000000..e5cb6b8
--- /dev/null
+++ b/target/linux/ramips/rt305x/profiles/m2m.mk
@@ -0,0 +1,20 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/M2M
+	NAME:=Intenso Memory 2 Move
+	PACKAGES:=\
+		kmod-ledtrig-netdev kmod-ledtrig-timer kmod-leds-gpio \
+		kmod-usb-core kmod-usb2 kmod-usb-storage kmod-scsi-core \
+		kmod-fs-ext4 kmod-fs-vfat block-mount
+endef
+
+define Profile/M2M/Description
+	Package set for Intenso Memory 2 Move USB 3.0
+endef
+
+$(eval $(call Profile,M2M))
-- 
2.1.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From cat at vv.carleton.ca  Thu Jan 15 21:07:50 2015
From: cat at vv.carleton.ca (Catalin Patulea)
Date: Thu, 15 Jan 2015 21:07:50 -0500
Subject: [OpenWrt-Devel] ddns-scripts "sleep 10" before updating?
In-Reply-To: <54B822E1.1050606@gmail.com>
References: <CAE2LqHL5T0RTVPWuoY73M5bMi_0x1S3KhRb8GpVz0Fkm4Zcp8g@mail.gmail.com>
 <54B5241A.2020105@gmail.com>
 <CAE2LqH+tHYRD+Zy3xABd=6_hRXY_hj-x3+wKwEV+EwMukFtXAA@mail.gmail.com>
 <54B822E1.1050606@gmail.com>
Message-ID: <CAE2LqHKDHO5-bmxPcRFwv10G0Zd9HEc7UJDvg4fjGsZ-Tadj4Q@mail.gmail.com>

On Thu, Jan 15, 2015 at 3:28 PM, Christian Schoenebeck
<christian.schoenebeck at gmail.com> wrote:
> I did a lot of testing with a user using satellite Internet connection.
> He quickly gets his IP from the modem but he needs to use a global dns server to verify his registered ip via tcp
> because the modem buffers all udp dns requests not looking for any timeouts.
> For him it takes same seconds until the connection was established to the web after getting his ip from the modem.
Let me see if I understand.. so after his interface comes up,
dynamic_dns_updater was getting stuck on "get_registered_ip" because
the connection to the web is not yet up? Perhaps this could be handled
by a timeout on the host/nslookup command?

I also think this is an edge case - in most cases, you can call
get_registered_ip immediately and it will work.

> The "5 minutes" I tested the easy way.
> On my ubuntu box I ran nslookup for my own ddns-address against Google's public dns in an endless loop.
> Then I send out a new ip to my ddns provider via ddns-scripts and wait.
> The longest time it takes to have a stable answer from nslookup was 4 minutes 10 seconds.
> Plus reserve = 5 minutes. Also the reason why check_interval minimum is set to 5 minutes = 300 seconds
> in line 176 of dynamic_dns_updater.sh.

I understand that the latency through Google public dns is 5 minutes,
but not everyone uses Google public dns, and your test is not
representative of queries for cache-cold records.

I tried adding a new record to my domain to see what happens on a
query that is not already in the cache. This is the same case as
updating an existing DDNS entry that hasn't been accessed in a long
time.

The record was immediately (<15 seconds, while I typed the commands)
available in my DNS provider's server, my ISP's server, and 8.8.8.8.
The intermediate servers didn't even know if the record exists, so
they had to contact the authoritative server. Probably if I update the
IP now, it will take a long time to propagate, but this is not a
common case for me.

What I want is that if I get a new IP/router crashes/power outage, for
my IP to be updated in the authoritative DNS server as soon as
possible. It is rare that I access my DDNS just before this
(crash/power outage/etc.) happens, so the record will not be cached,
so if I access it now, I will see the fresh IP in any DNS server. In
this case the "sleep 10" is the limiting factor.

I think probably this is the case for most DDNS users - they probably
access their records very rarely, so they are not cached, so "sleep
10" is the biggest factor to how quickly their new address is visible.
But I can't speak definitively about any but my case.

Perhaps the sleep could be a configuration option which defaults to 0.
Specific users can set it if they need it.
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From mschiffer at universe-factory.net  Thu Jan 15 22:03:58 2015
From: mschiffer at universe-factory.net (Matthias Schiffer)
Date: Fri, 16 Jan 2015 04:03:58 +0100
Subject: [OpenWrt-Devel] [PATCH] build: explicitly unexport CONFIG_SITE
Message-ID: <db18c281ae79cdf649c21d075c68d970588d72a0.1421377326.git.mschiffer@universe-factory.net>

On systems with CONFIG_SITE in the environment (e.g. OpenSUSE) make will export
the CONFIG_SITE set in include/package.mk by default. This will cause host
builds to get the target site configuration, leading to all kinds of weirdness
(wrong pointer size, wrong endianess).

Fix this by explicitly unexporting CONFIG_SITE. The explicit export for the
target builds overrides the unexport, so the target builds will still correctly
get the site config.

Signed-off-by: Matthias Schiffer <mschiffer at universe-factory.net>
---

This bug was reported on openwrt-devel by Luiz Angelo Daros de Luca some months
ago, and now I hit it myself.

This should also be backported to BB.

 include/package.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/package.mk b/include/package.mk
index a1b90da..e85e395 100644
--- a/include/package.mk
+++ b/include/package.mk
@@ -95,7 +95,7 @@ CONFIG_SITE:=$(INCLUDE_DIR)/site/$(REAL_GNU_TARGET_NAME)
 CUR_MAKEFILE:=$(filter-out Makefile,$(firstword $(MAKEFILE_LIST)))
 SUBMAKE:=$(NO_TRACE_MAKE) $(if $(CUR_MAKEFILE),-f $(CUR_MAKEFILE))
 PKG_CONFIG_PATH=$(STAGING_DIR)/usr/lib/pkgconfig:$(STAGING_DIR)/usr/share/pkgconfig
-unexport QUIET
+unexport QUIET CONFIG_SITE
 
 ifeq ($(DUMP)$(filter prereq clean refresh update,$(MAKECMDGOALS)),)
   ifneq ($(if $(QUILT),,$(CONFIG_AUTOREBUILD)),)
-- 
2.2.2
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From osk at exegin.com  Thu Jan 15 22:15:40 2015
From: osk at exegin.com (Owen Kirby)
Date: Thu, 15 Jan 2015 19:15:40 -0800
Subject: [OpenWrt-Devel] [PATCH] procd: delay inittab workers until the tty
	exists.
Message-ID: <54B8825C.4030300@exegin.com>

If a process with a tty is specified in inittab, delay the worker process until the tty exists.

This allows starting consoles with terminals that get delayed until after procd is reads inittab,
and it also allows hotplugging USB-to-serial adapters attached long after booting.

Signed-off-by: Owen Kirby <osk at exegin.com>
---
  inittab.c | 14 ++++++++++----
  1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/inittab.c b/inittab.c
index 623103d..73c113f 100644
--- a/inittab.c
+++ b/inittab.c
@@ -99,9 +99,15 @@ static void fork_worker(struct init_action *a)
  	if (!a->proc.pid) {
  		p = setsid();
  
-		fd = dev_open(a->id);
-		if (fd != -1)
-		{
+		if (a->id) {
+			struct timespec tm;
+			tm.tv_sec = a->respawn / 1000;
+			tm.tv_nsec = (a->respawn % 1000) * 1000000;
+
+			while ((fd = dev_open(a->id)) == -1)
+				if (nanosleep(&tm, NULL) == -1)
+					exit(-1);
+
  			dup2(fd, STDIN_FILENO);
  			dup2(fd, STDOUT_FILENO);
  			dup2(fd, STDERR_FILENO);
@@ -157,7 +163,7 @@ static void askfirst(struct init_action *a)
  {
  	int i;
  
-	if (!dev_exist(a->id) || (console && !strcmp(console, a->id))) {
+	if (console && !strcmp(console, a->id)) {
  		DEBUG(4, "Skipping %s\n", a->id);
  		return;
  	}
-- 
1.9.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From fhfrediani at gmail.com  Thu Jan 15 23:18:41 2015
From: fhfrediani at gmail.com (Fernando Frediani)
Date: Fri, 16 Jan 2015 02:18:41 -0200
Subject: [OpenWrt-Devel] Is Linksys/Belkin lying (again) about being
 open source (WRT1200AC router) ?
In-Reply-To: <CAD=nrE-Dbhcv36M9KKg26V3u35vr1i4TYqrazKJ4Jf0PPzrT=Q@mail.gmail.com>
References: <CAD=nrE-Dbhcv36M9KKg26V3u35vr1i4TYqrazKJ4Jf0PPzrT=Q@mail.gmail.com>
Message-ID: <54B89121.4090606@gmail.com>

Hi,

Great email Valent, and I fully agree with your comments.
We have had this discussion here in the past and nothing much changed 
from Belkin side (actually it got worse as they disappeared apparently) 
showing a total failure on product release.

I'm not entirely sure of the status of WRT1200AC, but if there is 
nothing here in OpenWRT and nothing else much can be found on the web 
they are once again lying. They are publishing intentions as if it was 
something that was already done and consolidated, ready for any buyer to 
enjoy. If there is something going on between them and OpenWRT we are 
not aware, at least not via this list.

I personally consider a big slap in the face of consumers Marketing 
doing what they do in Belkin, like if they didn't care at all. This is 
not simply 'a mistake' or 'a misunderstanding' , it's complete 
dishonesty and they are probably fully aware of this but simply don't 
care at all cause they just want to reach their marketing target. 
Probably people there might not even have a basic idea about what is 
open-source.

As mentioned Marvel is doing some progress with the Wifi driver, which 
is great for WRT1900AC owners, but that's Marvel only. What has Belkin 
done about their share of the work BEFORE they release this new product 
? I not sure if much or any.
I hope they are able to show me I am wrong on my comments.

Regards,
Fernando

On 14/01/2015 13:05, valent.turkovic at gmail.com wrote:
> Linksys/Belking marketing is again doing one thing and saying another?
>
> This time they say that WRT1200AC router is open source:
> http://www.zdnet.com/article/ces-2015-linksys-1200ac-an-inexpensive-open-source-802-11ac-wi-fi-router/
>
> I have tracked progress with WRT1900AC and saw how they failed to give 
> us open source driver, so I hope that this time they will actually 
> keep their (marketing) promise.
>
> I really, really, really hope that this time they have reached out and 
> contacted any of you OpenWrt developers and that we will get truly 
> open source driver from them.
>
> So please let us know if any of you have heard anything regarding 
> WRT1200AC router and it's drivers.
>
> Cheers,
> Valent.
>
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150116/ad59e5c5/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From raven at themaw.net  Thu Jan 15 23:27:03 2015
From: raven at themaw.net (Ian Kent)
Date: Fri, 16 Jan 2015 12:27:03 +0800
Subject: [OpenWrt-Devel] [PATCH] mwlwifi - dont break fw upload timing with
	log prints
Message-ID: <20150116042703.3327.96198.stgit@perseus.themaw.net>

The patch included here is needed if debug logging in mwlwifi
is enabled to a high enough level that the log prints are done
during time critical parts of firmware loading.

Enabling debug logging is, unfortuneatly, not as simple as defining
MWLDBG on the module make command line.

Something like this is also needed:

diff --git a/mwl_debug.c b/mwl_debug.c
index 821b0c0..f8644a8 100644
--- a/mwl_debug.c
+++ b/mwl_debug.c
@@ -41,7 +41,7 @@
 /* PRIVATE VARIABLES
 */

-static u32 dbg_levels = 0;
+static u32 dbg_levels = 0xffff;

 /* PUBLIC FUNCTION DEFINITION
 */

or dbg_levels set to some suitable integer that enables the logging
required. But that's another story.

This change is meant to avoid the firmware loading problem if anyone
does use the logging, and that's all.

Signed-off-by: Ian Kent <raven at themaw.net>
---
 ...nt-break-fw-upload-timing-with-log-prints.patch |   82 ++++++++++++++++++++
 1 file changed, 82 insertions(+)
 create mode 100644 package/kernel/mwlwifi/patches/002-dont-break-fw-upload-timing-with-log-prints.patch

diff --git a/package/kernel/mwlwifi/patches/002-dont-break-fw-upload-timing-with-log-prints.patch b/package/kernel/mwlwifi/patches/002-dont-break-fw-upload-timing-with-log-prints.patch
new file mode 100644
index 0000000..e112606
--- /dev/null
+++ b/package/kernel/mwlwifi/patches/002-dont-break-fw-upload-timing-with-log-prints.patch
@@ -0,0 +1,82 @@
+mwlwifi - dont break fw upload timing with log prints
+
+From: Ian Kent <raven at themaw.net>
+
+In the function mwl_fwdl_download_firmware() there's a comment that it
+takes ~1300 nSec for the register change that acknowledges each chunk
+of the firmware uploaded. But if you take too long to get to the check
+you can miss the event altogether.
+
+The Function mwl_fwdl_trig_pcicmd_bootcode() contains log prints that
+can take several miliseconds to complete and it is called from the above
+function to transfer a chunk of the firmware at a time. When logging is
+enabled it breaks the firware upload.
+
+So remove the function call that uploads the chunk (and contains log prints)
+and add its code in-line to avoid inadvertantly breaking the firmware upload
+by enabling logging.
+
+Signed-off-by: Ian Kent <raven at themaw.net>
+---
+ mwl_fwdl.c |   29 ++++++++++-------------------
+ 1 file changed, 10 insertions(+), 19 deletions(-)
+
+diff --git a/mwl_fwdl.c b/mwl_fwdl.c
+index 5f9ef91..46b61ed 100644
+--- a/mwl_fwdl.c
++++ b/mwl_fwdl.c
+@@ -40,7 +40,6 @@
+ */
+ 
+ static void mwl_fwdl_trig_pcicmd(struct mwl_priv *priv);
+-static void mwl_fwdl_trig_pcicmd_bootcode(struct mwl_priv *priv);
+ 
+ /* PUBLIC FUNCTION DEFINITION
+ */
+@@ -99,9 +98,12 @@ int mwl_fwdl_download_firmware(struct ieee80211_hw *hw)
+ 		*/
+ 		memcpy((char *)&priv->pcmd_buf[0], (fw->data + size_fw_downloaded), len);
+ 
+-		/* this function writes pdata to c10, then write 2 to c18
++		/* write pdata to c10, then write 2 to c18
+ 		*/
+-		mwl_fwdl_trig_pcicmd_bootcode(priv);
++		writel(priv->pphys_cmd_buf, priv->iobase1 + MACREG_REG_GEN_PTR);
++		writel(0x00, priv->iobase1 + MACREG_REG_INT_CODE);
++		writel(MACREG_H2ARIC_BIT_DOOR_BELL,
++		       priv->iobase1 + MACREG_REG_H2A_INTERRUPT_EVENTS);
+ 
+ 		curr_iteration = FW_MAX_NUM_CHECKS; /* this is arbitrary per your platform; we use 0xffff */
+ 
+@@ -110,6 +112,11 @@ int mwl_fwdl_download_firmware(struct ieee80211_hw *hw)
+ 		 * the write of event 2 to C1C == 2 is ~1300 nSec. Hence the checkings on host
+ 		 * has to consider how efficient your code can be to meet this timing, or you
+ 		 * can alternatively tweak this routines to fit your platform
++		 *
++		 * NOTE: not only does the register change take ~1300 nSec
++		 * but if you take too long to get to the check below, such
++		 * as issuing a printk() for logging, you can miss the event
++		 * altogether.
+ 		 */
+ 		do {
+ 
+@@ -201,19 +208,3 @@ static void mwl_fwdl_trig_pcicmd(struct mwl_priv *priv)
+ 
+ 	WLDBG_EXIT(DBG_LEVEL_1);
+ }
+-
+-static void mwl_fwdl_trig_pcicmd_bootcode(struct mwl_priv *priv)
+-{
+-	WLDBG_ENTER(DBG_LEVEL_1);
+-
+-	BUG_ON(!priv);
+-
+-	writel(priv->pphys_cmd_buf, priv->iobase1 + MACREG_REG_GEN_PTR);
+-
+-	writel(0x00, priv->iobase1 + MACREG_REG_INT_CODE);
+-
+-	writel(MACREG_H2ARIC_BIT_DOOR_BELL,
+-	       priv->iobase1 + MACREG_REG_H2A_INTERRUPT_EVENTS);
+-
+-	WLDBG_EXIT(DBG_LEVEL_1);
+-}
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From david at lang.hm  Thu Jan 15 23:31:55 2015
From: david at lang.hm (David Lang)
Date: Thu, 15 Jan 2015 20:31:55 -0800 (PST)
Subject: [OpenWrt-Devel] Is Linksys/Belkin lying (again) about being
 open source (WRT1200AC router) ?
In-Reply-To: <54B89121.4090606@gmail.com>
References: <CAD=nrE-Dbhcv36M9KKg26V3u35vr1i4TYqrazKJ4Jf0PPzrT=Q@mail.gmail.com>
 <54B89121.4090606@gmail.com>
Message-ID: <alpine.DEB.2.02.1501152027530.2080@nftneq.ynat.uz>

Is the 1200 out yet? The article that was posted earlier did say that they 
recognized that they had made mistakes with the 1900 and were planning to not do 
the same thing with the 1200 and have everything ready at the release date. If 
the release date is not here yet we can't say that they haven't improved.

Now, this isn't the same as having the support upstream in openwrt, which is 
what we all want, but if they do release the full source at the time of the 
router release, it is better than most.

David Lang

On Fri, 16 Jan 2015, Fernando Frediani wrote:

> Hi,
>
> Great email Valent, and I fully agree with your comments.
> We have had this discussion here in the past and nothing much changed from 
> Belkin side (actually it got worse as they disappeared apparently) showing a 
> total failure on product release.
>
> I'm not entirely sure of the status of WRT1200AC, but if there is nothing 
> here in OpenWRT and nothing else much can be found on the web they are once 
> again lying. They are publishing intentions as if it was something that was 
> already done and consolidated, ready for any buyer to enjoy. If there is 
> something going on between them and OpenWRT we are not aware, at least not 
> via this list.
>
> I personally consider a big slap in the face of consumers Marketing doing 
> what they do in Belkin, like if they didn't care at all. This is not simply 
> 'a mistake' or 'a misunderstanding' , it's complete dishonesty and they are 
> probably fully aware of this but simply don't care at all cause they just 
> want to reach their marketing target. Probably people there might not even 
> have a basic idea about what is open-source.
>
> As mentioned Marvel is doing some progress with the Wifi driver, which is 
> great for WRT1900AC owners, but that's Marvel only. What has Belkin done 
> about their share of the work BEFORE they release this new product ? I not 
> sure if much or any.
> I hope they are able to show me I am wrong on my comments.
>
> Regards,
> Fernando
>
> On 14/01/2015 13:05, valent.turkovic at gmail.com wrote:
>> Linksys/Belking marketing is again doing one thing and saying another?
>> 
>> This time they say that WRT1200AC router is open source:
>> http://www.zdnet.com/article/ces-2015-linksys-1200ac-an-inexpensive-open-source-802-11ac-wi-fi-router/
>> 
>> I have tracked progress with WRT1900AC and saw how they failed to give us 
>> open source driver, so I hope that this time they will actually keep their 
>> (marketing) promise.
>> 
>> I really, really, really hope that this time they have reached out and 
>> contacted any of you OpenWrt developers and that we will get truly open 
>> source driver from them.
>> 
>> So please let us know if any of you have heard anything regarding WRT1200AC 
>> router and it's drivers.
>> 
>> Cheers,
>> Valent.
>> 
>> 
>> _______________________________________________
>> openwrt-devel mailing list
>> openwrt-devel at lists.openwrt.org
>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
>
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From blogic at openwrt.org  Fri Jan 16 01:31:23 2015
From: blogic at openwrt.org (John Crispin)
Date: Fri, 16 Jan 2015 07:31:23 +0100
Subject: [OpenWrt-Devel] [PATCH] procd: delay inittab workers until the
	tty exists.
In-Reply-To: <54B8825C.4030300@exegin.com>
References: <54B8825C.4030300@exegin.com>
Message-ID: <54B8B03B.1000401@openwrt.org>

nack, using magic delays is a no go

On 16/01/2015 04:15, Owen Kirby wrote:
> If a process with a tty is specified in inittab, delay the worker
> process until the tty exists.
> 
> This allows starting consoles with terminals that get delayed until
> after procd is reads inittab,
> and it also allows hotplugging USB-to-serial adapters attached long
> after booting.
> 
> Signed-off-by: Owen Kirby <osk at exegin.com>
> ---
>  inittab.c | 14 ++++++++++----
>  1 file changed, 10 insertions(+), 4 deletions(-)
> 
> diff --git a/inittab.c b/inittab.c
> index 623103d..73c113f 100644
> --- a/inittab.c
> +++ b/inittab.c
> @@ -99,9 +99,15 @@ static void fork_worker(struct init_action *a)
>      if (!a->proc.pid) {
>          p = setsid();
>  
> -        fd = dev_open(a->id);
> -        if (fd != -1)
> -        {
> +        if (a->id) {
> +            struct timespec tm;
> +            tm.tv_sec = a->respawn / 1000;
> +            tm.tv_nsec = (a->respawn % 1000) * 1000000;
> +
> +            while ((fd = dev_open(a->id)) == -1)
> +                if (nanosleep(&tm, NULL) == -1)
> +                    exit(-1);
> +
>              dup2(fd, STDIN_FILENO);
>              dup2(fd, STDOUT_FILENO);
>              dup2(fd, STDERR_FILENO);
> @@ -157,7 +163,7 @@ static void askfirst(struct init_action *a)
>  {
>      int i;
>  
> -    if (!dev_exist(a->id) || (console && !strcmp(console, a->id))) {
> +    if (console && !strcmp(console, a->id)) {
>          DEBUG(4, "Skipping %s\n", a->id);
>          return;
>      }
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From ben.mulvihill at gmail.com  Fri Jan 16 04:12:31 2015
From: ben.mulvihill at gmail.com (Ben Mulvihill)
Date: Fri, 16 Jan 2015 10:12:31 +0100
Subject: [OpenWrt-Devel] question about ath9k endianness check in
	eeprom_9287.c
In-Reply-To: <1419724928.5692.67.camel@merveille.lan>
References: <1419724928.5692.67.camel@merveille.lan>
Message-ID: <1421399551.9708.49.camel@merveille.lan>

On Sun, 2014-12-28 at 01:02 +0100, Ben Mulvihill wrote:
> Hello Felix,
> 
> I am working on the BT Home Hub 3A, which has ath9k wireless.
> More or less everything is working now, apart from
> reading the calibration data. To get that working too, 
> endianness checking must be enabled. That requires a one line
> fix to eeprom_9257.c . 
> 
> --- a/drivers/net/wireless/ath/ath9k/eeprom_9287.c	2014-09-27 15:48:08.000000000 +0200
> +++ b/drivers/net/wireless/ath/ath9k/eeprom_9287.c	2014-12-28 00:55:52.000000000 +0100
> @@ -184,7 +184,7 @@ static int ath9k_hw_ar9287_check_eeprom(
>  	struct ar9287_eeprom *eep = &ah->eeprom.map9287;
>  	struct ath_common *common = ath9k_hw_common(ah);
>  
> -	if (!ath9k_hw_use_flash(ah)) {
> +	if (!(ah->ah_flags & AH_NO_EEP_SWAP)) {
>  		if (!ath9k_hw_nvram_read(ah, AR5416_EEPROM_MAGIC_OFFSET,
>  					 &magic)) {
>  			ath_err(common, "Reading Magic # failed\n");
> 
> A similar fix was in fact present until quite recently
> (till r42950 to be precise) in
> package/kernel/mac80211/patches/501-ath9k-eeprom_endianess.patch
> but in the wrong place (there are two calls to ath9k_hw_use_flash()
> in eeprom_9287.c, and the patch changed the wrong one). With
> changeset 42951 that fix was then dropped (together with the
> equivalent fix to eeprom_4k.c).
> 
> A much much earlier version of 501-ath9k-eeprom_endianess.patch
> (r31084) contains the fix in the correct place. I guess 
> that somewhere in between r31084 and r42950 (I haven't tried to
> work out exactly where) someone slipped up when updating this 
> patch. And presumably there can't be many boards making use of
> this code otherwise someone else would have noticed already.
> 
> If I had I been writing this email four months ago I would
> simply  have submitted a patch correcting
> 501-ath9k-eeprom_endianess.patch.
> However that patch and its successor have now disappeared. Am I
> right in thinking that their contents have gone upstream? If 
> so I should be grateful if you would let me know how to proceed.
> Should I submit a new patch to be inserted into
> package/kernel/mac80211/patches ? Or should I try to get the fix
> into compat-wireless directly?
> 
> Many thanks, Ben Mulvihill
> 

Any thoughts about this? Actually I think there are three options:

 - a new patch in package/kernel/mac80211/patches reinstating 
   a couple of lines from the old 501-ath9k-eeprom_endianess.patch

 - the same fix straight into the upstream code

 - no fix at all, and instead work round the bug during installation
   by reading the ath9k calibration partition, byte-swapping certain
   fields offline and re-flashing it.
   
Thanks in advance.
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From christian.schoenebeck at gmail.com  Fri Jan 16 04:36:38 2015
From: christian.schoenebeck at gmail.com (Christian Schoenebeck)
Date: Fri, 16 Jan 2015 10:36:38 +0100
Subject: [OpenWrt-Devel] ddns-scripts "sleep 10" before updating?
In-Reply-To: <CAE2LqHKDHO5-bmxPcRFwv10G0Zd9HEc7UJDvg4fjGsZ-Tadj4Q@mail.gmail.com>
References: <CAE2LqHL5T0RTVPWuoY73M5bMi_0x1S3KhRb8GpVz0Fkm4Zcp8g@mail.gmail.com>	<54B5241A.2020105@gmail.com>	<CAE2LqH+tHYRD+Zy3xABd=6_hRXY_hj-x3+wKwEV+EwMukFtXAA@mail.gmail.com>	<54B822E1.1050606@gmail.com>
 <CAE2LqHKDHO5-bmxPcRFwv10G0Zd9HEc7UJDvg4fjGsZ-Tadj4Q@mail.gmail.com>
Message-ID: <54B8DBA6.7080606@gmail.com>

Am 16.01.2015 um 03:07 schrieb Catalin Patulea:
> On Thu, Jan 15, 2015 at 3:28 PM, Christian Schoenebeck
> <christian.schoenebeck at gmail.com> wrote:
>> I did a lot of testing with a user using satellite Internet connection.
>> He quickly gets his IP from the modem but he needs to use a global dns server to verify his registered ip via tcp
>> because the modem buffers all udp dns requests not looking for any timeouts.
>> For him it takes same seconds until the connection was established to the web after getting his ip from the modem.
> Let me see if I understand.. so after his interface comes up,
> dynamic_dns_updater was getting stuck on "get_registered_ip" because
> the connection to the web is not yet up? Perhaps this could be handled
> by a timeout on the host/nslookup command?
> 
> I also think this is an edge case - in most cases, you can call
> get_registered_ip immediately and it will work.
> 
>> The "5 minutes" I tested the easy way.
>> On my ubuntu box I ran nslookup for my own ddns-address against Google's public dns in an endless loop.
>> Then I send out a new ip to my ddns provider via ddns-scripts and wait.
>> The longest time it takes to have a stable answer from nslookup was 4 minutes 10 seconds.
>> Plus reserve = 5 minutes. Also the reason why check_interval minimum is set to 5 minutes = 300 seconds
>> in line 176 of dynamic_dns_updater.sh.
> 
> I understand that the latency through Google public dns is 5 minutes,
> but not everyone uses Google public dns, and your test is not
> representative of queries for cache-cold records.
> 
> I tried adding a new record to my domain to see what happens on a
> query that is not already in the cache. This is the same case as
> updating an existing DDNS entry that hasn't been accessed in a long
> time.
> 
> The record was immediately (<15 seconds, while I typed the commands)
> available in my DNS provider's server, my ISP's server, and 8.8.8.8.
> The intermediate servers didn't even know if the record exists, so
> they had to contact the authoritative server. Probably if I update the
> IP now, it will take a long time to propagate, but this is not a
> common case for me.
> 
> What I want is that if I get a new IP/router crashes/power outage, for
> my IP to be updated in the authoritative DNS server as soon as
> possible. It is rare that I access my DDNS just before this
> (crash/power outage/etc.) happens, so the record will not be cached,
> so if I access it now, I will see the fresh IP in any DNS server. In
> this case the "sleep 10" is the limiting factor.
> 
> I think probably this is the case for most DDNS users - they probably
> access their records very rarely, so they are not cached, so "sleep
> 10" is the biggest factor to how quickly their new address is visible.
> But I can't speak definitively about any but my case.
> 
> Perhaps the sleep could be a configuration option which defaults to 0.
> Specific users can set it if they need it.
> 
Did you really ever run into problems because of 10 seconds delay after an outage of thousands of seconds ?
What do your ddns provider think about multiple updates per minute, if the connection toggle due to errors on your wan connection. Most providers start blocking for hours after to many updates.
For the moment please comment out the 4 lines starting at line 219 of dynamic_dns_updater.sh
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From zajec5 at gmail.com  Fri Jan 16 04:42:54 2015
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Fri, 16 Jan 2015 10:42:54 +0100
Subject: [OpenWrt-Devel] [PATCH V2 uclient] support for connection timeout
In-Reply-To: <1421336450-10781-1-git-send-email-zajec5@gmail.com>
References: <1421336450-10781-1-git-send-email-zajec5@gmail.com>
Message-ID: <1421401374-9085-1-git-send-email-zajec5@gmail.com>

Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com>
---
V2: Add uclient_set_timeout
    Stop timer after receiving data
    Start timer after fetching data by uclient user
---
 uclient-fetch.c |  4 ++++
 uclient-http.c  | 12 ++++++++++--
 uclient.c       | 36 +++++++++++++++++++++++++++++++++++-
 uclient.h       | 20 ++++++++++++++++++++
 4 files changed, 69 insertions(+), 3 deletions(-)

diff --git a/uclient-fetch.c b/uclient-fetch.c
index 22f15c6..0617a02 100644
--- a/uclient-fetch.c
+++ b/uclient-fetch.c
@@ -194,6 +194,10 @@ static void handle_uclient_error(struct uclient *cl, int code)
 		type = "Connection failed";
 		error_ret = 4;
 		break;
+	case UCLIENT_ERROR_TIMEDOUT:
+		type = "Connection timed out";
+		error_ret = 4;
+		break;
 	case UCLIENT_ERROR_SSL_INVALID_CERT:
 		type = "Invalid SSL certificate";
 		ignore = !verify;
diff --git a/uclient-http.c b/uclient-http.c
index c25e52f..38e7761 100644
--- a/uclient-http.c
+++ b/uclient-http.c
@@ -689,8 +689,12 @@ static void __uclient_notify_read(struct uclient_http *uh)
 	if (uh->eof)
 		return;
 
-	if (uh->state == HTTP_STATE_RECV_DATA && uc->cb->data_read)
-		uc->cb->data_read(uc);
+	if (uh->state == HTTP_STATE_RECV_DATA)
+		/* Now it's uclient user turn to read some data */
+		uloop_timeout_cancel(&uc->connection_timeout);
+
+		if (uc->cb->data_read)
+			uc->cb->data_read(uc);
 }
 
 static void __uclient_notify_write(struct uclient_http *uh)
@@ -1030,6 +1034,10 @@ uclient_http_read(struct uclient *cl, char *buf, unsigned int len)
 
 	uclient_notify_eof(uh);
 
+	/* Now that we consumed something and if this isn't EOF, start timer again */
+	if (!uh->uc.eof && !cl->connection_timeout.pending)
+		uloop_timeout_set(&cl->connection_timeout, cl->timeout_msecs);
+
 	return len;
 }
 
diff --git a/uclient.c b/uclient.c
index ab2d5b6..d599763 100644
--- a/uclient.c
+++ b/uclient.c
@@ -141,6 +141,16 @@ free:
 	return NULL;
 }
 
+static void uclient_connection_timeout(struct uloop_timeout *timeout)
+{
+	struct uclient *cl = container_of(timeout, struct uclient, connection_timeout);
+
+	if (cl->backend->disconnect)
+		cl->backend->disconnect(cl);
+
+	uclient_backend_set_error(cl, UCLIENT_ERROR_TIMEDOUT);
+}
+
 struct uclient *uclient_new(const char *url_str, const char *auth_str, const struct uclient_cb *cb)
 {
 	struct uclient *cl;
@@ -157,6 +167,8 @@ struct uclient *uclient_new(const char *url_str, const char *auth_str, const str
 	cl->backend = url->backend;
 	cl->cb = cb;
 	cl->url = url;
+	cl->timeout_msecs = UCLIENT_DEFAULT_TIMEOUT_MS;
+	cl->connection_timeout.cb = uclient_connection_timeout;
 
 	return cl;
 }
@@ -182,6 +194,16 @@ int uclient_set_url(struct uclient *cl, const char *url_str, const char *auth_st
 	return 0;
 }
 
+int uclient_set_timeout(struct uclient *cl, int msecs)
+{
+	if (msecs <= 0)
+		return -EINVAL;
+
+	cl->timeout_msecs = msecs;
+
+	return 0;
+}
+
 int uclient_connect(struct uclient *cl)
 {
 	return cl->backend->connect(cl);
@@ -209,10 +231,18 @@ int uclient_write(struct uclient *cl, char *buf, int len)
 
 int uclient_request(struct uclient *cl)
 {
+	int err;
+
 	if (!cl->backend->request)
 		return -1;
 
-	return cl->backend->request(cl);
+	err = cl->backend->request(cl);
+	if (err)
+		return err;
+
+	uloop_timeout_set(&cl->connection_timeout, cl->timeout_msecs);
+
+	return 0;
 }
 
 int uclient_read(struct uclient *cl, char *buf, int len)
@@ -225,6 +255,8 @@ int uclient_read(struct uclient *cl, char *buf, int len)
 
 void uclient_disconnect(struct uclient *cl)
 {
+	uloop_timeout_cancel(&cl->connection_timeout);
+
 	if (!cl->backend->disconnect)
 		return;
 
@@ -252,6 +284,7 @@ void __hidden uclient_backend_set_error(struct uclient *cl, int code)
 	if (cl->error_code)
 		return;
 
+	uloop_timeout_cancel(&cl->connection_timeout);
 	cl->error_code = code;
 	uclient_backend_change_state(cl);
 }
@@ -261,6 +294,7 @@ void __hidden uclient_backend_set_eof(struct uclient *cl)
 	if (cl->eof || cl->error_code)
 		return;
 
+	uloop_timeout_cancel(&cl->connection_timeout);
 	cl->eof = true;
 	uclient_backend_change_state(cl);
 }
diff --git a/uclient.h b/uclient.h
index d5a0d5b..5904a38 100644
--- a/uclient.h
+++ b/uclient.h
@@ -24,12 +24,15 @@
 #include <libubox/ustream.h>
 #include <libubox/ustream-ssl.h>
 
+#define UCLIENT_DEFAULT_TIMEOUT_MS			30000
+
 struct uclient_cb;
 struct uclient_backend;
 
 enum uclient_error_code {
 	UCLIENT_ERROR_UNKNOWN,
 	UCLIENT_ERROR_CONNECT,
+	UCLIENT_ERROR_TIMEDOUT,
 	UCLIENT_ERROR_SSL_INVALID_CERT,
 	UCLIENT_ERROR_SSL_CN_MISMATCH,
 	UCLIENT_ERROR_MISSING_SSL_CONTEXT,
@@ -59,6 +62,7 @@ struct uclient {
 	union uclient_addr local_addr, remote_addr;
 
 	struct uclient_url *url;
+	int timeout_msecs;
 	void *priv;
 
 	bool eof;
@@ -67,6 +71,7 @@ struct uclient {
 	int status_code;
 	struct blob_attr *meta;
 
+	struct uloop_timeout connection_timeout;
 	struct uloop_timeout timeout;
 };
 
@@ -82,6 +87,21 @@ struct uclient *uclient_new(const char *url, const char *auth_str, const struct
 void uclient_free(struct uclient *cl);
 
 int uclient_set_url(struct uclient *cl, const char *url, const char *auth);
+
+/**
+ * Sets connection timeout.
+ *
+ * Provided timeout value will be used for:
+ * 1) Receiving HTTP response
+ * 2) Receiving data
+ *
+ * In case of timeout uclient will use error callback with
+ * UCLIENT_ERROR_TIMEDOUT code.
+ *
+ * @param msecs timeout in milliseconds
+ */
+int uclient_set_timeout(struct uclient *cl, int msecs);
+
 int uclient_connect(struct uclient *cl);
 void uclient_disconnect(struct uclient *cl);
 
-- 
1.8.4.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From john at szakmeister.net  Fri Jan 16 05:01:49 2015
From: john at szakmeister.net (John Szakmeister)
Date: Fri, 16 Jan 2015 05:01:49 -0500
Subject: [OpenWrt-Devel] [PATCH V2 uclient] support for connection
	timeout
In-Reply-To: <1421401374-9085-1-git-send-email-zajec5@gmail.com>
References: <1421336450-10781-1-git-send-email-zajec5@gmail.com>
 <1421401374-9085-1-git-send-email-zajec5@gmail.com>
Message-ID: <CAEBDL5U_x1m_cbUEEjk4a8sqxAnU8ia5KtiAZAwoP2wP=c1ZwQ@mail.gmail.com>

On Fri, Jan 16, 2015 at 4:42 AM, Rafa? Mi?ecki <zajec5 at gmail.com> wrote:
[snip]
> -       if (uh->state == HTTP_STATE_RECV_DATA && uc->cb->data_read)
> -               uc->cb->data_read(uc);
> +       if (uh->state == HTTP_STATE_RECV_DATA)
> +               /* Now it's uclient user turn to read some data */
> +               uloop_timeout_cancel(&uc->connection_timeout);
> +
> +               if (uc->cb->data_read)
> +                       uc->cb->data_read(uc);

The above snippet doesn't look right.  I think you probably
meant to add curly braces around the block:

    if (uh->state == HTTP_STATE_RECV_DATA) {
        // ...
    }

-John
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From zajec5 at gmail.com  Fri Jan 16 05:21:02 2015
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Fri, 16 Jan 2015 11:21:02 +0100
Subject: [OpenWrt-Devel] [PATCH V3 uclient] support for connection timeout
In-Reply-To: <1421401374-9085-1-git-send-email-zajec5@gmail.com>
References: <1421401374-9085-1-git-send-email-zajec5@gmail.com>
Message-ID: <1421403662-9551-1-git-send-email-zajec5@gmail.com>

Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com>
---
V2: Add uclient_set_timeout
    Stop timer after receiving data
    Start timer after fetching data by uclient user
V3: Fix missing braces in __uclient_notify_read, thanks John!
---
 uclient-fetch.c |  4 ++++
 uclient-http.c  | 13 +++++++++++--
 uclient.c       | 36 +++++++++++++++++++++++++++++++++++-
 uclient.h       | 20 ++++++++++++++++++++
 4 files changed, 70 insertions(+), 3 deletions(-)

diff --git a/uclient-fetch.c b/uclient-fetch.c
index 22f15c6..0617a02 100644
--- a/uclient-fetch.c
+++ b/uclient-fetch.c
@@ -194,6 +194,10 @@ static void handle_uclient_error(struct uclient *cl, int code)
 		type = "Connection failed";
 		error_ret = 4;
 		break;
+	case UCLIENT_ERROR_TIMEDOUT:
+		type = "Connection timed out";
+		error_ret = 4;
+		break;
 	case UCLIENT_ERROR_SSL_INVALID_CERT:
 		type = "Invalid SSL certificate";
 		ignore = !verify;
diff --git a/uclient-http.c b/uclient-http.c
index c25e52f..af43b05 100644
--- a/uclient-http.c
+++ b/uclient-http.c
@@ -689,8 +689,13 @@ static void __uclient_notify_read(struct uclient_http *uh)
 	if (uh->eof)
 		return;
 
-	if (uh->state == HTTP_STATE_RECV_DATA && uc->cb->data_read)
-		uc->cb->data_read(uc);
+	if (uh->state == HTTP_STATE_RECV_DATA) {
+		/* Now it's uclient user turn to read some data */
+		uloop_timeout_cancel(&uc->connection_timeout);
+
+		if (uc->cb->data_read)
+			uc->cb->data_read(uc);
+	}
 }
 
 static void __uclient_notify_write(struct uclient_http *uh)
@@ -1030,6 +1035,10 @@ uclient_http_read(struct uclient *cl, char *buf, unsigned int len)
 
 	uclient_notify_eof(uh);
 
+	/* Now that we consumed something and if this isn't EOF, start timer again */
+	if (!uh->uc.eof && !cl->connection_timeout.pending)
+		uloop_timeout_set(&cl->connection_timeout, cl->timeout_msecs);
+
 	return len;
 }
 
diff --git a/uclient.c b/uclient.c
index ab2d5b6..d599763 100644
--- a/uclient.c
+++ b/uclient.c
@@ -141,6 +141,16 @@ free:
 	return NULL;
 }
 
+static void uclient_connection_timeout(struct uloop_timeout *timeout)
+{
+	struct uclient *cl = container_of(timeout, struct uclient, connection_timeout);
+
+	if (cl->backend->disconnect)
+		cl->backend->disconnect(cl);
+
+	uclient_backend_set_error(cl, UCLIENT_ERROR_TIMEDOUT);
+}
+
 struct uclient *uclient_new(const char *url_str, const char *auth_str, const struct uclient_cb *cb)
 {
 	struct uclient *cl;
@@ -157,6 +167,8 @@ struct uclient *uclient_new(const char *url_str, const char *auth_str, const str
 	cl->backend = url->backend;
 	cl->cb = cb;
 	cl->url = url;
+	cl->timeout_msecs = UCLIENT_DEFAULT_TIMEOUT_MS;
+	cl->connection_timeout.cb = uclient_connection_timeout;
 
 	return cl;
 }
@@ -182,6 +194,16 @@ int uclient_set_url(struct uclient *cl, const char *url_str, const char *auth_st
 	return 0;
 }
 
+int uclient_set_timeout(struct uclient *cl, int msecs)
+{
+	if (msecs <= 0)
+		return -EINVAL;
+
+	cl->timeout_msecs = msecs;
+
+	return 0;
+}
+
 int uclient_connect(struct uclient *cl)
 {
 	return cl->backend->connect(cl);
@@ -209,10 +231,18 @@ int uclient_write(struct uclient *cl, char *buf, int len)
 
 int uclient_request(struct uclient *cl)
 {
+	int err;
+
 	if (!cl->backend->request)
 		return -1;
 
-	return cl->backend->request(cl);
+	err = cl->backend->request(cl);
+	if (err)
+		return err;
+
+	uloop_timeout_set(&cl->connection_timeout, cl->timeout_msecs);
+
+	return 0;
 }
 
 int uclient_read(struct uclient *cl, char *buf, int len)
@@ -225,6 +255,8 @@ int uclient_read(struct uclient *cl, char *buf, int len)
 
 void uclient_disconnect(struct uclient *cl)
 {
+	uloop_timeout_cancel(&cl->connection_timeout);
+
 	if (!cl->backend->disconnect)
 		return;
 
@@ -252,6 +284,7 @@ void __hidden uclient_backend_set_error(struct uclient *cl, int code)
 	if (cl->error_code)
 		return;
 
+	uloop_timeout_cancel(&cl->connection_timeout);
 	cl->error_code = code;
 	uclient_backend_change_state(cl);
 }
@@ -261,6 +294,7 @@ void __hidden uclient_backend_set_eof(struct uclient *cl)
 	if (cl->eof || cl->error_code)
 		return;
 
+	uloop_timeout_cancel(&cl->connection_timeout);
 	cl->eof = true;
 	uclient_backend_change_state(cl);
 }
diff --git a/uclient.h b/uclient.h
index d5a0d5b..5904a38 100644
--- a/uclient.h
+++ b/uclient.h
@@ -24,12 +24,15 @@
 #include <libubox/ustream.h>
 #include <libubox/ustream-ssl.h>
 
+#define UCLIENT_DEFAULT_TIMEOUT_MS			30000
+
 struct uclient_cb;
 struct uclient_backend;
 
 enum uclient_error_code {
 	UCLIENT_ERROR_UNKNOWN,
 	UCLIENT_ERROR_CONNECT,
+	UCLIENT_ERROR_TIMEDOUT,
 	UCLIENT_ERROR_SSL_INVALID_CERT,
 	UCLIENT_ERROR_SSL_CN_MISMATCH,
 	UCLIENT_ERROR_MISSING_SSL_CONTEXT,
@@ -59,6 +62,7 @@ struct uclient {
 	union uclient_addr local_addr, remote_addr;
 
 	struct uclient_url *url;
+	int timeout_msecs;
 	void *priv;
 
 	bool eof;
@@ -67,6 +71,7 @@ struct uclient {
 	int status_code;
 	struct blob_attr *meta;
 
+	struct uloop_timeout connection_timeout;
 	struct uloop_timeout timeout;
 };
 
@@ -82,6 +87,21 @@ struct uclient *uclient_new(const char *url, const char *auth_str, const struct
 void uclient_free(struct uclient *cl);
 
 int uclient_set_url(struct uclient *cl, const char *url, const char *auth);
+
+/**
+ * Sets connection timeout.
+ *
+ * Provided timeout value will be used for:
+ * 1) Receiving HTTP response
+ * 2) Receiving data
+ *
+ * In case of timeout uclient will use error callback with
+ * UCLIENT_ERROR_TIMEDOUT code.
+ *
+ * @param msecs timeout in milliseconds
+ */
+int uclient_set_timeout(struct uclient *cl, int msecs);
+
 int uclient_connect(struct uclient *cl);
 void uclient_disconnect(struct uclient *cl);
 
-- 
1.8.4.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From nbd at openwrt.org  Fri Jan 16 06:09:52 2015
From: nbd at openwrt.org (Felix Fietkau)
Date: Fri, 16 Jan 2015 12:09:52 +0100
Subject: [OpenWrt-Devel] question about ath9k endianness check in
	eeprom_9287.c
In-Reply-To: <1421399551.9708.49.camel@merveille.lan>
References: <1419724928.5692.67.camel@merveille.lan>
 <1421399551.9708.49.camel@merveille.lan>
Message-ID: <54B8F180.1050803@openwrt.org>

On 2015-01-16 10:12, Ben Mulvihill wrote:
> Any thoughts about this? Actually I think there are three options:
Hey Ben,

sorry for not getting back to you earlier, I was busy with a lot of stuff.

>  - a new patch in package/kernel/mac80211/patches reinstating 
>    a couple of lines from the old 501-ath9k-eeprom_endianess.patch
> 
>  - the same fix straight into the upstream code
> 
>  - no fix at all, and instead work round the bug during installation
>    by reading the ath9k calibration partition, byte-swapping certain
>    fields offline and re-flashing it.
I intend to make a patch to unify those checks across
eeprom_{def,4k,9287}.c to get rid of duplication. I will submit that
upstream and commit it to OpenWrt

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


From bjorn at mork.no  Fri Jan 16 06:45:53 2015
From: bjorn at mork.no (=?utf-8?Q?Bj=C3=B8rn_Mork?=)
Date: Fri, 16 Jan 2015 12:45:53 +0100
Subject: [OpenWrt-Devel] Is Linksys/Belkin lying (again) about being
	open source (WRT1200AC router) ?
In-Reply-To: <54B89121.4090606@gmail.com> (Fernando Frediani's message of
 "Fri, 16 Jan 2015 02:18:41 -0200")
References: <CAD=nrE-Dbhcv36M9KKg26V3u35vr1i4TYqrazKJ4Jf0PPzrT=Q@mail.gmail.com>
 <54B89121.4090606@gmail.com>
Message-ID: <87wq4nuexa.fsf@nemi.mork.no>

Fernando Frediani <fhfrediani at gmail.com> writes:

> I'm not entirely sure of the status of WRT1200AC, but if there is
> nothing here in OpenWRT and nothing else much can be found on the web
> they are once again lying. They are publishing intentions as if it was
> something that was already done and consolidated, ready for any buyer
> to enjoy. If there is something going on between them and OpenWRT we
> are not aware, at least not via this list.

You should probably take a closer look at these two emails. Preferably
in your own list archive if you have one, as the pipermail archive is
missing some of the more interesting details.  Like who Marvell chose to
CC the driver announcement to, and which email address they used....

https://lists.openwrt.org/pipermail/openwrt-devel/2014-December/030229.html
https://lists.openwrt.org/pipermail/openwrt-devel/2015-January/030526.html

I might be reading too much between the lines here, but this looks very
promising to me.

Yes, I also regularily get frustrated with marketing people overselling
features, and selling them before they are ready.  But you should
realize that Belkin is not the only vendor doing that. The really
annoying thing with the "WRTs" is that they oversell a feature we care
so deeply about - opensource support. But I believe we should appreciate
the fact that the marketing people find this feature interesting, and do
our best to keep it that way.  And just realize that overselling is part
of the game.

In any case, we are much better off if this list is used for technical
discussions instead of vendor bashing.


Bj?rn (with absolutely no shares in neither Belkin, Marvell nor OpenWRT)
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From jaceq at aol.pl  Fri Jan 16 06:55:37 2015
From: jaceq at aol.pl (Jacek Kikiewicz)
Date: Fri, 16 Jan 2015 12:55:37 +0100
Subject: [OpenWrt-Devel] Is Linksys/Belkin lying (again) about being
 open source (WRT1200AC router) ?
In-Reply-To: <87wq4nuexa.fsf@nemi.mork.no>
References: <CAD=nrE-Dbhcv36M9KKg26V3u35vr1i4TYqrazKJ4Jf0PPzrT=Q@mail.gmail.com>
 <54B89121.4090606@gmail.com> <87wq4nuexa.fsf@nemi.mork.no>
Message-ID: <54B8FC39.5030008@aol.pl>

Hi,

I don't get this discussion, few days Imre Kaloz admitted he will work on WRT1200AC so this
means that Belkin reached out to him...

Regards,
Jacek

On 16.01.2015 12:45, Bj?rn Mork wrote:
> Fernando Frediani <fhfrediani at gmail.com> writes:
> 
>> I'm not entirely sure of the status of WRT1200AC, but if there is
>> nothing here in OpenWRT and nothing else much can be found on the web
>> they are once again lying. They are publishing intentions as if it was
>> something that was already done and consolidated, ready for any buyer
>> to enjoy. If there is something going on between them and OpenWRT we
>> are not aware, at least not via this list.
> 
> You should probably take a closer look at these two emails. Preferably
> in your own list archive if you have one, as the pipermail archive is
> missing some of the more interesting details.  Like who Marvell chose to
> CC the driver announcement to, and which email address they used....
> 
> https://lists.openwrt.org/pipermail/openwrt-devel/2014-December/030229.html
> https://lists.openwrt.org/pipermail/openwrt-devel/2015-January/030526.html
> 
> I might be reading too much between the lines here, but this looks very
> promising to me.
> 
> Yes, I also regularily get frustrated with marketing people overselling
> features, and selling them before they are ready.  But you should
> realize that Belkin is not the only vendor doing that. The really
> annoying thing with the "WRTs" is that they oversell a feature we care
> so deeply about - opensource support. But I believe we should appreciate
> the fact that the marketing people find this feature interesting, and do
> our best to keep it that way.  And just realize that overselling is part
> of the game.
> 
> In any case, we are much better off if this list is used for technical
> discussions instead of vendor bashing.
> 
> 
> Bj?rn (with absolutely no shares in neither Belkin, Marvell nor OpenWRT)
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From bjorn at mork.no  Fri Jan 16 07:00:26 2015
From: bjorn at mork.no (=?utf-8?Q?Bj=C3=B8rn_Mork?=)
Date: Fri, 16 Jan 2015 13:00:26 +0100
Subject: [OpenWrt-Devel] Is Linksys/Belkin lying (again) about being
	open source (WRT1200AC router) ?
In-Reply-To: <54B8FC39.5030008@aol.pl> (Jacek Kikiewicz's message of "Fri, 16
 Jan 2015 12:55:37 +0100")
References: <CAD=nrE-Dbhcv36M9KKg26V3u35vr1i4TYqrazKJ4Jf0PPzrT=Q@mail.gmail.com>
 <54B89121.4090606@gmail.com> <87wq4nuexa.fsf@nemi.mork.no>
 <54B8FC39.5030008@aol.pl>
Message-ID: <87h9vrue91.fsf@nemi.mork.no>

Jacek Kikiewicz <jaceq at aol.pl> writes:

> I don't get this discussion, few days Imre Kaloz admitted he will work
> on WRT1200AC so this means that Belkin reached out to him...

Yes, that's what I subtly tried to point out with the list archive
references :-)


Bj?rn
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From luigi.tarenga at gmail.com  Fri Jan 16 07:04:28 2015
From: luigi.tarenga at gmail.com (Luigi Tarenga)
Date: Fri, 16 Jan 2015 13:04:28 +0100
Subject: [OpenWrt-Devel] [PATCH] ar71xx: add support for TP-LINK TL-WA701ND
	v2
Message-ID: <CAKkO-Eg2QZoMdXTtXWO2496_xPW3+Wd4QJZKgNfYpGO-0Ymbgw@mail.gmail.com>

Signed-off-by: Luigi Tarenga <luigi.tarenga at gmail.com>
---
I send the patch again, maybe it was not formatted correctly.
please let me know if there is any problem in how i send it.

regards
Luigi
---
 package/libs/openssl/Makefile                         |  6 +++---
 package/libs/openssl/patches/150-no_engines.patch     | 18 +++++++++---------
 package/libs/openssl/patches/200-parallel_build.patch |  8 ++++----
 package/network/ipv6/map/Makefile                     |  7 ++++---
 package/network/ipv6/map/files/map.sh                 |  3 +++
 package/network/ipv6/map/src/mapcalc.c                |  6 ++++--
 6 files changed, 27 insertions(+), 21 deletions(-)

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh
b/target/linux/ar71xx/base-files/etc/diag.sh
index fa07f39..eb96338 100755
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -195,6 +195,7 @@ get_status_led() {
     tl-mr3220-v2 | \
     tl-mr3420 | \
     tl-mr3420-v2 | \
+    tl-wa701nd-v2 | \
     tl-wa801nd-v2 | \
     tl-wa901nd | \
     tl-wa901nd-v2 | \
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index 5b9dbe7..51c2bca 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -275,7 +275,11 @@ tl-wa850re)
     ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "tp-link:blue:signal5"
"wlan0" "80" "100" "-79" "13"
     ;;

-tl-wa860re)
+tl-wa701nd-v2 | \
+tl-wa830re-v2 | \
+tl-wa860re | \
+tl-wa801nd-v2 | \
+tl-wa901nd-v3)
     ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
     ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
     ;;
@@ -333,11 +337,6 @@ tl-wr841n-v8)
     ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
     ;;

-tl-wa830re-v2)
-    ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
-    ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
-    ;;
-
 tl-wr841n-v9)
     ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth1"
     ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x10"
@@ -357,12 +356,6 @@ tl-wr842n-v2)
     ucidef_set_led_usbdev "usb" "USB" "tp-link:green:3g" "1-1"
     ;;

-tl-wa801nd-v2 | \
-tl-wa901nd-v3)
-    ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
-    ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
-    ;;
-
 tl-wr941nd | \
 tl-wr1041n-v2)
     ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index c5cfd67..4be30b8 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -301,6 +301,7 @@ tl-mr13u |\
 tl-mr3020 |\
 tl-mr3040 |\
 tl-mr3040-v2 |\
+tl-wa701nd-v2 |\
 tl-wa750re |\
 tl-wa850re |\
 tl-wa830re-v2 |\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 1e96b6d..df35775 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -571,6 +571,9 @@ ar71xx_board_detect() {
     *"TL-MR3420 v2")
         name="tl-mr3420-v2"
         ;;
+    *"TL-WA701ND v2")
+        name="tl-wa701nd-v2"
+        ;;
     *TL-WA750RE)
         name="tl-wa750re"
         ;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 846954c..eeaac6a 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -269,6 +269,7 @@ platform_check_image() {
     tl-mr3220-v2 | \
     tl-mr3420 | \
     tl-mr3420-v2 | \
+    tl-wa701nd-v2 | \
     tl-wa7510n | \
     tl-wa750re | \
     tl-wa850re | \
diff --git a/target/linux/ar71xx/config-3.10 b/target/linux/ar71xx/config-3.10
index 9a8378a..482914a 100644
--- a/target/linux/ar71xx/config-3.10
+++ b/target/linux/ar71xx/config-3.10
@@ -88,6 +88,7 @@ CONFIG_ATH79_MACH_TL_MR11U=y
 CONFIG_ATH79_MACH_TL_MR13U=y
 CONFIG_ATH79_MACH_TL_MR3020=y
 CONFIG_ATH79_MACH_TL_MR3X20=y
+CONFIG_ATH79_MACH_TL_WA701ND_V2=y
 CONFIG_ATH79_MACH_TL_WA830RE_V2=y
 CONFIG_ATH79_MACH_TL_WA901ND=y
 CONFIG_ATH79_MACH_TL_WA901ND_V2=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa701nd-v2.c
b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa701nd-v2.c
new file mode 100644
index 0000000..aab92b3
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa701nd-v2.c
@@ -0,0 +1,116 @@
+/*
+ *  TP-LINK TL-WA701ND v2 board support
+ *
+ *  Copyright (C) 2015 Luigi Tarenga <luigi.tarenga at gmail.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License version 2 as published
+ *  by the Free Software Foundation.
+ */
+
+#include <linux/gpio.h>
+
+#include <asm/mach-ath79/ath79.h>
+
+#include "dev-eth.h"
+#include "dev-gpio-buttons.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-usb.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+
+#define TL_WA701NDV2_GPIO_LED_WLAN    0
+#define TL_WA701NDV2_GPIO_LED_QSS    1
+#define TL_WA701NDV2_GPIO_LED_LAN    17
+#define TL_WA701NDV2_GPIO_LED_SYSTEM    27
+
+#define TL_WA701NDV2_GPIO_BTN_RESET    11
+#define TL_WA701NDV2_GPIO_BTN_QSS    26
+
+#define TL_WA701NDV2_GPIO_USB_POWER    8
+
+#define TL_WA701NDV2_KEYS_POLL_INTERVAL    20    /* msecs */
+#define TL_WA701NDV2_KEYS_DEBOUNCE_INTERVAL    (3 *
TL_WA701NDV2_KEYS_POLL_INTERVAL)
+
+static const char *tl_wa701ndv2_part_probes[] = {
+    "tp-link",
+    NULL,
+};
+
+static struct flash_platform_data tl_wa701ndv2_flash_data = {
+    .part_probes    = tl_wa701ndv2_part_probes,
+};
+
+static struct gpio_led tl_wa701ndv2_leds_gpio[] __initdata = {
+    {
+        .name        = "tp-link:green:wlan",
+        .gpio        = TL_WA701NDV2_GPIO_LED_WLAN,
+        .active_low    = 0,
+    }, {
+        .name        = "tp-link:green:qss",
+        .gpio        = TL_WA701NDV2_GPIO_LED_QSS,
+        .active_low    = 0,
+    }, {
+        .name        = "tp-link:green:lan",
+        .gpio        = TL_WA701NDV2_GPIO_LED_LAN,
+        .active_low    = 1,
+    }, {
+        .name        = "tp-link:green:system",
+        .gpio        = TL_WA701NDV2_GPIO_LED_SYSTEM,
+        .active_low    = 1,
+        }
+};
+
+static struct gpio_keys_button tl_wa701ndv2_gpio_keys[] __initdata = {
+    {
+        .desc        = "reset",
+        .type        = EV_KEY,
+        .code        = KEY_RESTART,
+        .debounce_interval = TL_WA701NDV2_KEYS_DEBOUNCE_INTERVAL,
+        .gpio        = TL_WA701NDV2_GPIO_BTN_RESET,
+        .active_low    = 0,
+    } , {
+                .desc        = "qss",
+                .type        = EV_KEY,
+                .code        = KEY_WPS_BUTTON,
+                .debounce_interval = TL_WA701NDV2_KEYS_DEBOUNCE_INTERVAL,
+                .gpio        = TL_WA701NDV2_GPIO_BTN_QSS,
+                .active_low    = 0,
+        }
+
+};
+
+static void __init tl_wa701ndv2_setup(void)
+{
+    u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
+    u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
+
+    /* disable PHY_SWAP and PHY_ADDR_SWAP bits */
+    ath79_setup_ar933x_phy4_switch(false, false);
+
+    ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wa701ndv2_leds_gpio),
+                 tl_wa701ndv2_leds_gpio);
+
+    ath79_register_gpio_keys_polled(-1, TL_WA701NDV2_KEYS_POLL_INTERVAL,
+                    ARRAY_SIZE(tl_wa701ndv2_gpio_keys),
+                    tl_wa701ndv2_gpio_keys);
+
+    gpio_request_one(TL_WA701NDV2_GPIO_USB_POWER,
+             GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
+             "USB power");
+    ath79_register_usb();
+
+    ath79_register_m25p80(&tl_wa701ndv2_flash_data);
+    ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
+    /* ath79_init_mac(ath79_eth1_data.mac_addr, mac, -1); */
+
+    ath79_register_mdio(0, 0x0);
+    ath79_register_eth(0);
+    ath79_register_eth(1);
+
+    ath79_register_wmac(ee, mac);
+}
+
+MIPS_MACHINE(ATH79_MACH_TL_WA701ND_V2, "TL-WA701ND-v2",
+         "TP-LINK TL-WA701ND v2", tl_wa701ndv2_setup);
diff --git a/target/linux/ar71xx/image/Makefile
b/target/linux/ar71xx/image/Makefile
index 683c238..425fcc5 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -1163,7 +1163,7 @@ $(eval $(call
SingleProfile,TPLINKOLD,squashfs-only,TLWR841NV15,tl-wr841nd-v1.5,
 $(eval $(call SingleProfile,TPLINK,64kraw,RNXN360RT,rnx-n360rt,TL-WR941ND,ttyS0,115200,0x09410002,0x00420001,4M))
 $(eval $(call SingleProfile,TPLINK,64kraw,TLMR3220V1,tl-mr3220-v1,TL-MR3220,ttyS0,115200,0x32200001,1,4M))
 $(eval $(call SingleProfile,TPLINK,64kraw,TLMR3420V1,tl-mr3420-v1,TL-MR3420,ttyS0,115200,0x34200001,1,4M))
-$(eval $(call SingleProfile,TPLINK,64kraw,TLWA701,tl-wa701n-v1,TL-WA901ND,ttyS0,115200,0x07010001,1,4M))
+$(eval $(call SingleProfile,TPLINK,64kraw,TLWA701NV1,tl-wa701n-v1,TL-WA901ND,ttyS0,115200,0x07010001,1,4M))
 $(eval $(call SingleProfile,TPLINK,64kraw,TLWA730REV1,tl-wa730rev1,TL-WA901ND,ttyS0,115200,0x07300001,1,4M))
 $(eval $(call SingleProfile,TPLINK,64kraw,TLWA7510NV1,tl-wa7510n,TL-WA7510N,ttyS0,115200,0x75100001,1,4M))
 $(eval $(call SingleProfile,TPLINK,64kraw,TLWA801NV1,tl-wa801nd-v1,TL-WA901ND,ttyS0,115200,0x08010001,1,4M))
@@ -1199,6 +1199,7 @@ $(eval $(call
SingleProfile,TPLINK-LZMA,64kraw,TLMR3040V1,tl-mr3040-v1,TL-MR3040
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLMR3040V2,tl-mr3040-v2,TL-MR3040-v2,ttyATH0,115200,0x30400002,1,4Mlzma))
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLMR3220V2,tl-mr3220-v2,TL-MR3220-v2,ttyATH0,115200,0x32200002,1,4Mlzma))
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLMR3420V2,tl-mr3420-v2,TL-MR3420-v2,ttyS0,115200,0x34200002,1,4Mlzma))
+$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWA701NV2,tl-wa701nd-v2,TL-WA701ND-v2,ttyATH0,115200,0x07010002,1,4Mlzma))
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR703,tl-wr703n-v1,TL-WR703N,ttyATH0,115200,0x07030101,1,4Mlzma))
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR710,tl-wr710n-v1,TL-WR710N,ttyATH0,115200,0x07100001,1,8Mlzma))
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR720NV3,tl-wr720n-v3,TL-WR720N-v3,ttyATH0,115200,0x07200103,1,4Mlzma))
@@ -1276,6 +1277,7 @@ $(eval $(call MultiProfile,TLMR11U,TLMR11UV1 TLMR11UV2))
 $(eval $(call MultiProfile,TLMR3040,TLMR3040V1 TLMR3040V2))
 $(eval $(call MultiProfile,TLMR3220,TLMR3220V1 TLMR3220V2))
 $(eval $(call MultiProfile,TLMR3420,TLMR3420V1 TLMR3420V2))
+$(eval $(call MultiProfile,TLWA701,TLWA701NV1 TLWA701NV2))
 $(eval $(call MultiProfile,TLWA730RE,TLWA730REV1))
 $(eval $(call MultiProfile,TLWA801,TLWA801NV1 TLWA801NV2))
 $(eval $(call MultiProfile,TLWA830,TLWA830RV1 TLWA830RV2))
diff --git a/target/linux/ar71xx/patches-3.10/729-MIPS-ath79-add-TL-WA701NDv2-support.patch
b/target/linux/ar71xx/patches-3.10/729-MIPS-ath79-add-TL-WA701NDv2-support.patch
new file mode 100644
index 0000000..b0de43f
--- /dev/null
+++ b/target/linux/ar71xx/patches-3.10/729-MIPS-ath79-add-TL-WA701NDv2-support.patch
@@ -0,0 +1,45 @@
+Index: linux-3.10.49/arch/mips/ath79/machtypes.h
+===================================================================
+--- linux-3.10.49.orig/arch/mips/ath79/machtypes.h
++++ linux-3.10.49/arch/mips/ath79/machtypes.h
+@@ -118,6 +118,7 @@ enum ath79_mach_type {
+     ATH79_MACH_TL_MR3220_V2,    /* TP-LINK TL-MR3220 v2 */
+     ATH79_MACH_TL_MR3420,        /* TP-LINK TL-MR3420 */
+     ATH79_MACH_TL_MR3420_V2,    /* TP-LINK TL-MR3420 v2 */
++    ATH79_MACH_TL_WA701ND_V2,    /* TP-LINK TL-WA701ND v2 */
+     ATH79_MACH_TL_WA750RE,        /* TP-LINK TL-WA750RE */
+     ATH79_MACH_TL_WA7510N_V1,    /* TP-LINK TL-WA7510N v1*/
+     ATH79_MACH_TL_WA850RE,        /* TP-LINK TL-WA850RE */
+Index: linux-3.10.49/arch/mips/ath79/Kconfig
+===================================================================
+--- linux-3.10.49.orig/arch/mips/ath79/Kconfig
++++ linux-3.10.49/arch/mips/ath79/Kconfig
+@@ -713,6 +713,16 @@ config ATH79_MACH_TL_MR3X20
+     select ATH79_DEV_M25P80
+     select ATH79_DEV_USB
+
++config ATH79_MACH_TL_WA701ND_V2
++    bool "TP-LINK TL-WA701ND v2 support"
++    select SOC_AR933X
++    select ATH79_DEV_ETH
++    select ATH79_DEV_GPIO_BUTTONS
++    select ATH79_DEV_LEDS_GPIO
++    select ATH79_DEV_M25P80
++    select ATH79_DEV_USB
++    select ATH79_DEV_WMAC
++
+ config ATH79_MACH_TL_WAX50RE
+     bool "TP-LINK TL-WA750/850RE support"
+     select SOC_AR934X
+Index: linux-3.10.49/arch/mips/ath79/Makefile
+===================================================================
+--- linux-3.10.49.orig/arch/mips/ath79/Makefile
++++ linux-3.10.49/arch/mips/ath79/Makefile
+@@ -101,6 +101,7 @@ obj-$(CONFIG_ATH79_MACH_TL_MR11U)    += mac
+ obj-$(CONFIG_ATH79_MACH_TL_MR13U)    += mach-tl-mr13u.o
+ obj-$(CONFIG_ATH79_MACH_TL_MR3020)    += mach-tl-mr3020.o
+ obj-$(CONFIG_ATH79_MACH_TL_MR3X20)    += mach-tl-mr3x20.o
++obj-$(CONFIG_ATH79_MACH_TL_WA701ND_V2)    += mach-tl-wa701nd-v2.o
+ obj-$(CONFIG_ATH79_MACH_TL_WAX50RE)     += mach-tl-wax50re.o
+ obj-$(CONFIG_ATH79_MACH_TL_WA830RE_V2)    += mach-tl-wa830re-v2.o
+ obj-$(CONFIG_ATH79_MACH_TL_WA901ND)    += mach-tl-wa901nd.o
diff --git a/tools/firmware-utils/src/mktplinkfw.c
b/tools/firmware-utils/src/mktplinkfw.c
index a6aab59..0a5e4c3 100644
--- a/tools/firmware-utils/src/mktplinkfw.c
+++ b/tools/firmware-utils/src/mktplinkfw.c
@@ -40,6 +40,7 @@
 #define HWID_TL_MR3420_V1    0x34200001
 #define HWID_TL_MR3420_V2    0x34200002
 #define HWID_TL_WA701N_V1    0x07010001
+#define HWID_TL_WA701N_V2    0x07010002
 #define HWID_TL_WA7510N_V1    0x75100001
 #define HWID_TL_WA801ND_V1    0x08010001
 #define HWID_TL_WA830RE_V1    0x08300010
@@ -254,6 +255,11 @@ static struct board_info boards[] = {
         .hw_rev        = 1,
         .layout_id    = "4M",
     }, {
+        .id        = "TL-WA701Nv2",
+        .hw_id        = HWID_TL_WA701N_V2,
+        .hw_rev        = 1,
+        .layout_id    = "4Mlzma",
+    }, {
         .id        = "TL-WA7510N",
         .hw_id        = HWID_TL_WA7510N_V1,
         .hw_rev        = 1,
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From maxime.ripard at free-electrons.com  Fri Jan 16 10:23:43 2015
From: maxime.ripard at free-electrons.com (Maxime Ripard)
Date: Fri, 16 Jan 2015 16:23:43 +0100
Subject: [OpenWrt-Devel] [PATCH 8/9] mvebu: Add the Armada 385 Reference
	Design support
In-Reply-To: <op.xsga65ws2s3iss@ecaz>
References: <1421164606-3222-1-git-send-email-maxime.ripard@free-electrons.com>
 <1421164606-3222-9-git-send-email-maxime.ripard@free-electrons.com>
 <op.xsga65ws2s3iss@ecaz>
Message-ID: <20150116152343.GE5567@lukather>

Hi Imre,

On Wed, Jan 14, 2015 at 12:50:55PM +0100, Imre Kaloz wrote:
> On Tue, 13 Jan 2015 16:56:45 +0100, Maxime Ripard
> <maxime.ripard at free-electrons.com> wrote:
> 
> >++					partition at 2 {
> >++						label = "data";
> >++						reg = <0x600000 0xa00000>;
> >++					};
> >+ 				};
> >+ 			};
> >+
> 
> This one should be called "rootfs". The image/Makefile change should be part
> of the UBI on NOR discussion/patch, so please make that one a separate.

You mean a separate patch, right?

Separated from what? The rest of the serie? This patch is pretty
standalone by itself.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150116/f55e2c90/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From maxime.ripard at free-electrons.com  Fri Jan 16 10:26:19 2015
From: maxime.ripard at free-electrons.com (Maxime Ripard)
Date: Fri, 16 Jan 2015 16:26:19 +0100
Subject: [OpenWrt-Devel] [PATCH 4/9] mvebu: Add sub-profiles
In-Reply-To: <op.xsgbsndg2s3iss@ecaz>
References: <1421164606-3222-1-git-send-email-maxime.ripard@free-electrons.com>
 <1421164606-3222-5-git-send-email-maxime.ripard@free-electrons.com>
 <op.xsgbsndg2s3iss@ecaz>
Message-ID: <20150116152619.GF5567@lukather>

Hi,

On Wed, Jan 14, 2015 at 01:03:49PM +0100, Imre Kaloz wrote:
> Hi Maxime,
> 
> On Tue, 13 Jan 2015 16:56:41 +0100, Maxime Ripard
> <maxime.ripard at free-electrons.com> wrote:
> 
> >+$(eval $(call MultiProfile,Generic,$(PROFILES_LIST)))
> >+$(eval $(call MultiProfile,Evalboards,$(PROFILES_LIST)))
> 
> Profile names should be sourced from the profiles.
> 
> >-	$(foreach nandboard,$(NANDBOARDS),$(call
> >BuildSysupgrade,$(1),$(nandboard));)
> >+	$(call Image/Build/Profile/$(PROFILE)/BuildSysupgrade,$(1))
> 
> UBI and BuildSysUpgrade is there for NAND only.

Ok. I still think UBI might be a good choice for some !NAND-based
boards, but point taken for BuildSysUpgrade.

> On boards with nor (unless you come up with a really good reason to hack
> UBI)

It's not really a hack. UBI is perfectly capable on running on NOR,
and it's even mentionned in their documentation on various occasions.

> you should stick to squashfs+jffs2.

Ok.

> Also, each NOR based board should have "firmware" partition and use
> the OpenWrt MTDSPLIT framework and should have a single, flashable
> firmware image file created instead of separate uImage+rootfs stuff.

I'm not really familiar with MTDSPLIT, but I'll look into that. Thanks!

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150116/53ad6fca/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From maxime.ripard at free-electrons.com  Fri Jan 16 10:26:48 2015
From: maxime.ripard at free-electrons.com (Maxime Ripard)
Date: Fri, 16 Jan 2015 16:26:48 +0100
Subject: [OpenWrt-Devel] [PATCH 9/9] mvebu: Add Armada 385 DB AP support
In-Reply-To: <op.xsgbaijz2s3iss@ecaz>
References: <1421164606-3222-1-git-send-email-maxime.ripard@free-electrons.com>
 <1421164606-3222-10-git-send-email-maxime.ripard@free-electrons.com>
 <op.xsgbaijz2s3iss@ecaz>
Message-ID: <20150116152648.GG5567@lukather>

On Wed, Jan 14, 2015 at 12:52:56PM +0100, Imre Kaloz wrote:
> On Tue, 13 Jan 2015 16:56:46 +0100, Maxime Ripard
> <maxime.ripard at free-electrons.com> wrote:
> 
> >+diff --git a/arch/arm/boot/dts/armada-385-db-ap.dts
> >b/arch/arm/boot/dts/armada-385-db-ap.dts
> >+index 02db04867d8f..2a58443e2504 100644
> >+--- a/arch/arm/boot/dts/armada-385-db-ap.dts
> >++++ b/arch/arm/boot/dts/armada-385-db-ap.dts
> >+@@ -134,6 +134,21 @@
> >+ 				marvell,nand-keep-config;
> >+ 				marvell,nand-enable-arbiter;
> >+ 				nand-on-flash-bbt;
> >++
> >++				mtd0 at 00000000 {
> >++					label = "U-Boot";
> >++					reg = <0x00000000 0x00800000>;
> >++				};
> >++
> >++				mtd1 at 00800000 {
> >++					label = "uImage";
> >++					reg = <0x00800000 0x00800000>;
> >++				};
> >++
> >++				mtd2 at 01000000 {
> >++					label = "Root";
> >++					reg = <0x01000000 0x3f000000>;
> >++				};
> >+ 			};
> >+ 		};
> >+
> 
> I think this should be "u-boot", "kernel" and (at least in OpenWrt),
> "ubi".

Ok, will change.

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150116/7ac4d4b8/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From kaloz at openwrt.org  Fri Jan 16 10:38:47 2015
From: kaloz at openwrt.org (Imre Kaloz)
Date: Fri, 16 Jan 2015 16:38:47 +0100
Subject: [OpenWrt-Devel] [PATCH 8/9] mvebu: Add the Armada 385 Reference
	Design support
In-Reply-To: <20150116152343.GE5567@lukather>
References: <1421164606-3222-1-git-send-email-maxime.ripard@free-electrons.com>
 <1421164606-3222-9-git-send-email-maxime.ripard@free-electrons.com>
 <op.xsga65ws2s3iss@ecaz> <20150116152343.GE5567@lukather>
Message-ID: <op.xska2xk32s3iss@ecaz>

On Fri, 16 Jan 2015 16:23:43 +0100, Maxime Ripard  
<maxime.ripard at free-electrons.com> wrote:

> Hi Imre,
>
> On Wed, Jan 14, 2015 at 12:50:55PM +0100, Imre Kaloz wrote:
>> On Tue, 13 Jan 2015 16:56:45 +0100, Maxime Ripard
>> <maxime.ripard at free-electrons.com> wrote:
>>
>> >++					partition at 2 {
>> >++						label = "data";
>> >++						reg = <0x600000 0xa00000>;
>> >++					};
>> >+ 				};
>> >+ 			};
>> >+
>>
>> This one should be called "rootfs". The image/Makefile change should be  
>> part
>> of the UBI on NOR discussion/patch, so please make that one a separate.
>
> You mean a separate patch, right?
>
> Separated from what? The rest of the serie? This patch is pretty
> standalone by itself.

Sorry, I wanted to say that one patch should add the partitions and  
another should be the image/Makefile change, given the first is likely to  
be upstreamed.


Imre
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From maxime.ripard at free-electrons.com  Fri Jan 16 10:49:47 2015
From: maxime.ripard at free-electrons.com (Maxime Ripard)
Date: Fri, 16 Jan 2015 16:49:47 +0100
Subject: [OpenWrt-Devel] [PATCH 8/9] mvebu: Add the Armada 385 Reference
	Design support
In-Reply-To: <op.xska2xk32s3iss@ecaz>
References: <1421164606-3222-1-git-send-email-maxime.ripard@free-electrons.com>
 <1421164606-3222-9-git-send-email-maxime.ripard@free-electrons.com>
 <op.xsga65ws2s3iss@ecaz> <20150116152343.GE5567@lukather>
 <op.xska2xk32s3iss@ecaz>
Message-ID: <20150116154947.GI5567@lukather>

On Fri, Jan 16, 2015 at 04:38:47PM +0100, Imre Kaloz wrote:
> On Fri, 16 Jan 2015 16:23:43 +0100, Maxime Ripard
> <maxime.ripard at free-electrons.com> wrote:
> 
> >Hi Imre,
> >
> >On Wed, Jan 14, 2015 at 12:50:55PM +0100, Imre Kaloz wrote:
> >>On Tue, 13 Jan 2015 16:56:45 +0100, Maxime Ripard
> >><maxime.ripard at free-electrons.com> wrote:
> >>
> >>>++					partition at 2 {
> >>>++						label = "data";
> >>>++						reg = <0x600000 0xa00000>;
> >>>++					};
> >>>+ 				};
> >>>+ 			};
> >>>+
> >>
> >>This one should be called "rootfs". The image/Makefile change should be
> >>part
> >>of the UBI on NOR discussion/patch, so please make that one a separate.
> >
> >You mean a separate patch, right?
> >
> >Separated from what? The rest of the serie? This patch is pretty
> >standalone by itself.
> 
> Sorry, I wanted to say that one patch should add the partitions and another
> should be the image/Makefile change, given the first is likely to be
> upstreamed.

I don't really think it can. This kind of data is really setup
specific, and I'm not sure that the mainline kernel wants to enforce
any kind of policy there.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150116/fbe88575/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From kaloz at openwrt.org  Fri Jan 16 10:56:19 2015
From: kaloz at openwrt.org (Imre Kaloz)
Date: Fri, 16 Jan 2015 16:56:19 +0100
Subject: [OpenWrt-Devel] [PATCH 8/9] mvebu: Add the Armada 385 Reference
	Design support
In-Reply-To: <20150116165205.26227d96@free-electrons.com>
References: <1421164606-3222-1-git-send-email-maxime.ripard@free-electrons.com>
 <1421164606-3222-9-git-send-email-maxime.ripard@free-electrons.com>
 <op.xsga65ws2s3iss@ecaz> <20150116152343.GE5567@lukather>
 <op.xska2xk32s3iss@ecaz> <20150116165205.26227d96@free-electrons.com>
Message-ID: <op.xskbv5q12s3iss@ecaz>

On Fri, 16 Jan 2015 16:52:05 +0100, Thomas Petazzoni  
<thomas.petazzoni at free-electrons.com> wrote:

> Dear Imre Kaloz,
>
> On Fri, 16 Jan 2015 16:38:47 +0100, Imre Kaloz wrote:
>
>> > Separated from what? The rest of the serie? This patch is pretty
>> > standalone by itself.
>>
>> Sorry, I wanted to say that one patch should add the partitions and
>> another should be the image/Makefile change, given the first is likely  
>> to
>> be upstreamed.
>
> I am not sure the specific partitioning used by OpenWRT is something we
> want to upstream in the mainline kernel. To me, the choice made by
> Maxime of having a separate kernel patch to do that is the right
> choice, since we're not sure we want to upstream specifically this
> partitioning in mainline.

Judging from the patch mainline has nothing defined, and if it ever will  
have, we'll end up patching that.. Anyways, if Maxime migrates this to the  
MTDSPLIT stuff, we'll have only "u-boot" and "firmware".


Imre
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From cat at vv.carleton.ca  Fri Jan 16 11:50:38 2015
From: cat at vv.carleton.ca (Catalin Patulea)
Date: Fri, 16 Jan 2015 11:50:38 -0500
Subject: [OpenWrt-Devel] ddns-scripts "sleep 10" before updating?
In-Reply-To: <54B8DBA6.7080606@gmail.com>
References: <CAE2LqHL5T0RTVPWuoY73M5bMi_0x1S3KhRb8GpVz0Fkm4Zcp8g@mail.gmail.com>
 <54B5241A.2020105@gmail.com>
 <CAE2LqH+tHYRD+Zy3xABd=6_hRXY_hj-x3+wKwEV+EwMukFtXAA@mail.gmail.com>
 <54B822E1.1050606@gmail.com>
 <CAE2LqHKDHO5-bmxPcRFwv10G0Zd9HEc7UJDvg4fjGsZ-Tadj4Q@mail.gmail.com>
 <54B8DBA6.7080606@gmail.com>
Message-ID: <CAE2LqHJ6+JLQsMZxosOG+ywb0jdPVN_Za8pSnEof6P3TdOgbdw@mail.gmail.com>

On Fri, Jan 16, 2015 at 4:36 AM, Christian Schoenebeck
<christian.schoenebeck at gmail.com> wrote:
> Did you really ever run into problems because of 10 seconds delay after an outage of thousands of seconds ?
No, but I don't want to wait until I have a problem. ddns-scripts
should do the best it can to update the record quickly.

> What do your ddns provider think about multiple updates per minute, if the connection toggle due to errors on your wan connection. Most providers start blocking for hours after to many updates.
First you said the sleep was because netifd runs the script too early.
That turned out to be false. Now you're saying it's to be nice to the
ddns provider - I don't think it's a problem and sleep is the wrong
way to solve it anyway.

As John Crispin recently said in a different patch review, "using
magic delays is a no go":
https://lists.openwrt.org/pipermail/openwrt-devel/2015-January/030561.html

That is exactly what this sleep 10 is - some arbitrary value that
doesn't seem to have a specific purpose, added to fix one minority
edge case - or maybe no one remembers why it was added.

> For the moment please comment out the 4 lines starting at line 219 of dynamic_dns_updater.sh
No. I do not maintain one router, I maintain several of them. I will
not go around editing dynamic_dns_updater.sh on them all, and have to
do this again every time I flash a new version.

I do not want to maintain a diff compared to openwrt master either,
because that will just give merge headaches in the future.

Please, what is the reason sleep 10 is still there? Was it because of
the early netifd call - then let's just remove it. If it is only to
fix the satellite user case, then maybe that use should be the one to
modify dynamic_dns_updater.sh on their router. But right now, for the
majority of cases, it adds a 10 second delay for no reason. I don't
think this is right.
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From mikebrady at eircom.net  Fri Jan 16 11:53:03 2015
From: mikebrady at eircom.net (Mike Brady)
Date: Fri, 16 Jan 2015 16:53:03 +0000
Subject: [OpenWrt-Devel] [PATCH] add pkgconfig information for popt
	library
In-Reply-To: <20150115181420.GA61788@aillwee.com>
References: <20150115181420.GA61788@aillwee.com>
Message-ID: <F2018FC1-2081-498B-9A2B-2509BF60D632@eircom.net>

I meant to mention that, as well as being A Good Thing in general, this would make is possible for me to bring shairport-sync (https://github.com/mikebrady/shairport-sync) over to OpenWrt without having to patch its configuration file.

> Modify makefile to record pkgconfig information for the popt library.

Mike
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From gianluca at sottospazio.it  Fri Jan 16 13:57:26 2015
From: gianluca at sottospazio.it (Gianluca Anzolin)
Date: Fri, 16 Jan 2015 19:57:26 +0100
Subject: [OpenWrt-Devel] Archer C7, leds and led trigger for ath10k
Message-ID: <20150116185726.GA13845@sottospazio.it>

Hi,

I noticed that on Archer C7 the 2.4Ghz and 5Ghz leds are swapped: this
is the relevant section of /etc/config/system

config led 'led_wlan2g'
       option name 'WLAN2G'
       option sysfs 'tp-link:blue:wlan2g'
       option trigger 'phy0tpt'

config led 'led_wlan5g'
       option name 'WLAN5G'
       option sysfs 'tp-link:blue:wlan5g'
       option trigger 'phy1tpt'

However on Archer C7 the 5G interface is on phy0 and 2.4G is on phy1.

I've yet to find where (and how) this section is autogenerated but I noticed
that the phy0pt trigger doesn't even exist on my system.

There is also a bugreport in the bug tracking system pointing at this issue:
https://dev.openwrt.org/ticket/18188

I looked at the ath9k implementation and I've come up with the attached patch.

Do you think a patch like this is acceptable?

Thank you,

Gianluca

From gianluca at sottospazio.it  Fri Jan 16 13:19:30 2015
From: gianluca at sottospazio.it (Gianluca Anzolin)
Date: Fri, 16 Jan 2015 19:19:30 +0100
Subject: [PATCH] ath10k: add throughput led trigger
Message-ID: <mailman.19.1593078758.4661.openwrt-devel@lists.openwrt.org>

This patch add a throughput led trigger for the ath10k wifi driver.

The throughputs in the table are chosen to be linear in a logarithmic
scale.

Signed-off-by: Gianluca Anzolin <gianluca at sottospazio.it>
---
 .../patches/930-ath10k_add_tpt_led_trigger.patch   | 37 ++++++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 package/kernel/mac80211/patches/930-ath10k_add_tpt_led_trigger.patch

diff --git a/package/kernel/mac80211/patches/930-ath10k_add_tpt_led_trigger.patch b/package/kernel/mac80211/patches/930-ath10k_add_tpt_led_trigger.patch
new file mode 100644
index 0000000..150e008
--- /dev/null
+++ b/package/kernel/mac80211/patches/930-ath10k_add_tpt_led_trigger.patch
@@ -0,0 +1,37 @@
+--- a/drivers/net/wireless/ath/ath10k/mac.c
++++ b/drivers/net/wireless/ath/ath10k/mac.c
+@@ -4824,6 +4824,21 @@ struct ath10k_vif *ath10k_get_arvif(stru
+ 	return arvif_iter.arvif;
+ }
+ 
++#ifdef CPTCFG_MAC80211_LEDS
++static const struct ieee80211_tpt_blink ath10k_tpt_blink[] = {
++	{ .throughput = 0 * 1024, .blink_time = 334 },
++	{ .throughput = 1 * 1024, .blink_time = 260 },
++	{ .throughput = 2 * 1024, .blink_time = 220 },
++	{ .throughput = 5 * 1024, .blink_time = 190 },
++	{ .throughput = 10 * 1024, .blink_time = 170 },
++	{ .throughput = 25 * 1024, .blink_time = 150 },
++	{ .throughput = 54 * 1024, .blink_time = 130 },
++	{ .throughput = 120 * 1024, .blink_time = 110 },
++	{ .throughput = 265 * 1024, .blink_time = 80 },
++	{ .throughput = 586 * 1024, .blink_time = 50 },
++};
++#endif
++
+ int ath10k_mac_register(struct ath10k *ar)
+ {
+ 	struct ieee80211_supported_band *band;
+@@ -4965,6 +4980,12 @@ int ath10k_mac_register(struct ath10k *a
+ 		goto err_free;
+ 	}
+ 
++#if CPTCFG_MAC80211_LEDS
++	ieee80211_create_tpt_led_trigger(ar->hw,
++		IEEE80211_TPT_LEDTRIG_FL_RADIO, ath10k_tpt_blink,
++		ARRAY_SIZE(ath10k_tpt_blink));
++#endif
++
+ 	ret = ieee80211_register_hw(ar->hw);
+ 	if (ret) {
+ 		ath10k_err(ar, "failed to register ieee80211: %d\n", ret);
-- 
2.2.2


--EVF5PPMfhYS0aIcm
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

--EVF5PPMfhYS0aIcm--


From mschiffer at universe-factory.net  Fri Jan 16 14:07:49 2015
From: mschiffer at universe-factory.net (Matthias Schiffer)
Date: Fri, 16 Jan 2015 20:07:49 +0100
Subject: [OpenWrt-Devel] [PATCH] ar71xx: fix board detection for TP-LINK
	TL-WA860RE
Message-ID: <6e4db7871f27572ca4a1b1e71df3bcdbebe9bdcd.1421435255.git.mschiffer@universe-factory.net>

Signed-off-by: Matthias Schiffer <mschiffer at universe-factory.net>
---
 target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index a12101a..78a0cef 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -645,6 +645,9 @@ ar71xx_board_detect() {
 	*TL-WA850RE)
 		name="tl-wa850re"
 		;;
+	*TL-WA860RE)
+		name="tl-wa860re"
+		;;
 	*"TL-WA830RE v2")
 		name="tl-wa830re-v2"
 		;;
-- 
2.2.2
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From s.demeszko at wireless-instruments.com  Fri Jan 16 14:30:38 2015
From: s.demeszko at wireless-instruments.com (=?UTF-8?q?S=C5=82awomir=20Demeszko?=)
Date: Fri, 16 Jan 2015 20:30:38 +0100
Subject: [OpenWrt-Devel] [PATCH uqmi] Add command to specify preferred PLMN
Message-ID: <1421436638-25758-1-git-send-email-s.demeszko@wireless-instruments.com>

Signed-off-by: S?awomir Demeszko <s.demeszko at wireless-instruments.com>
---
 commands-nas.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 commands-nas.h |  6 ++++++
 2 files changed, 66 insertions(+)

diff --git a/commands-nas.c b/commands-nas.c
index 831e3f4..33477dd 100644
--- a/commands-nas.c
+++ b/commands-nas.c
@@ -1,6 +1,10 @@
 #include "qmi-message.h"
 
 static struct qmi_nas_set_system_selection_preference_request sel_req;
+static struct	{
+	bool mcc_is_set;
+	bool mnc_is_set;
+} plmn_code_flag;
 
 #define cmd_nas_do_set_system_selection_cb no_cb
 static enum qmi_cmd_result
@@ -99,6 +103,62 @@ cmd_nas_set_roaming_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct
 	return do_sel_network();
 }
 
+#define cmd_nas_set_mcc_cb no_cb
+static enum qmi_cmd_result
+cmd_nas_set_mcc_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+	char *err;
+	int value = strtoul(arg, &err, 10);
+	if (err && *err) {
+		uqmi_add_error("Invalid MCC value");
+		return QMI_CMD_EXIT;
+	}
+
+	sel_req.data.network_selection_preference.mcc = value;
+	plmn_code_flag.mcc_is_set = true;
+	return QMI_CMD_DONE;
+}
+
+#define cmd_nas_set_mnc_cb no_cb
+static enum qmi_cmd_result
+cmd_nas_set_mnc_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+	char *err;
+	int value = strtoul(arg, &err, 10);
+	if (err && *err) {
+		uqmi_add_error("Invalid MNC value");
+		return QMI_CMD_EXIT;
+	}
+
+	sel_req.data.network_selection_preference.mnc = value;
+	plmn_code_flag.mnc_is_set = true;
+	return QMI_CMD_DONE;
+}
+
+#define cmd_nas_set_plmn_cb no_cb
+static enum qmi_cmd_result
+cmd_nas_set_plmn_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
+{
+	sel_req.set.network_selection_preference = 1;
+	sel_req.data.network_selection_preference.mode = QMI_NAS_NETWORK_SELECTION_PREFERENCE_AUTOMATIC;
+
+	if (!plmn_code_flag.mcc_is_set && plmn_code_flag.mnc_is_set) {
+		uqmi_add_error("No MCC value");
+		return QMI_CMD_EXIT;
+	}
+
+	if (plmn_code_flag.mcc_is_set && sel_req.data.network_selection_preference.mcc) {
+		if (!plmn_code_flag.mnc_is_set) {
+			uqmi_add_error("No MNC value");
+			return QMI_CMD_EXIT;
+		} else {
+			sel_req.data.network_selection_preference.mode = QMI_NAS_NETWORK_SELECTION_PREFERENCE_MANUAL;
+		}
+	}
+
+	return do_sel_network();
+}
+
 #define cmd_nas_initiate_network_register_cb no_cb
 static enum qmi_cmd_result
 cmd_nas_initiate_network_register_prepare(struct qmi_dev *qmi, struct qmi_request *req, struct qmi_msg *msg, char *arg)
diff --git a/commands-nas.h b/commands-nas.h
index 4a4dace..d2bde7b 100644
--- a/commands-nas.h
+++ b/commands-nas.h
@@ -2,6 +2,9 @@
 	__uqmi_command(nas_do_set_system_selection, __set-system-selection, no, QMI_SERVICE_NAS), \
 	__uqmi_command(nas_set_network_modes, set-network-modes, required, CMD_TYPE_OPTION), \
 	__uqmi_command(nas_initiate_network_register, network-register, no, QMI_SERVICE_NAS), \
+	__uqmi_command(nas_set_plmn, set-plmn, no, QMI_SERVICE_NAS), \
+	__uqmi_command(nas_set_mcc, mcc, required, CMD_TYPE_OPTION), \
+	__uqmi_command(nas_set_mnc, mnc, required, CMD_TYPE_OPTION), \
 	__uqmi_command(nas_network_scan, network-scan, no, QMI_SERVICE_NAS), \
 	__uqmi_command(nas_get_signal_info, get-signal-info, no, QMI_SERVICE_NAS), \
 	__uqmi_command(nas_get_serving_system, get-serving-system, no, QMI_SERVICE_NAS), \
@@ -17,6 +20,9 @@
 		"                                    Available modes: any, off, only\n" \
 		"  --network-scan:                   Initiate network scan\n" \
 		"  --network-register:               Initiate network register\n" \
+		"  --set-plmn:                       Register at specified network\n" \
+		"    --mcc <mcc>:                    Mobile Country Code (0 - auto)\n" \
+		"    --mnc <mnc>:                    Mobile Network Code\n" \
 		"  --get-signal-info:                Get signal strength info\n" \
 		"  --get-serving-system:             Get serving system info\n" \
 
-- 
1.9.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From osk at exegin.com  Fri Jan 16 15:19:05 2015
From: osk at exegin.com (Owen Kirby)
Date: Fri, 16 Jan 2015 12:19:05 -0800
Subject: [OpenWrt-Devel] [PATCH] procd: delay inittab workers until the
	tty exists.
In-Reply-To: <54B8B03B.1000401@openwrt.org>
References: <54B8825C.4030300@exegin.com> <54B8B03B.1000401@openwrt.org>
Message-ID: <54B97239.1010909@exegin.com>

Okay, I'll rewrite it.

However: Is it polling for the existence of the tty device that is 
unacceptable (would a solution using uloop_timeout_set() be okay?), or 
would I need to process hotplug events from the kernel?

Thanks,
Owen

On 15-01-15 10:31 PM, John Crispin wrote:
> nack, using magic delays is a no go
>
> On 16/01/2015 04:15, Owen Kirby wrote:
>> If a process with a tty is specified in inittab, delay the worker
>> process until the tty exists.
>>
>> This allows starting consoles with terminals that get delayed until
>> after procd is reads inittab,
>> and it also allows hotplugging USB-to-serial adapters attached long
>> after booting.
>>
>> Signed-off-by: Owen Kirby <osk at exegin.com>
>> ---
>>   inittab.c | 14 ++++++++++----
>>   1 file changed, 10 insertions(+), 4 deletions(-)
>>
>> diff --git a/inittab.c b/inittab.c
>> index 623103d..73c113f 100644
>> --- a/inittab.c
>> +++ b/inittab.c
>> @@ -99,9 +99,15 @@ static void fork_worker(struct init_action *a)
>>       if (!a->proc.pid) {
>>           p = setsid();
>>   
>> -        fd = dev_open(a->id);
>> -        if (fd != -1)
>> -        {
>> +        if (a->id) {
>> +            struct timespec tm;
>> +            tm.tv_sec = a->respawn / 1000;
>> +            tm.tv_nsec = (a->respawn % 1000) * 1000000;
>> +
>> +            while ((fd = dev_open(a->id)) == -1)
>> +                if (nanosleep(&tm, NULL) == -1)
>> +                    exit(-1);
>> +
>>               dup2(fd, STDIN_FILENO);
>>               dup2(fd, STDOUT_FILENO);
>>               dup2(fd, STDERR_FILENO);
>> @@ -157,7 +163,7 @@ static void askfirst(struct init_action *a)
>>   {
>>       int i;
>>   
>> -    if (!dev_exist(a->id) || (console && !strcmp(console, a->id))) {
>> +    if (console && !strcmp(console, a->id)) {
>>           DEBUG(4, "Skipping %s\n", a->id);
>>           return;
>>       }
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From mathieu at qca.qualcomm.com  Fri Jan 16 16:45:37 2015
From: mathieu at qca.qualcomm.com (Mathieu Olivari)
Date: Fri, 16 Jan 2015 13:45:37 -0800
Subject: [OpenWrt-Devel] [PATCH] build: allow openwrt.git packages to be
	replaced by feeds
Message-ID: <1421444737-1495-1-git-send-email-mathieu@qca.qualcomm.com>

Currently, replacing a package available in openwrt.git requires
modifications in openwrt.git, or requires duplicating the package in a
feed but with a different name, which causes all kind of problems
related to dependencies (all packages selecting it would have to be
modified accordingly to select the new package).

With this change, if a package with the same name is present both in
feeds/ and package/ folders, the one in feeds/ will override the one
in package/, both in the menuconfig and during the build.

This mechanism is particularly useful for vendor tree, or in general for
application which needs to replace one particular package which exists
within openwrt.git by a custom/newer version.

Signed-off-by: Mathieu Olivari <mathieu at qca.qualcomm.com>
---
 include/scan.awk |   17 +++++++++++++++++
 include/scan.mk  |    2 +-
 scripts/feeds    |    9 ++++++---
 3 files changed, 24 insertions(+), 4 deletions(-)
 create mode 100644 include/scan.awk

diff --git a/include/scan.awk b/include/scan.awk
new file mode 100644
index 0000000..39b2977
--- /dev/null
+++ b/include/scan.awk
@@ -0,0 +1,17 @@
+BEGIN { FS="/" }
+$1 ~ /^feeds/ { FEEDS[$NF]=$0 }
+$1 !~ /^feeds/ { PKGS[$NF]=$0 }
+END {
+	# Filter-out OpenWrt packages which have a feeds equivalent
+	for (pkg in PKGS)
+		if (pkg in FEEDS)
+			delete PKGS[pkg]
+	n = asort(PKGS)
+	for (i=1; i <= n; i++) {
+		print PKGS[i]
+	}
+	n = asort(FEEDS)
+	for (i=1; i <= n; i++){
+		print FEEDS[i]
+	}
+}
diff --git a/include/scan.mk b/include/scan.mk
index 0998333..138707d 100644
--- a/include/scan.mk
+++ b/include/scan.mk
@@ -43,7 +43,7 @@ endef
 
 $(FILELIST):
 	rm -f $(TMP_DIR)/info/.files-$(SCAN_TARGET)-*
-	$(call FIND_L, $(SCAN_DIR)) $(SCAN_EXTRA) -mindepth 1 $(if $(SCAN_DEPTH),-maxdepth $(SCAN_DEPTH)) -name Makefile | xargs grep -HE 'call (Build/DefaultTargets|Build(Package|Target)|.+Package)' | sed -e 's#^$(SCAN_DIR)/##' -e 's#/Makefile:.*##' | uniq > $@
+	$(call FIND_L, $(SCAN_DIR)) $(SCAN_EXTRA) -mindepth 1 $(if $(SCAN_DEPTH),-maxdepth $(SCAN_DEPTH)) -name Makefile | xargs grep -HE 'call (Build/DefaultTargets|Build(Package|Target)|.+Package)' | sed -e 's#^$(SCAN_DIR)/##' -e 's#/Makefile:.*##' | uniq | awk -f include/scan.awk > $@
 
 $(TMP_DIR)/info/.files-$(SCAN_TARGET).mk: $(FILELIST)
 	( \
diff --git a/scripts/feeds b/scripts/feeds
index 31ad544..01d9041 100755
--- a/scripts/feeds
+++ b/scripts/feeds
@@ -384,12 +384,15 @@ sub install_package {
 
 	# previously installed packages set the runtime package
 	# newly installed packages set the source package
-	$installed{$src} and return 0;
+	$installed{$src} and !is_core_package($src) and return 0;
 
 	# check previously installed packages
-	$installed{$name} and return 0;
+	$installed{$name} and !is_core_package($name) and return 0;
 	$installed{$src} = 1;
-	warn "Installing package '$src'\n";
+
+	is_core_package($src)
+		and warn "Overriding package '$src'\n"
+		or warn "Installing package '$src'\n";
 
 	$install_method{$type} or do {
 		warn "Unknown installation method: '$type'\n";
-- 
1.7.10.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From christian.schoenebeck at gmail.com  Fri Jan 16 18:25:10 2015
From: christian.schoenebeck at gmail.com (Christian Schoenebeck)
Date: Sat, 17 Jan 2015 00:25:10 +0100
Subject: [OpenWrt-Devel] ddns-scripts "sleep 10" before updating?
In-Reply-To: <CAE2LqHJ6+JLQsMZxosOG+ywb0jdPVN_Za8pSnEof6P3TdOgbdw@mail.gmail.com>
References: <CAE2LqHL5T0RTVPWuoY73M5bMi_0x1S3KhRb8GpVz0Fkm4Zcp8g@mail.gmail.com>	<54B5241A.2020105@gmail.com>	<CAE2LqH+tHYRD+Zy3xABd=6_hRXY_hj-x3+wKwEV+EwMukFtXAA@mail.gmail.com>	<54B822E1.1050606@gmail.com>	<CAE2LqHKDHO5-bmxPcRFwv10G0Zd9HEc7UJDvg4fjGsZ-Tadj4Q@mail.gmail.com>	<54B8DBA6.7080606@gmail.com>
 <CAE2LqHJ6+JLQsMZxosOG+ywb0jdPVN_Za8pSnEof6P3TdOgbdw@mail.gmail.com>
Message-ID: <54B99DD6.5020304@gmail.com>

Am 16.01.2015 um 17:50 schrieb Catalin Patulea:
> On Fri, Jan 16, 2015 at 4:36 AM, Christian Schoenebeck
> <christian.schoenebeck at gmail.com> wrote:
>> Did you really ever run into problems because of 10 seconds delay after an outage of thousands of seconds ?
> No, but I don't want to wait until I have a problem. ddns-scripts
> should do the best it can to update the record quickly.
> 
>> What do your ddns provider think about multiple updates per minute, if the connection toggle due to errors on your wan connection. Most providers start blocking for hours after to many updates.
> First you said the sleep was because netifd runs the script too early.
> That turned out to be false. Now you're saying it's to be nice to the
> ddns provider - I don't think it's a problem and sleep is the wrong
> way to solve it anyway.
> 
> As John Crispin recently said in a different patch review, "using
> magic delays is a no go":
> https://lists.openwrt.org/pipermail/openwrt-devel/2015-January/030561.html
> 
> That is exactly what this sleep 10 is - some arbitrary value that
> doesn't seem to have a specific purpose, added to fix one minority
> edge case - or maybe no one remembers why it was added.
> 
>> For the moment please comment out the 4 lines starting at line 219 of dynamic_dns_updater.sh
> No. I do not maintain one router, I maintain several of them. I will
> not go around editing dynamic_dns_updater.sh on them all, and have to
> do this again every time I flash a new version.
> 
> I do not want to maintain a diff compared to openwrt master either,
> because that will just give merge headaches in the future.
> 
> Please, what is the reason sleep 10 is still there? Was it because of
> the early netifd call - then let's just remove it. If it is only to
> fix the satellite user case, then maybe that use should be the one to
> modify dynamic_dns_updater.sh on their router. But right now, for the
> majority of cases, it adds a 10 second delay for no reason. I don't
> think this is right.
> 
Removed in 2.1.0-5
Christian
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From christian.schoenebeck at gmail.com  Fri Jan 16 18:29:55 2015
From: christian.schoenebeck at gmail.com (Christian Schoenebeck)
Date: Sat, 17 Jan 2015 00:29:55 +0100
Subject: [OpenWrt-Devel] ddns-scripts 2.0.1-1 breaks freedns.afraid.org?
In-Reply-To: <CAE2LqHKHpB++pacYxt812RY2EpUkx3PNgz7+61vS2+aiueumBA@mail.gmail.com>
References: <CAE2LqH+-uRuHVyRj5vQZTc5sg_-Rdgv38+4THzdHYAxBdPYh0w@mail.gmail.com>	<54B4D1BA.5060804@openwrt.org>	<54B52850.30708@gmail.com>
 <CAE2LqHKHpB++pacYxt812RY2EpUkx3PNgz7+61vS2+aiueumBA@mail.gmail.com>
Message-ID: <54B99EF3.1030405@gmail.com>

Implemented in 2.1.0-5 including your other suggested changes.
Christian

Am 15.01.2015 um 06:07 schrieb Catalin Patulea:
> I've opened a pull request for this (and other misc fixes):
> https://github.com/openwrt/packages/pull/779
> 
> On Tue, Jan 13, 2015 at 9:14 AM, Christian Schoenebeck
> <christian.schoenebeck at gmail.com> wrote:
>> I put it on the TODO list.
>> Thanks for feedback
>> Christian
>> _______________________________________________
>> openwrt-devel mailing list
>> openwrt-devel at lists.openwrt.org
>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From blogic at openwrt.org  Sat Jan 17 01:07:49 2015
From: blogic at openwrt.org (John Crispin)
Date: Sat, 17 Jan 2015 07:07:49 +0100
Subject: [OpenWrt-Devel] [PATCH] procd: delay inittab workers until the
 tty exists.
In-Reply-To: <54B97239.1010909@exegin.com>
References: <54B8825C.4030300@exegin.com> <54B8B03B.1000401@openwrt.org>
 <54B97239.1010909@exegin.com>
Message-ID: <54B9FC35.20205@openwrt.org>



On 16/01/2015 21:19, Owen Kirby wrote:
> Okay, I'll rewrite it.
> 
> However: Is it polling for the existence of the tty device that is 
> unacceptable (would a solution using uloop_timeout_set() be okay?),
> or would I need to process hotplug events from the kernel?
> 

use hotplug events please



> Thanks, Owen
> 
> On 15-01-15 10:31 PM, John Crispin wrote:
>> nack, using magic delays is a no go
>> 
>> On 16/01/2015 04:15, Owen Kirby wrote:
>>> If a process with a tty is specified in inittab, delay the
>>> worker process until the tty exists.
>>> 
>>> This allows starting consoles with terminals that get delayed
>>> until after procd is reads inittab, and it also allows
>>> hotplugging USB-to-serial adapters attached long after
>>> booting.
>>> 
>>> Signed-off-by: Owen Kirby <osk at exegin.com> --- inittab.c | 14
>>> ++++++++++---- 1 file changed, 10 insertions(+), 4
>>> deletions(-)
>>> 
>>> diff --git a/inittab.c b/inittab.c index 623103d..73c113f
>>> 100644 --- a/inittab.c +++ b/inittab.c @@ -99,9 +99,15 @@
>>> static void fork_worker(struct init_action *a) if
>>> (!a->proc.pid) { p = setsid(); -        fd = dev_open(a->id); -
>>> if (fd != -1) -        { +        if (a->id) { +
>>> struct timespec tm; +            tm.tv_sec = a->respawn /
>>> 1000; +            tm.tv_nsec = (a->respawn % 1000) * 1000000; 
>>> + +            while ((fd = dev_open(a->id)) == -1) +
>>> if (nanosleep(&tm, NULL) == -1) +                    exit(-1); 
>>> + dup2(fd, STDIN_FILENO); dup2(fd, STDOUT_FILENO); dup2(fd,
>>> STDERR_FILENO); @@ -157,7 +163,7 @@ static void askfirst(struct
>>> init_action *a) { int i; -    if (!dev_exist(a->id) || (console
>>> && !strcmp(console, a->id))) { +    if (console &&
>>> !strcmp(console, a->id)) { DEBUG(4, "Skipping %s\n", a->id); 
>>> return; }
> _______________________________________________ openwrt-devel
> mailing list openwrt-devel at lists.openwrt.org 
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From blogic at openwrt.org  Sat Jan 17 01:11:15 2015
From: blogic at openwrt.org (John Crispin)
Date: Sat, 17 Jan 2015 07:11:15 +0100
Subject: [OpenWrt-Devel] [PATCH] build: allow openwrt.git packages to be
 replaced by feeds
In-Reply-To: <1421444737-1495-1-git-send-email-mathieu@qca.qualcomm.com>
References: <1421444737-1495-1-git-send-email-mathieu@qca.qualcomm.com>
Message-ID: <54B9FD03.3090102@openwrt.org>



On 16/01/2015 22:45, Mathieu Olivari wrote:
> Currently, replacing a package available in openwrt.git requires 
> modifications in openwrt.git, or requires duplicating the package
> in a feed but with a different name, which causes all kind of
> problems related to dependencies (all packages selecting it would
> have to be modified accordingly to select the new package).
> 
> With this change, if a package with the same name is present both
> in feeds/ and package/ folders, the one in feeds/ will override the
> one in package/, both in the menuconfig and during the build.
> 
> This mechanism is particularly useful for vendor tree, or in
> general for application which needs to replace one particular
> package which exists within openwrt.git by a custom/newer version.
> 

i think this is a bad solution. this is like overriding files in /sbin
with ones in ~/sbin. it will cause lots of side effects and bogus bug
reports. how about you simply upstream your magic feature and have it
added to packages.git ? your patch seems to work around qca not
upstreaming its work properly.


> Signed-off-by: Mathieu Olivari <mathieu at qca.qualcomm.com> --- 
> include/scan.awk |   17 +++++++++++++++++ include/scan.mk  |    2
> +- scripts/feeds    |    9 ++++++--- 3 files changed, 24
> insertions(+), 4 deletions(-) create mode 100644 include/scan.awk
> 
> diff --git a/include/scan.awk b/include/scan.awk new file mode
> 100644 index 0000000..39b2977 --- /dev/null +++ b/include/scan.awk 
> @@ -0,0 +1,17 @@ +BEGIN { FS="/" } +$1 ~ /^feeds/ { FEEDS[$NF]=$0
> } +$1 !~ /^feeds/ { PKGS[$NF]=$0 } +END { +	# Filter-out OpenWrt
> packages which have a feeds equivalent +	for (pkg in PKGS) +		if
> (pkg in FEEDS) +			delete PKGS[pkg] +	n = asort(PKGS) +	for (i=1; i
> <= n; i++) { +		print PKGS[i] +	} +	n = asort(FEEDS) +	for (i=1; i
> <= n; i++){ +		print FEEDS[i] +	} +} diff --git a/include/scan.mk
> b/include/scan.mk index 0998333..138707d 100644 ---
> a/include/scan.mk +++ b/include/scan.mk @@ -43,7 +43,7 @@ endef
> 
> $(FILELIST): rm -f $(TMP_DIR)/info/.files-$(SCAN_TARGET)-* -	$(call
> FIND_L, $(SCAN_DIR)) $(SCAN_EXTRA) -mindepth 1 $(if
> $(SCAN_DEPTH),-maxdepth $(SCAN_DEPTH)) -name Makefile | xargs grep
> -HE 'call (Build/DefaultTargets|Build(Package|Target)|.+Package)' |
> sed -e 's#^$(SCAN_DIR)/##' -e 's#/Makefile:.*##' | uniq > $@ +
> $(call FIND_L, $(SCAN_DIR)) $(SCAN_EXTRA) -mindepth 1 $(if
> $(SCAN_DEPTH),-maxdepth $(SCAN_DEPTH)) -name Makefile | xargs grep
> -HE 'call (Build/DefaultTargets|Build(Package|Target)|.+Package)' |
> sed -e 's#^$(SCAN_DIR)/##' -e 's#/Makefile:.*##' | uniq | awk -f
> include/scan.awk > $@
> 
> $(TMP_DIR)/info/.files-$(SCAN_TARGET).mk: $(FILELIST) ( \ diff
> --git a/scripts/feeds b/scripts/feeds index 31ad544..01d9041
> 100755 --- a/scripts/feeds +++ b/scripts/feeds @@ -384,12 +384,15
> @@ sub install_package {
> 
> # previously installed packages set the runtime package # newly
> installed packages set the source package -	$installed{$src} and
> return 0; +	$installed{$src} and !is_core_package($src) and return
> 0;
> 
> # check previously installed packages -	$installed{$name} and
> return 0; +	$installed{$name} and !is_core_package($name) and
> return 0; $installed{$src} = 1; -	warn "Installing package
> '$src'\n"; + +	is_core_package($src) +		and warn "Overriding
> package '$src'\n" +		or warn "Installing package '$src'\n";
> 
> $install_method{$type} or do { warn "Unknown installation method:
> '$type'\n";
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From blogic at openwrt.org  Sat Jan 17 01:41:12 2015
From: blogic at openwrt.org (John Crispin)
Date: Sat, 17 Jan 2015 07:41:12 +0100
Subject: [OpenWrt-Devel] Archer C7, leds and led trigger for ath10k
In-Reply-To: <20150116185726.GA13845@sottospazio.it>
References: <20150116185726.GA13845@sottospazio.it>
Message-ID: <54BA0408.5000703@openwrt.org>



On 16/01/2015 19:57, Gianluca Anzolin wrote:
> Hi,
> 
> I noticed that on Archer C7 the 2.4Ghz and 5Ghz leds are swapped:
> this is the relevant section of /etc/config/system
> 
> config led 'led_wlan2g' option name 'WLAN2G' option sysfs
> 'tp-link:blue:wlan2g' option trigger 'phy0tpt'
> 
> config led 'led_wlan5g' option name 'WLAN5G' option sysfs
> 'tp-link:blue:wlan5g' option trigger 'phy1tpt'
> 
> However on Archer C7 the 5G interface is on phy0 and 2.4G is on
> phy1.
> 
> I've yet to find where (and how) this section is autogenerated but
> I noticed that the phy0pt trigger doesn't even exist on my system.
> 

look at

target/linux/ar71xx/base-files/etc/uci-defaults/01_leds



> There is also a bugreport in the bug tracking system pointing at
> this issue: https://dev.openwrt.org/ticket/18188
> 
> I looked at the ath9k implementation and I've come up with the
> attached patch.
> 
> Do you think a patch like this is acceptable?
> 


it is not


> Thank you,
> 
> Gianluca
> 
> 
> 
> _______________________________________________ openwrt-devel
> mailing list openwrt-devel at lists.openwrt.org 
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From blogic at openwrt.org  Sat Jan 17 01:43:20 2015
From: blogic at openwrt.org (John Crispin)
Date: Sat, 17 Jan 2015 07:43:20 +0100
Subject: [OpenWrt-Devel] [PATCH] ar71xx: add support for TP-LINK
 TL-WA701ND v2
In-Reply-To: <CAKkO-Eg2QZoMdXTtXWO2496_xPW3+Wd4QJZKgNfYpGO-0Ymbgw@mail.gmail.com>
References: <CAKkO-Eg2QZoMdXTtXWO2496_xPW3+Wd4QJZKgNfYpGO-0Ymbgw@mail.gmail.com>
Message-ID: <54BA0488.8070903@openwrt.org>



On 16/01/2015 13:04, Luigi Tarenga wrote:
> Signed-off-by: Luigi Tarenga <luigi.tarenga at gmail.com>
> ---
> I send the patch again, maybe it was not formatted correctly.
> please let me know if there is any problem in how i send it.
> 
> regards
> Luigi
> ---
>  package/libs/openssl/Makefile                         |  6 +++---
>  package/libs/openssl/patches/150-no_engines.patch     | 18 +++++++++---------
>  package/libs/openssl/patches/200-parallel_build.patch |  8 ++++----
>  package/network/ipv6/map/Makefile                     |  7 ++++---
>  package/network/ipv6/map/files/map.sh                 |  3 +++
>  package/network/ipv6/map/src/mapcalc.c                |  6 ++++--
>  6 files changed, 27 insertions(+), 21 deletions(-)
> 


the diffstat is from a different patch



> diff --git a/target/linux/ar71xx/base-files/etc/diag.sh
> b/target/linux/ar71xx/base-files/etc/diag.sh
> index fa07f39..eb96338 100755
> --- a/target/linux/ar71xx/base-files/etc/diag.sh
> +++ b/target/linux/ar71xx/base-files/etc/diag.sh
> @@ -195,6 +195,7 @@ get_status_led() {
>      tl-mr3220-v2 | \
>      tl-mr3420 | \
>      tl-mr3420-v2 | \
> +    tl-wa701nd-v2 | \
>      tl-wa801nd-v2 | \
>      tl-wa901nd | \
>      tl-wa901nd-v2 | \
> diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
> b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
> index 5b9dbe7..51c2bca 100755
> --- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
> +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
> @@ -275,7 +275,11 @@ tl-wa850re)
>      ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "tp-link:blue:signal5"
> "wlan0" "80" "100" "-79" "13"
>      ;;
> 
> -tl-wa860re)
> +tl-wa701nd-v2 | \
> +tl-wa830re-v2 | \
> +tl-wa860re | \
> +tl-wa801nd-v2 | \
> +tl-wa901nd-v3)
>      ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
>      ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
>      ;;
> @@ -333,11 +337,6 @@ tl-wr841n-v8)
>      ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
>      ;;
> 
> -tl-wa830re-v2)
> -    ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
> -    ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
> -    ;;
> -
>  tl-wr841n-v9)
>      ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth1"
>      ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x10"
> @@ -357,12 +356,6 @@ tl-wr842n-v2)
>      ucidef_set_led_usbdev "usb" "USB" "tp-link:green:3g" "1-1"
>      ;;
> 
> -tl-wa801nd-v2 | \
> -tl-wa901nd-v3)
> -    ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
> -    ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
> -    ;;
> -


this refactoring should be in a separate patch.


>  tl-wr941nd | \
>  tl-wr1041n-v2)
>      ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
> diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
> b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
> index c5cfd67..4be30b8 100755
> --- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
> +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
> @@ -301,6 +301,7 @@ tl-mr13u |\
>  tl-mr3020 |\
>  tl-mr3040 |\
>  tl-mr3040-v2 |\
> +tl-wa701nd-v2 |\
>  tl-wa750re |\
>  tl-wa850re |\
>  tl-wa830re-v2 |\
> diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh
> b/target/linux/ar71xx/base-files/lib/ar71xx.sh
> index 1e96b6d..df35775 100755
> --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
> +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
> @@ -571,6 +571,9 @@ ar71xx_board_detect() {
>      *"TL-MR3420 v2")
>          name="tl-mr3420-v2"
>          ;;
> +    *"TL-WA701ND v2")
> +        name="tl-wa701nd-v2"
> +        ;;
>      *TL-WA750RE)
>          name="tl-wa750re"
>          ;;
> diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
> b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
> index 846954c..eeaac6a 100755
> --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
> +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
> @@ -269,6 +269,7 @@ platform_check_image() {
>      tl-mr3220-v2 | \
>      tl-mr3420 | \
>      tl-mr3420-v2 | \
> +    tl-wa701nd-v2 | \
>      tl-wa7510n | \
>      tl-wa750re | \
>      tl-wa850re | \
> diff --git a/target/linux/ar71xx/config-3.10 b/target/linux/ar71xx/config-3.10
> index 9a8378a..482914a 100644
> --- a/target/linux/ar71xx/config-3.10
> +++ b/target/linux/ar71xx/config-3.10
> @@ -88,6 +88,7 @@ CONFIG_ATH79_MACH_TL_MR11U=y
>  CONFIG_ATH79_MACH_TL_MR13U=y
>  CONFIG_ATH79_MACH_TL_MR3020=y
>  CONFIG_ATH79_MACH_TL_MR3X20=y
> +CONFIG_ATH79_MACH_TL_WA701ND_V2=y
>  CONFIG_ATH79_MACH_TL_WA830RE_V2=y
>  CONFIG_ATH79_MACH_TL_WA901ND=y
>  CONFIG_ATH79_MACH_TL_WA901ND_V2=y
> diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa701nd-v2.c
> b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa701nd-v2.c
> new file mode 100644
> index 0000000..aab92b3
> --- /dev/null
> +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa701nd-v2.c
> @@ -0,0 +1,116 @@
> +/*
> + *  TP-LINK TL-WA701ND v2 board support
> + *
> + *  Copyright (C) 2015 Luigi Tarenga <luigi.tarenga at gmail.com>
> + *
> + *  This program is free software; you can redistribute it and/or modify it
> + *  under the terms of the GNU General Public License version 2 as published
> + *  by the Free Software Foundation.
> + */
> +
> +#include <linux/gpio.h>
> +
> +#include <asm/mach-ath79/ath79.h>
> +
> +#include "dev-eth.h"
> +#include "dev-gpio-buttons.h"
> +#include "dev-leds-gpio.h"
> +#include "dev-m25p80.h"
> +#include "dev-usb.h"
> +#include "dev-wmac.h"
> +#include "machtypes.h"
> +
> +#define TL_WA701NDV2_GPIO_LED_WLAN    0
> +#define TL_WA701NDV2_GPIO_LED_QSS    1
> +#define TL_WA701NDV2_GPIO_LED_LAN    17
> +#define TL_WA701NDV2_GPIO_LED_SYSTEM    27
> +
> +#define TL_WA701NDV2_GPIO_BTN_RESET    11
> +#define TL_WA701NDV2_GPIO_BTN_QSS    26
> +
> +#define TL_WA701NDV2_GPIO_USB_POWER    8
> +
> +#define TL_WA701NDV2_KEYS_POLL_INTERVAL    20    /* msecs */
> +#define TL_WA701NDV2_KEYS_DEBOUNCE_INTERVAL    (3 *
> TL_WA701NDV2_KEYS_POLL_INTERVAL)
> +
> +static const char *tl_wa701ndv2_part_probes[] = {
> +    "tp-link",
> +    NULL,
> +};
> +
> +static struct flash_platform_data tl_wa701ndv2_flash_data = {
> +    .part_probes    = tl_wa701ndv2_part_probes,
> +};
> +
> +static struct gpio_led tl_wa701ndv2_leds_gpio[] __initdata = {
> +    {
> +        .name        = "tp-link:green:wlan",
> +        .gpio        = TL_WA701NDV2_GPIO_LED_WLAN,
> +        .active_low    = 0,
> +    }, {
> +        .name        = "tp-link:green:qss",
> +        .gpio        = TL_WA701NDV2_GPIO_LED_QSS,
> +        .active_low    = 0,
> +    }, {
> +        .name        = "tp-link:green:lan",
> +        .gpio        = TL_WA701NDV2_GPIO_LED_LAN,
> +        .active_low    = 1,
> +    }, {
> +        .name        = "tp-link:green:system",
> +        .gpio        = TL_WA701NDV2_GPIO_LED_SYSTEM,
> +        .active_low    = 1,
> +        }
> +};
> +
> +static struct gpio_keys_button tl_wa701ndv2_gpio_keys[] __initdata = {
> +    {
> +        .desc        = "reset",
> +        .type        = EV_KEY,
> +        .code        = KEY_RESTART,
> +        .debounce_interval = TL_WA701NDV2_KEYS_DEBOUNCE_INTERVAL,
> +        .gpio        = TL_WA701NDV2_GPIO_BTN_RESET,
> +        .active_low    = 0,
> +    } , {
> +                .desc        = "qss",
> +                .type        = EV_KEY,
> +                .code        = KEY_WPS_BUTTON,
> +                .debounce_interval = TL_WA701NDV2_KEYS_DEBOUNCE_INTERVAL,
> +                .gpio        = TL_WA701NDV2_GPIO_BTN_QSS,
> +                .active_low    = 0,
> +        }
> +
> +};
> +
> +static void __init tl_wa701ndv2_setup(void)
> +{
> +    u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
> +    u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
> +
> +    /* disable PHY_SWAP and PHY_ADDR_SWAP bits */
> +    ath79_setup_ar933x_phy4_switch(false, false);
> +
> +    ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wa701ndv2_leds_gpio),
> +                 tl_wa701ndv2_leds_gpio);
> +
> +    ath79_register_gpio_keys_polled(-1, TL_WA701NDV2_KEYS_POLL_INTERVAL,
> +                    ARRAY_SIZE(tl_wa701ndv2_gpio_keys),
> +                    tl_wa701ndv2_gpio_keys);
> +
> +    gpio_request_one(TL_WA701NDV2_GPIO_USB_POWER,
> +             GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
> +             "USB power");
> +    ath79_register_usb();
> +
> +    ath79_register_m25p80(&tl_wa701ndv2_flash_data);
> +    ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
> +    /* ath79_init_mac(ath79_eth1_data.mac_addr, mac, -1); */
> +
> +    ath79_register_mdio(0, 0x0);
> +    ath79_register_eth(0);
> +    ath79_register_eth(1);
> +
> +    ath79_register_wmac(ee, mac);
> +}
> +
> +MIPS_MACHINE(ATH79_MACH_TL_WA701ND_V2, "TL-WA701ND-v2",
> +         "TP-LINK TL-WA701ND v2", tl_wa701ndv2_setup);
> diff --git a/target/linux/ar71xx/image/Makefile
> b/target/linux/ar71xx/image/Makefile
> index 683c238..425fcc5 100644
> --- a/target/linux/ar71xx/image/Makefile
> +++ b/target/linux/ar71xx/image/Makefile
> @@ -1163,7 +1163,7 @@ $(eval $(call
> SingleProfile,TPLINKOLD,squashfs-only,TLWR841NV15,tl-wr841nd-v1.5,
>  $(eval $(call SingleProfile,TPLINK,64kraw,RNXN360RT,rnx-n360rt,TL-WR941ND,ttyS0,115200,0x09410002,0x00420001,4M))
>  $(eval $(call SingleProfile,TPLINK,64kraw,TLMR3220V1,tl-mr3220-v1,TL-MR3220,ttyS0,115200,0x32200001,1,4M))
>  $(eval $(call SingleProfile,TPLINK,64kraw,TLMR3420V1,tl-mr3420-v1,TL-MR3420,ttyS0,115200,0x34200001,1,4M))
> -$(eval $(call SingleProfile,TPLINK,64kraw,TLWA701,tl-wa701n-v1,TL-WA901ND,ttyS0,115200,0x07010001,1,4M))
> +$(eval $(call SingleProfile,TPLINK,64kraw,TLWA701NV1,tl-wa701n-v1,TL-WA901ND,ttyS0,115200,0x07010001,1,4M))
>  $(eval $(call SingleProfile,TPLINK,64kraw,TLWA730REV1,tl-wa730rev1,TL-WA901ND,ttyS0,115200,0x07300001,1,4M))
>  $(eval $(call SingleProfile,TPLINK,64kraw,TLWA7510NV1,tl-wa7510n,TL-WA7510N,ttyS0,115200,0x75100001,1,4M))
>  $(eval $(call SingleProfile,TPLINK,64kraw,TLWA801NV1,tl-wa801nd-v1,TL-WA901ND,ttyS0,115200,0x08010001,1,4M))
> @@ -1199,6 +1199,7 @@ $(eval $(call
> SingleProfile,TPLINK-LZMA,64kraw,TLMR3040V1,tl-mr3040-v1,TL-MR3040
>  $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLMR3040V2,tl-mr3040-v2,TL-MR3040-v2,ttyATH0,115200,0x30400002,1,4Mlzma))
>  $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLMR3220V2,tl-mr3220-v2,TL-MR3220-v2,ttyATH0,115200,0x32200002,1,4Mlzma))
>  $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLMR3420V2,tl-mr3420-v2,TL-MR3420-v2,ttyS0,115200,0x34200002,1,4Mlzma))
> +$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWA701NV2,tl-wa701nd-v2,TL-WA701ND-v2,ttyATH0,115200,0x07010002,1,4Mlzma))
>  $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR703,tl-wr703n-v1,TL-WR703N,ttyATH0,115200,0x07030101,1,4Mlzma))
>  $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR710,tl-wr710n-v1,TL-WR710N,ttyATH0,115200,0x07100001,1,8Mlzma))
>  $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR720NV3,tl-wr720n-v3,TL-WR720N-v3,ttyATH0,115200,0x07200103,1,4Mlzma))
> @@ -1276,6 +1277,7 @@ $(eval $(call MultiProfile,TLMR11U,TLMR11UV1 TLMR11UV2))
>  $(eval $(call MultiProfile,TLMR3040,TLMR3040V1 TLMR3040V2))
>  $(eval $(call MultiProfile,TLMR3220,TLMR3220V1 TLMR3220V2))
>  $(eval $(call MultiProfile,TLMR3420,TLMR3420V1 TLMR3420V2))
> +$(eval $(call MultiProfile,TLWA701,TLWA701NV1 TLWA701NV2))
>  $(eval $(call MultiProfile,TLWA730RE,TLWA730REV1))
>  $(eval $(call MultiProfile,TLWA801,TLWA801NV1 TLWA801NV2))
>  $(eval $(call MultiProfile,TLWA830,TLWA830RV1 TLWA830RV2))
> diff --git a/target/linux/ar71xx/patches-3.10/729-MIPS-ath79-add-TL-WA701NDv2-support.patch
> b/target/linux/ar71xx/patches-3.10/729-MIPS-ath79-add-TL-WA701NDv2-support.patch
> new file mode 100644
> index 0000000..b0de43f
> --- /dev/null
> +++ b/target/linux/ar71xx/patches-3.10/729-MIPS-ath79-add-TL-WA701NDv2-support.patch
> @@ -0,0 +1,45 @@
> +Index: linux-3.10.49/arch/mips/ath79/machtypes.h
> +===================================================================
> +--- linux-3.10.49.orig/arch/mips/ath79/machtypes.h
> ++++ linux-3.10.49/arch/mips/ath79/machtypes.h
> +@@ -118,6 +118,7 @@ enum ath79_mach_type {
> +     ATH79_MACH_TL_MR3220_V2,    /* TP-LINK TL-MR3220 v2 */
> +     ATH79_MACH_TL_MR3420,        /* TP-LINK TL-MR3420 */
> +     ATH79_MACH_TL_MR3420_V2,    /* TP-LINK TL-MR3420 v2 */
> ++    ATH79_MACH_TL_WA701ND_V2,    /* TP-LINK TL-WA701ND v2 */
> +     ATH79_MACH_TL_WA750RE,        /* TP-LINK TL-WA750RE */
> +     ATH79_MACH_TL_WA7510N_V1,    /* TP-LINK TL-WA7510N v1*/
> +     ATH79_MACH_TL_WA850RE,        /* TP-LINK TL-WA850RE */
> +Index: linux-3.10.49/arch/mips/ath79/Kconfig
> +===================================================================
> +--- linux-3.10.49.orig/arch/mips/ath79/Kconfig
> ++++ linux-3.10.49/arch/mips/ath79/Kconfig
> +@@ -713,6 +713,16 @@ config ATH79_MACH_TL_MR3X20
> +     select ATH79_DEV_M25P80
> +     select ATH79_DEV_USB
> +
> ++config ATH79_MACH_TL_WA701ND_V2
> ++    bool "TP-LINK TL-WA701ND v2 support"
> ++    select SOC_AR933X
> ++    select ATH79_DEV_ETH
> ++    select ATH79_DEV_GPIO_BUTTONS
> ++    select ATH79_DEV_LEDS_GPIO
> ++    select ATH79_DEV_M25P80
> ++    select ATH79_DEV_USB
> ++    select ATH79_DEV_WMAC
> ++
> + config ATH79_MACH_TL_WAX50RE
> +     bool "TP-LINK TL-WA750/850RE support"
> +     select SOC_AR934X
> +Index: linux-3.10.49/arch/mips/ath79/Makefile
> +===================================================================
> +--- linux-3.10.49.orig/arch/mips/ath79/Makefile
> ++++ linux-3.10.49/arch/mips/ath79/Makefile
> +@@ -101,6 +101,7 @@ obj-$(CONFIG_ATH79_MACH_TL_MR11U)    += mac
> + obj-$(CONFIG_ATH79_MACH_TL_MR13U)    += mach-tl-mr13u.o
> + obj-$(CONFIG_ATH79_MACH_TL_MR3020)    += mach-tl-mr3020.o
> + obj-$(CONFIG_ATH79_MACH_TL_MR3X20)    += mach-tl-mr3x20.o
> ++obj-$(CONFIG_ATH79_MACH_TL_WA701ND_V2)    += mach-tl-wa701nd-v2.o
> + obj-$(CONFIG_ATH79_MACH_TL_WAX50RE)     += mach-tl-wax50re.o
> + obj-$(CONFIG_ATH79_MACH_TL_WA830RE_V2)    += mach-tl-wa830re-v2.o
> + obj-$(CONFIG_ATH79_MACH_TL_WA901ND)    += mach-tl-wa901nd.o
> diff --git a/tools/firmware-utils/src/mktplinkfw.c
> b/tools/firmware-utils/src/mktplinkfw.c
> index a6aab59..0a5e4c3 100644
> --- a/tools/firmware-utils/src/mktplinkfw.c
> +++ b/tools/firmware-utils/src/mktplinkfw.c
> @@ -40,6 +40,7 @@
>  #define HWID_TL_MR3420_V1    0x34200001
>  #define HWID_TL_MR3420_V2    0x34200002
>  #define HWID_TL_WA701N_V1    0x07010001
> +#define HWID_TL_WA701N_V2    0x07010002
>  #define HWID_TL_WA7510N_V1    0x75100001
>  #define HWID_TL_WA801ND_V1    0x08010001
>  #define HWID_TL_WA830RE_V1    0x08300010
> @@ -254,6 +255,11 @@ static struct board_info boards[] = {
>          .hw_rev        = 1,
>          .layout_id    = "4M",
>      }, {
> +        .id        = "TL-WA701Nv2",
> +        .hw_id        = HWID_TL_WA701N_V2,
> +        .hw_rev        = 1,
> +        .layout_id    = "4Mlzma",
> +    }, {
>          .id        = "TL-WA7510N",
>          .hw_id        = HWID_TL_WA7510N_V1,
>          .hw_rev        = 1,
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From blogic at openwrt.org  Sat Jan 17 01:48:24 2015
From: blogic at openwrt.org (John Crispin)
Date: Sat, 17 Jan 2015 07:48:24 +0100
Subject: [OpenWrt-Devel] [PATCH] ramips: add support for Intenso Memory
	2 Move USB 3.0
In-Reply-To: <2766551.4pBuPnbTJq@debian64>
References: <2766551.4pBuPnbTJq@debian64>
Message-ID: <54BA05B8.6050306@openwrt.org>



On 15/01/2015 22:47, Christian Lamparter wrote:
> This adds support for a rt5350-based "portable nas" solution
> from Intenso. The board comes with 32M RAM and 8M Flash, the
> built-in HDD is connected/accessible via a usb3.0<->sata
> bridge VLI VL701.
> 

[....]

> diff --git a/target/linux/ramips/rt305x/profiles/m2m.mk b/target/linux/ramips/rt305x/profiles/m2m.mk
> new file mode 100644
> index 0000000..e5cb6b8
> --- /dev/null
> +++ b/target/linux/ramips/rt305x/profiles/m2m.mk
> @@ -0,0 +1,20 @@
> +#
> +# Copyright (C) 2015 OpenWrt.org
> +#
> +# This is free software, licensed under the GNU General Public License v2.
> +# See /LICENSE for more information.
> +#
> +
> +define Profile/M2M
> +	NAME:=Intenso Memory 2 Move
> +	PACKAGES:=\
> +		kmod-ledtrig-netdev kmod-ledtrig-timer kmod-leds-gpio \
> +		kmod-usb-core kmod-usb2 kmod-usb-storage kmod-scsi-core \
> +		kmod-fs-ext4 kmod-fs-vfat block-mount
> +endef
> +

not sure about the filesystem selection. what filesystem is on the disc
when it is shipped ?



> +define Profile/M2M/Description
> +	Package set for Intenso Memory 2 Move USB 3.0
> +endef
> +
> +$(eval $(call Profile,M2M))
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From blogic at openwrt.org  Sat Jan 17 02:07:22 2015
From: blogic at openwrt.org (John Crispin)
Date: Sat, 17 Jan 2015 08:07:22 +0100
Subject: [OpenWrt-Devel] [PATCH] [ar71xx] Add support for MERCURY
	MAC1200R
In-Reply-To: <1420976894-12794-1-git-send-email-openwrt@rogerpueyo.com>
References: <1420976894-12794-1-git-send-email-openwrt@rogerpueyo.com>
Message-ID: <54BA0A2A.8020107@openwrt.org>



On 11/01/2015 12:48, openwrt at rogerpueyo.com wrote:
> From: Roger Pueyo Centelles <roger.pueyo at guifi.net>
> 

description and SoB are missing




> ---
>  target/linux/ar71xx/base-files/etc/diag.sh         |   3 +
>  .../ar71xx/base-files/etc/uci-defaults/01_leds     |   5 +
>  .../ar71xx/base-files/etc/uci-defaults/02_network  |   1 +
>  target/linux/ar71xx/base-files/lib/ar71xx.sh       |   6 +
>  .../ar71xx/base-files/lib/upgrade/platform.sh      |   1 +
>  target/linux/ar71xx/config-3.14                    |   1 +
>  .../files/arch/mips/ath79/mach-mc-mac1200r.c       | 157 +++++++++++++++++++++
>  target/linux/ar71xx/generic/profiles/mercury.mk    |  17 +++
>  target/linux/ar71xx/image/Makefile                 |   1 +
>  .../736-MIPS-ath79-add-MC-MAC1200R-support.patch   |  39 +++++
>  10 files changed, 231 insertions(+)
>  create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-mc-mac1200r.c
>  create mode 100644 target/linux/ar71xx/generic/profiles/mercury.mk
>  create mode 100644 target/linux/ar71xx/patches-3.14/736-MIPS-ath79-add-MC-MAC1200R-support.patch
> 
> diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
> index 06b96a3..388727f 100755
> --- a/target/linux/ar71xx/base-files/etc/diag.sh
> +++ b/target/linux/ar71xx/base-files/etc/diag.sh
> @@ -105,6 +105,9 @@ get_status_led() {
>  	ls-sr71)
>  		status_led="ubnt:green:d22"
>  		;;
> +	mc-mac1200r)
> +		status_led="mercury:green:system"
> +		;;
>  	mr600)
>  		status_led="mr600:orange:power"
>  		;;
> diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
> index 296ea57..dc5dfa1 100755
> --- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
> +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
> @@ -166,6 +166,11 @@ hornet-ub)
>  	ucidef_set_led_usbdev "usb" "USB" "alfa:blue:usb" "1-1"
>  	;;
>  
> +mc-mac1200r)
> +	ucidef_set_led_wlan "wlan2g" "WLAN2G" "mercury:green:wlan2g" "phy1tpt"
> +	ucidef_set_led_wlan "wlan5g" "WLAN5G" "mercury:green:wlan5g" "phy0tpt"
> +	;;
> +
>  mr600)
>  	ucidef_set_led_wlan "wlan58" "WLAN58" "mr600:green:wlan58" "phy0tpt"
>  	;;
> diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
> index b4b6cb3..8151470 100755
> --- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
> +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
> @@ -367,6 +367,7 @@ dir-615-e1 |\
>  dir-615-e4 |\
>  hiwifi-hc6361 |\
>  ja76pf |\
> +mc-mac1200r|\
>  mynet-n600 |\
>  oolite |\
>  qihoo-c301 |\
> diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
> index 9b056e9..3ce63aa 100755
> --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
> +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
> @@ -97,6 +97,9 @@ tplink_board_detect() {
>  	"015300"*)
>  		model="EasyLink EL-MINI"
>  		;;
> +	"120000"*)
> +		model="MERCURY MAC1200R"
> +		;;
>  	"3C0001"*)
>  		model="OOLITE"
>  		;;
> @@ -432,6 +435,9 @@ ar71xx_board_detect() {
>  	*LS-SR71)
>  		name="ls-sr71"
>  		;;
> +	*"MAC1200R")
> +		name="mc-mac1200r"
> +		;;
>  	*MR600v2)
>  		name="mr600v2"
>  		;;
> diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
> index 6dabf4e..7153614 100755
> --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
> +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
> @@ -297,6 +297,7 @@ platform_check_image() {
>  	el-m150 | \
>  	el-mini | \
>  	gl-inet | \
> +	mc-mac1200r | \
>  	oolite | \
>  	smart-300 | \
>  	tl-mr10u | \
> diff --git a/target/linux/ar71xx/config-3.14 b/target/linux/ar71xx/config-3.14
> index b6fa4ab..a99c082 100644
> --- a/target/linux/ar71xx/config-3.14
> +++ b/target/linux/ar71xx/config-3.14
> @@ -64,6 +64,7 @@ CONFIG_ATH79_MACH_HIWIFI_HC6361=y
>  CONFIG_ATH79_MACH_HORNET_UB=y
>  CONFIG_ATH79_MACH_JA76PF=y
>  CONFIG_ATH79_MACH_JWAP003=y
> +CONFIG_ATH79_MACH_MC_MAC1200R=y
>  CONFIG_ATH79_MACH_MR600=y
>  CONFIG_ATH79_MACH_MR900=y
>  CONFIG_ATH79_MACH_MYNET_N600=y
> diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-mc-mac1200r.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-mc-mac1200r.c
> new file mode 100644
> index 0000000..6b92b9c
> --- /dev/null
> +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-mc-mac1200r.c
> @@ -0,0 +1,157 @@
> +/*
> + *  MERCURY MAC1200R board support
> + *
> + *  Copyright (C) 2012 Gabor Juhos <juhosg at openwrt.org>
> + *  Copyright (C) 2013 Gui Iribarren <gui at altermundi.net>
> + *
> + *  This program is free software; you can redistribute it and/or modify it
> + *  under the terms of the GNU General Public License version 2 as published
> + *  by the Free Software Foundation.
> + */
> +
> +#include <linux/pci.h>
> +#include <linux/phy.h>
> +#include <linux/gpio.h>
> +#include <linux/platform_device.h>
> +#include <linux/ath9k_platform.h>
> +#include <linux/ar8216_platform.h>
> +
> +#include <asm/mach-ath79/ar71xx_regs.h>
> +
> +#include "common.h"
> +#include "dev-ap9x-pci.h"
> +#include "dev-eth.h"
> +#include "dev-gpio-buttons.h"
> +#include "dev-leds-gpio.h"
> +#include "dev-m25p80.h"
> +#include "dev-spi.h"
> +#include "dev-wmac.h"
> +#include "machtypes.h"
> +
> +#define MAC1200R_GPIO_LED_WLAN2G	13
> +#define MAC1200R_GPIO_LED_WLAN5G	17
> +#define MAC1200R_GPIO_LED_SYSTEM	14
> +#define MAC1200R_GPIO_LED_WPS		11
> +#define MAC1200R_GPIO_LED_WAN		12
> +#define MAC1200R_GPIO_LED_LAN1		15
> +#define MAC1200R_GPIO_LED_LAN2		21
> +#define MAC1200R_GPIO_LED_LAN3		22
> +#define MAC1200R_GPIO_LED_LAN4		20
> +
> +#define MAC1200R_GPIO_BTN_WPS		16
> +
> +#define MAC1200R_KEYS_POLL_INTERVAL	20	/* msecs */
> +#define MAC1200R_KEYS_DEBOUNCE_INTERVAL	(3 * MAC1200R_KEYS_POLL_INTERVAL)
> +
> +#define MAC1200R_MAC0_OFFSET		0
> +#define MAC1200R_MAC1_OFFSET		6
> +#define MAC1200R_WMAC_CALDATA_OFFSET	0x1000
> +#define MAC1200R_PCIE_CALDATA_OFFSET	0x5000
> +
> +static const char *mac1200r_part_probes[] = {
> +	"tp-link",
> +	NULL,
> +};
> +
> +static struct flash_platform_data mac1200r_flash_data = {
> +	.part_probes	= mac1200r_part_probes,
> +};
> +
> +static struct gpio_led mac1200r_leds_gpio[] __initdata = {
> +	{
> +		.name		= "mercury:green:wps",
> +		.gpio		= MAC1200R_GPIO_LED_WPS,
> +		.active_low	= 1,
> +	},
> +	{
> +		.name		= "mercury:green:system",
> +		.gpio		= MAC1200R_GPIO_LED_SYSTEM,
> +		.active_low	= 1,
> +	},
> +	{
> +		.name		= "mercury:green:wlan2g",
> +		.gpio		= MAC1200R_GPIO_LED_WLAN2G,
> +		.active_low	= 1,
> +	},
> +	{
> +		.name		= "mercury:green:wlan5g",
> +		.gpio		= MAC1200R_GPIO_LED_WLAN5G,
> +		.active_low	= 1,
> +	},
> +};
> +
> +static struct gpio_keys_button mac1200r_gpio_keys[] __initdata = {
> +	{
> +		.desc		= "WPS button",
> +		.type		= EV_KEY,
> +		.code		= KEY_WPS_BUTTON,
> +		.debounce_interval = MAC1200R_KEYS_DEBOUNCE_INTERVAL,
> +		.gpio		= MAC1200R_GPIO_BTN_WPS,
> +		.active_low	= 1,
> +	},
> +};
> +
> +
> +static void __init mac1200r_setup(void)
> +{
> +	u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
> +	u8 *art = (u8 *) KSEG1ADDR(0x1fff0000);
> +	u8 tmpmac[ETH_ALEN];
> +
> +	ath79_register_m25p80(&mac1200r_flash_data);
> +
> +	ath79_register_leds_gpio(-1, ARRAY_SIZE(mac1200r_leds_gpio),
> +					mac1200r_leds_gpio);
> +
> +	ath79_register_gpio_keys_polled(-1, MAC1200R_KEYS_POLL_INTERVAL,
> +					ARRAY_SIZE(mac1200r_gpio_keys),
> +					mac1200r_gpio_keys);
> +
> +	ath79_init_mac(tmpmac, mac, 0);
> +
> +	ath79_register_wmac(art + MAC1200R_WMAC_CALDATA_OFFSET, tmpmac);
> +
> +	ath79_init_mac(tmpmac, mac, 1);
> +	//ap9x_pci_setup_wmac_led_pin(0, 0);
> +
> +	ap91_pci_init(art + MAC1200R_PCIE_CALDATA_OFFSET, tmpmac);
> +
> +	ath79_setup_ar934x_eth_cfg(AR934X_ETH_CFG_SW_ONLY_MODE);
> +
> +	ath79_register_mdio(1, 0x0);
> +
> +	/* LAN */
> +	ath79_init_mac(ath79_eth1_data.mac_addr, mac, -1);
> +
> +	/* GMAC1 is connected to the internal switch */
> +	ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII;
> +
> +	ath79_register_eth(1);
> +
> +	/* WAN */
> +	ath79_init_mac(ath79_eth0_data.mac_addr, mac, 2);
> +
> +	/* GMAC0 is connected to the PHY4 of the internal switch */
> +	ath79_switch_data.phy4_mii_en = 1;
> +	ath79_switch_data.phy_poll_mask = BIT(4);
> +	ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
> +	ath79_eth0_data.phy_mask = BIT(4);
> +	ath79_eth0_data.mii_bus_dev = &ath79_mdio1_device.dev;
> +
> +	ath79_register_eth(0);
> +
> +	ath79_gpio_output_select(MAC1200R_GPIO_LED_LAN1,
> +				 AR934X_GPIO_OUT_LED_LINK3);
> +	ath79_gpio_output_select(MAC1200R_GPIO_LED_LAN2,
> +				 AR934X_GPIO_OUT_LED_LINK2);
> +	ath79_gpio_output_select(MAC1200R_GPIO_LED_LAN3,
> +				 AR934X_GPIO_OUT_LED_LINK1);
> +	ath79_gpio_output_select(MAC1200R_GPIO_LED_LAN4,
> +				 AR934X_GPIO_OUT_LED_LINK0);
> +	ath79_gpio_output_select(MAC1200R_GPIO_LED_WAN,
> +				 AR934X_GPIO_OUT_LED_LINK4);
> +}
> +
> +MIPS_MACHINE(ATH79_MACH_MC_MAC1200R, "MC-MAC1200R",
> +	     "MERCURY MAC1200R",
> +	     mac1200r_setup);
> diff --git a/target/linux/ar71xx/generic/profiles/mercury.mk b/target/linux/ar71xx/generic/profiles/mercury.mk
> new file mode 100644
> index 0000000..8ce864d
> --- /dev/null
> +++ b/target/linux/ar71xx/generic/profiles/mercury.mk
> @@ -0,0 +1,17 @@
> +#
> +# Copyright (C) 2015 OpenWrt.org
> +#
> +# This is free software, licensed under the GNU General Public License v2.
> +# See /LICENSE for more information.
> +#
> +
> +
> +define Profile/MAC1200R
> +	NAME:=MERCURY MAC1200R
> +	PACKAGES:=kmod-ath10k
> +endef
> +
> +define Profile/MAC1200R/Description
> +	Package set optimized for the MERCURY MAC1200R.
> +endef
> +$(eval $(call Profile,MAC1200R))
> diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
> index ef52f46..9621e0b 100644
> --- a/target/linux/ar71xx/image/Makefile
> +++ b/target/linux/ar71xx/image/Makefile
> @@ -1380,6 +1380,7 @@ $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,ELM150,el-m150,EL-M150,ttyATH0,11
>  $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,ELMINI,el-mini,EL-MINI,ttyATH0,115200,0x01530001,1,8Mlzma))
>  $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,GLINET6408A,gl-inet-6408A-v1,GL-INET,ttyATH0,115200,0x08000001,1,8Mlzma))
>  $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,GLINET6416A,gl-inet-6416A-v1,GL-INET,ttyATH0,115200,0x08000001,1,16Mlzma))
> +$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,MAC1200R,mc-mac1200r,MC-MAC1200R,ttyS0,115200,0x12000001,1,8Mlzma))
>  $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLMR10U,tl-mr10u-v1,TL-MR10U,ttyATH0,115200,0x00100101,1,4Mlzma))
>  $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLMR11UV1,tl-mr11u-v1,TL-MR11U,ttyATH0,115200,0x00110101,1,4Mlzma))
>  $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLMR11UV2,tl-mr11u-v2,TL-MR11U,ttyATH0,115200,0x00110102,1,4Mlzma))
> diff --git a/target/linux/ar71xx/patches-3.14/736-MIPS-ath79-add-MC-MAC1200R-support.patch b/target/linux/ar71xx/patches-3.14/736-MIPS-ath79-add-MC-MAC1200R-support.patch
> new file mode 100644
> index 0000000..bb4d584
> --- /dev/null
> +++ b/target/linux/ar71xx/patches-3.14/736-MIPS-ath79-add-MC-MAC1200R-support.patch
> @@ -0,0 +1,39 @@
> +--- a/arch/mips/ath79/Kconfig
> ++++ b/arch/mips/ath79/Kconfig
> +@@ -374,6 +374,16 @@
> +	select ATH79_DEV_LEDS_GPIO
> +	select ATH79_DEV_M25P80
> +
> ++config ATH79_MACH_MC_MAC1200R
> ++	bool "MERCURY MAC1200R board support"
> ++	select SOC_AR934X
> ++	select ATH79_DEV_AP9X_PCI if PCI
> ++	select ATH79_DEV_ETH
> ++	select ATH79_DEV_GPIO_BUTTONS
> ++	select ATH79_DEV_LEDS_GPIO
> ++	select ATH79_DEV_M25P80
> ++	select ATH79_DEV_WMAC
> ++
> + config ATH79_MACH_RB4XX
> +	bool "MikroTik RouterBOARD 4xx series support"
> +	select SOC_AR71XX
> +--- a/arch/mips/ath79/Makefile
> ++++ b/arch/mips/ath79/Makefile
> +@@ -66,6 +66,7 @@
> + obj-$(CONFIG_ATH79_MACH_JA76PF)		+= mach-ja76pf.o
> + obj-$(CONFIG_ATH79_MACH_JWAP003)	+= mach-jwap003.o
> + obj-$(CONFIG_ATH79_MACH_HORNET_UB)	+= mach-hornet-ub.o
> ++obj-$(CONFIG_ATH79_MACH_MC_MAC1200R)     += mach-mc-mac1200r.o
> + obj-$(CONFIG_ATH79_MACH_MR600)		+= mach-mr600.o
> + obj-$(CONFIG_ATH79_MACH_MYNET_N600)	+= mach-mynet-n600.o
> + obj-$(CONFIG_ATH79_MACH_MYNET_REXT)	+= mach-mynet-rext.o
> +--- a/arch/mips/ath79/machtypes.h
> ++++ b/arch/mips/ath79/machtypes.h
> +@@ -89,6 +89,7 @@
> +	ATH79_MACH_TEW_673GRU,		/* TRENDnet TEW-673GRU */
> +	ATH79_MACH_TEW_712BR,		/* TRENDnet TEW-712BR */
> +	ATH79_MACH_TEW_732BR,		/* TRENDnet TEW-732BR */
> ++	ATH79_MACH_MC_MAC1200R,		/* MERCURY MAC1200R*/
> +	ATH79_MACH_TL_MR10U,		/* TP-LINK TL-MR10U */
> +	ATH79_MACH_TL_MR11U,		/* TP-LINK TL-MR11U */
> +	ATH79_MACH_TL_MR13U,		/* TP-LINK TL-MR13U */
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From blogic at openwrt.org  Sat Jan 17 02:11:10 2015
From: blogic at openwrt.org (John Crispin)
Date: Sat, 17 Jan 2015 08:11:10 +0100
Subject: [OpenWrt-Devel] [PATCH] comgt: Allow using non-TTY devices
In-Reply-To: <1421168424-27146-1-git-send-email-malaakso@elisanet.fi>
References: <54AEE8CF.7060403@openwrt.org>
 <1421168424-27146-1-git-send-email-malaakso@elisanet.fi>
Message-ID: <54BA0B0E.1040003@openwrt.org>



On 13/01/2015 18:00, Matti Laakso wrote:
> Some Huawei mobile broadband sticks utilizing the NCM protocol expose
> the control channel as a cdc-wdm device node instead of a virtual TTY.
> This device node does not support the terminal ioctls. This patch
> adds a check whether the provided device is a TTY or not and does not
> attempt to use the terminal ioctls if they are not supported.
> 
> Signed-off-by: Matti Laakso <malaakso at elisanet.fi>
> ---
> diff --git a/package/network/utils/comgt/patches/004-check_tty.patch b/package/network/utils/comgt/patches/004-check_tty.patch
> new file mode 100644
> index 0000000..d269bce
> --- /dev/null
> +++ b/package/network/utils/comgt/patches/004-check_tty.patch
> @@ -0,0 +1,177 @@
> +--- a/comgt.c
> ++++ b/comgt.c
> +@@ -91,6 +91,7 @@ unsigned long hstart,hset;
> + char NullString[]={ "" };
> + BOOL lastcharnl=1; /* Indicate that last char printed from getonebyte
> +                                was a nl, so no new one is needed */
> ++BOOL tty=1;
> + 
> + 
> + //"open com \"/dev/modem\"\nset com 38400n81\nset senddelay 0.05\nsend \"ATi^m\"\nget 2 \" ^m\" $s\nprint \"Response : \",$s,\"\\n\"\nget 2 \" ^m\" $s\nprint \"Response :\",$s,\"\\n\"\nget 2 \" ^m\" $s\nprint \"Response : \",$s,\"\\n\"\n\n";
> +@@ -918,10 +919,12 @@ BOOL getonoroff(void) {
> + }
> + 
> + void setcom(void) {
> +-  stbuf.c_cflag &= ~(CBAUD | CSIZE | CSTOPB | CLOCAL | PARENB);
> +-  stbuf.c_cflag |= (speed | bits | CREAD | clocal | parity | stopbits );
> +-  if (ioctl(comfd, TCSETA, &stbuf) < 0) {
> +-    serror("Can't ioctl set device",1);
> ++  if (tty) {
> ++    stbuf.c_cflag &= ~(CBAUD | CSIZE | CSTOPB | CLOCAL | PARENB);
> ++    stbuf.c_cflag |= (speed | bits | CREAD | clocal | parity | stopbits );
> ++    if (ioctl(comfd, TCSETA, &stbuf) < 0) {
> ++      serror("Can't ioctl set device",1);
> ++    }
> +   }
> + }
> + 
> +@@ -1224,9 +1227,11 @@ void doclose(void) {
> +   if(strcmp(token,"hardcom")==0) {
> +     if(comfd== -1) serror("Com device not open",1);
> +     vmsg("Closing device");
> +-    if (ioctl(comfd, TCSETA, &svbuf) < 0) {
> +-      sprintf(msg,"Can't ioctl set device %s.\n",device);
> +-      serror(msg,1);
> ++    if (tty) {
> ++      if (ioctl(comfd, TCSETA, &svbuf) < 0) {
> ++        sprintf(msg,"Can't ioctl set device %s.\n",device);
> ++        serror(msg,1);
> ++      }
> +     }


if (tty && (ioctl(comfd, TCSETA, &svbuf) < 0)) .....


i think this pattern would drastically reduce the diffstat




> +     close(comfd);
> +     comfd= -1;
> +@@ -1266,26 +1271,32 @@ void opengt(void) {
> +       ext(1);
> +     }
> +   }
> +-  if (ioctl (comfd, TCGETA, &svbuf) < 0) {
> +-    sprintf(msg,"Can't control %s, please try again.\n",device);
> +-    serror(msg,1);
> ++  if (isatty (comfd))
> ++    tty=1;
> ++  else
> ++    tty=0;
> ++  if (tty) {
> ++    if (ioctl (comfd, TCGETA, &svbuf) < 0) {
> ++      sprintf(msg,"Can't control %s, please try again.\n",device);
> ++      serror(msg,1);
> ++    }
> ++    ioctl(comfd, TCGETA, &stbuf);
> ++    speed=stbuf.c_cflag & CBAUD;
> ++    if (high_speed == 0)  strcpy(cspeed,"115200");
> ++    else strcpy(cspeed,"57600");
> ++    bits=stbuf.c_cflag & CSIZE;
> ++    clocal=stbuf.c_cflag & CLOCAL;
> ++    stopbits=stbuf.c_cflag & CSTOPB;
> ++    parity=stbuf.c_cflag & (PARENB | PARODD);
> ++    stbuf.c_iflag &= ~(IGNCR | ICRNL | IUCLC | INPCK | IXON | IXANY | IGNPAR );
> ++    stbuf.c_oflag &= ~(OPOST | OLCUC | OCRNL | ONLCR | ONLRET);
> ++    stbuf.c_lflag &= ~(ICANON | ECHO | ECHOE | ECHONL);
> ++    stbuf.c_lflag &= ~(ECHO | ECHOE);
> ++    stbuf.c_cc[VMIN] = 1;
> ++    stbuf.c_cc[VTIME] = 0;
> ++    stbuf.c_cc[VEOF] = 1;
> +   }
> +   setenv("COMGTDEVICE",device,1);
> +-  ioctl(comfd, TCGETA, &stbuf);
> +-  speed=stbuf.c_cflag & CBAUD;
> +-  if (high_speed == 0)  strcpy(cspeed,"115200");
> +-  else strcpy(cspeed,"57600");
> +-  bits=stbuf.c_cflag & CSIZE;
> +-  clocal=stbuf.c_cflag & CLOCAL;
> +-  stopbits=stbuf.c_cflag & CSTOPB;
> +-  parity=stbuf.c_cflag & (PARENB | PARODD);
> +-  stbuf.c_iflag &= ~(IGNCR | ICRNL | IUCLC | INPCK | IXON | IXANY | IGNPAR );
> +-  stbuf.c_oflag &= ~(OPOST | OLCUC | OCRNL | ONLCR | ONLRET);
> +-  stbuf.c_lflag &= ~(ICANON | ECHO | ECHOE | ECHONL);
> +-  stbuf.c_lflag &= ~(ECHO | ECHOE);
> +-  stbuf.c_cc[VMIN] = 1;
> +-  stbuf.c_cc[VTIME] = 0;
> +-  stbuf.c_cc[VEOF] = 1;
> +   setcom();
> +   dormir(200000); /* Wait a bit (DTR raise) */
> +   sprintf(msg,"Opened %s as FD %d",device,comfd);
> +@@ -1302,45 +1313,50 @@ void opendevice(void) {
> +     }
> +   }
> +   else comfd=0;
> +-
> +-  if (ioctl (comfd, TCGETA, &svbuf) < 0) {
> +-    sprintf(msg,"Can't ioctl get device %s.\n",device);
> +-    serror(msg,1);
> +-  }
> +-  ioctl(comfd, TCGETA, &stbuf);
> +-  speed=stbuf.c_cflag & CBAUD;
> +-  switch(speed) {
> +-    case B0: strcpy(cspeed,"0");break;
> +-    case B50: strcpy(cspeed,"50");break;
> +-    case B75: strcpy(cspeed,"75");break;
> +-    case B110: strcpy(cspeed,"110");break;
> +-    case B300: strcpy(cspeed,"300");break;
> +-    case B600: strcpy(cspeed,"600");break;
> +-    case B1200: strcpy(cspeed,"1200");break;
> +-    case B2400: strcpy(cspeed,"2400");break;
> +-    case B4800: strcpy(cspeed,"4800");break;
> +-    case B9600: strcpy(cspeed,"9600");break;
> +-    case B19200: strcpy(cspeed,"19200");break;
> +-    case B38400: strcpy(cspeed,"38400");break;
> +-    case B115200:
> ++  if (isatty (comfd))
> ++    tty=1;
> ++  else
> ++    tty=0;
> ++  if (tty) {
> ++    if (ioctl (comfd, TCGETA, &svbuf) < 0) {
> ++      sprintf(msg,"Can't ioctl get device %s.\n",device);
> ++      serror(msg,1);
> ++    }
> ++    ioctl(comfd, TCGETA, &stbuf);
> ++    speed=stbuf.c_cflag & CBAUD;
> ++    switch(speed) {
> ++      case B0: strcpy(cspeed,"0");break;
> ++      case B50: strcpy(cspeed,"50");break;
> ++      case B75: strcpy(cspeed,"75");break;
> ++      case B110: strcpy(cspeed,"110");break;
> ++      case B300: strcpy(cspeed,"300");break;
> ++      case B600: strcpy(cspeed,"600");break;
> ++      case B1200: strcpy(cspeed,"1200");break;
> ++      case B2400: strcpy(cspeed,"2400");break;
> ++      case B4800: strcpy(cspeed,"4800");break;
> ++      case B9600: strcpy(cspeed,"9600");break;
> ++      case B19200: strcpy(cspeed,"19200");break;
> ++      case B38400: strcpy(cspeed,"38400");break;
> ++      case B115200:
> +                 {
> +                   if (high_speed == 0) strcpy(cspeed,"115200");
> +                   else strcpy(cspeed,"57600");
> +                   break;
> +                 }
> +-    case B460800: strcpy(cspeed, "460800");break;
> ++      case B460800: strcpy(cspeed, "460800");break;
> ++    }
> ++    bits=stbuf.c_cflag & CSIZE;
> ++    clocal=stbuf.c_cflag & CLOCAL;
> ++    stopbits=stbuf.c_cflag & CSTOPB;
> ++    parity=stbuf.c_cflag & (PARENB | PARODD);
> ++    stbuf.c_iflag &= ~(IGNCR | ICRNL | IUCLC | INPCK | IXON | IXANY | IGNPAR );
> ++    stbuf.c_oflag &= ~(OPOST | OLCUC | OCRNL | ONLCR | ONLRET);
> ++    stbuf.c_lflag &= ~(ICANON | ECHO | ECHOE | ECHONL);
> ++    stbuf.c_lflag &= ~(ECHO | ECHOE);
> ++    stbuf.c_cc[VMIN] = 1;
> ++    stbuf.c_cc[VTIME] = 0;
> ++    stbuf.c_cc[VEOF] = 1;
> +   }
> +-  bits=stbuf.c_cflag & CSIZE;
> +-  clocal=stbuf.c_cflag & CLOCAL;
> +-  stopbits=stbuf.c_cflag & CSTOPB;
> +-  parity=stbuf.c_cflag & (PARENB | PARODD);
> +-  stbuf.c_iflag &= ~(IGNCR | ICRNL | IUCLC | INPCK | IXON | IXANY | IGNPAR );
> +-  stbuf.c_oflag &= ~(OPOST | OLCUC | OCRNL | ONLCR | ONLRET);
> +-  stbuf.c_lflag &= ~(ICANON | ECHO | ECHOE | ECHONL);
> +-  stbuf.c_lflag &= ~(ECHO | ECHOE);
> +-  stbuf.c_cc[VMIN] = 1;
> +-  stbuf.c_cc[VTIME] = 0;
> +-  stbuf.c_cc[VEOF] = 1;
> +   setcom();
> +   dormir(200000); /* Wait a bit (DTR raise) */
> +   sprintf(msg,"Opened %s as FD %d",device,comfd);
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From gianluca at sottospazio.it  Sat Jan 17 02:42:11 2015
From: gianluca at sottospazio.it (Gianluca Anzolin)
Date: Sat, 17 Jan 2015 08:42:11 +0100
Subject: [OpenWrt-Devel] Archer C7, leds and led trigger for ath10k
In-Reply-To: <54BA0408.5000703@openwrt.org>
References: <20150116185726.GA13845@sottospazio.it>
 <54BA0408.5000703@openwrt.org>
Message-ID: <54BA1253.9050208@sottospazio.it>

Il 17/01/2015 07:41, John Crispin ha scritto:
>> There is also a bugreport in the bug tracking system pointing at
>> this issue: https://dev.openwrt.org/ticket/18188
>>
>> I looked at the ath9k implementation and I've come up with the
>> attached patch.
>>
>> Do you think a patch like this is acceptable?
>>
>
>
> it is not

do you care to elaborate? what's wrong with it?

Gianluca
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From braulio at eita.org.br  Sat Jan 17 05:32:09 2015
From: braulio at eita.org.br (=?UTF-8?Q?Br=C3=A1ulio_Bhavamitra?=)
Date: Sat, 17 Jan 2015 07:32:09 -0300
Subject: [OpenWrt-Devel] How to install OpenWrt on Mikrotik SXT Lite 5?
Message-ID: <CAJri6_vcn_v2nijMvMk0UxBivMCUdN4y=y4SOCCBwCAmFtqiLw@mail.gmail.com>

Hello all,

I already use OpenWrt on a Tplink WDR4300, but I'm quite lost on how to
install it on Mikrotik SXT Lite 5. Couldn't find any good wiki entry
explaining how...

Anybody could help?

PS: Still can't join openwrt-users

cheers,
br?ulio

-- 
"Lute pela sua ideologia. Seja um com sua ideologia. Viva pela sua
ideologia. Morra por sua ideologia" P.R. Sarkar

EITA - Educa??o, Informa??o e Tecnologias para Autogest?o
http://cirandas.net/brauliobo
http://eita.org.br

"Paramapurusha ? meu pai e Parama Prakriti ? minha m?e. O universo ? meu
lar e todos n?s somos cidad?os deste cosmo. Este universo ? a imagina??o da
Mente Macroc?smica, e todas as entidades est?o sendo criadas, preservadas e
destru?das nas fases de extrovers?o e introvers?o do fluxo imaginativo
c?smico. No ?mbito pessoal, quando uma pessoa imagina algo em sua mente,
naquele momento, essa pessoa ? a ?nica propriet?ria daquilo que ela
imagina, e ningu?m mais. Quando um ser humano criado mentalmente caminha
por um milharal tamb?m imaginado, a pessoa imaginada n?o ? a propriedade
desse milharal, pois ele pertence ao indiv?duo que o est? imaginando. Este
universo foi criado na imagina??o de Brahma, a Entidade Suprema, por isso
a propriedade deste universo ? de Brahma, e n?o dos microcosmos que tamb?m
foram criados pela imagina??o de Brahma. Nenhuma propriedade deste mundo,
mut?vel ou imut?vel, pertence a um indiv?duo em particular; tudo ? o
patrim?nio comum de todos."
Restante do texto em
http://cirandas.net/brauliobo/blog/a-problematica-de-hoje-em-dia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150117/5d5b9efa/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From cyrus at openwrt.org  Sat Jan 17 06:01:04 2015
From: cyrus at openwrt.org (Steven Barth)
Date: Sat, 17 Jan 2015 12:01:04 +0100
Subject: [OpenWrt-Devel] [PATCH v2 1/3] iproute2: bump version to 3.18.0
In-Reply-To: <1421065992-16733-1-git-send-email-russell@personaltelco.net>
References: <1421065992-16733-1-git-send-email-russell@personaltelco.net>
Message-ID: <54BA40F0.8030106@openwrt.org>

Applied, thanks.
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From blogic at openwrt.org  Sat Jan 17 07:53:55 2015
From: blogic at openwrt.org (John Crispin)
Date: Sat, 17 Jan 2015 13:53:55 +0100
Subject: [OpenWrt-Devel] Archer C7, leds and led trigger for ath10k
In-Reply-To: <54BA1253.9050208@sottospazio.it>
References: <20150116185726.GA13845@sottospazio.it>
 <54BA0408.5000703@openwrt.org> <54BA1253.9050208@sottospazio.it>
Message-ID: <54BA5B63.40209@openwrt.org>



On 17/01/2015 08:42, Gianluca Anzolin wrote:
> Il 17/01/2015 07:41, John Crispin ha scritto:
>>> There is also a bugreport in the bug tracking system pointing at
>>> this issue: https://dev.openwrt.org/ticket/18188
>>>
>>> I looked at the ath9k implementation and I've come up with the
>>> attached patch.
>>>
>>> Do you think a patch like this is acceptable?
>>>
>>
>>
>> it is not
> 
> do you care to elaborate? what's wrong with it?
> 
> Gianluca
> _____________________________

imho fixing target/linux/ar71xx/base-files/etc/uci-defaults/01_leds is
enough nd not driver patch is required



__________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From chunkeey at googlemail.com  Sat Jan 17 08:49:27 2015
From: chunkeey at googlemail.com (Christian Lamparter)
Date: Sat, 17 Jan 2015 14:49:27 +0100
Subject: [OpenWrt-Devel] [PATCH] ramips: add support for Intenso Memory
	2 Move USB 3.0
In-Reply-To: <54BA05B8.6050306@openwrt.org>
References: <2766551.4pBuPnbTJq@debian64> <54BA05B8.6050306@openwrt.org>
Message-ID: <1909546.P0qdEXqkbs@debian64>

On Saturday, January 17, 2015 07:48:24 AM John Crispin wrote:
> On 15/01/2015 22:47, Christian Lamparter wrote:
> > This adds support for a rt5350-based "portable nas" solution
> > from Intenso. The board comes with 32M RAM and 8M Flash, the
> > built-in HDD is connected/accessible via a usb3.0<->sata
> > bridge VLI VL701.

BTW: In the meantime, I was able to find the Chinese distributor
for this product. The devices seem to be sold by "IOVST" and
they call it the "UIS700HD" [0]. 

However, this might not be the hardware vendor. The RT2860.bin in
the rootfs has ApCliSsid set to "Tenda_501500". But I haven't
found anything remotely close on Tenda's product website. 

my question is: should I rename the profile (and the files) to:
UIS700HD then?
I would like to keep the Intenso name, because they provided 
me/us/anyone with at least a (partially very useful)
"GPL source" for their product on their website [1].

> > diff --git a/target/linux/ramips/rt305x/profiles/m2m.mk b/target/linux/ramips/rt305x/profiles/m2m.mk
> > new file mode 100644
> > index 0000000..e5cb6b8
> > --- /dev/null
> > +++ b/target/linux/ramips/rt305x/profiles/m2m.mk
> > @@ -0,0 +1,20 @@
> > +#
> > +# Copyright (C) 2015 OpenWrt.org
> > +#
> > +# This is free software, licensed under the GNU General Public License v2.
> > +# See /LICENSE for more information.
> > +#
> > +
> > +define Profile/M2M
> > +	NAME:=Intenso Memory 2 Move
> > +	PACKAGES:=\
> > +		kmod-ledtrig-netdev kmod-ledtrig-timer kmod-leds-gpio \
> > +		kmod-usb-core kmod-usb2 kmod-usb-storage kmod-scsi-core \
> > +		kmod-fs-ext4 kmod-fs-vfat block-mount
> > +endef
> > +
> 
> not sure about the filesystem selection. what filesystem is on the disc
> when it is shipped ?

The HDD was originally formatted with a single 500GB (size of the HDD) 
vfat[FAT32] partition. The original firmware supports vfat, exfat (via
fuse), ntfs (via tuxera tntfs module) and ext2 (ext2 is used exclusively
for updating the device firmware. It might be only available for the
ramdisk uimage?! see notes about upfs [2]).

The rootfs has a few traces of additional support [i.e.: they are
listed in scripts or have installed fstools] for hfsplus and xfs.
But as far as I can tell, they won't work.
 
BTW: I would like to generate a ramdisk image by default too 
(I was thinking of adding FEATURES+=ramdisk). The reason is
that this would make flashing the device easier (load the
ramdisk image via tftp and then use sysupgrade with the
squashfs-sysupgrade image).

However, this would of course cause all other rt305x devices
to build the ramdisk too! [which is probably not ideal. So, 
is there another way?]. 

Regards,
Christian

[0] <http://www.iovst.com/product/article-41.html>
[1] <http://www.intenso.de/downloads.php?kategorie=29&&produkt=1357297608>
[2] <http://hckohwnotes.blogspot.de/2014/05/debian-on-intenso-memory-2-move-intenso.html>
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From blogic at openwrt.org  Sat Jan 17 08:55:47 2015
From: blogic at openwrt.org (John Crispin)
Date: Sat, 17 Jan 2015 14:55:47 +0100
Subject: [OpenWrt-Devel] [PATCH] ramips: revert failsafe switch
 workaround for RT5350 introduced in r42179.
In-Reply-To: <owrt-patches-20141225-4@vittgam.net>
References: <owrt-patches-20141225-4@vittgam.net>
Message-ID: <54BA69E3.7090906@openwrt.org>



On 25/12/2014 02:29, Vittorio G (VittGam) wrote:
> It is not needed anymore as TCP packets get passed correctly now
> even when VLAN is disabled.
> 

are you sure this is the case for all rt3x5x, rt5350 and mt7628 units ?


> This piece of code also broke routers where the LAN port is not
> wired to port 0 of the internal switch.
> 
> Signed-off-by: Vittorio Gambaletta <openwrt at vittgam.net>
> 
> diff --git
> a/target/linux/ramips/base-files/lib/preinit/07_set_preinit_iface_ramips
> b/target/linux/ramips/base-files/lib/preinit/07_set_preinit_iface_ramips
>
> 
index cae6396..386b527 100644
> ---
> a/target/linux/ramips/base-files/lib/preinit/07_set_preinit_iface_ramips
>
> 
+++ b/target/linux/ramips/base-files/lib/preinit/07_set_preinit_iface_ramips
> @@ -11,24 +11,7 @@ ramips_set_preinit_iface() { swconfig dev rt305x
> set reset 1 fi
> 
> -	if echo $RT3X5X | egrep -q "(RT5350|MT7628)"; then -		# This is a
> dirty hack to get by while the switch -		# problem is investigated.
> When VLAN is disabled, ICMP -		# pings work as expected, but TCP
> connections time -		# out, so telnetting in failsafe is impossible.
> The -		# likely reason is TCP checksumming hardware getting -		#
> disabled: -		#
> https://www.mail-archive.com/openwrt-devel at lists.openwrt.org/msg19870.html
>
> 
-		swconfig dev rt305x set enable_vlan 1
> -		swconfig dev rt305x vlan 1 set ports "0 6" -		swconfig dev
> rt305x port 6 set untag 0 -		swconfig dev rt305x set apply 1 -
> vconfig add eth0 1 -		ifconfig eth0 up -		ifname=eth0.1 -	else -
> ifname=eth0 -	fi +	ifname=eth0 }
> 
> boot_hook_add preinit_main ramips_set_preinit_iface 
> _______________________________________________ openwrt-devel
> mailing list openwrt-devel at lists.openwrt.org 
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From blogic at openwrt.org  Sat Jan 17 09:09:24 2015
From: blogic at openwrt.org (John Crispin)
Date: Sat, 17 Jan 2015 15:09:24 +0100
Subject: [OpenWrt-Devel] [PATCH] ramips: add support for Intenso Memory
 2 Move USB 3.0
In-Reply-To: <1909546.P0qdEXqkbs@debian64>
References: <2766551.4pBuPnbTJq@debian64> <54BA05B8.6050306@openwrt.org>
 <1909546.P0qdEXqkbs@debian64>
Message-ID: <54BA6D14.5030206@openwrt.org>



On 17/01/2015 14:49, Christian Lamparter wrote:
> On Saturday, January 17, 2015 07:48:24 AM John Crispin wrote:
>> On 15/01/2015 22:47, Christian Lamparter wrote:
>>> This adds support for a rt5350-based "portable nas" solution
>>> from Intenso. The board comes with 32M RAM and 8M Flash, the
>>> built-in HDD is connected/accessible via a usb3.0<->sata
>>> bridge VLI VL701.
> 
> BTW: In the meantime, I was able to find the Chinese distributor
> for this product. The devices seem to be sold by "IOVST" and
> they call it the "UIS700HD" [0]. 
> 
> However, this might not be the hardware vendor. The RT2860.bin in
> the rootfs has ApCliSsid set to "Tenda_501500". But I haven't
> found anything remotely close on Tenda's product website. 
> 
> my question is: should I rename the profile (and the files) to:
> UIS700HD then?
> I would like to keep the Intenso name, because they provided 
> me/us/anyone with at least a (partially very useful)
> "GPL source" for their product on their website [1].

feel free to leave it as intenso, just make sure to add a wiki page and
list the alternative SKUs there.


> 
> The HDD was originally formatted with a single 500GB (size of the HDD) 
> vfat[FAT32] partition. The original firmware supports vfat, exfat (via
> fuse), ntfs (via tuxera tntfs module) and ext2 (ext2 is used exclusively
> for updating the device firmware. It might be only available for the
> ramdisk uimage?! see notes about upfs [2]).
> 
> The rootfs has a few traces of additional support [i.e.: they are
> listed in scripts or have installed fstools] for hfsplus and xfs.
> But as far as I can tell, they won't work.
>  
> BTW: I would like to generate a ramdisk image by default too 
> (I was thinking of adding FEATURES+=ramdisk). The reason is
> that this would make flashing the device easier (load the
> ramdisk image via tftp and then use sysupgrade with the
> squashfs-sysupgrade image).
> 

feel free to send a patch.

applied your patch as r44001








> However, this would of course cause all other rt305x devices
> to build the ramdisk too! [which is probably not ideal. So, 
> is there another way?]. 
> 
> Regards,
> Christian
> 
> [0] <http://www.iovst.com/product/article-41.html>
> [1] <http://www.intenso.de/downloads.php?kategorie=29&&produkt=1357297608>
> [2] <http://hckohwnotes.blogspot.de/2014/05/debian-on-intenso-memory-2-move-intenso.html>
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From blogic at openwrt.org  Sat Jan 17 09:26:48 2015
From: blogic at openwrt.org (John Crispin)
Date: Sat, 17 Jan 2015 15:26:48 +0100
Subject: [OpenWrt-Devel] [PATCH 0/6] ar8216: patch series for
	AR8327/AR8337
In-Reply-To: <54B41D8C.1090201@gmail.com>
References: <54B41D8C.1090201@gmail.com>
Message-ID: <54BA7128.2070408@openwrt.org>



On 12/01/2015 20:16, Heiner Kallweit wrote:
> Patches 1-3 are improvements w/o functional change.

merged 1-3

4-6 will need a bit more time and a closer look




> 
> Patches 4 allows to control EEE PHY sleep mode per port via swconfig.
> Motivation is that as workaround for issues with certain link partners
> EEE was disabled in general.
> Still the default is to initially disable EEE on all ports, however the
> brave now have the option to enable EEE on selected ports.
> 
> Patch 5 displays autonegotiated EEE capabilities as part of the get_link
> attribute. Note that enabling/disabling PHY EEE sleep mode is independent
> of autonegotiated EEE capabilities. Even if PHY EEE sleep mode is disabled
> the switch advertises EEE capabilities to the link partner.
> This might still allow the link partner to sleep if network is inactive.
> 
> Patch 6 displays autonegotiated rx/tx flow control as part of the get_link
> attribute. So far this was the case in forced mode only.
> 
> Heiner Kallweit (6):
>   ar8216: define all switch_addr structs as const
>   ar8216: replace ar8xxx_rmw with ar8xxx_reg_set where appropriate
>   ar8216: introduce ar8xxx_reg_clear complementing ar8xxx_reg_set
>   ar8216: introduce enable_eee swconfig attribute to control 802.3az EEE per port
>   ar8216: add 802.3az EEE info to swconfig get_link attribute
>   ar8216: display flow control info in swconfig get_link in case of autonegatiation too
> 
>  .../linux/generic/files/drivers/net/phy/ar8216.c   |  60 ++++---
>  .../linux/generic/files/drivers/net/phy/ar8216.h   |  18 +++
>  .../linux/generic/files/drivers/net/phy/ar8327.c   | 175 ++++++++++++++++++---
>  .../linux/generic/files/drivers/net/phy/ar8327.h   |   5 +
>  .../linux/generic/files/drivers/net/phy/swconfig.c |   4 +-
>  target/linux/generic/files/include/linux/switch.h  |   2 +
>  6 files changed, 216 insertions(+), 48 deletions(-)
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From gianluca at sottospazio.it  Sat Jan 17 13:19:43 2015
From: gianluca at sottospazio.it (Gianluca Anzolin)
Date: Sat, 17 Jan 2015 19:19:43 +0100
Subject: [OpenWrt-Devel] Archer C7, leds and led trigger for ath10k
In-Reply-To: <54BA5B63.40209@openwrt.org>
References: <20150116185726.GA13845@sottospazio.it>
 <54BA0408.5000703@openwrt.org> <54BA1253.9050208@sottospazio.it>
 <54BA5B63.40209@openwrt.org>
Message-ID: <54BAA7BF.1060004@sottospazio.it>

Il 17/01/2015 13:53, John Crispin ha scritto:
>
> On 17/01/2015 08:42, Gianluca Anzolin wrote:
>> Il 17/01/2015 07:41, John Crispin ha scritto:
>>>> There is also a bugreport in the bug tracking system pointing at
>>>> this issue: https://dev.openwrt.org/ticket/18188
>>>>
>>>> I looked at the ath9k implementation and I've come up with the
>>>> attached patch.
>>>>
>>>> Do you think a patch like this is acceptable?
>>>>
>>>
>>> it is not
>> do you care to elaborate? what's wrong with it?
>>
>> Gianluca
>> _____________________________
> imho fixing target/linux/ar71xx/base-files/etc/uci-defaults/01_leds is
> enough nd not driver patch is required
>
I don't get it, how do you create a throughput trigger by changing a script?

Gianluca
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From blogic at openwrt.org  Sat Jan 17 13:27:28 2015
From: blogic at openwrt.org (John Crispin)
Date: Sat, 17 Jan 2015 19:27:28 +0100
Subject: [OpenWrt-Devel] Archer C7, leds and led trigger for ath10k
In-Reply-To: <54BAA7BF.1060004@sottospazio.it>
References: <20150116185726.GA13845@sottospazio.it>
 <54BA0408.5000703@openwrt.org> <54BA1253.9050208@sottospazio.it>
 <54BA5B63.40209@openwrt.org> <54BAA7BF.1060004@sottospazio.it>
Message-ID: <54BAA990.9060102@openwrt.org>



On 17/01/2015 19:19, Gianluca Anzolin wrote:
> Il 17/01/2015 13:53, John Crispin ha scritto:
>> 
>> On 17/01/2015 08:42, Gianluca Anzolin wrote:
>>> Il 17/01/2015 07:41, John Crispin ha scritto:
>>>>> There is also a bugreport in the bug tracking system
>>>>> pointing at this issue:
>>>>> https://dev.openwrt.org/ticket/18188
>>>>> 
>>>>> I looked at the ath9k implementation and I've come up with
>>>>> the attached patch.
>>>>> 
>>>>> Do you think a patch like this is acceptable?
>>>>> 
>>>> 
>>>> it is not
>>> do you care to elaborate? what's wrong with it?
>>> 
>>> Gianluca _____________________________
>> imho fixing
>> target/linux/ar71xx/base-files/etc/uci-defaults/01_leds is enough
>> nd not driver patch is required
>> 
> I don't get it, how do you create a throughput trigger by changing
> a script?


ok, i misread your patch. the first half says the leds are swapped so
i pointed you at the code that sets up the leds. i will talk to felix
about the patch



> 
> Gianluca _______________________________________________ 
> openwrt-devel mailing list openwrt-devel at lists.openwrt.org 
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From braulio at eita.org.br  Sat Jan 17 13:28:55 2015
From: braulio at eita.org.br (=?UTF-8?Q?Br=C3=A1ulio_Bhavamitra?=)
Date: Sat, 17 Jan 2015 15:28:55 -0300
Subject: [OpenWrt-Devel] How to install OpenWrt on Mikrotik SXT Lite 5?
In-Reply-To: <CAJri6_vcn_v2nijMvMk0UxBivMCUdN4y=y4SOCCBwCAmFtqiLw@mail.gmail.com>
References: <CAJri6_vcn_v2nijMvMk0UxBivMCUdN4y=y4SOCCBwCAmFtqiLw@mail.gmail.com>
Message-ID: <CAJri6_udcBxbhtNx7kejOS4Qy9y_SPcHpfEg64OCQKNfrAr4nQ@mail.gmail.com>

Done! Tutorial at
http://cirandas.net/brauliobo/blog/install-openwrt-on-mikrotik-sxt-lite-5

2015-01-17 7:32 GMT-03:00 Br?ulio Bhavamitra <braulio at eita.org.br>:

> Hello all,
>
> I already use OpenWrt on a Tplink WDR4300, but I'm quite lost on how to
> install it on Mikrotik SXT Lite 5. Couldn't find any good wiki entry
> explaining how...
>
> Anybody could help?
>
> PS: Still can't join openwrt-users
>
> cheers,
> br?ulio
>
> --
> "Lute pela sua ideologia. Seja um com sua ideologia. Viva pela sua
> ideologia. Morra por sua ideologia" P.R. Sarkar
>
> EITA - Educa??o, Informa??o e Tecnologias para Autogest?o
> http://cirandas.net/brauliobo
> http://eita.org.br
>
> "Paramapurusha ? meu pai e Parama Prakriti ? minha m?e. O universo ? meu
> lar e todos n?s somos cidad?os deste cosmo. Este universo ? a imagina??o da
> Mente Macroc?smica, e todas as entidades est?o sendo criadas, preservadas e
> destru?das nas fases de extrovers?o e introvers?o do fluxo imaginativo
> c?smico. No ?mbito pessoal, quando uma pessoa imagina algo em sua mente,
> naquele momento, essa pessoa ? a ?nica propriet?ria daquilo que ela
> imagina, e ningu?m mais. Quando um ser humano criado mentalmente caminha
> por um milharal tamb?m imaginado, a pessoa imaginada n?o ? a propriedade
> desse milharal, pois ele pertence ao indiv?duo que o est? imaginando. Este
> universo foi criado na imagina??o de Brahma, a Entidade Suprema, por isso
> a propriedade deste universo ? de Brahma, e n?o dos microcosmos que tamb?m
> foram criados pela imagina??o de Brahma. Nenhuma propriedade deste mundo,
> mut?vel ou imut?vel, pertence a um indiv?duo em particular; tudo ? o
> patrim?nio comum de todos."
> Restante do texto em
> http://cirandas.net/brauliobo/blog/a-problematica-de-hoje-em-dia
>



-- 
"Lute pela sua ideologia. Seja um com sua ideologia. Viva pela sua
ideologia. Morra por sua ideologia" P.R. Sarkar

EITA - Educa??o, Informa??o e Tecnologias para Autogest?o
http://cirandas.net/brauliobo
http://eita.org.br

"Paramapurusha ? meu pai e Parama Prakriti ? minha m?e. O universo ? meu
lar e todos n?s somos cidad?os deste cosmo. Este universo ? a imagina??o da
Mente Macroc?smica, e todas as entidades est?o sendo criadas, preservadas e
destru?das nas fases de extrovers?o e introvers?o do fluxo imaginativo
c?smico. No ?mbito pessoal, quando uma pessoa imagina algo em sua mente,
naquele momento, essa pessoa ? a ?nica propriet?ria daquilo que ela
imagina, e ningu?m mais. Quando um ser humano criado mentalmente caminha
por um milharal tamb?m imaginado, a pessoa imaginada n?o ? a propriedade
desse milharal, pois ele pertence ao indiv?duo que o est? imaginando. Este
universo foi criado na imagina??o de Brahma, a Entidade Suprema, por isso
a propriedade deste universo ? de Brahma, e n?o dos microcosmos que tamb?m
foram criados pela imagina??o de Brahma. Nenhuma propriedade deste mundo,
mut?vel ou imut?vel, pertence a um indiv?duo em particular; tudo ? o
patrim?nio comum de todos."
Restante do texto em
http://cirandas.net/brauliobo/blog/a-problematica-de-hoje-em-dia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150117/a0c4f5cd/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From chunkeey at googlemail.com  Sat Jan 17 15:58:03 2015
From: chunkeey at googlemail.com (Christian Lamparter)
Date: Sat, 17 Jan 2015 21:58:03 +0100
Subject: [OpenWrt-Devel] [PATCH] ramips: add support for Intenso Memory
	2 Move USB 3.0
In-Reply-To: <54BA6D14.5030206@openwrt.org>
References: <2766551.4pBuPnbTJq@debian64> <1909546.P0qdEXqkbs@debian64>
 <54BA6D14.5030206@openwrt.org>
Message-ID: <5979405.NXElZKdAQm@debian64>

On Saturday, January 17, 2015 03:09:24 PM John Crispin wrote:
> 
> On 17/01/2015 14:49, Christian Lamparter wrote:
> > On Saturday, January 17, 2015 07:48:24 AM John Crispin wrote:
> >> On 15/01/2015 22:47, Christian Lamparter wrote:
> > my question is: should I rename the profile (and the files) to:
> > UIS700HD then?
> > I would like to keep the Intenso name, because they provided 
> > me/us/anyone with at least a (partially very useful)
> > "GPL source" for their product on their website [1].
> 
> feel free to leave it as intenso, just make sure to add a wiki page and
> list the alternative SKUs there.
Thanks. I've started with the wiki page [0].
 
> >  
> > BTW: I would like to generate a ramdisk image by default too 
> > (I was thinking of adding FEATURES+=ramdisk). The reason is
> > that this would make flashing the device easier (load the
> > ramdisk image via tftp and then use sysupgrade with the
> > squashfs-sysupgrade image).
> > 
> 
> feel free to send a patch.
> 
> applied your patch as r44001
Thanks, I'll do that. Since this is a portable unit, I'm still looking for
a way to get access to the battery level. The "fuel gauge" sensor might be
connected via the i2c, but it might be also just the "EC" microcontroller
who has access to it.

Also, do you know of any "power-saving" features of the RT5350-SoC?
The original firmware enables several features like:
  * "SDR precharge powersave"
     - write 0x00000001 into 0x1000031c (SDR_PWR_SAVE_CNT)
     - set bit 28 in 0x10000304 (SDRAM Configuration 1)

  * "DDR self auto refresh"
     - write 0x00000001 into 0x1000031c (SDR_PWR_SAVE_CNT)
     - set bit 4 in 0x10000318

  * "CPU autofrequency"
     - write 0x001f0112 into 0x10000044 (CPU_CLK_AUTO_CFG)
     - write 0x03040101 into 0x1000003c (CPU_SYS_CLKCFG)
     - write 0x00035f41 into 0x10000040 (CLK_LUT_CFG)
     - write 0x80035f41 into 0x10000040 (CLK_LUT_CFG)
  
Which sounds very interesting [although, the biggest power
guzzlers are the HDD and wifi]. However, the settings to
enable the dynamic CPU frequency scaling doesn't really match
up with the RT5350 I know. For example the CPU_AUTO_CLK_EN 
Setting is controlled by bit 31 in 0x10000044. But it isn't 
enabled?! Do you know of any other manufactures who need to
enable powersaving features as well (and are doing a better
job at it)? 

Regards,
Christian

[0] <http://wiki.openwrt.org/toh/intenso/m2m>
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From openwrt at vittgam.net  Sat Jan 17 16:57:26 2015
From: openwrt at vittgam.net (Vittorio G (VittGam))
Date: Sat, 17 Jan 2015 22:57:26 +0100
Subject: [OpenWrt-Devel] [PATCH] ramips: revert failsafe switch
 workaround for RT5350 introduced in r42179.
In-Reply-To: <54BA69E3.7090906@openwrt.org>
References: <owrt-patches-20141225-4@vittgam.net>
 <54BA69E3.7090906@openwrt.org>
Message-ID: <5748fe072ef7ce1e3d292da061cc7805@vittgam.net>

Hi,

Il 17.01.2015 14:55 John Crispin ha scritto:
> On 25/12/2014 02:29, Vittorio G (VittGam) wrote:
>> It is not needed anymore as TCP packets get passed correctly now
>> even when VLAN is disabled.
>>
>
> are you sure this is the case for all rt3x5x, rt5350 and mt7628 units ?

I've tested it on my RT5350-based router. With a previous OpenWrt revision (r42649 if I remember well) it wasn't working, since it was zeroing a TCP field as seen from the tcpdump verbose output. I don't remember the tcpdump details correctly, sorry. But now with recent revisions it's working fine.

If you're not sure about this for rt3x5x and mt7628, it should at least get modified to "0 1 2 3 4 5 6" to avoid soft-bricking routers where the only Ethernet port exposed is not 0 (4 for the HT-TM02 for instance).

Cheers,
Vittorio
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From leitec at staticky.com  Sat Jan 17 17:48:20 2015
From: leitec at staticky.com (Claudio Leite)
Date: Sat, 17 Jan 2015 17:48:20 -0500
Subject: [OpenWrt-Devel] [PATCH] build: allow changing kernel name in new
	image code
In-Reply-To: <y>
References: <y>
Message-ID: <1421534900-20485-1-git-send-email-leitec@staticky.com>

Necessary for targets using zImage or other kernel
image types.

Signed-off-by: Claudio Leite <leitec at staticky.com>
---
 include/image.mk |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/image.mk b/include/image.mk
index eddf605..e0f12e0 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -341,6 +341,7 @@ define Device/Init
   KERNEL_INITRAMFS_PREFIX = $$(IMAGE_PREFIX)-initramfs
   KERNEL_INITRAMFS_IMAGE = $$(KERNEL_INITRAMFS_PREFIX)$$(KERNEL_SUFFIX)
   KERNEL_INSTALL :=
+  KERNEL_NAME := vmlinux
   KERNEL_SIZE :=
 
   FILESYSTEMS := $(TARGET_FILESYSTEMS)
@@ -362,7 +363,7 @@ define Device/Build/initramfs
   $(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/$$(KERNEL_INITRAMFS_IMAGE)
 	cp $$^ $$@
 
-  $(KDIR)/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/vmlinux-initramfs
+  $(KDIR)/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/$$(KERNEL_NAME)-initramfs
 	@rm -f $$@
 	$$(call concat_cmd,$$(KERNEL_INITRAMFS))
 endef
@@ -378,7 +379,7 @@ define Device/Build/kernel
   $$(_TARGET): $$(if $$(KERNEL_INSTALL),$(BIN_DIR)/$$(KERNEL_IMAGE))
   $(BIN_DIR)/$$(KERNEL_IMAGE): $(KDIR)/$$(KERNEL_IMAGE)
 	cp $$^ $$@
-  $(KDIR)/$$(KERNEL_IMAGE): $(KDIR)/vmlinux
+  $(KDIR)/$$(KERNEL_IMAGE): $(KDIR)/$$(KERNEL_NAME)
 	@rm -f $$@
 	$$(call concat_cmd,$$(KERNEL))
 	$$(if $$(KERNEL_SIZE),$$(call Device/Build/check_size,$$(KERNEL_SIZE)))
-- 
1.7.10.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From nbd at openwrt.org  Sat Jan 17 19:37:32 2015
From: nbd at openwrt.org (Felix Fietkau)
Date: Sun, 18 Jan 2015 01:37:32 +0100
Subject: [OpenWrt-Devel] [PATCH] build: allow changing kernel name in
 new image code
In-Reply-To: <1421534900-20485-1-git-send-email-leitec@staticky.com>
References: <y> <1421534900-20485-1-git-send-email-leitec@staticky.com>
Message-ID: <54BB004C.3000806@openwrt.org>

On 2015-01-17 23:48, Claudio Leite wrote:
> Necessary for targets using zImage or other kernel
> image types.
> 
> Signed-off-by: Claudio Leite <leitec at staticky.com>
Committed in r44018, thanks.

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


From daniel at makrotopia.org  Sat Jan 17 19:39:02 2015
From: daniel at makrotopia.org (Daniel Golle)
Date: Sun, 18 Jan 2015 01:39:02 +0100
Subject: [OpenWrt-Devel] [PATCH] uboot-sunxi: bump to 2015.01 release
Message-ID: <20150118003804.GA24434@makrotopia.org>

Apart from being a bit huge,
001-u-boot-trunk-3e1ded1fff32d8af8cc5eec22c56797621ea6649.patch
doesn't apply cleanly systems supporting symbolic links.

File arch/x86/dts/chromebook_link.dts is not a regular file -- refusing to patch
1 out of 1 hunk ignored -- saving rejects to file arch/x86/dts/chromebook_link.dts.rej

Version 2015.01 was released in the meantime, thus bump and remove the patch.

Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 package/boot/uboot-sunxi/Makefile                  |     6 +-
 ...-3e1ded1fff32d8af8cc5eec22c56797621ea6649.patch | 25006 -------------------
 2 files changed, 4 insertions(+), 25008 deletions(-)
 delete mode 100644 package/boot/uboot-sunxi/patches/001-u-boot-trunk-3e1ded1fff32d8af8cc5eec22c56797621ea6649.patch

diff --git a/package/boot/uboot-sunxi/Makefile b/package/boot/uboot-sunxi/Makefile
index eb66cab..b0716ed 100644
--- a/package/boot/uboot-sunxi/Makefile
+++ b/package/boot/uboot-sunxi/Makefile
@@ -8,12 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=u-boot
-PKG_VERSION:=2015.01-rc3
+PKG_VERSION:=2015.01
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:= \
 	http://mirror2.openwrt.org/sources \
 	ftp://ftp.denx.de/pub/u-boot
-PKG_SOURCE_VERSION:=e680848838ca20a60d43b66a218d865b
+
+PKG_MD5SUM:=7f08dc9e98a71652bd6968888ed6ec95
+
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 
 PKG_LICENSE:=GPL-2.0 GPL-2.0+
diff --git a/package/boot/uboot-sunxi/patches/001-u-boot-trunk-3e1ded1fff32d8af8cc5eec22c56797621ea6649.patch b/package/boot/uboot-sunxi/patches/001-u-boot-trunk-3e1ded1fff32d8af8cc5eec22c56797621ea6649.patch
deleted file mode 100644
index fc99523..0000000
--- a/package/boot/uboot-sunxi/patches/001-u-boot-trunk-3e1ded1fff32d8af8cc5eec22c56797621ea6649.patch
+++ /dev/null
@@ -1,25006 +0,0 @@
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/bcm281xx/clk-bcm281xx.c u-boot/arch/arm/cpu/armv7/bcm281xx/clk-bcm281xx.c
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/bcm281xx/clk-bcm281xx.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/bcm281xx/clk-bcm281xx.c	2015-01-01 17:34:32.005507318 +0100
-@@ -209,6 +209,10 @@
- 	.gate		= SW_ONLY_GATE(0x0360, 20, 4),
- };
- 
-+static struct bus_clk_data usb_otg_ahb_data = {
-+	.gate		= HW_SW_GATE_AUTO(0x0348, 16, 0, 1),
-+};
-+
- static struct bus_clk_data sdio1_ahb_data = {
- 	.gate		= HW_SW_GATE_AUTO(0x0358, 16, 0, 1),
- };
-@@ -331,6 +335,17 @@
-  */
- 
- /* KPM bus clocks */
-+static struct bus_clock usb_otg_ahb_clk = {
-+	.clk = {
-+		.name = "usb_otg_ahb_clk",
-+		.parent = &kpm_ccu_clk.clk,
-+		.ops = &bus_clk_ops,
-+		.ccu_clk_mgr_base = KONA_MST_CLK_BASE_ADDR,
-+	},
-+	.freq_tbl = master_ahb_freq_tbl,
-+	.data = &usb_otg_ahb_data,
-+};
-+
- static struct bus_clock sdio1_ahb_clk = {
- 	.clk = {
- 		.name = "sdio1_ahb_clk",
-@@ -541,6 +556,7 @@
- 	CLK_LK(bsc2),
- 	CLK_LK(bsc3),
- 	/* Bus clocks */
-+	CLK_LK(usb_otg_ahb),
- 	CLK_LK(sdio1_ahb),
- 	CLK_LK(sdio2_ahb),
- 	CLK_LK(sdio3_ahb),
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/bcm281xx/clk-usb-otg.c u-boot/arch/arm/cpu/armv7/bcm281xx/clk-usb-otg.c
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/bcm281xx/clk-usb-otg.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/bcm281xx/clk-usb-otg.c	2015-01-01 17:34:32.005507318 +0100
-@@ -0,0 +1,27 @@
-+/*
-+ * Copyright 2014 Broadcom Corporation.
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <asm/errno.h>
-+#include <asm/arch/sysmap.h>
-+#include "clk-core.h"
-+
-+/* Enable appropriate clocks for the USB OTG port */
-+int clk_usb_otg_enable(void *base)
-+{
-+	char *ahbstr;
-+
-+	switch ((u32) base) {
-+	case HSOTG_BASE_ADDR:
-+		ahbstr = "usb_otg_ahb_clk";
-+		break;
-+	default:
-+		printf("%s: base 0x%p not found\n", __func__, base);
-+		return -EINVAL;
-+	}
-+
-+	return clk_get_and_enable(ahbstr);
-+}
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/bcm281xx/Makefile u-boot/arch/arm/cpu/armv7/bcm281xx/Makefile
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/bcm281xx/Makefile	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/bcm281xx/Makefile	2015-01-01 17:34:32.005507318 +0100
-@@ -10,3 +10,4 @@
- obj-y	+= clk-sdio.o
- obj-y	+= clk-bsc.o
- obj-$(CONFIG_BCM_SF2_ETH) += clk-eth.o
-+obj-y	+= clk-usb-otg.o
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/kona-common/clk-stubs.c u-boot/arch/arm/cpu/armv7/kona-common/clk-stubs.c
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/kona-common/clk-stubs.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/kona-common/clk-stubs.c	2015-01-01 17:34:32.009507252 +0100
-@@ -19,3 +19,8 @@
- {
- 	return 0;
- }
-+
-+int __weak clk_usb_otg_enable(void *base)
-+{
-+	return 0;
-+}
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/ls102xa/cpu.c u-boot/arch/arm/cpu/armv7/ls102xa/cpu.c
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/ls102xa/cpu.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/ls102xa/cpu.c	2015-01-01 17:34:32.009507252 +0100
-@@ -12,6 +12,8 @@
- #include <netdev.h>
- #include <fsl_esdhc.h>
- 
-+#include "fsl_epu.h"
-+
- DECLARE_GLOBAL_DATA_PTR;
- 
- #if defined(CONFIG_DISPLAY_CPUINFO)
-@@ -101,3 +103,35 @@
- 
- 	return 0;
- }
-+
-+int arch_cpu_init(void)
-+{
-+	void *epu_base = (void *)(CONFIG_SYS_DCSRBAR + EPU_BLOCK_OFFSET);
-+
-+	/*
-+	 * After wakeup from deep sleep, Clear EPU registers
-+	 * as early as possible to prevent from possible issue.
-+	 * It's also safe to clear at normal boot.
-+	 */
-+	fsl_epu_clean(epu_base);
-+
-+	return 0;
-+}
-+
-+#if defined(CONFIG_ARMV7_NONSEC) || defined(CONFIG_ARMV7_VIRT)
-+/* Set the address at which the secondary core starts from.*/
-+void smp_set_core_boot_addr(unsigned long addr, int corenr)
-+{
-+	struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
-+
-+	out_be32(&gur->scratchrw[0], addr);
-+}
-+
-+/* Release the secondary core from holdoff state and kick it */
-+void smp_kick_all_cpus(void)
-+{
-+	struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
-+
-+	out_be32(&gur->brrl, 0x2);
-+}
-+#endif
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/ls102xa/fdt.c u-boot/arch/arm/cpu/armv7/ls102xa/fdt.c
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/ls102xa/fdt.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/ls102xa/fdt.c	2015-01-01 17:34:32.009507252 +0100
-@@ -91,7 +91,7 @@
- 	}
- 
- 	do_fixup_by_prop_u32(blob, "device_type", "soc",
--			     4, "bus-frequency", busclk / 2, 1);
-+			     4, "bus-frequency", busclk, 1);
- 
- 	ft_fixup_enet_phy_connect_type(blob);
- 
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/ls102xa/fsl_epu.c u-boot/arch/arm/cpu/armv7/ls102xa/fsl_epu.c
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/ls102xa/fsl_epu.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/ls102xa/fsl_epu.c	2015-01-01 17:34:32.009507252 +0100
-@@ -0,0 +1,57 @@
-+/*
-+ * Copyright 2014 Freescale Semiconductor, Inc.
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <asm/io.h>
-+
-+#include "fsl_epu.h"
-+
-+/**
-+ * fsl_epu_clean - Clear EPU registers
-+ */
-+void fsl_epu_clean(void *epu_base)
-+{
-+	u32 offset;
-+
-+	/* follow the exact sequence to clear the registers */
-+	/* Clear EPACRn */
-+	for (offset = EPACR0; offset <= EPACR15; offset += EPACR_STRIDE)
-+		out_be32(epu_base + offset, 0);
-+
-+	/* Clear EPEVTCRn */
-+	for (offset = EPEVTCR0; offset <= EPEVTCR9; offset += EPEVTCR_STRIDE)
-+		out_be32(epu_base + offset, 0);
-+
-+	/* Clear EPGCR */
-+	out_be32(epu_base + EPGCR, 0);
-+
-+	/* Clear EPSMCRn */
-+	for (offset = EPSMCR0; offset <= EPSMCR15; offset += EPSMCR_STRIDE)
-+		out_be32(epu_base + offset, 0);
-+
-+	/* Clear EPCCRn */
-+	for (offset = EPCCR0; offset <= EPCCR31; offset += EPCCR_STRIDE)
-+		out_be32(epu_base + offset, 0);
-+
-+	/* Clear EPCMPRn */
-+	for (offset = EPCMPR0; offset <= EPCMPR31; offset += EPCMPR_STRIDE)
-+		out_be32(epu_base + offset, 0);
-+
-+	/* Clear EPCTRn */
-+	for (offset = EPCTR0; offset <= EPCTR31; offset += EPCTR_STRIDE)
-+		out_be32(epu_base + offset, 0);
-+
-+	/* Clear EPIMCRn */
-+	for (offset = EPIMCR0; offset <= EPIMCR31; offset += EPIMCR_STRIDE)
-+		out_be32(epu_base + offset, 0);
-+
-+	/* Clear EPXTRIGCRn */
-+	out_be32(epu_base + EPXTRIGCR, 0);
-+
-+	/* Clear EPECRn */
-+	for (offset = EPECR0; offset <= EPECR15; offset += EPECR_STRIDE)
-+		out_be32(epu_base + offset, 0);
-+}
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/ls102xa/fsl_epu.h u-boot/arch/arm/cpu/armv7/ls102xa/fsl_epu.h
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/ls102xa/fsl_epu.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/ls102xa/fsl_epu.h	2015-01-01 17:34:32.009507252 +0100
-@@ -0,0 +1,68 @@
-+/*
-+ * Copyright 2014 Freescale Semiconductor, Inc.
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#ifndef __FSL_EPU_H
-+#define __FSL_EPU_H
-+
-+#include <asm/types.h>
-+
-+#define FSL_STRIDE_4B	4
-+#define FSL_STRIDE_8B	8
-+
-+/* Block offsets */
-+#define EPU_BLOCK_OFFSET	0x00000000
-+
-+/* EPGCR (Event Processor Global Control Register) */
-+#define EPGCR		0x000
-+
-+/* EPEVTCR0-9 (Event Processor EVT Pin Control Registers) */
-+#define EPEVTCR0	0x050
-+#define EPEVTCR9	0x074
-+#define EPEVTCR_STRIDE	FSL_STRIDE_4B
-+
-+/* EPXTRIGCR (Event Processor Crosstrigger Control Register) */
-+#define EPXTRIGCR	0x090
-+
-+/* EPIMCR0-31 (Event Processor Input Mux Control Registers) */
-+#define EPIMCR0		0x100
-+#define EPIMCR31	0x17C
-+#define EPIMCR_STRIDE	FSL_STRIDE_4B
-+
-+/* EPSMCR0-15 (Event Processor SCU Mux Control Registers) */
-+#define EPSMCR0		0x200
-+#define EPSMCR15	0x278
-+#define EPSMCR_STRIDE	FSL_STRIDE_8B
-+
-+/* EPECR0-15 (Event Processor Event Control Registers) */
-+#define EPECR0		0x300
-+#define EPECR15		0x33C
-+#define EPECR_STRIDE	FSL_STRIDE_4B
-+
-+/* EPACR0-15 (Event Processor Action Control Registers) */
-+#define EPACR0		0x400
-+#define EPACR15		0x43C
-+#define EPACR_STRIDE	FSL_STRIDE_4B
-+
-+/* EPCCRi0-15 (Event Processor Counter Control Registers) */
-+#define EPCCR0		0x800
-+#define EPCCR15		0x83C
-+#define EPCCR31		0x87C
-+#define EPCCR_STRIDE	FSL_STRIDE_4B
-+
-+/* EPCMPR0-15 (Event Processor Counter Compare Registers) */
-+#define EPCMPR0		0x900
-+#define EPCMPR15	0x93C
-+#define EPCMPR31	0x97C
-+#define EPCMPR_STRIDE	FSL_STRIDE_4B
-+
-+/* EPCTR0-31 (Event Processor Counter Register) */
-+#define EPCTR0		0xA00
-+#define EPCTR31		0xA7C
-+#define EPCTR_STRIDE	FSL_STRIDE_4B
-+
-+void fsl_epu_clean(void *epu_base);
-+
-+#endif
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/ls102xa/Makefile u-boot/arch/arm/cpu/armv7/ls102xa/Makefile
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/ls102xa/Makefile	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/ls102xa/Makefile	2015-01-01 17:34:32.009507252 +0100
-@@ -7,6 +7,8 @@
- obj-y	+= cpu.o
- obj-y	+= clock.o
- obj-y	+= timer.o
-+obj-y	+= fsl_epu.o
- 
- obj-$(CONFIG_OF_LIBFDT) += fdt.o
- obj-$(CONFIG_SYS_HAS_SERDES) += fsl_ls1_serdes.o ls102xa_serdes.o
-+obj-$(CONFIG_SPL) += spl.o
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/ls102xa/spl.c u-boot/arch/arm/cpu/armv7/ls102xa/spl.c
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/ls102xa/spl.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/ls102xa/spl.c	2015-01-01 17:34:32.009507252 +0100
-@@ -0,0 +1,33 @@
-+/*
-+ * Copyright 2014 Freescale Semiconductor, Inc.
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <spl.h>
-+
-+u32 spl_boot_device(void)
-+{
-+#ifdef CONFIG_SPL_MMC_SUPPORT
-+	return BOOT_DEVICE_MMC1;
-+#endif
-+	return BOOT_DEVICE_NAND;
-+}
-+
-+u32 spl_boot_mode(void)
-+{
-+	switch (spl_boot_device()) {
-+	case BOOT_DEVICE_MMC1:
-+#ifdef CONFIG_SPL_FAT_SUPPORT
-+		return MMCSD_MODE_FAT;
-+#else
-+		return MMCSD_MODE_RAW;
-+#endif
-+	case BOOT_DEVICE_NAND:
-+		return 0;
-+	default:
-+		puts("spl: error: unsupported device\n");
-+		hang();
-+	}
-+}
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/Makefile u-boot/arch/arm/cpu/armv7/Makefile
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/Makefile	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/Makefile	2015-01-01 17:34:32.001507383 +0100
-@@ -56,6 +56,7 @@
- obj-$(CONFIG_RMOBILE) += rmobile/
- obj-$(CONFIG_ARCH_S5PC1XX) += s5pc1xx/
- obj-$(CONFIG_SOCFPGA) += socfpga/
-+obj-$(if $(filter stv0991,$(SOC)),y) += stv0991/
- obj-$(CONFIG_ARCH_SUNXI) += sunxi/
- obj-$(CONFIG_TEGRA20) += tegra20/
- obj-$(CONFIG_U8500) += u8500/
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/mx6/clock.c u-boot/arch/arm/cpu/armv7/mx6/clock.c
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/mx6/clock.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/mx6/clock.c	2015-01-01 17:34:32.009507252 +0100
-@@ -443,7 +443,7 @@
- 	struct anatop_regs __iomem *anatop =
- 		(struct anatop_regs __iomem *)ANATOP_BASE_ADDR;
- 
--	if (freq < ENET_25MHz || freq > ENET_125MHz)
-+	if (freq < ENET_25MHZ || freq > ENET_125MHZ)
- 		return -EINVAL;
- 
- 	reg = readl(&anatop->pll_enet);
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/nonsec_virt.S u-boot/arch/arm/cpu/armv7/nonsec_virt.S
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/nonsec_virt.S	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/nonsec_virt.S	2015-01-01 17:34:32.013507186 +0100
-@@ -169,11 +169,11 @@
-  * we do this here instead.
-  * But first check if we have the generic timer.
-  */
--#ifdef CONFIG_SYS_CLK_FREQ
-+#ifdef CONFIG_TIMER_CLK_FREQ
- 	mrc	p15, 0, r0, c0, c1, 1		@ read ID_PFR1
- 	and	r0, r0, #CPUID_ARM_GENTIMER_MASK	@ mask arch timer bits
- 	cmp	r0, #(1 << CPUID_ARM_GENTIMER_SHIFT)
--	ldreq	r1, =CONFIG_SYS_CLK_FREQ
-+	ldreq	r1, =CONFIG_TIMER_CLK_FREQ
- 	mcreq	p15, 0, r1, c14, c0, 0		@ write CNTFRQ
- #endif
- 
-@@ -191,6 +191,9 @@
- 	wfi
- 	ldr	r1, =CONFIG_SMP_PEN_ADDR	@ load start address
- 	ldr	r1, [r1]
-+#ifdef CONFIG_PEN_ADDR_BIG_ENDIAN
-+	rev	r1, r1
-+#endif
- 	cmp	r0, r1			@ make sure we dont execute this code
- 	beq	smp_waitloop		@ again (due to a spurious wakeup)
- 	mov	r0, r1
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/socfpga/freeze_controller.c u-boot/arch/arm/cpu/armv7/socfpga/freeze_controller.c
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/socfpga/freeze_controller.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/socfpga/freeze_controller.c	2015-01-01 17:34:32.021507054 +0100
-@@ -38,8 +38,7 @@
- 	/* Freeze channel 0 to 2 */
- 	for (channel_id = 0; channel_id <= 2; channel_id++) {
- 		ioctrl_reg_offset = (u32)(
--			&freeze_controller_base->vioctrl +
--			(channel_id << SYSMGR_FRZCTRL_VIOCTRL_SHIFT));
-+			&freeze_controller_base->vioctrl + channel_id);
- 
- 		/*
- 		 * Assert active low enrnsl, plniotri
-@@ -120,8 +119,7 @@
- 	/* Thaw channel 0 to 2 */
- 	for (channel_id = 0; channel_id <= 2; channel_id++) {
- 		ioctrl_reg_offset
--			= (u32)(&freeze_controller_base->vioctrl
--				+ (channel_id << SYSMGR_FRZCTRL_VIOCTRL_SHIFT));
-+			= (u32)(&freeze_controller_base->vioctrl + channel_id);
- 
- 		/*
- 		 * Assert active low bhniotri signal and
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/socfpga/reset_manager.c u-boot/arch/arm/cpu/armv7/socfpga/reset_manager.c
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/socfpga/reset_manager.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/socfpga/reset_manager.c	2015-01-01 17:34:32.021507054 +0100
-@@ -110,6 +110,6 @@
- {
- 	const void *reset = &reset_manager_base->per_mod_reset;
- 
--	clrbits_le32(reset, 1 << RSTMGR_PERMODRST_SPIM0_LSB);
--	clrbits_le32(reset, 1 << RSTMGR_PERMODRST_SPIM1_LSB);
-+	clrbits_le32(reset, (1 << RSTMGR_PERMODRST_SPIM0_LSB) |
-+		     (1 << RSTMGR_PERMODRST_SPIM1_LSB));
- }
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/stv0991/clock.c u-boot/arch/arm/cpu/armv7/stv0991/clock.c
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/stv0991/clock.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/stv0991/clock.c	2015-01-01 17:34:32.025506990 +0100
-@@ -0,0 +1,41 @@
-+/*
-+ * (C) Copyright 2014
-+ * Vikas Manocha, ST Micoelectronics, vikas.manocha at st.com.
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <asm/io.h>
-+#include <asm/arch/hardware.h>
-+#include <asm/arch/stv0991_cgu.h>
-+#include<asm/arch/stv0991_periph.h>
-+
-+static struct stv0991_cgu_regs *const stv0991_cgu_regs = \
-+				(struct stv0991_cgu_regs *) (CGU_BASE_ADDR);
-+
-+void enable_pll1(void)
-+{
-+	/* pll1 already configured for 1000Mhz, just need to enable it */
-+	writel(readl(&stv0991_cgu_regs->pll1_ctrl) & ~(0x01),
-+			&stv0991_cgu_regs->pll1_ctrl);
-+}
-+
-+void clock_setup(int peripheral)
-+{
-+	switch (peripheral) {
-+	case UART_CLOCK_CFG:
-+		writel(UART_CLK_CFG, &stv0991_cgu_regs->uart_freq);
-+		break;
-+	case ETH_CLOCK_CFG:
-+		enable_pll1();
-+		writel(ETH_CLK_CFG, &stv0991_cgu_regs->eth_freq);
-+
-+		/* Clock selection for ethernet tx_clk & rx_clk*/
-+		writel((readl(&stv0991_cgu_regs->eth_ctrl) & ETH_CLK_MASK)
-+				| ETH_CLK_CTRL, &stv0991_cgu_regs->eth_ctrl);
-+
-+		break;
-+	default:
-+		break;
-+	}
-+}
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/stv0991/lowlevel.S u-boot/arch/arm/cpu/armv7/stv0991/lowlevel.S
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/stv0991/lowlevel.S	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/stv0991/lowlevel.S	2015-01-01 17:34:32.025506990 +0100
-@@ -0,0 +1,12 @@
-+/*
-+ * (C) Copyright 2014 stmicroelectronics
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <config.h>
-+#include <linux/linkage.h>
-+
-+ENTRY(lowlevel_init)
-+	mov	pc, lr
-+ENDPROC(lowlevel_init)
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/stv0991/Makefile u-boot/arch/arm/cpu/armv7/stv0991/Makefile
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/stv0991/Makefile	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/stv0991/Makefile	2015-01-01 17:34:32.025506990 +0100
-@@ -0,0 +1,9 @@
-+#
-+# (C) Copyright 2014
-+# Vikas Manocha, ST Microelectronics, vikas.manocha at stcom
-+#
-+# SPDX-License-Identifier:	GPL-2.0+
-+#
-+
-+obj-y	:= timer.o clock.o pinmux.o reset.o
-+obj-y	+= lowlevel.o
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/stv0991/pinmux.c u-boot/arch/arm/cpu/armv7/stv0991/pinmux.c
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/stv0991/pinmux.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/stv0991/pinmux.c	2015-01-01 17:34:32.025506990 +0100
-@@ -0,0 +1,62 @@
-+/*
-+ * (C) Copyright 2014
-+ * Vikas Manocha, ST Micoelectronics, vikas.manocha at st.com.
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <asm/io.h>
-+#include <asm/arch/stv0991_creg.h>
-+#include <asm/arch/stv0991_periph.h>
-+#include <asm/arch/hardware.h>
-+
-+static struct stv0991_creg *const stv0991_creg = \
-+			(struct stv0991_creg *)CREG_BASE_ADDR;
-+
-+int stv0991_pinmux_config(int peripheral)
-+{
-+	switch (peripheral) {
-+	case UART_GPIOC_30_31:
-+		/* SSDA/SSCL pad muxing to UART Rx/Dx */
-+		writel((readl(&stv0991_creg->mux12) & GPIOC_31_MUX_MASK) |
-+				CFG_GPIOC_31_UART_RX,
-+				&stv0991_creg->mux12);
-+		writel((readl(&stv0991_creg->mux12) & GPIOC_30_MUX_MASK) |
-+				CFG_GPIOC_30_UART_TX,
-+				&stv0991_creg->mux12);
-+		/* SSDA/SSCL pad config to push pull*/
-+		writel((readl(&stv0991_creg->cfg_pad6) & GPIOC_31_MODE_MASK) |
-+				CFG_GPIOC_31_MODE_PP,
-+				&stv0991_creg->cfg_pad6);
-+		writel((readl(&stv0991_creg->cfg_pad6) & GPIOC_30_MODE_MASK) |
-+				CFG_GPIOC_30_MODE_HIGH,
-+				&stv0991_creg->cfg_pad6);
-+		break;
-+	case UART_GPIOB_16_17:
-+		/* ethernet rx_6/7 to UART Rx/Dx */
-+		writel((readl(&stv0991_creg->mux7) & GPIOB_17_MUX_MASK) |
-+				CFG_GPIOB_17_UART_RX,
-+				&stv0991_creg->mux7);
-+		writel((readl(&stv0991_creg->mux7) & GPIOB_16_MUX_MASK) |
-+				CFG_GPIOB_16_UART_TX,
-+				&stv0991_creg->mux7);
-+		break;
-+	case ETH_GPIOB_10_31_C_0_4:
-+		writel(readl(&stv0991_creg->mux6) & 0x000000FF,
-+				&stv0991_creg->mux6);
-+		writel(0x00000000, &stv0991_creg->mux7);
-+		writel(0x00000000, &stv0991_creg->mux8);
-+		writel(readl(&stv0991_creg->mux9) & 0xFFF00000,
-+				&stv0991_creg->mux9);
-+		/* Ethernet Voltage configuration to 1.8V*/
-+		writel((readl(&stv0991_creg->vdd_pad1) & VDD_ETH_PS_MASK) |
-+				ETH_VDD_CFG, &stv0991_creg->vdd_pad1);
-+		writel((readl(&stv0991_creg->vdd_pad1) & VDD_ETH_PS_MASK) |
-+				ETH_M_VDD_CFG, &stv0991_creg->vdd_pad1);
-+
-+		break;
-+	default:
-+		break;
-+	}
-+	return 0;
-+}
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/stv0991/reset.c u-boot/arch/arm/cpu/armv7/stv0991/reset.c
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/stv0991/reset.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/stv0991/reset.c	2015-01-01 17:34:32.025506990 +0100
-@@ -0,0 +1,26 @@
-+/*
-+ * (C) Copyright 2014
-+ * Vikas Manocha, ST Micoelectronics, vikas.manocha at st.com.
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <asm/io.h>
-+#include <asm/arch/stv0991_wdru.h>
-+void reset_cpu(ulong ignored)
-+{
-+	puts("System is going to reboot ...\n");
-+	/*
-+	 * This 1 second delay will allow the above message
-+	 * to be printed before reset
-+	 */
-+	udelay((1000 * 1000));
-+
-+	/* Setting bit 1 of the WDRU unit will reset the SoC */
-+	writel(WDRU_RST_SYS, &stv0991_wd_ru_ptr->wdru_ctrl1);
-+
-+	/* system will restart */
-+	while (1)
-+		;
-+}
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/stv0991/timer.c u-boot/arch/arm/cpu/armv7/stv0991/timer.c
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/stv0991/timer.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/stv0991/timer.c	2015-01-01 17:34:32.025506990 +0100
-@@ -0,0 +1,114 @@
-+/*
-+ * (C) Copyright 2014
-+ * Vikas Manocha, ST Micoelectronics, vikas.manocha at st.com.
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <asm/io.h>
-+#include <asm/arch-stv0991/hardware.h>
-+#include <asm/arch-stv0991/stv0991_cgu.h>
-+#include <asm/arch-stv0991/stv0991_gpt.h>
-+
-+static struct stv0991_cgu_regs *const stv0991_cgu_regs = \
-+				(struct stv0991_cgu_regs *) (CGU_BASE_ADDR);
-+
-+#define READ_TIMER()	(readl(&gpt1_regs_ptr->cnt) & GPT_FREE_RUNNING)
-+#define GPT_RESOLUTION	(CONFIG_STV0991_HZ_CLOCK / CONFIG_STV0991_HZ)
-+
-+DECLARE_GLOBAL_DATA_PTR;
-+
-+#define timestamp gd->arch.tbl
-+#define lastdec gd->arch.lastinc
-+
-+int timer_init(void)
-+{
-+	/* Timer1 clock configuration */
-+	writel(TIMER1_CLK_CFG, &stv0991_cgu_regs->tim_freq);
-+	writel(readl(&stv0991_cgu_regs->cgu_enable_2) |
-+			TIMER1_CLK_EN, &stv0991_cgu_regs->cgu_enable_2);
-+
-+	/* Stop the timer */
-+	writel(readl(&gpt1_regs_ptr->cr1) & ~GPT_CR1_CEN, &gpt1_regs_ptr->cr1);
-+	writel(GPT_PRESCALER_128, &gpt1_regs_ptr->psc);
-+	/* Configure timer for auto-reload */
-+	writel(readl(&gpt1_regs_ptr->cr1) | GPT_MODE_AUTO_RELOAD,
-+			&gpt1_regs_ptr->cr1);
-+
-+	/* load value for free running */
-+	writel(GPT_FREE_RUNNING, &gpt1_regs_ptr->arr);
-+
-+	/* start timer */
-+	writel(readl(&gpt1_regs_ptr->cr1) | GPT_CR1_CEN,
-+			&gpt1_regs_ptr->cr1);
-+
-+	/* Reset the timer */
-+	lastdec = READ_TIMER();
-+	timestamp = 0;
-+
-+	return 0;
-+}
-+
-+/*
-+ * timer without interrupts
-+ */
-+ulong get_timer(ulong base)
-+{
-+	return (get_timer_masked() / GPT_RESOLUTION) - base;
-+}
-+
-+void __udelay(unsigned long usec)
-+{
-+	ulong tmo;
-+	ulong start = get_timer_masked();
-+	ulong tenudelcnt = CONFIG_STV0991_HZ_CLOCK / (1000 * 100);
-+	ulong rndoff;
-+
-+	rndoff = (usec % 10) ? 1 : 0;
-+
-+	/* tenudelcnt timer tick gives 10 microsecconds delay */
-+	tmo = ((usec / 10) + rndoff) * tenudelcnt;
-+
-+	while ((ulong) (get_timer_masked() - start) < tmo)
-+		;
-+}
-+
-+ulong get_timer_masked(void)
-+{
-+	ulong now = READ_TIMER();
-+
-+	if (now >= lastdec) {
-+		/* normal mode */
-+		timestamp += now - lastdec;
-+	} else {
-+		/* we have an overflow ... */
-+		timestamp += now + GPT_FREE_RUNNING - lastdec;
-+	}
-+	lastdec = now;
-+
-+	return timestamp;
-+}
-+
-+void udelay_masked(unsigned long usec)
-+{
-+	return udelay(usec);
-+}
-+
-+/*
-+ * This function is derived from PowerPC code (read timebase as long long).
-+ * On ARM it just returns the timer value.
-+ */
-+unsigned long long get_ticks(void)
-+{
-+	return get_timer(0);
-+}
-+
-+/*
-+ * This function is derived from PowerPC code (timebase clock frequency).
-+ * On ARM it returns the number of timer ticks per second.
-+ */
-+ulong get_tbclk(void)
-+{
-+	return CONFIG_STV0991_HZ;
-+}
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/tegra124/Kconfig u-boot/arch/arm/cpu/armv7/tegra124/Kconfig
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/tegra124/Kconfig	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/tegra124/Kconfig	2015-01-01 17:34:32.025506990 +0100
-@@ -6,6 +6,15 @@
- config TARGET_JETSON_TK1
- 	bool "NVIDIA Tegra124 Jetson TK1 board"
- 
-+config TARGET_NYAN_BIG
-+	bool "Google/NVIDIA Nyan-big Chrombook"
-+	help
-+	  Nyan Big is a Tegra124 clamshell board that is very similar
-+	  to venice2, but it has a different panel, the sdcard CD and WP
-+	  sense are flipped, and it has a different revision of the AS3722
-+	  PMIC. The retail name is the Acer Chromebook 13 CB5-311-T7NN
-+	  (13.3-inch HD, NVIDIA Tegra K1, 2GB).
-+
- config TARGET_VENICE2
- 	bool "NVIDIA Tegra124 Venice2"
- 
-@@ -15,6 +24,7 @@
- 	default "tegra124"
- 
- source "board/nvidia/jetson-tk1/Kconfig"
-+source "board/nvidia/nyan-big/Kconfig"
- source "board/nvidia/venice2/Kconfig"
- 
- endif
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/uniphier/init_page_table.c u-boot/arch/arm/cpu/armv7/uniphier/init_page_table.c
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/uniphier/init_page_table.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/uniphier/init_page_table.c	2015-01-01 17:34:32.029506924 +0100
-@@ -17,11 +17,7 @@
- #define REG	DEVICE	/* IO Register: Device */
- #define DDR	DEVICE	/* DDR SDRAM: Device */
- 
--#ifdef CONFIG_SPL_BUILD
- #define IS_SPL_TEXT_AREA(x)	((x) == ((CONFIG_SPL_TEXT_BASE) >> 20))
--#else
--#define IS_SPL_TEXT_AREA(x)	((x) == ((CONFIG_SYS_TEXT_BASE) >> 20))
--#endif
- 
- #define IS_INIT_STACK_AREA(x)	((x) == ((CONFIG_SYS_INIT_SP_ADDR) >> 20))
- 
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/armv7/vf610/generic.c u-boot/arch/arm/cpu/armv7/vf610/generic.c
---- u-boot-2015.01-rc3/arch/arm/cpu/armv7/vf610/generic.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/cpu/armv7/vf610/generic.c	2015-01-01 17:34:32.029506924 +0100
-@@ -265,20 +265,21 @@
- 
- 	cause = readl(&src_regs->srsr);
- 	writel(cause, &src_regs->srsr);
--	cause &= 0xff;
- 
--	switch (cause) {
--	case 0x08:
--		return "WDOG";
--	case 0x20:
-+	if (cause & SRC_SRSR_POR_RST)
-+		return "POWER ON RESET";
-+	else if (cause & SRC_SRSR_WDOG_A5)
-+		return "WDOG A5";
-+	else if (cause & SRC_SRSR_WDOG_M4)
-+		return "WDOG M4";
-+	else if (cause & SRC_SRSR_JTAG_RST)
- 		return "JTAG HIGH-Z";
--	case 0x80:
-+	else if (cause & SRC_SRSR_SW_RST)
-+		return "SW RESET";
-+	else if (cause & SRC_SRSR_RESETB)
- 		return "EXTERNAL RESET";
--	case 0xfd:
--		return "POR";
--	default:
-+	else
- 		return "unknown reset";
--	}
- }
- 
- int print_cpuinfo(void)
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/tegra20-common/pmu.c u-boot/arch/arm/cpu/tegra20-common/pmu.c
---- u-boot-2015.01-rc3/arch/arm/cpu/tegra20-common/pmu.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/cpu/tegra20-common/pmu.c	2015-01-01 17:34:32.037506793 +0100
-@@ -6,6 +6,7 @@
-  */
- 
- #include <common.h>
-+#include <i2c.h>
- #include <tps6586x.h>
- #include <asm/io.h>
- #include <asm/arch/tegra.h>
-@@ -23,9 +24,13 @@
- #define VDD_TRANSITION_STEP	0x06	/* 150mv */
- #define VDD_TRANSITION_RATE	0x06	/* 3.52mv/us */
- 
-+#define PMI_I2C_ADDRESS	0x34	/* chip requires this address */
-+
- int pmu_set_nominal(void)
- {
--	int core, cpu, bus;
-+	struct udevice *bus, *dev;
-+	int core, cpu;
-+	int ret;
- 
- 	/* by default, the table has been filled with T25 settings */
- 	switch (tegra_get_chip_sku()) {
-@@ -42,12 +47,18 @@
- 		return -1;
- 	}
- 
--	bus = tegra_i2c_get_dvc_bus_num();
--	if (bus == -1) {
-+	ret = tegra_i2c_get_dvc_bus(&bus);
-+	if (ret) {
- 		debug("%s: Cannot find DVC I2C bus\n", __func__);
--		return -1;
-+		return ret;
- 	}
--	tps6586x_init(bus);
-+	ret = i2c_get_chip(bus, PMI_I2C_ADDRESS, &dev);
-+	if (ret) {
-+		debug("%s: Cannot find DVC I2C chip\n", __func__);
-+		return ret;
-+	}
-+
-+	tps6586x_init(dev);
- 	tps6586x_set_pwm_mode(TPS6586X_PWM_SM1);
- 	return tps6586x_adjust_sm0_sm1(core, cpu, VDD_TRANSITION_STEP,
- 				VDD_TRANSITION_RATE, VDD_RELATION);
-diff -ruN u-boot-2015.01-rc3/arch/arm/cpu/u-boot-spl.lds u-boot/arch/arm/cpu/u-boot-spl.lds
---- u-boot-2015.01-rc3/arch/arm/cpu/u-boot-spl.lds	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/cpu/u-boot-spl.lds	2015-01-01 17:34:32.037506793 +0100
-@@ -32,6 +32,9 @@
- 	}
- 
- 	. = ALIGN(4);
-+	.u_boot_list : {
-+		KEEP(*(SORT(.u_boot_list*_i2c_*)));
-+	}
- 
- 	. = .;
- #ifdef CONFIG_SPL_DM
-diff -ruN u-boot-2015.01-rc3/arch/arm/dts/cros-ec-keyboard.dtsi u-boot/arch/arm/dts/cros-ec-keyboard.dtsi
---- u-boot-2015.01-rc3/arch/arm/dts/cros-ec-keyboard.dtsi	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/dts/cros-ec-keyboard.dtsi	2015-01-01 17:34:32.037506793 +0100
-@@ -0,0 +1,105 @@
-+/*
-+ * Keyboard dts fragment for devices that use cros-ec-keyboard
-+ *
-+ * Copyright (c) 2014 Google, Inc
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation.
-+*/
-+
-+#include <dt-bindings/input/input.h>
-+
-+&cros_ec {
-+	keyboard-controller {
-+		compatible = "google,cros-ec-keyb";
-+		keypad,num-rows = <8>;
-+		keypad,num-columns = <13>;
-+		google,needs-ghost-filter;
-+
-+		linux,keymap = <
-+			MATRIX_KEY(0x00, 0x01, KEY_LEFTMETA)
-+			MATRIX_KEY(0x00, 0x02, KEY_F1)
-+			MATRIX_KEY(0x00, 0x03, KEY_B)
-+			MATRIX_KEY(0x00, 0x04, KEY_F10)
-+			MATRIX_KEY(0x00, 0x06, KEY_N)
-+			MATRIX_KEY(0x00, 0x08, KEY_EQUAL)
-+			MATRIX_KEY(0x00, 0x0a, KEY_RIGHTALT)
-+
-+			MATRIX_KEY(0x01, 0x01, KEY_ESC)
-+			MATRIX_KEY(0x01, 0x02, KEY_F4)
-+			MATRIX_KEY(0x01, 0x03, KEY_G)
-+			MATRIX_KEY(0x01, 0x04, KEY_F7)
-+			MATRIX_KEY(0x01, 0x06, KEY_H)
-+			MATRIX_KEY(0x01, 0x08, KEY_APOSTROPHE)
-+			MATRIX_KEY(0x01, 0x09, KEY_F9)
-+			MATRIX_KEY(0x01, 0x0b, KEY_BACKSPACE)
-+
-+			MATRIX_KEY(0x02, 0x00, KEY_LEFTCTRL)
-+			MATRIX_KEY(0x02, 0x01, KEY_TAB)
-+			MATRIX_KEY(0x02, 0x02, KEY_F3)
-+			MATRIX_KEY(0x02, 0x03, KEY_T)
-+			MATRIX_KEY(0x02, 0x04, KEY_F6)
-+			MATRIX_KEY(0x02, 0x05, KEY_RIGHTBRACE)
-+			MATRIX_KEY(0x02, 0x06, KEY_Y)
-+			MATRIX_KEY(0x02, 0x07, KEY_102ND)
-+			MATRIX_KEY(0x02, 0x08, KEY_LEFTBRACE)
-+			MATRIX_KEY(0x02, 0x09, KEY_F8)
-+
-+			MATRIX_KEY(0x03, 0x01, KEY_GRAVE)
-+			MATRIX_KEY(0x03, 0x02, KEY_F2)
-+			MATRIX_KEY(0x03, 0x03, KEY_5)
-+			MATRIX_KEY(0x03, 0x04, KEY_F5)
-+			MATRIX_KEY(0x03, 0x06, KEY_6)
-+			MATRIX_KEY(0x03, 0x08, KEY_MINUS)
-+			MATRIX_KEY(0x03, 0x0b, KEY_BACKSLASH)
-+
-+			MATRIX_KEY(0x04, 0x00, KEY_RIGHTCTRL)
-+			MATRIX_KEY(0x04, 0x01, KEY_A)
-+			MATRIX_KEY(0x04, 0x02, KEY_D)
-+			MATRIX_KEY(0x04, 0x03, KEY_F)
-+			MATRIX_KEY(0x04, 0x04, KEY_S)
-+			MATRIX_KEY(0x04, 0x05, KEY_K)
-+			MATRIX_KEY(0x04, 0x06, KEY_J)
-+			MATRIX_KEY(0x04, 0x08, KEY_SEMICOLON)
-+			MATRIX_KEY(0x04, 0x09, KEY_L)
-+			MATRIX_KEY(0x04, 0x0a, KEY_BACKSLASH)
-+			MATRIX_KEY(0x04, 0x0b, KEY_ENTER)
-+
-+			MATRIX_KEY(0x05, 0x01, KEY_Z)
-+			MATRIX_KEY(0x05, 0x02, KEY_C)
-+			MATRIX_KEY(0x05, 0x03, KEY_V)
-+			MATRIX_KEY(0x05, 0x04, KEY_X)
-+			MATRIX_KEY(0x05, 0x05, KEY_COMMA)
-+			MATRIX_KEY(0x05, 0x06, KEY_M)
-+			MATRIX_KEY(0x05, 0x07, KEY_LEFTSHIFT)
-+			MATRIX_KEY(0x05, 0x08, KEY_SLASH)
-+			MATRIX_KEY(0x05, 0x09, KEY_DOT)
-+			MATRIX_KEY(0x05, 0x0b, KEY_SPACE)
-+
-+			MATRIX_KEY(0x06, 0x01, KEY_1)
-+			MATRIX_KEY(0x06, 0x02, KEY_3)
-+			MATRIX_KEY(0x06, 0x03, KEY_4)
-+			MATRIX_KEY(0x06, 0x04, KEY_2)
-+			MATRIX_KEY(0x06, 0x05, KEY_8)
-+			MATRIX_KEY(0x06, 0x06, KEY_7)
-+			MATRIX_KEY(0x06, 0x08, KEY_0)
-+			MATRIX_KEY(0x06, 0x09, KEY_9)
-+			MATRIX_KEY(0x06, 0x0a, KEY_LEFTALT)
-+			MATRIX_KEY(0x06, 0x0b, KEY_DOWN)
-+			MATRIX_KEY(0x06, 0x0c, KEY_RIGHT)
-+
-+			MATRIX_KEY(0x07, 0x01, KEY_Q)
-+			MATRIX_KEY(0x07, 0x02, KEY_E)
-+			MATRIX_KEY(0x07, 0x03, KEY_R)
-+			MATRIX_KEY(0x07, 0x04, KEY_W)
-+			MATRIX_KEY(0x07, 0x05, KEY_I)
-+			MATRIX_KEY(0x07, 0x06, KEY_U)
-+			MATRIX_KEY(0x07, 0x07, KEY_RIGHTSHIFT)
-+			MATRIX_KEY(0x07, 0x08, KEY_P)
-+			MATRIX_KEY(0x07, 0x09, KEY_O)
-+			MATRIX_KEY(0x07, 0x0b, KEY_UP)
-+			MATRIX_KEY(0x07, 0x0c, KEY_LEFT)
-+		>;
-+	};
-+};
-diff -ruN u-boot-2015.01-rc3/arch/arm/dts/include/dt-bindings/pinctrl/pinctrl-tegra.h u-boot/arch/arm/dts/include/dt-bindings/pinctrl/pinctrl-tegra.h
-diff -ruN u-boot-2015.01-rc3/arch/arm/dts/include/dt-bindings/reset/altr,rst-mgr.h u-boot/arch/arm/dts/include/dt-bindings/reset/altr,rst-mgr.h
-diff -ruN u-boot-2015.01-rc3/arch/arm/dts/Makefile u-boot/arch/arm/dts/Makefile
---- u-boot-2015.01-rc3/arch/arm/dts/Makefile	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/dts/Makefile	2015-01-01 17:34:32.037506793 +0100
-@@ -31,6 +31,7 @@
- 	tegra30-tec-ng.dtb \
- 	tegra114-dalmore.dtb \
- 	tegra124-jetson-tk1.dtb \
-+	tegra124-nyan-big.dtb \
- 	tegra124-venice2.dtb
- dtb-$(CONFIG_ARCH_UNIPHIER) += \
- 	uniphier-ph1-sld3-ref.dtb \
-diff -ruN u-boot-2015.01-rc3/arch/arm/dts/socfpga_cyclone5.dtsi u-boot/arch/arm/dts/socfpga_cyclone5.dtsi
---- u-boot-2015.01-rc3/arch/arm/dts/socfpga_cyclone5.dtsi	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/dts/socfpga_cyclone5.dtsi	2015-01-01 17:34:32.041506727 +0100
-@@ -1,18 +1,7 @@
- /*
-  *  Copyright (C) 2012 Altera Corporation <www.altera.com>
-  *
-- * This program is free software; you can redistribute it and/or modify
-- * it under the terms of the GNU General Public License as published by
-- * the Free Software Foundation; either version 2 of the License, or
-- * (at your option) any later version.
-- *
-- * This program is distributed in the hope that it will be useful,
-- * but WITHOUT ANY WARRANTY; without even the implied warranty of
-- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- * GNU General Public License for more details.
-- *
-- * You should have received a copy of the GNU General Public License
-- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
-+ * SPDX-License-Identifier:	GPL-2.0+
-  */
- 
- /dts-v1/;
-diff -ruN u-boot-2015.01-rc3/arch/arm/dts/socfpga_cyclone5_socrates.dts u-boot/arch/arm/dts/socfpga_cyclone5_socrates.dts
---- u-boot-2015.01-rc3/arch/arm/dts/socfpga_cyclone5_socrates.dts	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/dts/socfpga_cyclone5_socrates.dts	2015-01-01 17:34:32.041506727 +0100
-@@ -1,18 +1,7 @@
- /*
-  *  Copyright (C) 2014 Steffen Trumtrar <s.trumtrar at pengutronix.de>
-  *
-- * This program is free software; you can redistribute it and/or modify
-- * it under the terms of the GNU General Public License as published by
-- * the Free Software Foundation; either version 2 of the License, or
-- * (at your option) any later version.
-- *
-- * This program is distributed in the hope that it will be useful,
-- * but WITHOUT ANY WARRANTY; without even the implied warranty of
-- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- * GNU General Public License for more details.
-- *
-- * You should have received a copy of the GNU General Public License
-- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
-+ * SPDX-License-Identifier:	GPL-2.0+
-  */
- 
- #include "socfpga_cyclone5.dtsi"
-@@ -25,6 +14,12 @@
- 		bootargs = "console=ttyS0,115200";
- 	};
- 
-+ 	aliases {
-+		spi0 = "/spi at ff705000";		/* QSPI */
-+		spi1 = "/spi at fff00000";
-+		spi2 = "/spi at fff01000";
-+ 	};
-+
- 	memory {
- 		name = "memory";
- 		device_type = "memory";
-@@ -48,3 +43,23 @@
- &mmc {
- 	status = "okay";
- };
-+
-+&qspi {
-+	status = "okay";
-+
-+	flash0: n25q00 at 0 {
-+		#address-cells = <1>;
-+		#size-cells = <1>;
-+		compatible = "n25q00";
-+		reg = <0>;      /* chip select */
-+		spi-max-frequency = <50000000>;
-+		m25p,fast-read;
-+		page-size = <256>;
-+		block-size = <16>; /* 2^16, 64KB */
-+		read-delay = <4>;  /* delay value in read data capture register */
-+		tshsl-ns = <50>;
-+		tsd2d-ns = <50>;
-+		tchsh-ns = <4>;
-+		tslch-ns = <4>;
-+	};
-+};
-diff -ruN u-boot-2015.01-rc3/arch/arm/dts/socfpga.dtsi u-boot/arch/arm/dts/socfpga.dtsi
---- u-boot-2015.01-rc3/arch/arm/dts/socfpga.dtsi	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/dts/socfpga.dtsi	2015-01-01 17:34:32.041506727 +0100
-@@ -1,18 +1,7 @@
- /*
-  *  Copyright (C) 2012 Altera <www.altera.com>
-  *
-- * This program is free software; you can redistribute it and/or modify
-- * it under the terms of the GNU General Public License as published by
-- * the Free Software Foundation; either version 2 of the License, or
-- * (at your option) any later version.
-- *
-- * This program is distributed in the hope that it will be useful,
-- * but WITHOUT ANY WARRANTY; without even the implied warranty of
-- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- * GNU General Public License for more details.
-- *
-- * You should have received a copy of the GNU General Public License
-- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
-+ * SPDX-License-Identifier:	GPL-2.0+
-  */
- 
- #include "skeleton.dtsi"
-@@ -639,6 +628,49 @@
- 			clock-names = "biu", "ciu";
- 		};
- 
-+		qspi: spi at ff705000 {
-+			compatible = "cadence,qspi";
-+			#address-cells = <1>;
-+			#size-cells = <0>;
-+			reg = <0xff705000 0x1000>,
-+				<0xffa00000 0x1000>;
-+			interrupts = <0 151 4>;
-+			clocks = <&qspi_clk>;
-+			ext-decoder = <0>;  /* external decoder */
-+			num-chipselect = <4>;
-+			fifo-depth = <128>;
-+			bus-num = <2>;
-+			status = "disabled";
-+		};
-+
-+		spi0: spi at fff00000 {
-+			compatible = "snps,dw-spi-mmio";
-+			#address-cells = <1>;
-+			#size-cells = <0>;
-+			reg = <0xfff00000 0x1000>;
-+			interrupts = <0 154 4>;
-+			num-chipselect = <4>;
-+			bus-num = <0>;
-+			tx-dma-channel = <&pdma 16>;
-+			rx-dma-channel = <&pdma 17>;
-+			clocks = <&per_base_clk>;
-+			status = "disabled";
-+		};
-+
-+		spi1: spi at fff01000 {
-+			compatible = "snps,dw-spi-mmio";
-+			#address-cells = <1>;
-+			#size-cells = <0>;
-+			reg = <0xfff01000 0x1000>;
-+			interrupts = <0 156 4>;
-+			num-chipselect = <4>;
-+			bus-num = <1>;
-+			tx-dma-channel = <&pdma 20>;
-+			rx-dma-channel = <&pdma 21>;
-+			clocks = <&per_base_clk>;
-+			status = "disabled";
-+		};
-+
- 		/* Local timer */
- 		timer at fffec600 {
- 			compatible = "arm,cortex-a9-twd-timer";
-diff -ruN u-boot-2015.01-rc3/arch/arm/dts/tegra124.dtsi u-boot/arch/arm/dts/tegra124.dtsi
---- u-boot-2015.01-rc3/arch/arm/dts/tegra124.dtsi	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/dts/tegra124.dtsi	2015-01-01 17:34:32.041506727 +0100
-@@ -1,5 +1,6 @@
- #include <dt-bindings/clock/tegra124-car.h>
- #include <dt-bindings/gpio/tegra-gpio.h>
-+#include <dt-bindings/pinctrl/pinctrl-tegra.h>
- #include <dt-bindings/interrupt-controller/arm-gic.h>
- 
- #include "skeleton.dtsi"
-@@ -192,6 +193,16 @@
- 		status = "disabled";
- 	};
- 
-+	pwm: pwm at 7000a000 {
-+		compatible = "nvidia,tegra124-pwm", "nvidia,tegra20-pwm";
-+		reg = <0x7000a000 0x100>;
-+		#pwm-cells = <2>;
-+		clocks = <&tegra_car TEGRA124_CLK_PWM>;
-+		resets = <&tegra_car 17>;
-+		reset-names = "pwm";
-+		status = "disabled";
-+	};
-+
- 	spi at 7000d400 {
- 		compatible = "nvidia,tegra124-spi", "nvidia,tegra114-spi";
- 		reg = <0x7000d400 0x200>;
-@@ -290,6 +301,109 @@
- 		status = "disabled";
- 	};
- 
-+	ahub at 70300000 {
-+		compatible = "nvidia,tegra124-ahub";
-+		reg = <0x70300000 0x200>,
-+		      <0x70300800 0x800>,
-+		      <0x70300200 0x600>;
-+		interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
-+		clocks = <&tegra_car TEGRA124_CLK_D_AUDIO>,
-+			 <&tegra_car TEGRA124_CLK_APBIF>;
-+		clock-names = "d_audio", "apbif";
-+		resets = <&tegra_car 106>, /* d_audio */
-+			 <&tegra_car 107>, /* apbif */
-+			 <&tegra_car 30>,  /* i2s0 */
-+			 <&tegra_car 11>,  /* i2s1 */
-+			 <&tegra_car 18>,  /* i2s2 */
-+			 <&tegra_car 101>, /* i2s3 */
-+			 <&tegra_car 102>, /* i2s4 */
-+			 <&tegra_car 108>, /* dam0 */
-+			 <&tegra_car 109>, /* dam1 */
-+			 <&tegra_car 110>, /* dam2 */
-+			 <&tegra_car 10>,  /* spdif */
-+			 <&tegra_car 153>, /* amx */
-+			 <&tegra_car 185>, /* amx1 */
-+			 <&tegra_car 154>, /* adx */
-+			 <&tegra_car 180>, /* adx1 */
-+			 <&tegra_car 186>, /* afc0 */
-+			 <&tegra_car 187>, /* afc1 */
-+			 <&tegra_car 188>, /* afc2 */
-+			 <&tegra_car 189>, /* afc3 */
-+			 <&tegra_car 190>, /* afc4 */
-+			 <&tegra_car 191>; /* afc5 */
-+		reset-names = "d_audio", "apbif", "i2s0", "i2s1", "i2s2",
-+			      "i2s3", "i2s4", "dam0", "dam1", "dam2",
-+			      "spdif", "amx", "amx1", "adx", "adx1",
-+			      "afc0", "afc1", "afc2", "afc3", "afc4", "afc5";
-+		dmas = <&apbdma 1>, <&apbdma 1>,
-+		       <&apbdma 2>, <&apbdma 2>,
-+		       <&apbdma 3>, <&apbdma 3>,
-+		       <&apbdma 4>, <&apbdma 4>,
-+		       <&apbdma 6>, <&apbdma 6>,
-+		       <&apbdma 7>, <&apbdma 7>,
-+		       <&apbdma 12>, <&apbdma 12>,
-+		       <&apbdma 13>, <&apbdma 13>,
-+		       <&apbdma 14>, <&apbdma 14>,
-+		       <&apbdma 29>, <&apbdma 29>;
-+		dma-names = "rx0", "tx0", "rx1", "tx1", "rx2", "tx2",
-+			    "rx3", "tx3", "rx4", "tx4", "rx5", "tx5",
-+			    "rx6", "tx6", "rx7", "tx7", "rx8", "tx8",
-+			    "rx9", "tx9";
-+		ranges;
-+		#address-cells = <1>;
-+		#size-cells = <1>;
-+
-+		tegra_i2s0: i2s at 70301000 {
-+			compatible = "nvidia,tegra124-i2s";
-+			reg = <0x70301000 0x100>;
-+			nvidia,ahub-cif-ids = <4 4>;
-+			clocks = <&tegra_car TEGRA124_CLK_I2S0>;
-+			resets = <&tegra_car 30>;
-+			reset-names = "i2s";
-+			status = "disabled";
-+		};
-+
-+		tegra_i2s1: i2s at 70301100 {
-+			compatible = "nvidia,tegra124-i2s";
-+			reg = <0x70301100 0x100>;
-+			nvidia,ahub-cif-ids = <5 5>;
-+			clocks = <&tegra_car TEGRA124_CLK_I2S1>;
-+			resets = <&tegra_car 11>;
-+			reset-names = "i2s";
-+			status = "disabled";
-+		};
-+
-+		tegra_i2s2: i2s at 70301200 {
-+			compatible = "nvidia,tegra124-i2s";
-+			reg = <0x70301200 0x100>;
-+			nvidia,ahub-cif-ids = <6 6>;
-+			clocks = <&tegra_car TEGRA124_CLK_I2S2>;
-+			resets = <&tegra_car 18>;
-+			reset-names = "i2s";
-+			status = "disabled";
-+		};
-+
-+		tegra_i2s3: i2s at 70301300 {
-+			compatible = "nvidia,tegra124-i2s";
-+			reg = <0x70301300 0x100>;
-+			nvidia,ahub-cif-ids = <7 7>;
-+			clocks = <&tegra_car TEGRA124_CLK_I2S3>;
-+			resets = <&tegra_car 101>;
-+			reset-names = "i2s";
-+			status = "disabled";
-+		};
-+
-+		tegra_i2s4: i2s at 70301400 {
-+			compatible = "nvidia,tegra124-i2s";
-+			reg = <0x70301400 0x100>;
-+			nvidia,ahub-cif-ids = <8 8>;
-+			clocks = <&tegra_car TEGRA124_CLK_I2S4>;
-+			resets = <&tegra_car 102>;
-+			reset-names = "i2s";
-+			status = "disabled";
-+		};
-+	};
-+
- 	usb at 7d000000 {
- 		compatible = "nvidia,tegra124-ehci", "nvidia,tegra30-ehci";
- 		reg = <0x7d000000 0x4000>;
-diff -ruN u-boot-2015.01-rc3/arch/arm/dts/tegra124-jetson-tk1.dts u-boot/arch/arm/dts/tegra124-jetson-tk1.dts
---- u-boot-2015.01-rc3/arch/arm/dts/tegra124-jetson-tk1.dts	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/dts/tegra124-jetson-tk1.dts	2015-01-01 17:34:32.041506727 +0100
-@@ -16,7 +16,6 @@
- 		i2c2 = "/i2c at 7000c400";
- 		i2c3 = "/i2c at 7000c500";
- 		i2c4 = "/i2c at 7000c700";
--		i2c5 = "/i2c at 7000d100";
- 		sdhci0 = "/sdhci at 700b0600";
- 		sdhci1 = "/sdhci at 700b0400";
- 		spi0 = "/spi at 7000d400";
-diff -ruN u-boot-2015.01-rc3/arch/arm/dts/tegra124-nyan-big.dts u-boot/arch/arm/dts/tegra124-nyan-big.dts
---- u-boot-2015.01-rc3/arch/arm/dts/tegra124-nyan-big.dts	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/dts/tegra124-nyan-big.dts	2015-01-01 17:34:32.041506727 +0100
-@@ -0,0 +1,365 @@
-+/dts-v1/;
-+
-+#include <dt-bindings/input/input.h>
-+#include "tegra124.dtsi"
-+
-+/ {
-+	model = "Acer Chromebook 13 CB5-311";
-+	compatible = "google,nyan-big", "nvidia,tegra124";
-+
-+	aliases {
-+		console = &uarta;
-+		i2c0 = "/i2c at 7000d000";
-+		i2c1 = "/i2c at 7000c000";
-+		i2c2 = "/i2c at 7000c400";
-+		i2c3 = "/i2c at 7000c500";
-+		i2c4 = "/i2c at 7000c700";
-+		i2c5 = "/i2c at 7000d100";
-+		rtc0 = "/i2c at 0,7000d000/pmic at 40";
-+		rtc1 = "/rtc at 0,7000e000";
-+		sdhci0 = "/sdhci at 700b0600";
-+		sdhci1 = "/sdhci at 700b0400";
-+		spi0 = "/spi at 7000d400";
-+		spi1 = "/spi at 7000da00";
-+		usb0 = "/usb at 7d000000";
-+		usb1 = "/usb at 7d008000";
-+	};
-+
-+	memory {
-+		reg = <0x80000000 0x80000000>;
-+	};
-+
-+	serial at 70006000 {
-+		/* Debug connector on the bottom of the board near SD card. */
-+		status = "okay";
-+	};
-+
-+	pwm at 7000a000 {
-+		status = "okay";
-+	};
-+
-+	i2c at 7000c000 {
-+		status = "okay";
-+		clock-frequency = <100000>;
-+
-+		acodec: audio-codec at 10 {
-+			compatible = "maxim,max98090";
-+			reg = <0x10>;
-+			interrupt-parent = <&gpio>;
-+			interrupts = <TEGRA_GPIO(H, 4) GPIO_ACTIVE_HIGH>;
-+		};
-+
-+		temperature-sensor at 4c {
-+			compatible = "ti,tmp451";
-+			reg = <0x4c>;
-+			interrupt-parent = <&gpio>;
-+			interrupts = <TEGRA_GPIO(I, 6) IRQ_TYPE_LEVEL_LOW>;
-+
-+			#thermal-sensor-cells = <1>;
-+		};
-+	};
-+
-+	i2c at 7000c400 {
-+		status = "okay";
-+		clock-frequency = <100000>;
-+	};
-+
-+	i2c at 7000c500 {
-+		status = "okay";
-+		clock-frequency = <400000>;
-+
-+		tpm at 20 {
-+			compatible = "infineon,slb9645tt";
-+			reg = <0x20>;
-+		};
-+	};
-+
-+	hdmi_ddc: i2c at 7000c700 {
-+		status = "okay";
-+		clock-frequency = <100000>;
-+	};
-+
-+	i2c at 7000d000 {
-+		status = "okay";
-+		clock-frequency = <400000>;
-+
-+		pmic: pmic at 40 {
-+			compatible = "ams,as3722";
-+			reg = <0x40>;
-+			interrupts = <0 86 IRQ_TYPE_LEVEL_HIGH>;
-+
-+			ams,system-power-controller;
-+
-+			#interrupt-cells = <2>;
-+			interrupt-controller;
-+
-+			gpio-controller;
-+			#gpio-cells = <2>;
-+
-+			pinctrl-names = "default";
-+			pinctrl-0 = <&as3722_default>;
-+
-+			as3722_default: pinmux {
-+				gpio0 {
-+					pins = "gpio0";
-+					function = "gpio";
-+					bias-pull-down;
-+				};
-+
-+				gpio1 {
-+					pins = "gpio1";
-+					function = "gpio";
-+					bias-pull-up;
-+				};
-+
-+				gpio2_4_7 {
-+					pins = "gpio2", "gpio4", "gpio7";
-+					function = "gpio";
-+					bias-pull-up;
-+				};
-+
-+				gpio3_6 {
-+					pins = "gpio3", "gpio6";
-+					bias-high-impedance;
-+				};
-+
-+				gpio5 {
-+					pins = "gpio5";
-+					function = "clk32k-out";
-+					bias-pull-down;
-+				};
-+			};
-+		};
-+	};
-+
-+	spi at 7000d400 {
-+		status = "okay";
-+
-+		cros_ec: cros-ec at 0 {
-+			compatible = "google,cros-ec-spi";
-+			spi-max-frequency = <3000000>;
-+			interrupt-parent = <&gpio>;
-+			interrupts = <TEGRA_GPIO(C, 7) IRQ_TYPE_LEVEL_LOW>;
-+			reg = <0>;
-+
-+			google,cros-ec-spi-msg-delay = <2000>;
-+
-+			i2c-tunnel {
-+				compatible = "google,cros-ec-i2c-tunnel";
-+				#address-cells = <1>;
-+				#size-cells = <0>;
-+
-+				google,remote-bus = <0>;
-+
-+				charger: bq24735 at 9 {
-+					compatible = "ti,bq24735";
-+					reg = <0x9>;
-+					interrupt-parent = <&gpio>;
-+					interrupts = <TEGRA_GPIO(J, 0)
-+							GPIO_ACTIVE_HIGH>;
-+					ti,ac-detect-gpios = <&gpio
-+							TEGRA_GPIO(J, 0)
-+							GPIO_ACTIVE_HIGH>;
-+				};
-+
-+				battery: sbs-battery at b {
-+					compatible = "sbs,sbs-battery";
-+					reg = <0xb>;
-+					sbs,i2c-retry-count = <2>;
-+					sbs,poll-retry-count = <10>;
-+					power-supplies = <&charger>;
-+				};
-+			};
-+		};
-+	};
-+
-+	spi at 7000da00 {
-+		status = "okay";
-+		spi-max-frequency = <25000000>;
-+
-+		flash at 0 {
-+			compatible = "winbond,w25q32dw";
-+			reg = <0>;
-+		};
-+	};
-+
-+	pmc at 7000e400 {
-+		nvidia,invert-interrupt;
-+		nvidia,suspend-mode = <0>;
-+		nvidia,cpu-pwr-good-time = <500>;
-+		nvidia,cpu-pwr-off-time = <300>;
-+		nvidia,core-pwr-good-time = <641 3845>;
-+		nvidia,core-pwr-off-time = <61036>;
-+		nvidia,core-power-req-active-high;
-+		nvidia,sys-clock-req-active-high;
-+	};
-+
-+	hda at 70030000 {
-+		status = "okay";
-+	};
-+
-+	sdhci at 700b0000 { /* WiFi/BT on this bus */
-+		status = "okay";
-+		power-gpios = <&gpio TEGRA_GPIO(X, 7) GPIO_ACTIVE_HIGH>;
-+		bus-width = <4>;
-+		no-1-8-v;
-+		non-removable;
-+	};
-+
-+	sdhci at 700b0400 { /* SD Card on this bus */
-+		status = "okay";
-+		cd-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_LOW>;
-+		power-gpios = <&gpio TEGRA_GPIO(R, 0) GPIO_ACTIVE_HIGH>;
-+		wp-gpios = <&gpio TEGRA_GPIO(Q, 4) GPIO_ACTIVE_LOW>;
-+		bus-width = <4>;
-+		no-1-8-v;
-+	};
-+
-+	sdhci at 700b0600 { /* eMMC on this bus */
-+		status = "okay";
-+		bus-width = <8>;
-+		no-1-8-v;
-+		non-removable;
-+	};
-+
-+	ahub at 70300000 {
-+		i2s at 70301100 {
-+			status = "okay";
-+		};
-+	};
-+
-+	usb at 7d000000 { /* Rear external USB port. */
-+		status = "okay";
-+	};
-+
-+	usb-phy at 7d000000 {
-+		status = "okay";
-+	};
-+
-+	usb at 7d004000 { /* Internal webcam. */
-+		status = "okay";
-+	};
-+
-+	usb-phy at 7d004000 {
-+		status = "okay";
-+	};
-+
-+	usb at 7d008000 { /* Left external USB port. */
-+		status = "okay";
-+	};
-+
-+	usb-phy at 7d008000 {
-+		status = "okay";
-+	};
-+
-+	backlight: backlight {
-+		compatible = "pwm-backlight";
-+
-+		enable-gpios = <&gpio TEGRA_GPIO(H, 2) GPIO_ACTIVE_HIGH>;
-+		pwms = <&pwm 1 1000000>;
-+
-+		default-brightness-level = <224>;
-+		brightness-levels =
-+			<  0   1   2   3   4   5   6   7
-+			   8   9  10  11  12  13  14  15
-+			  16  17  18  19  20  21  22  23
-+			  24  25  26  27  28  29  30  31
-+			  32  33  34  35  36  37  38  39
-+			  40  41  42  43  44  45  46  47
-+			  48  49  50  51  52  53  54  55
-+			  56  57  58  59  60  61  62  63
-+			  64  65  66  67  68  69  70  71
-+			  72  73  74  75  76  77  78  79
-+			  80  81  82  83  84  85  86  87
-+			  88  89  90  91  92  93  94  95
-+			  96  97  98  99 100 101 102 103
-+			 104 105 106 107 108 109 110 111
-+			 112 113 114 115 116 117 118 119
-+			 120 121 122 123 124 125 126 127
-+			 128 129 130 131 132 133 134 135
-+			 136 137 138 139 140 141 142 143
-+			 144 145 146 147 148 149 150 151
-+			 152 153 154 155 156 157 158 159
-+			 160 161 162 163 164 165 166 167
-+			 168 169 170 171 172 173 174 175
-+			 176 177 178 179 180 181 182 183
-+			 184 185 186 187 188 189 190 191
-+			 192 193 194 195 196 197 198 199
-+			 200 201 202 203 204 205 206 207
-+			 208 209 210 211 212 213 214 215
-+			 216 217 218 219 220 221 222 223
-+			 224 225 226 227 228 229 230 231
-+			 232 233 234 235 236 237 238 239
-+			 240 241 242 243 244 245 246 247
-+			 248 249 250 251 252 253 254 255
-+			 256>;
-+	};
-+
-+	clocks {
-+		compatible = "simple-bus";
-+		#address-cells = <1>;
-+		#size-cells = <0>;
-+
-+		clk32k_in: clock at 0 {
-+			compatible = "fixed-clock";
-+			reg = <0>;
-+			#clock-cells = <0>;
-+			clock-frequency = <32768>;
-+		};
-+	};
-+
-+	gpio-keys {
-+		compatible = "gpio-keys";
-+
-+		lid {
-+			label = "Lid";
-+			gpios = <&gpio TEGRA_GPIO(R, 4) GPIO_ACTIVE_LOW>;
-+			linux,input-type = <5>;
-+			linux,code = <KEY_RESERVED>;
-+			debounce-interval = <1>;
-+			gpio-key,wakeup;
-+		};
-+
-+		power {
-+			label = "Power";
-+			gpios = <&gpio TEGRA_GPIO(Q, 0) GPIO_ACTIVE_LOW>;
-+			linux,code = <KEY_POWER>;
-+			debounce-interval = <30>;
-+			gpio-key,wakeup;
-+		};
-+	};
-+
-+	panel: panel {
-+		compatible = "auo,b133xtn01";
-+
-+		backlight = <&backlight>;
-+	};
-+
-+	sound {
-+		compatible = "nvidia,tegra-audio-max98090-nyan-big",
-+			     "nvidia,tegra-audio-max98090";
-+		nvidia,model = "Acer Chromebook 13";
-+
-+		nvidia,audio-routing =
-+			"Headphones", "HPR",
-+			"Headphones", "HPL",
-+			"Speakers", "SPKR",
-+			"Speakers", "SPKL",
-+			"Mic Jack", "MICBIAS",
-+			"DMICL", "Int Mic",
-+			"DMICR", "Int Mic",
-+			"IN34", "Mic Jack";
-+
-+		nvidia,i2s-controller = <&tegra_i2s1>;
-+		nvidia,audio-codec = <&acodec>;
-+
-+		clocks = <&tegra_car TEGRA124_CLK_PLL_A>,
-+			 <&tegra_car TEGRA124_CLK_PLL_A_OUT0>,
-+			 <&tegra_car TEGRA124_CLK_EXTERN1>;
-+		clock-names = "pll_a", "pll_a_out0", "mclk";
-+
-+		nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(I, 7) GPIO_ACTIVE_HIGH>;
-+	};
-+};
-+
-+#include "cros-ec-keyboard.dtsi"
-diff -ruN u-boot-2015.01-rc3/arch/arm/dts/tegra30-tec-ng.dts u-boot/arch/arm/dts/tegra30-tec-ng.dts
---- u-boot-2015.01-rc3/arch/arm/dts/tegra30-tec-ng.dts	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/dts/tegra30-tec-ng.dts	2015-01-01 17:34:32.045506662 +0100
-@@ -6,6 +6,10 @@
- 	model = "Avionic Design Tamonten? NG Evaluation Carrier";
- 	compatible = "ad,tec-ng", "nvidia,tegra30";
- 
-+	aliases {
-+		i2c0 = "/i2c at 7000c400";
-+	};
-+
- 	/* GEN2 */
- 	i2c at 7000c400 {
- 		status = "okay";
-diff -ruN u-boot-2015.01-rc3/arch/arm/dts/uniphier-ph1-ld4-ref.dts u-boot/arch/arm/dts/uniphier-ph1-ld4-ref.dts
---- u-boot-2015.01-rc3/arch/arm/dts/uniphier-ph1-ld4-ref.dts	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/dts/uniphier-ph1-ld4-ref.dts	2015-01-01 17:34:32.045506662 +0100
-@@ -25,10 +25,10 @@
- 	};
- 
- 	aliases {
--		uart0 = &uart0;
--		uart1 = &uart1;
--		uart2 = &uart2;
--		uart3 = &uart3;
-+		serial0 = &uart0;
-+		serial1 = &uart1;
-+		serial2 = &uart2;
-+		serial3 = &uart3;
- 		i2c0 = &i2c0;
- 		i2c1 = &i2c1;
- 		i2c2 = &i2c2;
-diff -ruN u-boot-2015.01-rc3/arch/arm/dts/uniphier-ph1-pro4-ref.dts u-boot/arch/arm/dts/uniphier-ph1-pro4-ref.dts
---- u-boot-2015.01-rc3/arch/arm/dts/uniphier-ph1-pro4-ref.dts	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/dts/uniphier-ph1-pro4-ref.dts	2015-01-01 17:34:32.045506662 +0100
-@@ -25,10 +25,10 @@
- 	};
- 
- 	aliases {
--		uart0 = &uart0;
--		uart1 = &uart1;
--		uart2 = &uart2;
--		uart3 = &uart3;
-+		serial0 = &uart0;
-+		serial1 = &uart1;
-+		serial2 = &uart2;
-+		serial3 = &uart3;
- 		i2c0 = &i2c0;
- 		i2c1 = &i2c1;
- 		i2c2 = &i2c2;
-diff -ruN u-boot-2015.01-rc3/arch/arm/dts/uniphier-ph1-sld3-ref.dts u-boot/arch/arm/dts/uniphier-ph1-sld3-ref.dts
---- u-boot-2015.01-rc3/arch/arm/dts/uniphier-ph1-sld3-ref.dts	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/dts/uniphier-ph1-sld3-ref.dts	2015-01-01 17:34:32.045506662 +0100
-@@ -25,9 +25,9 @@
- 	};
- 
- 	aliases {
--		uart0 = &uart0;
--		uart1 = &uart1;
--		uart2 = &uart2;
-+		serial0 = &uart0;
-+		serial1 = &uart1;
-+		serial2 = &uart2;
- 		i2c0 = &i2c0;
- 		i2c1 = &i2c1;
- 		i2c2 = &i2c2;
-diff -ruN u-boot-2015.01-rc3/arch/arm/dts/uniphier-ph1-sld8-ref.dts u-boot/arch/arm/dts/uniphier-ph1-sld8-ref.dts
---- u-boot-2015.01-rc3/arch/arm/dts/uniphier-ph1-sld8-ref.dts	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/dts/uniphier-ph1-sld8-ref.dts	2015-01-01 17:34:32.045506662 +0100
-@@ -25,10 +25,10 @@
- 	};
- 
- 	aliases {
--		uart0 = &uart0;
--		uart1 = &uart1;
--		uart2 = &uart2;
--		uart3 = &uart3;
-+		serial0 = &uart0;
-+		serial1 = &uart1;
-+		serial2 = &uart2;
-+		serial3 = &uart3;
- 		i2c0 = &i2c0;
- 		i2c1 = &i2c1;
- 		i2c2 = &i2c2;
-diff -ruN u-boot-2015.01-rc3/arch/arm/imx-common/cpu.c u-boot/arch/arm/imx-common/cpu.c
---- u-boot-2015.01-rc3/arch/arm/imx-common/cpu.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/imx-common/cpu.c	2015-01-01 17:34:32.045506662 +0100
-@@ -206,6 +206,9 @@
- {
- #if defined(CONFIG_CMD_SATA)
- 	sata_stop();
-+#if defined(CONFIG_MX6)
-+	disable_sata_clock();
-+#endif
- #endif
- #if defined(CONFIG_VIDEO_IPUV3)
- 	/* disable video before launching O/S */
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-bcm281xx/sysmap.h u-boot/arch/arm/include/asm/arch-bcm281xx/sysmap.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-bcm281xx/sysmap.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-bcm281xx/sysmap.h	2015-01-01 17:34:32.053506531 +0100
-@@ -13,6 +13,8 @@
- #define ESUB_CLK_BASE_ADDR	0x38000000
- #define ESW_CONTRL_BASE_ADDR	0x38200000
- #define GPIO2_BASE_ADDR		0x35003000
-+#define HSOTG_BASE_ADDR		0x3f120000
-+#define HSOTG_CTRL_BASE_ADDR	0x3f130000
- #define KONA_MST_CLK_BASE_ADDR	0x3f001000
- #define KONA_SLV_CLK_BASE_ADDR	0x3e011000
- #define PMU_BSC_BASE_ADDR	0x3500d000
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-bcm2835/mbox.h u-boot/arch/arm/include/asm/arch-bcm2835/mbox.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-bcm2835/mbox.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-bcm2835/mbox.h	2015-01-01 17:34:32.053506531 +0100
-@@ -140,6 +140,7 @@
- #define BCM2835_BOARD_REV_B_REV2_f	0xf
- #define BCM2835_BOARD_REV_B_PLUS	0x10
- #define BCM2835_BOARD_REV_CM		0x11
-+#define BCM2835_BOARD_REV_A_PLUS	0x12
- 
- struct bcm2835_mbox_tag_get_board_rev {
- 	struct bcm2835_mbox_tag_hdr tag_hdr;
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-ls102xa/config.h u-boot/arch/arm/include/asm/arch-ls102xa/config.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-ls102xa/config.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-ls102xa/config.h	2015-01-01 17:34:32.065506333 +0100
-@@ -11,11 +11,17 @@
- 
- #define OCRAM_BASE_ADDR				0x10000000
- #define OCRAM_SIZE				0x00020000
-+#define OCRAM_BASE_S_ADDR			0x10010000
-+#define OCRAM_S_SIZE				0x00010000
- 
- #define CONFIG_SYS_IMMR				0x01000000
-+#define CONFIG_SYS_DCSRBAR			0x20000000
-+
-+#define CONFIG_SYS_DCSR_DCFG_ADDR	(CONFIG_SYS_DCSRBAR + 0x00220000)
- 
- #define CONFIG_SYS_FSL_DDR_ADDR			(CONFIG_SYS_IMMR + 0x00080000)
- #define CONFIG_SYS_CCI400_ADDR			(CONFIG_SYS_IMMR + 0x00180000)
-+#define CONFIG_SYS_FSL_CSU_ADDR                 (CONFIG_SYS_IMMR + 0x00510000)
- #define CONFIG_SYS_IFC_ADDR			(CONFIG_SYS_IMMR + 0x00530000)
- #define CONFIG_SYS_FSL_ESDHC_ADDR		(CONFIG_SYS_IMMR + 0x00560000)
- #define CONFIG_SYS_FSL_SCFG_ADDR		(CONFIG_SYS_IMMR + 0x00570000)
-@@ -52,6 +58,9 @@
- 
- #define LPUART_BASE				(CONFIG_SYS_IMMR + 0x01950000)
- 
-+#define CONFIG_SYS_PCIE1_ADDR			(CONFIG_SYS_IMMR + 0x2400000)
-+#define CONFIG_SYS_PCIE2_ADDR			(CONFIG_SYS_IMMR + 0x2500000)
-+
- #ifdef CONFIG_DDR_SPD
- #define CONFIG_SYS_FSL_DDR_BE
- #define CONFIG_VERY_BIG_RAM
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h u-boot/arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-ls102xa/immap_ls102xa.h	2015-01-01 17:34:32.065506333 +0100
-@@ -17,6 +17,9 @@
- #define SOC_VER_LS1021		0x11
- #define SOC_VER_LS1022		0x12
- 
-+#define CCSR_BRR_OFFSET		0xe4
-+#define CCSR_SCRATCHRW1_OFFSET	0x200
-+
- #define RCWSR0_SYS_PLL_RAT_SHIFT	25
- #define RCWSR0_SYS_PLL_RAT_MASK		0x1f
- #define RCWSR0_MEM_PLL_RAT_SHIFT	16
-@@ -29,6 +32,11 @@
- #define ARCH_TIMER_CTRL_ENABLE		(1 << 0)
- #define SYS_COUNTER_CTRL_ENABLE		(1 << 24)
- 
-+#define DCFG_CCSR_PORSR1_RCW_MASK	0xff800000
-+#define DCFG_CCSR_PORSR1_RCW_SRC_I2C	0x24800000
-+
-+#define DCFG_DCSR_PORCR1		0
-+
- struct sys_info {
- 	unsigned long freq_processor[CONFIG_MAX_CPUS];
- 	unsigned long freq_systembus;
-@@ -98,6 +106,7 @@
- #define SCFG_ETSECDMAMCR_LE_BD_FR	0xf8001a0f
- #define SCFG_ETSECCMCR_GE2_CLK125	0x04000000
- #define SCFG_PIXCLKCR_PXCKEN		0x80000000
-+#define SCFG_QSPI_CLKSEL		0xc0100000
- 
- /* Supplemental Configuration Unit */
- struct ccsr_scfg {
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-ls102xa/ls102xa_stream_id.h u-boot/arch/arm/include/asm/arch-ls102xa/ls102xa_stream_id.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-ls102xa/ls102xa_stream_id.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-ls102xa/ls102xa_stream_id.h	2015-01-01 17:34:32.065506333 +0100
-@@ -0,0 +1,17 @@
-+/*
-+ * Copyright 2014 Freescale Semiconductor, Inc.
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#ifndef __FSL_LS102XA_STREAM_ID_H_
-+#define __FSL_LS102XA_STREAM_ID_H_
-+
-+struct smmu_stream_id {
-+	uint16_t offset;
-+	uint16_t stream_id;
-+	char dev_name[32];
-+};
-+
-+void ls102xa_config_smmu_stream_id(struct smmu_stream_id *id, uint32_t num);
-+#endif
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-ls102xa/ns_access.h u-boot/arch/arm/include/asm/arch-ls102xa/ns_access.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-ls102xa/ns_access.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-ls102xa/ns_access.h	2015-01-01 17:34:32.065506333 +0100
-@@ -0,0 +1,118 @@
-+/*
-+ * Copyright 2014 Freescale Semiconductor, Inc.
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#ifndef __FSL_NS_ACCESS_H_
-+#define __FSL_NS_ACCESS_H_
-+
-+enum csu_cslx_access {
-+	CSU_NS_SUP_R = 0x08,
-+	CSU_NS_SUP_W = 0x80,
-+	CSU_NS_SUP_RW = 0x88,
-+	CSU_NS_USER_R = 0x04,
-+	CSU_NS_USER_W = 0x40,
-+	CSU_NS_USER_RW = 0x44,
-+	CSU_S_SUP_R = 0x02,
-+	CSU_S_SUP_W = 0x20,
-+	CSU_S_SUP_RW = 0x22,
-+	CSU_S_USER_R = 0x01,
-+	CSU_S_USER_W = 0x10,
-+	CSU_S_USER_RW = 0x11,
-+	CSU_ALL_RW = 0xff,
-+};
-+
-+enum csu_cslx_ind {
-+	CSU_CSLX_PCIE2_IO = 0,
-+	CSU_CSLX_PCIE1_IO,
-+	CSU_CSLX_MG2TPR_IP,
-+	CSU_CSLX_IFC_MEM,
-+	CSU_CSLX_OCRAM,
-+	CSU_CSLX_GIC,
-+	CSU_CSLX_PCIE1,
-+	CSU_CSLX_OCRAM2,
-+	CSU_CSLX_QSPI_MEM,
-+	CSU_CSLX_PCIE2,
-+	CSU_CSLX_SATA,
-+	CSU_CSLX_USB3,
-+	CSU_CSLX_SERDES = 32,
-+	CSU_CSLX_QDMA,
-+	CSU_CSLX_LPUART2,
-+	CSU_CSLX_LPUART1,
-+	CSU_CSLX_LPUART4,
-+	CSU_CSLX_LPUART3,
-+	CSU_CSLX_LPUART6,
-+	CSU_CSLX_LPUART5,
-+	CSU_CSLX_DSPI2 = 40,
-+	CSU_CSLX_DSPI1,
-+	CSU_CSLX_QSPI,
-+	CSU_CSLX_ESDHC,
-+	CSU_CSLX_2D_ACE,
-+	CSU_CSLX_IFC,
-+	CSU_CSLX_I2C1,
-+	CSU_CSLX_USB2,
-+	CSU_CSLX_I2C3,
-+	CSU_CSLX_I2C2,
-+	CSU_CSLX_DUART2 = 50,
-+	CSU_CSLX_DUART1,
-+	CSU_CSLX_WDT2,
-+	CSU_CSLX_WDT1,
-+	CSU_CSLX_EDMA,
-+	CSU_CSLX_SYS_CNT,
-+	CSU_CSLX_DMA_MUX2,
-+	CSU_CSLX_DMA_MUX1,
-+	CSU_CSLX_DDR,
-+	CSU_CSLX_QUICC,
-+	CSU_CSLX_DCFG_CCU_RCPM = 60,
-+	CSU_CSLX_SECURE_BOOTROM,
-+	CSU_CSLX_SFP,
-+	CSU_CSLX_TMU,
-+	CSU_CSLX_SECURE_MONITOR,
-+	CSU_CSLX_RESERVED0,
-+	CSU_CSLX_ETSEC1,
-+	CSU_CSLX_SEC5_5,
-+	CSU_CSLX_ETSEC3,
-+	CSU_CSLX_ETSEC2,
-+	CSU_CSLX_GPIO2 = 70,
-+	CSU_CSLX_GPIO1,
-+	CSU_CSLX_GPIO4,
-+	CSU_CSLX_GPIO3,
-+	CSU_CSLX_PLATFORM_CONT,
-+	CSU_CSLX_CSU,
-+	CSU_CSLX_ASRC,
-+	CSU_CSLX_SPDIF,
-+	CSU_CSLX_FLEXCAN2,
-+	CSU_CSLX_FLEXCAN1,
-+	CSU_CSLX_FLEXCAN4 = 80,
-+	CSU_CSLX_FLEXCAN3,
-+	CSU_CSLX_SAI2,
-+	CSU_CSLX_SAI1,
-+	CSU_CSLX_SAI4,
-+	CSU_CSLX_SAI3,
-+	CSU_CSLX_FTM2,
-+	CSU_CSLX_FTM1,
-+	CSU_CSLX_FTM4,
-+	CSU_CSLX_FTM3,
-+	CSU_CSLX_FTM6 = 90,
-+	CSU_CSLX_FTM5,
-+	CSU_CSLX_FTM8,
-+	CSU_CSLX_FTM7,
-+	CSU_CSLX_COP_DCSR,
-+	CSU_CSLX_EPU,
-+	CSU_CSLX_GDI,
-+	CSU_CSLX_DDI,
-+	CSU_CSLX_RESERVED1,
-+	CSU_CSLX_USB3_PHY = 117,
-+	CSU_CSLX_RESERVED2,
-+	CSU_CSLX_MAX,
-+};
-+
-+struct csu_ns_dev {
-+	unsigned long ind;
-+	uint32_t val;
-+};
-+
-+void enable_devices_ns_access(struct csu_ns_dev *ns_dev, uint32_t num);
-+
-+#endif
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-ls102xa/spl.h u-boot/arch/arm/include/asm/arch-ls102xa/spl.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-ls102xa/spl.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-ls102xa/spl.h	2015-01-01 17:34:32.065506333 +0100
-@@ -0,0 +1,20 @@
-+/*
-+ * Copyright 2014 Freescale Semiconductor, Inc.
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#ifndef __ASM_ARCH_SPL_H__
-+#define __ASM_ARCH_SPL_H__
-+
-+#define BOOT_DEVICE_NONE	0
-+#define BOOT_DEVICE_XIP		1
-+#define BOOT_DEVICE_XIPWAIT	2
-+#define BOOT_DEVICE_NAND	3
-+#define BOOT_DEVICE_ONENAND	4
-+#define BOOT_DEVICE_MMC1	5
-+#define BOOT_DEVICE_MMC2	6
-+#define BOOT_DEVICE_MMC2_2	7
-+#define BOOT_DEVICE_SPI		10
-+
-+#endif	/* __ASM_ARCH_SPL_H__ */
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-mx6/clock.h u-boot/arch/arm/include/asm/arch-mx6/clock.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-mx6/clock.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-mx6/clock.h	2015-01-01 17:34:32.073506203 +0100
-@@ -43,10 +43,10 @@
- };
- 
- enum enet_freq {
--	ENET_25MHz,
--	ENET_50MHz,
--	ENET_100MHz,
--	ENET_125MHz,
-+	ENET_25MHZ,
-+	ENET_50MHZ,
-+	ENET_100MHZ,
-+	ENET_125MHZ,
- };
- 
- u32 imx_get_uartclk(void);
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-mx6/mx6sl_pins.h u-boot/arch/arm/include/asm/arch-mx6/mx6sl_pins.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-mx6/mx6sl_pins.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-mx6/mx6sl_pins.h	2015-01-01 17:34:32.073506203 +0100
-@@ -53,5 +53,10 @@
- 	MX6_PAD_FEC_REF_CLK__FEC_REF_OUT			= IOMUX_PAD(0x424, 0x134, 0x10, 0x000, 0, 0),
- 	MX6_PAD_FEC_RX_ER__GPIO_4_19				= IOMUX_PAD(0x0428, 0x0138, 5, 0x0000, 0, 0),
- 	MX6_PAD_FEC_TX_CLK__GPIO_4_21				= IOMUX_PAD(0x0434, 0x0144, 5, 0x0000, 0, 0),
-+
-+	MX6_PAD_EPDC_PWRCOM__ANATOP_USBOTG1_ID			= IOMUX_PAD(0x03D0, 0x00E0, 4, 0x05DC, 0, 0),
-+
-+	MX6_PAD_KEY_COL4__USB_USBOTG1_PWR			= IOMUX_PAD(0x0484, 0x017C, 6, 0x0000, 0, 0),
-+	MX6_PAD_KEY_COL5__USB_USBOTG2_PWR			= IOMUX_PAD(0x0488, 0x0180, 6, 0x0000, 0, 0),
- };
- #endif	/* __ASM_ARCH_MX6_MX6SL_PINS_H__ */
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-rmobile/mmc.h u-boot/arch/arm/include/asm/arch-rmobile/mmc.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-rmobile/mmc.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-rmobile/mmc.h	2015-01-01 17:34:32.085506005 +0100
-@@ -0,0 +1,14 @@
-+/*
-+ * Renesas SuperH MMCIF driver.
-+ *
-+ * Copyright (C)  2014 Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj at renesas.com>
-+ * Copyright (C)  2014 Renesas Electronics Corporation
-+ *
-+ * SPDX-License-Identifier: GPL-2.0
-+ */
-+#ifndef _RMOBILE_MMC_H_
-+#define _RMOBILE_MMC_H_
-+
-+int mmcif_mmc_init(void);
-+
-+#endif /* _RMOBILE_MMC_H_ */
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-rmobile/r8a7790.h u-boot/arch/arm/include/asm/arch-rmobile/r8a7790.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-rmobile/r8a7790.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-rmobile/r8a7790.h	2015-01-01 17:34:32.085506005 +0100
-@@ -15,6 +15,19 @@
- #define CONFIG_SYS_I2C_SH_BASE2	0xE6520000
- #define CONFIG_SYS_I2C_SH_BASE3	0xE60B0000
- 
-+/* Module stop control/status register bits */
-+#define MSTP0_BITS	0x00640801
-+#define MSTP1_BITS	0xDB6E9BDF
-+#define MSTP2_BITS	0x300DA1FC
-+#define MSTP3_BITS	0xF08CF831
-+#define MSTP4_BITS	0x80000184
-+#define MSTP5_BITS	0x44C00046
-+#define MSTP7_BITS	0x07F30718
-+#define MSTP8_BITS	0x01F0FF84
-+#define MSTP9_BITS	0xF5979FCF
-+#define MSTP10_BITS	0xFFFEFFE0
-+#define MSTP11_BITS	0x00000000
-+
- #define R8A7790_CUT_ES2X	2
- #define IS_R8A7790_ES2()	\
- 	(rmobile_get_cpu_rev_integer() == R8A7790_CUT_ES2X)
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-rmobile/r8a7791.h u-boot/arch/arm/include/asm/arch-rmobile/r8a7791.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-rmobile/r8a7791.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-rmobile/r8a7791.h	2015-01-01 17:34:32.089505941 +0100
-@@ -51,6 +51,19 @@
- #define DBSC3_1_QOS_W15_BASE	0xE67A2F00
- #define DBSC3_1_DBADJ2		0xE67A00C8
- 
-+/* Module stop control/status register bits */
-+#define MSTP0_BITS	0x00640801
-+#define MSTP1_BITS	0x9B6C9B5A
-+#define MSTP2_BITS	0x100D21FC
-+#define MSTP3_BITS	0xF08CD810
-+#define MSTP4_BITS	0x800001C4
-+#define MSTP5_BITS	0x44C00046
-+#define MSTP7_BITS	0x05BFE618
-+#define MSTP8_BITS	0x40C0FE85
-+#define MSTP9_BITS	0xFF979FFF
-+#define MSTP10_BITS	0xFFFEFFE0
-+#define MSTP11_BITS	0x000001C0
-+
- #define R8A7791_CUT_ES2X	2
- #define IS_R8A7791_ES2()	\
- 	(rmobile_get_cpu_rev_integer() == R8A7791_CUT_ES2X)
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-rmobile/r8a7793.h u-boot/arch/arm/include/asm/arch-rmobile/r8a7793.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-rmobile/r8a7793.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-rmobile/r8a7793.h	2015-01-01 17:34:32.089505941 +0100
-@@ -56,6 +56,20 @@
- /*
-  * R8A7793 I/O Product Information
-  */
-+
-+/* Module stop control/status register bits */
-+#define MSTP0_BITS	0x00640801
-+#define MSTP1_BITS	0x9B6C9B5A
-+#define MSTP2_BITS	0x100D21FC
-+#define MSTP3_BITS	0xF08CD810
-+#define MSTP4_BITS	0x800001C4
-+#define MSTP5_BITS	0x44C00046
-+#define MSTP7_BITS	0x05BFE618
-+#define MSTP8_BITS	0x40C0FE85
-+#define MSTP9_BITS	0xFF979FFF
-+#define MSTP10_BITS	0xFFFEFFE0
-+#define MSTP11_BITS	0x000001C0
-+
- #define R8A7793_CUT_ES2X	2
- #define IS_R8A7793_ES2() \
- 	(rmobile_get_cpu_rev_integer() == R8A7793_CUT_ES2X)
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-rmobile/r8a7794.h u-boot/arch/arm/include/asm/arch-rmobile/r8a7794.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-rmobile/r8a7794.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-rmobile/r8a7794.h	2015-01-01 17:34:32.089505941 +0100
-@@ -14,4 +14,17 @@
- /* SH-I2C */
- #define CONFIG_SYS_I2C_SH_BASE2	0xE60B0000
- 
-+/* Module stop control/status register bits */
-+#define MSTP0_BITS	0x00440801
-+#define MSTP1_BITS	0x936899DA
-+#define MSTP2_BITS	0x100D21FC
-+#define MSTP3_BITS	0xE084D810
-+#define MSTP4_BITS	0x800001C4
-+#define MSTP5_BITS	0x40C00044
-+#define MSTP7_BITS	0x013FE618
-+#define MSTP8_BITS	0x40803C05
-+#define MSTP9_BITS	0xFB879FEE
-+#define MSTP10_BITS	0xFFFEFFE0
-+#define MSTP11_BITS	0x000001C0
-+
- #endif /* __ASM_ARCH_R8A7794_H */
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-rmobile/rcar-base.h u-boot/arch/arm/include/asm/arch-rmobile/rcar-base.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-rmobile/rcar-base.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-rmobile/rcar-base.h	2015-01-01 17:34:32.089505941 +0100
-@@ -29,6 +29,45 @@
- #define SCIF4_BASE		0xE6EE0000
- #define SCIF5_BASE		0xE6EE8000
- 
-+/* Module stop status register */
-+#define MSTPSR0			0xE6150030
-+#define MSTPSR1			0xE6150038
-+#define MSTPSR2			0xE6150040
-+#define MSTPSR3			0xE6150048
-+#define MSTPSR4			0xE615004C
-+#define MSTPSR5			0xE615003C
-+#define MSTPSR7			0xE61501C4
-+#define MSTPSR8			0xE61509A0
-+#define MSTPSR9			0xE61509A4
-+#define MSTPSR10		0xE61509A8
-+#define MSTPSR11		0xE61509AC
-+
-+/* Realtime module stop control register */
-+#define RMSTPCR0		0xE6150110
-+#define RMSTPCR1		0xE6150114
-+#define RMSTPCR2		0xE6150118
-+#define RMSTPCR3		0xE615011C
-+#define RMSTPCR4		0xE6150120
-+#define RMSTPCR5		0xE6150124
-+#define RMSTPCR7		0xE615012C
-+#define RMSTPCR8		0xE6150980
-+#define RMSTPCR9		0xE6150984
-+#define RMSTPCR10		0xE6150988
-+#define RMSTPCR11		0xE615098C
-+
-+/* System module stop control register */
-+#define SMSTPCR0		0xE6150130
-+#define SMSTPCR1		0xE6150134
-+#define SMSTPCR2		0xE6150138
-+#define SMSTPCR3		0xE615013C
-+#define SMSTPCR4		0xE6150140
-+#define SMSTPCR5		0xE6150144
-+#define SMSTPCR7		0xE615014C
-+#define SMSTPCR8		0xE6150990
-+#define SMSTPCR9		0xE6150994
-+#define SMSTPCR10		0xE6150998
-+#define SMSTPCR11		0xE615099C
-+
- /*
-  * SH-I2C
-  * Ch2 and ch3 are different address. These are defined
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-rmobile/rcar-mstp.h u-boot/arch/arm/include/asm/arch-rmobile/rcar-mstp.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-rmobile/rcar-mstp.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-rmobile/rcar-mstp.h	2015-01-01 17:34:32.089505941 +0100
-@@ -0,0 +1,109 @@
-+/*
-+ * arch/arm/include/asm/arch-rmobile/rcar-mstp.h
-+ *
-+ * Copyright (C) 2013, 2014 Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj at renesas.com>
-+ * Copyright (C) 2013, 2014 Renesas Electronics Corporation
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0
-+ */
-+
-+#ifndef __ASM_ARCH_RCAR_MSTP_H
-+#define __ASM_ARCH_RCAR_MSTP_H
-+
-+#define mstp_setbits(type, addr, saddr, set) \
-+		out_##type((saddr), in_##type(addr) | (set))
-+#define mstp_clrbits(type, addr, saddr, clear) \
-+		out_##type((saddr), in_##type(addr) & ~(clear))
-+#define mstp_setclrbits(type, addr, set, clear) \
-+		out_##type((addr), (in_##type(addr) | (set)) & ~(clear))
-+#define mstp_setbits_le32(addr, saddr, set) \
-+		mstp_setbits(le32, addr, saddr, set)
-+#define mstp_clrbits_le32(addr, saddr, clear) \
-+		mstp_clrbits(le32, addr, saddr, clear)
-+#define mstp_setclrbits_le32(addr, set, clear) \
-+		mstp_setclrbits(le32, addr, set, clear)
-+
-+#ifndef CONFIG_SMSTP0_ENA
-+#define CONFIG_SMSTP0_ENA	0x00
-+#endif
-+#ifndef CONFIG_SMSTP1_ENA
-+#define CONFIG_SMSTP1_ENA	0x00
-+#endif
-+#ifndef CONFIG_SMSTP2_ENA
-+#define CONFIG_SMSTP2_ENA	0x00
-+#endif
-+#ifndef CONFIG_SMSTP3_ENA
-+#define CONFIG_SMSTP3_ENA	0x00
-+#endif
-+#ifndef CONFIG_SMSTP4_ENA
-+#define CONFIG_SMSTP4_ENA	0x00
-+#endif
-+#ifndef CONFIG_SMSTP5_ENA
-+#define CONFIG_SMSTP5_ENA	0x00
-+#endif
-+#ifndef CONFIG_SMSTP6_ENA
-+#define CONFIG_SMSTP6_ENA	0x00
-+#endif
-+#ifndef CONFIG_SMSTP7_ENA
-+#define CONFIG_SMSTP7_ENA	0x00
-+#endif
-+#ifndef CONFIG_SMSTP8_ENA
-+#define CONFIG_SMSTP8_ENA	0x00
-+#endif
-+#ifndef CONFIG_SMSTP9_ENA
-+#define CONFIG_SMSTP9_ENA	0x00
-+#endif
-+#ifndef CONFIG_SMSTP10_ENA
-+#define CONFIG_SMSTP10_ENA	0x00
-+#endif
-+#ifndef CONFIG_SMSTP11_ENA
-+#define CONFIG_SMSTP11_ENA	0x00
-+#endif
-+
-+#ifndef CONFIG_RMSTP0_ENA
-+#define CONFIG_RMSTP0_ENA	0x00
-+#endif
-+#ifndef CONFIG_RMSTP1_ENA
-+#define CONFIG_RMSTP1_ENA	0x00
-+#endif
-+#ifndef CONFIG_RMSTP2_ENA
-+#define CONFIG_RMSTP2_ENA	0x00
-+#endif
-+#ifndef CONFIG_RMSTP3_ENA
-+#define CONFIG_RMSTP3_ENA	0x00
-+#endif
-+#ifndef CONFIG_RMSTP4_ENA
-+#define CONFIG_RMSTP4_ENA	0x00
-+#endif
-+#ifndef CONFIG_RMSTP5_ENA
-+#define CONFIG_RMSTP5_ENA	0x00
-+#endif
-+#ifndef CONFIG_RMSTP6_ENA
-+#define CONFIG_RMSTP6_ENA	0x00
-+#endif
-+#ifndef CONFIG_RMSTP7_ENA
-+#define CONFIG_RMSTP7_ENA	0x00
-+#endif
-+#ifndef CONFIG_RMSTP8_ENA
-+#define CONFIG_RMSTP8_ENA	0x00
-+#endif
-+#ifndef CONFIG_RMSTP9_ENA
-+#define CONFIG_RMSTP9_ENA	0x00
-+#endif
-+#ifndef CONFIG_RMSTP10_ENA
-+#define CONFIG_RMSTP10_ENA	0x00
-+#endif
-+#ifndef CONFIG_RMSTP11_ENA
-+#define CONFIG_RMSTP11_ENA	0x00
-+#endif
-+
-+struct mstp_ctl {
-+	u32 s_addr;
-+	u32 s_dis;
-+	u32 s_ena;
-+	u32 r_addr;
-+	u32 r_dis;
-+	u32 r_ena;
-+};
-+
-+#endif /* __ASM_ARCH_RCAR_MSTP_H */
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-socfpga/clock_manager.h u-boot/arch/arm/include/asm/arch-socfpga/clock_manager.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-socfpga/clock_manager.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-socfpga/clock_manager.h	2015-01-01 17:34:32.089505941 +0100
-@@ -14,6 +14,7 @@
- unsigned int cm_get_l4_sp_clk_hz(void);
- unsigned int cm_get_mmc_controller_clk_hz(void);
- unsigned int cm_get_qspi_controller_clk_hz(void);
-+unsigned int cm_get_spi_controller_clk_hz(void);
- #endif
- 
- typedef struct {
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-socfpga/freeze_controller.h u-boot/arch/arm/include/asm/arch-socfpga/freeze_controller.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-socfpga/freeze_controller.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-socfpga/freeze_controller.h	2015-01-01 17:34:32.089505941 +0100
-@@ -42,7 +42,6 @@
- #define SYSMGR_FRZCTRL_HWCTRL_VIO1REQ_MASK 0x00000001
- #define SYSMGR_FRZCTRL_HWCTRL_VIO1STATE_ENUM_FROZEN 0x2
- #define SYSMGR_FRZCTRL_HWCTRL_VIO1STATE_ENUM_THAWED 0x1
--#define SYSMGR_FRZCTRL_VIOCTRL_SHIFT 0x2
- 
- void sys_mgr_frzctrl_freeze_req(void);
- void sys_mgr_frzctrl_thaw_req(void);
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-socfpga/scan_manager.h u-boot/arch/arm/include/asm/arch-socfpga/scan_manager.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-socfpga/scan_manager.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-socfpga/scan_manager.h	2015-01-01 17:34:32.089505941 +0100
-@@ -13,6 +13,7 @@
- 	u32	padding[2];
- 	u32	fifo_single_byte;
- 	u32	fifo_double_byte;
-+	u32	fifo_triple_byte;
- 	u32	fifo_quad_byte;
- };
- 
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-stv0991/gpio.h u-boot/arch/arm/include/asm/arch-stv0991/gpio.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-stv0991/gpio.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-stv0991/gpio.h	2015-01-01 17:34:32.093505875 +0100
-@@ -0,0 +1,22 @@
-+/*
-+ * (C) Copyright 2014
-+ * Vikas Manocha, ST Micoelectronics, vikas.manocha at st.com
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#ifndef __ASM_ARCH_STV0991_GPIO_H
-+#define __ASM_ARCH_STV0991_GPIO_H
-+
-+enum gpio_direction {
-+	GPIO_DIRECTION_IN,
-+	GPIO_DIRECTION_OUT,
-+};
-+
-+struct gpio_regs {
-+	u32 data;		/* offset 0x0 */
-+	u32 reserved[0xff];	/* 0x4--0x3fc */
-+	u32 dir;		/* offset 0x400 */
-+};
-+
-+#endif	/* __ASM_ARCH_STV0991_GPIO_H */
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-stv0991/hardware.h u-boot/arch/arm/include/asm/arch-stv0991/hardware.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-stv0991/hardware.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-stv0991/hardware.h	2015-01-01 17:34:32.093505875 +0100
-@@ -0,0 +1,73 @@
-+/*
-+ * (C) Copyright 2014
-+ * Vikas Manocha, STMicroelectronics, <vikas.manocha at st.com>
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#ifndef _ASM_ARCH_HARDWARE_H
-+#define _ASM_ARCH_HARDWARE_H
-+
-+/* STV0991 */
-+#define SRAM0_BASE_ADDR                          0x00000000UL
-+#define SRAM1_BASE_ADDR                          0x00068000UL
-+#define SRAM2_BASE_ADDR                          0x000D0000UL
-+#define SRAM3_BASE_ADDR                          0x00138000UL
-+#define CFS_SRAM0_BASE_ADDR                      0x00198000UL
-+#define CFS_SRAM1_BASE_ADDR                      0x001B8000UL
-+#define FAST_SRAM_BASE_ADDR                      0x001D8000UL
-+#define FLASH_BASE_ADDR                          0x40000000UL
-+#define PL310_BASE_ADDR                          0x70000000UL
-+#define HSAXIM_BASE_ADDR                         0x70100000UL
-+#define IMGSS_BASE_ADDR                          0x70200000UL
-+#define ADC_BASE_ADDR                            0x80000000UL
-+#define GPIOA_BASE_ADDR                          0x80001000UL
-+#define GPIOB_BASE_ADDR                          0x80002000UL
-+#define GPIOC_BASE_ADDR                          0x80003000UL
-+#define HDM_BASE_ADDR                            0x80004000UL
-+#define THSENS_BASE_ADDR                         0x80200000UL
-+#define GPTIMER2_BASE_ADDR                       0x80201000UL
-+#define GPTIMER1_BASE_ADDR                       0x80202000UL
-+#define QSPI_BASE_ADDR                           0x80203000UL
-+#define CGU_BASE_ADDR                            0x80204000UL
-+#define CREG_BASE_ADDR                           0x80205000UL
-+#define PEC_BASE_ADDR                            0x80206000UL
-+#define WDRU_BASE_ADDR                           0x80207000UL
-+#define BSEC_BASE_ADDR                           0x80208000UL
-+#define DAP_ROM_BASE_ADDR                        0x80210000UL
-+#define SOC_CTI_BASE_ADDR                        0x80211000UL
-+#define TPIU_BASE_ADDR                           0x80212000UL
-+#define TMC_ETF_BASE_ADDR                        0x80213000UL
-+#define R4_ETM_BASE_ADDR                         0x80214000UL
-+#define R4_CTI_BASE_ADDR                         0x80215000UL
-+#define R4_DBG_BASE_ADDR                         0x80216000UL
-+#define GMAC_BASE_ADDR                           0x80300000UL
-+#define RNSS_BASE_ADDR                           0x80302000UL
-+#define CRYP_BASE_ADDR                           0x80303000UL
-+#define HASH_BASE_ADDR                           0x80304000UL
-+#define GPDMA_BASE_ADDR                          0x80305000UL
-+#define ISA_BASE_ADDR                            0x8032A000UL
-+#define HCI_BASE_ADDR                            0x80400000UL
-+#define I2C1_BASE_ADDR                           0x80401000UL
-+#define I2C2_BASE_ADDR                           0x80402000UL
-+#define SAI_BASE_ADDR                            0x80403000UL
-+#define USI_BASE_ADDR                            0x80404000UL
-+#define SPI1_BASE_ADDR                           0x80405000UL
-+#define UART_BASE_ADDR                           0x80406000UL
-+#define SPI2_BASE_ADDR                           0x80500000UL
-+#define CAN_BASE_ADDR                            0x80501000UL
-+#define USART1_BASE_ADDR                         0x80502000UL
-+#define USART2_BASE_ADDR                         0x80503000UL
-+#define USART3_BASE_ADDR                         0x80504000UL
-+#define USART4_BASE_ADDR                         0x80505000UL
-+#define USART5_BASE_ADDR                         0x80506000UL
-+#define USART6_BASE_ADDR                         0x80507000UL
-+#define SDI2_BASE_ADDR                           0x80600000UL
-+#define SDI1_BASE_ADDR                           0x80601000UL
-+#define VICA_BASE_ADDR                           0x81000000UL
-+#define VICB_BASE_ADDR                           0x81001000UL
-+#define STM_CHANNELS_BASE_ADDR                   0x81100000UL
-+#define STM_BASE_ADDR                            0x81110000UL
-+#define SROM_BASE_ADDR                           0xFFFF0000UL
-+
-+#endif /* _ASM_ARCH_HARDWARE_H */
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-stv0991/stv0991_cgu.h u-boot/arch/arm/include/asm/arch-stv0991/stv0991_cgu.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-stv0991/stv0991_cgu.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-stv0991/stv0991_cgu.h	2015-01-01 17:34:32.093505875 +0100
-@@ -0,0 +1,116 @@
-+/*
-+ * (C) Copyright 2014
-+ * Vikas Manocha, ST Micoelectronics, vikas.manocha at st.com
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#ifndef _STV0991_CGU_H
-+#define _STV0991_CGU_H
-+
-+struct stv0991_cgu_regs {
-+	u32 cpu_freq;		/* offset 0x0 */
-+	u32 icn2_freq;		/* offset 0x4 */
-+	u32 dma_freq;		/* offset 0x8 */
-+	u32 isp_freq;		/* offset 0xc */
-+	u32 h264_freq;		/* offset 0x10 */
-+	u32 osif_freq;		/* offset 0x14 */
-+	u32 ren_freq;		/* offset 0x18 */
-+	u32 tim_freq;		/* offset 0x1c */
-+	u32 sai_freq;		/* offset 0x20 */
-+	u32 eth_freq;		/* offset 0x24 */
-+	u32 i2c_freq;		/* offset 0x28 */
-+	u32 spi_freq;		/* offset 0x2c */
-+	u32 uart_freq;		/* offset 0x30 */
-+	u32 qspi_freq;		/* offset 0x34 */
-+	u32 sdio_freq;		/* offset 0x38 */
-+	u32 usi_freq;		/* offset 0x3c */
-+	u32 can_line_freq;	/* offset 0x40 */
-+	u32 debug_freq;		/* offset 0x44 */
-+	u32 trace_freq;		/* offset 0x48 */
-+	u32 stm_freq;		/* offset 0x4c */
-+	u32 eth_ctrl;		/* offset 0x50 */
-+	u32 reserved[3];	/* offset 0x54 */
-+	u32 osc_ctrl;		/* offset 0x60 */
-+	u32 pll1_ctrl;		/* offset 0x64 */
-+	u32 pll1_freq;		/* offset 0x68 */
-+	u32 pll1_fract;		/* offset 0x6c */
-+	u32 pll1_spread;	/* offset 0x70 */
-+	u32 pll1_status;	/* offset 0x74 */
-+	u32 pll2_ctrl;		/* offset 0x78 */
-+	u32 pll2_freq;		/* offset 0x7c */
-+	u32 pll2_fract;		/* offset 0x80 */
-+	u32 pll2_spread;	/* offset 0x84 */
-+	u32 pll2_status;	/* offset 0x88 */
-+	u32 cgu_enable_1;	/* offset 0x8c */
-+	u32 cgu_enable_2;	/* offset 0x90 */
-+	u32 cgu_isp_pulse;	/* offset 0x94 */
-+	u32 cgu_h264_pulse;	/* offset 0x98 */
-+	u32 cgu_osif_pulse;	/* offset 0x9c */
-+	u32 cgu_ren_pulse;	/* offset 0xa0 */
-+
-+};
-+
-+/* CGU Timer */
-+#define CLK_TMR_OSC			0
-+#define CLK_TMR_MCLK			1
-+#define CLK_TMR_PLL1			2
-+#define CLK_TMR_PLL2			3
-+#define MDIV_SHIFT_TMR			3
-+#define DIV_SHIFT_TMR			6
-+
-+#define TIMER1_CLK_CFG			(0 << DIV_SHIFT_TMR \
-+					| 0 << MDIV_SHIFT_TMR | CLK_TMR_MCLK)
-+
-+/* Clock Enable/Disable */
-+
-+#define TIMER1_CLK_EN			(1 << 15)
-+
-+/* CGU Uart config */
-+#define CLK_UART_MCLK			0
-+#define CLK_UART_PLL1			1
-+#define CLK_UART_PLL2			2
-+
-+#define MDIV_SHIFT_UART			3
-+#define DIV_SHIFT_UART			6
-+
-+#define UART_CLK_CFG			(4 << DIV_SHIFT_UART \
-+					| 1 << MDIV_SHIFT_UART | CLK_UART_MCLK)
-+
-+/* CGU Ethernet clock config */
-+#define CLK_ETH_MCLK			0
-+#define CLK_ETH_PLL1			1
-+#define CLK_ETH_PLL2			2
-+
-+#define MDIV_SHIFT_ETH			3
-+#define DIV_SHIFT_ETH			6
-+#define DIV_ETH_125			9
-+#define DIV_ETH_50			12
-+#define DIV_ETH_P2P			15
-+
-+#define ETH_CLK_CFG			(4 << DIV_ETH_P2P | 4 << DIV_ETH_50 \
-+					| 1 << DIV_ETH_125 \
-+					| 0 << DIV_SHIFT_ETH \
-+					| 3 << MDIV_SHIFT_ETH | CLK_ETH_PLL1)
-+ /* CGU Ethernet control */
-+
-+#define ETH_CLK_TX_EXT_PHY		0
-+#define ETH_CLK_TX_125M			1
-+#define ETH_CLK_TX_25M			2
-+#define ETH_CLK_TX_2M5			3
-+#define ETH_CLK_TX_DIS			7
-+
-+#define ETH_CLK_RX_EXT_PHY		0
-+#define ETH_CLK_RX_25M			1
-+#define ETH_CLK_RX_2M5			2
-+#define ETH_CLK_RX_DIS			3
-+#define RX_CLK_SHIFT			3
-+#define ETH_CLK_MASK			~(0x1F)
-+
-+#define ETH_PHY_MODE_GMII		0
-+#define ETH_PHY_MODE_RMII		1
-+#define ETH_PHY_CLK_DIS			1
-+
-+#define ETH_CLK_CTRL			(ETH_CLK_RX_EXT_PHY << RX_CLK_SHIFT \
-+					| ETH_CLK_TX_EXT_PHY)
-+#endif
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-stv0991/stv0991_creg.h u-boot/arch/arm/include/asm/arch-stv0991/stv0991_creg.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-stv0991/stv0991_creg.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-stv0991/stv0991_creg.h	2015-01-01 17:34:32.093505875 +0100
-@@ -0,0 +1,95 @@
-+/*
-+ * (C) Copyright 2014
-+ * Vikas Manocha, ST Micoelectronics, vikas.manocha at st.com
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#ifndef _STV0991_CREG_H
-+#define _STV0991_CREG_H
-+
-+struct stv0991_creg {
-+	u32 version;		/* offset 0x0 */
-+	u32 hdpctl;		/* offset 0x4 */
-+	u32 hdpval;		/* offset 0x8 */
-+	u32 hdpgposet;		/* offset 0xc */
-+	u32 hdpgpoclr;		/* offset 0x10 */
-+	u32 hdpgpoval;		/* offset 0x14 */
-+	u32 stm_mux;		/* offset 0x18 */
-+	u32 sysctrl_1;		/* offset 0x1c */
-+	u32 sysctrl_2;		/* offset 0x20 */
-+	u32 sysctrl_3;		/* offset 0x24 */
-+	u32 sysctrl_4;		/* offset 0x28 */
-+	u32 reserved_1[0x35];	/* offset 0x2C-0xFC */
-+	u32 mux1;		/* offset 0x100 */
-+	u32 mux2;		/* offset 0x104 */
-+	u32 mux3;		/* offset 0x108 */
-+	u32 mux4;		/* offset 0x10c */
-+	u32 mux5;		/* offset 0x110 */
-+	u32 mux6;		/* offset 0x114 */
-+	u32 mux7;		/* offset 0x118 */
-+	u32 mux8;		/* offset 0x11c */
-+	u32 mux9;		/* offset 0x120 */
-+	u32 mux10;		/* offset 0x124 */
-+	u32 mux11;		/* offset 0x128 */
-+	u32 mux12;		/* offset 0x12c */
-+	u32 mux13;		/* offset 0x130 */
-+	u32 reserved_2[0x33];	/* offset 0x134-0x1FC */
-+	u32 cfg_pad1;		/* offset 0x200 */
-+	u32 cfg_pad2;		/* offset 0x204 */
-+	u32 cfg_pad3;		/* offset 0x208 */
-+	u32 cfg_pad4;		/* offset 0x20c */
-+	u32 cfg_pad5;		/* offset 0x210 */
-+	u32 cfg_pad6;		/* offset 0x214 */
-+	u32 cfg_pad7;		/* offset 0x218 */
-+	u32 reserved_3[0x39];	/* offset 0x21C-0x2FC */
-+	u32 vdd_pad1;		/* offset 0x300 */
-+	u32 vdd_pad2;		/* offset 0x304 */
-+	u32 reserved_4[0x3e];	/* offset 0x308-0x3FC */
-+	u32 vdd_comp1;		/* offset 0x400 */
-+};
-+
-+/* CREG MUX 12 register */
-+#define GPIOC_30_MUX_SHIFT	24
-+#define GPIOC_30_MUX_MASK	~(1 << GPIOC_30_MUX_SHIFT)
-+#define CFG_GPIOC_30_UART_TX	(1 << GPIOC_30_MUX_SHIFT)
-+
-+#define GPIOC_31_MUX_SHIFT	28
-+#define GPIOC_31_MUX_MASK	~(1 << GPIOC_31_MUX_SHIFT)
-+#define CFG_GPIOC_31_UART_RX	(1 << GPIOC_31_MUX_SHIFT)
-+
-+/* CREG MUX 7 register */
-+#define GPIOB_16_MUX_SHIFT	0
-+#define GPIOB_16_MUX_MASK	~(1 << GPIOB_16_MUX_SHIFT)
-+#define CFG_GPIOB_16_UART_TX	(1 << GPIOB_16_MUX_SHIFT)
-+
-+#define GPIOB_17_MUX_SHIFT	4
-+#define GPIOB_17_MUX_MASK	~(1 << GPIOB_17_MUX_SHIFT)
-+#define CFG_GPIOB_17_UART_RX	(1 << GPIOB_17_MUX_SHIFT)
-+
-+/* CREG CFG_PAD6 register */
-+
-+#define GPIOC_31_MODE_SHIFT	30
-+#define GPIOC_31_MODE_MASK	~(1 << GPIOC_31_MODE_SHIFT)
-+#define CFG_GPIOC_31_MODE_OD	(0 << GPIOC_31_MODE_SHIFT)
-+#define CFG_GPIOC_31_MODE_PP	(1 << GPIOC_31_MODE_SHIFT)
-+
-+#define GPIOC_30_MODE_SHIFT	28
-+#define GPIOC_30_MODE_MASK	~(1 << GPIOC_30_MODE_SHIFT)
-+#define CFG_GPIOC_30_MODE_LOW	(0 << GPIOC_30_MODE_SHIFT)
-+#define CFG_GPIOC_30_MODE_HIGH	(1 << GPIOC_30_MODE_SHIFT)
-+
-+/* CREG Ethernet pad config */
-+
-+#define VDD_ETH_PS_1V8		0
-+#define VDD_ETH_PS_2V5		2
-+#define VDD_ETH_PS_3V3		3
-+#define VDD_ETH_PS_MASK		0x3
-+
-+#define VDD_ETH_PS_SHIFT	12
-+#define ETH_VDD_CFG		(VDD_ETH_PS_1V8 << VDD_ETH_PS_SHIFT)
-+
-+#define VDD_ETH_M_PS_SHIFT	28
-+#define ETH_M_VDD_CFG		(VDD_ETH_PS_1V8 << VDD_ETH_M_PS_SHIFT)
-+
-+#endif
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-stv0991/stv0991_defs.h u-boot/arch/arm/include/asm/arch-stv0991/stv0991_defs.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-stv0991/stv0991_defs.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-stv0991/stv0991_defs.h	2015-01-01 17:34:32.093505875 +0100
-@@ -0,0 +1,16 @@
-+/*
-+ * (C) Copyright 2014
-+ * Vikas Manocha, ST Micoelectronics, vikas.manocha at st.com.
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#ifndef __STV0991_DEFS_H__
-+#define __STV0991_DEFS_H__
-+#include <asm/arch/stv0991_periph.h>
-+
-+extern int stv0991_pinmux_config(enum periph_id);
-+extern int clock_setup(enum periph_clock);
-+
-+#endif
-+
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-stv0991/stv0991_gpt.h u-boot/arch/arm/include/asm/arch-stv0991/stv0991_gpt.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-stv0991/stv0991_gpt.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-stv0991/stv0991_gpt.h	2015-01-01 17:34:32.093505875 +0100
-@@ -0,0 +1,43 @@
-+/*
-+ * (C) Copyright 2014
-+ * Vikas Manocha, ST Micoelectronics, vikas.manocha at st.com.
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#ifndef _STV0991_GPT_H
-+#define _STV0991_GPT_H
-+
-+#include <asm/arch-stv0991/hardware.h>
-+
-+struct gpt_regs {
-+	u32 cr1;
-+	u32 cr2;
-+	u32 reserved_1;
-+	u32 dier;	/* dma_int_en */
-+	u32 sr;		/* status reg */
-+	u32 egr;	/* event gen */
-+	u32 reserved_2[3];	/* offset 0x18--0x20*/
-+	u32 cnt;
-+	u32 psc;
-+	u32 arr;
-+};
-+
-+struct gpt_regs *const gpt1_regs_ptr =
-+	(struct gpt_regs *) GPTIMER1_BASE_ADDR;
-+
-+/* Timer control1 register  */
-+#define GPT_CR1_CEN			0x0001
-+#define GPT_MODE_AUTO_RELOAD		(1 << 7)
-+
-+/* Timer prescalar reg */
-+#define GPT_PRESCALER_128		0x128
-+
-+/* Auto reload register for free running config */
-+#define GPT_FREE_RUNNING		0xFFFF
-+
-+/* Timer, HZ specific defines */
-+#define CONFIG_STV0991_HZ		1000
-+#define CONFIG_STV0991_HZ_CLOCK		(27*1000*1000)/GPT_PRESCALER_128
-+
-+#endif
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-stv0991/stv0991_periph.h u-boot/arch/arm/include/asm/arch-stv0991/stv0991_periph.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-stv0991/stv0991_periph.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-stv0991/stv0991_periph.h	2015-01-01 17:34:32.093505875 +0100
-@@ -0,0 +1,44 @@
-+/*
-+ * (C) Copyright 2014
-+ * Vikas Manocha, ST Micoelectronics, vikas.manocha at st.com.
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#ifndef __ASM_ARM_ARCH_PERIPH_H
-+#define __ASM_ARM_ARCH_PERIPH_H
-+
-+/*
-+ * Peripherals required for pinmux configuration. List will
-+ * grow with support for more devices getting added.
-+ * Numbering based on interrupt table.
-+ *
-+ */
-+enum periph_id {
-+	UART_GPIOC_30_31 = 0,
-+	UART_GPIOB_16_17,
-+	ETH_GPIOB_10_31_C_0_4,
-+	PERIPH_ID_I2C0,
-+	PERIPH_ID_I2C1,
-+	PERIPH_ID_I2C2,
-+	PERIPH_ID_I2C3,
-+	PERIPH_ID_I2C4,
-+	PERIPH_ID_I2C5,
-+	PERIPH_ID_I2C6,
-+	PERIPH_ID_I2C7,
-+	PERIPH_ID_SPI0,
-+	PERIPH_ID_SPI1,
-+	PERIPH_ID_SPI2,
-+	PERIPH_ID_SDMMC0,
-+	PERIPH_ID_SDMMC1,
-+	PERIPH_ID_SDMMC2,
-+	PERIPH_ID_SDMMC3,
-+	PERIPH_ID_I2S1,
-+};
-+
-+enum periph_clock {
-+	UART_CLOCK_CFG = 0,
-+	ETH_CLOCK_CFG,
-+};
-+
-+#endif /* __ASM_ARM_ARCH_PERIPH_H */
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-stv0991/stv0991_wdru.h u-boot/arch/arm/include/asm/arch-stv0991/stv0991_wdru.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-stv0991/stv0991_wdru.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-stv0991/stv0991_wdru.h	2015-01-01 17:34:32.093505875 +0100
-@@ -0,0 +1,28 @@
-+/*
-+ * (C) Copyright 2014
-+ * Vikas Manocha, ST Micoelectronics, vikas.manocha at st.com
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#ifndef _STV0991_WD_RST_H
-+#define _STV0991_WD_RST_H
-+#include <asm/arch-stv0991/hardware.h>
-+
-+struct stv0991_wd_ru {
-+	u32 wdru_config;
-+	u32 wdru_ctrl1;
-+	u32 wdru_ctrl2;
-+	u32 wdru_tim;
-+	u32 wdru_count;
-+	u32 wdru_stat;
-+	u32 wdru_wrlock;
-+};
-+
-+struct stv0991_wd_ru *const stv0991_wd_ru_ptr = \
-+		(struct stv0991_wd_ru *)WDRU_BASE_ADDR;
-+
-+/* Watchdog control register */
-+#define WDRU_RST_SYS		0x1
-+
-+#endif
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-tegra/tegra_i2c.h u-boot/arch/arm/include/asm/arch-tegra/tegra_i2c.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-tegra/tegra_i2c.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-tegra/tegra_i2c.h	2015-01-01 17:34:32.097505809 +0100
-@@ -167,6 +167,6 @@
-  *
-  * @return number of bus, or -1 if there is no DVC active
-  */
--int tegra_i2c_get_dvc_bus_num(void);
-+int tegra_i2c_get_dvc_bus(struct udevice **busp);
- 
- #endif	/* _TEGRA_I2C_H_ */
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/arch-vf610/imx-regs.h u-boot/arch/arm/include/asm/arch-vf610/imx-regs.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/arch-vf610/imx-regs.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/include/asm/arch-vf610/imx-regs.h	2015-01-01 17:34:32.109505612 +0100
-@@ -256,6 +256,14 @@
- #define DDRMC_CR161_TODTH_RD(v)				(((v) & 0xf) << 8)
- #define DDRMC_CR161_TODTH_WR(v)				((v) & 0xf)
- 
-+/* System Reset Controller (SRC) */
-+#define SRC_SRSR_SW_RST					(0x1 << 18)
-+#define SRC_SRSR_RESETB					(0x1 << 7)
-+#define SRC_SRSR_JTAG_RST				(0x1 << 5)
-+#define SRC_SRSR_WDOG_M4				(0x1 << 4)
-+#define SRC_SRSR_WDOG_A5				(0x1 << 3)
-+#define SRC_SRSR_POR_RST				(0x1 << 0)
-+
- #if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__))
- #include <asm/types.h>
- 
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/kona-common/clk.h u-boot/arch/arm/include/asm/kona-common/clk.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/kona-common/clk.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/include/asm/kona-common/clk.h	2015-01-01 17:34:32.113505547 +0100
-@@ -25,5 +25,6 @@
- struct clk *clk_get_parent(struct clk *clk);
- int clk_sdio_enable(void *base, u32 rate, u32 *actual_ratep);
- int clk_bsc_enable(void *base);
-+int clk_usb_otg_enable(void *base);
- 
- #endif
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/pcie_layerscape.h u-boot/arch/arm/include/asm/pcie_layerscape.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/pcie_layerscape.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/arm/include/asm/pcie_layerscape.h	2015-01-01 17:34:32.125505350 +0100
-@@ -0,0 +1,13 @@
-+/*
-+ * Copyright 2014 Freescale Semiconductor, Inc.
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#ifndef __PCIE_LAYERSCAPE_H_
-+#define __PCIE_LAYERSCAPE_H_
-+
-+void pci_init_board(void);
-+void ft_pcie_setup(void *blob, bd_t *bd);
-+
-+#endif
-diff -ruN u-boot-2015.01-rc3/arch/arm/include/asm/semihosting.h u-boot/arch/arm/include/asm/semihosting.h
---- u-boot-2015.01-rc3/arch/arm/include/asm/semihosting.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/include/asm/semihosting.h	2015-01-01 17:34:32.125505350 +0100
-@@ -12,10 +12,6 @@
-  * code for more information.
-  */
- int smh_load(const char *fname, void *memp, int avail, int verbose);
--int smh_read(int fd, void *memp, int len);
--int smh_open(const char *fname, char *modestr);
--int smh_close(int fd);
--int smh_len_fd(int fd);
--int smh_len(const char *fname);
-+long smh_len(const char *fname);
- 
- #endif /* __SEMIHOSTING_H__ */
-diff -ruN u-boot-2015.01-rc3/arch/arm/Kconfig u-boot/arch/arm/Kconfig
---- u-boot-2015.01-rc3/arch/arm/Kconfig	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/Kconfig	2015-01-01 17:34:31.989507580 +0100
-@@ -341,6 +341,10 @@
- 	bool "Support spear600"
- 	select CPU_ARM926EJS
- 
-+config TARGET_STV0991
-+	bool "Support stv0991"
-+	select CPU_V7
-+
- config TARGET_X600
- 	bool "Support x600"
- 	select CPU_ARM926EJS
-@@ -650,6 +654,7 @@
- 
- config TARGET_TBS2910
- 	bool "Support tbs2910"
-+	select CPU_V7
- 
- config TARGET_TQMA6
- 	bool "TQ Systems TQMa6 board"
-@@ -728,12 +733,14 @@
- 	select ARM64
- 
- config TARGET_LS1021AQDS
--	bool "Support ls1021aqds_nor"
-+	bool "Support ls1021aqds"
- 	select CPU_V7
-+	select SUPPORT_SPL
- 
- config TARGET_LS1021ATWR
--	bool "Support ls1021atwr_nor"
-+	bool "Support ls1021atwr"
- 	select CPU_V7
-+	select SUPPORT_SPL
- 
- config TARGET_BALLOON3
- 	bool "Support balloon3"
-@@ -793,6 +800,7 @@
- 	bool "Panasonic UniPhier platform"
- 	select CPU_V7
- 	select SUPPORT_SPL
-+	select SPL
- 	select OF_CONTROL if !SPL_BUILD
- 
- endchoice
-@@ -953,6 +961,7 @@
- source "board/spear/x600/Kconfig"
- source "board/st-ericsson/snowball/Kconfig"
- source "board/st-ericsson/u8500/Kconfig"
-+source "board/st/stv0991/Kconfig"
- source "board/sunxi/Kconfig"
- source "board/syteco/jadecpu/Kconfig"
- source "board/syteco/zmx25/Kconfig"
-diff -ruN u-boot-2015.01-rc3/arch/arm/lib/semihosting.c u-boot/arch/arm/lib/semihosting.c
---- u-boot-2015.01-rc3/arch/arm/lib/semihosting.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/arm/lib/semihosting.c	2015-01-01 17:34:32.133505219 +0100
-@@ -26,9 +26,9 @@
- /*
-  * Call the handler
-  */
--static int smh_trap(unsigned int sysnum, void *addr)
-+static long smh_trap(unsigned int sysnum, void *addr)
- {
--	register int result asm("r0");
-+	register long result asm("r0");
- #if defined(CONFIG_ARM64)
- 	asm volatile ("hlt #0xf000" : "=r" (result) : "0"(sysnum), "r"(addr));
- #else
-@@ -39,167 +39,164 @@
- }
- 
- /*
-- * Open, load a file into memory, and close it. Check that the available space
-- * is sufficient to store the entire file. Return the bytes actually read from
-- * the file as seen by the read function. The verbose flag enables some extra
-- * printing of successful read status.
-+ * Open a file on the host. Mode is "r" or "rb" currently. Returns a file
-+ * descriptor or -1 on error.
-  */
--int smh_load(const char *fname, void *memp, int avail, int verbose)
-+static long smh_open(const char *fname, char *modestr)
- {
--	int ret, fd, len;
--
--	ret = -1;
--
--	debug("%s: fname \'%s\', avail %u, memp %p\n", __func__, fname,
--	      avail, memp);
--
--	/* Open the file */
--	fd = smh_open(fname, "rb");
--	if (fd == -1)
--		return ret;
-+	long fd;
-+	unsigned long mode;
-+	struct smh_open_s {
-+		const char *fname;
-+		unsigned long mode;
-+		size_t len;
-+	} open;
- 
--	/* Get the file length */
--	ret = smh_len_fd(fd);
--	if (ret == -1) {
--		smh_close(fd);
--		return ret;
--	}
-+	debug("%s: file \'%s\', mode \'%s\'\n", __func__, fname, modestr);
- 
--	/* Check that the file will fit in the supplied buffer */
--	if (ret > avail) {
--		printf("%s: ERROR ret %d, avail %u\n", __func__, ret,
--		       avail);
--		smh_close(fd);
--		return ret;
-+	/* Check the file mode */
-+	if (!(strcmp(modestr, "r"))) {
-+		mode = MODE_READ;
-+	} else if (!(strcmp(modestr, "rb"))) {
-+		mode = MODE_READBIN;
-+	} else {
-+		printf("%s: ERROR mode \'%s\' not supported\n", __func__,
-+		       modestr);
-+		return -1;
- 	}
- 
--	len = ret;
--
--	/* Read the file into the buffer */
--	ret = smh_read(fd, memp, len);
--	if (ret == 0) {
--		/* Print successful load information if requested */
--		if (verbose) {
--			printf("\n%s\n", fname);
--			printf("    0x%8p dest\n", memp);
--			printf("    0x%08x size\n", len);
--			printf("    0x%08x avail\n", avail);
--		}
--	}
-+	open.fname = fname;
-+	open.len = strlen(fname);
-+	open.mode = mode;
- 
--	/* Close the file */
--	smh_close(fd);
-+	/* Open the file on the host */
-+	fd = smh_trap(SYSOPEN, &open);
-+	if (fd == -1)
-+		printf("%s: ERROR fd %ld for file \'%s\'\n", __func__, fd,
-+		       fname);
- 
--	return ret;
-+	return fd;
- }
- 
- /*
-  * Read 'len' bytes of file into 'memp'. Returns 0 on success, else failure
-  */
--int smh_read(int fd, void *memp, int len)
-+static long smh_read(long fd, void *memp, size_t len)
- {
--	int ret;
-+	long ret;
- 	struct smh_read_s {
--		int fd;
-+		long fd;
- 		void *memp;
--		int len;
-+		size_t len;
- 	} read;
- 
--	debug("%s: fd %d, memp %p, len %d\n", __func__, fd, memp, len);
-+	debug("%s: fd %ld, memp %p, len %lu\n", __func__, fd, memp, len);
- 
- 	read.fd = fd;
- 	read.memp = memp;
- 	read.len = len;
- 
- 	ret = smh_trap(SYSREAD, &read);
--	if (ret == 0) {
--		return 0;
--	} else {
-+	if (ret < 0) {
- 		/*
- 		 * The ARM handler allows for returning partial lengths,
- 		 * but in practice this never happens so rather than create
- 		 * hard to maintain partial read loops and such, just fail
- 		 * with an error message.
- 		 */
--		printf("%s: ERROR ret %d, fd %d, len %u memp %p\n",
-+		printf("%s: ERROR ret %ld, fd %ld, len %lu memp %p\n",
- 		       __func__, ret, fd, len, memp);
-+		return -1;
- 	}
--	return ret;
-+
-+	return 0;
- }
- 
- /*
-- * Open a file on the host. Mode is "r" or "rb" currently. Returns a file
-- * descriptor or -1 on error.
-+ * Close the file using the file descriptor
-  */
--int smh_open(const char *fname, char *modestr)
-+static long smh_close(long fd)
- {
--	int ret, fd, mode;
--	struct smh_open_s {
--		const char *fname;
--		unsigned int mode;
--		unsigned int len;
--	} open;
-+	long ret;
- 
--	debug("%s: file \'%s\', mode \'%s\'\n", __func__, fname, modestr);
--
--	ret = -1;
-+	debug("%s: fd %ld\n", __func__, fd);
- 
--	/* Check the file mode */
--	if (!(strcmp(modestr, "r"))) {
--		mode = MODE_READ;
--	} else if (!(strcmp(modestr, "rb"))) {
--		mode = MODE_READBIN;
--	} else {
--		printf("%s: ERROR mode \'%s\' not supported\n", __func__,
--		       modestr);
--		return ret;
--	}
--
--	open.fname = fname;
--	open.len = strlen(fname);
--	open.mode = mode;
--
--	/* Open the file on the host */
--	fd = smh_trap(SYSOPEN, &open);
--	if (fd == -1)
--		printf("%s: ERROR fd %d for file \'%s\'\n", __func__, fd,
--		       fname);
-+	ret = smh_trap(SYSCLOSE, &fd);
-+	if (ret == -1)
-+		printf("%s: ERROR fd %ld\n", __func__, fd);
- 
--	return fd;
-+	return ret;
- }
- 
- /*
-- * Close the file using the file descriptor
-+ * Get the file length from the file descriptor
-  */
--int smh_close(int fd)
-+static long smh_len_fd(long fd)
- {
--	int ret;
--	long fdlong;
-+	long ret;
- 
--	debug("%s: fd %d\n", __func__, fd);
-+	debug("%s: fd %ld\n", __func__, fd);
- 
--	fdlong = (long)fd;
--	ret = smh_trap(SYSCLOSE, &fdlong);
-+	ret = smh_trap(SYSFLEN, &fd);
- 	if (ret == -1)
--		printf("%s: ERROR fd %d\n", __func__, fd);
-+		printf("%s: ERROR ret %ld, fd %ld\n", __func__, ret, fd);
- 
- 	return ret;
- }
- 
- /*
-- * Get the file length from the file descriptor
-+ * Open, load a file into memory, and close it. Check that the available space
-+ * is sufficient to store the entire file. Return the bytes actually read from
-+ * the file as seen by the read function. The verbose flag enables some extra
-+ * printing of successful read status.
-  */
--int smh_len_fd(int fd)
-+int smh_load(const char *fname, void *memp, int avail, int verbose)
- {
--	int ret;
--	long fdlong;
-+	long ret;
-+	long fd;
-+	size_t len;
- 
--	debug("%s: fd %d\n", __func__, fd);
-+	ret = -1;
- 
--	fdlong = (long)fd;
--	ret = smh_trap(SYSFLEN, &fdlong);
--	if (ret == -1)
--		printf("%s: ERROR ret %d\n", __func__, ret);
-+	debug("%s: fname \'%s\', avail %u, memp %p\n", __func__, fname,
-+	      avail, memp);
-+
-+	/* Open the file */
-+	fd = smh_open(fname, "rb");
-+	if (fd == -1)
-+		return -1;
-+
-+	/* Get the file length */
-+	ret = smh_len_fd(fd);
-+	if (ret == -1) {
-+		smh_close(fd);
-+		return -1;
-+	}
-+
-+	/* Check that the file will fit in the supplied buffer */
-+	if (ret > avail) {
-+		printf("%s: ERROR ret %ld, avail %u\n", __func__, ret,
-+		       avail);
-+		smh_close(fd);
-+		return -1;
-+	}
-+
-+	len = ret;
-+
-+	/* Read the file into the buffer */
-+	ret = smh_read(fd, memp, len);
-+	if (ret == 0) {
-+		/* Print successful load information if requested */
-+		if (verbose) {
-+			printf("\n%s\n", fname);
-+			printf("    0x%8p dest\n", memp);
-+			printf("    0x%08lx size\n", len);
-+			printf("    0x%08x avail\n", avail);
-+		}
-+	}
-+
-+	/* Close the file */
-+	smh_close(fd);
- 
- 	return ret;
- }
-@@ -207,26 +204,32 @@
- /*
-  * Get the file length from the filename
-  */
--int smh_len(const char *fname)
-+long smh_len(const char *fname)
- {
--	int ret, fd, len;
-+	long ret;
-+	long fd;
-+	long len;
- 
- 	debug("%s: file \'%s\'\n", __func__, fname);
- 
- 	/* Open the file */
- 	fd = smh_open(fname, "rb");
--	if (fd == -1)
-+	if (fd < 0)
- 		return fd;
- 
- 	/* Get the file length */
- 	len = smh_len_fd(fd);
-+	if (len < 0) {
-+		smh_close(fd);
-+		return len;
-+	}
- 
- 	/* Close the file */
- 	ret = smh_close(fd);
--	if (ret == -1)
-+	if (ret < 0)
- 		return ret;
- 
--	debug("%s: returning len %d\n", __func__, len);
-+	debug("%s: returning len %ld\n", __func__, len);
- 
- 	/* Return the file length (or -1 error indication) */
- 	return len;
-diff -ruN u-boot-2015.01-rc3/arch/microblaze/dts/include/dt-bindings/pinctrl/pinctrl-tegra.h u-boot/arch/microblaze/dts/include/dt-bindings/pinctrl/pinctrl-tegra.h
-diff -ruN u-boot-2015.01-rc3/arch/microblaze/dts/include/dt-bindings/reset/altr,rst-mgr.h u-boot/arch/microblaze/dts/include/dt-bindings/reset/altr,rst-mgr.h
-diff -ruN u-boot-2015.01-rc3/arch/powerpc/cpu/mpc85xx/p5040_ids.c u-boot/arch/powerpc/cpu/mpc85xx/p5040_ids.c
---- u-boot-2015.01-rc3/arch/powerpc/cpu/mpc85xx/p5040_ids.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/powerpc/cpu/mpc85xx/p5040_ids.c	2015-01-01 17:34:32.221503777 +0100
-@@ -49,23 +49,23 @@
- 
- #ifdef CONFIG_SYS_DPAA_FMAN
- struct liodn_id_table fman1_liodn_tbl[] = {
--	SET_FMAN_RX_1G_LIODN(1, 0, 6),
--	SET_FMAN_RX_1G_LIODN(1, 1, 7),
--	SET_FMAN_RX_1G_LIODN(1, 2, 8),
--	SET_FMAN_RX_1G_LIODN(1, 3, 9),
--	SET_FMAN_RX_1G_LIODN(1, 4, 10),
--	SET_FMAN_RX_10G_LIODN(1, 0, 11),
-+	SET_FMAN_RX_1G_LIODN(1, 0, 11),
-+	SET_FMAN_RX_1G_LIODN(1, 1, 12),
-+	SET_FMAN_RX_1G_LIODN(1, 2, 13),
-+	SET_FMAN_RX_1G_LIODN(1, 3, 14),
-+	SET_FMAN_RX_1G_LIODN(1, 4, 15),
-+	SET_FMAN_RX_10G_LIODN(1, 0, 16),
- };
- int fman1_liodn_tbl_sz = ARRAY_SIZE(fman1_liodn_tbl);
- 
- #if (CONFIG_SYS_NUM_FMAN == 2)
- struct liodn_id_table fman2_liodn_tbl[] = {
--	SET_FMAN_RX_1G_LIODN(2, 0, 12),
--	SET_FMAN_RX_1G_LIODN(2, 1, 13),
--	SET_FMAN_RX_1G_LIODN(2, 2, 14),
--	SET_FMAN_RX_1G_LIODN(2, 3, 15),
--	SET_FMAN_RX_1G_LIODN(2, 4, 16),
--	SET_FMAN_RX_10G_LIODN(2, 0, 17),
-+	SET_FMAN_RX_1G_LIODN(2, 0, 17),
-+	SET_FMAN_RX_1G_LIODN(2, 1, 18),
-+	SET_FMAN_RX_1G_LIODN(2, 2, 19),
-+	SET_FMAN_RX_1G_LIODN(2, 3, 20),
-+	SET_FMAN_RX_1G_LIODN(2, 4, 21),
-+	SET_FMAN_RX_10G_LIODN(2, 0, 22),
- };
- int fman2_liodn_tbl_sz = ARRAY_SIZE(fman2_liodn_tbl);
- #endif
-diff -ruN u-boot-2015.01-rc3/arch/powerpc/cpu/mpc85xx/portals.c u-boot/arch/powerpc/cpu/mpc85xx/portals.c
---- u-boot-2015.01-rc3/arch/powerpc/cpu/mpc85xx/portals.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/powerpc/cpu/mpc85xx/portals.c	2015-01-01 17:34:32.221503777 +0100
-@@ -14,9 +14,46 @@
- #include <asm/fsl_portals.h>
- #include <asm/fsl_liodn.h>
- 
-+#define MAX_BPORTALS (CONFIG_SYS_BMAN_CINH_SIZE / CONFIG_SYS_BMAN_SP_CINH_SIZE)
-+#define MAX_QPORTALS (CONFIG_SYS_QMAN_CINH_SIZE / CONFIG_SYS_QMAN_SP_CINH_SIZE)
-+static void inhibit_portals(void __iomem *addr, int max_portals,
-+			int arch_max_portals, int portal_cinh_size)
-+{
-+	uint32_t val;
-+	int i;
-+
-+	/* arch_max_portals is the maximum based on memory size. This includes
-+	 * the reserved memory in the SoC.  max_portals the number of physical
-+	 * portals in the SoC */
-+	if (max_portals > arch_max_portals) {
-+		printf("ERROR: portal config error\n");
-+		max_portals = arch_max_portals;
-+	}
-+
-+	for (i = 0; i < max_portals; i++) {
-+		out_be32(addr, -1);
-+		val = in_be32(addr);
-+		if (!val) {
-+			printf("ERROR: Stopped after %d portals\n", i);
-+			goto done;
-+		}
-+		addr += portal_cinh_size;
-+	}
-+#ifdef DEBUG
-+	printf("Cleared %d portals\n", i);
-+#endif
-+done:
-+
-+	return;
-+}
-+
- void setup_portals(void)
- {
- 	ccsr_qman_t *qman = (void *)CONFIG_SYS_FSL_QMAN_ADDR;
-+	void __iomem *bpaddr = (void *)CONFIG_SYS_BMAN_CINH_BASE +
-+				CONFIG_SYS_BMAN_SWP_ISDR_REG;
-+	void __iomem *qpaddr = (void *)CONFIG_SYS_QMAN_CINH_BASE +
-+				CONFIG_SYS_QMAN_SWP_ISDR_REG;
- #ifdef CONFIG_FSL_CORENET
- 	int i;
- 
-@@ -38,6 +75,12 @@
- 	out_be32(&qman->qcsp_bare, (u32)(CONFIG_SYS_QMAN_MEM_PHYS >> 32));
- #endif
- 	out_be32(&qman->qcsp_bar, (u32)CONFIG_SYS_QMAN_MEM_PHYS);
-+
-+	/* Change default state of BMan ISDR portals to all 1s */
-+	inhibit_portals(bpaddr, CONFIG_SYS_BMAN_NUM_PORTALS, MAX_BPORTALS,
-+			CONFIG_SYS_BMAN_SP_CINH_SIZE);
-+	inhibit_portals(qpaddr, CONFIG_SYS_QMAN_NUM_PORTALS, MAX_QPORTALS,
-+			CONFIG_SYS_QMAN_SP_CINH_SIZE);
- }
- 
- /* Update portal containter to match LAW setup of portal in phy map */
-diff -ruN u-boot-2015.01-rc3/arch/powerpc/cpu/mpc85xx/tlb.c u-boot/arch/powerpc/cpu/mpc85xx/tlb.c
---- u-boot-2015.01-rc3/arch/powerpc/cpu/mpc85xx/tlb.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/powerpc/cpu/mpc85xx/tlb.c	2015-01-01 17:34:32.221503777 +0100
-@@ -299,12 +299,16 @@
- {
- 	unsigned int ram_tlb_address = (unsigned int)CONFIG_SYS_DDR_SDRAM_BASE;
- 	u64 memsize = (u64)memsize_in_meg << 20;
-+	u64 size;
- 
--	memsize = min(memsize, (u64)CONFIG_MAX_MEM_MAPPED);
--	memsize = tlb_map_range(ram_tlb_address, p_addr, memsize, TLB_MAP_RAM);
-+	size = min(memsize, (u64)CONFIG_MAX_MEM_MAPPED);
-+	size = tlb_map_range(ram_tlb_address, p_addr, size, TLB_MAP_RAM);
- 
--	if (memsize)
--		print_size(memsize, " left unmapped\n");
-+	if (size || memsize > CONFIG_MAX_MEM_MAPPED) {
-+		print_size(memsize > CONFIG_MAX_MEM_MAPPED ?
-+			   memsize - CONFIG_MAX_MEM_MAPPED + size : size,
-+			   " left unmapped\n");
-+	}
- 
- 	return memsize_in_meg;
- }
-diff -ruN u-boot-2015.01-rc3/arch/powerpc/cpu/mpc8xxx/fdt.c u-boot/arch/powerpc/cpu/mpc8xxx/fdt.c
---- u-boot-2015.01-rc3/arch/powerpc/cpu/mpc8xxx/fdt.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/powerpc/cpu/mpc8xxx/fdt.c	2015-01-01 17:34:32.225503711 +0100
-@@ -73,110 +73,6 @@
- }
- #endif /* defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx) */
- 
--#if defined(CONFIG_HAS_FSL_DR_USB) || defined(CONFIG_HAS_FSL_MPH_USB)
--static int fdt_fixup_usb_mode_phy_type(void *blob, const char *mode,
--				const char *phy_type, int start_offset)
--{
--	const char *compat_dr = "fsl-usb2-dr";
--	const char *compat_mph = "fsl-usb2-mph";
--	const char *prop_mode = "dr_mode";
--	const char *prop_type = "phy_type";
--	const char *node_type = NULL;
--	int node_offset;
--	int err;
--
--	node_offset = fdt_node_offset_by_compatible(blob,
--			start_offset, compat_mph);
--	if (node_offset < 0) {
--		node_offset = fdt_node_offset_by_compatible(blob,
--			start_offset, compat_dr);
--		if (node_offset < 0) {
--			printf("WARNING: could not find compatible"
--				" node %s or %s: %s.\n", compat_mph,
--				compat_dr, fdt_strerror(node_offset));
--			return -1;
--		} else
--			node_type = compat_dr;
--	} else
--		node_type = compat_mph;
--
--	if (mode) {
--		err = fdt_setprop(blob, node_offset, prop_mode, mode,
--				  strlen(mode) + 1);
--		if (err < 0)
--			printf("WARNING: could not set %s for %s: %s.\n",
--			       prop_mode, node_type, fdt_strerror(err));
--	}
--
--	if (phy_type) {
--		err = fdt_setprop(blob, node_offset, prop_type, phy_type,
--				  strlen(phy_type) + 1);
--		if (err < 0)
--			printf("WARNING: could not set %s for %s: %s.\n",
--			       prop_type, node_type, fdt_strerror(err));
--	}
--
--	return node_offset;
--}
--
--void fdt_fixup_dr_usb(void *blob, bd_t *bd)
--{
--	const char *modes[] = { "host", "peripheral", "otg" };
--	const char *phys[] = { "ulpi", "utmi" };
--	int usb_mode_off = -1;
--	int usb_phy_off = -1;
--	char str[5];
--	int i, j;
--
--	for (i = 1; i <= CONFIG_USB_MAX_CONTROLLER_COUNT; i++) {
--		const char *dr_mode_type = NULL;
--		const char *dr_phy_type = NULL;
--		int mode_idx = -1, phy_idx = -1;
--		snprintf(str, 5, "%s%d", "usb", i);
--		if (hwconfig(str)) {
--			for (j = 0; j < ARRAY_SIZE(modes); j++) {
--				if (hwconfig_subarg_cmp(str, "dr_mode",
--						modes[j])) {
--					mode_idx = j;
--					break;
--				}
--			}
--
--			for (j = 0; j < ARRAY_SIZE(phys); j++) {
--				if (hwconfig_subarg_cmp(str, "phy_type",
--						phys[j])) {
--					phy_idx = j;
--					break;
--				}
--			}
--
--			if (mode_idx < 0 && phy_idx < 0) {
--				printf("WARNING: invalid phy or mode\n");
--				return;
--			}
--
--			if (mode_idx > -1)
--				dr_mode_type = modes[mode_idx];
--
--			if (phy_idx > -1)
--				dr_phy_type = phys[phy_idx];
--		}
--
--		usb_mode_off = fdt_fixup_usb_mode_phy_type(blob,
--			dr_mode_type, NULL, usb_mode_off);
--
--		if (usb_mode_off < 0)
--			return;
--
--		usb_phy_off = fdt_fixup_usb_mode_phy_type(blob,
--			NULL, dr_phy_type, usb_phy_off);
--
--		if (usb_phy_off < 0)
--			return;
--	}
--}
--#endif /* defined(CONFIG_HAS_FSL_DR_USB) || defined(CONFIG_HAS_FSL_MPH_USB) */
--
- /*
-  * update crypto node properties to a specified revision of the SEC
-  * called with sec_rev == 0 if not on an E processor
-diff -ruN u-boot-2015.01-rc3/arch/sandbox/dts/include/dt-bindings/pinctrl/pinctrl-tegra.h u-boot/arch/sandbox/dts/include/dt-bindings/pinctrl/pinctrl-tegra.h
-diff -ruN u-boot-2015.01-rc3/arch/sandbox/dts/include/dt-bindings/reset/altr,rst-mgr.h u-boot/arch/sandbox/dts/include/dt-bindings/reset/altr,rst-mgr.h
-diff -ruN u-boot-2015.01-rc3/arch/sandbox/dts/sandbox.dts u-boot/arch/sandbox/dts/sandbox.dts
---- u-boot-2015.01-rc3/arch/sandbox/dts/sandbox.dts	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/sandbox/dts/sandbox.dts	2015-01-01 17:34:32.241503449 +0100
-@@ -134,6 +134,23 @@
- 		num-gpios = <20>;
- 	};
- 
-+	i2c at 0 {
-+		#address-cells = <1>;
-+		#size-cells = <0>;
-+		reg = <0>;
-+		compatible = "sandbox,i2c";
-+		clock-frequency = <400000>;
-+		eeprom at 2c {
-+			reg = <0x2c>;
-+			compatible = "i2c-eeprom";
-+			emul {
-+				compatible = "sandbox,i2c-eeprom";
-+				sandbox,filename = "i2c.bin";
-+				sandbox,size = <128>;
-+			};
-+		};
-+	};
-+
- 	spi at 0 {
- 		#address-cells = <1>;
- 		#size-cells = <0>;
-diff -ruN u-boot-2015.01-rc3/arch/sandbox/include/asm/test.h u-boot/arch/sandbox/include/asm/test.h
---- u-boot-2015.01-rc3/arch/sandbox/include/asm/test.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/sandbox/include/asm/test.h	2015-01-01 17:34:32.241503449 +0100
-@@ -0,0 +1,26 @@
-+/*
-+ * Test-related constants for sandbox
-+ *
-+ * Copyright (c) 2014 Google, Inc
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#ifndef __ASM_TEST_H
-+#define __ASM_TEST_H
-+
-+/* The sandbox driver always permits an I2C device with this address */
-+#define SANDBOX_I2C_TEST_ADDR	0x59
-+
-+enum sandbox_i2c_eeprom_test_mode {
-+	SIE_TEST_MODE_NONE,
-+	/* Permits read/write of only one byte per I2C transaction */
-+	SIE_TEST_MODE_SINGLE_BYTE,
-+};
-+
-+void sandbox_i2c_eeprom_set_test_mode(struct udevice *dev,
-+				      enum sandbox_i2c_eeprom_test_mode mode);
-+
-+void sandbox_i2c_eeprom_set_offset_len(struct udevice *dev, int offset_len);
-+
-+#endif
-diff -ruN u-boot-2015.01-rc3/arch/x86/cpu/ivybridge/cpu.c u-boot/arch/x86/cpu/ivybridge/cpu.c
---- u-boot-2015.01-rc3/arch/x86/cpu/ivybridge/cpu.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/cpu/ivybridge/cpu.c	2015-01-01 17:34:32.249503317 +0100
-@@ -263,6 +263,7 @@
- static int report_bist_failure(void)
- {
- 	if (gd->arch.bist != 0) {
-+		post_code(POST_BIST_FAILURE);
- 		printf("BIST failed: %08x\n", gd->arch.bist);
- 		return -EFAULT;
- 	}
-diff -ruN u-boot-2015.01-rc3/arch/x86/cpu/ivybridge/microcode_intel.c u-boot/arch/x86/cpu/ivybridge/microcode_intel.c
---- u-boot-2015.01-rc3/arch/x86/cpu/ivybridge/microcode_intel.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/cpu/ivybridge/microcode_intel.c	2015-01-01 17:34:32.249503317 +0100
-@@ -40,6 +40,8 @@
- 	update->data = fdt_getprop(blob, node, "data", &update->size);
- 	if (!update->data)
- 		return -EINVAL;
-+	update->data += 48;
-+	update->size -= 48;
- 
- 	update->header_version = fdtdec_get_int(blob, node,
- 						"intel,header-version", 0);
-@@ -48,17 +50,17 @@
- 	update->date_code = fdtdec_get_int(blob, node,
- 					   "intel,date-code", 0);
- 	update->processor_signature = fdtdec_get_int(blob, node,
--					"intel.processor-signature", 0);
-+					"intel,processor-signature", 0);
- 	update->checksum = fdtdec_get_int(blob, node, "intel,checksum", 0);
- 	update->loader_revision = fdtdec_get_int(blob, node,
--						 "loader-revision", 0);
-+						 "intel,loader-revision", 0);
- 	update->processor_flags = fdtdec_get_int(blob, node,
--						 "processor-flags", 0);
-+						 "intel,processor-flags", 0);
- 
- 	return 0;
- }
- 
--static uint32_t microcode_read_rev(void)
-+static inline uint32_t microcode_read_rev(void)
- {
- 	/*
- 	 * Some Intel CPUs can be very finicky about the CPUID sequence used.
-@@ -114,6 +116,7 @@
- {
- 	struct microcode_update cpu, update;
- 	const void *blob = gd->fdt_blob;
-+	int skipped;
- 	int count;
- 	int node;
- 	int ret;
-@@ -121,12 +124,13 @@
- 	microcode_read_cpu(&cpu);
- 	node = 0;
- 	count = 0;
-+	skipped = 0;
- 	do {
- 		node = fdtdec_next_compatible(blob, node,
- 					      COMPAT_INTEL_MICROCODE);
- 		if (node < 0) {
- 			debug("%s: Found %d updates\n", __func__, count);
--			return count ? 0 : -ENOENT;
-+			return count ? 0 : skipped ? -EEXIST : -ENOENT;
- 		}
- 
- 		ret = microcode_decode_node(blob, node, &update);
-@@ -135,12 +139,15 @@
- 			      ret);
- 			return ret;
- 		}
--		if (update.processor_signature == cpu.processor_signature &&
--		    (update.processor_flags & cpu.processor_flags)) {
--			debug("%s: Update already exists\n", __func__);
--			return -EEXIST;
-+		if (!(update.processor_signature == cpu.processor_signature &&
-+		      (update.processor_flags & cpu.processor_flags))) {
-+			debug("%s: Skipping non-matching update, sig=%x, pf=%x\n",
-+			      __func__, update.processor_signature,
-+			      update.processor_flags);
-+			skipped++;
-+			continue;
- 		}
--
-+		ret = microcode_read_rev();
- 		wrmsr(0x79, (ulong)update.data, 0);
- 		debug("microcode: updated to revision 0x%x date=%04x-%02x-%02x\n",
- 		      microcode_read_rev(), update.date_code & 0xffff,
-diff -ruN u-boot-2015.01-rc3/arch/x86/cpu/ivybridge/sdram.c u-boot/arch/x86/cpu/ivybridge/sdram.c
---- u-boot-2015.01-rc3/arch/x86/cpu/ivybridge/sdram.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/cpu/ivybridge/sdram.c	2015-01-01 17:34:32.253503252 +0100
-@@ -177,7 +177,7 @@
- 
- 	debug("PEI data at %p, size %x:\n", pei_data, sizeof(*pei_data));
- 
--	data = (char *)CONFIG_X86_MRC_START;
-+	data = (char *)CONFIG_X86_MRC_ADDR;
- 	if (data) {
- 		int rv;
- 		int (*func)(struct pei_data *);
-diff -ruN u-boot-2015.01-rc3/arch/x86/cpu/Makefile u-boot/arch/x86/cpu/Makefile
---- u-boot-2015.01-rc3/arch/x86/cpu/Makefile	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/cpu/Makefile	2015-01-01 17:34:32.249503317 +0100
-@@ -15,6 +15,7 @@
- obj-$(CONFIG_SYS_COREBOOT) += coreboot/
- obj-$(CONFIG_NORTHBRIDGE_INTEL_SANDYBRIDGE) += ivybridge/
- obj-$(CONFIG_NORTHBRIDGE_INTEL_IVYBRIDGE) += ivybridge/
-+obj-$(CONFIG_INTEL_QUEENSBAY) += queensbay/
- obj-y += lapic.o
- obj-$(CONFIG_PCI) += pci.o
- obj-y += turbo.o
-diff -ruN u-boot-2015.01-rc3/arch/x86/cpu/queensbay/fsp_configs.c u-boot/arch/x86/cpu/queensbay/fsp_configs.c
---- u-boot-2015.01-rc3/arch/x86/cpu/queensbay/fsp_configs.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/cpu/queensbay/fsp_configs.c	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,20 @@
-+/*
-+ * Copyright (C) 2013, Intel Corporation
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	Intel
-+ */
-+
-+#include <common.h>
-+#include <asm/arch/fsp/fsp_support.h>
-+
-+void update_fsp_upd(struct upd_region *fsp_upd)
-+{
-+	/* Override any UPD setting if required */
-+
-+	/* Uncomment the line below to enable DEBUG message */
-+	/* fsp_upd->serial_dbgport_type = 1; */
-+
-+	/* Examples on how to initialize the pointers in UPD region */
-+	/* fsp_upd->pcd_example = (EXAMPLE_DATA *)&example; */
-+}
-diff -ruN u-boot-2015.01-rc3/arch/x86/cpu/queensbay/fsp_support.c u-boot/arch/x86/cpu/queensbay/fsp_support.c
---- u-boot-2015.01-rc3/arch/x86/cpu/queensbay/fsp_support.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/cpu/queensbay/fsp_support.c	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,401 @@
-+/*
-+ * Copyright (C) 2013, Intel Corporation
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	Intel
-+ */
-+
-+#include <common.h>
-+#include <asm/arch/fsp/fsp_support.h>
-+#include <asm/post.h>
-+
-+/**
-+ * Compares two GUIDs
-+ *
-+ * If the GUIDs are identical then true is returned.
-+ * If there are any bit differences in the two GUIDs, then false is returned.
-+ *
-+ * @guid1:        A pointer to a 128 bit GUID.
-+ * @guid2:        A pointer to a 128 bit GUID.
-+ *
-+ * @retval true:  guid1 and guid2 are identical.
-+ * @retval false: guid1 and guid2 are not identical.
-+ */
-+static bool compare_guid(const struct efi_guid *guid1,
-+			 const struct efi_guid *guid2)
-+{
-+	if (memcmp(guid1, guid2, sizeof(struct efi_guid)) == 0)
-+		return true;
-+	else
-+		return false;
-+}
-+
-+u32 __attribute__((optimize("O0"))) find_fsp_header(void)
-+{
-+	/*
-+	 * This function may be called before the a stack is established,
-+	 * so special care must be taken. First, it cannot declare any local
-+	 * variable using stack. Only register variable can be used here.
-+	 * Secondly, some compiler version will add prolog or epilog code
-+	 * for the C function. If so the function call may not work before
-+	 * stack is ready.
-+	 *
-+	 * GCC 4.8.1 has been verified to be working for the following codes.
-+	 */
-+	volatile register u8 *fsp asm("eax");
-+
-+	/* Initalize the FSP base */
-+	fsp = (u8 *)CONFIG_FSP_ADDR;
-+
-+	/* Check the FV signature, _FVH */
-+	if (((struct fv_header *)fsp)->sign == EFI_FVH_SIGNATURE) {
-+		/* Go to the end of the FV header and align the address */
-+		fsp += ((struct fv_header *)fsp)->ext_hdr_off;
-+		fsp += ((struct fv_ext_header *)fsp)->ext_hdr_size;
-+		fsp  = (u8 *)(((u32)fsp + 7) & 0xFFFFFFF8);
-+	} else {
-+		fsp  = 0;
-+	}
-+
-+	/* Check the FFS GUID */
-+	if (fsp &&
-+	    ((struct ffs_file_header *)fsp)->name.data1 == FSP_GUID_DATA1 &&
-+	    ((struct ffs_file_header *)fsp)->name.data2 == FSP_GUID_DATA2 &&
-+	    ((struct ffs_file_header *)fsp)->name.data3 == FSP_GUID_DATA3 &&
-+	    ((struct ffs_file_header *)fsp)->name.data4[0] == FSP_GUID_DATA4_0 &&
-+	    ((struct ffs_file_header *)fsp)->name.data4[1] == FSP_GUID_DATA4_1 &&
-+	    ((struct ffs_file_header *)fsp)->name.data4[2] == FSP_GUID_DATA4_2 &&
-+	    ((struct ffs_file_header *)fsp)->name.data4[3] == FSP_GUID_DATA4_3 &&
-+	    ((struct ffs_file_header *)fsp)->name.data4[4] == FSP_GUID_DATA4_4 &&
-+	    ((struct ffs_file_header *)fsp)->name.data4[5] == FSP_GUID_DATA4_5 &&
-+	    ((struct ffs_file_header *)fsp)->name.data4[6] == FSP_GUID_DATA4_6 &&
-+	    ((struct ffs_file_header *)fsp)->name.data4[7] == FSP_GUID_DATA4_7) {
-+		/* Add the FFS header size to find the raw section header */
-+		fsp += sizeof(struct ffs_file_header);
-+	} else {
-+		fsp = 0;
-+	}
-+
-+	if (fsp &&
-+	    ((struct raw_section *)fsp)->type == EFI_SECTION_RAW) {
-+		/* Add the raw section header size to find the FSP header */
-+		fsp += sizeof(struct raw_section);
-+	} else {
-+		fsp = 0;
-+	}
-+
-+	return (u32)fsp;
-+}
-+
-+void fsp_continue(struct shared_data *shared_data, u32 status, void *hob_list)
-+{
-+	u32 stack_len;
-+	u32 stack_base;
-+	u32 stack_top;
-+
-+	post_code(POST_MRC);
-+
-+	assert(status == 0);
-+
-+	/* Get the migrated stack in normal memory */
-+	stack_base = (u32)fsp_get_bootloader_tmp_mem(hob_list, &stack_len);
-+	assert(stack_base != 0);
-+	stack_top  = stack_base + stack_len - sizeof(u32);
-+
-+	/*
-+	 * Old stack base is stored at the very end of the stack top,
-+	 * use it to calculate the migrated shared data base
-+	 */
-+	shared_data = (struct shared_data *)(stack_base +
-+			((u32)shared_data - *(u32 *)stack_top));
-+
-+	/* The boot loader main function entry */
-+	fsp_init_done(hob_list);
-+}
-+
-+void fsp_init(u32 stack_top, u32 boot_mode, void *nvs_buf)
-+{
-+	struct shared_data shared_data;
-+	fsp_init_f init;
-+	struct fsp_init_params params;
-+	struct fspinit_rtbuf rt_buf;
-+	struct vpd_region *fsp_vpd;
-+	struct fsp_header *fsp_hdr;
-+	struct fsp_init_params *params_ptr;
-+	struct upd_region *fsp_upd;
-+
-+	fsp_hdr = (struct fsp_header *)find_fsp_header();
-+	if (fsp_hdr == NULL) {
-+		/* No valid FSP info header was found */
-+		panic("Invalid FSP header");
-+	}
-+
-+	fsp_upd = (struct upd_region *)&shared_data.fsp_upd;
-+	memset(&rt_buf, 0, sizeof(struct fspinit_rtbuf));
-+
-+	/* Reserve a gap in stack top */
-+	rt_buf.common.stack_top = (u32 *)stack_top - 32;
-+	rt_buf.common.boot_mode = boot_mode;
-+	rt_buf.common.upd_data = (struct upd_region *)fsp_upd;
-+
-+	/* Get VPD region start */
-+	fsp_vpd = (struct vpd_region *)(fsp_hdr->img_base +
-+			fsp_hdr->cfg_region_off);
-+
-+	/* Verifify the VPD data region is valid */
-+	assert((fsp_vpd->img_rev == VPD_IMAGE_REV) &&
-+	       (fsp_vpd->sign == VPD_IMAGE_ID));
-+
-+	/* Copy default data from Flash */
-+	memcpy(fsp_upd, (void *)(fsp_hdr->img_base + fsp_vpd->upd_offset),
-+	       sizeof(struct upd_region));
-+
-+	/* Verifify the UPD data region is valid */
-+	assert(fsp_upd->terminator == UPD_TERMINATOR);
-+
-+	/* Override any UPD setting if required */
-+	update_fsp_upd(fsp_upd);
-+
-+	memset(&params, 0, sizeof(struct fsp_init_params));
-+	params.nvs_buf = nvs_buf;
-+	params.rt_buf = (struct fspinit_rtbuf *)&rt_buf;
-+	params.continuation = (fsp_continuation_f)asm_continuation;
-+
-+	init = (fsp_init_f)(fsp_hdr->img_base + fsp_hdr->fsp_init);
-+	params_ptr = &params;
-+
-+	shared_data.fsp_hdr = fsp_hdr;
-+	shared_data.stack_top = (u32 *)stack_top;
-+
-+	post_code(POST_PRE_MRC);
-+
-+	/*
-+	 * Use ASM code to ensure the register value in EAX & ECX
-+	 * will be passed into BlContinuationFunc
-+	 */
-+	asm volatile (
-+		"pushl	%0;"
-+		"call	*%%eax;"
-+		".global asm_continuation;"
-+		"asm_continuation:;"
-+		"movl	%%ebx, %%eax;"		/* shared_data */
-+		"movl	4(%%esp), %%edx;"	/* status */
-+		"movl	8(%%esp), %%ecx;"	/* hob_list */
-+		"jmp	fsp_continue;"
-+		: : "m"(params_ptr), "a"(init), "b"(&shared_data)
-+	);
-+
-+	/*
-+	 * Should never get here.
-+	 * Control will continue from fsp_continue.
-+	 * This line below is to prevent the compiler from optimizing
-+	 * structure intialization.
-+	 *
-+	 * DO NOT REMOVE!
-+	 */
-+	init(&params);
-+}
-+
-+u32 fsp_notify(struct fsp_header *fsp_hdr, u32 phase)
-+{
-+	fsp_notify_f notify;
-+	struct fsp_notify_params params;
-+	struct fsp_notify_params *params_ptr;
-+	u32 status;
-+
-+	if (!fsp_hdr)
-+		fsp_hdr = (struct fsp_header *)find_fsp_header();
-+
-+	if (fsp_hdr == NULL) {
-+		/* No valid FSP info header */
-+		panic("Invalid FSP header");
-+	}
-+
-+	notify = (fsp_notify_f)(fsp_hdr->img_base + fsp_hdr->fsp_notify);
-+	params.phase = phase;
-+	params_ptr = &params;
-+
-+	/*
-+	 * Use ASM code to ensure correct parameter is on the stack for
-+	 * FspNotify as U-Boot is using different ABI from FSP
-+	 */
-+	asm volatile (
-+		"pushl	%1;"		/* push notify phase */
-+		"call	*%%eax;"	/* call FspNotify */
-+		"addl	$4, %%esp;"	/* clean up the stack */
-+		: "=a"(status) : "m"(params_ptr), "a"(notify), "m"(*params_ptr)
-+	);
-+
-+	return status;
-+}
-+
-+u32 fsp_get_usable_lowmem_top(const void *hob_list)
-+{
-+	union hob_pointers hob;
-+	phys_addr_t phys_start;
-+	u32 top;
-+
-+	/* Get the HOB list for processing */
-+	hob.raw = (void *)hob_list;
-+
-+	/* * Collect memory ranges */
-+	top = FSP_LOWMEM_BASE;
-+	while (!end_of_hob(hob)) {
-+		if (get_hob_type(hob) == HOB_TYPE_RES_DESC) {
-+			if (hob.res_desc->type == RES_SYS_MEM) {
-+				phys_start = hob.res_desc->phys_start;
-+				/* Need memory above 1MB to be collected here */
-+				if (phys_start >= FSP_LOWMEM_BASE &&
-+				    phys_start < (phys_addr_t)FSP_HIGHMEM_BASE)
-+					top += (u32)(hob.res_desc->len);
-+			}
-+		}
-+		hob.raw = get_next_hob(hob);
-+	}
-+
-+	return top;
-+}
-+
-+u64 fsp_get_usable_highmem_top(const void *hob_list)
-+{
-+	union hob_pointers hob;
-+	phys_addr_t phys_start;
-+	u64 top;
-+
-+	/* Get the HOB list for processing */
-+	hob.raw = (void *)hob_list;
-+
-+	/* Collect memory ranges */
-+	top = FSP_HIGHMEM_BASE;
-+	while (!end_of_hob(hob)) {
-+		if (get_hob_type(hob) == HOB_TYPE_RES_DESC) {
-+			if (hob.res_desc->type == RES_SYS_MEM) {
-+				phys_start = hob.res_desc->phys_start;
-+				/* Need memory above 1MB to be collected here */
-+				if (phys_start >= (phys_addr_t)FSP_HIGHMEM_BASE)
-+					top += (u32)(hob.res_desc->len);
-+			}
-+		}
-+		hob.raw = get_next_hob(hob);
-+	}
-+
-+	return top;
-+}
-+
-+u64 fsp_get_reserved_mem_from_guid(const void *hob_list, u64 *len,
-+				   struct efi_guid *guid)
-+{
-+	union hob_pointers hob;
-+
-+	/* Get the HOB list for processing */
-+	hob.raw = (void *)hob_list;
-+
-+	/* Collect memory ranges */
-+	while (!end_of_hob(hob)) {
-+		if (get_hob_type(hob) == HOB_TYPE_RES_DESC) {
-+			if (hob.res_desc->type == RES_MEM_RESERVED) {
-+				if (compare_guid(&hob.res_desc->owner, guid)) {
-+					if (len)
-+						*len = (u32)(hob.res_desc->len);
-+
-+					return (u64)(hob.res_desc->phys_start);
-+				}
-+			}
-+		}
-+		hob.raw = get_next_hob(hob);
-+	}
-+
-+	return 0;
-+}
-+
-+u32 fsp_get_fsp_reserved_mem(const void *hob_list, u32 *len)
-+{
-+	const struct efi_guid guid = FSP_HOB_RESOURCE_OWNER_FSP_GUID;
-+	u64 length;
-+	u32 base;
-+
-+	base = (u32)fsp_get_reserved_mem_from_guid(hob_list,
-+			&length, (struct efi_guid *)&guid);
-+	if ((len != 0) && (base != 0))
-+		*len = (u32)length;
-+
-+	return base;
-+}
-+
-+u32 fsp_get_tseg_reserved_mem(const void *hob_list, u32 *len)
-+{
-+	const struct efi_guid guid = FSP_HOB_RESOURCE_OWNER_TSEG_GUID;
-+	u64 length;
-+	u32 base;
-+
-+	base = (u32)fsp_get_reserved_mem_from_guid(hob_list,
-+			&length, (struct efi_guid *)&guid);
-+	if ((len != 0) && (base != 0))
-+		*len = (u32)length;
-+
-+	return base;
-+}
-+
-+void *fsp_get_next_hob(u16 type, const void *hob_list)
-+{
-+	union hob_pointers hob;
-+
-+	assert(hob_list != NULL);
-+
-+	hob.raw = (u8 *)hob_list;
-+
-+	/* Parse the HOB list until end of list or matching type is found */
-+	while (!end_of_hob(hob)) {
-+		if (get_hob_type(hob) == type)
-+			return hob.raw;
-+
-+		hob.raw = get_next_hob(hob);
-+	}
-+
-+	return NULL;
-+}
-+
-+void *fsp_get_next_guid_hob(const struct efi_guid *guid, const void *hob_list)
-+{
-+	union hob_pointers hob;
-+
-+	hob.raw = (u8 *)hob_list;
-+	while ((hob.raw = fsp_get_next_hob(HOB_TYPE_GUID_EXT,
-+			hob.raw)) != NULL) {
-+		if (compare_guid(guid, &hob.guid->name))
-+			break;
-+		hob.raw = get_next_hob(hob);
-+	}
-+
-+	return hob.raw;
-+}
-+
-+void *fsp_get_guid_hob_data(const void *hob_list, u32 *len,
-+			    struct efi_guid *guid)
-+{
-+	u8 *guid_hob;
-+
-+	guid_hob = fsp_get_next_guid_hob(guid, hob_list);
-+	if (guid_hob == NULL) {
-+		return NULL;
-+	} else {
-+		if (len)
-+			*len = get_guid_hob_data_size(guid_hob);
-+
-+		return get_guid_hob_data(guid_hob);
-+	}
-+}
-+
-+void *fsp_get_nvs_data(const void *hob_list, u32 *len)
-+{
-+	const struct efi_guid guid = FSP_NON_VOLATILE_STORAGE_HOB_GUID;
-+
-+	return fsp_get_guid_hob_data(hob_list, len, (struct efi_guid *)&guid);
-+}
-+
-+void *fsp_get_bootloader_tmp_mem(const void *hob_list, u32 *len)
-+{
-+	const struct efi_guid guid = FSP_BOOTLOADER_TEMP_MEM_HOB_GUID;
-+
-+	return fsp_get_guid_hob_data(hob_list, len, (struct efi_guid *)&guid);
-+}
-diff -ruN u-boot-2015.01-rc3/arch/x86/cpu/queensbay/Kconfig u-boot/arch/x86/cpu/queensbay/Kconfig
---- u-boot-2015.01-rc3/arch/x86/cpu/queensbay/Kconfig	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/cpu/queensbay/Kconfig	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,79 @@
-+#
-+# Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+#
-+# SPDX-License-Identifier:	GPL-2.0+
-+#
-+
-+config INTEL_QUEENSBAY
-+	bool
-+	select HAVE_FSP
-+	select HAVE_CMC
-+
-+if INTEL_QUEENSBAY
-+
-+config HAVE_FSP
-+	bool "Add an Firmware Support Package binary"
-+	help
-+	  Select this option to add an Firmware Support Package binary to
-+	  the resulting U-Boot image. It is a binary blob which U-Boot uses
-+	  to set up SDRAM and other chipset specific initialization.
-+
-+	  Note: Without this binary U-Boot will not be able to set up its
-+	  SDRAM so will not boot.
-+
-+config FSP_FILE
-+	string "Firmware Support Package binary filename"
-+	depends on HAVE_FSP
-+	default "fsp.bin"
-+	help
-+	  The filename of the file to use as Firmware Support Package binary
-+	  in the board directory.
-+
-+config FSP_ADDR
-+	hex "Firmware Support Package binary location"
-+	depends on HAVE_FSP
-+	default 0xfffc0000
-+	help
-+	  FSP is not Position Independent Code (PIC) and the whole FSP has to
-+	  be rebased if it is placed at a location which is different from the
-+	  perferred base address specified during the FSP build. Use Intel's
-+	  Binary Configuration Tool (BCT) to do the rebase.
-+
-+	  The default base address of 0xfffc0000 indicates that the binary must
-+	  be located at offset 0xc0000 from the beginning of a 1MB flash device.
-+
-+config FSP_TEMP_RAM_ADDR
-+	hex
-+	default 0x2000000
-+	help
-+	  Stack top address which is used in FspInit after DRAM is ready and
-+	  CAR is disabled.
-+
-+config HAVE_CMC
-+	bool "Add a Chipset Micro Code state machine binary"
-+	help
-+	  Select this option to add a Chipset Micro Code state machine binary
-+	  to the resulting U-Boot image. It is a 64K data block of machine
-+	  specific code which must be put in the flash for the processor to
-+	  access when powered up before system BIOS is executed.
-+
-+config CMC_FILE
-+	string "Chipset Micro Code state machine filename"
-+	depends on HAVE_CMC
-+	default "cmc.bin"
-+	help
-+	  The filename of the file to use as Chipset Micro Code state machine
-+	  binary in the board directory.
-+
-+config CMC_ADDR
-+	hex "Chipset Micro Code state machine binary location"
-+	depends on HAVE_CMC
-+	default 0xfffb0000
-+	help
-+	  The location of the CMC binary is determined by a strap. It must be
-+	  put in flash at a location matching the strap-determined base address.
-+
-+	  The default base address of 0xfffb0000 indicates that the binary must
-+	  be located at offset 0xb0000 from the beginning of a 1MB flash device.
-+
-+endif
-diff -ruN u-boot-2015.01-rc3/arch/x86/cpu/queensbay/Makefile u-boot/arch/x86/cpu/queensbay/Makefile
---- u-boot-2015.01-rc3/arch/x86/cpu/queensbay/Makefile	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/cpu/queensbay/Makefile	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,9 @@
-+#
-+# Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+#
-+# SPDX-License-Identifier:	GPL-2.0+
-+#
-+
-+obj-y += tnc_car.o tnc_dram.o tnc.o topcliff.o
-+obj-y += fsp_configs.o fsp_support.o
-+obj-$(CONFIG_PCI) += tnc_pci.o
-diff -ruN u-boot-2015.01-rc3/arch/x86/cpu/queensbay/tnc.c u-boot/arch/x86/cpu/queensbay/tnc.c
---- u-boot-2015.01-rc3/arch/x86/cpu/queensbay/tnc.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/cpu/queensbay/tnc.c	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,72 @@
-+/*
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <asm/io.h>
-+#include <asm/pci.h>
-+#include <asm/post.h>
-+#include <asm/arch/tnc.h>
-+#include <asm/arch/fsp/fsp_support.h>
-+#include <asm/processor.h>
-+
-+static void unprotect_spi_flash(void)
-+{
-+	u32 bc;
-+
-+	bc = pci_read_config32(PCH_LPC_DEV, 0xd8);
-+	bc |= 0x1;	/* unprotect the flash */
-+	pci_write_config32(PCH_LPC_DEV, 0xd8, bc);
-+}
-+
-+int arch_cpu_init(void)
-+{
-+	struct pci_controller *hose;
-+	int ret;
-+
-+	post_code(POST_CPU_INIT);
-+#ifdef CONFIG_SYS_X86_TSC_TIMER
-+	timer_set_base(rdtsc());
-+#endif
-+
-+	ret = x86_cpu_init_f();
-+	if (ret)
-+		return ret;
-+
-+	ret = pci_early_init_hose(&hose);
-+	if (ret)
-+		return ret;
-+
-+	unprotect_spi_flash();
-+
-+	return 0;
-+}
-+
-+int print_cpuinfo(void)
-+{
-+	post_code(POST_CPU_INFO);
-+	return default_print_cpuinfo();
-+}
-+
-+void reset_cpu(ulong addr)
-+{
-+	/* cold reset */
-+	outb(0x06, PORT_RESET);
-+}
-+
-+void board_final_cleanup(void)
-+{
-+	u32 status;
-+
-+	/* call into FspNotify */
-+	debug("Calling into FSP (notify phase INIT_PHASE_BOOT): ");
-+	status = fsp_notify(NULL, INIT_PHASE_BOOT);
-+	if (status != FSP_SUCCESS)
-+		debug("fail, error code %x\n", status);
-+	else
-+		debug("OK\n");
-+
-+	return;
-+}
-diff -ruN u-boot-2015.01-rc3/arch/x86/cpu/queensbay/tnc_car.S u-boot/arch/x86/cpu/queensbay/tnc_car.S
---- u-boot-2015.01-rc3/arch/x86/cpu/queensbay/tnc_car.S	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/cpu/queensbay/tnc_car.S	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,124 @@
-+/*
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <config.h>
-+#include <asm/post.h>
-+
-+.globl car_init
-+car_init:
-+	/*
-+	 * Note: ebp holds the BIST value (built-in self test) so far, but ebp
-+	 * will be destroyed through the FSP call, thus we have to test the
-+	 * BIST value here before we call into FSP.
-+	 */
-+	test	%ebp, %ebp
-+	jz	car_init_start
-+	post_code(POST_BIST_FAILURE)
-+	jmp	die
-+
-+car_init_start:
-+	post_code(POST_CAR_START)
-+	lea	find_fsp_header_romstack, %esp
-+	jmp	find_fsp_header
-+
-+find_fsp_header_ret:
-+	/* EAX points to FSP_INFO_HEADER */
-+	mov	%eax, %ebp
-+
-+	/* sanity test */
-+	cmp	$CONFIG_FSP_ADDR, %eax
-+	jb	die
-+
-+	/* calculate TempRamInitEntry address */
-+	mov	0x30(%ebp), %eax
-+	add	0x1c(%ebp), %eax
-+
-+	/* call FSP TempRamInitEntry to setup temporary stack */
-+	lea	temp_ram_init_romstack, %esp
-+	jmp	*%eax
-+
-+temp_ram_init_ret:
-+	addl	$4, %esp
-+	cmp	$0, %eax
-+	jnz	car_init_fail
-+
-+	post_code(POST_CAR_CPU_CACHE)
-+
-+	/*
-+	 * The FSP TempRamInit initializes the ecx and edx registers to
-+	 * point to a temporary but writable memory range (Cache-As-RAM).
-+	 * ecx: the start of this temporary memory range,
-+	 * edx: the end of this range.
-+	 */
-+
-+	/* stack grows down from top of CAR */
-+	movl	%edx, %esp
-+
-+	/*
-+	 * TODO:
-+	 *
-+	 * According to FSP architecture spec, the fsp_init() will not return
-+	 * to its caller, instead it requires the bootloader to provide a
-+	 * so-called continuation function to pass into the FSP as a parameter
-+	 * of fsp_init, and fsp_init() will call that continuation function
-+	 * directly.
-+	 *
-+	 * The call to fsp_init() may need to be moved out of the car_init()
-+	 * to cpu_init_f() with the help of some inline assembly codes.
-+	 * Note there is another issue that fsp_init() will setup another stack
-+	 * using the fsp_init parameter stack_top after DRAM is initialized,
-+	 * which means any data on the previous stack (on the CAR) gets lost
-+	 * (ie: U-Boot global_data). FSP is supposed to support such scenario,
-+	 * however it does not work. This should be revisited in the future.
-+	 */
-+	movl	$CONFIG_FSP_TEMP_RAM_ADDR, %eax
-+	xorl	%edx, %edx
-+	xorl	%ecx, %ecx
-+	call	fsp_init
-+
-+.global fsp_init_done
-+fsp_init_done:
-+	/*
-+	 * We come here from FspInit with eax pointing to the HOB list.
-+	 * Save eax to esi temporarily.
-+	 */
-+	movl	%eax, %esi
-+	/*
-+	 * Re-initialize the ebp (BIST) to zero, as we already reach here
-+	 * which means we passed BIST testing before.
-+	 */
-+	xorl	%ebp, %ebp
-+	jmp	car_init_ret
-+
-+car_init_fail:
-+	post_code(POST_CAR_FAILURE)
-+
-+die:
-+	hlt
-+	jmp	die
-+	hlt
-+
-+	/*
-+	 * The function call before CAR initialization is tricky. It cannot
-+	 * be called using the 'call' instruction but only the 'jmp' with
-+	 * the help of a handcrafted stack in the ROM. The stack needs to
-+	 * contain the function return address as well as the parameters.
-+	 */
-+	.balign	4
-+find_fsp_header_romstack:
-+	.long	find_fsp_header_ret
-+
-+	.balign	4
-+temp_ram_init_romstack:
-+	.long	temp_ram_init_ret
-+	.long	temp_ram_init_params
-+temp_ram_init_params:
-+_dt_ucode_base_size:
-+	/* These next two fields are filled in by ifdtool */
-+	.long	0			/* microcode base */
-+	.long	0			/* microcode size */
-+	.long	CONFIG_SYS_MONITOR_BASE	/* code region base */
-+	.long	CONFIG_SYS_MONITOR_LEN	/* code region size */
-diff -ruN u-boot-2015.01-rc3/arch/x86/cpu/queensbay/tnc_dram.c u-boot/arch/x86/cpu/queensbay/tnc_dram.c
---- u-boot-2015.01-rc3/arch/x86/cpu/queensbay/tnc_dram.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/cpu/queensbay/tnc_dram.c	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,78 @@
-+/*
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <asm/arch/fsp/fsp_support.h>
-+#include <asm/e820.h>
-+#include <asm/post.h>
-+
-+DECLARE_GLOBAL_DATA_PTR;
-+
-+int dram_init(void)
-+{
-+	phys_size_t ram_size = 0;
-+	union hob_pointers hob;
-+
-+	hob.raw = gd->arch.hob_list;
-+	while (!end_of_hob(hob)) {
-+		if (get_hob_type(hob) == HOB_TYPE_RES_DESC) {
-+			if (hob.res_desc->type == RES_SYS_MEM ||
-+			    hob.res_desc->type == RES_MEM_RESERVED) {
-+				ram_size += hob.res_desc->len;
-+			}
-+		}
-+		hob.raw = get_next_hob(hob);
-+	}
-+
-+	gd->ram_size = ram_size;
-+	post_code(POST_DRAM);
-+
-+	return 0;
-+}
-+
-+void dram_init_banksize(void)
-+{
-+	gd->bd->bi_dram[0].start = 0;
-+	gd->bd->bi_dram[0].size = gd->ram_size;
-+}
-+
-+/*
-+ * This function looks for the highest region of memory lower than 4GB which
-+ * has enough space for U-Boot where U-Boot is aligned on a page boundary.
-+ * It overrides the default implementation found elsewhere which simply
-+ * picks the end of ram, wherever that may be. The location of the stack,
-+ * the relocation address, and how far U-Boot is moved by relocation are
-+ * set in the global data structure.
-+ */
-+ulong board_get_usable_ram_top(ulong total_size)
-+{
-+	return fsp_get_usable_lowmem_top(gd->arch.hob_list);
-+}
-+
-+unsigned install_e820_map(unsigned max_entries, struct e820entry *entries)
-+{
-+	unsigned num_entries = 0;
-+
-+	union hob_pointers hob;
-+
-+	hob.raw = gd->arch.hob_list;
-+
-+	while (!end_of_hob(hob)) {
-+		if (get_hob_type(hob) == HOB_TYPE_RES_DESC) {
-+			entries[num_entries].addr = hob.res_desc->phys_start;
-+			entries[num_entries].size = hob.res_desc->len;
-+
-+			if (hob.res_desc->type == RES_SYS_MEM)
-+				entries[num_entries].type = E820_RAM;
-+			else if (hob.res_desc->type == RES_MEM_RESERVED)
-+				entries[num_entries].type = E820_RESERVED;
-+		}
-+		hob.raw = get_next_hob(hob);
-+		num_entries++;
-+	}
-+
-+	return num_entries;
-+}
-diff -ruN u-boot-2015.01-rc3/arch/x86/cpu/queensbay/tnc_pci.c u-boot/arch/x86/cpu/queensbay/tnc_pci.c
---- u-boot-2015.01-rc3/arch/x86/cpu/queensbay/tnc_pci.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/cpu/queensbay/tnc_pci.c	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,61 @@
-+/*
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <pci.h>
-+#include <asm/pci.h>
-+#include <asm/arch/fsp/fsp_support.h>
-+
-+DECLARE_GLOBAL_DATA_PTR;
-+
-+void board_pci_setup_hose(struct pci_controller *hose)
-+{
-+	hose->first_busno = 0;
-+	hose->last_busno = 0;
-+
-+	/* PCI memory space */
-+	pci_set_region(hose->regions + 0,
-+		       CONFIG_PCI_MEM_BUS,
-+		       CONFIG_PCI_MEM_PHYS,
-+		       CONFIG_PCI_MEM_SIZE,
-+		       PCI_REGION_MEM);
-+
-+	/* PCI IO space */
-+	pci_set_region(hose->regions + 1,
-+		       CONFIG_PCI_IO_BUS,
-+		       CONFIG_PCI_IO_PHYS,
-+		       CONFIG_PCI_IO_SIZE,
-+		       PCI_REGION_IO);
-+
-+	pci_set_region(hose->regions + 2,
-+		       CONFIG_PCI_PREF_BUS,
-+		       CONFIG_PCI_PREF_PHYS,
-+		       CONFIG_PCI_PREF_SIZE,
-+		       PCI_REGION_PREFETCH);
-+
-+	pci_set_region(hose->regions + 3,
-+		       0,
-+		       0,
-+		       gd->ram_size,
-+		       PCI_REGION_MEM | PCI_REGION_SYS_MEMORY);
-+
-+	hose->region_count = 4;
-+}
-+
-+int board_pci_post_scan(struct pci_controller *hose)
-+{
-+	u32 status;
-+
-+	/* call into FspNotify */
-+	debug("Calling into FSP (notify phase INIT_PHASE_PCI): ");
-+	status = fsp_notify(NULL, INIT_PHASE_PCI);
-+	if (status != FSP_SUCCESS)
-+		debug("fail, error code %x\n", status);
-+	else
-+		debug("OK\n");
-+
-+	return 0;
-+}
-diff -ruN u-boot-2015.01-rc3/arch/x86/cpu/queensbay/topcliff.c u-boot/arch/x86/cpu/queensbay/topcliff.c
---- u-boot-2015.01-rc3/arch/x86/cpu/queensbay/topcliff.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/cpu/queensbay/topcliff.c	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,47 @@
-+/*
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <errno.h>
-+#include <malloc.h>
-+#include <pci.h>
-+#include <pci_ids.h>
-+#include <sdhci.h>
-+
-+static struct pci_device_id mmc_supported[] = {
-+	{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TCF_SDIO_0 },
-+	{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TCF_SDIO_1 },
-+	{ }
-+};
-+
-+int cpu_mmc_init(bd_t *bis)
-+{
-+	struct sdhci_host *mmc_host;
-+	pci_dev_t devbusfn;
-+	u32 iobase;
-+	int ret;
-+	int i;
-+
-+	for (i = 0; i < ARRAY_SIZE(mmc_supported); i++) {
-+		devbusfn =  pci_find_devices(mmc_supported, i);
-+		if (devbusfn == -1)
-+			return -ENODEV;
-+
-+		mmc_host = (struct sdhci_host *)malloc(sizeof(struct sdhci_host));
-+		if (!mmc_host)
-+			return -ENOMEM;
-+
-+		mmc_host->name = "Topcliff SDHCI";
-+		pci_read_config_dword(devbusfn, PCI_BASE_ADDRESS_0, &iobase);
-+		mmc_host->ioaddr = (void *)iobase;
-+		mmc_host->quirks = 0;
-+		ret = add_sdhci(mmc_host, 0, 0);
-+		if (ret)
-+			return ret;
-+	}
-+
-+	return 0;
-+}
-diff -ruN u-boot-2015.01-rc3/arch/x86/cpu/start.S u-boot/arch/x86/cpu/start.S
---- u-boot-2015.01-rc3/arch/x86/cpu/start.S	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/cpu/start.S	2015-01-01 17:34:32.253503252 +0100
-@@ -1,5 +1,5 @@
- /*
-- *  U-boot - x86 Startup Code
-+ *  U-Boot - x86 Startup Code
-  *
-  * (C) Copyright 2008-2011
-  * Graeme Russ, <graeme.russ at gmail.com>
-@@ -17,6 +17,7 @@
- #include <asm/processor.h>
- #include <asm/processor-flags.h>
- #include <generated/generic-asm-offsets.h>
-+#include <generated/asm-offsets.h>
- 
- .section .text
- .code32
-@@ -74,6 +75,7 @@
- 	jmp	car_init
- .globl car_init_ret
- car_init_ret:
-+#ifndef CONFIG_HAVE_FSP
- 	/*
- 	 * We now have CONFIG_SYS_CAR_SIZE bytes of Cache-As-RAM (or SRAM,
- 	 * or fully initialised SDRAM - we really don't care which)
-@@ -94,6 +96,12 @@
- #ifdef CONFIG_DCACHE_RAM_MRC_VAR_SIZE
- 	subl	$CONFIG_DCACHE_RAM_MRC_VAR_SIZE, %esp
- #endif
-+#else
-+	/*
-+	 * When we get here after car_init, esp points to a temporary stack
-+	 * and esi holds the HOB list address returned by the FSP.
-+	 */
-+#endif
- 
- 	/* Reserve space on stack for global data */
- 	subl	$GENERATED_GBL_DATA_SIZE, %esp
-@@ -108,6 +116,13 @@
- 	movl	%esp, %edi
- 	rep	stosb
- 
-+#ifdef CONFIG_HAVE_FSP
-+	/* Store HOB list */
-+	movl	%esp, %edx
-+	addl	$GD_HOB_LIST, %edx
-+	movl	%esi, (%edx)
-+#endif
-+
- 	/* Setup first parameter to setup_gdt, pointer to global_data */
- 	movl	%esp, %eax
- 
-diff -ruN u-boot-2015.01-rc3/arch/x86/dts/chromebook_link.dts u-boot/arch/x86/dts/chromebook_link.dts
---- u-boot-2015.01-rc3/arch/x86/dts/chromebook_link.dts	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/dts/chromebook_link.dts	2015-01-01 17:34:32.253503252 +0100
-@@ -214,10 +214,10 @@
- 
- 	microcode {
- 		update at 0 {
--#include "m12206a7_00000028.dtsi"
-+#include "microcode/m12206a7_00000029.dtsi"
- 		};
- 		update at 1 {
--#include "m12306a9_00000017.dtsi"
-+#include "microcode/m12306a9_0000001b.dtsi"
- 		};
- 	};
- 
-diff -ruN u-boot-2015.01-rc3/arch/x86/dts/coreboot.dtsi u-boot/arch/x86/dts/coreboot.dtsi
---- u-boot-2015.01-rc3/arch/x86/dts/coreboot.dtsi	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/dts/coreboot.dtsi	2015-01-01 17:34:32.253503252 +0100
-@@ -6,7 +6,7 @@
- 	};
- 
- 	serial {
--		compatible = "coreboot-uart";
-+		compatible = "x86-uart";
- 		reg = <0x3f8 0x10>;
- 		reg-shift = <0>;
- 		io-mapped = <1>;
-diff -ruN u-boot-2015.01-rc3/arch/x86/dts/crownbay.dts u-boot/arch/x86/dts/crownbay.dts
---- u-boot-2015.01-rc3/arch/x86/dts/crownbay.dts	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/dts/crownbay.dts	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,60 @@
-+/*
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+/dts-v1/;
-+
-+/include/ "coreboot.dtsi"
-+
-+/ {
-+	#address-cells = <1>;
-+	#size-cells = <1>;
-+	model = "Intel Crown Bay";
-+	compatible = "intel,crownbay", "intel,queensbay";
-+
-+	config {
-+		silent_console = <0>;
-+	};
-+
-+	gpioa {
-+		compatible = "intel,ich6-gpio";
-+		u-boot,dm-pre-reloc;
-+		reg = <0 0x20>;
-+		bank-name = "A";
-+	};
-+
-+	gpiob {
-+		compatible = "intel,ich6-gpio";
-+		u-boot,dm-pre-reloc;
-+		reg = <0x20 0x20>;
-+		bank-name = "B";
-+	};
-+
-+	serial {
-+		reg = <0x3f8 8>;
-+		clock-frequency = <115200>;
-+	};
-+
-+	chosen { };
-+	memory { device_type = "memory"; reg = <0 0>; };
-+
-+	spi {
-+		#address-cells = <1>;
-+		#size-cells = <0>;
-+		compatible = "intel,ich7";
-+		spi-flash at 0 {
-+			reg = <0>;
-+			compatible = "sst,25vf016b", "spi-flash";
-+			memory-map = <0xffe00000 0x00200000>;
-+		};
-+	};
-+
-+	microcode {
-+		update at 0 {
-+#include "microcode/m0220661105_cv.dtsi"
-+		};
-+	};
-+
-+};
-diff -ruN u-boot-2015.01-rc3/arch/x86/dts/include/dt-bindings/pinctrl/pinctrl-tegra.h u-boot/arch/x86/dts/include/dt-bindings/pinctrl/pinctrl-tegra.h
-diff -ruN u-boot-2015.01-rc3/arch/x86/dts/include/dt-bindings/reset/altr,rst-mgr.h u-boot/arch/x86/dts/include/dt-bindings/reset/altr,rst-mgr.h
-diff -ruN u-boot-2015.01-rc3/arch/x86/dts/link.dts u-boot/arch/x86/dts/link.dts
---- u-boot-2015.01-rc3/arch/x86/dts/link.dts	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/dts/link.dts	2015-01-01 17:34:32.253503252 +0100
-@@ -214,10 +214,10 @@
- 
- 	microcode {
- 		update at 0 {
--#include "m12206a7_00000028.dtsi"
-+#include "microcode/m12206a7_00000029.dtsi"
- 		};
- 		update at 1 {
--#include "m12306a9_00000017.dtsi"
-+#include "microcode/m12306a9_0000001b.dtsi"
- 		};
- 	};
- 
-diff -ruN u-boot-2015.01-rc3/arch/x86/dts/m12206a7_00000028.dtsi u-boot/arch/x86/dts/m12206a7_00000028.dtsi
---- u-boot-2015.01-rc3/arch/x86/dts/m12206a7_00000028.dtsi	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/dts/m12206a7_00000028.dtsi	1970-01-01 01:00:00.000000000 +0100
-@@ -1,622 +0,0 @@
--/*
-- * Copyright (c) <1995-2013>, Intel Corporation.
-- * All rights reserved.
-- *
-- * Redistribution. Redistribution and use in binary form, without modification, are
-- * permitted provided that the following conditions are met:
-- *	.Redistributions must reproduce the above copyright notice and the following
-- * disclaimer in the documentation and/or other materials provided with the
-- * distribution.
-- * Neither the name of Intel Corporation nor the names of its suppliers may be used
-- * to endorse or promote products derived from this software without specific prior
-- * written permission.
-- *	.No reverse engineering, decompilation, or disassembly of this software is
-- * permitted.
-- *	."Binary form" includes any format commonly used for electronic conveyance
-- * which is a reversible, bit-exact translation of binary representation to ASCII or
-- * ISO text, for example, "uuencode."
-- *
-- * DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
-- * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
-- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-- * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- *
-- *---
-- * This is a device tree fragment. Use #include to add these properties to a
-- * node.
-- */
--
--compatible = "intel,microcode";
--intel,header-version = <1>;
--intel,update-revision = <0x28>;
--intel,date-code = <0x04242012>;
--intel,processor-signature = <0x000206a7>;
--intel,checksum = <0xf3e9935d>;
--intel,loader-revision = <1>;
--intel,processor-flags = <0x12>;
--
--/* The 48-byte public header is omitted. */
--data = <
--	0x00000000	0x000000a1	0x00020001	0x00000028
--	0x00000000	0x00000000	0x20120423	0x000008f1
--	0x00000001	0x000206a7	0x00000000	0x00000000
--	0x00000000	0x00000000	0x00000000	0x00000000
--	0x00000000	0x000008f1	0x00000000	0x00000000
--	0x00000000	0x00000000	0x00000000	0x00000000
--	0x52b813ac	0xdb8994c7	0x70e9f6bb	0x9d6db2ff
--	0xf4d70f5d	0x5b1eccf6	0xac59106f	0x0ae2e2c1
--	0x1a7bbeb1	0x355a1d62	0x2e7eb594	0x09f8dea9
--	0x432a49e4	0xbf520253	0xdafa4010	0x893a858a
--	0x766e0efb	0xd91e196d	0x838bd2ef	0xe5146494
--	0xd515f413	0x29704828	0xe85598b6	0xdcbe6c51
--	0x88eabbfa	0xa1e8909f	0xd8931721	0x35386554
--	0x089a78a7	0xd9914775	0xd4644748	0x1556a4dc
--	0xf44448f6	0xd054d7db	0xf30f2b7d	0x5ae223d0
--	0xcbbb48b0	0x5c8b0383	0x177de157	0x9c1e5f73
--	0x2ec28289	0xd72a7b6c	0x823b6eb2	0x35e02171
--	0xba8deae4	0x06f4d468	0x13dbafaa	0x72b419f1
--	0x033385b5	0x05806920	0x4c6034cf	0x9bd117dc
--	0x976e2d04	0x250330f0	0x7250b5e1	0x184980c2
--	0x12a9d7d6	0x1bc808f9	0xae79994f	0xc6f87901
--	0xc0e3132f	0x671491c5	0x236cad39	0x37889d9c
--	0x67f7c3f3	0x964a6be5	0xbcced7da	0x57eeaa6e
--	0x7bca1522	0x654fee4c	0x2a1ca5d9	0xa1803cf3
--	0x00000011	0x8c316d2c	0x17603b7e	0x32e42981
--	0xc26c1400	0xf0fbccb6	0xeab6b43a	0x11d456a5
--	0x5b912d46	0x15195fe0	0x542f6db3	0x0b7f212e
--	0x47718dd9	0x7c41b108	0x06c21111	0x4445d5ea
--	0xb4fb8128	0xe07404a6	0x8d503da4	0x78fc7e44
--	0xb9919656	0x9968c797	0x87f26ab0	0x23bb1af7
--	0x1ec5d761	0x26f30d2c	0x7cdb747c	0xe4d42033
--	0x8a5d4801	0x768aff57	0xbcfd5d11	0x7c853c2d
--	0x231e6207	0x8b1988a6	0xd68fdb75	0x58dcb417
--	0x44422ef9	0x2a186ebb	0x7d27e85f	0x36ac31f7
--	0x1e487e77	0x2b0b8c37	0xd8ba682f	0x2cba791b
--	0xe6d3dece	0x1b2c2a99	0x4e5decab	0xfbd313a3
--	0xdbc78294	0x5a80cce7	0x2d8e0f0b	0xcf564f71
--	0x073d1f37	0x25162870	0x96cdb85b	0x9c553048
--	0x24eba740	0xfc0f352e	0x0c83be68	0x89b5076c
--	0xc39c4355	0x6a4cf25c	0x2bbd2682	0xc524fdb9
--	0x7ea19bae	0x191ad6f1	0xd3fbf3bf	0x21bf77fa
--	0x8f77fec4	0x0f90f635	0xe55e165c	0x868d58c0
--	0x966bc0ad	0x6c276364	0x9d8f7eff	0x4b7925d4
--	0x8b2f9326	0x4ab7b47e	0x33a9087c	0xf31ab949
--	0x69831dfb	0x4711a215	0x8128c1fa	0x8481c213
--	0x7401b01b	0xfdcfdc50	0xd6b55266	0xae9b23ac
--	0xfa2ad275	0xa225bb45	0x4dd720c4	0x760a20e6
--	0x5f1223c9	0x2f334372	0x6e1dcdab	0xe8ee8638
--	0x1c19ba8a	0xef9341c4	0x360aaa9d	0x90452ea9
--	0x65852446	0xe9398fa3	0xbba6a631	0x1a3e90b9
--	0xe2a73a56	0x6e8c0747	0x35c7c53d	0xcc1ac842
--	0x183356af	0xb6e98608	0x987b43c2	0xa8a3cfd2
--	0xc2c5fce0	0xcc3af64a	0xd6d3a291	0xe59ad1f5
--	0x124ca513	0x9522b50a	0x25150477	0xa2eb5797
--	0x7fc63626	0x648c48e3	0x9f5797ff	0x2307b84d
--	0x980625a4	0xabc05983	0x24980807	0x773c4f99
--	0x3407b872	0x07c3657a	0xa2cd9e48	0x49c1e6a8
--	0xa881b84c	0xf804d72c	0xb5319d2a	0x3e39780f
--	0x97518822	0x0acd54c2	0x0721a9ff	0x10e1d2fd
--	0xa7b6db77	0x845b1a56	0xef00160e	0x6b41bfd5
--	0xc994df0d	0xcf44a5ca	0x794b36a4	0xf9fdb127
--	0x922a1366	0x822aa8a9	0x4b137bd5	0x5722a49f
--	0x8933719a	0x17edc1a9	0x079d9538	0x21fae7d5
--	0xe534fd73	0x9d3038d5	0x48c3a056	0x5b22d58a
--	0x6f142866	0xf1d767cd	0xb51ad5a6	0x34a0ef85
--	0x0111703e	0xca4b3a30	0xa0f3c34d	0x9d48775a
--	0x3f2059f9	0xf2fe2c36	0x588861a9	0xed5bd9fe
--	0x8231f7cb	0x8c115969	0x3f82ba00	0x21b3730c
--	0xba757997	0x3ec0bb2c	0x16f11def	0x5d4356c6
--	0xdc2e0bc2	0x58c1eb6e	0x313ede0c	0xb68fcc52
--	0x84d3e1b5	0xcc6d9201	0x95046196	0x276b527b
--	0x80a4a729	0xe782916d	0x5cf09e0b	0x98aaf9fa
--	0x1de6dd43	0xab4f1962	0x49ece734	0x81455488
--	0xc2597b61	0x5b22af85	0x646f7b94	0x09213a1f
--	0x08edf7e4	0x963d343c	0x059ba888	0xb4e804ed
--	0xe7cc826c	0xf87bafc7	0xeecaec10	0x8e60919c
--	0xbf14c996	0xd3dcaee3	0xb8fa0b7e	0x81563c6e
--	0x7f59a258	0x2f344446	0x374d8aa6	0x9b6de5c9
--	0xbf992857	0xbc5b94fc	0x28adb080	0x17e41044
--	0xb87b469e	0xda504d12	0xf21bef8b	0xce75c1e3
--	0xdbd92c83	0x58bba0af	0x77b42977	0x506cfd75
--	0x1139e875	0x6ce5fe43	0xc6a5d7b3	0x87f9e628
--	0x7b5c500b	0x130066b3	0x789b611f	0xec8c1ba9
--	0xb7e6872d	0xaf828cd6	0xc28d3316	0x2a91f6d0
--	0xc725f063	0x065ac531	0x4f9ef4b8	0x2b9d927e
--	0xaf54f3f9	0x7c924f72	0xda1d77ad	0xff00db67
--	0xaf4f03c0	0xb4f4ee64	0x169e64e5	0x04653ac0
--	0xed51cb70	0xfeaff0e5	0x51dbf346	0x072a2407
--	0x23fb74f4	0x9a906eef	0x5d6fc3f0	0xbc3c374c
--	0x1cf9f063	0x919015d9	0x5b3e9d07	0xd6209d8b
--	0xa3710b3d	0x90ad23b8	0x420ceedc	0x58e8371f
--	0x5d419d1f	0xb8acd13f	0x7d100d6d	0x210c10d1
--	0xcd0a697e	0x5023db4b	0x33e6d8e7	0x44bbe6b4
--	0x827e859f	0x6ca4cc81	0x661bb2c3	0x71209ee8
--	0xb8c3ffaf	0xd1075f51	0xba1eae10	0x728b0a6a
--	0xe4af7a2f	0xca9bcf2e	0xb249a631	0xdce6be47
--	0x5c910321	0x425c3c27	0x33083e43	0xdea067ae
--	0xea594a23	0x41b75c2c	0x3a401a95	0xd33cd88a
--	0xc295cad0	0x67f48045	0x1dc9ad4c	0x4bc48864
--	0x53991b6e	0x7aadde5f	0x2b0bf775	0x06ba5380
--	0x9eb874be	0x2c4b967a	0x1bcc342f	0xe875001b
--	0x15b5642d	0x5be99c9d	0xcb210ace	0x1b4924ad
--	0x3793ed81	0x8b983114	0x3ec33981	0x75ec71e7
--	0x8b5b7df3	0x834756f4	0x100fad01	0x70037fdf
--	0x0cef9a36	0x3d9e3a2d	0x38b48efd	0xfc4034b6
--	0xa32e29dd	0x388944bc	0xc1c15614	0x3877e9c7
--	0xa5e733fa	0xa621bd53	0x4b651df6	0xce082970
--	0x85f30d6f	0x729a5c87	0x31dd7ba9	0xdb495828
--	0x7b12c698	0x953495c9	0x6b5f99e7	0x2cc42fa8
--	0x697ac512	0x1be679de	0xc116d305	0x94a36606
--	0x9e5e141e	0x874affed	0x58d40b0b	0x5e3cf5e5
--	0x5d05e9a9	0x06840efc	0xd2f98b21	0xa1e83ab2
--	0x4f726202	0xa6394535	0x62a02403	0x9f2167ec
--	0x4f9fc77b	0x98073be4	0x2bc781fa	0xfc8e4c89
--	0xc7179b97	0x692cf793	0x708ff7bb	0x12ecba93
--	0xacd06e21	0x202bef76	0x03852241	0xe84e02a1
--	0xf1f9ac8d	0xcee61aef	0x61a4f235	0xd22991eb
--	0x67a81345	0x375a15c6	0xe8fae8a3	0xb4ff2b37
--	0x339ee4ea	0x14ffadc3	0xf49340dd	0xf285e568
--	0x00fc6970	0x369c52d1	0x4f55368f	0x3f4d75f1
--	0x6a73b603	0x963c1f59	0x171e2bdc	0x72bac76b
--	0x9e2e5c32	0x307f7c3f	0xd3b48637	0x3a917acf
--	0xea52a65f	0xecd209fb	0xf0ad84bf	0xd4bdea70
--	0xa2647b38	0xce040b49	0xc6d5f13d	0x5d942c52
--	0xf8edc042	0x798fdefd	0x4b074246	0x1cb1873a
--	0x6793c186	0x23b9c774	0x77bb0202	0xc519b3aa
--	0xa30c09a2	0xe1f6669a	0xb7eddb8d	0x7aaa91d6
--	0x076a3789	0x0ac47791	0x1e503404	0x44fe8c54
--	0xf3cbbf49	0xd3234eef	0x0d898b3f	0xe854984b
--	0xe3986de9	0x923a5c76	0x2ee9abca	0x1a9fedbe
--	0xdf76dcd1	0xea07936b	0xcdaaf247	0xe62d98fa
--	0xa99c7f7b	0x34fc84d4	0x03a35111	0xad5675c8
--	0xcc64075b	0x408203f9	0x846e1f08	0xe934019e
--	0x423d1223	0x2f04f9e3	0xee1dbf40	0x65edc60f
--	0x097aa22f	0x7058a2b7	0x41c8a0a5	0xa68aa391
--	0x0f345c40	0x667517e6	0x860838ba	0x6dae933b
--	0x764d5919	0x6673fa0f	0xf0a5e97d	0x4262ebbe
--	0x64b413f2	0xd2c4145a	0x0b2c11f3	0xfdfe9f93
--	0x96c77107	0x1399fdda	0xf599f215	0xb504da5d
--	0xf8a95268	0x9ed1ef87	0x9ae33cfb	0x3b21f1ef
--	0xc6d447c2	0xe0694d4e	0x967febab	0xc13f631d
--	0x8393bfba	0x37438788	0x1724194d	0x8e77a045
--	0x20e2483c	0xb961c2fc	0x485cf593	0xb3462621
--	0xcb2959b8	0x10307e19	0xf71fbbfd	0xdda641e1
--	0x0daf5f66	0x56d85178	0x145f6749	0xebc46ed1
--	0x5593c249	0x94561f51	0x534cc654	0xca7c8814
--	0xb59a578c	0x40b2b614	0xeaf3437a	0x198d5b4e
--	0xf245fa53	0xfb75e0b0	0xa363c46d	0xc43b5468
--	0xdf036413	0xc59f5a36	0xd8ff4381	0xa3af3e36
--	0x7af63462	0x414526d7	0x7bdc41c5	0xa416f1e7
--	0x6987d9ad	0x472c5499	0x4f10ee37	0x47bb7ff7
--	0xc7f2e621	0x820008f7	0x33a475db	0x91ff5d72
--	0x0517401c	0x73d067c8	0xe417b69d	0xb86d9903
--	0x1ac9a032	0x74bbf582	0x8b65596e	0x883be34c
--	0x95dcc26f	0xe232c646	0xfae9c19f	0x35cb5273
--	0x6a94d095	0xfff6ca91	0xb9c40eb5	0xd351dcac
--	0xc90d464f	0x9b609642	0x15663b56	0x15f7f88d
--	0x22499f60	0x417fd6c5	0x2dc36fe2	0x712bf66a
--	0x22f1fba8	0x531b8092	0x40d269b6	0x1d227898
--	0xeb6ff35b	0x2490ac31	0xc958ed65	0x3ce6ffb7
--	0x9338a806	0x3beadfe2	0x1c361ac9	0x53d0e3b0
--	0x91d46102	0x4d57045f	0xb5c8afb3	0xfd2c9e7d
--	0x3d578410	0x2adb9406	0x10df7459	0x90abccfb
--	0xe3f217ed	0xef5f4e09	0x74925ce4	0x169b5879
--	0xfeff4ad5	0xb300dd1d	0xc96022ba	0x72da501b
--	0x1e694296	0x9efa33cb	0x0dc3ee6c	0x0ac4e7ea
--	0x73041130	0xf0e6a295	0xc46bdb6a	0x6a927044
--	0xd217ceca	0x0b744007	0xd5a2bafb	0x4220cd92
--	0x70d3352a	0x5ee4f661	0xfa07e5c0	0x155542d9
--	0x4a39fba0	0xcec0552d	0x30c1d8ef	0xbef9d21e
--	0x183879aa	0x5b3f30a8	0x54a06db4	0xef876e4e
--	0x5e823680	0x53e2a353	0xc9aa4112	0x13a56ee5
--	0x848859fd	0x0ba2b801	0xec15260f	0x7bb22672
--	0x1a097332	0xb141339f	0x752a67d9	0xdae373f3
--	0x3c8cfd49	0x2dfaf2a9	0x95820c6c	0x956b39a2
--	0x1ca0d24e	0x1312b978	0x7280e1bd	0xa7a7c2ff
--	0x0b48e987	0xb6083e55	0x4b4b82f4	0x9c6104ad
--	0xcb93beca	0xe1c34035	0x34de740d	0xbb151baa
--	0x71f5942f	0x1eaac228	0x0c68331b	0x3d2a1dd0
--	0xe7a3d41a	0x7253acae	0xfd4de230	0x79988d80
--	0x4468f19b	0xac4440fd	0x6e8a6ef3	0x5736adf8
--	0xded67716	0x1f1d5a4b	0x96c5f451	0x85bae181
--	0x1293ab28	0xc2ba53c2	0x729ff4cf	0x60218df8
--	0xc2870138	0x6127d844	0x89604e9e	0xd2b9ad4e
--	0x4f6ded9f	0xdd263849	0x1633bd92	0x64b03a24
--	0x96dabd4d	0x6e85d235	0x1ab69ad0	0x9aa80454
--	0x6b9041e0	0x106c7e9a	0x8f54812f	0xa274efe4
--	0xe45d6695	0xf3aa7bd3	0x6a5a2a63	0xe36f3525
--	0x6238fa4b	0x7d6cb06f	0x16d3b4a2	0xf3b04822
--	0x638f1a60	0x0e1875fa	0x1c0292b9	0x6b519ea4
--	0x9faba37b	0x209341ec	0x83c9061f	0x3387dfe8
--	0xc7f12ceb	0x2bef45d7	0x8f8acb47	0x35d9741b
--	0x7009f514	0xfd003802	0x6f9489c5	0xe2ea2504
--	0x910e996a	0xcc81d016	0x3280730d	0xdedfef59
--	0x5a7357cc	0x8fe8dd39	0x15543fe5	0x976c4207
--	0xe41cf62b	0x0ba6b4b5	0x5c3b7ced	0xa6c5b72b
--	0x72ad3b4d	0xff143181	0x2b78a157	0x7fe231a5
--	0x6ff0538a	0xe58ed1ac	0x81a311a5	0xefaa54b8
--	0xf04a797e	0xce6e69c7	0xdc810726	0x7bab7be3
--	0xdd5923e8	0x5a2413ed	0x31cef794	0x73dfd806
--	0x1b9223c1	0x0c370882	0x04fa3b68	0x87c50bc1
--	0x1d78c90f	0xf4e2cee6	0xebea941b	0x73e5838f
--	0xca8d39a6	0xe004296b	0x28cf8a0e	0x7c73e7ef
--	0x26a296c2	0x789d4c72	0xd1490265	0xd9a9e843
--	0xf03504c3	0xfae6dffb	0x7a48f00d	0x51e369c8
--	0xcb3eeee6	0x0625e936	0xe93d0d7d	0xfb15ba6b
--	0xec5c76da	0x8fdf44f1	0xa036653a	0x5730c4a3
--	0xe5bfe6dd	0x0b8c091f	0x3b51558c	0x403748f4
--	0xf4007f86	0x952b5db6	0x5524d8ba	0x8046409a
--	0xe3fc61a9	0x66f4ea56	0x5645150b	0xdb2bec15
--	0x50672218	0x7f40e87d	0x2b8359f8	0x438787dc
--	0x7f221597	0xf8b1590c	0x4f468251	0xff586d05
--	0xb9195380	0x0ee09e0b	0x2fa7dbd9	0xd197b327
--	0xa0dbad58	0xb485681f	0x5ef0937c	0x1e07ebb6
--	0xcb49fe3f	0xc2427cd9	0x6c2c5298	0x4a2e171a
--	0xa7f333a8	0xb3609ad6	0x94e374d6	0x0e1eb64d
--	0x22c3367d	0xcdf89975	0x647aceef	0x16727c9c
--	0xf476ae53	0x35a1212e	0x0db768b8	0xfff8b53d
--	0xbd4fe45e	0xab28a5a3	0x59cec0af	0x28bcd1ef
--	0x6f43ad69	0x2658a059	0x27aee0ec	0x4e8bbd15
--	0xa9fdcf04	0xc9aa329f	0x687f010f	0x5c968a07
--	0xb894e607	0x0e1cba22	0x2f00f203	0xe8e133ac
--	0x494a4746	0xe8bdff9a	0xf69791a2	0x64179ce2
--	0xbfd10dc6	0xc026f6d8	0x4871923a	0x8946b277
--	0x609f49a4	0x6466df1b	0xd8c3c131	0x46ef0291
--	0x0fdce8b6	0x2b9aedb7	0x225c4520	0x72b332cf
--	0x4e220d47	0xf2f69c36	0x2c23fad9	0x57a2a918
--	0xe017409c	0x490819af	0xf2121afd	0x951ff7ff
--	0x40363fcf	0x5078b94e	0x9e4be775	0xee97ef16
--	0xdb3a2390	0x17d42af9	0x96f56a51	0x1b4c2934
--	0xc866315c	0x2b746f99	0x9a3b73f6	0xa1e081fc
--	0xa9d07ebd	0xa6359fae	0xdf50d099	0x55304e01
--	0xfe5aaa81	0x1e74267d	0x38b1d2d7	0x8633e9af
--	0x99b013df	0x3aa05831	0x86279736	0xd2b464e0
--	0xdf036a9f	0xe8162915	0x876c0d4f	0x4beb7d0e
--	0xfec9b170	0x46bc9df4	0x46cb88fa	0x0cb5904d
--	0x2e2961cf	0x7ea5dc1a	0x60670df2	0xf935ca32
--	0x67e6777b	0x8bacc97a	0x5cd07248	0x32e483e6
--	0xfdf09b0d	0xca57150b	0x3f432d09	0xdea2d7db
--	0x9f6a2954	0x6f07dff3	0x4133f394	0x60272f97
--	0x1b98c9ec	0x2ab648d9	0xb5df14a8	0x0d2c38f2
--	0x5dfde2c4	0x7cb43ca3	0x8d0c6c01	0xe80ea41e
--	0x5f58b71e	0x4ca9fef2	0xabd201a4	0x50905c08
--	0xca8ba387	0x5592922b	0xfa4e05f5	0xceb64b14
--	0x0845c5bd	0x518d369b	0x727e570c	0x1daaab31
--	0x801e8b9c	0xec6568f3	0xd4c3760f	0x40a78d22
--	0x38af58b5	0xc406a76e	0x8c3a7779	0x18272c42
--	0x45cf7b70	0xa6f3c0f3	0x88021e41	0xda662504
--	0xe97aa709	0xe93bafe0	0x8862ed5f	0x35bc8268
--	0xf5a41551	0x3dd3bb21	0x1af0cf11	0x08fe1ad7
--	0x53ecae41	0x01a4a8ae	0xfed636b7	0xf09323e6
--	0x73b9b253	0x7ebd7ce2	0x7074b4de	0x21c719b2
--	0x50982743	0xd23cfd27	0x136a1f4a	0x23260f6e
--	0xfad89dcd	0x57586681	0xadc4fba5	0xad0f71b8
--	0x91a3f188	0x20d62385	0xfecda9cb	0x33d67776
--	0x2abb0e6c	0x0ad16087	0x486332da	0x2928d342
--	0xf6d1b174	0x5e133a4e	0x72fc0ad4	0x940578b8
--	0x320a42b1	0x9cbda7d4	0xf2a36135	0x00ab8de3
--	0x5bad9000	0x5778e633	0x3952763d	0xe0e58583
--	0xdfb0bf19	0xb11914b6	0xa67da7a1	0x8d9a9f81
--	0x638cbcf7	0x83bf931d	0x8703b0dd	0xcab30fa4
--	0xd6db2ee6	0x5cc2e5ac	0x717e636b	0xfdcbc760
--	0x563b3b25	0x0e4df458	0x9efb8fa7	0x95aaa7a1
--	0xf05b6680	0x5e237e59	0xc884018a	0x177b5a30
--	0x3ea2c9bc	0xd0325ee6	0xb1dae51b	0x812ee29d
--	0x6d58db21	0xb787fa68	0xfd092294	0x09683dd3
--	0xfe0d6405	0xfdd99aad	0x78744a59	0x936738e6
--	0x6ad6cba7	0x370f7f8f	0xd208c214	0x12239384
--	0xbe71f0e7	0xfc0ef264	0xc04e4a49	0x354f9cf3
--	0xf5d7572c	0x07839ad0	0x834a003d	0x23ba26e2
--	0xf4049ecf	0x5ff402b2	0xff9d6769	0x074ebe6d
--	0xdc829da1	0xc3d7697d	0x973efe4f	0xfc2a9165
--	0x126dc518	0x0b824ca4	0xc438fb70	0xb7b0ee00
--	0xbe56afd9	0xa3d8defd	0x971455ae	0xc11ffde7
--	0x346e619a	0xb41111a9	0x6004b62e	0x896c668d
--	0x738e458c	0x351f9fdd	0xe771b2ba	0xad6d7464
--	0x719b57c2	0x6f6a4611	0x8a676f2d	0xb8db1c43
--	0x3f102641	0x51bffdbc	0xb7862565	0x5d8dd231
--	0x7a79bd39	0xfa472894	0x0fd1d2ff	0x64cf589a
--	0x38234d7a	0x5c9acefd	0x8eb0b9f8	0x761e1c95
--	0xf2fe78fa	0xe06220d7	0xaf82a919	0xf4e196e1
--	0xa17c8935	0x06d08d16	0x6bad807b	0xf410805d
--	0x4ff2bce6	0x3297c81f	0x06e35353	0xbe1f5e1c
--	0x65d1cb92	0x0dc69b2f	0xac55d597	0x636ff24c
--	0xe2e4f2ba	0x63d64922	0x4b2e9f71	0xad2279ec
--	0x5f0b5c0e	0xac688638	0x35613358	0xf5531360
--	0x54a304e8	0x27ebfe65	0x977b5a3c	0x3dc5e10c
--	0x73b32ee9	0x3a2c9454	0x30a149c6	0x31e5b55c
--	0x2c10854f	0x745cd38a	0x2853a27b	0x6629e355
--	0x0bb67e39	0x5469184d	0x694a9bb6	0x0a0ca25f
--	0xa878c5de	0xee15fd46	0x23d92ff8	0x02328404
--	0x1c9402b5	0xa46b6ce0	0xefc3e947	0x0e9312ad
--	0x5830ae9e	0xe30e32f2	0x9db8ee81	0xe8aeebbc
--	0x30675c83	0x447278c2	0xab2bad3b	0x08ba3d0c
--	0x1124e681	0x3691242d	0x903c8d2b	0x3281c312
--	0x22af690f	0xd69a150c	0x57622c5b	0x29313c73
--	0x6ab2d7c6	0x39b06dad	0x6e1f9f81	0x03324986
--	0x53a49093	0x7654eba3	0x2527245a	0x9af596fb
--	0x818ffb3a	0xa3817173	0x6a2c4b80	0xfcc42ad5
--	0xfb1bbb69	0x3a3720a2	0x90a89bcf	0xed80308d
--	0x7753cb1c	0x1c2654a5	0xb01ee4af	0x81091e85
--	0x9067b3f1	0x2e2b9b5e	0x9fb0c7d1	0x78fd9f69
--	0x5771c46d	0xacdf498d	0xfd8b8e77	0x4c15fa61
--	0x607120ce	0x18a298d8	0x73716420	0x65e5e06a
--	0x18c53e04	0x35b84427	0xcd82b522	0x9a7d26bb
--	0xd56b4b74	0x49b47fe8	0x63178dc6	0x0bac0f46
--	0xc8b0755a	0x9bbaaf1f	0x18131d2b	0xcc019330
--	0x0ceb89bb	0x8808c2d6	0xfb5bd86c	0x6c945b71
--	0xdc911924	0x4ebb8d35	0x44e46d08	0xabfee615
--	0xf456931f	0x7a244955	0x0bffce7d	0x5533ca5f
--	0xb1b2c636	0x4f29075e	0x64012561	0x7aa5e7c7
--	0x9c8a0666	0x9698782d	0x3481ad8f	0x21a55b19
--	0x735aa45d	0x4245b9c4	0x0d4c3fdc	0xd1b10966
--	0x7035fcde	0xc2257947	0x4a37271a	0x9da464a9
--	0x228adbf8	0xbf309e03	0x096f560a	0xa2b8ca78
--	0x427702cd	0x35a99cf5	0x99811758	0x6953db58
--	0xec07533e	0xe95838b9	0x61c71654	0xc9cce595
--	0x275af106	0xc8697af3	0xb3f27e58	0x411d8d30
--	0xd0d90ecd	0x1503b9dc	0x76bf070e	0x49f89ef0
--	0x7333b083	0x53f9c44b	0x8330c3a2	0x6a1119c3
--	0xca555f2b	0x3d51fc6f	0xac7b3320	0xf8e42cdf
--	0x053753fe	0xc122336f	0x94d289c6	0x088b5a64
--	0xc3aac7f0	0x96a76344	0x2ff05828	0x9b4f2af3
--	0x46de6a46	0x4ed29d98	0xe2ab7634	0x27481ddc
--	0x300ca71f	0xce7ac539	0x88240e09	0xb1a14e78
--	0x2addd4c5	0xb3a7f320	0xe91f549b	0x6881c45b
--	0x0e381c47	0x1018feb4	0x64679650	0xe62281cc
--	0x670ee6d4	0x0d226160	0x947b7f08	0xbc595a74
--	0x2380c0b3	0xc0235785	0x63b41221	0x80b9cc31
--	0x3231b4ae	0x33ed5718	0xf2c5c90f	0xdd3b03ea
--	0x67dfca08	0x453e9d29	0xa2bdecbf	0x5e9a3181
--	0xad17aea2	0xff0a8f13	0xdf946849	0xcfbbecb7
--	0xb0a602d7	0xb1a820c6	0xfe7abbc8	0x7f70790d
--	0xeb5f8863	0x266d3cc1	0xbd552a44	0xe19b1b3d
--	0x856aefbd	0x51c11f1e	0xde661b7f	0x61c075d2
--	0xd0f6a834	0xff1d0d37	0x6793d1c2	0x70c133a5
--	0x20c4d2cf	0x8c80d4d3	0x61ebe382	0x788b74df
--	0x11c56903	0x535889ba	0x0a9c7380	0xf9de2837
--	0x09437fe7	0x1627c6b2	0xb943bdb8	0x69bc29b2
--	0xee9795a4	0x83c992e0	0x95437918	0x8ce166a2
--	0x56b56b66	0xb0680941	0x623d38a9	0x2add07ad
--	0xe583ba09	0x96f6532a	0x3eff4696	0x2a8a6b0b
--	0x905b913b	0xafc01673	0xe871e006	0x2c2339ad
--	0x248438e5	0x96d83e53	0xb3a75d6b	0x2258cf63
--	0x69ff39bf	0x95727173	0xc3ac09d5	0xea8d2c06
--	0x0e7c0a4b	0x144fcade	0x28a9a5a3	0x97c11ae8
--	0x89865e3d	0x1640cd32	0xe3e551f8	0x1f7ba770
--	0x6d23fb31	0x11eceae3	0xc8ccb8ee	0x46dd0bb0
--	0xd01a46ff	0x0504adf5	0xec6e170e	0x2e3d7ac5
--	0x70f893ac	0xaf9963db	0x061e283c	0xf0ad248f
--	0x2fe97e19	0x881fd340	0xc686c9d5	0x88ea8ba5
--	0x92f05cd7	0xd6716148	0x6fc47fc3	0x2c51d9b9
--	0xd50a7faf	0x4eccacd1	0x7c92f802	0xa63ffc83
--	0x7cb0ab1d	0x4492e81b	0x7d906554	0x43306ba1
--	0x73a5d57a	0xe57a05d6	0x6850b964	0xefed595c
--	0x7754978f	0x629e8236	0x62ec4dde	0x247439ee
--	0x8b9982fa	0x4eece5c2	0x48599175	0x0fdc752c
--	0xecd87b12	0x94936c75	0x17a45ea1	0x80a899ac
--	0x22a39ee7	0x745730b6	0x03ea4daf	0x4a7570d7
--	0x307621fa	0x7322e0a7	0x3a8e0316	0x454e46f7
--	0x08773750	0x156dcaad	0x5562bc06	0xa23a1ee3
--	0x20435211	0x1d679ea0	0xb220e205	0x682cc1a6
--	0xd64a71c7	0x3ca7f8e3	0x2e92f253	0xa7cfdd0b
--	0xd62b4053	0xf5c5f641	0xbf72dde1	0xdcb716c1
--	0xe2f7b05d	0xa03145ea	0xc09828d2	0x7dae7916
--	0x6fb97c79	0xb3a85204	0x998a9c7b	0x5f42ba8c
--	0xd9c628b3	0x6b17bacb	0xa889b716	0x450ff97d
--	0xe9166f3c	0x2d20777b	0x82a003ae	0x2c7ae0aa
--	0x6011a9fe	0xfeed34be	0x1328f67e	0xf61003a3
--	0xfaecdf20	0xee18c81e	0x731a0302	0x11a39e60
--	0x355d78dc	0x99088f2c	0xcf253759	0x97347603
--	0x736f71f1	0x37e4b395	0x9cc74540	0xf7e39994
--	0xf01c5f64	0xbec519f1	0xa79c1067	0x76000d5e
--	0x1ac85b6e	0x51e5b7a3	0x62a97ddf	0x6f20096a
--	0x2af51e77	0xea5554f6	0xb4e581da	0xc1ac4ba8
--	0xc8f22bf7	0x9e254d3b	0xd7dd62f6	0x6461ae3e
--	0x423e1f10	0xf143e7b9	0x18c73b04	0xa43de614
--	0x2da8d02f	0x9befa706	0xc01dcd49	0xa278f1e0
--	0xd85f3177	0x6b6679fd	0x1ccef04e	0x53af9252
--	0x34d751db	0xc8d32c86	0x3d725097	0xa64ed581
--	0xd090c42f	0x9e92bf3f	0x6f82b089	0xd42728eb
--	0x3dd651e0	0x1985bc52	0x4b0f4159	0x0f99bd7f
--	0xe2597023	0xca0cae4c	0xce48a894	0x7249dd88
--	0x8e146632	0xb4be1d6c	0x790ae7e5	0x6747b657
--	0x52143947	0xa2e42ed3	0xea359617	0x6ca01a11
--	0x35c5e2dc	0xc97b78fc	0x5db6db2a	0x80fe3414
--	0x27da19d4	0xd7431d04	0xa91e9110	0x7d8ecb23
--	0x2508700a	0xc8c71ed9	0xd28835af	0x018c2887
--	0x3d0a6fab	0x3e8523d6	0xd0688dee	0xe5c3865c
--	0x838d72e4	0x6bb73a1d	0x497a59ca	0xf77c56de
--	0x38ecb72e	0xa55e3565	0x04b12c92	0x1aec9997
--	0x037c340a	0xef0d04c3	0x78f74bd6	0xdec9b9e8
--	0xd95b61ea	0x5528e8f5	0x4ecd325c	0x88ffdc0b
--	0xb337ac61	0x899d90e7	0xb5eeb978	0x8295d9ae
--	0x1ed8978b	0xa8849eda	0x8633b4a3	0xb8c858b5
--	0xbe3c4375	0x28b9e84e	0xb2a26def	0x22f8f66b
--	0x3a4aed99	0x0c4914ea	0xad103249	0xba5a5eff
--	0x8a052461	0x26938899	0x915c6ed7	0xe6268ad9
--	0x246e8c74	0x75f3c196	0xc3e725d6	0x92e02549
--	0x1f78a5cb	0xeada57e5	0x40f14906	0x0215e49c
--	0x57c06bae	0xc1896b87	0x0cd40a63	0x60741d80
--	0x11a69899	0x80fed942	0x0497e115	0x56697b55
--	0xba89c3d4	0x27d6b7c5	0xddff87b0	0xd3b1ff2f
--	0x3160e528	0x9cca1286	0x13b4fdf1	0x38cdd907
--	0xb50c4597	0x4c151714	0x1cab86c7	0x23126a3e
--	0xe26e9749	0x289a0d0e	0xc4004640	0x9d33928d
--	0x33b691a2	0x15ed6e6b	0x6e773980	0xadd59678
--	0x188ba49f	0x08da4c6d	0x6d150d0b	0x0c6c7b98
--	0xc8e1df7e	0xb8b1e692	0x5e89fd35	0xcb253d24
--	0xfc6ee27c	0x8013de3d	0x1d38012b	0xe50a8f7b
--	0x7d410ff1	0xceee4e9f	0x0e8094b6	0xaa1a5f57
--	0xb395a551	0xbd62b2ae	0x5d7b34c8	0xbd2d6195
--	0x33af4109	0x0769ff18	0x9c6cc123	0x78ee6eb6
--	0x412644e7	0x70e0c6f4	0xf45d8fc6	0x0435f5af
--	0xd43622b7	0x27409d5b	0x6dd04e8f	0x9f02ecf5
--	0xca415f7d	0xc9f439c2	0x7198e539	0x20476b75
--	0x3cdd8dd8	0xce17fbb0	0xa5bc115e	0xb0ee52c1
--	0x0b074cfa	0xd26d4f99	0x3b43320b	0x230b680b
--	0x9908f2d2	0xcbcb1952	0xf45a2f53	0x7b4564c6
--	0xcf2fd983	0x414fe4b2	0x55ea7f11	0x63e8117d
--	0xe8954052	0x7c2ea344	0x97a02aaf	0x6ca874c3
--	0x1ae5b4ee	0x41754eae	0x6954abe0	0x115ddcda
--	0x9a27968b	0x32a53e65	0xffe47b2f	0x4fe7e5a7
--	0x6016dedc	0xb3c0893e	0x9626776d	0x5ec773f9
--	0x1104e01c	0x1473cfb3	0x43b2cedf	0x8ca9d119
--	0x7f1bc844	0xd8bb7387	0xba90d2ef	0x2bb0dcf4
--	0x2340f124	0xa5bd514c	0x50afab05	0x718f5ad5
--	0x7c03fad9	0x71d00d2d	0x1c31fdc2	0x4a938809
--	0x40945ded	0x437f2a0d	0x83c10d64	0xd224c6ab
--	0x0cd44481	0xb0040966	0x27fd6e7f	0x6ff45d4c
--	0xab057ad1	0x8fa4e5d4	0xac50270c	0x6e4926ca
--	0xc5721498	0x2529b458	0x40ee2ad5	0xde5e21f2
--	0xea8964ca	0x56766e60	0xdc3b8702	0xa93528d4
--	0x28d7713d	0x42edf022	0x59774dd8	0x200ff942
--	0xe7a4d769	0xd8c4ef5e	0xe177f715	0xe9d53cd6
--	0xc11270bb	0xb25977e5	0xb80867b4	0xfb48468b
--	0xdbf166a8	0x49700d85	0x0f85f98a	0xa7ca7a75
--	0x109817ce	0xca243f19	0x8bed7688	0x9a1c8231
--	0x94f0ce97	0xc36309ca	0x90ecac24	0x67e7e0de
--	0x86b18d62	0x18c7b7a5	0x622f5d3a	0x47e1e067
--	0xdc96b94d	0xe4a03beb	0x59d17692	0x040abc0d
--	0x44a5ae50	0x3d3dab7d	0xc18dfd30	0x2802b9d9
--	0x6818379f	0x56db41d7	0x97cbf039	0xe41d6a32
--	0x64b5fb01	0x6506e0b4	0xd60a3234	0xdf3573d2
--	0xac148579	0xe7f46ac0	0x05e1c763	0x904a5aa9
--	0xc7ca1ee0	0xe0c3b047	0x5e36e1bc	0x447a9141
--	0xe24654df	0x9853a49b	0x6a29cedb	0x022f00dc
--	0x6df2a7a7	0x3636da02	0x72bb9c81	0x4f0e0918
--	0xd649f4a5	0xbb0c81f9	0xc0ba93fd	0xc1b390f1
--	0xda84e720	0x1aea0064	0xf3ee67e1	0xb874ef4a
--	0x82467ce6	0x59abf506	0xafbf145a	0x9a4cf8a1
--	0x17247c89	0xd8669398	0x1796eaf7	0xbc2d24a9
--	0xcb486570	0x17a9db23	0x3e6504f0	0x08684517
--	0x2723ab28	0x7081b814	0x8a265a04	0x697e6d8b
--	0x69b146dc	0x6434c182	0x27ec8101	0x864405c5
--	0xfff86c9e	0x3052d8a6	0x23d283db	0x492970e8
--	0xbc6c64c3	0x46d8f98b	0xe16e7ff3	0x731e4f82
--	0xbd26b1af	0x6b30e6c1	0xff192fce	0x097e0bba
--	0x49df63a5	0x2fdc3f01	0x50aae053	0x60177b8f
--	0x1949eb85	0xa46084ce	0x9658f694	0xcb951fbc
--	0xc53806d9	0x63a17d30	0x3b3f86c2	0x8a37aa6c
--	0xedf8fe5c	0x87aee1d3	0x8c680126	0xfd8b27a6
--	0x231fa106	0x69358c25	0x4502c348	0xc107861c
--	0x46280e70	0xcf6067ac	0xf6a04ff3	0x3e488677
--	0x6f3fb4c1	0xeec1f758	0x560e1c48	0xb604c06b
--	0x69e34b1e	0x8ef41dec	0x854cea22	0x726581d7
--	0x55ea91f3	0x38ae4053	0x5ff7389d	0x6952cbf6
--	0x09aa0fc1	0xcccb1d50	0x5c1a633a	0xde1eba46
--	0x797212d8	0xa943fb3d	0x6063a1a8	0xbe68ef36
--	0x6ba0d5ba	0x0dbe2061	0x47711712	0x62679807
--	0x6f34009e	0xe6fe8f18	0x66a6a64b	0x3f80f472
--	0xe953d5e0	0xbcd8196a	0x086faad0	0x49da7f16
--	0x7f2199a5	0x55af4af2	0x085b4d38	0x22e634bd
--	0x6cff0416	0x343466f4	0xd121a7a6	0x6caa3942
--	0xe4f365a2	0xd832eb0c	0x616728e5	0xcca4c71a
--	0x4010cdc2	0xd0f1d1cb	0x5e695f89	0x27719206
--	0x0ec92854	0x76144a1b	0x49808021	0x12457a1b
--	0xdde7aa5c	0x8f1a077f	0x110a4a5a	0xb3a5ad31
--	0xaacebf8f	0x66ff7f33	0xa2340971	0xfb4c7e82
--	0x8dd536d7	0xafd2021a	0x72aa9c6e	0x22df6952
--	0x83c4b4fb	0xba515555	0x93eee8f0	0x22d0ed5a
--	0xbec05586	0x83828f28	0xe0d7f930	0xac0f0199
--	0xef6d76f9	0xf56ebdf8	0xf67323c9	0x8b805745
--	0xce5902c0	0xfa2ce3da	0x10f836dd	0xe1ac6d97
--	0xa0e415ea	0xbb7c32ad	0xc421f3b0	0x8166e898
--	0x74e7a73c	0xf454b82a	0x631369b1	0xe30ed23f
--	0xdaa1c75b	0xe7c9c6a7	0x5f33c375	0x99c05187
--	0xf2d6e6ae	0xcd2045b8	0x92ff3009	0x15082015
--	0xd1a1580e	0xdce25f9b	0x21984a75	0xa9be5388
--	0x099a5372	0x3ab9bcfa	0xdb9069aa	0x49a99be6
--	0x42a9ee0b	0xfe32d832	0x24e11ad3	0xd16f596b
--	0xb95982cc	0x754ab1c8	0x42ffa128	0x539e823d
--	0x28e0f976	0x262ddfc0	0x2a16e7ad	0x49b5acd9
--	0x931f3def	0xdc419b84	0x8412cc3c	0x81056cd9
--	0x91933e1f	0x57710b15	0xa55d2696	0x87d88724
--	0xd4fedfdc	0xcc3825c6	0x397f382f	0x80f9b6ba
--	0xcdd6d59f	0x24b984d8	0x8f1c5bcf	0x25bcef1d
--	0x00dc603a	0x76fd94c2	0xa267a7dc	0xa6e90a6a
--	0x5c5916d6	0x065a52cf	0xa28d3263	0x9b17b72d
--	0xb8436b48	0x1b1c2391	0x1fda3395	0xa6cecbcb
--	0xbc4ec502	0x1766b590	0x5945fbd6	0x6a124405
--	0xf92d06f2	0xe24694b7	0xf6befd08	0x8266cf5c
--	0x03ed670a	0x5f98be62	0xf27b7e2e	0x598cf22c
--	0x2e855591	0x879815fb	0x153799c6	0x3820faf6
--	0x3d3a2cc6	0xdbb6dece	0x1a3c46b2	0x5031bdda
--	0x47894c03	0xe43661fe	0x7a6ee548	0xa5ca9779
--	0x6aa9e105	0xbc8505a3	0xa03b860a	0x448faeb9
--	0x367de4a9	0xc9779c7d	0x6535ad8c	0x4b7fcacc
--	0xb2db5c10	0x0ab41ec6	0xe528ab90	0x5e6f03da
--	0x98bc76d3	0xf38df42e	0xea59b039	0x1c2eaa28
--	0xca30dac5	0xdb0eb8c6	0x60063860	0x18823f8d
--	0x164e2f28	0x7cbbe080	0x70a12315	0xb08f44d9
--	0x5fbb9453	0x4bc62738	0x9fa15ffc	0xe4033ca1
--	0xc9dfbc13	0x58245d7d	0x588113aa	0x8f5a6ac8
--	0x92588a60	0x26330c74	0xb2aaf0e3	0x24ada1ea
--	0xa9e973ae	0x624b73e7	0x4ef961db	0x95ede155
--	0xf2bb86ff	0x96bc79d9	0x95cd646b	0x1c3af453
--	0xf60fa711	0x10905115	0x0e24b740	0x169bb227
--	0x34cee6f0	0x990980db	0x18d8ace5	0xd4c87504
--	0x29515d32	0x2e5d9c04	0x87dffa60	0x12e815d1
--	0x021db8e9	0x2c5a42fd	0x6e3a1a13	0x88889ab5
--	0x3bc915a6	0x608919c5	0xd310a970	0xea8f3218
--	0x949f55bc	0x9ed7aadd	0x6d990157	0x181f1c2f
--	0xa940df64	0xf3be8c39	0x7ca2e699	0x7b4f07f9
--	0x89e83fee	0xe66b9493	0x54fc3d17	0xa63d2d46
--	0xd5e835d5	0x910e0144	0xecf67025	0x1fa6a93a
--	0xe692dbca	0x466af681	0xc2bc808c	0xbb4ebd60
--	0x74d5c729	0xa283ad25	0x1e66fa23	0x6d372988
--	0x753c9fcb	0x1742efdb	0x5b68cf15	0x372a0e33
--	0xaa3a7ebd	0xa0e944d5	0x95d5cbb4	0x4fb6020b
--	0xced927b0	0xb2afea78	0xd0646b72	0x1622fad4
--	0x4672c6b6	0x736ae4f8	0x8d46a4db	0x0e6a432e
--	0xe0a30a98	0x4c2bcf4f	0xd87acedd	0x19682d7a
--	0xf97c025c	0x55d8feb3	0xbcd4d2ff	0x236c6f9f
--	0x8ba0246d	0x42812f73	0x327636f5	0xc92cd30a
--	0x08a69d9d	0xc735a946	0x82eca01f	0xda0753a0
--	0x7077b1d1	0x17b05834	0xfa24bc02	0xf49f4473
--	0x8f9ac6b4	0xa880c630	0xf7457b4d	0xd5f829e4
--	0x25c49a99	0x1176a997	0xbb2d2009	0x61d35764
--	0xa322c752	0x6ef3ae02	0x5faae6f8	0x9a52acf1
--	0x19176f43	0x43843b07	0x14efc471	0xee474403
--	0x319c4857	0xa19adcf0	0xc0a466e1	0x02db14ad
--	0xb7f211f3	0x72aa6ca6	0x0eb9bffe	0x48a6d284
--	0x9a93a2ee	0xac09fc5f	0x92a62c4f	0xd34f0271
--	0xffb348c7	0xf229b6e2	0xc68ec1ca	0x19577dbc
--	0x069a10bf	0xf64ac347	0xf7c3c848	0x81975294
--	0x6376e550	0x93b53440	0x8bb17daa	0xc4c64c07
--	0xcaeff293	0xd51497b0	0x33da3565	0xa73d5def
--	0x4bf4dcde	0xfb470fcd	0xca7db864	0x7ef17022
--	0x47567363	0xd8fb8d74	0xa68c3c72	0x8202e4f3
--	0x75bf1798	0x16a70fd2	0xcc3b697f	0xab9a1075
--	0x13f56ef3	0x269d0302	0xcb655a43	0xc9a4de88
--	0xfb8363de	0xff40f36d	0xd2555489	0x647a7995
--	0xfd8eda6e	0xa3958c9a	0x20e029b4	0xbed3e225
--	0xa7df5f17	0x63bc3c1a	0x337ecc9d	0x6c329508
--	0x786aa47e	0x1db5b093	0xc0acd73b	0xf9587237
--	0x243e5d40	0xd3623c3a	0x338c4740	0xb672140e
--	0x43640a9b	0xb7ef3f6a	0x44151074	0x749bcc46
--	0xfa1f103b	0x0fefb19e	0x58855538	0x138ad276
--	0x2641fd80	0x297d99d0	0xfaa63ba2	0x00b6f11a
--	0x3793fb6b	0x124763a1	0x8b9419ac	0x56abf9eb
--	0xdbf83419	0x43570571	0x37299cd8	0x8b201e62
--	0xa4058fa5	0xb320e91b	0xbe7d40b7	0x4eca3b2d
--	0x8519c155	0xf4b17021	0x9e4c572a	0xdc1f9e16
--	0x39a589a3	0xa6cfc7a8	0x5b986910	0x64e150e7
--	0x60b6f2c1	0x02bacd3f	0x2f3b5a5c	0xc6f453a8
--	0x15a87a7e	0x76104a14	0xafa2ef63	0x2cd48dbe
--	0x3c7abddc	0xd786ea5a	0x4f65867a	0x355cda38
--	0x2ae03d9e	0x4f11f6be	0xfc0a0034	0xde4ea602
--	0x21ff83ea	0x0f12d913	0xedf4da28	0xc96d8fd1
--	0xd7e82c3c	0xfec63bdc	0x37a456d7	0x3007e18c
--	0x091a47b6	0x82f1c641	0x82219cce	0x3e7e6993
--	0x7b3a2115	0x0b8e1a02	0x40f88213	0xfa2f9c21
--	>;
-diff -ruN u-boot-2015.01-rc3/arch/x86/dts/m12306a9_00000017.dtsi u-boot/arch/x86/dts/m12306a9_00000017.dtsi
---- u-boot-2015.01-rc3/arch/x86/dts/m12306a9_00000017.dtsi	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/dts/m12306a9_00000017.dtsi	1970-01-01 01:00:00.000000000 +0100
-@@ -1,750 +0,0 @@
--/*
-- * Copyright (c) <1995-2013>, Intel Corporation.
-- * All rights reserved.
-- *
-- * Redistribution. Redistribution and use in binary form, without modification, are
-- * permitted provided that the following conditions are met:
-- *	.Redistributions must reproduce the above copyright notice and the following
-- * disclaimer in the documentation and/or other materials provided with the
-- * distribution.
-- * Neither the name of Intel Corporation nor the names of its suppliers may be used
-- * to endorse or promote products derived from this software without specific prior
-- * written permission.
-- *	.No reverse engineering, decompilation, or disassembly of this software is
-- * permitted.
-- *	."Binary form" includes any format commonly used for electronic conveyance
-- * which is a reversible, bit-exact translation of binary representation to ASCII or
-- * ISO text, for example, "uuencode."
-- *
-- * DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
-- * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
-- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-- * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-- *
-- *---
-- * This is a device tree fragment. Use #include to add these properties to a
-- * node.
-- */
--
--compatible = "intel,microcode";
--intel,header-version = <1>;
--intel,update-revision = <0x17>;
--intel,date-code = <0x01092013>;
--intel,processor-signature = <0x000306a9>;
--intel,checksum = <0x3546450b>;
--intel,loader-revision = <1>;
--intel,processor-flags = <0x12>;
--
--/* The 48-byte public header is omitted. */
--data = <
--	0x00000000	0x000000a1	0x00020001	0x00000017
--	0x00000000	0x00000000	0x20130107	0x00000a61
--	0x00000001	0x000306a9	0x00000000	0x00000000
--	0x00000000	0x00000000	0x00000000	0x00000000
--	0x00000000	0x00000000	0x00000000	0x00000000
--	0x00000000	0x00000000	0x00000000	0x00000000
--	0x86c5b0d4	0xf6978804	0x7f4f5870	0x6319dc3c
--	0xbb3b7d61	0x33cf9075	0xe8424658	0xf611a357
--	0x5a3401db	0x42caecce	0xb4d8e75e	0xe6dbaf24
--	0x7861b35f	0x6bd717bc	0x23b9b731	0x82ec1ac8
--	0x20337b64	0x5396dbf1	0x59973bff	0x724bc7e9
--	0x5237193b	0x0b8647c1	0x6a0d0e16	0xbf9ddb5b
--	0xace2cc1c	0xad707638	0x056f102f	0xa37e60f8
--	0x76255642	0xfb86e030	0xb8069a40	0x367795f1
--	0x653fb05e	0xab7f14ad	0xb6e8a8e1	0xd2598d20
--	0x2eba3f68	0x78b372f1	0xba8d13f8	0x1f1de861
--	0x97f951d5	0x8097c728	0x27dbf904	0xb97906a8
--	0xffe7a4ac	0x4b947668	0xc1dbd726	0x2adcf777
--	0x63b1bcf0	0x818e2a1b	0x49aa907b	0x2faf5e8d
--	0xae842352	0x82707fae	0x0aa12b41	0xa0bae11c
--	0xb4298c47	0xd2b4099c	0x4ff625f2	0xcd2630d4
--	0x79850981	0x05dbf57d	0xb05b81a5	0x56e73ec7
--	0x95cb3897	0xe262bda5	0xb2c6e288	0xcb7f8e77
--	0x72b8bdd3	0x3f400494	0x63ade65b	0xbc4adc71
--	0x00000011	0x06c0f8ff	0x0eb63d77	0xc54cdabf
--	0x76bc8860	0xdd142643	0xe7bfc220	0x17aa0a91
--	0x4fd676ba	0x4b6b1a15	0x2a1a1c16	0x4fed6de0
--	0x8c3d6bcf	0xbb319bf6	0xa82532f1	0x7c8ce014
--	0xb830a38b	0xec25bc6b	0x61c8a8a9	0x49a21dba
--	0xfcf8bad0	0x7372f29c	0x1f7fbcdd	0xc2ff42f4
--	0x780878f0	0xc967068e	0xe19cc3c9	0x155e6646
--	0x75235c43	0x9aaf3741	0x9dfd116d	0x0f031b6a
--	0x4963e039	0x6918daa8	0x7f0ca4ab	0xd77dad79
--	0x2f8847e8	0xf79c82a4	0x6a6aaad4	0x24f07dbc
--	0x895d3f6a	0xc96b2eb0	0xff50228f	0x573d364a
--	0x5fca9d56	0x3c11c35b	0x3e90fb12	0xc4604067
--	0x5c980234	0x7c42e0c7	0x60cca3de	0x637a4644
--	0xedc43956	0xb0efb4e1	0xe94716fa	0xa6478f51
--	0x33965654	0xdf6b40a3	0x48ac1b18	0xd6723c94
--	0xf040d6d1	0xaf850470	0xe2bcde48	0xb90a4998
--	0x8f620105	0x3d592878	0x2f697bad	0x9f7721d9
--	0xec34444a	0xb0594770	0xd7180f9f	0xa510a168
--	0x460563b0	0x5d4f34f4	0x21dfc16b	0x051de344
--	0xa57bc344	0xff2c7863	0xf0bc063d	0xf5a89004
--	0x79a81dab	0x9e8cb974	0x2309b0a4	0xa47a46de
--	0xcf9c0c44	0xf761c817	0x67ab642c	0x0db4422f
--	0xca3616fc	0x79e66c8a	0xd56a3332	0x5e0f338b
--	0x5814cb3a	0xed1b9a4d	0x47d59f72	0x25b03786
--	0x3edd1d42	0x8cd947cd	0x706e6ebd	0x82c2bada
--	0x1bf6a96b	0x77dd859a	0xda35335f	0x22fab458
--	0xd0661fd8	0x02bb4a42	0xe2a2bcdb	0x0616580e
--	0xd35be23f	0xc206d16c	0x401218be	0x51107c3d
--	0xba84b8be	0xace4d8f2	0x505b9b28	0xc517034b
--	0xac5ba582	0x7419fe54	0x43493cb1	0x2fe0a66e
--	0x206039b5	0x07569011	0x230ce53d	0x168d427f
--	0xbfe0bd10	0x82bf11be	0x5b55475b	0x5490a0e9
--	0x1c3c1e3c	0xacad77de	0x1666512f	0xfc3250d8
--	0x930a6312	0xdd85c066	0x1b95c18f	0xc8bbd3b0
--	0x1bb2a34e	0x642c7653	0x0f536213	0x1f7ab4eb
--	0xaa5ef677	0xe6ac9581	0xd7a2fe73	0xd417dc79
--	0x455a6877	0xae825a40	0xe0c98bec	0xac39ba49
--	0x299d9bd9	0x957d0bb0	0x1645111b	0xe9da4beb
--	0x1b005ce7	0xddb742ce	0x6c5f3ffc	0x24f74d2c
--	0xf4ace044	0xb21bc7ba	0x338002dc	0x240effa1
--	0xd208ae00	0xfe8c2b5c	0x9a457293	0xd9365ac4
--	0x98f24244	0xf6d1aaea	0x7b874350	0x1ba4086b
--	0x1d3bf168	0x2bb6f4fa	0xb27f8477	0x8da836f6
--	0xa8762693	0xc377fa64	0x74cfd979	0x90435c25
--	0x29d80e17	0xc3503c9c	0xaacd2178	0x232c748d
--	0x6fecd3ba	0x00fb4aa0	0xbac3ee19	0x6e5c63e3
--	0x17823c14	0x0e9d33bc	0x0fa9de06	0x998b14b2
--	0xfdd8c80d	0x01b0591b	0xf70bc4ce	0xb278c496
--	0xa7e30708	0x69cf8420	0x14f8b744	0x8bb8a0ff
--	0x168f6db0	0x95da6db2	0xf96d121d	0x67fd06f7
--	0xcd81d278	0x8693d095	0x15e1a24c	0xe5f554f2
--	0x499874e8	0x30fc0785	0x0f4fa1b9	0x65c93dad
--	0xd939bf24	0xdad29721	0xf253b752	0xf6ff59da
--	0xc5dfaffc	0xf0071f34	0xdb0db8b0	0x24475e2d
--	0x2a4d5b8a	0xf7624bea	0x3fdcbc90	0xb5a66e35
--	0xd0f08636	0x24643caa	0xc5d08e83	0xb134c55c
--	0x8e3653c7	0x34496b0c	0x6b2aeebc	0x2fbab601
--	0x105613a2	0x7babd55d	0xa01af846	0x248be690
--	0xed27917c	0x26ee6e13	0xa1dac5fe	0x852ed91a
--	0xfc83fcca	0xdf479c33	0xfd6efe96	0xdc62521b
--	0xa37d2a8c	0x1d2bad9e	0x4287614f	0xc4f7b62c
--	0x2aab0562	0xec6d4226	0x52853fb4	0x264e3507
--	0x1c3af366	0x33269776	0x81b8529d	0x115530dc
--	0xe035f98f	0x433d1b6c	0x1ea6daea	0xecfd2ad2
--	0xa57a0c22	0x1dbe3e12	0x6fafe41b	0x8e579e35
--	0x6c493fbb	0x034dd4f9	0xd17cd6f2	0x05c5cfa8
--	0xd9bffa39	0x0fc16e9c	0x831b88c8	0x7e7dce3e
--	0x3320bc7f	0xd5abafaa	0x217ab526	0xade2597d
--	0xf01b00f2	0xc9e34b72	0x00a4cb0b	0xdc198512
--	0xdc7cc8a1	0x89db07b5	0x6c2153ea	0xb8bdb8aa
--	0xdf8a1ae8	0xa517f6b1	0xd32569d9	0x37e79008
--	0x3c7527c3	0x7d5b2d3b	0xb31cb907	0x35db7f6c
--	0x0ab0cd65	0x75feaded	0x7c8260a9	0x5bc04f56
--	0x2fac9f60	0xd7b3a2c0	0x2b393634	0xc2df7f43
--	0x1ff2fa9f	0xc81af169	0x188b1f4e	0x08bf6f86
--	0x5ab2f188	0x0a71eb64	0x03b57501	0xa684fc23
--	0xa729ffef	0xe3b4a709	0xf9eb97d2	0x01506c95
--	0x0d9285f5	0x8e1ee93c	0x7d15a0d8	0xd9390673
--	0xf116ebd8	0x7e68798b	0x3dc8412e	0x5a9a04b4
--	0xe3805f51	0x00493bb1	0x4ec65ca2	0x2aedd69a
--	0x7f2a5b18	0x9994ac32	0x476f3703	0x7d3da882
--	0x5635f55f	0x7a0887e0	0x0af46feb	0xfc2f3591
--	0x02e29400	0x70fd3234	0xc549379e	0xaf34fa5a
--	0x5bf7c649	0xeb183cff	0xa236d508	0x4525ab64
--	0xc4301026	0xf281df99	0x0b298e46	0x9b7c1a99
--	0xc4b24e77	0xea536992	0x5a39e37c	0x570fb6df
--	0xae5d5c49	0x01142cc2	0xda05d3f1	0x337bf65c
--	0x3c986598	0xbecefd30	0xb5e34c2a	0xe7c3847f
--	0x18cb24b4	0x71278c26	0x4b8d6caa	0xaf7c300e
--	0xfb6ce9b8	0x94c4b785	0x67275f17	0x59498cf5
--	0xca8eeec6	0x3374e7a6	0x649affac	0x9049ba78
--	0xff9d3908	0xaceec446	0x225ece3a	0xac1d4fec
--	0xdc050fed	0x04e3ed8a	0xb303d8e9	0xe9d26aff
--	0x0a98691d	0xf243492d	0xe3b42f00	0x6c21a97b
--	0xa385ae98	0x14ba3f4d	0xc0215cc1	0xe1ba6c0d
--	0x412bbbe4	0x39f95d1c	0x593bd878	0x45d3066a
--	0x9fcee8a1	0x3f29b2fa	0xc9ae58ee	0xed6def92
--	0x6c8f2182	0xdba64e20	0x276c2c21	0x81ea9dfe
--	0x20ae00b2	0x8c2d2724	0x66c09f5c	0x24908e2e
--	0xfecf8194	0x6be61e94	0xcdf5d7db	0x98b829a3
--	0x4241ab07	0x1207ef2f	0x96e7b073	0x766293ea
--	0x58eb0882	0xf12a6426	0x741b074b	0xbd4302cb
--	0x909b6c4f	0x1c4949cc	0xd4d6a3e9	0x442b74b3
--	0xbc8cb3f9	0x0efad89a	0xa2ceff3d	0xecdf86bb
--	0x46a4a72e	0xe9d8abe4	0x94c91479	0xe99a80b9
--	0x1072b708	0xb8318ad3	0x0685426f	0x3e89a0d8
--	0x0b7c438e	0xb4b577d0	0x046599e2	0xd0ef85f2
--	0x3566d2d2	0x43ade22b	0x8753a78a	0x8f6d8e02
--	0xbdf33e56	0x8b2b6696	0x22a5e911	0xd0e0f4eb
--	0x42729c29	0x425921fb	0x82f7634e	0x2c145fd5
--	0xff59deeb	0x018a5372	0x33c4e11a	0xc001c097
--	0xf250cfcf	0x2f682912	0x21f40dc0	0x883196aa
--	0xcd5c58d0	0x7c329754	0x481c450e	0x9411c6c0
--	0x69a9df82	0xacb01a1a	0xc0b569a7	0x0b7fd1a9
--	0x4c339ad3	0xb0d9e211	0x07098664	0x14a5cff9
--	0x53beae37	0x4e173257	0x4e1d2e6c	0xce981dd1
--	0x45d6204f	0x3c193268	0x4f51ac3c	0x5ecffa12
--	0x48068ee9	0xde12270f	0x0a0aa980	0xd6fe8ca2
--	0x97d51da8	0xccf2db36	0xb3ad0598	0xbc56eb56
--	0x0adf5e5e	0x9e320aa1	0x8ebb75ef	0x3973a323
--	0x7e3d87e0	0x2c0d1858	0x83b7fa0c	0x36effdb5
--	0xcd9eba1a	0xab5b5790	0xa48fbf00	0x536e2ae9
--	0x2f2a3f61	0x05706a73	0xd2dfed08	0x7e4626b1
--	0x172c6ced	0xbf2e44ba	0x15aefc2e	0x9cf56c37
--	0x663c6695	0x04cece5f	0x4ce00027	0x465b1cd4
--	0x333dc2c7	0xce41f1f1	0x6dd8503b	0x52b79af7
--	0x564c81de	0x0e5e2daf	0x869753f5	0x16667889
--	0xe1acaf08	0x38ffbb0b	0x83400589	0x5144052f
--	0xa3819950	0xd21501c5	0x1bdadeda	0x0a874e2b
--	0x05480284	0xe8f76f11	0x582cad8a	0x0553f942
--	0xb6451cb9	0x76bdc86f	0x96ffe0c7	0xc630eba2
--	0xa82ec683	0x5902ef45	0xc362248c	0x18c412a9
--	0x1d09c103	0x2355ed98	0x5ec5c718	0x5037e359
--	0x1508f804	0x09cfea9d	0xa16cbdfa	0x5f962b17
--	0x85a35a27	0xa048dd30	0x6fe7ba90	0x0dc20150
--	0xcb56daa0	0x4188fb20	0xb4182598	0xa1bc5dd7
--	0x8c11e0bf	0x2104df35	0x025e74b8	0x79d177df
--	0xad74bb77	0x4b2419aa	0xe374add2	0x411593d5
--	0x796778da	0x9e43a420	0x4a2e0860	0xefb48578
--	0x47cafbdb	0xea15924d	0x70ac1467	0xf52fd888
--	0xd2df4bd6	0xc1fc63bb	0x119ab88e	0x0e147ead
--	0xa85bd8b5	0xc2e61ddb	0xd566417d	0x6bb9f9ec
--	0x69bbcf1e	0x24d46989	0x3caf067f	0x58151211
--	0xc2a6b6e5	0xb233416f	0x3da28155	0xf9cd9385
--	0x7a530045	0x1eab05ce	0xb86ed141	0xa8f13a5b
--	0xf9819f81	0x66d5d5c5	0x148c1a02	0x496d3c56
--	0x370dcd45	0x5f13f0b6	0xdd4eaeed	0x8dbad50d
--	0x0747ce54	0x69d2adcc	0xfb69c18f	0xd44ea186
--	0x74ab7537	0x0c642449	0x88b096cf	0x3a8ad683
--	0x408cd7aa	0x6daa6708	0xb267b312	0xa4225c7a
--	0x7a56dce7	0x6a8d497d	0x8837bcbb	0x6125397c
--	0xeb51d233	0x362bdde9	0x689657f7	0x32d09e1f
--	0x753a3d39	0xf77db5b2	0x8057908a	0xef12815d
--	0x594fffe6	0xcf3402c5	0x1a0d4923	0xca547b2f
--	0xaf9d604d	0x5d2e30f3	0xffe18005	0xe29bb0d9
--	0x36fc10f9	0x3720aac6	0x37bc1ad3	0x47d000ae
--	0xa4b0da0a	0xa178228b	0xdd9374e6	0xa1f3df5f
--	0x9ae2e451	0x21c4aceb	0x8f9fb226	0x5190b712
--	0x70253633	0x9c9cb5f1	0xc9178689	0x551c1a2d
--	0x6db67cc0	0xcf1b1ade	0x48449272	0xd18634f1
--	0x9d9c3de7	0x19025530	0x121d78d4	0xae4a39e1
--	0x62850819	0xf3d4af6a	0xe5ad5b80	0xfa053c7d
--	0x7ed68b9a	0xdbde2894	0x4b5c04de	0x65178203
--	0x9181cdd8	0xb17e27b9	0x0e29b338	0x50156ab4
--	0xf7726438	0x178108d6	0x1d8dc6b7	0xc3e7512f
--	0x0eb8339c	0xe2684a6f	0x7668ed31	0xd0ed6eda
--	0x4342a534	0x03840286	0xad1e6969	0xa9a6c98d
--	0x1bf77774	0xd32fc9d8	0x405620d2	0x8ab19efc
--	0xce4d7506	0x6f4eaae4	0x3e830dbd	0x76818782
--	0xfde4ee8d	0x1953cd0f	0xd47be276	0xf2480bc0
--	0xd1010013	0x2dd56a58	0x083084f4	0xc91b0ad6
--	0xc2524e12	0xa60710f2	0x3d955047	0xce380846
--	0x0f6dec2b	0x604d1492	0x5ca43ee1	0x6b51a626
--	0x350d5483	0x8d99ae30	0xcba06491	0xcc0185eb
--	0x7b64caa6	0x2f1754db	0xca0691f1	0x6219efb6
--	0x43291db0	0x259d3f12	0xeaf6ef9f	0x5f0e065b
--	0xad576541	0x8615a414	0x81124bdf	0x62b855a9
--	0xabdc529f	0x01bfdf75	0x10e4c656	0xf8e86f78
--	0x1fbe10d1	0xa6873c2c	0xdf83dcd8	0x20d35872
--	0xf46f2861	0x22f3d642	0xfdcda29a	0x16adbdb4
--	0x01e5844c	0x011e5454	0xf5432b04	0xd5f6a80d
--	0xb081fab6	0x64fc2fbd	0x4ca76e0f	0x3a8d8b29
--	0x3f03ec12	0x58e2bf6c	0x24f2b8b1	0x108e414f
--	0xe76a02ab	0xcb525af9	0x623ba7a3	0x31412c27
--	0x69c2f5db	0xd5546d8b	0x8200d2c9	0xf1e34a71
--	0x393e24dd	0x2b867933	0x0596e778	0xc5112b49
--	0xf433cdea	0xbc505e7b	0xf64bb064	0x1e892633
--	0xbf17307b	0x9118de2c	0x6b1d61a8	0x1945519c
--	0x32638ca4	0x5e436733	0x3dc20ff6	0x9babf127
--	0x485c1555	0x0d0c4e2d	0xc4d5d718	0x8cfffc16
--	0xf64050db	0xaa4ef416	0x8d398a00	0xe4a16eca
--	0x5d9d9314	0xefa2bf1c	0x05917dd4	0xca5f1660
--	0x59642534	0x02639b9f	0x12b895df	0xb2deaf0e
--	0x20d8f0b9	0x04d8342c	0xa1ba5f57	0xa26cdb06
--	0xca732ca8	0xdce0c561	0xf5e4b205	0xc05f5cfb
--	0xba4a41a6	0xaf219d7b	0xce08df01	0xa02bbdb9
--	0xc1adbc20	0xcb9ae4fd	0xd828cfb5	0x690b17db
--	0xd29ae8bc	0x8fc71289	0xd6fc9cf6	0x61c7a6fc
--	0x8e8012d5	0xd3320498	0x36e80084	0x0036d3ab
--	0x53141aae	0x987d0cba	0x57581df5	0xace4704c
--	0x3ce49642	0x991556c1	0x6cb0b984	0xac15e528
--	0xe7d208ca	0x2486d1c5	0x93b6623e	0x340b7622
--	0xe7e1cf7b	0x3cdeed88	0xa23c849a	0xcc6e8b3b
--	0x292add5a	0x17763ee1	0x9f87203e	0x72cf4551
--	0x2053e66f	0x06c3a411	0xb61c2e0c	0xa4a7f3ae
--	0x0ff87dbb	0x03999ed8	0x48aacedc	0x2e126ef3
--	0x799441bb	0xaee15b4d	0xea08bf54	0x47248787
--	0xb60afc11	0x8c3d6a20	0x7c04f801	0xb902760e
--	0x319040eb	0x370bbd5d	0x9a1dd5e6	0x63f7da1d
--	0xb3784eac	0x3b304dea	0x987ada9f	0x2b6b1cda
--	0xf9241003	0x0d3d16f2	0x1185dcbf	0x519b7a5f
--	0xeb612361	0x28b57da5	0xdeb8419a	0x0ba13122
--	0x062e28fa	0x5ffb9b36	0xb1258247	0x8337401f
--	0xed1f6423	0x730cafe6	0xf728c690	0xe40557eb
--	0xc4951a15	0x04a988a9	0xbf5fe18c	0x2766e40a
--	0xe4d74d13	0x8638d052	0x8eefeaf2	0x9ad07978
--	0x32042a87	0x4385f38d	0xc9b48f02	0x02ab0ae7
--	0x9eaeb632	0xf386c14d	0x8b1c2ab2	0xad432a24
--	0xfc5bd462	0x2d7ac5fe	0x45dff5c6	0xa235e1a6
--	0x825b770c	0x5568471b	0xa7ac3a3a	0xfcc6e40c
--	0x0c1be59c	0x77685a3c	0x5b1bafbd	0x40b8a139
--	0x3dd1bf01	0xb6651001	0xf2915a6a	0x16fe1cf2
--	0xe78467d1	0x4bec9fb1	0x88615320	0xa3920831
--	0xed4afac7	0x206cffba	0x96c42567	0xcc2b5215
--	0x7ca0193f	0x0e1a60e5	0xf3892c10	0x2ceee7b2
--	0x110d3311	0x9a322e7e	0x3cb7e5fc	0x3fb971c1
--	0x59971332	0x08386001	0xe4a2444d	0x17d9c47f
--	0x9f53c4a5	0xdb54e5c2	0xfaac9f08	0x975c07c6
--	0x8a6e6bcd	0x4392053a	0x6473bef8	0x4b3b91a3
--	0xfb7e8ebc	0x46c6ffed	0x04939839	0x71b93766
--	0x47e4f74a	0x786545c8	0x77f55b59	0xdf8e992d
--	0x60a0d2a5	0x6cc8a5cb	0x113ee95c	0xa378558d
--	0x5d3b8bd9	0x3c95b2a8	0x6efa3682	0x9535dd34
--	0x3e29974d	0xa477d069	0x2dbf58d2	0x165edae3
--	0xea25d53d	0x44e3ef71	0xba6341cf	0xc61b964c
--	0x4612838b	0x62151b9e	0xc1de2511	0xa364130c
--	0xa9710643	0x1a436c70	0x97030b09	0x5cef28e0
--	0xd5197e49	0x02b9ffa8	0x1b52dc7b	0x04f9428b
--	0x01ebed2a	0x1eaecbee	0xc53c4d54	0x3e34c125
--	0x05b4f37a	0x6e3d042b	0xf1c1f40d	0x39cfe9e1
--	0xd2938e89	0xa14b9846	0xb1333676	0x31068254
--	0x4b627e4b	0xb5185882	0x101b52bc	0x73e05abf
--	0x68a4e24c	0x67e301f4	0x6bf8b538	0xc502e1e1
--	0xc3889b5b	0xdfbc6d96	0x4239d0e1	0xbf3667ab
--	0xb0c4cb00	0x3efdcffd	0x7cd9661d	0x4f5eca03
--	0x0ef218dd	0x464f0826	0x048fc539	0x6a1c63fe
--	0x76cc341a	0x1ae2945c	0x7a339006	0x858fdc20
--	0x2a4a7270	0xd4cbe12c	0x7b27e5d8	0x998cf520
--	0x4795ccf7	0x52e15388	0x86aa7b96	0xff1845fa
--	0xd49d1061	0x035b6a80	0x1df18220	0x28fc4fd1
--	0xa8e8f333	0x3a9240a6	0x41a4caca	0xee736b6f
--	0xdfa7ce4b	0xd4bf5c0c	0x4e62f6d3	0xe98ae9b4
--	0x7f544550	0x2b0706df	0x8fb2e752	0x546af9d1
--	0x8517758f	0x53f522fc	0x03bd1819	0x6fd264e2
--	0x16839ef8	0x44a1200d	0xcd5a586b	0x1ead251c
--	0xf58dd3be	0x80217ce7	0x0367ff42	0x2d8f2ce8
--	0xe8a0a689	0xba33e366	0x5dc7980d	0x005c0eaf
--	0xc0c44118	0x5553076a	0xdaf39389	0x703e09eb
--	0xc54c8112	0x4a26135c	0x36a46f2b	0xdc93ee12
--	0x7060db72	0x7778befc	0xe028fc55	0x52e86278
--	0xd0b00188	0x6ed5565a	0xb5e2785c	0x3608bffa
--	0x55c3f5a3	0xe1e41afa	0x08a227fe	0x94c793ce
--	0x650934f7	0xddc36524	0x6dac40de	0x9eec3ceb
--	0x8fe3d1cc	0x3cebab86	0x61e4d63a	0x5382ea11
--	0xa90c9495	0x0277ccb3	0x412cecc1	0x5853c945
--	0x97df9a48	0x364d9b10	0x7e8c9bf1	0x6b4974ef
--	0xd3dbaeeb	0x6626dd26	0x2b746d2c	0xfb762155
--	0xf942f687	0x1317d1b5	0x0c989def	0x5f4c0ed6
--	0x31aebbd3	0x51cd8d5b	0x3d729511	0xc07c8f23
--	0xa7f3e6f7	0x7683dba9	0x5f051d5c	0x750437f5
--	0x1b9ffe98	0xa4de609b	0x4c498e9a	0x18dfc535
--	0x376c6c34	0x19a57039	0xa70e93eb	0x7e966bc7
--	0xb6e9d77a	0x3ab98e5f	0x1607125e	0xe8845aa3
--	0xa20a2d80	0xb17ac63b	0xa07a9790	0x71e5a14f
--	0xb6b5fc78	0x4c610f86	0xb57b21b6	0x1bcfb3ac
--	0xbf812998	0xd429986b	0x02b837e9	0x0823aca8
--	0xd8a85194	0x708bad39	0xff94ef19	0xc3599461
--	0xaee622f6	0xa8b5a808	0xf801b298	0x0aeb35b7
--	0x4db4bf27	0xfa31c205	0xa047dc66	0x7e0ae406
--	0x2ceea6cb	0xef0ef96f	0x4cc4fdba	0x6161256f
--	0x94505fd1	0xbced5596	0xbf9e36a5	0x271e68bd
--	0x7a3308b6	0xef1af50d	0xb55ede06	0x6783e602
--	0x1152acf0	0xdc644ccd	0x1b692da3	0x59f6886b
--	0xd7236158	0xe39d75a6	0xe7026697	0x25496283
--	0xb6b0a61c	0x09d0931c	0xe8d459a1	0x1a124097
--	0x88e50621	0xf2ed18ff	0x37681783	0x4afa1ffc
--	0x8a96ec4a	0x4474a860	0x274591b1	0x59df3968
--	0x34f56fb9	0xce821f96	0x7ec825b2	0x6ed4a9bf
--	0x687253cf	0xa511c1d3	0xaf2bd6f0	0xd1ce1a5c
--	0x241dd505	0x39037238	0x0c761934	0x53181db5
--	0x11ad47ec	0x915a527b	0x748bc970	0xeb8f2669
--	0xb8bfd5af	0xd8d19145	0x0361ff58	0x6dc6e2f2
--	0x1fd06556	0x120db4c5	0xbd704c8b	0x70a1a57c
--	0x27543851	0x095403a6	0x28171887	0x640e7c92
--	0xb48fd7d1	0x62ad2774	0x224767cd	0x347b8843
--	0x821ca7f3	0xf94749c6	0x2bc7f40f	0x700cc1d8
--	0x50d50832	0xc2f9465c	0xa6e1cbaa	0xe0f5e934
--	0x7f33617f	0x8876cb07	0x408c24fe	0xc0cfcdf7
--	0x39152b72	0xa0ba80ab	0x301a73eb	0x6e704f6c
--	0x3b73c24b	0xd433f861	0x43192007	0xa56d2ca4
--	0x2d28bd5d	0x14f4c9cd	0xb7fe189c	0x031e1818
--	0xf8f4133e	0xdc8e7727	0x4f8f5a06	0xe7b114cd
--	0x5cb9ff12	0xdb4c5a53	0xed956df5	0xf3634f5f
--	0x6cce1cc2	0x5393f9ac	0x1184c2f7	0x0b6fd240
--	0x64771374	0xaafed1a1	0xbdc55bcf	0x976414ef
--	0x6a333e56	0x0c5cefb2	0xff2574e0	0x11b059ef
--	0xff8b7f2a	0x9651e97b	0x594fe89b	0x7be60f6a
--	0x7b7695ac	0x612036f7	0x5be0d4fa	0x25855737
--	0x12e32ee2	0x8e86130f	0x46d75d41	0x3769d438
--	0xd14752d4	0x1612ad6d	0x8f86f2a0	0x63e01251
--	0x9a44ac4a	0x49fdb148	0xe1757062	0x42798804
--	0xf21f46c1	0xed0a3794	0x5528add4	0xeddc0c90
--	0x7f188ce8	0x59568b7a	0x8e25d50f	0x9277c492
--	0x955c6e6a	0x79f94a59	0x3a65fb08	0xceb23267
--	0x7d8dce01	0xd15c492d	0xa35f005c	0x0e7cba9a
--	0x950485d9	0x2d92e448	0x4aced016	0x0d10136d
--	0x3d2ec365	0xd982e881	0xe81940d2	0xb1a84849
--	0xdb30d967	0x9f51d3d4	0x4fbe18a9	0xef21cd28
--	0x5d3cba6c	0xaa89b02b	0xbe1e9526	0xa20a918e
--	0x0c26bd72	0x8372eff8	0xcf7ab414	0x1d3ab83f
--	0xfd2c8f79	0x4929f77e	0x2416e8df	0x65dcaaca
--	0x58fbf7b3	0x1c4a3089	0x9bfb6e26	0xc7338ac9
--	0x88e5ad26	0xc62bb3d4	0xad6d36f5	0x6445167d
--	0xe9de8daf	0xc391c6bc	0xa78b4558	0x0216bcdd
--	0xbd4365b9	0xb0a874b2	0xe95e9453	0x77296b9a
--	0x49803c1e	0xc01fd0ed	0x165a9d5d	0xf7da6442
--	0x4c00818d	0xaad5bfca	0xdb252937	0x0e4e0f74
--	0x0c2738e8	0xd075b8ba	0xe3b2df11	0x8aee60a4
--	0x36052cd8	0xb4aa190b	0x413e7155	0x3e7e646d
--	0x807e6eea	0x97993e6f	0xa5129ff5	0x98e01bca
--	0xa8bd70c9	0x8800721e	0xb3407ffa	0x266b2f99
--	0xd9da73ee	0xa06f634a	0xcaae53b1	0xd98e53c6
--	0x49368291	0xc89485fe	0x938a8a29	0xb57f77cc
--	0x58c867de	0xcdac8a84	0xf4d57b6f	0xc6daf080
--	0xe3d9c67f	0x0264b194	0xc3b2ca50	0x6d214667
--	0x88503872	0x549ed8cf	0xe827689f	0xcbe94e2e
--	0x4a02516d	0x24ddcfa1	0x3cbc736e	0x34c88707
--	0x9f4c9376	0x4ced4d41	0xfdbabfb5	0xafd291d9
--	0x2fa602a3	0x53e19d9c	0x44422427	0xf85e2c53
--	0x40e91ef7	0x02646045	0x3d1fa703	0x1613b99f
--	0xa108de10	0xf9cb3d04	0x7b9f9523	0x007d74b1
--	0x961771dc	0x2e49fe1b	0x5fefe27d	0x54737b43
--	0xa11d7c40	0x7f0cc2d9	0x67c6533e	0xd1ab10fa
--	0xb1950645	0x536087d2	0xd6937b40	0xc35960c1
--	0x2df0c356	0xecb5ab53	0x61e08998	0x1671bdd0
--	0xd72935b5	0xdf1a9d7c	0x70b1aa4e	0xa9272818
--	0x1f7b8d55	0xc7292a0f	0xda7af847	0x190076ad
--	0x58370ba6	0x3020fb4e	0xff8a4b30	0x13818958
--	0x6ba1ca38	0x6a90d39b	0x5e180929	0x206e8a22
--	0x0568f241	0x5f83ad21	0xef05e5c6	0x21d0521c
--	0xe7886eff	0x68eebbce	0x550c1659	0xa0843444
--	0x19468c2b	0x539cb9b8	0xa4b18b62	0xdab0680e
--	0x1b254dbc	0x47068aaf	0xa8193743	0x44b60b88
--	0x90c07337	0x2e55666a	0x632f4b23	0x68af10db
--	0x8e29f54b	0x5f436bcd	0x8bf81d55	0xb640ccc5
--	0x2e4ab6a9	0x198697a5	0x8a1c8481	0x572fb679
--	0x7597c416	0x608fd45e	0x57c8c7f4	0xe151d349
--	0xed9e17bb	0xa66f2816	0x8175fe68	0xd57d91ad
--	0x79df0711	0x7a349868	0x13403cd4	0x7d974c60
--	0x8860ce70	0x2e6d62ea	0x8916e2f2	0x0e336838
--	0xf54d382d	0xc4e172c8	0x94bfcfbf	0x5fa53172
--	0x2933cecd	0x4d5b8439	0x0ca0e6e4	0x8ef87b00
--	0x2fdd121c	0x24beae76	0xa85b47f4	0x4e38af2e
--	0x12b8734a	0xf698abf4	0xde2c2d93	0xeb100795
--	0x8ab19df8	0x93a6f4d1	0x43c4b2cb	0xbaff7c4a
--	0xf52b1471	0x72804f4f	0x0c0ca257	0x1dc24c77
--	0xbad7203b	0x3a998fa0	0x9cb20388	0x7ef1fb3b
--	0xbae66020	0x9a22144f	0x39ac47db	0x3f145996
--	0x05a32b6c	0xd201a2ec	0xd868727f	0x08b2df4f
--	0x4583bbfa	0x9a422baa	0xa6a2e8f5	0x236310ec
--	0x5aafc3cf	0x344156a6	0x6f964ceb	0xed0495ae
--	0xb5638c98	0x2c8e84ba	0x63d8c7a5	0xec956b66
--	0x69c54f32	0x767874ec	0xe8fb6ce1	0x68b1c780
--	0xe4b861e4	0x2787cc38	0x4b2202e7	0x23b476be
--	0xecdf296f	0x094aa000	0xe95ef073	0x4182ebb5
--	0x30daa31a	0xef68cb68	0x2fbcf6bc	0x21c52620
--	0x19abf83e	0x4de7528c	0x05fe4c05	0x32c2a1e9
--	0x8c23abdb	0xabba9a90	0xa6a215c1	0x891f915c
--	0x667cd65a	0xaa5a9b2c	0x689fd1e9	0x42b52c95
--	0xd9872e76	0x05dd5278	0xc19798f7	0x8d031d86
--	0x25690670	0x165f4b19	0x76b51d6f	0x61cd8232
--	0x7b530271	0xa8e9326c	0xd952e94d	0x56a7021b
--	0x128be860	0x4da40144	0xeb4ac3d5	0x82b7ff5a
--	0xea2abda7	0x690a9ebc	0x33562378	0x6bc91b2f
--	0x46134185	0x8fb77fb2	0x029518a2	0xe1fa1f4c
--	0xf78783b9	0x5d8ebe63	0x103e8050	0x924085bf
--	0x80593f2e	0x5be4bcb6	0xcb935edd	0x882d0a5f
--	0x7deb8205	0xcdc0fe2e	0x9c333db4	0x1d0c888d
--	0xf8dc3575	0x2f901125	0x6bf48cdb	0x98ab6fb4
--	0x491d7df2	0xa064922e	0xbbb86c70	0x88aad77d
--	0xfcff0669	0xb0c47c1c	0x0fcc6fe1	0x50df8a83
--	0x014460e4	0xb014e6ab	0xbeff4bc5	0x8d939fae
--	0xd750ae17	0x42dd29c9	0xdb1cbf70	0x82265be9
--	0xd11afd6a	0x21834e1c	0xd11e3c3a	0xbe568139
--	0x6cf92d50	0x9304ebf1	0xf177046b	0xa5b127a5
--	0xfb57e4a7	0xf94291df	0x0f089d58	0x07395b5f
--	0xde4ba5b9	0xf7371fc5	0xae44f190	0xd529271d
--	0xbcaea246	0xfa777c0b	0xad3bab9f	0x0d6251ec
--	0x6f4fa894	0xc39273e2	0x7710fcc3	0x81f08a5d
--	0x395b54ee	0x87295638	0x57398bb0	0xfd46c7c9
--	0x3f1dafc6	0x548479b7	0x37c42fba	0xa2130147
--	0x99dc0bb0	0x3596c5cf	0xbcca6bec	0x418735ed
--	0xfcd4273d	0xee141135	0x8457cf47	0x95fe7220
--	0x041aaf8a	0x6e947153	0xc963afa7	0x09390a74
--	0xc40dffd3	0x4208039c	0x319b1f84	0x42b6b3b7
--	0xade789da	0x83338c91	0xf2d74712	0xe80011dd
--	0xdd61645e	0x286fc63a	0x26e2fb23	0xfef2b4ea
--	0x3290efb8	0x595a0c17	0x6cd9bea9	0x7be1338e
--	0xe0ff2c09	0x1b93aea5	0xbbd97e91	0x5e1ae1e7
--	0x7c6c078b	0x0b9b3a03	0x43d38011	0x824cd94b
--	0x9725170d	0x87ce6f33	0x60525d85	0xc0a5e853
--	0x242e613b	0xebf72857	0xcb500fc6	0x0de5c3f0
--	0x382b625d	0x08840e50	0xcef30663	0x1bc848b6
--	0xefa78141	0x81b860d6	0x4eb125fe	0x7e125296
--	0x276a5558	0x45caa775	0x7c6ec23c	0x5dcddd08
--	0xc41aa32d	0x6a2851b1	0xb69ae1c1	0x8f603c43
--	0x763497f2	0x73344cbd	0xcffd175c	0xfccf5a91
--	0xb2318bf7	0x66ac628f	0xa98fa975	0xb68e5426
--	0x27555715	0x5157a93f	0x666fd404	0xb37fcc40
--	0x563b0512	0xb70f8446	0xe10d257f	0x73793ef2
--	0x31a84915	0xe0de9489	0x08dfa368	0x9169d4fd
--	0xc14f5c9a	0x92e6db4f	0xa30b6cec	0xca04670e
--	0x8a664367	0xe8984e70	0x1c96a39c	0x655f9abd
--	0x6999a190	0x76267621	0x0f49f963	0x8ddad3a1
--	0x51fdab6a	0xaf0d6863	0x23b71bdb	0x32818c8a
--	0x6398044d	0x26c60bec	0xb0b631fa	0x938f69c7
--	0x52f11913	0x1e6fbe7a	0x92dcd409	0x419bfeae
--	0xb147bb96	0xbac5bf9d	0x08de155a	0xde8ca968
--	0x20aef902	0x62df25a8	0x64a4042f	0xef19da4e
--	0xc75fd112	0xc9863e47	0xaccfdbcb	0xd29b6090
--	0x6dc67b4a	0xa84b3cd6	0x45a0e708	0xd28673bd
--	0x00bebebe	0xd5e518d7	0xc63d647c	0xa28f5f6d
--	0x3372edc8	0xa1c44ed1	0x88e61d44	0x5e095835
--	0x2d8713ce	0x6791a885	0xae89c04a	0xf1dc5105
--	0x6423f3b7	0xf4e2f384	0x2d2761a7	0x38ea905d
--	0xa263d776	0xd1936fa6	0x2fc54081	0x429a25c2
--	0x13f6c5df	0xffffa6c1	0xfaf82002	0xe4bbb103
--	0x2fc0c622	0x669ee281	0xec785fda	0x91156b25
--	0xa9f4444e	0x354fdfc2	0x7c5f5069	0x72ae591b
--	0x73bfd64e	0x6b96d744	0xf261daaa	0x2de15dae
--	0xedaba9c2	0xf287b3fd	0x8b2097b6	0x589934c0
--	0x7edc2a73	0x469b16eb	0x247b9a22	0x8b7e6c7b
--	0x3e71ffe2	0x5275f242	0x032a211f	0x977bff60
--	0x4306ad03	0x6a212383	0xceb36448	0xa2a79209
--	0xe3842f42	0xcee0cbe7	0x37cdb626	0x29a0a515
--	0x2857ead6	0x981d5d9b	0xf0ff9b06	0x95de8cad
--	0x4dcb565b	0x065d585d	0xe7eb754b	0x278fa774
--	0xe4d8fb7a	0xe152f018	0xfb7bb25e	0x50323b64
--	0xba618e43	0xf8cb1c61	0x1b6dce25	0xb4fc7867
--	0x2a7fb213	0xea9e646e	0x3f9b735b	0x5640315d
--	0x0793ba5b	0x71ff31fb	0x4b41f1d6	0xb1538146
--	0x336f4272	0xf176d509	0xb7fc03c5	0xd6a1c927
--	0x56a68c10	0x8b4740cd	0x14c54f8a	0xf07ad8a9
--	0xa8403db8	0x37c23f2b	0xdca69aba	0x4b39ef9d
--	0x2af13bdb	0x6baace1f	0x8c7ca0d2	0xba86bd02
--	0x2a74681c	0x5542ae58	0xc36709e2	0x82b34568
--	0x26ea06be	0xd4bf458c	0xde209de7	0xa311b4e5
--	0xdc00e139	0x7d305958	0xc5d76ed7	0x0943a285
--	0x48ce4e29	0xe371bd9a	0xfe6a6501	0x4167d215
--	0x402e47ba	0x588458be	0xbf4bcf37	0xf7fa27a8
--	0xb725f91a	0xc17f5c07	0xce771dbe	0x66f9d592
--	0xe8521ed4	0x42f75171	0x343b3e74	0x2d5448b5
--	0x2d1fca8c	0xd7a32431	0xc29a88d2	0xffb07fd7
--	0xcca0333f	0x43204f2f	0x866c1867	0xcb215814
--	0xfcb67d4f	0x423680be	0xdf22f6d6	0x03373eda
--	0x3bd202e3	0xd8972fe3	0xb7733d70	0x7a472c76
--	0x6cc8a627	0x3b27e643	0xa3475f3f	0x87ffb286
--	0xf823d69f	0x6d57c38e	0xa0fd464e	0x53e2e341
--	0xaaab23ef	0x439429ef	0x55ba2a2b	0x4da5ea4c
--	0xc1fe05fc	0x874b7a34	0x9a875956	0x713ccc90
--	0x49afcff2	0x5905dc0b	0x1f5dddb7	0x8ef5c1d9
--	0xf60eca50	0x25172569	0x3525639a	0x25804bbe
--	0x5729cd49	0x17f84e66	0xc540d86d	0x51524bc9
--	0x9a6e9901	0xf5bcc70e	0xf7a73ffd	0x54509c8f
--	0xec58b8a4	0x9993703b	0x6ef45fc4	0x5ce3a507
--	0x1d73c611	0x8780e8ff	0xc7d2e02b	0x0bc825f2
--	0x02f75fca	0xe80c0758	0x24646fe9	0xd378ff5a
--	0x592c5619	0x6c80372e	0x1f7351d1	0x4db5182d
--	0x3985fdfb	0x16ca9158	0x58ee1ae4	0xaf2b9fa0
--	0xe97f60ce	0xbb911e68	0x01748fa0	0xaef578d3
--	0xc3736418	0x8ab0deb5	0x0de16af1	0xb8369f7b
--	0x68e43c12	0x914ca0f6	0xe950ef28	0x834eff90
--	0x51adb952	0xc42ee4ce	0xf70ab4a5	0xbf9fc916
--	0xed9444b1	0x845a6a1e	0xf92e7b64	0xb9ca8a1b
--	0xa9cdfcd0	0xb5956bc8	0xb8520e59	0xdde7aa57
--	0xb41d390f	0x364aef3c	0xf39d4482	0x8b4e651e
--	0x0b82f5fb	0x7960e81c	0x12ed7b84	0xe9f123ca
--	0x88a64db2	0xa0c714cb	0x57b01471	0x80ff31a6
--	0x7571d8cd	0x857035d9	0x0508587c	0x594a4a42
--	0x011503e5	0x27c75e55	0x03264f62	0x9316ed1d
--	0x36e5cd1e	0xfa9b23b4	0x5bc8c606	0x0902bd38
--	0xd6745c69	0x6fa73118	0xa50f7b94	0xc529e962
--	0x28738486	0x7b85a599	0x2c495a35	0x85f2cbef
--	0xa09dfe51	0x1c763ab2	0x4effdb5c	0x506586f0
--	0xec182a58	0x45293146	0xaf8d78b8	0xa89bd228
--	0xec24826a	0x752cc421	0xbf36aa46	0x6760e225
--	0xe15d0987	0x6fa9bdf3	0x6837c755	0x9426d654
--	0x14b48f5b	0x5d70567d	0x63a14f92	0x809d5361
--	0x3b6e2729	0x84ce5415	0x7eaca6e0	0x9b467302
--	0x8f39d484	0x8e78398c	0x33108b33	0xdc07005c
--	0xbdc2500f	0x35f1f452	0x9d254e3d	0xfa61eb21
--	0x2ab6c7aa	0x83561fdc	0x8735d598	0x416e8591
--	0xfe10e93a	0x18da409d	0xab6d0bfd	0x675baaf1
--	0x287fdd24	0x6b50b63c	0x8c08abca	0x871a59c9
--	0x41bb2ae4	0xfba9abdf	0xb46491c7	0x4e433d5a
--	0x01e4fbda	0x0bc40399	0x3bdb61c2	0x3cf051ba
--	0x910daa46	0x8d4065d6	0x270667eb	0xf6d42459
--	0x01993a1b	0x00a95dda	0x6ed5a693	0xed4fbf7b
--	0x24dbb70f	0x67fd62ee	0xcef5f0a4	0x9e65b798
--	0x9a9913fd	0x3d0e7190	0x4265b4e4	0x80bfc46f
--	0x6b354d2c	0x2b90a987	0xc989cb75	0x773e6b64
--	0x55325e9f	0x18816a56	0x07413406	0x5177ae31
--	0x24a19ef7	0xdac405a4	0xdca2d3b4	0xab7c7b70
--	0x42b5de0e	0xfcf918a5	0xa54d934b	0xcaa9eab6
--	0x50e63e2a	0x4b168926	0xb2442913	0x594c0f94
--	0xf387f31f	0x4d716749	0xc8433297	0x34c1a5de
--	0xe929008e	0x5644251b	0x736476d0	0x0d00aee7
--	0xf20b2f64	0x5e158173	0x9af3e568	0x5f19fa7e
--	0xb23b2861	0x8659ee6e	0x94058a64	0x66ec4fb1
--	0x37cd6a4a	0xbd2944fe	0x0ea44ec6	0xe7d64c24
--	0x75a170e3	0xb4a9479c	0x2215716a	0x64a8a574
--	0x257e86ab	0x86bae993	0x3030352b	0x15cb88bc
--	0x576363a0	0x61138c36	0x7cc4fe7f	0x648977a8
--	0x0ef71fec	0x1c60df47	0xc75f70ea	0x88509798
--	0x172b407a	0xf888e400	0xef33cd15	0x5976757d
--	0xf8cfef13	0xbf024380	0xbb9c1b02	0xe4c38ec9
--	0xf30fce01	0x8efa5213	0xf4b48aad	0xc94c3a37
--	0xeb1bcece	0x09a18b56	0x4e83c0d3	0x6fcf9f77
--	0xf52f4d76	0xf3368a12	0x33b2797f	0x627b6e41
--	0xefd05154	0xa83ae2a0	0xea211129	0xd25723d5
--	0x7bbb0e3b	0x7131f088	0x5dd5193f	0xef5aa905
--	0x39f77be7	0xa21b48c1	0x1ded01c1	0x5cf98c5f
--	0x6e23d207	0xd7e7dadf	0x5932ed1a	0x2a729061
--	0x29a89f4a	0xac0e8447	0x01ff4205	0x8b1456c6
--	0x3fba0156	0x658c03f7	0x5c69f968	0xf6570582
--	0x21bb0145	0x8683bf5b	0xa4b6eba5	0x4ccfe5cb
--	0xd202898c	0xbd2411cc	0xc2fc702a	0x5c39b695
--	0x87584ccf	0xeae3c735	0xc472b6f9	0x4249f637
--	0x3fa89c0e	0xce5a8bd7	0xbb28138b	0xc080ecb1
--	0x9cbf1916	0xd70424e9	0x75cc4ed1	0xa575f3e9
--	0x1c571f68	0xe2906205	0xc26520cf	0xf9c1fc8e
--	0x61c982de	0x1af6cfcc	0xaf397c9a	0x46830771
--	0x623d98bb	0xda7b52fa	0x5a3c57d3	0xfa35d2f0
--	0x4783df19	0x6ad07325	0x487406f4	0x3fae5152
--	0x189137cb	0xd98a644e	0x17ffe880	0xeb6aa9f7
--	0x67184e3e	0xe475734b	0x0f1113c2	0x39a4df47
--	0xbf8f6ec9	0xe13a4d8b	0x63ec02f5	0xdfe7d75d
--	0x1379034c	0x5db7314a	0xa9d9ad3e	0xfaaed8f2
--	0xf0fb6074	0x12f27b84	0xc97a92bb	0xae5e3bb7
--	0x5f7fc2bf	0x00cbc1f7	0x9360a4d9	0x3632ba04
--	0xad044c83	0xeda13ec1	0x34a214c0	0xcf9c972a
--	0x96352243	0xf1a35357	0x2d77bc30	0x8485bbad
--	0x67fbaa99	0x8035b1a5	0x8ca763c0	0x109d7887
--	0xa1c35cd8	0xdc79e308	0x4495404d	0x64419226
--	0xacdcea08	0x9545c0ef	0x5493e09e	0x7fe16336
--	0x41381aa2	0x5c344f46	0xb40cab9f	0xc43951c4
--	0xd86e52a5	0xb141d934	0xd78efcff	0xf37ec320
--	0xc184a45b	0xf4a57954	0xc8aed0bd	0xe602c15a
--	0x71a6b48b	0xce837428	0x02733706	0xc4a4a044
--	0xa75efb97	0xcb63d62e	0xd0580b5a	0xce499087
--	0xc12bf4ca	0x9c995345	0x1d8adfbc	0xe62fd60e
--	0xccbf5412	0x6161f8d0	0x64268e34	0x565d066b
--	0x1896b63f	0x838f8f2a	0x1e314a00	0xac470276
--	0x1879cfdf	0x4702d7f9	0x83b4d777	0x81fcb068
--	0x1b6da94d	0xd075ed01	0x3c7734e8	0x56389a0b
--	0x0743b9cd	0xb6b0bf0d	0x63107ab9	0x193172bc
--	0xc7b84c8e	0x982ce2aa	0xb8e387a6	0xc264a4b0
--	0x2ac6c802	0xb89ea335	0x052332a4	0x49932ecc
--	0xb940f808	0xa7a09330	0x19f3f49d	0x7aef6b5a
--	0x201d8ed0	0xf29aac4b	0x8ae2ac0f	0x998c1ca7
--	0x665c3927	0xab4ef641	0xf136710d	0x9644ee9b
--	0x34efae96	0x4c596035	0x8cfe8b3b	0x5d9f742e
--	0xab2c63ca	0x017d864d	0xd0604d6e	0xab24eee0
--	0x75916a9a	0xad0d1167	0xbeb47775	0x6ac822d1
--	0x776907aa	0x9e9377f2	0x438c5d81	0xd70e9964
--	0x1c09c914	0xab90e5cf	0x31cee523	0x26ba6ea7
--	0xef00781d	0x622b886d	0x36a54031	0x88b1221c
--	0x666333f5	0x60e1c93e	0x5e4d0e0a	0x3ee6ff69
--	0xceb4c76b	0xa5deb4f8	0x0668ced8	0x30225378
--	0x6697cf37	0xc5d9661d	0x089eab85	0x7684a876
--	0x018a81af	0x221a7fb2	0x31d80de0	0x9f18ae90
--	0xa29c9af0	0xc3e2b00f	0xda0edbab	0x7ee9cd2a
--	0x3ab0f88e	0x02c58228	0x606fa7aa	0x7776cb0a
--	0x4e8ad99c	0x3b527469	0x58123d62	0x4ce428d2
--	0xee91a210	0x466ba2cc	0x043c57b9	0xaf7bdd43
--	0x98e76fee	0x8f3eac1b	0x00dffd6c	0x6fcb1c6a
--	0x5cb90573	0x485d4505	0x0df5418a	0x26eafe35
--	0x0faddf3e	0x4e972930	0xe113c823	0xe45944d1
--	0xa646077f	0xc1708ae5	0x6ba07c20	0xc7e4e234
--	0xc6754ed5	0xbd6e85aa	0x8cc1756e	0x02afda29
--	0x72809597	0x75b6f5a1	0x61141874	0x1774047f
--	0x7a10afed	0xfac2c4ad	0x42cf5c99	0x24f0350e
--	0x042f2864	0xfab55b67	0xc8ead5bc	0x914e9512
--	0x77c8ef6b	0x8369aeb1	0x71bc947f	0x0c6b49d8
--	0x8ddd0513	0x028ad10d	0x99a1b28f	0xe6cfbdc8
--	0x7978b4a6	0x3ebbade8	0x9985f5cf	0x431f42f1
--	0x004372b2	0x18b67f68	0x20111c21	0xbb6f77ff
--	0x1783b030	0xa045d7d1	0x0e9c7e09	0x3ccbd95f
--	0x0b84a2ed	0xf0ee3325	0x63f2e126	0x5ec4c67b
--	0x2ca782cc	0xcaf20d04	0x8b59d515	0x3212aa33
--	0x335ca0c3	0x6f9e0cdd	0x4d4bf189	0x44d2fa0c
--	0x5abe9396	0x492794ee	0x10dcfcb1	0x9acda9bd
--	0xe8aa2803	0x3f1b9605	0x3e2ecb5a	0x971bfa8a
--	0xcbf141d2	0x0afafe10	0x2fc906a6	0xefad20c0
--	0x9e922581	0xe69142cc	0xc9c0ba82	0xc069e640
--	0xb99c08b6	0x4b62ca1f	0xf3c5767a	0x6ab088c7
--	0x8f0f0c0b	0x6726f64a	0x9711a3cd	0x46462571
--	0x3a58350e	0xa2561911	0xe24dfdfe	0x97443fdc
--	0xf80540be	0x069978bf	0xb38a359b	0x8e574f62
--	0x69aea75c	0xdc753fcb	0x2a74002c	0xced027b4
--	0xda993254	0x03409b83	0xf827331d	0x75fb3271
--	0x01ad839d	0x68520842	0xca65c45c	0x1a3db5a0
--	0x91d37dd3	0x6168c0fb	0x935f5a08	0x002007c3
--	0x42eb4760	0xdab3a804	0x72a6297e	0x905c32d9
--	0x81abcfa9	0x1b21d04a	0x5a1289ae	0x424e7183
--	0xc207906c	0x31fe9134	0x5eb2e5af	0xc9253fc7
--	0xc32be24f	0xe5474cbd	0xeff6e1b0	0x710e5e69
--	0xe6c4c538	0x96b5f1de	0x2abc9c35	0xddbd1a92
--	0x8aca40d7	0xe359c238	0x954718f4	0x18b157e5
--	0xeeed790e	0x6948a963	0x24e70bfb	0x4d681547
--	0xf68369a7	0x5b54409a	0x1f0b787a	0xc2610047
--	0x0f8bd269	0xd7c8c154	0x9dee62d9	0xd4738ed8
--	0x1a66c6b1	0x5bad5a5b	0xb110311a	0xfaec6802
--	0x6b750f2d	0xcbf8d0e0	0x11edaf4b	0xf64a07bb
--	0x422e7c15	0xb1732663	0x1ff404f0	0x2d5052b0
--	0x6e45356c	0x7e2201e8	0x7c5ebcd1	0x1cb4425a
--	0xb1539a64	0xa2e4459f	0xcf1ade8a	0xfc476473
--	0xf4147deb	0x2afbdd77	0xff01fabc	0x6597408a
--	0x0951220b	0x6750f3ec	0x0a242763	0xf3d71c05
--	0x84cb1c26	0xdb7a81bd	0x7aea1a5d	0x7e719a48
--	0xc5c12fe1	0x0ce2e988	0x29ecc6f0	0x5ede901a
--	0xda8399b1	0x31c05d6b	0xe1956aff	0x59ed7c3d
--	0x60832637	0x9bcb7cac	0x63c530d1	0x14c677de
--	0x9225ed18	0x065327c9	0xd1ff6a0e	0x5516517e
--	0x53c6f5c2	0xed5983cf	0xaa1d18b9	0xbe300d7f
--	0xadc525a7	0x07ea81b6	0xfc517a09	0x4ead3f86
--	0x45435f41	0x2efa58df	0x02348ebc	0x30ed6783
--	0x190b4fb9	0x85c55d6e	0xc9ed8896	0x416ee113
--	0x9b3536d9	0x30577cc0	0xbc4b88c8	0xcda59612
--	0xdfe2bd89	0xd60cde71	0x98843881	0xcc1f32f2
--	0x18b3f643	0x671a14ca	0xd6482a47	0xac6a7d38
--	0x1897da16	0x91b6fcb3	0xf199bb35	0xd38c00ba
--	0xa8c946b6	0x52a1ad37	0xd38ed2d4	0xa1d6f81d
--	0x5af6865b	0xebdb858f	0xb844b110	0x53201ea2
--	0x08870945	0x10c869de	0x19849613	0xdb35d3ed
--	0xd68ebd6e	0x1056fd48	0xf1a0e305	0xe3982ebd
--	0x6f7cc391	0x5956374a	0xf414a5a2	0x325119ab
--	0x99ee1f96	0x6f044bd9	0x8374805b	0xb55c366c
--	0xa2c77051	0x68f199e5	0xd36a9714	0x878f847b
--	0xec0394ae	0x86d0584b	0xf4df66b9	0x451cd039
--	0xf4de06ae	0x35dd0554	0x818a342f	0xeefdbfc9
--	0x5b4e9edd	0x22d9313a	0x3b710d60	0x6deaeb4c
--	0xa9e26512	0x98d31867	0x3c2c2d61	0x7eb5ce41
--	0x40890db6	0x7a3aa660	0x3ef4f306	0x7322881f
--	0x49dac4d5	0x96efe685	0x27bb7f49	0xbb955283
--	0x79c5f2b7	0xff599c28	0x28ee7f5e	0x9f324b73
--	0x45edb7cf	0x39a8b79c	0xd0919c6e	0xe149b29d
--	0x62f5f82e	0xebcfa23e	0xd4d68937	0x54270090
--	0x958af0d4	0xa1e4e799	0xaf68ac19	0x82a84f4e
--	0x50f67b84	0xd5e59629	0xf5fdf24c	0xab1d63c5
--	0x30835807	0x431fce5f	0xe5f96f4d	0x3f6b4802
--	0x14010be8	0xdca45ae5	0xc82709af	0xff76ce2c
--	0x8b222c22	0x73a2d948	0xa8d59cea	0x8c31849e
--	0x469c2e5f	0x3777ee84	0x5fdfa5da	0x02ef9bb2
--	0x792d3194	0xbed63f21	0x0b6dc5f1	0xc9d7fe08
--	0x6df7883d	0x366566cf	0xef772769	0x37826465
--	0x1cdc3086	0xa69ff7b6	0x235012ea	0x292f7e75
--	0x30bdd0fd	0xffdc9df1	0x95c6d570	0xec206204
--	0xc6cd42cb	0xc0d6dfd9	0xb7a16b71	0x17fa527e
--	0x295f2c79	0x990f9820	0x8b8f447d	0x193f9ad1
--	0xebddb2af	0x5dd532eb	0xf1bbd8e8	0x3444a3f4
--	0x18ccce93	0x05edeb4f	0xc4a6b935	0xba37aab0
--	0x96076ba4	0x250dc2f7	0xc4093548	0x030e777d
--	0x7ea40933	0x8da7b1dd	0x59c0b79f	0x807d437c
--	0xf5233ddf	0x54c1983f	0xfc18771b	0xe74b85f0
--	0xdbd725b5	0x70cdd153	0x4ffe300c	0xfda4bdae
--	0xf4ac75d2	0x91c4e15a	0x34d92b97	0x16356a79
--	>;
-diff -ruN u-boot-2015.01-rc3/arch/x86/dts/Makefile u-boot/arch/x86/dts/Makefile
---- u-boot-2015.01-rc3/arch/x86/dts/Makefile	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/dts/Makefile	2015-01-01 17:34:32.253503252 +0100
-@@ -1,6 +1,7 @@
- dtb-y += link.dtb \
- 	chromebook_link.dtb \
--	alex.dtb
-+	alex.dtb \
-+	crownbay.dtb
- 
- targets += $(dtb-y)
- 
-diff -ruN u-boot-2015.01-rc3/arch/x86/dts/microcode/m0220661105_cv.dtsi u-boot/arch/x86/dts/microcode/m0220661105_cv.dtsi
---- u-boot-2015.01-rc3/arch/x86/dts/microcode/m0220661105_cv.dtsi	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/dts/microcode/m0220661105_cv.dtsi	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,368 @@
-+/*
-+ * Copyright (c) <1995-2014>, Intel Corporation.
-+ * All rights reserved.
-+ * Redistribution. Redistribution and use in binary form, without modification, are
-+ * permitted provided that the following conditions are met:
-+ *	.Redistributions must reproduce the above copyright notice and the following
-+ * disclaimer in the documentation and/or other materials provided with the
-+ * distribution.
-+ *	.Neither the name of Intel Corporation nor the names of its suppliers may be used
-+ * to endorse or promote products derived from this software without specific prior
-+ * written permission.
-+ *	.No reverse engineering, decompilation, or disassembly of this software is
-+ * permitted.
-+ *	."Binary form" includes any format commonly used for electronic conveyance
-+ * which is a reversible, bit-exact translation of binary representation to ASCII or
-+ * ISO text, for example, "uuencode."
-+ * DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
-+ * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
-+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-+ * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-+ * ---
-+ * This is a device tree fragment. Use #include to add these properties to a
-+ * node.
-+ *
-+ * Date: Sat Sep 13 22:51:38 CST 2014
-+ */
-+
-+compatible = "intel,microcode";
-+intel,header-version = <1>;
-+intel,update-revision = <0x105>;
-+intel,date-code = <0x7182011>;
-+intel,processor-signature = <0x20661>;
-+intel,checksum = <0x52558795>;
-+intel,loader-revision = <1>;
-+intel,processor-flags = <0x2>;
-+
-+/* The first 48-bytes are the public header which repeats the above data */
-+data = <
-+	0x01000000	0x05010000	0x11201807	0x61060200
-+	0x95875552	0x01000000	0x02000000	0xd0130000
-+	0x00140000	0x00000000	0x00000000	0x00000000
-+	0x00000000	0xa1000000	0x01000200	0x05010000
-+	0x19000000	0x00010500	0x15071120	0x01040000
-+	0x01000000	0x61060200	0x00000000	0x00000000
-+	0x00000000	0x00000000	0x00000000	0x00000000
-+	0x00000000	0x00000000	0x00000000	0x00000000
-+	0x00000000	0x00000000	0x00000000	0x00000000
-+	0x9557a557	0x7d7a0fe3	0x8e2fbe53	0x0db9e346
-+	0xd35c00d6	0x21bb34b7	0x662b6406	0xa0425035
-+	0x3d028208	0xcb843695	0xee06be0a	0x9817efa7
-+	0xb86c0d16	0x45f70c93	0x79fdc3af	0xd5f30da7
-+	0x460f62b0	0x238a0470	0xf0ec95bf	0x97b9c176
-+	0x6d612851	0x69b9b4b6	0x1df769cc	0xe11674df
-+	0x1b579adf	0xc8bcc050	0xcdb3e285	0x327592c1
-+	0xbeb6047a	0x977f6be5	0xc4854052	0x27f38b66
-+	0x4ca5eab3	0xf806decc	0x2be4b409	0x460a3b03
-+	0xde2f6e0f	0x53ce08b3	0x3ef0ef93	0x4e013088
-+	0x226f8a5c	0x57f7d291	0x8d640bf7	0x8a998907
-+	0x40464dd8	0x804ef3e5	0x647e35f3	0xeabee2d1
-+	0x3a5ce9c7	0x4d7ee530	0x564321ec	0x9e85107e
-+	0xd595581d	0xcbf6efde	0xed3010ed	0x3d607e82
-+	0xe32d4b6b	0xd06fec83	0xf39240a6	0xe487988d
-+	0xddbefcbe	0xefaf1121	0x96bf9acb	0xacce795c
-+	0x7fa5f89b	0xbe440e5d	0xb6d3a3dc	0xcad17290
-+	0x503ae748	0x04c80b8d	0xd394ea6a	0x3e4072c3
-+	0x11000000	0x0b0ae65d	0xc6c53cbd	0xd52a6c2d
-+	0x84cc192f	0x89498e7d	0x89270686	0xe68105e0
-+	0x4073a570	0xd3338d8e	0x51193152	0x7266182f
-+	0x980553fa	0x51b89c90	0xd13b6151	0xe6e40a91
-+	0x0ab997d8	0x2d0a443b	0x9d3d566d	0x820402d1
-+	0xdbe79fcc	0x7c5e0b45	0xaf94216d	0xbf717950
-+	0x520b3dd4	0x566a3396	0x0b6f794f	0xc5dfeda5
-+	0x71ba0f02	0x4839a5ed	0x39a4e4a6	0xe567c652
-+	0x0e044997	0x84a0effd	0x09c67178	0x89a815c8
-+	0xac821555	0xd6719303	0x582b964e	0xfe3a53f6
-+	0x241b9b8b	0xc6e65457	0x623a4e0a	0x590d7d03
-+	0xe50e7ce1	0x4bca4700	0xf24f5eff	0x1f1b20d9
-+	0x77e3227e	0x699b5e5d	0x9aa5f621	0xff08bba0
-+	0xf17ce716	0x0f5336f5	0xbce055a7	0x8cea9dac
-+	0x8e09d26c	0x66c3ddf0	0xbec71660	0x75248cd2
-+	0x29afcf8d	0xa5ade5ce	0xf68bace5	0x63b513cd
-+	0x4736a842	0x4dbf80df	0x4e85fbdf	0x4dce3d56
-+	0xf2150fdc	0xc4232709	0xffdc3e3a	0x92b72a3d
-+	0x9ffce715	0x682959d1	0x091ba33c	0x0f1dc729
-+	0x2f29a924	0x1df72429	0x19b0365d	0x2d5a3cd8
-+	0x20617351	0x109074f9	0xf232874a	0x40d79569
-+	0x97dbe4c6	0xa3b66845	0xa04d2faa	0x6dce9a96
-+	0xd4963c67	0xd4516f76	0x64a0b04d	0x0b87ddfe
-+	0xd8a5305d	0x717ecf67	0x77189035	0x40542ed4
-+	0x5a180ff1	0xb2042e2c	0x6639819b	0x0f0756c3
-+	0xf939bd70	0x25efe0d6	0x3eb65ae9	0x39a057d2
-+	0xb2595655	0xf808b4fd	0xe22d0593	0x76256500
-+	0x0eeee6ee	0x6895d1cf	0x9fc117a7	0xd19e5f15
-+	0xf677f085	0x1ecdb30d	0x704d0975	0x9099f42e
-+	0x421be0b2	0xd02548bd	0x3a16e675	0x7d8b051d
-+	0x9d24480f	0xbc006432	0x184da9ec	0xbad7abef
-+	0x299f58aa	0xc1a249fa	0x8d9d31f3	0xe73cda17
-+	0xf41ac993	0x7b88d3bb	0xf349c676	0xb8341361
-+	0x1b69bc01	0x98e0bfd2	0xf31db8d9	0xeb49b275
-+	0xabc40133	0xfb7d0701	0xcd5ff353	0x4eaceb8d
-+	0x67aac555	0x6d81693b	0xe81c555d	0x5d7f3688
-+	0xd4347083	0xcd861b1d	0xd332f2cb	0x43130028
-+	0x7f1a1c51	0xe2ce3af2	0xdff5076e	0x6ef21237
-+	0xf65fc8c4	0xbd28ff14	0xd70f49a3	0x4f559249
-+	0xd6fe7530	0x1fe89b4a	0xc1cc8975	0x2fd705c5
-+	0xf2993d77	0x60f2e3da	0xe3ca3c44	0xbd0f70b1
-+	0x0d333d10	0xa29a6aa1	0x43b5a6d4	0x30d15a08
-+	0x6df9564a	0xea09045d	0x54ca3f5a	0xfbcfa037
-+	0x6dd64d1b	0xa4a8995c	0x1f4298f0	0x3f4d9a86
-+	0x924ee146	0xc2e3f464	0xc247747f	0x8bf5c7d7
-+	0xf8f0b05d	0xf65a115f	0x4b1ae4e5	0xe131e187
-+	0xfaf713c1	0x5ff88660	0xcd4916b0	0x448028e0
-+	0x140711ca	0xffe77575	0x8b7740bd	0x82b6ed95
-+	0xd94d9647	0x2623c011	0xd54fba11	0x30a7050b
-+	0x28fe4069	0x70b8bf7d	0xf786eb6d	0xe39db734
-+	0xa3290669	0x8747e1d6	0x35804a42	0x1c26ed60
-+	0x30a8880f	0x8170a277	0xa1d97657	0x6ebcb3ed
-+	0x3bb6ce89	0xff808c1b	0xc919fd1e	0x911d8b14
-+	0xcbf41a24	0x82abc738	0xfb5e988e	0x328aa123
-+	0xf19146e3	0x587baa80	0xd105e811	0x83b09389
-+	0xa29fc554	0xe3831a28	0x183f8de7	0x4ef5656e
-+	0xcc940baf	0x938bf4b4	0x90627bae	0x14fc3cdb
-+	0x75e45681	0xf912c1b3	0x7a5b8a0f	0x3b970524
-+	0x6a74d34a	0xb3da9fe6	0x847a3bd8	0xfc4f7dd6
-+	0x88fd7f3b	0xbcd74a15	0x3afed836	0x17e31cd0
-+	0x5d866dcb	0x0ab69608	0xe334f0fb	0x7181d4a3
-+	0x8dc87560	0xd9c94d6f	0x491c2c91	0xca295ed6
-+	0xfb8dcd79	0xeb4d3f89	0xec581071	0x0457ebc6
-+	0x6b63590b	0x9dde4b79	0x3dc0a0aa	0x41ec8a1e
-+	0xfb2ab80e	0x07adc629	0xb8534a4f	0xd0d23901
-+	0xcfd024da	0x47c4163a	0xc89d26bb	0xe5cac48c
-+	0x17c7fbba	0xd992f42e	0x466f5e35	0xce48304e
-+	0x394683c8	0xef6e6b7a	0xb9d1242d	0xb961debd
-+	0x432a3dff	0xa4931ea7	0xd9f03907	0xc29e9ce6
-+	0x4fccf4c9	0xbf234555	0x0b6a6771	0xb29f29ef
-+	0x7edc4bfd	0x781dcf74	0x4ae31020	0x1ab72d9b
-+	0x0ac457e2	0xf9291e09	0xd4084918	0xa540d999
-+	0x223408d3	0x0bd039aa	0xaf0dd904	0x9cfd6a01
-+	0x826c6bca	0x8e41a96d	0xa56fc4ee	0x6a7509fb
-+	0x5cd2e6fc	0xb89aa158	0xb1e5d3f5	0x92ccd05e
-+	0x995d5acb	0x5ed1dc08	0x75038dac	0x4377c835
-+	0x265d66d8	0x3692096f	0xcd69ee59	0x310df351
-+	0x087e3133	0xe89e2d58	0x137fd054	0x00f3562b
-+	0x2ae304e5	0x9db0316d	0x6868cec6	0xb249ccec
-+	0x9f602c90	0xd3715e7c	0x3fcc8a62	0xa1c1e065
-+	0x5b4281d4	0x124dfd7e	0xe9d21462	0x77cbc940
-+	0xf915f2a5	0x66df82fc	0xa8c67c56	0xac4d461b
-+	0x836deb52	0x95fbb48d	0x3454b6bd	0xd87d7a64
-+	0xe64d32b8	0xc44c2aa0	0x3e213c1f	0x4d31b94d
-+	0x4640be5e	0xe127234b	0x9ca54856	0xac7d093f
-+	0x03d0508b	0x30f5121d	0x6e347d91	0x47772312
-+	0x318ea26e	0xad3f6902	0xb5598746	0x8be3b65b
-+	0xc8bbd31d	0x24691564	0xee77d2e8	0x3581944e
-+	0xeff8eed5	0xa29ea86c	0xc2597492	0x23c1c118
-+	0x7810c079	0xb966ee47	0x823e9954	0x9e558c0a
-+	0x74759c12	0x193c6b4e	0x7544597d	0x65c9bf8a
-+	0x68f5e263	0x718c679b	0xc8dc50ba	0x5f5ab841
-+	0xc3eaf579	0xc2072358	0x62481939	0xffe7e686
-+	0x201f3215	0x1d88dc8e	0x28fb4002	0x40c56ec5
-+	0xb7bcce00	0xd52f5042	0x84498e04	0xcc97fb7d
-+	0x64035e93	0xcd3478a4	0x15d63309	0xa9e47b85
-+	0xe835e45f	0x9de598b7	0x94f569f7	0x56689b0c
-+	0x381f9173	0x708b3e52	0xc81f0649	0x12113041
-+	0x4694aae2	0x69040fc0	0xe4ba7bf4	0xfadc5729
-+	0xc168381f	0x1985f118	0xab0ca720	0xf0150799
-+	0x42690e4a	0x71af3be9	0x9325f3b8	0x36575996
-+	0x4dc1dca7	0x7e534c37	0x01830a21	0x221eef4f
-+	0x18698322	0x57a80837	0x483ae2d8	0xef905b54
-+	0xe01827de	0xae9a8ff1	0x0058be7b	0x052632ad
-+	0x9df5c90b	0xb763fc7a	0x5535c95c	0x8eb5916a
-+	0x75fde5cc	0x57d8eeab	0x0dcc35c6	0xbf11c88f
-+	0x69142118	0x4f35c928	0x7966066c	0xb2d13b4b
-+	0xdad06d34	0xb5d8f5c7	0xe0bb11e6	0x8a36325d
-+	0xc1122d64	0xcf07a1a5	0xfe7ce9b1	0x176b624b
-+	0x4de883fd	0x00a9024b	0x3d3f7271	0x5072895d
-+	0x2634e158	0x2f3c9a35	0x95e374d1	0x65e66528
-+	0x47766433	0x4cb805ff	0xbc8f0319	0x6d5055a5
-+	0x4932e8c2	0xa93fbb4d	0x87f08bd9	0xf5e5706e
-+	0x409af40e	0x017edf5c	0xc5394c71	0x6fb97b6d
-+	0x7b5ddb6b	0x0256adfe	0x76d337e2	0xa3327113
-+	0xfbb4cb29	0xea68ca27	0xa76a865e	0x8cdb2dd3
-+	0x902642bd	0x16772269	0xb2341eaf	0x858fa943
-+	0xb087fac9	0xd17de85b	0x3d9c248a	0x0bdcf2d0
-+	0x874fc03c	0xf19f2591	0x190c06a9	0xc6b5c3ea
-+	0x472b6245	0xdb9f8201	0x46d27a0d	0x52218ffe
-+	0xece78c44	0x3ef6e38a	0xfcf19b65	0x536c840c
-+	0x86d363e8	0xaa852826	0xde17e3ec	0xa9c3b45b
-+	0xd322302a	0x48f03728	0x2f60d01a	0x3b356752
-+	0x8a869fd4	0x055d04f4	0x765074fb	0xb0b5c2d1
-+	0x865ad360	0x0cb6c6e8	0x5de9cf99	0x863938d3
-+	0xd4d9aeea	0x0babfa86	0x172cfb57	0x972d8f4f
-+	0xe9aeeb95	0x6acbe297	0xf2459e42	0x415fdd12
-+	0x84b2e67b	0x47d2d466	0x44bc85a4	0x1a55b957
-+	0xe4d01142	0xbf4ea387	0x5651e1a2	0x19124703
-+	0x8aaed1b2	0x841f3ecd	0xc6d6cc4f	0x1f2d8565
-+	0xba08e74a	0x68e5ecf4	0x07af5ef4	0xdd5a43a9
-+	0x6086c705	0x37ced045	0x0fb05ca6	0x35f39f3b
-+	0xda1ecbef	0x1daf6d76	0x5481d7ed	0xc51e8385
-+	0xa705e11e	0x127d2a7f	0x654d4710	0x1a34370e
-+	0xf8496ea4	0x4392b6ec	0x2f209933	0x9c5ab017
-+	0xa4f7b837	0x33e0a7d0	0x98fb0635	0xdefc042a
-+	0xc7a1f6b5	0x47107766	0xd06acfba	0xb8ac2a93
-+	0xe21cca44	0xf0150492	0xd4de2e01	0xe0d6e9a5
-+	0xa758b5df	0x2e1c31c0	0xc4794495	0x3d9cc157
-+	0xf94aa4f7	0xc2325855	0xcf9ddd12	0xaa70e611
-+	0x2b2404b8	0x75d87f38	0xa2a6f772	0x61abfa04
-+	0x23b61fb0	0x87f4067f	0x355abf99	0x2c4e6c48
-+	0x2dc8a3b2	0x119b08b5	0x3f1f6d09	0x374372f0
-+	0x24d79d32	0xef2b58be	0x461ab91c	0x1d31267e
-+	0x8b1b2c7e	0x27a4f103	0x1686c7c3	0x55af0d87
-+	0x61c2503b	0x9ffcca7f	0xc3cbdd07	0xd49a4f3c
-+	0x9ddc2ac9	0x335e1b2a	0xd8dcfc08	0x6e83f11c
-+	0x53de9e30	0x7b774670	0x15a97571	0x1ecacf66
-+	0x26581520	0xeee3496b	0x1fdf8174	0x4ddd3c61
-+	0xaa504fc2	0x0b09792e	0x9b81d1c7	0x10765c95
-+	0xd3e7b9d1	0xefdb38f9	0x4c44d38e	0xaaf8fd08
-+	0xceb22e7c	0x5ac74242	0x6baee02d	0x5c7eaa5b
-+	0x27265dca	0x614c3b5e	0x2994874d	0x486d48a3
-+	0x5945c4f9	0xe465f343	0x934e55de	0x633199a2
-+	0x147222cc	0x9bbb0c16	0x6a7e7ef1	0xb7bce9b5
-+	0x13413d18	0x628231af	0x0fd2d58c	0x4cbafba0
-+	0xa930fae6	0x91733823	0xe06f99c3	0xda3b57b7
-+	0x04b8a9dd	0x53451e33	0x11fde5fd	0x0e35bcb8
-+	0x3a5799d4	0x3893f9c0	0x6b9d0e1d	0xf8d948ce
-+	0xa33a6628	0x7d09792d	0xd74b3719	0x0afb4de0
-+	0xfaa5a685	0xecf7f8ac	0xcf34b855	0x89453b4d
-+	0x12f028c3	0x45edc3fd	0x792c43fc	0x2b054962
-+	0xb8799a92	0x0ab38d61	0xa6c6a76d	0x7670cdbd
-+	0xf878b511	0x9a3474ba	0x478673f0	0x7398bba8
-+	0x4fa10ff5	0xf0a1931c	0xd5938e03	0xe9a23c28
-+	0x7bea2a5b	0xf7a8db22	0xb94ae0e3	0x2abe6385
-+	0x0ef2cc36	0x6b997544	0x1e8cc4f1	0x69a5b182
-+	0x54f9b7c7	0x8fe56cba	0xc7c12fcc	0x8d689865
-+	0x2d6ef011	0xc6a1b740	0x66af0a76	0x76018cdd
-+	0x30661377	0xcf1fcf93	0x08046423	0xdf9371c8
-+	0x1795ec3e	0xf5ea09c6	0xe462de69	0xd7da78a1
-+	0xd8bda1eb	0x1179f53a	0x2b394767	0x3ba153a7
-+	0xf9c85bd7	0x5700c827	0x8478ac99	0x080a2f52
-+	0xdd1c18f1	0x579cea67	0x345c56ce	0x4563f16a
-+	0xfa1a5b74	0x0b6e233e	0xadc7bd9a	0xbee6d2f0
-+	0xa249f3ef	0xcdea9b77	0xeaaed82e	0xcc4448a7
-+	0x34f7cafb	0x7621bb44	0x4965b0eb	0xe6d6b8bf
-+	0x3c683b25	0x33bcb5fe	0x3f376249	0x5b40dc67
-+	0x658bf6aa	0x7f0c5d0d	0x61514591	0xeb3bb83f
-+	0xc2e208dd	0xe82f08f2	0x6ef75ae5	0x9c11bc0d
-+	0x289c0553	0x1578ce5d	0xb7f05c0e	0x818c5ebd
-+	0xe566ec9b	0xc6995b3f	0x0c02aac3	0x2b4264b3
-+	0xf9cad304	0x5b0479fb	0xf8ce8d6f	0xb7d80d8b
-+	0x41a0d223	0x71ec8a7a	0xc9d74d41	0x245c5988
-+	0xf607fc59	0xf1c7b6ab	0x142ef712	0xbf607800
-+	0x281e5911	0xad9a3e63	0x87b59384	0x7ebdc04c
-+	0x6f47867b	0xb6a304ac	0x289f65e7	0x335fc866
-+	0x77eb11b3	0xb70c25b2	0x70b43d52	0x684d46c0
-+	0x0940459b	0xde739ede	0x0b438a29	0xb713e77e
-+	0x71f539b7	0x8b2f0f7b	0x8d8ab95d	0x42cde8c9
-+	0x08c259d1	0x021eda69	0x2af81ddc	0xc7d13028
-+	0x05abfa20	0x6a61008b	0xfc62557f	0xd6d731b2
-+	0xb080aca3	0x6acae4a3	0xab33d2bc	0x7983c177
-+	0xdf0c357d	0xb8dcb956	0x9c214460	0xfeb75d75
-+	0x9b3d468b	0xd2c3106c	0xb1bd118e	0xf26df6a8
-+	0x11b9c4d2	0x031357f9	0xf7af8a12	0x70fef26c
-+	0xe5d8b8d5	0xf6746fd8	0xd6cc3266	0x4158e59f
-+	0xa38fbfcb	0x01c61ff6	0x44c7c4e6	0xf26db3aa
-+	0x46bb6d84	0x0a794535	0x1d5eab72	0x42345de7
-+	0x0c7e6d47	0x8bacc223	0xb7334b8d	0x3d9d951b
-+	0x18f4afc4	0x9c0cb708	0x53b71b82	0x603e8350
-+	0x6f2df978	0x0c6f3f0f	0x661ebca9	0x30788bd0
-+	0x982959c0	0x50aa1351	0x672297c1	0xa490a756
-+	0x21c9e911	0x977e172e	0x0446db50	0x49b711c1
-+	0xbc6d54c7	0x0fe0adb4	0xc4ec0fe4	0xae6d09b6
-+	0x316cfa53	0xba68cc8b	0x104bdbe9	0xc31639a3
-+	0x812a97fb	0xa1c6884b	0xc884d473	0xe3057c15
-+	0x5ee879a3	0x5abe8262	0xb906bbde	0xfd98fcbd
-+	0x6ae15c96	0x44a17e0e	0x28acfa15	0xb345122c
-+	0x6ddc4244	0x005eb369	0x22d038bc	0x0d226e4f
-+	0x64c7ed6c	0x7964b8d9	0xbc5d668d	0x99155e56
-+	0x9979151c	0x65312a00	0x0271d338	0x64867293
-+	0xed0d26fb	0xe69c5f02	0x93fd6871	0xf5702656
-+	0x4fad1c2b	0x20f8c272	0x438b964a	0x87ff3fa2
-+	0x6706537a	0x437b5709	0x6fb797dd	0x85679fab
-+	0x00da6b51	0xeecc5540	0x2998791c	0xc36d40ef
-+	0xb545e334	0x9ace5e06	0x8a9e6c54	0xc341d0cd
-+	0x1478a2d4	0xb81413bd	0x80601f72	0xa1b250b9
-+	0x1cb7f5ce	0xefad630c	0x32325fcc	0x29e3474d
-+	0x6a7ae043	0x879ee630	0xdc1e8a55	0x7ae794a8
-+	0x4ee38039	0x2ff4947a	0x53bb84b1	0x8f0b077d
-+	0xaa4c543b	0x9aa88443	0xeb31a017	0xf3485983
-+	0xe53b855c	0x6e17aec6	0x726458a6	0x5acf4345
-+	0xa1b95c5a	0x30668c67	0x47fb5dc7	0x8aafbff4
-+	0x4b94ef01	0x07bd6231	0x544afcf3	0xfdffca2f
-+	0xce847471	0xe90abc6e	0xf05e3cc1	0xf602a9c8
-+	0x8f104b51	0x1ae3da07	0xd07dfc04	0x561d9373
-+	0x6f6cc833	0xac982489	0x3c0f8afd	0xfab974d0
-+	0x397e135e	0x8edb3eb4	0x452b9509	0x3972829d
-+	0x639e3981	0x1c758ec1	0x11428fa5	0xe8308fa7
-+	0x571d71b9	0x94e40c2b	0x1aaaa397	0xce9283ae
-+	0x599bbb93	0x51c04bf7	0x556bc74f	0xf6e6e799
-+	0xc34191e0	0x5f06bce6	0x9f63ecd1	0x54437905
-+	0xf8f9bd50	0xde82cbf6	0xe11a9949	0x9d312bfa
-+	0xe712e3db	0xb57eabc9	0x57682068	0xc91c2e3c
-+	0x681e4fbd	0x0ecd3452	0xcc893248	0xf13f0600
-+	0x9a8a9194	0xb4c1cd29	0xd504d8f2	0xee6c5b8a
-+	0x211c9958	0x7a4f9c30	0x32775708	0xda97bf03
-+	0xf7035e57	0xbe77d547	0x37accd1e	0x6c537775
-+	0x8d63b752	0x7fec4a3c	0x94211d9e	0x60bfeb2a
-+	0xebd47130	0x747d52fc	0x8434f487	0xac9091cc
-+	0x8f8b228f	0xb77f96a1	0xc21fede9	0xa9e2678a
-+	0xbc815194	0x54d677ac	0x66c11faf	0xfb666595
-+	0x01e5e973	0x5c990d0c	0xf2cea425	0x5b516ff8
-+	0x8c932784	0xd18feb32	0xb5acd3d3	0x1703b89a
-+	0x34fb512c	0x0ac83386	0xd58c5728	0x5c018ed6
-+	0xbe0908a0	0xd490b0e9	0x0ec94527	0x2f281499
-+	0x471df723	0x03eddc08	0x9b99d975	0x11535b70
-+	0x5802288c	0xb3512d42	0x415a9c0d	0x52dbd146
-+	0x8b0c59bf	0xd8160cc7	0xe37dee6e	0xfd5211cc
-+	0x5635ff4d	0x8d783398	0xc11f5d62	0x54ca73b4
-+	0xc3ebdf96	0x835e7883	0x9cd03137	0xe4b4f709
-+	0xdbde6d86	0x2b562b2d	0xfecc0df5	0x172a5ec2
-+	0x568b52b9	0xf542957c	0xd738b325	0x49c49aaf
-+	0x6eb4c9ad	0x363f4978	0xac4b0cb3	0x4ec8dca8
-+	0x7a2ec2ba	0x10ff39bc	0x8b8748d5	0x6a86e67b
-+	0x0d81e2b6	0xf4bde138	0x02249333	0xab0c7acf
-+	0x4ce5e894	0x1656dad7	0x46c59329	0xa849fea0
-+	0x3d0400be	0x6898c4f7	0xd866ff9a	0x84a5b170
-+	0xc997009e	0x80524f6e	0xc80fb5dd	0x5bde0181
-+	0x0bb0c8a8	0xe5a6b9e4	0xd4753f0a	0xda9bf0c6
-+	0xd6dd041b	0x4c7338f0	0xa223bd71	0x23b58f4a
-+	0xf6e127dc	0x1777033d	0x5b057a0f	0xe08af0bf
-+	0x17c07032	0xbbc3f27f	0xac6dc98b	0x921e2f12
-+	0xcf32236d	0x6cb700a8	0xa3b4e5cc	0xe9b65d73
-+	0xca7d6f44	0x7b5917f6	0x7b80dd21	0x5ee87e45
-+	0x86799f71	0x0667e036	0x8f97dcca	0xc4bfd5d9
-+	0x90737eed	0x41b5a457	0xc6c96301	0xf8933e95
-+	0xe51c2456	0x00c661f4	0x8a0e1aaa	0x92aa4181
-+	0x1e3f8638	0xd481a14a	0xaf637189	0x91622fb3
-+	0x4450865d	0x4202b431	0x5248342b	0x01ff713b
-+	0xe33b5ec5	0x912d6856	0x10deb2ac	0x9072c180
-+	0x24d792af	0xa39c5dfd	0xb4c94140	0xfeb32004
-+	0xa174dae8	0x49da7dfc	0xa4db1090	0x7d2a998b
-+	0xb7eba69b	0x9b824871	0x3557bd1d	0xd3a73d9b
-+	0xf225310b	0xad1ffcf6	0x2d5f075b	0x592de6f4
-+	0x69e438f4	0x4ed8cac4	0xa79c947f	0xb95f9590
-+	0xb8ede5c9	0x0b1c9229	0x85a4b30e	0x65149920
-+	0x433461a8	0x186fda4f	0xbaee7097	0xd3cac1bd
-+	0x8bc32ca2	0x914f1512	0x9b619478	0x582a53c9
-+	0x4e624a00	0x77e445ec	0x6f823159	0xa9c4766b
-+	0x0dd6ad28	0xfabdadc5	0x704bfd95	0x08645056
-+	0xe1939821	0x76650b62	0x8876941a	0xf812239f
-+	0x2869ce13	0xa4d292c7	0xecba40fd	0x83d2fd8f
-+	0xdd45ccc0	0x7c12b7cb	0xdc0a20bb	0x0d9be34d
-+	0x4dd16a9d	0x25835446	0xb94d8c21	0x97ca8010
-+	0xddd09324	0x95ffe31f	0xa86136c9	0x828ac571
-+	0x9aa7fc00	0x382cc48c	0x015f7186	0xc3fd040d
-+	0x505408e0	0x21cdc34c	0xbd266059	0x6e2f673e
-+	0xe4523c1b	0x3ba56bb3	0x1c343938	0xabc0df54
-+	0x8ba4f1e8	0xfbd4c592	0xb678c884	0xff3be2f1
-+	0xca013570	0xfb0598df	0x3cb9cc1d	0xe3ba8ca3
-+	0xc3d7ecee	0x0ae84a0b	0x0d70f0c3	0x963110ff
-+	>;
-diff -ruN u-boot-2015.01-rc3/arch/x86/dts/microcode/m12206a7_00000029.dtsi u-boot/arch/x86/dts/microcode/m12206a7_00000029.dtsi
---- u-boot-2015.01-rc3/arch/x86/dts/microcode/m12206a7_00000029.dtsi	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/dts/microcode/m12206a7_00000029.dtsi	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,686 @@
-+/*
-+ * Copyright (c) <1995-2014>, Intel Corporation.
-+ * All rights reserved.
-+ * Redistribution. Redistribution and use in binary form, without modification, are
-+ * permitted provided that the following conditions are met:
-+ *	.Redistributions must reproduce the above copyright notice and the following
-+ * disclaimer in the documentation and/or other materials provided with the
-+ * distribution.
-+ *	.Neither the name of Intel Corporation nor the names of its suppliers may be used
-+ * to endorse or promote products derived from this software without specific prior
-+ * written permission.
-+ *	.No reverse engineering, decompilation, or disassembly of this software is
-+ * permitted.
-+ *	."Binary form" includes any format commonly used for electronic conveyance
-+ * which is a reversible, bit-exact translation of binary representation to ASCII or
-+ * ISO text, for example, "uuencode."
-+ * DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
-+ * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
-+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-+ * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-+ * ---
-+ * This is a device tree fragment. Use #include to add these properties to a
-+ * node.
-+ */
-+
-+compatible = "intel,microcode";
-+intel,header-version = <1>;
-+intel,update-revision = <0x29>;
-+intel,date-code = <0x6122013>;
-+intel,processor-signature = <0x206a7>;
-+intel,checksum = <0xc9c91df0>;
-+intel,loader-revision = <1>;
-+intel,processor-flags = <0x12>;
-+
-+/* The first 48-bytes are the public header which repeats the above data */
-+data = <
-+	0x01000000	0x29000000	0x13201206	0xa7060200
-+	0xf01dc9c9	0x01000000	0x12000000	0xd0270000
-+	0x00280000	0x00000000	0x00000000	0x00000000
-+	0x00000000	0xa1000000	0x01000200	0x29000000
-+	0x00000000	0x00000000	0x11061320	0xd1090000
-+	0x01000000	0xa7060200	0x00000000	0x00000000
-+	0x00000000	0x00000000	0x00000000	0x00000000
-+	0x00000000	0xd1090000	0x00000000	0x00000000
-+	0x00000000	0x00000000	0x00000000	0x00000000
-+	0xfd2a2f68	0x82ac7ebb	0xa4916328	0x7480b81b
-+	0xd329a777	0x25750339	0x9a8f7a9b	0xf1da9cb8
-+	0xb1be7b1a	0x621d5a35	0x94b57e2e	0xa9def809
-+	0xe4492a43	0x530252bf	0x1040fada	0x8a853a89
-+	0xfb0e6e76	0x6d191ed9	0xefd28b83	0x946414e5
-+	0x13f415d5	0x28487029	0xb69855e8	0x516cbedc
-+	0xfabbea88	0x9f90e8a1	0x211793d8	0x54653835
-+	0xa7789a08	0x754791d9	0x484764d4	0xdca45615
-+	0xf64844f4	0xdbd754d0	0x7d2b0ff3	0xd023e25a
-+	0xb048bbcb	0x83038b5c	0x57e17d17	0x735f1e9c
-+	0x8982c22e	0x6c7b2ad7	0xb26e3b82	0x7121e035
-+	0xe4ea8dba	0x68d4f406	0xaaafdb13	0xf119b472
-+	0xb5853303	0x20698005	0xcf34604c	0xdc17d19b
-+	0x042d6e97	0xf0300325	0xe1b55072	0xc2804918
-+	0xd6d7a912	0xf908c81b	0x4f9979ae	0x0179f8c6
-+	0x2f13e3c0	0xc5911467	0x39ad6c23	0x9c9d8837
-+	0xf3c3f767	0xe56b4a96	0xdad7cebc	0x6eaaee57
-+	0x2215ca7b	0x4cee4f65	0xd9a51c2a	0xf33c80a1
-+	0x11000000	0x0b468bda	0x0b57c7cb	0x885fad4b
-+	0x8a37307a	0x68cc7d5b	0xb6395b55	0x583626b8
-+	0x21efe98d	0xa516cc42	0xf5b978b1	0x585d8a11
-+	0xdd5f2ee4	0x17b1c7eb	0xb6f005ea	0x9ecc6ac6
-+	0x82c0f1b2	0x25a114fb	0xa6086296	0x93da75f4
-+	0x0695ff88	0xd413dd65	0xccf7609e	0xb7718aa8
-+	0x334406dd	0x28de253f	0xfb43ca83	0xa4674656
-+	0x7392e05f	0x9b062c62	0x17571892	0xb5811cbf
-+	0x9d64666b	0xa01c1500	0x5893e418	0x07ba6ed1
-+	0x0eebedd8	0x299a52bf	0xdfdb6191	0x4e846b26
-+	0x298b7431	0x576f4479	0xf5317e04	0xc9492745
-+	0x167c42e3	0x0c0cd705	0x82756ce5	0xe81ba860
-+	0x536c357c	0xc27433fa	0x41c8078f	0x1ff779d0
-+	0x73ddd76d	0xe606c66c	0xe0ad45bf	0xfebdc310
-+	0xcb2aa836	0x39903a79	0xe53d5dc1	0x0cb6a1ff
-+	0xe6091d08	0xcb2961d8	0xd38987ff	0x2bd624fd
-+	0xfb4e484a	0x8c60efbb	0x0ed088b5	0x5a142b04
-+	0xa737bab1	0x44da29a2	0xc046ecb1	0xe7ccefdc
-+	0x81895d2d	0x41266fa8	0x52a5e25e	0xcfeac133
-+	0x252b0737	0xec54b6c8	0xe1c9ebf6	0x25180c1a
-+	0xea65b9e2	0x5e9ada96	0x08559e07	0x414fcece
-+	0xdb4927f7	0xa229106d	0x6a7db273	0x8ac6a901
-+	0x00a87e4d	0x14fd1e2a	0x63a5fa87	0x5ca223c5
-+	0xc0c980c1	0x42c447ef	0x5b274187	0x75bd6279
-+	0xdb44dae2	0x60856af1	0x777caf5f	0x298e810a
-+	0x93f4f418	0x9e1ddf3f	0x6f589046	0x18ea149c
-+	0x4a5ce4b0	0x529db285	0x3c2dde59	0x1d680e51
-+	0x3a62d819	0xdf4c01d2	0x432a8f06	0x70a37043
-+	0x4a0d4baf	0x0d3395be	0xfce0391f	0x5228aac2
-+	0x9dd9b00e	0x6149f393	0x6fee1d85	0x1d3628cb
-+	0x107076de	0xd99fe940	0xa227eec2	0xc97d8119
-+	0xcf2fa8b2	0x821dac93	0x518875f2	0xd18d1d47
-+	0x3e27fdcb	0x47823f98	0x20d42c1e	0x9a58812b
-+	0xe0987435	0x1426f12f	0x61d6f627	0x5c58d415
-+	0xe5ca80de	0x9e11e526	0xbccc0f94	0xb49cec4d
-+	0x357f947c	0xbef0e2f2	0x5b9b2596	0xddc87ff7
-+	0x5f2705f8	0xa25f2be7	0xbb45a165	0xe49ef6d5
-+	0xe76e250a	0x75584c7d	0x7900da7b	0xee0e3360
-+	0x6988740c	0x4aa56944	0x2d485383	0xef45f5d5
-+	0x0df4b0f7	0x48199182	0x5b33c21c	0x8f2483c1
-+	0x8aae6c50	0xaf406ccb	0xb7522bda	0xeafb64de
-+	0x9a9b1fd7	0x3ab46c34	0x0ec5f025	0xe5bc9668
-+	0xdb108e78	0xd6152ac8	0xc382ec93	0x5abc2565
-+	0x4f256030	0x856f6eb5	0xb589dc96	0x3de80942
-+	0x49d20a05	0x8e3ac21b	0x0262ecc7	0x5f1bce89
-+	0xec50198c	0x0115b078	0xf67d94e3	0x1cc3682b
-+	0xfb2d4ab0	0x4d6ce252	0x1d7aace9	0xf7e99257
-+	0xc1235e85	0x8129ee72	0xb6cfbb13	0x6b851ab5
-+	0x430633d1	0xe9ed33e9	0xfe85a42a	0xb4583c0a
-+	0x35a65f5e	0x5fb0bc81	0xe16db440	0x7d022cf2
-+	0x8f832920	0x20ed9ad4	0x6a4ace8b	0xf4c85869
-+	0xf17dd57b	0x277ae0d5	0xb5f59c50	0x35d099a5
-+	0x9ce955ae	0xcb200000	0xcedc4073	0x2a2ba8b2
-+	0xa1b53439	0x46ced775	0x59069604	0x6488f5d8
-+	0x2bc0af55	0x643178a2	0x36f62be3	0x2606f0a1
-+	0x3057cf8a	0xc28f4a3d	0x708e8020	0xb3fccf9a
-+	0x29b79fa7	0x35622d93	0x85eb0e68	0x80fa3b59
-+	0x143f340f	0x20e17166	0x169fe55d	0x698f3655
-+	0x0bc8b45b	0xde3aaf6c	0xbd597266	0x75505401
-+	0x44d0095d	0x4c00f346	0xfb9ef2c6	0xee70ef96
-+	0xae807621	0xfbbe7490	0x9c0a283e	0x01a8058d
-+	0x1be53568	0x0b8dc8a8	0x45afb745	0x3ee1ff58
-+	0xe772e14e	0x3ca4e729	0x6973e751	0x764f244e
-+	0xca8d1621	0x6c4fb15c	0xae972e6d	0x3d26c6d3
-+	0x5ca8f450	0x6328d65c	0x2e7cd88c	0x87dddcc1
-+	0xcbbdefc6	0x1ab8c0cc	0xd21e503a	0x20c11d27
-+	0x2f0adc1d	0xc24240d2	0xc73aa069	0x99afc53e
-+	0xcab27e40	0xbe107ccb	0x8ad5f0ae	0x9024c188
-+	0xe02bb39d	0xdb784309	0xf91acb54	0x4d15b75d
-+	0xd339c237	0x3b556619	0xf69f91f6	0xca6fcfd4
-+	0xb5ddf471	0x0698490e	0xb0855c30	0xe2b34b13
-+	0x3c979248	0xc0484a59	0xb4cf9f4f	0x7975f2ac
-+	0x602259d3	0x89364c24	0x37f29913	0x0b4c88a0
-+	0x23f0b663	0x309c13d2	0x80a3d12c	0x4c866e87
-+	0xea7e29c0	0xbc33db6e	0x3c3af584	0x63da0de7
-+	0x9bc6bf5f	0x3b948269	0x4d41b09b	0x5724dd20
-+	0x4e16618b	0x5917781f	0x4bdec762	0x562cc3fd
-+	0x50e59d92	0xb3edea05	0xa6ceaa68	0x60af473d
-+	0x78a99aca	0xd60ba313	0xe502992c	0x0c25c2ba
-+	0x476eebd4	0xe7e23958	0xc4ac2757	0x0d6695ec
-+	0x7664b4f0	0xb87ed0a5	0xdcf23b2a	0x76d38802
-+	0x21699284	0x87b80e7c	0xf0e34f45	0x4bb84bc8
-+	0x0316744a	0x26de0ed4	0xb25ff5e3	0x31445bb1
-+	0xaccc5b87	0x271b976a	0xcdf5663b	0xe142d271
-+	0x1af28339	0x7d304ca4	0x11ee6243	0xdf70fbc3
-+	0xb8d88f25	0x4c2d9626	0x8eb72c77	0xceee1817
-+	0x4e1b35f7	0x6c261f67	0xa32a2801	0x67ace2af
-+	0x7c87f8c1	0xca6f2505	0x982269dc	0x137080a9
-+	0xe40fa78a	0x3897a66a	0xdc5d0ff7	0x58016e44
-+	0x21bcc988	0xf2a4df15	0x9fb021d4	0xca59e882
-+	0x3673d08e	0x7cf5d500	0xd41ab9df	0xc17b4a58
-+	0x2cb85aa3	0x01103427	0x5a8fac5b	0x7ac856b2
-+	0xb1532563	0x1b94b518	0xadea3bfa	0x597109a9
-+	0xf28df608	0xc2bf64bf	0xf517bb53	0x61b7d5ad
-+	0xa4a38e9d	0xa9fdc597	0xf990f2f1	0x00466640
-+	0xcecd06a7	0x5eef09d3	0xb67a08ae	0xd780d8a0
-+	0x07641a71	0x9dc9f7b9	0x5f0b5a44	0x94dfe40f
-+	0x6db0cf7c	0x3fe72d11	0xb2443ea3	0xe051f336
-+	0x4ec8a6a4	0x11201430	0xb44e2b28	0x5bd018b0
-+	0x444ba2bf	0xa63031eb	0x147f9826	0x3fc56ac1
-+	0xd3a75ad3	0xc3f71815	0x340bd72b	0x3e5a488d
-+	0x0cd8fb05	0x17791534	0x68e7321c	0x1489c701
-+	0xa39f2d71	0x7cbbd9f9	0x42cba365	0x024f7d9a
-+	0x29ef2da1	0x1eb9c4e6	0xc8b24985	0x9c33412c
-+	0x5fd3003d	0x7f0793b9	0x497b6ef4	0x3af648f2
-+	0x22f4a1db	0xac8500c7	0x3b1a859a	0x57921c78
-+	0xb0efd82e	0x8e60452d	0xd86ed85f	0xc1ae73d1
-+	0x633d83dd	0x7dbee7f6	0x46ef5590	0x027f2d50
-+	0x3c81bcf1	0x37a3940d	0xc92d0a8f	0x270cd02d
-+	0xaeed9d1c	0xb6d76bcd	0xda27f251	0x1625a683
-+	0xf2d1302d	0x3f95bc0e	0xdb4b36e0	0x96fe1e6e
-+	0x1dcbca54	0x57d44867	0x14aada62	0xf20f5444
-+	0x9ccf560e	0xb8d178af	0x9affe58e	0x8e3bd741
-+	0x7dff29e9	0x3c1998e5	0x9909e1df	0x1bbbd50f
-+	0xfda14fdb	0xb66fb65e	0xe646d5f3	0x71f41791
-+	0xbca50c12	0x57c6d2a2	0x8f5c750f	0x48f87301
-+	0x9103acac	0xef185c41	0x6dbe9524	0x3c040c16
-+	0x211dc2ac	0xa61925bb	0x20bfb41a	0x98253e77
-+	0x4d5ea3b8	0xc2b11b6d	0x7f072104	0x58340448
-+	0x596e3090	0x72484d15	0xf5e5d16b	0xc1b9faca
-+	0x5c786fdb	0xdcd97509	0x73d21aa9	0x2a90c7ae
-+	0x396ed0b1	0xa23e63da	0xea20cb1b	0xb2bb359b
-+	0xb5df6ff5	0xdbc470b4	0xa6fd8d97	0x9458f6d0
-+	0x97434866	0x2c9521c4	0xc51f6ad2	0xa33fb3b5
-+	0xb26915d7	0x3ef363da	0x9ff9f5c7	0xfa236e60
-+	0xa12b879d	0x2f98bd3b	0x95282ca8	0x64f90513
-+	0xc03d2962	0xb13b82f8	0xfdc2eb41	0xc39dcf3b
-+	0x95a409af	0xbaba6e7e	0x0d028543	0xc5b9426b
-+	0x35f5727b	0x8f3b9f8c	0x6e7b85d8	0x2cfa9b2e
-+	0x2a7117cb	0xa41f3fe5	0xbe17ff18	0x0f4a8be4
-+	0x20b9003a	0xebce04ff	0xd6f276d6	0x9fc66d07
-+	0x83f40250	0x560eaffe	0x92be2ddd	0xdb0ff83e
-+	0x424f0605	0xb3cf76a4	0x167725c5	0xe3b513e2
-+	0xc31a1a72	0x9f7161a4	0x25707dd1	0xdb5f2a91
-+	0x85db06af	0x78443bf6	0xebbd8e7d	0x7909e5fe
-+	0x618237a6	0xe6dea70c	0xcd3299c2	0x7736d40a
-+	0x044cda94	0x6cec190e	0xb9652583	0x51946c01
-+	0xcba67203	0x0dae0f1d	0x6d0dff0d	0x85756bf7
-+	0x1db9e08a	0x88977944	0xa6252c60	0x06ff1a07
-+	0x1b8d319f	0x884f10eb	0xbdeb7feb	0xe1681bb9
-+	0xb5f0cefc	0x5359534d	0x6de87cf9	0x94a78727
-+	0x15c17557	0x398876df	0x2f85f258	0xa0284d4b
-+	0x4879ca57	0xb5ab7844	0xb402fde8	0xd520cb53
-+	0x8a601365	0x8853b510	0x1e0538f6	0x0135f899
-+	0xa78c7bba	0xa33c8ccc	0x6cf0da00	0xa5f96757
-+	0x94714373	0x79413ed2	0x27c7b9cd	0xda172153
-+	0xeeeee91b	0x959d8437	0x660efcda	0x2a6ab94a
-+	0x8913d65f	0x24246350	0xf6c85ab5	0xf6b696f7
-+	0xd75840c8	0x046b7435	0xb55474fc	0xd8d8bab0
-+	0x265e79e0	0x0dd030b3	0x826a182c	0x38f1121b
-+	0xeb33b5cb	0xe3ca835b	0xe8850761	0x25955d7a
-+	0xbb6b7fb4	0xbc02ca0f	0x1b03bd1f	0xdd1a59d6
-+	0x5d48f10b	0x35e35688	0x1411d34a	0x6131c664
-+	0xc1b8b277	0x1bc8afd3	0x886f0c09	0xc1b6b517
-+	0x74ec9ecb	0xee2d43a5	0xbc0f122a	0xd1911c88
-+	0xc7e39b2e	0xa60c39b0	0x942fce7e	0xc8c2a2b6
-+	0x51978cc2	0xad8d9ed2	0xcc2b0c3d	0xf6aff0f7
-+	0xbfb3920a	0xd25aa79c	0x67d87d44	0xf612df60
-+	0xf06dbe9f	0xd4ab61da	0xd96c6b1b	0xb39ab4b7
-+	0x3368a90d	0x39c8bd81	0xf4ba5ead	0x6fe656ad
-+	0x93b946dc	0x2181219e	0x7b98805d	0x675af3fd
-+	0x59760289	0x934b4803	0x4189f27d	0x9503a5fd
-+	0x42aaa076	0x6b4bd024	0x86c826e9	0xe0370ff4
-+	0x1bfdf980	0xc487f797	0xd4754c3b	0x1098b2e8
-+	0x05753a1c	0x3833ede3	0x5f1065ec	0x40cb562e
-+	0x8d4fc418	0x392290d2	0x622d2e29	0x55df1f46
-+	0x4ae0893e	0x24ddf8a9	0x302a64dc	0xc93f7504
-+	0xde8e1674	0x033acbcd	0xc9732a64	0x6f7a7da3
-+	0x72b7c43a	0xb5110e6a	0x00865c19	0xaf5e00f7
-+	0x0a80b55d	0x6e638c0c	0x3771d602	0xb4a95ae7
-+	0x01ba3cff	0x42e350eb	0xedb1d897	0x82f0cfff
-+	0x98e79055	0x6b0cc62e	0x8ce1735b	0x62645395
-+	0xd99fc208	0x86ee3066	0xc8f13758	0x2378d582
-+	0xad41c218	0xc3954b87	0x47acab9a	0x69126227
-+	0xbf778357	0xc5a7b76c	0xb96894c4	0x89e2dd88
-+	0x27cc53b7	0x2187116c	0xd397c13b	0x578a6686
-+	0xe3e58b11	0xdc3e4d40	0x69f064f5	0xdfb64348
-+	0x42291e77	0xacc21c46	0x5444d976	0x616bcdc1
-+	0x01ffb3bd	0x5cb926e5	0xbd763a24	0xbf224c70
-+	0xdeca1d57	0xded1cc56	0x9b6cbcd2	0xee6efaf4
-+	0x44d634ff	0xf33334c6	0xd275d66b	0x6a1a4c9d
-+	0xbd675ae0	0x6289d1c1	0x053aeaf0	0x8a170aa1
-+	0xe12cfbb9	0x0ae15a94	0x1dab08f3	0x9a2657ab
-+	0x8348417f	0x9572e6dc	0x9c69e518	0x5397dfa1
-+	0xe46120cd	0xad4457fa	0x0106a79d	0x40b191be
-+	0xbb64bccb	0x9dda8fb0	0xc74fe994	0x64ac0ef1
-+	0x3a57986c	0x86e8dc78	0xbb055d88	0x7a1243da
-+	0x585cafe1	0x8968ad92	0x5b73bf26	0xccf77edc
-+	0x10ac1643	0x5738ba43	0x3d39ecee	0x57fd555b
-+	0x36ee9d5b	0xec9115fb	0x4250e03f	0x9e4fd6a6
-+	0xc547b01e	0x9c84f42a	0x37756616	0x217cb517
-+	0x33da3c5e	0xa0a7ae6f	0x8ddb7b99	0xbd84ac35
-+	0x644ec4e0	0xaa62a7ac	0x71795f77	0xd5f67163
-+	0x77dcc227	0x59f09342	0xf6666ce4	0x1e164a0c
-+	0x011e205b	0xc4a80a0c	0x7fd31f1d	0x05ccae4c
-+	0x39b6abfb	0xf4b7ac82	0x39d38e89	0x14c1e7f3
-+	0xdb3bb53b	0x02577ec5	0x7bc12087	0x65ccc2bd
-+	0x72492c6e	0xa6ae0062	0x965946ea	0x58e5f31a
-+	0xfdfd7770	0x052afb9c	0x889b8358	0x2dd65c3e
-+	0x55418587	0x445af0e9	0x43fe6671	0xae45e776
-+	0x2c25d02c	0x44805865	0xaa3a70c5	0x7dd55d11
-+	0x3499f5d7	0xc12e4a51	0x9ef98a38	0x5462e98c
-+	0x0f73c72f	0xd0481aa2	0x56bccd0e	0x64143a1a
-+	0xa7913ef6	0x0ca932ae	0x3739ec96	0xac5d38d5
-+	0xe9c8c754	0xd56e855b	0x950cadcc	0x91cb2e5e
-+	0x6e170c11	0x1eb66637	0xf641b0ae	0x8ba43c21
-+	0x3f43b8af	0x8f1596e7	0xb614d1ae	0xac99c14c
-+	0xe7beddce	0x5757f98b	0xfec1cf89	0x19608162
-+	0x96479a49	0x1f089d9e	0xc2e4ac47	0x1cdea563
-+	0x027f57a7	0xc0ba57c6	0x6eb2faa1	0x8e85c333
-+	0xc391dfd2	0xe2c0bcbf	0xc1f87d66	0xb597d958
-+	0x3655d5a3	0x2d9adaaf	0x8efd0aa0	0x05d65caf
-+	0xa28991d9	0x28b6d7cf	0xdcb48013	0x65e75783
-+	0x8b8b77ed	0xa4b36df8	0xa8ccfb9d	0xd0a1734c
-+	0x2dc97601	0x35d81082	0x2e6d26f8	0xf3baf2c5
-+	0x416084dc	0xd8b84ad5	0xa06b9edb	0x45c2b0b6
-+	0x553c973a	0xbbcda1bf	0xca154d25	0x7a781012
-+	0x4864ea32	0x0784f663	0x27656507	0xb359d4dd
-+	0x43d4c165	0x69b844c7	0x31b1b9e2	0x0f3420f8
-+	0x3cd2e455	0x201920cb	0x93018659	0x5c4a08f0
-+	0x3a0d094b	0x5448c1ed	0xc888d1a2	0x4826cb64
-+	0x625da2c7	0x12110d40	0x5cd8e76b	0x26e09eb5
-+	0x8c6aab45	0x6dd192c6	0x937f1252	0xc927efc5
-+	0x4c5bf11c	0xdd62c6fa	0xeef59620	0xbffc2d5b
-+	0xb90299f0	0xb24df71b	0x76656678	0x550b3228
-+	0x01536098	0x4fbfe03c	0xa82d0c31	0x2eec9bb6
-+	0x752e6720	0x26322556	0x5d94bd64	0xa2e1122a
-+	0x25899986	0xb63d5cc2	0x9222b055	0xbf4f0bcf
-+	0x3d182483	0xc7bb9999	0x97ffc8c1	0xa6500a8b
-+	0xb8b97382	0x3f6f39b0	0xcaca9f6c	0x7b67941d
-+	0x7875ea1e	0x3ff25c0d	0x4cff1a40	0xb5a351ef
-+	0x556a59e5	0x011e995f	0x25a7a5e9	0xedc8707a
-+	0x42b4ddfa	0xa51a3ddd	0x9c9f1d73	0xc8f24ef3
-+	0xfcd73118	0x1a61c16f	0x1e2fa7c7	0x1f49826a
-+	0xd8418fe9	0x726358a8	0x6a0857fa	0x6804ccc1
-+	0x78a55fa0	0xc3e41419	0x60416b10	0x2afe46d8
-+	0x0c0ba2f7	0xd3dfa8ca	0xfa474ea2	0x8e763446
-+	0x1f664c64	0x6a8d06cf	0x1b891114	0xa27c1a28
-+	0x98ddd324	0x26cc9fb8	0x544078da	0x03acbeee
-+	0xc3f3b761	0x56797b83	0xf04ac5a1	0x8603b17f
-+	0xb8989b96	0x28c7be17	0xb750b4a6	0x84b2f7f8
-+	0x32138f9b	0x7661c86b	0xb7517518	0xf2a961c6
-+	0x240a0100	0x100c5b96	0xa1931730	0x18513938
-+	0xdf2baa73	0xd6b55cce	0xf89cab59	0x238c90c3
-+	0x4799f50d	0x29cd7942	0x62677a47	0x7261f326
-+	0x4ff7da96	0x294ba5e9	0xb6474251	0x96de1b44
-+	0x9d84552f	0x1103468f	0xcfd063af	0x5d8a0b6c
-+	0x172670ac	0xc1a9b97f	0x0a278773	0x08b48bb5
-+	0x392b3563	0x8f65e926	0x4be71f10	0x7615e05e
-+	0x98b0c931	0x50bf9779	0x5baa97aa	0xb6e26fe4
-+	0x2c40971a	0xe5d739f0	0xa7e30500	0xc724895c
-+	0xc7a3f44a	0x5b381b1b	0xa7a478c7	0x219f567c
-+	0x42d7a960	0xaae6780f	0xa96c56d1	0xe3787bf4
-+	0x743f3a5e	0x6b99c9e1	0x36cf72b0	0x784ab5c2
-+	0x5113773d	0x625393af	0x62c4da61	0x05422921
-+	0x339711f3	0x3ee04f5e	0xf3a778b9	0x55e1bcf7
-+	0xe49e5a9f	0x5f0935f6	0xa13e17f5	0x3028d23b
-+	0xac9a6fd9	0x14006013	0xbf1b3fb2	0xce785f7b
-+	0x83942244	0xd299d59b	0xf8c0593b	0x71c74beb
-+	0x7561a1f5	0xb133ace7	0x15d5d4c1	0x21c3bb29
-+	0x6ab1c2c7	0xee20d3dd	0xcfd62c54	0xedf9a43e
-+	0x0e23222c	0x5eef5bc2	0xe7426bd0	0x42db58e9
-+	0x62ffe203	0xd63163c5	0x8dbbcb48	0x9e16d9c7
-+	0xb6d51e39	0xbee5a6c4	0x5d0bd775	0xeded86db
-+	0x9eb1454f	0x6217eb64	0xa4b76ae7	0xe3481698
-+	0x6d576cec	0xe751f610	0x1473bd83	0x4aaead8c
-+	0xff4a602b	0x01ed092b	0x310f16cb	0x2e199177
-+	0x693a8ad1	0xf5e520d1	0x1713d604	0xfff1225c
-+	0x644c81b8	0x1adf5032	0x79058d81	0x7aafda08
-+	0x80b6c9df	0x6f927c46	0x307bcaa6	0x0a1aac12
-+	0x7d20bdae	0xd0e9c9a7	0x4530bebc	0xf1dbac36
-+	0xdee3e8a9	0xa96d2aca	0x291c6944	0x436cfac8
-+	0x9dd501c3	0x696e0c6b	0xa85d7036	0xca1c1321
-+	0xcb802235	0xae614fec	0x4f0cf745	0x08604468
-+	0x93bd00f3	0xf39eb605	0x89a8f420	0x18a7f61a
-+	0xa0aebc3b	0x723e6ba9	0xed00f2a0	0x231b43d5
-+	0x37c81702	0x891ffeb9	0x122de4f5	0x90f16757
-+	0x1eb06046	0x21d5cdd1	0x75fd0e6f	0x7d595ae9
-+	0xeb8ed50e	0x7bfd8696	0x3b91f3e4	0xd629e74a
-+	0x1650dfcd	0xda48163d	0x2f8f5aba	0xbc40ee60
-+	0x5291b6b0	0xb059d788	0x1ed5f092	0x65b7a885
-+	0x44503d18	0x3a2893c8	0xaf3dab25	0x8ee0a8e5
-+	0xf82f0696	0xf4fe9322	0x863feff8	0x2cfee629
-+	0xacd8bcbc	0xb3791232	0xdd694c06	0x2a606479
-+	0xaed9bc38	0x49a126fd	0x2a9c7581	0xaf43095c
-+	0xb97acc90	0xca7a25b6	0x06adceb3	0xc8bf7269
-+	0x6eeb0c59	0xa953657b	0x8e175c3a	0x9facc87c
-+	0x4c143d0b	0xb4467fe4	0x372b6cbf	0x2099b361
-+	0xb8ac2cfe	0xb9a798d0	0x15b8b336	0xdab5d568
-+	0xb53a4dda	0x00ce1ef7	0xefef7644	0x41823aa2
-+	0xcb8d307d	0x3baf1baa	0x7124a219	0x8d2820df
-+	0xf3b8cfed	0x95e55a1b	0x8199fa40	0x631042fc
-+	0xf7886353	0x3592b875	0x3b516841	0xac7aa00a
-+	0x3dbfec52	0x9b91e8d6	0x0a8ffce6	0xd11429db
-+	0x92392bec	0xe194095b	0x253d7425	0x6b55919c
-+	0x4c11de8c	0x10b46ae6	0x5902c153	0x9509ace0
-+	0xbb65fc04	0x648a35e0	0xab728bec	0x738effb4
-+	0x416f95fd	0xee30a0da	0xcbaf3cb4	0x312fdeda
-+	0xcdb5aaf3	0xcc631b82	0xe3bf4d97	0x37e2a1b5
-+	0x2920c6b2	0x0d995ad3	0x11af607c	0xcacf31d6
-+	0x781496f2	0x9e478c0e	0xc4c14545	0x89ba2ab0
-+	0xdb1a8262	0xbb924c65	0xad836a24	0x4374fbd6
-+	0xd45a10df	0xd4158c0f	0xd4e88c1a	0xee8b8e23
-+	0x3472ee5c	0xc0a0de0c	0xb1ba04dd	0x7be6532b
-+	0x0101669b	0x2a56f032	0x12879eef	0xa600458f
-+	0x20a96992	0xa2e7910d	0x13235ef1	0xb1185320
-+	0x418ffba7	0xc0ba01af	0x27571c7a	0xde5b661f
-+	0xdd359089	0x6ae76b8d	0x095784d0	0x400a29fd
-+	0x5b3276cc	0x774c4e38	0x6a85e14f	0x37d8d1bd
-+	0x2007cea4	0x3e6942be	0x1a49828d	0xea4d84ff
-+	0x681b5a30	0xd8ff8440	0xac19844b	0x7553a6d0
-+	0x389fb0a2	0x1b0526fc	0xa193b9e0	0xb9987cb7
-+	0x6f14d980	0x0507f958	0xf6a1354f	0xcb9e49d8
-+	0x5a4e1d3f	0x10d8c348	0xb77cf166	0x5097503d
-+	0xf0e17ed5	0x72a2e029	0xddc756b8	0x0a0e30e8
-+	0xf12c6bc7	0x809db2c5	0x243fee9c	0xd2b57957
-+	0xc1b19244	0x8d59262c	0xff94c28e	0x2050edc2
-+	0xa4806d15	0x02026bf6	0x2d95c9d1	0xeb336e65
-+	0x84bcf6ac	0xe53b97b7	0x954eedc9	0xf22209fe
-+	0xf4771bc0	0x1e405f04	0x1d0ec592	0xcd479333
-+	0xdfeb3738	0x0ae23cb7	0x03d509c5	0x837a5e1a
-+	0x634a4467	0x7ee22185	0x102f5326	0x5d002daf
-+	0xea4e31ce	0x1d2be82e	0x5ebe1ad6	0x354259bd
-+	0xdaed312d	0x1e598ea0	0xd6a2b9af	0x76eb9bbb
-+	0x338645d3	0x4d3236f8	0x777011eb	0x0221d076
-+	0x22dee347	0x1e35037e	0x2f34d4c5	0xdda03e2e
-+	0xa541311d	0x3acf0087	0xb435b17c	0x08b8210e
-+	0x7c77f156	0xe20025f2	0xea0e32a9	0xbf766fd1
-+	0x8b6c4f43	0xf6ca80f1	0x07d1d342	0x272b865d
-+	0x8261aed7	0xf3bbe9cf	0x5835370f	0xfaaf4623
-+	0x8cb5a665	0xe6c92e5f	0x22ce69f6	0x61e16f89
-+	0xf15ec311	0xbacaf7b4	0x1317e388	0xa1869c49
-+	0x328da67f	0xd818a8fb	0x6f4c7613	0xcc13480c
-+	0x06789788	0xa7b4e1a8	0x0d8fed7b	0x48308fe3
-+	0xbe5ff9e2	0x7e7a74ee	0x4ffbb70c	0x551895c8
-+	0x734ffc0e	0x82b8b8d6	0xdf710f9c	0xc3df529d
-+	0xf175e377	0xcec6194f	0xc3443fb1	0x52655208
-+	0x94be229e	0x3279939e	0x771647a1	0x34c9a15a
-+	0xaae80baa	0x0b32ec13	0x6d59b440	0x50ddd10b
-+	0x98c166cd	0xfd465f40	0x74eabbc2	0x6dcb95c0
-+	0xddef6f85	0x54348377	0x905f31bd	0xbde86f48
-+	0x1322356f	0x90f3d5f2	0x5d2d4de3	0x2d5253a5
-+	0x729b8879	0x41839289	0x845f8061	0xf5ffcf8b
-+	0xf25ec4d7	0x30570dda	0xcc69f64b	0xeb024bde
-+	0xc847bf80	0xeb8c5624	0x4e4d28eb	0x43f6cc1e
-+	0x8c201bfb	0x1475f9cc	0xde13b005	0x11fd9342
-+	0x07617ac9	0x2fec6867	0x5b30a62e	0x5a8c91f7
-+	0x47208b6f	0x680a22af	0x60fd0ebd	0x229ebe44
-+	0x568c37d6	0xa3eb78b7	0x6f06f502	0x1b183db2
-+	0xd48e4d35	0x4fb23b3d	0x57d7dc0b	0x3d34b427
-+	0x0415552f	0x1bbe91d1	0x74e7ecf8	0xb1fdc30e
-+	0x466a69f5	0xfddf86b3	0xfb61fd48	0xae250961
-+	0x6a99bcec	0x2142c5c8	0x1c08d4ea	0xe8f849c2
-+	0xa3cb1614	0x43ac8702	0x22b50659	0x92dc3644
-+	0x7a40a305	0x4a1e0780	0xfb638be0	0xb0912795
-+	0x522a688e	0x1133c55d	0x0544a27b	0x3c56a574
-+	0x748502e1	0xaee58228	0x30ae0736	0x41a029ad
-+	0xa1e3d0e1	0xa9b66582	0x6ec07231	0xda4dba0d
-+	0x41db8fa0	0x731529eb	0x87f679d3	0x593d1579
-+	0x10935a3c	0x793d7b44	0xac680a86	0x1d01ec27
-+	0x6d669681	0xef056753	0x96aab271	0xae070e5f
-+	0x3321dc26	0xa5ea33a2	0xf8f14406	0xdc755c9d
-+	0x7f8e3210	0xc2fd90cd	0x34c102d7	0xe1c744a7
-+	0xa79f623f	0x07507959	0x34d28c67	0x26cbff85
-+	0xfa24075b	0x618dcdfc	0x64d52c6e	0xce650b7d
-+	0xcc414394	0xadc52ceb	0x43667ed0	0xa04f518d
-+	0xe52196a2	0xbcb7e578	0x2ed0486e	0x4d669b00
-+	0xf765e153	0xd2f097df	0x4ef97542	0xfa31d688
-+	0x1698d42e	0x3d828d65	0x222355aa	0xf2c37eb2
-+	0x3da4052b	0x198577ae	0x819590ff	0x5ab919a5
-+	0x673d5552	0xd2fa9d52	0xb711b72c	0xabd9c188
-+	0xb73a4ce5	0x2d20447b	0x3d19d4c4	0x4bbe86d0
-+	0xd205021c	0xe9875ec2	0x8dcb01f3	0x6e109fec
-+	0x60a3a693	0x2fb6b975	0x0ed26de1	0x7487f920
-+	0x83092880	0x4d5fcb5d	0x72b047d0	0xa256dcdd
-+	0xfef28251	0x41e36ee6	0xd91e2c20	0x7698357b
-+	0xb3684b1a	0x272311be	0x32860f75	0x44a6cc61
-+	0x63e3f66f	0x5a1497b7	0xeddf5a57	0xcdd4577c
-+	0x3cc63cd3	0xf7e72773	0x3fc9bb40	0x97ce4118
-+	0x1438da68	0x7a32210b	0x2aa07598	0x04e858ca
-+	0x850e0082	0x0b0f78d1	0xb178c391	0x9a2e231e
-+	0xa8f3b67b	0x2a08ea99	0x340d101b	0x42973ffa
-+	0x755ae5cf	0x201213c4	0x445e44f7	0x15a872c8
-+	0x857b94f3	0x24c023ab	0xb203df2a	0xc4711de8
-+	0xd1faaeea	0x1eb857b6	0x8c1b712b	0x11ad0f2a
-+	0xc64cf474	0xff6c128c	0xff13eac3	0xc4952e8f
-+	0xacdac9d1	0xb8c2f092	0x38d50a33	0xaeec4534
-+	0xa661a7ee	0x4d19a2bd	0x0f2d95e4	0x9a221827
-+	0xc9fe071f	0xe53486d7	0x1dc5426c	0x848eea4c
-+	0x607f616b	0x41a301f6	0xeadc389c	0x1f109048
-+	0x249f14da	0x2a20d362	0x7c93cd00	0x7ca633e8
-+	0xe50fb5a4	0xace8f92f	0x49638c89	0x478b4371
-+	0x60d70e8b	0x0bfb8bfb	0x6cac803d	0x702996e4
-+	0x15a35d2c	0xd68a2d93	0xe025d5ee	0xd8ca8c86
-+	0x295393d3	0xce1be3f8	0x0ee6bd15	0xd6735f38
-+	0x311495e6	0x7eb8bc83	0xea53551f	0x4fa9a90d
-+	0xe16a9ea0	0x651eb233	0x95f0afec	0xc687ed29
-+	0x0cd3abc8	0x132bb8b4	0xd70dadd3	0x538e630a
-+	0x98481e4c	0x0d7e6f1b	0x3986b2de	0xbe0924dd
-+	0x1d14608e	0x189f553e	0x7a6b7786	0x48bae520
-+	0xed56a3cf	0x795b4c6f	0x8670597a	0x40eb02ab
-+	0xf9b0b287	0xec9f86c3	0xe9a8c3a1	0xe6860542
-+	0x387ad930	0x8676e402	0x633f0709	0xd661d134
-+	0x011c1396	0xabf1f3f5	0x3fd76128	0x7be75289
-+	0xa6046e69	0xf3713680	0xa2ed30c5	0x893df28d
-+	0x197b8543	0x9860bef6	0xf6930c5c	0x6c0c379b
-+	0x0b0026e1	0x3ca86896	0xa7ea0bdc	0xca94413f
-+	0x6cbe8d16	0xd3e4edf9	0xb06efcef	0x3a8934c6
-+	0x00195592	0xa978bf0c	0x7435b0d1	0x3b17d97c
-+	0x0438684e	0x576ced8e	0x648683fc	0x362a8a87
-+	0x493fd86f	0x6bbe0476	0x16f74de4	0xbfeaaba8
-+	0xe6b90728	0xdc252878	0xe0b72eac	0x0872f52c
-+	0x2bab1521	0xa6c0d894	0x9f2b3726	0xd392e334
-+	0x785f82ce	0x15bba4af	0xb55cd743	0x6e8e9cf8
-+	0x047fd2e7	0x1fdfe424	0x8d4820e5	0xce7dd8c3
-+	0x88c82282	0x31ef9a76	0x1881fc38	0x3932a9da
-+	0x65bbfefb	0xe00f33b6	0xdd0754aa	0x1f596051
-+	0x704dfd7b	0x2604be1b	0x08b6c4f5	0x3f244085
-+	0xd89c65e3	0xcc4cdb71	0x143a2681	0x1bd3d004
-+	0x009460ff	0x86e314a5	0xb1aff86f	0xaa2599df
-+	0xbf68de69	0x355c8267	0x9588dbed	0xe47edd9b
-+	0x266b2ddd	0x129b0b01	0x6e6622a6	0xb3ea4a00
-+	0x802abd6b	0x7a268c1d	0x9f5a7b41	0x6f4aba0e
-+	0xe279b988	0x660ef08f	0xf4207beb	0xfa0168f6
-+	0x93266ea0	0xedfef092	0x302b5e5f	0x7278d2be
-+	0x58a494ab	0x8f53a302	0xf5e766de	0x1ef717bf
-+	0x45e2d6fd	0xf593b066	0xaea0f1e1	0x1bd1e027
-+	0xf853ba21	0x1127c5c4	0x8aa43b18	0xf1fba0b8
-+	0xe1cfb0b8	0xa9f9fef6	0x1320f1ab	0x5f7dfc74
-+	0x30f11ab4	0xaf47a3cc	0x9c190830	0xac085edb
-+	0x8b4db7c8	0x771ec065	0x6d5f3c3f	0xb8815437
-+	0x20d3c99c	0x00823c74	0x24d63cae	0x7587e453
-+	0x1a3fd67b	0xa5b361cd	0x789d168b	0x98a93943
-+	0xd7505c0a	0xa923b38d	0x46097a4f	0x814e41dc
-+	0x0f50f2de	0xbb548368	0xc48273d4	0xf27b6798
-+	0x9a6b5231	0x68491e7b	0x3f482179	0x89ea3b35
-+	0xa7525ffd	0xf8f1f616	0x07859572	0x738cb4b3
-+	0x8937c6dd	0xf5988c71	0x4874905e	0x677a8c17
-+	0xd58df987	0xc4210078	0xe6b1c480	0x7a91e14d
-+	0xa1228a7a	0x09057467	0x6cd59ec7	0x6ba93248
-+	0xb8e263cb	0xd3305730	0xaec36ee6	0xc773d0b5
-+	0x2895f8ec	0x6c9f5fb5	0xd32a21a5	0xcea9d058
-+	0xfa97282f	0x5559ceb4	0x5a0bf57c	0xf3cd99b5
-+	0x2771f6c4	0xfcc9a35d	0x5143417e	0x7c6f9db7
-+	0xb47cb7df	0xe7dde37b	0x70a07531	0xe25e06a2
-+	0x3bbb7d30	0xaf41b085	0xe664f973	0xee2c7ab7
-+	0xef8eb1b5	0xfba67f7d	0xd71568dc	0xbbff3339
-+	0xdf49725d	0xbc0e7edc	0x5361e6d3	0xb0978c73
-+	0x1320540a	0xa9843a06	0x34099c74	0x4bdddd23
-+	0x18680496	0x44f9cc19	0x6de71a34	0xe4eae858
-+	0x3349a819	0x28400571	0x10a55fe9	0x05672399
-+	0xb376eadd	0xed4b1a35	0xe79d0a4f	0xca8d0601
-+	0x78a7b066	0x8ea59a40	0x7be112a2	0xe99ea438
-+	0x44bd9efa	0x6e5227a1	0x70325aef	0x777282e9
-+	0xb579c189	0x4ee92bc9	0x0d0236dd	0xb57cf232
-+	0xb815e184	0xd05823e4	0x0c9490b8	0x70a5fa56
-+	0xdf0f178a	0x99d27374	0x1aba9e05	0x18378c3d
-+	0x86991118	0x3a199a70	0x90b2a2cf	0x67a6923b
-+	0x0975e5f2	0xf50fb0a3	0xbffbd67a	0xce6371e7
-+	0x203564ef	0xb1d7a395	0x201cb1c4	0x30085e3c
-+	0xfb2c66b4	0xf80ae969	0x1d407625	0x0bca1a0f
-+	0xb62c078f	0x83efbf38	0xbd7b0a69	0x7d9bb66a
-+	0x46b5c885	0xb256d753	0x0b5d008e	0x1756d5bf
-+	0xa9ffdaf6	0x01231fcb	0x8c69e461	0xbb2ad661
-+	0x29dee8f7	0xf1f23d56	0xd5e90ffa	0x48d9d93e
-+	0x77b26e95	0x49c47953	0x7565da8e	0x41a6124a
-+	0xfce69643	0x55f99554	0xa5501d6e	0x5738b726
-+	0x4c989c96	0x93cbe27e	0x20ff3d38	0xf4787a09
-+	0xfa3520e4	0x26b2dc11	0xb701c94b	0xcd8857ee
-+	0xb4b07229	0x0bbcf1a7	0x3d31cd32	0x08ced413
-+	0x3da04c1d	0x7bdf1787	0x344f510d	0x53a02e8e
-+	0x7e295418	0xa5ed24b3	0x3a5a2c98	0x34947e44
-+	0xb398bfcb	0x7c0ea498	0x18db3289	0xec646beb
-+	0x2e8ed766	0x5aff9ee3	0x497dc7fa	0xa70c3be4
-+	0xfc9306c4	0x729f532c	0xd87d61d0	0x635fadbd
-+	0x1efb1234	0x66fdb543	0xf5b86d07	0x3a4836fd
-+	0x9caf7dd3	0x8a9d9e5b	0x179529ac	0xa9a3fee8
-+	0x4cfa4495	0x791b8b7a	0xc503fc2b	0x1e07d0e5
-+	0x0561cfae	0xb5e7c403	0x0809744a	0xea84c654
-+	0x23614fd6	0x23ae773f	0x545be2c5	0x3585b8b4
-+	0xcad8b6ed	0x088a56c0	0x81054caf	0xecb13d9f
-+	0x44bd49f7	0x90a3da4a	0xf4b04300	0x32a2b69f
-+	0x44bed501	0x85cb54ef	0x85dde589	0xe410132b
-+	0x1c2e41c7	0x3d28cc9b	0x4df948de	0xaa058c37
-+	0xb82cf615	0xfa0574f8	0xd0391f5d	0xfb2b98b3
-+	0x3ce5585d	0x80ca4d6a	0x4b138f75	0x721ccc65
-+	0x496a3e37	0x4a8dd025	0x2d77b3db	0x65800ff3
-+	0x1d2df03e	0xb4b12a59	0x4c6a5b9b	0x17413fda
-+	0x4e938a09	0x7e3aa03a	0xf86cc8f3	0x972cd7b7
-+	0x871849b1	0x0c0879d2	0xc7c652a9	0xe9531ae1
-+	0x541142d9	0x4f731afa	0x9c43e538	0x866b695d
-+	0x4a4c4076	0x1e8aa293	0x51bc1eaa	0x5f57d28a
-+	0x142eb7f5	0x14096954	0xae0e9eb3	0xef732983
-+	0x70187474	0x3569b88a	0xfd3a3c61	0x54f0e2d0
-+	0x7afff032	0xa89cd23d	0x658114ec	0x434ccbc9
-+	0xc25f33c7	0x1b6e9a7a	0xd97bd017	0x3b7489d7
-+	0x67129c97	0x333ee180	0x04bf73ae	0x4731105f
-+	0x09d589f9	0x7d5a67a3	0x3e8fcb8c	0x2090c536
-+	0x14a623c0	0x21a247fb	0xe117bbe6	0xe98bbd1c
-+	0x09e23674	0x02f09f22	0xba7f9f45	0xd18573b6
-+	0xa6eb18fb	0xe01a7904	0xa8869f58	0x82ec81ee
-+	0xf4549f1a	0xfa0f6085	0x1cf809e9	0xe603d078
-+	0x13525306	0xd5611c7a	0x2c92b32b	0x5fdc0c0a
-+	0x0b3aaced	0xa40059b7	0x27c42499	0xcc619db5
-+	0x9f9b7841	0xfdca5eb2	0x2d3e833a	0x2830a6a0
-+	0x4c81f3b0	0x3ec8a8bd	0x50b95605	0x33a9d515
-+	0x7fe14795	0x4ff1d83d	0xef92fbfe	0x87f4faed
-+	0x35d5fc69	0xd8764a49	0xec81abfe	0x634a2ed8
-+	0x9635825a	0x0943624c	0x5eea8464	0x578e2344
-+	0x551bd5af	0xca02915b	0xea419d8c	0x9d0fa00e
-+	0xf3633f48	0xc6ad62ae	0x1eeef6ab	0x21ab106a
-+	0xe325954d	0x60457916	0x6ac9168c	0xea8a9d6f
-+	0x14772361	0x7630452f	0x8795e1de	0x21144d8d
-+	0xe7996dd2	0x45aff64a	0xfa62c37f	0x3f5a04cf
-+	0x250f988b	0x7985d243	0x1f717008	0x7908d22f
-+	0x4fc0d5d5	0x856d9819	0xccfab84e	0x3fec2a74
-+	0xe75c1af6	0xe2682ac3	0x2f08e560	0x7133d2a0
-+	0x63e5fcca	0x3a17438f	0x9cb826c8	0x06a2f3cd
-+	0x4bac2001	0x50596ba4	0xe74758d4	0x64d17e0a
-+	0x08fc5b67	0xb0d62f6e	0x95eb8e15	0xd51bfa64
-+	0x421c68b9	0xdd1526a8	0xfb7ea10e	0xab21193a
-+	0x4b1186dc	0x77bbfd82	0x1ab08e9f	0x871659a5
-+	0x1658fd5f	0xa04f322d	0xf50ed273	0xb8d411a7
-+	0x8056489c	0xfbd858ae	0xd70f7d88	0x3c5cbc78
-+	0xf53ec2be	0x1d2228e2	0x8b53aace	0x212454d9
-+	0x76ea1d2e	0x9ca66373	0x9f6679c2	0x51c48b56
-+	0x47348811	0x8abc0a27	0x60050980	0x5d290483
-+	0x7ea8504f	0xde186466	0x91219d4c	0xa73144ed
-+	0xb5f36fa4	0xa37912b8	0x02625bd3	0x3bc2d9ed
-+	0x2e623844	0xa9a751af	0xf0ba18af	0x4433e06e
-+	0xca7cda24	0x686c9163	0x86a437c1	0xf8c17120
-+	0xed50542e	0x62b61fa1	0x600e47b6	0xdff86df8
-+	0x77502dd5	0xea5d75ac	0x095a06e4	0xa18efafd
-+	0xfbd01eaa	0x27a1cb0a	0x3dfcab8e	0x07be7250
-+	0x086cb680	0x2c1ddcf4	0x6fa79784	0xcd874edb
-+	0xa383d520	0xa5c0d1cd	0x2e09cd9a	0x34d645c4
-+	0xf6b9b98d	0xe8e80ab0	0x39b78c60	0x6098b6f2
-+	0xc3c13e53	0x88c9fd83	0x60c9e766	0xf49c4c2d
-+	0x79e3d3d3	0xbfade7d5	0x6ba57dc1	0x3069e3ad
-+	0x59632e2b	0xb86e871e	0x2dd63287	0x9704b283
-+	0x343a6cb3	0x37d7950d	0x283f262d	0xd49d5f75
-+	0xdacc49b7	0x5952e045	0xc0fefa19	0x69effce3
-+	0x5b2a3c0b	0x3757339f	0x18584f8a	0x77a80760
-+	0x5fcdadc0	0xc9b4df80	0xfa521be0	0xbcfc8ecb
-+	0xfd3f8eb8	0xbee4739a	0x139caf94	0xbdea1cd7
-+	0xab158240	0x233fd8dc	0x8ec63274	0x34eee6d8
-+	0x4603b2f8	0xae544fc5	0xcd444551	0x2b2b349a
-+	0x0a562524	0xb2e02518	0x577b1125	0x8b3c1ff9
-+	0xfd27d88c	0x2ad77d04	0x1f82a54e	0x20254fdc
-+	0xee8e63cf	0x8df3fa2f	0x9ffc7c43	0x421ae12f
-+	0x9b166441	0xb74a5a4f	0xdad0511e	0x0a8ee5e9
-+	0x8fe86041	0x37ef90ea	0x3fcf8380	0x87288691
-+	0x384b8b8a	0x98d8a45f	0x995443d7	0x6c617236
-+	0x9a40f76f	0x9f30733f	0xfdbf3927	0x7b4c0281
-+	0x9e87e64f	0x9802938c	0x65f9de31	0x829c3eda
-+	0x0a1d2f4a	0x22e0e854	0x30045b70	0xbf84a44f
-+	0xc2c30b57	0x47c5ff90	0xaea87e93	0x99c69ae5
-+	0x1080e89f	0xc2896e80	0x09ba0cb2	0xd16ee263
-+	0xe05337b0	0xef1d8359	0xc1d4b102	0x08620117
-+	0x2e4ab2bf	0x05dc3af8	0xc7ab866b	0xeee05983
-+	0xd0a00c19	0x96996791	0x75ac6042	0x29001ada
-+	0x13440a23	0x2b1eca42	0x4cddfd68	0x81a98384
-+	0x6bcda226	0xa8594443	0x92f26e53	0x434de4ec
-+	0x07596ee2	0x4c8ea6ed	0x5596054d	0xaffe0ef4
-+	0x6dc1ab64	0x20bc006b	0xad4e3933	0xe6df0d3f
-+	0xfb3ca9ee	0xc2895a4e	0x8fed0d43	0xa5ed7985
-+	0xc364f083	0xc397a806	0x7b651ff9	0x1d7e22e5
-+	0xfd02f57d	0x5f16a429	0x8612177a	0xd36b8983
-+	0xd87b0303	0xeaa632b0	0x57dff2b2	0x19772dd0
-+	0x51317bfc	0x28404b1f	0x9e35d818	0x9c771bb7
-+	0x6d42a5c1	0xa6030578	0x9c844d5f	0x95d5eb7f
-+	0xdf15f5ec	0xf0f8c86e	0xf8ebfd20	0xae32d9b5
-+	0x4ce2b066	0x776f0149	0xda8a429f	0x0e895a79
-+	0xbe62c881	0xf9c051d8	0xcaa48f97	0x9e8dcb1b
-+	0x69cafc21	0x411f1bff	0x4f4d71dd	0x102cf709
-+	0x974ebe53	0x7373aea6	0xef2a7ec1	0xedabaccc
-+	0xdac969c4	0xe010b562	0xb6880570	0xa7a7f5d4
-+	0x3c6464f2	0x96dea774	0x1614a588	0x06074080
-+	0xb37304f0	0x99da7dda	0xd3e36214	0xb27b7cae
-+	0xb4cef0b3	0xa435dc77	0x9d1c1a15	0x616993f4
-+	0xb8a5ec8f	0xdce1ff5a	0xaaea14c4	0xa5d2172f
-+	0x90c8c636	0x49c0b81e	0xff9db895	0x4252b336
-+	0xd420b5ce	0x87b35be4	0xae32bda2	0x441092d9
-+	0x321e8583	0x7d863719	0x3c888147	0x3f2bb9f6
-+	0xd1daf5f1	0x682f2ffe	0xae62e280	0xcf8f928a
-+	0x4a7237f5	0x6f3a55af	0xb91dba98	0x9b83b723
-+	0x0e857ed8	0xd5ac567d	0xaf8bf791	0x23f8269a
-+	0xe369638f	0x6a88edb1	0x5ff0be07	0x5c02b513
-+	0x7d22f89e	0x2f865c08	0x9cc0d56e	0x31c87205
-+	0x420508f2	0x95a21602	0x04d838e3	0x353353e8
-+	0x7ca1feb6	0x61c6f7dc	0xf78a68eb	0x918f2ac1
-+	0x413037a4	0x09692d1c	0xc8eceb54	0xb1bf975a
-+	0x2ab63552	0x467bceeb	0x408bf024	0xeaed2b31
-+	0x3255158b	0x8d9c6617	0xe450350f	0x615cf5f3
-+	0x1a7fd744	0x27a0da59	0x43298211	0x77392298
-+	0x9511e81a	0x08a2c2dc	0x3d6f1113	0x967e6586
-+	0xd1726b35	0xb9292da6	0xaa6f8ad4	0x0f13b47f
-+	0x34b96cea	0xebd9487d	0xfe533d60	0x41bcdc60
-+	0x364c8c79	0x32be8bb8	0x1395ead9	0x9e85e474
-+	0x146b6fbc	0xc93267cf	0xcdda98d4	0xccfb2835
-+	0xe779dbd5	0xf9288237	0x2073e129	0x16fe4ab8
-+	0x34ca576d	0xac313eb7	0x5deb3b4d	0x1727510b
-+	0xc168a414	0x332cd921	0xe38e8123	0x9a2c1aef
-+	0x80f5d1d9	0x7c88c923	0x8af17577	0x59ae1408
-+	0xffa5e565	0xb418ab13	0xdd6376aa	0x45cd70d9
-+	0x3c3a06a2	0xbc555669	0x34d1fc08	0xc2aa934a
-+	0x385416e2	0x91ceeadb	0xe06c9cef	0x0394dbd4
-+	0x43e7c657	0x296d7621	0x55dafcba	0x808b836b
-+	0x61c41f0c	0xd9689bc5	0x3a531ffd	0x8417ed30
-+	0x3f3f8616	0x641eb4a9	0x24964006	0xe8d2612a
-+	0x3b916d7c	0x5603319f	0x29007523	0xc9c7dc1c
-+	0xd1f7212e	0x22ac1932	0x05c39a5a	0xd55081ce
-+	0x589ae996	0xa998fcbe	0xd8df5512	0xef7d7a01
-+	>;
-diff -ruN u-boot-2015.01-rc3/arch/x86/dts/microcode/m12306a9_0000001b.dtsi u-boot/arch/x86/dts/microcode/m12306a9_0000001b.dtsi
---- u-boot-2015.01-rc3/arch/x86/dts/microcode/m12306a9_0000001b.dtsi	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/dts/microcode/m12306a9_0000001b.dtsi	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,814 @@
-+/*
-+ * Copyright (c) <1995-2014>, Intel Corporation.
-+ * All rights reserved.
-+ * Redistribution. Redistribution and use in binary form, without modification, are
-+ * permitted provided that the following conditions are met:
-+ *	.Redistributions must reproduce the above copyright notice and the following
-+ * disclaimer in the documentation and/or other materials provided with the
-+ * distribution.
-+ *	.Neither the name of Intel Corporation nor the names of its suppliers may be used
-+ * to endorse or promote products derived from this software without specific prior
-+ * written permission.
-+ *	.No reverse engineering, decompilation, or disassembly of this software is
-+ * permitted.
-+ *	."Binary form" includes any format commonly used for electronic conveyance
-+ * which is a reversible, bit-exact translation of binary representation to ASCII or
-+ * ISO text, for example, "uuencode."
-+ * DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
-+ * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
-+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
-+ * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-+ * ---
-+ * This is a device tree fragment. Use #include to add these properties to a
-+ * node.
-+ */
-+
-+compatible = "intel,microcode";
-+intel,header-version = <1>;
-+intel,update-revision = <0x1b>;
-+intel,date-code = <0x5292014>;
-+intel,processor-signature = <0x306a9>;
-+intel,checksum = <0x579ae07a>;
-+intel,loader-revision = <1>;
-+intel,processor-flags = <0x12>;
-+
-+/* The first 48-bytes are the public header which repeats the above data */
-+data = <
-+	0x01000000	0x1b000000	0x14202905	0xa9060300
-+	0x7ae09a57	0x01000000	0x12000000	0xd02f0000
-+	0x00300000	0x00000000	0x00000000	0x00000000
-+	0x00000000	0xa1000000	0x01000200	0x1b000000
-+	0x00000000	0x00000000	0x16051420	0x610b0000
-+	0x01000000	0xa9060300	0x00000000	0x00000000
-+	0x00000000	0x00000000	0x00000000	0x00000000
-+	0x00000000	0x00000000	0x00000000	0x00000000
-+	0x00000000	0x00000000	0x00000000	0x00000000
-+	0xc2b13ad8	0x6ce74fea	0xd364ad12	0xf6404a69
-+	0xc89041e4	0x217fa2f6	0x6ff6e43f	0x79cde4eb
-+	0xdb01345a	0xceecca42	0x5ee7d8b4	0x24afdbe6
-+	0x5fb36178	0xbc17d76b	0x31b7b923	0xc81aec82
-+	0x647b3320	0xf1db9653	0xff3b9759	0xe9c74b72
-+	0x3b193752	0xc147860b	0x160e0d6a	0x5bdb9dbf
-+	0x1ccce2ac	0x387670ad	0x2f106f05	0xf8607ea3
-+	0x42562576	0x30e086fb	0x409a06b8	0xf1957736
-+	0x5eb03f65	0xad147fab	0xe1a8e8b6	0x208d59d2
-+	0x683fba2e	0xf172b378	0xf8138dba	0x61e81d1f
-+	0xd551f997	0x28c79780	0x04f9db27	0xa80679b9
-+	0xaca4e7ff	0x6876944b	0x26d7dbc1	0x77f7dc2a
-+	0xf0bcb163	0x1b2a8e81	0x7b90aa49	0x8d5eaf2f
-+	0x522384ae	0xae7f7082	0x412ba10a	0x1ce1baa0
-+	0x478c29b4	0x9c09b4d2	0xf225f64f	0xd43026cd
-+	0x81098579	0x7df5db05	0xa5815bb0	0xc73ee756
-+	0x9738cb95	0xa5bd62e2	0x88e2c6b2	0x778e7fcb
-+	0xd3bdb872	0x9404403f	0x5be6ad63	0x71dc4abc
-+	0x11000000	0xd350099c	0x242d0996	0x1a4ddff8
-+	0xd7f1f03b	0x77590eb8	0x45c3ad79	0x3b714d23
-+	0xa85ba322	0x31851c5a	0x540fe0ce	0x38692bd6
-+	0xe3d9927b	0xb33428b5	0xcf0ac8d2	0xd3646604
-+	0xca88adc7	0x8afc41c8	0x721432b3	0x8fd19454
-+	0x26344e0d	0x3acf6c28	0xbda18c21	0x526d52ac
-+	0xf8d37e15	0x09305e37	0xf6907871	0xdb56cc21
-+	0x6802cccc	0x6693c8a3	0x0f4dbe32	0x0d924103
-+	0xee9242a7	0x5f867a13	0x2f65a246	0x6b35ad05
-+	0x39fb7da1	0xd69cb7d8	0x45869424	0x4768b466
-+	0xe3ace365	0xa85eea7c	0xa59939d9	0x2ae32fb9
-+	0xa20b1559	0x8865f3d3	0xbe02e023	0x4199575b
-+	0x0c43089a	0x0d57b287	0xd37544ad	0xcd4573b4
-+	0xa96b7485	0x05b67259	0x117414ca	0x2ba24577
-+	0x439db14d	0xf82c5833	0x54ec9806	0xf8282306
-+	0x1de7d3cf	0xf7a76dc2	0xcd897f60	0x0bb1decd
-+	0xae58efb0	0x743c07af	0x48adffb5	0x262260e7
-+	0xaa9fa071	0x9a9ef7c0	0x98e861eb	0x14a48871
-+	0x0b4c3292	0xad851820	0xe0f7f45c	0xd71366c5
-+	0xc63a2f01	0xd02f23c6	0x49645eb3	0x2365fe48
-+	0x44817f1f	0x576ee68e	0x396b6134	0xd9fc4857
-+	0x9a771368	0xda5f2693	0x6ad30ec2	0xc8d08171
-+	0xe40bcd42	0xf82291a8	0x3094a8b1	0xd3edffa3
-+	0x5d5fb5e6	0x93802a7e	0xdf0ff376	0x09ebeae6
-+	0x35091690	0xe938ec68	0xd203065b	0xcf2e8172
-+	0x85282b27	0xe59fb64d	0x4b2ad981	0xeb5dde75
-+	0xc07eac26	0xa78c969e	0x74165d84	0x61c4cfc8
-+	0x740452f3	0xe5f6435e	0xb712e157	0xac49215d
-+	0x5be5e61b	0x09f46a94	0xde5cd48d	0xe3ed6b11
-+	0x2e8173de	0xabb6759b	0x46ffc47e	0x0cd84607
-+	0x6046c26d	0x19356116	0xe1da098e	0x8e1bbe9f
-+	0x5c8d6c20	0xa17cfe55	0x101a1f91	0xd64aef70
-+	0xef2e7b34	0xbb428dc4	0xf2252a3d	0x8ab3f6c0
-+	0x161db4ef	0xfdbf4f9c	0xb5bf9f19	0x414ea8b5
-+	0xc3db5422	0xfc3934f2	0x635a8253	0x86260b8c
-+	0xa4c0e59a	0xa45d24cd	0x4a25da59	0x7a568be1
-+	0x4ae3587e	0xbc77a3e8	0x70723657	0x9abcabaf
-+	0xe0a95d4e	0x25519f22	0x3ee1d340	0x2ddc2ca8
-+	0x04ae20c3	0xc143f7c1	0x4a79e4d6	0x19377b64
-+	0x2ab0d3f5	0xd3f19f6d	0xc8dc880e	0xf577dab6
-+	0x69b6ac46	0x37d4af3b	0x0999bc85	0x3d9fbbf5
-+	0xb9387ac9	0xc148824f	0x4d11f5f7	0x1ff4594b
-+	0x59beb5b7	0x29474f52	0x68e6b2b9	0x4b60966e
-+	0x5e40a736	0xdeff5ef2	0xe623bbc1	0x50407021
-+	0x34ec34ec	0x131b3d57	0x628bda97	0x58152b10
-+	0xdd830410	0xf953e469	0xea4c8d25	0xd79d7ba0
-+	0x7a4da4f4	0x887d6841	0x7ff1e41f	0xdeffc5dd
-+	0x8354cb26	0xb133716f	0xae73deaa	0x292e200b
-+	0x9a9400f9	0x7a5d21c3	0x590d4799	0x1333b4a3
-+	0x782bbe3f	0x314fcb2c	0x475a1cca	0x4cd07c7f
-+	0x7a69a5fe	0xaef5a52a	0x0e9957f3	0xf7d86f6b
-+	0xd0983d0b	0xdffd48b9	0xbeea1e9c	0x19de4c7a
-+	0x46487695	0x5719e4e5	0x6dab39ac	0x856bf2bb
-+	0xc0644339	0xe60e92ee	0xc328b5e5	0x2d0c31e9
-+	0xeb73f1f4	0x7b577248	0x361159ba	0xd0f7002b
-+	0x5fa816ae	0x11ace78c	0xab62e0da	0xc924891a
-+	0x1d5800e7	0x4f90e04a	0x21374c9b	0xa3350e64
-+	0xcb9c1901	0xcc350b3d	0x5c3e5932	0x3cc6261d
-+	0xc3b54acc	0x849cf200	0x1425fad1	0xb3a479d9
-+	0xfd4dfda8	0x62973133	0xdd528736	0xd7e62e0e
-+	0x6921e1d6	0x7e41d7f0	0x74397b86	0xf739079a
-+	0x4ff82d1b	0x38b6fcdc	0xb20e36bb	0x0cef9b7d
-+	0xa737fdf3	0x1d18ef1a	0xc2c5dda1	0xdb16c5e7
-+	0xbfa99b2a	0xf83f2c10	0x883c8183	0xad10014d
-+	0xcf9f6321	0x5e0c079c	0x3ddd3d29	0x306325e0
-+	0xebdaff05	0xa88741be	0x181fbf20	0xa58a3a1c
-+	0x1f7c7165	0x7f5f5141	0x12576e50	0x9db22976
-+	0xd1fbe204	0x6ca2025a	0x10c15009	0x920649fa
-+	0xf42d3035	0x79efbc73	0xad2bde6c	0xb4e317ab
-+	0x1f7358be	0x447d850f	0x9bb2d1ee	0x3545cea3
-+	0x78eff6bc	0xaa86e51f	0x6383ada5	0x0c969d05
-+	0xadd720e6	0x92f77e04	0xda58e24d	0x401bd323
-+	0xdac090fd	0x9dc372b2	0x86726956	0xc508fde7
-+	0x20ec1cf1	0x29fdb66a	0xa3f7e3b2	0x5ffa58ac
-+	0x653c0106	0xf0d01026	0x55feffa1	0x661399b6
-+	0x5b23998d	0x91add159	0xbf917f02	0x87ef6fee
-+	0x64c4d653	0xbfadf48f	0x23f3ebcd	0x67869030
-+	0x3b90b7ae	0x19efc2a4	0x26596a35	0xaaa5fcf9
-+	0x5a14fd14	0xebeb9c9f	0x72224625	0x3a2c0009
-+	0xbe5a09af	0x5aad7b74	0x7d92261a	0x8bd722bb
-+	0xfff48488	0x0379b991	0x750cdaf8	0x83d3ec67
-+	0x2f582115	0xfdeca132	0x889817f9	0x2bcccbb5
-+	0x58107ba4	0xb57e016c	0xbbc45c80	0x5f14439f
-+	0x6e71c73c	0x5e18e93f	0x43c07fca	0x6d49bc66
-+	0x6641a788	0x234f48cc	0x9e18222c	0x86efa566
-+	0x450ad39c	0xbc3ef112	0x98e7d17c	0x5334659e
-+	0x9919cb9c	0x9fb4f0c5	0x2ea90893	0xc70453a6
-+	0xe83cc486	0x454da884	0x4cba0511	0xfb83f2aa
-+	0x0cf7ec27	0x20ef41bb	0x08355d0e	0x732798dc
-+	0x1689d337	0x61bf955b	0xa10d3f79	0x05fe9c6a
-+	0x1cbbc776	0x42e00326	0xf92509f4	0x71488be8
-+	0x3d92da26	0x839acf18	0x6dae5781	0xeecfcc85
-+	0xc63c0f72	0xcd79f887	0x677dd4c5	0x167c779a
-+	0x3359b45d	0x48f974f6	0xbd7debdb	0xd57d5935
-+	0x41beb132	0x1574e273	0x417a8fb4	0x46ca9d85
-+	0x859f3434	0x7cd1675e	0x1fb4e8b2	0xc55de45b
-+	0x4be8afa5	0x193c1260	0xd4225590	0x255fb988
-+	0xde63caee	0x96108c66	0xacc2b48a	0xad2992d2
-+	0xdd4cf4ad	0x0f6f5246	0xaf20d77d	0xf1c81d1f
-+	0x0db57bac	0xbb39c168	0xb78944a1	0x4ea55714
-+	0x0bb537be	0x5824ab81	0xdb9345fe	0xab0606d4
-+	0x12a8b9c2	0x90001c30	0x12c7197e	0x603cae66
-+	0xe2cb6b47	0xab0f94ba	0x28091fbd	0xb79d112d
-+	0xc53a69b4	0x7de8c3bd	0x4aee880f	0x5a5dd399
-+	0x850105e4	0x366d8714	0x4da7971b	0xc3a0013f
-+	0xfbc2461e	0x65954a32	0x4c8f348e	0x3ddf0054
-+	0xc615725a	0x3021e167	0x4a88ec0c	0xd69c44b1
-+	0xb21cd2b1	0x08e16586	0x90f02d12	0x554afff3
-+	0x65067d72	0x8c310d6a	0xd62ab40d	0x443bda33
-+	0xb6eac5c1	0xd0cd461e	0xaf200f23	0x41fd1b8e
-+	0x84e74a66	0x15b0bc4a	0x13fb1a4e	0xb36bf139
-+	0xeeaa0c1c	0xa91d6fab	0x64c99859	0xc049d5ae
-+	0x38921c4f	0x92b2f269	0x5c867fd7	0x41bd4d62
-+	0x70009a4c	0x85a37897	0xe228af8e	0x9ef4f31e
-+	0x891bbb42	0x3c09f291	0x32c29325	0x88f9ee6c
-+	0x81a0bc38	0xfef31889	0x8d2e3f79	0xc5e405f7
-+	0xb78e4127	0x3d61f392	0x3427d259	0x9f0bb662
-+	0xfe6ffb44	0x57e1e8c2	0xd4abd164	0xd0449914
-+	0x5bd5fe60	0x873601a5	0x0b07ae28	0xf4aac893
-+	0xb9c8f9f5	0xe3a514ed	0x9da193c2	0x55ebeca0
-+	0xa9d8f9bd	0x0a37dcc7	0x3f1d9f15	0x0bc645d8
-+	0xb808085a	0xc79b0f4e	0x0286eafc	0xefc87a56
-+	0xf1225ab8	0x58ac6a9c	0x9227ea3c	0x82deed0f
-+	0xff0f8edb	0x3c29a1b6	0x6d777dae	0xbeeee7d2
-+	0x0bdca157	0xf8d9d18d	0x52fda265	0x630da310
-+	0x4f660e86	0x1c985fc0	0x68f1c993	0xf4ae63bf
-+	0x3ec5373e	0xf6a10f89	0x2b19bd61	0x8aab04b4
-+	0x75653336	0x4be6689f	0xc2631812	0xc6d386f4
-+	0x93a6268a	0x4e5851ad	0xc2b47fdd	0x5acbd226
-+	0xd2aaf25f	0xbe83081c	0xe57eb32e	0x00debc3c
-+	0xcd8d7dbe	0x7cf67994	0xba17c779	0x34c19529
-+	0x5cf29a31	0xe10b7d8e	0x7b116896	0xf702de15
-+	0x6ee2e8cd	0x2f3a12d0	0x0e2a4666	0xbc1333e7
-+	0x2b653c7f	0x36e282a5	0x0ca0544a	0x2255b148
-+	0x5e413d5b	0x0fc88547	0x81e3073f	0xbcef6576
-+	0x12b29e93	0x233bef85	0xd41790ed	0x4f4dbf15
-+	0x20dea3d6	0x25f86504	0xb13177fb	0xee626fbb
-+	0x2f7529e3	0x6157578f	0xeee068f6	0xc97c5909
-+	0x053c28cb	0x6f540d47	0x692bb599	0x7004243d
-+	0x1c5620cd	0x0ca53749	0x9d7d6a4b	0xb8e504f7
-+	0xdd138f32	0x4d2fd525	0x676904b1	0x67b90411
-+	0x6777ede4	0xc1fbe02f	0xd7eb61fe	0x1c62f909
-+	0x91cfdb29	0x293a8d72	0x4475e4dc	0xba9d955f
-+	0x5413cb0b	0x952694f7	0x3b8eede3	0x33f1f6cc
-+	0x61c2604a	0x244f8403	0x862316a5	0x2e0387fc
-+	0xb3b3c699	0x418f5b0b	0x89a49abb	0x6c325320
-+	0xa952f0c0	0x72454ccd	0xaa272d96	0xf05e80d4
-+	0x1dceb03a	0xdb00d312	0x96cbcca4	0xc87c31f7
-+	0x96b17422	0xdba12c7d	0xedaac717	0x99b1da89
-+	0x48f3e07e	0xbace3088	0x71937740	0xd754a585
-+	0x31784510	0x36d08e4c	0x4e8e2396	0x081fe566
-+	0x0cd2092c	0xec932481	0xfae11d02	0xcb3b8609
-+	0xe20559f2	0xa2330b46	0x2beec857	0x86911540
-+	0x5e8e1895	0x4f42f3cf	0x8e32bede	0x78285f4c
-+	0xaf267610	0x9dc86091	0x6adf9b99	0xfc91da24
-+	0xc987356d	0x78f260f0	0x9cc6f796	0x1d6aa013
-+	0x5f1922de	0x54d065e8	0x8a7c3cea	0x13768df3
-+	0x4e8858b2	0x712b5b8d	0x0b64c3be	0x3845ef6a
-+	0xff77b842	0x83a497a5	0x77f15aaf	0xccfc6df7
-+	0x20084d31	0xaacdde0d	0x4059b446	0xb940b3a7
-+	0x3fa88d6f	0x3162ec66	0x43cc767b	0x2a2a6916
-+	0xd0dea02d	0x5b9f11a1	0xec36c7a9	0x6d7eb6ce
-+	0x4506fc1a	0x1c3e362e	0x9e2b0f99	0x547e6ba7
-+	0x6b8169ea	0xbd89401a	0x2cf5ea6a	0x100e6249
-+	0x47ef40de	0x063a0b33	0xb1f49499	0x3026e75d
-+	0x3b6d951b	0x6212fd9a	0x5073aa23	0x9bd609b2
-+	0x760cf7bf	0xe6766d03	0xff811dac	0xa461d069
-+	0xf40e74b3	0xec113577	0xa2cf15e0	0x6f43a20a
-+	0x43f52321	0x96896eb8	0x480c1129	0x35190a4d
-+	0x29a80a08	0x8ce4dd2c	0xf4b40d21	0x2324ef9a
-+	0xf3f2b54d	0x7a0cc79e	0x3e9d973e	0x2d28dd0a
-+	0x1a5e9aae	0x5abb6fab	0x215bade0	0x39e678c3
-+	0xd6543c64	0x1652e0d4	0xca2f5303	0x0a6879bf
-+	0x24841561	0x05c559e7	0xa1ac6c48	0x3fc52191
-+	0x29527695	0xb977ce60	0x04589311	0xaff7180b
-+	0xdeb08866	0xd62d8f6a	0xa6f62306	0xfdef1235
-+	0x1946ad8d	0x1d49fa21	0xac486c1e	0x3ca80491
-+	0xba8c2a76	0x06ce9ac6	0xcbfbc465	0x675c4ada
-+	0x1eb6b108	0x27d03a7a	0x606144e6	0x2eedb163
-+	0x64d8d1b7	0xe7695fde	0x75d593a5	0xe7f00f68
-+	0xc3c45a5a	0x522c4164	0x37833c3d	0xddfda19e
-+	0xd7b9f984	0x77e6ea85	0xd148df03	0x89989155
-+	0x80fd8f07	0x3adafce3	0xf4e07aa6	0x6ea417b4
-+	0xd1732fad	0xd13cba8a	0x01729b17	0xb9e666be
-+	0x48addea4	0xffb3a560	0x4a96d730	0x0349777c
-+	0xbf355e6a	0xb5055554	0x22442c5e	0xd8bda1b4
-+	0xb0a088ab	0xef18b9a6	0x11ecc51d	0xd59247f1
-+	0xf86fe339	0x17752dba	0x0bfacac1	0xdef25155
-+	0x035b4275	0x02a3f293	0x8466a5bc	0xf376864f
-+	0x04265d7d	0xc6fc5aa3	0x36adf7ec	0x4e16af5b
-+	0xe3b28d5a	0xa49c6535	0x2b05f03b	0x46d5d914
-+	0xfcae58a0	0xda644349	0x656d72c0	0x75d47095
-+	0x302a9fad	0x4e245aaf	0xe2a3e852	0xa9b73076
-+	0x8d9a2469	0xe7c05607	0x1c17b4b3	0xc2e63302
-+	0x49fa365d	0xabf1f5dd	0xc850b090	0xdced47ac
-+	0xd60b15d7	0xb25efb14	0x33f9a3af	0xd011cc8f
-+	0xf0414eaf	0xff212e84	0x9e2fbd61	0xf6636285
-+	0xd892696a	0x6d9ffc34	0x253ad380	0xffb7ed45
-+	0xaae31520	0xadba81d1	0x7f1e41bf	0xcd7e1eb7
-+	0x9dabd0e9	0x5de91eeb	0xe9fa68ed	0x3fae0c6a
-+	0x6da21b40	0xac743c3a	0x19228523	0xf5098069
-+	0xf647fe8d	0x95666621	0xa2a3613d	0xe6278031
-+	0x6901cfe4	0x3bf132be	0xc3314ee8	0x5b8261b8
-+	0x9b724149	0xd0838d83	0xb0d05c76	0x57295707
-+	0xcb11fd8f	0xfdce9b20	0x346449b6	0xe8b44745
-+	0xc0784ff6	0xe6083a3f	0xb0b87142	0xd2df2210
-+	0x7b9dc719	0x961585df	0x359390ec	0x0d40e1f0
-+	0x56436a52	0x8ccb0d80	0x78066e70	0xcfd04ac4
-+	0xd850a6a2	0x00612831	0x19e74acb	0x5a80989e
-+	0x0d7b151c	0xca9bee4e	0x2fea9d99	0xfdd7ec3c
-+	0x3a73b4e7	0xa70068d1	0x38aff576	0x4c861c14
-+	0x2e23b093	0x0e429806	0x8cce23dd	0xb0ce104f
-+	0x1684bf8d	0xb2756213	0xa64c594a	0xdd8ee144
-+	0xda5316cc	0x76dc877f	0xa1c5fe35	0xb5e04383
-+	0xc9e10000	0x8ac58408	0xf6d7e781	0xbda6cdc5
-+	0x81517c56	0xdee2ba90	0x3cbfc247	0x4c84887c
-+	0xa722c632	0x4767a4b3	0xe83b79a3	0x7f100150
-+	0x1074198a	0x220260db	0x1c940f4a	0x92c42619
-+	0x56dc9f64	0x1c0f7eef	0x3694f4e8	0x5b4b63d0
-+	0xe784afaf	0xcdcdb039	0xf7040a88	0x47f2d84b
-+	0x143a94b5	0xf68f4fab	0xf6640462	0x3cd6b1c1
-+	0x7fbe0e60	0x700ee673	0x030e877f	0x60779cb8
-+	0xddb6933d	0xe46f377f	0x9f9c43c9	0xce0f0d58
-+	0xe6bf42a4	0xae09f51b	0x295e8cf0	0x140df2b9
-+	0xfb04c209	0xb6d46f7b	0xa86e0c91	0x64fc624d
-+	0xa7a8760d	0xdac844b4	0xbe1491b0	0xad480684
-+	0xea874ca4	0x3535e483	0xd49365c9	0x83f2c050
-+	0x05ec206f	0x7fe3b010	0xb72aadbf	0x40b3a286
-+	0xafe395a8	0x3506d4af	0x9c4e33e7	0x0259eba9
-+	0x0daecf5c	0x264c008c	0x898bdada	0x0f3ac833
-+	0x7ef5f3f8	0x41934050	0xc3bda261	0xab624dd0
-+	0x5d93609b	0x495a5f1f	0x34119efb	0x3bfd15fd
-+	0x49255da9	0x3ab2d260	0x15ce2006	0xd466d454
-+	0x3d052ca5	0x567977cc	0x7f8b8657	0xd9b34f42
-+	0x36c65ff5	0x5f96bffb	0x2d32daf1	0xb301cf05
-+	0x933435e1	0x316fb1ae	0x48be2982	0x657c3286
-+	0x1916c189	0xa3a030b5	0xe4c7bce9	0x6a762931
-+	0x1e90df3b	0xe9084ef0	0x1236cfe1	0x7239326c
-+	0x29bd4dfe	0xaa01cc46	0x93e514ef	0x4e376f6d
-+	0x14087975	0x9cdad6f9	0x86b31bd6	0x2c206281
-+	0xe178b367	0x4943f013	0x9f97c9dd	0xe848fb0d
-+	0x7d19e49e	0xde4d9b1c	0xee7f552b	0xadea7634
-+	0x605ab7c5	0xef66b062	0xaf369aec	0x39a96463
-+	0xb39ed4e0	0xf4c38bbd	0x48565c84	0xcb4ccad7
-+	0x37b656c4	0xa5291b2c	0xba05d037	0x0027ff97
-+	0xec2034c9	0xa19abaff	0x99dd50bb	0x44bd5f0b
-+	0x8cc4193d	0xe1dca3f4	0xae2896c9	0x992105a5
-+	0x46b04aed	0x3ca454cd	0x9a0e86a3	0xfdb3702e
-+	0xf2ddfd7c	0x6b7ca41e	0xe49f2227	0x4839351f
-+	0x201f1173	0xc9af9d40	0x7942ef65	0xf35e5867
-+	0xe5358390	0x0beff1a6	0xd057a81e	0x89830387
-+	0xe496a246	0x45007e0b	0x62c34ed5	0xc2170342
-+	0xa095780e	0x00682a8d	0xfab7e24d	0x207cb6f9
-+	0x7d5c8058	0xb0164454	0xee8b6d44	0x0aa01190
-+	0x70637e84	0x1268c1cb	0xf7a1eb80	0xbe90b153
-+	0xcdc765f5	0x5841d605	0x00141f5d	0x475f8d3a
-+	0xff60a6f1	0x5f7a2e3a	0x30d3f150	0xd9a22f7e
-+	0xdded3241	0xfb05ea5e	0x4093fd88	0xb11f5a9e
-+	0xf1b36594	0xc7579059	0x7f66c5e6	0x8fdb1095
-+	0x46ff7f62	0x70925647	0x207287e3	0x6bddfe5d
-+	0x240fb596	0xc91784fd	0x28acd7f8	0x7cfbc9da
-+	0x2d6b3cc8	0xf8e9aaf5	0x489616b8	0x9ed70056
-+	0x586bca94	0x6a95971e	0xa2238b5e	0xc9a06325
-+	0xb90882a9	0xb5b3ffab	0xae4b2beb	0x5aa0ee34
-+	0x52e23123	0x9a019e1c	0x84b0f00c	0xba2cf495
-+	0xca4108dc	0x9272b0e7	0x760b209d	0x3e294274
-+	0xb8f0316a	0xb666af5b	0xcf436e91	0x365dd253
-+	0xbf11262e	0xdfa3f8ee	0xd6e0ab96	0xd8a639f8
-+	0xcba8b31f	0x58940e1a	0xa4bf5e3a	0x7f8cec5e
-+	0xb5ec87d4	0xb7924503	0xe2bff3a9	0xc7ec4445
-+	0x1e94324c	0xccf28ba8	0x2294b594	0xad297087
-+	0x18624369	0xa017851f	0xc635302f	0x802becac
-+	0xe631eaeb	0x386589dc	0x780823c4	0x7b989c1d
-+	0x94554d93	0xfc22d343	0xb8edbd0e	0x8bc08005
-+	0x998a234e	0x507d3976	0xf1f9833c	0x522a2971
-+	0x2765433f	0xe1ef356f	0xd45d5fd5	0x8d3294d3
-+	0xabcffdba	0x9b7a6338	0x2f261e1f	0x891fdbd0
-+	0x67008f6c	0x23d96866	0x057410ec	0x2f360684
-+	0x8380c618	0xc968f3ae	0x91ac868d	0xdb5cc503
-+	0xf092b320	0x73ef35c1	0x0fada995	0x56316744
-+	0xde2290fc	0x7070dee5	0xcf1cd6ab	0xf1a47253
-+	0x2c53b495	0x8952b433	0xa5b47637	0x9dfe09ae
-+	0x2fb36206	0xcb1dec3f	0xec188994	0x10407824
-+	0x91f27ffe	0xd461edb0	0xc3779ae4	0xe3f9bede
-+	0x183a107a	0x0122654f	0xe319bba5	0xe75c33cc
-+	0xc657ea24	0xe5490f98	0x653d01c7	0xce09c546
-+	0x631ea29b	0x81278443	0x0cd4dd3c	0x6b7da4ff
-+	0xacf1363c	0x563ed879	0xe8420e5b	0x43adcc25
-+	0xc6ff7dd8	0x21e26910	0xa4b4f3be	0xaea31be5
-+	0xc241c837	0x07178d5d	0x2b69f8b3	0x3bc0b4e6
-+	0x429c50c1	0xe493ba56	0x5933b099	0x237b2036
-+	0x0e807425	0xe450e510	0xd72a6007	0xc1459771
-+	0xe9b22ad9	0xb25e452b	0xeda83668	0xb00e8d93
-+	0x12b8f351	0x703ed783	0x901c6109	0x72b3e601
-+	0x099cfb54	0x7fc68f6b	0xda7f436b	0x1dd70c40
-+	0x5a57914c	0xddc3fe51	0xf1b692dc	0xe8b066bd
-+	0xaa7b0d19	0x4a593520	0xd3bb712f	0x1e1b4c0e
-+	0xe651f456	0x4fd0e108	0xdef8932f	0x3de33c3a
-+	0x4c189801	0x62c607ea	0x708e8086	0xf1b9d204
-+	0x19656d6f	0x216430e3	0xc8bab24c	0x4ea84e4f
-+	0x659f0cea	0x4e7bad1d	0x7f4d77d5	0xf6d114a2
-+	0x6d8038b8	0x8d56f1fb	0x2f015191	0x0b3770bf
-+	0xd81e40db	0xfe66c348	0xffd1d3bf	0x07021042
-+	0x8ce5e26a	0xcdaa21ca	0x1bd4b85d	0xfabd423f
-+	0xba6814e4	0xaa5fe624	0xb2591597	0x81e601e5
-+	0xf3601f5f	0xf4dbb30a	0x0950789f	0xbe9b1f70
-+	0x35faf9cf	0x9f27e299	0xf9c1075e	0x09b04ac9
-+	0x2bb3cb1e	0x8c197668	0x8dffa14f	0xda4a57de
-+	0x5e0f0a9a	0xd1521120	0x31c26430	0x46a75d9c
-+	0x6c7e1a50	0xda1db6de	0xaef50782	0xd32d301c
-+	0xa4688102	0x77c6bc1a	0x3c7e2525	0xcbd4284f
-+	0x5f493a22	0xb35abf25	0xc996f4ff	0x009f0c05
-+	0x6143581f	0x7a864557	0xd0e1d52f	0x0725f9fa
-+	0xdcc0b294	0xc3609ee2	0x75373ce8	0x1ffd4ead
-+	0x331b82b2	0xfa833542	0x43c00611	0x7ab1215a
-+	0x099bb7f3	0x1c95dc3b	0xbbfb8231	0xf62659ba
-+	0xf9cc6fbc	0x030b6f56	0x793603cb	0xe7c48d71
-+	0x9754aa20	0x41710095	0x35b92718	0xf464fca0
-+	0x4ad77ab4	0xd5582574	0xe0552ad4	0x7393e896
-+	0x34920ff9	0xd0a44180	0x2e523669	0x81d5573c
-+	0x1959ad82	0xfb153a03	0x1cfa615f	0x8b302a87
-+	0x4e4eea7e	0x21ca24c2	0x5a971dcd	0x788e063e
-+	0x2c9beb8d	0xb3b98af9	0x24079012	0xbdec8a61
-+	0xc41752df	0x8d2c0a3d	0xe960ac61	0x658cae63
-+	0x891956fa	0xd0d1a216	0xbc37b8fb	0x5e2c3009
-+	0xd600a7ad	0x47c7c30c	0x8fbd13f4	0xbae4d97c
-+	0xdd15d643	0x71440bb6	0x3fccfa22	0x1ef82308
-+	0x2c48907e	0xf6ad303e	0xc1ed250f	0x6f9204f8
-+	0x19062b0a	0xfe8ab325	0x379e8b1b	0x8116d220
-+	0xc6d4d8cc	0x624098ee	0x3e6aad4d	0xbce3ace2
-+	0xba349982	0x7439dd11	0x6ac6d240	0x9f2cf9c6
-+	0x3dff687d	0xe5b6f2c9	0xbe1645a3	0x39a39bfb
-+	0x7956d69e	0x50d22da6	0xb7e32b7a	0xf4144b4e
-+	0xb94151a5	0xee36b1b1	0xc8cd8d65	0x5e571859
-+	0x0db49c4b	0xd9d71cd9	0x4bc017ca	0xc81d5130
-+	0x0c9660c7	0xe4b12b28	0x5549e753	0x97a9fa4a
-+	0x0dac4813	0x7854b977	0x7c8cc619	0xe4166449
-+	0x020ae016	0x02448146	0xa3924345	0x1542cba9
-+	0x461583ad	0x7bf66ddd	0xaff59684	0x398b370c
-+	0x5ffbd30c	0x87900806	0x0891afff	0x7aa84ad3
-+	0x62e35158	0x995e545a	0x6ff3779d	0xa05bdc9b
-+	0x777a7e83	0x53643dc4	0xd77d4704	0x422ec993
-+	0xabd03cd1	0xcb6ad4b7	0xa94c512d	0x6562975c
-+	0x63b27747	0xecc0955d	0xd965b2b6	0xc67b64c5
-+	0xfd69b042	0xfe7314c4	0x9f807bbe	0xafaba4d7
-+	0xbd63eb72	0x811a8901	0x7ea1be4d	0x7316f0fa
-+	0xa6cf004c	0xc17d9363	0xe3fe88d2	0xe60faddc
-+	0x5d3a1b02	0x8a9f1ed3	0xebfb9234	0xbc453cf2
-+	0x190085ca	0x369a1df9	0x55721790	0xb071a9f3
-+	0x0697bfc2	0x65753b76	0x177d720f	0x1563979f
-+	0x970c4dd8	0x511aec5d	0x19878647	0xc17280ee
-+	0xe61c4188	0x7a4c0756	0xdb49157b	0x0d461f37
-+	0xcf0bc73b	0x1c6e7ac1	0x683a9e1e	0x0dd9ae7c
-+	0x72be0902	0x85a22cd8	0x8b98d2dc	0x2f3a9ff1
-+	0x4540314d	0x3a4e344f	0x3ada6bee	0x3408b829
-+	0x711ba0cb	0x0c92ae4a	0x621bc5f1	0x908043da
-+	0x8f8ac31f	0xed15f127	0x731dc6d9	0xdc6eb058
-+	0x6815eb3e	0xaca3d9e0	0xef7b5c61	0xfea2a032
-+	0xd3c76315	0x0f88f4c8	0x291b8710	0xa5ef8346
-+	0xcab00448	0x78ef9fb3	0xebf0388d	0x33f2a5da
-+	0xc41190f2	0x0cb6bcf7	0x0afe5680	0xef88d3ea
-+	0xc0e10f4d	0x7e028bfb	0x933657d9	0x6f61fcd0
-+	0x7e03e392	0x23258472	0xfb16ab16	0xfaf74a5b
-+	0x7ab0a634	0x8346df0a	0xc3c93451	0xdff93a32
-+	0x3920a816	0xc3331312	0xa6a2270c	0x10025010
-+	0xa8f4d842	0x36b96367	0x77a30dad	0xe1bd6d0c
-+	0xf3ddb722	0x9412e861	0x4e7cd927	0xef243451
-+	0x41d7258f	0x6eb34be2	0x026ef296	0x46112337
-+	0x656c8c07	0x18deff2a	0x5be15cbb	0xbaed3a53
-+	0xc795a134	0xdcb1350b	0x758b6482	0xc6cd0e88
-+	0x9be9d4f6	0x1ec7c2da	0xc5c1fe49	0x3e86e8f1
-+	0x09126f9e	0x96772352	0xa4d5c70b	0xc6f1f2d6
-+	0x3c22e595	0xd5ccf006	0x48f6167e	0x415dfe21
-+	0xf49891e0	0xab4c4a7c	0xcd9b336f	0x5777d2af
-+	0x6a8ad930	0x3f47c079	0x72286c81	0x44b565fc
-+	0x5ff87a6d	0x6aad7ebe	0x66535422	0x4dfcef23
-+	0xc0ffcc8b	0x6e2cfe00	0xf1e7e1f4	0x06e46379
-+	0xce1bf7c8	0x70fec576	0xe9d0014a	0x844f7b07
-+	0xb7a27720	0x4a62dde1	0x39207994	0xe12e7ef1
-+	0x75f2152c	0xec05cfff	0xac67a90a	0xbb9f0c88
-+	0x8fe2e008	0x58e15130	0xd54c4808	0x71fc616c
-+	0x02564be1	0xf3d121e1	0x904f4a7e	0x7eaa8b70
-+	0x893d8579	0xeb94b6a0	0x4c84f056	0xebf49f0a
-+	0x2b2fb4cc	0xb6014008	0x1fe0a076	0x9e7af7eb
-+	0xc168be50	0x61653283	0x2016760c	0x57c36535
-+	0x720405de	0xb4924329	0xb1189d2c	0x9dd8f5c0
-+	0x2a5f1ab8	0x49580b2e	0xacbbd3d3	0x3261e254
-+	0x7a827ba0	0xfc91f0bc	0x2b02ba34	0x96edf03b
-+	0xfd7fd36a	0x24edb430	0xafc7e2cb	0x0a8cd505
-+	0x22ed5205	0xb42ca58f	0x24fc4009	0xf064cb61
-+	0xa564a202	0xe42a9b54	0xd2a28338	0xca1f1a5a
-+	0xbe51905d	0x9a960bd5	0x4238b656	0xfb08649e
-+	0x76c93495	0xaccc0877	0xc465148e	0xa2bc11d6
-+	0x84a54419	0x2a2ddd16	0xd9e1d2e4	0x622bbcfb
-+	0xcf0608d2	0x93a26458	0x2b666698	0x0645f585
-+	0xed3df83d	0xf6e81a41	0xce11e962	0x93c27f84
-+	0x30f41197	0x659aba68	0x57c01eea	0x2a4cc4de
-+	0xecf2f07d	0x3340329a	0x1084f771	0x9d4c351c
-+	0x32d28528	0xa3b947ae	0x78fce7f7	0x14d0290c
-+	0x7b7ac82e	0x7de381ad	0xa907d620	0xc31ae25b
-+	0x513a2723	0xd8cc3457	0x8fe676a6	0x04039d12
-+	0xdce5a5ff	0xcc0af574	0x1406d489	0x3393d517
-+	0x004cfc81	0xeffe2eba	0xf2ee0c96	0xacac4889
-+	0x6484e7d3	0xdecdce02	0x029dacc5	0x95c52292
-+	0x0dfaa257	0x7150527a	0x0b59ab84	0x3a915b26
-+	0x2624fe20	0x46309564	0x704261ba	0xdf434f92
-+	0x2eb248c1	0x26d555d7	0xc75d81f5	0xbd0185b8
-+	0xf53b1298	0x059b9353	0x7821a25e	0x4d7fe1cc
-+	0x811b5179	0xe42e22a9	0x4fb78808	0xd6841c31
-+	0xd9edb88a	0x9b433474	0x1c54ca12	0x4887f63d
-+	0xf1b21006	0x8f7761fe	0x62a15331	0x6b35788c
-+	0x4a5a9edf	0xfdee39c8	0xed95d818	0xe087b392
-+	0xcdc89907	0x5ee58605	0xd4d7290b	0x46f8d2ce
-+	0x6c9c3f65	0xd129f26e	0xd8cd5b87	0x2bc19529
-+	0x7ab5b036	0xc44a6fbf	0x76fb68b1	0x6bffe654
-+	0x482067f6	0xf8ed9d43	0xdad6bd63	0xa9ac77a2
-+	0x76e6c089	0xe24ba46c	0x420ccbe3	0xfb09b718
-+	0x83ec3694	0xf76e47d9	0x5f3a8859	0xe85f7fcd
-+	0x61f1d09a	0x35065817	0x88bf5c6b	0xfbb9f76d
-+	0x8b68fca3	0xed95dcb5	0xc2ff7cf1	0x855a2958
-+	0xf7d28d92	0xb61802f7	0xf9814028	0xac8703c5
-+	0x4ce8c7cd	0x1876cfe3	0x851c045a	0x56b3d146
-+	0xe7abf1e7	0xdc46d720	0xd1e35c3a	0x2243ff60
-+	0xc257c828	0x16513009	0xcb797d5d	0xe0f2cb11
-+	0xf7e40b66	0x721e0495	0xce72e9b7	0x32eeedcf
-+	0xf5dc5e01	0x355de93e	0xc20ad627	0x95aa436a
-+	0xe69cab2b	0x511fef1c	0x18522a80	0x203e240f
-+	0x882fb1f6	0xfed4db9a	0xa4bf7193	0x420df144
-+	0x84791341	0xdb4767a1	0x8c0b40fb	0xcfa5c5d2
-+	0x2783cad4	0xcf8dd48c	0x051037a0	0xc2994140
-+	0xaf2a0a2e	0x29619774	0xffd83edd	0x1e346b24
-+	0xb058a539	0x8118011a	0xb1722fcf	0x4f89c7b1
-+	0x0e6f2f4b	0xdb155d1d	0x21d21cf9	0x25ba315b
-+	0x7a17b541	0x3f23c32b	0x301e0881	0x9b0ad7f7
-+	0x8adfccee	0x6c2f2975	0xbc9c318d	0x8d220d3b
-+	0x33d2d0c1	0x5bc2dbf5	0xe0290856	0xedd38c75
-+	0x56642fea	0xf7f5609b	0x5bdb0058	0x511dfc07
-+	0xc6b0b515	0xeac6f4af	0x7da3a898	0x50452011
-+	0x4668042b	0x4055890e	0x7bd41459	0x9b98f96a
-+	0xc516cb64	0x15313f77	0x04f6816a	0xd622931a
-+	0xbe2be61e	0xd549a421	0x380373c2	0xabb7123d
-+	0xc54b9d3b	0x5a130630	0xafff90c4	0x50f5b4ce
-+	0x75b0ecf0	0x16078950	0x44d547f1	0x8353af66
-+	0x587bb496	0xf8f3c68a	0xd3b06119	0xef05594d
-+	0xd403c928	0xf12b06bf	0x2b78eb2d	0x7de9106d
-+	0x4966726e	0xa8b5ef1a	0x1c42a3f6	0xd55aa69b
-+	0xe409c51f	0x93533259	0xc6d9dbf5	0xb4d63a17
-+	0xaaf73aaa	0xe485f5d5	0x753f0d34	0x1a3e6dde
-+	0x41183e36	0x2ec20e27	0x6b66bead	0xfc5f1d42
-+	0xfecdf91f	0xb7066b78	0x8ed6da1c	0xbbeb87d7
-+	0x8a72de9b	0x1e0e2f97	0xc377f532	0xedbdeb81
-+	0x0f5b9e33	0x6ae7ebf2	0xca7440df	0xe9c3eefd
-+	0x4bd50433	0xc25a6b95	0x9d2bd1e2	0x70709639
-+	0x9050c202	0x7cbd2f1d	0x41443fa5	0x63dd89b1
-+	0xb2607a0e	0x88c1417d	0x1631dbb0	0x13508ae3
-+	0x4e78d90c	0x19811ae0	0x4bc827fb	0x459a55aa
-+	0x52c0fd8d	0x8359500c	0x6a886312	0xbe704e33
-+	0x441b7c24	0x5121c79c	0x86066830	0x1a0d013f
-+	0xe78bfa0b	0x3f9e3ffc	0x7b3abb16	0xfc24b9ee
-+	0x4f543a26	0x0619ad49	0x6a20077e	0xc8191371
-+	0xd1d2876f	0x8b83645d	0x48330de1	0xe132ea1a
-+	0xdc077f5a	0xfd14dd79	0xf606c198	0xec47c478
-+	0x17c3f14f	0x334fd708	0xe39cf072	0x39f543c2
-+	0xebab93a2	0xf7febed4	0x79971f6b	0x888858d4
-+	0xdfd11199	0xafe72dfa	0x13f30ff8	0x6141ada3
-+	0x5fe75eb0	0x75dcecd6	0x70fb1b33	0x073f9823
-+	0x7afb726d	0x04b10ea5	0x6c881a5b	0x945a5c69
-+	0x2ecb950a	0xb384f045	0xe5eb9ac8	0xa46dfd3b
-+	0xb8185584	0xc095b417	0x86173c80	0x6a509180
-+	0x4eddcc32	0xf408ac80	0x0833ae99	0x58ca79b2
-+	0x2eac5d79	0x85c2deb7	0x400e6a01	0xdc6caa56
-+	0x706176e7	0xa5dadc8f	0x0d4969de	0x259553d9
-+	0x52425195	0x7d074da3	0x784ef596	0x8580e28c
-+	0xbaa52874	0x71abf00e	0x8434cb32	0xc3a8ffe2
-+	0x6ec52581	0xa4cd744f	0xd5820757	0x7e257e4d
-+	0xb7428f60	0xb55fd824	0xd454c529	0x8de72e07
-+	0xf84abcb4	0x30b7c926	0x5140a1d2	0x4e9550c6
-+	0x18826ed6	0xf561a8eb	0x28c7cde6	0xe91022ea
-+	0x73cdc0ef	0x32bea752	0xc7a0138d	0xa0af6cd3
-+	0x52c4736d	0x0b459241	0x2156a8d8	0x0d32a2ad
-+	0x49bb6600	0x8752c2bd	0x45d0a0ec	0xc89f9bc3
-+	0x76d775a6	0x963f0a6b	0xb5d100fc	0x2731528b
-+	0x2719d1a1	0x2b201af5	0xc337ea7b	0x70ce1c8f
-+	0x8cb21437	0x9869038c	0x53e9458e	0x624904e5
-+	0xcb7cdad7	0x13b9bba7	0xc66ec1ae	0x86bbb14d
-+	0x018c25ad	0x88573452	0x4165b4bd	0xa719f640
-+	0xd4b8227a	0xdace857f	0x701c449e	0xa835c09e
-+	0xef8e4608	0x72ec0d91	0xe88703ac	0xb6470c3d
-+	0x0cae0aff	0xae650f6c	0x384c382e	0x5d4b6275
-+	0x6691c449	0xfba67785	0xe3a5b7b7	0xfb72c85e
-+	0x09056be6	0x15e28bd0	0xb6be7e9e	0xd97fac13
-+	0x1e6023bc	0x0f28cfbd	0x840eeee5	0xd208ac51
-+	0x12b36d98	0xd28885de	0x108c3e86	0xff2ae965
-+	0x09b446c4	0xe453ba28	0x42c997ac	0x880e22f3
-+	0x0eeee913	0x5a0c9803	0xf080f33c	0x47e99f76
-+	0xa62e02f6	0x38283513	0x5ecad92f	0xaef2a1eb
-+	0xa5cdc2c5	0xd5e6ae58	0x03dbffd9	0xc24ddb4f
-+	0xaaeecc9d	0xdbeb2dfc	0xfda7e5a0	0x8e537029
-+	0x8ae38058	0xfce24682	0xcdd46b74	0x0cc2b384
-+	0x89cd2e8b	0xe955abd6	0x82c64f39	0x716c7713
-+	0x70dbaa6c	0x271b7a9c	0x332e6234	0x8d081fed
-+	0xb47ac8d3	0x818af259	0x6d97d09f	0x7aaca213
-+	0x2124cd22	0x70fc4cbc	0x02988745	0x29e28390
-+	0x2b11e888	0xe62b3826	0x8c6260e9	0x2b2d9036
-+	0xc3cd85c3	0x3a08e1a7	0xf406364f	0x6ff5f0d9
-+	0xc0c2a847	0x076cac4b	0x85eea1ab	0xbe6d6dbc
-+	0xdffbd36d	0xf1bb8934	0xae696cac	0xfe51475b
-+	0x6bce710a	0x83d6ff0d	0x44cb120f	0xd0c01d5a
-+	0x997f8469	0xdaad8626	0xdff160f7	0xf2954b72
-+	0xd4efa312	0x07035ee6	0x03e8dbb0	0x5a33d382
-+	0xc6527dc6	0x0b7391a3	0xfe568e01	0x24c28c70
-+	0x76e65ea0	0xeafaf171	0x1ab4ebfa	0x4ff66462
-+	0xc9949824	0x776d25fe	0x3689d8f9	0x1ec65a2c
-+	0x746581f5	0x227209d2	0xbff7bc69	0x91b4c927
-+	0x171c5962	0xb4dd5f85	0x72e4917a	0xd01ff1af
-+	0x9c6ba703	0xdb9d9be6	0xae1cf2c5	0x48b85c21
-+	0x9628b693	0xa8d2e2f7	0x856584db	0x1b33821e
-+	0xff5de311	0x4126d04c	0xf00ac027	0x54bdaa98
-+	0xa3dd5b0a	0xce2b2558	0xea5f50d8	0xb2e88f18
-+	0x19590981	0x6dae2c0a	0xbfd758bc	0x2897e93c
-+	0x3ba5d054	0x2d809b4c	0x3de6aa52	0xea171509
-+	0x7d8b7b44	0x19a1ad1c	0xe99b2657	0x98ac56e9
-+	0xc2150187	0x63a12506	0x4ffc1739	0x50e2ca6c
-+	0x4f2ff10c	0xb7323ff6	0x81d9f57a	0x5146beee
-+	0xa1f45456	0xf6ce5d75	0xdff7be9a	0x75ab2dc9
-+	0x5ff2901a	0xec756ab3	0x8a5e0299	0xc4e248ce
-+	0x248502e8	0xd8c62cf1	0xc7001b23	0xf7c636d2
-+	0xefbb67e1	0xec507025	0x1820ac19	0x39e1624c
-+	0x4ee603b2	0xb70e1c67	0xaf9376fc	0x371af05b
-+	0xa19209fe	0x8ecdf499	0x9a607cb2	0xcbe61a2c
-+	0x9f4e950c	0xb9a1546f	0xe718f140	0xc75d5d02
-+	0xabe66af2	0xecc54d7b	0xb4373489	0x22254496
-+	0x4b4b7f7c	0x40dde60e	0xfe621a3e	0xa6605c67
-+	0x5cf6a3a2	0x75df88a3	0xbf0749b0	0x705a0a04
-+	0xf3cae078	0x392bdebd	0x98878e65	0x0f5a2be5
-+	0xec172835	0xf610cc90	0xac6ff369	0x0a71c173
-+	0x8eae2d62	0x2ccbb630	0xd3b702ea	0x1626bfff
-+	0xdb4a6975	0xd2a936f7	0x0bb63194	0x5d9120dd
-+	0x5860e04e	0x3baeca91	0x95a621db	0xa6d23aaf
-+	0xfebcfa2d	0xa5ed89cf	0x2192280a	0x72322cb8
-+	0xd79e14d2	0x0528ce06	0x1c6a8f9c	0x6703407c
-+	0x93819694	0x6c554390	0x7875452a	0xf45d2757
-+	0xe0458d1d	0x335f6179	0x48989cc9	0xdc16cec8
-+	0x9e2c0ee5	0x78daabe2	0x2069e8eb	0x0e87f238
-+	0x0a928dda	0xc66e14b3	0x2a6c4031	0x73821630
-+	0x8b8c4a40	0x243702b7	0xded80901	0x5de34802
-+	0xea029b73	0x59a47771	0xe747d796	0xe80aea8d
-+	0x0bd01815	0x76fe1f68	0xa345fc34	0x73737383
-+	0x76753b6c	0x57dcba56	0xb11d6b21	0x81dc371e
-+	0x311f4ea0	0x3b4b2522	0xe8a66ef4	0x1932df0c
-+	0x9f3790d6	0x0d0478a3	0x7dd0a24b	0xeb581381
-+	0x6fe8ff06	0xe34c2d69	0x26842e15	0xe9a39562
-+	0x78f2d7d1	0x79ab33f5	0x197df69c	0x38a9a004
-+	0x9391dba9	0xfbb4b7c5	0xa97bb70f	0x0720b57b
-+	0xd9b26325	0x3ed1a3fc	0x11f5aba0	0x6e6a53ef
-+	0xe2ce236e	0x30994468	0x9d4369cd	0xcb6b5b5c
-+	0x61a0945c	0x090e7dea	0x5d9b676a	0xd474cb52
-+	0x8ebf1af3	0x35f2a70b	0x417d48a0	0x45062dcc
-+	0x841d8d90	0x30f8e590	0x1c935ad3	0x29313e0c
-+	0x46ecf673	0x4998b596	0x95f23529	0xf31bd581
-+	0x1b32045a	0x90432d28	0xa2a6c268	0xbf40fcae
-+	0x4104b314	0x02677221	0xa99231ac	0xe28abada
-+	0xd7d72a73	0xf1b2ce4c	0xf753f8be	0x9d7fc1c7
-+	0x9a0e7a7a	0xf04ccf32	0x58433f5f	0xab9a6d51
-+	0x71262b1c	0x48f84d91	0x897670bb	0x47dd10cb
-+	0xac7ef74d	0x78dc3e54	0x30b17eaa	0xc8f46618
-+	0xc636fe3b	0x86ac06e3	0xfb8edd16	0xed357170
-+	0xbfd34bf8	0xaeb9571a	0x4eec6a50	0xe881a1b7
-+	0x8a1cbbde	0xc6c077b6	0xaeda1441	0xf990296a
-+	0xc91e87d6	0xad0ca921	0x855537b6	0xfc0da57d
-+	0xf8427d87	0x9ece7413	0xc5d4b4c9	0x2fca7822
-+	0xa1888443	0xd3bf617e	0xab21ce7d	0xe63b5f53
-+	0x828501c5	0x81a39da9	0xb8cfb4c6	0x6b23b8dc
-+	0x853fe425	0xba262321	0x34f11b05	0x8044aea4
-+	0x67a3f99d	0x51e8afb7	0x04efcf27	0x7773f9ff
-+	0x8abceec1	0xd75d87a2	0x7e30d774	0xdd7a42f2
-+	0x2ca6ad73	0x27d4e62f	0xbc228d26	0x035a7713
-+	0x5dbcc13a	0x792a97da	0x56cf9fc2	0x5906fa3e
-+	0x97a3147c	0x85e59863	0x19ad1f49	0x1af659a8
-+	0xddc6a273	0xd254a195	0x44d83a00	0x3b7c5fa7
-+	0xcaf756aa	0x68ad08b9	0xfc57da12	0x3b278f24
-+	0xbd165574	0x3cf597ca	0xdeb872ba	0x543eb2f5
-+	0xfabc0d4f	0x0799c544	0x3d71181d	0x22c8a598
-+	0xb82840fc	0x1a198d19	0xf529a0ea	0x2f65bc24
-+	0xe979f99d	0xff8617b4	0x376e5abb	0xb095a03e
-+	0xa36b1107	0x2dacf004	0xe4c565e1	0xc96463cd
-+	0x3b495e2d	0x4a2c2cd7	0xa0053fc2	0x6c82a085
-+	0x6b801c45	0xc1481d77	0x6d95dc15	0x44dc8bf6
-+	0x3eed7d25	0x901a6b49	0x2797e953	0x502ad2c3
-+	0x8491c3f2	0x3ce059eb	0x992c1a76	0x6c56d2a2
-+	0xcf1878a7	0x10574487	0x5a2f85e6	0xf94e418e
-+	0x4c149aed	0x9381b5a3	0x79c90da4	0x635e696e
-+	0x243073ba	0x67504105	0xe82ac957	0xaccda7b3
-+	0x29bdd624	0xd0c1533c	0xbc080065	0x8d617329
-+	0x27e6f74a	0x31e87692	0x50a3857d	0xc5b1ec3f
-+	0x4f03be5f	0xa35fde17	0x537a59bb	0x793d1eb5
-+	0xc11a0588	0x067e5593	0x102532c3	0x4024b312
-+	0x32504cf4	0x4ddc0e9a	0xad5b1d24	0x41081874
-+	0xf94fced4	0x16f39da6	0x9bdfbe58	0xc5615db4
-+	0x1fdd769d	0x4278b52e	0x4525b8b6	0x7feed258
-+	0xe0b4348b	0xb4925ccc	0x5547cc88	0x3f7f5443
-+	0x5b8cc6d3	0xbe6a15cf	0x7308c088	0xde4219df
-+	0x4685593c	0xc4ae83a3	0xaea72ff0	0x403b0c08
-+	0xe533a9aa	0xed46be76	0x4390bcd0	0x683a9f3f
-+	0x338b5cd3	0x7cd59689	0x2eb11aec	0x74e91cfd
-+	0x7ae588aa	0x0eadf94e	0x30a6b42f	0x1965f165
-+	0xd96de54b	0x06c85abf	0x1bbc0ab8	0x79f3ddd0
-+	0x871fd58d	0x498dd69d	0x9197dd0e	0x6cbb3a4f
-+	0x8a1f2a01	0x0d9cf747	0x80e66655	0x770d2b25
-+	0x567bd3eb	0x59583c5a	0x58afeddd	0x9296d0e3
-+	0xcf5af62c	0xf48b4c78	0x746f657e	0xe543b903
-+	0x24603809	0xd1bceeea	0x16d04950	0x2a7c754b
-+	0x4ea8bb99	0x9daecb97	0x3045b9a9	0x4a3e84d9
-+	0x5487e79f	0xd6145e57	0xc3b17f6f	0x14448bb6
-+	0x8e8529f5	0xf895acb9	0x6605c0f0	0x52d00ca9
-+	0xabf6e3e9	0x8f36e307	0xa7a15442	0x55144801
-+	0x69b028b2	0x8ab3b912	0xb493f80e	0x2dc9fdfa
-+	0x1b091fbf	0x1bce6b31	0x79eb414e	0xe5f86ea0
-+	0x39ef7dbd	0x2f86faf0	0xec366923	0xe770c7be
-+	0x74e4aa61	0xef3b9da0	0xd77bd8be	0xfd13d3cb
-+	0x4e8023c6	0x3d993904	0xfcb2f700	0xa14b753b
-+	0xde16c1c3	0x983c5a86	0x52ba5e61	0x1d67b044
-+	0x0f9a302d	0x2f13b653	0x769cbb97	0xea3e1cbd
-+	0x5791778c	0x540fcff1	0x5e6c53f2	0xc9cbac0f
-+	0x40ceadf0	0x648713d3	0xb5347ada	0xfe280079
-+	0xb8389f3f	0x5a6be26a	0x8e683d28	0x6a3e8e3a
-+	0x97ecac7a	0x70b648f1	0xe4eca20e	0x088cd0b4
-+	0xbad30405	0x0f77e382	0x673cdf65	0x438af1f0
-+	0x0b4f4eea	0xf0cc34e9	0x374a3c04	0x4370d27d
-+	0xc3e1e84d	0x141205c2	0xfa831e8d	0x32f2f10a
-+	0x77899366	0xc9d07590	0x9b6f2286	0xcac96a03
-+	0xf822808b	0x265606cd	0xbeef275d	0x73415b15
-+	0x4c87250e	0xf95a8c8a	0xdc8d6166	0x68522e63
-+	0xb9becc14	0x7b5f20be	0x3d158dab	0xa73b1716
-+	0x3b2cac15	0xf0498939	0xb60653bf	0x33fafc0e
-+	0x3b416955	0x3addca50	0x16ab21cf	0xd18cbdb6
-+	0x3b29b87b	0xa6fb7e4b	0x6634147f	0x44283b1e
-+	0x430ae726	0xa907ab82	0x2baa6706	0x621d2390
-+	0x15944559	0x2516c807	0x7d1eeb61	0xe2714121
-+	0x288d3998	0x47713cbb	0xa1ce3c1e	0x0c29b6dd
-+	0x9923131c	0x2dd19cfa	0x83d0ece5	0x78474c7b
-+	0x92dee4f0	0xba5cb0f7	0x780c1d41	0x50da5a89
-+	0xe303cebb	0xe8d5a2bd	0x7d6269a9	0xb75484f1
-+	0x33ee8186	0x085b7657	0x7b1c7863	0xdb1a43ce
-+	0x3d0c4bf0	0x302c1292	0x81e42216	0xee1f2c9d
-+	0x822451ab	0xcefd8067	0x8330dc41	0x14492542
-+	0xf038f54d	0x90a1abf9	0xc3067a77	0x40d9a42c
-+	0x127285c1	0x80ad15ff	0xaf4854e2	0xa47874f4
-+	0x2ed59760	0x67252c6a	0xe2830f38	0x8150c00c
-+	0x16f61cca	0x1331f815	0x2d832d17	0x163c6010
-+	0x69464e2f	0x99940411	0xbce5e85f	0x43d39ef2
-+	0x9b7224dc	0x28652b6d	0x331a7632	0x127f669e
-+	0x44a034ad	0xe95d2cec	0x3d83fefb	0xfa6d40a2
-+	0x9b535bf4	0xc83411ce	0xd661655b	0x64bcd8d2
-+	0xd99e1570	0x7dc4d877	0x9756b210	0x7623dc0d
-+	0x484dd33f	0xe7bca204	0xa06efbc5	0xa358c03f
-+	0x362cb282	0xe40e6d04	0x17ab9f5e	0x79a71a09
-+	0x804bf1a9	0x6bca7d73	0x5504a4ff	0xd3946f75
-+	0x18b0b9d4	0xd85993cc	0x94d000a5	0x8dda1609
-+	0x30afb8f6	0xb3c99c3c	0x7686d59d	0x68b719db
-+	0xdc7b3edb	0xedb76012	0xbfa0ba3b	0x280b829d
-+	0x72fcf1aa	0xe3d8f83c	0x088a57cf	0x95156217
-+	0x3306eb47	0x1d09cf54	0x1391876f	0x5b15ecde
-+	0xb46104e1	0x8d8f2593	0x90ee50cc	0x78dad4b2
-+	0xfd96daee	0xdbf15e95	0xfc859faa	0xdb4422a5
-+	0xa00eeab6	0x525232c6	0x9b665668	0x8a70518b
-+	0xbb27f7ac	0xb066b096	0x25754db6	0xe8c7d748
-+	0xd4e8d361	0x380dd246	0x9bdf15e6	0x6823c660
-+	0x5d408fe7	0xe59a5a89	0x1eb7523b	0x4997158e
-+	0xfa6214d2	0x03b35025	0x9aeff33c	0x20a38aad
-+	0x522f79cd	0x4141f19c	0xc58cd2bd	0xc816da37
-+	0x62c6f8d9	0xc15ea9f4	0x138d1f45	0xd36cef03
-+	0x88183bd6	0xe0de9036	0xefcbe8fc	0x5ebdce26
-+	0x9e83b01b	0xd35f6747	0x552951f1	0x4e20dd66
-+	0x419702b1	0x45446e7c	0x7ce5616b	0x6152e3a8
-+	0xffd572e1	0x4fab25b0	0x07563b80	0x98720ee7
-+	0x176d29bf	0x21cbd730	0xbde74431	0x09a8cce2
-+	0xc15e548e	0xe6a92b4b	0x14f17e74	0x75f7817b
-+	0x592143e8	0x113dbd25	0x5f7d7160	0xbdd8b1e0
-+	0x6ce045e5	0x53b27b2d	0x371c8aa8	0xa4da8be0
-+	0xf1f6df4e	0x9519bac4	0x6d6169cf	0x7846253f
-+	0xccb95d95	0x6ad11a98	0x4a3bd21d	0x5389f44c
-+	0x7c07ef3a	0xb983ca57	0xcf7f290d	0x4ec516f1
-+	0xa7711e70	0x818d45a9	0x49db6441	0xd032fc2a
-+	0x657df4d3	0xe37e6809	0x459a22da	0x41df8aa5
-+	0x462108a6	0x65177d27	0x1ddffa9f	0x7fa6631b
-+	0xdd7a414c	0x6351f0d1	0x1b38a419	0x6b529c8e
-+	0x167745e4	0xcac35897	0x3d7bf419	0xd59ed67a
-+	0x6486b2c9	0x9ae4fc90	0x8f608920	0xd35335c0
-+	0x8f113cba	0x0fcc11a1	0xdc180fbf	0x57a99319
-+	0x2c54185f	0x764c18d0	0x4f84b111	0x30a11040
-+	0xd15620af	0x496af145	0x263b2de2	0x3ff103dd
-+	0x38484dac	0xf143a3bc	0xb62c0de6	0xb122c545
-+	0x72f10466	0x63728442	0xee0117c9	0x2309f14b
-+	0x4ccdd5de	0x37ae022d	0x2ee7f050	0xf2aa9af6
-+	0xcd314a20	0x86954941	0x97215303	0xcd7e1687
-+	0x1dab6672	0x1c920209	0x41102dae	0x8b21c8ab
-+	0x6f70b04b	0x2988b209	0x86e6f033	0x5eb91718
-+	0x925b3c40	0xdcad0288	0x0ee98331	0xc3096ceb
-+	0x9fa04740	0x3ce3fb23	0x90d75cbd	0xeab21768
-+	0xaca5db0a	0x1c440578	0x762cb728	0x315a699f
-+	0xcd2b6490	0x11e3e267	0xa10d1bbc	0x23ac26d3
-+	0xc0c7c268	0x37ecf7ac	0x28de6fe5	0x6fb8e3e8
-+	0x583d1131	0x8370812a	0x3afd5d58	0x4569a06e
-+	0xf27ad86f	0x0db6a631	0x9add5128	0x1748c9fd
-+	0xc46e3c57	0x4c0df93e	0xc595c544	0x397f7e7e
-+	0x241f4086	0x7d7ed51b	0x56027473	0x656a6110
-+	0x970a8011	0xf9c7beb5	0xc6cb9957	0xb7426461
-+	0x62d3d89d	0xf99d48ca	0x3e4d4a88	0x9f751b71
-+	0xfa020205	0xa3124337	0x59935869	0x98c58314
-+	0xff7c4385	0x69191265	0xaf85ebb9	0xe434cda2
-+	0xb1ad3e0e	0x221d32e1	0x022d73a0	0xd676ce06
-+	0xab7f0c21	0x915c2444	0xf5bdaba2	0x74e4e789
-+	0x11ff0d95	0x58c53feb	0xa54eb847	0x9af982ae
-+	0x8d721596	0x73510fe4	0x95e3bd19	0xd82f8359
-+	0xc09cdd5b	0xc07f57a4	0xbece605b	0xa8a43c5b
-+	0x0acbeb6d	0x3c5cd8ce	0xb631050d	0xd558c921
-+	0xcb5054c2	0xefb06252	0x40d2e2cc	0x14ffe6ff
-+	0x761001a9	0xad64e7a5	0xb55618b4	0x2a40a1fc
-+	0x2cbe6d40	0x2bc18fc1	0x196e7092	0x3c137791
-+	0xa799eb23	0x1156feb9	0xd55d7ed1	0x0149c315
-+	0xae77081f	0xfe724690	0x55ed2fd7	0x04b18cd7
-+	0x691583f4	0xb1be4fde	0x19ae1cf7	0x3250140b
-+	0x35daeeb2	0xc9459a84	0xea2c19e1	0x57f8c9cb
-+	0xe05e07a4	0xcc77a363	0x43afd702	0x48305862
-+	0x6c4b459f	0x66ed6178	0x26be9f81	0xeac41ee5
-+	0xbe5e2e6b	0x177f9068	0xede56c48	0x438b3811
-+	0xd5bd7ee4	0xc027d1a8	0xc1c0f725	0x48d4d4eb
-+	0x6ffa28d5	0xbd6ac9eb	0xd497781d	0x24d3a154
-+	0x409bb5c0	0x8079bf76	0x90a522dc	0x19bf7033
-+	0x1a529b6e	0xe5207e4d	0x3d49b7bc	0x3eca6d54
-+	0xa37681a6	0xaa9a62e4	0xe54aa1e1	0xb91e7157
-+	0x8cce8f65	0xbcbbd62c	0x7fa477b5	0x44f46b50
-+	0x54263fcf	0x529cbb5d	0x8923e390	0x0778d6d7
-+	0x0cc0503f	0x02c374ce	0xb89c3e5c	0x25b1b353
-+	0xb227cb2d	0x44108698	0x5e5968c2	0x82c48632
-+	0x0b8f4209	0x1a241879	0x9edca6f1	0xa1fa51ab
-+	0x206db0c6	0xbfbbbe98	0xa71c91f6	0xa1b28056
-+	0xb8bfaaa9	0xa5914f75	0x77d26574	0xacfd459d
-+	0x77f7cab2	0x249ebf26	0xef902bdd	0x77f6e48d
-+	0x82497035	0x93333a9d	0x34ea9953	0x8f08d41c
-+	>;
-diff -ruN u-boot-2015.01-rc3/arch/x86/include/asm/arch-coreboot/gpio.h u-boot/arch/x86/include/asm/arch-coreboot/gpio.h
---- u-boot-2015.01-rc3/arch/x86/include/asm/arch-coreboot/gpio.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/include/asm/arch-coreboot/gpio.h	2015-01-01 17:34:32.253503252 +0100
-@@ -7,4 +7,7 @@
- #ifndef _X86_ARCH_GPIO_H_
- #define _X86_ARCH_GPIO_H_
- 
-+/* Where in config space is the register that points to the GPIO registers? */
-+#define PCI_CFG_GPIOBASE 0x48
-+
- #endif /* _X86_ARCH_GPIO_H_ */
-diff -ruN u-boot-2015.01-rc3/arch/x86/include/asm/arch-ivybridge/gpio.h u-boot/arch/x86/include/asm/arch-ivybridge/gpio.h
---- u-boot-2015.01-rc3/arch/x86/include/asm/arch-ivybridge/gpio.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/include/asm/arch-ivybridge/gpio.h	2015-01-01 17:34:32.253503252 +0100
-@@ -7,4 +7,7 @@
- #ifndef _X86_ARCH_GPIO_H_
- #define _X86_ARCH_GPIO_H_
- 
-+/* Where in config space is the register that points to the GPIO registers? */
-+#define PCI_CFG_GPIOBASE 0x48
-+
- #endif /* _X86_ARCH_GPIO_H_ */
-diff -ruN u-boot-2015.01-rc3/arch/x86/include/asm/arch-ivybridge/pei_data.h u-boot/arch/x86/include/asm/arch-ivybridge/pei_data.h
---- u-boot-2015.01-rc3/arch/x86/include/asm/arch-ivybridge/pei_data.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/include/asm/arch-ivybridge/pei_data.h	2015-01-01 17:34:32.253503252 +0100
-@@ -7,6 +7,8 @@
- #ifndef ASM_ARCH_PEI_DATA_H
- #define ASM_ARCH_PEI_DATA_H
- 
-+#include <linux/linkage.h>
-+
- struct pch_usb3_controller_settings {
- 	/* 0: Disable, 1: Enable, 2: Auto, 3: Smart Auto */
- 	uint16_t mode;
-diff -ruN u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/fsp/fsp_api.h u-boot/arch/x86/include/asm/arch-queensbay/fsp/fsp_api.h
---- u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/fsp/fsp_api.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/include/asm/arch-queensbay/fsp/fsp_api.h	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,55 @@
-+/*
-+ * Copyright (C) 2013, Intel Corporation
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	Intel
-+ */
-+
-+#ifndef __FSP_API_H__
-+#define __FSP_API_H__
-+
-+/*
-+ * FspInit continuation function prototype.
-+ * Control will be returned to this callback function after FspInit API call.
-+ */
-+typedef void (*fsp_continuation_f)(u32 status, void *hob_list);
-+
-+struct fsp_init_params {
-+	/* Non-volatile storage buffer pointer */
-+	void			*nvs_buf;
-+	/* Runtime buffer pointer */
-+	void			*rt_buf;
-+	/* Continuation function address */
-+	fsp_continuation_f	continuation;
-+};
-+
-+struct common_buf {
-+	/*
-+	 * Stack top pointer used by the bootloader. The new stack frame will be
-+	 * set up at this location after FspInit API call.
-+	 */
-+	u32	*stack_top;
-+	u32	boot_mode;	/* Current system boot mode */
-+	void	*upd_data;	/* User platform configuraiton data region */
-+	u32	reserved[7];	/* Reserved */
-+};
-+
-+enum fsp_phase {
-+	/* Notification code for post PCI enuermation */
-+	INIT_PHASE_PCI	= 0x20,
-+	/* Notification code before transfering control to the payload */
-+	INIT_PHASE_BOOT	= 0x40
-+};
-+
-+struct fsp_notify_params {
-+	/* Notification phase used for NotifyPhase API */
-+	enum fsp_phase	phase;
-+};
-+
-+/* FspInit API function prototype */
-+typedef u32 (*fsp_init_f)(struct fsp_init_params *params);
-+
-+/* FspNotify API function prototype */
-+typedef u32 (*fsp_notify_f)(struct fsp_notify_params *params);
-+
-+#endif
-diff -ruN u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/fsp/fsp_bootmode.h u-boot/arch/x86/include/asm/arch-queensbay/fsp/fsp_bootmode.h
---- u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/fsp/fsp_bootmode.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/include/asm/arch-queensbay/fsp/fsp_bootmode.h	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,24 @@
-+/*
-+ * Copyright (C) 2013, Intel Corporation
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	Intel
-+ */
-+
-+#ifndef __FSP_BOOT_MODE_H__
-+#define __FSP_BOOT_MODE_H__
-+
-+/* 0x21 - 0xf..f are reserved */
-+#define BOOT_FULL_CONFIG		0x00
-+#define BOOT_MINIMAL_CONFIG		0x01
-+#define BOOT_NO_CONFIG_CHANGES		0x02
-+#define BOOT_FULL_CONFIG_PLUS_DIAG	0x03
-+#define BOOT_DEFAULT_SETTINGS		0x04
-+#define BOOT_ON_S4_RESUME		0x05
-+#define BOOT_ON_S5_RESUME		0x06
-+#define BOOT_ON_S2_RESUME		0x10
-+#define BOOT_ON_S3_RESUME		0x11
-+#define BOOT_ON_FLASH_UPDATE		0x12
-+#define BOOT_IN_RECOVERY_MODE		0x20
-+
-+#endif
-diff -ruN u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/fsp/fsp_ffs.h u-boot/arch/x86/include/asm/arch-queensbay/fsp/fsp_ffs.h
---- u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/fsp/fsp_ffs.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/include/asm/arch-queensbay/fsp/fsp_ffs.h	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,154 @@
-+/*
-+ * Copyright (C) 2013, Intel Corporation
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	Intel
-+ */
-+
-+#ifndef __FSP_FFS_H__
-+#define __FSP_FFS_H__
-+
-+/* Used to verify the integrity of the file */
-+union __packed ffs_integrity {
-+	struct {
-+		/*
-+		 * The IntegrityCheck.checksum.header field is an 8-bit
-+		 * checksum of the file header. The State and
-+		 * IntegrityCheck.checksum.file fields are assumed to be zero
-+		 * and the checksum is calculated such that the entire header
-+		 * sums to zero.
-+		 */
-+		u8	header;
-+		/*
-+		 * If the FFS_ATTRIB_CHECKSUM (see definition below) bit of
-+		 * the Attributes field is set to one, the
-+		 * IntegrityCheck.checksum.file field is an 8-bit checksum of
-+		 * the file data. If the FFS_ATTRIB_CHECKSUM bit of the
-+		 * Attributes field is cleared to zero, the
-+		 * IntegrityCheck.checksum.file field must be initialized with
-+		 * a value of 0xAA. The IntegrityCheck.checksum.file field is
-+		 * valid any time the EFI_FILE_DATA_VALID bit is set in the
-+		 * State field.
-+		 */
-+		u8	file;
-+	} checksum;
-+
-+	/* This is the full 16 bits of the IntegrityCheck field */
-+	u16	checksum16;
-+};
-+
-+/*
-+ * Each file begins with the header that describe the
-+ * contents and state of the files.
-+ */
-+struct __packed ffs_file_header {
-+	/*
-+	 * This GUID is the file name.
-+	 * It is used to uniquely identify the file.
-+	 */
-+	struct efi_guid		name;
-+	/* Used to verify the integrity of the file */
-+	union ffs_integrity	integrity;
-+	/* Identifies the type of file */
-+	u8			type;
-+	/* Declares various file attribute bits */
-+	u8			attr;
-+	/* The length of the file in bytes, including the FFS header */
-+	u8			size[3];
-+	/*
-+	 * Used to track the state of the file throughout the life of
-+	 * the file from creation to deletion.
-+	 */
-+	u8			state;
-+};
-+
-+struct __packed ffs_file_header2 {
-+	/*
-+	 * This GUID is the file name. It is used to uniquely identify the file.
-+	 * There may be only one instance of a file with the file name GUID of
-+	 * Name in any given firmware volume, except if the file type is
-+	 * EFI_FV_FILE_TYPE_FFS_PAD.
-+	 */
-+	struct efi_guid		name;
-+	/* Used to verify the integrity of the file */
-+	union ffs_integrity	integrity;
-+	/* Identifies the type of file */
-+	u8			type;
-+	/* Declares various file attribute bits */
-+	u8			attr;
-+	/*
-+	 * The length of the file in bytes, including the FFS header.
-+	 * The length of the file data is either
-+	 * (size - sizeof(struct ffs_file_header)). This calculation means a
-+	 * zero-length file has a size of 24 bytes, which is
-+	 * sizeof(struct ffs_file_header). Size is not required to be a
-+	 * multiple of 8 bytes. Given a file F, the next file header is located
-+	 * at the next 8-byte aligned firmware volume offset following the last
-+	 * byte of the file F.
-+	 */
-+	u8			size[3];
-+	/*
-+	 * Used to track the state of the file throughout the life of
-+	 * the file from creation to deletion.
-+	 */
-+	u8			state;
-+	/*
-+	 * If FFS_ATTRIB_LARGE_FILE is set in attr, then ext_size exists
-+	 * and size must be set to zero.
-+	 * If FFS_ATTRIB_LARGE_FILE is not set then
-+	 * struct ffs_file_header is used.
-+	 */
-+	u32			ext_size;
-+};
-+
-+/*
-+ * Pseudo type. It is used as a wild card when retrieving sections.
-+ * The section type EFI_SECTION_ALL matches all section types.
-+ */
-+#define EFI_SECTION_ALL				0x00
-+
-+/* Encapsulation section Type values */
-+#define EFI_SECTION_COMPRESSION			0x01
-+#define EFI_SECTION_GUID_DEFINED		0x02
-+#define EFI_SECTION_DISPOSABLE			0x03
-+
-+/* Leaf section Type values */
-+#define EFI_SECTION_PE32			0x10
-+#define EFI_SECTION_PIC				0x11
-+#define EFI_SECTION_TE				0x12
-+#define EFI_SECTION_DXE_DEPEX			0x13
-+#define EFI_SECTION_VERSION			0x14
-+#define EFI_SECTION_USER_INTERFACE		0x15
-+#define EFI_SECTION_COMPATIBILITY16		0x16
-+#define EFI_SECTION_FIRMWARE_VOLUME_IMAGE	0x17
-+#define EFI_SECTION_FREEFORM_SUBTYPE_GUID	0x18
-+#define EFI_SECTION_RAW				0x19
-+#define EFI_SECTION_PEI_DEPEX			0x1B
-+#define EFI_SECTION_SMM_DEPEX			0x1C
-+
-+/* Common section header */
-+struct __packed raw_section {
-+	/*
-+	 * A 24-bit unsigned integer that contains the total size of
-+	 * the section in bytes, including the EFI_COMMON_SECTION_HEADER.
-+	 */
-+	u8	size[3];
-+	u8	type;
-+};
-+
-+struct __packed raw_section2 {
-+	/*
-+	 * A 24-bit unsigned integer that contains the total size of
-+	 * the section in bytes, including the EFI_COMMON_SECTION_HEADER.
-+	 */
-+	u8	size[3];
-+	u8	type;
-+	/*
-+	 * If size is 0xFFFFFF, then ext_size contains the size of
-+	 * the section. If size is not equal to 0xFFFFFF, then this
-+	 * field does not exist.
-+	 */
-+	u32	ext_size;
-+};
-+
-+#endif
-diff -ruN u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/fsp/fsp_fv.h u-boot/arch/x86/include/asm/arch-queensbay/fsp/fsp_fv.h
---- u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/fsp/fsp_fv.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/include/asm/arch-queensbay/fsp/fsp_fv.h	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,137 @@
-+/*
-+ * Copyright (C) 2013, Intel Corporation
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	Intel
-+ */
-+
-+#ifndef __FSP_FV___
-+#define __FSP_FV___
-+
-+/* Value of EFI_FV_FILE_ATTRIBUTES */
-+#define EFI_FV_FILE_ATTR_ALIGNMENT	0x0000001F
-+#define EFI_FV_FILE_ATTR_FIXED		0x00000100
-+#define EFI_FV_FILE_ATTR_MEMORY_MAPPED	0x00000200
-+
-+/* Attributes bit definitions */
-+#define EFI_FVB2_READ_DISABLED_CAP	0x00000001
-+#define EFI_FVB2_READ_ENABLED_CAP	0x00000002
-+#define EFI_FVB2_READ_STATUS		0x00000004
-+#define EFI_FVB2_WRITE_DISABLED_CAP	0x00000008
-+#define EFI_FVB2_WRITE_ENABLED_CAP	0x00000010
-+#define EFI_FVB2_WRITE_STATUS		0x00000020
-+#define EFI_FVB2_LOCK_CAP		0x00000040
-+#define EFI_FVB2_LOCK_STATUS		0x00000080
-+#define EFI_FVB2_STICKY_WRITE		0x00000200
-+#define EFI_FVB2_MEMORY_MAPPED		0x00000400
-+#define EFI_FVB2_ERASE_POLARITY		0x00000800
-+#define EFI_FVB2_READ_LOCK_CAP		0x00001000
-+#define EFI_FVB2_READ_LOCK_STATUS	0x00002000
-+#define EFI_FVB2_WRITE_LOCK_CAP		0x00004000
-+#define EFI_FVB2_WRITE_LOCK_STATUS	0x00008000
-+#define EFI_FVB2_ALIGNMENT		0x001F0000
-+#define EFI_FVB2_ALIGNMENT_1		0x00000000
-+#define EFI_FVB2_ALIGNMENT_2		0x00010000
-+#define EFI_FVB2_ALIGNMENT_4		0x00020000
-+#define EFI_FVB2_ALIGNMENT_8		0x00030000
-+#define EFI_FVB2_ALIGNMENT_16		0x00040000
-+#define EFI_FVB2_ALIGNMENT_32		0x00050000
-+#define EFI_FVB2_ALIGNMENT_64		0x00060000
-+#define EFI_FVB2_ALIGNMENT_128		0x00070000
-+#define EFI_FVB2_ALIGNMENT_256		0x00080000
-+#define EFI_FVB2_ALIGNMENT_512		0x00090000
-+#define EFI_FVB2_ALIGNMENT_1K		0x000A0000
-+#define EFI_FVB2_ALIGNMENT_2K		0x000B0000
-+#define EFI_FVB2_ALIGNMENT_4K		0x000C0000
-+#define EFI_FVB2_ALIGNMENT_8K		0x000D0000
-+#define EFI_FVB2_ALIGNMENT_16K		0x000E0000
-+#define EFI_FVB2_ALIGNMENT_32K		0x000F0000
-+#define EFI_FVB2_ALIGNMENT_64K		0x00100000
-+#define EFI_FVB2_ALIGNMENT_128K		0x00110000
-+#define EFI_FVB2_ALIGNMENT_256K		0x00120000
-+#define EFI_FVB2_ALIGNMENT_512K		0x00130000
-+#define EFI_FVB2_ALIGNMENT_1M		0x00140000
-+#define EFI_FVB2_ALIGNMENT_2M		0x00150000
-+#define EFI_FVB2_ALIGNMENT_4M		0x00160000
-+#define EFI_FVB2_ALIGNMENT_8M		0x00170000
-+#define EFI_FVB2_ALIGNMENT_16M		0x00180000
-+#define EFI_FVB2_ALIGNMENT_32M		0x00190000
-+#define EFI_FVB2_ALIGNMENT_64M		0x001A0000
-+#define EFI_FVB2_ALIGNMENT_128M		0x001B0000
-+#define EFI_FVB2_ALIGNMENT_256M		0x001C0000
-+#define EFI_FVB2_ALIGNMENT_512M		0x001D0000
-+#define EFI_FVB2_ALIGNMENT_1G		0x001E0000
-+#define EFI_FVB2_ALIGNMENT_2G		0x001F0000
-+
-+struct fv_blkmap_entry {
-+	/* The number of sequential blocks which are of the same size */
-+	u32	num_blocks;
-+	/* The size of the blocks */
-+	u32	length;
-+};
-+
-+/* Describes the features and layout of the firmware volume */
-+struct fv_header {
-+	/*
-+	 * The first 16 bytes are reserved to allow for the reset vector of
-+	 * processors whose reset vector is at address 0.
-+	 */
-+	u8			zero_vec[16];
-+	/*
-+	 * Declares the file system with which the firmware volume
-+	 * is formatted.
-+	 */
-+	struct efi_guid		fs_guid;
-+	/*
-+	 * Length in bytes of the complete firmware volume, including
-+	 * the header.
-+	 */
-+	u64			fv_len;
-+	/* Set to EFI_FVH_SIGNATURE */
-+	u32			sign;
-+	/*
-+	 * Declares capabilities and power-on defaults for the firmware
-+	 * volume.
-+	 */
-+	u32			attr;
-+	/* Length in bytes of the complete firmware volume header */
-+	u16			hdr_len;
-+	/*
-+	 * A 16-bit checksum of the firmware volume header.
-+	 * A valid header sums to zero.
-+	 */
-+	u16			checksum;
-+	/*
-+	 * Offset, relative to the start of the header, of the extended
-+	 * header (EFI_FIRMWARE_VOLUME_EXT_HEADER) or zero if there is
-+	 * no extended header.
-+	 */
-+	u16			ext_hdr_off;
-+	/* This field must always be set to zero */
-+	u8			reserved[1];
-+	/*
-+	 * Set to 2. Future versions of this specification may define new
-+	 * header fields and will increment the Revision field accordingly.
-+	 */
-+	u8			rev;
-+	/*
-+	 * An array of run-length encoded FvBlockMapEntry structures.
-+	 * The array is terminated with an entry of {0,0}.
-+	 */
-+	struct fv_blkmap_entry	block_map[1];
-+};
-+
-+#define EFI_FVH_SIGNATURE	SIGNATURE_32('_', 'F', 'V', 'H')
-+
-+/* Firmware Volume Header Revision definition */
-+#define EFI_FVH_REVISION	0x02
-+
-+/* Extension header pointed by ExtHeaderOffset of volume header */
-+struct fv_ext_header {
-+	/* firmware volume name */
-+	struct efi_guid		fv_name;
-+	/* Size of the rest of the extension header including this structure */
-+	u32			ext_hdr_size;
-+};
-+
-+#endif
-diff -ruN u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/fsp/fsp_hob.h u-boot/arch/x86/include/asm/arch-queensbay/fsp/fsp_hob.h
---- u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/fsp/fsp_hob.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/include/asm/arch-queensbay/fsp/fsp_hob.h	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,340 @@
-+/*
-+ * Copyright (C) 2013, Intel Corporation
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	Intel
-+ */
-+
-+#ifndef __FSP_HOB_H__
-+#define __FSP_HOB_H__
-+
-+/* Type of HOB Header */
-+#define HOB_TYPE_MEM_ALLOC	0x0002
-+#define HOB_TYPE_RES_DESC	0x0003
-+#define HOB_TYPE_GUID_EXT	0x0004
-+#define HOB_TYPE_UNUSED		0xFFFE
-+#define HOB_TYPE_EOH		0xFFFF
-+
-+/*
-+ * Describes the format and size of the data inside the HOB.
-+ * All HOBs must contain this generic HOB header.
-+ */
-+struct hob_header {
-+	u16	type;		/* HOB type */
-+	u16	len;		/* HOB length */
-+	u32	reserved;	/* always zero */
-+};
-+
-+/* Enumeration of memory types introduced in UEFI */
-+enum efi_mem_type {
-+	EFI_RESERVED_MEMORY_TYPE,
-+	/*
-+	 * The code portions of a loaded application.
-+	 * (Note that UEFI OS loaders are UEFI applications.)
-+	 */
-+	EFI_LOADER_CODE,
-+	/*
-+	 * The data portions of a loaded application and
-+	 * the default data allocation type used by an application
-+	 * to allocate pool memory.
-+	 */
-+	EFI_LOADER_DATA,
-+	/* The code portions of a loaded Boot Services Driver */
-+	EFI_BOOT_SERVICES_CODE,
-+	/*
-+	 * The data portions of a loaded Boot Serves Driver and
-+	 * the default data allocation type used by a Boot Services
-+	 * Driver to allocate pool memory.
-+	 */
-+	EFI_BOOT_SERVICES_DATA,
-+	/* The code portions of a loaded Runtime Services Driver */
-+	EFI_RUNTIME_SERVICES_CODE,
-+	/*
-+	 * The data portions of a loaded Runtime Services Driver and
-+	 * the default data allocation type used by a Runtime Services
-+	 * Driver to allocate pool memory.
-+	 */
-+	EFI_RUNTIME_SERVICES_DATA,
-+	/* Free (unallocated) memory */
-+	EFI_CONVENTIONAL_MEMORY,
-+	/* Memory in which errors have been detected */
-+	EFI_UNUSABLE_MEMORY,
-+	/* Memory that holds the ACPI tables */
-+	EFI_ACPI_RECLAIM_MEMORY,
-+	/* Address space reserved for use by the firmware */
-+	EFI_ACPI_MEMORY_NVS,
-+	/*
-+	 * Used by system firmware to request that a memory-mapped IO region
-+	 * be mapped by the OS to a virtual address so it can be accessed by
-+	 * EFI runtime services.
-+	 */
-+	EFI_MMAP_IO,
-+	/*
-+	 * System memory-mapped IO region that is used to translate
-+	 * memory cycles to IO cycles by the processor.
-+	 */
-+	EFI_MMAP_IO_PORT,
-+	/*
-+	 * Address space reserved by the firmware for code that is
-+	 * part of the processor.
-+	 */
-+	EFI_PAL_CODE,
-+	EFI_MAX_MEMORY_TYPE
-+};
-+
-+/*
-+ * Describes all memory ranges used during the HOB producer phase that
-+ * exist outside the HOB list. This HOB type describes how memory is used,
-+ * not the physical attributes of memory.
-+ */
-+struct hob_mem_alloc {
-+	struct hob_header	hdr;
-+	/*
-+	 * A GUID that defines the memory allocation region's type and purpose,
-+	 * as well as other fields within the memory allocation HOB. This GUID
-+	 * is used to define the additional data within the HOB that may be
-+	 * present for the memory allocation HOB. Type efi_guid is defined in
-+	 * InstallProtocolInterface() in the UEFI 2.0 specification.
-+	 */
-+	struct efi_guid		name;
-+	/*
-+	 * The base address of memory allocated by this HOB.
-+	 * Type phys_addr_t is defined in AllocatePages() in the UEFI 2.0
-+	 * specification.
-+	 */
-+	phys_addr_t		mem_base;
-+	/* The length in bytes of memory allocated by this HOB */
-+	phys_size_t		mem_len;
-+	/*
-+	 * Defines the type of memory allocated by this HOB.
-+	 * The memory type definition follows the EFI_MEMORY_TYPE definition.
-+	 * Type EFI_MEMORY_TYPE is defined in AllocatePages() in the UEFI 2.0
-+	 * specification.
-+	 */
-+	enum efi_mem_type	mem_type;
-+	/* padding */
-+	u8			reserved[4];
-+};
-+
-+/* Value of ResourceType in HOB_RES_DESC */
-+#define RES_SYS_MEM		0x00000000
-+#define RES_MMAP_IO		0x00000001
-+#define RES_IO			0x00000002
-+#define RES_FW_DEVICE		0x00000003
-+#define RES_MMAP_IO_PORT	0x00000004
-+#define RES_MEM_RESERVED	0x00000005
-+#define RES_IO_RESERVED		0x00000006
-+#define RES_MAX_MEM_TYPE	0x00000007
-+
-+/*
-+ * These types can be ORed together as needed.
-+ *
-+ * The first three enumerations describe settings
-+ * The rest of the settings describe capabilities
-+ */
-+#define RES_ATTR_PRESENT			0x00000001
-+#define RES_ATTR_INITIALIZED			0x00000002
-+#define RES_ATTR_TESTED				0x00000004
-+#define RES_ATTR_SINGLE_BIT_ECC			0x00000008
-+#define RES_ATTR_MULTIPLE_BIT_ECC		0x00000010
-+#define RES_ATTR_ECC_RESERVED_1			0x00000020
-+#define RES_ATTR_ECC_RESERVED_2			0x00000040
-+#define RES_ATTR_READ_PROTECTED			0x00000080
-+#define RES_ATTR_WRITE_PROTECTED		0x00000100
-+#define RES_ATTR_EXECUTION_PROTECTED		0x00000200
-+#define RES_ATTR_UNCACHEABLE			0x00000400
-+#define RES_ATTR_WRITE_COMBINEABLE		0x00000800
-+#define RES_ATTR_WRITE_THROUGH_CACHEABLE	0x00001000
-+#define RES_ATTR_WRITE_BACK_CACHEABLE		0x00002000
-+#define RES_ATTR_16_BIT_IO			0x00004000
-+#define RES_ATTR_32_BIT_IO			0x00008000
-+#define RES_ATTR_64_BIT_IO			0x00010000
-+#define RES_ATTR_UNCACHED_EXPORTED		0x00020000
-+
-+/*
-+ * Describes the resource properties of all fixed, nonrelocatable resource
-+ * ranges found on the processor host bus during the HOB producer phase.
-+ */
-+struct hob_res_desc {
-+	struct hob_header	hdr;
-+	/*
-+	 * A GUID representing the owner of the resource. This GUID is
-+	 * used by HOB consumer phase components to correlate device
-+	 * ownership of a resource.
-+	 */
-+	struct efi_guid		owner;
-+	u32			type;
-+	u32			attr;
-+	/* The physical start address of the resource region */
-+	phys_addr_t		phys_start;
-+	/* The number of bytes of the resource region */
-+	phys_size_t		len;
-+};
-+
-+/*
-+ * Allows writers of executable content in the HOB producer phase to
-+ * maintain and manage HOBs with specific GUID.
-+ */
-+struct hob_guid {
-+	struct hob_header	hdr;
-+	/* A GUID that defines the contents of this HOB */
-+	struct efi_guid		name;
-+	/* GUID specific data goes here */
-+};
-+
-+/* Union of all the possible HOB Types */
-+union hob_pointers {
-+	struct hob_header	*hdr;
-+	struct hob_mem_alloc	*mem_alloc;
-+	struct hob_res_desc	*res_desc;
-+	struct hob_guid		*guid;
-+	u8			*raw;
-+};
-+
-+/**
-+ * get_hob_type() - return the type of a HOB
-+ *
-+ * This macro returns the type field from the HOB header for the
-+ * HOB specified by hob.
-+ *
-+ * @hob:    A pointer to a HOB.
-+ *
-+ * @return: HOB type.
-+ */
-+static inline u16 get_hob_type(union hob_pointers hob)
-+{
-+	return hob.hdr->type;
-+}
-+
-+/**
-+ * get_hob_length() - return the length, in bytes, of a HOB
-+ *
-+ * This macro returns the len field from the HOB header for the
-+ * HOB specified by hob.
-+ *
-+ * @hob:    A pointer to a HOB.
-+ *
-+ * @return: HOB length.
-+ */
-+static inline u16 get_hob_length(union hob_pointers hob)
-+{
-+	return hob.hdr->len;
-+}
-+
-+/**
-+ * get_next_hob() - return a pointer to the next HOB in the HOB list
-+ *
-+ * This macro returns a pointer to HOB that follows the HOB specified by hob
-+ * in the HOB List.
-+ *
-+ * @hob:    A pointer to a HOB.
-+ *
-+ * @return: A pointer to the next HOB in the HOB list.
-+ */
-+static inline void *get_next_hob(union hob_pointers hob)
-+{
-+	return (void *)(*(u8 **)&(hob) + get_hob_length(hob));
-+}
-+
-+/**
-+ * end_of_hob() - determine if a HOB is the last HOB in the HOB list
-+ *
-+ * This macro determine if the HOB specified by hob is the last HOB in the
-+ * HOB list.  If hob is last HOB in the HOB list, then true is returned.
-+ * Otherwise, false is returned.
-+ *
-+ * @hob:          A pointer to a HOB.
-+ *
-+ * @retval true:  The HOB specified by hob is the last HOB in the HOB list.
-+ * @retval false: The HOB specified by hob is not the last HOB in the HOB list.
-+ */
-+static inline bool end_of_hob(union hob_pointers hob)
-+{
-+	return get_hob_type(hob) == HOB_TYPE_EOH;
-+}
-+
-+/**
-+ * get_guid_hob_data() - return a pointer to data buffer from a HOB of
-+ *                       type HOB_TYPE_GUID_EXT
-+ *
-+ * This macro returns a pointer to the data buffer in a HOB specified by hob.
-+ * hob is assumed to be a HOB of type HOB_TYPE_GUID_EXT.
-+ *
-+ * @hob:    A pointer to a HOB.
-+ *
-+ * @return: A pointer to the data buffer in a HOB.
-+ */
-+static inline void *get_guid_hob_data(u8 *hob)
-+{
-+	return (void *)(hob + sizeof(struct hob_guid));
-+}
-+
-+/**
-+ * get_guid_hob_data_size() - return the size of the data buffer from a HOB
-+ *                            of type HOB_TYPE_GUID_EXT
-+ *
-+ * This macro returns the size, in bytes, of the data buffer in a HOB
-+ * specified by hob. hob is assumed to be a HOB of type HOB_TYPE_GUID_EXT.
-+ *
-+ * @hob:    A pointer to a HOB.
-+ *
-+ * @return: The size of the data buffer.
-+ */
-+static inline u16 get_guid_hob_data_size(u8 *hob)
-+{
-+	union hob_pointers hob_p = *(union hob_pointers *)hob;
-+	return get_hob_length(hob_p) - sizeof(struct hob_guid);
-+}
-+
-+/* FSP specific GUID HOB definitions */
-+#define FSP_GUID_DATA1		0x912740be
-+#define FSP_GUID_DATA2		0x2284
-+#define FSP_GUID_DATA3		0x4734
-+#define FSP_GUID_DATA4_0	0xb9
-+#define FSP_GUID_DATA4_1	0x71
-+#define FSP_GUID_DATA4_2	0x84
-+#define FSP_GUID_DATA4_3	0xb0
-+#define FSP_GUID_DATA4_4	0x27
-+#define FSP_GUID_DATA4_5	0x35
-+#define FSP_GUID_DATA4_6	0x3f
-+#define FSP_GUID_DATA4_7	0x0c
-+
-+#define FSP_HEADER_GUID \
-+	{ \
-+	FSP_GUID_DATA1, FSP_GUID_DATA2, FSP_GUID_DATA3, \
-+	{ FSP_GUID_DATA4_0, FSP_GUID_DATA4_1, FSP_GUID_DATA4_2, \
-+	  FSP_GUID_DATA4_3, FSP_GUID_DATA4_4, FSP_GUID_DATA4_5, \
-+	  FSP_GUID_DATA4_6, FSP_GUID_DATA4_7 } \
-+	}
-+
-+#define FSP_NON_VOLATILE_STORAGE_HOB_GUID \
-+	{ \
-+	0x721acf02, 0x4d77, 0x4c2a, \
-+	{ 0xb3, 0xdc, 0x27, 0xb, 0x7b, 0xa9, 0xe4, 0xb0 } \
-+	}
-+
-+#define FSP_BOOTLOADER_TEMP_MEM_HOB_GUID \
-+	{ \
-+	0xbbcff46c, 0xc8d3, 0x4113, \
-+	{ 0x89, 0x85, 0xb9, 0xd4, 0xf3, 0xb3, 0xf6, 0x4e } \
-+	}
-+
-+#define FSP_HOB_RESOURCE_OWNER_FSP_GUID \
-+	{ \
-+	0x69a79759, 0x1373, 0x4367, \
-+	{ 0xa6, 0xc4, 0xc7, 0xf5, 0x9e, 0xfd, 0x98, 0x6e } \
-+	}
-+
-+#define FSP_HOB_RESOURCE_OWNER_TSEG_GUID \
-+	{ \
-+	0xd038747c, 0xd00c, 0x4980, \
-+	{ 0xb3, 0x19, 0x49, 0x01, 0x99, 0xa4, 0x7d, 0x55 } \
-+	}
-+
-+#define FSP_HOB_RESOURCE_OWNER_GRAPHICS_GUID \
-+	{ \
-+	0x9c7c3aa7, 0x5332, 0x4917, \
-+	{ 0x82, 0xb9, 0x56, 0xa5, 0xf3, 0xe6, 0x2a, 0x07 } \
-+	}
-+
-+#endif
-diff -ruN u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/fsp/fsp_infoheader.h u-boot/arch/x86/include/asm/arch-queensbay/fsp/fsp_infoheader.h
---- u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/fsp/fsp_infoheader.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/include/asm/arch-queensbay/fsp/fsp_infoheader.h	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,32 @@
-+/*
-+ * Copyright (C) 2013, Intel Corporation
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	Intel
-+ */
-+
-+#ifndef _FSP_HEADER_H_
-+#define _FSP_HEADER_H_
-+
-+#define FSP_HEADER_OFF	0x94	/* Fixed FSP header offset in the FSP image */
-+
-+struct __packed fsp_header {
-+	u32	sign;			/* 'FSPH' */
-+	u32	hdr_len;		/* header length */
-+	u8	reserved1[3];
-+	u8	hdr_rev;		/* header rev */
-+	u32	img_rev;		/* image rev */
-+	char	img_id[8];		/* signature string */
-+	u32	img_size;		/* image size */
-+	u32	img_base;		/* image base */
-+	u32	img_attr;		/* image attribute */
-+	u32	cfg_region_off;		/* configuration region offset */
-+	u32	cfg_region_size;	/* configuration region size */
-+	u32	api_num;		/* number of API entries */
-+	u32	fsp_tempram_init;	/* tempram_init offset */
-+	u32	fsp_init;		/* fsp_init offset */
-+	u32	fsp_notify;		/* fsp_notify offset */
-+	u32	reserved2;
-+};
-+
-+#endif
-diff -ruN u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/fsp/fsp_platform.h u-boot/arch/x86/include/asm/arch-queensbay/fsp/fsp_platform.h
---- u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/fsp/fsp_platform.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/include/asm/arch-queensbay/fsp/fsp_platform.h	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,15 @@
-+/*
-+ * Copyright (C) 2013, Intel Corporation
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	Intel
-+ */
-+
-+#ifndef __FSP_PLATFORM_H__
-+#define __FSP_PLATFORM_H__
-+
-+struct fspinit_rtbuf {
-+	struct common_buf	common;	/* FSP common runtime data structure */
-+};
-+
-+#endif
-diff -ruN u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/fsp/fsp_support.h u-boot/arch/x86/include/asm/arch-queensbay/fsp/fsp_support.h
---- u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/fsp/fsp_support.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/include/asm/arch-queensbay/fsp/fsp_support.h	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,207 @@
-+/*
-+ * Copyright (C) 2013, Intel Corporation
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	Intel
-+ */
-+
-+#ifndef __FSP_SUPPORT_H__
-+#define __FSP_SUPPORT_H__
-+
-+#include "fsp_types.h"
-+#include "fsp_fv.h"
-+#include "fsp_ffs.h"
-+#include "fsp_api.h"
-+#include "fsp_hob.h"
-+#include "fsp_platform.h"
-+#include "fsp_infoheader.h"
-+#include "fsp_bootmode.h"
-+#include "fsp_vpd.h"
-+
-+struct shared_data {
-+	struct fsp_header	*fsp_hdr;
-+	u32			*stack_top;
-+	struct upd_region	fsp_upd;
-+};
-+
-+#define FSP_LOWMEM_BASE		0x100000UL
-+#define FSP_HIGHMEM_BASE	0x100000000ULL
-+
-+/**
-+ * FSP Continuation assembly helper routine
-+ *
-+ * This routine jumps to the C version of FSP continuation function
-+ */
-+void asm_continuation(void);
-+
-+/**
-+ * FSP initialization complete
-+ *
-+ * This is the function that indicates FSP initialization is complete and jumps
-+ * back to the bootloader with HOB list pointer as the parameter.
-+ *
-+ * @hob_list:    HOB list pointer
-+ */
-+void fsp_init_done(void *hob_list);
-+
-+/**
-+ * FSP Continuation function
-+ *
-+ * @shared_data: Shared data base before stack migration
-+ * @status:      Always 0
-+ * @hob_list:    HOB list pointer
-+ *
-+ * @retval:      Never returns
-+ */
-+void fsp_continue(struct shared_data *shared_data, u32 status,
-+		  void *hob_list);
-+
-+/**
-+ * Find FSP header offset in FSP image
-+ *
-+ * @retval: the offset of FSP header. If signature is invalid, returns 0.
-+ */
-+u32 find_fsp_header(void);
-+
-+/**
-+ * FSP initialization wrapper function.
-+ *
-+ * @stack_top: bootloader stack top address
-+ * @boot_mode: boot mode defined in fsp_bootmode.h
-+ * @nvs_buf:   Non-volatile memory buffer pointer
-+ */
-+void fsp_init(u32 stack_top, u32 boot_mode, void *nvs_buf);
-+
-+/**
-+ * FSP notification wrapper function
-+ *
-+ * @fsp_hdr: Pointer to FSP information header
-+ * @phase:   FSP initialization phase defined in enum fsp_phase
-+ *
-+ * @retval:  compatible status code with EFI_STATUS defined in PI spec
-+ */
-+u32 fsp_notify(struct fsp_header *fsp_hdr, u32 phase);
-+
-+/**
-+ * This function retrieves the top of usable low memory.
-+ *
-+ * @hob_list: A HOB list pointer.
-+ *
-+ * @retval:   Usable low memory top.
-+ */
-+u32 fsp_get_usable_lowmem_top(const void *hob_list);
-+
-+/**
-+ * This function retrieves the top of usable high memory.
-+ *
-+ * @hob_list: A HOB list pointer.
-+ *
-+ * @retval:   Usable high memory top.
-+ */
-+u64 fsp_get_usable_highmem_top(const void *hob_list);
-+
-+/**
-+ * This function retrieves a special reserved memory region.
-+ *
-+ * @hob_list: A HOB list pointer.
-+ * @len:      A pointer to the GUID HOB data buffer length.
-+ *            If the GUID HOB is located, the length will be updated.
-+ * @guid:     A pointer to the owner guild.
-+ *
-+ * @retval:   Reserved region start address.
-+ *            0 if this region does not exist.
-+ */
-+u64 fsp_get_reserved_mem_from_guid(const void *hob_list,
-+				   u64 *len, struct efi_guid *guid);
-+
-+/**
-+ * This function retrieves the FSP reserved normal memory.
-+ *
-+ * @hob_list: A HOB list pointer.
-+ * @len:      A pointer to the FSP reserved memory length buffer.
-+ *            If the GUID HOB is located, the length will be updated.
-+ * @retval:   FSP reserved memory base
-+ *            0 if this region does not exist.
-+ */
-+u32 fsp_get_fsp_reserved_mem(const void *hob_list, u32 *len);
-+
-+/**
-+ * This function retrieves the TSEG reserved normal memory.
-+ *
-+ * @hob_list:      A HOB list pointer.
-+ * @len:           A pointer to the TSEG reserved memory length buffer.
-+ *                 If the GUID HOB is located, the length will be updated.
-+ *
-+ * @retval NULL:   Failed to find the TSEG reserved memory.
-+ * @retval others: TSEG reserved memory base.
-+ */
-+u32 fsp_get_tseg_reserved_mem(const void *hob_list, u32 *len);
-+
-+/**
-+ * Returns the next instance of a HOB type from the starting HOB.
-+ *
-+ * @type:     HOB type to search
-+ * @hob_list: A pointer to the HOB list
-+ *
-+ * @retval:   A HOB object with matching type; Otherwise NULL.
-+ */
-+void *fsp_get_next_hob(u16 type, const void *hob_list);
-+
-+/**
-+ * Returns the next instance of the matched GUID HOB from the starting HOB.
-+ *
-+ * @guid:     GUID to search
-+ * @hob_list: A pointer to the HOB list
-+ *
-+ * @retval:   A HOB object with matching GUID; Otherwise NULL.
-+ */
-+void *fsp_get_next_guid_hob(const struct efi_guid *guid, const void *hob_list);
-+
-+/**
-+ * This function retrieves a GUID HOB data buffer and size.
-+ *
-+ * @hob_list:      A HOB list pointer.
-+ * @len:           A pointer to the GUID HOB data buffer length.
-+ *                 If the GUID HOB is located, the length will be updated.
-+ * @guid           A pointer to HOB GUID.
-+ *
-+ * @retval NULL:   Failed to find the GUID HOB.
-+ * @retval others: GUID HOB data buffer pointer.
-+ */
-+void *fsp_get_guid_hob_data(const void *hob_list, u32 *len,
-+			    struct efi_guid *guid);
-+
-+/**
-+ * This function retrieves FSP Non-volatile Storage HOB buffer and size.
-+ *
-+ * @hob_list:      A HOB list pointer.
-+ * @len:           A pointer to the NVS data buffer length.
-+ *                 If the HOB is located, the length will be updated.
-+ *
-+ * @retval NULL:   Failed to find the NVS HOB.
-+ * @retval others: FSP NVS data buffer pointer.
-+ */
-+void *fsp_get_nvs_data(const void *hob_list, u32 *len);
-+
-+/**
-+ * This function retrieves Bootloader temporary stack buffer and size.
-+ *
-+ * @hob_list:      A HOB list pointer.
-+ * @len:           A pointer to the bootloader temporary stack length.
-+ *                 If the HOB is located, the length will be updated.
-+ *
-+ * @retval NULL:   Failed to find the bootloader temporary stack HOB.
-+ * @retval others: Bootloader temporary stackbuffer pointer.
-+ */
-+void *fsp_get_bootloader_tmp_mem(const void *hob_list, u32 *len);
-+
-+/**
-+ * This function overrides the default configurations in the UPD data region.
-+ *
-+ * @fsp_upd: A pointer to the upd_region data strcture
-+ *
-+ * @return:  None
-+ */
-+void update_fsp_upd(struct upd_region *fsp_upd);
-+
-+#endif
-diff -ruN u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/fsp/fsp_types.h u-boot/arch/x86/include/asm/arch-queensbay/fsp/fsp_types.h
---- u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/fsp/fsp_types.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/include/asm/arch-queensbay/fsp/fsp_types.h	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,82 @@
-+/*
-+ * Copyright (C) 2013, Intel Corporation
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	Intel
-+ */
-+
-+#ifndef __FSP_TYPES_H__
-+#define __FSP_TYPES_H__
-+
-+/* 128 bit buffer containing a unique identifier value */
-+struct efi_guid {
-+	u32	data1;
-+	u16	data2;
-+	u16	data3;
-+	u8	data4[8];
-+};
-+
-+/**
-+ * Returns a 16-bit signature built from 2 ASCII characters.
-+ *
-+ * This macro returns a 16-bit value built from the two ASCII characters
-+ * specified by A and B.
-+ *
-+ * @A: The first ASCII character.
-+ * @B: The second ASCII character.
-+ *
-+ * @return: A 16-bit value built from the two ASCII characters specified by
-+ *          A and B.
-+ */
-+#define SIGNATURE_16(A, B)	((A) | (B << 8))
-+
-+/**
-+ * Returns a 32-bit signature built from 4 ASCII characters.
-+ *
-+ * This macro returns a 32-bit value built from the four ASCII characters
-+ * specified by A, B, C, and D.
-+ *
-+ * @A: The first ASCII character.
-+ * @B: The second ASCII character.
-+ * @C: The third ASCII character.
-+ * @D: The fourth ASCII character.
-+ *
-+ * @return: A 32-bit value built from the two ASCII characters specified by
-+ *          A, B, C and D.
-+ */
-+#define SIGNATURE_32(A, B, C, D)	\
-+	(SIGNATURE_16(A, B) | (SIGNATURE_16(C, D) << 16))
-+
-+/**
-+ * Returns a 64-bit signature built from 8 ASCII characters.
-+ *
-+ * This macro returns a 64-bit value built from the eight ASCII characters
-+ * specified by A, B, C, D, E, F, G,and H.
-+ *
-+ * @A: The first ASCII character.
-+ * @B: The second ASCII character.
-+ * @C: The third ASCII character.
-+ * @D: The fourth ASCII character.
-+ * @E: The fifth ASCII character.
-+ * @F: The sixth ASCII character.
-+ * @G: The seventh ASCII character.
-+ * @H: The eighth ASCII character.
-+ *
-+ * @return: A 64-bit value built from the two ASCII characters specified by
-+ *          A, B, C, D, E, F, G and H.
-+ */
-+#define SIGNATURE_64(A, B, C, D, E, F, G, H)	\
-+	(SIGNATURE_32(A, B, C, D) | ((u64)(SIGNATURE_32(E, F, G, H)) << 32))
-+
-+/*
-+ * Define FSP API return status code.
-+ * Compatiable with EFI_STATUS defined in PI Spec.
-+ */
-+#define FSP_SUCCESS		0
-+#define FSP_INVALID_PARAM	0x80000002
-+#define FSP_UNSUPPORTED		0x80000003
-+#define FSP_DEVICE_ERROR	0x80000007
-+#define FSP_NOT_FOUND		0x8000000E
-+#define FSP_ALREADY_STARTED	0x80000014
-+
-+#endif
-diff -ruN u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/fsp/fsp_vpd.h u-boot/arch/x86/include/asm/arch-queensbay/fsp/fsp_vpd.h
---- u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/fsp/fsp_vpd.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/include/asm/arch-queensbay/fsp/fsp_vpd.h	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,56 @@
-+/*
-+ * Copyright (C) 2013, Intel Corporation
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * This file is automatically generated. Please do NOT modify !!!
-+ *
-+ * SPDX-License-Identifier:	Intel
-+ */
-+
-+#ifndef __VPDHEADER_H__
-+#define __VPDHEADER_H__
-+
-+#define UPD_TERMINATOR	0x55AA
-+
-+struct __packed upd_region {
-+	u64	sign;			/* Offset 0x0000 */
-+	u64	reserved;		/* Offset 0x0008 */
-+	u8	dummy[240];		/* Offset 0x0010 */
-+	u8	hda_verb_header[12];	/* Offset 0x0100 */
-+	u32	hda_verb_length;	/* Offset 0x010C */
-+	u8	hda_verb_data0[16];	/* Offset 0x0110 */
-+	u8	hda_verb_data1[16];	/* Offset 0x0120 */
-+	u8	hda_verb_data2[16];	/* Offset 0x0130 */
-+	u8	hda_verb_data3[16];	/* Offset 0x0140 */
-+	u8	hda_verb_data4[16];	/* Offset 0x0150 */
-+	u8	hda_verb_data5[16];	/* Offset 0x0160 */
-+	u8	hda_verb_data6[16];	/* Offset 0x0170 */
-+	u8	hda_verb_data7[16];	/* Offset 0x0180 */
-+	u8	hda_verb_data8[16];	/* Offset 0x0190 */
-+	u8	hda_verb_data9[16];	/* Offset 0x01A0 */
-+	u8	hda_verb_data10[16];	/* Offset 0x01B0 */
-+	u8	hda_verb_data11[16];	/* Offset 0x01C0 */
-+	u8	hda_verb_data12[16];	/* Offset 0x01D0 */
-+	u8	hda_verb_data13[16];	/* Offset 0x01E0 */
-+	u8	hda_verb_pad[47];	/* Offset 0x01F0 */
-+	u16	terminator;		/* Offset 0x021F */
-+};
-+
-+#define VPD_IMAGE_ID	0x445056574F4E4E4D	/* 'MNNOWVPD' */
-+#define VPD_IMAGE_REV	0x00000301
-+
-+struct __packed vpd_region {
-+	u64	sign;			/* Offset 0x0000 */
-+	u32	img_rev;		/* Offset 0x0008 */
-+	u32	upd_offset;		/* Offset 0x000C */
-+	u8	unused[16];		/* Offset 0x0010 */
-+	u32	fsp_res_memlen;		/* Offset 0x0020 */
-+	u8	disable_pcie1;		/* Offset 0x0024 */
-+	u8	disable_pcie2;		/* Offset 0x0025 */
-+	u8	disable_pcie3;		/* Offset 0x0026 */
-+	u8	enable_azalia;		/* Offset 0x0027 */
-+	u8	legacy_seg_decode;	/* Offset 0x0028 */
-+	u8	pcie_port_ioh;		/* Offset 0x0029 */
-+};
-+
-+#endif
-diff -ruN u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/gpio.h u-boot/arch/x86/include/asm/arch-queensbay/gpio.h
---- u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/gpio.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/include/asm/arch-queensbay/gpio.h	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,13 @@
-+/*
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#ifndef _X86_ARCH_GPIO_H_
-+#define _X86_ARCH_GPIO_H_
-+
-+/* Where in config space is the register that points to the GPIO registers? */
-+#define PCI_CFG_GPIOBASE 0x44
-+
-+#endif /* _X86_ARCH_GPIO_H_ */
-diff -ruN u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/tnc.h u-boot/arch/x86/include/asm/arch-queensbay/tnc.h
---- u-boot-2015.01-rc3/arch/x86/include/asm/arch-queensbay/tnc.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/include/asm/arch-queensbay/tnc.h	2015-01-01 17:34:32.253503252 +0100
-@@ -0,0 +1,15 @@
-+/*
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#ifndef _X86_ARCH_TNC_H_
-+#define _X86_ARCH_TNC_H_
-+
-+#include <pci.h>
-+
-+/* PCI Configuration Space (D31:F0): LPC */
-+#define PCH_LPC_DEV	PCI_BDF(0, 0x1f, 0)
-+
-+#endif /* _X86_ARCH_TNC_H_ */
-diff -ruN u-boot-2015.01-rc3/arch/x86/include/asm/config.h u-boot/arch/x86/include/asm/config.h
---- u-boot-2015.01-rc3/arch/x86/include/asm/config.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/include/asm/config.h	2015-01-01 17:34:32.257503186 +0100
-@@ -10,6 +10,5 @@
- #define CONFIG_SYS_GENERIC_BOARD
- #define CONFIG_LMB
- #define CONFIG_SYS_BOOT_RAMDISK_HIGH
--#define asmlinkage __attribute__((regparm(0)))
- 
- #endif
-diff -ruN u-boot-2015.01-rc3/arch/x86/include/asm/global_data.h u-boot/arch/x86/include/asm/global_data.h
---- u-boot-2015.01-rc3/arch/x86/include/asm/global_data.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/include/asm/global_data.h	2015-01-01 17:34:32.257503186 +0100
-@@ -47,6 +47,9 @@
- 	enum pei_boot_mode_t pei_boot_mode;
- 	const struct pch_gpio_map *gpio_map;	/* board GPIO map */
- 	struct memory_info meminfo;	/* Memory information */
-+#ifdef CONFIG_HAVE_FSP
-+	void	*hob_list;		/* FSP HOB list */
-+#endif
- };
- 
- #endif
-diff -ruN u-boot-2015.01-rc3/arch/x86/include/asm/gpio.h u-boot/arch/x86/include/asm/gpio.h
---- u-boot-2015.01-rc3/arch/x86/include/asm/gpio.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/include/asm/gpio.h	2015-01-01 17:34:32.257503186 +0100
-@@ -11,7 +11,7 @@
- #include <asm-generic/gpio.h>
- 
- struct ich6_bank_platdata {
--	uint32_t base_addr;
-+	uint16_t base_addr;
- 	const char *bank_name;
- };
- 
-@@ -147,6 +147,7 @@
- 	} set3;
- };
- 
-+void setup_pch_gpios(u16 gpiobase, const struct pch_gpio_map *gpio);
- void ich_gpio_set_gpio_map(const struct pch_gpio_map *map);
- 
- #endif /* _X86_GPIO_H_ */
-diff -ruN u-boot-2015.01-rc3/arch/x86/include/asm/ibmpc.h u-boot/arch/x86/include/asm/ibmpc.h
---- u-boot-2015.01-rc3/arch/x86/include/asm/ibmpc.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/include/asm/ibmpc.h	2015-01-01 17:34:32.257503186 +0100
-@@ -18,4 +18,7 @@
- #define SYSCTLA         0x92
- #define SLAVE_PIC       0xa0
- 
-+#define UART0_BASE	0x3f8
-+#define UART1_BASE	0x2f8
-+
- #endif
-diff -ruN u-boot-2015.01-rc3/arch/x86/include/asm/linkage.h u-boot/arch/x86/include/asm/linkage.h
---- u-boot-2015.01-rc3/arch/x86/include/asm/linkage.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/include/asm/linkage.h	2015-01-01 17:34:32.257503186 +0100
-@@ -0,0 +1,6 @@
-+#ifndef _ASM_X86_LINKAGE_H
-+#define _ASM_X86_LINKAGE_H
-+
-+#define asmlinkage CPP_ASMLINKAGE __attribute__((regparm(0)))
-+
-+#endif /* _ASM_X86_LINKAGE_H */
-diff -ruN u-boot-2015.01-rc3/arch/x86/include/asm/pnp_def.h u-boot/arch/x86/include/asm/pnp_def.h
---- u-boot-2015.01-rc3/arch/x86/include/asm/pnp_def.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/include/asm/pnp_def.h	2015-01-01 17:34:32.257503186 +0100
-@@ -0,0 +1,90 @@
-+/*
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * Adapted from coreboot src/include/device/pnp_def.h
-+ * and arch/x86/include/arch/io.h
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#ifndef _ASM_PNP_DEF_H_
-+#define _ASM_PNP_DEF_H_
-+
-+#include <asm/io.h>
-+
-+#define PNP_IDX_EN   0x30
-+#define PNP_IDX_IO0  0x60
-+#define PNP_IDX_IO1  0x62
-+#define PNP_IDX_IO2  0x64
-+#define PNP_IDX_IO3  0x66
-+#define PNP_IDX_IRQ0 0x70
-+#define PNP_IDX_IRQ1 0x72
-+#define PNP_IDX_DRQ0 0x74
-+#define PNP_IDX_DRQ1 0x75
-+#define PNP_IDX_MSC0 0xf0
-+#define PNP_IDX_MSC1 0xf1
-+
-+/* Generic functions for pnp devices */
-+
-+/*
-+ * pnp device is a 16-bit integer composed of its i/o port address at high byte
-+ * and logic function number at low byte.
-+ */
-+#define PNP_DEV(PORT, FUNC) (((PORT) << 8) | (FUNC))
-+
-+static inline void pnp_write_config(uint16_t dev, uint8_t reg, uint8_t value)
-+{
-+	uint8_t port = dev >> 8;
-+
-+	outb(reg, port);
-+	outb(value, port + 1);
-+}
-+
-+static inline uint8_t pnp_read_config(uint16_t dev, uint8_t reg)
-+{
-+	uint8_t port = dev >> 8;
-+
-+	outb(reg, port);
-+	return inb(port + 1);
-+}
-+
-+static inline void pnp_set_logical_device(uint16_t dev)
-+{
-+	uint8_t device = dev & 0xff;
-+
-+	pnp_write_config(dev, 0x07, device);
-+}
-+
-+static inline void pnp_set_enable(uint16_t dev, int enable)
-+{
-+	pnp_write_config(dev, PNP_IDX_EN, enable ? 1 : 0);
-+}
-+
-+static inline int pnp_read_enable(uint16_t dev)
-+{
-+	return !!pnp_read_config(dev, PNP_IDX_EN);
-+}
-+
-+static inline void pnp_set_iobase(uint16_t dev, uint8_t index, uint16_t iobase)
-+{
-+	pnp_write_config(dev, index + 0, (iobase >> 8) & 0xff);
-+	pnp_write_config(dev, index + 1, iobase & 0xff);
-+}
-+
-+static inline uint16_t pnp_read_iobase(uint16_t dev, uint8_t index)
-+{
-+	return ((uint16_t)(pnp_read_config(dev, index)) << 8) |
-+		pnp_read_config(dev, index + 1);
-+}
-+
-+static inline void pnp_set_irq(uint16_t dev, uint8_t index, unsigned irq)
-+{
-+	pnp_write_config(dev, index, irq);
-+}
-+
-+static inline void pnp_set_drq(uint16_t dev, uint8_t index, unsigned drq)
-+{
-+	pnp_write_config(dev, index, drq & 0xff);
-+}
-+
-+#endif /* _ASM_PNP_DEF_H_ */
-diff -ruN u-boot-2015.01-rc3/arch/x86/include/asm/post.h u-boot/arch/x86/include/asm/post.h
---- u-boot-2015.01-rc3/arch/x86/include/asm/post.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/include/asm/post.h	2015-01-01 17:34:32.257503186 +0100
-@@ -33,6 +33,8 @@
- #define POST_LAPIC		0x30
- 
- #define POST_RAM_FAILURE	0xea
-+#define POST_BIST_FAILURE	0xeb
-+#define POST_CAR_FAILURE	0xec
- 
- /* Output a post code using al - value must be 0 to 0xff */
- #ifdef __ASSEMBLY__
-diff -ruN u-boot-2015.01-rc3/arch/x86/Kconfig u-boot/arch/x86/Kconfig
---- u-boot-2015.01-rc3/arch/x86/Kconfig	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/Kconfig	2015-01-01 17:34:32.249503317 +0100
-@@ -32,6 +32,15 @@
- 	  and it provides a 2560x1700 high resolution touch-enabled LCD
- 	  display.
- 
-+config TARGET_CROWNBAY
-+	bool "Support Intel Crown Bay CRB"
-+	help
-+	  This is the Intel Crown Bay Customer Reference Board. It contains
-+	  the Intel Atom Processor E6xx populated on the COM Express module
-+	  with 1GB DDR2 soldered down memory and a carrier board with the
-+	  Intel Platform Controller Hub EG20T, other system components and
-+	  peripheral connectors for PCIe/SATA/USB/LAN/SD/UART/Audio/LVDS.
-+
- endchoice
- 
- config RAMBASE
-@@ -61,9 +70,85 @@
- config SMM_TSEG_SIZE
- 	hex
- 
-+config BOARD_ROMSIZE_KB_512
-+	bool
-+config BOARD_ROMSIZE_KB_1024
-+	bool
-+config BOARD_ROMSIZE_KB_2048
-+	bool
-+config BOARD_ROMSIZE_KB_4096
-+	bool
-+config BOARD_ROMSIZE_KB_8192
-+	bool
-+config BOARD_ROMSIZE_KB_16384
-+	bool
-+
-+choice
-+	prompt "ROM chip size"
-+	default UBOOT_ROMSIZE_KB_512 if BOARD_ROMSIZE_KB_512
-+	default UBOOT_ROMSIZE_KB_1024 if BOARD_ROMSIZE_KB_1024
-+	default UBOOT_ROMSIZE_KB_2048 if BOARD_ROMSIZE_KB_2048
-+	default UBOOT_ROMSIZE_KB_4096 if BOARD_ROMSIZE_KB_4096
-+	default UBOOT_ROMSIZE_KB_8192 if BOARD_ROMSIZE_KB_8192
-+	default UBOOT_ROMSIZE_KB_16384 if BOARD_ROMSIZE_KB_16384
-+	help
-+	  Select the size of the ROM chip you intend to flash U-Boot on.
-+
-+	  The build system will take care of creating a u-boot.rom file
-+	  of the matching size.
-+
-+config UBOOT_ROMSIZE_KB_512
-+	bool "512 KB"
-+	help
-+	  Choose this option if you have a 512 KB ROM chip.
-+
-+config UBOOT_ROMSIZE_KB_1024
-+	bool "1024 KB (1 MB)"
-+	help
-+	  Choose this option if you have a 1024 KB (1 MB) ROM chip.
-+
-+config UBOOT_ROMSIZE_KB_2048
-+	bool "2048 KB (2 MB)"
-+	help
-+	  Choose this option if you have a 2048 KB (2 MB) ROM chip.
-+
-+config UBOOT_ROMSIZE_KB_4096
-+	bool "4096 KB (4 MB)"
-+	help
-+	  Choose this option if you have a 4096 KB (4 MB) ROM chip.
-+
-+config UBOOT_ROMSIZE_KB_8192
-+	bool "8192 KB (8 MB)"
-+	help
-+	  Choose this option if you have a 8192 KB (8 MB) ROM chip.
-+
-+config UBOOT_ROMSIZE_KB_16384
-+	bool "16384 KB (16 MB)"
-+	help
-+	  Choose this option if you have a 16384 KB (16 MB) ROM chip.
-+
-+endchoice
-+
-+# Map the config names to an integer (KB).
-+config UBOOT_ROMSIZE_KB
-+	int
-+	default 512 if UBOOT_ROMSIZE_KB_512
-+	default 1024 if UBOOT_ROMSIZE_KB_1024
-+	default 2048 if UBOOT_ROMSIZE_KB_2048
-+	default 4096 if UBOOT_ROMSIZE_KB_4096
-+	default 8192 if UBOOT_ROMSIZE_KB_8192
-+	default 16384 if UBOOT_ROMSIZE_KB_16384
-+
-+# Map the config names to a hex value (bytes).
- config ROM_SIZE
- 	hex
--	default 0x800000
-+	default 0x80000 if UBOOT_ROMSIZE_KB_512
-+	default 0x100000 if UBOOT_ROMSIZE_KB_1024
-+	default 0x200000 if UBOOT_ROMSIZE_KB_2048
-+	default 0x400000 if UBOOT_ROMSIZE_KB_4096
-+	default 0x800000 if UBOOT_ROMSIZE_KB_8192
-+	default 0xc00000 if UBOOT_ROMSIZE_KB_12288
-+	default 0x1000000 if UBOOT_ROMSIZE_KB_16384
- 
- config HAVE_INTEL_ME
- 	bool "Platform requires Intel Management Engine"
-@@ -234,8 +319,12 @@
- 
- source "arch/x86/cpu/ivybridge/Kconfig"
- 
-+source "arch/x86/cpu/queensbay/Kconfig"
-+
- source "board/coreboot/coreboot/Kconfig"
- 
- source "board/google/chromebook_link/Kconfig"
- 
-+source "board/intel/crownbay/Kconfig"
-+
- endmenu
-diff -ruN u-boot-2015.01-rc3/arch/x86/lib/asm-offsets.c u-boot/arch/x86/lib/asm-offsets.c
---- u-boot-2015.01-rc3/arch/x86/lib/asm-offsets.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/lib/asm-offsets.c	2015-01-01 17:34:32.257503186 +0100
-@@ -17,6 +17,9 @@
- 
- int main(void)
- {
--	DEFINE(GENERATED_GD_RELOC_OFF, offsetof(gd_t, reloc_off));
-+	DEFINE(GD_BIST, offsetof(gd_t, arch.bist));
-+#ifdef CONFIG_HAVE_FSP
-+	DEFINE(GD_HOB_LIST, offsetof(gd_t, arch.hob_list));
-+#endif
- 	return 0;
- }
-diff -ruN u-boot-2015.01-rc3/arch/x86/lib/bios.c u-boot/arch/x86/lib/bios.c
---- u-boot-2015.01-rc3/arch/x86/lib/bios.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/lib/bios.c	2015-01-01 17:34:32.257503186 +0100
-@@ -9,6 +9,7 @@
- #include <common.h>
- #include <bios_emul.h>
- #include <vbe.h>
-+#include <linux/linkage.h>
- #include <asm/cache.h>
- #include <asm/processor.h>
- #include <asm/i8259.h>
-diff -ruN u-boot-2015.01-rc3/arch/x86/lib/bios.h u-boot/arch/x86/lib/bios.h
---- u-boot-2015.01-rc3/arch/x86/lib/bios.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/lib/bios.h	2015-01-01 17:34:32.257503186 +0100
-@@ -10,6 +10,8 @@
- #ifndef _X86_LIB_BIOS_H
- #define _X86_LIB_BIOS_H
- 
-+#include <linux/linkage.h>
-+
- #define REALMODE_BASE		0x600
- 
- #ifdef __ASSEMBLY__
-diff -ruN u-boot-2015.01-rc3/arch/x86/lib/cmd_hob.c u-boot/arch/x86/lib/cmd_hob.c
---- u-boot-2015.01-rc3/arch/x86/lib/cmd_hob.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/arch/x86/lib/cmd_hob.c	2015-01-01 17:34:32.257503186 +0100
-@@ -0,0 +1,65 @@
-+/*
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <command.h>
-+#include <linux/compiler.h>
-+#include <asm/arch/fsp/fsp_support.h>
-+
-+DECLARE_GLOBAL_DATA_PTR;
-+
-+static char *hob_type[] = {
-+	"reserved",
-+	"Hand-off",
-+	"Memory Allocation",
-+	"Resource Descriptor",
-+	"GUID Extension",
-+	"Firmware Volume",
-+	"CPU",
-+	"Memory Pool",
-+	"reserved",
-+	"Firmware Volume 2",
-+	"Load PEIM Unused",
-+	"UEFI Capsule",
-+};
-+
-+int do_hob(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
-+{
-+	union hob_pointers hob;
-+	u16 type;
-+	char *desc;
-+	int i = 0;
-+
-+	hob.raw = (u8 *)gd->arch.hob_list;
-+
-+	printf("HOB list address: 0x%08x\n\n", (unsigned int)hob.raw);
-+
-+	printf("No. | Address  | Type                | Length in Bytes\n");
-+	printf("----|----------|---------------------|----------------\n");
-+	while (!end_of_hob(hob)) {
-+		printf("%-3d | %08x | ", i, (unsigned int)hob.raw);
-+		type = get_hob_type(hob);
-+		if (type == HOB_TYPE_UNUSED)
-+			desc = "*Unused*";
-+		else if (type == HOB_TYPE_EOH)
-+			desc = "*END OF HOB*";
-+		else if (type >= 0 && type <= ARRAY_SIZE(hob_type))
-+			desc = hob_type[type];
-+		else
-+			desc = "*Invalid Type*";
-+		printf("%-19s | %-15d\n", desc, get_hob_length(hob));
-+		hob.raw = get_next_hob(hob);
-+		i++;
-+	}
-+
-+	return 0;
-+}
-+
-+U_BOOT_CMD(
-+	hob,	1,	1,	do_hob,
-+	"print Firmware Support Package (FSP) Hand-Off Block information",
-+	""
-+);
-diff -ruN u-boot-2015.01-rc3/arch/x86/lib/Makefile u-boot/arch/x86/lib/Makefile
---- u-boot-2015.01-rc3/arch/x86/lib/Makefile	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/arch/x86/lib/Makefile	2015-01-01 17:34:32.257503186 +0100
-@@ -10,6 +10,7 @@
- obj-y += bios_interrupts.o
- obj-$(CONFIG_CMD_BOOTM) += bootm.o
- obj-y	+= cmd_boot.o
-+obj-$(CONFIG_HAVE_FSP) += cmd_hob.o
- obj-y	+= gcc.o
- obj-y	+= init_helpers.o
- obj-y	+= interrupts.o
-diff -ruN u-boot-2015.01-rc3/board/altera/socfpga/MAINTAINERS u-boot/board/altera/socfpga/MAINTAINERS
---- u-boot-2015.01-rc3/board/altera/socfpga/MAINTAINERS	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/altera/socfpga/MAINTAINERS	2015-01-01 17:34:32.269502990 +0100
-@@ -5,3 +5,8 @@
- F:	board/altera/socfpga/
- F:	include/configs/socfpga_cyclone5.h
- F:	configs/socfpga_cyclone5_defconfig
-+
-+SOCRATES BOARD
-+M:	Stefan Roese <sr at denx.de>
-+S:	Maintained
-+F:	configs/socfpga_socrates_defconfig
-diff -ruN u-boot-2015.01-rc3/board/altera/socfpga/socfpga_cyclone5.c u-boot/board/altera/socfpga/socfpga_cyclone5.c
---- u-boot-2015.01-rc3/board/altera/socfpga/socfpga_cyclone5.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/altera/socfpga/socfpga_cyclone5.c	2015-01-01 17:34:32.273502924 +0100
-@@ -12,7 +12,9 @@
- #include <usb/s3c_udc.h>
- #include <usb_mass_storage.h>
- 
-+#include <micrel.h>
- #include <netdev.h>
-+#include <phy.h>
- 
- DECLARE_GLOBAL_DATA_PTR;
- 
-@@ -44,6 +46,42 @@
- 	return 0;
- }
- 
-+/*
-+ * PHY configuration
-+ */
-+#ifdef CONFIG_PHY_MICREL_KSZ9021
-+int board_phy_config(struct phy_device *phydev)
-+{
-+	int ret;
-+	/*
-+	 * These skew settings for the KSZ9021 ethernet phy is required for ethernet
-+	 * to work reliably on most flavors of cyclone5 boards.
-+	 */
-+	ret = ksz9021_phy_extended_write(phydev,
-+					 MII_KSZ9021_EXT_RGMII_RX_DATA_SKEW,
-+					 0x0);
-+	if (ret)
-+		return ret;
-+
-+	ret = ksz9021_phy_extended_write(phydev,
-+					 MII_KSZ9021_EXT_RGMII_TX_DATA_SKEW,
-+					 0x0);
-+	if (ret)
-+		return ret;
-+
-+	ret = ksz9021_phy_extended_write(phydev,
-+					 MII_KSZ9021_EXT_RGMII_CLOCK_SKEW,
-+					 0xf0f0);
-+	if (ret)
-+		return ret;
-+
-+	if (phydev->drv->config)
-+		return phydev->drv->config(phydev);
-+
-+	return 0;
-+}
-+#endif
-+
- #ifdef CONFIG_USB_GADGET
- struct s3c_plat_otg_data socfpga_otg_data = {
- 	.regs_otg	= CONFIG_USB_DWC2_REG_ADDR,
-diff -ruN u-boot-2015.01-rc3/board/aristainetos/aristainetos.c u-boot/board/aristainetos/aristainetos.c
---- u-boot-2015.01-rc3/board/aristainetos/aristainetos.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/aristainetos/aristainetos.c	2015-01-01 17:34:32.281502792 +0100
-@@ -301,7 +301,7 @@
- 	/* clear gpr1[14], gpr1[18:17] to select anatop clock */
- 	clrsetbits_le32(&iomuxc_regs->gpr[1], IOMUX_GPR1_FEC_MASK, 0);
- 
--	ret = enable_fec_anatop_clock(ENET_50MHz);
-+	ret = enable_fec_anatop_clock(ENET_50MHZ);
- 	if (ret)
- 		return ret;
- 
-diff -ruN u-boot-2015.01-rc3/board/armltd/vexpress64/MAINTAINERS u-boot/board/armltd/vexpress64/MAINTAINERS
---- u-boot-2015.01-rc3/board/armltd/vexpress64/MAINTAINERS	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/armltd/vexpress64/MAINTAINERS	2015-01-01 17:34:32.281502792 +0100
-@@ -6,6 +6,6 @@
- F:	configs/vexpress_aemv8a_defconfig
- 
- VEXPRESS_AEMV8A_SEMI BOARD
--M:	Steve Rae <srae at broadcom.com>
-+M:	Linus Walleij <linus.walleij at linaro.org>
- S:	Maintained
- F:	configs/vexpress_aemv8a_semi_defconfig
-diff -ruN u-boot-2015.01-rc3/board/avionic-design/common/tamonten-ng.c u-boot/board/avionic-design/common/tamonten-ng.c
---- u-boot-2015.01-rc3/board/avionic-design/common/tamonten-ng.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/avionic-design/common/tamonten-ng.c	2015-01-01 17:34:32.285502727 +0100
-@@ -6,6 +6,7 @@
-  */
- 
- #include <common.h>
-+#include <dm.h>
- #include <asm/arch/pinmux.h>
- #include <asm/arch/gp_padctrl.h>
- #include <asm/arch/gpio.h>
-@@ -51,8 +52,15 @@
- 
- void pmu_write(uchar reg, uchar data)
- {
--	i2c_set_bus_num(4);	/* PMU is on bus 4 */
--	i2c_write(PMU_I2C_ADDRESS, reg, 1, &data, 1);
-+	struct udevice *dev;
-+	int ret;
-+
-+	ret = i2c_get_chip_for_busnum(4, PMU_I2C_ADDRESS, &dev);
-+	if (ret) {
-+		debug("%s: Cannot find PMIC I2C chip\n", __func__);
-+		return;
-+	}
-+	i2c_write(dev, reg, &data, 1);
- }
- 
- /*
-diff -ruN u-boot-2015.01-rc3/board/coreboot/coreboot/coreboot.c u-boot/board/coreboot/coreboot/coreboot.c
---- u-boot-2015.01-rc3/board/coreboot/coreboot/coreboot.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/coreboot/coreboot/coreboot.c	2015-01-01 17:34:32.305502399 +0100
-@@ -6,6 +6,7 @@
- 
- #include <common.h>
- #include <cros_ec.h>
-+#include <asm/gpio.h>
- 
- int arch_early_init_r(void)
- {
-@@ -14,3 +15,8 @@
- 
- 	return 0;
- }
-+
-+void setup_pch_gpios(u16 gpiobase, const struct pch_gpio_map *gpio)
-+{
-+	return;
-+}
-diff -ruN u-boot-2015.01-rc3/board/freescale/common/arm_sleep.c u-boot/board/freescale/common/arm_sleep.c
---- u-boot-2015.01-rc3/board/freescale/common/arm_sleep.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/freescale/common/arm_sleep.c	2015-01-01 17:34:32.357501547 +0100
-@@ -0,0 +1,95 @@
-+/*
-+ * Copyright 2014 Freescale Semiconductor, Inc.
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <asm/io.h>
-+#if !defined(CONFIG_ARMV7_NONSEC) || !defined(CONFIG_ARMV7_VIRT)
-+#error " Deep sleep needs non-secure mode support. "
-+#else
-+#include <asm/secure.h>
-+#endif
-+#include <asm/armv7.h>
-+#include <asm/cache.h>
-+
-+#if defined(CONFIG_LS102XA)
-+#include <asm/arch/immap_ls102xa.h>
-+#endif
-+
-+#include "sleep.h"
-+
-+DECLARE_GLOBAL_DATA_PTR;
-+
-+void __weak board_mem_sleep_setup(void)
-+{
-+}
-+
-+void __weak board_sleep_prepare(void)
-+{
-+}
-+
-+bool is_warm_boot(void)
-+{
-+	struct ccsr_gur __iomem *gur = (void *)CONFIG_SYS_FSL_GUTS_ADDR;
-+
-+	if (in_be32(&gur->crstsr) & DCFG_CCSR_CRSTSR_WDRFR)
-+		return 1;
-+
-+	return 0;
-+}
-+
-+void fsl_dp_disable_console(void)
-+{
-+	gd->flags |= GD_FLG_SILENT | GD_FLG_DISABLE_CONSOLE;
-+}
-+
-+/*
-+ * When wakeup from deep sleep, the first 128 bytes space
-+ * will be used to do DDR training which corrupts the data
-+ * in there. This function will restore them.
-+ */
-+static void dp_ddr_restore(void)
-+{
-+	u64 *src, *dst;
-+	int i;
-+	struct ccsr_scfg __iomem *scfg = (void *)CONFIG_SYS_FSL_SCFG_ADDR;
-+
-+	/* get the address of ddr date from SPARECR3 */
-+	src = (u64 *)in_le32(&scfg->sparecr[2]);
-+	dst = (u64 *)CONFIG_SYS_SDRAM_BASE;
-+
-+	for (i = 0; i < DDR_BUFF_LEN / 8; i++)
-+		*dst++ = *src++;
-+
-+	flush_dcache_all();
-+}
-+
-+static void dp_resume_prepare(void)
-+{
-+	dp_ddr_restore();
-+	board_sleep_prepare();
-+	armv7_init_nonsec();
-+	cleanup_before_linux();
-+}
-+
-+int fsl_dp_resume(void)
-+{
-+	u32 start_addr;
-+	void (*kernel_resume)(void);
-+	struct ccsr_scfg __iomem *scfg = (void *)CONFIG_SYS_FSL_SCFG_ADDR;
-+
-+	if (!is_warm_boot())
-+		return 0;
-+
-+	dp_resume_prepare();
-+
-+	/* Get the entry address and jump to kernel */
-+	start_addr = in_le32(&scfg->sparecr[1]);
-+	debug("Entry address is 0x%08x\n", start_addr);
-+	kernel_resume = (void (*)(void))start_addr;
-+	secure_ram_addr(_do_nonsec_entry)(kernel_resume, 0, 0, 0);
-+
-+	return 0;
-+}
-diff -ruN u-boot-2015.01-rc3/board/freescale/common/ls102xa_stream_id.c u-boot/board/freescale/common/ls102xa_stream_id.c
---- u-boot-2015.01-rc3/board/freescale/common/ls102xa_stream_id.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/freescale/common/ls102xa_stream_id.c	2015-01-01 17:34:32.357501547 +0100
-@@ -0,0 +1,18 @@
-+/*
-+ * Copyright 2014 Freescale Semiconductor
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <asm/io.h>
-+#include <asm/arch/ls102xa_stream_id.h>
-+
-+void ls102xa_config_smmu_stream_id(struct smmu_stream_id *id, uint32_t num)
-+{
-+	uint32_t *scfg = (uint32_t *)CONFIG_SYS_FSL_SCFG_ADDR;
-+	int i;
-+
-+	for (i = 0; i < num; i++)
-+		out_be32(scfg + id[i].offset, id[i].stream_id);
-+}
-diff -ruN u-boot-2015.01-rc3/board/freescale/common/Makefile u-boot/board/freescale/common/Makefile
---- u-boot-2015.01-rc3/board/freescale/common/Makefile	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/freescale/common/Makefile	2015-01-01 17:34:32.357501547 +0100
-@@ -37,6 +37,12 @@
- 
- obj-$(CONFIG_FSL_DIU_CH7301)	+= diu_ch7301.o
- 
-+ifdef CONFIG_ARM
-+obj-$(CONFIG_DEEP_SLEEP)		+= arm_sleep.o
-+else
-+obj-$(CONFIG_DEEP_SLEEP)		+= mpc85xx_sleep.o
-+endif
-+
- obj-$(CONFIG_FSL_DCU_SII9022A)    += dcu_sii9022a.o
- 
- obj-$(CONFIG_MPC8541CDS)	+= cds_pci_ft.o
-@@ -56,10 +62,14 @@
- obj-$(CONFIG_ZM7300)		+= zm7300.o
- obj-$(CONFIG_POWER_PFUZE100)	+= pfuze.o
- 
-+obj-$(CONFIG_LS102XA_STREAM_ID)	+= ls102xa_stream_id.o
-+
- # deal with common files for P-series corenet based devices
- obj-$(CONFIG_P2041RDB)	+= p_corenet/
- obj-$(CONFIG_P3041DS)	+= p_corenet/
- obj-$(CONFIG_P4080DS)	+= p_corenet/
- obj-$(CONFIG_P5020DS)	+= p_corenet/
- obj-$(CONFIG_P5040DS)	+= p_corenet/
-+
-+obj-$(CONFIG_LS102XA_NS_ACCESS)	+= ns_access.o
- endif
-diff -ruN u-boot-2015.01-rc3/board/freescale/common/mpc85xx_sleep.c u-boot/board/freescale/common/mpc85xx_sleep.c
---- u-boot-2015.01-rc3/board/freescale/common/mpc85xx_sleep.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/freescale/common/mpc85xx_sleep.c	2015-01-01 17:34:32.357501547 +0100
-@@ -0,0 +1,88 @@
-+/*
-+ * Copyright 2014 Freescale Semiconductor, Inc.
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <asm/immap_85xx.h>
-+#include "sleep.h"
-+
-+DECLARE_GLOBAL_DATA_PTR;
-+
-+void __weak board_mem_sleep_setup(void)
-+{
-+}
-+
-+void __weak board_sleep_prepare(void)
-+{
-+}
-+
-+bool is_warm_boot(void)
-+{
-+	struct ccsr_gur __iomem *gur = (void *)CONFIG_SYS_MPC85xx_GUTS_ADDR;
-+
-+	if (in_be32(&gur->scrtsr[0]) & DCFG_CCSR_CRSTSR_WDRFR)
-+		return 1;
-+
-+	return 0;
-+}
-+
-+void fsl_dp_disable_console(void)
-+{
-+	gd->flags |= GD_FLG_SILENT | GD_FLG_DISABLE_CONSOLE;
-+}
-+
-+/*
-+ * When wakeup from deep sleep, the first 128 bytes space
-+ * will be used to do DDR training which corrupts the data
-+ * in there. This function will restore them.
-+ */
-+static void dp_ddr_restore(void)
-+{
-+	volatile u64 *src, *dst;
-+	int i;
-+	struct ccsr_scfg __iomem *scfg = (void *)CONFIG_SYS_MPC85xx_SCFG;
-+
-+	/* get the address of ddr date from SPARECR3 */
-+	src = (u64 *)in_be32(&scfg->sparecr[2]);
-+	dst = (u64 *)CONFIG_SYS_SDRAM_BASE;
-+
-+	for (i = 0; i < DDR_BUFF_LEN / 8; i++)
-+		*dst++ = *src++;
-+
-+	flush_dcache();
-+}
-+
-+static void dp_resume_prepare(void)
-+{
-+	dp_ddr_restore();
-+
-+	board_sleep_prepare();
-+
-+	l2cache_init();
-+#if defined(CONFIG_RAMBOOT_PBL)
-+	disable_cpc_sram();
-+#endif
-+	enable_cpc();
-+}
-+
-+int fsl_dp_resume(void)
-+{
-+	u32 start_addr;
-+	void (*kernel_resume)(void);
-+	struct ccsr_scfg __iomem *scfg = (void *)CONFIG_SYS_MPC85xx_SCFG;
-+
-+	if (!is_warm_boot())
-+		return 0;
-+
-+	dp_resume_prepare();
-+
-+	/* Get the entry address and jump to kernel */
-+	start_addr = in_be32(&scfg->sparecr[1]);
-+	debug("Entry address is 0x%08x\n", start_addr);
-+	kernel_resume = (void (*)(void))start_addr;
-+	kernel_resume();
-+
-+	return 0;
-+}
-diff -ruN u-boot-2015.01-rc3/board/freescale/common/ns_access.c u-boot/board/freescale/common/ns_access.c
---- u-boot-2015.01-rc3/board/freescale/common/ns_access.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/freescale/common/ns_access.c	2015-01-01 17:34:32.357501547 +0100
-@@ -0,0 +1,30 @@
-+/*
-+ * Copyright 2014 Freescale Semiconductor
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <asm/io.h>
-+#include <asm/arch/ns_access.h>
-+
-+void enable_devices_ns_access(struct csu_ns_dev *ns_dev, uint32_t num)
-+{
-+	u32 *base = (u32 *)CONFIG_SYS_FSL_CSU_ADDR;
-+	u32 *reg;
-+	uint32_t val;
-+	int i;
-+
-+	for (i = 0; i < num; i++) {
-+		reg = base + ns_dev[i].ind / 2;
-+		val = in_be32(reg);
-+		if (ns_dev[i].ind % 2 == 0) {
-+			val &= 0x0000ffff;
-+			val |= ns_dev[i].val << 16;
-+		} else {
-+			val &= 0xffff0000;
-+			val |= ns_dev[i].val;
-+		}
-+		out_be32(reg, val);
-+	}
-+}
-diff -ruN u-boot-2015.01-rc3/board/freescale/common/qixis.h u-boot/board/freescale/common/qixis.h
---- u-boot-2015.01-rc3/board/freescale/common/qixis.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/freescale/common/qixis.h	2015-01-01 17:34:32.357501547 +0100
-@@ -100,8 +100,15 @@
- void qixis_write_i2c(unsigned int reg, u8 value);
- #endif
- 
-+#if defined(CONFIG_QIXIS_I2C_ACCESS) && defined(CONFIG_SYS_I2C_FPGA_ADDR)
-+#define QIXIS_READ(reg) qixis_read_i2c(offsetof(struct qixis, reg))
-+#define QIXIS_WRITE(reg, value) \
-+	qixis_write_i2c(offsetof(struct qixis, reg), value)
-+#else
- #define QIXIS_READ(reg) qixis_read(offsetof(struct qixis, reg))
- #define QIXIS_WRITE(reg, value) qixis_write(offsetof(struct qixis, reg), value)
-+#endif
-+
- #ifdef CONFIG_SYS_I2C_FPGA_ADDR
- #define QIXIS_READ_I2C(reg) qixis_read_i2c(offsetof(struct qixis, reg))
- #define QIXIS_WRITE_I2C(reg, value) \
-diff -ruN u-boot-2015.01-rc3/board/freescale/common/sleep.h u-boot/board/freescale/common/sleep.h
---- u-boot-2015.01-rc3/board/freescale/common/sleep.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/freescale/common/sleep.h	2015-01-01 17:34:32.357501547 +0100
-@@ -0,0 +1,21 @@
-+/*
-+ * Copyright 2014 Freescale Semiconductor, Inc.
-+ *
-+ * SPDX-License-Identifier: GPL-2.0+
-+ */
-+
-+#ifndef __SLEEP_H
-+#define __SLEEP_H
-+
-+#define DCFG_CCSR_CRSTSR_WDRFR	(1 << 3)
-+#define DDR_BUFF_LEN			128
-+
-+/* determine if it is a wakeup from deep sleep */
-+bool is_warm_boot(void);
-+
-+/* disable console output */
-+void fsl_dp_disable_console(void);
-+
-+/* clean up everything and jump to kernel */
-+int fsl_dp_resume(void);
-+#endif
-diff -ruN u-boot-2015.01-rc3/board/freescale/ls1021aqds/ddr.c u-boot/board/freescale/ls1021aqds/ddr.c
---- u-boot-2015.01-rc3/board/freescale/ls1021aqds/ddr.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/freescale/ls1021aqds/ddr.c	2015-01-01 17:34:32.361501481 +0100
-@@ -153,9 +153,12 @@
- {
- 	phys_size_t dram_size;
- 
-+#if defined(CONFIG_SPL_BUILD) || !defined(CONFIG_SPL)
- 	puts("Initializing DDR....using SPD\n");
- 	dram_size = fsl_ddr_sdram();
--
-+#else
-+	dram_size =  fsl_ddr_sdram_size();
-+#endif
- 	return dram_size;
- }
- 
-diff -ruN u-boot-2015.01-rc3/board/freescale/ls1021aqds/ls1021aqds.c u-boot/board/freescale/ls1021aqds/ls1021aqds.c
---- u-boot-2015.01-rc3/board/freescale/ls1021aqds/ls1021aqds.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/freescale/ls1021aqds/ls1021aqds.c	2015-01-01 17:34:32.361501481 +0100
-@@ -8,12 +8,17 @@
- #include <i2c.h>
- #include <asm/io.h>
- #include <asm/arch/immap_ls102xa.h>
-+#include <asm/arch/ns_access.h>
- #include <asm/arch/clock.h>
- #include <asm/arch/fsl_serdes.h>
-+#include <asm/arch/ls102xa_stream_id.h>
-+#include <asm/pcie_layerscape.h>
-+#include <hwconfig.h>
- #include <mmc.h>
- #include <fsl_esdhc.h>
- #include <fsl_ifc.h>
- #include <fsl_sec.h>
-+#include <spl.h>
- 
- #include "../common/qixis.h"
- #include "ls1021aqds_qixis.h"
-@@ -21,9 +26,22 @@
- #include "../../../drivers/qe/qe.h"
- #endif
- 
-+#define PIN_MUX_SEL_CAN		0x03
-+#define PIN_MUX_SEL_IIC2	0xa0
-+#define PIN_MUX_SEL_RGMII	0x00
-+#define PIN_MUX_SEL_SAI		0x0c
-+#define PIN_MUX_SEL_SDHC	0x00
-+
-+#define SET_SDHC_MUX_SEL(reg, value)	((reg & 0x0f) | value)
-+#define SET_EC_MUX_SEL(reg, value)	((reg & 0xf0) | value)
- DECLARE_GLOBAL_DATA_PTR;
- 
- enum {
-+	MUX_TYPE_CAN,
-+	MUX_TYPE_IIC2,
-+	MUX_TYPE_RGMII,
-+	MUX_TYPE_SAI,
-+	MUX_TYPE_SDHC,
- 	MUX_TYPE_SD_PCI4,
- 	MUX_TYPE_SD_PC_SA_SG_SG,
- 	MUX_TYPE_SD_PC_SA_PC_SG,
-@@ -32,11 +50,20 @@
- 
- int checkboard(void)
- {
-+#ifndef CONFIG_QSPI_BOOT
- 	char buf[64];
-+#endif
-+#if !defined(CONFIG_SD_BOOT) && !defined(CONFIG_QSPI_BOOT)
- 	u8 sw;
-+#endif
- 
- 	puts("Board: LS1021AQDS\n");
- 
-+#ifdef CONFIG_SD_BOOT
-+	puts("SD\n");
-+#elif CONFIG_QSPI_BOOT
-+	puts("QSPI\n");
-+#else
- 	sw = QIXIS_READ(brdcfg[0]);
- 	sw = (sw & QIXIS_LBMAP_MASK) >> QIXIS_LBMAP_SHIFT;
- 
-@@ -50,13 +77,16 @@
- 		printf("IFCCard\n");
- 	else
- 		printf("invalid setting of SW%u\n", QIXIS_LBMAP_SWITCH);
-+#endif
- 
-+#ifndef CONFIG_QSPI_BOOT
- 	printf("Sys ID:0x%02x, Sys Ver: 0x%02x\n",
- 	       QIXIS_READ(id), QIXIS_READ(arch));
- 
- 	printf("FPGA:  v%d (%s), build %d\n",
- 	       (int)QIXIS_READ(scver), qixis_read_tag(buf),
- 	       (int)qixis_read_minor());
-+#endif
- 
- 	return 0;
- }
-@@ -101,8 +131,27 @@
- 	return 66666666;
- }
- 
-+int select_i2c_ch_pca9547(u8 ch)
-+{
-+	int ret;
-+
-+	ret = i2c_write(I2C_MUX_PCA_ADDR_PRI, 0, 1, &ch, 1);
-+	if (ret) {
-+		puts("PCA: failed to select proper channel\n");
-+		return ret;
-+	}
-+
-+	return 0;
-+}
-+
- int dram_init(void)
- {
-+	/*
-+	 * When resuming from deep sleep, the I2C channel may not be
-+	 * in the default channel. So, switch to the default channel
-+	 * before accessing DDR SPD.
-+	 */
-+	select_i2c_ch_pca9547(I2C_MUX_CH_DEFAULT);
- 	gd->ram_size = initdram(0);
- 
- 	return 0;
-@@ -121,19 +170,6 @@
- }
- #endif
- 
--int select_i2c_ch_pca9547(u8 ch)
--{
--	int ret;
--
--	ret = i2c_write(I2C_MUX_PCA_ADDR_PRI, 0, 1, &ch, 1);
--	if (ret) {
--		puts("PCA: failed to select proper channel\n");
--		return ret;
--	}
--
--	return 0;
--}
--
- int board_early_init_f(void)
- {
- 	struct ccsr_scfg *scfg = (struct ccsr_scfg *)CONFIG_SYS_FSL_SCFG_ADDR;
-@@ -148,6 +184,10 @@
- 	init_early_memctl_regs();
- #endif
- 
-+#ifdef CONFIG_FSL_QSPI
-+	out_be32(&scfg->qspi_cfg, SCFG_QSPI_CLKSEL);
-+#endif
-+
- 	/* Workaround for the issue that DDR could not respond to
- 	 * barrier transaction which is generated by executing DSB/ISB
- 	 * instruction. Set CCI-400 control override register to
-@@ -158,13 +198,75 @@
- 	return 0;
- }
- 
-+#ifdef CONFIG_SPL_BUILD
-+void board_init_f(ulong dummy)
-+{
-+	struct ccsr_cci400 *cci = (struct ccsr_cci400 *)CONFIG_SYS_CCI400_ADDR;
-+
-+#ifdef CONFIG_NAND_BOOT
-+	struct ccsr_gur __iomem *gur = (void *)CONFIG_SYS_FSL_GUTS_ADDR;
-+	u32 porsr1, pinctl;
-+
-+	/*
-+	 * There is LS1 SoC issue where NOR, FPGA are inaccessible during
-+	 * NAND boot because IFC signals > IFC_AD7 are not enabled.
-+	 * This workaround changes RCW source to make all signals enabled.
-+	 */
-+	porsr1 = in_be32(&gur->porsr1);
-+	pinctl = ((porsr1 & ~(DCFG_CCSR_PORSR1_RCW_MASK)) |
-+		 DCFG_CCSR_PORSR1_RCW_SRC_I2C);
-+	out_be32((unsigned int *)(CONFIG_SYS_DCSR_DCFG_ADDR + DCFG_DCSR_PORCR1),
-+		 pinctl);
-+#endif
-+
-+	/* Set global data pointer */
-+	gd = &gdata;
-+
-+	/* Clear the BSS */
-+	memset(__bss_start, 0, __bss_end - __bss_start);
-+
-+#ifdef CONFIG_FSL_IFC
-+	init_early_memctl_regs();
-+#endif
-+
-+	get_clocks();
-+
-+	preloader_console_init();
-+
-+#ifdef CONFIG_SPL_I2C_SUPPORT
-+	i2c_init_all();
-+#endif
-+	out_le32(&cci->ctrl_ord, CCI400_CTRLORD_TERM_BARRIER);
-+
-+	dram_init();
-+
-+	board_init_r(NULL, 0);
-+}
-+#endif
-+
- int config_board_mux(int ctrl_type)
- {
--	u8 reg12;
-+	u8 reg12, reg14;
- 
- 	reg12 = QIXIS_READ(brdcfg[12]);
-+	reg14 = QIXIS_READ(brdcfg[14]);
- 
- 	switch (ctrl_type) {
-+	case MUX_TYPE_CAN:
-+		reg14 = SET_EC_MUX_SEL(reg14, PIN_MUX_SEL_CAN);
-+		break;
-+	case MUX_TYPE_IIC2:
-+		reg14 = SET_SDHC_MUX_SEL(reg14, PIN_MUX_SEL_IIC2);
-+		break;
-+	case MUX_TYPE_RGMII:
-+		reg14 = SET_EC_MUX_SEL(reg14, PIN_MUX_SEL_RGMII);
-+		break;
-+	case MUX_TYPE_SAI:
-+		reg14 = SET_EC_MUX_SEL(reg14, PIN_MUX_SEL_SAI);
-+		break;
-+	case MUX_TYPE_SDHC:
-+		reg14 = SET_SDHC_MUX_SEL(reg14, PIN_MUX_SEL_SDHC);
-+		break;
- 	case MUX_TYPE_SD_PCI4:
- 		reg12 = 0x38;
- 		break;
-@@ -183,6 +285,7 @@
- 	}
- 
- 	QIXIS_WRITE(brdcfg[12], reg12);
-+	QIXIS_WRITE(brdcfg[14], reg14);
- 
- 	return 0;
- }
-@@ -216,15 +319,154 @@
- 	return 0;
- }
- 
--#if defined(CONFIG_MISC_INIT_R)
- int misc_init_r(void)
- {
-+	int conflict_flag;
-+
-+	/* some signals can not enable simultaneous*/
-+	conflict_flag = 0;
-+	if (hwconfig("sdhc"))
-+		conflict_flag++;
-+	if (hwconfig("iic2"))
-+		conflict_flag++;
-+	if (conflict_flag > 1) {
-+		printf("WARNING: pin conflict !\n");
-+		return 0;
-+	}
-+
-+	conflict_flag = 0;
-+	if (hwconfig("rgmii"))
-+		conflict_flag++;
-+	if (hwconfig("can"))
-+		conflict_flag++;
-+	if (hwconfig("sai"))
-+		conflict_flag++;
-+	if (conflict_flag > 1) {
-+		printf("WARNING: pin conflict !\n");
-+		return 0;
-+	}
-+
-+	if (hwconfig("can"))
-+		config_board_mux(MUX_TYPE_CAN);
-+	else if (hwconfig("rgmii"))
-+		config_board_mux(MUX_TYPE_RGMII);
-+	else if (hwconfig("sai"))
-+		config_board_mux(MUX_TYPE_SAI);
-+
-+	if (hwconfig("iic2"))
-+		config_board_mux(MUX_TYPE_IIC2);
-+	else if (hwconfig("sdhc"))
-+		config_board_mux(MUX_TYPE_SDHC);
-+
- #ifdef CONFIG_FSL_CAAM
- 	return sec_init();
- #endif
-+	return 0;
- }
-+
-+#ifdef CONFIG_LS102XA_NS_ACCESS
-+static struct csu_ns_dev ns_dev[] = {
-+	{ CSU_CSLX_PCIE2_IO, CSU_ALL_RW },
-+	{ CSU_CSLX_PCIE1_IO, CSU_ALL_RW },
-+	{ CSU_CSLX_MG2TPR_IP, CSU_ALL_RW },
-+	{ CSU_CSLX_IFC_MEM, CSU_ALL_RW },
-+	{ CSU_CSLX_OCRAM, CSU_ALL_RW },
-+	{ CSU_CSLX_GIC, CSU_ALL_RW },
-+	{ CSU_CSLX_PCIE1, CSU_ALL_RW },
-+	{ CSU_CSLX_OCRAM2, CSU_ALL_RW },
-+	{ CSU_CSLX_QSPI_MEM, CSU_ALL_RW },
-+	{ CSU_CSLX_PCIE2, CSU_ALL_RW },
-+	{ CSU_CSLX_SATA, CSU_ALL_RW },
-+	{ CSU_CSLX_USB3, CSU_ALL_RW },
-+	{ CSU_CSLX_SERDES, CSU_ALL_RW },
-+	{ CSU_CSLX_QDMA, CSU_ALL_RW },
-+	{ CSU_CSLX_LPUART2, CSU_ALL_RW },
-+	{ CSU_CSLX_LPUART1, CSU_ALL_RW },
-+	{ CSU_CSLX_LPUART4, CSU_ALL_RW },
-+	{ CSU_CSLX_LPUART3, CSU_ALL_RW },
-+	{ CSU_CSLX_LPUART6, CSU_ALL_RW },
-+	{ CSU_CSLX_LPUART5, CSU_ALL_RW },
-+	{ CSU_CSLX_DSPI2, CSU_ALL_RW },
-+	{ CSU_CSLX_DSPI1, CSU_ALL_RW },
-+	{ CSU_CSLX_QSPI, CSU_ALL_RW },
-+	{ CSU_CSLX_ESDHC, CSU_ALL_RW },
-+	{ CSU_CSLX_2D_ACE, CSU_ALL_RW },
-+	{ CSU_CSLX_IFC, CSU_ALL_RW },
-+	{ CSU_CSLX_I2C1, CSU_ALL_RW },
-+	{ CSU_CSLX_USB2, CSU_ALL_RW },
-+	{ CSU_CSLX_I2C3, CSU_ALL_RW },
-+	{ CSU_CSLX_I2C2, CSU_ALL_RW },
-+	{ CSU_CSLX_DUART2, CSU_ALL_RW },
-+	{ CSU_CSLX_DUART1, CSU_ALL_RW },
-+	{ CSU_CSLX_WDT2, CSU_ALL_RW },
-+	{ CSU_CSLX_WDT1, CSU_ALL_RW },
-+	{ CSU_CSLX_EDMA, CSU_ALL_RW },
-+	{ CSU_CSLX_SYS_CNT, CSU_ALL_RW },
-+	{ CSU_CSLX_DMA_MUX2, CSU_ALL_RW },
-+	{ CSU_CSLX_DMA_MUX1, CSU_ALL_RW },
-+	{ CSU_CSLX_DDR, CSU_ALL_RW },
-+	{ CSU_CSLX_QUICC, CSU_ALL_RW },
-+	{ CSU_CSLX_DCFG_CCU_RCPM, CSU_ALL_RW },
-+	{ CSU_CSLX_SECURE_BOOTROM, CSU_ALL_RW },
-+	{ CSU_CSLX_SFP, CSU_ALL_RW },
-+	{ CSU_CSLX_TMU, CSU_ALL_RW },
-+	{ CSU_CSLX_SECURE_MONITOR, CSU_ALL_RW },
-+	{ CSU_CSLX_RESERVED0, CSU_ALL_RW },
-+	{ CSU_CSLX_ETSEC1, CSU_ALL_RW },
-+	{ CSU_CSLX_SEC5_5, CSU_ALL_RW },
-+	{ CSU_CSLX_ETSEC3, CSU_ALL_RW },
-+	{ CSU_CSLX_ETSEC2, CSU_ALL_RW },
-+	{ CSU_CSLX_GPIO2, CSU_ALL_RW },
-+	{ CSU_CSLX_GPIO1, CSU_ALL_RW },
-+	{ CSU_CSLX_GPIO4, CSU_ALL_RW },
-+	{ CSU_CSLX_GPIO3, CSU_ALL_RW },
-+	{ CSU_CSLX_PLATFORM_CONT, CSU_ALL_RW },
-+	{ CSU_CSLX_CSU, CSU_ALL_RW },
-+	{ CSU_CSLX_ASRC, CSU_ALL_RW },
-+	{ CSU_CSLX_SPDIF, CSU_ALL_RW },
-+	{ CSU_CSLX_FLEXCAN2, CSU_ALL_RW },
-+	{ CSU_CSLX_FLEXCAN1, CSU_ALL_RW },
-+	{ CSU_CSLX_FLEXCAN4, CSU_ALL_RW },
-+	{ CSU_CSLX_FLEXCAN3, CSU_ALL_RW },
-+	{ CSU_CSLX_SAI2, CSU_ALL_RW },
-+	{ CSU_CSLX_SAI1, CSU_ALL_RW },
-+	{ CSU_CSLX_SAI4, CSU_ALL_RW },
-+	{ CSU_CSLX_SAI3, CSU_ALL_RW },
-+	{ CSU_CSLX_FTM2, CSU_ALL_RW },
-+	{ CSU_CSLX_FTM1, CSU_ALL_RW },
-+	{ CSU_CSLX_FTM4, CSU_ALL_RW },
-+	{ CSU_CSLX_FTM3, CSU_ALL_RW },
-+	{ CSU_CSLX_FTM6, CSU_ALL_RW },
-+	{ CSU_CSLX_FTM5, CSU_ALL_RW },
-+	{ CSU_CSLX_FTM8, CSU_ALL_RW },
-+	{ CSU_CSLX_FTM7, CSU_ALL_RW },
-+	{ CSU_CSLX_COP_DCSR, CSU_ALL_RW },
-+	{ CSU_CSLX_EPU, CSU_ALL_RW },
-+	{ CSU_CSLX_GDI, CSU_ALL_RW },
-+	{ CSU_CSLX_DDI, CSU_ALL_RW },
-+	{ CSU_CSLX_RESERVED1, CSU_ALL_RW },
-+	{ CSU_CSLX_USB3_PHY, CSU_ALL_RW },
-+	{ CSU_CSLX_RESERVED2, CSU_ALL_RW },
-+};
- #endif
- 
-+struct smmu_stream_id dev_stream_id[] = {
-+	{ 0x100, 0x01, "ETSEC MAC1" },
-+	{ 0x104, 0x02, "ETSEC MAC2" },
-+	{ 0x108, 0x03, "ETSEC MAC3" },
-+	{ 0x10c, 0x04, "PEX1" },
-+	{ 0x110, 0x05, "PEX2" },
-+	{ 0x114, 0x06, "qDMA" },
-+	{ 0x118, 0x07, "SATA" },
-+	{ 0x11c, 0x08, "USB3" },
-+	{ 0x120, 0x09, "QE" },
-+	{ 0x124, 0x0a, "eSDHC" },
-+	{ 0x128, 0x0b, "eMA" },
-+	{ 0x14c, 0x0c, "2D-ACE" },
-+	{ 0x150, 0x0d, "USB2" },
-+	{ 0x18c, 0x0e, "DEBUG" },
-+};
-+
- int board_init(void)
- {
- 	struct ccsr_cci400 *cci = (struct ccsr_cci400 *)CONFIG_SYS_CCI400_ADDR;
-@@ -247,6 +489,13 @@
- 	config_serdes_mux();
- #endif
- 
-+	ls102xa_config_smmu_stream_id(dev_stream_id,
-+				      ARRAY_SIZE(dev_stream_id));
-+
-+#ifdef CONFIG_LS102XA_NS_ACCESS
-+	enable_devices_ns_access(ns_dev, ARRAY_SIZE(ns_dev));
-+#endif
-+
- #ifdef CONFIG_U_QE
- 	u_qe_init();
- #endif
-@@ -258,6 +507,10 @@
- {
- 	ft_cpu_setup(blob, bd);
- 
-+#ifdef CONFIG_PCIE_LAYERSCAPE
-+	ft_pcie_setup(blob, bd);
-+#endif
-+
- 	return 0;
- }
- 
-diff -ruN u-boot-2015.01-rc3/board/freescale/ls1021aqds/ls102xa_pbi.cfg u-boot/board/freescale/ls1021aqds/ls102xa_pbi.cfg
---- u-boot-2015.01-rc3/board/freescale/ls1021aqds/ls102xa_pbi.cfg	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/freescale/ls1021aqds/ls102xa_pbi.cfg	2015-01-01 17:34:32.361501481 +0100
-@@ -0,0 +1,12 @@
-+#PBI commands
-+
-+09570200 ffffffff
-+09570158 00000300
-+8940007c 21f47300
-+
-+#Configure Scratch register
-+09ee0200 10000000
-+#Configure alternate space
-+09570158 00001000
-+#Flush PBL data
-+096100c0 000FFFFF
-diff -ruN u-boot-2015.01-rc3/board/freescale/ls1021aqds/ls102xa_rcw_nand.cfg u-boot/board/freescale/ls1021aqds/ls102xa_rcw_nand.cfg
---- u-boot-2015.01-rc3/board/freescale/ls1021aqds/ls102xa_rcw_nand.cfg	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/freescale/ls1021aqds/ls102xa_rcw_nand.cfg	2015-01-01 17:34:32.361501481 +0100
-@@ -0,0 +1,7 @@
-+#PBL preamble and RCW header
-+aa55aa55 01ee0100
-+# serdes protocol
-+0608000a 00000000 00000000 00000000
-+60000000 00407900 e0106a00 21046000
-+00000000 00000000 00000000 00038000
-+00000000 001b7200 00000000 00000000
-diff -ruN u-boot-2015.01-rc3/board/freescale/ls1021aqds/ls102xa_rcw_sd.cfg u-boot/board/freescale/ls1021aqds/ls102xa_rcw_sd.cfg
---- u-boot-2015.01-rc3/board/freescale/ls1021aqds/ls102xa_rcw_sd.cfg	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/freescale/ls1021aqds/ls102xa_rcw_sd.cfg	2015-01-01 17:34:32.361501481 +0100
-@@ -0,0 +1,14 @@
-+#PBL preamble and RCW header
-+aa55aa55 01ee0100
-+
-+#enable IFC, disable QSPI and DSPI
-+0608000a 00000000 00000000 00000000
-+60000000 00407900 60040a00 21046000
-+00000000 00000000 00000000 00038000
-+00000000 001b7200 00000000 00000000
-+
-+#disable IFC, enable QSPI and DSPI
-+#0608000a 00000000 00000000 00000000
-+#60000000 00407900 60040a00 21046000
-+#00000000 00000000 00000000 00038000
-+#20024800 001b7200 00000000 00000000
-diff -ruN u-boot-2015.01-rc3/board/freescale/ls1021aqds/MAINTAINERS u-boot/board/freescale/ls1021aqds/MAINTAINERS
---- u-boot-2015.01-rc3/board/freescale/ls1021aqds/MAINTAINERS	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/freescale/ls1021aqds/MAINTAINERS	2015-01-01 17:34:32.361501481 +0100
-@@ -6,3 +6,6 @@
- F:	configs/ls1021aqds_nor_defconfig
- F:	configs/ls1021aqds_ddr4_nor_defconfig
- F:	configs/ls1021aqds_nor_SECURE_BOOT_defconfig
-+F:	configs/ls1021aqds_sdcard_defconfig
-+F:	configs/ls1021aqds_qspi_defconfig
-+F:	configs/ls1021aqds_nand_defconfig
-diff -ruN u-boot-2015.01-rc3/board/freescale/ls1021atwr/ls1021atwr.c u-boot/board/freescale/ls1021atwr/ls1021atwr.c
---- u-boot-2015.01-rc3/board/freescale/ls1021atwr/ls1021atwr.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/freescale/ls1021atwr/ls1021atwr.c	2015-01-01 17:34:32.361501481 +0100
-@@ -8,8 +8,11 @@
- #include <i2c.h>
- #include <asm/io.h>
- #include <asm/arch/immap_ls102xa.h>
-+#include <asm/arch/ns_access.h>
- #include <asm/arch/clock.h>
- #include <asm/arch/fsl_serdes.h>
-+#include <asm/arch/ls102xa_stream_id.h>
-+#include <asm/pcie_layerscape.h>
- #include <mmc.h>
- #include <fsl_esdhc.h>
- #include <fsl_ifc.h>
-@@ -17,6 +20,7 @@
- #include <fsl_mdio.h>
- #include <tsec.h>
- #include <fsl_sec.h>
-+#include <spl.h>
- #ifdef CONFIG_U_QE
- #include "../../../drivers/qe/qe.h"
- #endif
-@@ -70,6 +74,7 @@
- 	u8 rev2;		/* Reserved */
- };
- 
-+#ifndef CONFIG_QSPI_BOOT
- static void convert_serdes_mux(int type, int need_reset);
- 
- void cpld_show(void)
-@@ -105,11 +110,14 @@
- 	       in_8(&cpld_data->serdes_mux));
- #endif
- }
-+#endif
- 
- int checkboard(void)
- {
- 	puts("Board: LS1021ATWR\n");
-+#ifndef CONFIG_QSPI_BOOT
- 	cpld_show();
-+#endif
- 
- 	return 0;
- }
-@@ -218,6 +226,7 @@
- }
- #endif
- 
-+#ifndef CONFIG_QSPI_BOOT
- int config_serdes_mux(void)
- {
- 	struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
-@@ -249,6 +258,7 @@
- 
- 	return 0;
- }
-+#endif
- 
- int board_early_init_f(void)
- {
-@@ -267,9 +277,135 @@
- 	out_be32(&scfg->pixclkcr, SCFG_PIXCLKCR_PXCKEN);
- #endif
- 
-+#ifdef CONFIG_FSL_QSPI
-+	out_be32(&scfg->qspi_cfg, SCFG_QSPI_CLKSEL);
-+#endif
-+
- 	return 0;
- }
- 
-+#ifdef CONFIG_SPL_BUILD
-+void board_init_f(ulong dummy)
-+{
-+	/* Set global data pointer */
-+	gd = &gdata;
-+
-+	/* Clear the BSS */
-+	memset(__bss_start, 0, __bss_end - __bss_start);
-+
-+	get_clocks();
-+
-+	preloader_console_init();
-+
-+	dram_init();
-+
-+	board_init_r(NULL, 0);
-+}
-+#endif
-+
-+#ifdef CONFIG_LS102XA_NS_ACCESS
-+static struct csu_ns_dev ns_dev[] = {
-+	{ CSU_CSLX_PCIE2_IO, CSU_ALL_RW },
-+	{ CSU_CSLX_PCIE1_IO, CSU_ALL_RW },
-+	{ CSU_CSLX_MG2TPR_IP, CSU_ALL_RW },
-+	{ CSU_CSLX_IFC_MEM, CSU_ALL_RW },
-+	{ CSU_CSLX_OCRAM, CSU_ALL_RW },
-+	{ CSU_CSLX_GIC, CSU_ALL_RW },
-+	{ CSU_CSLX_PCIE1, CSU_ALL_RW },
-+	{ CSU_CSLX_OCRAM2, CSU_ALL_RW },
-+	{ CSU_CSLX_QSPI_MEM, CSU_ALL_RW },
-+	{ CSU_CSLX_PCIE2, CSU_ALL_RW },
-+	{ CSU_CSLX_SATA, CSU_ALL_RW },
-+	{ CSU_CSLX_USB3, CSU_ALL_RW },
-+	{ CSU_CSLX_SERDES, CSU_ALL_RW },
-+	{ CSU_CSLX_QDMA, CSU_ALL_RW },
-+	{ CSU_CSLX_LPUART2, CSU_ALL_RW },
-+	{ CSU_CSLX_LPUART1, CSU_ALL_RW },
-+	{ CSU_CSLX_LPUART4, CSU_ALL_RW },
-+	{ CSU_CSLX_LPUART3, CSU_ALL_RW },
-+	{ CSU_CSLX_LPUART6, CSU_ALL_RW },
-+	{ CSU_CSLX_LPUART5, CSU_ALL_RW },
-+	{ CSU_CSLX_DSPI2, CSU_ALL_RW },
-+	{ CSU_CSLX_DSPI1, CSU_ALL_RW },
-+	{ CSU_CSLX_QSPI, CSU_ALL_RW },
-+	{ CSU_CSLX_ESDHC, CSU_ALL_RW },
-+	{ CSU_CSLX_2D_ACE, CSU_ALL_RW },
-+	{ CSU_CSLX_IFC, CSU_ALL_RW },
-+	{ CSU_CSLX_I2C1, CSU_ALL_RW },
-+	{ CSU_CSLX_USB2, CSU_ALL_RW },
-+	{ CSU_CSLX_I2C3, CSU_ALL_RW },
-+	{ CSU_CSLX_I2C2, CSU_ALL_RW },
-+	{ CSU_CSLX_DUART2, CSU_ALL_RW },
-+	{ CSU_CSLX_DUART1, CSU_ALL_RW },
-+	{ CSU_CSLX_WDT2, CSU_ALL_RW },
-+	{ CSU_CSLX_WDT1, CSU_ALL_RW },
-+	{ CSU_CSLX_EDMA, CSU_ALL_RW },
-+	{ CSU_CSLX_SYS_CNT, CSU_ALL_RW },
-+	{ CSU_CSLX_DMA_MUX2, CSU_ALL_RW },
-+	{ CSU_CSLX_DMA_MUX1, CSU_ALL_RW },
-+	{ CSU_CSLX_DDR, CSU_ALL_RW },
-+	{ CSU_CSLX_QUICC, CSU_ALL_RW },
-+	{ CSU_CSLX_DCFG_CCU_RCPM, CSU_ALL_RW },
-+	{ CSU_CSLX_SECURE_BOOTROM, CSU_ALL_RW },
-+	{ CSU_CSLX_SFP, CSU_ALL_RW },
-+	{ CSU_CSLX_TMU, CSU_ALL_RW },
-+	{ CSU_CSLX_SECURE_MONITOR, CSU_ALL_RW },
-+	{ CSU_CSLX_RESERVED0, CSU_ALL_RW },
-+	{ CSU_CSLX_ETSEC1, CSU_ALL_RW },
-+	{ CSU_CSLX_SEC5_5, CSU_ALL_RW },
-+	{ CSU_CSLX_ETSEC3, CSU_ALL_RW },
-+	{ CSU_CSLX_ETSEC2, CSU_ALL_RW },
-+	{ CSU_CSLX_GPIO2, CSU_ALL_RW },
-+	{ CSU_CSLX_GPIO1, CSU_ALL_RW },
-+	{ CSU_CSLX_GPIO4, CSU_ALL_RW },
-+	{ CSU_CSLX_GPIO3, CSU_ALL_RW },
-+	{ CSU_CSLX_PLATFORM_CONT, CSU_ALL_RW },
-+	{ CSU_CSLX_CSU, CSU_ALL_RW },
-+	{ CSU_CSLX_ASRC, CSU_ALL_RW },
-+	{ CSU_CSLX_SPDIF, CSU_ALL_RW },
-+	{ CSU_CSLX_FLEXCAN2, CSU_ALL_RW },
-+	{ CSU_CSLX_FLEXCAN1, CSU_ALL_RW },
-+	{ CSU_CSLX_FLEXCAN4, CSU_ALL_RW },
-+	{ CSU_CSLX_FLEXCAN3, CSU_ALL_RW },
-+	{ CSU_CSLX_SAI2, CSU_ALL_RW },
-+	{ CSU_CSLX_SAI1, CSU_ALL_RW },
-+	{ CSU_CSLX_SAI4, CSU_ALL_RW },
-+	{ CSU_CSLX_SAI3, CSU_ALL_RW },
-+	{ CSU_CSLX_FTM2, CSU_ALL_RW },
-+	{ CSU_CSLX_FTM1, CSU_ALL_RW },
-+	{ CSU_CSLX_FTM4, CSU_ALL_RW },
-+	{ CSU_CSLX_FTM3, CSU_ALL_RW },
-+	{ CSU_CSLX_FTM6, CSU_ALL_RW },
-+	{ CSU_CSLX_FTM5, CSU_ALL_RW },
-+	{ CSU_CSLX_FTM8, CSU_ALL_RW },
-+	{ CSU_CSLX_FTM7, CSU_ALL_RW },
-+	{ CSU_CSLX_COP_DCSR, CSU_ALL_RW },
-+	{ CSU_CSLX_EPU, CSU_ALL_RW },
-+	{ CSU_CSLX_GDI, CSU_ALL_RW },
-+	{ CSU_CSLX_DDI, CSU_ALL_RW },
-+	{ CSU_CSLX_RESERVED1, CSU_ALL_RW },
-+	{ CSU_CSLX_USB3_PHY, CSU_ALL_RW },
-+	{ CSU_CSLX_RESERVED2, CSU_ALL_RW },
-+};
-+#endif
-+
-+struct smmu_stream_id dev_stream_id[] = {
-+	{ 0x100, 0x01, "ETSEC MAC1" },
-+	{ 0x104, 0x02, "ETSEC MAC2" },
-+	{ 0x108, 0x03, "ETSEC MAC3" },
-+	{ 0x10c, 0x04, "PEX1" },
-+	{ 0x110, 0x05, "PEX2" },
-+	{ 0x114, 0x06, "qDMA" },
-+	{ 0x118, 0x07, "SATA" },
-+	{ 0x11c, 0x08, "USB3" },
-+	{ 0x120, 0x09, "QE" },
-+	{ 0x124, 0x0a, "eSDHC" },
-+	{ 0x128, 0x0b, "eMA" },
-+	{ 0x14c, 0x0c, "2D-ACE" },
-+	{ 0x150, 0x0d, "USB2" },
-+	{ 0x18c, 0x0e, "DEBUG" },
-+};
-+
- int board_init(void)
- {
- 	struct ccsr_cci400 *cci = (struct ccsr_cci400 *)CONFIG_SYS_CCI400_ADDR;
-@@ -284,8 +420,17 @@
- 
- #ifndef CONFIG_SYS_FSL_NO_SERDES
- 	fsl_serdes_init();
-+#ifndef CONFIG_QSPI_BOOT
- 	config_serdes_mux();
- #endif
-+#endif
-+
-+	ls102xa_config_smmu_stream_id(dev_stream_id,
-+				      ARRAY_SIZE(dev_stream_id));
-+
-+#ifdef CONFIG_LS102XA_NS_ACCESS
-+	enable_devices_ns_access(ns_dev, ARRAY_SIZE(ns_dev));
-+#endif
- 
- #ifdef CONFIG_U_QE
- 	u_qe_init();
-@@ -307,6 +452,10 @@
- {
- 	ft_cpu_setup(blob, bd);
- 
-+#ifdef CONFIG_PCIE_LAYERSCAPE
-+	ft_pcie_setup(blob, bd);
-+#endif
-+
- 	return 0;
- }
- 
-@@ -329,6 +478,7 @@
- 	return (((val) >> 8) & 0x00ff) | (((val) << 8) & 0xff00);
- }
- 
-+#ifndef CONFIG_QSPI_BOOT
- static void convert_flash_bank(char bank)
- {
- 	struct cpld_data *cpld_data = (void *)(CONFIG_SYS_CPLD_BASE);
-@@ -511,3 +661,4 @@
- 	"	-change lane C & lane D to PCIeX2\n"
- 	"\nWARNING: If you aren't familiar with the setting of serdes, don't try to change anything!\n"
- );
-+#endif
-diff -ruN u-boot-2015.01-rc3/board/freescale/ls1021atwr/ls102xa_pbi.cfg u-boot/board/freescale/ls1021atwr/ls102xa_pbi.cfg
---- u-boot-2015.01-rc3/board/freescale/ls1021atwr/ls102xa_pbi.cfg	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/freescale/ls1021atwr/ls102xa_pbi.cfg	2015-01-01 17:34:32.361501481 +0100
-@@ -0,0 +1,12 @@
-+#PBI commands
-+
-+09570200 ffffffff
-+09570158 00000300
-+8940007c 21f47300
-+
-+#Configure Scratch register
-+09ee0200 10000000
-+#Configure alternate space
-+09570158 00001000
-+#Flush PBL data
-+096100c0 000FFFFF
-diff -ruN u-boot-2015.01-rc3/board/freescale/ls1021atwr/ls102xa_rcw_sd.cfg u-boot/board/freescale/ls1021atwr/ls102xa_rcw_sd.cfg
---- u-boot-2015.01-rc3/board/freescale/ls1021atwr/ls102xa_rcw_sd.cfg	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/freescale/ls1021atwr/ls102xa_rcw_sd.cfg	2015-01-01 17:34:32.361501481 +0100
-@@ -0,0 +1,14 @@
-+#PBL preamble and RCW header
-+aa55aa55 01ee0100
-+
-+#enable IFC, disable QSPI and DSPI
-+0608000a 00000000 00000000 00000000
-+20000000 00407900 60040a00 21046000
-+00000000 00000000 00000000 00038000
-+00080000 881b7340 00000000 00000000
-+
-+#disable IFC, enable QSPI and DSPI
-+#0608000a 00000000 00000000 00000000
-+#20000000 00407900 60040a00 21046000
-+#00000000 00000000 00000000 00038000
-+#20084800 881b7340 00000000 00000000
-diff -ruN u-boot-2015.01-rc3/board/freescale/ls1021atwr/MAINTAINERS u-boot/board/freescale/ls1021atwr/MAINTAINERS
---- u-boot-2015.01-rc3/board/freescale/ls1021atwr/MAINTAINERS	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/freescale/ls1021atwr/MAINTAINERS	2015-01-01 17:34:32.361501481 +0100
-@@ -5,3 +5,5 @@
- F:	include/configs/ls1021atwr.h
- F:	configs/ls1021atwr_nor_defconfig
- F:	configs/ls1021atwr_nor_SECURE_BOOT_defconfig
-+F:	configs/ls1021atwr_sdcard_defconfig
-+F:	configs/ls1021atwr_qspi_defconfig
-diff -ruN u-boot-2015.01-rc3/board/freescale/mx6slevk/mx6slevk.c u-boot/board/freescale/mx6slevk/mx6slevk.c
---- u-boot-2015.01-rc3/board/freescale/mx6slevk/mx6slevk.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/freescale/mx6slevk/mx6slevk.c	2015-01-01 17:34:32.381501153 +0100
-@@ -20,6 +20,8 @@
- #include <fsl_esdhc.h>
- #include <mmc.h>
- #include <netdev.h>
-+#include <usb.h>
-+#include <usb/ehci-fsl.h>
- 
- DECLARE_GLOBAL_DATA_PTR;
- 
-@@ -234,10 +236,52 @@
- 	/* clear gpr1[14], gpr1[18:17] to select anatop clock */
- 	clrsetbits_le32(&iomuxc_regs->gpr[1], IOMUX_GPR1_FEC_MASK, 0);
- 
--	return enable_fec_anatop_clock(ENET_50MHz);
-+	return enable_fec_anatop_clock(ENET_50MHZ);
- }
- #endif
- 
-+#ifdef CONFIG_USB_EHCI_MX6
-+#define USB_OTHERREGS_OFFSET	0x800
-+#define UCTRL_PWR_POL		(1 << 9)
-+
-+static iomux_v3_cfg_t const usb_otg_pads[] = {
-+	/* OTG1 */
-+	MX6_PAD_KEY_COL4__USB_USBOTG1_PWR | MUX_PAD_CTRL(NO_PAD_CTRL),
-+	MX6_PAD_EPDC_PWRCOM__ANATOP_USBOTG1_ID | MUX_PAD_CTRL(NO_PAD_CTRL),
-+	/* OTG2 */
-+	MX6_PAD_KEY_COL5__USB_USBOTG2_PWR | MUX_PAD_CTRL(NO_PAD_CTRL)
-+};
-+
-+static void setup_usb(void)
-+{
-+	imx_iomux_v3_setup_multiple_pads(usb_otg_pads,
-+					 ARRAY_SIZE(usb_otg_pads));
-+}
-+
-+int board_usb_phy_mode(int port)
-+{
-+	if (port == 1)
-+		return USB_INIT_HOST;
-+	else
-+		return usb_phy_mode(port);
-+}
-+
-+int board_ehci_hcd_init(int port)
-+{
-+	u32 *usbnc_usb_ctrl;
-+
-+	if (port > 1)
-+		return -EINVAL;
-+
-+	usbnc_usb_ctrl = (u32 *)(USB_BASE_ADDR + USB_OTHERREGS_OFFSET +
-+				 port * 4);
-+
-+	/* Set Power polarity */
-+	setbits_le32(usbnc_usb_ctrl, UCTRL_PWR_POL);
-+
-+	return 0;
-+}
-+#endif
- 
- int board_early_init_f(void)
- {
-@@ -256,6 +300,11 @@
- #ifdef	CONFIG_FEC_MXC
- 	setup_fec();
- #endif
-+
-+#ifdef CONFIG_USB_EHCI_MX6
-+	setup_usb();
-+#endif
-+
- 	return 0;
- }
- 
-diff -ruN u-boot-2015.01-rc3/board/freescale/mx6sxsabresd/mx6sxsabresd.c u-boot/board/freescale/mx6sxsabresd/mx6sxsabresd.c
---- u-boot-2015.01-rc3/board/freescale/mx6sxsabresd/mx6sxsabresd.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/freescale/mx6sxsabresd/mx6sxsabresd.c	2015-01-01 17:34:32.381501153 +0100
-@@ -26,6 +26,8 @@
- #include <power/pmic.h>
- #include <power/pfuze100_pmic.h>
- #include "../common/pfuze.h"
-+#include <usb.h>
-+#include <usb/ehci-fsl.h>
- 
- DECLARE_GLOBAL_DATA_PTR;
- 
-@@ -168,7 +170,7 @@
- 	reg |= BM_ANADIG_PLL_ENET_REF_25M_ENABLE;
- 	writel(reg, &anatop->pll_enet);
- 
--	return enable_fec_anatop_clock(ENET_125MHz);
-+	return enable_fec_anatop_clock(ENET_125MHZ);
- }
- 
- int board_eth_init(bd_t *bis)
-@@ -212,6 +214,49 @@
- 	return 0;
- }
- 
-+#ifdef CONFIG_USB_EHCI_MX6
-+#define USB_OTHERREGS_OFFSET	0x800
-+#define UCTRL_PWR_POL		(1 << 9)
-+
-+static iomux_v3_cfg_t const usb_otg_pads[] = {
-+	/* OGT1 */
-+	MX6_PAD_GPIO1_IO09__USB_OTG1_PWR | MUX_PAD_CTRL(NO_PAD_CTRL),
-+	MX6_PAD_GPIO1_IO10__ANATOP_OTG1_ID | MUX_PAD_CTRL(NO_PAD_CTRL),
-+	/* OTG2 */
-+	MX6_PAD_GPIO1_IO12__USB_OTG2_PWR | MUX_PAD_CTRL(NO_PAD_CTRL)
-+};
-+
-+static void setup_usb(void)
-+{
-+	imx_iomux_v3_setup_multiple_pads(usb_otg_pads,
-+					 ARRAY_SIZE(usb_otg_pads));
-+}
-+
-+int board_usb_phy_mode(int port)
-+{
-+	if (port == 1)
-+		return USB_INIT_HOST;
-+	else
-+		return usb_phy_mode(port);
-+}
-+
-+int board_ehci_hcd_init(int port)
-+{
-+	u32 *usbnc_usb_ctrl;
-+
-+	if (port > 1)
-+		return -EINVAL;
-+
-+	usbnc_usb_ctrl = (u32 *)(USB_BASE_ADDR + USB_OTHERREGS_OFFSET +
-+				 port * 4);
-+
-+	/* Set Power polarity */
-+	setbits_le32(usbnc_usb_ctrl, UCTRL_PWR_POL);
-+
-+	return 0;
-+}
-+#endif
-+
- int board_phy_config(struct phy_device *phydev)
- {
- 	/*
-@@ -242,6 +287,10 @@
- 	/* Active high for ncp692 */
- 	gpio_direction_output(IMX_GPIO_NR(4, 16) , 1);
- 
-+#ifdef CONFIG_USB_EHCI_MX6
-+	setup_usb();
-+#endif
-+
- 	return 0;
- }
- 
-@@ -322,7 +371,6 @@
- 	return 0;
- }
- 
--
- int board_init(void)
- {
- 	/* Address of boot parameters */
-diff -ruN u-boot-2015.01-rc3/board/freescale/t104xrdb/ddr.c u-boot/board/freescale/t104xrdb/ddr.c
---- u-boot-2015.01-rc3/board/freescale/t104xrdb/ddr.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/freescale/t104xrdb/ddr.c	2015-01-01 17:34:32.389501022 +0100
-@@ -11,6 +11,7 @@
- #include <fsl_ddr_sdram.h>
- #include <fsl_ddr_dimm_params.h>
- #include <asm/fsl_law.h>
-+#include <asm/mpc85xx_gpio.h>
- #include "ddr.h"
- 
- DECLARE_GLOBAL_DATA_PTR;
-@@ -109,6 +110,19 @@
- 	popts->ddr_cdr2 = DDR_CDR2_ODT(DDR_CDR_ODT_75ohm);
- }
- 
-+#if defined(CONFIG_DEEP_SLEEP)
-+void board_mem_sleep_setup(void)
-+{
-+	void __iomem *cpld_base = (void *)CONFIG_SYS_CPLD_BASE;
-+
-+	/* does not provide HW signals for power management */
-+	clrbits_8(cpld_base + 0x17, 0x40);
-+	/* Disable MCKE isolation */
-+	gpio_set_value(2, 0);
-+	udelay(1);
-+}
-+#endif
-+
- phys_size_t initdram(int board_type)
- {
- 	phys_size_t dram_size;
-@@ -124,5 +138,10 @@
- #else
- 	dram_size =  fsl_ddr_sdram_size();
- #endif
-+
-+#if defined(CONFIG_DEEP_SLEEP) && !defined(CONFIG_SPL_BUILD)
-+	fsl_dp_resume();
-+#endif
-+
- 	return dram_size;
- }
-diff -ruN u-boot-2015.01-rc3/board/freescale/t104xrdb/spl.c u-boot/board/freescale/t104xrdb/spl.c
---- u-boot-2015.01-rc3/board/freescale/t104xrdb/spl.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/freescale/t104xrdb/spl.c	2015-01-01 17:34:32.389501022 +0100
-@@ -11,7 +11,7 @@
- #include <mmc.h>
- #include <fsl_esdhc.h>
- #include <spi_flash.h>
--#include <asm/mpc85xx_gpio.h>
-+#include "../common/sleep.h"
- 
- DECLARE_GLOBAL_DATA_PTR;
- 
-@@ -64,8 +64,8 @@
- 
- #ifdef CONFIG_DEEP_SLEEP
- 	/* disable the console if boot from deep sleep */
--	if (in_be32(&gur->scrtsr[0]) & (1 << 3))
--		gd->flags |= GD_FLG_SILENT | GD_FLG_DISABLE_CONSOLE;
-+	if (is_warm_boot())
-+		fsl_dp_disable_console();
- #endif
- 	/* compiler optimization barrier needed for GCC >= 3.4 */
- 	__asm__ __volatile__("" : : : "memory");
-@@ -132,16 +132,3 @@
- 	nand_boot();
- #endif
- }
--
--#ifdef CONFIG_DEEP_SLEEP
--void board_mem_sleep_setup(void)
--{
--	void __iomem *cpld_base = (void *)CONFIG_SYS_CPLD_BASE;
--
--	/* does not provide HW signals for power management */
--	clrbits_8(cpld_base + 0x17, 0x40);
--	/* Disable MCKE isolation */
--	gpio_set_value(2, 0);
--	udelay(1);
--}
--#endif
-diff -ruN u-boot-2015.01-rc3/board/freescale/t104xrdb/t104xrdb.c u-boot/board/freescale/t104xrdb/t104xrdb.c
---- u-boot-2015.01-rc3/board/freescale/t104xrdb/t104xrdb.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/freescale/t104xrdb/t104xrdb.c	2015-01-01 17:34:32.389501022 +0100
-@@ -17,8 +17,7 @@
- #include <asm/fsl_portals.h>
- #include <asm/fsl_liodn.h>
- #include <fm_eth.h>
--#include <asm/mpc85xx_gpio.h>
--
-+#include "../common/sleep.h"
- #include "t104xrdb.h"
- #include "cpld.h"
- 
-@@ -44,6 +43,16 @@
- 	return 0;
- }
- 
-+int board_early_init_f(void)
-+{
-+#if defined(CONFIG_DEEP_SLEEP)
-+	if (is_warm_boot())
-+		fsl_dp_disable_console();
-+#endif
-+
-+	return 0;
-+}
-+
- int board_early_init_r(void)
- {
- #ifdef CONFIG_SYS_FLASH_BASE
-@@ -113,14 +122,3 @@
- 
- 	return 0;
- }
--
--#ifdef CONFIG_DEEP_SLEEP
--void board_mem_sleep_setup(void)
--{
--	/* does not provide HW signals for power management */
--	CPLD_WRITE(misc_ctl_status, (CPLD_READ(misc_ctl_status) & ~0x40));
--	/* Disable MCKE isolation */
--	gpio_set_value(2, 0);
--	udelay(1);
--}
--#endif
-diff -ruN u-boot-2015.01-rc3/board/google/chromebook_link/Kconfig u-boot/board/google/chromebook_link/Kconfig
---- u-boot-2015.01-rc3/board/google/chromebook_link/Kconfig	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/google/chromebook_link/Kconfig	2015-01-01 17:34:32.401500826 +0100
-@@ -19,6 +19,7 @@
- 	select SOUTHBRIDGE_INTEL_C216
- 	select HAVE_ACPI_RESUME
- 	select MARK_GRAPHICS_MEM_WRCOMB
-+	select BOARD_ROMSIZE_KB_8192
- 
- config MMCONF_BASE_ADDRESS
- 	hex
-diff -ruN u-boot-2015.01-rc3/board/google/chromebook_link/link.c u-boot/board/google/chromebook_link/link.c
---- u-boot-2015.01-rc3/board/google/chromebook_link/link.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/google/chromebook_link/link.c	2015-01-01 17:34:32.401500826 +0100
-@@ -7,6 +7,9 @@
- #include <common.h>
- #include <cros_ec.h>
- #include <asm/gpio.h>
-+#include <asm/io.h>
-+#include <asm/pci.h>
-+#include <asm/arch/pch.h>
- 
- int arch_early_init_r(void)
- {
-@@ -121,3 +124,40 @@
- 
- 	return 0;
- }
-+
-+void setup_pch_gpios(u16 gpiobase, const struct pch_gpio_map *gpio)
-+{
-+	/* GPIO Set 1 */
-+	if (gpio->set1.level)
-+		outl(*((u32 *)gpio->set1.level), gpiobase + GP_LVL);
-+	if (gpio->set1.mode)
-+		outl(*((u32 *)gpio->set1.mode), gpiobase + GPIO_USE_SEL);
-+	if (gpio->set1.direction)
-+		outl(*((u32 *)gpio->set1.direction), gpiobase + GP_IO_SEL);
-+	if (gpio->set1.reset)
-+		outl(*((u32 *)gpio->set1.reset), gpiobase + GP_RST_SEL1);
-+	if (gpio->set1.invert)
-+		outl(*((u32 *)gpio->set1.invert), gpiobase + GPI_INV);
-+	if (gpio->set1.blink)
-+		outl(*((u32 *)gpio->set1.blink), gpiobase + GPO_BLINK);
-+
-+	/* GPIO Set 2 */
-+	if (gpio->set2.level)
-+		outl(*((u32 *)gpio->set2.level), gpiobase + GP_LVL2);
-+	if (gpio->set2.mode)
-+		outl(*((u32 *)gpio->set2.mode), gpiobase + GPIO_USE_SEL2);
-+	if (gpio->set2.direction)
-+		outl(*((u32 *)gpio->set2.direction), gpiobase + GP_IO_SEL2);
-+	if (gpio->set2.reset)
-+		outl(*((u32 *)gpio->set2.reset), gpiobase + GP_RST_SEL2);
-+
-+	/* GPIO Set 3 */
-+	if (gpio->set3.level)
-+		outl(*((u32 *)gpio->set3.level), gpiobase + GP_LVL3);
-+	if (gpio->set3.mode)
-+		outl(*((u32 *)gpio->set3.mode), gpiobase + GPIO_USE_SEL3);
-+	if (gpio->set3.direction)
-+		outl(*((u32 *)gpio->set3.direction), gpiobase + GP_IO_SEL3);
-+	if (gpio->set3.reset)
-+		outl(*((u32 *)gpio->set3.reset), gpiobase + GP_RST_SEL3);
-+}
-diff -ruN u-boot-2015.01-rc3/board/intel/crownbay/crownbay.c u-boot/board/intel/crownbay/crownbay.c
---- u-boot-2015.01-rc3/board/intel/crownbay/crownbay.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/intel/crownbay/crownbay.c	2015-01-01 17:34:32.405500760 +0100
-@@ -0,0 +1,32 @@
-+/*
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <asm/ibmpc.h>
-+#include <asm/pnp_def.h>
-+#include <netdev.h>
-+#include <smsc_lpc47m.h>
-+
-+#define SERIAL_DEV PNP_DEV(0x2e, 4)
-+
-+DECLARE_GLOBAL_DATA_PTR;
-+
-+int board_early_init_f(void)
-+{
-+	lpc47m_enable_serial(SERIAL_DEV, UART0_BASE);
-+
-+	return 0;
-+}
-+
-+void setup_pch_gpios(u16 gpiobase, const struct pch_gpio_map *gpio)
-+{
-+	return;
-+}
-+
-+int board_eth_init(bd_t *bis)
-+{
-+	return pci_eth_init(bis);
-+}
-diff -ruN u-boot-2015.01-rc3/board/intel/crownbay/Kconfig u-boot/board/intel/crownbay/Kconfig
---- u-boot-2015.01-rc3/board/intel/crownbay/Kconfig	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/intel/crownbay/Kconfig	2015-01-01 17:34:32.405500760 +0100
-@@ -0,0 +1,20 @@
-+if TARGET_CROWNBAY
-+
-+config SYS_BOARD
-+	default "crownbay"
-+
-+config SYS_VENDOR
-+	default "intel"
-+
-+config SYS_SOC
-+	default "queensbay"
-+
-+config SYS_CONFIG_NAME
-+	default "crownbay"
-+
-+config BOARD_SPECIFIC_OPTIONS # dummy
-+	def_bool y
-+	select INTEL_QUEENSBAY
-+	select BOARD_ROMSIZE_KB_1024
-+
-+endif
-diff -ruN u-boot-2015.01-rc3/board/intel/crownbay/MAINTAINERS u-boot/board/intel/crownbay/MAINTAINERS
---- u-boot-2015.01-rc3/board/intel/crownbay/MAINTAINERS	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/intel/crownbay/MAINTAINERS	2015-01-01 17:34:32.405500760 +0100
-@@ -0,0 +1,6 @@
-+INTEL CROWNBAY BOARD
-+M:	Bin Meng <bmeng.cn at gmail.com>
-+S:	Maintained
-+F:	board/intel/crownbay/
-+F:	include/configs/crownbay.h
-+F:	configs/crownbay_defconfig
-diff -ruN u-boot-2015.01-rc3/board/intel/crownbay/Makefile u-boot/board/intel/crownbay/Makefile
---- u-boot-2015.01-rc3/board/intel/crownbay/Makefile	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/intel/crownbay/Makefile	2015-01-01 17:34:32.405500760 +0100
-@@ -0,0 +1,7 @@
-+#
-+# Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+#
-+# SPDX-License-Identifier:	GPL-2.0+
-+#
-+
-+obj-y	+= crownbay.o start.o
-diff -ruN u-boot-2015.01-rc3/board/intel/crownbay/start.S u-boot/board/intel/crownbay/start.S
---- u-boot-2015.01-rc3/board/intel/crownbay/start.S	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/intel/crownbay/start.S	2015-01-01 17:34:32.405500760 +0100
-@@ -0,0 +1,9 @@
-+/*
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+.globl early_board_init
-+early_board_init:
-+	jmp	early_board_init_ret
-diff -ruN u-boot-2015.01-rc3/board/nvidia/cardhu/cardhu.c u-boot/board/nvidia/cardhu/cardhu.c
---- u-boot-2015.01-rc3/board/nvidia/cardhu/cardhu.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/nvidia/cardhu/cardhu.c	2015-01-01 17:34:32.449500039 +0100
-@@ -6,6 +6,7 @@
-  */
- 
- #include <common.h>
-+#include <dm.h>
- #include <asm/arch/pinmux.h>
- #include <asm/arch/gp_padctrl.h>
- #include "pinmux-config-cardhu.h"
-@@ -37,17 +38,23 @@
-  */
- void board_sdmmc_voltage_init(void)
- {
-+	struct udevice *dev;
- 	uchar reg, data_buffer[1];
-+	int ret;
- 	int i;
- 
--	i2c_set_bus_num(0);	/* PMU is on bus 0 */
-+	ret = i2c_get_chip_for_busnum(0, PMU_I2C_ADDRESS, &dev);
-+	if (ret) {
-+		debug("%s: Cannot find PMIC I2C chip\n", __func__);
-+		return;
-+	}
- 
- 	/* TPS659110: LDO5_REG = 3.3v, ACTIVE to SDMMC1 */
- 	data_buffer[0] = 0x65;
- 	reg = 0x32;
- 
- 	for (i = 0; i < MAX_I2C_RETRY; ++i) {
--		if (i2c_write(PMU_I2C_ADDRESS, reg, 1, data_buffer, 1))
-+		if (i2c_write(dev, reg, data_buffer, 1))
- 			udelay(100);
- 	}
- 
-@@ -56,7 +63,7 @@
- 	reg = 0x67;
- 
- 	for (i = 0; i < MAX_I2C_RETRY; ++i) {
--		if (i2c_write(PMU_I2C_ADDRESS, reg, 1, data_buffer, 1))
-+		if (i2c_write(dev, reg, data_buffer, 1))
- 			udelay(100);
- 	}
- }
-diff -ruN u-boot-2015.01-rc3/board/nvidia/common/board.c u-boot/board/nvidia/common/board.c
---- u-boot-2015.01-rc3/board/nvidia/common/board.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/nvidia/common/board.c	2015-01-01 17:34:32.453499973 +0100
-@@ -113,10 +113,6 @@
- 	power_det_init();
- 
- #ifdef CONFIG_SYS_I2C_TEGRA
--#ifndef CONFIG_SYS_I2C_INIT_BOARD
--#error "You must define CONFIG_SYS_I2C_INIT_BOARD to use i2c on Nvidia boards"
--#endif
--	i2c_init_board();
- # ifdef CONFIG_TEGRA_PMU
- 	if (pmu_set_nominal())
- 		debug("Failed to select nominal voltages\n");
-diff -ruN u-boot-2015.01-rc3/board/nvidia/dalmore/dalmore.c u-boot/board/nvidia/dalmore/dalmore.c
---- u-boot-2015.01-rc3/board/nvidia/dalmore/dalmore.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/nvidia/dalmore/dalmore.c	2015-01-01 17:34:32.453499973 +0100
-@@ -15,6 +15,7 @@
-  */
- 
- #include <common.h>
-+#include <dm.h>
- #include <asm/arch/pinmux.h>
- #include <asm/arch/gp_padctrl.h>
- #include "pinmux-config-dalmore.h"
-@@ -50,18 +51,21 @@
-  */
- void board_sdmmc_voltage_init(void)
- {
-+	struct udevice *dev;
- 	uchar reg, data_buffer[1];
- 	int ret;
- 
--	ret = i2c_set_bus_num(0);/* PMU is on bus 0 */
--	if (ret)
--		printf("%s: i2c_set_bus_num returned %d\n", __func__, ret);
-+	ret = i2c_get_chip_for_busnum(0, PMU_I2C_ADDRESS, &dev);
-+	if (ret) {
-+		debug("%s: Cannot find PMIC I2C chip\n", __func__);
-+		return;
-+	}
- 
- 	/* TPS65913: LDO9_VOLTAGE = 3.3V */
- 	data_buffer[0] = 0x31;
- 	reg = 0x61;
- 
--	ret = i2c_write(PMU_I2C_ADDRESS, reg, 1, data_buffer, 1);
-+	ret = i2c_write(dev, reg, data_buffer, 1);
- 	if (ret)
- 		printf("%s: PMU i2c_write %02X<-%02X returned %d\n",
- 			__func__, reg, data_buffer[0], ret);
-@@ -70,7 +74,7 @@
- 	data_buffer[0] = 0x01;
- 	reg = 0x60;
- 
--	ret = i2c_write(PMU_I2C_ADDRESS, reg, 1, data_buffer, 1);
-+	ret = i2c_write(dev, reg, data_buffer, 1);
- 	if (ret)
- 		printf("%s: PMU i2c_write %02X<-%02X returned %d\n",
- 			__func__, reg, data_buffer[0], ret);
-@@ -79,7 +83,12 @@
- 	data_buffer[0] = 0x03;
- 	reg = 0x14;
- 
--	ret = i2c_write(BAT_I2C_ADDRESS, reg, 1, data_buffer, 1);
-+	ret = i2c_get_chip_for_busnum(0, BAT_I2C_ADDRESS, &dev);
-+	if (ret) {
-+		debug("%s: Cannot find charger I2C chip\n", __func__);
-+		return;
-+	}
-+	ret = i2c_write(dev, reg, data_buffer, 1);
- 	if (ret)
- 		printf("%s: BAT i2c_write %02X<-%02X returned %d\n",
- 			__func__, reg, data_buffer[0], ret);
-diff -ruN u-boot-2015.01-rc3/board/nvidia/nyan-big/Kconfig u-boot/board/nvidia/nyan-big/Kconfig
---- u-boot-2015.01-rc3/board/nvidia/nyan-big/Kconfig	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/nvidia/nyan-big/Kconfig	2015-01-01 17:34:32.453499973 +0100
-@@ -0,0 +1,24 @@
-+if TARGET_NYAN_BIG
-+
-+config SYS_CPU
-+	string
-+	default "arm720t" if SPL_BUILD
-+	default "armv7" if !SPL_BUILD
-+
-+config SYS_BOARD
-+	string
-+	default "nyan-big"
-+
-+config SYS_VENDOR
-+	string
-+	default "nvidia"
-+
-+config SYS_SOC
-+	string
-+	default "tegra124"
-+
-+config SYS_CONFIG_NAME
-+	string
-+	default "nyan-big"
-+
-+endif
-diff -ruN u-boot-2015.01-rc3/board/nvidia/nyan-big/MAINTAINERS u-boot/board/nvidia/nyan-big/MAINTAINERS
---- u-boot-2015.01-rc3/board/nvidia/nyan-big/MAINTAINERS	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/nvidia/nyan-big/MAINTAINERS	2015-01-01 17:34:32.453499973 +0100
-@@ -0,0 +1,6 @@
-+NORRIN BOARD
-+M:	Allen Martin <amartin at nvidia.com>
-+S:	Maintained
-+F:	board/nvidia/nyan-big/
-+F:	include/configs/nyan-big.h
-+F:	configs/nyan-big_defconfig
-diff -ruN u-boot-2015.01-rc3/board/nvidia/nyan-big/Makefile u-boot/board/nvidia/nyan-big/Makefile
---- u-boot-2015.01-rc3/board/nvidia/nyan-big/Makefile	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/nvidia/nyan-big/Makefile	2015-01-01 17:34:32.453499973 +0100
-@@ -0,0 +1,9 @@
-+#
-+# (C) Copyright 2014
-+# NVIDIA Corporation <www.nvidia.com>
-+#
-+# SPDX-License-Identifier:     GPL-2.0+
-+#
-+
-+obj-y	+= ../venice2/as3722_init.o
-+obj-y	+= nyan-big.o
-diff -ruN u-boot-2015.01-rc3/board/nvidia/nyan-big/nyan-big.c u-boot/board/nvidia/nyan-big/nyan-big.c
---- u-boot-2015.01-rc3/board/nvidia/nyan-big/nyan-big.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/nvidia/nyan-big/nyan-big.c	2015-01-01 17:34:32.453499973 +0100
-@@ -0,0 +1,27 @@
-+/*
-+ * (C) Copyright 2014
-+ * NVIDIA Corporation <www.nvidia.com>
-+ *
-+ * SPDX-License-Identifier:     GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <asm/arch/gpio.h>
-+#include <asm/arch/pinmux.h>
-+#include "pinmux-config-nyan-big.h"
-+
-+/*
-+ * Routine: pinmux_init
-+ * Description: Do individual peripheral pinmux configs
-+ */
-+void pinmux_init(void)
-+{
-+	gpio_config_table(nyan_big_gpio_inits,
-+			  ARRAY_SIZE(nyan_big_gpio_inits));
-+
-+	pinmux_config_pingrp_table(nyan_big_pingrps,
-+				   ARRAY_SIZE(nyan_big_pingrps));
-+
-+	pinmux_config_drvgrp_table(nyan_big_drvgrps,
-+				   ARRAY_SIZE(nyan_big_drvgrps));
-+}
-diff -ruN u-boot-2015.01-rc3/board/nvidia/nyan-big/pinmux-config-nyan-big.h u-boot/board/nvidia/nyan-big/pinmux-config-nyan-big.h
---- u-boot-2015.01-rc3/board/nvidia/nyan-big/pinmux-config-nyan-big.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/nvidia/nyan-big/pinmux-config-nyan-big.h	2015-01-01 17:34:32.453499973 +0100
-@@ -0,0 +1,287 @@
-+/*
-+ * Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved.
-+ *
-+ * SPDX-License-Identifier: GPL-2.0+
-+ */
-+
-+#ifndef _PINMUX_CONFIG_NYAN_BIG_H_
-+#define _PINMUX_CONFIG_NYAN_BIG_H_
-+
-+#define GPIO_INIT(_gpio, _init)				\
-+	{						\
-+		.gpio	= GPIO_P##_gpio,		\
-+		.init	= TEGRA_GPIO_INIT_##_init,	\
-+	}
-+
-+static const struct tegra_gpio_config nyan_big_gpio_inits[] = {
-+	/*        gpio, init_val */
-+	GPIO_INIT(A0,   IN),
-+	GPIO_INIT(C7,   IN),
-+	GPIO_INIT(G0,   IN),
-+	GPIO_INIT(G1,   IN),
-+	GPIO_INIT(G2,   IN),
-+	GPIO_INIT(G3,   IN),
-+	GPIO_INIT(H2,   IN),
-+	GPIO_INIT(H4,   IN),
-+	GPIO_INIT(H6,   IN),
-+	GPIO_INIT(H7,   OUT1),
-+	GPIO_INIT(I0,   IN),
-+	GPIO_INIT(I1,   IN),
-+	GPIO_INIT(I5,   OUT1),
-+	GPIO_INIT(I6,   IN),
-+	GPIO_INIT(I7,   IN),
-+	GPIO_INIT(J0,   IN),
-+	GPIO_INIT(J7,   IN),
-+	GPIO_INIT(K1,   OUT0),
-+	GPIO_INIT(K2,   IN),
-+	GPIO_INIT(K4,   OUT0),
-+	GPIO_INIT(K6,   OUT0),
-+	GPIO_INIT(K7,   IN),
-+	GPIO_INIT(N7,   IN),
-+	GPIO_INIT(P2,   OUT0),
-+	GPIO_INIT(Q0,   IN),
-+	GPIO_INIT(Q2,   IN),
-+	GPIO_INIT(Q3,   IN),
-+	GPIO_INIT(Q6,   IN),
-+	GPIO_INIT(Q7,   IN),
-+	GPIO_INIT(R0,   OUT0),
-+	GPIO_INIT(R1,   IN),
-+	GPIO_INIT(R4,   IN),
-+	GPIO_INIT(R7,   IN),
-+	GPIO_INIT(S3,   OUT0),
-+	GPIO_INIT(S4,   OUT0),
-+	GPIO_INIT(S7,   IN),
-+	GPIO_INIT(T1,   IN),
-+	GPIO_INIT(U4,   IN),
-+	GPIO_INIT(U5,   IN),
-+	GPIO_INIT(U6,   IN),
-+	GPIO_INIT(V0,   IN),
-+	GPIO_INIT(W3,   IN),
-+	GPIO_INIT(X1,   IN),
-+	GPIO_INIT(X4,   IN),
-+	GPIO_INIT(X7,   OUT0),
-+};
-+
-+#define PINCFG(_pingrp, _mux, _pull, _tri, _io, _od, _rcv_sel)	\
-+	{							\
-+		.pingrp		= PMUX_PINGRP_##_pingrp,	\
-+		.func		= PMUX_FUNC_##_mux,		\
-+		.pull		= PMUX_PULL_##_pull,		\
-+		.tristate	= PMUX_TRI_##_tri,		\
-+		.io		= PMUX_PIN_##_io,		\
-+		.od		= PMUX_PIN_OD_##_od,		\
-+		.rcv_sel	= PMUX_PIN_RCV_SEL_##_rcv_sel,	\
-+		.lock		= PMUX_PIN_LOCK_DEFAULT,	\
-+		.ioreset	= PMUX_PIN_IO_RESET_DEFAULT,	\
-+	}
-+
-+static const struct pmux_pingrp_config nyan_big_pingrps[] = {
-+	/*     pingrp,                 mux,         pull,   tri,      e_input, od,      rcv_sel */
-+	PINCFG(CLK_32K_OUT_PA0,        DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(UART3_CTS_N_PA1,        GMI,         DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(DAP2_FS_PA2,            I2S1,        NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(DAP2_SCLK_PA3,          I2S1,        NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(DAP2_DIN_PA4,           I2S1,        NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(DAP2_DOUT_PA5,          I2S1,        NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(SDMMC3_CLK_PA6,         SDMMC3,      NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(SDMMC3_CMD_PA7,         SDMMC3,      UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PB0,                    RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PB1,                    RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(SDMMC3_DAT3_PB4,        SDMMC3,      UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(SDMMC3_DAT2_PB5,        SDMMC3,      UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(SDMMC3_DAT1_PB6,        SDMMC3,      UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(SDMMC3_DAT0_PB7,        SDMMC3,      UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(UART3_RTS_N_PC0,        GMI,         DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(UART2_TXD_PC2,          IRDA,        DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(UART2_RXD_PC3,          IRDA,        DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(GEN1_I2C_SCL_PC4,       I2C1,        NORMAL, NORMAL,   INPUT,   ENABLE,  DEFAULT),
-+	PINCFG(GEN1_I2C_SDA_PC5,       I2C1,        NORMAL, NORMAL,   INPUT,   ENABLE,  DEFAULT),
-+	PINCFG(PC7,                    DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PG0,                    DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PG1,                    DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PG2,                    DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PG3,                    DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PG4,                    SPI4,        NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PG5,                    SPI4,        NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PG6,                    SPI4,        NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PG7,                    SPI4,        NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PH0,                    GMI,         DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PH1,                    PWM1,        NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PH2,                    DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PH3,                    GMI,         DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PH4,                    DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PH5,                    RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PH6,                    DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PH7,                    DEFAULT,     NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PI0,                    DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PI1,                    DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PI2,                    RSVD4,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PI3,                    SPI4,        NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PI4,                    GMI,         DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PI5,                    DEFAULT,     UP,     NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PI6,                    DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PI7,                    DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PJ0,                    DEFAULT,     UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PJ2,                    RSVD1,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(UART2_CTS_N_PJ5,        GMI,         DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(UART2_RTS_N_PJ6,        GMI,         DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PJ7,                    DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PK0,                    RSVD1,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PK1,                    DEFAULT,     NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PK2,                    DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PK3,                    GMI,         DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PK4,                    DEFAULT,     UP,     NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(SPDIF_OUT_PK5,          RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(SPDIF_IN_PK6,           DEFAULT,     DOWN,   NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PK7,                    DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(DAP1_FS_PN0,            RSVD4,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(DAP1_DIN_PN1,           RSVD4,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(DAP1_DOUT_PN2,          I2S0,        DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(DAP1_SCLK_PN3,          RSVD4,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(USB_VBUS_EN0_PN4,       USB,         NORMAL, NORMAL,   INPUT,   ENABLE,  DEFAULT),
-+	PINCFG(USB_VBUS_EN1_PN5,       USB,         NORMAL, NORMAL,   INPUT,   ENABLE,  DEFAULT),
-+	PINCFG(HDMI_INT_PN7,           DEFAULT,     DOWN,   NORMAL,   INPUT,   DEFAULT, NORMAL),
-+	PINCFG(ULPI_DATA7_PO0,         ULPI,        DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(ULPI_DATA0_PO1,         ULPI,        DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(ULPI_DATA1_PO2,         ULPI,        DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(ULPI_DATA2_PO3,         ULPI,        DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(ULPI_DATA3_PO4,         ULPI,        DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(ULPI_DATA4_PO5,         ULPI,        DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(ULPI_DATA5_PO6,         ULPI,        DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(ULPI_DATA6_PO7,         ULPI,        DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(DAP3_FS_PP0,            I2S2,        DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(DAP3_DIN_PP1,           I2S2,        DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(DAP3_DOUT_PP2,          DEFAULT,     NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(DAP3_SCLK_PP3,          RSVD3,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(DAP4_FS_PP4,            RSVD4,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(DAP4_DIN_PP5,           RSVD3,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(DAP4_DOUT_PP6,          RSVD4,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(DAP4_SCLK_PP7,          RSVD3,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(KB_COL0_PQ0,            DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(KB_COL1_PQ1,            RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(KB_COL2_PQ2,            DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(KB_COL3_PQ3,            DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(KB_COL4_PQ4,            SDMMC3,      UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(KB_COL5_PQ5,            RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(KB_COL6_PQ6,            DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(KB_COL7_PQ7,            DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(KB_ROW0_PR0,            DEFAULT,     NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(KB_ROW1_PR1,            DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(KB_ROW2_PR2,            RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(KB_ROW3_PR3,            KBC,         DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(KB_ROW4_PR4,            DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(KB_ROW5_PR5,            RSVD3,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(KB_ROW6_PR6,            KBC,         DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(KB_ROW7_PR7,            DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(KB_ROW8_PS0,            RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(KB_ROW9_PS1,            UARTA,       DOWN,   NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(KB_ROW10_PS2,           UARTA,       NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(KB_ROW11_PS3,           DEFAULT,     NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(KB_ROW12_PS4,           DEFAULT,     NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(KB_ROW13_PS5,           RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(KB_ROW14_PS6,           RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(KB_ROW15_PS7,           DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(KB_ROW16_PT0,           RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(KB_ROW17_PT1,           DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(GEN2_I2C_SCL_PT5,       I2C2,        NORMAL, NORMAL,   INPUT,   ENABLE,  DEFAULT),
-+	PINCFG(GEN2_I2C_SDA_PT6,       I2C2,        NORMAL, NORMAL,   INPUT,   ENABLE,  DEFAULT),
-+	PINCFG(SDMMC4_CMD_PT7,         SDMMC4,      NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PU0,                    RSVD4,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PU1,                    RSVD1,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PU2,                    RSVD1,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PU3,                    GMI,         DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PU4,                    DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PU5,                    DEFAULT,     UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PU6,                    DEFAULT,     UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PV0,                    DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PV1,                    RSVD1,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(SDMMC3_CD_N_PV2,        SDMMC3,      UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(SDMMC1_WP_N_PV3,        SDMMC1,      DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(DDC_SCL_PV4,            I2C4,        NORMAL, NORMAL,   INPUT,   DEFAULT, NORMAL),
-+	PINCFG(DDC_SDA_PV5,            I2C4,        NORMAL, NORMAL,   INPUT,   DEFAULT, NORMAL),
-+	PINCFG(GPIO_W2_AUD_PW2,        RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(GPIO_W3_AUD_PW3,        DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(DAP_MCLK1_PW4,          EXTPERIPH1,  NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(CLK2_OUT_PW5,           RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(UART3_TXD_PW6,          RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(UART3_RXD_PW7,          RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(DVFS_PWM_PX0,           CLDVFS,      NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(GPIO_X1_AUD_PX1,        DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(DVFS_CLK_PX2,           CLDVFS,      NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(GPIO_X3_AUD_PX3,        RSVD4,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(GPIO_X4_AUD_PX4,        DEFAULT,     NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(GPIO_X5_AUD_PX5,        RSVD4,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(GPIO_X6_AUD_PX6,        GMI,         DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(GPIO_X7_AUD_PX7,        DEFAULT,     NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(ULPI_CLK_PY0,           SPI1,        NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(ULPI_DIR_PY1,           SPI1,        NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(ULPI_NXT_PY2,           SPI1,        NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(ULPI_STP_PY3,           SPI1,        NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(SDMMC1_DAT3_PY4,        SDMMC1,      UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(SDMMC1_DAT2_PY5,        SDMMC1,      UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(SDMMC1_DAT1_PY6,        SDMMC1,      UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(SDMMC1_DAT0_PY7,        SDMMC1,      UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(SDMMC1_CLK_PZ0,         SDMMC1,      NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(SDMMC1_CMD_PZ1,         SDMMC1,      UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PWR_I2C_SCL_PZ6,        I2CPWR,      NORMAL, NORMAL,   INPUT,   ENABLE,  DEFAULT),
-+	PINCFG(PWR_I2C_SDA_PZ7,        I2CPWR,      NORMAL, NORMAL,   INPUT,   ENABLE,  DEFAULT),
-+	PINCFG(SDMMC4_DAT0_PAA0,       SDMMC4,      UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(SDMMC4_DAT1_PAA1,       SDMMC4,      UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(SDMMC4_DAT2_PAA2,       SDMMC4,      UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(SDMMC4_DAT3_PAA3,       SDMMC4,      UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(SDMMC4_DAT4_PAA4,       SDMMC4,      UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(SDMMC4_DAT5_PAA5,       SDMMC4,      UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(SDMMC4_DAT6_PAA6,       SDMMC4,      UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(SDMMC4_DAT7_PAA7,       SDMMC4,      UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(PBB0,                   VGP6,        DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(CAM_I2C_SCL_PBB1,       RSVD3,       DOWN,   TRISTATE, OUTPUT,  DISABLE, DEFAULT),
-+	PINCFG(CAM_I2C_SDA_PBB2,       RSVD3,       DOWN,   TRISTATE, OUTPUT,  DISABLE, DEFAULT),
-+	PINCFG(PBB3,                   VGP3,        DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PBB4,                   VGP4,        DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PBB5,                   RSVD3,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PBB6,                   RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PBB7,                   RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(CAM_MCLK_PCC0,          VI,          DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PCC1,                   RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PCC2,                   RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(SDMMC4_CLK_PCC4,        SDMMC4,      NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(CLK2_REQ_PCC5,          RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PEX_L0_RST_N_PDD1,      RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PEX_L0_CLKREQ_N_PDD2,   RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PEX_WAKE_N_PDD3,        RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PEX_L1_RST_N_PDD5,      RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PEX_L1_CLKREQ_N_PDD6,   RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(CLK3_OUT_PEE0,          RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(CLK3_REQ_PEE1,          RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(DAP_MCLK1_REQ_PEE2,     RSVD4,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(HDMI_CEC_PEE3,          CEC,         NORMAL, NORMAL,   INPUT,   ENABLE,  DEFAULT),
-+	PINCFG(SDMMC3_CLK_LB_OUT_PEE4, SDMMC3,      NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(SDMMC3_CLK_LB_IN_PEE5,  SDMMC3,      UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(DP_HPD_PFF0,            DP,          UP,     NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(USB_VBUS_EN2_PFF1,      RSVD2,       DOWN,   TRISTATE, OUTPUT,  DISABLE, DEFAULT),
-+	PINCFG(PFF2,                   RSVD2,       DOWN,   TRISTATE, OUTPUT,  DISABLE, DEFAULT),
-+	PINCFG(CORE_PWR_REQ,           PWRON,       NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(CPU_PWR_REQ,            CPU,         NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(PWR_INT_N,              PMI,         NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(RESET_OUT_N,            RESET_OUT_N, NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+	PINCFG(OWR,                    RSVD2,       DOWN,   TRISTATE, OUTPUT,  DEFAULT, NORMAL),
-+	PINCFG(CLK_32K_IN,             CLK,         NORMAL, NORMAL,   INPUT,   DEFAULT, DEFAULT),
-+	PINCFG(JTAG_RTCK,              RTCK,        NORMAL, NORMAL,   OUTPUT,  DEFAULT, DEFAULT),
-+};
-+
-+#define DRVCFG(_drvgrp, _slwf, _slwr, _drvup, _drvdn, _lpmd, _schmt, _hsm) \
-+	{						\
-+		.drvgrp = PMUX_DRVGRP_##_drvgrp,	\
-+		.slwf   = _slwf,			\
-+		.slwr   = _slwr,			\
-+		.drvup  = _drvup,			\
-+		.drvdn  = _drvdn,			\
-+		.lpmd   = PMUX_LPMD_##_lpmd,		\
-+		.schmt  = PMUX_SCHMT_##_schmt,		\
-+		.hsm    = PMUX_HSM_##_hsm,		\
-+	}
-+
-+static const struct pmux_drvgrp_config nyan_big_drvgrps[] = {
-+};
-+
-+#endif /* PINMUX_CONFIG_NYAN_BIG_H */
-diff -ruN u-boot-2015.01-rc3/board/nvidia/venice2/as3722_init.h u-boot/board/nvidia/venice2/as3722_init.h
---- u-boot-2015.01-rc3/board/nvidia/venice2/as3722_init.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/nvidia/venice2/as3722_init.h	2015-01-01 17:34:32.453499973 +0100
-@@ -18,7 +18,7 @@
- #define AS3722_LDO6VOLTAGE_REG	0x16	/* VDD_SDMMC */
- #define AS3722_LDCONTROL_REG	0x4E
- 
--#ifdef CONFIG_TARGET_JETSON_TK1
-+#if defined(CONFIG_TARGET_JETSON_TK1) || defined(CONFIG_TARGET_NYAN_BIG)
- #define AS3722_SD0VOLTAGE_DATA	(0x3C00 | AS3722_SD0VOLTAGE_REG)
- #else
- #define AS3722_SD0VOLTAGE_DATA	(0x2800 | AS3722_SD0VOLTAGE_REG)
-diff -ruN u-boot-2015.01-rc3/board/nvidia/whistler/whistler.c u-boot/board/nvidia/whistler/whistler.c
---- u-boot-2015.01-rc3/board/nvidia/whistler/whistler.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/nvidia/whistler/whistler.c	2015-01-01 17:34:32.453499973 +0100
-@@ -6,6 +6,7 @@
-  */
- 
- #include <common.h>
-+#include <dm.h>
- #include <asm/io.h>
- #include <asm/arch/tegra.h>
- #include <asm/arch/clock.h>
-@@ -21,23 +22,26 @@
-  */
- void pin_mux_mmc(void)
- {
-+	struct udevice *dev;
- 	uchar val;
- 	int ret;
- 
- 	/* Turn on MAX8907B LDO12 to 2.8V for J40 power */
--	ret = i2c_set_bus_num(0);
--	if (ret)
--		printf("i2c_set_bus_num failed: %d\n", ret);
-+	ret = i2c_get_chip_for_busnum(0, 0x3c, &dev);
-+	if (ret) {
-+		printf("%s: Cannot find MAX8907B I2C chip\n", __func__);
-+		return;
-+	}
- 	val = 0x29;
--	ret = i2c_write(0x3c, 0x46, 1, &val, 1);
-+	ret = i2c_write(dev, 0x46, &val, 1);
- 	if (ret)
- 		printf("i2c_write 0 0x3c 0x46 failed: %d\n", ret);
- 	val = 0x00;
--	ret = i2c_write(0x3c, 0x45, 1, &val, 1);
-+	ret = i2c_write(dev, 0x45, &val, 1);
- 	if (ret)
- 		printf("i2c_write 0 0x3c 0x45 failed: %d\n", ret);
- 	val = 0x1f;
--	ret = i2c_write(0x3c, 0x44, 1, &val, 1);
-+	ret = i2c_write(dev, 0x44, &val, 1);
- 	if (ret)
- 		printf("i2c_write 0 0x3c 0x44 failed: %d\n", ret);
- 
-@@ -49,6 +53,7 @@
- /* this is a weak define that we are overriding */
- void pin_mux_usb(void)
- {
-+	struct udevice *dev;
- 	uchar val;
- 	int ret;
- 
-@@ -59,15 +64,17 @@
- 	 */
- 
- 	/* Turn on TAC6416's GPIO 0+1 for USB1/3's VBUS */
--	ret = i2c_set_bus_num(0);
--	if (ret)
--		printf("i2c_set_bus_num failed: %d\n", ret);
-+	ret = i2c_get_chip_for_busnum(0, 0x20, &dev);
-+	if (ret) {
-+		printf("%s: Cannot find TAC6416 I2C chip\n", __func__);
-+		return;
-+	}
- 	val = 0x03;
--	ret = i2c_write(0x20, 2, 1, &val, 1);
-+	ret = i2c_write(dev, 2, &val, 1);
- 	if (ret)
- 		printf("i2c_write 0 0x20 2 failed: %d\n", ret);
- 	val = 0xfc;
--	ret = i2c_write(0x20, 6, 1, &val, 1);
-+	ret = i2c_write(dev, 6, &val, 1);
- 	if (ret)
- 		printf("i2c_write 0 0x20 6 failed: %d\n", ret);
- }
-diff -ruN u-boot-2015.01-rc3/board/raspberrypi/rpi/rpi.c u-boot/board/raspberrypi/rpi/rpi.c
---- u-boot-2015.01-rc3/board/raspberrypi/rpi/rpi.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/raspberrypi/rpi/rpi.c	2015-01-01 17:34:32.469499711 +0100
-@@ -24,6 +24,7 @@
- #include <asm/arch/mbox.h>
- #include <asm/arch/sdhci.h>
- #include <asm/global_data.h>
-+#include <dm/platform_data/serial_pl01x.h>
- 
- DECLARE_GLOBAL_DATA_PTR;
- 
-@@ -36,6 +37,17 @@
- 	.platdata = &gpio_platdata,
- };
- 
-+static const struct pl01x_serial_platdata serial_platdata = {
-+	.base = 0x20201000,
-+	.type = TYPE_PL011,
-+	.clock = 3000000,
-+};
-+
-+U_BOOT_DEVICE(bcm2835_serials) = {
-+	.name = "serial_pl01x",
-+	.platdata = &serial_platdata,
-+};
-+
- struct msg_get_arm_mem {
- 	struct bcm2835_mbox_hdr hdr;
- 	struct bcm2835_mbox_tag_get_arm_mem get_arm_mem;
-@@ -70,58 +82,82 @@
- static const struct {
- 	const char *name;
- 	const char *fdtfile;
-+	bool has_onboard_eth;
- } models[] = {
-+	[0] = {
-+		"Unknown model",
-+		"bcm2835-rpi-other.dtb",
-+		false,
-+	},
- 	[BCM2835_BOARD_REV_B_I2C0_2] = {
- 		"Model B (no P5)",
- 		"bcm2835-rpi-b-i2c0.dtb",
-+		true,
- 	},
- 	[BCM2835_BOARD_REV_B_I2C0_3] = {
- 		"Model B (no P5)",
- 		"bcm2835-rpi-b-i2c0.dtb",
-+		true,
- 	},
- 	[BCM2835_BOARD_REV_B_I2C1_4] = {
- 		"Model B",
- 		"bcm2835-rpi-b.dtb",
-+		true,
- 	},
- 	[BCM2835_BOARD_REV_B_I2C1_5] = {
- 		"Model B",
- 		"bcm2835-rpi-b.dtb",
-+		true,
- 	},
- 	[BCM2835_BOARD_REV_B_I2C1_6] = {
- 		"Model B",
- 		"bcm2835-rpi-b.dtb",
-+		true,
- 	},
- 	[BCM2835_BOARD_REV_A_7] = {
- 		"Model A",
- 		"bcm2835-rpi-a.dtb",
-+		false,
- 	},
- 	[BCM2835_BOARD_REV_A_8] = {
- 		"Model A",
- 		"bcm2835-rpi-a.dtb",
-+		false,
- 	},
- 	[BCM2835_BOARD_REV_A_9] = {
- 		"Model A",
- 		"bcm2835-rpi-a.dtb",
-+		false,
- 	},
- 	[BCM2835_BOARD_REV_B_REV2_d] = {
- 		"Model B rev2",
- 		"bcm2835-rpi-b-rev2.dtb",
-+		true,
- 	},
- 	[BCM2835_BOARD_REV_B_REV2_e] = {
- 		"Model B rev2",
- 		"bcm2835-rpi-b-rev2.dtb",
-+		true,
- 	},
- 	[BCM2835_BOARD_REV_B_REV2_f] = {
- 		"Model B rev2",
- 		"bcm2835-rpi-b-rev2.dtb",
-+		true,
- 	},
- 	[BCM2835_BOARD_REV_B_PLUS] = {
- 		"Model B+",
- 		"bcm2835-rpi-b-plus.dtb",
-+		true,
- 	},
- 	[BCM2835_BOARD_REV_CM] = {
- 		"Compute Module",
- 		"bcm2835-rpi-cm.dtb",
-+		false,
-+	},
-+	[BCM2835_BOARD_REV_A_PLUS] = {
-+		"Model A+",
-+		"bcm2835-rpi-a-plus.dtb",
-+		false,
- 	},
- };
- 
-@@ -154,9 +190,6 @@
- 		return;
- 
- 	fdtfile = models[rpi_board_rev].fdtfile;
--	if (!fdtfile)
--		fdtfile = "bcm2835-rpi-other.dtb";
--
- 	setenv("fdtfile", fdtfile);
- }
- 
-@@ -165,6 +198,9 @@
- 	ALLOC_ALIGN_BUFFER(struct msg_get_mac_address, msg, 1, 16);
- 	int ret;
- 
-+	if (!models[rpi_board_rev].has_onboard_eth)
-+		return;
-+
- 	if (getenv("usbethaddr"))
- 		return;
- 
-@@ -231,12 +267,17 @@
- 	}
- 
- 	rpi_board_rev = msg->get_board_rev.body.resp.rev;
--	if (rpi_board_rev >= ARRAY_SIZE(models))
-+	if (rpi_board_rev >= ARRAY_SIZE(models)) {
-+		printf("RPI: Board rev %u outside known range\n",
-+		       rpi_board_rev);
- 		rpi_board_rev = 0;
-+	}
-+	if (!models[rpi_board_rev].name) {
-+		printf("RPI: Board rev %u unknown\n", rpi_board_rev);
-+		rpi_board_rev = 0;
-+	}
- 
- 	name = models[rpi_board_rev].name;
--	if (!name)
--		name = "Unknown model";
- 	printf("RPI model: %s\n", name);
- }
- 
-diff -ruN u-boot-2015.01-rc3/board/renesas/alt/alt.c u-boot/board/renesas/alt/alt.c
---- u-boot-2015.01-rc3/board/renesas/alt/alt.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/renesas/alt/alt.c	2015-01-01 17:34:32.473499645 +0100
-@@ -15,6 +15,8 @@
- #include <asm/arch/sys_proto.h>
- #include <asm/gpio.h>
- #include <asm/arch/rmobile.h>
-+#include <asm/arch/rcar-mstp.h>
-+#include <asm/arch/mmc.h>
- #include <netdev.h>
- #include <miiphy.h>
- #include <i2c.h>
-@@ -37,30 +39,11 @@
- 	qos_init();
- }
- 
--#define MSTPSR1		0xE6150038
--#define SMSTPCR1	0xE6150134
- #define TMU0_MSTP125	(1 << 25)
--
--#define MSTPSR7		0xE61501C4
--#define SMSTPCR7	0xE615014C
- #define SCIF2_MSTP719	(1 << 19)
--
--#define MSTPSR8		0xE61509A0
--#define SMSTPCR8	0xE6150990
- #define ETHER_MSTP813	(1 << 13)
--
--#define MSTPSR3		0xE6150048
--#define SMSTPCR3	0xE615013C
- #define IIC1_MSTP323	(1 << 23)
--
--#define mstp_setbits(type, addr, saddr, set) \
--	out_##type((saddr), in_##type(addr) | (set))
--#define mstp_clrbits(type, addr, saddr, clear) \
--	out_##type((saddr), in_##type(addr) & ~(clear))
--#define mstp_setbits_le32(addr, saddr, set) \
--	mstp_setbits(le32, addr, saddr, set)
--#define mstp_clrbits_le32(addr, saddr, clear)   \
--	mstp_clrbits(le32, addr, saddr, clear)
-+#define MMC0_MSTP315	(1 << 15)
- 
- int board_early_init_f(void)
- {
-@@ -76,15 +59,13 @@
- 	/* IIC1 / sh-i2c ch1 */
- 	mstp_clrbits_le32(MSTPSR3, SMSTPCR3, IIC1_MSTP323);
- 
-+#ifdef CONFIG_SH_MMCIF
-+	/* MMC */
-+	mstp_clrbits_le32(MSTPSR3, SMSTPCR3, MMC0_MSTP315);
-+#endif
- 	return 0;
- }
- 
--void arch_preboot_os(void)
--{
--	/* Disable TMU0 */
--	mstp_setbits_le32(MSTPSR1, SMSTPCR1, TMU0_MSTP125);
--}
--
- int board_init(void)
- {
- 	/* adress of boot parameters */
-@@ -145,6 +126,19 @@
- #endif
- }
- 
-+int board_mmc_init(bd_t *bis)
-+{
-+	int ret = 0;
-+
-+#ifdef CONFIG_SH_MMCIF
-+	gpio_request(GPIO_GP_4_31, NULL);
-+	gpio_set_value(GPIO_GP_4_31, 1);
-+
-+	ret = mmcif_mmc_init();
-+#endif
-+	return ret;
-+}
-+
- int dram_init(void)
- {
- 	gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
-diff -ruN u-boot-2015.01-rc3/board/renesas/alt/Makefile u-boot/board/renesas/alt/Makefile
---- u-boot-2015.01-rc3/board/renesas/alt/Makefile	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/renesas/alt/Makefile	2015-01-01 17:34:32.473499645 +0100
-@@ -6,4 +6,4 @@
- # SPDX-License-Identifier: GPL-2.0
- #
- 
--obj-y	:= alt.o qos.o
-+obj-y	:= alt.o qos.o ../rcar-gen2-common/common.o
-diff -ruN u-boot-2015.01-rc3/board/renesas/gose/gose.c u-boot/board/renesas/gose/gose.c
---- u-boot-2015.01-rc3/board/renesas/gose/gose.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/renesas/gose/gose.c	2015-01-01 17:34:32.473499645 +0100
-@@ -15,6 +15,7 @@
- #include <asm/arch/sys_proto.h>
- #include <asm/gpio.h>
- #include <asm/arch/rmobile.h>
-+#include <asm/arch/rcar-mstp.h>
- #include <netdev.h>
- #include <miiphy.h>
- #include <i2c.h>
-@@ -41,27 +42,10 @@
- 	qos_init();
- }
- 
--#define MSTPSR1		0xE6150038
--#define SMSTPCR1	0xE6150134
- #define TMU0_MSTP125	(1 << 25)
--
--#define MSTPSR7		0xE61501C4
--#define SMSTPCR7	0xE615014C
- #define SCIF0_MSTP721	(1 << 21)
--
--#define MSTPSR8		0xE61509A0
--#define SMSTPCR8	0xE6150990
- #define ETHER_MSTP813	(1 << 13)
- 
--#define mstp_setbits(type, addr, saddr, set) \
--	out_##type((saddr), in_##type(addr) | (set))
--#define mstp_clrbits(type, addr, saddr, clear) \
--	out_##type((saddr), in_##type(addr) & ~(clear))
--#define mstp_setbits_le32(addr, saddr, set) \
--	mstp_setbits(le32, addr, saddr, set)
--#define mstp_clrbits_le32(addr, saddr, clear) \
--	mstp_clrbits(le32, addr, saddr, clear)
--
- int board_early_init_f(void)
- {
- 	/* TMU0 */
-@@ -76,16 +60,6 @@
- 	return 0;
- }
- 
--#define TSTR0		0x04
--#define TSTR0_STR0	0x01
--void arch_preboot_os(void)
--{
--	/* stop TMU0 */
--	mstp_clrbits_le32(TMU_BASE + TSTR0, TMU_BASE + TSTR0, TSTR0_STR0);
--	/* Disable TMU0 */
--	mstp_setbits_le32(MSTPSR1, SMSTPCR1, TMU0_MSTP125);
--}
--
- #define PUPR5		0xE6060114
- #define PUPR5_ETH	0x3FFC0000
- #define PUPR5_ETH_MAGIC	(1 << 27)
-diff -ruN u-boot-2015.01-rc3/board/renesas/gose/Makefile u-boot/board/renesas/gose/Makefile
---- u-boot-2015.01-rc3/board/renesas/gose/Makefile	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/renesas/gose/Makefile	2015-01-01 17:34:32.473499645 +0100
-@@ -6,4 +6,4 @@
- # SPDX-License-Identifier: GPL-2.0
- #
- 
--obj-y	:= gose.o qos.o
-+obj-y	:= gose.o qos.o ../rcar-gen2-common/common.o
-diff -ruN u-boot-2015.01-rc3/board/renesas/koelsch/koelsch.c u-boot/board/renesas/koelsch/koelsch.c
---- u-boot-2015.01-rc3/board/renesas/koelsch/koelsch.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/renesas/koelsch/koelsch.c	2015-01-01 17:34:32.473499645 +0100
-@@ -16,6 +16,7 @@
- #include <asm/arch/sys_proto.h>
- #include <asm/gpio.h>
- #include <asm/arch/rmobile.h>
-+#include <asm/arch/rcar-mstp.h>
- #include <netdev.h>
- #include <miiphy.h>
- #include <i2c.h>
-@@ -43,27 +44,10 @@
- 	qos_init();
- }
- 
--#define MSTPSR1		0xE6150038
--#define SMSTPCR1	0xE6150134
- #define TMU0_MSTP125	(1 << 25)
--
--#define MSTPSR7		0xE61501C4
--#define SMSTPCR7	0xE615014C
- #define SCIF0_MSTP721	(1 << 21)
--
--#define MSTPSR8		0xE61509A0
--#define SMSTPCR8	0xE6150990
- #define ETHER_MSTP813	(1 << 13)
- 
--#define mstp_setbits(type, addr, saddr, set) \
--	out_##type((saddr), in_##type(addr) | (set))
--#define mstp_clrbits(type, addr, saddr, clear) \
--	out_##type((saddr), in_##type(addr) & ~(clear))
--#define mstp_setbits_le32(addr, saddr, set) \
--	mstp_setbits(le32, addr, saddr, set)
--#define mstp_clrbits_le32(addr, saddr, clear)   \
--	mstp_clrbits(le32, addr, saddr, clear)
--
- int board_early_init_f(void)
- {
- 	mstp_clrbits_le32(MSTPSR1, SMSTPCR1, TMU0_MSTP125);
-@@ -77,12 +61,6 @@
- 	return 0;
- }
- 
--void arch_preboot_os(void)
--{
--	/* Disable TMU0 */
--	mstp_setbits_le32(MSTPSR1, SMSTPCR1, TMU0_MSTP125);
--}
--
- /* LSI pin pull-up control */
- #define PUPR5 0xe6060114
- #define PUPR5_ETH 0x3FFC0000
-diff -ruN u-boot-2015.01-rc3/board/renesas/koelsch/Makefile u-boot/board/renesas/koelsch/Makefile
---- u-boot-2015.01-rc3/board/renesas/koelsch/Makefile	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/renesas/koelsch/Makefile	2015-01-01 17:34:32.473499645 +0100
-@@ -6,4 +6,4 @@
- # SPDX-License-Identifier: GPL-2.0
- #
- 
--obj-y	:= koelsch.o qos.o
-+obj-y	:= koelsch.o qos.o ../rcar-gen2-common/common.o
-diff -ruN u-boot-2015.01-rc3/board/renesas/lager/lager.c u-boot/board/renesas/lager/lager.c
---- u-boot-2015.01-rc3/board/renesas/lager/lager.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/renesas/lager/lager.c	2015-01-01 17:34:32.473499645 +0100
-@@ -18,8 +18,11 @@
- #include <asm/arch/sys_proto.h>
- #include <asm/gpio.h>
- #include <asm/arch/rmobile.h>
-+#include <asm/arch/rcar-mstp.h>
-+#include <asm/arch/mmc.h>
- #include <miiphy.h>
- #include <i2c.h>
-+#include <mmc.h>
- #include "qos.h"
- 
- DECLARE_GLOBAL_DATA_PTR;
-@@ -50,26 +53,10 @@
- 	qos_init();
- }
- 
--#define MSTPSR1	0xE6150038
--#define SMSTPCR1	0xE6150134
- #define TMU0_MSTP125	(1 << 25)
--
--#define MSTPSR7	0xE61501C4
--#define SMSTPCR7	0xE615014C
- #define SCIF0_MSTP721	(1 << 21)
--
--#define MSTPSR8	0xE61509A0
--#define SMSTPCR8	0xE6150990
- #define ETHER_MSTP813	(1 << 13)
--
--#define mstp_setbits(type, addr, saddr, set) \
--	out_##type((saddr), in_##type(addr) | (set))
--#define mstp_clrbits(type, addr, saddr, clear) \
--	out_##type((saddr), in_##type(addr) & ~(clear))
--#define mstp_setbits_le32(addr, saddr, set)	\
--		mstp_setbits(le32, addr, saddr, set)
--#define mstp_clrbits_le32(addr, saddr, clear)	\
--		mstp_clrbits(le32, addr, saddr, clear)
-+#define MMC1_MSTP305    (1 << 5)
- 
- int board_early_init_f(void)
- {
-@@ -79,16 +66,12 @@
- 	mstp_clrbits_le32(MSTPSR7, SMSTPCR7, SCIF0_MSTP721);
- 	/* ETHER */
- 	mstp_clrbits_le32(MSTPSR8, SMSTPCR8, ETHER_MSTP813);
-+	/* eMMC */
-+	mstp_clrbits_le32(MSTPSR3, SMSTPCR3, MMC1_MSTP305);
- 
- 	return 0;
- }
- 
--void arch_preboot_os(void)
--{
--	/* Disable TMU0 */
--	mstp_setbits_le32(MSTPSR1, SMSTPCR1, TMU0_MSTP125);
--}
--
- DECLARE_GLOBAL_DATA_PTR;
- int board_init(void)
- {
-@@ -163,6 +146,28 @@
- 	return 0;
- }
- 
-+int board_mmc_init(bd_t *bis)
-+{
-+	int ret = 0;
-+
-+#ifdef CONFIG_SH_MMCIF
-+	gpio_request(GPIO_FN_MMC1_D0, NULL);
-+	gpio_request(GPIO_FN_MMC1_D1, NULL);
-+	gpio_request(GPIO_FN_MMC1_D2, NULL);
-+	gpio_request(GPIO_FN_MMC1_D3, NULL);
-+	gpio_request(GPIO_FN_MMC1_D4, NULL);
-+	gpio_request(GPIO_FN_MMC1_D5, NULL);
-+	gpio_request(GPIO_FN_MMC1_D6, NULL);
-+	gpio_request(GPIO_FN_MMC1_D7, NULL);
-+	gpio_request(GPIO_FN_MMC1_CLK, NULL);
-+	gpio_request(GPIO_FN_MMC1_CMD, NULL);
-+
-+	ret = mmcif_mmc_init();
-+#endif
-+	return ret;
-+}
-+
-+
- int dram_init(void)
- {
- 	gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
-diff -ruN u-boot-2015.01-rc3/board/renesas/lager/Makefile u-boot/board/renesas/lager/Makefile
---- u-boot-2015.01-rc3/board/renesas/lager/Makefile	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/renesas/lager/Makefile	2015-01-01 17:34:32.473499645 +0100
-@@ -6,4 +6,4 @@
- # SPDX-License-Identifier: GPL-2.0
- #
- 
--obj-y	:= lager.o qos.o
-+obj-y	:= lager.o qos.o ../rcar-gen2-common/common.o
-diff -ruN u-boot-2015.01-rc3/board/renesas/rcar-gen2-common/common.c u-boot/board/renesas/rcar-gen2-common/common.c
---- u-boot-2015.01-rc3/board/renesas/rcar-gen2-common/common.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/renesas/rcar-gen2-common/common.c	2015-01-01 17:34:32.477499579 +0100
-@@ -0,0 +1,59 @@
-+/*
-+ * board/renesas/rcar-gen2-common/common.c
-+ *
-+ * Copyright (C) 2013 Renesas Electronics Corporation
-+ * Copyright (C) 2013 Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj at renesas.com>
-+ *
-+ * SPDX-License-Identifier: GPL-2.0
-+ */
-+
-+#include <common.h>
-+#include <asm/io.h>
-+#include <asm/arch/sys_proto.h>
-+#include <asm/arch/rmobile.h>
-+#include <asm/arch/rcar-mstp.h>
-+
-+#define TSTR0		0x04
-+#define TSTR0_STR0	0x01
-+
-+static struct mstp_ctl mstptbl[] = {
-+	{ SMSTPCR0, MSTP0_BITS, CONFIG_SMSTP0_ENA,
-+		RMSTPCR0, MSTP0_BITS, CONFIG_RMSTP0_ENA },
-+	{ SMSTPCR1, MSTP1_BITS, CONFIG_SMSTP1_ENA,
-+		RMSTPCR1, MSTP1_BITS, CONFIG_RMSTP1_ENA },
-+	{ SMSTPCR2, MSTP2_BITS, CONFIG_SMSTP2_ENA,
-+		RMSTPCR2, MSTP2_BITS, CONFIG_RMSTP2_ENA },
-+	{ SMSTPCR3, MSTP3_BITS, CONFIG_SMSTP3_ENA,
-+		RMSTPCR3, MSTP3_BITS, CONFIG_RMSTP3_ENA },
-+	{ SMSTPCR4, MSTP4_BITS, CONFIG_SMSTP4_ENA,
-+		RMSTPCR4, MSTP4_BITS, CONFIG_RMSTP4_ENA },
-+	{ SMSTPCR5, MSTP5_BITS, CONFIG_SMSTP5_ENA,
-+		RMSTPCR5, MSTP5_BITS, CONFIG_RMSTP5_ENA },
-+	/* No MSTP6 */
-+	{ SMSTPCR7, MSTP7_BITS, CONFIG_SMSTP7_ENA,
-+		RMSTPCR7, MSTP7_BITS, CONFIG_RMSTP7_ENA },
-+	{ SMSTPCR8, MSTP8_BITS, CONFIG_SMSTP8_ENA,
-+		RMSTPCR8, MSTP8_BITS, CONFIG_RMSTP8_ENA },
-+	{ SMSTPCR9, MSTP9_BITS, CONFIG_SMSTP9_ENA,
-+		RMSTPCR9, MSTP9_BITS, CONFIG_RMSTP9_ENA },
-+	{ SMSTPCR10, MSTP10_BITS, CONFIG_SMSTP10_ENA,
-+		 RMSTPCR10, MSTP10_BITS, CONFIG_RMSTP10_ENA },
-+	{ SMSTPCR11, MSTP11_BITS, CONFIG_SMSTP1_ENA,
-+		 RMSTPCR11, MSTP11_BITS, CONFIG_RMSTP11_ENA },
-+};
-+
-+void arch_preboot_os(void)
-+{
-+	int i;
-+
-+	/* stop TMU0 */
-+	mstp_clrbits_le32(TMU_BASE + TSTR0, TMU_BASE + TSTR0, TSTR0_STR0);
-+
-+	/* Stop module clock */
-+	for (i = 0; i < ARRAY_SIZE(mstptbl); i++) {
-+		mstp_setclrbits_le32(mstptbl[i].s_addr, mstptbl[i].s_dis,
-+				     mstptbl[i].s_ena);
-+		mstp_setclrbits_le32(mstptbl[i].r_addr, mstptbl[i].r_dis,
-+				     mstptbl[i].r_ena);
-+	}
-+}
-diff -ruN u-boot-2015.01-rc3/board/solidrun/hummingboard/hummingboard.c u-boot/board/solidrun/hummingboard/hummingboard.c
---- u-boot-2015.01-rc3/board/solidrun/hummingboard/hummingboard.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/solidrun/hummingboard/hummingboard.c	2015-01-01 17:34:32.497499251 +0100
-@@ -146,7 +146,7 @@
- {
- 	struct iomuxc *const iomuxc_regs = (struct iomuxc *)IOMUXC_BASE_ADDR;
- 
--	int ret = enable_fec_anatop_clock(ENET_25MHz);
-+	int ret = enable_fec_anatop_clock(ENET_25MHZ);
- 	if (ret)
- 		return ret;
- 
-diff -ruN u-boot-2015.01-rc3/board/st/stv0991/Kconfig u-boot/board/st/stv0991/Kconfig
---- u-boot-2015.01-rc3/board/st/stv0991/Kconfig	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/st/stv0991/Kconfig	2015-01-01 17:34:32.501499185 +0100
-@@ -0,0 +1,23 @@
-+if TARGET_STV0991
-+
-+config SYS_CPU
-+	string
-+	default "armv7"
-+
-+config SYS_BOARD
-+	string
-+	default "stv0991"
-+
-+config SYS_VENDOR
-+	string
-+	default "st"
-+
-+config SYS_SOC
-+	string
-+	default "stv0991"
-+
-+config SYS_CONFIG_NAME
-+	string
-+	default "stv0991"
-+
-+endif
-diff -ruN u-boot-2015.01-rc3/board/st/stv0991/MAINTAINERS u-boot/board/st/stv0991/MAINTAINERS
---- u-boot-2015.01-rc3/board/st/stv0991/MAINTAINERS	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/st/stv0991/MAINTAINERS	2015-01-01 17:34:32.501499185 +0100
-@@ -0,0 +1,5 @@
-+STV0991 APPLICATION BOARD
-+M:	Vikas Manocha <vikas.manocha at st.com>
-+S:	Maintained
-+F:	board/st/stv0991/
-+F:	include/configs/stv0991.h
-diff -ruN u-boot-2015.01-rc3/board/st/stv0991/Makefile u-boot/board/st/stv0991/Makefile
---- u-boot-2015.01-rc3/board/st/stv0991/Makefile	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/st/stv0991/Makefile	2015-01-01 17:34:32.501499185 +0100
-@@ -0,0 +1,8 @@
-+#
-+# (C) Copyright 2014
-+# Vikas Manocha, ST Microelectronics, vikas.manocha at stcom
-+#
-+# SPDX-License-Identifier:	GPL-2.0+
-+#
-+
-+obj-y	:= stv0991.o
-diff -ruN u-boot-2015.01-rc3/board/st/stv0991/stv0991.c u-boot/board/st/stv0991/stv0991.c
---- u-boot-2015.01-rc3/board/st/stv0991/stv0991.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/board/st/stv0991/stv0991.c	2015-01-01 17:34:32.501499185 +0100
-@@ -0,0 +1,104 @@
-+/*
-+ * (C) Copyright 2014
-+ * Vikas Manocha, ST Micoelectronics, vikas.manocha at st.com.
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <miiphy.h>
-+#include <asm/arch/stv0991_periph.h>
-+#include <asm/arch/stv0991_defs.h>
-+#include <asm/arch/hardware.h>
-+#include <asm/arch/gpio.h>
-+#include <netdev.h>
-+#include <asm/io.h>
-+#include <dm/platdata.h>
-+#include <dm/platform_data/serial_pl01x.h>
-+
-+DECLARE_GLOBAL_DATA_PTR;
-+
-+struct gpio_regs *const gpioa_regs =
-+		(struct gpio_regs *) GPIOA_BASE_ADDR;
-+
-+static const struct pl01x_serial_platdata serial_platdata = {
-+	.base = 0x80406000,
-+	.type = TYPE_PL011,
-+	.clock = 2700 * 1000,
-+};
-+
-+U_BOOT_DEVICE(stv09911_serials) = {
-+	.name = "serial_pl01x",
-+	.platdata = &serial_platdata,
-+};
-+
-+#ifdef CONFIG_SHOW_BOOT_PROGRESS
-+void show_boot_progress(int progress)
-+{
-+	printf("%i\n", progress);
-+}
-+#endif
-+
-+void enable_eth_phy(void)
-+{
-+	/* Set GPIOA_06 pad HIGH (Appli board)*/
-+	writel(readl(&gpioa_regs->dir) | 0x40, &gpioa_regs->dir);
-+	writel(readl(&gpioa_regs->data) | 0x40, &gpioa_regs->data);
-+}
-+int board_eth_enable(void)
-+{
-+	stv0991_pinmux_config(ETH_GPIOB_10_31_C_0_4);
-+	clock_setup(ETH_CLOCK_CFG);
-+	enable_eth_phy();
-+	return 0;
-+}
-+
-+/*
-+ * Miscellaneous platform dependent initialisations
-+ */
-+int board_init(void)
-+{
-+	board_eth_enable();
-+	return 0;
-+}
-+
-+int board_uart_init(void)
-+{
-+	stv0991_pinmux_config(UART_GPIOC_30_31);
-+	clock_setup(UART_CLOCK_CFG);
-+	return 0;
-+}
-+
-+#ifdef CONFIG_BOARD_EARLY_INIT_F
-+int board_early_init_f(void)
-+{
-+	board_uart_init();
-+	return 0;
-+}
-+#endif
-+
-+int dram_init(void)
-+{
-+	gd->ram_size = PHYS_SDRAM_1_SIZE;
-+	return 0;
-+}
-+
-+void dram_init_banksize(void)
-+{
-+	gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
-+	gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
-+}
-+
-+#ifdef CONFIG_CMD_NET
-+int board_eth_init(bd_t *bis)
-+{
-+	int ret = 0;
-+
-+#if defined(CONFIG_DESIGNWARE_ETH)
-+	u32 interface = PHY_INTERFACE_MODE_MII;
-+	if (designware_initialize(GMAC_BASE_ADDR, interface) >= 0)
-+		ret++;
-+#endif
-+	return ret;
-+}
-+#endif
-diff -ruN u-boot-2015.01-rc3/board/tbs/tbs2910/Kconfig u-boot/board/tbs/tbs2910/Kconfig
---- u-boot-2015.01-rc3/board/tbs/tbs2910/Kconfig	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/tbs/tbs2910/Kconfig	2015-01-01 17:34:32.505499121 +0100
-@@ -1,23 +1,15 @@
- if TARGET_TBS2910
- 
--config SYS_CPU
--	string
--	default "armv7"
--
- config SYS_BOARD
--	string
- 	default "tbs2910"
- 
- config SYS_VENDOR
--	string
- 	default "tbs"
- 
- config SYS_SOC
--	string
- 	default "mx6"
- 
- config SYS_CONFIG_NAME
--	string
- 	default "tbs2910"
- 
- endif
-diff -ruN u-boot-2015.01-rc3/board/toradex/apalis_t30/apalis_t30.c u-boot/board/toradex/apalis_t30/apalis_t30.c
---- u-boot-2015.01-rc3/board/toradex/apalis_t30/apalis_t30.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/board/toradex/apalis_t30/apalis_t30.c	2015-01-01 17:34:32.509499055 +0100
-@@ -6,7 +6,7 @@
-  */
- 
- #include <common.h>
--
-+#include <dm.h>
- #include <asm/arch/gp_padctrl.h>
- #include <asm/arch/pinmux.h>
- #include <asm/gpio.h>
-@@ -38,23 +38,20 @@
- #ifdef CONFIG_PCI_TEGRA
- int tegra_pcie_board_init(void)
- {
--	unsigned int old_bus;
-+	struct udevice *dev;
- 	u8 addr, data[1];
- 	int err;
- 
--	old_bus = i2c_get_bus_num();
--
--	err = i2c_set_bus_num(0);
-+	err = i2c_get_chip_for_busnum(0, PMU_I2C_ADDRESS, &dev);
- 	if (err) {
--		debug("failed to set I2C bus\n");
-+		debug("%s: Cannot find PMIC I2C chip\n", __func__);
- 		return err;
- 	}
--
- 	/* TPS659110: VDD2_OP_REG = 1.05V */
- 	data[0] = 0x27;
- 	addr = 0x25;
- 
--	err = i2c_write(PMU_I2C_ADDRESS, addr, 1, data, 1);
-+	err = i2c_write(dev, addr, data, 1);
- 	if (err) {
- 		debug("failed to set VDD supply\n");
- 		return err;
-@@ -64,7 +61,7 @@
- 	data[0] = 0x0D;
- 	addr = 0x24;
- 
--	err = i2c_write(PMU_I2C_ADDRESS, addr, 1, data, 1);
-+	err = i2c_write(dev, addr, data, 1);
- 	if (err) {
- 		debug("failed to enable VDD supply\n");
- 		return err;
-@@ -74,14 +71,12 @@
- 	data[0] = 0x0D;
- 	addr = 0x35;
- 
--	err = i2c_write(PMU_I2C_ADDRESS, addr, 1, data, 1);
-+	err = i2c_write(dev, addr, data, 1);
- 	if (err) {
- 		debug("failed to set AVDD supply\n");
- 		return err;
- 	}
- 
--	i2c_set_bus_num(old_bus);
--
- 	return 0;
- }
- 
-diff -ruN u-boot-2015.01-rc3/common/board_f.c u-boot/common/board_f.c
---- u-boot-2015.01-rc3/common/board_f.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/common/board_f.c	2015-01-01 17:34:32.521498858 +0100
-@@ -813,7 +813,9 @@
- #endif
- 	setup_mon_len,
- 	setup_fdt,
-+#ifdef CONFIG_TRACE
- 	trace_early_init,
-+#endif
- 	initf_malloc,
- #if defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx)
- 	/* TODO: can this go into arch_cpu_init()? */
-diff -ruN u-boot-2015.01-rc3/common/cmd_dfu.c u-boot/common/cmd_dfu.c
---- u-boot-2015.01-rc3/common/cmd_dfu.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/common/cmd_dfu.c	2015-01-01 17:34:32.525498793 +0100
-@@ -38,10 +38,10 @@
- 
- 	int controller_index = simple_strtoul(usb_controller, NULL, 0);
- 	board_usb_init(controller_index, USB_INIT_DEVICE);
--	dfu_clear_detach();
-+	g_dnl_clear_detach();
- 	g_dnl_register("usb_dnl_dfu");
- 	while (1) {
--		if (dfu_detach()) {
-+		if (g_dnl_detach()) {
- 			/*
- 			 * Check if USB bus reset is performed after detach,
- 			 * which indicates that -R switch has been passed to
-@@ -74,7 +74,7 @@
- 	if (dfu_reset)
- 		run_command("reset", 0);
- 
--	dfu_clear_detach();
-+	g_dnl_clear_detach();
- 
- 	return ret;
- }
-diff -ruN u-boot-2015.01-rc3/common/cmd_fastboot.c u-boot/common/cmd_fastboot.c
---- u-boot-2015.01-rc3/common/cmd_fastboot.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/common/cmd_fastboot.c	2015-01-01 17:34:32.525498793 +0100
-@@ -15,17 +15,21 @@
- {
- 	int ret;
- 
-+	g_dnl_clear_detach();
- 	ret = g_dnl_register("usb_dnl_fastboot");
- 	if (ret)
- 		return ret;
- 
- 	while (1) {
-+		if (g_dnl_detach())
-+			break;
- 		if (ctrlc())
- 			break;
- 		usb_gadget_handle_interrupts();
- 	}
- 
- 	g_dnl_unregister();
-+	g_dnl_clear_detach();
- 	return CMD_RET_SUCCESS;
- }
- 
-diff -ruN u-boot-2015.01-rc3/common/cmd_hash.c u-boot/common/cmd_hash.c
---- u-boot-2015.01-rc3/common/cmd_hash.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/common/cmd_hash.c	2015-01-01 17:34:32.529498727 +0100
-@@ -18,9 +18,9 @@
- static int do_hash(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
- {
- 	char *s;
--#ifdef CONFIG_HASH_VERIFY
- 	int flags = HASH_FLAG_ENV;
- 
-+#ifdef CONFIG_HASH_VERIFY
- 	if (argc < 4)
- 		return CMD_RET_USAGE;
- 	if (!strcmp(argv[1], "-v")) {
-@@ -28,8 +28,6 @@
- 		argc--;
- 		argv++;
- 	}
--#else
--	const int flags = HASH_FLAG_ENV;
- #endif
- 	/* Move forward to 'algorithm' parameter */
- 	argc--;
-@@ -40,19 +38,19 @@
- }
- 
- #ifdef CONFIG_HASH_VERIFY
--U_BOOT_CMD(
--	hash,	6,	1,	do_hash,
--	"compute hash message digest",
--	"algorithm address count [[*]sum_dest]\n"
--		"    - compute message digest [save to env var / *address]\n"
--	"hash -v algorithm address count [*]sum\n"
--		"    - verify hash of memory area with env var / *address"
--);
-+#define HARGS 6
- #else
-+#define HARGS 5
-+#endif
-+
- U_BOOT_CMD(
--	hash,	5,	1,	do_hash,
--	"compute message digest",
--	"algorithm address count [[*]sum_dest]\n"
-+	hash,	HARGS,	1,	do_hash,
-+	"compute hash message digest",
-+	"algorithm address count [[*]hash_dest]\n"
- 		"    - compute message digest [save to env var / *address]"
--);
-+#ifdef CONFIG_HASH_VERIFY
-+	"\nhash -v algorithm address count [*]hash\n"
-+		"    - verify message digest of memory area to immediate value, \n"
-+		"      env var or *address"
- #endif
-+);
-diff -ruN u-boot-2015.01-rc3/common/cmd_i2c.c u-boot/common/cmd_i2c.c
---- u-boot-2015.01-rc3/common/cmd_i2c.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/common/cmd_i2c.c	2015-01-01 17:34:32.529498727 +0100
-@@ -69,8 +69,10 @@
- #include <bootretry.h>
- #include <cli.h>
- #include <command.h>
-+#include <dm.h>
- #include <edid.h>
- #include <environment.h>
-+#include <errno.h>
- #include <i2c.h>
- #include <malloc.h>
- #include <asm/byteorder.h>
-@@ -117,6 +119,60 @@
- 
- #define DISP_LINE_LEN	16
- 
-+/*
-+ * Default for driver model is to use the chip's existing address length.
-+ * For legacy code, this is not stored, so we need to use a suitable
-+ * default.
-+ */
-+#ifdef CONFIG_DM_I2C
-+#define DEFAULT_ADDR_LEN	(-1)
-+#else
-+#define DEFAULT_ADDR_LEN	1
-+#endif
-+
-+#ifdef CONFIG_DM_I2C
-+static struct udevice *i2c_cur_bus;
-+
-+static int i2c_set_bus_num(unsigned int busnum)
-+{
-+	struct udevice *bus;
-+	int ret;
-+
-+	ret = uclass_get_device_by_seq(UCLASS_I2C, busnum, &bus);
-+	if (ret) {
-+		debug("%s: No bus %d\n", __func__, busnum);
-+		return ret;
-+	}
-+	i2c_cur_bus = bus;
-+
-+	return 0;
-+}
-+
-+static int i2c_get_cur_bus(struct udevice **busp)
-+{
-+	if (!i2c_cur_bus) {
-+		puts("No I2C bus selected\n");
-+		return -ENODEV;
-+	}
-+	*busp = i2c_cur_bus;
-+
-+	return 0;
-+}
-+
-+static int i2c_get_cur_bus_chip(uint chip_addr, struct udevice **devp)
-+{
-+	struct udevice *bus;
-+	int ret;
-+
-+	ret = i2c_get_cur_bus(&bus);
-+	if (ret)
-+		return ret;
-+
-+	return i2c_get_chip(bus, chip_addr, devp);
-+}
-+
-+#endif
-+
- /**
-  * i2c_init_board() - Board-specific I2C bus init
-  *
-@@ -143,7 +199,7 @@
-  *
-  * Returns I2C bus speed in Hz.
-  */
--#if !defined(CONFIG_SYS_I2C)
-+#if !defined(CONFIG_SYS_I2C) && !defined(CONFIG_DM_I2C)
- /*
-  * TODO: Implement architecture-specific get/set functions
-  * Should go away, if we switched completely to new multibus support
-@@ -182,12 +238,12 @@
-  *
-  * Returns the address length.
-  */
--static uint get_alen(char *arg)
-+static uint get_alen(char *arg, int default_len)
- {
- 	int	j;
- 	int	alen;
- 
--	alen = 1;
-+	alen = default_len;
- 	for (j = 0; j < 8; j++) {
- 		if (arg[j] == '.') {
- 			alen = arg[j+1] - '0';
-@@ -227,8 +283,13 @@
- static int do_i2c_read ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
- {
- 	u_char	chip;
--	uint	devaddr, alen, length;
-+	uint	devaddr, length;
-+	int alen;
- 	u_char  *memaddr;
-+	int ret;
-+#ifdef CONFIG_DM_I2C
-+	struct udevice *dev;
-+#endif
- 
- 	if (argc != 5)
- 		return CMD_RET_USAGE;
-@@ -243,7 +304,7 @@
- 	 * 2 bytes long.  Some day it might be 3 bytes long :-).
- 	 */
- 	devaddr = simple_strtoul(argv[2], NULL, 16);
--	alen = get_alen(argv[2]);
-+	alen = get_alen(argv[2], DEFAULT_ADDR_LEN);
- 	if (alen > 3)
- 		return CMD_RET_USAGE;
- 
-@@ -257,18 +318,31 @@
- 	 */
- 	memaddr = (u_char *)simple_strtoul(argv[4], NULL, 16);
- 
--	if (i2c_read(chip, devaddr, alen, memaddr, length) != 0) {
--		i2c_report_err(-1, I2C_ERR_READ);
--		return 1;
--	}
-+#ifdef CONFIG_DM_I2C
-+	ret = i2c_get_cur_bus_chip(chip, &dev);
-+	if (!ret && alen != -1)
-+		ret = i2c_set_chip_offset_len(dev, alen);
-+	if (!ret)
-+		ret = i2c_read(dev, devaddr, memaddr, length);
-+#else
-+	ret = i2c_read(chip, devaddr, alen, memaddr, length);
-+#endif
-+	if (ret)
-+		return i2c_report_err(ret, I2C_ERR_READ);
-+
- 	return 0;
- }
- 
- static int do_i2c_write(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
- {
- 	u_char	chip;
--	uint	devaddr, alen, length;
-+	uint	devaddr, length;
-+	int alen;
- 	u_char  *memaddr;
-+	int ret;
-+#ifdef CONFIG_DM_I2C
-+	struct udevice *dev;
-+#endif
- 
- 	if (argc != 5)
- 		return cmd_usage(cmdtp);
-@@ -288,7 +362,7 @@
- 	 * 2 bytes long.  Some day it might be 3 bytes long :-).
- 	 */
- 	devaddr = simple_strtoul(argv[3], NULL, 16);
--	alen = get_alen(argv[3]);
-+	alen = get_alen(argv[3], DEFAULT_ADDR_LEN);
- 	if (alen > 3)
- 		return cmd_usage(cmdtp);
- 
-@@ -297,10 +371,22 @@
- 	 */
- 	length = simple_strtoul(argv[4], NULL, 16);
- 
-+#ifdef CONFIG_DM_I2C
-+	ret = i2c_get_cur_bus_chip(chip, &dev);
-+	if (!ret && alen != -1)
-+		ret = i2c_set_chip_offset_len(dev, alen);
-+	if (ret)
-+		return i2c_report_err(ret, I2C_ERR_WRITE);
-+#endif
-+
- 	while (length-- > 0) {
--		if (i2c_write(chip, devaddr++, alen, memaddr++, 1) != 0) {
--			return i2c_report_err(-1, I2C_ERR_WRITE);
--		}
-+#ifdef CONFIG_DM_I2C
-+		ret = i2c_write(dev, devaddr++, memaddr++, 1);
-+#else
-+		ret = i2c_write(chip, devaddr++, alen, memaddr++, 1);
-+#endif
-+		if (ret)
-+			return i2c_report_err(ret, I2C_ERR_WRITE);
- /*
-  * No write delay with FRAM devices.
-  */
-@@ -311,6 +397,38 @@
- 	return 0;
- }
- 
-+#ifdef CONFIG_DM_I2C
-+static int do_i2c_flags(cmd_tbl_t *cmdtp, int flag, int argc,
-+			char *const argv[])
-+{
-+	struct udevice *dev;
-+	uint flags;
-+	int chip;
-+	int ret;
-+
-+	if (argc < 2)
-+		return CMD_RET_USAGE;
-+
-+	chip = simple_strtoul(argv[1], NULL, 16);
-+	ret = i2c_get_cur_bus_chip(chip, &dev);
-+	if (ret)
-+		return i2c_report_err(ret, I2C_ERR_READ);
-+
-+	if (argc > 2) {
-+		flags = simple_strtoul(argv[2], NULL, 16);
-+		ret = i2c_set_chip_flags(dev, flags);
-+	} else  {
-+		ret = i2c_get_chip_flags(dev, &flags);
-+		if (!ret)
-+			printf("%x\n", flags);
-+	}
-+	if (ret)
-+		return i2c_report_err(ret, I2C_ERR_READ);
-+
-+	return 0;
-+}
-+#endif
-+
- /**
-  * do_i2c_md() - Handle the "i2c md" command-line command
-  * @cmdtp:	Command data struct pointer
-@@ -327,8 +445,13 @@
- static int do_i2c_md ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
- {
- 	u_char	chip;
--	uint	addr, alen, length;
-+	uint	addr, length;
-+	int alen;
- 	int	j, nbytes, linebytes;
-+	int ret;
-+#ifdef CONFIG_DM_I2C
-+	struct udevice *dev;
-+#endif
- 
- 	/* We use the last specified parameters, unless new ones are
- 	 * entered.
-@@ -356,7 +479,7 @@
- 		 * 2 bytes long.  Some day it might be 3 bytes long :-).
- 		 */
- 		addr = simple_strtoul(argv[2], NULL, 16);
--		alen = get_alen(argv[2]);
-+		alen = get_alen(argv[2], DEFAULT_ADDR_LEN);
- 		if (alen > 3)
- 			return CMD_RET_USAGE;
- 
-@@ -368,6 +491,14 @@
- 			length = simple_strtoul(argv[3], NULL, 16);
- 	}
- 
-+#ifdef CONFIG_DM_I2C
-+	ret = i2c_get_cur_bus_chip(chip, &dev);
-+	if (!ret && alen != -1)
-+		ret = i2c_set_chip_offset_len(dev, alen);
-+	if (ret)
-+		return i2c_report_err(ret, I2C_ERR_READ);
-+#endif
-+
- 	/*
- 	 * Print the lines.
- 	 *
-@@ -381,8 +512,13 @@
- 
- 		linebytes = (nbytes > DISP_LINE_LEN) ? DISP_LINE_LEN : nbytes;
- 
--		if (i2c_read(chip, addr, alen, linebuf, linebytes) != 0)
--			i2c_report_err(-1, I2C_ERR_READ);
-+#ifdef CONFIG_DM_I2C
-+		ret = i2c_read(dev, addr, linebuf, linebytes);
-+#else
-+		ret = i2c_read(chip, addr, alen, linebuf, linebytes);
-+#endif
-+		if (ret)
-+			i2c_report_err(ret, I2C_ERR_READ);
- 		else {
- 			printf("%04x:", addr);
- 			cp = linebuf;
-@@ -429,9 +565,13 @@
- {
- 	uchar	chip;
- 	ulong	addr;
--	uint	alen;
-+	int	alen;
- 	uchar	byte;
- 	int	count;
-+	int ret;
-+#ifdef CONFIG_DM_I2C
-+	struct udevice *dev;
-+#endif
- 
- 	if ((argc < 4) || (argc > 5))
- 		return CMD_RET_USAGE;
-@@ -445,10 +585,17 @@
- 	 * Address is always specified.
- 	 */
- 	addr = simple_strtoul(argv[2], NULL, 16);
--	alen = get_alen(argv[2]);
-+	alen = get_alen(argv[2], DEFAULT_ADDR_LEN);
- 	if (alen > 3)
- 		return CMD_RET_USAGE;
- 
-+#ifdef CONFIG_DM_I2C
-+	ret = i2c_get_cur_bus_chip(chip, &dev);
-+	if (!ret && alen != -1)
-+		ret = i2c_set_chip_offset_len(dev, alen);
-+	if (ret)
-+		return i2c_report_err(ret, I2C_ERR_WRITE);
-+#endif
- 	/*
- 	 * Value to write is always specified.
- 	 */
-@@ -463,8 +610,13 @@
- 		count = 1;
- 
- 	while (count-- > 0) {
--		if (i2c_write(chip, addr++, alen, &byte, 1) != 0)
--			i2c_report_err(-1, I2C_ERR_WRITE);
-+#ifdef CONFIG_DM_I2C
-+		ret = i2c_write(dev, addr++, &byte, 1);
-+#else
-+		ret = i2c_write(chip, addr++, alen, &byte, 1);
-+#endif
-+		if (ret)
-+			i2c_report_err(ret, I2C_ERR_WRITE);
- 		/*
- 		 * Wait for the write to complete.  The write can take
- 		 * up to 10mSec (we allow a little more time).
-@@ -499,11 +651,15 @@
- {
- 	uchar	chip;
- 	ulong	addr;
--	uint	alen;
-+	int	alen;
- 	int	count;
- 	uchar	byte;
- 	ulong	crc;
- 	ulong	err;
-+	int ret = 0;
-+#ifdef CONFIG_DM_I2C
-+	struct udevice *dev;
-+#endif
- 
- 	if (argc < 4)
- 		return CMD_RET_USAGE;
-@@ -517,10 +673,17 @@
- 	 * Address is always specified.
- 	 */
- 	addr = simple_strtoul(argv[2], NULL, 16);
--	alen = get_alen(argv[2]);
-+	alen = get_alen(argv[2], DEFAULT_ADDR_LEN);
- 	if (alen > 3)
- 		return CMD_RET_USAGE;
- 
-+#ifdef CONFIG_DM_I2C
-+	ret = i2c_get_cur_bus_chip(chip, &dev);
-+	if (!ret && alen != -1)
-+		ret = i2c_set_chip_offset_len(dev, alen);
-+	if (ret)
-+		return i2c_report_err(ret, I2C_ERR_READ);
-+#endif
- 	/*
- 	 * Count is always specified
- 	 */
-@@ -534,13 +697,18 @@
- 	crc = 0;
- 	err = 0;
- 	while (count-- > 0) {
--		if (i2c_read(chip, addr, alen, &byte, 1) != 0)
-+#ifdef CONFIG_DM_I2C
-+		ret = i2c_read(dev, addr, &byte, 1);
-+#else
-+		ret = i2c_read(chip, addr, alen, &byte, 1);
-+#endif
-+		if (ret)
- 			err++;
- 		crc = crc32 (crc, &byte, 1);
- 		addr++;
- 	}
- 	if (err > 0)
--		i2c_report_err(-1, I2C_ERR_READ);
-+		i2c_report_err(ret, I2C_ERR_READ);
- 	else
- 		printf ("%08lx\n", crc);
- 
-@@ -568,10 +736,14 @@
- {
- 	uchar	chip;
- 	ulong	addr;
--	uint	alen;
-+	int	alen;
- 	ulong	data;
- 	int	size = 1;
- 	int	nbytes;
-+	int ret;
-+#ifdef CONFIG_DM_I2C
-+	struct udevice *dev;
-+#endif
- 
- 	if (argc != 3)
- 		return CMD_RET_USAGE;
-@@ -601,19 +773,32 @@
- 		 * Address is always specified.
- 		 */
- 		addr = simple_strtoul(argv[2], NULL, 16);
--		alen = get_alen(argv[2]);
-+		alen = get_alen(argv[2], DEFAULT_ADDR_LEN);
- 		if (alen > 3)
- 			return CMD_RET_USAGE;
- 	}
- 
-+#ifdef CONFIG_DM_I2C
-+	ret = i2c_get_cur_bus_chip(chip, &dev);
-+	if (!ret && alen != -1)
-+		ret = i2c_set_chip_offset_len(dev, alen);
-+	if (ret)
-+		return i2c_report_err(ret, I2C_ERR_WRITE);
-+#endif
-+
- 	/*
- 	 * Print the address, followed by value.  Then accept input for
- 	 * the next value.  A non-converted value exits.
- 	 */
- 	do {
- 		printf("%08lx:", addr);
--		if (i2c_read(chip, addr, alen, (uchar *)&data, size) != 0)
--			i2c_report_err(-1, I2C_ERR_READ);
-+#ifdef CONFIG_DM_I2C
-+		ret = i2c_read(dev, addr, (uchar *)&data, size);
-+#else
-+		ret = i2c_read(chip, addr, alen, (uchar *)&data, size);
-+#endif
-+		if (ret)
-+			i2c_report_err(ret, I2C_ERR_READ);
- 		else {
- 			data = cpu_to_be32(data);
- 			if (size == 1)
-@@ -655,8 +840,15 @@
- 				 * good enough to not time out
- 				 */
- 				bootretry_reset_cmd_timeout();
--				if (i2c_write(chip, addr, alen, (uchar *)&data, size) != 0)
--					i2c_report_err(-1, I2C_ERR_WRITE);
-+#ifdef CONFIG_DM_I2C
-+				ret = i2c_write(dev, addr, (uchar *)&data,
-+						size);
-+#else
-+				ret = i2c_write(chip, addr, alen,
-+						(uchar *)&data, size);
-+#endif
-+				if (ret)
-+					i2c_report_err(ret, I2C_ERR_WRITE);
- #ifdef CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS
- 				udelay(CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS * 1000);
- #endif
-@@ -697,6 +889,13 @@
- 	int k, skip;
- 	unsigned int bus = GET_BUS_NUM;
- #endif	/* NOPROBES */
-+	int ret;
-+#ifdef CONFIG_DM_I2C
-+	struct udevice *bus, *dev;
-+
-+	if (i2c_get_cur_bus(&bus))
-+		return CMD_RET_FAILURE;
-+#endif
- 
- 	if (argc == 2)
- 		addr = simple_strtol(argv[1], 0, 16);
-@@ -717,7 +916,12 @@
- 		if (skip)
- 			continue;
- #endif
--		if (i2c_probe(j) == 0) {
-+#ifdef CONFIG_DM_I2C
-+		ret = i2c_probe(bus, j, 0, &dev);
-+#else
-+		ret = i2c_probe(j);
-+#endif
-+		if (ret == 0) {
- 			printf(" %02X", j);
- 			found++;
- 		}
-@@ -754,11 +958,15 @@
- static int do_i2c_loop(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
- {
- 	u_char	chip;
--	ulong	alen;
-+	int alen;
- 	uint	addr;
- 	uint	length;
- 	u_char	bytes[16];
- 	int	delay;
-+	int ret;
-+#ifdef CONFIG_DM_I2C
-+	struct udevice *dev;
-+#endif
- 
- 	if (argc < 3)
- 		return CMD_RET_USAGE;
-@@ -772,9 +980,16 @@
- 	 * Address is always specified.
- 	 */
- 	addr = simple_strtoul(argv[2], NULL, 16);
--	alen = get_alen(argv[2]);
-+	alen = get_alen(argv[2], DEFAULT_ADDR_LEN);
- 	if (alen > 3)
- 		return CMD_RET_USAGE;
-+#ifdef CONFIG_DM_I2C
-+	ret = i2c_get_cur_bus_chip(chip, &dev);
-+	if (!ret && alen != -1)
-+		ret = i2c_set_chip_offset_len(dev, alen);
-+	if (ret)
-+		return i2c_report_err(ret, I2C_ERR_WRITE);
-+#endif
- 
- 	/*
- 	 * Length is the number of objects, not number of bytes.
-@@ -794,8 +1009,13 @@
- 	 * Run the loop...
- 	 */
- 	while (1) {
--		if (i2c_read(chip, addr, alen, bytes, length) != 0)
--			i2c_report_err(-1, I2C_ERR_READ);
-+#ifdef CONFIG_DM_I2C
-+		ret = i2c_read(dev, addr, bytes, length);
-+#else
-+		ret = i2c_read(chip, addr, alen, bytes, length);
-+#endif
-+		if (ret)
-+			i2c_report_err(ret, I2C_ERR_READ);
- 		udelay(delay);
- 	}
- 
-@@ -1345,6 +1565,10 @@
- {
- 	u_char chip;
- 	struct edid1_info edid;
-+	int ret;
-+#ifdef CONFIG_DM_I2C
-+	struct udevice *dev;
-+#endif
- 
- 	if (argc < 2) {
- 		cmd_usage(cmdtp);
-@@ -1352,10 +1576,15 @@
- 	}
- 
- 	chip = simple_strtoul(argv[1], NULL, 16);
--	if (i2c_read(chip, 0, 1, (uchar *)&edid, sizeof(edid)) != 0) {
--		i2c_report_err(-1, I2C_ERR_READ);
--		return 1;
--	}
-+#ifdef CONFIG_DM_I2C
-+	ret = i2c_get_cur_bus_chip(chip, &dev);
-+	if (!ret)
-+		ret = i2c_read(dev, 0, (uchar *)&edid, sizeof(edid));
-+#else
-+	ret = i2c_read(chip, 0, 1, (uchar *)&edid, sizeof(edid));
-+#endif
-+	if (ret)
-+		return i2c_report_err(ret, I2C_ERR_READ);
- 
- 	if (edid_check_info(&edid)) {
- 		puts("Content isn't valid EDID.\n");
-@@ -1437,17 +1666,28 @@
-  * Returns zero on success, CMD_RET_USAGE in case of misuse and negative
-  * on error.
-  */
--#if defined(CONFIG_SYS_I2C) || defined(CONFIG_I2C_MULTI_BUS)
-+#if defined(CONFIG_SYS_I2C) || defined(CONFIG_I2C_MULTI_BUS) || \
-+		defined(CONFIG_DM_I2C)
- static int do_i2c_bus_num(cmd_tbl_t *cmdtp, int flag, int argc,
- 				char * const argv[])
- {
- 	int		ret = 0;
--	unsigned int	bus_no;
-+	int	bus_no;
- 
--	if (argc == 1)
-+	if (argc == 1) {
- 		/* querying current setting */
--		printf("Current bus is %d\n", i2c_get_bus_num());
--	else {
-+#ifdef CONFIG_DM_I2C
-+		struct udevice *bus;
-+
-+		if (!i2c_get_cur_bus(&bus))
-+			bus_no = bus->seq;
-+		else
-+			bus_no = -1;
-+#else
-+		bus_no = i2c_get_bus_num();
-+#endif
-+		printf("Current bus is %d\n", bus_no);
-+	} else {
- 		bus_no = simple_strtoul(argv[1], NULL, 10);
- #if defined(CONFIG_SYS_I2C)
- 		if (bus_no >= CONFIG_SYS_NUM_I2C_BUSES) {
-@@ -1478,13 +1718,28 @@
- {
- 	int speed, ret=0;
- 
--	if (argc == 1)
-+#ifdef CONFIG_DM_I2C
-+	struct udevice *bus;
-+
-+	if (i2c_get_cur_bus(&bus))
-+		return 1;
-+#endif
-+	if (argc == 1) {
-+#ifdef CONFIG_DM_I2C
-+		speed = i2c_get_bus_speed(bus);
-+#else
-+		speed = i2c_get_bus_speed();
-+#endif
- 		/* querying current speed */
--		printf("Current bus speed=%d\n", i2c_get_bus_speed());
--	else {
-+		printf("Current bus speed=%d\n", speed);
-+	} else {
- 		speed = simple_strtoul(argv[1], NULL, 10);
- 		printf("Setting bus speed to %d Hz\n", speed);
-+#ifdef CONFIG_DM_I2C
-+		ret = i2c_set_bus_speed(bus, speed);
-+#else
- 		ret = i2c_set_bus_speed(speed);
-+#endif
- 		if (ret)
- 			printf("Failure changing bus speed (%d)\n", ret);
- 	}
-@@ -1532,7 +1787,16 @@
-  */
- static int do_i2c_reset(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
- {
--#if defined(CONFIG_SYS_I2C)
-+#if defined(CONFIG_DM_I2C)
-+	struct udevice *bus;
-+
-+	if (i2c_get_cur_bus(&bus))
-+		return CMD_RET_FAILURE;
-+	if (i2c_deblock(bus)) {
-+		printf("Error: Not supported by the driver\n");
-+		return CMD_RET_FAILURE;
-+	}
-+#elif defined(CONFIG_SYS_I2C)
- 	i2c_init(I2C_ADAP->speed, I2C_ADAP->slaveaddr);
- #else
- 	i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
-@@ -1546,7 +1810,7 @@
- #endif
- 	U_BOOT_CMD_MKENT(crc32, 3, 1, do_i2c_crc, "", ""),
- #if defined(CONFIG_SYS_I2C) || \
--	defined(CONFIG_I2C_MULTI_BUS)
-+	defined(CONFIG_I2C_MULTI_BUS) || defined(CONFIG_DM_I2C)
- 	U_BOOT_CMD_MKENT(dev, 1, 1, do_i2c_bus_num, "", ""),
- #endif  /* CONFIG_I2C_MULTI_BUS */
- #if defined(CONFIG_I2C_EDID)
-@@ -1560,6 +1824,9 @@
- 	U_BOOT_CMD_MKENT(probe, 0, 1, do_i2c_probe, "", ""),
- 	U_BOOT_CMD_MKENT(read, 5, 1, do_i2c_read, "", ""),
- 	U_BOOT_CMD_MKENT(write, 5, 0, do_i2c_write, "", ""),
-+#ifdef CONFIG_DM_I2C
-+	U_BOOT_CMD_MKENT(flags, 2, 1, do_i2c_flags, "", ""),
-+#endif
- 	U_BOOT_CMD_MKENT(reset, 0, 1, do_i2c_reset, "", ""),
- #if defined(CONFIG_CMD_SDRAM)
- 	U_BOOT_CMD_MKENT(sdram, 1, 1, do_sdram, "", ""),
-@@ -1610,7 +1877,7 @@
- #endif
- 	"crc32 chip address[.0, .1, .2] count - compute CRC32 checksum\n"
- #if defined(CONFIG_SYS_I2C) || \
--	defined(CONFIG_I2C_MULTI_BUS)
-+	defined(CONFIG_I2C_MULTI_BUS) || defined(CONFIG_DM_I2C)
- 	"i2c dev [dev] - show or set current I2C bus\n"
- #endif  /* CONFIG_I2C_MULTI_BUS */
- #if defined(CONFIG_I2C_EDID)
-@@ -1622,8 +1889,11 @@
- 	"i2c mw chip address[.0, .1, .2] value [count] - write to I2C device (fill)\n"
- 	"i2c nm chip address[.0, .1, .2] - write to I2C device (constant address)\n"
- 	"i2c probe [address] - test for and show device(s) on the I2C bus\n"
--	"i2c read chip address[.0, .1, .2] length memaddress - read to memory \n"
-+	"i2c read chip address[.0, .1, .2] length memaddress - read to memory\n"
- 	"i2c write memaddress chip address[.0, .1, .2] length - write memory to i2c\n"
-+#ifdef CONFIG_DM_I2C
-+	"i2c flags chip [flags] - set or get chip flags\n"
-+#endif
- 	"i2c reset - re-init the I2C Controller\n"
- #if defined(CONFIG_CMD_SDRAM)
- 	"i2c sdram chip - print SDRAM configuration information\n"
-diff -ruN u-boot-2015.01-rc3/common/cmd_mmc.c u-boot/common/cmd_mmc.c
---- u-boot-2015.01-rc3/common/cmd_mmc.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/common/cmd_mmc.c	2015-01-01 17:34:32.529498727 +0100
-@@ -90,7 +90,8 @@
- 	puts("Capacity: ");
- 	print_size(mmc->capacity, "\n");
- 
--	printf("Bus Width: %d-bit\n", mmc->bus_width);
-+	printf("Bus Width: %d-bit%s\n", mmc->bus_width,
-+			mmc->ddr_mode ? " DDR" : "");
- }
- static struct mmc *init_mmc_device(int dev, bool force_init)
- {
-diff -ruN u-boot-2015.01-rc3/common/fb_mmc.c u-boot/common/fb_mmc.c
---- u-boot-2015.01-rc3/common/fb_mmc.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/common/fb_mmc.c	2015-01-01 17:34:32.537498596 +0100
-@@ -4,12 +4,17 @@
-  * SPDX-License-Identifier:	GPL-2.0+
-  */
- 
-+#include <config.h>
- #include <common.h>
- #include <fb_mmc.h>
- #include <part.h>
- #include <aboot.h>
- #include <sparse_format.h>
- 
-+#ifndef CONFIG_FASTBOOT_GPT_NAME
-+#define CONFIG_FASTBOOT_GPT_NAME GPT_ENTRY_NAME
-+#endif
-+
- /* The 64 defined bytes plus the '\0' */
- #define RESPONSE_LEN	(64 + 1)
- 
-@@ -62,7 +67,6 @@
- void fb_mmc_flash_write(const char *cmd, void *download_buffer,
- 			unsigned int download_bytes, char *response)
- {
--	int ret;
- 	block_dev_desc_t *dev_desc;
- 	disk_partition_t info;
- 
-@@ -76,8 +80,24 @@
- 		return;
- 	}
- 
--	ret = get_partition_info_efi_by_name(dev_desc, cmd, &info);
--	if (ret) {
-+	if (strcmp(cmd, CONFIG_FASTBOOT_GPT_NAME) == 0) {
-+		printf("%s: updating MBR, Primary and Backup GPT(s)\n",
-+		       __func__);
-+		if (is_valid_gpt_buf(dev_desc, download_buffer)) {
-+			printf("%s: invalid GPT - refusing to write to flash\n",
-+			       __func__);
-+			fastboot_fail("invalid GPT partition");
-+			return;
-+		}
-+		if (write_mbr_and_gpt_partitions(dev_desc, download_buffer)) {
-+			printf("%s: writing GPT partitions failed\n", __func__);
-+			fastboot_fail("writing GPT partitions failed");
-+			return;
-+		}
-+		printf("........ success\n");
-+		fastboot_okay("");
-+		return;
-+	} else if (get_partition_info_efi_by_name(dev_desc, cmd, &info)) {
- 		error("cannot find partition: '%s'\n", cmd);
- 		fastboot_fail("cannot find partition");
- 		return;
-diff -ruN u-boot-2015.01-rc3/common/hash.c u-boot/common/hash.c
---- u-boot-2015.01-rc3/common/hash.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/common/hash.c	2015-01-01 17:34:32.537498596 +0100
-@@ -256,7 +256,7 @@
- 			env_var = 1;
- 	}
- 
--	if (env_var) {
-+	if (!env_var) {
- 		ulong addr;
- 		void *buf;
- 
-@@ -347,7 +347,7 @@
- {
- 	ulong addr, len;
- 
--	if (argc < 2)
-+	if ((argc < 2) || ((flags & HASH_FLAG_VERIFY) && (argc < 3)))
- 		return CMD_RET_USAGE;
- 
- 	addr = simple_strtoul(*argv++, NULL, 16);
-@@ -380,8 +380,6 @@
- #else
- 		if (0) {
- #endif
--			if (!argc)
--				return CMD_RET_USAGE;
- 			if (parse_verify_sum(algo, *argv, vsum,
- 					flags & HASH_FLAG_ENV)) {
- 				printf("ERROR: %s does not contain a valid "
-diff -ruN u-boot-2015.01-rc3/configs/armadillo-800eva_defconfig u-boot/configs/armadillo-800eva_defconfig
---- u-boot-2015.01-rc3/configs/armadillo-800eva_defconfig	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/configs/armadillo-800eva_defconfig	2015-01-01 17:34:32.557498268 +0100
-@@ -1,3 +1,3 @@
- CONFIG_ARM=y
--+S:CONFIG_RMOBILE=y
-+CONFIG_RMOBILE=y
- CONFIG_TARGET_ARMADILLO_800EVA=y
-diff -ruN u-boot-2015.01-rc3/configs/crownbay_defconfig u-boot/configs/crownbay_defconfig
---- u-boot-2015.01-rc3/configs/crownbay_defconfig	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/configs/crownbay_defconfig	2015-01-01 17:34:32.561498202 +0100
-@@ -0,0 +1,6 @@
-+CONFIG_SYS_EXTRA_OPTIONS="SYS_TEXT_BASE=0xfff00000"
-+CONFIG_X86=y
-+CONFIG_TARGET_CROWNBAY=y
-+CONFIG_OF_CONTROL=y
-+CONFIG_OF_SEPARATE=y
-+CONFIG_DEFAULT_DEVICE_TREE="crownbay"
-diff -ruN u-boot-2015.01-rc3/configs/kzm9g_defconfig u-boot/configs/kzm9g_defconfig
---- u-boot-2015.01-rc3/configs/kzm9g_defconfig	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/configs/kzm9g_defconfig	2015-01-01 17:34:32.561498202 +0100
-@@ -1,3 +1,3 @@
- CONFIG_ARM=y
--+S:CONFIG_RMOBILE=y
-+CONFIG_RMOBILE=y
- CONFIG_TARGET_KZM9G=y
-diff -ruN u-boot-2015.01-rc3/configs/ls1021aqds_nand_defconfig u-boot/configs/ls1021aqds_nand_defconfig
---- u-boot-2015.01-rc3/configs/ls1021aqds_nand_defconfig	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/configs/ls1021aqds_nand_defconfig	2015-01-01 17:34:32.561498202 +0100
-@@ -0,0 +1,4 @@
-+CONFIG_SPL=y
-+CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SPL_FSL_PBL,NAND_BOOT"
-++S:CONFIG_ARM=y
-++S:CONFIG_TARGET_LS1021AQDS=y
-diff -ruN u-boot-2015.01-rc3/configs/ls1021aqds_qspi_defconfig u-boot/configs/ls1021aqds_qspi_defconfig
---- u-boot-2015.01-rc3/configs/ls1021aqds_qspi_defconfig	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/configs/ls1021aqds_qspi_defconfig	2015-01-01 17:34:32.561498202 +0100
-@@ -0,0 +1,3 @@
-+CONFIG_SYS_EXTRA_OPTIONS="QSPI_BOOT"
-++S:CONFIG_ARM=y
-++S:CONFIG_TARGET_LS1021AQDS=y
-diff -ruN u-boot-2015.01-rc3/configs/ls1021aqds_sdcard_defconfig u-boot/configs/ls1021aqds_sdcard_defconfig
---- u-boot-2015.01-rc3/configs/ls1021aqds_sdcard_defconfig	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/configs/ls1021aqds_sdcard_defconfig	2015-01-01 17:34:32.565498136 +0100
-@@ -0,0 +1,4 @@
-+CONFIG_SPL=y
-+CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SPL_FSL_PBL,SD_BOOT"
-++S:CONFIG_ARM=y
-++S:CONFIG_TARGET_LS1021AQDS=y
-diff -ruN u-boot-2015.01-rc3/configs/ls1021atwr_qspi_defconfig u-boot/configs/ls1021atwr_qspi_defconfig
---- u-boot-2015.01-rc3/configs/ls1021atwr_qspi_defconfig	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/configs/ls1021atwr_qspi_defconfig	2015-01-01 17:34:32.565498136 +0100
-@@ -0,0 +1,3 @@
-+CONFIG_SYS_EXTRA_OPTIONS="QSPI_BOOT"
-++S:CONFIG_ARM=y
-++S:CONFIG_TARGET_LS1021ATWR=y
-diff -ruN u-boot-2015.01-rc3/configs/ls1021atwr_sdcard_defconfig u-boot/configs/ls1021atwr_sdcard_defconfig
---- u-boot-2015.01-rc3/configs/ls1021atwr_sdcard_defconfig	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/configs/ls1021atwr_sdcard_defconfig	2015-01-01 17:34:32.565498136 +0100
-@@ -0,0 +1,4 @@
-+CONFIG_SPL=y
-+CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SPL_FSL_PBL,SD_BOOT"
-++S:CONFIG_ARM=y
-++S:CONFIG_TARGET_LS1021ATWR=y
-diff -ruN u-boot-2015.01-rc3/configs/nyan-big_defconfig u-boot/configs/nyan-big_defconfig
---- u-boot-2015.01-rc3/configs/nyan-big_defconfig	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/configs/nyan-big_defconfig	2015-01-01 17:34:32.565498136 +0100
-@@ -0,0 +1,5 @@
-++S:CONFIG_ARM=y
-++S:CONFIG_TEGRA=y
-++S:CONFIG_TEGRA124=y
-++S:CONFIG_TARGET_NYAN_BIG=y
-+CONFIG_DEFAULT_DEVICE_TREE="tegra124-nyan-big"
-diff -ruN u-boot-2015.01-rc3/configs/ph1_ld4_defconfig u-boot/configs/ph1_ld4_defconfig
---- u-boot-2015.01-rc3/configs/ph1_ld4_defconfig	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/configs/ph1_ld4_defconfig	2015-01-01 17:34:32.565498136 +0100
-@@ -1,4 +1,3 @@
--CONFIG_SPL=y
- CONFIG_FIT=y
- CONFIG_FIT_VERBOSE=y
- +S:CONFIG_ARM=y
-diff -ruN u-boot-2015.01-rc3/configs/ph1_pro4_defconfig u-boot/configs/ph1_pro4_defconfig
---- u-boot-2015.01-rc3/configs/ph1_pro4_defconfig	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/configs/ph1_pro4_defconfig	2015-01-01 17:34:32.565498136 +0100
-@@ -1,4 +1,3 @@
--CONFIG_SPL=y
- CONFIG_FIT=y
- CONFIG_FIT_VERBOSE=y
- +S:CONFIG_ARM=y
-diff -ruN u-boot-2015.01-rc3/configs/ph1_sld8_defconfig u-boot/configs/ph1_sld8_defconfig
---- u-boot-2015.01-rc3/configs/ph1_sld8_defconfig	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/configs/ph1_sld8_defconfig	2015-01-01 17:34:32.565498136 +0100
-@@ -1,4 +1,3 @@
--CONFIG_SPL=y
- CONFIG_FIT=y
- CONFIG_FIT_VERBOSE=y
- +S:CONFIG_ARM=y
-diff -ruN u-boot-2015.01-rc3/configs/stv0991_defconfig u-boot/configs/stv0991_defconfig
---- u-boot-2015.01-rc3/configs/stv0991_defconfig	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/configs/stv0991_defconfig	2015-01-01 17:34:32.569498072 +0100
-@@ -0,0 +1,3 @@
-+CONFIG_SYS_EXTRA_OPTIONS="stv0991"
-+CONFIG_ARM=y
-+CONFIG_TARGET_STV0991=y
-diff -ruN u-boot-2015.01-rc3/disk/part_efi.c u-boot/disk/part_efi.c
---- u-boot-2015.01-rc3/disk/part_efi.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/disk/part_efi.c	2015-01-01 17:34:32.573498006 +0100
-@@ -69,6 +69,107 @@
- 			sizeof(efi_guid_t));
- }
- 
-+static int validate_gpt_header(gpt_header *gpt_h, lbaint_t lba,
-+		lbaint_t lastlba)
-+{
-+	uint32_t crc32_backup = 0;
-+	uint32_t calc_crc32;
-+
-+	/* Check the GPT header signature */
-+	if (le64_to_cpu(gpt_h->signature) != GPT_HEADER_SIGNATURE) {
-+		printf("%s signature is wrong: 0x%llX != 0x%llX\n",
-+		       "GUID Partition Table Header",
-+		       le64_to_cpu(gpt_h->signature),
-+		       GPT_HEADER_SIGNATURE);
-+		return -1;
-+	}
-+
-+	/* Check the GUID Partition Table CRC */
-+	memcpy(&crc32_backup, &gpt_h->header_crc32, sizeof(crc32_backup));
-+	memset(&gpt_h->header_crc32, 0, sizeof(gpt_h->header_crc32));
-+
-+	calc_crc32 = efi_crc32((const unsigned char *)gpt_h,
-+		le32_to_cpu(gpt_h->header_size));
-+
-+	memcpy(&gpt_h->header_crc32, &crc32_backup, sizeof(crc32_backup));
-+
-+	if (calc_crc32 != le32_to_cpu(crc32_backup)) {
-+		printf("%s CRC is wrong: 0x%x != 0x%x\n",
-+		       "GUID Partition Table Header",
-+		       le32_to_cpu(crc32_backup), calc_crc32);
-+		return -1;
-+	}
-+
-+	/*
-+	 * Check that the my_lba entry points to the LBA that contains the GPT
-+	 */
-+	if (le64_to_cpu(gpt_h->my_lba) != lba) {
-+		printf("GPT: my_lba incorrect: %llX != " LBAF "\n",
-+		       le64_to_cpu(gpt_h->my_lba),
-+		       lba);
-+		return -1;
-+	}
-+
-+	/*
-+	 * Check that the first_usable_lba and that the last_usable_lba are
-+	 * within the disk.
-+	 */
-+	if (le64_to_cpu(gpt_h->first_usable_lba) > lastlba) {
-+		printf("GPT: first_usable_lba incorrect: %llX > " LBAF "\n",
-+		       le64_to_cpu(gpt_h->first_usable_lba), lastlba);
-+		return -1;
-+	}
-+	if (le64_to_cpu(gpt_h->last_usable_lba) > lastlba) {
-+		printf("GPT: last_usable_lba incorrect: %llX > " LBAF "\n",
-+		       le64_to_cpu(gpt_h->last_usable_lba), lastlba);
-+		return -1;
-+	}
-+
-+	debug("GPT: first_usable_lba: %llX last_usable_lba: %llX last lba: "
-+	      LBAF "\n", le64_to_cpu(gpt_h->first_usable_lba),
-+	      le64_to_cpu(gpt_h->last_usable_lba), lastlba);
-+
-+	return 0;
-+}
-+
-+static int validate_gpt_entries(gpt_header *gpt_h, gpt_entry *gpt_e)
-+{
-+	uint32_t calc_crc32;
-+
-+	/* Check the GUID Partition Table Entry Array CRC */
-+	calc_crc32 = efi_crc32((const unsigned char *)gpt_e,
-+		le32_to_cpu(gpt_h->num_partition_entries) *
-+		le32_to_cpu(gpt_h->sizeof_partition_entry));
-+
-+	if (calc_crc32 != le32_to_cpu(gpt_h->partition_entry_array_crc32)) {
-+		printf("%s: 0x%x != 0x%x\n",
-+		       "GUID Partition Table Entry Array CRC is wrong",
-+		       le32_to_cpu(gpt_h->partition_entry_array_crc32),
-+		       calc_crc32);
-+		return -1;
-+	}
-+
-+	return 0;
-+}
-+
-+static void prepare_backup_gpt_header(gpt_header *gpt_h)
-+{
-+	uint32_t calc_crc32;
-+	uint64_t val;
-+
-+	/* recalculate the values for the Backup GPT Header */
-+	val = le64_to_cpu(gpt_h->my_lba);
-+	gpt_h->my_lba = gpt_h->alternate_lba;
-+	gpt_h->alternate_lba = cpu_to_le64(val);
-+	gpt_h->partition_entry_lba =
-+			cpu_to_le64(le64_to_cpu(gpt_h->last_usable_lba) + 1);
-+	gpt_h->header_crc32 = 0;
-+
-+	calc_crc32 = efi_crc32((const unsigned char *)gpt_h,
-+			       le32_to_cpu(gpt_h->header_size));
-+	gpt_h->header_crc32 = cpu_to_le32(calc_crc32);
-+}
-+
- #ifdef CONFIG_EFI_PARTITION
- /*
-  * Public Functions (include/part.h)
-@@ -259,7 +360,6 @@
- 	const int pte_blk_cnt = BLOCK_CNT((gpt_h->num_partition_entries
- 					   * sizeof(gpt_entry)), dev_desc);
- 	u32 calc_crc32;
--	u64 val;
- 
- 	debug("max lba: %x\n", (u32) dev_desc->lba);
- 	/* Setup the Protective MBR */
-@@ -284,15 +384,7 @@
- 	    != pte_blk_cnt)
- 		goto err;
- 
--	/* recalculate the values for the Backup GPT Header */
--	val = le64_to_cpu(gpt_h->my_lba);
--	gpt_h->my_lba = gpt_h->alternate_lba;
--	gpt_h->alternate_lba = cpu_to_le64(val);
--	gpt_h->header_crc32 = 0;
--
--	calc_crc32 = efi_crc32((const unsigned char *)gpt_h,
--			      le32_to_cpu(gpt_h->header_size));
--	gpt_h->header_crc32 = cpu_to_le32(calc_crc32);
-+	prepare_backup_gpt_header(gpt_h);
- 
- 	if (dev_desc->block_write(dev_desc->dev,
- 				  (lbaint_t)le64_to_cpu(gpt_h->last_usable_lba)
-@@ -455,6 +547,97 @@
- 	free(gpt_h);
- 	return ret;
- }
-+
-+int is_valid_gpt_buf(block_dev_desc_t *dev_desc, void *buf)
-+{
-+	gpt_header *gpt_h;
-+	gpt_entry *gpt_e;
-+
-+	/* determine start of GPT Header in the buffer */
-+	gpt_h = buf + (GPT_PRIMARY_PARTITION_TABLE_LBA *
-+		       dev_desc->blksz);
-+	if (validate_gpt_header(gpt_h, GPT_PRIMARY_PARTITION_TABLE_LBA,
-+				dev_desc->lba))
-+		return -1;
-+
-+	/* determine start of GPT Entries in the buffer */
-+	gpt_e = buf + (le64_to_cpu(gpt_h->partition_entry_lba) *
-+		       dev_desc->blksz);
-+	if (validate_gpt_entries(gpt_h, gpt_e))
-+		return -1;
-+
-+	return 0;
-+}
-+
-+int write_mbr_and_gpt_partitions(block_dev_desc_t *dev_desc, void *buf)
-+{
-+	gpt_header *gpt_h;
-+	gpt_entry *gpt_e;
-+	int gpt_e_blk_cnt;
-+	lbaint_t lba;
-+	int cnt;
-+
-+	if (is_valid_gpt_buf(dev_desc, buf))
-+		return -1;
-+
-+	/* determine start of GPT Header in the buffer */
-+	gpt_h = buf + (GPT_PRIMARY_PARTITION_TABLE_LBA *
-+		       dev_desc->blksz);
-+
-+	/* determine start of GPT Entries in the buffer */
-+	gpt_e = buf + (le64_to_cpu(gpt_h->partition_entry_lba) *
-+		       dev_desc->blksz);
-+	gpt_e_blk_cnt = BLOCK_CNT((le32_to_cpu(gpt_h->num_partition_entries) *
-+				   le32_to_cpu(gpt_h->sizeof_partition_entry)),
-+				  dev_desc);
-+
-+	/* write MBR */
-+	lba = 0;	/* MBR is always at 0 */
-+	cnt = 1;	/* MBR (1 block) */
-+	if (dev_desc->block_write(dev_desc->dev, lba, cnt, buf) != cnt) {
-+		printf("%s: failed writing '%s' (%d blks at 0x" LBAF ")\n",
-+		       __func__, "MBR", cnt, lba);
-+		return 1;
-+	}
-+
-+	/* write Primary GPT */
-+	lba = GPT_PRIMARY_PARTITION_TABLE_LBA;
-+	cnt = 1;	/* GPT Header (1 block) */
-+	if (dev_desc->block_write(dev_desc->dev, lba, cnt, gpt_h) != cnt) {
-+		printf("%s: failed writing '%s' (%d blks at 0x" LBAF ")\n",
-+		       __func__, "Primary GPT Header", cnt, lba);
-+		return 1;
-+	}
-+
-+	lba = le64_to_cpu(gpt_h->partition_entry_lba);
-+	cnt = gpt_e_blk_cnt;
-+	if (dev_desc->block_write(dev_desc->dev, lba, cnt, gpt_e) != cnt) {
-+		printf("%s: failed writing '%s' (%d blks at 0x" LBAF ")\n",
-+		       __func__, "Primary GPT Entries", cnt, lba);
-+		return 1;
-+	}
-+
-+	prepare_backup_gpt_header(gpt_h);
-+
-+	/* write Backup GPT */
-+	lba = le64_to_cpu(gpt_h->partition_entry_lba);
-+	cnt = gpt_e_blk_cnt;
-+	if (dev_desc->block_write(dev_desc->dev, lba, cnt, gpt_e) != cnt) {
-+		printf("%s: failed writing '%s' (%d blks at 0x" LBAF ")\n",
-+		       __func__, "Backup GPT Entries", cnt, lba);
-+		return 1;
-+	}
-+
-+	lba = le64_to_cpu(gpt_h->my_lba);
-+	cnt = 1;	/* GPT Header (1 block) */
-+	if (dev_desc->block_write(dev_desc->dev, lba, cnt, gpt_h) != cnt) {
-+		printf("%s: failed writing '%s' (%d blks at 0x" LBAF ")\n",
-+		       __func__, "Backup GPT Header", cnt, lba);
-+		return 1;
-+	}
-+
-+	return 0;
-+}
- #endif
- 
- /*
-@@ -511,10 +694,6 @@
- static int is_gpt_valid(block_dev_desc_t *dev_desc, u64 lba,
- 			gpt_header *pgpt_head, gpt_entry **pgpt_pte)
- {
--	u32 crc32_backup = 0;
--	u32 calc_crc32;
--	u64 lastlba;
--
- 	if (!dev_desc || !pgpt_head) {
- 		printf("%s: Invalid Argument(s)\n", __func__);
- 		return 0;
-@@ -527,55 +706,8 @@
- 		return 0;
- 	}
- 
--	/* Check the GPT header signature */
--	if (le64_to_cpu(pgpt_head->signature) != GPT_HEADER_SIGNATURE) {
--		printf("GUID Partition Table Header signature is wrong:"
--			"0x%llX != 0x%llX\n",
--			le64_to_cpu(pgpt_head->signature),
--			GPT_HEADER_SIGNATURE);
--		return 0;
--	}
--
--	/* Check the GUID Partition Table CRC */
--	memcpy(&crc32_backup, &pgpt_head->header_crc32, sizeof(crc32_backup));
--	memset(&pgpt_head->header_crc32, 0, sizeof(pgpt_head->header_crc32));
--
--	calc_crc32 = efi_crc32((const unsigned char *)pgpt_head,
--		le32_to_cpu(pgpt_head->header_size));
--
--	memcpy(&pgpt_head->header_crc32, &crc32_backup, sizeof(crc32_backup));
--
--	if (calc_crc32 != le32_to_cpu(crc32_backup)) {
--		printf("GUID Partition Table Header CRC is wrong:"
--			"0x%x != 0x%x\n",
--		       le32_to_cpu(crc32_backup), calc_crc32);
--		return 0;
--	}
--
--	/* Check that the my_lba entry points to the LBA that contains the GPT */
--	if (le64_to_cpu(pgpt_head->my_lba) != lba) {
--		printf("GPT: my_lba incorrect: %llX != %" PRIX64 "\n",
--		       le64_to_cpu(pgpt_head->my_lba),
--		       lba);
-+	if (validate_gpt_header(pgpt_head, (lbaint_t)lba, dev_desc->lba))
- 		return 0;
--	}
--
--	/* Check the first_usable_lba and last_usable_lba are within the disk. */
--	lastlba = (u64)dev_desc->lba;
--	if (le64_to_cpu(pgpt_head->first_usable_lba) > lastlba) {
--		printf("GPT: first_usable_lba incorrect: %llX > %" PRIX64 "\n",
--		       le64_to_cpu(pgpt_head->first_usable_lba), lastlba);
--		return 0;
--	}
--	if (le64_to_cpu(pgpt_head->last_usable_lba) > lastlba) {
--		printf("GPT: last_usable_lba incorrect: %llX > %" PRIX64 "\n",
--		       le64_to_cpu(pgpt_head->last_usable_lba), lastlba);
--		return 0;
--	}
--
--	debug("GPT: first_usable_lba: %llX last_usable_lba %llX last lba %"
--	      PRIX64 "\n", le64_to_cpu(pgpt_head->first_usable_lba),
--	      le64_to_cpu(pgpt_head->last_usable_lba), lastlba);
- 
- 	/* Read and allocate Partition Table Entries */
- 	*pgpt_pte = alloc_read_gpt_entries(dev_desc, pgpt_head);
-@@ -584,17 +716,7 @@
- 		return 0;
- 	}
- 
--	/* Check the GUID Partition Table Entry Array CRC */
--	calc_crc32 = efi_crc32((const unsigned char *)*pgpt_pte,
--		le32_to_cpu(pgpt_head->num_partition_entries) *
--		le32_to_cpu(pgpt_head->sizeof_partition_entry));
--
--	if (calc_crc32 != le32_to_cpu(pgpt_head->partition_entry_array_crc32)) {
--		printf("GUID Partition Table Entry Array CRC is wrong:"
--			"0x%x != 0x%x\n",
--			le32_to_cpu(pgpt_head->partition_entry_array_crc32),
--			calc_crc32);
--
-+	if (validate_gpt_entries(pgpt_head, *pgpt_pte)) {
- 		free(*pgpt_pte);
- 		return 0;
- 	}
-diff -ruN u-boot-2015.01-rc3/doc/README.x86 u-boot/doc/README.x86
---- u-boot-2015.01-rc3/doc/README.x86	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/doc/README.x86	2015-01-01 17:34:32.597497612 +0100
-@@ -0,0 +1,126 @@
-+#
-+# Copyright (C) 2014, Simon Glass <sjg at chromium.org>
-+# Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+#
-+# SPDX-License-Identifier:	GPL-2.0+
-+#
-+
-+U-Boot on x86
-+=============
-+
-+This document describes the information about U-Boot running on x86 targets,
-+including supported boards, build instructions, todo list, etc.
-+
-+Status
-+------
-+U-Boot supports running as a coreboot [1] payload on x86. So far only Link
-+(Chromebook Pixel) has been tested, but it should work with minimal adjustments
-+on other x86 boards since coreboot deals with most of the low-level details.
-+
-+U-Boot also supports booting directly from x86 reset vector without coreboot,
-+aka raw support or bare support. Currently Link and Intel Crown Bay board
-+support running U-Boot 'bare metal'.
-+
-+As for loading OS, U-Boot supports directly booting a 32-bit or 64-bit Linux
-+kernel as part of a FIT image. It also supports a compressed zImage.
-+
-+Build Instructions
-+------------------
-+Building U-Boot as a coreboot payload is just like building U-Boot for targets
-+on other architectures, like below:
-+
-+$ make coreboot-x86_defconfig
-+$ make all
-+
-+Building ROM version of U-Boot (hereafter referred to as u-boot.rom) is a
-+little bit tricky, as generally it requires several binary blobs which are not
-+shipped in the U-Boot source tree. Due to this reason, the u-boot.rom build is
-+not turned on by default in the U-Boot source tree. Firstly, you need turn it
-+on by uncommenting the following line in the main U-Boot Makefile:
-+
-+# ALL-$(CONFIG_X86_RESET_VECTOR) += u-boot.rom
-+
-+Link-specific instructions:
-+
-+First, you need the following binary blobs:
-+
-+* descriptor.bin - Intel flash descriptor
-+* me.bin - Intel Management Engine
-+* mrc.bin - Memory Reference Code, which sets up SDRAM
-+* video ROM - sets up the display
-+
-+You can get these binary blobs by:
-+
-+$ git clone http://review.coreboot.org/p/blobs.git
-+$ cd blobs
-+
-+Find the following files:
-+
-+* ./mainboard/google/link/descriptor.bin
-+* ./mainboard/google/link/me.bin
-+* ./northbridge/intel/sandybridge/systemagent-ivybridge.bin
-+
-+The 3rd one should be renamed to mrc.bin.
-+As for the video ROM, you can get it here [2].
-+Make sure all these binary blobs are put in the board directory.
-+
-+Now you can build U-Boot and obtain u-boot.rom:
-+
-+$ make chromebook_link_defconfig
-+$ make all
-+
-+Intel Crown Bay specific instructions:
-+
-+U-Boot support of Intel Crown Bay board [3] relies on a binary blob called
-+Firmware Support Package [4] to perform all the necessary initialization steps
-+as documented in the BIOS Writer Guide, including initialization of the CPU,
-+memory controller, chipset and certain bus interfaces.
-+
-+Download the Intel FSP for Atom E6xx series and Platform Controller Hub EG20T,
-+install it on your host and locate the FSP binary blob. Note this platform
-+also requires a Chipset Micro Code (CMC) state machine binary to be present in
-+the SPI flash where u-boot.rom resides, and this CMC binary blob can be found
-+in this FSP package too.
-+
-+* ./FSP/QUEENSBAY_FSP_GOLD_001_20-DECEMBER-2013.fd
-+* ./Microcode/C0_22211.BIN
-+
-+Rename the first one to fsp.bin and second one to cmc.bin and put them in the
-+board directory.
-+
-+Now you can build U-Boot and obtaim u-boot.rom
-+
-+$ make crownbay_defconfig
-+$ make all
-+
-+CPU Microcode
-+-------------
-+Modern CPU usually requires a special bit stream called microcode [5] to be
-+loaded on the processor after power up in order to function properly. U-Boot
-+has already integrated these as hex dumps in the source tree.
-+
-+Driver Model
-+------------
-+x86 has been converted to use driver model for serial and GPIO.
-+
-+Device Tree
-+-----------
-+x86 uses device tree to configure the board thus requires CONFIG_OF_CONTROL to
-+be turned on. Not every device on the board is configured via devie tree, but
-+more and more devices will be added as time goes by. Check out the directory
-+arch/x86/dts/ for these device tree source files.
-+
-+TODO List
-+---------
-+- MTRR support (for performance)
-+- Audio
-+- Chrome OS verified boot
-+- SMI and ACPI support, to provide platform info and facilities to Linux
-+
-+References
-+----------
-+[1] http://www.coreboot.org
-+[2] http://www.coreboot.org/~stepan/pci8086,0166.rom
-+[3] http://www.intel.com/content/www/us/en/embedded/design-tools/evaluation-platforms/atom-e660-eg20t-development-kit.html
-+[4] http://www.intel.com/fsp
-+[5] http://en.wikipedia.org/wiki/Microcode
-diff -ruN u-boot-2015.01-rc3/drivers/bios_emulator/besys.c u-boot/drivers/bios_emulator/besys.c
---- u-boot-2015.01-rc3/drivers/bios_emulator/besys.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/bios_emulator/besys.c	2015-01-01 17:34:32.605497481 +0100
-@@ -48,8 +48,8 @@
- ****************************************************************************/
- 
- #define __io
--#include <asm/io.h>
- #include <common.h>
-+#include <asm/io.h>
- #include "biosemui.h"
- 
- /*------------------------- Global Variables ------------------------------*/
-diff -ruN u-boot-2015.01-rc3/drivers/bios_emulator/bios.c u-boot/drivers/bios_emulator/bios.c
---- u-boot-2015.01-rc3/drivers/bios_emulator/bios.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/bios_emulator/bios.c	2015-01-01 17:34:32.605497481 +0100
-@@ -42,8 +42,8 @@
- ****************************************************************************/
- 
- #define __io
--#include <asm/io.h>
- #include <common.h>
-+#include <asm/io.h>
- #include "biosemui.h"
- 
- /*----------------------------- Implementation ----------------------------*/
-diff -ruN u-boot-2015.01-rc3/drivers/block/dwc_ahsata.c u-boot/drivers/block/dwc_ahsata.c
---- u-boot-2015.01-rc3/drivers/block/dwc_ahsata.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/block/dwc_ahsata.c	2015-01-01 17:34:32.613497350 +0100
-@@ -594,22 +594,24 @@
- 
- int reset_sata(int dev)
- {
--	struct ahci_probe_ent *probe_ent =
--			(struct ahci_probe_ent *)sata_dev_desc[dev].priv;
--	struct sata_host_regs *host_mmio =
--			(struct sata_host_regs *)probe_ent->mmio_base;
-+	struct ahci_probe_ent *probe_ent;
-+	struct sata_host_regs *host_mmio;
- 
- 	if (dev < 0 || dev > (CONFIG_SYS_SATA_MAX_DEVICE - 1)) {
- 		printf("The sata index %d is out of ranges\n\r", dev);
- 		return -1;
- 	}
- 
-+	probe_ent = (struct ahci_probe_ent *)sata_dev_desc[dev].priv;
-+	if (NULL == probe_ent)
-+		/* not initialized, so nothing to reset */
-+		return 0;
-+
-+	host_mmio = (struct sata_host_regs *)probe_ent->mmio_base;
- 	setbits_le32(&host_mmio->ghc, SATA_HOST_GHC_HR);
- 	while (readl(&host_mmio->ghc) & SATA_HOST_GHC_HR)
- 		udelay(100);
- 
--	disable_sata_clock();
--
- 	return 0;
- }
- 
-diff -ruN u-boot-2015.01-rc3/drivers/core/device.c u-boot/drivers/core/device.c
---- u-boot-2015.01-rc3/drivers/core/device.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/core/device.c	2015-01-01 17:34:32.621497219 +0100
-@@ -234,7 +234,7 @@
- void *dev_get_platdata(struct udevice *dev)
- {
- 	if (!dev) {
--		dm_warn("%s: null device", __func__);
-+		dm_warn("%s: null device\n", __func__);
- 		return NULL;
- 	}
- 
-@@ -244,7 +244,7 @@
- void *dev_get_priv(struct udevice *dev)
- {
- 	if (!dev) {
--		dm_warn("%s: null device", __func__);
-+		dm_warn("%s: null device\n", __func__);
- 		return NULL;
- 	}
- 
-@@ -254,7 +254,7 @@
- void *dev_get_parentdata(struct udevice *dev)
- {
- 	if (!dev) {
--		dm_warn("%s: null device", __func__);
-+		dm_warn("%s: null device\n", __func__);
- 		return NULL;
- 	}
- 
-diff -ruN u-boot-2015.01-rc3/drivers/crypto/fsl/jr.c u-boot/drivers/crypto/fsl/jr.c
---- u-boot-2015.01-rc3/drivers/crypto/fsl/jr.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/crypto/fsl/jr.c	2015-01-01 17:34:32.621497219 +0100
-@@ -246,7 +246,7 @@
- 	struct result op;
- 	int ret = 0;
- 
--	memset(&op, sizeof(op), 0);
-+	memset(&op, 0, sizeof(op));
- 
- 	ret = jr_enqueue(desc, desc_done, &op);
- 	if (ret) {
-diff -ruN u-boot-2015.01-rc3/drivers/ddr/fsl/arm_ddr_gen3.c u-boot/drivers/ddr/fsl/arm_ddr_gen3.c
---- u-boot-2015.01-rc3/drivers/ddr/fsl/arm_ddr_gen3.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/ddr/fsl/arm_ddr_gen3.c	2015-01-01 17:34:32.621497219 +0100
-@@ -92,7 +92,6 @@
- 	ddr_out32(&ddr->timing_cfg_0, regs->timing_cfg_0);
- 	ddr_out32(&ddr->timing_cfg_1, regs->timing_cfg_1);
- 	ddr_out32(&ddr->timing_cfg_2, regs->timing_cfg_2);
--	ddr_out32(&ddr->sdram_cfg_2, regs->ddr_sdram_cfg_2);
- 	ddr_out32(&ddr->sdram_mode, regs->ddr_sdram_mode);
- 	ddr_out32(&ddr->sdram_mode_2, regs->ddr_sdram_mode_2);
- 	ddr_out32(&ddr->sdram_mode_3, regs->ddr_sdram_mode_3);
-@@ -105,9 +104,6 @@
- 	ddr_out32(&ddr->sdram_interval, regs->ddr_sdram_interval);
- 	ddr_out32(&ddr->sdram_data_init, regs->ddr_data_init);
- 	ddr_out32(&ddr->sdram_clk_cntl, regs->ddr_sdram_clk_cntl);
--	ddr_out32(&ddr->init_addr, regs->ddr_init_addr);
--	ddr_out32(&ddr->init_ext_addr, regs->ddr_init_ext_addr);
--
- 	ddr_out32(&ddr->timing_cfg_4, regs->timing_cfg_4);
- 	ddr_out32(&ddr->timing_cfg_5, regs->timing_cfg_5);
- 	ddr_out32(&ddr->ddr_zq_cntl, regs->ddr_zq_cntl);
-@@ -128,7 +124,24 @@
- 	ddr_out32(&ddr->ddr_sdram_rcw_1, regs->ddr_sdram_rcw_1);
- 	ddr_out32(&ddr->ddr_sdram_rcw_2, regs->ddr_sdram_rcw_2);
- 	ddr_out32(&ddr->ddr_cdr1, regs->ddr_cdr1);
--	ddr_out32(&ddr->ddr_cdr2, regs->ddr_cdr2);
-+#ifdef CONFIG_DEEP_SLEEP
-+	if (is_warm_boot()) {
-+		ddr_out32(&ddr->sdram_cfg_2,
-+			  regs->ddr_sdram_cfg_2 & ~SDRAM_CFG2_D_INIT);
-+		ddr_out32(&ddr->init_addr, CONFIG_SYS_SDRAM_BASE);
-+		ddr_out32(&ddr->init_ext_addr, DDR_INIT_ADDR_EXT_UIA);
-+
-+		/* DRAM VRef will not be trained */
-+		ddr_out32(&ddr->ddr_cdr2,
-+			  regs->ddr_cdr2 & ~DDR_CDR2_VREF_TRAIN_EN);
-+	} else
-+#endif
-+	{
-+		ddr_out32(&ddr->sdram_cfg_2, regs->ddr_sdram_cfg_2);
-+		ddr_out32(&ddr->init_addr, regs->ddr_init_addr);
-+		ddr_out32(&ddr->init_ext_addr, regs->ddr_init_ext_addr);
-+		ddr_out32(&ddr->ddr_cdr2, regs->ddr_cdr2);
-+	}
- 	ddr_out32(&ddr->err_disable, regs->err_disable);
- 	ddr_out32(&ddr->err_int_en, regs->err_int_en);
- 	for (i = 0; i < 32; i++) {
-@@ -167,8 +180,20 @@
- 	udelay(500);
- 	asm volatile("dsb sy;isb");
- 
-+#ifdef CONFIG_DEEP_SLEEP
-+	if (is_warm_boot()) {
-+		/* enter self-refresh */
-+		temp_sdram_cfg = ddr_in32(&ddr->sdram_cfg_2);
-+		temp_sdram_cfg |= SDRAM_CFG2_FRC_SR;
-+		ddr_out32(&ddr->sdram_cfg_2, temp_sdram_cfg);
-+		/* do board specific memory setup */
-+		board_mem_sleep_setup();
-+
-+		temp_sdram_cfg = (ddr_in32(&ddr->sdram_cfg) | SDRAM_CFG_BI);
-+	} else
-+#endif
-+		temp_sdram_cfg = ddr_in32(&ddr->sdram_cfg) & ~SDRAM_CFG_BI;
- 	/* Let the controller go */
--	temp_sdram_cfg = ddr_in32(&ddr->sdram_cfg) & ~SDRAM_CFG_BI;
- 	ddr_out32(&ddr->sdram_cfg, temp_sdram_cfg | SDRAM_CFG_MEM_EN);
- 	asm volatile("dsb sy;isb");
- 
-@@ -211,4 +236,12 @@
- 
- 	if (timeout <= 0)
- 		printf("Waiting for D_INIT timeout. Memory may not work.\n");
-+#ifdef CONFIG_DEEP_SLEEP
-+	if (is_warm_boot()) {
-+		/* exit self-refresh */
-+		temp_sdram_cfg = ddr_in32(&ddr->sdram_cfg_2);
-+		temp_sdram_cfg &= ~SDRAM_CFG2_FRC_SR;
-+		ddr_out32(&ddr->sdram_cfg_2, temp_sdram_cfg);
-+	}
-+#endif
- }
-diff -ruN u-boot-2015.01-rc3/drivers/ddr/fsl/ctrl_regs.c u-boot/drivers/ddr/fsl/ctrl_regs.c
---- u-boot-2015.01-rc3/drivers/ddr/fsl/ctrl_regs.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/ddr/fsl/ctrl_regs.c	2015-01-01 17:34:32.625497153 +0100
-@@ -324,6 +324,7 @@
- #elif defined(CONFIG_SYS_FSL_DDR3)
- 	unsigned int data_rate = get_ddr_freq(0);
- 	int txp;
-+	unsigned int ip_rev;
- 	int odt_overlap;
- 	/*
- 	 * (tXARD and tXARDS). Empirical?
-@@ -336,7 +337,25 @@
- 	 */
- 	txp = max((int)mclk_ps * 3, (mclk_ps > 1540 ? 7500 : 6000));
- 
--	tmrd_mclk = 4;
-+	ip_rev = fsl_ddr_get_version();
-+	if (ip_rev >= 0x40700) {
-+		/*
-+		 * MRS_CYC = max(tMRD, tMOD)
-+		 * tMRD = 4nCK (8nCK for RDIMM)
-+		 * tMOD = max(12nCK, 15ns)
-+		 */
-+		tmrd_mclk = max((unsigned int)12, picos_to_mclk(15000));
-+	} else {
-+		/*
-+		 * MRS_CYC = tMRD
-+		 * tMRD = 4nCK (8nCK for RDIMM)
-+		 */
-+		if (popts->registered_dimm_en)
-+			tmrd_mclk = 8;
-+		else
-+			tmrd_mclk = 4;
-+	}
-+
- 	/* set the turnaround time */
- 
- 	/*
-diff -ruN u-boot-2015.01-rc3/drivers/ddr/fsl/fsl_ddr_gen4.c u-boot/drivers/ddr/fsl/fsl_ddr_gen4.c
---- u-boot-2015.01-rc3/drivers/ddr/fsl/fsl_ddr_gen4.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/ddr/fsl/fsl_ddr_gen4.c	2015-01-01 17:34:32.625497153 +0100
-@@ -103,7 +103,6 @@
- 	ddr_out32(&ddr->dq_map_1, regs->dq_map_1);
- 	ddr_out32(&ddr->dq_map_2, regs->dq_map_2);
- 	ddr_out32(&ddr->dq_map_3, regs->dq_map_3);
--	ddr_out32(&ddr->sdram_cfg_2, regs->ddr_sdram_cfg_2);
- 	ddr_out32(&ddr->sdram_cfg_3, regs->ddr_sdram_cfg_3);
- 	ddr_out32(&ddr->sdram_mode, regs->ddr_sdram_mode);
- 	ddr_out32(&ddr->sdram_mode_2, regs->ddr_sdram_mode_2);
-@@ -124,8 +123,6 @@
- 	ddr_out32(&ddr->sdram_md_cntl, regs->ddr_sdram_md_cntl);
- 	ddr_out32(&ddr->sdram_interval, regs->ddr_sdram_interval);
- 	ddr_out32(&ddr->sdram_data_init, regs->ddr_data_init);
--	ddr_out32(&ddr->init_addr, regs->ddr_init_addr);
--	ddr_out32(&ddr->init_ext_addr, regs->ddr_init_ext_addr);
- 	ddr_out32(&ddr->ddr_wrlvl_cntl, regs->ddr_wrlvl_cntl);
- #ifndef CONFIG_SYS_FSL_DDR_EMU
- 	/*
-@@ -147,7 +144,24 @@
- 	ddr_out32(&ddr->ddr_sdram_rcw_5, regs->ddr_sdram_rcw_5);
- 	ddr_out32(&ddr->ddr_sdram_rcw_6, regs->ddr_sdram_rcw_6);
- 	ddr_out32(&ddr->ddr_cdr1, regs->ddr_cdr1);
--	ddr_out32(&ddr->ddr_cdr2, regs->ddr_cdr2);
-+#ifdef CONFIG_DEEP_SLEEP
-+	if (is_warm_boot()) {
-+		ddr_out32(&ddr->sdram_cfg_2,
-+			  regs->ddr_sdram_cfg_2 & ~SDRAM_CFG2_D_INIT);
-+		ddr_out32(&ddr->init_addr, CONFIG_SYS_SDRAM_BASE);
-+		ddr_out32(&ddr->init_ext_addr, DDR_INIT_ADDR_EXT_UIA);
-+
-+		/* DRAM VRef will not be trained */
-+		ddr_out32(&ddr->ddr_cdr2,
-+			  regs->ddr_cdr2 & ~DDR_CDR2_VREF_TRAIN_EN);
-+	} else
-+#endif
-+	{
-+		ddr_out32(&ddr->sdram_cfg_2, regs->ddr_sdram_cfg_2);
-+		ddr_out32(&ddr->init_addr, regs->ddr_init_addr);
-+		ddr_out32(&ddr->init_ext_addr, regs->ddr_init_ext_addr);
-+		ddr_out32(&ddr->ddr_cdr2, regs->ddr_cdr2);
-+	}
- 	ddr_out32(&ddr->err_disable, regs->err_disable);
- 	ddr_out32(&ddr->err_int_en, regs->err_int_en);
- 	for (i = 0; i < 32; i++) {
-@@ -187,8 +201,20 @@
- 	mb();
- 	isb();
- 
-+#ifdef CONFIG_DEEP_SLEEP
-+	if (is_warm_boot()) {
-+		/* enter self-refresh */
-+		temp_sdram_cfg = ddr_in32(&ddr->sdram_cfg_2);
-+		temp_sdram_cfg |= SDRAM_CFG2_FRC_SR;
-+		ddr_out32(&ddr->sdram_cfg_2, temp_sdram_cfg);
-+		/* do board specific memory setup */
-+		board_mem_sleep_setup();
-+
-+		temp_sdram_cfg = (ddr_in32(&ddr->sdram_cfg) | SDRAM_CFG_BI);
-+	} else
-+#endif
-+		temp_sdram_cfg = ddr_in32(&ddr->sdram_cfg) & ~SDRAM_CFG_BI;
- 	/* Let the controller go */
--	temp_sdram_cfg = ddr_in32(&ddr->sdram_cfg) & ~SDRAM_CFG_BI;
- 	ddr_out32(&ddr->sdram_cfg, temp_sdram_cfg | SDRAM_CFG_MEM_EN);
- 	mb();
- 	isb();
-@@ -233,4 +259,12 @@
- 
- 	if (timeout <= 0)
- 		printf("Waiting for D_INIT timeout. Memory may not work.\n");
-+#ifdef CONFIG_DEEP_SLEEP
-+	if (is_warm_boot()) {
-+		/* exit self-refresh */
-+		temp_sdram_cfg = ddr_in32(&ddr->sdram_cfg_2);
-+		temp_sdram_cfg &= ~SDRAM_CFG2_FRC_SR;
-+		ddr_out32(&ddr->sdram_cfg_2, temp_sdram_cfg);
-+	}
-+#endif
- }
-diff -ruN u-boot-2015.01-rc3/drivers/ddr/fsl/mpc85xx_ddr_gen3.c u-boot/drivers/ddr/fsl/mpc85xx_ddr_gen3.c
---- u-boot-2015.01-rc3/drivers/ddr/fsl/mpc85xx_ddr_gen3.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/ddr/fsl/mpc85xx_ddr_gen3.c	2015-01-01 17:34:32.625497153 +0100
-@@ -15,8 +15,6 @@
- #error Invalid setting for CONFIG_CHIP_SELECTS_PER_CTRL
- #endif
- 
--DECLARE_GLOBAL_DATA_PTR;
--
- /*
-  * regs has the to-be-set values for DDR controller registers
-  * ctrl_num is the DDR controller number
-@@ -44,16 +42,6 @@
- 	u32 save1, save2;
- #endif
- 
--#ifdef CONFIG_DEEP_SLEEP
--	const ccsr_gur_t *gur = (void __iomem *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
--	bool sleep_flag = 0;
--#endif
--
--#ifdef CONFIG_DEEP_SLEEP
--	if (in_be32(&gur->scrtsr[0]) & (1 << 3))
--		sleep_flag = 1;
--#endif
--
- 	switch (ctrl_num) {
- 	case 0:
- 		ddr = (void *)CONFIG_SYS_FSL_DDR_ADDR;
-@@ -130,13 +118,6 @@
- 	out_be32(&ddr->timing_cfg_0, regs->timing_cfg_0);
- 	out_be32(&ddr->timing_cfg_1, regs->timing_cfg_1);
- 	out_be32(&ddr->timing_cfg_2, regs->timing_cfg_2);
--#ifdef CONFIG_DEEP_SLEEP
--	if (sleep_flag)
--		out_be32(&ddr->sdram_cfg_2,
--			 regs->ddr_sdram_cfg_2 & ~SDRAM_CFG2_D_INIT);
--	else
--#endif
--		out_be32(&ddr->sdram_cfg_2, regs->ddr_sdram_cfg_2);
- 	out_be32(&ddr->sdram_mode, regs->ddr_sdram_mode);
- 	out_be32(&ddr->sdram_mode_2, regs->ddr_sdram_mode_2);
- 	out_be32(&ddr->sdram_mode_3, regs->ddr_sdram_mode_3);
-@@ -149,17 +130,6 @@
- 	out_be32(&ddr->sdram_interval, regs->ddr_sdram_interval);
- 	out_be32(&ddr->sdram_data_init, regs->ddr_data_init);
- 	out_be32(&ddr->sdram_clk_cntl, regs->ddr_sdram_clk_cntl);
--#ifdef CONFIG_DEEP_SLEEP
--	if (sleep_flag) {
--		out_be32(&ddr->init_addr, 0);
--		out_be32(&ddr->init_ext_addr, (1 << 31));
--	} else
--#endif
--	{
--		out_be32(&ddr->init_addr, regs->ddr_init_addr);
--		out_be32(&ddr->init_ext_addr, regs->ddr_init_ext_addr);
--	}
--
- 	out_be32(&ddr->timing_cfg_4, regs->timing_cfg_4);
- 	out_be32(&ddr->timing_cfg_5, regs->timing_cfg_5);
- 	out_be32(&ddr->ddr_zq_cntl, regs->ddr_zq_cntl);
-@@ -180,7 +150,24 @@
- 	out_be32(&ddr->ddr_sdram_rcw_1, regs->ddr_sdram_rcw_1);
- 	out_be32(&ddr->ddr_sdram_rcw_2, regs->ddr_sdram_rcw_2);
- 	out_be32(&ddr->ddr_cdr1, regs->ddr_cdr1);
--	out_be32(&ddr->ddr_cdr2, regs->ddr_cdr2);
-+#ifdef CONFIG_DEEP_SLEEP
-+	if (is_warm_boot()) {
-+		out_be32(&ddr->sdram_cfg_2,
-+			 regs->ddr_sdram_cfg_2 & ~SDRAM_CFG2_D_INIT);
-+		out_be32(&ddr->init_addr, CONFIG_SYS_SDRAM_BASE);
-+		out_be32(&ddr->init_ext_addr, DDR_INIT_ADDR_EXT_UIA);
-+
-+		/* DRAM VRef will not be trained */
-+		out_be32(&ddr->ddr_cdr2,
-+			 regs->ddr_cdr2 & ~DDR_CDR2_VREF_TRAIN_EN);
-+	} else
-+#endif
-+	{
-+		out_be32(&ddr->sdram_cfg_2, regs->ddr_sdram_cfg_2);
-+		out_be32(&ddr->init_addr, regs->ddr_init_addr);
-+		out_be32(&ddr->init_ext_addr, regs->ddr_init_ext_addr);
-+		out_be32(&ddr->ddr_cdr2, regs->ddr_cdr2);
-+	}
- 	out_be32(&ddr->err_disable, regs->err_disable);
- 	out_be32(&ddr->err_int_en, regs->err_int_en);
- 	for (i = 0; i < 32; i++) {
-@@ -400,21 +387,17 @@
- 	asm volatile("sync;isync");
- 
- #ifdef CONFIG_DEEP_SLEEP
--	if (sleep_flag) {
-+	if (is_warm_boot()) {
- 		/* enter self-refresh */
--		setbits_be32(&ddr->sdram_cfg_2, (1 << 31));
-+		setbits_be32(&ddr->sdram_cfg_2, SDRAM_CFG2_FRC_SR);
- 		/* do board specific memory setup */
- 		board_mem_sleep_setup();
--	}
--#endif
--
--	/* Let the controller go */
--#ifdef CONFIG_DEEP_SLEEP
--	if (sleep_flag)
- 		temp_sdram_cfg = (in_be32(&ddr->sdram_cfg) | SDRAM_CFG_BI);
--	else
-+	} else
- #endif
- 		temp_sdram_cfg = (in_be32(&ddr->sdram_cfg) & ~SDRAM_CFG_BI);
-+
-+	/* Let the controller go */
- 	out_be32(&ddr->sdram_cfg, temp_sdram_cfg | SDRAM_CFG_MEM_EN);
- 	asm volatile("sync;isync");
- 
-@@ -566,8 +549,8 @@
- 	}
- #endif /* CONFIG_SYS_FSL_ERRATUM_DDR111_DDR134 */
- #ifdef CONFIG_DEEP_SLEEP
--	if (sleep_flag)
-+	if (is_warm_boot())
- 		/* exit self-refresh */
--		clrbits_be32(&ddr->sdram_cfg_2, (1 << 31));
-+		clrbits_be32(&ddr->sdram_cfg_2, SDRAM_CFG2_FRC_SR);
- #endif
- }
-diff -ruN u-boot-2015.01-rc3/drivers/dfu/dfu.c u-boot/drivers/dfu/dfu.c
---- u-boot-2015.01-rc3/drivers/dfu/dfu.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/dfu/dfu.c	2015-01-01 17:34:32.629497087 +0100
-@@ -17,7 +17,6 @@
- #include <linux/list.h>
- #include <linux/compiler.h>
- 
--static bool dfu_detach_request;
- static LIST_HEAD(dfu_list);
- static int dfu_alt_num;
- static int alt_num_cnt;
-@@ -39,21 +38,6 @@
- 	return true;
- }
- 
--bool dfu_detach(void)
--{
--	return dfu_detach_request;
--}
--
--void dfu_trigger_detach(void)
--{
--	dfu_detach_request = true;
--}
--
--void dfu_clear_detach(void)
--{
--	dfu_detach_request = false;
--}
--
- static int dfu_find_alt_num(const char *s)
- {
- 	int i = 0;
-@@ -111,8 +95,12 @@
- 		return dfu_buf;
- 
- 	s = getenv("dfu_bufsiz");
--	dfu_buf_size = s ? (unsigned long)simple_strtol(s, NULL, 16) :
--			CONFIG_SYS_DFU_DATA_BUF_SIZE;
-+	if (s)
-+		dfu_buf_size = (unsigned long)simple_strtol(s, NULL, 0);
-+
-+	if (!s || !dfu_buf_size)
-+		dfu_buf_size = CONFIG_SYS_DFU_DATA_BUF_SIZE;
-+
- 	if (dfu->max_buf_size && dfu_buf_size > dfu->max_buf_size)
- 		dfu_buf_size = dfu->max_buf_size;
- 
-@@ -544,10 +532,35 @@
- int dfu_get_alt(char *name)
- {
- 	struct dfu_entity *dfu;
-+	char *str;
- 
- 	list_for_each_entry(dfu, &dfu_list, list) {
--		if (!strncmp(dfu->name, name, strlen(dfu->name)))
--			return dfu->alt;
-+		if (dfu->name[0] != '/') {
-+			if (!strncmp(dfu->name, name, strlen(dfu->name)))
-+				return dfu->alt;
-+		} else {
-+			/*
-+			 * One must also consider absolute path
-+			 * (/boot/bin/uImage) available at dfu->name when
-+			 * compared "plain" file name (uImage)
-+			 *
-+			 * It is the case for e.g. thor gadget where lthor SW
-+			 * sends only the file name, so only the very last part
-+			 * of path must be checked for equality
-+			 */
-+
-+			str = strstr(dfu->name, name);
-+			if (!str)
-+				continue;
-+
-+			/*
-+			 * Check if matching substring is the last element of
-+			 * dfu->name (uImage)
-+			 */
-+			if (strlen(dfu->name) ==
-+			    ((str - dfu->name) + strlen(name)))
-+				return dfu->alt;
-+		}
- 	}
- 
- 	return -ENODEV;
-diff -ruN u-boot-2015.01-rc3/drivers/dfu/dfu_mmc.c u-boot/drivers/dfu/dfu_mmc.c
---- u-boot-2015.01-rc3/drivers/dfu/dfu_mmc.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/dfu/dfu_mmc.c	2015-01-01 17:34:32.629497087 +0100
-@@ -40,10 +40,16 @@
- static int mmc_block_op(enum dfu_op op, struct dfu_entity *dfu,
- 			u64 offset, void *buf, long *len)
- {
--	struct mmc *mmc = find_mmc_device(dfu->data.mmc.dev_num);
-+	struct mmc *mmc;
- 	u32 blk_start, blk_count, n = 0;
- 	int ret, part_num_bkp = 0;
- 
-+	mmc = find_mmc_device(dfu->data.mmc.dev_num);
-+	if (!mmc) {
-+		error("Device MMC %d - not found!", dfu->data.mmc.dev_num);
-+		return -ENODEV;
-+	}
-+
- 	/*
- 	 * We must ensure that we work in lba_blk_size chunks, so ALIGN
- 	 * this value.
-diff -ruN u-boot-2015.01-rc3/drivers/gpio/intel_ich6_gpio.c u-boot/drivers/gpio/intel_ich6_gpio.c
---- u-boot-2015.01-rc3/drivers/gpio/intel_ich6_gpio.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/gpio/intel_ich6_gpio.c	2015-01-01 17:34:32.637496957 +0100
-@@ -34,69 +34,21 @@
- #include <asm/gpio.h>
- #include <asm/io.h>
- #include <asm/pci.h>
--#ifdef CONFIG_X86_RESET_VECTOR
--#include <asm/arch/pch.h>
--#define SUPPORT_GPIO_SETUP
--#endif
- 
- #define GPIO_PER_BANK	32
- 
--/* Where in config space is the register that points to the GPIO registers? */
--#define PCI_CFG_GPIOBASE 0x48
--
- struct ich6_bank_priv {
- 	/* These are I/O addresses */
--	uint32_t use_sel;
--	uint32_t io_sel;
--	uint32_t lvl;
-+	uint16_t use_sel;
-+	uint16_t io_sel;
-+	uint16_t lvl;
- };
- 
--#ifdef SUPPORT_GPIO_SETUP
--static void setup_pch_gpios(const struct pch_gpio_map *gpio)
--{
--	u16 gpiobase = pci_read_config16(PCH_LPC_DEV, GPIO_BASE) & 0xfffc;
--
--	/* GPIO Set 1 */
--	if (gpio->set1.level)
--		outl(*((u32 *)gpio->set1.level), gpiobase + GP_LVL);
--	if (gpio->set1.mode)
--		outl(*((u32 *)gpio->set1.mode), gpiobase + GPIO_USE_SEL);
--	if (gpio->set1.direction)
--		outl(*((u32 *)gpio->set1.direction), gpiobase + GP_IO_SEL);
--	if (gpio->set1.reset)
--		outl(*((u32 *)gpio->set1.reset), gpiobase + GP_RST_SEL1);
--	if (gpio->set1.invert)
--		outl(*((u32 *)gpio->set1.invert), gpiobase + GPI_INV);
--	if (gpio->set1.blink)
--		outl(*((u32 *)gpio->set1.blink), gpiobase + GPO_BLINK);
--
--	/* GPIO Set 2 */
--	if (gpio->set2.level)
--		outl(*((u32 *)gpio->set2.level), gpiobase + GP_LVL2);
--	if (gpio->set2.mode)
--		outl(*((u32 *)gpio->set2.mode), gpiobase + GPIO_USE_SEL2);
--	if (gpio->set2.direction)
--		outl(*((u32 *)gpio->set2.direction), gpiobase + GP_IO_SEL2);
--	if (gpio->set2.reset)
--		outl(*((u32 *)gpio->set2.reset), gpiobase + GP_RST_SEL2);
--
--	/* GPIO Set 3 */
--	if (gpio->set3.level)
--		outl(*((u32 *)gpio->set3.level), gpiobase + GP_LVL3);
--	if (gpio->set3.mode)
--		outl(*((u32 *)gpio->set3.mode), gpiobase + GPIO_USE_SEL3);
--	if (gpio->set3.direction)
--		outl(*((u32 *)gpio->set3.direction), gpiobase + GP_IO_SEL3);
--	if (gpio->set3.reset)
--		outl(*((u32 *)gpio->set3.reset), gpiobase + GP_RST_SEL3);
--}
--
- /* TODO: Move this to device tree, or platform data */
- void ich_gpio_set_gpio_map(const struct pch_gpio_map *map)
- {
- 	gd->arch.gpio_map = map;
- }
--#endif /* SUPPORT_GPIO_SETUP */
- 
- static int gpio_ich6_ofdata_to_platdata(struct udevice *dev)
- {
-@@ -105,7 +57,7 @@
- 	u8 tmpbyte;
- 	u16 tmpword;
- 	u32 tmplong;
--	u32 gpiobase;
-+	u16 gpiobase;
- 	int offset;
- 
- 	/* Where should it be? */
-@@ -164,11 +116,15 @@
- 	/*
- 	 * GPIOBASE moved to its current offset with ICH6, but prior to
- 	 * that it was unused (or undocumented). Check that it looks
--	 * okay: not all ones or zeros, and mapped to I/O space (bit 0).
-+	 * okay: not all ones or zeros.
-+	 *
-+	 * Note we don't need check bit0 here, because the Tunnel Creek
-+	 * GPIO base address register bit0 is reserved (read returns 0),
-+	 * while on the Ivybridge the bit0 is used to indicate it is an
-+	 * I/O space.
- 	 */
- 	tmplong = pci_read_config32(pci_dev, PCI_CFG_GPIOBASE);
--	if (tmplong == 0x00000000 || tmplong == 0xffffffff ||
--	    !(tmplong & 0x00000001)) {
-+	if (tmplong == 0x00000000 || tmplong == 0xffffffff) {
- 		debug("%s: unexpected GPIOBASE value\n", __func__);
- 		return -ENODEV;
- 	}
-@@ -179,7 +135,7 @@
- 	 * at the offset that we just read. Bit 0 indicates that it's
- 	 * an I/O address, not a memory address, so mask that off.
- 	 */
--	gpiobase = tmplong & 0xfffffffe;
-+	gpiobase = tmplong & 0xfffe;
- 	offset = fdtdec_get_int(gd->fdt_blob, dev->of_offset, "reg", -1);
- 	if (offset == -1) {
- 		debug("%s: Invalid register offset %d\n", __func__, offset);
-@@ -198,12 +154,11 @@
- 	struct gpio_dev_priv *uc_priv = dev->uclass_priv;
- 	struct ich6_bank_priv *bank = dev_get_priv(dev);
- 
--#ifdef SUPPORT_GPIO_SETUP
- 	if (gd->arch.gpio_map) {
--		setup_pch_gpios(gd->arch.gpio_map);
-+		setup_pch_gpios(plat->base_addr, gd->arch.gpio_map);
- 		gd->arch.gpio_map = NULL;
- 	}
--#endif
-+
- 	uc_priv->gpio_count = GPIO_PER_BANK;
- 	uc_priv->bank_name = plat->bank_name;
- 	bank->use_sel = plat->base_addr;
-@@ -251,6 +206,8 @@
- 	struct ich6_bank_priv *bank = dev_get_priv(dev);
- 	u32 tmplong;
- 
-+	gpio_set_value(offset, value);
-+
- 	tmplong = inl(bank->io_sel);
- 	tmplong &= ~(1UL << offset);
- 	outl(bank->io_sel, tmplong);
-diff -ruN u-boot-2015.01-rc3/drivers/i2c/i2c-emul-uclass.c u-boot/drivers/i2c/i2c-emul-uclass.c
---- u-boot-2015.01-rc3/drivers/i2c/i2c-emul-uclass.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/drivers/i2c/i2c-emul-uclass.c	2015-01-01 17:34:32.645496825 +0100
-@@ -0,0 +1,14 @@
-+/*
-+ * Copyright (c) 2014 Google, Inc
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <dm.h>
-+#include <i2c.h>
-+
-+UCLASS_DRIVER(i2c_emul) = {
-+	.id		= UCLASS_I2C_EMUL,
-+	.name		= "i2c_emul",
-+};
-diff -ruN u-boot-2015.01-rc3/drivers/i2c/i2c-uclass.c u-boot/drivers/i2c/i2c-uclass.c
---- u-boot-2015.01-rc3/drivers/i2c/i2c-uclass.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/drivers/i2c/i2c-uclass.c	2015-01-01 17:34:32.645496825 +0100
-@@ -0,0 +1,466 @@
-+/*
-+ * Copyright (c) 2014 Google, Inc
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <dm.h>
-+#include <errno.h>
-+#include <fdtdec.h>
-+#include <i2c.h>
-+#include <malloc.h>
-+#include <dm/device-internal.h>
-+#include <dm/lists.h>
-+#include <dm/root.h>
-+
-+DECLARE_GLOBAL_DATA_PTR;
-+
-+#define I2C_MAX_OFFSET_LEN	4
-+
-+/**
-+ * i2c_setup_offset() - Set up a new message with a chip offset
-+ *
-+ * @chip:	Chip to use
-+ * @offset:	Byte offset within chip
-+ * @offset_buf:	Place to put byte offset
-+ * @msg:	Message buffer
-+ * @return 0 if OK, -EADDRNOTAVAIL if the offset length is 0. In that case the
-+ * message is still set up but will not contain an offset.
-+ */
-+static int i2c_setup_offset(struct dm_i2c_chip *chip, uint offset,
-+			    uint8_t offset_buf[], struct i2c_msg *msg)
-+{
-+	int offset_len;
-+
-+	msg->addr = chip->chip_addr;
-+	msg->flags = chip->flags & DM_I2C_CHIP_10BIT ? I2C_M_TEN : 0;
-+	msg->len = chip->offset_len;
-+	msg->buf = offset_buf;
-+	if (!chip->offset_len)
-+		return -EADDRNOTAVAIL;
-+	assert(chip->offset_len <= I2C_MAX_OFFSET_LEN);
-+	offset_len = chip->offset_len;
-+	while (offset_len--)
-+		*offset_buf++ = offset >> (8 * offset_len);
-+
-+	return 0;
-+}
-+
-+static int i2c_read_bytewise(struct udevice *dev, uint offset,
-+			     uint8_t *buffer, int len)
-+{
-+	struct dm_i2c_chip *chip = dev_get_parentdata(dev);
-+	struct udevice *bus = dev_get_parent(dev);
-+	struct dm_i2c_ops *ops = i2c_get_ops(bus);
-+	struct i2c_msg msg[2], *ptr;
-+	uint8_t offset_buf[I2C_MAX_OFFSET_LEN];
-+	int ret;
-+	int i;
-+
-+	for (i = 0; i < len; i++) {
-+		if (i2c_setup_offset(chip, offset + i, offset_buf, msg))
-+			return -EINVAL;
-+		ptr = msg + 1;
-+		ptr->addr = chip->chip_addr;
-+		ptr->flags = msg->flags | I2C_M_RD;
-+		ptr->len = 1;
-+		ptr->buf = &buffer[i];
-+		ptr++;
-+
-+		ret = ops->xfer(bus, msg, ptr - msg);
-+		if (ret)
-+			return ret;
-+	}
-+
-+	return 0;
-+}
-+
-+static int i2c_write_bytewise(struct udevice *dev, uint offset,
-+			     const uint8_t *buffer, int len)
-+{
-+	struct dm_i2c_chip *chip = dev_get_parentdata(dev);
-+	struct udevice *bus = dev_get_parent(dev);
-+	struct dm_i2c_ops *ops = i2c_get_ops(bus);
-+	struct i2c_msg msg[1];
-+	uint8_t buf[I2C_MAX_OFFSET_LEN + 1];
-+	int ret;
-+	int i;
-+
-+	for (i = 0; i < len; i++) {
-+		if (i2c_setup_offset(chip, offset + i, buf, msg))
-+			return -EINVAL;
-+		buf[msg->len++] = buffer[i];
-+
-+		ret = ops->xfer(bus, msg, 1);
-+		if (ret)
-+			return ret;
-+	}
-+
-+	return 0;
-+}
-+
-+int i2c_read(struct udevice *dev, uint offset, uint8_t *buffer, int len)
-+{
-+	struct dm_i2c_chip *chip = dev_get_parentdata(dev);
-+	struct udevice *bus = dev_get_parent(dev);
-+	struct dm_i2c_ops *ops = i2c_get_ops(bus);
-+	struct i2c_msg msg[2], *ptr;
-+	uint8_t offset_buf[I2C_MAX_OFFSET_LEN];
-+	int msg_count;
-+
-+	if (!ops->xfer)
-+		return -ENOSYS;
-+	if (chip->flags & DM_I2C_CHIP_RD_ADDRESS)
-+		return i2c_read_bytewise(dev, offset, buffer, len);
-+	ptr = msg;
-+	if (!i2c_setup_offset(chip, offset, offset_buf, ptr))
-+		ptr++;
-+
-+	if (len) {
-+		ptr->addr = chip->chip_addr;
-+		ptr->flags = chip->flags & DM_I2C_CHIP_10BIT ? I2C_M_TEN : 0;
-+		ptr->flags |= I2C_M_RD;
-+		ptr->len = len;
-+		ptr->buf = buffer;
-+		ptr++;
-+	}
-+	msg_count = ptr - msg;
-+
-+	return ops->xfer(bus, msg, msg_count);
-+}
-+
-+int i2c_write(struct udevice *dev, uint offset, const uint8_t *buffer, int len)
-+{
-+	struct dm_i2c_chip *chip = dev_get_parentdata(dev);
-+	struct udevice *bus = dev_get_parent(dev);
-+	struct dm_i2c_ops *ops = i2c_get_ops(bus);
-+	struct i2c_msg msg[1];
-+
-+	if (!ops->xfer)
-+		return -ENOSYS;
-+
-+	if (chip->flags & DM_I2C_CHIP_WR_ADDRESS)
-+		return i2c_write_bytewise(dev, offset, buffer, len);
-+	/*
-+	 * The simple approach would be to send two messages here: one to
-+	 * set the offset and one to write the bytes. However some drivers
-+	 * will not be expecting this, and some chips won't like how the
-+	 * driver presents this on the I2C bus.
-+	 *
-+	 * The API does not support separate offset and data. We could extend
-+	 * it with a flag indicating that there is data in the next message
-+	 * that needs to be processed in the same transaction. We could
-+	 * instead add an additional buffer to each message. For now, handle
-+	 * this in the uclass since it isn't clear what the impact on drivers
-+	 * would be with this extra complication. Unfortunately this means
-+	 * copying the message.
-+	 *
-+	 * Use the stack for small messages, malloc() for larger ones. We
-+	 * need to allow space for the offset (up to 4 bytes) and the message
-+	 * itself.
-+	 */
-+	if (len < 64) {
-+		uint8_t buf[I2C_MAX_OFFSET_LEN + len];
-+
-+		i2c_setup_offset(chip, offset, buf, msg);
-+		msg->len += len;
-+		memcpy(buf + chip->offset_len, buffer, len);
-+
-+		return ops->xfer(bus, msg, 1);
-+	} else {
-+		uint8_t *buf;
-+		int ret;
-+
-+		buf = malloc(I2C_MAX_OFFSET_LEN + len);
-+		if (!buf)
-+			return -ENOMEM;
-+		i2c_setup_offset(chip, offset, buf, msg);
-+		msg->len += len;
-+		memcpy(buf + chip->offset_len, buffer, len);
-+
-+		ret = ops->xfer(bus, msg, 1);
-+		free(buf);
-+		return ret;
-+	}
-+}
-+
-+/**
-+ * i2c_probe_chip() - probe for a chip on a bus
-+ *
-+ * @bus:	Bus to probe
-+ * @chip_addr:	Chip address to probe
-+ * @flags:	Flags for the chip
-+ * @return 0 if found, -ENOSYS if the driver is invalid, -EREMOTEIO if the chip
-+ * does not respond to probe
-+ */
-+static int i2c_probe_chip(struct udevice *bus, uint chip_addr,
-+			  enum dm_i2c_chip_flags chip_flags)
-+{
-+	struct dm_i2c_ops *ops = i2c_get_ops(bus);
-+	struct i2c_msg msg[1];
-+	int ret;
-+
-+	if (ops->probe_chip) {
-+		ret = ops->probe_chip(bus, chip_addr, chip_flags);
-+		if (!ret || ret != -ENOSYS)
-+			return ret;
-+	}
-+
-+	if (!ops->xfer)
-+		return -ENOSYS;
-+
-+	/* Probe with a zero-length message */
-+	msg->addr = chip_addr;
-+	msg->flags = chip_flags & DM_I2C_CHIP_10BIT ? I2C_M_TEN : 0;
-+	msg->len = 0;
-+	msg->buf = NULL;
-+
-+	return ops->xfer(bus, msg, 1);
-+}
-+
-+static int i2c_bind_driver(struct udevice *bus, uint chip_addr,
-+			   struct udevice **devp)
-+{
-+	struct dm_i2c_chip chip;
-+	char name[30], *str;
-+	struct udevice *dev;
-+	int ret;
-+
-+	snprintf(name, sizeof(name), "generic_%x", chip_addr);
-+	str = strdup(name);
-+	ret = device_bind_driver(bus, "i2c_generic_chip_drv", str, &dev);
-+	debug("%s:  device_bind_driver: ret=%d\n", __func__, ret);
-+	if (ret)
-+		goto err_bind;
-+
-+	/* Tell the device what we know about it */
-+	memset(&chip, '\0', sizeof(chip));
-+	chip.chip_addr = chip_addr;
-+	chip.offset_len = 1;	/* we assume */
-+	ret = device_probe_child(dev, &chip);
-+	debug("%s:  device_probe_child: ret=%d\n", __func__, ret);
-+	if (ret)
-+		goto err_probe;
-+
-+	*devp = dev;
-+	return 0;
-+
-+err_probe:
-+	device_unbind(dev);
-+err_bind:
-+	free(str);
-+	return ret;
-+}
-+
-+int i2c_get_chip(struct udevice *bus, uint chip_addr, struct udevice **devp)
-+{
-+	struct udevice *dev;
-+
-+	debug("%s: Searching bus '%s' for address %02x: ", __func__,
-+	      bus->name, chip_addr);
-+	for (device_find_first_child(bus, &dev); dev;
-+			device_find_next_child(&dev)) {
-+		struct dm_i2c_chip store;
-+		struct dm_i2c_chip *chip = dev_get_parentdata(dev);
-+		int ret;
-+
-+		if (!chip) {
-+			chip = &store;
-+			i2c_chip_ofdata_to_platdata(gd->fdt_blob,
-+						    dev->of_offset, chip);
-+		}
-+		if (chip->chip_addr == chip_addr) {
-+			ret = device_probe(dev);
-+			debug("found, ret=%d\n", ret);
-+			if (ret)
-+				return ret;
-+			*devp = dev;
-+			return 0;
-+		}
-+	}
-+	debug("not found\n");
-+	return i2c_bind_driver(bus, chip_addr, devp);
-+}
-+
-+int i2c_get_chip_for_busnum(int busnum, int chip_addr, struct udevice **devp)
-+{
-+	struct udevice *bus;
-+	int ret;
-+
-+	ret = uclass_get_device_by_seq(UCLASS_I2C, busnum, &bus);
-+	if (ret) {
-+		debug("Cannot find I2C bus %d\n", busnum);
-+		return ret;
-+	}
-+	ret = i2c_get_chip(bus, chip_addr, devp);
-+	if (ret) {
-+		debug("Cannot find I2C chip %02x on bus %d\n", chip_addr,
-+		      busnum);
-+		return ret;
-+	}
-+
-+	return 0;
-+}
-+
-+int i2c_probe(struct udevice *bus, uint chip_addr, uint chip_flags,
-+	      struct udevice **devp)
-+{
-+	int ret;
-+
-+	*devp = NULL;
-+
-+	/* First probe that chip */
-+	ret = i2c_probe_chip(bus, chip_addr, chip_flags);
-+	debug("%s: bus='%s', address %02x, ret=%d\n", __func__, bus->name,
-+	      chip_addr, ret);
-+	if (ret)
-+		return ret;
-+
-+	/* The chip was found, see if we have a driver, and probe it */
-+	ret = i2c_get_chip(bus, chip_addr, devp);
-+	debug("%s:  i2c_get_chip: ret=%d\n", __func__, ret);
-+
-+	return ret;
-+}
-+
-+int i2c_set_bus_speed(struct udevice *bus, unsigned int speed)
-+{
-+	struct dm_i2c_ops *ops = i2c_get_ops(bus);
-+	struct dm_i2c_bus *i2c = bus->uclass_priv;
-+	int ret;
-+
-+	/*
-+	 * If we have a method, call it. If not then the driver probably wants
-+	 * to deal with speed changes on the next transfer. It can easily read
-+	 * the current speed from this uclass
-+	 */
-+	if (ops->set_bus_speed) {
-+		ret = ops->set_bus_speed(bus, speed);
-+		if (ret)
-+			return ret;
-+	}
-+	i2c->speed_hz = speed;
-+
-+	return 0;
-+}
-+
-+/*
-+ * i2c_get_bus_speed:
-+ *
-+ *  Returns speed of selected I2C bus in Hz
-+ */
-+int i2c_get_bus_speed(struct udevice *bus)
-+{
-+	struct dm_i2c_ops *ops = i2c_get_ops(bus);
-+	struct dm_i2c_bus *i2c = bus->uclass_priv;
-+
-+	if (!ops->get_bus_speed)
-+		return i2c->speed_hz;
-+
-+	return ops->get_bus_speed(bus);
-+}
-+
-+int i2c_set_chip_flags(struct udevice *dev, uint flags)
-+{
-+	struct udevice *bus = dev->parent;
-+	struct dm_i2c_chip *chip = dev_get_parentdata(dev);
-+	struct dm_i2c_ops *ops = i2c_get_ops(bus);
-+	int ret;
-+
-+	if (ops->set_flags) {
-+		ret = ops->set_flags(dev, flags);
-+		if (ret)
-+			return ret;
-+	}
-+	chip->flags = flags;
-+
-+	return 0;
-+}
-+
-+int i2c_get_chip_flags(struct udevice *dev, uint *flagsp)
-+{
-+	struct dm_i2c_chip *chip = dev_get_parentdata(dev);
-+
-+	*flagsp = chip->flags;
-+
-+	return 0;
-+}
-+
-+int i2c_set_chip_offset_len(struct udevice *dev, uint offset_len)
-+{
-+	struct dm_i2c_chip *chip = dev_get_parentdata(dev);
-+
-+	if (offset_len > I2C_MAX_OFFSET_LEN)
-+		return -EINVAL;
-+	chip->offset_len = offset_len;
-+
-+	return 0;
-+}
-+
-+int i2c_deblock(struct udevice *bus)
-+{
-+	struct dm_i2c_ops *ops = i2c_get_ops(bus);
-+
-+	/*
-+	 * We could implement a software deblocking here if we could get
-+	 * access to the GPIOs used by I2C, and switch them to GPIO mode
-+	 * and then back to I2C. This is somewhat beyond our powers in
-+	 * driver model at present, so for now just fail.
-+	 *
-+	 * See https://patchwork.ozlabs.org/patch/399040/
-+	 */
-+	if (!ops->deblock)
-+		return -ENOSYS;
-+
-+	return ops->deblock(bus);
-+}
-+
-+int i2c_chip_ofdata_to_platdata(const void *blob, int node,
-+				struct dm_i2c_chip *chip)
-+{
-+	chip->offset_len = 1;	/* default */
-+	chip->flags = 0;
-+	chip->chip_addr = fdtdec_get_int(gd->fdt_blob, node, "reg", -1);
-+	if (chip->chip_addr == -1) {
-+		debug("%s: I2C Node '%s' has no 'reg' property\n", __func__,
-+		      fdt_get_name(blob, node, NULL));
-+		return -EINVAL;
-+	}
-+
-+	return 0;
-+}
-+
-+static int i2c_post_probe(struct udevice *dev)
-+{
-+	struct dm_i2c_bus *i2c = dev->uclass_priv;
-+
-+	i2c->speed_hz = fdtdec_get_int(gd->fdt_blob, dev->of_offset,
-+				     "clock-frequency", 100000);
-+
-+	return i2c_set_bus_speed(dev, i2c->speed_hz);
-+}
-+
-+int i2c_post_bind(struct udevice *dev)
-+{
-+	/* Scan the bus for devices */
-+	return dm_scan_fdt_node(dev, gd->fdt_blob, dev->of_offset, false);
-+}
-+
-+UCLASS_DRIVER(i2c) = {
-+	.id		= UCLASS_I2C,
-+	.name		= "i2c",
-+	.per_device_auto_alloc_size = sizeof(struct dm_i2c_bus),
-+	.post_bind	= i2c_post_bind,
-+	.post_probe	= i2c_post_probe,
-+};
-+
-+UCLASS_DRIVER(i2c_generic) = {
-+	.id		= UCLASS_I2C_GENERIC,
-+	.name		= "i2c_generic",
-+};
-+
-+U_BOOT_DRIVER(i2c_generic_chip_drv) = {
-+	.name		= "i2c_generic_chip_drv",
-+	.id		= UCLASS_I2C_GENERIC,
-+};
-diff -ruN u-boot-2015.01-rc3/drivers/i2c/Makefile u-boot/drivers/i2c/Makefile
---- u-boot-2015.01-rc3/drivers/i2c/Makefile	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/i2c/Makefile	2015-01-01 17:34:32.641496891 +0100
-@@ -4,6 +4,7 @@
- #
- # SPDX-License-Identifier:	GPL-2.0+
- #
-+obj-$(CONFIG_DM_I2C) += i2c-uclass.o
- 
- obj-$(CONFIG_SYS_I2C_ADI) += adi_i2c.o
- obj-$(CONFIG_I2C_MV) += mv_i2c.o
-@@ -26,6 +27,7 @@
- obj-$(CONFIG_SYS_I2C_PPC4XX) += ppc4xx_i2c.o
- obj-$(CONFIG_SYS_I2C_RCAR) += rcar_i2c.o
- obj-$(CONFIG_SYS_I2C_S3C24X0) += s3c24x0_i2c.o
-+obj-$(CONFIG_SYS_I2C_SANDBOX) += sandbox_i2c.o i2c-emul-uclass.o
- obj-$(CONFIG_SYS_I2C_SH) += sh_i2c.o
- obj-$(CONFIG_SYS_I2C_SOFT) += soft_i2c.o
- obj-$(CONFIG_SYS_I2C_TEGRA) += tegra_i2c.o
-diff -ruN u-boot-2015.01-rc3/drivers/i2c/sandbox_i2c.c u-boot/drivers/i2c/sandbox_i2c.c
---- u-boot-2015.01-rc3/drivers/i2c/sandbox_i2c.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/drivers/i2c/sandbox_i2c.c	2015-01-01 17:34:32.649496760 +0100
-@@ -0,0 +1,111 @@
-+/*
-+ * Simulate an I2C port
-+ *
-+ * Copyright (c) 2014 Google, Inc
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <dm.h>
-+#include <errno.h>
-+#include <fdtdec.h>
-+#include <i2c.h>
-+#include <asm/test.h>
-+#include <dm/lists.h>
-+#include <dm/device-internal.h>
-+#include <dm/root.h>
-+
-+DECLARE_GLOBAL_DATA_PTR;
-+
-+struct dm_sandbox_i2c_emul_priv {
-+	struct udevice *emul;
-+};
-+
-+static int get_emul(struct udevice *dev, struct udevice **devp,
-+		    struct dm_i2c_ops **opsp)
-+{
-+	struct dm_i2c_chip *priv;
-+	int ret;
-+
-+	*devp = NULL;
-+	*opsp = NULL;
-+	priv = dev_get_parentdata(dev);
-+	if (!priv->emul) {
-+		ret = dm_scan_fdt_node(dev, gd->fdt_blob, dev->of_offset,
-+				       false);
-+		if (ret)
-+			return ret;
-+
-+		ret = device_get_child(dev, 0, &priv->emul);
-+		if (ret)
-+			return ret;
-+	}
-+	*devp = priv->emul;
-+	*opsp = i2c_get_ops(priv->emul);
-+
-+	return 0;
-+}
-+
-+static int sandbox_i2c_xfer(struct udevice *bus, struct i2c_msg *msg,
-+			    int nmsgs)
-+{
-+	struct dm_i2c_bus *i2c = bus->uclass_priv;
-+	struct dm_i2c_ops *ops;
-+	struct udevice *emul, *dev;
-+	bool is_read;
-+	int ret;
-+
-+	/* Special test code to return success but with no emulation */
-+	if (msg->addr == SANDBOX_I2C_TEST_ADDR)
-+		return 0;
-+
-+	ret = i2c_get_chip(bus, msg->addr, &dev);
-+	if (ret)
-+		return ret;
-+
-+	ret = get_emul(dev, &emul, &ops);
-+	if (ret)
-+		return ret;
-+
-+	/*
-+	 * For testing, don't allow writing above 100KHz for writes and
-+	 * 400KHz for reads
-+	 */
-+	is_read = nmsgs > 1;
-+	if (i2c->speed_hz > (is_read ? 400000 : 100000))
-+		return -EINVAL;
-+	return ops->xfer(emul, msg, nmsgs);
-+}
-+
-+static const struct dm_i2c_ops sandbox_i2c_ops = {
-+	.xfer		= sandbox_i2c_xfer,
-+};
-+
-+static int sandbox_i2c_child_pre_probe(struct udevice *dev)
-+{
-+	struct dm_i2c_chip *i2c_chip = dev_get_parentdata(dev);
-+
-+	/* Ignore our test address */
-+	if (i2c_chip->chip_addr == SANDBOX_I2C_TEST_ADDR)
-+		return 0;
-+	if (dev->of_offset == -1)
-+		return 0;
-+
-+	return i2c_chip_ofdata_to_platdata(gd->fdt_blob, dev->of_offset,
-+					   i2c_chip);
-+}
-+
-+static const struct udevice_id sandbox_i2c_ids[] = {
-+	{ .compatible = "sandbox,i2c" },
-+	{ }
-+};
-+
-+U_BOOT_DRIVER(i2c_sandbox) = {
-+	.name	= "i2c_sandbox",
-+	.id	= UCLASS_I2C,
-+	.of_match = sandbox_i2c_ids,
-+	.per_child_auto_alloc_size = sizeof(struct dm_i2c_chip),
-+	.child_pre_probe = sandbox_i2c_child_pre_probe,
-+	.ops	= &sandbox_i2c_ops,
-+};
-diff -ruN u-boot-2015.01-rc3/drivers/i2c/tegra_i2c.c u-boot/drivers/i2c/tegra_i2c.c
---- u-boot-2015.01-rc3/drivers/i2c/tegra_i2c.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/i2c/tegra_i2c.c	2015-01-01 17:34:32.649496760 +0100
-@@ -7,6 +7,8 @@
-  */
- 
- #include <common.h>
-+#include <dm.h>
-+#include <errno.h>
- #include <fdtdec.h>
- #include <i2c.h>
- #include <asm/io.h>
-@@ -19,6 +21,12 @@
- 
- DECLARE_GLOBAL_DATA_PTR;
- 
-+enum i2c_type {
-+	TYPE_114,
-+	TYPE_STD,
-+	TYPE_DVC,
-+};
-+
- /* Information about i2c controller */
- struct i2c_bus {
- 	int			id;
-@@ -27,20 +35,17 @@
- 	int			pinmux_config;
- 	struct i2c_control	*control;
- 	struct i2c_ctlr		*regs;
--	int			is_dvc;	/* DVC type, rather than I2C */
--	int			is_scs;	/* single clock source (T114+) */
-+	enum i2c_type		type;
- 	int			inited;	/* bus is inited */
- };
- 
--static struct i2c_bus i2c_controllers[TEGRA_I2C_NUM_CONTROLLERS];
--
- static void set_packet_mode(struct i2c_bus *i2c_bus)
- {
- 	u32 config;
- 
- 	config = I2C_CNFG_NEW_MASTER_FSM_MASK | I2C_CNFG_PACKET_MODE_MASK;
- 
--	if (i2c_bus->is_dvc) {
-+	if (i2c_bus->type == TYPE_DVC) {
- 		struct dvc_ctlr *dvc = (struct dvc_ctlr *)i2c_bus->regs;
- 
- 		writel(config, &dvc->cnfg);
-@@ -65,6 +70,9 @@
- 
- static void i2c_init_controller(struct i2c_bus *i2c_bus)
- {
-+	if (!i2c_bus->speed)
-+		return;
-+	debug("%s: speed=%d\n", __func__, i2c_bus->speed);
- 	/*
- 	 * Use PLLP - DP-04508-001_v06 datasheet indicates a divisor of 8
- 	 * here, in section 23.3.1, but in fact we seem to need a factor of
-@@ -73,7 +81,7 @@
- 	clock_start_periph_pll(i2c_bus->periph_id, CLOCK_ID_PERIPH,
- 		i2c_bus->speed * 2 * 8);
- 
--	if (i2c_bus->is_scs) {
-+	if (i2c_bus->type == TYPE_114) {
- 		/*
- 		 * T114 I2C went to a single clock source for standard/fast and
- 		 * HS clock speeds. The new clock rate setting calculation is:
-@@ -98,7 +106,7 @@
- 	i2c_reset_controller(i2c_bus);
- 
- 	/* Configure I2C controller. */
--	if (i2c_bus->is_dvc) {	/* only for DVC I2C */
-+	if (i2c_bus->type == TYPE_DVC) {	/* only for DVC I2C */
- 		struct dvc_ctlr *dvc = (struct dvc_ctlr *)i2c_bus->regs;
- 
- 		setbits_le32(&dvc->ctrl3, DVC_CTRL_REG3_I2C_HW_SW_PROG_MASK);
-@@ -272,7 +280,7 @@
- 	return error;
- }
- 
--static int tegra_i2c_write_data(struct i2c_bus *bus, u32 addr, u8 *data,
-+static int tegra_i2c_write_data(struct i2c_bus *i2c_bus, u32 addr, u8 *data,
- 				u32 len, bool end_with_repeated_start)
- {
- 	int error;
-@@ -286,14 +294,14 @@
- 	trans_info.num_bytes = len;
- 	trans_info.is_10bit_address = 0;
- 
--	error = send_recv_packets(bus, &trans_info);
-+	error = send_recv_packets(i2c_bus, &trans_info);
- 	if (error)
- 		debug("tegra_i2c_write_data: Error (%d) !!!\n", error);
- 
- 	return error;
- }
- 
--static int tegra_i2c_read_data(struct i2c_bus *bus, u32 addr, u8 *data,
-+static int tegra_i2c_read_data(struct i2c_bus *i2c_bus, u32 addr, u8 *data,
- 			       u32 len)
- {
- 	int error;
-@@ -305,52 +313,32 @@
- 	trans_info.num_bytes = len;
- 	trans_info.is_10bit_address = 0;
- 
--	error = send_recv_packets(bus, &trans_info);
-+	error = send_recv_packets(i2c_bus, &trans_info);
- 	if (error)
- 		debug("tegra_i2c_read_data: Error (%d) !!!\n", error);
- 
- 	return error;
- }
- 
--#ifndef CONFIG_OF_CONTROL
--#error "Please enable device tree support to use this driver"
--#endif
--
--/**
-- * Check that a bus number is valid and return a pointer to it
-- *
-- * @param bus_num	Bus number to check / return
-- * @return pointer to bus, if valid, else NULL
-- */
--static struct i2c_bus *tegra_i2c_get_bus(struct i2c_adapter *adap)
-+static int tegra_i2c_set_bus_speed(struct udevice *dev, unsigned int speed)
- {
--	struct i2c_bus *bus;
-+	struct i2c_bus *i2c_bus = dev_get_priv(dev);
- 
--	bus = &i2c_controllers[adap->hwadapnr];
--	if (!bus->inited) {
--		debug("%s: Bus %u not available\n", __func__, adap->hwadapnr);
--		return NULL;
--	}
--
--	return bus;
--}
--
--static unsigned int tegra_i2c_set_bus_speed(struct i2c_adapter *adap,
--			unsigned int speed)
--{
--	struct i2c_bus *bus;
--
--	bus = tegra_i2c_get_bus(adap);
--	if (!bus)
--		return 0;
--	bus->speed = speed;
--	i2c_init_controller(bus);
-+	i2c_bus->speed = speed;
-+	i2c_init_controller(i2c_bus);
- 
- 	return 0;
- }
- 
--static int i2c_get_config(const void *blob, int node, struct i2c_bus *i2c_bus)
-+static int tegra_i2c_probe(struct udevice *dev)
- {
-+	struct i2c_bus *i2c_bus = dev_get_priv(dev);
-+	const void *blob = gd->fdt_blob;
-+	int node = dev->of_offset;
-+	bool is_dvc;
-+
-+	i2c_bus->id = dev->seq;
-+	i2c_bus->type = dev_get_of_data(dev);
- 	i2c_bus->regs = (struct i2c_ctlr *)fdtdec_get_addr(blob, node, "reg");
- 
- 	/*
-@@ -358,7 +346,6 @@
- 	 * far no one needs anything other than the default.
- 	 */
- 	i2c_bus->pinmux_config = FUNCMUX_DEFAULT;
--	i2c_bus->speed = fdtdec_get_int(blob, node, "clock-frequency", 0);
- 	i2c_bus->periph_id = clock_decode_periph_id(blob, node);
- 
- 	/*
-@@ -371,107 +358,25 @@
- 	 *		i2c_bus->pinmux_config = FUNCMUX_I2C2_PTA;
- 	 */
- 	if (i2c_bus->periph_id == -1)
--		return -FDT_ERR_NOTFOUND;
-+		return -EINVAL;
- 
--	return 0;
--}
--
--/*
-- * Process a list of nodes, adding them to our list of I2C ports.
-- *
-- * @param blob		fdt blob
-- * @param node_list	list of nodes to process (any <=0 are ignored)
-- * @param count		number of nodes to process
-- * @param is_dvc	1 if these are DVC ports, 0 if standard I2C
-- * @param is_scs	1 if this HW uses a single clock source (T114+)
-- * @return 0 if ok, -1 on error
-- */
--static int process_nodes(const void *blob, int node_list[], int count,
--			 int is_dvc, int is_scs)
--{
--	struct i2c_bus *i2c_bus;
--	int i;
--
--	/* build the i2c_controllers[] for each controller */
--	for (i = 0; i < count; i++) {
--		int node = node_list[i];
--
--		if (node <= 0)
--			continue;
--
--		i2c_bus = &i2c_controllers[i];
--		i2c_bus->id = i;
--
--		if (i2c_get_config(blob, node, i2c_bus)) {
--			printf("i2c_init_board: failed to decode bus %d\n", i);
--			return -1;
--		}
--
--		i2c_bus->is_scs = is_scs;
--
--		i2c_bus->is_dvc = is_dvc;
--		if (is_dvc) {
--			i2c_bus->control =
--				&((struct dvc_ctlr *)i2c_bus->regs)->control;
--		} else {
--			i2c_bus->control = &i2c_bus->regs->control;
--		}
--		debug("%s: controller bus %d at %p, periph_id %d, speed %d: ",
--		      is_dvc ? "dvc" : "i2c", i, i2c_bus->regs,
--		      i2c_bus->periph_id, i2c_bus->speed);
--		i2c_init_controller(i2c_bus);
--		debug("ok\n");
--		i2c_bus->inited = 1;
--
--		/* Mark position as used */
--		node_list[i] = -1;
-+	is_dvc = dev_get_of_data(dev) == TYPE_DVC;
-+	if (is_dvc) {
-+		i2c_bus->control =
-+			&((struct dvc_ctlr *)i2c_bus->regs)->control;
-+	} else {
-+		i2c_bus->control = &i2c_bus->regs->control;
- 	}
-+	i2c_init_controller(i2c_bus);
-+	debug("%s: controller bus %d at %p, periph_id %d, speed %d: ",
-+	      is_dvc ? "dvc" : "i2c", dev->seq, i2c_bus->regs,
-+	      i2c_bus->periph_id, i2c_bus->speed);
- 
- 	return 0;
- }
- 
--/* Sadly there is no error return from this function */
--void i2c_init_board(void)
--{
--	int node_list[TEGRA_I2C_NUM_CONTROLLERS];
--	const void *blob = gd->fdt_blob;
--	int count;
--
--	/* First check for newer (T114+) I2C ports */
--	count = fdtdec_find_aliases_for_id(blob, "i2c",
--			COMPAT_NVIDIA_TEGRA114_I2C, node_list,
--			TEGRA_I2C_NUM_CONTROLLERS);
--	if (process_nodes(blob, node_list, count, 0, 1))
--		return;
--
--	/* Now get the older (T20/T30) normal I2C ports */
--	count = fdtdec_find_aliases_for_id(blob, "i2c",
--			COMPAT_NVIDIA_TEGRA20_I2C, node_list,
--			TEGRA_I2C_NUM_CONTROLLERS);
--	if (process_nodes(blob, node_list, count, 0, 0))
--		return;
--
--	/* Now look for dvc ports */
--	count = fdtdec_add_aliases_for_id(blob, "i2c",
--			COMPAT_NVIDIA_TEGRA20_DVC, node_list,
--			TEGRA_I2C_NUM_CONTROLLERS);
--	if (process_nodes(blob, node_list, count, 1, 0))
--		return;
--}
--
--static void tegra_i2c_init(struct i2c_adapter *adap, int speed, int slaveaddr)
--{
--	/* No i2c support prior to relocation */
--	if (!(gd->flags & GD_FLG_RELOC))
--		return;
--
--	/* This will override the speed selected in the fdt for that port */
--	debug("i2c_init(speed=%u, slaveaddr=0x%x)\n", speed, slaveaddr);
--	i2c_set_bus_speed(speed);
--}
--
- /* i2c write version without the register address */
--static int i2c_write_data(struct i2c_bus *bus, uchar chip, uchar *buffer,
-+static int i2c_write_data(struct i2c_bus *i2c_bus, uchar chip, uchar *buffer,
- 			  int len, bool end_with_repeated_start)
- {
- 	int rc;
-@@ -484,7 +389,7 @@
- 	debug("\n");
- 
- 	/* Shift 7-bit address over for lower-level i2c functions */
--	rc = tegra_i2c_write_data(bus, chip << 1, buffer, len,
-+	rc = tegra_i2c_write_data(i2c_bus, chip << 1, buffer, len,
- 				  end_with_repeated_start);
- 	if (rc)
- 		debug("i2c_write_data(): rc=%d\n", rc);
-@@ -493,14 +398,14 @@
- }
- 
- /* i2c read version without the register address */
--static int i2c_read_data(struct i2c_bus *bus, uchar chip, uchar *buffer,
--				int len)
-+static int i2c_read_data(struct i2c_bus *i2c_bus, uchar chip, uchar *buffer,
-+			 int len)
- {
- 	int rc;
- 
- 	debug("inside i2c_read_data():\n");
- 	/* Shift 7-bit address over for lower-level i2c functions */
--	rc = tegra_i2c_read_data(bus, chip << 1, buffer, len);
-+	rc = tegra_i2c_read_data(i2c_bus, chip << 1, buffer, len);
- 	if (rc) {
- 		debug("i2c_read_data(): rc=%d\n", rc);
- 		return rc;
-@@ -516,132 +421,99 @@
- }
- 
- /* Probe to see if a chip is present. */
--static int tegra_i2c_probe(struct i2c_adapter *adap, uchar chip)
-+static int tegra_i2c_probe_chip(struct udevice *bus, uint chip_addr,
-+				uint chip_flags)
- {
--	struct i2c_bus *bus;
-+	struct i2c_bus *i2c_bus = dev_get_priv(bus);
- 	int rc;
--	uchar reg;
-+	u8 reg;
- 
--	debug("i2c_probe: addr=0x%x\n", chip);
--	bus = tegra_i2c_get_bus(adap);
--	if (!bus)
--		return 1;
--	reg = 0;
--	rc = i2c_write_data(bus, chip, &reg, 1, false);
--	if (rc) {
--		debug("Error probing 0x%x.\n", chip);
--		return 1;
--	}
--	return 0;
-+	/* Shift 7-bit address over for lower-level i2c functions */
-+	rc = tegra_i2c_write_data(i2c_bus, chip_addr << 1, &reg, sizeof(reg),
-+				  false);
-+
-+	return rc;
- }
- 
--static int i2c_addr_ok(const uint addr, const int alen)
-+static int tegra_i2c_xfer(struct udevice *bus, struct i2c_msg *msg,
-+			  int nmsgs)
- {
--	/* We support 7 or 10 bit addresses, so one or two bytes each */
--	return alen == 1 || alen == 2;
--}
-+	struct i2c_bus *i2c_bus = dev_get_priv(bus);
-+	int ret;
- 
--/* Read bytes */
--static int tegra_i2c_read(struct i2c_adapter *adap, uchar chip, uint addr,
--			int alen, uchar *buffer, int len)
--{
--	struct i2c_bus *bus;
--	uint offset;
--	int i;
--
--	debug("i2c_read: chip=0x%x, addr=0x%x, alen=0x%x len=0x%x\n",
--	      chip, addr, alen, len);
--	bus = tegra_i2c_get_bus(adap);
--	if (!bus)
--		return 1;
--	if (!i2c_addr_ok(addr, alen)) {
--		debug("i2c_read: Bad address %x.%d.\n", addr, alen);
--		return 1;
--	}
--	for (offset = 0; offset < len; offset++) {
--		if (alen) {
--			uchar data[alen];
--			for (i = 0; i < alen; i++) {
--				data[alen - i - 1] =
--					(addr + offset) >> (8 * i);
--			}
--			if (i2c_write_data(bus, chip, data, alen, true)) {
--				debug("i2c_read: error sending (0x%x)\n",
--					addr);
--				return 1;
--			}
-+	debug("i2c_xfer: %d messages\n", nmsgs);
-+	for (; nmsgs > 0; nmsgs--, msg++) {
-+		bool next_is_read = nmsgs > 1 && (msg[1].flags & I2C_M_RD);
-+
-+		debug("i2c_xfer: chip=0x%x, len=0x%x\n", msg->addr, msg->len);
-+		if (msg->flags & I2C_M_RD) {
-+			ret = i2c_read_data(i2c_bus, msg->addr, msg->buf,
-+					    msg->len);
-+		} else {
-+			ret = i2c_write_data(i2c_bus, msg->addr, msg->buf,
-+					     msg->len, next_is_read);
- 		}
--		if (i2c_read_data(bus, chip, buffer + offset, 1)) {
--			debug("i2c_read: error reading (0x%x)\n", addr);
--			return 1;
-+		if (ret) {
-+			debug("i2c_write: error sending\n");
-+			return -EREMOTEIO;
- 		}
- 	}
- 
- 	return 0;
- }
- 
--/* Write bytes */
--static int tegra_i2c_write(struct i2c_adapter *adap, uchar chip, uint addr,
--			int alen, uchar *buffer, int len)
--{
--	struct i2c_bus *bus;
--	uint offset;
--	int i;
--
--	debug("i2c_write: chip=0x%x, addr=0x%x, alen=0x%x len=0x%x\n",
--	      chip, addr, alen, len);
--	bus = tegra_i2c_get_bus(adap);
--	if (!bus)
--		return 1;
--	if (!i2c_addr_ok(addr, alen)) {
--		debug("i2c_write: Bad address %x.%d.\n", addr, alen);
--		return 1;
--	}
--	for (offset = 0; offset < len; offset++) {
--		uchar data[alen + 1];
--		for (i = 0; i < alen; i++)
--			data[alen - i - 1] = (addr + offset) >> (8 * i);
--		data[alen] = buffer[offset];
--		if (i2c_write_data(bus, chip, data, alen + 1, false)) {
--			debug("i2c_write: error sending (0x%x)\n", addr);
--			return 1;
-+int tegra_i2c_get_dvc_bus(struct udevice **busp)
-+{
-+	struct udevice *bus;
-+
-+	for (uclass_first_device(UCLASS_I2C, &bus);
-+	     bus;
-+	     uclass_next_device(&bus)) {
-+		if (dev_get_of_data(bus) == TYPE_DVC) {
-+			*busp = bus;
-+			return 0;
- 		}
- 	}
- 
--	return 0;
-+	return -ENODEV;
- }
- 
--int tegra_i2c_get_dvc_bus_num(void)
--{
--	int i;
-+static const struct dm_i2c_ops tegra_i2c_ops = {
-+	.xfer		= tegra_i2c_xfer,
-+	.probe_chip	= tegra_i2c_probe_chip,
-+	.set_bus_speed	= tegra_i2c_set_bus_speed,
-+};
- 
--	for (i = 0; i < TEGRA_I2C_NUM_CONTROLLERS; i++) {
--		struct i2c_bus *bus = &i2c_controllers[i];
-+static int tegra_i2c_child_pre_probe(struct udevice *dev)
-+{
-+	struct dm_i2c_chip *i2c_chip = dev_get_parentdata(dev);
- 
--		if (bus->inited && bus->is_dvc)
--			return i;
--	}
-+	if (dev->of_offset == -1)
-+		return 0;
-+	return i2c_chip_ofdata_to_platdata(gd->fdt_blob, dev->of_offset,
-+					   i2c_chip);
-+}
- 
--	return -1;
-+static int tegra_i2c_ofdata_to_platdata(struct udevice *dev)
-+{
-+	return 0;
- }
- 
--/*
-- * Register soft i2c adapters
-- */
--U_BOOT_I2C_ADAP_COMPLETE(tegra0, tegra_i2c_init, tegra_i2c_probe,
--			 tegra_i2c_read, tegra_i2c_write,
--			 tegra_i2c_set_bus_speed, 100000, 0, 0)
--U_BOOT_I2C_ADAP_COMPLETE(tegra1, tegra_i2c_init, tegra_i2c_probe,
--			 tegra_i2c_read, tegra_i2c_write,
--			 tegra_i2c_set_bus_speed, 100000, 0, 1)
--U_BOOT_I2C_ADAP_COMPLETE(tegra2, tegra_i2c_init, tegra_i2c_probe,
--			 tegra_i2c_read, tegra_i2c_write,
--			 tegra_i2c_set_bus_speed, 100000, 0, 2)
--U_BOOT_I2C_ADAP_COMPLETE(tegra3, tegra_i2c_init, tegra_i2c_probe,
--			 tegra_i2c_read, tegra_i2c_write,
--			 tegra_i2c_set_bus_speed, 100000, 0, 3)
--#if TEGRA_I2C_NUM_CONTROLLERS > 4
--U_BOOT_I2C_ADAP_COMPLETE(tegra4, tegra_i2c_init, tegra_i2c_probe,
--			 tegra_i2c_read, tegra_i2c_write,
--			 tegra_i2c_set_bus_speed, 100000, 0, 4)
--#endif
-+static const struct udevice_id tegra_i2c_ids[] = {
-+	{ .compatible = "nvidia,tegra114-i2c", .data = TYPE_114 },
-+	{ .compatible = "nvidia,tegra20-i2c", .data = TYPE_STD },
-+	{ .compatible = "nvidia,tegra20-i2c-dvc", .data = TYPE_DVC },
-+	{ }
-+};
-+
-+U_BOOT_DRIVER(i2c_tegra) = {
-+	.name	= "i2c_tegra",
-+	.id	= UCLASS_I2C,
-+	.of_match = tegra_i2c_ids,
-+	.ofdata_to_platdata = tegra_i2c_ofdata_to_platdata,
-+	.probe	= tegra_i2c_probe,
-+	.per_child_auto_alloc_size = sizeof(struct dm_i2c_chip),
-+	.child_pre_probe = tegra_i2c_child_pre_probe,
-+	.priv_auto_alloc_size = sizeof(struct i2c_bus),
-+	.ops	= &tegra_i2c_ops,
-+};
-diff -ruN u-boot-2015.01-rc3/drivers/misc/i2c_eeprom.c u-boot/drivers/misc/i2c_eeprom.c
---- u-boot-2015.01-rc3/drivers/misc/i2c_eeprom.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/drivers/misc/i2c_eeprom.c	2015-01-01 17:34:32.649496760 +0100
-@@ -0,0 +1,51 @@
-+/*
-+ * Copyright (c) 2014 Google, Inc
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <dm.h>
-+#include <i2c.h>
-+#include <i2c_eeprom.h>
-+
-+static int i2c_eeprom_read(struct udevice *dev, int offset, uint8_t *buf,
-+			   int size)
-+{
-+	return -ENODEV;
-+}
-+
-+static int i2c_eeprom_write(struct udevice *dev, int offset,
-+			    const uint8_t *buf, int size)
-+{
-+	return -ENODEV;
-+}
-+
-+struct i2c_eeprom_ops i2c_eeprom_std_ops = {
-+	.read	= i2c_eeprom_read,
-+	.write	= i2c_eeprom_write,
-+};
-+
-+int i2c_eeprom_std_probe(struct udevice *dev)
-+{
-+	return 0;
-+}
-+
-+static const struct udevice_id i2c_eeprom_std_ids[] = {
-+	{ .compatible = "i2c-eeprom" },
-+	{ }
-+};
-+
-+U_BOOT_DRIVER(i2c_eeprom_std) = {
-+	.name		= "i2c_eeprom",
-+	.id		= UCLASS_I2C_EEPROM,
-+	.of_match	= i2c_eeprom_std_ids,
-+	.probe		= i2c_eeprom_std_probe,
-+	.priv_auto_alloc_size = sizeof(struct i2c_eeprom),
-+	.ops		= &i2c_eeprom_std_ops,
-+};
-+
-+UCLASS_DRIVER(i2c_eeprom) = {
-+	.id		= UCLASS_I2C_EEPROM,
-+	.name		= "i2c_eeprom",
-+};
-diff -ruN u-boot-2015.01-rc3/drivers/misc/i2c_eeprom_emul.c u-boot/drivers/misc/i2c_eeprom_emul.c
---- u-boot-2015.01-rc3/drivers/misc/i2c_eeprom_emul.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/drivers/misc/i2c_eeprom_emul.c	2015-01-01 17:34:32.649496760 +0100
-@@ -0,0 +1,168 @@
-+/*
-+ * Simulate an I2C eeprom
-+ *
-+ * Copyright (c) 2014 Google, Inc
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <dm.h>
-+#include <fdtdec.h>
-+#include <i2c.h>
-+#include <malloc.h>
-+#include <asm/test.h>
-+
-+#ifdef DEBUG
-+#define debug_buffer print_buffer
-+#else
-+#define debug_buffer(x, ...)
-+#endif
-+
-+DECLARE_GLOBAL_DATA_PTR;
-+
-+struct sandbox_i2c_flash_plat_data {
-+	enum sandbox_i2c_eeprom_test_mode test_mode;
-+	const char *filename;
-+	int offset_len;		/* Length of an offset in bytes */
-+	int size;		/* Size of data buffer */
-+};
-+
-+struct sandbox_i2c_flash {
-+	uint8_t *data;
-+};
-+
-+void sandbox_i2c_eeprom_set_test_mode(struct udevice *dev,
-+				      enum sandbox_i2c_eeprom_test_mode mode)
-+{
-+	struct sandbox_i2c_flash_plat_data *plat = dev_get_platdata(dev);
-+
-+	plat->test_mode = mode;
-+}
-+
-+void sandbox_i2c_eeprom_set_offset_len(struct udevice *dev, int offset_len)
-+{
-+	struct sandbox_i2c_flash_plat_data *plat = dev_get_platdata(dev);
-+
-+	plat->offset_len = offset_len;
-+}
-+
-+static int sandbox_i2c_eeprom_xfer(struct udevice *emul, struct i2c_msg *msg,
-+				  int nmsgs)
-+{
-+	struct sandbox_i2c_flash *priv = dev_get_priv(emul);
-+	uint offset = 0;
-+
-+	debug("\n%s\n", __func__);
-+	debug_buffer(0, priv->data, 1, 16, 0);
-+	for (; nmsgs > 0; nmsgs--, msg++) {
-+		struct sandbox_i2c_flash_plat_data *plat =
-+				dev_get_platdata(emul);
-+		int len;
-+		u8 *ptr;
-+
-+		if (!plat->size)
-+			return -ENODEV;
-+		if (msg->addr + msg->len > plat->size) {
-+			debug("%s: Address %x, len %x is outside range 0..%x\n",
-+			      __func__, msg->addr, msg->len, plat->size);
-+			return -EINVAL;
-+		}
-+		len = msg->len;
-+		debug("   %s: msg->len=%d",
-+		      msg->flags & I2C_M_RD ? "read" : "write",
-+		      msg->len);
-+		if (msg->flags & I2C_M_RD) {
-+			if (plat->test_mode == SIE_TEST_MODE_SINGLE_BYTE)
-+				len = 1;
-+			debug(", offset %x, len %x: ", offset, len);
-+			memcpy(msg->buf, priv->data + offset, len);
-+			memset(msg->buf + len, '\xff', msg->len - len);
-+			debug_buffer(0, msg->buf, 1, msg->len, 0);
-+		} else if (len >= plat->offset_len) {
-+			int i;
-+
-+			ptr = msg->buf;
-+			for (i = 0; i < plat->offset_len; i++, len--)
-+				offset = (offset << 8) | *ptr++;
-+			debug(", set offset %x: ", offset);
-+			debug_buffer(0, msg->buf, 1, msg->len, 0);
-+			if (plat->test_mode == SIE_TEST_MODE_SINGLE_BYTE)
-+				len = min(len, 1);
-+
-+			/* For testing, map offsets into our limited buffer */
-+			for (i = 24; i > 0; i -= 8) {
-+				if (offset > (1 << i)) {
-+					offset = (offset >> i) |
-+						(offset & ((1 << i) - 1));
-+					offset += i;
-+				}
-+			}
-+			memcpy(priv->data + offset, ptr, len);
-+		}
-+	}
-+	debug_buffer(0, priv->data, 1, 16, 0);
-+
-+	return 0;
-+}
-+
-+struct dm_i2c_ops sandbox_i2c_emul_ops = {
-+	.xfer = sandbox_i2c_eeprom_xfer,
-+};
-+
-+static int sandbox_i2c_eeprom_ofdata_to_platdata(struct udevice *dev)
-+{
-+	struct sandbox_i2c_flash_plat_data *plat = dev_get_platdata(dev);
-+
-+	plat->size = fdtdec_get_int(gd->fdt_blob, dev->of_offset,
-+				    "sandbox,size", 32);
-+	plat->filename = fdt_getprop(gd->fdt_blob, dev->of_offset,
-+				     "sandbox,filename", NULL);
-+	if (!plat->filename) {
-+		debug("%s: No filename for device '%s'\n", __func__,
-+		      dev->name);
-+		return -EINVAL;
-+	}
-+	plat->test_mode = SIE_TEST_MODE_NONE;
-+	plat->offset_len = 1;
-+
-+	return 0;
-+}
-+
-+static int sandbox_i2c_eeprom_probe(struct udevice *dev)
-+{
-+	struct sandbox_i2c_flash_plat_data *plat = dev_get_platdata(dev);
-+	struct sandbox_i2c_flash *priv = dev_get_priv(dev);
-+
-+	priv->data = calloc(1, plat->size);
-+	if (!priv->data)
-+		return -ENOMEM;
-+
-+	return 0;
-+}
-+
-+static int sandbox_i2c_eeprom_remove(struct udevice *dev)
-+{
-+	struct sandbox_i2c_flash *priv = dev_get_priv(dev);
-+
-+	free(priv->data);
-+
-+	return 0;
-+}
-+
-+static const struct udevice_id sandbox_i2c_ids[] = {
-+	{ .compatible = "sandbox,i2c-eeprom" },
-+	{ }
-+};
-+
-+U_BOOT_DRIVER(sandbox_i2c_emul) = {
-+	.name		= "sandbox_i2c_eeprom_emul",
-+	.id		= UCLASS_I2C_EMUL,
-+	.of_match	= sandbox_i2c_ids,
-+	.ofdata_to_platdata = sandbox_i2c_eeprom_ofdata_to_platdata,
-+	.probe		= sandbox_i2c_eeprom_probe,
-+	.remove		= sandbox_i2c_eeprom_remove,
-+	.priv_auto_alloc_size = sizeof(struct sandbox_i2c_flash),
-+	.platdata_auto_alloc_size = sizeof(struct sandbox_i2c_flash_plat_data),
-+	.ops		= &sandbox_i2c_emul_ops,
-+};
-diff -ruN u-boot-2015.01-rc3/drivers/misc/Makefile u-boot/drivers/misc/Makefile
---- u-boot-2015.01-rc3/drivers/misc/Makefile	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/misc/Makefile	2015-01-01 17:34:32.649496760 +0100
-@@ -15,11 +15,16 @@
- obj-$(CONFIG_CROS_EC_SPI) += cros_ec_spi.o
- obj-$(CONFIG_FSL_IIM) += fsl_iim.o
- obj-$(CONFIG_GPIO_LED) += gpio_led.o
-+obj-$(CONFIG_I2C_EEPROM) += i2c_eeprom.o
- obj-$(CONFIG_FSL_MC9SDZ60) += mc9sdz60.o
- obj-$(CONFIG_MXC_OCOTP) += mxc_ocotp.o
- obj-$(CONFIG_MXS_OCOTP) += mxs_ocotp.o
- obj-$(CONFIG_NS87308) += ns87308.o
- obj-$(CONFIG_PDSP188x) += pdsp188x.o
-+ifdef CONFIG_DM_I2C
-+obj-$(CONFIG_SANDBOX) += i2c_eeprom_emul.o
-+endif
-+obj-$(CONFIG_SMSC_LPC47M) += smsc_lpc47m.o
- obj-$(CONFIG_STATUS_LED) += status_led.o
- obj-$(CONFIG_TWL4030_LED) += twl4030_led.o
- obj-$(CONFIG_FSL_IFC) += fsl_ifc.o
-diff -ruN u-boot-2015.01-rc3/drivers/misc/mxc_ocotp.c u-boot/drivers/misc/mxc_ocotp.c
---- u-boot-2015.01-rc3/drivers/misc/mxc_ocotp.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/misc/mxc_ocotp.c	2015-01-01 17:34:32.649496760 +0100
-@@ -81,8 +81,6 @@
- 	err = !!(readl(&regs->ctrl) & BM_CTRL_ERROR);
- 	clear_error(regs);
- 
--	enable_ocotp_clk(0);
--
- 	if (err) {
- 		printf("mxc_ocotp %s(): Access protect error\n", caller);
- 		return -EIO;
-diff -ruN u-boot-2015.01-rc3/drivers/misc/mxs_ocotp.c u-boot/drivers/misc/mxs_ocotp.c
---- u-boot-2015.01-rc3/drivers/misc/mxs_ocotp.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/misc/mxs_ocotp.c	2015-01-01 17:34:32.649496760 +0100
-@@ -187,6 +187,8 @@
- 	uint32_t hclk_val, vddio_val;
- 	int ret;
- 
-+	mxs_ocotp_clear_error();
-+
- 	/* Make sure the banks are closed for reading. */
- 	ret = mxs_ocotp_read_bank_open(0);
- 	if (ret) {
-@@ -221,13 +223,17 @@
- 		goto fail;
- 	}
- 
-+	/* Check for errors */
-+	if (readl(&ocotp_regs->hw_ocotp_ctrl) & OCOTP_CTRL_ERROR) {
-+		puts("Failed writing fuses!\n");
-+		ret = -EPERM;
-+		goto fail;
-+	}
-+
- fail:
- 	mxs_ocotp_scale_vddio(0, &vddio_val);
--	ret = mxs_ocotp_scale_hclk(0, &hclk_val);
--	if (ret) {
-+	if (mxs_ocotp_scale_hclk(0, &hclk_val))
- 		puts("Failed scaling up the HCLK!\n");
--		return ret;
--	}
- 
- 	return ret;
- }
-diff -ruN u-boot-2015.01-rc3/drivers/misc/smsc_lpc47m.c u-boot/drivers/misc/smsc_lpc47m.c
---- u-boot-2015.01-rc3/drivers/misc/smsc_lpc47m.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/drivers/misc/smsc_lpc47m.c	2015-01-01 17:34:32.649496760 +0100
-@@ -0,0 +1,33 @@
-+/*
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <asm/io.h>
-+#include <asm/pnp_def.h>
-+
-+static void pnp_enter_conf_state(u16 dev)
-+{
-+	u16 port = dev >> 8;
-+
-+	outb(0x55, port);
-+}
-+
-+static void pnp_exit_conf_state(u16 dev)
-+{
-+	u16 port = dev >> 8;
-+
-+	outb(0xaa, port);
-+}
-+
-+void lpc47m_enable_serial(u16 dev, u16 iobase)
-+{
-+	pnp_enter_conf_state(dev);
-+	pnp_set_logical_device(dev);
-+	pnp_set_enable(dev, 0);
-+	pnp_set_iobase(dev, PNP_IDX_IO0, iobase);
-+	pnp_set_enable(dev, 1);
-+	pnp_exit_conf_state(dev);
-+}
-diff -ruN u-boot-2015.01-rc3/drivers/mmc/dw_mmc.c u-boot/drivers/mmc/dw_mmc.c
---- u-boot-2015.01-rc3/drivers/mmc/dw_mmc.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/mmc/dw_mmc.c	2015-01-01 17:34:32.653496694 +0100
-@@ -318,7 +318,7 @@
- 	dwmci_writel(host, DWMCI_CTYPE, ctype);
- 
- 	regs = dwmci_readl(host, DWMCI_UHS_REG);
--	if (mmc->card_caps & MMC_MODE_DDR_52MHz)
-+	if (mmc->ddr_mode)
- 		regs |= DWMCI_DDR_MODE;
- 	else
- 		regs &= DWMCI_DDR_MODE;
-diff -ruN u-boot-2015.01-rc3/drivers/mmc/exynos_dw_mmc.c u-boot/drivers/mmc/exynos_dw_mmc.c
---- u-boot-2015.01-rc3/drivers/mmc/exynos_dw_mmc.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/mmc/exynos_dw_mmc.c	2015-01-01 17:34:32.653496694 +0100
-@@ -101,7 +101,7 @@
- 	host->get_mmc_clk = exynos_dwmci_get_clk;
- 	/* Add the mmc channel to be registered with mmc core */
- 	if (add_dwmci(host, DWMMC_MAX_FREQ, DWMMC_MIN_FREQ)) {
--		debug("dwmmc%d registration failed\n", index);
-+		printf("DWMMC%d registration failed\n", index);
- 		return -1;
- 	}
- 	return 0;
-@@ -146,7 +146,7 @@
- 	flag = host->buswidth == 8 ? PINMUX_FLAG_8BIT_MODE : PINMUX_FLAG_NONE;
- 	err = exynos_pinmux_config(host->dev_id, flag);
- 	if (err) {
--		debug("DWMMC not configure\n");
-+		printf("DWMMC%d not configure\n", index);
- 		return err;
- 	}
- 
-@@ -162,21 +162,22 @@
- 	/* Extract device id for each mmc channel */
- 	host->dev_id = pinmux_decode_periph_id(blob, node);
- 
-+	host->dev_index = fdtdec_get_int(blob, node, "index", host->dev_id);
-+	if (host->dev_index == host->dev_id)
-+		host->dev_index = host->dev_id - PERIPH_ID_SDMMC0;
-+
-+
- 	/* Get the bus width from the device node */
- 	host->buswidth = fdtdec_get_int(blob, node, "samsung,bus-width", 0);
- 	if (host->buswidth <= 0) {
--		debug("DWMMC: Can't get bus-width\n");
-+		printf("DWMMC%d: Can't get bus-width\n", host->dev_index);
- 		return -EINVAL;
- 	}
- 
--	host->dev_index = fdtdec_get_int(blob, node, "index", host->dev_id);
--	if (host->dev_index == host->dev_id)
--		host->dev_index = host->dev_id - PERIPH_ID_SDMMC0;
--
- 	/* Set the base address from the device node */
- 	base = fdtdec_get_addr(blob, node, "reg");
- 	if (!base) {
--		debug("DWMMC: Can't get base address\n");
-+		printf("DWMMC%d: Can't get base address\n", host->dev_index);
- 		return -EINVAL;
- 	}
- 	host->ioaddr = (void *)base;
-@@ -184,7 +185,8 @@
- 	/* Extract the timing info from the node */
- 	err =  fdtdec_get_int_array(blob, node, "samsung,timing", timing, 3);
- 	if (err) {
--		debug("Can't get sdr-timings for devider\n");
-+		printf("DWMMC%d: Can't get sdr-timings for devider\n",
-+				host->dev_index);
- 		return -EINVAL;
- 	}
- 
-@@ -214,7 +216,7 @@
- 		host = &dwmci_host[i];
- 		err = exynos_dwmci_get_config(blob, node, host);
- 		if (err) {
--			debug("%s: failed to decode dev %d\n", __func__, i);
-+			printf("%s: failed to decode dev %d\n", __func__, i);
- 			return err;
- 		}
- 
-diff -ruN u-boot-2015.01-rc3/drivers/mmc/mmc.c u-boot/drivers/mmc/mmc.c
---- u-boot-2015.01-rc3/drivers/mmc/mmc.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/mmc/mmc.c	2015-01-01 17:34:32.653496694 +0100
-@@ -159,7 +159,7 @@
- {
- 	struct mmc_cmd cmd;
- 
--	if (mmc->card_caps & MMC_MODE_DDR_52MHz)
-+	if (mmc->ddr_mode)
- 		return 0;
- 
- 	cmd.cmdidx = MMC_CMD_SET_BLOCKLEN;
-@@ -486,7 +486,7 @@
- 	char cardtype;
- 	int err;
- 
--	mmc->card_caps = 0;
-+	mmc->card_caps = MMC_MODE_4BIT | MMC_MODE_8BIT;
- 
- 	if (mmc_host_is_spi(mmc))
- 		return 0;
-@@ -519,7 +519,7 @@
- 
- 	/* High Speed is set, there are two types: 52MHz and 26MHz */
- 	if (cardtype & EXT_CSD_CARD_TYPE_52) {
--		if (cardtype & EXT_CSD_CARD_TYPE_DDR_52)
-+		if (cardtype & EXT_CSD_CARD_TYPE_DDR_1_8V)
- 			mmc->card_caps |= MMC_MODE_DDR_52MHz;
- 		mmc->card_caps |= MMC_MODE_HS_52MHz | MMC_MODE_HS;
- 	} else {
-@@ -1001,6 +1001,9 @@
- 		case 6:
- 			mmc->version = MMC_VERSION_4_5;
- 			break;
-+		case 7:
-+			mmc->version = MMC_VERSION_5_0;
-+			break;
- 		}
- 
- 		/*
-@@ -1022,6 +1025,21 @@
- 			mmc->erase_grp_size =
- 				ext_csd[EXT_CSD_HC_ERASE_GRP_SIZE] *
- 					MMC_MAX_BLOCK_LEN * 1024;
-+			/*
-+			 * if high capacity and partition setting completed
-+			 * SEC_COUNT is valid even if it is smaller than 2 GiB
-+			 * JEDEC Standard JESD84-B45, 6.2.4
-+			 */
-+			if (mmc->high_capacity &&
-+			    (ext_csd[EXT_CSD_PARTITION_SETTING] &
-+			     EXT_CSD_PARTITION_SETTING_COMPLETED)) {
-+				capacity = (ext_csd[EXT_CSD_SEC_CNT]) |
-+					(ext_csd[EXT_CSD_SEC_CNT + 1] << 8) |
-+					(ext_csd[EXT_CSD_SEC_CNT + 2] << 16) |
-+					(ext_csd[EXT_CSD_SEC_CNT + 3] << 24);
-+				capacity *= MMC_MAX_BLOCK_LEN;
-+				mmc->capacity_user = capacity;
-+			}
- 		} else {
- 			/* Calculate the group size from the csd value. */
- 			int erase_gsz, erase_gmul;
-@@ -1103,8 +1121,10 @@
- 
- 		/* An array to map CSD bus widths to host cap bits */
- 		static unsigned ext_to_hostcaps[] = {
--			[EXT_CSD_DDR_BUS_WIDTH_4] = MMC_MODE_DDR_52MHz,
--			[EXT_CSD_DDR_BUS_WIDTH_8] = MMC_MODE_DDR_52MHz,
-+			[EXT_CSD_DDR_BUS_WIDTH_4] =
-+				MMC_MODE_DDR_52MHz | MMC_MODE_4BIT,
-+			[EXT_CSD_DDR_BUS_WIDTH_8] =
-+				MMC_MODE_DDR_52MHz | MMC_MODE_8BIT,
- 			[EXT_CSD_BUS_WIDTH_4] = MMC_MODE_4BIT,
- 			[EXT_CSD_BUS_WIDTH_8] = MMC_MODE_8BIT,
- 		};
-@@ -1116,13 +1136,13 @@
- 
- 		for (idx=0; idx < ARRAY_SIZE(ext_csd_bits); idx++) {
- 			unsigned int extw = ext_csd_bits[idx];
-+			unsigned int caps = ext_to_hostcaps[extw];
- 
- 			/*
--			 * Check to make sure the controller supports
--			 * this bus width, if it's more than 1
-+			 * Check to make sure the card and controller support
-+			 * these capabilities
- 			 */
--			if (extw != EXT_CSD_BUS_WIDTH_1 &&
--					!(mmc->cfg->host_caps & ext_to_hostcaps[extw]))
-+			if ((mmc->card_caps & caps) != caps)
- 				continue;
- 
- 			err = mmc_switch(mmc, EXT_CSD_CMD_SET_NORMAL,
-@@ -1131,26 +1151,33 @@
- 			if (err)
- 				continue;
- 
-+			mmc->ddr_mode = (caps & MMC_MODE_DDR_52MHz) ? 1 : 0;
- 			mmc_set_bus_width(mmc, widths[idx]);
- 
- 			err = mmc_send_ext_csd(mmc, test_csd);
--			/* Only compare read only fields */
--			if (!err && ext_csd[EXT_CSD_PARTITIONING_SUPPORT] \
--				    == test_csd[EXT_CSD_PARTITIONING_SUPPORT]
--				 && ext_csd[EXT_CSD_HC_WP_GRP_SIZE] \
--				    == test_csd[EXT_CSD_HC_WP_GRP_SIZE] \
--				 && ext_csd[EXT_CSD_REV] \
--				    == test_csd[EXT_CSD_REV]
--				 && ext_csd[EXT_CSD_HC_ERASE_GRP_SIZE] \
--				    == test_csd[EXT_CSD_HC_ERASE_GRP_SIZE]
--				 && memcmp(&ext_csd[EXT_CSD_SEC_CNT], \
--					&test_csd[EXT_CSD_SEC_CNT], 4) == 0) {
- 
--				mmc->card_caps |= ext_to_hostcaps[extw];
-+			if (err)
-+				continue;
-+
-+			/* Only compare read only fields */
-+			if (ext_csd[EXT_CSD_PARTITIONING_SUPPORT]
-+				== test_csd[EXT_CSD_PARTITIONING_SUPPORT] &&
-+			    ext_csd[EXT_CSD_HC_WP_GRP_SIZE]
-+				== test_csd[EXT_CSD_HC_WP_GRP_SIZE] &&
-+			    ext_csd[EXT_CSD_REV]
-+				== test_csd[EXT_CSD_REV] &&
-+			    ext_csd[EXT_CSD_HC_ERASE_GRP_SIZE]
-+				== test_csd[EXT_CSD_HC_ERASE_GRP_SIZE] &&
-+			    memcmp(&ext_csd[EXT_CSD_SEC_CNT],
-+				   &test_csd[EXT_CSD_SEC_CNT], 4) == 0)
- 				break;
--			}
-+			else
-+				err = SWITCH_ERR;
- 		}
- 
-+		if (err)
-+			return err;
-+
- 		if (mmc->card_caps & MMC_MODE_HS) {
- 			if (mmc->card_caps & MMC_MODE_HS_52MHz)
- 				mmc->tran_speed = 52000000;
-@@ -1161,6 +1188,12 @@
- 
- 	mmc_set_clock(mmc, mmc->tran_speed);
- 
-+	/* Fix the block length for DDR mode */
-+	if (mmc->ddr_mode) {
-+		mmc->read_bl_len = MMC_MAX_BLOCK_LEN;
-+		mmc->write_bl_len = MMC_MAX_BLOCK_LEN;
-+	}
-+
- 	/* fill in device description */
- 	mmc->block_dev.lun = 0;
- 	mmc->block_dev.type = 0;
-@@ -1306,6 +1339,7 @@
- 	if (err)
- 		return err;
- 
-+	mmc->ddr_mode = 0;
- 	mmc_set_bus_width(mmc, 1);
- 	mmc_set_clock(mmc, 1);
- 
-@@ -1408,8 +1442,11 @@
- 
- 		printf("%s: %d", m->cfg->name, m->block_dev.dev);
- 
--		if (entry->next != &mmc_devices)
--			printf("%c ", separator);
-+		if (entry->next != &mmc_devices) {
-+			printf("%c", separator);
-+			if (separator != '\n')
-+				puts (" ");
-+		}
- 	}
- 
- 	printf("\n");
-diff -ruN u-boot-2015.01-rc3/drivers/mtd/nand/fsl_ifc_nand.c u-boot/drivers/mtd/nand/fsl_ifc_nand.c
---- u-boot-2015.01-rc3/drivers/mtd/nand/fsl_ifc_nand.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/mtd/nand/fsl_ifc_nand.c	2015-01-01 17:34:32.657496629 +0100
-@@ -292,7 +292,7 @@
- 	struct fsl_ifc *ifc = ctrl->regs;
- 	u32 timeo = (CONFIG_SYS_HZ * 10) / 1000;
- 	u32 time_start;
--	u32 eccstat[4];
-+	u32 eccstat[4] = {0};
- 	int i;
- 
- 	/* set the chip select for NAND Transaction */
-diff -ruN u-boot-2015.01-rc3/drivers/mtd/nand/fsl_ifc_spl.c u-boot/drivers/mtd/nand/fsl_ifc_spl.c
---- u-boot-2015.01-rc3/drivers/mtd/nand/fsl_ifc_spl.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/mtd/nand/fsl_ifc_spl.c	2015-01-01 17:34:32.657496629 +0100
-@@ -254,3 +254,13 @@
- 	uboot = (void *)CONFIG_SYS_NAND_U_BOOT_START;
- 	uboot();
- }
-+
-+#ifndef CONFIG_SPL_NAND_INIT
-+void nand_init(void)
-+{
-+}
-+
-+void nand_deselect(void)
-+{
-+}
-+#endif
-diff -ruN u-boot-2015.01-rc3/drivers/mtd/spi/sf_internal.h u-boot/drivers/mtd/spi/sf_internal.h
---- u-boot-2015.01-rc3/drivers/mtd/spi/sf_internal.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/mtd/spi/sf_internal.h	2015-01-01 17:34:32.665496498 +0100
-@@ -23,13 +23,16 @@
- /* Enum list - Full read commands */
- enum spi_read_cmds {
- 	ARRAY_SLOW		= 1 << 0,
--	DUAL_OUTPUT_FAST	= 1 << 1,
--	DUAL_IO_FAST		= 1 << 2,
--	QUAD_OUTPUT_FAST	= 1 << 3,
--	QUAD_IO_FAST		= 1 << 4,
-+	ARRAY_FAST		= 1 << 1,
-+	DUAL_OUTPUT_FAST	= 1 << 2,
-+	DUAL_IO_FAST		= 1 << 3,
-+	QUAD_OUTPUT_FAST	= 1 << 4,
-+	QUAD_IO_FAST		= 1 << 5,
- };
- 
--#define RD_EXTN	(ARRAY_SLOW | DUAL_OUTPUT_FAST | DUAL_IO_FAST)
-+/* Normal - Extended - Full command set */
-+#define RD_NORM	(ARRAY_SLOW | ARRAY_FAST)
-+#define RD_EXTN	(RD_NORM | DUAL_OUTPUT_FAST | DUAL_IO_FAST)
- #define RD_FULL	(RD_EXTN | QUAD_OUTPUT_FAST | QUAD_IO_FAST)
- 
- /* sf param flags */
-@@ -37,9 +40,13 @@
- 	SECT_4K		= 1 << 0,
- 	SECT_32K	= 1 << 1,
- 	E_FSR		= 1 << 2,
--	WR_QPP		= 1 << 3,
-+	SST_BP		= 1 << 3,
-+	SST_WP		= 1 << 4,
-+	WR_QPP		= 1 << 5,
- };
- 
-+#define SST_WR		(SST_BP | SST_WP)
-+
- #define SPI_FLASH_3B_ADDR_LEN		3
- #define SPI_FLASH_CMD_LEN		(1 + SPI_FLASH_3B_ADDR_LEN)
- #define SPI_FLASH_16MB_BOUN		0x1000000
-@@ -101,12 +108,13 @@
- 
- /* SST specific */
- #ifdef CONFIG_SPI_FLASH_SST
--# define SST_WP		0x01	/* Supports AAI word program */
- # define CMD_SST_BP		0x02    /* Byte Program */
- # define CMD_SST_AAI_WP	0xAD	/* Auto Address Incr Word Program */
- 
- int sst_write_wp(struct spi_flash *flash, u32 offset, size_t len,
- 		const void *buf);
-+int sst_write_bp(struct spi_flash *flash, u32 offset, size_t len,
-+		const void *buf);
- #endif
- 
- /**
-diff -ruN u-boot-2015.01-rc3/drivers/mtd/spi/sf_ops.c u-boot/drivers/mtd/spi/sf_ops.c
---- u-boot-2015.01-rc3/drivers/mtd/spi/sf_ops.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/mtd/spi/sf_ops.c	2015-01-01 17:34:32.665496498 +0100
-@@ -517,4 +517,35 @@
- 	spi_release_bus(flash->spi);
- 	return ret;
- }
-+
-+int sst_write_bp(struct spi_flash *flash, u32 offset, size_t len,
-+		const void *buf)
-+{
-+	size_t actual;
-+	int ret;
-+
-+	ret = spi_claim_bus(flash->spi);
-+	if (ret) {
-+		debug("SF: Unable to claim SPI bus\n");
-+		return ret;
-+	}
-+
-+	for (actual = 0; actual < len; actual++) {
-+		ret = sst_byte_write(flash, offset, buf + actual);
-+		if (ret) {
-+			debug("SF: sst byte program failed\n");
-+			break;
-+		}
-+		offset++;
-+	}
-+
-+	if (!ret)
-+		ret = spi_flash_cmd_write_disable(flash);
-+
-+	debug("SF: sst: program %s %zu bytes @ 0x%zx\n",
-+	      ret ? "failure" : "success", len, offset - actual);
-+
-+	spi_release_bus(flash->spi);
-+	return ret;
-+}
- #endif
-diff -ruN u-boot-2015.01-rc3/drivers/mtd/spi/sf_params.c u-boot/drivers/mtd/spi/sf_params.c
---- u-boot-2015.01-rc3/drivers/mtd/spi/sf_params.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/mtd/spi/sf_params.c	2015-01-01 17:34:32.665496498 +0100
-@@ -15,42 +15,42 @@
- /* SPI/QSPI flash device params structure */
- const struct spi_flash_params spi_flash_params_table[] = {
- #ifdef CONFIG_SPI_FLASH_ATMEL		/* ATMEL */
--	{"AT45DB011D",	   0x1f2200, 0x0,	64 * 1024,     4,	0,		    SECT_4K},
--	{"AT45DB021D",	   0x1f2300, 0x0,	64 * 1024,     8,	0,		    SECT_4K},
--	{"AT45DB041D",	   0x1f2400, 0x0,	64 * 1024,     8,	0,		    SECT_4K},
--	{"AT45DB081D",	   0x1f2500, 0x0,	64 * 1024,    16,	0,		    SECT_4K},
--	{"AT45DB161D",	   0x1f2600, 0x0,	64 * 1024,    32,	0,		    SECT_4K},
--	{"AT45DB321D",	   0x1f2700, 0x0,	64 * 1024,    64,	0,		    SECT_4K},
--	{"AT45DB641D",	   0x1f2800, 0x0,	64 * 1024,   128,	0,		    SECT_4K},
--	{"AT25DF321",      0x1f4701, 0x0,	64 * 1024,    64,	0,		    SECT_4K},
-+	{"AT45DB011D",	   0x1f2200, 0x0,	64 * 1024,     4, RD_NORM,		    SECT_4K},
-+	{"AT45DB021D",	   0x1f2300, 0x0,	64 * 1024,     8, RD_NORM,		    SECT_4K},
-+	{"AT45DB041D",	   0x1f2400, 0x0,	64 * 1024,     8, RD_NORM,		    SECT_4K},
-+	{"AT45DB081D",	   0x1f2500, 0x0,	64 * 1024,    16, RD_NORM,		    SECT_4K},
-+	{"AT45DB161D",	   0x1f2600, 0x0,	64 * 1024,    32, RD_NORM,		    SECT_4K},
-+	{"AT45DB321D",	   0x1f2700, 0x0,	64 * 1024,    64, RD_NORM,		    SECT_4K},
-+	{"AT45DB641D",	   0x1f2800, 0x0,	64 * 1024,   128, RD_NORM,		    SECT_4K},
-+	{"AT25DF321",      0x1f4701, 0x0,	64 * 1024,    64, RD_NORM,		    SECT_4K},
- #endif
- #ifdef CONFIG_SPI_FLASH_EON		/* EON */
--	{"EN25Q32B",	   0x1c3016, 0x0,	64 * 1024,    64,	0,			  0},
--	{"EN25Q64",	   0x1c3017, 0x0,	64 * 1024,   128,	0,		    SECT_4K},
--	{"EN25Q128B",	   0x1c3018, 0x0,       64 * 1024,   256,	0,			  0},
--	{"EN25S64",	   0x1c3817, 0x0,	64 * 1024,   128,	0,			  0},
-+	{"EN25Q32B",	   0x1c3016, 0x0,	64 * 1024,    64, RD_NORM,			  0},
-+	{"EN25Q64",	   0x1c3017, 0x0,	64 * 1024,   128, RD_NORM,		    SECT_4K},
-+	{"EN25Q128B",	   0x1c3018, 0x0,       64 * 1024,   256, RD_NORM,			  0},
-+	{"EN25S64",	   0x1c3817, 0x0,	64 * 1024,   128, RD_NORM,			  0},
- #endif
- #ifdef CONFIG_SPI_FLASH_GIGADEVICE	/* GIGADEVICE */
--	{"GD25Q64B",	   0xc84017, 0x0,	64 * 1024,   128,	0,		    SECT_4K},
--	{"GD25LQ32",	   0xc86016, 0x0,	64 * 1024,    64,	0,		    SECT_4K},
-+	{"GD25Q64B",	   0xc84017, 0x0,	64 * 1024,   128, RD_NORM,		    SECT_4K},
-+	{"GD25LQ32",	   0xc86016, 0x0,	64 * 1024,    64, RD_NORM,		    SECT_4K},
- #endif
- #ifdef CONFIG_SPI_FLASH_MACRONIX	/* MACRONIX */
--	{"MX25L2006E",	   0xc22012, 0x0,	64 * 1024,     4,	0,			  0},
--	{"MX25L4005",	   0xc22013, 0x0,	64 * 1024,     8,	0,			  0},
--	{"MX25L8005",	   0xc22014, 0x0,	64 * 1024,    16,	0,			  0},
--	{"MX25L1605D",	   0xc22015, 0x0,	64 * 1024,    32,	0,			  0},
--	{"MX25L3205D",	   0xc22016, 0x0,	64 * 1024,    64,	0,			  0},
--	{"MX25L6405D",	   0xc22017, 0x0,	64 * 1024,   128,	0,			  0},
-+	{"MX25L2006E",	   0xc22012, 0x0,	64 * 1024,     4, RD_NORM,			  0},
-+	{"MX25L4005",	   0xc22013, 0x0,	64 * 1024,     8, RD_NORM,			  0},
-+	{"MX25L8005",	   0xc22014, 0x0,	64 * 1024,    16, RD_NORM,			  0},
-+	{"MX25L1605D",	   0xc22015, 0x0,	64 * 1024,    32, RD_NORM,			  0},
-+	{"MX25L3205D",	   0xc22016, 0x0,	64 * 1024,    64, RD_NORM,			  0},
-+	{"MX25L6405D",	   0xc22017, 0x0,	64 * 1024,   128, RD_NORM,			  0},
- 	{"MX25L12805",	   0xc22018, 0x0,	64 * 1024,   256, RD_FULL,		     WR_QPP},
- 	{"MX25L25635F",	   0xc22019, 0x0,	64 * 1024,   512, RD_FULL,		     WR_QPP},
- 	{"MX25L51235F",	   0xc2201a, 0x0,	64 * 1024,  1024, RD_FULL,		     WR_QPP},
- 	{"MX25L12855E",	   0xc22618, 0x0,	64 * 1024,   256, RD_FULL,		     WR_QPP},
- #endif
- #ifdef CONFIG_SPI_FLASH_SPANSION	/* SPANSION */
--	{"S25FL008A",	   0x010213, 0x0,	64 * 1024,    16,	0,			  0},
--	{"S25FL016A",	   0x010214, 0x0,	64 * 1024,    32,	0,			  0},
--	{"S25FL032A",	   0x010215, 0x0,	64 * 1024,    64,	0,			  0},
--	{"S25FL064A",	   0x010216, 0x0,	64 * 1024,   128,	0,			  0},
-+	{"S25FL008A",	   0x010213, 0x0,	64 * 1024,    16, RD_NORM,			  0},
-+	{"S25FL016A",	   0x010214, 0x0,	64 * 1024,    32, RD_NORM,			  0},
-+	{"S25FL032A",	   0x010215, 0x0,	64 * 1024,    64, RD_NORM,			  0},
-+	{"S25FL064A",	   0x010216, 0x0,	64 * 1024,   128, RD_NORM,			  0},
- 	{"S25FL128P_256K", 0x012018, 0x0300,   256 * 1024,    64, RD_FULL,		     WR_QPP},
- 	{"S25FL128P_64K",  0x012018, 0x0301,    64 * 1024,   256, RD_FULL,		     WR_QPP},
- 	{"S25FL032P",	   0x010215, 0x4d00,    64 * 1024,    64, RD_FULL,		     WR_QPP},
-@@ -64,17 +64,17 @@
- 	{"S25FL512S_512K", 0x010220, 0x4f00,   256 * 1024,   256, RD_FULL,		     WR_QPP},
- #endif
- #ifdef CONFIG_SPI_FLASH_STMICRO		/* STMICRO */
--	{"M25P10",	   0x202011, 0x0,	32 * 1024,     4,	0,			  0},
--	{"M25P20",	   0x202012, 0x0,       64 * 1024,     4,	0,			  0},
--	{"M25P40",	   0x202013, 0x0,       64 * 1024,     8,	0,			  0},
--	{"M25P80",	   0x202014, 0x0,       64 * 1024,    16,	0,			  0},
--	{"M25P16",	   0x202015, 0x0,       64 * 1024,    32,	0,			  0},
--	{"M25PE16",	   0x208015, 0x1000,    64 * 1024,    32,	0,			  0},
-+	{"M25P10",	   0x202011, 0x0,	32 * 1024,     4, RD_NORM,			  0},
-+	{"M25P20",	   0x202012, 0x0,       64 * 1024,     4, RD_NORM,			  0},
-+	{"M25P40",	   0x202013, 0x0,       64 * 1024,     8, RD_NORM,			  0},
-+	{"M25P80",	   0x202014, 0x0,       64 * 1024,    16, RD_NORM,			  0},
-+	{"M25P16",	   0x202015, 0x0,       64 * 1024,    32, RD_NORM,			  0},
-+	{"M25PE16",	   0x208015, 0x1000,    64 * 1024,    32, RD_NORM,			  0},
- 	{"M25PX16",	   0x207115, 0x1000,    64 * 1024,    32, RD_EXTN,			  0},
--	{"M25P32",	   0x202016, 0x0,       64 * 1024,    64,	0,			  0},
--	{"M25P64",	   0x202017, 0x0,       64 * 1024,   128,	0,			  0},
--	{"M25P128",	   0x202018, 0x0,      256 * 1024,    64,	0,			  0},
--	{"M25PX64",	   0x207117, 0x0,       64 * 1024,   128,	0,		    SECT_4K},
-+	{"M25P32",	   0x202016, 0x0,       64 * 1024,    64, RD_NORM,			  0},
-+	{"M25P64",	   0x202017, 0x0,       64 * 1024,   128, RD_NORM,			  0},
-+	{"M25P128",	   0x202018, 0x0,      256 * 1024,    64, RD_NORM,			  0},
-+	{"M25PX64",	   0x207117, 0x0,       64 * 1024,   128, RD_NORM,		    SECT_4K},
- 	{"N25Q32",	   0x20ba16, 0x0,       64 * 1024,    64, RD_FULL,	   WR_QPP | SECT_4K},
- 	{"N25Q32A",	   0x20bb16, 0x0,       64 * 1024,    64, RD_FULL,	   WR_QPP | SECT_4K},
- 	{"N25Q64",	   0x20ba17, 0x0,       64 * 1024,   128, RD_FULL,	   WR_QPP | SECT_4K},
-@@ -89,25 +89,25 @@
- 	{"N25Q1024A",	   0x20bb21, 0x0,       64 * 1024,  2048, RD_FULL, WR_QPP | E_FSR | SECT_4K},
- #endif
- #ifdef CONFIG_SPI_FLASH_SST		/* SST */
--	{"SST25VF040B",	   0xbf258d, 0x0,	64 * 1024,     8,	0,          SECT_4K | SST_WP},
--	{"SST25VF080B",	   0xbf258e, 0x0,	64 * 1024,    16,	0,	    SECT_4K | SST_WP},
--	{"SST25VF016B",	   0xbf2541, 0x0,	64 * 1024,    32,	0,	    SECT_4K | SST_WP},
--	{"SST25VF032B",	   0xbf254a, 0x0,	64 * 1024,    64,	0,	    SECT_4K | SST_WP},
--	{"SST25VF064C",	   0xbf254b, 0x0,	64 * 1024,   128,	0,		     SECT_4K},
--	{"SST25WF512",	   0xbf2501, 0x0,	64 * 1024,     1,	0,	    SECT_4K | SST_WP},
--	{"SST25WF010",	   0xbf2502, 0x0,	64 * 1024,     2,       0,          SECT_4K | SST_WP},
--	{"SST25WF020",	   0xbf2503, 0x0,	64 * 1024,     4,       0,	    SECT_4K | SST_WP},
--	{"SST25WF040",	   0xbf2504, 0x0,	64 * 1024,     8,       0,	    SECT_4K | SST_WP},
--	{"SST25WF080",	   0xbf2505, 0x0,	64 * 1024,    16,       0,	    SECT_4K | SST_WP},
-+	{"SST25VF040B",	   0xbf258d, 0x0,	64 * 1024,     8, RD_NORM,          SECT_4K | SST_WR},
-+	{"SST25VF080B",	   0xbf258e, 0x0,	64 * 1024,    16, RD_NORM,	    SECT_4K | SST_WR},
-+	{"SST25VF016B",	   0xbf2541, 0x0,	64 * 1024,    32, RD_NORM,	    SECT_4K | SST_WR},
-+	{"SST25VF032B",	   0xbf254a, 0x0,	64 * 1024,    64, RD_NORM,	    SECT_4K | SST_WR},
-+	{"SST25VF064C",	   0xbf254b, 0x0,	64 * 1024,   128, RD_NORM,		     SECT_4K},
-+	{"SST25WF512",	   0xbf2501, 0x0,	64 * 1024,     1, RD_NORM,	    SECT_4K | SST_WR},
-+	{"SST25WF010",	   0xbf2502, 0x0,	64 * 1024,     2, RD_NORM,          SECT_4K | SST_WR},
-+	{"SST25WF020",	   0xbf2503, 0x0,	64 * 1024,     4, RD_NORM,	    SECT_4K | SST_WR},
-+	{"SST25WF040",	   0xbf2504, 0x0,	64 * 1024,     8, RD_NORM,	    SECT_4K | SST_WR},
-+	{"SST25WF080",	   0xbf2505, 0x0,	64 * 1024,    16, RD_NORM,	    SECT_4K | SST_WR},
- #endif
- #ifdef CONFIG_SPI_FLASH_WINBOND		/* WINBOND */
--	{"W25P80",	   0xef2014, 0x0,	64 * 1024,    16,	0,		           0},
--	{"W25P16",	   0xef2015, 0x0,	64 * 1024,    32,	0,		           0},
--	{"W25P32",	   0xef2016, 0x0,	64 * 1024,    64,	0,		           0},
--	{"W25X40",	   0xef3013, 0x0,	64 * 1024,     8,	0,		     SECT_4K},
--	{"W25X16",	   0xef3015, 0x0,	64 * 1024,    32,	0,		     SECT_4K},
--	{"W25X32",	   0xef3016, 0x0,	64 * 1024,    64,	0,		     SECT_4K},
--	{"W25X64",	   0xef3017, 0x0,	64 * 1024,   128,	0,		     SECT_4K},
-+	{"W25P80",	   0xef2014, 0x0,	64 * 1024,    16, RD_NORM,		           0},
-+	{"W25P16",	   0xef2015, 0x0,	64 * 1024,    32, RD_NORM,		           0},
-+	{"W25P32",	   0xef2016, 0x0,	64 * 1024,    64, RD_NORM,		           0},
-+	{"W25X40",	   0xef3013, 0x0,	64 * 1024,     8, RD_NORM,		     SECT_4K},
-+	{"W25X16",	   0xef3015, 0x0,	64 * 1024,    32, RD_NORM,		     SECT_4K},
-+	{"W25X32",	   0xef3016, 0x0,	64 * 1024,    64, RD_NORM,		     SECT_4K},
-+	{"W25X64",	   0xef3017, 0x0,	64 * 1024,   128, RD_NORM,		     SECT_4K},
- 	{"W25Q80BL",	   0xef4014, 0x0,	64 * 1024,    16, RD_FULL,	    WR_QPP | SECT_4K},
- 	{"W25Q16CL",	   0xef4015, 0x0,	64 * 1024,    32, RD_FULL,	    WR_QPP | SECT_4K},
- 	{"W25Q32BV",	   0xef4016, 0x0,	64 * 1024,    64, RD_FULL,	    WR_QPP | SECT_4K},
-diff -ruN u-boot-2015.01-rc3/drivers/mtd/spi/sf_probe.c u-boot/drivers/mtd/spi/sf_probe.c
---- u-boot-2015.01-rc3/drivers/mtd/spi/sf_probe.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/mtd/spi/sf_probe.c	2015-01-01 17:34:32.665496498 +0100
-@@ -24,6 +24,7 @@
- /* Read commands array */
- static u8 spi_read_cmds_array[] = {
- 	CMD_READ_ARRAY_SLOW,
-+	CMD_READ_ARRAY_FAST,
- 	CMD_READ_DUAL_OUTPUT_FAST,
- 	CMD_READ_DUAL_IO_FAST,
- 	CMD_READ_QUAD_OUTPUT_FAST,
-@@ -135,8 +136,12 @@
- #ifndef CONFIG_DM_SPI_FLASH
- 	flash->write = spi_flash_cmd_write_ops;
- #if defined(CONFIG_SPI_FLASH_SST)
--	if (params->flags & SST_WP)
--		flash->write = sst_write_wp;
-+	if (params->flags & SST_WR) {
-+		if (flash->spi->op_mode_tx & SPI_OPM_TX_BP)
-+			flash->write = sst_write_bp;
-+		else
-+			flash->write = sst_write_wp;
-+	}
- #endif
- 	flash->erase = spi_flash_cmd_erase_ops;
- 	flash->read = spi_flash_cmd_read_ops;
-diff -ruN u-boot-2015.01-rc3/drivers/net/fm/init.c u-boot/drivers/net/fm/init.c
---- u-boot-2015.01-rc3/drivers/net/fm/init.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/net/fm/init.c	2015-01-01 17:34:32.677496300 +0100
-@@ -247,17 +247,17 @@
- 	}
- 
- #ifdef CONFIG_SYS_FMAN_V3
-+#ifndef CONFIG_FSL_FM_10GEC_REGULAR_NOTATION
- 	/*
--	 * Physically FM1_DTSEC9 and FM1_10GEC1 use the same dual-role MAC, when
--	 * FM1_10GEC1 is enabled and  FM1_DTSEC9 is disabled, ensure that the
--	 * dual-role MAC is not disabled, ditto for other dual-role MACs.
-+	 * On T2/T4 SoCs, physically FM1_DTSEC9 and FM1_10GEC1 use the same
-+	 * dual-role MAC, when FM1_10GEC1 is enabled and  FM1_DTSEC9
-+	 * is disabled, ensure that the dual-role MAC is not disabled,
-+	 * ditto for other dual-role MACs.
- 	 */
- 	if (((info->port == FM1_DTSEC9) && (PORT_IS_ENABLED(FM1_10GEC1)))  ||
- 	    ((info->port == FM1_DTSEC10) && (PORT_IS_ENABLED(FM1_10GEC2))) ||
--	    ((info->port == FM1_DTSEC1) && (PORT_IS_ENABLED(FM1_10GEC1)))  ||
- 	    ((info->port == FM1_DTSEC1) && (PORT_IS_ENABLED(FM1_10GEC3)))  ||
- 	    ((info->port == FM1_DTSEC2) && (PORT_IS_ENABLED(FM1_10GEC4)))  ||
--	    ((info->port == FM1_10GEC1) && (PORT_IS_ENABLED(FM1_DTSEC1)))  ||
- 	    ((info->port == FM1_10GEC1) && (PORT_IS_ENABLED(FM1_DTSEC9)))  ||
- 	    ((info->port == FM1_10GEC2) && (PORT_IS_ENABLED(FM1_DTSEC10))) ||
- 	    ((info->port == FM1_10GEC3) && (PORT_IS_ENABLED(FM1_DTSEC1)))  ||
-@@ -269,6 +269,17 @@
- 	    ((info->port == FM2_10GEC1) && (PORT_IS_ENABLED(FM2_DTSEC9)))	||
- 	    ((info->port == FM2_10GEC2) && (PORT_IS_ENABLED(FM2_DTSEC10)))
- #endif
-+#else
-+	/* FM1_DTSECx and FM1_10GECx use the same dual-role MAC */
-+	if (((info->port == FM1_DTSEC1) && (PORT_IS_ENABLED(FM1_10GEC1)))  ||
-+	    ((info->port == FM1_DTSEC2) && (PORT_IS_ENABLED(FM1_10GEC2)))  ||
-+	    ((info->port == FM1_DTSEC3) && (PORT_IS_ENABLED(FM1_10GEC3)))  ||
-+	    ((info->port == FM1_DTSEC4) && (PORT_IS_ENABLED(FM1_10GEC4)))  ||
-+	    ((info->port == FM1_10GEC1) && (PORT_IS_ENABLED(FM1_DTSEC1)))  ||
-+	    ((info->port == FM1_10GEC2) && (PORT_IS_ENABLED(FM1_DTSEC2)))  ||
-+	    ((info->port == FM1_10GEC3) && (PORT_IS_ENABLED(FM1_DTSEC3)))  ||
-+	    ((info->port == FM1_10GEC4) && (PORT_IS_ENABLED(FM1_DTSEC4)))
-+#endif
- 	)
- 		return;
- #endif
-diff -ruN u-boot-2015.01-rc3/drivers/pci/Makefile u-boot/drivers/pci/Makefile
---- u-boot-2015.01-rc3/drivers/pci/Makefile	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/pci/Makefile	2015-01-01 17:34:32.685496170 +0100
-@@ -17,3 +17,4 @@
- obj-$(CONFIG_SH7780_PCI) +=pci_sh7780.o
- obj-$(CONFIG_TSI108_PCI) += tsi108_pci.o
- obj-$(CONFIG_WINBOND_83C553) += w83c553f.o
-+obj-$(CONFIG_PCIE_LAYERSCAPE) += pcie_layerscape.o
-diff -ruN u-boot-2015.01-rc3/drivers/pci/pcie_layerscape.c u-boot/drivers/pci/pcie_layerscape.c
---- u-boot-2015.01-rc3/drivers/pci/pcie_layerscape.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/drivers/pci/pcie_layerscape.c	2015-01-01 17:34:32.689496104 +0100
-@@ -0,0 +1,51 @@
-+/*
-+ * Copyright 2014 Freescale Semiconductor, Inc.
-+ * Layerscape PCIe driver
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <asm/arch/fsl_serdes.h>
-+#include <pci.h>
-+#include <asm/io.h>
-+#include <asm/pcie_layerscape.h>
-+
-+#ifdef CONFIG_OF_BOARD_SETUP
-+#include <libfdt.h>
-+#include <fdt_support.h>
-+
-+static void ft_pcie_ls_setup(void *blob, const char *pci_compat,
-+			     unsigned long ctrl_addr, enum srds_prtcl dev)
-+{
-+	int off;
-+
-+	off = fdt_node_offset_by_compat_reg(blob, pci_compat,
-+					    (phys_addr_t)ctrl_addr);
-+	if (off < 0)
-+		return;
-+
-+	if (!is_serdes_configured(dev))
-+		fdt_set_node_status(blob, off, FDT_STATUS_DISABLED, 0);
-+}
-+
-+void ft_pcie_setup(void *blob, bd_t *bd)
-+{
-+	#ifdef CONFIG_PCIE1
-+	ft_pcie_ls_setup(blob, FSL_PCIE_COMPAT, CONFIG_SYS_PCIE1_ADDR, PCIE1);
-+	#endif
-+
-+	#ifdef CONFIG_PCIE2
-+	ft_pcie_ls_setup(blob, FSL_PCIE_COMPAT, CONFIG_SYS_PCIE2_ADDR, PCIE2);
-+	#endif
-+}
-+
-+#else
-+void ft_pcie_setup(void *blob, bd_t *bd)
-+{
-+}
-+#endif
-+
-+void pci_init_board(void)
-+{
-+}
-diff -ruN u-boot-2015.01-rc3/drivers/power/tps6586x.c u-boot/drivers/power/tps6586x.c
---- u-boot-2015.01-rc3/drivers/power/tps6586x.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/power/tps6586x.c	2015-01-01 17:34:32.693496038 +0100
-@@ -10,9 +10,7 @@
- #include <asm/io.h>
- #include <i2c.h>
- 
--static int bus_num;		/* I2C bus we are on */
--#define I2C_ADDRESS		0x34	/* chip requires this address */
--static char inited;		/* 1 if we have been inited */
-+static struct udevice *tps6586x_dev;
- 
- enum {
- 	/* Registers that we access */
-@@ -37,13 +35,9 @@
- 	int	i;
- 	uchar	data;
- 	int	retval = -1;
--	int	old_bus_num;
--
--	old_bus_num = i2c_get_bus_num();
--	i2c_set_bus_num(bus_num);
- 
- 	for (i = 0; i < MAX_I2C_RETRY; ++i) {
--		if (!i2c_read(I2C_ADDRESS, reg, 1, &data, 1)) {
-+		if (!i2c_read(tps6586x_dev, reg,  &data, 1)) {
- 			retval = (int)data;
- 			goto exit;
- 		}
-@@ -53,7 +47,6 @@
- 	}
- 
- exit:
--	i2c_set_bus_num(old_bus_num);
- 	debug("pmu_read %x=%x\n", reg, retval);
- 	if (retval < 0)
- 		debug("%s: failed to read register %#x: %d\n", __func__, reg,
-@@ -65,13 +58,9 @@
- {
- 	int	i;
- 	int	retval = -1;
--	int	old_bus_num;
--
--	old_bus_num = i2c_get_bus_num();
--	i2c_set_bus_num(bus_num);
- 
- 	for (i = 0; i < MAX_I2C_RETRY; ++i) {
--		if (!i2c_write(I2C_ADDRESS, reg, 1, data, len)) {
-+		if (!i2c_write(tps6586x_dev, reg, data, len)) {
- 			retval = 0;
- 			goto exit;
- 		}
-@@ -81,7 +70,6 @@
- 	}
- 
- exit:
--	i2c_set_bus_num(old_bus_num);
- 	debug("pmu_write %x=%x: ", reg, retval);
- 	for (i = 0; i < len; i++)
- 		debug("%x ", data[i]);
-@@ -163,7 +151,7 @@
- 	uchar val;
- 	int ret;
- 
--	assert(inited);
-+	assert(tps6586x_dev);
- 	ret = tps6586x_read(PFM_MODE);
- 	if (ret != -1) {
- 		val = (uchar)ret;
-@@ -184,7 +172,7 @@
- 	int sm0, sm1;
- 	int bad;
- 
--	assert(inited);
-+	assert(tps6586x_dev);
- 
- 	/* get current voltage settings */
- 	if (read_voltages(&sm0, &sm1)) {
-@@ -255,10 +243,9 @@
- 	return bad ? -1 : 0;
- }
- 
--int tps6586x_init(int bus)
-+int tps6586x_init(struct udevice *dev)
- {
--	bus_num = bus;
--	inited = 1;
-+	tps6586x_dev = dev;
- 
- 	return 0;
- }
-diff -ruN u-boot-2015.01-rc3/drivers/qe/qe.c u-boot/drivers/qe/qe.c
---- u-boot-2015.01-rc3/drivers/qe/qe.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/qe/qe.c	2015-01-01 17:34:32.693496038 +0100
-@@ -13,6 +13,9 @@
- #include "asm/io.h"
- #include "linux/immap_qe.h"
- #include "qe.h"
-+#ifdef CONFIG_LS102XA
-+#include <asm/arch/immap_ls102xa.h>
-+#endif
- 
- #define MPC85xx_DEVDISR_QE_DISABLE	0x1
- 
-@@ -335,8 +338,12 @@
- 	size_t length;
- 	const struct qe_header *hdr;
- #ifdef CONFIG_DEEP_SLEEP
-+#ifdef CONFIG_LS102XA
-+	struct ccsr_gur __iomem *gur = (void *)CONFIG_SYS_FSL_GUTS_ADDR;
-+#else
- 	ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
- #endif
-+#endif
- 	if (!firmware) {
- 		printf("Invalid address\n");
- 		return -EINVAL;
-@@ -470,8 +477,12 @@
- 	size_t length;
- 	const struct qe_header *hdr;
- #ifdef CONFIG_DEEP_SLEEP
-+#ifdef CONFIG_LS102XA
-+	struct ccsr_gur __iomem *gur = (void *)CONFIG_SYS_FSL_GUTS_ADDR;
-+#else
- 	ccsr_gur_t __iomem *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
- #endif
-+#endif
- 	if (!firmware) {
- 		printf("Invalid address\n");
- 		return -EINVAL;
-diff -ruN u-boot-2015.01-rc3/drivers/serial/Makefile u-boot/drivers/serial/Makefile
---- u-boot-2015.01-rc3/drivers/serial/Makefile	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/serial/Makefile	2015-01-01 17:34:32.697495972 +0100
-@@ -43,7 +43,7 @@
- obj-$(CONFIG_TEGRA_SERIAL) += serial_tegra.o
- obj-$(CONFIG_UNIPHIER_SERIAL) += serial_uniphier.o
- obj-$(CONFIG_OMAP_SERIAL) += serial_omap.o
--obj-$(CONFIG_COREBOOT_SERIAL) += serial_coreboot.o
-+obj-$(CONFIG_X86_SERIAL) += serial_x86.o
- 
- ifndef CONFIG_SPL_BUILD
- obj-$(CONFIG_USB_TTY) += usbtty.o
-diff -ruN u-boot-2015.01-rc3/drivers/serial/serial_coreboot.c u-boot/drivers/serial/serial_coreboot.c
---- u-boot-2015.01-rc3/drivers/serial/serial_coreboot.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/serial/serial_coreboot.c	1970-01-01 01:00:00.000000000 +0100
-@@ -1,38 +0,0 @@
--/*
-- * Copyright (c) 2014 Google, Inc
-- *
-- * SPDX-License-Identifier:	GPL-2.0+
-- */
--
--#include <common.h>
--#include <dm.h>
--#include <ns16550.h>
--#include <serial.h>
--
--static const struct udevice_id coreboot_serial_ids[] = {
--	{ .compatible = "coreboot-uart" },
--	{ }
--};
--
--static int coreboot_serial_ofdata_to_platdata(struct udevice *dev)
--{
--	struct ns16550_platdata *plat = dev_get_platdata(dev);
--	int ret;
--
--	ret = ns16550_serial_ofdata_to_platdata(dev);
--	if (ret)
--		return ret;
--	plat->clock = 1843200;
--
--	return 0;
--}
--U_BOOT_DRIVER(serial_ns16550) = {
--	.name	= "serial_coreboot",
--	.id	= UCLASS_SERIAL,
--	.of_match = coreboot_serial_ids,
--	.ofdata_to_platdata = coreboot_serial_ofdata_to_platdata,
--	.platdata_auto_alloc_size = sizeof(struct ns16550_platdata),
--	.priv_auto_alloc_size = sizeof(struct NS16550),
--	.probe = ns16550_serial_probe,
--	.ops	= &ns16550_serial_ops,
--};
-diff -ruN u-boot-2015.01-rc3/drivers/serial/serial_pl01x.c u-boot/drivers/serial/serial_pl01x.c
---- u-boot-2015.01-rc3/drivers/serial/serial_pl01x.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/serial/serial_pl01x.c	2015-01-01 17:34:32.697495972 +0100
-@@ -348,6 +348,7 @@
- 	.probe = pl01x_serial_probe,
- 	.ops	= &pl01x_serial_ops,
- 	.flags = DM_FLAG_PRE_RELOC,
-+	.priv_auto_alloc_size = sizeof(struct pl01x_priv),
- };
- 
- #endif
-diff -ruN u-boot-2015.01-rc3/drivers/serial/serial_x86.c u-boot/drivers/serial/serial_x86.c
---- u-boot-2015.01-rc3/drivers/serial/serial_x86.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/drivers/serial/serial_x86.c	2015-01-01 17:34:32.697495972 +0100
-@@ -0,0 +1,38 @@
-+/*
-+ * Copyright (c) 2014 Google, Inc
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <dm.h>
-+#include <ns16550.h>
-+#include <serial.h>
-+
-+static const struct udevice_id x86_serial_ids[] = {
-+	{ .compatible = "x86-uart" },
-+	{ }
-+};
-+
-+static int x86_serial_ofdata_to_platdata(struct udevice *dev)
-+{
-+	struct ns16550_platdata *plat = dev_get_platdata(dev);
-+	int ret;
-+
-+	ret = ns16550_serial_ofdata_to_platdata(dev);
-+	if (ret)
-+		return ret;
-+	plat->clock = 1843200;
-+
-+	return 0;
-+}
-+U_BOOT_DRIVER(serial_ns16550) = {
-+	.name	= "serial_x86",
-+	.id	= UCLASS_SERIAL,
-+	.of_match = x86_serial_ids,
-+	.ofdata_to_platdata = x86_serial_ofdata_to_platdata,
-+	.platdata_auto_alloc_size = sizeof(struct ns16550_platdata),
-+	.priv_auto_alloc_size = sizeof(struct NS16550),
-+	.probe = ns16550_serial_probe,
-+	.ops	= &ns16550_serial_ops,
-+};
-diff -ruN u-boot-2015.01-rc3/drivers/spi/cadence_qspi_apb.c u-boot/drivers/spi/cadence_qspi_apb.c
---- u-boot-2015.01-rc3/drivers/spi/cadence_qspi_apb.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/drivers/spi/cadence_qspi_apb.c	2015-01-01 17:34:32.701495908 +0100
-@@ -0,0 +1,898 @@
-+/*
-+ * Copyright (C) 2012 Altera Corporation <www.altera.com>
-+ * All rights reserved.
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions are met:
-+ *  - Redistributions of source code must retain the above copyright
-+ *    notice, this list of conditions and the following disclaimer.
-+ *  - Redistributions in binary form must reproduce the above copyright
-+ *    notice, this list of conditions and the following disclaimer in the
-+ *    documentation and/or other materials provided with the distribution.
-+ *  - Neither the name of the Altera Corporation nor the
-+ *    names of its contributors may be used to endorse or promote products
-+ *    derived from this software without specific prior written permission.
-+ *
-+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-+ * ARE DISCLAIMED. IN NO EVENT SHALL ALTERA CORPORATION BE LIABLE FOR ANY
-+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-+ */
-+
-+#include <common.h>
-+#include <asm/io.h>
-+#include <asm/errno.h>
-+#include "cadence_qspi.h"
-+
-+#define CQSPI_REG_POLL_US			(1) /* 1us */
-+#define CQSPI_REG_RETRY				(10000)
-+#define CQSPI_POLL_IDLE_RETRY			(3)
-+
-+#define CQSPI_FIFO_WIDTH			(4)
-+
-+/* Controller sram size in word */
-+#define CQSPI_REG_SRAM_SIZE_WORD		(128)
-+#define CQSPI_REG_SRAM_RESV_WORDS		(2)
-+#define CQSPI_REG_SRAM_PARTITION_WR		(1)
-+#define CQSPI_REG_SRAM_PARTITION_RD		\
-+	(CQSPI_REG_SRAM_SIZE_WORD - CQSPI_REG_SRAM_RESV_WORDS)
-+#define CQSPI_REG_SRAM_THRESHOLD_WORDS		(50)
-+
-+/* Transfer mode */
-+#define CQSPI_INST_TYPE_SINGLE			(0)
-+#define CQSPI_INST_TYPE_DUAL			(1)
-+#define CQSPI_INST_TYPE_QUAD			(2)
-+
-+#define CQSPI_STIG_DATA_LEN_MAX			(8)
-+#define CQSPI_INDIRECTTRIGGER_ADDR_MASK		(0xFFFFF)
-+
-+#define CQSPI_DUMMY_CLKS_PER_BYTE		(8)
-+#define CQSPI_DUMMY_BYTES_MAX			(4)
-+
-+
-+#define CQSPI_REG_SRAM_FILL_THRESHOLD	\
-+	((CQSPI_REG_SRAM_SIZE_WORD / 2) * CQSPI_FIFO_WIDTH)
-+/****************************************************************************
-+ * Controller's configuration and status register (offset from QSPI_BASE)
-+ ****************************************************************************/
-+#define	CQSPI_REG_CONFIG			0x00
-+#define	CQSPI_REG_CONFIG_CLK_POL_LSB		1
-+#define	CQSPI_REG_CONFIG_CLK_PHA_LSB		2
-+#define	CQSPI_REG_CONFIG_ENABLE_MASK		(1 << 0)
-+#define	CQSPI_REG_CONFIG_DIRECT_MASK		(1 << 7)
-+#define	CQSPI_REG_CONFIG_DECODE_MASK		(1 << 9)
-+#define	CQSPI_REG_CONFIG_XIP_IMM_MASK		(1 << 18)
-+#define	CQSPI_REG_CONFIG_CHIPSELECT_LSB		10
-+#define	CQSPI_REG_CONFIG_BAUD_LSB		19
-+#define	CQSPI_REG_CONFIG_IDLE_LSB		31
-+#define	CQSPI_REG_CONFIG_CHIPSELECT_MASK	0xF
-+#define	CQSPI_REG_CONFIG_BAUD_MASK		0xF
-+
-+#define	CQSPI_REG_RD_INSTR			0x04
-+#define	CQSPI_REG_RD_INSTR_OPCODE_LSB		0
-+#define	CQSPI_REG_RD_INSTR_TYPE_INSTR_LSB	8
-+#define	CQSPI_REG_RD_INSTR_TYPE_ADDR_LSB	12
-+#define	CQSPI_REG_RD_INSTR_TYPE_DATA_LSB	16
-+#define	CQSPI_REG_RD_INSTR_MODE_EN_LSB		20
-+#define	CQSPI_REG_RD_INSTR_DUMMY_LSB		24
-+#define	CQSPI_REG_RD_INSTR_TYPE_INSTR_MASK	0x3
-+#define	CQSPI_REG_RD_INSTR_TYPE_ADDR_MASK	0x3
-+#define	CQSPI_REG_RD_INSTR_TYPE_DATA_MASK	0x3
-+#define	CQSPI_REG_RD_INSTR_DUMMY_MASK		0x1F
-+
-+#define	CQSPI_REG_WR_INSTR			0x08
-+#define	CQSPI_REG_WR_INSTR_OPCODE_LSB		0
-+
-+#define	CQSPI_REG_DELAY				0x0C
-+#define	CQSPI_REG_DELAY_TSLCH_LSB		0
-+#define	CQSPI_REG_DELAY_TCHSH_LSB		8
-+#define	CQSPI_REG_DELAY_TSD2D_LSB		16
-+#define	CQSPI_REG_DELAY_TSHSL_LSB		24
-+#define	CQSPI_REG_DELAY_TSLCH_MASK		0xFF
-+#define	CQSPI_REG_DELAY_TCHSH_MASK		0xFF
-+#define	CQSPI_REG_DELAY_TSD2D_MASK		0xFF
-+#define	CQSPI_REG_DELAY_TSHSL_MASK		0xFF
-+
-+#define	CQSPI_READLCAPTURE			0x10
-+#define	CQSPI_READLCAPTURE_BYPASS_LSB		0
-+#define	CQSPI_READLCAPTURE_DELAY_LSB		1
-+#define	CQSPI_READLCAPTURE_DELAY_MASK		0xF
-+
-+#define	CQSPI_REG_SIZE				0x14
-+#define	CQSPI_REG_SIZE_ADDRESS_LSB		0
-+#define	CQSPI_REG_SIZE_PAGE_LSB			4
-+#define	CQSPI_REG_SIZE_BLOCK_LSB		16
-+#define	CQSPI_REG_SIZE_ADDRESS_MASK		0xF
-+#define	CQSPI_REG_SIZE_PAGE_MASK		0xFFF
-+#define	CQSPI_REG_SIZE_BLOCK_MASK		0x3F
-+
-+#define	CQSPI_REG_SRAMPARTITION			0x18
-+#define	CQSPI_REG_INDIRECTTRIGGER		0x1C
-+
-+#define	CQSPI_REG_REMAP				0x24
-+#define	CQSPI_REG_MODE_BIT			0x28
-+
-+#define	CQSPI_REG_SDRAMLEVEL			0x2C
-+#define	CQSPI_REG_SDRAMLEVEL_RD_LSB		0
-+#define	CQSPI_REG_SDRAMLEVEL_WR_LSB		16
-+#define	CQSPI_REG_SDRAMLEVEL_RD_MASK		0xFFFF
-+#define	CQSPI_REG_SDRAMLEVEL_WR_MASK		0xFFFF
-+
-+#define	CQSPI_REG_IRQSTATUS			0x40
-+#define	CQSPI_REG_IRQMASK			0x44
-+
-+#define	CQSPI_REG_INDIRECTRD			0x60
-+#define	CQSPI_REG_INDIRECTRD_START_MASK		(1 << 0)
-+#define	CQSPI_REG_INDIRECTRD_CANCEL_MASK	(1 << 1)
-+#define	CQSPI_REG_INDIRECTRD_INPROGRESS_MASK	(1 << 2)
-+#define	CQSPI_REG_INDIRECTRD_DONE_MASK		(1 << 5)
-+
-+#define	CQSPI_REG_INDIRECTRDWATERMARK		0x64
-+#define	CQSPI_REG_INDIRECTRDSTARTADDR		0x68
-+#define	CQSPI_REG_INDIRECTRDBYTES		0x6C
-+
-+#define	CQSPI_REG_CMDCTRL			0x90
-+#define	CQSPI_REG_CMDCTRL_EXECUTE_MASK		(1 << 0)
-+#define	CQSPI_REG_CMDCTRL_INPROGRESS_MASK	(1 << 1)
-+#define	CQSPI_REG_CMDCTRL_DUMMY_LSB		7
-+#define	CQSPI_REG_CMDCTRL_WR_BYTES_LSB		12
-+#define	CQSPI_REG_CMDCTRL_WR_EN_LSB		15
-+#define	CQSPI_REG_CMDCTRL_ADD_BYTES_LSB		16
-+#define	CQSPI_REG_CMDCTRL_ADDR_EN_LSB		19
-+#define	CQSPI_REG_CMDCTRL_RD_BYTES_LSB		20
-+#define	CQSPI_REG_CMDCTRL_RD_EN_LSB		23
-+#define	CQSPI_REG_CMDCTRL_OPCODE_LSB		24
-+#define	CQSPI_REG_CMDCTRL_DUMMY_MASK		0x1F
-+#define	CQSPI_REG_CMDCTRL_WR_BYTES_MASK		0x7
-+#define	CQSPI_REG_CMDCTRL_ADD_BYTES_MASK	0x3
-+#define	CQSPI_REG_CMDCTRL_RD_BYTES_MASK		0x7
-+#define	CQSPI_REG_CMDCTRL_OPCODE_MASK		0xFF
-+
-+#define	CQSPI_REG_INDIRECTWR			0x70
-+#define	CQSPI_REG_INDIRECTWR_START_MASK		(1 << 0)
-+#define	CQSPI_REG_INDIRECTWR_CANCEL_MASK	(1 << 1)
-+#define	CQSPI_REG_INDIRECTWR_INPROGRESS_MASK	(1 << 2)
-+#define	CQSPI_REG_INDIRECTWR_DONE_MASK		(1 << 5)
-+
-+#define	CQSPI_REG_INDIRECTWRWATERMARK		0x74
-+#define	CQSPI_REG_INDIRECTWRSTARTADDR		0x78
-+#define	CQSPI_REG_INDIRECTWRBYTES		0x7C
-+
-+#define	CQSPI_REG_CMDADDRESS			0x94
-+#define	CQSPI_REG_CMDREADDATALOWER		0xA0
-+#define	CQSPI_REG_CMDREADDATAUPPER		0xA4
-+#define	CQSPI_REG_CMDWRITEDATALOWER		0xA8
-+#define	CQSPI_REG_CMDWRITEDATAUPPER		0xAC
-+
-+#define CQSPI_REG_IS_IDLE(base)					\
-+	((readl(base + CQSPI_REG_CONFIG) >>		\
-+		CQSPI_REG_CONFIG_IDLE_LSB) & 0x1)
-+
-+#define CQSPI_CAL_DELAY(tdelay_ns, tref_ns, tsclk_ns)		\
-+	((((tdelay_ns) - (tsclk_ns)) / (tref_ns)))
-+
-+#define CQSPI_GET_RD_SRAM_LEVEL(reg_base)			\
-+	(((readl(reg_base + CQSPI_REG_SDRAMLEVEL)) >>	\
-+	CQSPI_REG_SDRAMLEVEL_RD_LSB) & CQSPI_REG_SDRAMLEVEL_RD_MASK)
-+
-+#define CQSPI_GET_WR_SRAM_LEVEL(reg_base)			\
-+	(((readl(reg_base + CQSPI_REG_SDRAMLEVEL)) >>	\
-+	CQSPI_REG_SDRAMLEVEL_WR_LSB) & CQSPI_REG_SDRAMLEVEL_WR_MASK)
-+
-+static unsigned int cadence_qspi_apb_cmd2addr(const unsigned char *addr_buf,
-+	unsigned int addr_width)
-+{
-+	unsigned int addr;
-+
-+	addr = (addr_buf[0] << 16) | (addr_buf[1] << 8) | addr_buf[2];
-+
-+	if (addr_width == 4)
-+		addr = (addr << 8) | addr_buf[3];
-+
-+	return addr;
-+}
-+
-+static void cadence_qspi_apb_read_fifo_data(void *dest,
-+	const void *src_ahb_addr, unsigned int bytes)
-+{
-+	unsigned int temp;
-+	int remaining = bytes;
-+	unsigned int *dest_ptr = (unsigned int *)dest;
-+	unsigned int *src_ptr = (unsigned int *)src_ahb_addr;
-+
-+	while (remaining > 0) {
-+		if (remaining >= CQSPI_FIFO_WIDTH) {
-+			*dest_ptr = readl(src_ptr);
-+			remaining -= CQSPI_FIFO_WIDTH;
-+		} else {
-+			/* dangling bytes */
-+			temp = readl(src_ptr);
-+			memcpy(dest_ptr, &temp, remaining);
-+			break;
-+		}
-+		dest_ptr++;
-+	}
-+
-+	return;
-+}
-+
-+static void cadence_qspi_apb_write_fifo_data(const void *dest_ahb_addr,
-+	const void *src, unsigned int bytes)
-+{
-+	unsigned int temp;
-+	int remaining = bytes;
-+	unsigned int *dest_ptr = (unsigned int *)dest_ahb_addr;
-+	unsigned int *src_ptr = (unsigned int *)src;
-+
-+	while (remaining > 0) {
-+		if (remaining >= CQSPI_FIFO_WIDTH) {
-+			writel(*src_ptr, dest_ptr);
-+			remaining -= sizeof(unsigned int);
-+		} else {
-+			/* dangling bytes */
-+			memcpy(&temp, src_ptr, remaining);
-+			writel(temp, dest_ptr);
-+			break;
-+		}
-+		src_ptr++;
-+	}
-+
-+	return;
-+}
-+
-+/* Read from SRAM FIFO with polling SRAM fill level. */
-+static int qspi_read_sram_fifo_poll(const void *reg_base, void *dest_addr,
-+			const void *src_addr,  unsigned int num_bytes)
-+{
-+	unsigned int remaining = num_bytes;
-+	unsigned int retry;
-+	unsigned int sram_level = 0;
-+	unsigned char *dest = (unsigned char *)dest_addr;
-+
-+	while (remaining > 0) {
-+		retry = CQSPI_REG_RETRY;
-+		while (retry--) {
-+			sram_level = CQSPI_GET_RD_SRAM_LEVEL(reg_base);
-+			if (sram_level)
-+				break;
-+			udelay(1);
-+		}
-+
-+		if (!retry) {
-+			printf("QSPI: No receive data after polling for %d times\n",
-+			       CQSPI_REG_RETRY);
-+			return -1;
-+		}
-+
-+		sram_level *= CQSPI_FIFO_WIDTH;
-+		sram_level = sram_level > remaining ? remaining : sram_level;
-+
-+		/* Read data from FIFO. */
-+		cadence_qspi_apb_read_fifo_data(dest, src_addr, sram_level);
-+		dest += sram_level;
-+		remaining -= sram_level;
-+		udelay(1);
-+	}
-+	return 0;
-+}
-+
-+/* Write to SRAM FIFO with polling SRAM fill level. */
-+static int qpsi_write_sram_fifo_push(struct cadence_spi_platdata *plat,
-+				const void *src_addr, unsigned int num_bytes)
-+{
-+	const void *reg_base = plat->regbase;
-+	void *dest_addr = plat->ahbbase;
-+	unsigned int retry = CQSPI_REG_RETRY;
-+	unsigned int sram_level;
-+	unsigned int wr_bytes;
-+	unsigned char *src = (unsigned char *)src_addr;
-+	int remaining = num_bytes;
-+	unsigned int page_size = plat->page_size;
-+	unsigned int sram_threshold_words = CQSPI_REG_SRAM_THRESHOLD_WORDS;
-+
-+	while (remaining > 0) {
-+		retry = CQSPI_REG_RETRY;
-+		while (retry--) {
-+			sram_level = CQSPI_GET_WR_SRAM_LEVEL(reg_base);
-+			if (sram_level <= sram_threshold_words)
-+				break;
-+		}
-+		if (!retry) {
-+			printf("QSPI: SRAM fill level (0x%08x) not hit lower expected level (0x%08x)",
-+			       sram_level, sram_threshold_words);
-+			return -1;
-+		}
-+		/* Write a page or remaining bytes. */
-+		wr_bytes = (remaining > page_size) ?
-+					page_size : remaining;
-+
-+		cadence_qspi_apb_write_fifo_data(dest_addr, src, wr_bytes);
-+		src += wr_bytes;
-+		remaining -= wr_bytes;
-+	}
-+
-+	return 0;
-+}
-+
-+void cadence_qspi_apb_controller_enable(void *reg_base)
-+{
-+	unsigned int reg;
-+	reg = readl(reg_base + CQSPI_REG_CONFIG);
-+	reg |= CQSPI_REG_CONFIG_ENABLE_MASK;
-+	writel(reg, reg_base + CQSPI_REG_CONFIG);
-+	return;
-+}
-+
-+void cadence_qspi_apb_controller_disable(void *reg_base)
-+{
-+	unsigned int reg;
-+	reg = readl(reg_base + CQSPI_REG_CONFIG);
-+	reg &= ~CQSPI_REG_CONFIG_ENABLE_MASK;
-+	writel(reg, reg_base + CQSPI_REG_CONFIG);
-+	return;
-+}
-+
-+/* Return 1 if idle, otherwise return 0 (busy). */
-+static unsigned int cadence_qspi_wait_idle(void *reg_base)
-+{
-+	unsigned int start, count = 0;
-+	/* timeout in unit of ms */
-+	unsigned int timeout = 5000;
-+
-+	start = get_timer(0);
-+	for ( ; get_timer(start) < timeout ; ) {
-+		if (CQSPI_REG_IS_IDLE(reg_base))
-+			count++;
-+		else
-+			count = 0;
-+		/*
-+		 * Ensure the QSPI controller is in true idle state after
-+		 * reading back the same idle status consecutively
-+		 */
-+		if (count >= CQSPI_POLL_IDLE_RETRY)
-+			return 1;
-+	}
-+
-+	/* Timeout, still in busy mode. */
-+	printf("QSPI: QSPI is still busy after poll for %d times.\n",
-+	       CQSPI_REG_RETRY);
-+	return 0;
-+}
-+
-+void cadence_qspi_apb_readdata_capture(void *reg_base,
-+				unsigned int bypass, unsigned int delay)
-+{
-+	unsigned int reg;
-+	cadence_qspi_apb_controller_disable(reg_base);
-+
-+	reg = readl(reg_base + CQSPI_READLCAPTURE);
-+
-+	if (bypass)
-+		reg |= (1 << CQSPI_READLCAPTURE_BYPASS_LSB);
-+	else
-+		reg &= ~(1 << CQSPI_READLCAPTURE_BYPASS_LSB);
-+
-+	reg &= ~(CQSPI_READLCAPTURE_DELAY_MASK
-+		<< CQSPI_READLCAPTURE_DELAY_LSB);
-+
-+	reg |= ((delay & CQSPI_READLCAPTURE_DELAY_MASK)
-+		<< CQSPI_READLCAPTURE_DELAY_LSB);
-+
-+	writel(reg, reg_base + CQSPI_READLCAPTURE);
-+
-+	cadence_qspi_apb_controller_enable(reg_base);
-+	return;
-+}
-+
-+void cadence_qspi_apb_config_baudrate_div(void *reg_base,
-+	unsigned int ref_clk_hz, unsigned int sclk_hz)
-+{
-+	unsigned int reg;
-+	unsigned int div;
-+
-+	cadence_qspi_apb_controller_disable(reg_base);
-+	reg = readl(reg_base + CQSPI_REG_CONFIG);
-+	reg &= ~(CQSPI_REG_CONFIG_BAUD_MASK << CQSPI_REG_CONFIG_BAUD_LSB);
-+
-+	div = ref_clk_hz / sclk_hz;
-+
-+	if (div > 32)
-+		div = 32;
-+
-+	/* Check if even number. */
-+	if ((div & 1)) {
-+		div = (div / 2);
-+	} else {
-+		if (ref_clk_hz % sclk_hz)
-+			/* ensure generated SCLK doesn't exceed user
-+			specified sclk_hz */
-+			div = (div / 2);
-+		else
-+			div = (div / 2) - 1;
-+	}
-+
-+	debug("%s: ref_clk %dHz sclk %dHz Div 0x%x\n", __func__,
-+	      ref_clk_hz, sclk_hz, div);
-+
-+	div = (div & CQSPI_REG_CONFIG_BAUD_MASK) << CQSPI_REG_CONFIG_BAUD_LSB;
-+	reg |= div;
-+	writel(reg, reg_base + CQSPI_REG_CONFIG);
-+
-+	cadence_qspi_apb_controller_enable(reg_base);
-+	return;
-+}
-+
-+void cadence_qspi_apb_set_clk_mode(void *reg_base,
-+	unsigned int clk_pol, unsigned int clk_pha)
-+{
-+	unsigned int reg;
-+
-+	cadence_qspi_apb_controller_disable(reg_base);
-+	reg = readl(reg_base + CQSPI_REG_CONFIG);
-+	reg &= ~(1 <<
-+		(CQSPI_REG_CONFIG_CLK_POL_LSB | CQSPI_REG_CONFIG_CLK_PHA_LSB));
-+
-+	reg |= ((clk_pol & 0x1) << CQSPI_REG_CONFIG_CLK_POL_LSB);
-+	reg |= ((clk_pha & 0x1) << CQSPI_REG_CONFIG_CLK_PHA_LSB);
-+
-+	writel(reg, reg_base + CQSPI_REG_CONFIG);
-+
-+	cadence_qspi_apb_controller_enable(reg_base);
-+	return;
-+}
-+
-+void cadence_qspi_apb_chipselect(void *reg_base,
-+	unsigned int chip_select, unsigned int decoder_enable)
-+{
-+	unsigned int reg;
-+
-+	cadence_qspi_apb_controller_disable(reg_base);
-+
-+	debug("%s : chipselect %d decode %d\n", __func__, chip_select,
-+	      decoder_enable);
-+
-+	reg = readl(reg_base + CQSPI_REG_CONFIG);
-+	/* docoder */
-+	if (decoder_enable) {
-+		reg |= CQSPI_REG_CONFIG_DECODE_MASK;
-+	} else {
-+		reg &= ~CQSPI_REG_CONFIG_DECODE_MASK;
-+		/* Convert CS if without decoder.
-+		 * CS0 to 4b'1110
-+		 * CS1 to 4b'1101
-+		 * CS2 to 4b'1011
-+		 * CS3 to 4b'0111
-+		 */
-+		chip_select = 0xF & ~(1 << chip_select);
-+	}
-+
-+	reg &= ~(CQSPI_REG_CONFIG_CHIPSELECT_MASK
-+			<< CQSPI_REG_CONFIG_CHIPSELECT_LSB);
-+	reg |= (chip_select & CQSPI_REG_CONFIG_CHIPSELECT_MASK)
-+			<< CQSPI_REG_CONFIG_CHIPSELECT_LSB;
-+	writel(reg, reg_base + CQSPI_REG_CONFIG);
-+
-+	cadence_qspi_apb_controller_enable(reg_base);
-+	return;
-+}
-+
-+void cadence_qspi_apb_delay(void *reg_base,
-+	unsigned int ref_clk, unsigned int sclk_hz,
-+	unsigned int tshsl_ns, unsigned int tsd2d_ns,
-+	unsigned int tchsh_ns, unsigned int tslch_ns)
-+{
-+	unsigned int ref_clk_ns;
-+	unsigned int sclk_ns;
-+	unsigned int tshsl, tchsh, tslch, tsd2d;
-+	unsigned int reg;
-+
-+	cadence_qspi_apb_controller_disable(reg_base);
-+
-+	/* Convert to ns. */
-+	ref_clk_ns = (1000000000) / ref_clk;
-+
-+	/* Convert to ns. */
-+	sclk_ns = (1000000000) / sclk_hz;
-+
-+	/* Plus 1 to round up 1 clock cycle. */
-+	tshsl = CQSPI_CAL_DELAY(tshsl_ns, ref_clk_ns, sclk_ns) + 1;
-+	tchsh = CQSPI_CAL_DELAY(tchsh_ns, ref_clk_ns, sclk_ns) + 1;
-+	tslch = CQSPI_CAL_DELAY(tslch_ns, ref_clk_ns, sclk_ns) + 1;
-+	tsd2d = CQSPI_CAL_DELAY(tsd2d_ns, ref_clk_ns, sclk_ns) + 1;
-+
-+	reg = ((tshsl & CQSPI_REG_DELAY_TSHSL_MASK)
-+			<< CQSPI_REG_DELAY_TSHSL_LSB);
-+	reg |= ((tchsh & CQSPI_REG_DELAY_TCHSH_MASK)
-+			<< CQSPI_REG_DELAY_TCHSH_LSB);
-+	reg |= ((tslch & CQSPI_REG_DELAY_TSLCH_MASK)
-+			<< CQSPI_REG_DELAY_TSLCH_LSB);
-+	reg |= ((tsd2d & CQSPI_REG_DELAY_TSD2D_MASK)
-+			<< CQSPI_REG_DELAY_TSD2D_LSB);
-+	writel(reg, reg_base + CQSPI_REG_DELAY);
-+
-+	cadence_qspi_apb_controller_enable(reg_base);
-+	return;
-+}
-+
-+void cadence_qspi_apb_controller_init(struct cadence_spi_platdata *plat)
-+{
-+	unsigned reg;
-+
-+	cadence_qspi_apb_controller_disable(plat->regbase);
-+
-+	/* Configure the device size and address bytes */
-+	reg = readl(plat->regbase + CQSPI_REG_SIZE);
-+	/* Clear the previous value */
-+	reg &= ~(CQSPI_REG_SIZE_PAGE_MASK << CQSPI_REG_SIZE_PAGE_LSB);
-+	reg &= ~(CQSPI_REG_SIZE_BLOCK_MASK << CQSPI_REG_SIZE_BLOCK_LSB);
-+	reg |= (plat->page_size << CQSPI_REG_SIZE_PAGE_LSB);
-+	reg |= (plat->block_size << CQSPI_REG_SIZE_BLOCK_LSB);
-+	writel(reg, plat->regbase + CQSPI_REG_SIZE);
-+
-+	/* Configure the remap address register, no remap */
-+	writel(0, plat->regbase + CQSPI_REG_REMAP);
-+
-+	/* Disable all interrupts */
-+	writel(0, plat->regbase + CQSPI_REG_IRQMASK);
-+
-+	cadence_qspi_apb_controller_enable(plat->regbase);
-+	return;
-+}
-+
-+static int cadence_qspi_apb_exec_flash_cmd(void *reg_base,
-+	unsigned int reg)
-+{
-+	unsigned int retry = CQSPI_REG_RETRY;
-+
-+	/* Write the CMDCTRL without start execution. */
-+	writel(reg, reg_base + CQSPI_REG_CMDCTRL);
-+	/* Start execute */
-+	reg |= CQSPI_REG_CMDCTRL_EXECUTE_MASK;
-+	writel(reg, reg_base + CQSPI_REG_CMDCTRL);
-+
-+	while (retry--) {
-+		reg = readl(reg_base + CQSPI_REG_CMDCTRL);
-+		if ((reg & CQSPI_REG_CMDCTRL_INPROGRESS_MASK) == 0)
-+			break;
-+		udelay(1);
-+	}
-+
-+	if (!retry) {
-+		printf("QSPI: flash command execution timeout\n");
-+		return -EIO;
-+	}
-+
-+	/* Polling QSPI idle status. */
-+	if (!cadence_qspi_wait_idle(reg_base))
-+		return -EIO;
-+
-+	return 0;
-+}
-+
-+/* For command RDID, RDSR. */
-+int cadence_qspi_apb_command_read(void *reg_base,
-+	unsigned int cmdlen, const u8 *cmdbuf, unsigned int rxlen,
-+	u8 *rxbuf)
-+{
-+	unsigned int reg;
-+	unsigned int read_len;
-+	int status;
-+
-+	if (!cmdlen || rxlen > CQSPI_STIG_DATA_LEN_MAX || rxbuf == NULL) {
-+		printf("QSPI: Invalid input arguments cmdlen %d rxlen %d\n",
-+		       cmdlen, rxlen);
-+		return -EINVAL;
-+	}
-+
-+	reg = cmdbuf[0] << CQSPI_REG_CMDCTRL_OPCODE_LSB;
-+
-+	reg |= (0x1 << CQSPI_REG_CMDCTRL_RD_EN_LSB);
-+
-+	/* 0 means 1 byte. */
-+	reg |= (((rxlen - 1) & CQSPI_REG_CMDCTRL_RD_BYTES_MASK)
-+		<< CQSPI_REG_CMDCTRL_RD_BYTES_LSB);
-+	status = cadence_qspi_apb_exec_flash_cmd(reg_base, reg);
-+	if (status != 0)
-+		return status;
-+
-+	reg = readl(reg_base + CQSPI_REG_CMDREADDATALOWER);
-+
-+	/* Put the read value into rx_buf */
-+	read_len = (rxlen > 4) ? 4 : rxlen;
-+	memcpy(rxbuf, &reg, read_len);
-+	rxbuf += read_len;
-+
-+	if (rxlen > 4) {
-+		reg = readl(reg_base + CQSPI_REG_CMDREADDATAUPPER);
-+
-+		read_len = rxlen - read_len;
-+		memcpy(rxbuf, &reg, read_len);
-+	}
-+	return 0;
-+}
-+
-+/* For commands: WRSR, WREN, WRDI, CHIP_ERASE, BE, etc. */
-+int cadence_qspi_apb_command_write(void *reg_base, unsigned int cmdlen,
-+	const u8 *cmdbuf, unsigned int txlen,  const u8 *txbuf)
-+{
-+	unsigned int reg = 0;
-+	unsigned int addr_value;
-+	unsigned int wr_data;
-+	unsigned int wr_len;
-+
-+	if (!cmdlen || cmdlen > 5 || txlen > 8 || cmdbuf == NULL) {
-+		printf("QSPI: Invalid input arguments cmdlen %d txlen %d\n",
-+		       cmdlen, txlen);
-+		return -EINVAL;
-+	}
-+
-+	reg |= cmdbuf[0] << CQSPI_REG_CMDCTRL_OPCODE_LSB;
-+
-+	if (cmdlen == 4 || cmdlen == 5) {
-+		/* Command with address */
-+		reg |= (0x1 << CQSPI_REG_CMDCTRL_ADDR_EN_LSB);
-+		/* Number of bytes to write. */
-+		reg |= ((cmdlen - 2) & CQSPI_REG_CMDCTRL_ADD_BYTES_MASK)
-+			<< CQSPI_REG_CMDCTRL_ADD_BYTES_LSB;
-+		/* Get address */
-+		addr_value = cadence_qspi_apb_cmd2addr(&cmdbuf[1],
-+			cmdlen >= 5 ? 4 : 3);
-+
-+		writel(addr_value, reg_base + CQSPI_REG_CMDADDRESS);
-+	}
-+
-+	if (txlen) {
-+		/* writing data = yes */
-+		reg |= (0x1 << CQSPI_REG_CMDCTRL_WR_EN_LSB);
-+		reg |= ((txlen - 1) & CQSPI_REG_CMDCTRL_WR_BYTES_MASK)
-+			<< CQSPI_REG_CMDCTRL_WR_BYTES_LSB;
-+
-+		wr_len = txlen > 4 ? 4 : txlen;
-+		memcpy(&wr_data, txbuf, wr_len);
-+		writel(wr_data, reg_base +
-+			CQSPI_REG_CMDWRITEDATALOWER);
-+
-+		if (txlen > 4) {
-+			txbuf += wr_len;
-+			wr_len = txlen - wr_len;
-+			memcpy(&wr_data, txbuf, wr_len);
-+			writel(wr_data, reg_base +
-+				CQSPI_REG_CMDWRITEDATAUPPER);
-+		}
-+	}
-+
-+	/* Execute the command */
-+	return cadence_qspi_apb_exec_flash_cmd(reg_base, reg);
-+}
-+
-+/* Opcode + Address (3/4 bytes) + dummy bytes (0-4 bytes) */
-+int cadence_qspi_apb_indirect_read_setup(struct cadence_spi_platdata *plat,
-+	unsigned int cmdlen, const u8 *cmdbuf)
-+{
-+	unsigned int reg;
-+	unsigned int rd_reg;
-+	unsigned int addr_value;
-+	unsigned int dummy_clk;
-+	unsigned int dummy_bytes;
-+	unsigned int addr_bytes;
-+
-+	/*
-+	 * Identify addr_byte. All NOR flash device drivers are using fast read
-+	 * which always expecting 1 dummy byte, 1 cmd byte and 3/4 addr byte.
-+	 * With that, the length is in value of 5 or 6. Only FRAM chip from
-+	 * ramtron using normal read (which won't need dummy byte).
-+	 * Unlikely NOR flash using normal read due to performance issue.
-+	 */
-+	if (cmdlen >= 5)
-+		/* to cater fast read where cmd + addr + dummy */
-+		addr_bytes = cmdlen - 2;
-+	else
-+		/* for normal read (only ramtron as of now) */
-+		addr_bytes = cmdlen - 1;
-+
-+	/* Setup the indirect trigger address */
-+	writel(((u32)plat->ahbbase & CQSPI_INDIRECTTRIGGER_ADDR_MASK),
-+	       plat->regbase + CQSPI_REG_INDIRECTTRIGGER);
-+
-+	/* Configure SRAM partition for read. */
-+	writel(CQSPI_REG_SRAM_PARTITION_RD, plat->regbase +
-+	       CQSPI_REG_SRAMPARTITION);
-+
-+	/* Configure the opcode */
-+	rd_reg = cmdbuf[0] << CQSPI_REG_RD_INSTR_OPCODE_LSB;
-+
-+#if (CONFIG_SPI_FLASH_QUAD == 1)
-+	/* Instruction and address at DQ0, data at DQ0-3. */
-+	rd_reg |= CQSPI_INST_TYPE_QUAD << CQSPI_REG_RD_INSTR_TYPE_DATA_LSB;
-+#endif
-+
-+	/* Get address */
-+	addr_value = cadence_qspi_apb_cmd2addr(&cmdbuf[1], addr_bytes);
-+	writel(addr_value, plat->regbase + CQSPI_REG_INDIRECTRDSTARTADDR);
-+
-+	/* The remaining lenght is dummy bytes. */
-+	dummy_bytes = cmdlen - addr_bytes - 1;
-+	if (dummy_bytes) {
-+		if (dummy_bytes > CQSPI_DUMMY_BYTES_MAX)
-+			dummy_bytes = CQSPI_DUMMY_BYTES_MAX;
-+
-+		rd_reg |= (1 << CQSPI_REG_RD_INSTR_MODE_EN_LSB);
-+#if defined(CONFIG_SPL_SPI_XIP) && defined(CONFIG_SPL_BUILD)
-+		writel(0x0, plat->regbase + CQSPI_REG_MODE_BIT);
-+#else
-+		writel(0xFF, plat->regbase + CQSPI_REG_MODE_BIT);
-+#endif
-+
-+		/* Convert to clock cycles. */
-+		dummy_clk = dummy_bytes * CQSPI_DUMMY_CLKS_PER_BYTE;
-+		/* Need to minus the mode byte (8 clocks). */
-+		dummy_clk -= CQSPI_DUMMY_CLKS_PER_BYTE;
-+
-+		if (dummy_clk)
-+			rd_reg |= (dummy_clk & CQSPI_REG_RD_INSTR_DUMMY_MASK)
-+				<< CQSPI_REG_RD_INSTR_DUMMY_LSB;
-+	}
-+
-+	writel(rd_reg, plat->regbase + CQSPI_REG_RD_INSTR);
-+
-+	/* set device size */
-+	reg = readl(plat->regbase + CQSPI_REG_SIZE);
-+	reg &= ~CQSPI_REG_SIZE_ADDRESS_MASK;
-+	reg |= (addr_bytes - 1);
-+	writel(reg, plat->regbase + CQSPI_REG_SIZE);
-+	return 0;
-+}
-+
-+int cadence_qspi_apb_indirect_read_execute(struct cadence_spi_platdata *plat,
-+	unsigned int rxlen, u8 *rxbuf)
-+{
-+	unsigned int reg;
-+
-+	writel(rxlen, plat->regbase + CQSPI_REG_INDIRECTRDBYTES);
-+
-+	/* Start the indirect read transfer */
-+	writel(CQSPI_REG_INDIRECTRD_START_MASK,
-+	       plat->regbase + CQSPI_REG_INDIRECTRD);
-+
-+	if (qspi_read_sram_fifo_poll(plat->regbase, (void *)rxbuf,
-+				     (const void *)plat->ahbbase, rxlen))
-+		goto failrd;
-+
-+	/* Check flash indirect controller */
-+	reg = readl(plat->regbase + CQSPI_REG_INDIRECTRD);
-+	if (!(reg & CQSPI_REG_INDIRECTRD_DONE_MASK)) {
-+		reg = readl(plat->regbase + CQSPI_REG_INDIRECTRD);
-+		printf("QSPI: indirect completion status error with reg 0x%08x\n",
-+		       reg);
-+		goto failrd;
-+	}
-+
-+	/* Clear indirect completion status */
-+	writel(CQSPI_REG_INDIRECTRD_DONE_MASK,
-+	       plat->regbase + CQSPI_REG_INDIRECTRD);
-+	return 0;
-+
-+failrd:
-+	/* Cancel the indirect read */
-+	writel(CQSPI_REG_INDIRECTRD_CANCEL_MASK,
-+	       plat->regbase + CQSPI_REG_INDIRECTRD);
-+	return -1;
-+}
-+
-+/* Opcode + Address (3/4 bytes) */
-+int cadence_qspi_apb_indirect_write_setup(struct cadence_spi_platdata *plat,
-+	unsigned int cmdlen, const u8 *cmdbuf)
-+{
-+	unsigned int reg;
-+	unsigned int addr_bytes = cmdlen > 4 ? 4 : 3;
-+
-+	if (cmdlen < 4 || cmdbuf == NULL) {
-+		printf("QSPI: iInvalid input argument, len %d cmdbuf 0x%08x\n",
-+		       cmdlen, (unsigned int)cmdbuf);
-+		return -EINVAL;
-+	}
-+	/* Setup the indirect trigger address */
-+	writel(((u32)plat->ahbbase & CQSPI_INDIRECTTRIGGER_ADDR_MASK),
-+	       plat->regbase + CQSPI_REG_INDIRECTTRIGGER);
-+
-+	writel(CQSPI_REG_SRAM_PARTITION_WR,
-+	       plat->regbase + CQSPI_REG_SRAMPARTITION);
-+
-+	/* Configure the opcode */
-+	reg = cmdbuf[0] << CQSPI_REG_WR_INSTR_OPCODE_LSB;
-+	writel(reg, plat->regbase + CQSPI_REG_WR_INSTR);
-+
-+	/* Setup write address. */
-+	reg = cadence_qspi_apb_cmd2addr(&cmdbuf[1], addr_bytes);
-+	writel(reg, plat->regbase + CQSPI_REG_INDIRECTWRSTARTADDR);
-+
-+	reg = readl(plat->regbase + CQSPI_REG_SIZE);
-+	reg &= ~CQSPI_REG_SIZE_ADDRESS_MASK;
-+	reg |= (addr_bytes - 1);
-+	writel(reg, plat->regbase + CQSPI_REG_SIZE);
-+	return 0;
-+}
-+
-+int cadence_qspi_apb_indirect_write_execute(struct cadence_spi_platdata *plat,
-+	unsigned int txlen, const u8 *txbuf)
-+{
-+	unsigned int reg = 0;
-+	unsigned int retry;
-+
-+	/* Configure the indirect read transfer bytes */
-+	writel(txlen, plat->regbase + CQSPI_REG_INDIRECTWRBYTES);
-+
-+	/* Start the indirect write transfer */
-+	writel(CQSPI_REG_INDIRECTWR_START_MASK,
-+	       plat->regbase + CQSPI_REG_INDIRECTWR);
-+
-+	if (qpsi_write_sram_fifo_push(plat, (const void *)txbuf, txlen))
-+		goto failwr;
-+
-+	/* Wait until last write is completed (FIFO empty) */
-+	retry = CQSPI_REG_RETRY;
-+	while (retry--) {
-+		reg = CQSPI_GET_WR_SRAM_LEVEL(plat->regbase);
-+		if (reg == 0)
-+			break;
-+
-+		udelay(1);
-+	}
-+
-+	if (reg != 0) {
-+		printf("QSPI: timeout for indirect write\n");
-+		goto failwr;
-+	}
-+
-+	/* Check flash indirect controller status */
-+	retry = CQSPI_REG_RETRY;
-+	while (retry--) {
-+		reg = readl(plat->regbase + CQSPI_REG_INDIRECTWR);
-+		if (reg & CQSPI_REG_INDIRECTWR_DONE_MASK)
-+			break;
-+		udelay(1);
-+	}
-+
-+	if (!(reg & CQSPI_REG_INDIRECTWR_DONE_MASK)) {
-+		printf("QSPI: indirect completion status error with reg 0x%08x\n",
-+		       reg);
-+		goto failwr;
-+	}
-+
-+	/* Clear indirect completion status */
-+	writel(CQSPI_REG_INDIRECTWR_DONE_MASK,
-+	       plat->regbase + CQSPI_REG_INDIRECTWR);
-+	return 0;
-+
-+failwr:
-+	/* Cancel the indirect write */
-+	writel(CQSPI_REG_INDIRECTWR_CANCEL_MASK,
-+	       plat->regbase + CQSPI_REG_INDIRECTWR);
-+	return -1;
-+}
-+
-+void cadence_qspi_apb_enter_xip(void *reg_base, char xip_dummy)
-+{
-+	unsigned int reg;
-+
-+	/* enter XiP mode immediately and enable direct mode */
-+	reg = readl(reg_base + CQSPI_REG_CONFIG);
-+	reg |= CQSPI_REG_CONFIG_ENABLE_MASK;
-+	reg |= CQSPI_REG_CONFIG_DIRECT_MASK;
-+	reg |= CQSPI_REG_CONFIG_XIP_IMM_MASK;
-+	writel(reg, reg_base + CQSPI_REG_CONFIG);
-+
-+	/* keep the XiP mode */
-+	writel(xip_dummy, reg_base + CQSPI_REG_MODE_BIT);
-+
-+	/* Enable mode bit at devrd */
-+	reg = readl(reg_base + CQSPI_REG_RD_INSTR);
-+	reg |= (1 << CQSPI_REG_RD_INSTR_MODE_EN_LSB);
-+	writel(reg, reg_base + CQSPI_REG_RD_INSTR);
-+}
-diff -ruN u-boot-2015.01-rc3/drivers/spi/cadence_qspi.c u-boot/drivers/spi/cadence_qspi.c
---- u-boot-2015.01-rc3/drivers/spi/cadence_qspi.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/drivers/spi/cadence_qspi.c	2015-01-01 17:34:32.701495908 +0100
-@@ -0,0 +1,345 @@
-+/*
-+ * Copyright (C) 2012
-+ * Altera Corporation <www.altera.com>
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#include <common.h>
-+#include <dm.h>
-+#include <fdtdec.h>
-+#include <malloc.h>
-+#include <spi.h>
-+#include <asm/errno.h>
-+#include "cadence_qspi.h"
-+
-+#define CQSPI_STIG_READ			0
-+#define CQSPI_STIG_WRITE		1
-+#define CQSPI_INDIRECT_READ		2
-+#define CQSPI_INDIRECT_WRITE		3
-+
-+DECLARE_GLOBAL_DATA_PTR;
-+
-+static int cadence_spi_write_speed(struct udevice *bus, uint hz)
-+{
-+	struct cadence_spi_platdata *plat = bus->platdata;
-+	struct cadence_spi_priv *priv = dev_get_priv(bus);
-+
-+	cadence_qspi_apb_config_baudrate_div(priv->regbase,
-+					     CONFIG_CQSPI_REF_CLK, hz);
-+
-+	/* Reconfigure delay timing if speed is changed. */
-+	cadence_qspi_apb_delay(priv->regbase, CONFIG_CQSPI_REF_CLK, hz,
-+			       plat->tshsl_ns, plat->tsd2d_ns,
-+			       plat->tchsh_ns, plat->tslch_ns);
-+
-+	return 0;
-+}
-+
-+/* Calibration sequence to determine the read data capture delay register */
-+static int spi_calibration(struct udevice *bus)
-+{
-+	struct cadence_spi_platdata *plat = bus->platdata;
-+	struct cadence_spi_priv *priv = dev_get_priv(bus);
-+	void *base = priv->regbase;
-+	u8 opcode_rdid = 0x9F;
-+	unsigned int idcode = 0, temp = 0;
-+	int err = 0, i, range_lo = -1, range_hi = -1;
-+
-+	/* start with slowest clock (1 MHz) */
-+	cadence_spi_write_speed(bus, 1000000);
-+
-+	/* configure the read data capture delay register to 0 */
-+	cadence_qspi_apb_readdata_capture(base, 1, 0);
-+
-+	/* Enable QSPI */
-+	cadence_qspi_apb_controller_enable(base);
-+
-+	/* read the ID which will be our golden value */
-+	err = cadence_qspi_apb_command_read(base, 1, &opcode_rdid,
-+		3, (u8 *)&idcode);
-+	if (err) {
-+		puts("SF: Calibration failed (read)\n");
-+		return err;
-+	}
-+
-+	/* use back the intended clock and find low range */
-+	cadence_spi_write_speed(bus, plat->max_hz);
-+	for (i = 0; i < CQSPI_READ_CAPTURE_MAX_DELAY; i++) {
-+		/* Disable QSPI */
-+		cadence_qspi_apb_controller_disable(base);
-+
-+		/* reconfigure the read data capture delay register */
-+		cadence_qspi_apb_readdata_capture(base, 1, i);
-+
-+		/* Enable back QSPI */
-+		cadence_qspi_apb_controller_enable(base);
-+
-+		/* issue a RDID to get the ID value */
-+		err = cadence_qspi_apb_command_read(base, 1, &opcode_rdid,
-+			3, (u8 *)&temp);
-+		if (err) {
-+			puts("SF: Calibration failed (read)\n");
-+			return err;
-+		}
-+
-+		/* search for range lo */
-+		if (range_lo == -1 && temp == idcode) {
-+			range_lo = i;
-+			continue;
-+		}
-+
-+		/* search for range hi */
-+		if (range_lo != -1 && temp != idcode) {
-+			range_hi = i - 1;
-+			break;
-+		}
-+		range_hi = i;
-+	}
-+
-+	if (range_lo == -1) {
-+		puts("SF: Calibration failed (low range)\n");
-+		return err;
-+	}
-+
-+	/* Disable QSPI for subsequent initialization */
-+	cadence_qspi_apb_controller_disable(base);
-+
-+	/* configure the final value for read data capture delay register */
-+	cadence_qspi_apb_readdata_capture(base, 1, (range_hi + range_lo) / 2);
-+	debug("SF: Read data capture delay calibrated to %i (%i - %i)\n",
-+	      (range_hi + range_lo) / 2, range_lo, range_hi);
-+
-+	/* just to ensure we do once only when speed or chip select change */
-+	priv->qspi_calibrated_hz = plat->max_hz;
-+	priv->qspi_calibrated_cs = spi_chip_select(bus);
-+
-+	return 0;
-+}
-+
-+static int cadence_spi_set_speed(struct udevice *bus, uint hz)
-+{
-+	struct cadence_spi_platdata *plat = bus->platdata;
-+	struct cadence_spi_priv *priv = dev_get_priv(bus);
-+	int err;
-+
-+	/* Disable QSPI */
-+	cadence_qspi_apb_controller_disable(priv->regbase);
-+
-+	cadence_spi_write_speed(bus, hz);
-+
-+	/* Calibration required for different SCLK speed or chip select */
-+	if (priv->qspi_calibrated_hz != plat->max_hz ||
-+	    priv->qspi_calibrated_cs != spi_chip_select(bus)) {
-+		err = spi_calibration(bus);
-+		if (err)
-+			return err;
-+	}
-+
-+	/* Enable QSPI */
-+	cadence_qspi_apb_controller_enable(priv->regbase);
-+
-+	debug("%s: speed=%d\n", __func__, hz);
-+
-+	return 0;
-+}
-+
-+static int cadence_spi_probe(struct udevice *bus)
-+{
-+	struct cadence_spi_platdata *plat = bus->platdata;
-+	struct cadence_spi_priv *priv = dev_get_priv(bus);
-+
-+	priv->regbase = plat->regbase;
-+	priv->ahbbase = plat->ahbbase;
-+
-+	if (!priv->qspi_is_init) {
-+		cadence_qspi_apb_controller_init(plat);
-+		priv->qspi_is_init = 1;
-+	}
-+
-+	return 0;
-+}
-+
-+static int cadence_spi_set_mode(struct udevice *bus, uint mode)
-+{
-+	struct cadence_spi_priv *priv = dev_get_priv(bus);
-+	unsigned int clk_pol = (mode & SPI_CPOL) ? 1 : 0;
-+	unsigned int clk_pha = (mode & SPI_CPHA) ? 1 : 0;
-+
-+	/* Disable QSPI */
-+	cadence_qspi_apb_controller_disable(priv->regbase);
-+
-+	/* Set SPI mode */
-+	cadence_qspi_apb_set_clk_mode(priv->regbase, clk_pol, clk_pha);
-+
-+	/* Enable QSPI */
-+	cadence_qspi_apb_controller_enable(priv->regbase);
-+
-+	return 0;
-+}
-+
-+static int cadence_spi_xfer(struct udevice *dev, unsigned int bitlen,
-+			    const void *dout, void *din, unsigned long flags)
-+{
-+	struct udevice *bus = dev->parent;
-+	struct cadence_spi_platdata *plat = bus->platdata;
-+	struct cadence_spi_priv *priv = dev_get_priv(bus);
-+	void *base = priv->regbase;
-+	u8 *cmd_buf = priv->cmd_buf;
-+	size_t data_bytes;
-+	int err = 0;
-+	u32 mode = CQSPI_STIG_WRITE;
-+
-+	if (flags & SPI_XFER_BEGIN) {
-+		/* copy command to local buffer */
-+		priv->cmd_len = bitlen / 8;
-+		memcpy(cmd_buf, dout, priv->cmd_len);
-+	}
-+
-+	if (flags == (SPI_XFER_BEGIN | SPI_XFER_END)) {
-+		/* if start and end bit are set, the data bytes is 0. */
-+		data_bytes = 0;
-+	} else {
-+		data_bytes = bitlen / 8;
-+	}
-+	debug("%s: len=%d [bytes]\n", __func__, data_bytes);
-+
-+	/* Set Chip select */
-+	cadence_qspi_apb_chipselect(base, spi_chip_select(dev),
-+				    CONFIG_CQSPI_DECODER);
-+
-+	if ((flags & SPI_XFER_END) || (flags == 0)) {
-+		if (priv->cmd_len == 0) {
-+			printf("QSPI: Error, command is empty.\n");
-+			return -1;
-+		}
-+
-+		if (din && data_bytes) {
-+			/* read */
-+			/* Use STIG if no address. */
-+			if (!CQSPI_IS_ADDR(priv->cmd_len))
-+				mode = CQSPI_STIG_READ;
-+			else
-+				mode = CQSPI_INDIRECT_READ;
-+		} else if (dout && !(flags & SPI_XFER_BEGIN)) {
-+			/* write */
-+			if (!CQSPI_IS_ADDR(priv->cmd_len))
-+				mode = CQSPI_STIG_WRITE;
-+			else
-+				mode = CQSPI_INDIRECT_WRITE;
-+		}
-+
-+		switch (mode) {
-+		case CQSPI_STIG_READ:
-+			err = cadence_qspi_apb_command_read(
-+				base, priv->cmd_len, cmd_buf,
-+				data_bytes, din);
-+
-+		break;
-+		case CQSPI_STIG_WRITE:
-+			err = cadence_qspi_apb_command_write(base,
-+				priv->cmd_len, cmd_buf,
-+				data_bytes, dout);
-+		break;
-+		case CQSPI_INDIRECT_READ:
-+			err = cadence_qspi_apb_indirect_read_setup(plat,
-+				priv->cmd_len, cmd_buf);
-+			if (!err) {
-+				err = cadence_qspi_apb_indirect_read_execute
-+				(plat, data_bytes, din);
-+			}
-+		break;
-+		case CQSPI_INDIRECT_WRITE:
-+			err = cadence_qspi_apb_indirect_write_setup
-+				(plat, priv->cmd_len, cmd_buf);
-+			if (!err) {
-+				err = cadence_qspi_apb_indirect_write_execute
-+				(plat, data_bytes, dout);
-+			}
-+		break;
-+		default:
-+			err = -1;
-+			break;
-+		}
-+
-+		if (flags & SPI_XFER_END) {
-+			/* clear command buffer */
-+			memset(cmd_buf, 0, sizeof(priv->cmd_buf));
-+			priv->cmd_len = 0;
-+		}
-+	}
-+
-+	return err;
-+}
-+
-+static int cadence_spi_ofdata_to_platdata(struct udevice *bus)
-+{
-+	struct cadence_spi_platdata *plat = bus->platdata;
-+	const void *blob = gd->fdt_blob;
-+	int node = bus->of_offset;
-+	int subnode;
-+	u32 data[4];
-+	int ret;
-+
-+	/* 2 base addresses are needed, lets get them from the DT */
-+	ret = fdtdec_get_int_array(blob, node, "reg", data, ARRAY_SIZE(data));
-+	if (ret) {
-+		printf("Error: Can't get base addresses (ret=%d)!\n", ret);
-+		return -ENODEV;
-+	}
-+
-+	plat->regbase = (void *)data[0];
-+	plat->ahbbase = (void *)data[2];
-+
-+	/* Use 500KHz as a suitable default */
-+	plat->max_hz = fdtdec_get_int(blob, node, "spi-max-frequency",
-+				      500000);
-+
-+	/* All other paramters are embedded in the child node */
-+	subnode = fdt_first_subnode(blob, node);
-+	if (!subnode) {
-+		printf("Error: subnode with SPI flash config missing!\n");
-+		return -ENODEV;
-+	}
-+
-+	/* Read other parameters from DT */
-+	plat->page_size = fdtdec_get_int(blob, subnode, "page-size", 256);
-+	plat->block_size = fdtdec_get_int(blob, subnode, "block-size", 16);
-+	plat->tshsl_ns = fdtdec_get_int(blob, subnode, "tshsl-ns", 200);
-+	plat->tsd2d_ns = fdtdec_get_int(blob, subnode, "tsd2d-ns", 255);
-+	plat->tchsh_ns = fdtdec_get_int(blob, subnode, "tchsh-ns", 20);
-+	plat->tslch_ns = fdtdec_get_int(blob, subnode, "tslch-ns", 20);
-+
-+	debug("%s: regbase=%p ahbbase=%p max-frequency=%d page-size=%d\n",
-+	      __func__, plat->regbase, plat->ahbbase, plat->max_hz,
-+	      plat->page_size);
-+
-+	return 0;
-+}
-+
-+static const struct dm_spi_ops cadence_spi_ops = {
-+	.xfer		= cadence_spi_xfer,
-+	.set_speed	= cadence_spi_set_speed,
-+	.set_mode	= cadence_spi_set_mode,
-+	/*
-+	 * cs_info is not needed, since we require all chip selects to be
-+	 * in the device tree explicitly
-+	 */
-+};
-+
-+static const struct udevice_id cadence_spi_ids[] = {
-+	{ .compatible = "cadence,qspi" },
-+	{ }
-+};
-+
-+U_BOOT_DRIVER(cadence_spi) = {
-+	.name = "cadence_spi",
-+	.id = UCLASS_SPI,
-+	.of_match = cadence_spi_ids,
-+	.ops = &cadence_spi_ops,
-+	.ofdata_to_platdata = cadence_spi_ofdata_to_platdata,
-+	.platdata_auto_alloc_size = sizeof(struct cadence_spi_platdata),
-+	.priv_auto_alloc_size = sizeof(struct cadence_spi_priv),
-+	.per_child_auto_alloc_size = sizeof(struct spi_slave),
-+	.probe = cadence_spi_probe,
-+};
-diff -ruN u-boot-2015.01-rc3/drivers/spi/cadence_qspi.h u-boot/drivers/spi/cadence_qspi.h
---- u-boot-2015.01-rc3/drivers/spi/cadence_qspi.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/drivers/spi/cadence_qspi.h	2015-01-01 17:34:32.701495908 +0100
-@@ -0,0 +1,76 @@
-+/*
-+ * Copyright (C) 2012
-+ * Altera Corporation <www.altera.com>
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#ifndef __CADENCE_QSPI_H__
-+#define __CADENCE_QSPI_H__
-+
-+#define CQSPI_IS_ADDR(cmd_len)		(cmd_len > 1 ? 1 : 0)
-+
-+#define CQSPI_NO_DECODER_MAX_CS		4
-+#define CQSPI_DECODER_MAX_CS		16
-+#define CQSPI_READ_CAPTURE_MAX_DELAY	16
-+
-+struct cadence_spi_platdata {
-+	unsigned int	max_hz;
-+	void		*regbase;
-+	void		*ahbbase;
-+
-+	u32		page_size;
-+	u32		block_size;
-+	u32		tshsl_ns;
-+	u32		tsd2d_ns;
-+	u32		tchsh_ns;
-+	u32		tslch_ns;
-+};
-+
-+struct cadence_spi_priv {
-+	void		*regbase;
-+	void		*ahbbase;
-+	size_t		cmd_len;
-+	u8		cmd_buf[32];
-+	size_t		data_len;
-+
-+	int		qspi_is_init;
-+	unsigned int	qspi_calibrated_hz;
-+	unsigned int	qspi_calibrated_cs;
-+};
-+
-+/* Functions call declaration */
-+void cadence_qspi_apb_controller_init(struct cadence_spi_platdata *plat);
-+void cadence_qspi_apb_controller_enable(void *reg_base_addr);
-+void cadence_qspi_apb_controller_disable(void *reg_base_addr);
-+
-+int cadence_qspi_apb_command_read(void *reg_base_addr,
-+	unsigned int cmdlen, const u8 *cmdbuf, unsigned int rxlen, u8 *rxbuf);
-+int cadence_qspi_apb_command_write(void *reg_base_addr,
-+	unsigned int cmdlen, const u8 *cmdbuf,
-+	unsigned int txlen,  const u8 *txbuf);
-+
-+int cadence_qspi_apb_indirect_read_setup(struct cadence_spi_platdata *plat,
-+	unsigned int cmdlen, const u8 *cmdbuf);
-+int cadence_qspi_apb_indirect_read_execute(struct cadence_spi_platdata *plat,
-+	unsigned int rxlen, u8 *rxbuf);
-+int cadence_qspi_apb_indirect_write_setup(struct cadence_spi_platdata *plat,
-+	unsigned int cmdlen, const u8 *cmdbuf);
-+int cadence_qspi_apb_indirect_write_execute(struct cadence_spi_platdata *plat,
-+	unsigned int txlen, const u8 *txbuf);
-+
-+void cadence_qspi_apb_chipselect(void *reg_base,
-+	unsigned int chip_select, unsigned int decoder_enable);
-+void cadence_qspi_apb_set_clk_mode(void *reg_base_addr,
-+	unsigned int clk_pol, unsigned int clk_pha);
-+void cadence_qspi_apb_config_baudrate_div(void *reg_base,
-+	unsigned int ref_clk_hz, unsigned int sclk_hz);
-+void cadence_qspi_apb_delay(void *reg_base,
-+	unsigned int ref_clk, unsigned int sclk_hz,
-+	unsigned int tshsl_ns, unsigned int tsd2d_ns,
-+	unsigned int tchsh_ns, unsigned int tslch_ns);
-+void cadence_qspi_apb_enter_xip(void *reg_base, char xip_dummy);
-+void cadence_qspi_apb_readdata_capture(void *reg_base,
-+	unsigned int bypass, unsigned int delay);
-+
-+#endif /* __CADENCE_QSPI_H__ */
-diff -ruN u-boot-2015.01-rc3/drivers/spi/designware_spi.c u-boot/drivers/spi/designware_spi.c
---- u-boot-2015.01-rc3/drivers/spi/designware_spi.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/drivers/spi/designware_spi.c	2015-01-01 17:34:32.701495908 +0100
-@@ -0,0 +1,426 @@
-+/*
-+ * Designware master SPI core controller driver
-+ *
-+ * Copyright (C) 2014 Stefan Roese <sr at denx.de>
-+ *
-+ * Very loosely based on the Linux driver:
-+ * drivers/spi/spi-dw.c, which is:
-+ * Copyright (c) 2009, Intel Corporation.
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0
-+ */
-+
-+#include <common.h>
-+#include <dm.h>
-+#include <errno.h>
-+#include <malloc.h>
-+#include <spi.h>
-+#include <fdtdec.h>
-+#include <linux/compat.h>
-+#include <asm/io.h>
-+#include <asm/arch/clock_manager.h>
-+
-+DECLARE_GLOBAL_DATA_PTR;
-+
-+/* Register offsets */
-+#define DW_SPI_CTRL0			0x00
-+#define DW_SPI_CTRL1			0x04
-+#define DW_SPI_SSIENR			0x08
-+#define DW_SPI_MWCR			0x0c
-+#define DW_SPI_SER			0x10
-+#define DW_SPI_BAUDR			0x14
-+#define DW_SPI_TXFLTR			0x18
-+#define DW_SPI_RXFLTR			0x1c
-+#define DW_SPI_TXFLR			0x20
-+#define DW_SPI_RXFLR			0x24
-+#define DW_SPI_SR			0x28
-+#define DW_SPI_IMR			0x2c
-+#define DW_SPI_ISR			0x30
-+#define DW_SPI_RISR			0x34
-+#define DW_SPI_TXOICR			0x38
-+#define DW_SPI_RXOICR			0x3c
-+#define DW_SPI_RXUICR			0x40
-+#define DW_SPI_MSTICR			0x44
-+#define DW_SPI_ICR			0x48
-+#define DW_SPI_DMACR			0x4c
-+#define DW_SPI_DMATDLR			0x50
-+#define DW_SPI_DMARDLR			0x54
-+#define DW_SPI_IDR			0x58
-+#define DW_SPI_VERSION			0x5c
-+#define DW_SPI_DR			0x60
-+
-+/* Bit fields in CTRLR0 */
-+#define SPI_DFS_OFFSET			0
-+
-+#define SPI_FRF_OFFSET			4
-+#define SPI_FRF_SPI			0x0
-+#define SPI_FRF_SSP			0x1
-+#define SPI_FRF_MICROWIRE		0x2
-+#define SPI_FRF_RESV			0x3
-+
-+#define SPI_MODE_OFFSET			6
-+#define SPI_SCPH_OFFSET			6
-+#define SPI_SCOL_OFFSET			7
-+
-+#define SPI_TMOD_OFFSET			8
-+#define SPI_TMOD_MASK			(0x3 << SPI_TMOD_OFFSET)
-+#define	SPI_TMOD_TR			0x0		/* xmit & recv */
-+#define SPI_TMOD_TO			0x1		/* xmit only */
-+#define SPI_TMOD_RO			0x2		/* recv only */
-+#define SPI_TMOD_EPROMREAD		0x3		/* eeprom read mode */
-+
-+#define SPI_SLVOE_OFFSET		10
-+#define SPI_SRL_OFFSET			11
-+#define SPI_CFS_OFFSET			12
-+
-+/* Bit fields in SR, 7 bits */
-+#define SR_MASK				0x7f		/* cover 7 bits */
-+#define SR_BUSY				(1 << 0)
-+#define SR_TF_NOT_FULL			(1 << 1)
-+#define SR_TF_EMPT			(1 << 2)
-+#define SR_RF_NOT_EMPT			(1 << 3)
-+#define SR_RF_FULL			(1 << 4)
-+#define SR_TX_ERR			(1 << 5)
-+#define SR_DCOL				(1 << 6)
-+
-+#define RX_TIMEOUT			1000		/* timeout in ms */
-+
-+struct dw_spi_platdata {
-+	s32 frequency;		/* Default clock frequency, -1 for none */
-+	void __iomem *regs;
-+};
-+
-+struct dw_spi_priv {
-+	void __iomem *regs;
-+	unsigned int freq;		/* Default frequency */
-+	unsigned int mode;
-+
-+	int bits_per_word;
-+	u8 cs;			/* chip select pin */
-+	u8 tmode;		/* TR/TO/RO/EEPROM */
-+	u8 type;		/* SPI/SSP/MicroWire */
-+	int len;
-+
-+	u32 fifo_len;		/* depth of the FIFO buffer */
-+	void *tx;
-+	void *tx_end;
-+	void *rx;
-+	void *rx_end;
-+};
-+
-+static inline u32 dw_readl(struct dw_spi_priv *priv, u32 offset)
-+{
-+	return __raw_readl(priv->regs + offset);
-+}
-+
-+static inline void dw_writel(struct dw_spi_priv *priv, u32 offset, u32 val)
-+{
-+	__raw_writel(val, priv->regs + offset);
-+}
-+
-+static inline u16 dw_readw(struct dw_spi_priv *priv, u32 offset)
-+{
-+	return __raw_readw(priv->regs + offset);
-+}
-+
-+static inline void dw_writew(struct dw_spi_priv *priv, u32 offset, u16 val)
-+{
-+	__raw_writew(val, priv->regs + offset);
-+}
-+
-+static int dw_spi_ofdata_to_platdata(struct udevice *bus)
-+{
-+	struct dw_spi_platdata *plat = bus->platdata;
-+	const void *blob = gd->fdt_blob;
-+	int node = bus->of_offset;
-+
-+	plat->regs = (struct dw_spi *)fdtdec_get_addr(blob, node, "reg");
-+
-+	/* Use 500KHz as a suitable default */
-+	plat->frequency = fdtdec_get_int(blob, node, "spi-max-frequency",
-+					500000);
-+	debug("%s: regs=%p max-frequency=%d\n", __func__, plat->regs,
-+	      plat->frequency);
-+
-+	return 0;
-+}
-+
-+static inline void spi_enable_chip(struct dw_spi_priv *priv, int enable)
-+{
-+	dw_writel(priv, DW_SPI_SSIENR, (enable ? 1 : 0));
-+}
-+
-+/* Restart the controller, disable all interrupts, clean rx fifo */
-+static void spi_hw_init(struct dw_spi_priv *priv)
-+{
-+	spi_enable_chip(priv, 0);
-+	dw_writel(priv, DW_SPI_IMR, 0xff);
-+	spi_enable_chip(priv, 1);
-+
-+	/*
-+	 * Try to detect the FIFO depth if not set by interface driver,
-+	 * the depth could be from 2 to 256 from HW spec
-+	 */
-+	if (!priv->fifo_len) {
-+		u32 fifo;
-+
-+		for (fifo = 2; fifo <= 257; fifo++) {
-+			dw_writew(priv, DW_SPI_TXFLTR, fifo);
-+			if (fifo != dw_readw(priv, DW_SPI_TXFLTR))
-+				break;
-+		}
-+
-+		priv->fifo_len = (fifo == 257) ? 0 : fifo;
-+		dw_writew(priv, DW_SPI_TXFLTR, 0);
-+	}
-+	debug("%s: fifo_len=%d\n", __func__, priv->fifo_len);
-+}
-+
-+static int dw_spi_probe(struct udevice *bus)
-+{
-+	struct dw_spi_platdata *plat = dev_get_platdata(bus);
-+	struct dw_spi_priv *priv = dev_get_priv(bus);
-+
-+	priv->regs = plat->regs;
-+	priv->freq = plat->frequency;
-+
-+	/* Currently only bits_per_word == 8 supported */
-+	priv->bits_per_word = 8;
-+
-+	priv->tmode = 0; /* Tx & Rx */
-+
-+	/* Basic HW init */
-+	spi_hw_init(priv);
-+
-+	return 0;
-+}
-+
-+/* Return the max entries we can fill into tx fifo */
-+static inline u32 tx_max(struct dw_spi_priv *priv)
-+{
-+	u32 tx_left, tx_room, rxtx_gap;
-+
-+	tx_left = (priv->tx_end - priv->tx) / (priv->bits_per_word >> 3);
-+	tx_room = priv->fifo_len - dw_readw(priv, DW_SPI_TXFLR);
-+
-+	/*
-+	 * Another concern is about the tx/rx mismatch, we
-+	 * thought about using (priv->fifo_len - rxflr - txflr) as
-+	 * one maximum value for tx, but it doesn't cover the
-+	 * data which is out of tx/rx fifo and inside the
-+	 * shift registers. So a control from sw point of
-+	 * view is taken.
-+	 */
-+	rxtx_gap = ((priv->rx_end - priv->rx) - (priv->tx_end - priv->tx)) /
-+		(priv->bits_per_word >> 3);
-+
-+	return min3(tx_left, tx_room, (u32)(priv->fifo_len - rxtx_gap));
-+}
-+
-+/* Return the max entries we should read out of rx fifo */
-+static inline u32 rx_max(struct dw_spi_priv *priv)
-+{
-+	u32 rx_left = (priv->rx_end - priv->rx) / (priv->bits_per_word >> 3);
-+
-+	return min_t(u32, rx_left, dw_readw(priv, DW_SPI_RXFLR));
-+}
-+
-+static void dw_writer(struct dw_spi_priv *priv)
-+{
-+	u32 max = tx_max(priv);
-+	u16 txw = 0;
-+
-+	while (max--) {
-+		/* Set the tx word if the transfer's original "tx" is not null */
-+		if (priv->tx_end - priv->len) {
-+			if (priv->bits_per_word == 8)
-+				txw = *(u8 *)(priv->tx);
-+			else
-+				txw = *(u16 *)(priv->tx);
-+		}
-+		dw_writew(priv, DW_SPI_DR, txw);
-+		debug("%s: tx=0x%02x\n", __func__, txw);
-+		priv->tx += priv->bits_per_word >> 3;
-+	}
-+}
-+
-+static int dw_reader(struct dw_spi_priv *priv)
-+{
-+	unsigned start = get_timer(0);
-+	u32 max;
-+	u16 rxw;
-+
-+	/* Wait for rx data to be ready */
-+	while (rx_max(priv) == 0) {
-+		if (get_timer(start) > RX_TIMEOUT)
-+			return -ETIMEDOUT;
-+	}
-+
-+	max = rx_max(priv);
-+
-+	while (max--) {
-+		rxw = dw_readw(priv, DW_SPI_DR);
-+		debug("%s: rx=0x%02x\n", __func__, rxw);
-+
-+		/*
-+		 * Care about rx only if the transfer's original "rx" is
-+		 * not null
-+		 */
-+		if (priv->rx_end - priv->len) {
-+			if (priv->bits_per_word == 8)
-+				*(u8 *)(priv->rx) = rxw;
-+			else
-+				*(u16 *)(priv->rx) = rxw;
-+		}
-+		priv->rx += priv->bits_per_word >> 3;
-+	}
-+
-+	return 0;
-+}
-+
-+static int poll_transfer(struct dw_spi_priv *priv)
-+{
-+	int ret;
-+
-+	do {
-+		dw_writer(priv);
-+		ret = dw_reader(priv);
-+		if (ret < 0)
-+			return ret;
-+	} while (priv->rx_end > priv->rx);
-+
-+	return 0;
-+}
-+
-+static int dw_spi_xfer(struct udevice *dev, unsigned int bitlen,
-+		       const void *dout, void *din, unsigned long flags)
-+{
-+	struct udevice *bus = dev->parent;
-+	struct dw_spi_priv *priv = dev_get_priv(bus);
-+	const u8 *tx = dout;
-+	u8 *rx = din;
-+	int ret = 0;
-+	u32 cr0 = 0;
-+	u32 cs;
-+
-+	/* spi core configured to do 8 bit transfers */
-+	if (bitlen % 8) {
-+		debug("Non byte aligned SPI transfer.\n");
-+		return -1;
-+	}
-+
-+	cr0 = (priv->bits_per_word - 1) | (priv->type << SPI_FRF_OFFSET) |
-+		(priv->mode << SPI_MODE_OFFSET) |
-+		(priv->tmode << SPI_TMOD_OFFSET);
-+
-+	if (rx && tx)
-+		priv->tmode = SPI_TMOD_TR;
-+	else if (rx)
-+		priv->tmode = SPI_TMOD_RO;
-+	else
-+		priv->tmode = SPI_TMOD_TO;
-+
-+	cr0 &= ~SPI_TMOD_MASK;
-+	cr0 |= (priv->tmode << SPI_TMOD_OFFSET);
-+
-+	priv->len = bitlen >> 3;
-+	debug("%s: rx=%p tx=%p len=%d [bytes]\n", __func__, rx, tx, priv->len);
-+
-+	priv->tx = (void *)tx;
-+	priv->tx_end = priv->tx + priv->len;
-+	priv->rx = rx;
-+	priv->rx_end = priv->rx + priv->len;
-+
-+	/* Disable controller before writing control registers */
-+	spi_enable_chip(priv, 0);
-+
-+	debug("%s: cr0=%08x\n", __func__, cr0);
-+	/* Reprogram cr0 only if changed */
-+	if (dw_readw(priv, DW_SPI_CTRL0) != cr0)
-+		dw_writew(priv, DW_SPI_CTRL0, cr0);
-+
-+	/*
-+	 * Configure the desired SS (slave select 0...3) in the controller
-+	 * The DW SPI controller will activate and deactivate this CS
-+	 * automatically. So no cs_activate() etc is needed in this driver.
-+	 */
-+	cs = spi_chip_select(dev);
-+	dw_writel(priv, DW_SPI_SER, 1 << cs);
-+
-+	/* Enable controller after writing control registers */
-+	spi_enable_chip(priv, 1);
-+
-+	/* Start transfer in a polling loop */
-+	ret = poll_transfer(priv);
-+
-+	return ret;
-+}
-+
-+static int dw_spi_set_speed(struct udevice *bus, uint speed)
-+{
-+	struct dw_spi_platdata *plat = bus->platdata;
-+	struct dw_spi_priv *priv = dev_get_priv(bus);
-+	u16 clk_div;
-+
-+	if (speed > plat->frequency)
-+		speed = plat->frequency;
-+
-+	/* Disable controller before writing control registers */
-+	spi_enable_chip(priv, 0);
-+
-+	/* clk_div doesn't support odd number */
-+	clk_div = cm_get_spi_controller_clk_hz() / speed;
-+	clk_div = (clk_div + 1) & 0xfffe;
-+	dw_writel(priv, DW_SPI_BAUDR, clk_div);
-+
-+	/* Enable controller after writing control registers */
-+	spi_enable_chip(priv, 1);
-+
-+	priv->freq = speed;
-+	debug("%s: regs=%p speed=%d clk_div=%d\n", __func__, priv->regs,
-+	      priv->freq, clk_div);
-+
-+	return 0;
-+}
-+
-+static int dw_spi_set_mode(struct udevice *bus, uint mode)
-+{
-+	struct dw_spi_priv *priv = dev_get_priv(bus);
-+
-+	/*
-+	 * Can't set mode yet. Since this depends on if rx, tx, or
-+	 * rx & tx is requested. So we have to defer this to the
-+	 * real transfer function.
-+	 */
-+	priv->mode = mode;
-+	debug("%s: regs=%p, mode=%d\n", __func__, priv->regs, priv->mode);
-+
-+	return 0;
-+}
-+
-+static const struct dm_spi_ops dw_spi_ops = {
-+	.xfer		= dw_spi_xfer,
-+	.set_speed	= dw_spi_set_speed,
-+	.set_mode	= dw_spi_set_mode,
-+	/*
-+	 * cs_info is not needed, since we require all chip selects to be
-+	 * in the device tree explicitly
-+	 */
-+};
-+
-+static const struct udevice_id dw_spi_ids[] = {
-+	{ .compatible = "snps,dw-spi-mmio" },
-+	{ }
-+};
-+
-+U_BOOT_DRIVER(dw_spi) = {
-+	.name = "dw_spi",
-+	.id = UCLASS_SPI,
-+	.of_match = dw_spi_ids,
-+	.ops = &dw_spi_ops,
-+	.ofdata_to_platdata = dw_spi_ofdata_to_platdata,
-+	.platdata_auto_alloc_size = sizeof(struct dw_spi_platdata),
-+	.priv_auto_alloc_size = sizeof(struct dw_spi_priv),
-+	.per_child_auto_alloc_size = sizeof(struct spi_slave),
-+	.probe = dw_spi_probe,
-+};
-diff -ruN u-boot-2015.01-rc3/drivers/spi/ich.c u-boot/drivers/spi/ich.c
---- u-boot-2015.01-rc3/drivers/spi/ich.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/spi/ich.c	2015-01-01 17:34:32.701495908 +0100
-@@ -141,6 +141,15 @@
- 	ich->slave.max_write_size = ctlr.databytes;
- 	ich->speed = max_hz;
- 
-+	/*
-+	 * ICH 7 SPI controller only supports array read command
-+	 * and byte program command for SST flash
-+	 */
-+	if (ctlr.ich_version == 7) {
-+		ich->slave.op_mode_rx = SPI_OPM_RX_AS;
-+		ich->slave.op_mode_tx = SPI_OPM_TX_BP;
-+	}
-+
- 	return &ich->slave;
- }
- 
-@@ -158,7 +167,8 @@
-  */
- static int get_ich_version(uint16_t device_id)
- {
--	if (device_id == PCI_DEVICE_ID_INTEL_TGP_LPC)
-+	if (device_id == PCI_DEVICE_ID_INTEL_TGP_LPC ||
-+	    device_id == PCI_DEVICE_ID_INTEL_ITC_LPC)
- 		return 7;
- 
- 	if ((device_id >= PCI_DEVICE_ID_INTEL_COUGARPOINT_LPC_MIN &&
-@@ -483,8 +493,6 @@
- 	struct spi_trans *trans = &ich->trans;
- 	unsigned type = flags & (SPI_XFER_BEGIN | SPI_XFER_END);
- 	int using_cmd = 0;
--	/* Align read transactions to 64-byte boundaries */
--	char buff[ctlr.databytes];
- 
- 	/* Ee don't support writing partial bytes. */
- 	if (bitlen % 8) {
-@@ -632,14 +640,9 @@
- 	 */
- 	while (trans->bytesout || trans->bytesin) {
- 		uint32_t data_length;
--		uint32_t aligned_offset;
--		uint32_t diff;
--
--		aligned_offset = trans->offset & ~(ctlr.databytes - 1);
--		diff = trans->offset - aligned_offset;
- 
- 		/* SPI addresses are 24 bit only */
--		ich_writel(aligned_offset & 0x00FFFFFF, ctlr.addr);
-+		ich_writel(trans->offset & 0x00FFFFFF, ctlr.addr);
- 
- 		if (trans->bytesout)
- 			data_length = min(trans->bytesout, ctlr.databytes);
-@@ -673,13 +676,7 @@
- 		}
- 
- 		if (trans->bytesin) {
--			if (diff) {
--				data_length -= diff;
--				read_reg(ctlr.data, buff, ctlr.databytes);
--				memcpy(trans->in, buff + diff, data_length);
--			} else {
--				read_reg(ctlr.data, trans->in, data_length);
--			}
-+			read_reg(ctlr.data, trans->in, data_length);
- 			spi_use_in(trans, data_length);
- 			if (with_address)
- 				trans->offset += data_length;
-diff -ruN u-boot-2015.01-rc3/drivers/spi/Makefile u-boot/drivers/spi/Makefile
---- u-boot-2015.01-rc3/drivers/spi/Makefile	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/spi/Makefile	2015-01-01 17:34:32.701495908 +0100
-@@ -23,9 +23,11 @@
- obj-$(CONFIG_ATMEL_SPI) += atmel_spi.o
- obj-$(CONFIG_BFIN_SPI) += bfin_spi.o
- obj-$(CONFIG_BFIN_SPI6XX) += bfin_spi6xx.o
-+obj-$(CONFIG_CADENCE_QSPI) += cadence_qspi.o cadence_qspi_apb.o
- obj-$(CONFIG_CF_SPI) += cf_spi.o
- obj-$(CONFIG_CF_QSPI) += cf_qspi.o
- obj-$(CONFIG_DAVINCI_SPI) += davinci_spi.o
-+obj-$(CONFIG_DESIGNWARE_SPI) += designware_spi.o
- obj-$(CONFIG_EXYNOS_SPI) += exynos_spi.o
- obj-$(CONFIG_FTSSP010_SPI) += ftssp010_spi.o
- obj-$(CONFIG_ICH_SPI) +=  ich.o
-diff -ruN u-boot-2015.01-rc3/drivers/thermal/imx_thermal.c u-boot/drivers/thermal/imx_thermal.c
---- u-boot-2015.01-rc3/drivers/thermal/imx_thermal.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/thermal/imx_thermal.c	2015-01-01 17:34:32.705495842 +0100
-@@ -156,8 +156,6 @@
- 	if (fuse == 0 || fuse == ~0) {
- 		printf("CPU:   Thermal invalid data, fuse: 0x%x\n", fuse);
- 		return -EPERM;
--	} else {
--		printf("CPU:   Thermal calibration data: 0x%x\n", fuse);
- 	}
- 
- 	*priv = fuse;
-diff -ruN u-boot-2015.01-rc3/drivers/usb/gadget/atmel_usba_udc.c u-boot/drivers/usb/gadget/atmel_usba_udc.c
---- u-boot-2015.01-rc3/drivers/usb/gadget/atmel_usba_udc.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/usb/gadget/atmel_usba_udc.c	2015-01-01 17:34:32.709495776 +0100
-@@ -1062,7 +1062,6 @@
- 	if ((epstatus & epctrl) & USBA_RX_BK_RDY) {
- 		DBG(DBG_BUS, "%s: RX data ready\n", ep->ep.name);
- 		receive_data(ep);
--		usba_ep_writel(ep, CLR_STA, USBA_RX_BK_RDY);
- 	}
- }
- 
-diff -ruN u-boot-2015.01-rc3/drivers/usb/gadget/ether.c u-boot/drivers/usb/gadget/ether.c
---- u-boot-2015.01-rc3/drivers/usb/gadget/ether.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/usb/gadget/ether.c	2015-01-01 17:34:32.709495776 +0100
-@@ -852,30 +852,6 @@
- DEFINE_CACHE_ALIGN_BUFFER(u8, status_req, STATUS_BYTECOUNT);
- #endif
- 
--
--/**
-- * strlcpy - Copy a %NUL terminated string into a sized buffer
-- * @dest: Where to copy the string to
-- * @src: Where to copy the string from
-- * @size: size of destination buffer
-- *
-- * Compatible with *BSD: the result is always a valid
-- * NUL-terminated string that fits in the buffer (unless,
-- * of course, the buffer size is zero). It does not pad
-- * out the result like strncpy() does.
-- */
--size_t strlcpy(char *dest, const char *src, size_t size)
--{
--	size_t ret = strlen(src);
--
--	if (size) {
--		size_t len = (ret >= size) ? size - 1 : ret;
--		memcpy(dest, src, len);
--		dest[len] = '\0';
--	}
--	return ret;
--}
--
- /*============================================================================*/
- 
- /*
-diff -ruN u-boot-2015.01-rc3/drivers/usb/gadget/f_dfu.c u-boot/drivers/usb/gadget/f_dfu.c
---- u-boot-2015.01-rc3/drivers/usb/gadget/f_dfu.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/usb/gadget/f_dfu.c	2015-01-01 17:34:32.709495776 +0100
-@@ -366,7 +366,7 @@
- 		to_runtime_mode(f_dfu);
- 		f_dfu->dfu_state = DFU_STATE_appIDLE;
- 
--		dfu_trigger_detach();
-+		g_dnl_trigger_detach();
- 		break;
- 	default:
- 		f_dfu->dfu_state = DFU_STATE_dfuERROR;
-diff -ruN u-boot-2015.01-rc3/drivers/usb/gadget/f_fastboot.c u-boot/drivers/usb/gadget/f_fastboot.c
---- u-boot-2015.01-rc3/drivers/usb/gadget/f_fastboot.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/usb/gadget/f_fastboot.c	2015-01-01 17:34:32.709495776 +0100
-@@ -480,6 +480,17 @@
- 	fastboot_tx_write_str("OKAY");
- }
- 
-+static void do_exit_on_complete(struct usb_ep *ep, struct usb_request *req)
-+{
-+	g_dnl_trigger_detach();
-+}
-+
-+static void cb_continue(struct usb_ep *ep, struct usb_request *req)
-+{
-+	fastboot_func->in_req->complete = do_exit_on_complete;
-+	fastboot_tx_write_str("OKAY");
-+}
-+
- #ifdef CONFIG_FASTBOOT_FLASH
- static void cb_flash(struct usb_ep *ep, struct usb_request *req)
- {
-@@ -520,6 +531,9 @@
- 	}, {
- 		.cmd = "boot",
- 		.cb = cb_boot,
-+	}, {
-+		.cmd = "continue",
-+		.cb = cb_continue,
- 	},
- #ifdef CONFIG_FASTBOOT_FLASH
- 	{
-diff -ruN u-boot-2015.01-rc3/drivers/usb/gadget/f_thor.c u-boot/drivers/usb/gadget/f_thor.c
---- u-boot-2015.01-rc3/drivers/usb/gadget/f_thor.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/usb/gadget/f_thor.c	2015-01-01 17:34:32.709495776 +0100
-@@ -205,12 +205,24 @@
- 
- static int download_tail(long long int left, int cnt)
- {
--	struct dfu_entity *dfu_entity = dfu_get_entity(alt_setting_num);
--	void *transfer_buffer = dfu_get_buf(dfu_entity);
-+	struct dfu_entity *dfu_entity;
-+	void *transfer_buffer;
- 	int ret;
- 
- 	debug("%s: left: %llu cnt: %d\n", __func__, left, cnt);
- 
-+	dfu_entity = dfu_get_entity(alt_setting_num);
-+	if (!dfu_entity) {
-+		error("Alt setting: %d entity not found!\n", alt_setting_num);
-+		return -ENOENT;
-+	}
-+
-+	transfer_buffer = dfu_get_buf(dfu_entity);
-+	if (!transfer_buffer) {
-+		error("Transfer buffer not allocated!");
-+		return -ENXIO;
-+	}
-+
- 	if (left) {
- 		ret = dfu_write(dfu_entity, transfer_buffer, left, cnt++);
- 		if (ret) {
-diff -ruN u-boot-2015.01-rc3/drivers/usb/gadget/g_dnl.c u-boot/drivers/usb/gadget/g_dnl.c
---- u-boot-2015.01-rc3/drivers/usb/gadget/g_dnl.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/usb/gadget/g_dnl.c	2015-01-01 17:34:32.709495776 +0100
-@@ -163,6 +163,23 @@
- 	return -EOPNOTSUPP;
- }
- 
-+static bool g_dnl_detach_request;
-+
-+bool g_dnl_detach(void)
-+{
-+	return g_dnl_detach_request;
-+}
-+
-+void g_dnl_trigger_detach(void)
-+{
-+	g_dnl_detach_request = true;
-+}
-+
-+void g_dnl_clear_detach(void)
-+{
-+	g_dnl_detach_request = false;
-+}
-+
- static int g_dnl_get_bcd_device_number(struct usb_composite_dev *cdev)
- {
- 	struct usb_gadget *gadget = cdev->gadget;
-diff -ruN u-boot-2015.01-rc3/drivers/usb/host/ehci-fsl.c u-boot/drivers/usb/host/ehci-fsl.c
---- u-boot-2015.01-rc3/drivers/usb/host/ehci-fsl.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/usb/host/ehci-fsl.c	2015-01-01 17:34:32.713495710 +0100
-@@ -15,9 +15,14 @@
- #include <usb/ehci-fsl.h>
- #include <hwconfig.h>
- #include <fsl_usb.h>
-+#include <fdt_support.h>
- 
- #include "ehci.h"
- 
-+#ifndef CONFIG_USB_MAX_CONTROLLER_COUNT
-+#define CONFIG_USB_MAX_CONTROLLER_COUNT 1
-+#endif
-+
- static void set_txfifothresh(struct usb_ehci *, u32);
- 
- /* Check USB PHY clock valid */
-@@ -158,3 +163,184 @@
- 	cmd |= TXFIFO_THRESH(txfifo_thresh);
- 	ehci_writel(&ehci->txfilltuning, cmd);
- }
-+
-+#if defined(CONFIG_HAS_FSL_DR_USB) || defined(CONFIG_HAS_FSL_MPH_USB)
-+static int fdt_fixup_usb_mode_phy_type(void *blob, const char *mode,
-+				       const char *phy_type, int start_offset)
-+{
-+	const char *compat_dr = "fsl-usb2-dr";
-+	const char *compat_mph = "fsl-usb2-mph";
-+	const char *prop_mode = "dr_mode";
-+	const char *prop_type = "phy_type";
-+	const char *node_type = NULL;
-+	int node_offset;
-+	int err;
-+
-+	node_offset = fdt_node_offset_by_compatible(blob,
-+						    start_offset, compat_mph);
-+	if (node_offset < 0) {
-+		node_offset = fdt_node_offset_by_compatible(blob,
-+							    start_offset,
-+							    compat_dr);
-+		if (node_offset < 0) {
-+			printf("WARNING: could not find compatible node: %s",
-+			       fdt_strerror(node_offset));
-+			return -1;
-+		}
-+		node_type = compat_dr;
-+	} else {
-+		node_type = compat_mph;
-+	}
-+
-+	if (mode) {
-+		err = fdt_setprop(blob, node_offset, prop_mode, mode,
-+				  strlen(mode) + 1);
-+		if (err < 0)
-+			printf("WARNING: could not set %s for %s: %s.\n",
-+			       prop_mode, node_type, fdt_strerror(err));
-+	}
-+
-+	if (phy_type) {
-+		err = fdt_setprop(blob, node_offset, prop_type, phy_type,
-+				  strlen(phy_type) + 1);
-+		if (err < 0)
-+			printf("WARNING: could not set %s for %s: %s.\n",
-+			       prop_type, node_type, fdt_strerror(err));
-+	}
-+
-+	return node_offset;
-+}
-+
-+static const char *fdt_usb_get_node_type(void *blob, int start_offset,
-+					 int *node_offset)
-+{
-+	const char *compat_dr = "fsl-usb2-dr";
-+	const char *compat_mph = "fsl-usb2-mph";
-+	const char *node_type = NULL;
-+
-+	*node_offset = fdt_node_offset_by_compatible(blob, start_offset,
-+						     compat_mph);
-+	if (*node_offset < 0) {
-+		*node_offset = fdt_node_offset_by_compatible(blob,
-+							     start_offset,
-+							     compat_dr);
-+		if (*node_offset < 0) {
-+			printf("ERROR: could not find compatible node: %s\n",
-+			       fdt_strerror(*node_offset));
-+		} else {
-+			node_type = compat_dr;
-+		}
-+	} else {
-+		node_type = compat_mph;
-+	}
-+
-+	return node_type;
-+}
-+
-+static int fdt_fixup_usb_erratum(void *blob, const char *prop_erratum,
-+				 int start_offset)
-+{
-+	int node_offset, err;
-+	const char *node_type = NULL;
-+
-+	node_type = fdt_usb_get_node_type(blob, start_offset, &node_offset);
-+	if (!node_type)
-+		return -1;
-+
-+	err = fdt_setprop(blob, node_offset, prop_erratum, NULL, 0);
-+	if (err < 0) {
-+		printf("ERROR: could not set %s for %s: %s.\n",
-+		       prop_erratum, node_type, fdt_strerror(err));
-+	}
-+
-+	return node_offset;
-+}
-+
-+void fdt_fixup_dr_usb(void *blob, bd_t *bd)
-+{
-+	static const char * const modes[] = { "host", "peripheral", "otg" };
-+	static const char * const phys[] = { "ulpi", "utmi" };
-+	int usb_erratum_a006261_off = -1;
-+	int usb_erratum_a007075_off = -1;
-+	int usb_erratum_a007792_off = -1;
-+	int usb_mode_off = -1;
-+	int usb_phy_off = -1;
-+	char str[5];
-+	int i, j;
-+
-+	for (i = 1; i <= CONFIG_USB_MAX_CONTROLLER_COUNT; i++) {
-+		const char *dr_mode_type = NULL;
-+		const char *dr_phy_type = NULL;
-+		int mode_idx = -1, phy_idx = -1;
-+
-+		snprintf(str, 5, "%s%d", "usb", i);
-+		if (hwconfig(str)) {
-+			for (j = 0; j < ARRAY_SIZE(modes); j++) {
-+				if (hwconfig_subarg_cmp(str, "dr_mode",
-+							modes[j])) {
-+					mode_idx = j;
-+					break;
-+				}
-+			}
-+
-+			for (j = 0; j < ARRAY_SIZE(phys); j++) {
-+				if (hwconfig_subarg_cmp(str, "phy_type",
-+							phys[j])) {
-+					phy_idx = j;
-+					break;
-+				}
-+			}
-+
-+			if (mode_idx < 0 && phy_idx < 0) {
-+				printf("WARNING: invalid phy or mode\n");
-+				return;
-+			}
-+
-+			if (mode_idx > -1)
-+				dr_mode_type = modes[mode_idx];
-+
-+			if (phy_idx > -1)
-+				dr_phy_type = phys[phy_idx];
-+		}
-+
-+		usb_mode_off = fdt_fixup_usb_mode_phy_type(blob,
-+							   dr_mode_type, NULL,
-+							   usb_mode_off);
-+
-+		if (usb_mode_off < 0)
-+			return;
-+
-+		usb_phy_off = fdt_fixup_usb_mode_phy_type(blob,
-+							  NULL, dr_phy_type,
-+							  usb_phy_off);
-+
-+		if (usb_phy_off < 0)
-+			return;
-+
-+		if (has_erratum_a006261()) {
-+			usb_erratum_a006261_off =  fdt_fixup_usb_erratum
-+						   (blob,
-+						    "fsl,usb-erratum-a006261",
-+						    usb_erratum_a006261_off);
-+			if (usb_erratum_a006261_off < 0)
-+				return;
-+		}
-+		if (has_erratum_a007075()) {
-+			usb_erratum_a007075_off =  fdt_fixup_usb_erratum
-+						   (blob,
-+						    "fsl,usb-erratum-a007075",
-+						    usb_erratum_a007075_off);
-+			if (usb_erratum_a007075_off < 0)
-+				return;
-+		}
-+		if (has_erratum_a007792()) {
-+			usb_erratum_a007792_off =  fdt_fixup_usb_erratum
-+						   (blob,
-+						    "fsl,usb-erratum-a007792",
-+						    usb_erratum_a007792_off);
-+			if (usb_erratum_a007792_off < 0)
-+				return;
-+		}
-+	}
-+}
-+#endif
-diff -ruN u-boot-2015.01-rc3/drivers/usb/host/ehci-hcd.c u-boot/drivers/usb/host/ehci-hcd.c
---- u-boot-2015.01-rc3/drivers/usb/host/ehci-hcd.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/usb/host/ehci-hcd.c	2015-01-01 17:34:32.713495710 +0100
-@@ -971,7 +971,6 @@
- 	qh_list->qh_link = cpu_to_hc32((uint32_t)qh_list | QH_LINK_TYPE_QH);
- 	qh_list->qh_endpt1 = cpu_to_hc32(QH_ENDPT1_H(1) |
- 						QH_ENDPT1_EPS(USB_SPEED_HIGH));
--	qh_list->qh_curtd = cpu_to_hc32(QT_NEXT_TERMINATE);
- 	qh_list->qh_overlay.qt_next = cpu_to_hc32(QT_NEXT_TERMINATE);
- 	qh_list->qh_overlay.qt_altnext = cpu_to_hc32(QT_NEXT_TERMINATE);
- 	qh_list->qh_overlay.qt_token =
-diff -ruN u-boot-2015.01-rc3/drivers/usb/host/ehci-mx6.c u-boot/drivers/usb/host/ehci-mx6.c
---- u-boot-2015.01-rc3/drivers/usb/host/ehci-mx6.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/drivers/usb/host/ehci-mx6.c	2015-01-01 17:34:32.713495710 +0100
-@@ -160,7 +160,7 @@
- 	val |= (USBPHY_CTRL_ENUTMILEVEL2 | USBPHY_CTRL_ENUTMILEVEL3);
- 	__raw_writel(val, phy_ctrl);
- 
--	return val & USBPHY_CTRL_OTG_ID;
-+	return 0;
- }
- 
- /* Base address for this IP block is 0x02184800 */
-@@ -193,6 +193,28 @@
- 	__raw_writel(val, ctrl);
- }
- 
-+int usb_phy_mode(int port)
-+{
-+	void __iomem *phy_reg;
-+	void __iomem *phy_ctrl;
-+	u32 val;
-+
-+	phy_reg = (void __iomem *)phy_bases[port];
-+	phy_ctrl = (void __iomem *)(phy_reg + USBPHY_CTRL);
-+
-+	val = __raw_readl(phy_ctrl);
-+
-+	if (val & USBPHY_CTRL_OTG_ID)
-+		return USB_INIT_DEVICE;
-+	else
-+		return USB_INIT_HOST;
-+}
-+
-+int __weak board_usb_phy_mode(int port)
-+{
-+	return usb_phy_mode(port);
-+}
-+
- int __weak board_ehci_hcd_init(int port)
- {
- 	return 0;
-@@ -221,7 +243,8 @@
- 	usb_power_config(index);
- 	usb_oc_config(index);
- 	usb_internal_phy_clock_gate(index, 1);
--	type = usb_phy_enable(index, ehci) ? USB_INIT_DEVICE : USB_INIT_HOST;
-+	usb_phy_enable(index, ehci);
-+	type = board_usb_phy_mode(index);
- 
- 	*hccr = (struct ehci_hccr *)((uint32_t)&ehci->caplength);
- 	*hcor = (struct ehci_hcor *)((uint32_t)*hccr +
-diff -ruN u-boot-2015.01-rc3/.git/config u-boot/.git/config
---- u-boot-2015.01-rc3/.git/config	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/.git/config	2015-01-01 17:34:31.953508170 +0100
-@@ -0,0 +1,11 @@
-+[core]
-+	repositoryformatversion = 0
-+	filemode = true
-+	bare = false
-+	logallrefupdates = true
-+[remote "origin"]
-+	fetch = +refs/heads/*:refs/remotes/origin/*
-+	url = git://git.denx.de/u-boot.git
-+[branch "master"]
-+	remote = origin
-+	merge = refs/heads/master
-diff -ruN u-boot-2015.01-rc3/.git/description u-boot/.git/description
---- u-boot-2015.01-rc3/.git/description	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/.git/description	2015-01-01 17:34:05.785937163 +0100
-@@ -0,0 +1 @@
-+Unnamed repository; edit this file 'description' to name the repository.
-diff -ruN u-boot-2015.01-rc3/.git/HEAD u-boot/.git/HEAD
---- u-boot-2015.01-rc3/.git/HEAD	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/.git/HEAD	2015-01-01 17:34:31.953508170 +0100
-@@ -0,0 +1 @@
-+ref: refs/heads/master
-diff -ruN u-boot-2015.01-rc3/.git/hooks/applypatch-msg.sample u-boot/.git/hooks/applypatch-msg.sample
---- u-boot-2015.01-rc3/.git/hooks/applypatch-msg.sample	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/.git/hooks/applypatch-msg.sample	2015-01-01 17:34:05.793937033 +0100
-@@ -0,0 +1,15 @@
-+#!/bin/sh
-+#
-+# An example hook script to check the commit log message taken by
-+# applypatch from an e-mail message.
-+#
-+# The hook should exit with non-zero status after issuing an
-+# appropriate message if it wants to stop the commit.  The hook is
-+# allowed to edit the commit message file.
-+#
-+# To enable this hook, rename this file to "applypatch-msg".
-+
-+. git-sh-setup
-+test -x "$GIT_DIR/hooks/commit-msg" &&
-+	exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"}
-+:
-diff -ruN u-boot-2015.01-rc3/.git/hooks/commit-msg.sample u-boot/.git/hooks/commit-msg.sample
---- u-boot-2015.01-rc3/.git/hooks/commit-msg.sample	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/.git/hooks/commit-msg.sample	2015-01-01 17:34:05.793937033 +0100
-@@ -0,0 +1,24 @@
-+#!/bin/sh
-+#
-+# An example hook script to check the commit log message.
-+# Called by "git commit" with one argument, the name of the file
-+# that has the commit message.  The hook should exit with non-zero
-+# status after issuing an appropriate message if it wants to stop the
-+# commit.  The hook is allowed to edit the commit message file.
-+#
-+# To enable this hook, rename this file to "commit-msg".
-+
-+# Uncomment the below to add a Signed-off-by line to the message.
-+# Doing this in a hook is a bad idea in general, but the prepare-commit-msg
-+# hook is more suited to it.
-+#
-+# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
-+# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
-+
-+# This example catches duplicate Signed-off-by lines.
-+
-+test "" = "$(grep '^Signed-off-by: ' "$1" |
-+	 sort | uniq -c | sed -e '/^[ 	]*1[ 	]/d')" || {
-+	echo >&2 Duplicate Signed-off-by lines.
-+	exit 1
-+}
-diff -ruN u-boot-2015.01-rc3/.git/hooks/post-update.sample u-boot/.git/hooks/post-update.sample
---- u-boot-2015.01-rc3/.git/hooks/post-update.sample	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/.git/hooks/post-update.sample	2015-01-01 17:34:05.797936967 +0100
-@@ -0,0 +1,8 @@
-+#!/bin/sh
-+#
-+# An example hook script to prepare a packed repository for use over
-+# dumb transports.
-+#
-+# To enable this hook, rename this file to "post-update".
-+
-+exec git update-server-info
-diff -ruN u-boot-2015.01-rc3/.git/hooks/pre-applypatch.sample u-boot/.git/hooks/pre-applypatch.sample
---- u-boot-2015.01-rc3/.git/hooks/pre-applypatch.sample	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/.git/hooks/pre-applypatch.sample	2015-01-01 17:34:05.793937033 +0100
-@@ -0,0 +1,14 @@
-+#!/bin/sh
-+#
-+# An example hook script to verify what is about to be committed
-+# by applypatch from an e-mail message.
-+#
-+# The hook should exit with non-zero status after issuing an
-+# appropriate message if it wants to stop the commit.
-+#
-+# To enable this hook, rename this file to "pre-applypatch".
-+
-+. git-sh-setup
-+test -x "$GIT_DIR/hooks/pre-commit" &&
-+	exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"}
-+:
-diff -ruN u-boot-2015.01-rc3/.git/hooks/pre-commit.sample u-boot/.git/hooks/pre-commit.sample
---- u-boot-2015.01-rc3/.git/hooks/pre-commit.sample	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/.git/hooks/pre-commit.sample	2015-01-01 17:34:05.793937033 +0100
-@@ -0,0 +1,50 @@
-+#!/bin/sh
-+#
-+# An example hook script to verify what is about to be committed.
-+# Called by "git commit" with no arguments.  The hook should
-+# exit with non-zero status after issuing an appropriate message if
-+# it wants to stop the commit.
-+#
-+# To enable this hook, rename this file to "pre-commit".
-+
-+if git rev-parse --verify HEAD >/dev/null 2>&1
-+then
-+	against=HEAD
-+else
-+	# Initial commit: diff against an empty tree object
-+	against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
-+fi
-+
-+# If you want to allow non-ascii filenames set this variable to true.
-+allownonascii=$(git config hooks.allownonascii)
-+
-+# Redirect output to stderr.
-+exec 1>&2
-+
-+# Cross platform projects tend to avoid non-ascii filenames; prevent
-+# them from being added to the repository. We exploit the fact that the
-+# printable range starts at the space character and ends with tilde.
-+if [ "$allownonascii" != "true" ] &&
-+	# Note that the use of brackets around a tr range is ok here, (it's
-+	# even required, for portability to Solaris 10's /usr/bin/tr), since
-+	# the square bracket bytes happen to fall in the designated range.
-+	test $(git diff --cached --name-only --diff-filter=A -z $against |
-+	  LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0
-+then
-+	echo "Error: Attempt to add a non-ascii file name."
-+	echo
-+	echo "This can cause problems if you want to work"
-+	echo "with people on other platforms."
-+	echo
-+	echo "To be portable it is advisable to rename the file ..."
-+	echo
-+	echo "If you know what you are doing you can disable this"
-+	echo "check using:"
-+	echo
-+	echo "  git config hooks.allownonascii true"
-+	echo
-+	exit 1
-+fi
-+
-+# If there are whitespace errors, print the offending file names and fail.
-+exec git diff-index --check --cached $against --
-diff -ruN u-boot-2015.01-rc3/.git/hooks/prepare-commit-msg.sample u-boot/.git/hooks/prepare-commit-msg.sample
---- u-boot-2015.01-rc3/.git/hooks/prepare-commit-msg.sample	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/.git/hooks/prepare-commit-msg.sample	2015-01-01 17:34:05.801936901 +0100
-@@ -0,0 +1,36 @@
-+#!/bin/sh
-+#
-+# An example hook script to prepare the commit log message.
-+# Called by "git commit" with the name of the file that has the
-+# commit message, followed by the description of the commit
-+# message's source.  The hook's purpose is to edit the commit
-+# message file.  If the hook fails with a non-zero status,
-+# the commit is aborted.
-+#
-+# To enable this hook, rename this file to "prepare-commit-msg".
-+
-+# This hook includes three examples.  The first comments out the
-+# "Conflicts:" part of a merge commit.
-+#
-+# The second includes the output of "git diff --name-status -r"
-+# into the message, just before the "git status" output.  It is
-+# commented because it doesn't cope with --amend or with squashed
-+# commits.
-+#
-+# The third example adds a Signed-off-by line to the message, that can
-+# still be edited.  This is rarely a good idea.
-+
-+case "$2,$3" in
-+  merge,)
-+    /usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;;
-+
-+# ,|template,)
-+#   /usr/bin/perl -i.bak -pe '
-+#      print "\n" . `git diff --cached --name-status -r`
-+#	 if /^#/ && $first++ == 0' "$1" ;;
-+
-+  *) ;;
-+esac
-+
-+# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
-+# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
-diff -ruN u-boot-2015.01-rc3/.git/hooks/pre-rebase.sample u-boot/.git/hooks/pre-rebase.sample
---- u-boot-2015.01-rc3/.git/hooks/pre-rebase.sample	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/.git/hooks/pre-rebase.sample	2015-01-01 17:34:05.801936901 +0100
-@@ -0,0 +1,169 @@
-+#!/bin/sh
-+#
-+# Copyright (c) 2006, 2008 Junio C Hamano
-+#
-+# The "pre-rebase" hook is run just before "git rebase" starts doing
-+# its job, and can prevent the command from running by exiting with
-+# non-zero status.
-+#
-+# The hook is called with the following parameters:
-+#
-+# $1 -- the upstream the series was forked from.
-+# $2 -- the branch being rebased (or empty when rebasing the current branch).
-+#
-+# This sample shows how to prevent topic branches that are already
-+# merged to 'next' branch from getting rebased, because allowing it
-+# would result in rebasing already published history.
-+
-+publish=next
-+basebranch="$1"
-+if test "$#" = 2
-+then
-+	topic="refs/heads/$2"
-+else
-+	topic=`git symbolic-ref HEAD` ||
-+	exit 0 ;# we do not interrupt rebasing detached HEAD
-+fi
-+
-+case "$topic" in
-+refs/heads/??/*)
-+	;;
-+*)
-+	exit 0 ;# we do not interrupt others.
-+	;;
-+esac
-+
-+# Now we are dealing with a topic branch being rebased
-+# on top of master.  Is it OK to rebase it?
-+
-+# Does the topic really exist?
-+git show-ref -q "$topic" || {
-+	echo >&2 "No such branch $topic"
-+	exit 1
-+}
-+
-+# Is topic fully merged to master?
-+not_in_master=`git rev-list --pretty=oneline ^master "$topic"`
-+if test -z "$not_in_master"
-+then
-+	echo >&2 "$topic is fully merged to master; better remove it."
-+	exit 1 ;# we could allow it, but there is no point.
-+fi
-+
-+# Is topic ever merged to next?  If so you should not be rebasing it.
-+only_next_1=`git rev-list ^master "^$topic" ${publish} | sort`
-+only_next_2=`git rev-list ^master           ${publish} | sort`
-+if test "$only_next_1" = "$only_next_2"
-+then
-+	not_in_topic=`git rev-list "^$topic" master`
-+	if test -z "$not_in_topic"
-+	then
-+		echo >&2 "$topic is already up-to-date with master"
-+		exit 1 ;# we could allow it, but there is no point.
-+	else
-+		exit 0
-+	fi
-+else
-+	not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"`
-+	/usr/bin/perl -e '
-+		my $topic = $ARGV[0];
-+		my $msg = "* $topic has commits already merged to public branch:\n";
-+		my (%not_in_next) = map {
-+			/^([0-9a-f]+) /;
-+			($1 => 1);
-+		} split(/\n/, $ARGV[1]);
-+		for my $elem (map {
-+				/^([0-9a-f]+) (.*)$/;
-+				[$1 => $2];
-+			} split(/\n/, $ARGV[2])) {
-+			if (!exists $not_in_next{$elem->[0]}) {
-+				if ($msg) {
-+					print STDERR $msg;
-+					undef $msg;
-+				}
-+				print STDERR " $elem->[1]\n";
-+			}
-+		}
-+	' "$topic" "$not_in_next" "$not_in_master"
-+	exit 1
-+fi
-+
-+<<\DOC_END
-+
-+This sample hook safeguards topic branches that have been
-+published from being rewound.
-+
-+The workflow assumed here is:
-+
-+ * Once a topic branch forks from "master", "master" is never
-+   merged into it again (either directly or indirectly).
-+
-+ * Once a topic branch is fully cooked and merged into "master",
-+   it is deleted.  If you need to build on top of it to correct
-+   earlier mistakes, a new topic branch is created by forking at
-+   the tip of the "master".  This is not strictly necessary, but
-+   it makes it easier to keep your history simple.
-+
-+ * Whenever you need to test or publish your changes to topic
-+   branches, merge them into "next" branch.
-+
-+The script, being an example, hardcodes the publish branch name
-+to be "next", but it is trivial to make it configurable via
-+$GIT_DIR/config mechanism.
-+
-+With this workflow, you would want to know:
-+
-+(1) ... if a topic branch has ever been merged to "next".  Young
-+    topic branches can have stupid mistakes you would rather
-+    clean up before publishing, and things that have not been
-+    merged into other branches can be easily rebased without
-+    affecting other people.  But once it is published, you would
-+    not want to rewind it.
-+
-+(2) ... if a topic branch has been fully merged to "master".
-+    Then you can delete it.  More importantly, you should not
-+    build on top of it -- other people may already want to
-+    change things related to the topic as patches against your
-+    "master", so if you need further changes, it is better to
-+    fork the topic (perhaps with the same name) afresh from the
-+    tip of "master".
-+
-+Let's look at this example:
-+
-+		   o---o---o---o---o---o---o---o---o---o "next"
-+		  /       /           /           /
-+		 /   a---a---b A     /           /
-+		/   /               /           /
-+	       /   /   c---c---c---c B         /
-+	      /   /   /             \         /
-+	     /   /   /   b---b C     \       /
-+	    /   /   /   /             \     /
-+    ---o---o---o---o---o---o---o---o---o---o---o "master"
-+
-+
-+A, B and C are topic branches.
-+
-+ * A has one fix since it was merged up to "next".
-+
-+ * B has finished.  It has been fully merged up to "master" and "next",
-+   and is ready to be deleted.
-+
-+ * C has not merged to "next" at all.
-+
-+We would want to allow C to be rebased, refuse A, and encourage
-+B to be deleted.
-+
-+To compute (1):
-+
-+	git rev-list ^master ^topic next
-+	git rev-list ^master        next
-+
-+	if these match, topic has not merged in next at all.
-+
-+To compute (2):
-+
-+	git rev-list master..topic
-+
-+	if this is empty, it is fully merged to "master".
-+
-+DOC_END
-diff -ruN u-boot-2015.01-rc3/.git/hooks/update.sample u-boot/.git/hooks/update.sample
---- u-boot-2015.01-rc3/.git/hooks/update.sample	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/.git/hooks/update.sample	2015-01-01 17:34:05.793937033 +0100
-@@ -0,0 +1,128 @@
-+#!/bin/sh
-+#
-+# An example hook script to blocks unannotated tags from entering.
-+# Called by "git receive-pack" with arguments: refname sha1-old sha1-new
-+#
-+# To enable this hook, rename this file to "update".
-+#
-+# Config
-+# ------
-+# hooks.allowunannotated
-+#   This boolean sets whether unannotated tags will be allowed into the
-+#   repository.  By default they won't be.
-+# hooks.allowdeletetag
-+#   This boolean sets whether deleting tags will be allowed in the
-+#   repository.  By default they won't be.
-+# hooks.allowmodifytag
-+#   This boolean sets whether a tag may be modified after creation. By default
-+#   it won't be.
-+# hooks.allowdeletebranch
-+#   This boolean sets whether deleting branches will be allowed in the
-+#   repository.  By default they won't be.
-+# hooks.denycreatebranch
-+#   This boolean sets whether remotely creating branches will be denied
-+#   in the repository.  By default this is allowed.
-+#
-+
-+# --- Command line
-+refname="$1"
-+oldrev="$2"
-+newrev="$3"
-+
-+# --- Safety check
-+if [ -z "$GIT_DIR" ]; then
-+	echo "Don't run this script from the command line." >&2
-+	echo " (if you want, you could supply GIT_DIR then run" >&2
-+	echo "  $0 <ref> <oldrev> <newrev>)" >&2
-+	exit 1
-+fi
-+
-+if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then
-+	echo "Usage: $0 <ref> <oldrev> <newrev>" >&2
-+	exit 1
-+fi
-+
-+# --- Config
-+allowunannotated=$(git config --bool hooks.allowunannotated)
-+allowdeletebranch=$(git config --bool hooks.allowdeletebranch)
-+denycreatebranch=$(git config --bool hooks.denycreatebranch)
-+allowdeletetag=$(git config --bool hooks.allowdeletetag)
-+allowmodifytag=$(git config --bool hooks.allowmodifytag)
-+
-+# check for no description
-+projectdesc=$(sed -e '1q' "$GIT_DIR/description")
-+case "$projectdesc" in
-+"Unnamed repository"* | "")
-+	echo "*** Project description file hasn't been set" >&2
-+	exit 1
-+	;;
-+esac
-+
-+# --- Check types
-+# if $newrev is 0000...0000, it's a commit to delete a ref.
-+zero="0000000000000000000000000000000000000000"
-+if [ "$newrev" = "$zero" ]; then
-+	newrev_type=delete
-+else
-+	newrev_type=$(git cat-file -t $newrev)
-+fi
-+
-+case "$refname","$newrev_type" in
-+	refs/tags/*,commit)
-+		# un-annotated tag
-+		short_refname=${refname##refs/tags/}
-+		if [ "$allowunannotated" != "true" ]; then
-+			echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2
-+			echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2
-+			exit 1
-+		fi
-+		;;
-+	refs/tags/*,delete)
-+		# delete tag
-+		if [ "$allowdeletetag" != "true" ]; then
-+			echo "*** Deleting a tag is not allowed in this repository" >&2
-+			exit 1
-+		fi
-+		;;
-+	refs/tags/*,tag)
-+		# annotated tag
-+		if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1
-+		then
-+			echo "*** Tag '$refname' already exists." >&2
-+			echo "*** Modifying a tag is not allowed in this repository." >&2
-+			exit 1
-+		fi
-+		;;
-+	refs/heads/*,commit)
-+		# branch
-+		if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then
-+			echo "*** Creating a branch is not allowed in this repository" >&2
-+			exit 1
-+		fi
-+		;;
-+	refs/heads/*,delete)
-+		# delete branch
-+		if [ "$allowdeletebranch" != "true" ]; then
-+			echo "*** Deleting a branch is not allowed in this repository" >&2
-+			exit 1
-+		fi
-+		;;
-+	refs/remotes/*,commit)
-+		# tracking branch
-+		;;
-+	refs/remotes/*,delete)
-+		# delete tracking branch
-+		if [ "$allowdeletebranch" != "true" ]; then
-+			echo "*** Deleting a tracking branch is not allowed in this repository" >&2
-+			exit 1
-+		fi
-+		;;
-+	*)
-+		# Anything else (is there anything else?)
-+		echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2
-+		exit 1
-+		;;
-+esac
-+
-+# --- Finished
-+exit 0
-Binary files u-boot-2015.01-rc3/.git/index and u-boot/.git/index differ
-diff -ruN u-boot-2015.01-rc3/.git/info/exclude u-boot/.git/info/exclude
---- u-boot-2015.01-rc3/.git/info/exclude	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/.git/info/exclude	2015-01-01 17:34:05.789937097 +0100
-@@ -0,0 +1,6 @@
-+# git ls-files --others --exclude-from=.git/info/exclude
-+# Lines that start with '#' are comments.
-+# For a project mostly in C, the following would be a good set of
-+# exclude patterns (uncomment them if you want to use them):
-+# *.[oa]
-+# *~
-diff -ruN u-boot-2015.01-rc3/.git/logs/HEAD u-boot/.git/logs/HEAD
---- u-boot-2015.01-rc3/.git/logs/HEAD	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/.git/logs/HEAD	2015-01-01 17:34:31.953508170 +0100
-@@ -0,0 +1 @@
-+0000000000000000000000000000000000000000 125738e819a3b9d15210794b3dcef9f4d9bcf866 Zoltan HERPAI <wigyori at uid0.hu> 1420130071 +0100	clone: from git://git.denx.de/u-boot.git
-diff -ruN u-boot-2015.01-rc3/.git/logs/refs/heads/master u-boot/.git/logs/refs/heads/master
---- u-boot-2015.01-rc3/.git/logs/refs/heads/master	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/.git/logs/refs/heads/master	2015-01-01 17:34:31.953508170 +0100
-@@ -0,0 +1 @@
-+0000000000000000000000000000000000000000 125738e819a3b9d15210794b3dcef9f4d9bcf866 Zoltan HERPAI <wigyori at uid0.hu> 1420130071 +0100	clone: from git://git.denx.de/u-boot.git
-diff -ruN u-boot-2015.01-rc3/.git/logs/refs/remotes/origin/HEAD u-boot/.git/logs/refs/remotes/origin/HEAD
---- u-boot-2015.01-rc3/.git/logs/refs/remotes/origin/HEAD	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/.git/logs/refs/remotes/origin/HEAD	2015-01-01 17:34:31.953508170 +0100
-@@ -0,0 +1 @@
-+0000000000000000000000000000000000000000 125738e819a3b9d15210794b3dcef9f4d9bcf866 Zoltan HERPAI <wigyori at uid0.hu> 1420130071 +0100	clone: from git://git.denx.de/u-boot.git
-Binary files u-boot-2015.01-rc3/.git/objects/pack/pack-e62dd83e4128e234ff5dabb586722d23d1bae06c.idx and u-boot/.git/objects/pack/pack-e62dd83e4128e234ff5dabb586722d23d1bae06c.idx differ
-Binary files u-boot-2015.01-rc3/.git/objects/pack/pack-e62dd83e4128e234ff5dabb586722d23d1bae06c.pack and u-boot/.git/objects/pack/pack-e62dd83e4128e234ff5dabb586722d23d1bae06c.pack differ
-diff -ruN u-boot-2015.01-rc3/.git/packed-refs u-boot/.git/packed-refs
---- u-boot-2015.01-rc3/.git/packed-refs	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/.git/packed-refs	2015-01-01 17:34:31.865509612 +0100
-@@ -0,0 +1,388 @@
-+# pack-refs with: peeled 
-+125738e819a3b9d15210794b3dcef9f4d9bcf866 refs/remotes/origin/master
-+ece0d370144fdecb6f3ed5738ffe96f5b12f9e96 refs/remotes/origin/next
-+cd5b2b9941d5b6f6596787ebdb03c215d91fc44d refs/remotes/origin/origin
-+f20393c5e787b3776c179d20f82a86bda124d651 refs/remotes/origin/u-boot-2009.11.y
-+e8ae0fa5edd152b2b29c470b88429be4cdcd2c46 refs/remotes/origin/u-boot-2013.01.y
-+be360d9824d653780ebd3ffc08f1938a8e3dd747 refs/tags/DENX-2005-10-29-2350
-+384ae02506f0673070a3516b1858f058a07f85f3 refs/tags/LABEL_2002_11_05_0120
-+56f94be3ef63732384063e110277ed89701b6471 refs/tags/LABEL_2002_11_05_1735
-+7f6c2cbc2bc0721c41bb776242c0b18ec70328e4 refs/tags/LABEL_2002_11_10_2310
-+1d0350ed0b1b0f63e3fb5db6b19397b84a2ea1c7 refs/tags/LABEL_2002_11_11_2211
-+2262cfeef91458b01a1bfe3812ccbbfdf8b82807 refs/tags/LABEL_2002_11_18_0115
-+ea909b7604306a400ee3abf57e2fa7b2dde5dde1 refs/tags/LABEL_2002_11_22_0015
-+a6c7ad2f65afaa717ba19cbf9d8d138b5f10ccf9 refs/tags/LABEL_2002_12_03_2230
-+7c7a23bd5a0bc149d2edd665ec46381726b24e0c refs/tags/LABEL_2002_12_07_0120
-+288b3d7f5a54c987ecdfc5add4c7c25d36a9a3e1 refs/tags/LABEL_2002_12_21_0040
-+13122b4f1d6d00d6d4993ef56d9b5c5bd24f431e refs/tags/LABEL_2002_12_28_1700
-+d0fb80c3021e15853895e9ae45ab9368d0fb52fa refs/tags/LABEL_2003_01_11_1050
-+608c91460b37fd9fe0088a0ce813a443f116a8d5 refs/tags/LABEL_2003_01_14_0055
-+6069ff265362ef6239749b5f598b137f407b821e refs/tags/LABEL_2003_02_28_0150
-+43d9616cffb4a130e1620e3e33fc9bc1bcabe399 refs/tags/LABEL_2003_03_06_0050
-+db2f721ffcf9693086a7e5c6c7015f2019e7f52e refs/tags/LABEL_2003_03_06_0200
-+500545cc6b83958209128bffa825b3c842a21a4e refs/tags/LABEL_2003_03_06_1440
-+1cb8e980c41e86760fa93de63f4e4cf643bef9d9 refs/tags/LABEL_2003_03_06_2255
-+1957dd29d980ecb197c3a6dbe4f6609dae135a1d refs/tags/LABEL_2003_03_14_2150
-+10f670178cce29d7f078ca622f0eeafd6903748a refs/tags/LABEL_2003_03_25_1830
-+ac6dbb85b7f080d923013bff4e1d5267cb6f8a5a refs/tags/LABEL_2003_03_26_1300
-+cdd8a0f1517b89349265465bf334db32e2304b45 refs/tags/LABEL_2003_03_27_1900
-+3e38691e8f7aa0d9b498d76c7279ddec6e4946f3 refs/tags/LABEL_2003_04_05_0300
-+4a6fd34b267dbf4a72080ab9a085bb45c63660fb refs/tags/LABEL_2003_04_15_1900
-+7aa78614716b7bd7bdf68553f261ad0d5a12826a refs/tags/LABEL_2003_05_03_1700
-+45219c46605f9b933ab454738ee4ce543d5b70d6 refs/tags/LABEL_2003_05_12_2355
-+7f70e85309c6367138c0ebd14abdd49964b8d50a refs/tags/LABEL_2003_05_20_1630
-+82226bf4d2fe87076d7f5d7e2677fdd5d0e35fc2 refs/tags/LABEL_2003_05_20_2250
-+c8c3a8be2dd09e51d7dc33f431e3a638ac5688f2 refs/tags/LABEL_2003_05_22_2230
-+5d232d0e7ea982d859d028ab482d95eb68460b19 refs/tags/LABEL_2003_05_23_0055
-+4c3b21a5f915988e3d9681cf9cb566bb7bd56859 refs/tags/LABEL_2003_05_23_1450
-+3b57fe0a70b903f4db66c558bb9828bc58acf06b refs/tags/LABEL_2003_05_30_1450
-+7a8e9bed17d7924a9c5c4699b1f6a3a0359524ed refs/tags/LABEL_2003_05_31_2115
-+682011ff6968198da14b89e40d9f55b00f6d91f7 refs/tags/LABEL_2003_06_04_0200
-+a3ed3996cdb9fca78329f6aca62d235263b7da90 refs/tags/LABEL_2003_06_05_2140
-+71f9511803de65a3b98d2f592d418da1d1539f13 refs/tags/LABEL_2003_06_16_0055
-+9a0e21a3a87830f66a93c17d1bca66fd12d860ae refs/tags/LABEL_2003_06_22_1530
-+b783edaee8252bfdba3f7b3fd29519a81ce71e42 refs/tags/LABEL_2003_06_26_2220
-+8bde7f776c77b343aca29b8c7b58464d915ac245 refs/tags/LABEL_2003_06_27_2340
-+91a0ce965d5905c37fff45555b7e3113b9359c8f refs/tags/LABEL_2003_06_28_0050-stable
-+ef0630617e0f52dabb2cf7073df281e680073ec1 refs/tags/LABEL_2003_06_28_0130-stable
-+ed579b4210cc5341d511e090239ca697e91ad728 refs/tags/LABEL_2003_06_28_1800-stable
-+eeacb89cb311fe273fef0f20b2bacf589b36f8f4 refs/tags/LABEL_2003_06_29_0145
-+7152b1d0b3f8beec8c297d64664e41b4c4ef610a refs/tags/LABEL_2003_09_06_0055
-+4f7cb08ee7b48a511a9cd2398fd4a243ca2733c7 refs/tags/LABEL_2003_09_12_0110
-+f5300ab241898c490231e59229e6312aa862ce52 refs/tags/LABEL_2003_09_12_1745
-+531716e1710083f91d9fa351f89d18e271b5c577 refs/tags/LABEL_2003_09_13_2100
-+34b3049a60a37e180d73332ccddf706c049a0515 refs/tags/LABEL_2003_09_16_2310
-+80369866a482b923f0398f4c8172865282559f5b refs/tags/LABEL_2003_09_18_2045
-+bb65a312675f3cd1923a5cbe325ad9ca1703fc58 refs/tags/LABEL_2003_10_01_1830
-+fbe4b5cbdea438ccec0d93de443f367f3ba46196 refs/tags/LABEL_2003_10_06_2355
-+a0ff7f2eda50de4d4096265a086c94ac640fab7c refs/tags/LABEL_2003_10_09_1515
-+5da627a424b3ad2d38a81886ba4a18e5123a6788 refs/tags/LABEL_2003_10_09_2320
-+f72da3406bf6f1c1bce9aa03b07d070413a916af refs/tags/LABEL_2003_10_10_1200
-+2d5b561e2bfdee8552a99b2cf93016cce2a74895 refs/tags/LABEL_2003_10_14_2140
-+42d1f0394bef0624fc9664714d54bb137931d6a6 refs/tags/LABEL_2003_10_16_0200
-+d7281f41094bee59eca958de3c04995a2f79034a refs/tags/LABEL_2003_10_20_0025
-+b4757cee52597ab5a67c30a1bf2a3208209e1ccb refs/tags/LABEL_2003_11_26_MKR
-+fa1399ed127c8be507bf182dc7d8d61a54938d79 refs/tags/LABEL_2003_12_06_1550
-+5e4be00fb037feb6476125d044b98e0e22b70d31 refs/tags/LABEL_2004_01_21_2110
-+6876609446980c3055bbd32c195a63330e21d8e6 refs/tags/LABEL_2004_01_29_1030
-+a2d18bb7d31e7b971386fef505ff0218f3b6e893 refs/tags/LABEL_2004_02_11_2240
-+cf56e1101957c09cb4aafcf28a89658c4649c511 refs/tags/LABEL_2004_02_20_2310
-+5cfbab3d822cb690be6d4f1793aab0cea761134c refs/tags/LABEL_2004_02_24_0305
-+232c150a250bb2fcb894b15d67c65df2458e271f refs/tags/LABEL_2004_03_12_0130
-+42dfe7a1844cbad7114038aaf03828acb7a84414 refs/tags/LABEL_2004_03_14_2340
-+d9df1f4e662441c487f96a4e1f91caa9297afdd9 refs/tags/LABEL_2004_03_16_2330
-+b79a11cc2bda7a4d5e00444427a0d06b4e86a990 refs/tags/LABEL_2004_03_25_1630
-+998eaaecd46ee5f00550e30e606cb5556e0b9345 refs/tags/LABEL_2004_04_18_2135
-+5cf91d6bdc3e60bd43f9ba1bbb97a43ee49b2b2d refs/tags/LABEL_2004_04_23_2240
-+e4cc71aa4403c82f0b3e89087024f83832ece9ec refs/tags/LABEL_2004_05_19_2335
-+69459791268d48c7081802dbc7a51d4e42c8a8cd refs/tags/LABEL_2004_05_29_1850
-+021bfcd3c624ce88f739f01ba4220197bdd47a5e refs/tags/LABEL_2004_06_24_1800
-+e94d2cd9d1dc0f58b18e7c31fc9345129b1a44fb refs/tags/LABEL_2004_07_01_1200
-+31a649234ee4051e96cf45285cdf2dbfa668d30c refs/tags/LABEL_2004_08_28_2355
-+7ca202f566a6e9dc3d0dd0216e82ad1a48f50f19 refs/tags/LABEL_2004_08_29_0045
-+eedcd078fe1434d93b84322c4e14c52f80282a41 refs/tags/LABEL_2004_09_09_0000
-+8b74bf31fe57edfc502f94e905977304eac943ca refs/tags/LABEL_2004_10_12_0110
-+14699a22cf47b83995d19877d2b938b2270defc0 refs/tags/LABEL_2004_10_20_0020
-+cacfab588a897c369a4906818c5ed4bc40a450c5 refs/tags/LABEL_2004_11_17_2222
-+ed54e6212518262d27abe5e6de3c608d5ebceafb refs/tags/LABEL_2004_11_25_0035
-+f7d1572bf51619554f278cb543ef0445baa3a1f8 refs/tags/LABEL_2004_12_18_2335
-+bff96b0e6bdf8551e8468b111177c553e4994db2 refs/tags/LABEL_2004_12_19_1100
-+08f272787a93cb11338fd81ab92a7439a361e3b2 refs/tags/LABEL_2004_12_19_2240
-+400ab719c6025c176c50bcdff342384222d7424b refs/tags/LABEL_2004_12_20_1220
-+436be29cad60a46ed5983120aff71909d8f234a3 refs/tags/LABEL_2005_01_31_2245
-+e799d3755e83c70bf8c92977190d1777b390a8de refs/tags/LABEL_2005_02_07_2045
-+b9649854f6ffdeaad23daec21013552cef2e05f0 refs/tags/LABEL_2005_02_08_1615
-+e58cf2a0cfeb357faa134af1e12b96f4109af360 refs/tags/LABEL_2005_02_28_0050
-+f4733a0764741966a5e842968166b40fb062d577 refs/tags/LABEL_2005_03_06_0225
-+911d08f6ae244c6407fff268585e5b9544ce8adb refs/tags/LABEL_2005_03_15_0125
-+f5c5ef4a1fa7dcf90fd74f795a131d07377406ab refs/tags/LABEL_2005_04_05_1830
-+12b43d515c62682fcf7b578f31920a2be49142fe refs/tags/LABEL_2005_04_05_2345
-+5e5f9ed254e20b830fef5f42a52ac0bbdc92a57e refs/tags/LABEL_2005_04_14_0115
-+412babe304b948e1e3a909f8d2eb091b83f700d5 refs/tags/LABEL_2005_05_05_1920
-+ed16fefcbaf99a67a7dd7639898dbc896c70cb1b refs/tags/LABEL_2005_05_09_1245
-+9dd41a7b0c5c94d74c25edfdd6393c656669c09a refs/tags/LABEL_2005_05_13_0050
-+88804d19e2bf36c9eaefadbd7199c093c900953b refs/tags/LABEL_2005_07_04_0202
-+dafba16e6fc1837381c8e74c4891ad6965cf54ab refs/tags/LABEL_2005_08_12_0050
-+053b40fa0c90d885b00c29c9c4490924801809f7 refs/tags/LABEL_2005_09_15_2320
-+eb394f56db3e05d00891d6dc36a00df0025cf255 refs/tags/LABEL_2006_03_12_0025
-+^84ef51a632063e8cb57b2e9a4252497512831ffe
-+9bf86baaa3b35b25baa2d664e2f7f6cafad689ee refs/tags/LABEL_2006_04_18_1106
-+^8419c013048b1f15f3fa2fc7c0463d860a04ee3e
-+7a4978bc272e20c7febd15d76786c7d9b86a98cd refs/tags/LABEL_2006_05_10_1800
-+^977b50f86824fe3c262ef7efce5dbb7ddaf8a48f
-+c7071e6d645a8e13adb0d4cea2caad27213fa62f refs/tags/LABEL_2006_05_19_1133
-+^5770a1e488621a9e7e344afed7c921ff4e715a63
-+b11752921b5d22dcfda237e035a86470993e887b refs/tags/LABEL_2006_06_30_2020
-+^3f7a63e6a34c5b435864c860c1563117e45d1c35
-+2f91a3d0f8a73665423eb6ab17689c67f05e0887 refs/tags/U-Boot-0_2_0
-+60fbe254243ec461ec73da13132be098db33d3fa refs/tags/U-Boot-0_3_0
-+02c9bed451b36f3b1f11d5fe617da4fe4b9f9ab7 refs/tags/U-Boot-0_3_1
-+993cad9364c6b87ae429d1ed1130d8153f6f027e refs/tags/U-Boot-0_4_0
-+b0fce99bfc116c2ddb4506268d6e4a0a7054478d refs/tags/U-Boot-0_4_1
-+f12e568ca45f6c56b5a6d52a43524987e141abe7 refs/tags/U-Boot-0_4_2
-+ad12965db5d145f7cf7595cbeaf03b3402f42897 refs/tags/U-Boot-0_4_3
-+945af8d723a29e9b6289d84250745ed0dc16fc81 refs/tags/U-Boot-0_4_4
-+ae3af05ec986a8ac66dadb5eafe13db2d4a02c5c refs/tags/U-Boot-0_4_5
-+e0ac62d798ce60ec5d43125d4786e58b0d881836 refs/tags/U-Boot-0_4_6
-+0cb61d7dddb0d8c087f6df46a74815950668c97b refs/tags/U-Boot-0_4_7
-+7205e4075d8b50e4dd89fe39ed03860b23cbb704 refs/tags/U-Boot-0_4_8
-+b13fb01a62708492cae4b33c4d6fa9ae127905f4 refs/tags/U-Boot-1_0_0
-+b299e41a0d34bf96202d9bbb72739bdd9414b0cc refs/tags/U-Boot-1_0_1
-+198ea9e294e38cea49f9f2d9b911bdfdd20e48dc refs/tags/U-Boot-1_0_2
-+f525c8a1476945b078ce4ffe6cf768c286cbf8cc refs/tags/U-Boot-1_1_0
-+08f1080c9cbde2a500e6efe8bc5647a68f183c91 refs/tags/U-Boot-1_1_1
-+15c7a8efd2f7275e5b3249aac305f2598a998645 refs/tags/U-Boot-1_1_2
-+2893ecbf3e5b983970138289b759baf45a327ff3 refs/tags/U-Boot-1_1_3
-+74ad4b4fef966ab4cc7192b5b3808ec95e60570b refs/tags/U-Boot-1_1_4
-+^e6b6d16de73de6a76e2ec4338291e828b860f040
-+b7487ff5a5d41e379809509b9a07546e73577dc8 refs/tags/U-Boot-1_1_5
-+^ba999c531ed16ec749b2b6f4b0133cee38842b91
-+ba89ef3908907cf55a5bff6ba211b8d8c2b08800 refs/tags/U-Boot-1_1_6
-+^c59200443072353044aa4bf737a5a60f9a9af231
-+eb8fae4983cfe07fe7c785f483f2278b6146463a refs/tags/U-Boot-1_2_0
-+^f4eb54529bb3664c3a562e488b460fe075f79d67
-+d9af3c87df93e1a8126b1a52adf8db978e9a0d40 refs/tags/U_BOOT_0_1_0
-+69a193a815e7f0b35eeeb013a1f1e0cd9e590f92 refs/tags/v1.3.0
-+^9a337ddc154a10a26f117fd147b009abcdeba75a
-+6b894f3c3eac06420acad28e70621c5ba410b321 refs/tags/v1.3.0-rc1
-+^ff7640c9ead8806b5d827f2b29f9cb2632add729
-+a5d674296b4a991efdb708a9c8d6c78d4e47f565 refs/tags/v1.3.0-rc2
-+^66dcad3a9a53e0766d90e0084123bd8529522fb0
-+bf58489ae2e0de9bd2d7a6ebdbfdb655b48f0c09 refs/tags/v1.3.0-rc3
-+^636400198228d96983c06657b17f760f5989958e
-+409530dcb489cf4c24fab977ca041dac27ff9f28 refs/tags/v1.3.0-rc4
-+^5947f6999aafa7c54c1390983d264a8463dfea8e
-+2006af48494237562529cfdb111681149e0f13e9 refs/tags/v1.3.1
-+^41be969f4957115ed7b1fe8b890bfaee99d7a7a2
-+b67a97f26c406e9116fc85f5dcad4917b7a1c801 refs/tags/v1.3.1-rc1
-+^8d4f040a3c15036a6ea25a9c39e7d89fefa8440d
-+2b0e9596bac7d2776431657488db88703ba1d441 refs/tags/v1.3.2
-+^30f1806f60978d707b0cff2d7bf89d141fc24290
-+1dec865fbd4b229061233c504166443f623335db refs/tags/v1.3.2-rc1
-+^67a4389e39ad853d65b72e2b7cad15c7e8291147
-+c19f1e9b9a8794d488221a9cc3a60db03b7ccc5a refs/tags/v1.3.2-rc2
-+^b29661fc1151077776454288051bc9a488351ce8
-+955a05aa4445c5652c53e06254d420d7dffd49a6 refs/tags/v1.3.2-rc3
-+^661bad63a076a96c39c64f136915f146725af92b
-+01348d89a001323ae51dda449decea61092e008b refs/tags/v1.3.3
-+^180a90abdae72587c0f679edf8991455e559440d
-+33a7d077fd81772d263a4e91a5aebe585c5362ca refs/tags/v1.3.3-rc1
-+^fd7531c1e9d56b9e5e06d2c0e02b798dab72f70c
-+5ee1a6e902f3b76f672587bb7be4600ab9af1c34 refs/tags/v1.3.3-rc2
-+^76617299358ebba260ecc02d33e8e75d8d13dd3b
-+239f0883ea3a9f511f8925619d30a0dc9ea8fe01 refs/tags/v1.3.3-rc3
-+^6adf61dc4cb5c53a2df990cbc8df2bceacbfd869
-+5978b7d69fc40ee9512a6c1b5a3216019ee8e847 refs/tags/v1.3.4
-+^cd82919e6c8a73b363a26f34b734923844e52d1c
-+7cbbab2ab61f4f726fac1ff6b8bf2dfd26f2b3ba refs/tags/v1.3.4-rc1
-+^699f05125509249072a0b865c8d35520d97cd501
-+69be245e15510af0756aafb01020f9752ff7e066 refs/tags/v1.3.4-rc2
-+^4b50cd12a3b3c644153c4cf393f4a4c12289e5aa
-+624c2d518b6dfc652db6fcbc969bbd93f9821322 refs/tags/v2008.10
-+^b59b16ca24bc7e77ec113021a6d77b9b32fcf192
-+3033c74cb0ad3dfbb1733a36f72f2f4496ba1863 refs/tags/v2008.10-rc1
-+^8b9e4787641719d709bfa2ebeb72e8bd4952bee7
-+2071c4239c250da6c8cbc93aa1d74b503acb2507 refs/tags/v2008.10-rc2
-+^c0d2f87d6c450128b88e73eea715fa3654f65b6c
-+789d45f945bc37e721b91923388a91a4f4fcbedb refs/tags/v2008.10-rc3
-+^b4dbacf69a669a17487054552fc2761149dd6767
-+c2d264a1e4540f09e7098a42d094bf6724567043 refs/tags/v2009.01
-+^72d15e705bc3983884105cb7755c7ba80e74a0a5
-+866b1cc6f942be4e2669c17e390cd552abc68e3e refs/tags/v2009.01-rc1
-+^aced78d852d0b009e8aaa1445af8cb40861ee549
-+35ca1e5e625049dbad16ce4cb273e5af47706a23 refs/tags/v2009.01-rc2
-+^0e3ece33801e377be67ffa29f083421ad820f28b
-+79f73ea6d9d81ce14a839fa4cc24d1a3ad0975fc refs/tags/v2009.01-rc3
-+^635e5f8fc82365e6e9734b3132bc95135a6de679
-+661e77d04058f94336f621e41b7b341a3b503833 refs/tags/v2009.03
-+^e60beb13cf0135dc71c541021487b5ccc4d269cb
-+0eb92888fc505ffc6bc58a5e7bedc0ae127279fa refs/tags/v2009.03-rc1
-+^32688e572ff96715b41420e9a7f280db6c399b65
-+0e34d8aa7974c11a5fd9afe983e9c277e02ef358 refs/tags/v2009.03-rc2
-+^b3dd629e78870ba2dc9f8032978721c0fa02a856
-+d70da93b038dbee50cb3e84cc0db25aab424a772 refs/tags/v2009.06
-+^6b1f78ae6ad037382ad430b07064105c88f7ac02
-+4cb5ec6e36792f300ecbe4e67eb6931848e0bace refs/tags/v2009.06-rc1
-+^6b8edfde22acc574b5532e9f086e6a7287a9bc78
-+210d415558d01a195f98360b127e3f4eb3bb933b refs/tags/v2009.06-rc2
-+^a2e0ffcf2d9a22c582a93e84a4bef20fd3877f47
-+95bd78f93cfc903186e88fc58deac036c401cfbc refs/tags/v2009.06-rc3
-+^580611cb0932143fc2d7a735cfa9ce1ef34d6002
-+e99ab567a1a6848b871a9af8cab3ad2c0c49647a refs/tags/v2009.08
-+^3d35d87d5482de23cd5dc4d7721b1086107cae50
-+e2447f7b3a5336462dd3bebf9a10fc368461b023 refs/tags/v2009.08-rc1
-+^94978e19f31d225b4f7d97c4acbac1ecfaeb8f69
-+6f03d260e53b1263471e5c3e690ddfe43b53d959 refs/tags/v2009.08-rc2
-+^eb1a4d0a471505c169bef19a73a60f8641f0b875
-+9ab87511114da4af82dbdf745edc7478d3e3f274 refs/tags/v2009.08-rc3
-+^963f2f611741f8d9c38bd7caf20ae8c95cab7b3f
-+bd1e74b1989e22fe19f8809cacfbf9cbbf4eaf20 refs/tags/v2009.11
-+^a200a7c04d89853d2a1395b96d8ca5e3dd754551
-+815f048382dc123c29baa41238a89f820876bf1e refs/tags/v2009.11-rc1
-+^4946775c6db52dba28f72ba3525764b54f1d4593
-+4c682c60e20b5624868ed6aa214d073cfb8dc0a6 refs/tags/v2009.11-rc2
-+^0fc52948bda0734431cb528ee4fd82f1dec8c7b5
-+9fd828dddea4306b99670d07366fe3f7c1052d08 refs/tags/v2009.11.1
-+^f20393c5e787b3776c179d20f82a86bda124d651
-+65bc917e953601b09965e5fcdfbe4f6c75547e50 refs/tags/v2010.03
-+^ca6e1c136ddb720c3bb2cc043b99f7f06bc46c55
-+537c2a51feed445384aa43e482e4ddc0b5549a75 refs/tags/v2010.03-rc1
-+^93910edb595a88d394da3eb2cf5148096155dfe9
-+273a6decf55982f7a5263d17559b94281f36caf7 refs/tags/v2010.03-rc2
-+^152dda3d94e97ede7af3f9560a59a659384d4585
-+3ef91195a43e6a229290977d70bb913008db2dc9 refs/tags/v2010.03-rc3
-+^2883cc2d48e99fd1873ef8af03fee7966611b735
-+41d5718ee6fb36a1282cde6c86b55f83b62278e1 refs/tags/v2010.06
-+^a59e27997637a2395ae2cc7f809127f24119a167
-+096e50e0a8934f4e083d43d5711d611eebe82607 refs/tags/v2010.06-rc1
-+^01f03bda5b22e5aeae5f02fd537da97a41485c73
-+a42fe9aa726cd3d64c3fcf11eea0bc531ee8d281 refs/tags/v2010.06-rc2
-+^a9046b9e1aeeedc66ddf1d00474ad0ce8c6aa6e4
-+17d61cb4e86f3dc4e7deaa0042fe6d6a6afff8f3 refs/tags/v2010.06-rc3
-+^482126e27b3dbf0e69a6445da8b94b3551adf05d
-+f7b386b1df73ff213287eed6ca1b74bb91da1b05 refs/tags/v2010.09
-+^1e4e5ef0469050f014aee1204dae8a9ab6053e49
-+c988fb931f8c8f5d9ce1fc6ca2c20219bcd0fc10 refs/tags/v2010.09-rc1
-+^2d941de9d5c7ba00dc19787dfa0aac2949fd00fb
-+09012d353eaf26310dc3ddb1915a3d3504ab9a27 refs/tags/v2010.09-rc2
-+^07517e7f4f582d1607adbc444bab75af3ac4a7f9
-+d0e3a3f4574f1f51ae3d7c5605b7ea5c6df929d4 refs/tags/v2010.12
-+^250ef029844be2cb98635f265359396866d1749f
-+5aeba5ba231ccceba84dd2311b1dae645b75bfdc refs/tags/v2010.12-rc1
-+^908614f20f7f0f5df736eed21b88e81ebbf14e86
-+a1904f2bc34e97d79483bcefc35b188620ee9089 refs/tags/v2010.12-rc2
-+^d0d2271f8c62e830ec65fb069b6d12dd708e3e2f
-+9bde025ff24c811c02d2a7e6451a57ea63895b3a refs/tags/v2010.12-rc3
-+^3ac45988ab1605baaf83bd3acb80a197c9a208c2
-+b29fbb347698286935bfc401c08499a6f63479de refs/tags/v2011.03
-+^19b54a701811220221fc4d5089a2bb18892018ca
-+2360c73ed79d91fe75c297c8a62b2810e8eef281 refs/tags/v2011.03-rc1
-+^42d44f631c4e8e5359775bdc098f2fffde4e5c05
-+38c5af4db86a3e7feaff5092b136722c53784c03 refs/tags/v2011.03-rc2
-+^cb815e5ff979e36d68df130a810d34de4bf93289
-+54d5e1052f16fe5e3337600f485b13b4c6204972 refs/tags/v2011.06
-+^b1af6f532e0d348b153d5c148369229d24af361a
-+4d0984f19a46afd17d1ca843deacc5bbedd95eda refs/tags/v2011.06-rc1
-+^7a82c208143bbc774ffcb4e53239410f867a0794
-+1b885e3346f4e06463949dcca3f9444d3d76eeda refs/tags/v2011.06-rc2
-+^6f4dd40cddbd69c56fec1285fee02cbd5a3833d8
-+0431724fde21417139eb1209ea8b562235c64c6e refs/tags/v2011.06-rc3
-+^79cfe422615c010a75ece41662a05cd432ada389
-+58fb473021fd5377db6cb934ea7032da885f80b7 refs/tags/v2011.09
-+^1d5e7fb403257d62f0f2419cb83fdf6b0f02f215
-+86773b53d37288d8ad16f27b93fd948ff11f8012 refs/tags/v2011.09-rc1
-+^6ceb0135f96d73063ffbaab5be7ce23933367388
-+00e61f6907d4ecc2e41f4ba61da74e7cc8665e29 refs/tags/v2011.09-rc2
-+^bc196029f53c2d82eb9a12eb8b66e696b6284941
-+d0b049d45ae734fa473894ae6fd9f4d7d2437cc5 refs/tags/v2011.12
-+^cba9a894fdb1cb49b60fcd1d1d6919cbd7995dd5
-+ee26bfcef5eb5cb4481eb073924cddc22ea2e423 refs/tags/v2011.12-rc1
-+^5738946be46c513fd945d3e1d8f8a0fa718b7c58
-+db9c62b847eab7d42b396ee59cbf4e5e75f02fc6 refs/tags/v2011.12-rc2
-+^901de79a3792c81aefcbf207a34049e63f21362b
-+d18276f86b5bed7646749a6a81ae94af79578d5f refs/tags/v2011.12-rc3
-+^be662e9a6b7bf27cb7bc06de18f3c51b2ea80160
-+5910ada22359d6cd06b9299f1ef6020a1ea2b893 refs/tags/v2012.04
-+^2790bf69dc12fb9aeb9836904e5f57c7f83d5552
-+bf41e44b53ad476c47da12f985115d2f073c716d refs/tags/v2012.04-rc1
-+^c008b6f6dd6b8965e9a7654ffbce75bb9ff7a3b5
-+b9c6ec5eb3eaa4471b32e92f48d6df2867020738 refs/tags/v2012.04-rc2
-+^f5cdc11775c4b7fdbf52a6dd2f463d329804ab11
-+d2062de0a3356d2e5c4b9ee6b7c805f0ac5cef37 refs/tags/v2012.04-rc3
-+^fb14b6b2f680363678b4e6a75eb9f3f0d79111fa
-+b75d3092239fc5e0e05571d91a380eb8d90d2f45 refs/tags/v2012.04.01
-+^415d386877df49eb051b85ef74fa59a16dc17c7d
-+d8679b1a4e01cfc7e90be484f4feafdcf153f3a1 refs/tags/v2012.07
-+^190649fb4309d1bc0fe7732fd0f951cb6440f935
-+ea406aa0f20923152f447108f189bd6e84f2b082 refs/tags/v2012.07-rc1
-+^211e47549b668c7cdd8658c0413a272f0d0495d4
-+5f4bc90c127618f5022d0086d329bbacab9c2b9b refs/tags/v2012.07-rc2
-+^8b10652d6d9cc05023b5a6b73840078066f95a50
-+473fff580bfa77b2f4b4dcecbb63ede28f8da5fa refs/tags/v2012.07-rc3
-+^c627faf637f5fe091bdb6846a52b16983e97b262
-+5aad5045f59029384c11058970caa31de2cfa514 refs/tags/v2012.10
-+^6528ff0109d81c1f21d20f9f1370782bccf87bcb
-+91c92e05eb518c1697c64e30e6887aa59a4fde44 refs/tags/v2012.10-rc1
-+^ee1f4caaa2a3f79d692155eec8a4c7289d60e106
-+3b07d3f76ca3b0bb41b463291f8456918ecc7df9 refs/tags/v2012.10-rc2
-+^221953d41dea8dce027b9ce6beee700d97ac2c83
-+7f2daf884129488975dd5f41d87730b26532e128 refs/tags/v2012.10-rc3
-+^c7c63221439ad87a8c05e7b42f9eae32ec7cc2d4
-+35c192cf449860aec8766e20a51bf2052a1dc968 refs/tags/v2013.01
-+^3a9d879f6f64585b819af728b53be0a05037fe0d
-+02eac6cbf79f854495705a5cf074b9b31ebdef47 refs/tags/v2013.01-rc1
-+^3ae7b240ad8c723d02aa79654220a07049b7ae4d
-+e99406154b90847a729cfef176c5b0681b8fbf62 refs/tags/v2013.01-rc2
-+^ebbf0d20aa85f623c49b7ed3349ebfea450c152d
-+32811f96f8259013d054deddb4d3b67a3d3092aa refs/tags/v2013.01-rc3
-+^6fb4d74e59750b43f00d460c569e8a30c67c5bb0
-+8512592e47cc968d2d6eb788acde761ebc3acbf6 refs/tags/v2013.01.01
-+^e8ae0fa5edd152b2b29c470b88429be4cdcd2c46
-+eb34b5ea26363ff349dee46ec6fb90fbc2198495 refs/tags/v2013.04
-+^d10f68ae47b67acab8b110b5c605dde4197a1820
-+734a826d8508b7ca8131381f1fb9ad36e7e98432 refs/tags/v2013.04-rc1
-+^2536850d7cd90bdb75bf3ff86838f913392b68db
-+8a7f04c4b3fe8ecb0b8af5c285cd2e252f60482e refs/tags/v2013.04-rc2
-+^c8142633e169665b246352918df5b76fd243bb71
-+83be647fa85edeb64c98d2d61114ca30de30e308 refs/tags/v2013.04-rc3
-+^cba6494f24d711ba63afb22b1ee691a41fee121c
-+9e96446a0bf49683dad66708579873a3b6c4f068 refs/tags/v2013.07
-+^62c175fbb8a0f9a926c88294ea9f7e88eb898f6c
-+7a42d4e7aa2788b653927904e03ec20793823a19 refs/tags/v2013.07-rc1
-+^216a793cc1702227fd4ad624080f585038d1fa45
-+4d5aaff0a76a07d28051134d7301d25a74a3a32e refs/tags/v2013.07-rc2
-+^e6bf18dba2a21bebf2c421b1c2e188225f6485a1
-+3060931a37a2417275a24400a6eb60abeb1a176a refs/tags/v2013.07-rc3
-+^68c517eafcb060aa8ef92ed2620f0f41c5275d89
-+2d65a6b5a3f069ea92ee33c1c925d79610af12d0 refs/tags/v2013.10
-+^183acb700378a8cfc5d50a01a65de93fb2c24586
-+ff92b6e5cf51421163e4ea1d29004eeffd6b6a99 refs/tags/v2013.10-rc1
-+^40a60c6e8bdd00330310eaa351c9391e74d0bc2c
-+bab9dca36165be177a74ff31eabda75f94e26599 refs/tags/v2013.10-rc2
-+^fb18fa95a14ae875ef0a5421cd9fecc00c7c3a4c
-+c1d48b0698c9b7ddf342f5808d3a4a973317c2dc refs/tags/v2013.10-rc3
-+^46ef4faed18196472eb95216b2f74c1397ecf024
-+c99ec7332286341649cd5337eb1bbeabdff13a3a refs/tags/v2013.10-rc4
-+^0c5274e6f3231a3a28dafc1204b3f71a3534c520
-+e3fbee81eccebfd6c91609f6bc4b4aec3a017131 refs/tags/v2014.01
-+^b44bd2c73c4cfb6e3b9e7f8cf987e8e39aa74a0b
-+0b3dd5f23cf6eeb9ec84da8c77d8c7d1e7d23680 refs/tags/v2014.01-rc1
-+^d19ad726bcd5d9106f7ba9c750462fcc369f1020
-+e68eecb2d896ddef422984ae6d52793099b74e9a refs/tags/v2014.01-rc2
-+^fd44194945714a478fab6407c04453caaef0bac9
-+5f60aba0d3f6b827de8dc7e0850c1050f655b572 refs/tags/v2014.01-rc3
-+^cddb6b8304bfbc34f43920051256de7fe6c4c0ab
-+5b3ba909f4f881add7756d820f2eb67d3e31b112 refs/tags/v2014.04
-+^dda0dbfc69f3d560c87f5be85f127ed862ea6721
-+9574fdf82ff62a7086b257c89c01bde937a0c45e refs/tags/v2014.04-rc1
-+^0a8e823ad0c5a602c93c2e8a54caf622ade6d3fb
-+4017dac218f34783977c36af8f65984a57ace7e3 refs/tags/v2014.04-rc2
-+^8ee950dd273aef6a074d41bf2ee4ef11d6f848fb
-+ba34c9404626f23a41ef07bcdf3e7e5cbf133b82 refs/tags/v2014.04-rc3
-+^c494eaf409cb8db9a5a513e9bdfac20b7a83daca
-+590a74953a76f2b4cc552bd85b475ea54ba02f66 refs/tags/v2014.07
-+^524123a70761110c5cf3ccc5f52f6d4da071b959
-+2db93972561773246cb7498bf1ee73e3d34fa697 refs/tags/v2014.07-rc1
-+^3e41c54ad8099951d57c3c5a0f5ebc6e8becf70c
-+3472f37f1ce4d2737476b4ec7c768c04afe20046 refs/tags/v2014.07-rc2
-+^0116f40bbc269c57566d69e0db8cb9da2e194d33
-+d3b233a6a320688e22419134d6f7bb23e9c0332b refs/tags/v2014.07-rc3
-+^76b21026ceb5a6a83fc53b0ecdf425f240318022
-+9019e02a9d98f6788035ea352289a5afdbbf133d refs/tags/v2014.07-rc4
-+^a176ff0705351bf6d993a8f15e081bfa2ba2e1af
-+d96885d68127e270d16484c0fbc252953a2bf2e8 refs/tags/v2014.10
-+^c43fd23cf619856b0763a64a6a3bcf3663058c49
-+49fe41ad45d09cf083db39ce4a2653d903fbe1a7 refs/tags/v2014.10-rc1
-+^e76b933e02e1b38e48754c435e9dba1c0deeb3c6
-+8d6f7381cd8f915f6599044b1848a8a6a7faff02 refs/tags/v2014.10-rc2
-+^d6c1ffc7d23f4fe4ae8c91101861055b8e1501b6
-+1f254ba729e8b21ccba3c9caf02bf358a0e8d136 refs/tags/v2014.10-rc3
-+^742de9076e8a8f44b77794b43e6175d86b897996
-+a013989f700d43f79af64fb74b05b2f333a60c7d refs/tags/v2015.01-rc1
-+^9906090f527153afddc5aa64d37cb5f89c6ee129
-+77831f3e5f83e12b4e7df418e7d43977b189031d refs/tags/v2015.01-rc2
-+^2a82ec77d27ef5f860a107c4b764643a655dceeb
-+ecb091a9035a9c89a57b7fbd6cdf1db1c5ee9a80 refs/tags/v2015.01-rc3
-+^32fdf0e4d82bdca5d64d86330e461e59685f9959
-+9305547115a8073900fec5e8f3938b93c675f2c2 refs/tags/v2015.01-rc4
-+^125738e819a3b9d15210794b3dcef9f4d9bcf866
-diff -ruN u-boot-2015.01-rc3/.git/refs/heads/master u-boot/.git/refs/heads/master
---- u-boot-2015.01-rc3/.git/refs/heads/master	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/.git/refs/heads/master	2015-01-01 17:34:31.953508170 +0100
-@@ -0,0 +1 @@
-+125738e819a3b9d15210794b3dcef9f4d9bcf866
-diff -ruN u-boot-2015.01-rc3/.git/refs/remotes/origin/HEAD u-boot/.git/refs/remotes/origin/HEAD
---- u-boot-2015.01-rc3/.git/refs/remotes/origin/HEAD	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/.git/refs/remotes/origin/HEAD	2015-01-01 17:34:31.937508433 +0100
-@@ -0,0 +1 @@
-+ref: refs/remotes/origin/master
-diff -ruN u-boot-2015.01-rc3/include/common.h u-boot/include/common.h
---- u-boot-2015.01-rc3/include/common.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/common.h	2015-01-01 17:34:32.757494989 +0100
-@@ -70,12 +70,6 @@
- #ifdef	CONFIG_4xx
- #include <asm/ppc4xx.h>
- #endif
--#ifdef CONFIG_ARM
--#define asmlinkage	/* nothing */
--#endif
--#ifdef CONFIG_X86
--#define asmlinkage __attribute__((regparm(0)))
--#endif
- #ifdef CONFIG_BLACKFIN
- #include <asm/blackfin.h>
- #endif
-diff -ruN u-boot-2015.01-rc3/include/config_fallbacks.h u-boot/include/config_fallbacks.h
---- u-boot-2015.01-rc3/include/config_fallbacks.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/config_fallbacks.h	2015-01-01 17:34:32.757494989 +0100
-@@ -79,6 +79,10 @@
- #define CONFIG_SYS_PROMPT	"=> "
- #endif
- 
-+#ifndef CONFIG_SYS_PBSIZE
-+#define CONFIG_SYS_PBSIZE	(CONFIG_SYS_CBSIZE + 128)
-+#endif
-+
- #ifndef CONFIG_FIT_SIGNATURE
- #define CONFIG_IMAGE_FORMAT_LEGACY
- #endif
-@@ -87,4 +91,10 @@
- #undef CONFIG_IMAGE_FORMAT_LEGACY
- #endif
- 
-+#ifdef CONFIG_DM_I2C
-+# ifdef CONFIG_SYS_I2C
-+#  error "Cannot define CONFIG_SYS_I2C when CONFIG_DM_I2C is used"
-+# endif
-+#endif
-+
- #endif	/* __CONFIG_FALLBACKS_H */
-diff -ruN u-boot-2015.01-rc3/include/configs/alt.h u-boot/include/configs/alt.h
---- u-boot-2015.01-rc3/include/configs/alt.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/alt.h	2015-01-01 17:34:32.777494661 +0100
-@@ -95,4 +95,23 @@
- #define CONFIG_USB_EHCI_RMOBILE
- #define CONFIG_USB_MAX_CONTROLLER_COUNT	2
- 
-+/* MMCIF */
-+#define CONFIG_MMC
-+#define CONFIG_GENERIC_MMC
-+#define CONFIG_CMD_MMC
-+
-+#define CONFIG_SH_MMCIF
-+#define CONFIG_SH_MMCIF_ADDR		0xee200000
-+#define CONFIG_SH_MMCIF_CLK		48000000
-+
-+/* Module stop status bits */
-+/* INTC-RT */
-+#define CONFIG_SMSTP0_ENA	0x00400000
-+/* MSIF */
-+#define CONFIG_SMSTP2_ENA	0x00002000
-+/* INTC-SYS, IRQC */
-+#define CONFIG_SMSTP4_ENA	0x00000180
-+/* SCIF2 */
-+#define CONFIG_SMSTP7_ENA	0x00080000
-+
- #endif /* __ALT_H */
-diff -ruN u-boot-2015.01-rc3/include/configs/apalis_t30.h u-boot/include/configs/apalis_t30.h
---- u-boot-2015.01-rc3/include/configs/apalis_t30.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/apalis_t30.h	2015-01-01 17:34:32.777494661 +0100
-@@ -26,10 +26,7 @@
- 
- /* I2C */
- #define CONFIG_SYS_I2C_TEGRA
--#define CONFIG_SYS_I2C_INIT_BOARD
--#define CONFIG_SYS_I2C_SPEED		100000
- #define CONFIG_CMD_I2C
--#define CONFIG_SYS_I2C
- 
- /* SD/MMC */
- #define CONFIG_MMC
-diff -ruN u-boot-2015.01-rc3/include/configs/B4860QDS.h u-boot/include/configs/B4860QDS.h
---- u-boot-2015.01-rc3/include/configs/B4860QDS.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/B4860QDS.h	2015-01-01 17:34:32.757494989 +0100
-@@ -641,6 +641,14 @@
- #define CONFIG_SYS_BMAN_MEM_PHYS	CONFIG_SYS_BMAN_MEM_BASE
- #endif
- #define CONFIG_SYS_BMAN_MEM_SIZE	0x02000000
-+#define CONFIG_SYS_BMAN_SP_CENA_SIZE	0x4000
-+#define CONFIG_SYS_BMAN_SP_CINH_SIZE	0x1000
-+#define CONFIG_SYS_BMAN_CENA_BASE	CONFIG_SYS_BMAN_MEM_BASE
-+#define CONFIG_SYS_BMAN_CENA_SIZE	(CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_CINH_BASE	(CONFIG_SYS_BMAN_MEM_BASE + \
-+					CONFIG_SYS_BMAN_CENA_SIZE)
-+#define CONFIG_SYS_BMAN_CINH_SIZE	(CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_SWP_ISDR_REG	0xE08
- #define CONFIG_SYS_QMAN_NUM_PORTALS	25
- #define CONFIG_SYS_QMAN_MEM_BASE	0xf6000000
- #ifdef CONFIG_PHYS_64BIT
-@@ -649,6 +657,14 @@
- #define CONFIG_SYS_QMAN_MEM_PHYS	CONFIG_SYS_QMAN_MEM_BASE
- #endif
- #define CONFIG_SYS_QMAN_MEM_SIZE	0x02000000
-+#define CONFIG_SYS_QMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_QMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_QMAN_CENA_BASE       CONFIG_SYS_QMAN_MEM_BASE
-+#define CONFIG_SYS_QMAN_CENA_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_CINH_BASE       (CONFIG_SYS_QMAN_MEM_BASE + \
-+					CONFIG_SYS_QMAN_CENA_SIZE)
-+#define CONFIG_SYS_QMAN_CINH_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_SWP_ISDR_REG	0xE08
- 
- #define CONFIG_SYS_DPAA_FMAN
- 
-diff -ruN u-boot-2015.01-rc3/include/configs/beaver.h u-boot/include/configs/beaver.h
---- u-boot-2015.01-rc3/include/configs/beaver.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/beaver.h	2015-01-01 17:34:32.781494596 +0100
-@@ -40,10 +40,7 @@
- 
- /* I2C */
- #define CONFIG_SYS_I2C_TEGRA
--#define CONFIG_SYS_I2C_INIT_BOARD
--#define CONFIG_SYS_I2C_SPEED		100000
- #define CONFIG_CMD_I2C
--#define CONFIG_SYS_I2C
- 
- /* SD/MMC */
- #define CONFIG_MMC
-diff -ruN u-boot-2015.01-rc3/include/configs/BSC9131RDB.h u-boot/include/configs/BSC9131RDB.h
---- u-boot-2015.01-rc3/include/configs/BSC9131RDB.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/BSC9131RDB.h	2015-01-01 17:34:32.757494989 +0100
-@@ -11,6 +11,9 @@
- #ifndef __CONFIG_H
- #define __CONFIG_H
- 
-+#define CONFIG_SYS_GENERIC_BOARD
-+#define CONFIG_DISPLAY_BOARDINFO
-+
- #ifdef CONFIG_BSC9131RDB
- #define CONFIG_BSC9131
- #define CONFIG_NAND_FSL_IFC
-diff -ruN u-boot-2015.01-rc3/include/configs/BSC9132QDS.h u-boot/include/configs/BSC9132QDS.h
---- u-boot-2015.01-rc3/include/configs/BSC9132QDS.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/BSC9132QDS.h	2015-01-01 17:34:32.761494923 +0100
-@@ -11,6 +11,9 @@
- #ifndef __CONFIG_H
- #define __CONFIG_H
- 
-+#define CONFIG_SYS_GENERIC_BOARD
-+#define CONFIG_DISPLAY_BOARDINFO
-+
- #ifdef CONFIG_BSC9132QDS
- #define CONFIG_BSC9132
- #endif
-diff -ruN u-boot-2015.01-rc3/include/configs/cardhu.h u-boot/include/configs/cardhu.h
---- u-boot-2015.01-rc3/include/configs/cardhu.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/cardhu.h	2015-01-01 17:34:32.785494529 +0100
-@@ -43,12 +43,7 @@
- 
- /* I2C */
- #define CONFIG_SYS_I2C_TEGRA
--#define CONFIG_SYS_I2C_INIT_BOARD
--#define CONFIG_I2C_MULTI_BUS
--#define CONFIG_SYS_MAX_I2C_BUS		TEGRA_I2C_NUM_CONTROLLERS
--#define CONFIG_SYS_I2C_SPEED		100000
- #define CONFIG_CMD_I2C
--#define CONFIG_SYS_I2C
- 
- /* SD/MMC */
- #define CONFIG_MMC
-diff -ruN u-boot-2015.01-rc3/include/configs/chromebook_link.h u-boot/include/configs/chromebook_link.h
---- u-boot-2015.01-rc3/include/configs/chromebook_link.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/chromebook_link.h	2015-01-01 17:34:32.785494529 +0100
-@@ -25,10 +25,10 @@
- 
- #define CONFIG_X86_RESET_VECTOR
- #define CONFIG_NR_DRAM_BANKS			8
--#define CONFIG_X86_MRC_START			0xfffa0000
-+#define CONFIG_X86_MRC_ADDR			0xfffa0000
- #define CONFIG_CACHE_MRC_SIZE_KB		512
- 
--#define CONFIG_COREBOOT_SERIAL
-+#define CONFIG_X86_SERIAL
- 
- #define CONFIG_SCSI_DEV_LIST		{PCI_VENDOR_ID_INTEL, \
- 			PCI_DEVICE_ID_INTEL_NM10_AHCI},	      \
-@@ -39,7 +39,7 @@
- 	{PCI_VENDOR_ID_INTEL,		\
- 			PCI_DEVICE_ID_INTEL_PANTHERPOINT_AHCI_MOBILE}
- 
--#define CONFIG_X86_OPTION_ROM_FILENAME		pci8086,0166.bin
-+#define CONFIG_X86_OPTION_ROM_FILE		pci8086,0166.bin
- #define CONFIG_X86_OPTION_ROM_ADDR		0xfff90000
- #define CONFIG_VIDEO_X86
- 
-diff -ruN u-boot-2015.01-rc3/include/configs/colibri_t30.h u-boot/include/configs/colibri_t30.h
---- u-boot-2015.01-rc3/include/configs/colibri_t30.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/colibri_t30.h	2015-01-01 17:34:32.785494529 +0100
-@@ -25,10 +25,7 @@
- 
- /* I2C */
- #define CONFIG_SYS_I2C_TEGRA
--#define CONFIG_SYS_I2C_INIT_BOARD
--#define CONFIG_SYS_I2C_SPEED		100000
- #define CONFIG_CMD_I2C
--#define CONFIG_SYS_I2C
- 
- /* SD/MMC */
- #define CONFIG_MMC
-diff -ruN u-boot-2015.01-rc3/include/configs/coreboot.h u-boot/include/configs/coreboot.h
---- u-boot-2015.01-rc3/include/configs/coreboot.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/coreboot.h	2015-01-01 17:34:32.785494529 +0100
-@@ -49,7 +49,7 @@
- 	{PCI_VENDOR_ID_INTEL,		\
- 			PCI_DEVICE_ID_INTEL_PANTHERPOINT_AHCI_MOBILE}
- 
--#define CONFIG_COREBOOT_SERIAL
-+#define CONFIG_X86_SERIAL
- 
- #define CONFIG_STD_DEVICES_SETTINGS     "stdin=usbkbd,vga,serial\0" \
- 					"stdout=vga,serial,cbmem\0" \
-diff -ruN u-boot-2015.01-rc3/include/configs/corenet_ds.h u-boot/include/configs/corenet_ds.h
---- u-boot-2015.01-rc3/include/configs/corenet_ds.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/corenet_ds.h	2015-01-01 17:34:32.785494529 +0100
-@@ -495,6 +495,14 @@
- #define CONFIG_SYS_BMAN_MEM_PHYS	CONFIG_SYS_BMAN_MEM_BASE
- #endif
- #define CONFIG_SYS_BMAN_MEM_SIZE	0x00200000
-+#define CONFIG_SYS_BMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_BMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_BMAN_CENA_BASE       CONFIG_SYS_BMAN_MEM_BASE
-+#define CONFIG_SYS_BMAN_CENA_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_CINH_BASE       (CONFIG_SYS_BMAN_MEM_BASE + \
-+					CONFIG_SYS_BMAN_CENA_SIZE)
-+#define CONFIG_SYS_BMAN_CINH_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_SWP_ISDR_REG	0xE08
- #define CONFIG_SYS_QMAN_NUM_PORTALS	10
- #define CONFIG_SYS_QMAN_MEM_BASE	0xf4200000
- #ifdef CONFIG_PHYS_64BIT
-@@ -503,6 +511,14 @@
- #define CONFIG_SYS_QMAN_MEM_PHYS	CONFIG_SYS_QMAN_MEM_BASE
- #endif
- #define CONFIG_SYS_QMAN_MEM_SIZE	0x00200000
-+#define CONFIG_SYS_QMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_QMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_QMAN_CENA_BASE       CONFIG_SYS_QMAN_MEM_BASE
-+#define CONFIG_SYS_QMAN_CENA_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_CINH_BASE       (CONFIG_SYS_QMAN_MEM_BASE + \
-+					CONFIG_SYS_QMAN_CENA_SIZE)
-+#define CONFIG_SYS_QMAN_CINH_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_SWP_ISDR_REG	0xE08
- 
- #define CONFIG_SYS_DPAA_FMAN
- #define CONFIG_SYS_DPAA_PME
-diff -ruN u-boot-2015.01-rc3/include/configs/crownbay.h u-boot/include/configs/crownbay.h
---- u-boot-2015.01-rc3/include/configs/crownbay.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/include/configs/crownbay.h	2015-01-01 17:34:32.785494529 +0100
-@@ -0,0 +1,61 @@
-+/*
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+/*
-+ * board/config.h - configuration options, board specific
-+ */
-+
-+#ifndef __CONFIG_H
-+#define __CONFIG_H
-+
-+#include <configs/x86-common.h>
-+
-+#define CONFIG_SYS_MONITOR_LEN		(1 << 20)
-+#define CONFIG_SYS_X86_START16		0xfffff800
-+#define CONFIG_BOARD_EARLY_INIT_F
-+
-+#define CONFIG_X86_RESET_VECTOR
-+#define CONFIG_NR_DRAM_BANKS		1
-+
-+#define CONFIG_X86_SERIAL
-+#define CONFIG_SMSC_LPC47M
-+
-+#define CONFIG_PCI_MEM_BUS		0x40000000
-+#define CONFIG_PCI_MEM_PHYS		CONFIG_PCI_MEM_BUS
-+#define CONFIG_PCI_MEM_SIZE		0x80000000
-+
-+#define CONFIG_PCI_PREF_BUS		0xc0000000
-+#define CONFIG_PCI_PREF_PHYS		CONFIG_PCI_PREF_BUS
-+#define CONFIG_PCI_PREF_SIZE		0x20000000
-+
-+#define CONFIG_PCI_IO_BUS		0x2000
-+#define CONFIG_PCI_IO_PHYS		CONFIG_PCI_IO_BUS
-+#define CONFIG_PCI_IO_SIZE		0xe000
-+
-+#define CONFIG_SYS_EARLY_PCI_INIT
-+#define CONFIG_PCI_PNP
-+#define CONFIG_E1000
-+
-+#define CONFIG_STD_DEVICES_SETTINGS     "stdin=serial\0" \
-+					"stdout=serial\0" \
-+					"stderr=serial\0"
-+
-+#define CONFIG_SCSI_DEV_LIST            \
-+	{PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TCF_SATA}
-+
-+#define CONFIG_SPI_FLASH_SST
-+
-+#define CONFIG_MMC
-+#define CONFIG_SDHCI
-+#define CONFIG_GENERIC_MMC
-+#define CONFIG_MMC_SDMA
-+#define CONFIG_CMD_MMC
-+
-+/* Video is not supported */
-+#undef CONFIG_VIDEO
-+#undef CONFIG_CFB_CONSOLE
-+
-+#endif	/* __CONFIG_H */
-diff -ruN u-boot-2015.01-rc3/include/configs/dalmore.h u-boot/include/configs/dalmore.h
---- u-boot-2015.01-rc3/include/configs/dalmore.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/dalmore.h	2015-01-01 17:34:32.789494465 +0100
-@@ -36,12 +36,7 @@
- 
- /* I2C */
- #define CONFIG_SYS_I2C_TEGRA
--#define CONFIG_SYS_I2C_INIT_BOARD
--#define CONFIG_I2C_MULTI_BUS
--#define CONFIG_SYS_MAX_I2C_BUS		TEGRA_I2C_NUM_CONTROLLERS
--#define CONFIG_SYS_I2C_SPEED		100000
- #define CONFIG_CMD_I2C
--#define CONFIG_SYS_I2C
- 
- /* SD/MMC */
- #define CONFIG_MMC
-diff -ruN u-boot-2015.01-rc3/include/configs/gose.h u-boot/include/configs/gose.h
---- u-boot-2015.01-rc3/include/configs/gose.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/gose.h	2015-01-01 17:34:32.793494399 +0100
-@@ -91,4 +91,14 @@
- #define CONFIG_USB_EHCI_RMOBILE
- #define CONFIG_USB_MAX_CONTROLLER_COUNT	2
- 
-+/* Module stop status bits */
-+/* INTC-RT */
-+#define CONFIG_SMSTP0_ENA	0x00400000
-+/* MSIF */
-+#define CONFIG_SMSTP2_ENA	0x00002000
-+/* INTC-SYS, IRQC */
-+#define CONFIG_SMSTP4_ENA	0x00000180
-+/* SCIF0 */
-+#define CONFIG_SMSTP7_ENA	0x00200000
-+
- #endif	/* __GOSE_H */
-diff -ruN u-boot-2015.01-rc3/include/configs/jetson-tk1.h u-boot/include/configs/jetson-tk1.h
---- u-boot-2015.01-rc3/include/configs/jetson-tk1.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/jetson-tk1.h	2015-01-01 17:34:32.797494333 +0100
-@@ -25,12 +25,7 @@
- 
- /* I2C */
- #define CONFIG_SYS_I2C_TEGRA
--#define CONFIG_SYS_I2C_INIT_BOARD
--#define CONFIG_I2C_MULTI_BUS
--#define CONFIG_SYS_MAX_I2C_BUS		TEGRA_I2C_NUM_CONTROLLERS
--#define CONFIG_SYS_I2C_SPEED		100000
- #define CONFIG_CMD_I2C
--#define CONFIG_SYS_I2C
- 
- /* SD/MMC */
- #define CONFIG_MMC
-diff -ruN u-boot-2015.01-rc3/include/configs/km/kmp204x-common.h u-boot/include/configs/km/kmp204x-common.h
---- u-boot-2015.01-rc3/include/configs/km/kmp204x-common.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/km/kmp204x-common.h	2015-01-01 17:34:32.797494333 +0100
-@@ -339,10 +339,26 @@
- #define CONFIG_SYS_BMAN_MEM_BASE	0xf4000000
- #define CONFIG_SYS_BMAN_MEM_PHYS	0xff4000000ull
- #define CONFIG_SYS_BMAN_MEM_SIZE	0x00200000
-+#define CONFIG_SYS_BMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_BMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_BMAN_CENA_BASE       CONFIG_SYS_BMAN_MEM_BASE
-+#define CONFIG_SYS_BMAN_CENA_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_CINH_BASE       (CONFIG_SYS_BMAN_MEM_BASE + \
-+					CONFIG_SYS_BMAN_CENA_SIZE)
-+#define CONFIG_SYS_BMAN_CINH_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_SWP_ISDR_REG	0xE08
- #define CONFIG_SYS_QMAN_NUM_PORTALS	10
- #define CONFIG_SYS_QMAN_MEM_BASE	0xf4200000
- #define CONFIG_SYS_QMAN_MEM_PHYS	0xff4200000ull
- #define CONFIG_SYS_QMAN_MEM_SIZE	0x00200000
-+#define CONFIG_SYS_QMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_QMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_QMAN_CENA_BASE       CONFIG_SYS_QMAN_MEM_BASE
-+#define CONFIG_SYS_QMAN_CENA_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_CINH_BASE       (CONFIG_SYS_QMAN_MEM_BASE + \
-+					CONFIG_SYS_QMAN_CENA_SIZE)
-+#define CONFIG_SYS_QMAN_CINH_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_SWP_ISDR_REG	0xE08
- 
- #define CONFIG_SYS_DPAA_FMAN
- #define CONFIG_SYS_DPAA_PME
-diff -ruN u-boot-2015.01-rc3/include/configs/koelsch.h u-boot/include/configs/koelsch.h
---- u-boot-2015.01-rc3/include/configs/koelsch.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/koelsch.h	2015-01-01 17:34:32.797494333 +0100
-@@ -92,4 +92,15 @@
- #define CONFIG_USB_MAX_CONTROLLER_COUNT	2
- #define CONFIG_USB_STORAGE
- 
-+
-+/* Module stop status bits */
-+/* INTC-RT */
-+#define CONFIG_SMSTP0_ENA	0x00400000
-+/* MSIF*/
-+#define CONFIG_SMSTP2_ENA	0x00002000
-+/* INTC-SYS, IRQC */
-+#define CONFIG_SMSTP4_ENA	0x00000180
-+/* SCIF0 */
-+#define CONFIG_SMSTP7_ENA	0x00200000
-+
- #endif	/* __KOELSCH_H */
-diff -ruN u-boot-2015.01-rc3/include/configs/lager.h u-boot/include/configs/lager.h
---- u-boot-2015.01-rc3/include/configs/lager.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/lager.h	2015-01-01 17:34:32.797494333 +0100
-@@ -93,4 +93,23 @@
- #define CONFIG_USB_MAX_CONTROLLER_COUNT	3
- #define CONFIG_USB_STORAGE
- 
-+/* MMC */
-+#define CONFIG_MMC
-+#define CONFIG_CMD_MMC
-+#define CONFIG_GENERIC_MMC
-+
-+#define CONFIG_SH_MMCIF
-+#define CONFIG_SH_MMCIF_ADDR		0xEE220000
-+#define CONFIG_SH_MMCIF_CLK		97500000
-+
-+/* Module stop status bits */
-+/* INTC-RT */
-+#define CONFIG_SMSTP0_ENA	0x00400000
-+/* MSIF */
-+#define CONFIG_SMSTP2_ENA	0x00002000
-+/* INTC-SYS, IRQC */
-+#define CONFIG_SMSTP4_ENA	0x00000180
-+/* SCIF0 */
-+#define CONFIG_SMSTP7_ENA	0x00200000
-+
- #endif	/* __LAGER_H */
-diff -ruN u-boot-2015.01-rc3/include/configs/ls1021aqds.h u-boot/include/configs/ls1021aqds.h
---- u-boot-2015.01-rc3/include/configs/ls1021aqds.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/ls1021aqds.h	2015-01-01 17:34:32.797494333 +0100
-@@ -37,8 +37,85 @@
- unsigned long get_board_ddr_clk(void);
- #endif
- 
-+#ifdef CONFIG_QSPI_BOOT
-+#define CONFIG_SYS_CLK_FREQ		100000000
-+#define CONFIG_DDR_CLK_FREQ		100000000
-+#define CONFIG_QIXIS_I2C_ACCESS
-+#else
- #define CONFIG_SYS_CLK_FREQ		get_board_sys_clk()
- #define CONFIG_DDR_CLK_FREQ		get_board_ddr_clk()
-+#endif
-+
-+#ifdef CONFIG_RAMBOOT_PBL
-+#define CONFIG_SYS_FSL_PBL_PBI	board/freescale/ls1021aqds/ls102xa_pbi.cfg
-+#endif
-+
-+#ifdef CONFIG_SD_BOOT
-+#define CONFIG_SYS_FSL_PBL_RCW	board/freescale/ls1021aqds/ls102xa_rcw_sd.cfg
-+#define CONFIG_SPL_FRAMEWORK
-+#define CONFIG_SPL_LDSCRIPT	"arch/$(ARCH)/cpu/u-boot-spl.lds"
-+#define CONFIG_SPL_LIBCOMMON_SUPPORT
-+#define CONFIG_SPL_LIBGENERIC_SUPPORT
-+#define CONFIG_SPL_ENV_SUPPORT
-+#define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT
-+#define CONFIG_SPL_I2C_SUPPORT
-+#define CONFIG_SPL_WATCHDOG_SUPPORT
-+#define CONFIG_SPL_SERIAL_SUPPORT
-+#define CONFIG_SPL_DRIVERS_MISC_SUPPORT
-+#define CONFIG_SPL_MMC_SUPPORT
-+#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR		0xe8
-+#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS		0x400
-+
-+#define CONFIG_SPL_TEXT_BASE		0x10000000
-+#define CONFIG_SPL_MAX_SIZE		0x1a000
-+#define CONFIG_SPL_STACK		0x1001d000
-+#define CONFIG_SPL_PAD_TO		0x1c000
-+#define CONFIG_SYS_TEXT_BASE		0x82000000
-+
-+#define CONFIG_SYS_SPL_MALLOC_START	0x80200000
-+#define CONFIG_SYS_SPL_MALLOC_SIZE	0x100000
-+#define CONFIG_SPL_BSS_START_ADDR	0x80100000
-+#define CONFIG_SPL_BSS_MAX_SIZE		0x80000
-+#define CONFIG_SYS_MONITOR_LEN		0x80000
-+#endif
-+
-+#ifdef CONFIG_QSPI_BOOT
-+#define CONFIG_SYS_TEXT_BASE		0x40010000
-+#define CONFIG_SYS_NO_FLASH
-+#endif
-+
-+#ifdef CONFIG_NAND_BOOT
-+#define CONFIG_SYS_FSL_PBL_RCW	board/freescale/ls1021aqds/ls102xa_rcw_nand.cfg
-+#define CONFIG_SPL_FRAMEWORK
-+#define CONFIG_SPL_LDSCRIPT	"arch/$(ARCH)/cpu/u-boot-spl.lds"
-+#define CONFIG_SPL_LIBCOMMON_SUPPORT
-+#define CONFIG_SPL_LIBGENERIC_SUPPORT
-+#define CONFIG_SPL_ENV_SUPPORT
-+#define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT
-+#define CONFIG_SPL_I2C_SUPPORT
-+#define CONFIG_SPL_WATCHDOG_SUPPORT
-+#define CONFIG_SPL_SERIAL_SUPPORT
-+#define CONFIG_SPL_NAND_SUPPORT
-+#define CONFIG_SPL_DRIVERS_MISC_SUPPORT
-+
-+#define CONFIG_SPL_TEXT_BASE		0x10000000
-+#define CONFIG_SPL_MAX_SIZE		0x1a000
-+#define CONFIG_SPL_STACK		0x1001d000
-+#define CONFIG_SPL_PAD_TO		0x1c000
-+#define CONFIG_SYS_TEXT_BASE		0x82000000
-+
-+#define CONFIG_SYS_NAND_U_BOOT_SIZE	(400 << 10)
-+#define CONFIG_SYS_NAND_U_BOOT_OFFS	CONFIG_SPL_PAD_TO
-+#define CONFIG_SYS_NAND_PAGE_SIZE	2048
-+#define CONFIG_SYS_NAND_U_BOOT_DST	CONFIG_SYS_TEXT_BASE
-+#define CONFIG_SYS_NAND_U_BOOT_START	CONFIG_SYS_TEXT_BASE
-+
-+#define CONFIG_SYS_SPL_MALLOC_START	0x80200000
-+#define CONFIG_SYS_SPL_MALLOC_SIZE	0x100000
-+#define CONFIG_SPL_BSS_START_ADDR	0x80100000
-+#define CONFIG_SPL_BSS_MAX_SIZE		0x80000
-+#define CONFIG_SYS_MONITOR_LEN		0x80000
-+#endif
- 
- #ifndef CONFIG_SYS_TEXT_BASE
- #define CONFIG_SYS_TEXT_BASE		0x67f80000
-@@ -71,13 +148,15 @@
- 
- #define CONFIG_FSL_CAAM			/* Enable CAAM */
- 
--#if !defined(CONFIG_SDCARD) && !defined(CONFIG_NAND) && !defined(CONFIG_SPI)
-+#if !defined(CONFIG_SD_BOOT) && !defined(CONFIG_NAND_BOOT) && \
-+	!defined(CONFIG_QSPI_BOOT)
- #define CONFIG_U_QE
- #endif
- 
- /*
-  * IFC Definitions
-  */
-+#ifndef CONFIG_QSPI_BOOT
- #define CONFIG_FSL_IFC
- #define CONFIG_SYS_FLASH_BASE		0x60000000
- #define CONFIG_SYS_FLASH_BASE_PHYS	CONFIG_SYS_FLASH_BASE
-@@ -170,6 +249,7 @@
- #define CONFIG_CMD_NAND
- 
- #define CONFIG_SYS_NAND_BLOCK_SIZE	(128 * 1024)
-+#endif
- 
- /*
-  * QIXIS Definitions
-@@ -214,6 +294,40 @@
- #define CONFIG_SYS_FPGA_FTIM3		0x0
- #endif
- 
-+#if defined(CONFIG_NAND_BOOT)
-+#define CONFIG_SYS_CSPR0_EXT		CONFIG_SYS_NAND_CSPR_EXT
-+#define CONFIG_SYS_CSPR0		CONFIG_SYS_NAND_CSPR
-+#define CONFIG_SYS_AMASK0		CONFIG_SYS_NAND_AMASK
-+#define CONFIG_SYS_CSOR0		CONFIG_SYS_NAND_CSOR
-+#define CONFIG_SYS_CS0_FTIM0		CONFIG_SYS_NAND_FTIM0
-+#define CONFIG_SYS_CS0_FTIM1		CONFIG_SYS_NAND_FTIM1
-+#define CONFIG_SYS_CS0_FTIM2		CONFIG_SYS_NAND_FTIM2
-+#define CONFIG_SYS_CS0_FTIM3		CONFIG_SYS_NAND_FTIM3
-+#define CONFIG_SYS_CSPR1_EXT		CONFIG_SYS_NOR0_CSPR_EXT
-+#define CONFIG_SYS_CSPR1		CONFIG_SYS_NOR0_CSPR
-+#define CONFIG_SYS_AMASK1		CONFIG_SYS_NOR_AMASK
-+#define CONFIG_SYS_CSOR1		CONFIG_SYS_NOR_CSOR
-+#define CONFIG_SYS_CS1_FTIM0		CONFIG_SYS_NOR_FTIM0
-+#define CONFIG_SYS_CS1_FTIM1		CONFIG_SYS_NOR_FTIM1
-+#define CONFIG_SYS_CS1_FTIM2		CONFIG_SYS_NOR_FTIM2
-+#define CONFIG_SYS_CS1_FTIM3		CONFIG_SYS_NOR_FTIM3
-+#define CONFIG_SYS_CSPR2_EXT		CONFIG_SYS_NOR1_CSPR_EXT
-+#define CONFIG_SYS_CSPR2		CONFIG_SYS_NOR1_CSPR
-+#define CONFIG_SYS_AMASK2		CONFIG_SYS_NOR_AMASK
-+#define CONFIG_SYS_CSOR2		CONFIG_SYS_NOR_CSOR
-+#define CONFIG_SYS_CS2_FTIM0		CONFIG_SYS_NOR_FTIM0
-+#define CONFIG_SYS_CS2_FTIM1		CONFIG_SYS_NOR_FTIM1
-+#define CONFIG_SYS_CS2_FTIM2		CONFIG_SYS_NOR_FTIM2
-+#define CONFIG_SYS_CS2_FTIM3		CONFIG_SYS_NOR_FTIM3
-+#define CONFIG_SYS_CSPR3_EXT		CONFIG_SYS_FPGA_CSPR_EXT
-+#define CONFIG_SYS_CSPR3		CONFIG_SYS_FPGA_CSPR
-+#define CONFIG_SYS_AMASK3		CONFIG_SYS_FPGA_AMASK
-+#define CONFIG_SYS_CSOR3		CONFIG_SYS_FPGA_CSOR
-+#define CONFIG_SYS_CS3_FTIM0		CONFIG_SYS_FPGA_FTIM0
-+#define CONFIG_SYS_CS3_FTIM1		CONFIG_SYS_FPGA_FTIM1
-+#define CONFIG_SYS_CS3_FTIM2		CONFIG_SYS_FPGA_FTIM2
-+#define CONFIG_SYS_CS3_FTIM3		CONFIG_SYS_FPGA_FTIM3
-+#else
- #define CONFIG_SYS_CSPR0_EXT		CONFIG_SYS_NOR0_CSPR_EXT
- #define CONFIG_SYS_CSPR0		CONFIG_SYS_NOR0_CSPR
- #define CONFIG_SYS_AMASK0		CONFIG_SYS_NOR_AMASK
-@@ -246,6 +360,7 @@
- #define CONFIG_SYS_CS3_FTIM1		CONFIG_SYS_FPGA_FTIM1
- #define CONFIG_SYS_CS3_FTIM2		CONFIG_SYS_FPGA_FTIM2
- #define CONFIG_SYS_CS3_FTIM3		CONFIG_SYS_FPGA_FTIM3
-+#endif
- 
- /*
-  * Serial Port
-@@ -279,6 +394,21 @@
- #define CONFIG_FSL_ESDHC
- #define CONFIG_GENERIC_MMC
- 
-+#define CONFIG_CMD_FAT
-+#define CONFIG_DOS_PARTITION
-+
-+/* QSPI */
-+#ifdef CONFIG_QSPI_BOOT
-+#define CONFIG_FSL_QSPI
-+#define QSPI0_AMBA_BASE			0x40000000
-+#define FSL_QSPI_FLASH_SIZE		(1 << 24)
-+#define FSL_QSPI_FLASH_NUM		2
-+
-+#define CONFIG_CMD_SF
-+#define CONFIG_SPI_FLASH
-+#define CONFIG_SPI_FLASH_SPANSION
-+#endif
-+
- /*
-  * USB
-  */
-@@ -341,6 +471,14 @@
- #endif
- 
- #endif
-+
-+/* PCIe */
-+#define CONFIG_PCI		/* Enable PCI/PCIE */
-+#define CONFIG_PCIE1		/* PCIE controler 1 */
-+#define CONFIG_PCIE2		/* PCIE controler 2 */
-+#define CONFIG_PCIE_LAYERSCAPE	/* Use common FSL Layerscape PCIe code */
-+#define FSL_PCIE_COMPAT "fsl,ls1021a-pcie"
-+
- #define CONFIG_CMD_PING
- #define CONFIG_CMD_DHCP
- #define CONFIG_CMD_MII
-@@ -348,7 +486,20 @@
- 
- #define CONFIG_CMDLINE_TAG
- #define CONFIG_CMDLINE_EDITING
-+
-+#ifdef CONFIG_QSPI_BOOT
-+#undef CONFIG_CMD_IMLS
-+#else
- #define CONFIG_CMD_IMLS
-+#endif
-+
-+#define CONFIG_ARMV7_NONSEC
-+#define CONFIG_ARMV7_VIRT
-+#define CONFIG_PEN_ADDR_BIG_ENDIAN
-+#define CONFIG_LS102XA_NS_ACCESS
-+#define CONFIG_SMP_PEN_ADDR		0x01ee0200
-+#define CONFIG_TIMER_CLK_FREQ		12500000
-+#define CONFIG_ARMV7_SECURE_BASE	OCRAM_BASE_S_ADDR
- 
- #define CONFIG_HWCONFIG
- #define HWCONFIG_BUFFER_SIZE		128
-@@ -385,6 +536,8 @@
- 
- #define CONFIG_SYS_LOAD_ADDR		0x82000000
- 
-+#define CONFIG_LS102XA_STREAM_ID
-+
- /*
-  * Stack sizes
-  * The stack sizes are set up in start.S using the settings below
-@@ -396,17 +549,37 @@
- #define CONFIG_SYS_INIT_SP_ADDR \
- 	(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
- 
-+#ifdef CONFIG_SPL_BUILD
-+#define CONFIG_SYS_MONITOR_BASE CONFIG_SPL_TEXT_BASE
-+#else
- #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE    /* start of monitor */
-+#endif
- 
- /*
-  * Environment
-  */
- #define CONFIG_ENV_OVERWRITE
- 
-+#if defined(CONFIG_SD_BOOT)
-+#define CONFIG_ENV_OFFSET		0x100000
-+#define CONFIG_ENV_IS_IN_MMC
-+#define CONFIG_SYS_MMC_ENV_DEV		0
-+#define CONFIG_ENV_SIZE			0x2000
-+#elif defined(CONFIG_QSPI_BOOT)
-+#define CONFIG_ENV_IS_IN_SPI_FLASH
-+#define CONFIG_ENV_SIZE			0x2000          /* 8KB */
-+#define CONFIG_ENV_OFFSET		0x100000        /* 1MB */
-+#define CONFIG_ENV_SECT_SIZE		0x10000
-+#elif defined(CONFIG_NAND_BOOT)
-+#define CONFIG_ENV_IS_IN_NAND
-+#define CONFIG_ENV_SIZE			0x2000
-+#define CONFIG_ENV_OFFSET		(10 * CONFIG_SYS_NAND_BLOCK_SIZE)
-+#else
- #define CONFIG_ENV_IS_IN_FLASH
- #define CONFIG_ENV_ADDR		(CONFIG_SYS_MONITOR_BASE - CONFIG_ENV_SECT_SIZE)
- #define CONFIG_ENV_SIZE			0x2000
- #define CONFIG_ENV_SECT_SIZE		0x20000 /* 128K (one sector) */
-+#endif
- 
- #define CONFIG_OF_LIBFDT
- #define CONFIG_OF_BOARD_SETUP
-diff -ruN u-boot-2015.01-rc3/include/configs/ls1021atwr.h u-boot/include/configs/ls1021atwr.h
---- u-boot-2015.01-rc3/include/configs/ls1021atwr.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/ls1021atwr.h	2015-01-01 17:34:32.797494333 +0100
-@@ -35,6 +35,43 @@
- #define CONFIG_SYS_CLK_FREQ		100000000
- #define CONFIG_DDR_CLK_FREQ		100000000
- 
-+#ifdef CONFIG_RAMBOOT_PBL
-+#define CONFIG_SYS_FSL_PBL_PBI	board/freescale/ls1021atwr/ls102xa_pbi.cfg
-+#endif
-+
-+#ifdef CONFIG_SD_BOOT
-+#define CONFIG_SYS_FSL_PBL_RCW	board/freescale/ls1021atwr/ls102xa_rcw_sd.cfg
-+#define CONFIG_SPL_FRAMEWORK
-+#define CONFIG_SPL_LDSCRIPT	"arch/$(ARCH)/cpu/u-boot-spl.lds"
-+#define CONFIG_SPL_LIBCOMMON_SUPPORT
-+#define CONFIG_SPL_LIBGENERIC_SUPPORT
-+#define CONFIG_SPL_ENV_SUPPORT
-+#define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT
-+#define CONFIG_SPL_I2C_SUPPORT
-+#define CONFIG_SPL_WATCHDOG_SUPPORT
-+#define CONFIG_SPL_SERIAL_SUPPORT
-+#define CONFIG_SPL_MMC_SUPPORT
-+#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR		0xe8
-+#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS		0x400
-+
-+#define CONFIG_SPL_TEXT_BASE		0x10000000
-+#define CONFIG_SPL_MAX_SIZE		0x1a000
-+#define CONFIG_SPL_STACK		0x1001d000
-+#define CONFIG_SPL_PAD_TO		0x1c000
-+#define CONFIG_SYS_TEXT_BASE		0x82000000
-+
-+#define CONFIG_SYS_SPL_MALLOC_START	0x80200000
-+#define CONFIG_SYS_SPL_MALLOC_SIZE	0x100000
-+#define CONFIG_SPL_BSS_START_ADDR	0x80100000
-+#define CONFIG_SPL_BSS_MAX_SIZE		0x80000
-+#define CONFIG_SYS_MONITOR_LEN		0x80000
-+#endif
-+
-+#ifdef CONFIG_QSPI_BOOT
-+#define CONFIG_SYS_TEXT_BASE		0x40010000
-+#define CONFIG_SYS_NO_FLASH
-+#endif
-+
- #ifndef CONFIG_SYS_TEXT_BASE
- #define CONFIG_SYS_TEXT_BASE		0x67f80000
- #endif
-@@ -50,13 +87,15 @@
- 
- #define CONFIG_FSL_CAAM			/* Enable CAAM */
- 
--#if !defined(CONFIG_SDCARD) && !defined(CONFIG_NAND) && !defined(CONFIG_SPI)
-+#if !defined(CONFIG_SD_BOOT) && !defined(CONFIG_NAND_BOOT) && \
-+	!defined(CONFIG_QSPI_BOOT)
- #define CONFIG_U_QE
- #endif
- 
- /*
-  * IFC Definitions
-  */
-+#ifndef CONFIG_QSPI_BOOT
- #define CONFIG_FSL_IFC
- #define CONFIG_SYS_FLASH_BASE		0x60000000
- #define CONFIG_SYS_FLASH_BASE_PHYS	CONFIG_SYS_FLASH_BASE
-@@ -100,6 +139,7 @@
- 
- #define CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS
- #define CONFIG_SYS_WRITE_SWAPPED_DATA
-+#endif
- 
- /* CPLD */
- 
-@@ -180,6 +220,21 @@
- #define CONFIG_FSL_ESDHC
- #define CONFIG_GENERIC_MMC
- 
-+#define CONFIG_CMD_FAT
-+#define CONFIG_DOS_PARTITION
-+
-+/* QSPI */
-+#ifdef CONFIG_QSPI_BOOT
-+#define CONFIG_FSL_QSPI
-+#define QSPI0_AMBA_BASE			0x40000000
-+#define FSL_QSPI_FLASH_SIZE		(1 << 24)
-+#define FSL_QSPI_FLASH_NUM		2
-+
-+#define CONFIG_CMD_SF
-+#define CONFIG_SPI_FLASH
-+#define CONFIG_SPI_FLASH_STMICRO
-+#endif
-+
- /*
-  * Video
-  */
-@@ -236,6 +291,13 @@
- #define CONFIG_HAS_ETH2
- #endif
- 
-+/* PCIe */
-+#define CONFIG_PCI		/* Enable PCI/PCIE */
-+#define CONFIG_PCIE1		/* PCIE controler 1 */
-+#define CONFIG_PCIE2		/* PCIE controler 2 */
-+#define CONFIG_PCIE_LAYERSCAPE	/* Use common FSL Layerscape PCIe code */
-+#define FSL_PCIE_COMPAT "fsl,ls1021a-pcie"
-+
- #define CONFIG_CMD_PING
- #define CONFIG_CMD_DHCP
- #define CONFIG_CMD_MII
-@@ -243,7 +305,20 @@
- 
- #define CONFIG_CMDLINE_TAG
- #define CONFIG_CMDLINE_EDITING
-+
-+#ifdef CONFIG_QSPI_BOOT
-+#undef CONFIG_CMD_IMLS
-+#else
- #define CONFIG_CMD_IMLS
-+#endif
-+
-+#define CONFIG_ARMV7_NONSEC
-+#define CONFIG_ARMV7_VIRT
-+#define CONFIG_PEN_ADDR_BIG_ENDIAN
-+#define CONFIG_LS102XA_NS_ACCESS
-+#define CONFIG_SMP_PEN_ADDR		0x01ee0200
-+#define CONFIG_TIMER_CLK_FREQ		12500000
-+#define CONFIG_ARMV7_SECURE_BASE	OCRAM_BASE_S_ADDR
- 
- #define CONFIG_HWCONFIG
- #define HWCONFIG_BUFFER_SIZE		128
-@@ -277,6 +352,8 @@
- 
- #define CONFIG_SYS_LOAD_ADDR		0x82000000
- 
-+#define CONFIG_LS102XA_STREAM_ID
-+
- /*
-  * Stack sizes
-  * The stack sizes are set up in start.S using the settings below
-@@ -288,7 +365,11 @@
- #define CONFIG_SYS_INIT_SP_ADDR \
- 	(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
- 
-+#ifdef CONFIG_SPL_BUILD
-+#define CONFIG_SYS_MONITOR_BASE CONFIG_SPL_TEXT_BASE
-+#else
- #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE    /* start of monitor */
-+#endif
- 
- #define CONFIG_SYS_QE_FW_ADDR     0x67f40000
- 
-@@ -297,10 +378,22 @@
-  */
- #define CONFIG_ENV_OVERWRITE
- 
-+#if defined(CONFIG_SD_BOOT)
-+#define CONFIG_ENV_OFFSET		0x100000
-+#define CONFIG_ENV_IS_IN_MMC
-+#define CONFIG_SYS_MMC_ENV_DEV		0
-+#define CONFIG_ENV_SIZE			0x20000
-+#elif defined(CONFIG_QSPI_BOOT)
-+#define CONFIG_ENV_IS_IN_SPI_FLASH
-+#define CONFIG_ENV_SIZE			0x2000
-+#define CONFIG_ENV_OFFSET		0x100000
-+#define CONFIG_ENV_SECT_SIZE		0x10000
-+#else
- #define CONFIG_ENV_IS_IN_FLASH
- #define CONFIG_ENV_ADDR		(CONFIG_SYS_MONITOR_BASE - CONFIG_ENV_SECT_SIZE)
- #define CONFIG_ENV_SIZE			0x20000
- #define CONFIG_ENV_SECT_SIZE		0x20000 /* 128K (one sector) */
-+#endif
- 
- #define CONFIG_OF_LIBFDT
- #define CONFIG_OF_BOARD_SETUP
-diff -ruN u-boot-2015.01-rc3/include/configs/mx53loco.h u-boot/include/configs/mx53loco.h
---- u-boot-2015.01-rc3/include/configs/mx53loco.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/mx53loco.h	2015-01-01 17:34:32.801494268 +0100
-@@ -94,6 +94,7 @@
- /* Command definition */
- #include <config_cmd_default.h>
- #define CONFIG_CMD_BOOTZ
-+#define CONFIG_SUPPORT_RAW_INITRD
- 
- #undef CONFIG_CMD_IMLS
- 
-diff -ruN u-boot-2015.01-rc3/include/configs/mx6sabre_common.h u-boot/include/configs/mx6sabre_common.h
---- u-boot-2015.01-rc3/include/configs/mx6sabre_common.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/mx6sabre_common.h	2015-01-01 17:34:32.801494268 +0100
-@@ -220,9 +220,6 @@
- #define CONFIG_SYS_PROMPT_HUSH_PS2     "> "
- #define CONFIG_AUTO_COMPLETE
- #define CONFIG_SYS_CBSIZE              256
--
--/* Print Buffer Size */
--#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
- #define CONFIG_SYS_MAXARGS             16
- #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
- 
-diff -ruN u-boot-2015.01-rc3/include/configs/mx6slevk.h u-boot/include/configs/mx6slevk.h
---- u-boot-2015.01-rc3/include/configs/mx6slevk.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/mx6slevk.h	2015-01-01 17:34:32.805494202 +0100
-@@ -209,6 +209,20 @@
- #define CONFIG_SF_DEFAULT_MODE		SPI_MODE_0
- #endif
- 
-+/* USB Configs */
-+#define CONFIG_CMD_USB
-+#ifdef CONFIG_CMD_USB
-+#define CONFIG_USB_EHCI
-+#define CONFIG_USB_EHCI_MX6
-+#define CONFIG_USB_STORAGE
-+#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
-+#define CONFIG_USB_HOST_ETHER
-+#define CONFIG_USB_ETHER_ASIX
-+#define CONFIG_MXC_USB_PORTSC		(PORT_PTS_UTMI | PORT_PTS_PTW)
-+#define CONFIG_MXC_USB_FLAGS		0
-+#define CONFIG_USB_MAX_CONTROLLER_COUNT	2
-+#endif
-+
- #define CONFIG_SYS_FSL_USDHC_NUM	3
- #if defined(CONFIG_ENV_IS_IN_MMC)
- #define CONFIG_SYS_MMC_ENV_DEV		1	/* SDHC2*/
-diff -ruN u-boot-2015.01-rc3/include/configs/mx6sxsabresd.h u-boot/include/configs/mx6sxsabresd.h
---- u-boot-2015.01-rc3/include/configs/mx6sxsabresd.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/mx6sxsabresd.h	2015-01-01 17:34:32.805494202 +0100
-@@ -198,6 +198,20 @@
- #define CONFIG_PHYLIB
- #define CONFIG_PHY_ATHEROS
- 
-+
-+#define CONFIG_CMD_USB
-+#ifdef CONFIG_CMD_USB
-+#define CONFIG_USB_EHCI
-+#define CONFIG_USB_EHCI_MX6
-+#define CONFIG_USB_STORAGE
-+#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
-+#define CONFIG_USB_HOST_ETHER
-+#define CONFIG_USB_ETHER_ASIX
-+#define CONFIG_MXC_USB_PORTSC  (PORT_PTS_UTMI | PORT_PTS_PTW)
-+#define CONFIG_MXC_USB_FLAGS   0
-+#define CONFIG_USB_MAX_CONTROLLER_COUNT 2
-+#endif
-+
- #define CONFIG_CMD_PCI
- #ifdef CONFIG_CMD_PCI
- #define CONFIG_PCI
-@@ -208,6 +222,16 @@
- #define CONFIG_PCIE_IMX_POWER_GPIO	IMX_GPIO_NR(2, 1)
- #endif
- 
-+#define CONFIG_DM
-+#define CONFIG_DM_THERMAL
-+#define CONFIG_SYS_MALLOC_F_LEN	(1 << 10)
-+#define CONFIG_IMX6_THERMAL
-+
-+#define CONFIG_CMD_FUSE
-+#if defined(CONFIG_CMD_FUSE) || defined(CONFIG_IMX6_THERMAL)
-+#define CONFIG_MXC_OCOTP
-+#endif
-+
- /* FLASH and environment organization */
- #define CONFIG_SYS_NO_FLASH
- 
-diff -ruN u-boot-2015.01-rc3/include/configs/nyan-big.h u-boot/include/configs/nyan-big.h
---- u-boot-2015.01-rc3/include/configs/nyan-big.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/include/configs/nyan-big.h	2015-01-01 17:34:32.805494202 +0100
-@@ -0,0 +1,74 @@
-+/*
-+ * (C) Copyright 2014
-+ * NVIDIA Corporation <www.nvidia.com>
-+ *
-+ * SPDX-License-Identifier:     GPL-2.0+
-+ */
-+
-+#ifndef __CONFIG_H
-+#define __CONFIG_H
-+
-+#include <linux/sizes.h>
-+
-+#include "tegra124-common.h"
-+
-+/* High-level configuration options */
-+#define V_PROMPT			"Tegra124 (Nyan-big) # "
-+#define CONFIG_TEGRA_BOARD_STRING	"Google/NVIDIA Nyan-big"
-+
-+/* Board-specific serial config */
-+#define CONFIG_SERIAL_MULTI
-+#define CONFIG_TEGRA_ENABLE_UARTA
-+#define CONFIG_SYS_NS16550_COM1		NV_PA_APB_UARTA_BASE
-+
-+#define CONFIG_BOARD_EARLY_INIT_F
-+
-+/* I2C */
-+#define CONFIG_SYS_I2C_TEGRA
-+#define CONFIG_CMD_I2C
-+
-+/* SD/MMC */
-+#define CONFIG_MMC
-+#define CONFIG_GENERIC_MMC
-+#define CONFIG_TEGRA_MMC
-+#define CONFIG_CMD_MMC
-+
-+/* Environment in eMMC, at the end of 2nd "boot sector" */
-+#define CONFIG_ENV_IS_IN_MMC
-+#define CONFIG_SYS_MMC_ENV_DEV		0
-+#define CONFIG_SYS_MMC_ENV_PART		2
-+#define CONFIG_ENV_OFFSET		(-CONFIG_ENV_SIZE)
-+
-+/* SPI */
-+#define CONFIG_TEGRA114_SPI		/* Compatible w/ Tegra114 SPI */
-+#define CONFIG_TEGRA114_SPI_CTRLS	6
-+#define CONFIG_SPI_FLASH
-+#define CONFIG_SPI_FLASH_WINBOND
-+#define CONFIG_SF_DEFAULT_MODE         SPI_MODE_0
-+#define CONFIG_SF_DEFAULT_SPEED        24000000
-+#define CONFIG_CMD_SPI
-+#define CONFIG_CMD_SF
-+#define CONFIG_SPI_FLASH_SIZE          (4 << 20)
-+
-+/* USB Host support */
-+#define CONFIG_USB_EHCI
-+#define CONFIG_USB_EHCI_TEGRA
-+#define CONFIG_USB_MAX_CONTROLLER_COUNT	2
-+#define CONFIG_USB_STORAGE
-+#define CONFIG_CMD_USB
-+
-+/* USB networking support */
-+#define CONFIG_USB_HOST_ETHER
-+#define CONFIG_USB_ETHER_ASIX
-+
-+/* General networking support */
-+#define CONFIG_CMD_NET
-+#define CONFIG_CMD_DHCP
-+
-+#define CONFIG_FIT
-+#define CONFIG_OF_LIBFDT
-+
-+#include "tegra-common-usb-gadget.h"
-+#include "tegra-common-post.h"
-+
-+#endif /* __CONFIG_H */
-diff -ruN u-boot-2015.01-rc3/include/configs/P1023RDB.h u-boot/include/configs/P1023RDB.h
---- u-boot-2015.01-rc3/include/configs/P1023RDB.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/P1023RDB.h	2015-01-01 17:34:32.769494793 +0100
-@@ -347,9 +347,25 @@
- #define CONFIG_SYS_QMAN_MEM_BASE	0xff000000
- #define CONFIG_SYS_QMAN_MEM_PHYS	CONFIG_SYS_QMAN_MEM_BASE
- #define CONFIG_SYS_QMAN_MEM_SIZE	0x00200000
-+#define CONFIG_SYS_QMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_QMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_QMAN_CENA_BASE       CONFIG_SYS_QMAN_MEM_BASE
-+#define CONFIG_SYS_QMAN_CENA_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_CINH_BASE       (CONFIG_SYS_QMAN_MEM_BASE + \
-+					CONFIG_SYS_QMAN_CENA_SIZE)
-+#define CONFIG_SYS_QMAN_CINH_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_SWP_ISDR_REG	0xE08
- #define CONFIG_SYS_BMAN_MEM_BASE	0xff200000
- #define CONFIG_SYS_BMAN_MEM_PHYS	CONFIG_SYS_BMAN_MEM_BASE
- #define CONFIG_SYS_BMAN_MEM_SIZE	0x00200000
-+#define CONFIG_SYS_BMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_BMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_BMAN_CENA_BASE       CONFIG_SYS_BMAN_MEM_BASE
-+#define CONFIG_SYS_BMAN_CENA_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_CINH_BASE       (CONFIG_SYS_BMAN_MEM_BASE + \
-+					CONFIG_SYS_BMAN_CENA_SIZE)
-+#define CONFIG_SYS_BMAN_CINH_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_SWP_ISDR_REG	0xE08
- 
- /* For FM */
- #define CONFIG_SYS_DPAA_FMAN
-diff -ruN u-boot-2015.01-rc3/include/configs/P2041RDB.h u-boot/include/configs/P2041RDB.h
---- u-boot-2015.01-rc3/include/configs/P2041RDB.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/P2041RDB.h	2015-01-01 17:34:32.769494793 +0100
-@@ -13,6 +13,8 @@
- 
- #define CONFIG_P2041RDB
- #define CONFIG_PHYS_64BIT
-+#define CONFIG_SYS_GENERIC_BOARD
-+#define CONFIG_DISPLAY_BOARDINFO
- #define CONFIG_PPC_P2041
- 
- #ifdef CONFIG_RAMBOOT_PBL
-@@ -489,6 +491,14 @@
- #define CONFIG_SYS_BMAN_MEM_PHYS	CONFIG_SYS_BMAN_MEM_BASE
- #endif
- #define CONFIG_SYS_BMAN_MEM_SIZE	0x00200000
-+#define CONFIG_SYS_BMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_BMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_BMAN_CENA_BASE       CONFIG_SYS_BMAN_MEM_BASE
-+#define CONFIG_SYS_BMAN_CENA_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_CINH_BASE       (CONFIG_SYS_BMAN_MEM_BASE + \
-+					CONFIG_SYS_BMAN_CENA_SIZE)
-+#define CONFIG_SYS_BMAN_CINH_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_SWP_ISDR_REG	0xE08
- #define CONFIG_SYS_QMAN_NUM_PORTALS	10
- #define CONFIG_SYS_QMAN_MEM_BASE	0xf4200000
- #ifdef CONFIG_PHYS_64BIT
-@@ -497,6 +507,14 @@
- #define CONFIG_SYS_QMAN_MEM_PHYS	CONFIG_SYS_QMAN_MEM_BASE
- #endif
- #define CONFIG_SYS_QMAN_MEM_SIZE	0x00200000
-+#define CONFIG_SYS_QMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_QMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_QMAN_CENA_BASE       CONFIG_SYS_QMAN_MEM_BASE
-+#define CONFIG_SYS_QMAN_CENA_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_CINH_BASE       (CONFIG_SYS_QMAN_MEM_BASE + \
-+					CONFIG_SYS_QMAN_CENA_SIZE)
-+#define CONFIG_SYS_QMAN_CINH_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_SWP_ISDR_REG	0xE08
- 
- #define CONFIG_SYS_DPAA_FMAN
- #define CONFIG_SYS_DPAA_PME
-diff -ruN u-boot-2015.01-rc3/include/configs/rcar-gen2-common.h u-boot/include/configs/rcar-gen2-common.h
---- u-boot-2015.01-rc3/include/configs/rcar-gen2-common.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/rcar-gen2-common.h	2015-01-01 17:34:32.809494137 +0100
-@@ -28,6 +28,9 @@
- #define CONFIG_CMD_FAT
- #define CONFIG_CMD_SF
- #define CONFIG_CMD_SPI
-+#define CONFIG_CMD_EXT2
-+#define CONFIG_CMD_EXT4
-+#define CONFIG_CMD_EXT4_WRITE
- 
- #define CONFIG_SYS_THUMB_BUILD
- #define CONFIG_SYS_GENERIC_BOARD
-@@ -36,6 +39,7 @@
- #define CONFIG_FAT_WRITE
- #define CONFIG_DOS_PARTITION
- #define CONFIG_SUPPORT_VFAT
-+#define CONFIG_FS_EXT4
- #define CONFIG_EXT4_WRITE
- 
- #define CONFIG_CMDLINE_TAG
-diff -ruN u-boot-2015.01-rc3/include/configs/rpi.h u-boot/include/configs/rpi.h
---- u-boot-2015.01-rc3/include/configs/rpi.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/rpi.h	2015-01-01 17:34:32.809494137 +0100
-@@ -34,6 +34,7 @@
- #define CONFIG_DM
- #define CONFIG_CMD_DM
- #define CONFIG_DM_GPIO
-+#define CONFIG_DM_SERIAL
- 
- /* Memory layout */
- #define CONFIG_NR_DRAM_BANKS		1
-@@ -51,6 +52,7 @@
- 					 CONFIG_SYS_SDRAM_SIZE - \
- 					 GENERATED_GBL_DATA_SIZE)
- #define CONFIG_SYS_MALLOC_LEN		SZ_4M
-+#define CONFIG_SYS_MALLOC_F_LEN		(1 << 10)
- #define CONFIG_SYS_MEMTEST_START	0x00100000
- #define CONFIG_SYS_MEMTEST_END		0x00200000
- #define CONFIG_LOADADDR			0x00200000
-@@ -92,9 +94,7 @@
- #endif
- 
- /* Console UART */
--#define CONFIG_PL011_SERIAL
--#define CONFIG_PL011_CLOCK		3000000
--#define CONFIG_PL01x_PORTS		{ (void *)0x20201000 }
-+#define CONFIG_PL01X_SERIAL
- #define CONFIG_CONS_INDEX		0
- #define CONFIG_BAUDRATE			115200
- 
-diff -ruN u-boot-2015.01-rc3/include/configs/sandbox.h u-boot/include/configs/sandbox.h
---- u-boot-2015.01-rc3/include/configs/sandbox.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/sandbox.h	2015-01-01 17:34:32.809494137 +0100
-@@ -112,6 +112,12 @@
- #define CONFIG_SPI_FLASH_STMICRO
- #define CONFIG_SPI_FLASH_WINBOND
- 
-+#define CONFIG_DM_I2C
-+#define CONFIG_CMD_I2C
-+#define CONFIG_SYS_I2C_SANDBOX
-+#define CONFIG_I2C_EDID
-+#define CONFIG_I2C_EEPROM
-+
- /* Memory things - we don't really want a memory test */
- #define CONFIG_SYS_LOAD_ADDR		0x00000000
- #define CONFIG_SYS_MEMTEST_START	0x00100000
-diff -ruN u-boot-2015.01-rc3/include/configs/seaboard.h u-boot/include/configs/seaboard.h
---- u-boot-2015.01-rc3/include/configs/seaboard.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/seaboard.h	2015-01-01 17:34:32.813494071 +0100
-@@ -37,10 +37,7 @@
- 
- /* I2C */
- #define CONFIG_SYS_I2C_TEGRA
--#define CONFIG_SYS_I2C_INIT_BOARD
--#define CONFIG_SYS_I2C_SPEED		100000
- #define CONFIG_CMD_I2C
--#define CONFIG_SYS_I2C
- 
- /* SD/MMC */
- #define CONFIG_MMC
-diff -ruN u-boot-2015.01-rc3/include/configs/socfpga_common.h u-boot/include/configs/socfpga_common.h
---- u-boot-2015.01-rc3/include/configs/socfpga_common.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/socfpga_common.h	2015-01-01 17:34:32.813494071 +0100
-@@ -159,7 +159,7 @@
- #define CONFIG_SYS_MMC_MAX_BLK_COUNT	256	/* FIXME -- SPL only? */
- #endif
- 
-- /*
-+/*
-  * I2C support
-  */
- #define CONFIG_SYS_I2C
-@@ -187,6 +187,37 @@
- #define CONFIG_CMD_I2C
- 
- /*
-+ * QSPI support
-+ */
-+#ifdef CONFIG_OF_CONTROL	/* QSPI is controlled via DT */
-+#define CONFIG_CMD_DM
-+#define CONFIG_DM
-+#define CONFIG_DM_SPI
-+#define CONFIG_DM_SPI_FLASH
-+#define CONFIG_CADENCE_QSPI
-+/* Enable multiple SPI NOR flash manufacturers */
-+#define CONFIG_SPI_FLASH		/* SPI flash subsystem */
-+#define CONFIG_SPI_FLASH_STMICRO	/* Micron/Numonyx flash */
-+#define CONFIG_SPI_FLASH_SPANSION	/* Spansion flash */
-+#define CONFIG_SPI_FLASH_MTD
-+/* QSPI reference clock */
-+#ifndef __ASSEMBLY__
-+unsigned int cm_get_qspi_controller_clk_hz(void);
-+#define CONFIG_CQSPI_REF_CLK		cm_get_qspi_controller_clk_hz()
-+#endif
-+#define CONFIG_CQSPI_DECODER		0
-+#define CONFIG_CMD_SF
-+#endif
-+
-+#ifdef CONFIG_OF_CONTROL	/* DW SPI is controlled via DT */
-+#define CONFIG_CMD_DM
-+#define CONFIG_DM
-+#define CONFIG_DM_SPI
-+#define CONFIG_DESIGNWARE_SPI
-+#define CONFIG_CMD_SPI
-+#endif
-+
-+/*
-  * Serial Driver
-  */
- #define CONFIG_SYS_NS16550
-diff -ruN u-boot-2015.01-rc3/include/configs/stv0991.h u-boot/include/configs/stv0991.h
---- u-boot-2015.01-rc3/include/configs/stv0991.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/include/configs/stv0991.h	2015-01-01 17:34:32.813494071 +0100
-@@ -0,0 +1,95 @@
-+/*
-+ * (C) Copyright 2014
-+ * Vikas Manocha, STMicroelectronics, <vikas.manocha at st.com>
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#ifndef __CONFIG_STV0991_H
-+#define __CONFIG_STV0991_H
-+#define CONFIG_SYS_DCACHE_OFF
-+#define CONFIG_SYS_EXCEPTION_VECTORS_HIGH
-+#define CONFIG_BOARD_EARLY_INIT_F
-+
-+#define CONFIG_SYS_CORTEX_R4
-+
-+#define CONFIG_SYS_GENERIC_BOARD
-+#define CONFIG_SYS_NO_FLASH
-+
-+/* ram memory-related information */
-+#define CONFIG_NR_DRAM_BANKS			1
-+#define PHYS_SDRAM_1				0x00000000
-+#define CONFIG_SYS_SDRAM_BASE			PHYS_SDRAM_1
-+#define PHYS_SDRAM_1_SIZE			0x00198000
-+
-+#define CONFIG_ENV_SIZE				0x10000
-+#define CONFIG_ENV_IS_IN_FLASH
-+#define CONFIG_ENV_ADDR				\
-+	(PHYS_SDRAM_1_SIZE - CONFIG_ENV_SIZE)
-+#define CONFIG_SYS_MAXARGS			16
-+#define CONFIG_SYS_MALLOC_LEN			(CONFIG_ENV_SIZE + 16 * 1024)
-+#define CONFIG_SYS_MALLOC_F_LEN			0x2000
-+
-+#define CONFIG_DM
-+/* serial port (PL011) configuration */
-+#define CONFIG_BAUDRATE				115200
-+#ifdef CONFIG_DM
-+#define CONFIG_DM_SERIAL
-+#define CONFIG_PL01X_SERIAL
-+#else
-+#define CONFIG_SYS_SERIAL0                     0x80406000
-+#define CONFIG_CONS_INDEX			0
-+#define CONFIG_PL011_SERIAL
-+#define CONFIG_PL01x_PORTS                     {(void *)CONFIG_SYS_SERIAL0}
-+#define CONFIG_PL011_CLOCK                     (2700 * 1000)
-+#endif
-+
-+/* user interface */
-+#define CONFIG_SYS_PROMPT			"STV0991> "
-+#define CONFIG_SYS_CBSIZE			1024
-+#define CONFIG_SYS_PBSIZE			(CONFIG_SYS_CBSIZE \
-+						+sizeof(CONFIG_SYS_PROMPT) + 16)
-+
-+/* MISC */
-+#define CONFIG_SYS_LOAD_ADDR			0x00000000
-+#define CONFIG_SYS_INIT_RAM_SIZE		0x8000
-+#define CONFIG_SYS_INIT_RAM_ADDR		0x00190000
-+#define CONFIG_SYS_INIT_SP_OFFSET		\
-+	(CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
-+/* U-boot Load Address */
-+#define CONFIG_SYS_TEXT_BASE			0x00010000
-+#define CONFIG_SYS_INIT_SP_ADDR			\
-+	(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
-+
-+/* GMAC related configs */
-+
-+#define CONFIG_MII
-+#define CONFIG_PHYLIB
-+#define CONFIG_CMD_NET
-+#define CONFIG_DESIGNWARE_ETH
-+#define CONFIG_DW_ALTDESCRIPTOR
-+#define CONFIG_PHY_MICREL
-+
-+/* Command support defines */
-+#define CONFIG_CMD_PING
-+#define CONFIG_PHY_RESET_DELAY			10000		/* in usec */
-+
-+#include "config_cmd_default.h"
-+#undef CONFIG_CMD_SAVEENV
-+
-+#define CONFIG_SYS_MEMTEST_START               0x0000
-+#define CONFIG_SYS_MEMTEST_END                 1024*1024
-+#define CONFIG_CMD_MEMTEST
-+
-+/* Misc configuration */
-+#define CONFIG_SYS_LONGHELP
-+#define CONFIG_CMDLINE_EDITING
-+
-+#define CONFIG_BOOTDELAY                       3
-+#define CONFIG_BOOTCOMMAND                     "go 0x40040000"
-+#define CONFIG_AUTOBOOT_KEYED
-+#define CONFIG_AUTOBOOT_STOP_STR               " "
-+#define CONFIG_AUTOBOOT_PROMPT                 \
-+	"Hit SPACE in %d seconds to stop autoboot.\n", bootdelay
-+
-+#endif /* __CONFIG_H */
-diff -ruN u-boot-2015.01-rc3/include/configs/sun7i.h u-boot/include/configs/sun7i.h
---- u-boot-2015.01-rc3/include/configs/sun7i.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/sun7i.h	2015-01-01 17:34:32.813494071 +0100
-@@ -25,6 +25,7 @@
- #define CONFIG_ARMV7_PSCI		1
- #define CONFIG_ARMV7_SECURE_BASE	SUNXI_SRAM_B_BASE
- #define CONFIG_SYS_CLK_FREQ		24000000
-+#define CONFIG_TIMER_CLK_FREQ		CONFIG_SYS_CLK_FREQ
- 
- /*
-  * Include common sunxi configuration where most the settings are
-diff -ruN u-boot-2015.01-rc3/include/configs/T102xQDS.h u-boot/include/configs/T102xQDS.h
---- u-boot-2015.01-rc3/include/configs/T102xQDS.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/T102xQDS.h	2015-01-01 17:34:32.773494727 +0100
-@@ -720,7 +720,7 @@
- /* Qman/Bman */
- #ifndef CONFIG_NOBQFMAN
- #define CONFIG_SYS_DPAA_QBMAN		/* Support Q/Bman */
--#define CONFIG_SYS_BMAN_NUM_PORTALS	25
-+#define CONFIG_SYS_BMAN_NUM_PORTALS	10
- #define CONFIG_SYS_BMAN_MEM_BASE	0xf4000000
- #ifdef CONFIG_PHYS_64BIT
- #define CONFIG_SYS_BMAN_MEM_PHYS	0xff4000000ull
-@@ -728,7 +728,15 @@
- #define CONFIG_SYS_BMAN_MEM_PHYS	CONFIG_SYS_BMAN_MEM_BASE
- #endif
- #define CONFIG_SYS_BMAN_MEM_SIZE	0x02000000
--#define CONFIG_SYS_QMAN_NUM_PORTALS	25
-+#define CONFIG_SYS_BMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_BMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_BMAN_CENA_BASE       CONFIG_SYS_BMAN_MEM_BASE
-+#define CONFIG_SYS_BMAN_CENA_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_CINH_BASE       (CONFIG_SYS_BMAN_MEM_BASE + \
-+					CONFIG_SYS_BMAN_CENA_SIZE)
-+#define CONFIG_SYS_BMAN_CINH_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_SWP_ISDR_REG	0xE08
-+#define CONFIG_SYS_QMAN_NUM_PORTALS	10
- #define CONFIG_SYS_QMAN_MEM_BASE	0xf6000000
- #ifdef CONFIG_PHYS_64BIT
- #define CONFIG_SYS_QMAN_MEM_PHYS	0xff6000000ull
-@@ -736,6 +744,14 @@
- #define CONFIG_SYS_QMAN_MEM_PHYS	CONFIG_SYS_QMAN_MEM_BASE
- #endif
- #define CONFIG_SYS_QMAN_MEM_SIZE	0x02000000
-+#define CONFIG_SYS_QMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_QMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_QMAN_CENA_BASE       CONFIG_SYS_QMAN_MEM_BASE
-+#define CONFIG_SYS_QMAN_CENA_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_CINH_BASE       (CONFIG_SYS_QMAN_MEM_BASE + \
-+					CONFIG_SYS_QMAN_CENA_SIZE)
-+#define CONFIG_SYS_QMAN_CINH_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_SWP_ISDR_REG	0xE08
- 
- #define CONFIG_SYS_DPAA_FMAN
- 
-diff -ruN u-boot-2015.01-rc3/include/configs/T102xRDB.h u-boot/include/configs/T102xRDB.h
---- u-boot-2015.01-rc3/include/configs/T102xRDB.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/T102xRDB.h	2015-01-01 17:34:32.773494727 +0100
-@@ -677,7 +677,7 @@
- /* Qman/Bman */
- #ifndef CONFIG_NOBQFMAN
- #define CONFIG_SYS_DPAA_QBMAN		/* Support Q/Bman */
--#define CONFIG_SYS_BMAN_NUM_PORTALS	25
-+#define CONFIG_SYS_BMAN_NUM_PORTALS	10
- #define CONFIG_SYS_BMAN_MEM_BASE	0xf4000000
- #ifdef CONFIG_PHYS_64BIT
- #define CONFIG_SYS_BMAN_MEM_PHYS	0xff4000000ull
-@@ -685,7 +685,15 @@
- #define CONFIG_SYS_BMAN_MEM_PHYS	CONFIG_SYS_BMAN_MEM_BASE
- #endif
- #define CONFIG_SYS_BMAN_MEM_SIZE	0x02000000
--#define CONFIG_SYS_QMAN_NUM_PORTALS	25
-+#define CONFIG_SYS_BMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_BMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_BMAN_CENA_BASE       CONFIG_SYS_BMAN_MEM_BASE
-+#define CONFIG_SYS_BMAN_CENA_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_CINH_BASE       (CONFIG_SYS_BMAN_MEM_BASE + \
-+					CONFIG_SYS_BMAN_CENA_SIZE)
-+#define CONFIG_SYS_BMAN_CINH_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_SWP_ISDR_REG	0xE08
-+#define CONFIG_SYS_QMAN_NUM_PORTALS	10
- #define CONFIG_SYS_QMAN_MEM_BASE	0xf6000000
- #ifdef CONFIG_PHYS_64BIT
- #define CONFIG_SYS_QMAN_MEM_PHYS	0xff6000000ull
-@@ -693,6 +701,14 @@
- #define CONFIG_SYS_QMAN_MEM_PHYS	CONFIG_SYS_QMAN_MEM_BASE
- #endif
- #define CONFIG_SYS_QMAN_MEM_SIZE	0x02000000
-+#define CONFIG_SYS_QMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_QMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_QMAN_CENA_BASE       CONFIG_SYS_QMAN_MEM_BASE
-+#define CONFIG_SYS_QMAN_CENA_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_CINH_BASE       (CONFIG_SYS_QMAN_MEM_BASE + \
-+					CONFIG_SYS_QMAN_CENA_SIZE)
-+#define CONFIG_SYS_QMAN_CINH_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_SWP_ISDR_REG	0xE08
- 
- #define CONFIG_SYS_DPAA_FMAN
- 
-diff -ruN u-boot-2015.01-rc3/include/configs/T1040QDS.h u-boot/include/configs/T1040QDS.h
---- u-boot-2015.01-rc3/include/configs/T1040QDS.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/T1040QDS.h	2015-01-01 17:34:32.773494727 +0100
-@@ -605,14 +605,30 @@
- /* Qman/Bman */
- #ifndef CONFIG_NOBQFMAN
- #define CONFIG_SYS_DPAA_QBMAN		/* Support Q/Bman */
--#define CONFIG_SYS_BMAN_NUM_PORTALS	25
-+#define CONFIG_SYS_BMAN_NUM_PORTALS	10
- #define CONFIG_SYS_BMAN_MEM_BASE	0xf4000000
- #define CONFIG_SYS_BMAN_MEM_PHYS	0xff4000000ull
- #define CONFIG_SYS_BMAN_MEM_SIZE	0x02000000
--#define CONFIG_SYS_QMAN_NUM_PORTALS	25
-+#define CONFIG_SYS_BMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_BMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_BMAN_CENA_BASE       CONFIG_SYS_BMAN_MEM_BASE
-+#define CONFIG_SYS_BMAN_CENA_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_CINH_BASE       (CONFIG_SYS_BMAN_MEM_BASE + \
-+					CONFIG_SYS_BMAN_CENA_SIZE)
-+#define CONFIG_SYS_BMAN_CINH_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_SWP_ISDR_REG	0xE08
-+#define CONFIG_SYS_QMAN_NUM_PORTALS	10
- #define CONFIG_SYS_QMAN_MEM_BASE	0xf6000000
- #define CONFIG_SYS_QMAN_MEM_PHYS	0xff6000000ull
- #define CONFIG_SYS_QMAN_MEM_SIZE	0x02000000
-+#define CONFIG_SYS_QMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_QMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_QMAN_CENA_BASE       CONFIG_SYS_QMAN_MEM_BASE
-+#define CONFIG_SYS_QMAN_CENA_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_CINH_BASE       (CONFIG_SYS_QMAN_MEM_BASE + \
-+					CONFIG_SYS_QMAN_CENA_SIZE)
-+#define CONFIG_SYS_QMAN_CINH_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_SWP_ISDR_REG	0xE08
- 
- #define CONFIG_SYS_DPAA_FMAN
- #define CONFIG_SYS_DPAA_PME
-diff -ruN u-boot-2015.01-rc3/include/configs/T104xRDB.h u-boot/include/configs/T104xRDB.h
---- u-boot-2015.01-rc3/include/configs/T104xRDB.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/T104xRDB.h	2015-01-01 17:34:32.773494727 +0100
-@@ -104,7 +104,10 @@
- 
- /* support deep sleep */
- #define CONFIG_DEEP_SLEEP
-+#if defined(CONFIG_DEEP_SLEEP)
-+#define CONFIG_BOARD_EARLY_INIT_F
- #define CONFIG_SILENT_CONSOLE
-+#endif
- 
- #ifndef CONFIG_SYS_TEXT_BASE
- #define CONFIG_SYS_TEXT_BASE	0xeff40000
-@@ -636,14 +639,30 @@
- /* Qman/Bman */
- #ifndef CONFIG_NOBQFMAN
- #define CONFIG_SYS_DPAA_QBMAN		/* Support Q/Bman */
--#define CONFIG_SYS_BMAN_NUM_PORTALS	25
-+#define CONFIG_SYS_BMAN_NUM_PORTALS	10
- #define CONFIG_SYS_BMAN_MEM_BASE	0xf4000000
- #define CONFIG_SYS_BMAN_MEM_PHYS	0xff4000000ull
- #define CONFIG_SYS_BMAN_MEM_SIZE	0x02000000
--#define CONFIG_SYS_QMAN_NUM_PORTALS	25
-+#define CONFIG_SYS_BMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_BMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_BMAN_CENA_BASE       CONFIG_SYS_BMAN_MEM_BASE
-+#define CONFIG_SYS_BMAN_CENA_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_CINH_BASE       (CONFIG_SYS_BMAN_MEM_BASE + \
-+					CONFIG_SYS_BMAN_CENA_SIZE)
-+#define CONFIG_SYS_BMAN_CINH_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_SWP_ISDR_REG	0xE08
-+#define CONFIG_SYS_QMAN_NUM_PORTALS	10
- #define CONFIG_SYS_QMAN_MEM_BASE	0xf6000000
- #define CONFIG_SYS_QMAN_MEM_PHYS	0xff6000000ull
- #define CONFIG_SYS_QMAN_MEM_SIZE	0x02000000
-+#define CONFIG_SYS_QMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_QMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_QMAN_CENA_BASE       CONFIG_SYS_QMAN_MEM_BASE
-+#define CONFIG_SYS_QMAN_CENA_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_CINH_BASE       (CONFIG_SYS_QMAN_MEM_BASE + \
-+					CONFIG_SYS_QMAN_CENA_SIZE)
-+#define CONFIG_SYS_QMAN_CINH_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_SWP_ISDR_REG	0xE08
- 
- #define CONFIG_SYS_DPAA_FMAN
- #define CONFIG_SYS_DPAA_PME
-diff -ruN u-boot-2015.01-rc3/include/configs/T208xQDS.h u-boot/include/configs/T208xQDS.h
---- u-boot-2015.01-rc3/include/configs/T208xQDS.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/T208xQDS.h	2015-01-01 17:34:32.773494727 +0100
-@@ -634,10 +634,26 @@
- #define CONFIG_SYS_BMAN_MEM_BASE	0xf4000000
- #define CONFIG_SYS_BMAN_MEM_PHYS	0xff4000000ull
- #define CONFIG_SYS_BMAN_MEM_SIZE	0x02000000
-+#define CONFIG_SYS_BMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_BMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_BMAN_CENA_BASE       CONFIG_SYS_BMAN_MEM_BASE
-+#define CONFIG_SYS_BMAN_CENA_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_CINH_BASE       (CONFIG_SYS_BMAN_MEM_BASE + \
-+					CONFIG_SYS_BMAN_CENA_SIZE)
-+#define CONFIG_SYS_BMAN_CINH_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_SWP_ISDR_REG    0xE08
- #define CONFIG_SYS_QMAN_NUM_PORTALS	18
- #define CONFIG_SYS_QMAN_MEM_BASE	0xf6000000
- #define CONFIG_SYS_QMAN_MEM_PHYS	0xff6000000ull
- #define CONFIG_SYS_QMAN_MEM_SIZE	0x02000000
-+#define CONFIG_SYS_QMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_QMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_QMAN_CENA_BASE       CONFIG_SYS_QMAN_MEM_BASE
-+#define CONFIG_SYS_QMAN_CENA_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_CINH_BASE       (CONFIG_SYS_QMAN_MEM_BASE + \
-+					CONFIG_SYS_QMAN_CENA_SIZE)
-+#define CONFIG_SYS_QMAN_CINH_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_SWP_ISDR_REG	0xE08
- 
- #define CONFIG_SYS_DPAA_FMAN
- #define CONFIG_SYS_DPAA_PME
-diff -ruN u-boot-2015.01-rc3/include/configs/T208xRDB.h u-boot/include/configs/T208xRDB.h
---- u-boot-2015.01-rc3/include/configs/T208xRDB.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/T208xRDB.h	2015-01-01 17:34:32.773494727 +0100
-@@ -567,10 +567,26 @@
- #define CONFIG_SYS_BMAN_MEM_BASE	0xf4000000
- #define CONFIG_SYS_BMAN_MEM_PHYS	0xff4000000ull
- #define CONFIG_SYS_BMAN_MEM_SIZE	0x02000000
-+#define CONFIG_SYS_BMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_BMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_BMAN_CENA_BASE       CONFIG_SYS_BMAN_MEM_BASE
-+#define CONFIG_SYS_BMAN_CENA_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_CINH_BASE       (CONFIG_SYS_BMAN_MEM_BASE + \
-+					CONFIG_SYS_BMAN_CENA_SIZE)
-+#define CONFIG_SYS_BMAN_CINH_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_SWP_ISDR_REG	0xE08
- #define CONFIG_SYS_QMAN_NUM_PORTALS	18
- #define CONFIG_SYS_QMAN_MEM_BASE	0xf6000000
- #define CONFIG_SYS_QMAN_MEM_PHYS	0xff6000000ull
- #define CONFIG_SYS_QMAN_MEM_SIZE	0x02000000
-+#define CONFIG_SYS_QMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_QMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_QMAN_CENA_BASE       CONFIG_SYS_QMAN_MEM_BASE
-+#define CONFIG_SYS_QMAN_CENA_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_CINH_BASE       (CONFIG_SYS_QMAN_MEM_BASE + \
-+					CONFIG_SYS_QMAN_CENA_SIZE)
-+#define CONFIG_SYS_QMAN_CINH_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_SWP_ISDR_REG	0xE08
- 
- #define CONFIG_SYS_DPAA_FMAN
- #define CONFIG_SYS_DPAA_PME
-diff -ruN u-boot-2015.01-rc3/include/configs/T4240EMU.h u-boot/include/configs/T4240EMU.h
---- u-boot-2015.01-rc3/include/configs/T4240EMU.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/T4240EMU.h	2015-01-01 17:34:32.773494727 +0100
-@@ -85,10 +85,26 @@
- #define CONFIG_SYS_BMAN_MEM_BASE	0xf4000000
- #define CONFIG_SYS_BMAN_MEM_PHYS	0xff4000000ull
- #define CONFIG_SYS_BMAN_MEM_SIZE	0x02000000
-+#define CONFIG_SYS_BMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_BMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_BMAN_CENA_BASE       CONFIG_SYS_BMAN_MEM_BASE
-+#define CONFIG_SYS_BMAN_CENA_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_CINH_BASE       (CONFIG_SYS_BMAN_MEM_BASE + \
-+					CONFIG_SYS_BMAN_CENA_SIZE)
-+#define CONFIG_SYS_BMAN_CINH_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_SWP_ISDR_REG    0xE08
- #define CONFIG_SYS_QMAN_NUM_PORTALS	50
- #define CONFIG_SYS_QMAN_MEM_BASE	0xf6000000
- #define CONFIG_SYS_QMAN_MEM_PHYS	0xff6000000ull
- #define CONFIG_SYS_QMAN_MEM_SIZE	0x02000000
-+#define CONFIG_SYS_QMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_QMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_QMAN_CENA_BASE       CONFIG_SYS_QMAN_MEM_BASE
-+#define CONFIG_SYS_QMAN_CENA_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_CINH_BASE       (CONFIG_SYS_QMAN_MEM_BASE + \
-+					CONFIG_SYS_QMAN_CENA_SIZE)
-+#define CONFIG_SYS_QMAN_CINH_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_SWP_ISDR_REG	0xE08
- 
- #define CONFIG_SYS_DPAA_FMAN
- #define CONFIG_SYS_DPAA_PME
-diff -ruN u-boot-2015.01-rc3/include/configs/T4240QDS.h u-boot/include/configs/T4240QDS.h
---- u-boot-2015.01-rc3/include/configs/T4240QDS.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/T4240QDS.h	2015-01-01 17:34:32.773494727 +0100
-@@ -417,10 +417,26 @@
- #define CONFIG_SYS_BMAN_MEM_BASE	0xf4000000
- #define CONFIG_SYS_BMAN_MEM_PHYS	0xff4000000ull
- #define CONFIG_SYS_BMAN_MEM_SIZE	0x02000000
-+#define CONFIG_SYS_BMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_BMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_BMAN_CENA_BASE       CONFIG_SYS_BMAN_MEM_BASE
-+#define CONFIG_SYS_BMAN_CENA_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_CINH_BASE       (CONFIG_SYS_BMAN_MEM_BASE + \
-+					CONFIG_SYS_BMAN_CENA_SIZE)
-+#define CONFIG_SYS_BMAN_CINH_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_SWP_ISDR_REG    0xE08
- #define CONFIG_SYS_QMAN_NUM_PORTALS	50
- #define CONFIG_SYS_QMAN_MEM_BASE	0xf6000000
- #define CONFIG_SYS_QMAN_MEM_PHYS	0xff6000000ull
- #define CONFIG_SYS_QMAN_MEM_SIZE	0x02000000
-+#define CONFIG_SYS_QMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_QMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_QMAN_CENA_BASE       CONFIG_SYS_QMAN_MEM_BASE
-+#define CONFIG_SYS_QMAN_CENA_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_CINH_BASE       (CONFIG_SYS_QMAN_MEM_BASE + \
-+					CONFIG_SYS_QMAN_CENA_SIZE)
-+#define CONFIG_SYS_QMAN_CINH_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_SWP_ISDR_REG	0xE08
- 
- #define CONFIG_SYS_DPAA_FMAN
- #define CONFIG_SYS_DPAA_PME
-diff -ruN u-boot-2015.01-rc3/include/configs/T4240RDB.h u-boot/include/configs/T4240RDB.h
---- u-boot-2015.01-rc3/include/configs/T4240RDB.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/T4240RDB.h	2015-01-01 17:34:32.773494727 +0100
-@@ -12,6 +12,8 @@
- 
- #define CONFIG_T4240RDB
- #define CONFIG_PHYS_64BIT
-+#define CONFIG_SYS_GENERIC_BOARD
-+#define CONFIG_DISPLAY_BOARDINFO
- 
- #define CONFIG_FSL_SATA_V2
- #define CONFIG_PCIE4
-@@ -577,10 +579,26 @@
- #define CONFIG_SYS_BMAN_MEM_BASE	0xf4000000
- #define CONFIG_SYS_BMAN_MEM_PHYS	0xff4000000ull
- #define CONFIG_SYS_BMAN_MEM_SIZE	0x02000000
-+#define CONFIG_SYS_BMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_BMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_BMAN_CENA_BASE       CONFIG_SYS_BMAN_MEM_BASE
-+#define CONFIG_SYS_BMAN_CENA_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_CINH_BASE       (CONFIG_SYS_BMAN_MEM_BASE + \
-+					CONFIG_SYS_BMAN_CENA_SIZE)
-+#define CONFIG_SYS_BMAN_CINH_SIZE       (CONFIG_SYS_BMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_BMAN_SWP_ISDR_REG    0xE08
- #define CONFIG_SYS_QMAN_NUM_PORTALS	50
- #define CONFIG_SYS_QMAN_MEM_BASE	0xf6000000
- #define CONFIG_SYS_QMAN_MEM_PHYS	0xff6000000ull
- #define CONFIG_SYS_QMAN_MEM_SIZE	0x02000000
-+#define CONFIG_SYS_QMAN_SP_CENA_SIZE    0x4000
-+#define CONFIG_SYS_QMAN_SP_CINH_SIZE    0x1000
-+#define CONFIG_SYS_QMAN_CENA_BASE       CONFIG_SYS_QMAN_MEM_BASE
-+#define CONFIG_SYS_QMAN_CENA_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_CINH_BASE       (CONFIG_SYS_QMAN_MEM_BASE + \
-+					CONFIG_SYS_QMAN_CENA_SIZE)
-+#define CONFIG_SYS_QMAN_CINH_SIZE       (CONFIG_SYS_QMAN_MEM_SIZE >> 1)
-+#define CONFIG_SYS_QMAN_SWP_ISDR_REG	0xE08
- 
- #define CONFIG_SYS_DPAA_FMAN
- #define CONFIG_SYS_DPAA_PME
-diff -ruN u-boot-2015.01-rc3/include/configs/tbs2910.h u-boot/include/configs/tbs2910.h
---- u-boot-2015.01-rc3/include/configs/tbs2910.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/tbs2910.h	2015-01-01 17:34:32.817494006 +0100
-@@ -167,7 +167,7 @@
- #define CONFIG_USB_STORAGE
- #define CONFIG_USB_KEYBOARD
- #ifdef CONFIG_USB_KEYBOARD
--#define CONFIG_SYS_USB_EVENT_POLL
-+#define CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE
- #define CONFIG_SYS_STDIO_DEREGISTER
- #define CONFIG_PREBOOT "if hdmidet; then usb start; fi"
- #endif /* CONFIG_USB_KEYBOARD */
-diff -ruN u-boot-2015.01-rc3/include/configs/tec-ng.h u-boot/include/configs/tec-ng.h
---- u-boot-2015.01-rc3/include/configs/tec-ng.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/tec-ng.h	2015-01-01 17:34:32.817494006 +0100
-@@ -23,12 +23,7 @@
- 
- /* I2C */
- #define CONFIG_SYS_I2C_TEGRA
--#define CONFIG_SYS_I2C_INIT_BOARD
--#define CONFIG_I2C_MULTI_BUS
--#define CONFIG_SYS_MAX_I2C_BUS		TEGRA_I2C_NUM_CONTROLLERS
--#define CONFIG_SYS_I2C_SPEED		100000
- #define CONFIG_CMD_I2C
--#define CONFIG_SYS_I2C
- 
- /* SD/MMC */
- #define CONFIG_MMC
-diff -ruN u-boot-2015.01-rc3/include/configs/tegra114-common.h u-boot/include/configs/tegra114-common.h
---- u-boot-2015.01-rc3/include/configs/tegra114-common.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/tegra114-common.h	2015-01-01 17:34:32.817494006 +0100
-@@ -76,9 +76,6 @@
- #define CONFIG_SYS_SPL_MALLOC_START	0x80090000
- #define CONFIG_SPL_STACK		0x800ffffc
- 
--/* Total I2C ports on Tegra114 */
--#define TEGRA_I2C_NUM_CONTROLLERS	5
--
- /* For USB EHCI controller */
- #define CONFIG_EHCI_IS_TDI
- #define CONFIG_USB_EHCI_TXFIFO_THRESH	0x10
-diff -ruN u-boot-2015.01-rc3/include/configs/tegra124-common.h u-boot/include/configs/tegra124-common.h
---- u-boot-2015.01-rc3/include/configs/tegra124-common.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/tegra124-common.h	2015-01-01 17:34:32.817494006 +0100
-@@ -68,9 +68,6 @@
- #define CONFIG_SYS_SPL_MALLOC_START	0x80090000
- #define CONFIG_SPL_STACK		0x800ffffc
- 
--/* Total I2C ports on Tegra124 */
--#define TEGRA_I2C_NUM_CONTROLLERS	5
--
- /* For USB EHCI controller */
- #define CONFIG_EHCI_IS_TDI
- #define CONFIG_USB_EHCI_TXFIFO_THRESH	0x10
-diff -ruN u-boot-2015.01-rc3/include/configs/tegra20-common.h u-boot/include/configs/tegra20-common.h
---- u-boot-2015.01-rc3/include/configs/tegra20-common.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/tegra20-common.h	2015-01-01 17:34:32.817494006 +0100
-@@ -97,9 +97,6 @@
- #define CONFIG_EHCI_IS_TDI
- #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 1
- 
--/* Total I2C ports on Tegra20 */
--#define TEGRA_I2C_NUM_CONTROLLERS	4
--
- #define CONFIG_SYS_NAND_SELF_INIT
- #define CONFIG_SYS_NAND_ONFI_DETECTION
- 
-diff -ruN u-boot-2015.01-rc3/include/configs/tegra30-common.h u-boot/include/configs/tegra30-common.h
---- u-boot-2015.01-rc3/include/configs/tegra30-common.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/tegra30-common.h	2015-01-01 17:34:32.817494006 +0100
-@@ -73,9 +73,6 @@
- #define CONFIG_SYS_SPL_MALLOC_START	0x80090000
- #define CONFIG_SPL_STACK		0x800ffffc
- 
--/* Total I2C ports on Tegra30 */
--#define TEGRA_I2C_NUM_CONTROLLERS	5
--
- /* For USB EHCI controller */
- #define CONFIG_EHCI_IS_TDI
- #define CONFIG_USB_EHCI_TXFIFO_THRESH	0x10
-diff -ruN u-boot-2015.01-rc3/include/configs/tegra-common.h u-boot/include/configs/tegra-common.h
---- u-boot-2015.01-rc3/include/configs/tegra-common.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/tegra-common.h	2015-01-01 17:34:32.817494006 +0100
-@@ -26,6 +26,7 @@
- #endif
- #define CONFIG_DM_SPI
- #define CONFIG_DM_SPI_FLASH
-+#define CONFIG_DM_I2C
- 
- #define CONFIG_SYS_TIMER_RATE		1000000
- #define CONFIG_SYS_TIMER_COUNTER	NV_PA_TMRUS_BASE
-diff -ruN u-boot-2015.01-rc3/include/configs/trimslice.h u-boot/include/configs/trimslice.h
---- u-boot-2015.01-rc3/include/configs/trimslice.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/trimslice.h	2015-01-01 17:34:32.817494006 +0100
-@@ -34,10 +34,7 @@
- 
- /* I2C */
- #define CONFIG_SYS_I2C_TEGRA
--#define CONFIG_SYS_I2C_INIT_BOARD
--#define CONFIG_SYS_I2C_SPEED		100000
- #define CONFIG_CMD_I2C
--#define CONFIG_SYS_I2C
- 
- /* SD/MMC */
- #define CONFIG_MMC
-diff -ruN u-boot-2015.01-rc3/include/configs/uniphier.h u-boot/include/configs/uniphier.h
---- u-boot-2015.01-rc3/include/configs/uniphier.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/uniphier.h	2015-01-01 17:34:32.817494006 +0100
-@@ -187,6 +187,8 @@
- #define CONFIG_FAT_WRITE
- #define CONFIG_DOS_PARTITION
- 
-+#define CONFIG_CMD_DM
-+
- /* memtest works on */
- #define CONFIG_SYS_MEMTEST_START	CONFIG_SYS_SDRAM_BASE
- #define CONFIG_SYS_MEMTEST_END		(CONFIG_SYS_SDRAM_BASE + 0x01000000)
-@@ -273,7 +275,11 @@
- #define CONFIG_SYS_SPL_MALLOC_START	(0x0ff00000)
- #define CONFIG_SYS_SPL_MALLOC_SIZE	(0x00004000)
- 
-+#ifdef CONFIG_SPL_BUILD
- #define CONFIG_SYS_INIT_SP_ADDR		(0x0ff08000)
-+#else
-+#define CONFIG_SYS_INIT_SP_ADDR		((CONFIG_SYS_TEXT_BASE) - 0x00001000)
-+#endif
- 
- #define CONFIG_SPL_FRAMEWORK
- #define CONFIG_SPL_NAND_SUPPORT
-diff -ruN u-boot-2015.01-rc3/include/configs/venice2.h u-boot/include/configs/venice2.h
---- u-boot-2015.01-rc3/include/configs/venice2.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/venice2.h	2015-01-01 17:34:32.821493940 +0100
-@@ -25,12 +25,7 @@
- 
- /* I2C */
- #define CONFIG_SYS_I2C_TEGRA
--#define CONFIG_SYS_I2C_INIT_BOARD
--#define CONFIG_I2C_MULTI_BUS
--#define CONFIG_SYS_MAX_I2C_BUS		TEGRA_I2C_NUM_CONTROLLERS
--#define CONFIG_SYS_I2C_SPEED		100000
- #define CONFIG_CMD_I2C
--#define CONFIG_SYS_I2C
- 
- /* SD/MMC */
- #define CONFIG_MMC
-diff -ruN u-boot-2015.01-rc3/include/configs/vexpress_aemv8a.h u-boot/include/configs/vexpress_aemv8a.h
---- u-boot-2015.01-rc3/include/configs/vexpress_aemv8a.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/vexpress_aemv8a.h	2015-01-01 17:34:32.821493940 +0100
-@@ -8,6 +8,9 @@
- #ifndef __VEXPRESS_AEMV8A_H
- #define __VEXPRESS_AEMV8A_H
- 
-+/* We use generic board for v8 Versatile Express */
-+#define CONFIG_SYS_GENERIC_BOARD
-+
- #ifdef CONFIG_BASE_FVP
- #ifndef CONFIG_SEMIHOSTING
- #error CONFIG_BASE_FVP requires CONFIG_SEMIHOSTING
-@@ -25,8 +28,6 @@
- 
- /*#define CONFIG_ARMV8_SWITCH_TO_EL1*/
- 
--/*#define CONFIG_SYS_GENERIC_BOARD*/
--
- #define CONFIG_SYS_NO_FLASH
- 
- #define CONFIG_SUPPORT_RAW_INITRD
-diff -ruN u-boot-2015.01-rc3/include/configs/whistler.h u-boot/include/configs/whistler.h
---- u-boot-2015.01-rc3/include/configs/whistler.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/configs/whistler.h	2015-01-01 17:34:32.821493940 +0100
-@@ -26,10 +26,7 @@
- 
- /* I2C */
- #define CONFIG_SYS_I2C_TEGRA
--#define CONFIG_SYS_I2C_INIT_BOARD
--#define CONFIG_SYS_I2C_SPEED		100000
- #define CONFIG_CMD_I2C
--#define CONFIG_SYS_I2C
- 
- /* SD/MMC */
- #define CONFIG_MMC
-diff -ruN u-boot-2015.01-rc3/include/dfu.h u-boot/include/dfu.h
---- u-boot-2015.01-rc3/include/dfu.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/dfu.h	2015-01-01 17:34:32.825493874 +0100
-@@ -150,9 +150,6 @@
- char *dfu_extract_token(char** e, int *n);
- void dfu_trigger_reset(void);
- int dfu_get_alt(char *name);
--bool dfu_detach(void);
--void dfu_trigger_detach(void);
--void dfu_clear_detach(void);
- int dfu_init_env_entities(char *interface, char *devstr);
- unsigned char *dfu_get_buf(struct dfu_entity *dfu);
- unsigned char *dfu_free_buf(void);
-diff -ruN u-boot-2015.01-rc3/include/dm/uclass-id.h u-boot/include/dm/uclass-id.h
---- u-boot-2015.01-rc3/include/dm/uclass-id.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/dm/uclass-id.h	2015-01-01 17:34:32.825493874 +0100
-@@ -19,6 +19,7 @@
- 	UCLASS_TEST_FDT,
- 	UCLASS_TEST_BUS,
- 	UCLASS_SPI_EMUL,	/* sandbox SPI device emulator */
-+	UCLASS_I2C_EMUL,	/* sandbox I2C device emulator */
- 	UCLASS_SIMPLE_BUS,
- 
- 	/* U-Boot uclasses start here */
-@@ -29,6 +30,9 @@
- 	UCLASS_SPI_FLASH,	/* SPI flash */
- 	UCLASS_CROS_EC,	/* Chrome OS EC */
- 	UCLASS_THERMAL,		/* Thermal sensor */
-+	UCLASS_I2C,		/* I2C bus */
-+	UCLASS_I2C_GENERIC,	/* Generic I2C device */
-+	UCLASS_I2C_EEPROM,	/* I2C EEPROM device */
- 
- 	UCLASS_COUNT,
- 	UCLASS_INVALID = -1,
-diff -ruN u-boot-2015.01-rc3/include/dm/ut.h u-boot/include/dm/ut.h
---- u-boot-2015.01-rc3/include/dm/ut.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/dm/ut.h	2015-01-01 17:34:32.825493874 +0100
-@@ -89,6 +89,18 @@
- 	}								\
- }
- 
-+/* Assert that a pointer is not NULL */
-+#define ut_assertnonnull(expr) {					\
-+	const void *val = (expr);					\
-+									\
-+	if (val == NULL) {						\
-+		ut_failf(dms, __FILE__, __LINE__, __func__,		\
-+			 #expr " = NULL",				\
-+			 "Expected non-null, got NULL");		\
-+		return -1;						\
-+	}								\
-+}
-+
- /* Assert that an operation succeeds (returns 0) */
- #define ut_assertok(cond)	ut_asserteq(0, cond)
- 
-diff -ruN u-boot-2015.01-rc3/include/dt-bindings/pinctrl/pinctrl-tegra.h u-boot/include/dt-bindings/pinctrl/pinctrl-tegra.h
---- u-boot-2015.01-rc3/include/dt-bindings/pinctrl/pinctrl-tegra.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/include/dt-bindings/pinctrl/pinctrl-tegra.h	2015-01-01 17:34:32.825493874 +0100
-@@ -0,0 +1,45 @@
-+/*
-+ * This header provides constants for Tegra pinctrl bindings.
-+ *
-+ * Copyright (c) 2013, NVIDIA CORPORATION.  All rights reserved.
-+ *
-+ * Author: Laxman Dewangan <ldewangan at nvidia.com>
-+ *
-+ * This program is free software; you can redistribute it and/or modify it
-+ * under the terms and conditions of the GNU General Public License,
-+ * version 2, as published by the Free Software Foundation.
-+ *
-+ * This program is distributed in the hope 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.
-+ */
-+
-+#ifndef _DT_BINDINGS_PINCTRL_TEGRA_H
-+#define _DT_BINDINGS_PINCTRL_TEGRA_H
-+
-+/*
-+ * Enable/disable for diffeent dt properties. This is applicable for
-+ * properties nvidia,enable-input, nvidia,tristate, nvidia,open-drain,
-+ * nvidia,lock, nvidia,rcv-sel, nvidia,high-speed-mode, nvidia,schmitt.
-+ */
-+#define TEGRA_PIN_DISABLE				0
-+#define TEGRA_PIN_ENABLE				1
-+
-+#define TEGRA_PIN_PULL_NONE				0
-+#define TEGRA_PIN_PULL_DOWN				1
-+#define TEGRA_PIN_PULL_UP				2
-+
-+/* Low power mode driver */
-+#define TEGRA_PIN_LP_DRIVE_DIV_8			0
-+#define TEGRA_PIN_LP_DRIVE_DIV_4			1
-+#define TEGRA_PIN_LP_DRIVE_DIV_2			2
-+#define TEGRA_PIN_LP_DRIVE_DIV_1			3
-+
-+/* Rising/Falling slew rate */
-+#define TEGRA_PIN_SLEW_RATE_FASTEST			0
-+#define TEGRA_PIN_SLEW_RATE_FAST			1
-+#define TEGRA_PIN_SLEW_RATE_SLOW			2
-+#define TEGRA_PIN_SLEW_RATE_SLOWEST			3
-+
-+#endif
-diff -ruN u-boot-2015.01-rc3/include/dt-bindings/reset/altr,rst-mgr.h u-boot/include/dt-bindings/reset/altr,rst-mgr.h
---- u-boot-2015.01-rc3/include/dt-bindings/reset/altr,rst-mgr.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/dt-bindings/reset/altr,rst-mgr.h	2015-01-01 17:34:32.825493874 +0100
-@@ -1,14 +1,7 @@
- /*
-  * Copyright (c) 2014, Steffen Trumtrar <s.trumtrar at pengutronix.de>
-  *
-- * This software is licensed under the terms of the GNU General Public
-- * License version 2, as published by the Free Software Foundation, and
-- * may be copied, distributed, and modified under those terms.
-- *
-- * 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.
-+ * SPDX-License-Identifier:	GPL-2.0
-  */
- 
- #ifndef _DT_BINDINGS_RESET_ALTR_RST_MGR_H
-diff -ruN u-boot-2015.01-rc3/include/errno.h u-boot/include/errno.h
---- u-boot-2015.01-rc3/include/errno.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/errno.h	2015-01-01 17:34:32.829493808 +0100
-@@ -6,4 +6,7 @@
- 
- #define __set_errno(val) do { errno = val; } while (0)
- 
-+#ifdef CONFIG_ERRNO_STR
-+const char *errno_str(int errno);
-+#endif
- #endif /* _ERRNO_H */
-diff -ruN u-boot-2015.01-rc3/include/fsl_ddr_sdram.h u-boot/include/fsl_ddr_sdram.h
---- u-boot-2015.01-rc3/include/fsl_ddr_sdram.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/fsl_ddr_sdram.h	2015-01-01 17:34:32.829493808 +0100
-@@ -114,6 +114,7 @@
- #define SDRAM_CFG_2T_EN			0x00008000
- #define SDRAM_CFG_BI			0x00000001
- 
-+#define SDRAM_CFG2_FRC_SR		0x80000000
- #define SDRAM_CFG2_D_INIT		0x00000010
- #define SDRAM_CFG2_ODT_CFG_MASK		0x00600000
- #define SDRAM_CFG2_ODT_NEVER		0
-@@ -163,6 +164,7 @@
- #define DDR_CDR1_ODT(x) ((x & DDR_CDR1_ODT_MASK) << DDR_CDR1_ODT_SHIFT)
- #define DDR_CDR2_ODT(x) (x & DDR_CDR2_ODT_MASK)
- #define DDR_CDR2_VREF_OVRD(x)	(0x00008080 | ((((x) - 37) & 0x3F) << 8))
-+#define DDR_CDR2_VREF_TRAIN_EN	0x00000080
- 
- #if (defined(CONFIG_SYS_FSL_DDR_VER) && \
- 	(CONFIG_SYS_FSL_DDR_VER >= FSL_DDR_VER_4_7))
-@@ -202,6 +204,8 @@
- #define DDR_CDR_ODT_120ohm	0x6
- #endif
- 
-+#define DDR_INIT_ADDR_EXT_UIA	(1 << 31)
-+
- /* Record of register values computed */
- typedef struct fsl_ddr_cfg_regs_s {
- 	struct {
-@@ -414,9 +418,11 @@
- int board_need_mem_reset(void)
- 	__attribute__((weak, alias("__board_need_mem_reset")));
- 
--void __weak board_mem_sleep_setup(void)
--{
--}
-+#if defined(CONFIG_DEEP_SLEEP)
-+void board_mem_sleep_setup(void);
-+bool is_warm_boot(void);
-+int fsl_dp_resume(void);
-+#endif
- 
- /*
-  * The 85xx boards have a common prototype for fixed_sdram so put the
-diff -ruN u-boot-2015.01-rc3/include/fsl_usb.h u-boot/include/fsl_usb.h
---- u-boot-2015.01-rc3/include/fsl_usb.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/fsl_usb.h	2015-01-01 17:34:32.829493808 +0100
-@@ -145,6 +145,25 @@
- 	return SVR_SOC_VER(get_svr()) == SVR_T4240 &&
- 		IS_SVR_REV(get_svr(), 2, 0);
- }
-+
-+static inline bool has_erratum_a007792(void)
-+{
-+	u32 svr = get_svr();
-+	u32 soc = SVR_SOC_VER(svr);
-+
-+	switch (soc) {
-+	case SVR_T4240:
-+	case SVR_T4160:
-+		return IS_SVR_REV(svr, 2, 0);
-+	case SVR_T1040:
-+		return IS_SVR_REV(svr, 1, 0);
-+	case SVR_T2080:
-+	case SVR_T2081:
-+		return IS_SVR_REV(svr, 1, 0) || IS_SVR_REV(svr, 1, 1);
-+	}
-+	return false;
-+}
-+
- #else
- static inline bool has_erratum_a006261(void)
- {
-@@ -161,5 +180,9 @@
- 	return false;
- }
- 
-+static inline bool has_erratum_a007792(void)
-+{
-+	return false;
-+}
- #endif
- #endif /*_ASM_FSL_USB_H_ */
-diff -ruN u-boot-2015.01-rc3/include/g_dnl.h u-boot/include/g_dnl.h
---- u-boot-2015.01-rc3/include/g_dnl.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/g_dnl.h	2015-01-01 17:34:32.829493808 +0100
-@@ -39,4 +39,8 @@
- void g_dnl_unregister(void);
- void g_dnl_set_serialnumber(char *);
- 
-+bool g_dnl_detach(void);
-+void g_dnl_trigger_detach(void);
-+void g_dnl_clear_detach(void);
-+
- #endif /* __G_DOWNLOAD_H_ */
-diff -ruN u-boot-2015.01-rc3/include/i2c_eeprom.h u-boot/include/i2c_eeprom.h
---- u-boot-2015.01-rc3/include/i2c_eeprom.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/include/i2c_eeprom.h	2015-01-01 17:34:32.833493744 +0100
-@@ -0,0 +1,19 @@
-+/*
-+ * Copyright (c) 2014 Google, Inc
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#ifndef __I2C_EEPROM
-+#define __I2C_EEPROM
-+
-+struct i2c_eeprom_ops {
-+	int (*read)(struct udevice *dev, int offset, uint8_t *buf, int size);
-+	int (*write)(struct udevice *dev, int offset, const uint8_t *buf,
-+		     int size);
-+};
-+
-+struct i2c_eeprom {
-+};
-+
-+#endif
-diff -ruN u-boot-2015.01-rc3/include/i2c.h u-boot/include/i2c.h
---- u-boot-2015.01-rc3/include/i2c.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/i2c.h	2015-01-01 17:34:32.833493744 +0100
-@@ -18,6 +18,355 @@
- #define _I2C_H_
- 
- /*
-+ * For now there are essentially two parts to this file - driver model
-+ * here at the top, and the older code below (with CONFIG_SYS_I2C being
-+ * most recent). The plan is to migrate everything to driver model.
-+ * The driver model structures and API are separate as they are different
-+ * enough as to be incompatible for compilation purposes.
-+ */
-+
-+#ifdef CONFIG_DM_I2C
-+
-+enum dm_i2c_chip_flags {
-+	DM_I2C_CHIP_10BIT	= 1 << 0, /* Use 10-bit addressing */
-+	DM_I2C_CHIP_RD_ADDRESS	= 1 << 1, /* Send address for each read byte */
-+	DM_I2C_CHIP_WR_ADDRESS	= 1 << 2, /* Send address for each write byte */
-+};
-+
-+/**
-+ * struct dm_i2c_chip - information about an i2c chip
-+ *
-+ * An I2C chip is a device on the I2C bus. It sits at a particular address
-+ * and normally supports 7-bit or 10-bit addressing.
-+ *
-+ * To obtain this structure, use dev_get_parentdata(dev) where dev is the
-+ * chip to examine.
-+ *
-+ * @chip_addr:	Chip address on bus
-+ * @offset_len: Length of offset in bytes. A single byte offset can
-+ *		represent up to 256 bytes. A value larger than 1 may be
-+ *		needed for larger devices.
-+ * @flags:	Flags for this chip (dm_i2c_chip_flags)
-+ * @emul: Emulator for this chip address (only used for emulation)
-+ */
-+struct dm_i2c_chip {
-+	uint chip_addr;
-+	uint offset_len;
-+	uint flags;
-+#ifdef CONFIG_SANDBOX
-+	struct udevice *emul;
-+#endif
-+};
-+
-+/**
-+ * struct dm_i2c_bus- information about an i2c bus
-+ *
-+ * An I2C bus contains 0 or more chips on it, each at its own address. The
-+ * bus can operate at different speeds (measured in Hz, typically 100KHz
-+ * or 400KHz).
-+ *
-+ * To obtain this structure, use bus->uclass_priv where bus is the I2C
-+ * bus udevice.
-+ *
-+ * @speed_hz: Bus speed in hertz (typically 100000)
-+ */
-+struct dm_i2c_bus {
-+	int speed_hz;
-+};
-+
-+/**
-+ * i2c_read() - read bytes from an I2C chip
-+ *
-+ * To obtain an I2C device (called a 'chip') given the I2C bus address you
-+ * can use i2c_get_chip(). To obtain a bus by bus number use
-+ * uclass_get_device_by_seq(UCLASS_I2C, <bus number>).
-+ *
-+ * To set the address length of a devce use i2c_set_addr_len(). It
-+ * defaults to 1.
-+ *
-+ * @dev:	Chip to read from
-+ * @offset:	Offset within chip to start reading
-+ * @buffer:	Place to put data
-+ * @len:	Number of bytes to read
-+ *
-+ * @return 0 on success, -ve on failure
-+ */
-+int i2c_read(struct udevice *dev, uint offset, uint8_t *buffer,
-+	     int len);
-+
-+/**
-+ * i2c_write() - write bytes to an I2C chip
-+ *
-+ * See notes for i2c_read() above.
-+ *
-+ * @dev:	Chip to write to
-+ * @offset:	Offset within chip to start writing
-+ * @buffer:	Buffer containing data to write
-+ * @len:	Number of bytes to write
-+ *
-+ * @return 0 on success, -ve on failure
-+ */
-+int i2c_write(struct udevice *dev, uint offset, const uint8_t *buffer,
-+	      int len);
-+
-+/**
-+ * i2c_probe() - probe a particular chip address
-+ *
-+ * This can be useful to check for the existence of a chip on the bus.
-+ * It is typically implemented by writing the chip address to the bus
-+ * and checking that the chip replies with an ACK.
-+ *
-+ * @bus:	Bus to probe
-+ * @chip_addr:	7-bit address to probe (10-bit and others are not supported)
-+ * @chip_flags:	Flags for the probe (see enum dm_i2c_chip_flags)
-+ * @devp:	Returns the device found, or NULL if none
-+ * @return 0 if a chip was found at that address, -ve if not
-+ */
-+int i2c_probe(struct udevice *bus, uint chip_addr, uint chip_flags,
-+	      struct udevice **devp);
-+
-+/**
-+ * i2c_set_bus_speed() - set the speed of a bus
-+ *
-+ * @bus:	Bus to adjust
-+ * @speed:	Requested speed in Hz
-+ * @return 0 if OK, -EINVAL for invalid values
-+ */
-+int i2c_set_bus_speed(struct udevice *bus, unsigned int speed);
-+
-+/**
-+ * i2c_get_bus_speed() - get the speed of a bus
-+ *
-+ * @bus:	Bus to check
-+ * @return speed of selected I2C bus in Hz, -ve on error
-+ */
-+int i2c_get_bus_speed(struct udevice *bus);
-+
-+/**
-+ * i2c_set_chip_flags() - set flags for a chip
-+ *
-+ * Typically addresses are 7 bits, but for 10-bit addresses you should set
-+ * flags to DM_I2C_CHIP_10BIT. All accesses will then use 10-bit addressing.
-+ *
-+ * @dev:	Chip to adjust
-+ * @flags:	New flags
-+ * @return 0 if OK, -EINVAL if value is unsupported, other -ve value on error
-+ */
-+int i2c_set_chip_flags(struct udevice *dev, uint flags);
-+
-+/**
-+ * i2c_get_chip_flags() - get flags for a chip
-+ *
-+ * @dev:	Chip to check
-+ * @flagsp:	Place to put flags
-+ * @return 0 if OK, other -ve value on error
-+ */
-+int i2c_get_chip_flags(struct udevice *dev, uint *flagsp);
-+
-+/**
-+ * i2c_set_offset_len() - set the offset length for a chip
-+ *
-+ * The offset used to access a chip may be up to 4 bytes long. Typically it
-+ * is only 1 byte, which is enough for chips with 256 bytes of memory or
-+ * registers. The default value is 1, but you can call this function to
-+ * change it.
-+ *
-+ * @offset_len:	New offset length value (typically 1 or 2)
-+ */
-+
-+int i2c_set_chip_offset_len(struct udevice *dev, uint offset_len);
-+/**
-+ * i2c_deblock() - recover a bus that is in an unknown state
-+ *
-+ * See the deblock() method in 'struct dm_i2c_ops' for full information
-+ *
-+ * @bus:	Bus to recover
-+ * @return 0 if OK, -ve on error
-+ */
-+int i2c_deblock(struct udevice *bus);
-+
-+/*
-+ * Not all of these flags are implemented in the U-Boot API
-+ */
-+enum dm_i2c_msg_flags {
-+	I2C_M_TEN		= 0x0010, /* ten-bit chip address */
-+	I2C_M_RD		= 0x0001, /* read data, from slave to master */
-+	I2C_M_STOP		= 0x8000, /* send stop after this message */
-+	I2C_M_NOSTART		= 0x4000, /* no start before this message */
-+	I2C_M_REV_DIR_ADDR	= 0x2000, /* invert polarity of R/W bit */
-+	I2C_M_IGNORE_NAK	= 0x1000, /* continue after NAK */
-+	I2C_M_NO_RD_ACK		= 0x0800, /* skip the Ack bit on reads */
-+	I2C_M_RECV_LEN		= 0x0400, /* length is first received byte */
-+};
-+
-+/**
-+ * struct i2c_msg - an I2C message
-+ *
-+ * @addr:	Slave address
-+ * @flags:	Flags (see enum dm_i2c_msg_flags)
-+ * @len:	Length of buffer in bytes, may be 0 for a probe
-+ * @buf:	Buffer to send/receive, or NULL if no data
-+ */
-+struct i2c_msg {
-+	uint addr;
-+	uint flags;
-+	uint len;
-+	u8 *buf;
-+};
-+
-+/**
-+ * struct i2c_msg_list - a list of I2C messages
-+ *
-+ * This is called i2c_rdwr_ioctl_data in Linux but the name does not seem
-+ * appropriate in U-Boot.
-+ *
-+ * @msg:	Pointer to i2c_msg array
-+ * @nmsgs:	Number of elements in the array
-+ */
-+struct i2c_msg_list {
-+	struct i2c_msg *msgs;
-+	uint nmsgs;
-+};
-+
-+/**
-+ * struct dm_i2c_ops - driver operations for I2C uclass
-+ *
-+ * Drivers should support these operations unless otherwise noted. These
-+ * operations are intended to be used by uclass code, not directly from
-+ * other code.
-+ */
-+struct dm_i2c_ops {
-+	/**
-+	 * xfer() - transfer a list of I2C messages
-+	 *
-+	 * @bus:	Bus to read from
-+	 * @msg:	List of messages to transfer
-+	 * @nmsgs:	Number of messages in the list
-+	 * @return 0 if OK, -EREMOTEIO if the slave did not ACK a byte,
-+	 *	-ECOMM if the speed cannot be supported, -EPROTO if the chip
-+	 *	flags cannot be supported, other -ve value on some other error
-+	 */
-+	int (*xfer)(struct udevice *bus, struct i2c_msg *msg, int nmsgs);
-+
-+	/**
-+	 * probe_chip() - probe for the presense of a chip address
-+	 *
-+	 * This function is optional. If omitted, the uclass will send a zero
-+	 * length message instead.
-+	 *
-+	 * @bus:	Bus to probe
-+	 * @chip_addr:	Chip address to probe
-+	 * @chip_flags:	Probe flags (enum dm_i2c_chip_flags)
-+	 * @return 0 if chip was found, -EREMOTEIO if not, -ENOSYS to fall back
-+	 * to default probem other -ve value on error
-+	 */
-+	int (*probe_chip)(struct udevice *bus, uint chip_addr, uint chip_flags);
-+
-+	/**
-+	 * set_bus_speed() - set the speed of a bus (optional)
-+	 *
-+	 * The bus speed value will be updated by the uclass if this function
-+	 * does not return an error. This method is optional - if it is not
-+	 * provided then the driver can read the speed from
-+	 * bus->uclass_priv->speed_hz
-+	 *
-+	 * @bus:	Bus to adjust
-+	 * @speed:	Requested speed in Hz
-+	 * @return 0 if OK, -EINVAL for invalid values
-+	 */
-+	int (*set_bus_speed)(struct udevice *bus, unsigned int speed);
-+
-+	/**
-+	 * get_bus_speed() - get the speed of a bus (optional)
-+	 *
-+	 * Normally this can be provided by the uclass, but if you want your
-+	 * driver to check the bus speed by looking at the hardware, you can
-+	 * implement that here. This method is optional. This method would
-+	 * normally be expected to return bus->uclass_priv->speed_hz.
-+	 *
-+	 * @bus:	Bus to check
-+	 * @return speed of selected I2C bus in Hz, -ve on error
-+	 */
-+	int (*get_bus_speed)(struct udevice *bus);
-+
-+	/**
-+	 * set_flags() - set the flags for a chip (optional)
-+	 *
-+	 * This is generally implemented by the uclass, but drivers can
-+	 * check the value to ensure that unsupported options are not used.
-+	 * This method is optional. If provided, this method will always be
-+	 * called when the flags change.
-+	 *
-+	 * @dev:	Chip to adjust
-+	 * @flags:	New flags value
-+	 * @return 0 if OK, -EINVAL if value is unsupported
-+	 */
-+	int (*set_flags)(struct udevice *dev, uint flags);
-+
-+	/**
-+	 * deblock() - recover a bus that is in an unknown state
-+	 *
-+	 * I2C is a synchronous protocol and resets of the processor in the
-+	 * middle of an access can block the I2C Bus until a powerdown of
-+	 * the full unit is done. This is because slaves can be stuck
-+	 * waiting for addition bus transitions for a transaction that will
-+	 * never complete. Resetting the I2C master does not help. The only
-+	 * way is to force the bus through a series of transitions to make
-+	 * sure that all slaves are done with the transaction. This method
-+	 * performs this 'deblocking' if support by the driver.
-+	 *
-+	 * This method is optional.
-+	 */
-+	int (*deblock)(struct udevice *bus);
-+};
-+
-+#define i2c_get_ops(dev)	((struct dm_i2c_ops *)(dev)->driver->ops)
-+
-+/**
-+ * i2c_get_chip() - get a device to use to access a chip on a bus
-+ *
-+ * This returns the device for the given chip address. The device can then
-+ * be used with calls to i2c_read(), i2c_write(), i2c_probe(), etc.
-+ *
-+ * @bus:	Bus to examine
-+ * @chip_addr:	Chip address for the new device
-+ * @devp:	Returns pointer to new device if found or -ENODEV if not
-+ *		found
-+ */
-+int i2c_get_chip(struct udevice *bus, uint chip_addr, struct udevice **devp);
-+
-+/**
-+ * i2c_get_chip() - get a device to use to access a chip on a bus number
-+ *
-+ * This returns the device for the given chip address on a particular bus
-+ * number.
-+ *
-+ * @busnum:	Bus number to examine
-+ * @chip_addr:	Chip address for the new device
-+ * @devp:	Returns pointer to new device if found or -ENODEV if not
-+ *		found
-+ */
-+int i2c_get_chip_for_busnum(int busnum, int chip_addr, struct udevice **devp);
-+
-+/**
-+ * i2c_chip_ofdata_to_platdata() - Decode standard I2C platform data
-+ *
-+ * This decodes the chip address from a device tree node and puts it into
-+ * its dm_i2c_chip structure. This should be called in your driver's
-+ * ofdata_to_platdata() method.
-+ *
-+ * @blob:	Device tree blob
-+ * @node:	Node offset to read from
-+ * @spi:	Place to put the decoded information
-+ */
-+int i2c_chip_ofdata_to_platdata(const void *blob, int node,
-+				struct dm_i2c_chip *chip);
-+
-+#endif
-+
-+#ifndef CONFIG_DM_I2C
-+
-+/*
-  * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
-  *
-  * The implementation MUST NOT use static or global variables if the
-@@ -451,4 +800,7 @@
-  * @return 0 if port was reset, -1 if not found
-  */
- int i2c_reset_port_fdt(const void *blob, int node);
-+
-+#endif /* !CONFIG_DM_I2C */
-+
- #endif	/* _I2C_H_ */
-diff -ruN u-boot-2015.01-rc3/include/linux/linkage.h u-boot/include/linux/linkage.h
---- u-boot-2015.01-rc3/include/linux/linkage.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/linux/linkage.h	2015-01-01 17:34:32.837493678 +0100
-@@ -17,7 +17,9 @@
- #define CPP_ASMLINKAGE
- #endif
- 
-+#ifndef asmlinkage
- #define asmlinkage CPP_ASMLINKAGE
-+#endif
- 
- #define SYMBOL_NAME_STR(X)	#X
- #define SYMBOL_NAME(X)		X
-diff -ruN u-boot-2015.01-rc3/include/linux/string.h u-boot/include/linux/string.h
---- u-boot-2015.01-rc3/include/linux/string.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/linux/string.h	2015-01-01 17:34:32.837493678 +0100
-@@ -30,6 +30,9 @@
- #ifndef __HAVE_ARCH_STRNCPY
- extern char * strncpy(char *,const char *, __kernel_size_t);
- #endif
-+#ifndef __HAVE_ARCH_STRLCPY
-+size_t strlcpy(char *, const char *, size_t);
-+#endif
- #ifndef __HAVE_ARCH_STRCAT
- extern char * strcat(char *, const char *);
- #endif
-diff -ruN u-boot-2015.01-rc3/include/mmc.h u-boot/include/mmc.h
---- u-boot-2015.01-rc3/include/mmc.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/mmc.h	2015-01-01 17:34:32.841493612 +0100
-@@ -31,6 +31,7 @@
- #define MMC_VERSION_4_3		(MMC_VERSION_MMC | 0x403)
- #define MMC_VERSION_4_41	(MMC_VERSION_MMC | 0x429)
- #define MMC_VERSION_4_5		(MMC_VERSION_MMC | 0x405)
-+#define MMC_VERSION_5_0		(MMC_VERSION_MMC | 0x500)
- 
- #define MMC_MODE_HS		(1 << 0)
- #define MMC_MODE_HS_52MHz	(1 << 1)
-@@ -147,6 +148,7 @@
-  * EXT_CSD fields
-  */
- #define EXT_CSD_GP_SIZE_MULT		143	/* R/W */
-+#define EXT_CSD_PARTITION_SETTING	155	/* R/W */
- #define EXT_CSD_PARTITIONS_ATTRIBUTE	156	/* R/W */
- #define EXT_CSD_PARTITIONING_SUPPORT	160	/* RO */
- #define EXT_CSD_RST_N_FUNCTION		162	/* R/W */
-@@ -197,6 +199,8 @@
- #define EXT_CSD_BOOT_BUS_WIDTH_RESET(x)	(x << 2)
- #define EXT_CSD_BOOT_BUS_WIDTH_WIDTH(x)	(x)
- 
-+#define EXT_CSD_PARTITION_SETTING_COMPLETED	(1 << 0)
-+
- #define R1_ILLEGAL_COMMAND		(1 << 22)
- #define R1_APP_CMD			(1 << 5)
- 
-@@ -314,6 +318,7 @@
- 	char init_in_progress;	/* 1 if we have done mmc_start_init() */
- 	char preinit;		/* start init as early as possible */
- 	uint op_cond_response;	/* the response byte from the last op_cond */
-+	int ddr_mode;
- };
- 
- int mmc_register(struct mmc *mmc);
-diff -ruN u-boot-2015.01-rc3/include/part.h u-boot/include/part.h
---- u-boot-2015.01-rc3/include/part.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/part.h	2015-01-01 17:34:32.845493546 +0100
-@@ -244,6 +244,26 @@
-  */
- int gpt_restore(block_dev_desc_t *dev_desc, char *str_disk_guid,
- 		disk_partition_t *partitions, const int parts_count);
-+
-+/**
-+ * is_valid_gpt_buf() - Ensure that the Primary GPT information is valid
-+ *
-+ * @param dev_desc - block device descriptor
-+ * @param buf - buffer which contains the MBR and Primary GPT info
-+ *
-+ * @return - '0' on success, otherwise error
-+ */
-+int is_valid_gpt_buf(block_dev_desc_t *dev_desc, void *buf);
-+
-+/**
-+ * write_mbr_and_gpt_partitions() - write MBR, Primary GPT and Backup GPT
-+ *
-+ * @param dev_desc - block device descriptor
-+ * @param buf - buffer which contains the MBR and Primary GPT info
-+ *
-+ * @return - '0' on success, otherwise error
-+ */
-+int write_mbr_and_gpt_partitions(block_dev_desc_t *dev_desc, void *buf);
- #endif
- 
- #endif /* _PART_H */
-diff -ruN u-boot-2015.01-rc3/include/pci_ids.h u-boot/include/pci_ids.h
---- u-boot-2015.01-rc3/include/pci_ids.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/pci_ids.h	2015-01-01 17:34:32.845493546 +0100
-@@ -2998,6 +2998,14 @@
- #define PCI_DEVICE_ID_INTEL_82454NX     0x84cb
- #define PCI_DEVICE_ID_INTEL_84460GX	0x84ea
- #define PCI_DEVICE_ID_INTEL_IXP4XX	0x8500
-+#define PCI_DEVICE_ID_INTEL_TCF_GBE	0x8802
-+#define PCI_DEVICE_ID_INTEL_TCF_SDIO_0	0x8809
-+#define PCI_DEVICE_ID_INTEL_TCF_SDIO_1	0x880a
-+#define PCI_DEVICE_ID_INTEL_TCF_SATA	0x880b
-+#define PCI_DEVICE_ID_INTEL_TCF_UART_0	0x8811
-+#define PCI_DEVICE_ID_INTEL_TCF_UART_1	0x8812
-+#define PCI_DEVICE_ID_INTEL_TCF_UART_2	0x8813
-+#define PCI_DEVICE_ID_INTEL_TCF_UART_3	0x8814
- #define PCI_DEVICE_ID_INTEL_IXP2800	0x9004
- #define PCI_DEVICE_ID_INTEL_S21152BB	0xb152
- 
-diff -ruN u-boot-2015.01-rc3/include/smsc_lpc47m.h u-boot/include/smsc_lpc47m.h
---- u-boot-2015.01-rc3/include/smsc_lpc47m.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/include/smsc_lpc47m.h	2015-01-01 17:34:32.849493480 +0100
-@@ -0,0 +1,19 @@
-+/*
-+ * Copyright (C) 2014, Bin Meng <bmeng.cn at gmail.com>
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ */
-+
-+#ifndef _SMSC_LPC47M_H_
-+#define _SMSC_LPC47M_H_
-+
-+/**
-+ * Configure the base I/O port of the specified serial device and enable the
-+ * serial device.
-+ *
-+ * @dev: High 8 bits = Super I/O port, low 8 bits = logical device number.
-+ * @iobase: Processor I/O port address to assign to this serial device.
-+ */
-+void lpc47m_enable_serial(u16 dev, u16 iobase);
-+
-+#endif /* _SMSC_LPC47M_H_ */
-diff -ruN u-boot-2015.01-rc3/include/spi.h u-boot/include/spi.h
---- u-boot-2015.01-rc3/include/spi.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/spi.h	2015-01-01 17:34:32.849493480 +0100
-@@ -34,6 +34,7 @@
- 
- /* SPI TX operation modes */
- #define SPI_OPM_TX_QPP		(1 << 0)
-+#define SPI_OPM_TX_BP		(1 << 1)
- 
- /* SPI RX operation modes */
- #define SPI_OPM_RX_AS		(1 << 0)
-diff -ruN u-boot-2015.01-rc3/include/tps6586x.h u-boot/include/tps6586x.h
---- u-boot-2015.01-rc3/include/tps6586x.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/tps6586x.h	2015-01-01 17:34:32.849493480 +0100
-@@ -44,9 +44,9 @@
-  * Set up the TPS6586X I2C bus number. This will be used for all operations
-  * on the device. This function must be called before using other functions.
-  *
-- * @param bus	I2C bus number containing the TPS6586X chip
-+ * @param bus	I2C bus containing the TPS6586X chip
-  * @return 0 (always succeeds)
-  */
--int tps6586x_init(int bus);
-+int tps6586x_init(struct udevice *bus);
- 
- #endif	/* _TPS6586X_H_ */
-diff -ruN u-boot-2015.01-rc3/include/usb/ehci-fsl.h u-boot/include/usb/ehci-fsl.h
---- u-boot-2015.01-rc3/include/usb/ehci-fsl.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/include/usb/ehci-fsl.h	2015-01-01 17:34:32.853493416 +0100
-@@ -280,7 +280,9 @@
- #define MXC_EHCI_IPPUE_DOWN		(1 << 10)
- #define MXC_EHCI_IPPUE_UP		(1 << 11)
- 
-+int usb_phy_mode(int port);
- /* Board-specific initialization */
- int board_ehci_hcd_init(int port);
-+int board_usb_phy_mode(int port);
- 
- #endif /* _EHCI_FSL_H */
-diff -ruN u-boot-2015.01-rc3/lib/asm-offsets.c u-boot/lib/asm-offsets.c
---- u-boot-2015.01-rc3/lib/asm-offsets.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/lib/asm-offsets.c	2015-01-01 17:34:32.857493350 +0100
-@@ -31,9 +31,6 @@
- #ifdef CONFIG_SYS_MALLOC_F_LEN
- 	DEFINE(GD_MALLOC_BASE, offsetof(struct global_data, malloc_base));
- #endif
--#ifdef CONFIG_X86
--	DEFINE(GD_BIST, offsetof(struct global_data, arch.bist));
--#endif
- 
- #if defined(CONFIG_ARM)
- 
-diff -ruN u-boot-2015.01-rc3/lib/errno_str.c u-boot/lib/errno_str.c
---- u-boot-2015.01-rc3/lib/errno_str.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/lib/errno_str.c	2015-01-01 17:34:32.857493350 +0100
-@@ -0,0 +1,147 @@
-+/*
-+ * Copyright (C) 2014 Samsung Electronics
-+ * Przemyslaw Marczak <p.marczak at samsung.com>
-+ *
-+ * SDPX-License-Identifier:	GPL-2.0+
-+ */
-+#include <common.h>
-+#include <errno.h>
-+
-+#define ERRNO_MSG(errno, msg)	msg
-+#define SAME_AS(x)		(const char *)&errno_message[x]
-+
-+static const char * const errno_message[] = {
-+	ERRNO_MSG(0, "Success"),
-+	ERRNO_MSG(EPERM, "Operation not permitted"),
-+	ERRNO_MSG(ENOEN, "No such file or directory"),
-+	ERRNO_MSG(ESRCH, "No such process"),
-+	ERRNO_MSG(EINTR, "Interrupted system call"),
-+	ERRNO_MSG(EIO, "I/O error"),
-+	ERRNO_MSG(ENXIO, "No such device or address"),
-+	ERRNO_MSG(E2BIG, "Argument list too long"),
-+	ERRNO_MSG(ENOEXEC, "Exec format error"),
-+	ERRNO_MSG(EBADF, "Bad file number"),
-+	ERRNO_MSG(ECHILD, "No child processes"),
-+	ERRNO_MSG(EAGAIN, "Try again"),
-+	ERRNO_MSG(ENOMEM, "Out of memory"),
-+	ERRNO_MSG(EACCES, "Permission denied"),
-+	ERRNO_MSG(EFAULT, "Bad address"),
-+	ERRNO_MSG(ENOTBL, "Block device required"),
-+	ERRNO_MSG(EBUSY, "Device or resource busy"),
-+	ERRNO_MSG(EEXIST, "File exists"),
-+	ERRNO_MSG(EXDEV, "Cross-device link"),
-+	ERRNO_MSG(ENODEV, "No such device"),
-+	ERRNO_MSG(ENOTDIR, "Not a directory"),
-+	ERRNO_MSG(EISDIR, "Is a directory"),
-+	ERRNO_MSG(EINVAL, "Invalid argument"),
-+	ERRNO_MSG(ENFILE, "File table overflow"),
-+	ERRNO_MSG(EMFILE, "Too many open files"),
-+	ERRNO_MSG(ENOTTY, "Not a typewriter"),
-+	ERRNO_MSG(ETXTBSY, "Text file busy"),
-+	ERRNO_MSG(EFBIG, "File too large"),
-+	ERRNO_MSG(ENOSPC, "No space left on device"),
-+	ERRNO_MSG(ESPIPE, "Illegal seek"),
-+	ERRNO_MSG(EROFS, "Read-only file system"),
-+	ERRNO_MSG(EMLINK, "Too many links"),
-+	ERRNO_MSG(EPIPE, "Broken pipe"),
-+	ERRNO_MSG(EDOM, "Math argument out of domain of func"),
-+	ERRNO_MSG(ERANGE, "Math result not representable"),
-+	ERRNO_MSG(EDEADLK, "Resource deadlock would occur"),
-+	ERRNO_MSG(ENAMETOOLONG, "File name too long"),
-+	ERRNO_MSG(ENOLCK, "No record locks available"),
-+	ERRNO_MSG(ENOSYS, "Function not implemented"),
-+	ERRNO_MSG(ENOTEMPTY, "Directory not empty"),
-+	ERRNO_MSG(ELOOP, "Too many symbolic links encountered"),
-+	ERRNO_MSG(EWOULDBLOCK, SAME_AS(EAGAIN)),
-+	ERRNO_MSG(ENOMSG, "No message of desired type"),
-+	ERRNO_MSG(EIDRM, "Identifier removed"),
-+	ERRNO_MSG(ECHRNG, "Channel number out of range"),
-+	ERRNO_MSG(EL2NSYNC, "Level 2 not synchronized"),
-+	ERRNO_MSG(EL3HLT, "Level 3 halted"),
-+	ERRNO_MSG(EL3RST, "Level 3 reset"),
-+	ERRNO_MSG(ELNRNG, "Link number out of range"),
-+	ERRNO_MSG(EUNATCH, "Protocol driver not attached"),
-+	ERRNO_MSG(ENOCSI, "No CSI structure available"),
-+	ERRNO_MSG(EL2HLT, "Level 2 halted"),
-+	ERRNO_MSG(EBADE, "Invalid exchange"),
-+	ERRNO_MSG(EBADR, "Invalid request descriptor"),
-+	ERRNO_MSG(EXFULL, "Exchange full"),
-+	ERRNO_MSG(ENOANO, "No anode"),
-+	ERRNO_MSG(EBADRQC, "Invalid request code"),
-+	ERRNO_MSG(EBADSLT, "Invalid slot"),
-+	ERRNO_MSG(EDEADLOCK, SAME_AS(EDEADLK)),
-+	ERRNO_MSG(EBFONT, "Bad font file format"),
-+	ERRNO_MSG(ENOSTR, "Device not a stream"),
-+	ERRNO_MSG(ENODATA, "No data available"),
-+	ERRNO_MSG(ETIME, "Timer expired"),
-+	ERRNO_MSG(ENOSR, "Out of streams resources"),
-+	ERRNO_MSG(ENONET, "Machine is not on the network"),
-+	ERRNO_MSG(ENOPKG, "Package not installed"),
-+	ERRNO_MSG(EREMOTE, "Object is remote"),
-+	ERRNO_MSG(ENOLINK, "Link has been severed"),
-+	ERRNO_MSG(EADV, "Advertise error"),
-+	ERRNO_MSG(ESRMNT, "Srmount error"),
-+	ERRNO_MSG(ECOMM, "Communication error on send"),
-+	ERRNO_MSG(EPROTO, "Protocol error"),
-+	ERRNO_MSG(EMULTIHOP, "Multihop attempted"),
-+	ERRNO_MSG(EDOTDOT, "RFS specific error"),
-+	ERRNO_MSG(EBADMSG, "Not a data message"),
-+	ERRNO_MSG(EOVERFLOW, "Value too large for defined data type"),
-+	ERRNO_MSG(ENOTUNIQ, "Name not unique on network"),
-+	ERRNO_MSG(EBADFD, "File descriptor in bad state"),
-+	ERRNO_MSG(EREMCHG, "Remote address changed"),
-+	ERRNO_MSG(ELIBACC, "Can not access a needed shared library"),
-+	ERRNO_MSG(ELIBBAD, "Accessing a corrupted shared library"),
-+	ERRNO_MSG(ELIBSCN, ".lib section in a.out corrupted"),
-+	ERRNO_MSG(ELIBMAX, "Attempting to link in too many shared libraries"),
-+	ERRNO_MSG(ELIBEXEC, "Cannot exec a shared library directly"),
-+	ERRNO_MSG(EILSEQ, "Illegal byte sequence"),
-+	ERRNO_MSG(ERESTART, "Interrupted system call should be restarted"),
-+	ERRNO_MSG(ESTRPIPE, "Streams pipe error"),
-+	ERRNO_MSG(EUSERS, "Too many users"),
-+	ERRNO_MSG(ENOTSOCK, "Socket operation on non-socket"),
-+	ERRNO_MSG(EDESTADDRREQ, "Destination address required"),
-+	ERRNO_MSG(EMSGSIZE, "Message too long"),
-+	ERRNO_MSG(EPROTOTYPE, "Protocol wrong type for socket"),
-+	ERRNO_MSG(ENOPROTOOPT, "Protocol not available"),
-+	ERRNO_MSG(EPROTONOSUPPORT, "Protocol not supported"),
-+	ERRNO_MSG(ESOCKTNOSUPPORT, "Socket type not supported"),
-+	ERRNO_MSG(EOPNOTSUPP, "Operation not supported on transport endpoint"),
-+	ERRNO_MSG(EPFNOSUPPORT, "Protocol family not supported"),
-+	ERRNO_MSG(AFNOSUPPORT, "Address family not supported by protocol"),
-+	ERRNO_MSG(EADDRINUSE, "Address already in use"),
-+	ERRNO_MSG(EADDRNOTAVAIL, "Cannot assign requested address"),
-+	ERRNO_MSG(ENETDOWN, "Network is down"),
-+	ERRNO_MSG(ENETUNREACH, "Network is unreachable"),
-+	ERRNO_MSG(ENETRESET, "Network dropped connection because of reset"),
-+	ERRNO_MSG(ECONNABORTED, "Software caused connection abort"),
-+	ERRNO_MSG(ECONNRESET, "Connection reset by peer"),
-+	ERRNO_MSG(ENOBUFS, "No buffer space available"),
-+	ERRNO_MSG(EISCONN, "Transport endpoint is already connected"),
-+	ERRNO_MSG(ENOTCONN, "Transport endpoint is not connected"),
-+	ERRNO_MSG(ESHUTDOWN, "Cannot send after transport endpoint shutdown"),
-+	ERRNO_MSG(ETOOMANYREFS, "Too many references: cannot splice"),
-+	ERRNO_MSG(ETIMEDOUT, "Connection timed out"),
-+	ERRNO_MSG(ECONNREFUSED, "Connection refused"),
-+	ERRNO_MSG(EHOSTDOWN, "Host is down"),
-+	ERRNO_MSG(EHOSTUNREACH, "No route to host"),
-+	ERRNO_MSG(EALREADY, "Operation already in progress"),
-+	ERRNO_MSG(EINPROGRESS, "Operation now in progress"),
-+	ERRNO_MSG(ESTALE, "Stale NFS file handle"),
-+	ERRNO_MSG(EUCLEAN, "Structure needs cleaning"),
-+	ERRNO_MSG(ENOTNAM, "Not a XENIX named type file"),
-+	ERRNO_MSG(ENAVAIL, "No XENIX semaphores available"),
-+	ERRNO_MSG(EISNAM, "Is a named type file"),
-+	ERRNO_MSG(EREMOTEIO, "Remote I/O error"),
-+	ERRNO_MSG(EDQUOT, "Quota exceeded"),
-+	ERRNO_MSG(ENOMEDIUM, "No medium found"),
-+	ERRNO_MSG(EMEDIUMTYPE, "Wrong medium type"),
-+};
-+
-+const char *errno_str(int errno)
-+{
-+	if (errno >= 0)
-+		return errno_message[0];
-+
-+	return errno_message[abs(errno)];
-+}
-diff -ruN u-boot-2015.01-rc3/lib/initcall.c u-boot/lib/initcall.c
---- u-boot-2015.01-rc3/lib/initcall.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/lib/initcall.c	2015-01-01 17:34:32.861493284 +0100
-@@ -19,7 +19,11 @@
- 
- 		if (gd->flags & GD_FLG_RELOC)
- 			reloc_ofs = gd->reloc_off;
--		debug("initcall: %p\n", (char *)*init_fnc_ptr - reloc_ofs);
-+		debug("initcall: %p", (char *)*init_fnc_ptr - reloc_ofs);
-+		if (gd->flags & GD_FLG_RELOC)
-+			debug(" (relocated to %p)\n", (char *)*init_fnc_ptr);
-+		else
-+			debug("\n");
- 		ret = (*init_fnc_ptr)();
- 		if (ret) {
- 			printf("initcall sequence %p failed at call %p (err=%d)\n",
-diff -ruN u-boot-2015.01-rc3/lib/Makefile u-boot/lib/Makefile
---- u-boot-2015.01-rc3/lib/Makefile	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/lib/Makefile	2015-01-01 17:34:32.857493350 +0100
-@@ -51,6 +51,7 @@
- obj-$(CONFIG_ADDR_MAP) += addr_map.o
- obj-y += hashtable.o
- obj-y += errno.o
-+obj-$(CONFIG_ERRNO_STR) += errno_str.o
- obj-y += display_options.o
- obj-$(CONFIG_BCH) += bch.o
- obj-y += crc32.o
-diff -ruN u-boot-2015.01-rc3/lib/string.c u-boot/lib/string.c
---- u-boot-2015.01-rc3/lib/string.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/lib/string.c	2015-01-01 17:34:32.861493284 +0100
-@@ -102,6 +102,31 @@
- }
- #endif
- 
-+#ifndef __HAVE_ARCH_STRLCPY
-+/**
-+ * strlcpy - Copy a C-string into a sized buffer
-+ * @dest: Where to copy the string to
-+ * @src: Where to copy the string from
-+ * @size: size of destination buffer
-+ *
-+ * Compatible with *BSD: the result is always a valid
-+ * NUL-terminated string that fits in the buffer (unless,
-+ * of course, the buffer size is zero). It does not pad
-+ * out the result like strncpy() does.
-+ */
-+size_t strlcpy(char *dest, const char *src, size_t size)
-+{
-+	size_t ret = strlen(src);
-+
-+	if (size) {
-+		size_t len = (ret >= size) ? size - 1 : ret;
-+		memcpy(dest, src, len);
-+		dest[len] = '\0';
-+	}
-+	return ret;
-+}
-+#endif
-+
- #ifndef __HAVE_ARCH_STRCAT
- /**
-  * strcat - Append one %NUL-terminated string to another
-diff -ruN u-boot-2015.01-rc3/MAINTAINERS u-boot/MAINTAINERS
---- u-boot-2015.01-rc3/MAINTAINERS	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/MAINTAINERS	2015-01-01 17:34:31.981507711 +0100
-@@ -128,6 +128,12 @@
- F:	arch/arm/cpu/arm926ejs/spear/
- F:	arch/arm/include/asm/arch-spear/
- 
-+ARM STM STV0991
-+M:	Vikas Manocha <vikas.manocha at st.com>
-+S:	Maintained
-+F:	arch/arm/cpu/armv7/stv0991/
-+F:	arch/arm/include/asm/arch-stv0991/
-+
- ARM SUNXI
- M:	Ian Campbell <ijc at hellion.org.uk>
- M:	Hans De Goede <hdegoede at redhat.com>
-diff -ruN u-boot-2015.01-rc3/Makefile u-boot/Makefile
---- u-boot-2015.01-rc3/Makefile	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/Makefile	2015-01-01 17:34:31.981507711 +0100
-@@ -1,7 +1,7 @@
- VERSION = 2015
- PATCHLEVEL = 01
- SUBLEVEL =
--EXTRAVERSION = -rc3
-+EXTRAVERSION = -rc4
- NAME =
- 
- # *DOCUMENTATION*
-@@ -946,27 +946,43 @@
- ifneq ($(CONFIG_X86_RESET_VECTOR),)
- rom: u-boot.rom FORCE
- 
--u-boot.rom: u-boot-x86-16bit.bin u-boot-dtb.bin \
--		$(srctree)/board/$(BOARDDIR)/mrc.bin
--	$(objtree)/tools/ifdtool -c -r $(CONFIG_ROM_SIZE) u-boot.tmp
--	if [ -n "$(CONFIG_HAVE_INTEL_ME)" ]; then \
--		$(objtree)/tools/ifdtool -D \
--			$(srctree)/board/$(BOARDDIR)/descriptor.bin u-boot.tmp; \
--		$(objtree)/tools/ifdtool \
--			-i ME:$(srctree)/board/$(BOARDDIR)/me.bin u-boot.tmp; \
--	fi
--	$(objtree)/tools/ifdtool -w \
--		$(CONFIG_SYS_TEXT_BASE):$(objtree)/u-boot-dtb.bin u-boot.tmp
--	$(objtree)/tools/ifdtool -w \
--		$(CONFIG_X86_MRC_START):$(srctree)/board/$(BOARDDIR)/mrc.bin \
--		u-boot.tmp
--	$(objtree)/tools/ifdtool -w \
--		$(CONFIG_SYS_X86_START16):$(objtree)/u-boot-x86-16bit.bin \
--		u-boot.tmp
--	$(objtree)/tools/ifdtool -w \
--		$(CONFIG_X86_OPTION_ROM_ADDR):$(srctree)/board/$(BOARDDIR)/$(CONFIG_X86_OPTION_ROM_FILENAME) \
--		u-boot.tmp
--	mv u-boot.tmp $@
-+IFDTOOL=$(objtree)/tools/ifdtool
-+IFDTOOL_FLAGS  = -f 0:$(objtree)/u-boot.dtb
-+IFDTOOL_FLAGS += -m 0x$(shell $(NM) u-boot |grep _dt_ucode_base_size |cut -d' ' -f1)
-+IFDTOOL_FLAGS += -U $(CONFIG_SYS_TEXT_BASE):$(objtree)/u-boot.bin
-+IFDTOOL_FLAGS += -w $(CONFIG_SYS_X86_START16):$(objtree)/u-boot-x86-16bit.bin
-+
-+ifneq ($(CONFIG_HAVE_INTEL_ME),)
-+IFDTOOL_ME_FLAGS  = -D $(srctree)/board/$(BOARDDIR)/descriptor.bin
-+IFDTOOL_ME_FLAGS += -i ME:$(srctree)/board/$(BOARDDIR)/me.bin
-+endif
-+
-+ifneq ($(CONFIG_HAVE_MRC),)
-+IFDTOOL_FLAGS += -w $(CONFIG_X86_MRC_ADDR):$(srctree)/board/$(BOARDDIR)/mrc.bin
-+endif
-+
-+ifneq ($(CONFIG_HAVE_FSP),)
-+IFDTOOL_FLAGS += -w $(CONFIG_FSP_ADDR):$(srctree)/board/$(BOARDDIR)/$(CONFIG_FSP_FILE)
-+endif
-+
-+ifneq ($(CONFIG_HAVE_CMC),)
-+IFDTOOL_FLAGS += -w $(CONFIG_CMC_ADDR):$(srctree)/board/$(BOARDDIR)/$(CONFIG_CMC_FILE)
-+endif
-+
-+ifneq ($(CONFIG_X86_OPTION_ROM_ADDR),)
-+IFDTOOL_FLAGS += -w $(CONFIG_X86_OPTION_ROM_ADDR):$(srctree)/board/$(BOARDDIR)/$(CONFIG_X86_OPTION_ROM_FILE)
-+endif
-+
-+quiet_cmd_ifdtool = IFDTOOL $@
-+cmd_ifdtool  = $(IFDTOOL) -c -r $(CONFIG_ROM_SIZE) u-boot.tmp;
-+ifneq ($(CONFIG_HAVE_INTEL_ME),)
-+cmd_ifdtool += $(IFDTOOL) $(IFDTOOL_ME_FLAGS) u-boot.tmp;
-+endif
-+cmd_ifdtool += $(IFDTOOL) $(IFDTOOL_FLAGS) u-boot.tmp;
-+cmd_ifdtool += mv u-boot.tmp $@
-+
-+u-boot.rom: u-boot-x86-16bit.bin u-boot-dtb.bin
-+	$(call if_changed,ifdtool)
- 
- OBJCOPYFLAGS_u-boot-x86-16bit.bin := -O binary -j .start16 -j .resetvec
- u-boot-x86-16bit.bin: u-boot FORCE
-@@ -999,15 +1015,22 @@
- #concatenated with u-boot binary. It is need by PowerPC SoC having
- #internal SRAM <= 512KB.
- MKIMAGEFLAGS_u-boot-spl.pbl = -n $(srctree)/$(CONFIG_SYS_FSL_PBL_RCW:"%"=%) \
--		-R $(srctree)/$(CONFIG_SYS_FSL_PBL_PBI:"%"=%) -T pblimage
-+		-R $(srctree)/$(CONFIG_SYS_FSL_PBL_PBI:"%"=%) -T pblimage \
-+		-A $(ARCH) -a $(CONFIG_SPL_TEXT_BASE)
- 
- spl/u-boot-spl.pbl: spl/u-boot-spl.bin FORCE
- 	$(call if_changed,mkimage)
- 
-+ifeq ($(ARCH),arm)
-+UBOOT_BINLOAD := u-boot.img
-+else
-+UBOOT_BINLOAD := u-boot.bin
-+endif
-+
- OBJCOPYFLAGS_u-boot-with-spl-pbl.bin = -I binary -O binary --pad-to=$(CONFIG_SPL_PAD_TO) \
- 			  --gap-fill=0xff
- 
--u-boot-with-spl-pbl.bin: spl/u-boot-spl.pbl u-boot.bin FORCE
-+u-boot-with-spl-pbl.bin: spl/u-boot-spl.pbl $(UBOOT_BINLOAD) FORCE
- 	$(call if_changed,pad_cat)
- 
- # PPC4xx needs the SPL at the end of the image, since the reset vector
-diff -ruN u-boot-2015.01-rc3/README u-boot/README
---- u-boot-2015.01-rc3/README	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/README	2015-01-01 17:34:31.985507645 +0100
-@@ -1773,6 +1773,15 @@
- 		regarding the non-volatile storage device. Define this to
- 		the eMMC device that fastboot should use to store the image.
- 
-+		CONFIG_FASTBOOT_GPT_NAME
-+		The fastboot "flash" command supports writing the downloaded
-+		image to the Protective MBR and the Primary GUID Partition
-+		Table. (Additionally, this downloaded image is post-processed
-+		to generate and write the Backup GUID Partition Table.)
-+		This occurs when the specified "partition name" on the
-+		"fastboot flash" command line matches this value.
-+		Default is GPT_ENTRY_NAME (currently "gpt") if undefined.
-+
- - Journaling Flash filesystem support:
- 		CONFIG_JFFS2_NAND, CONFIG_JFFS2_NAND_OFF, CONFIG_JFFS2_NAND_SIZE,
- 		CONFIG_JFFS2_NAND_DEV
-diff -ruN u-boot-2015.01-rc3/scripts/binutils-version.sh u-boot/scripts/binutils-version.sh
---- u-boot-2015.01-rc3/scripts/binutils-version.sh	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/scripts/binutils-version.sh	2015-01-01 17:34:32.877493022 +0100
-@@ -14,7 +14,9 @@
- 	exit 1
- fi
- 
--MAJOR=$($gas --version | head -1 | awk '{print $NF}' | cut -d . -f 1)
--MINOR=$($gas --version | head -1 | awk '{print $NF}' | cut -d . -f 2)
-+version_string=$($gas --version | head -1 | sed -e 's/.*) *\([0-9.]*\).*/\1/' )
-+
-+MAJOR=$(echo $version_string | cut -d . -f 1)
-+MINOR=$(echo $version_string | cut -d . -f 2)
- 
- printf "%02d%02d\\n" $MAJOR $MINOR
-diff -ruN u-boot-2015.01-rc3/snapshot.commit u-boot/snapshot.commit
---- u-boot-2015.01-rc3/snapshot.commit	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/snapshot.commit	2015-01-01 17:34:32.885492891 +0100
-@@ -1 +1 @@
--32fdf0e4d82bdca5d64d86330e461e59685f9959  Mon, 8 Dec 2014 16:35:08 -0500
-+$Format:%H  %cD$
-diff -ruN u-boot-2015.01-rc3/test/dm/cmd_dm.c u-boot/test/dm/cmd_dm.c
---- u-boot-2015.01-rc3/test/dm/cmd_dm.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/test/dm/cmd_dm.c	2015-01-01 17:34:32.885492891 +0100
-@@ -16,17 +16,65 @@
- #include <dm/test.h>
- #include <dm/uclass-internal.h>
- 
-+static void show_devices(struct udevice *dev, int depth, int last_flag)
-+{
-+	int i, is_last;
-+	struct udevice *child;
-+	char class_name[12];
-+
-+	/* print the first 11 characters to not break the tree-format. */
-+	strlcpy(class_name, dev->uclass->uc_drv->name, sizeof(class_name));
-+	printf(" %-11s [ %c ]    ", class_name,
-+	       dev->flags & DM_FLAG_ACTIVATED ? '+' : ' ');
-+
-+	for (i = depth; i >= 0; i--) {
-+		is_last = (last_flag >> i) & 1;
-+		if (i) {
-+			if (is_last)
-+				printf("    ");
-+			else
-+				printf("|   ");
-+		} else {
-+			if (is_last)
-+				printf("`-- ");
-+			else
-+				printf("|-- ");
-+		}
-+	}
-+
-+	printf("%s\n", dev->name);
-+
-+	list_for_each_entry(child, &dev->child_head, sibling_node) {
-+		is_last = list_is_last(&child->sibling_node, &dev->child_head);
-+		show_devices(child, depth + 1, (last_flag << 1) | is_last);
-+	}
-+}
-+
-+static int do_dm_dump_all(cmd_tbl_t *cmdtp, int flag, int argc,
-+			  char * const argv[])
-+{
-+	struct udevice *root;
-+
-+	root = dm_root();
-+	if (root) {
-+		printf(" Class       Probed   Name\n");
-+		printf("----------------------------------------\n");
-+		show_devices(root, -1, 0);
-+	}
-+
-+	return 0;
-+}
-+
- /**
-  * dm_display_line() - Display information about a single device
-  *
-  * Displays a single line of information with an option prefix
-  *
-  * @dev:	Device to display
-- * @buf:	Prefix to display at the start of the line
-  */
--static void dm_display_line(struct udevice *dev, char *buf)
-+static void dm_display_line(struct udevice *dev)
- {
--	printf("%s- %c %s @ %08lx", buf,
-+	printf("- %c %s @ %08lx",
- 	       dev->flags & DM_FLAG_ACTIVATED ? '*' : ' ',
- 	       dev->name, (ulong)map_to_sysmem(dev));
- 	if (dev->req_seq != -1)
-@@ -34,53 +82,6 @@
- 	puts("\n");
- }
- 
--static int display_succ(struct udevice *in, char *buf)
--{
--	int len;
--	int ip = 0;
--	char local[16];
--	struct udevice *pos, *n, *prev = NULL;
--
--	dm_display_line(in, buf);
--
--	if (list_empty(&in->child_head))
--		return 0;
--
--	len = strlen(buf);
--	strncpy(local, buf, sizeof(local));
--	snprintf(local + len, 2, "|");
--	if (len && local[len - 1] == '`')
--		local[len - 1] = ' ';
--
--	list_for_each_entry_safe(pos, n, &in->child_head, sibling_node) {
--		if (ip++)
--			display_succ(prev, local);
--		prev = pos;
--	}
--
--	snprintf(local + len, 2, "`");
--	display_succ(prev, local);
--
--	return 0;
--}
--
--static int dm_dump(struct udevice *dev)
--{
--	if (!dev)
--		return -EINVAL;
--	return display_succ(dev, "");
--}
--
--static int do_dm_dump_all(cmd_tbl_t *cmdtp, int flag, int argc,
--			  char * const argv[])
--{
--	struct udevice *root;
--
--	root = dm_root();
--	printf("ROOT %08lx\n", (ulong)map_to_sysmem(root));
--	return dm_dump(root);
--}
--
- static int do_dm_dump_uclass(cmd_tbl_t *cmdtp, int flag, int argc,
- 			     char * const argv[])
- {
-@@ -99,7 +100,7 @@
- 		if (list_empty(&uc->dev_head))
- 			continue;
- 		list_for_each_entry(dev, &uc->dev_head, uclass_node) {
--			dm_display_line(dev, "");
-+			dm_display_line(dev);
- 		}
- 		puts("\n");
- 	}
-diff -ruN u-boot-2015.01-rc3/test/dm/i2c.c u-boot/test/dm/i2c.c
---- u-boot-2015.01-rc3/test/dm/i2c.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/test/dm/i2c.c	2015-01-01 17:34:32.885492891 +0100
-@@ -0,0 +1,216 @@
-+/*
-+ * Copyright (C) 2013 Google, Inc
-+ *
-+ * SPDX-License-Identifier:	GPL-2.0+
-+ *
-+ * Note: Test coverage does not include 10-bit addressing
-+ */
-+
-+#include <common.h>
-+#include <dm.h>
-+#include <fdtdec.h>
-+#include <i2c.h>
-+#include <dm/device-internal.h>
-+#include <dm/test.h>
-+#include <dm/uclass-internal.h>
-+#include <dm/ut.h>
-+#include <dm/util.h>
-+#include <asm/state.h>
-+#include <asm/test.h>
-+
-+static const int busnum;
-+static const int chip = 0x2c;
-+
-+/* Test that we can find buses and chips */
-+static int dm_test_i2c_find(struct dm_test_state *dms)
-+{
-+	struct udevice *bus, *dev;
-+	const int no_chip = 0x10;
-+
-+	ut_asserteq(-ENODEV, uclass_find_device_by_seq(UCLASS_I2C, busnum,
-+						       false, &bus));
-+
-+	/*
-+	 * i2c_post_bind() will bind devices to chip selects. Check this then
-+	 * remove the emulation and the slave device.
-+	 */
-+	ut_assertok(uclass_get_device_by_seq(UCLASS_I2C, busnum, &bus));
-+	ut_assertok(i2c_probe(bus, chip, 0, &dev));
-+	ut_asserteq(-ENODEV, i2c_probe(bus, no_chip, 0, &dev));
-+	ut_asserteq(-ENODEV, uclass_get_device_by_seq(UCLASS_I2C, 1, &bus));
-+
-+	return 0;
-+}
-+DM_TEST(dm_test_i2c_find, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
-+
-+static int dm_test_i2c_read_write(struct dm_test_state *dms)
-+{
-+	struct udevice *bus, *dev;
-+	uint8_t buf[5];
-+
-+	ut_assertok(uclass_get_device_by_seq(UCLASS_I2C, busnum, &bus));
-+	ut_assertok(i2c_get_chip(bus, chip, &dev));
-+	ut_assertok(i2c_read(dev, 0, buf, 5));
-+	ut_assertok(memcmp(buf, "\0\0\0\0\0", sizeof(buf)));
-+	ut_assertok(i2c_write(dev, 2, (uint8_t *)"AB", 2));
-+	ut_assertok(i2c_read(dev, 0, buf, 5));
-+	ut_assertok(memcmp(buf, "\0\0AB\0", sizeof(buf)));
-+
-+	return 0;
-+}
-+DM_TEST(dm_test_i2c_read_write, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
-+
-+static int dm_test_i2c_speed(struct dm_test_state *dms)
-+{
-+	struct udevice *bus, *dev;
-+	uint8_t buf[5];
-+
-+	ut_assertok(uclass_get_device_by_seq(UCLASS_I2C, busnum, &bus));
-+	ut_assertok(i2c_get_chip(bus, chip, &dev));
-+	ut_assertok(i2c_set_bus_speed(bus, 100000));
-+	ut_assertok(i2c_read(dev, 0, buf, 5));
-+	ut_assertok(i2c_set_bus_speed(bus, 400000));
-+	ut_asserteq(400000, i2c_get_bus_speed(bus));
-+	ut_assertok(i2c_read(dev, 0, buf, 5));
-+	ut_asserteq(-EINVAL, i2c_write(dev, 0, buf, 5));
-+
-+	return 0;
-+}
-+DM_TEST(dm_test_i2c_speed, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
-+
-+static int dm_test_i2c_offset_len(struct dm_test_state *dms)
-+{
-+	struct udevice *bus, *dev;
-+	uint8_t buf[5];
-+
-+	ut_assertok(uclass_get_device_by_seq(UCLASS_I2C, busnum, &bus));
-+	ut_assertok(i2c_get_chip(bus, chip, &dev));
-+	ut_assertok(i2c_set_chip_offset_len(dev, 1));
-+	ut_assertok(i2c_read(dev, 0, buf, 5));
-+
-+	/* This is not supported by the uclass */
-+	ut_asserteq(-EINVAL, i2c_set_chip_offset_len(dev, 5));
-+
-+	return 0;
-+}
-+DM_TEST(dm_test_i2c_offset_len, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
-+
-+static int dm_test_i2c_probe_empty(struct dm_test_state *dms)
-+{
-+	struct udevice *bus, *dev;
-+
-+	ut_assertok(uclass_get_device_by_seq(UCLASS_I2C, busnum, &bus));
-+	ut_assertok(i2c_probe(bus, SANDBOX_I2C_TEST_ADDR, 0, &dev));
-+
-+	return 0;
-+}
-+DM_TEST(dm_test_i2c_probe_empty, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
-+
-+static int dm_test_i2c_bytewise(struct dm_test_state *dms)
-+{
-+	struct udevice *bus, *dev;
-+	struct udevice *eeprom;
-+	uint8_t buf[5];
-+
-+	ut_assertok(uclass_get_device_by_seq(UCLASS_I2C, busnum, &bus));
-+	ut_assertok(i2c_get_chip(bus, chip, &dev));
-+	ut_assertok(i2c_read(dev, 0, buf, 5));
-+	ut_assertok(memcmp(buf, "\0\0\0\0\0", sizeof(buf)));
-+
-+	/* Tell the EEPROM to only read/write one register at a time */
-+	ut_assertok(uclass_first_device(UCLASS_I2C_EMUL, &eeprom));
-+	ut_assertnonnull(eeprom);
-+	sandbox_i2c_eeprom_set_test_mode(eeprom, SIE_TEST_MODE_SINGLE_BYTE);
-+
-+	/* Now we only get the first byte - the rest will be 0xff */
-+	ut_assertok(i2c_read(dev, 0, buf, 5));
-+	ut_assertok(memcmp(buf, "\0\xff\xff\xff\xff", sizeof(buf)));
-+
-+	/* If we do a separate transaction for each byte, it works */
-+	ut_assertok(i2c_set_chip_flags(dev, DM_I2C_CHIP_RD_ADDRESS));
-+	ut_assertok(i2c_read(dev, 0, buf, 5));
-+	ut_assertok(memcmp(buf, "\0\0\0\0\0", sizeof(buf)));
-+
-+	/* This will only write A */
-+	ut_assertok(i2c_set_chip_flags(dev, 0));
-+	ut_assertok(i2c_write(dev, 2, (uint8_t *)"AB", 2));
-+	ut_assertok(i2c_read(dev, 0, buf, 5));
-+	ut_assertok(memcmp(buf, "\0\xff\xff\xff\xff", sizeof(buf)));
-+
-+	/* Check that the B was ignored */
-+	ut_assertok(i2c_set_chip_flags(dev, DM_I2C_CHIP_RD_ADDRESS));
-+	ut_assertok(i2c_read(dev, 0, buf, 5));
-+	ut_assertok(memcmp(buf, "\0\0A\0\0\0", sizeof(buf)));
-+
-+	/* Now write it again with the new flags, it should work */
-+	ut_assertok(i2c_set_chip_flags(dev, DM_I2C_CHIP_WR_ADDRESS));
-+	ut_assertok(i2c_write(dev, 2, (uint8_t *)"AB", 2));
-+	ut_assertok(i2c_read(dev, 0, buf, 5));
-+	ut_assertok(memcmp(buf, "\0\xff\xff\xff\xff", sizeof(buf)));
-+
-+	ut_assertok(i2c_set_chip_flags(dev, DM_I2C_CHIP_WR_ADDRESS |
-+						DM_I2C_CHIP_RD_ADDRESS));
-+	ut_assertok(i2c_read(dev, 0, buf, 5));
-+	ut_assertok(memcmp(buf, "\0\0AB\0\0", sizeof(buf)));
-+
-+	/* Restore defaults */
-+	sandbox_i2c_eeprom_set_test_mode(eeprom, SIE_TEST_MODE_NONE);
-+	ut_assertok(i2c_set_chip_flags(dev, 0));
-+
-+	return 0;
-+}
-+DM_TEST(dm_test_i2c_bytewise, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
-+
-+static int dm_test_i2c_offset(struct dm_test_state *dms)
-+{
-+	struct udevice *eeprom;
-+	struct udevice *dev;
-+	uint8_t buf[5];
-+
-+	ut_assertok(i2c_get_chip_for_busnum(busnum, chip, &dev));
-+
-+	/* Do a transfer so we can find the emulator */
-+	ut_assertok(i2c_read(dev, 0, buf, 5));
-+	ut_assertok(uclass_first_device(UCLASS_I2C_EMUL, &eeprom));
-+
-+	/* Offset length 0 */
-+	sandbox_i2c_eeprom_set_offset_len(eeprom, 0);
-+	ut_assertok(i2c_set_chip_offset_len(dev, 0));
-+	ut_assertok(i2c_write(dev, 10 /* ignored */, (uint8_t *)"AB", 2));
-+	ut_assertok(i2c_read(dev, 0, buf, 5));
-+	ut_assertok(memcmp(buf, "AB\0\0\0\0", sizeof(buf)));
-+
-+	/* Offset length 1 */
-+	sandbox_i2c_eeprom_set_offset_len(eeprom, 1);
-+	ut_assertok(i2c_set_chip_offset_len(dev, 1));
-+	ut_assertok(i2c_write(dev, 2, (uint8_t *)"AB", 2));
-+	ut_assertok(i2c_read(dev, 0, buf, 5));
-+	ut_assertok(memcmp(buf, "ABAB\0", sizeof(buf)));
-+
-+	/* Offset length 2 */
-+	sandbox_i2c_eeprom_set_offset_len(eeprom, 2);
-+	ut_assertok(i2c_set_chip_offset_len(dev, 2));
-+	ut_assertok(i2c_write(dev, 0x210, (uint8_t *)"AB", 2));
-+	ut_assertok(i2c_read(dev, 0x210, buf, 5));
-+	ut_assertok(memcmp(buf, "AB\0\0\0", sizeof(buf)));
-+
-+	/* Offset length 3 */
-+	sandbox_i2c_eeprom_set_offset_len(eeprom, 2);
-+	ut_assertok(i2c_set_chip_offset_len(dev, 2));
-+	ut_assertok(i2c_write(dev, 0x410, (uint8_t *)"AB", 2));
-+	ut_assertok(i2c_read(dev, 0x410, buf, 5));
-+	ut_assertok(memcmp(buf, "AB\0\0\0", sizeof(buf)));
-+
-+	/* Offset length 4 */
-+	sandbox_i2c_eeprom_set_offset_len(eeprom, 2);
-+	ut_assertok(i2c_set_chip_offset_len(dev, 2));
-+	ut_assertok(i2c_write(dev, 0x420, (uint8_t *)"AB", 2));
-+	ut_assertok(i2c_read(dev, 0x420, buf, 5));
-+	ut_assertok(memcmp(buf, "AB\0\0\0", sizeof(buf)));
-+
-+	/* Restore defaults */
-+	sandbox_i2c_eeprom_set_offset_len(eeprom, 1);
-+
-+	return 0;
-+}
-+DM_TEST(dm_test_i2c_offset, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
-diff -ruN u-boot-2015.01-rc3/test/dm/Makefile u-boot/test/dm/Makefile
---- u-boot-2015.01-rc3/test/dm/Makefile	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/test/dm/Makefile	2015-01-01 17:34:32.885492891 +0100
-@@ -20,4 +20,5 @@
- obj-$(CONFIG_DM_GPIO) += gpio.o
- obj-$(CONFIG_DM_SPI) += spi.o
- obj-$(CONFIG_DM_SPI_FLASH) += sf.o
-+obj-$(CONFIG_DM_I2C) += i2c.o
- endif
-diff -ruN u-boot-2015.01-rc3/test/dm/test.dts u-boot/test/dm/test.dts
---- u-boot-2015.01-rc3/test/dm/test.dts	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/test/dm/test.dts	2015-01-01 17:34:32.885492891 +0100
-@@ -93,6 +93,23 @@
- 		num-gpios = <10>;
- 	};
- 
-+	i2c at 0 {
-+		#address-cells = <1>;
-+		#size-cells = <0>;
-+		reg = <0>;
-+		compatible = "sandbox,i2c";
-+		clock-frequency = <100000>;
-+		eeprom at 2c {
-+			reg = <0x2c>;
-+			compatible = "i2c-eeprom";
-+			emul {
-+				compatible = "sandbox,i2c-eeprom";
-+				sandbox,filename = "i2c.bin";
-+				sandbox,size = <256>;
-+			};
-+		};
-+	};
-+
- 	spi at 0 {
- 		#address-cells = <1>;
- 		#size-cells = <0>;
-diff -ruN u-boot-2015.01-rc3/test/ums/ums_gadget_test.sh u-boot/test/ums/ums_gadget_test.sh
---- u-boot-2015.01-rc3/test/ums/ums_gadget_test.sh	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/test/ums/ums_gadget_test.sh	2015-01-01 17:34:32.885492891 +0100
-@@ -11,6 +11,7 @@
- 
- COLOUR_RED="\33[31m"
- COLOUR_GREEN="\33[32m"
-+COLOUR_ORANGE="\33[33m"
- COLOUR_DEFAULT="\33[0m"
- 
- DIR=./
-@@ -59,8 +60,15 @@
-     fi
- 
-     cp ./$1 $MNT_DIR
--    umount $MNT_DIR
- 
-+    while true; do
-+	umount $MNT_DIR > /dev/null 2>&1
-+	if [ $? -eq 0 ]; then
-+	    break
-+	fi
-+	printf "$COLOUR_ORANGE\tSleeping to wait for umount...$COLOUR_DEFAULT\n"
-+	sleep 1
-+    done
- 
-     echo -n "TX: "
-     calculate_md5sum $1
-diff -ruN u-boot-2015.01-rc3/tools/buildman/README u-boot/tools/buildman/README
---- u-boot-2015.01-rc3/tools/buildman/README	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/tools/buildman/README	2015-01-01 17:34:32.885492891 +0100
-@@ -42,7 +42,7 @@
- Buildman is a builder. It is not make, although it runs make. It does not
- produce any useful output on the terminal while building, except for
- progress information (except with -v, see below). All the output (errors,
--warnings and binaries if you are ask for them) is stored in output
-+warnings and binaries if you ask for them) is stored in output
- directories, which you can look at while the build is progressing, or when
- it is finished.
- 
-@@ -121,7 +121,7 @@
- means to build all arm boards except nvidia, freescale and anything ending
- with 'ball'.
- 
--It is convenient to use the -n option to see whaat will be built based on
-+It is convenient to use the -n option to see what will be built based on
- the subset given.
- 
- Buildman does not store intermediate object files. It optionally copies
-@@ -371,7 +371,7 @@
- 
- 
- To find out how the build went, ask for a summary with -s. You can do this
--either before the build completes (presumably in another terminal) or or
-+either before the build completes (presumably in another terminal) or
- afterwards. Let's work through an example of how this is used:
- 
- $ ./tools/buildman/buildman -b lcd9b -s
-@@ -439,7 +439,7 @@
- 
- At commit 16, the error moves - you can see that the old error at line 120
- is fixed, but there is a new one at line 126. This is probably only because
--we added some code and moved the broken line father down the file.
-+we added some code and moved the broken line further down the file.
- 
- If many boards have the same error, then -e will display the error only
- once. This makes the output as concise as possible. To see which boards have
-@@ -647,8 +647,8 @@
- board was built) and by 96 bytes for powerpc. This increase was offset in both
- cases by reductions in rodata and data/bss.
- 
--Shown below the summary lines is the sizes for each board. Below each board
--is the sizes for each function. This information starts with:
-+Shown below the summary lines are the sizes for each board. Below each board
-+are the sizes for each function. This information starts with:
- 
-    add - number of functions added / removed
-    grow - number of functions which grew / shrunk
-@@ -817,7 +817,7 @@
- This has mostly be written in my spare time as a response to my difficulties
- in testing large series of patches. Apart from tidying up there is quite a
- bit of scope for improvement. Things like better error diffs and easier
--access to log files. Also it would be nice it buildman could 'hunt' for
-+access to log files. Also it would be nice if buildman could 'hunt' for
- problems, perhaps by building a few boards for each arch, or checking
- commits for changed files and building only boards which use those files.
- 
-diff -ruN u-boot-2015.01-rc3/tools/ifdtool.c u-boot/tools/ifdtool.c
---- u-boot-2015.01-rc3/tools/ifdtool.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/tools/ifdtool.c	2015-01-01 17:34:32.893492759 +0100
-@@ -18,6 +18,7 @@
- #include <unistd.h>
- #include <sys/types.h>
- #include <sys/stat.h>
-+#include <libfdt.h>
- #include "ifdtool.h"
- 
- #undef DEBUG
-@@ -32,6 +33,18 @@
- #define FLREG_BASE(reg)		((reg & 0x00000fff) << 12);
- #define FLREG_LIMIT(reg)	(((reg & 0x0fff0000) >> 4) | 0xfff);
- 
-+enum input_file_type_t {
-+	IF_normal,
-+	IF_fdt,
-+	IF_uboot,
-+};
-+
-+struct input_file {
-+	char *fname;
-+	unsigned int addr;
-+	enum input_file_type_t type;
-+};
-+
- /**
-  * find_fd() - Find the flash description in the ROM image
-  *
-@@ -54,7 +67,8 @@
- 		return NULL;
- 	}
- 
--	debug("Found Flash Descriptor signature at 0x%08x\n", i);
-+	debug("Found Flash Descriptor signature at 0x%08lx\n",
-+	      (char *)ptr - image);
- 
- 	return (struct fdbar_t *)ptr;
- }
-@@ -464,6 +478,16 @@
- 	return ret;
- }
- 
-+static int perror_fname(const char *fmt, const char *fname)
-+{
-+	char msg[strlen(fmt) + strlen(fname) + 1];
-+
-+	sprintf(msg, fmt, fname);
-+	perror(msg);
-+
-+	return -1;
-+}
-+
- /**
-  * write_image() - Write the image to a file
-  *
-@@ -480,10 +504,10 @@
- 
- 	new_fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR |
- 		      S_IWUSR | S_IRGRP | S_IROTH);
--	if (write(new_fd, image, size) != size) {
--		perror("Error while writing");
--		return -1;
--	}
-+	if (new_fd < 0)
-+		return perror_fname("Could not open file '%s'", filename);
-+	if (write(new_fd, image, size) != size)
-+		return perror_fname("Could not write file '%s'", filename);
- 	close(new_fd);
- 
- 	return 0;
-@@ -585,14 +609,10 @@
- 	int fd = open(fname, O_RDONLY);
- 	struct stat buf;
- 
--	if (fd == -1) {
--		perror("Could not open file");
--		return -1;
--	}
--	if (fstat(fd, &buf) == -1) {
--		perror("Could not stat file");
--		return -1;
--	}
-+	if (fd == -1)
-+		return perror_fname("Could not open file '%s'", fname);
-+	if (fstat(fd, &buf) == -1)
-+		return perror_fname("Could not stat file '%s'", fname);
- 	*sizep = buf.st_size;
- 	debug("File %s is %d bytes\n", fname, *sizep);
- 
-@@ -686,7 +706,7 @@
-  *			0xffffffff so use an address relative to that. For an
-  *			8MB ROM the start address is 0xfff80000.
-  * @write_fname:	Filename to add to the image
-- * @return 0 if OK, -ve on error
-+ * @return number of bytes written if OK, -ve on error
-  */
- static int write_data(char *image, int size, unsigned int addr,
- 		      const char *write_fname)
-@@ -698,7 +718,7 @@
- 	if (write_fd < 0)
- 		return write_fd;
- 
--	offset = addr + size;
-+	offset = (uint32_t)(addr + size);
- 	debug("Writing %s to offset %#x\n", write_fname, offset);
- 
- 	if (offset < 0 || offset + write_size > size) {
-@@ -714,6 +734,68 @@
- 
- 	close(write_fd);
- 
-+	return write_size;
-+}
-+
-+/**
-+ * write_uboot() - Write U-Boot, device tree and microcode pointer
-+ *
-+ * This writes U-Boot into a place in the flash, followed by its device tree.
-+ * The microcode pointer is written so that U-Boot can find the microcode in
-+ * the device tree very early in boot.
-+ *
-+ * @image:	Pointer to image
-+ * @size:	Size of image in bytes
-+ * @uboot:	Input file information for u-boot.bin
-+ * @fdt:	Input file information for u-boot.dtb
-+ * @ucode_ptr:	Address in U-Boot where the microcode pointer should be placed
-+ * @return 0 if OK, -ve on error
-+ */
-+static int write_uboot(char *image, int size, struct input_file *uboot,
-+		       struct input_file *fdt, unsigned int ucode_ptr)
-+{
-+	const void *blob;
-+	const char *data;
-+	int uboot_size;
-+	uint32_t *ptr;
-+	int data_size;
-+	int offset;
-+	int node;
-+	int ret;
-+
-+	uboot_size = write_data(image, size, uboot->addr, uboot->fname);
-+	if (uboot_size < 0)
-+		return uboot_size;
-+	fdt->addr = uboot->addr + uboot_size;
-+	debug("U-Boot size %#x, FDT at %#x\n", uboot_size, fdt->addr);
-+	ret = write_data(image, size, fdt->addr, fdt->fname);
-+	if (ret < 0)
-+		return ret;
-+
-+	if (ucode_ptr) {
-+		blob = (void *)image + (uint32_t)(fdt->addr + size);
-+		debug("DTB at %lx\n", (char *)blob - image);
-+		node = fdt_node_offset_by_compatible(blob, 0,
-+						     "intel,microcode");
-+		if (node < 0) {
-+			debug("No microcode found in FDT: %s\n",
-+			      fdt_strerror(node));
-+			return -ENOENT;
-+		}
-+		data = fdt_getprop(blob, node, "data", &data_size);
-+		if (!data) {
-+			debug("No microcode data found in FDT: %s\n",
-+			      fdt_strerror(data_size));
-+			return -ENOENT;
-+		}
-+		offset = ucode_ptr - uboot->addr;
-+		ptr = (void *)image + offset;
-+		ptr[0] = uboot->addr + (data - image);
-+		ptr[1] = data_size;
-+		debug("Wrote microcode pointer at %x: addr=%x, size=%x\n",
-+		      ucode_ptr, ptr[0], ptr[1]);
-+	}
-+
- 	return 0;
- }
- 
-@@ -732,6 +814,7 @@
- 	       "   -x | --extract:                   extract intel fd modules\n"
- 	       "   -i | --inject <region>:<module>   inject file <module> into region <region>\n"
- 	       "   -w | --write <addr>:<file>        write file to appear at memory address <addr>\n"
-+	       "                                     multiple files can be written simultaneously\n"
- 	       "   -s | --spifreq <20|33|50>         set the SPI frequency\n"
- 	       "   -e | --em100                      set SPI frequency to 20MHz and disable\n"
- 	       "                                     Dual Output Fast Read Support\n"
-@@ -778,17 +861,20 @@
- 	int mode_spifreq = 0, mode_em100 = 0, mode_locked = 0;
- 	int mode_unlocked = 0, mode_write = 0, mode_write_descriptor = 0;
- 	int create = 0;
--	char *region_type_string = NULL, *src_fname = NULL;
--	char *addr_str = NULL;
-+	char *region_type_string = NULL, *inject_fname = NULL;
-+	char *desc_fname = NULL, *addr_str = NULL;
- 	int region_type = -1, inputfreq = 0;
- 	enum spi_frequency spifreq = SPI_FREQUENCY_20MHZ;
--	unsigned int addr = 0;
-+	struct input_file input_file[WRITE_MAX], *ifile, *fdt = NULL;
-+	unsigned char wr_idx, wr_num = 0;
- 	int rom_size = -1;
- 	bool write_it;
- 	char *filename;
- 	char *outfile = NULL;
- 	struct stat buf;
- 	int size = 0;
-+	unsigned int ucode_ptr = 0;
-+	bool have_uboot = false;
- 	int bios_fd;
- 	char *image;
- 	int ret;
-@@ -798,18 +884,21 @@
- 		{"descriptor", 1, NULL, 'D'},
- 		{"em100", 0, NULL, 'e'},
- 		{"extract", 0, NULL, 'x'},
-+		{"fdt", 1, NULL, 'f'},
- 		{"inject", 1, NULL, 'i'},
- 		{"lock", 0, NULL, 'l'},
-+		{"microcode", 1, NULL, 'm'},
- 		{"romsize", 1, NULL, 'r'},
- 		{"spifreq", 1, NULL, 's'},
- 		{"unlock", 0, NULL, 'u'},
-+		{"uboot", 1, NULL, 'U'},
- 		{"write", 1, NULL, 'w'},
- 		{"version", 0, NULL, 'v'},
- 		{"help", 0, NULL, 'h'},
- 		{0, 0, 0, 0}
- 	};
- 
--	while ((opt = getopt_long(argc, argv, "cdD:ehi:lr:s:uvw:x?",
-+	while ((opt = getopt_long(argc, argv, "cdD:ef:hi:lm:r:s:uU:vw:x?",
- 				  long_options, &option_index)) != EOF) {
- 		switch (opt) {
- 		case 'c':
-@@ -820,14 +909,14 @@
- 			break;
- 		case 'D':
- 			mode_write_descriptor = 1;
--			src_fname = optarg;
-+			desc_fname = optarg;
- 			break;
- 		case 'e':
- 			mode_em100 = 1;
- 			break;
- 		case 'i':
- 			if (get_two_words(optarg, &region_type_string,
--					  &src_fname)) {
-+					  &inject_fname)) {
- 				print_usage(argv[0]);
- 				exit(EXIT_FAILURE);
- 			}
-@@ -852,6 +941,9 @@
- 		case 'l':
- 			mode_locked = 1;
- 			break;
-+		case 'm':
-+			ucode_ptr = strtoul(optarg, NULL, 0);
-+			break;
- 		case 'r':
- 			rom_size = strtol(optarg, NULL, 0);
- 			debug("ROM size %d\n", rom_size);
-@@ -885,12 +977,29 @@
- 			exit(EXIT_SUCCESS);
- 			break;
- 		case 'w':
-+		case 'U':
-+		case 'f':
-+			ifile = &input_file[wr_num];
- 			mode_write = 1;
--			if (get_two_words(optarg, &addr_str, &src_fname)) {
--				print_usage(argv[0]);
--				exit(EXIT_FAILURE);
-+			if (wr_num < WRITE_MAX) {
-+				if (get_two_words(optarg, &addr_str,
-+						  &ifile->fname)) {
-+					print_usage(argv[0]);
-+					exit(EXIT_FAILURE);
-+				}
-+				ifile->addr = strtol(optarg, NULL, 0);
-+				ifile->type = opt == 'f' ? IF_fdt :
-+					opt == 'U' ? IF_uboot : IF_normal;
-+				if (ifile->type == IF_fdt)
-+					fdt = ifile;
-+				else if (ifile->type == IF_uboot)
-+					have_uboot = true;
-+				wr_num++;
-+			} else {
-+				fprintf(stderr,
-+					"The number of files to write simultaneously exceeds the limitation (%d)\n",
-+					WRITE_MAX);
- 			}
--			addr = strtol(optarg, NULL, 0);
- 			break;
- 		case 'x':
- 			mode_extract = 1;
-@@ -941,6 +1050,13 @@
- 		exit(EXIT_FAILURE);
- 	}
- 
-+	if (have_uboot && !fdt) {
-+		fprintf(stderr,
-+			"You must supply a device tree file for U-Boot\n\n");
-+		print_usage(argv[0]);
-+		exit(EXIT_FAILURE);
-+	}
-+
- 	filename = argv[optind];
- 	if (optind + 2 != argc)
- 		outfile = argv[optind + 1];
-@@ -997,13 +1113,27 @@
- 	}
- 
- 	if (mode_write_descriptor)
--		ret = write_data(image, size, -size, src_fname);
-+		ret = write_data(image, size, -size, desc_fname);
- 
- 	if (mode_inject)
--		ret = inject_region(image, size, region_type, src_fname);
-+		ret = inject_region(image, size, region_type, inject_fname);
- 
--	if (mode_write)
--		ret = write_data(image, size, addr, src_fname);
-+	if (mode_write) {
-+		for (wr_idx = 0; wr_idx < wr_num; wr_idx++) {
-+			ifile = &input_file[wr_idx];
-+			if (ifile->type == IF_fdt) {
-+				continue;
-+			} else if (ifile->type == IF_uboot) {
-+				ret = write_uboot(image, size, ifile, fdt,
-+						  ucode_ptr);
-+			} else {
-+				ret = write_data(image, size, ifile->addr,
-+					 ifile->fname);
-+			}
-+			if (ret < 0)
-+				break;
-+		}
-+	}
- 
- 	if (mode_spifreq)
- 		set_spi_frequency(image, size, spifreq);
-@@ -1035,5 +1165,5 @@
- 	free(image);
- 	close(bios_fd);
- 
--	return ret ? 1 : 0;
-+	return ret < 0 ? 1 : 0;
- }
-diff -ruN u-boot-2015.01-rc3/tools/ifdtool.h u-boot/tools/ifdtool.h
---- u-boot-2015.01-rc3/tools/ifdtool.h	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/tools/ifdtool.h	2015-01-01 17:34:32.893492759 +0100
-@@ -14,6 +14,8 @@
- 
- #define IFDTOOL_VERSION "1.1-U-Boot"
- 
-+#define WRITE_MAX	16
-+
- enum spi_frequency {
- 	SPI_FREQUENCY_20MHZ = 0,
- 	SPI_FREQUENCY_33MHZ = 1,
-diff -ruN u-boot-2015.01-rc3/tools/Makefile u-boot/tools/Makefile
---- u-boot-2015.01-rc3/tools/Makefile	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/tools/Makefile	2015-01-01 17:34:32.885492891 +0100
-@@ -126,6 +126,7 @@
- hostprogs-$(CONFIG_EXYNOS5420) += mkexynosspl
- HOSTCFLAGS_mkexynosspl.o := -pedantic
- 
-+ifdtool-objs := $(LIBFDT_OBJS) ifdtool.o
- hostprogs-$(CONFIG_X86) += ifdtool
- 
- hostprogs-$(CONFIG_MX23) += mxsboot
-diff -ruN u-boot-2015.01-rc3/tools/microcode-tool u-boot/tools/microcode-tool
---- u-boot-2015.01-rc3/tools/microcode-tool	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/tools/microcode-tool	2015-01-01 17:34:32.897492694 +0100
-@@ -0,0 +1,253 @@
-+#!/usr/bin/env python
-+#
-+# Copyright (c) 2014 Google, Inc
-+#
-+# SPDX-License-Identifier:      GPL-2.0+
-+#
-+# Intel microcode update tool
-+
-+from optparse import OptionParser
-+import os
-+import re
-+import struct
-+import sys
-+
-+MICROCODE_DIR = 'arch/x86/dts/microcode'
-+
-+class Microcode:
-+    """Holds information about the microcode for a particular model of CPU.
-+
-+    Attributes:
-+        name:  Name of the CPU this microcode is for, including any version
-+                   information (e.g. 'm12206a7_00000029')
-+        model: Model code string (this is cpuid(1).eax, e.g. '206a7')
-+        words: List of hex words containing the microcode. The first 16 words
-+                   are the public header.
-+    """
-+    def __init__(self, name, data):
-+        self.name = name
-+        # Convert data into a list of hex words
-+        self.words = []
-+        for value in ''.join(data).split(','):
-+            hexval = value.strip()
-+            if hexval:
-+                self.words.append(int(hexval, 0))
-+
-+        # The model is in the 4rd hex word
-+        self.model = '%x' % self.words[3]
-+
-+def ParseFile(fname):
-+    """Parse a micrcode.dat file and return the component parts
-+
-+    Args:
-+        fname: Filename to parse
-+    Returns:
-+        3-Tuple:
-+            date:         String containing date from the file's header
-+            license_text: List of text lines for the license file
-+            microcodes:   List of Microcode objects from the file
-+    """
-+    re_date = re.compile('/\* *(.* [0-9]{4}) *\*/$')
-+    re_license = re.compile('/[^-*+] *(.*)$')
-+    re_name = re.compile('/\* *(.*)\.inc *\*/', re.IGNORECASE)
-+    microcodes = {}
-+    license_text = []
-+    date = ''
-+    data = []
-+    name = None
-+    with open(fname) as fd:
-+        for line in fd:
-+            line = line.rstrip()
-+            m_date = re_date.match(line)
-+            m_license = re_license.match(line)
-+            m_name = re_name.match(line)
-+            if m_name:
-+                if name:
-+                    microcodes[name] = Microcode(name, data)
-+                name = m_name.group(1).lower()
-+                data = []
-+            elif m_license:
-+                license_text.append(m_license.group(1))
-+            elif m_date:
-+                date = m_date.group(1)
-+            else:
-+                data.append(line)
-+    if name:
-+        microcodes[name] = Microcode(name, data)
-+    return date, license_text, microcodes
-+
-+def List(date, microcodes, model):
-+    """List the available microcode chunks
-+
-+    Args:
-+        date:           Date of the microcode file
-+        microcodes:     Dict of Microcode objects indexed by name
-+        model:          Model string to search for, or None
-+    """
-+    print 'Date: %s' % date
-+    if model:
-+        mcode_list, tried = FindMicrocode(microcodes, model.lower())
-+        print 'Matching models %s:' % (', '.join(tried))
-+    else:
-+        print 'All models:'
-+        mcode_list = [microcodes[m] for m in microcodes.keys()]
-+    for mcode in mcode_list:
-+        print '%-20s: model %s' % (mcode.name, mcode.model)
-+
-+def FindMicrocode(microcodes, model):
-+    """Find all the microcode chunks which match the given model.
-+
-+    This model is something like 306a9 (the value returned in eax from
-+    cpuid(1) when running on Intel CPUs). But we allow a partial match,
-+    omitting the last 1 or two characters to allow many families to have the
-+    same microcode.
-+
-+    If the model name is ambiguous we return a list of matches.
-+
-+    Args:
-+        microcodes: Dict of Microcode objects indexed by name
-+        model:      String containing model name to find
-+    Returns:
-+        Tuple:
-+            List of matching Microcode objects
-+            List of abbreviations we tried
-+    """
-+    # Allow a full name to be used
-+    mcode = microcodes.get(model)
-+    if mcode:
-+        return [mcode], []
-+
-+    tried = []
-+    found = []
-+    for i in range(3):
-+        abbrev = model[:-i] if i else model
-+        tried.append(abbrev)
-+        for mcode in microcodes.values():
-+            if mcode.model.startswith(abbrev):
-+                found.append(mcode)
-+        if found:
-+            break
-+    return found, tried
-+
-+def CreateFile(date, license_text, mcode, outfile):
-+    """Create a microcode file in U-Boot's .dtsi format
-+
-+    Args:
-+        date:       String containing date of original microcode file
-+        license:    List of text lines for the license file
-+        mcode:      Microcode object to write
-+        outfile:    Filename to write to ('-' for stdout)
-+    """
-+    out = '''/*%s
-+ * ---
-+ * This is a device tree fragment. Use #include to add these properties to a
-+ * node.
-+ *
-+ * Date: %s
-+ */
-+
-+compatible = "intel,microcode";
-+intel,header-version = <%d>;
-+intel,update-revision = <%#x>;
-+intel,date-code = <%#x>;
-+intel,processor-signature = <%#x>;
-+intel,checksum = <%#x>;
-+intel,loader-revision = <%d>;
-+intel,processor-flags = <%#x>;
-+
-+/* The first 48-bytes are the public header which repeats the above data */
-+data = <%s
-+\t>;'''
-+    words = ''
-+    for i in range(len(mcode.words)):
-+        if not (i & 3):
-+            words += '\n'
-+        val = mcode.words[i]
-+        # Change each word so it will be little-endian in the FDT
-+        # This data is needed before RAM is available on some platforms so we
-+        # cannot do an endianness swap on boot.
-+        val = struct.unpack("<I", struct.pack(">I", val))[0]
-+        words += '\t%#010x' % val
-+
-+    # Take care to avoid adding a space before a tab
-+    text = ''
-+    for line in license_text:
-+        if line[0] == '\t':
-+            text += '\n *' + line
-+        else:
-+            text += '\n * ' + line
-+    args = [text, date]
-+    args += [mcode.words[i] for i in range(7)]
-+    args.append(words)
-+    if outfile == '-':
-+        print out % tuple(args)
-+    else:
-+        if not outfile:
-+            if not os.path.exists(MICROCODE_DIR):
-+                print >> sys.stderr, "Creating directory '%s'" % MICROCODE_DIR
-+                os.makedirs(MICROCODE_DIR)
-+            outfile = os.path.join(MICROCODE_DIR, mcode.name + '.dtsi')
-+            print >> sys.stderr, "Writing microcode for '%s' to '%s'" % (
-+                     mcode.name, outfile)
-+        with open(outfile, 'w') as fd:
-+            print >> fd, out % tuple(args)
-+
-+def MicrocodeTool():
-+    """Run the microcode tool"""
-+    commands = 'create,license,list'.split(',')
-+    parser = OptionParser()
-+    parser.add_option('-d', '--mcfile', type='string', action='store',
-+                    help='Name of microcode.dat file')
-+    parser.add_option('-m', '--model', type='string', action='store',
-+                    help='Model name to extract')
-+    parser.add_option('-o', '--outfile', type='string', action='store',
-+                    help='Filename to use for output (- for stdout), default is'
-+                    ' %s/<name>.dtsi' % MICROCODE_DIR)
-+    parser.usage += """ command
-+
-+    Process an Intel microcode file (use -h for help). Commands:
-+
-+       create     Create microcode .dtsi file for a model
-+       list       List available models in microcode file
-+       license    Print the license
-+
-+    Typical usage:
-+
-+       ./tools/microcode-tool -d microcode.dat -m 306a create
-+
-+    This will find the appropriate file and write it to %s.""" % MICROCODE_DIR
-+
-+    (options, args) = parser.parse_args()
-+    if not args:
-+        parser.error('Please specify a command')
-+    cmd = args[0]
-+    if cmd not in commands:
-+        parser.error("Unknown command '%s'" % cmd)
-+
-+    if not options.mcfile:
-+        parser.error('You must specify a microcode file')
-+    date, license_text, microcodes = ParseFile(options.mcfile)
-+
-+    if cmd == 'list':
-+        List(date, microcodes, options.model)
-+    elif cmd == 'license':
-+        print '\n'.join(license_text)
-+    elif cmd == 'create':
-+        if not options.model:
-+            parser.error('You must specify a model to create')
-+        model = options.model.lower()
-+        mcode_list, tried = FindMicrocode(microcodes, model)
-+        if not mcode_list:
-+            parser.error("Unknown model '%s' (%s) - try 'list' to list" %
-+                        (model, ', '.join(tried)))
-+        if len(mcode_list) > 1:
-+            parser.error("Ambiguous model '%s' (%s) matched %s - try 'list' "
-+                        "to list or specify a particular file" %
-+                        (model, ', '.join(tried),
-+                        ', '.join([m.name for m in mcode_list])))
-+        CreateFile(date, license_text, mcode_list[0], options.outfile)
-+    else:
-+        parser.error("Unknown command '%s'" % cmd)
-+
-+if __name__ == "__main__":
-+    MicrocodeTool()
-diff -ruN u-boot-2015.01-rc3/tools/microcode-tool.py u-boot/tools/microcode-tool.py
---- u-boot-2015.01-rc3/tools/microcode-tool.py	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot/tools/microcode-tool.py	2015-01-01 17:34:32.897492694 +0100
-@@ -0,0 +1,253 @@
-+#!/usr/bin/env python
-+#
-+# Copyright (c) 2014 Google, Inc
-+#
-+# SPDX-License-Identifier:      GPL-2.0+
-+#
-+# Intel microcode update tool
-+
-+from optparse import OptionParser
-+import os
-+import re
-+import struct
-+import sys
-+
-+MICROCODE_DIR = 'arch/x86/dts/microcode'
-+
-+class Microcode:
-+    """Holds information about the microcode for a particular model of CPU.
-+
-+    Attributes:
-+        name:  Name of the CPU this microcode is for, including any version
-+                   information (e.g. 'm12206a7_00000029')
-+        model: Model code string (this is cpuid(1).eax, e.g. '206a7')
-+        words: List of hex words containing the microcode. The first 16 words
-+                   are the public header.
-+    """
-+    def __init__(self, name, data):
-+        self.name = name
-+        # Convert data into a list of hex words
-+        self.words = []
-+        for value in ''.join(data).split(','):
-+            hexval = value.strip()
-+            if hexval:
-+                self.words.append(int(hexval, 0))
-+
-+        # The model is in the 4rd hex word
-+        self.model = '%x' % self.words[3]
-+
-+def ParseFile(fname):
-+    """Parse a micrcode.dat file and return the component parts
-+
-+    Args:
-+        fname: Filename to parse
-+    Returns:
-+        3-Tuple:
-+            date:         String containing date from the file's header
-+            license_text: List of text lines for the license file
-+            microcodes:   List of Microcode objects from the file
-+    """
-+    re_date = re.compile('/\* *(.* [0-9]{4}) *\*/$')
-+    re_license = re.compile('/[^-*+] *(.*)$')
-+    re_name = re.compile('/\* *(.*)\.inc *\*/', re.IGNORECASE)
-+    microcodes = {}
-+    license_text = []
-+    date = ''
-+    data = []
-+    name = None
-+    with open(fname) as fd:
-+        for line in fd:
-+            line = line.rstrip()
-+            m_date = re_date.match(line)
-+            m_license = re_license.match(line)
-+            m_name = re_name.match(line)
-+            if m_name:
-+                if name:
-+                    microcodes[name] = Microcode(name, data)
-+                name = m_name.group(1).lower()
-+                data = []
-+            elif m_license:
-+                license_text.append(m_license.group(1))
-+            elif m_date:
-+                date = m_date.group(1)
-+            else:
-+                data.append(line)
-+    if name:
-+        microcodes[name] = Microcode(name, data)
-+    return date, license_text, microcodes
-+
-+def List(date, microcodes, model):
-+    """List the available microcode chunks
-+
-+    Args:
-+        date:           Date of the microcode file
-+        microcodes:     Dict of Microcode objects indexed by name
-+        model:          Model string to search for, or None
-+    """
-+    print 'Date: %s' % date
-+    if model:
-+        mcode_list, tried = FindMicrocode(microcodes, model.lower())
-+        print 'Matching models %s:' % (', '.join(tried))
-+    else:
-+        print 'All models:'
-+        mcode_list = [microcodes[m] for m in microcodes.keys()]
-+    for mcode in mcode_list:
-+        print '%-20s: model %s' % (mcode.name, mcode.model)
-+
-+def FindMicrocode(microcodes, model):
-+    """Find all the microcode chunks which match the given model.
-+
-+    This model is something like 306a9 (the value returned in eax from
-+    cpuid(1) when running on Intel CPUs). But we allow a partial match,
-+    omitting the last 1 or two characters to allow many families to have the
-+    same microcode.
-+
-+    If the model name is ambiguous we return a list of matches.
-+
-+    Args:
-+        microcodes: Dict of Microcode objects indexed by name
-+        model:      String containing model name to find
-+    Returns:
-+        Tuple:
-+            List of matching Microcode objects
-+            List of abbreviations we tried
-+    """
-+    # Allow a full name to be used
-+    mcode = microcodes.get(model)
-+    if mcode:
-+        return [mcode], []
-+
-+    tried = []
-+    found = []
-+    for i in range(3):
-+        abbrev = model[:-i] if i else model
-+        tried.append(abbrev)
-+        for mcode in microcodes.values():
-+            if mcode.model.startswith(abbrev):
-+                found.append(mcode)
-+        if found:
-+            break
-+    return found, tried
-+
-+def CreateFile(date, license_text, mcode, outfile):
-+    """Create a microcode file in U-Boot's .dtsi format
-+
-+    Args:
-+        date:       String containing date of original microcode file
-+        license:    List of text lines for the license file
-+        mcode:      Microcode object to write
-+        outfile:    Filename to write to ('-' for stdout)
-+    """
-+    out = '''/*%s
-+ * ---
-+ * This is a device tree fragment. Use #include to add these properties to a
-+ * node.
-+ *
-+ * Date: %s
-+ */
-+
-+compatible = "intel,microcode";
-+intel,header-version = <%d>;
-+intel,update-revision = <%#x>;
-+intel,date-code = <%#x>;
-+intel,processor-signature = <%#x>;
-+intel,checksum = <%#x>;
-+intel,loader-revision = <%d>;
-+intel,processor-flags = <%#x>;
-+
-+/* The first 48-bytes are the public header which repeats the above data */
-+data = <%s
-+\t>;'''
-+    words = ''
-+    for i in range(len(mcode.words)):
-+        if not (i & 3):
-+            words += '\n'
-+        val = mcode.words[i]
-+        # Change each word so it will be little-endian in the FDT
-+        # This data is needed before RAM is available on some platforms so we
-+        # cannot do an endianness swap on boot.
-+        val = struct.unpack("<I", struct.pack(">I", val))[0]
-+        words += '\t%#010x' % val
-+
-+    # Take care to avoid adding a space before a tab
-+    text = ''
-+    for line in license_text:
-+        if line[0] == '\t':
-+            text += '\n *' + line
-+        else:
-+            text += '\n * ' + line
-+    args = [text, date]
-+    args += [mcode.words[i] for i in range(7)]
-+    args.append(words)
-+    if outfile == '-':
-+        print out % tuple(args)
-+    else:
-+        if not outfile:
-+            if not os.path.exists(MICROCODE_DIR):
-+                print >> sys.stderr, "Creating directory '%s'" % MICROCODE_DIR
-+                os.makedirs(MICROCODE_DIR)
-+            outfile = os.path.join(MICROCODE_DIR, mcode.name + '.dtsi')
-+            print >> sys.stderr, "Writing microcode for '%s' to '%s'" % (
-+                     mcode.name, outfile)
-+        with open(outfile, 'w') as fd:
-+            print >> fd, out % tuple(args)
-+
-+def MicrocodeTool():
-+    """Run the microcode tool"""
-+    commands = 'create,license,list'.split(',')
-+    parser = OptionParser()
-+    parser.add_option('-d', '--mcfile', type='string', action='store',
-+                    help='Name of microcode.dat file')
-+    parser.add_option('-m', '--model', type='string', action='store',
-+                    help='Model name to extract')
-+    parser.add_option('-o', '--outfile', type='string', action='store',
-+                    help='Filename to use for output (- for stdout), default is'
-+                    ' %s/<name>.dtsi' % MICROCODE_DIR)
-+    parser.usage += """ command
-+
-+    Process an Intel microcode file (use -h for help). Commands:
-+
-+       create     Create microcode .dtsi file for a model
-+       list       List available models in microcode file
-+       license    Print the license
-+
-+    Typical usage:
-+
-+       ./tools/microcode-tool -d microcode.dat -m 306a create
-+
-+    This will find the appropriate file and write it to %s.""" % MICROCODE_DIR
-+
-+    (options, args) = parser.parse_args()
-+    if not args:
-+        parser.error('Please specify a command')
-+    cmd = args[0]
-+    if cmd not in commands:
-+        parser.error("Unknown command '%s'" % cmd)
-+
-+    if not options.mcfile:
-+        parser.error('You must specify a microcode file')
-+    date, license_text, microcodes = ParseFile(options.mcfile)
-+
-+    if cmd == 'list':
-+        List(date, microcodes, options.model)
-+    elif cmd == 'license':
-+        print '\n'.join(license_text)
-+    elif cmd == 'create':
-+        if not options.model:
-+            parser.error('You must specify a model to create')
-+        model = options.model.lower()
-+        mcode_list, tried = FindMicrocode(microcodes, model)
-+        if not mcode_list:
-+            parser.error("Unknown model '%s' (%s) - try 'list' to list" %
-+                        (model, ', '.join(tried)))
-+        if len(mcode_list) > 1:
-+            parser.error("Ambiguous model '%s' (%s) matched %s - try 'list' "
-+                        "to list or specify a particular file" %
-+                        (model, ', '.join(tried),
-+                        ', '.join([m.name for m in mcode_list])))
-+        CreateFile(date, license_text, mcode_list[0], options.outfile)
-+    else:
-+        parser.error("Unknown command '%s'" % cmd)
-+
-+if __name__ == "__main__":
-+    MicrocodeTool()
-diff -ruN u-boot-2015.01-rc3/tools/pblimage.c u-boot/tools/pblimage.c
---- u-boot-2015.01-rc3/tools/pblimage.c	2014-12-08 22:35:08.000000000 +0100
-+++ u-boot/tools/pblimage.c	2015-01-01 17:34:32.905492563 +0100
-@@ -1,5 +1,5 @@
- /*
-- * Copyright 2012 Freescale Semiconductor, Inc.
-+ * Copyright 2012-2014 Freescale Semiconductor, Inc.
-  *
-  * SPDX-License-Identifier:	GPL-2.0+
-  */
-@@ -8,6 +8,10 @@
- #include "pblimage.h"
- #include "pbl_crc32.h"
- 
-+#define roundup(x, y)		((((x) + ((y) - 1)) / (y)) * (y))
-+#define PBL_ACS_CONT_CMD	0x81000000
-+#define PBL_ADDR_24BIT_MASK	0x00ffffff
-+
- /*
-  * Initialize to an invalid value.
-  */
-@@ -22,6 +26,13 @@
- static char *fname = "Unknown";
- static int lineno = -1;
- static struct pbl_header pblimage_header;
-+static int uboot_size;
-+static int arch_flag;
-+
-+static uint32_t pbl_cmd_initaddr;
-+static uint32_t pbi_crc_cmd1;
-+static uint32_t pbi_crc_cmd2;
-+static uint32_t pbl_end_cmd[4];
- 
- static union
- {
-@@ -38,20 +49,6 @@
-  * start offset by subtracting the size of the u-boot image from the
-  * top of the allowable 24-bit range.
-  */
--static void init_next_pbl_cmd(FILE *fp_uboot)
--{
--	struct stat st;
--	int fd = fileno(fp_uboot);
--
--	if (fstat(fd, &st) == -1) {
--		printf("Error: Could not determine u-boot image size. %s\n",
--			strerror(errno));
--		exit(EXIT_FAILURE);
--	}
--
--	next_pbl_cmd = 0x82000000 - st.st_size;
--}
--
- static void generate_pbl_cmd(void)
- {
- 	uint32_t val = next_pbl_cmd;
-@@ -66,11 +63,15 @@
- 
- static void pbl_fget(size_t size, FILE *stream)
- {
--	unsigned char c;
-+	unsigned char c = 0xff;
- 	int c_temp;
- 
--	while (size && (c_temp = fgetc(stream)) != EOF) {
--		c = (unsigned char)c_temp;
-+	while (size) {
-+		c_temp = fgetc(stream);
-+		if (c_temp != EOF)
-+			c = (unsigned char)c_temp;
-+		else if ((c_temp == EOF) && (arch_flag == IH_ARCH_ARM))
-+			c = 0xff;
- 		*pmem_buf++ = c;
- 		pbl_size++;
- 		size--;
-@@ -80,8 +81,8 @@
- /* load split u-boot with PBI command 81xxxxxx. */
- static void load_uboot(FILE *fp_uboot)
- {
--	init_next_pbl_cmd(fp_uboot);
--	while (next_pbl_cmd < 0x82000000) {
-+	next_pbl_cmd = pbl_cmd_initaddr - uboot_size;
-+	while (next_pbl_cmd < pbl_cmd_initaddr) {
- 		generate_pbl_cmd();
- 		pbl_fget(64, fp_uboot);
- 	}
-@@ -154,8 +155,6 @@
- /* write end command and crc command to memory. */
- static void add_end_cmd(void)
- {
--	uint32_t pbl_end_cmd[4] = {0x09138000, 0x00000000,
--		0x091380c0, 0x00000000};
- 	uint32_t crc32_pbl;
- 	int i;
- 	unsigned char *p = (unsigned char *)&pbl_end_cmd;
-@@ -172,8 +171,8 @@
- 
- 	/* Add PBI CRC command. */
- 	*pmem_buf++ = 0x08;
--	*pmem_buf++ = 0x13;
--	*pmem_buf++ = 0x80;
-+	*pmem_buf++ = pbi_crc_cmd1;
-+	*pmem_buf++ = pbi_crc_cmd2;
- 	*pmem_buf++ = 0x40;
- 	pbl_size += 4;
- 
-@@ -184,17 +183,6 @@
- 	*pmem_buf++ = (crc32_pbl >> 8) & 0xff;
- 	*pmem_buf++ = (crc32_pbl) & 0xff;
- 	pbl_size += 4;
--
--	if ((pbl_size % 16) != 0) {
--		for (i = 0; i < 8; i++) {
--			*pmem_buf++ = 0x0;
--			pbl_size++;
--		}
--	}
--	if ((pbl_size % 16 != 0)) {
--		printf("Error: Bad size of image file\n");
--		exit(EXIT_FAILURE);
--	}
- }
- 
- void pbl_load_uboot(int ifd, struct image_tool_params *params)
-@@ -268,12 +256,64 @@
- 	/*nothing need to do, pbl_load_uboot takes care of whole file. */
- }
- 
-+int pblimage_check_params(struct image_tool_params *params)
-+{
-+	FILE *fp_uboot;
-+	int fd;
-+	struct stat st;
-+
-+	if (!params)
-+		return EXIT_FAILURE;
-+
-+	fp_uboot = fopen(params->datafile, "r");
-+	if (fp_uboot == NULL) {
-+		printf("Error: %s open failed\n", params->datafile);
-+		exit(EXIT_FAILURE);
-+	}
-+	fd = fileno(fp_uboot);
-+
-+	if (fstat(fd, &st) == -1) {
-+		printf("Error: Could not determine u-boot image size. %s\n",
-+		       strerror(errno));
-+		exit(EXIT_FAILURE);
-+	}
-+
-+	/* For the variable size, we need to pad it to 64 byte boundary */
-+	uboot_size = roundup(st.st_size, 64);
-+
-+	if (params->arch == IH_ARCH_ARM) {
-+		arch_flag = IH_ARCH_ARM;
-+		pbi_crc_cmd1 = 0x61;
-+		pbi_crc_cmd2 = 0;
-+		pbl_cmd_initaddr = params->addr & PBL_ADDR_24BIT_MASK;
-+		pbl_cmd_initaddr |= PBL_ACS_CONT_CMD;
-+		pbl_cmd_initaddr |= uboot_size;
-+		pbl_end_cmd[0] = 0x09610000;
-+		pbl_end_cmd[1] = 0x00000000;
-+		pbl_end_cmd[2] = 0x096100c0;
-+		pbl_end_cmd[3] = 0x00000000;
-+	} else if (params->arch == IH_ARCH_PPC) {
-+		arch_flag = IH_ARCH_PPC;
-+		pbi_crc_cmd1 = 0x13;
-+		pbi_crc_cmd2 = 0x80;
-+		pbl_cmd_initaddr = 0x82000000;
-+		pbl_end_cmd[0] = 0x09138000;
-+		pbl_end_cmd[1] = 0x00000000;
-+		pbl_end_cmd[2] = 0x091380c0;
-+		pbl_end_cmd[3] = 0x00000000;
-+	}
-+
-+	next_pbl_cmd = pbl_cmd_initaddr;
-+	return 0;
-+};
-+
- /* pblimage parameters */
- static struct image_type_params pblimage_params = {
- 	.name		= "Freescale PBL Boot Image support",
- 	.header_size	= sizeof(struct pbl_header),
- 	.hdr		= (void *)&pblimage_header,
- 	.check_image_type = pblimage_check_image_types,
-+	.check_params	= pblimage_check_params,
- 	.verify_header	= pblimage_verify_header,
- 	.print_header	= pblimage_print_header,
- 	.set_header	= pblimage_set_header,
-- 
2.2.1

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From nbd at openwrt.org  Sat Jan 17 19:40:11 2015
From: nbd at openwrt.org (Felix Fietkau)
Date: Sun, 18 Jan 2015 01:40:11 +0100
Subject: [OpenWrt-Devel] [PATCH] build: explicitly unexport CONFIG_SITE
In-Reply-To: <db18c281ae79cdf649c21d075c68d970588d72a0.1421377326.git.mschiffer@universe-factory.net>
References: <db18c281ae79cdf649c21d075c68d970588d72a0.1421377326.git.mschiffer@universe-factory.net>
Message-ID: <54BB00EB.4020709@openwrt.org>

On 2015-01-16 04:03, Matthias Schiffer wrote:
> On systems with CONFIG_SITE in the environment (e.g. OpenSUSE) make will export
> the CONFIG_SITE set in include/package.mk by default. This will cause host
> builds to get the target site configuration, leading to all kinds of weirdness
> (wrong pointer size, wrong endianess).
> 
> Fix this by explicitly unexporting CONFIG_SITE. The explicit export for the
> target builds overrides the unexport, so the target builds will still correctly
> get the site config.
> 
> Signed-off-by: Matthias Schiffer <mschiffer at universe-factory.net>
Applied in r44019, thanks.

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


From nbd at openwrt.org  Sat Jan 17 19:40:52 2015
From: nbd at openwrt.org (Felix Fietkau)
Date: Sun, 18 Jan 2015 01:40:52 +0100
Subject: [OpenWrt-Devel] [PATCH uqmi] Add command to specify preferred
	PLMN
In-Reply-To: <1421436638-25758-1-git-send-email-s.demeszko@wireless-instruments.com>
References: <1421436638-25758-1-git-send-email-s.demeszko@wireless-instruments.com>
Message-ID: <54BB0114.9060103@openwrt.org>

On 2015-01-16 20:30, S?awomir Demeszko wrote:
> Signed-off-by: S?awomir Demeszko <s.demeszko at wireless-instruments.com>
Applied, thanks.

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

From nbd at openwrt.org  Sat Jan 17 19:41:48 2015
From: nbd at openwrt.org (Felix Fietkau)
Date: Sun, 18 Jan 2015 01:41:48 +0100
Subject: [OpenWrt-Devel] [PATCH V3 uclient] support for connection
	timeout
In-Reply-To: <1421403662-9551-1-git-send-email-zajec5@gmail.com>
References: <1421401374-9085-1-git-send-email-zajec5@gmail.com>
 <1421403662-9551-1-git-send-email-zajec5@gmail.com>
Message-ID: <54BB014C.50604@openwrt.org>

On 2015-01-16 11:21, Rafa? Mi?ecki wrote:
> Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com>
Applied, thanks.

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

From nbd at openwrt.org  Sat Jan 17 19:45:17 2015
From: nbd at openwrt.org (Felix Fietkau)
Date: Sun, 18 Jan 2015 01:45:17 +0100
Subject: [OpenWrt-Devel] [PATCH] igmpproxy: add patch to silence
 unnecessary logging of downstream igmp traffic
In-Reply-To: <1420733299-18005-1-git-send-email-a.seppala@gmail.com>
References: <1420733299-18005-1-git-send-email-a.seppala@gmail.com>
Message-ID: <54BB021D.30507@openwrt.org>

On 2015-01-08 17:08, Antti Sepp?l? wrote:
> This patch adds a simple check to silence logging of messages about
> unrecognized igmp packets which originate from devices in local network.
> 
> Without this patch igmpproxy floods openwrt syslog with messages such as:
>   user.warn igmpproxy[19818]: The source address 192.168.1.175 for group
>   239.255.250.250, is not in any valid net for upstream VIF.
> 
> Signed-off-by: Antti Sepp?l? <a.seppala at gmail.com>
Applied in r44020, thanks.

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

From nbd at openwrt.org  Sat Jan 17 19:56:26 2015
From: nbd at openwrt.org (Felix Fietkau)
Date: Sun, 18 Jan 2015 01:56:26 +0100
Subject: [OpenWrt-Devel] [PATCH 0/6] ar8216: patch series for
	AR8327/AR8337
In-Reply-To: <54BA7128.2070408@openwrt.org>
References: <54B41D8C.1090201@gmail.com> <54BA7128.2070408@openwrt.org>
Message-ID: <54BB04BA.2020304@openwrt.org>

On 2015-01-17 15:26, John Crispin wrote:
> 
> 
> On 12/01/2015 20:16, Heiner Kallweit wrote:
>> Patches 1-3 are improvements w/o functional change.
> 
> merged 1-3
> 
> 4-6 will need a bit more time and a closer look
4-6 applied, thanks.

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


From mathieu at qca.qualcomm.com  Sat Jan 17 21:38:37 2015
From: mathieu at qca.qualcomm.com (Olivari, Mathieu)
Date: Sun, 18 Jan 2015 02:38:37 +0000
Subject: [OpenWrt-Devel] [PATCH] build: allow openwrt.git packages to be
 replaced by feeds
In-Reply-To: <54B9FD03.3090102@openwrt.org>
References: <1421444737-1495-1-git-send-email-mathieu@qca.qualcomm.com>,
 <54B9FD03.3090102@openwrt.org>
Message-ID: <1421548716904.32420@qca.qualcomm.com>

For packages like mac80211, a lot of contributions go straight upstream to the kernel actually. It's understandable that openwrt.git maintains its own stabilization branch using quilt on this package.
But it also makes sense for some users to generate OpenWrt firmware with a more recent version of backports, typically from the wireless-testing tip. To test a certain class of drivers as an example.

Maintaining its own mac80211 or hostapd package (to pull it from their respective tip) is currently very painful. It requires maintaining a separate patch-set, sometimes requires small customizations to scripts; each of them conflicting every time a new openwrt version gets pulled & rebased.

Not being able to replace core packages while still pulling/rebasing openwrt.git easily is one of the reasons that makes OpenWrt contributions difficult.
The whole reason behind this patch is to facilitate OpenWrt contributions, not prevent them.

We can talk about the implementation; but I think leaving the opportunity to replace core packages when necessary would be useful to a lot of people.

Thanks,
Mathieu
________________________________________
De : openwrt-devel <openwrt-devel-bounces at lists.openwrt.org> de la part de John Crispin <blogic at openwrt.org>
Envoy? : vendredi 16 janvier 2015 22:11
? : openwrt-devel at lists.openwrt.org
Objet : Re: [OpenWrt-Devel] [PATCH] build: allow openwrt.git packages to be replaced by feeds

On 16/01/2015 22:45, Mathieu Olivari wrote:
> Currently, replacing a package available in openwrt.git requires
> modifications in openwrt.git, or requires duplicating the package
> in a feed but with a different name, which causes all kind of
> problems related to dependencies (all packages selecting it would
> have to be modified accordingly to select the new package).
>
> With this change, if a package with the same name is present both
> in feeds/ and package/ folders, the one in feeds/ will override the
> one in package/, both in the menuconfig and during the build.
>
> This mechanism is particularly useful for vendor tree, or in
> general for application which needs to replace one particular
> package which exists within openwrt.git by a custom/newer version.
>

i think this is a bad solution. this is like overriding files in /sbin
with ones in ~/sbin. it will cause lots of side effects and bogus bug
reports. how about you simply upstream your magic feature and have it
added to packages.git ? your patch seems to work around qca not
upstreaming its work properly.


> Signed-off-by: Mathieu Olivari <mathieu at qca.qualcomm.com> ---
> include/scan.awk |   17 +++++++++++++++++ include/scan.mk  |    2
> +- scripts/feeds    |    9 ++++++--- 3 files changed, 24
> insertions(+), 4 deletions(-) create mode 100644 include/scan.awk
>
> diff --git a/include/scan.awk b/include/scan.awk new file mode
> 100644 index 0000000..39b2977 --- /dev/null +++ b/include/scan.awk
> @@ -0,0 +1,17 @@ +BEGIN { FS="/" } +$1 ~ /^feeds/ { FEEDS[$NF]=$0
> } +$1 !~ /^feeds/ { PKGS[$NF]=$0 } +END { +   # Filter-out OpenWrt
> packages which have a feeds equivalent +      for (pkg in PKGS) +             if
> (pkg in FEEDS) +                      delete PKGS[pkg] +      n = asort(PKGS) +       for (i=1; i
> <= n; i++) { +                print PKGS[i] + } +     n = asort(FEEDS) +      for (i=1; i
> <= n; i++){ +         print FEEDS[i] +        } +} diff --git a/include/scan.mk
> b/include/scan.mk index 0998333..138707d 100644 ---
> a/include/scan.mk +++ b/include/scan.mk @@ -43,7 +43,7 @@ endef
>
> $(FILELIST): rm -f $(TMP_DIR)/info/.files-$(SCAN_TARGET)-* -  $(call
> FIND_L, $(SCAN_DIR)) $(SCAN_EXTRA) -mindepth 1 $(if
> $(SCAN_DEPTH),-maxdepth $(SCAN_DEPTH)) -name Makefile | xargs grep
> -HE 'call (Build/DefaultTargets|Build(Package|Target)|.+Package)' |
> sed -e 's#^$(SCAN_DIR)/##' -e 's#/Makefile:.*##' | uniq > $@ +
> $(call FIND_L, $(SCAN_DIR)) $(SCAN_EXTRA) -mindepth 1 $(if
> $(SCAN_DEPTH),-maxdepth $(SCAN_DEPTH)) -name Makefile | xargs grep
> -HE 'call (Build/DefaultTargets|Build(Package|Target)|.+Package)' |
> sed -e 's#^$(SCAN_DIR)/##' -e 's#/Makefile:.*##' | uniq | awk -f
> include/scan.awk > $@
>
> $(TMP_DIR)/info/.files-$(SCAN_TARGET).mk: $(FILELIST) ( \ diff
> --git a/scripts/feeds b/scripts/feeds index 31ad544..01d9041
> 100755 --- a/scripts/feeds +++ b/scripts/feeds @@ -384,12 +384,15
> @@ sub install_package {
>
> # previously installed packages set the runtime package # newly
> installed packages set the source package -   $installed{$src} and
> return 0; +   $installed{$src} and !is_core_package($src) and return
> 0;
>
> # check previously installed packages -       $installed{$name} and
> return 0; +   $installed{$name} and !is_core_package($name) and
> return 0; $installed{$src} = 1; -     warn "Installing package
> '$src'\n"; + +        is_core_package($src) +         and warn "Overriding
> package '$src'\n" +           or warn "Installing package '$src'\n";
>
> $install_method{$type} or do { warn "Unknown installation method:
> '$type'\n";
>
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From daniel at gimpelevich.san-francisco.ca.us  Sun Jan 18 00:46:46 2015
From: daniel at gimpelevich.san-francisco.ca.us (Daniel Gimpelevich)
Date: Sat, 17 Jan 2015 21:46:46 -0800
Subject: [OpenWrt-Devel] [PATCH 1/4] lantiq: Fix initscript issue
Message-ID: <1421560006.6126.24.camel@chimera>

Currently this initscript fails if the macaddr has any leading zeroes.
This patch corrects the problem.

Signed-off-by: Daniel Gimpelevich <daniel at gimpelevich.san-francisco.ca.us>
--- a/target/linux/lantiq/base-files/etc/init.d/esi	(revision 44023)
+++ b/target/linux/lantiq/base-files/etc/init.d/esi	(working copy)
@@ -3,5 +3,5 @@
 
 START=19
 start() {
-	esi $(printf '%X' $((1+0x$(tr -d : </sys/class/net/eth0/address)))) 2>/dev/null || :
+	esi $(printf '%012X' $((1+0x$(tr -d : </sys/class/net/eth0/address)))) 2>/dev/console || :
 }
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From daniel at gimpelevich.san-francisco.ca.us  Sun Jan 18 00:46:55 2015
From: daniel at gimpelevich.san-francisco.ca.us (Daniel Gimpelevich)
Date: Sat, 17 Jan 2015 21:46:55 -0800
Subject: [OpenWrt-Devel] [PATCH 2/4] Preserve bootloader command line on MIPS
Message-ID: <1421560015.6126.25.camel@chimera>

Somewhere in the conversion of the MIPS architecture code to Device Tree
usage, there's been a failure to keep the separate variables holding the
kernel command line reconciled between the tree and the bootloader. This
patch restores previous functionality that broke.

Signed-off-by: Daniel Gimpelevich <daniel at gimpelevich.san-francisco.ca.us>
--- a/target/linux/generic/patches-3.14/997-device_tree_cmdline.patch
+++ b/target/linux/generic/patches-3.14/997-device_tree_cmdline.patch
@@ -1,6 +1,8 @@
---- a/drivers/of/fdt.c
-+++ b/drivers/of/fdt.c
-@@ -817,6 +817,9 @@ int __init early_init_dt_scan_chosen(uns
+Index: linux-3.14.28/drivers/of/fdt.c
+===================================================================
+--- linux-3.14.28.orig/drivers/of/fdt.c	2015-01-08 10:01:03.000000000 -0800
++++ linux-3.14.28/drivers/of/fdt.c	2015-01-17 20:29:51.674740290 -0800
+@@ -817,6 +817,9 @@
  	p = of_get_flat_dt_prop(node, "bootargs", &l);
  	if (p != NULL && l > 0)
  		strlcpy(data, p, min((int)l, COMMAND_LINE_SIZE));
@@ -10,3 +12,17 @@
  
  	/*
  	 * CONFIG_CMDLINE is meant to be a default in case nothing else
+Index: linux-3.14.28/arch/mips/kernel/prom.c
+===================================================================
+--- linux-3.14.28.orig/arch/mips/kernel/prom.c	2015-01-17 20:30:09.922830766 -0800
++++ linux-3.14.28/arch/mips/kernel/prom.c	2015-01-17 20:30:54.095049815 -0800
+@@ -49,6 +49,9 @@
+ 
+ void __init __dt_setup_arch(struct boot_param_header *bph)
+ {
++	if (boot_command_line[0] == '\0')
++		strcpy(boot_command_line, arcs_cmdline);
++
+ 	if (!early_init_dt_scan(bph))
+ 		return;
+ 
--- a/target/linux/generic/patches-3.18/997-device_tree_cmdline.patch
+++ b/target/linux/generic/patches-3.18/997-device_tree_cmdline.patch
@@ -1,6 +1,8 @@
---- a/drivers/of/fdt.c
-+++ b/drivers/of/fdt.c
-@@ -903,6 +903,9 @@ int __init early_init_dt_scan_chosen(uns
+Index: linux-3.18.2/drivers/of/fdt.c
+===================================================================
+--- linux-3.18.2.orig/drivers/of/fdt.c	2015-01-17 20:57:52.419074654 -0800
++++ linux-3.18.2/drivers/of/fdt.c	2015-01-17 20:57:52.367074398 -0800
+@@ -903,6 +903,9 @@
  	p = of_get_flat_dt_prop(node, "bootargs", &l);
  	if (p != NULL && l > 0)
  		strlcpy(data, p, min((int)l, COMMAND_LINE_SIZE));
@@ -10,3 +12,17 @@
  
  	/*
  	 * CONFIG_CMDLINE is meant to be a default in case nothing else
+Index: linux-3.18.2/arch/mips/kernel/prom.c
+===================================================================
+--- linux-3.18.2.orig/arch/mips/kernel/prom.c	2015-01-17 20:57:52.419074654 -0800
++++ linux-3.18.2/arch/mips/kernel/prom.c	2015-01-17 20:57:52.415074633 -0800
+@@ -49,6 +49,9 @@
+ 
+ void __init __dt_setup_arch(void *bph)
+ {
++	if (boot_command_line[0] == '\0')
++		strcpy(boot_command_line, arcs_cmdline);
++
+ 	if (!early_init_dt_scan(bph))
+ 		return;
+ 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From daniel at gimpelevich.san-francisco.ca.us  Sun Jan 18 00:47:04 2015
From: daniel at gimpelevich.san-francisco.ca.us (Daniel Gimpelevich)
Date: Sat, 17 Jan 2015 21:47:04 -0800
Subject: [OpenWrt-Devel] [PATCH 3/4] lantiq: Restore call to orphaned etop
	function
Message-ID: <1421560024.6126.26.camel@chimera>

It seems the call to ltq_get_eth_mac() disappeared at some point. This
patch puts it where it currently most makes sense.

Signed-off-by: Daniel Gimpelevich <daniel at gimpelevich.san-francisco.ca.us>
--- a/target/linux/lantiq/patches-3.14/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch	(revision 44023)
+++ b/target/linux/lantiq/patches-3.14/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch	(working copy)
@@ -19,8 +19,10 @@
  create mode 100644 arch/mips/lantiq/xway/pci-ath-fixup.c
  create mode 100644 arch/mips/lantiq/xway/rt_eep.c
 
---- /dev/null
-+++ b/arch/mips/include/asm/mach-lantiq/pci-ath-fixup.h
+Index: linux-3.14.28/arch/mips/include/asm/mach-lantiq/pci-ath-fixup.h
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ linux-3.14.28/arch/mips/include/asm/mach-lantiq/pci-ath-fixup.h	2015-01-17 10:55:03.329443942 -0800
 @@ -0,0 +1,6 @@
 +#ifndef _PCI_ATH_FIXUP
 +#define _PCI_ATH_FIXUP
@@ -28,9 +30,11 @@
 +void ltq_pci_ath_fixup(unsigned slot, u16 *cal_data) __init;
 +
 +#endif /* _PCI_ATH_FIXUP */
---- a/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h
-+++ b/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h
-@@ -90,5 +90,8 @@ int xrx200_gphy_boot(struct device *dev,
+Index: linux-3.14.28/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h
+===================================================================
+--- linux-3.14.28.orig/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h	2015-01-17 10:55:03.337443971 -0800
++++ linux-3.14.28/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h	2015-01-17 10:55:03.329443942 -0800
+@@ -90,5 +90,8 @@
  extern void ltq_pmu_enable(unsigned int module);
  extern void ltq_pmu_disable(unsigned int module);
  
@@ -39,9 +43,11 @@
 +
  #endif /* CONFIG_SOC_TYPE_XWAY */
  #endif /* _LTQ_XWAY_H__ */
---- a/arch/mips/lantiq/xway/Makefile
-+++ b/arch/mips/lantiq/xway/Makefile
-@@ -2,4 +2,7 @@ obj-y := prom.o sysctrl.o clk.o reset.o 
+Index: linux-3.14.28/arch/mips/lantiq/xway/Makefile
+===================================================================
+--- linux-3.14.28.orig/arch/mips/lantiq/xway/Makefile	2015-01-17 10:55:03.337443971 -0800
++++ linux-3.14.28/arch/mips/lantiq/xway/Makefile	2015-01-17 11:58:16.000000000 -0800
+@@ -2,4 +2,7 @@
  
  obj-y += vmmc.o tffs.o
  
@@ -49,8 +55,10 @@
 +obj-$(CONFIG_PCI) += ath_eep.o rt_eep.o pci-ath-fixup.o
 +
  obj-$(CONFIG_XRX200_PHY_FW) += xrx200_phy_fw.o
---- /dev/null
-+++ b/arch/mips/lantiq/xway/ath_eep.c
+Index: linux-3.14.28/arch/mips/lantiq/xway/ath_eep.c
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ linux-3.14.28/arch/mips/lantiq/xway/ath_eep.c	2015-01-17 10:55:03.329443942 -0800
 @@ -0,0 +1,282 @@
 +/*
 + *  Copyright (C) 2011 Luca Olivetti <luca at ventoso.org>
@@ -334,8 +342,10 @@
 +	return platform_driver_probe(&ath5k_eeprom_driver, of_ath5k_eeprom_probe);
 +}
 +device_initcall(of_ath5k_eeprom_init);
---- /dev/null
-+++ b/arch/mips/lantiq/xway/eth_mac.c
+Index: linux-3.14.28/arch/mips/lantiq/xway/eth_mac.c
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ linux-3.14.28/arch/mips/lantiq/xway/eth_mac.c	2015-01-17 11:14:42.823292726 -0800
 @@ -0,0 +1,76 @@
 +/*
 + *  Copyright (C) 2012 John Crispin <blogic at openwrt.org>
@@ -413,8 +423,10 @@
 +	return platform_driver_probe(&eth_mac_driver, of_eth_mac_probe);
 +}
 +device_initcall(of_eth_mac_init);
---- /dev/null
-+++ b/arch/mips/lantiq/xway/pci-ath-fixup.c
+Index: linux-3.14.28/arch/mips/lantiq/xway/pci-ath-fixup.c
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ linux-3.14.28/arch/mips/lantiq/xway/pci-ath-fixup.c	2015-01-17 10:55:03.329443942 -0800
 @@ -0,0 +1,109 @@
 +/*
 + *  Atheros AP94 reference board PCI initialization
@@ -525,8 +537,10 @@
 +	ath_fixups[ath_num_fixups].cal_data = cal_data;
 +	ath_num_fixups++;
 +}
---- /dev/null
-+++ b/arch/mips/lantiq/xway/rt_eep.c
+Index: linux-3.14.28/arch/mips/lantiq/xway/rt_eep.c
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ linux-3.14.28/arch/mips/lantiq/xway/rt_eep.c	2015-01-17 10:55:03.329443942 -0800
 @@ -0,0 +1,60 @@
 +/*
 + *  Copyright (C) 2011 John Crispin <blogic at openwrt.org>
@@ -588,3 +602,17 @@
 +	return platform_driver_probe(&ralink_eeprom_driver, of_ralink_eeprom_probe);
 +}
 +device_initcall(of_ralink_eeprom_init);
+Index: linux-3.14.28/drivers/net/ethernet/lantiq_etop.c
+===================================================================
+--- linux-3.14.28.orig/drivers/net/ethernet/lantiq_etop.c	2015-01-17 11:52:03.818405214 -0800
++++ linux-3.14.28/drivers/net/ethernet/lantiq_etop.c	2015-01-17 12:02:20.905465188 -0800
+@@ -843,6 +843,9 @@
+ 
+ 	if (priv->mac)
+ 		memcpy(&mac.sa_data, priv->mac, ETH_ALEN);
++	else
++		memcpy(&mac.sa_data, ltq_get_eth_mac(), ETH_ALEN);
++
+ 	if (!is_valid_ether_addr(mac.sa_data)) {
+ 		pr_warn("etop: invalid MAC, using random\n");
+ 		random_ether_addr(mac.sa_data);
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From daniel at gimpelevich.san-francisco.ca.us  Sun Jan 18 00:47:10 2015
From: daniel at gimpelevich.san-francisco.ca.us (Daniel Gimpelevich)
Date: Sat, 17 Jan 2015 21:47:10 -0800
Subject: [OpenWrt-Devel] [PATCH 4/4] lantiq: DGN3500 cleanups
Message-ID: <1421560030.6126.27.camel@chimera>

This patch builds on the previous three to streamline support for the
Netgear DGN3500.

Signed-off-by: Daniel Gimpelevich <daniel at gimpelevich.san-francisco.ca.us>
--- a/target/linux/lantiq/base-files/etc/uci-defaults/02_network	(revision 44023)
+++ b/target/linux/lantiq/base-files/etc/uci-defaults/02_network	(working copy)
@@ -120,8 +120,6 @@
 	;;
 
 DGN3500*)
-	lan_mac=$(mtd_get_mac_ascii uboot-env ethaddr)
-	wan_mac=$(macaddr_add "$lan_mac" 1)
 	ucidef_set_interface_lan "eth0.1"
 	ucidef_add_switch "switch0" "1" "1"
 	ucidef_add_switch_vlan "switch0" "1" "3 2 1 0 5t"
--- a/target/linux/lantiq/dts/DGN3500.dtsi	(revision 44023)
+++ b/target/linux/lantiq/dts/DGN3500.dtsi	(working copy)
@@ -2,7 +2,7 @@
 
 / {
 	chosen {
-		bootargs = "console=ttyLTQ0,115200 init=/etc/preinit";
+		bootargs-append = "root=/dev/mtdblock5 console=ttyLTQ0,115200";
 	};
 
 	memory at 0 {
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From blogic at openwrt.org  Sun Jan 18 01:54:05 2015
From: blogic at openwrt.org (John Crispin)
Date: Sun, 18 Jan 2015 07:54:05 +0100
Subject: [OpenWrt-Devel] [PATCH] ar71xx: add support for the UniFi AP
 Outdoor Plus
In-Reply-To: <54A2319A.30705@universe-factory.net>
References: <87b1713d5176c2d2a7e805d6e550f8cdc2a3b2ac.1419908481.git.mschiffer@universe-factory.net>
 <CA+i30h-j-sNfuWzMO4PohPGWBiQMQZ1yY-VhP7sY_9PgRWr7hQ@mail.gmail.com>
 <54A2319A.30705@universe-factory.net>
Message-ID: <54BB588D.40005@openwrt.org>



On 30/12/2014 06:01, Matthias Schiffer wrote:
> I had read the mails regarding the issue and I've asked about it
> in #openwrt-devel (but didn't get an answer yet). I didn't try
> changing the channel though as I'm in a very noisy environment
> (WLAN-wise) at the moment, so I can't really do any proper
> testing.
> 
> If it's only a GPIO issue, I could look at it, but I don't know
> enough about ath9k to do more complex fixes. Unfortunately, I don't
> have the device anymore, so I can't perform further tests myself.
> 

can this wrong / missing GPIO cause permanent damage the SoC/wmac ?








> 
> On 12/30/2014 05:42 AM, David Hutchison wrote:
>> Does the new kernel / ath9k address the RF Filter on this board?
>> I came up with an old patch for this board, but whenever I
>> changed the channel inside OpenWRT the signal would just
>> disappear. The RF Filter has to be toggled somehow ( I assume
>> it's a GPIO of some sort ). I am just curious on how it was
>> fixed, or if it's still an issue.
>> 
>> -- Davey
>> 
>> On Mon, Dec 29, 2014 at 8:01 PM, Matthias Schiffer 
>> <mschiffer at universe-factory.net> wrote:
>>> Signed-off-by: Matthias Schiffer
>>> <mschiffer at universe-factory.net> --- 
>>> target/linux/ar71xx/base-files/etc/diag.sh         |  3 ++ 
>>> target/linux/ar71xx/base-files/lib/ar71xx.sh       |  3 ++ 
>>> .../ar71xx/base-files/lib/upgrade/platform.sh      |  2 + 
>>> target/linux/ar71xx/image/Makefile                 |  3 +- 
>>> .../610-MIPS-ath79-openwrt-machines.patch          |  3 +- 
>>> .../patches-3.14/616-MIPS-ath79-ubnt-xw.patch      | 61
>>> +++++++++++++++++++++- 6 files changed, 72 insertions(+), 3
>>> deletions(-)
>>> 
>>> diff --git a/target/linux/ar71xx/base-files/etc/diag.sh
>>> b/target/linux/ar71xx/base-files/etc/diag.sh index
>>> 06b96a3..30e4aeb 100755 ---
>>> a/target/linux/ar71xx/base-files/etc/diag.sh +++
>>> b/target/linux/ar71xx/base-files/etc/diag.sh @@ -254,6 +254,9
>>> @@ get_status_led() { uap-pro) status_led="ubnt:white:dome" ;; 
>>> +       unifi-outdoor-plus) +
>>> status_led="ubnt:white:front" +               ;; airgateway) 
>>> status_led="ubnt:white:status" ;; diff --git
>>> a/target/linux/ar71xx/base-files/lib/ar71xx.sh
>>> b/target/linux/ar71xx/base-files/lib/ar71xx.sh index
>>> 9b056e9..a12101a 100755 ---
>>> a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++
>>> b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -732,6 +732,9
>>> @@ ar71xx_board_detect() { *"UniFiAP Outdoor") 
>>> name="unifi-outdoor" ;; +       *"UniFiAP Outdoor+") +
>>> name="unifi-outdoor-plus" +               ;; *WP543) 
>>> name="wp543" ;; diff --git
>>> a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
>>> b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index
>>> 6dabf4e..2752729 100755 ---
>>> a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++
>>> b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@
>>> -368,6 +368,7 @@ platform_check_image() { return 1 ;;
>>> 
>>> +       unifi-outdoor-plus | \ uap-pro) [ "$magic_long" !=
>>> "19852003" ] && { echo "Invalid image type." @@ -483,6 +484,7
>>> @@ platform_do_upgrade() { om5p) platform_do_upgrade_openmesh
>>> "$ARGV" ;; +       unifi-outdoor-plus | \ uap-pro) 
>>> MTD_CONFIG_ARGS="-s 0x180000" default_do_upgrade "$ARGV" diff
>>> --git a/target/linux/ar71xx/image/Makefile
>>> b/target/linux/ar71xx/image/Makefile index 18c9637..3eb2f07
>>> 100644 --- a/target/linux/ar71xx/image/Makefile +++
>>> b/target/linux/ar71xx/image/Makefile @@ -1333,6 +1333,7 @@
>>> $(eval $(call
>>> SingleProfile,TPLINK-LZMA,64kraw,SMART-300,smart-300,SMART-300,tty
>>>
>>> 
$(eval $(call
SingleProfile,TPLINK-LZMA,64kraw,OOLITE,oolite,GS-OOLITE,ttyATH0,115200,0x3C000101,1,16Mlzma))
>>> 
>>> $(eval $(call
>>> SingleProfile,UAPPRO,64k,UAPPRO,ubnt-uap-pro,UAP-PRO,ttyS0,115200,BZ,BZ,ar934x))
>>>
>>> 
+$(eval $(call
SingleProfile,UAPPRO,64k,UBNTUNIFIOUTDOORPLUS,ubnt-unifi-outdoor-plus,UBNT-UOP,ttyS0,115200,BZ,BZ,ar7240))
>>> 
>>> $(eval $(call
>>> SingleProfile,UBDEV,64kraw,UBDEV01,ubdev01,UBNT-UF,ttyS0,115200,XM,XM,ar7240))
>>>
>>>
>>> 
@@ -1396,7 +1397,7 @@ $(eval $(call MultiProfile,TLWR941,TLWR941NV2
TLWR941NV3 TLWR941NV4 TLWR941NV6))
>>> $(eval $(call MultiProfile,TLWR1043,TLWR1043V1 TLWR1043V2)) 
>>> $(eval $(call MultiProfile,TLWDR4300,TLWDR3500V1 TLWDR3600V1
>>> TLWDR4300V1 TLWDR4300V1IL TLWDR4310V1 MW4530RV1)) $(eval $(call
>>> MultiProfile,TUBE2H,TUBE2H8M TUBE2H16M)) -$(eval $(call
>>> MultiProfile,UBNT,UBNTAIRROUTER UBNTRS UBNTRSPRO UBNTLSSR71
>>> UBNTBULLETM UBNTROCKETM UBNTNANOM UBNTNANOMXW UBNTLOCOXW
>>> UBNTUNIFI UBNTUNIFIOUTDOOR UAPPRO UBNTAIRGW)) +$(eval $(call
>>> MultiProfile,UBNT,UBNTAIRROUTER UBNTRS UBNTRSPRO UBNTLSSR71
>>> UBNTBULLETM UBNTROCKETM UBNTNANOM UBNTNANOMXW UBNTLOCOXW
>>> UBNTUNIFI UBNTUNIFIOUTDOOR UBNTUNIFIOUTDOORPLUS UAPPRO
>>> UBNTAIRGW)) $(eval $(call MultiProfile,WNDR3700,WNDR3700V1
>>> WNDR3700V2 WNDR3800 WNDR3800CH WNDRMAC WNDRMACV2)) $(eval
>>> $(call MultiProfile,WNR612V2,REALWNR612V2 N150R)) $(eval $(call
>>> MultiProfile,WP543,WP543_2M WP543_4M WP543_8M WP543_16M)) diff
>>> --git
>>> a/target/linux/ar71xx/patches-3.14/610-MIPS-ath79-openwrt-machines.patch
>>> b/target/linux/ar71xx/patches-3.14/610-MIPS-ath79-openwrt-machines.patch
>>>
>>> 
index 4ce9268..b01c5de 100644
>>> ---
>>> a/target/linux/ar71xx/patches-3.14/610-MIPS-ath79-openwrt-machines.patch
>>>
>>> 
+++ b/target/linux/ar71xx/patches-3.14/610-MIPS-ath79-openwrt-machines.patch
>>> @@ -1,6 +1,6 @@ --- a/arch/mips/ath79/machtypes.h +++
>>> b/arch/mips/ath79/machtypes.h -@@ -16,22 +16,145 @@ +@@ -16,22
>>> +16,146 @@
>>> 
>>> enum ath79_mach_type { ATH79_MACH_GENERIC = 0, @@ -119,6 +119,7
>>> @@ ATH79_MACH_UBNT_UAP_PRO,        /* Ubiquiti UniFi AP Pro */ 
>>> ATH79_MACH_UBNT_UNIFI,          /* Ubiquiti Unifi */ 
>>> ATH79_MACH_UBNT_UNIFI_OUTDOOR,  /* Ubiquiti UnifiAP Outdoor */ 
>>> ++      ATH79_MACH_UBNT_UNIFI_OUTDOOR_PLUS, /* Ubiquiti UnifiAP
>>> Outdoor+ */ ATH79_MACH_UBNT_XM,             /* Ubiquiti
>>> Networks XM board rev 1.0 */ +      ATH79_MACH_WHR_G301N,
>>> /* Buffalo WHR-G301N */ +      ATH79_MACH_WHR_HP_G300N,
>>> /* Buffalo WHR-HP-G300N */ diff --git
>>> a/target/linux/ar71xx/patches-3.14/616-MIPS-ath79-ubnt-xw.patch
>>> b/target/linux/ar71xx/patches-3.14/616-MIPS-ath79-ubnt-xw.patch
>>>
>>> 
index 3675518..8e16697 100644
>>> ---
>>> a/target/linux/ar71xx/patches-3.14/616-MIPS-ath79-ubnt-xw.patch
>>>
>>> 
+++ b/target/linux/ar71xx/patches-3.14/616-MIPS-ath79-ubnt-xw.patch
>>> @@ -1,6 +1,65 @@ --- a/arch/mips/ath79/mach-ubnt-xm.c +++
>>> b/arch/mips/ath79/mach-ubnt-xm.c -@@ -332,3 +332,78 @@ static
>>> void __init ubnt_uap_pro_setup(vo +@@ -186,6 +186,19 @@ static
>>> struct gpio_led ubnt_unifi_outdoo +       } + }; + ++static
>>> struct gpio_led ubnt_unifi_outdoor_plus_leds_gpio[] __initdata
>>> = { ++      { ++              .name           =
>>> "ubnt:white:front", ++              .gpio           = 1, ++
>>> .active_low     = 0, ++      }, { ++              .name
>>> = "ubnt:blue:front", ++              .gpio           = 0, ++
>>> .active_low     = 0, ++      } ++}; ++ ++ + static void __init
>>> ubnt_unifi_setup(void) + { +       u8 *mac = (u8 *)
>>> KSEG1ADDR(0x1fff0000); +@@ -245,6 +258,38 @@
>>> MIPS_MACHINE(ATH79_MACH_UBNT_UNIFI_OUTDO +            "Ubiquiti
>>> UniFiAP Outdoor", +            ubnt_unifi_outdoor_setup); + ++ 
>>> ++static void __init ubnt_unifi_outdoor_plus_setup(void) ++{ ++
>>> u8 *mac1 = (u8 *) KSEG1ADDR(0x1fff0000); ++      u8 *mac2 = (u8
>>> *) KSEG1ADDR(0x1fff0000 + ETH_ALEN); ++      u8 *ee = (u8 *)
>>> KSEG1ADDR(0x1fff1000); ++ ++      ath79_register_m25p80(NULL); 
>>> ++ ++      ath79_register_mdio(0, ~(UBNT_UNIFIOD_PRI_PHYMASK | 
>>> ++                               UBNT_UNIFIOD_2ND_PHYMASK)); 
>>> ++ ++      ath79_init_mac(ath79_eth0_data.mac_addr, mac1, 0); 
>>> ++      ath79_init_mac(ath79_eth1_data.mac_addr, mac2, 0); ++
>>> ath79_register_eth(0); ++      ath79_register_eth(1); ++ ++
>>> ap91_pci_init(ee, NULL); ++ ++
>>> ath79_register_leds_gpio(-1,
>>> ARRAY_SIZE(ubnt_unifi_outdoor_plus_leds_gpio), ++
>>> ubnt_unifi_outdoor_plus_leds_gpio); ++ ++
>>> ath79_register_gpio_keys_polled(-1,
>>> UBNT_XM_KEYS_POLL_INTERVAL, ++
>>> ARRAY_SIZE(ubnt_xm_gpio_keys), ++
>>> ubnt_xm_gpio_keys); ++} ++ 
>>> ++MIPS_MACHINE(ATH79_MACH_UBNT_UNIFI_OUTDOOR_PLUS, "UBNT-UOP", 
>>> ++           "Ubiquiti UniFiAP Outdoor+", ++
>>> ubnt_unifi_outdoor_plus_setup); ++ ++ + static struct gpio_led
>>> ubnt_uap_pro_gpio_leds[] __initdata = { +       { +
>>> .name           = "ubnt:white:dome", +@@ -332,3 +377,78 @@
>>> static void __init ubnt_uap_pro_setup(vo 
>>> MIPS_MACHINE(ATH79_MACH_UBNT_UAP_PRO, "UAP-PRO", "Ubiquiti
>>> UniFi AP Pro", ubnt_uap_pro_setup);
>>> 
>>> -- 2.2.1 _______________________________________________ 
>>> openwrt-devel mailing list openwrt-devel at lists.openwrt.org 
>>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
>>> 
> 
> 
> 
> _______________________________________________ openwrt-devel
> mailing list openwrt-devel at lists.openwrt.org 
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From hanno.schupp at gmail.com  Sun Jan 18 05:49:12 2015
From: hanno.schupp at gmail.com (hanno)
Date: Sun, 18 Jan 2015 23:49:12 +1300
Subject: [OpenWrt-Devel] [PATCH] [packages] dansguardian: Bump to 2.12.0.3
Message-ID: <20150118104912.GA22118@hanno-All-Series>

---
diff -uprN ../trunk/feeds/oldpackages/net/dansguardian/Makefile ./feeds/oldpackages/net/dansguardian/Makefile
--- ../trunk/feeds/oldpackages/net/dansguardian/Makefile	2015-01-18 10:49:03.101489863 +1300
+++ ./feeds/oldpackages/net/dansguardian/Makefile	2015-01-06 15:56:14.017306000 +1300
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dansguardian
-PKG_VERSION:=2.10.1.1
-PKG_RELEASE:=2
+PKG_VERSION:=2.12.0.3
+PKG_RELEASE:=1
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://dansguardian.org/downloads/2/Stable
-PKG_MD5SUM:=0987a1c9bfbdf398118386f10279611a
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=http://sourceforge.net/projects/dansguardian/files/
+PKG_MD5SUM:=2a88d0392cd28eaec02b7ee727b2e253
 
 PKG_INSTALL:=1
 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From hanno.schupp at gmail.com  Sun Jan 18 05:57:01 2015
From: hanno.schupp at gmail.com (hanno)
Date: Sun, 18 Jan 2015 23:57:01 +1300
Subject: [OpenWrt-Devel] [PATCH] [packages] new package squid3
Message-ID: <20150118105701.GB22118@hanno-All-Series>

This patch provides support for squid 3.4.10. Rather than replacing
squid2 a new package squid3 has been created  to avoid any
compatibility issues.
The squid.conf file has a number of options included that allow squid3
to run on OpenWrt directory structure. In addition a squid3 init
programme is provided that takes care of iptable rules for interecpt
proxy mode. 

Signed-off-by: Hanno Schupp <hanno.schupp at gmail.com>
---
diff -uprN ../trunk/feeds/packages/net/squid3/files/squid3.init ./feeds/packages/net/squid3/files/squid3.init
--- ../trunk/feeds/packages/net/squid3/files/squid3.init	1970-01-01 12:00:00.000000000 +1200
+++ ./feeds/packages/net/squid3/files/squid3.init	2015-01-18 23:20:53.795030540 +1300
@@ -0,0 +1,116 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2008-2013 OpenWrt.org
+# 
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+
+# This script will start or stop the squid 3 service and at the same time
+# create the appropriate iptable rules for intercepting (aka.transparent)
+# proxy mode. 'acl Safe_ports' directives will be intercepted using 
+# iptables to the intercepting http_port and 'acl SSL_ports will be 
+# redirected to the intercepting https_port. all iptable rules are removed 
+# when the service is stopped.
+
+START=90
+STOP=10
+
+USE_PROCD=1
+PROG=squid
+SSLCRTD_PROG=/usr/lib/squid3/ssl_crtd
+CONFIG_FILE=/etc/squid3/squid.conf
+
+service_triggers()
+{
+	procd_add_reload_trigger "$CONFIG_FILE"
+}
+
+ipt() {
+	opt=$1; shift
+	echo "iptables -D $*" >> /var/run/squid3.sh
+	iptables $opt $*
+}
+
+intercept_ports() {
+	intercepting=$1
+	acl_word=$2
+	while read o; do
+		case "$o" in
+		"$acl_word"*)
+			intercepted=$(echo "$o" | awk '{print $4;}'| sed 's/-/:/g')
+			lanip=$(uci get network.lan.ipaddr)
+			ipt -I prerouting_rule -t nat -p tcp -i br-lan --dport $intercepted -j DNAT --to $lanip:$intercepting
+		;;
+		esac
+	done < $CONFIG_FILE
+}
+
+add_firewall_rules() {
+	while read p; do
+		case "$p" in 
+		*intercept*)
+			case "$p" in 
+	  		*https_port*)
+				intercept_ports $(echo "$p" | awk '{print $2;}') 'acl SSL_ports'
+	    		;;
+			*http_port*)
+				intercept_ports $(echo "$p" | awk '{print $2;}') 'acl Safe_ports'
+    			;;
+			esac
+   			;;
+		esac
+	done < $CONFIG_FILE
+	[ -e /var/run/squid3.sh ] && chmod 755 /var/run/squid3.sh
+}
+
+remove_firewall_rules() {
+	if [ -e /var/run/squid3.sh ]; then
+		sh /var/run/squid3.sh 2>/dev/null
+		rm -f /var/run/squid3.sh 2>/dev/null
+	fi
+}
+
+start_service() {
+
+	if [ ! -z "$CONFIG_FILE" ]; then
+		
+		remove_firewall_rules	
+		
+		cache_dir=$(cat "$CONFIG_FILE" | awk '/cache_dir/ {print $3;}')
+		[ -z "cache_dir" ] && cache_dir=$(cat "$CONFIG_FILE" | awk '/coredump_dir/ {print $2;}')
+		[ -z "cache_dir" ] && cache_dir=/var/cache
+
+		if [ ! -d "$cache_dir" ]; then
+			mkdir -p "$cache_dir"
+			chown nobody:nogroup "$cache_dir"
+			chmod -R 777 "$cache_dir"
+			"$PROG" -z
+		fi
+		[ ! -d "$cache_dir/ssl_db" ] && "$SSLCRTD_PROG" -c -s "$cache_dir"/ssl_db
+		chown nobody:nogroup "$cache_dir"/ssl_db
+		chmod -R 777 "$cache_dir"/ssl_db
+# uncomment if you want the config file parsed before startup
+#		"$PROG" -k parse
+
+		procd_open_instance
+		procd_set_param command "$PROG" -N -f "$CONFIG_FILE"
+		procd_set_param file "$CONFIG_FILE"
+		procd_close_instance
+
+		add_firewall_rules
+
+		return
+	fi
+}
+
+stop_service() {
+	"$PROG" -k shutdown
+	remove_firewall_rules	
+}
+
+reload()
+{
+	"$PROG" -k reconfigure
+	remove_firewall_rules	
+	add_firewall_rules
+}
+
diff -uprN ../trunk/feeds/packages/net/squid3/files/squid.conf ./feeds/packages/net/squid3/files/squid.conf
--- ../trunk/feeds/packages/net/squid3/files/squid.conf	1970-01-01 12:00:00.000000000 +1200
+++ ./feeds/packages/net/squid3/files/squid.conf	2015-01-18 23:14:10.867143467 +1300
@@ -0,0 +1,92 @@
+#
+# Recommended minimum configuration for OpenWrt
+#
+
+# Example rule allowing access from your local networks.
+# Adapt to list your (internal) IP networks from where browsing
+# should be allowed
+acl localnet src 10.0.0.0/8	# RFC1918 possible internal network
+acl localnet src 172.16.0.0/12	# RFC1918 possible internal network
+acl localnet src 192.168.0.0/16	# RFC1918 possible internal network
+acl localnet src fc00::/7       # RFC 4193 local private network range
+acl localnet src fe80::/10      # RFC 4291 link-local (directly plugged) machines
+
+acl SSL_ports port 443
+acl Safe_ports port 80		# http
+acl Safe_ports port 21		# ftp
+acl Safe_ports port 443		# https
+acl Safe_ports port 70		# gopher
+acl Safe_ports port 210		# wais
+acl Safe_ports port 1025-65535	# unregistered ports
+acl Safe_ports port 280		# http-mgmt
+acl Safe_ports port 488		# gss-http
+acl Safe_ports port 591		# filemaker
+acl Safe_ports port 777		# multiling http
+acl CONNECT method CONNECT
+
+#
+# Recommended minimum Access Permission configuration:
+#
+# Deny requests to certain unsafe ports
+http_access deny !Safe_ports
+
+# Deny CONNECT to other than secure SSL ports
+http_access deny CONNECT !SSL_ports
+
+# Only allow cachemgr access from localhost
+http_access allow localhost manager
+http_access deny manager
+
+# We strongly recommend the following be uncommented to protect innocent
+# web applications running on the proxy server who think the only
+# one who can access services on "localhost" is a local user
+#http_access deny to_localhost
+
+#
+# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
+#
+
+# Example rule allowing access from your local networks.
+# Adapt localnet in the ACL section to list your (internal) IP networks
+# from where browsing should be allowed
+http_access allow localnet
+http_access allow localhost
+
+# And finally deny all other access to this proxy
+http_access deny all
+
+# Squid normally listens to port 3128
+http_port 3128
+
+# Uncomment and adjust the following to add a disk cache directory.
+#cache_dir ufs /var/cache/squid 100 16 256
+
+# Leave coredumps in the first cache dir
+coredump_dir /var/cache/squid
+
+#
+# Add any of your own refresh_pattern entries above these.
+#
+refresh_pattern ^ftp:		1440	20%	10080
+refresh_pattern ^gopher:	1440	0%	1440
+refresh_pattern -i (/cgi-bin/|\?) 0	0%	0
+refresh_pattern .		0	20%	4320
+
+# Above this line is Squid 3.4.10 default configuration. The section below is
+# added to make squid work within OpenWrt's file structure.
+# Please note:
+# If you want to provide a caching service you will need more than the few
+# MB a normal consume rgrade router can provide. You will need an external
+# harddrive, which needs to be configured and mounted outside of squid. 
+# You can redirect your caching directory to your needs by chanching the 
+# coredump_dir variable below. The supplied squid init programme will
+# use this setting as well to establish the necessary file structure
+
+# Openwrt specific configuration 
+access_log /var/cache/squid/access.log squid
+cache_log /var/cache/squid/cache.log            
+cache_store_log /var/cache/squid/store.log
+pid_filename /var/run/squid.pid
+cache_effective_user nobody
+cache_effective_group nogroup
+
diff -uprN ../trunk/feeds/packages/net/squid3/Makefile ./feeds/packages/net/squid3/Makefile
--- ../trunk/feeds/packages/net/squid3/Makefile	1970-01-01 12:00:00.000000000 +1200
+++ ./feeds/packages/net/squid3/Makefile	2015-01-18 20:44:51.460082346 +1300
@@ -0,0 +1,135 @@
+#
+# Copyright (C) 2006-2012 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:=squid
+PKG_VERSION:=3.4.10
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=http://www.squid-cache.org/Versions/v3/3.4/
+PKG_MD5SUM:=326283b0c37e7dc9b2f90dc0ecd9a8a4
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/squid3/Default
+  SECTION:=net
+  CATEGORY:=Network
+  SUBMENU:=Web Servers/Proxies
+  URL:=http://www.squid-cache.org/
+endef
+
+define Package/squid3
+  $(call Package/squid3/Default)
+  MENU:=1
+  DEPENDS:=+libpthread +libopenssl +librt +libltdl +libstdcpp +libnetfilter-conntrack +libnettle
+  TITLE:=full-featured Web proxy cache
+endef
+
+define Package/squid3/description
+	Squid is a high-performance proxy caching server for web clients,
+	supporting FTP, gopher, and HTTP data objects. Unlike traditional
+	caching software, Squid handles all requests in a single,
+	non-blocking, I/O-driven process.
+	This implementation is geared specifically toward transparent
+	proxying and caching of HTTP and HTTPS traffic, including sslbump
+	and dynamic certificate generation.
+endef
+
+define Package/squid3/conffiles
+/etc/squid3/cachemgr.conf
+/etc/squid3/errorpage.css
+/etc/squid3/mime.conf
+/etc/squid3/squid.conf
+endef
+
+# --disable-arch-native  required for X86 X86_64 platforms
+CONFIGURE_ARGS += \
+	--datadir=/usr/share/squid3 \
+	--libexecdir=/usr/lib/squid3 \
+	--sysconfdir=/etc/squid3 \
+	--config-cache \
+	--enable-shared \
+	--enable-static \
+	--enable-x-accelerator-vary \
+	--with-pthreads \
+	--with-dl \
+	--enable-icmp \
+	--enable-kill-parent-hack \
+	--enable-arp-acl \
+	--enable-err-languages=English \
+	--enable-default-err-language=English \
+	--enable-linux-netfilter \
+	--enable-icmp \
+	--disable-arch-native \
+	--disable-external-acl-helpers \
+	--disable-auth-negotiate \
+	--disable-auth-ntlm \
+	--disable-auth-digest \
+	--disable-auth-basic \
+	--disable-wccp \
+	--disable-wccpv2 \
+	--disable-snmp \
+	--disable-htcp \
+	--enable-underscores \
+	--enable-cache-digests \
+	--enable-referer-log \
+	--enable-delay-pools \
+	--enable-useragent-log \
+	--enable-storeio \
+	--enable-epoll \
+	--with-maxfd=4096 \
+	--without-libcap \
+	--with-krb5-config=no \
+	--enable-ssl \
+	--enable-ssl-crtd \
+	--enable-icap-client
+
+#	--with-openssl=$(STAGING_DIR)/usr \
+CONFIGURE_VARS += \
+	ac_cv_header_linux_netfilter_ipv4_h=yes \
+	ac_cv_epoll_works=yes \
+
+define Build/Compile
+	# pass INCLUDES to compile host sources against our OpenSSL, not the host one
+	$(MAKE) -C $(PKG_BUILD_DIR)/lib \
+		all
+	$(MAKE) -C $(PKG_BUILD_DIR) \
+		DESTDIR="$(PKG_INSTALL_DIR)" \
+		install
+endef
+
+define BuildPlugin
+  define Package/$(1)/install
+	$(INSTALL_DIR) $$(1)/usr/lib/squid3
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/squid3/$(2) $$(1)/usr/lib/squid3/
+  endef
+
+  $$(eval $$(call BuildPackage,$(1)))
+endef
+
+define Package/squid3/install
+	$(INSTALL_DIR) $(1)/etc/squid3
+	$(CP) $(PKG_INSTALL_DIR)/etc/squid3/* $(1)/etc/squid3/
+	$(INSTALL_DIR) $(1)/usr/bin
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/purge $(1)/usr/bin/
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/squidclient $(1)/usr/bin/
+	$(INSTALL_DIR) $(1)/usr/share/squid3
+	$(CP) $(PKG_INSTALL_DIR)/usr/share/squid3/* $(1)/usr/share/squid3/
+	$(INSTALL_DIR) $(1)/usr/sbin
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/squid $(1)/usr/sbin/
+	$(INSTALL_DIR) $(1)/usr/lib/squid3
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/squid3/* $(1)/usr/lib/squid3/
+	/bin/chmod 4755 $(1)/usr/lib/squid3/pinger
+	$(INSTALL_DIR) $(1)/etc/init.d
+	$(CP) ./files/squid3.init $(1)/etc/init.d/squid3
+	/bin/chmod 4755 $(1)/etc/init.d/squid3
+	$(CP) ./files/squid.conf $(1)/etc/squid3/squid.conf
+endef
+
+$(eval $(call BuildPackage,squid3))
diff -uprN ../trunk/feeds/packages/net/squid3/patches/001-cross_compile.patch ./feeds/packages/net/squid3/patches/001-cross_compile.patch
--- ../trunk/feeds/packages/net/squid3/patches/001-cross_compile.patch	1970-01-01 12:00:00.000000000 +1200
+++ ./feeds/packages/net/squid3/patches/001-cross_compile.patch	2014-05-16 04:51:06.000000000 +1200
@@ -0,0 +1,11 @@
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -7295,7 +7295,7 @@
+ 
+ # cf_gen builds the configuration files.
+ cf_gen$(EXEEXT): $(cf_gen_SOURCES) $(cf_gen_DEPENDENCIES) cf_gen_defines.cci
+-	$(HOSTCXX) -o $@ $(srcdir)/cf_gen.cc -I$(srcdir) -I$(top_builddir)/include/ -I$(top_builddir)/src
++	g++ -o $@ $(srcdir)/cf_gen.cc -I$(srcdir) -I$(top_builddir)/include/ -I$(top_builddir)/src
+ 
+ # squid.conf.default is built by cf_gen when making cf_parser.cci
+ squid.conf.default squid.conf.documented: cf_parser.cci
diff -uprN ../trunk/feeds/packages/net/squid3/patches/002-cross_compile_notest.patch ./feeds/packages/net/squid3/patches/002-cross_compile_notest.patch
--- ../trunk/feeds/packages/net/squid3/patches/002-cross_compile_notest.patch	1970-01-01 12:00:00.000000000 +1200
+++ ./feeds/packages/net/squid3/patches/002-cross_compile_notest.patch	2015-01-18 19:55:29.683839992 +1300
@@ -0,0 +1,56 @@
+--- squid-3.4.10/configure	
++++ squid-3.4.10/configure	
+@@ -22223,7 +22223,7 @@
+   if test "$cross_compiling" = yes; then :
+   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-as_fn_error $? "cannot run test program while cross compiling
++as_fn_error1 $? "cannot run test program while cross compiling
+ See \`config.log' for more details" "$LINENO" 5; }
+ else
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+@@ -22271,7 +22271,7 @@
+   if test "$cross_compiling" = yes; then :
+   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-as_fn_error $? "cannot run test program while cross compiling
++as_fn_error1 $? "cannot run test program while cross compiling
+ See \`config.log' for more details" "$LINENO" 5; }
+ else
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+@@ -24876,7 +24876,7 @@
+     if test "$cross_compiling" = yes; then :
+   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-as_fn_error $? "cannot run test program while cross compiling
++as_fn_error1 $? "cannot run test program while cross compiling
+ See \`config.log' for more details" "$LINENO" 5; }
+ else
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+@@ -24901,7 +24901,7 @@
+     if test "$cross_compiling" = yes; then :
+   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-as_fn_error $? "cannot run test program while cross compiling
++as_fn_error1 $? "cannot run test program while cross compiling
+ See \`config.log' for more details" "$LINENO" 5; }
+ else
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+@@ -33985,6 +33985,17 @@
+   $as_echo "$as_me: error: $2" >&2
+   as_fn_exit $as_status
+ } # as_fn_error
++as_fn_error1 ()
++{
++  as_status=$1; test $as_status -eq 0 && as_status=1
++  if test "$4"; then
++    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
++    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
++  fi
++  $as_echo "$as_me: error: $2" >&2
++  #as_fn_exit $as_status
++} # as_fn_error
++
+ 
+ 
+ # as_fn_set_status STATUS
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From nbd at openwrt.org  Sun Jan 18 06:01:32 2015
From: nbd at openwrt.org (Felix Fietkau)
Date: Sun, 18 Jan 2015 12:01:32 +0100
Subject: [OpenWrt-Devel] [PATCH] [packages] dansguardian: Bump to
	2.12.0.3
In-Reply-To: <20150118104912.GA22118@hanno-All-Series>
References: <20150118104912.GA22118@hanno-All-Series>
Message-ID: <54BB928C.70202@openwrt.org>

On 2015-01-18 11:49, hanno wrote:
> ---
> diff -uprN ../trunk/feeds/oldpackages/net/dansguardian/Makefile ./feeds/oldpackages/net/dansguardian/Makefile
> --- ../trunk/feeds/oldpackages/net/dansguardian/Makefile	2015-01-18 10:49:03.101489863 +1300
> +++ ./feeds/oldpackages/net/dansguardian/Makefile	2015-01-06 15:56:14.017306000 +1300
oldpackages is unmaintained. We will not take patches for it.
You can find more information here:

https://forum.openwrt.org/viewtopic.php?id=52219

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


From nbd at openwrt.org  Sun Jan 18 06:02:10 2015
From: nbd at openwrt.org (Felix Fietkau)
Date: Sun, 18 Jan 2015 12:02:10 +0100
Subject: [OpenWrt-Devel] [PATCH] [packages] new package squid3
In-Reply-To: <20150118105701.GB22118@hanno-All-Series>
References: <20150118105701.GB22118@hanno-All-Series>
Message-ID: <54BB92B2.2090200@openwrt.org>

On 2015-01-18 11:57, hanno wrote:
> This patch provides support for squid 3.4.10. Rather than replacing
> squid2 a new package squid3 has been created  to avoid any
> compatibility issues.
> The squid.conf file has a number of options included that allow squid3
> to run on OpenWrt directory structure. In addition a squid3 init
> programme is provided that takes care of iptable rules for interecpt
> proxy mode. 
> 
> Signed-off-by: Hanno Schupp <hanno.schupp at gmail.com>
Please submit it to the github project, along with maintainer information.

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


From hanno.schupp at gmail.com  Sun Jan 18 06:15:20 2015
From: hanno.schupp at gmail.com (hanno)
Date: Mon, 19 Jan 2015 00:15:20 +1300
Subject: [OpenWrt-Devel] [Patch] [x86_64] Enable multi-processor support and
 hyperthreading by default
Message-ID: <20150118111520.GA23665@hanno-All-Series>

There are very few (if any?) x86 64bit processors with a single core.
This patch enables multiple processor support and hyperthreading for
x86_64 target by default.

Signed-off-by: Hanno Schupp <hanno.schupp at gmail.com>
---
--- ../trunk/target/linux/x86_64/config-default	2015-01-18 23:59:55.665702005 +1300
+++ ./target/linux/x86_64/config-default	2015-01-19 00:08:38.989511804 +1300
@@ -48,6 +48,7 @@ CONFIG_ARCH_PHYS_ADDR_T_64BIT=y
 CONFIG_ARCH_SELECT_MEMORY_MODEL=y
 CONFIG_ARCH_SPARSEMEM_DEFAULT=y
 CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y
 CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
 CONFIG_ARCH_SUPPORTS_INT128=y
 CONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y
@@ -93,6 +94,7 @@ CONFIG_CPU_FREQ_STAT=y
 CONFIG_CPU_FREQ_STAT_DETAILS=y
 CONFIG_CPU_IDLE=y
 CONFIG_CPU_IDLE_GOV_LADDER=y
+CONFIG_CPU_RMAP=y
 CONFIG_CPU_SUP_AMD=y
 CONFIG_CPU_SUP_CENTAUR=y
 CONFIG_CPU_SUP_INTEL=y
@@ -169,8 +171,8 @@ CONFIG_GENERIC_IO=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_GENERIC_IRQ_SHOW=y
 CONFIG_GENERIC_ISA_DMA=y
-CONFIG_GENERIC_NET_UTILS=y
 CONFIG_GENERIC_PCI_IOMAP=y
+CONFIG_GENERIC_PENDING_IRQ=y
 CONFIG_GENERIC_SMP_IDLE_THREAD=y
 CONFIG_GENERIC_STRNCPY_FROM_USER=y
 CONFIG_GENERIC_STRNLEN_USER=y
@@ -278,6 +280,7 @@ CONFIG_INSTRUCTION_DECODER=y
 # CONFIG_IOMMU_DEBUG is not set
 CONFIG_IOMMU_HELPER=y
 # CONFIG_IOMMU_STRESS is not set
+CONFIG_IOSF_MBI=m
 CONFIG_IO_DELAY_0X80=y
 # CONFIG_IO_DELAY_0XED is not set
 # CONFIG_IO_DELAY_NONE is not set
@@ -304,6 +307,7 @@ CONFIG_KVM_GUEST=y
 CONFIG_LPC_ICH=y
 # CONFIG_MACHZ_WDT is not set
 # CONFIG_MATOM is not set
+# CONFIG_MAXSMP is not set
 # CONFIG_MCORE2 is not set
 # CONFIG_MEMORY_HOTPLUG is not set
 # CONFIG_MEMTEST is not set
@@ -312,28 +316,29 @@ CONFIG_MFD_CORE=y
 # CONFIG_MICROCODE_AMD_EARLY is not set
 # CONFIG_MICROCODE_INTEL_EARLY is not set
 # CONFIG_MK8 is not set
-# CONFIG_MLX5_CORE is not set
 CONFIG_MODULES_USE_ELF_RELA=y
 # CONFIG_MPSC is not set
 CONFIG_MTD_BLOCK2MTD=y
 # CONFIG_MTD_NETSC520 is not set
 # CONFIG_MTD_SBC_GXX is not set
 # CONFIG_MTD_SC520CDP is not set
+CONFIG_MTD_SPLIT_SUPPORT=y
 # CONFIG_MTD_TS5500 is not set
 CONFIG_MTRR=y
 # CONFIG_MTRR_SANITIZER is not set
+CONFIG_MUTEX_SPIN_ON_OWNER=y
 CONFIG_NAMESPACES=y
 CONFIG_NEED_DMA_MAP_STATE=y
 CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y
-CONFIG_NEED_PER_CPU_KM=y
 CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y
 CONFIG_NEED_SG_DMA_LENGTH=y
+CONFIG_NET_FLOW_LIMIT=y
 # CONFIG_NET_NS is not set
-CONFIG_NET_RX_BUSY_POLL=y
 CONFIG_NLS=y
 CONFIG_NO_BOOTMEM=y
-CONFIG_NR_CPUS=1
+CONFIG_NR_CPUS=2
 # CONFIG_NTB is not set
+# CONFIG_NUMA is not set
 CONFIG_NVRAM=y
 CONFIG_OPROFILE_NMI_TIMER=y
 # CONFIG_OPTIMIZE_INLINING is not set
@@ -342,6 +347,7 @@ CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_PARAVIRT=y
 CONFIG_PARAVIRT_CLOCK=y
 # CONFIG_PARAVIRT_DEBUG is not set
+# CONFIG_PARAVIRT_SPINLOCKS is not set
 # CONFIG_PARAVIRT_TIME_ACCOUNTING is not set
 # CONFIG_PC87413_WDT is not set
 CONFIG_PCI=y
@@ -365,10 +371,12 @@ CONFIG_POWER_SUPPLY=y
 CONFIG_PROC_PAGE_MONITOR=y
 # CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set
 # CONFIG_PVPANIC is not set
-# CONFIG_RCU_STALL_COMMON is not set
+CONFIG_RCU_STALL_COMMON=y
 CONFIG_RD_BZIP2=y
 CONFIG_RD_GZIP=y
 # CONFIG_RELOCATABLE is not set
+CONFIG_RFS_ACCEL=y
+CONFIG_RPS=y
 CONFIG_RTC_CLASS=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 # CONFIG_SAMSUNG_Q10 is not set
@@ -377,7 +385,9 @@ CONFIG_SATA_AHCI=y
 # CONFIG_SBC_EPX_C3_WATCHDOG is not set
 # CONFIG_SC1200_WDT is not set
 # CONFIG_SC520_WDT is not set
-# CONFIG_SCHED_HRTICK is not set
+CONFIG_SCHED_HRTICK=y
+CONFIG_SCHED_MC=y
+CONFIG_SCHED_SMT=y
 CONFIG_SCSI=y
 CONFIG_SCSI_VIRTIO=y
 CONFIG_SERIAL_8250_PCI=y
@@ -389,8 +399,10 @@ CONFIG_SERIO_LIBPS2=y
 CONFIG_SERIO_SERPORT=y
 # CONFIG_SLAB is not set
 CONFIG_SLUB=y
+CONFIG_SLUB_CPU_PARTIAL=y
 CONFIG_SLUB_DEBUG=y
 # CONFIG_SLUB_DEBUG_ON is not set
+CONFIG_SMP=y
 # CONFIG_SMSC37B787_WDT is not set
 # CONFIG_SMSC_SCH311X_WDT is not set
 CONFIG_SPARSEMEM=y
@@ -400,6 +412,7 @@ CONFIG_SPARSEMEM_MANUAL=y
 # CONFIG_SPARSEMEM_VMEMMAP is not set
 CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
 CONFIG_SPARSE_IRQ=y
+CONFIG_STOP_MACHINE=y
 CONFIG_STRICT_DEVMEM=y
 CONFIG_SWIOTLB=y
 CONFIG_SYSCTL_EXCEPTION_TRACE=y
@@ -414,8 +427,10 @@ CONFIG_THERMAL_GOV_STEP_WISE=y
 # CONFIG_THERMAL_GOV_USER_SPACE is not set
 # CONFIG_THINKPAD_ACPI is not set
 CONFIG_TICK_CPU_ACCOUNTING=y
+# CONFIG_TINY_RCU is not set
 # CONFIG_TOPSTAR_LAPTOP is not set
 # CONFIG_TOSHIBA_BT_RFKILL is not set
+CONFIG_TREE_RCU=y
 CONFIG_USB=y
 CONFIG_USB_COMMON=y
 CONFIG_USB_EHCI_HCD=y
@@ -457,7 +472,9 @@ CONFIG_VT_HW_CONSOLE_BINDING=y
 # CONFIG_WAFER_WDT is not set
 CONFIG_WATCHDOG_CORE=y
 CONFIG_X86=y
+# CONFIG_X86_16BIT is not set
 CONFIG_X86_64=y
+CONFIG_X86_64_SMP=y
 # CONFIG_X86_ACPI_CPUFREQ is not set
 # CONFIG_X86_CHECK_BIOS_CORRUPTION is not set
 CONFIG_X86_CMOV=y
@@ -466,6 +483,7 @@ CONFIG_X86_CMPXCHG64=y
 CONFIG_X86_DEBUGCTLMSR=y
 CONFIG_X86_DEV_DMA_OPS=y
 # CONFIG_X86_EXTENDED_PLATFORM is not set
+CONFIG_X86_HT=y
 # CONFIG_X86_INTEL_LPSS is not set
 # CONFIG_X86_INTEL_PSTATE is not set
 CONFIG_X86_INTERNODE_CACHE_SHIFT=6
@@ -475,7 +493,6 @@ CONFIG_X86_LOCAL_APIC=y
 CONFIG_X86_MCE=y
 CONFIG_X86_MCE_AMD=y
 # CONFIG_X86_MCE_INJECT is not set
-# CONFIG_X86_16BIT is not set
 CONFIG_X86_MCE_INTEL=y
 CONFIG_X86_MCE_THRESHOLD=y
 CONFIG_X86_MINIMUM_CPU_FAMILY=64
@@ -499,8 +516,8 @@ CONFIG_X86_VERBOSE_BOOTUP=y
 # CONFIG_XEN is not set
 # CONFIG_XEN_PRIVILEGED_GUEST is not set
 # CONFIG_XO15_EBOOK is not set
+CONFIG_XPS=y
 CONFIG_XZ_DEC_BCJ=y
 CONFIG_XZ_DEC_X86=y
-# CONFIG_ZBUD is not set
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZONE_DMA32=y
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From ryazanov.s.a at gmail.com  Sun Jan 18 06:45:14 2015
From: ryazanov.s.a at gmail.com (Sergey Ryazanov)
Date: Sun, 18 Jan 2015 14:45:14 +0300
Subject: [OpenWrt-Devel] Hardlock in ath9k
In-Reply-To: <54B7AAC9.6010900@openwrt.org>
References: <54B6C138.9090206@sottospazio.it> <54B73340.7000000@openwrt.org>
 <54B7A8F9.9040700@sottospazio.it> <54B7AAC9.6010900@openwrt.org>
Message-ID: <CAHNKnsQhpf76oEVH5OP6ghkXeRQqP66B+Hv8NxOiXpoRC01sSA@mail.gmail.com>

2015-01-15 14:55 GMT+03:00 Felix Fietkau <nbd at openwrt.org>:
> On 2015-01-15 12:48, Gianluca Anzolin wrote:
>> Il 15/01/2015 04:25, Felix Fietkau ha scritto:
>>> On 2015-01-14 20:19, Gianluca Anzolin wrote:
>>>> Hi,
>>>>
>>>> I was just testing this evening, just for fun, a new build with the just
>>>> released musl libc (1.1.6) on my new router (Archer C7) but
>>>> unfortunately it bricked my router.
>>>>
>>>> Initially I feared that I did something wrong when updating the libc but
>>>> this turned out not to be the case.
>>>>
>>>> With the help of a serial cable I noticed that the router freezed when
>>>> trying to bring up the wireless interface (in the NG band).
>>>>
>>>> I skimmed through the commits and reverted the last ath9k commit:
>>>>
>>>> git-svn-id: svn://svn.openwrt.org/openwrt/trunk at 43971
>>>> 3c298f89-4303-0410-b956-a3cf2f4a3e73
>>>>
>>>> I rebuilt the image and the router worked.
>>>>
>>>> I haven't had the time to look at the actual commit yet, I just wanted
>>>> to let you know.
>>> Please try applying http://nbd.name/ath79-irq-disable.patch to your
>>> kernel tree and see if it fixes the issue.
>>>
>>> - Felix
>> I still get freezes when bringing up the wifi interface even with that
>> patch applied
> I just finished debugging this and I'm going to commit fixes very soon.
> Turns out it was a rather nasty cascade of bugs.
>
> My patch would have fixed the bug of being unable to disable the
> WMAC/PCI interrupts, however disable_irq() on MIPS CPU irqs is
> completely broken as well (and has been for many years).
> This led to some nasty IRQ storms.
>
Hello Felix,

could you advice, how do you detect interrupt storms? I'm debugging an
occasionally freeze of AR5312 based board during MAC chip reset, and
consider that the unexpected interrupt is one of the possible cause.
And I wonder how to check that.

-- 
Sergey
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From hanno.schupp at gmail.com  Sun Jan 18 06:45:18 2015
From: hanno.schupp at gmail.com (hanno)
Date: Mon, 19 Jan 2015 00:45:18 +1300
Subject: [OpenWrt-Devel] [Patch] [packages] new package dansguardian
Message-ID: <20150118114518.GA6650@hanno-All-Series>

Moved new version 2.12.03 from oldpackages to packages as request by Felix
Fietkau

Signed-off-by: Hanno Schupp <hanno.schupp at gmail.com>
---
diff -uprN ../trunk/feeds/packages/net/dansguardian/Makefile ./feeds/packages/net/dansguardian/Makefile
--- ../trunk/feeds/packages/net/dansguardian/Makefile	1970-01-01 12:00:00.000000000 +1200
+++ ./feeds/packages/net/dansguardian/Makefile	2015-01-06 15:56:14.017306000 +1300
@@ -0,0 +1,62 @@
+#
+# Copyright (C) 2008-2009 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:=dansguardian
+PKG_VERSION:=2.12.0.3
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=http://sourceforge.net/projects/dansguardian/files/
+PKG_MD5SUM:=2a88d0392cd28eaec02b7ee727b2e253
+
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/uclibc++.mk
+include $(INCLUDE_DIR)/package.mk
+
+define Package/dansguardian
+  SECTION:=net
+  DEPENDS:=+libpthread $(CXX_DEPENDS) +zlib
+  CATEGORY:=Network
+  SUBMENU:=Web Servers/Proxies
+  TITLE:=DansGuardian
+  URL:=http://dansguardian.org
+endef
+
+define Package/dansguardian/conffiles
+/etc/dansguardian/dansguardian.conf
+endef
+
+CONFIGURE_VARS += \
+	INCLUDES="" \
+	CXXFLAGS="$$$$CXXFLAGS -fno-rtti"  \
+	LIBS="-lpthread" \
+
+define Build/Configure
+	$(call Build/Configure/Default,\
+		--disable-clamav \
+		--with-sysconfsubdir=dansguardian \
+		--with-proxyuser=root \
+		--with-proxygroup=root \
+		--disable-pcre \
+	)
+endef
+
+define Package/dansguardian/install
+	$(INSTALL_DIR) $(1)/usr/sbin
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dansguardian $(1)/usr/sbin/
+	$(INSTALL_DIR) $(1)/etc
+	$(CP) $(PKG_INSTALL_DIR)/etc/dansguardian $(1)/etc/
+	$(INSTALL_DIR) $(1)/usr/share/dansguardian
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/dansguardian/transparent1x1.gif $(1)/usr/share/dansguardian/
+	$(INSTALL_DIR) $(1)/usr/share/dansguardian/languages/ukenglish
+	$(CP) $(PKG_INSTALL_DIR)/usr/share/dansguardian/languages/ukenglish/* $(1)/usr/share/dansguardian/languages/ukenglish/
+endef
+
+$(eval $(call BuildPackage,dansguardian))
diff -uprN ../trunk/feeds/packages/net/dansguardian/patches/001-include_dir.patch ./feeds/packages/net/dansguardian/patches/001-include_dir.patch
--- ../trunk/feeds/packages/net/dansguardian/patches/001-include_dir.patch	1970-01-01 12:00:00.000000000 +1200
+++ ./feeds/packages/net/dansguardian/patches/001-include_dir.patch	2015-01-06 08:08:58.494773000 +1300
@@ -0,0 +1,29 @@
+--- a/configure
++++ b/configure
+@@ -861,7 +861,7 @@ sysconfdir='${prefix}/etc'
+ sharedstatedir='${prefix}/com'
+ localstatedir='${prefix}/var'
+ includedir='${prefix}/include'
+-oldincludedir='/usr/include'
++oldincludedir='${prefix}/usr/include'
+ docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+ infodir='${datarootdir}/info'
+ htmldir='${docdir}'
+@@ -6317,7 +6317,7 @@ $as_echo_n "checking for zlib... " >&6; 
+ # Check whether --with-zlib was given.
+ if test "${with_zlib+set}" = set; then
+   withval=$with_zlib;  # check for header & func (in library) in given prefix
+-	CPPFLAGS="${CPPFLAGS} -I${withval}/include"
++	CPPFLAGS="${CPPFLAGS}"
+ 	if test "x$staticzlib" = "xtrue"; then
+ 		LIBS="-Bstatic -L${withval} -lz -Bdynamic ${LIBS}"
+ 	else
+@@ -10042,7 +10042,7 @@ _ACEOF
+ if test "${with_libiconv+set}" = set; then
+   withval=$with_libiconv;  # check for header & func (in library) in given prefix
+ 			if test "x$withval" != "x"; then
+-				CPPFLAGS="${CPPFLAGS} -I${withval}/include"
++				CPPFLAGS="${CPPFLAGS}"
+ 				LIBS="-L${withval}/lib -liconv ${LIBS}"
+ 			else
+ 				LIBS="-liconv ${LIBS}"
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From slachta at cesnet.cz  Sun Jan 18 06:50:40 2015
From: slachta at cesnet.cz (Jiri Slachta)
Date: Sun, 18 Jan 2015 12:50:40 +0100
Subject: [OpenWrt-Devel] [Patch] [packages] new package dansguardian
In-Reply-To: <20150118114518.GA6650@hanno-All-Series>
References: <20150118114518.GA6650@hanno-All-Series>
Message-ID: <54BB9E10.50105@cesnet.cz>

Hello Hanno,

openwrt-devel mailing list is intended to be used for patches against
the base OpenWrt repository. The packages repository has been moved
to github where all changes are merged as pull requests. 

See the statement about the transition to github:
	https://forum.openwrt.org/viewtopic.php?id=51078

The new packages repository is located here:
	http://github.com/openwrt/packages

Kind regards,
Jiri Slachta

Dne 18.1.2015 v 12:45 hanno napsal(a):
> Moved new version 2.12.03 from oldpackages to packages as request by Felix
> Fietkau
> 
> Signed-off-by: Hanno Schupp <hanno.schupp at gmail.com>
> ---
> diff -uprN ../trunk/feeds/packages/net/dansguardian/Makefile ./feeds/packages/net/dansguardian/Makefile
> --- ../trunk/feeds/packages/net/dansguardian/Makefile	1970-01-01 12:00:00.000000000 +1200
> +++ ./feeds/packages/net/dansguardian/Makefile	2015-01-06 15:56:14.017306000 +1300
> @@ -0,0 +1,62 @@
> +#
> +# Copyright (C) 2008-2009 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:=dansguardian
> +PKG_VERSION:=2.12.0.3
> +PKG_RELEASE:=1
> +
> +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
> +PKG_SOURCE_URL:=http://sourceforge.net/projects/dansguardian/files/
> +PKG_MD5SUM:=2a88d0392cd28eaec02b7ee727b2e253
> +
> +PKG_INSTALL:=1
> +
> +include $(INCLUDE_DIR)/uclibc++.mk
> +include $(INCLUDE_DIR)/package.mk
> +
> +define Package/dansguardian
> +  SECTION:=net
> +  DEPENDS:=+libpthread $(CXX_DEPENDS) +zlib
> +  CATEGORY:=Network
> +  SUBMENU:=Web Servers/Proxies
> +  TITLE:=DansGuardian
> +  URL:=http://dansguardian.org
> +endef
> +
> +define Package/dansguardian/conffiles
> +/etc/dansguardian/dansguardian.conf
> +endef
> +
> +CONFIGURE_VARS += \
> +	INCLUDES="" \
> +	CXXFLAGS="$$$$CXXFLAGS -fno-rtti"  \
> +	LIBS="-lpthread" \
> +
> +define Build/Configure
> +	$(call Build/Configure/Default,\
> +		--disable-clamav \
> +		--with-sysconfsubdir=dansguardian \
> +		--with-proxyuser=root \
> +		--with-proxygroup=root \
> +		--disable-pcre \
> +	)
> +endef
> +
> +define Package/dansguardian/install
> +	$(INSTALL_DIR) $(1)/usr/sbin
> +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dansguardian $(1)/usr/sbin/
> +	$(INSTALL_DIR) $(1)/etc
> +	$(CP) $(PKG_INSTALL_DIR)/etc/dansguardian $(1)/etc/
> +	$(INSTALL_DIR) $(1)/usr/share/dansguardian
> +	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/dansguardian/transparent1x1.gif $(1)/usr/share/dansguardian/
> +	$(INSTALL_DIR) $(1)/usr/share/dansguardian/languages/ukenglish
> +	$(CP) $(PKG_INSTALL_DIR)/usr/share/dansguardian/languages/ukenglish/* $(1)/usr/share/dansguardian/languages/ukenglish/
> +endef
> +
> +$(eval $(call BuildPackage,dansguardian))
> diff -uprN ../trunk/feeds/packages/net/dansguardian/patches/001-include_dir.patch ./feeds/packages/net/dansguardian/patches/001-include_dir.patch
> --- ../trunk/feeds/packages/net/dansguardian/patches/001-include_dir.patch	1970-01-01 12:00:00.000000000 +1200
> +++ ./feeds/packages/net/dansguardian/patches/001-include_dir.patch	2015-01-06 08:08:58.494773000 +1300
> @@ -0,0 +1,29 @@
> +--- a/configure
> ++++ b/configure
> +@@ -861,7 +861,7 @@ sysconfdir='${prefix}/etc'
> + sharedstatedir='${prefix}/com'
> + localstatedir='${prefix}/var'
> + includedir='${prefix}/include'
> +-oldincludedir='/usr/include'
> ++oldincludedir='${prefix}/usr/include'
> + docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
> + infodir='${datarootdir}/info'
> + htmldir='${docdir}'
> +@@ -6317,7 +6317,7 @@ $as_echo_n "checking for zlib... " >&6; 
> + # Check whether --with-zlib was given.
> + if test "${with_zlib+set}" = set; then
> +   withval=$with_zlib;  # check for header & func (in library) in given prefix
> +-	CPPFLAGS="${CPPFLAGS} -I${withval}/include"
> ++	CPPFLAGS="${CPPFLAGS}"
> + 	if test "x$staticzlib" = "xtrue"; then
> + 		LIBS="-Bstatic -L${withval} -lz -Bdynamic ${LIBS}"
> + 	else
> +@@ -10042,7 +10042,7 @@ _ACEOF
> + if test "${with_libiconv+set}" = set; then
> +   withval=$with_libiconv;  # check for header & func (in library) in given prefix
> + 			if test "x$withval" != "x"; then
> +-				CPPFLAGS="${CPPFLAGS} -I${withval}/include"
> ++				CPPFLAGS="${CPPFLAGS}"
> + 				LIBS="-L${withval}/lib -liconv ${LIBS}"
> + 			else
> + 				LIBS="-liconv ${LIBS}"
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From fercerpav at gmail.com  Sun Jan 18 10:22:44 2015
From: fercerpav at gmail.com (Paul Fertser)
Date: Sun, 18 Jan 2015 18:22:44 +0300
Subject: [OpenWrt-Devel] [Patch] [packages] new package dansguardian
In-Reply-To: <54BB9E10.50105@cesnet.cz> (Jiri Slachta's message of "Sun, 18
 Jan 2015 12:50:40 +0100")
References: <20150118114518.GA6650@hanno-All-Series> <54BB9E10.50105@cesnet.cz>
Message-ID: <87a91gglkr.fsf@home.paul.comp>

Hello,

Jiri Slachta <slachta at cesnet.cz> writes:
> See the statement about the transition to github:
> 	https://forum.openwrt.org/viewtopic.php?id=51078

What this doesn't explain is that it seems to me that every contributor
to the packages feed now needs to have an account on Github, needs to
use their proprietary "fork" and "pull request" methods, and that the
whole package feed maintenance now depends on a single commercial entity
and their closed-source server-side solution.

Or am I missing something here?

But if this approach is really thought-out and is likely to be helping
OpenWrt to become better, well, I guess it's all right then.

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercerpav at gmail.com
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From leitec at staticky.com  Sun Jan 18 10:33:50 2015
From: leitec at staticky.com (Claudio Leite)
Date: Sun, 18 Jan 2015 10:33:50 -0500
Subject: [OpenWrt-Devel] [PATCH 1/2] uboot-envtools: fix Linksys EA3500 env
	size
Message-ID: <1421595231-17070-1-git-send-email-leitec@staticky.com>

Signed-off-by: Claudio Leite <leitec at staticky.com>
---
 package/boot/uboot-envtools/files/kirkwood |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/package/boot/uboot-envtools/files/kirkwood b/package/boot/uboot-envtools/files/kirkwood
index c868d07..98f85da 100644
--- a/package/boot/uboot-envtools/files/kirkwood
+++ b/package/boot/uboot-envtools/files/kirkwood
@@ -14,7 +14,9 @@ touch /etc/config/ubootenv
 board=$(kirkwood_board_name)
 
 case "$board" in
-"ea3500" | \
+"ea3500")
+	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x4000" "0x20000"
+	;;
 "ea4500" | \
 "guruplug-server-plus" | \
 "ib62x0" | \
-- 
1.7.10.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From leitec at staticky.com  Sun Jan 18 10:33:51 2015
From: leitec at staticky.com (Claudio Leite)
Date: Sun, 18 Jan 2015 10:33:51 -0500
Subject: [OpenWrt-Devel] [PATCH 2/2] kirkwood: enable switch on Linksys
	EA3500
In-Reply-To: <1421595231-17070-1-git-send-email-leitec@staticky.com>
References: <1421595231-17070-1-git-send-email-leitec@staticky.com>
Message-ID: <1421595231-17070-2-git-send-email-leitec@staticky.com>

Signed-off-by: Claudio Leite <leitec at staticky.com>
---
 .../linux/kirkwood/base-files/etc/uci-defaults/02_network |    3 +++
 target/linux/kirkwood/patches-3.14/170-ea3500.patch       |   13 ++++++++++++-
 target/linux/kirkwood/patches-3.18/170-ea3500.patch       |   13 ++++++++++++-
 3 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/target/linux/kirkwood/base-files/etc/uci-defaults/02_network b/target/linux/kirkwood/base-files/etc/uci-defaults/02_network
index 9fd6845..994d7e8 100644
--- a/target/linux/kirkwood/base-files/etc/uci-defaults/02_network
+++ b/target/linux/kirkwood/base-files/etc/uci-defaults/02_network
@@ -55,6 +55,9 @@ case "$board" in
 	;;
 "ea3500")
 	ucidef_set_interfaces_lan_wan "eth0" "eth1"
+	ucidef_add_switch "switch0" "1" "0"
+	add_port_based_vlan "switch0" "1" "0 1 2 3 5"
+	add_port_based_vlan "switch0" "2" "4 6"
 	;;
 "ea4500")
 	ucidef_set_interfaces_lan_wan "eth0" "eth1"
diff --git a/target/linux/kirkwood/patches-3.14/170-ea3500.patch b/target/linux/kirkwood/patches-3.14/170-ea3500.patch
index ac4f45c..58e7a1f 100644
--- a/target/linux/kirkwood/patches-3.14/170-ea3500.patch
+++ b/target/linux/kirkwood/patches-3.14/170-ea3500.patch
@@ -10,7 +10,7 @@
  	kirkwood-guruplug-server-plus.dtb \
 --- /dev/null
 +++ b/arch/arm/boot/dts/kirkwood-ea3500.dts
-@@ -0,0 +1,149 @@
+@@ -0,0 +1,160 @@
 +/*
 + * kirkwood-ea3500.dts - Device Tree file for Linksys EA3500
 + *
@@ -112,6 +112,17 @@
 +			gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
 +		};
 +	};
++
++	mvsw61xx {
++		compatible = "marvell,88e6171";
++		status = "okay";
++		reg = <0x10>;
++
++		mii-bus = <&mdio>;
++		cpu-port-0 = <5>;
++		cpu-port-1 = <6>;
++		is-indirect;
++	};
 +};
 +
 +&nand {
diff --git a/target/linux/kirkwood/patches-3.18/170-ea3500.patch b/target/linux/kirkwood/patches-3.18/170-ea3500.patch
index 95007fa..84645de 100644
--- a/target/linux/kirkwood/patches-3.18/170-ea3500.patch
+++ b/target/linux/kirkwood/patches-3.18/170-ea3500.patch
@@ -10,7 +10,7 @@
  	kirkwood-guruplug-server-plus.dtb \
 --- /dev/null
 +++ b/arch/arm/boot/dts/kirkwood-ea3500.dts
-@@ -0,0 +1,149 @@
+@@ -0,0 +1,160 @@
 +/*
 + * kirkwood-ea3500.dts - Device Tree file for Linksys EA3500
 + *
@@ -112,6 +112,17 @@
 +			gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
 +		};
 +	};
++
++	mvsw61xx {
++		compatible = "marvell,88e6171";
++		status = "okay";
++		reg = <0x10>;
++
++		mii-bus = <&mdio>;
++		cpu-port-0 = <5>;
++		cpu-port-1 = <6>;
++		is-indirect;
++	};
 +};
 +
 +&nand {
-- 
1.7.10.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From luka at openwrt.org  Sun Jan 18 11:48:36 2015
From: luka at openwrt.org (Luka Perkov)
Date: Sun, 18 Jan 2015 17:48:36 +0100
Subject: [OpenWrt-Devel] [PATCH 1/2] uboot-envtools: fix Linksys EA3500
 env size
In-Reply-To: <1421595231-17070-1-git-send-email-leitec@staticky.com>
References: <1421595231-17070-1-git-send-email-leitec@staticky.com>
Message-ID: <20150118164836.GA22294@t530.lan>

On Sun, Jan 18, 2015 at 10:33:50AM -0500, Claudio Leite wrote:
> Signed-off-by: Claudio Leite <leitec at staticky.com>
> ---
>  package/boot/uboot-envtools/files/kirkwood |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Applied in r44037. Thank you.

Luka
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From luka at openwrt.org  Sun Jan 18 11:50:03 2015
From: luka at openwrt.org (Luka Perkov)
Date: Sun, 18 Jan 2015 17:50:03 +0100
Subject: [OpenWrt-Devel] [PATCH 2/2] kirkwood: enable switch on Linksys
 EA3500
In-Reply-To: <1421595231-17070-2-git-send-email-leitec@staticky.com>
References: <1421595231-17070-1-git-send-email-leitec@staticky.com>
 <1421595231-17070-2-git-send-email-leitec@staticky.com>
Message-ID: <20150118165003.GB22294@t530.lan>

On Sun, Jan 18, 2015 at 10:33:51AM -0500, Claudio Leite wrote:
> Signed-off-by: Claudio Leite <leitec at staticky.com>
> ---
>  .../linux/kirkwood/base-files/etc/uci-defaults/02_network |    3 +++
>  target/linux/kirkwood/patches-3.14/170-ea3500.patch       |   13 ++++++++++++-
>  target/linux/kirkwood/patches-3.18/170-ea3500.patch       |   13 ++++++++++++-
>  3 files changed, 27 insertions(+), 2 deletions(-)

Applied in r44036. Thank you.

Luka
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From wigyori at uid0.hu  Sun Jan 18 12:05:34 2015
From: wigyori at uid0.hu (Zoltan HERPAI)
Date: Sun, 18 Jan 2015 18:05:34 +0100
Subject: [OpenWrt-Devel] [PATCH] uboot-sunxi: bump to 2015.01 release
In-Reply-To: <20150118003804.GA24434@makrotopia.org>
References: <20150118003804.GA24434@makrotopia.org>
Message-ID: <54BBE7DE.8030606@uid0.hu>

Daniel Golle wrote:
> Signed-off-by: Daniel Golle <daniel at makrotopia.org>
> ---
>  package/boot/uboot-sunxi/Makefile                  |     6 +-
>  ...-3e1ded1fff32d8af8cc5eec22c56797621ea6649.patch | 25006 -------------------
>  2 files changed, 4 insertions(+), 25008 deletions(-)
>  delete mode 100644 package/boot/uboot-sunxi/patches/001-u-boot-trunk-3e1ded1fff32d8af8cc5eec22c56797621ea6649.patch
>   
Applied in r44035, thanks.

Regards,
-w-
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From nmav at gnutls.org  Sun Jan 18 16:16:38 2015
From: nmav at gnutls.org (Nikos Mavrogiannopoulos)
Date: Sun, 18 Jan 2015 22:16:38 +0100
Subject: [OpenWrt-Devel] setting up ocserv VPN interactions with lan
Message-ID: <1421615798.12713.8.camel@gnutls.org>

Hello,
 After some of experimentation, I've put up some instructions on how to
setup ocserv clients to interact easily with lan. I've abolished the
approach of adding each client into a vpn zone, and I now suggest adding
an interface for "vpns+" devices, which will simplify both setup and
number of firewall rules. The instructions are in:
https://github.com/openwrt/packages/tree/master/net/ocserv

If you are more familiar with interface and firewall setup in openwrt,
please let me know of any omissions or issues with it.

regards,
Nikos
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From linus.luessing at c0d3.blue  Sun Jan 18 18:26:58 2015
From: linus.luessing at c0d3.blue (Linus =?utf-8?Q?L=C3=BCssing?=)
Date: Mon, 19 Jan 2015 00:26:58 +0100
Subject: [OpenWrt-Devel] [PATCH] kernel: bridge: multicast: backport a
 few more fixes for 3.10
In-Reply-To: <20150113231233.GG2812@odroid>
References: <1419909056-7614-1-git-send-email-linus.luessing@c0d3.blue>
 <20150113231233.GG2812@odroid>
Message-ID: <20150118232658.GD2373@odroid>

On Wed, Jan 14, 2015 at 12:12:33AM +0100, Linus L?ssing wrote:
> On Tue, Dec 30, 2014 at 04:10:56AM +0100, Linus L?ssing wrote:
> > The following patches unfortunately didn't hit the kernel stable
> > branches yet, therefore cherrypicking them for OpenWRT here:
> > 
> > * bridge: fix netfilter/NF_BR_LOCAL_OUT for own, locally generated queries
> > * bridge: multicast: enable snooping on general queries only
> > * bridge: multicast: add sanity check for general query destination
> > 
> > Signed-off-by: Linus L?ssing <linus.luessing at c0d3.blue>
> > ---
> >  .../patches-3.10/070-net_bridge_backports.patch    |  193 ++++++++++++++++----
> >  .../644-bridge_optimize_netfilter_hooks.patch      |    6 +-
> >  2 files changed, 162 insertions(+), 37 deletions(-)
> > 
> 
> Bump

Didn't notice that this patch got applied to trunk already, just
saw it while browsing the dev.openwrt.org. Thanks!

Would it be possible to apply it to Barrier Breaker, too? The
patch only contains fixes and the issues are still present in BB,
too.

Thanks!

Cheers, Linus
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From daniel at makrotopia.org  Sun Jan 18 18:35:30 2015
From: daniel at makrotopia.org (Daniel Golle)
Date: Mon, 19 Jan 2015 00:35:30 +0100
Subject: [OpenWrt-Devel] [PATCH 1/8] packages: uboot-sunxi: fix GMAC TX
	delay for Bananapi
Message-ID: <20150118233525.GA4407@makrotopia.org>

CONFIG_TARGET_* is no longer defined when using generic board.
Define a new configuration variable and set in for Bananapi to revive GMAC.

Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 .../patches/005-add-gmac-tx-delay-variant.patch    | 24 ++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 package/boot/uboot-sunxi/patches/005-add-gmac-tx-delay-variant.patch

diff --git a/package/boot/uboot-sunxi/patches/005-add-gmac-tx-delay-variant.patch b/package/boot/uboot-sunxi/patches/005-add-gmac-tx-delay-variant.patch
new file mode 100644
index 0000000..a918367
--- /dev/null
+++ b/package/boot/uboot-sunxi/patches/005-add-gmac-tx-delay-variant.patch
@@ -0,0 +1,24 @@
+Index: u-boot-2015.01/board/sunxi/gmac.c
+===================================================================
+--- u-boot-2015.01.orig/board/sunxi/gmac.c
++++ u-boot-2015.01/board/sunxi/gmac.c
+@@ -34,7 +34,7 @@ int sunxi_gmac_initialize(bd_t *bis)
+ 	 * need to set bits 10-12 GTXDC "GMAC Transmit Clock Delay Chain"
+ 	 * of the GMAC clk register to 3.
+ 	 */
+-#ifdef CONFIG_TARGET_BANANAPI
++#ifdef CONFIG_SUNXI_GMAC_TX_DELAY_3
+ 	setbits_le32(&ccm->gmac_clk_cfg, 0x3 << 10);
+ #endif
+ 
+Index: u-boot-2015.01/configs/Bananapi_defconfig
+===================================================================
+--- u-boot-2015.01.orig/configs/Bananapi_defconfig
++++ u-boot-2015.01/configs/Bananapi_defconfig
+@@ -1,5 +1,5 @@
+ CONFIG_SPL=y
+-CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_GMAC,RGMII,MACPWR=SUNXI_GPH(23),AHCI,USB_EHCI"
++CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_GMAC,SUNXI_GMAC_TX_DELAY_3,RGMII,MACPWR=SUNXI_GPH(23),AHCI,USB_EHCI"
+ CONFIG_FDTFILE="sun7i-a20-bananapi.dtb"
+ +S:CONFIG_ARM=y
+ +S:CONFIG_ARCH_SUNXI=y
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From daniel at makrotopia.org  Sun Jan 18 18:36:16 2015
From: daniel at makrotopia.org (Daniel Golle)
Date: Mon, 19 Jan 2015 00:36:16 +0100
Subject: [OpenWrt-Devel] [PATCH 2/8] packages: uboot-sunxi: uEnv is used as
 a script rather than default env
Message-ID: <20150118233611.GA4412@makrotopia.org>

---
 package/boot/uboot-sunxi/uEnv.txt | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/package/boot/uboot-sunxi/uEnv.txt b/package/boot/uboot-sunxi/uEnv.txt
index e4fc0e1..e024954 100644
--- a/package/boot/uboot-sunxi/uEnv.txt
+++ b/package/boot/uboot-sunxi/uEnv.txt
@@ -1,5 +1,6 @@
-fdt_high=ffffffff
-loadkernel=fatload mmc 0 0x46000000 uImage
-loaddtb=fatload mmc 0 0x49000000 dtb
-bootargs=console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
-uenvcmd=run loadkernel && run loaddtb && bootm 0x46000000 - 0x49000000
+setenv fdt_high ffffffff
+setenv loadkernel fatload mmc 0 \$kernel_addr_r uImage
+setenv loaddtb fatload mmc 0 \$fdt_addr_r dtb
+setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
+setenv uenvcmd run loadkernel \&\& run loaddtb \&\& bootm \$kernel_addr_r - \$fdt_addr_r
+run uenvcmd
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From daniel at makrotopia.org  Sun Jan 18 18:36:34 2015
From: daniel at makrotopia.org (Daniel Golle)
Date: Mon, 19 Jan 2015 00:36:34 +0100
Subject: [OpenWrt-Devel] [PATCH 3/8] packages: uboot-sunxi: add support for
	Lamobo R1
Message-ID: <20150118233629.GA4419@makrotopia.org>

Seems to be identical with bananapi, however, sdcard image generation
scripts currently depend on having u-boot named the same as the profile.

Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 package/boot/uboot-sunxi/Makefile                  |  5 +++++
 .../uboot-sunxi/patches/006-add-lamobo-r1.patch    | 24 ++++++++++++++++++++++
 2 files changed, 29 insertions(+)
 create mode 100644 package/boot/uboot-sunxi/patches/006-add-lamobo-r1.patch

diff --git a/package/boot/uboot-sunxi/Makefile b/package/boot/uboot-sunxi/Makefile
index e4380ac..14ba922 100644
--- a/package/boot/uboot-sunxi/Makefile
+++ b/package/boot/uboot-sunxi/Makefile
@@ -81,6 +81,10 @@ define uboot/Linksprite_pcDuino3
   TITLE:=U-Boot for Linksprite pcDuino3
 endef  
 
+define uboot/Lamobo_R1
+  TITLE:=U-Boot for Lamobo R1
+endef
+
 UBOOTS:= \
 	A10-OLinuXino-Lime \
 	A13-OLinuXino \
@@ -95,6 +99,7 @@ UBOOTS:= \
 	OLIMEX_A13_SOM \
 	Linksprite_pcDuino \
 	Linksprite_pcDuino3 \
+	Lamobo_R1 \
 
 define Package/uboot/template
 define Package/uboot-sunxi-$(1)
diff --git a/package/boot/uboot-sunxi/patches/006-add-lamobo-r1.patch b/package/boot/uboot-sunxi/patches/006-add-lamobo-r1.patch
new file mode 100644
index 0000000..caa04cb
--- /dev/null
+++ b/package/boot/uboot-sunxi/patches/006-add-lamobo-r1.patch
@@ -0,0 +1,24 @@
+Index: u-boot-2015.01/board/sunxi/Makefile
+===================================================================
+--- u-boot-2015.01.orig/board/sunxi/Makefile
++++ u-boot-2015.01/board/sunxi/Makefile
+@@ -23,6 +23,7 @@ obj-$(CONFIG_TARGET_AUXTEK_T004)	+= dram
+ obj-$(CONFIG_TARGET_BA10_TV_BOX)	+= dram_sun4i_384_1024_iow8.o
+ obj-$(CONFIG_TARGET_BANANAPI)		+= dram_bananapi.o
+ obj-$(CONFIG_TARGET_BANANAPRO)		+= dram_bananapi.o
++obj-$(CONFIG_TARGET_LAMOBO_R1)		+= dram_bananapi.o
+ obj-$(CONFIG_TARGET_CUBIEBOARD)		+= dram_cubieboard.o
+ obj-$(CONFIG_TARGET_CUBIEBOARD2)	+= dram_cubieboard2.o
+ obj-$(CONFIG_TARGET_CUBIETRUCK)		+= dram_cubietruck.o
+Index: u-boot-2015.01/configs/Lamobo_R1_defconfig
+===================================================================
+--- /dev/null
++++ u-boot-2015.01/configs/Lamobo_R1_defconfig
+@@ -0,0 +1,7 @@
++CONFIG_SPL=y
++CONFIG_SYS_EXTRA_OPTIONS="AXP209_POWER,SUNXI_GMAC,SUNXI_GMAC_TX_DELAY_3,RGMII,MACPWR=SUNXI_GPH(23),AHCI,USB_EHCI"
++CONFIG_FDTFILE="sun7i-a20-lamobo-r1.dtb"
+++S:CONFIG_ARM=y
+++S:CONFIG_ARCH_SUNXI=y
+++S:CONFIG_MACH_SUN7I=y
+++S:CONFIG_TARGET_LAMOBO_R1=y
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From daniel at makrotopia.org  Sun Jan 18 18:36:53 2015
From: daniel at makrotopia.org (Daniel Golle)
Date: Mon, 19 Jan 2015 00:36:53 +0100
Subject: [OpenWrt-Devel] [PATCH 4/8] sunxi: implement board_detect for
	device-tree kernels
Message-ID: <20150118233648.GA4425@makrotopia.org>

board_detect previously relied on parsing the kernel cmdline
out of the U-Boot environment stored on the the MMC card in order
to get the board= parameter.
Use /proc/device-tree/model instead.

Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 target/linux/sunxi/base-files/lib/sunxi.sh | 168 ++++++++++++++++++++++-------
 1 file changed, 130 insertions(+), 38 deletions(-)

diff --git a/target/linux/sunxi/base-files/lib/sunxi.sh b/target/linux/sunxi/base-files/lib/sunxi.sh
index adf9f84..b0a3874 100644
--- a/target/linux/sunxi/base-files/lib/sunxi.sh
+++ b/target/linux/sunxi/base-files/lib/sunxi.sh
@@ -1,45 +1,137 @@
 #!/bin/sh
 
 # defaults
-SUNXI_BOARD_NAME="generic sunxi"
-SUNXI_BOARD_MODEL="generic sunxi"
-SUNXI_ENV_DEV=/dev/mmcblk0
-
-#Helper functions 
-get_cmdline_opt() 
-{
-cat /proc/cmdline | awk -F$1= '{print $2}' | awk '{print $1}'
-}
+SUNXI_BOARD_NAME="generic"
+SUNXI_BOARD_MODEL="Generic sunxi board"
 
-#Since fw_getenv doesn't work with blockdevs let's make a hack
-uboot_getenv() 
-{
-    dd if=$SUNXI_ENV_DEV bs=1024 skip=544 count=128 2>dev/null |\strings|grep $1|cut -d"=" -f2
-}
+sunxi_board_detect() {
+	local board
+	local model
 
-#Actual routines go below
-sunxi_env_dev()
-{
-    local dev
-    dev=`get_cmdline_opt root|cut -d"p" -f1`
-    SUNXI_ENV_DEV=$dev
-    echo "probing $dev for uboot env data"
-}
+	[ -e "/tmp/sysinfo/" ] || mkdir -p "/tmp/sysinfo/"
 
-sunxi_board_detect() {
-    local board
-    local model
-    sunxi_env_dev
-    [ -e "/tmp/sysinfo/" ] || mkdir -p "/tmp/sysinfo/"
-    board="`uboot_getenv wrt_board`"
-    model="`uboot_getenv wrt_model`"
-    if [ "$board" != "" ]; then
-	SUNXI_BOARD_NAME="$board"
-    fi
-    if [ "$model" != "" ]; then
-	SUNXI_BOARD_MODEL="$model"
-    fi
-    echo "$SUNXI_BOARD_NAME" > /tmp/sysinfo/board_name
-    echo "$SUNXI_BOARD_MODEL" > /tmp/sysinfo/model
-    echo "Detected $SUNXI_BOARD_NAME // $SUNXI_BOARD_MODEL"
+	model="$( cat /proc/device-tree/model )"
+
+	case "$model" in
+		"Mele A1000")
+			board="a1000"
+			;;
+
+		"BA10 tvbox")
+			board="ba10-tvbox"
+			;;
+
+		"Cubietech Cubieboard")
+			board="cubieboard"
+			;;
+
+		"Miniand Hackberry")
+			board="hackberry"
+			;;
+
+		"INet-97F Rev 02")
+			board="inet97fv2"
+			;;
+
+		"PineRiver Mini X-Plus")
+			board="mini-xplus"
+			;;
+
+		"Olimex A10-OLinuXino-LIME")
+			board="olinuxino-lime"
+			;;
+
+		"LinkSprite pcDuino")
+			board="pcduino"
+			;;
+
+		"Olimex A10s-Olinuxino Micro")
+			board="olinuxino-micro"
+			;;
+
+		"R7 A10s hdmi tv-stick")
+			board="r7-tv-dongle"
+			;;
+
+		"HSG H702")
+			board="hsg-h702"
+			;;
+
+		"Olimex A13-Olinuxino")
+			board="olinuxino"
+			;;
+
+		"Olimex A13-Olinuxino Micro")
+			board="olinuxino-micro"
+			;;
+
+		"Allwinner A31 APP4 EVB1 Evaluation Board")
+			board="app4-evb1"
+			;;
+
+		"WITS A31 Colombus Evaluation Board")
+			board="colombus"
+			;;
+
+		"Merrii A31 Hummingbird")
+			board="hummingbird"
+			;;
+
+		"Mele M9 / A1000G Quad top set box")
+			board="m9"
+			;;
+
+		"LeMaker Banana Pi")
+			board="bananapi"
+			;;
+
+		"LeMaker Banana Pro")
+			board="bananapro"
+			;;
+
+		"Cubietech Cubieboard2")
+			board="cubieboard2"
+			;;
+
+		"Cubietech Cubietruck")
+			board="cubietruck"
+			;;
+
+		"Merrii A20 Hummingbird")
+			board="hummingbird"
+			;;
+
+		"I12 / Q5 / QT840A A20 tvbox")
+			board="i12-tvbox"
+			;;
+
+		"Olimex A20-OLinuXino-LIME")
+			board="olinuxino-lime"
+			;;
+
+		"Olimex A20-Olinuxino Micro")
+			board="olinuxino-micro"
+			;;
+
+		"LinkSprite pcDuino3")
+			board="pcduino3"
+			;;
+
+		"Ippo Q8H Dual Core Tablet (v5)")
+			board="ippo-q8h-v5"
+			;;
+	esac
+
+	if [ "$board" != "" ]; then
+		SUNXI_BOARD_NAME="$board"
+	fi
+
+	if [ "$model" != "" ]; then
+		SUNXI_BOARD_MODEL="$model"
+	fi
+
+
+	echo "$SUNXI_BOARD_NAME" > /tmp/sysinfo/board_name
+	echo "$SUNXI_BOARD_MODEL" > /tmp/sysinfo/model
+	echo "Detected $SUNXI_BOARD_NAME // $SUNXI_BOARD_MODEL"
 }
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From daniel at makrotopia.org  Sun Jan 18 18:37:10 2015
From: daniel at makrotopia.org (Daniel Golle)
Date: Mon, 19 Jan 2015 00:37:10 +0100
Subject: [OpenWrt-Devel] [PATCH 5/8] sunxi: introduce sunxi_board_name() in
	/lib/sunxi.sh
Message-ID: <20150118233705.GA4432@makrotopia.org>

Similar to other hardware targets, this can then be used for board-specific
stuff in preinit and uci-default scripts.

Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 target/linux/sunxi/base-files/lib/sunxi.sh | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/target/linux/sunxi/base-files/lib/sunxi.sh b/target/linux/sunxi/base-files/lib/sunxi.sh
index b0a3874..d4dd9fe 100644
--- a/target/linux/sunxi/base-files/lib/sunxi.sh
+++ b/target/linux/sunxi/base-files/lib/sunxi.sh
@@ -135,3 +135,12 @@ sunxi_board_detect() {
 	echo "$SUNXI_BOARD_MODEL" > /tmp/sysinfo/model
 	echo "Detected $SUNXI_BOARD_NAME // $SUNXI_BOARD_MODEL"
 }
+
+sunxi_board_name() {
+	local name
+
+	[ -f /tmp/sysinfo/board_name ] && name="$(cat /tmp/sysinfo/board_name)"
+	[ -z "$name" ] && name="unknown"
+
+	echo "$name"
+}
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From daniel at makrotopia.org  Sun Jan 18 18:37:33 2015
From: daniel at makrotopia.org (Daniel Golle)
Date: Mon, 19 Jan 2015 00:37:33 +0100
Subject: [OpenWrt-Devel] [PATCH 6/8] sunxi: use sunxi_board_name when
 generating default network settings
Message-ID: <20150118233728.GA4437@makrotopia.org>

Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 .../sunxi/base-files/etc/uci-defaults/02_network    | 21 ++++++---------------
 1 file changed, 6 insertions(+), 15 deletions(-)

diff --git a/target/linux/sunxi/base-files/etc/uci-defaults/02_network b/target/linux/sunxi/base-files/etc/uci-defaults/02_network
index c10d40e..1a9b0ed 100644
--- a/target/linux/sunxi/base-files/etc/uci-defaults/02_network
+++ b/target/linux/sunxi/base-files/etc/uci-defaults/02_network
@@ -7,27 +7,18 @@
 
 touch /etc/config/network
 
+. /lib/sunxi.sh
 . /lib/functions/uci-defaults.sh
 
 ucidef_set_interface_loopback
 
-case "`cat /proc/device-tree/model`" in
-"Cubietech Cubieboard" |\
-"Cubietech Cubieboard2" |\
-"Lemaker bananaPi" |\
-"LeMaker Banana Pi" |\
-"LeMaker Banana Pro" |\
-"LinkSprite pcDuino" |\
-"LinkSprite pcDuino V3" |\
-"LinkSprite pcDuino3" |\
-"Olimex A10-OLinuXino-LIME" |\
-"Olimex A20-OLinuXino-LIME" |\
-"Olimex A20-Olinuxino Micro")
-	ucidef_set_interface_lan 'eth0'
-	;;
-"Olimex A13-Olinuxino")
+case "$( sunxi_board_name )" in
+"olinuxino"*)
 	ucidef_set_interface_lan 'wlan0'
 	;;
+*)
+	ucidef_set_interface_lan 'eth0'
+	;;
 esac
 
 uci commit network
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From daniel at makrotopia.org  Sun Jan 18 18:40:18 2015
From: daniel at makrotopia.org (Daniel Golle)
Date: Mon, 19 Jan 2015 00:40:18 +0100
Subject: [OpenWrt-Devel] [PATCH 7/8] sunxi: add support for Lamobo R1
Message-ID: <20150118234013.GA4984@makrotopia.org>

Partially based on patchset form Wang Yi <wangyi8848 at gmail.com> published
on https://github.com/Lamobo/Lamobo-R1-OpenWrt as well as on Bananapi DTS.

Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 .../sunxi/base-files/etc/uci-defaults/02_network   |   6 +
 target/linux/sunxi/base-files/lib/sunxi.sh         |   4 +
 target/linux/sunxi/config-3.18                     |   5 +
 target/linux/sunxi/image/Makefile                  |   7 +-
 .../patches-3.18/302-dt-sun7i-add-lamobo-r1.patch  | 252 +++++++++++++++++++++
 target/linux/sunxi/profiles/lamobo-r1.mk           |  19 ++
 6 files changed, 292 insertions(+), 1 deletion(-)
 mode change 100644 => 100755 target/linux/sunxi/image/Makefile
 create mode 100644 target/linux/sunxi/patches-3.18/302-dt-sun7i-add-lamobo-r1.patch
 create mode 100644 target/linux/sunxi/profiles/lamobo-r1.mk

diff --git a/target/linux/sunxi/base-files/etc/uci-defaults/02_network b/target/linux/sunxi/base-files/etc/uci-defaults/02_network
index 1a9b0ed..09db8d5 100644
--- a/target/linux/sunxi/base-files/etc/uci-defaults/02_network
+++ b/target/linux/sunxi/base-files/etc/uci-defaults/02_network
@@ -16,6 +16,12 @@ case "$( sunxi_board_name )" in
 "olinuxino"*)
 	ucidef_set_interface_lan 'wlan0'
 	;;
+"lamobo-r1")
+	ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
+	ucidef_add_switch "switch0" "1" "1"
+	ucidef_add_switch_vlan "switch0" "1" "4 0 1 2 8t"
+	ucidef_add_switch_vlan "switch0" "2" "3 8t"
+	;;
 *)
 	ucidef_set_interface_lan 'eth0'
 	;;
diff --git a/target/linux/sunxi/base-files/lib/sunxi.sh b/target/linux/sunxi/base-files/lib/sunxi.sh
index d4dd9fe..444c7e9 100644
--- a/target/linux/sunxi/base-files/lib/sunxi.sh
+++ b/target/linux/sunxi/base-files/lib/sunxi.sh
@@ -105,6 +105,10 @@ sunxi_board_detect() {
 			board="i12-tvbox"
 			;;
 
+		"Lamobo R1")
+			board="lamobo-r1"
+			;;
+
 		"Olimex A20-OLinuXino-LIME")
 			board="olinuxino-lime"
 			;;
diff --git a/target/linux/sunxi/config-3.18 b/target/linux/sunxi/config-3.18
index 68f1593..7448bcf 100644
--- a/target/linux/sunxi/config-3.18
+++ b/target/linux/sunxi/config-3.18
@@ -58,6 +58,11 @@ CONFIG_AUDIT=y
 CONFIG_AUDIT_GENERIC=y
 CONFIG_AUTO_ZRELADDR=y
 CONFIG_AVERAGE=y
+CONFIG_B53=y
+# CONFIG_B53_MMAP_DRIVER is not set
+CONFIG_B53_PHY_DRIVER=y
+CONFIG_B53_PHY_FIXUP=y
+# CONFIG_B53_SRAB_DRIVER is not set
 CONFIG_BINFMT_MISC=y
 CONFIG_BLK_CGROUP=y
 CONFIG_BLK_DEV_SD=y
diff --git a/target/linux/sunxi/image/Makefile b/target/linux/sunxi/image/Makefile
old mode 100644
new mode 100755
index 4475aa8..f627ee3
--- a/target/linux/sunxi/image/Makefile
+++ b/target/linux/sunxi/image/Makefile
@@ -24,7 +24,8 @@ BOARDS:= \
 	sun7i-a20-cubietruck \
 	sun7i-a20-olinuxino-lime \
 	sun7i-a20-olinuxino-micro \
-	sun7i-a20-pcduino3
+	sun7i-a20-pcduino3 \
+	sun7i-a20-lamobo-r1
 
 define Image/BuildKernel
 	mkimage -A arm -O linux -T kernel -C none \
@@ -88,6 +89,10 @@ define Image/Build/Profile/Bananapro
 	$(call Image/Build/SDCard,$(1),sun7i-a20-bananapro)
 endef
 
+define Image/Build/Profile/Lamobo_R1
+	$(call Image/Build/SDCard,$(1),sun7i-a20-lamobo-r1)
+endef
+
 define Image/Build/Profile/Cubieboard
 	$(call Image/Build/SDCard,$(1),sun4i-a10-cubieboard)
 endef
diff --git a/target/linux/sunxi/patches-3.18/302-dt-sun7i-add-lamobo-r1.patch b/target/linux/sunxi/patches-3.18/302-dt-sun7i-add-lamobo-r1.patch
new file mode 100644
index 0000000..82c8bd5
--- /dev/null
+++ b/target/linux/sunxi/patches-3.18/302-dt-sun7i-add-lamobo-r1.patch
@@ -0,0 +1,252 @@
+Index: linux-3.18.2/arch/arm/boot/dts/Makefile
+===================================================================
+--- linux-3.18.2.orig/arch/arm/boot/dts/Makefile
++++ linux-3.18.2/arch/arm/boot/dts/Makefile
+@@ -441,6 +441,7 @@ dtb-$(CONFIG_MACH_SUN7I) += \
+ 	sun7i-a20-cubietruck.dtb \
+ 	sun7i-a20-hummingbird.dtb \
+ 	sun7i-a20-i12-tvbox.dtb \
++	sun7i-a20-lamobo-r1.dtb \
+ 	sun7i-a20-olinuxino-lime.dtb \
+ 	sun7i-a20-olinuxino-micro.dtb \
+ 	sun7i-a20-pcduino3.dtb
+Index: linux-3.18.2/arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts
+===================================================================
+--- /dev/null
++++ linux-3.18.2/arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts
+@@ -0,0 +1,235 @@
++/*
++ * Copyright 2015 Daniel Golle <daniel at makrotopia.org>
++ * Copyright 2014 Hans de Goede <hdegoede at redhat.com>
++ *
++ * This file is dual-licensed: you can use it either under the terms
++ * of the GPL or the X11 license, at your option. Note that this dual
++ * licensing only applies to this file, and not this project as a
++ * whole.
++ *
++ *  a) This library is free software; you can redistribute it and/or
++ *     modify it under the terms of the GNU General Public License as
++ *     published by the Free Software Foundation; either version 2 of the
++ *     License, or (at your option) any later version.
++ *
++ *     This library 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.
++ *
++ *     You should have received a copy of the GNU General Public
++ *     License along with this library; if not, write to the Free
++ *     Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
++ *     MA 02110-1301 USA
++ *
++ * Or, alternatively,
++ *
++ *  b) Permission is hereby granted, free of charge, to any person
++ *     obtaining a copy of this software and associated documentation
++ *     files (the "Software"), to deal in the Software without
++ *     restriction, including without limitation the rights to use,
++ *     copy, modify, merge, publish, distribute, sublicense, and/or
++ *     sell copies of the Software, and to permit persons to whom the
++ *     Software is furnished to do so, subject to the following
++ *     conditions:
++ *
++ *     The above copyright notice and this permission notice shall be
++ *     included in all copies or substantial portions of the Software.
++ *
++ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
++ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
++ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
++ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
++ *     OTHER DEALINGS IN THE SOFTWARE.
++ */
++
++/dts-v1/;
++/include/ "sun7i-a20.dtsi"
++/include/ "sunxi-common-regulators.dtsi"
++#include <dt-bindings/input/input.h>
++
++/ {
++	model = "Lamobo R1";
++	compatible = "lamobo,lamobo-r1", "allwinner,sun7i-a20";
++
++	soc at 01c00000 {
++		spi0: spi at 01c05000 {
++			pinctrl-names = "default";
++			pinctrl-0 = <&spi0_pins_a>;
++			status = "okay";
++		};
++
++		mmc0: mmc at 01c0f000 {
++			pinctrl-names = "default";
++			pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_lamobo>;
++			vmmc-supply = <&reg_vcc3v3>;
++			bus-width = <4>;
++			cd-gpios = <&pio 7 10 0>; /* PH10 */
++			cd-inverted;
++			status = "okay";
++		};
++
++		usbphy: phy at 01c13400 {
++			usb1_vbus-supply = <&reg_usb1_vbus>;
++			usb2_vbus-supply = <&reg_usb2_vbus>;
++			status = "okay";
++		};
++
++		ehci0: usb at 01c14000 {
++			status = "okay";
++		};
++
++		ohci0: usb at 01c14400 {
++			status = "okay";
++		};
++
++		ahci: sata at 01c18000 {
++			target-supply = <&reg_ahci_5v>;
++			status = "okay";
++		};
++
++		ehci1: usb at 01c1c000 {
++			status = "okay";
++		};
++
++		ohci1: usb at 01c1c400 {
++			status = "okay";
++		};
++
++		pinctrl at 01c20800 {
++			mmc0_cd_pin_lamobo: mmc0_cd_pin at 0 {
++				allwinner,pins = "PH10";
++				allwinner,function = "gpio_in";
++				allwinner,drive = <0>;
++				allwinner,pull = <1>;
++			};
++
++			gmac_power_pin_lamobo: gmac_power_pin at 0 {
++				allwinner,pins = "PH23";
++				allwinner,function = "gpio_out";
++				allwinner,drive = <0>;
++				allwinner,pull = <0>;
++			};
++
++			led_pins_lamobo: led_pins at 0 {
++				allwinner,pins = "PH2";
++				allwinner,function = "gpio_out";
++				allwinner,drive = <1>;
++				allwinner,pull = <0>;
++			};
++		};
++
++		lradc: lradc at 01c22800 {
++			allwinner,chan0-step = <200>;
++			linux,chan0-keycodes = <KEY_VOLUMEUP KEY_VOLUMEDOWN
++						KEY_MENU KEY_SEARCH KEY_HOME
++						KEY_ESC KEY_ENTER>;
++			status = "okay";
++		};
++
++		ir0: ir at 01c21800 {
++			pinctrl-names = "default";
++			pinctrl-0 = <&ir0_pins_a>;
++			status = "okay";
++		};
++
++		uart0: serial at 01c28000 {
++			pinctrl-names = "default";
++			pinctrl-0 = <&uart0_pins_a>;
++			status = "okay";
++		};
++
++		uart3: serial at 01c28c00 {
++			pinctrl-names = "default";
++			pinctrl-0 = <&uart3_pins_b>;
++			status = "okay";
++		};
++
++		uart7: serial at 01c29c00 {
++			pinctrl-names = "default";
++			pinctrl-0 = <&uart7_pins_a>;
++			status = "okay";
++		};
++
++		i2c0: i2c at 01c2ac00 {
++			pinctrl-names = "default";
++			pinctrl-0 = <&i2c0_pins_a>;
++			status = "okay";
++
++			axp209: pmic at 34 {
++				compatible = "x-powers,axp209";
++				reg = <0x34>;
++				interrupt-parent = <&nmi_intc>;
++				interrupts = <0 8>;
++
++				interrupt-controller;
++				#interrupt-cells = <1>;
++			};
++		};
++
++		i2c1: i2c at 01c2b000 {
++			pinctrl-names = "default";
++			pinctrl-0 = <&i2c1_pins_a>;
++			status = "okay";
++		};
++
++		i2c2: i2c at 01c2b400 {
++			pinctrl-names = "default";
++			pinctrl-0 = <&i2c2_pins_a>;
++			status = "okay";
++		};
++
++		gmac: ethernet at 01c50000 {
++			pinctrl-names = "default";
++			pinctrl-0 = <&gmac_pins_rgmii_a>;
++			phy = <&phy1>;
++			phy-mode = "rgmii";
++			phy-supply = <&reg_gmac_3v3>;
++			status = "okay";
++
++			phy1: ethernet-phy at 1 {
++				reg = <1>;
++			};
++		};
++	};
++
++	leds {
++		compatible = "gpio-leds";
++		pinctrl-names = "default";
++		pinctrl-0 = <&led_pins_lamobo>;
++
++		green {
++			label = "lamobo:green:usr";
++			gpios = <&pio 7 24 0>;
++			default-state = "on";
++		};
++	};
++
++	reg_ahci_5v: ahci-5v {
++		status = "okay";
++	};
++
++	reg_usb1_vbus: usb1-vbus {
++		status = "okay";
++	};
++
++	reg_usb2_vbus: usb2-vbus {
++		status = "okay";
++	};
++
++	reg_gmac_3v3: gmac-3v3 {
++		compatible = "regulator-fixed";
++		pinctrl-names = "default";
++		pinctrl-0 = <&gmac_power_pin_lamobo>;
++		regulator-name = "gmac-3v3";
++		regulator-min-microvolt = <3300000>;
++		regulator-max-microvolt = <3300000>;
++		startup-delay-us = <100000>;
++		enable-active-high;
++		gpio = <&pio 7 23 0>;
++		status = "okay";
++	};
++};
diff --git a/target/linux/sunxi/profiles/lamobo-r1.mk b/target/linux/sunxi/profiles/lamobo-r1.mk
new file mode 100644
index 0000000..175f9ef
--- /dev/null
+++ b/target/linux/sunxi/profiles/lamobo-r1.mk
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/Lamobo_R1
+	NAME:=Lamobo R1
+	PACKAGES:=\
+		uboot-sunxi-Lamobo_R1 kmod-ata-sunxi kmod-b53 kmod-swconfig \
+		kmod-rtl8192cu swconfig wpad-mini
+endef
+
+define Profile/Lamobo_R1/Description
+	Package set optimized for the Lamobo R1
+endef
+
+$(eval $(call Profile,Lamobo_R1))
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From daniel at makrotopia.org  Sun Jan 18 18:40:42 2015
From: daniel at makrotopia.org (Daniel Golle)
Date: Mon, 19 Jan 2015 00:40:42 +0100
Subject: [OpenWrt-Devel] [PATCH 8/8] sunxi: workaround switch being
 uninitialized on netifd startup
Message-ID: <20150118234038.GA4989@makrotopia.org>

The BCM53125 switch on Lamobo R1 is powered down and counters are not
zero'ed when netifd comes up and tries to initialize the switch.
Take interface up and reset counters in preinit for that board.

Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 .../linux/sunxi/base-files/lib/preinit/02_b53_hack.sh   | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 target/linux/sunxi/base-files/lib/preinit/02_b53_hack.sh

diff --git a/target/linux/sunxi/base-files/lib/preinit/02_b53_hack.sh b/target/linux/sunxi/base-files/lib/preinit/02_b53_hack.sh
new file mode 100644
index 0000000..84070de
--- /dev/null
+++ b/target/linux/sunxi/base-files/lib/preinit/02_b53_hack.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+. /lib/sunxi.sh
+
+do_b53_hack() {
+	# hack: enable switch on Lamobo R1 and reset counters
+	case "$( sunxi_board_name )" in
+	"lamobo-r1")
+		ifconfig eth0 up
+		sleep 1
+		swconfig dev switch0 set reset 1
+		swconfig dev switch0 set reset_mib 1
+		swconfig dev switch0 set apply 1
+		;;
+	esac
+}
+
+boot_hook_add preinit_main do_b53_hack
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From wigyori at uid0.hu  Sun Jan 18 18:54:23 2015
From: wigyori at uid0.hu (Zoltan HERPAI)
Date: Mon, 19 Jan 2015 00:54:23 +0100 (CET)
Subject: [OpenWrt-Devel] [PATCH 2/8] packages: uboot-sunxi: uEnv is used
 as a script rather than default env
In-Reply-To: <20150118233611.GA4412@makrotopia.org>
References: <20150118233611.GA4412@makrotopia.org>
Message-ID: <alpine.DEB.2.02.1501190053040.10468@trabant.deployis.eu>

Hi Daniel,

On Mon, 19 Jan 2015, Daniel Golle wrote:

> ---
> package/boot/uboot-sunxi/uEnv.txt | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/package/boot/uboot-sunxi/uEnv.txt b/package/boot/uboot-sunxi/uEnv.txt
> index e4fc0e1..e024954 100644
> --- a/package/boot/uboot-sunxi/uEnv.txt
> +++ b/package/boot/uboot-sunxi/uEnv.txt
> @@ -1,5 +1,6 @@
> -fdt_high=ffffffff
> -loadkernel=fatload mmc 0 0x46000000 uImage
> -loaddtb=fatload mmc 0 0x49000000 dtb
> -bootargs=console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
> -uenvcmd=run loadkernel && run loaddtb && bootm 0x46000000 - 0x49000000
> +setenv fdt_high ffffffff
> +setenv loadkernel fatload mmc 0 \$kernel_addr_r uImage
> +setenv loaddtb fatload mmc 0 \$fdt_addr_r dtb
> +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
> +setenv uenvcmd run loadkernel \&\& run loaddtb \&\& bootm \$kernel_addr_r - \$fdt_addr_r
> +run uenvcmd

Please add a Signed-off-by: here, otherwise tested and ready to be 
committed.

Thanks,
-w-
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From wigyori at uid0.hu  Sun Jan 18 18:58:38 2015
From: wigyori at uid0.hu (Zoltan HERPAI)
Date: Mon, 19 Jan 2015 00:58:38 +0100 (CET)
Subject: [OpenWrt-Devel] [PATCH 7/8] sunxi: add support for Lamobo R1
In-Reply-To: <20150118234013.GA4984@makrotopia.org>
References: <20150118234013.GA4984@makrotopia.org>
Message-ID: <alpine.DEB.2.02.1501190054280.10468@trabant.deployis.eu>

Hi Daniel,

On Mon, 19 Jan 2015, Daniel Golle wrote:

> Partially based on patchset form Wang Yi <wangyi8848 at gmail.com> published
> on https://github.com/Lamobo/Lamobo-R1-OpenWrt as well as on Bananapi DTS.
>
> Signed-off-by: Daniel Golle <daniel at makrotopia.org>
> ---
> .../sunxi/base-files/etc/uci-defaults/02_network   |   6 +
> target/linux/sunxi/base-files/lib/sunxi.sh         |   4 +
> target/linux/sunxi/config-3.18                     |   5 +
> target/linux/sunxi/image/Makefile                  |   7 +-
> .../patches-3.18/302-dt-sun7i-add-lamobo-r1.patch  | 252 +++++++++++++++++++++
> target/linux/sunxi/profiles/lamobo-r1.mk           |  19 ++
> 6 files changed, 292 insertions(+), 1 deletion(-)
> mode change 100644 => 100755 target/linux/sunxi/image/Makefile
> create mode 100644 target/linux/sunxi/patches-3.18/302-dt-sun7i-add-lamobo-r1.patch
> create mode 100644 target/linux/sunxi/profiles/lamobo-r1.mk

Looks good. Could you create the board's docs on the wiki [1] ? If you 
have some time, updating the docs on the linux-sunxi site [2] would also 
be great.

Thanks,
-w-

[1] http://wiki.openwrt.org/doc/hardware/soc/soc.allwinner.sunxi
[2] http://linux-sunxi.org/Lamobo_R1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From daniel at makrotopia.org  Sun Jan 18 19:02:18 2015
From: daniel at makrotopia.org (Daniel Golle)
Date: Mon, 19 Jan 2015 01:02:18 +0100
Subject: [OpenWrt-Devel] [PATCH v2 2/8] packages: uboot-sunxi: uEnv is used
 as a script rather than default env
In-Reply-To: <alpine.DEB.2.02.1501190053040.10468@trabant.deployis.eu>
References: <alpine.DEB.2.02.1501190053040.10468@trabant.deployis.eu>
Message-ID: <20150119000144.GA31521@makrotopia.org>

Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 package/boot/uboot-sunxi/uEnv.txt | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/package/boot/uboot-sunxi/uEnv.txt b/package/boot/uboot-sunxi/uEnv.txt
index e4fc0e1..e024954 100644
--- a/package/boot/uboot-sunxi/uEnv.txt
+++ b/package/boot/uboot-sunxi/uEnv.txt
@@ -1,5 +1,6 @@
-fdt_high=ffffffff
-loadkernel=fatload mmc 0 0x46000000 uImage
-loaddtb=fatload mmc 0 0x49000000 dtb
-bootargs=console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
-uenvcmd=run loadkernel && run loaddtb && bootm 0x46000000 - 0x49000000
+setenv fdt_high ffffffff
+setenv loadkernel fatload mmc 0 \$kernel_addr_r uImage
+setenv loaddtb fatload mmc 0 \$fdt_addr_r dtb
+setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
+setenv uenvcmd run loadkernel \&\& run loaddtb \&\& bootm \$kernel_addr_r - \$fdt_addr_r
+run uenvcmd
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From wigyori at uid0.hu  Sun Jan 18 19:04:42 2015
From: wigyori at uid0.hu (Zoltan HERPAI)
Date: Mon, 19 Jan 2015 01:04:42 +0100 (CET)
Subject: [OpenWrt-Devel] [PATCH v2 2/8] packages: uboot-sunxi: uEnv is
 used as a script rather than default env
In-Reply-To: <20150119000144.GA31521@makrotopia.org>
References: <alpine.DEB.2.02.1501190053040.10468@trabant.deployis.eu>
 <20150119000144.GA31521@makrotopia.org>
Message-ID: <alpine.DEB.2.02.1501190103400.10468@trabant.deployis.eu>

On Mon, 19 Jan 2015, Daniel Golle wrote:

> Signed-off-by: Daniel Golle <daniel at makrotopia.org>
> ---
> package/boot/uboot-sunxi/uEnv.txt | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/package/boot/uboot-sunxi/uEnv.txt b/package/boot/uboot-sunxi/uEnv.txt
> index e4fc0e1..e024954 100644
> --- a/package/boot/uboot-sunxi/uEnv.txt
> +++ b/package/boot/uboot-sunxi/uEnv.txt
> @@ -1,5 +1,6 @@
> -fdt_high=ffffffff
> -loadkernel=fatload mmc 0 0x46000000 uImage
> -loaddtb=fatload mmc 0 0x49000000 dtb
> -bootargs=console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
> -uenvcmd=run loadkernel && run loaddtb && bootm 0x46000000 - 0x49000000
> +setenv fdt_high ffffffff
> +setenv loadkernel fatload mmc 0 \$kernel_addr_r uImage
> +setenv loaddtb fatload mmc 0 \$fdt_addr_r dtb
> +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
> +setenv uenvcmd run loadkernel \&\& run loaddtb \&\& bootm \$kernel_addr_r - \$fdt_addr_r
> +run uenvcmd

Thanks, applied in r44048.

Regards,
-w-
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From nbd at openwrt.org  Sun Jan 18 20:16:59 2015
From: nbd at openwrt.org (Felix Fietkau)
Date: Mon, 19 Jan 2015 02:16:59 +0100
Subject: [OpenWrt-Devel] [PATCH] kernel: bridge: multicast: backport a
 few more fixes for 3.10
In-Reply-To: <20150118232658.GD2373@odroid>
References: <1419909056-7614-1-git-send-email-linus.luessing@c0d3.blue>
 <20150113231233.GG2812@odroid> <20150118232658.GD2373@odroid>
Message-ID: <54BC5B0B.8090006@openwrt.org>

On 2015-01-19 00:26, Linus L?ssing wrote:
> On Wed, Jan 14, 2015 at 12:12:33AM +0100, Linus L?ssing wrote:
>> On Tue, Dec 30, 2014 at 04:10:56AM +0100, Linus L?ssing wrote:
>> > The following patches unfortunately didn't hit the kernel stable
>> > branches yet, therefore cherrypicking them for OpenWRT here:
>> > 
>> > * bridge: fix netfilter/NF_BR_LOCAL_OUT for own, locally generated queries
>> > * bridge: multicast: enable snooping on general queries only
>> > * bridge: multicast: add sanity check for general query destination
>> > 
>> > Signed-off-by: Linus L?ssing <linus.luessing at c0d3.blue>
>> > ---
>> >  .../patches-3.10/070-net_bridge_backports.patch    |  193 ++++++++++++++++----
>> >  .../644-bridge_optimize_netfilter_hooks.patch      |    6 +-
>> >  2 files changed, 162 insertions(+), 37 deletions(-)
>> > 
>> 
>> Bump
> 
> Didn't notice that this patch got applied to trunk already, just
> saw it while browsing the dev.openwrt.org. Thanks!
> 
> Would it be possible to apply it to Barrier Breaker, too? The
> patch only contains fixes and the issues are still present in BB,
> too.
Backported in r44049

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

From olipro at 8.c.9.b.0.7.4.0.1.0.0.2.ip6.arpa  Mon Jan 19 03:04:04 2015
From: olipro at 8.c.9.b.0.7.4.0.1.0.0.2.ip6.arpa (Oliver)
Date: Mon, 19 Jan 2015 09:04:04 +0100
Subject: [OpenWrt-Devel] network/znc: Package binaries appear to be broken
	by MIPS16
Message-ID: <54BCBA74.9020309@8.c.9.b.0.7.4.0.1.0.0.2.ip6.arpa>

Having compiled an image yesterday with ZNC with a MIPS24kc target and 
MIPS16 enabled, I found that it would eventually crash after starting so 
I ran it in the console and found the segfault was due to an "illegal 
hardware instruction" - consequently I edited the Makefile to disable 
MIPS16 compilation for ZNC and reflashed it. This time there were no 
such issues. Can anyone else confirm this to be the case? Obviously it 
would be better if MIPS16 compilation could be fixed but I'm not able to 
get visibility into where the bad code is generated.

Regards,
Oliver.
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From ben.mulvihill at gmail.com  Mon Jan 19 05:46:08 2015
From: ben.mulvihill at gmail.com (Ben Mulvihill)
Date: Mon, 19 Jan 2015 11:46:08 +0100
Subject: [OpenWrt-Devel] uboot-lantiq cgu settings for ramboot image
Message-ID: <1421664368.25187.18.camel@merveille.lan>

Hello,

I am trying to build uboot-lantiq for the BT Home Hub 3A (lantiq
ar9), and am wondering where to initialise the cgu, in the case
of a ramboot image for uart booting. Normally the cgu is initialised
in lowlevel_init, but that code is bypassed in ramboot images. The 
result is that the board boots with the wrong cgu settings, which
sends the console haywire. So far I have tried two solutions:

- putting the following lines in board_early_init_f:

  #define REG32(addr) *((volatile u32 *)(addr))
        REG32(0xbf103010) = 0x80;
        REG32(0xbf103014) = 0x01;

  This fixes the console, but breaks ethernet. I am wondering
  whether this is because by putting this code in this place, I
  am altering the cgu settings after setting up ram. Is this
  admissible?

- adding the same two register settings to the start of the
  ddr_settings file generated by lantiq_ram_init_uart.awk .
  However, the resulting image gives a download error and won't
  boot at all.

Any suggestions will be gratefully received!

Ben
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From luigi.tarenga at gmail.com  Mon Jan 19 06:00:36 2015
From: luigi.tarenga at gmail.com (Luigi Tarenga)
Date: Mon, 19 Jan 2015 12:00:36 +0100
Subject: [OpenWrt-Devel] [PATCH v2] [ar71xx] add support for TP-LINK
	TL-WA701ND v2
Message-ID: <CAKkO-Ej7Ec=A=9J+3UrFbRNJYyehnPrXDaZh0GiNSw1xXBeDXQ@mail.gmail.com>

add support for TP-LINK TL-WA701ND v2

Signed-off-by: Luigi Tarenga <luigi.tarenga at gmail.com>
---
new attempt. I removed the refactoring portion in previous version
and corrected the diff stat. I hope this time it's fine.

regards
Luigi
---
 target/linux/ar71xx/base-files/etc/diag.sh
        |   1 +
 target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
        |   5 ++
 target/linux/ar71xx/base-files/etc/uci-defaults/02_network
        |   1 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh
        |   3 +
 target/linux/ar71xx/base-files/lib/upgrade/platform.sh
        |   1 +
 target/linux/ar71xx/config-3.10
        |   1 +
 target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa701nd-v2.c
        | 116 +++++++++++++++++++++++++++++++++++++
 target/linux/ar71xx/image/Makefile
        |   4 +-
 .../linux/ar71xx/patches-3.10/729-MIPS-ath79-add-TL-WA701NDv2-support.patch
  |  45 ++++++++++++++
 tools/firmware-utils/src/mktplinkfw.c
        |   6 ++
 10 files changed, 182 insertions(+), 1 deletion(-)

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh
b/target/linux/ar71xx/base-files/etc/diag.sh
index fa07f39..eb96338 100755
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -195,6 +195,7 @@ get_status_led() {
     tl-mr3220-v2 | \
     tl-mr3420 | \
     tl-mr3420-v2 | \
+    tl-wa701nd-v2 | \
     tl-wa801nd-v2 | \
     tl-wa901nd | \
     tl-wa901nd-v2 | \
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index 5b9dbe7..0d085be 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -275,6 +275,11 @@ tl-wa850re)
     ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "tp-link:blue:signal5"
"wlan0" "80" "100" "-79" "13"
     ;;

+tl-wa701nd-v2)
+    ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
+    ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
+    ;;
+
 tl-wa860re)
     ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
     ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index c5cfd67..4be30b8 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -301,6 +301,7 @@ tl-mr13u |\
 tl-mr3020 |\
 tl-mr3040 |\
 tl-mr3040-v2 |\
+tl-wa701nd-v2 |\
 tl-wa750re |\
 tl-wa850re |\
 tl-wa830re-v2 |\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 1e96b6d..df35775 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -571,6 +571,9 @@ ar71xx_board_detect() {
     *"TL-MR3420 v2")
         name="tl-mr3420-v2"
         ;;
+    *"TL-WA701ND v2")
+        name="tl-wa701nd-v2"
+        ;;
     *TL-WA750RE)
         name="tl-wa750re"
         ;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 846954c..eeaac6a 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -269,6 +269,7 @@ platform_check_image() {
     tl-mr3220-v2 | \
     tl-mr3420 | \
     tl-mr3420-v2 | \
+    tl-wa701nd-v2 | \
     tl-wa7510n | \
     tl-wa750re | \
     tl-wa850re | \
diff --git a/target/linux/ar71xx/config-3.10 b/target/linux/ar71xx/config-3.10
index 9a8378a..482914a 100644
--- a/target/linux/ar71xx/config-3.10
+++ b/target/linux/ar71xx/config-3.10
@@ -88,6 +88,7 @@ CONFIG_ATH79_MACH_TL_MR11U=y
 CONFIG_ATH79_MACH_TL_MR13U=y
 CONFIG_ATH79_MACH_TL_MR3020=y
 CONFIG_ATH79_MACH_TL_MR3X20=y
+CONFIG_ATH79_MACH_TL_WA701ND_V2=y
 CONFIG_ATH79_MACH_TL_WA830RE_V2=y
 CONFIG_ATH79_MACH_TL_WA901ND=y
 CONFIG_ATH79_MACH_TL_WA901ND_V2=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa701nd-v2.c
b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa701nd-v2.c
new file mode 100644
index 0000000..aab92b3
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa701nd-v2.c
@@ -0,0 +1,116 @@
+/*
+ *  TP-LINK TL-WA701ND v2 board support
+ *
+ *  Copyright (C) 2015 Luigi Tarenga <luigi.tarenga at gmail.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License version 2 as published
+ *  by the Free Software Foundation.
+ */
+
+#include <linux/gpio.h>
+
+#include <asm/mach-ath79/ath79.h>
+
+#include "dev-eth.h"
+#include "dev-gpio-buttons.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-usb.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+
+#define TL_WA701NDV2_GPIO_LED_WLAN    0
+#define TL_WA701NDV2_GPIO_LED_QSS    1
+#define TL_WA701NDV2_GPIO_LED_LAN    17
+#define TL_WA701NDV2_GPIO_LED_SYSTEM    27
+
+#define TL_WA701NDV2_GPIO_BTN_RESET    11
+#define TL_WA701NDV2_GPIO_BTN_QSS    26
+
+#define TL_WA701NDV2_GPIO_USB_POWER    8
+
+#define TL_WA701NDV2_KEYS_POLL_INTERVAL    20    /* msecs */
+#define TL_WA701NDV2_KEYS_DEBOUNCE_INTERVAL    (3 *
TL_WA701NDV2_KEYS_POLL_INTERVAL)
+
+static const char *tl_wa701ndv2_part_probes[] = {
+    "tp-link",
+    NULL,
+};
+
+static struct flash_platform_data tl_wa701ndv2_flash_data = {
+    .part_probes    = tl_wa701ndv2_part_probes,
+};
+
+static struct gpio_led tl_wa701ndv2_leds_gpio[] __initdata = {
+    {
+        .name        = "tp-link:green:wlan",
+        .gpio        = TL_WA701NDV2_GPIO_LED_WLAN,
+        .active_low    = 0,
+    }, {
+        .name        = "tp-link:green:qss",
+        .gpio        = TL_WA701NDV2_GPIO_LED_QSS,
+        .active_low    = 0,
+    }, {
+        .name        = "tp-link:green:lan",
+        .gpio        = TL_WA701NDV2_GPIO_LED_LAN,
+        .active_low    = 1,
+    }, {
+        .name        = "tp-link:green:system",
+        .gpio        = TL_WA701NDV2_GPIO_LED_SYSTEM,
+        .active_low    = 1,
+        }
+};
+
+static struct gpio_keys_button tl_wa701ndv2_gpio_keys[] __initdata = {
+    {
+        .desc        = "reset",
+        .type        = EV_KEY,
+        .code        = KEY_RESTART,
+        .debounce_interval = TL_WA701NDV2_KEYS_DEBOUNCE_INTERVAL,
+        .gpio        = TL_WA701NDV2_GPIO_BTN_RESET,
+        .active_low    = 0,
+    } , {
+                .desc        = "qss",
+                .type        = EV_KEY,
+                .code        = KEY_WPS_BUTTON,
+                .debounce_interval = TL_WA701NDV2_KEYS_DEBOUNCE_INTERVAL,
+                .gpio        = TL_WA701NDV2_GPIO_BTN_QSS,
+                .active_low    = 0,
+        }
+
+};
+
+static void __init tl_wa701ndv2_setup(void)
+{
+    u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
+    u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
+
+    /* disable PHY_SWAP and PHY_ADDR_SWAP bits */
+    ath79_setup_ar933x_phy4_switch(false, false);
+
+    ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wa701ndv2_leds_gpio),
+                 tl_wa701ndv2_leds_gpio);
+
+    ath79_register_gpio_keys_polled(-1, TL_WA701NDV2_KEYS_POLL_INTERVAL,
+                    ARRAY_SIZE(tl_wa701ndv2_gpio_keys),
+                    tl_wa701ndv2_gpio_keys);
+
+    gpio_request_one(TL_WA701NDV2_GPIO_USB_POWER,
+             GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
+             "USB power");
+    ath79_register_usb();
+
+    ath79_register_m25p80(&tl_wa701ndv2_flash_data);
+    ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
+    /* ath79_init_mac(ath79_eth1_data.mac_addr, mac, -1); */
+
+    ath79_register_mdio(0, 0x0);
+    ath79_register_eth(0);
+    ath79_register_eth(1);
+
+    ath79_register_wmac(ee, mac);
+}
+
+MIPS_MACHINE(ATH79_MACH_TL_WA701ND_V2, "TL-WA701ND-v2",
+         "TP-LINK TL-WA701ND v2", tl_wa701ndv2_setup);
diff --git a/target/linux/ar71xx/image/Makefile
b/target/linux/ar71xx/image/Makefile
index 683c238..425fcc5 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -1163,7 +1163,7 @@ $(eval $(call
SingleProfile,TPLINKOLD,squashfs-only,TLWR841NV15,tl-wr841nd-v1.5,
 $(eval $(call SingleProfile,TPLINK,64kraw,RNXN360RT,rnx-n360rt,TL-WR941ND,ttyS0,115200,0x09410002,0x00420001,4M))
 $(eval $(call SingleProfile,TPLINK,64kraw,TLMR3220V1,tl-mr3220-v1,TL-MR3220,ttyS0,115200,0x32200001,1,4M))
 $(eval $(call SingleProfile,TPLINK,64kraw,TLMR3420V1,tl-mr3420-v1,TL-MR3420,ttyS0,115200,0x34200001,1,4M))
-$(eval $(call SingleProfile,TPLINK,64kraw,TLWA701,tl-wa701n-v1,TL-WA901ND,ttyS0,115200,0x07010001,1,4M))
+$(eval $(call SingleProfile,TPLINK,64kraw,TLWA701NV1,tl-wa701n-v1,TL-WA901ND,ttyS0,115200,0x07010001,1,4M))
 $(eval $(call SingleProfile,TPLINK,64kraw,TLWA730REV1,tl-wa730rev1,TL-WA901ND,ttyS0,115200,0x07300001,1,4M))
 $(eval $(call SingleProfile,TPLINK,64kraw,TLWA7510NV1,tl-wa7510n,TL-WA7510N,ttyS0,115200,0x75100001,1,4M))
 $(eval $(call SingleProfile,TPLINK,64kraw,TLWA801NV1,tl-wa801nd-v1,TL-WA901ND,ttyS0,115200,0x08010001,1,4M))
@@ -1199,6 +1199,7 @@ $(eval $(call
SingleProfile,TPLINK-LZMA,64kraw,TLMR3040V1,tl-mr3040-v1,TL-MR3040
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLMR3040V2,tl-mr3040-v2,TL-MR3040-v2,ttyATH0,115200,0x30400002,1,4Mlzma))
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLMR3220V2,tl-mr3220-v2,TL-MR3220-v2,ttyATH0,115200,0x32200002,1,4Mlzma))
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLMR3420V2,tl-mr3420-v2,TL-MR3420-v2,ttyS0,115200,0x34200002,1,4Mlzma))
+$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWA701NV2,tl-wa701nd-v2,TL-WA701ND-v2,ttyATH0,115200,0x07010002,1,4Mlzma))
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR703,tl-wr703n-v1,TL-WR703N,ttyATH0,115200,0x07030101,1,4Mlzma))
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR710,tl-wr710n-v1,TL-WR710N,ttyATH0,115200,0x07100001,1,8Mlzma))
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR720NV3,tl-wr720n-v3,TL-WR720N-v3,ttyATH0,115200,0x07200103,1,4Mlzma))
@@ -1276,6 +1277,7 @@ $(eval $(call MultiProfile,TLMR11U,TLMR11UV1 TLMR11UV2))
 $(eval $(call MultiProfile,TLMR3040,TLMR3040V1 TLMR3040V2))
 $(eval $(call MultiProfile,TLMR3220,TLMR3220V1 TLMR3220V2))
 $(eval $(call MultiProfile,TLMR3420,TLMR3420V1 TLMR3420V2))
+$(eval $(call MultiProfile,TLWA701,TLWA701NV1 TLWA701NV2))
 $(eval $(call MultiProfile,TLWA730RE,TLWA730REV1))
 $(eval $(call MultiProfile,TLWA801,TLWA801NV1 TLWA801NV2))
 $(eval $(call MultiProfile,TLWA830,TLWA830RV1 TLWA830RV2))
diff --git a/target/linux/ar71xx/patches-3.10/729-MIPS-ath79-add-TL-WA701NDv2-support.patch
b/target/linux/ar71xx/patches-3.10/729-MIPS-ath79-add-TL-WA701NDv2-support.patch
new file mode 100644
index 0000000..b0de43f
--- /dev/null
+++ b/target/linux/ar71xx/patches-3.10/729-MIPS-ath79-add-TL-WA701NDv2-support.patch
@@ -0,0 +1,45 @@
+Index: linux-3.10.49/arch/mips/ath79/machtypes.h
+===================================================================
+--- linux-3.10.49.orig/arch/mips/ath79/machtypes.h
++++ linux-3.10.49/arch/mips/ath79/machtypes.h
+@@ -118,6 +118,7 @@ enum ath79_mach_type {
+     ATH79_MACH_TL_MR3220_V2,    /* TP-LINK TL-MR3220 v2 */
+     ATH79_MACH_TL_MR3420,        /* TP-LINK TL-MR3420 */
+     ATH79_MACH_TL_MR3420_V2,    /* TP-LINK TL-MR3420 v2 */
++    ATH79_MACH_TL_WA701ND_V2,    /* TP-LINK TL-WA701ND v2 */
+     ATH79_MACH_TL_WA750RE,        /* TP-LINK TL-WA750RE */
+     ATH79_MACH_TL_WA7510N_V1,    /* TP-LINK TL-WA7510N v1*/
+     ATH79_MACH_TL_WA850RE,        /* TP-LINK TL-WA850RE */
+Index: linux-3.10.49/arch/mips/ath79/Kconfig
+===================================================================
+--- linux-3.10.49.orig/arch/mips/ath79/Kconfig
++++ linux-3.10.49/arch/mips/ath79/Kconfig
+@@ -713,6 +713,16 @@ config ATH79_MACH_TL_MR3X20
+     select ATH79_DEV_M25P80
+     select ATH79_DEV_USB
+
++config ATH79_MACH_TL_WA701ND_V2
++    bool "TP-LINK TL-WA701ND v2 support"
++    select SOC_AR933X
++    select ATH79_DEV_ETH
++    select ATH79_DEV_GPIO_BUTTONS
++    select ATH79_DEV_LEDS_GPIO
++    select ATH79_DEV_M25P80
++    select ATH79_DEV_USB
++    select ATH79_DEV_WMAC
++
+ config ATH79_MACH_TL_WAX50RE
+     bool "TP-LINK TL-WA750/850RE support"
+     select SOC_AR934X
+Index: linux-3.10.49/arch/mips/ath79/Makefile
+===================================================================
+--- linux-3.10.49.orig/arch/mips/ath79/Makefile
++++ linux-3.10.49/arch/mips/ath79/Makefile
+@@ -101,6 +101,7 @@ obj-$(CONFIG_ATH79_MACH_TL_MR11U)    += mac
+ obj-$(CONFIG_ATH79_MACH_TL_MR13U)    += mach-tl-mr13u.o
+ obj-$(CONFIG_ATH79_MACH_TL_MR3020)    += mach-tl-mr3020.o
+ obj-$(CONFIG_ATH79_MACH_TL_MR3X20)    += mach-tl-mr3x20.o
++obj-$(CONFIG_ATH79_MACH_TL_WA701ND_V2)    += mach-tl-wa701nd-v2.o
+ obj-$(CONFIG_ATH79_MACH_TL_WAX50RE)     += mach-tl-wax50re.o
+ obj-$(CONFIG_ATH79_MACH_TL_WA830RE_V2)    += mach-tl-wa830re-v2.o
+ obj-$(CONFIG_ATH79_MACH_TL_WA901ND)    += mach-tl-wa901nd.o
diff --git a/tools/firmware-utils/src/mktplinkfw.c
b/tools/firmware-utils/src/mktplinkfw.c
index a6aab59..0a5e4c3 100644
--- a/tools/firmware-utils/src/mktplinkfw.c
+++ b/tools/firmware-utils/src/mktplinkfw.c
@@ -40,6 +40,7 @@
 #define HWID_TL_MR3420_V1    0x34200001
 #define HWID_TL_MR3420_V2    0x34200002
 #define HWID_TL_WA701N_V1    0x07010001
+#define HWID_TL_WA701N_V2    0x07010002
 #define HWID_TL_WA7510N_V1    0x75100001
 #define HWID_TL_WA801ND_V1    0x08010001
 #define HWID_TL_WA830RE_V1    0x08300010
@@ -254,6 +255,11 @@ static struct board_info boards[] = {
         .hw_rev        = 1,
         .layout_id    = "4M",
     }, {
+        .id        = "TL-WA701Nv2",
+        .hw_id        = HWID_TL_WA701N_V2,
+        .hw_rev        = 1,
+        .layout_id    = "4Mlzma",
+    }, {
         .id        = "TL-WA7510N",
         .hw_id        = HWID_TL_WA7510N_V1,
         .hw_rev        = 1,
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From yszhou4tech at gmail.com  Mon Jan 19 06:21:33 2015
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Mon, 19 Jan 2015 19:21:33 +0800
Subject: [OpenWrt-Devel] [PATCH v2] [ar71xx] add support for TP-LINK
 TL-WA701ND v2
In-Reply-To: <CAKkO-Ej7Ec=A=9J+3UrFbRNJYyehnPrXDaZh0GiNSw1xXBeDXQ@mail.gmail.com>
References: <CAKkO-Ej7Ec=A=9J+3UrFbRNJYyehnPrXDaZh0GiNSw1xXBeDXQ@mail.gmail.com>
Message-ID: <CAECwjAhg3BvPVDUvdiGAUi58wScNdqez=57LbKnK76seCMhW2A@mail.gmail.com>

On 19 January 2015 at 19:00, Luigi Tarenga <luigi.tarenga at gmail.com> wrote:
> add support for TP-LINK TL-WA701ND v2
>
> Signed-off-by: Luigi Tarenga <luigi.tarenga at gmail.com>
> ---
> new attempt. I removed the refactoring portion in previous version
> and corrected the diff stat. I hope this time it's fine.
>

Looks like it's whitespace broken this time.  Better try
git-send-email or the like.

Regards.

                yousong


> regards
> Luigi
> ---
>  target/linux/ar71xx/base-files/etc/diag.sh
>         |   1 +
>  target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
>         |   5 ++
>  target/linux/ar71xx/base-files/etc/uci-defaults/02_network
>         |   1 +
>  target/linux/ar71xx/base-files/lib/ar71xx.sh
>         |   3 +
>  target/linux/ar71xx/base-files/lib/upgrade/platform.sh
>         |   1 +
>  target/linux/ar71xx/config-3.10
>         |   1 +
>  target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa701nd-v2.c
>         | 116 +++++++++++++++++++++++++++++++++++++
>  target/linux/ar71xx/image/Makefile
>         |   4 +-
>  .../linux/ar71xx/patches-3.10/729-MIPS-ath79-add-TL-WA701NDv2-support.patch
>   |  45 ++++++++++++++
>  tools/firmware-utils/src/mktplinkfw.c
>         |   6 ++
>  10 files changed, 182 insertions(+), 1 deletion(-)
>
> diff --git a/target/linux/ar71xx/base-files/etc/diag.sh
> b/target/linux/ar71xx/base-files/etc/diag.sh
> index fa07f39..eb96338 100755
> --- a/target/linux/ar71xx/base-files/etc/diag.sh
> +++ b/target/linux/ar71xx/base-files/etc/diag.sh
> @@ -195,6 +195,7 @@ get_status_led() {
>      tl-mr3220-v2 | \
>      tl-mr3420 | \
>      tl-mr3420-v2 | \
> +    tl-wa701nd-v2 | \
>      tl-wa801nd-v2 | \
>      tl-wa901nd | \
>      tl-wa901nd-v2 | \
> diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
> b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
> index 5b9dbe7..0d085be 100755
> --- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
> +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
> @@ -275,6 +275,11 @@ tl-wa850re)
>      ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "tp-link:blue:signal5"
> "wlan0" "80" "100" "-79" "13"
>      ;;
>
> +tl-wa701nd-v2)
> +    ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
> +    ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
> +    ;;
> +
>  tl-wa860re)
>      ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
>      ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
> diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
> b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
> index c5cfd67..4be30b8 100755
> --- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
> +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
> @@ -301,6 +301,7 @@ tl-mr13u |\
>  tl-mr3020 |\
>  tl-mr3040 |\
>  tl-mr3040-v2 |\
> +tl-wa701nd-v2 |\
>  tl-wa750re |\
>  tl-wa850re |\
>  tl-wa830re-v2 |\
> diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh
> b/target/linux/ar71xx/base-files/lib/ar71xx.sh
> index 1e96b6d..df35775 100755
> --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
> +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
> @@ -571,6 +571,9 @@ ar71xx_board_detect() {
>      *"TL-MR3420 v2")
>          name="tl-mr3420-v2"
>          ;;
> +    *"TL-WA701ND v2")
> +        name="tl-wa701nd-v2"
> +        ;;
>      *TL-WA750RE)
>          name="tl-wa750re"
>          ;;
> diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
> b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
> index 846954c..eeaac6a 100755
> --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
> +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
> @@ -269,6 +269,7 @@ platform_check_image() {
>      tl-mr3220-v2 | \
>      tl-mr3420 | \
>      tl-mr3420-v2 | \
> +    tl-wa701nd-v2 | \
>      tl-wa7510n | \
>      tl-wa750re | \
>      tl-wa850re | \
> diff --git a/target/linux/ar71xx/config-3.10 b/target/linux/ar71xx/config-3.10
> index 9a8378a..482914a 100644
> --- a/target/linux/ar71xx/config-3.10
> +++ b/target/linux/ar71xx/config-3.10
> @@ -88,6 +88,7 @@ CONFIG_ATH79_MACH_TL_MR11U=y
>  CONFIG_ATH79_MACH_TL_MR13U=y
>  CONFIG_ATH79_MACH_TL_MR3020=y
>  CONFIG_ATH79_MACH_TL_MR3X20=y
> +CONFIG_ATH79_MACH_TL_WA701ND_V2=y
>  CONFIG_ATH79_MACH_TL_WA830RE_V2=y
>  CONFIG_ATH79_MACH_TL_WA901ND=y
>  CONFIG_ATH79_MACH_TL_WA901ND_V2=y
> diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa701nd-v2.c
> b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa701nd-v2.c
> new file mode 100644
> index 0000000..aab92b3
> --- /dev/null
> +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa701nd-v2.c
> @@ -0,0 +1,116 @@
> +/*
> + *  TP-LINK TL-WA701ND v2 board support
> + *
> + *  Copyright (C) 2015 Luigi Tarenga <luigi.tarenga at gmail.com>
> + *
> + *  This program is free software; you can redistribute it and/or modify it
> + *  under the terms of the GNU General Public License version 2 as published
> + *  by the Free Software Foundation.
> + */
> +
> +#include <linux/gpio.h>
> +
> +#include <asm/mach-ath79/ath79.h>
> +
> +#include "dev-eth.h"
> +#include "dev-gpio-buttons.h"
> +#include "dev-leds-gpio.h"
> +#include "dev-m25p80.h"
> +#include "dev-usb.h"
> +#include "dev-wmac.h"
> +#include "machtypes.h"
> +
> +#define TL_WA701NDV2_GPIO_LED_WLAN    0
> +#define TL_WA701NDV2_GPIO_LED_QSS    1
> +#define TL_WA701NDV2_GPIO_LED_LAN    17
> +#define TL_WA701NDV2_GPIO_LED_SYSTEM    27
> +
> +#define TL_WA701NDV2_GPIO_BTN_RESET    11
> +#define TL_WA701NDV2_GPIO_BTN_QSS    26
> +
> +#define TL_WA701NDV2_GPIO_USB_POWER    8
> +
> +#define TL_WA701NDV2_KEYS_POLL_INTERVAL    20    /* msecs */
> +#define TL_WA701NDV2_KEYS_DEBOUNCE_INTERVAL    (3 *
> TL_WA701NDV2_KEYS_POLL_INTERVAL)
> +
> +static const char *tl_wa701ndv2_part_probes[] = {
> +    "tp-link",
> +    NULL,
> +};
> +
> +static struct flash_platform_data tl_wa701ndv2_flash_data = {
> +    .part_probes    = tl_wa701ndv2_part_probes,
> +};
> +
> +static struct gpio_led tl_wa701ndv2_leds_gpio[] __initdata = {
> +    {
> +        .name        = "tp-link:green:wlan",
> +        .gpio        = TL_WA701NDV2_GPIO_LED_WLAN,
> +        .active_low    = 0,
> +    }, {
> +        .name        = "tp-link:green:qss",
> +        .gpio        = TL_WA701NDV2_GPIO_LED_QSS,
> +        .active_low    = 0,
> +    }, {
> +        .name        = "tp-link:green:lan",
> +        .gpio        = TL_WA701NDV2_GPIO_LED_LAN,
> +        .active_low    = 1,
> +    }, {
> +        .name        = "tp-link:green:system",
> +        .gpio        = TL_WA701NDV2_GPIO_LED_SYSTEM,
> +        .active_low    = 1,
> +        }
> +};
> +
> +static struct gpio_keys_button tl_wa701ndv2_gpio_keys[] __initdata = {
> +    {
> +        .desc        = "reset",
> +        .type        = EV_KEY,
> +        .code        = KEY_RESTART,
> +        .debounce_interval = TL_WA701NDV2_KEYS_DEBOUNCE_INTERVAL,
> +        .gpio        = TL_WA701NDV2_GPIO_BTN_RESET,
> +        .active_low    = 0,
> +    } , {
> +                .desc        = "qss",
> +                .type        = EV_KEY,
> +                .code        = KEY_WPS_BUTTON,
> +                .debounce_interval = TL_WA701NDV2_KEYS_DEBOUNCE_INTERVAL,
> +                .gpio        = TL_WA701NDV2_GPIO_BTN_QSS,
> +                .active_low    = 0,
> +        }
> +
> +};
> +
> +static void __init tl_wa701ndv2_setup(void)
> +{
> +    u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
> +    u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
> +
> +    /* disable PHY_SWAP and PHY_ADDR_SWAP bits */
> +    ath79_setup_ar933x_phy4_switch(false, false);
> +
> +    ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wa701ndv2_leds_gpio),
> +                 tl_wa701ndv2_leds_gpio);
> +
> +    ath79_register_gpio_keys_polled(-1, TL_WA701NDV2_KEYS_POLL_INTERVAL,
> +                    ARRAY_SIZE(tl_wa701ndv2_gpio_keys),
> +                    tl_wa701ndv2_gpio_keys);
> +
> +    gpio_request_one(TL_WA701NDV2_GPIO_USB_POWER,
> +             GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
> +             "USB power");
> +    ath79_register_usb();
> +
> +    ath79_register_m25p80(&tl_wa701ndv2_flash_data);
> +    ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
> +    /* ath79_init_mac(ath79_eth1_data.mac_addr, mac, -1); */
> +
> +    ath79_register_mdio(0, 0x0);
> +    ath79_register_eth(0);
> +    ath79_register_eth(1);
> +
> +    ath79_register_wmac(ee, mac);
> +}
> +
> +MIPS_MACHINE(ATH79_MACH_TL_WA701ND_V2, "TL-WA701ND-v2",
> +         "TP-LINK TL-WA701ND v2", tl_wa701ndv2_setup);
> diff --git a/target/linux/ar71xx/image/Makefile
> b/target/linux/ar71xx/image/Makefile
> index 683c238..425fcc5 100644
> --- a/target/linux/ar71xx/image/Makefile
> +++ b/target/linux/ar71xx/image/Makefile
> @@ -1163,7 +1163,7 @@ $(eval $(call
> SingleProfile,TPLINKOLD,squashfs-only,TLWR841NV15,tl-wr841nd-v1.5,
>  $(eval $(call SingleProfile,TPLINK,64kraw,RNXN360RT,rnx-n360rt,TL-WR941ND,ttyS0,115200,0x09410002,0x00420001,4M))
>  $(eval $(call SingleProfile,TPLINK,64kraw,TLMR3220V1,tl-mr3220-v1,TL-MR3220,ttyS0,115200,0x32200001,1,4M))
>  $(eval $(call SingleProfile,TPLINK,64kraw,TLMR3420V1,tl-mr3420-v1,TL-MR3420,ttyS0,115200,0x34200001,1,4M))
> -$(eval $(call SingleProfile,TPLINK,64kraw,TLWA701,tl-wa701n-v1,TL-WA901ND,ttyS0,115200,0x07010001,1,4M))
> +$(eval $(call SingleProfile,TPLINK,64kraw,TLWA701NV1,tl-wa701n-v1,TL-WA901ND,ttyS0,115200,0x07010001,1,4M))
>  $(eval $(call SingleProfile,TPLINK,64kraw,TLWA730REV1,tl-wa730rev1,TL-WA901ND,ttyS0,115200,0x07300001,1,4M))
>  $(eval $(call SingleProfile,TPLINK,64kraw,TLWA7510NV1,tl-wa7510n,TL-WA7510N,ttyS0,115200,0x75100001,1,4M))
>  $(eval $(call SingleProfile,TPLINK,64kraw,TLWA801NV1,tl-wa801nd-v1,TL-WA901ND,ttyS0,115200,0x08010001,1,4M))
> @@ -1199,6 +1199,7 @@ $(eval $(call
> SingleProfile,TPLINK-LZMA,64kraw,TLMR3040V1,tl-mr3040-v1,TL-MR3040
>  $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLMR3040V2,tl-mr3040-v2,TL-MR3040-v2,ttyATH0,115200,0x30400002,1,4Mlzma))
>  $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLMR3220V2,tl-mr3220-v2,TL-MR3220-v2,ttyATH0,115200,0x32200002,1,4Mlzma))
>  $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLMR3420V2,tl-mr3420-v2,TL-MR3420-v2,ttyS0,115200,0x34200002,1,4Mlzma))
> +$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWA701NV2,tl-wa701nd-v2,TL-WA701ND-v2,ttyATH0,115200,0x07010002,1,4Mlzma))
>  $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR703,tl-wr703n-v1,TL-WR703N,ttyATH0,115200,0x07030101,1,4Mlzma))
>  $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR710,tl-wr710n-v1,TL-WR710N,ttyATH0,115200,0x07100001,1,8Mlzma))
>  $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR720NV3,tl-wr720n-v3,TL-WR720N-v3,ttyATH0,115200,0x07200103,1,4Mlzma))
> @@ -1276,6 +1277,7 @@ $(eval $(call MultiProfile,TLMR11U,TLMR11UV1 TLMR11UV2))
>  $(eval $(call MultiProfile,TLMR3040,TLMR3040V1 TLMR3040V2))
>  $(eval $(call MultiProfile,TLMR3220,TLMR3220V1 TLMR3220V2))
>  $(eval $(call MultiProfile,TLMR3420,TLMR3420V1 TLMR3420V2))
> +$(eval $(call MultiProfile,TLWA701,TLWA701NV1 TLWA701NV2))
>  $(eval $(call MultiProfile,TLWA730RE,TLWA730REV1))
>  $(eval $(call MultiProfile,TLWA801,TLWA801NV1 TLWA801NV2))
>  $(eval $(call MultiProfile,TLWA830,TLWA830RV1 TLWA830RV2))
> diff --git a/target/linux/ar71xx/patches-3.10/729-MIPS-ath79-add-TL-WA701NDv2-support.patch
> b/target/linux/ar71xx/patches-3.10/729-MIPS-ath79-add-TL-WA701NDv2-support.patch
> new file mode 100644
> index 0000000..b0de43f
> --- /dev/null
> +++ b/target/linux/ar71xx/patches-3.10/729-MIPS-ath79-add-TL-WA701NDv2-support.patch
> @@ -0,0 +1,45 @@
> +Index: linux-3.10.49/arch/mips/ath79/machtypes.h
> +===================================================================
> +--- linux-3.10.49.orig/arch/mips/ath79/machtypes.h
> ++++ linux-3.10.49/arch/mips/ath79/machtypes.h
> +@@ -118,6 +118,7 @@ enum ath79_mach_type {
> +     ATH79_MACH_TL_MR3220_V2,    /* TP-LINK TL-MR3220 v2 */
> +     ATH79_MACH_TL_MR3420,        /* TP-LINK TL-MR3420 */
> +     ATH79_MACH_TL_MR3420_V2,    /* TP-LINK TL-MR3420 v2 */
> ++    ATH79_MACH_TL_WA701ND_V2,    /* TP-LINK TL-WA701ND v2 */
> +     ATH79_MACH_TL_WA750RE,        /* TP-LINK TL-WA750RE */
> +     ATH79_MACH_TL_WA7510N_V1,    /* TP-LINK TL-WA7510N v1*/
> +     ATH79_MACH_TL_WA850RE,        /* TP-LINK TL-WA850RE */
> +Index: linux-3.10.49/arch/mips/ath79/Kconfig
> +===================================================================
> +--- linux-3.10.49.orig/arch/mips/ath79/Kconfig
> ++++ linux-3.10.49/arch/mips/ath79/Kconfig
> +@@ -713,6 +713,16 @@ config ATH79_MACH_TL_MR3X20
> +     select ATH79_DEV_M25P80
> +     select ATH79_DEV_USB
> +
> ++config ATH79_MACH_TL_WA701ND_V2
> ++    bool "TP-LINK TL-WA701ND v2 support"
> ++    select SOC_AR933X
> ++    select ATH79_DEV_ETH
> ++    select ATH79_DEV_GPIO_BUTTONS
> ++    select ATH79_DEV_LEDS_GPIO
> ++    select ATH79_DEV_M25P80
> ++    select ATH79_DEV_USB
> ++    select ATH79_DEV_WMAC
> ++
> + config ATH79_MACH_TL_WAX50RE
> +     bool "TP-LINK TL-WA750/850RE support"
> +     select SOC_AR934X
> +Index: linux-3.10.49/arch/mips/ath79/Makefile
> +===================================================================
> +--- linux-3.10.49.orig/arch/mips/ath79/Makefile
> ++++ linux-3.10.49/arch/mips/ath79/Makefile
> +@@ -101,6 +101,7 @@ obj-$(CONFIG_ATH79_MACH_TL_MR11U)    += mac
> + obj-$(CONFIG_ATH79_MACH_TL_MR13U)    += mach-tl-mr13u.o
> + obj-$(CONFIG_ATH79_MACH_TL_MR3020)    += mach-tl-mr3020.o
> + obj-$(CONFIG_ATH79_MACH_TL_MR3X20)    += mach-tl-mr3x20.o
> ++obj-$(CONFIG_ATH79_MACH_TL_WA701ND_V2)    += mach-tl-wa701nd-v2.o
> + obj-$(CONFIG_ATH79_MACH_TL_WAX50RE)     += mach-tl-wax50re.o
> + obj-$(CONFIG_ATH79_MACH_TL_WA830RE_V2)    += mach-tl-wa830re-v2.o
> + obj-$(CONFIG_ATH79_MACH_TL_WA901ND)    += mach-tl-wa901nd.o
> diff --git a/tools/firmware-utils/src/mktplinkfw.c
> b/tools/firmware-utils/src/mktplinkfw.c
> index a6aab59..0a5e4c3 100644
> --- a/tools/firmware-utils/src/mktplinkfw.c
> +++ b/tools/firmware-utils/src/mktplinkfw.c
> @@ -40,6 +40,7 @@
>  #define HWID_TL_MR3420_V1    0x34200001
>  #define HWID_TL_MR3420_V2    0x34200002
>  #define HWID_TL_WA701N_V1    0x07010001
> +#define HWID_TL_WA701N_V2    0x07010002
>  #define HWID_TL_WA7510N_V1    0x75100001
>  #define HWID_TL_WA801ND_V1    0x08010001
>  #define HWID_TL_WA830RE_V1    0x08300010
> @@ -254,6 +255,11 @@ static struct board_info boards[] = {
>          .hw_rev        = 1,
>          .layout_id    = "4M",
>      }, {
> +        .id        = "TL-WA701Nv2",
> +        .hw_id        = HWID_TL_WA701N_V2,
> +        .hw_rev        = 1,
> +        .layout_id    = "4Mlzma",
> +    }, {
>          .id        = "TL-WA7510N",
>          .hw_id        = HWID_TL_WA7510N_V1,
>          .hw_rev        = 1,
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From luigi.tarenga at gmail.com  Mon Jan 19 06:28:13 2015
From: luigi.tarenga at gmail.com (Luigi Tarenga)
Date: Mon, 19 Jan 2015 12:28:13 +0100
Subject: [OpenWrt-Devel] [PATCH v2] [ar71xx] add support for TP-LINK
 TL-WA701ND v2
In-Reply-To: <CAECwjAhg3BvPVDUvdiGAUi58wScNdqez=57LbKnK76seCMhW2A@mail.gmail.com>
References: <CAKkO-Ej7Ec=A=9J+3UrFbRNJYyehnPrXDaZh0GiNSw1xXBeDXQ@mail.gmail.com>
 <CAECwjAhg3BvPVDUvdiGAUi58wScNdqez=57LbKnK76seCMhW2A@mail.gmail.com>
Message-ID: <CAKkO-EhSruQe7SnEbq-sd_ZLpVOKtKDrgNb=SA3D1vApPcBvdA@mail.gmail.com>

On Mon, Jan 19, 2015 at 12:21 PM, Yousong Zhou <yszhou4tech at gmail.com> wrote:
> On 19 January 2015 at 19:00, Luigi Tarenga <luigi.tarenga at gmail.com> wrote:
>> add support for TP-LINK TL-WA701ND v2
>>
>> Signed-off-by: Luigi Tarenga <luigi.tarenga at gmail.com>
>> ---
>> new attempt. I removed the refactoring portion in previous version
>> and corrected the diff stat. I hope this time it's fine.
>>
>
> Looks like it's whitespace broken this time.  Better try
> git-send-email or the like.
>
> Regards.
>
>                 yousong
>

I saw the warning about "space before tab in indent." but I thought it was
ok because the patch generate a patch file.
On my pc it's reported as a warning but in the end apply correctly.
Can you confirm I have to resend it?

thanks
Luigi
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From luigi.tarenga at gmail.com  Mon Jan 19 06:51:36 2015
From: luigi.tarenga at gmail.com (Luigi Tarenga)
Date: Mon, 19 Jan 2015 12:51:36 +0100
Subject: [OpenWrt-Devel] [PATCH v2] [ar71xx] add support for TP-LINK
 TL-WA701ND v2
In-Reply-To: <CAKkO-EhSruQe7SnEbq-sd_ZLpVOKtKDrgNb=SA3D1vApPcBvdA@mail.gmail.com>
References: <CAKkO-Ej7Ec=A=9J+3UrFbRNJYyehnPrXDaZh0GiNSw1xXBeDXQ@mail.gmail.com>
 <CAECwjAhg3BvPVDUvdiGAUi58wScNdqez=57LbKnK76seCMhW2A@mail.gmail.com>
 <CAKkO-EhSruQe7SnEbq-sd_ZLpVOKtKDrgNb=SA3D1vApPcBvdA@mail.gmail.com>
Message-ID: <CAKkO-EgEo+s3EnrN-pB7Hg1vA56YR2R+0Y=-5Bko_iYBsXN9OA@mail.gmail.com>

On Mon, Jan 19, 2015 at 12:28 PM, Luigi Tarenga <luigi.tarenga at gmail.com> wrote:
> On Mon, Jan 19, 2015 at 12:21 PM, Yousong Zhou <yszhou4tech at gmail.com> wrote:
>> On 19 January 2015 at 19:00, Luigi Tarenga <luigi.tarenga at gmail.com> wrote:
>>> add support for TP-LINK TL-WA701ND v2
>>>
>>> Signed-off-by: Luigi Tarenga <luigi.tarenga at gmail.com>
>>> ---
>>> new attempt. I removed the refactoring portion in previous version
>>> and corrected the diff stat. I hope this time it's fine.
>>>
>>
>> Looks like it's whitespace broken this time.  Better try
>> git-send-email or the like.
>>
>> Regards.
>>
>>                 yousong
>>
>
> I saw the warning about "space before tab in indent." but I thought it was
> ok because the patch generate a patch file.
> On my pc it's reported as a warning but in the end apply correctly.
> Can you confirm I have to resend it?
>
> thanks
> Luigi

I think the weclient did some tab to whitespace conversion. I will resend it.

thanks
Luigi
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From i at conorogorman.net  Mon Jan 19 06:51:45 2015
From: i at conorogorman.net (Conor O'Gorman)
Date: Mon, 19 Jan 2015 11:51:45 +0000
Subject: [OpenWrt-Devel] uboot-lantiq cgu settings for ramboot image
In-Reply-To: <1421664368.25187.18.camel@merveille.lan>
References: <1421664368.25187.18.camel@merveille.lan>
Message-ID: <54BCEFD1.6010902@conorogorman.net>

On 19/01/15 10:46, Ben Mulvihill wrote:
> Hello,
>
> I am trying to build uboot-lantiq for the BT Home Hub 3A (lantiq
> ar9), and am wondering where to initialise the cgu, in the case
> of a ramboot image for uart booting. Normally the cgu is initialised
> in lowlevel_init, but that code is bypassed in ramboot images. The
> result is that the board boots with the wrong cgu settings, which
> sends the console haywire. So far I have tried two solutions:

Another option is to try and not change anything. The console is already 
configured and running. The ram does need config.

I was used to seeing the ramboot version running at half clock speed, at 
least on danube, previous to ar9.

Conor
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From charlie at atechmedia.com  Mon Jan 19 07:18:17 2015
From: charlie at atechmedia.com (Charlie Smurthwaite)
Date: Mon, 19 Jan 2015 12:18:17 +0000
Subject: [OpenWrt-Devel] RouterBOARD CRS125-24G-1S
Message-ID: <54BCF609.8080004@atechmedia.com>

Hi,

Newbie disclaimer: I'm new to this list, and to kernel development, so I 
apologise if any of my questions are stupid.

I have taken on the task of porting to the RouterBOARD CRS125-24G-1S. I 
have a few specific questions so far and hoped someone would be willing 
to provide me with some pointers:

1) This device has an SPI LCD touchscreen. I am unsure where to put a 
driver for this, as I couldn't find any existing devices with LCD 
screens. This is a particularly interesting feature that I hope to get 
working.

2) How might I determine the appropriate partition layout for this 
device. I assume this needs to match the Mikrotik layout in order for 
their bootloader to work, and to avoid overwriting data needed for WiFi 
drivers in the wireless version of the product. Unfortunately, my 
understanding of this part is currently very limited.

3) This device has a speaker connected to a GPIO. I am able to make this 
click using the LED driver, but is there a driver available to make this 
beep, play Auld Lang Syne, etc?

Currently I have NAND and LEDs working, Ethernet working 50% (it won't 
receive, not sure why not yet, but I will investigate further when I 
start work on the Ethernet switch). I've attached my basic code so far.

Thanks,

Charlie

-------------- next part --------------
A non-text attachment was scrubbed...
Name: crs125g.c
Type: text/x-csrc
Size: 5703 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150119/01c2cbc6/attachment.bin>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From luigi.tarenga at gmail.com  Mon Jan 19 07:40:34 2015
From: luigi.tarenga at gmail.com (Luigi Tarenga)
Date: Mon, 19 Jan 2015 13:40:34 +0100
Subject: [OpenWrt-Devel] [PATCH v3] add support for TL-WA701ND v2
Message-ID: <1421671234-14938-1-git-send-email-luigi.tarenga@gmail.com>

Signed-off-by: Luigi Tarenga <luigi.tarenga at gmail.com>
---
version 3. sent with git send-email to avoid tabs conversion from gmail webmail.

crossing fingers :)
Luigi
---
 target/linux/ar71xx/base-files/etc/diag.sh         |   1 +
 .../ar71xx/base-files/etc/uci-defaults/01_leds     |   5 +
 .../ar71xx/base-files/etc/uci-defaults/02_network  |   1 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh       |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh      |   1 +
 target/linux/ar71xx/config-3.10                    |   1 +
 .../files/arch/mips/ath79/mach-tl-wa701nd-v2.c     | 116 +++++++++++++++++++++
 target/linux/ar71xx/image/Makefile                 |   4 +-
 .../729-MIPS-ath79-add-TL-WA701NDv2-support.patch  |  45 ++++++++
 tools/firmware-utils/src/mktplinkfw.c              |   6 ++
 10 files changed, 182 insertions(+), 1 deletion(-)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa701nd-v2.c
 create mode 100644 target/linux/ar71xx/patches-3.10/729-MIPS-ath79-add-TL-WA701NDv2-support.patch

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
index fa07f39..eb96338 100755
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -195,6 +195,7 @@ get_status_led() {
 	tl-mr3220-v2 | \
 	tl-mr3420 | \
 	tl-mr3420-v2 | \
+	tl-wa701nd-v2 | \
 	tl-wa801nd-v2 | \
 	tl-wa901nd | \
 	tl-wa901nd-v2 | \
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index 5b9dbe7..0d085be 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -275,6 +275,11 @@ tl-wa850re)
 	ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "tp-link:blue:signal5" "wlan0" "80" "100" "-79" "13"
 	;;
 
+tl-wa701nd-v2)
+	ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
+	ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
+	;;
+
 tl-wa860re)
 	ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
 	ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index c5cfd67..4be30b8 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -301,6 +301,7 @@ tl-mr13u |\
 tl-mr3020 |\
 tl-mr3040 |\
 tl-mr3040-v2 |\
+tl-wa701nd-v2 |\
 tl-wa750re |\
 tl-wa850re |\
 tl-wa830re-v2 |\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 1e96b6d..df35775 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -571,6 +571,9 @@ ar71xx_board_detect() {
 	*"TL-MR3420 v2")
 		name="tl-mr3420-v2"
 		;;
+	*"TL-WA701ND v2")
+		name="tl-wa701nd-v2"
+		;;
 	*TL-WA750RE)
 		name="tl-wa750re"
 		;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 846954c..eeaac6a 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -269,6 +269,7 @@ platform_check_image() {
 	tl-mr3220-v2 | \
 	tl-mr3420 | \
 	tl-mr3420-v2 | \
+	tl-wa701nd-v2 | \
 	tl-wa7510n | \
 	tl-wa750re | \
 	tl-wa850re | \
diff --git a/target/linux/ar71xx/config-3.10 b/target/linux/ar71xx/config-3.10
index 9a8378a..482914a 100644
--- a/target/linux/ar71xx/config-3.10
+++ b/target/linux/ar71xx/config-3.10
@@ -88,6 +88,7 @@ CONFIG_ATH79_MACH_TL_MR11U=y
 CONFIG_ATH79_MACH_TL_MR13U=y
 CONFIG_ATH79_MACH_TL_MR3020=y
 CONFIG_ATH79_MACH_TL_MR3X20=y
+CONFIG_ATH79_MACH_TL_WA701ND_V2=y
 CONFIG_ATH79_MACH_TL_WA830RE_V2=y
 CONFIG_ATH79_MACH_TL_WA901ND=y
 CONFIG_ATH79_MACH_TL_WA901ND_V2=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa701nd-v2.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa701nd-v2.c
new file mode 100644
index 0000000..aab92b3
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa701nd-v2.c
@@ -0,0 +1,116 @@
+/*
+ *  TP-LINK TL-WA701ND v2 board support
+ *
+ *  Copyright (C) 2015 Luigi Tarenga <luigi.tarenga at gmail.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License version 2 as published
+ *  by the Free Software Foundation.
+ */
+
+#include <linux/gpio.h>
+
+#include <asm/mach-ath79/ath79.h>
+
+#include "dev-eth.h"
+#include "dev-gpio-buttons.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-usb.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+
+#define TL_WA701NDV2_GPIO_LED_WLAN	0
+#define TL_WA701NDV2_GPIO_LED_QSS	1
+#define TL_WA701NDV2_GPIO_LED_LAN	17
+#define TL_WA701NDV2_GPIO_LED_SYSTEM	27
+
+#define TL_WA701NDV2_GPIO_BTN_RESET	11
+#define TL_WA701NDV2_GPIO_BTN_QSS	26
+
+#define TL_WA701NDV2_GPIO_USB_POWER	8
+
+#define TL_WA701NDV2_KEYS_POLL_INTERVAL	20	/* msecs */
+#define TL_WA701NDV2_KEYS_DEBOUNCE_INTERVAL	(3 * TL_WA701NDV2_KEYS_POLL_INTERVAL)
+
+static const char *tl_wa701ndv2_part_probes[] = {
+	"tp-link",
+	NULL,
+};
+
+static struct flash_platform_data tl_wa701ndv2_flash_data = {
+	.part_probes	= tl_wa701ndv2_part_probes,
+};
+
+static struct gpio_led tl_wa701ndv2_leds_gpio[] __initdata = {
+	{
+		.name		= "tp-link:green:wlan",
+		.gpio		= TL_WA701NDV2_GPIO_LED_WLAN,
+		.active_low	= 0,
+	}, {
+		.name		= "tp-link:green:qss",
+		.gpio		= TL_WA701NDV2_GPIO_LED_QSS,
+		.active_low	= 0,
+	}, {
+		.name		= "tp-link:green:lan",
+		.gpio		= TL_WA701NDV2_GPIO_LED_LAN,
+		.active_low	= 1,
+	}, {
+		.name		= "tp-link:green:system",
+		.gpio		= TL_WA701NDV2_GPIO_LED_SYSTEM,
+		.active_low	= 1,
+        }
+};
+
+static struct gpio_keys_button tl_wa701ndv2_gpio_keys[] __initdata = {
+	{
+		.desc		= "reset",
+		.type		= EV_KEY,
+		.code		= KEY_RESTART,
+		.debounce_interval = TL_WA701NDV2_KEYS_DEBOUNCE_INTERVAL,
+		.gpio		= TL_WA701NDV2_GPIO_BTN_RESET,
+		.active_low	= 0,
+	} , {
+                .desc		= "qss",
+                .type		= EV_KEY,
+                .code		= KEY_WPS_BUTTON,
+                .debounce_interval = TL_WA701NDV2_KEYS_DEBOUNCE_INTERVAL,
+                .gpio		= TL_WA701NDV2_GPIO_BTN_QSS,
+                .active_low	= 0,
+        }
+
+};
+
+static void __init tl_wa701ndv2_setup(void)
+{
+	u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
+	u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
+
+	/* disable PHY_SWAP and PHY_ADDR_SWAP bits */
+	ath79_setup_ar933x_phy4_switch(false, false);
+
+	ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wa701ndv2_leds_gpio),
+				 tl_wa701ndv2_leds_gpio);
+
+	ath79_register_gpio_keys_polled(-1, TL_WA701NDV2_KEYS_POLL_INTERVAL,
+					ARRAY_SIZE(tl_wa701ndv2_gpio_keys),
+					tl_wa701ndv2_gpio_keys);
+
+	gpio_request_one(TL_WA701NDV2_GPIO_USB_POWER,
+			 GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
+			 "USB power");
+	ath79_register_usb();
+
+	ath79_register_m25p80(&tl_wa701ndv2_flash_data);
+	ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
+	/* ath79_init_mac(ath79_eth1_data.mac_addr, mac, -1); */
+
+	ath79_register_mdio(0, 0x0);
+	ath79_register_eth(0);
+	ath79_register_eth(1);
+
+	ath79_register_wmac(ee, mac);
+}
+
+MIPS_MACHINE(ATH79_MACH_TL_WA701ND_V2, "TL-WA701ND-v2",
+	     "TP-LINK TL-WA701ND v2", tl_wa701ndv2_setup);
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
index 683c238..425fcc5 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -1163,7 +1163,7 @@ $(eval $(call SingleProfile,TPLINKOLD,squashfs-only,TLWR841NV15,tl-wr841nd-v1.5,
 $(eval $(call SingleProfile,TPLINK,64kraw,RNXN360RT,rnx-n360rt,TL-WR941ND,ttyS0,115200,0x09410002,0x00420001,4M))
 $(eval $(call SingleProfile,TPLINK,64kraw,TLMR3220V1,tl-mr3220-v1,TL-MR3220,ttyS0,115200,0x32200001,1,4M))
 $(eval $(call SingleProfile,TPLINK,64kraw,TLMR3420V1,tl-mr3420-v1,TL-MR3420,ttyS0,115200,0x34200001,1,4M))
-$(eval $(call SingleProfile,TPLINK,64kraw,TLWA701,tl-wa701n-v1,TL-WA901ND,ttyS0,115200,0x07010001,1,4M))
+$(eval $(call SingleProfile,TPLINK,64kraw,TLWA701NV1,tl-wa701n-v1,TL-WA901ND,ttyS0,115200,0x07010001,1,4M))
 $(eval $(call SingleProfile,TPLINK,64kraw,TLWA730REV1,tl-wa730rev1,TL-WA901ND,ttyS0,115200,0x07300001,1,4M))
 $(eval $(call SingleProfile,TPLINK,64kraw,TLWA7510NV1,tl-wa7510n,TL-WA7510N,ttyS0,115200,0x75100001,1,4M))
 $(eval $(call SingleProfile,TPLINK,64kraw,TLWA801NV1,tl-wa801nd-v1,TL-WA901ND,ttyS0,115200,0x08010001,1,4M))
@@ -1199,6 +1199,7 @@ $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLMR3040V1,tl-mr3040-v1,TL-MR3040
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLMR3040V2,tl-mr3040-v2,TL-MR3040-v2,ttyATH0,115200,0x30400002,1,4Mlzma))
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLMR3220V2,tl-mr3220-v2,TL-MR3220-v2,ttyATH0,115200,0x32200002,1,4Mlzma))
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLMR3420V2,tl-mr3420-v2,TL-MR3420-v2,ttyS0,115200,0x34200002,1,4Mlzma))
+$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWA701NV2,tl-wa701nd-v2,TL-WA701ND-v2,ttyATH0,115200,0x07010002,1,4Mlzma))
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR703,tl-wr703n-v1,TL-WR703N,ttyATH0,115200,0x07030101,1,4Mlzma))
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR710,tl-wr710n-v1,TL-WR710N,ttyATH0,115200,0x07100001,1,8Mlzma))
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR720NV3,tl-wr720n-v3,TL-WR720N-v3,ttyATH0,115200,0x07200103,1,4Mlzma))
@@ -1276,6 +1277,7 @@ $(eval $(call MultiProfile,TLMR11U,TLMR11UV1 TLMR11UV2))
 $(eval $(call MultiProfile,TLMR3040,TLMR3040V1 TLMR3040V2))
 $(eval $(call MultiProfile,TLMR3220,TLMR3220V1 TLMR3220V2))
 $(eval $(call MultiProfile,TLMR3420,TLMR3420V1 TLMR3420V2))
+$(eval $(call MultiProfile,TLWA701,TLWA701NV1 TLWA701NV2))
 $(eval $(call MultiProfile,TLWA730RE,TLWA730REV1))
 $(eval $(call MultiProfile,TLWA801,TLWA801NV1 TLWA801NV2))
 $(eval $(call MultiProfile,TLWA830,TLWA830RV1 TLWA830RV2))
diff --git a/target/linux/ar71xx/patches-3.10/729-MIPS-ath79-add-TL-WA701NDv2-support.patch b/target/linux/ar71xx/patches-3.10/729-MIPS-ath79-add-TL-WA701NDv2-support.patch
new file mode 100644
index 0000000..b0de43f
--- /dev/null
+++ b/target/linux/ar71xx/patches-3.10/729-MIPS-ath79-add-TL-WA701NDv2-support.patch
@@ -0,0 +1,45 @@
+Index: linux-3.10.49/arch/mips/ath79/machtypes.h
+===================================================================
+--- linux-3.10.49.orig/arch/mips/ath79/machtypes.h
++++ linux-3.10.49/arch/mips/ath79/machtypes.h
+@@ -118,6 +118,7 @@ enum ath79_mach_type {
+ 	ATH79_MACH_TL_MR3220_V2,	/* TP-LINK TL-MR3220 v2 */
+ 	ATH79_MACH_TL_MR3420,		/* TP-LINK TL-MR3420 */
+ 	ATH79_MACH_TL_MR3420_V2,	/* TP-LINK TL-MR3420 v2 */
++	ATH79_MACH_TL_WA701ND_V2,	/* TP-LINK TL-WA701ND v2 */
+ 	ATH79_MACH_TL_WA750RE,		/* TP-LINK TL-WA750RE */
+ 	ATH79_MACH_TL_WA7510N_V1,	/* TP-LINK TL-WA7510N v1*/
+ 	ATH79_MACH_TL_WA850RE,		/* TP-LINK TL-WA850RE */
+Index: linux-3.10.49/arch/mips/ath79/Kconfig
+===================================================================
+--- linux-3.10.49.orig/arch/mips/ath79/Kconfig
++++ linux-3.10.49/arch/mips/ath79/Kconfig
+@@ -713,6 +713,16 @@ config ATH79_MACH_TL_MR3X20
+ 	select ATH79_DEV_M25P80
+ 	select ATH79_DEV_USB
+ 
++config ATH79_MACH_TL_WA701ND_V2
++	bool "TP-LINK TL-WA701ND v2 support"
++	select SOC_AR933X
++	select ATH79_DEV_ETH
++	select ATH79_DEV_GPIO_BUTTONS
++	select ATH79_DEV_LEDS_GPIO
++	select ATH79_DEV_M25P80
++	select ATH79_DEV_USB
++	select ATH79_DEV_WMAC
++
+ config ATH79_MACH_TL_WAX50RE
+ 	bool "TP-LINK TL-WA750/850RE support"
+ 	select SOC_AR934X
+Index: linux-3.10.49/arch/mips/ath79/Makefile
+===================================================================
+--- linux-3.10.49.orig/arch/mips/ath79/Makefile
++++ linux-3.10.49/arch/mips/ath79/Makefile
+@@ -101,6 +101,7 @@ obj-$(CONFIG_ATH79_MACH_TL_MR11U)	+= mac
+ obj-$(CONFIG_ATH79_MACH_TL_MR13U)	+= mach-tl-mr13u.o
+ obj-$(CONFIG_ATH79_MACH_TL_MR3020)	+= mach-tl-mr3020.o
+ obj-$(CONFIG_ATH79_MACH_TL_MR3X20)	+= mach-tl-mr3x20.o
++obj-$(CONFIG_ATH79_MACH_TL_WA701ND_V2)	+= mach-tl-wa701nd-v2.o
+ obj-$(CONFIG_ATH79_MACH_TL_WAX50RE)     += mach-tl-wax50re.o
+ obj-$(CONFIG_ATH79_MACH_TL_WA830RE_V2)	+= mach-tl-wa830re-v2.o
+ obj-$(CONFIG_ATH79_MACH_TL_WA901ND)	+= mach-tl-wa901nd.o
diff --git a/tools/firmware-utils/src/mktplinkfw.c b/tools/firmware-utils/src/mktplinkfw.c
index a6aab59..0a5e4c3 100644
--- a/tools/firmware-utils/src/mktplinkfw.c
+++ b/tools/firmware-utils/src/mktplinkfw.c
@@ -40,6 +40,7 @@
 #define HWID_TL_MR3420_V1	0x34200001
 #define HWID_TL_MR3420_V2	0x34200002
 #define HWID_TL_WA701N_V1	0x07010001
+#define HWID_TL_WA701N_V2	0x07010002
 #define HWID_TL_WA7510N_V1	0x75100001
 #define HWID_TL_WA801ND_V1	0x08010001
 #define HWID_TL_WA830RE_V1	0x08300010
@@ -254,6 +255,11 @@ static struct board_info boards[] = {
 		.hw_rev		= 1,
 		.layout_id	= "4M",
 	}, {
+		.id		= "TL-WA701Nv2",
+		.hw_id		= HWID_TL_WA701N_V2,
+		.hw_rev		= 1,
+		.layout_id	= "4Mlzma",
+	}, {
 		.id		= "TL-WA7510N",
 		.hw_id		= HWID_TL_WA7510N_V1,
 		.hw_rev		= 1,
-- 
2.2.2
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From daniel.schwierzeck at gmail.com  Mon Jan 19 08:57:54 2015
From: daniel.schwierzeck at gmail.com (Daniel Schwierzeck)
Date: Mon, 19 Jan 2015 14:57:54 +0100
Subject: [OpenWrt-Devel] uboot-lantiq cgu settings for ramboot image
In-Reply-To: <1421664368.25187.18.camel@merveille.lan>
References: <1421664368.25187.18.camel@merveille.lan>
Message-ID: <CACUy__UbCWWCC1+p9RTVATaGc=afTvcGAXkHrZBeEC3pLg8K1w@mail.gmail.com>

Hi Ben,

2015-01-19 11:46 GMT+01:00 Ben Mulvihill <ben.mulvihill at gmail.com>:
> Hello,
>
> I am trying to build uboot-lantiq for the BT Home Hub 3A (lantiq
> ar9), and am wondering where to initialise the cgu, in the case
> of a ramboot image for uart booting. Normally the cgu is initialised
> in lowlevel_init, but that code is bypassed in ramboot images. The
> result is that the board boots with the wrong cgu settings, which
> sends the console haywire. So far I have tried two solutions:
>
> - putting the following lines in board_early_init_f:
>
>   #define REG32(addr) *((volatile u32 *)(addr))
>         REG32(0xbf103010) = 0x80;
>         REG32(0xbf103014) = 0x01;
>
>   This fixes the console, but breaks ethernet. I am wondering
>   whether this is because by putting this code in this place, I
>   am altering the cgu settings after setting up ram. Is this
>   admissible?

it is insufficient if you want to change the DDR clock after the
memory is already initialized. For that you will need a sequence like
putting memory in self-refresh mode, stopping memory controller,
update clocks, restart memory controller, putting memory out of
self-refresh. That's why the cgu_init() runs before mc_init(). Thus if
the board comes up with 111/111 MHz, you cannot switch to 393/166 MHz
because that would require to change the DDR clock.

>
> - adding the same two register settings to the start of the
>   ddr_settings file generated by lantiq_ram_init_uart.awk .
>   However, the resulting image gives a download error and won't
>   boot at all.

Actually this should work. Did you put the CGU register settings
before the memory controller settings?

>
> Any suggestions will be gratefully received!
>
> Ben
>
>

-- 
- Daniel
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From ben.mulvihill at gmail.com  Mon Jan 19 09:41:15 2015
From: ben.mulvihill at gmail.com (Ben Mulvihill)
Date: Mon, 19 Jan 2015 15:41:15 +0100
Subject: [OpenWrt-Devel] uboot-lantiq cgu settings for ramboot image
In-Reply-To: <CACUy__UbCWWCC1+p9RTVATaGc=afTvcGAXkHrZBeEC3pLg8K1w@mail.gmail.com>
References: <1421664368.25187.18.camel@merveille.lan>
 <CACUy__UbCWWCC1+p9RTVATaGc=afTvcGAXkHrZBeEC3pLg8K1w@mail.gmail.com>
Message-ID: <1421678475.25187.23.camel@merveille.lan>

Hi Daniel,

On Mon, 2015-01-19 at 14:57 +0100, Daniel Schwierzeck wrote:
> Hi Ben,
> 
> 2015-01-19 11:46 GMT+01:00 Ben Mulvihill <ben.mulvihill at gmail.com>:
> > Hello,
> >
> > I am trying to build uboot-lantiq for the BT Home Hub 3A (lantiq
> > ar9), and am wondering where to initialise the cgu, in the case
> > of a ramboot image for uart booting. Normally the cgu is initialised
> > in lowlevel_init, but that code is bypassed in ramboot images. The
> > result is that the board boots with the wrong cgu settings, which
> > sends the console haywire. So far I have tried two solutions:
> >
> > - putting the following lines in board_early_init_f:
> >
> >   #define REG32(addr) *((volatile u32 *)(addr))
> >         REG32(0xbf103010) = 0x80;
> >         REG32(0xbf103014) = 0x01;
> >
> >   This fixes the console, but breaks ethernet. I am wondering
> >   whether this is because by putting this code in this place, I
> >   am altering the cgu settings after setting up ram. Is this
> >   admissible?
> 
> it is insufficient if you want to change the DDR clock after the
> memory is already initialized. For that you will need a sequence like
> putting memory in self-refresh mode, stopping memory controller,
> update clocks, restart memory controller, putting memory out of
> self-refresh. That's why the cgu_init() runs before mc_init(). Thus if
> the board comes up with 111/111 MHz, you cannot switch to 393/166 MHz
> because that would require to change the DDR clock.
> 
Thank you for the explanations. I suspected that something like that
was the problem. I'll have a do at doing the full sequence you describe.

> >
> > - adding the same two register settings to the start of the
> >   ddr_settings file generated by lantiq_ram_init_uart.awk .
> >   However, the resulting image gives a download error and won't
> >   boot at all.
> 
> Actually this should work. Did you put the CGU register settings
> before the memory controller settings?
> 
I did. The start of my ddr_settings file looked like this:
    0xbf103010 0x80
    0xbf103014 0x01
    0xbf800010 0x0
    0xbf800020 0x0
    0xbf800060 0xD
    0xbf801030 0x0
    0xbf801000 0x1b1b

> >
> > Any suggestions will be gratefully received!
> >
> > Ben
> >
> >
> 
Ben
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From ben.mulvihill at gmail.com  Mon Jan 19 09:44:57 2015
From: ben.mulvihill at gmail.com (Ben Mulvihill)
Date: Mon, 19 Jan 2015 15:44:57 +0100
Subject: [OpenWrt-Devel] uboot-lantiq cgu settings for ramboot image
In-Reply-To: <54BCEFD1.6010902@conorogorman.net>
References: <1421664368.25187.18.camel@merveille.lan>
 <54BCEFD1.6010902@conorogorman.net>
Message-ID: <1421678697.25187.27.camel@merveille.lan>

On Mon, 2015-01-19 at 11:51 +0000, Conor O'Gorman wrote:
> On 19/01/15 10:46, Ben Mulvihill wrote:
> > Hello,
> >
> > I am trying to build uboot-lantiq for the BT Home Hub 3A (lantiq
> > ar9), and am wondering where to initialise the cgu, in the case
> > of a ramboot image for uart booting. Normally the cgu is initialised
> > in lowlevel_init, but that code is bypassed in ramboot images. The
> > result is that the board boots with the wrong cgu settings, which
> > sends the console haywire. So far I have tried two solutions:
> 
> Another option is to try and not change anything. The console is already 
> configured and running. The ram does need config.
> 
> I was used to seeing the ramboot version running at half clock speed, at 
> least on danube, previous to ar9.
> 
> Conor

Hi Conor,

Thanks for the reply. But with the latest uboot-lantiq, not changing
anything means that I don't get a usable console. With an older 
version I do at least get a uboot console, but no linux console when
I boot openwrt. Correcting the cgu settings solves both problems.

Ben
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From daniel.schwierzeck at gmail.com  Mon Jan 19 10:47:27 2015
From: daniel.schwierzeck at gmail.com (Daniel Schwierzeck)
Date: Mon, 19 Jan 2015 16:47:27 +0100
Subject: [OpenWrt-Devel] uboot-lantiq cgu settings for ramboot image
In-Reply-To: <1421678697.25187.27.camel@merveille.lan>
References: <1421664368.25187.18.camel@merveille.lan>
 <54BCEFD1.6010902@conorogorman.net>
 <1421678697.25187.27.camel@merveille.lan>
Message-ID: <CACUy__U3gJ-M6Hz7A_GTewGaTJ+FK4fiZXANbxhLmmXt_0SM=g@mail.gmail.com>

2015-01-19 15:44 GMT+01:00 Ben Mulvihill <ben.mulvihill at gmail.com>:
> On Mon, 2015-01-19 at 11:51 +0000, Conor O'Gorman wrote:
>> On 19/01/15 10:46, Ben Mulvihill wrote:
>> > Hello,
>> >
>> > I am trying to build uboot-lantiq for the BT Home Hub 3A (lantiq
>> > ar9), and am wondering where to initialise the cgu, in the case
>> > of a ramboot image for uart booting. Normally the cgu is initialised
>> > in lowlevel_init, but that code is bypassed in ramboot images. The
>> > result is that the board boots with the wrong cgu settings, which
>> > sends the console haywire. So far I have tried two solutions:
>>
>> Another option is to try and not change anything. The console is already
>> configured and running. The ram does need config.
>>
>> I was used to seeing the ramboot version running at half clock speed, at
>> least on danube, previous to ar9.
>>
>> Conor
>
> Hi Conor,
>
> Thanks for the reply. But with the latest uboot-lantiq, not changing
> anything means that I don't get a usable console. With an older
> version I do at least get a uboot console, but no linux console when
> I boot openwrt. Correcting the cgu settings solves both problems.
>

could you try this?

diff --git a/arch/mips/cpu/mips32/arx100/cgu.c
b/arch/mips/cpu/mips32/arx100/cgu.c
index 6e71ee7..e0afbda 100644
--- a/arch/mips/cpu/mips32/arx100/cgu.c
+++ b/arch/mips/cpu/mips32/arx100/cgu.c
@@ -95,15 +95,5 @@ unsigned long ltq_get_cpu_clock(void)

 unsigned long ltq_get_bus_clock(void)
 {
-       u32 fpi_sel;
-       unsigned long clk;
-
-       fpi_sel = ltq_cgu_sys_readl(1, CGU_SYS_FPI_SEL);
-
-       if (fpi_sel)
-               clk = ltq_get_io_region_clock() / 2;
-       else
-               clk = ltq_get_io_region_clock();
-
-       return clk;
+       return ltq_get_io_region_clock();
 }

the UART driver calculates the baudrate from the FPI bus clock, but
FPI_SEL is not available on AR9. FPI bus clock is always the same as
DDR clock, Obviously a copy&paste error from VR9 code ;)

-- 
- Daniel
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From karlp at tweak.net.au  Mon Jan 19 10:54:22 2015
From: karlp at tweak.net.au (Karl Palsson)
Date: Mon, 19 Jan 2015 15:54:22 -0000
Subject: [OpenWrt-Devel] (no subject)
Message-ID: <20150119155422-4937-83548-mailpile@palmtree-beeroclock-net>


Hi,

The wiki page for http://wiki.openwrt.org/doc/howto/hardware.button
refers to https://dev.openwrt.org/changeset/37336 "procd: make old
button hotplug rules work until all packages are migrated"

Which imply that procd took over hotplug buttons, and that there's a
proper "way" that packages should "migrate" to a new form.  Is there any
example of what this new form is?  Existing hotplug scripts are "just
working" as is, but are they going to go away?

Sincerely,
Karl Palsson


-- 
Sent using Mailpile, Free Software from www.mailpile.is
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From s.demeszko at wireless-instruments.com  Mon Jan 19 11:10:13 2015
From: s.demeszko at wireless-instruments.com (=?UTF-8?B?U8WCYXdvbWlyIERlbWVzemtv?=)
Date: Mon, 19 Jan 2015 17:10:13 +0100
Subject: [OpenWrt-Devel] network/znc: Package binaries appear to be
 broken by MIPS16
In-Reply-To: <54BCBA74.9020309@8.c.9.b.0.7.4.0.1.0.0.2.ip6.arpa>
References: <54BCBA74.9020309@8.c.9.b.0.7.4.0.1.0.0.2.ip6.arpa>
Message-ID: <54BD2C65.3050309@wireless-instruments.com>

19.01.2015 at 09:04, Oliver wrote:
> Having compiled an image yesterday with ZNC with a MIPS24kc target and MIPS16 enabled, I 
> found that it would eventually crash after starting so I ran it in the console and found 
> the segfault was due to an "illegal hardware instruction" - consequently I edited the 
> Makefile to disable MIPS16 compilation for ZNC and reflashed it. This time there were no 
> such issues. Can anyone else confirm this to be the case? Obviously it would be better 
> if MIPS16 compilation could be fixed but I'm not able to get visibility into where the 
> bad code is generated.
I remember there was a bug in gcc with version 4.8 and MIPS16 enabled, but I don't know if 
it was corrected. Did you tried other gcc versions: 4.6, 4.9?
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From blogic at openwrt.org  Mon Jan 19 11:40:07 2015
From: blogic at openwrt.org (John Crispin)
Date: Mon, 19 Jan 2015 17:40:07 +0100
Subject: [OpenWrt-Devel] (no subject)
In-Reply-To: <20150119155422-4937-83548-mailpile@palmtree-beeroclock-net>
References: <20150119155422-4937-83548-mailpile@palmtree-beeroclock-net>
Message-ID: <54BD3367.90108@openwrt.org>



On 19/01/2015 16:54, Karl Palsson wrote:
> 
> Hi,
> 
> The wiki page for
> http://wiki.openwrt.org/doc/howto/hardware.button refers to
> https://dev.openwrt.org/changeset/37336 "procd: make old button
> hotplug rules work until all packages are migrated"
> 
> Which imply that procd took over hotplug buttons, and that there's
> a proper "way" that packages should "migrate" to a new form.  Is
> there any example of what this new form is?  Existing hotplug
> scripts are "just working" as is, but are they going to go away?
> 

have a look at /etc/rc.button/*

> Sincerely, Karl Palsson
> 
> 
> 
> 
> _______________________________________________ openwrt-devel
> mailing list openwrt-devel at lists.openwrt.org 
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From karlp at tweak.net.au  Mon Jan 19 12:05:40 2015
From: karlp at tweak.net.au (beeronice)
Date: Mon, 19 Jan 2015 17:05:40 -0000
Subject: [OpenWrt-Devel] procd button handling
In-Reply-To: <54BD3367.90108@openwrt.org>
References: <54BD3367.90108@openwrt.org>
Message-ID: <20150119170418-4937-44019-mailpile@palmtree-beeroclock-net>


John Crispin <blogic at openwrt.org> wrote:
> On 19/01/2015 16:54, Karl Palsson wrote:
> > The wiki page for
> > http://wiki.openwrt.org/doc/howto/hardware.button refers to
> > https://dev.openwrt.org/changeset/37336 "procd: make old button
> > hotplug rules work until all packages are migrated"
> > 
> > Which imply that procd took over hotplug buttons, and that there's
> > a proper "way" that packages should "migrate" to a new form.  Is
> > there any example of what this new form is?  Existing hotplug
> > scripts are "just working" as is, but are they going to go away?
> > 
> 
> have a look at /etc/rc.button/*

Ok, thanks, hadn't seen those.  Are these then syntactically the same as
hotplug scripts?  Same environment variable names, just in
/etc/rc.button instead of /etc/hotplug.d/button ?  Is there any other change or new features that can be used?
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From blogic at openwrt.org  Mon Jan 19 12:13:25 2015
From: blogic at openwrt.org (John Crispin)
Date: Mon, 19 Jan 2015 18:13:25 +0100
Subject: [OpenWrt-Devel] procd button handling
In-Reply-To: <20150119170418-4937-44019-mailpile@palmtree-beeroclock-net>
References: <54BD3367.90108@openwrt.org>
 <20150119170418-4937-44019-mailpile@palmtree-beeroclock-net>
Message-ID: <54BD3B35.8040503@openwrt.org>



On 19/01/2015 18:05, beeronice wrote:
> 
> John Crispin <blogic at openwrt.org> wrote:
>> On 19/01/2015 16:54, Karl Palsson wrote:
>>> The wiki page for 
>>> http://wiki.openwrt.org/doc/howto/hardware.button refers to 
>>> https://dev.openwrt.org/changeset/37336 "procd: make old
>>> button hotplug rules work until all packages are migrated"
>>> 
>>> Which imply that procd took over hotplug buttons, and that
>>> there's a proper "way" that packages should "migrate" to a new
>>> form.  Is there any example of what this new form is?  Existing
>>> hotplug scripts are "just working" as is, but are they going to
>>> go away?
>>> 
>> 
>> have a look at /etc/rc.button/*
> 
> Ok, thanks, hadn't seen those.  Are these then syntactically the
> same as hotplug scripts?  Same environment variable names, just in 
> /etc/rc.button instead of /etc/hotplug.d/button ?  Is there any
> other change or new features that can be used?
> 

this is the json_script rule for the button handler ->

        [ "if",
                [ "and",
                        [ "has", "BUTTON" ],
                        [ "eq", "SUBSYSTEM", "button" ],
                ],
                [ "exec", "/etc/rc.button/%BUTTON%" ]
        ],

it will pass the same env to the script as it would to the hotplug
handler.


> 
> 
> _______________________________________________ openwrt-devel
> mailing list openwrt-devel at lists.openwrt.org 
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From ben.mulvihill at gmail.com  Mon Jan 19 13:21:06 2015
From: ben.mulvihill at gmail.com (Ben Mulvihill)
Date: Mon, 19 Jan 2015 19:21:06 +0100
Subject: [OpenWrt-Devel] uboot-lantiq cgu settings for ramboot image
In-Reply-To: <CACUy__U3gJ-M6Hz7A_GTewGaTJ+FK4fiZXANbxhLmmXt_0SM=g@mail.gmail.com>
References: <1421664368.25187.18.camel@merveille.lan>
 <54BCEFD1.6010902@conorogorman.net>
 <1421678697.25187.27.camel@merveille.lan>
 <CACUy__U3gJ-M6Hz7A_GTewGaTJ+FK4fiZXANbxhLmmXt_0SM=g@mail.gmail.com>
Message-ID: <1421691666.25187.46.camel@merveille.lan>

On Mon, 2015-01-19 at 16:47 +0100, Daniel Schwierzeck wrote:
> 2015-01-19 15:44 GMT+01:00 Ben Mulvihill <ben.mulvihill at gmail.com>:
> > On Mon, 2015-01-19 at 11:51 +0000, Conor O'Gorman wrote:
> >> On 19/01/15 10:46, Ben Mulvihill wrote:
> >> > Hello,
> >> >
> >> > I am trying to build uboot-lantiq for the BT Home Hub 3A (lantiq
> >> > ar9), and am wondering where to initialise the cgu, in the case
> >> > of a ramboot image for uart booting. Normally the cgu is initialised
> >> > in lowlevel_init, but that code is bypassed in ramboot images. The
> >> > result is that the board boots with the wrong cgu settings, which
> >> > sends the console haywire. So far I have tried two solutions:
> >>
> >> Another option is to try and not change anything. The console is already
> >> configured and running. The ram does need config.
> >>
> >> I was used to seeing the ramboot version running at half clock speed, at
> >> least on danube, previous to ar9.
> >>
> >> Conor
> >
> > Hi Conor,
> >
> > Thanks for the reply. But with the latest uboot-lantiq, not changing
> > anything means that I don't get a usable console. With an older
> > version I do at least get a uboot console, but no linux console when
> > I boot openwrt. Correcting the cgu settings solves both problems.
> >
> 
> could you try this?
> 
> diff --git a/arch/mips/cpu/mips32/arx100/cgu.c
> b/arch/mips/cpu/mips32/arx100/cgu.c
> index 6e71ee7..e0afbda 100644
> --- a/arch/mips/cpu/mips32/arx100/cgu.c
> +++ b/arch/mips/cpu/mips32/arx100/cgu.c
> @@ -95,15 +95,5 @@ unsigned long ltq_get_cpu_clock(void)
> 
>  unsigned long ltq_get_bus_clock(void)
>  {
> -       u32 fpi_sel;
> -       unsigned long clk;
> -
> -       fpi_sel = ltq_cgu_sys_readl(1, CGU_SYS_FPI_SEL);
> -
> -       if (fpi_sel)
> -               clk = ltq_get_io_region_clock() / 2;
> -       else
> -               clk = ltq_get_io_region_clock();
> -
> -       return clk;
> +       return ltq_get_io_region_clock();
>  }
> 
> the UART driver calculates the baudrate from the FPI bus clock, but
> FPI_SEL is not available on AR9. FPI bus clock is always the same as
> DDR clock, Obviously a copy&paste error from VR9 code ;)
> 

No, even with this patch, I still don't get a working console I'm
afraid. If I don't set anything explicitly, the board comes up with
CGU_SYS set to 0x05, ie CGU_SYS_SYSSEL_PLL0_333_MHZ |
CGU_SYS_CPUSEL_EQUAL_DDRCLK | CGU_SYS_DDRSEL_THIRD_SYSCLK.
Is this a valid combination without CGU_SYS_PPESEL_250_MHZ ?
I don't understand what CGU_SYS_PPESEL_250_MHZ does?
The "right setting", as set by the stock uboot, is 0x80.
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From valent.turkovic at gmail.com  Mon Jan 19 14:15:13 2015
From: valent.turkovic at gmail.com (valent.turkovic at gmail.com)
Date: Mon, 19 Jan 2015 20:15:13 +0100
Subject: [OpenWrt-Devel] Wiki upload rights
In-Reply-To: <54A2D2FA.4070305@openwrt.org>
References: <CAD=nrE8bF-P2Hh9RJ_FG98P=Exvt8HV2AebeCk-u13V9eqNyHg@mail.gmail.com>
 <54A2D2FA.4070305@openwrt.org>
Message-ID: <CAD=nrE9nDCf39w+Mg-tAzktnQKh7xVnOsSnx6X_Xt9V1zi3C8w@mail.gmail.com>

Well, it is strange, but check out this message:
http://i.imgur.com/2NbQBxc.png

On Tue, Dec 30, 2014 at 5:29 PM, Jo-Philipp Wich <jow at openwrt.org> wrote:

> Hi,
>
> upload should be possible for any registered user within the media
> namespace.
>
>
> ~ Jow
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150119/c6a1ec7d/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From malaakso at elisanet.fi  Mon Jan 19 15:25:28 2015
From: malaakso at elisanet.fi (Matti Laakso)
Date: Mon, 19 Jan 2015 22:25:28 +0200
Subject: [OpenWrt-Devel] [PATCH v2] comgt: Allow using non-TTY devices
In-Reply-To: <54BA0B0E.1040003@openwrt.org>
References: <54BA0B0E.1040003@openwrt.org>
Message-ID: <1421699128-5717-1-git-send-email-malaakso@elisanet.fi>

Some Huawei mobile broadband sticks utilizing the NCM protocol expose
the control channel as a cdc-wdm device node instead of a virtual TTY.
This device node does not support the terminal ioctls. This patch
adds a check whether the provided device is a TTY or not and does not
attempt to use the terminal ioctls if they are not supported.

v2: reduce diffstat by simplifying code a little
Signed-off-by: Matti Laakso <malaakso at elisanet.fi>
---
 .../utils/comgt/patches/004-check_tty.patch        | 68 ++++++++++++++++++++++
 1 file changed, 68 insertions(+)
 create mode 100644 package/network/utils/comgt/patches/004-check_tty.patch

diff --git a/package/network/utils/comgt/patches/004-check_tty.patch b/package/network/utils/comgt/patches/004-check_tty.patch
new file mode 100644
index 0000000..b81b051
--- /dev/null
+++ b/package/network/utils/comgt/patches/004-check_tty.patch
@@ -0,0 +1,68 @@
+--- a/comgt.c
++++ b/comgt.c
+@@ -91,6 +91,7 @@ unsigned long hstart,hset;
+ char NullString[]={ "" };
+ BOOL lastcharnl=1; /* Indicate that last char printed from getonebyte
+                                was a nl, so no new one is needed */
++BOOL tty=1;
+ 
+ 
+ //"open com \"/dev/modem\"\nset com 38400n81\nset senddelay 0.05\nsend \"ATi^m\"\nget 2 \" ^m\" $s\nprint \"Response : \",$s,\"\\n\"\nget 2 \" ^m\" $s\nprint \"Response :\",$s,\"\\n\"\nget 2 \" ^m\" $s\nprint \"Response : \",$s,\"\\n\"\n\n";
+@@ -920,7 +921,7 @@ BOOL getonoroff(void) {
+ void setcom(void) {
+   stbuf.c_cflag &= ~(CBAUD | CSIZE | CSTOPB | CLOCAL | PARENB);
+   stbuf.c_cflag |= (speed | bits | CREAD | clocal | parity | stopbits );
+-  if (ioctl(comfd, TCSETA, &stbuf) < 0) {
++  if (tty && ioctl(comfd, TCSETA, &stbuf) < 0) {
+     serror("Can't ioctl set device",1);
+   }
+ }
+@@ -1224,7 +1225,7 @@ void doclose(void) {
+   if(strcmp(token,"hardcom")==0) {
+     if(comfd== -1) serror("Com device not open",1);
+     vmsg("Closing device");
+-    if (ioctl(comfd, TCSETA, &svbuf) < 0) {
++    if (tty && ioctl(comfd, TCSETA, &svbuf) < 0) {
+       sprintf(msg,"Can't ioctl set device %s.\n",device);
+       serror(msg,1);
+     }
+@@ -1266,12 +1267,17 @@ void opengt(void) {
+       ext(1);
+     }
+   }
+-  if (ioctl (comfd, TCGETA, &svbuf) < 0) {
++  if (isatty (comfd))
++    tty=1;
++  else
++    tty=0;
++  if (tty && ioctl (comfd, TCGETA, &svbuf) < 0) {
+     sprintf(msg,"Can't control %s, please try again.\n",device);
+     serror(msg,1);
+   }
+   setenv("COMGTDEVICE",device,1);
+-  ioctl(comfd, TCGETA, &stbuf);
++  if (tty)
++    ioctl(comfd, TCGETA, &stbuf);
+   speed=stbuf.c_cflag & CBAUD;
+   if (high_speed == 0)  strcpy(cspeed,"115200");
+   else strcpy(cspeed,"57600");
+@@ -1302,12 +1308,16 @@ void opendevice(void) {
+     }
+   }
+   else comfd=0;
+-
+-  if (ioctl (comfd, TCGETA, &svbuf) < 0) {
++  if (isatty (comfd))
++    tty=1;
++  else
++    tty=0;
++  if (tty && ioctl (comfd, TCGETA, &svbuf) < 0) {
+     sprintf(msg,"Can't ioctl get device %s.\n",device);
+     serror(msg,1);
+   }
+-  ioctl(comfd, TCGETA, &stbuf);
++  if (tty)
++    ioctl(comfd, TCGETA, &stbuf);
+   speed=stbuf.c_cflag & CBAUD;
+   switch(speed) {
+     case B0: strcpy(cspeed,"0");break;
-- 
2.1.0
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From darwinskernel at gmail.com  Mon Jan 19 15:34:19 2015
From: darwinskernel at gmail.com (SGT. Garcia)
Date: Mon, 19 Jan 2015 15:34:19 -0500
Subject: [OpenWrt-Devel] ddns-scripts "sleep 10" before updating?
In-Reply-To: <CAE2LqHL5T0RTVPWuoY73M5bMi_0x1S3KhRb8GpVz0Fkm4Zcp8g@mail.gmail.com>
References: <CAE2LqHL5T0RTVPWuoY73M5bMi_0x1S3KhRb8GpVz0Fkm4Zcp8g@mail.gmail.com>
Message-ID: <20150119203419.GA3741@vpn.5665sherbrooke.house>

.
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From darwinskernel at gmail.com  Mon Jan 19 16:45:13 2015
From: darwinskernel at gmail.com (. Garcia)
Date: Mon, 19 Jan 2015 16:45:13 -0500
Subject: [OpenWrt-Devel] RouterBOARD CRS125-24G-1S
In-Reply-To: <54BCF609.8080004@atechmedia.com>
References: <54BCF609.8080004@atechmedia.com>
Message-ID: <20150119214513.GA15547@vpn.5665sherbrooke.house>

On Jan 19  12:18 +0000, Charlie Smurthwaite wrote:
> Hi,
> 

however np at alijust got my machine back up again and it took a good while
to clean up the mess Mail app left on this mailbox. use do _NOT_ send me
email from Mail app. it will be discared. i'm setting up a filter to send
those msges directly to Trash. Inbox app or your computer please., thanks.

Paymon
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From ben.mulvihill at gmail.com  Mon Jan 19 18:39:17 2015
From: ben.mulvihill at gmail.com (Ben Mulvihill)
Date: Tue, 20 Jan 2015 00:39:17 +0100
Subject: [OpenWrt-Devel] uboot-lantiq cgu settings for ramboot image
In-Reply-To: <1421691666.25187.46.camel@merveille.lan>
References: <1421664368.25187.18.camel@merveille.lan>
 <54BCEFD1.6010902@conorogorman.net>
 <1421678697.25187.27.camel@merveille.lan>
 <CACUy__U3gJ-M6Hz7A_GTewGaTJ+FK4fiZXANbxhLmmXt_0SM=g@mail.gmail.com>
 <1421691666.25187.46.camel@merveille.lan>
Message-ID: <1421710757.25187.55.camel@merveille.lan>

On Mon, 2015-01-19 at 19:21 +0100, Ben Mulvihill wrote:
> On Mon, 2015-01-19 at 16:47 +0100, Daniel Schwierzeck wrote:
> > 2015-01-19 15:44 GMT+01:00 Ben Mulvihill <ben.mulvihill at gmail.com>:
> > > On Mon, 2015-01-19 at 11:51 +0000, Conor O'Gorman wrote:
> > >> On 19/01/15 10:46, Ben Mulvihill wrote:
> > >> > Hello,
> > >> >
> > >> > I am trying to build uboot-lantiq for the BT Home Hub 3A (lantiq
> > >> > ar9), and am wondering where to initialise the cgu, in the case
> > >> > of a ramboot image for uart booting. Normally the cgu is initialised
> > >> > in lowlevel_init, but that code is bypassed in ramboot images. The
> > >> > result is that the board boots with the wrong cgu settings, which
> > >> > sends the console haywire. So far I have tried two solutions:
> > >>
> > >> Another option is to try and not change anything. The console is already
> > >> configured and running. The ram does need config.
> > >>
> > >> I was used to seeing the ramboot version running at half clock speed, at
> > >> least on danube, previous to ar9.
> > >>
> > >> Conor
> > >
> > > Hi Conor,
> > >
> > > Thanks for the reply. But with the latest uboot-lantiq, not changing
> > > anything means that I don't get a usable console. With an older
> > > version I do at least get a uboot console, but no linux console when
> > > I boot openwrt. Correcting the cgu settings solves both problems.
> > >
> > 
> > could you try this?
> > 
> > diff --git a/arch/mips/cpu/mips32/arx100/cgu.c
> > b/arch/mips/cpu/mips32/arx100/cgu.c
> > index 6e71ee7..e0afbda 100644
> > --- a/arch/mips/cpu/mips32/arx100/cgu.c
> > +++ b/arch/mips/cpu/mips32/arx100/cgu.c
> > @@ -95,15 +95,5 @@ unsigned long ltq_get_cpu_clock(void)
> > 
> >  unsigned long ltq_get_bus_clock(void)
> >  {
> > -       u32 fpi_sel;
> > -       unsigned long clk;
> > -
> > -       fpi_sel = ltq_cgu_sys_readl(1, CGU_SYS_FPI_SEL);
> > -
> > -       if (fpi_sel)
> > -               clk = ltq_get_io_region_clock() / 2;
> > -       else
> > -               clk = ltq_get_io_region_clock();
> > -
> > -       return clk;
> > +       return ltq_get_io_region_clock();
> >  }
> > 
> > the UART driver calculates the baudrate from the FPI bus clock, but
> > FPI_SEL is not available on AR9. FPI bus clock is always the same as
> > DDR clock, Obviously a copy&paste error from VR9 code ;)
> > 
> 
> No, even with this patch, I still don't get a working console I'm
> afraid. If I don't set anything explicitly, the board comes up with
> CGU_SYS set to 0x05, ie CGU_SYS_SYSSEL_PLL0_333_MHZ |
> CGU_SYS_CPUSEL_EQUAL_DDRCLK | CGU_SYS_DDRSEL_THIRD_SYSCLK.
> Is this a valid combination without CGU_SYS_PPESEL_250_MHZ ?
> I don't understand what CGU_SYS_PPESEL_250_MHZ does?
> The "right setting", as set by the stock uboot, is 0x80.

P.S. There also seems to be a discrepancy between the uboot and
linux code. I take it from what you say above that fpi clock, ddr
clock and io region clock are all the same. Now if the least 
significant bit of CGU_SYS is set, then according to the uboot
code - function ltq_get_bus_clock() - their value is one
third of the system clock. But according to the linux code
- function ltq_ar9_fpi_hz() in arch/mips/lantiq/xway/clk.c -
their value in this case is equal to the system clock.

Or am I getting muddled? It's past my bedtime!
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From osk at exegin.com  Mon Jan 19 19:21:30 2015
From: osk at exegin.com (Owen Kirby)
Date: Mon, 19 Jan 2015 16:21:30 -0800
Subject: [OpenWrt-Devel] [PATCH v2] procd: delay inittab workers until the
	tty exists.
Message-ID: <54BD9F8A.2020907@exegin.com>

Add hotplug support for tty devices in /etc/inittab that are specified by the askfirst
keyword so that terminals attached after boot time get console processes started.

This was tested on an AT91 target using the gadget serial subsystem and on an WNDR3800
with a USB serial adapter. One possible weirdness I encountered was that the baud rates
and control modes sometimes need adjusting with a hotplug script after reconnecting
the adapter. This is also only implemented for askfirst, but it might also make sense
to do the same thing for respawn and askconsole.

Signed-off-by: Owen Kirby <osk at exegin.com>
---
  inittab.c      | 35 ++++++++++++++++++++++++++++++++---
  plug/hotplug.c | 40 +++++++++++++++++++++++++++++++++++-----
  plug/hotplug.h | 15 +++++++++++++++
  3 files changed, 82 insertions(+), 8 deletions(-)

diff --git a/inittab.c b/inittab.c
index 623103d..c9310e5 100644
--- a/inittab.c
+++ b/inittab.c
@@ -26,6 +26,7 @@
  #include <libubox/utils.h>
  #include <libubox/list.h>
  
+#include "plug/hotplug.h"
  #include "utils/utils.h"
  #include "procd.h"
  #include "rcS.h"
@@ -55,6 +56,7 @@ struct init_action {
  
  	struct init_handler *handler;
  	struct uloop_process proc;
+	struct hotplug_event event;
  
  	int respawn;
  	struct uloop_timeout tout;
@@ -90,6 +92,29 @@ static int dev_exist(const char *dev)
  	return (res != -1);
  }
  
+static void dev_hotplug(struct hotplug_event *event, struct blob_attr *msg)
+{
+	struct init_action *a = container_of(event, struct init_action, event);
+	char *action = hotplug_msg_find_var(msg, "ACTION");
+	char *subsystem = hotplug_msg_find_var(msg, "SUBSYSTEM");
+	char *devname = hotplug_msg_find_var(msg, "DEVNAME");
+	
+	if (!action || !subsystem || !devname)
+		return;
+	if (strcmp(subsystem, "tty") || strcmp(devname, a->id))
+		return;
+	
+	DEBUG(4, "inittab hotplug: ACTION=\"%s\", SUBSYSTEM=\"%s\", DEVNAME=\"%s\"\n",
+		action, subsystem, devname);
+	if (!strcmp(action, "add")) {
+		uloop_timeout_set(&a->tout, a->respawn);
+	}
+	else if (!strcmp(action, "remove")) {
+		uloop_process_delete(&a->proc);
+		uloop_timeout_cancel(&a->tout);
+	}
+}
+
  static void fork_worker(struct init_action *a)
  {
  	int fd;
@@ -130,7 +155,7 @@ static void child_exit(struct uloop_process *proc, int ret)
  	struct init_action *a = container_of(proc, struct init_action, proc);
  
  	DEBUG(4, "pid:%d\n", proc->pid);
-        uloop_timeout_set(&a->tout, a->respawn);
+		uloop_timeout_set(&a->tout, a->respawn);
  }
  
  static void respawn(struct uloop_timeout *tout)
@@ -157,7 +182,7 @@ static void askfirst(struct init_action *a)
  {
  	int i;
  
-	if (!dev_exist(a->id) || (console && !strcmp(console, a->id))) {
+	if (console && !strcmp(console, a->id)) {
  		DEBUG(4, "Skipping %s\n", a->id);
  		return;
  	}
@@ -168,8 +193,12 @@ static void askfirst(struct init_action *a)
  	a->argv[0] = ask;
  	a->respawn = 500;
  
+	a->event.cb = dev_hotplug;
+	hotplug_event_add(&a->event);
+
  	a->proc.cb = child_exit;
-	fork_worker(a);
+	if (dev_exist(a->id))
+		fork_worker(a);
  }
  
  static void askconsole(struct init_action *a)
diff --git a/plug/hotplug.c b/plug/hotplug.c
index 061833a..3aa87c0 100644
--- a/plug/hotplug.c
+++ b/plug/hotplug.c
@@ -44,13 +44,14 @@ struct cmd_queue {
  };
  
  static LIST_HEAD(cmd_queue);
+static LIST_HEAD(events);
  static struct uloop_process queue_proc;
  static struct uloop_timeout last_event;
  static struct blob_buf b;
  static char *rule_file;
  static struct blob_buf script;
  
-static char *hotplug_msg_find_var(struct blob_attr *msg, const char *name)
+char *hotplug_msg_find_var(struct blob_attr *msg, const char *name)
  {
  	struct blob_attr *cur;
  	int rem;
@@ -393,24 +394,30 @@ static struct json_script_ctx jctx = {
  	.handle_file = rule_handle_file,
  };
  
-static void hotplug_handler_debug(struct blob_attr *data)
+static void hotplug_handler_debug(struct hotplug_event *e, struct blob_attr *msg)
  {
  	char *str;
  
  	if (debug < 3)
  		return;
  
-	str = blobmsg_format_json(data, true);
+	str = blobmsg_format_json(msg, true);
  	DEBUG(3, "%s\n", str);
  	free(str);
  }
  
+static void hotplug_handler_script(struct hotplug_event *e, struct blob_attr *msg)
+{
+	json_script_run(&jctx, rule_file, msg);
+}
+
  static void hotplug_handler(struct uloop_fd *u, unsigned int ev)
  {
  	int i = 0;
  	static char buf[4096];
  	int len = recv(u->fd, buf, sizeof(buf), MSG_DONTWAIT);
  	void *index;
+	struct hotplug_event *e, *tmp;
  	if (len < 1)
  		return;
  
@@ -427,10 +434,16 @@ static void hotplug_handler(struct uloop_fd *u, unsigned int ev)
  		i += l;
  	}
  	blobmsg_close_table(&b, index);
-	hotplug_handler_debug(b.head);
-	json_script_run(&jctx, rule_file, blob_data(b.head));
+	list_for_each_entry_safe(e, tmp, &events, list)
+		e->cb(e, blob_data(b.head));
  }
  
+static struct hotplug_event script_event = {
+	.cb = hotplug_handler_script,
+};
+static struct hotplug_event debug_event = {
+	.cb = hotplug_handler_debug,
+};
  static struct uloop_fd hotplug_fd = {
  	.cb = hotplug_handler,
  };
@@ -470,6 +483,8 @@ void hotplug(char *rules)
  	json_script_init(&jctx);
  	queue_proc.cb = queue_proc_cb;
  	uloop_fd_add(&hotplug_fd, ULOOP_READ);
+	hotplug_event_add(&debug_event);
+	hotplug_event_add(&script_event);
  }
  
  int hotplug_run(char *rules)
@@ -486,3 +501,18 @@ void hotplug_shutdown(void)
  	uloop_fd_delete(&hotplug_fd);
  	close(hotplug_fd.fd);
  }
+
+int hotplug_event_add(struct hotplug_event *e)
+{
+	list_add_tail(&e->list, &events);
+	
+	return 0;
+}
+
+int hotplug_event_delete(struct hotplug_event *e)
+{
+	list_del(&e->list);
+	
+	return 0;
+}
+
diff --git a/plug/hotplug.h b/plug/hotplug.h
index 2a44442..4870476 100644
--- a/plug/hotplug.h
+++ b/plug/hotplug.h
@@ -16,10 +16,25 @@
  #define __PROCD_HOTPLUG_H
  
  #include <libubox/uloop.h>
+#include <libubox/list.h>
+#include "../utils/utils.h"
+
+struct hotplug_event;
+
+typedef void (*hotplug_event_handler)(struct hotplug_event *event, struct blob_attr *msg);
+
+struct hotplug_event {
+	struct list_head list;
+
+	hotplug_event_handler cb;
+};
  
  void hotplug(char *rules);
  int hotplug_run(char *rules);
  void hotplug_shutdown(void);
  void hotplug_last_event(uloop_timeout_handler handler);
+char *hotplug_msg_find_var(struct blob_attr *msg, const char *name);
+int hotplug_event_add(struct hotplug_event *event);
+int hotplug_event_delete(struct hotplug_event *event);
  
  #endif
-- 
1.9.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From daniel at makrotopia.org  Mon Jan 19 20:49:02 2015
From: daniel at makrotopia.org (Daniel Golle)
Date: Tue, 20 Jan 2015 02:49:02 +0100
Subject: [OpenWrt-Devel] [PATCH v2 7/8] sunxi: add support for Lamobo R1
Message-ID: <20150120014857.GA12279@makrotopia.org>

Partially based on patchset form Wang Yi <wangyi8848 at gmail.com> published
on https://github.com/Lamobo/Lamobo-R1-OpenWrt as well as on Bananapi DTS.

Signed-off-by: Daniel Golle <daniel at makrotopia.org>
v2: swconfig needs to be built-in, switch is not detected properly otherwise
---
 .../sunxi/base-files/etc/uci-defaults/02_network   |   6 +
 target/linux/sunxi/base-files/lib/sunxi.sh         |   4 +
 target/linux/sunxi/config-3.18                     |   6 +
 target/linux/sunxi/image/Makefile                  |   7 +-
 .../patches-3.18/302-dt-sun7i-add-lamobo-r1.patch  | 252 +++++++++++++++++++++
 target/linux/sunxi/profiles/lamobo-r1.mk           |  19 ++
 6 files changed, 293 insertions(+), 1 deletion(-)
 mode change 100644 => 100755 target/linux/sunxi/image/Makefile
 create mode 100644 target/linux/sunxi/patches-3.18/302-dt-sun7i-add-lamobo-r1.patch
 create mode 100644 target/linux/sunxi/profiles/lamobo-r1.mk

diff --git a/target/linux/sunxi/base-files/etc/uci-defaults/02_network b/target/linux/sunxi/base-files/etc/uci-defaults/02_network
index 1a9b0ed..09db8d5 100644
--- a/target/linux/sunxi/base-files/etc/uci-defaults/02_network
+++ b/target/linux/sunxi/base-files/etc/uci-defaults/02_network
@@ -16,6 +16,12 @@ case "$( sunxi_board_name )" in
 "olinuxino"*)
 	ucidef_set_interface_lan 'wlan0'
 	;;
+"lamobo-r1")
+	ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
+	ucidef_add_switch "switch0" "1" "1"
+	ucidef_add_switch_vlan "switch0" "1" "4 0 1 2 8t"
+	ucidef_add_switch_vlan "switch0" "2" "3 8t"
+	;;
 *)
 	ucidef_set_interface_lan 'eth0'
 	;;
diff --git a/target/linux/sunxi/base-files/lib/sunxi.sh b/target/linux/sunxi/base-files/lib/sunxi.sh
index d4dd9fe..444c7e9 100644
--- a/target/linux/sunxi/base-files/lib/sunxi.sh
+++ b/target/linux/sunxi/base-files/lib/sunxi.sh
@@ -105,6 +105,10 @@ sunxi_board_detect() {
 			board="i12-tvbox"
 			;;
 
+		"Lamobo R1")
+			board="lamobo-r1"
+			;;
+
 		"Olimex A20-OLinuXino-LIME")
 			board="olinuxino-lime"
 			;;
diff --git a/target/linux/sunxi/config-3.18 b/target/linux/sunxi/config-3.18
index 68f1593..3513f6a 100644
--- a/target/linux/sunxi/config-3.18
+++ b/target/linux/sunxi/config-3.18
@@ -58,6 +58,11 @@ CONFIG_AUDIT=y
 CONFIG_AUDIT_GENERIC=y
 CONFIG_AUTO_ZRELADDR=y
 CONFIG_AVERAGE=y
+CONFIG_B53=y
+# CONFIG_B53_MMAP_DRIVER is not set
+CONFIG_B53_PHY_DRIVER=y
+CONFIG_B53_PHY_FIXUP=y
+# CONFIG_B53_SRAB_DRIVER is not set
 CONFIG_BINFMT_MISC=y
 CONFIG_BLK_CGROUP=y
 CONFIG_BLK_DEV_SD=y
@@ -427,6 +432,7 @@ CONFIG_STRICT_DEVMEM=y
 CONFIG_SUN4I_TIMER=y
 CONFIG_SUN5I_HSTIMER=y
 CONFIG_SUNXI_WATCHDOG=y
+CONFIG_SWCONFIG=y
 CONFIG_SWIOTLB=y
 CONFIG_SWP_EMULATE=y
 CONFIG_SYSFS_SYSCALL=y
diff --git a/target/linux/sunxi/image/Makefile b/target/linux/sunxi/image/Makefile
old mode 100644
new mode 100755
index 4475aa8..f627ee3
--- a/target/linux/sunxi/image/Makefile
+++ b/target/linux/sunxi/image/Makefile
@@ -24,7 +24,8 @@ BOARDS:= \
 	sun7i-a20-cubietruck \
 	sun7i-a20-olinuxino-lime \
 	sun7i-a20-olinuxino-micro \
-	sun7i-a20-pcduino3
+	sun7i-a20-pcduino3 \
+	sun7i-a20-lamobo-r1
 
 define Image/BuildKernel
 	mkimage -A arm -O linux -T kernel -C none \
@@ -88,6 +89,10 @@ define Image/Build/Profile/Bananapro
 	$(call Image/Build/SDCard,$(1),sun7i-a20-bananapro)
 endef
 
+define Image/Build/Profile/Lamobo_R1
+	$(call Image/Build/SDCard,$(1),sun7i-a20-lamobo-r1)
+endef
+
 define Image/Build/Profile/Cubieboard
 	$(call Image/Build/SDCard,$(1),sun4i-a10-cubieboard)
 endef
diff --git a/target/linux/sunxi/patches-3.18/302-dt-sun7i-add-lamobo-r1.patch b/target/linux/sunxi/patches-3.18/302-dt-sun7i-add-lamobo-r1.patch
new file mode 100644
index 0000000..82c8bd5
--- /dev/null
+++ b/target/linux/sunxi/patches-3.18/302-dt-sun7i-add-lamobo-r1.patch
@@ -0,0 +1,252 @@
+Index: linux-3.18.2/arch/arm/boot/dts/Makefile
+===================================================================
+--- linux-3.18.2.orig/arch/arm/boot/dts/Makefile
++++ linux-3.18.2/arch/arm/boot/dts/Makefile
+@@ -441,6 +441,7 @@ dtb-$(CONFIG_MACH_SUN7I) += \
+ 	sun7i-a20-cubietruck.dtb \
+ 	sun7i-a20-hummingbird.dtb \
+ 	sun7i-a20-i12-tvbox.dtb \
++	sun7i-a20-lamobo-r1.dtb \
+ 	sun7i-a20-olinuxino-lime.dtb \
+ 	sun7i-a20-olinuxino-micro.dtb \
+ 	sun7i-a20-pcduino3.dtb
+Index: linux-3.18.2/arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts
+===================================================================
+--- /dev/null
++++ linux-3.18.2/arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts
+@@ -0,0 +1,235 @@
++/*
++ * Copyright 2015 Daniel Golle <daniel at makrotopia.org>
++ * Copyright 2014 Hans de Goede <hdegoede at redhat.com>
++ *
++ * This file is dual-licensed: you can use it either under the terms
++ * of the GPL or the X11 license, at your option. Note that this dual
++ * licensing only applies to this file, and not this project as a
++ * whole.
++ *
++ *  a) This library is free software; you can redistribute it and/or
++ *     modify it under the terms of the GNU General Public License as
++ *     published by the Free Software Foundation; either version 2 of the
++ *     License, or (at your option) any later version.
++ *
++ *     This library 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.
++ *
++ *     You should have received a copy of the GNU General Public
++ *     License along with this library; if not, write to the Free
++ *     Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
++ *     MA 02110-1301 USA
++ *
++ * Or, alternatively,
++ *
++ *  b) Permission is hereby granted, free of charge, to any person
++ *     obtaining a copy of this software and associated documentation
++ *     files (the "Software"), to deal in the Software without
++ *     restriction, including without limitation the rights to use,
++ *     copy, modify, merge, publish, distribute, sublicense, and/or
++ *     sell copies of the Software, and to permit persons to whom the
++ *     Software is furnished to do so, subject to the following
++ *     conditions:
++ *
++ *     The above copyright notice and this permission notice shall be
++ *     included in all copies or substantial portions of the Software.
++ *
++ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
++ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
++ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
++ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
++ *     OTHER DEALINGS IN THE SOFTWARE.
++ */
++
++/dts-v1/;
++/include/ "sun7i-a20.dtsi"
++/include/ "sunxi-common-regulators.dtsi"
++#include <dt-bindings/input/input.h>
++
++/ {
++	model = "Lamobo R1";
++	compatible = "lamobo,lamobo-r1", "allwinner,sun7i-a20";
++
++	soc at 01c00000 {
++		spi0: spi at 01c05000 {
++			pinctrl-names = "default";
++			pinctrl-0 = <&spi0_pins_a>;
++			status = "okay";
++		};
++
++		mmc0: mmc at 01c0f000 {
++			pinctrl-names = "default";
++			pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_lamobo>;
++			vmmc-supply = <&reg_vcc3v3>;
++			bus-width = <4>;
++			cd-gpios = <&pio 7 10 0>; /* PH10 */
++			cd-inverted;
++			status = "okay";
++		};
++
++		usbphy: phy at 01c13400 {
++			usb1_vbus-supply = <&reg_usb1_vbus>;
++			usb2_vbus-supply = <&reg_usb2_vbus>;
++			status = "okay";
++		};
++
++		ehci0: usb at 01c14000 {
++			status = "okay";
++		};
++
++		ohci0: usb at 01c14400 {
++			status = "okay";
++		};
++
++		ahci: sata at 01c18000 {
++			target-supply = <&reg_ahci_5v>;
++			status = "okay";
++		};
++
++		ehci1: usb at 01c1c000 {
++			status = "okay";
++		};
++
++		ohci1: usb at 01c1c400 {
++			status = "okay";
++		};
++
++		pinctrl at 01c20800 {
++			mmc0_cd_pin_lamobo: mmc0_cd_pin at 0 {
++				allwinner,pins = "PH10";
++				allwinner,function = "gpio_in";
++				allwinner,drive = <0>;
++				allwinner,pull = <1>;
++			};
++
++			gmac_power_pin_lamobo: gmac_power_pin at 0 {
++				allwinner,pins = "PH23";
++				allwinner,function = "gpio_out";
++				allwinner,drive = <0>;
++				allwinner,pull = <0>;
++			};
++
++			led_pins_lamobo: led_pins at 0 {
++				allwinner,pins = "PH2";
++				allwinner,function = "gpio_out";
++				allwinner,drive = <1>;
++				allwinner,pull = <0>;
++			};
++		};
++
++		lradc: lradc at 01c22800 {
++			allwinner,chan0-step = <200>;
++			linux,chan0-keycodes = <KEY_VOLUMEUP KEY_VOLUMEDOWN
++						KEY_MENU KEY_SEARCH KEY_HOME
++						KEY_ESC KEY_ENTER>;
++			status = "okay";
++		};
++
++		ir0: ir at 01c21800 {
++			pinctrl-names = "default";
++			pinctrl-0 = <&ir0_pins_a>;
++			status = "okay";
++		};
++
++		uart0: serial at 01c28000 {
++			pinctrl-names = "default";
++			pinctrl-0 = <&uart0_pins_a>;
++			status = "okay";
++		};
++
++		uart3: serial at 01c28c00 {
++			pinctrl-names = "default";
++			pinctrl-0 = <&uart3_pins_b>;
++			status = "okay";
++		};
++
++		uart7: serial at 01c29c00 {
++			pinctrl-names = "default";
++			pinctrl-0 = <&uart7_pins_a>;
++			status = "okay";
++		};
++
++		i2c0: i2c at 01c2ac00 {
++			pinctrl-names = "default";
++			pinctrl-0 = <&i2c0_pins_a>;
++			status = "okay";
++
++			axp209: pmic at 34 {
++				compatible = "x-powers,axp209";
++				reg = <0x34>;
++				interrupt-parent = <&nmi_intc>;
++				interrupts = <0 8>;
++
++				interrupt-controller;
++				#interrupt-cells = <1>;
++			};
++		};
++
++		i2c1: i2c at 01c2b000 {
++			pinctrl-names = "default";
++			pinctrl-0 = <&i2c1_pins_a>;
++			status = "okay";
++		};
++
++		i2c2: i2c at 01c2b400 {
++			pinctrl-names = "default";
++			pinctrl-0 = <&i2c2_pins_a>;
++			status = "okay";
++		};
++
++		gmac: ethernet at 01c50000 {
++			pinctrl-names = "default";
++			pinctrl-0 = <&gmac_pins_rgmii_a>;
++			phy = <&phy1>;
++			phy-mode = "rgmii";
++			phy-supply = <&reg_gmac_3v3>;
++			status = "okay";
++
++			phy1: ethernet-phy at 1 {
++				reg = <1>;
++			};
++		};
++	};
++
++	leds {
++		compatible = "gpio-leds";
++		pinctrl-names = "default";
++		pinctrl-0 = <&led_pins_lamobo>;
++
++		green {
++			label = "lamobo:green:usr";
++			gpios = <&pio 7 24 0>;
++			default-state = "on";
++		};
++	};
++
++	reg_ahci_5v: ahci-5v {
++		status = "okay";
++	};
++
++	reg_usb1_vbus: usb1-vbus {
++		status = "okay";
++	};
++
++	reg_usb2_vbus: usb2-vbus {
++		status = "okay";
++	};
++
++	reg_gmac_3v3: gmac-3v3 {
++		compatible = "regulator-fixed";
++		pinctrl-names = "default";
++		pinctrl-0 = <&gmac_power_pin_lamobo>;
++		regulator-name = "gmac-3v3";
++		regulator-min-microvolt = <3300000>;
++		regulator-max-microvolt = <3300000>;
++		startup-delay-us = <100000>;
++		enable-active-high;
++		gpio = <&pio 7 23 0>;
++		status = "okay";
++	};
++};
diff --git a/target/linux/sunxi/profiles/lamobo-r1.mk b/target/linux/sunxi/profiles/lamobo-r1.mk
new file mode 100644
index 0000000..4bc1185
--- /dev/null
+++ b/target/linux/sunxi/profiles/lamobo-r1.mk
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/Lamobo_R1
+	NAME:=Lamobo R1
+	PACKAGES:=\
+		uboot-sunxi-Lamobo_R1 kmod-ata-sunxi kmod-rtl8192cu \
+		swconfig wpad-mini
+endef
+
+define Profile/Lamobo_R1/Description
+	Package set optimized for the Lamobo R1
+endef
+
+$(eval $(call Profile,Lamobo_R1))
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From blogic at openwrt.org  Tue Jan 20 01:26:12 2015
From: blogic at openwrt.org (John Crispin)
Date: Tue, 20 Jan 2015 07:26:12 +0100
Subject: [OpenWrt-Devel] [PATCH v3] add support for TL-WA701ND v2
In-Reply-To: <1421671234-14938-1-git-send-email-luigi.tarenga@gmail.com>
References: <1421671234-14938-1-git-send-email-luigi.tarenga@gmail.com>
Message-ID: <54BDF504.1080102@openwrt.org>



On 19/01/2015 13:40, Luigi Tarenga wrote:
> Signed-off-by: Luigi Tarenga <luigi.tarenga at gmail.com>
> ---
> version 3. sent with git send-email to avoid tabs conversion from gmail webmail.
> 
> crossing fingers :)
> Luigi

looks good however ...

> ---
>  target/linux/ar71xx/base-files/etc/diag.sh         |   1 +
>  .../ar71xx/base-files/etc/uci-defaults/01_leds     |   5 +
>  .../ar71xx/base-files/etc/uci-defaults/02_network  |   1 +
>  target/linux/ar71xx/base-files/lib/ar71xx.sh       |   3 +
>  .../ar71xx/base-files/lib/upgrade/platform.sh      |   1 +
>  target/linux/ar71xx/config-3.10                    |   1 +

this is for BB i assume ... can you also send a version based on trunk ?


>  .../files/arch/mips/ath79/mach-tl-wa701nd-v2.c     | 116 +++++++++++++++++++++
>  target/linux/ar71xx/image/Makefile                 |   4 +-
>  .../729-MIPS-ath79-add-TL-WA701NDv2-support.patch  |  45 ++++++++
>  tools/firmware-utils/src/mktplinkfw.c              |   6 ++
>  10 files changed, 182 insertions(+), 1 deletion(-)
>  create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa701nd-v2.c
>  create mode 100644 target/linux/ar71xx/patches-3.10/729-MIPS-ath79-add-TL-WA701NDv2-support.patch
> 
> diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
> index fa07f39..eb96338 100755
> --- a/target/linux/ar71xx/base-files/etc/diag.sh
> +++ b/target/linux/ar71xx/base-files/etc/diag.sh
> @@ -195,6 +195,7 @@ get_status_led() {
>  	tl-mr3220-v2 | \
>  	tl-mr3420 | \
>  	tl-mr3420-v2 | \
> +	tl-wa701nd-v2 | \
>  	tl-wa801nd-v2 | \
>  	tl-wa901nd | \
>  	tl-wa901nd-v2 | \
> diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
> index 5b9dbe7..0d085be 100755
> --- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
> +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
> @@ -275,6 +275,11 @@ tl-wa850re)
>  	ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "tp-link:blue:signal5" "wlan0" "80" "100" "-79" "13"
>  	;;
>  
> +tl-wa701nd-v2)
> +	ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
> +	ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
> +	;;
> +
>  tl-wa860re)
>  	ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
>  	ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
> diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
> index c5cfd67..4be30b8 100755
> --- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
> +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
> @@ -301,6 +301,7 @@ tl-mr13u |\
>  tl-mr3020 |\
>  tl-mr3040 |\
>  tl-mr3040-v2 |\
> +tl-wa701nd-v2 |\
>  tl-wa750re |\
>  tl-wa850re |\
>  tl-wa830re-v2 |\
> diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
> index 1e96b6d..df35775 100755
> --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
> +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
> @@ -571,6 +571,9 @@ ar71xx_board_detect() {
>  	*"TL-MR3420 v2")
>  		name="tl-mr3420-v2"
>  		;;
> +	*"TL-WA701ND v2")
> +		name="tl-wa701nd-v2"
> +		;;
>  	*TL-WA750RE)
>  		name="tl-wa750re"
>  		;;
> diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
> index 846954c..eeaac6a 100755
> --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
> +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
> @@ -269,6 +269,7 @@ platform_check_image() {
>  	tl-mr3220-v2 | \
>  	tl-mr3420 | \
>  	tl-mr3420-v2 | \
> +	tl-wa701nd-v2 | \
>  	tl-wa7510n | \
>  	tl-wa750re | \
>  	tl-wa850re | \
> diff --git a/target/linux/ar71xx/config-3.10 b/target/linux/ar71xx/config-3.10
> index 9a8378a..482914a 100644
> --- a/target/linux/ar71xx/config-3.10
> +++ b/target/linux/ar71xx/config-3.10
> @@ -88,6 +88,7 @@ CONFIG_ATH79_MACH_TL_MR11U=y
>  CONFIG_ATH79_MACH_TL_MR13U=y
>  CONFIG_ATH79_MACH_TL_MR3020=y
>  CONFIG_ATH79_MACH_TL_MR3X20=y
> +CONFIG_ATH79_MACH_TL_WA701ND_V2=y
>  CONFIG_ATH79_MACH_TL_WA830RE_V2=y
>  CONFIG_ATH79_MACH_TL_WA901ND=y
>  CONFIG_ATH79_MACH_TL_WA901ND_V2=y
> diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa701nd-v2.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa701nd-v2.c
> new file mode 100644
> index 0000000..aab92b3
> --- /dev/null
> +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa701nd-v2.c
> @@ -0,0 +1,116 @@
> +/*
> + *  TP-LINK TL-WA701ND v2 board support
> + *
> + *  Copyright (C) 2015 Luigi Tarenga <luigi.tarenga at gmail.com>
> + *
> + *  This program is free software; you can redistribute it and/or modify it
> + *  under the terms of the GNU General Public License version 2 as published
> + *  by the Free Software Foundation.
> + */
> +
> +#include <linux/gpio.h>
> +
> +#include <asm/mach-ath79/ath79.h>
> +
> +#include "dev-eth.h"
> +#include "dev-gpio-buttons.h"
> +#include "dev-leds-gpio.h"
> +#include "dev-m25p80.h"
> +#include "dev-usb.h"
> +#include "dev-wmac.h"
> +#include "machtypes.h"
> +
> +#define TL_WA701NDV2_GPIO_LED_WLAN	0
> +#define TL_WA701NDV2_GPIO_LED_QSS	1
> +#define TL_WA701NDV2_GPIO_LED_LAN	17
> +#define TL_WA701NDV2_GPIO_LED_SYSTEM	27
> +
> +#define TL_WA701NDV2_GPIO_BTN_RESET	11
> +#define TL_WA701NDV2_GPIO_BTN_QSS	26
> +
> +#define TL_WA701NDV2_GPIO_USB_POWER	8
> +
> +#define TL_WA701NDV2_KEYS_POLL_INTERVAL	20	/* msecs */
> +#define TL_WA701NDV2_KEYS_DEBOUNCE_INTERVAL	(3 * TL_WA701NDV2_KEYS_POLL_INTERVAL)
> +
> +static const char *tl_wa701ndv2_part_probes[] = {
> +	"tp-link",
> +	NULL,
> +};
> +
> +static struct flash_platform_data tl_wa701ndv2_flash_data = {
> +	.part_probes	= tl_wa701ndv2_part_probes,
> +};
> +
> +static struct gpio_led tl_wa701ndv2_leds_gpio[] __initdata = {
> +	{
> +		.name		= "tp-link:green:wlan",
> +		.gpio		= TL_WA701NDV2_GPIO_LED_WLAN,
> +		.active_low	= 0,
> +	}, {
> +		.name		= "tp-link:green:qss",
> +		.gpio		= TL_WA701NDV2_GPIO_LED_QSS,
> +		.active_low	= 0,
> +	}, {
> +		.name		= "tp-link:green:lan",
> +		.gpio		= TL_WA701NDV2_GPIO_LED_LAN,
> +		.active_low	= 1,
> +	}, {
> +		.name		= "tp-link:green:system",
> +		.gpio		= TL_WA701NDV2_GPIO_LED_SYSTEM,
> +		.active_low	= 1,
> +        }
> +};
> +
> +static struct gpio_keys_button tl_wa701ndv2_gpio_keys[] __initdata = {
> +	{
> +		.desc		= "reset",
> +		.type		= EV_KEY,
> +		.code		= KEY_RESTART,
> +		.debounce_interval = TL_WA701NDV2_KEYS_DEBOUNCE_INTERVAL,
> +		.gpio		= TL_WA701NDV2_GPIO_BTN_RESET,
> +		.active_low	= 0,
> +	} , {
> +                .desc		= "qss",
> +                .type		= EV_KEY,
> +                .code		= KEY_WPS_BUTTON,
> +                .debounce_interval = TL_WA701NDV2_KEYS_DEBOUNCE_INTERVAL,
> +                .gpio		= TL_WA701NDV2_GPIO_BTN_QSS,
> +                .active_low	= 0,
> +        }
> +
> +};
> +
> +static void __init tl_wa701ndv2_setup(void)
> +{
> +	u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
> +	u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
> +
> +	/* disable PHY_SWAP and PHY_ADDR_SWAP bits */
> +	ath79_setup_ar933x_phy4_switch(false, false);
> +
> +	ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wa701ndv2_leds_gpio),
> +				 tl_wa701ndv2_leds_gpio);
> +
> +	ath79_register_gpio_keys_polled(-1, TL_WA701NDV2_KEYS_POLL_INTERVAL,
> +					ARRAY_SIZE(tl_wa701ndv2_gpio_keys),
> +					tl_wa701ndv2_gpio_keys);
> +
> +	gpio_request_one(TL_WA701NDV2_GPIO_USB_POWER,
> +			 GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
> +			 "USB power");
> +	ath79_register_usb();
> +
> +	ath79_register_m25p80(&tl_wa701ndv2_flash_data);
> +	ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
> +	/* ath79_init_mac(ath79_eth1_data.mac_addr, mac, -1); */
> +
> +	ath79_register_mdio(0, 0x0);
> +	ath79_register_eth(0);
> +	ath79_register_eth(1);
> +
> +	ath79_register_wmac(ee, mac);
> +}
> +
> +MIPS_MACHINE(ATH79_MACH_TL_WA701ND_V2, "TL-WA701ND-v2",
> +	     "TP-LINK TL-WA701ND v2", tl_wa701ndv2_setup);
> diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
> index 683c238..425fcc5 100644
> --- a/target/linux/ar71xx/image/Makefile
> +++ b/target/linux/ar71xx/image/Makefile
> @@ -1163,7 +1163,7 @@ $(eval $(call SingleProfile,TPLINKOLD,squashfs-only,TLWR841NV15,tl-wr841nd-v1.5,
>  $(eval $(call SingleProfile,TPLINK,64kraw,RNXN360RT,rnx-n360rt,TL-WR941ND,ttyS0,115200,0x09410002,0x00420001,4M))
>  $(eval $(call SingleProfile,TPLINK,64kraw,TLMR3220V1,tl-mr3220-v1,TL-MR3220,ttyS0,115200,0x32200001,1,4M))
>  $(eval $(call SingleProfile,TPLINK,64kraw,TLMR3420V1,tl-mr3420-v1,TL-MR3420,ttyS0,115200,0x34200001,1,4M))
> -$(eval $(call SingleProfile,TPLINK,64kraw,TLWA701,tl-wa701n-v1,TL-WA901ND,ttyS0,115200,0x07010001,1,4M))
> +$(eval $(call SingleProfile,TPLINK,64kraw,TLWA701NV1,tl-wa701n-v1,TL-WA901ND,ttyS0,115200,0x07010001,1,4M))
>  $(eval $(call SingleProfile,TPLINK,64kraw,TLWA730REV1,tl-wa730rev1,TL-WA901ND,ttyS0,115200,0x07300001,1,4M))
>  $(eval $(call SingleProfile,TPLINK,64kraw,TLWA7510NV1,tl-wa7510n,TL-WA7510N,ttyS0,115200,0x75100001,1,4M))
>  $(eval $(call SingleProfile,TPLINK,64kraw,TLWA801NV1,tl-wa801nd-v1,TL-WA901ND,ttyS0,115200,0x08010001,1,4M))
> @@ -1199,6 +1199,7 @@ $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLMR3040V1,tl-mr3040-v1,TL-MR3040
>  $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLMR3040V2,tl-mr3040-v2,TL-MR3040-v2,ttyATH0,115200,0x30400002,1,4Mlzma))
>  $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLMR3220V2,tl-mr3220-v2,TL-MR3220-v2,ttyATH0,115200,0x32200002,1,4Mlzma))
>  $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLMR3420V2,tl-mr3420-v2,TL-MR3420-v2,ttyS0,115200,0x34200002,1,4Mlzma))
> +$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWA701NV2,tl-wa701nd-v2,TL-WA701ND-v2,ttyATH0,115200,0x07010002,1,4Mlzma))
>  $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR703,tl-wr703n-v1,TL-WR703N,ttyATH0,115200,0x07030101,1,4Mlzma))
>  $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR710,tl-wr710n-v1,TL-WR710N,ttyATH0,115200,0x07100001,1,8Mlzma))
>  $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR720NV3,tl-wr720n-v3,TL-WR720N-v3,ttyATH0,115200,0x07200103,1,4Mlzma))
> @@ -1276,6 +1277,7 @@ $(eval $(call MultiProfile,TLMR11U,TLMR11UV1 TLMR11UV2))
>  $(eval $(call MultiProfile,TLMR3040,TLMR3040V1 TLMR3040V2))
>  $(eval $(call MultiProfile,TLMR3220,TLMR3220V1 TLMR3220V2))
>  $(eval $(call MultiProfile,TLMR3420,TLMR3420V1 TLMR3420V2))
> +$(eval $(call MultiProfile,TLWA701,TLWA701NV1 TLWA701NV2))
>  $(eval $(call MultiProfile,TLWA730RE,TLWA730REV1))
>  $(eval $(call MultiProfile,TLWA801,TLWA801NV1 TLWA801NV2))
>  $(eval $(call MultiProfile,TLWA830,TLWA830RV1 TLWA830RV2))
> diff --git a/target/linux/ar71xx/patches-3.10/729-MIPS-ath79-add-TL-WA701NDv2-support.patch b/target/linux/ar71xx/patches-3.10/729-MIPS-ath79-add-TL-WA701NDv2-support.patch
> new file mode 100644
> index 0000000..b0de43f
> --- /dev/null
> +++ b/target/linux/ar71xx/patches-3.10/729-MIPS-ath79-add-TL-WA701NDv2-support.patch
> @@ -0,0 +1,45 @@
> +Index: linux-3.10.49/arch/mips/ath79/machtypes.h
> +===================================================================
> +--- linux-3.10.49.orig/arch/mips/ath79/machtypes.h
> ++++ linux-3.10.49/arch/mips/ath79/machtypes.h
> +@@ -118,6 +118,7 @@ enum ath79_mach_type {
> + 	ATH79_MACH_TL_MR3220_V2,	/* TP-LINK TL-MR3220 v2 */
> + 	ATH79_MACH_TL_MR3420,		/* TP-LINK TL-MR3420 */
> + 	ATH79_MACH_TL_MR3420_V2,	/* TP-LINK TL-MR3420 v2 */
> ++	ATH79_MACH_TL_WA701ND_V2,	/* TP-LINK TL-WA701ND v2 */
> + 	ATH79_MACH_TL_WA750RE,		/* TP-LINK TL-WA750RE */
> + 	ATH79_MACH_TL_WA7510N_V1,	/* TP-LINK TL-WA7510N v1*/
> + 	ATH79_MACH_TL_WA850RE,		/* TP-LINK TL-WA850RE */
> +Index: linux-3.10.49/arch/mips/ath79/Kconfig
> +===================================================================
> +--- linux-3.10.49.orig/arch/mips/ath79/Kconfig
> ++++ linux-3.10.49/arch/mips/ath79/Kconfig
> +@@ -713,6 +713,16 @@ config ATH79_MACH_TL_MR3X20
> + 	select ATH79_DEV_M25P80
> + 	select ATH79_DEV_USB
> + 
> ++config ATH79_MACH_TL_WA701ND_V2
> ++	bool "TP-LINK TL-WA701ND v2 support"
> ++	select SOC_AR933X
> ++	select ATH79_DEV_ETH
> ++	select ATH79_DEV_GPIO_BUTTONS
> ++	select ATH79_DEV_LEDS_GPIO
> ++	select ATH79_DEV_M25P80
> ++	select ATH79_DEV_USB
> ++	select ATH79_DEV_WMAC
> ++
> + config ATH79_MACH_TL_WAX50RE
> + 	bool "TP-LINK TL-WA750/850RE support"
> + 	select SOC_AR934X
> +Index: linux-3.10.49/arch/mips/ath79/Makefile
> +===================================================================
> +--- linux-3.10.49.orig/arch/mips/ath79/Makefile
> ++++ linux-3.10.49/arch/mips/ath79/Makefile
> +@@ -101,6 +101,7 @@ obj-$(CONFIG_ATH79_MACH_TL_MR11U)	+= mac
> + obj-$(CONFIG_ATH79_MACH_TL_MR13U)	+= mach-tl-mr13u.o
> + obj-$(CONFIG_ATH79_MACH_TL_MR3020)	+= mach-tl-mr3020.o
> + obj-$(CONFIG_ATH79_MACH_TL_MR3X20)	+= mach-tl-mr3x20.o
> ++obj-$(CONFIG_ATH79_MACH_TL_WA701ND_V2)	+= mach-tl-wa701nd-v2.o
> + obj-$(CONFIG_ATH79_MACH_TL_WAX50RE)     += mach-tl-wax50re.o
> + obj-$(CONFIG_ATH79_MACH_TL_WA830RE_V2)	+= mach-tl-wa830re-v2.o
> + obj-$(CONFIG_ATH79_MACH_TL_WA901ND)	+= mach-tl-wa901nd.o
> diff --git a/tools/firmware-utils/src/mktplinkfw.c b/tools/firmware-utils/src/mktplinkfw.c
> index a6aab59..0a5e4c3 100644
> --- a/tools/firmware-utils/src/mktplinkfw.c
> +++ b/tools/firmware-utils/src/mktplinkfw.c
> @@ -40,6 +40,7 @@
>  #define HWID_TL_MR3420_V1	0x34200001
>  #define HWID_TL_MR3420_V2	0x34200002
>  #define HWID_TL_WA701N_V1	0x07010001
> +#define HWID_TL_WA701N_V2	0x07010002
>  #define HWID_TL_WA7510N_V1	0x75100001
>  #define HWID_TL_WA801ND_V1	0x08010001
>  #define HWID_TL_WA830RE_V1	0x08300010
> @@ -254,6 +255,11 @@ static struct board_info boards[] = {
>  		.hw_rev		= 1,
>  		.layout_id	= "4M",
>  	}, {
> +		.id		= "TL-WA701Nv2",
> +		.hw_id		= HWID_TL_WA701N_V2,
> +		.hw_rev		= 1,
> +		.layout_id	= "4Mlzma",
> +	}, {
>  		.id		= "TL-WA7510N",
>  		.hw_id		= HWID_TL_WA7510N_V1,
>  		.hw_rev		= 1,
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From blogic at openwrt.org  Tue Jan 20 01:34:47 2015
From: blogic at openwrt.org (John Crispin)
Date: Tue, 20 Jan 2015 07:34:47 +0100
Subject: [OpenWrt-Devel] [PATCH v2] procd: delay inittab workers until
	the tty exists.
In-Reply-To: <54BD9F8A.2020907@exegin.com>
References: <54BD9F8A.2020907@exegin.com>
Message-ID: <54BDF707.2020702@openwrt.org>



On 20/01/2015 01:21, Owen Kirby wrote:
> Add hotplug support for tty devices in /etc/inittab that are specified
> by the askfirst
> keyword so that terminals attached after boot time get console processes
> started.
> 
> This was tested on an AT91 target using the gadget serial subsystem and
> on an WNDR3800
> with a USB serial adapter. One possible weirdness I encountered was that
> the baud rates
> and control modes sometimes need adjusting with a hotplug script after
> reconnecting
> the adapter. This is also only implemented for askfirst, but it might
> also make sense
> to do the same thing for respawn and askconsole.
> 


i think it would be a lot simpler if you ...

* add a new cmd_handler inside hotplug/json_script called console or
spawn_console
* add a 2nd parameter to procd_inittab_run called char *tty that can be
NULL or act as a filter
* call procd_inittab_run with the 2nd parameter set from the new
json_script handler
* add a new if clause to package/system/procd/files/hotplug.json




> Signed-off-by: Owen Kirby <osk at exegin.com>
> ---
>  inittab.c      | 35 ++++++++++++++++++++++++++++++++---
>  plug/hotplug.c | 40 +++++++++++++++++++++++++++++++++++-----
>  plug/hotplug.h | 15 +++++++++++++++
>  3 files changed, 82 insertions(+), 8 deletions(-)
> 
> diff --git a/inittab.c b/inittab.c
> index 623103d..c9310e5 100644
> --- a/inittab.c
> +++ b/inittab.c
> @@ -26,6 +26,7 @@
>  #include <libubox/utils.h>
>  #include <libubox/list.h>
>  
> +#include "plug/hotplug.h"
>  #include "utils/utils.h"
>  #include "procd.h"
>  #include "rcS.h"
> @@ -55,6 +56,7 @@ struct init_action {
>  
>      struct init_handler *handler;
>      struct uloop_process proc;
> +    struct hotplug_event event;
>  
>      int respawn;
>      struct uloop_timeout tout;
> @@ -90,6 +92,29 @@ static int dev_exist(const char *dev)
>      return (res != -1);
>  }
>  
> +static void dev_hotplug(struct hotplug_event *event, struct blob_attr
> *msg)
> +{
> +    struct init_action *a = container_of(event, struct init_action,
> event);
> +    char *action = hotplug_msg_find_var(msg, "ACTION");
> +    char *subsystem = hotplug_msg_find_var(msg, "SUBSYSTEM");
> +    char *devname = hotplug_msg_find_var(msg, "DEVNAME");
> +   
> +    if (!action || !subsystem || !devname)
> +        return;
> +    if (strcmp(subsystem, "tty") || strcmp(devname, a->id))
> +        return;
> +   
> +    DEBUG(4, "inittab hotplug: ACTION=\"%s\", SUBSYSTEM=\"%s\",
> DEVNAME=\"%s\"\n",
> +        action, subsystem, devname);
> +    if (!strcmp(action, "add")) {
> +        uloop_timeout_set(&a->tout, a->respawn);
> +    }
> +    else if (!strcmp(action, "remove")) {
> +        uloop_process_delete(&a->proc);
> +        uloop_timeout_cancel(&a->tout);
> +    }
> +}
> +
>  static void fork_worker(struct init_action *a)
>  {
>      int fd;
> @@ -130,7 +155,7 @@ static void child_exit(struct uloop_process *proc,
> int ret)
>      struct init_action *a = container_of(proc, struct init_action, proc);
>  
>      DEBUG(4, "pid:%d\n", proc->pid);
> -        uloop_timeout_set(&a->tout, a->respawn);
> +        uloop_timeout_set(&a->tout, a->respawn);
>  }
>  
>  static void respawn(struct uloop_timeout *tout)
> @@ -157,7 +182,7 @@ static void askfirst(struct init_action *a)
>  {
>      int i;
>  
> -    if (!dev_exist(a->id) || (console && !strcmp(console, a->id))) {
> +    if (console && !strcmp(console, a->id)) {
>          DEBUG(4, "Skipping %s\n", a->id);
>          return;
>      }
> @@ -168,8 +193,12 @@ static void askfirst(struct init_action *a)
>      a->argv[0] = ask;
>      a->respawn = 500;
>  
> +    a->event.cb = dev_hotplug;
> +    hotplug_event_add(&a->event);
> +
>      a->proc.cb = child_exit;
> -    fork_worker(a);
> +    if (dev_exist(a->id))
> +        fork_worker(a);
>  }
>  
>  static void askconsole(struct init_action *a)
> diff --git a/plug/hotplug.c b/plug/hotplug.c
> index 061833a..3aa87c0 100644
> --- a/plug/hotplug.c
> +++ b/plug/hotplug.c
> @@ -44,13 +44,14 @@ struct cmd_queue {
>  };
>  
>  static LIST_HEAD(cmd_queue);
> +static LIST_HEAD(events);
>  static struct uloop_process queue_proc;
>  static struct uloop_timeout last_event;
>  static struct blob_buf b;
>  static char *rule_file;
>  static struct blob_buf script;
>  
> -static char *hotplug_msg_find_var(struct blob_attr *msg, const char *name)
> +char *hotplug_msg_find_var(struct blob_attr *msg, const char *name)
>  {
>      struct blob_attr *cur;
>      int rem;
> @@ -393,24 +394,30 @@ static struct json_script_ctx jctx = {
>      .handle_file = rule_handle_file,
>  };
>  
> -static void hotplug_handler_debug(struct blob_attr *data)
> +static void hotplug_handler_debug(struct hotplug_event *e, struct
> blob_attr *msg)
>  {
>      char *str;
>  
>      if (debug < 3)
>          return;
>  
> -    str = blobmsg_format_json(data, true);
> +    str = blobmsg_format_json(msg, true);
>      DEBUG(3, "%s\n", str);
>      free(str);
>  }
>  
> +static void hotplug_handler_script(struct hotplug_event *e, struct
> blob_attr *msg)
> +{
> +    json_script_run(&jctx, rule_file, msg);
> +}
> +
>  static void hotplug_handler(struct uloop_fd *u, unsigned int ev)
>  {
>      int i = 0;
>      static char buf[4096];
>      int len = recv(u->fd, buf, sizeof(buf), MSG_DONTWAIT);
>      void *index;
> +    struct hotplug_event *e, *tmp;
>      if (len < 1)
>          return;
>  
> @@ -427,10 +434,16 @@ static void hotplug_handler(struct uloop_fd *u,
> unsigned int ev)
>          i += l;
>      }
>      blobmsg_close_table(&b, index);
> -    hotplug_handler_debug(b.head);
> -    json_script_run(&jctx, rule_file, blob_data(b.head));
> +    list_for_each_entry_safe(e, tmp, &events, list)
> +        e->cb(e, blob_data(b.head));
>  }
>  
> +static struct hotplug_event script_event = {
> +    .cb = hotplug_handler_script,
> +};
> +static struct hotplug_event debug_event = {
> +    .cb = hotplug_handler_debug,
> +};
>  static struct uloop_fd hotplug_fd = {
>      .cb = hotplug_handler,
>  };
> @@ -470,6 +483,8 @@ void hotplug(char *rules)
>      json_script_init(&jctx);
>      queue_proc.cb = queue_proc_cb;
>      uloop_fd_add(&hotplug_fd, ULOOP_READ);
> +    hotplug_event_add(&debug_event);
> +    hotplug_event_add(&script_event);
>  }
>  
>  int hotplug_run(char *rules)
> @@ -486,3 +501,18 @@ void hotplug_shutdown(void)
>      uloop_fd_delete(&hotplug_fd);
>      close(hotplug_fd.fd);
>  }
> +
> +int hotplug_event_add(struct hotplug_event *e)
> +{
> +    list_add_tail(&e->list, &events);
> +   
> +    return 0;
> +}
> +
> +int hotplug_event_delete(struct hotplug_event *e)
> +{
> +    list_del(&e->list);
> +   
> +    return 0;
> +}
> +
> diff --git a/plug/hotplug.h b/plug/hotplug.h
> index 2a44442..4870476 100644
> --- a/plug/hotplug.h
> +++ b/plug/hotplug.h
> @@ -16,10 +16,25 @@
>  #define __PROCD_HOTPLUG_H
>  
>  #include <libubox/uloop.h>
> +#include <libubox/list.h>
> +#include "../utils/utils.h"
> +
> +struct hotplug_event;
> +
> +typedef void (*hotplug_event_handler)(struct hotplug_event *event,
> struct blob_attr *msg);
> +
> +struct hotplug_event {
> +    struct list_head list;
> +
> +    hotplug_event_handler cb;
> +};
>  
>  void hotplug(char *rules);
>  int hotplug_run(char *rules);
>  void hotplug_shutdown(void);
>  void hotplug_last_event(uloop_timeout_handler handler);
> +char *hotplug_msg_find_var(struct blob_attr *msg, const char *name);
> +int hotplug_event_add(struct hotplug_event *event);
> +int hotplug_event_delete(struct hotplug_event *event);
>  
>  #endif
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From blogic at openwrt.org  Tue Jan 20 01:40:24 2015
From: blogic at openwrt.org (John Crispin)
Date: Tue, 20 Jan 2015 07:40:24 +0100
Subject: [OpenWrt-Devel] [PATCH] [scripts] feeds: search packages by
	license
In-Reply-To: <5494AB04.4090005@prplfoundation.org>
References: <5494AB04.4090005@prplfoundation.org>
Message-ID: <54BDF858.300@openwrt.org>



On 19/12/2014 23:47, Eric Schultz wrote:
> Currently, the feeds scripts provides no way to filter by packages
> by license or no license. This patch adds a search feature to feeds
> which can be used to search packages by license or by no license.
> 
> Signed-off-by: Eric Schultz <eschultz at prplfoundation.org>
> 
> --- scripts/feeds | 90
> ++++++++++++++++++++++++++++++++++++++++++++++++++--------- 1 file
> changed, 77 insertions(+), 13 deletions(-)
> 

[...]

> 
> @@ -642,6 +704,8 @@ Commands: search [options] <substring>: Search
> for a package Options: -r <feedname>: Only search in this feed +
> -l <license>:  Include packages with this license +			-n:
> Include packages without a license tag
> 

if i read this correctly the current behavior is changed which will
inevitably lead to a trillion tickets with "package XYZ is missing"

can you change the option to "Only include packages with a license tag"






> uninstall -a|<package>: Uninstall a package Options:
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From blogic at openwrt.org  Tue Jan 20 01:42:26 2015
From: blogic at openwrt.org (John Crispin)
Date: Tue, 20 Jan 2015 07:42:26 +0100
Subject: [OpenWrt-Devel] [PATCH] ralink: add support for firewrt
In-Reply-To: <1421734060-4607-1-git-send-email-linux.c@foxmail.com>
References: <1421734060-4607-1-git-send-email-linux.c@foxmail.com>
Message-ID: <54BDF8D2.1010603@openwrt.org>

Hi,

thanks for the patch -->
https://dev.openwrt.org/changeset/44055

also big thanks to Mingyu for spending so much time in fixing the
ethernet driver !

	John


On 20/01/2015 07:07, wengbj wrote:
> ---
>  .../linux/ramips/base-files/etc/board.d/02_network |    1 +
>  target/linux/ramips/base-files/lib/ramips.sh       |    3 +
>  .../ramips/base-files/lib/upgrade/platform.sh      |    1 +
>  target/linux/ramips/dts/FIREWRT.dts                |   81 ++++++++++++++++++++
>  target/linux/ramips/image/Makefile                 |    7 +-
>  target/linux/ramips/mt7621/profiles/firefly.mk     |   24 ++++++
>  6 files changed, 116 insertions(+), 1 deletion(-)
>  create mode 100644 target/linux/ramips/dts/FIREWRT.dts
>  create mode 100644 target/linux/ramips/mt7621/profiles/firefly.mk
> 
> diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
> index b440fb3..a8ed0b4 100755
> --- a/target/linux/ramips/base-files/etc/board.d/02_network
> +++ b/target/linux/ramips/base-files/etc/board.d/02_network
> @@ -118,6 +118,7 @@ ramips_setup_interfaces()
>  	dir-300-b7 | \
>  	dir-320-b1 | \
>  	dir-615-h1 | \
> +	firewrt | \
>  	hlk-rm04 | \
>  	mt7621 | \
>  	mt7628 | \
> diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh
> index 720b137..bb815da 100755
> --- a/target/linux/ramips/base-files/lib/ramips.sh
> +++ b/target/linux/ramips/base-files/lib/ramips.sh
> @@ -91,6 +91,9 @@ ramips_board_detect() {
>  	*"Buffalo WSR-1166DHP")
>  		name="wsr-1166"
>  		;;
> +	*"Firefly FireWRT")
> +		name="firewrt"
> +		;;
>  	*"CY-SWR1100")
>  		name="cy-swr1100"
>  		;;
> diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh
> index 7c17211..ff7126a 100755
> --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
> +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
> @@ -50,6 +50,7 @@ platform_check_image() {
>  	f7c027 | \
>  	fonera20n | \
>  	freestation5 | \
> +	firewrt |\
>  	hg255d | \
>  	hlk-rm04 | \
>  	ht-tm02 | \
> diff --git a/target/linux/ramips/dts/FIREWRT.dts b/target/linux/ramips/dts/FIREWRT.dts
> new file mode 100644
> index 0000000..2e5d26b
> --- /dev/null
> +++ b/target/linux/ramips/dts/FIREWRT.dts
> @@ -0,0 +1,81 @@
> +/dts-v1/;
> +
> +/include/ "mt7621.dtsi"
> +
> +/ {
> +	compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc";
> +	model = "Firefly FireWRT";
> +
> +	memory at 0 {
> +		reg = <0x0 0x10000000>;
> +	};
> +
> +	chosen {
> +		bootargs = "console=ttyS0,57600";
> +	};
> +
> +	sdhci at 10130000 {
> +		status = "okay";
> +	};
> +
> +	palmbus at 1E000000 {
> +		spi at b00 {
> +			status = "okay";
> +
> +			m25p80 at 0 {
> +				#address-cells = <1>;
> +				#size-cells = <1>;
> +				compatible = "mx25l12805d";
> +				reg = <0 0>;
> +				linux,modalias = "m25p80";
> +				spi-max-frequency = <10000000>;
> +
> +				partition at 0 {
> +					label = "u-boot";
> +					reg = <0x0 0x30000>;
> +					read-only;
> +				};
> +
> +				partition at 30000 {
> +					label = "u-boot-env";
> +					reg = <0x30000 0x10000>;
> +					read-only;
> +				};
> +
> +				factory: partition at 40000 {
> +					label = "factory";
> +					reg = <0x40000 0x10000>;
> +					read-only;
> +				};
> +
> +				partition at 50000 {
> +					label = "firmware";
> +					reg = <0x50000 0x7b0000>;
> +				};
> +
> +			};
> +		};
> +	};
> +
> +	pcie at 1e140000 {
> +		status = "okay";
> +
> +		pcie0 {
> +			mt76 at 0,0 {
> +				reg = <0x0000 0 0 0 0>;
> +				device_type = "pci";
> +				mediatek,mtd-eeprom = <&factory 0x8000>;
> +				mediatek,2ghz = <0>;
> +			};
> +		};
> +
> +		pcie1 {
> +			mt76 at 1,0 {
> +				reg = <0x0000 0 0 0 0>;
> +				device_type = "pci";
> +				mediatek,mtd-eeprom = <&factory 0x0000>;
> +				mediatek,5ghz = <0>;
> +			};
> +		};
> +	};
> +};
> diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile
> index f935a95..e4dea9b 100644
> --- a/target/linux/ramips/image/Makefile
> +++ b/target/linux/ramips/image/Makefile
> @@ -893,7 +893,7 @@ endif
>  #
>  
>  ifeq ($(SUBTARGET),mt7621)
> -  TARGET_DEVICES += mt7621 wsr-600 wsr-1166 dir-860l-b1
> +  TARGET_DEVICES += mt7621 wsr-600 wsr-1166 dir-860l-b1 firewrt
>  endif
>  
>  define Device/mt7621
> @@ -925,6 +925,11 @@ define Device/dir-860l-b1
>  	seama-seal -m "signature=wrgac13_dlink.2013gui_dir860lb"
>  endef
>  
> +define Device/firewrt
> +  DTS := FIREWRT
> +  IMAGE_SIZE := $(ralink_default_fw_size_8M)
> +endef
> +
>  #
>  # MT7628 Profiles
>  #
> diff --git a/target/linux/ramips/mt7621/profiles/firefly.mk b/target/linux/ramips/mt7621/profiles/firefly.mk
> new file mode 100644
> index 0000000..c8292b0
> --- /dev/null
> +++ b/target/linux/ramips/mt7621/profiles/firefly.mk
> @@ -0,0 +1,24 @@
> +#
> +# Copyright (C) 2011 OpenWrt.org
> +#
> +# This is free software, licensed under the GNU General Public License v2.
> +# See /LICENSE for more information.
> +#
> +
> +define Profile/Firefly
> +	NAME:=Firefly Device
> +	PACKAGES:=\
> +		kmod-usb-core kmod-usb3 kmod-usb-hid  kmod-usb-storage mount-utils usbutils \
> +        kmod-sdhci-mt7620 \
> +		kmod-fs-ext3 kmod-fs-vfat kmod-fs-ntfs \
> +		kmod-nls-cp437 kmod-nls-iso8859-1 kmod-nls-utf8 \
> +		kmod-ledtrig-usbdev \
> +		kmod-ata-core \
> +		luci \
> +		kmod-mt76
> +endef
> +
> +define Profile/Firefly/Description
> +	Default package set compatible with most boards.
> +endef
> +$(eval $(call Profile,Firefly))
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From s.demeszko at wireless-instruments.com  Tue Jan 20 05:07:28 2015
From: s.demeszko at wireless-instruments.com (=?UTF-8?B?U8WCYXdvbWlyIERlbWVzemtv?=)
Date: Tue, 20 Jan 2015 11:07:28 +0100
Subject: [OpenWrt-Devel] network/znc: Package binaries appear to be
 broken by MIPS16
In-Reply-To: <20150119185225.4C7F1A6497@mail.uptheinter.net>
References: <20150119185225.4C7F1A6497@mail.uptheinter.net>
Message-ID: <54BE28E0.9060409@wireless-instruments.com>

19.01.2015 19:50, Oliver wrote:
> I'll try 4.9 - out of interest, do you have any references to the bug in 4.8 (C++ specific?)

Sorry, I do not remember where I read about that.
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From ben.mulvihill at gmail.com  Tue Jan 20 06:28:45 2015
From: ben.mulvihill at gmail.com (Ben Mulvihill)
Date: Tue, 20 Jan 2015 12:28:45 +0100
Subject: [OpenWrt-Devel] uboot-lantiq cgu settings for ramboot image
In-Reply-To: <1421710757.25187.55.camel@merveille.lan>
References: <1421664368.25187.18.camel@merveille.lan>
 <54BCEFD1.6010902@conorogorman.net>
 <1421678697.25187.27.camel@merveille.lan>
 <CACUy__U3gJ-M6Hz7A_GTewGaTJ+FK4fiZXANbxhLmmXt_0SM=g@mail.gmail.com>
 <1421691666.25187.46.camel@merveille.lan>
 <1421710757.25187.55.camel@merveille.lan>
Message-ID: <1421753325.25187.58.camel@merveille.lan>

On Tue, 2015-01-20 at 00:39 +0100, Ben Mulvihill wrote:
> On Mon, 2015-01-19 at 19:21 +0100, Ben Mulvihill wrote:
> > On Mon, 2015-01-19 at 16:47 +0100, Daniel Schwierzeck wrote:
> > > 2015-01-19 15:44 GMT+01:00 Ben Mulvihill <ben.mulvihill at gmail.com>:
> > > > On Mon, 2015-01-19 at 11:51 +0000, Conor O'Gorman wrote:
> > > >> On 19/01/15 10:46, Ben Mulvihill wrote:
> > > >> > Hello,
> > > >> >
> > > >> > I am trying to build uboot-lantiq for the BT Home Hub 3A (lantiq
> > > >> > ar9), and am wondering where to initialise the cgu, in the case
> > > >> > of a ramboot image for uart booting. Normally the cgu is initialised
> > > >> > in lowlevel_init, but that code is bypassed in ramboot images. The
> > > >> > result is that the board boots with the wrong cgu settings, which
> > > >> > sends the console haywire. So far I have tried two solutions:
> > > >>
> > > >> Another option is to try and not change anything. The console is already
> > > >> configured and running. The ram does need config.
> > > >>
> > > >> I was used to seeing the ramboot version running at half clock speed, at
> > > >> least on danube, previous to ar9.
> > > >>
> > > >> Conor
> > > >
> > > > Hi Conor,
> > > >
> > > > Thanks for the reply. But with the latest uboot-lantiq, not changing
> > > > anything means that I don't get a usable console. With an older
> > > > version I do at least get a uboot console, but no linux console when
> > > > I boot openwrt. Correcting the cgu settings solves both problems.
> > > >
> > > 
> > > could you try this?
> > > 
> > > diff --git a/arch/mips/cpu/mips32/arx100/cgu.c
> > > b/arch/mips/cpu/mips32/arx100/cgu.c
> > > index 6e71ee7..e0afbda 100644
> > > --- a/arch/mips/cpu/mips32/arx100/cgu.c
> > > +++ b/arch/mips/cpu/mips32/arx100/cgu.c
> > > @@ -95,15 +95,5 @@ unsigned long ltq_get_cpu_clock(void)
> > > 
> > >  unsigned long ltq_get_bus_clock(void)
> > >  {
> > > -       u32 fpi_sel;
> > > -       unsigned long clk;
> > > -
> > > -       fpi_sel = ltq_cgu_sys_readl(1, CGU_SYS_FPI_SEL);
> > > -
> > > -       if (fpi_sel)
> > > -               clk = ltq_get_io_region_clock() / 2;
> > > -       else
> > > -               clk = ltq_get_io_region_clock();
> > > -
> > > -       return clk;
> > > +       return ltq_get_io_region_clock();
> > >  }
> > > 
> > > the UART driver calculates the baudrate from the FPI bus clock, but
> > > FPI_SEL is not available on AR9. FPI bus clock is always the same as
> > > DDR clock, Obviously a copy&paste error from VR9 code ;)
> > > 
> > 
> > No, even with this patch, I still don't get a working console I'm
> > afraid. If I don't set anything explicitly, the board comes up with
> > CGU_SYS set to 0x05, ie CGU_SYS_SYSSEL_PLL0_333_MHZ |
> > CGU_SYS_CPUSEL_EQUAL_DDRCLK | CGU_SYS_DDRSEL_THIRD_SYSCLK.
> > Is this a valid combination without CGU_SYS_PPESEL_250_MHZ ?
> > I don't understand what CGU_SYS_PPESEL_250_MHZ does?
> > The "right setting", as set by the stock uboot, is 0x80.
> 
> P.S. There also seems to be a discrepancy between the uboot and
> linux code. I take it from what you say above that fpi clock, ddr
> clock and io region clock are all the same. Now if the least 
> significant bit of CGU_SYS is set, then according to the uboot
> code - function ltq_get_bus_clock() - their value is one
> third of the system clock. But according to the linux code
> - function ltq_ar9_fpi_hz() in arch/mips/lantiq/xway/clk.c -
> their value in this case is equal to the system clock.
> 
> Or am I getting muddled? It's past my bedtime!
> 
> 

Some of the bitshifting in arch/mips/cpu/mips32/arx100/cgu.c is 1
out. A patch along these lines should fix it:

--- a/arch/mips/cpu/mips32/arx100/cgu.c	2015-01-20 11:57:22.000000000 +0100
+++ b/arch/mips/cpu/mips32/arx100/cgu.c	2015-01-20 12:00:15.000000000 +0100
@@ -10,12 +10,17 @@
 #include <asm/lantiq/clk.h>
 #include <asm/lantiq/io.h>
 
-#define CGU_SYS_DDR_SEL		(1 << 0)
-#define CGU_SYS_CPU_SEL		(1 << 2)
+#define CGU_SYS_DDR_SHIFT	0
+#define CGU_SYS_CPU_SHIFT	2
 #define CGU_SYS_SYS_SHIFT	3
+#define CGU_SYS_FPI_SHIFT	6
+#define CGU_SYS_PPE_SHIFT	7
+
+#define CGU_SYS_DDR_MASK	(1 << CGU_SYS_DDR_SHIFT)
+#define CGU_SYS_CPU_MASK	(1 << CGU_SYS_CPU_SHIFT)
 #define CGU_SYS_SYS_MASK	(0x3 << CGU_SYS_SYS_SHIFT)
-#define CGU_SYS_FPI_SEL		(1 << 6)
-#define CGU_SYS_PPE_SEL		(1 << 7)
+#define CGU_SYS_FPI_MASK	(1 << CGU_SYS_FPI_SHIFT)
+#define CGU_SYS_PPE_MASK	(1 << CGU_SYS_PPE_SHIFT)
 
 struct ltq_cgu_regs {
 	u32	rsvd0;
@@ -68,7 +73,7 @@ unsigned long ltq_get_io_region_clock(vo
 	u32 ddr_sel;
 	unsigned long clk;
 
-	ddr_sel = ltq_cgu_sys_readl(1, CGU_SYS_DDR_SEL);
+	ddr_sel = ltq_cgu_sys_readl(CGU_SYS_DDR_MASK, CGU_SYS_DDR_SHIFT);
 
 	if (ddr_sel)
 		clk = ltq_get_system_clock() / 3;
@@ -83,7 +88,7 @@ unsigned long ltq_get_cpu_clock(void)
 	u32 cpu_sel;
 	unsigned long clk;
 
-	cpu_sel = ltq_cgu_sys_readl(1, CGU_SYS_CPU_SEL);
+	cpu_sel = ltq_cgu_sys_readl(CGU_SYS_CPU_MASK, CGU_SYS_CPU_SHIFT);
 
 	if (cpu_sel)
 		clk = ltq_get_io_region_clock();
@@ -98,7 +103,7 @@ unsigned long ltq_get_bus_clock(void)
 	u32 fpi_sel;
 	unsigned long clk;
 
-	fpi_sel = ltq_cgu_sys_readl(1, CGU_SYS_FPI_SEL);
+	fpi_sel = ltq_cgu_sys_readl(CGU_SYS_FPI_MASK, CGU_SYS_FPI_SHIFT);
 
 	if (fpi_sel)
 		clk = ltq_get_io_region_clock() / 2;
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From daniel.schwierzeck at gmail.com  Tue Jan 20 08:05:21 2015
From: daniel.schwierzeck at gmail.com (Daniel Schwierzeck)
Date: Tue, 20 Jan 2015 14:05:21 +0100
Subject: [OpenWrt-Devel] uboot-lantiq cgu settings for ramboot image
In-Reply-To: <1421753325.25187.58.camel@merveille.lan>
References: <1421664368.25187.18.camel@merveille.lan>
 <54BCEFD1.6010902@conorogorman.net>
 <1421678697.25187.27.camel@merveille.lan>
 <CACUy__U3gJ-M6Hz7A_GTewGaTJ+FK4fiZXANbxhLmmXt_0SM=g@mail.gmail.com>
 <1421691666.25187.46.camel@merveille.lan>
 <1421710757.25187.55.camel@merveille.lan>
 <1421753325.25187.58.camel@merveille.lan>
Message-ID: <CACUy__WQYvxmH1vD5S3oR4BnGT9dStUe86aLDAZTJZf8B61P2A@mail.gmail.com>

2015-01-20 12:28 GMT+01:00 Ben Mulvihill <ben.mulvihill at gmail.com>:

>
> Some of the bitshifting in arch/mips/cpu/mips32/arx100/cgu.c is 1
> out. A patch along these lines should fix it:

yes, the code is wrong. I have prepared a patch. Thanks for fixing.

https://github.com/danielschwierzeck/u-boot-lantiq/commit/f38048eb920276d8aa48a4b0bbf653d8fd4ef66b

>
> --- a/arch/mips/cpu/mips32/arx100/cgu.c 2015-01-20 11:57:22.000000000 +0100
> +++ b/arch/mips/cpu/mips32/arx100/cgu.c 2015-01-20 12:00:15.000000000 +0100
> @@ -10,12 +10,17 @@
>  #include <asm/lantiq/clk.h>
>  #include <asm/lantiq/io.h>
>
> -#define CGU_SYS_DDR_SEL                (1 << 0)
> -#define CGU_SYS_CPU_SEL                (1 << 2)
> +#define CGU_SYS_DDR_SHIFT      0
> +#define CGU_SYS_CPU_SHIFT      2
>  #define CGU_SYS_SYS_SHIFT      3
> +#define CGU_SYS_FPI_SHIFT      6
> +#define CGU_SYS_PPE_SHIFT      7
> +
> +#define CGU_SYS_DDR_MASK       (1 << CGU_SYS_DDR_SHIFT)
> +#define CGU_SYS_CPU_MASK       (1 << CGU_SYS_CPU_SHIFT)
>  #define CGU_SYS_SYS_MASK       (0x3 << CGU_SYS_SYS_SHIFT)
> -#define CGU_SYS_FPI_SEL                (1 << 6)
> -#define CGU_SYS_PPE_SEL                (1 << 7)
> +#define CGU_SYS_FPI_MASK       (1 << CGU_SYS_FPI_SHIFT)
> +#define CGU_SYS_PPE_MASK       (1 << CGU_SYS_PPE_SHIFT)
>
>  struct ltq_cgu_regs {
>         u32     rsvd0;
> @@ -68,7 +73,7 @@ unsigned long ltq_get_io_region_clock(vo
>         u32 ddr_sel;
>         unsigned long clk;
>
> -       ddr_sel = ltq_cgu_sys_readl(1, CGU_SYS_DDR_SEL);
> +       ddr_sel = ltq_cgu_sys_readl(CGU_SYS_DDR_MASK, CGU_SYS_DDR_SHIFT);
>
>         if (ddr_sel)
>                 clk = ltq_get_system_clock() / 3;
> @@ -83,7 +88,7 @@ unsigned long ltq_get_cpu_clock(void)
>         u32 cpu_sel;
>         unsigned long clk;
>
> -       cpu_sel = ltq_cgu_sys_readl(1, CGU_SYS_CPU_SEL);
> +       cpu_sel = ltq_cgu_sys_readl(CGU_SYS_CPU_MASK, CGU_SYS_CPU_SHIFT);
>
>         if (cpu_sel)
>                 clk = ltq_get_io_region_clock();
> @@ -98,7 +103,7 @@ unsigned long ltq_get_bus_clock(void)
>         u32 fpi_sel;
>         unsigned long clk;
>
> -       fpi_sel = ltq_cgu_sys_readl(1, CGU_SYS_FPI_SEL);
> +       fpi_sel = ltq_cgu_sys_readl(CGU_SYS_FPI_MASK, CGU_SYS_FPI_SHIFT);
>
>         if (fpi_sel)
>                 clk = ltq_get_io_region_clock() / 2;
>
>

-- 
- Daniel
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From dreagle at doukki.net  Tue Jan 20 08:19:38 2015
From: dreagle at doukki.net (drEagle)
Date: Tue, 20 Jan 2015 14:19:38 +0100
Subject: [OpenWrt-Devel] [PATCH 1/2] target: kirkwood: fix leds defaults
	config
In-Reply-To: <1419043909-3006-1-git-send-email-dreagle@doukki.net>
References: <1419043909-3006-1-git-send-email-dreagle@doukki.net>
Message-ID: <54BE55EA.30609@doukki.net>

Hi Luka,

Is this patch missed or lost ?
I do not find any trace at patchworks.

Do you need that I resubmit it ?

Regards,
G?rald

Le 20/12/2014 03:51, Gerald Kerma a ?crit :
> Fix missing parameters in 01_leds
> 
> Signed-off-by: Gerald Kerma <dreagle at doukki.net>
> ---
>  .../kirkwood/base-files/etc/uci-defaults/01_leds   | 22 +++++++++++-----------
>  1 file changed, 11 insertions(+), 11 deletions(-)
> 
> diff --git a/target/linux/kirkwood/base-files/etc/uci-defaults/01_leds b/target/linux/kirkwood/base-files/etc/uci-defaults/01_leds
> index 51fb4d8..ba4d569 100644
> --- a/target/linux/kirkwood/base-files/etc/uci-defaults/01_leds
> +++ b/target/linux/kirkwood/base-files/etc/uci-defaults/01_leds
> @@ -10,30 +10,30 @@ board=$(kirkwood_board_name)
>  
>  case "$board" in
>  "dockstar")
> -	ucidef_set_led_default "health" "status:green:health" "1"
> -	ucidef_set_led_default "fault" "status:orange:fault" "1"
> +	ucidef_set_led_default "health" "health" "status:green:health" "1"
> +	ucidef_set_led_default "fault" "fault" "status:orange:fault" "1"
>  	;;
>  "ea3500")
> -	ucidef_set_led_default "power" "ea3500:green:power" "1"
> +	ucidef_set_led_default "power" "power" "ea3500:green:power" "1"
>  	;;
>  "ea4500")
> -	ucidef_set_led_default "health" "ea4500:white:health" "1"
> -	ucidef_set_led_default "pulse" "ea4500:white:pulse" "1"
> +	ucidef_set_led_default "health" "health" "ea4500:white:health" "1"
> +	ucidef_set_led_default "pulse" "pulse" "ea4500:white:pulse" "1"
>  	;;
>  "ib62x0")
> -	ucidef_set_led_default "health" "ib62x0:green:os" "1"
> -	ucidef_set_led_default "fault" "ib62x0:red:os" "1"
> +	ucidef_set_led_default "health" "health" "ib62x0:green:os" "1"
> +	ucidef_set_led_default "fault" "fault" "ib62x0:red:os" "1"
>  	;;
>  "pogo_e02")
> -	ucidef_set_led_default "health" "status:green:health" "1"
> -	ucidef_set_led_default "fault" "status:orange:fault" "1"
> +	ucidef_set_led_default "health" "health" "status:green:health" "1"
> +	ucidef_set_led_default "fault" "fault" "status:orange:fault" "1"
>  	;;
>  "guruplug-server-plus")
> -	ucidef_set_led_timer "health" "guruplug:red:health" "200" "800"
> +	ucidef_set_led_timer "health" "health" "guruplug:red:health" "200" "800"
>  	;;
>  "sheevaplug" | \
>  "sheevaplug-esata")
> -	ucidef_set_led_timer "health" "sheevaplug:blue:health" "200" "800"
> +	ucidef_set_led_timer "health" "health" "sheevaplug:blue:health" "200" "800"
>  	;;
>  *)
>  	;;
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From dreagle at doukki.net  Tue Jan 20 08:20:09 2015
From: dreagle at doukki.net (drEagle)
Date: Tue, 20 Jan 2015 14:20:09 +0100
Subject: [OpenWrt-Devel] [PATCH 2/2] package: add timer led function
In-Reply-To: <1419043909-3006-2-git-send-email-dreagle@doukki.net>
References: <1419043909-3006-1-git-send-email-dreagle@doukki.net>
 <1419043909-3006-2-git-send-email-dreagle@doukki.net>
Message-ID: <54BE5609.2050505@doukki.net>

Hi Luka,

Same with this another patch.
Is it missed or lost ?
I do not find any trace at patchworks.

Do you need that I resubmit it ?

Regards,
G?rald

Le 20/12/2014 03:51, Gerald Kerma a ?crit :
> Add ucidef_set_led_timer to uci-defaults.sh
> 
> Signed-off-by: Gerald Kerma <dreagle at doukki.net>
> ---
>  .../base-files/files/lib/functions/uci-defaults.sh   | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
> 
> diff --git a/package/base-files/files/lib/functions/uci-defaults.sh b/package/base-files/files/lib/functions/uci-defaults.sh
> index 6ed0bf1..eb5b240 100644
> --- a/package/base-files/files/lib/functions/uci-defaults.sh
> +++ b/package/base-files/files/lib/functions/uci-defaults.sh
> @@ -120,6 +120,26 @@ EOF
>  	UCIDEF_LEDS_CHANGED=1
>  }
>  
> +ucidef_set_led_timer() {
> +	local cfg="led_$1"
> +	local name=$2
> +	local sysfs=$3
> +	local delayon=$4
> +	local delayoff=$5
> +
> +	uci -q get system.$cfg && return 0
> +
> +	uci batch <<EOF
> +set system.$cfg='led'
> +set system.$cfg.name='$name'
> +set system.$cfg.sysfs='$sysfs'
> +set system.$cfg.trigger='timer'
> +set system.$cfg.delayon='$delayon'
> +set system.$cfg.delayoff='$delayoff'
> +EOF
> +	UCIDEF_LEDS_CHANGED=1
> +}
> +
>  ucidef_set_rssimon() {
>  	local dev="$1"
>  	local refresh="$2"
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From blogic at openwrt.org  Tue Jan 20 09:00:20 2015
From: blogic at openwrt.org (John Crispin)
Date: Tue, 20 Jan 2015 15:00:20 +0100
Subject: [OpenWrt-Devel] [PATCH 1/2] target: kirkwood: fix leds defaults
 config
In-Reply-To: <54BE55EA.30609@doukki.net>
References: <1419043909-3006-1-git-send-email-dreagle@doukki.net>
 <54BE55EA.30609@doukki.net>
Message-ID: <54BE5F74.80605@openwrt.org>

r44000 & r44007 ??




On 20/01/2015 14:19, drEagle wrote:
> Hi Luka,
> 
> Is this patch missed or lost ? I do not find any trace at
> patchworks.
> 
> Do you need that I resubmit it ?
> 
> Regards, G?rald
> 
> Le 20/12/2014 03:51, Gerald Kerma a ?crit :
>> Fix missing parameters in 01_leds
>> 
>> Signed-off-by: Gerald Kerma <dreagle at doukki.net> --- 
>> .../kirkwood/base-files/etc/uci-defaults/01_leds   | 22
>> +++++++++++----------- 1 file changed, 11 insertions(+), 11
>> deletions(-)
>> 
>> diff --git
>> a/target/linux/kirkwood/base-files/etc/uci-defaults/01_leds
>> b/target/linux/kirkwood/base-files/etc/uci-defaults/01_leds index
>> 51fb4d8..ba4d569 100644 ---
>> a/target/linux/kirkwood/base-files/etc/uci-defaults/01_leds +++
>> b/target/linux/kirkwood/base-files/etc/uci-defaults/01_leds @@
>> -10,30 +10,30 @@ board=$(kirkwood_board_name)
>> 
>> case "$board" in "dockstar") -	ucidef_set_led_default "health"
>> "status:green:health" "1" -	ucidef_set_led_default "fault"
>> "status:orange:fault" "1" +	ucidef_set_led_default "health"
>> "health" "status:green:health" "1" +	ucidef_set_led_default
>> "fault" "fault" "status:orange:fault" "1" ;; "ea3500") -
>> ucidef_set_led_default "power" "ea3500:green:power" "1" +
>> ucidef_set_led_default "power" "power" "ea3500:green:power" "1" 
>> ;; "ea4500") -	ucidef_set_led_default "health"
>> "ea4500:white:health" "1" -	ucidef_set_led_default "pulse"
>> "ea4500:white:pulse" "1" +	ucidef_set_led_default "health"
>> "health" "ea4500:white:health" "1" +	ucidef_set_led_default
>> "pulse" "pulse" "ea4500:white:pulse" "1" ;; "ib62x0") -
>> ucidef_set_led_default "health" "ib62x0:green:os" "1" -
>> ucidef_set_led_default "fault" "ib62x0:red:os" "1" +
>> ucidef_set_led_default "health" "health" "ib62x0:green:os" "1" +
>> ucidef_set_led_default "fault" "fault" "ib62x0:red:os" "1" ;; 
>> "pogo_e02") -	ucidef_set_led_default "health"
>> "status:green:health" "1" -	ucidef_set_led_default "fault"
>> "status:orange:fault" "1" +	ucidef_set_led_default "health"
>> "health" "status:green:health" "1" +	ucidef_set_led_default
>> "fault" "fault" "status:orange:fault" "1" ;; 
>> "guruplug-server-plus") -	ucidef_set_led_timer "health"
>> "guruplug:red:health" "200" "800" +	ucidef_set_led_timer "health"
>> "health" "guruplug:red:health" "200" "800" ;; "sheevaplug" | \ 
>> "sheevaplug-esata") -	ucidef_set_led_timer "health"
>> "sheevaplug:blue:health" "200" "800" +	ucidef_set_led_timer
>> "health" "health" "sheevaplug:blue:health" "200" "800" ;; *) ;;
>> 
> _______________________________________________ openwrt-devel
> mailing list openwrt-devel at lists.openwrt.org 
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From ben.mulvihill at gmail.com  Tue Jan 20 09:44:56 2015
From: ben.mulvihill at gmail.com (Ben Mulvihill)
Date: Tue, 20 Jan 2015 15:44:56 +0100
Subject: [OpenWrt-Devel] uboot-lantiq cgu settings for ramboot image
In-Reply-To: <CACUy__WQYvxmH1vD5S3oR4BnGT9dStUe86aLDAZTJZf8B61P2A@mail.gmail.com>
References: <1421664368.25187.18.camel@merveille.lan>
 <54BCEFD1.6010902@conorogorman.net>
 <1421678697.25187.27.camel@merveille.lan>
 <CACUy__U3gJ-M6Hz7A_GTewGaTJ+FK4fiZXANbxhLmmXt_0SM=g@mail.gmail.com>
 <1421691666.25187.46.camel@merveille.lan>
 <1421710757.25187.55.camel@merveille.lan>
 <1421753325.25187.58.camel@merveille.lan>
 <CACUy__WQYvxmH1vD5S3oR4BnGT9dStUe86aLDAZTJZf8B61P2A@mail.gmail.com>
Message-ID: <1421765096.25187.77.camel@merveille.lan>

On Tue, 2015-01-20 at 14:05 +0100, Daniel Schwierzeck wrote:
> 2015-01-20 12:28 GMT+01:00 Ben Mulvihill <ben.mulvihill at gmail.com>:
> 
> >
> > Some of the bitshifting in arch/mips/cpu/mips32/arx100/cgu.c is 1
> > out. A patch along these lines should fix it:
> 
> yes, the code is wrong. I have prepared a patch. Thanks for fixing.
> 
Thank you. 

The linux code in arch/mips/lantiq/xway/clk.c is wrong too I think.
Shall I submit a patch to make the functions there return the same 
values as the uboot equivalents?

Also, just as a matter of interest, what does CGU_SYS_PPESEL_250_MHZ 
actually do? What does PPE stand for?

Thanks,

Ben
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From luka at openwrt.org  Tue Jan 20 10:10:19 2015
From: luka at openwrt.org (Luka Perkov)
Date: Tue, 20 Jan 2015 16:10:19 +0100
Subject: [OpenWrt-Devel] [PATCH 2/2] package: add timer led function
In-Reply-To: <54BE5609.2050505@doukki.net>
References: <1419043909-3006-1-git-send-email-dreagle@doukki.net>
 <1419043909-3006-2-git-send-email-dreagle@doukki.net>
 <54BE5609.2050505@doukki.net>
Message-ID: <20150120151019.GA5920@t530.lan>

Hi Gerald,

On Tue, Jan 20, 2015 at 02:20:09PM +0100, drEagle wrote:
> Same with this another patch.
> Is it missed or lost ?
> I do not find any trace at patchworks.
> 
> Do you need that I resubmit it ?

Both patches have been merged. Please re-sync your tree.

Luka
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From daniel.schwierzeck at gmail.com  Tue Jan 20 10:13:21 2015
From: daniel.schwierzeck at gmail.com (Daniel Schwierzeck)
Date: Tue, 20 Jan 2015 16:13:21 +0100
Subject: [OpenWrt-Devel] uboot-lantiq cgu settings for ramboot image
In-Reply-To: <1421765096.25187.77.camel@merveille.lan>
References: <1421664368.25187.18.camel@merveille.lan>
 <54BCEFD1.6010902@conorogorman.net>
 <1421678697.25187.27.camel@merveille.lan>
 <CACUy__U3gJ-M6Hz7A_GTewGaTJ+FK4fiZXANbxhLmmXt_0SM=g@mail.gmail.com>
 <1421691666.25187.46.camel@merveille.lan>
 <1421710757.25187.55.camel@merveille.lan>
 <1421753325.25187.58.camel@merveille.lan>
 <CACUy__WQYvxmH1vD5S3oR4BnGT9dStUe86aLDAZTJZf8B61P2A@mail.gmail.com>
 <1421765096.25187.77.camel@merveille.lan>
Message-ID: <CACUy__Vf8w22x2MSjv8xShA6HaXA+LXTzmxs5hYLxieK6a7s+A@mail.gmail.com>

2015-01-20 15:44 GMT+01:00 Ben Mulvihill <ben.mulvihill at gmail.com>:
> On Tue, 2015-01-20 at 14:05 +0100, Daniel Schwierzeck wrote:
>> 2015-01-20 12:28 GMT+01:00 Ben Mulvihill <ben.mulvihill at gmail.com>:
>>
>> >
>> > Some of the bitshifting in arch/mips/cpu/mips32/arx100/cgu.c is 1
>> > out. A patch along these lines should fix it:
>>
>> yes, the code is wrong. I have prepared a patch. Thanks for fixing.
>>
> Thank you.
>
> The linux code in arch/mips/lantiq/xway/clk.c is wrong too I think.
> Shall I submit a patch to make the functions there return the same
> values as the uboot equivalents?

only ltq_ar9_fpi_hz() should be fixed. If bit 0 is set, than DDR/FPI
clock is 1/3 of SYS clock, otherwise 1/2

>
> Also, just as a matter of interest, what does CGU_SYS_PPESEL_250_MHZ
> actually do? What does PPE stand for?
>

it means Packet Processing Engine. It is a separate on-chip CPU for
network offloading functions which only runs with a propietary
firmware from Lantiq. On AR9 the PPE clock is fixed to 250 MHz. The HW
manual says the according bit in CGU_SYS register should be set but
maybe this could be ignored.

-- 
- Daniel
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From luigi.tarenga at gmail.com  Tue Jan 20 10:42:25 2015
From: luigi.tarenga at gmail.com (Luigi Tarenga)
Date: Tue, 20 Jan 2015 16:42:25 +0100
Subject: [OpenWrt-Devel] [PATCH v4] add support for TL-WA701ND v2
Message-ID: <1421768545-31157-1-git-send-email-luigi.tarenga@gmail.com>

Signed-off-by: Luigi Tarenga <luigi.tarenga at gmail.com>
---
version 4. this version is against trunk. version 3 was
against BB (sorry I forgot to work on correct branch).

I retested flashing from BB using mtd and from the stock firmware. 

thanks for your help and patience
Luigi
---
 target/linux/ar71xx/base-files/etc/diag.sh         |   1 +
 .../ar71xx/base-files/etc/uci-defaults/01_leds     |   5 +
 .../ar71xx/base-files/etc/uci-defaults/02_network  |   1 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh       |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh      |   1 +
 target/linux/ar71xx/config-3.14                    |   1 +
 .../files/arch/mips/ath79/mach-tl-wa701nd-v2.c     | 116 +++++++++++++++++++++
 target/linux/ar71xx/image/Makefile                 |   4 +-
 .../737-MIPS-ath79-add-TL-WA701NDv2-support.patch  |  45 ++++++++
 tools/firmware-utils/src/mktplinkfw.c              |   6 ++
 10 files changed, 182 insertions(+), 1 deletion(-)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa701nd-v2.c
 create mode 100644 target/linux/ar71xx/patches-3.14/737-MIPS-ath79-add-TL-WA701NDv2-support.patch

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
index 06b96a3..7cb3b6f 100755
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -210,6 +210,7 @@ get_status_led() {
 	tl-mr3220-v2 | \
 	tl-mr3420 | \
 	tl-mr3420-v2 | \
+	tl-wa701nd-v2 | \
 	tl-wa801nd-v2 | \
 	tl-wa901nd | \
 	tl-wa901nd-v2 | \
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index 296ea57..bfd9495 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -310,6 +310,11 @@ tl-wa850re)
 	ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "tp-link:blue:signal5" "wlan0" "80" "100" "-79" "13"
 	;;
 
+tl-wa701nd-v2)
+	ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
+	ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
+	;;
+
 tl-wa860re)
 	ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
 	ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index b4b6cb3..5f1704f 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -324,6 +324,7 @@ tl-mr13u |\
 tl-mr3020 |\
 tl-mr3040 |\
 tl-mr3040-v2 |\
+tl-wa701nd-v2 |\
 tl-wa750re |\
 tl-wa850re |\
 tl-wa830re-v2 |\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 387de72..63f90b5 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -636,6 +636,9 @@ ar71xx_board_detect() {
 	*"TL-MR3420 v2")
 		name="tl-mr3420-v2"
 		;;
+	*"TL-WA701ND v2")
+		name="tl-wa701nd-v2"
+		;;
 	*TL-WA750RE)
 		name="tl-wa750re"
 		;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 6dabf4e..d373699 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -309,6 +309,7 @@ platform_check_image() {
 	tl-mr3220-v2 | \
 	tl-mr3420 | \
 	tl-mr3420-v2 | \
+	tl-wa701nd-v2 | \
 	tl-wa7510n | \
 	tl-wa750re | \
 	tl-wa850re | \
diff --git a/target/linux/ar71xx/config-3.14 b/target/linux/ar71xx/config-3.14
index b6fa4ab..82b2d13 100644
--- a/target/linux/ar71xx/config-3.14
+++ b/target/linux/ar71xx/config-3.14
@@ -96,6 +96,7 @@ CONFIG_ATH79_MACH_TL_MR11U=y
 CONFIG_ATH79_MACH_TL_MR13U=y
 CONFIG_ATH79_MACH_TL_MR3020=y
 CONFIG_ATH79_MACH_TL_MR3X20=y
+CONFIG_ATH79_MACH_TL_WA701ND_V2=y
 CONFIG_ATH79_MACH_TL_WA830RE_V2=y
 CONFIG_ATH79_MACH_TL_WA901ND=y
 CONFIG_ATH79_MACH_TL_WA901ND_V2=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa701nd-v2.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa701nd-v2.c
new file mode 100644
index 0000000..aab92b3
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa701nd-v2.c
@@ -0,0 +1,116 @@
+/*
+ *  TP-LINK TL-WA701ND v2 board support
+ *
+ *  Copyright (C) 2015 Luigi Tarenga <luigi.tarenga at gmail.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License version 2 as published
+ *  by the Free Software Foundation.
+ */
+
+#include <linux/gpio.h>
+
+#include <asm/mach-ath79/ath79.h>
+
+#include "dev-eth.h"
+#include "dev-gpio-buttons.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-usb.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+
+#define TL_WA701NDV2_GPIO_LED_WLAN	0
+#define TL_WA701NDV2_GPIO_LED_QSS	1
+#define TL_WA701NDV2_GPIO_LED_LAN	17
+#define TL_WA701NDV2_GPIO_LED_SYSTEM	27
+
+#define TL_WA701NDV2_GPIO_BTN_RESET	11
+#define TL_WA701NDV2_GPIO_BTN_QSS	26
+
+#define TL_WA701NDV2_GPIO_USB_POWER	8
+
+#define TL_WA701NDV2_KEYS_POLL_INTERVAL	20	/* msecs */
+#define TL_WA701NDV2_KEYS_DEBOUNCE_INTERVAL	(3 * TL_WA701NDV2_KEYS_POLL_INTERVAL)
+
+static const char *tl_wa701ndv2_part_probes[] = {
+	"tp-link",
+	NULL,
+};
+
+static struct flash_platform_data tl_wa701ndv2_flash_data = {
+	.part_probes	= tl_wa701ndv2_part_probes,
+};
+
+static struct gpio_led tl_wa701ndv2_leds_gpio[] __initdata = {
+	{
+		.name		= "tp-link:green:wlan",
+		.gpio		= TL_WA701NDV2_GPIO_LED_WLAN,
+		.active_low	= 0,
+	}, {
+		.name		= "tp-link:green:qss",
+		.gpio		= TL_WA701NDV2_GPIO_LED_QSS,
+		.active_low	= 0,
+	}, {
+		.name		= "tp-link:green:lan",
+		.gpio		= TL_WA701NDV2_GPIO_LED_LAN,
+		.active_low	= 1,
+	}, {
+		.name		= "tp-link:green:system",
+		.gpio		= TL_WA701NDV2_GPIO_LED_SYSTEM,
+		.active_low	= 1,
+        }
+};
+
+static struct gpio_keys_button tl_wa701ndv2_gpio_keys[] __initdata = {
+	{
+		.desc		= "reset",
+		.type		= EV_KEY,
+		.code		= KEY_RESTART,
+		.debounce_interval = TL_WA701NDV2_KEYS_DEBOUNCE_INTERVAL,
+		.gpio		= TL_WA701NDV2_GPIO_BTN_RESET,
+		.active_low	= 0,
+	} , {
+                .desc		= "qss",
+                .type		= EV_KEY,
+                .code		= KEY_WPS_BUTTON,
+                .debounce_interval = TL_WA701NDV2_KEYS_DEBOUNCE_INTERVAL,
+                .gpio		= TL_WA701NDV2_GPIO_BTN_QSS,
+                .active_low	= 0,
+        }
+
+};
+
+static void __init tl_wa701ndv2_setup(void)
+{
+	u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
+	u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
+
+	/* disable PHY_SWAP and PHY_ADDR_SWAP bits */
+	ath79_setup_ar933x_phy4_switch(false, false);
+
+	ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wa701ndv2_leds_gpio),
+				 tl_wa701ndv2_leds_gpio);
+
+	ath79_register_gpio_keys_polled(-1, TL_WA701NDV2_KEYS_POLL_INTERVAL,
+					ARRAY_SIZE(tl_wa701ndv2_gpio_keys),
+					tl_wa701ndv2_gpio_keys);
+
+	gpio_request_one(TL_WA701NDV2_GPIO_USB_POWER,
+			 GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
+			 "USB power");
+	ath79_register_usb();
+
+	ath79_register_m25p80(&tl_wa701ndv2_flash_data);
+	ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
+	/* ath79_init_mac(ath79_eth1_data.mac_addr, mac, -1); */
+
+	ath79_register_mdio(0, 0x0);
+	ath79_register_eth(0);
+	ath79_register_eth(1);
+
+	ath79_register_wmac(ee, mac);
+}
+
+MIPS_MACHINE(ATH79_MACH_TL_WA701ND_V2, "TL-WA701ND-v2",
+	     "TP-LINK TL-WA701ND v2", tl_wa701ndv2_setup);
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
index ef52f46..68504b7 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -1352,7 +1352,7 @@ $(eval $(call SingleProfile,TPLINKOLD,squashfs-only,TLWR841NV15,tl-wr841nd-v1.5,
 $(eval $(call SingleProfile,TPLINK,64kraw,RNXN360RT,rnx-n360rt,TL-WR941ND,ttyS0,115200,0x09410002,0x00420001,4M))
 $(eval $(call SingleProfile,TPLINK,64kraw,TLMR3220V1,tl-mr3220-v1,TL-MR3220,ttyS0,115200,0x32200001,1,4M))
 $(eval $(call SingleProfile,TPLINK,64kraw,TLMR3420V1,tl-mr3420-v1,TL-MR3420,ttyS0,115200,0x34200001,1,4M))
-$(eval $(call SingleProfile,TPLINK,64kraw,TLWA701,tl-wa701n-v1,TL-WA901ND,ttyS0,115200,0x07010001,1,4M))
+$(eval $(call SingleProfile,TPLINK,64kraw,TLWA701NV1,tl-wa701n-v1,TL-WA901ND,ttyS0,115200,0x07010001,1,4M))
 $(eval $(call SingleProfile,TPLINK,64kraw,TLWA730REV1,tl-wa730rev1,TL-WA901ND,ttyS0,115200,0x07300001,1,4M))
 $(eval $(call SingleProfile,TPLINK,64kraw,TLWA7510NV1,tl-wa7510n,TL-WA7510N,ttyS0,115200,0x75100001,1,4M))
 $(eval $(call SingleProfile,TPLINK,64kraw,TLWA801NV1,tl-wa801nd-v1,TL-WA901ND,ttyS0,115200,0x08010001,1,4M))
@@ -1389,6 +1389,7 @@ $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLMR3040V1,tl-mr3040-v1,TL-MR3040
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLMR3040V2,tl-mr3040-v2,TL-MR3040-v2,ttyATH0,115200,0x30400002,1,4Mlzma))
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLMR3220V2,tl-mr3220-v2,TL-MR3220-v2,ttyATH0,115200,0x32200002,1,4Mlzma))
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLMR3420V2,tl-mr3420-v2,TL-MR3420-v2,ttyS0,115200,0x34200002,1,4Mlzma))
+$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWA701NV2,tl-wa701nd-v2,TL-WA701ND-v2,ttyATH0,115200,0x07010002,1,4Mlzma))
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR703,tl-wr703n-v1,TL-WR703N,ttyATH0,115200,0x07030101,1,4Mlzma))
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR710,tl-wr710n-v1,TL-WR710N,ttyATH0,115200,0x07100001,1,8Mlzma))
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR720NV3,tl-wr720n-v3,TL-WR720N-v3,ttyATH0,115200,0x07200103,1,4Mlzma))
@@ -1472,6 +1473,7 @@ $(eval $(call MultiProfile,TLMR11U,TLMR11UV1 TLMR11UV2))
 $(eval $(call MultiProfile,TLMR3040,TLMR3040V1 TLMR3040V2))
 $(eval $(call MultiProfile,TLMR3220,TLMR3220V1 TLMR3220V2))
 $(eval $(call MultiProfile,TLMR3420,TLMR3420V1 TLMR3420V2))
+$(eval $(call MultiProfile,TLWA701,TLWA701NV1 TLWA701NV2))
 $(eval $(call MultiProfile,TLWA730RE,TLWA730REV1))
 $(eval $(call MultiProfile,TLWA801,TLWA801NV1 TLWA801NV2))
 $(eval $(call MultiProfile,TLWA830,TLWA830RV1 TLWA830RV2))
diff --git a/target/linux/ar71xx/patches-3.14/737-MIPS-ath79-add-TL-WA701NDv2-support.patch b/target/linux/ar71xx/patches-3.14/737-MIPS-ath79-add-TL-WA701NDv2-support.patch
new file mode 100644
index 0000000..0796c05
--- /dev/null
+++ b/target/linux/ar71xx/patches-3.14/737-MIPS-ath79-add-TL-WA701NDv2-support.patch
@@ -0,0 +1,45 @@
+Index: linux-3.14.28/arch/mips/ath79/Kconfig
+===================================================================
+--- linux-3.14.28.orig/arch/mips/ath79/Kconfig
++++ linux-3.14.28/arch/mips/ath79/Kconfig
+@@ -803,6 +803,16 @@ config ATH79_MACH_TL_WAX50RE
+ 	select ATH79_DEV_M25P80
+ 	select ATH79_DEV_WMAC
+ 
++config ATH79_MACH_TL_WA701ND_V2
++	bool "TP-LINK TL-WA701ND v2 support"
++	select SOC_AR933X
++	select ATH79_DEV_ETH
++	select ATH79_DEV_GPIO_BUTTONS
++	select ATH79_DEV_LEDS_GPIO
++	select ATH79_DEV_M25P80
++	select ATH79_DEV_USB
++	select ATH79_DEV_WMAC
++
+ config ATH79_MACH_TL_WA830RE_V2
+ 	bool "TP-LINK TL-WA830RE v2 support"
+ 	select SOC_AR934X
+Index: linux-3.14.28/arch/mips/ath79/Makefile
+===================================================================
+--- linux-3.14.28.orig/arch/mips/ath79/Makefile
++++ linux-3.14.28/arch/mips/ath79/Makefile
+@@ -109,6 +109,7 @@ obj-$(CONFIG_ATH79_MACH_TL_MR13U)	+= mac
+ obj-$(CONFIG_ATH79_MACH_TL_MR3020)	+= mach-tl-mr3020.o
+ obj-$(CONFIG_ATH79_MACH_TL_MR3X20)	+= mach-tl-mr3x20.o
+ obj-$(CONFIG_ATH79_MACH_TL_WAX50RE)     += mach-tl-wax50re.o
++obj-$(CONFIG_ATH79_MACH_TL_WA701ND_V2)	+= mach-tl-wa701nd-v2.o
+ obj-$(CONFIG_ATH79_MACH_TL_WA830RE_V2)	+= mach-tl-wa830re-v2.o
+ obj-$(CONFIG_ATH79_MACH_TL_WA901ND)	+= mach-tl-wa901nd.o
+ obj-$(CONFIG_ATH79_MACH_TL_WA901ND_V2)	+= mach-tl-wa901nd-v2.o
+Index: linux-3.14.28/arch/mips/ath79/machtypes.h
+===================================================================
+--- linux-3.14.28.orig/arch/mips/ath79/machtypes.h
++++ linux-3.14.28/arch/mips/ath79/machtypes.h
+@@ -126,6 +126,7 @@ enum ath79_mach_type {
+ 	ATH79_MACH_TL_MR3220_V2,	/* TP-LINK TL-MR3220 v2 */
+ 	ATH79_MACH_TL_MR3420,		/* TP-LINK TL-MR3420 */
+ 	ATH79_MACH_TL_MR3420_V2,	/* TP-LINK TL-MR3420 v2 */
++	ATH79_MACH_TL_WA701ND_V2,       /* TP-LINK TL-WA701ND v2 */
+ 	ATH79_MACH_TL_WA750RE,		/* TP-LINK TL-WA750RE */
+ 	ATH79_MACH_TL_WA7510N_V1,	/* TP-LINK TL-WA7510N v1*/
+ 	ATH79_MACH_TL_WA850RE,		/* TP-LINK TL-WA850RE */
diff --git a/tools/firmware-utils/src/mktplinkfw.c b/tools/firmware-utils/src/mktplinkfw.c
index a6aab59..0a5e4c3 100644
--- a/tools/firmware-utils/src/mktplinkfw.c
+++ b/tools/firmware-utils/src/mktplinkfw.c
@@ -40,6 +40,7 @@
 #define HWID_TL_MR3420_V1	0x34200001
 #define HWID_TL_MR3420_V2	0x34200002
 #define HWID_TL_WA701N_V1	0x07010001
+#define HWID_TL_WA701N_V2	0x07010002
 #define HWID_TL_WA7510N_V1	0x75100001
 #define HWID_TL_WA801ND_V1	0x08010001
 #define HWID_TL_WA830RE_V1	0x08300010
@@ -254,6 +255,11 @@ static struct board_info boards[] = {
 		.hw_rev		= 1,
 		.layout_id	= "4M",
 	}, {
+		.id		= "TL-WA701Nv2",
+		.hw_id		= HWID_TL_WA701N_V2,
+		.hw_rev		= 1,
+		.layout_id	= "4Mlzma",
+	}, {
 		.id		= "TL-WA7510N",
 		.hw_id		= HWID_TL_WA7510N_V1,
 		.hw_rev		= 1,
-- 
2.2.2
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From blogic at openwrt.org  Tue Jan 20 10:54:10 2015
From: blogic at openwrt.org (John Crispin)
Date: Tue, 20 Jan 2015 16:54:10 +0100
Subject: [OpenWrt-Devel] [PATCH v4] add support for TL-WA701ND v2
In-Reply-To: <1421768545-31157-1-git-send-email-luigi.tarenga@gmail.com>
References: <1421768545-31157-1-git-send-email-luigi.tarenga@gmail.com>
Message-ID: <54BE7A22.4070508@openwrt.org>

I pushed the patch to BB and trunk and added the missing "ar71xx:"
prefix to the subject.
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From eschultz at prplfoundation.org  Tue Jan 20 12:11:26 2015
From: eschultz at prplfoundation.org (Eric Schultz)
Date: Tue, 20 Jan 2015 11:11:26 -0600
Subject: [OpenWrt-Devel] [PATCH] [scripts] feeds: search packages by
	license
In-Reply-To: <54BDF858.300@openwrt.org>
References: <5494AB04.4090005@prplfoundation.org> <54BDF858.300@openwrt.org>
Message-ID: <CAMkzgA5GJyAxW1fTskcC0qCv+SBKO3vw2XKf=yjL-_KvXKGoTA@mail.gmail.com>

Sure, will do.

On Tue, Jan 20, 2015 at 12:40 AM, John Crispin <blogic at openwrt.org> wrote:
>
>
> On 19/12/2014 23:47, Eric Schultz wrote:
>> Currently, the feeds scripts provides no way to filter by packages
>> by license or no license. This patch adds a search feature to feeds
>> which can be used to search packages by license or by no license.
>>
>> Signed-off-by: Eric Schultz <eschultz at prplfoundation.org>
>>
>> --- scripts/feeds | 90
>> ++++++++++++++++++++++++++++++++++++++++++++++++++--------- 1 file
>> changed, 77 insertions(+), 13 deletions(-)
>>
>
> [...]
>
>>
>> @@ -642,6 +704,8 @@ Commands: search [options] <substring>: Search
>> for a package Options: -r <feedname>: Only search in this feed +
>> -l <license>:  Include packages with this license +                   -n:
>> Include packages without a license tag
>>
>
> if i read this correctly the current behavior is changed which will
> inevitably lead to a trillion tickets with "package XYZ is missing"
>
> can you change the option to "Only include packages with a license tag"
>
>
>
>
>
>
>> uninstall -a|<package>: Uninstall a package Options:
>>



-- 
Eric Schultz, Community Manager, prpl Foundation
http://www.prplfoundation.org
eschultz at prplfoundation.org
cell: 920-539-0404
skype: ericschultzwi
@EricPrpl
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From cezary.jackiewicz at gmail.com  Tue Jan 20 12:13:03 2015
From: cezary.jackiewicz at gmail.com (Cezary Jackiewicz)
Date: Tue, 20 Jan 2015 18:13:03 +0100
Subject: [OpenWrt-Devel] [PATCH] ramips: add support for Tenda 3G150B
Message-ID: <20150120181303.527050b7@samsung>

Add suport for Tenda 3G150B:
- cpu: Ralink RT5350F
- flash: 4MB
- ram: 32MB
- 1x USB 2.0
- 1x RJ45 
- one reset button
- battery powered (BP-4L, 3.7V 1450mAh)

Signed-off-by: Cezary Jackiewicz <cezary.jackiewicz at gmail.com>
---

diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds
index 8695cde..af3dddc 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -24,6 +24,7 @@ case $board in
 	3g-6200nl)
 		set_wifi_led "edimax:green:wlan"
 		;;
+	3g150b |\
 	3g300m)
 		set_usb_led "tenda:blue:3g"
 		;;
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
index b440fb3..fd5a170 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -43,6 +43,7 @@ ramips_setup_interfaces()
 		ucidef_add_switch_vlan "switch0" "1" "0 6t"
 		;;
 
+	3g150b | \
 	3g300m | \
 	w150m | \
 	all0256n | \
diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh
index 1693e9d..808177b 100755
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -9,7 +9,7 @@ get_status_led() {
 	3g-6200n)
 		status_led="edimax:green:power"
 		;;
-	3g300m | w150m)
+	3g150b | 3g300m | w150m)
 		status_led="tenda:blue:ap"
 		;;
 	ai-br100)
diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh
index 720b137..61dc734 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -313,6 +313,9 @@ ramips_board_detect() {
 	*"Tenda 3G300M")
 		name="3g300m"
 		;;
+	*"Tenda 3G150B")
+		name="3g150b"
+		;;
 	*"Tenda W306R V2.0")
 		name="w306r-v20"
 		;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 7c17211..24c79d9 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -16,6 +16,7 @@ platform_check_image() {
 	case "$board" in
 	3g-6200n | \
 	3g-6200nl | \
+	3g150b | \
 	3g300m | \
 	a5-v11 | \
 	air3gii | \
diff --git a/target/linux/ramips/dts/3G150B.dts b/target/linux/ramips/dts/3G150B.dts
new file mode 100644
index 0000000..bdcca71
--- /dev/null
+++ b/target/linux/ramips/dts/3G150B.dts
@@ -0,0 +1,114 @@
+/dts-v1/;
+
+/include/ "rt5350.dtsi"
+
+/ {
+	compatible = "3G150B", "ralink,rt5350-soc";
+	model = "Tenda 3G150B";
+
+	palmbus at 10000000 {
+		spi at b00 {
+			status = "okay";
+			m25p80 at 0 {
+				#address-cells = <1>;
+				#size-cells = <1>;
+				compatible = "s25fl064k";
+				reg = <0 0>;
+				linux,modalias = "m25p80", "s25fl064k";
+				spi-max-frequency = <10000000>;
+
+				partition at 0 {
+					label = "u-boot";
+					reg = <0x0 0x30000>;
+					read-only;
+				};
+
+				partition at 30000 {
+					label = "u-boot-env";
+					reg = <0x30000 0x10000>;
+					read-only;
+				};
+
+				factory: partition at 40000 {
+					label = "factory";
+					reg = <0x40000 0x10000>;
+					read-only;
+				};
+
+				partition at 50000 {
+					label = "firmware";
+					reg = <0x50000 0x3b0000>;
+				};
+			};
+		};
+		gpio1: gpio at 660 {
+			status = "okay";
+		};
+	};
+
+	pinctrl {
+		state_default: pinctrl0 {
+			gpio {
+				ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf", "led";
+				ralink,function = "gpio";
+			};
+		};
+	};
+
+	ethernet at 10100000 {
+		mtd-mac-address = <&factory 0x4>;
+	};
+
+	esw at 10110000 {
+		ralink,portmap = <0x2f>;
+	};
+
+	wmac at 10180000 {
+		ralink,mtd-eeprom = <&factory 0>;
+		ralink,led-polarity = <1>;
+	};
+
+	ehci at 101c0000 {
+		status = "okay";
+	};
+
+	ohci at 101c1000 {
+		status = "okay";
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+		ap {
+			label = "tenda:blue:ap";
+			gpios = <&gpio0 7 1>;
+		};
+		3g {
+			label = "tenda:blue:3g";
+			gpios = <&gpio0 14 1>;
+		};
+	};
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		reset {
+			label = "reset";
+			gpios = <&gpio0 0 1>;
+			linux,code = <0x198>;
+		};
+	};
+
+	gpio_export {
+		compatible = "gpio-export";
+		#size-cells = <0>;
+
+		usb {
+			gpio-export,name = "usb";
+			gpio-export,output = <1>;
+			gpios = <&gpio0 13 0>;
+		};
+	};
+
+};
diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile
index f935a95..908ff2c 100644
--- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile
@@ -549,6 +549,8 @@ Image/Build/Profile/M4=$(call BuildFirmware/PorayDualSize/$(1),$(1),m4,M4)
 Image/Build/Profile/MOFI3500-3GN=$(call BuildFirmware/Default8M/$(1),$(1),mofi3500-3gn,MOFI3500-3GN)
 
 # Kernel name should be "Linux Kernel Image" to make the OpenWrt image installable from factory Web UI
+Image/Build/Profile/3G150B=$(call BuildFirmware/Default4M/$(1),$(1),3g150b,3G150B,Linux Kernel Image)
+
 Image/Build/Profile/MPRA1=$(call BuildFirmware/Default4M/$(1),$(1),mpr-a1,MPRA1,Linux Kernel Image)
 Image/Build/Profile/MPRA2=$(call BuildFirmware/Default8M/$(1),$(1),mpr-a2,MPRA2,Linux Kernel Image)
 
@@ -676,6 +678,7 @@ ifeq ($(SUBTARGET),rt305x)
 define Image/Build/Profile/Default
 	$(call Image/Build/Profile/3G6200N,$(1))
 	$(call Image/Build/Profile/3G6200NL,$(1))
+	$(call Image/Build/Profile/3G150B,$(1))
 	$(call Image/Build/Profile/3G300M,$(1))
 	$(call Image/Build/Profile/A5-11,$(1))
 	$(call Image/Build/Profile/AIR3GII,$(1))
diff --git a/target/linux/ramips/rt305x/profiles/tenda.mk b/target/linux/ramips/rt305x/profiles/tenda.mk
index d9d94cf..36ba822 100644
--- a/target/linux/ramips/rt305x/profiles/tenda.mk
+++ b/target/linux/ramips/rt305x/profiles/tenda.mk
@@ -5,6 +5,19 @@
 # See /LICENSE for more information.
 #
 
+define Profile/3G150B
+	NAME:=Tenda 3G150B
+	PACKAGES:=\
+		kmod-usb-core kmod-usb-dwc2 \
+		kmod-ledtrig-usbdev
+endef
+
+define Profile/3G150B/Description
+	Package set for Tenda 3G150B board
+endef
+
+$(eval $(call Profile,3G150B))
+
 define Profile/3G300M
 	NAME:=Tenda 3G300M
 	PACKAGES:=\


-- 
Pozdrawiam,
 Cezary Jackiewicz
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From cezary.jackiewicz at gmail.com  Tue Jan 20 12:44:14 2015
From: cezary.jackiewicz at gmail.com (Cezary Jackiewicz)
Date: Tue, 20 Jan 2015 18:44:14 +0100
Subject: [OpenWrt-Devel] [PATCH] fix typo in netifd.sh
Message-ID: <20150120184414.711139fe@samsung>

$ht variable is not passed. $htmode is.

With this, wpa_supplicant-phy0.conf contains htmode line if htmode is set in config.

Signed-off-by: Cezary Jackiewicz <cezary.jackiewicz at gmail.com>
---

diff --git a/package/network/services/hostapd/files/netifd.sh b/package/network/services/hostapd/files/netifd.sh
index d625709..436eee3 100644
--- a/package/network/services/hostapd/files/netifd.sh
+++ b/package/network/services/hostapd/files/netifd.sh
@@ -595,8 +595,7 @@ wpa_supplicant_add_network() {
 		append network_data "mcast_rate=$mc_rate" "$N$T"
 	}
 
-	local ht_str
-	[ -n "$ht" ] && append network_data "htmode=$ht" "$N$T"
+	[ -n "$htmode" ] && append network_data "htmode=$htmode" "$N$T"
 
 	cat >> "$_config" <<EOF
 network={


-- 
Pozdrawiam,
 Cezary Jackiewicz
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From champetier.etienne at gmail.com  Tue Jan 20 15:54:34 2015
From: champetier.etienne at gmail.com (Etienne Champetier)
Date: Tue, 20 Jan 2015 21:54:34 +0100
Subject: [OpenWrt-Devel] Buildbot "exception master shell command" (& broken
 packages not up to date)
Message-ID: <CAOdf3go8zDVfiugLpnNe0KAPcNyzw6cM9vseMoE1eOEGCXcL1w@mail.gmail.com>

Hi,

Buildbot seems to be running (
http://downloads.openwrt.org/snapshots/trunk/ar71xx/),
but there are exceptions shown in the web ui
http://buildbot.openwrt.org:8010/waterfall

Also broken package doesn't seems up to date
http://buildbot.openwrt.org:8010/broken_packages/ar71xx/
(the last-modified of compile.txt in davfs2 is 12/01/15 for exemple)

Thanks for all your work
Etienne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150120/16f91530/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From eschultz at prplfoundation.org  Tue Jan 20 17:20:58 2015
From: eschultz at prplfoundation.org (Eric Schultz)
Date: Tue, 20 Jan 2015 16:20:58 -0600
Subject: [OpenWrt-Devel] [PATCH, v2] feeds: search packages by license
Message-ID: <54BED4CA.3070500@prplfoundation.org>

Currently, the feeds scripts provides no way to filter by packages by license or no license. 
This patch adds a search feature to feeds which can be used to search packages by license or by no license.

Calls to script/feeds which do not use the new -l or -n options should work the same as before.

Signed-off-by: Eric Schultz <eschultz at prplfoundation.org>
---
 scripts/feeds | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++---------
 1 file changed, 77 insertions(+), 13 deletions(-)

diff --git a/scripts/feeds b/scripts/feeds
index 31ad544..4bb4a3b 100755
--- a/scripts/feeds
+++ b/scripts/feeds
@@ -151,7 +151,7 @@ sub update_feed_via($$$$) {
 	my $name = shift;
 	my $src = shift;
 	my $relocate = shift;
-	
+
 	my $m = $update_method{$type};
 	my $localpath = "./feeds/$name";
 	my $safepath = $localpath;
@@ -173,7 +173,7 @@ sub update_feed_via($$$$) {
 	} else {
 		system("cd '$safepath'; $m->{'update'}") == 0 or return 1;
 	}
-	
+
 	return 0;
 }
 
@@ -206,41 +206,103 @@ sub get_installed() {
 
 sub search_feed {
 	my $feed = shift;
+	my $search_parameters = shift;
 	my @substr = @_;
+
 	my $display;
+	return unless @substr > 0 or $search_parameters->{use_params};
 
-	return unless @substr > 0;
 	get_feed($feed);
 	foreach my $name (sort { lc($a) cmp lc($b) } keys %$feed_package) {
+
 		my $pkg = $feed_package->{$name};
 		my $substr;
 		my $pkgmatch = 1;
 
 		next if $pkg->{vdepends};
-		foreach my $substr (@substr) {
-			my $match;
-			foreach my $key (qw(name title description src)) {
-				$pkg->{$key} and $substr and $pkg->{$key} =~ m/$substr/i and $match = 1;
-			}
-			$match or undef $pkgmatch;
-		};
+    if ( $search_parameters->{use_params})
+		{
+			$pkgmatch = do_package_tags_match($pkg, $search_parameters);
+		}
+
+    if (! $search_parameters->{use_params} or ( $search_parameters->{use_params} and $pkgmatch))
+		{
+			foreach my $substr (@substr) {
+				my $match;
+				foreach my $key (qw(name title description src)) {
+					$pkg->{$key} and $substr and $pkg->{$key} =~ m/$substr/i and $match = 1;
+				}
+
+				$match or undef $pkgmatch;
+			};
+		}
 		$pkgmatch and do {
 			$display or do {
 				print "Search results in feed '$feed':\n";
 				$display = 1;
 			};
-			printf "\%-25s\t\%s\n", $pkg->{name}, $pkg->{title};
+			my $output_print = format_search_parameter_output($pkg, $search_parameters);
+			printf "\%-20s\%s\%s\n", $pkg->{name}, $output_print, $pkg->{title};
 		};
 	}
 	return 0;
 }
 
+sub format_search_parameter_output
+{
+	my $pkg = shift;
+	my $search_parameters = shift;
+
+	my $output = "\t";
+
+	if (!$search_parameters->{use_params}) {
+		return $output;
+	}
+
+	if (defined($search_parameters->{license})) {
+		$output = $output . sprintf(("\%-10s\t"), $pkg->{license});
+	}
+
+	return $output;
+}
+
+sub do_package_tags_match {
+	my $pkg = shift;
+  my $parameterized_search = shift;
+
+
+	my $match = 0;
+	if ($pkg->{license} and $parameterized_search->{license}) {
+		my $substr = $parameterized_search->{license};
+		my @results = grep(/^\Q$substr\E.*$/i, split(/\s/, $pkg->{license}));
+
+		$match = @results > 0;
+	}
+
+	if ($parameterized_search->{no_license}) {
+		$match = !defined($pkg->{license});
+	}
+
+	return $match;
+}
+
 sub search {
 	my %opts;
 
-	getopt('r:', \%opts);
+	getopts('r:l:n', \%opts);
+	my %search_parameters;
+	if (defined($opts{l})) {
+		$search_parameters{license} = $opts{l};
+		$search_parameters{use_params} = 1;
+	}
+
+	if (defined($opts{n})) {
+		$search_parameters{no_license} = $opts{n};
+		$search_parameters{use_params} = 1;
+	}
+
 	foreach my $feed (@feeds) {
-		search_feed($feed->[1], @ARGV) if (!defined($opts{r}) or $opts{r} eq $feed->[1]);
+		search_feed($feed->[1], \%search_parameters, @ARGV) if (!defined($opts{r}) or $opts{r} eq $feed->[1]);
 	}
 }
 
@@ -642,6 +704,8 @@ Commands:
 	search [options] <substring>: Search for a package
 	Options:
 	    -r <feedname>: Only search in this feed
+	    -l <license>:  Only include packages with this license
+	    -n:	           Only include packages without a license tag
 
 	uninstall -a|<package>: Uninstall a package
 	Options:
-- 
2.1.0
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From wigyori at uid0.hu  Tue Jan 20 18:03:00 2015
From: wigyori at uid0.hu (Zoltan HERPAI)
Date: Wed, 21 Jan 2015 00:03:00 +0100
Subject: [OpenWrt-Devel] [PATCH v2 7/8] sunxi: add support for Lamobo R1
In-Reply-To: <20150120014857.GA12279@makrotopia.org>
References: <20150120014857.GA12279@makrotopia.org>
Message-ID: <54BEDEA4.7050607@uid0.hu>

Hi Daniel,

Comments inline:

Daniel Golle wrote:
> Partially based on patchset form Wang Yi <wangyi8848 at gmail.com> published
> on https://github.com/Lamobo/Lamobo-R1-OpenWrt as well as on Bananapi DTS.
>
> Signed-off-by: Daniel Golle <daniel at makrotopia.org>
> v2: swconfig needs to be built-in, switch is not detected properly otherwise
> ---
>  .../sunxi/base-files/etc/uci-defaults/02_network   |   6 +
>  target/linux/sunxi/base-files/lib/sunxi.sh         |   4 +
>  target/linux/sunxi/config-3.18                     |   6 +
>  target/linux/sunxi/image/Makefile                  |   7 +-
>  .../patches-3.18/302-dt-sun7i-add-lamobo-r1.patch  | 252 +++++++++++++++++++++
>  target/linux/sunxi/profiles/lamobo-r1.mk           |  19 ++
>  6 files changed, 293 insertions(+), 1 deletion(-)
>  mode change 100644 => 100755 target/linux/sunxi/image/Makefile
>  create mode 100644 target/linux/sunxi/patches-3.18/302-dt-sun7i-add-lamobo-r1.patch
>  create mode 100644 target/linux/sunxi/profiles/lamobo-r1.mk
>
> diff --git a/target/linux/sunxi/base-files/etc/uci-defaults/02_network b/target/linux/sunxi/base-files/etc/uci-defaults/02_network
> index 1a9b0ed..09db8d5 100644
> --- a/target/linux/sunxi/base-files/etc/uci-defaults/02_network
> +++ b/target/linux/sunxi/base-files/etc/uci-defaults/02_network
> @@ -16,6 +16,12 @@ case "$( sunxi_board_name )" in
>  "olinuxino"*)
>  	ucidef_set_interface_lan 'wlan0'
>  	;;
> +"lamobo-r1")
> +	ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
> +	ucidef_add_switch "switch0" "1" "1"
> +	ucidef_add_switch_vlan "switch0" "1" "4 0 1 2 8t"
> +	ucidef_add_switch_vlan "switch0" "2" "3 8t"
> +	;;
>  *)
>  	ucidef_set_interface_lan 'eth0'
>  	;;
> diff --git a/target/linux/sunxi/base-files/lib/sunxi.sh b/target/linux/sunxi/base-files/lib/sunxi.sh
> index d4dd9fe..444c7e9 100644
> --- a/target/linux/sunxi/base-files/lib/sunxi.sh
> +++ b/target/linux/sunxi/base-files/lib/sunxi.sh
> @@ -105,6 +105,10 @@ sunxi_board_detect() {
>  			board="i12-tvbox"
>  			;;
>  
> +		"Lamobo R1")
> +			board="lamobo-r1"
> +			;;
> +
>  		"Olimex A20-OLinuXino-LIME")
>  			board="olinuxino-lime"
>  			;;
>   
I'm yet to test the new layout You proposed - looks good but I'll need 
to test with the rest of the boards. I'm fine with adding the Lamobo 
board with the current layout, then move on to the new one if You're in 
a rush.

> diff --git a/target/linux/sunxi/config-3.18 b/target/linux/sunxi/config-3.18
> index 68f1593..3513f6a 100644
> --- a/target/linux/sunxi/config-3.18
> +++ b/target/linux/sunxi/config-3.18
> @@ -58,6 +58,11 @@ CONFIG_AUDIT=y
>  CONFIG_AUDIT_GENERIC=y
>  CONFIG_AUTO_ZRELADDR=y
>  CONFIG_AVERAGE=y
> +CONFIG_B53=y
> +# CONFIG_B53_MMAP_DRIVER is not set
> +CONFIG_B53_PHY_DRIVER=y
> +CONFIG_B53_PHY_FIXUP=y
> +# CONFIG_B53_SRAB_DRIVER is not set
>  CONFIG_BINFMT_MISC=y
>  CONFIG_BLK_CGROUP=y
>  CONFIG_BLK_DEV_SD=y
> @@ -427,6 +432,7 @@ CONFIG_STRICT_DEVMEM=y
>  CONFIG_SUN4I_TIMER=y
>  CONFIG_SUN5I_HSTIMER=y
>  CONFIG_SUNXI_WATCHDOG=y
> +CONFIG_SWCONFIG=y
>  CONFIG_SWIOTLB=y
>  CONFIG_SWP_EMULATE=y
>  CONFIG_SYSFS_SYSCALL=y
>   
For comment on swconfig, see below at the profile.


> diff --git a/target/linux/sunxi/image/Makefile b/target/linux/sunxi/image/Makefile
> old mode 100644
> new mode 100755
> index 4475aa8..f627ee3
> --- a/target/linux/sunxi/image/Makefile
> +++ b/target/linux/sunxi/image/Makefile
>   
[snip]
This is OK
> diff --git a/target/linux/sunxi/patches-3.18/302-dt-sun7i-add-lamobo-r1.patch b/target/linux/sunxi/patches-3.18/302-dt-sun7i-add-lamobo-r1.patch
> new file mode 100644
> index 0000000..82c8bd5
> --- /dev/null
> +++ b/target/linux/sunxi/patches-3.18/302-dt-sun7i-add-lamobo-r1.patch
>   
[snip]
Fine here as well. Do you plan to submit this DTS upstream?

> diff --git a/target/linux/sunxi/profiles/lamobo-r1.mk b/target/linux/sunxi/profiles/lamobo-r1.mk
> new file mode 100644
> index 0000000..4bc1185
> --- /dev/null
> +++ b/target/linux/sunxi/profiles/lamobo-r1.mk
> @@ -0,0 +1,19 @@
> +#
> +# Copyright (C) 2015 OpenWrt.org
> +#
> +# This is free software, licensed under the GNU General Public License v2.
> +# See /LICENSE for more information.
> +#
> +
> +define Profile/Lamobo_R1
> +	NAME:=Lamobo R1
> +	PACKAGES:=\
> +		uboot-sunxi-Lamobo_R1 kmod-ata-sunxi kmod-rtl8192cu \
> +		swconfig wpad-mini
> +endef
> +
> +define Profile/Lamobo_R1/Description
> +	Package set optimized for the Lamobo R1
> +endef
> +
> +$(eval $(call Profile,Lamobo_R1))
>   
If swconfig needs to be compiled in, I guess it can be taken out from 
the package list?

Thanks,
-w-
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From chunkeey at googlemail.com  Tue Jan 20 18:17:29 2015
From: chunkeey at googlemail.com (Christian Lamparter)
Date: Wed, 21 Jan 2015 00:17:29 +0100
Subject: [OpenWrt-Devel] [PATCH] ramips: improve and fix Memory 2 Move
	support
Message-ID: <1715536.1m29LxbHHI@debian64>

This patch is a follow up for my previous patch:
"ramips: add support for Intenso Memory 2 Move USB 3.0".

It fixes a couple of errors in the DTS (one of which broke
the gpio-buttons). The kmod-leds-gpio dependency has been
dropped as it is already part of the ramips target. 

Furthermore the ramdisk/uImage image is generated by default
for the rt3050 subtarget. This image is needed to flash 
OpenWrt for the first time onto the device via TFTP.

Signed-off-by: Christian Lamparter <chunkeey at googlemail.com>
---
Note: I tried adding FEATURES+=ramdisk into the M2M
Profile, but as far as I can tell the FEATURES bits
are part of the target/subtarget definitions. So, 
I'm not sure what to do otherwise?!

Regards,
	Christian
---
 target/linux/ramips/dts/M2M.dts            | 28 +++++++++++-----------------
 target/linux/ramips/rt305x/profiles/m2m.mk |  2 +-
 target/linux/ramips/rt305x/target.mk       |  2 +-
 3 files changed, 13 insertions(+), 19 deletions(-)

diff --git a/target/linux/ramips/dts/M2M.dts b/target/linux/ramips/dts/M2M.dts
index aa98991..4191037 100644
--- a/target/linux/ramips/dts/M2M.dts
+++ b/target/linux/ramips/dts/M2M.dts
@@ -7,14 +7,10 @@
 	model = "Intenso Memory 2 Move";
 
 	chosen {
-		bootargs = "console=ttyS1,57600n8 root=/dev/mtdblock5";
+		bootargs = "console=ttyS0,57600n8 root=/dev/mtdblock5";
 	};
 
 	palmbus at 10000000 {
-		uart at 500 {
-			status = "okay";
-		};
-
 		spi at b00 {
 			status = "okay";
 			m25p80 at 0 {
@@ -54,7 +50,7 @@
 	pinctrl {
 		state_default: pinctrl0 {
 			gpio {
-				ralink,group = "i2c", "jtag", "uartf";
+				ralink,group = "i2c", "uartf";
 				ralink,function = "gpio";
 			};
 		};
@@ -73,21 +69,19 @@
 	};
 
 	gpio-keys-polled {
-		gpio-keys-polled {
 		compatible = "gpio-keys-polled";
 		#address-cells = <1>;
 		#size-cells = <0>;
 		poll-interval = <20>;
-			power {
-				label = "power";
-				gpios = <&gpio0 1 1>;
-				linux,code = <0x116>;
-			};
-			reset {
-				label = "reset";
-				gpios = <&gpio0 10 1>;
-				linux,code = <0x198>;
-			};
+		power {
+			label = "power";
+			gpios = <&gpio0 1 1>;
+			linux,code = <0x116>;
+		};
+		reset {
+			label = "reset";
+			gpios = <&gpio0 10 1>;
+			linux,code = <0x198>;
 		};
 	};
 
diff --git a/target/linux/ramips/rt305x/profiles/m2m.mk b/target/linux/ramips/rt305x/profiles/m2m.mk
index ea803ba..1b13cc5 100644
--- a/target/linux/ramips/rt305x/profiles/m2m.mk
+++ b/target/linux/ramips/rt305x/profiles/m2m.mk
@@ -8,7 +8,7 @@
 define Profile/M2M
 	NAME:=Intenso Memory 2 Move
 	PACKAGES:=\
-		kmod-ledtrig-netdev kmod-ledtrig-timer kmod-leds-gpio \
+		kmod-ledtrig-netdev kmod-ledtrig-timer \
 		kmod-usb-core kmod-usb2 kmod-usb-storage kmod-scsi-core \
 		kmod-fs-ext4 kmod-fs-vfat block-mount
 endef
diff --git a/target/linux/ramips/rt305x/target.mk b/target/linux/ramips/rt305x/target.mk
index d0114c1..b97554f 100644
--- a/target/linux/ramips/rt305x/target.mk
+++ b/target/linux/ramips/rt305x/target.mk
@@ -5,7 +5,7 @@
 SUBTARGET:=rt305x
 BOARDNAME:=RT3x5x/RT5350 based boards
 ARCH_PACKAGES:=ramips_24kec
-FEATURES+=usb
+FEATURES+=usb ramdisk
 CPU_TYPE:=24kec
 CPU_SUBTYPE:=dsp
 
-- 
2.1.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From javierdo1 at gmail.com  Tue Jan 20 19:24:56 2015
From: javierdo1 at gmail.com (Javier Domingo Cansino)
Date: Wed, 21 Jan 2015 01:24:56 +0100
Subject: [OpenWrt-Devel] Xilinx Zynq zedboard integration
In-Reply-To: <CALZVapn4_-WxM=WW=tRCzWm3y3gDjMUvi_5D1NF0CPd=YTT9QQ@mail.gmail.com>
References: <CALZVapmS89wdOq+h_n78zCFCWfFyr5bc=K9+AjUS=NbYFdnU5g@mail.gmail.com>
 <CALZVapn7iVXcYc0BuCLnDrPbeoV_iPrYDfREgUgsqTgPs8T19Q@mail.gmail.com>
 <CALZVapknqhWJHHHNCmop_YB4_Q5EKgRG5wVbhdu3zhWMuYrnNQ@mail.gmail.com>
 <CALZVapn4_-WxM=WW=tRCzWm3y3gDjMUvi_5D1NF0CPd=YTT9QQ@mail.gmail.com>
Message-ID: <CALZVap=SCAZyQv+==rQbbbvk+CKz4tXEQG-6V+oE_ZwKgY3_8A@mail.gmail.com>

?After hitting against this wall for a lot, I found a bug in my few lines
of code, I was creating the uImage file from vmlinux instead of from
zImage[1].

I am still doing something wrong, because substituting the uImage generated
from buildroot in the SD card (and leaving the rest of the files), makes at
least the kernel boot, although crashes in sec 0.000000, at least prints
booting.

I have discovered that after "Starting kernel ..." there should be a
"Uncompressing Linux... done, booting the kernel." line. So I am still
doing something wrong on the uImage generation, and I don't know what.

Moreover, I have compiled the uImage like the following, and it get's to
the kernel panic at least:
make -j9 HOSTCC="/usr/bin/gcc" HOSTCFLAGS="" ARCH=arm  CROSS_COMPILE="
/home/javier/proyectos/master/master-sce/buildroot/output/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-"
LOADADDR="0x8000" uImage

If you could tell me which should be the Image/BuildKernel part, I would be
really appreciate it.

target/linux/zynq/image/Makefile
===

include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk

define Build/Compile
	$(call Build/Compile/Default, zynq_zed.dtb)
endef

define Image/BuildKernel/Initramfs
	(cd $(TARGET_DIR); \
	 find . | cpio -o -H newc | gzip -9 >$(KDIR)/zedboard-rootfs.cpio.gz )
	mkimage -A arm -T ramdisk -C none -d $(KDIR)/zedboard-rootfs.cpio.gz \
	 $(BIN_DIR)/zedboard-uramdisk.image.gz
endef

define Image/BuildKernel
	mkimage -A arm -O linux -T kernel -C none -a 0x8000 -e 0x8000 \
		-n 'ARM OpenWrt Linux-$(LINUX_VERSION)' \
		-d $(LINUX_DIR)/arch/arm/boot/zImage $(BIN_DIR)/zedboard-uImage
endef

define Image/Prepare
	$(LINUX_DIR)/scripts/dtc/dtc -O dtb \
	 $(LINUX_DIR)/arch/arm/boot/dts/zynq-zed.dts > $(BIN_DIR)/zedboard.dtb
endef

$(eval $(call BuildImage))

===

[1] Bug I should have found a lot of time ago:
https://github.com/txomon/openwrt/commit/5e882bc2f14580f62a6ad78ddc57033d207261f9
?

Cheers

On Sun, Jun 29, 2014 at 1:35 PM, Javier Domingo Cansino <javierdo1 at gmail.com
> wrote:

> ?I have manually executed the boot sequence in the uboot, and the result
> is that it fails on the command bootm loados. Any idea on how to debug what
> can be wrong?
>
> Cheers and I will keep searching,
>
> Javier Domingo Cansino
>
> zynq-uboot> fatload mmc 0 0x3000000 uImage
> reading uImage
> 4582152 bytes read in 405 ms (10.8 MiB/s)
> zynq-uboot> fatload mmc 0 0x2A00000 devicetree.dtb
> reading devicetree.dtb
> 2739 bytes read in 15 ms (177.7 KiB/s)
> zynq-uboot> fatload mmc 0 0x2000000 uramdisk.image.gz
> reading uramdisk.image.gz
> 796339 bytes read in 87 ms (8.7 MiB/s)
> zynq-uboot> help bootm
> bootm - boot application image from memory
>
> Usage:
> bootm [addr [arg ...]]
>     - boot application image stored in memory
>         passing arguments 'arg ...'; when booting a Linux kernel,
>         'arg' can be the address of an initrd image
>         When booting a Linux kernel which requires a flat device-tree
>         a third argument is required which is the address of the
>         device-tree blob. To boot that kernel without an initrd image,
>         use a '-' for the second argument. If you do not pass a third
>         a bd_info struct will be passed instead
>
> For the new multi component uImage format (FIT) addresses
>         must be extened to include component or configuration unit name:
>         addr:<subimg_uname> - direct component image specification
>         addr#<conf_uname>   - configuration specification
>         Use iminfo command to get the list of existing component
>         images and configurations.
>
> Sub-commands to do part of the bootm sequence.  The sub-commands must be
> issued in the order below (it's ok to not issue all sub-commands):
>         start [addr [arg ...]]
>         loados  - load OS image
>         ramdisk - relocate initrd, set env initrd_start/initrd_end
>         fdt     - relocate flat device tree
>         cmdline - OS specific command line processing/setup
>         bdt     - OS specific bd_t processing
>         prep    - OS specific prep before relocation or go
>         go      - start OS
> zynq-uboot> bootm start 0x3000000 0x2000000 0x2A00000
> ## Booting kernel from Legacy Image at 03000000 ...
>    Image Name:   ARM OpenWrt Linux-3.13.7
>    Image Type:   ARM Linux Kernel Image (uncompressed)
>    Data Size:    4582088 Bytes = 4.4 MiB
>    Load Address: 80000000
>    Entry Point:  80000000
>    Verifying Checksum ... OK
> ## Loading init Ramdisk from Legacy Image at 02000000 ...
>    Image Name:
>    Image Type:   ARM Linux RAMDisk Image (uncompressed)
>    Data Size:    796275 Bytes = 777.6 KiB
>    Load Address: 00000000
>    Entry Point:  00000000
>    Verifying Checksum ... OK
> ## Flattened Device Tree blob at 02a00000
>    Booting using the fdt blob at 0x2a00000
> zynq-uboot> bootm loados
>    Loading Kernel Image ...
>



-- 
Javier Domingo Cansino
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150121/ca76bd64/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From daniel at makrotopia.org  Tue Jan 20 21:01:51 2015
From: daniel at makrotopia.org (Daniel Golle)
Date: Wed, 21 Jan 2015 03:01:51 +0100
Subject: [OpenWrt-Devel] [PATCH] sunxi: disable MMC debugging in kernel
	config
Message-ID: <20150121020125.GA31819@makrotopia.org>

MMC reads and writes caused some heavy log pollution, unset
CONFIG_MMC_DEBUG to fix that.

Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 target/linux/sunxi/config-3.18 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/sunxi/config-3.18 b/target/linux/sunxi/config-3.18
index 3513f6a..d96406e 100644
--- a/target/linux/sunxi/config-3.18
+++ b/target/linux/sunxi/config-3.18
@@ -297,7 +297,7 @@ CONFIG_MIGRATION=y
 CONFIG_MMC=y
 CONFIG_MMC_BLOCK=y
 # CONFIG_MMC_BLOCK_BOUNCE is not set
-CONFIG_MMC_DEBUG=y
+# CONFIG_MMC_DEBUG is not set
 CONFIG_MMC_SUNXI=y
 CONFIG_MODULES_USE_ELF_REL=y
 CONFIG_MTD_SPLIT_SUPPORT=y
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From daniel at makrotopia.org  Tue Jan 20 22:36:50 2015
From: daniel at makrotopia.org (Daniel Golle)
Date: Wed, 21 Jan 2015 04:36:50 +0100
Subject: [OpenWrt-Devel] [PATCH 1/2] modules: f2fs: add missing symbols for
	3.18
Message-ID: <20150121033644.GA3344@makrotopia.org>

Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 package/kernel/linux/modules/fs.mk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/package/kernel/linux/modules/fs.mk b/package/kernel/linux/modules/fs.mk
index 243f368..87ba946 100644
--- a/package/kernel/linux/modules/fs.mk
+++ b/package/kernel/linux/modules/fs.mk
@@ -181,6 +181,8 @@ define KernelPackage/fs-f2fs
 	CONFIG_F2FS_FS \
 	CONFIG_F2FS_STAT_FS=y \
 	CONFIG_F2FS_FS_XATTR=n \
+	CONFIG_F2FS_FS_POSIX_ACL=n \
+	CONFIG_F2FS_FS_SECURITY=n \
 	CONFIG_F2FS_CHECK_FS=n
   FILES:=$(LINUX_DIR)/fs/f2fs/f2fs.ko
   AUTOLOAD:=$(call AutoLoad,30,f2fs,1)
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From daniel at makrotopia.org  Tue Jan 20 22:37:15 2015
From: daniel at makrotopia.org (Daniel Golle)
Date: Wed, 21 Jan 2015 04:37:15 +0100
Subject: [OpenWrt-Devel] [PATCH 2/2] modules: f2fs: enable support for xattr
Message-ID: <20150121033708.GA3353@makrotopia.org>

To use overlayfs on f2fs, xattr needs to be supported.

Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 package/kernel/linux/modules/fs.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/kernel/linux/modules/fs.mk b/package/kernel/linux/modules/fs.mk
index 87ba946..3ae3c2d 100644
--- a/package/kernel/linux/modules/fs.mk
+++ b/package/kernel/linux/modules/fs.mk
@@ -180,7 +180,7 @@ define KernelPackage/fs-f2fs
   KCONFIG:= \
 	CONFIG_F2FS_FS \
 	CONFIG_F2FS_STAT_FS=y \
-	CONFIG_F2FS_FS_XATTR=n \
+	CONFIG_F2FS_FS_XATTR=y \
 	CONFIG_F2FS_FS_POSIX_ACL=n \
 	CONFIG_F2FS_FS_SECURITY=n \
 	CONFIG_F2FS_CHECK_FS=n
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From santicomp2 at gmail.com  Wed Jan 21 00:10:53 2015
From: santicomp2 at gmail.com (Santiago Regusci)
Date: Wed, 21 Jan 2015 03:10:53 -0200
Subject: [OpenWrt-Devel] Fwd: MIPS libatomic
In-Reply-To: <CAFg56-rsc-nM+7Mi44PWMr71-bZoicDZiwR1AewNAqS+GxOExg@mail.gmail.com>
References: <CAFg56-rsc-nM+7Mi44PWMr71-bZoicDZiwR1AewNAqS+GxOExg@mail.gmail.com>
Message-ID: <CAFg56-r7cZo+aTDHPrP5V-=80=6XzZjjmrS0LL84Yb=juDc-Dw@mail.gmail.com>

Hi

I am having trouble building a package czmq with barrier breaker for
Mips24kc.
i get src/.libs/libczmq.so: undefined reference to `__sync_add_and_fetch_8'
do i have to add libatomic in the makefile toolchain. or has did anyone
have a similar problem.

how i can i fix this?

thank you
Santi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150121/f50a40a5/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From ardeleanalex at gmail.com  Wed Jan 21 03:30:57 2015
From: ardeleanalex at gmail.com (Alexandru Ardelean)
Date: Wed, 21 Jan 2015 10:30:57 +0200
Subject: [OpenWrt-Devel] Fwd: MIPS libatomic
In-Reply-To: <CAFg56-r7cZo+aTDHPrP5V-=80=6XzZjjmrS0LL84Yb=juDc-Dw@mail.gmail.com>
References: <CAFg56-rsc-nM+7Mi44PWMr71-bZoicDZiwR1AewNAqS+GxOExg@mail.gmail.com>
 <CAFg56-r7cZo+aTDHPrP5V-=80=6XzZjjmrS0LL84Yb=juDc-Dw@mail.gmail.com>
Message-ID: <CA+U=DspSkK+3sNtJs0RsDtYn-aH9YoeTAPPwzszwN01VoQf8Dg@mail.gmail.com>

I don't think libatomic exports that symbol.
It looks like that symbol should be in the standard gcc.

You can try to add +libatomic to the DEPENDS section of czmq to see if that
helps.
But note that the libatomic package was added in this commit:
7edd1ccebaf00db527fcbb1c6e75827722cfdc21

I'd say to pull a clone of the latest OpenWRT trunk and compare.
I don't know what the toolchain version of Barrier Breaker is.

Here's on the latest trunk (I don't have a MIPS build right now):
build_dir/toolchain-x86_64_gcc-4.8-linaro_uClibc-0.9.33.2/gcc-linaro-4.8-2014.04-final/x86_64-openwrt-linux-uclibc/libgcc/libgcc-std.ver:
__sync_add_and_fetch_1
build_dir/toolchain-x86_64_gcc-4.8-linaro_uClibc-0.9.33.2/gcc-linaro-4.8-2014.04-final/x86_64-openwrt-linux-uclibc/libgcc/libgcc-std.ver:
__sync_add_and_fetch_2
build_dir/toolchain-x86_64_gcc-4.8-linaro_uClibc-0.9.33.2/gcc-linaro-4.8-2014.04-final/x86_64-openwrt-linux-uclibc/libgcc/libgcc-std.ver:
__sync_add_and_fetch_4
build_dir/toolchain-x86_64_gcc-4.8-linaro_uClibc-0.9.33.2/gcc-linaro-4.8-2014.04-final/x86_64-openwrt-linux-uclibc/libgcc/libgcc-std.ver:
__sync_add_and_fetch_8
build_dir/toolchain-x86_64_gcc-4.8-linaro_uClibc-0.9.33.2/gcc-linaro-4.8-2014.04-final/x86_64-openwrt-linux-uclibc/libgcc/libgcc-std.ver:
__sync_add_and_fetch_16

And the Changelog says:
build_dir/toolchain-x86_64_gcc-4.8-linaro_uClibc-0.9.33.2/gcc-linaro-4.8-2014.04/libgcc/ChangeLog:

2014-01-25  Walter Lee  <walt at tilera.com>

    Backport from mainline
    2014-01-25  Walter Lee  <walt at tilera.com>

    * config/tilepro/atomic.c (pre_atomic_barrier): Mark inline.
    (post_atomic_barrier): Ditto.
    (__fetch_and_do): New macro.
    (__atomic_fetch_and_do): Use __fetch_and_do.
    (__sync_fetch_and_do): New macro.
    (__sync_fetch_and_add_4): New function.
    (__sync_fetch_and_sub_4): New function.
    (__sync_fetch_and_or_4): New function.
    (__sync_fetch_and_and_4): New function.
    (__sync_fetch_and_xor_4): New function.
    (__sync_fetch_and_nand_4): New function.


If you do find these symbols in your gcc toolchain, I'd say to look for
flags to enable them.
They might be disabled by default.




On Wed, Jan 21, 2015 at 7:10 AM, Santiago Regusci <santicomp2 at gmail.com>
wrote:

> Hi
>
> I am having trouble building a package czmq with barrier breaker for
> Mips24kc.
> i get src/.libs/libczmq.so: undefined reference to `__sync_add_and_fetch_8'
> do i have to add libatomic in the makefile toolchain. or has did anyone
> have a similar problem.
>
> how i can i fix this?
>
> thank you
> Santi
>
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150121/ac74ba4d/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From karl.vogel at gmail.com  Wed Jan 21 04:14:23 2015
From: karl.vogel at gmail.com (Karl Vogel)
Date: Wed, 21 Jan 2015 10:14:23 +0100
Subject: [OpenWrt-Devel] network/znc: Package binaries appear to be
 broken by MIPS16
In-Reply-To: <54BE28E0.9060409@wireless-instruments.com>
References: <20150119185225.4C7F1A6497@mail.uptheinter.net>
 <54BE28E0.9060409@wireless-instruments.com>
Message-ID: <CAFLxW9gZ5Fejb5yX_KAiVvriecad2A4sSreN3e+HfJgu_zdkgA@mail.gmail.com>

On Tue, Jan 20, 2015 at 11:07 AM, S?awomir Demeszko
<s.demeszko at wireless-instruments.com> wrote:
> 19.01.2015 19:50, Oliver wrote:
>>
>> I'll try 4.9 - out of interest, do you have any references to the bug in
>> 4.8 (C++ specific?)
>
>
> Sorry, I do not remember where I read about that.

I think you're referring to the MIPS16 bug in qemu:

http://wiki.openwrt.org/doc/howto/qemu#openwrt_in_qemu_mips
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From ben.mulvihill at gmail.com  Wed Jan 21 04:35:08 2015
From: ben.mulvihill at gmail.com (Ben Mulvihill)
Date: Wed, 21 Jan 2015 10:35:08 +0100
Subject: [OpenWrt-Devel] [PATCH] lantiq: correct value for fpi clock on ar9
Message-ID: <1421832908.6920.7.camel@merveille.lan>

Hello,

This is a patch to go in target/linux/lantiq/patches-3.14/

It corrects the fpi clock value on lantiq ar9. See this discussion
for further details:

https://lists.openwrt.org/pipermail/openwrt-devel/2015-January/030688.html


--- a/arch/mips/lantiq/xway/clk.c	2015-01-21 10:15:44.000000000 +0100
+++ b/arch/mips/lantiq/xway/clk.c	2015-01-21 10:17:29.000000000 +0100
@@ -104,8 +104,9 @@ unsigned long ltq_ar9_fpi_hz(void)
 	unsigned long sys = ltq_ar9_sys_hz();
 
 	if (ltq_cgu_r32(CGU_SYS) & BIT(0))
-		return sys;
-	return sys >> 1;
+		return sys / 3;
+	else
+		return sys / 2;
 }
 
 unsigned long ltq_ar9_cpu_hz(void)
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From christian.schoenebeck at gmail.com  Wed Jan 21 04:36:31 2015
From: christian.schoenebeck at gmail.com (Christian Schoenebeck)
Date: Wed, 21 Jan 2015 10:36:31 +0100
Subject: [OpenWrt-Devel] [PATCH] package-ipkg.mk: allow to install CC
	packages on older versions
Message-ID: <54BF731F.7040308@gmail.com>

Packages compiled on CC / trunk could not be installed on BB and before.
Why to block users from using updated packages like ca-certificates,
privoxy or updated luci-apps. Checks if default_postinst/prerm function
exists in /lib/functions.sh then run, otherwise run [xxx]-pkg script
if exists.

Signed-off-by: Christian Schoenebeck <christian.schoenebeck at gmail.com>

---
 include/package-ipkg.mk | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/include/package-ipkg.mk b/include/package-ipkg.mk
index 77eaeb8..584ab95 100644
--- a/include/package-ipkg.mk
+++ b/include/package-ipkg.mk
@@ -195,13 +195,25 @@ $(_endef)
 		( \
 			echo "#!/bin/sh"; \
 			echo "[ \"\$$$${IPKG_NO_SCRIPT}\" = \"1\" ] && exit 0"; \
-			echo ". \$$$${IPKG_INSTROOT}/lib/functions.sh"; \
-			echo "default_postinst \$$$$0 \$$$$@"; \
+			echo "grep 'default_postinst' \$$$${IPKG_INSTROOT}/lib/functions.sh >/dev/null 2>&1 && {"; \
+			echo "    . \$$$${IPKG_INSTROOT}/lib/functions.sh"; \
+			echo "    default_postinst \$$$$0 \$$$$@"; \
+			echo "} || {"; \
+			echo "    name=\$$$$(echo \$$$$(basename \$$$$0) | cut -d. -f1)"; \
+			echo "    [ -f \$$$${IPKG_INSTROOT}/usr/lib/opkg/info/\$$$${name}.postinst-pkg ] && \\"; \
+			echo "        . \$$$${IPKG_INSTROOT}/usr/lib/opkg/info/\$$$${name}.postinst-pkg \$$$$@"; \
+			echo "}"; \
 		) > postinst; \
 		( \
 			echo "#!/bin/sh"; \
-			echo ". \$$$${IPKG_INSTROOT}/lib/functions.sh"; \
-			echo "default_prerm \$$$$0 \$$$$@"; \
+			echo "grep 'default_prerm' \$$$${IPKG_INSTROOT}/lib/functions.sh >/dev/null 2>&1 && {"; \
+			echo "    . \$$$${IPKG_INSTROOT}/lib/functions.sh"; \
+			echo "    default_prerm \$$$$0 \$$$$@"; \
+			echo "} || {"; \
+			echo "    name=\$$$$(echo \$$$$(basename \$$$$0) | cut -d. -f1)"; \
+			echo "    [ -f \$$$${IPKG_INSTROOT}/usr/lib/opkg/info/\$$$${name}.prerm-pkg ] && \\"; \
+			echo "        . \$$$${IPKG_INSTROOT}/usr/lib/opkg/info/\$$$${name}.prerm-pkg \$$$$@"; \
+			echo "}"; \
 		) > prerm; \
 		chmod 0755 prerm; \
 		$($(1)_COMMANDS) \
-- 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From zajec5 at gmail.com  Wed Jan 21 04:55:43 2015
From: zajec5 at gmail.com (=?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?=)
Date: Wed, 21 Jan 2015 10:55:43 +0100
Subject: [OpenWrt-Devel] [PATCH] package-ipkg.mk: allow to install CC
 packages on older versions
In-Reply-To: <54BF731F.7040308@gmail.com>
References: <54BF731F.7040308@gmail.com>
Message-ID: <CACna6rzp3rARiQdP66_ebOCrxv8aZYQParZJtgRbjc_9pHZ3pQ@mail.gmail.com>

On 21 January 2015 at 10:36, Christian Schoenebeck
<christian.schoenebeck at gmail.com> wrote:
> Why to block users from using updated packages like ca-certificates,
> privoxy or updated luci-apps

Because we:
1) Don't want help users breaking their installations if they upgrade
wrong package
2) Don't want to keep a list of packages that could be used from
different releases

The correct way is to provide upgraded package for the stable release
(e.g. update package in BB branch).
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From zajec5 at gmail.com  Wed Jan 21 05:32:12 2015
From: zajec5 at gmail.com (=?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?=)
Date: Wed, 21 Jan 2015 11:32:12 +0100
Subject: [OpenWrt-Devel] uclient & libubox: handling SIGPIPE / EPIPE
Message-ID: <CACna6rx4Zt=qfxsgbLFtwX8045HeNTmjqtnzSCkSQDV3kTXdyw@mail.gmail.com>

I'm trying to use uclient to monitor my home network servers querying
http://ip/status . So far I was using bash + curl, but I'm trying to
learn libubox now.

So today I accidentally queried some unknown machine (random IP) and
my app crashed.

What has happened:

1) When I first called "uclient_request", uclient opened socket and wrote
GET /status HTTP/1.1
Host: 192.168.0.136

Inside the "ustream_fd_write", write returned -1 and errno was EAGAIN.

2) After handling control back to uloop there was another try of sending
GET /status HTTP/1.1
Host: 192.168.0.136

but this time it has failed badly during the "write" call. There was
SIGPIPE that wasn't handled and my app has been terminated.


Should we somehow handle SIGPIPE in uclient or disable it using SO_NOSIGPIPE?

-- 
Rafa?
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From blogic at openwrt.org  Wed Jan 21 07:28:10 2015
From: blogic at openwrt.org (John Crispin)
Date: Wed, 21 Jan 2015 13:28:10 +0100
Subject: [OpenWrt-Devel] uclient & libubox: handling SIGPIPE / EPIPE
In-Reply-To: <CACna6rx4Zt=qfxsgbLFtwX8045HeNTmjqtnzSCkSQDV3kTXdyw@mail.gmail.com>
References: <CACna6rx4Zt=qfxsgbLFtwX8045HeNTmjqtnzSCkSQDV3kTXdyw@mail.gmail.com>
Message-ID: <54BF9B5A.3000108@openwrt.org>



On 21/01/2015 11:32, Rafa? Mi?ecki wrote:
> I'm trying to use uclient to monitor my home network servers querying
> http://ip/status . So far I was using bash + curl, but I'm trying to
> learn libubox now.
> 
> So today I accidentally queried some unknown machine (random IP) and
> my app crashed.
> 
> What has happened:
> 
> 1) When I first called "uclient_request", uclient opened socket and wrote
> GET /status HTTP/1.1
> Host: 192.168.0.136
> 
> Inside the "ustream_fd_write", write returned -1 and errno was EAGAIN.
> 
> 2) After handling control back to uloop there was another try of sending
> GET /status HTTP/1.1
> Host: 192.168.0.136
> 
> but this time it has failed badly during the "write" call. There was
> SIGPIPE that wasn't handled and my app has been terminated.
> 
> 
> Should we somehow handle SIGPIPE in uclient or disable it using SO_NOSIGPIPE?
> 

services like procd do

-> signal(SIGPIPE, SIG_IGN);

this should really be changed to work with 464e05e3 from libubox.git
unless i missed something it might be a good idea to add PIP to
uloop_setup_signals()
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From Lukasz.Duda at nordicsemi.no  Wed Jan 21 07:53:30 2015
From: Lukasz.Duda at nordicsemi.no (Duda, Lukasz)
Date: Wed, 21 Jan 2015 12:53:30 +0000
Subject: [OpenWrt-Devel] [PATCH] Adding support for 6LoWPAN over Bluetooth
 Low Energy in kernel 3.18.
Message-ID: <AB80DA35A7B64E4E98291794926897D95BA5D425@mbx04.nvlsi.no>

Adding support 6LoWPAN over Bluetooth Low Energy in kernel 3.18.
Creating new bluetooth_6lowpan group with COFNIG_6LOWPAN and CONFIG_BT_6LOWPAN.
Adding kernel object dependencies for 6LoWPAN over Bluetooth Low Energy. 

Signed-off-by: Lukasz Duda <lukasz.duda at nordicsemi.no>

---

Index: package/kernel/linux/modules/other.mk
===================================================================
--- package/kernel/linux/modules/other.mk	(revision 44059)
+++ package/kernel/linux/modules/other.mk	(working copy)
@@ -70,6 +70,26 @@
 $(eval $(call KernelPackage,bluetooth))
 
 
+define KernelPackage/bluetooth_6lowpan
+  SUBMENU:=$(OTHER_MENU)
+  TITLE:=Bluetooth 6LoWPAN support
+  DEPENDS:=+kmod-bluetooth @!LINUX_3_3 @!LINUX_3_8 @!LINUX_3_10 
+@!LINUX_3_13 @!LINUX_3_14
+  KCONFIG:= \
+  CONFIG_6LOWPAN=m \
+  CONFIG_BT_6LOWPAN=m
+  FILES:= \
+	$(LINUX_DIR)/net/bluetooth/bluetooth_6lowpan.ko \
+	$(LINUX_DIR)/net/6lowpan/6lowpan.ko
+	AUTOLOAD:=$(call AutoProbe,bluetooth)
+endef
+
+define KernelPackage/bluetooth_6lowpan/description
+ Kernel support for 6LoWPAN over Bluetooth Low Energy devices endef
+
+$(eval $(call KernelPackage,bluetooth_6lowpan))
+
+
 define KernelPackage/bluetooth-hci-h4p
   SUBMENU:=$(OTHER_MENU)
   TITLE:=HCI driver with H4 Nokia extensions
---
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From yszhou4tech at gmail.com  Wed Jan 21 08:21:24 2015
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Wed, 21 Jan 2015 21:21:24 +0800
Subject: [OpenWrt-Devel] [PATCH 1/5] uloop: fix out-of-bound loop index.
Message-ID: <1421846488-323-1-git-send-email-yszhou4tech@gmail.com>

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 uloop.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/uloop.c b/uloop.c
index 9a77ce4..3224f4b 100644
--- a/uloop.c
+++ b/uloop.c
@@ -394,11 +394,11 @@ int uloop_fd_delete(struct uloop_fd *fd)
 {
 	int i;
 
-	for (i = 0; i < cur_nfds; i++) {
-		if (cur_fds[cur_fd + i].fd != fd)
+	for (i = cur_fd; i < cur_nfds; i++) {
+		if (cur_fds[i].fd != fd)
 			continue;
 
-		cur_fds[cur_fd + i].fd = NULL;
+		cur_fds[i].fd = NULL;
 	}
 
 	if (!fd->registered)
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From yszhou4tech at gmail.com  Wed Jan 21 08:21:25 2015
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Wed, 21 Jan 2015 21:21:25 +0800
Subject: [OpenWrt-Devel] [PATCH 2/5] ustream: add function ustream_read().
In-Reply-To: <1421846488-323-1-git-send-email-yszhou4tech@gmail.com>
References: <1421846488-323-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <1421846488-323-2-git-send-email-yszhou4tech@gmail.com>

It can be used to fill caller-specified buffer with data already in
ustream read buffer.  Useful in the following use pattern.

	int available = ustream_pending_data(s, false);
	if (available >= sizeof(struct msghdr)) {
		struct msghdr h;
		ustream_read(s, &h, sizeof(h));
	}

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 ustream.c | 20 ++++++++++++++++++++
 ustream.h |  5 +++++
 2 files changed, 25 insertions(+)

diff --git a/ustream.c b/ustream.c
index 828a025..fc93bc2 100644
--- a/ustream.c
+++ b/ustream.c
@@ -333,6 +333,26 @@ char *ustream_get_read_buf(struct ustream *s, int *buflen)
 	return data;
 }
 
+int ustream_read(struct ustream *s, char *buf, int buflen)
+{
+	char *chunk;
+	int chunk_len;
+	int len = 0;
+
+	do {
+		chunk = ustream_get_read_buf(s, &chunk_len);
+		if (!chunk)
+			break;
+		if (chunk_len > buflen - len)
+			chunk_len = buflen - len;
+		memcpy(buf + len, chunk, chunk_len);
+		ustream_consume(s, chunk_len);
+		len += chunk_len;
+	} while (len < buflen);
+
+	return len;
+}
+
 static void ustream_write_error(struct ustream *s)
 {
 	if (!s->write_error)
diff --git a/ustream.h b/ustream.h
index 6431744..53e0828 100644
--- a/ustream.h
+++ b/ustream.h
@@ -143,6 +143,11 @@ void ustream_free(struct ustream *s);
 /* ustream_consume: remove data from the head of the read buffer */
 void ustream_consume(struct ustream *s, int len);
 
+/*
+ * ustream_read: read and consume data in read buffer into caller-specified
+ * area.  Return length of data read.
+ */
+int ustream_read(struct ustream *s, char *buf, int buflen);
 /* ustream_write: add data to the write buffer */
 int ustream_write(struct ustream *s, const char *buf, int len, bool more);
 int ustream_printf(struct ustream *s, const char *format, ...);
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From yszhou4tech at gmail.com  Wed Jan 21 08:21:26 2015
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Wed, 21 Jan 2015 21:21:26 +0800
Subject: [OpenWrt-Devel] [PATCH 3/5] ustream-fd: fix logic invert of write
	polling.
In-Reply-To: <1421846488-323-1-git-send-email-yszhou4tech@gmail.com>
References: <1421846488-323-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <1421846488-323-3-git-send-email-yszhou4tech@gmail.com>

ustream_write_pending() returns true if write buffer was flushed there.

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 ustream-fd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ustream-fd.c b/ustream-fd.c
index 4abb530..bc44d4a 100644
--- a/ustream-fd.c
+++ b/ustream-fd.c
@@ -119,7 +119,7 @@ static bool __ustream_fd_poll(struct ustream_fd *sf, unsigned int events)
 		ustream_fd_read_pending(sf, &more);
 
 	if (events & ULOOP_WRITE) {
-		if (!ustream_write_pending(s))
+		if (ustream_write_pending(s))
 			ustream_fd_set_uloop(s, false);
 	}
 
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From yszhou4tech at gmail.com  Wed Jan 21 08:21:27 2015
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Wed, 21 Jan 2015 21:21:27 +0800
Subject: [OpenWrt-Devel] [PATCH 4/5] uloop: optimize uloop_timeout_set()
	implementaiton a bit.
In-Reply-To: <1421846488-323-1-git-send-email-yszhou4tech@gmail.com>
References: <1421846488-323-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <1421846488-323-4-git-send-email-yszhou4tech@gmail.com>

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 uloop.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/uloop.c b/uloop.c
index 3224f4b..883f6f1 100644
--- a/uloop.c
+++ b/uloop.c
@@ -453,14 +453,14 @@ int uloop_timeout_set(struct uloop_timeout *timeout, int msecs)
 	if (timeout->pending)
 		uloop_timeout_cancel(timeout);
 
-	uloop_gettime(&timeout->time);
+	uloop_gettime(time);
 
 	time->tv_sec += msecs / 1000;
 	time->tv_usec += (msecs % 1000) * 1000;
 
 	if (time->tv_usec > 1000000) {
 		time->tv_sec++;
-		time->tv_usec %= 1000000;
+		time->tv_usec -= 1000000;
 	}
 
 	return uloop_timeout_add(timeout);
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From yszhou4tech at gmail.com  Wed Jan 21 08:21:28 2015
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Wed, 21 Jan 2015 21:21:28 +0800
Subject: [OpenWrt-Devel] [PATCH 5/5] utils: use clock_get_time() for
	clock_gettime() on Apple.
In-Reply-To: <1421846488-323-1-git-send-email-yszhou4tech@gmail.com>
References: <1421846488-323-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <1421846488-323-5-git-send-email-yszhou4tech@gmail.com>

It turns out that mach_absolute_time() is not monotonic at all.  While
at it, convert the CLOCK_REALTIME implementation to using
clock_get_time() as well.

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
I am not sure though whether the detection for clock_gettime() is still necessary for
Apple platform though.

 utils.c | 59 ++++++++++++++++++++++++++++++++++-------------------------
 utils.h | 11 ++++++++---
 2 files changed, 42 insertions(+), 28 deletions(-)

diff --git a/utils.c b/utils.c
index 078a8a1..8fd19f4 100644
--- a/utils.c
+++ b/utils.c
@@ -54,41 +54,50 @@ void *__calloc_a(size_t len, ...)
 }
 
 #ifdef __APPLE__
-#include <mach/mach_time.h>
+#include <mach/mach_host.h>		/* host_get_clock_service() */
+#include <mach/mach_port.h>		/* mach_port_deallocate() */
+#include <mach/mach_init.h>		/* mach_host_self(), mach_task_self() */
+#include <mach/clock.h>			/* clock_get_time() */
 
-static void clock_gettime_realtime(struct timespec *tv)
+static clock_serv_t clock_realtime;
+static clock_serv_t clock_monotonic;
+
+static void __constructor clock_name_init(void)
 {
-	struct timeval _tv;
+	mach_port_t host_self = mach_host_self();
 
-	gettimeofday(&_tv, NULL);
-	tv->tv_sec = _tv.tv_sec;
-	tv->tv_nsec = _tv.tv_usec * 1000;
+	host_get_clock_service(host_self, CLOCK_REALTIME, &clock_realtime);
+	host_get_clock_service(host_self, CLOCK_MONOTONIC, &clock_monotonic);
 }
 
-static void clock_gettime_monotonic(struct timespec *tv)
+static void __destructor clock_name_dealloc(void)
 {
-	mach_timebase_info_data_t info;
-	float sec;
-	uint64_t val;
-
-	mach_timebase_info(&info);
-
-	val = mach_absolute_time();
-	tv->tv_nsec = (val * info.numer / info.denom) % 1000000000;
+	mach_port_t self = mach_task_self();
 
-	sec = val;
-	sec *= info.numer;
-	sec /= info.denom;
-	sec /= 1000000000;
-	tv->tv_sec = sec;
+	mach_port_deallocate(self, clock_realtime);
+	mach_port_deallocate(self, clock_monotonic);
 }
 
-void clock_gettime(int type, struct timespec *tv)
+int clock_gettime(int type, struct timespec *tv)
 {
-	if (type == CLOCK_REALTIME)
-		return clock_gettime_realtime(tv);
-	else
-		return clock_gettime_monotonic(tv);
+	int retval = -1;
+	mach_timespec_t mts;
+
+	switch (type) {
+		case CLOCK_REALTIME:
+			retval = clock_get_time(clock_realtime, &mts);
+			break;
+		case CLOCK_MONOTONIC:
+			retval = clock_get_time(clock_monotonic, &mts);
+			break;
+		default:
+			goto out;
+	}
+
+	tv->tv_sec = mts.tv_sec;
+	tv->tv_nsec = mts.tv_nsec;
+out:
+	return retval;
 }
 
 #endif
diff --git a/utils.h b/utils.h
index 9688a6a..7ef82c6 100644
--- a/utils.h
+++ b/utils.h
@@ -58,10 +58,11 @@ extern int __BUILD_BUG_ON_CONDITION_FAILED;
 
 #ifdef __APPLE__
 
-#define CLOCK_REALTIME	0
-#define CLOCK_MONOTONIC	1
+#include <mach/clock_types.h>
+#define CLOCK_REALTIME	CALENDAR_CLOCK
+#define CLOCK_MONOTONIC	SYSTEM_CLOCK
 
-void clock_gettime(int type, struct timespec *tv);
+int clock_gettime(int type, struct timespec *tv);
 
 #endif
 
@@ -159,6 +160,10 @@ static inline uint16_t __u_bswap16(uint16_t val)
 #define __constructor __attribute__((constructor))
 #endif
 
+#ifndef __destructor
+#define __destructor __attribute__((destructor))
+#endif
+
 #ifndef __hidden
 #define __hidden __attribute__((visibility("hidden")))
 #endif
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From stefan.tomanek+openwrt at wertarbyte.de  Wed Jan 21 08:59:12 2015
From: stefan.tomanek+openwrt at wertarbyte.de (Stefan Tomanek)
Date: Wed, 21 Jan 2015 14:59:12 +0100
Subject: [OpenWrt-Devel] [PATCH] hostapd: Add client association log file
Message-ID: <20150121135911.GK13405@zirkel.wertarbyte.de>

This change adds the configuration option "assoc_log_file" to hostapd, making
it possible to specify a log file to which clients joining and parting the
corresponding BSS are written.

Every BSS can have an individual log file, and each entry written contains a
timestamp, an indicator whether the client is associating (+) or disassociating
(-), the client and the bss hardware addresses as well as the device and SSID
identifiers of the affected network. This makes it easy to join the file with
the leases database of an DHCP server like dnsmasq.

To use a logfile with OpenWrt, simply add an assoc_log_file entry to the
wireless network:

config wifi-iface
	option device 'radio1'
	option network 'hotspot'
	option ssid 'MyNetwork'
	option mode 'ap'
	option encryption 'none'
	option assoc_log_file '/tmp/assoc_log-hotspot'

Signed-off-by: Stefan Tomanek <stefan.tomanek+openwrt at wertarbyte.de>
---
 package/network/services/hostapd/files/netifd.sh   |    7 +-
 ...rite-client-dis-associations-to-a-logfile.patch |  231 ++++++++++++++++++++
 2 files changed, 237 insertions(+), 1 deletions(-)
 create mode 100644 package/network/services/hostapd/patches/720-Write-client-dis-associations-to-a-logfile.patch

diff --git a/package/network/services/hostapd/files/netifd.sh b/package/network/services/hostapd/files/netifd.sh
index ed2a631..be94398 100644
--- a/package/network/services/hostapd/files/netifd.sh
+++ b/package/network/services/hostapd/files/netifd.sh
@@ -159,6 +159,8 @@ hostapd_common_add_bss_config() {
 	config_add_int mcast_rate
 	config_add_array basic_rate
 	config_add_array supported_rates
+
+	config_add_string assoc_log_file
 }
 
 hostapd_set_bss_options() {
@@ -177,7 +179,7 @@ hostapd_set_bss_options() {
 		wps_pushbutton wps_label ext_registrar wps_pbc_in_m1 \
 		wps_device_type wps_device_name wps_manufacturer wps_pin \
 		macfilter ssid wmm uapsd hidden short_preamble rsn_preauth \
-		iapp_interface
+		iapp_interface assoc_log_file
 
 	set_default isolate 0
 	set_default maxassoc 0
@@ -189,6 +191,9 @@ hostapd_set_bss_options() {
 	set_default uapsd 1
 
 	append bss_conf "ctrl_interface=/var/run/hostapd"
+	if [ "$assoc_log_file" ]; then
+		append bss_conf "assoc_log_file=$assoc_log_file" "$N"
+	fi
 	if [ "$isolate" -gt 0 ]; then
 		append bss_conf "ap_isolate=$isolate" "$N"
 	fi
diff --git a/package/network/services/hostapd/patches/720-Write-client-dis-associations-to-a-logfile.patch b/package/network/services/hostapd/patches/720-Write-client-dis-associations-to-a-logfile.patch
new file mode 100644
index 0000000..7a87529
--- /dev/null
+++ b/package/network/services/hostapd/patches/720-Write-client-dis-associations-to-a-logfile.patch
@@ -0,0 +1,231 @@
+Write client (dis)associations to a logfile
+
+This change adds the configuration option "assoc_log_file" to hostapd, making
+it possible to specify a log file to which clients joining and parting the
+corresponding BSS are written.
+
+Every BSS can have an individual log file, and each entry written contains a
+timestamp, an indicator whether the client is associating (+) or disassociating
+(-), the client and the bss hardware addresses as well as the device and SSID
+identifiers of the affected network. This makes it easy to join the file with
+the leases database of an DHCP server like dnsmasq.
+---
+ hostapd/config_file.c |  3 +++
+ hostapd/hostapd.conf  |  3 +++
+ hostapd/main.c        |  6 ++++++
+ src/ap/ap_config.c    | 27 +++++++++++++++++++++++++++
+ src/ap/ap_config.h    |  5 +++++
+ src/ap/ap_mlme.c      | 26 ++++++++++++++++++++++++++
+ src/ap/hostapd.c      |  4 ++++
+ src/ap/hostapd.h      |  2 ++
+ 8 files changed, 76 insertions(+)
+
+diff --git a/hostapd/config_file.c b/hostapd/config_file.c
+index ddebf1f..827f9b4 100644
+--- a/hostapd/config_file.c
++++ b/hostapd/config_file.c
+@@ -1876,6 +1876,9 @@ static int hostapd_config_fill(struct hostapd_config *conf,
+ 		bss->logger_syslog = atoi(pos);
+ 	} else if (os_strcmp(buf, "logger_stdout") == 0) {
+ 		bss->logger_stdout = atoi(pos);
++	} else if (os_strcmp(buf, "assoc_log_file") == 0) {
++		os_free(bss->assoc_log_file);
++		bss->assoc_log_file = os_strdup(pos);
+ 	} else if (os_strcmp(buf, "dump_file") == 0) {
+ 		wpa_printf(MSG_INFO, "Line %d: DEPRECATED: 'dump_file' configuration variable is not used anymore",
+ 			   line);
+diff --git a/hostapd/hostapd.conf b/hostapd/hostapd.conf
+index 2e6f841..31b2193 100644
+--- a/hostapd/hostapd.conf
++++ b/hostapd/hostapd.conf
+@@ -51,6 +51,9 @@ logger_syslog_level=2
+ logger_stdout=-1
+ logger_stdout_level=2
+ 
++# Clients joining or departing the AP can be logged to a separate file.
++assoc_log_file=/tmp/assoc_log-wlan0
++
+ # Interface for separate control program. If this is specified, hostapd
+ # will create this directory and a UNIX domain socket for listening to requests
+ # from external programs (CLI/GUI, etc.) for status information and
+diff --git a/hostapd/main.c b/hostapd/main.c
+index 5a47711..38a9ab2 100644
+--- a/hostapd/main.c
++++ b/hostapd/main.c
+@@ -258,6 +258,12 @@ hostapd_interface_init(struct hapd_interfaces *interfaces,
+ 		return NULL;
+ 	}
+ 
++	for (k = 0; k < iface->conf->num_bss; k++) {
++		int r = hostapd_open_assoc_log(iface->bss[k]);
++		if (r < 0)
++			return NULL;
++	}
++
+ 	return iface;
+ }
+ 
+diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c
+index 90f1630..6d7389f 100644
+--- a/src/ap/ap_config.c
++++ b/src/ap/ap_config.c
+@@ -6,6 +6,8 @@
+  * See README for more details.
+  */
+ 
++#include <fcntl.h>
++
+ #include "utils/includes.h"
+ 
+ #include "utils/common.h"
+@@ -18,6 +20,7 @@
+ #include "wpa_auth.h"
+ #include "sta_info.h"
+ #include "ap_config.h"
++#include "hostapd.h"
+ 
+ 
+ static void hostapd_config_free_vlan(struct hostapd_bss_config *bss)
+@@ -201,6 +204,30 @@ int hostapd_mac_comp_empty(const void *a)
+ 	return os_memcmp(a, empty, sizeof(macaddr));
+ }
+ 
++int hostapd_open_assoc_log(struct hostapd_data *bss)
++{
++	char *alog = bss->conf->assoc_log_file;
++	if (alog) {
++		int fd = open(alog, O_WRONLY | O_APPEND | O_CREAT | O_NOFOLLOW, 0600);
++		if (fd < 0) {
++			wpa_printf(MSG_ERROR, "Error opening association log file '%s'\n", alog);
++			return -1;
++		}
++		bss->assoc_log_fd = fd;
++		return 1;
++	} else {
++		bss->assoc_log_fd = -1;
++	}
++	return 0;
++}
++
++void hostapd_close_assoc_log(struct hostapd_data *bss)
++{
++	if (bss->assoc_log_fd != -1) {
++		close(bss->assoc_log_fd);
++		bss->assoc_log_fd = -1;
++	}
++}
+ 
+ static int hostapd_config_read_wpa_psk(const char *fname,
+ 				       struct hostapd_ssid *ssid)
+diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
+index 18538c9..205ff42 100644
+--- a/src/ap/ap_config.h
++++ b/src/ap/ap_config.h
+@@ -217,6 +217,8 @@ struct hostapd_bss_config {
+ 	unsigned int logger_syslog; /* module bitfield */
+ 	unsigned int logger_stdout; /* module bitfield */
+ 
++	char *assoc_log_file;
++
+ 	int max_num_sta; /* maximum number of STAs in station table */
+ 
+ 	int dtim_period;
+@@ -629,6 +631,9 @@ struct hostapd_config {
+ #endif /* CONFIG_ACS */
+ };
+ 
++struct hostapd_data;
++int hostapd_open_assoc_log(struct hostapd_data *bss);
++void hostapd_close_assoc_log(struct hostapd_data *bss);
+ 
+ int hostapd_mac_comp(const void *a, const void *b);
+ int hostapd_mac_comp_empty(const void *a);
+diff --git a/src/ap/ap_mlme.c b/src/ap/ap_mlme.c
+index 13604ed..2dd7d72 100644
+--- a/src/ap/ap_mlme.c
++++ b/src/ap/ap_mlme.c
+@@ -35,6 +35,23 @@ static const char * mlme_auth_alg_str(int alg)
+ }
+ #endif /* CONFIG_NO_HOSTAPD_LOGGER */
+ 
++static void write_assoc_log(struct hostapd_data *hapd, struct sta_info *sta, char op) {
++	struct os_time now;
++	int fd = hapd->assoc_log_fd;
++	if (fd >= 0) {
++		os_get_time(&now);
++		char msg[100];
++		sprintf(msg,
++		        "%lu\t" MACSTR "\t%c\t%s\t" MACSTR "\t'%s'\n",
++		        now.sec,
++		        MAC2STR(sta->addr),
++			op,
++		        hapd->conf->iface,
++		        MAC2STR(hapd->own_addr),
++		        wpa_ssid_txt(sta->ssid->ssid, sta->ssid->ssid_len));
++		write(fd, msg, strlen(msg));
++	}
++}
+ 
+ /**
+  * mlme_authenticate_indication - Report the establishment of an authentication
+@@ -104,6 +121,9 @@ void mlme_associate_indication(struct hostapd_data *hapd, struct sta_info *sta)
+ 		       HOSTAPD_LEVEL_DEBUG,
+ 		       "MLME-ASSOCIATE.indication(" MACSTR ")",
+ 		       MAC2STR(sta->addr));
++
++	write_assoc_log(hapd, sta, '+');
++
+ 	if (sta->auth_alg != WLAN_AUTH_FT)
+ 		mlme_deletekeys_request(hapd, sta);
+ }
+@@ -128,6 +148,9 @@ void mlme_reassociate_indication(struct hostapd_data *hapd,
+ 		       HOSTAPD_LEVEL_DEBUG,
+ 		       "MLME-REASSOCIATE.indication(" MACSTR ")",
+ 		       MAC2STR(sta->addr));
++
++	write_assoc_log(hapd, sta, '@');
++
+ 	if (sta->auth_alg != WLAN_AUTH_FT)
+ 		mlme_deletekeys_request(hapd, sta);
+ }
+@@ -152,6 +175,9 @@ void mlme_disassociate_indication(struct hostapd_data *hapd,
+ 		       HOSTAPD_LEVEL_DEBUG,
+ 		       "MLME-DISASSOCIATE.indication(" MACSTR ", %d)",
+ 		       MAC2STR(sta->addr), reason_code);
++
++	write_assoc_log(hapd, sta, '-');
++
+ 	mlme_deletekeys_request(hapd, sta);
+ }
+ 
+diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
+index 9fda339..8157a08 100644
+--- a/src/ap/hostapd.c
++++ b/src/ap/hostapd.c
+@@ -70,6 +70,10 @@ static void hostapd_reload_bss(struct hostapd_data *hapd)
+ 	radius_client_reconfig(hapd->radius, hapd->conf->radius);
+ #endif /* CONFIG_NO_RADIUS */
+ 
++	/* close and reopen assoc_log */
++	hostapd_close_assoc_log(hapd);
++	hostapd_open_assoc_log(hapd);
++
+ 	ssid = &hapd->conf->ssid;
+ 	if (!ssid->wpa_psk_set && ssid->wpa_psk && !ssid->wpa_psk->next &&
+ 	    ssid->wpa_passphrase_set && ssid->wpa_passphrase) {
+diff --git a/src/ap/hostapd.h b/src/ap/hostapd.h
+index 3f79413..891c453 100644
+--- a/src/ap/hostapd.h
++++ b/src/ap/hostapd.h
+@@ -113,6 +113,8 @@ struct hostapd_data {
+ #define STA_HASH(sta) (sta[5])
+ 	struct sta_info *sta_hash[STA_HASH_SIZE];
+ 
++	int assoc_log_fd;
++
+ 	/*
+ 	 * Bitfield for indicating which AIDs are allocated. Only AID values
+ 	 * 1-2007 are used and as such, the bit at index 0 corresponds to AID
+-- 
+2.1.3
+
-- 
1.7.2.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From stefan.tomanek+openwrt at wertarbyte.de  Wed Jan 21 08:59:28 2015
From: stefan.tomanek+openwrt at wertarbyte.de (Stefan Tomanek)
Date: Wed, 21 Jan 2015 14:59:28 +0100
Subject: [OpenWrt-Devel] [PATCH] hostapd: backport BSSID black/whitelists
Message-ID: <20150121135928.GL13405@zirkel.wertarbyte.de>

This change adds the configuration options "bssid_whitelist" and
"bssid_blacklist" used to limit the AP selection of a network to a
specified (finite) set or discard certain APs.

This can be useful for environments where multiple networks operate
using the same SSID and roaming between those is not desired. It is also
useful to ignore a faulty or otherwise unwanted AP.

In many applications it is useful not just to enumerate a group of well
known access points, but to use a address/mask notation to match an
entire set of addresses (ca:ff:ee:00:00:00/ff:ff:ff:00:00:00).

This is especially useful if an OpenWrt device with two radios is used to
retransmit the same network (one in AP mode for other clients, one as STA for
the uplink); the following configuration prevents the device from associating
with itself, given that the own AP to be avoided is using the bssid
'C0:FF:EE:D0:0D:42':

config wifi-iface
	option device 'radio2'
	option network 'uplink'
	option mode 'sta'
	option ssid 'MyNetwork'
	option encryption 'none'
	list bssid_blacklist 'C0:FF:EE:D0:0D:42/00:FF:FF:FF:FF:FF'

This change consists of the following cherry-picked upstream commits:

b3d6a0a8259002448a29f14855d58fe0a624ab76
b83e455451a875ba233b3b8ac29aff8b62f064f2
79cd993a623e101952b81fa6a29c674cd858504f
(squashed to implement bssid_{white,black}lists)

0047306bc9ab7d46e8cc22ff9a3e876c47626473
(Add os_snprintf_error() helper)

Signed-off-by: Stefan Tomanek <stefan.tomanek+openwrt at wertarbyte.de>
---
 package/network/services/hostapd/files/netifd.sh   |    9 +
 .../patches/700-Add-os_snprintf_error-helper.patch |   29 +
 ...work-specific-BSSID-black-and-white-lists.patch |  649 ++++++++++++++++++++
 3 files changed, 687 insertions(+), 0 deletions(-)
 create mode 100644 package/network/services/hostapd/patches/700-Add-os_snprintf_error-helper.patch
 create mode 100644 package/network/services/hostapd/patches/710-Add-network-specific-BSSID-black-and-white-lists.patch

diff --git a/package/network/services/hostapd/files/netifd.sh b/package/network/services/hostapd/files/netifd.sh
index d625709..ed2a631 100644
--- a/package/network/services/hostapd/files/netifd.sh
+++ b/package/network/services/hostapd/files/netifd.sh
@@ -153,6 +153,9 @@ hostapd_common_add_bss_config() {
 	config_add_string macfilter 'macfile:file'
 	config_add_array 'maclist:list(macaddr)'
 
+	config_add_array bssid_blacklist
+	config_add_array bssid_whitelist
+
 	config_add_int mcast_rate
 	config_add_array basic_rate
 	config_add_array supported_rates
@@ -580,6 +583,12 @@ wpa_supplicant_add_network() {
 	[ -n "$bssid" ] && append network_data "bssid=$bssid" "$N$T"
 	[ -n "$beacon_int" ] && append network_data "beacon_int=$beacon_int" "$N$T"
 
+	local bssid_blacklist bssid_whitelist
+	json_get_values bssid_blacklist bssid_blacklist
+	json_get_values bssid_whitelist bssid_whitelist
+
+	[ -n "$bssid_blacklist" ] && append network_data "bssid_blacklist=$bssid_blacklist" "$N$T"
+	[ -n "$bssid_whitelist" ] && append network_data "bssid_whitelist=$bssid_whitelist" "$N$T"
 
 	[ -n "$basic_rate" ] && {
 		local br rate_list=
diff --git a/package/network/services/hostapd/patches/700-Add-os_snprintf_error-helper.patch b/package/network/services/hostapd/patches/700-Add-os_snprintf_error-helper.patch
new file mode 100644
index 0000000..51ad1c4
--- /dev/null
+++ b/package/network/services/hostapd/patches/700-Add-os_snprintf_error-helper.patch
@@ -0,0 +1,29 @@
+Add os_snprintf_error() helper
+
+This can be used to check os_snprintf() return value more consistently.
+
+Signed-off-by: Jouni Malinen <j at w1.fi>
+---
+ src/utils/os.h | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/src/utils/os.h b/src/utils/os.h
+index b9247d8..77250d6 100644
+--- a/src/utils/os.h
++++ b/src/utils/os.h
+@@ -549,6 +549,12 @@ char * os_strdup(const char *s);
+ #endif /* OS_NO_C_LIB_DEFINES */
+ 
+ 
++static inline int os_snprintf_error(size_t size, int res)
++{
++	return res < 0 || (unsigned int) res >= size;
++}
++
++
+ static inline void * os_realloc_array(void *ptr, size_t nmemb, size_t size)
+ {
+ 	if (size && nmemb > (~(size_t) 0) / size)
+-- 
+2.1.3
+
diff --git a/package/network/services/hostapd/patches/710-Add-network-specific-BSSID-black-and-white-lists.patch b/package/network/services/hostapd/patches/710-Add-network-specific-BSSID-black-and-white-lists.patch
new file mode 100644
index 0000000..5b42158
--- /dev/null
+++ b/package/network/services/hostapd/patches/710-Add-network-specific-BSSID-black-and-white-lists.patch
@@ -0,0 +1,649 @@
+Add network specific BSSID black and white lists
+
+This change adds the configuration options "bssid_whitelist" and
+"bssid_blacklist" used to limit the AP selection of a network to a
+specified (finite) set or discard certain APs.
+
+This can be useful for environments where multiple networks operate
+using the same SSID and roaming between those is not desired. It is also
+useful to ignore a faulty or otherwise unwanted AP.
+
+In many applications it is useful not just to enumerate a group of well
+known access points, but to use a address/mask notation to match an
+entire set of addresses (ca:ff:ee:00:00:00/ff:ff:ff:00:00:00).
+
+This change expands the data structures used by MAC lists to include a
+mask indicating the significant (non-masked) portions of an address and
+extends the list parser to recognize mask suffixes.
+
+Signed-off-by: Stefan Tomanek <stefan.tomanek at wertarbyte.de>
+---
+ src/utils/common.c                 |  86 ++++++++++++--
+ src/utils/common.h                 |   3 +
+ wpa_supplicant/config.c            | 223 ++++++++++++++++++++++++-------------
+ wpa_supplicant/config_ssid.h       |  12 ++
+ wpa_supplicant/events.c            |  45 ++++++++
+ wpa_supplicant/p2p_supplicant.c    |  40 ++++---
+ wpa_supplicant/wpa_supplicant.conf |  15 +++
+ 7 files changed, 323 insertions(+), 101 deletions(-)
+
+diff --git a/src/utils/common.c b/src/utils/common.c
+index 9902004..dd6e4aa 100644
+--- a/src/utils/common.c
++++ b/src/utils/common.c
+@@ -36,6 +36,25 @@ int hex2byte(const char *hex)
+ }
+ 
+ 
++static const char * hwaddr_parse(const char *txt, u8 *addr)
++{
++	size_t i;
++
++	for (i = 0; i < ETH_ALEN; i++) {
++		int a;
++
++		a = hex2byte(txt);
++		if (a < 0)
++			return NULL;
++		txt += 2;
++		addr[i] = a;
++		if (i < ETH_ALEN - 1 && *txt++ != ':')
++			return NULL;
++	}
++	return txt;
++}
++
++
+ /**
+  * hwaddr_aton - Convert ASCII string to MAC address (colon-delimited format)
+  * @txt: MAC address as a string (e.g., "00:11:22:33:44:55")
+@@ -44,25 +63,46 @@ int hex2byte(const char *hex)
+  */
+ int hwaddr_aton(const char *txt, u8 *addr)
+ {
+-	int i;
++	return hwaddr_parse(txt, addr) ? 0 : -1;
++}
+ 
+-	for (i = 0; i < 6; i++) {
+-		int a, b;
+ 
+-		a = hex2num(*txt++);
+-		if (a < 0)
+-			return -1;
+-		b = hex2num(*txt++);
+-		if (b < 0)
+-			return -1;
+-		*addr++ = (a << 4) | b;
+-		if (i < 5 && *txt++ != ':')
++/**
++ * hwaddr_masked_aton - Convert ASCII string with optional mask to MAC address (colon-delimited format)
++ * @txt: MAC address with optional mask as a string (e.g., "00:11:22:33:44:55/ff:ff:ff:ff:00:00")
++ * @addr: Buffer for the MAC address (ETH_ALEN = 6 bytes)
++ * @mask: Buffer for the MAC address mask (ETH_ALEN = 6 bytes)
++ * @maskable: Flag to indicate whether a mask is allowed
++ * Returns: 0 on success, -1 on failure (e.g., string not a MAC address)
++ */
++int hwaddr_masked_aton(const char *txt, u8 *addr, u8 *mask, u8 maskable)
++{
++	const char *r;
++
++	/* parse address part */
++	r = hwaddr_parse(txt, addr);
++	if (!r)
++		return -1;
++
++	/* check for optional mask */
++	if (*r == '\0' || isspace(*r)) {
++		/* no mask specified, assume default */
++		os_memset(mask, 0xff, ETH_ALEN);
++	} else if (maskable && *r == '/') {
++		/* mask specified and allowed */
++		r = hwaddr_parse(r + 1, mask);
++		/* parser error? */
++		if (!r)
+ 			return -1;
++	} else {
++		/* mask specified but not allowed or trailing garbage */
++		return -1;
+ 	}
+ 
+ 	return 0;
+ }
+ 
++
+ /**
+  * hwaddr_compact_aton - Convert ASCII string to MAC address (no colon delimitors format)
+  * @txt: MAC address as a string (e.g., "001122334455")
+@@ -144,6 +184,30 @@ int hexstr2bin(const char *hex, u8 *buf, size_t len)
+ }
+ 
+ 
++int hwaddr_mask_txt(char *buf, size_t len, const u8 *addr, const u8 *mask)
++{
++	size_t i;
++	int print_mask = 0;
++	int res;
++
++	for (i = 0; i < ETH_ALEN; i++) {
++		if (mask[i] != 0xff) {
++			print_mask = 1;
++			break;
++		}
++	}
++
++	if (print_mask)
++		res = os_snprintf(buf, len, MACSTR "/" MACSTR,
++				  MAC2STR(addr), MAC2STR(mask));
++	else
++		res = os_snprintf(buf, len, MACSTR, MAC2STR(addr));
++	if (os_snprintf_error(len, res))
++		return -1;
++	return res;
++}
++
++
+ /**
+  * inc_byte_array - Increment arbitrary length byte array by one
+  * @counter: Pointer to byte array
+diff --git a/src/utils/common.h b/src/utils/common.h
+index 14d9ad1..1127074 100644
+--- a/src/utils/common.h
++++ b/src/utils/common.h
+@@ -468,6 +468,7 @@ typedef u64 __bitwise le64;
+ #endif /* __must_check */
+ 
+ int hwaddr_aton(const char *txt, u8 *addr);
++int hwaddr_masked_aton(const char *txt, u8 *addr, u8 *mask, u8 maskable);
+ int hwaddr_compact_aton(const char *txt, u8 *addr);
+ int hwaddr_aton2(const char *txt, u8 *addr);
+ int hex2byte(const char *hex);
+@@ -478,6 +479,8 @@ int wpa_snprintf_hex(char *buf, size_t buf_size, const u8 *data, size_t len);
+ int wpa_snprintf_hex_uppercase(char *buf, size_t buf_size, const u8 *data,
+ 			       size_t len);
+ 
++int hwaddr_mask_txt(char *buf, size_t len, const u8 *addr, const u8 *mask);
++
+ #ifdef CONFIG_NATIVE_WINDOWS
+ void wpa_unicode2ascii_inplace(TCHAR *str);
+ TCHAR * wpa_strdup_tchar(const char *str);
+diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
+index 8d1e1e0..7f742cb 100644
+--- a/wpa_supplicant/config.c
++++ b/wpa_supplicant/config.c
+@@ -235,6 +235,99 @@ static char * wpa_config_write_int(const struct parse_data *data,
+ #endif /* NO_CONFIG_WRITE */
+ 
+ 
++static int wpa_config_parse_addr_list(const struct parse_data *data,
++				      int line, const char *value,
++				      u8 **list, size_t *num, char *name,
++				      u8 abort_on_error, u8 masked)
++{
++	const char *pos;
++	u8 *buf, *n, addr[2 * ETH_ALEN];
++	size_t count;
++
++	buf = NULL;
++	count = 0;
++
++	pos = value;
++	while (pos && *pos) {
++		while (*pos == ' ')
++			pos++;
++
++		if (hwaddr_masked_aton(pos, addr, &addr[ETH_ALEN], masked)) {
++			if (abort_on_error || count == 0) {
++				wpa_printf(MSG_ERROR,
++					   "Line %d: Invalid %s address '%s'",
++					   line, name, value);
++				os_free(buf);
++				return -1;
++			}
++			/* continue anyway since this could have been from a
++			 * truncated configuration file line */
++			wpa_printf(MSG_INFO,
++				   "Line %d: Ignore likely truncated %s address '%s'",
++				   line, name, pos);
++		} else {
++			n = os_realloc_array(buf, count + 1, 2 * ETH_ALEN);
++			if (n == NULL) {
++				os_free(buf);
++				return -1;
++			}
++			buf = n;
++			os_memmove(buf + 2 * ETH_ALEN, buf,
++				   count * 2 * ETH_ALEN);
++			os_memcpy(buf, addr, 2 * ETH_ALEN);
++			count++;
++			wpa_printf(MSG_MSGDUMP,
++				   "%s: addr=" MACSTR " mask=" MACSTR,
++				   name, MAC2STR(addr),
++				   MAC2STR(&addr[ETH_ALEN]));
++		}
++
++		pos = os_strchr(pos, ' ');
++	}
++
++	os_free(*list);
++	*list = buf;
++	*num = count;
++
++	return 0;
++}
++
++
++#ifndef NO_CONFIG_WRITE
++static char * wpa_config_write_addr_list(const struct parse_data *data,
++					 const u8 *list, size_t num, char *name)
++{
++	char *value, *end, *pos;
++	int res;
++	size_t i;
++
++	if (list == NULL || num == 0)
++		return NULL;
++
++	value = os_malloc(2 * 20 * num);
++	if (value == NULL)
++		return NULL;
++	pos = value;
++	end = value + 2 * 20 * num;
++
++	for (i = num; i > 0; i--) {
++		const u8 *a = list + (i - 1) * 2 * ETH_ALEN;
++		const u8 *m = a + ETH_ALEN;
++
++		if (i < num)
++			*pos++ = ' ';
++		res = hwaddr_mask_txt(pos, end - pos, a, m);
++		if (res < 0) {
++			os_free(value);
++			return NULL;
++		}
++		pos += res;
++	}
++
++	return value;
++}
++#endif /* NO_CONFIG_WRITE */
++
+ static int wpa_config_parse_bssid(const struct parse_data *data,
+ 				  struct wpa_ssid *ssid, int line,
+ 				  const char *value)
+@@ -280,6 +373,50 @@ static char * wpa_config_write_bssid(const struct parse_data *data,
+ #endif /* NO_CONFIG_WRITE */
+ 
+ 
++static int wpa_config_parse_bssid_blacklist(const struct parse_data *data,
++					    struct wpa_ssid *ssid, int line,
++					    const char *value)
++{
++	return wpa_config_parse_addr_list(data, line, value,
++					  &ssid->bssid_blacklist,
++					  &ssid->num_bssid_blacklist,
++					  "bssid_blacklist", 1, 1);
++}
++
++
++#ifndef NO_CONFIG_WRITE
++static char * wpa_config_write_bssid_blacklist(const struct parse_data *data,
++					       struct wpa_ssid *ssid)
++{
++	return wpa_config_write_addr_list(data, ssid->bssid_blacklist,
++					  ssid->num_bssid_blacklist,
++					  "bssid_blacklist");
++}
++#endif /* NO_CONFIG_WRITE */
++
++
++static int wpa_config_parse_bssid_whitelist(const struct parse_data *data,
++					    struct wpa_ssid *ssid, int line,
++					    const char *value)
++{
++	return wpa_config_parse_addr_list(data, line, value,
++					  &ssid->bssid_whitelist,
++					  &ssid->num_bssid_whitelist,
++					  "bssid_whitelist", 1, 1);
++}
++
++
++#ifndef NO_CONFIG_WRITE
++static char * wpa_config_write_bssid_whitelist(const struct parse_data *data,
++					       struct wpa_ssid *ssid)
++{
++	return wpa_config_write_addr_list(data, ssid->bssid_whitelist,
++					  ssid->num_bssid_whitelist,
++					  "bssid_whitelist");
++}
++#endif /* NO_CONFIG_WRITE */
++
++
+ static int wpa_config_parse_psk(const struct parse_data *data,
+ 				struct wpa_ssid *ssid, int line,
+ 				const char *value)
+@@ -1435,53 +1572,10 @@ static int wpa_config_parse_p2p_client_list(const struct parse_data *data,
+ 					    struct wpa_ssid *ssid, int line,
+ 					    const char *value)
+ {
+-	const char *pos;
+-	u8 *buf, *n, addr[ETH_ALEN];
+-	size_t count;
+-
+-	buf = NULL;
+-	count = 0;
+-
+-	pos = value;
+-	while (pos && *pos) {
+-		while (*pos == ' ')
+-			pos++;
+-
+-		if (hwaddr_aton(pos, addr)) {
+-			if (count == 0) {
+-				wpa_printf(MSG_ERROR, "Line %d: Invalid "
+-					   "p2p_client_list address '%s'.",
+-					   line, value);
+-				os_free(buf);
+-				return -1;
+-			}
+-			/* continue anyway since this could have been from a
+-			 * truncated configuration file line */
+-			wpa_printf(MSG_INFO, "Line %d: Ignore likely "
+-				   "truncated p2p_client_list address '%s'",
+-				   line, pos);
+-		} else {
+-			n = os_realloc_array(buf, count + 1, ETH_ALEN);
+-			if (n == NULL) {
+-				os_free(buf);
+-				return -1;
+-			}
+-			buf = n;
+-			os_memmove(buf + ETH_ALEN, buf, count * ETH_ALEN);
+-			os_memcpy(buf, addr, ETH_ALEN);
+-			count++;
+-			wpa_hexdump(MSG_MSGDUMP, "p2p_client_list",
+-				    addr, ETH_ALEN);
+-		}
+-
+-		pos = os_strchr(pos, ' ');
+-	}
+-
+-	os_free(ssid->p2p_client_list);
+-	ssid->p2p_client_list = buf;
+-	ssid->num_p2p_clients = count;
+-
+-	return 0;
++	return wpa_config_parse_addr_list(data, line, value,
++					  &ssid->p2p_client_list,
++					  &ssid->num_p2p_clients,
++					  "p2p_client_list", 0, 0);
+ }
+ 
+ 
+@@ -1489,34 +1583,9 @@ static int wpa_config_parse_p2p_client_list(const struct parse_data *data,
+ static char * wpa_config_write_p2p_client_list(const struct parse_data *data,
+ 					       struct wpa_ssid *ssid)
+ {
+-	char *value, *end, *pos;
+-	int res;
+-	size_t i;
+-
+-	if (ssid->p2p_client_list == NULL || ssid->num_p2p_clients == 0)
+-		return NULL;
+-
+-	value = os_malloc(20 * ssid->num_p2p_clients);
+-	if (value == NULL)
+-		return NULL;
+-	pos = value;
+-	end = value + 20 * ssid->num_p2p_clients;
+-
+-	for (i = ssid->num_p2p_clients; i > 0; i--) {
+-		res = os_snprintf(pos, end - pos, MACSTR " ",
+-				  MAC2STR(ssid->p2p_client_list +
+-					  (i - 1) * ETH_ALEN));
+-		if (res < 0 || res >= end - pos) {
+-			os_free(value);
+-			return NULL;
+-		}
+-		pos += res;
+-	}
+-
+-	if (pos > value)
+-		pos[-1] = '\0';
+-
+-	return value;
++	return wpa_config_write_addr_list(data, ssid->p2p_client_list,
++					  ssid->num_p2p_clients,
++					  "p2p_client_list");
+ }
+ #endif /* NO_CONFIG_WRITE */
+ 
+@@ -1667,6 +1736,8 @@ static const struct parse_data ssid_fields[] = {
+ 	{ STR_RANGE(ssid, 0, MAX_SSID_LEN) },
+ 	{ INT_RANGE(scan_ssid, 0, 1) },
+ 	{ FUNC(bssid) },
++	{ FUNC(bssid_blacklist) },
++	{ FUNC(bssid_whitelist) },
+ 	{ FUNC_KEY(psk) },
+ 	{ FUNC(proto) },
+ 	{ FUNC(key_mgmt) },
+@@ -1971,6 +2042,8 @@ void wpa_config_free_ssid(struct wpa_ssid *ssid)
+ 	os_free(ssid->freq_list);
+ 	os_free(ssid->bgscan);
+ 	os_free(ssid->p2p_client_list);
++	os_free(ssid->bssid_blacklist);
++	os_free(ssid->bssid_whitelist);
+ #ifdef CONFIG_HT_OVERRIDES
+ 	os_free(ssid->ht_mcs);
+ #endif /* CONFIG_HT_OVERRIDES */
+diff --git a/wpa_supplicant/config_ssid.h b/wpa_supplicant/config_ssid.h
+index a4910d0..7443207 100644
+--- a/wpa_supplicant/config_ssid.h
++++ b/wpa_supplicant/config_ssid.h
+@@ -128,6 +128,18 @@ struct wpa_ssid {
+ 	u8 bssid[ETH_ALEN];
+ 
+ 	/**
++	 * bssid_blacklist - List of inacceptable BSSIDs
++	 */
++	u8 *bssid_blacklist;
++	size_t num_bssid_blacklist;
++
++	/**
++	 * bssid_blacklist - List of acceptable BSSIDs
++	 */
++	u8 *bssid_whitelist;
++	size_t num_bssid_whitelist;
++
++	/**
+ 	 * bssid_set - Whether BSSID is configured for this network
+ 	 */
+ 	int bssid_set;
+diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
+index 6761c1a..855653c 100644
+--- a/wpa_supplicant/events.c
++++ b/wpa_supplicant/events.c
+@@ -703,6 +703,33 @@ static int bss_is_ess(struct wpa_bss *bss)
+ }
+ 
+ 
++static int match_mac_mask(const u8 *addr_a, const u8 *addr_b, const u8 *mask)
++{
++	size_t i;
++
++	for (i = 0; i < ETH_ALEN; i++) {
++		if ((addr_a[i] & mask[i]) != (addr_b[i] & mask[i]))
++			return 0;
++	}
++	return 1;
++}
++
++
++static int addr_in_list(const u8 *addr, const u8 *list, size_t num)
++{
++	size_t i;
++
++	for (i = 0; i < num; i++) {
++		const u8 *a = list + i * ETH_ALEN * 2;
++		const u8 *m = a + ETH_ALEN;
++
++		if (match_mac_mask(a, addr, m))
++			return 1;
++	}
++	return 0;
++}
++
++
+ static struct wpa_ssid * wpa_scan_res_match(struct wpa_supplicant *wpa_s,
+ 					    int i, struct wpa_bss *bss,
+ 					    struct wpa_ssid *group,
+@@ -827,6 +854,24 @@ static struct wpa_ssid * wpa_scan_res_match(struct wpa_supplicant *wpa_s,
+ 			continue;
+ 		}
+ 
++		/* check blacklist */
++		if (ssid->num_bssid_blacklist &&
++		    addr_in_list(bss->bssid, ssid->bssid_blacklist,
++				 ssid->num_bssid_blacklist)) {
++			wpa_dbg(wpa_s, MSG_DEBUG,
++				"   skip - BSSID blacklisted");
++			continue;
++		}
++
++		/* if there is a whitelist, only accept those APs */
++		if (ssid->num_bssid_whitelist &&
++		    !addr_in_list(bss->bssid, ssid->bssid_whitelist,
++				  ssid->num_bssid_whitelist)) {
++			wpa_dbg(wpa_s, MSG_DEBUG,
++				"   skip - BSSID not in whitelist");
++			continue;
++		}
++
+ 		if (!wpa_supplicant_ssid_bss_match(wpa_s, ssid, bss))
+ 			continue;
+ 
+diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
+index 8cd43df..60dcb5d 100644
+--- a/wpa_supplicant/p2p_supplicant.c
++++ b/wpa_supplicant/p2p_supplicant.c
+@@ -831,7 +831,7 @@ static void wpas_p2p_add_persistent_group_client(struct wpa_supplicant *wpa_s,
+ 		return;
+ 
+ 	for (i = 0; s->p2p_client_list && i < s->num_p2p_clients; i++) {
+-		if (os_memcmp(s->p2p_client_list + i * ETH_ALEN, addr,
++		if (os_memcmp(s->p2p_client_list + i * 2 * ETH_ALEN, addr,
+ 			      ETH_ALEN) != 0)
+ 			continue;
+ 
+@@ -839,32 +839,42 @@ static void wpas_p2p_add_persistent_group_client(struct wpa_supplicant *wpa_s,
+ 			return; /* already the most recent entry */
+ 
+ 		/* move the entry to mark it most recent */
+-		os_memmove(s->p2p_client_list + i * ETH_ALEN,
+-			   s->p2p_client_list + (i + 1) * ETH_ALEN,
+-			   (s->num_p2p_clients - i - 1) * ETH_ALEN);
++		os_memmove(s->p2p_client_list + i * 2 * ETH_ALEN,
++			   s->p2p_client_list + (i + 1) * 2 * ETH_ALEN,
++			   (s->num_p2p_clients - i - 1) * 2 * ETH_ALEN);
+ 		os_memcpy(s->p2p_client_list +
+-			  (s->num_p2p_clients - 1) * ETH_ALEN, addr, ETH_ALEN);
++			  (s->num_p2p_clients - 1) * 2 * ETH_ALEN, addr,
++			  ETH_ALEN);
++		os_memset(s->p2p_client_list +
++			  (s->num_p2p_clients - 1) * 2 * ETH_ALEN + ETH_ALEN,
++			  0xff, ETH_ALEN);
+ 		found = 1;
+ 		break;
+ 	}
+ 
+ 	if (!found && s->num_p2p_clients < P2P_MAX_STORED_CLIENTS) {
+ 		n = os_realloc_array(s->p2p_client_list,
+-				     s->num_p2p_clients + 1, ETH_ALEN);
++				     s->num_p2p_clients + 1, 2 * ETH_ALEN);
+ 		if (n == NULL)
+ 			return;
+-		os_memcpy(n + s->num_p2p_clients * ETH_ALEN, addr, ETH_ALEN);
++		os_memcpy(n + s->num_p2p_clients * 2 * ETH_ALEN, addr,
++			  ETH_ALEN);
++		os_memset(n + s->num_p2p_clients * 2 * ETH_ALEN + ETH_ALEN,
++			  0xff, ETH_ALEN);
+ 		s->p2p_client_list = n;
+ 		s->num_p2p_clients++;
+ 	} else if (!found && s->p2p_client_list) {
+ 		/* Not enough room for an additional entry - drop the oldest
+ 		 * entry */
+ 		os_memmove(s->p2p_client_list,
+-			   s->p2p_client_list + ETH_ALEN,
+-			   (s->num_p2p_clients - 1) * ETH_ALEN);
++			   s->p2p_client_list + 2 * ETH_ALEN,
++			   (s->num_p2p_clients - 1) * 2 * ETH_ALEN);
+ 		os_memcpy(s->p2p_client_list +
+-			  (s->num_p2p_clients - 1) * ETH_ALEN,
++			  (s->num_p2p_clients - 1) * 2 * ETH_ALEN,
+ 			  addr, ETH_ALEN);
++		os_memset(s->p2p_client_list +
++			  (s->num_p2p_clients - 1) * 2 * ETH_ALEN + ETH_ALEN,
++			  0xff, ETH_ALEN);
+ 	}
+ 
+ 	if (wpa_s->parent->conf->update_config &&
+@@ -3276,7 +3286,7 @@ static void wpas_remove_persistent_peer(struct wpa_supplicant *wpa_s,
+ 		return;
+ 
+ 	for (i = 0; ssid->p2p_client_list && i < ssid->num_p2p_clients; i++) {
+-		if (os_memcmp(ssid->p2p_client_list + i * ETH_ALEN, peer,
++		if (os_memcmp(ssid->p2p_client_list + i * 2 * ETH_ALEN, peer,
+ 			      ETH_ALEN) == 0)
+ 			break;
+ 	}
+@@ -3296,9 +3306,9 @@ static void wpas_remove_persistent_peer(struct wpa_supplicant *wpa_s,
+ 		   "group %d client list%s",
+ 		   MAC2STR(peer), ssid->id,
+ 		   inv ? " due to invitation result" : "");
+-	os_memmove(ssid->p2p_client_list + i * ETH_ALEN,
+-		   ssid->p2p_client_list + (i + 1) * ETH_ALEN,
+-		   (ssid->num_p2p_clients - i - 1) * ETH_ALEN);
++	os_memmove(ssid->p2p_client_list + i * 2 * ETH_ALEN,
++		   ssid->p2p_client_list + (i + 1) * 2 * ETH_ALEN,
++		   (ssid->num_p2p_clients - i - 1) * 2 * ETH_ALEN);
+ 	ssid->num_p2p_clients--;
+ 	if (wpa_s->parent->conf->update_config &&
+ 	    wpa_config_write(wpa_s->parent->confname, wpa_s->parent->conf))
+@@ -6925,7 +6935,7 @@ struct wpa_ssid * wpas_p2p_get_persistent(struct wpa_supplicant *wpa_s,
+ 		if (s->mode != WPAS_MODE_P2P_GO || s->p2p_client_list == NULL)
+ 			continue;
+ 		for (i = 0; i < s->num_p2p_clients; i++) {
+-			if (os_memcmp(s->p2p_client_list + i * ETH_ALEN,
++			if (os_memcmp(s->p2p_client_list + i * 2 * ETH_ALEN,
+ 				      addr, ETH_ALEN) == 0)
+ 				return s; /* peer is P2P client in persistent
+ 					   * group */
+diff --git a/wpa_supplicant/wpa_supplicant.conf b/wpa_supplicant/wpa_supplicant.conf
+index 0e8a28a..4bc08db 100644
+--- a/wpa_supplicant/wpa_supplicant.conf
++++ b/wpa_supplicant/wpa_supplicant.conf
+@@ -1408,6 +1408,21 @@ network={
+ 	key_mgmt=NONE
+ }
+ 
++# Example configuration blacklisting two APs - these will be ignored
++# for this network.
++network={
++	ssid="example"
++	psk="very secret passphrase"
++	bssid_blacklist=02:11:22:33:44:55 02:22:aa:44:55:66
++}
++
++# Example configuration limiting AP selection to a specific set of APs;
++# any other AP not matching the masked address will be ignored.
++network={
++	ssid="example"
++	psk="very secret passphrase"
++	bssid_whitelist=02:55:ae:bc:00:00/ff:ff:ff:ff:00:00 00:00:77:66:55:44/00:00:ff:ff:ff:ff
++}
+ 
+ # Example config file that will only scan on channel 36.
+ freq_list=5180
+-- 
+2.1.3
+
-- 
1.7.2.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From ning at oaklight.us  Wed Jan 21 12:08:33 2015
From: ning at oaklight.us (Ning Ye)
Date: Wed, 21 Jan 2015 12:08:33 -0500
Subject: [OpenWrt-Devel] QEMU 2.0.0
Message-ID: <00cf01d0359c$e3493360$a9db9a20$@oaklight.us>

I am just wondering if anyone maintains QEMU in OpenWRT toolchain.  I want
to use QEMU 2.0.0 or later as it fixed VHD virtual disk issues.  Of course,
it has dependency on other library which is not simple to upgrade. That's
where I am stuck now.  

I am currently use QEMU 2.0 separately from OpenWRT build and manually run
the tools on my Linux Host to convert and generate VHD images.

Any suggestions would be deeply appreciated.  Thanks.

Ning
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From hannu.nyman at iki.fi  Wed Jan 21 13:15:07 2015
From: hannu.nyman at iki.fi (Hannu Nyman)
Date: Wed, 21 Jan 2015 20:15:07 +0200
Subject: [OpenWrt-Devel] Proposal: change buildbot's build failure logic to
 be less restrictive regarding packages from feeds
Message-ID: <54BFECAB.6000100@iki.fi>

We have seen several times in the past few months that one non-essential 
package from feeds fails to build and stops the whole buildbot build. 
Yesterday it was "ola" from packages feeds, and in the past few months at 
least "python" from packages and  "ltq-vmmc" from telephony have done the same.

Examples:
https://github.com/openwrt/packages/commit/3505f198bbeacc1a447e77464c53e844b955d2a8
https://github.com/openwrt/packages/pull/423#issuecomment-59117415
https://github.com/openwrt/telephony/issues/2

It seems crazy to me that non-essential packages from feeds, which by 
definition are non-essential, can kill the whole buildbot build for a platform.

Normally a failing package gets marked "broken", but the build still 
continues. However, some packages from feeds seem to kill the whole build 
when they fail.

As far as I have been able to determine, if the failing package contains 
either a kernel module (kmod) or a "host section", then the failure of that 
package is considered so essential that the whole builbot build is halted. 
The package is not just classified as "broken package", but the whole build 
is really stopped.

I understand that a host section breakage from a tool, toolchain component or 
a core package in the main Openwrt repo may be reason enough to halt the 
build. Same goes for a kmod.

But when that failure happens to a package from e.g. telephony feed, I do not 
really understand why the whole buildbot build needs to be halted. The more 
we have packages maintained in Github by a large group of people, the more we 
will have this kind of accidental breakages by small non-essential packages.

I propose that devs would change the buildbot build failure logic so that the 
failing packages from the feeds would not kill the whole build. Failing 
packages from feeds should just me marked as broken. That might require 
splitting "package compilation" step 25 to two different steps, one for 
packages from the Openwrt main repo, one for packages from feeds. (or 
alternatively, the essential packages should contain an ESSENTIAL definition 
on the Makefile, or something like that, and the failure logic should take 
that into account.)
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From nbd at openwrt.org  Wed Jan 21 13:58:55 2015
From: nbd at openwrt.org (Felix Fietkau)
Date: Wed, 21 Jan 2015 19:58:55 +0100
Subject: [OpenWrt-Devel] [PATCH 1/5] uloop: fix out-of-bound loop index.
In-Reply-To: <1421846488-323-1-git-send-email-yszhou4tech@gmail.com>
References: <1421846488-323-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <54BFF6EF.1010809@openwrt.org>

On 2015-01-21 14:21, Yousong Zhou wrote:
> Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
> ---
>  uloop.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/uloop.c b/uloop.c
> index 9a77ce4..3224f4b 100644
> --- a/uloop.c
> +++ b/uloop.c
> @@ -394,11 +394,11 @@ int uloop_fd_delete(struct uloop_fd *fd)
>  {
>  	int i;
>  
> -	for (i = 0; i < cur_nfds; i++) {
> -		if (cur_fds[cur_fd + i].fd != fd)
> +	for (i = cur_fd; i < cur_nfds; i++) {
> +		if (cur_fds[i].fd != fd)
This patch (aside from the fact that it's completely missing an
explanation) seems wrong to me.
cur_nfds really means the number of file descriptors in the struct, not
the array size starting at 0.
Take a look at uloop_run_events - when it increments cur_fd, it also
decrements cur_nfds.

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


From ning at oaklight.us  Wed Jan 21 14:04:13 2015
From: ning at oaklight.us (Ning Ye)
Date: Wed, 21 Jan 2015 14:04:13 -0500
Subject: [OpenWrt-Devel] Hyper-V Support for X86 or X86_64
Message-ID: <00dc01d035ad$0bb2b5a0$231820e0$@oaklight.us>

This is the latest Hyper-V patch to support Linux 3.14.


Signed-off-by: Ning Ye <ning at oaklight.us>
--------------------------------------------------------
diff --git a/config/Config-images.in b/config/Config-images.in
old mode 100644
new mode 100755
index 5c2e79e..b8e9d9d
--- a/config/Config-images.in
+++ b/config/Config-images.in
@@ -239,6 +239,16 @@ menu "Target Images"
 		select TARGET_IMAGES_PAD
 		select PACKAGE_kmod-e1000
 
+	config VHD_IMAGES
+		bool "Build Hyper-V image files (VHD)"
+		depends on TARGET_x86 || TARGET_x86_64
+		select GRUB_IMAGES
+		select TARGET_IMAGES_PAD
+		select PACKAGE_kmod-hyperv-balloon
+		select PACKAGE_kmod-hyperv-net-vsc
+		select PACKAGE_kmod-hyperv-util
+		select PACKAGE_kmod-hyperv-storage
+
 	config TARGET_IMAGES_PAD
 		bool "Pad images to filesystem size (for JFFS2)"
 		depends on OLPC_BOOTSCRIPT_IMAGES || GRUB_IMAGES
diff --git a/package/kernel/linux/modules/virtual.mk b/package/kernel/linux/modules/virtual.mk
old mode 100644
new mode 100755
index 190d844..a67d71c
--- a/package/kernel/linux/modules/virtual.mk
+++ b/package/kernel/linux/modules/virtual.mk
@@ -186,3 +186,85 @@ define KernelPackage/xen-pcidev/description
 endef
 
 $(eval $(call KernelPackage,xen-pcidev))
+
+#
+# Hyper-V Drives depends on x86 or x86_64.
+#
+define KernelPackage/hyperv-balloon
+  SUBMENU:=$(VIRTUAL_MENU)
+  DEPENDS:=@(TARGET_x86||TARGET_x86_64)
+  TITLE:=Microsoft Hyper-V Balloon Driver
+  KCONFIG:= \
+    CONFIG_HYPERV_BALLOON \
+    CONFIG_HYPERVISOR_GUEST=y \
+    CONFIG_PARAVIRT=n \
+    CONFIG_HYPERV=y
+  FILES:=$(LINUX_DIR)/drivers/hv/hv_balloon.ko
+  AUTOLOAD:=$(call AutoLoad,06,hv_balloon)
+endef
+
+define KernelPackage/hyperv-balloon/description
+  Microsofot Hyper-V balloon driver.
+endef
+
+$(eval $(call KernelPackage,hyperv-balloon))
+
+define KernelPackage/hyperv-net-vsc
+  SUBMENU:=$(VIRTUAL_MENU)
+  DEPENDS:=@(TARGET_x86||TARGET_x86_64)
+  TITLE:=Microsoft Hyper-V Network Driver
+  KCONFIG:= \
+    CONFIG_HYPERV_NET \
+    CONFIG_HYPERVISOR_GUEST=y \
+    CONFIG_PARAVIRT=n \
+    CONFIG_HYPERV=y
+  FILES:=$(LINUX_DIR)/drivers/net/hyperv/hv_netvsc.ko
+  AUTOLOAD:=$(call AutoLoad,35,hv_netvsc)
+endef
+
+define KernelPackage/hyperv-net-vsc/description
+  Microsoft Hyper-V Network Driver
+endef
+
+$(eval $(call KernelPackage,hyperv-net-vsc))
+
+define KernelPackage/hyperv-util
+  SUBMENU:=$(VIRTUAL_MENU)
+  DEPENDS:=@(TARGET_x86||TARGET_x86_64)
+  TITLE:=Microsoft Hyper-V Utility Driver
+  KCONFIG:= \
+    CONFIG_HYPERV_UTILS \
+    CONFIG_HYPERVISOR_GUEST=y \
+    CONFIG_PARAVIRT=n \
+    CONFIG_HYPERV=y
+  FILES:=$(LINUX_DIR)/drivers/hv/hv_util.ko
+  AUTOLOAD:=$(call AutoLoad,10,hv_util)
+endef
+
+define KernelPackage/hyperv-util/description
+  Microsoft Hyper-V Utility Driver
+endef
+
+$(eval $(call KernelPackage,hyperv-util))
+
+#
+# Hyper-V Storage Drive needs to be in kernel rather than module to load the root fs.
+#
+define KernelPackage/hyperv-storage
+  SUBMENU:=$(VIRTUAL_MENU)
+  DEPENDS:=@(TARGET_x86||TARGET_x86_64) +kmod-scsi-core
+  TITLE:=Microsoft Hyper-V Storage Driver
+  KCONFIG:= \
+    CONFIG_HYPERV_STORAGE=y \
+    CONFIG_HYPERVISOR_GUEST=y \
+    CONFIG_PARAVIRT=n \
+    CONFIG_HYPERV=y 
+  FILES:=$(LINUX_DIR)/drivers/scsi/hv_storvsc.ko
+  AUTOLOAD:=$(call AutoLoad,40,hv_storvsc)
+endef
+
+define KernelPackage/hyperv-storage/description
+  Microsoft Hyper-V Storage Driver
+endef
+
+$(eval $(call KernelPackage,hyperv-storage))
diff --git a/target/linux/x86/config-3.14 b/target/linux/x86/config-3.14
old mode 100644
new mode 100755
index 591fa17..f3f5456
--- a/target/linux/x86/config-3.14
+++ b/target/linux/x86/config-3.14
@@ -197,6 +197,15 @@ CONFIG_HW_RANDOM=y
 CONFIG_HW_RANDOM_GEODE=y
 CONFIG_HW_RANDOM_VIA=y
 # CONFIG_HYPERVISOR_GUEST is not set
+# CONFIG_HYPERV is not set
+# CONFIG_HYPERV_BALLOON is not set
+# CONFIG_HYPERV_NET is not set
+# CONFIG_HYPERV_STORAGE is not set
+# CONFIG_HYPERV_UTILS is not set
+# CONFIG_HYPERV_KEYBOARD is not set
+# CONFIG_FB_HYPERV is not set
+# CONFIG_HID_HYPERV_MOUSE is not set
+# CONFIG_VMWARE_BALLOON is not set
 CONFIG_HZ_PERIODIC=y
 CONFIG_I8253_LOCK=y
 # CONFIG_I8K is not set
diff --git a/target/linux/x86/image/Makefile b/target/linux/x86/image/Makefile
old mode 100644
new mode 100755
index 5983718..80ef5cf
--- a/target/linux/x86/image/Makefile
+++ b/target/linux/x86/image/Makefile
@@ -178,6 +178,15 @@ ifneq ($(CONFIG_VMDK_IMAGES),)
   endef
 endif
 
+ifneq ($(CONFIG_VHD_IMAGES),)
+  define Image/Build/vhd
+	rm $(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).vhd || true
+	qemu-img convert -f raw -O vpc \
+		$(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).img \
+		$(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).vhd
+  endef
+endif
+
 define Image/Build/gzip
 	gzip -f9 $(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).img
 	gzip -f9 $(BIN_DIR)/$(IMG_PREFIX)-rootfs-$(1).img
@@ -252,6 +261,7 @@ define Image/Build
 	$(call Image/Build/grub2,$(1))
 	$(call Image/Build/vdi,$(1))
 	$(call Image/Build/vmdk,$(1))
+	$(call Image/Build/vhd,$(1))
 	$(CP) $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-rootfs-$(1).img
   else
 	$(CP) $(KDIR)/root.iso $(BIN_DIR)/$(IMG_PREFIX).iso
diff --git a/target/linux/x86_64/config-default b/target/linux/x86_64/config-default
old mode 100644
new mode 100755
index dde8b25..dee3266
--- a/target/linux/x86_64/config-default
+++ b/target/linux/x86_64/config-default
@@ -258,6 +258,13 @@ CONFIG_HW_RANDOM=y
 CONFIG_HW_RANDOM_INTEL=y
 # CONFIG_HW_RANDOM_VIRTIO is not set
 CONFIG_HYPERVISOR_GUEST=y
+# CONFIG_HYPERV is not set
+# CONFIG_HYPERV_BALLOON is not set
+# CONFIG_HYPERV_NET is not set
+# CONFIG_HYPERV_STORAGE is not set
+# CONFIG_HYPERV_UTILS is not set
+# CONFIG_FB_HYPERV is not set
+# CONFIG_HID_HYPERV_MOUSE is not set
 CONFIG_HZ_PERIODIC=y
 # CONFIG_I7300_IDLE is not set
 CONFIG_I8253_LOCK=y
diff --git a/target/linux/x86_64/image/Makefile b/target/linux/x86_64/image/Makefile
old mode 100644
new mode 100755
index e8d9ac1..a8fa85d
--- a/target/linux/x86_64/image/Makefile
+++ b/target/linux/x86_64/image/Makefile
@@ -158,6 +158,16 @@ ifneq ($(CONFIG_VMDK_IMAGES),)
   endef
 endif
 
+ifneq ($(CONFIG_VHD_IMAGES),)
+  define Image/Build/vhd
+	rm $(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).vhd || true
+	qemu-img convert -f raw -O vpc \
+		$(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).img \
+		$(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).vhd
+  endef
+endif
+
+
 define Image/Build/gzip
 	gzip -f9 $(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).img
 	gzip -f9 $(BIN_DIR)/$(IMG_PREFIX)-rootfs-$(1).img
@@ -201,6 +211,7 @@ define Image/Build
 	$(call Image/Build/grub2,$(1))
 	$(call Image/Build/vdi,$(1))
 	$(call Image/Build/vmdk,$(1))
+	$(call Image/Build/vhd,$(1))
 	$(CP) $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-rootfs-$(1).img
   else
 	$(CP) $(KDIR)/root.iso $(BIN_DIR)/$(IMG_PREFIX).iso
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From nbd at openwrt.org  Wed Jan 21 14:12:12 2015
From: nbd at openwrt.org (Felix Fietkau)
Date: Wed, 21 Jan 2015 20:12:12 +0100
Subject: [OpenWrt-Devel] [PATCH 5/5] utils: use clock_get_time() for
 clock_gettime() on Apple.
In-Reply-To: <1421846488-323-5-git-send-email-yszhou4tech@gmail.com>
References: <1421846488-323-1-git-send-email-yszhou4tech@gmail.com>
 <1421846488-323-5-git-send-email-yszhou4tech@gmail.com>
Message-ID: <54BFFA0C.2040800@openwrt.org>

On 2015-01-21 14:21, Yousong Zhou wrote:
> It turns out that mach_absolute_time() is not monotonic at all.  While
> at it, convert the CLOCK_REALTIME implementation to using
> clock_get_time() as well.
> 
> Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
Applied the remaining 4 patches, thanks.

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


From osk at exegin.com  Wed Jan 21 14:34:21 2015
From: osk at exegin.com (Owen Kirby)
Date: Wed, 21 Jan 2015 11:34:21 -0800
Subject: [OpenWrt-Devel] [PATCH v2] procd: delay inittab workers until
	the tty exists.
In-Reply-To: <54BDF707.2020702@openwrt.org>
References: <54BD9F8A.2020907@exegin.com> <54BDF707.2020702@openwrt.org>
Message-ID: <54BFFF3D.9030105@exegin.com>

John,

On 15-01-19 10:34 PM, John Crispin wrote:
>
> On 20/01/2015 01:21, Owen Kirby wrote:
>> Add hotplug support for tty devices in /etc/inittab that are specified
>> by the askfirst
>> keyword so that terminals attached after boot time get console processes
>> started.
>>
>> This was tested on an AT91 target using the gadget serial subsystem and
>> on an WNDR3800
>> with a USB serial adapter. One possible weirdness I encountered was that
>> the baud rates
>> and control modes sometimes need adjusting with a hotplug script after
>> reconnecting
>> the adapter. This is also only implemented for askfirst, but it might
>> also make sense
>> to do the same thing for respawn and askconsole.
>>
>
> i think it would be a lot simpler if you ...
>
> * add a new cmd_handler inside hotplug/json_script called console or
> spawn_console
> * add a 2nd parameter to procd_inittab_run called char *tty that can be
> NULL or act as a filter
> * call procd_inittab_run with the 2nd parameter set from the new
> json_script handler
> * add a new if clause to package/system/procd/files/hotplug.json
I'm not sure that would really be any simpler. The cmd_handler would 
need to deal with respawning the console process and would wind up 
duplicating a the code already in inittab.c. It seemed like less work to 
simply extend the hotplug system to add a way for the inittab.c code to 
receive notifications of hotplug events. There is also the question of 
where this 2nd parameter to procd_inittab_run would come from, would we 
need to parse the /etc/hotplug.json script for anything that might spawn 
a console, and what if there were multiple consoles created this way in 
the hotplug script?

Furthermore, it seems like the description of which tty devices should 
spawn consoles and which devices don't is really a board-specific 
configuration item that seems inappropriate to put into /etc/hotplug.json.

Although, adding a new cmd_handler for creating consoles is an 
interesting idea. We could get rid of /etc/inittab entirely by creating 
all the consoles that way.

But, if you really think that's the best approach then I'll code up a 
3rd version of the patch for you.

Cheers,
Owen
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From kbuska at gmail.com  Wed Jan 21 14:43:26 2015
From: kbuska at gmail.com (Ken Buska)
Date: Wed, 21 Jan 2015 11:43:26 -0800
Subject: [OpenWrt-Devel] Ubiquiti XW builds
Message-ID: <CAMpkmhxvJSfst+jwjVnp-X1VL5P5my7HCrmt_pbJQ442vv7zLg@mail.gmail.com>

Good day, I'm looking for a XW build for a RocketM5, RocketM5 Titanium, or
BulletM5. Do you have any suggestions or can you point me in a direction?
Its great that a XW build is available for the Loco and Nano but it doesn't
work for my situation where we use Rockets for AP's.

-- 
Thank you,
Ken
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150121/449ab768/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From santicomp2 at gmail.com  Wed Jan 21 15:42:32 2015
From: santicomp2 at gmail.com (Santiago Regusci)
Date: Wed, 21 Jan 2015 18:42:32 -0200
Subject: [OpenWrt-Devel] Fwd: MIPS libatomic
In-Reply-To: <CA+U=DspSkK+3sNtJs0RsDtYn-aH9YoeTAPPwzszwN01VoQf8Dg@mail.gmail.com>
References: <CAFg56-rsc-nM+7Mi44PWMr71-bZoicDZiwR1AewNAqS+GxOExg@mail.gmail.com>
 <CAFg56-r7cZo+aTDHPrP5V-=80=6XzZjjmrS0LL84Yb=juDc-Dw@mail.gmail.com>
 <CA+U=DspSkK+3sNtJs0RsDtYn-aH9YoeTAPPwzszwN01VoQf8Dg@mail.gmail.com>
Message-ID: <CAFg56-pizLabE+gu867V4HAuY+5upXCqYfYERu4Z5Lfjq=Wj2w@mail.gmail.com>

this time i downloaded the trunk
I found
/home/pc/pruebaBB/openwrt/build_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/gcc-linaro-4.8-2014.04-final/mips-openwrt-linux-uclibc/libgcc/libgcc-std.ver:
 1830    __sync_fetch_and_xor_1
 1831    __sync_fetch_and_nand_1
 1832:   __sync_add_and_fetch_1
 1833    __sync_sub_and_fetch_1
 1834    __sync_or_and_fetch_1
 ....
 1894    __sync_fetch_and_xor_16
 1895    __sync_fetch_and_nand_16
 1896:   __sync_add_and_fetch_16
 1897    __sync_sub_and_fetch_16
 1898    __sync_or_and_fetch_16

i also added libatomic to to the package depends with no success.
i couldn't find flags to enable atomic operations.

has anybody had this issue?
i don't know what i am missing


2015-01-21 6:30 GMT-02:00 Alexandru Ardelean <ardeleanalex at gmail.com>:

> I don't think libatomic exports that symbol.
> It looks like that symbol should be in the standard gcc.
>
> You can try to add +libatomic to the DEPENDS section of czmq to see if
> that helps.
> But note that the libatomic package was added in this commit:
> 7edd1ccebaf00db527fcbb1c6e75827722cfdc21
>
> I'd say to pull a clone of the latest OpenWRT trunk and compare.
> I don't know what the toolchain version of Barrier Breaker is.
>
> Here's on the latest trunk (I don't have a MIPS build right now):
> build_dir/toolchain-x86_64_gcc-4.8-linaro_uClibc-0.9.33.2/gcc-linaro-4.8-2014.04-final/x86_64-openwrt-linux-uclibc/libgcc/libgcc-std.ver:
> __sync_add_and_fetch_1
> build_dir/toolchain-x86_64_gcc-4.8-linaro_uClibc-0.9.33.2/gcc-linaro-4.8-2014.04-final/x86_64-openwrt-linux-uclibc/libgcc/libgcc-std.ver:
> __sync_add_and_fetch_2
> build_dir/toolchain-x86_64_gcc-4.8-linaro_uClibc-0.9.33.2/gcc-linaro-4.8-2014.04-final/x86_64-openwrt-linux-uclibc/libgcc/libgcc-std.ver:
> __sync_add_and_fetch_4
> build_dir/toolchain-x86_64_gcc-4.8-linaro_uClibc-0.9.33.2/gcc-linaro-4.8-2014.04-final/x86_64-openwrt-linux-uclibc/libgcc/libgcc-std.ver:
> __sync_add_and_fetch_8
> build_dir/toolchain-x86_64_gcc-4.8-linaro_uClibc-0.9.33.2/gcc-linaro-4.8-2014.04-final/x86_64-openwrt-linux-uclibc/libgcc/libgcc-std.ver:
> __sync_add_and_fetch_16
>
> And the Changelog says:
>
> build_dir/toolchain-x86_64_gcc-4.8-linaro_uClibc-0.9.33.2/gcc-linaro-4.8-2014.04/libgcc/ChangeLog:
>
> 2014-01-25  Walter Lee  <walt at tilera.com>
>
>     Backport from mainline
>     2014-01-25  Walter Lee  <walt at tilera.com>
>
>     * config/tilepro/atomic.c (pre_atomic_barrier): Mark inline.
>     (post_atomic_barrier): Ditto.
>     (__fetch_and_do): New macro.
>     (__atomic_fetch_and_do): Use __fetch_and_do.
>     (__sync_fetch_and_do): New macro.
>     (__sync_fetch_and_add_4): New function.
>     (__sync_fetch_and_sub_4): New function.
>     (__sync_fetch_and_or_4): New function.
>     (__sync_fetch_and_and_4): New function.
>     (__sync_fetch_and_xor_4): New function.
>     (__sync_fetch_and_nand_4): New function.
>
>
> If you do find these symbols in your gcc toolchain, I'd say to look for
> flags to enable them.
> They might be disabled by default.
>
>
>
>
> On Wed, Jan 21, 2015 at 7:10 AM, Santiago Regusci <santicomp2 at gmail.com>
> wrote:
>
>> Hi
>>
>> I am having trouble building a package czmq with barrier breaker for
>> Mips24kc.
>> i get src/.libs/libczmq.so: undefined reference to
>> `__sync_add_and_fetch_8'
>> do i have to add libatomic in the makefile toolchain. or has did anyone
>> have a similar problem.
>>
>> how i can i fix this?
>>
>> thank you
>> Santi
>>
>>
>> _______________________________________________
>> openwrt-devel mailing list
>> openwrt-devel at lists.openwrt.org
>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150121/29e69e4f/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From christian.schoenebeck at gmail.com  Wed Jan 21 16:32:45 2015
From: christian.schoenebeck at gmail.com (Christian Schoenebeck)
Date: Wed, 21 Jan 2015 22:32:45 +0100
Subject: [OpenWrt-Devel] libcurl: questing about configure/build options
Message-ID: <54C01AFD.7080807@gmail.com>

Two questions about curl/libcurl package and its build configuration:

1.)
There is a new config option available since 17.01.2015 to configure https
setting --enable-https / --disable-https	(secure http)

Inside the original curl configure script I cannot find this option (all others are there)
I compiled libcurl inside OpenWrt build system for x86 with and without https enabled.
Testing both versions I cannot find differences when using verbose mode (if ssl support enabled)
Anyway HTTPS should be default=y

2.)
Since 25.09.2014 the configure option --with-ca-path is only set on "openssl" ssl support.
Are the other ssl supporting libs not using certificates ?
ca-certificate package installs into /etc/ssl/certs, why not set for all ssl librarys ?

Sorry if the questions sounds a little heretical.
Thats not my intention. I only want to understand.
There are no descriptions inside commits to explain whats going on.

Thanks for support

Christian
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From zajec5 at gmail.com  Wed Jan 21 16:48:35 2015
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Wed, 21 Jan 2015 22:48:35 +0100
Subject: [OpenWrt-Devel] [PATCH uclient] use const for char buffer in
	uclient_write
Message-ID: <1421876915-17791-1-git-send-email-zajec5@gmail.com>

We are not supposed to modify it and ustream accepts const already.

Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com>
---
 uclient-backend.h | 2 +-
 uclient-http.c    | 2 +-
 uclient.c         | 2 +-
 uclient.h         | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/uclient-backend.h b/uclient-backend.h
index a5cf4f3..9ccc799 100644
--- a/uclient-backend.h
+++ b/uclient-backend.h
@@ -32,7 +32,7 @@ struct uclient_backend {
 	void (*disconnect)(struct uclient *cl);
 
 	int (*read)(struct uclient *cl, char *buf, unsigned int len);
-	int (*write)(struct uclient *cl, char *buf, unsigned int len);
+	int (*write)(struct uclient *cl, const char *buf, unsigned int len);
 };
 
 void uclient_backend_set_error(struct uclient *cl, int code);
diff --git a/uclient-http.c b/uclient-http.c
index af43b05..9f9fac9 100644
--- a/uclient-http.c
+++ b/uclient-http.c
@@ -931,7 +931,7 @@ uclient_http_set_header(struct uclient *cl, const char *name, const char *value)
 }
 
 static int
-uclient_http_send_data(struct uclient *cl, char *buf, unsigned int len)
+uclient_http_send_data(struct uclient *cl, const char *buf, unsigned int len)
 {
 	struct uclient_http *uh = container_of(cl, struct uclient_http, uc);
 
diff --git a/uclient.c b/uclient.c
index d599763..21f6f5d 100644
--- a/uclient.c
+++ b/uclient.c
@@ -221,7 +221,7 @@ void uclient_free(struct uclient *cl)
 	free(url);
 }
 
-int uclient_write(struct uclient *cl, char *buf, int len)
+int uclient_write(struct uclient *cl, const char *buf, int len)
 {
 	if (!cl->backend->write)
 		return -1;
diff --git a/uclient.h b/uclient.h
index 5904a38..0c76f6e 100644
--- a/uclient.h
+++ b/uclient.h
@@ -106,7 +106,7 @@ int uclient_connect(struct uclient *cl);
 void uclient_disconnect(struct uclient *cl);
 
 int uclient_read(struct uclient *cl, char *buf, int len);
-int uclient_write(struct uclient *cl, char *buf, int len);
+int uclient_write(struct uclient *cl, const char *buf, int len);
 int uclient_request(struct uclient *cl);
 
 char *uclient_get_addr(char *dest, int *port, union uclient_addr *a);
-- 
1.8.4.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From dirkneukirchen at web.de  Wed Jan 21 17:12:36 2015
From: dirkneukirchen at web.de (Dirk Neukirchen)
Date: Wed, 21 Jan 2015 23:12:36 +0100
Subject: [OpenWrt-Devel] Fwd: MIPS libatomic
In-Reply-To: <CAFg56-r7cZo+aTDHPrP5V-=80=6XzZjjmrS0LL84Yb=juDc-Dw@mail.gmail.com>
References: <CAFg56-rsc-nM+7Mi44PWMr71-bZoicDZiwR1AewNAqS+GxOExg@mail.gmail.com>
 <CAFg56-r7cZo+aTDHPrP5V-=80=6XzZjjmrS0LL84Yb=juDc-Dw@mail.gmail.com>
Message-ID: <54C02454.2060109@web.de>

On 21.01.2015 06:10, Santiago Regusci wrote:
> Hi
> 
> I am having trouble building a package czmq with barrier breaker for
> Mips24kc.
> i get src/.libs/libczmq.so: undefined reference to `__sync_add_and_fetch_8'
> do i have to add libatomic in the makefile toolchain. or has did anyone
> have a similar problem.
> 
> how i can i fix this?
> 

for reference - gcc bugs reporting same symbol issue:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56296
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56300

bug in webkit + fix
https://bugs.webkit.org/show_bug.cgi?id=106739
http://trac.webkit.org/changeset/144077
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From daniel at dd-wrt.com  Wed Jan 21 17:13:32 2015
From: daniel at dd-wrt.com (daniel)
Date: Wed, 21 Jan 2015 23:13:32 +0100
Subject: [OpenWrt-Devel] [PATCH] [packages_extra] snort: add missing libuuid
	dependency
Message-ID: <54C0248C.4080303@dd-wrt.com>

The current version of snort fails to build because the libuuid pkg
dependency is missing.

This little patch fixes the issue, please apply.

Signed-off-by: Daniel Danzberger <daniel at dd-wrt.com>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: snort-libuuid-depends.patch
Type: text/x-patch
Size: 480 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150121/c15d9781/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3959 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150121/c15d9781/attachment.p7s>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From florian at openwrt.org  Wed Jan 21 18:52:05 2015
From: florian at openwrt.org (Florian Fainelli)
Date: Wed, 21 Jan 2015 15:52:05 -0800
Subject: [OpenWrt-Devel] QEMU 2.0.0
In-Reply-To: <00cf01d0359c$e3493360$a9db9a20$@oaklight.us>
References: <00cf01d0359c$e3493360$a9db9a20$@oaklight.us>
Message-ID: <54C03BA5.4000003@openwrt.org>

On 21/01/15 09:08, Ning Ye wrote:
> I am just wondering if anyone maintains QEMU in OpenWRT toolchain.  I want
> to use QEMU 2.0.0 or later as it fixed VHD virtual disk issues.  Of course,
> it has dependency on other library which is not simple to upgrade. That's
> where I am stuck now.  

Right, we don't want to pull in all of these libraries, can you find a
way to build qemu-img only, because this is the only thing we use from a
qemu host-build?

> 
> I am currently use QEMU 2.0 separately from OpenWRT build and manually run
> the tools on my Linux Host to convert and generate VHD images.
> 
> Any suggestions would be deeply appreciated.  Thanks.
--
Florian
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From florian at openwrt.org  Wed Jan 21 18:58:14 2015
From: florian at openwrt.org (Florian Fainelli)
Date: Wed, 21 Jan 2015 15:58:14 -0800
Subject: [OpenWrt-Devel] [PATCH] feeds.conf.default: add dlan feed
In-Reply-To: <1419889990-5432-1-git-send-email-mhei@heimpold.de>
References: <1419889990-5432-1-git-send-email-mhei@heimpold.de>
Message-ID: <54C03D16.2090108@openwrt.org>

On 29/12/14 13:53, Michael Heimpold wrote:
> Since mcs814x/dLAN-USB-Extender profile refers to some packages in this
> feed, we should list it here.

blogic was asking whether these packages could be moved to the main
OpenWrt package feed instead, the answer is no, because they are
binary-only packages.

I have added instructions on how to include the feed to the profile in
r44071.

> 
> Signed-off-by: Michael Heimpold <mhei at heimpold.de>
> ---
>  feeds.conf.default |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/feeds.conf.default b/feeds.conf.default
> index 208342c..16f07d0 100644
> --- a/feeds.conf.default
> +++ b/feeds.conf.default
> @@ -3,6 +3,7 @@ src-git luci https://github.com/openwrt/luci.git
>  src-git routing https://github.com/openwrt-routing/packages.git
>  src-git telephony https://github.com/openwrt/telephony.git
>  src-git management https://github.com/openwrt-management/packages.git
> +src-git dlan https://github.com/ffainelli/dlan-usb-extender-3rd-party.git
>  #src-git oldpackages http://git.openwrt.org/packages.git
>  #src-svn xwrt http://x-wrt.googlecode.com/svn/trunk/package
>  #src-svn phone svn://svn.openwrt.org/openwrt/feeds/phone
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From javierdo1 at gmail.com  Wed Jan 21 19:55:25 2015
From: javierdo1 at gmail.com (Javier Domingo Cansino)
Date: Thu, 22 Jan 2015 01:55:25 +0100
Subject: [OpenWrt-Devel] Xilinx Zynq zedboard integration
In-Reply-To: <CALZVap=SCAZyQv+==rQbbbvk+CKz4tXEQG-6V+oE_ZwKgY3_8A@mail.gmail.com>
References: <CALZVapmS89wdOq+h_n78zCFCWfFyr5bc=K9+AjUS=NbYFdnU5g@mail.gmail.com>
 <CALZVapn7iVXcYc0BuCLnDrPbeoV_iPrYDfREgUgsqTgPs8T19Q@mail.gmail.com>
 <CALZVapknqhWJHHHNCmop_YB4_Q5EKgRG5wVbhdu3zhWMuYrnNQ@mail.gmail.com>
 <CALZVapn4_-WxM=WW=tRCzWm3y3gDjMUvi_5D1NF0CPd=YTT9QQ@mail.gmail.com>
 <CALZVap=SCAZyQv+==rQbbbvk+CKz4tXEQG-6V+oE_ZwKgY3_8A@mail.gmail.com>
Message-ID: <CALZVapmGmFnYNxDYujNQ80SPw-61qSSY5GevyNNH-tOhS4gNKw@mail.gmail.com>

Ok, I have narrowed the problem to something with the compilation of the
kernel. I think it's more an incompatibility between xilinx and linux
patches, because the kernel fails to boot even if build by hand from the
build_dir.

I will try to split the patch in more digestible parts, and see if I catch
the error... Or maybe disable the openwrt patches and see where they can be
colliding.

On Wed, Jan 21, 2015 at 1:24 AM, Javier Domingo Cansino <javierdo1 at gmail.com
> wrote:

> ?After hitting against this wall for a lot, I found a bug in my few lines
> of code, I was creating the uImage file from vmlinux instead of from
> zImage[1].
>
> I am still doing something wrong, because substituting the uImage
> generated from buildroot in the SD card (and leaving the rest of the
> files), makes at least the kernel boot, although crashes in sec 0.000000,
> at least prints booting.
>
> I have discovered that after "Starting kernel ..." there should be a
> "Uncompressing Linux... done, booting the kernel." line. So I am still
> doing something wrong on the uImage generation, and I don't know what.
>
> Moreover, I have compiled the uImage like the following, and it get's to
> the kernel panic at least:
> make -j9 HOSTCC="/usr/bin/gcc" HOSTCFLAGS="" ARCH=arm  CROSS_COMPILE="
> /home/javier/proyectos/master/master-sce/buildroot/output/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-"
> LOADADDR="0x8000" uImage
>
> If you could tell me which should be the Image/BuildKernel part, I would
> be really appreciate it.
>
> target/linux/zynq/image/Makefile
> ===
>
> include $(TOPDIR)/rules.mk
> include $(INCLUDE_DIR)/image.mk
>
> define Build/Compile
> 	$(call Build/Compile/Default, zynq_zed.dtb)
> endef
>
> define Image/BuildKernel/Initramfs
> 	(cd $(TARGET_DIR); \
> 	 find . | cpio -o -H newc | gzip -9 >$(KDIR)/zedboard-rootfs.cpio.gz )
> 	mkimage -A arm -T ramdisk -C none -d $(KDIR)/zedboard-rootfs.cpio.gz \
> 	 $(BIN_DIR)/zedboard-uramdisk.image.gz
> endef
>
> define Image/BuildKernel
> 	mkimage -A arm -O linux -T kernel -C none -a 0x8000 -e 0x8000 \
> 		-n 'ARM OpenWrt Linux-$(LINUX_VERSION)' \
> 		-d $(LINUX_DIR)/arch/arm/boot/zImage $(BIN_DIR)/zedboard-uImage
> endef
>
> define Image/Prepare
> 	$(LINUX_DIR)/scripts/dtc/dtc -O dtb \
> 	 $(LINUX_DIR)/arch/arm/boot/dts/zynq-zed.dts > $(BIN_DIR)/zedboard.dtb
> endef
>
> $(eval $(call BuildImage))
>
> ===
>
> [1] Bug I should have found a lot of time ago:
> https://github.com/txomon/openwrt/commit/5e882bc2f14580f62a6ad78ddc57033d207261f9
> ?
>
> Cheers
>
> On Sun, Jun 29, 2014 at 1:35 PM, Javier Domingo Cansino <
> javierdo1 at gmail.com> wrote:
>
>> ?I have manually executed the boot sequence in the uboot, and the result
>> is that it fails on the command bootm loados. Any idea on how to debug what
>> can be wrong?
>>
>> Cheers and I will keep searching,
>>
>> Javier Domingo Cansino
>>
>> zynq-uboot> fatload mmc 0 0x3000000 uImage
>> reading uImage
>> 4582152 bytes read in 405 ms (10.8 MiB/s)
>> zynq-uboot> fatload mmc 0 0x2A00000 devicetree.dtb
>> reading devicetree.dtb
>> 2739 bytes read in 15 ms (177.7 KiB/s)
>> zynq-uboot> fatload mmc 0 0x2000000 uramdisk.image.gz
>> reading uramdisk.image.gz
>> 796339 bytes read in 87 ms (8.7 MiB/s)
>> zynq-uboot> help bootm
>> bootm - boot application image from memory
>>
>> Usage:
>> bootm [addr [arg ...]]
>>     - boot application image stored in memory
>>         passing arguments 'arg ...'; when booting a Linux kernel,
>>         'arg' can be the address of an initrd image
>>         When booting a Linux kernel which requires a flat device-tree
>>         a third argument is required which is the address of the
>>         device-tree blob. To boot that kernel without an initrd image,
>>         use a '-' for the second argument. If you do not pass a third
>>         a bd_info struct will be passed instead
>>
>> For the new multi component uImage format (FIT) addresses
>>         must be extened to include component or configuration unit name:
>>         addr:<subimg_uname> - direct component image specification
>>         addr#<conf_uname>   - configuration specification
>>         Use iminfo command to get the list of existing component
>>         images and configurations.
>>
>> Sub-commands to do part of the bootm sequence.  The sub-commands must be
>> issued in the order below (it's ok to not issue all sub-commands):
>>         start [addr [arg ...]]
>>         loados  - load OS image
>>         ramdisk - relocate initrd, set env initrd_start/initrd_end
>>         fdt     - relocate flat device tree
>>         cmdline - OS specific command line processing/setup
>>         bdt     - OS specific bd_t processing
>>         prep    - OS specific prep before relocation or go
>>         go      - start OS
>> zynq-uboot> bootm start 0x3000000 0x2000000 0x2A00000
>> ## Booting kernel from Legacy Image at 03000000 ...
>>    Image Name:   ARM OpenWrt Linux-3.13.7
>>    Image Type:   ARM Linux Kernel Image (uncompressed)
>>    Data Size:    4582088 Bytes = 4.4 MiB
>>    Load Address: 80000000
>>    Entry Point:  80000000
>>    Verifying Checksum ... OK
>> ## Loading init Ramdisk from Legacy Image at 02000000 ...
>>    Image Name:
>>    Image Type:   ARM Linux RAMDisk Image (uncompressed)
>>    Data Size:    796275 Bytes = 777.6 KiB
>>    Load Address: 00000000
>>    Entry Point:  00000000
>>    Verifying Checksum ... OK
>> ## Flattened Device Tree blob at 02a00000
>>    Booting using the fdt blob at 0x2a00000
>> zynq-uboot> bootm loados
>>    Loading Kernel Image ...
>>
>
>
>
> --
> Javier Domingo Cansino
>



-- 
Javier Domingo Cansino
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150122/11d094fb/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From mathieu at qca.qualcomm.com  Wed Jan 21 21:55:07 2015
From: mathieu at qca.qualcomm.com (Mathieu Olivari)
Date: Wed, 21 Jan 2015 18:55:07 -0800
Subject: [OpenWrt-Devel] [PATCH v2] build: allow openwrt.git packages to be
	replaced by feeds
Message-ID: <1421895307-28550-1-git-send-email-mathieu@qca.qualcomm.com>

Currently, replacing a package available in openwrt.git requires
modifications in openwrt.git, or requires duplicating the package in a
feed but with a different name, which causes all kind of problems
related to dependencies (all packages selecting it would have to be
modified accordingly to select the new package).

With this change, if a package with the same name is present both in
feeds/ and package/ folders, the one in feeds/ can override the one
in package/, both in the menuconfig and during the build, by passing the
"-f" option to "./scripts/feeds install"

This mechanism is particularly useful for vendor tree, or in general for
application which needs to replace one particular package which exists
within openwrt.git by a custom/newer version.

Signed-off-by: Mathieu Olivari <mathieu at qca.qualcomm.com>
---
v2:
*fix an issue when trying to override packages which include a dependency in the
 core packages. (ex: lua depends on liblua, which exists in the core, which
 ended-up in the package not being overridden properly).
*address John's concerns about core OpenWrt packages being overriden without
 notice and control. Override is now disable by default, and "-f" needs to be
 passed to "./scripts/feeds install" to allow it.
---
 include/scan.awk |   17 +++++++++++++++++
 include/scan.mk  |    2 +-
 scripts/feeds    |   25 ++++++++++++++++++-------
 3 files changed, 36 insertions(+), 8 deletions(-)
 create mode 100644 include/scan.awk

diff --git a/include/scan.awk b/include/scan.awk
new file mode 100644
index 0000000..39b2977
--- /dev/null
+++ b/include/scan.awk
@@ -0,0 +1,17 @@
+BEGIN { FS="/" }
+$1 ~ /^feeds/ { FEEDS[$NF]=$0 }
+$1 !~ /^feeds/ { PKGS[$NF]=$0 }
+END {
+	# Filter-out OpenWrt packages which have a feeds equivalent
+	for (pkg in PKGS)
+		if (pkg in FEEDS)
+			delete PKGS[pkg]
+	n = asort(PKGS)
+	for (i=1; i <= n; i++) {
+		print PKGS[i]
+	}
+	n = asort(FEEDS)
+	for (i=1; i <= n; i++){
+		print FEEDS[i]
+	}
+}
diff --git a/include/scan.mk b/include/scan.mk
index 0998333..138707d 100644
--- a/include/scan.mk
+++ b/include/scan.mk
@@ -43,7 +43,7 @@ endef
 
 $(FILELIST):
 	rm -f $(TMP_DIR)/info/.files-$(SCAN_TARGET)-*
-	$(call FIND_L, $(SCAN_DIR)) $(SCAN_EXTRA) -mindepth 1 $(if $(SCAN_DEPTH),-maxdepth $(SCAN_DEPTH)) -name Makefile | xargs grep -HE 'call (Build/DefaultTargets|Build(Package|Target)|.+Package)' | sed -e 's#^$(SCAN_DIR)/##' -e 's#/Makefile:.*##' | uniq > $@
+	$(call FIND_L, $(SCAN_DIR)) $(SCAN_EXTRA) -mindepth 1 $(if $(SCAN_DEPTH),-maxdepth $(SCAN_DEPTH)) -name Makefile | xargs grep -HE 'call (Build/DefaultTargets|Build(Package|Target)|.+Package)' | sed -e 's#^$(SCAN_DIR)/##' -e 's#/Makefile:.*##' | uniq | awk -f include/scan.awk > $@
 
 $(TMP_DIR)/info/.files-$(SCAN_TARGET).mk: $(FILELIST)
 	( \
diff --git a/scripts/feeds b/scripts/feeds
index 31ad544..6c03375 100755
--- a/scripts/feeds
+++ b/scripts/feeds
@@ -358,6 +358,7 @@ sub is_core_package($) {
 sub install_package {
 	my $feed = shift;
 	my $name = shift;
+	my $force = shift;
 	my $ret = 0;
 
 	$feed = lookup_package($feed, $name);
@@ -383,13 +384,22 @@ sub install_package {
 	$src or $src = $name;
 
 	# previously installed packages set the runtime package
-	# newly installed packages set the source package
-	$installed{$src} and return 0;
+	# newly installed packages set the source package to 1
+	$installed{$src} and $installed{$src} == 1 and return 0;
+
+	# we'll trigger the override only with the 3 conditions below:
+	# - override is allowed by command line (-f)
+	# - a package with the same src exists in the core packages list
+	# - the package previously installed is not from a feed
+	my $override = 1 if ($force and is_core_package($src) and !$installed{$src}->{feed});
 
 	# check previously installed packages
-	$installed{$name} and return 0;
+	$installed{$name} and !$override and return 0;
 	$installed{$src} = 1;
-	warn "Installing package '$src'\n";
+
+	$override == 1
+		and warn "Overriding package '$src'\n"
+		or warn "Installing package '$src'\n";
 
 	$install_method{$type} or do {
 		warn "Unknown installation method: '$type'\n";
@@ -436,7 +446,7 @@ sub install {
 	my $feed;
 	my $ret = 0;
 
-	getopts('ap:d:h', \%opts);
+	getopts('ap:d:fh', \%opts);
 
 	if ($opts{h}) {
 		usage();
@@ -462,7 +472,7 @@ sub install {
 					my $p = $feed_package->{$name};
 					next if $p->{vdepends};
 					if( $p->{name} ) {
-						install_package($feed, $p->{name}) == 0 or $ret = 1;
+						install_package($feed, $p->{name}, exists($opts{f})) == 0 or $ret = 1;
 						get_feed($f->[1]);
 					}
 				}
@@ -470,7 +480,7 @@ sub install {
 		}
 	} else {
 		while ($name = shift @ARGV) {
-			install_package($feed, $name) == 0 or $ret = 1;
+			install_package($feed, $name, exists($opts{f})) == 0 or $ret = 1;
 		}
 	}
 
@@ -638,6 +648,7 @@ Commands:
 	    -a :           Install all packages from all feeds or from the specified feed using the -p option.
 	    -p <feedname>: Prefer this feed when installing packages.
 	    -d <y|m|n>:    Set default for newly installed packages.
+	    -f :           Install will be forced even if the package exists in core OpenWrt (override)
 
 	search [options] <substring>: Search for a package
 	Options:
-- 
1.7.10.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From luizluca at gmail.com  Wed Jan 21 23:19:48 2015
From: luizluca at gmail.com (Luiz Angelo Daros de Luca)
Date: Thu, 22 Jan 2015 04:19:48 +0000
Subject: [OpenWrt-Devel] issue: usb1.x not detected in CC
Message-ID: <CAJq09z48_=_DH3fgXpgxt=G4icKY+kO_c_re-BX=QTqrccHcAA@mail.gmail.com>

Hello,

I'm running OpenWRT in Virtualbox. I have no problem with BB. However, when
testing trunk, I noticed that usb1.x functions simply does not work.

For BB, in a clean install (+usbutils), I get:
https://downloads.openwrt.org/barrier_breaker/14.07/x86/generic/openwrt-x86-generic-combined-ext4.img.gz

root at OpenWrt:/# lsusb
*Bus 002 Device 002: ID 80ee:0021 VirtualBox USB Tablet*
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
*Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub*

root at OpenWrt:/# dmesg | egrep -i '(usb|hci)'
[    0.063968] ACPI: bus type USB registered
[    0.064573] usbcore: registered new interface driver usbfs
[    0.065292] usbcore: registered new interface driver hub
[    0.065990] usbcore: registered new device driver usb
[    0.511884] ahci 0000:00:0d.0: version 3.0
[    0.513388] ahci: SSS flag set, parallel bus scan disabled
[    0.514182] ahci 0000:00:0d.0: AHCI 0001.0100 32 slots 1 ports 3 Gbps
0x1 impl SATA mode
[    0.515223] ahci 0000:00:0d.0: flags: 64bit ncq stag only ccc
[    0.515945] ahci 0000:00:0d.0: setting latency timer to 64
[    0.516085] scsi0 : ahci
[    0.521108] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.522068] ehci-pci: EHCI PCI platform driver
[    0.523007] ehci-pci 0000:00:0b.0: setting latency timer to 64
[    0.523015] ehci-pci 0000:00:0b.0: EHCI Host Controller
[    0.523673] ehci-pci 0000:00:0b.0: new USB bus registered, assigned bus
number 1
[    0.524738] ehci-pci 0000:00:0b.0: irq 10, io mem 0xf0840000
[    0.540886] ehci-pci 0000:00:0b.0: USB 2.0 started, EHCI 1.00
*[    0.541668] hub 1-0:1.0: USB hub found*
[    0.542882] ehci-platform: EHCI generic platform driver
[    0.543609] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.544824] ohci_hcd 0000:00:06.0: setting latency timer to 64
[    0.544831] ohci_hcd 0000:00:06.0: OHCI Host Controller
[    0.545495] ohci_hcd 0000:00:06.0: new USB bus registered, assigned bus
number 2
[    0.546662] ohci_hcd 0000:00:06.0: irq 11, io mem 0xf0804000
*[    0.600350] hub 2-0:1.0: USB hub found*
[    0.602055] uhci_hcd: USB Universal Host Controller Interface driver
[    0.603133] usbcore: registered new interface driver usb-storage
[    1.040233] usb 2-1: new full-speed USB device number 2 using ohci_hcd

And for CC, in a clean install (+usbutils), I get:
https://downloads.openwrt.org/snapshots/trunk/x86/openwrt-x86-generic-combined-ext4.img.gz

root at OpenWrt:/# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

root at OpenWrt:/# dmesg | egrep -i '(usb|hci)'
[    0.207085] ACPI: bus type USB registered
[    0.208234] usbcore: registered new interface driver usbfs
[    0.210038] usbcore: registered new interface driver hub
[    0.211447] usbcore: registered new device driver usb
[    0.846969] ahci 0000:00:0d.0: version 3.0
[    0.850123] ahci 0000:00:0d.0: SSS flag set, parallel bus scan disabled
[    0.851991] ahci 0000:00:0d.0: AHCI 0001.0100 32 slots 1 ports 3 Gbps
0x1 impl SATA mode
[    0.854051] ahci 0000:00:0d.0: flags: 64bit ncq stag only ccc
[    0.855726] scsi0 : ahci
[    0.865267] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.866641] ehci-pci: EHCI PCI platform driver
[    0.868536] ehci-pci 0000:00:0b.0: EHCI Host Controller
[    0.870011] ehci-pci 0000:00:0b.0: new USB bus registered, assigned bus
number 1
[    0.872088] ehci-pci 0000:00:0b.0: irq 10, io mem 0xf0806000
[    0.890021] ehci-pci 0000:00:0b.0: USB 2.0 started, EHCI 1.00
*[    0.891475] hub 1-0:1.0: USB hub found*
[    0.910106] ehci-platform: EHCI generic platform driver
[    0.911554] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.913104] ohci-platform: OHCI generic platform driver
[    0.914517] uhci_hcd: USB Universal Host Controller Interface driver
[    0.916619] usbcore: registered new interface driver usb-storage

In CC, there is no "Linux Foundation 1.1 root hub". Only EHCI hub is
detected. ohci_hcd was expected to detect a new hub. If I disable usb2.0 in
virtualbox config, OpenWRT gets no USB support in CC. Virtual machine
configs are equal.

kmod-usb-ohci is not installed by default in both system. However, both
systems seems to have some usb modules (including usb-ohci) built in
kernel. So, kmod-usb-ohci contains only control files (CC) or no files
(BB). Anyway, installing kmod-usb-ohci does not fix the problem. BTW,
shouldn't all "empty" packages for built-in modules be installed by
default? (most of <1k kmod-*.ipk)

I have already tested CC installing all kmod packages with no change on the
USB problem.

Checking my Ubuntu (with kernel newer than OpenWRT), I noticed that there
is a new ohci-pci in dmesg:

ohci-pci: OHCI PCI platform driver

Maybe it is USB_OHCI_HCD_PCI that is missing.

Any tips?

Regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150122/8ca11a1d/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From blogic at openwrt.org  Thu Jan 22 02:34:56 2015
From: blogic at openwrt.org (John Crispin)
Date: Thu, 22 Jan 2015 08:34:56 +0100
Subject: [OpenWrt-Devel] [PATCH] lantiq: correct value for fpi clock on
	ar9
In-Reply-To: <1421832908.6920.7.camel@merveille.lan>
References: <1421832908.6920.7.camel@merveille.lan>
Message-ID: <54C0A820.2080901@openwrt.org>



On 21/01/2015 10:35, Ben Mulvihill wrote:
> Hello,
> 
> This is a patch to go in target/linux/lantiq/patches-3.14/

please send a patch that adds the file instead of just sending the file


> 
> It corrects the fpi clock value on lantiq ar9. See this discussion
> for further details:
> 
> https://lists.openwrt.org/pipermail/openwrt-devel/2015-January/030688.html
> 
> 
> --- a/arch/mips/lantiq/xway/clk.c	2015-01-21 10:15:44.000000000 +0100
> +++ b/arch/mips/lantiq/xway/clk.c	2015-01-21 10:17:29.000000000 +0100
> @@ -104,8 +104,9 @@ unsigned long ltq_ar9_fpi_hz(void)
>  	unsigned long sys = ltq_ar9_sys_hz();
>  
>  	if (ltq_cgu_r32(CGU_SYS) & BIT(0))
> -		return sys;
> -	return sys >> 1;
> +		return sys / 3;
> +	else
> +		return sys / 2;
>  }
>  
>  unsigned long ltq_ar9_cpu_hz(void)
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From blogic at openwrt.org  Thu Jan 22 03:20:31 2015
From: blogic at openwrt.org (John Crispin)
Date: Thu, 22 Jan 2015 09:20:31 +0100
Subject: [OpenWrt-Devel] [PATCH] Adding support for 6LoWPAN over
 Bluetooth Low Energy in kernel 3.18.
In-Reply-To: <AB80DA35A7B64E4E98291794926897D95BA5D425@mbx04.nvlsi.no>
References: <AB80DA35A7B64E4E98291794926897D95BA5D425@mbx04.nvlsi.no>
Message-ID: <54C0B2CF.7080100@openwrt.org>

This patch was not tested prior to sending it ... see inline


On 21/01/2015 13:53, Duda, Lukasz wrote:
> Adding support 6LoWPAN over Bluetooth Low Energy in kernel 3.18.
> Creating new bluetooth_6lowpan group with COFNIG_6LOWPAN and CONFIG_BT_6LOWPAN.
> Adding kernel object dependencies for 6LoWPAN over Bluetooth Low Energy. 
> 
> Signed-off-by: Lukasz Duda <lukasz.duda at nordicsemi.no>
> 
> ---
> 
> Index: package/kernel/linux/modules/other.mk
> ===================================================================
> --- package/kernel/linux/modules/other.mk	(revision 44059)
> +++ package/kernel/linux/modules/other.mk	(working copy)
> @@ -70,6 +70,26 @@
>  $(eval $(call KernelPackage,bluetooth))
>  
>  
> +define KernelPackage/bluetooth_6lowpan
> +  SUBMENU:=$(OTHER_MENU)
> +  TITLE:=Bluetooth 6LoWPAN support
> +  DEPENDS:=+kmod-bluetooth @!LINUX_3_3 @!LINUX_3_8 @!LINUX_3_10 
> +@!LINUX_3_13 @!LINUX_3_14
> +  KCONFIG:= \
> +  CONFIG_6LOWPAN=m \
> +  CONFIG_BT_6LOWPAN=m
> +  FILES:= \
> +	$(LINUX_DIR)/net/bluetooth/bluetooth_6lowpan.ko \
> +	$(LINUX_DIR)/net/6lowpan/6lowpan.ko
> +	AUTOLOAD:=$(call AutoProbe,bluetooth)
> +endef
> +
> +define KernelPackage/bluetooth_6lowpan/description
> + Kernel support for 6LoWPAN over Bluetooth Low Energy devices endef
> +

endef is missing, please test the patches that you send






> +$(eval $(call KernelPackage,bluetooth_6lowpan))
> +
> +
>  define KernelPackage/bluetooth-hci-h4p
>    SUBMENU:=$(OTHER_MENU)
>    TITLE:=HCI driver with H4 Nokia extensions
> ---
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From blogic at openwrt.org  Thu Jan 22 03:22:38 2015
From: blogic at openwrt.org (John Crispin)
Date: Thu, 22 Jan 2015 09:22:38 +0100
Subject: [OpenWrt-Devel] [PATCH] Adding support for 6LoWPAN over
 Bluetooth Low Energy in kernel 3.18.
In-Reply-To: <AB80DA35A7B64E4E98291794926897D95BA5D425@mbx04.nvlsi.no>
References: <AB80DA35A7B64E4E98291794926897D95BA5D425@mbx04.nvlsi.no>
Message-ID: <54C0B34E.2010509@openwrt.org>



On 21/01/2015 13:53, Duda, Lukasz wrote:
> +  DEPENDS:=+kmod-bluetooth @!LINUX_3_3 @!LINUX_3_8 @!LINUX_3_10 
> +@!LINUX_3_13 @!LINUX_3_14


this is also wrong, @!(LINUX_3_3||LINUX_3_8||......)) is the correct syntax.

please resend a fixed version
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From blogic at openwrt.org  Thu Jan 22 03:31:28 2015
From: blogic at openwrt.org (John Crispin)
Date: Thu, 22 Jan 2015 09:31:28 +0100
Subject: [OpenWrt-Devel] [PATCH, v2] feeds: search packages by license
In-Reply-To: <54BED4CA.3070500@prplfoundation.org>
References: <54BED4CA.3070500@prplfoundation.org>
Message-ID: <54C0B560.3060406@openwrt.org>



On 20/01/2015 23:20, Eric Schultz wrote:
> Currently, the feeds scripts provides no way to filter by packages by license or no license. 
> This patch adds a search feature to feeds which can be used to search packages by license or by no license.
> 
> Calls to script/feeds which do not use the new -l or -n options should work the same as before.
> 
> Signed-off-by: Eric Schultz <eschultz at prplfoundation.org>
> ---

[...]

>  
> @@ -642,6 +704,8 @@ Commands:
>  	search [options] <substring>: Search for a package
>  	Options:
>  	    -r <feedname>: Only search in this feed
> +	    -l <license>:  Only include packages with this license
> +	    -n:	           Only include packages without a license tag

i think there parameters are still sub optimal

How about these 2
-l Only include packages with a license
-n List all packages that have no license (developer use)

additionally your text editor seems to be wonky and uses leading spaces
instead of tabs. please make sure you use tabs. I also spotted 2-3
whitespace fixes, these should be in a seperate patch and not
intermingled with the actual feature patch




>  
>  	uninstall -a|<package>: Uninstall a package
>  	Options:
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From blogic at openwrt.org  Thu Jan 22 03:33:13 2015
From: blogic at openwrt.org (John Crispin)
Date: Thu, 22 Jan 2015 09:33:13 +0100
Subject: [OpenWrt-Devel] [PATCH] [packages_extra] snort: add missing
 libuuid dependency
In-Reply-To: <54C0248C.4080303@dd-wrt.com>
References: <54C0248C.4080303@dd-wrt.com>
Message-ID: <54C0B5C9.6030804@openwrt.org>



On 21/01/2015 23:13, daniel wrote:
> The current version of snort fails to build because the libuuid pkg
> dependency is missing.
> 
> This little patch fixes the issue, please apply.
> 
> Signed-off-by: Daniel Danzberger <daniel at dd-wrt.com>

please send a pull request via github for packages inside the feed. the
mailing list is for trunk related patches


> 
> 
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From Lukasz.Duda at nordicsemi.no  Thu Jan 22 03:48:45 2015
From: Lukasz.Duda at nordicsemi.no (Duda, Lukasz)
Date: Thu, 22 Jan 2015 08:48:45 +0000
Subject: [OpenWrt-Devel] [PATCH v2] Adding support for 6LoWPAN over
 Bluetooth Low Energy in kernel 3.18.
Message-ID: <AB80DA35A7B64E4E98291794926897D95BA5D825@mbx04.nvlsi.no>

Adding support 6LoWPAN over Bluetooth Low Energy in kernel 3.18.

Creating new bluetooth_6lowpan group with CONFIG_6LOWPAN and CONFIG_BT_6LOWPAN.

Adding kernel object dependencies for 6LoWPAN over Bluetooth Low Energy.



Signed-off-by: Lukasz Duda <lukasz.duda... at nordicsemi.com<mailto:lukasz.duda... at nordicsemi.com>>



---

v2: *fix an issue with the mail formatting as mail client removed line breaks.

---


Index: package/kernel/linux/modules/other.mk

===================================================================

--- package/kernel/linux/modules/other.mk      (revision 44059)

+++ package/kernel/linux/modules/other.mk   (working copy)

@@ -70,6 +70,26 @@

 $(eval $(call KernelPackage,bluetooth))





+define KernelPackage/bluetooth_6lowpan

+  SUBMENU:=$(OTHER_MENU)

+  TITLE:=Bluetooth 6LoWPAN support

+  DEPENDS:=+kmod-bluetooth @!(LINUX_3_3||LINUX_3_8||LINUX_3_10||LINUX_3_13||LINUX_3_14)

+  KCONFIG:= \

+  CONFIG_6LOWPAN=m \

+  CONFIG_BT_6LOWPAN=m

+  FILES:= \

+             $(LINUX_DIR)/net/bluetooth/bluetooth_6lowpan.ko \

+             $(LINUX_DIR)/net/6lowpan/6lowpan.ko

+             AUTOLOAD:=$(call AutoProbe,bluetooth)

+endef

+

+define KernelPackage/bluetooth_6lowpan/description

+ Kernel support for 6LoWPAN over Bluetooth Low Energy devices

+endef

+

+$(eval $(call KernelPackage,bluetooth_6lowpan))

+

+

 define KernelPackage/bluetooth-hci-h4p

   SUBMENU:=$(OTHER_MENU)

   TITLE:=HCI driver with H4 Nokia extensions


---

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150122/706f7990/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From blogic at openwrt.org  Thu Jan 22 03:52:34 2015
From: blogic at openwrt.org (John Crispin)
Date: Thu, 22 Jan 2015 09:52:34 +0100
Subject: [OpenWrt-Devel] [PATCH v2] build: allow openwrt.git packages to
 be replaced by feeds
In-Reply-To: <1421895307-28550-1-git-send-email-mathieu@qca.qualcomm.com>
References: <1421895307-28550-1-git-send-email-mathieu@qca.qualcomm.com>
Message-ID: <54C0BA52.9060006@openwrt.org>



On 22/01/2015 03:55, Mathieu Olivari wrote:
> Currently, replacing a package available in openwrt.git requires 
> modifications in openwrt.git, or requires duplicating the package
> in a feed but with a different name, which causes all kind of
> problems related to dependencies (all packages selecting it would
> have to be modified accordingly to select the new package).
> 
> With this change, if a package with the same name is present both
> in feeds/ and package/ folders, the one in feeds/ can override the
> one in package/, both in the menuconfig and during the build, by
> passing the "-f" option to "./scripts/feeds install"
> 
> This mechanism is particularly useful for vendor tree, or in
> general for application which needs to replace one particular
> package which exists within openwrt.git by a custom/newer version.
> 
> Signed-off-by: Mathieu Olivari <mathieu at qca.qualcomm.com>


Hi Mathieu,

this looks much better. i think we should also add some info in
/etc/openwrt_release in the field DISTRIB_TAINTS='no-all' indicating
that the build uses out of tree vendor packages.

i will merge this patch as is, but could you put the openwrt_release
patch onto your todo list and send it in the nearish future please

	John

> --- v2: *fix an issue when trying to override packages which
> include a dependency in the core packages. (ex: lua depends on
> liblua, which exists in the core, which ended-up in the package not
> being overridden properly). *address John's concerns about core
> OpenWrt packages being overriden without notice and control.
> Override is now disable by default, and "-f" needs to be passed to
> "./scripts/feeds install" to allow it. --- include/scan.awk |   17
> +++++++++++++++++ include/scan.mk  |    2 +- scripts/feeds    |
> 25 ++++++++++++++++++------- 3 files changed, 36 insertions(+), 8
> deletions(-) create mode 100644 include/scan.awk
> 
> diff --git a/include/scan.awk b/include/scan.awk new file mode
> 100644 index 0000000..39b2977 --- /dev/null +++ b/include/scan.awk 
> @@ -0,0 +1,17 @@ +BEGIN { FS="/" } +$1 ~ /^feeds/ { FEEDS[$NF]=$0
> } +$1 !~ /^feeds/ { PKGS[$NF]=$0 } +END { +	# Filter-out OpenWrt
> packages which have a feeds equivalent +	for (pkg in PKGS) +		if
> (pkg in FEEDS) +			delete PKGS[pkg] +	n = asort(PKGS) +	for (i=1; i
> <= n; i++) { +		print PKGS[i] +	} +	n = asort(FEEDS) +	for (i=1; i
> <= n; i++){ +		print FEEDS[i] +	} +} diff --git a/include/scan.mk
> b/include/scan.mk index 0998333..138707d 100644 ---
> a/include/scan.mk +++ b/include/scan.mk @@ -43,7 +43,7 @@ endef
> 
> $(FILELIST): rm -f $(TMP_DIR)/info/.files-$(SCAN_TARGET)-* -	$(call
> FIND_L, $(SCAN_DIR)) $(SCAN_EXTRA) -mindepth 1 $(if
> $(SCAN_DEPTH),-maxdepth $(SCAN_DEPTH)) -name Makefile | xargs grep
> -HE 'call (Build/DefaultTargets|Build(Package|Target)|.+Package)' |
> sed -e 's#^$(SCAN_DIR)/##' -e 's#/Makefile:.*##' | uniq > $@ +
> $(call FIND_L, $(SCAN_DIR)) $(SCAN_EXTRA) -mindepth 1 $(if
> $(SCAN_DEPTH),-maxdepth $(SCAN_DEPTH)) -name Makefile | xargs grep
> -HE 'call (Build/DefaultTargets|Build(Package|Target)|.+Package)' |
> sed -e 's#^$(SCAN_DIR)/##' -e 's#/Makefile:.*##' | uniq | awk -f
> include/scan.awk > $@
> 
> $(TMP_DIR)/info/.files-$(SCAN_TARGET).mk: $(FILELIST) ( \ diff
> --git a/scripts/feeds b/scripts/feeds index 31ad544..6c03375
> 100755 --- a/scripts/feeds +++ b/scripts/feeds @@ -358,6 +358,7 @@
> sub is_core_package($) { sub install_package { my $feed = shift; my
> $name = shift; +	my $force = shift; my $ret = 0;
> 
> $feed = lookup_package($feed, $name); @@ -383,13 +384,22 @@ sub
> install_package { $src or $src = $name;
> 
> # previously installed packages set the runtime package -	# newly
> installed packages set the source package -	$installed{$src} and
> return 0; +	# newly installed packages set the source package to 1 
> +	$installed{$src} and $installed{$src} == 1 and return 0; + +	#
> we'll trigger the override only with the 3 conditions below: +	# -
> override is allowed by command line (-f) +	# - a package with the
> same src exists in the core packages list +	# - the package
> previously installed is not from a feed +	my $override = 1 if
> ($force and is_core_package($src) and !$installed{$src}->{feed});
> 
> # check previously installed packages -	$installed{$name} and
> return 0; +	$installed{$name} and !$override and return 0; 
> $installed{$src} = 1; -	warn "Installing package '$src'\n"; + +
> $override == 1 +		and warn "Overriding package '$src'\n" +		or warn
> "Installing package '$src'\n";
> 
> $install_method{$type} or do { warn "Unknown installation method:
> '$type'\n"; @@ -436,7 +446,7 @@ sub install { my $feed; my $ret =
> 0;
> 
> -	getopts('ap:d:h', \%opts); +	getopts('ap:d:fh', \%opts);
> 
> if ($opts{h}) { usage(); @@ -462,7 +472,7 @@ sub install { my $p =
> $feed_package->{$name}; next if $p->{vdepends}; if( $p->{name} ) { 
> -						install_package($feed, $p->{name}) == 0 or $ret = 1; +
> install_package($feed, $p->{name}, exists($opts{f})) == 0 or $ret =
> 1; get_feed($f->[1]); } } @@ -470,7 +480,7 @@ sub install { } }
> else { while ($name = shift @ARGV) { -			install_package($feed,
> $name) == 0 or $ret = 1; +			install_package($feed, $name,
> exists($opts{f})) == 0 or $ret = 1; } }
> 
> @@ -638,6 +648,7 @@ Commands: -a :           Install all packages
> from all feeds or from the specified feed using the -p option. -p
> <feedname>: Prefer this feed when installing packages. -d <y|m|n>:
> Set default for newly installed packages. +	    -f :
> Install will be forced even if the package exists in core OpenWrt
> (override)
> 
> search [options] <substring>: Search for a package Options:
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From blogic at openwrt.org  Thu Jan 22 03:58:29 2015
From: blogic at openwrt.org (John Crispin)
Date: Thu, 22 Jan 2015 09:58:29 +0100
Subject: [OpenWrt-Devel] [PATCH v2] Adding support for 6LoWPAN over
 Bluetooth Low Energy in kernel 3.18.
In-Reply-To: <AB80DA35A7B64E4E98291794926897D95BA5D825@mbx04.nvlsi.no>
References: <AB80DA35A7B64E4E98291794926897D95BA5D825@mbx04.nvlsi.no>
Message-ID: <54C0BBB5.7080901@openwrt.org>



On 22/01/2015 09:48, Duda, Lukasz wrote:
> Adding support 6LoWPAN over Bluetooth Low Energy in kernel 3.18.
> 
> Creating new bluetooth_6lowpan group with CONFIG_6LOWPAN and
> CONFIG_BT_6LOWPAN.
> 
> Adding kernel object dependencies for 6LoWPAN over Bluetooth Low Energy.
> 
>  
> 


the mail contains a html version of the patch and a whitespace broken
text version

please resend using the method you use for v1. i assume you used
copy&paste and a mail client for v2





> Signed-off-by: Lukasz Duda <lukasz.duda... at nordicsemi.com
> <mailto:lukasz.duda... at nordicsemi.com>>
> 
>  
> 
> ---
> 
> v2: *fix an issue with the mail formatting as mail client removed line
> breaks.
> 
> ---
> 
> 
> Index: package/kernel/linux/modules/other.mk
> 
> ===================================================================
> 
> --- package/kernel/linux/modules/other.mk      (revision 44059)
> 
> +++ package/kernel/linux/modules/other.mk   (working copy)
> 
> @@ -70,6 +70,26 @@
> 
>  $(eval $(call KernelPackage,bluetooth))
> 
>  
> 
>  
> 
> +define KernelPackage/bluetooth_6lowpan
> 
> +  SUBMENU:=$(OTHER_MENU)
> 
> +  TITLE:=Bluetooth 6LoWPAN support
> 
> +  DEPENDS:=+kmod-bluetooth
> @!(LINUX_3_3||LINUX_3_8||LINUX_3_10||LINUX_3_13||LINUX_3_14)
> 
> +  KCONFIG:= \
> 
> +  CONFIG_6LOWPAN=m \
> 
> +  CONFIG_BT_6LOWPAN=m
> 
> +  FILES:= \
> 
> +             $(LINUX_DIR)/net/bluetooth/bluetooth_6lowpan.ko \
> 
> +             $(LINUX_DIR)/net/6lowpan/6lowpan.ko
> 
> +             AUTOLOAD:=$(call AutoProbe,bluetooth)
> 
> +endef
> 
> +
> 
> +define KernelPackage/bluetooth_6lowpan/description
> 
> + Kernel support for 6LoWPAN over Bluetooth Low Energy devices
> 
> +endef
> 
> +
> 
> +$(eval $(call KernelPackage,bluetooth_6lowpan))
> 
> +
> 
> +
> 
>  define KernelPackage/bluetooth-hci-h4p
> 
>    SUBMENU:=$(OTHER_MENU)
> 
>    TITLE:=HCI driver with H4 Nokia extensions
> 
> 
> ---
> 
> 
> 
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From blogic at openwrt.org  Thu Jan 22 04:07:42 2015
From: blogic at openwrt.org (John Crispin)
Date: Thu, 22 Jan 2015 10:07:42 +0100
Subject: [OpenWrt-Devel] uboot-lantiq cgu settings for ramboot image
In-Reply-To: <CACUy__Vf8w22x2MSjv8xShA6HaXA+LXTzmxs5hYLxieK6a7s+A@mail.gmail.com>
References: <1421664368.25187.18.camel@merveille.lan>
 <54BCEFD1.6010902@conorogorman.net> <1421678697.25187.27.camel@merveille.lan>
 <CACUy__U3gJ-M6Hz7A_GTewGaTJ+FK4fiZXANbxhLmmXt_0SM=g@mail.gmail.com>
 <1421691666.25187.46.camel@merveille.lan>
 <1421710757.25187.55.camel@merveille.lan>
 <1421753325.25187.58.camel@merveille.lan>
 <CACUy__WQYvxmH1vD5S3oR4BnGT9dStUe86aLDAZTJZf8B61P2A@mail.gmail.com>
 <1421765096.25187.77.camel@merveille.lan>
 <CACUy__Vf8w22x2MSjv8xShA6HaXA+LXTzmxs5hYLxieK6a7s+A@mail.gmail.com>
Message-ID: <54C0BDDE.1020806@openwrt.org>

is this patch correct and should be merged or is it a RFC ?

http://patchwork.ozlabs.org/patch/431024/
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From ben.mulvihill at gmail.com  Thu Jan 22 04:11:44 2015
From: ben.mulvihill at gmail.com (Ben Mulvihill)
Date: Thu, 22 Jan 2015 10:11:44 +0100
Subject: [OpenWrt-Devel] [PATCH] lantiq: correct value for fpi clock on
	ar9
In-Reply-To: <54C0A820.2080901@openwrt.org>
References: <1421832908.6920.7.camel@merveille.lan>
 <54C0A820.2080901@openwrt.org>
Message-ID: <1421917904.5308.2.camel@merveille.lan>

On Thu, 2015-01-22 at 08:34 +0100, John Crispin wrote:
> 
> On 21/01/2015 10:35, Ben Mulvihill wrote:
> > Hello,
> > 
> > This is a patch to go in target/linux/lantiq/patches-3.14/
> 
> please send a patch that adds the file instead of just sending the file
> 
> 
Sure, will do. I would have done, but I remembered you replying to 
someone else a little while ago that you preferred to "roll your own".

Ben
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From Lukasz.Duda at nordicsemi.no  Thu Jan 22 04:16:15 2015
From: Lukasz.Duda at nordicsemi.no (Duda, Lukasz)
Date: Thu, 22 Jan 2015 09:16:15 +0000
Subject: [OpenWrt-Devel] [PATCH v3] Adding support for 6LoWPAN over
 Bluetooth Low Energy in kernel 3.18.
Message-ID: <AB80DA35A7B64E4E98291794926897D95BA5D883@mbx04.nvlsi.no>

Adding support 6LoWPAN over Bluetooth Low Energy in kernel 3.18.
Creating new bluetooth_6lowpan group with CONFIG_6LOWPAN and CONFIG_BT_6LOWPAN.
Adding kernel object dependencies for 6LoWPAN over Bluetooth Low Energy.
 
Signed-off-by: Lukasz Duda <lukasz.duda... at nordicsemi.com>
 
---
v2: *fix an issue with the mail formatting as mail client removed line breaks.
v3: *fix an issue with html format.
---

Index: package/kernel/linux/modules/other.mk
===================================================================
--- package/kernel/linux/modules/other.mk	(revision 44059)
+++ package/kernel/linux/modules/other.mk	(working copy)
@@ -70,6 +70,26 @@
 $(eval $(call KernelPackage,bluetooth))
 
 
+define KernelPackage/bluetooth_6lowpan
+  SUBMENU:=$(OTHER_MENU)
+  TITLE:=Bluetooth 6LoWPAN support
+  DEPENDS:=+kmod-bluetooth @!(LINUX_3_3||LINUX_3_8||LINUX_3_10||LINUX_3_13||LINUX_3_14)
+  KCONFIG:= \
+  CONFIG_6LOWPAN=m \
+  CONFIG_BT_6LOWPAN=m
+  FILES:= \
+	$(LINUX_DIR)/net/bluetooth/bluetooth_6lowpan.ko \
+	$(LINUX_DIR)/net/6lowpan/6lowpan.ko
+	AUTOLOAD:=$(call AutoProbe,bluetooth)
+endef
+
+define KernelPackage/bluetooth_6lowpan/description
+ Kernel support for 6LoWPAN over Bluetooth Low Energy devices
+endef
+
+$(eval $(call KernelPackage,bluetooth_6lowpan))
+
+
 define KernelPackage/bluetooth-hci-h4p
   SUBMENU:=$(OTHER_MENU)
   TITLE:=HCI driver with H4 Nokia extensions

---
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From blogic at openwrt.org  Thu Jan 22 04:34:09 2015
From: blogic at openwrt.org (John Crispin)
Date: Thu, 22 Jan 2015 10:34:09 +0100
Subject: [OpenWrt-Devel] [PATCH v3] Adding support for 6LoWPAN over
 Bluetooth Low Energy in kernel 3.18.
In-Reply-To: <AB80DA35A7B64E4E98291794926897D95BA5D883@mbx04.nvlsi.no>
References: <AB80DA35A7B64E4E98291794926897D95BA5D883@mbx04.nvlsi.no>
Message-ID: <54C0C411.20707@openwrt.org>



On 22/01/2015 10:16, Duda, Lukasz wrote:
> Signed-off-by: Lukasz Duda <lukasz.duda... at nordicsemi.com>
> 

is this email addr valid ? it is not the one you used for sending the
patch
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From blogic at openwrt.org  Thu Jan 22 04:36:01 2015
From: blogic at openwrt.org (John Crispin)
Date: Thu, 22 Jan 2015 10:36:01 +0100
Subject: [OpenWrt-Devel] [PATCH] lantiq: correct value for fpi clock on
 ar9
In-Reply-To: <1421917904.5308.2.camel@merveille.lan>
References: <1421832908.6920.7.camel@merveille.lan>
 <54C0A820.2080901@openwrt.org> <1421917904.5308.2.camel@merveille.lan>
Message-ID: <54C0C481.6040204@openwrt.org>



On 22/01/2015 10:11, Ben Mulvihill wrote:
> On Thu, 2015-01-22 at 08:34 +0100, John Crispin wrote:
>>
>> On 21/01/2015 10:35, Ben Mulvihill wrote:
>>> Hello,
>>>
>>> This is a patch to go in target/linux/lantiq/patches-3.14/
>>
>> please send a patch that adds the file instead of just sending the file
>>
>>
> Sure, will do. I would have done, but I remembered you replying to 
> someone else a little while ago that you preferred to "roll your own".
> 
> Ben
> 


not sure which mail you mean but i guess it was related to the time when
we moved some of the code from patches/ to files/



_______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From Lukasz.Duda at nordicsemi.no  Thu Jan 22 04:41:10 2015
From: Lukasz.Duda at nordicsemi.no (Duda, Lukasz)
Date: Thu, 22 Jan 2015 09:41:10 +0000
Subject: [OpenWrt-Devel] [PATCH v4] Adding support for 6LoWPAN over
 Bluetooth Low Energy in kernel 3.18.
Message-ID: <AB80DA35A7B64E4E98291794926897D95BA5D8D9@mbx04.nvlsi.no>

Adding support 6LoWPAN over Bluetooth Low Energy in kernel 3.18.
Creating new bluetooth_6lowpan group with CONFIG_6LOWPAN and CONFIG_BT_6LOWPAN.
Adding kernel object dependencies for 6LoWPAN over Bluetooth Low Energy.
 
Signed-off-by: Lukasz Duda <lukasz.duda at nordicsemi.no>
 
---
v2: *fix an issue with the mail formatting as mail client removed line breaks.
v3: *fix an issue with html format.
v4: *fix an issue with e-mail typo.
---

Index: package/kernel/linux/modules/other.mk
===================================================================
--- package/kernel/linux/modules/other.mk       (revision 44059)
+++ package/kernel/linux/modules/other.mk       (working copy)
@@ -70,6 +70,26 @@
 $(eval $(call KernelPackage,bluetooth))
 
 
+define KernelPackage/bluetooth_6lowpan
+  SUBMENU:=$(OTHER_MENU)
+  TITLE:=Bluetooth 6LoWPAN support
+  DEPENDS:=+kmod-bluetooth @!(LINUX_3_3||LINUX_3_8||LINUX_3_10||LINUX_3_13||LINUX_3_14)
+  KCONFIG:= \
+  CONFIG_6LOWPAN=m \
+  CONFIG_BT_6LOWPAN=m
+  FILES:= \
+       $(LINUX_DIR)/net/bluetooth/bluetooth_6lowpan.ko \
+       $(LINUX_DIR)/net/6lowpan/6lowpan.ko
+       AUTOLOAD:=$(call AutoProbe,bluetooth)
+endef
+
+define KernelPackage/bluetooth_6lowpan/description
+ Kernel support for 6LoWPAN over Bluetooth Low Energy devices
+endef
+
+$(eval $(call KernelPackage,bluetooth_6lowpan))
+
+
 define KernelPackage/bluetooth-hci-h4p
   SUBMENU:=$(OTHER_MENU)
   TITLE:=HCI driver with H4 Nokia extensions

---
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From maxime.ripard at free-electrons.com  Thu Jan 22 05:33:14 2015
From: maxime.ripard at free-electrons.com (Maxime Ripard)
Date: Thu, 22 Jan 2015 11:33:14 +0100
Subject: [OpenWrt-Devel] [PATCH 3/9] kernel: Allow ubi autoattach to run
 on NOR flash
In-Reply-To: <20150114123737.GR4891@lukather>
References: <1421164606-3222-1-git-send-email-maxime.ripard@free-electrons.com>
 <1421164606-3222-4-git-send-email-maxime.ripard@free-electrons.com>
 <CACna6rz5APOgGThwFSDC8RG_2xhYYVSLyv2Qdv=4nnT_Pa7o=g@mail.gmail.com>
 <20150114123737.GR4891@lukather>
Message-ID: <20150122103314.GL4367@lukather>

Hi,

On Wed, Jan 14, 2015 at 01:37:37PM +0100, Maxime Ripard wrote:
> On Wed, Jan 14, 2015 at 12:43:25PM +0100, Rafa? Mi?ecki wrote:
> > On 13 January 2015 at 16:56, Maxime Ripard
> > <maxime.ripard at free-electrons.com> wrote:
> > > Some devices out there only have a NOR flash to store the rootfs on.
> > >
> > > While using UBI is arguable on this kind of NAND, this is something that should
> > > be supported.
> > 
> > So why use UBI at all? Doesn't it make more sense to stick to the
> > JFFS2? You should be even able to easily create 2 different image
> > types (one for NOR, one for NAND) in one target (see bcm53xx).
> 
> The Openblocks AX3 has a fairly large NOR (128MB) which would make
> JFFS2 a rather poor choice, and the UBI overhead wouldn't be that bad.

Is that case good enough for you?

> The A385-RD board has a much smaller SPI-NOR (16MB) though, so we
> could use jffs2 there, but I wasn't seeing much point at creating a
> whole new layout just for a single board.

I'll switch this one to JFFS2 and the MTDSPLIT framework. Are you
satisfied with the NAND support? Just to know if I can continue to
model the NOR stuff on that.

Thanks,
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150122/782e03d5/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From zajec5 at gmail.com  Thu Jan 22 05:45:13 2015
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Thu, 22 Jan 2015 11:45:13 +0100
Subject: [OpenWrt-Devel] [PATCH uclient] allow sending requests with DELETE
	method
Message-ID: <1421923513-20001-1-git-send-email-zajec5@gmail.com>

Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com>
---
 uclient-http.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/uclient-http.c b/uclient-http.c
index 9f9fac9..eb69702 100644
--- a/uclient-http.c
+++ b/uclient-http.c
@@ -41,6 +41,7 @@ enum request_type {
 	REQ_HEAD,
 	REQ_POST,
 	REQ_PUT,
+	REQ_DELETE,
 	__REQ_MAX
 };
 
@@ -58,6 +59,7 @@ static const char * const request_types[__REQ_MAX] = {
 	[REQ_HEAD] = "HEAD",
 	[REQ_POST] = "POST",
 	[REQ_PUT] = "PUT",
+	[REQ_DELETE] = "DELETE",
 };
 
 struct uclient_http {
-- 
1.8.4.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From nbd at openwrt.org  Thu Jan 22 06:01:09 2015
From: nbd at openwrt.org (Felix Fietkau)
Date: Thu, 22 Jan 2015 12:01:09 +0100
Subject: [OpenWrt-Devel] [PATCH uclient] use const for char buffer in
	uclient_write
In-Reply-To: <1421876915-17791-1-git-send-email-zajec5@gmail.com>
References: <1421876915-17791-1-git-send-email-zajec5@gmail.com>
Message-ID: <54C0D875.6070805@openwrt.org>

On 2015-01-21 22:48, Rafa? Mi?ecki wrote:
> We are not supposed to modify it and ustream accepts const already.
> 
> Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com>
Applied, thanks.

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

From nbd at openwrt.org  Thu Jan 22 06:01:23 2015
From: nbd at openwrt.org (Felix Fietkau)
Date: Thu, 22 Jan 2015 12:01:23 +0100
Subject: [OpenWrt-Devel] [PATCH uclient] allow sending requests with
	DELETE method
In-Reply-To: <1421923513-20001-1-git-send-email-zajec5@gmail.com>
References: <1421923513-20001-1-git-send-email-zajec5@gmail.com>
Message-ID: <54C0D883.5040107@openwrt.org>

On 2015-01-22 11:45, Rafa? Mi?ecki wrote:
> Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com>
Applied, thanks.

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

From yszhou4tech at gmail.com  Thu Jan 22 07:01:21 2015
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Thu, 22 Jan 2015 20:01:21 +0800
Subject: [OpenWrt-Devel] [PATCH 1/5] uloop: fix out-of-bound loop index.
In-Reply-To: <54BFF6EF.1010809@openwrt.org>
References: <1421846488-323-1-git-send-email-yszhou4tech@gmail.com>
 <54BFF6EF.1010809@openwrt.org>
Message-ID: <CAECwjAgW=Lh+A8arUG2Comjm=rXXEuXFPuYjNhABVJhuSOCNDw@mail.gmail.com>

On 22 January 2015 at 02:58, Felix Fietkau <nbd at openwrt.org> wrote:
> On 2015-01-21 14:21, Yousong Zhou wrote:
>> Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
>> ---
>>  uloop.c | 6 +++---
>>  1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/uloop.c b/uloop.c
>> index 9a77ce4..3224f4b 100644
>> --- a/uloop.c
>> +++ b/uloop.c
>> @@ -394,11 +394,11 @@ int uloop_fd_delete(struct uloop_fd *fd)
>>  {
>>       int i;
>>
>> -     for (i = 0; i < cur_nfds; i++) {
>> -             if (cur_fds[cur_fd + i].fd != fd)
>> +     for (i = cur_fd; i < cur_nfds; i++) {
>> +             if (cur_fds[i].fd != fd)
> This patch (aside from the fact that it's completely missing an
> explanation) seems wrong to me.
> cur_nfds really means the number of file descriptors in the struct, not
> the array size starting at 0.
> Take a look at uloop_run_events - when it increments cur_fd, it also
> decrements cur_nfds.
>

Yes, I got the point now.  Thanks for the clarification.

> - Felix
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From blogic at openwrt.org  Thu Jan 22 08:15:20 2015
From: blogic at openwrt.org (John Crispin)
Date: Thu, 22 Jan 2015 14:15:20 +0100
Subject: [OpenWrt-Devel] [PATCH v2] build: allow openwrt.git packages to
 be replaced by feeds
In-Reply-To: <1421895307-28550-1-git-send-email-mathieu@qca.qualcomm.com>
References: <1421895307-28550-1-git-send-email-mathieu@qca.qualcomm.com>
Message-ID: <54C0F7E8.90102@openwrt.org>



On 22/01/2015 03:55, Mathieu Olivari wrote:
> Currently, replacing a package available in openwrt.git requires
> modifications in openwrt.git, or requires duplicating the package in a
> feed but with a different name, which causes all kind of problems
> related to dependencies (all packages selecting it would have to be
> modified accordingly to select the new package).
> 
> With this change, if a package with the same name is present both in
> feeds/ and package/ folders, the one in feeds/ can override the one
> in package/, both in the menuconfig and during the build, by passing the
> "-f" option to "./scripts/feeds install"
> 
> This mechanism is particularly useful for vendor tree, or in general for
> application which needs to replace one particular package which exists
> within openwrt.git by a custom/newer version.
> 

Hi,

./scripts/feeds install -p -a alljoyn
Use of uninitialized value $override in numeric eq (==) at
./scripts/feeds line 400.
Installing package 'alljoyn'

i will revert the patch now and await a fixed version

	John



> Signed-off-by: Mathieu Olivari <mathieu at qca.qualcomm.com>
> ---
> v2:
> *fix an issue when trying to override packages which include a dependency in the
>  core packages. (ex: lua depends on liblua, which exists in the core, which
>  ended-up in the package not being overridden properly).
> *address John's concerns about core OpenWrt packages being overriden without
>  notice and control. Override is now disable by default, and "-f" needs to be
>  passed to "./scripts/feeds install" to allow it.
> ---
>  include/scan.awk |   17 +++++++++++++++++
>  include/scan.mk  |    2 +-
>  scripts/feeds    |   25 ++++++++++++++++++-------
>  3 files changed, 36 insertions(+), 8 deletions(-)
>  create mode 100644 include/scan.awk
> 
> diff --git a/include/scan.awk b/include/scan.awk
> new file mode 100644
> index 0000000..39b2977
> --- /dev/null
> +++ b/include/scan.awk
> @@ -0,0 +1,17 @@
> +BEGIN { FS="/" }
> +$1 ~ /^feeds/ { FEEDS[$NF]=$0 }
> +$1 !~ /^feeds/ { PKGS[$NF]=$0 }
> +END {
> +	# Filter-out OpenWrt packages which have a feeds equivalent
> +	for (pkg in PKGS)
> +		if (pkg in FEEDS)
> +			delete PKGS[pkg]
> +	n = asort(PKGS)
> +	for (i=1; i <= n; i++) {
> +		print PKGS[i]
> +	}
> +	n = asort(FEEDS)
> +	for (i=1; i <= n; i++){
> +		print FEEDS[i]
> +	}
> +}
> diff --git a/include/scan.mk b/include/scan.mk
> index 0998333..138707d 100644
> --- a/include/scan.mk
> +++ b/include/scan.mk
> @@ -43,7 +43,7 @@ endef
>  
>  $(FILELIST):
>  	rm -f $(TMP_DIR)/info/.files-$(SCAN_TARGET)-*
> -	$(call FIND_L, $(SCAN_DIR)) $(SCAN_EXTRA) -mindepth 1 $(if $(SCAN_DEPTH),-maxdepth $(SCAN_DEPTH)) -name Makefile | xargs grep -HE 'call (Build/DefaultTargets|Build(Package|Target)|.+Package)' | sed -e 's#^$(SCAN_DIR)/##' -e 's#/Makefile:.*##' | uniq > $@
> +	$(call FIND_L, $(SCAN_DIR)) $(SCAN_EXTRA) -mindepth 1 $(if $(SCAN_DEPTH),-maxdepth $(SCAN_DEPTH)) -name Makefile | xargs grep -HE 'call (Build/DefaultTargets|Build(Package|Target)|.+Package)' | sed -e 's#^$(SCAN_DIR)/##' -e 's#/Makefile:.*##' | uniq | awk -f include/scan.awk > $@
>  
>  $(TMP_DIR)/info/.files-$(SCAN_TARGET).mk: $(FILELIST)
>  	( \
> diff --git a/scripts/feeds b/scripts/feeds
> index 31ad544..6c03375 100755
> --- a/scripts/feeds
> +++ b/scripts/feeds
> @@ -358,6 +358,7 @@ sub is_core_package($) {
>  sub install_package {
>  	my $feed = shift;
>  	my $name = shift;
> +	my $force = shift;
>  	my $ret = 0;
>  
>  	$feed = lookup_package($feed, $name);
> @@ -383,13 +384,22 @@ sub install_package {
>  	$src or $src = $name;
>  
>  	# previously installed packages set the runtime package
> -	# newly installed packages set the source package
> -	$installed{$src} and return 0;
> +	# newly installed packages set the source package to 1
> +	$installed{$src} and $installed{$src} == 1 and return 0;
> +
> +	# we'll trigger the override only with the 3 conditions below:
> +	# - override is allowed by command line (-f)
> +	# - a package with the same src exists in the core packages list
> +	# - the package previously installed is not from a feed
> +	my $override = 1 if ($force and is_core_package($src) and !$installed{$src}->{feed});
>  
>  	# check previously installed packages
> -	$installed{$name} and return 0;
> +	$installed{$name} and !$override and return 0;
>  	$installed{$src} = 1;
> -	warn "Installing package '$src'\n";
> +
> +	$override == 1
> +		and warn "Overriding package '$src'\n"
> +		or warn "Installing package '$src'\n";
>  
>  	$install_method{$type} or do {
>  		warn "Unknown installation method: '$type'\n";
> @@ -436,7 +446,7 @@ sub install {
>  	my $feed;
>  	my $ret = 0;
>  
> -	getopts('ap:d:h', \%opts);
> +	getopts('ap:d:fh', \%opts);
>  
>  	if ($opts{h}) {
>  		usage();
> @@ -462,7 +472,7 @@ sub install {
>  					my $p = $feed_package->{$name};
>  					next if $p->{vdepends};
>  					if( $p->{name} ) {
> -						install_package($feed, $p->{name}) == 0 or $ret = 1;
> +						install_package($feed, $p->{name}, exists($opts{f})) == 0 or $ret = 1;
>  						get_feed($f->[1]);
>  					}
>  				}
> @@ -470,7 +480,7 @@ sub install {
>  		}
>  	} else {
>  		while ($name = shift @ARGV) {
> -			install_package($feed, $name) == 0 or $ret = 1;
> +			install_package($feed, $name, exists($opts{f})) == 0 or $ret = 1;
>  		}
>  	}
>  
> @@ -638,6 +648,7 @@ Commands:
>  	    -a :           Install all packages from all feeds or from the specified feed using the -p option.
>  	    -p <feedname>: Prefer this feed when installing packages.
>  	    -d <y|m|n>:    Set default for newly installed packages.
> +	    -f :           Install will be forced even if the package exists in core OpenWrt (override)
>  
>  	search [options] <substring>: Search for a package
>  	Options:
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From blogic at openwrt.org  Thu Jan 22 08:41:33 2015
From: blogic at openwrt.org (John Crispin)
Date: Thu, 22 Jan 2015 14:41:33 +0100
Subject: [OpenWrt-Devel] [PATCH] fix typo in netifd.sh
In-Reply-To: <20150120184414.711139fe@samsung>
References: <20150120184414.711139fe@samsung>
Message-ID: <54C0FE0D.1070500@openwrt.org>



On 20/01/2015 18:44, Cezary Jackiewicz wrote:
> $ht variable is not passed. $htmode is.
> 
> With this, wpa_supplicant-phy0.conf contains htmode line if htmode is set in config.
> 
> Signed-off-by: Cezary Jackiewicz <cezary.jackiewicz at gmail.com>
> ---
> 
> diff --git a/package/network/services/hostapd/files/netifd.sh b/package/network/services/hostapd/files/netifd.sh
> index d625709..436eee3 100644
> --- a/package/network/services/hostapd/files/netifd.sh
> +++ b/package/network/services/hostapd/files/netifd.sh
> @@ -595,8 +595,7 @@ wpa_supplicant_add_network() {
>  		append network_data "mcast_rate=$mc_rate" "$N$T"
>  	}
>  
> -	local ht_str
> -	[ -n "$ht" ] && append network_data "htmode=$ht" "$N$T"
> +	[ -n "$htmode" ] && append network_data "htmode=$htmode" "$N$T"
>  

this patch is wrong for the following reasons

* the htmode values inside netifd-wireless.sh are not the same values
that wpa_supplicant expects
* wpa_supplicant should automagically detect the channel (and the HT40
ext chan)

this leads me to wonder why you need this and an option would be 2 adhoc
clients.

can you explain your wifi setup so that we can figure out how to
properly fix this ?


>  	cat >> "$_config" <<EOF
>  network={
> 
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From jan.cermak at nic.cz  Thu Jan 22 09:15:01 2015
From: jan.cermak at nic.cz (=?UTF-8?B?SmFuIMSMZXJtw6Fr?=)
Date: Thu, 22 Jan 2015 15:15:01 +0100
Subject: [OpenWrt-Devel] [PATCH] iptables: IPv6 addresses with some mask
 values cause memory corruption
Message-ID: <54C105E5.2090708@nic.cz>

This patch fixes a bug in iptables that is causing memory corruption
when a rule contains IPv6 address with mask divisible by 8 or equal to
/128. After some debugging, we found out that this bug was already
reported and applied in commit a76a5c997a235f822d49799c25fce8e311d473c7
in iptables.

The bug occured on PowerPC platform (mpc85xx), resulting in segfault.
It's possible that it'd not surface on other platforms or with some
compiler options, as the overflown byte wouldn't rewrite any vital
address.

This patch would probably be no longer necessasy after release of
iptables 1.4.22, however it's not sure when a new version is going to be
released and this bug can make using IPv6 rules in iptables impossible.

Also, can you please backport this patch to BB?

Signed-off-by: Jan Cermak <jan.cermak at nic.cz>

Link to original commit in iptables repository:
https://git.netfilter.org/iptables/commit/?id=a76a5c997a235f822d49799c25fce8e311d473c7

diff --git
a/package/network/utils/iptables/patches/600-libxtables-fix-two-off-by-one-memory-corruption-bugs.patch
b/package/network/utils/iptables/patches/600-libxtables-fix-two-off-by-one-memory-corruption-bugs.patch
new file mode 100644
index 0000000..3f7364b
--- /dev/null
+++
b/package/network/utils/iptables/patches/600-libxtables-fix-two-off-by-one-memory-corruption-bugs.patch
@@ -0,0 +1,14 @@
+--- a/libxtables/xtables.c
++++ b/libxtables/xtables.c
+@@ -1704,8 +1704,9 @@ static struct in6_addr *parse_ip6mask(char *mask)
+ 	if (bits != 0) {
+ 		char *p = (void *)&maskaddr;
+ 		memset(p, 0xff, bits / 8);
+-		memset(p + (bits / 8) + 1, 0, (128 - bits) / 8);
+-		p[bits/8] = 0xff << (8 - (bits & 7));
++		memset(p + ((bits + 7) / 8), 0, (128 - bits) / 8);
++		if (bits < 128)
++			p[bits/8] = 0xff << (8 - (bits & 7));
+ 		return &maskaddr;
+ 	}
+
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From mhei at heimpold.de  Thu Jan 22 12:35:18 2015
From: mhei at heimpold.de (Michael Heimpold)
Date: Thu, 22 Jan 2015 18:35:18 +0100
Subject: [OpenWrt-Devel] [PATCH] feeds.conf.default: add dlan feed
In-Reply-To: <54C03D16.2090108@openwrt.org>
References: <1419889990-5432-1-git-send-email-mhei@heimpold.de>
 <54C03D16.2090108@openwrt.org>
Message-ID: <2906183.8anGQmAaCQ@kerker>

Hi Florian,

thank you for adding the instructions.

I also agree that this binary-only packages should not be added to main
openwrt for legal reasons and so on.
My original intension was to make this device more "user-friendly", and
if we do not want to enable this feed by default, we could add this line
commented out?
However, we should pre-select the packages which are required to get
the PLC part running, shouldn't we? 

What do you think about the following stuff?

Regards, mhei

 feeds.conf.default                                     |    1 +
 target/linux/mcs814x/profiles/100-dLAN-USB-Extender.mk |    6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/feeds.conf.default b/feeds.conf.default
index 208342c..14f2e37 100644
--- a/feeds.conf.default
+++ b/feeds.conf.default
@@ -3,6 +3,7 @@ src-git luci https://github.com/openwrt/luci.git
 src-git routing https://github.com/openwrt-routing/packages.git
 src-git telephony https://github.com/openwrt/telephony.git
 src-git management https://github.com/openwrt-management/packages.git
+#src-git dlan https://github.com/ffainelli/dlan-usb-extender-3rd-party.git
 #src-git oldpackages http://git.openwrt.org/packages.git
 #src-svn xwrt http://x-wrt.googlecode.com/svn/trunk/package
 #src-svn phone svn://svn.openwrt.org/openwrt/feeds/phone
diff --git a/target/linux/mcs814x/profiles/100-dLAN-USB-Extender.mk b/target/linux/mcs814x/profiles/100-dLAN-USB-Extender.mk
index 168bfa1..6f13121 100644
--- a/target/linux/mcs814x/profiles/100-dLAN-USB-Extender.mk
+++ b/target/linux/mcs814x/profiles/100-dLAN-USB-Extender.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2012 OpenWrt.org
+# Copyright (C) 2012-2015 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -7,7 +7,7 @@
 
 define Profile/dLAN_USB_Extender
   NAME:=Devolo dLAN USB Extender
-  PACKAGES:=kmod-usb-serial kmod-usb-serial-ftdi
+  PACKAGES:=kmod-usb-serial kmod-usb-serial-ftdi foot
 endef
 
 define Profile/dLAN_USB_Extender/Description
@@ -21,5 +21,5 @@ define Profile/dLAN_USB_Extender/Description
 	Instructions are available here:
 	http://ffainelli.github.io/dlan-usb-extender-3rd-party/
 endef
-$(eval $(call Profile,dLAN_USB_Extender))
 
+$(eval $(call Profile,dLAN_USB_Extender))
-- 
1.7.10.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From mats.dev.list at gmail.com  Thu Jan 22 13:34:29 2015
From: mats.dev.list at gmail.com (Mats Karrman)
Date: Thu, 22 Jan 2015 19:34:29 +0100
Subject: [OpenWrt-Devel] How to handle multiple providers?
Message-ID: <54C142B5.8000209@gmail.com>

Hi,

I'm struggling with a problem and I can't really get it to work as I want.

Say you have 3 packages, A1, A2 and A3, that all provide the include 
file "f.h".
I also have package B that build-time depends on "f.h".

I will enable either A1, A2 or A3 in the .config for a build but how do 
I make
OpenWRT understand that it cannot build B until either of Ax is built?

I'd be ever so greatfull for some good hints on how to solve this.

(and oh, I'm on "Attitude-Adjustment")

Best regards,
Mats
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From cezary.jackiewicz at gmail.com  Thu Jan 22 14:04:52 2015
From: cezary.jackiewicz at gmail.com (Cezary Jackiewicz)
Date: Thu, 22 Jan 2015 20:04:52 +0100
Subject: [OpenWrt-Devel] [PATCH] ar71xx: add support for TP-LINK TL-WR843ND
	v1
Message-ID: <20150122200452.3a75e76b@samsung>

TP-LINK TL-WR843ND v1 is the same model like wr41, but with 
Power over Ethernet on wan port.

Signed-off-by: Cezary Jackiewicz <cezary.jackiewicz at gmail.com>
---

diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index a870396..14ee68b 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -142,6 +142,9 @@ tplink_board_detect() {
 	"084200"*)
 		model="TP-Link TL-WR842N/ND"
 		;;
+	"084300"*)
+		model="TP-Link TL-WR843N/ND"
+		;;
 	"085000"*)
 		model="TP-Link TL-WA850RE"
 		;;
diff --git a/target/linux/ar71xx/generic/profiles/tp-link.mk b/target/linux/ar71xx/generic/profiles/tp-link.mk
index a9d170c..c7a65e4 100644
--- a/target/linux/ar71xx/generic/profiles/tp-link.mk
+++ b/target/linux/ar71xx/generic/profiles/tp-link.mk
@@ -312,6 +312,17 @@ endef
 $(eval $(call Profile,TLWR842))
 
 
+define Profile/TLWR843
+	NAME:=TP-LINK TL-WR843N/ND
+	PACKAGES:=
+endef
+
+define Profile/TLWR843/Description
+	Package set optimized for the TP-LINK TL-WR843N/ND.
+endef
+$(eval $(call Profile,TLWR843))
+
+
 define Profile/TLWR941
 	NAME:=TP-LINK TL-WR941N/ND
 	PACKAGES:=
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
index d905bd0..ec6330f 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -1402,6 +1402,7 @@ $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWA830RV2,tl-wa830re-v2,TL-WA830
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR841NV9,tl-wr841n-v9,TL-WR841N-v9,ttyS0,115200,0x08410009,1,4Mlzma))
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR847NV8,tl-wr847n-v8,TL-WR841N-v8,ttyS0,115200,0x08470008,1,4Mlzma))
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR842V2,tl-wr842n-v2,TL-WR842N-v2,ttyS0,115200,0x8420002,1,8Mlzma))
+$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR843NV1,tl-wr843nd-v1,TL-WR841N-v8,ttyS0,115200,0x08430001,1,4Mlzma))
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWA801NV2,tl-wa801nd-v2,TL-WA801ND-v2,ttyS0,115200,0x08010002,1,4Mlzma))
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWA850,tl-wa850re-v1,TL-WA850RE,ttyS0,115200,0x08500001,1,4Mlzma))
 $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWA860,tl-wa860re-v1,TL-WA860RE,ttyS0,115200,0x08600001,1,4Mlzma))
@@ -1486,6 +1487,7 @@ $(eval $(call MultiProfile,TLWR741,TLWR741NV1 TLWR741NV2 TLWR741NV4))
 $(eval $(call MultiProfile,TLWR743,TLWR743NV1 TLWR743NV2))
 $(eval $(call MultiProfile,TLWR841,TLWR841NV15 TLWR841NV3 TLWR841NV5 TLWR841NV7 TLWR841NV8 TLWR841NV9 TLWR847NV8))
 $(eval $(call MultiProfile,TLWR842,TLWR842V1 TLWR842V2))
+$(eval $(call MultiProfile,TLWR843,TLWR843NV1))
 $(eval $(call MultiProfile,TLWR941,TLWR941NV2 TLWR941NV3 TLWR941NV4 TLWR941NV6))
 $(eval $(call MultiProfile,TLWR1043,TLWR1043V1 TLWR1043V2))
 $(eval $(call MultiProfile,TLWDR4300,TLWDR3500V1 TLWDR3600V1 TLWDR4300V1 TLWDR4300V1IL TLWDR4310V1 MW4530RV1))


-- 
Pozdrawiam,
 Cezary Jackiewicz
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From ben.mulvihill at gmail.com  Thu Jan 22 16:23:40 2015
From: ben.mulvihill at gmail.com (Ben Mulvihill)
Date: Thu, 22 Jan 2015 22:23:40 +0100
Subject: [OpenWrt-Devel] uboot-lantiq cgu settings for ramboot image
In-Reply-To: <54C0BDDE.1020806@openwrt.org>
References: <1421664368.25187.18.camel@merveille.lan>
 <54BCEFD1.6010902@conorogorman.net>
 <1421678697.25187.27.camel@merveille.lan>
 <CACUy__U3gJ-M6Hz7A_GTewGaTJ+FK4fiZXANbxhLmmXt_0SM=g@mail.gmail.com>
 <1421691666.25187.46.camel@merveille.lan>
 <1421710757.25187.55.camel@merveille.lan>
 <1421753325.25187.58.camel@merveille.lan>
 <CACUy__WQYvxmH1vD5S3oR4BnGT9dStUe86aLDAZTJZf8B61P2A@mail.gmail.com>
 <1421765096.25187.77.camel@merveille.lan>
 <CACUy__Vf8w22x2MSjv8xShA6HaXA+LXTzmxs5hYLxieK6a7s+A@mail.gmail.com>
 <54C0BDDE.1020806@openwrt.org>
Message-ID: <1421961820.6028.14.camel@merveille.lan>

On Thu, 2015-01-22 at 10:07 +0100, John Crispin wrote:
> is this patch correct and should be merged or is it a RFC ?
> 
> http://patchwork.ozlabs.org/patch/431024/

Daniel found a mistake in the current code. I found another.
This fixes both, so I guess it is a patch rather than an RFC.
I understand it to be correct, but the authoritative answer as
to whether it is indeed correct should really come from
Daniel ;-) In any case Daniel has already committed it to
uboot-lantiq github.

Hope this is some help. Daniel?
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From hkallweit1 at gmail.com  Thu Jan 22 16:48:25 2015
From: hkallweit1 at gmail.com (Heiner Kallweit)
Date: Thu, 22 Jan 2015 22:48:25 +0100
Subject: [OpenWrt-Devel] [PATCH 0/5] ar8216: Patch series with further
 improvements and new functionality
Message-ID: <54C17029.1000706@gmail.com>

Heiner Kallweit (5):
  ar8216: fix ATU flushing
  ar8216: add link change detection for switch ports
  ar8216: decrease page switch wait time
  ar8216: add swconfig attribute to display ARL table on AR8327/AR8337
  ar8216: prefix mii_xxx functions to avoid kernel namespace pollution

 .../linux/generic/files/drivers/net/phy/ar8216.c   | 160 ++++++++++++++++-----
 .../linux/generic/files/drivers/net/phy/ar8216.h   |  44 ++++++
 .../linux/generic/files/drivers/net/phy/ar8327.c   |  84 ++++++++++-
 .../linux/generic/files/drivers/net/phy/ar8327.h   |  21 +++
 4 files changed, 276 insertions(+), 33 deletions(-)

-- 
2.2.2
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From hkallweit1 at gmail.com  Thu Jan 22 16:49:55 2015
From: hkallweit1 at gmail.com (Heiner Kallweit)
Date: Thu, 22 Jan 2015 22:49:55 +0100
Subject: [OpenWrt-Devel] [PATCH 1/5] ar8216: fix ATU flushing
Message-ID: <54C17083.6080503@gmail.com>

The functionality to flush the address translation table contains two bugs
which luckily compensate each other.
1. Just setting the operation is not sufficient to perform the flushing.
   The "active" bit needs to be set to actually trigger an action.
   For the vtu operations this is implemented correctly.
2. ar8xxx_phy_read_status is called every 2s by the phy state machine
   to check for link changes. This would have caused an ATU flush
   every 2s.

Fix the chip-specific ATU flush functions and remove the ATU flush call
from ar8xxx_phy_read_status.

Signed-off-by: Heiner Kallweit <hkallweit1 at gmail.com>
---
 target/linux/generic/files/drivers/net/phy/ar8216.c | 11 +++--------
 target/linux/generic/files/drivers/net/phy/ar8327.c |  3 ++-
 2 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c
index 90484d6..370f1ac 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.c
@@ -613,7 +613,8 @@ ar8216_atu_flush(struct ar8xxx_priv *priv)
 
 	ret = ar8216_wait_bit(priv, AR8216_REG_ATU, AR8216_ATU_ACTIVE, 0);
 	if (!ret)
-		ar8xxx_write(priv, AR8216_REG_ATU, AR8216_ATU_OP_FLUSH);
+		ar8xxx_write(priv, AR8216_REG_ATU, AR8216_ATU_OP_FLUSH |
+						   AR8216_ATU_ACTIVE);
 
 	return ret;
 }
@@ -1711,7 +1712,6 @@ ar8xxx_phy_read_status(struct phy_device *phydev)
 {
 	struct ar8xxx_priv *priv = phydev->priv;
 	struct switch_port_link link;
-	int ret;
 
 	if (phydev->addr != 0)
 		return genphy_read_status(phydev);
@@ -1736,16 +1736,11 @@ ar8xxx_phy_read_status(struct phy_device *phydev)
 	}
 	phydev->duplex = link.duplex ? DUPLEX_FULL : DUPLEX_HALF;
 
-	/* flush the address translation unit */
-	mutex_lock(&priv->reg_mutex);
-	ret = priv->chip->atu_flush(priv);
-	mutex_unlock(&priv->reg_mutex);
-
 	phydev->state = PHY_RUNNING;
 	netif_carrier_on(phydev->attached_dev);
 	phydev->adjust_link(phydev->attached_dev);
 
-	return ret;
+	return 0;
 }
 
 static int
diff --git a/target/linux/generic/files/drivers/net/phy/ar8327.c b/target/linux/generic/files/drivers/net/phy/ar8327.c
index ea880bc..fd5bcdc 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8327.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8327.c
@@ -759,7 +759,8 @@ ar8327_atu_flush(struct ar8xxx_priv *priv)
 			      AR8327_ATU_FUNC_BUSY, 0);
 	if (!ret)
 		ar8xxx_write(priv, AR8327_REG_ATU_FUNC,
-			    AR8327_ATU_FUNC_OP_FLUSH);
+			     AR8327_ATU_FUNC_OP_FLUSH |
+			     AR8327_ATU_FUNC_BUSY);
 
 	return ret;
 }
-- 
2.2.2
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From hkallweit1 at gmail.com  Thu Jan 22 16:50:59 2015
From: hkallweit1 at gmail.com (Heiner Kallweit)
Date: Thu, 22 Jan 2015 22:50:59 +0100
Subject: [OpenWrt-Devel] [PATCH 2/5] ar8216: add link change detection for
	switch ports
Message-ID: <54C170C3.8040109@gmail.com>

Check for switch port link changes and
- flush ATU in case of a change
- report link change via syslog

Signed-off-by: Heiner Kallweit <hkallweit1 at gmail.com>
---
 .../linux/generic/files/drivers/net/phy/ar8216.c   | 35 ++++++++++++++++++++++
 .../linux/generic/files/drivers/net/phy/ar8216.h   |  1 +
 2 files changed, 36 insertions(+)

diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c
index 370f1ac..130ebf7 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.c
@@ -1707,12 +1707,47 @@ ar8xxx_phy_config_init(struct phy_device *phydev)
 	return 0;
 }
 
+static bool
+ar8xxx_check_link_states(struct ar8xxx_priv *priv)
+{
+	bool link_new, changed = false;
+	u32 status;
+	int i;
+
+	mutex_lock(&priv->reg_mutex);
+
+	for (i = 0; i < priv->dev.ports; i++) {
+		status = priv->chip->read_port_status(priv, i);
+		link_new = !!(status & AR8216_PORT_STATUS_LINK_UP);
+		if (link_new == priv->link_up[i])
+			continue;
+
+		priv->link_up[i] = link_new;
+		changed = true;
+		dev_info(&priv->phy->dev, "Port %d is %s\n",
+			 i, link_new ? "up" : "down");
+	}
+
+	if (changed)
+		priv->chip->atu_flush(priv);
+
+	mutex_unlock(&priv->reg_mutex);
+
+	return changed;
+}
+
 static int
 ar8xxx_phy_read_status(struct phy_device *phydev)
 {
 	struct ar8xxx_priv *priv = phydev->priv;
 	struct switch_port_link link;
 
+	/* check for link changes and flush ATU
+	 * if a change was detected
+	 */
+	if (phydev->state == PHY_CHANGELINK)
+		ar8xxx_check_link_states(priv);
+
 	if (phydev->addr != 0)
 		return genphy_read_status(phydev);
 
diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.h b/target/linux/generic/files/drivers/net/phy/ar8216.h
index 8487c3e..2d025ae 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.h
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.h
@@ -396,6 +396,7 @@ struct ar8xxx_priv {
 	bool initialized;
 	bool port4_phy;
 	char buf[2048];
+	bool link_up[AR8X16_MAX_PORTS];
 
 	bool init;
 
-- 
2.2.2
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From hkallweit1 at gmail.com  Thu Jan 22 16:52:02 2015
From: hkallweit1 at gmail.com (Heiner Kallweit)
Date: Thu, 22 Jan 2015 22:52:02 +0100
Subject: [OpenWrt-Devel] [PATCH 3/5] ar8216: decrease page switch wait time
Message-ID: <54C17102.4050500@gmail.com>

Until a few years ago the page switch wait time was set to msleep(1)
what was changed to usleep_range(1000, 2000) later.

I can not imagine that a low-level operation like switching page
on register level takes so much time.
Most likely the value of 1ms was initially set to check whether
it fixes an issue and then remained w/o further checking whether
also a smaller value would be sufficient.

Now the wait time is set to 5us and I successfully tested this on
AR8327. IMHO 5us should be plenty of time for all supported chips.
However I couldn't test this due to missing hardware.

If other chips should need a longer wait time we can add the
wait time as a parameter to the ar8xxx_chip struct.

Signed-off-by: Heiner Kallweit <hkallweit1 at gmail.com>
---
 target/linux/generic/files/drivers/net/phy/ar8216.c | 6 +++---
 target/linux/generic/files/drivers/net/phy/ar8216.h | 6 ++++++
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c
index 130ebf7..8a40a32 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.c
@@ -260,7 +260,7 @@ ar8xxx_read(struct ar8xxx_priv *priv, int reg)
 	mutex_lock(&bus->mdio_lock);
 
 	bus->write(bus, 0x18, 0, page);
-	usleep_range(1000, 2000); /* wait for the page switch to propagate */
+	wait_for_page_switch();
 	val = mii_read32(priv, 0x10 | r2, r1);
 
 	mutex_unlock(&bus->mdio_lock);
@@ -279,7 +279,7 @@ ar8xxx_write(struct ar8xxx_priv *priv, int reg, u32 val)
 	mutex_lock(&bus->mdio_lock);
 
 	bus->write(bus, 0x18, 0, page);
-	usleep_range(1000, 2000); /* wait for the page switch to propagate */
+	wait_for_page_switch();
 	mii_write32(priv, 0x10 | r2, r1, val);
 
 	mutex_unlock(&bus->mdio_lock);
@@ -297,7 +297,7 @@ ar8xxx_rmw(struct ar8xxx_priv *priv, int reg, u32 mask, u32 val)
 	mutex_lock(&bus->mdio_lock);
 
 	bus->write(bus, 0x18, 0, page);
-	usleep_range(1000, 2000); /* wait for the page switch to propagate */
+	wait_for_page_switch();
 
 	ret = mii_read32(priv, 0x10 | r2, r1);
 	ret &= ~mask;
diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.h b/target/linux/generic/files/drivers/net/phy/ar8216.h
index 2d025ae..77df506 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.h
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.h
@@ -555,4 +555,10 @@ ar8xxx_reg_clear(struct ar8xxx_priv *priv, int reg, u32 val)
 	ar8xxx_rmw(priv, reg, val, 0);
 }
 
+static inline void
+wait_for_page_switch(void)
+{
+	udelay(5);
+}
+
 #endif
-- 
2.2.2
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From hkallweit1 at gmail.com  Thu Jan 22 16:57:46 2015
From: hkallweit1 at gmail.com (Heiner Kallweit)
Date: Thu, 22 Jan 2015 22:57:46 +0100
Subject: [OpenWrt-Devel] [PATCH 4/5] ar8216: add swconfig attribute to
 display ARL table on AR8327/AR8337
Message-ID: <54C1725A.90207@gmail.com>

Add global read-only swconfig attribute "arl_table" to display the
address resolution table.
So far the chip-specific part is implemented for AR8327/AR8337 only
as I don't have the datasheets for the other AR8XXX chips.

Successfully tested on TL-WDR4300 (AR8327rev2)
and TL-WDR4900 (AR8327rev4).

Signed-off-by: Heiner Kallweit <hkallweit1 at gmail.com>
---
 .../linux/generic/files/drivers/net/phy/ar8216.c   | 96 ++++++++++++++++++----
 .../linux/generic/files/drivers/net/phy/ar8216.h   | 37 +++++++++
 .../linux/generic/files/drivers/net/phy/ar8327.c   | 81 ++++++++++++++++++
 .../linux/generic/files/drivers/net/phy/ar8327.h   | 21 +++++
 4 files changed, 220 insertions(+), 15 deletions(-)

diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c
index 8a40a32..9272e75 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.c
@@ -134,19 +134,6 @@ const struct ar8xxx_mib_desc ar8236_mibs[39] = {
 static DEFINE_MUTEX(ar8xxx_dev_list_lock);
 static LIST_HEAD(ar8xxx_dev_list);
 
-static inline void
-split_addr(u32 regaddr, u16 *r1, u16 *r2, u16 *page)
-{
-	regaddr >>= 1;
-	*r1 = regaddr & 0x1e;
-
-	regaddr >>= 5;
-	*r2 = regaddr & 0x7;
-
-	regaddr >>= 3;
-	*page = regaddr & 0x1ff;
-}
-
 /* inspired by phy_poll_reset in drivers/net/phy/phy_device.c */
 static int
 ar8xxx_phy_poll_reset(struct mii_bus *bus)
@@ -217,7 +204,7 @@ ar8xxx_phy_init(struct ar8xxx_priv *priv)
 	ar8xxx_phy_poll_reset(bus);
 }
 
-static u32
+u32
 mii_read32(struct ar8xxx_priv *priv, int phy_id, int regnum)
 {
 	struct mii_bus *bus = priv->mii_bus;
@@ -229,7 +216,7 @@ mii_read32(struct ar8xxx_priv *priv, int phy_id, int regnum)
 	return (hi << 16) | lo;
 }
 
-static void
+void
 mii_write32(struct ar8xxx_priv *priv, int phy_id, int regnum, u32 val)
 {
 	struct mii_bus *bus = priv->mii_bus;
@@ -1291,6 +1278,78 @@ unlock:
 	return ret;
 }
 
+int
+ar8xxx_sw_get_arl_table(struct switch_dev *dev,
+			const struct switch_attr *attr,
+			struct switch_val *val)
+{
+	struct ar8xxx_priv *priv = swdev_to_ar8xxx(dev);
+	struct mii_bus *bus = priv->mii_bus;
+	const struct ar8xxx_chip *chip = priv->chip;
+	char *buf = priv->arl_buf;
+	int i, j, k, len = 0;
+	struct arl_entry *a, *a1;
+	u32 status;
+
+	if (!chip->get_arl_entry)
+		return -EOPNOTSUPP;
+
+	mutex_lock(&priv->reg_mutex);
+	mutex_lock(&bus->mdio_lock);
+
+	chip->get_arl_entry(priv, NULL, NULL, AR8XXX_ARL_INITIALIZE);
+
+	for(i = 0; i < AR8XXX_NUM_ARL_RECORDS; ++i) {
+		a = &priv->arl_table[i];
+		duplicate:
+		chip->get_arl_entry(priv, a, &status, AR8XXX_ARL_GET_NEXT);
+
+		if (!status)
+			break;
+
+		/* avoid duplicates
+		 * ARL table can include multiple valid entries
+		 * per MAC, just with differing status codes
+		 */
+		for (j = 0; j < i; ++j) {
+			a1 = &priv->arl_table[j];
+			if (a->port == a1->port && !memcmp(a->mac, a1->mac, sizeof(a->mac)))
+				goto duplicate;
+		}
+	}
+
+	mutex_unlock(&bus->mdio_lock);
+
+	len += snprintf(buf + len, sizeof(priv->arl_buf) - len,
+                        "address resolution table\n");
+
+	if (i == AR8XXX_NUM_ARL_RECORDS)
+		len += snprintf(buf + len, sizeof(priv->arl_buf) - len,
+				"Too many entries found, displaying the first %d only!\n",
+				AR8XXX_NUM_ARL_RECORDS);
+
+	for (j = 0; j < priv->dev.ports; ++j) {
+		for (k = 0; k < i; ++k) {
+			a = &priv->arl_table[k];
+			if (a->port != j)
+				continue;
+			len += snprintf(buf + len, sizeof(priv->arl_buf) - len,
+					"Port %d: MAC %02x:%02x:%02x:%02x:%02x:%02x\n",
+					j,
+					a->mac[5], a->mac[4], a->mac[3],
+					a->mac[2], a->mac[1], a->mac[0]);
+		}
+	}
+
+	val->value.s = buf;
+	val->len = len;
+
+	mutex_unlock(&priv->reg_mutex);
+
+	return 0;
+}
+
+
 static const struct switch_attr ar8xxx_sw_attr_globals[] = {
 	{
 		.type = SWITCH_TYPE_INT,
@@ -1338,6 +1397,13 @@ static const struct switch_attr ar8xxx_sw_attr_globals[] = {
 		.get = ar8xxx_sw_get_mirror_source_port,
 		.max = AR8216_NUM_PORTS - 1
  	},
+	{
+		.type = SWITCH_TYPE_STRING,
+		.name = "arl_table",
+		.description = "Get ARL table",
+		.set = NULL,
+		.get = ar8xxx_sw_get_arl_table,
+	},
 };
 
 const struct switch_attr ar8xxx_sw_attr_port[2] = {
diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.h b/target/linux/generic/files/drivers/net/phy/ar8216.h
index 77df506..ec640dd 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.h
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.h
@@ -337,6 +337,18 @@ enum {
 	AR8XXX_VER_AR8337 = 0x13,
 };
 
+#define AR8XXX_NUM_ARL_RECORDS	100
+
+enum arl_op {
+	AR8XXX_ARL_INITIALIZE,
+	AR8XXX_ARL_GET_NEXT
+};
+
+struct arl_entry {
+	u8 port;
+	u8 mac[6];
+};
+
 struct ar8xxx_priv;
 
 struct ar8xxx_mib_desc {
@@ -372,6 +384,8 @@ struct ar8xxx_chip {
 	void (*vtu_load_vlan)(struct ar8xxx_priv *priv, u32 vid, u32 port_mask);
 	void (*phy_fixup)(struct ar8xxx_priv *priv, int phy);
 	void (*set_mirror_regs)(struct ar8xxx_priv *priv);
+	void (*get_arl_entry)(struct ar8xxx_priv *priv, struct arl_entry *a,
+			      u32 *status, enum arl_op op);
 	int (*sw_hw_apply)(struct switch_dev *dev);
 
 	const struct ar8xxx_mib_desc *mib_decs;
@@ -396,6 +410,8 @@ struct ar8xxx_priv {
 	bool initialized;
 	bool port4_phy;
 	char buf[2048];
+	struct arl_entry arl_table[AR8XXX_NUM_ARL_RECORDS];
+	char arl_buf[AR8XXX_NUM_ARL_RECORDS * 32 + 256];
 	bool link_up[AR8X16_MAX_PORTS];
 
 	bool init;
@@ -423,6 +439,10 @@ struct ar8xxx_priv {
 };
 
 u32
+mii_read32(struct ar8xxx_priv *priv, int phy_id, int regnum);
+void
+mii_write32(struct ar8xxx_priv *priv, int phy_id, int regnum, u32 val);
+u32
 ar8xxx_read(struct ar8xxx_priv *priv, int reg);
 void
 ar8xxx_write(struct ar8xxx_priv *priv, int reg, u32 val);
@@ -500,6 +520,10 @@ ar8xxx_sw_get_port_mib(struct switch_dev *dev,
                        const struct switch_attr *attr,
                        struct switch_val *val);
 int
+ar8xxx_sw_get_arl_table(struct switch_dev *dev,
+			const struct switch_attr *attr,
+			struct switch_val *val);
+int
 ar8216_wait_bit(struct ar8xxx_priv *priv, int reg, u32 mask, u32 val);
 
 static inline struct ar8xxx_priv *
@@ -556,6 +580,19 @@ ar8xxx_reg_clear(struct ar8xxx_priv *priv, int reg, u32 val)
 }
 
 static inline void
+split_addr(u32 regaddr, u16 *r1, u16 *r2, u16 *page)
+{
+	regaddr >>= 1;
+	*r1 = regaddr & 0x1e;
+
+	regaddr >>= 5;
+	*r2 = regaddr & 0x7;
+
+	regaddr >>= 3;
+	*page = regaddr & 0x1ff;
+}
+
+static inline void
 wait_for_page_switch(void)
 {
 	udelay(5);
diff --git a/target/linux/generic/files/drivers/net/phy/ar8327.c b/target/linux/generic/files/drivers/net/phy/ar8327.c
index fd5bcdc..6444c39 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8327.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8327.c
@@ -971,6 +971,78 @@ ar8327_sw_get_eee(struct switch_dev *dev,
 	return 0;
 }
 
+static void
+ar8327_wait_atu_ready(struct ar8xxx_priv *priv, u16 r2, u16 r1)
+{
+	int timeout = 20;
+
+	while (mii_read32(priv, r2, r1) & AR8327_ATU_FUNC_BUSY && --timeout)
+                udelay(10);
+
+	if (!timeout)
+		pr_err("ar8327: timeout waiting for atu to become ready\n");
+}
+
+static void ar8327_get_arl_entry(struct ar8xxx_priv *priv,
+				 struct arl_entry *a, u32 *status, enum arl_op op)
+{
+	struct mii_bus *bus = priv->mii_bus;
+	u16 r2, page;
+	u16 r1_data0, r1_data1, r1_data2, r1_func;
+	u32 t, val0, val1, val2;
+	int i;
+
+	split_addr(AR8327_REG_ATU_DATA0, &r1_data0, &r2, &page);
+	r2 |= 0x10;
+
+	r1_data1 = (AR8327_REG_ATU_DATA1 >> 1) & 0x1e;
+	r1_data2 = (AR8327_REG_ATU_DATA2 >> 1) & 0x1e;
+	r1_func  = (AR8327_REG_ATU_FUNC >> 1) & 0x1e;
+
+	switch (op) {
+	case AR8XXX_ARL_INITIALIZE:
+		/* all ATU registers are on the same page
+		* therefore set page only once
+		*/
+		bus->write(bus, 0x18, 0, page);
+		wait_for_page_switch();
+
+		ar8327_wait_atu_ready(priv, r2, r1_func);
+
+		mii_write32(priv, r2, r1_data0, 0);
+		mii_write32(priv, r2, r1_data1, 0);
+		mii_write32(priv, r2, r1_data2, 0);
+		break;
+	case AR8XXX_ARL_GET_NEXT:
+		mii_write32(priv, r2, r1_func,
+			    AR8327_ATU_FUNC_OP_GET_NEXT |
+			    AR8327_ATU_FUNC_BUSY);
+		ar8327_wait_atu_ready(priv, r2, r1_func);
+
+		val0 = mii_read32(priv, r2, r1_data0);
+		val1 = mii_read32(priv, r2, r1_data1);
+		val2 = mii_read32(priv, r2, r1_data2);
+
+		*status = val2 & AR8327_ATU_STATUS;
+		if (!*status)
+			break;
+
+		i = 0;
+		t = AR8327_ATU_PORT0;
+		while (!(val1 & t) && ++i < AR8327_NUM_PORTS)
+			t <<= 1;
+
+		a->port = i;
+		a->mac[0] = (val0 & AR8327_ATU_ADDR0) >> AR8327_ATU_ADDR0_S;
+		a->mac[1] = (val0 & AR8327_ATU_ADDR1) >> AR8327_ATU_ADDR1_S;
+		a->mac[2] = (val0 & AR8327_ATU_ADDR2) >> AR8327_ATU_ADDR2_S;
+		a->mac[3] = (val0 & AR8327_ATU_ADDR3) >> AR8327_ATU_ADDR3_S;
+		a->mac[4] = (val1 & AR8327_ATU_ADDR4) >> AR8327_ATU_ADDR4_S;
+		a->mac[5] = (val1 & AR8327_ATU_ADDR5) >> AR8327_ATU_ADDR5_S;
+		break;
+	}
+}
+
 static int
 ar8327_sw_hw_apply(struct switch_dev *dev)
 {
@@ -1041,6 +1113,13 @@ static const struct switch_attr ar8327_sw_attr_globals[] = {
 		.get = ar8xxx_sw_get_mirror_source_port,
 		.max = AR8327_NUM_PORTS - 1
  	},
+	{
+		.type = SWITCH_TYPE_STRING,
+		.name = "arl_table",
+		.description = "Get ARL table",
+		.set = NULL,
+		.get = ar8xxx_sw_get_arl_table,
+	},
 };
 
 static const struct switch_attr ar8327_sw_attr_port[] = {
@@ -1114,6 +1193,7 @@ const struct ar8xxx_chip ar8327_chip = {
 	.vtu_load_vlan = ar8327_vtu_load_vlan,
 	.phy_fixup = ar8327_phy_fixup,
 	.set_mirror_regs = ar8327_set_mirror_regs,
+	.get_arl_entry = ar8327_get_arl_entry,
 	.sw_hw_apply = ar8327_sw_hw_apply,
 
 	.num_mibs = ARRAY_SIZE(ar8236_mibs),
@@ -1146,6 +1226,7 @@ const struct ar8xxx_chip ar8337_chip = {
 	.vtu_load_vlan = ar8327_vtu_load_vlan,
 	.phy_fixup = ar8327_phy_fixup,
 	.set_mirror_regs = ar8327_set_mirror_regs,
+	.get_arl_entry = ar8327_get_arl_entry,
 	.sw_hw_apply = ar8327_sw_hw_apply,
 
 	.num_mibs = ARRAY_SIZE(ar8236_mibs),
diff --git a/target/linux/generic/files/drivers/net/phy/ar8327.h b/target/linux/generic/files/drivers/net/phy/ar8327.h
index f0ef013..29eeb62 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8327.h
+++ b/target/linux/generic/files/drivers/net/phy/ar8327.h
@@ -114,8 +114,29 @@
 #define   AR8327_PORT_VLAN1_OUT_MODE_UNTOUCH	3
 
 #define AR8327_REG_ATU_DATA0			0x600
+#define   AR8327_ATU_ADDR0			BITS(0, 8)
+#define   AR8327_ATU_ADDR0_S			0
+#define   AR8327_ATU_ADDR1			BITS(8, 8)
+#define   AR8327_ATU_ADDR1_S			8
+#define   AR8327_ATU_ADDR2			BITS(16, 8)
+#define   AR8327_ATU_ADDR2_S			16
+#define   AR8327_ATU_ADDR3			BITS(24, 8)
+#define   AR8327_ATU_ADDR3_S			24
 #define AR8327_REG_ATU_DATA1			0x604
+#define   AR8327_ATU_ADDR4			BITS(0, 8)
+#define   AR8327_ATU_ADDR4_S			0
+#define   AR8327_ATU_ADDR5			BITS(8, 8)
+#define   AR8327_ATU_ADDR5_S			8
+#define   AR8327_ATU_PORTS			BITS(16, 7)
+#define   AR8327_ATU_PORT0			BIT(16)
+#define   AR8327_ATU_PORT1			BIT(17)
+#define   AR8327_ATU_PORT2			BIT(18)
+#define   AR8327_ATU_PORT3			BIT(19)
+#define   AR8327_ATU_PORT4			BIT(20)
+#define   AR8327_ATU_PORT5			BIT(21)
+#define   AR8327_ATU_PORT6			BIT(22)
 #define AR8327_REG_ATU_DATA2			0x608
+#define   AR8327_ATU_STATUS			BITS(0, 4)
 
 #define AR8327_REG_ATU_FUNC			0x60c
 #define   AR8327_ATU_FUNC_OP			BITS(0, 4)
-- 
2.2.2
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From hkallweit1 at gmail.com  Thu Jan 22 16:58:17 2015
From: hkallweit1 at gmail.com (Heiner Kallweit)
Date: Thu, 22 Jan 2015 22:58:17 +0100
Subject: [OpenWrt-Devel] [PATCH 5/5] ar8216: prefix mii_xxx functions to
 avoid kernel namespace pollution
Message-ID: <54C17279.9090503@gmail.com>

Prefix the exported mii_xxx32 functions with ar8xxx_
to avoid kernel namespace pollution.

Signed-off-by: Heiner Kallweit <hkallweit1 at gmail.com>
---
 target/linux/generic/files/drivers/net/phy/ar8216.c | 12 ++++++------
 target/linux/generic/files/drivers/net/phy/ar8216.h |  4 ++--
 target/linux/generic/files/drivers/net/phy/ar8327.c | 20 ++++++++++----------
 3 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c
index 9272e75..b359876 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.c
@@ -205,7 +205,7 @@ ar8xxx_phy_init(struct ar8xxx_priv *priv)
 }
 
 u32
-mii_read32(struct ar8xxx_priv *priv, int phy_id, int regnum)
+ar8xxx_mii_read32(struct ar8xxx_priv *priv, int phy_id, int regnum)
 {
 	struct mii_bus *bus = priv->mii_bus;
 	u16 lo, hi;
@@ -217,7 +217,7 @@ mii_read32(struct ar8xxx_priv *priv, int phy_id, int regnum)
 }
 
 void
-mii_write32(struct ar8xxx_priv *priv, int phy_id, int regnum, u32 val)
+ar8xxx_mii_write32(struct ar8xxx_priv *priv, int phy_id, int regnum, u32 val)
 {
 	struct mii_bus *bus = priv->mii_bus;
 	u16 lo, hi;
@@ -248,7 +248,7 @@ ar8xxx_read(struct ar8xxx_priv *priv, int reg)
 
 	bus->write(bus, 0x18, 0, page);
 	wait_for_page_switch();
-	val = mii_read32(priv, 0x10 | r2, r1);
+	val = ar8xxx_mii_read32(priv, 0x10 | r2, r1);
 
 	mutex_unlock(&bus->mdio_lock);
 
@@ -267,7 +267,7 @@ ar8xxx_write(struct ar8xxx_priv *priv, int reg, u32 val)
 
 	bus->write(bus, 0x18, 0, page);
 	wait_for_page_switch();
-	mii_write32(priv, 0x10 | r2, r1, val);
+	ar8xxx_mii_write32(priv, 0x10 | r2, r1, val);
 
 	mutex_unlock(&bus->mdio_lock);
 }
@@ -286,10 +286,10 @@ ar8xxx_rmw(struct ar8xxx_priv *priv, int reg, u32 mask, u32 val)
 	bus->write(bus, 0x18, 0, page);
 	wait_for_page_switch();
 
-	ret = mii_read32(priv, 0x10 | r2, r1);
+	ret = ar8xxx_mii_read32(priv, 0x10 | r2, r1);
 	ret &= ~mask;
 	ret |= val;
-	mii_write32(priv, 0x10 | r2, r1, ret);
+	ar8xxx_mii_write32(priv, 0x10 | r2, r1, ret);
 
 	mutex_unlock(&bus->mdio_lock);
 
diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.h b/target/linux/generic/files/drivers/net/phy/ar8216.h
index ec640dd..3c53764 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.h
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.h
@@ -439,9 +439,9 @@ struct ar8xxx_priv {
 };
 
 u32
-mii_read32(struct ar8xxx_priv *priv, int phy_id, int regnum);
+ar8xxx_mii_read32(struct ar8xxx_priv *priv, int phy_id, int regnum);
 void
-mii_write32(struct ar8xxx_priv *priv, int phy_id, int regnum, u32 val);
+ar8xxx_mii_write32(struct ar8xxx_priv *priv, int phy_id, int regnum, u32 val);
 u32
 ar8xxx_read(struct ar8xxx_priv *priv, int reg);
 void
diff --git a/target/linux/generic/files/drivers/net/phy/ar8327.c b/target/linux/generic/files/drivers/net/phy/ar8327.c
index 6444c39..07e837e 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8327.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8327.c
@@ -976,7 +976,7 @@ ar8327_wait_atu_ready(struct ar8xxx_priv *priv, u16 r2, u16 r1)
 {
 	int timeout = 20;
 
-	while (mii_read32(priv, r2, r1) & AR8327_ATU_FUNC_BUSY && --timeout)
+	while (ar8xxx_mii_read32(priv, r2, r1) & AR8327_ATU_FUNC_BUSY && --timeout)
                 udelay(10);
 
 	if (!timeout)
@@ -1009,19 +1009,19 @@ static void ar8327_get_arl_entry(struct ar8xxx_priv *priv,
 
 		ar8327_wait_atu_ready(priv, r2, r1_func);
 
-		mii_write32(priv, r2, r1_data0, 0);
-		mii_write32(priv, r2, r1_data1, 0);
-		mii_write32(priv, r2, r1_data2, 0);
+		ar8xxx_mii_write32(priv, r2, r1_data0, 0);
+		ar8xxx_mii_write32(priv, r2, r1_data1, 0);
+		ar8xxx_mii_write32(priv, r2, r1_data2, 0);
 		break;
 	case AR8XXX_ARL_GET_NEXT:
-		mii_write32(priv, r2, r1_func,
-			    AR8327_ATU_FUNC_OP_GET_NEXT |
-			    AR8327_ATU_FUNC_BUSY);
+		ar8xxx_mii_write32(priv, r2, r1_func,
+				   AR8327_ATU_FUNC_OP_GET_NEXT |
+				   AR8327_ATU_FUNC_BUSY);
 		ar8327_wait_atu_ready(priv, r2, r1_func);
 
-		val0 = mii_read32(priv, r2, r1_data0);
-		val1 = mii_read32(priv, r2, r1_data1);
-		val2 = mii_read32(priv, r2, r1_data2);
+		val0 = ar8xxx_mii_read32(priv, r2, r1_data0);
+		val1 = ar8xxx_mii_read32(priv, r2, r1_data1);
+		val2 = ar8xxx_mii_read32(priv, r2, r1_data2);
 
 		*status = val2 & AR8327_ATU_STATUS;
 		if (!*status)
-- 
2.2.2
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From luizluca at gmail.com  Thu Jan 22 23:57:43 2015
From: luizluca at gmail.com (Luiz Angelo Daros de Luca)
Date: Fri, 23 Jan 2015 04:57:43 +0000
Subject: [OpenWrt-Devel] issue: usb1.x not detected in CC
Message-ID: <CAJq09z70kP=eAbd0QdWojgQnK2Me9ox4fStogbBtUAPmYiT+xg@mail.gmail.com>

Further information:

It was indeed the USB_OHCI_HCD_PCI option.
ohci-pci was split from ohci_hcd with:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c1117afb85890adf4073c7ff18ebcb4d0495e6af

In BB, the usb controller was detected by ohci_hcd. At some point after the
BB kernel version, the USB controller started to be detected only
by ohci-pci and not ohci_hcd.

In BB:root at OpenWrt:/# dmesg | grep ohci
[    0.543001] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.544195] ohci_hcd 0000:00:06.0: setting latency timer to 64
[    0.544203] ohci_hcd 0000:00:06.0: OHCI Host Controller
[    0.544910] ohci_hcd 0000:00:06.0: new USB bus registered, assigned bus
number 2
[    0.545964] ohci_hcd 0000:00:06.0: irq 11, io mem 0xf0804000
[    1.040235] usb 2-1: new full-speed USB device number 2 using ohci_hcd

In CC (without USB_OHCI_HCD_PCI):
root at OpenWrt:/# dmesg |grep ohci
[    0.884995] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.890242] ohci-platform: OHCI generic platform driver

In CC (with USB_OHCI_HCD_PCI):
[    0.884343] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.885535] ohci-pci: OHCI PCI platform driver
[    0.892110] ohci-pci 0000:00:06.0: OHCI PCI host controller
[    0.893716] ohci-pci 0000:00:06.0: new USB bus registered, assigned bus
number 2
[    0.895858] ohci-pci 0000:00:06.0: irq 11, io mem 0xf0804000
[    0.965726] ohci-platform: OHCI generic platform driver
[    1.400359] usb 2-1: new full-speed USB device number 2 using ohci-pci

I fixed my problem creating a new kmod-ohci-pci that includes ohci-pci.ko.
Probably, it should also be added to be built-in on every target that is
pci-based and already include CONFIG_USB_OHCI_HCD build-in, like
target/linux/x86/generic/config-default and others (which one?). However,
it loads nicely as a module.

I can submit the patch for the new kmod but I'm not sure about kernel
dependencies like LINUX_3_x as ohci-pci.ko seems to be present only after
3.10.

Looking the kernel commit log, it seems that ohci-pci wasn't the only one
driver that was split from ohci. It was an effort for multi-plataform
kernels on ARM. I guess every other one might need a kmod-ohci-xxx as well.
So, the problem might affect every OHCI controller that where split.
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/log/drivers/usb/host/ohci-hcd.c

In summary, no OHCI controller for CC on any target (except by some drivers
that still lives inside ohci-hcd like octeon and other exotic platforms).

BTW, CONFIG_USB_OHCI_ATH79, used for kmod-usb-ohci is deprecated at 3.14.x.

"This option is deprecated now and the driver was removed, use
      USB_OHCI_HCD_PLATFORM instead."

Regards,

Em Thu Jan 22 2015 at 02:19:48, Luiz Angelo Daros de Luca <
luizluca at gmail.com> escreveu:

Hello,
>
> I'm running OpenWRT in Virtualbox. I have no problem with BB. However,
> when testing trunk, I noticed that usb1.x functions simply does not work.
>
> For BB, in a clean install (+usbutils), I get:
> https://downloads.openwrt.org/barrier_breaker/14.07/x86/
> generic/openwrt-x86-generic-combined-ext4.img.gz
>
> root at OpenWrt:/# lsusb
> *Bus 002 Device 002: ID 80ee:0021 VirtualBox USB Tablet*
> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> *Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub*
>
> root at OpenWrt:/# dmesg | egrep -i '(usb|hci)'
> [    0.063968] ACPI: bus type USB registered
> [    0.064573] usbcore: registered new interface driver usbfs
> [    0.065292] usbcore: registered new interface driver hub
> [    0.065990] usbcore: registered new device driver usb
> [    0.511884] ahci 0000:00:0d.0: version 3.0
> [    0.513388] ahci: SSS flag set, parallel bus scan disabled
> [    0.514182] ahci 0000:00:0d.0: AHCI 0001.0100 32 slots 1 ports 3 Gbps
> 0x1 impl SATA mode
> [    0.515223] ahci 0000:00:0d.0: flags: 64bit ncq stag only ccc
> [    0.515945] ahci 0000:00:0d.0: setting latency timer to 64
> [    0.516085] scsi0 : ahci
> [    0.521108] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
> [    0.522068] ehci-pci: EHCI PCI platform driver
> [    0.523007] ehci-pci 0000:00:0b.0: setting latency timer to 64
> [    0.523015] ehci-pci 0000:00:0b.0: EHCI Host Controller
> [    0.523673] ehci-pci 0000:00:0b.0: new USB bus registered, assigned bus
> number 1
> [    0.524738] ehci-pci 0000:00:0b.0: irq 10, io mem 0xf0840000
> [    0.540886] ehci-pci 0000:00:0b.0: USB 2.0 started, EHCI 1.00
> *[    0.541668] hub 1-0:1.0: USB hub found*
> [    0.542882] ehci-platform: EHCI generic platform driver
> [    0.543609] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
> [    0.544824] ohci_hcd 0000:00:06.0: setting latency timer to 64
> [    0.544831] ohci_hcd 0000:00:06.0: OHCI Host Controller
> [    0.545495] ohci_hcd 0000:00:06.0: new USB bus registered, assigned bus
> number 2
> [    0.546662] ohci_hcd 0000:00:06.0: irq 11, io mem 0xf0804000
> *[    0.600350] hub 2-0:1.0: USB hub found*
> [    0.602055] uhci_hcd: USB Universal Host Controller Interface driver
> [    0.603133] usbcore: registered new interface driver usb-storage
> [    1.040233] usb 2-1: new full-speed USB device number 2 using ohci_hcd
>
> And for CC, in a clean install (+usbutils), I get:
> https://downloads.openwrt.org/snapshots/trunk/x86/openwrt-
> x86-generic-combined-ext4.img.gz
>
> root at OpenWrt:/# lsusb
> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>
> root at OpenWrt:/# dmesg | egrep -i '(usb|hci)'
> [    0.207085] ACPI: bus type USB registered
> [    0.208234] usbcore: registered new interface driver usbfs
> [    0.210038] usbcore: registered new interface driver hub
> [    0.211447] usbcore: registered new device driver usb
> [    0.846969] ahci 0000:00:0d.0: version 3.0
> [    0.850123] ahci 0000:00:0d.0: SSS flag set, parallel bus scan disabled
> [    0.851991] ahci 0000:00:0d.0: AHCI 0001.0100 32 slots 1 ports 3 Gbps
> 0x1 impl SATA mode
> [    0.854051] ahci 0000:00:0d.0: flags: 64bit ncq stag only ccc
> [    0.855726] scsi0 : ahci
> [    0.865267] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
> [    0.866641] ehci-pci: EHCI PCI platform driver
> [    0.868536] ehci-pci 0000:00:0b.0: EHCI Host Controller
> [    0.870011] ehci-pci 0000:00:0b.0: new USB bus registered, assigned bus
> number 1
> [    0.872088] ehci-pci 0000:00:0b.0: irq 10, io mem 0xf0806000
> [    0.890021] ehci-pci 0000:00:0b.0: USB 2.0 started, EHCI 1.00
> *[    0.891475] hub 1-0:1.0: USB hub found*
> [    0.910106] ehci-platform: EHCI generic platform driver
> [    0.911554] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
> [    0.913104] ohci-platform: OHCI generic platform driver
> [    0.914517] uhci_hcd: USB Universal Host Controller Interface driver
> [    0.916619] usbcore: registered new interface driver usb-storage
>
> In CC, there is no "Linux Foundation 1.1 root hub". Only EHCI hub is
> detected. ohci_hcd was expected to detect a new hub. If I disable usb2.0 in
> virtualbox config, OpenWRT gets no USB support in CC. Virtual machine
> configs are equal.
>
> kmod-usb-ohci is not installed by default in both system. However, both
> systems seems to have some usb modules (including usb-ohci) built in
> kernel. So, kmod-usb-ohci contains only control files (CC) or no files
> (BB). Anyway, installing kmod-usb-ohci does not fix the problem. BTW,
> shouldn't all "empty" packages for built-in modules be installed by
> default? (most of <1k kmod-*.ipk)
>
> I have already tested CC installing all kmod packages with no change on
> the USB problem.
>
> Checking my Ubuntu (with kernel newer than OpenWRT), I noticed that there
> is a new ohci-pci in dmesg:
>
> ohci-pci: OHCI PCI platform driver
>
> Maybe it is USB_OHCI_HCD_PCI that is missing.
>
> Any tips?
>
> Regards,
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150123/51385218/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From ben.mulvihill at gmail.com  Fri Jan 23 00:57:48 2015
From: ben.mulvihill at gmail.com (Ben Mulvihill)
Date: Fri, 23 Jan 2015 06:57:48 +0100
Subject: [OpenWrt-Devel] [PATCH] lantiq: correct value for fpi clock on ar9
Message-ID: <1421992668.16915.9.camel@merveille.lan>


This adds a patch to target/linux/lantiq/patches-3.14
fixing a bug clock code on ar9. The current version returns
the wrong value for the fpi clock frequency in some 
cases.

See discussion for further details:
https://lists.openwrt.org/pipermail/openwrt-devel/2015-January/030688.html

I'm not sure about the patch naming and numbering convention.
Do please let me know it this is not OK.

Many thanks,

Ben Mulvihill

Signed-off-by: Ben Mulvihill <ben.mulvihill at gmail.com>
---
diff -uprN a/target/linux/lantiq/patches-3.14/0038-MIPS-lantiq-fpi-on-ar9.patch b/target/linux/lantiq/patches-3.14/0038-MIPS-lantiq-fpi-on-ar9.patch
--- a/target/linux/lantiq/patches-3.14/0038-MIPS-lantiq-fpi-on-ar9.patch	1970-01-01 01:00:00.000000000 +0100
+++ b/target/linux/lantiq/patches-3.14/0038-MIPS-lantiq-fpi-on-ar9.patch	2015-01-22 12:57:11.112761851 +0100
@@ -0,0 +1,21 @@
+Return correct value for fpi clock on ar9.
+
+Signed-off-by: Ben Mulvihill <ben.mulvihill at gmail.com>
+---
+ arch/mips/lantiq/xway/clk.c |    5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/arch/mips/lantiq/xway/clk.c	2015-01-21 10:15:44.000000000 +0100
++++ b/arch/mips/lantiq/xway/clk.c	2015-01-21 10:17:29.000000000 +0100
+@@ -104,8 +104,9 @@ unsigned long ltq_ar9_fpi_hz(void)
+ 	unsigned long sys = ltq_ar9_sys_hz();
+ 
+ 	if (ltq_cgu_r32(CGU_SYS) & BIT(0))
+-		return sys;
+-	return sys >> 1;
++		return sys / 3;
++	else
++		return sys / 2;
+ }
+ 
+ unsigned long ltq_ar9_cpu_hz(void)
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From ardeleanalex at gmail.com  Fri Jan 23 02:18:24 2015
From: ardeleanalex at gmail.com (Alexandru Ardelean)
Date: Fri, 23 Jan 2015 09:18:24 +0200
Subject: [OpenWrt-Devel] How to handle multiple providers?
In-Reply-To: <54C142B5.8000209@gmail.com>
References: <54C142B5.8000209@gmail.com>
Message-ID: <CA+U=DspGjgT-Z9RkJAnCDYGeUz3KLG0WnGkeA7bGLaDiY8+sNg@mail.gmail.com>

Well, you need to specifiy Ax in the DEPENDS section of B.
Since there are 3 Ax, you can do it 2 ways:

1) Create Bx (x = 1-3) packages; B1 depends on A1, B2 depends on A2, B3
depends on A3; so, if you select the correct Bx, the correct Ax will also
get built.
You can also use build variants to keep Bx in a single Makefile; you can
check the  package/ncurses/Makefile for hints.
The build variants does not seem too popular, but you can try it.

2) In the Makefile of B you can do a "dynamic" DEPENDS.
Before the package definition (i.e.  define Package/B ) you can add a
A_DEPENDS variable.
You can do something like:
ifeq ($(A_DEPENDS),)
   ifeq ($(CONFIG_A1),y)
        A_DEPENDS := A1
   endif
endif
ifeq ($(A_DEPENDS),)
   ifeq ($(CONFIG_A2),y)
        A_DEPENDS := A2
   endif
endif
ifeq ($(A_DEPENDS),)
   ifeq ($(CONFIG_A3),y)
        A_DEPENDS := A3
   endif
endif
A_DEPENDS should equal to either A1, A2 or A3, if either is selected. Note
that CONFIG_Ax is as defined in the .config file.
Then
define Package/B
  DEPENDS:= ............ $(A_DEPENDS)
endef

If I look at this approach, it does what you asked for.
But all in all, I would say there would be a cleaner approach if Ax and B
are known.

If the assumption would be that Ax are similar packages (or variants of a
base A), then I'd make a single package A, and define some options to it.
Based on those options A would be a variation of type Ax (x = 1 - 3).
Then
define Package/B
  DEPENDS:= ............ A
endef

And you can configure A with whatever options you need.


On Thu, Jan 22, 2015 at 8:34 PM, Mats Karrman <mats.dev.list at gmail.com>
wrote:

> Hi,
>
> I'm struggling with a problem and I can't really get it to work as I want.
>
> Say you have 3 packages, A1, A2 and A3, that all provide the include file
> "f.h".
> I also have package B that build-time depends on "f.h".
>
> I will enable either A1, A2 or A3 in the .config for a build but how do I
> make
> OpenWRT understand that it cannot build B until either of Ax is built?
>
> I'd be ever so greatfull for some good hints on how to solve this.
>
> (and oh, I'm on "Attitude-Adjustment")
>
> Best regards,
> Mats
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150123/24df9e34/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From karlp at tweak.net.au  Fri Jan 23 05:37:06 2015
From: karlp at tweak.net.au (Karl Palsson)
Date: Fri, 23 Jan 2015 10:37:06 +0000
Subject: [OpenWrt-Devel] [PATCH] scripts: remote-gdb: fix detection with
	multiple targets
Message-ID: <1422009427-18667-1-git-send-email-karlp@tweak.net.au>

From: Karl Palsson <karlp at remake.is>

This script always worked when I had a single target, but has been
failing now that I have both "atheros" and "ar71xx" targets.

This change is clearly not perfect, but I can't work out the regexps any
better.

Signed-off-by: Karl Palsson <karlp at remake.is>
---

Before:
$ ./scripts/remote-gdb 192.168.255.31:3333
/home/karlp/src/smartgate_firmware/openwrt-bb/build_dir/target-mips_34kc_uClibc-0.9.33.2/libcp210xmanufacturing-1-HEAD/contrib/bin/cp2104-rs485 
Using target mips_34kc (uClibc-0.9.33.2/libcp210xmanufacturing-1-HEAD)
No gdb found! Make sure that CONFIG_GDB is set!
$

After:
$ ./scripts/remote-gdb 192.168.255.31:3333
/home/karlp/src/smartgate_firmware/openwrt-bb/build_dir/target-mips_34kc_uClibc-0.9.33.2/libcp210xmanufacturing-1-HEAD/contrib/bin/cp2104-rs485 
Using target arch: mips_34kc, libc: uClibc
Attempting to set sysroot:
/home/karlp/src/smartgate_firmware/openwrt-bb/scripts/../staging_dir/target-mips_34kc_uClibc-0.9.33.2/root-ar71xx/
[ gdb starts here normally (but see next patch) ]



 scripts/remote-gdb | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/scripts/remote-gdb b/scripts/remote-gdb
index 2c08f14..fdd5008 100755
--- a/scripts/remote-gdb
+++ b/scripts/remote-gdb
@@ -14,10 +14,14 @@ if( opendir SD, "$Bin/../staging_dir" )
 {
 	my ( $tid, $arch, $libc, @arches );
 
+
+	# This doesn't work. regexpes are hard.
 	if( $ARGV[1] =~ m!\btarget-(.+?)_(([^_]+libc|musl)[^/]+)\b!i )
 	{
-		print("Using target $1 ($2)\n");
-		($arch, $libc) = ($1, $2);
+		$ARGV[1] =~ m!\btarget-(.+?)-!i;
+		$1 =~ m!(.+?)_(.+?)_(.*)!i;
+		($arch, $libc) = ("$1_$2", $3);
+		print("Using target arch: $arch, libc: $libc\n");
 	}
 	else
 	{
-- 
1.8.3.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From karlp at tweak.net.au  Fri Jan 23 05:37:07 2015
From: karlp at tweak.net.au (Karl Palsson)
Date: Fri, 23 Jan 2015 10:37:07 +0000
Subject: [OpenWrt-Devel] [PATCH 2/2] scripts: remote-gdb: Fix sysroot
	detection
In-Reply-To: <1422009427-18667-1-git-send-email-karlp@tweak.net.au>
References: <1422009427-18667-1-git-send-email-karlp@tweak.net.au>
Message-ID: <1422009427-18667-2-git-send-email-karlp@tweak.net.au>

From: Karl Palsson <karlp at remake.is>

Changes in target detection results in tweaks to the sysroot detection.

Signed-off-by: Karl Palsson <karlp at remake.is>
---
This seemed to have been broken before, even the search for gdb uses
a * after the libc pattern.

 scripts/remote-gdb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/remote-gdb b/scripts/remote-gdb
index fdd5008..4dd7d4d 100755
--- a/scripts/remote-gdb
+++ b/scripts/remote-gdb
@@ -62,7 +62,8 @@ if( opendir SD, "$Bin/../staging_dir" )
 		my ( $fh, $fp ) = tempfile();
 
 		# Find sysroot
-		my ($sysroot) = glob("$Bin/../staging_dir/target-${arch}_${libc}/root-*/");
+		my ($sysroot) = glob("$Bin/../staging_dir/target-${arch}_${libc}*/root-*/");
+		printf("Attempting to set sysroot: $sysroot\n");
 
 		print $fh "set sysroot $sysroot\n" if $sysroot;
 		my $cmd = "target extended-remote";
-- 
1.8.3.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From carlosmf.pt at gmail.com  Fri Jan 23 07:14:11 2015
From: carlosmf.pt at gmail.com (Carlos Ferreira)
Date: Fri, 23 Jan 2015 12:14:11 +0000
Subject: [OpenWrt-Devel] OpenWRT SDK and autotools + EclipseCDT development.
Message-ID: <CAJpYY6Uh2MUZxyi0=eR8dXfJMDY8ZvhtnhWRqw69Yj-H-yo=Lg@mail.gmail.com>

Hello to all!

I'm trying to create a setup for a project using Eclipse-CDT with GNU
autotools, from which I would be able to generate binaries for both my host
platform and also for a OpenWRT platform, using the appropriate
cross-compile.

Now, I already know to to create an Eclipse Cross-Compile setup that just
directly uses the OpenWRT cross-compile, but what I don't know is, how to
tell autotools to use the cross-compile.

Has anyone did something equal or similar, that can give me some light
about how to do this?

Thanks!

-- 

Carlos Miguel Ferreira
Researcher at Telecommunications Institute
Aveiro - Portugal
Work E-mail - cmf at av.it.pt
Skype & GTalk -> carlosmf.pt at gmail.com
LinkedIn -> http://www.linkedin.com/in/carlosmferreira
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150123/ab9361ee/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From mats.dev.list at gmail.com  Fri Jan 23 07:53:19 2015
From: mats.dev.list at gmail.com (Mats Karrman)
Date: Fri, 23 Jan 2015 13:53:19 +0100
Subject: [OpenWrt-Devel] How to handle multiple providers?
In-Reply-To: <CA+U=DspGjgT-Z9RkJAnCDYGeUz3KLG0WnGkeA7bGLaDiY8+sNg@mail.gmail.com>
References: <54C142B5.8000209@gmail.com>
 <CA+U=DspGjgT-Z9RkJAnCDYGeUz3KLG0WnGkeA7bGLaDiY8+sNg@mail.gmail.com>
Message-ID: <54C2443F.7090602@gmail.com>

Thanks for your help!

I was actually working on something similar to your (2), using CONFIG_ 
variables but there were some trouble with the logic behind including 
the .config file and then also, all string options are exported with 
"quotes" around them and that messed up the DEPENDENCY declaration.

BR // Mats

On 2015-01-23 08:18, Alexandru Ardelean wrote:
> Well, you need to specifiy Ax in the DEPENDS section of B.
> Since there are 3 Ax, you can do it 2 ways:
>
> 1) Create Bx (x = 1-3) packages; B1 depends on A1, B2 depends on A2, 
> B3 depends on A3; so, if you select the correct Bx, the correct Ax 
> will also get built.
> You can also use build variants to keep Bx in a single Makefile; you 
> can check the  package/ncurses/Makefile for hints.
> The build variants does not seem too popular, but you can try it.
>
> 2) In the Makefile of B you can do a "dynamic" DEPENDS.
> Before the package definition (i.e.  define Package/B ) you can add a 
> A_DEPENDS variable.
> You can do something like:
> ifeq ($(A_DEPENDS),)
>    ifeq ($(CONFIG_A1),y)
>         A_DEPENDS := A1
>    endif
> endif
> ifeq ($(A_DEPENDS),)
>    ifeq ($(CONFIG_A2),y)
>         A_DEPENDS := A2
>    endif
> endif
> ifeq ($(A_DEPENDS),)
>    ifeq ($(CONFIG_A3),y)
>         A_DEPENDS := A3
>    endif
> endif
> A_DEPENDS should equal to either A1, A2 or A3, if either is selected. 
> Note that CONFIG_Ax is as defined in the .config file.
> Then
> define Package/B
>   DEPENDS:= ............ $(A_DEPENDS)
> endef
>
> If I look at this approach, it does what you asked for.
> But all in all, I would say there would be a cleaner approach if Ax 
> and B are known.
>
> If the assumption would be that Ax are similar packages (or variants 
> of a base A), then I'd make a single package A, and define some 
> options to it.
> Based on those options A would be a variation of type Ax (x = 1 - 3).
> Then
> define Package/B
>   DEPENDS:= ............ A
> endef
>
> And you can configure A with whatever options you need.
>
>
> On Thu, Jan 22, 2015 at 8:34 PM, Mats Karrman <mats.dev.list at gmail.com 
> <mailto:mats.dev.list at gmail.com>> wrote:
>
>     Hi,
>
>     I'm struggling with a problem and I can't really get it to work as
>     I want.
>
>     Say you have 3 packages, A1, A2 and A3, that all provide the
>     include file "f.h".
>     I also have package B that build-time depends on "f.h".
>
>     I will enable either A1, A2 or A3 in the .config for a build but
>     how do I make
>     OpenWRT understand that it cannot build B until either of Ax is built?
>
>     I'd be ever so greatfull for some good hints on how to solve this.
>
>     (and oh, I'm on "Attitude-Adjustment")
>
>     Best regards,
>     Mats
>     _______________________________________________
>     openwrt-devel mailing list
>     openwrt-devel at lists.openwrt.org
>     <mailto:openwrt-devel at lists.openwrt.org>
>     https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150123/4c49604c/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From kaloz at openwrt.org  Fri Jan 23 07:57:44 2015
From: kaloz at openwrt.org (Imre Kaloz)
Date: Fri, 23 Jan 2015 13:57:44 +0100
Subject: [OpenWrt-Devel] [PATCH 3/9] kernel: Allow ubi autoattach to run
 on NOR flash
In-Reply-To: <20150122103314.GL4367@lukather>
References: <1421164606-3222-1-git-send-email-maxime.ripard@free-electrons.com>
 <1421164606-3222-4-git-send-email-maxime.ripard@free-electrons.com>
 <CACna6rz5APOgGThwFSDC8RG_2xhYYVSLyv2Qdv=4nnT_Pa7o=g@mail.gmail.com>
 <20150114123737.GR4891@lukather> <20150122103314.GL4367@lukather>
Message-ID: <op.xsw2airr2s3iss@ecaz>

On Thu, 22 Jan 2015 11:33:14 +0100, Maxime Ripard  
<maxime.ripard at free-electrons.com> wrote:

> Hi,
>
> On Wed, Jan 14, 2015 at 01:37:37PM +0100, Maxime Ripard wrote:
>> On Wed, Jan 14, 2015 at 12:43:25PM +0100, Rafa? Mi?ecki wrote:
>> > On 13 January 2015 at 16:56, Maxime Ripard
>> > <maxime.ripard at free-electrons.com> wrote:
>> > > Some devices out there only have a NOR flash to store the rootfs on.
>> > >
>> > > While using UBI is arguable on this kind of NAND, this is something  
>> that should
>> > > be supported.
>> >
>> > So why use UBI at all? Doesn't it make more sense to stick to the
>> > JFFS2? You should be even able to easily create 2 different image
>> > types (one for NOR, one for NAND) in one target (see bcm53xx).
>>
>> The Openblocks AX3 has a fairly large NOR (128MB) which would make
>> JFFS2 a rather poor choice, and the UBI overhead wouldn't be that bad.
>
> Is that case good enough for you?

Sure, but please implement UBI on NOR as a generic solution.

>> The A385-RD board has a much smaller SPI-NOR (16MB) though, so we
>> could use jffs2 there, but I wasn't seeing much point at creating a
>> whole new layout just for a single board.
>
> I'll switch this one to JFFS2 and the MTDSPLIT framework. Are you
> satisfied with the NAND support? Just to know if I can continue to
> model the NOR stuff on that.

As I've written in the other mail, I'm mostly happy with it, but please  
make sure you don't hardcode available profiles but parse them.


Thanks,

Imre
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From yszhou4tech at gmail.com  Fri Jan 23 08:52:05 2015
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Fri, 23 Jan 2015 21:52:05 +0800
Subject: [OpenWrt-Devel] [RFC 0/7] Enhancement for kexec of MIPS kernel.
Message-ID: <1422021132-24526-1-git-send-email-yszhou4tech@gmail.com>

This is a RFC series trying to

 - Allow users to select lzma support of kexec-tools.
 - Allow lzma and gzip support of kexec-tools coexist in one build.
 - Make the kernel use the specified --command-line parameter from kexec to
   boot the crashkernel.

This series was tested by myself monthes ago on HIWIFI-HC6361 with 3.10 kernel.
I just cleaned it a bit and tested again on the same device with 3.14 kernel.
Initramfs variants of .elf, .elf.lzma, .elf.gz kernel are tested and boot fine.

I just tried to test it on QEMU Malta guest, but it fails with "Invalid memory
segment" error, not sure what's going wrong though.

.elf.lzma and .elf.gz files are created with the following commands from the
.elf kernel.

	gzip -c openwrt-ar71xx-generic-vmlinux-initramfs.elf > openwrt-ar71xx-generic-vmlinux-initramfs.elf.gz
	./staging_dir/host/bin/lzma e openwrt-ar71xx-generic-vmlinux-initramfs.elf -lc1 -lp2 -pb2 openwrt-ar71xx-generic-vmlinux-initramfs.elf.lzma

They can be then loaded by kexec as the following.

	kexec -d --command-line='board=HiWiFi-HC6361 console=ttyATH0,115200 noinitrd' -l /tmp/vmlinux-initramfs.elf.lzma
	kexec -d --command-line='board=HiWiFi-HC6361 console=ttyATH0,115200 noinitrd' -l /tmp/vmlinux-initramfs.elf.gz
	kexec -d -e

The kernel patch looks shabby and contains many pr_info() and friends for
debugging purposes at the moment.  Maybe we will clean them up later as the
patch matures on.

Yousong Zhou (7):
  kexec-tools: add patch for fixing kexec-tools' configure.ac.
  kexec-tools: add patch for fixing zlib/lzma decompression.
  kexec-tools: add patch for fixing compilation warnings.
  kexec-tools: remove unnecessary patch 0004-mips_regdefs.patch.
  kexec-tools: show up only when KERNEL_KEXEC is enabled.
  kexec-tools: add  choice for selecting lzma support.
  mips/kexec: parse and use parameters specified by userspace kexec
    tool.

 package/boot/kexec-tools/Config.in                 |    5 +
 package/boot/kexec-tools/Makefile                  |    6 +-
 .../kexec-tools/patches/0004-mips_regdefs.patch    |  103 -------
 .../kexec-tools/patches/101-fix-configure_ac.patch |   33 +++
 .../patches/102-fix-zlib-lzma-decompress.patch     |  101 +++++++
 .../patches/103-fix-compilation-warnings.patch     |   79 ++++++
 .../333-kexec-parameter-from-kexec-tools.patch     |  298 ++++++++++++++++++++
 .../333-kexec-parameter-from-kexec-tools.patch     |  298 ++++++++++++++++++++
 8 files changed, 817 insertions(+), 106 deletions(-)
 delete mode 100644 package/boot/kexec-tools/patches/0004-mips_regdefs.patch
 create mode 100644 package/boot/kexec-tools/patches/101-fix-configure_ac.patch
 create mode 100644 package/boot/kexec-tools/patches/102-fix-zlib-lzma-decompress.patch
 create mode 100644 package/boot/kexec-tools/patches/103-fix-compilation-warnings.patch
 create mode 100644 target/linux/generic/patches-3.10/333-kexec-parameter-from-kexec-tools.patch
 create mode 100644 target/linux/generic/patches-3.14/333-kexec-parameter-from-kexec-tools.patch

-- 
1.7.10.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From yszhou4tech at gmail.com  Fri Jan 23 08:52:06 2015
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Fri, 23 Jan 2015 21:52:06 +0800
Subject: [OpenWrt-Devel] [RFC 1/7] kexec-tools: add patch for fixing
	kexec-tools' configure.ac.
In-Reply-To: <1422021132-24526-1-git-send-email-yszhou4tech@gmail.com>
References: <1422021132-24526-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <1422021132-24526-2-git-send-email-yszhou4tech@gmail.com>

Add necessary quoting to fix the following error when running the
generated configure script.

	checking for lzma_code in -llzma... ./configure: line 4756: ac_fn_c_try_link: command not found

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 .../kexec-tools/patches/101-fix-configure_ac.patch |   33 ++++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 package/boot/kexec-tools/patches/101-fix-configure_ac.patch

diff --git a/package/boot/kexec-tools/patches/101-fix-configure_ac.patch b/package/boot/kexec-tools/patches/101-fix-configure_ac.patch
new file mode 100644
index 0000000..8b02f8d
--- /dev/null
+++ b/package/boot/kexec-tools/patches/101-fix-configure_ac.patch
@@ -0,0 +1,33 @@
+Index: kexec-tools-2.0.4/configure.ac
+===================================================================
+--- kexec-tools-2.0.4.orig/configure.ac	2014-08-29 17:15:17.935820544 +0800
++++ kexec-tools-2.0.4/configure.ac	2014-08-29 17:15:30.120331580 +0800
+@@ -147,22 +147,22 @@
+ dnl See if I have a usable copy of zlib available
+ if test "$with_zlib" = yes ; then
+ 	AC_CHECK_HEADER(zlib.h,
+-		AC_CHECK_LIB(z, inflateInit_, ,
+-		AC_MSG_NOTICE([zlib support disabled])))
++		[AC_CHECK_LIB(z, inflateInit_, ,
++		AC_MSG_NOTICE([zlib support disabled]))])
+ fi
+ 
+ dnl See if I have a usable copy of lzma available
+ if test "$with_lzma" = yes ; then
+ 	AC_CHECK_HEADER(lzma.h,
+-		AC_CHECK_LIB(lzma, lzma_code, ,
+-		AC_MSG_NOTICE([lzma support disabled])))
++		[AC_CHECK_LIB(lzma, lzma_code, ,
++		AC_MSG_NOTICE([lzma support disabled]))])
+ fi
+ 
+ dnl find Xen control stack libraries
+ if test "$with_xen" = yes ; then
+ 	AC_CHECK_HEADER(xenctrl.h,
+-		AC_CHECK_LIB(xenctrl, xc_version, ,
+-		AC_MSG_NOTICE([Xen support disabled])))
++		[AC_CHECK_LIB(xenctrl, xc_version, ,
++		AC_MSG_NOTICE([Xen support disabled]))])
+ 	if test "$ac_cv_lib_xenctrl_xc_version" = yes ; then
+ 		AC_CHECK_FUNCS(xc_get_machine_memory_map)
+ 	fi
-- 
1.7.10.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From yszhou4tech at gmail.com  Fri Jan 23 08:52:07 2015
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Fri, 23 Jan 2015 21:52:07 +0800
Subject: [OpenWrt-Devel] [RFC 2/7] kexec-tools: add patch for fixing
	zlib/lzma decompression.
In-Reply-To: <1422021132-24526-1-git-send-email-yszhou4tech@gmail.com>
References: <1422021132-24526-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <1422021132-24526-3-git-send-email-yszhou4tech@gmail.com>

Let {zlib,lzma}_decompress_file() return NULL if anything wrong happened
thus to allow other decompression methods have a chance to try.

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 .../patches/102-fix-zlib-lzma-decompress.patch     |  101 ++++++++++++++++++++
 1 file changed, 101 insertions(+)
 create mode 100644 package/boot/kexec-tools/patches/102-fix-zlib-lzma-decompress.patch

diff --git a/package/boot/kexec-tools/patches/102-fix-zlib-lzma-decompress.patch b/package/boot/kexec-tools/patches/102-fix-zlib-lzma-decompress.patch
new file mode 100644
index 0000000..d39685e
--- /dev/null
+++ b/package/boot/kexec-tools/patches/102-fix-zlib-lzma-decompress.patch
@@ -0,0 +1,101 @@
+--- a/kexec/lzma.c
++++ b/kexec/lzma.c
+@@ -168,7 +168,8 @@ char *lzma_decompress_file(const char *f
+ 	}
+ 	fp = lzopen(filename, "rb");
+ 	if (fp == 0) {
+-		die("Cannot open `%s'\n", filename);
++		fprintf(stderr, "Cannot open `%s'\n", filename);
++		return NULL;
+ 	}
+ 	size = 0;
+ 	allocated = 65536;
+@@ -183,16 +184,25 @@ char *lzma_decompress_file(const char *f
+ 			if ((errno == EINTR) || (errno == EAGAIN))
+ 				continue;
+ 
+-			die ("read on %s of %ld bytes failed\n",
+-				filename, (allocated - size) + 0UL);
++			fprintf(stderr, "%s: read on %s of %ld bytes failed\n",
++				__func__, filename, (allocated - size) + 0UL);
++			size = 0;
++			break;
+ 		}
+ 		size += result;
+ 	} while(result > 0);
++
+ 	result = lzclose(fp);
+ 	if (result != LZMA_OK) {
+-		die ("Close of %s failed\n", filename);
++		fprintf(stderr, "%s: Close of %s failed\n", __func__, filename);
++		size = 0;
+ 	}
++
+ 	*r_size =  size;
++	if (size == 0) {
++		free(buf);
++		return NULL;
++	}
+ 	return buf;
+ }
+ #else
+--- a/kexec/zlib.c
++++ b/kexec/zlib.c
+@@ -37,6 +37,10 @@ char *zlib_decompress_file(const char *f
+ 		fprintf(stderr, "Cannot open `%s': %s\n", filename, msg);
+ 		return NULL;
+ 	}
++	if (gzdirect(fp)) {
++		fprintf(stderr, "`%s' is not in gzip format: %s\n", filename);
++		return NULL;
++	}
+ 	size = 0;
+ 	allocated = 65536;
+ 	buf = xmalloc(allocated);
+@@ -46,7 +50,7 @@ char *zlib_decompress_file(const char *f
+ 			buf = xrealloc(buf, allocated);
+ 		}
+ 		result = gzread(fp, buf + size, allocated - size);
+-		if (result < 0) {
++		if (result <= 0) {
+ 			if ((errno == EINTR) || (errno == EAGAIN))
+ 				continue;
+ 
+@@ -54,20 +58,33 @@ char *zlib_decompress_file(const char *f
+ 			if (errnum == Z_ERRNO) {
+ 				msg = strerror(errno);
+ 			}
+-			die ("read on %s of %ld bytes failed: %s\n",
+-				filename, (allocated - size) + 0UL, msg);
++			if (errnum != Z_OK) {
++				fprintf(stderr, "%s: read on %s of %ld bytes failed with %d: %s\n",
++					__func__, filename, (allocated - size) + 0UL, errnum, msg);
++				size = 0;
++				break;
++			}
+ 		}
+ 		size += result;
+ 	} while(result > 0);
++
+ 	result = gzclose(fp);
+ 	if (result != Z_OK) {
+ 		msg = gzerror(fp, &errnum);
+ 		if (errnum == Z_ERRNO) {
+ 			msg = strerror(errno);
+ 		}
+-		die ("Close of %s failed: %s\n", filename, msg);
++		fprintf(stderr, "%s: Close of %s failed with %d: %s\n",
++			__func__, filename, errnum, msg);
++		size = 0;
+ 	}
+-	*r_size =  size;
++
++	*r_size = size;
++	if (size == 0) {
++		free(buf);
++		return NULL;
++	}
++
+ 	return buf;
+ }
+ #else
-- 
1.7.10.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From yszhou4tech at gmail.com  Fri Jan 23 08:52:08 2015
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Fri, 23 Jan 2015 21:52:08 +0800
Subject: [OpenWrt-Devel] [RFC 3/7] kexec-tools: add patch for fixing
	compilation warnings.
In-Reply-To: <1422021132-24526-1-git-send-email-yszhou4tech@gmail.com>
References: <1422021132-24526-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <1422021132-24526-4-git-send-email-yszhou4tech@gmail.com>


Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 .../patches/103-fix-compilation-warnings.patch     |   79 ++++++++++++++++++++
 1 file changed, 79 insertions(+)
 create mode 100644 package/boot/kexec-tools/patches/103-fix-compilation-warnings.patch

diff --git a/package/boot/kexec-tools/patches/103-fix-compilation-warnings.patch b/package/boot/kexec-tools/patches/103-fix-compilation-warnings.patch
new file mode 100644
index 0000000..0c5e63d
--- /dev/null
+++ b/package/boot/kexec-tools/patches/103-fix-compilation-warnings.patch
@@ -0,0 +1,79 @@
+Index: kexec-tools-2.0.4/kexec/arch/mips/crashdump-mips.c
+===================================================================
+--- kexec-tools-2.0.4.orig/kexec/arch/mips/crashdump-mips.c	2013-03-14 16:49:17.000000000 +0800
++++ kexec-tools-2.0.4/kexec/arch/mips/crashdump-mips.c	2014-09-09 19:58:52.065772917 +0800
+@@ -22,6 +22,7 @@
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <limits.h>
++#include <inttypes.h>
+ #include <elf.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+@@ -60,7 +61,7 @@
+ 
+ 	if (parse_iomem_single("Kernel code\n", &start, NULL) == 0) {
+ 		elf_info->kern_paddr_start = start;
+-		dbgprintf("kernel load physical addr start = 0x%lx\n", start);
++		dbgprintf("kernel load physical addr start = 0x%" PRIu64 "\n", start);
+ 		return 0;
+ 	}
+ 
+Index: kexec-tools-2.0.4/kexec/arch/mips/kexec-elf-mips.c
+===================================================================
+--- kexec-tools-2.0.4.orig/kexec/arch/mips/kexec-elf-mips.c	2014-09-09 19:55:06.256301994 +0800
++++ kexec-tools-2.0.4/kexec/arch/mips/kexec-elf-mips.c	2014-09-09 19:55:24.461064400 +0800
+@@ -161,7 +161,7 @@
+ 	if (info->kexec_flags & KEXEC_ON_CRASH)
+ 		/* In case of crashdump segment[0] is kernel.
+ 		 * Put cmdline just after it. */
+-		cmdline_addr = info->segment[0].mem +
++		cmdline_addr = (unsigned long)info->segment[0].mem +
+ 				info->segment[0].memsz;
+ 	else
+ 		cmdline_addr = 0;
+Index: kexec-tools-2.0.4/kexec/kexec-elf-rel.c
+===================================================================
+--- kexec-tools-2.0.4.orig/kexec/kexec-elf-rel.c	2013-03-15 23:51:02.000000000 +0800
++++ kexec-tools-2.0.4/kexec/kexec-elf-rel.c	2014-09-09 19:43:26.114936683 +0800
+@@ -347,6 +347,9 @@
+ 			else if (shdr->sh_type == SHT_RELA) {
+ 				rel = elf_rela(ehdr, ptr);
+ 			}
++			else {
++				die("Unexpected sh_type: %d\n", shdr->sh_type);
++			}
+ 			/* the location to change */
+ 			location = section->sh_data + rel.r_offset;
+ 
+@@ -513,7 +516,7 @@
+ 			name);
+ 	}
+ 	if (sym.st_size != size) {
+-		die("Symbol: %s has size: %lld not %ld\n",
++		die("Symbol: %s has size: %lld not %zd\n",
+ 			name, sym.st_size, size);
+ 	}
+ 	shdr = &ehdr->e_shdr[sym.st_shndx];
+@@ -537,7 +540,7 @@
+ 		die("Symbol: %s not found cannot get\n", name);
+ 	}
+ 	if (sym.st_size != size) {
+-		die("Symbol: %s has size: %lld not %ld\n",
++		die("Symbol: %s has size: %lld not %zd\n",
+ 			name, sym.st_size, size);
+ 	}
+ 	shdr = &ehdr->e_shdr[sym.st_shndx];
+Index: kexec-tools-2.0.4/kexec/kexec.h
+===================================================================
+--- kexec-tools-2.0.4.orig/kexec/kexec.h	2014-09-09 20:03:21.193060339 +0800
++++ kexec-tools-2.0.4/kexec/kexec.h	2014-09-09 20:03:26.757293978 +0800
+@@ -233,7 +233,7 @@
+ #define KEXEC_OPT_STR "hvdfxluet:p"
+ 
+ extern void die(const char *fmt, ...)
+-	__attribute__ ((format (printf, 1, 2)));
++	__attribute__ ((format (printf, 1, 2), noreturn));
+ extern void *xmalloc(size_t size);
+ extern void *xrealloc(void *ptr, size_t size);
+ extern char *slurp_file(const char *filename, off_t *r_size);
-- 
1.7.10.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From yszhou4tech at gmail.com  Fri Jan 23 08:52:09 2015
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Fri, 23 Jan 2015 21:52:09 +0800
Subject: [OpenWrt-Devel] [RFC 4/7] kexec-tools: remove unnecessary patch
	0004-mips_regdefs.patch.
In-Reply-To: <1422021132-24526-1-git-send-email-yszhou4tech@gmail.com>
References: <1422021132-24526-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <1422021132-24526-5-git-send-email-yszhou4tech@gmail.com>


Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 .../kexec-tools/patches/0004-mips_regdefs.patch    |  103 --------------------
 1 file changed, 103 deletions(-)
 delete mode 100644 package/boot/kexec-tools/patches/0004-mips_regdefs.patch

diff --git a/package/boot/kexec-tools/patches/0004-mips_regdefs.patch b/package/boot/kexec-tools/patches/0004-mips_regdefs.patch
deleted file mode 100644
index 7e21349..0000000
--- a/package/boot/kexec-tools/patches/0004-mips_regdefs.patch
+++ /dev/null
@@ -1,103 +0,0 @@
---- /dev/null
-+++ b/kexec/arch/mips/regdef.h
-@@ -0,0 +1,100 @@
-+/*
-+ * This file is subject to the terms and conditions of the GNU General Public
-+ * License.  See the file "COPYING" in the main directory of this archive
-+ * for more details.
-+ *
-+ * Copyright (C) 1985 MIPS Computer Systems, Inc.
-+ * Copyright (C) 1994, 95, 99, 2003 by Ralf Baechle
-+ * Copyright (C) 1990 - 1992, 1999 Silicon Graphics, Inc.
-+ */
-+#ifndef _ASM_REGDEF_H
-+#define _ASM_REGDEF_H
-+
-+#include <asm/sgidefs.h>
-+
-+#if _MIPS_SIM == _MIPS_SIM_ABI32
-+
-+/*
-+ * Symbolic register names for 32 bit ABI
-+ */
-+#define zero    $0      /* wired zero */
-+#define AT      $1      /* assembler temp  - uppercase because of ".set at" */
-+#define v0      $2      /* return value */
-+#define v1      $3
-+#define a0      $4      /* argument registers */
-+#define a1      $5
-+#define a2      $6
-+#define a3      $7
-+#define t0      $8      /* caller saved */
-+#define t1      $9
-+#define t2      $10
-+#define t3      $11
-+#define t4      $12
-+#define t5      $13
-+#define t6      $14
-+#define t7      $15
-+#define s0      $16     /* callee saved */
-+#define s1      $17
-+#define s2      $18
-+#define s3      $19
-+#define s4      $20
-+#define s5      $21
-+#define s6      $22
-+#define s7      $23
-+#define t8      $24     /* caller saved */
-+#define t9      $25
-+#define jp      $25     /* PIC jump register */
-+#define k0      $26     /* kernel scratch */
-+#define k1      $27
-+#define gp      $28     /* global pointer */
-+#define sp      $29     /* stack pointer */
-+#define fp      $30     /* frame pointer */
-+#define s8	$30	/* same like fp! */
-+#define ra      $31     /* return address */
-+
-+#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
-+
-+#if _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32
-+
-+#define zero	$0	/* wired zero */
-+#define AT	$at	/* assembler temp - uppercase because of ".set at" */
-+#define v0	$2	/* return value - caller saved */
-+#define v1	$3
-+#define a0	$4	/* argument registers */
-+#define a1	$5
-+#define a2	$6
-+#define a3	$7
-+#define a4	$8	/* arg reg 64 bit; caller saved in 32 bit */
-+#define ta0	$8
-+#define a5	$9
-+#define ta1	$9
-+#define a6	$10
-+#define ta2	$10
-+#define a7	$11
-+#define ta3	$11
-+#define t0	$12	/* caller saved */
-+#define t1	$13
-+#define t2	$14
-+#define t3	$15
-+#define s0	$16	/* callee saved */
-+#define s1	$17
-+#define s2	$18
-+#define s3	$19
-+#define s4	$20
-+#define s5	$21
-+#define s6	$22
-+#define s7	$23
-+#define t8	$24	/* caller saved */
-+#define t9	$25	/* callee address for PIC/temp */
-+#define jp	$25	/* PIC jump register */
-+#define k0	$26	/* kernel temporary */
-+#define k1	$27
-+#define gp	$28	/* global pointer - caller saved for PIC */
-+#define sp	$29	/* stack pointer */
-+#define fp	$30	/* frame pointer */
-+#define s8	$30	/* callee saved */
-+#define ra	$31	/* return address */
-+
-+#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32 */
-+
-+#endif /* _ASM_REGDEF_H */
-- 
1.7.10.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From yszhou4tech at gmail.com  Fri Jan 23 08:52:10 2015
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Fri, 23 Jan 2015 21:52:10 +0800
Subject: [OpenWrt-Devel] [RFC 5/7] kexec-tools: show up only when
	KERNEL_KEXEC is enabled.
In-Reply-To: <1422021132-24526-1-git-send-email-yszhou4tech@gmail.com>
References: <1422021132-24526-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <1422021132-24526-6-git-send-email-yszhou4tech@gmail.com>


Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 package/boot/kexec-tools/Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/boot/kexec-tools/Makefile b/package/boot/kexec-tools/Makefile
index 8c1c255..e884661 100644
--- a/package/boot/kexec-tools/Makefile
+++ b/package/boot/kexec-tools/Makefile
@@ -24,7 +24,7 @@ include $(INCLUDE_DIR)/package.mk
 define Package/kexec-tools
   SECTION:=utils
   CATEGORY:=Utilities
-  DEPENDS:=@armeb||@arm||@i386||@powerpc64||@mipsel||@mips +KEXEC_ZLIB:zlib
+  DEPENDS:=@KERNEL_KEXEC @armeb||@arm||@i386||@powerpc64||@mipsel||@mips +KEXEC_ZLIB:zlib
   TITLE:=Kernel boots kernel
   URL:=http://kernel.org/pub/linux/kernel/people/horms/kexec-tools/
   MAINTAINER:=Florian Fainelli <florian at openwrt.org>
-- 
1.7.10.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From yszhou4tech at gmail.com  Fri Jan 23 08:52:11 2015
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Fri, 23 Jan 2015 21:52:11 +0800
Subject: [OpenWrt-Devel] [RFC 6/7] kexec-tools: add choice for selecting
	lzma support.
In-Reply-To: <1422021132-24526-1-git-send-email-yszhou4tech@gmail.com>
References: <1422021132-24526-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <1422021132-24526-7-git-send-email-yszhou4tech@gmail.com>


Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 package/boot/kexec-tools/Config.in |    5 +++++
 package/boot/kexec-tools/Makefile  |    6 +++---
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/package/boot/kexec-tools/Config.in b/package/boot/kexec-tools/Config.in
index 2642171..6c7558f 100644
--- a/package/boot/kexec-tools/Config.in
+++ b/package/boot/kexec-tools/Config.in
@@ -23,4 +23,9 @@ config KEXEC_ZLIB
 	prompt "zlib support"
 	default y
 
+config KEXEC_LZMA
+	bool
+	prompt "lzma support"
+	default n
+
 endmenu
diff --git a/package/boot/kexec-tools/Makefile b/package/boot/kexec-tools/Makefile
index e884661..4a8900d 100644
--- a/package/boot/kexec-tools/Makefile
+++ b/package/boot/kexec-tools/Makefile
@@ -17,14 +17,14 @@ PKG_MD5SUM:=05992bc8c0673fc55be7b6d27e48a8db
 
 PKG_FIXUP:=autoreconf
 
-PKG_CONFIG_DEPENDS := CONFIG_KEXEC_ZLIB
+PKG_CONFIG_DEPENDS := CONFIG_KEXEC_ZLIB CONFIG_KEXEC_LZMA
 
 include $(INCLUDE_DIR)/package.mk
 
 define Package/kexec-tools
   SECTION:=utils
   CATEGORY:=Utilities
-  DEPENDS:=@KERNEL_KEXEC @armeb||@arm||@i386||@powerpc64||@mipsel||@mips +KEXEC_ZLIB:zlib
+  DEPENDS:=@KERNEL_KEXEC @armeb||@arm||@i386||@powerpc64||@mipsel||@mips +KEXEC_ZLIB:zlib +KEXEC_LZMA:liblzma
   TITLE:=Kernel boots kernel
   URL:=http://kernel.org/pub/linux/kernel/people/horms/kexec-tools/
   MAINTAINER:=Florian Fainelli <florian at openwrt.org>
@@ -55,7 +55,7 @@ CONFIGURE_ARGS = \
 		--libexecdir=/usr/lib \
 		--sysconfdir=/etc \
 		$(if $(CONFIG_KEXEC_ZLIB),--with,--without)-zlib \
-		--without-lzma
+		$(if $(CONFIG_KEXEC_LZMA),--with,--without)-lzma
 
 TARGET_CFLAGS += -ffunction-sections -fdata-sections
 TARGET_LDFLAGS += -Wl,--gc-sections
-- 
1.7.10.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From yszhou4tech at gmail.com  Fri Jan 23 08:52:12 2015
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Fri, 23 Jan 2015 21:52:12 +0800
Subject: [OpenWrt-Devel] [RFC 7/7] mips/kexec: parse and use parameters
	specified by userspace kexec tool.
In-Reply-To: <1422021132-24526-1-git-send-email-yszhou4tech@gmail.com>
References: <1422021132-24526-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <1422021132-24526-8-git-send-email-yszhou4tech@gmail.com>


Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 .../333-kexec-parameter-from-kexec-tools.patch     |  298 ++++++++++++++++++++
 .../333-kexec-parameter-from-kexec-tools.patch     |  298 ++++++++++++++++++++
 2 files changed, 596 insertions(+)
 create mode 100644 target/linux/generic/patches-3.10/333-kexec-parameter-from-kexec-tools.patch
 create mode 100644 target/linux/generic/patches-3.14/333-kexec-parameter-from-kexec-tools.patch

diff --git a/target/linux/generic/patches-3.10/333-kexec-parameter-from-kexec-tools.patch b/target/linux/generic/patches-3.10/333-kexec-parameter-from-kexec-tools.patch
new file mode 100644
index 0000000..af6ec1c
--- /dev/null
+++ b/target/linux/generic/patches-3.10/333-kexec-parameter-from-kexec-tools.patch
@@ -0,0 +1,298 @@
+Index: linux-3.10.49/arch/mips/kernel/machine_kexec.c
+===================================================================
+--- linux-3.10.49.orig/arch/mips/kernel/machine_kexec.c	2014-07-18 06:58:15.000000000 +0800
++++ linux-3.10.49/arch/mips/kernel/machine_kexec.c	2014-09-11 12:28:51.164810693 +0800
+@@ -10,45 +10,146 @@
+ #include <linux/mm.h>
+ #include <linux/delay.h>
+ 
++#include <asm/bootinfo.h>
+ #include <asm/cacheflush.h>
+ #include <asm/page.h>
+-
+-extern const unsigned char relocate_new_kernel[];
+-extern const size_t relocate_new_kernel_size;
+-
+-extern unsigned long kexec_start_address;
+-extern unsigned long kexec_indirection_page;
++#include <asm/uaccess.h>
++#include "machine_kexec.h"
+ 
+ int (*_machine_kexec_prepare)(struct kimage *) = NULL;
+ void (*_machine_kexec_shutdown)(void) = NULL;
+ void (*_machine_crash_shutdown)(struct pt_regs *regs) = NULL;
++
+ #ifdef CONFIG_SMP
+ void (*relocated_kexec_smp_wait) (void *);
+ atomic_t kexec_ready_to_reboot = ATOMIC_INIT(0);
+ #endif
+ 
+-int
+-machine_kexec_prepare(struct kimage *kimage)
++static void machine_kexec_print_args(void)
++{
++	unsigned long argc = (int)kexec_args[0];
++	int i;
++
++	pr_info("kexec_args[0] (argc): %lu\n", argc);
++	pr_info("kexec_args[1] (argv): %p\n", (void *)kexec_args[1]);
++	pr_info("kexec_args[2] (env ): %p\n", (void *)kexec_args[2]);
++	pr_info("kexec_args[3] (desc): %p\n", (void *)kexec_args[3]);
++
++	for (i = 0; i < argc; i++) {
++		pr_info("kexec_argv[%d] = %p, %s\n",
++				i, kexec_argv[i], kexec_argv[i]);
++	}
++}
++
++static void machine_kexec_init_argv(struct kimage *image)
+ {
++	void __user *buf = NULL;
++	size_t bufsz;
++	size_t size;
++	int i;
++
++	bufsz = 0;
++	for (i = 0; i < image->nr_segments; i++) {
++		struct kexec_segment *seg;
++
++		seg = &image->segment[i];
++		if (seg->bufsz < 6)
++			continue;
++
++		if (strncmp((char *) seg->buf, "kexec\x20", 6))
++			continue;
++
++		/* don't copy "kexec" */
++		buf = seg->buf + 6;
++		bufsz = seg->bufsz - 6;
++		break;
++	}
++
++	if (!buf)
++		return;
++
++	size = KEXEC_COMMAND_LINE_SIZE;
++	size = min(size, bufsz);
++	if (size < bufsz)
++		pr_warn("kexec command line truncated to %zd bytes\n", size);
++
++	/* Copy to kernel space */
++	copy_from_user(kexec_argv_buf, buf, size);
++	kexec_argv_buf[size - 1] = 0;
++}
++
++static void machine_kexec_parse_argv(struct kimage *image)
++{
++	char *reboot_code_buffer;
++	int reloc_delta;
++	char *ptr;
++	int argc;
++	int i;
++
++	ptr = kexec_argv_buf;
++	argc = 0;
++
++	/*
++	 * convert command line string to array of parameters
++	 * (as bootloader does).
++	 */
++	while (ptr && *ptr && (KEXEC_MAX_ARGC > argc)) {
++		if (*ptr == ' ') {
++			*ptr++ = '\0';
++			continue;
++		}
++
++		kexec_argv[argc++] = ptr;
++		ptr = strchr(ptr, ' ');
++	}
++
++	if (!argc)
++		return;
++
++	kexec_args[0] = argc;
++	kexec_args[1] = (unsigned long)kexec_argv;
++	kexec_args[2] = 0;
++	kexec_args[3] = 0;
++
++	reboot_code_buffer = page_address(image->control_code_page);
++	reloc_delta = reboot_code_buffer - (char *)kexec_relocate_new_kernel;
++
++	kexec_args[1] += reloc_delta;
++	for (i = 0; i < argc; i++)
++		kexec_argv[i] += reloc_delta;
++}
++
++int machine_kexec_prepare(struct kimage *kimage)
++{
++	/*
++	 * Whenever arguments passed from kexec-tools, Init the arguments as
++	 * the original ones to try avoiding booting failure.
++	 */
++
++	kexec_args[0] = fw_arg0;
++	kexec_args[1] = fw_arg1;
++	kexec_args[2] = fw_arg2;
++	kexec_args[3] = fw_arg3;
++
++	machine_kexec_init_argv(kimage);
++	machine_kexec_parse_argv(kimage);
++
+ 	if (_machine_kexec_prepare)
+ 		return _machine_kexec_prepare(kimage);
+ 	return 0;
+ }
+ 
+-void
+-machine_kexec_cleanup(struct kimage *kimage)
++void machine_kexec_cleanup(struct kimage *kimage)
+ {
+ }
+ 
+-void
+-machine_shutdown(void)
++void machine_shutdown(void)
+ {
+ 	if (_machine_kexec_shutdown)
+ 		_machine_kexec_shutdown();
+ }
+ 
+-void
+-machine_crash_shutdown(struct pt_regs *regs)
++void machine_crash_shutdown(struct pt_regs *regs)
+ {
+ 	if (_machine_crash_shutdown)
+ 		_machine_crash_shutdown(regs);
+@@ -58,25 +159,35 @@
+ 
+ typedef void (*noretfun_t)(void) __noreturn;
+ 
+-void
+-machine_kexec(struct kimage *image)
++void machine_kexec(struct kimage *image)
+ {
+ 	unsigned long reboot_code_buffer;
+ 	unsigned long entry;
+ 	unsigned long *ptr;
+ 
+ 	reboot_code_buffer =
+-	  (unsigned long)page_address(image->control_code_page);
++		(unsigned long)page_address(image->control_code_page);
++	pr_info("reboot_code_buffer = %p\n", (void *)reboot_code_buffer);
+ 
+ 	kexec_start_address =
+-		(unsigned long) phys_to_virt(image->start);
++		(unsigned long)phys_to_virt(image->start);
++	pr_info("kexec_start_address = %p\n", (void *)kexec_start_address);
+ 
+ 	kexec_indirection_page =
+ 		(unsigned long) phys_to_virt(image->head & PAGE_MASK);
++	pr_info("kexec_indirection_page = %p\n", (void *)kexec_indirection_page);
+ 
+-	memcpy((void*)reboot_code_buffer, relocate_new_kernel,
+-	       relocate_new_kernel_size);
+-
++	pr_info("Where is memcpy: %p\n", memcpy);
++	pr_info("kexec_relocate_new_kernel = %p, kexec_relocate_new_kernel_end = %p\n",
++		(void *)kexec_relocate_new_kernel, &kexec_relocate_new_kernel_end);
++	pr_info("Copy %lu bytes from %p to %p\n", KEXEC_RELOCATE_NEW_KERNEL_SIZE,
++		(void *)kexec_relocate_new_kernel, (void *)reboot_code_buffer);
++	memcpy((void*)reboot_code_buffer, kexec_relocate_new_kernel,
++	       KEXEC_RELOCATE_NEW_KERNEL_SIZE);
++
++	pr_info("Before _print_args().\n");
++	machine_kexec_print_args();
++	pr_info("Before eval loop.\n");
+ 	/*
+ 	 * The generic kexec code builds a page list with physical
+ 	 * addresses. they are directly accessible through KSEG0 (or
+@@ -94,15 +205,16 @@
+ 	/*
+ 	 * we do not want to be bothered.
+ 	 */
++	pr_info("Before irq_disable.\n");
+ 	local_irq_disable();
+ 
+-	printk("Will call new kernel at %08lx\n", image->start);
+-	printk("Bye ...\n");
++	pr_info("Will call new kernel at %08lx\n", image->start);
++	pr_info("Bye ...\n");
+ 	__flush_cache_all();
+ #ifdef CONFIG_SMP
+ 	/* All secondary cpus now may jump to kexec_wait cycle */
+ 	relocated_kexec_smp_wait = reboot_code_buffer +
+-		(void *)(kexec_smp_wait - relocate_new_kernel);
++		(void *)(kexec_smp_wait - kexec_relocate_new_kernel);
+ 	smp_wmb();
+ 	atomic_set(&kexec_ready_to_reboot, 1);
+ #endif
+Index: linux-3.10.49/arch/mips/kernel/relocate_kernel.S
+===================================================================
+--- linux-3.10.49.orig/arch/mips/kernel/relocate_kernel.S	2014-07-18 06:58:15.000000000 +0800
++++ linux-3.10.49/arch/mips/kernel/relocate_kernel.S	2014-09-11 12:28:51.168810861 +0800
+@@ -12,8 +12,9 @@
+ #include <asm/mipsregs.h>
+ #include <asm/stackframe.h>
+ #include <asm/addrspace.h>
++#include "machine_kexec.h"
+ 
+-LEAF(relocate_new_kernel)
++LEAF(kexec_relocate_new_kernel)
+ 	PTR_L a0,	arg0
+ 	PTR_L a1,	arg1
+ 	PTR_L a2,	arg2
+@@ -92,7 +93,7 @@
+ #endif
+ 	/* jump to kexec_start_address */
+ 	j		s1
+-	END(relocate_new_kernel)
++	END(kexec_relocate_new_kernel)
+ 
+ #ifdef CONFIG_SMP
+ /*
+@@ -178,9 +179,15 @@
+ 	PTR		0
+ 	.size		kexec_indirection_page, PTRSIZE
+ 
+-relocate_new_kernel_end:
++kexec_argv_buf:
++	EXPORT(kexec_argv_buf)
++	.skip		KEXEC_COMMAND_LINE_SIZE
++	.size		kexec_argv_buf, KEXEC_COMMAND_LINE_SIZE
++
++kexec_argv:
++	EXPORT(kexec_argv)
++	.skip		KEXEC_ARGV_SIZE
++	.size		kexec_argv, KEXEC_ARGV_SIZE
+ 
+-relocate_new_kernel_size:
+-	EXPORT(relocate_new_kernel_size)
+-	PTR		relocate_new_kernel_end - relocate_new_kernel
+-	.size		relocate_new_kernel_size, PTRSIZE
++kexec_relocate_new_kernel_end:
++	EXPORT(kexec_relocate_new_kernel_end)
+Index: linux-3.10.49/arch/mips/kernel/machine_kexec.h
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ linux-3.10.49/arch/mips/kernel/machine_kexec.h	2014-09-11 13:48:44.057831979 +0800
+@@ -0,0 +1,20 @@
++#ifndef _MACHINE_KEXEC_H
++#define _MACHINE_KEXEC_H
++
++#ifndef __ASSEMBLY__
++extern const unsigned char kexec_relocate_new_kernel[];
++extern unsigned long kexec_relocate_new_kernel_end;
++extern unsigned long kexec_start_address;
++extern unsigned long kexec_indirection_page;
++
++extern char kexec_argv_buf[];
++extern char *kexec_argv[];
++
++#define KEXEC_RELOCATE_NEW_KERNEL_SIZE	((unsigned long)&kexec_relocate_new_kernel_end - (unsigned long)kexec_relocate_new_kernel)
++#endif /* !__ASSEMBLY__ */
++
++#define KEXEC_COMMAND_LINE_SIZE		256
++#define KEXEC_ARGV_SIZE			(KEXEC_COMMAND_LINE_SIZE / 16)
++#define KEXEC_MAX_ARGC			(KEXEC_ARGV_SIZE / sizeof(long))
++
++#endif
diff --git a/target/linux/generic/patches-3.14/333-kexec-parameter-from-kexec-tools.patch b/target/linux/generic/patches-3.14/333-kexec-parameter-from-kexec-tools.patch
new file mode 100644
index 0000000..af6ec1c
--- /dev/null
+++ b/target/linux/generic/patches-3.14/333-kexec-parameter-from-kexec-tools.patch
@@ -0,0 +1,298 @@
+Index: linux-3.10.49/arch/mips/kernel/machine_kexec.c
+===================================================================
+--- linux-3.10.49.orig/arch/mips/kernel/machine_kexec.c	2014-07-18 06:58:15.000000000 +0800
++++ linux-3.10.49/arch/mips/kernel/machine_kexec.c	2014-09-11 12:28:51.164810693 +0800
+@@ -10,45 +10,146 @@
+ #include <linux/mm.h>
+ #include <linux/delay.h>
+ 
++#include <asm/bootinfo.h>
+ #include <asm/cacheflush.h>
+ #include <asm/page.h>
+-
+-extern const unsigned char relocate_new_kernel[];
+-extern const size_t relocate_new_kernel_size;
+-
+-extern unsigned long kexec_start_address;
+-extern unsigned long kexec_indirection_page;
++#include <asm/uaccess.h>
++#include "machine_kexec.h"
+ 
+ int (*_machine_kexec_prepare)(struct kimage *) = NULL;
+ void (*_machine_kexec_shutdown)(void) = NULL;
+ void (*_machine_crash_shutdown)(struct pt_regs *regs) = NULL;
++
+ #ifdef CONFIG_SMP
+ void (*relocated_kexec_smp_wait) (void *);
+ atomic_t kexec_ready_to_reboot = ATOMIC_INIT(0);
+ #endif
+ 
+-int
+-machine_kexec_prepare(struct kimage *kimage)
++static void machine_kexec_print_args(void)
++{
++	unsigned long argc = (int)kexec_args[0];
++	int i;
++
++	pr_info("kexec_args[0] (argc): %lu\n", argc);
++	pr_info("kexec_args[1] (argv): %p\n", (void *)kexec_args[1]);
++	pr_info("kexec_args[2] (env ): %p\n", (void *)kexec_args[2]);
++	pr_info("kexec_args[3] (desc): %p\n", (void *)kexec_args[3]);
++
++	for (i = 0; i < argc; i++) {
++		pr_info("kexec_argv[%d] = %p, %s\n",
++				i, kexec_argv[i], kexec_argv[i]);
++	}
++}
++
++static void machine_kexec_init_argv(struct kimage *image)
+ {
++	void __user *buf = NULL;
++	size_t bufsz;
++	size_t size;
++	int i;
++
++	bufsz = 0;
++	for (i = 0; i < image->nr_segments; i++) {
++		struct kexec_segment *seg;
++
++		seg = &image->segment[i];
++		if (seg->bufsz < 6)
++			continue;
++
++		if (strncmp((char *) seg->buf, "kexec\x20", 6))
++			continue;
++
++		/* don't copy "kexec" */
++		buf = seg->buf + 6;
++		bufsz = seg->bufsz - 6;
++		break;
++	}
++
++	if (!buf)
++		return;
++
++	size = KEXEC_COMMAND_LINE_SIZE;
++	size = min(size, bufsz);
++	if (size < bufsz)
++		pr_warn("kexec command line truncated to %zd bytes\n", size);
++
++	/* Copy to kernel space */
++	copy_from_user(kexec_argv_buf, buf, size);
++	kexec_argv_buf[size - 1] = 0;
++}
++
++static void machine_kexec_parse_argv(struct kimage *image)
++{
++	char *reboot_code_buffer;
++	int reloc_delta;
++	char *ptr;
++	int argc;
++	int i;
++
++	ptr = kexec_argv_buf;
++	argc = 0;
++
++	/*
++	 * convert command line string to array of parameters
++	 * (as bootloader does).
++	 */
++	while (ptr && *ptr && (KEXEC_MAX_ARGC > argc)) {
++		if (*ptr == ' ') {
++			*ptr++ = '\0';
++			continue;
++		}
++
++		kexec_argv[argc++] = ptr;
++		ptr = strchr(ptr, ' ');
++	}
++
++	if (!argc)
++		return;
++
++	kexec_args[0] = argc;
++	kexec_args[1] = (unsigned long)kexec_argv;
++	kexec_args[2] = 0;
++	kexec_args[3] = 0;
++
++	reboot_code_buffer = page_address(image->control_code_page);
++	reloc_delta = reboot_code_buffer - (char *)kexec_relocate_new_kernel;
++
++	kexec_args[1] += reloc_delta;
++	for (i = 0; i < argc; i++)
++		kexec_argv[i] += reloc_delta;
++}
++
++int machine_kexec_prepare(struct kimage *kimage)
++{
++	/*
++	 * Whenever arguments passed from kexec-tools, Init the arguments as
++	 * the original ones to try avoiding booting failure.
++	 */
++
++	kexec_args[0] = fw_arg0;
++	kexec_args[1] = fw_arg1;
++	kexec_args[2] = fw_arg2;
++	kexec_args[3] = fw_arg3;
++
++	machine_kexec_init_argv(kimage);
++	machine_kexec_parse_argv(kimage);
++
+ 	if (_machine_kexec_prepare)
+ 		return _machine_kexec_prepare(kimage);
+ 	return 0;
+ }
+ 
+-void
+-machine_kexec_cleanup(struct kimage *kimage)
++void machine_kexec_cleanup(struct kimage *kimage)
+ {
+ }
+ 
+-void
+-machine_shutdown(void)
++void machine_shutdown(void)
+ {
+ 	if (_machine_kexec_shutdown)
+ 		_machine_kexec_shutdown();
+ }
+ 
+-void
+-machine_crash_shutdown(struct pt_regs *regs)
++void machine_crash_shutdown(struct pt_regs *regs)
+ {
+ 	if (_machine_crash_shutdown)
+ 		_machine_crash_shutdown(regs);
+@@ -58,25 +159,35 @@
+ 
+ typedef void (*noretfun_t)(void) __noreturn;
+ 
+-void
+-machine_kexec(struct kimage *image)
++void machine_kexec(struct kimage *image)
+ {
+ 	unsigned long reboot_code_buffer;
+ 	unsigned long entry;
+ 	unsigned long *ptr;
+ 
+ 	reboot_code_buffer =
+-	  (unsigned long)page_address(image->control_code_page);
++		(unsigned long)page_address(image->control_code_page);
++	pr_info("reboot_code_buffer = %p\n", (void *)reboot_code_buffer);
+ 
+ 	kexec_start_address =
+-		(unsigned long) phys_to_virt(image->start);
++		(unsigned long)phys_to_virt(image->start);
++	pr_info("kexec_start_address = %p\n", (void *)kexec_start_address);
+ 
+ 	kexec_indirection_page =
+ 		(unsigned long) phys_to_virt(image->head & PAGE_MASK);
++	pr_info("kexec_indirection_page = %p\n", (void *)kexec_indirection_page);
+ 
+-	memcpy((void*)reboot_code_buffer, relocate_new_kernel,
+-	       relocate_new_kernel_size);
+-
++	pr_info("Where is memcpy: %p\n", memcpy);
++	pr_info("kexec_relocate_new_kernel = %p, kexec_relocate_new_kernel_end = %p\n",
++		(void *)kexec_relocate_new_kernel, &kexec_relocate_new_kernel_end);
++	pr_info("Copy %lu bytes from %p to %p\n", KEXEC_RELOCATE_NEW_KERNEL_SIZE,
++		(void *)kexec_relocate_new_kernel, (void *)reboot_code_buffer);
++	memcpy((void*)reboot_code_buffer, kexec_relocate_new_kernel,
++	       KEXEC_RELOCATE_NEW_KERNEL_SIZE);
++
++	pr_info("Before _print_args().\n");
++	machine_kexec_print_args();
++	pr_info("Before eval loop.\n");
+ 	/*
+ 	 * The generic kexec code builds a page list with physical
+ 	 * addresses. they are directly accessible through KSEG0 (or
+@@ -94,15 +205,16 @@
+ 	/*
+ 	 * we do not want to be bothered.
+ 	 */
++	pr_info("Before irq_disable.\n");
+ 	local_irq_disable();
+ 
+-	printk("Will call new kernel at %08lx\n", image->start);
+-	printk("Bye ...\n");
++	pr_info("Will call new kernel at %08lx\n", image->start);
++	pr_info("Bye ...\n");
+ 	__flush_cache_all();
+ #ifdef CONFIG_SMP
+ 	/* All secondary cpus now may jump to kexec_wait cycle */
+ 	relocated_kexec_smp_wait = reboot_code_buffer +
+-		(void *)(kexec_smp_wait - relocate_new_kernel);
++		(void *)(kexec_smp_wait - kexec_relocate_new_kernel);
+ 	smp_wmb();
+ 	atomic_set(&kexec_ready_to_reboot, 1);
+ #endif
+Index: linux-3.10.49/arch/mips/kernel/relocate_kernel.S
+===================================================================
+--- linux-3.10.49.orig/arch/mips/kernel/relocate_kernel.S	2014-07-18 06:58:15.000000000 +0800
++++ linux-3.10.49/arch/mips/kernel/relocate_kernel.S	2014-09-11 12:28:51.168810861 +0800
+@@ -12,8 +12,9 @@
+ #include <asm/mipsregs.h>
+ #include <asm/stackframe.h>
+ #include <asm/addrspace.h>
++#include "machine_kexec.h"
+ 
+-LEAF(relocate_new_kernel)
++LEAF(kexec_relocate_new_kernel)
+ 	PTR_L a0,	arg0
+ 	PTR_L a1,	arg1
+ 	PTR_L a2,	arg2
+@@ -92,7 +93,7 @@
+ #endif
+ 	/* jump to kexec_start_address */
+ 	j		s1
+-	END(relocate_new_kernel)
++	END(kexec_relocate_new_kernel)
+ 
+ #ifdef CONFIG_SMP
+ /*
+@@ -178,9 +179,15 @@
+ 	PTR		0
+ 	.size		kexec_indirection_page, PTRSIZE
+ 
+-relocate_new_kernel_end:
++kexec_argv_buf:
++	EXPORT(kexec_argv_buf)
++	.skip		KEXEC_COMMAND_LINE_SIZE
++	.size		kexec_argv_buf, KEXEC_COMMAND_LINE_SIZE
++
++kexec_argv:
++	EXPORT(kexec_argv)
++	.skip		KEXEC_ARGV_SIZE
++	.size		kexec_argv, KEXEC_ARGV_SIZE
+ 
+-relocate_new_kernel_size:
+-	EXPORT(relocate_new_kernel_size)
+-	PTR		relocate_new_kernel_end - relocate_new_kernel
+-	.size		relocate_new_kernel_size, PTRSIZE
++kexec_relocate_new_kernel_end:
++	EXPORT(kexec_relocate_new_kernel_end)
+Index: linux-3.10.49/arch/mips/kernel/machine_kexec.h
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ linux-3.10.49/arch/mips/kernel/machine_kexec.h	2014-09-11 13:48:44.057831979 +0800
+@@ -0,0 +1,20 @@
++#ifndef _MACHINE_KEXEC_H
++#define _MACHINE_KEXEC_H
++
++#ifndef __ASSEMBLY__
++extern const unsigned char kexec_relocate_new_kernel[];
++extern unsigned long kexec_relocate_new_kernel_end;
++extern unsigned long kexec_start_address;
++extern unsigned long kexec_indirection_page;
++
++extern char kexec_argv_buf[];
++extern char *kexec_argv[];
++
++#define KEXEC_RELOCATE_NEW_KERNEL_SIZE	((unsigned long)&kexec_relocate_new_kernel_end - (unsigned long)kexec_relocate_new_kernel)
++#endif /* !__ASSEMBLY__ */
++
++#define KEXEC_COMMAND_LINE_SIZE		256
++#define KEXEC_ARGV_SIZE			(KEXEC_COMMAND_LINE_SIZE / 16)
++#define KEXEC_MAX_ARGC			(KEXEC_ARGV_SIZE / sizeof(long))
++
++#endif
-- 
1.7.10.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From marc at wimoto.com  Fri Jan 23 10:46:57 2015
From: marc at wimoto.com (Marc Nicholas)
Date: Fri, 23 Jan 2015 10:46:57 -0500
Subject: [OpenWrt-Devel] MT7688 -- is anyone working on this already?
Message-ID: <etPan.54c26cf1.6b68079a.1e4@Marcs-MacBook-Pro.local>

Hi,

We have some MT7688 SoCs arriving in the next couple of weeks from our partner in China.

Has anyone attempted (or is attempting) to get this up and running? They?re RAMIPS (24kec) but looking for clues about Wifi and the onboard eMMC drivers. It looks like the 7620 already has this figured out and might be a good place to start.

Any thoughts/pointers welcomed. We?ll obviously submit patches back :)

Cheers,


-m

--?
Marc Nicholas
CTO, Wimoto Technologies Inc.
Unit 2, 300 Don Park Road, Markham, Ontario L3R 3A1 CANADA
+1.416.414.6272
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150123/19ee1fc6/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From blogic at openwrt.org  Fri Jan 23 11:05:42 2015
From: blogic at openwrt.org (John Crispin)
Date: Fri, 23 Jan 2015 17:05:42 +0100
Subject: [OpenWrt-Devel] MT7688 -- is anyone working on this already?
In-Reply-To: <etPan.54c26cf1.6b68079a.1e4@Marcs-MacBook-Pro.local>
References: <etPan.54c26cf1.6b68079a.1e4@Marcs-MacBook-Pro.local>
Message-ID: <54C27156.8060801@openwrt.org>



On 23/01/2015 16:46, Marc Nicholas wrote:
> Hi,
> 
> We have some MT7688 SoCs arriving in the next couple of weeks from
> our partner in China.
> 
> Has anyone attempted (or is attempting) to get this up and
> running? They?re RAMIPS (24kec) but looking for clues about Wifi
> and the onboard eMMC drivers. It looks like the 7620 already has
> this figured out and might be a good place to start.

trunk already boots on this SoC. ethernet works. the emmc driver
ported from the SDK works on mt7621 and mt7620 but i failed to get it
working on mt7628. for wifi you are stuck with the SDK driver for now.
however we have hope that the mac80211 based mt76 driver will soon
work on this SoC aswell.



> 
> Any thoughts/pointers welcomed. We?ll obviously submit patches back
> :)
> 
> Cheers,
> 
> 
> -m
> 
> -- Marc Nicholas CTO, Wimoto Technologies Inc. Unit 2, 300 Don Park
> Road, Markham, Ontario L3R 3A1 CANADA +1.416.414.6272
> 
> 
> _______________________________________________ openwrt-devel
> mailing list openwrt-devel at lists.openwrt.org 
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From ardeleanalex at gmail.com  Fri Jan 23 11:07:43 2015
From: ardeleanalex at gmail.com (Alexandru Ardelean)
Date: Fri, 23 Jan 2015 18:07:43 +0200
Subject: [OpenWrt-Devel] How to handle multiple providers?
In-Reply-To: <54C2443F.7090602@gmail.com>
References: <54C142B5.8000209@gmail.com>
 <CA+U=DspGjgT-Z9RkJAnCDYGeUz3KLG0WnGkeA7bGLaDiY8+sNg@mail.gmail.com>
 <54C2443F.7090602@gmail.com>
Message-ID: <CA+U=DspVAZSmYQMOTwDKiW=ij4eFVE4vUNw=Wv2CcOaknE7U6w@mail.gmail.com>

I don't think you need to explicitly include the .config file [in case
you're doing that].
Running the build should create those vars cleanly.

On Fri, Jan 23, 2015 at 2:53 PM, Mats Karrman <mats.dev.list at gmail.com>
wrote:

>  Thanks for your help!
>
> I was actually working on something similar to your (2), using CONFIG_
> variables but there were some trouble with the logic behind including the
> .config file and then also, all string options are exported with "quotes"
> around them and that messed up the DEPENDENCY declaration.
>
> BR // Mats
>
>
> On 2015-01-23 08:18, Alexandru Ardelean wrote:
>
>   Well, you need to specifiy Ax in the DEPENDS section of B.
>  Since there are 3 Ax, you can do it 2 ways:
>
> 1) Create Bx (x = 1-3) packages; B1 depends on A1, B2 depends on A2, B3
> depends on A3; so, if you select the correct Bx, the correct Ax will also
> get built.
>  You can also use build variants to keep Bx in a single Makefile; you can
> check the  package/ncurses/Makefile for hints.
>  The build variants does not seem too popular, but you can try it.
>
> 2) In the Makefile of B you can do a "dynamic" DEPENDS.
> Before the package definition (i.e.  define Package/B ) you can add a
> A_DEPENDS variable.
>  You can do something like:
> ifeq ($(A_DEPENDS),)
>     ifeq ($(CONFIG_A1),y)
>          A_DEPENDS := A1
>     endif
>  endif
>  ifeq ($(A_DEPENDS),)
>    ifeq ($(CONFIG_A2),y)
>          A_DEPENDS := A2
>     endif
>  endif
>  ifeq ($(A_DEPENDS),)
>    ifeq ($(CONFIG_A3),y)
>          A_DEPENDS := A3
>     endif
>  endif
>  A_DEPENDS should equal to either A1, A2 or A3, if either is selected.
> Note that CONFIG_Ax is as defined in the .config file.
>  Then
> define Package/B
>    DEPENDS:= ............ $(A_DEPENDS)
>  endef
>
>  If I look at this approach, it does what you asked for.
> But all in all, I would say there would be a cleaner approach if Ax and B
> are known.
>
>  If the assumption would be that Ax are similar packages (or variants of
> a base A), then I'd make a single package A, and define some options to it.
>  Based on those options A would be a variation of type Ax (x = 1 - 3).
>  Then
>  define Package/B
>   DEPENDS:= ............ A
>  endef
>
>  And you can configure A with whatever options you need.
>
>
> On Thu, Jan 22, 2015 at 8:34 PM, Mats Karrman <mats.dev.list at gmail.com>
> wrote:
>
>> Hi,
>>
>> I'm struggling with a problem and I can't really get it to work as I want.
>>
>> Say you have 3 packages, A1, A2 and A3, that all provide the include file
>> "f.h".
>> I also have package B that build-time depends on "f.h".
>>
>> I will enable either A1, A2 or A3 in the .config for a build but how do I
>> make
>> OpenWRT understand that it cannot build B until either of Ax is built?
>>
>> I'd be ever so greatfull for some good hints on how to solve this.
>>
>> (and oh, I'm on "Attitude-Adjustment")
>>
>> Best regards,
>> Mats
>> _______________________________________________
>> openwrt-devel mailing list
>> openwrt-devel at lists.openwrt.org
>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150123/b935745e/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From cezary.jackiewicz at gmail.com  Fri Jan 23 12:27:55 2015
From: cezary.jackiewicz at gmail.com (Cezary Jackiewicz)
Date: Fri, 23 Jan 2015 18:27:55 +0100
Subject: [OpenWrt-Devel] [PATCH] fix typo in netifd.sh
In-Reply-To: <54C0FE0D.1070500@openwrt.org>
References: <20150120184414.711139fe@samsung>
	<54C0FE0D.1070500@openwrt.org>
Message-ID: <20150123182755.2d66da06@samsung>

Dnia 2015-01-22, o godz. 14:41:33
John Crispin <blogic at openwrt.org> napisa?(a):

> can you explain your wifi setup so that we can figure out how to
> properly fix this ?

config wifi-device 'radio1'
	option type 'mac80211'
	option hwmode '11a'
	option path 'pci0000:00/0000:00:00.0'
	option disabled '0'
	option htmode 'HT20'
	option channel '48'

config wifi-iface
	option device 'radio1'
	option encryption 'psk2'
	option key '1234567890'
	option network 'wlan'
	option mode 'adhoc'
	option ssid 'link-5g'

Without patch I've got

root at OpenWrt:~# cat /var/run/wpa_supplicant-wlan1.conf 
ap_scan=2
network={
	scan_ssid=0
	ssid="link-5g"
	key_mgmt=WPA-PSK
	mode=1
	fixed_freq=1
	frequency=5240
	mode=1
	psk="1234567890"
	proto=RSN
}

iw wlan1 info shows only 20 MHz (no HT) and iw wlan1 station dump - tx/rx 54MBit

With patch:

root at OpenWrt:~# cat /var/run/wpa_supplicant-wlan1.conf 
ap_scan=2
network={
	scan_ssid=0
	ssid="link-5g"
	key_mgmt=WPA-PSK
	mode=1
	fixed_freq=1
	frequency=5240
	mode=1
	psk="1234567890"
	proto=RSN
	htmode=HT20
}

iw wlan1 info shows channel 48 (5240 MHz), width: 20 MHz, center1: 5240 MHz 
(width: 40 MHz with channel 36 and HT40+); iw wlan1 station dump shows
bitrate

rx bitrate:	115.6 MBit/s MCS 13 short GI
tx bitrate:	57.8 MBit/s MCS 5 short GI
rx bitrate:	86.7 MBit/s MCS 12 short GI

etc.

-- 
Pozdrawiam,
 Cezary Jackiewicz
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From BM-2cVqnDuYbAU5do2DfJTrN7ZbAJ246S4Xix at bitmessage.ch  Fri Jan 23 14:52:56 2015
From: BM-2cVqnDuYbAU5do2DfJTrN7ZbAJ246S4Xix at bitmessage.ch (Riley Baird)
Date: Sat, 24 Jan 2015 06:52:56 +1100
Subject: [OpenWrt-Devel] OpenWRT Wiki License
Message-ID: <54C2A698.2060501@bitmessage.ch>

Hi,

A while ago I submitted content to the OpenWRT wiki, It said that my
contributions were under CC BY-SA 3.0. Now, however, it says that they
are under CC BY-NC-SA 3.0. Is there a reason for this?

Yours thankfully,

Riley Baird
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From christian.schoenebeck at gmail.com  Fri Jan 23 15:55:31 2015
From: christian.schoenebeck at gmail.com (Christian Schoenebeck)
Date: Fri, 23 Jan 2015 21:55:31 +0100
Subject: [OpenWrt-Devel] cURL: Update to version 7.40.0
Message-ID: <54C2B543.3020004@gmail.com>

* Update to version 7.40.0
* remove non existing config options around enable/disable HTTPS protocoll
* remove --with-ca-path if ssl support disabled
* set proxy support as default like all versions before CC did

Signed-off-by: Christian Schoenebeck <christian.schoenebeck at gmail.com>

---
 package/network/utils/curl/Config.in                         | 11 +++--------
 package/network/utils/curl/Makefile                          |  8 +++-----
 package/network/utils/curl/patches/100-check_long_long.patch |  2 +-
 package/network/utils/curl/patches/200-no_docs_tests.patch   |  6 +++---
 4 files changed, 10 insertions(+), 17 deletions(-)

diff --git a/package/network/utils/curl/Config.in b/package/network/utils/curl/Config.in
index 026dcd6..87e5f99 100644
--- a/package/network/utils/curl/Config.in
+++ b/package/network/utils/curl/Config.in
@@ -1,5 +1,4 @@
-menu "Configuration"
-	depends on PACKAGE_libcurl
+if PACKAGE_libcurl
 
 choice
 	prompt "SSL library"
@@ -53,10 +52,6 @@ config LIBCURL_HTTP
 	bool "Enable HTTP support"
 	default y
 
-config LIBCURL_HTTPS
-	bool "Enable HTTPS support"
-	default n
-
 config LIBCURL_IMAP
 	bool "Enable IMAP support"
 	default n
@@ -79,7 +74,7 @@ config LIBCURL_POP3
 
 config LIBCURL_PROXY
 	bool "Enable proxy support"
-	default n
+	default y
 
 config LIBCURL_RTSP
 	bool "Enable RTSP support"
@@ -113,4 +108,4 @@ config LIBCURL_ZLIB
 	bool "Use zlib"
 	default n
 
-endmenu
+endif
diff --git a/package/network/utils/curl/Makefile b/package/network/utils/curl/Makefile
index 1a37495..08e2f1d 100644
--- a/package/network/utils/curl/Makefile
+++ b/package/network/utils/curl/Makefile
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=curl
-PKG_VERSION:=7.38.0
+PKG_VERSION:=7.40.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
@@ -18,7 +18,7 @@ PKG_SOURCE_URL:=http://curl.haxx.se/download/ \
 	ftp://ftp.planetmirror.com/pub/curl/ \
 	http://www.mirrormonster.com/curl/download/ \
 	http://curl.mirrors.cyberservers.net/download/
-PKG_MD5SUM:=af6b3c299bd891f43cb5f76c4091b7b4
+PKG_MD5SUM:=8d30594212e65657a5c32030f0998fa9
 
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=COPYING
@@ -37,7 +37,6 @@ PKG_CONFIG_DEPENDS := \
   LIBCURL_GNUTLS \
   LIBCURL_GOPHER \
   LIBCURL_HTTP \
-  LIBCURL_HTTPS \
   LIBCURL_IMAP \
   LIBCURL_LDAP \
   LIBCURL_LDAPS \
@@ -98,7 +97,7 @@ CONFIGURE_ARGS += \
 	--disable-manual \
 	--disable-verbose \
 	--without-ca-bundle \
-	$(if $(CONFIG_LIBCURL_OPENSSL),--with-ca-path=/etc/ssl/certs/) \
+	$(if $(CONFIG_LIBCURL_NOSSL),,--with-ca-path=/etc/ssl/certs/) \
 	--without-krb4 \
 	--without-libidn \
 	--without-nss \
@@ -114,7 +113,6 @@ CONFIGURE_ARGS += \
 	$(if $(CONFIG_LIBCURL_GOPHER),--enable,--disable)-gopher \
 	$(if $(CONFIG_LIBCURL_GNUTLS),--with-gnutls="$(STAGING_DIR)/usr",--without-gnutls) \
 	$(if $(CONFIG_LIBCURL_HTTP),--enable,--disable)-http \
-	$(if $(CONFIG_LIBCURL_HTTPS),--enable,--disable)-https \
 	$(if $(CONFIG_LIBCURL_IMAP),--enable,--disable)-imap \
 	$(if $(CONFIG_LIBCURL_LDAP),--enable,--disable)-ldap \
 	$(if $(CONFIG_LIBCURL_LDAPS),--enable,--disable)-ldaps \
diff --git a/package/network/utils/curl/patches/100-check_long_long.patch b/package/network/utils/curl/patches/100-check_long_long.patch
index 05fb1bf..2dd8cc7 100644
--- a/package/network/utils/curl/patches/100-check_long_long.patch
+++ b/package/network/utils/curl/patches/100-check_long_long.patch
@@ -1,6 +1,6 @@
 --- a/configure.ac
 +++ b/configure.ac
-@@ -2877,6 +2877,7 @@ CURL_VERIFY_RUNTIMELIBS
+@@ -2885,6 +2885,7 @@ CURL_VERIFY_RUNTIMELIBS
  
  AC_CHECK_SIZEOF(size_t)
  AC_CHECK_SIZEOF(long)
diff --git a/package/network/utils/curl/patches/200-no_docs_tests.patch b/package/network/utils/curl/patches/200-no_docs_tests.patch
index 42619a3..6a1fdf5 100644
--- a/package/network/utils/curl/patches/200-no_docs_tests.patch
+++ b/package/network/utils/curl/patches/200-no_docs_tests.patch
@@ -1,6 +1,6 @@
 --- a/Makefile.am
 +++ b/Makefile.am
-@@ -128,7 +128,7 @@ CLEANFILES = $(VC6_LIBDSP) $(VC6_SRCDSP)
+@@ -129,7 +129,7 @@ CLEANFILES = $(VC6_LIBDSP) $(VC6_SRCDSP) $(VC7_LIBVCPROJ) $(VC7_SRCVCPROJ)	\
  bin_SCRIPTS = curl-config
  
  SUBDIRS = lib src include
@@ -11,7 +11,7 @@
  pkgconfig_DATA = libcurl.pc
 --- a/Makefile.in
 +++ b/Makefile.in
-@@ -574,7 +574,7 @@ CLEANFILES = $(VC6_LIBDSP) $(VC6_SRCDSP)
+@@ -577,7 +577,7 @@ CLEANFILES = $(VC6_LIBDSP) $(VC6_SRCDSP) $(VC7_LIBVCPROJ) $(VC7_SRCVCPROJ)	\
  
  bin_SCRIPTS = curl-config
  SUBDIRS = lib src include
@@ -19,4 +19,4 @@
 +DIST_SUBDIRS = $(SUBDIRS) packages
  pkgconfigdir = $(libdir)/pkgconfig
  pkgconfig_DATA = libcurl.pc
- LIB_VTLS_CFILES = vtls/openssl.c vtls/gtls.c vtls/vtls.c vtls/nss.c	\
+ LIB_VTLS_CFILES = vtls/openssl.c vtls/gtls.c vtls/vtls.c vtls/nss.c     \
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From blogic at openwrt.org  Fri Jan 23 15:58:14 2015
From: blogic at openwrt.org (John Crispin)
Date: Fri, 23 Jan 2015 21:58:14 +0100
Subject: [OpenWrt-Devel] [PATCH] fix typo in netifd.sh
In-Reply-To: <20150123182755.2d66da06@samsung>
References: <20150120184414.711139fe@samsung>	<54C0FE0D.1070500@openwrt.org>
 <20150123182755.2d66da06@samsung>
Message-ID: <54C2B5E6.9000407@openwrt.org>



On 23/01/2015 18:27, Cezary Jackiewicz wrote:
> Dnia 2015-01-22, o godz. 14:41:33
> John Crispin <blogic at openwrt.org> napisa?(a):
> 
>> can you explain your wifi setup so that we can figure out how to
>> properly fix this ?
> 
> config wifi-device 'radio1'
> 	option type 'mac80211'
> 	option hwmode '11a'
> 	option path 'pci0000:00/0000:00:00.0'
> 	option disabled '0'
> 	option htmode 'HT20'
> 	option channel '48'
> 
> config wifi-iface
> 	option device 'radio1'
> 	option encryption 'psk2'
> 	option key '1234567890'
> 	option network 'wlan'
> 	option mode 'adhoc'
> 	option ssid 'link-5g'
> 
> Without patch I've got
> 
> root at OpenWrt:~# cat /var/run/wpa_supplicant-wlan1.conf 
> ap_scan=2
> network={
> 	scan_ssid=0
> 	ssid="link-5g"
> 	key_mgmt=WPA-PSK
> 	mode=1
> 	fixed_freq=1
> 	frequency=5240
> 	mode=1
> 	psk="1234567890"
> 	proto=RSN
> }
> 
> iw wlan1 info shows only 20 MHz (no HT) and iw wlan1 station dump - tx/rx 54MBit
> 
> With patch:
> 
> root at OpenWrt:~# cat /var/run/wpa_supplicant-wlan1.conf 
> ap_scan=2
> network={
> 	scan_ssid=0
> 	ssid="link-5g"
> 	key_mgmt=WPA-PSK
> 	mode=1
> 	fixed_freq=1
> 	frequency=5240
> 	mode=1
> 	psk="1234567890"
> 	proto=RSN
> 	htmode=HT20
> }
> 
> iw wlan1 info shows channel 48 (5240 MHz), width: 20 MHz, center1: 5240 MHz 
> (width: 40 MHz with channel 36 and HT40+); iw wlan1 station dump shows
> bitrate
> 
> rx bitrate:	115.6 MBit/s MCS 13 short GI
> tx bitrate:	57.8 MBit/s MCS 5 short GI
> rx bitrate:	86.7 MBit/s MCS 12 short GI
> 
> etc.
> 

ok, so it is adhoc mode. in this case the feature does make sense. the
problem is that the values provided by netifd-wireless.sh cannot
directly be translated to wpa_supplicant values. additionally yor patch
should ensure that values are only applied for adhoc networks. i will
put this on my list and investigate a bit further.
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From leitec at staticky.com  Fri Jan 23 20:27:42 2015
From: leitec at staticky.com (Claudio Leite)
Date: Fri, 23 Jan 2015 20:27:42 -0500
Subject: [OpenWrt-Devel] [PATCH 1/3] kirkwood: drop port-based VLAN setup
Message-ID: <1422062864-30133-1-git-send-email-leitec@staticky.com>

Using port-based VLANs depends on a non-standard
swconfig parameter, which compilcates things like
LuCI that don't know about it. This patch changes
the default to use 802.1q VLANs internally in the
switch, but without tagging packets since we have
two Ethernet ports.

iperf3 tests indicate no difference in performance
versus port-based VLANs when the CPU port is not
using tags.

Signed-off-by: Claudio Leite <leitec at staticky.com>
---
 .../base-files/etc/uci-defaults/02_network         | 25 ++++++----------------
 1 file changed, 6 insertions(+), 19 deletions(-)

diff --git a/target/linux/kirkwood/base-files/etc/uci-defaults/02_network b/target/linux/kirkwood/base-files/etc/uci-defaults/02_network
index 994d7e8..540c8c3 100644
--- a/target/linux/kirkwood/base-files/etc/uci-defaults/02_network
+++ b/target/linux/kirkwood/base-files/etc/uci-defaults/02_network
@@ -20,19 +20,6 @@ set network.lan6.reqprefix='no'
 EOF
 }
 
-add_port_based_vlan() {
-	local device=$1
-	local vlan=$2
-	local ports=$3
-	uci batch <<EOF
-add network switch_vlan
-set network. at switch_vlan[-1].device='$device'
-set network. at switch_vlan[-1].vlan='$vlan'
-set network. at switch_vlan[-1].ports='$ports'
-set network. at switch_vlan[-1].port_based='1'
-EOF
-}
-
 . /lib/functions/uci-defaults.sh
 . /lib/kirkwood.sh
 
@@ -55,15 +42,15 @@ case "$board" in
 	;;
 "ea3500")
 	ucidef_set_interfaces_lan_wan "eth0" "eth1"
-	ucidef_add_switch "switch0" "1" "0"
-	add_port_based_vlan "switch0" "1" "0 1 2 3 5"
-	add_port_based_vlan "switch0" "2" "4 6"
+	ucidef_add_switch "switch0" "1" "1"
+	ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 5"
+	ucidef_add_switch_vlan "switch0" "2" "4 6"
 	;;
 "ea4500")
 	ucidef_set_interfaces_lan_wan "eth0" "eth1"
-	ucidef_add_switch "switch0" "1" "0"
-	add_port_based_vlan "switch0" "1" "0 1 2 3 5"
-	add_port_based_vlan "switch0" "2" "4 6"
+	ucidef_add_switch "switch0" "1" "1"
+	ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 5"
+	ucidef_add_switch_vlan "switch0" "2" "4 6"
 	;;
 "guruplug-server-plus")
 	set_lan_dhcp "eth0" "eth1"
-- 
2.3.0.rc1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From leitec at staticky.com  Fri Jan 23 20:27:43 2015
From: leitec at staticky.com (Claudio Leite)
Date: Fri, 23 Jan 2015 20:27:43 -0500
Subject: [OpenWrt-Devel] [PATCH 2/3] kirkwood: fix EA3500 ubi options
In-Reply-To: <1422062864-30133-1-git-send-email-leitec@staticky.com>
References: <1422062864-30133-1-git-send-email-leitec@staticky.com>
Message-ID: <1422062864-30133-2-git-send-email-leitec@staticky.com>

Previous options resulted in a nonfunctional image.

Signed-off-by: Claudio Leite <leitec at staticky.com>
---
 target/linux/kirkwood/profiles/115-router.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/kirkwood/profiles/115-router.mk b/target/linux/kirkwood/profiles/115-router.mk
index f255ca4..f639451 100644
--- a/target/linux/kirkwood/profiles/115-router.mk
+++ b/target/linux/kirkwood/profiles/115-router.mk
@@ -16,8 +16,8 @@ define Profile/EA3500/Description
  Package set compatible with Linksys EA3500 board.
 endef
 
-EA3500_UBIFS_OPTS:="-m 2048 -e 126KiB -c 4096"
-EA3500_UBI_OPTS:="-m 2048 -p 128KiB -s 512"
+EA3500_UBIFS_OPTS:="-m 512 -e 15872 -c 4096"
+EA3500_UBI_OPTS:="-m 512 -p 16384 -s 256"
 
 $(eval $(call Profile,EA3500))
 
-- 
2.3.0.rc1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From leitec at staticky.com  Fri Jan 23 20:27:44 2015
From: leitec at staticky.com (Claudio Leite)
Date: Fri, 23 Jan 2015 20:27:44 -0500
Subject: [OpenWrt-Devel] [PATCH 3/3] kirkwood: enable swconfig by default on
	EA3500
In-Reply-To: <1422062864-30133-1-git-send-email-leitec@staticky.com>
References: <1422062864-30133-1-git-send-email-leitec@staticky.com>
Message-ID: <1422062864-30133-3-git-send-email-leitec@staticky.com>

Signed-off-by: Claudio Leite <leitec at staticky.com>
---
 target/linux/kirkwood/profiles/115-router.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/kirkwood/profiles/115-router.mk b/target/linux/kirkwood/profiles/115-router.mk
index f639451..769284f 100644
--- a/target/linux/kirkwood/profiles/115-router.mk
+++ b/target/linux/kirkwood/profiles/115-router.mk
@@ -9,7 +9,7 @@ define Profile/EA3500
   NAME:=Linksys EA3500
   PACKAGES:= \
 	kmod-mwl8k kmod-usb2 kmod-usb-storage \
-	uboot-envtools
+	swconfig uboot-envtools
 endef
 
 define Profile/EA3500/Description
-- 
2.3.0.rc1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From nlhintz at hotmail.com  Fri Jan 23 22:36:47 2015
From: nlhintz at hotmail.com (Nathan Hintz)
Date: Fri, 23 Jan 2015 19:36:47 -0800
Subject: [OpenWrt-Devel] [PATCH] procd: increase memory allocated for tmpfs
	on zram
Message-ID: <BLU436-SMTP2080B9E86DA4DC965C9DBFFAC370@phx.gbl>

Devices with <= 32MB of ram get half of memory allocated to zram (up to 16MB).
Devices with > 32MB of ram get just 8MB of memory allocated to zram.

Increase memory allocated to devices with > 32MB ram to 16MB.

Signed-off-by: Nathan Hintz <nlhintz at hotmail.com>
---
 initd/zram.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/initd/zram.c b/initd/zram.c
index 4dc1d2e..49480af 100644
--- a/initd/zram.c
+++ b/initd/zram.c
@@ -44,7 +44,7 @@ proc_meminfo(void)
 	fclose(fp);
 
 	if (val > KB(32))
-		val = KB(16);
+		val = KB(32);
 
 	return val;
 }
-- 
1.9.3
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From nlhintz at hotmail.com  Fri Jan 23 23:40:13 2015
From: nlhintz at hotmail.com (Nathan Hintz)
Date: Fri, 23 Jan 2015 20:40:13 -0800
Subject: [OpenWrt-Devel] [PATCH] modules: select grace_period config option
	for nfs-common
Message-ID: <BLU436-SMTP4089B1A15828CECF22B754AC370@phx.gbl>

Signed-off-by: Nathan Hintz <nlhintz at hotmail.com>
---
 package/kernel/linux/modules/fs.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/kernel/linux/modules/fs.mk b/package/kernel/linux/modules/fs.mk
index 3ae3c2d..1de7acd 100644
--- a/package/kernel/linux/modules/fs.mk
+++ b/package/kernel/linux/modules/fs.mk
@@ -324,6 +324,7 @@ define KernelPackage/fs-nfs-common
 	CONFIG_LOCKD \
 	CONFIG_SUNRPC
 ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,3.18.0)),1)
+  KCONFIG+=CONFIG_GRACE_PERIOD
   FILES:= \
 	$(LINUX_DIR)/fs/nfs_common/grace.ko \
 	$(LINUX_DIR)/fs/lockd/lockd.ko \
-- 
1.9.3
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From nlhintz at hotmail.com  Fri Jan 23 23:41:57 2015
From: nlhintz at hotmail.com (Nathan Hintz)
Date: Fri, 23 Jan 2015 20:41:57 -0800
Subject: [OpenWrt-Devel] [PATCH] modules: add lz4 compression support
Message-ID: <BLU437-SMTP647FF3BC084B79A9A53929AC370@phx.gbl>

Signed-off-by: Nathan Hintz <nlhintz at hotmail.com>
---
 package/kernel/linux/modules/lib.mk                  | 20 ++++++++++++++++++++
 target/linux/generic/config-3.18                     |  4 ++++
 .../patches-3.18/262-compressor_kconfig_hack.patch   | 16 ++++++++++++++--
 3 files changed, 38 insertions(+), 2 deletions(-)

diff --git a/package/kernel/linux/modules/lib.mk b/package/kernel/linux/modules/lib.mk
index cd919ba..f230a99 100644
--- a/package/kernel/linux/modules/lib.mk
+++ b/package/kernel/linux/modules/lib.mk
@@ -117,6 +117,26 @@ endef
 $(eval $(call KernelPackage,lib-lzo))
 
 
+define KernelPackage/lib-lz4
+  SUBMENU:=$(LIB_MENU)
+  DEPENDS:=@!(LINUX_3_3||LINUX_3_8||LINUX_3_10||LINUX_3_13||LINUX_3_14)
+  TITLE:=LZ4 support
+  KCONFIG:= \
+	CONFIG_LZ4_COMPRESS \
+	CONFIG_LZ4_DECOMPRESS
+  FILES:= \
+	$(LINUX_DIR)/lib/lz4/lz4_compress.ko \
+	$(LINUX_DIR)/lib/lz4/lz4_decompress.ko
+  AUTOLOAD:=$(call AutoProbe,lz4_compress lz4_decompress)
+endef
+
+define KernelPackage/lib-lz4/description
+ Kernel module for LZ4 compression/decompression support
+endef
+
+$(eval $(call KernelPackage,lib-lz4))
+
+
 define KernelPackage/lib-raid6
   SUBMENU:=$(LIB_MENU)
   TITLE:=RAID6 algorithm support
diff --git a/target/linux/generic/config-3.18 b/target/linux/generic/config-3.18
index 1642b60..828c5b6 100644
--- a/target/linux/generic/config-3.18
+++ b/target/linux/generic/config-3.18
@@ -1876,6 +1876,9 @@ CONFIG_LZMA_COMPRESS=y
 CONFIG_LZMA_DECOMPRESS=y
 # CONFIG_LZO_COMPRESS is not set
 # CONFIG_LZO_DECOMPRESS is not set
+# CONFIG_LZ4_COMPRESS is not set
+# CONFIG_LZ4_DECOMPRESS is not set
+# CONFIG_LZ4HC_COMPRESS is not set
 # CONFIG_M25PXX_PREFER_SMALL_SECTOR_ERASE is not set
 # CONFIG_MAC80211 is not set
 # CONFIG_MAC80211_MESSAGE_TRACING is not set
@@ -4569,4 +4572,5 @@ CONFIG_XZ_DEC=y
 CONFIG_ZONE_DMA=y
 CONFIG_ZONE_DMA_FLAG=1
 # CONFIG_ZRAM is not set
+# CONFIG_ZRAM_LZ4_COMPRESS is not set
 # CONFIG_ZSMALLOC is not set
diff --git a/target/linux/generic/patches-3.18/262-compressor_kconfig_hack.patch b/target/linux/generic/patches-3.18/262-compressor_kconfig_hack.patch
index a24405d..51b4fc8 100644
--- a/target/linux/generic/patches-3.18/262-compressor_kconfig_hack.patch
+++ b/target/linux/generic/patches-3.18/262-compressor_kconfig_hack.patch
@@ -1,6 +1,6 @@
 --- a/lib/Kconfig
 +++ b/lib/Kconfig
-@@ -205,16 +205,16 @@ config RANDOM32_SELFTEST
+@@ -205,25 +205,25 @@ config RANDOM32_SELFTEST
  # compression support is select'ed if needed
  #
  config ZLIB_INFLATE
@@ -20,4 +20,16 @@
 +	tristate "LZO decompress support"
  
  config LZ4_COMPRESS
- 	tristate
+-	tristate
++	tristate "LZ4 compress support"
+ 
+ config LZ4HC_COMPRESS
+-	tristate
++	tristate "LZ4HC compress support"
+ 
+ config LZ4_DECOMPRESS
+-	tristate
++	tristate "LZ4 decompress support"
+ 
+ source "lib/xz/Kconfig"
+ 
-- 
1.9.3
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From nlhintz at hotmail.com  Fri Jan 23 23:55:37 2015
From: nlhintz at hotmail.com (Nathan Hintz)
Date: Fri, 23 Jan 2015 20:55:37 -0800
Subject: [OpenWrt-Devel] [PATCH] kirkwood: modify guruplug profile name
Message-ID: <BLU437-SMTP76ED3D2A94D2FB9C25F9E1AC370@phx.gbl>

This makes the naming pattern of the output rootfs and image files
consistent with the naming of the DTB file.

Signed-off-by: Nathan Hintz <nlhintz at hotmail.com>
---
 target/linux/kirkwood/image/Makefile       |  4 ++--
 target/linux/kirkwood/profiles/120-plug.mk | 10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/target/linux/kirkwood/image/Makefile b/target/linux/kirkwood/image/Makefile
index ede7cb3..52fed2d 100644
--- a/target/linux/kirkwood/image/Makefile
+++ b/target/linux/kirkwood/image/Makefile
@@ -144,8 +144,8 @@ Image/InstallKernel/Template/SHEEVAPLUG=$(call Image/InstallKernel/Template,shee
 Image/BuildKernel/Template/SHEEVAPLUGSATA=$(call Image/BuildKernel/Template,sheevaplug-esata)
 Image/InstallKernel/Template/SHEEVAPLUGSATA=$(call Image/InstallKernel/Template,sheevaplug-esata)
 
-Image/BuildKernel/Template/GuruplugServerPlus=$(call Image/BuildKernel/Template,guruplug-server-plus)
-Image/InstallKernel/Template/GuruplugServerPlus=$(call Image/InstallKernel/Template,guruplug-server-plus)
+Image/BuildKernel/Template/Guruplug-Server-Plus=$(call Image/BuildKernel/Template,guruplug-server-plus)
+Image/InstallKernel/Template/Guruplug-Server-Plus=$(call Image/InstallKernel/Template,guruplug-server-plus)
 
 Image/BuildKernel/Template/Topkick1281P2=$(call Image/BuildKernel/Template,topkick)
 Image/InstallKernel/Template/Topkick1281P2=$(call Image/InstallKernel/Template,topkick)
diff --git a/target/linux/kirkwood/profiles/120-plug.mk b/target/linux/kirkwood/profiles/120-plug.mk
index cca703f..dcbda71 100644
--- a/target/linux/kirkwood/profiles/120-plug.mk
+++ b/target/linux/kirkwood/profiles/120-plug.mk
@@ -40,7 +40,7 @@ SHEEVAPLUGSATA_UBI_OPTS:="-m 2048 -p 128KiB -s 512"
 
 $(eval $(call Profile,SHEEVAPLUGSATA))
 
-define Profile/GuruplugServerPlus
+define Profile/Guruplug-Server-Plus
   NAME:=Globalscale Technologies Guruplug Server Plus
   PACKAGES:= \
 	kmod-mmc kmod-mvsdio kmod-usb2 kmod-usb-storage \
@@ -50,14 +50,14 @@ define Profile/GuruplugServerPlus
 	uboot-envtools
 endef
 
-define Profile/GuruplugServerPlus/Description
+define Profile/Guruplug-Server-Plus/Description
  Package set compatible with Globalscale Technologies Guruplug Server Plus board.
 endef
 
-GuruplugServerPlus_UBIFS_OPTS:="-m 2048 -e 126KiB -c 4096"
-GuruplugServerPlus_UBI_OPTS:="-m 2048 -p 128KiB -s 512"
+Guruplug-Server-Plus_UBIFS_OPTS:="-m 2048 -e 126KiB -c 4096"
+Guruplug-Server-Plus_UBI_OPTS:="-m 2048 -p 128KiB -s 512"
 
-$(eval $(call Profile,GuruplugServerPlus))
+$(eval $(call Profile,Guruplug-Server-Plus))
 
 define Profile/Topkick1281P2
   NAME:=Univeral Scientific Industrial Co. Topkick-1281P2
-- 
1.9.3
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From nlhintz at hotmail.com  Fri Jan 23 23:57:57 2015
From: nlhintz at hotmail.com (Nathan Hintz)
Date: Fri, 23 Jan 2015 20:57:57 -0800
Subject: [OpenWrt-Devel] [PATCH] kirkwood: include kernel images and DTB in
	rootfs
Message-ID: <BLU437-SMTP25ED4851D780289E22C9EBAC370@phx.gbl>

For SheevaPlug and GuruPlug devices.

Signed-off-by: Nathan Hintz <nlhintz at hotmail.com>
---
 target/linux/kirkwood/profiles/120-plug.mk | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/target/linux/kirkwood/profiles/120-plug.mk b/target/linux/kirkwood/profiles/120-plug.mk
index dcbda71..473955d 100644
--- a/target/linux/kirkwood/profiles/120-plug.mk
+++ b/target/linux/kirkwood/profiles/120-plug.mk
@@ -7,6 +7,7 @@
 
 define Profile/SHEEVAPLUG
   NAME:=Globalscale Technologies SheevaPlug
+  DEPENDS:=+ at TARGET_ROOTFS_INCLUDE_KERNEL + at TARGET_ROOTFS_INCLUDE_ZIMAGE + at TARGET_ROOTFS_INCLUDE_DTB
   PACKAGES:= \
 	kmod-mmc kmod-mvsdio kmod-usb2 kmod-usb-storage \
 	kmod-of-i2c kmod-i2c-core kmod-i2c-mv64xxx \
@@ -24,6 +25,7 @@ $(eval $(call Profile,SHEEVAPLUG))
 
 define Profile/SHEEVAPLUGSATA
   NAME:=Globalscale Technologies eSATA SheevaPlug
+  DEPENDS:=+ at TARGET_ROOTFS_INCLUDE_KERNEL + at TARGET_ROOTFS_INCLUDE_ZIMAGE + at TARGET_ROOTFS_INCLUDE_DTB
   PACKAGES:= \
 	kmod-mmc kmod-mvsdio kmod-usb2 kmod-usb-storage \
 	kmod-of-i2c kmod-i2c-core kmod-i2c-mv64xxx \
@@ -42,6 +44,7 @@ $(eval $(call Profile,SHEEVAPLUGSATA))
 
 define Profile/Guruplug-Server-Plus
   NAME:=Globalscale Technologies Guruplug Server Plus
+  DEPENDS:=+ at TARGET_ROOTFS_INCLUDE_KERNEL + at TARGET_ROOTFS_INCLUDE_ZIMAGE + at TARGET_ROOTFS_INCLUDE_DTB
   PACKAGES:= \
 	kmod-mmc kmod-mvsdio kmod-usb2 kmod-usb-storage \
 	kmod-of-i2c kmod-i2c-core kmod-i2c-mv64xxx \
-- 
1.9.3
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From nlhintz at hotmail.com  Fri Jan 23 23:59:39 2015
From: nlhintz at hotmail.com (Nathan Hintz)
Date: Fri, 23 Jan 2015 20:59:39 -0800
Subject: [OpenWrt-Devel] [PATCH] kirkwood: define ethernet aliases in the
	device tree
Message-ID: <BLU436-SMTP67EE2EB064A18305691DCCAC370@phx.gbl>

The aliases are needed for u-boot to update the ethernet mac addresses
using the values from the u-boot environment.

Signed-off-by: Nathan Hintz <nlhintz at hotmail.com>
---
 .../patches-3.14/180-kirkwood-ethernetn.patch      | 33 ++++++++++++++++++++++
 .../patches-3.18/180-kirkwood-ethernetn.patch      | 17 +++++++++++
 2 files changed, 50 insertions(+)
 create mode 100644 target/linux/kirkwood/patches-3.14/180-kirkwood-ethernetn.patch
 create mode 100644 target/linux/kirkwood/patches-3.18/180-kirkwood-ethernetn.patch

diff --git a/target/linux/kirkwood/patches-3.14/180-kirkwood-ethernetn.patch b/target/linux/kirkwood/patches-3.14/180-kirkwood-ethernetn.patch
new file mode 100644
index 0000000..137fc98
--- /dev/null
+++ b/target/linux/kirkwood/patches-3.14/180-kirkwood-ethernetn.patch
@@ -0,0 +1,33 @@
+--- a/arch/arm/boot/dts/kirkwood.dtsi
++++ b/arch/arm/boot/dts/kirkwood.dtsi
+@@ -22,8 +22,10 @@
+ 	};
+ 
+ 	aliases {
+-	       gpio0 = &gpio0;
+-	       gpio1 = &gpio1;
++		gpio0 = &gpio0;
++		gpio1 = &gpio1;
++		ethernet0 = &eth0port;
++		ethernet1 = &eth1port;
+ 	};
+ 
+ 	mbus {
+@@ -242,7 +244,7 @@
+ 			marvell,tx-checksum-limit = <1600>;
+ 			status = "disabled";
+ 
+-			ethernet0-port at 0 {
++			eth0port: ethernet0-port at 0 {
+ 				compatible = "marvell,kirkwood-eth-port";
+ 				reg = <0>;
+ 				interrupts = <11>;
+@@ -273,7 +275,7 @@
+ 			marvell,tx-checksum-limit = <1600>;
+ 			status = "disabled";
+ 
+-			ethernet1-port at 0 {
++			eth1port: ethernet1-port at 0 {
+ 				compatible = "marvell,kirkwood-eth-port";
+ 				reg = <0>;
+ 				interrupts = <15>;
diff --git a/target/linux/kirkwood/patches-3.18/180-kirkwood-ethernetn.patch b/target/linux/kirkwood/patches-3.18/180-kirkwood-ethernetn.patch
new file mode 100644
index 0000000..93608c4
--- /dev/null
+++ b/target/linux/kirkwood/patches-3.18/180-kirkwood-ethernetn.patch
@@ -0,0 +1,17 @@
+--- a/arch/arm/boot/dts/kirkwood.dtsi
++++ b/arch/arm/boot/dts/kirkwood.dtsi
+@@ -22,9 +22,11 @@
+ 	};
+ 
+ 	aliases {
+-	       gpio0 = &gpio0;
+-	       gpio1 = &gpio1;
+-	       i2c0 = &i2c0;
++		gpio0 = &gpio0;
++		gpio1 = &gpio1;
++		i2c0 = &i2c0;
++		ethernet0 = &eth0port;
++		ethernet1 = &eth1port;
+ 	};
+ 
+ 	mbus {
-- 
1.9.3
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From nlhintz at hotmail.com  Sat Jan 24 00:01:12 2015
From: nlhintz at hotmail.com (Nathan Hintz)
Date: Fri, 23 Jan 2015 21:01:12 -0800
Subject: [OpenWrt-Devel] [PATCH] hostapd: add dependency to hostapd-common
Message-ID: <BLU436-SMTP205BA49441EDE867D4AF765AC370@phx.gbl>

'hostapd-common' is needed by all of the variants for wifi to function
correctly (a number of the target profiles simply select 'wpad-mini').

Signed-off-by: Nathan Hintz <nlhintz at hotmail.com>
---
 package/network/services/hostapd/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile
index 6bdf534..49bcb15 100644
--- a/package/network/services/hostapd/Makefile
+++ b/package/network/services/hostapd/Makefile
@@ -101,7 +101,7 @@ define Package/hostapd/Default
   CATEGORY:=Network
   TITLE:=IEEE 802.1x Authenticator
   URL:=http://hostap.epitest.fi/
-  DEPENDS:=$(DRV_DEPENDS) +libubus
+  DEPENDS:=$(DRV_DEPENDS) +hostapd-common +libubus
 endef
 
 define Package/hostapd
@@ -142,13 +142,14 @@ define Package/wpad/Default
   SECTION:=net
   CATEGORY:=Network
   TITLE:=IEEE 802.1x Authenticator/Supplicant
+  DEPENDS:=$(DRV_DEPENDS) +hostapd-common +libubus
   URL:=http://hostap.epitest.fi/
 endef
 
 define Package/wpad
 $(call Package/wpad/Default)
   TITLE+= (full)
-  DEPENDS:=$(DRV_DEPENDS) +WPA_SUPPLICANT_OPENSSL:libopenssl +libubus
+  DEPENDS+=+WPA_SUPPLICANT_OPENSSL:libopenssl
   VARIANT:=wpad-full
 endef
 
@@ -160,7 +161,6 @@ endef
 define Package/wpad-mini
 $(call Package/wpad/Default)
   TITLE+= (WPA-PSK only)
-  DEPENDS:=$(DRV_DEPENDS) +libubus
   VARIANT:=wpad-mini
 endef
 
-- 
1.9.3
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From nlhintz at hotmail.com  Sat Jan 24 00:02:41 2015
From: nlhintz at hotmail.com (Nathan Hintz)
Date: Fri, 23 Jan 2015 21:02:41 -0800
Subject: [OpenWrt-Devel] [PATCH] mac80211: update libertas_sdio package name
Message-ID: <BLU436-SMTP6518B6AB9D1A2ECE5896F0AC370@phx.gbl>

Change the name of the package to match the module name so it matches the
package name referenced by the Kirkwood (Guruplug) profile.

Signed-off-by: Nathan Hintz <nlhintz at hotmail.com>
---
 package/kernel/mac80211/Makefile | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile
index df245d0..814eb1c 100644
--- a/package/kernel/mac80211/Makefile
+++ b/package/kernel/mac80211/Makefile
@@ -23,7 +23,7 @@ PKG_BUILD_PARALLEL:=1
 PKG_MAINTAINER:=Felix Fietkau <nbd at openwrt.org>
 
 PKG_DRIVERS = \
-	adm8211 ath5k libertas-usb libertas-sd p54-common p54-pci p54-usb p54-spi \
+	adm8211 ath5k libertas-usb libertas-sdio p54-common p54-pci p54-usb p54-spi \
 	rt2x00-lib rt2x00-pci rt2x00-usb rt2800-lib rt2400-pci rt2500-pci \
 	rt2500-usb rt61-pci rt73-usb rt2800-mmio rt2800-pci rt2800-usb rt2800-soc \
 	rtl8180 rtl8187 zd1211rw mac80211-hwsim carl9170 b43 b43legacy \
@@ -679,7 +679,7 @@ define KernelPackage/libertas-usb
   AUTOLOAD:=$(call AutoProbe,libertas usb8xxx)
 endef
 
-define KernelPackage/libertas-sd
+define KernelPackage/libertas-sdio
   $(call KernelPackage/mac80211/Default)
   DEPENDS+= +kmod-cfg80211 +kmod-lib80211 +kmod-mmc + at DRIVER_WEXT_SUPPORT @!TARGET_uml
   TITLE:=Marvell 88W8686 Wireless Driver
@@ -1606,7 +1606,7 @@ config-$(call config_package,net-hermes-pcmcia) += PCMCIA_HERMES
 config-y += HERMES_PRISM
 
 config-$(call config_package,adm8211) += ADM8211
-config-$(call config_package,libertas-sd) += LIBERTAS LIBERTAS_SDIO
+config-$(call config_package,libertas-sdio) += LIBERTAS LIBERTAS_SDIO
 config-$(call config_package,libertas-usb) += LIBERTAS LIBERTAS_USB
 config-$(call config_package,mwl8k) += MWL8K
 config-$(call config_package,mwifiex-pcie) += MWIFIEX MWIFIEX_PCIE
@@ -1721,7 +1721,7 @@ define KernelPackage/libertas-usb/install
 		$(1)/lib/firmware/libertas/
 endef
 
-define KernelPackage/libertas-sd/install
+define KernelPackage/libertas-sdio/install
 	$(INSTALL_DIR) $(1)/lib/firmware/libertas
 	$(INSTALL_DATA) \
 		$(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/libertas/sd8385_helper.bin \
@@ -1981,7 +1981,7 @@ $(eval $(call KernelPackage,adm8211))
 $(eval $(call KernelPackage,ath5k))
 $(eval $(call KernelPackage,lib80211))
 $(eval $(call KernelPackage,libertas-usb))
-$(eval $(call KernelPackage,libertas-sd))
+$(eval $(call KernelPackage,libertas-sdio))
 $(eval $(call KernelPackage,cfg80211))
 $(eval $(call KernelPackage,mac80211))
 $(eval $(call KernelPackage,p54-common))
-- 
1.9.3
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From nlhintz at hotmail.com  Sat Jan 24 00:04:09 2015
From: nlhintz at hotmail.com (Nathan Hintz)
Date: Fri, 23 Jan 2015 21:04:09 -0800
Subject: [OpenWrt-Devel] [PATCH] mac80211: fix fallback to macaddr
Message-ID: <BLU436-SMTP16850921C09105C382CE535AC370@phx.gbl>

If '/sys/class/ieee80211/phyN' is not a symlink, the call to readlink
produces either an empty path (if /sys/class/ieee80211/phyN/device doesn't
exist) or a path that begins with '/sys/class/ieee80211' (which does not
work with the subsequent line to strip '/sys/devices' from the beginning of
the path).  Modify the checks to detect these conditions, and fallback to
using the macaddr.

Signed-off-by: Nathan Hintz <nlhintz at hotmail.com>
---
 package/kernel/mac80211/files/lib/wifi/mac80211.sh | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/package/kernel/mac80211/files/lib/wifi/mac80211.sh b/package/kernel/mac80211/files/lib/wifi/mac80211.sh
index 0b662eb..a7c4d2d 100644
--- a/package/kernel/mac80211/files/lib/wifi/mac80211.sh
+++ b/package/kernel/mac80211/files/lib/wifi/mac80211.sh
@@ -94,8 +94,12 @@ detect_mac80211() {
 
 		[ -n $htmode ] && append ht_capab "	option htmode	$htmode" "$N"
 
-		if [ -x /usr/bin/readlink ]; then
+		if [ -x /usr/bin/readlink -a -h /sys/class/ieee80211/${dev} ]; then
 			path="$(readlink -f /sys/class/ieee80211/${dev}/device)"
+		else
+			path=""
+		fi
+		if [ -n "$path" ]; then
 			path="${path##/sys/devices/}"
 			dev_id="	option path	'$path'"
 		else
-- 
1.9.3
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From nlhintz at hotmail.com  Sat Jan 24 00:05:50 2015
From: nlhintz at hotmail.com (Nathan Hintz)
Date: Fri, 23 Jan 2015 21:05:50 -0800
Subject: [OpenWrt-Devel] [PATCH] libertas: configure sysfs symlinks
Message-ID: <BLU436-SMTP126042265FBE67EB826EDD2AC370@phx.gbl>

Update the libertas driver to configure symlinks in sysfs.  This enables
the driver to be handled correctly by the mac80211/netifd/hostapd scripts.
With this patch, the wireless interface is functional on Guruplug Server Plus.

Signed-off-by: Nathan Hintz <nlhintz at hotmail.com>
---
 .../801-libertas-configure-sysfs-links.patch        | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 package/kernel/mac80211/patches/801-libertas-configure-sysfs-links.patch

diff --git a/package/kernel/mac80211/patches/801-libertas-configure-sysfs-links.patch b/package/kernel/mac80211/patches/801-libertas-configure-sysfs-links.patch
new file mode 100644
index 0000000..fe69568
--- /dev/null
+++ b/package/kernel/mac80211/patches/801-libertas-configure-sysfs-links.patch
@@ -0,0 +1,21 @@
+--- a/drivers/net/wireless/libertas/cfg.c
++++ b/drivers/net/wireless/libertas/cfg.c
+@@ -2084,6 +2084,8 @@ struct wireless_dev *lbs_cfg_alloc(struc
+ 		goto err_wiphy_new;
+ 	}
+ 
++	set_wiphy_dev(wdev->wiphy, dev);
++
+ 	lbs_deb_leave(LBS_DEB_CFG80211);
+ 	return wdev;
+ 
+--- a/drivers/net/wireless/libertas/main.c
++++ a/drivers/net/wireless/libertas/main.c
+@@ -987,6 +987,7 @@ struct lbs_private *lbs_add_card(void *c
+ 		goto err_adapter;
+ 	}
+ 
++	dev_net_set(dev, wiphy_net(wdev->wiphy));
+ 	dev->ieee80211_ptr = wdev;
+ 	dev->ml_priv = priv;
+ 	SET_NETDEV_DEV(dev, dmdev);
-- 
1.9.3
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From nlhintz at hotmail.com  Sat Jan 24 00:07:05 2015
From: nlhintz at hotmail.com (Nathan Hintz)
Date: Fri, 23 Jan 2015 21:07:05 -0800
Subject: [OpenWrt-Devel] [PATCH] libertas: set wireless macaddr
Message-ID: <BLU436-SMTP2472A1D81ED0F1FC70E164BAC370@phx.gbl>

Update the wireless macaddr with the value retrieved from the H/W.

Signed-off-by: Nathan Hintz <nlhintz at hotmail.com>
---
 .../mac80211/patches/802-libertas-set-wireless-macaddr.patch  | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 package/kernel/mac80211/patches/802-libertas-set-wireless-macaddr.patch

diff --git a/package/kernel/mac80211/patches/802-libertas-set-wireless-macaddr.patch b/package/kernel/mac80211/patches/802-libertas-set-wireless-macaddr.patch
new file mode 100644
index 0000000..3eaf416
--- /dev/null
+++ b/package/kernel/mac80211/patches/802-libertas-set-wireless-macaddr.patch
@@ -0,0 +1,11 @@
+--- a/drivers/net/wireless/libertas/cfg.c
++++ b/drivers/net/wireless/libertas/cfg.c
+@@ -2172,6 +2172,8 @@ int lbs_cfg_register(struct lbs_private
+ 	wdev->wiphy->n_cipher_suites = ARRAY_SIZE(cipher_suites);
+ 	wdev->wiphy->reg_notifier = lbs_reg_notifier;
+ 
++	memcpy(wdev->wiphy->perm_addr, priv->current_addr, ETH_ALEN);
++
+ 	ret = wiphy_register(wdev->wiphy);
+ 	if (ret < 0)
+ 		pr_err("cannot register wiphy device\n");
-- 
1.9.3
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From nlhintz at hotmail.com  Sat Jan 24 00:20:01 2015
From: nlhintz at hotmail.com (Nathan Hintz)
Date: Fri, 23 Jan 2015 21:20:01 -0800
Subject: [OpenWrt-Devel] [PATCH] kirkwood: add wpad-mini to guruplug profile
Message-ID: <BLU436-SMTP250593FA6ED9D8314521054AC370@phx.gbl>

Signed-off-by: Nathan Hintz <nlhintz at hotmail.com>
---
 target/linux/kirkwood/profiles/120-plug.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/kirkwood/profiles/120-plug.mk b/target/linux/kirkwood/profiles/120-plug.mk
index 473955d..8b2a016 100644
--- a/target/linux/kirkwood/profiles/120-plug.mk
+++ b/target/linux/kirkwood/profiles/120-plug.mk
@@ -50,7 +50,7 @@ define Profile/Guruplug-Server-Plus
 	kmod-of-i2c kmod-i2c-core kmod-i2c-mv64xxx \
 	kmod-ata-core kmod-ata-marvell-sata \
 	kmod-btmrvl kmod-btmrvl-sdio kmod-libertas kmod-libertas-sdio \
-	uboot-envtools
+	uboot-envtools wpad-mini
 endef
 
 define Profile/Guruplug-Server-Plus/Description
-- 
1.9.3
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From raven at themaw.net  Sat Jan 24 04:37:18 2015
From: raven at themaw.net (Ian Kent)
Date: Sat, 24 Jan 2015 17:37:18 +0800
Subject: [OpenWrt-Devel] Announcement of mac80211 driver support for
 Marvell 88W8864 chip
In-Reply-To: <689C75E0D210324F8BE88961219F68163F45244A2B@SC-VEXCH2.marvell.com>
References: <689C75E0D210324F8BE88961219F68163F44ECED4A@SC-VEXCH2.marvell.com>
 <20141231185440.GC2681@nanopsycho.orion>
 <689C75E0D210324F8BE88961219F68163F45160679@SC-VEXCH2.marvell.com>
 <1421116872.2707.18.camel@pluto.fritz.box>
 <689C75E0D210324F8BE88961219F68163F45244A2B@SC-VEXCH2.marvell.com>
Message-ID: <1422092238.2641.24.camel@pluto.fritz.box>

On Mon, 2015-01-12 at 19:03 -0800, David Lin wrote:
> Hi Ian,
> 
> 	1. I will take off these additional blank lines.
> 	2. I work for problems reported from community. If you do find problems for the driver, please let me know.

Hi David,

I was disappointed to find that client mode wireless in the driver isn't
supported yet.

I logged an issue for it at https://github.com/kaloz/mwlwifi/issues/13
along with the kernel WARN() info.

As I say in the issue I believe that client mode is quite important for
the coming WRT1200AC, assuming the wireless on that device is to be
supported by this driver.

I've been looking at the driver source and I'm a bit puzzled about the
rate and ht_sig2 fields in the receive descriptor structure. There's no
documentation (that I can locate) on the interface to the wireless
device so I can't refer to it.

It appears the rate field isn't just a rate or an index into the rate
table or just an MCS rate either. So can you describe what the encoding
is please?

The ht_sig2 field has a describing comment of "as the name suggests" but
HT SIG 2 is 24 bits not 16 and even if the CRC and tail fields were
discarded, I see there's more than the remaining 10 bits being used in
the field. So can you describe the encoding in this field too please?

The other puzzling thing is the handling of VHT modes.
I don't see anything in the receive descriptor for that case.
It looks like the wireless device handles the rate (along with a lot
more) but how does the driver find out the VHT information that it may
need for informational and reporting purposes (up to the mac80211
layer).

Could you help with this please.

These questions may sound like I don't know low level wireless concepts
and that would be correct, but I'm slowly working on that, so sorry for
the possibly silly questions.

Ian
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From christian.schoenebeck at gmail.com  Sat Jan 24 06:14:11 2015
From: christian.schoenebeck at gmail.com (Christian Schoenebeck)
Date: Sat, 24 Jan 2015 12:14:11 +0100
Subject: [OpenWrt-Devel] [for 14.07] ca-certificates: update to 20141019
Message-ID: <54C37E83.5000604@gmail.com>

update to version 20141019 and
create symbolic link for certificate hashes during installation

Signed-off-by: Christian Schoenebeck <christian.schoenebeck at gmail.com>
---
 package/system/ca-certificates/Makefile | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/package/system/ca-certificates/Makefile b/package/system/ca-certificates/Makefile
index 7f38c86..0caf027 100644
--- a/package/system/ca-certificates/Makefile
+++ b/package/system/ca-certificates/Makefile
@@ -7,12 +7,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ca-certificates
-PKG_VERSION:=20140325
+PKG_VERSION:=20141019
 
 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.xz
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/c/ca-certificates
-PKG_MD5SUM:=0436aba482091da310bd762e1deca8b4
+PKG_MD5SUM:=f619282081c8bfc65ea64c37fa5285ed
 
 PKG_INSTALL:=1
 
@@ -34,6 +34,15 @@ endef
 define Package/ca-certificates/install
 	$(INSTALL_DIR) $(1)/etc/ssl/certs
 	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/ca-certificates/*/*.crt $(1)/etc/ssl/certs/
+
+	for CERTFILE in `ls -1 $(1)/etc/ssl/certs`; do \
+		HASH=`openssl x509 -hash -noout -in $(1)/etc/ssl/certs/$$$$CERTFILE` ; \
+		SUFFIX=0 ; \
+		while [ -h "$(1)/etc/ssl/certs/$$$$HASH.$$$$SUFFIX" ]; do \
+			let "SUFFIX += 1" ; \
+		done ; \
+		ln -s "$$$$CERTFILE" "$(1)/etc/ssl/certs/$$$$HASH.$$$$SUFFIX" ; \
+	done
 endef
 
 $(eval $(call BuildPackage,ca-certificates))
-- 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From daniel at makrotopia.org  Sat Jan 24 06:25:41 2015
From: daniel at makrotopia.org (Daniel Golle)
Date: Sat, 24 Jan 2015 12:25:41 +0100
Subject: [OpenWrt-Devel] [PATCH] kirkwood: include kernel images and DTB
 in rootfs
Message-ID: <20150124112541.GB1097@makrotopia.org>

Hi Nathan,

I don't believe that files inside UBIFS rootfs is the right approach for
kernel and dtb. Given that the bootloader already supports UBI, why not
use use a UBI volume instead?
While U-Boot does support reading files from UBIFS, squashfs inside UBI
volumes are not supported (squashfs inside read-only UBI volume is
desirable if you like having the features depending on ROM+overlay such as
failsafe and factory restore similar to other hardware targets).

The Kirkwood target is part of OpenWrt for a long while already, longer
than proper UBI support is around and long before wasting any thoughts
about rootfs_overlay on NAND.
Our current "state of the art" is to have squashfs read-only rootfs, just
like on NOR devices, using UBIFS as rootfs_overlay (instead of JFFS2 on
NOR). For bootloaders supporting UBI it makes sense to store kernel (and
DTB) in a UBI volume and load them from there.
Take a look at SysupgradeNAND and UbinizeImage targets in image.mk for
examples.


Cheers


Daniel



On Fri, Jan 23, 2015 at 08:57:57PM -0800, Nathan Hintz wrote:
> For SheevaPlug and GuruPlug devices.
> 
> Signed-off-by: Nathan Hintz <nlhintz at hotmail.com>
> ---
>  target/linux/kirkwood/profiles/120-plug.mk | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/target/linux/kirkwood/profiles/120-plug.mk b/target/linux/kirkwood/profiles/120-plug.mk
> index dcbda71..473955d 100644
> --- a/target/linux/kirkwood/profiles/120-plug.mk
> +++ b/target/linux/kirkwood/profiles/120-plug.mk
> @@ -7,6 +7,7 @@
>  
>  define Profile/SHEEVAPLUG
>    NAME:=Globalscale Technologies SheevaPlug
> +  DEPENDS:=+ at TARGET_ROOTFS_INCLUDE_KERNEL + at TARGET_ROOTFS_INCLUDE_ZIMAGE + at TARGET_ROOTFS_INCLUDE_DTB
>    PACKAGES:= \
>  	kmod-mmc kmod-mvsdio kmod-usb2 kmod-usb-storage \
>  	kmod-of-i2c kmod-i2c-core kmod-i2c-mv64xxx \
> @@ -24,6 +25,7 @@ $(eval $(call Profile,SHEEVAPLUG))
>  
>  define Profile/SHEEVAPLUGSATA
>    NAME:=Globalscale Technologies eSATA SheevaPlug
> +  DEPENDS:=+ at TARGET_ROOTFS_INCLUDE_KERNEL + at TARGET_ROOTFS_INCLUDE_ZIMAGE + at TARGET_ROOTFS_INCLUDE_DTB
>    PACKAGES:= \
>  	kmod-mmc kmod-mvsdio kmod-usb2 kmod-usb-storage \
>  	kmod-of-i2c kmod-i2c-core kmod-i2c-mv64xxx \
> @@ -42,6 +44,7 @@ $(eval $(call Profile,SHEEVAPLUGSATA))
>  
>  define Profile/Guruplug-Server-Plus
>    NAME:=Globalscale Technologies Guruplug Server Plus
> +  DEPENDS:=+ at TARGET_ROOTFS_INCLUDE_KERNEL + at TARGET_ROOTFS_INCLUDE_ZIMAGE + at TARGET_ROOTFS_INCLUDE_DTB
>    PACKAGES:= \
>  	kmod-mmc kmod-mvsdio kmod-usb2 kmod-usb-storage \
>  	kmod-of-i2c kmod-i2c-core kmod-i2c-mv64xxx \
> -- 
> 1.9.3
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From daniel.schwierzeck at gmail.com  Sat Jan 24 08:12:34 2015
From: daniel.schwierzeck at gmail.com (Daniel Schwierzeck)
Date: Sat, 24 Jan 2015 14:12:34 +0100
Subject: [OpenWrt-Devel] uboot-lantiq cgu settings for ramboot image
In-Reply-To: <1421961820.6028.14.camel@merveille.lan>
References: <1421664368.25187.18.camel@merveille.lan>	
 <54BCEFD1.6010902@conorogorman.net>	
 <1421678697.25187.27.camel@merveille.lan>	
 <CACUy__U3gJ-M6Hz7A_GTewGaTJ+FK4fiZXANbxhLmmXt_0SM=g@mail.gmail.com>	
 <1421691666.25187.46.camel@merveille.lan>	
 <1421710757.25187.55.camel@merveille.lan>	
 <1421753325.25187.58.camel@merveille.lan>	
 <CACUy__WQYvxmH1vD5S3oR4BnGT9dStUe86aLDAZTJZf8B61P2A@mail.gmail.com>	
 <1421765096.25187.77.camel@merveille.lan>	
 <CACUy__Vf8w22x2MSjv8xShA6HaXA+LXTzmxs5hYLxieK6a7s+A@mail.gmail.com>	
 <54C0BDDE.1020806@openwrt.org> <1421961820.6028.14.camel@merveille.lan>
Message-ID: <54C39A42.3070108@gmail.com>



Am 22.01.2015 um 22:23 schrieb Ben Mulvihill:
> On Thu, 2015-01-22 at 10:07 +0100, John Crispin wrote:
>> is this patch correct and should be merged or is it a RFC ?
>>
>> http://patchwork.ozlabs.org/patch/431024/
> 
> Daniel found a mistake in the current code. I found another.
> This fixes both, so I guess it is a patch rather than an RFC.
> I understand it to be correct, but the authoritative answer as
> to whether it is indeed correct should really come from
> Daniel ;-) In any case Daniel has already committed it to
> uboot-lantiq github.
> 
> Hope this is some help. Daniel?
> 

I'm going to integrate that patch in the openwrt/14.04 branch. If you
have a working patch for the BT Home Hub; I'd like to integrate it too.
After that we can refresh the patches in the OpenWRT tree.

-- 
- Daniel
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From ben.mulvihill at gmail.com  Sat Jan 24 08:48:48 2015
From: ben.mulvihill at gmail.com (Ben Mulvihill)
Date: Sat, 24 Jan 2015 14:48:48 +0100
Subject: [OpenWrt-Devel] uboot-lantiq cgu settings for ramboot image
In-Reply-To: <54C39A42.3070108@gmail.com>
References: <1421664368.25187.18.camel@merveille.lan>
 <54BCEFD1.6010902@conorogorman.net>
 <1421678697.25187.27.camel@merveille.lan>
 <CACUy__U3gJ-M6Hz7A_GTewGaTJ+FK4fiZXANbxhLmmXt_0SM=g@mail.gmail.com>
 <1421691666.25187.46.camel@merveille.lan>
 <1421710757.25187.55.camel@merveille.lan>
 <1421753325.25187.58.camel@merveille.lan>
 <CACUy__WQYvxmH1vD5S3oR4BnGT9dStUe86aLDAZTJZf8B61P2A@mail.gmail.com>
 <1421765096.25187.77.camel@merveille.lan>
 <CACUy__Vf8w22x2MSjv8xShA6HaXA+LXTzmxs5hYLxieK6a7s+A@mail.gmail.com>
 <54C0BDDE.1020806@openwrt.org> <1421961820.6028.14.camel@merveille.lan>
 <54C39A42.3070108@gmail.com>
Message-ID: <1422107328.5067.6.camel@merveille.lan>


> 
> I'm going to integrate that patch in the openwrt/14.04 branch. If you
> have a working patch for the BT Home Hub; I'd like to integrate it too.
> After that we can refresh the patches in the OpenWRT tree.
> 
Hi Daniel,

Not yet I'm afraid. I still have some problems with ethernet and the 
nand driver. Both are working on an older version based I think on 
u-boot 2010.03, and I'm hopeful that by comparing the two I'll be
able to work out what's wrong. But it might take a while.

Ben
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From yszhou4tech at gmail.com  Sat Jan 24 10:07:49 2015
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Sat, 24 Jan 2015 23:07:49 +0800
Subject: [OpenWrt-Devel] [PATCH 0/4] uci: a few enhancements.
Message-ID: <1422112073-24903-1-git-send-email-yszhou4tech@gmail.com>

This cover letter is mainly for noting that the series is for UCI repo.

Yousong Zhou (4):
  tests: add test cases for showing nonexistent section and option.
  cli: properly unload package before quit.
  cli: enhance "uci show" command on nonexistent sections and options.
  Add a few notes on the return value of uci_lookup_ptr().

 cli.c                 |   14 ++++++++------
 list.c                |    5 +++--
 test/tests.d/050_show |    3 +++
 test/tests.sh         |    2 +-
 uci.h                 |    7 +++++++
 5 files changed, 22 insertions(+), 9 deletions(-)

-- 
1.7.10.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From yszhou4tech at gmail.com  Sat Jan 24 10:07:50 2015
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Sat, 24 Jan 2015 23:07:50 +0800
Subject: [OpenWrt-Devel] [PATCH 1/4] tests: add test cases for showing
	nonexistent section and option.
In-Reply-To: <1422112073-24903-1-git-send-email-yszhou4tech@gmail.com>
References: <1422112073-24903-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <1422112073-24903-2-git-send-email-yszhou4tech@gmail.com>

Also fix the false error message about absence of uci-static.

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 test/tests.d/050_show |    3 +++
 test/tests.sh         |    2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/test/tests.d/050_show b/test/tests.d/050_show
index ce0eafc..161bae0 100644
--- a/test/tests.d/050_show
+++ b/test/tests.d/050_show
@@ -8,6 +8,9 @@ test_get_parsing()
 	assertFailWithNoReturn "${UCI_Q} show test.section.opt.val."
 	assertFailWithNoReturn "${UCI_Q} show test.section.opt.val.qsdf.qsd"
 	assertFailWithNoReturn "${UCI_Q} show test.section.opt.valqsqsd"
+	assertFailWithNoReturn "${UCI_Q} show test.nilsection"
+	assertFailWithNoReturn "${UCI_Q} show test.nilsection.nilopt"
+	assertFailWithNoReturn "${UCI_Q} show test.section.nilopt"
 }
 
 prepare_get_parsing_multiline() {
diff --git a/test/tests.sh b/test/tests.sh
index 0afccf0..ee72c31 100644
--- a/test/tests.sh
+++ b/test/tests.sh
@@ -8,7 +8,7 @@ FULL_SUITE=${TESTS_DIR}"/full_suite.sh"
 
 UCI_BIN="../uci"
 [ -x $UCI_BIN ] || {
-	echo "uci-static is not present."
+	echo "uci is not present." >&2
 	return 1
 }
 UCI="${UCI_BIN} -c ${CONFIG_DIR} -p ${CHANGES_DIR}"
-- 
1.7.10.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From yszhou4tech at gmail.com  Sat Jan 24 10:07:51 2015
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Sat, 24 Jan 2015 23:07:51 +0800
Subject: [OpenWrt-Devel] [PATCH 2/4] cli: properly unload package before
	quit.
In-Reply-To: <1422112073-24903-1-git-send-email-yszhou4tech@gmail.com>
References: <1422112073-24903-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <1422112073-24903-3-git-send-email-yszhou4tech@gmail.com>


Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 cli.c |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/cli.c b/cli.c
index 2ee1e36..8f32255 100644
--- a/cli.c
+++ b/cli.c
@@ -286,7 +286,7 @@ static int package_cmd(int cmd, char *tuple)
 {
 	struct uci_element *e = NULL;
 	struct uci_ptr ptr;
-	int ret = 0;
+	int ret = 1;
 
 	if (uci_lookup_ptr(ctx, &ptr, tuple, true) != UCI_OK) {
 		cli_perror();
@@ -299,11 +299,12 @@ static int package_cmd(int cmd, char *tuple)
 		uci_show_changes(ptr.p);
 		break;
 	case CMD_COMMIT:
-		if (flags & CLI_FLAG_NOCOMMIT)
-			return 0;
+		if (flags & CLI_FLAG_NOCOMMIT) {
+			ret = 0;
+			goto out;
+		}
 		if (uci_commit(ctx, &ptr.p, false) != UCI_OK) {
 			cli_perror();
-			ret = 1;
 		}
 		break;
 	case CMD_EXPORT:
@@ -313,7 +314,6 @@ static int package_cmd(int cmd, char *tuple)
 		if (!(ptr.flags & UCI_LOOKUP_COMPLETE)) {
 			ctx->err = UCI_ERR_NOTFOUND;
 			cli_perror();
-			ret = 1;
 		}
 		switch(e->type) {
 			case UCI_TYPE_PACKAGE:
@@ -327,11 +327,12 @@ static int package_cmd(int cmd, char *tuple)
 				break;
 			default:
 				/* should not happen */
-				return 1;
+				goto out;
 		}
 		break;
 	}
 
+out:
 	if (ptr.p)
 		uci_unload(ctx, ptr.p);
 	return ret;
-- 
1.7.10.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From yszhou4tech at gmail.com  Sat Jan 24 10:07:52 2015
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Sat, 24 Jan 2015 23:07:52 +0800
Subject: [OpenWrt-Devel] [PATCH 3/4] cli: enhance "uci show" command on
	nonexistent sections and options.
In-Reply-To: <1422112073-24903-1-git-send-email-yszhou4tech@gmail.com>
References: <1422112073-24903-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <1422112073-24903-4-git-send-email-yszhou4tech@gmail.com>

When doing "uci show network.nilsection", the current behaviour is that
uci will emit a error message complaining "Entry not found", then
continue to show all content of the package network itself.  This is
couter-intuition.

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 cli.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/cli.c b/cli.c
index 8f32255..b647f77 100644
--- a/cli.c
+++ b/cli.c
@@ -314,6 +314,7 @@ static int package_cmd(int cmd, char *tuple)
 		if (!(ptr.flags & UCI_LOOKUP_COMPLETE)) {
 			ctx->err = UCI_ERR_NOTFOUND;
 			cli_perror();
+			goto out;
 		}
 		switch(e->type) {
 			case UCI_TYPE_PACKAGE:
-- 
1.7.10.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From yszhou4tech at gmail.com  Sat Jan 24 10:07:53 2015
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Sat, 24 Jan 2015 23:07:53 +0800
Subject: [OpenWrt-Devel] [PATCH 4/4] Add a few notes on the return value of
	uci_lookup_ptr().
In-Reply-To: <1422112073-24903-1-git-send-email-yszhou4tech@gmail.com>
References: <1422112073-24903-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <1422112073-24903-5-git-send-email-yszhou4tech@gmail.com>

While at it, use UCI_OK instead of literal integer 0 for return value of
uci_lookup_ptr().

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 list.c |    5 +++--
 uci.h  |    7 +++++++
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/list.c b/list.c
index 0d00f81..321861c 100644
--- a/list.c
+++ b/list.c
@@ -431,11 +431,12 @@ uci_lookup_ptr(struct uci_context *ctx, struct uci_ptr *ptr, char *str, bool ext
 complete:
 	ptr->flags |= UCI_LOOKUP_COMPLETE;
 abort:
-	return 0;
+	return UCI_OK;
 
 notfound:
 	UCI_THROW(ctx, UCI_ERR_NOTFOUND);
-	return 0;
+	/* not a chance here */
+	return UCI_ERR_NOTFOUND;
 }
 
 __private struct uci_element *
diff --git a/uci.h b/uci.h
index b31d007..abba660 100644
--- a/uci.h
+++ b/uci.h
@@ -154,6 +154,13 @@ extern int uci_unload(struct uci_context *ctx, struct uci_package *p);
  * Note: uci_lookup_ptr will automatically load a config package if necessary
  * @str must not be constant, as it will be modified and used for the strings inside @ptr,
  * thus it must also be available as long as @ptr is in use.
+ *
+ * This function returns UCI_ERR_NOTFOUND if the package specified in the tuple
+ * string cannot be found.  Otherwise it will return UCI_OK.
+ *
+ * Note that failures in looking up other parts, if they are also specfied,
+ * including section and option, will also have a return value UCI_OK but with
+ * ptr->flags * UCI_LOOKUP_COMPLETE not set.
  */
 extern int uci_lookup_ptr(struct uci_context *ctx, struct uci_ptr *ptr, char *str, bool extended);
 
-- 
1.7.10.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From nbd at openwrt.org  Sat Jan 24 14:30:13 2015
From: nbd at openwrt.org (Felix Fietkau)
Date: Sat, 24 Jan 2015 20:30:13 +0100
Subject: [OpenWrt-Devel] [PATCH] fix typo in netifd.sh
In-Reply-To: <20150120184414.711139fe@samsung>
References: <20150120184414.711139fe@samsung>
Message-ID: <54C3F2C5.5060601@openwrt.org>

On 2015-01-20 18:44, Cezary Jackiewicz wrote:
> $ht variable is not passed. $htmode is.
> 
> With this, wpa_supplicant-phy0.conf contains htmode line if htmode is set in config.
> 
> Signed-off-by: Cezary Jackiewicz <cezary.jackiewicz at gmail.com>
I have added a proper fix for this issue in r44100

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


From nbd at openwrt.org  Sat Jan 24 14:44:44 2015
From: nbd at openwrt.org (Felix Fietkau)
Date: Sat, 24 Jan 2015 20:44:44 +0100
Subject: [OpenWrt-Devel] [PATCH 0/5] ar8216: Patch series with further
 improvements and new functionality
In-Reply-To: <54C17029.1000706@gmail.com>
References: <54C17029.1000706@gmail.com>
Message-ID: <54C3F62C.8090605@openwrt.org>

On 2015-01-22 22:48, Heiner Kallweit wrote:
> Heiner Kallweit (5):
>   ar8216: fix ATU flushing
>   ar8216: add link change detection for switch ports
>   ar8216: decrease page switch wait time
>   ar8216: add swconfig attribute to display ARL table on AR8327/AR8337
>   ar8216: prefix mii_xxx functions to avoid kernel namespace pollution
Applied, thanks.

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


From nbd at openwrt.org  Sat Jan 24 14:47:18 2015
From: nbd at openwrt.org (Felix Fietkau)
Date: Sat, 24 Jan 2015 20:47:18 +0100
Subject: [OpenWrt-Devel] [PATCH 0/4] uci: a few enhancements.
In-Reply-To: <1422112073-24903-1-git-send-email-yszhou4tech@gmail.com>
References: <1422112073-24903-1-git-send-email-yszhou4tech@gmail.com>
Message-ID: <54C3F6C6.1000509@openwrt.org>

On 2015-01-24 16:07, Yousong Zhou wrote:
> This cover letter is mainly for noting that the series is for UCI repo.
> 
> Yousong Zhou (4):
>   tests: add test cases for showing nonexistent section and option.
>   cli: properly unload package before quit.
>   cli: enhance "uci show" command on nonexistent sections and options.
>   Add a few notes on the return value of uci_lookup_ptr().
Applied, thanks.

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


From mike at flyn.org  Sat Jan 24 15:35:11 2015
From: mike at flyn.org (W. Michael Petullo)
Date: Sat, 24 Jan 2015 15:35:11 -0500
Subject: [OpenWrt-Devel] Status of NFSv4
Message-ID: <20150124203511.GA15113@imp.flyn.org>

What is the status of NFSv4 on Barrier Breaker? I see that the definition
of "KernelPackage/fs-nfs-common-v4" contains "DEPENDS:= @BROKEN".

Is there anything I can do to help? I am the maintainer of OpenWrt's
krb5 package, and I am interested in using Kerberized NFSv4 on OpenWrt.

-- 
Mike

:wq
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From hancockrwd at gmail.com  Sat Jan 24 22:45:50 2015
From: hancockrwd at gmail.com (Robert Hancock)
Date: Sat, 24 Jan 2015 21:45:50 -0600
Subject: [OpenWrt-Devel] [PATCH] mac80211: Add some missing 802.11n
	capabilities to hostapd configuration
Message-ID: <1422157550-5766-1-git-send-email-hancockrwd@gmail.com>

Add some missing 802.11n capabilities to the hostapd ht_capab string when
supported by the hardware: Spatial Multiplexing Power-Save,
Delayed Block Ack, and 7935-byte AMSDUs.

Signed-off-by: Robert Hancock <hancockrwd at gmail.com>
---
 .../kernel/mac80211/files/lib/netifd/wireless/mac80211.sh  | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
index 1a85d15..93da360 100644
--- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
+++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
@@ -42,6 +42,9 @@ drv_mac80211_init_device_config() {
 		greenfield \
 		short_gi_20 \
 		short_gi_40 \
+		smps \
+		delayed_ba \
+		max_amsdu \
 		dsss_cck_40
 }
 
@@ -130,8 +133,11 @@ mac80211_hostapd_setup_base() {
 			greenfield:0 \
 			short_gi_20:1 \
 			short_gi_40:1 \
+			smps:1 \
 			tx_stbc:1 \
 			rx_stbc:3 \
+			delayed_ba:1 \
+			max_amsdu:1 \
 			dsss_cck_40:1
 
 		ht_cap_mask=0
@@ -139,6 +145,8 @@ mac80211_hostapd_setup_base() {
 			ht_cap_mask="$(($ht_cap_mask | $cap))"
 		done
 
+		cap_smps=$((($ht_cap_mask >> 2) & 3))
+
 		cap_rx_stbc=$((($ht_cap_mask >> 8) & 3))
 		[ "$rx_stbc" -lt "$cap_rx_stbc" ] && cap_rx_stbc="$rx_stbc"
 		ht_cap_mask="$(( ($ht_cap_mask & ~(0x300)) | ($cap_rx_stbc << 8) ))"
@@ -152,8 +160,14 @@ mac80211_hostapd_setup_base() {
 			RX-STBC1:0x300:0x100:1 \
 			RX-STBC12:0x300:0x200:1 \
 			RX-STBC123:0x300:0x300:1 \
+			DELAYED-BA:0x400::$delayed_ba \
+			MAX-AMSDU-7935:0x800::$max_amsdu \
 			DSSS_CCK-40:0x1000::$dsss_cck_40
 
+		# SM Power Save: 0=static, 1=dynamic, 3=disabled
+		[ "$smps" = 1 -a "$cap_smps" = 0 ] && ht_capab_flags="$ht_capab_flags[SMPS-STATIC]"
+		[ "$smps" = 1 -a "$cap_smps" = 1 ] && ht_capab_flags="$ht_capab_flags[SMPS-DYNAMIC]"
+
 		ht_capab="$ht_capab$ht_capab_flags"
 		[ -n "$ht_capab" ] && append base_cfg "ht_capab=$ht_capab" "$N"
 	}
-- 
2.1.0
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From nlhintz at hotmail.com  Sun Jan 25 01:21:06 2015
From: nlhintz at hotmail.com (Nathan Hintz)
Date: Sat, 24 Jan 2015 22:21:06 -0800
Subject: [OpenWrt-Devel] [PATCH] kirkwood: include kernel images and DTB
 in rootfs
In-Reply-To: <20150124112541.GB1097@makrotopia.org>
References: <20150124112541.GB1097@makrotopia.org>
Message-ID: <BLU176-W10BE851332E0D40ADC631AC340@phx.gbl>




> Date: Sat, 24 Jan 2015 12:25:41 +0100
> From: daniel at makrotopia.org
> To: openwrt-devel at lists.openwrt.org
> Subject: Re: [OpenWrt-Devel] [PATCH] kirkwood: include kernel images and DTB in rootfs
> 
> Hi Nathan,
> 
> I don't believe that files inside UBIFS rootfs is the right approach for
> kernel and dtb. Given that the bootloader already supports UBI, why not
> use use a UBI volume instead?
> While U-Boot does support reading files from UBIFS, squashfs inside UBI
> volumes are not supported (squashfs inside read-only UBI volume is
> desirable if you like having the features depending on ROM+overlay such as
> failsafe and factory restore similar to other hardware targets).
> 
> The Kirkwood target is part of OpenWrt for a long while already, longer
> than proper UBI support is around and long before wasting any thoughts
> about rootfs_overlay on NAND.
> Our current "state of the art" is to have squashfs read-only rootfs, just
> like on NOR devices, using UBIFS as rootfs_overlay (instead of JFFS2 on
> NOR). For bootloaders supporting UBI it makes sense to store kernel (and
> DTB) in a UBI volume and load them from there.
> Take a look at SysupgradeNAND and UbinizeImage targets in image.mk for
> examples.
> 
> 
> Cheers
> 
> 
> Daniel
> 
> 
Hi Daniel,

What I've been working on lately is to get OpenWrt running on a GuruPlug Server Plus I have 
that has been mostly gathering dust up until now.  I've updated to the latest uboot, patched for
Guruplug in a similar fashion to the Dockstar/IConnect/PogoPlug patches that can be found in
"package/boot/uboot-kirkwood/patches" (but w/o "second_stage_uboot").  All of those devices
have been patched to load the kernel image and DTB from the rootfs (based on the default
environment variables set up in the OpenWrt uboot), and I basically followed that model.  What
I don't understand is how any of those would work out of the box unless you were to specify to
include the kernal image and DTB in the rootfs (which none of them do).  I'm obviously missing
something.  Any ideas?

The change you are suggesting would probably best be addressed by the target maintainer;
but I may experiment with it a bit too.

Thanks for the pointers!

Nathan

> 
> On Fri, Jan 23, 2015 at 08:57:57PM -0800, Nathan Hintz wrote:
> > For SheevaPlug and GuruPlug devices.
> > 
> > Signed-off-by: Nathan Hintz <nlhintz at hotmail.com>
> > ---
> >  target/linux/kirkwood/profiles/120-plug.mk | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/target/linux/kirkwood/profiles/120-plug.mk b/target/linux/kirkwood/profiles/120-plug.mk
> > index dcbda71..473955d 100644
> > --- a/target/linux/kirkwood/profiles/120-plug.mk
> > +++ b/target/linux/kirkwood/profiles/120-plug.mk
> > @@ -7,6 +7,7 @@
> >  
> >  define Profile/SHEEVAPLUG
> >    NAME:=Globalscale Technologies SheevaPlug
> > +  DEPENDS:=+ at TARGET_ROOTFS_INCLUDE_KERNEL + at TARGET_ROOTFS_INCLUDE_ZIMAGE + at TARGET_ROOTFS_INCLUDE_DTB
> >    PACKAGES:= \
> >  	kmod-mmc kmod-mvsdio kmod-usb2 kmod-usb-storage \
> >  	kmod-of-i2c kmod-i2c-core kmod-i2c-mv64xxx \
> > @@ -24,6 +25,7 @@ $(eval $(call Profile,SHEEVAPLUG))
> >  
> >  define Profile/SHEEVAPLUGSATA
> >    NAME:=Globalscale Technologies eSATA SheevaPlug
> > +  DEPENDS:=+ at TARGET_ROOTFS_INCLUDE_KERNEL + at TARGET_ROOTFS_INCLUDE_ZIMAGE + at TARGET_ROOTFS_INCLUDE_DTB
> >    PACKAGES:= \
> >  	kmod-mmc kmod-mvsdio kmod-usb2 kmod-usb-storage \
> >  	kmod-of-i2c kmod-i2c-core kmod-i2c-mv64xxx \
> > @@ -42,6 +44,7 @@ $(eval $(call Profile,SHEEVAPLUGSATA))
> >  
> >  define Profile/Guruplug-Server-Plus
> >    NAME:=Globalscale Technologies Guruplug Server Plus
> > +  DEPENDS:=+ at TARGET_ROOTFS_INCLUDE_KERNEL + at TARGET_ROOTFS_INCLUDE_ZIMAGE + at TARGET_ROOTFS_INCLUDE_DTB
> >    PACKAGES:= \
> >  	kmod-mmc kmod-mvsdio kmod-usb2 kmod-usb-storage \
> >  	kmod-of-i2c kmod-i2c-core kmod-i2c-mv64xxx \
> > -- 
> > 1.9.3
> > _______________________________________________
> > openwrt-devel mailing list
> > openwrt-devel at lists.openwrt.org
> > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150124/40fe07ee/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From ldpinney at gmail.com  Sun Jan 25 04:52:57 2015
From: ldpinney at gmail.com (L. D. Pinney)
Date: Sun, 25 Jan 2015 03:52:57 -0600
Subject: [OpenWrt-Devel] [PATCH] BB : ramips : Backport for Kingston MLWG2
Message-ID: <1422179577-8326-1-git-send-email-ldpinney@gmail.com>

Backport r43990 to Barrier Breaker.

http://wiki.openwrt.org/toh/kingston/mlwg2

Signed-off-by: L. D. Pinney <ldpinney at gmail.com>

 target/linux/ramips/base-files/etc/diag.sh                 |   3 +++
 target/linux/ramips/base-files/etc/uci-defaults/01_leds    |   4 +++
 target/linux/ramips/base-files/etc/uci-defaults/02_network |   4 +++
 target/linux/ramips/base-files/lib/ramips.sh               |   3 +++
 target/linux/ramips/base-files/lib/upgrade/platform.sh     |   1 +
 target/linux/ramips/dts/MLWG2.dts                          | 118 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 target/linux/ramips/image/Makefile                         |   2 ++
 7 files changed, 135 insertions(+)

diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh
index 9ad7ccb..bd3779a 100755
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -76,6 +76,9 @@ get_status_led() {
 	mlw221)
 		status_led="kingston:blue:status"
 		;;
+	mlwg2)
+		status_led="kingston:blue:system"
+		;;
 	mofi3500-3gn)
 		status_led="mofi3500-3gn:green:status"
 		;;
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/01_leds b/target/linux/ramips/base-files/etc/uci-defaults/01_leds
index 2f36bed..f5b5b01 100755
--- a/target/linux/ramips/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ramips/base-files/etc/uci-defaults/01_leds
@@ -117,6 +117,10 @@ case $board in
 		set_wifi_led "kingston:blue:wifi"
 		ucidef_set_led_default "system" "system" "kingston:blue:system" "1"
 		;;
+	mlwg2)
+		set_wifi_led "kingston:blue:wifi"
+		ucidef_set_led_default "system" "system" "kingston:blue:system" "1"
+		;;
 	mofi3500-3gn)
 		set_usb_led "mofi3500-3gn:green:usb"
 		;;
diff --git a/target/linux/ramips/base-files/etc/uci-defaults/02_network b/target/linux/ramips/base-files/etc/uci-defaults/02_network
index 6840fb6..91bedcc 100755
--- a/target/linux/ramips/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ramips/base-files/etc/uci-defaults/02_network
@@ -55,6 +55,10 @@ ramips_setup_interfaces()
                 ucidef_set_interface_lan "eth0.2"
                 ;;
 
+	mlwg2)
+                ucidef_set_interface_lan "eth0.1"
+                ;;
+
 	wl-330n | \
 	wmr300)
 		ucidef_set_interface_lan "eth0.1"
diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh
index d7b5540..fd03423 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -163,6 +163,9 @@ ramips_board_detect() {
 	*"Kingston MLW221")
 		name="mlw221"
 		;;
+	*"Kingston MLWG2")
+		name="mlwg2"
+		;;
 	*"Planex MZK-750DHP")
 		name="mzk-750dhp"
 		;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 407c218..ba69a89 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -56,6 +56,7 @@ platform_check_image() {
 	m3 | \
 	m4 | \
 	mlw221 | \
+	mlwg2 | \
 	mofi3500-3gn | \
 	mpr-a1 | \
 	mpr-a2 | \
diff --git a/target/linux/ramips/dts/MLWG2.dts b/target/linux/ramips/dts/MLWG2.dts
new file mode 100644
index 0000000..a2b0033
--- /dev/null
+++ b/target/linux/ramips/dts/MLWG2.dts
@@ -0,0 +1,118 @@
+/dts-v1/;
+
+/include/ "mt7620n.dtsi"
+
+/ {
+	compatible = "mlwg2", "ralink,mt7620n-soc";
+	model = "Kingston MLWG2";
+
+	palmbus at 10000000 {
+		gpio0: gpio at 600 {
+			status = "okay";
+		};
+
+		gpio2: gpio at 660 {
+			status = "okay";
+		};
+
+		gpio3: gpio at 688 {
+			status = "okay";
+		};
+
+		spi at b00 {
+			status = "okay";
+
+			m25p80 at 0 {
+				#address-cells = <1>;
+				#size-cells = <1>;
+				compatible = "mx25l12805d";
+				reg = <0 0>;
+				linux,modalias = "m25p80";
+				spi-max-frequency = <10000000>;
+
+				partition at 0 {
+					label = "u-boot";
+					reg = <0x0 0x30000>;
+					read-only;
+				};
+
+				partition at 30000 {
+					label = "u-boot-env";
+					reg = <0x30000 0x10000>;
+					read-only;
+				};
+
+				factory: partition at 40000 {
+					label = "factory";
+					reg = <0x40000 0x10000>;
+					read-only;
+				};
+
+				partition at 50000 {
+					label = "firmware";
+					reg = <0x50000 0xf60000>;
+				};
+
+				partition at fb0000 {
+					label = "user-config";
+					reg = <0xfb0000 0x50000>;
+				};
+			};
+		};
+	};
+
+	ehci at 101c0000 {
+		status = "okay";
+	};
+
+	ohci at 101c1000 {
+		status = "okay";
+	};
+
+	ethernet at 10100000 {
+		mtd-mac-address = <&factory 0x4>;
+		ralink,port-map = "wllll";
+	};
+
+	wmac at 10180000 {
+		ralink,mtd-eeprom = <&factory 0>;
+	};
+
+	pinctrl {
+		state_default: pinctrl0 {
+			default {
+				ralink,group = "i2c", "ephy", "wled";
+				ralink,function = "gpio";
+			};
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+		system {
+			label = "kingston:blue:system";
+			gpios = <&gpio2 3 1>;
+		};
+		wifi {
+			label = "kingston:blue:wifi";
+			gpios = <&gpio3 0 1>;
+		};
+	};
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		reset {
+			label = "reset";
+			gpios = <&gpio0 1 1>;
+			linux,code = <0x198>;
+		};
+		system {
+			label = "system";
+			gpios = <&gpio0 2 1>;
+			linux,code = <0x211>;
+		};
+	};
+};
diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile
index 2de3328..8af84b0 100644
--- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile
@@ -751,6 +751,7 @@ endif
 #
 
 Image/Build/Profile/MLW221=$(call BuildFirmware/Default16M/$(1),$(1),mlw221,MLW221)
+Image/Build/Profile/MLWG2=$(call BuildFirmware/Default16M/$(1),$(1),mlwg2,MLWG2)
 Image/Build/Profile/WMR300=$(call BuildFirmware/Default8M/$(1),$(1),wmr-300,WMR300)
 Image/Build/Profile/RT-N14U=$(call BuildFirmware/Default8M/$(1),$(1),rt-n14u,RT-N14U)
 Image/Build/Profile/WR8305RT=$(call BuildFirmware/Default8M/$(1),$(1),wr8305rt,WR8305RT)
@@ -760,6 +761,7 @@ Image/Build/Profile/ZBT-WA05=$(call BuildFirmware/Default8M/$(1),$(1),zbt-wa05,Z
 ifeq ($(SUBTARGET),mt7620n)
 define Image/Build/Profile/Default
 	$(call Image/Build/Profile/MLW221,$(1))
+	$(call Image/Build/Profile/MLWG2,$(1))
 	$(call Image/Build/Profile/WMR300,$(1))
 	$(call Image/Build/Profile/RT-N14U,$(1))
 	$(call Image/Build/Profile/WR8305RT,$(1))
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From nbd at openwrt.org  Sun Jan 25 05:46:32 2015
From: nbd at openwrt.org (Felix Fietkau)
Date: Sun, 25 Jan 2015 11:46:32 +0100
Subject: [OpenWrt-Devel] [PATCH] mac80211: Add some missing 802.11n
 capabilities to hostapd configuration
In-Reply-To: <1422157550-5766-1-git-send-email-hancockrwd@gmail.com>
References: <1422157550-5766-1-git-send-email-hancockrwd@gmail.com>
Message-ID: <54C4C988.40602@openwrt.org>

On 2015-01-25 04:45, Robert Hancock wrote:
> Add some missing 802.11n capabilities to the hostapd ht_capab string when
> supported by the hardware: Spatial Multiplexing Power-Save,
> Delayed Block Ack, and 7935-byte AMSDUs.
> 
> Signed-off-by: Robert Hancock <hancockrwd at gmail.com>
No driver actually does Delayed Block Ack, and I don't expect this to
change in the future - let's leave that out.

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


From a.seppala at gmail.com  Sun Jan 25 07:52:48 2015
From: a.seppala at gmail.com (=?UTF-8?q?Antti=20Sepp=C3=A4l=C3=A4?=)
Date: Sun, 25 Jan 2015 14:52:48 +0200
Subject: [OpenWrt-Devel] [PATCH] uboot-lantiq: fix P-2812HNU-F1/3 package
	dependency
Message-ID: <1422190368-31840-1-git-send-email-a.seppala@gmail.com>

After r43987 TARGET_lantiq_xrx200_P2812HNUFX does not exist anymore.
Fix empty menuconfig bootloader selection by making u-boot depend on 
one of the new target profiles.

Signed-off-by: Antti Sepp?l? <a.seppala at gmail.com>
---
 package/boot/uboot-lantiq/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/boot/uboot-lantiq/Makefile b/package/boot/uboot-lantiq/Makefile
index d2b868f..d59aac8 100644
--- a/package/boot/uboot-lantiq/Makefile
+++ b/package/boot/uboot-lantiq/Makefile
@@ -247,14 +247,14 @@ define uboot/p2812hnufx_ram
   TITLE:=U-Boot for ZyXEL P-2812HNU-Fx (RAM)
   SOC:=vr9
   DDR_SETTINGS:=board/zyxel/p2812hnufx/ddr_settings.h
-  DEPS:=@TARGET_lantiq_xrx200_P2812HNUFX
+  DEPS:=@TARGET_lantiq_xrx200_P2812HNUF1||@TARGET_lantiq_xrx200_P2812HNUF3
 endef
 
 define uboot/p2812hnufx_nandspl
   TITLE:=U-Boot for ZyXEL P-2812HNU-Fx (NAND SPL)
   SOC:=vr9
   IMAGE:=u-boot.ltq.lzo.nandspl
-  DEPS:=@TARGET_lantiq_xrx200_P2812HNUFX
+  DEPS:=@TARGET_lantiq_xrx200_P2812HNUF1||@TARGET_lantiq_xrx200_P2812HNUF3
 endef
 
 
-- 
2.0.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From luka at openwrt.org  Sun Jan 25 08:14:25 2015
From: luka at openwrt.org (Luka Perkov)
Date: Sun, 25 Jan 2015 14:14:25 +0100
Subject: [OpenWrt-Devel] [PATCH 1/3] kirkwood: drop port-based VLAN setup
In-Reply-To: <1422062864-30133-1-git-send-email-leitec@staticky.com>
References: <1422062864-30133-1-git-send-email-leitec@staticky.com>
Message-ID: <20150125131425.GA15910@t530.lan>

Hi Claudio,

On Fri, Jan 23, 2015 at 08:27:42PM -0500, Claudio Leite wrote:
> Using port-based VLANs depends on a non-standard
> swconfig parameter, which compilcates things like
> LuCI that don't know about it. This patch changes
> the default to use 802.1q VLANs internally in the
> switch, but without tagging packets since we have
> two Ethernet ports.
> 
> iperf3 tests indicate no difference in performance
> versus port-based VLANs when the CPU port is not
> using tags.
> 
> Signed-off-by: Claudio Leite <leitec at staticky.com>
> ---
>  .../base-files/etc/uci-defaults/02_network         | 25 ++++++----------------
>  1 file changed, 6 insertions(+), 19 deletions(-)

Applied in r44122. Thank you.

Luka
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From luka at openwrt.org  Sun Jan 25 08:14:43 2015
From: luka at openwrt.org (Luka Perkov)
Date: Sun, 25 Jan 2015 14:14:43 +0100
Subject: [OpenWrt-Devel] [PATCH 2/3] kirkwood: fix EA3500 ubi options
In-Reply-To: <1422062864-30133-2-git-send-email-leitec@staticky.com>
References: <1422062864-30133-1-git-send-email-leitec@staticky.com>
 <1422062864-30133-2-git-send-email-leitec@staticky.com>
Message-ID: <20150125131443.GB15910@t530.lan>

Hi Claudio,

On Fri, Jan 23, 2015 at 08:27:43PM -0500, Claudio Leite wrote:
> Previous options resulted in a nonfunctional image.
> 
> Signed-off-by: Claudio Leite <leitec at staticky.com>
> ---
>  target/linux/kirkwood/profiles/115-router.mk | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Applied in r44123. Thank you!

Luka
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From luka at openwrt.org  Sun Jan 25 08:15:02 2015
From: luka at openwrt.org (Luka Perkov)
Date: Sun, 25 Jan 2015 14:15:02 +0100
Subject: [OpenWrt-Devel] [PATCH 3/3] kirkwood: enable swconfig by
 default on EA3500
In-Reply-To: <1422062864-30133-3-git-send-email-leitec@staticky.com>
References: <1422062864-30133-1-git-send-email-leitec@staticky.com>
 <1422062864-30133-3-git-send-email-leitec@staticky.com>
Message-ID: <20150125131502.GC15910@t530.lan>

Hi Claudio,

On Fri, Jan 23, 2015 at 08:27:44PM -0500, Claudio Leite wrote:
> Signed-off-by: Claudio Leite <leitec at staticky.com>
> ---
>  target/linux/kirkwood/profiles/115-router.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied in r44124. Thank you!

Luka
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From luka at openwrt.org  Sun Jan 25 08:42:18 2015
From: luka at openwrt.org (Luka Perkov)
Date: Sun, 25 Jan 2015 14:42:18 +0100
Subject: [OpenWrt-Devel] [PATCH] kirkwood: add wpad-mini to guruplug
 profile
In-Reply-To: <BLU436-SMTP250593FA6ED9D8314521054AC370@phx.gbl>
References: <BLU436-SMTP250593FA6ED9D8314521054AC370@phx.gbl>
Message-ID: <20150125134218.GD15910@t530.lan>

Hi Nathan,

On Fri, Jan 23, 2015 at 09:20:01PM -0800, Nathan Hintz wrote:
> Signed-off-by: Nathan Hintz <nlhintz at hotmail.com>
> ---
>  target/linux/kirkwood/profiles/120-plug.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied in r44125. Thank you!

Luka
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From sscapi at gmail.com  Sun Jan 25 09:17:28 2015
From: sscapi at gmail.com (Sylwester Petela)
Date: Sun, 25 Jan 2015 15:17:28 +0100
Subject: [OpenWrt-Devel] [PATCH] uboot-lantiq: fix P-2812HNU-F1/3
 package dependency
In-Reply-To: <1422190368-31840-1-git-send-email-a.seppala@gmail.com>
References: <1422190368-31840-1-git-send-email-a.seppala@gmail.com>
Message-ID: <54C4FAF8.8050405@gmail.com>

W dniu 2015-01-25 o 13:52, Antti Sepp?l? pisze:
> After r43987 TARGET_lantiq_xrx200_P2812HNUFX does not exist anymore.
> Fix empty menuconfig bootloader selection by making u-boot depend on 
> one of the new target profiles.
>
> Signed-off-by: Antti Sepp?l? <a.seppala at gmail.com>
> ---
>  package/boot/uboot-lantiq/Makefile | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/package/boot/uboot-lantiq/Makefile b/package/boot/uboot-lantiq/Makefile
> index d2b868f..d59aac8 100644
> --- a/package/boot/uboot-lantiq/Makefile
> +++ b/package/boot/uboot-lantiq/Makefile
> @@ -247,14 +247,14 @@ define uboot/p2812hnufx_ram
>    TITLE:=U-Boot for ZyXEL P-2812HNU-Fx (RAM)
>    SOC:=vr9
>    DDR_SETTINGS:=board/zyxel/p2812hnufx/ddr_settings.h
> -  DEPS:=@TARGET_lantiq_xrx200_P2812HNUFX
> +  DEPS:=@TARGET_lantiq_xrx200_P2812HNUF1||@TARGET_lantiq_xrx200_P2812HNUF3
>  endef
>  
>  define uboot/p2812hnufx_nandspl
>    TITLE:=U-Boot for ZyXEL P-2812HNU-Fx (NAND SPL)
>    SOC:=vr9
>    IMAGE:=u-boot.ltq.lzo.nandspl
> -  DEPS:=@TARGET_lantiq_xrx200_P2812HNUFX
> +  DEPS:=@TARGET_lantiq_xrx200_P2812HNUF1||@TARGET_lantiq_xrx200_P2812HNUF3
>  endef
>  
>  
That patch will fix target deps but U-Boot for this boards needs fixing.
P-2812HNU-F1 is NAND based, needs NAND_TPL image instead of SPL (needs patches provided by Antonios Vamporakis  in branch "stable_fixes_for_daniel_20140109" on Daniel github)
P-2812HNU-F3 is NOR/NAND based (boots from NOR), NOR needs to be added in board definition .

So ATM U-Boot for this boards is broken.
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From stijn at linux-ipv6.be  Sun Jan 25 09:30:42 2015
From: stijn at linux-ipv6.be (Stijn Tintel)
Date: Sun, 25 Jan 2015 15:30:42 +0100
Subject: [OpenWrt-Devel] [RFC PATCH 0/3] hostapd: add 802.11r support
Message-ID: <1422196245-2289-1-git-send-email-stijn@linux-ipv6.be>

This patch series adds support for fast BSS transition (802.11r) to hostapd.
Only tested association with ath9k client on ath9k AP with netifd. Changes to
hostapd.sh are untested.

https://dev.openwrt.org/ticket/13187

Stijn Tintel (3):
  hostapd: append nasid to config for all WPA types
  hostapd: allow multiple key management algorithms
  hostapd: add support for 802.11r

 package/network/services/hostapd/files/hostapd.sh | 43 ++++++++++++++++++--
 package/network/services/hostapd/files/netifd.sh  | 49 +++++++++++++++++++++--
 2 files changed, 84 insertions(+), 8 deletions(-)

-- 
2.0.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From stijn at linux-ipv6.be  Sun Jan 25 09:30:43 2015
From: stijn at linux-ipv6.be (Stijn Tintel)
Date: Sun, 25 Jan 2015 15:30:43 +0100
Subject: [OpenWrt-Devel] [RFC PATCH 1/3] hostapd: append nasid to config for
	all WPA types
In-Reply-To: <1422196245-2289-1-git-send-email-stijn@linux-ipv6.be>
References: <1422196245-2289-1-git-send-email-stijn@linux-ipv6.be>
Message-ID: <1422196245-2289-2-git-send-email-stijn@linux-ipv6.be>

The 802.11r implementation in hostapd uses nas_identifier as PMK-R0 Key
Holder identifier. As 802.11r can also be used with WPA Personal, nasid
should be appended to the hostapd config for all WPA types.

Signed-off-by: Stijn Tintel <stijn at linux-ipv6.be>
---
 package/network/services/hostapd/files/hostapd.sh | 8 ++++++--
 package/network/services/hostapd/files/netifd.sh  | 8 ++++++--
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh
index b8ba7bd..2a38d16 100644
--- a/package/network/services/hostapd/files/hostapd.sh
+++ b/package/network/services/hostapd/files/hostapd.sh
@@ -129,9 +129,7 @@ hostapd_set_bss_options() {
 				append "$var" "radius_das_port=${dae_port:-3799}" "$N"
 				append "$var" "radius_das_client=$dae_client $dae_secret" "$N"
 			}
-			config_get nasid "$vif" nasid
 			config_get ownip "$vif" ownip
-			append "$var" "nas_identifier=$nasid" "$N"
 			append "$var" "own_ip_addr=$ownip" "$N"
 			append "$var" "eapol_key_index_workaround=1" "$N"
 			append "$var" "ieee8021x=1" "$N"
@@ -216,6 +214,12 @@ hostapd_set_bss_options() {
 	[ -n "$ieee80211d" ] && append "$var" "ieee80211d=$ieee80211d" "$N"
 	[ -n "$iapp_interface" ] && append "$var" iapp_interface=$(uci_get_state network "$iapp_interface" ifname "$iapp_interface") "$N"
 
+	if [ "$wpa" -ge "1" ]
+	then
+		config_get nasid "$vif" nasid
+		[ -n "$nasid" ] && append "$var" "nas_identifier=$nasid" "$N"
+	fi
+
 	if [ "$wpa" -ge "2" ]
 	then
 		# RSN -> allow preauthentication. You have two
diff --git a/package/network/services/hostapd/files/netifd.sh b/package/network/services/hostapd/files/netifd.sh
index 83fb129..2771c1a 100644
--- a/package/network/services/hostapd/files/netifd.sh
+++ b/package/network/services/hostapd/files/netifd.sh
@@ -236,7 +236,7 @@ hostapd_set_bss_options() {
 				auth_server auth_secret auth_port \
 				acct_server acct_secret acct_port \
 				dae_client dae_secret dae_port \
-				nasid ownip \
+				ownip \
 				eap_reauth_period dynamic_vlan \
 				vlan_naming vlan_tagged_interface \
 				vlan_bridge
@@ -270,7 +270,6 @@ hostapd_set_bss_options() {
 				append bss_conf "radius_das_client=$dae_client $dae_secret" "$N"
 			}
 
-			append bss_conf "nas_identifier=$nasid" "$N"
 			[ -n "$ownip" ] && append bss_conf "own_ip_addr=$ownip" "$N"
 			append bss_conf "eapol_key_index_workaround=1" "$N"
 			append bss_conf "ieee8021x=1" "$N"
@@ -336,6 +335,11 @@ hostapd_set_bss_options() {
 		[ -n "$iapp_interface" ] && append bss_conf "iapp_interface=$iapp_interface" "$N"
 	}
 
+	if [ "$wpa" -ge "1" ]; then
+		json_get_vars nasid
+		[ -n "$nasid" ] && append bss_conf "nas_identifier=$nasid" "$N"
+	fi
+
 	if [ "$wpa" -ge "2" ]; then
 		if [ -n "$network_bridge" -a "$rsn_preauth" = 1 ]; then
 			set_default auth_cache 1
-- 
2.0.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From stijn at linux-ipv6.be  Sun Jan 25 09:30:44 2015
From: stijn at linux-ipv6.be (Stijn Tintel)
Date: Sun, 25 Jan 2015 15:30:44 +0100
Subject: [OpenWrt-Devel] [RFC PATCH 2/3] hostapd: allow multiple key
	management algorithms
In-Reply-To: <1422196245-2289-1-git-send-email-stijn@linux-ipv6.be>
References: <1422196245-2289-1-git-send-email-stijn@linux-ipv6.be>
Message-ID: <1422196245-2289-3-git-send-email-stijn@linux-ipv6.be>

To enable 802.11r, wpa_key_mgmt should contain FT-EAP or FT-PSK. Allow
multiple key management algorithms to make this possible.

Signed-off-by: Stijn Tintel <stijn at linux-ipv6.be>
---
 package/network/services/hostapd/files/hostapd.sh | 6 ++++--
 package/network/services/hostapd/files/netifd.sh  | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh
index 2a38d16..a4b38d7 100644
--- a/package/network/services/hostapd/files/hostapd.sh
+++ b/package/network/services/hostapd/files/hostapd.sh
@@ -1,7 +1,7 @@
 hostapd_set_bss_options() {
 	local var="$1"
 	local vif="$2"
-	local enc wep_rekey wpa_group_rekey wpa_pair_rekey wpa_master_rekey wps_possible
+	local enc wep_rekey wpa_group_rekey wpa_pair_rekey wpa_master_rekey wps_possible wpa_key_mgmt
 
 	config_get enc "$vif" encryption "none"
 	config_get wep_rekey        "$vif" wep_rekey        # 300
@@ -92,6 +92,7 @@ hostapd_set_bss_options() {
 			[ -n "$wpa_group_rekey"  ] && append "$var" "wpa_group_rekey=$wpa_group_rekey" "$N"
 			[ -n "$wpa_pair_rekey"   ] && append "$var" "wpa_ptk_rekey=$wpa_pair_rekey"    "$N"
 			[ -n "$wpa_master_rekey" ] && append "$var" "wpa_gmk_rekey=$wpa_master_rekey"  "$N"
+			append wpa_key_mgmt "WPA-PSK"
 		;;
 		*wpa*|*8021x*)
 			# required fields? formats?
@@ -133,7 +134,7 @@ hostapd_set_bss_options() {
 			append "$var" "own_ip_addr=$ownip" "$N"
 			append "$var" "eapol_key_index_workaround=1" "$N"
 			append "$var" "ieee8021x=1" "$N"
-			append "$var" "wpa_key_mgmt=WPA-EAP" "$N"
+			append wpa_key_mgmt "WPA-EAP"
 			[ -n "$wpa_group_rekey"  ] && append "$var" "wpa_group_rekey=$wpa_group_rekey" "$N"
 			[ -n "$wpa_pair_rekey"   ] && append "$var" "wpa_ptk_rekey=$wpa_pair_rekey"    "$N"
 			[ -n "$wpa_master_rekey" ] && append "$var" "wpa_gmk_rekey=$wpa_master_rekey"  "$N"
@@ -218,6 +219,7 @@ hostapd_set_bss_options() {
 	then
 		config_get nasid "$vif" nasid
 		[ -n "$nasid" ] && append "$var" "nas_identifier=$nasid" "$N"
+		[ -n "wpa_key_mgmt" ] && append "$var" "wpa_key_mgmt=$wpa_key_mgmt"
 	fi
 
 	if [ "$wpa" -ge "2" ]
diff --git a/package/network/services/hostapd/files/netifd.sh b/package/network/services/hostapd/files/netifd.sh
index 2771c1a..666823b 100644
--- a/package/network/services/hostapd/files/netifd.sh
+++ b/package/network/services/hostapd/files/netifd.sh
@@ -166,7 +166,7 @@ hostapd_set_bss_options() {
 	wireless_vif_parse_encryption
 
 	local bss_conf
-	local wep_rekey wpa_group_rekey wpa_pair_rekey wpa_master_rekey
+	local wep_rekey wpa_group_rekey wpa_pair_rekey wpa_master_rekey wpa_key_mgmt
 
 	json_get_vars \
 		wep_rekey wpa_group_rekey wpa_pair_rekey wpa_master_rekey \
@@ -230,6 +230,7 @@ hostapd_set_bss_options() {
 				append bss_conf "wpa_psk_file=$wpa_psk_file" "$N"
 			}
 			wps_possible=1
+			append wpa_key_mgmt "WPA-PSK"
 		;;
 		eap)
 			json_get_vars \
@@ -273,7 +274,7 @@ hostapd_set_bss_options() {
 			[ -n "$ownip" ] && append bss_conf "own_ip_addr=$ownip" "$N"
 			append bss_conf "eapol_key_index_workaround=1" "$N"
 			append bss_conf "ieee8021x=1" "$N"
-			append bss_conf "wpa_key_mgmt=WPA-EAP" "$N"
+			append wpa_key_mgmt "WPA-EAP"
 
 			[ -n "$dynamic_vlan" ] && {
 				append bss_conf "dynamic_vlan=$dynamic_vlan" "$N"
@@ -338,6 +339,7 @@ hostapd_set_bss_options() {
 	if [ "$wpa" -ge "1" ]; then
 		json_get_vars nasid
 		[ -n "$nasid" ] && append bss_conf "nas_identifier=$nasid" "$N"
+		[ -n "$wpa_key_mgmt" ] && append bss_conf "wpa_key_mgmt=$wpa_key_mgmt" "$N"
 	fi
 
 	if [ "$wpa" -ge "2" ]; then
-- 
2.0.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From stijn at linux-ipv6.be  Sun Jan 25 09:30:45 2015
From: stijn at linux-ipv6.be (Stijn Tintel)
Date: Sun, 25 Jan 2015 15:30:45 +0100
Subject: [OpenWrt-Devel] [RFC PATCH 3/3] hostapd: add 802.11r support
In-Reply-To: <1422196245-2289-1-git-send-email-stijn@linux-ipv6.be>
References: <1422196245-2289-1-git-send-email-stijn@linux-ipv6.be>
Message-ID: <1422196245-2289-4-git-send-email-stijn@linux-ipv6.be>

Signed-off-by: Stijn Tintel <stijn at linux-ipv6.be>
---
 package/network/services/hostapd/files/hostapd.sh | 29 ++++++++++++++++++
 package/network/services/hostapd/files/netifd.sh  | 37 ++++++++++++++++++++++-
 2 files changed, 65 insertions(+), 1 deletion(-)

diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh
index a4b38d7..7aec7ad 100644
--- a/package/network/services/hostapd/files/hostapd.sh
+++ b/package/network/services/hostapd/files/hostapd.sh
@@ -219,6 +219,35 @@ hostapd_set_bss_options() {
 	then
 		config_get nasid "$vif" nasid
 		[ -n "$nasid" ] && append "$var" "nas_identifier=$nasid" "$N"
+
+		config_get_bool ieee80211r "$vif" ieee80211r 0
+		if [ "$ieee80211r" -gt 0 ]
+		then
+			config_get mobility_domain "$vif" mobility_domain "4f57"
+			config_get r0_key_lifetime "$vif" r0_key_lifetime "10000"
+			config_get r1_key_holder "$vif" r1_key_holder "00004f577274"
+			config_get reassociation_deadline "$vif" reassociation_deadline "1000"
+			config_get r0kh "$vif" r0kh
+			config_get r1kh "$vif" r1kh
+			config_get_bool pmk_r1_push "$vif" pmk_r1_push 0
+
+			append "$var" "mobility_domain=$mobility_domain" "$N"
+			append "$var" "r0_key_lifetime=$r0_key_lifetime" "$N"
+			append "$var" "r1_key_holder=$r1_key_holder" "$N"
+			append "$var" "reassociation_deadline=$reassociation_deadline" "$N"
+			append "$var" "pmk_r1_push=$pmk_r1_push" "$N"
+
+			for kh in $r0kh; do
+				"$var" "r0kh=${kh//,/ }" "$N"
+			done
+			for kh in $r1kh; do
+				"$var" "r1kh=${kh//,/ }" "$N"
+			done
+
+			[ "$wpa_key_mgmt" != "${wpa_key_mgmt/EAP/}" ] && append wpa_key_mgmt "FT-EAP"
+			[ "$wpa_key_mgmt" != "${wpa_key_mgmt/PSK/}" ] && append wpa_key_mgmt "FT-PSK"
+		fi
+
 		[ -n "wpa_key_mgmt" ] && append "$var" "wpa_key_mgmt=$wpa_key_mgmt"
 	fi
 
diff --git a/package/network/services/hostapd/files/netifd.sh b/package/network/services/hostapd/files/netifd.sh
index 666823b..525cc39 100644
--- a/package/network/services/hostapd/files/netifd.sh
+++ b/package/network/services/hostapd/files/netifd.sh
@@ -148,6 +148,11 @@ hostapd_common_add_bss_config() {
 	config_add_boolean wps_pushbutton wps_label ext_registrar wps_pbc_in_m1
 	config_add_string wps_device_type wps_device_name wps_manufacturer wps_pin
 
+	config_add_boolean ieee80211r pmk_r1_push
+	config_add_int r0_key_lifetime reassociation_deadline
+	config_add_string mobility_domain r1_key_holder
+	config_add_array r0kh r1kh
+
 	config_add_int ieee80211w_max_timeout ieee80211w_retry_timeout
 
 	config_add_string macfilter 'macfile:file'
@@ -337,8 +342,38 @@ hostapd_set_bss_options() {
 	}
 
 	if [ "$wpa" -ge "1" ]; then
-		json_get_vars nasid
+		json_get_vars nasid ieee80211r
 		[ -n "$nasid" ] && append bss_conf "nas_identifier=$nasid" "$N"
+
+		if [ "$ieee80211r" -gt "0" ]; then
+			json_get_vars mobility_domain r0_key_lifetime r1_key_holder \
+			reassociation_deadline pmk_r1_push
+			json_get_values r0kh r0kh
+			json_get_values r1kh r1kh
+
+			set_default mobility_domain "4f57"
+			set_default r0_key_lifetime 10000
+			set_default r1_key_holder "00004f577274"
+			set_default reassociation_deadline 1000
+			set_default pmk_r1_push 0
+
+			append bss_conf "mobility_domain=$mobility_domain" "$N"
+			append bss_conf "r0_key_lifetime=$r0_key_lifetime" "$N"
+			append bss_conf "r1_key_holder=$r1_key_holder" "$N"
+			append bss_conf "reassociation_deadline=$reassociation_deadline" "$N"
+			append bss_conf "pmk_r1_push=$pmk_r1_push" "$N"
+
+			for kh in $r0kh; do
+				append bss_conf "r0kh=${kh//,/ }" "$N"
+			done
+			for kh in $r1kh; do
+				append bss_conf "r1kh=${kh//,/ }" "$N"
+			done
+
+			[ "$wpa_key_mgmt" != "${wpa_key_mgmt/EAP/}" ] && append wpa_key_mgmt "FT-EAP"
+			[ "$wpa_key_mgmt" != "${wpa_key_mgmt/PSK/}" ] && append wpa_key_mgmt "FT-PSK"
+		fi
+
 		[ -n "$wpa_key_mgmt" ] && append bss_conf "wpa_key_mgmt=$wpa_key_mgmt" "$N"
 	fi
 
-- 
2.0.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From maxime.ripard at free-electrons.com  Sun Jan 25 12:06:03 2015
From: maxime.ripard at free-electrons.com (Maxime Ripard)
Date: Sun, 25 Jan 2015 18:06:03 +0100
Subject: [OpenWrt-Devel] [PATCH 3/9] kernel: Allow ubi autoattach to run
 on NOR flash
In-Reply-To: <op.xsw2airr2s3iss@ecaz>
References: <1421164606-3222-1-git-send-email-maxime.ripard@free-electrons.com>
 <1421164606-3222-4-git-send-email-maxime.ripard@free-electrons.com>
 <CACna6rz5APOgGThwFSDC8RG_2xhYYVSLyv2Qdv=4nnT_Pa7o=g@mail.gmail.com>
 <20150114123737.GR4891@lukather> <20150122103314.GL4367@lukather>
 <op.xsw2airr2s3iss@ecaz>
Message-ID: <20150125170603.GM8470@lukather>

Hi,

On Fri, Jan 23, 2015 at 01:57:44PM +0100, Imre Kaloz wrote:
> On Thu, 22 Jan 2015 11:33:14 +0100, Maxime Ripard
> <maxime.ripard at free-electrons.com> wrote:
> 
> >Hi,
> >
> >On Wed, Jan 14, 2015 at 01:37:37PM +0100, Maxime Ripard wrote:
> >>On Wed, Jan 14, 2015 at 12:43:25PM +0100, Rafa? Mi?ecki wrote:
> >>> On 13 January 2015 at 16:56, Maxime Ripard
> >>> <maxime.ripard at free-electrons.com> wrote:
> >>> > Some devices out there only have a NOR flash to store the rootfs on.
> >>> >
> >>> > While using UBI is arguable on this kind of NAND, this is something
> >>that should
> >>> > be supported.
> >>>
> >>> So why use UBI at all? Doesn't it make more sense to stick to the
> >>> JFFS2? You should be even able to easily create 2 different image
> >>> types (one for NOR, one for NAND) in one target (see bcm53xx).
> >>
> >>The Openblocks AX3 has a fairly large NOR (128MB) which would make
> >>JFFS2 a rather poor choice, and the UBI overhead wouldn't be that bad.
> >
> >Is that case good enough for you?
> 
> Sure, but please implement UBI on NOR as a generic solution.

What do you mean? It already works quite well (with that patch applied
and the NOR sub-profile), so I'm not sure I have to implement
anything, be it generic or not.

> >>The A385-RD board has a much smaller SPI-NOR (16MB) though, so we
> >>could use jffs2 there, but I wasn't seeing much point at creating a
> >>whole new layout just for a single board.
> >
> >I'll switch this one to JFFS2 and the MTDSPLIT framework. Are you
> >satisfied with the NAND support? Just to know if I can continue to
> >model the NOR stuff on that.
> 
> As I've written in the other mail, I'm mostly happy with it, but please make
> sure you don't hardcode available profiles but parse them.

If we don't plan on supporting building single sub-profiles like
ar71xx, I'm not even sure that we need to parse anything, we can just
loop over the sub-profiles list in any case.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150125/365cf80f/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From weedy2887 at gmail.com  Sun Jan 25 12:17:14 2015
From: weedy2887 at gmail.com (Weedy)
Date: Sun, 25 Jan 2015 12:17:14 -0500
Subject: [OpenWrt-Devel] ar8216: phy_init and bug report 18415
In-Reply-To: <5491D003.3090207@gmail.com>
References: <CAFSsGVtS5fmQS=bP+AfMO1w5Cm5b_D+69q_6chv8iiXWKisUxA@mail.gmail.com>
 <CAFE24U2p5=ZdisG5pnxHaLTncsfAjcpP_2Od-aAOtvFJs=YqFQ@mail.gmail.com>
 <CAFE24U0o6pOUw=CcsOnbc8Kqny8kk=Wo+T=b7wvppHbzja1USw@mail.gmail.com>
 <5491D003.3090207@gmail.com>
Message-ID: <CAFE24U2+4eXSnva=X3GVhF7icypDtZSMh=t4NApyNqk-qNDxSQ@mail.gmail.com>

On Wed, Dec 17, 2014 at 1:48 PM, Heiner Kallweit <hkallweit1 at gmail.com> wrote:
> Ticket 18415 was closed as it was confirmed that as at least version >=43419 is ok.
> (I assume 43410 fixed the issue.) Therefore current trunk should be ok.
>
> However if you want to check further what the actual root cause was:
> -> Re-enable the additional reset by reverting 43410
> -> Issue there?
> -> If yes, check whether inserting a mdiobus_write(bus, i, MII_BMCR, BMCR_ANENABLE);
>    before mdiobus_write(bus, i, MII_BMCR, BMCR_RESET | BMCR_ANENABLE); in
>    ar8xxx_phy_init fixes it.
>
> Heiner
>

So I'm shitty and I forgot about this.
Today I reapplied 43332 (so my checkout should be "virgin"), and made a image.
My WAN port broke again. Should I still go back to 43410?
I saw how many commits you have made since then which is why I flashed r44119.

# dmesg |grep Atheros
[    0.000000] SoC: Atheros AR9344 rev 2
[    0.630000] switch0: Atheros AR8327 rev. 2 switch registered on ag71xx-mdio.0
[    1.300000] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:00
[uid=004dd033, driver=Atheros AR8216/AR8236/AR8316]
[    1.310000] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RGMII
[   11.760000] ieee80211 phy0: Atheros AR9340 Rev:2 mem=0xb8100000, irq=47
[   11.810000] ieee80211 phy1: Atheros AR9300 Rev:4 mem=0xb0000000, irq=40
[   24.820000] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 2 is up
[   24.820000] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 4 is up
[  423.900000] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 3 is up
[  447.900000] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 2 is down
[  453.900000] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 1 is up


Sun Jan 25 10:49:21 2015 daemon.notice netifd: Interface 'wan' is now down
Sun Jan 25 10:49:21 2015 daemon.notice netifd: Interface 'wan' has
link connectivity loss
Sun Jan 25 10:49:21 2015 daemon.notice netifd: Interface 'modem' is now down
Sun Jan 25 10:49:21 2015 daemon.notice netifd: Interface 'modem' is disabled
Sun Jan 25 10:49:21 2015 daemon.notice netifd: Interface 'modem' is enabled
Sun Jan 25 10:49:21 2015 daemon.notice netifd: Interface 'modem' is
setting up now
Sun Jan 25 10:49:21 2015 daemon.notice netifd: Interface 'modem' is now up
Sun Jan 25 10:49:21 2015 daemon.notice netifd: Interface 'wan' is setting up now
Sun Jan 25 10:49:21 2015 daemon.notice netifd: Interface 'wan' is now up
Sun Jan 25 10:49:21 2015 daemon.notice netifd: Interface 'wan' has
link connectivity
Sun Jan 25 10:49:22 2015 user.notice firewall: Reloading firewall due
to ifup of modem (eth0.2)
Sun Jan 25 10:49:24 2015 user.err syslog: module is already loaded - cls_u32
Sun Jan 25 10:49:24 2015 user.err syslog: module is already loaded - em_u32
Sun Jan 25 10:49:24 2015 user.err syslog: module is already loaded -
act_connmark
Sun Jan 25 10:49:24 2015 user.err syslog: module is already loaded - act_mirred
Sun Jan 25 10:49:24 2015 user.err syslog: module is already loaded - sch_ingress
Sun Jan 25 10:49:24 2015 user.err syslog: module is already loaded - cls_fw
Sun Jan 25 10:49:24 2015 user.err syslog: module is already loaded - sch_hfsc
Sun Jan 25 10:49:25 2015 user.notice firewall: Reloading firewall due
to ifup of wan (eth0.2)
Sun Jan 25 10:49:28 2015 daemon.notice netifd: Interface 'wan' is now down
Sun Jan 25 10:49:30 2015 daemon.notice netifd: Interface 'wan' is setting up now
Sun Jan 25 10:49:30 2015 daemon.notice netifd: Interface 'wan' is now up
Sun Jan 25 10:49:31 2015 user.err syslog: module is already loaded - cls_u32
Sun Jan 25 10:49:31 2015 user.err syslog: module is already loaded - em_u32
Sun Jan 25 10:49:31 2015 user.err syslog: module is already loaded -
act_connmark
Sun Jan 25 10:49:31 2015 user.err syslog: module is already loaded - act_mirred
Sun Jan 25 10:49:31 2015 user.err syslog: module is already loaded - sch_ingress
Sun Jan 25 10:49:31 2015 user.err syslog: module is already loaded - cls_fw
Sun Jan 25 10:49:31 2015 user.err syslog: module is already loaded - sch_hfsc
Sun Jan 25 10:49:32 2015 user.notice firewall: Reloading firewall due
to ifup of wan (eth0.2)
Sun Jan 25 10:49:41 2015 daemon.notice netifd: Interface 'wan' is now down
Sun Jan 25 10:49:43 2015 daemon.notice netifd: Interface 'wan' is setting up now
Sun Jan 25 10:49:43 2015 daemon.notice netifd: Interface 'wan' is now up
Sun Jan 25 10:49:44 2015 user.err syslog: module is already loaded - cls_u32
Sun Jan 25 10:49:44 2015 user.err syslog: module is already loaded - em_u32
Sun Jan 25 10:49:44 2015 user.err syslog: module is already loaded -
act_connmark
Sun Jan 25 10:49:44 2015 user.err syslog: module is already loaded - act_mirred
Sun Jan 25 10:49:44 2015 user.err syslog: module is already loaded - sch_ingress
Sun Jan 25 10:49:44 2015 user.err syslog: module is already loaded - cls_fw
Sun Jan 25 10:49:44 2015 user.err syslog: module is already loaded - sch_hfsc
Sun Jan 25 10:49:44 2015 user.notice firewall: Reloading firewall due
to ifup of wan (eth0.2)
Sun Jan 25 10:49:53 2015 daemon.notice netifd: Interface 'wan' is now down
Sun Jan 25 10:49:55 2015 daemon.notice netifd: Interface 'wan' is setting up now
Sun Jan 25 10:49:55 2015 daemon.notice netifd: Interface 'wan' is now up
Sun Jan 25 10:49:56 2015 user.err syslog: module is already loaded - cls_u32
Sun Jan 25 10:49:56 2015 user.err syslog: module is already loaded - em_u32
Sun Jan 25 10:49:56 2015 user.err syslog: module is already loaded -
act_connmark
Sun Jan 25 10:49:56 2015 user.err syslog: module is already loaded - act_mirred
Sun Jan 25 10:49:56 2015 user.err syslog: module is already loaded - sch_ingress
Sun Jan 25 10:49:56 2015 user.err syslog: module is already loaded - cls_fw
Sun Jan 25 10:49:56 2015 user.err syslog: module is already loaded - sch_hfsc
Sun Jan 25 10:49:56 2015 user.notice firewall: Reloading firewall due
to ifup of wan (eth0.2)
Sun Jan 25 10:50:05 2015 daemon.notice netifd: Interface 'wan' is now down
Sun Jan 25 10:50:07 2015 daemon.notice netifd: Interface 'wan' is setting up now
Sun Jan 25 10:50:07 2015 daemon.notice netifd: Interface 'wan' is now up
Sun Jan 25 10:50:08 2015 user.err syslog: module is already loaded - cls_u32
Sun Jan 25 10:50:08 2015 user.err syslog: module is already loaded - em_u32
Sun Jan 25 10:50:08 2015 user.err syslog: module is already loaded -
act_connmark
Sun Jan 25 10:50:08 2015 user.err syslog: module is already loaded - act_mirred
Sun Jan 25 10:50:08 2015 user.err syslog: module is already loaded - sch_ingress
Sun Jan 25 10:50:08 2015 user.err syslog: module is already loaded - cls_fw
Sun Jan 25 10:50:08 2015 user.err syslog: module is already loaded - sch_hfsc
Sun Jan 25 10:50:09 2015 user.notice firewall: Reloading firewall due
to ifup of wan (eth0.2)
Sun Jan 25 10:50:18 2015 daemon.notice netifd: Interface 'wan' is now down
Sun Jan 25 10:50:20 2015 daemon.notice netifd: Interface 'wan' is setting up now
Sun Jan 25 10:50:20 2015 daemon.notice netifd: Interface 'wan' is now up
Sun Jan 25 10:50:21 2015 user.err syslog: module is already loaded - cls_u32
Sun Jan 25 10:50:21 2015 user.err syslog: module is already loaded - em_u32
Sun Jan 25 10:50:21 2015 user.err syslog: module is already loaded -
act_connmark
Sun Jan 25 10:50:21 2015 user.err syslog: module is already loaded - act_mirred
Sun Jan 25 10:50:21 2015 user.err syslog: module is already loaded - sch_ingress
Sun Jan 25 10:50:21 2015 user.err syslog: module is already loaded - cls_fw
Sun Jan 25 10:50:21 2015 user.err syslog: module is already loaded - sch_hfsc
Sun Jan 25 10:50:21 2015 user.notice firewall: Reloading firewall due
to ifup of wan (eth0.2)
Sun Jan 25 10:50:30 2015 daemon.notice netifd: Interface 'wan' is now down
Sun Jan 25 10:50:32 2015 daemon.notice netifd: Interface 'wan' is setting up now
Sun Jan 25 10:50:32 2015 daemon.notice netifd: Interface 'wan' is now up
Sun Jan 25 10:50:33 2015 user.err syslog: module is already loaded - cls_u32
Sun Jan 25 10:50:33 2015 user.err syslog: module is already loaded - em_u32
Sun Jan 25 10:50:33 2015 user.err syslog: module is already loaded -
act_connmark
Sun Jan 25 10:50:33 2015 user.err syslog: module is already loaded - act_mirred
Sun Jan 25 10:50:33 2015 user.err syslog: module is already loaded - sch_ingress
Sun Jan 25 10:50:33 2015 user.err syslog: module is already loaded - cls_fw
Sun Jan 25 10:50:33 2015 user.err syslog: module is already loaded - sch_hfsc
Sun Jan 25 10:50:33 2015 user.notice firewall: Reloading firewall due
to ifup of wan (eth0.2)
Sun Jan 25 10:50:40 2015 kern.info kernel: [  423.900000] Atheros
AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 3 is up <---- moving
cables around
Sun Jan 25 10:50:45 2015 user.err syslog: module is already loaded - cls_u32
Sun Jan 25 10:50:45 2015 user.err syslog: module is already loaded - em_u32
Sun Jan 25 10:50:45 2015 user.err syslog: module is already loaded -
act_connmark
Sun Jan 25 10:50:45 2015 user.err syslog: module is already loaded - act_mirred
Sun Jan 25 10:50:45 2015 user.err syslog: module is already loaded - sch_ingress
Sun Jan 25 10:50:45 2015 user.err syslog: module is already loaded - cls_fw
Sun Jan 25 10:50:45 2015 user.err syslog: module is already loaded - sch_hfsc
Sun Jan 25 10:50:55 2015 daemon.notice netifd: Interface 'wan' is now down
Sun Jan 25 10:50:57 2015 daemon.notice netifd: Interface 'wan' is setting up now
Sun Jan 25 10:50:57 2015 daemon.notice netifd: Interface 'wan' is now up
Sun Jan 25 10:50:58 2015 user.err syslog: module is already loaded - cls_u32
Sun Jan 25 10:50:58 2015 user.err syslog: module is already loaded - em_u32
Sun Jan 25 10:50:58 2015 user.err syslog: module is already loaded -
act_connmark
Sun Jan 25 10:50:58 2015 user.err syslog: module is already loaded - act_mirred
Sun Jan 25 10:50:58 2015 user.err syslog: module is already loaded - sch_ingress
Sun Jan 25 10:50:58 2015 user.err syslog: module is already loaded - cls_fw
Sun Jan 25 10:50:58 2015 user.err syslog: module is already loaded - sch_hfsc
Sun Jan 25 10:50:58 2015 user.notice firewall: Reloading firewall due
to ifup of wan (eth0.2)
Sun Jan 25 10:51:04 2015 kern.info kernel: [  447.900000] Atheros
AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 2 is down <---- moving
cables around
Sun Jan 25 10:51:07 2015 daemon.notice netifd: Interface 'wan' is now down
Sun Jan 25 10:51:09 2015 daemon.notice netifd: Interface 'wan' is setting up now
Sun Jan 25 10:51:09 2015 daemon.notice netifd: Interface 'wan' is now up
Sun Jan 25 10:51:10 2015 kern.info kernel: [  453.900000] Atheros
AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 1 is up <---- connected
modem through a gigabit switch here
Sun Jan 25 10:51:10 2015 user.err syslog: module is already loaded - cls_u32
Sun Jan 25 10:51:10 2015 user.err syslog: module is already loaded - em_u32
Sun Jan 25 10:51:10 2015 user.err syslog: module is already loaded -
act_connmark
Sun Jan 25 10:51:10 2015 user.err syslog: module is already loaded - act_mirred
Sun Jan 25 10:51:10 2015 user.err syslog: module is already loaded - sch_ingress
Sun Jan 25 10:51:10 2015 user.err syslog: module is already loaded - cls_fw
Sun Jan 25 10:51:10 2015 user.err syslog: module is already loaded - sch_hfsc
Sun Jan 25 10:51:19 2015 daemon.notice netifd: Interface 'wan' is now down
Sun Jan 25 10:51:21 2015 daemon.notice netifd: Interface 'wan' is setting up now
Sun Jan 25 10:51:21 2015 daemon.notice netifd: Interface 'wan' is now up
Sun Jan 25 10:51:22 2015 user.err syslog: module is already loaded - cls_u32
Sun Jan 25 10:51:22 2015 user.err syslog: module is already loaded - em_u32
Sun Jan 25 10:51:22 2015 user.err syslog: module is already loaded -
act_connmark
Sun Jan 25 10:51:22 2015 user.err syslog: module is already loaded - act_mirred
Sun Jan 25 10:51:22 2015 user.err syslog: module is already loaded - sch_ingress
Sun Jan 25 10:51:22 2015 user.err syslog: module is already loaded - cls_fw
Sun Jan 25 10:51:22 2015 user.err syslog: module is already loaded - sch_hfsc
Sun Jan 25 10:51:37 2015 daemon.notice netifd: Interface 'wan' is now down
Sun Jan 25 10:51:37 2015 daemon.notice netifd: Interface 'wan' has
link connectivity loss
Sun Jan 25 10:51:37 2015 daemon.notice netifd: Interface 'wan' has
link connectivity
Sun Jan 25 10:51:37 2015 daemon.notice netifd: Interface 'wan' is setting up now
Sun Jan 25 10:51:37 2015 daemon.info pppd[9400]: Plugin rp-pppoe.so loaded.

As an aside, why is netifd trying so hard when the port status hasn't changed?
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From noltari at gmail.com  Sun Jan 25 12:33:18 2015
From: noltari at gmail.com (=?windows-1252?Q?=C1lvaro_Fern=E1ndez_Rojas?=)
Date: Sun, 25 Jan 2015 18:33:18 +0100
Subject: [OpenWrt-Devel] [PATCH V3 1/5] brcm63xx: add basic-mmio-gpio DT
	support
In-Reply-To: <5488DC9C.3000504@gmail.com>
References: <5488DC9C.3000504@gmail.com>
Message-ID: <54C528DE.8030504@gmail.com>

Signed-off-by: ?lvaro Fern?ndez Rojas <noltari at gmail.com>
---
diff --git a/target/linux/brcm63xx/patches-3.14/374-GPIO-generic-pdata-add-label-backport.patch b/target/linux/brcm63xx/patches-3.14/374-GPIO-generic-pdata-add-label-backport.patch
new file mode 100644
index 0000000..cba5a0a
--- /dev/null
+++ b/target/linux/brcm63xx/patches-3.14/374-GPIO-generic-pdata-add-label-backport.patch
@@ -0,0 +1,21 @@
+--- a/drivers/gpio/gpio-generic.c
++++ b/drivers/gpio/gpio-generic.c
+@@ -531,6 +531,8 @@ static int bgpio_pdev_probe(struct platf
+ 		return err;
+ 
+ 	if (pdata) {
++		if (pdata->label)
++			bgc->gc.label = pdata->label;
+ 		bgc->gc.base = pdata->base;
+ 		if (pdata->ngpio > 0)
+ 			bgc->gc.ngpio = pdata->ngpio;
+--- a/include/linux/basic_mmio_gpio.h
++++ b/include/linux/basic_mmio_gpio.h
+@@ -19,6 +19,7 @@
+ #include <linux/spinlock_types.h>
+ 
+ struct bgpio_pdata {
++	const char *label;
+ 	int base;
+ 	int ngpio;
+ };
diff --git a/target/linux/brcm63xx/patches-3.14/375-GPIO-generic-driver-flags-backport.patch b/target/linux/brcm63xx/patches-3.14/375-GPIO-generic-driver-flags-backport.patch
new file mode 100644
index 0000000..3915d2c
--- /dev/null
+++ b/target/linux/brcm63xx/patches-3.14/375-GPIO-generic-driver-flags-backport.patch
@@ -0,0 +1,39 @@
+--- a/drivers/gpio/gpio-generic.c
++++ b/drivers/gpio/gpio-generic.c
+@@ -488,7 +488,7 @@ static int bgpio_pdev_probe(struct platf
+ 	void __iomem *dirout;
+ 	void __iomem *dirin;
+ 	unsigned long sz;
+-	unsigned long flags = 0;
++	unsigned long flags = pdev->id_entry->driver_data;
+ 	int err;
+ 	struct bgpio_chip *bgc;
+ 	struct bgpio_pdata *pdata = dev_get_platdata(dev);
+@@ -519,9 +519,6 @@ static int bgpio_pdev_probe(struct platf
+ 	if (err)
+ 		return err;
+ 
+-	if (!strcmp(platform_get_device_id(pdev)->name, "basic-mmio-gpio-be"))
+-		flags |= BGPIOF_BIG_ENDIAN;
+-
+ 	bgc = devm_kzalloc(&pdev->dev, sizeof(*bgc), GFP_KERNEL);
+ 	if (!bgc)
+ 		return -ENOMEM;
+@@ -551,9 +548,14 @@ static int bgpio_pdev_remove(struct plat
+ }
+ 
+ static const struct platform_device_id bgpio_id_table[] = {
+-	{ "basic-mmio-gpio", },
+-	{ "basic-mmio-gpio-be", },
+-	{},
++	{
++		.name		= "basic-mmio-gpio",
++		.driver_data	= 0,
++	}, {
++		.name		= "basic-mmio-gpio-be",
++		.driver_data	= BGPIOF_BIG_ENDIAN,
++	},
++	{ }
+ };
+ MODULE_DEVICE_TABLE(platform, bgpio_id_table);
+ 
diff --git a/target/linux/brcm63xx/patches-3.14/376-DT-basic-mmio-gpio.patch b/target/linux/brcm63xx/patches-3.14/376-DT-basic-mmio-gpio.patch
new file mode 100644
index 0000000..cda38b2
--- /dev/null
+++ b/target/linux/brcm63xx/patches-3.14/376-DT-basic-mmio-gpio.patch
@@ -0,0 +1,204 @@
+--- a/Documentation/devicetree/bindings/gpio/gpio.txt
++++ b/Documentation/devicetree/bindings/gpio/gpio.txt
+@@ -153,3 +153,75 @@ Example 2:
+ Here, three GPIO ranges are defined wrt. two pin controllers. pinctrl1 GPIO
+ ranges are defined using pin numbers whereas the GPIO ranges wrt. pinctrl2
+ are named "foo" and "bar".
++
++3) Generic driver for memory-mapped GPIO controllers
++----------------------------------------------------
++The GPIO generic library provides support for basic platform_device
++memory-mapped GPIO controllers, which can be accessed by selecting Kconfig
++symbol GPIO_GENERIC and using library functions provided by GPIO generic
++driver (see drivers/gpio/gpio-generic.c).
++The simplest form of a GPIO controller that the driver support is just a
++single "data" register, where GPIO state can be read and/or written.
++
++The driver supports:
++- 8/16/32/64 bits registers. The number of GPIOs is determined by the width of
++  the registers.
++- GPIO controllers with clear/set registers.
++- GPIO controllers with a single "data" register.
++- Big endian bits/GPIOs ordering.
++
++For setting GPIO's there are three supported configurations:
++- single input/output register resource (named "dat").
++- set/clear pair (named "set" and "clr").
++- single output register resource and single input resource ("set" and dat").
++
++For setting the GPIO direction, there are three supported configurations:
++- simple bidirection GPIO that requires no configuration.
++- an output direction register (named "dirout") where a 1 bit indicates the
++  GPIO is an output.
++- an input direction register (named "dirin") where a 1 bit indicates the GPIO
++  is an input.
++
++Required properties:
++- compatible : Should be "basic-mmio-gpio".
++- reg : Address and length of the registers needed for the device.
++- reg-names : Names of the needed registers.
++- #gpio-cells : Should be two.  The first cell is the pin number and
++  the second cell is used to specify optional parameters (currently
++  unused).
++- gpio-controller : Marks the device node as a gpio controller.
++
++Optional properties:
++- num-gpios : Specify the number of configurable gpios.
++- bit-be : Use big endian order for pins.
++- byte-be : Use big endian byte order for registers.
++- regset-wo : set register is unreadable.
++- regdir-wo : dir register is unreadable.
++
++Examples:
++
++gpio0: gpio-controller at 10000084 {
++	compatible = "brcm,brcm6368", "basic-mmio-gpio";
++	reg = <0x10000084 0x4>, <0x1000008c 0x4>;
++	reg-names = "dirout", "dat";
++
++	gpio-controller;
++	#gpio-cells = <2>;
++
++	num-gpios = <32>;
++	byte-be;
++};
++
++gpio1: gpio-controller at 10000180 {
++	compatible = "foo,bar", "basic-mmio-gpio";
++	reg = <0x10000180 0x4>, <0x10000184 0x4>, <0x10000188 0x4>;
++	reg-names = "dirin", "dirout", "dat";
++
++	gpio-controller;
++	#gpio-cells = <2>;
++
++	num-gpios = <20>;
++	bit-be;
++	byte-be;
++	regdir-wo;
++};
+--- a/drivers/gpio/gpio-generic.c
++++ b/drivers/gpio/gpio-generic.c
+@@ -61,6 +61,9 @@ o        `                     ~~~~\___/
+ #include <linux/platform_device.h>
+ #include <linux/mod_devicetable.h>
+ #include <linux/basic_mmio_gpio.h>
++#include <linux/of.h>
++#include <linux/of_device.h>
++#include <linux/of_gpio.h>
+ 
+ static void bgpio_write8(void __iomem *reg, unsigned long data)
+ {
+@@ -478,8 +481,58 @@ static void __iomem *bgpio_map(struct pl
+ 	return ret;
+ }
+ 
++#ifdef CONFIG_OF
++static const struct of_device_id bgpio_dt_ids[] = {
++	{ .compatible = "basic-mmio-gpio" },
++};
++MODULE_DEVICE_TABLE(of, bgpio_dt_ids);
++
++static int bgpio_probe_dt(struct platform_device *pdev)
++{
++	u32 tmp;
++	struct bgpio_pdata *pdata;
++	struct device_node *np;
++
++	np = pdev->dev.of_node;
++	if (!np)
++		return 0;
++
++	pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
++	if (!pdata)
++		return -ENOMEM;
++
++	pdata->label = dev_name(&pdev->dev);
++	pdata->base = -1;
++	if (of_find_property(np, "byte-be", NULL)) {
++		pdata->flags |= BGPIOF_BIG_ENDIAN_BYTE_ORDER;
++	}
++	if (of_find_property(np, "bit-be", NULL)) {
++		pdata->flags |= BGPIOF_BIG_ENDIAN;
++	}
++	if (of_find_property(np, "regset-wo", NULL)) {
++		pdata->flags |= BGPIOF_UNREADABLE_REG_SET;
++	}
++	if (of_find_property(np, "regdir-wo", NULL)) {
++		pdata->flags |= BGPIOF_UNREADABLE_REG_DIR;
++	}
++	if (!of_property_read_u32(np, "num-gpios", &tmp)) {
++		pdata->ngpio = tmp;
++	}
++
++	pdev->dev.platform_data = pdata;
++
++	return 1;
++}
++#else
++static inline int bgpio_probe_dt(struct platform_device *pdev)
++{
++	return 0;
++}
++#endif
++
+ static int bgpio_pdev_probe(struct platform_device *pdev)
+ {
++	int status;
+ 	struct device *dev = &pdev->dev;
+ 	struct resource *r;
+ 	void __iomem *dat;
+@@ -488,10 +541,24 @@ static int bgpio_pdev_probe(struct platf
+ 	void __iomem *dirout;
+ 	void __iomem *dirin;
+ 	unsigned long sz;
+-	unsigned long flags = pdev->id_entry->driver_data;
++	unsigned long flags;
+ 	int err;
+ 	struct bgpio_chip *bgc;
+-	struct bgpio_pdata *pdata = dev_get_platdata(dev);
++	struct bgpio_pdata *pdata;
++	bool use_of = 0;
++
++	status = bgpio_probe_dt(pdev);
++	if (status < 0)
++		return status;
++	if (status > 0)
++		use_of = 1;
++
++	pdata = dev_get_platdata(dev);
++
++	if (!use_of)
++		flags = pdev->id_entry->driver_data;
++	else if (pdata)
++		flags = pdata->flags;
+ 
+ 	r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dat");
+ 	if (!r)
+@@ -537,6 +604,9 @@ static int bgpio_pdev_probe(struct platf
+ 
+ 	platform_set_drvdata(pdev, bgc);
+ 
++	if (use_of)
++		of_gpiochip_add(&bgc->gc);
++
+ 	return gpiochip_add(&bgc->gc);
+ }
+ 
+@@ -562,6 +632,7 @@ MODULE_DEVICE_TABLE(platform, bgpio_id_t
+ static struct platform_driver bgpio_driver = {
+ 	.driver = {
+ 		.name = "basic-mmio-gpio",
++		.of_match_table = bgpio_dt_ids,
+ 	},
+ 	.id_table = bgpio_id_table,
+ 	.probe = bgpio_pdev_probe,
+--- a/include/linux/basic_mmio_gpio.h
++++ b/include/linux/basic_mmio_gpio.h
+@@ -22,6 +22,7 @@ struct bgpio_pdata {
+ 	const char *label;
+ 	int base;
+ 	int ngpio;
++	unsigned long flags;
+ };
+ 
+ struct device;
diff --git a/target/linux/brcm63xx/patches-3.18/374-DT-basic-mmio-gpio.patch b/target/linux/brcm63xx/patches-3.18/374-DT-basic-mmio-gpio.patch
new file mode 100644
index 0000000..ba9f2ce
--- /dev/null
+++ b/target/linux/brcm63xx/patches-3.18/374-DT-basic-mmio-gpio.patch
@@ -0,0 +1,204 @@
+--- a/Documentation/devicetree/bindings/gpio/gpio.txt
++++ b/Documentation/devicetree/bindings/gpio/gpio.txt
+@@ -197,3 +197,75 @@ Example 2:
+ Here, three GPIO ranges are defined wrt. two pin controllers. pinctrl1 GPIO
+ ranges are defined using pin numbers whereas the GPIO ranges wrt. pinctrl2
+ are named "foo" and "bar".
++
++3) Generic driver for memory-mapped GPIO controllers
++----------------------------------------------------
++The GPIO generic library provides support for basic platform_device
++memory-mapped GPIO controllers, which can be accessed by selecting Kconfig
++symbol GPIO_GENERIC and using library functions provided by GPIO generic
++driver (see drivers/gpio/gpio-generic.c).
++The simplest form of a GPIO controller that the driver support is just a
++single "data" register, where GPIO state can be read and/or written.
++
++The driver supports:
++- 8/16/32/64 bits registers. The number of GPIOs is determined by the width of
++  the registers.
++- GPIO controllers with clear/set registers.
++- GPIO controllers with a single "data" register.
++- Big endian bits/GPIOs ordering.
++
++For setting GPIO's there are three supported configurations:
++- single input/output register resource (named "dat").
++- set/clear pair (named "set" and "clr").
++- single output register resource and single input resource ("set" and dat").
++
++For setting the GPIO direction, there are three supported configurations:
++- simple bidirection GPIO that requires no configuration.
++- an output direction register (named "dirout") where a 1 bit indicates the
++  GPIO is an output.
++- an input direction register (named "dirin") where a 1 bit indicates the GPIO
++  is an input.
++
++Required properties:
++- compatible : Should be "basic-mmio-gpio".
++- reg : Address and length of the registers needed for the device.
++- reg-names : Names of the needed registers.
++- #gpio-cells : Should be two.  The first cell is the pin number and
++  the second cell is used to specify optional parameters (currently
++  unused).
++- gpio-controller : Marks the device node as a gpio controller.
++
++Optional properties:
++- num-gpios : Specify the number of configurable gpios.
++- bit-be : Use big endian order for pins.
++- byte-be : Use big endian byte order for registers.
++- regset-wo : set register is unreadable.
++- regdir-wo : dir register is unreadable.
++
++Examples:
++
++gpio0: gpio-controller at 10000084 {
++	compatible = "brcm,brcm6368", "basic-mmio-gpio";
++	reg = <0x10000084 0x4>, <0x1000008c 0x4>;
++	reg-names = "dirout", "dat";
++
++	gpio-controller;
++	#gpio-cells = <2>;
++
++	num-gpios = <32>;
++	byte-be;
++};
++
++gpio1: gpio-controller at 10000180 {
++	compatible = "foo,bar", "basic-mmio-gpio";
++	reg = <0x10000180 0x4>, <0x10000184 0x4>, <0x10000188 0x4>;
++	reg-names = "dirin", "dirout", "dat";
++
++	gpio-controller;
++	#gpio-cells = <2>;
++
++	num-gpios = <20>;
++	bit-be;
++	byte-be;
++	regdir-wo;
++};
+--- a/drivers/gpio/gpio-generic.c
++++ b/drivers/gpio/gpio-generic.c
+@@ -61,6 +61,9 @@ o        `                     ~~~~\___/
+ #include <linux/platform_device.h>
+ #include <linux/mod_devicetable.h>
+ #include <linux/basic_mmio_gpio.h>
++#include <linux/of.h>
++#include <linux/of_device.h>
++#include <linux/of_gpio.h>
+ 
+ static void bgpio_write8(void __iomem *reg, unsigned long data)
+ {
+@@ -488,8 +491,58 @@ static void __iomem *bgpio_map(struct pl
+ 	return ret;
+ }
+ 
++#ifdef CONFIG_OF
++static const struct of_device_id bgpio_dt_ids[] = {
++	{ .compatible = "basic-mmio-gpio" },
++};
++MODULE_DEVICE_TABLE(of, bgpio_dt_ids);
++
++static int bgpio_probe_dt(struct platform_device *pdev)
++{
++	u32 tmp;
++	struct bgpio_pdata *pdata;
++	struct device_node *np;
++
++	np = pdev->dev.of_node;
++	if (!np)
++		return 0;
++
++	pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
++	if (!pdata)
++		return -ENOMEM;
++
++	pdata->label = dev_name(&pdev->dev);
++	pdata->base = -1;
++	if (of_find_property(np, "byte-be", NULL)) {
++		pdata->flags |= BGPIOF_BIG_ENDIAN_BYTE_ORDER;
++	}
++	if (of_find_property(np, "bit-be", NULL)) {
++		pdata->flags |= BGPIOF_BIG_ENDIAN;
++	}
++	if (of_find_property(np, "regset-wo", NULL)) {
++		pdata->flags |= BGPIOF_UNREADABLE_REG_SET;
++	}
++	if (of_find_property(np, "regdir-wo", NULL)) {
++		pdata->flags |= BGPIOF_UNREADABLE_REG_DIR;
++	}
++	if (!of_property_read_u32(np, "num-gpios", &tmp)) {
++		pdata->ngpio = tmp;
++	}
++
++	pdev->dev.platform_data = pdata;
++
++	return 1;
++}
++#else
++static inline int bgpio_probe_dt(struct platform_device *pdev)
++{
++	return 0;
++}
++#endif
++
+ static int bgpio_pdev_probe(struct platform_device *pdev)
+ {
++	int status;
+ 	struct device *dev = &pdev->dev;
+ 	struct resource *r;
+ 	void __iomem *dat;
+@@ -498,10 +551,24 @@ static int bgpio_pdev_probe(struct platf
+ 	void __iomem *dirout;
+ 	void __iomem *dirin;
+ 	unsigned long sz;
+-	unsigned long flags = pdev->id_entry->driver_data;
++	unsigned long flags;
+ 	int err;
+ 	struct bgpio_chip *bgc;
+-	struct bgpio_pdata *pdata = dev_get_platdata(dev);
++	struct bgpio_pdata *pdata;
++	bool use_of = 0;
++
++	status = bgpio_probe_dt(pdev);
++	if (status < 0)
++		return status;
++	if (status > 0)
++		use_of = 1;
++
++	pdata = dev_get_platdata(dev);
++
++	if (!use_of)
++		flags = pdev->id_entry->driver_data;
++	else if (pdata)
++		flags = pdata->flags;
+ 
+ 	r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dat");
+ 	if (!r)
+@@ -547,6 +614,9 @@ static int bgpio_pdev_probe(struct platf
+ 
+ 	platform_set_drvdata(pdev, bgc);
+ 
++	if (use_of)
++		of_gpiochip_add(&bgc->gc);
++
+ 	return gpiochip_add(&bgc->gc);
+ }
+ 
+@@ -572,6 +642,7 @@ MODULE_DEVICE_TABLE(platform, bgpio_id_t
+ static struct platform_driver bgpio_driver = {
+ 	.driver = {
+ 		.name = "basic-mmio-gpio",
++		.of_match_table = bgpio_dt_ids,
+ 	},
+ 	.id_table = bgpio_id_table,
+ 	.probe = bgpio_pdev_probe,
+--- a/include/linux/basic_mmio_gpio.h
++++ b/include/linux/basic_mmio_gpio.h
+@@ -22,6 +22,7 @@ struct bgpio_pdata {
+ 	const char *label;
+ 	int base;
+ 	int ngpio;
++	unsigned long flags;
+ };
+ 
+ struct device;
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From noltari at gmail.com  Sun Jan 25 12:36:24 2015
From: noltari at gmail.com (=?windows-1252?Q?=C1lvaro_Fern=E1ndez_Rojas?=)
Date: Sun, 25 Jan 2015 18:36:24 +0100
Subject: [OpenWrt-Devel] [PATCH V3 2/5] brcm63xx: prefer DT GPIOs over legacy
In-Reply-To: <54C528DE.8030504@gmail.com>
References: <5488DC9C.3000504@gmail.com> <54C528DE.8030504@gmail.com>
Message-ID: <54C52998.3060402@gmail.com>

Signed-off-by: ?lvaro Fern?ndez Rojas <noltari at gmail.com>
---
diff --git a/target/linux/brcm63xx/patches-3.14/377-DT-GPIO-over-legacy.patch b/target/linux/brcm63xx/patches-3.14/377-DT-GPIO-over-legacy.patch
new file mode 100644
index 0000000..f56c8ca
--- /dev/null
+++ b/target/linux/brcm63xx/patches-3.14/377-DT-GPIO-over-legacy.patch
@@ -0,0 +1,43 @@
+--- a/arch/mips/bcm63xx/boards/board_common.c
++++ b/arch/mips/bcm63xx/boards/board_common.c
+@@ -204,6 +204,10 @@ int __init board_register_devices(void)
+ 	}
+ #endif
+ 
++	if (!board_of_device_present("gpio0")) {
++		bcm63xx_gpio_init();
++	}
++
+ 	if (board.has_uart0)
+ 		bcm63xx_uart_register(0);
+ 
+@@ -269,7 +273,7 @@ int __init board_register_devices(void)
+ 	while (led_count < ARRAY_SIZE(board.leds) && board.leds[led_count].name)
+ 		led_count++;
+ 
+-	if (led_count) {
++	if (led_count && !board_of_device_present("gpio0")) {
+ 		bcm63xx_led_data.num_leds = led_count;
+ 		bcm63xx_led_data.leds = board.leds;
+ 
+@@ -284,7 +288,7 @@ int __init board_register_devices(void)
+ 	while (button_count < ARRAY_SIZE(board.buttons) && board.buttons[button_count].desc)
+ 		button_count++;
+ 
+-	if (button_count) {
++	if (button_count && !board_of_device_present("gpio0")) {
+ 		bcm63xx_gpio_keys_data.nbuttons = button_count;
+ 		bcm63xx_gpio_keys_data.buttons = board.buttons;
+ 
+--- a/arch/mips/bcm63xx/prom.c
++++ b/arch/mips/bcm63xx/prom.c
+@@ -54,9 +54,6 @@ void __init prom_init(void)
+ 	reg &= ~mask;
+ 	bcm_perf_writel(reg, PERF_CKCTL_REG);
+ 
+-	/* register gpiochip */
+-	bcm63xx_gpio_init();
+-
+ 	/* detect and setup flash access */
+ 	bcm63xx_flash_detect();
+ 
diff --git a/target/linux/brcm63xx/patches-3.18/375-DT-GPIO-over-legacy.patch b/target/linux/brcm63xx/patches-3.18/375-DT-GPIO-over-legacy.patch
new file mode 100644
index 0000000..f56c8ca
--- /dev/null
+++ b/target/linux/brcm63xx/patches-3.18/375-DT-GPIO-over-legacy.patch
@@ -0,0 +1,43 @@
+--- a/arch/mips/bcm63xx/boards/board_common.c
++++ b/arch/mips/bcm63xx/boards/board_common.c
+@@ -204,6 +204,10 @@ int __init board_register_devices(void)
+ 	}
+ #endif
+ 
++	if (!board_of_device_present("gpio0")) {
++		bcm63xx_gpio_init();
++	}
++
+ 	if (board.has_uart0)
+ 		bcm63xx_uart_register(0);
+ 
+@@ -269,7 +273,7 @@ int __init board_register_devices(void)
+ 	while (led_count < ARRAY_SIZE(board.leds) && board.leds[led_count].name)
+ 		led_count++;
+ 
+-	if (led_count) {
++	if (led_count && !board_of_device_present("gpio0")) {
+ 		bcm63xx_led_data.num_leds = led_count;
+ 		bcm63xx_led_data.leds = board.leds;
+ 
+@@ -284,7 +288,7 @@ int __init board_register_devices(void)
+ 	while (button_count < ARRAY_SIZE(board.buttons) && board.buttons[button_count].desc)
+ 		button_count++;
+ 
+-	if (button_count) {
++	if (button_count && !board_of_device_present("gpio0")) {
+ 		bcm63xx_gpio_keys_data.nbuttons = button_count;
+ 		bcm63xx_gpio_keys_data.buttons = board.buttons;
+ 
+--- a/arch/mips/bcm63xx/prom.c
++++ b/arch/mips/bcm63xx/prom.c
+@@ -54,9 +54,6 @@ void __init prom_init(void)
+ 	reg &= ~mask;
+ 	bcm_perf_writel(reg, PERF_CKCTL_REG);
+ 
+-	/* register gpiochip */
+-	bcm63xx_gpio_init();
+-
+ 	/* detect and setup flash access */
+ 	bcm63xx_flash_detect();
+ 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From noltari at gmail.com  Sun Jan 25 12:36:50 2015
From: noltari at gmail.com (=?windows-1252?Q?=C1lvaro_Fern=E1ndez_Rojas?=)
Date: Sun, 25 Jan 2015 18:36:50 +0100
Subject: [OpenWrt-Devel] [PATCH V3 3/5] brcm63xx: backport DT spi-gpio no CS
In-Reply-To: <54C528DE.8030504@gmail.com>
References: <5488DC9C.3000504@gmail.com> <54C528DE.8030504@gmail.com>
Message-ID: <54C529B2.3090704@gmail.com>

Signed-off-by: ?lvaro Fern?ndez Rojas <noltari at gmail.com>
---
diff --git a/target/linux/brcm63xx/patches-3.14/378-DT-SPI-GPIO-no-cs-backport.patch b/target/linux/brcm63xx/patches-3.14/378-DT-SPI-GPIO-no-cs-backport.patch
new file mode 100644
index 0000000..57b66eb
--- /dev/null
+++ b/target/linux/brcm63xx/patches-3.14/378-DT-SPI-GPIO-no-cs-backport.patch
@@ -0,0 +1,74 @@
+--- a/Documentation/devicetree/bindings/spi/spi-gpio.txt
++++ b/Documentation/devicetree/bindings/spi/spi-gpio.txt
+@@ -8,8 +8,10 @@ Required properties:
+  - gpio-sck: GPIO spec for the SCK line to use
+  - gpio-miso: GPIO spec for the MISO line to use
+  - gpio-mosi: GPIO spec for the MOSI line to use
+- - cs-gpios: GPIOs to use for chipselect lines
+- - num-chipselects: number of chipselect lines
++ - cs-gpios: GPIOs to use for chipselect lines.
++             Not needed if num-chipselects = <0>.
++ - num-chipselects: Number of chipselect lines. Should be <0> if a single device
++                    with no chip select is connected.
+ 
+ Example:
+ 
+--- a/drivers/spi/spi-gpio.c
++++ b/drivers/spi/spi-gpio.c
+@@ -425,6 +425,7 @@ static int spi_gpio_probe(struct platfor
+ 	struct spi_gpio_platform_data	*pdata;
+ 	u16 master_flags = 0;
+ 	bool use_of = 0;
++	int num_devices;
+ 
+ 	status = spi_gpio_probe_dt(pdev);
+ 	if (status < 0)
+@@ -434,16 +435,21 @@ static int spi_gpio_probe(struct platfor
+ 
+ 	pdata = dev_get_platdata(&pdev->dev);
+ #ifdef GENERIC_BITBANG
+-	if (!pdata || !pdata->num_chipselect)
++	if (!pdata || (!use_of && !pdata->num_chipselect))
+ 		return -ENODEV;
+ #endif
+ 
++	if (use_of && !SPI_N_CHIPSEL)
++		num_devices = 1;
++	else
++		num_devices = SPI_N_CHIPSEL;
++
+ 	status = spi_gpio_request(pdata, dev_name(&pdev->dev), &master_flags);
+ 	if (status < 0)
+ 		return status;
+ 
+ 	master = spi_alloc_master(&pdev->dev, sizeof(*spi_gpio) +
+-					(sizeof(int) * SPI_N_CHIPSEL));
++					(sizeof(int) * num_devices));
+ 	if (!master) {
+ 		status = -ENOMEM;
+ 		goto gpio_free;
+@@ -458,7 +464,7 @@ static int spi_gpio_probe(struct platfor
+ 	master->bits_per_word_mask = SPI_BPW_RANGE_MASK(1, 32);
+ 	master->flags = master_flags;
+ 	master->bus_num = pdev->id;
+-	master->num_chipselect = SPI_N_CHIPSEL;
++	master->num_chipselect = num_devices;
+ 	master->setup = spi_gpio_setup;
+ 	master->cleanup = spi_gpio_cleanup;
+ #ifdef CONFIG_OF
+@@ -473,9 +479,12 @@ static int spi_gpio_probe(struct platfor
+ 		 * property of the node.
+ 		 */
+ 
+-		for (i = 0; i < SPI_N_CHIPSEL; i++)
+-			spi_gpio->cs_gpios[i] =
+-				of_get_named_gpio(np, "cs-gpios", i);
++		if (!SPI_N_CHIPSEL)
++			spi_gpio->cs_gpios[0] = SPI_GPIO_NO_CHIPSELECT;
++		else
++			for (i = 0; i < SPI_N_CHIPSEL; i++)
++				spi_gpio->cs_gpios[i] =
++					of_get_named_gpio(np, "cs-gpios", i);
+ 	}
+ #endif
+ 
diff --git a/target/linux/brcm63xx/patches-3.18/376-DT-SPI-GPIO-no-cs-backport.patch b/target/linux/brcm63xx/patches-3.18/376-DT-SPI-GPIO-no-cs-backport.patch
new file mode 100644
index 0000000..da75cb5
--- /dev/null
+++ b/target/linux/brcm63xx/patches-3.18/376-DT-SPI-GPIO-no-cs-backport.patch
@@ -0,0 +1,74 @@
+--- a/Documentation/devicetree/bindings/spi/spi-gpio.txt
++++ b/Documentation/devicetree/bindings/spi/spi-gpio.txt
+@@ -8,8 +8,10 @@ Required properties:
+  - gpio-sck: GPIO spec for the SCK line to use
+  - gpio-miso: GPIO spec for the MISO line to use
+  - gpio-mosi: GPIO spec for the MOSI line to use
+- - cs-gpios: GPIOs to use for chipselect lines
+- - num-chipselects: number of chipselect lines
++ - cs-gpios: GPIOs to use for chipselect lines.
++             Not needed if num-chipselects = <0>.
++ - num-chipselects: Number of chipselect lines. Should be <0> if a single device
++                    with no chip select is connected.
+ 
+ Example:
+ 
+--- a/drivers/spi/spi-gpio.c
++++ b/drivers/spi/spi-gpio.c
+@@ -424,6 +424,7 @@ static int spi_gpio_probe(struct platfor
+ 	struct spi_gpio_platform_data	*pdata;
+ 	u16 master_flags = 0;
+ 	bool use_of = 0;
++	int num_devices;
+ 
+ 	status = spi_gpio_probe_dt(pdev);
+ 	if (status < 0)
+@@ -433,16 +434,21 @@ static int spi_gpio_probe(struct platfor
+ 
+ 	pdata = dev_get_platdata(&pdev->dev);
+ #ifdef GENERIC_BITBANG
+-	if (!pdata || !pdata->num_chipselect)
++	if (!pdata || (!use_of && !pdata->num_chipselect))
+ 		return -ENODEV;
+ #endif
+ 
++	if (use_of && !SPI_N_CHIPSEL)
++		num_devices = 1;
++	else
++		num_devices = SPI_N_CHIPSEL;
++
+ 	status = spi_gpio_request(pdata, dev_name(&pdev->dev), &master_flags);
+ 	if (status < 0)
+ 		return status;
+ 
+ 	master = spi_alloc_master(&pdev->dev, sizeof(*spi_gpio) +
+-					(sizeof(int) * SPI_N_CHIPSEL));
++					(sizeof(int) * num_devices));
+ 	if (!master) {
+ 		status = -ENOMEM;
+ 		goto gpio_free;
+@@ -457,7 +463,7 @@ static int spi_gpio_probe(struct platfor
+ 	master->bits_per_word_mask = SPI_BPW_RANGE_MASK(1, 32);
+ 	master->flags = master_flags;
+ 	master->bus_num = pdev->id;
+-	master->num_chipselect = SPI_N_CHIPSEL;
++	master->num_chipselect = num_devices;
+ 	master->setup = spi_gpio_setup;
+ 	master->cleanup = spi_gpio_cleanup;
+ #ifdef CONFIG_OF
+@@ -472,9 +478,12 @@ static int spi_gpio_probe(struct platfor
+ 		 * property of the node.
+ 		 */
+ 
+-		for (i = 0; i < SPI_N_CHIPSEL; i++)
+-			spi_gpio->cs_gpios[i] =
+-				of_get_named_gpio(np, "cs-gpios", i);
++		if (!SPI_N_CHIPSEL)
++			spi_gpio->cs_gpios[0] = SPI_GPIO_NO_CHIPSELECT;
++		else
++			for (i = 0; i < SPI_N_CHIPSEL; i++)
++				spi_gpio->cs_gpios[i] =
++					of_get_named_gpio(np, "cs-gpios", i);
+ 	}
+ #endif
+ 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From noltari at gmail.com  Sun Jan 25 12:37:17 2015
From: noltari at gmail.com (=?windows-1252?Q?=C1lvaro_Fern=E1ndez_Rojas?=)
Date: Sun, 25 Jan 2015 18:37:17 +0100
Subject: [OpenWrt-Devel] [PATCH V3 4/5] brcm63xx: refresh patches
In-Reply-To: <54C528DE.8030504@gmail.com>
References: <5488DC9C.3000504@gmail.com> <54C528DE.8030504@gmail.com>
Message-ID: <54C529CD.2000304@gmail.com>

Signed-off-by: ?lvaro Fern?ndez Rojas <noltari at gmail.com>
---
diff --git a/target/linux/brcm63xx/patches-3.14/320-irqchip-add-support-for-bcm6345-style-periphery-irq-.patch b/target/linux/brcm63xx/patches-3.14/320-irqchip-add-support-for-bcm6345-style-periphery-irq-.patch
index 2fd1568..8219c98 100644
--- a/target/linux/brcm63xx/patches-3.14/320-irqchip-add-support-for-bcm6345-style-periphery-irq-.patch
+++ b/target/linux/brcm63xx/patches-3.14/320-irqchip-add-support-for-bcm6345-style-periphery-irq-.patch
@@ -94,7 +94,7 @@ Signed-off-by: Jonas Gorski <jogo at openwrt.org>
  obj-$(CONFIG_METAG_PERFCOUNTER_IRQS)	+= irq-metag.o
 --- /dev/null
 +++ b/drivers/irqchip/irq-bcm6345-periph.c
-@@ -0,0 +1,340 @@
+@@ -0,0 +1,341 @@
 +/*
 + * This file is subject to the terms and conditions of the GNU General Public
 + * License.  See the file "COPYING" in the main directory of this archive
@@ -246,6 +246,7 @@ Signed-off-by: Jonas Gorski <jogo at openwrt.org>
 +	irq_hw_number_t hwirq = irqd_to_hwirq(data);
 +	struct intc_data *priv = data->domain->host_data;
 +	unsigned int i, reg, bit;
++	unsigned long flags;
 +	bool enabled;
 +	int cpu;
 +
@@ -265,7 +266,7 @@ Signed-off-by: Jonas Gorski <jogo at openwrt.org>
 +	if (!priv->block[cpu].parent_irq)
 +		return -EINVAL;
 +
-+	raw_spin_lock(&priv->lock);
++	raw_spin_lock_irqsave(&priv->lock, flags);
 +	enabled = !irqd_irq_masked(data);
 +	for (i = 0; i < MAX_PARENT_IRQS; i++) {
 +		struct intc_block *block = &priv->block[i];
@@ -281,7 +282,7 @@ Signed-off-by: Jonas Gorski <jogo at openwrt.org>
 +			__bcm6345_periph_enable(block, reg, bit, false);
 +		}
 +	}
-+	raw_spin_unlock(&priv->lock);
++	raw_spin_unlock_irqrestore(&priv->lock, flags);
 +
 +	return 0;
 +}
@@ -454,33 +455,3 @@ Signed-off-by: Jonas Gorski <jogo at openwrt.org>
 +			      int num_words);
 +
 +#endif /* __INCLUDE_LINUX_IRQCHIP_IRQ_BCM6345_PERIPH_H */
-diff --git a/drivers/irqchip/irq-bcm6345-periph.c b/drivers/irqchip/irq-bcm6345-periph.c
-index dfab88e..b280164 100644
---- a/drivers/irqchip/irq-bcm6345-periph.c
-+++ b/drivers/irqchip/irq-bcm6345-periph.c
-@@ -149,6 +149,7 @@ static int bcm6345_periph_set_affinity(struct irq_data *data,
- 	irq_hw_number_t hwirq = irqd_to_hwirq(data);
- 	struct intc_data *priv = data->domain->host_data;
- 	unsigned int i, reg, bit;
-+	unsigned long flags;
- 	bool enabled;
- 	int cpu;
- 
-@@ -168,7 +169,7 @@ static int bcm6345_periph_set_affinity(struct irq_data *data,
- 	if (!priv->block[cpu].parent_irq)
- 		return -EINVAL;
- 
--	raw_spin_lock(&priv->lock);
-+	raw_spin_lock_irqsave(&priv->lock, flags);
- 	enabled = !irqd_irq_masked(data);
- 	for (i = 0; i < MAX_PARENT_IRQS; i++) {
- 		struct intc_block *block = &priv->block[i];
-@@ -184,7 +185,7 @@ static int bcm6345_periph_set_affinity(struct irq_data *data,
- 			__bcm6345_periph_enable(block, reg, bit, false);
- 		}
- 	}
--	raw_spin_unlock(&priv->lock);
-+	raw_spin_unlock_irqrestore(&priv->lock, flags);
- 
- 	return 0;
- }
diff --git a/target/linux/brcm63xx/patches-3.14/413-BCM63XX-allow-providing-fixup-data-in-board-data.patch b/target/linux/brcm63xx/patches-3.14/413-BCM63XX-allow-providing-fixup-data-in-board-data.patch
index bcb92a1..21f3ebe 100644
--- a/target/linux/brcm63xx/patches-3.14/413-BCM63XX-allow-providing-fixup-data-in-board-data.patch
+++ b/target/linux/brcm63xx/patches-3.14/413-BCM63XX-allow-providing-fixup-data-in-board-data.patch
@@ -26,7 +26,7 @@ Subject: [PATCH 58/72] BCM63XX: allow providing fixup data in board data
  
  #if CONFIG_OF
  	if (of_have_populated_dt()) {
-@@ -293,6 +295,10 @@ int __init board_register_devices(void)
+@@ -297,6 +299,10 @@ int __init board_register_devices(void)
  		platform_device_register(&bcm63xx_gpio_keys_device);
  	}
  
diff --git a/target/linux/brcm63xx/patches-3.14/418-MIPS-BCM63XX-pass-caldata-info-to-flash.patch b/target/linux/brcm63xx/patches-3.14/418-MIPS-BCM63XX-pass-caldata-info-to-flash.patch
index fdcfa19..d12814d 100644
--- a/target/linux/brcm63xx/patches-3.14/418-MIPS-BCM63XX-pass-caldata-info-to-flash.patch
+++ b/target/linux/brcm63xx/patches-3.14/418-MIPS-BCM63XX-pass-caldata-info-to-flash.patch
@@ -11,7 +11,7 @@ Subject: [PATCH 69/80] MIPS: BCM63XX: pass caldata info to flash
 
 --- a/arch/mips/bcm63xx/boards/board_common.c
 +++ b/arch/mips/bcm63xx/boards/board_common.c
-@@ -267,7 +267,7 @@ int __init board_register_devices(void)
+@@ -271,7 +271,7 @@ int __init board_register_devices(void)
  	if (board.num_spis)
  		spi_register_board_info(board.spis, board.num_spis);
  
diff --git a/target/linux/brcm63xx/patches-3.14/420-BCM63XX-add-endian-check-for-ath9k.patch b/target/linux/brcm63xx/patches-3.14/420-BCM63XX-add-endian-check-for-ath9k.patch
index 0e01be1..9e425b7 100644
--- a/target/linux/brcm63xx/patches-3.14/420-BCM63XX-add-endian-check-for-ath9k.patch
+++ b/target/linux/brcm63xx/patches-3.14/420-BCM63XX-add-endian-check-for-ath9k.patch
@@ -39,7 +39,7 @@
  		return;
 --- a/arch/mips/bcm63xx/boards/board_common.c
 +++ b/arch/mips/bcm63xx/boards/board_common.c
-@@ -297,7 +297,8 @@ int __init board_register_devices(void)
+@@ -301,7 +301,8 @@ int __init board_register_devices(void)
  
  	/* register any fixups */
  	for (i = 0; i < board.has_caldata; i++)
diff --git a/target/linux/brcm63xx/patches-3.14/421-BCM63XX-add-led-pin-for-ath9k.patch b/target/linux/brcm63xx/patches-3.14/421-BCM63XX-add-led-pin-for-ath9k.patch
index 27ea83f..bf166f7 100644
--- a/target/linux/brcm63xx/patches-3.14/421-BCM63XX-add-led-pin-for-ath9k.patch
+++ b/target/linux/brcm63xx/patches-3.14/421-BCM63XX-add-led-pin-for-ath9k.patch
@@ -1,6 +1,6 @@
 --- a/arch/mips/bcm63xx/boards/board_common.c
 +++ b/arch/mips/bcm63xx/boards/board_common.c
-@@ -298,7 +298,7 @@ int __init board_register_devices(void)
+@@ -302,7 +302,7 @@ int __init board_register_devices(void)
  	/* register any fixups */
  	for (i = 0; i < board.has_caldata; i++)
  		pci_enable_ath9k_fixup(board.caldata[i].slot, board.caldata[i].caldata_offset,
diff --git a/target/linux/brcm63xx/patches-3.14/422-BCM63XX-add-a-fixup-for-rt2x00-devices.patch b/target/linux/brcm63xx/patches-3.14/422-BCM63XX-add-a-fixup-for-rt2x00-devices.patch
index c07bd32..bfd7705 100644
--- a/target/linux/brcm63xx/patches-3.14/422-BCM63XX-add-a-fixup-for-rt2x00-devices.patch
+++ b/target/linux/brcm63xx/patches-3.14/422-BCM63XX-add-a-fixup-for-rt2x00-devices.patch
@@ -36,7 +36,7 @@ Subject: [PATCH 72/72] 446-BCM63XX-add-a-fixup-for-rt2x00-devices
  
  #include "board_common.h"
  
-@@ -296,9 +297,19 @@ int __init board_register_devices(void)
+@@ -300,9 +301,19 @@ int __init board_register_devices(void)
  	}
  
  	/* register any fixups */
diff --git a/target/linux/brcm63xx/patches-3.18/413-BCM63XX-allow-providing-fixup-data-in-board-data.patch b/target/linux/brcm63xx/patches-3.18/413-BCM63XX-allow-providing-fixup-data-in-board-data.patch
index bcb92a1..21f3ebe 100644
--- a/target/linux/brcm63xx/patches-3.18/413-BCM63XX-allow-providing-fixup-data-in-board-data.patch
+++ b/target/linux/brcm63xx/patches-3.18/413-BCM63XX-allow-providing-fixup-data-in-board-data.patch
@@ -26,7 +26,7 @@ Subject: [PATCH 58/72] BCM63XX: allow providing fixup data in board data
  
  #if CONFIG_OF
  	if (of_have_populated_dt()) {
-@@ -293,6 +295,10 @@ int __init board_register_devices(void)
+@@ -297,6 +299,10 @@ int __init board_register_devices(void)
  		platform_device_register(&bcm63xx_gpio_keys_device);
  	}
  
diff --git a/target/linux/brcm63xx/patches-3.18/418-MIPS-BCM63XX-pass-caldata-info-to-flash.patch b/target/linux/brcm63xx/patches-3.18/418-MIPS-BCM63XX-pass-caldata-info-to-flash.patch
index fdcfa19..d12814d 100644
--- a/target/linux/brcm63xx/patches-3.18/418-MIPS-BCM63XX-pass-caldata-info-to-flash.patch
+++ b/target/linux/brcm63xx/patches-3.18/418-MIPS-BCM63XX-pass-caldata-info-to-flash.patch
@@ -11,7 +11,7 @@ Subject: [PATCH 69/80] MIPS: BCM63XX: pass caldata info to flash
 
 --- a/arch/mips/bcm63xx/boards/board_common.c
 +++ b/arch/mips/bcm63xx/boards/board_common.c
-@@ -267,7 +267,7 @@ int __init board_register_devices(void)
+@@ -271,7 +271,7 @@ int __init board_register_devices(void)
  	if (board.num_spis)
  		spi_register_board_info(board.spis, board.num_spis);
  
diff --git a/target/linux/brcm63xx/patches-3.18/420-BCM63XX-add-endian-check-for-ath9k.patch b/target/linux/brcm63xx/patches-3.18/420-BCM63XX-add-endian-check-for-ath9k.patch
index 0e01be1..9e425b7 100644
--- a/target/linux/brcm63xx/patches-3.18/420-BCM63XX-add-endian-check-for-ath9k.patch
+++ b/target/linux/brcm63xx/patches-3.18/420-BCM63XX-add-endian-check-for-ath9k.patch
@@ -39,7 +39,7 @@
  		return;
 --- a/arch/mips/bcm63xx/boards/board_common.c
 +++ b/arch/mips/bcm63xx/boards/board_common.c
-@@ -297,7 +297,8 @@ int __init board_register_devices(void)
+@@ -301,7 +301,8 @@ int __init board_register_devices(void)
  
  	/* register any fixups */
  	for (i = 0; i < board.has_caldata; i++)
diff --git a/target/linux/brcm63xx/patches-3.18/421-BCM63XX-add-led-pin-for-ath9k.patch b/target/linux/brcm63xx/patches-3.18/421-BCM63XX-add-led-pin-for-ath9k.patch
index 27ea83f..bf166f7 100644
--- a/target/linux/brcm63xx/patches-3.18/421-BCM63XX-add-led-pin-for-ath9k.patch
+++ b/target/linux/brcm63xx/patches-3.18/421-BCM63XX-add-led-pin-for-ath9k.patch
@@ -1,6 +1,6 @@
 --- a/arch/mips/bcm63xx/boards/board_common.c
 +++ b/arch/mips/bcm63xx/boards/board_common.c
-@@ -298,7 +298,7 @@ int __init board_register_devices(void)
+@@ -302,7 +302,7 @@ int __init board_register_devices(void)
  	/* register any fixups */
  	for (i = 0; i < board.has_caldata; i++)
  		pci_enable_ath9k_fixup(board.caldata[i].slot, board.caldata[i].caldata_offset,
diff --git a/target/linux/brcm63xx/patches-3.18/422-BCM63XX-add-a-fixup-for-rt2x00-devices.patch b/target/linux/brcm63xx/patches-3.18/422-BCM63XX-add-a-fixup-for-rt2x00-devices.patch
index c07bd32..bfd7705 100644
--- a/target/linux/brcm63xx/patches-3.18/422-BCM63XX-add-a-fixup-for-rt2x00-devices.patch
+++ b/target/linux/brcm63xx/patches-3.18/422-BCM63XX-add-a-fixup-for-rt2x00-devices.patch
@@ -36,7 +36,7 @@ Subject: [PATCH 72/72] 446-BCM63XX-add-a-fixup-for-rt2x00-devices
  
  #include "board_common.h"
  
-@@ -296,9 +297,19 @@ int __init board_register_devices(void)
+@@ -300,9 +301,19 @@ int __init board_register_devices(void)
  	}
  
  	/* register any fixups */
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From noltari at gmail.com  Sun Jan 25 12:37:41 2015
From: noltari at gmail.com (=?windows-1252?Q?=C1lvaro_Fern=E1ndez_Rojas?=)
Date: Sun, 25 Jan 2015 18:37:41 +0100
Subject: [OpenWrt-Devel] [PATCH V3 5/5] brcm63xx: register GPIOs through DT
In-Reply-To: <54C528DE.8030504@gmail.com>
References: <5488DC9C.3000504@gmail.com> <54C528DE.8030504@gmail.com>
Message-ID: <54C529E5.20706@gmail.com>

Signed-off-by: ?lvaro Fern?ndez Rojas <noltari at gmail.com>
---
diff --git a/target/linux/brcm63xx/config-3.14 b/target/linux/brcm63xx/config-3.14
index dd27f47..a5c1721 100644
--- a/target/linux/brcm63xx/config-3.14
+++ b/target/linux/brcm63xx/config-3.14
@@ -76,7 +76,10 @@ CONFIG_GENERIC_IRQ_SHOW=y
 CONFIG_GENERIC_PCI_IOMAP=y
 CONFIG_GENERIC_SMP_IDLE_THREAD=y
 CONFIG_GPIOLIB=y
+CONFIG_GPIO_74X164=y
 CONFIG_GPIO_DEVRES=y
+CONFIG_GPIO_GENERIC=y
+CONFIG_GPIO_GENERIC_PLATFORM=y
 CONFIG_GPIO_SYSFS=y
 # CONFIG_HAMRADIO is not set
 CONFIG_HAS_DMA=y
diff --git a/target/linux/brcm63xx/config-3.18 b/target/linux/brcm63xx/config-3.18
index e3cf020..d5f9425 100644
--- a/target/linux/brcm63xx/config-3.18
+++ b/target/linux/brcm63xx/config-3.18
@@ -80,7 +80,10 @@ CONFIG_GENERIC_IRQ_SHOW=y
 CONFIG_GENERIC_PCI_IOMAP=y
 CONFIG_GENERIC_SMP_IDLE_THREAD=y
 CONFIG_GPIOLIB=y
+CONFIG_GPIO_74X164=y
 CONFIG_GPIO_DEVRES=y
+CONFIG_GPIO_GENERIC=y
+CONFIG_GPIO_GENERIC_PLATFORM=y
 CONFIG_GPIO_SYSFS=y
 # CONFIG_HAMRADIO is not set
 CONFIG_HAS_DMA=y
diff --git a/target/linux/brcm63xx/dts/a226g.dts b/target/linux/brcm63xx/dts/a226g.dts
index 9aff81b..1b40507 100644
--- a/target/linux/brcm63xx/dts/a226g.dts
+++ b/target/linux/brcm63xx/dts/a226g.dts
@@ -5,6 +5,83 @@
 / {
 	model = "Pirelli A226G";
 	compatible = "pirelli,a226g", "brcm,bcm6358";
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		debounce-interval = <60>;
+
+		wps {
+			label = "wps";
+			gpios = <&gpio1 2 1>;
+			linux,code = <0x211>;
+		};
+		reset {
+			label = "reset";
+			gpios = <&gpio1 5 1>;
+			linux,code = <0x198>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		voip_red {
+			label = "DWV-S0:red:VoIP";
+			gpios = <&gpio0 0 1>;
+		};
+		eth_red {
+			label = "DWV-S0:red:ethernet";
+			gpios = <&gpio0 1 1>;
+		};
+		dsl_green {
+			label = "DWV-S0:green:ADSL";
+			gpios = <&gpio0 2 1>;
+		};
+		usb_green {
+			label = "DWV-S0:green:USB";
+			gpios = <&gpio0 3 1>;
+		};
+		power_green {
+			label = "DWV-S0:green:power";
+			gpios = <&gpio0 4 1>;
+			default-state = "on";
+		};
+		power_red {
+			label = "DWV-S0:red:power";
+			gpios = <&gpio0 5 1>;
+		};
+		inet_red {
+			label = "DWV-S0:red:internet";
+			gpios = <&gpio0 6 1>;
+		};
+		inet_green {
+			label = "DWV-S0:green:internet";
+			gpios = <&gpio0 7 1>;
+		};
+		eth_green {
+			label = "DWV-S0:green:ethernet";
+			gpios = <&gpio0 8 1>;
+		};
+		voip_green {
+			label = "DWV-S0:green:VoIP";
+			gpios = <&gpio0 9 1>;
+		};
+		wifi_red {
+			label = "DWV-S0:red:wifi";
+			gpios = <&gpio0 10 1>;
+		};
+		usb_red {
+			label = "DWV-S0:red:USB";
+			gpios = <&gpio0 11 1>;
+		};
+		dsl_red {
+			label = "DWV-S0:red:ADSL";
+			gpios = <&gpio0 12 1>;
+		};
+	};
 };
 
 &pflash {
diff --git a/target/linux/brcm63xx/dts/a226m-fwb.dts b/target/linux/brcm63xx/dts/a226m-fwb.dts
index 1abf870..011f312 100644
--- a/target/linux/brcm63xx/dts/a226m-fwb.dts
+++ b/target/linux/brcm63xx/dts/a226m-fwb.dts
@@ -5,6 +5,83 @@
 / {
 	model = "Pirelli A226M-FWB";
 	compatible = "pirelli,a226m-fwb", "brcm,bcm6358";
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		debounce-interval = <60>;
+
+		wps {
+			label = "wps";
+			gpios = <&gpio1 2 1>;
+			linux,code = <0x211>;
+		};
+		reset {
+			label = "reset";
+			gpios = <&gpio1 5 1>;
+			linux,code = <0x198>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		voip_red {
+			label = "DWV-S0:red:VoIP";
+			gpios = <&gpio0 0 1>;
+		};
+		eth_red {
+			label = "DWV-S0:red:ethernet";
+			gpios = <&gpio0 1 1>;
+		};
+		dsl_green {
+			label = "DWV-S0:green:ADSL";
+			gpios = <&gpio0 2 1>;
+		};
+		usb_green {
+			label = "DWV-S0:green:USB";
+			gpios = <&gpio0 3 1>;
+		};
+		power_green {
+			label = "DWV-S0:green:power";
+			gpios = <&gpio0 4 1>;
+			default-state = "on";
+		};
+		power_red {
+			label = "DWV-S0:red:power";
+			gpios = <&gpio0 5 1>;
+		};
+		inet_red {
+			label = "DWV-S0:red:internet";
+			gpios = <&gpio0 6 1>;
+		};
+		inet_green {
+			label = "DWV-S0:green:internet";
+			gpios = <&gpio0 7 1>;
+		};
+		eth_green {
+			label = "DWV-S0:green:ethernet";
+			gpios = <&gpio0 8 1>;
+		};
+		voip_green {
+			label = "DWV-S0:green:VoIP";
+			gpios = <&gpio0 9 1>;
+		};
+		wifi_red {
+			label = "DWV-S0:red:wifi";
+			gpios = <&gpio0 10 1>;
+		};
+		usb_red {
+			label = "DWV-S0:red:USB";
+			gpios = <&gpio0 11 1>;
+		};
+		dsl_red {
+			label = "DWV-S0:red:ADSL";
+			gpios = <&gpio0 12 1>;
+		};
+	};
 };
 
 &pflash {
diff --git a/target/linux/brcm63xx/dts/a226m.dts b/target/linux/brcm63xx/dts/a226m.dts
index ba6382e..13400f2 100644
--- a/target/linux/brcm63xx/dts/a226m.dts
+++ b/target/linux/brcm63xx/dts/a226m.dts
@@ -5,6 +5,83 @@
 / {
 	model = "Pirelli A226M";
 	compatible = "pirelli,a226m", "brcm,bcm6358";
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		debounce-interval = <60>;
+
+		wps {
+			label = "wps";
+			gpios = <&gpio1 2 1>;
+			linux,code = <0x211>;
+		};
+		reset {
+			label = "reset";
+			gpios = <&gpio1 5 1>;
+			linux,code = <0x198>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		voip_red {
+			label = "DWV-S0:red:VoIP";
+			gpios = <&gpio0 0 1>;
+		};
+		eth_red {
+			label = "DWV-S0:red:ethernet";
+			gpios = <&gpio0 1 1>;
+		};
+		dsl_green {
+			label = "DWV-S0:green:ADSL";
+			gpios = <&gpio0 2 1>;
+		};
+		usb_green {
+			label = "DWV-S0:green:USB";
+			gpios = <&gpio0 3 1>;
+		};
+		power_green {
+			label = "DWV-S0:green:power";
+			gpios = <&gpio0 4 1>;
+			default-state = "on";
+		};
+		power_red {
+			label = "DWV-S0:red:power";
+			gpios = <&gpio0 5 1>;
+		};
+		inet_red {
+			label = "DWV-S0:red:internet";
+			gpios = <&gpio0 6 1>;
+		};
+		inet_green {
+			label = "DWV-S0:green:internet";
+			gpios = <&gpio0 7 1>;
+		};
+		eth_green {
+			label = "DWV-S0:green:ethernet";
+			gpios = <&gpio0 8 1>;
+		};
+		voip_green {
+			label = "DWV-S0:green:VoIP";
+			gpios = <&gpio0 9 1>;
+		};
+		wifi_red {
+			label = "DWV-S0:red:wifi";
+			gpios = <&gpio0 10 1>;
+		};
+		usb_red {
+			label = "DWV-S0:red:USB";
+			gpios = <&gpio0 11 1>;
+		};
+		dsl_red {
+			label = "DWV-S0:red:ADSL";
+			gpios = <&gpio0 12 1>;
+		};
+	};
 };
 
 &pflash {
diff --git a/target/linux/brcm63xx/dts/a4001n.dts b/target/linux/brcm63xx/dts/a4001n.dts
index 011fbf4..1f8eaf6 100644
--- a/target/linux/brcm63xx/dts/a4001n.dts
+++ b/target/linux/brcm63xx/dts/a4001n.dts
@@ -5,4 +5,49 @@
 / {
 	model = "ADB P.DG A4001N";
 	compatible = "adb,a4001n", "brcm,bcm6328";
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		debounce-interval = <60>;
+
+		reset {
+			label = "reset";
+			gpios = <&gpio0 23 1>;
+			linux,code = <0x198>;
+		};
+		wps {
+			label = "wps";
+			gpios = <&gpio0 24 1>;
+			linux,code = <0x211>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		inet_red {
+			label = "A4001N:red:inet";
+			gpios = <&gpio0 1 0>;
+		};
+		power_red {
+			label = "A4001N:red:power";
+			gpios = <&gpio0 4 0>;
+		};
+		power_green {
+			label = "A4001N:green:power";
+			gpios = <&gpio0 8 0>;
+			default-state = "on";
+		};
+		usb_green {
+			label = "A4001N:green:usb";
+			gpios = <&gpio0 10 1>;
+		};
+		dsl_green {
+			label = "A4001N:green:dsl";
+			gpios = <&gpio0 11 1>;
+		};
+	};
 };
diff --git a/target/linux/brcm63xx/dts/a4001n1.dts b/target/linux/brcm63xx/dts/a4001n1.dts
index 2bdd201..d45210f 100644
--- a/target/linux/brcm63xx/dts/a4001n1.dts
+++ b/target/linux/brcm63xx/dts/a4001n1.dts
@@ -5,4 +5,77 @@
 / {
 	model = "ADB P.DG A4001N1";
 	compatible = "adb,a4001n1", "brcm,bcm6328";
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		debounce-interval = <60>;
+
+		reset {
+			label = "reset";
+			gpios = <&gpio0 23 1>;
+			linux,code = <0x198>;
+		};
+		wps {
+			label = "wlan";
+			gpios = <&gpio0 24 1>;
+			linux,code = <0xee>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		inet_red {
+			label = "A4001N1:red:inet";
+			gpios = <&gpio0 2 1>;
+		};
+		ppp_green {
+			label = "A4001N1:green:ppp";
+			gpios = <&gpio0 3 1>;
+		};
+		power_red {
+			label = "A4001N1:red:power";
+			gpios = <&gpio0 4 1>;
+		};
+		ppp_red {
+			label = "A4001N1:red:ppp";
+			gpios = <&gpio0 5 1>;
+		};
+		usb_green {
+			label = "A4001N1:green:3g";
+			gpios = <&gpio0 6 1>;
+		};
+		usb_red {
+			label = "A4001N1:red:3g";
+			gpios = <&gpio0 7 1>;
+		};
+		power_green {
+			label = "A4001N1:green:power";
+			gpios = <&gpio0 8 1>;
+			default-state = "on";
+		};
+		wlan_green {
+			label = "A4001N1:green:wlan";
+			gpios = <&gpio0 9 1>;
+		};
+		wlan_red {
+			label = "A4001N1:red:wlan";
+			gpios = <&gpio0 10 1>;
+		};
+		inet_green {
+			label = "A4001N1:green:inet";
+			gpios = <&gpio0 11 1>;
+		};
+		eth_red {
+			label = "A4001N1:red:eth";
+			gpios = <&gpio0 20 1>;
+		};
+		eth_green {
+			label = "A4001N1:green:eth";
+			gpios = <&gpio0 31 1>;
+		};
+	};
 };
diff --git a/target/linux/brcm63xx/dts/agpf-s0.dts b/target/linux/brcm63xx/dts/agpf-s0.dts
index 9d66b89..eaa45b9 100644
--- a/target/linux/brcm63xx/dts/agpf-s0.dts
+++ b/target/linux/brcm63xx/dts/agpf-s0.dts
@@ -5,6 +5,87 @@
 / {
 	model = "Pirelli Alice Gate AGPF-S0";
 	compatible = "pirelli,agpf-s0", "brcm,bcm6358";
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		debounce-interval = <60>;
+
+		wps {
+			label = "wps";
+			gpios = <&gpio1 2 1>;
+			linux,code = <0x211>;
+		};
+		reset {
+			label = "reset";
+			gpios = <&gpio1 5 1>;
+			linux,code = <0x198>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		power_green {
+			label = "AGPF-S0:green:power";
+			gpios = <&gpio0 4 1>;
+			default-state = "on";
+		};
+		power_red {
+			label = "AGPF-S0:red:power";
+			gpios = <&gpio0 5 1>;
+		};
+		service_green {
+			label = "AGPF-S0:green:service";
+			gpios = <&gpio0 6 1>;
+		};
+		service_red {
+			label = "AGPF-S0:red:service";
+			gpios = <&gpio0 7 1>;
+		};
+		dsl_green {
+			label = "AGPF-S0:green:adsl";
+			gpios = <&gpio0 9 1>;
+		};
+		dsl_red {
+			label = "AGPF-S0:red:adsl";
+			gpios = <&gpio0 10 1>;
+		};
+		wifi_green {
+			label = "AGPF-S0:green:wifi";
+			gpios = <&gpio0 22 1>;
+		};
+		wifi_red {
+			label = "AGPF-S0:red:wifi";
+			gpios = <&gpio0 23 1>;
+		};
+		inet_red {
+			label = "AGPF-S0:red:internet";
+			gpios = <&gpio0 24 1>;
+		};
+		inet_green {
+			label = "AGPF-S0:green:internet";
+			gpios = <&gpio0 25 1>;
+		};
+		usr1_green {
+			label = "AGPF-S0:green:usr1";
+			gpios = <&gpio0 26 1>;
+		};
+		usr1_red {
+			label = "AGPF-S0:red:usr1";
+			gpios = <&gpio0 27 1>;
+		};
+		usr2_green {
+			label = "AGPF-S0:green:usr2";
+			gpios = <&gpio0 29 1>;
+		};
+		usr2_red {
+			label = "AGPF-S0:red:usr2";
+			gpios = <&gpio0 30 1>;
+		};
+	};
 };
 
 &pflash {
diff --git a/target/linux/brcm63xx/dts/ar-5381u.dts b/target/linux/brcm63xx/dts/ar-5381u.dts
index 812108a..d5f728a 100644
--- a/target/linux/brcm63xx/dts/ar-5381u.dts
+++ b/target/linux/brcm63xx/dts/ar-5381u.dts
@@ -5,4 +5,36 @@
 / {
 	model = "Comtrend AR-5381u";
 	compatible = "comtrend,ar-5381u", "brcm,bcm6328";
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		debounce-interval = <60>;
+
+		reset {
+			label = "reset";
+			gpios = <&gpio0 23 1>;
+			linux,code = <0x198>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		alarm_red {
+			label = "AR-5381u:red:alarm";
+			gpios = <&gpio0 2 1>;
+		};
+		inet_green {
+			label = "AR-5381u:green:inet";
+			gpios = <&gpio0 3 1>;
+		};
+		power_green {
+			label = "AR-5381u:green:power";
+			gpios = <&gpio0 4 1>;
+			default-state = "on";
+		};
+	};
 };
diff --git a/target/linux/brcm63xx/dts/ar-5387un.dts b/target/linux/brcm63xx/dts/ar-5387un.dts
index d24a655..a8883e2 100644
--- a/target/linux/brcm63xx/dts/ar-5387un.dts
+++ b/target/linux/brcm63xx/dts/ar-5387un.dts
@@ -5,4 +5,44 @@
 / {
 	model = "Comtrend AR-5387un";
 	compatible = "comtrend,ar-5387un", "brcm,bcm6328";
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		debounce-interval = <60>;
+
+		reset {
+			label = "reset";
+			gpios = <&gpio0 23 1>;
+			linux,code = <0x198>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		inet_red {
+			label = "AR-5387un:red:inet";
+			gpios = <&gpio0 1 0>;
+		};
+		power_red {
+			label = "AR-5387un:red:power";
+			gpios = <&gpio0 4 0>;
+		};
+		inet_green {
+			label = "AR-5387un:green:inet";
+			gpios = <&gpio0 7 0>;
+		};
+		power_green {
+			label = "AR-5387un:green:power";
+			gpios = <&gpio0 8 0>;
+			default-state = "on";
+		};
+		dsl_green {
+			label = "AR-5387un:green:dsl";
+			gpios = <&gpio0 11 1>;
+		};
+	};
 };
diff --git a/target/linux/brcm63xx/dts/ar1004g.dts b/target/linux/brcm63xx/dts/ar1004g.dts
index c5bea28a..fdd5c47 100644
--- a/target/linux/brcm63xx/dts/ar1004g.dts
+++ b/target/linux/brcm63xx/dts/ar1004g.dts
@@ -5,4 +5,36 @@
 / {
 	model = "ASMAX AR 1004g";
 	compatible = "asmax,ar1004g", "brcm,bcm6348";
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		debounce-interval = <60>;
+
+		reset {
+			label = "reset";
+			gpios = <&gpio1 1 1>;
+			linux,code = <0x198>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		power_green {
+			label = "AR1004G:green:power";
+			gpios = <&gpio0 0 1>;
+			default-state = "on";
+		};
+		inet_green {
+			label = "AR1004G:green:inet";
+			gpios = <&gpio0 3 1>;
+		};
+		power_red {
+			label = "AR1004G:red:power";
+			gpios = <&gpio0 6 1>;
+		};
+	};
 };
diff --git a/target/linux/brcm63xx/dts/bcm6318.dtsi b/target/linux/brcm63xx/dts/bcm6318.dtsi
index 97bdea7..c15f613 100644
--- a/target/linux/brcm63xx/dts/bcm6318.dtsi
+++ b/target/linux/brcm63xx/dts/bcm6318.dtsi
@@ -3,6 +3,10 @@
 	#size-cells = <1>;
 	compatible = "brcm,bcm6318";
 
+	aliases {
+		gpio0 = &gpio0;
+	};
+
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
@@ -51,5 +55,29 @@
 			interrupt-parent = <&cpu_intc>;
 			interrupts = <2>;
 		};
+
+		gpio0: gpio-controller at 10000084 {
+			compatible = "basic-mmio-gpio";
+			reg = <0x10000084 0x4>, <0x1000008c 0x4>;
+			reg-names = "dirout", "dat";
+
+			gpio-controller;
+			#gpio-cells = <2>;
+
+			num-gpios = <32>;
+			byte-be;
+		};
+
+		gpio1: gpio-controller at 1000080 {
+			compatible = "basic-mmio-gpio";
+			reg = <0x10000080 0x4>, <0x10000088 0x4>;
+			reg-names = "dirout", "dat";
+
+			gpio-controller;
+			#gpio-cells = <2>;
+
+			num-gpios = <18>;
+			byte-be;
+		};
 	};
 };
diff --git a/target/linux/brcm63xx/dts/bcm63268.dtsi b/target/linux/brcm63xx/dts/bcm63268.dtsi
index bc80d70..d0d9246 100644
--- a/target/linux/brcm63xx/dts/bcm63268.dtsi
+++ b/target/linux/brcm63xx/dts/bcm63268.dtsi
@@ -3,6 +3,10 @@
 	#size-cells = <1>;
 	compatible = "brcm,bcm63268";
 
+	aliases {
+		gpio0 = &gpio0;
+	};
+
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
@@ -58,5 +62,29 @@
 			interrupt-parent = <&cpu_intc>;
 			interrupts = <2>, <3>;
 		};
+
+		gpio0: gpio-controller at 10000084 {
+			compatible = "basic-mmio-gpio";
+			reg = <0x100000c4 0x4>, <0x100000cc 0x4>;
+			reg-names = "dirout", "dat";
+
+			gpio-controller;
+			#gpio-cells = <2>;
+
+			num-gpios = <32>;
+			byte-be;
+		};
+
+		gpio1: gpio-controller at 1000080 {
+			compatible = "basic-mmio-gpio";
+			reg = <0x100000c0 0x4>, <0x100000c8 0x4>;
+			reg-names = "dirout", "dat";
+
+			gpio-controller;
+			#gpio-cells = <2>;
+
+			num-gpios = <20>;
+			byte-be;
+		};
 	};
 };
diff --git a/target/linux/brcm63xx/dts/bcm6328.dtsi b/target/linux/brcm63xx/dts/bcm6328.dtsi
index 53f96ff..ccb61e0 100644
--- a/target/linux/brcm63xx/dts/bcm6328.dtsi
+++ b/target/linux/brcm63xx/dts/bcm6328.dtsi
@@ -3,6 +3,10 @@
 	#size-cells = <1>;
 	compatible = "brcm,bcm6328";
 
+	aliases {
+		gpio0 = &gpio0;
+	};
+
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
@@ -51,5 +55,17 @@
 			interrupt-parent = <&cpu_intc>;
 			interrupts = <2>;
 		};
+
+		gpio0: gpio-controller at 10000084 {
+			compatible = "basic-mmio-gpio";
+			reg = <0x10000084 0x4>, <0x1000008c 0x4>;
+			reg-names = "dirout", "dat";
+
+			gpio-controller;
+			#gpio-cells = <2>;
+
+			num-gpios = <32>;
+			byte-be;
+		};
 	};
 };
diff --git a/target/linux/brcm63xx/dts/bcm6338.dtsi b/target/linux/brcm63xx/dts/bcm6338.dtsi
index c1980f4..858bcf0 100644
--- a/target/linux/brcm63xx/dts/bcm6338.dtsi
+++ b/target/linux/brcm63xx/dts/bcm6338.dtsi
@@ -5,6 +5,7 @@
 
 	aliases {
 		pflash = &pflash;
+		gpio0 = &gpio0;
 	};
 
 	cpus {
@@ -65,5 +66,17 @@
 			interrupt-parent = <&cpu_intc>;
 			interrupts = <3>, <4>, <5>, <6>;
 		};
+
+		gpio0: gpio-controller at 10000084 {
+			compatible = "basic-mmio-gpio";
+			reg = <0xfffe0404 0x4>, <0xfffe040c 0x4>;
+			reg-names = "dirout", "dat";
+
+			gpio-controller;
+			#gpio-cells = <2>;
+
+			num-gpios = <8>;
+			byte-be;
+		};
 	};
 };
diff --git a/target/linux/brcm63xx/dts/bcm6345.dtsi b/target/linux/brcm63xx/dts/bcm6345.dtsi
index e8e7016..6d7d1d6 100644
--- a/target/linux/brcm63xx/dts/bcm6345.dtsi
+++ b/target/linux/brcm63xx/dts/bcm6345.dtsi
@@ -5,6 +5,7 @@
 
 	aliases {
 		pflash = &pflash;
+		gpio0 = &gpio0;
 	};
 
 	cpus {
@@ -65,5 +66,17 @@
 			interrupt-parent = <&cpu_intc>;
 			interrupts = <3>, <4>, <5>, <6>;
 		};
+
+		gpio0: gpio-controller at 10000084 {
+			compatible = "basic-mmio-gpio";
+			reg = <0xfffe0404 0x4>, <0xfffe0408 0x4>;
+			reg-names = "dirout", "dat";
+
+			gpio-controller;
+			#gpio-cells = <2>;
+
+			num-gpios = <16>;
+			byte-be;
+		};
 	};
 };
diff --git a/target/linux/brcm63xx/dts/bcm6348.dtsi b/target/linux/brcm63xx/dts/bcm6348.dtsi
index 7dd423b..3facb50 100644
--- a/target/linux/brcm63xx/dts/bcm6348.dtsi
+++ b/target/linux/brcm63xx/dts/bcm6348.dtsi
@@ -5,6 +5,7 @@
 
 	aliases {
 		pflash = &pflash;
+		gpio0 = &gpio0;
 	};
 
 	cpus {
@@ -67,5 +68,29 @@
 
 			brcm,field-width = <5>;
 		};
+
+		gpio0: gpio-controller at 10000084 {
+			compatible = "basic-mmio-gpio";
+			reg = <0xfffe0404 0x4>, <0xfffe040c 0x4>;
+			reg-names = "dirout", "dat";
+
+			gpio-controller;
+			#gpio-cells = <2>;
+
+			num-gpios = <32>;
+			byte-be;
+		};
+
+		gpio1: gpio-controller at 1000080 {
+			compatible = "basic-mmio-gpio";
+			reg = <0xfffe0400 0x4>, <0xfffe0408 0x4>;
+			reg-names = "dirout", "dat";
+
+			gpio-controller;
+			#gpio-cells = <2>;
+
+			num-gpios = <5>;
+			byte-be;
+		};
 	};
 };
diff --git a/target/linux/brcm63xx/dts/bcm6358.dtsi b/target/linux/brcm63xx/dts/bcm6358.dtsi
index 7217b8d..711b7de 100644
--- a/target/linux/brcm63xx/dts/bcm6358.dtsi
+++ b/target/linux/brcm63xx/dts/bcm6358.dtsi
@@ -5,6 +5,7 @@
 
 	aliases {
 		pflash = &pflash;
+		gpio0 = &gpio0;
 	};
 
 	cpus {
@@ -83,5 +84,29 @@
 			interrupt-parent = <&periph_intc>;
 			interrupts = <20>, <21>;
 		};
+
+		gpio0: gpio-controller at 10000084 {
+			compatible = "basic-mmio-gpio";
+			reg = <0xfffe0084 0x4>, <0xfffe008c 0x4>;
+			reg-names = "dirout", "dat";
+
+			gpio-controller;
+			#gpio-cells = <2>;
+
+			num-gpios = <32>;
+			byte-be;
+		};
+
+		gpio1: gpio-controller at 1000080 {
+			compatible = "basic-mmio-gpio";
+			reg = <0xfffe0080 0x4>, <0xfffe0088 0x4>;
+			reg-names = "dirout", "dat";
+
+			gpio-controller;
+			#gpio-cells = <2>;
+
+			num-gpios = <8>;
+			byte-be;
+		};
 	};
 };
diff --git a/target/linux/brcm63xx/dts/bcm6362.dtsi b/target/linux/brcm63xx/dts/bcm6362.dtsi
index 4e2e41d..6db82f9 100644
--- a/target/linux/brcm63xx/dts/bcm6362.dtsi
+++ b/target/linux/brcm63xx/dts/bcm6362.dtsi
@@ -3,6 +3,10 @@
 	#size-cells = <1>;
 	compatible = "brcm,bcm6362";
 
+	aliases {
+		gpio0 = &gpio0;
+	};
+
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
@@ -58,5 +62,29 @@
 			interrupt-parent = <&cpu_intc>;
 			interrupts = <2>, <3>;
 		};
+
+		gpio0: gpio-controller at 10000084 {
+			compatible = "basic-mmio-gpio";
+			reg = <0x10000084 0x4>, <0x1000008c 0x4>;
+			reg-names = "dirout", "dat";
+
+			gpio-controller;
+			#gpio-cells = <2>;
+
+			num-gpios = <32>;
+			byte-be;
+		};
+
+		gpio1: gpio-controller at 1000080 {
+			compatible = "basic-mmio-gpio";
+			reg = <0x10000080 0x4>, <0x10000088 0x4>;
+			reg-names = "dirout", "dat";
+
+			gpio-controller;
+			#gpio-cells = <2>;
+
+			num-gpios = <16>;
+			byte-be;
+		};
 	};
 };
diff --git a/target/linux/brcm63xx/dts/bcm6368.dtsi b/target/linux/brcm63xx/dts/bcm6368.dtsi
index 27b9f62..b294ccd 100644
--- a/target/linux/brcm63xx/dts/bcm6368.dtsi
+++ b/target/linux/brcm63xx/dts/bcm6368.dtsi
@@ -5,6 +5,7 @@
 
 	aliases {
 		pflash = &pflash;
+		gpio0 = &gpio0;
 	};
 
 	cpus {
@@ -73,6 +74,30 @@
 			interrupt-parent = <&cpu_intc>;
 			interrupts = <2>, <3>;
 		};
+
+		gpio0: gpio-controller at 10000084 {
+			compatible = "basic-mmio-gpio";
+			reg = <0x10000084 0x4>, <0x1000008c 0x4>;
+			reg-names = "dirout", "dat";
+
+			gpio-controller;
+			#gpio-cells = <2>;
+
+			num-gpios = <32>;
+			byte-be;
+		};
+
+		gpio1: gpio-controller at 1000080 {
+			compatible = "basic-mmio-gpio";
+			reg = <0x10000080 0x4>, <0x10000088 0x4>;
+			reg-names = "dirout", "dat";
+
+			gpio-controller;
+			#gpio-cells = <2>;
+
+			num-gpios = <6>;
+			byte-be;
+		};
 	};
 
 	pflash: nor at 18000000 {
diff --git a/target/linux/brcm63xx/dts/bcm963281TAN.dts b/target/linux/brcm63xx/dts/bcm963281TAN.dts
index be69997..f257125 100644
--- a/target/linux/brcm63xx/dts/bcm963281TAN.dts
+++ b/target/linux/brcm63xx/dts/bcm963281TAN.dts
@@ -5,4 +5,34 @@
 / {
 	model = "Broadcom bcm963281TAN reference board";
 	compatible = "brcm,bcm963281TAN", "brcm,bcm6328";
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		inet {
+			label = "963281TAN::internet";
+			gpios = <&gpio0 1 1>;
+		};
+		power {
+			label = "963281TAN::power";
+			gpios = <&gpio0 4 1>;
+			default-state = "on";
+		};
+		inet_fail {
+			label = "963281TAN::internet-fail";
+			gpios = <&gpio0 7 1>;
+		};
+		power_fail {
+			label = "963281TAN::power-fail";
+			gpios = <&gpio0 8 1>;
+		};
+		wps {
+			label = "963281TAN::wps";
+			gpios = <&gpio0 9 1>;
+		};
+		dsl {
+			label = "963281TAN::dsl";
+			gpios = <&gpio0 11 1>;
+		};
+	};
 };
diff --git a/target/linux/brcm63xx/dts/bcm96328avng.dts b/target/linux/brcm63xx/dts/bcm96328avng.dts
index 52e7daf..8dbdbda 100644
--- a/target/linux/brcm63xx/dts/bcm96328avng.dts
+++ b/target/linux/brcm63xx/dts/bcm96328avng.dts
@@ -5,4 +5,34 @@
 / {
 	model = "Broadcom BCM96328avng reference board";
 	compatible = "brcm,bcm96328avng", "brcm,bcm6328";
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		inet_fail {
+			label = "96328avng::internet-fail";
+			gpios = <&gpio0 2 1>;
+		};
+		dsl {
+			label = "96328avng::dsl";
+			gpios = <&gpio0 3 1>;
+		};
+		power {
+			label = "96328avng::power";
+			gpios = <&gpio0 4 1>;
+			default-state = "on";
+		};
+		power_fail {
+			label = "96328avng::power-fail";
+			gpios = <&gpio0 8 1>;
+		};
+		wps {
+			label = "96328avng::wps";
+			gpios = <&gpio0 9 1>;
+		};
+		inet {
+			label = "96328avng::internet";
+			gpios = <&gpio0 11 1>;
+		};
+	};
 };
diff --git a/target/linux/brcm63xx/dts/bcm96338GW.dts b/target/linux/brcm63xx/dts/bcm96338GW.dts
index 2040e2f..d378df1 100644
--- a/target/linux/brcm63xx/dts/bcm96338GW.dts
+++ b/target/linux/brcm63xx/dts/bcm96338GW.dts
@@ -5,4 +5,30 @@
 / {
 	model = "Broadcom BCM96338GW reference board";
 	compatible = "brcm,bcm96338gw", "brcm,bcm6338";
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		power_green {
+			label = "96338GW:green:power";
+			gpios = <&gpio0 0 1>;
+			default-state = "on";
+		};
+		stop_green {
+			label = "96338GW:green:stop";
+			gpios = <&gpio0 1 1>;
+		};
+		dsl_green {
+			label = "96338GW:green:adsl";
+			gpios = <&gpio0 3 1>;
+		};
+		ppp_fail_green {
+			label = "96338GW:green:ppp-fail";
+			gpios = <&gpio0 4 1>;
+		};
+		ses_green {
+			label = "96338GW:green:ses";
+			gpios = <&gpio0 5 1>;
+		};
+	};
 };
diff --git a/target/linux/brcm63xx/dts/bcm96338W.dts b/target/linux/brcm63xx/dts/bcm96338W.dts
index 1609541..9cca783 100644
--- a/target/linux/brcm63xx/dts/bcm96338W.dts
+++ b/target/linux/brcm63xx/dts/bcm96338W.dts
@@ -5,4 +5,30 @@
 / {
 	model = "Broadcom BCM96338W reference board";
 	compatible = "brcm,bcm96338w", "brcm,bcm6338";
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		power_green {
+			label = "96338W:green:power";
+			gpios = <&gpio0 0 1>;
+			default-state = "on";
+		};
+		stop_green {
+			label = "96338W:green:stop";
+			gpios = <&gpio0 1 1>;
+		};
+		dsl_green {
+			label = "96338W:green:adsl";
+			gpios = <&gpio0 3 1>;
+		};
+		ppp_fail_green {
+			label = "96338W:green:ppp-fail";
+			gpios = <&gpio0 4 1>;
+		};
+		ses_green {
+			label = "96338W:green:ses";
+			gpios = <&gpio0 5 1>;
+		};
+	};
 };
diff --git a/target/linux/brcm63xx/dts/bcm96348GW-10.dts b/target/linux/brcm63xx/dts/bcm96348GW-10.dts
index 172ee62..173a8c3 100644
--- a/target/linux/brcm63xx/dts/bcm96348GW-10.dts
+++ b/target/linux/brcm63xx/dts/bcm96348GW-10.dts
@@ -5,4 +5,44 @@
 / {
 	model = "Broadcom BCM96348GW-10 reference board";
 	compatible = "brcm,bcm96348gw-10", "brcm,bcm6348";
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		debounce-interval = <60>;
+
+		reset {
+			label = "reset";
+			gpios = <&gpio0 6 1>;
+			linux,code = <0x198>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		power_green {
+			label = "96348GW-10:green:power";
+			gpios = <&gpio0 0 1>;
+			default-state = "on";
+		};
+		stop_green {
+			label = "96348GW-10:green:stop";
+			gpios = <&gpio0 1 1>;
+		};
+		adsl_fail_green {
+			label = "96348GW-10:green:adsl-fail";
+			gpios = <&gpio0 2 1>;
+		};
+		ppp_green {
+			label = "96348GW-10:green:ppp";
+			gpios = <&gpio0 3 1>;
+		};
+		ppp_fail_green {
+			label = "96348GW-10:green:ppp-fail";
+			gpios = <&gpio0 4 1>;
+		};
+	};
 };
diff --git a/target/linux/brcm63xx/dts/bcm96348GW-11.dts b/target/linux/brcm63xx/dts/bcm96348GW-11.dts
index 906ecab..15828a1 100644
--- a/target/linux/brcm63xx/dts/bcm96348GW-11.dts
+++ b/target/linux/brcm63xx/dts/bcm96348GW-11.dts
@@ -5,4 +5,44 @@
 / {
 	model = "Broadcom BCM96348GW-11 reference board";
 	compatible = "brcm,bcm96348gw-11", "brcm,bcm6348";
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		debounce-interval = <60>;
+
+		reset {
+			label = "reset";
+			gpios = <&gpio1 1 1>;
+			linux,code = <0x198>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		power_green {
+			label = "96348GW-11:green:power";
+			gpios = <&gpio0 0 1>;
+			default-state = "on";
+		};
+		stop_green {
+			label = "96348GW-11:green:stop";
+			gpios = <&gpio0 1 1>;
+		};
+		adsl_fail_green {
+			label = "96348GW-11:green:adsl-fail";
+			gpios = <&gpio0 2 1>;
+		};
+		ppp_green {
+			label = "96348GW-11:green:ppp";
+			gpios = <&gpio0 3 1>;
+		};
+		ppp_fail_green {
+			label = "96348GW-11:green:ppp-fail";
+			gpios = <&gpio0 4 1>;
+		};
+	};
 };
diff --git a/target/linux/brcm63xx/dts/bcm96348GW.dts b/target/linux/brcm63xx/dts/bcm96348GW.dts
index cd039f8..fcce239 100644
--- a/target/linux/brcm63xx/dts/bcm96348GW.dts
+++ b/target/linux/brcm63xx/dts/bcm96348GW.dts
@@ -5,4 +5,44 @@
 / {
 	model = "Broadcom BCM96348GW reference board";
 	compatible = "brcm,bcm96348gw", "brcm,bcm6348";
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		debounce-interval = <60>;
+
+		reset {
+			label = "reset";
+			gpios = <&gpio1 4 1>;
+			linux,code = <0x198>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		power_green {
+			label = "96348GW:green:power";
+			gpios = <&gpio0 0 1>;
+			default-state = "on";
+		};
+		stop_green {
+			label = "96348GW:green:stop";
+			gpios = <&gpio0 1 1>;
+		};
+		adsl_fail_green {
+			label = "96348GW:green:adsl-fail";
+			gpios = <&gpio0 2 1>;
+		};
+		ppp_green {
+			label = "96348GW:green:ppp";
+			gpios = <&gpio0 3 1>;
+		};
+		ppp_fail_green {
+			label = "96348GW:green:ppp-fail";
+			gpios = <&gpio0 4 1>;
+		};
+	};
 };
diff --git a/target/linux/brcm63xx/dts/bcm96348R.dts b/target/linux/brcm63xx/dts/bcm96348R.dts
index 004abcb..69842b1 100644
--- a/target/linux/brcm63xx/dts/bcm96348R.dts
+++ b/target/linux/brcm63xx/dts/bcm96348R.dts
@@ -5,4 +5,30 @@
 / {
 	model = "Broadcom 96348R reference board";
 	compatible = "brcm,bcm96348r", "brcm,bcm6348";
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		power_green {
+			label = "96348R:green:power";
+			gpios = <&gpio0 0 1>;
+			default-state = "on";
+		};
+		stop_green {
+			label = "96348R:green:stop";
+			gpios = <&gpio0 1 1>;
+		};
+		adsl_fail_green {
+			label = "96348R:green:adsl-fail";
+			gpios = <&gpio0 2 1>;
+		};
+		ppp_green {
+			label = "96348R:green:ppp";
+			gpios = <&gpio0 3 1>;
+		};
+		ppp_fail_green {
+			label = "96348R:green:ppp-fail";
+			gpios = <&gpio0 4 1>;
+		};
+	};
 };
diff --git a/target/linux/brcm63xx/dts/bcm96358VW.dts b/target/linux/brcm63xx/dts/bcm96358VW.dts
index a978d41..57e26f6 100644
--- a/target/linux/brcm63xx/dts/bcm96358VW.dts
+++ b/target/linux/brcm63xx/dts/bcm96358VW.dts
@@ -5,4 +5,30 @@
 / {
 	model = "Broadcom BCM96358VW reference board";
 	compatible = "brcm,bcm96358vw", "brcm,bcm6358";
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		power_green {
+			label = "96358VW:green:power";
+			gpios = <&gpio0 4 0>;
+			default-state = "on";
+		};
+		stop_green {
+			label = "96358VW:green:stop";
+			gpios = <&gpio0 5 0>;
+		};
+		adsl_fail_green {
+			label = "96358VW:green:adsl-fail";
+			gpios = <&gpio0 15 1>;
+		};
+		ppp_green {
+			label = "96358VW:green:ppp";
+			gpios = <&gpio0 22 1>;
+		};
+		ppp_fail_green {
+			label = "96358VW:green:ppp-fail";
+			gpios = <&gpio0 23 1>;
+		};
+	};
 };
diff --git a/target/linux/brcm63xx/dts/bcm96358VW2.dts b/target/linux/brcm63xx/dts/bcm96358VW2.dts
index bcf3c81..730426f 100644
--- a/target/linux/brcm63xx/dts/bcm96358VW2.dts
+++ b/target/linux/brcm63xx/dts/bcm96358VW2.dts
@@ -5,4 +5,26 @@
 / {
 	model = "Broadcom BCM96358VW2 reference board";
 	compatible = "brcm,bcm96358vw2", "brcm,bcm6358";
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		stop_green {
+			label = "96358VW2:green:stop";
+			gpios = <&gpio0 4 1>;
+		};
+		power_green {
+			label = "96358VW2:green:power";
+			gpios = <&gpio0 5 1>;
+			default-state = "on";
+		};
+		adsl_green {
+			label = "96358VW2:green:adsl";
+			gpios = <&gpio0 22 1>;
+		};
+		ppp_fail_green {
+			label = "96358VW2:green:ppp-fail";
+			gpios = <&gpio0 23 0>;
+		};
+	};
 };
diff --git a/target/linux/brcm63xx/dts/bcm96368MVNgr.dts b/target/linux/brcm63xx/dts/bcm96368MVNgr.dts
index b274bfd..fa3e6e8 100644
--- a/target/linux/brcm63xx/dts/bcm96368MVNgr.dts
+++ b/target/linux/brcm63xx/dts/bcm96368MVNgr.dts
@@ -5,4 +5,30 @@
 / {
 	model = "Broadcom BCM96368MVNgr reference board";
 	compatible = "brcm,bcm96368mvngr", "brcm,bcm6368";
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		dsl_green {
+			label = "96368MVNgr:green:adsl";
+			gpios = <&gpio0 2 1>;
+		};
+		inet_fail_green {
+			label = "96368MVNgr:green:inet-fail";
+			gpios = <&gpio0 3 0>;
+		};
+		inet_green {
+			label = "96368MVNgr:green:inet";
+			gpios = <&gpio0 5 0>;
+		};
+		power_green {
+			label = "96368MVNgr:green:power";
+			gpios = <&gpio0 22 0>;
+			default-state = "on";
+		};
+		wps_green {
+			label = "96368MVNgr:green:wps";
+			gpios = <&gpio0 23 1>;
+		};
+	};
 };
diff --git a/target/linux/brcm63xx/dts/bcm96368MVWG.dts b/target/linux/brcm63xx/dts/bcm96368MVWG.dts
index f462411..0fb3566 100644
--- a/target/linux/brcm63xx/dts/bcm96368MVWG.dts
+++ b/target/linux/brcm63xx/dts/bcm96368MVWG.dts
@@ -5,4 +5,30 @@
 / {
 	model = "Broadcom BCM96368MVWG reference board";
 	compatible = "brcm,bcm96368mvwg", "brcm,bcm6368";
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		dsl_green {
+			label = "96368MVWG:green:adsl";
+			gpios = <&gpio0 2 1>;
+		};
+		ppp_green {
+			label = "96368MVWG:green:ppp";
+			gpios = <&gpio0 5 0>;
+		};
+		power_green {
+			label = "96368MVWG:green:power";
+			gpios = <&gpio0 22 0>;
+			default-state = "on";
+		};
+		wps_green {
+			label = "96368MVWG:green:wps";
+			gpios = <&gpio0 23 1>;
+		};
+		ppp_fail_red {
+			label = "96368MVWG:red:ppp-fail";
+			gpios = <&gpio0 31 0>;
+		};
+	};
 };
diff --git a/target/linux/brcm63xx/dts/cpva642.dts b/target/linux/brcm63xx/dts/cpva642.dts
index a12dd81..c65efb4 100644
--- a/target/linux/brcm63xx/dts/cpva642.dts
+++ b/target/linux/brcm63xx/dts/cpva642.dts
@@ -5,6 +5,71 @@
 / {
 	model = "Telsey CPVA642-type (CPA-ZNTE60T)";
 	compatible = "telsey,cpva642", "brcm,bcm6358";
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		debounce-interval = <60>;
+
+		reset {
+			label = "reset";
+			gpios = <&gpio1 4 1>;
+			linux,code = <0x198>;
+		};
+		wps {
+			label = "wps";
+			gpios = <&gpio1 5 1>;
+			linux,code = <0x211>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		eth_green {
+			label = "CPVA642:green:ether";
+			gpios = <&gpio0 1 1>;
+		};
+		phone2_green {
+			label = "CPVA642:green:phone2";
+			gpios = <&gpio0 2 1>;
+		};
+		usb_green {
+			label = "CPVA642:green:usb";
+			gpios = <&gpio0 3 1>;
+		};
+		phone1_green {
+			label = "CPVA642:green:phone1";
+			gpios = <&gpio0 4 1>;
+		};
+		wifi_red {
+			label = "CPVA642:red:wifi";
+			gpios = <&gpio0 6 1>;
+		};
+		link_red {
+			label = "CPVA642:red:link";
+			gpios = <&gpio0 9 1>;
+		};
+		link_green {
+			label = "CPVA642:green:link";
+			gpios = <&gpio0 10 1>;
+		};
+		power_green {
+			label = "CPVA642:green:power";
+			gpios = <&gpio0 11 1>;
+			default-state = "on";
+		};
+		power_red {
+			label = "CPVA642:red:power";
+			gpios = <&gpio0 14 1>;
+		};
+		wifi_green {
+			label = "CPVA642:green:wifi";
+			gpios = <&gpio0 28 0>;
+		};
+	};
 };
 
 &pflash {
diff --git a/target/linux/brcm63xx/dts/ct-5365.dts b/target/linux/brcm63xx/dts/ct-5365.dts
index 2ada4f8..7b89bf2 100644
--- a/target/linux/brcm63xx/dts/ct-5365.dts
+++ b/target/linux/brcm63xx/dts/ct-5365.dts
@@ -5,6 +5,48 @@
 / {
 	model = "Comtrend CT-5365";
 	compatible = "comtrend,ct-5365", "brcm,bcm6348";
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		debounce-interval = <60>;
+
+		reset {
+			label = "reset";
+			gpios = <&gpio1 1 1>;
+			linux,code = <0x198>;
+		};
+		wlan {
+			label = "wlan";
+			gpios = <&gpio1 2 1>;
+			linux,code = <0xee>;
+		};
+		wps {
+			label = "wps";
+			gpios = <&gpio1 3 1>;
+			linux,code = <0x211>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		power_green {
+			label = "96348A-122:green:power";
+			gpios = <&gpio0 0 1>;
+			default-state = "on";
+		};
+		alarm_red {
+			label = "96348A-122:red:alarm";
+			gpios = <&gpio0 2 1>;
+		};
+		wps_green {
+			label = "96348A-122:green:wps";
+			gpios = <&gpio0 6 1>;
+		};
+	};
 };
 
 &pflash {
diff --git a/target/linux/brcm63xx/dts/ct-6373.dts b/target/linux/brcm63xx/dts/ct-6373.dts
index 1aca23a..b8be39d 100644
--- a/target/linux/brcm63xx/dts/ct-6373.dts
+++ b/target/linux/brcm63xx/dts/ct-6373.dts
@@ -5,6 +5,74 @@
 / {
 	model = "Comtrend CT-6373";
 	compatible = "comtrend,ct-6373", "brcm,bcm6358";
+
+	spi-gpio {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "spi-gpio";
+
+		gpio-mosi = <&gpio0 7 0>;
+		gpio-sck = <&gpio0 6 0>;
+		num-chipselects = <0>;
+
+		hc595: gpio-spi-controller at 0 {
+			compatible = "fairchild,74hc595";
+			reg = <0>;
+			registers-number = <1>;
+			spi-max-frequency = <100000>;
+
+			gpio-controller;
+			#gpio-cells = <2>;
+		};
+	};
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		debounce-interval = <60>;
+
+		reset {
+			label = "reset";
+			gpios = <&gpio1 3 1>;
+			linux,code = <0x198>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		power_green {
+			label = "CT6373-1:green:power";
+			gpios = <&gpio0 0 0>;
+			default-state = "on";
+		};
+		usb_green {
+			label = "CT6373-1:green:usb";
+			gpios = <&gpio0 3 1>;
+		};
+		wlan_green {
+			label = "CT6373-1:green:wlan";
+			gpios = <&gpio0 9 1>;
+		};
+		dsl_green {
+			label = "CT6373-1:green:adsl";
+			gpios = <&hc595 0 1>;
+		};
+		line_green {
+			label = "CT6373-1:green:line";
+			gpios = <&hc595 1 1>;
+		};
+		fxs1_green {
+			label = "CT6373-1:green:fxs1";
+			gpios = <&hc595 2 1>;
+		};
+		fxs2_green {
+			label = "CT6373-1:green:fxs2";
+			gpios = <&hc595 3 1>;
+		};
+	};
 };
 
 &pflash {
diff --git a/target/linux/brcm63xx/dts/ct536plus.dts b/target/linux/brcm63xx/dts/ct536plus.dts
index d8e2d3b..c92bc90 100644
--- a/target/linux/brcm63xx/dts/ct536plus.dts
+++ b/target/linux/brcm63xx/dts/ct536plus.dts
@@ -5,4 +5,32 @@
 / {
 	model = "Comtrend CT-536+/CT-5621T";
 	compatible = "comtrend,ct536+", "brcm,bcm6348";
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		debounce-interval = <60>;
+
+		reset {
+			label = "reset";
+			gpios = <&gpio1 1 1>;
+			linux,code = <0x198>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		power_green {
+			label = "CT536_CT5621:green:power";
+			gpios = <&gpio0 0 1>;
+			default-state = "on";
+		};
+		adsl_fail_green {
+			label = "CT536_CT5621:green:adsl-fail";
+			gpios = <&gpio0 2 1>;
+		};
+	};
 };
diff --git a/target/linux/brcm63xx/dts/dg834gtpn.dts b/target/linux/brcm63xx/dts/dg834gtpn.dts
index 8742985..f4ece9e 100644
--- a/target/linux/brcm63xx/dts/dg834gtpn.dts
+++ b/target/linux/brcm63xx/dts/dg834gtpn.dts
@@ -5,6 +5,46 @@
 / {
 	model = "Netgear DG834GT/PN";
 	compatible = "netgear,dg834gtpn", "brcm,bcm6348";
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		debounce-interval = <60>;
+
+		reset {
+			label = "reset";
+			gpios = <&gpio0 6 1>;
+			linux,code = <0x198>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		power_green {
+			label = "96348GW-10:green:power";
+			gpios = <&gpio0 0 1>;
+			default-state = "on";
+		};
+		stop_green {
+			label = "96348GW-10:green:stop";
+			gpios = <&gpio0 1 1>;
+		};
+		adsl_fail_green {
+			label = "96348GW-10:green:adsl-fail";
+			gpios = <&gpio0 2 1>;
+		};
+		ppp_green {
+			label = "96348GW-10:green:ppp";
+			gpios = <&gpio0 3 1>;
+		};
+		ppp_fail_green {
+			label = "96348GW-10:green:ppp-fail";
+			gpios = <&gpio0 4 1>;
+		};
+	};
 };
 
 &pflash {
diff --git a/target/linux/brcm63xx/dts/dsl-2640b-b.dts b/target/linux/brcm63xx/dts/dsl-2640b-b.dts
index efc0dc5..6f2bda6 100644
--- a/target/linux/brcm63xx/dts/dsl-2640b-b.dts
+++ b/target/linux/brcm63xx/dts/dsl-2640b-b.dts
@@ -5,6 +5,42 @@
 / {
 	model = "D-Link DSL-2640B rev B2";
 	compatible = "d-link,dsl-2640b-b", "brcm,bcm6348";
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		debounce-interval = <60>;
+
+		reset {
+			label = "reset";
+			gpios = <&gpio0 7 1>;
+			linux,code = <0x198>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		power_green {
+			label = "D-4P-W:green:power";
+			gpios = <&gpio0 0 1>;
+			default-state = "on";
+		};
+		status {
+			label = "D-4P-W::status";
+			gpios = <&gpio0 3 1>;
+		};
+		inet_green {
+			label = "D-4P-W:green:internet";
+			gpios = <&gpio0 4 1>;
+		};
+		inet_red {
+			label = "D-4P-W:red:internet";
+			gpios = <&gpio0 5 1>;
+		};
+	};
 };
 
 &pflash {
diff --git a/target/linux/brcm63xx/dts/dsl-2650u.dts b/target/linux/brcm63xx/dts/dsl-2650u.dts
index 23b3301..7e88e01 100644
--- a/target/linux/brcm63xx/dts/dsl-2650u.dts
+++ b/target/linux/brcm63xx/dts/dsl-2650u.dts
@@ -5,6 +5,28 @@
 / {
 	model = "D-Link DSL-2650U";
 	compatible = "d-link,dsl-2650u", "brcm,bcm6358";
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		stop_green {
+			label = "96358VW2:green:stop";
+			gpios = <&gpio0 4 1>;
+		};
+		power_green {
+			label = "96358VW2:green:power";
+			gpios = <&gpio0 5 1>;
+			default-state = "on";
+		};
+		adsl_green {
+			label = "96358VW2:green:adsl";
+			gpios = <&gpio0 22 1>;
+		};
+		ppp_fail_green {
+			label = "96358VW2:green:ppp-fail";
+			gpios = <&gpio0 23 0>;
+		};
+	};
 };
 
 &pflash {
diff --git a/target/linux/brcm63xx/dts/dsl-274xb-c.dts b/target/linux/brcm63xx/dts/dsl-274xb-c.dts
index e36ddfa..df0f853 100644
--- a/target/linux/brcm63xx/dts/dsl-274xb-c.dts
+++ b/target/linux/brcm63xx/dts/dsl-274xb-c.dts
@@ -5,6 +5,46 @@
 / {
 	model = "D-Link DSL-2740B/DSL-2741B rev C2/3";
 	compatible = "d-link,dsl-274xb-c2", "brcm,bcm6358";
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		debounce-interval = <60>;
+
+		reset {
+			label = "reset";
+			gpios = <&gpio1 2 1>;
+			linux,code = <0x198>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		inet_green {
+			label = "dsl-274xb:green:internet";
+			gpios = <&gpio0 2 1>;
+		};
+		power_red {
+			label = "dsl-274xb:red:power";
+			gpios = <&gpio0 4 1>;
+		};
+		power_green {
+			label = "dsl-274xb:green:power";
+			gpios = <&gpio0 5 1>;
+			default-state = "on";
+		};
+		dsl_green {
+			label = "dsl-274xb:green:adsl";
+			gpios = <&gpio0 9 1>;
+		};
+		inet_red {
+			label = "dsl-274xb:red:internet";
+			gpios = <&gpio0 10 1>;
+		};
+	};
 };
 
 &pflash {
diff --git a/target/linux/brcm63xx/dts/dsl-274xb-f.dts b/target/linux/brcm63xx/dts/dsl-274xb-f.dts
index a17f988..f8ad084 100644
--- a/target/linux/brcm63xx/dts/dsl-274xb-f.dts
+++ b/target/linux/brcm63xx/dts/dsl-274xb-f.dts
@@ -5,4 +5,58 @@
 / {
 	model = "D-Link DSL-2740B/DSL-2741B rev F1";
 	compatible = "d-link,dsl-274xb-f", "brcm,bcm6328";
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		debounce-interval = <60>;
+
+		wifi {
+			label = "wifi";
+			gpios = <&gpio0 10 1>;
+			linux,code = <0xee>;
+		};
+		reset {
+			label = "reset";
+			gpios = <&gpio0 23 1>;
+			linux,code = <0x198>;
+		};
+		wps {
+			label = "wps";
+			gpios = <&gpio0 24 1>;
+			linux,code = <0x211>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		inet_red {
+			label = "dsl-274xb:red:internet";
+			gpios = <&gpio0 2 1>;
+		};
+		dsl_green {
+			label = "dsl-274xb:green:dsl";
+			gpios = <&gpio0 3 1>;
+		};
+		power_green {
+			label = "dsl-274xb:green:power";
+			gpios = <&gpio0 4 1>;
+			default-state = "on";
+		};
+		power_red {
+			label = "dsl-274xb:red:power";
+			gpios = <&gpio0 8 1>;
+		};
+		wps_blue {
+			label = "dsl-274xb:blue:wps";
+			gpios = <&gpio0 9 1>;
+		};
+		inet_green {
+			label = "dsl-274xb:green:internet";
+			gpios = <&gpio0 11 1>;
+		};
+	};
 };
diff --git a/target/linux/brcm63xx/dts/dva-g3810bn_tl.dts b/target/linux/brcm63xx/dts/dva-g3810bn_tl.dts
index 20accd7..263485d 100644
--- a/target/linux/brcm63xx/dts/dva-g3810bn_tl.dts
+++ b/target/linux/brcm63xx/dts/dva-g3810bn_tl.dts
@@ -5,4 +5,44 @@
 / {
 	model = "D-Link DVA-G3810BN/TL";
 	compatible = "d-link,dva-g3810bn/tl", "brcm,bcm6358";
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		debounce-interval = <60>;
+
+		reset {
+			label = "reset";
+			gpios = <&gpio1 2 1>;
+			linux,code = <0x198>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		voip {
+			label = "DVAG3810BN::voip";
+			gpios = <&gpio0 1 0>;
+		};
+		power {
+			label = "DVAG3810BN::power";
+			gpios = <&gpio0 4 0>;
+			default-state = "on";
+		};
+		stop {
+			label = "DVAG3810BN::stop";
+			gpios = <&gpio0 5 0>;
+		};
+		dsl {
+			label = "DVAG3810BN::dsl";
+			gpios = <&gpio0 22 1>;
+		};
+		inet {
+			label = "DVAG3810BN::internet";
+			gpios = <&gpio0 23 1>;
+		};
+	};
 };
diff --git a/target/linux/brcm63xx/dts/f5d7633.dts b/target/linux/brcm63xx/dts/f5d7633.dts
index 9393413..81e1e25 100644
--- a/target/linux/brcm63xx/dts/f5d7633.dts
+++ b/target/linux/brcm63xx/dts/f5d7633.dts
@@ -5,6 +5,46 @@
 / {
 	model = "Belkin F5D7633";
 	compatible = "belkin,f5d7633", "brcm,bcm6348";
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		debounce-interval = <60>;
+
+		reset {
+			label = "reset";
+			gpios = <&gpio0 6 1>;
+			linux,code = <0x198>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		power_green {
+			label = "96348GW-10:green:power";
+			gpios = <&gpio0 0 1>;
+			default-state = "on";
+		};
+		stop_green {
+			label = "96348GW-10:green:stop";
+			gpios = <&gpio0 1 1>;
+		};
+		adsl_fail_green {
+			label = "96348GW-10:green:adsl-fail";
+			gpios = <&gpio0 2 1>;
+		};
+		ppp_green {
+			label = "96348GW-10:green:ppp";
+			gpios = <&gpio0 3 1>;
+		};
+		ppp_fail_green {
+			label = "96348GW-10:green:ppp-fail";
+			gpios = <&gpio0 4 1>;
+		};
+	};
 };
 
 &pflash {
diff --git a/target/linux/brcm63xx/dts/fast2504n.dts b/target/linux/brcm63xx/dts/fast2504n.dts
index 2f202a3..a3bb927 100644
--- a/target/linux/brcm63xx/dts/fast2504n.dts
+++ b/target/linux/brcm63xx/dts/fast2504n.dts
@@ -5,4 +5,53 @@
 / {
 	model = "Sagem F at ST2504n";
 	compatible = "sagem,f at st2504n", "brcm,bcm6362";
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		debounce-interval = <60>;
+
+		reset {
+			label = "reset";
+			gpios = <&gpio0 24 1>;
+			linux,code = <0x198>;
+		};
+		wps {
+			label = "wps";
+			gpios = <&gpio0 25 1>;
+			linux,code = <0x211>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		power_orange {
+			label = "fast2504n:orange:power";
+			gpios = <&gpio0 2 1>;
+		};
+		power_green {
+			label = "fast2504n:green:power";
+			gpios = <&gpio0 10 1>;
+			default-state = "on";
+		};
+		inet_red {
+			label = "fast2504n:red:internet";
+			gpios = <&gpio0 26 1>;
+		};
+		ok_green {
+			label = "fast2504n:green:ok";
+			gpios = <&gpio0 28 1>;
+		};
+		ok_orange {
+			label = "fast2504n:orange:ok";
+			gpios = <&gpio0 29 1>;
+		};
+		wlan_orangee {
+			label = "fast2504n:orange:wlan";
+			gpios = <&gpio0 30 1>;
+		};
+	};
 };
diff --git a/target/linux/brcm63xx/dts/fast2604.dts b/target/linux/brcm63xx/dts/fast2604.dts
index 5dcaa55..b5bc487 100644
--- a/target/linux/brcm63xx/dts/fast2604.dts
+++ b/target/linux/brcm63xx/dts/fast2604.dts
@@ -5,6 +5,42 @@
 / {
 	model = "Sagem F at ST2604";
 	compatible = "sagem,f at st2604", "brcm,bcm6348";
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		debounce-interval = <60>;
+
+		reset {
+			label = "reset";
+			gpios = <&gpio1 1 1>;
+			linux,code = <0x198>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		power_green {
+			label = "F at ST2604:green:power";
+			gpios = <&gpio0 0 1>;
+			default-state = "on";
+		};
+		power_red {
+			label = "F at ST2604:red:power";
+			gpios = <&gpio0 1 1>;
+		};
+		inet_red {
+			label = "F at ST2604:red:inet";
+			gpios = <&gpio0 4 1>;
+		};
+		wps_green {
+			label = "F at ST2604:green:wps";
+			gpios = <&gpio0 5 1>;
+		};
+	};
 };
 
 &pflash {
diff --git a/target/linux/brcm63xx/dts/fast2704v2.dts b/target/linux/brcm63xx/dts/fast2704v2.dts
index f001b77..053ad35 100644
--- a/target/linux/brcm63xx/dts/fast2704v2.dts
+++ b/target/linux/brcm63xx/dts/fast2704v2.dts
@@ -5,4 +5,62 @@
 / {
 	model = "Sagem F at ST2704V2";
 	compatible = "sagem,f at st2704v2", "brcm,bcm6328";
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		debounce-interval = <60>;
+
+		rfkill {
+			label = "rfkill";
+			gpios = <&gpio0 15 1>;
+			linux,code = <0xee>;
+		};
+		reset {
+			label = "reset";
+			gpios = <&gpio0 23 1>;
+			linux,code = <0x198>;
+		};
+		wps {
+			label = "wps";
+			gpios = <&gpio0 24 1>;
+			linux,code = <0x211>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		usb_green {
+			label = "F at ST2704V2:green:usb";
+			gpios = <&gpio0 1 1>;
+		};
+		inet_red {
+			label = "F at ST2704V2:red:inet";
+			gpios = <&gpio0 2 1>;
+		};
+		dsl_green {
+			label = "F at ST2704V2:green:dsl";
+			gpios = <&gpio0 3 1>;
+		};
+		power_green {
+			label = "F at ST2704V2:green:power";
+			gpios = <&gpio0 4 1>;
+			default-state = "on";
+		};
+		power_red {
+			label = "F at ST2704V2:red:power";
+			gpios = <&gpio0 5 1>;
+		};
+		wps_green {
+			label = "F at ST2704V2:green:wps";
+			gpios = <&gpio0 10 1>;
+		};
+		inet_green {
+			label = "F at ST2704V2:green:inet";
+			gpios = <&gpio0 11 1>;
+		};
+	};
 };
diff --git a/target/linux/brcm63xx/dts/gw6000.dts b/target/linux/brcm63xx/dts/gw6000.dts
index f0b5c54..a9f8028 100644
--- a/target/linux/brcm63xx/dts/gw6000.dts
+++ b/target/linux/brcm63xx/dts/gw6000.dts
@@ -5,4 +5,18 @@
 / {
 	model = "TECOM GW6000";
 	compatible = "tecom,gw6000", "brcm,bcm6348";
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		debounce-interval = <60>;
+
+		reset {
+			label = "reset";
+			gpios = <&gpio1 4 1>;
+			linux,code = <0x198>;
+		};
+	};
 };
diff --git a/target/linux/brcm63xx/dts/gw6200.dts b/target/linux/brcm63xx/dts/gw6200.dts
index 4165030..2ffdf96 100644
--- a/target/linux/brcm63xx/dts/gw6200.dts
+++ b/target/linux/brcm63xx/dts/gw6200.dts
@@ -5,4 +5,39 @@
 / {
 	model = "TECOM GW6200";
 	compatible = "tecom,gw6200", "brcm,bcm6348";
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		debounce-interval = <60>;
+
+		reset {
+			label = "reset";
+			gpios = <&gpio1 4 1>;
+			linux,code = <0x198>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		line1_green {
+			label = "GW6200:green:line1";
+			gpios = <&gpio0 4 1>;
+		};
+		line2_green {
+			label = "GW6200:green:line2";
+			gpios = <&gpio0 5 1>;
+		};
+		line3_green {
+			label = "GW6200:green:line3";
+			gpios = <&gpio0 6 1>;
+		};
+		tel_green {
+			label = "GW6200:green:tel";
+			gpios = <&gpio0 7 1>;
+		};
+	};
 };
diff --git a/target/linux/brcm63xx/dts/hg520v.dts b/target/linux/brcm63xx/dts/hg520v.dts
index bc8af33..88647fa 100644
--- a/target/linux/brcm63xx/dts/hg520v.dts
+++ b/target/linux/brcm63xx/dts/hg520v.dts
@@ -5,6 +5,29 @@
 / {
 	model = "Huawei EchoLife HG520v";
 	compatible = "huawei,hg520v", "brcm,bcm6358";
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		debounce-interval = <60>;
+
+		reset {
+			label = "reset";
+			gpios = <&gpio1 5 1>;
+			linux,code = <0x198>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		inet_green {
+			label = "HW520:green:net";
+			gpios = <&gpio1 0 1>;
+		};
+	};
 };
 
 &pflash {
diff --git a/target/linux/brcm63xx/dts/hg553.dts b/target/linux/brcm63xx/dts/hg553.dts
index 75fec8b..140e2de 100644
--- a/target/linux/brcm63xx/dts/hg553.dts
+++ b/target/linux/brcm63xx/dts/hg553.dts
@@ -5,6 +5,48 @@
 / {
 	model = "Huawei EchoLife HG553";
 	compatible = "huawei,hg553", "brcm,bcm6358";
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		power_green {
+			label = "HW553:blue:power";
+			gpios = <&gpio0 4 1>;
+			default-state = "on";
+		};
+		power_red {
+			label = "HW553:red:power";
+			gpios = <&gpio0 5 1>;
+		};
+		hspa_red {
+			label = "HW553:red:hspa";
+			gpios = <&gpio0 12 1>;
+		};
+		hspa_blue {
+			label = "HW553:blue:hspa";
+			gpios = <&gpio0 13 1>;
+		};
+		lan_red {
+			label = "HW553:red:lan";
+			gpios = <&gpio0 22 1>;
+		};
+		lan_blue {
+			label = "HW553:blue:lan";
+			gpios = <&gpio0 23 1>;
+		};
+		wifi_red {
+			label = "HW553:red:wifi";
+			gpios = <&gpio0 25 1>;
+		};
+		dsl_red {
+			label = "HW553:red:adsl";
+			gpios = <&gpio1 2 1>;
+		};
+		dsl_blue {
+			label = "HW553:blue:adsl";
+			gpios = <&gpio1 3 1>;
+		};
+	};
 };
 
 &pflash {
diff --git a/target/linux/brcm63xx/dts/hg556a-a.dts b/target/linux/brcm63xx/dts/hg556a-a.dts
index bf43571..70f10dc 100644
--- a/target/linux/brcm63xx/dts/hg556a-a.dts
+++ b/target/linux/brcm63xx/dts/hg556a-a.dts
@@ -5,6 +5,94 @@
 / {
 	model = "Huawei EchoLife HG556a (version A)";
 	compatible = "huawei,hg556a-a", "brcm,bcm6358";
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		debounce-interval = <60>;
+
+		help {
+			label = "help";
+			gpios = <&gpio0 8 1>;
+			linux,code = <0x8a>;
+		};
+		wlan {
+			label = "wlan";
+			gpios = <&gpio0 9 1>;
+			linux,code = <0xee>;
+		};
+		restart {
+			label = "restart";
+			gpios = <&gpio0 10 1>;
+			linux,code = <0x198>;
+		};
+		reset {
+			label = "reset";
+			gpios = <&gpio0 11 1>;
+			linux,code = <0xab>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		message_red {
+			label = "HW556:red:message";
+			gpios = <&gpio0 0 1>;
+		};
+		hspa_red {
+			label = "HW556:red:hspa";
+			gpios = <&gpio0 1 1>;
+		};
+		dsl_red {
+			label = "HW556:red:dsl";
+			gpios = <&gpio0 2 1>;
+		};
+		power_red {
+			label = "HW556:red:power";
+			gpios = <&gpio0 3 1>;
+			default-state = "on";
+		};
+		all_red {
+			label = "HW556:red:all";
+			gpios = <&gpio0 6 1>;
+			default-state = "on";
+		};
+		lan1_green {
+			label = "HW556:green:lan1";
+			gpios = <&gpio0 12 1>;
+		};
+		lan1_red {
+			label = "HW556:red:lan1";
+			gpios = <&gpio0 13 1>;
+		};
+		lan2_green {
+			label = "HW556:green:lan2";
+			gpios = <&gpio0 15 1>;
+		};
+		lan2_red {
+			label = "HW556:red:lan2";
+			gpios = <&gpio0 22 1>;
+		};
+		lan3_green {
+			label = "HW556:green:lan3";
+			gpios = <&gpio0 23 1>;
+		};
+		lan3_red {
+			label = "HW556:red:lan3";
+			gpios = <&gpio0 26 1>;
+		};
+		lan4_green {
+			label = "HW556:green:lan4";
+			gpios = <&gpio0 27 1>;
+		};
+		lan4_red {
+			label = "HW556:red:lan4";
+			gpios = <&gpio0 28 1>;
+		};
+	};
 };
 
 &pflash {
diff --git a/target/linux/brcm63xx/dts/hg556a-b.dts b/target/linux/brcm63xx/dts/hg556a-b.dts
index 6d218c2..b42e86f 100644
--- a/target/linux/brcm63xx/dts/hg556a-b.dts
+++ b/target/linux/brcm63xx/dts/hg556a-b.dts
@@ -5,6 +5,94 @@
 / {
 	model = "Huawei EchoLife HG556a (version B)";
 	compatible = "huawei,hg556a-b", "brcm,bcm6358";
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		debounce-interval = <60>;
+
+		help {
+			label = "help";
+			gpios = <&gpio0 8 1>;
+			linux,code = <0x8a>;
+		};
+		wlan {
+			label = "wlan";
+			gpios = <&gpio0 9 1>;
+			linux,code = <0xee>;
+		};
+		restart {
+			label = "restart";
+			gpios = <&gpio0 10 1>;
+			linux,code = <0x198>;
+		};
+		reset {
+			label = "reset";
+			gpios = <&gpio0 11 1>;
+			linux,code = <0xab>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		message_red {
+			label = "HW556:red:message";
+			gpios = <&gpio0 0 1>;
+		};
+		hspa_red {
+			label = "HW556:red:hspa";
+			gpios = <&gpio0 1 1>;
+		};
+		dsl_red {
+			label = "HW556:red:dsl";
+			gpios = <&gpio0 2 1>;
+		};
+		power_red {
+			label = "HW556:red:power";
+			gpios = <&gpio0 3 1>;
+			default-state = "on";
+		};
+		all_red {
+			label = "HW556:red:all";
+			gpios = <&gpio0 6 1>;
+			default-state = "on";
+		};
+		lan1_green {
+			label = "HW556:green:lan1";
+			gpios = <&gpio0 12 1>;
+		};
+		lan1_red {
+			label = "HW556:red:lan1";
+			gpios = <&gpio0 13 1>;
+		};
+		lan2_green {
+			label = "HW556:green:lan2";
+			gpios = <&gpio0 15 1>;
+		};
+		lan2_red {
+			label = "HW556:red:lan2";
+			gpios = <&gpio0 22 1>;
+		};
+		lan3_green {
+			label = "HW556:green:lan3";
+			gpios = <&gpio0 23 1>;
+		};
+		lan3_red {
+			label = "HW556:red:lan3";
+			gpios = <&gpio0 26 1>;
+		};
+		lan4_green {
+			label = "HW556:green:lan4";
+			gpios = <&gpio0 27 1>;
+		};
+		lan4_red {
+			label = "HW556:red:lan4";
+			gpios = <&gpio0 28 1>;
+		};
+	};
 };
 
 &pflash {
diff --git a/target/linux/brcm63xx/dts/hg556a-c.dts b/target/linux/brcm63xx/dts/hg556a-c.dts
index a5bccda..4c845ed 100644
--- a/target/linux/brcm63xx/dts/hg556a-c.dts
+++ b/target/linux/brcm63xx/dts/hg556a-c.dts
@@ -5,6 +5,89 @@
 / {
 	model = "Huawei EchoLife HG556a (version C)";
 	compatible = "huawei,hg556a-c", "brcm,bcm6358";
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		debounce-interval = <60>;
+
+		help {
+			label = "help";
+			gpios = <&gpio0 8 1>;
+			linux,code = <0x8a>;
+		};
+		wlan {
+			label = "wlan";
+			gpios = <&gpio0 9 1>;
+			linux,code = <0xee>;
+		};
+		restart {
+			label = "restart";
+			gpios = <&gpio0 10 1>;
+			linux,code = <0x198>;
+		};
+		reset {
+			label = "reset";
+			gpios = <&gpio0 11 1>;
+			linux,code = <0xab>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		lan1_green {
+			label = "HW556:green:lan1";
+			gpios = <&gpio0 0 1>;
+		};
+		lan2_green {
+			label = "HW556:green:lan2";
+			gpios = <&gpio0 1 1>;
+		};
+		dsl_red {
+			label = "HW556:red:dsl";
+			gpios = <&gpio0 2 1>;
+		};
+		power_red {
+			label = "HW556:red:power";
+			gpios = <&gpio0 3 1>;
+			default-state = "on";
+		};
+		message_red {
+			label = "HW556:red:message";
+			gpios = <&gpio0 12 1>;
+		};
+		lan1_red {
+			label = "HW556:red:lan1";
+			gpios = <&gpio0 13 1>;
+		};
+		hspa_red {
+			label = "HW556:red:hspa";
+			gpios = <&gpio0 15 1>;
+		};
+		lan2_red {
+			label = "HW556:red:lan2";
+			gpios = <&gpio0 22 1>;
+		};
+		lan3_green {
+			label = "HW556:green:lan3";
+			gpios = <&gpio0 23 1>;
+		};
+		lan3_red {
+			label = "HW556:red:lan3";
+			gpios = <&gpio0 26 1>;
+		};
+		lan4_green {
+			label = "HW556:green:lan4";
+			gpios = <&gpio0 27 1>;
+		};
+		lan4_red {
+			label = "HW556:red:lan4";
+			gpios = <&gpio0 28 1>;
+		};
+	};
 };
 
 &pflash {
diff --git a/target/linux/brcm63xx/dts/nb4-fxc-r1.dts b/target/linux/brcm63xx/dts/nb4-fxc-r1.dts
index e04845f..0e9cc24 100644
--- a/target/linux/brcm63xx/dts/nb4-fxc-r1.dts
+++ b/target/linux/brcm63xx/dts/nb4-fxc-r1.dts
@@ -5,4 +5,94 @@
 / {
 	model = "SFR Neuf Box 4 (Foxconn)";
 	compatible = "sfr,nb4-fxc-r1", "brcm,bcm6358";
+
+	spi-gpio {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "spi-gpio";
+
+		gpio-mosi = <&gpio0 7 0>;
+		gpio-sck = <&gpio0 6 0>;
+		num-chipselects = <0>;
+
+		hc595: gpio-spi-controller at 0 {
+			compatible = "fairchild,74hc595";
+			reg = <0>;
+			registers-number = <1>;
+			spi-max-frequency = <100000>;
+
+			gpio-controller;
+			#gpio-cells = <2>;
+		};
+	};
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		debounce-interval = <60>;
+
+		service {
+			label = "service";
+			gpios = <&gpio0 27 1>;
+			linux,code = <0x100>;
+		};
+		clip {
+			label = "clip";
+			gpios = <&gpio0 31 1>;
+			linux,code = <0x101>;
+		};
+		reset {
+			label = "reset";
+			gpios = <&gpio1 2 1>;
+			linux,code = <0x198>;
+		};
+		wps {
+			label = "wps";
+			gpios = <&gpio1 5 1>;
+			linux,code = <0x211>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		traffic_white {
+			label = "NB4-FXC-r1:white:traffic";
+			gpios = <&gpio0 2 0>;
+		};
+		service_blue {
+			label = "NB4-FXC-r1:blue:service";
+			gpios = <&gpio0 4 0>;
+		};
+		wifi_white {
+			label = "NB4-FXC-r1:white:wifi";
+			gpios = <&gpio0 15 0>;
+		};
+		service_red {
+			label = "NB4-FXC-r1:red:service";
+			gpios = <&gpio0 29 0>;
+		};
+		service_green {
+			label = "NB4-FXC-r1:green:service";
+			gpios = <&gpio0 30 0>;
+		};
+		alarm_white {
+			label = "NB4-FXC-r1:white:alarm";
+			gpios = <&hc595 0 1>;
+		};
+		tv_white {
+			label = "NB4-FXC-r1:white:tv";
+			gpios = <&hc595 2 1>;
+		};
+		tel_white {
+			label = "NB4-FXC-r1:white:tel";
+			gpios = <&hc595 3 1>;
+		};
+		adsl_white {
+			label = "NB4-FXC-r0:white:adsl";
+			gpios = <&hc595 4 1>;
+		};
+	};
 };
diff --git a/target/linux/brcm63xx/dts/nb4-ser-r0.dts b/target/linux/brcm63xx/dts/nb4-ser-r0.dts
index 9b82ccd..d7abbf1 100644
--- a/target/linux/brcm63xx/dts/nb4-ser-r0.dts
+++ b/target/linux/brcm63xx/dts/nb4-ser-r0.dts
@@ -5,4 +5,94 @@
 / {
 	model = "SFR Neuf Box 4 (Sercomm)";
 	compatible = "sfr,nb4-ser-r0", "brcm,bcm6358";
+
+	spi-gpio {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "spi-gpio";
+
+		gpio-mosi = <&gpio0 7 0>;
+		gpio-sck = <&gpio0 6 0>;
+		num-chipselects = <0>;
+
+		hc595: gpio-spi-controller at 0 {
+			compatible = "fairchild,74hc595";
+			reg = <0>;
+			registers-number = <1>;
+			spi-max-frequency = <100000>;
+
+			gpio-controller;
+			#gpio-cells = <2>;
+		};
+	};
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		debounce-interval = <60>;
+
+		service {
+			label = "service";
+			gpios = <&gpio0 27 1>;
+			linux,code = <0x100>;
+		};
+		clip {
+			label = "clip";
+			gpios = <&gpio0 31 1>;
+			linux,code = <0x101>;
+		};
+		reset {
+			label = "reset";
+			gpios = <&gpio1 2 1>;
+			linux,code = <0x198>;
+		};
+		wps {
+			label = "wps";
+			gpios = <&gpio1 5 1>;
+			linux,code = <0x211>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		traffic_white {
+			label = "NB4-SER-r0:white:traffic";
+			gpios = <&gpio0 2 1>;
+		};
+		service_blue {
+			label = "NB4-SER-r0:blue:service";
+			gpios = <&gpio0 4 1>;
+		};
+		wifi_white {
+			label = "NB4-SER-r0:white:wifi";
+			gpios = <&gpio0 15 1>;
+		};
+		service_red {
+			label = "NB4-SER-r0:red:service";
+			gpios = <&gpio0 29 1>;
+		};
+		service_green {
+			label = "NB4-SER-r0:green:service";
+			gpios = <&gpio0 30 1>;
+		};
+		alarm_white {
+			label = "NB4-SER-r0:white:alarm";
+			gpios = <&hc595 0 1>;
+		};
+		tv_white {
+			label = "NB4-SER-r0:white:tv";
+			gpios = <&hc595 2 1>;
+		};
+		tel_white {
+			label = "NB4-SER-r0:white:tel";
+			gpios = <&hc595 3 1>;
+		};
+		adsl_white {
+			label = "NB4-SER-r0:white:adsl";
+			gpios = <&hc595 4 1>;
+		};
+	};
 };
diff --git a/target/linux/brcm63xx/dts/nb6-ser-r0.dts b/target/linux/brcm63xx/dts/nb6-ser-r0.dts
index ea3b1fa..ae16ad3 100644
--- a/target/linux/brcm63xx/dts/nb6-ser-r0.dts
+++ b/target/linux/brcm63xx/dts/nb6-ser-r0.dts
@@ -5,4 +5,33 @@
 / {
 	model = "SFR neufbox 6 (Sercomm)";
 	compatible = "sfr,nb6-ser-r0", "brcm,bcm6362";
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		debounce-interval = <60>;
+
+		service {
+			label = "service";
+			gpios = <&gpio0 10 1>;
+			linux,code = <0x100>;
+		};
+		wlan {
+			label = "wlan";
+			gpios = <&gpio0 12 1>;
+			linux,code = <0xee>;
+		};
+		reset {
+			label = "reset";
+			gpios = <&gpio0 24 1>;
+			linux,code = <0x198>;
+		};
+		wps {
+			label = "wps";
+			gpios = <&gpio0 25 1>;
+			linux,code = <0x211>;
+		};
+	};
 };
diff --git a/target/linux/brcm63xx/dts/p870hw-51a-v2.dts b/target/linux/brcm63xx/dts/p870hw-51a-v2.dts
index 916dd4a..077e348 100644
--- a/target/linux/brcm63xx/dts/p870hw-51a-v2.dts
+++ b/target/linux/brcm63xx/dts/p870hw-51a-v2.dts
@@ -5,6 +5,51 @@
 / {
 	model = "Zyxel P870HW-51a v2";
 	compatible = "zyxel,p870hw-51a-v2", "brcm,bcm6368";
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		debounce-interval = <60>;
+
+		reset {
+			label = "reset";
+			gpios = <&gpio1 2 1>;
+			linux,code = <0x198>;
+		};
+		wps {
+			label = "wps";
+			gpios = <&gpio1 3 1>;
+			linux,code = <0x211>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		power_green {
+			label = "P870HW-51a:green:power";
+			gpios = <&gpio0 0 0>;
+			default-state = "on";
+		};
+		dsl_green {
+			label = "P870HW-51a:green:dsl";
+			gpios = <&gpio0 2 1>;
+		};
+		inet_green {
+			label = "P870HW-51a:green:inet";
+			gpios = <&gpio0 22 1>;
+		};
+		wps_orange {
+			label = "P870HW-51a:orange:wps";
+			gpios = <&gpio0 24 1>;
+		};
+		inet_red {
+			label = "P870HW-51a:red:inet";
+			gpios = <&gpio1 1 0>;
+		};
+	};
 };
 
 &pflash {
diff --git a/target/linux/brcm63xx/dts/rg100a.dts b/target/linux/brcm63xx/dts/rg100a.dts
index df628dc..824b5e4 100644
--- a/target/linux/brcm63xx/dts/rg100a.dts
+++ b/target/linux/brcm63xx/dts/rg100a.dts
@@ -5,6 +5,28 @@
 / {
 	model = "Alcatel RG100A";
 	compatible = "alcatel,rg100a", "brcm,bcm6358";
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		stop_green {
+			label = "96358VW2:green:stop";
+			gpios = <&gpio0 4 1>;
+		};
+		power_green {
+			label = "96358VW2:green:power";
+			gpios = <&gpio0 5 1>;
+			default-state = "on";
+		};
+		adsl_green {
+			label = "96358VW2:green:adsl";
+			gpios = <&gpio0 22 1>;
+		};
+		ppp_fail_green {
+			label = "96358VW2:green:ppp-fail";
+			gpios = <&gpio0 23 0>;
+		};
+	};
 };
 
 &pflash {
diff --git a/target/linux/brcm63xx/dts/spw303v.dts b/target/linux/brcm63xx/dts/spw303v.dts
index 664ad7b..ed3c322 100644
--- a/target/linux/brcm63xx/dts/spw303v.dts
+++ b/target/linux/brcm63xx/dts/spw303v.dts
@@ -5,6 +5,55 @@
 / {
 	model = "T-Com Speedport W303 V";
 	compatible = "t-com,spw303v", "brcm,bcm6358";
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		debounce-interval = <60>;
+
+		reset {
+			label = "reset";
+			gpios = <&gpio0 11 0>;
+			linux,code = <0x198>;
+		};
+		ses {
+			label = "ses";
+			gpios = <&gpio1 5 1>;
+			linux,code = <0x211>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		ses_green {
+			label = "spw303v:green:ses";
+			gpios = <&gpio0 0 1>;
+		};
+		power_adsl_red {
+			label = "spw303v:red:power+adsl";
+			gpios = <&gpio0 2 1>;
+		};
+		ppp_green {
+			label = "spw303v:green:ppp";
+			gpios = <&gpio0 5 1>;
+		};
+		power_adsl_green {
+			label = "spw303v:green:power+adsl";
+			gpios = <&gpio0 22 1>;
+			default-state = "on";
+		};
+		voip_green {
+			label = "spw303v:green:voip";
+			gpios = <&gpio0 27 1>;
+		};
+		pots_green {
+			label = "spw303v:green:pots";
+			gpios = <&gpio0 31 1>;
+		};
+	};
 };
 
 &pflash {
diff --git a/target/linux/brcm63xx/dts/spw500v.dts b/target/linux/brcm63xx/dts/spw500v.dts
index d9ac629..9c1feff 100644
--- a/target/linux/brcm63xx/dts/spw500v.dts
+++ b/target/linux/brcm63xx/dts/spw500v.dts
@@ -5,6 +5,46 @@
 / {
 	model = "T-Com Speedport W500 V";
 	compatible = "t-com,spw500v", "brcm,bcm6348";
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		debounce-interval = <60>;
+
+		reset {
+			label = "reset";
+			gpios = <&gpio1 1 1>;
+			linux,code = <0x198>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		power_green {
+			label = "SPW500V:green:power";
+			gpios = <&gpio0 0 1>;
+			default-state = "on";
+		};
+		power_red {
+			label = "SPW500V:red:power";
+			gpios = <&gpio0 1 1>;
+		};
+		ppp_green {
+			label = "SPW500V:green:ppp";
+			gpios = <&gpio0 3 1>;
+		};
+		pstn_green {
+			label = "SPW500V:green:pstn";
+			gpios = <&gpio0 28 1>;
+		};
+		voip_green {
+			label = "SPW500V:green:voip";
+			gpios = <&gpio1 0 1>;
+		};
+	};
 };
 
 &pflash {
diff --git a/target/linux/brcm63xx/dts/td-w8900gb.dts b/target/linux/brcm63xx/dts/td-w8900gb.dts
index c8ff50c..74fef37 100644
--- a/target/linux/brcm63xx/dts/td-w8900gb.dts
+++ b/target/linux/brcm63xx/dts/td-w8900gb.dts
@@ -5,6 +5,46 @@
 / {
 	model = "TP-Link TD-W8900GB";
 	compatible = "tp-link,td-w8900gb", "brcm,bcm6348";
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		debounce-interval = <60>;
+
+		reset {
+			label = "reset";
+			gpios = <&gpio1 1 1>;
+			linux,code = <0x198>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		power_green {
+			label = "96348GW-11:green:power";
+			gpios = <&gpio0 0 1>;
+			default-state = "on";
+		};
+		stop_green {
+			label = "96348GW-11:green:stop";
+			gpios = <&gpio0 1 1>;
+		};
+		adsl_fail_green {
+			label = "96348GW-11:green:adsl-fail";
+			gpios = <&gpio0 2 1>;
+		};
+		ppp_green {
+			label = "96348GW-11:green:ppp";
+			gpios = <&gpio0 3 1>;
+		};
+		ppp_fail_green {
+			label = "96348GW-11:green:ppp-fail";
+			gpios = <&gpio0 4 1>;
+		};
+	};
 };
 
 &pflash {
diff --git a/target/linux/brcm63xx/dts/usr9108.dts b/target/linux/brcm63xx/dts/usr9108.dts
index 40d7e1c..b50d597 100644
--- a/target/linux/brcm63xx/dts/usr9108.dts
+++ b/target/linux/brcm63xx/dts/usr9108.dts
@@ -5,6 +5,19 @@
 / {
 	model = "USRobotics 9108";
 	compatible = "usr,9108", "brcm,bcm6348";
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		usb {
+			label = "96348GW-A::usb";
+			gpios = <&gpio0 0 1>;
+		};
+		dsl {
+			label = "96348GW-A::adsl";
+			gpios = <&gpio0 3 1>;
+		};
+	};
 };
 
 &pflash {
diff --git a/target/linux/brcm63xx/dts/vr-3025u.dts b/target/linux/brcm63xx/dts/vr-3025u.dts
index 86fde1c..a48b8f9 100644
--- a/target/linux/brcm63xx/dts/vr-3025u.dts
+++ b/target/linux/brcm63xx/dts/vr-3025u.dts
@@ -5,6 +5,62 @@
 / {
 	model = "Comtrend VR-3025u";
 	compatible = "comtrend,vr-3025u", "brcm,bcm6368";
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		debounce-interval = <60>;
+
+		reset {
+			label = "reset";
+			gpios = <&gpio1 2 1>;
+			linux,code = <0x198>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		dsl_green {
+			label = "VR-3025u:green:dsl";
+			gpios = <&gpio0 2 1>;
+		};
+		inet_green {
+			label = "VR-3025u:green:inet";
+			gpios = <&gpio0 5 0>;
+		};
+		lan1_green {
+			label = "VR-3025u:green:lan1";
+			gpios = <&gpio0 6 1>;
+		};
+		lan2_green {
+			label = "VR-3025u:green:lan2";
+			gpios = <&gpio0 7 1>;
+		};
+		lan3_green {
+			label = "VR-3025u:green:lan3";
+			gpios = <&gpio0 8 1>;
+		};
+		lan4_green {
+			label = "VR-3025u:green:lan4";
+			gpios = <&gpio0 9 1>;
+		};
+		power_green {
+			label = "VR-3025u:green:power";
+			gpios = <&gpio0 22 0>;
+			default-state = "on";
+		};
+		power_red {
+			label = "VR-3025u:red:power";
+			gpios = <&gpio0 24 0>;
+		};
+		inet_red {
+			label = "VR-3025u:red:inet";
+			gpios = <&gpio0 31 0>;
+		};
+	};
 };
 
 &pflash {
diff --git a/target/linux/brcm63xx/dts/vr-3025un.dts b/target/linux/brcm63xx/dts/vr-3025un.dts
index 6fc0c2a..8dfec31 100644
--- a/target/linux/brcm63xx/dts/vr-3025un.dts
+++ b/target/linux/brcm63xx/dts/vr-3025un.dts
@@ -5,6 +5,62 @@
 / {
 	model = "Comtrend VR-3025un";
 	compatible = "comtrend,vr-3025un", "brcm,bcm6368";
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		debounce-interval = <60>;
+
+		reset {
+			label = "reset";
+			gpios = <&gpio1 2 1>;
+			linux,code = <0x198>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		dsl_green {
+			label = "VR-3025un:green:dsl";
+			gpios = <&gpio0 2 1>;
+		};
+		inet_green {
+			label = "VR-3025un:green:inet";
+			gpios = <&gpio0 5 0>;
+		};
+		lan1_green {
+			label = "VR-3025un:green:lan1";
+			gpios = <&gpio0 6 1>;
+		};
+		lan2_green {
+			label = "VR-3025un:green:lan2";
+			gpios = <&gpio0 7 1>;
+		};
+		lan3_green {
+			label = "VR-3025un:green:lan3";
+			gpios = <&gpio0 8 1>;
+		};
+		iptv_green {
+			label = "VR-3025un:green:iptv";
+			gpios = <&gpio0 9 1>;
+		};
+		power_green {
+			label = "VR-3025un:green:power";
+			gpios = <&gpio0 22 0>;
+			default-state = "on";
+		};
+		power_red {
+			label = "VR-3025un:red:power";
+			gpios = <&gpio0 24 0>;
+		};
+		inet_red {
+			label = "VR-3025un:red:inet";
+			gpios = <&gpio0 31 0>;
+		};
+	};
 };
 
 &pflash {
diff --git a/target/linux/brcm63xx/dts/wap-5813n.dts b/target/linux/brcm63xx/dts/wap-5813n.dts
index 29b85a2..0d168d2 100644
--- a/target/linux/brcm63xx/dts/wap-5813n.dts
+++ b/target/linux/brcm63xx/dts/wap-5813n.dts
@@ -5,6 +5,56 @@
 / {
 	model = "Comtrend WAP-5813n";
 	compatible = "comtrend,wap-5813n", "brcm,bcm6368";
+
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		debounce-interval = <60>;
+
+		wlan {
+			label = "wlan";
+			gpios = <&gpio1 0 1>;
+			linux,code = <0xee>;
+		};
+		reset {
+			label = "reset";
+			gpios = <&gpio1 2 1>;
+			linux,code = <0x198>;
+		};
+		wps {
+			label = "wps";
+			gpios = <&gpio1 1 1>;
+			linux,code = <0x211>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		inet_green {
+			label = "WAP-5813n:green:inet";
+			gpios = <&gpio0 5 0>;
+		};
+		power_green {
+			label = "WAP-5813n:green:power";
+			gpios = <&gpio0 22 0>;
+			default-state = "on";
+		};
+		wps_green {
+			label = "WAP-5813n:green:wps";
+			gpios = <&gpio0 23 1>;
+		};
+		power_red {
+			label = "WAP-5813n:red:power";
+			gpios = <&gpio0 24 0>;
+		};
+		inet_red {
+			label = "WAP-5813n:red:inet";
+			gpios = <&gpio0 31 0>;
+		};
+	};
 };
 
 &pflash {
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From hkallweit1 at gmail.com  Sun Jan 25 13:05:52 2015
From: hkallweit1 at gmail.com (Heiner Kallweit)
Date: Sun, 25 Jan 2015 19:05:52 +0100
Subject: [OpenWrt-Devel] ar8216: phy_init and bug report 18415
In-Reply-To: <CAFE24U2+4eXSnva=X3GVhF7icypDtZSMh=t4NApyNqk-qNDxSQ@mail.gmail.com>
References: <CAFSsGVtS5fmQS=bP+AfMO1w5Cm5b_D+69q_6chv8iiXWKisUxA@mail.gmail.com>
 <CAFE24U2p5=ZdisG5pnxHaLTncsfAjcpP_2Od-aAOtvFJs=YqFQ@mail.gmail.com>
 <CAFE24U0o6pOUw=CcsOnbc8Kqny8kk=Wo+T=b7wvppHbzja1USw@mail.gmail.com>
 <5491D003.3090207@gmail.com>
 <CAFE24U2+4eXSnva=X3GVhF7icypDtZSMh=t4NApyNqk-qNDxSQ@mail.gmail.com>
Message-ID: <54C53080.6070505@gmail.com>

To me it doesn't look like an issue with the AR8216 driver. All related output is ok.
The hardware is quite common and in case of a driver issue I would expect much more
people to complain.

What looks a little strange to me is that there seem to be two interfaces (modem + wan)
fiddling with eth0.2

Heiner


Am 25.01.2015 um 18:17 schrieb Weedy:
> On Wed, Dec 17, 2014 at 1:48 PM, Heiner Kallweit <hkallweit1 at gmail.com> wrote:
>> Ticket 18415 was closed as it was confirmed that as at least version >=43419 is ok.
>> (I assume 43410 fixed the issue.) Therefore current trunk should be ok.
>>
>> However if you want to check further what the actual root cause was:
>> -> Re-enable the additional reset by reverting 43410
>> -> Issue there?
>> -> If yes, check whether inserting a mdiobus_write(bus, i, MII_BMCR, BMCR_ANENABLE);
>>    before mdiobus_write(bus, i, MII_BMCR, BMCR_RESET | BMCR_ANENABLE); in
>>    ar8xxx_phy_init fixes it.
>>
>> Heiner
>>
> 
> So I'm shitty and I forgot about this.
> Today I reapplied 43332 (so my checkout should be "virgin"), and made a image.
> My WAN port broke again. Should I still go back to 43410?
> I saw how many commits you have made since then which is why I flashed r44119.
> 
> # dmesg |grep Atheros
> [    0.000000] SoC: Atheros AR9344 rev 2
> [    0.630000] switch0: Atheros AR8327 rev. 2 switch registered on ag71xx-mdio.0
> [    1.300000] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:00
> [uid=004dd033, driver=Atheros AR8216/AR8236/AR8316]
> [    1.310000] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RGMII
> [   11.760000] ieee80211 phy0: Atheros AR9340 Rev:2 mem=0xb8100000, irq=47
> [   11.810000] ieee80211 phy1: Atheros AR9300 Rev:4 mem=0xb0000000, irq=40
> [   24.820000] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 2 is up
> [   24.820000] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 4 is up
> [  423.900000] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 3 is up
> [  447.900000] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 2 is down
> [  453.900000] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 1 is up
> 
> 
> Sun Jan 25 10:49:21 2015 daemon.notice netifd: Interface 'wan' is now down
> Sun Jan 25 10:49:21 2015 daemon.notice netifd: Interface 'wan' has
> link connectivity loss
> Sun Jan 25 10:49:21 2015 daemon.notice netifd: Interface 'modem' is now down
> Sun Jan 25 10:49:21 2015 daemon.notice netifd: Interface 'modem' is disabled
> Sun Jan 25 10:49:21 2015 daemon.notice netifd: Interface 'modem' is enabled
> Sun Jan 25 10:49:21 2015 daemon.notice netifd: Interface 'modem' is
> setting up now
> Sun Jan 25 10:49:21 2015 daemon.notice netifd: Interface 'modem' is now up
> Sun Jan 25 10:49:21 2015 daemon.notice netifd: Interface 'wan' is setting up now
> Sun Jan 25 10:49:21 2015 daemon.notice netifd: Interface 'wan' is now up
> Sun Jan 25 10:49:21 2015 daemon.notice netifd: Interface 'wan' has
> link connectivity
> Sun Jan 25 10:49:22 2015 user.notice firewall: Reloading firewall due
> to ifup of modem (eth0.2)
> Sun Jan 25 10:49:24 2015 user.err syslog: module is already loaded - cls_u32
> Sun Jan 25 10:49:24 2015 user.err syslog: module is already loaded - em_u32
> Sun Jan 25 10:49:24 2015 user.err syslog: module is already loaded -
> act_connmark
> Sun Jan 25 10:49:24 2015 user.err syslog: module is already loaded - act_mirred
> Sun Jan 25 10:49:24 2015 user.err syslog: module is already loaded - sch_ingress
> Sun Jan 25 10:49:24 2015 user.err syslog: module is already loaded - cls_fw
> Sun Jan 25 10:49:24 2015 user.err syslog: module is already loaded - sch_hfsc
> Sun Jan 25 10:49:25 2015 user.notice firewall: Reloading firewall due
> to ifup of wan (eth0.2)
> Sun Jan 25 10:49:28 2015 daemon.notice netifd: Interface 'wan' is now down
> Sun Jan 25 10:49:30 2015 daemon.notice netifd: Interface 'wan' is setting up now
> Sun Jan 25 10:49:30 2015 daemon.notice netifd: Interface 'wan' is now up
> Sun Jan 25 10:49:31 2015 user.err syslog: module is already loaded - cls_u32
> Sun Jan 25 10:49:31 2015 user.err syslog: module is already loaded - em_u32
> Sun Jan 25 10:49:31 2015 user.err syslog: module is already loaded -
> act_connmark
> Sun Jan 25 10:49:31 2015 user.err syslog: module is already loaded - act_mirred
> Sun Jan 25 10:49:31 2015 user.err syslog: module is already loaded - sch_ingress
> Sun Jan 25 10:49:31 2015 user.err syslog: module is already loaded - cls_fw
> Sun Jan 25 10:49:31 2015 user.err syslog: module is already loaded - sch_hfsc
> Sun Jan 25 10:49:32 2015 user.notice firewall: Reloading firewall due
> to ifup of wan (eth0.2)
> Sun Jan 25 10:49:41 2015 daemon.notice netifd: Interface 'wan' is now down
> Sun Jan 25 10:49:43 2015 daemon.notice netifd: Interface 'wan' is setting up now
> Sun Jan 25 10:49:43 2015 daemon.notice netifd: Interface 'wan' is now up
> Sun Jan 25 10:49:44 2015 user.err syslog: module is already loaded - cls_u32
> Sun Jan 25 10:49:44 2015 user.err syslog: module is already loaded - em_u32
> Sun Jan 25 10:49:44 2015 user.err syslog: module is already loaded -
> act_connmark
> Sun Jan 25 10:49:44 2015 user.err syslog: module is already loaded - act_mirred
> Sun Jan 25 10:49:44 2015 user.err syslog: module is already loaded - sch_ingress
> Sun Jan 25 10:49:44 2015 user.err syslog: module is already loaded - cls_fw
> Sun Jan 25 10:49:44 2015 user.err syslog: module is already loaded - sch_hfsc
> Sun Jan 25 10:49:44 2015 user.notice firewall: Reloading firewall due
> to ifup of wan (eth0.2)
> Sun Jan 25 10:49:53 2015 daemon.notice netifd: Interface 'wan' is now down
> Sun Jan 25 10:49:55 2015 daemon.notice netifd: Interface 'wan' is setting up now
> Sun Jan 25 10:49:55 2015 daemon.notice netifd: Interface 'wan' is now up
> Sun Jan 25 10:49:56 2015 user.err syslog: module is already loaded - cls_u32
> Sun Jan 25 10:49:56 2015 user.err syslog: module is already loaded - em_u32
> Sun Jan 25 10:49:56 2015 user.err syslog: module is already loaded -
> act_connmark
> Sun Jan 25 10:49:56 2015 user.err syslog: module is already loaded - act_mirred
> Sun Jan 25 10:49:56 2015 user.err syslog: module is already loaded - sch_ingress
> Sun Jan 25 10:49:56 2015 user.err syslog: module is already loaded - cls_fw
> Sun Jan 25 10:49:56 2015 user.err syslog: module is already loaded - sch_hfsc
> Sun Jan 25 10:49:56 2015 user.notice firewall: Reloading firewall due
> to ifup of wan (eth0.2)
> Sun Jan 25 10:50:05 2015 daemon.notice netifd: Interface 'wan' is now down
> Sun Jan 25 10:50:07 2015 daemon.notice netifd: Interface 'wan' is setting up now
> Sun Jan 25 10:50:07 2015 daemon.notice netifd: Interface 'wan' is now up
> Sun Jan 25 10:50:08 2015 user.err syslog: module is already loaded - cls_u32
> Sun Jan 25 10:50:08 2015 user.err syslog: module is already loaded - em_u32
> Sun Jan 25 10:50:08 2015 user.err syslog: module is already loaded -
> act_connmark
> Sun Jan 25 10:50:08 2015 user.err syslog: module is already loaded - act_mirred
> Sun Jan 25 10:50:08 2015 user.err syslog: module is already loaded - sch_ingress
> Sun Jan 25 10:50:08 2015 user.err syslog: module is already loaded - cls_fw
> Sun Jan 25 10:50:08 2015 user.err syslog: module is already loaded - sch_hfsc
> Sun Jan 25 10:50:09 2015 user.notice firewall: Reloading firewall due
> to ifup of wan (eth0.2)
> Sun Jan 25 10:50:18 2015 daemon.notice netifd: Interface 'wan' is now down
> Sun Jan 25 10:50:20 2015 daemon.notice netifd: Interface 'wan' is setting up now
> Sun Jan 25 10:50:20 2015 daemon.notice netifd: Interface 'wan' is now up
> Sun Jan 25 10:50:21 2015 user.err syslog: module is already loaded - cls_u32
> Sun Jan 25 10:50:21 2015 user.err syslog: module is already loaded - em_u32
> Sun Jan 25 10:50:21 2015 user.err syslog: module is already loaded -
> act_connmark
> Sun Jan 25 10:50:21 2015 user.err syslog: module is already loaded - act_mirred
> Sun Jan 25 10:50:21 2015 user.err syslog: module is already loaded - sch_ingress
> Sun Jan 25 10:50:21 2015 user.err syslog: module is already loaded - cls_fw
> Sun Jan 25 10:50:21 2015 user.err syslog: module is already loaded - sch_hfsc
> Sun Jan 25 10:50:21 2015 user.notice firewall: Reloading firewall due
> to ifup of wan (eth0.2)
> Sun Jan 25 10:50:30 2015 daemon.notice netifd: Interface 'wan' is now down
> Sun Jan 25 10:50:32 2015 daemon.notice netifd: Interface 'wan' is setting up now
> Sun Jan 25 10:50:32 2015 daemon.notice netifd: Interface 'wan' is now up
> Sun Jan 25 10:50:33 2015 user.err syslog: module is already loaded - cls_u32
> Sun Jan 25 10:50:33 2015 user.err syslog: module is already loaded - em_u32
> Sun Jan 25 10:50:33 2015 user.err syslog: module is already loaded -
> act_connmark
> Sun Jan 25 10:50:33 2015 user.err syslog: module is already loaded - act_mirred
> Sun Jan 25 10:50:33 2015 user.err syslog: module is already loaded - sch_ingress
> Sun Jan 25 10:50:33 2015 user.err syslog: module is already loaded - cls_fw
> Sun Jan 25 10:50:33 2015 user.err syslog: module is already loaded - sch_hfsc
> Sun Jan 25 10:50:33 2015 user.notice firewall: Reloading firewall due
> to ifup of wan (eth0.2)
> Sun Jan 25 10:50:40 2015 kern.info kernel: [  423.900000] Atheros
> AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 3 is up <---- moving
> cables around
> Sun Jan 25 10:50:45 2015 user.err syslog: module is already loaded - cls_u32
> Sun Jan 25 10:50:45 2015 user.err syslog: module is already loaded - em_u32
> Sun Jan 25 10:50:45 2015 user.err syslog: module is already loaded -
> act_connmark
> Sun Jan 25 10:50:45 2015 user.err syslog: module is already loaded - act_mirred
> Sun Jan 25 10:50:45 2015 user.err syslog: module is already loaded - sch_ingress
> Sun Jan 25 10:50:45 2015 user.err syslog: module is already loaded - cls_fw
> Sun Jan 25 10:50:45 2015 user.err syslog: module is already loaded - sch_hfsc
> Sun Jan 25 10:50:55 2015 daemon.notice netifd: Interface 'wan' is now down
> Sun Jan 25 10:50:57 2015 daemon.notice netifd: Interface 'wan' is setting up now
> Sun Jan 25 10:50:57 2015 daemon.notice netifd: Interface 'wan' is now up
> Sun Jan 25 10:50:58 2015 user.err syslog: module is already loaded - cls_u32
> Sun Jan 25 10:50:58 2015 user.err syslog: module is already loaded - em_u32
> Sun Jan 25 10:50:58 2015 user.err syslog: module is already loaded -
> act_connmark
> Sun Jan 25 10:50:58 2015 user.err syslog: module is already loaded - act_mirred
> Sun Jan 25 10:50:58 2015 user.err syslog: module is already loaded - sch_ingress
> Sun Jan 25 10:50:58 2015 user.err syslog: module is already loaded - cls_fw
> Sun Jan 25 10:50:58 2015 user.err syslog: module is already loaded - sch_hfsc
> Sun Jan 25 10:50:58 2015 user.notice firewall: Reloading firewall due
> to ifup of wan (eth0.2)
> Sun Jan 25 10:51:04 2015 kern.info kernel: [  447.900000] Atheros
> AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 2 is down <---- moving
> cables around
> Sun Jan 25 10:51:07 2015 daemon.notice netifd: Interface 'wan' is now down
> Sun Jan 25 10:51:09 2015 daemon.notice netifd: Interface 'wan' is setting up now
> Sun Jan 25 10:51:09 2015 daemon.notice netifd: Interface 'wan' is now up
> Sun Jan 25 10:51:10 2015 kern.info kernel: [  453.900000] Atheros
> AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 1 is up <---- connected
> modem through a gigabit switch here
> Sun Jan 25 10:51:10 2015 user.err syslog: module is already loaded - cls_u32
> Sun Jan 25 10:51:10 2015 user.err syslog: module is already loaded - em_u32
> Sun Jan 25 10:51:10 2015 user.err syslog: module is already loaded -
> act_connmark
> Sun Jan 25 10:51:10 2015 user.err syslog: module is already loaded - act_mirred
> Sun Jan 25 10:51:10 2015 user.err syslog: module is already loaded - sch_ingress
> Sun Jan 25 10:51:10 2015 user.err syslog: module is already loaded - cls_fw
> Sun Jan 25 10:51:10 2015 user.err syslog: module is already loaded - sch_hfsc
> Sun Jan 25 10:51:19 2015 daemon.notice netifd: Interface 'wan' is now down
> Sun Jan 25 10:51:21 2015 daemon.notice netifd: Interface 'wan' is setting up now
> Sun Jan 25 10:51:21 2015 daemon.notice netifd: Interface 'wan' is now up
> Sun Jan 25 10:51:22 2015 user.err syslog: module is already loaded - cls_u32
> Sun Jan 25 10:51:22 2015 user.err syslog: module is already loaded - em_u32
> Sun Jan 25 10:51:22 2015 user.err syslog: module is already loaded -
> act_connmark
> Sun Jan 25 10:51:22 2015 user.err syslog: module is already loaded - act_mirred
> Sun Jan 25 10:51:22 2015 user.err syslog: module is already loaded - sch_ingress
> Sun Jan 25 10:51:22 2015 user.err syslog: module is already loaded - cls_fw
> Sun Jan 25 10:51:22 2015 user.err syslog: module is already loaded - sch_hfsc
> Sun Jan 25 10:51:37 2015 daemon.notice netifd: Interface 'wan' is now down
> Sun Jan 25 10:51:37 2015 daemon.notice netifd: Interface 'wan' has
> link connectivity loss
> Sun Jan 25 10:51:37 2015 daemon.notice netifd: Interface 'wan' has
> link connectivity
> Sun Jan 25 10:51:37 2015 daemon.notice netifd: Interface 'wan' is setting up now
> Sun Jan 25 10:51:37 2015 daemon.info pppd[9400]: Plugin rp-pppoe.so loaded.
> 
> As an aside, why is netifd trying so hard when the port status hasn't changed?
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From hancockrwd at gmail.com  Sun Jan 25 13:24:03 2015
From: hancockrwd at gmail.com (Robert Hancock)
Date: Sun, 25 Jan 2015 12:24:03 -0600
Subject: [OpenWrt-Devel] [PATCH v2] mac80211: Add some missing 802.11n
	capabilities to hostapd configuration
Message-ID: <1422210243-14079-1-git-send-email-hancockrwd@gmail.com>

Add some missing 802.11n capabilities to the hostapd ht_capab string when
supported by the hardware: Spatial Multiplexing Power-Save and 7935-byte AMSDUs.

Signed-off-by: Robert Hancock <hancockrwd at gmail.com>
---
 package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
index 1a85d15..72f9936 100644
--- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
+++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
@@ -42,6 +42,8 @@ drv_mac80211_init_device_config() {
 		greenfield \
 		short_gi_20 \
 		short_gi_40 \
+		smps \
+		max_amsdu \
 		dsss_cck_40
 }
 
@@ -130,8 +132,10 @@ mac80211_hostapd_setup_base() {
 			greenfield:0 \
 			short_gi_20:1 \
 			short_gi_40:1 \
+			smps:1 \
 			tx_stbc:1 \
 			rx_stbc:3 \
+			max_amsdu:1 \
 			dsss_cck_40:1
 
 		ht_cap_mask=0
@@ -139,6 +143,8 @@ mac80211_hostapd_setup_base() {
 			ht_cap_mask="$(($ht_cap_mask | $cap))"
 		done
 
+		cap_smps=$((($ht_cap_mask >> 2) & 3))
+
 		cap_rx_stbc=$((($ht_cap_mask >> 8) & 3))
 		[ "$rx_stbc" -lt "$cap_rx_stbc" ] && cap_rx_stbc="$rx_stbc"
 		ht_cap_mask="$(( ($ht_cap_mask & ~(0x300)) | ($cap_rx_stbc << 8) ))"
@@ -152,8 +158,13 @@ mac80211_hostapd_setup_base() {
 			RX-STBC1:0x300:0x100:1 \
 			RX-STBC12:0x300:0x200:1 \
 			RX-STBC123:0x300:0x300:1 \
+			MAX-AMSDU-7935:0x800::$max_amsdu \
 			DSSS_CCK-40:0x1000::$dsss_cck_40
 
+		# SM Power Save: 0=static, 1=dynamic, 3=disabled
+		[ "$smps" = 1 -a "$cap_smps" = 0 ] && ht_capab_flags="$ht_capab_flags[SMPS-STATIC]"
+		[ "$smps" = 1 -a "$cap_smps" = 1 ] && ht_capab_flags="$ht_capab_flags[SMPS-DYNAMIC]"
+
 		ht_capab="$ht_capab$ht_capab_flags"
 		[ -n "$ht_capab" ] && append base_cfg "ht_capab=$ht_capab" "$N"
 	}
-- 
2.1.0
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From a.seppala at gmail.com  Sun Jan 25 13:57:15 2015
From: a.seppala at gmail.com (=?UTF-8?B?QW50dGkgU2VwcMOkbMOk?=)
Date: Sun, 25 Jan 2015 20:57:15 +0200
Subject: [OpenWrt-Devel] [PATCH] uboot-lantiq: fix P-2812HNU-F1/3
	package dependency
In-Reply-To: <54C4FAF8.8050405@gmail.com>
References: <1422190368-31840-1-git-send-email-a.seppala@gmail.com>
 <54C4FAF8.8050405@gmail.com>
Message-ID: <CAKv9HNYs7SfBcR6n6O=DphpdTkweRROAbVfYwFfSkNa_DWPSyw@mail.gmail.com>

On 25 January 2015 at 16:17, Sylwester Petela <sscapi at gmail.com> wrote:
> W dniu 2015-01-25 o 13:52, Antti Sepp?l? pisze:
>> After r43987 TARGET_lantiq_xrx200_P2812HNUFX does not exist anymore.
>> Fix empty menuconfig bootloader selection by making u-boot depend on
>> one of the new target profiles.
>>
>> Signed-off-by: Antti Sepp?l? <a.seppala at gmail.com>
>> ---
>>  package/boot/uboot-lantiq/Makefile | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/package/boot/uboot-lantiq/Makefile b/package/boot/uboot-lantiq/Makefile
>> index d2b868f..d59aac8 100644
>> --- a/package/boot/uboot-lantiq/Makefile
>> +++ b/package/boot/uboot-lantiq/Makefile
>> @@ -247,14 +247,14 @@ define uboot/p2812hnufx_ram
>>    TITLE:=U-Boot for ZyXEL P-2812HNU-Fx (RAM)
>>    SOC:=vr9
>>    DDR_SETTINGS:=board/zyxel/p2812hnufx/ddr_settings.h
>> -  DEPS:=@TARGET_lantiq_xrx200_P2812HNUFX
>> +  DEPS:=@TARGET_lantiq_xrx200_P2812HNUF1||@TARGET_lantiq_xrx200_P2812HNUF3
>>  endef
>>
>>  define uboot/p2812hnufx_nandspl
>>    TITLE:=U-Boot for ZyXEL P-2812HNU-Fx (NAND SPL)
>>    SOC:=vr9
>>    IMAGE:=u-boot.ltq.lzo.nandspl
>> -  DEPS:=@TARGET_lantiq_xrx200_P2812HNUFX
>> +  DEPS:=@TARGET_lantiq_xrx200_P2812HNUF1||@TARGET_lantiq_xrx200_P2812HNUF3
>>  endef
>>
>>
> That patch will fix target deps but U-Boot for this boards needs fixing.
> P-2812HNU-F1 is NAND based, needs NAND_TPL image instead of SPL (needs patches provided by Antonios Vamporakis  in branch "stable_fixes_for_daniel_20140109" on Daniel github)
> P-2812HNU-F3 is NOR/NAND based (boots from NOR), NOR needs to be added in board definition .
>
> So ATM U-Boot for this boards is broken.

I tried and it seems the ram version
(openwrt-lantiq-p2812hnufx_ram-u-boot.asc) builds and boots properly.

The openwrt-lantiq-p2812hnufx_nandspl-u-boot.img indeed does not boot
correctly. Is anyone working on fixing it? (Apparently conversion to
TPL is needed)
For F1 board it looks to me that it is just a matter of updating
u-boot version in openwrt repository and adding a few patches on top
of that.

Br,
-- 
Antti
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From kaloz at openwrt.org  Sun Jan 25 14:50:32 2015
From: kaloz at openwrt.org (Imre Kaloz)
Date: Sun, 25 Jan 2015 20:50:32 +0100
Subject: [OpenWrt-Devel] [PATCH 3/9] kernel: Allow ubi autoattach to run
 on NOR flash
In-Reply-To: <20150125170603.GM8470@lukather>
References: <1421164606-3222-1-git-send-email-maxime.ripard@free-electrons.com>
 <1421164606-3222-4-git-send-email-maxime.ripard@free-electrons.com>
 <CACna6rz5APOgGThwFSDC8RG_2xhYYVSLyv2Qdv=4nnT_Pa7o=g@mail.gmail.com>
 <20150114123737.GR4891@lukather> <20150122103314.GL4367@lukather>
 <op.xsw2airr2s3iss@ecaz> <20150125170603.GM8470@lukather>
Message-ID: <op.xs1aqign2s3iss@ecaz>

Hi,

On Sun, 25 Jan 2015 18:06:03 +0100, Maxime Ripard  
<maxime.ripard at free-electrons.com> wrote:

>> Sure, but please implement UBI on NOR as a generic solution.
>
> What do you mean? It already works quite well (with that patch applied
> and the NOR sub-profile), so I'm not sure I have to implement
> anything, be it generic or not.

I've meant to make it generic, like the squashfs/ubfs/etc images so other  
targets can use it, too.

>> >>The A385-RD board has a much smaller SPI-NOR (16MB) though, so we
>> >>could use jffs2 there, but I wasn't seeing much point at creating a
>> >>whole new layout just for a single board.
>> >
>> >I'll switch this one to JFFS2 and the MTDSPLIT framework. Are you
>> >satisfied with the NAND support? Just to know if I can continue to
>> >model the NOR stuff on that.
>>
>> As I've written in the other mail, I'm mostly happy with it, but please  
>> make
>> sure you don't hardcode available profiles but parse them.
>
> If we don't plan on supporting building single sub-profiles like
> ar71xx, I'm not even sure that we need to parse anything, we can just
> loop over the sub-profiles list in any case.

I think supporting that could be handy so users (and people at Marvell)  
can just build what they want.


Imre
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From florian at openwrt.org  Sun Jan 25 15:08:41 2015
From: florian at openwrt.org (Florian Fainelli)
Date: Sun, 25 Jan 2015 12:08:41 -0800
Subject: [OpenWrt-Devel] How to enable EARLY_PRINTK by default on ARM
 target?
In-Reply-To: <CACna6rzzUWgP1nUe2x1nHLORv9fADQRPBZAdQSXSVahzRPHaEw@mail.gmail.com>
References: <CACna6rzzUWgP1nUe2x1nHLORv9fADQRPBZAdQSXSVahzRPHaEw@mail.gmail.com>
Message-ID: <54C54D49.40204@openwrt.org>

Le 14/01/2015 22:54, Rafa? Mi?ecki a ?crit :
> I wanted bcm53xx kernels to be compiled with EARLY_PRINTK by default.
> This is safe, we enable "earlyprintk" using bootargs on tested devices
> only.
> 
> So I have config option enabled in default configs:
>> grep EARLY_PRINTK target/linux/bcm53xx/config-3.1*
> target/linux/bcm53xx/config-3.14:CONFIG_EARLY_PRINTK=y
> target/linux/bcm53xx/config-3.18:CONFIG_EARLY_PRINTK=y
> 
> However it gets overwritten by KERNEL_EARLY_PRINTK defined in
> config/Config-kernel.in.
> 
> KERNEL_EARLY_PRINTK:
> 1) depends on arm - so non-ARM targets are not affected
> 2) default n - which disables it by default

Would not "default y if TARGET_bcm53xx" achieve what you want here?
--
Florian
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From valent.turkovic at gmail.com  Sun Jan 25 15:56:39 2015
From: valent.turkovic at gmail.com (valent.turkovic at gmail.com)
Date: Sun, 25 Jan 2015 21:56:39 +0100
Subject: [OpenWrt-Devel] Wiki upload rights
In-Reply-To: <CAD=nrE9nDCf39w+Mg-tAzktnQKh7xVnOsSnx6X_Xt9V1zi3C8w@mail.gmail.com>
References: <CAD=nrE8bF-P2Hh9RJ_FG98P=Exvt8HV2AebeCk-u13V9eqNyHg@mail.gmail.com>
 <54A2D2FA.4070305@openwrt.org>
 <CAD=nrE9nDCf39w+Mg-tAzktnQKh7xVnOsSnx6X_Xt9V1zi3C8w@mail.gmail.com>
Message-ID: <CAD=nrE82ULAHG68B5A42ryH+Yjp3RZPV8CLinUhokWBotL-hYQ@mail.gmail.com>

Any ideas why is this happening with my account? Can you please check user
rights for wiki account "valentt"

Thanks.

On Mon, Jan 19, 2015 at 8:15 PM, valent.turkovic at gmail.com <
valent.turkovic at gmail.com> wrote:

> Well, it is strange, but check out this message:
> http://i.imgur.com/2NbQBxc.png
>
> On Tue, Dec 30, 2014 at 5:29 PM, Jo-Philipp Wich <jow at openwrt.org> wrote:
>
>> Hi,
>>
>> upload should be possible for any registered user within the media
>> namespace.
>>
>>
>> ~ Jow
>> _______________________________________________
>> openwrt-devel mailing list
>> openwrt-devel at lists.openwrt.org
>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150125/310f8175/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From valent.turkovic at gmail.com  Sun Jan 25 16:00:24 2015
From: valent.turkovic at gmail.com (valent.turkovic at gmail.com)
Date: Sun, 25 Jan 2015 22:00:24 +0100
Subject: [OpenWrt-Devel] Wiki upload rights
In-Reply-To: <CAD=nrE82ULAHG68B5A42ryH+Yjp3RZPV8CLinUhokWBotL-hYQ@mail.gmail.com>
References: <CAD=nrE8bF-P2Hh9RJ_FG98P=Exvt8HV2AebeCk-u13V9eqNyHg@mail.gmail.com>
 <54A2D2FA.4070305@openwrt.org>
 <CAD=nrE9nDCf39w+Mg-tAzktnQKh7xVnOsSnx6X_Xt9V1zi3C8w@mail.gmail.com>
 <CAD=nrE82ULAHG68B5A42ryH+Yjp3RZPV8CLinUhokWBotL-hYQ@mail.gmail.com>
Message-ID: <CAD=nrE-k-Hb6hGru+MX3A9oV3KcZ3ox5+_OpEfL45CXTVDTCeA@mail.gmail.com>

Hmm, it looks like when I'm editing wiki page then probably I'm in "root"
folder and there I don't have permissions to upload images, but then I
choose from my account page to upload to some other folder I can upload.

Check out screenshots:
http://i.imgur.com/RbIxKsG.png
http://i.imgur.com/tz51VHE.png

On Sun, Jan 25, 2015 at 9:56 PM, valent.turkovic at gmail.com <
valent.turkovic at gmail.com> wrote:

> Any ideas why is this happening with my account? Can you please check user
> rights for wiki account "valentt"
>
> Thanks.
>
> On Mon, Jan 19, 2015 at 8:15 PM, valent.turkovic at gmail.com <
> valent.turkovic at gmail.com> wrote:
>
>> Well, it is strange, but check out this message:
>> http://i.imgur.com/2NbQBxc.png
>>
>> On Tue, Dec 30, 2014 at 5:29 PM, Jo-Philipp Wich <jow at openwrt.org> wrote:
>>
>>> Hi,
>>>
>>> upload should be possible for any registered user within the media
>>> namespace.
>>>
>>>
>>> ~ Jow
>>> _______________________________________________
>>> openwrt-devel mailing list
>>> openwrt-devel at lists.openwrt.org
>>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150125/4efabeb1/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From zajec5 at gmail.com  Sun Jan 25 16:03:52 2015
From: zajec5 at gmail.com (=?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?=)
Date: Sun, 25 Jan 2015 22:03:52 +0100
Subject: [OpenWrt-Devel] How to enable EARLY_PRINTK by default on ARM
	target?
In-Reply-To: <54C54D49.40204@openwrt.org>
References: <CACna6rzzUWgP1nUe2x1nHLORv9fADQRPBZAdQSXSVahzRPHaEw@mail.gmail.com>
 <54C54D49.40204@openwrt.org>
Message-ID: <CACna6rxT26uTMKTfVhfUu8cBNJ_r3s1HT+fGNDRKpw8b2j58hA@mail.gmail.com>

On 25 January 2015 at 21:08, Florian Fainelli <florian at openwrt.org> wrote:
> Le 14/01/2015 22:54, Rafa? Mi?ecki a ?crit :
>> I wanted bcm53xx kernels to be compiled with EARLY_PRINTK by default.
>> This is safe, we enable "earlyprintk" using bootargs on tested devices
>> only.
>>
>> So I have config option enabled in default configs:
>>> grep EARLY_PRINTK target/linux/bcm53xx/config-3.1*
>> target/linux/bcm53xx/config-3.14:CONFIG_EARLY_PRINTK=y
>> target/linux/bcm53xx/config-3.18:CONFIG_EARLY_PRINTK=y
>>
>> However it gets overwritten by KERNEL_EARLY_PRINTK defined in
>> config/Config-kernel.in.
>>
>> KERNEL_EARLY_PRINTK:
>> 1) depends on arm - so non-ARM targets are not affected
>> 2) default n - which disables it by default
>
> Would not "default y if TARGET_bcm53xx" achieve what you want here?

Right, already implemented in
https://dev.openwrt.org/changeset/43980/
, thanks.

-- 
Rafa?
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From valent.turkovic at gmail.com  Sun Jan 25 16:12:58 2015
From: valent.turkovic at gmail.com (valent.turkovic at gmail.com)
Date: Sun, 25 Jan 2015 22:12:58 +0100
Subject: [OpenWrt-Devel] Wiki upload rights
In-Reply-To: <CAD=nrE-k-Hb6hGru+MX3A9oV3KcZ3ox5+_OpEfL45CXTVDTCeA@mail.gmail.com>
References: <CAD=nrE8bF-P2Hh9RJ_FG98P=Exvt8HV2AebeCk-u13V9eqNyHg@mail.gmail.com>
 <54A2D2FA.4070305@openwrt.org>
 <CAD=nrE9nDCf39w+Mg-tAzktnQKh7xVnOsSnx6X_Xt9V1zi3C8w@mail.gmail.com>
 <CAD=nrE82ULAHG68B5A42ryH+Yjp3RZPV8CLinUhokWBotL-hYQ@mail.gmail.com>
 <CAD=nrE-k-Hb6hGru+MX3A9oV3KcZ3ox5+_OpEfL45CXTVDTCeA@mail.gmail.com>
Message-ID: <CAD=nrE85Oyw3SkE0MyWapB1g0pnznTPNTkskBZY11NiwMExaHA@mail.gmail.com>

Who is Mediawiki admin? Somebody was messing about media namespaces and
blocked some namespaces so that they don't have permission to accept
uploaded images.

For example "toh:tplink" namespace - http://i.imgur.com/quWSV4L.png

On Sun, Jan 25, 2015 at 10:00 PM, valent.turkovic at gmail.com <
valent.turkovic at gmail.com> wrote:

> Hmm, it looks like when I'm editing wiki page then probably I'm in "root"
> folder and there I don't have permissions to upload images, but then I
> choose from my account page to upload to some other folder I can upload.
>
> Check out screenshots:
> http://i.imgur.com/RbIxKsG.png
> http://i.imgur.com/tz51VHE.png
>
> On Sun, Jan 25, 2015 at 9:56 PM, valent.turkovic at gmail.com <
> valent.turkovic at gmail.com> wrote:
>
>> Any ideas why is this happening with my account? Can you please check
>> user rights for wiki account "valentt"
>>
>> Thanks.
>>
>> On Mon, Jan 19, 2015 at 8:15 PM, valent.turkovic at gmail.com <
>> valent.turkovic at gmail.com> wrote:
>>
>>> Well, it is strange, but check out this message:
>>> http://i.imgur.com/2NbQBxc.png
>>>
>>> On Tue, Dec 30, 2014 at 5:29 PM, Jo-Philipp Wich <jow at openwrt.org>
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> upload should be possible for any registered user within the media
>>>> namespace.
>>>>
>>>>
>>>> ~ Jow
>>>> _______________________________________________
>>>> openwrt-devel mailing list
>>>> openwrt-devel at lists.openwrt.org
>>>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>>>>
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150125/b35cfffe/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From jow at openwrt.org  Sun Jan 25 16:17:01 2015
From: jow at openwrt.org (Jo-Philipp Wich)
Date: Sun, 25 Jan 2015 22:17:01 +0100
Subject: [OpenWrt-Devel] Wiki upload rights
In-Reply-To: <CAD=nrE85Oyw3SkE0MyWapB1g0pnznTPNTkskBZY11NiwMExaHA@mail.gmail.com>
References: <CAD=nrE8bF-P2Hh9RJ_FG98P=Exvt8HV2AebeCk-u13V9eqNyHg@mail.gmail.com>	<54A2D2FA.4070305@openwrt.org>	<CAD=nrE9nDCf39w+Mg-tAzktnQKh7xVnOsSnx6X_Xt9V1zi3C8w@mail.gmail.com>	<CAD=nrE82ULAHG68B5A42ryH+Yjp3RZPV8CLinUhokWBotL-hYQ@mail.gmail.com>	<CAD=nrE-k-Hb6hGru+MX3A9oV3KcZ3ox5+_OpEfL45CXTVDTCeA@mail.gmail.com>
 <CAD=nrE85Oyw3SkE0MyWapB1g0pnznTPNTkskBZY11NiwMExaHA@mail.gmail.com>
Message-ID: <54C55D4D.90702@openwrt.org>

Hi.

As I already wrote three weeks ago, upload into the media namespace.

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


From chunkeey at googlemail.com  Sun Jan 25 18:08:23 2015
From: chunkeey at googlemail.com (Christian Lamparter)
Date: Mon, 26 Jan 2015 00:08:23 +0100
Subject: [OpenWrt-Devel] [PATCH] ralink: fix USB host function for Intenso
	M2M
Message-ID: <4763209.vB1pHZaPAT@debian64>

The ubootloader of the M2M sets the reset bits for
both USB device and USB host during initialization
(to save a few mA of power during boot).

However, for the usb<->sata bridge to be properly
detected, it is necessary to clear both reset bits
as otherwise the kernel logs will just be filled
with:

usb 1-1: device descriptor read/64, error -145
...

Signed-off-by: Christian Lamparter <chunkeey at googlemail.com>
---
This is the least intrusive version of the patch I could come
up with. It looks like the ralink-phy.c could use some work.

i.e.: 

+//             reset_control_assert(rstdev);
+//             reset_control_assert(rsthost);
looks like someone tried to play with the reset signals.
but disabled it again?

+               if (OTG_STATE_B_HOST) {
The condition (OTG_STATE_B_HOST) is always true?! What about OTG?
Is it not supported?

Thing is, I only have this RT5350 device and I'm
looking for something which makes use of the USB-
OTG feature (The current code looks a bit weird,
does it even work?). So, can anybody tell me a
reliable, inexpensive and easy to open/play with
device?

Regards,
Christian
---
 .../ramips/patches-3.14/0037-USB-phy-add-ralink-SoC-driver.patch      | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/target/linux/ramips/patches-3.14/0037-USB-phy-add-ralink-SoC-driver.patch b/target/linux/ramips/patches-3.14/0037-USB-phy-add-ralink-SoC-driver.patch
index 9920afb..b5c199a 100644
--- a/target/linux/ramips/patches-3.14/0037-USB-phy-add-ralink-SoC-driver.patch
+++ b/target/linux/ramips/patches-3.14/0037-USB-phy-add-ralink-SoC-driver.patch
@@ -37,7 +37,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 +obj-$(CONFIG_RALINK_USBPHY)		+= ralink-phy.o
 --- /dev/null
 +++ b/drivers/usb/phy/ralink-phy.c
-@@ -0,0 +1,191 @@
+@@ -0,0 +1,193 @@
 +/*
 + * Copyright (C) 2013 John Crispin <blogic at openwrt.org>
 + *
@@ -103,6 +103,8 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 +			rt_sysc_m32(0, RT_SYSCFG1_USB0_HOST_MODE, RT_SYSC_REG_SYSCFG1);
 +			if (!IS_ERR(rsthost))
 +				reset_control_deassert(rsthost);
++			if (!IS_ERR(rstdev))
++				reset_control_deassert(rstdev);
 +		} else {
 +			rt_sysc_m32(RT_SYSCFG1_USB0_HOST_MODE, 0, RT_SYSC_REG_SYSCFG1);
 +			if (!IS_ERR(rstdev))
-- 
2.1.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From weedy2887 at gmail.com  Sun Jan 25 20:01:10 2015
From: weedy2887 at gmail.com (Weedy)
Date: Sun, 25 Jan 2015 20:01:10 -0500
Subject: [OpenWrt-Devel] ar8216: phy_init and bug report 18415
In-Reply-To: <54C53080.6070505@gmail.com>
References: <CAFSsGVtS5fmQS=bP+AfMO1w5Cm5b_D+69q_6chv8iiXWKisUxA@mail.gmail.com>
 <CAFE24U2p5=ZdisG5pnxHaLTncsfAjcpP_2Od-aAOtvFJs=YqFQ@mail.gmail.com>
 <CAFE24U0o6pOUw=CcsOnbc8Kqny8kk=Wo+T=b7wvppHbzja1USw@mail.gmail.com>
 <5491D003.3090207@gmail.com>
 <CAFE24U2+4eXSnva=X3GVhF7icypDtZSMh=t4NApyNqk-qNDxSQ@mail.gmail.com>
 <54C53080.6070505@gmail.com>
Message-ID: <CAFE24U1F=wUZ4W6==gHhv19DLBO4eSb+OB6DBMPzC_g1eK7jMg@mail.gmail.com>

On Jan 25, 2015 1:06 PM, "Heiner Kallweit" <hkallweit1 at gmail.com> wrote:
>
> To me it doesn't look like an issue with the AR8216 driver. All related
output is ok.
> The hardware is quite common and in case of a driver issue I would expect
much more
> people to complain.
>
> What looks a little strange to me is that there seem to be two interfaces
(modem + wan)
> fiddling with eth0.2
>
> Heiner

It's an alias.

My modem is 100mbit. I can plug and old 100mbit laptop into it and also
have it not show up. It rebooted with the modem plugged in and port 1
didn't come up until I used a gigabit switch.

Auto-neg is broken. Tomorrow I'll do a new checkout just to be sure. Any
commands you want me to run (switchcfg?) to show you the port status?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150125/1655eaee/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From darwinskernel at gmail.com  Sun Jan 25 20:06:07 2015
From: darwinskernel at gmail.com (SGT. Garcia)
Date: Sun, 25 Jan 2015 20:06:07 -0500
Subject: [OpenWrt-Devel] [PATCH 0/9] mvebu: Fix flash support and
 support for A38x
In-Reply-To: <1421164606-3222-1-git-send-email-maxime.ripard@free-electrons.com>
References: <1421164606-3222-1-git-send-email-maxime.ripard@free-electrons.com>
Message-ID: <20150126010607.GB6919@vpn.5665sherbrooke.house>

On Jan 13  16:56 +0100, Maxime Ripard wrote:
> Hi,

why you have Mail on your computer setup, just use that.

if you must have the passwd use the keychain program on your computer:
Applicatons > Utilities > Keychain

and search for '5665'any news from Stephanie?
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From mike at flyn.org  Mon Jan 26 00:07:21 2015
From: mike at flyn.org (W. Michael Petullo)
Date: Mon, 26 Jan 2015 00:07:21 -0500
Subject: [OpenWrt-Devel] [PATCH] kernel: add support for NFSv4
Message-ID: <20150126050728.94C0C158019D@imp.flyn.org>


From mike at flyn.org  Mon Jan 26 00:01:34 2015
From: mike at flyn.org (W. Michael Petullo)
Date: Mon, 26 Jan 2015 00:01:34 -0500
Subject: [PATCH] kernel: add support for NFSv4
Message-ID: <mailman.20.1593078760.4661.openwrt-devel@lists.openwrt.org>

This work is based on Daniel Colascione's submission to the OpenWrt
devel mailing list on January 15th, 2014. I modified his patch so that
it applied to the current OpenWrt Barrier Breaker tree.

Signed-off-by: W. Michael Petullo <mike at flyn.org>
---
 package/kernel/linux/modules/fs.mk         | 50 ++++++++++++++++++++----------
 package/kernel/linux/modules/lib.mk        | 15 +++++++++
 package/kernel/linux/modules/netsupport.mk | 14 +++++++++
 3 files changed, 62 insertions(+), 17 deletions(-)

diff --git a/package/kernel/linux/modules/fs.mk b/package/kernel/linux/modules/fs.mk
index c117415..9e3470b 100644
--- a/package/kernel/linux/modules/fs.mk
+++ b/package/kernel/linux/modules/fs.mk
@@ -292,12 +292,24 @@ define KernelPackage/fs-nfs/description
  Kernel module for NFS support
 endef
 
+define KernelPackage/fs-nfs/config
+  if PACKAGE_kmod-fs-nfs
+       config KERNEL_NFS_V4
+               bool "Support NFSv4 in NFS client"
+               depends on PACKAGE_kmod-fs-sunrpc-auth-rpcgss
+               default n
+               help
+                 Select this option to support NFSv4 in the NFS server
+  endif
+endef
+
 $(eval $(call KernelPackage,fs-nfs))
 
 
 define KernelPackage/fs-nfs-common
   SUBMENU:=$(FS_MENU)
   TITLE:=Common NFS filesystem modules
+  DEPENDS:=+kmod-lib-oid-registry
   KCONFIG:= \
 	CONFIG_LOCKD \
 	CONFIG_SUNRPC
@@ -310,36 +322,40 @@ endef
 $(eval $(call KernelPackage,fs-nfs-common))
 
 
-define KernelPackage/fs-nfs-common-v4
+define KernelPackage/fs-sunrpc-auth-rpcgss
   SUBMENU:=$(FS_MENU)
-  TITLE:=Common NFS V4 filesystem modules
-  KCONFIG+=\
-	CONFIG_SUNRPC_GSS\
-	CONFIG_NFS_V4=y\
-	CONFIG_NFSD_V4=y
-  DEPENDS:= @BROKEN
-  FILES+=$(LINUX_DIR)/net/sunrpc/auth_gss/auth_rpcgss.ko
-  AUTOLOAD=$(call AutoLoad,30,auth_rpcgss)
-endef
-
-define KernelPackage/fs-nfs-common-v4/description
- Kernel modules for NFS V4 & NFSD V4 kernel support
+  TITLE:=GSS authentication for SUN RPC
+  DEPENDS:=+kmod-fs-nfs-common
+  KCONFIG:=CONFIG_SUNRPC_GSS
+  FILES:= \
+       $(LINUX_DIR)/net/sunrpc/auth_gss/auth_rpcgss.ko
+  AUTOLOAD:=$(call AutoLoad,30,auth_rpcgss)
 endef
 
-$(eval $(call KernelPackage,fs-nfs-common-v4))
-
+$(eval $(call KernelPackage,fs-sunrpc-auth-rpcgss))
 
 define KernelPackage/fs-nfsd
   SUBMENU:=$(FS_MENU)
   TITLE:=NFS kernel server support
-  DEPENDS:=+kmod-fs-nfs-common +kmod-fs-exportfs
-  KCONFIG:= \
+  DEPENDS:=+kmod-fs-nfs-common +kmod-fs-exportfs +kmod-fs-sunrpc-auth-rpcgss
+  KCONFIG= \
 	CONFIG_NFSD \
 	CONFIG_NFSD_FAULT_INJECTION=n
   FILES:=$(LINUX_DIR)/fs/nfsd/nfsd.ko
   AUTOLOAD:=$(call AutoLoad,40,nfsd)
 endef
 
+define KernelPackage/fs-nfsd/config
+  if PACKAGE_kmod-fs-nfsd
+       config KERNEL_NFSD_V4
+               bool "Support NFSv4 in NFS server"
+               depends on PACKAGE_kmod-fs-sunrpc-auth-rpcgss
+               default n
+               help
+                 Select this option to support NFSv4 in the NFS server
+  endif
+endef
+
 define KernelPackage/fs-nfsd/description
  Kernel module for NFS kernel server support
 endef
diff --git a/package/kernel/linux/modules/lib.mk b/package/kernel/linux/modules/lib.mk
index cd919ba..a148da3 100644
--- a/package/kernel/linux/modules/lib.mk
+++ b/package/kernel/linux/modules/lib.mk
@@ -202,3 +202,18 @@ define KernelPackage/lib-cordic/description
 endef
 
 $(eval $(call KernelPackage,lib-cordic))
+
+
+define KernelPackage/lib-oid-registry
+  SUBMENU:=$(LIB_MENU)
+  TITLE:=OID-Registry function support
+  KCONFIG:=CONFIG_OID_REGISTRY
+  FILES:=$(LINUX_DIR)/lib/oid_registry.ko
+  AUTOLOAD:=$(call AutoProbe,oid-registry)
+endef
+
+define KernelPackage/lib-oid-registry/description
+ Kernel module for OID-Registry function support
+endef
+
+$(eval $(call KernelPackage,lib-oid-registry))
diff --git a/package/kernel/linux/modules/netsupport.mk b/package/kernel/linux/modules/netsupport.mk
index fc85e22..bffb09c 100644
--- a/package/kernel/linux/modules/netsupport.mk
+++ b/package/kernel/linux/modules/netsupport.mk
@@ -967,3 +967,17 @@ define KernelPackage/rxrpc/description
 endef
 
 $(eval $(call KernelPackage,rxrpc))
+
+define KernelPackage/dns-resolver
+  SUBMENU:=$(NETWORK_SUPPORT_MENU)
+  TITLE:=DNS-resolver modules
+  KCONFIG:=CONFIG_DNS_RESOLVER
+  FILES:= \
+       $(LINUX_DIR)/net/dns_resolver/dns_resolver.ko
+endef
+
+define KernelPackage/dns-resolver/description
+ Kernel modules for DNS-RESOLVER support
+endef
+
+$(eval $(call KernelPackage,dns-resolver))
-- 
2.1.0
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From hkallweit1 at gmail.com  Mon Jan 26 01:44:53 2015
From: hkallweit1 at gmail.com (Heiner Kallweit)
Date: Mon, 26 Jan 2015 07:44:53 +0100
Subject: [OpenWrt-Devel] ar8216: phy_init and bug report 18415
In-Reply-To: <CAFE24U1F=wUZ4W6==gHhv19DLBO4eSb+OB6DBMPzC_g1eK7jMg@mail.gmail.com>
References: <CAFSsGVtS5fmQS=bP+AfMO1w5Cm5b_D+69q_6chv8iiXWKisUxA@mail.gmail.com>	<CAFE24U2p5=ZdisG5pnxHaLTncsfAjcpP_2Od-aAOtvFJs=YqFQ@mail.gmail.com>	<CAFE24U0o6pOUw=CcsOnbc8Kqny8kk=Wo+T=b7wvppHbzja1USw@mail.gmail.com>	<5491D003.3090207@gmail.com>	<CAFE24U2+4eXSnva=X3GVhF7icypDtZSMh=t4NApyNqk-qNDxSQ@mail.gmail.com>	<54C53080.6070505@gmail.com>
 <CAFE24U1F=wUZ4W6==gHhv19DLBO4eSb+OB6DBMPzC_g1eK7jMg@mail.gmail.com>
Message-ID: <54C5E265.6090402@gmail.com>

"I can plug an old 100mbit laptop into it and also have it not show up."
You connect the laptop with the router or the modem?
Does it work if you boot with the modem unplugged in and plug it in later?

If it worked with a previous version of the driver then you could use "git bisect" to find out which change actually introduced
the problem.

Heiner


Am 26.01.2015 um 02:01 schrieb Weedy:
> On Jan 25, 2015 1:06 PM, "Heiner Kallweit" <hkallweit1 at gmail.com <mailto:hkallweit1 at gmail.com>> wrote:
>>
>> To me it doesn't look like an issue with the AR8216 driver. All related output is ok.
>> The hardware is quite common and in case of a driver issue I would expect much more
>> people to complain.
>>
>> What looks a little strange to me is that there seem to be two interfaces (modem + wan)
>> fiddling with eth0.2
>>
>> Heiner
> 
> It's an alias.
> 
> My modem is 100mbit. I can plug and old 100mbit laptop into it and also have it not show up. It rebooted with the modem plugged in and port 1 didn't come up until I used a gigabit switch.
> 
> Auto-neg is broken. Tomorrow I'll do a new checkout just to be sure. Any commands you want me to run (switchcfg?) to show you the port status?
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From zajec5 at gmail.com  Mon Jan 26 05:25:33 2015
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Mon, 26 Jan 2015 11:25:33 +0100
Subject: [OpenWrt-Devel] [PATCH libubox] uloop: ignore SIGPIPE by default
Message-ID: <1422267933-5240-1-git-send-email-zajec5@gmail.com>

Most app don't want to crash because of unhandled SIGPIPE. It could
happen is such trivial situations like writing to socket.

Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com>
---
 uloop.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/uloop.c b/uloop.c
index 9a77ce4..7d11bbc 100644
--- a/uloop.c
+++ b/uloop.c
@@ -582,6 +582,21 @@ static void uloop_install_handler(int signum, void (*handler)(int), struct sigac
 		sigaction(signum, act, NULL);
 }
 
+static void uloop_ignore_signal(int signum, bool ignore)
+{
+	struct sigaction s;
+
+	sigaction(signum, NULL, &s);
+
+	if (ignore) {
+		if (s.sa_handler == SIG_DFL) /* Ignore only if there isn't any custom handler */
+			signal(signum, SIG_IGN);
+	} else {
+		if (s.sa_handler == SIG_IGN) /* Restore only if noone modified our SIG_IGN */
+			signal(signum, SIG_DFL);
+	}
+}
+
 static void uloop_setup_signals(bool add)
 {
 	static struct sigaction old_sigint, old_sigchld, old_sigterm;
@@ -589,6 +604,8 @@ static void uloop_setup_signals(bool add)
 	uloop_install_handler(SIGINT, uloop_handle_sigint, &old_sigint, add);
 	uloop_install_handler(SIGTERM, uloop_handle_sigint, &old_sigterm, add);
 	uloop_install_handler(SIGCHLD, uloop_sigchld, &old_sigchld, add);
+
+	uloop_ignore_signal(SIGPIPE, add);
 }
 
 static int uloop_get_next_timeout(struct timeval *tv)
-- 
1.8.4.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From nbd at openwrt.org  Mon Jan 26 05:30:59 2015
From: nbd at openwrt.org (Felix Fietkau)
Date: Mon, 26 Jan 2015 11:30:59 +0100
Subject: [OpenWrt-Devel] [PATCH libubox] uloop: ignore SIGPIPE by default
In-Reply-To: <1422267933-5240-1-git-send-email-zajec5@gmail.com>
References: <1422267933-5240-1-git-send-email-zajec5@gmail.com>
Message-ID: <54C61763.2090901@openwrt.org>

On 2015-01-26 11:25, Rafa? Mi?ecki wrote:
> Most app don't want to crash because of unhandled SIGPIPE. It could
> happen is such trivial situations like writing to socket.
> 
> Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com>
> ---
>  uloop.c | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/uloop.c b/uloop.c
> index 9a77ce4..7d11bbc 100644
> --- a/uloop.c
> +++ b/uloop.c
> @@ -582,6 +582,21 @@ static void uloop_install_handler(int signum, void (*handler)(int), struct sigac
>  		sigaction(signum, act, NULL);
>  }
>  
> +static void uloop_ignore_signal(int signum, bool ignore)
> +{
> +	struct sigaction s;
> +
> +	sigaction(signum, NULL, &s);
> +
> +	if (ignore) {
> +		if (s.sa_handler == SIG_DFL) /* Ignore only if there isn't any custom handler */
> +			signal(signum, SIG_IGN);
> +	} else {
> +		if (s.sa_handler == SIG_IGN) /* Restore only if noone modified our SIG_IGN */
> +			signal(signum, SIG_DFL);
> +	}
How about setting sa.handler inside the if block, and using sigaction to
change the signal. This API mix looks a bit quirky to me.

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

From weedy2887 at gmail.com  Mon Jan 26 05:34:26 2015
From: weedy2887 at gmail.com (Weedy)
Date: Mon, 26 Jan 2015 05:34:26 -0500
Subject: [OpenWrt-Devel] ar8216: phy_init and bug report 18415
In-Reply-To: <54C5E265.6090402@gmail.com>
References: <CAFSsGVtS5fmQS=bP+AfMO1w5Cm5b_D+69q_6chv8iiXWKisUxA@mail.gmail.com>
 <CAFE24U2p5=ZdisG5pnxHaLTncsfAjcpP_2Od-aAOtvFJs=YqFQ@mail.gmail.com>
 <CAFE24U0o6pOUw=CcsOnbc8Kqny8kk=Wo+T=b7wvppHbzja1USw@mail.gmail.com>
 <5491D003.3090207@gmail.com>
 <CAFE24U2+4eXSnva=X3GVhF7icypDtZSMh=t4NApyNqk-qNDxSQ@mail.gmail.com>
 <54C53080.6070505@gmail.com>
 <CAFE24U1F=wUZ4W6==gHhv19DLBO4eSb+OB6DBMPzC_g1eK7jMg@mail.gmail.com>
 <54C5E265.6090402@gmail.com>
Message-ID: <CAFE24U0OOkqmtigVKNhGQDpD2Qc8qq4G9K8-a4UigUqCbXp77Q@mail.gmail.com>

On Jan 26, 2015 1:44 AM, "Heiner Kallweit" <hkallweit1 at gmail.com> wrote:
> If it worked with a previous version of the driver then you could use
"git bisect" to find out which change actually introduced
> the problem.

https://dev.openwrt.org/changeset/43332
This was the change, there was a huge fit about it at the time. That
said....

I've stepped through the tree and found
https://dev.openwrt.org/changeset/43356

I think something might have been out of sync in my tree (or the image I
flashed, I don't think I did a distclean). I've done a fresh check out into
a new directory and verified I have 43356+ changes in
target/linux/generic/files/drivers/net/phy/ar8216.c

All ports are working fine now. Sorry for the noise.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150126/cbfc6a69/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From ning at oaklight.us  Mon Jan 26 11:16:10 2015
From: ning at oaklight.us (Ning Ye)
Date: Mon, 26 Jan 2015 11:16:10 -0500
Subject: [OpenWrt-Devel] [patch] [x86] Backport hyperv change the receive
	buffer size for legacy hosts to 3.14 tree
Message-ID: <000e01d03983$68e9dbc0$3abd9340$@oaklight.us>

Signed-off-by: Ning Ye <ning at oaklight.us>
commit 3a3021bfa90d0fbc0b49e84983d02036591f517c
Author: Ning Ye <ning at oaklight.us>
Date:   Sun Jan 25 21:50:38 2015 -0500

    Backport hyperv change the receive buffer size for legacy hosts to 3.14
tree.  Without this patch, linux 3.14 wouldn't recognize NIC cards in
Windows 2008 R2.  Linux 3.15 and up has already had this patch in the
upstream.

diff --git
a/target/linux/x86/patches-3.14/700-hyperv-buffer_size_for_legacy_hosts.patc
h
b/target/linux/x86/patches-3.14/700-hyperv-buffer_size_for_legacy_hosts.patc
h
new file mode 100755
index 0000000..ff369cc
--- /dev/null
+++
b/target/linux/x86/patches-3.14/700-hyperv-buffer_size_for_legacy_hosts.patc
h
@@ -0,0 +1,47 @@
+From 99d3016de4f2a29635f5382b0e9bd0e5f2151487 Mon Sep 17 00:00:00 2001
+From: Haiyang Zhang <haiyangz at microsoft.com>
+Date: Sun, 9 Mar 2014 16:10:59 -0700
+Subject: hyperv: Change the receive buffer size for legacy hosts
+
+Due to a bug in the Hyper-V host verion 2008R2, we need to use a slightly
smaller
+receive buffer size, otherwise the buffer will not be accepted by the
legacy hosts.
+
+Signed-off-by: Haiyang Zhang <haiyangz at microsoft.com>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+
+diff --git a/drivers/net/hyperv/hyperv_net.h
b/drivers/net/hyperv/hyperv_net.h
+index 7d06b49..13010b4 100644
+--- a/drivers/net/hyperv/hyperv_net.h
++++ b/drivers/net/hyperv/hyperv_net.h
+@@ -513,6 +513,7 @@ struct nvsp_message {
+ #define NETVSC_MTU 65536
+
+ #define NETVSC_RECEIVE_BUFFER_SIZE            (1024*1024*16)  /* 16MB */
++#define NETVSC_RECEIVE_BUFFER_SIZE_LEGACY     (1024*1024*15)  /* 15MB */
+
+ #define NETVSC_RECEIVE_BUFFER_ID              0xcafe
+
+diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c
+index 1a0280d..daddea2 100644
+--- a/drivers/net/hyperv/netvsc.c
++++ b/drivers/net/hyperv/netvsc.c
+@@ -365,6 +365,11 @@ static int netvsc_connect_vsp(struct hv_device
*device)
+               goto cleanup;
+
+       /* Post the big receive buffer to NetVSP */
++      if (net_device->nvsp_version <= NVSP_PROTOCOL_VERSION_2)
++              net_device->recv_buf_size =
NETVSC_RECEIVE_BUFFER_SIZE_LEGACY;
++      else
++              net_device->recv_buf_size = NETVSC_RECEIVE_BUFFER_SIZE;
++
+       ret = netvsc_init_recv_buf(device);
+
+ cleanup:
+@@ -898,7 +903,6 @@ int netvsc_device_add(struct hv_device *device, void
*additional_info)
+       ndev = net_device->ndev;
+
+       /* Initialize the NetVSC channel extension */
+-      net_device->recv_buf_size = NETVSC_RECEIVE_BUFFER_SIZE;
+       spin_lock_init(&net_device->recv_pkt_list_lock);
+
+       INIT_LIST_HEAD(&net_device->recv_pkt_list);
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From rogerpueyo at rogerpueyo.com  Mon Jan 26 12:10:09 2015
From: rogerpueyo at rogerpueyo.com (Roger Pueyo Centelles)
Date: Mon, 26 Jan 2015 18:10:09 +0100
Subject: [OpenWrt-Devel] [PATCH] [ar71xx] Add support for MERCURY
	MAC1200R
In-Reply-To: <54BA0A2A.8020107@openwrt.org>
References: <1420976894-12794-1-git-send-email-openwrt@rogerpueyo.com>
 <54BA0A2A.8020107@openwrt.org>
Message-ID: <CAPH4JELsURvWDMD4cncrKK1A=N2cmp06+cWBCdCz=nyTtjxJ5g@mail.gmail.com>

Hi,

Thank you both for your comments.

@???:

>> +       ucidef_set_led_wlan "wlan2g" "WLAN2G" "mercury:green:wlan2g"
"phy1tpt"
> I think the following line is incorrect:
>> +       ucidef_set_led_wlan "wlan5g" "WLAN5G" "mercury:green:wlan5g"
"phy0tpt"
> There is no LED trigger called 'phy0tpt' so I think we should use netdev
trigger like this:
> ucidef_set_led_netdev "wlan5g" "WLAN5G" "mercury:green:wlan5g" "wlan0"

Ok!


>> +static struct gpio_keys_button mac1200r_gpio_keys[] __initdata = {
>> +       {
>> +               .desc           = "WPS button",
>> +               .type           = EV_KEY,
>> +               .code           = KEY_WPS_BUTTON,
>> +               .debounce_interval = MAC1200R_KEYS_DEBOUNCE_INTERVAL,
>> +               .gpio           = MAC1200R_GPIO_BTN_WPS,
>> +               .active_low     = 1,
>> +       },
>> +};
> Although the key is called WPS/RESET , I think a reset button is more
important than a WPS button.That's just my personal opinion :)

I think you are right.


>> +       ap91_pci_init(art + MAC1200R_PCIE_CALDATA_OFFSET, tmpmac);
> What? I think this function is only able to load CALDATA for ath9k
devices.Maybe I'm wrong:)

The router has two radios, one ath9k and one ath10k. Isn't it needed for
the ath9k calibration data? Or this radio is already covered by
"ath79_register_wmac(art + MAC1200R_WMAC_CALDATA_OFFSET, tmpmac); ...?


>> +$(eval $(call
SingleProfile,TPLINK-LZMA,64kraw,MAC1200R,mc-mac1200r,MC-MAC1200R,ttyS0,115200,0x12000001,1,8Mlzma))
>The factory image is broken since TP-LINK started to use a new firmware
format with RSA signature in China.This should be introduced in the TOH
wiki I think:)

Done!



@John:

Sorry. Do you mean a description for the patch? I am not aware of what SoB
means.


Thanks!

Roger
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150126/cccb7e55/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From zajec5 at gmail.com  Mon Jan 26 15:12:02 2015
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Mon, 26 Jan 2015 21:12:02 +0100
Subject: [OpenWrt-Devel] [PATCH V2 libubox] uloop: ignore SIGPIPE by default
In-Reply-To: <1422267933-5240-1-git-send-email-zajec5@gmail.com>
References: <1422267933-5240-1-git-send-email-zajec5@gmail.com>
Message-ID: <1422303122-18312-1-git-send-email-zajec5@gmail.com>

Most app don't want to crash because of unhandled SIGPIPE. It could
happen is such trivial situations like writing to socket.

Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com>
---
V2: Replace signal call with sigaction
---
 uloop.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/uloop.c b/uloop.c
index 9a77ce4..baaef8d 100644
--- a/uloop.c
+++ b/uloop.c
@@ -582,6 +582,27 @@ static void uloop_install_handler(int signum, void (*handler)(int), struct sigac
 		sigaction(signum, act, NULL);
 }
 
+static void uloop_ignore_signal(int signum, bool ignore)
+{
+	struct sigaction s;
+
+	sigaction(signum, NULL, &s);
+
+	if (ignore) {
+		if (s.sa_handler == SIG_DFL) { /* Ignore only if there isn't any custom handler */
+			s.sa_handler = SIG_IGN;
+			s.sa_flags = 0;
+			sigaction(signum, &s, NULL);
+		}
+	} else {
+		if (s.sa_handler == SIG_IGN) { /* Restore only if noone modified our SIG_IGN */
+			s.sa_handler = SIG_DFL;
+			s.sa_flags = 0;
+			sigaction(signum, &s, NULL);
+		}
+	}
+}
+
 static void uloop_setup_signals(bool add)
 {
 	static struct sigaction old_sigint, old_sigchld, old_sigterm;
@@ -589,6 +610,8 @@ static void uloop_setup_signals(bool add)
 	uloop_install_handler(SIGINT, uloop_handle_sigint, &old_sigint, add);
 	uloop_install_handler(SIGTERM, uloop_handle_sigint, &old_sigterm, add);
 	uloop_install_handler(SIGCHLD, uloop_sigchld, &old_sigchld, add);
+
+	uloop_ignore_signal(SIGPIPE, add);
 }
 
 static int uloop_get_next_timeout(struct timeval *tv)
-- 
1.8.4.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From knaack.h at gmx.de  Mon Jan 26 15:28:59 2015
From: knaack.h at gmx.de (Hartmut Knaack)
Date: Mon, 26 Jan 2015 21:28:59 +0100
Subject: [OpenWrt-Devel] [PATCH] [ar71xx] Add support for MERCURY
	MAC1200R
In-Reply-To: <CAPH4JELsURvWDMD4cncrKK1A=N2cmp06+cWBCdCz=nyTtjxJ5g@mail.gmail.com>
References: <1420976894-12794-1-git-send-email-openwrt@rogerpueyo.com>
 <54BA0A2A.8020107@openwrt.org>
 <CAPH4JELsURvWDMD4cncrKK1A=N2cmp06+cWBCdCz=nyTtjxJ5g@mail.gmail.com>
Message-ID: <54C6A38B.8060407@gmx.de>

Roger Pueyo Centelles schrieb am 26.01.2015 um 18:10:
> Hi,
> 
> Thank you both for your comments.
> 
> @???:
> 
>>> +       ucidef_set_led_wlan "wlan2g" "WLAN2G" "mercury:green:wlan2g" "phy1tpt"
>> I think the following line is incorrect:
>>> +       ucidef_set_led_wlan "wlan5g" "WLAN5G" "mercury:green:wlan5g" "phy0tpt"
>> There is no LED trigger called 'phy0tpt' so I think we should use netdev trigger like this:
>> ucidef_set_led_netdev "wlan5g" "WLAN5G" "mercury:green:wlan5g" "wlan0"
> 
> Ok!
> 
> 
>>> +static struct gpio_keys_button mac1200r_gpio_keys[] __initdata = {
>>> +       {
>>> +               .desc           = "WPS button",
>>> +               .type           = EV_KEY,
>>> +               .code           = KEY_WPS_BUTTON,
>>> +               .debounce_interval = MAC1200R_KEYS_DEBOUNCE_INTERVAL,
>>> +               .gpio           = MAC1200R_GPIO_BTN_WPS,
>>> +               .active_low     = 1,
>>> +       },
>>> +};
>> Although the key is called WPS/RESET , I think a reset button is more important than a WPS button.That's just my personal opinion :)
> 
> I think you are right.
> 
> 
>>> +       ap91_pci_init(art + MAC1200R_PCIE_CALDATA_OFFSET, tmpmac);
>> What? I think this function is only able to load CALDATA for ath9k devices.Maybe I'm wrong:)
> 
> The router has two radios, one ath9k and one ath10k. Isn't it needed for the ath9k calibration data? Or this radio is already covered by "ath79_register_wmac(art + MAC1200R_WMAC_CALDATA_OFFSET, tmpmac); ...?
> 
> 
>>> +$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,MAC1200R,mc-mac1200r,MC-MAC1200R,ttyS0,115200,0x12000001,1,8Mlzma))
>>The factory image is broken since TP-LINK started to use a new firmware format with RSA signature in China.This should be introduced in the TOH wiki I think:)
> 
> Done!
> 
> 
> 
> @John:
> 
> Sorry. Do you mean a description for the patch? I am not aware of what SoB means.

Yes, a patch description followed by your Signed-off-by (SoB) is missing. Have a look at the submitting patches wiki page for the patch format requirements. Also, check through your patch again and make sure to mind alphabetic order wherever needed.

> 
> 
> Thanks!
> 
> Roger
> 
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From eschultz at prplfoundation.org  Mon Jan 26 16:22:15 2015
From: eschultz at prplfoundation.org (Eric Schultz)
Date: Mon, 26 Jan 2015 15:22:15 -0600
Subject: [OpenWrt-Devel] [PATCH, v3] feeds: search packages by license
Message-ID: <54C6B007.60006@prplfoundation.org>

Currently, the feeds scripts provides no way to filter packages by their license.
This patch adds a search feature to feeds which can be used to search for packages
using the -l <license> option.

Additionally, use of the -n option modifies the search to only return packages
which don't have a license.

Calls to script/feeds which do not use the new -l or -n options should work the same as before.

Signed-off-by: Eric Schultz <eschultz at prplfoundation.org>
---
 scripts/feeds | 86 +++++++++++++++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 75 insertions(+), 11 deletions(-)

diff --git a/scripts/feeds b/scripts/feeds
index 31ad544..b098463 100755
--- a/scripts/feeds
+++ b/scripts/feeds
@@ -206,41 +206,103 @@ sub get_installed() {
 
 sub search_feed {
 	my $feed = shift;
+	my $search_parameters = shift;
 	my @substr = @_;
 	my $display;
 
-	return unless @substr > 0;
+	return unless @substr > 0 or $search_parameters->{use_params};
+
 	get_feed($feed);
 	foreach my $name (sort { lc($a) cmp lc($b) } keys %$feed_package) {
+
 		my $pkg = $feed_package->{$name};
 		my $substr;
 		my $pkgmatch = 1;
 
 		next if $pkg->{vdepends};
-		foreach my $substr (@substr) {
-			my $match;
-			foreach my $key (qw(name title description src)) {
-				$pkg->{$key} and $substr and $pkg->{$key} =~ m/$substr/i and $match = 1;
-			}
-			$match or undef $pkgmatch;
-		};
+		if ( $search_parameters->{use_params})
+		{
+			$pkgmatch = do_package_tags_match($pkg, $search_parameters);
+		}
+
+		if (! $search_parameters->{use_params} or ( $search_parameters->{use_params} and $pkgmatch))
+		{
+			foreach my $substr (@substr) {
+				my $match;
+				foreach my $key (qw(name title description src)) {
+					$pkg->{$key} and $substr and $pkg->{$key} =~ m/$substr/i and $match = 1;
+				}
+
+				$match or undef $pkgmatch;
+			};
+		}
 		$pkgmatch and do {
 			$display or do {
 				print "Search results in feed '$feed':\n";
 				$display = 1;
 			};
-			printf "\%-25s\t\%s\n", $pkg->{name}, $pkg->{title};
+			my $output_print = format_search_parameter_output($pkg, $search_parameters);
+			printf "\%-20s\%s\%s\n", $pkg->{name}, $output_print, $pkg->{title};
 		};
 	}
 	return 0;
 }
 
+sub format_search_parameter_output
+{
+	my $pkg = shift;
+	my $search_parameters = shift;
+
+	my $output = "\t";
+
+	if (!$search_parameters->{use_params}) {
+		return $output;
+	}
+
+	if (defined($search_parameters->{license})) {
+		$output = $output . sprintf(("\%-10s\t"), $pkg->{license});
+	}
+
+	return $output;
+}
+
+sub do_package_tags_match {
+	my $pkg = shift;
+  my $parameterized_search = shift;
+
+
+	my $match = 0;
+	if ($pkg->{license} and $parameterized_search->{license}) {
+		my $substr = $parameterized_search->{license};
+		my @results = grep(/^\Q$substr\E.*$/i, split(/\s/, $pkg->{license}));
+
+		$match = @results > 0;
+	}
+
+	if ($parameterized_search->{no_license}) {
+		$match = !defined($pkg->{license});
+	}
+
+	return $match;
+}
+
 sub search {
 	my %opts;
 
-	getopt('r:', \%opts);
+	getopts('r:l:n', \%opts);
+	my %search_parameters;
+	if (defined($opts{l})) {
+		$search_parameters{license} = $opts{l};
+		$search_parameters{use_params} = 1;
+	}
+
+	if (defined($opts{n})) {
+		$search_parameters{no_license} = $opts{n};
+		$search_parameters{use_params} = 1;
+	}
+
 	foreach my $feed (@feeds) {
-		search_feed($feed->[1], @ARGV) if (!defined($opts{r}) or $opts{r} eq $feed->[1]);
+		search_feed($feed->[1], \%search_parameters, @ARGV) if (!defined($opts{r}) or $opts{r} eq $feed->[1]);
 	}
 }
 
@@ -642,6 +704,8 @@ Commands:
 	search [options] <substring>: Search for a package
 	Options:
 	    -r <feedname>: Only search in this feed
+	    -l <license>:  Only include packages with this license
+	    -n:	           Only include packages without a license tag
 
 	uninstall -a|<package>: Uninstall a package
 	Options:
-- 
2.1.0
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From nbd at openwrt.org  Mon Jan 26 18:05:35 2015
From: nbd at openwrt.org (Felix Fietkau)
Date: Tue, 27 Jan 2015 00:05:35 +0100
Subject: [OpenWrt-Devel] [PATCH V2 libubox] uloop: ignore SIGPIPE by
	default
In-Reply-To: <1422303122-18312-1-git-send-email-zajec5@gmail.com>
References: <1422267933-5240-1-git-send-email-zajec5@gmail.com>
 <1422303122-18312-1-git-send-email-zajec5@gmail.com>
Message-ID: <54C6C83F.6060802@openwrt.org>

On 2015-01-26 21:12, Rafa? Mi?ecki wrote:
> Most app don't want to crash because of unhandled SIGPIPE. It could
> happen is such trivial situations like writing to socket.
> 
> Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com>
> ---
> V2: Replace signal call with sigaction
> ---
>  uloop.c | 23 +++++++++++++++++++++++
>  1 file changed, 23 insertions(+)
> 
> diff --git a/uloop.c b/uloop.c
> index 9a77ce4..baaef8d 100644
> --- a/uloop.c
> +++ b/uloop.c
> @@ -582,6 +582,27 @@ static void uloop_install_handler(int signum, void (*handler)(int), struct sigac
>  		sigaction(signum, act, NULL);
>  }
>  
> +static void uloop_ignore_signal(int signum, bool ignore)
> +{
> +	struct sigaction s;
> +
> +	sigaction(signum, NULL, &s);
> +
> +	if (ignore) {
> +		if (s.sa_handler == SIG_DFL) { /* Ignore only if there isn't any custom handler */
> +			s.sa_handler = SIG_IGN;
> +			s.sa_flags = 0;
> +			sigaction(signum, &s, NULL);
> +		}
> +	} else {
> +		if (s.sa_handler == SIG_IGN) { /* Restore only if noone modified our SIG_IGN */
> +			s.sa_handler = SIG_DFL;
> +			s.sa_flags = 0;
> +			sigaction(signum, &s, NULL);
> +		}
> +	}
> +}
Please reduce code duplication as well (setting sa_flags and calling
sigaction)

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

From mschiffer at universe-factory.net  Mon Jan 26 21:49:52 2015
From: mschiffer at universe-factory.net (Matthias Schiffer)
Date: Tue, 27 Jan 2015 03:49:52 +0100
Subject: [OpenWrt-Devel] [PATCH netifd] bridge: allow enabling or disabling
	the multicast querier independently of IGMP snooping
Message-ID: <b4fac27152a34dd39d59ca0b83de0157a8f7805f.1422326992.git.mschiffer@universe-factory.net>

In larger networks, especially big batman-adv meshes, it may be desirable to
enable IGMP snooping on every bridge without enabling the multicast querier
to specifically put the querier on a well-connected node.

This patch adds a new UCI option 'multicast_querier' for bridges which allows
this. The default is still the value of the 'igmp_snooping' option to maintain
backwards compatiblity.

Signed-off-by: Matthias Schiffer <mschiffer at universe-factory.net>
---
 bridge.c       | 8 +++++++-
 system-linux.c | 2 +-
 system.h       | 1 +
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/bridge.c b/bridge.c
index f8478ad..f7dbf61 100644
--- a/bridge.c
+++ b/bridge.c
@@ -32,6 +32,7 @@ enum {
 	BRIDGE_ATTR_HELLO_TIME,
 	BRIDGE_ATTR_MAX_AGE,
 	BRIDGE_ATTR_BRIDGE_EMPTY,
+	BRIDGE_ATTR_MULTICAST_QUERIER,
 	__BRIDGE_ATTR_MAX
 };
 
@@ -45,6 +46,7 @@ static const struct blobmsg_policy bridge_attrs[__BRIDGE_ATTR_MAX] = {
 	[BRIDGE_ATTR_MAX_AGE] = { "max_age", BLOBMSG_TYPE_INT32 },
 	[BRIDGE_ATTR_IGMP_SNOOP] = { "igmp_snooping", BLOBMSG_TYPE_BOOL },
 	[BRIDGE_ATTR_BRIDGE_EMPTY] = { "bridge_empty", BLOBMSG_TYPE_BOOL },
+	[BRIDGE_ATTR_MULTICAST_QUERIER] = { "multicast_querier", BLOBMSG_TYPE_BOOL },
 };
 
 static const struct uci_blob_param_info bridge_attr_info[__BRIDGE_ATTR_MAX] = {
@@ -547,6 +549,7 @@ bridge_apply_settings(struct bridge_state *bst, struct blob_attr **tb)
 	cfg->stp = false;
 	cfg->forward_delay = 2;
 	cfg->igmp_snoop = true;
+	cfg->multicast_querier = true;
 	cfg->bridge_empty = false;
 	cfg->priority = 0x7FFF;
 
@@ -560,7 +563,10 @@ bridge_apply_settings(struct bridge_state *bst, struct blob_attr **tb)
 		cfg->priority = blobmsg_get_u32(cur);
 
 	if ((cur = tb[BRIDGE_ATTR_IGMP_SNOOP]))
-		cfg->igmp_snoop = blobmsg_get_bool(cur);
+		cfg->multicast_querier = cfg->igmp_snoop = blobmsg_get_bool(cur);
+
+	if ((cur = tb[BRIDGE_ATTR_MULTICAST_QUERIER]))
+		cfg->multicast_querier = blobmsg_get_bool(cur);
 
 	if ((cur = tb[BRIDGE_ATTR_AGEING_TIME])) {
 		cfg->ageing_time = blobmsg_get_u32(cur);
diff --git a/system-linux.c b/system-linux.c
index 4737fa6..ef90880 100644
--- a/system-linux.c
+++ b/system-linux.c
@@ -772,7 +772,7 @@ int system_bridge_addbr(struct device *bridge, struct bridge_config *cfg)
 		bridge->ifname, cfg->igmp_snoop ? "1" : "0");
 
 	system_set_dev_sysctl("/sys/devices/virtual/net/%s/bridge/multicast_querier",
-		bridge->ifname, cfg->igmp_snoop ? "1" : "0");
+		bridge->ifname, cfg->multicast_querier ? "1" : "0");
 
 	args[0] = BRCTL_SET_BRIDGE_PRIORITY;
 	args[1] = cfg->priority;
diff --git a/system.h b/system.h
index 9a2326b..94e0dd9 100644
--- a/system.h
+++ b/system.h
@@ -50,6 +50,7 @@ struct bridge_config {
 	enum bridge_opt flags;
 	bool stp;
 	bool igmp_snoop;
+	bool multicast_querier;
 	unsigned short priority;
 	int forward_delay;
 	bool bridge_empty;
-- 
2.2.2
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From gch981213 at gmail.com  Mon Jan 26 22:19:43 2015
From: gch981213 at gmail.com (=?UTF-8?B?6YOt5Lyg6Yic?=)
Date: Tue, 27 Jan 2015 11:19:43 +0800
Subject: [OpenWrt-Devel] [PATCH] [ar71xx] Add support for MERCURY
	MAC1200R
In-Reply-To: <CAPH4JELsURvWDMD4cncrKK1A=N2cmp06+cWBCdCz=nyTtjxJ5g@mail.gmail.com>
References: <1420976894-12794-1-git-send-email-openwrt@rogerpueyo.com>
 <54BA0A2A.8020107@openwrt.org>
 <CAPH4JELsURvWDMD4cncrKK1A=N2cmp06+cWBCdCz=nyTtjxJ5g@mail.gmail.com>
Message-ID: <CAJsYDVJuGfWVxCufgBvJZHHZJx6ks+8fM39tfNg6Agt-RWtjNA@mail.gmail.com>

2015-01-27 1:10 GMT+08:00 Roger Pueyo Centelles <rogerpueyo at rogerpueyo.com>:

> Hi,
>
> Thank you both for your comments.
>
> @???:
>
> >> +       ucidef_set_led_wlan "wlan2g" "WLAN2G" "mercury:green:wlan2g"
> "phy1tpt"
> > I think the following line is incorrect:
> >> +       ucidef_set_led_wlan "wlan5g" "WLAN5G" "mercury:green:wlan5g"
> "phy0tpt"
> > There is no LED trigger called 'phy0tpt' so I think we should use netdev
> trigger like this:
> > ucidef_set_led_netdev "wlan5g" "WLAN5G" "mercury:green:wlan5g" "wlan0"
>
> Ok!
>
>
> >> +static struct gpio_keys_button mac1200r_gpio_keys[] __initdata = {
> >> +       {
> >> +               .desc           = "WPS button",
> >> +               .type           = EV_KEY,
> >> +               .code           = KEY_WPS_BUTTON,
> >> +               .debounce_interval = MAC1200R_KEYS_DEBOUNCE_INTERVAL,
> >> +               .gpio           = MAC1200R_GPIO_BTN_WPS,
> >> +               .active_low     = 1,
> >> +       },
> >> +};
> > Although the key is called WPS/RESET , I think a reset button is more
> important than a WPS button.That's just my personal opinion :)
>
> I think you are right.
>
>
> >> +       ap91_pci_init(art + MAC1200R_PCIE_CALDATA_OFFSET, tmpmac);
> > What? I think this function is only able to load CALDATA for ath9k
> devices.Maybe I'm wrong:)
>
> The router has two radios, one ath9k and one ath10k. Isn't it needed for
> the ath9k calibration data? Or this radio is already covered by
> "ath79_register_wmac(art + MAC1200R_WMAC_CALDATA_OFFSET, tmpmac); ...?
>
> Acoording to mach-archer-c7.c ,I think we should use ath79_register_pci();
here and use /lib/preinit/81_load_ath10k_board_bin to load calibration data
for ath10k.

>
> >> +$(eval $(call
> SingleProfile,TPLINK-LZMA,64kraw,MAC1200R,mc-mac1200r,MC-MAC1200R,ttyS0,115200,0x12000001,1,8Mlzma))
> >The factory image is broken since TP-LINK started to use a new firmware
> format with RSA signature in China.This should be introduced in the TOH
> wiki I think:)
>
> Done!
>
>
>
> @John:
>
> Sorry. Do you mean a description for the patch? I am not aware of what SoB
> means.
>
>
> Thanks!
>
> Roger
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150127/f42f4032/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From zajec5 at gmail.com  Tue Jan 27 02:19:31 2015
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Tue, 27 Jan 2015 08:19:31 +0100
Subject: [OpenWrt-Devel] [PATCH V3 libubox] uloop: ignore SIGPIPE by default
In-Reply-To: <1422303122-18312-1-git-send-email-zajec5@gmail.com>
References: <1422303122-18312-1-git-send-email-zajec5@gmail.com>
Message-ID: <1422343171-23096-1-git-send-email-zajec5@gmail.com>

Most app don't want to crash because of unhandled SIGPIPE. It could
happen is such trivial situations like writing to socket.

Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com>
---
V2: Replace signal call with sigaction
V3: Don't duplicate the code
---
 uloop.c | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/uloop.c b/uloop.c
index 9a77ce4..eed105f 100644
--- a/uloop.c
+++ b/uloop.c
@@ -582,6 +582,28 @@ static void uloop_install_handler(int signum, void (*handler)(int), struct sigac
 		sigaction(signum, act, NULL);
 }
 
+static void uloop_ignore_signal(int signum, bool ignore)
+{
+	struct sigaction s;
+	void *new_handler = NULL;
+
+	sigaction(signum, NULL, &s);
+
+	if (ignore) {
+		if (s.sa_handler == SIG_DFL) /* Ignore only if there isn't any custom handler */
+			new_handler = SIG_IGN;
+	} else {
+		if (s.sa_handler == SIG_IGN) /* Restore only if noone modified our SIG_IGN */
+			new_handler = SIG_DFL;
+	}
+
+	if (new_handler) {
+		s.sa_handler = new_handler;
+		s.sa_flags = 0;
+		sigaction(signum, &s, NULL);
+	}
+}
+
 static void uloop_setup_signals(bool add)
 {
 	static struct sigaction old_sigint, old_sigchld, old_sigterm;
@@ -589,6 +611,8 @@ static void uloop_setup_signals(bool add)
 	uloop_install_handler(SIGINT, uloop_handle_sigint, &old_sigint, add);
 	uloop_install_handler(SIGTERM, uloop_handle_sigint, &old_sigterm, add);
 	uloop_install_handler(SIGCHLD, uloop_sigchld, &old_sigchld, add);
+
+	uloop_ignore_signal(SIGPIPE, add);
 }
 
 static int uloop_get_next_timeout(struct timeval *tv)
-- 
1.8.4.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From weedy2887 at gmail.com  Tue Jan 27 08:00:28 2015
From: weedy2887 at gmail.com (Weedy)
Date: Tue, 27 Jan 2015 08:00:28 -0500
Subject: [OpenWrt-Devel] Introducing "fastpath" - Kernel module for
 speeding up IP forwarding
In-Reply-To: <CA+eXE3z1f1sW3KfP=SNj5LcifWYMNPo0z_HfSmFZtakkpSLUYQ@mail.gmail.com>
References: <CA+eXE3yR1jD=YT9W5iEj6+Ghn-4kmhhz6q_UjhNE9FBTNWLrkA@mail.gmail.com>
 <CACiydbJwWuW=P-tG6djJg=Q9ESyqtZuvkR1LrTRS_fHPCcysnA@mail.gmail.com>
 <c3db0366a792416599ba36ec8e97dcd0@IL-EXCH02.marvell.com>
 <54984E7E.70202@hauke-m.de>
 <CA+eXE3z1f1sW3KfP=SNj5LcifWYMNPo0z_HfSmFZtakkpSLUYQ@mail.gmail.com>
Message-ID: <CAFE24U2tFYfH9say3umRqxpTZ2=sd6J1Rmamvft31OEWqe7thQ@mail.gmail.com>

On Dec 23, 2014 10:02 AM, "Tomer Eliyahu" <tomereliyahu1 at gmail.com> wrote:
>
> Hi,
>
> Our request for uploading the sources is pending approval from
> Marvell's legal department.
>
> Best Regards,
>
> Tomer

Please don't let this die.
Lawyers plea
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150127/6fa4a663/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From madhava.koriginja at gmail.com  Tue Jan 27 08:30:33 2015
From: madhava.koriginja at gmail.com (Madhu koriginja)
Date: Tue, 27 Jan 2015 19:00:33 +0530
Subject: [OpenWrt-Devel] barrier breaker 14.07 stable release location
Message-ID: <CA+pW49rKa4hd6V61aGf07T74odvGXo+PKT0efApULbm2hbnZZg@mail.gmail.com>

Hi All,
         Please somebody can point me the location from where can I
download the barrier breaker 14.07 stable release.
I saw in Openwrt wiki pages, barrier breaker SVN repository release version
is r42625 and release date is october 2nd(in some place I saw october 20).
I also saw barrier breaker branch still some development activity is
running(26th Jan also some changes are there)
So, please suggest me which version is stable release on barrier breaker.

Thanks & Regards,
Madhu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150127/bf8d7b72/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From maxime.ripard at free-electrons.com  Tue Jan 27 08:41:52 2015
From: maxime.ripard at free-electrons.com (Maxime Ripard)
Date: Tue, 27 Jan 2015 14:41:52 +0100
Subject: [OpenWrt-Devel] [PATCH 3/9] kernel: Allow ubi autoattach to run
 on NOR flash
In-Reply-To: <op.xs1aqign2s3iss@ecaz>
References: <1421164606-3222-1-git-send-email-maxime.ripard@free-electrons.com>
 <1421164606-3222-4-git-send-email-maxime.ripard@free-electrons.com>
 <CACna6rz5APOgGThwFSDC8RG_2xhYYVSLyv2Qdv=4nnT_Pa7o=g@mail.gmail.com>
 <20150114123737.GR4891@lukather> <20150122103314.GL4367@lukather>
 <op.xsw2airr2s3iss@ecaz> <20150125170603.GM8470@lukather>
 <op.xs1aqign2s3iss@ecaz>
Message-ID: <20150127134152.GG7200@lukather>

On Sun, Jan 25, 2015 at 08:50:32PM +0100, Imre Kaloz wrote:
> Hi,
> 
> On Sun, 25 Jan 2015 18:06:03 +0100, Maxime Ripard
> <maxime.ripard at free-electrons.com> wrote:
> 
> >>Sure, but please implement UBI on NOR as a generic solution.
> >
> >What do you mean? It already works quite well (with that patch applied
> >and the NOR sub-profile), so I'm not sure I have to implement
> >anything, be it generic or not.
> 
> I've meant to make it generic, like the squashfs/ubfs/etc images so other
> targets can use it, too.

Well, it uses only prepare_squashfs_image and UbinizeImage works great
for that already, the only thing that differ is the set of options
given to ubinize, so I'm not really sure how that can be turned into
something more generic.

> >>>>The A385-RD board has a much smaller SPI-NOR (16MB) though, so we
> >>>>could use jffs2 there, but I wasn't seeing much point at creating a
> >>>>whole new layout just for a single board.
> >>>
> >>>I'll switch this one to JFFS2 and the MTDSPLIT framework. Are you
> >>>satisfied with the NAND support? Just to know if I can continue to
> >>>model the NOR stuff on that.
> >>
> >>As I've written in the other mail, I'm mostly happy with it, but
> >>please make sure you don't hardcode available profiles but parse
> >>them.
> >
> >If we don't plan on supporting building single sub-profiles like
> >ar71xx, I'm not even sure that we need to parse anything, we can just
> >loop over the sub-profiles list in any case.
> 
> I think supporting that could be handy so users (and people at Marvell) can
> just build what they want.

Ok. But what/how do you want me to parse these profiles then? Apart
from plumbing into the Profile macro itself to add the list of
available profiles, and that would be way too intrusive, I don't
really get what you expect here.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150127/c6786b7c/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From daniel at makrotopia.org  Tue Jan 27 08:51:16 2015
From: daniel at makrotopia.org (Daniel Golle)
Date: Tue, 27 Jan 2015 14:51:16 +0100
Subject: [OpenWrt-Devel] [PATCH] config: fix typo in Global build settings
	menu
Message-ID: <20150127135111.GA11689@makrotopia.org>

Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 config/Config-build.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/config/Config-build.in b/config/Config-build.in
index 280f719..0ca145e 100644
--- a/config/Config-build.in
+++ b/config/Config-build.in
@@ -251,7 +251,7 @@ menu "Global build settings"
 	endchoice
 
 	choice
-		prompt "Enable buffer-overflows detction (FORTIFY_SOURCE)"
+		prompt "Enable buffer-overflows detection (FORTIFY_SOURCE)"
 		help
 		  Enable the _FORTIFY_SOURCE macro which introduces additional
 		  checks to detect buffer-overflows in the following standard library
-- 
2.2.2
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From ct at xmodus-systems.de  Tue Jan 27 09:38:20 2015
From: ct at xmodus-systems.de (Claudio Thomas)
Date: Tue, 27 Jan 2015 15:38:20 +0100
Subject: [OpenWrt-Devel] barrier breaker 14.07 stable release location
In-Reply-To: <CA+pW49rKa4hd6V61aGf07T74odvGXo+PKT0efApULbm2hbnZZg@mail.gmail.com>
References: <CA+pW49rKa4hd6V61aGf07T74odvGXo+PKT0efApULbm2hbnZZg@mail.gmail.com>
Message-ID: <54C7A2DC.1070905@xmodus-systems.de>

Hi Madhu,

the releases of OpenWrt firmwares can be found at
http://downloads.openwrt.org/. For BB 14.07 stable for example
http://downloads.openwrt.org/barrier_breaker/14.07/. But to get the
right firmware for your device you need to know what target and profile
you need.

To find out if there is a 14.07 firmware for your hardware you could
look at http://wiki.openwrt.org/toh/start

Each Platform has a own description page (like
http://wiki.openwrt.org/toh/buffalo/wzr-600dhp), there you will normally
find an exact link to the actual firmware and how to update your device.
Link Example (don't use this! it is probably not for your device!):
http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/openwrt-ar71xx-generic-wzr-600dhp-squashfs-sysupgrade.bin

Best regards,
Claudio

--
Reviewing OpenWrt BB for Xmodus Systems XM1710E GSM/UMTS Router
<http://www.xmodus-systems.de/en/terminals/routers.html>


On 27.01.2015 14:30, Madhu koriginja wrote:
> Hi All,
>          Please somebody can point me the location from where can I
> download the barrier breaker 14.07 stable release.
> I saw in Openwrt wiki pages, barrier breaker SVN repository release
> version is r42625 and release date is october 2nd(in some place I saw
> october 20).
> I also saw barrier breaker branch still some development activity is
> running(26th Jan also some changes are there)
> So, please suggest me which version is stable release on barrier breaker.
>
> Thanks & Regards,
> Madhu
>
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150127/0ccc4c19/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From rogerpueyo at rogerpueyo.com  Tue Jan 27 12:21:18 2015
From: rogerpueyo at rogerpueyo.com (Roger Pueyo Centelles)
Date: Tue, 27 Jan 2015 18:21:18 +0100
Subject: [OpenWrt-Devel] [PATCH] [ar71xx] Add support for MERCURY
	MAC1200R
In-Reply-To: <CAJsYDVJuGfWVxCufgBvJZHHZJx6ks+8fM39tfNg6Agt-RWtjNA@mail.gmail.com>
References: <1420976894-12794-1-git-send-email-openwrt@rogerpueyo.com>
 <54BA0A2A.8020107@openwrt.org>
 <CAPH4JELsURvWDMD4cncrKK1A=N2cmp06+cWBCdCz=nyTtjxJ5g@mail.gmail.com>
 <CAJsYDVJuGfWVxCufgBvJZHHZJx6ks+8fM39tfNg6Agt-RWtjNA@mail.gmail.com>
Message-ID: <CAPH4JE+m=mspC_jm=jC7V6_XGmQSkChyEurN80f=VdbQabfnbQ@mail.gmail.com>

Hi,

@Hartmut
Ok, now I see. Thanks!

@???

Acoording to mach-archer-c7.c ,I think we should use ath79_register_pci();
> here and use /lib/preinit/81_load_ath10k_board_bin to load calibration
> data for ath10k.
>

So, I understand I have to remove this line from
target/linux/ar71xx/files/arch/mips/ath79/mach-mc-mac1200r.c

ap91_pci_init(art + MAC1200R_PCIE_CALDATA_OFFSET, tmpmac);

Then, the MACs in my router end in:
- eth0=>47
- eth1=>49
- wlan1=>4A

so it makes sense to have wlan0 ending in 48 (i.e. eth1 minus 1). In
target/linux/ar71xx/base-files/lib/preinit/81_load_ath10k_board_bin (art
partition is mtd4):

                        dd if=/dev/mtdblock4 \
                                bs=1 skip=20492 count=2104 >>
/tmp/ath10k-board.bin
                ;;
                mc-mac1200r)
                        local mac
                        mac=$(macaddr_add $(cat
/sys/class/net/eth1/address) -1)

                        dd if=/dev/mtdblock4 \
                                bs=1 skip=20480 count=6 \
                                of=/tmp/ath10k-board.bin
                        macaddr_2bin $mac >> /tmp/ath10k-board.bin
                        dd if=/dev/mtdblock4 \
                                bs=1 skip=20492 count=2104 >>
/tmp/ath10k-board.bin
                ;;
                r6100)
                        local mac
                        mac=$(macaddr_add $(cat
/sys/class/net/eth1/address) +2)

                        dd if=/dev/mtdblock2 \

>> +$(eval $(call
>> SingleProfile,TPLINK-LZMA,64kraw,MAC1200R,mc-mac1200r,MC-MAC1200R,ttyS0,115200,0x12000001,1,8Mlzma))
>> >The factory image is broken since TP-LINK started to use a new firmware
>> format with RSA signature in China.This should be introduced in the TOH
>> wiki I think:)
>>
>
Besides adding this to the wiki, what should I change so that the factory
firmware is not generated?

Thanks!

Roger
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150127/1b4ff0e3/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From ben.mulvihill at gmail.com  Tue Jan 27 12:41:44 2015
From: ben.mulvihill at gmail.com (Ben Mulvihill)
Date: Tue, 27 Jan 2015 18:41:44 +0100
Subject: [OpenWrt-Devel] [PATCH] uboot-lantiq: fix P-2812HNU-F1/3
 package dependency
In-Reply-To: <CAKv9HNYs7SfBcR6n6O=DphpdTkweRROAbVfYwFfSkNa_DWPSyw@mail.gmail.com>
References: <1422190368-31840-1-git-send-email-a.seppala@gmail.com>
 <54C4FAF8.8050405@gmail.com>
 <CAKv9HNYs7SfBcR6n6O=DphpdTkweRROAbVfYwFfSkNa_DWPSyw@mail.gmail.com>
Message-ID: <1422380504.19237.20.camel@merveille.lan>

Hi Antti,

(Note that the diffs in this message are for information. They are not
patches submitted for merging - not at this stage anyway.)

> I tried and it seems the ram version
> (openwrt-lantiq-p2812hnufx_ram-u-boot.asc) builds and boots properly.
> 
> The openwrt-lantiq-p2812hnufx_nandspl-u-boot.img indeed does not boot
> correctly. Is anyone working on fixing it? (Apparently conversion to
> TPL is needed)

I am working on the BT Home Hub 3A at the moment (arx100, nand-based 
board), and have also found that asc images build correctly but
nandspl images do not.

There seem to a number of problems. For a start some of the make 
targets seem to be missing. The following fixed that for arx100,
and I think that a similar fix is necessary for danube and vrx200
too.

--- a/arch/mips/cpu/mips32/arx100/config.mk	2015-01-27 12:33:32.000000000 +0100
+++ b/arch/mips/cpu/mips32/arx100/config.mk	2015-01-27 18:07:37.000000000 +0100
@@ -27,4 +27,9 @@ ALL-y += $(obj)u-boot.ltq.norspl
 ALL-$(CONFIG_SPL_LZO_SUPPORT) += $(obj)u-boot.ltq.lzo.norspl
 ALL-$(CONFIG_SPL_LZMA_SUPPORT) += $(obj)u-boot.ltq.lzma.norspl
 endif
+ifdef CONFIG_SYS_BOOT_NANDSPL
+ALL-y += $(obj)u-boot.ltq.nandspl
+ALL-$(CONFIG_SPL_LZO_SUPPORT) += $(obj)u-boot.ltq.lzo.nandspl
+ALL-$(CONFIG_SPL_LZMA_SUPPORT) += $(obj)u-boot.ltq.lzma.nandspl
+endif
 endif


Then the ebu configuration word needs to be set in the nandspl
image, as it is for norspl. Once again, the following fixed that
for arx100, and I think something similar will be required for danube
and vrx200.

--- a/arch/mips/include/asm/arch-arx100/config.h	2015-01-27 18:12:32.000000000 +0100
+++ b/arch/mips/include/asm/arch-arx100/config.h	2015-01-27 18:13:02.000000000 +0100
@@ -174,6 +174,10 @@
 #define CONFIG_XWAY_SWAP_BYTES
 #endif
 
+#if defined(CONFIG_SYS_BOOT_NAND) || defined(CONFIG_SYS_BOOT_NANDSPL)
+#define CONFIG_SYS_XWAY_EBU_BOOTCFG	0x688C688C
+#endif
+
 #define	CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_TEXT_BASE
 
 #endif /* __ARX100_CONFIG_H__ */

Finally the ltq-boot-image tool adds a couple of download header to the
final image which I don't think should be there.

Daniel, does all the above make sense?

That said, even after making those changes my nandspl images still
don't work.

Ben
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From dhutchison at bluemesh.net  Tue Jan 27 12:56:13 2015
From: dhutchison at bluemesh.net (David Hutchison)
Date: Tue, 27 Jan 2015 10:56:13 -0700
Subject: [OpenWrt-Devel] Anyone familiar with RouterBoot? Trying to port
	board.
Message-ID: <CA+i30h-SgWnFXKyMnZKxSLNOR_jXNNS8itpU+sTx76tScm_MPg@mail.gmail.com>

I have everything working on the Mikrotik mAP2n within initramfs.
WLAN, LAN, USB, LEDs, and even the flash chip.

The problem is when I write the kernel to flash I cannot for the life
of me get RouterBOOT to recognize the kernel. My partition layout
looks like this:

static struct mtd_partition rbmap_spi_partitions[] = {
        {
                .name = "kernel",
                .offset = 128 * 1024,
                .size = 0x600000
        },
        {
                .name = "rootfs",
                .offset = 0x620000,
                .size = MTDPART_SIZ_FULL
        },
        {
                .name = "firmware",
                .offset = 128 * 1024,
                .size = MTDPART_SIZ_FULL
        },
        {
                .name = "RouterBoot",
                .offset = 0,
                .size = 128 * 1024,
                .mask_flags = MTD_WRITEABLE,
        },
};

[    3.700000] 0x000000020000-0x000001000000 : "firmware"
[    3.710000] 0x000000130000-0x000001000000 : "rootfs"
[    3.710000] mtd: partition "rootfs" set to be root filesystem
[    3.720000] split_squashfs: no squashfs found in "spi0.0"
[    3.720000] 0x000000020000-0x000000620000 : "kernel"
[    3.730000] 0x000000620000-0x000001000000 : "rootfs"
[    3.740000] 0x000000000000-0x000000020000 : "RouterBoot"

I know for sure that RouterBoot is 0x20000 in size. RouterOS starts at
0x20000 and is the only partition, it's size is MTDPART_SIZ_FULL. (
Without trying to get OpenWRT on )

I tried to define a kernel and rootfs partition, but that didn't seem
to work either.

Every other RouterBOARD I have ported too the kernel partition had to
be in YAFFS. However the mAP2n is a SPI flash. The partitions are not
passed by the bootloader, so they have to be defined somehow.

Is there anyone familiar with routerboot that could help point me in
the right direction? I was trying to mtdwrite vmlinux ( I even tried
dd ) to the kernel partition ( which would put it at 0x20000, where it
*should* be ).

The files I tried to write were:
openwrt-ar71xx-generic-vmlinux.bin
openwrt-ar71xx-generic-vmlinux.elf

no go, routerboot would output:

---

RouterBOOT backup booter 3.17

RouterBOARD mAP 2n

CPU frequency: 400 MHz
  Memory size:  64 MiB
 Storage size:  16 MiB

Press any key within 2 seconds to enter setup
loading kernel from nand... kernel not found
trying bootp protocol.... OK

---

Previous RouterBOARDS would not support compressed kernels, I tried
them anyway as this SPI flash seems new for Mikrotik... Still a no-go.

Here is the kernel cmdline within initramfs:
Kernel command line:  bootimage=1 no-uart no-nand parts=1
boot_part_size=16777216 gpio=822077383 HZ=200000000 mem=64M
kmac=4C:5E:0C:CA:27:0E board=mAP boot=0 mlc=6

I'm not familiar with OpenWRT's image builder, so i'm not sure how I
could create an image for it. I'm not at this point yet, just trying
to get RouterBOOT to execute my kernel.

---

I have UART working but the RX on the board does not seem to see ANY
of my INPUT at the boot-loader level. I can see output, but cannot
provide input... I can't really look at the boot-loader directly :-/

Any ideas?

Here is my mach-rbmap.c thus far:

#include <linux/init.h>
#include <linux/pci.h>
#include <linux/platform_device.h>
#include <linux/ath9k_platform.h>
#include <linux/etherdevice.h>
#include <linux/ar8216_platform.h>
#include <linux/rle.h>
#include <linux/routerboot.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/spi/spi.h>
#include <linux/spi/flash.h>

#include <asm/mach-ath79/irq.h>
#include <asm/mach-ath79/ath79.h>
#include <asm/mach-ath79/ar71xx_regs.h>

#include "common.h"
#include "dev-ap9x-pci.h"
#include "dev-eth.h"
#include "dev-spi.h"
#include "dev-gpio-buttons.h"
#include "dev-leds-gpio.h"
#include "dev-m25p80.h"
#include "dev-usb.h"
#include "dev-wmac.h"
#include "machtypes.h"
#include "routerboot.h"

#define RB_ROUTERBOOT_OFFSET    0x0000
#define RB_ROUTERBOOT_SIZE      0xe000
#define RB_HARD_CFG_OFFSET      0xe000
#define RB_HARD_CFG_SIZE        0x1000

#define RB_ART_SIZE             0x10000

static struct mtd_partition rbmap_spi_partitions[] = {
        {
                .name = "kernel",
                .offset = 128 * 1024,
                .size = 0x600000
        },
        {
                .name = "rootfs",
                .offset = 0x620000,
                .size = MTDPART_SIZ_FULL
        },
        {
                .name = "firmware",
                .offset = 128 * 1024,
                .size = MTDPART_SIZ_FULL
        },
        {
                .name = "RouterBoot",
                .offset = 0,
                .size = 128 * 1024,
                .mask_flags = MTD_WRITEABLE,
        },
};

static struct flash_platform_data rbmap_spi_flash_data = {
        .parts          = rbmap_spi_partitions,
        .nr_parts       = ARRAY_SIZE(rbmap_spi_partitions),
};

static void __init rbmap_wlan_init(void)
{
        u8 *hard_cfg = (u8 *) KSEG1ADDR(0x1f000000 + RB_HARD_CFG_OFFSET);
        u16 tag_len;
        u8 *tag;
        char *art_buf;
        u8 wlan_mac[ETH_ALEN];
        int err;

        err = routerboot_find_tag(hard_cfg, RB_HARD_CFG_SIZE, RB_ID_WLAN_DATA,
                                  &tag, &tag_len);
        if (err) {
                pr_err("no calibration data found\n");
                return;
        }

        art_buf = kmalloc(RB_ART_SIZE, GFP_KERNEL);
        if (art_buf == NULL) {
                pr_err("no memory for calibration data\n");
                return;
        }

        err = rle_decode((char *) tag, tag_len, art_buf, RB_ART_SIZE,
                         NULL, NULL);
        if (err) {
                pr_err("unable to decode calibration data\n");
                goto free;
        }

        ath79_init_mac(wlan_mac, ath79_mac_base, 11);
        ath79_register_wmac(art_buf + 0x1000, wlan_mac);

free:
        kfree(art_buf);
}

static void __init rbmap_setup(void)
{
        ath79_register_m25p80(&rbmap_spi_flash_data);
        ath79_register_mdio(0, 0x0);

        ath79_init_mac(ath79_eth0_data.mac_addr, ath79_mac_base, 0);
        ath79_register_eth(0);

        ath79_register_usb();

        rbmap_wlan_init();
}

MIPS_MACHINE(ATH79_MACH_RB_MAP, "mAP", "Mikrotik mAP2n",
             rbmap_setup);



-- Davey
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From eschultz at prplfoundation.org  Tue Jan 27 16:14:11 2015
From: eschultz at prplfoundation.org (Eric Schultz)
Date: Tue, 27 Jan 2015 15:14:11 -0600
Subject: [OpenWrt-Devel] How To Create a Package Tutorial
Message-ID: <CAMkzgA4b_pLZohT6RgjLtdPdue=dvruttaoEnLZdecqX63yaBw@mail.gmail.com>

All,

I've completed a tutorial on how to create a simple package. I'm not
sure it'll get much use from the folks on here but I figured I'd let
people know. I hope it helps you or someone else learn how to make an
OpenWrt package.

The tutorial is at
http://wiki.prplfoundation.org/wiki/Creating_an_OpenWrt_package_for_a_web_page

Thanks,

Eric

-- 
Eric Schultz, Community Manager, prpl Foundation
http://www.prplfoundation.org
eschultz at prplfoundation.org
cell: 920-539-0404
skype: ericschultzwi
@EricPrpl
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From stharward at gmail.com  Tue Jan 27 19:38:46 2015
From: stharward at gmail.com (Soren Harward)
Date: Tue, 27 Jan 2015 19:38:46 -0500
Subject: [OpenWrt-Devel] Anyone familiar with RouterBoot? Trying to port
	board.
In-Reply-To: <CA+i30h-SgWnFXKyMnZKxSLNOR_jXNNS8itpU+sTx76tScm_MPg@mail.gmail.com>
References: <CA+i30h-SgWnFXKyMnZKxSLNOR_jXNNS8itpU+sTx76tScm_MPg@mail.gmail.com>
Message-ID: <CANQojO6U+P25Vb_qayEZvS54kbXBU7VE0xrA8MWNCHGxoOn6fA@mail.gmail.com>

On Tue, Jan 27, 2015 at 12:56 PM, David Hutchison
<dhutchison at bluemesh.net> wrote:
> The problem is when I write the kernel to flash I cannot for the life
> of me get RouterBOOT to recognize the kernel.

What is the filename of the kernel on the yaffs2 filesystem on the
kernel MTD partition?  AFAIK, RouterBoot expects it to be called
"kernel".  Not "vmlinux" or "vmlinuz" or
"openwrt-ar71xx-generic-vmlinux.elf" or anything else.

-- 
Soren Harward
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From dhutchison at bluemesh.net  Tue Jan 27 20:35:49 2015
From: dhutchison at bluemesh.net (David Hutchison)
Date: Tue, 27 Jan 2015 18:35:49 -0700
Subject: [OpenWrt-Devel] Anyone familiar with RouterBoot? Trying to port
	board.
In-Reply-To: <CANQojO6U+P25Vb_qayEZvS54kbXBU7VE0xrA8MWNCHGxoOn6fA@mail.gmail.com>
References: <CA+i30h-SgWnFXKyMnZKxSLNOR_jXNNS8itpU+sTx76tScm_MPg@mail.gmail.com>
 <CANQojO6U+P25Vb_qayEZvS54kbXBU7VE0xrA8MWNCHGxoOn6fA@mail.gmail.com>
Message-ID: <CA+i30h_ZEbebPCXqEgQpMT9trjhWoMO9ThESFjD9bopV-ohOCQ@mail.gmail.com>

The problem is there is no yaffs2 filesystem like typical
RouterBOARD's, it's all one 16mb SPI flash chip.

If it expects kernel, would renaming the .elf file to just "kernel" be
sufficient? I suppose I could give that a try.

-- Davey

On Tue, Jan 27, 2015 at 5:38 PM, Soren Harward <stharward at gmail.com> wrote:
> On Tue, Jan 27, 2015 at 12:56 PM, David Hutchison
> <dhutchison at bluemesh.net> wrote:
>> The problem is when I write the kernel to flash I cannot for the life
>> of me get RouterBOOT to recognize the kernel.
>
> What is the filename of the kernel on the yaffs2 filesystem on the
> kernel MTD partition?  AFAIK, RouterBoot expects it to be called
> "kernel".  Not "vmlinux" or "vmlinuz" or
> "openwrt-ar71xx-generic-vmlinux.elf" or anything else.
>
> --
> Soren Harward
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From vincent.wiemann at ironai.com  Tue Jan 27 21:53:40 2015
From: vincent.wiemann at ironai.com (Vincent Wiemann)
Date: Wed, 28 Jan 2015 03:53:40 +0100
Subject: [OpenWrt-Devel] [PATCH] [ar71xx] Add default LED configuration for
 D-Link DIR-615 rev. C1
Message-ID: <54C84F34.4060300@ironai.com>

This patch adds an entry in the uci-defaults' led-file to configure the
WAN and WLAN LEDs by default.
Signed-off-by: Vincent Wiemann <me at bibbl.com>


--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -116,6 +116,11 @@ dir-615-e4)
 	ucidef_set_led_switch "lan4" "LAN4" "d-link:green:lan4" "switch0" "0x10"
 	;;

+dir-615-c1)
+	ucidef_set_led_netdev "wan" "WAN" "d-link:green:wan" "eth1"
+	ucidef_set_led_wlan "wlan" "WLAN" "d-link:green:wlan" "phy0tpt"
+	;;
+
 dir-825-b1)
 	ucidef_set_led_usbdev "usb" "USB" "d-link:blue:usb" "1-1"
 	;;

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150128/ad644312/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From fl.service at t-firefly.com  Wed Jan 28 01:24:21 2015
From: fl.service at t-firefly.com (wengbj)
Date: Wed, 28 Jan 2015 14:24:21 +0800
Subject: [OpenWrt-Devel] [PATCH] ralink: check ethernet MAC address whether
	it is valid
Message-ID: <1422426261-3261-1-git-send-email-fl.service@t-firefly.com>

From: wengbj <linux.c at foxmail.com>

The mac address usually write in factory block. but sometime user erase this block , the mac address will change to ff:ff:ff:ff:ff:ff.
This patch is purpose to fix this issue.
---
 .../drivers/net/ethernet/ralink/ralink_soc_eth.c   |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c
index d7d1e8e..9900a5e 100644
--- a/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c
@@ -1220,8 +1220,10 @@ static int __init fe_init(struct net_device *dev)
 	if (priv->soc->switch_init)
 		priv->soc->switch_init(priv);
 
-	memcpy(dev->dev_addr, priv->soc->mac, ETH_ALEN);
 	of_get_mac_address_mtd(priv->device->of_node, dev->dev_addr);
+	/*If the mac address is invalid, use default mac address  */
+	if (!is_valid_ether_addr(dev->dev_addr))
+		memcpy(dev->dev_addr, priv->soc->mac, ETH_ALEN);
 
 	err = fe_mdio_init(priv);
 	if (err)
-- 
1.7.9.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From dlin at marvell.com  Wed Jan 28 02:28:34 2015
From: dlin at marvell.com (David Lin)
Date: Tue, 27 Jan 2015 23:28:34 -0800
Subject: [OpenWrt-Devel] Announcement of mac80211 driver support for
 Marvell 88W8864 chip
In-Reply-To: <1422092238.2641.24.camel@pluto.fritz.box>
References: <689C75E0D210324F8BE88961219F68163F44ECED4A@SC-VEXCH2.marvell.com>
 <20141231185440.GC2681@nanopsycho.orion>
 <689C75E0D210324F8BE88961219F68163F45160679@SC-VEXCH2.marvell.com>
 <1421116872.2707.18.camel@pluto.fritz.box>
 <689C75E0D210324F8BE88961219F68163F45244A2B@SC-VEXCH2.marvell.com>
 <1422092238.2641.24.camel@pluto.fritz.box>
Message-ID: <689C75E0D210324F8BE88961219F68164084690E82@SC-VEXCH2.marvell.com>

Hi Ian,

	Thanks for the feedback.
	1. Client mode support is already in the work. We will plan to release it as soon as available. It should be in time for coming WRT1200AC.
	2. We will add description to the rate related info.

Thanks,
David

-----Original Message-----
From: Ian Kent [mailto:raven at themaw.net] 
Sent: Saturday, January 24, 2015 5:37 PM
To: David Lin
Cc: Jiri Pirko; openwrt-devel at lists.openwrt.org; Imre Kaloz; Chor Teck Law
Subject: Re: [OpenWrt-Devel] Announcement of mac80211 driver support for Marvell 88W8864 chip

On Mon, 2015-01-12 at 19:03 -0800, David Lin wrote:
> Hi Ian,
> 
> 	1. I will take off these additional blank lines.
> 	2. I work for problems reported from community. If you do find problems for the driver, please let me know.

Hi David,

I was disappointed to find that client mode wireless in the driver isn't supported yet.

I logged an issue for it at https://github.com/kaloz/mwlwifi/issues/13
along with the kernel WARN() info.

As I say in the issue I believe that client mode is quite important for the coming WRT1200AC, assuming the wireless on that device is to be supported by this driver.

I've been looking at the driver source and I'm a bit puzzled about the rate and ht_sig2 fields in the receive descriptor structure. There's no documentation (that I can locate) on the interface to the wireless device so I can't refer to it.

It appears the rate field isn't just a rate or an index into the rate table or just an MCS rate either. So can you describe what the encoding is please?

The ht_sig2 field has a describing comment of "as the name suggests" but HT SIG 2 is 24 bits not 16 and even if the CRC and tail fields were discarded, I see there's more than the remaining 10 bits being used in the field. So can you describe the encoding in this field too please?

The other puzzling thing is the handling of VHT modes.
I don't see anything in the receive descriptor for that case.
It looks like the wireless device handles the rate (along with a lot
more) but how does the driver find out the VHT information that it may need for informational and reporting purposes (up to the mac80211 layer).

Could you help with this please.

These questions may sound like I don't know low level wireless concepts and that would be correct, but I'm slowly working on that, so sorry for the possibly silly questions.

Ian

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From blogic at openwrt.org  Wed Jan 28 05:54:07 2015
From: blogic at openwrt.org (John Crispin)
Date: Wed, 28 Jan 2015 11:54:07 +0100
Subject: [OpenWrt-Devel] [PATCH netifd] bridge: allow enabling or
 disabling the multicast querier independently of IGMP snooping
In-Reply-To: <b4fac27152a34dd39d59ca0b83de0157a8f7805f.1422326992.git.mschiffer@universe-factory.net>
References: <b4fac27152a34dd39d59ca0b83de0157a8f7805f.1422326992.git.mschiffer@universe-factory.net>
Message-ID: <54C8BFCF.7040000@openwrt.org>

Hi,

On 27/01/2015 03:49, Matthias Schiffer wrote:
> In larger networks, especially big batman-adv meshes, it may be desirable to
> enable IGMP snooping on every bridge without enabling the multicast querier
> to specifically put the querier on a well-connected node.
> 
> This patch adds a new UCI option 'multicast_querier' for bridges which allows
> this. The default is still the value of the 'igmp_snooping' option to maintain
> backwards compatiblity.
> 

per-se a good patch but its not reentrant


> Signed-off-by: Matthias Schiffer <mschiffer at universe-factory.net>
> ---
>  bridge.c       | 8 +++++++-
>  system-linux.c | 2 +-
>  system.h       | 1 +
>  3 files changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/bridge.c b/bridge.c
> index f8478ad..f7dbf61 100644
> --- a/bridge.c
> +++ b/bridge.c
> @@ -32,6 +32,7 @@ enum {
>  	BRIDGE_ATTR_HELLO_TIME,
>  	BRIDGE_ATTR_MAX_AGE,
>  	BRIDGE_ATTR_BRIDGE_EMPTY,
> +	BRIDGE_ATTR_MULTICAST_QUERIER,
>  	__BRIDGE_ATTR_MAX
>  };
>  
> @@ -45,6 +46,7 @@ static const struct blobmsg_policy bridge_attrs[__BRIDGE_ATTR_MAX] = {
>  	[BRIDGE_ATTR_MAX_AGE] = { "max_age", BLOBMSG_TYPE_INT32 },
>  	[BRIDGE_ATTR_IGMP_SNOOP] = { "igmp_snooping", BLOBMSG_TYPE_BOOL },
>  	[BRIDGE_ATTR_BRIDGE_EMPTY] = { "bridge_empty", BLOBMSG_TYPE_BOOL },
> +	[BRIDGE_ATTR_MULTICAST_QUERIER] = { "multicast_querier", BLOBMSG_TYPE_BOOL },
>  };
>  
>  static const struct uci_blob_param_info bridge_attr_info[__BRIDGE_ATTR_MAX] = {
> @@ -547,6 +549,7 @@ bridge_apply_settings(struct bridge_state *bst, struct blob_attr **tb)
>  	cfg->stp = false;
>  	cfg->forward_delay = 2;
>  	cfg->igmp_snoop = true;
> +	cfg->multicast_querier = true;
>  	cfg->bridge_empty = false;
>  	cfg->priority = 0x7FFF;
>  
> @@ -560,7 +563,10 @@ bridge_apply_settings(struct bridge_state *bst, struct blob_attr **tb)
>  		cfg->priority = blobmsg_get_u32(cur);
>  
>  	if ((cur = tb[BRIDGE_ATTR_IGMP_SNOOP]))
> -		cfg->igmp_snoop = blobmsg_get_bool(cur);
> +		cfg->multicast_querier = cfg->igmp_snoop = blobmsg_get_bool(cur);

i make 1 ubus call and set multicast_querier=0 and then a 2nd call and
set igmp_snoop=1 this will break my prior call.

dont change the above line and then ....

> +
> +	if ((cur = tb[BRIDGE_ATTR_MULTICAST_QUERIER]))
> +		cfg->multicast_querier = blobmsg_get_bool(cur);
>  
>  	if ((cur = tb[BRIDGE_ATTR_AGEING_TIME])) {
>  		cfg->ageing_time = blobmsg_get_u32(cur);
> diff --git a/system-linux.c b/system-linux.c
> index 4737fa6..ef90880 100644
> --- a/system-linux.c
> +++ b/system-linux.c
> @@ -772,7 +772,7 @@ int system_bridge_addbr(struct device *bridge, struct bridge_config *cfg)
>  		bridge->ifname, cfg->igmp_snoop ? "1" : "0");
>  
>  	system_set_dev_sysctl("/sys/devices/virtual/net/%s/bridge/multicast_querier",
> -		bridge->ifname, cfg->igmp_snoop ? "1" : "0");
> +		bridge->ifname, cfg->multicast_querier ? "1" : "0");
>  

change this to

	bridge->ifname, (cfg->igmp_snoop & cfg->multicast_querier) ? "1" : "0");

this should not break anything with multiple ubus calls. the default
behavior also wont change as we set cfg->multicast_querier = true;

Please make those changes to the patch and resend it.





>  	args[0] = BRCTL_SET_BRIDGE_PRIORITY;
>  	args[1] = cfg->priority;
> diff --git a/system.h b/system.h
> index 9a2326b..94e0dd9 100644
> --- a/system.h
> +++ b/system.h
> @@ -50,6 +50,7 @@ struct bridge_config {
>  	enum bridge_opt flags;
>  	bool stp;
>  	bool igmp_snoop;
> +	bool multicast_querier;
>  	unsigned short priority;
>  	int forward_delay;
>  	bool bridge_empty;
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From mschiffer at universe-factory.net  Wed Jan 28 07:30:00 2015
From: mschiffer at universe-factory.net (Matthias Schiffer)
Date: Wed, 28 Jan 2015 13:30:00 +0100
Subject: [OpenWrt-Devel] [PATCH netifd] bridge: allow enabling or
 disabling the multicast querier independently of IGMP snooping
In-Reply-To: <54C8BFCF.7040000@openwrt.org>
References: <b4fac27152a34dd39d59ca0b83de0157a8f7805f.1422326992.git.mschiffer@universe-factory.net>
 <54C8BFCF.7040000@openwrt.org>
Message-ID: <54C8D648.1020608@universe-factory.net>

On 01/28/2015 11:54 AM, John Crispin wrote:
> Hi,
> 
> On 27/01/2015 03:49, Matthias Schiffer wrote:
>> In larger networks, especially big batman-adv meshes, it may be desirable to
>> enable IGMP snooping on every bridge without enabling the multicast querier
>> to specifically put the querier on a well-connected node.
>>
>> This patch adds a new UCI option 'multicast_querier' for bridges which allows
>> this. The default is still the value of the 'igmp_snooping' option to maintain
>> backwards compatiblity.
>>
> 
> per-se a good patch but its not reentrant
> 
> 
>> Signed-off-by: Matthias Schiffer <mschiffer at universe-factory.net>
>> ---
>>  bridge.c       | 8 +++++++-
>>  system-linux.c | 2 +-
>>  system.h       | 1 +
>>  3 files changed, 9 insertions(+), 2 deletions(-)
>>
>> diff --git a/bridge.c b/bridge.c
>> index f8478ad..f7dbf61 100644
>> --- a/bridge.c
>> +++ b/bridge.c
>> @@ -32,6 +32,7 @@ enum {
>>  	BRIDGE_ATTR_HELLO_TIME,
>>  	BRIDGE_ATTR_MAX_AGE,
>>  	BRIDGE_ATTR_BRIDGE_EMPTY,
>> +	BRIDGE_ATTR_MULTICAST_QUERIER,
>>  	__BRIDGE_ATTR_MAX
>>  };
>>  
>> @@ -45,6 +46,7 @@ static const struct blobmsg_policy bridge_attrs[__BRIDGE_ATTR_MAX] = {
>>  	[BRIDGE_ATTR_MAX_AGE] = { "max_age", BLOBMSG_TYPE_INT32 },
>>  	[BRIDGE_ATTR_IGMP_SNOOP] = { "igmp_snooping", BLOBMSG_TYPE_BOOL },
>>  	[BRIDGE_ATTR_BRIDGE_EMPTY] = { "bridge_empty", BLOBMSG_TYPE_BOOL },
>> +	[BRIDGE_ATTR_MULTICAST_QUERIER] = { "multicast_querier", BLOBMSG_TYPE_BOOL },
>>  };
>>  
>>  static const struct uci_blob_param_info bridge_attr_info[__BRIDGE_ATTR_MAX] = {
>> @@ -547,6 +549,7 @@ bridge_apply_settings(struct bridge_state *bst, struct blob_attr **tb)
>>  	cfg->stp = false;
>>  	cfg->forward_delay = 2;
>>  	cfg->igmp_snoop = true;
>> +	cfg->multicast_querier = true;
>>  	cfg->bridge_empty = false;
>>  	cfg->priority = 0x7FFF;
>>  
>> @@ -560,7 +563,10 @@ bridge_apply_settings(struct bridge_state *bst, struct blob_attr **tb)
>>  		cfg->priority = blobmsg_get_u32(cur);
>>  
>>  	if ((cur = tb[BRIDGE_ATTR_IGMP_SNOOP]))
>> -		cfg->igmp_snoop = blobmsg_get_bool(cur);
>> +		cfg->multicast_querier = cfg->igmp_snoop = blobmsg_get_bool(cur);
> 
> i make 1 ubus call and set multicast_querier=0 and then a 2nd call and
> set igmp_snoop=1 this will break my prior call.
> 
> dont change the above line and then ....
> 
>> +
>> +	if ((cur = tb[BRIDGE_ATTR_MULTICAST_QUERIER]))
>> +		cfg->multicast_querier = blobmsg_get_bool(cur);
>>  
>>  	if ((cur = tb[BRIDGE_ATTR_AGEING_TIME])) {
>>  		cfg->ageing_time = blobmsg_get_u32(cur);
>> diff --git a/system-linux.c b/system-linux.c
>> index 4737fa6..ef90880 100644
>> --- a/system-linux.c
>> +++ b/system-linux.c
>> @@ -772,7 +772,7 @@ int system_bridge_addbr(struct device *bridge, struct bridge_config *cfg)
>>  		bridge->ifname, cfg->igmp_snoop ? "1" : "0");
>>  
>>  	system_set_dev_sysctl("/sys/devices/virtual/net/%s/bridge/multicast_querier",
>> -		bridge->ifname, cfg->igmp_snoop ? "1" : "0");
>> +		bridge->ifname, cfg->multicast_querier ? "1" : "0");
>>  
> 
> change this to
> 
> 	bridge->ifname, (cfg->igmp_snoop & cfg->multicast_querier) ? "1" : "0");
> 
> this should not break anything with multiple ubus calls. the default
> behavior also wont change as we set cfg->multicast_querier = true;
> 
> Please make those changes to the patch and resend it.
Wouldn't it be better to change the possible values of multicast_querier
to "yes", "no" and "unset"? That way it could always default to the
igmp_snoop value when it is unset, but it would be possible to override
it in both ways.

> 
> 
> 
> 
> 
>>  	args[0] = BRCTL_SET_BRIDGE_PRIORITY;
>>  	args[1] = cfg->priority;
>> diff --git a/system.h b/system.h
>> index 9a2326b..94e0dd9 100644
>> --- a/system.h
>> +++ b/system.h
>> @@ -50,6 +50,7 @@ struct bridge_config {
>>  	enum bridge_opt flags;
>>  	bool stp;
>>  	bool igmp_snoop;
>> +	bool multicast_querier;
>>  	unsigned short priority;
>>  	int forward_delay;
>>  	bool bridge_empty;
>>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150128/ca291d97/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From blogic at openwrt.org  Wed Jan 28 07:34:18 2015
From: blogic at openwrt.org (John Crispin)
Date: Wed, 28 Jan 2015 13:34:18 +0100
Subject: [OpenWrt-Devel] [PATCH netifd] bridge: allow enabling or
 disabling the multicast querier independently of IGMP snooping
In-Reply-To: <54C8D648.1020608@universe-factory.net>
References: <b4fac27152a34dd39d59ca0b83de0157a8f7805f.1422326992.git.mschiffer@universe-factory.net>
 <54C8BFCF.7040000@openwrt.org> <54C8D648.1020608@universe-factory.net>
Message-ID: <54C8D74A.6050700@openwrt.org>



On 28/01/2015 13:30, Matthias Schiffer wrote:
> On 01/28/2015 11:54 AM, John Crispin wrote:
>> Hi,
>> 
>> On 27/01/2015 03:49, Matthias Schiffer wrote:
>>> In larger networks, especially big batman-adv meshes, it may be
>>> desirable to enable IGMP snooping on every bridge without
>>> enabling the multicast querier to specifically put the querier
>>> on a well-connected node.
>>> 
>>> This patch adds a new UCI option 'multicast_querier' for
>>> bridges which allows this. The default is still the value of
>>> the 'igmp_snooping' option to maintain backwards compatiblity.
>>> 
>> 
>> per-se a good patch but its not reentrant
>> 
>> 
>>> Signed-off-by: Matthias Schiffer
>>> <mschiffer at universe-factory.net> --- bridge.c       | 8
>>> +++++++- system-linux.c | 2 +- system.h       | 1 + 3 files
>>> changed, 9 insertions(+), 2 deletions(-)
>>> 
>>> diff --git a/bridge.c b/bridge.c index f8478ad..f7dbf61 100644 
>>> --- a/bridge.c +++ b/bridge.c @@ -32,6 +32,7 @@ enum { 
>>> BRIDGE_ATTR_HELLO_TIME, BRIDGE_ATTR_MAX_AGE, 
>>> BRIDGE_ATTR_BRIDGE_EMPTY, +	BRIDGE_ATTR_MULTICAST_QUERIER, 
>>> __BRIDGE_ATTR_MAX };
>>> 
>>> @@ -45,6 +46,7 @@ static const struct blobmsg_policy
>>> bridge_attrs[__BRIDGE_ATTR_MAX] = { [BRIDGE_ATTR_MAX_AGE] = {
>>> "max_age", BLOBMSG_TYPE_INT32 }, [BRIDGE_ATTR_IGMP_SNOOP] = {
>>> "igmp_snooping", BLOBMSG_TYPE_BOOL }, 
>>> [BRIDGE_ATTR_BRIDGE_EMPTY] = { "bridge_empty",
>>> BLOBMSG_TYPE_BOOL }, +	[BRIDGE_ATTR_MULTICAST_QUERIER] = {
>>> "multicast_querier", BLOBMSG_TYPE_BOOL }, };
>>> 
>>> static const struct uci_blob_param_info
>>> bridge_attr_info[__BRIDGE_ATTR_MAX] = { @@ -547,6 +549,7 @@
>>> bridge_apply_settings(struct bridge_state *bst, struct
>>> blob_attr **tb) cfg->stp = false; cfg->forward_delay = 2; 
>>> cfg->igmp_snoop = true; +	cfg->multicast_querier = true; 
>>> cfg->bridge_empty = false; cfg->priority = 0x7FFF;
>>> 
>>> @@ -560,7 +563,10 @@ bridge_apply_settings(struct bridge_state
>>> *bst, struct blob_attr **tb) cfg->priority =
>>> blobmsg_get_u32(cur);
>>> 
>>> if ((cur = tb[BRIDGE_ATTR_IGMP_SNOOP])) -		cfg->igmp_snoop =
>>> blobmsg_get_bool(cur); +		cfg->multicast_querier =
>>> cfg->igmp_snoop = blobmsg_get_bool(cur);
>> 
>> i make 1 ubus call and set multicast_querier=0 and then a 2nd
>> call and set igmp_snoop=1 this will break my prior call.
>> 
>> dont change the above line and then ....
>> 
>>> + +	if ((cur = tb[BRIDGE_ATTR_MULTICAST_QUERIER])) +
>>> cfg->multicast_querier = blobmsg_get_bool(cur);
>>> 
>>> if ((cur = tb[BRIDGE_ATTR_AGEING_TIME])) { cfg->ageing_time =
>>> blobmsg_get_u32(cur); diff --git a/system-linux.c
>>> b/system-linux.c index 4737fa6..ef90880 100644 ---
>>> a/system-linux.c +++ b/system-linux.c @@ -772,7 +772,7 @@ int
>>> system_bridge_addbr(struct device *bridge, struct bridge_config
>>> *cfg) bridge->ifname, cfg->igmp_snoop ? "1" : "0");
>>> 
>>> system_set_dev_sysctl("/sys/devices/virtual/net/%s/bridge/multicast_querier",
>>>
>>> 
-		bridge->ifname, cfg->igmp_snoop ? "1" : "0");
>>> +		bridge->ifname, cfg->multicast_querier ? "1" : "0");
>>> 
>> 
>> change this to
>> 
>> bridge->ifname, (cfg->igmp_snoop & cfg->multicast_querier) ? "1"
>> : "0");
>> 
>> this should not break anything with multiple ubus calls. the
>> default behavior also wont change as we set
>> cfg->multicast_querier = true;
>> 
>> Please make those changes to the patch and resend it.
> Wouldn't it be better to change the possible values of
> multicast_querier to "yes", "no" and "unset"? That way it could
> always default to the igmp_snoop value when it is unset, but it
> would be possible to override it in both ways.
> 

do you call this by hand or via webui/rpc ?





>> 
>> 
>> 
>> 
>> 
>>> args[0] = BRCTL_SET_BRIDGE_PRIORITY; args[1] = cfg->priority; 
>>> diff --git a/system.h b/system.h index 9a2326b..94e0dd9 100644 
>>> --- a/system.h +++ b/system.h @@ -50,6 +50,7 @@ struct
>>> bridge_config { enum bridge_opt flags; bool stp; bool
>>> igmp_snoop; +	bool multicast_querier; unsigned short priority; 
>>> int forward_delay; bool bridge_empty;
>>> 
> 
> 
> 
> 
> _______________________________________________ openwrt-devel
> mailing list openwrt-devel at lists.openwrt.org 
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From blogic at openwrt.org  Wed Jan 28 07:59:50 2015
From: blogic at openwrt.org (John Crispin)
Date: Wed, 28 Jan 2015 13:59:50 +0100
Subject: [OpenWrt-Devel] [PATCH netifd] bridge: allow enabling or
 disabling the multicast querier independently of IGMP snooping
In-Reply-To: <b4fac27152a34dd39d59ca0b83de0157a8f7805f.1422326992.git.mschiffer@universe-factory.net>
References: <b4fac27152a34dd39d59ca0b83de0157a8f7805f.1422326992.git.mschiffer@universe-factory.net>
Message-ID: <54C8DD46.5020201@openwrt.org>



On 27/01/2015 03:49, Matthias Schiffer wrote:
> In larger networks, especially big batman-adv meshes, it may be desirable to
> enable IGMP snooping on every bridge without enabling the multicast querier
> to specifically put the querier on a well-connected node.
> 
> This patch adds a new UCI option 'multicast_querier' for bridges which allows
> this. The default is still the value of the 'igmp_snooping' option to maintain
> backwards compatiblity.
> 
> Signed-off-by: Matthias Schiffer <mschiffer at universe-factory.net>
> ---
>  bridge.c       | 8 +++++++-
>  system-linux.c | 2 +-
>  system.h       | 1 +
>  3 files changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/bridge.c b/bridge.c
> index f8478ad..f7dbf61 100644

[...]


> @@ -560,7 +563,10 @@ bridge_apply_settings(struct bridge_state *bst, struct blob_attr **tb)
>  		cfg->priority = blobmsg_get_u32(cur);
>  
>  	if ((cur = tb[BRIDGE_ATTR_IGMP_SNOOP]))
> -		cfg->igmp_snoop = blobmsg_get_bool(cur);
> +		cfg->multicast_querier = cfg->igmp_snoop = blobmsg_get_bool(cur);
> +
> +	if ((cur = tb[BRIDGE_ATTR_MULTICAST_QUERIER]))
> +		cfg->multicast_querier = blobmsg_get_bool(cur);
>  

how about this ?

  	if ((cur = tb[BRIDGE_ATTR_IGMP_SNOOP]))
		cfg->igmp_snoop = blobmsg_get_bool(cur);

	if ((cur = tb[BRIDGE_ATTR_MULTICAST_QUERIER]))
		cfg->multicast_querier = blobmsg_get_bool(cur);
	else
		  cfg->multicast_querier = cfg->igmp_snoop;






>  	if ((cur = tb[BRIDGE_ATTR_AGEING_TIME])) {
>  		cfg->ageing_time = blobmsg_get_u32(cur);
> diff --git a/system-linux.c b/system-linux.c
> index 4737fa6..ef90880 100644
> --- a/system-linux.c
> +++ b/system-linux.c
> @@ -772,7 +772,7 @@ int system_bridge_addbr(struct device *bridge, struct bridge_config *cfg)
>  		bridge->ifname, cfg->igmp_snoop ? "1" : "0");
>  
>  	system_set_dev_sysctl("/sys/devices/virtual/net/%s/bridge/multicast_querier",
> -		bridge->ifname, cfg->igmp_snoop ? "1" : "0");
> +		bridge->ifname, cfg->multicast_querier ? "1" : "0");
>  
>  	args[0] = BRCTL_SET_BRIDGE_PRIORITY;
>  	args[1] = cfg->priority;
> diff --git a/system.h b/system.h
> index 9a2326b..94e0dd9 100644
> --- a/system.h
> +++ b/system.h
> @@ -50,6 +50,7 @@ struct bridge_config {
>  	enum bridge_opt flags;
>  	bool stp;
>  	bool igmp_snoop;
> +	bool multicast_querier;
>  	unsigned short priority;
>  	int forward_delay;
>  	bool bridge_empty;
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From mschiffer at universe-factory.net  Wed Jan 28 08:26:01 2015
From: mschiffer at universe-factory.net (Matthias Schiffer)
Date: Wed, 28 Jan 2015 14:26:01 +0100
Subject: [OpenWrt-Devel] [PATCH netifd] bridge: allow enabling or
 disabling the multicast querier independently of IGMP snooping
In-Reply-To: <54C8D74A.6050700@openwrt.org>
References: <b4fac27152a34dd39d59ca0b83de0157a8f7805f.1422326992.git.mschiffer@universe-factory.net>
 <54C8BFCF.7040000@openwrt.org> <54C8D648.1020608@universe-factory.net>
 <54C8D74A.6050700@openwrt.org>
Message-ID: <54C8E369.10209@universe-factory.net>

On 01/28/2015 01:34 PM, John Crispin wrote:
> 
> 
> On 28/01/2015 13:30, Matthias Schiffer wrote:
>> On 01/28/2015 11:54 AM, John Crispin wrote:
>>> change this to
>>>
>>> bridge->ifname, (cfg->igmp_snoop & cfg->multicast_querier) ? "1"
>>> : "0");
>>>
>>> this should not break anything with multiple ubus calls. the
>>> default behavior also wont change as we set
>>> cfg->multicast_querier = true;
>>>
>>> Please make those changes to the patch and resend it.
>> Wouldn't it be better to change the possible values of
>> multicast_querier to "yes", "no" and "unset"? That way it could
>> always default to the igmp_snoop value when it is unset, but it
>> would be possible to override it in both ways.
>>
> 
> do you call this by hand or via webui/rpc ?
At the moment, this is compile-tested only. My only usecase is setting
it in /etc/config/network.

Your suggestion would make it impossible to enable the multicast querier
without also enabling snooping. My intention was to allow all four
combinations of snooping on/off and querier on/off, while having the
querier setting default to the snooping setting (so nothing changes for
people who have set igmp_snoop, but not multicast_querier). While I
don't need the case "querier on/snooping off", I don't see why we
shouldn't allow it.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150128/58727837/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From mschiffer at universe-factory.net  Wed Jan 28 08:31:01 2015
From: mschiffer at universe-factory.net (Matthias Schiffer)
Date: Wed, 28 Jan 2015 14:31:01 +0100
Subject: [OpenWrt-Devel] [PATCH netifd] bridge: allow enabling or
 disabling the multicast querier independently of IGMP snooping
In-Reply-To: <54C8DD46.5020201@openwrt.org>
References: <b4fac27152a34dd39d59ca0b83de0157a8f7805f.1422326992.git.mschiffer@universe-factory.net>
 <54C8DD46.5020201@openwrt.org>
Message-ID: <54C8E495.10102@universe-factory.net>

On 01/28/2015 01:59 PM, John Crispin wrote:
> 
> 
> On 27/01/2015 03:49, Matthias Schiffer wrote:
>> In larger networks, especially big batman-adv meshes, it may be desirable to
>> enable IGMP snooping on every bridge without enabling the multicast querier
>> to specifically put the querier on a well-connected node.
>>
>> This patch adds a new UCI option 'multicast_querier' for bridges which allows
>> this. The default is still the value of the 'igmp_snooping' option to maintain
>> backwards compatiblity.
>>
>> Signed-off-by: Matthias Schiffer <mschiffer at universe-factory.net>
>> ---
>>  bridge.c       | 8 +++++++-
>>  system-linux.c | 2 +-
>>  system.h       | 1 +
>>  3 files changed, 9 insertions(+), 2 deletions(-)
>>
>> diff --git a/bridge.c b/bridge.c
>> index f8478ad..f7dbf61 100644
> 
> [...]
> 
> 
>> @@ -560,7 +563,10 @@ bridge_apply_settings(struct bridge_state *bst, struct blob_attr **tb)
>>  		cfg->priority = blobmsg_get_u32(cur);
>>  
>>  	if ((cur = tb[BRIDGE_ATTR_IGMP_SNOOP]))
>> -		cfg->igmp_snoop = blobmsg_get_bool(cur);
>> +		cfg->multicast_querier = cfg->igmp_snoop = blobmsg_get_bool(cur);
>> +
>> +	if ((cur = tb[BRIDGE_ATTR_MULTICAST_QUERIER]))
>> +		cfg->multicast_querier = blobmsg_get_bool(cur);
>>  
> 
> how about this ?
> 
>   	if ((cur = tb[BRIDGE_ATTR_IGMP_SNOOP]))
> 		cfg->igmp_snoop = blobmsg_get_bool(cur);
> 
> 	if ((cur = tb[BRIDGE_ATTR_MULTICAST_QUERIER]))
> 		cfg->multicast_querier = blobmsg_get_bool(cur);
> 	else
> 		  cfg->multicast_querier = cfg->igmp_snoop;
> 
> 
> 
> 
> 
This will break when neither igmp_snoop and multicast_querier is set in
a ubus request, it will overwrite the multicast_querier setting with the
previous igmp_snoop setting. I realized that it is not possible to store
all needed cases in two booleans in the bridge_config (in my first
version I didn't think about dynamic reconfiguration at all...)


> 
>>  	if ((cur = tb[BRIDGE_ATTR_AGEING_TIME])) {
>>  		cfg->ageing_time = blobmsg_get_u32(cur);
>> diff --git a/system-linux.c b/system-linux.c
>> index 4737fa6..ef90880 100644
>> --- a/system-linux.c
>> +++ b/system-linux.c
>> @@ -772,7 +772,7 @@ int system_bridge_addbr(struct device *bridge, struct bridge_config *cfg)
>>  		bridge->ifname, cfg->igmp_snoop ? "1" : "0");
>>  
>>  	system_set_dev_sysctl("/sys/devices/virtual/net/%s/bridge/multicast_querier",
>> -		bridge->ifname, cfg->igmp_snoop ? "1" : "0");
>> +		bridge->ifname, cfg->multicast_querier ? "1" : "0");
>>  
>>  	args[0] = BRCTL_SET_BRIDGE_PRIORITY;
>>  	args[1] = cfg->priority;
>> diff --git a/system.h b/system.h
>> index 9a2326b..94e0dd9 100644
>> --- a/system.h
>> +++ b/system.h
>> @@ -50,6 +50,7 @@ struct bridge_config {
>>  	enum bridge_opt flags;
>>  	bool stp;
>>  	bool igmp_snoop;
>> +	bool multicast_querier;
>>  	unsigned short priority;
>>  	int forward_delay;
>>  	bool bridge_empty;
>>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150128/81584daf/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From bittorf at bluebottle.com  Wed Jan 28 08:46:24 2015
From: bittorf at bluebottle.com (Bastian Bittorf)
Date: Wed, 28 Jan 2015 14:46:24 +0100
Subject: [OpenWrt-Devel] fstools / always fires 'uci commit' each reboot
Message-ID: <20150128134624.GW18910@medion.lan>

we detected a strange problem in our community-network,
which can be tracked down to
'package/system/fstools/files/fstab.default' which is later
installed to '/etc/uci-defaults/10-fstab' including this:

[ ! -f /etc/config/fstab ] && ( block detect > /etc/config/fstab )

in our routers there is always a '/etc/config/fstab', which
means this scripts fails and later during /etc/init.d/boot
an 'uci commit' is fired because of this, see uci_apply_defaults()

the intention is, to do an 'uci commit' because some scripts have
run in /etc/uci-defaults. this is always true when scripts will
not be deleted after firstrun and causes issues here:

we autoupload a cofiguration.tgz, when something had changed in
/etc/config and because we dynamically do some configurations
during bootup with 'uci set ...' there is always an upload
triggered.

the question is here:

1)
can we change that behaviour for this single script?
(delete it during first run).

or

2)
only fire an 'uci commit' when the checksum of /etc/config has changed?

i dont opened a ticket on tracker, because this is not a real bug.

bye, bastian
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From mschiffer at universe-factory.net  Wed Jan 28 08:56:58 2015
From: mschiffer at universe-factory.net (Matthias Schiffer)
Date: Wed, 28 Jan 2015 14:56:58 +0100
Subject: [OpenWrt-Devel] [PATCH] ar71xx: fix D-Link DIR-615 rev. C1 WLAN MAC
	address
Message-ID: <c44314c9a60804c60a047a746220ab3c0b49ec6e.1422453418.git.mschiffer@universe-factory.net>

Fix the WLAN MAC address to match the one printed on the label by using the
correct address from the ART instead of the address of the LAN interface.

Signed-off-by: Matthias Schiffer <mschiffer at universe-factory.net>
---
 target/linux/ar71xx/files/arch/mips/ath79/mach-dir-615-c1.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-615-c1.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-615-c1.c
index 425be30..e55a43f 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-615-c1.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-615-c1.c
@@ -38,6 +38,8 @@
 #define DIR_615C1_CONFIG_ADDR		0x1f020000
 #define DIR_615C1_CONFIG_SIZE		0x10000
 
+#define DIR_615C1_WLAN_MAC_ADDR		0x1f3fffb4
+
 static struct gpio_led dir_615c1_leds_gpio[] __initdata = {
 	{
 		.name		= "d-link:orange:status",
@@ -96,16 +98,16 @@ static void __init dir_615c1_setup(void)
 {
 	const char *config = (char *) KSEG1ADDR(DIR_615C1_CONFIG_ADDR);
 	u8 *eeprom = (u8 *) KSEG1ADDR(0x1fff1000);
-	u8 mac[6];
-	u8 *wlan_mac = NULL;
+	u8 mac[ETH_ALEN], wlan_mac[ETH_ALEN];
 
 	if (ath79_nvram_parse_mac_addr(config, DIR_615C1_CONFIG_SIZE,
 				       "lan_mac=", mac) == 0) {
 		ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
 		ath79_init_mac(ath79_eth1_data.mac_addr, mac, 1);
-		wlan_mac = mac;
 	}
 
+	ath79_parse_ascii_mac((char *) KSEG1ADDR(DIR_615C1_WLAN_MAC_ADDR), wlan_mac);
+
 	ath79_register_mdio(0, DIR_615C1_MDIO_MASK);
 
 	ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
-- 
2.2.2
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From bittorf at bluebottle.com  Wed Jan 28 09:44:40 2015
From: bittorf at bluebottle.com (Bastian Bittorf)
Date: Wed, 28 Jan 2015 15:44:40 +0100
Subject: [OpenWrt-Devel] Q: autoupload a configuration file
In-Reply-To: <CABwgzie4CKwAW-=gR=cjMEG9Lmkuzf1cQu0t3zhbWVxTZPGrzw@mail.gmail.com>
References: <CABwgzie4CKwAW-=gR=cjMEG9Lmkuzf1cQu0t3zhbWVxTZPGrzw@mail.gmail.com>
Message-ID: <20150128144440.GY18910@medion.lan>

* Dan Therrien <dtherrien1 at gmail.com> [28.01.2015 15:40]:
> I would be very interested on how your autoupload of a configuration file works?

// CC'ed openwrt-dev, maybe it's interesting for others too

is mostly the function: watch_configchange()
https://github.com/bittorf/kalua/blob/master/openwrt-addons/etc/kalua/watch#L9

is polluted with our own logic, but you get the idea:
a tar.gz is uploaded via scp (public keys must be on server)
when the hash of /etc/config/* changes...

bye, bastian
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From malaakso at elisanet.fi  Wed Jan 28 11:44:47 2015
From: malaakso at elisanet.fi (Matti Laakso)
Date: Wed, 28 Jan 2015 18:44:47 +0200
Subject: [OpenWrt-Devel] [PATCH] comgt-ncm: Fix NCM protocol
Message-ID: <1422463487-5238-1-git-send-email-malaakso@elisanet.fi>

This patch fixes the NCM protocol by adding the missing ifname
to the netifd script and changing one unintended "send" statement to
"print" in runcommand.gcom. It also cleans up logging and makes the
manufacturer names case-insensitive. Furthermore, comgt-ncm should
not depend on the USB-serial-related kernel modules, as the cdc-wdm
control device works without them. There is also no need to depend on
kmod-huawei-cdc-ncm, since other manufacturers (like Sony-Ericsson
and Samsung) which use other kernel modules should also be supported.

I'd appreciate if someone with Samsung or Sony-Ericsson modems could
test this, I was only able to test it with Huawei E3276, E3372 and
E353.

Signed-off-by: Matti Laakso <malaakso at elisanet.fi>
---
 package/network/utils/comgt/Makefile              |  2 +-
 package/network/utils/comgt/files/ncm.json        |  4 +-
 package/network/utils/comgt/files/ncm.sh          | 82 ++++++++++++++---------
 package/network/utils/comgt/files/runcommand.gcom |  9 ++-
 4 files changed, 61 insertions(+), 36 deletions(-)

diff --git a/package/network/utils/comgt/Makefile b/package/network/utils/comgt/Makefile
index 9ab2f14..500365a 100644
--- a/package/network/utils/comgt/Makefile
+++ b/package/network/utils/comgt/Makefile
@@ -44,7 +44,7 @@ endef
 define Package/comgt-ncm
 $(call Package/comgt/Default)
   TITLE+=NCM 3G/4G Support
-  DEPENDS:=+comgt +kmod-usb-serial +kmod-usb-serial-option +kmod-usb-net +kmod-usb-net-cdc-ncm +kmod-usb-net-huawei-cdc-ncm
+  DEPENDS:=+comgt
 endef
 
 define Package/comgt/description
diff --git a/package/network/utils/comgt/files/ncm.json b/package/network/utils/comgt/files/ncm.json
index b9b15cd..ea4f984 100644
--- a/package/network/utils/comgt/files/ncm.json
+++ b/package/network/utils/comgt/files/ncm.json
@@ -19,7 +19,7 @@
 		"connect": "AT^NDISDUP=1,1,\\\"${apn}\\\"${username:+,\\\"$username\\\"}${password:+,\\\"$password\\\"}${auth:+,$auth}",
 		"disconnect": "AT^NDISDUP=1,0"
 	},
-	"SAMSUNG": {
+	"samsung": {
 		"initialize": [
 			"AT",
 			"AT+CGREG=2",
@@ -33,7 +33,7 @@
 		"connect": "AT+CGATT=1",
 		"disconnect": "AT+CGATT=0"
 	},
-	"Sony": {
+	"sony": {
 		"initialize": [
 			"AT+CFUN=1",
 			"AT+CGDCONT=1,\\\"IP\\\",\\\"${apn}\\\"",
diff --git a/package/network/utils/comgt/files/ncm.sh b/package/network/utils/comgt/files/ncm.sh
index 14e421f..2c2835f 100644
--- a/package/network/utils/comgt/files/ncm.sh
+++ b/package/network/utils/comgt/files/ncm.sh
@@ -1,8 +1,10 @@
 #!/bin/sh
 
-. /lib/functions.sh
-. ../netifd-proto.sh
-init_proto "$@"
+[ -n "$INCLUDE_ONLY" ] || {
+	. /lib/functions.sh
+	. ../netifd-proto.sh
+	init_proto "$@"
+}
 
 proto_ncm_init_config() {
 	no_device=1
@@ -20,34 +22,52 @@ proto_ncm_init_config() {
 proto_ncm_setup() {
 	local interface="$1"
 
-	local manufacturer initialize setmode connect
+	local manufacturer initialize setmode connect ifname devname devpath
 
 	local device apn auth username password pincode delay mode
 	json_get_vars device apn auth username password pincode delay mode
 
 	[ -n "$device" ] || {
-		echo "ncm[$$]" "No control device specified"
+		echo "No control device specified"
 		proto_notify_error "$interface" NO_DEVICE
 		proto_set_available "$interface" 0
 		return 1
 	}
 	[ -e "$device" ] || {
-		echo "ncm[$$]" "Control device not valid"
+		echo "Control device not valid"
 		proto_set_available "$interface" 0
 		return 1
 	}
 	[ -n "$apn" ] || {
-		echo "ncm[$$]" "No APN specified"
+		echo "No APN specified"
 		proto_notify_error "$interface" NO_APN
 		proto_set_available "$interface" 0
 		return 1
 	}
 
+	devname="$(basename "$device")"
+	case "$devname" in
+	'tty'*)
+		devpath="$(readlink -f /sys/class/tty/$devname/device)"
+		ifname="$( ls "$devpath"/../../*/net )"
+		;;
+	*)
+		devpath="$(readlink -f /sys/class/usbmisc/$devname/device/)"
+		ifname="$( ls "$devpath"/net )"
+		;;
+	esac
+	[ -n "$ifname" ] || {
+		echo "The interface could not be found."
+		proto_notify_error "$interface" NO_IFACE
+		proto_set_available "$interface" 0
+		return 1
+	}
+
 	[ -n "$delay" ] && sleep "$delay"
 
-	manufacturer=`gcom -d "$device" -s /etc/gcom/getcardinfo.gcom | awk '/Manufacturer/ { print $2 }'`
+	manufacturer=`gcom -d "$device" -s /etc/gcom/getcardinfo.gcom | awk '/Manufacturer/ { print tolower($2) }'`
 	[ $? -ne 0 ] && {
-		echo "ncm[$$]" "Failed to get modem information"
+		echo "Failed to get modem information"
 		proto_notify_error "$interface" GETINFO_FAILED
 		proto_set_available "$interface" 0
 		return 1
@@ -56,7 +76,7 @@ proto_ncm_setup() {
 	json_load "$(cat /etc/gcom/ncm.json)"
 	json_select "$manufacturer"
 	[ $? -ne 0 ] && {
-		echo "ncm[$$]" "Unsupported modem"
+		echo "Unsupported modem"
 		proto_notify_error "$interface" UNSUPPORTED_MODEM
 		proto_set_available "$interface" 0
 		return 1
@@ -64,7 +84,7 @@ proto_ncm_setup() {
 	json_get_values initialize initialize
 	for i in $initialize; do
 		eval COMMAND="$i" gcom -d "$device" -s /etc/gcom/runcommand.gcom || {
-			echo "ncm[$$]" "Failed to initialize modem"
+			echo "Failed to initialize modem"
 			proto_notify_error "$interface" INITIALIZE_FAILED
 			proto_set_available "$interface" 0
 			return 1
@@ -73,7 +93,7 @@ proto_ncm_setup() {
 
 	[ -n "$pincode" ] && {
 		PINCODE="$pincode" gcom -d "$device" -s /etc/gcom/setpin.gcom || {
-			echo "ncm[$$]" "Unable to verify PIN"
+			echo "Unable to verify PIN"
 			proto_notify_error "$interface" PIN_FAILED
 			proto_block_restart "$interface"
 			return 1
@@ -83,7 +103,7 @@ proto_ncm_setup() {
 		json_select modes
 		json_get_var setmode "$mode"
 		COMMAND="$setmode" gcom -d "$device" -s /etc/gcom/runcommand.gcom || {
-			echo "ncm[$$]" "Failed to set operating mode"
+			echo "Failed to set operating mode"
 			proto_notify_error "$interface" SETMODE_FAILED
 			proto_set_available "$interface" 0
 			return 1
@@ -91,66 +111,66 @@ proto_ncm_setup() {
 		json_select ..
 	}
 
-	json_get_var connect connect
+	json_get_vars connect
 	eval COMMAND="$connect" gcom -d "$device" -s /etc/gcom/runcommand.gcom || {
-		echo "ncm[$$]" "Failed to connect"
+		echo "Failed to connect"
 		proto_notify_error "$interface" CONNECT_FAILED
 		proto_set_available "$interface" 0
 		return 1
 	}
 
-	echo "ncm[$$]" "Connected, starting DHCP"
-	proto_init_update "*" 1
+	echo "Connected, starting DHCP"
+	
+	proto_init_update "$ifname" 1
 	proto_send_update "$interface"
 
 	json_init
 	json_add_string name "${interface}_dhcp"
 	json_add_string ifname "@$interface"
 	json_add_string proto "dhcp"
-	json_close_object
 	ubus call network add_dynamic "$(json_dump)"
 
 	json_init
 	json_add_string name "${interface}_dhcpv6"
 	json_add_string ifname "@$interface"
 	json_add_string proto "dhcpv6"
-	json_close_object
 	ubus call network add_dynamic "$(json_dump)"
 }
 
 proto_ncm_teardown() {
 	local interface="$1"
 
-	proto_init_update "*" 0
-	proto_send_update "$interface"
-
 	local manufacturer disconnect
 
-	local device 
+	local device
 	json_get_vars device
 
-	echo "ncm[$$]" "Stopping network"
+	echo "Stopping network"
 
-	manufacturer=`gcom -d "$device" -s /etc/gcom/getcardinfo.gcom | awk '/Manufacturer/ { print $2 }'`
+	manufacturer=`gcom -d "$device" -s /etc/gcom/getcardinfo.gcom | awk '/Manufacturer/ { print tolower($2) }'`
 	[ $? -ne 0 ] && {
-		echo "ncm[$$]" "Failed to get modem information"
+		echo "Failed to get modem information"
 		proto_notify_error "$interface" GETINFO_FAILED
 		return 1
 	}
 
 	json_load "$(cat /etc/gcom/ncm.json)"
 	json_select "$manufacturer" || {
-		echo "ncm[$$]" "Unsupported modem"
+		echo "Unsupported modem"
 		proto_notify_error "$interface" UNSUPPORTED_MODEM
 		return 1
 	}
 
-	json_get_var disconnect disconnect
+	json_get_vars disconnect
 	COMMAND="$disconnect" gcom -d "$device" -s /etc/gcom/runcommand.gcom || {
-		echo "ncm[$$]" "Failed to disconnect"
+		echo "Failed to disconnect"
 		proto_notify_error "$interface" DISCONNECT_FAILED
 		return 1
 	}
-}
 
-add_protocol ncm
+	proto_init_update "*" 0
+	proto_send_update "$interface"
+}
+[ -n "$INCLUDE_ONLY" ] || {
+	add_protocol ncm
+}
diff --git a/package/network/utils/comgt/files/runcommand.gcom b/package/network/utils/comgt/files/runcommand.gcom
index ab24339..e99b6f9 100644
--- a/package/network/utils/comgt/files/runcommand.gcom
+++ b/package/network/utils/comgt/files/runcommand.gcom
@@ -6,14 +6,15 @@ opengt
  flash 0.1
 
 :start
- send "sending -> "
+ print "sending -> ",$env("COMMAND"),"\n"
  send $env("COMMAND")
  send "^m"
 
- waitfor 15 "OK","ERR","ERROR"
+ waitfor 15 "OK","ERR","ERROR","COMMAND NOT SUPPORT"
  if % = 0 goto continue
  if % = 1 goto error
  if % = 2 goto error
+ if % = 3 goto notsupported
 
  print "Timeout running AT-command\n"
  exit 1
@@ -22,5 +23,9 @@ opengt
  print "Error running AT-command\n"
  exit 1
 
+:notsupported
+ print "AT-command not supported\n"
+ exit 1
+
 :continue
  exit 0
-- 
2.1.0
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From stefan.tomanek+openwrt at wertarbyte.de  Wed Jan 28 11:56:30 2015
From: stefan.tomanek+openwrt at wertarbyte.de (Stefan Tomanek)
Date: Wed, 28 Jan 2015 17:56:30 +0100
Subject: [OpenWrt-Devel] [PATCH] hostapd: backport BSSID black/whitelists
In-Reply-To: <20150121135928.GL13405@zirkel.wertarbyte.de>
References: <20150121135928.GL13405@zirkel.wertarbyte.de>
Message-ID: <20150128165630.GY13405@zirkel.wertarbyte.de>

Dies schrieb Stefan Tomanek (stefan.tomanek+openwrt at wertarbyte.de):

> This change adds the configuration options "bssid_whitelist" and
> "bssid_blacklist" used to limit the AP selection of a network to a
> specified (finite) set or discard certain APs.

Any feedback regarding this backported feature?
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From blogic at openwrt.org  Wed Jan 28 12:19:52 2015
From: blogic at openwrt.org (John Crispin)
Date: Wed, 28 Jan 2015 18:19:52 +0100
Subject: [OpenWrt-Devel] [PATCH] hostapd: backport BSSID black/whitelists
In-Reply-To: <20150128165630.GY13405@zirkel.wertarbyte.de>
References: <20150121135928.GL13405@zirkel.wertarbyte.de>
 <20150128165630.GY13405@zirkel.wertarbyte.de>
Message-ID: <54C91A38.7040700@openwrt.org>



On 28/01/2015 17:56, Stefan Tomanek wrote:
> Dies schrieb Stefan Tomanek
> (stefan.tomanek+openwrt at wertarbyte.de):
> 
>> This change adds the configuration options "bssid_whitelist" and 
>> "bssid_blacklist" used to limit the AP selection of a network to
>> a specified (finite) set or discard certain APs.
> 
> Any feedback regarding this backported feature?

this patch is fine, the log file one scares me though as there is no
log rotate logic.

> _______________________________________________ openwrt-devel
> mailing list openwrt-devel at lists.openwrt.org 
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From stefan.tomanek+openwrt at wertarbyte.de  Wed Jan 28 12:49:01 2015
From: stefan.tomanek+openwrt at wertarbyte.de (Stefan Tomanek)
Date: Wed, 28 Jan 2015 18:49:01 +0100
Subject: [OpenWrt-Devel] [PATCH] hostapd: backport BSSID black/whitelists
In-Reply-To: <54C91A38.7040700@openwrt.org>
References: <20150121135928.GL13405@zirkel.wertarbyte.de>
 <20150128165630.GY13405@zirkel.wertarbyte.de>
 <54C91A38.7040700@openwrt.org>
Message-ID: <20150128174901.GZ13405@zirkel.wertarbyte.de>

Dies schrieb John Crispin (blogic at openwrt.org):

> > Any feedback regarding this backported feature?
> 
> this patch is fine, the log file one scares me though as there is no
> log rotate logic.

What kind of log rotate logic do you mean? That can be implemented externally
if needed: just move the old logfile away and send SIGHUP to the hostapd
process, to make it reopen (and recreate) the file.
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From ning at oaklight.us  Wed Jan 28 13:32:15 2015
From: ning at oaklight.us (Ning Ye)
Date: Wed, 28 Jan 2015 13:32:15 -0500
Subject: [OpenWrt-Devel] QEMU 2.0.0
In-Reply-To: <54C03BA5.4000003@openwrt.org>
References: <00cf01d0359c$e3493360$a9db9a20$@oaklight.us>
 <54C03BA5.4000003@openwrt.org>
Message-ID: <009d01d03b28$bdde56a0$399b03e0$@oaklight.us>

I just went through the Makefile in qemu and it doesn't seem to be any easy way to build just quem-img.  This is because it has depency upon qemu libraries which depend on the libraries we don't want.  I guess we will have to stick with the current version for now. 

Ning

-----Original Message-----
From: Florian Fainelli [mailto:f.fainelli at gmail.com] On Behalf Of Florian Fainelli
Sent: Wednesday, January 21, 2015 6:52 PM
To: Ning Ye; openwrt-devel at lists.openwrt.org
Subject: Re: [OpenWrt-Devel] QEMU 2.0.0

On 21/01/15 09:08, Ning Ye wrote:
> I am just wondering if anyone maintains QEMU in OpenWRT toolchain.  I 
> want to use QEMU 2.0.0 or later as it fixed VHD virtual disk issues.  
> Of course, it has dependency on other library which is not simple to 
> upgrade. That's where I am stuck now.

Right, we don't want to pull in all of these libraries, can you find a way to build qemu-img only, because this is the only thing we use from a qemu host-build?

> 
> I am currently use QEMU 2.0 separately from OpenWRT build and manually 
> run the tools on my Linux Host to convert and generate VHD images.
> 
> Any suggestions would be deeply appreciated.  Thanks.
--
Florian
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From mschiffer at universe-factory.net  Wed Jan 28 15:31:58 2015
From: mschiffer at universe-factory.net (Matthias Schiffer)
Date: Wed, 28 Jan 2015 21:31:58 +0100
Subject: [OpenWrt-Devel] [PATCH netifd] bridge: allow enabling or
 disabling the multicast querier independently of IGMP snooping
In-Reply-To: <54C8BFCF.7040000@openwrt.org>
References: <b4fac27152a34dd39d59ca0b83de0157a8f7805f.1422326992.git.mschiffer@universe-factory.net>
 <54C8BFCF.7040000@openwrt.org>
Message-ID: <54C9473E.6090804@universe-factory.net>

On 01/28/2015 11:54 AM, John Crispin wrote:
> Hi,
> 
> On 27/01/2015 03:49, Matthias Schiffer wrote:
>> In larger networks, especially big batman-adv meshes, it may be desirable to
>> enable IGMP snooping on every bridge without enabling the multicast querier
>> to specifically put the querier on a well-connected node.
>>
>> This patch adds a new UCI option 'multicast_querier' for bridges which allows
>> this. The default is still the value of the 'igmp_snooping' option to maintain
>> backwards compatiblity.
>>
> 
> per-se a good patch but its not reentrant
> 
> 
>> Signed-off-by: Matthias Schiffer <mschiffer at universe-factory.net>
>> ---
>>  bridge.c       | 8 +++++++-
>>  system-linux.c | 2 +-
>>  system.h       | 1 +
>>  3 files changed, 9 insertions(+), 2 deletions(-)
>>
>> diff --git a/bridge.c b/bridge.c
>> index f8478ad..f7dbf61 100644
>> --- a/bridge.c
>> +++ b/bridge.c
>> @@ -32,6 +32,7 @@ enum {
>>  	BRIDGE_ATTR_HELLO_TIME,
>>  	BRIDGE_ATTR_MAX_AGE,
>>  	BRIDGE_ATTR_BRIDGE_EMPTY,
>> +	BRIDGE_ATTR_MULTICAST_QUERIER,
>>  	__BRIDGE_ATTR_MAX
>>  };
>>  
>> @@ -45,6 +46,7 @@ static const struct blobmsg_policy bridge_attrs[__BRIDGE_ATTR_MAX] = {
>>  	[BRIDGE_ATTR_MAX_AGE] = { "max_age", BLOBMSG_TYPE_INT32 },
>>  	[BRIDGE_ATTR_IGMP_SNOOP] = { "igmp_snooping", BLOBMSG_TYPE_BOOL },
>>  	[BRIDGE_ATTR_BRIDGE_EMPTY] = { "bridge_empty", BLOBMSG_TYPE_BOOL },
>> +	[BRIDGE_ATTR_MULTICAST_QUERIER] = { "multicast_querier", BLOBMSG_TYPE_BOOL },
>>  };
>>  
>>  static const struct uci_blob_param_info bridge_attr_info[__BRIDGE_ATTR_MAX] = {
>> @@ -547,6 +549,7 @@ bridge_apply_settings(struct bridge_state *bst, struct blob_attr **tb)
>>  	cfg->stp = false;
>>  	cfg->forward_delay = 2;
>>  	cfg->igmp_snoop = true;
>> +	cfg->multicast_querier = true;
>>  	cfg->bridge_empty = false;
>>  	cfg->priority = 0x7FFF;
>>  
>> @@ -560,7 +563,10 @@ bridge_apply_settings(struct bridge_state *bst, struct blob_attr **tb)
>>  		cfg->priority = blobmsg_get_u32(cur);
>>  
>>  	if ((cur = tb[BRIDGE_ATTR_IGMP_SNOOP]))
>> -		cfg->igmp_snoop = blobmsg_get_bool(cur);
>> +		cfg->multicast_querier = cfg->igmp_snoop = blobmsg_get_bool(cur);
> 
> i make 1 ubus call and set multicast_querier=0 and then a 2nd call and
> set igmp_snoop=1 this will break my prior call.
> 
> dont change the above line and then ....
> 
>> +
>> +	if ((cur = tb[BRIDGE_ATTR_MULTICAST_QUERIER]))
>> +		cfg->multicast_querier = blobmsg_get_bool(cur);
>>  
>>  	if ((cur = tb[BRIDGE_ATTR_AGEING_TIME])) {
>>  		cfg->ageing_time = blobmsg_get_u32(cur);
>> diff --git a/system-linux.c b/system-linux.c
>> index 4737fa6..ef90880 100644
>> --- a/system-linux.c
>> +++ b/system-linux.c
>> @@ -772,7 +772,7 @@ int system_bridge_addbr(struct device *bridge, struct bridge_config *cfg)
>>  		bridge->ifname, cfg->igmp_snoop ? "1" : "0");
>>  
>>  	system_set_dev_sysctl("/sys/devices/virtual/net/%s/bridge/multicast_querier",
>> -		bridge->ifname, cfg->igmp_snoop ? "1" : "0");
>> +		bridge->ifname, cfg->multicast_querier ? "1" : "0");
>>  
> 
> change this to
> 
> 	bridge->ifname, (cfg->igmp_snoop & cfg->multicast_querier) ? "1" : "0");
> 
> this should not break anything with multiple ubus calls. the default
> behavior also wont change as we set cfg->multicast_querier = true;
> 
> Please make those changes to the patch and resend it.
I just re-read the whole function and noticed why I made my change like
this in the first place: all values in bridge_config are always reset to
their defaults at the top of bridge_apply_settings() anyways, not
regarding if the blobmsg contains a new value for the options or not.

Doesn't this mean that all option's values are lost in the case of
multiple ubus calls anyways? Is this intended for bridge devices, or
should this be fixed as well?

I hope I don't misunderstand how this is supposed to work, I'm not
really familar with the way dynamic reconfiguration works in netifd...



> 
> 
> 
> 
> 
>>  	args[0] = BRCTL_SET_BRIDGE_PRIORITY;
>>  	args[1] = cfg->priority;
>> diff --git a/system.h b/system.h
>> index 9a2326b..94e0dd9 100644
>> --- a/system.h
>> +++ b/system.h
>> @@ -50,6 +50,7 @@ struct bridge_config {
>>  	enum bridge_opt flags;
>>  	bool stp;
>>  	bool igmp_snoop;
>> +	bool multicast_querier;
>>  	unsigned short priority;
>>  	int forward_delay;
>>  	bool bridge_empty;
>>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150128/fd8a7738/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From cezary.jackiewicz at gmail.com  Wed Jan 28 15:39:37 2015
From: cezary.jackiewicz at gmail.com (Cezary Jackiewicz)
Date: Wed, 28 Jan 2015 21:39:37 +0100
Subject: [OpenWrt-Devel] [PATCH] comgt-ncm: Fix NCM protocol
In-Reply-To: <1422463487-5238-1-git-send-email-malaakso@elisanet.fi>
References: <1422463487-5238-1-git-send-email-malaakso@elisanet.fi>
Message-ID: <20150128213937.2cdd43d2@samsung>

Dnia 2015-01-28, o godz. 18:44:47
Matti Laakso <malaakso at elisanet.fi> napisa?(a):

> I'd appreciate if someone with Samsung or Sony-Ericsson modems could
> test this, I was only able to test it with Huawei E3276, E3372 and
> E353.

Hi,
ndis was tested with e3372 and working? On which version of firmware/WebUI?

-- 
Pozdrawiam,
 Cezary Jackiewicz
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From blogic at openwrt.org  Wed Jan 28 17:00:47 2015
From: blogic at openwrt.org (John Crispin)
Date: Wed, 28 Jan 2015 23:00:47 +0100
Subject: [OpenWrt-Devel] [PATCH netifd] bridge: allow enabling or
 disabling the multicast querier independently of IGMP snooping
In-Reply-To: <54C9473E.6090804@universe-factory.net>
References: <b4fac27152a34dd39d59ca0b83de0157a8f7805f.1422326992.git.mschiffer@universe-factory.net>
 <54C8BFCF.7040000@openwrt.org> <54C9473E.6090804@universe-factory.net>
Message-ID: <54C95C0F.4090302@openwrt.org>



On 28/01/2015 21:31, Matthias Schiffer wrote:
> On 01/28/2015 11:54 AM, John Crispin wrote:
>> Hi,
>> 
>> On 27/01/2015 03:49, Matthias Schiffer wrote:
>>> In larger networks, especially big batman-adv meshes, it may be
>>> desirable to enable IGMP snooping on every bridge without
>>> enabling the multicast querier to specifically put the querier
>>> on a well-connected node.
>>> 
>>> This patch adds a new UCI option 'multicast_querier' for
>>> bridges which allows this. The default is still the value of
>>> the 'igmp_snooping' option to maintain backwards compatiblity.
>>> 
>> 
>> per-se a good patch but its not reentrant
>> 
>> 
>>> Signed-off-by: Matthias Schiffer
>>> <mschiffer at universe-factory.net> --- bridge.c       | 8
>>> +++++++- system-linux.c | 2 +- system.h       | 1 + 3 files
>>> changed, 9 insertions(+), 2 deletions(-)
>>> 
>>> diff --git a/bridge.c b/bridge.c index f8478ad..f7dbf61 100644 
>>> --- a/bridge.c +++ b/bridge.c @@ -32,6 +32,7 @@ enum { 
>>> BRIDGE_ATTR_HELLO_TIME, BRIDGE_ATTR_MAX_AGE, 
>>> BRIDGE_ATTR_BRIDGE_EMPTY, +	BRIDGE_ATTR_MULTICAST_QUERIER, 
>>> __BRIDGE_ATTR_MAX };
>>> 
>>> @@ -45,6 +46,7 @@ static const struct blobmsg_policy
>>> bridge_attrs[__BRIDGE_ATTR_MAX] = { [BRIDGE_ATTR_MAX_AGE] = {
>>> "max_age", BLOBMSG_TYPE_INT32 }, [BRIDGE_ATTR_IGMP_SNOOP] = {
>>> "igmp_snooping", BLOBMSG_TYPE_BOOL }, 
>>> [BRIDGE_ATTR_BRIDGE_EMPTY] = { "bridge_empty",
>>> BLOBMSG_TYPE_BOOL }, +	[BRIDGE_ATTR_MULTICAST_QUERIER] = {
>>> "multicast_querier", BLOBMSG_TYPE_BOOL }, };
>>> 
>>> static const struct uci_blob_param_info
>>> bridge_attr_info[__BRIDGE_ATTR_MAX] = { @@ -547,6 +549,7 @@
>>> bridge_apply_settings(struct bridge_state *bst, struct
>>> blob_attr **tb) cfg->stp = false; cfg->forward_delay = 2; 
>>> cfg->igmp_snoop = true; +	cfg->multicast_querier = true; 
>>> cfg->bridge_empty = false; cfg->priority = 0x7FFF;
>>> 
>>> @@ -560,7 +563,10 @@ bridge_apply_settings(struct bridge_state
>>> *bst, struct blob_attr **tb) cfg->priority =
>>> blobmsg_get_u32(cur);
>>> 
>>> if ((cur = tb[BRIDGE_ATTR_IGMP_SNOOP])) -		cfg->igmp_snoop =
>>> blobmsg_get_bool(cur); +		cfg->multicast_querier =
>>> cfg->igmp_snoop = blobmsg_get_bool(cur);
>> 
>> i make 1 ubus call and set multicast_querier=0 and then a 2nd
>> call and set igmp_snoop=1 this will break my prior call.
>> 
>> dont change the above line and then ....
>> 
>>> + +	if ((cur = tb[BRIDGE_ATTR_MULTICAST_QUERIER])) +
>>> cfg->multicast_querier = blobmsg_get_bool(cur);
>>> 
>>> if ((cur = tb[BRIDGE_ATTR_AGEING_TIME])) { cfg->ageing_time =
>>> blobmsg_get_u32(cur); diff --git a/system-linux.c
>>> b/system-linux.c index 4737fa6..ef90880 100644 ---
>>> a/system-linux.c +++ b/system-linux.c @@ -772,7 +772,7 @@ int
>>> system_bridge_addbr(struct device *bridge, struct bridge_config
>>> *cfg) bridge->ifname, cfg->igmp_snoop ? "1" : "0");
>>> 
>>> system_set_dev_sysctl("/sys/devices/virtual/net/%s/bridge/multicast_querier",
>>>
>>> 
-		bridge->ifname, cfg->igmp_snoop ? "1" : "0");
>>> +		bridge->ifname, cfg->multicast_querier ? "1" : "0");
>>> 
>> 
>> change this to
>> 
>> bridge->ifname, (cfg->igmp_snoop & cfg->multicast_querier) ? "1"
>> : "0");
>> 
>> this should not break anything with multiple ubus calls. the
>> default behavior also wont change as we set
>> cfg->multicast_querier = true;
>> 
>> Please make those changes to the patch and resend it.
> I just re-read the whole function and noticed why I made my change
> like this in the first place: all values in bridge_config are
> always reset to their defaults at the top of
> bridge_apply_settings() anyways, not regarding if the blobmsg
> contains a new value for the options or not.
> 

yep, i will cook up a patch tomorrow ...

> Doesn't this mean that all option's values are lost in the case of 
> multiple ubus calls anyways? Is this intended for bridge devices,
> or should this be fixed as well?
> 

probably not

> I hope I don't misunderstand how this is supposed to work, I'm not 
> really familar with the way dynamic reconfiguration works in
> netifd...
> 

me neither :)

> 
> 
>> 
>> 
>> 
>> 
>> 
>>> args[0] = BRCTL_SET_BRIDGE_PRIORITY; args[1] = cfg->priority; 
>>> diff --git a/system.h b/system.h index 9a2326b..94e0dd9 100644 
>>> --- a/system.h +++ b/system.h @@ -50,6 +50,7 @@ struct
>>> bridge_config { enum bridge_opt flags; bool stp; bool
>>> igmp_snoop; +	bool multicast_querier; unsigned short priority; 
>>> int forward_delay; bool bridge_empty;
>>> 
> 
> 
> 
> 
> _______________________________________________ openwrt-devel
> mailing list openwrt-devel at lists.openwrt.org 
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From openwrt at rogerpueyo.com  Wed Jan 28 18:29:45 2015
From: openwrt at rogerpueyo.com (Roger Pueyo Centelles)
Date: Thu, 29 Jan 2015 00:29:45 +0100
Subject: [OpenWrt-Devel] [ramips] Help supporting Xiaomi MiWiFi Mini (.dts
	file)
Message-ID: <CAPH4JEK4eDfchcZc5bs+GtKsXDGCWS5-Ases8EP5PGRTTxf9gA@mail.gmail.com>

Hi,

Some days ago I received a Xiaomi MiWiFi Mini and I've managed to run
OpenWrt on it [1] (i.e. trunk OpenWrt, not the very modified stuff the
vendor provides). I started with this initial patch [2] and I got the
firmware running, but a couple of things are missing. I need some help with
the .dts file (attached). The current status is:

Working: Ethernet, switch, SoC 802.11gbn radio, USB, TTL and sysupgrade

Partially working: MT7612E 802.11ac

Not working: LEDs and button

The problem with the 802.11ac radio is that I can not read the MAC from the
flash. I always get this message at boot time (with different MACs, of
course):

[   14.560000] mt76pci 0000:01:00.0: Invalid MAC address, using random
address 96:a3:a5:fa:a9:2b

So far I've tried this:

        pcie0 {
            mt76 at 0,0 {
                reg = <0x0000 0 0 0 0>;
                device_type = "pci";
                mediatek,mtd-eeprom = <&factory 0x8000>;
            };
        };

and also <&factory 0x0000> but the result is the same. I would say the
location is correct, because I see three consecutive MAC addresses in the
factory partition:

0x0004: 64:09:80:01:66:5D
0x0028: 64:09:80:01:66:5C
0x8004: 64:09:80:01:66:5E

that correspond respectively to SoC_radio, Ethernet and pcie_radio. The
question is, what is the way to make the mt76 driver use the MAC address
written in the flash?

Then, regarding the LEDs, I have tried enabling gpio chips 0, 1, 2 and 3,
exporting all the gpio numbers, setting the direction to "out" in all of
them and switching the values between 0, 1 and 255, but I can not control
any of the three leds (which are always on). The same problem for the reset
button, I can not find it anywhere. What else should I try?

Thank you very much!

Roger

[1] http://wiki.openwrt.org/toh/xiaomi/mini
[2]
https://github.com/rssnsj/openwrt-xiaomi-mini/blob/master/patches/01-xiaomi-mini.patch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150129/c5c204a8/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: XIAOMI-MIWIFI-MINI.dts
Type: application/octet-stream
Size: 1511 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150129/c5c204a8/attachment.obj>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From gch981213 at gmail.com  Wed Jan 28 18:42:48 2015
From: gch981213 at gmail.com (=?UTF-8?B?6YOt5Lyg6Yic?=)
Date: Thu, 29 Jan 2015 07:42:48 +0800
Subject: [OpenWrt-Devel] [ramips] Help supporting Xiaomi MiWiFi Mini
	(.dts file)
In-Reply-To: <CAPH4JEK4eDfchcZc5bs+GtKsXDGCWS5-Ases8EP5PGRTTxf9gA@mail.gmail.com>
References: <CAPH4JEK4eDfchcZc5bs+GtKsXDGCWS5-Ases8EP5PGRTTxf9gA@mail.gmail.com>
Message-ID: <CAJsYDV+7-QOVXY5cp4vmgBQcD9xNdNoU-SicbMNXze=fjvqXhg@mail.gmail.com>

Someone have posted a good patch for that device:
http://www.right.com.cn/forum/thread-157588-1-1.html
The dts above works fine.
After applying the patch above,you need to edit the following:
		reset {
			label = "reset";
			gpios = <&gpio1 6 0>;
			linux,code = <0x198>;
		};
change 0x198 to 0x100
and add the mt76 section in
	pcie at 10140000 {
		status = "okay";
	};


BTW ,the mac address is defined here:
	ethernet at 10100000 {
		pinctrl-names = "default";
		pinctrl-0 = <&ephy_pins>;
		mtd-mac-address = <&factory 0x4>;   <----------
		ralink,port-map = "llllw";
	};

2015-01-29 7:29 GMT+08:00, Roger Pueyo Centelles <openwrt at rogerpueyo.com>:
> Hi,
>
> Some days ago I received a Xiaomi MiWiFi Mini and I've managed to run
> OpenWrt on it [1] (i.e. trunk OpenWrt, not the very modified stuff the
> vendor provides). I started with this initial patch [2] and I got the
> firmware running, but a couple of things are missing. I need some help with
> the .dts file (attached). The current status is:
>
> Working: Ethernet, switch, SoC 802.11gbn radio, USB, TTL and sysupgrade
>
> Partially working: MT7612E 802.11ac
>
> Not working: LEDs and button
>
> The problem with the 802.11ac radio is that I can not read the MAC from the
> flash. I always get this message at boot time (with different MACs, of
> course):
>
> [   14.560000] mt76pci 0000:01:00.0: Invalid MAC address, using random
> address 96:a3:a5:fa:a9:2b
>
> So far I've tried this:
>
>         pcie0 {
>             mt76 at 0,0 {
>                 reg = <0x0000 0 0 0 0>;
>                 device_type = "pci";
>                 mediatek,mtd-eeprom = <&factory 0x8000>;
>             };
>         };
>
> and also <&factory 0x0000> but the result is the same. I would say the
> location is correct, because I see three consecutive MAC addresses in the
> factory partition:
>
> 0x0004: 64:09:80:01:66:5D
> 0x0028: 64:09:80:01:66:5C
> 0x8004: 64:09:80:01:66:5E
>
> that correspond respectively to SoC_radio, Ethernet and pcie_radio. The
> question is, what is the way to make the mt76 driver use the MAC address
> written in the flash?
>
> Then, regarding the LEDs, I have tried enabling gpio chips 0, 1, 2 and 3,
> exporting all the gpio numbers, setting the direction to "out" in all of
> them and switching the values between 0, 1 and 255, but I can not control
> any of the three leds (which are always on). The same problem for the reset
> button, I can not find it anywhere. What else should I try?
>
> Thank you very much!
>
> Roger
>
> [1] http://wiki.openwrt.org/toh/xiaomi/mini
> [2]
> https://github.com/rssnsj/openwrt-xiaomi-mini/blob/master/patches/01-xiaomi-mini.patch
>
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From gch981213 at gmail.com  Wed Jan 28 18:47:16 2015
From: gch981213 at gmail.com (=?UTF-8?B?6YOt5Lyg6Yic?=)
Date: Thu, 29 Jan 2015 07:47:16 +0800
Subject: [OpenWrt-Devel] [ramips] Help supporting Xiaomi MiWiFi Mini
	(.dts file)
In-Reply-To: <CAJsYDV+7-QOVXY5cp4vmgBQcD9xNdNoU-SicbMNXze=fjvqXhg@mail.gmail.com>
References: <CAPH4JEK4eDfchcZc5bs+GtKsXDGCWS5-Ases8EP5PGRTTxf9gA@mail.gmail.com>
 <CAJsYDV+7-QOVXY5cp4vmgBQcD9xNdNoU-SicbMNXze=fjvqXhg@mail.gmail.com>
Message-ID: <CAJsYDV+Yk6AzJYisOv=uoU8fFDRwR5_90mS=tWr-vcNF+J54xw@mail.gmail.com>

Sorry I haven't read your mail correctly.I pointed to the ethernet MAC address.

2015-01-29 7:42 GMT+08:00, ??? <gch981213 at gmail.com>:
> Someone have posted a good patch for that device:
> http://www.right.com.cn/forum/thread-157588-1-1.html
> The dts above works fine.
> After applying the patch above,you need to edit the following:
> 		reset {
> 			label = "reset";
> 			gpios = <&gpio1 6 0>;
> 			linux,code = <0x198>;
> 		};
> change 0x198 to 0x100
> and add the mt76 section in
> 	pcie at 10140000 {
> 		status = "okay";
> 	};
>
>
> BTW ,the mac address is defined here:
> 	ethernet at 10100000 {
> 		pinctrl-names = "default";
> 		pinctrl-0 = <&ephy_pins>;
> 		mtd-mac-address = <&factory 0x4>;   <----------
> 		ralink,port-map = "llllw";
> 	};
>
> 2015-01-29 7:29 GMT+08:00, Roger Pueyo Centelles <openwrt at rogerpueyo.com>:
>> Hi,
>>
>> Some days ago I received a Xiaomi MiWiFi Mini and I've managed to run
>> OpenWrt on it [1] (i.e. trunk OpenWrt, not the very modified stuff the
>> vendor provides). I started with this initial patch [2] and I got the
>> firmware running, but a couple of things are missing. I need some help
>> with
>> the .dts file (attached). The current status is:
>>
>> Working: Ethernet, switch, SoC 802.11gbn radio, USB, TTL and sysupgrade
>>
>> Partially working: MT7612E 802.11ac
>>
>> Not working: LEDs and button
>>
>> The problem with the 802.11ac radio is that I can not read the MAC from
>> the
>> flash. I always get this message at boot time (with different MACs, of
>> course):
>>
>> [   14.560000] mt76pci 0000:01:00.0: Invalid MAC address, using random
>> address 96:a3:a5:fa:a9:2b
>>
>> So far I've tried this:
>>
>>         pcie0 {
>>             mt76 at 0,0 {
>>                 reg = <0x0000 0 0 0 0>;
>>                 device_type = "pci";
>>                 mediatek,mtd-eeprom = <&factory 0x8000>;
>>             };
>>         };
>>
>> and also <&factory 0x0000> but the result is the same. I would say the
>> location is correct, because I see three consecutive MAC addresses in the
>> factory partition:
>>
>> 0x0004: 64:09:80:01:66:5D
>> 0x0028: 64:09:80:01:66:5C
>> 0x8004: 64:09:80:01:66:5E
>>
>> that correspond respectively to SoC_radio, Ethernet and pcie_radio. The
>> question is, what is the way to make the mt76 driver use the MAC address
>> written in the flash?
>>
>> Then, regarding the LEDs, I have tried enabling gpio chips 0, 1, 2 and 3,
>> exporting all the gpio numbers, setting the direction to "out" in all of
>> them and switching the values between 0, 1 and 255, but I can not control
>> any of the three leds (which are always on). The same problem for the
>> reset
>> button, I can not find it anywhere. What else should I try?
>>
>> Thank you very much!
>>
>> Roger
>>
>> [1] http://wiki.openwrt.org/toh/xiaomi/mini
>> [2]
>> https://github.com/rssnsj/openwrt-xiaomi-mini/blob/master/patches/01-xiaomi-mini.patch
>>
>
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From lists at sumpfralle.de  Wed Jan 28 18:56:33 2015
From: lists at sumpfralle.de (Lars Kruse)
Date: Thu, 29 Jan 2015 00:56:33 +0100
Subject: [OpenWrt-Devel] fstools / always fires 'uci commit' each reboot
In-Reply-To: <20150128134624.GW18910@medion.lan>
References: <20150128134624.GW18910@medion.lan>
Message-ID: <20150129005633.06a16ad6@erker.lan>

Hi,

> [..]
> 1)
> can we change that behaviour for this single script?
> (delete it during first run).

I guess, that script's execution should be considered successful, even
if /etc/config/fstab already exists. Thus the author just failed to make sure
that the exit code of that script reflects this logic.

I would suggest that
 [ ! -f /etc/config/fstab ] && ( block detect > /etc/config/fstab )
should be changed to:
 [ ! -f /etc/config/fstab ] && block detect > /etc/config/fstab || true
or even better (this does not hide errors in "block detect"):
 [ -f /etc/config/fstab ] || block detect > /etc/config/fstab

(I do not see the need for the subshell here - thus I removed the brackets)

This would make sure that the script exits successfully if there is the fstab
file or if the "block detect" execution finished successfully. Thus the script
would be deleted after its first execution (as it should be).

Lars
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From openwrt at rogerpueyo.com  Wed Jan 28 20:11:09 2015
From: openwrt at rogerpueyo.com (Roger Pueyo Centelles)
Date: Thu, 29 Jan 2015 02:11:09 +0100
Subject: [OpenWrt-Devel] [ramips] Help supporting Xiaomi MiWiFi Mini
	(.dts file)
In-Reply-To: <CAJsYDV+Yk6AzJYisOv=uoU8fFDRwR5_90mS=tWr-vcNF+J54xw@mail.gmail.com>
References: <CAPH4JEK4eDfchcZc5bs+GtKsXDGCWS5-Ases8EP5PGRTTxf9gA@mail.gmail.com>
 <CAJsYDV+7-QOVXY5cp4vmgBQcD9xNdNoU-SicbMNXze=fjvqXhg@mail.gmail.com>
 <CAJsYDV+Yk6AzJYisOv=uoU8fFDRwR5_90mS=tWr-vcNF+J54xw@mail.gmail.com>
Message-ID: <CAPH4JEJX2+i0Fj+UkLyqMqdZm5E7QY=r9P=1rij1a9TRbB1+0g@mail.gmail.com>

Hi,

Nice, leds and button are working. I see what I was missing! Thanks :)

Setting mtd-mac-address = <&factory 0x4> makes eth0 and wlan1 have the same
address, but using 0x28 makes them consecutive (MAC and MAC+1). Doesn't it
make more sense? The mt76pci radio still is getting a random MAC, though.

The dts in the patch above extends the firmware partition further,
overlapping with the last three small partitions of the original firmware.
Maybe it'd be interesting to keep them, in case anybody wants to flash the
factory firmware back?

Regards,

Roger


2015-01-29 0:47 GMT+01:00 ??? <gch981213 at gmail.com>:

> Sorry I haven't read your mail correctly.I pointed to the ethernet MAC
> address.
>
> 2015-01-29 7:42 GMT+08:00, ??? <gch981213 at gmail.com>:
> > Someone have posted a good patch for that device:
> > http://www.right.com.cn/forum/thread-157588-1-1.html
> > The dts above works fine.
> > After applying the patch above,you need to edit the following:
> >               reset {
> >                       label = "reset";
> >                       gpios = <&gpio1 6 0>;
> >                       linux,code = <0x198>;
> >               };
> > change 0x198 to 0x100
> > and add the mt76 section in
> >       pcie at 10140000 {
> >               status = "okay";
> >       };
> >
> >
> > BTW ,the mac address is defined here:
> >       ethernet at 10100000 {
> >               pinctrl-names = "default";
> >               pinctrl-0 = <&ephy_pins>;
> >               mtd-mac-address = <&factory 0x4>;   <----------
> >               ralink,port-map = "llllw";
> >       };
> >
> > 2015-01-29 7:29 GMT+08:00, Roger Pueyo Centelles <openwrt at rogerpueyo.com
> >:
> >> Hi,
> >>
> >> Some days ago I received a Xiaomi MiWiFi Mini and I've managed to run
> >> OpenWrt on it [1] (i.e. trunk OpenWrt, not the very modified stuff the
> >> vendor provides). I started with this initial patch [2] and I got the
> >> firmware running, but a couple of things are missing. I need some help
> >> with
> >> the .dts file (attached). The current status is:
> >>
> >> Working: Ethernet, switch, SoC 802.11gbn radio, USB, TTL and sysupgrade
> >>
> >> Partially working: MT7612E 802.11ac
> >>
> >> Not working: LEDs and button
> >>
> >> The problem with the 802.11ac radio is that I can not read the MAC from
> >> the
> >> flash. I always get this message at boot time (with different MACs, of
> >> course):
> >>
> >> [   14.560000] mt76pci 0000:01:00.0: Invalid MAC address, using random
> >> address 96:a3:a5:fa:a9:2b
> >>
> >> So far I've tried this:
> >>
> >>         pcie0 {
> >>             mt76 at 0,0 {
> >>                 reg = <0x0000 0 0 0 0>;
> >>                 device_type = "pci";
> >>                 mediatek,mtd-eeprom = <&factory 0x8000>;
> >>             };
> >>         };
> >>
> >> and also <&factory 0x0000> but the result is the same. I would say the
> >> location is correct, because I see three consecutive MAC addresses in
> the
> >> factory partition:
> >>
> >> 0x0004: 64:09:80:01:66:5D
> >> 0x0028: 64:09:80:01:66:5C
> >> 0x8004: 64:09:80:01:66:5E
> >>
> >> that correspond respectively to SoC_radio, Ethernet and pcie_radio. The
> >> question is, what is the way to make the mt76 driver use the MAC address
> >> written in the flash?
> >>
> >> Then, regarding the LEDs, I have tried enabling gpio chips 0, 1, 2 and
> 3,
> >> exporting all the gpio numbers, setting the direction to "out" in all of
> >> them and switching the values between 0, 1 and 255, but I can not
> control
> >> any of the three leds (which are always on). The same problem for the
> >> reset
> >> button, I can not find it anywhere. What else should I try?
> >>
> >> Thank you very much!
> >>
> >> Roger
> >>
> >> [1] http://wiki.openwrt.org/toh/xiaomi/mini
> >> [2]
> >>
> https://github.com/rssnsj/openwrt-xiaomi-mini/blob/master/patches/01-xiaomi-mini.patch
> >>
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150129/699df0b4/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From malaakso at elisanet.fi  Thu Jan 29 00:13:05 2015
From: malaakso at elisanet.fi (Matti Laakso)
Date: Thu, 29 Jan 2015 07:13:05 +0200
Subject: [OpenWrt-Devel] [PATCH] comgt-ncm: Fix NCM protocol
In-Reply-To: <20150128213937.2cdd43d2@samsung>
References: <1422463487-5238-1-git-send-email-malaakso@elisanet.fi>,
 <20150128213937.2cdd43d2@samsung>
Message-ID: <DUB122-W2671B0615960FD04A72DB18C300@phx.gbl>

> Date: Wed, 28 Jan 2015 21:39:37 +0100
> From: cezary.jackiewicz at gmail.com
> 
> Dnia 2015-01-28, o godz. 18:44:47
> Matti Laakso <malaakso at elisanet.fi> napisa?(a):
> 
> > I'd appreciate if someone with Samsung or Sony-Ericsson modems could
> > test this, I was only able to test it with Huawei E3276, E3372 and
> > E353.
> 
> Hi,
> ndis was tested with e3372 and working? On which version of firmware/WebUI?
> 

Hi,
 
I used 21.286.03.01.00 non-HiLink firmware. The HiLink version does not work with this proto.
 
Matti

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150129/078c91ba/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From phaidros at subsignal.org  Thu Jan 29 04:36:45 2015
From: phaidros at subsignal.org (phadros)
Date: Thu, 29 Jan 2015 10:36:45 +0100
Subject: [OpenWrt-Devel] Codenames dark and dirty ?!
Message-ID: <54C9FF2D.9090404@subsignal.org>

Ehlo,

 as rumors have told there is an upcoming release and there shall be a
name for it.

 I believe the atm chosen candidate "dark destroyer" is not really a
well chosen name for a nice piece of floss software, tho it might be a
delicious drink.
 Imagine going to a friend / fellow mesh dude / customer and telling
them: hey I'm gonna install "dark destroyer" on your device, that makes
things waaaayyyyy better, believe me! *evilgrin*.

 The other top candidate "dirty diamond" has so much more to offer for
the release, the project and the community. It includes the brilliance
and capabilities of the OpenWRT project and software, and still has some
hack'ish, shrugging attitude - imho.

 It would be great to let the community vote for the proper name, as I
personally feel that "dark destroyer" might just be the wrong choice :)



 my 2 cents!
.phaidros
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0xB8B85894.asc
Type: application/pgp-keys
Size: 3120 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150129/3191d81b/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150129/3191d81b/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From admin at gigabyte.getmyip.com  Thu Jan 29 05:04:22 2015
From: admin at gigabyte.getmyip.com (=?windows-1252?Q?Micha=EBl_Zweers?=)
Date: Thu, 29 Jan 2015 11:04:22 +0100
Subject: [OpenWrt-Devel] p2812hnu-f1
Message-ID: <54CA05A6.6040903@gigabyte.getmyip.com>

Hello ScApi,

I have a short request: Can you add your dropbox link
(https://www.dropbox.com/sh/movy1lhezgyhz2u/AABuA8_Vf6UHsugmVhU_Q5-ca?dl=0)
to the ZyXEL P-2812HNU  wiki pages or maybe transfer the blops to a
github repo and link that?

Thanks in advance! 

Kind regards,
Micha?l

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150129/737063a7/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150129/737063a7/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From lsoltero at globalmarinenet.com  Thu Jan 29 06:40:56 2015
From: lsoltero at globalmarinenet.com (Luis Soltero)
Date: Thu, 29 Jan 2015 06:40:56 -0500
Subject: [OpenWrt-Devel] [OpenWrt] #13951: Revision r36939 breaks
 support for RT5370 (rt2800usb) in HG556a (brcm6358)
In-Reply-To: <067.0b35ecbcf7844c066190d55f86e933cf@lists.openwrt.org>
References: <052.016f02e7267c0ed4dec20479b603b589@lists.openwrt.org>
 <067.0b35ecbcf7844c066190d55f86e933cf@lists.openwrt.org>
Message-ID: <54CA1C48.6000704@globalmarinenet.com>


hello all...

i have attached the patch


On 1/29/15 6:39 AM, OpenWrt wrote:
> #13951: Revision r36939 breaks support for RT5370 (rt2800usb) in HG556a (brcm6358)
> -------------------------+-------------------------------------------------
>    Reporter:  openwrt@?   |      Owner:  developers
>        Type:  defect      |     Status:  reopened
>    Priority:  normal      |  Milestone:  Chaos Calmer (trunk)
>   Component:  kernel      |    Version:  Trunk
> Resolution:              |   Keywords:  r36939 RT5370 rt2800usb HG556a
>                           |  brcm6358
> -------------------------+-------------------------------------------------
>
> Comment (by lsoltero):
>
>   fixed.
>
>   910-01-add-support-for-mt7620.patch
>
>   modified rt2800_get_txwi_rxwi_size() to add a case statement for the
>   RT5390.  The problem is that the logic added to the case tested for the
>   7620 but failed to set the values for txwi_size and rxwi_size when the
>   5390 was not associated with the 7620.  So the full function should look
>   like
>
>   void rt2800_get_txwi_rxwi_size(struct rt2x00_dev *rt2x00dev,
>                                  unsigned short *txwi_size,
>                                  unsigned short *rxwi_size)
>   {
>           switch (rt2x00dev->chip.rt) {
>           case RT3593:
>           case RT3883:
>                   *txwi_size = TXWI_DESC_SIZE_4WORDS;
>                   *rxwi_size = RXWI_DESC_SIZE_5WORDS;
>                   break;
>
>           case RT5390:
>                   if ( rt2x00dev->chip.rf == RF7620 ) {
>                           *txwi_size = TXWI_DESC_SIZE_5WORDS;
>                           *rxwi_size = RXWI_DESC_SIZE_6WORDS;
>                   } else {
>                      // else clause missing in original patch.
>                     *txwi_size = TXWI_DESC_SIZE_4WORDS;
>                     *rxwi_size = RXWI_DESC_SIZE_4WORDS;
>                   }
>                   break;
>
>           case RT5592:
>                   *txwi_size = TXWI_DESC_SIZE_5WORDS;
>                   *rxwi_size = RXWI_DESC_SIZE_6WORDS;
>                   break;
>
>           default:
>                   *txwi_size = TXWI_DESC_SIZE_4WORDS;
>                   *rxwi_size = RXWI_DESC_SIZE_4WORDS;
>                   break;
>           }
>   }
>
>
>   here is a patch that fixes the problem
>
>   package/kernel/mac80211/patches$ cat 910-02-fix-5370-in-add-support-for-
>   mt7620.patch
>   --- a/drivers/net/wireless/rt2x00/rt2800lib.c
>   +++ b/drivers/net/wireless/rt2x00/rt2800lib.c
>   @@ -633,6 +633,9 @@ void rt2800_get_txwi_rxwi_size(struct rt
>                   if ( rt2x00dev->chip.rf == RF7620 ) {
>                           *txwi_size = TXWI_DESC_SIZE_5WORDS;
>                           *rxwi_size = RXWI_DESC_SIZE_6WORDS;
>   +               } else {
>   +                 *txwi_size = TXWI_DESC_SIZE_4WORDS;
>   +                 *rxwi_size = RXWI_DESC_SIZE_4WORDS;
>                   }
>                   break;
>
> --
> Ticket URL: <https://dev.openwrt.org/ticket/13951#comment:17>
> OpenWrt <http://openwrt.org>
> Opensource Wireless Router Technology
>

-- 


Luis Soltero, Ph.D., MCS
Director of Software Development, CTO
Global Marine Networks, LLC
StarPilot, LLC
Tel: +1.865.379.8723
Fax: +1.865.681.5017
E-Mail: lsoltero at globalmarinenet.net
Web: http://www.globalmarinenet.net
Web: http://www.redportglobal.com
Web: http://www.starpilotllc.com

-------------- next part --------------
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -633,6 +633,9 @@ void rt2800_get_txwi_rxwi_size(struct rt
 		if ( rt2x00dev->chip.rf == RF7620 ) {
 			*txwi_size = TXWI_DESC_SIZE_5WORDS;
 			*rxwi_size = RXWI_DESC_SIZE_6WORDS;
+		} else {
+		  *txwi_size = TXWI_DESC_SIZE_4WORDS;
+		  *rxwi_size = RXWI_DESC_SIZE_4WORDS;
 		}
 		break;
 
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From ja at anyfi.net  Thu Jan 29 08:06:05 2015
From: ja at anyfi.net (Johan Almbladh)
Date: Thu, 29 Jan 2015 14:06:05 +0100
Subject: [OpenWrt-Devel] [PATCH] mac80211: fix NULL pointer crash in monitor
	frame injection TX path
Message-ID: <1422536765-32146-1-git-send-email-ja@anyfi.net>

This "patch to the patch" fixes a NULL pointer derefence crash in the new
intermediate software queues. The crash can be reproduced by injecting an
802.11 frame with a BSSID that does not belong to a configured vif. The
wperf tool (https://github.com/anyfi/wperf) may be convenient for doing
this.

Johan

---
 ...d-an-intermediate-software-queue-implemen.patch |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/kernel/mac80211/patches/321-mac80211-add-an-intermediate-software-queue-implemen.patch b/package/kernel/mac80211/patches/321-mac80211-add-an-intermediate-software-queue-implemen.patch
index ce5d4dc..a9e95ff 100644
--- a/package/kernel/mac80211/patches/321-mac80211-add-an-intermediate-software-queue-implemen.patch
+++ b/package/kernel/mac80211/patches/321-mac80211-add-an-intermediate-software-queue-implemen.patch
@@ -384,7 +384,7 @@ Signed-off-by: Felix Fietkau <nbd at openwrt.org>
 +	if (pubsta) {
 +		u8 tid = skb->priority & IEEE80211_QOS_CTL_TID_MASK;
 +		pubtxq = pubsta->txq[tid];
-+	} else {
++	} else if (vif) {
 +		pubtxq = vif->txq;
 +	}
 +
-- 
1.7.9.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From daniel.schwierzeck at gmail.com  Thu Jan 29 09:26:40 2015
From: daniel.schwierzeck at gmail.com (Daniel Schwierzeck)
Date: Thu, 29 Jan 2015 15:26:40 +0100
Subject: [OpenWrt-Devel] [PATCH] uboot-lantiq: fix P-2812HNU-F1/3
	package dependency
In-Reply-To: <1422380504.19237.20.camel@merveille.lan>
References: <1422190368-31840-1-git-send-email-a.seppala@gmail.com>
 <54C4FAF8.8050405@gmail.com>
 <CAKv9HNYs7SfBcR6n6O=DphpdTkweRROAbVfYwFfSkNa_DWPSyw@mail.gmail.com>
 <1422380504.19237.20.camel@merveille.lan>
Message-ID: <CACUy__WwJa0xy=bUT3m4xyUes_mqAoDH5wcSRGK0EOcvEYoekg@mail.gmail.com>

2015-01-27 18:41 GMT+01:00 Ben Mulvihill <ben.mulvihill at gmail.com>:
> Hi Antti,
>
> (Note that the diffs in this message are for information. They are not
> patches submitted for merging - not at this stage anyway.)
>
>> I tried and it seems the ram version
>> (openwrt-lantiq-p2812hnufx_ram-u-boot.asc) builds and boots properly.
>>
>> The openwrt-lantiq-p2812hnufx_nandspl-u-boot.img indeed does not boot
>> correctly. Is anyone working on fixing it? (Apparently conversion to
>> TPL is needed)
>
> I am working on the BT Home Hub 3A at the moment (arx100, nand-based
> board), and have also found that asc images build correctly but
> nandspl images do not.
>
> There seem to a number of problems. For a start some of the make
> targets seem to be missing. The following fixed that for arx100,
> and I think that a similar fix is necessary for danube and vrx200
> too.

the NAND boot does not work yet. I was not able to make it work with a
SPL only because the BootROM only reads the first page. The Lantiq UGW
U-Boot uses a very small pre-loader which loads another pre-loader and
fits in the first page. Thus we need to convert to SPL/TPL support
from mainline U-Boot. But I hadn't enough time yet to work on it.

>
> --- a/arch/mips/cpu/mips32/arx100/config.mk     2015-01-27 12:33:32.000000000 +0100
> +++ b/arch/mips/cpu/mips32/arx100/config.mk     2015-01-27 18:07:37.000000000 +0100
> @@ -27,4 +27,9 @@ ALL-y += $(obj)u-boot.ltq.norspl
>  ALL-$(CONFIG_SPL_LZO_SUPPORT) += $(obj)u-boot.ltq.lzo.norspl
>  ALL-$(CONFIG_SPL_LZMA_SUPPORT) += $(obj)u-boot.ltq.lzma.norspl
>  endif
> +ifdef CONFIG_SYS_BOOT_NANDSPL
> +ALL-y += $(obj)u-boot.ltq.nandspl
> +ALL-$(CONFIG_SPL_LZO_SUPPORT) += $(obj)u-boot.ltq.lzo.nandspl
> +ALL-$(CONFIG_SPL_LZMA_SUPPORT) += $(obj)u-boot.ltq.lzma.nandspl
> +endif
>  endif
>
>
> Then the ebu configuration word needs to be set in the nandspl
> image, as it is for norspl. Once again, the following fixed that
> for arx100, and I think something similar will be required for danube
> and vrx200.

actually the BootROM should correctly configure the EBU to be able to
read at least the first page from NAND flash. The XWAY_EBU_BOOTCFG is
only used for parallel NOR to setup various command timings and
delays.

>
> --- a/arch/mips/include/asm/arch-arx100/config.h        2015-01-27 18:12:32.000000000 +0100
> +++ b/arch/mips/include/asm/arch-arx100/config.h        2015-01-27 18:13:02.000000000 +0100
> @@ -174,6 +174,10 @@
>  #define CONFIG_XWAY_SWAP_BYTES
>  #endif
>
> +#if defined(CONFIG_SYS_BOOT_NAND) || defined(CONFIG_SYS_BOOT_NANDSPL)
> +#define CONFIG_SYS_XWAY_EBU_BOOTCFG    0x688C688C
> +#endif
> +
>  #define        CONFIG_SYS_MONITOR_BASE         CONFIG_SYS_TEXT_BASE
>
>  #endif /* __ARX100_CONFIG_H__ */
>
> Finally the ltq-boot-image tool adds a couple of download header to the
> final image which I don't think should be there.
>
> Daniel, does all the above make sense?
>
> That said, even after making those changes my nandspl images still
> don't work.
>
> Ben
>
>
>
>



-- 
- Daniel
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From bittorf at bluebottle.com  Thu Jan 29 14:23:35 2015
From: bittorf at bluebottle.com (Bastian Bittorf)
Date: Thu, 29 Jan 2015 20:23:35 +0100
Subject: [OpenWrt-Devel] fstools / always fires 'uci commit' each reboot
In-Reply-To: <20150129005633.06a16ad6@erker.lan>
References: <20150128134624.GW18910@medion.lan>
 <20150129005633.06a16ad6@erker.lan>
Message-ID: <20150129192335.GE18910@medion.lan>

* Lars Kruse <lists at sumpfralle.de> [29.01.2015 20:06]:
> or even better (this does not hide errors in "block detect"):
>  [ -f /etc/config/fstab ] || block detect > /etc/config/fstab
> 
> (I do not see the need for the subshell here - thus I removed the brackets)

thanks to jow, there was a hotfix with r44180 for this:
https://dev.openwrt.org/changeset/44180/trunk

bye, bastian
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From openwrt-devel at bleeter.id.au  Thu Jan 29 14:53:33 2015
From: openwrt-devel at bleeter.id.au (Peter Lawler)
Date: Fri, 30 Jan 2015 06:53:33 +1100
Subject: [OpenWrt-Devel] fstools / always fires 'uci commit' each reboot
In-Reply-To: <20150129192335.GE18910@medion.lan>
References: <20150128134624.GW18910@medion.lan>
 <20150129005633.06a16ad6@erker.lan> <20150129192335.GE18910@medion.lan>
Message-ID: <54CA8FBD.7070605@bleeter.id.au>

On 30/01/15 06:23, Bastian Bittorf wrote:
> * Lars Kruse <lists at sumpfralle.de> [29.01.2015 20:06]:
>> or even better (this does not hide errors in "block detect"):
>>  [ -f /etc/config/fstab ] || block detect > /etc/config/fstab
>>
>> (I do not see the need for the subshell here - thus I removed the brackets)
> 
> thanks to jow, there was a hotfix with r44180 for this:
> https://dev.openwrt.org/changeset/44180/trunk
> 

hmm, long shot here but I wonder if this has any bearing on an extroot
pivot overlay issue I've still yet to work out why it's happening...

https://lists.openwrt.org/pipermail/openwrt-users/2014-December/003403.html

P.
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From saltwaterc at gmail.com  Thu Jan 29 15:53:13 2015
From: saltwaterc at gmail.com (=?UTF-8?B?yJh0ZWZhbiBSdXN1?=)
Date: Thu, 29 Jan 2015 22:53:13 +0200
Subject: [OpenWrt-Devel] [PATCH] [ar71xx] add Netgear WNR1000v2/WNR1000v2-VC
	support (#18633)
Message-ID: <54CA9DB9.6020205@gmail.com>

From: ?tefan Rusu <saltwaterc at gmail.com>

ar71xx: add Netgear WNR1000v2/WNR1000v2-VC support (#18633)

The board is already supported by OpenWrt. WNR1000v2/WNR1000v2-VC are
pretty much the same as WNR2000v3/WNR612v2, therefore the same
initialization code and flash layout is used.

Signed-off-by: ?tefan Rusu <saltwaterc at gmail.com>
Tested-by: Douglas Fraser <1dsfraser at gmail.com>
---
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
index 444e6ff..af6107b 100755
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -281,7 +281,8 @@ get_status_led() {
 	wndr4300 | \
 	wnr2000 | \
 	wnr2200 |\
-	wnr612-v2)
+	wnr612-v2 |\
+	wnr1000-v2)
 		status_led="netgear:green:power"
 		;;
 	wp543)
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index 5f1704f..a223ae8 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -223,7 +223,8 @@ tl-wr842n-v2 |\
 wnr2000-v3 |\
 wnr2000-v4 |\
 wnr2200 |\
-wnr612-v2)
+wnr612-v2 |\
+wnr1000-v2)
 	ucidef_set_interfaces_lan_wan "eth1" "eth0"
 	ucidef_add_switch "switch0" "1" "1"
 	ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/04_led_migration b/target/linux/ar71xx/base-files/etc/uci-defaults/04_led_migration
index 1cef8b9..d578f59 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/04_led_migration
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/04_led_migration
@@ -77,6 +77,10 @@ wnr612-v2)
 	migrate_leds "wnr612v2:=netgear:"
 	;;
 
+wnr1000-v2)
+	migrate_leds "wnr1000v2:=netgear:"
+	;;
+
 *)
 	;;
 esac
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 14ee68b..02872de 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -780,6 +780,9 @@ ar71xx_board_detect() {
 	*"WNR612 V2")
 		name="wnr612-v2"
 		;;
+	*"WNR1000 V2")
+		name="wnr1000-v2"
+		;;
 	*WRT160NL)
 		name="wrt160nl"
 		;;
diff --git a/target/linux/ar71xx/base-files/lib/preinit/05_set_preinit_iface_ar71xx b/target/linux/ar71xx/base-files/lib/preinit/05_set_preinit_iface_ar71xx
index a9a8794..f11ea8c 100644
--- a/target/linux/ar71xx/base-files/lib/preinit/05_set_preinit_iface_ar71xx
+++ b/target/linux/ar71xx/base-files/lib/preinit/05_set_preinit_iface_ar71xx
@@ -38,6 +38,7 @@ set_preinit_iface() {
 	wnr2000-v3 |\
 	wnr2200 |\
 	wnr612-v2 |\
+	wnr1000-v2 |\
 	wpe72)
 		ifname=eth1
 		;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 391299f..bc6866d 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -379,7 +379,8 @@ platform_check_image() {
 		;;
 	wndr3700 | \
 	wnr2000-v3 | \
-	wnr612-v2)
+	wnr612-v2 | \
+	wnr1000-v2)
 		local hw_magic
 
 		hw_magic="$(ar71xx_get_mtd_part_magic firmware)"
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c
index 6acd991..2e14782 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c
@@ -1,5 +1,5 @@
 /*
- *  NETGEAR WNR2000v3 board support
+ *  NETGEAR WNR2000v3/WNR612v2/WNR1000v2 board support
  *
  *  Copytight (C) 2013 Mathieu Olivari <mathieu.olivari at gmail.com>
  *  Copyright (C) 2008-2009 Gabor Juhos <juhosg at openwrt.org>
@@ -31,6 +31,9 @@
 
 #define WNR612V2_GPIO_LED_PWR_GREEN	11
 
+#define WNR1000V2_GPIO_LED_PWR_AMBER	1
+#define WNR1000V2_GPIO_LED_PWR_GREEN	11
+
 #define WNR2000V3_KEYS_POLL_INTERVAL	20	/* msecs */
 #define WNR2000V3_KEYS_DEBOUNCE_INTERVAL	(3 * WNR2000V3_KEYS_POLL_INTERVAL)
 
@@ -58,6 +61,18 @@ static struct gpio_led wnr612v2_leds_gpio[] __initdata = {
 	}
 };
 
+static struct gpio_led wnr1000v2_leds_gpio[] __initdata = {
+	{
+		.name		= "netgear:green:power",
+		.gpio		= WNR1000V2_GPIO_LED_PWR_GREEN,
+		.active_low	= 1,
+	}, {
+		.name		= "netgear:amber:power",
+		.gpio		= WNR1000V2_GPIO_LED_PWR_AMBER,
+		.active_low	= 1,
+	}
+};
+
 static struct gpio_keys_button wnr2000v3_gpio_keys[] __initdata = {
 	{
 		.desc		= "wps",
@@ -113,3 +128,13 @@ static void __init wnr612v2_setup(void)
 }
 
 MIPS_MACHINE(ATH79_MACH_WNR612_V2, "WNR612V2", "NETGEAR WNR612 V2", wnr612v2_setup);
+
+static void __init wnr1000v2_setup(void)
+{
+	wnr_common_setup();
+
+	ath79_register_leds_gpio(-1, ARRAY_SIZE(wnr1000v2_leds_gpio),
+				 wnr1000v2_leds_gpio);
+}
+
+MIPS_MACHINE(ATH79_MACH_WNR1000_V2, "WNR1000V2", "NETGEAR WNR1000 V2", wnr1000v2_setup);
diff --git a/target/linux/ar71xx/generic/profiles/netgear.mk b/target/linux/ar71xx/generic/profiles/netgear.mk
index e8a2a3f..16b1087 100644
--- a/target/linux/ar71xx/generic/profiles/netgear.mk
+++ b/target/linux/ar71xx/generic/profiles/netgear.mk
@@ -62,6 +62,17 @@ endef
 $(eval $(call Profile,WNR612V2))
 
 
+define Profile/WNR1000V2
+	NAME:=NETGEAR WNR1000V2
+endef
+
+define Profile/WNR1000V2/Description
+	Package set optimized for the NETGEAR WNR1000V2
+endef
+
+$(eval $(call Profile,WNR1000V2))
+
+
 define Profile/WNR2200
 	NAME:=NETGEAR WNR2200
 endef
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
index ec6330f..f7b8381 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -1323,6 +1323,8 @@ $(eval $(call SingleProfile,NetgearLzma,64kraw,WNR2000V4,wnr2000v4,WNR2000V4,tty
 $(eval $(call SingleProfile,Netgear,64kraw,WNR2200,wnr2200,WNR2200,ttyS0,115200,$$(wnr2200_mtdlayout),0x32323030,WNR2200,"" NA,))
 $(eval $(call SingleProfile,Netgear,64kraw,REALWNR612V2,wnr612v2,WNR612V2,ttyS0,115200,$$(wnr2000v3_mtdlayout),0x32303631,WNR612V2,"",))
 $(eval $(call SingleProfile,Netgear,64kraw,N150R,n150r,WNR612V2,ttyS0,115200,$$(wnr2000v3_mtdlayout),0x32303631,N150R,"",))
+$(eval $(call SingleProfile,Netgear,64kraw,REALWNR1000V2,wnr1000v2,WNR1000V2,ttyS0,115200,$$(wnr2000v3_mtdlayout),0x31303031,WNR1000V2,"",))
+$(eval $(call SingleProfile,Netgear,64kraw,WNR1000V2_VC,wnr1000v2-vc,WNR1000V2,ttyS0,115200,$$(wnr2000v3_mtdlayout),0x31303030,WNR1000V2-VC,"",))
 
 $(eval $(call SingleProfile,OpenMesh,squashfs-only,OM2P,om2p,,,,OM2P))
 $(eval $(call SingleProfile,OpenMesh,squashfs-only,OM5P,om5p,,,,OM5P))
@@ -1494,6 +1496,7 @@ $(eval $(call MultiProfile,TLWDR4300,TLWDR3500V1 TLWDR3600V1 TLWDR4300V1 TLWDR43
 $(eval $(call MultiProfile,TUBE2H,TUBE2H8M TUBE2H16M))
 $(eval $(call MultiProfile,UBNT,UBNTAIRROUTER UBNTRS UBNTRSPRO UBNTLSSR71 UBNTBULLETM UBNTROCKETM UBNTNANOM UBNTNANOMXW UBNTLOCOXW UBNTUNIFI UBNTUNIFIOUTDOOR UBNTUNIFIOUTDOORPLUS UAPPRO UBNTAIRGW))
 $(eval $(call MultiProfile,WNR612V2,REALWNR612V2 N150R))
+$(eval $(call MultiProfile,WNR1000V2,REALWNR1000V2 WNR1000V2_VC))
 $(eval $(call MultiProfile,WP543,WP543_2M WP543_4M WP543_8M WP543_16M))
 $(eval $(call MultiProfile,WPE72,WPE72_4M WPE72_8M WPE72_16M))
 
diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c
index 7dad63c..1df0ac1 100644
--- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c
+++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_uimage.c
@@ -233,6 +233,8 @@ static struct mtd_part_parser uimage_generic_parser = {
 #define FW_MAGIC_WNR2000V4	0x32303034
 #define FW_MAGIC_WNR2200	0x32323030
 #define FW_MAGIC_WNR612V2	0x32303631
+#define FW_MAGIC_WNR1000V2	0x31303031
+#define FW_MAGIC_WNR1000V2_VC	0x31303030
 #define FW_MAGIC_WNDR3700	0x33373030
 #define FW_MAGIC_WNDR3700V2	0x33373031
 
@@ -241,6 +243,8 @@ static bool uimage_verify_wndr3700(struct uimage_header *header)
 	uint8_t expected_type = IH_TYPE_FILESYSTEM;
 	switch be32_to_cpu(header->ih_magic) {
 	case FW_MAGIC_WNR612V2:
+	case FW_MAGIC_WNR1000V2:
+	case FW_MAGIC_WNR1000V2_VC:
 	case FW_MAGIC_WNR2000V3:
 	case FW_MAGIC_WNR2200:
 	case FW_MAGIC_WNDR3700:

diff --git a/target/linux/ar71xx/patches-3.14/617-MIPS-ath79-WNR1000v2-support.patch b/target/linux/ar71xx/patches-3.14/617-MIPS-ath79-WNR1000v2-support.patch
new file mode 100644
index 0000000..2f4aabe
--- /dev/null
+++ b/target/linux/ar71xx/patches-3.14/617-MIPS-ath79-WNR1000v2-support.patch
@@ -0,0 +1,21 @@
+--- a/arch/mips/ath79/Kconfig
++++ b/arch/mips/ath79/Kconfig
+@@ -567,7 +567,7 @@ config ATH79_MACH_WNR2000
+ 	select ATH79_DEV_WMAC
+ 
+ config ATH79_MACH_WNR2000_V3
+-	bool "NETGEAR WNR2000 V3/WNR612 v2 board support"
++	bool "NETGEAR WNR2000 V3/WNR612 v2/WNR1000 v2 board support"
+ 	select SOC_AR724X
+ 	select ATH79_DEV_AP9X_PCI if PCI
+ 	select ATH79_DEV_ETH
+--- a/arch/mips/ath79/machtypes.h
++++ b/arch/mips/ath79/machtypes.h
+@@ -173,6 +173,7 @@ enum ath79_mach_type {
+ 	ATH79_MACH_WNR2000_V3,		/* NETGEAR WNR2000 v3 */
+ 	ATH79_MACH_WNR2200,		/* NETGEAR WNR2200 */
+ 	ATH79_MACH_WNR612_V2,		/* NETGEAR WNR612 v2 */
++	ATH79_MACH_WNR1000_V2,		/* NETGEAR WNR1000 v2 */
+ 	ATH79_MACH_WP543,		/* Compex WP543 */
+ 	ATH79_MACH_WPE72,		/* Compex WPE72 */
+ 	ATH79_MACH_WRT160NL,		/* Linksys WRT160NL */
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From fl.service at t-firefly.com  Fri Jan 30 02:19:12 2015
From: fl.service at t-firefly.com (wengbj)
Date: Fri, 30 Jan 2015 15:19:12 +0800
Subject: [OpenWrt-Devel] [PATCH 1/3] ralink: add ethernet macaddr to dts for
	FireWRT
Message-ID: <1422602354-23358-1-git-send-email-fl.service@t-firefly.com>

---
 .../linux/ramips/base-files/etc/board.d/02_network |    7 +++++++
 target/linux/ramips/dts/FIREWRT.dts                |    5 +++++
 2 files changed, 12 insertions(+)

diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
index 7724c3e..dcb497a 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -340,6 +340,13 @@ ramips_setup_macs()
 		wan_mac=$(mtd_get_mac_binary factory 46)
 		;;
 
+	firewrt)
+		wan_mac=$(mtd_get_mac_binary factory 57350)
+		lan_mac=$(mtd_get_mac_binary factory 57344)
+		[ "${lan_mac}x" = "ff:ff:ff:ff:ff:ffx" ] && lan_mac=$(cat /sys/class/net/eth0/address)
+		[ "${wan_mac}x" = "ff:ff:ff:ff:ff:ffx" ] && wan_mac=$(macaddr_add "$lan_mac" 1)
+		;;
+
 	*)
 		lan_mac=$(cat /sys/class/net/eth0/address)
 		wan_mac=$(macaddr_add "$lan_mac" 1)
diff --git a/target/linux/ramips/dts/FIREWRT.dts b/target/linux/ramips/dts/FIREWRT.dts
index 2e5d26b..4e9e28b 100644
--- a/target/linux/ramips/dts/FIREWRT.dts
+++ b/target/linux/ramips/dts/FIREWRT.dts
@@ -78,4 +78,9 @@
 			};
 		};
 	};
+
+	ethernet at 1e100000 {
+		mtd-mac-address = <&factory 0xe000>;
+	};
+
 };
-- 
1.7.9.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From fl.service at t-firefly.com  Fri Jan 30 02:19:13 2015
From: fl.service at t-firefly.com (wengbj)
Date: Fri, 30 Jan 2015 15:19:13 +0800
Subject: [OpenWrt-Devel] [PATCH 2/3] ralink: add FireWRT led detail
In-Reply-To: <1422602354-23358-1-git-send-email-fl.service@t-firefly.com>
References: <1422602354-23358-1-git-send-email-fl.service@t-firefly.com>
Message-ID: <1422602354-23358-2-git-send-email-fl.service@t-firefly.com>

---
 target/linux/ramips/dts/FIREWRT.dts |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/target/linux/ramips/dts/FIREWRT.dts b/target/linux/ramips/dts/FIREWRT.dts
index 4e9e28b..ddad8bf 100644
--- a/target/linux/ramips/dts/FIREWRT.dts
+++ b/target/linux/ramips/dts/FIREWRT.dts
@@ -83,4 +83,13 @@
 		mtd-mac-address = <&factory 0xe000>;
 	};
 
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		power {
+			label = "buffalo:green:power";
+			gpios = <&gpio0 22 1>;
+		};
+	};
+
 };
-- 
1.7.9.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From fl.service at t-firefly.com  Fri Jan 30 02:19:14 2015
From: fl.service at t-firefly.com (wengbj)
Date: Fri, 30 Jan 2015 15:19:14 +0800
Subject: [OpenWrt-Devel] [PATCH 3/3] ralink: add FireWRT button detail
In-Reply-To: <1422602354-23358-1-git-send-email-fl.service@t-firefly.com>
References: <1422602354-23358-1-git-send-email-fl.service@t-firefly.com>
Message-ID: <1422602354-23358-3-git-send-email-fl.service@t-firefly.com>

---
 target/linux/ramips/dts/FIREWRT.dts            |   12 ++++++++++++
 target/linux/ramips/mt7621/profiles/firefly.mk |    2 +-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/target/linux/ramips/dts/FIREWRT.dts b/target/linux/ramips/dts/FIREWRT.dts
index ddad8bf..58049b7 100644
--- a/target/linux/ramips/dts/FIREWRT.dts
+++ b/target/linux/ramips/dts/FIREWRT.dts
@@ -92,4 +92,16 @@
 		};
 	};
 
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		wps {
+			label = "wps";
+			gpios = <&gpio0 18 1>;
+			linux,code = <0x211>;
+		};
+	};
+
 };
diff --git a/target/linux/ramips/mt7621/profiles/firefly.mk b/target/linux/ramips/mt7621/profiles/firefly.mk
index c8292b0..b095979 100644
--- a/target/linux/ramips/mt7621/profiles/firefly.mk
+++ b/target/linux/ramips/mt7621/profiles/firefly.mk
@@ -8,7 +8,7 @@
 define Profile/Firefly
 	NAME:=Firefly Device
 	PACKAGES:=\
-		kmod-usb-core kmod-usb3 kmod-usb-hid  kmod-usb-storage mount-utils usbutils \
+		kmod-usb-core kmod-usb3 kmod-usb-hid  kmod-usb-storage mount-utils usbutils hostapd-utils \
         kmod-sdhci-mt7620 \
 		kmod-fs-ext3 kmod-fs-vfat kmod-fs-ntfs \
 		kmod-nls-cp437 kmod-nls-iso8859-1 kmod-nls-utf8 \
-- 
1.7.9.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From yszhou4tech at gmail.com  Fri Jan 30 02:59:29 2015
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Fri, 30 Jan 2015 15:59:29 +0800
Subject: [OpenWrt-Devel] [PATCH 1/3] ralink: add ethernet macaddr to dts
 for FireWRT
In-Reply-To: <1422602354-23358-1-git-send-email-fl.service@t-firefly.com>
References: <1422602354-23358-1-git-send-email-fl.service@t-firefly.com>
Message-ID: <CAECwjAhTwP_GOHHZvkcFNW8nqtwY7AqqW7pKZu7pmhgCrSQ+7w@mail.gmail.com>

Hi,

On 30 January 2015 at 15:19, wengbj <fl.service at t-firefly.com> wrote:
> ---
>  .../linux/ramips/base-files/etc/board.d/02_network |    7 +++++++
>  target/linux/ramips/dts/FIREWRT.dts                |    5 +++++
>  2 files changed, 12 insertions(+)
>
> diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
> index 7724c3e..dcb497a 100755
> --- a/target/linux/ramips/base-files/etc/board.d/02_network
> +++ b/target/linux/ramips/base-files/etc/board.d/02_network
> @@ -340,6 +340,13 @@ ramips_setup_macs()
>                 wan_mac=$(mtd_get_mac_binary factory 46)
>                 ;;
>
> +       firewrt)
> +               wan_mac=$(mtd_get_mac_binary factory 57350)
> +               lan_mac=$(mtd_get_mac_binary factory 57344)
> +               [ "${lan_mac}x" = "ff:ff:ff:ff:ff:ffx" ] && lan_mac=$(cat /sys/class/net/eth0/address)
> +               [ "${wan_mac}x" = "ff:ff:ff:ff:ff:ffx" ] && wan_mac=$(macaddr_add "$lan_mac" 1)
> +               ;;
> +

This hunk should be unnecessary.  You can try remove this and see if
it can still get MAC address from offset 0xe000 of factory partition.

                yousong

>         *)
>                 lan_mac=$(cat /sys/class/net/eth0/address)
>                 wan_mac=$(macaddr_add "$lan_mac" 1)
> diff --git a/target/linux/ramips/dts/FIREWRT.dts b/target/linux/ramips/dts/FIREWRT.dts
> index 2e5d26b..4e9e28b 100644
> --- a/target/linux/ramips/dts/FIREWRT.dts
> +++ b/target/linux/ramips/dts/FIREWRT.dts
> @@ -78,4 +78,9 @@
>                         };
>                 };
>         };
> +
> +       ethernet at 1e100000 {
> +               mtd-mac-address = <&factory 0xe000>;
> +       };
> +
>  };
> --
> 1.7.9.5
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From yszhou4tech at gmail.com  Fri Jan 30 03:03:11 2015
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Fri, 30 Jan 2015 16:03:11 +0800
Subject: [OpenWrt-Devel] [PATCH 2/3] ralink: add FireWRT led detail
In-Reply-To: <1422602354-23358-2-git-send-email-fl.service@t-firefly.com>
References: <1422602354-23358-1-git-send-email-fl.service@t-firefly.com>
 <1422602354-23358-2-git-send-email-fl.service@t-firefly.com>
Message-ID: <CAECwjAicp374_EX9Hd7BYzM5YUXJDC5T1WzU_EEatGFokwJQYg@mail.gmail.com>

On 30 January 2015 at 15:19, wengbj <fl.service at t-firefly.com> wrote:
> ---
>  target/linux/ramips/dts/FIREWRT.dts |    9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/target/linux/ramips/dts/FIREWRT.dts b/target/linux/ramips/dts/FIREWRT.dts
> index 4e9e28b..ddad8bf 100644
> --- a/target/linux/ramips/dts/FIREWRT.dts
> +++ b/target/linux/ramips/dts/FIREWRT.dts
> @@ -83,4 +83,13 @@
>                 mtd-mac-address = <&factory 0xe000>;
>         };
>
> +       gpio-leds {
> +               compatible = "gpio-leds";
> +
> +               power {
> +                       label = "buffalo:green:power";

Label should be named properly.

> +                       gpios = <&gpio0 22 1>;
> +               };
> +       };
> +
>  };
> --
> 1.7.9.5
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From blogic at openwrt.org  Fri Jan 30 03:04:53 2015
From: blogic at openwrt.org (John Crispin)
Date: Fri, 30 Jan 2015 09:04:53 +0100
Subject: [OpenWrt-Devel] [PATCH 1/3] ralink: add ethernet macaddr to dts
 for FireWRT
In-Reply-To: <CAECwjAhTwP_GOHHZvkcFNW8nqtwY7AqqW7pKZu7pmhgCrSQ+7w@mail.gmail.com>
References: <1422602354-23358-1-git-send-email-fl.service@t-firefly.com>
 <CAECwjAhTwP_GOHHZvkcFNW8nqtwY7AqqW7pKZu7pmhgCrSQ+7w@mail.gmail.com>
Message-ID: <54CB3B25.6080000@openwrt.org>



On 30/01/2015 08:59, Yousong Zhou wrote:
> Hi,
> 
> On 30 January 2015 at 15:19, wengbj <fl.service at t-firefly.com> wrote:
>> ---
>>  .../linux/ramips/base-files/etc/board.d/02_network |    7 +++++++
>>  target/linux/ramips/dts/FIREWRT.dts                |    5 +++++
>>  2 files changed, 12 insertions(+)
>>
>> diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
>> index 7724c3e..dcb497a 100755
>> --- a/target/linux/ramips/base-files/etc/board.d/02_network
>> +++ b/target/linux/ramips/base-files/etc/board.d/02_network
>> @@ -340,6 +340,13 @@ ramips_setup_macs()
>>                 wan_mac=$(mtd_get_mac_binary factory 46)
>>                 ;;
>>
>> +       firewrt)
>> +               wan_mac=$(mtd_get_mac_binary factory 57350)
>> +               lan_mac=$(mtd_get_mac_binary factory 57344)
>> +               [ "${lan_mac}x" = "ff:ff:ff:ff:ff:ffx" ] && lan_mac=$(cat /sys/class/net/eth0/address)
>> +               [ "${wan_mac}x" = "ff:ff:ff:ff:ff:ffx" ] && wan_mac=$(macaddr_add "$lan_mac" 1)
>> +               ;;
>> +
> 
> This hunk should be unnecessary.  You can try remove this and see if
> it can still get MAC address from offset 0xe000 of factory partition.
> 
>                 yousong
> 

i agree, this is a work around for boards that have not passed the mfg
process yet.







>>         *)
>>                 lan_mac=$(cat /sys/class/net/eth0/address)
>>                 wan_mac=$(macaddr_add "$lan_mac" 1)
>> diff --git a/target/linux/ramips/dts/FIREWRT.dts b/target/linux/ramips/dts/FIREWRT.dts
>> index 2e5d26b..4e9e28b 100644
>> --- a/target/linux/ramips/dts/FIREWRT.dts
>> +++ b/target/linux/ramips/dts/FIREWRT.dts
>> @@ -78,4 +78,9 @@
>>                         };
>>                 };
>>         };
>> +
>> +       ethernet at 1e100000 {
>> +               mtd-mac-address = <&factory 0xe000>;
>> +       };
>> +
>>  };
>> --
>> 1.7.9.5
>> _______________________________________________
>> openwrt-devel mailing list
>> openwrt-devel at lists.openwrt.org
>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From blogic at openwrt.org  Fri Jan 30 03:08:11 2015
From: blogic at openwrt.org (John Crispin)
Date: Fri, 30 Jan 2015 09:08:11 +0100
Subject: [OpenWrt-Devel] [PATCH 1/3] ralink: add ethernet macaddr to dts
 for FireWRT
In-Reply-To: <1422602354-23358-1-git-send-email-fl.service@t-firefly.com>
References: <1422602354-23358-1-git-send-email-fl.service@t-firefly.com>
Message-ID: <54CB3BEB.3010602@openwrt.org>

also the Signed-off-by line is missing from all 3 patches



On 30/01/2015 08:19, wengbj wrote:
> --- .../linux/ramips/base-files/etc/board.d/02_network |    7
> +++++++ target/linux/ramips/dts/FIREWRT.dts                |    5
> +++++ 2 files changed, 12 insertions(+)
> 
> diff --git a/target/linux/ramips/base-files/etc/board.d/02_network
> b/target/linux/ramips/base-files/etc/board.d/02_network index
> 7724c3e..dcb497a 100755 ---
> a/target/linux/ramips/base-files/etc/board.d/02_network +++
> b/target/linux/ramips/base-files/etc/board.d/02_network @@ -340,6
> +340,13 @@ ramips_setup_macs() wan_mac=$(mtd_get_mac_binary factory
> 46) ;;
> 
> +	firewrt) +		wan_mac=$(mtd_get_mac_binary factory 57350) +
> lan_mac=$(mtd_get_mac_binary factory 57344) +		[ "${lan_mac}x" =
> "ff:ff:ff:ff:ff:ffx" ] && lan_mac=$(cat
> /sys/class/net/eth0/address) +		[ "${wan_mac}x" =
> "ff:ff:ff:ff:ff:ffx" ] && wan_mac=$(macaddr_add "$lan_mac" 1) +
> ;; + *) lan_mac=$(cat /sys/class/net/eth0/address) 
> wan_mac=$(macaddr_add "$lan_mac" 1) diff --git
> a/target/linux/ramips/dts/FIREWRT.dts
> b/target/linux/ramips/dts/FIREWRT.dts index 2e5d26b..4e9e28b
> 100644 --- a/target/linux/ramips/dts/FIREWRT.dts +++
> b/target/linux/ramips/dts/FIREWRT.dts @@ -78,4 +78,9 @@ }; }; }; + 
> +	ethernet at 1e100000 { +		mtd-mac-address = <&factory 0xe000>; +	}; 
> + };
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From fl.service at t-firefly.com  Fri Jan 30 03:22:28 2015
From: fl.service at t-firefly.com (fl.service at t-firefly.com)
Date: Fri, 30 Jan 2015 16:22:28 +0800
Subject: [OpenWrt-Devel] [PATCH 1/3] ralink: add ethernet macaddr to dts
	for FireWRT
References: <1422602354-23358-1-git-send-email-fl.service@t-firefly.com>, 
 <CAECwjAhTwP_GOHHZvkcFNW8nqtwY7AqqW7pKZu7pmhgCrSQ+7w@mail.gmail.com>
Message-ID: <201501301622245179669@t-firefly.com>

Dear sir:
    i know remove those follow line still can get MAC address form offset 0xe000 .
      But according to MTK original SDK . The lan port mac address should write at 0xe000 and the wan port MAC address should be write at 0xe006.And i dont konw how to define in the dts file.

    This two line is exactly what i want :
        wan_mac=$(mtd_get_mac_binary factory 57350)
          lan_mac=$(mtd_get_mac_binary factory 57344)

    Do i need to remove this ?



Best Regards.
Jay Weng

Website:  www.t-firefly.com
E-mail:  fl.service at t-firefly.com
 
From: Yousong Zhou
Date: 2015-01-30 15:59
To: wengbj
CC: John Crispin; zxf; linux.c; dxj; wbj; OpenWrt Development List
Subject: Re: [OpenWrt-Devel] [PATCH 1/3] ralink: add ethernet macaddr to dts for FireWRT
Hi,
 
On 30 January 2015 at 15:19, wengbj <fl.service at t-firefly.com> wrote:
> ---
>  .../linux/ramips/base-files/etc/board.d/02_network |    7 +++++++
>  target/linux/ramips/dts/FIREWRT.dts                |    5 +++++
>  2 files changed, 12 insertions(+)
>
> diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
> index 7724c3e..dcb497a 100755
> --- a/target/linux/ramips/base-files/etc/board.d/02_network
> +++ b/target/linux/ramips/base-files/etc/board.d/02_network
> @@ -340,6 +340,13 @@ ramips_setup_macs()
>                 wan_mac=$(mtd_get_mac_binary factory 46)
>                 ;;
>
> +       firewrt)
> +               wan_mac=$(mtd_get_mac_binary factory 57350)
> +               lan_mac=$(mtd_get_mac_binary factory 57344)
> +               [ "${lan_mac}x" = "ff:ff:ff:ff:ff:ffx" ] && lan_mac=$(cat /sys/class/net/eth0/address)
> +               [ "${wan_mac}x" = "ff:ff:ff:ff:ff:ffx" ] && wan_mac=$(macaddr_add "$lan_mac" 1)
> +               ;;
> +
 
This hunk should be unnecessary.  You can try remove this and see if
it can still get MAC address from offset 0xe000 of factory partition.
 
                yousong
 
>         *)
>                 lan_mac=$(cat /sys/class/net/eth0/address)
>                 wan_mac=$(macaddr_add "$lan_mac" 1)
> diff --git a/target/linux/ramips/dts/FIREWRT.dts b/target/linux/ramips/dts/FIREWRT.dts
> index 2e5d26b..4e9e28b 100644
> --- a/target/linux/ramips/dts/FIREWRT.dts
> +++ b/target/linux/ramips/dts/FIREWRT.dts
> @@ -78,4 +78,9 @@
>                         };
>                 };
>         };
> +
> +       ethernet at 1e100000 {
> +               mtd-mac-address = <&factory 0xe000>;
> +       };
> +
>  };
> --
> 1.7.9.5
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150130/dc29eb6f/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 15484_15484_logo_mini(01-06-16-45-51).jpg
Type: image/jpeg
Size: 15484 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150130/dc29eb6f/attachment.jpg>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From wigyori at uid0.hu  Fri Jan 30 03:55:56 2015
From: wigyori at uid0.hu (Zoltan HERPAI)
Date: Fri, 30 Jan 2015 09:55:56 +0100
Subject: [OpenWrt-Devel] [PATCH 7/8] sunxi: add support for Lamobo R1
In-Reply-To: <20150118234013.GA4984@makrotopia.org>
References: <20150118234013.GA4984@makrotopia.org>
Message-ID: <54CB471C.4070906@uid0.hu>

Hi Daniel,

Daniel Golle wrote:
> Partially based on patchset form Wang Yi <wangyi8848 at gmail.com> published
> on https://github.com/Lamobo/Lamobo-R1-OpenWrt as well as on Bananapi DTS.
>
> Signed-off-by: Daniel Golle <daniel at makrotopia.org>
> ---
>   
I've added the missing patches in r44211-44216, with one small change in 
the network script to fix the network on the A13 Olinuxino Micros 
(olinuxino-micro), leaving the rest of the Olimex boards 
(olinuxino-lime) to use eth0 as default.

Thanks for the series.

Regards,
Zoltan H
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From fl.service at t-firefly.com  Fri Jan 30 04:04:28 2015
From: fl.service at t-firefly.com (wengbj)
Date: Fri, 30 Jan 2015 17:04:28 +0800
Subject: [OpenWrt-Devel] [PATCH 1/3] ralink: add ethernet macaddr to dts for
	FireWRT
Message-ID: <1422608670-8506-1-git-send-email-fl.service@t-firefly.com>

---
 target/linux/ramips/dts/FIREWRT.dts |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/target/linux/ramips/dts/FIREWRT.dts b/target/linux/ramips/dts/FIREWRT.dts
index 2e5d26b..4e9e28b 100644
--- a/target/linux/ramips/dts/FIREWRT.dts
+++ b/target/linux/ramips/dts/FIREWRT.dts
@@ -78,4 +78,9 @@
 			};
 		};
 	};
+
+	ethernet at 1e100000 {
+		mtd-mac-address = <&factory 0xe000>;
+	};
+
 };
-- 
1.7.9.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From fl.service at t-firefly.com  Fri Jan 30 04:04:29 2015
From: fl.service at t-firefly.com (wengbj)
Date: Fri, 30 Jan 2015 17:04:29 +0800
Subject: [OpenWrt-Devel] [PATCH 2/3] ralink: add FireWRT led detail
In-Reply-To: <1422608670-8506-1-git-send-email-fl.service@t-firefly.com>
References: <1422608670-8506-1-git-send-email-fl.service@t-firefly.com>
Message-ID: <1422608670-8506-2-git-send-email-fl.service@t-firefly.com>

---
 target/linux/ramips/dts/FIREWRT.dts |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/target/linux/ramips/dts/FIREWRT.dts b/target/linux/ramips/dts/FIREWRT.dts
index 4e9e28b..faebe2f 100644
--- a/target/linux/ramips/dts/FIREWRT.dts
+++ b/target/linux/ramips/dts/FIREWRT.dts
@@ -83,4 +83,13 @@
 		mtd-mac-address = <&factory 0xe000>;
 	};
 
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		power {
+			label = "firewrt:green:power";
+			gpios = <&gpio0 22 1>;
+		};
+	};
+
 };
-- 
1.7.9.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From fl.service at t-firefly.com  Fri Jan 30 04:04:30 2015
From: fl.service at t-firefly.com (wengbj)
Date: Fri, 30 Jan 2015 17:04:30 +0800
Subject: [OpenWrt-Devel] [PATCH 3/3] ralink: add FireWRT button detail
In-Reply-To: <1422608670-8506-1-git-send-email-fl.service@t-firefly.com>
References: <1422608670-8506-1-git-send-email-fl.service@t-firefly.com>
Message-ID: <1422608670-8506-3-git-send-email-fl.service@t-firefly.com>

---
 target/linux/ramips/dts/FIREWRT.dts            |   12 ++++++++++++
 target/linux/ramips/mt7621/profiles/firefly.mk |    2 +-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/target/linux/ramips/dts/FIREWRT.dts b/target/linux/ramips/dts/FIREWRT.dts
index faebe2f..f22c885 100644
--- a/target/linux/ramips/dts/FIREWRT.dts
+++ b/target/linux/ramips/dts/FIREWRT.dts
@@ -92,4 +92,16 @@
 		};
 	};
 
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		wps {
+			label = "wps";
+			gpios = <&gpio0 18 1>;
+			linux,code = <0x211>;
+		};
+	};
+
 };
diff --git a/target/linux/ramips/mt7621/profiles/firefly.mk b/target/linux/ramips/mt7621/profiles/firefly.mk
index c8292b0..b095979 100644
--- a/target/linux/ramips/mt7621/profiles/firefly.mk
+++ b/target/linux/ramips/mt7621/profiles/firefly.mk
@@ -8,7 +8,7 @@
 define Profile/Firefly
 	NAME:=Firefly Device
 	PACKAGES:=\
-		kmod-usb-core kmod-usb3 kmod-usb-hid  kmod-usb-storage mount-utils usbutils \
+		kmod-usb-core kmod-usb3 kmod-usb-hid  kmod-usb-storage mount-utils usbutils hostapd-utils \
         kmod-sdhci-mt7620 \
 		kmod-fs-ext3 kmod-fs-vfat kmod-fs-ntfs \
 		kmod-nls-cp437 kmod-nls-iso8859-1 kmod-nls-utf8 \
-- 
1.7.9.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From dkmod01 at hotmail.com  Fri Jan 30 05:42:51 2015
From: dkmod01 at hotmail.com (Dierk Modrow)
Date: Fri, 30 Jan 2015 11:42:51 +0100
Subject: [OpenWrt-Devel] UDAP-Protocol Broadcast-Handling with Relayd
Message-ID: <COL131-W7965A4A0B32F10E567B7BEA7310@phx.gbl>




	
	
	
	


I try to implement an UDAP
configuration server (legacy protocol to replace an old embedded
wireless client bridge) for a wireless client bridge based on a
Gateworks Ventana board running OpenWrt trunk with ATH9K WLAN nic.
The Openwrt solution uses relayd for
pseudo bridging between WLAN and LAN because true transparent
bridging between WLAN (in infrastructure mode) and ethernet interface
is only possible with 4 address mode of MAC80211 which is not
standardized in IEEE802.11 (can only be used with certain access
points)



Problem is now emulating a real
bridging behaviour for incoming broadcasts with destination port of
UDAP protocol. The server should respond with bridge's own source IP
to global broadcast address on both interfaces LAN & WLAN. For
the relayd solution this should be the WLAN interface's IP.



IP settings: Wlan0 has
192.168.2.100/24, eth0 has 192.168.254.254/24



Short description:
The UDAP protocol uses UDP frames
	with server destination port 17784.
	The UDAP client can send frames to
	IP address of the server. Reply is done with unicast frame
	The UDAP client can send frames to
	general broadcast address (255.255.255.255). The server should also
	reply to the general broadcast address. So UDAP protocol can also be
	used to scan a client bridge or change it's IP configuration if it's
	IP resides in another subnet then the UDAP client.
	UDAP client (a Windows PC, PLC,
	etc.) may reside either on the LAN or the WLAN side of the bridge.
	On both sides only one Wlan0-IP should be visible.




Results of my test implementation of
UDAP on OpenWRT using a simple AFINET UDP socket:



Using the IP unicast destination
	address of the server IP-Wlan0 works fine for both UDAP client
	locations (LAN / WLAN)
	Sending to general broadcast
	server address from WLAN side ->request is received but reply to
	global broadcast address by calling sendto is denied with
	ENETUNREACH.
Reply to the broadcast address 192.168.2.255 worked
	fine but violates requirement 3.
Next trial was using setsockopt
	with option SOL_SOCKET,SO_BINDTODEVICE to temporarily bind to wlan0
	interface before sendto to general broadcast address ? This worked
	fine
	Sending to general broadcast
	server address from LAN side ->request is received but reply to
	global broadcast address by calling sendto is denied with
	ENETUNREACH.
Reply to the broadcast address 192.168.254.255
	worked fine but violates requirement 3.
Next trial was using
	setsockopt with option SOL_SOCKET,SO_BINDTODEVICE to temporarily
	bind to eth0 interface before sendto to general broadcast address ?
	This worked but the source address of the response frame is
	192.168.254.254 (eth0's IP). Therefore the UDAP client on LAN side
	sees another IP address than a UDAP client on WLAN side.
Next I
	tried to source NAT with iptables to transform the source address to
	wlan0's IP:

iptables -t nat -A POSTROUTING -p udp ?sport
	17784 -o eth0 -s 192.168.254.254 -j SNAT ?to-source 192.168.2.100 
	




The source address is changed but
	unfortunately the source port of the frame was changed to 1024, then
	I changed the switch ?to-source 192.168.2.100:17784 ? No source
	natting occurred!  Is there any chance to configure iptables to only
	change the source IP and keeping the UDP source port?


	
So I have no idea howto achieve the
desired behaviour. Any help is appreciated!!
Regards,Dierk


 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150130/2f61e40a/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From yszhou4tech at gmail.com  Fri Jan 30 06:10:13 2015
From: yszhou4tech at gmail.com (Yousong Zhou)
Date: Fri, 30 Jan 2015 19:10:13 +0800
Subject: [OpenWrt-Devel] [PATCH 1/3] ralink: add ethernet macaddr to dts
 for FireWRT
In-Reply-To: <1422608670-8506-1-git-send-email-fl.service@t-firefly.com>
References: <1422608670-8506-1-git-send-email-fl.service@t-firefly.com>
Message-ID: <CAECwjAg3oYp7cJ_RCCnvj4RSWpHeuE8XPqisk_3WqcysPwi__w@mail.gmail.com>

Hi, wengbj

It's just that OpenWrt requires a Signed-off-by line for patches to be
accepted [1].  That line can be generated by option -s in command `git
format-patch -s ...'

 [1] https://dev.openwrt.org/wiki/SubmittingPatches

Regards

                yousong

On 30 January 2015 at 17:04, wengbj <fl.service at t-firefly.com> wrote:
> ---
>  target/linux/ramips/dts/FIREWRT.dts |    5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/target/linux/ramips/dts/FIREWRT.dts b/target/linux/ramips/dts/FIREWRT.dts
> index 2e5d26b..4e9e28b 100644
> --- a/target/linux/ramips/dts/FIREWRT.dts
> +++ b/target/linux/ramips/dts/FIREWRT.dts
> @@ -78,4 +78,9 @@
>                         };
>                 };
>         };
> +
> +       ethernet at 1e100000 {
> +               mtd-mac-address = <&factory 0xe000>;
> +       };
> +
>  };
> --
> 1.7.9.5
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From blogic at openwrt.org  Fri Jan 30 06:11:54 2015
From: blogic at openwrt.org (John Crispin)
Date: Fri, 30 Jan 2015 12:11:54 +0100
Subject: [OpenWrt-Devel] [PATCH 1/3] ralink: add ethernet macaddr to dts
 for FireWRT
In-Reply-To: <CAECwjAg3oYp7cJ_RCCnvj4RSWpHeuE8XPqisk_3WqcysPwi__w@mail.gmail.com>
References: <1422608670-8506-1-git-send-email-fl.service@t-firefly.com>
 <CAECwjAg3oYp7cJ_RCCnvj4RSWpHeuE8XPqisk_3WqcysPwi__w@mail.gmail.com>
Message-ID: <54CB66FA.8050407@openwrt.org>



On 30/01/2015 12:10, Yousong Zhou wrote:
> Hi, wengbj
> 
> It's just that OpenWrt requires a Signed-off-by line for patches to
> be accepted [1].  That line can be generated by option -s in
> command `git format-patch -s ...'
> 
> [1] https://dev.openwrt.org/wiki/SubmittingPatches
> 
> Regards
> 
> yousong
> 

"git commit -s" will add it to the comit directl

	John


> On 30 January 2015 at 17:04, wengbj <fl.service at t-firefly.com>
> wrote:
>> --- target/linux/ramips/dts/FIREWRT.dts |    5 +++++ 1 file
>> changed, 5 insertions(+)
>> 
>> diff --git a/target/linux/ramips/dts/FIREWRT.dts
>> b/target/linux/ramips/dts/FIREWRT.dts index 2e5d26b..4e9e28b
>> 100644 --- a/target/linux/ramips/dts/FIREWRT.dts +++
>> b/target/linux/ramips/dts/FIREWRT.dts @@ -78,4 +78,9 @@ }; }; }; 
>> + +       ethernet at 1e100000 { +               mtd-mac-address =
>> <&factory 0xe000>; +       }; + }; -- 1.7.9.5 
>> _______________________________________________ openwrt-devel
>> mailing list openwrt-devel at lists.openwrt.org 
>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> _______________________________________________ openwrt-devel
> mailing list openwrt-devel at lists.openwrt.org 
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From ben.mulvihill at gmail.com  Fri Jan 30 07:42:36 2015
From: ben.mulvihill at gmail.com (Ben Mulvihill)
Date: Fri, 30 Jan 2015 13:42:36 +0100
Subject: [OpenWrt-Devel] [PATCH] uboot-lantiq: fix P-2812HNU-F1/3
 package dependency
In-Reply-To: <CACUy__WwJa0xy=bUT3m4xyUes_mqAoDH5wcSRGK0EOcvEYoekg@mail.gmail.com>
References: <1422190368-31840-1-git-send-email-a.seppala@gmail.com>
 <54C4FAF8.8050405@gmail.com>
 <CAKv9HNYs7SfBcR6n6O=DphpdTkweRROAbVfYwFfSkNa_DWPSyw@mail.gmail.com>
 <1422380504.19237.20.camel@merveille.lan>
 <CACUy__WwJa0xy=bUT3m4xyUes_mqAoDH5wcSRGK0EOcvEYoekg@mail.gmail.com>
Message-ID: <1422621756.2700.34.camel@merveille.lan>


> 
> the NAND boot does not work yet. I was not able to make it work with a
> SPL only because the BootROM only reads the first page. The Lantiq UGW
> U-Boot uses a very small pre-loader which loads another pre-loader and
> fits in the first page. Thus we need to convert to SPL/TPL support
> from mainline U-Boot. But I hadn't enough time yet to work on it.

I see. But is that the case with all lantiq nand boards? Do they all 
have the same bootrom? By the looks of it they don't all have the same
page size (HH3A has 512 byte, P-2812HNU has 2K).

Having read your explanation, I guess that I was in fact replacing just
the actual uboot part. I left the pre-boot partition intact, and I
suppose that contains the pre-pre-loader and the pre-loader. However
my uboot image was trying to do all the low-level initialisation, which
had already been done. So maybe I could forget about spl, and simply use
the factory preloaders to boot a uboot image which skips the low level
stuff. What do you think?
 
> >
> > Then the ebu configuration word needs to be set in the nandspl
> > image, as it is for norspl. Once again, the following fixed that
> > for arx100, and I think something similar will be required for danube
> > and vrx200.
> 
> actually the BootROM should correctly configure the EBU to be able to
> read at least the first page from NAND flash. The XWAY_EBU_BOOTCFG is
> only used for parallel NOR to setup various command timings and
> delays.

I did a hex dump of the factory uboot on the HH3A, and it does have
XWAY_EBU_BOOTCFG at location 0x10. I tried my own builds with this and
without. Without it the board reboots immediately, with it it hangs.

Thanks,

Ben
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From daniel.schwierzeck at gmail.com  Fri Jan 30 08:51:13 2015
From: daniel.schwierzeck at gmail.com (Daniel Schwierzeck)
Date: Fri, 30 Jan 2015 14:51:13 +0100
Subject: [OpenWrt-Devel] [PATCH] uboot-lantiq: fix P-2812HNU-F1/3
 package dependency
In-Reply-To: <1422621756.2700.34.camel@merveille.lan>
References: <1422190368-31840-1-git-send-email-a.seppala@gmail.com>	
 <54C4FAF8.8050405@gmail.com>	
 <CAKv9HNYs7SfBcR6n6O=DphpdTkweRROAbVfYwFfSkNa_DWPSyw@mail.gmail.com>	
 <1422380504.19237.20.camel@merveille.lan>	
 <CACUy__WwJa0xy=bUT3m4xyUes_mqAoDH5wcSRGK0EOcvEYoekg@mail.gmail.com>
 <1422621756.2700.34.camel@merveille.lan>
Message-ID: <54CB8C51.5050908@gmail.com>



Am 30.01.2015 um 13:42 schrieb Ben Mulvihill:
> 
>>
>> the NAND boot does not work yet. I was not able to make it work with a
>> SPL only because the BootROM only reads the first page. The Lantiq UGW
>> U-Boot uses a very small pre-loader which loads another pre-loader and
>> fits in the first page. Thus we need to convert to SPL/TPL support
>> from mainline U-Boot. But I hadn't enough time yet to work on it.
> 
> I see. But is that the case with all lantiq nand boards? Do they all 
> have the same bootrom? By the looks of it they don't all have the same
> page size (HH3A has 512 byte, P-2812HNU has 2K).
> 
> Having read your explanation, I guess that I was in fact replacing just
> the actual uboot part. I left the pre-boot partition intact, and I
> suppose that contains the pre-pre-loader and the pre-loader. However
> my uboot image was trying to do all the low-level initialisation, which
> had already been done. So maybe I could forget about spl, and simply use
> the factory preloaders to boot a uboot image which skips the low level
> stuff. What do you think?

yes, It's the best you can do atm. Some Arcadyan boards also do this.
Just look for the *_brn configs. The relevant U-Boot config option is
CONFIG_SKIP_LOWLEVEL_INIT.

-- 
- Daniel
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From champetier.etienne at gmail.com  Fri Jan 30 12:02:30 2015
From: champetier.etienne at gmail.com (Etienne Champetier)
Date: Fri, 30 Jan 2015 18:02:30 +0100
Subject: [OpenWrt-Devel] hardened openwrt & luci
Message-ID: <CAOdf3gpSjL2+yVPR1WfD3RgzWyR14KtTVEa1pVX1LqWGFM50wQ@mail.gmail.com>

Hi

I've tested yesterday Openwrt CC (r44203) with all hardening options on
PKG_CC_STACKPROTECTOR_STRONG
KERNEL_CC_STACKPROTECTOR_STRONG
PKG_FORTIFY_SOURCE_2
PKG_RELRO_FULL

i've only done basic testing but it seems to work,
except luci which send me bad gatway.

I've seen some relro patches by jow, and was wondering what's the status of
this?
(i'm running openwrt on an ubnt rspro/ar71xx)

side note, doing an strace of uhttpd
open("/tmp/openwrt-cc/build_dir/target-mips_34kc_uClibc-0.9.33.2/ubus-2015-01-22/lua/../libubus.so",
O_RDONLY) = -1 ENOENT (No such file or directory)
open("/tmp/openwrt-cc/build_dir/target-mips_34kc_uClibc-0.9.33.2/ubus-2015-01-22/libubus.so",
O_RDONLY) = -1 ENOENT (No such file or directory)
open("./libubus.so", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/lib/libubus.so", O_RDONLY) = 3
it's looking for the lib in the buildroot path

Thanks in advance
Etienne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150130/71ce1d2f/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: strace-uhttpd
Type: application/octet-stream
Size: 49263 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150130/71ce1d2f/attachment.obj>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From christian at m3hlis.de  Fri Jan 30 12:44:41 2015
From: christian at m3hlis.de (Christian Mehlis)
Date: Fri, 30 Jan 2015 18:44:41 +0100
Subject: [OpenWrt-Devel] Compex WPJ558 board support
Message-ID: <54CBC309.7080304@m3hlis.de>

Hi,

I did a port for the Compex WPJ558 and it's almost working completely.
It's booting up, ethernet, wifi and pci is working.

But I got some problems with the image structure.

This board seems to need a uImage instead of bin.lzma ?!

I found two ways of creating an image for this board:

     1) create 2 partitions with the compex image format: Linux is 
booting and rootfs is found, but sysupgrade won't work (because the 
compex sysupgrade handler writes on partition and the upgraded system 
lands in case 2)

     2) use the same way as the other compex boards and cat together the 
uImage and the rootfs.
        use one partition in the compex image with myloader: in this 
case the rootfs is not mountable.

[    0.750000] m25p80 spi0.0: found mx25l12805d, expected m25p80
[    0.750000] m25p80 spi0.0: mx25l12805d (16384 Kbytes)
[    0.760000] 7 cmdlinepart partitions found on MTD device spi0.0
[    0.760000] Creating 7 MTD partitions on "spi0.0":
[    0.770000] 0x000000000000-0x000000040000 : "u-boot"
[    0.780000] 0x000000040000-0x000000050000 : "u-boot-env"
[    0.780000] 0x000000050000-0x000000680000 : "rootfs"
[    0.790000] mtd: device 2 (rootfs) set to be root filesystem
[    0.790000] mtdsplit: no squashfs found in "rootfs"
[    0.800000] mtdsplit: no squashfs found in "spi0.0"
[    0.800000] 0x000000680000-0x0000007e0000 : "kernel"
[    0.810000] 0x0000007e0000-0x0000007f0000 : "nvram"
[    0.820000] 0x0000007f0000-0x000000800000 : "art"
[    0.820000] 0x000000050000-0x0000007e0000 : "firmware"
[    0.840000] switch0: Atheros AR8327 rev. 4 switch registered on 
ag71xx-mdio.0
[    0.930000] libphy: ag71xx_mdio: probed
[    1.530000] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:00 
[uid=004dd034, driver=Atheros AR8216/AR8236/AR8316]
[    1.540000] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RGMII
[    2.130000] eth1: Atheros AG71xx at 0xba000000, irq 5, mode:SGMII
[    2.140000] TCP: cubic registered
[    2.140000] NET: Registered protocol family 17
[    2.140000] 8021q: 802.1Q VLAN Support v1.8
[    2.150000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not 
found at 0x00000000: 0x96da instead
[    2.160000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not 
found at 0x00000004: 0x0ca1 instead

So my questions:

     0) what's the difference between bin.lzma and uImage?
     1) how does a linux kernel determine the beginning of the rootfs?
     2) why is it working with two partitions in the compex loader?
     3) do you think that the best solution is to make 1) or 2) work?
     4) please review my port, I'll collect the comments and reset the 
patches!

I'll send my changes to openwrt in some minutes.

Best
Christian
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From christian at m3hlis.de  Fri Jan 30 12:48:19 2015
From: christian at m3hlis.de (Christian Mehlis)
Date: Fri, 30 Jan 2015 18:48:19 +0100
Subject: [OpenWrt-Devel] [PATCH 1/2] added board support for compex wpj558
Message-ID: <1422640100-25673-1-git-send-email-christian@m3hlis.de>

Signed-off-by: Christian Mehlis <christian at m3hlis.de>
---
 target/linux/ar71xx/base-files/etc/diag.sh         |   3 +
 .../ar71xx/base-files/etc/uci-defaults/02_network  |   7 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh       |   3 +
 .../ar71xx/base-files/lib/upgrade/platform.sh      |   2 +
 target/linux/ar71xx/config-3.14                    |   1 +
 .../ar71xx/files/arch/mips/ath79/mach-wpj558.c     | 187 +++++++++++++++++++++
 target/linux/ar71xx/generic/profiles/compex.mk     |  13 ++
 target/linux/ar71xx/image/Makefile                 |  11 +-
 .../507-MIPS-ath79-prom-add-myloader-support.patch |   5 +-
 .../610-MIPS-ath79-openwrt-machines.patch          |  25 ++-
 .../linux/generic/files/include/linux/myloader.h   |   1 +
 tools/firmware-utils/src/mkmylofw.c                |   3 +
 tools/firmware-utils/src/myloader.h                |   2 +
 13 files changed, 254 insertions(+), 9 deletions(-)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-wpj558.c

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
index af6107b..af53afd 100755
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -288,6 +288,9 @@ get_status_led() {
 	wp543)
 		status_led="wp543:green:diag"
 		;;
+	wpj558)
+		status_led="wpj558:green:sig3"
+		;;
 	wrt400n)
 		status_led="wrt400n:blue:wps"
 		;;
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index a223ae8..1d186de 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -359,6 +359,13 @@ wpe72)
 	ucidef_set_interfaces_lan_wan "eth1" "eth0"
 	;;
 
+wpj558)
+	ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
+	ucidef_add_switch "switch0" "1" "1"
+	ucidef_add_switch_vlan "switch0" "1" "5 6t"
+	ucidef_add_switch_vlan "switch0" "2" "1 6t"
+	;;
+
 ap121 |\
 ap121-mini |\
 ap96 |\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 02872de..4c6594f 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -747,6 +747,9 @@ ar71xx_board_detect() {
 	*WP543)
 		name="wp543"
 		;;
+	*WPJ558)
+		name="wpj558"
+		;;
 	*WPE72)
 		name="wpe72"
 		;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index bc6866d..0db1625 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -408,6 +408,7 @@ platform_check_image() {
 	ja76pf | \
 	ja76pf2 | \
 	jwap003 | \
+	wpj558 | \
 	wp543 | \
 	wpe72)
 		[ "$magic" != "4349" ] && {
@@ -456,6 +457,7 @@ platform_do_upgrade() {
 	jwap003)
 		platform_do_upgrade_combined "$ARGV"
 		;;
+	wpj558|\
 	wp543|\
 	wpe72)
 		platform_do_upgrade_compex "$ARGV"
diff --git a/target/linux/ar71xx/config-3.14 b/target/linux/ar71xx/config-3.14
index 82b2d13..2d9873c 100644
--- a/target/linux/ar71xx/config-3.14
+++ b/target/linux/ar71xx/config-3.14
@@ -130,6 +130,7 @@ CONFIG_ATH79_MACH_WNR2000_V4=y
 CONFIG_ATH79_MACH_WNR2200=y
 CONFIG_ATH79_MACH_WP543=y
 CONFIG_ATH79_MACH_WPE72=y
+CONFIG_ATH79_MACH_WPJ558=y
 CONFIG_ATH79_MACH_WRT160NL=y
 CONFIG_ATH79_MACH_WRT400N=y
 CONFIG_ATH79_MACH_WZR_450HP2=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj558.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj558.c
new file mode 100644
index 0000000..a8310a7
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj558.c
@@ -0,0 +1,187 @@
+/*
+ * Compex WPJ558 board support
+ *
+ * Copyright (c) 2012 Qualcomm Atheros
+ * Copyright (c) 2012 Gabor Juhos <juhosg at openwrt.org>
+ *
+ * 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 <linux/pci.h>
+#include <linux/phy.h>
+#include <linux/gpio.h>
+#include <linux/platform_device.h>
+#include <linux/ath9k_platform.h>
+#include <linux/ar8216_platform.h>
+
+#include <asm/mach-ath79/ar71xx_regs.h>
+
+#include "common.h"
+#include "dev-ap9x-pci.h"
+#include "dev-eth.h"
+#include "dev-gpio-buttons.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-spi.h"
+#include "dev-usb.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+#include "pci.h"
+
+#define WPJ558_GPIO_LED_SIG1    14
+#define WPJ558_GPIO_LED_SIG2    15
+#define WPJ558_GPIO_LED_SIG3    22
+#define WPJ558_GPIO_LED_SIG4    23
+#define WPJ558_GPIO_BUZZER      4
+
+#define WPJ558_GPIO_BTN_RESET   17
+
+#define WPJ558_KEYS_POLL_INTERVAL	20	/* msecs */
+#define WPJ558_KEYS_DEBOUNCE_INTERVAL	(3 * WPJ558_KEYS_POLL_INTERVAL)
+
+#define WPJ558_MAC0_OFFSET		0x10
+#define WPJ558_MAC1_OFFSET		0x18
+#define WPJ558_WMAC_CALDATA_OFFSET	0x1000
+#define WPJ558_PCIE_CALDATA_OFFSET	0x5000
+
+#define WPJ558_ART_SIZE		0x8000
+#if 0
+static char *art_buf;
+#endif
+
+static struct gpio_led wpj558_leds_gpio[] __initdata = {
+	{
+		.name		= "wpj558:red:sig1",
+		.gpio		= WPJ558_GPIO_LED_SIG1,
+		.active_low	= 1,
+	},
+	{
+		.name		= "wpj558:yellow:sig2",
+		.gpio		= WPJ558_GPIO_LED_SIG2,
+		.active_low	= 1,
+	},
+	{
+		.name		= "wpj558:green:sig3",
+		.gpio		= WPJ558_GPIO_LED_SIG3,
+		.active_low	= 1,
+	},
+	{
+		.name		= "wpj558:green:sig4",
+		.gpio		= WPJ558_GPIO_LED_SIG4,
+		.active_low	= 1,
+	},
+	{
+		.name		= "wpj558:buzzer",
+		.gpio		= WPJ558_GPIO_BUZZER,
+		.active_low	= 0,
+	}
+};
+
+static struct gpio_keys_button wpj558_gpio_keys[] __initdata = {
+	{
+		.desc		= "reset",
+		.type		= EV_KEY,
+		.code		= KEY_RESTART,
+		.debounce_interval = WPJ558_KEYS_DEBOUNCE_INTERVAL,
+		.gpio		= WPJ558_GPIO_BTN_RESET,
+		.active_low	= 1,
+	},
+};
+
+static struct ar8327_pad_cfg wpj558_ar8327_pad0_cfg = {
+	.mode = AR8327_PAD_MAC_SGMII,
+	.sgmii_delay_en = true,
+};
+
+static struct ar8327_pad_cfg wpj558_ar8327_pad6_cfg = {
+	.mode = AR8327_PAD_MAC_RGMII,
+	.txclk_delay_en = true,
+	.rxclk_delay_en = true,
+	.txclk_delay_sel = AR8327_CLK_DELAY_SEL1,
+	.rxclk_delay_sel = AR8327_CLK_DELAY_SEL2,
+};
+
+static struct ar8327_platform_data wpj558_ar8327_data = {
+	.pad0_cfg = &wpj558_ar8327_pad0_cfg,
+	.pad6_cfg = &wpj558_ar8327_pad6_cfg,
+	.port0_cfg = {
+		.force_link = 1,
+		.speed = AR8327_PORT_SPEED_1000,
+		.duplex = 1,
+		.txpause = 1,
+		.rxpause = 1,
+	},
+	.port6_cfg = {
+		.force_link = 1,
+		.speed = AR8327_PORT_SPEED_1000,
+		.duplex = 1,
+		.txpause = 1,
+		.rxpause = 1,
+	},
+};
+
+static struct mdio_board_info wpj558_mdio0_info[] = {
+	{
+		.bus_id = "ag71xx-mdio.0",
+		.phy_addr = 0,
+		.platform_data = &wpj558_ar8327_data,
+	},
+};
+
+static void __init wpj558_setup(void)
+{
+	u8 *mac = (u8 *) KSEG1ADDR(0x1f02e000);
+	u8 *art = (u8 *) KSEG1ADDR(0x1fff0000);
+	u8 tmpmac[ETH_ALEN];
+
+	ath79_register_m25p80(NULL);
+	ath79_register_leds_gpio(-1, ARRAY_SIZE(wpj558_leds_gpio),
+				 wpj558_leds_gpio);
+	ath79_register_gpio_keys_polled(-1, WPJ558_KEYS_POLL_INTERVAL,
+					ARRAY_SIZE(wpj558_gpio_keys),
+					wpj558_gpio_keys);
+
+	ath79_init_mac(tmpmac, mac, -1);
+	ath79_register_wmac(art + WPJ558_WMAC_CALDATA_OFFSET, tmpmac);
+
+	ath79_register_pci();
+
+	mdiobus_register_board_info(wpj558_mdio0_info,
+				    ARRAY_SIZE(wpj558_mdio0_info));
+	ath79_register_mdio(0, 0x0);
+	
+	ath79_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN);
+
+	/* GMAC0 is connected to an AR8327 switch */
+	ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
+	ath79_eth0_data.phy_mask = BIT(0);
+	ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev;
+	ath79_eth0_pll_data.pll_1000 = 0x56000000;
+
+	ath79_init_mac(ath79_eth0_data.mac_addr, mac + WPJ558_MAC0_OFFSET, 0);
+	ath79_register_eth(0);
+
+	/* GMAC1 is connected to the SGMII interface */
+	ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII;
+	ath79_eth1_data.speed = SPEED_1000;
+	ath79_eth1_data.duplex = DUPLEX_FULL;
+	ath79_eth1_pll_data.pll_1000 = 0x03000101;
+
+	ath79_init_mac(ath79_eth1_data.mac_addr, mac + WPJ558_MAC1_OFFSET, 0);
+	ath79_register_eth(1);
+
+	ath79_register_usb();
+}
+
+MIPS_MACHINE(ATH79_MACH_WPJ558, "WPJ558", "Compex WPJ558", wpj558_setup);
diff --git a/target/linux/ar71xx/generic/profiles/compex.mk b/target/linux/ar71xx/generic/profiles/compex.mk
index 3491473..a6f2239 100644
--- a/target/linux/ar71xx/generic/profiles/compex.mk
+++ b/target/linux/ar71xx/generic/profiles/compex.mk
@@ -26,3 +26,16 @@ define Profile/WPE72/Description
 endef
 
 $(eval $(call Profile,WPE72))
+
+
+define Profile/WPJ558
+	NAME:=Compex WPJ558
+	PACKAGES:=kmod-ath10k pciutils
+endef
+
+define Profile/WPJ558/Description
+	Package set optimized for the Compex WPJ558 board.
+endef
+
+$(eval $(call Profile,WPJ558))
+
diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
index f7b8381..ecaa126 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -687,10 +687,13 @@ Image/Build/MyLoader/initramfs=$(call PatchKernel/initramfs,$(2),$(3))
 define Image/Build/MyLoader
 	$(eval fwsize=$(shell echo $$(($(4)-0x30000-4*64*1024))))
 	$(eval fwimage=$(KDIR_TMP)/$(2)-$(5)-firmware.bin)
-	$(call CatFiles,$(KDIR_TMP)/vmlinux-$(2).bin.lzma,65536,$(KDIR)/root.$(1),$(fwsize),$(fwimage))
+	$(call CatFiles,$(KDIR_TMP)/vmlinux-$(2).uImage,65536,$(KDIR)/root.$(1),$(fwsize),$(fwimage))
 	if [ -e "$(fwimage)" ]; then \
 		$(STAGING_DIR_HOST)/bin/mkmylofw -B $(2) -s $(4) -v \
-			-p0x00030000:0:al:0x80060000:firmware:$(fwimage) \
+			-p0x680000:0x160000:al:0x80060000:firmware:$(KDIR_TMP)/vmlinux-$(2).uImage \
+			-p0x050000:0x630000:::rootfs:$(KDIR)/root.$(1) \
+			-p0x7e0000:0x010000 \
+			-p0x7f0000:0x010000 \
 			$(call imgname,$(1),$(2))-$(5)-factory.img; \
 		echo -n "" > $(KDIR_TMP)/empty.bin; \
 		sh $(TOPDIR)/scripts/combined-image.sh \
@@ -1318,6 +1321,9 @@ $(eval $(call SingleProfile,MyLoader,64k,WPE72_4M,wpe72,,ttyS0,115200,0x400000,4
 $(eval $(call SingleProfile,MyLoader,64k,WPE72_8M,wpe72,,ttyS0,115200,0x800000,8M))
 $(eval $(call SingleProfile,MyLoader,64k,WPE72_16M,wpe72,,ttyS0,115200,0x1000000,16M))
 
+$(eval $(call SingleProfile,MyLoader,64k,WPJ558_8M,wpj558,WPJ558,ttyS0,115200,0x800000,8M))
+$(eval $(call SingleProfile,MyLoader,64k,WPJ558_16M,wpj558,WPJ558,ttyS0,115200,0x1000000,16M))
+
 $(eval $(call SingleProfile,Netgear,64kraw,WNR2000V3,wnr2000v3,WNR2000V3,ttyS0,115200,$$(wnr2000v3_mtdlayout),0x32303033,WNR2000V3,"" NA,))
 $(eval $(call SingleProfile,NetgearLzma,64kraw,WNR2000V4,wnr2000v4,WNR2000V4,ttyS0,115200,$$(wnr2000v4_mtdlayout),0x32303034,WNR2000V4,"" NA,))
 $(eval $(call SingleProfile,Netgear,64kraw,WNR2200,wnr2200,WNR2200,ttyS0,115200,$$(wnr2200_mtdlayout),0x32323030,WNR2200,"" NA,))
@@ -1499,6 +1505,7 @@ $(eval $(call MultiProfile,WNR612V2,REALWNR612V2 N150R))
 $(eval $(call MultiProfile,WNR1000V2,REALWNR1000V2 WNR1000V2_VC))
 $(eval $(call MultiProfile,WP543,WP543_2M WP543_4M WP543_8M WP543_16M))
 $(eval $(call MultiProfile,WPE72,WPE72_4M WPE72_8M WPE72_16M))
+$(eval $(call MultiProfile,WPJ558,WPJ558_8M WPJ558_16M))
 
 $(eval $(call MultiProfile,Minimal,$(SINGLE_PROFILES)))
 $(eval $(call MultiProfile,Madwifi,EAP7660D UBNTRS UBNTRSPRO UBNTLSSR71 WP543))
diff --git a/target/linux/ar71xx/patches-3.14/507-MIPS-ath79-prom-add-myloader-support.patch b/target/linux/ar71xx/patches-3.14/507-MIPS-ath79-prom-add-myloader-support.patch
index 67c1faf..407755e 100644
--- a/target/linux/ar71xx/patches-3.14/507-MIPS-ath79-prom-add-myloader-support.patch
+++ b/target/linux/ar71xx/patches-3.14/507-MIPS-ath79-prom-add-myloader-support.patch
@@ -8,7 +8,7 @@
  
  #include "common.h"
  
-@@ -69,6 +70,37 @@ static const char * __init ath79_prom_fi
+@@ -69,6 +70,40 @@ static const char * __init ath79_prom_fi
  	return ret;
  }
  
@@ -29,6 +29,9 @@
 +	case DEVID_COMPEX_WPE72:
 +		ath79_prom_append_cmdline("board", "WPE72");
 +		break;
++	case DEVID_COMPEX_WPJ558:
++		ath79_prom_append_cmdline("board", "WPJ558");
++		break;
 +	default:
 +		pr_warn("prom: unknown device id: %x\n", mylo->did);
 +		return 0;
diff --git a/target/linux/ar71xx/patches-3.14/610-MIPS-ath79-openwrt-machines.patch b/target/linux/ar71xx/patches-3.14/610-MIPS-ath79-openwrt-machines.patch
index b01c5de..b100752 100644
--- a/target/linux/ar71xx/patches-3.14/610-MIPS-ath79-openwrt-machines.patch
+++ b/target/linux/ar71xx/patches-3.14/610-MIPS-ath79-openwrt-machines.patch
@@ -1,6 +1,6 @@
 --- a/arch/mips/ath79/machtypes.h
 +++ b/arch/mips/ath79/machtypes.h
-@@ -16,22 +16,146 @@
+@@ -16,22 +16,147 @@
  
  enum ath79_mach_type {
  	ATH79_MACH_GENERIC = 0,
@@ -136,6 +136,7 @@
 +	ATH79_MACH_WNR612_V2,		/* NETGEAR WNR612 v2 */
 +	ATH79_MACH_WP543,		/* Compex WP543 */
 +	ATH79_MACH_WPE72,		/* Compex WPE72 */
++	ATH79_MACH_WPJ558,		/* Compex WPJ558 */
 +	ATH79_MACH_WRT160NL,		/* Linksys WRT160NL */
 +	ATH79_MACH_WRT400N,		/* Linksys WRT400N */
 +	ATH79_MACH_WZR_HP_AG300H,	/* Buffalo WZR-HP-AG300H */
@@ -211,7 +212,7 @@
  config ATH79_MACH_AP121
  	bool "Atheros AP121 reference board"
  	select SOC_AR933X
-@@ -11,62 +66,743 @@ config ATH79_MACH_AP121
+@@ -11,62 +66,754 @@ config ATH79_MACH_AP121
  	select ATH79_DEV_M25P80
  	select ATH79_DEV_USB
  	select ATH79_DEV_WMAC
@@ -416,6 +417,17 @@
 +	select ATH79_DEV_USB
 +	select MYLOADER
 +
++config ATH79_MACH_WPJ558
++	bool "Compex WPJ558 board support"
++	select SOC_QCA955X
++	select ATH79_DEV_ETH
++	select ATH79_DEV_GPIO_BUTTONS
++	select ATH79_DEV_LEDS_GPIO
++	select ATH79_DEV_M25P80
++	select ATH79_DEV_USB
++	select ATH79_DEV_WMAC
++	select MYLOADER
++
 +config ATH79_MACH_DIR_505_A1
 +	bool "D-Link DIR-505-A1 support"
 +	select SOC_AR933X
@@ -983,7 +995,7 @@
  
  config ATH79_MACH_UBNT_XM
  	bool "Ubiquiti Networks XM/UniFi boards"
-@@ -83,6 +819,65 @@ config ATH79_MACH_UBNT_XM
+@@ -83,6 +830,65 @@ config ATH79_MACH_UBNT_XM
  	  Say 'Y' here if you want your kernel to support the
  	  Ubiquiti Networks XM (rev 1.0) board.
  
@@ -1049,7 +1061,7 @@
  endmenu
  
  config SOC_AR71XX
-@@ -132,7 +927,10 @@ config ATH79_DEV_DSA
+@@ -132,7 +938,10 @@ config ATH79_DEV_DSA
  config ATH79_DEV_ETH
  	def_bool n
  
@@ -1061,7 +1073,7 @@
  	def_bool n
  
  config ATH79_DEV_GPIO_BUTTONS
-@@ -164,4 +962,7 @@ config ATH79_PCI_ATH9K_FIXUP
+@@ -164,4 +973,7 @@ config ATH79_PCI_ATH9K_FIXUP
  config ATH79_ROUTERBOOT
  	def_bool n
  
@@ -1071,7 +1083,7 @@
  endif
 --- a/arch/mips/ath79/Makefile
 +++ b/arch/mips/ath79/Makefile
-@@ -38,9 +38,91 @@ obj-$(CONFIG_ATH79_ROUTERBOOT)		+= route
+@@ -38,9 +49,92 @@ obj-$(CONFIG_ATH79_ROUTERBOOT)		+= route
  #
  # Machines
  #
@@ -1155,6 +1167,7 @@
 +obj-$(CONFIG_ATH79_MACH_WNR2200)	+= mach-wnr2200.o
 +obj-$(CONFIG_ATH79_MACH_WP543)		+= mach-wp543.o
 +obj-$(CONFIG_ATH79_MACH_WPE72)		+= mach-wpe72.o
++obj-$(CONFIG_ATH79_MACH_WPJ558)	+= mach-wpj558.o
 +obj-$(CONFIG_ATH79_MACH_WRT160NL)	+= mach-wrt160nl.o
 +obj-$(CONFIG_ATH79_MACH_WRT400N)	+= mach-wrt400n.o
 +obj-$(CONFIG_ATH79_MACH_WZR_HP_G300NH)	+= mach-wzr-hp-g300nh.o
diff --git a/target/linux/generic/files/include/linux/myloader.h b/target/linux/generic/files/include/linux/myloader.h
index d89e415..bb70460 100644
--- a/target/linux/generic/files/include/linux/myloader.h
+++ b/target/linux/generic/files/include/linux/myloader.h
@@ -37,6 +37,7 @@
 /* Devices based on the Atheros AR71xx */
 #define DEVID_COMPEX_WP543	0x0640
 #define DEVID_COMPEX_WPE72	0x0672
+#define DEVID_COMPEX_WPJ558 0x0688
 
 /* Devices based on the IXP422 */
 #define DEVID_COMPEX_WP18	0x047E
diff --git a/tools/firmware-utils/src/mkmylofw.c b/tools/firmware-utils/src/mkmylofw.c
index b5958eb..539d116 100644
--- a/tools/firmware-utils/src/mkmylofw.c
+++ b/tools/firmware-utils/src/mkmylofw.c
@@ -157,6 +157,9 @@ struct cpx_board boards[] = {
 	CPX_BOARD_AR71XX(DEVID_COMPEX_WPE72, 8,
 		"WPE72", "Compex WPE72",
 		"BareBoard"),
+	CPX_BOARD_AR71XX(DEVID_COMPEX_WPJ558, 8,
+		"WPJ558", "Compex WPJ558",
+		"BareBoard"),
 
 	CPX_BOARD_AR23XX(DEVID_COMPEX_NP25G, 4,
 		"NP25G", "Compex NetPassage 25G",
diff --git a/tools/firmware-utils/src/myloader.h b/tools/firmware-utils/src/myloader.h
index 7be1d49..529cb46 100644
--- a/tools/firmware-utils/src/myloader.h
+++ b/tools/firmware-utils/src/myloader.h
@@ -64,6 +64,8 @@
 #define DEVID_COMPEX_WP543	0x0640
 #define DEVID_COMPEX_WPE72	0x0672
 
+#define DEVID_COMPEX_WPJ558	0x0688
+
 /* Devices based on the IXP422 */
 #define DEVID_COMPEX_WP18	0x047E
 #define DEVID_COMPEX_NP18A	0x0489
-- 
2.3.0.rc2
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From christian at m3hlis.de  Fri Jan 30 12:48:20 2015
From: christian at m3hlis.de (Christian Mehlis)
Date: Fri, 30 Jan 2015 18:48:20 +0100
Subject: [OpenWrt-Devel] [PATCH 2/2] wpj558: use own partition for rootfs
In-Reply-To: <1422640100-25673-1-git-send-email-christian@m3hlis.de>
References: <1422640100-25673-1-git-send-email-christian@m3hlis.de>
Message-ID: <1422640100-25673-2-git-send-email-christian@m3hlis.de>

this change breaks rootfs detection

Signed-off-by: Christian Mehlis <christian at m3hlis.de>
---
 target/linux/ar71xx/image/Makefile | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
index ecaa126..9956a01 100644
--- a/target/linux/ar71xx/image/Makefile
+++ b/target/linux/ar71xx/image/Makefile
@@ -690,10 +690,7 @@ define Image/Build/MyLoader
 	$(call CatFiles,$(KDIR_TMP)/vmlinux-$(2).uImage,65536,$(KDIR)/root.$(1),$(fwsize),$(fwimage))
 	if [ -e "$(fwimage)" ]; then \
 		$(STAGING_DIR_HOST)/bin/mkmylofw -B $(2) -s $(4) -v \
-			-p0x680000:0x160000:al:0x80060000:firmware:$(KDIR_TMP)/vmlinux-$(2).uImage \
-			-p0x050000:0x630000:::rootfs:$(KDIR)/root.$(1) \
-			-p0x7e0000:0x010000 \
-			-p0x7f0000:0x010000 \
+			-p0x00030000:0:al:0x80060000:firmware:$(fwimage) \
 			$(call imgname,$(1),$(2))-$(5)-factory.img; \
 		echo -n "" > $(KDIR_TMP)/empty.bin; \
 		sh $(TOPDIR)/scripts/combined-image.sh \
-- 
2.3.0.rc2
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From darwinskernel at gmail.com  Fri Jan 30 13:04:53 2015
From: darwinskernel at gmail.com (SGT. Garcia)
Date: Fri, 30 Jan 2015 13:04:53 -0500
Subject: [OpenWrt-Devel] Compex WPJ558 board support
In-Reply-To: <54CBC309.7080304@m3hlis.de>
References: <54CBC309.7080304@m3hlis.de>
Message-ID: <20150130180453.GA3882@vpn.5665sherbrooke.house>

On Jan 30  18:44 +0100, Christian Mehlis wrote:
> Hi,
> 
> I did a port for the Compex WPJ558 and it's almost working completely.

hi,
could you tell me where you got this board from? this is the only place
i've found it: http://tinyurl.com/ovb766y

i'm in Canada, btw.
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From christian at m3hlis.de  Fri Jan 30 13:21:56 2015
From: christian at m3hlis.de (Christian Mehlis)
Date: Fri, 30 Jan 2015 19:21:56 +0100
Subject: [OpenWrt-Devel] Compex WPJ558 board support
In-Reply-To: <20150130180453.GA3882@vpn.5665sherbrooke.house>
References: <54CBC309.7080304@m3hlis.de>
 <20150130180453.GA3882@vpn.5665sherbrooke.house>
Message-ID: <54CBCBC4.4030402@m3hlis.de>

Am 30.01.2015 um 19:04 schrieb SGT. Garcia:
> On Jan 30  18:44 +0100, Christian Mehlis wrote:
>> Hi,
>>
>> I did a port for the Compex WPJ558 and it's almost working completely.
>
> hi,
> could you tell me where you got this board from? this is the only place
> i've found it: http://tinyurl.com/ovb766y

Hi,

I did not order it, but you can contact them directly:

	http://www.compex.com.sg/index.php/contactus/

or use the "webshop":

	http://www.compexshop.com/product_info.php?currency=USD&products_id=466

Best
Christian
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From fl.service at t-firefly.com  Fri Jan 30 20:05:11 2015
From: fl.service at t-firefly.com (wengbj)
Date: Sat, 31 Jan 2015 09:05:11 +0800
Subject: [OpenWrt-Devel] [PATCH 1/3] ralink: add ethernet macaddr to dts for
	FireWRT
Message-ID: <1422666313-6205-1-git-send-email-fl.service@t-firefly.com>

Signed-off-by: wengbj <fl.service at t-firefly.com>
---
 target/linux/ramips/dts/FIREWRT.dts |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/target/linux/ramips/dts/FIREWRT.dts b/target/linux/ramips/dts/FIREWRT.dts
index 2e5d26b..4e9e28b 100644
--- a/target/linux/ramips/dts/FIREWRT.dts
+++ b/target/linux/ramips/dts/FIREWRT.dts
@@ -78,4 +78,9 @@
 			};
 		};
 	};
+
+	ethernet at 1e100000 {
+		mtd-mac-address = <&factory 0xe000>;
+	};
+
 };
-- 
1.7.9.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From fl.service at t-firefly.com  Fri Jan 30 20:05:12 2015
From: fl.service at t-firefly.com (wengbj)
Date: Sat, 31 Jan 2015 09:05:12 +0800
Subject: [OpenWrt-Devel] [PATCH 2/3] ralink: add FireWRT led detail
In-Reply-To: <1422666313-6205-1-git-send-email-fl.service@t-firefly.com>
References: <1422666313-6205-1-git-send-email-fl.service@t-firefly.com>
Message-ID: <1422666313-6205-2-git-send-email-fl.service@t-firefly.com>

Signed-off-by: wengbj <fl.service at t-firefly.com>
---
 target/linux/ramips/dts/FIREWRT.dts |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/target/linux/ramips/dts/FIREWRT.dts b/target/linux/ramips/dts/FIREWRT.dts
index 4e9e28b..faebe2f 100644
--- a/target/linux/ramips/dts/FIREWRT.dts
+++ b/target/linux/ramips/dts/FIREWRT.dts
@@ -83,4 +83,13 @@
 		mtd-mac-address = <&factory 0xe000>;
 	};
 
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		power {
+			label = "firewrt:green:power";
+			gpios = <&gpio0 22 1>;
+		};
+	};
+
 };
-- 
1.7.9.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From fl.service at t-firefly.com  Fri Jan 30 20:05:13 2015
From: fl.service at t-firefly.com (wengbj)
Date: Sat, 31 Jan 2015 09:05:13 +0800
Subject: [OpenWrt-Devel] [PATCH 3/3] ralink: add FireWRT button detail
In-Reply-To: <1422666313-6205-1-git-send-email-fl.service@t-firefly.com>
References: <1422666313-6205-1-git-send-email-fl.service@t-firefly.com>
Message-ID: <1422666313-6205-3-git-send-email-fl.service@t-firefly.com>

Signed-off-by: wengbj <fl.service at t-firefly.com>
---
 target/linux/ramips/dts/FIREWRT.dts            |   12 ++++++++++++
 target/linux/ramips/mt7621/profiles/firefly.mk |    2 +-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/target/linux/ramips/dts/FIREWRT.dts b/target/linux/ramips/dts/FIREWRT.dts
index faebe2f..f22c885 100644
--- a/target/linux/ramips/dts/FIREWRT.dts
+++ b/target/linux/ramips/dts/FIREWRT.dts
@@ -92,4 +92,16 @@
 		};
 	};
 
+	gpio-keys-polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <20>;
+		wps {
+			label = "wps";
+			gpios = <&gpio0 18 1>;
+			linux,code = <0x211>;
+		};
+	};
+
 };
diff --git a/target/linux/ramips/mt7621/profiles/firefly.mk b/target/linux/ramips/mt7621/profiles/firefly.mk
index c8292b0..b095979 100644
--- a/target/linux/ramips/mt7621/profiles/firefly.mk
+++ b/target/linux/ramips/mt7621/profiles/firefly.mk
@@ -8,7 +8,7 @@
 define Profile/Firefly
 	NAME:=Firefly Device
 	PACKAGES:=\
-		kmod-usb-core kmod-usb3 kmod-usb-hid  kmod-usb-storage mount-utils usbutils \
+		kmod-usb-core kmod-usb3 kmod-usb-hid  kmod-usb-storage mount-utils usbutils hostapd-utils \
         kmod-sdhci-mt7620 \
 		kmod-fs-ext3 kmod-fs-vfat kmod-fs-ntfs \
 		kmod-nls-cp437 kmod-nls-iso8859-1 kmod-nls-utf8 \
-- 
1.7.9.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From fl.service at t-firefly.com  Fri Jan 30 20:08:26 2015
From: fl.service at t-firefly.com (fl.service at t-firefly.com)
Date: Sat, 31 Jan 2015 09:08:26 +0800
Subject: [OpenWrt-Devel] [PATCH 1/3] ralink: add ethernet macaddr to dts
	for FireWRT
References: <1422608670-8506-1-git-send-email-fl.service@t-firefly.com>, 
 <CAECwjAg3oYp7cJ_RCCnvj4RSWpHeuE8XPqisk_3WqcysPwi__w@mail.gmail.com>
Message-ID: <201501310908254414642@t-firefly.com>

Dear Mr zhou:
    I have generated new patchs .
    Please check again . 
    Thank you .



Best Regards.
Jay Weng

Website:  www.t-firefly.com
E-mail:  fl.service at t-firefly.com
 
From: Yousong Zhou
Date: 2015-01-30 19:10
To: wengbj
CC: John Crispin; zxf; weng jay; dxj; wbj; OpenWrt Development List
Subject: Re: [OpenWrt-Devel] [PATCH 1/3] ralink: add ethernet macaddr to dts for FireWRT
Hi, wengbj
 
It's just that OpenWrt requires a Signed-off-by line for patches to be
accepted [1].  That line can be generated by option -s in command `git
format-patch -s ...'
 
[1] https://dev.openwrt.org/wiki/SubmittingPatches
 
Regards
 
                yousong
 
On 30 January 2015 at 17:04, wengbj <fl.service at t-firefly.com> wrote:
> ---
>  target/linux/ramips/dts/FIREWRT.dts |    5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/target/linux/ramips/dts/FIREWRT.dts b/target/linux/ramips/dts/FIREWRT.dts
> index 2e5d26b..4e9e28b 100644
> --- a/target/linux/ramips/dts/FIREWRT.dts
> +++ b/target/linux/ramips/dts/FIREWRT.dts
> @@ -78,4 +78,9 @@
>                         };
>                 };
>         };
> +
> +       ethernet at 1e100000 {
> +               mtd-mac-address = <&factory 0xe000>;
> +       };
> +
>  };
> --
> 1.7.9.5
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150131/b0e512fd/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 15484_15484_logo_mini(01-06-16-45-51).jpg
Type: image/jpeg
Size: 15484 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150131/b0e512fd/attachment.jpg>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From hancockrwd at gmail.com  Sat Jan 31 00:21:21 2015
From: hancockrwd at gmail.com (Robert Hancock)
Date: Fri, 30 Jan 2015 23:21:21 -0600
Subject: [OpenWrt-Devel] [PATCH] mac80211: Revert adding SM Power Save
	capability to hostapd configuration
Message-ID: <1422681681-32395-1-git-send-email-hancockrwd@gmail.com>

Part of rev 44173 added setting the SM Power Save capability in the hostapd.conf
file if the driver indicated that it was supported. It appears this was
incorrect, because the field in the actual HT Capabilities field in the AP
configuration is really a state indication. Just copying the state from the
capability resulted in the AP indicating that it had SMPS enabled all the time
if it supported SMPS. This effectively just disables all clients from sending
packets to the AP with more than one spatial stream, for no good reason.
So remove this part of the change.

Signed-off-by: Robert Hancock <hancockrwd at gmail.com>
---
 package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
index 72f9936..9526300 100644
--- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
+++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
@@ -42,7 +42,6 @@ drv_mac80211_init_device_config() {
 		greenfield \
 		short_gi_20 \
 		short_gi_40 \
-		smps \
 		max_amsdu \
 		dsss_cck_40
 }
@@ -132,7 +131,6 @@ mac80211_hostapd_setup_base() {
 			greenfield:0 \
 			short_gi_20:1 \
 			short_gi_40:1 \
-			smps:1 \
 			tx_stbc:1 \
 			rx_stbc:3 \
 			max_amsdu:1 \
@@ -143,8 +141,6 @@ mac80211_hostapd_setup_base() {
 			ht_cap_mask="$(($ht_cap_mask | $cap))"
 		done
 
-		cap_smps=$((($ht_cap_mask >> 2) & 3))
-
 		cap_rx_stbc=$((($ht_cap_mask >> 8) & 3))
 		[ "$rx_stbc" -lt "$cap_rx_stbc" ] && cap_rx_stbc="$rx_stbc"
 		ht_cap_mask="$(( ($ht_cap_mask & ~(0x300)) | ($cap_rx_stbc << 8) ))"
@@ -161,10 +157,6 @@ mac80211_hostapd_setup_base() {
 			MAX-AMSDU-7935:0x800::$max_amsdu \
 			DSSS_CCK-40:0x1000::$dsss_cck_40
 
-		# SM Power Save: 0=static, 1=dynamic, 3=disabled
-		[ "$smps" = 1 -a "$cap_smps" = 0 ] && ht_capab_flags="$ht_capab_flags[SMPS-STATIC]"
-		[ "$smps" = 1 -a "$cap_smps" = 1 ] && ht_capab_flags="$ht_capab_flags[SMPS-DYNAMIC]"
-
 		ht_capab="$ht_capab$ht_capab_flags"
 		[ -n "$ht_capab" ] && append base_cfg "ht_capab=$ht_capab" "$N"
 	}
-- 
2.1.0
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From hkallweit1 at gmail.com  Sat Jan 31 04:28:04 2015
From: hkallweit1 at gmail.com (Heiner Kallweit)
Date: Sat, 31 Jan 2015 10:28:04 +0100
Subject: [OpenWrt-Devel] [PATCH 1/4] ar8216: add reading ARL table for
	AR8216/AR8236/AR8316
Message-ID: <54CCA024.2050101@gmail.com>

Adds the chip-specific part of reading ARL table for AR8216/AR8236/AR8316.

It's based on the AR8236 datasheet and compile-tested only as I couldn't
find datasheets for AR8216/AR8316 and don't own devices with these chips.

The existing ar8216_atu_flush implementation was used for all three
chip types, therefore I guess they share a common ATU register layout.

More testing would be appreciated.

Signed-off-by: Heiner Kallweit <hkallweit1 at gmail.com>
---
 .../linux/generic/files/drivers/net/phy/ar8216.c   | 81 ++++++++++++++++++++--
 .../linux/generic/files/drivers/net/phy/ar8216.h   | 25 +++++--
 2 files changed, 98 insertions(+), 8 deletions(-)

diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c
index e39d540..595f144 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.c
@@ -598,10 +598,10 @@ ar8216_atu_flush(struct ar8xxx_priv *priv)
 {
 	int ret;
 
-	ret = ar8216_wait_bit(priv, AR8216_REG_ATU, AR8216_ATU_ACTIVE, 0);
+	ret = ar8216_wait_bit(priv, AR8216_REG_ATU_FUNC0, AR8216_ATU_ACTIVE, 0);
 	if (!ret)
-		ar8xxx_write(priv, AR8216_REG_ATU, AR8216_ATU_OP_FLUSH |
-						   AR8216_ATU_ACTIVE);
+		ar8xxx_write(priv, AR8216_REG_ATU_FUNC0, AR8216_ATU_OP_FLUSH |
+							 AR8216_ATU_ACTIVE);
 
 	return ret;
 }
@@ -702,6 +702,77 @@ ar8216_init_port(struct ar8xxx_priv *priv, int port)
 }
 
 static void
+ar8216_wait_atu_ready(struct ar8xxx_priv *priv, u16 r2, u16 r1)
+{
+	int timeout = 20;
+
+	while (ar8xxx_mii_read32(priv, r2, r1) & AR8216_ATU_ACTIVE && --timeout)
+                udelay(10);
+
+	if (!timeout)
+		pr_err("ar8216: timeout waiting for atu to become ready\n");
+}
+
+static void ar8216_get_arl_entry(struct ar8xxx_priv *priv,
+				 struct arl_entry *a, u32 *status, enum arl_op op)
+{
+	struct mii_bus *bus = priv->mii_bus;
+	u16 r2, page;
+	u16 r1_func0, r1_func1, r1_func2;
+	u32 t, val0, val1, val2;
+	int i;
+
+	split_addr(AR8216_REG_ATU_FUNC0, &r1_func0, &r2, &page);
+	r2 |= 0x10;
+
+	r1_func1 = (AR8216_REG_ATU_FUNC1 >> 1) & 0x1e;
+	r1_func2 = (AR8216_REG_ATU_FUNC2 >> 1) & 0x1e;
+
+	switch (op) {
+	case AR8XXX_ARL_INITIALIZE:
+		/* all ATU registers are on the same page
+		* therefore set page only once
+		*/
+		bus->write(bus, 0x18, 0, page);
+		wait_for_page_switch();
+
+		ar8216_wait_atu_ready(priv, r2, r1_func0);
+
+		ar8xxx_mii_write32(priv, r2, r1_func0, AR8216_ATU_OP_GET_NEXT);
+		ar8xxx_mii_write32(priv, r2, r1_func1, 0);
+		ar8xxx_mii_write32(priv, r2, r1_func2, 0);
+		break;
+	case AR8XXX_ARL_GET_NEXT:
+		t = ar8xxx_mii_read32(priv, r2, r1_func0);
+		t |= AR8216_ATU_ACTIVE;
+		ar8xxx_mii_write32(priv, r2, r1_func0, t);
+		ar8216_wait_atu_ready(priv, r2, r1_func0);
+
+		val0 = ar8xxx_mii_read32(priv, r2, r1_func0);
+		val1 = ar8xxx_mii_read32(priv, r2, r1_func1);
+		val2 = ar8xxx_mii_read32(priv, r2, r1_func2);
+
+		*status = (val2 & AR8216_ATU_STATUS) >> AR8216_ATU_STATUS_S;
+		if (!*status)
+			break;
+
+		i = 0;
+		t = AR8216_ATU_PORT0;
+		while (!(val2 & t) && ++i < priv->dev.ports)
+			t <<= 1;
+
+		a->port = i;
+		a->mac[0] = (val0 & AR8216_ATU_ADDR5) >> AR8216_ATU_ADDR5_S;
+		a->mac[1] = (val0 & AR8216_ATU_ADDR4) >> AR8216_ATU_ADDR4_S;
+		a->mac[2] = (val1 & AR8216_ATU_ADDR3) >> AR8216_ATU_ADDR3_S;
+		a->mac[3] = (val1 & AR8216_ATU_ADDR2) >> AR8216_ATU_ADDR2_S;
+		a->mac[4] = (val1 & AR8216_ATU_ADDR1) >> AR8216_ATU_ADDR1_S;
+		a->mac[5] = (val1 & AR8216_ATU_ADDR0) >> AR8216_ATU_ADDR0_S;
+		break;
+	}
+}
+
+static void
 ar8236_setup_port(struct ar8xxx_priv *priv, int port, u32 members)
 {
 	u32 egress, ingress;
@@ -1349,7 +1420,6 @@ ar8xxx_sw_get_arl_table(struct switch_dev *dev,
 	return 0;
 }
 
-
 static const struct switch_attr ar8xxx_sw_attr_globals[] = {
 	{
 		.type = SWITCH_TYPE_INT,
@@ -1475,6 +1545,7 @@ static const struct ar8xxx_chip ar8216_chip = {
 	.vtu_flush = ar8216_vtu_flush,
 	.vtu_load_vlan = ar8216_vtu_load_vlan,
 	.set_mirror_regs = ar8216_set_mirror_regs,
+	.get_arl_entry = ar8216_get_arl_entry,
 	.sw_hw_apply = ar8xxx_sw_hw_apply,
 
 	.num_mibs = ARRAY_SIZE(ar8216_mibs),
@@ -1502,6 +1573,7 @@ static const struct ar8xxx_chip ar8236_chip = {
 	.vtu_flush = ar8216_vtu_flush,
 	.vtu_load_vlan = ar8216_vtu_load_vlan,
 	.set_mirror_regs = ar8216_set_mirror_regs,
+	.get_arl_entry = ar8216_get_arl_entry,
 	.sw_hw_apply = ar8xxx_sw_hw_apply,
 
 	.num_mibs = ARRAY_SIZE(ar8236_mibs),
@@ -1529,6 +1601,7 @@ static const struct ar8xxx_chip ar8316_chip = {
 	.vtu_flush = ar8216_vtu_flush,
 	.vtu_load_vlan = ar8216_vtu_load_vlan,
 	.set_mirror_regs = ar8216_set_mirror_regs,
+	.get_arl_entry = ar8216_get_arl_entry,
 	.sw_hw_apply = ar8xxx_sw_hw_apply,
 
 	.num_mibs = ARRAY_SIZE(ar8236_mibs),
diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.h b/target/linux/generic/files/drivers/net/phy/ar8216.h
index 0f53f23..934a8b5 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.h
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.h
@@ -79,7 +79,7 @@
 #define   AR8236_VTUDATA_MEMBER		BITS(0, 7)
 #define   AR8216_VTUDATA_VALID		BIT(11)
 
-#define AR8216_REG_ATU			0x0050
+#define AR8216_REG_ATU_FUNC0		0x0050
 #define   AR8216_ATU_OP			BITS(0, 3)
 #define   AR8216_ATU_OP_NOOP		0x0
 #define   AR8216_ATU_OP_FLUSH		0x1
@@ -91,14 +91,31 @@
 #define   AR8216_ATU_ACTIVE		BIT(3)
 #define   AR8216_ATU_PORT_NUM		BITS(8, 4)
 #define   AR8216_ATU_FULL_VIO		BIT(12)
-#define   AR8216_ATU_ADDR4		BITS(16, 8)
-#define   AR8216_ATU_ADDR5		BITS(24, 8)
+#define   AR8216_ATU_ADDR5		BITS(16, 8)
+#define   AR8216_ATU_ADDR5_S		16
+#define   AR8216_ATU_ADDR4		BITS(24, 8)
+#define   AR8216_ATU_ADDR4_S		24
 
-#define AR8216_REG_ATU_DATA		0x0054
+#define AR8216_REG_ATU_FUNC1		0x0054
 #define   AR8216_ATU_ADDR3		BITS(0, 8)
+#define   AR8216_ATU_ADDR3_S		0
 #define   AR8216_ATU_ADDR2		BITS(8, 8)
+#define   AR8216_ATU_ADDR2_S		8
 #define   AR8216_ATU_ADDR1		BITS(16, 8)
+#define   AR8216_ATU_ADDR1_S		16
 #define   AR8216_ATU_ADDR0		BITS(24, 8)
+#define   AR8216_ATU_ADDR0_S		24
+
+#define AR8216_REG_ATU_FUNC2		0x0058
+#define   AR8216_ATU_PORTS		BITS(0, 6)
+#define   AR8216_ATU_PORT0		BIT(0)
+#define   AR8216_ATU_PORT1		BIT(1)
+#define   AR8216_ATU_PORT2		BIT(2)
+#define   AR8216_ATU_PORT3		BIT(3)
+#define   AR8216_ATU_PORT4		BIT(4)
+#define   AR8216_ATU_PORT5		BIT(5)
+#define   AR8216_ATU_STATUS		BITS(16, 4)
+#define   AR8216_ATU_STATUS_S		16
 
 #define AR8216_REG_ATU_CTRL		0x005C
 #define   AR8216_ATU_CTRL_AGE_EN	BIT(17)
-- 
2.2.2
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From hkallweit1 at gmail.com  Sat Jan 31 04:28:13 2015
From: hkallweit1 at gmail.com (Heiner Kallweit)
Date: Sat, 31 Jan 2015 10:28:13 +0100
Subject: [OpenWrt-Devel] [PATCH 2/4] ar8216: add ARL table flushing per port
Message-ID: <54CCA02D.3040905@gmail.com>

Adds functions for flushing ARL table entries per port.

Successfully tested on AR8327. Implementation for AR8216/AR8236/AR8316
is based on the AR8236 datasheet and assumes that the three chips
share a common ATU register layout.
Compile-tested only for AR8216/AR8236/AR8316.

Signed-off-by: Heiner Kallweit <hkallweit1 at gmail.com>
---
 target/linux/generic/files/drivers/net/phy/ar8216.c | 19 +++++++++++++++++++
 target/linux/generic/files/drivers/net/phy/ar8216.h |  6 ++++--
 target/linux/generic/files/drivers/net/phy/ar8327.c | 20 ++++++++++++++++++++
 target/linux/generic/files/drivers/net/phy/ar8327.h |  6 ++++--
 4 files changed, 47 insertions(+), 4 deletions(-)

diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c
index 595f144..f4c7b8d 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.c
@@ -606,6 +606,22 @@ ar8216_atu_flush(struct ar8xxx_priv *priv)
 	return ret;
 }
 
+static int
+ar8216_atu_flush_port(struct ar8xxx_priv *priv, int port)
+{
+	u32 t;
+	int ret;
+
+	ret = ar8216_wait_bit(priv, AR8216_REG_ATU_FUNC0, AR8216_ATU_ACTIVE, 0);
+	if (!ret) {
+		t = (port << AR8216_ATU_PORT_NUM_S) | AR8216_ATU_OP_FLUSH_PORT;
+		t |= AR8216_ATU_ACTIVE;
+		ar8xxx_write(priv, AR8216_REG_ATU_FUNC0, t);
+	}
+
+	return ret;
+}
+
 static u32
 ar8216_read_port_status(struct ar8xxx_priv *priv, int port)
 {
@@ -1542,6 +1558,7 @@ static const struct ar8xxx_chip ar8216_chip = {
 	.setup_port = ar8216_setup_port,
 	.read_port_status = ar8216_read_port_status,
 	.atu_flush = ar8216_atu_flush,
+	.atu_flush_port = ar8216_atu_flush_port,
 	.vtu_flush = ar8216_vtu_flush,
 	.vtu_load_vlan = ar8216_vtu_load_vlan,
 	.set_mirror_regs = ar8216_set_mirror_regs,
@@ -1570,6 +1587,7 @@ static const struct ar8xxx_chip ar8236_chip = {
 	.setup_port = ar8236_setup_port,
 	.read_port_status = ar8216_read_port_status,
 	.atu_flush = ar8216_atu_flush,
+	.atu_flush_port = ar8216_atu_flush_port,
 	.vtu_flush = ar8216_vtu_flush,
 	.vtu_load_vlan = ar8216_vtu_load_vlan,
 	.set_mirror_regs = ar8216_set_mirror_regs,
@@ -1598,6 +1616,7 @@ static const struct ar8xxx_chip ar8316_chip = {
 	.setup_port = ar8216_setup_port,
 	.read_port_status = ar8216_read_port_status,
 	.atu_flush = ar8216_atu_flush,
+	.atu_flush_port = ar8216_atu_flush_port,
 	.vtu_flush = ar8216_vtu_flush,
 	.vtu_load_vlan = ar8216_vtu_load_vlan,
 	.set_mirror_regs = ar8216_set_mirror_regs,
diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.h b/target/linux/generic/files/drivers/net/phy/ar8216.h
index 934a8b5..5abbd55 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.h
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.h
@@ -85,11 +85,12 @@
 #define   AR8216_ATU_OP_FLUSH		0x1
 #define   AR8216_ATU_OP_LOAD		0x2
 #define   AR8216_ATU_OP_PURGE		0x3
-#define   AR8216_ATU_OP_FLUSH_LOCKED	0x4
-#define   AR8216_ATU_OP_FLUSH_UNICAST	0x5
+#define   AR8216_ATU_OP_FLUSH_UNLOCKED	0x4
+#define   AR8216_ATU_OP_FLUSH_PORT	0x5
 #define   AR8216_ATU_OP_GET_NEXT	0x6
 #define   AR8216_ATU_ACTIVE		BIT(3)
 #define   AR8216_ATU_PORT_NUM		BITS(8, 4)
+#define   AR8216_ATU_PORT_NUM_S		8
 #define   AR8216_ATU_FULL_VIO		BIT(12)
 #define   AR8216_ATU_ADDR5		BITS(16, 8)
 #define   AR8216_ATU_ADDR5_S		16
@@ -397,6 +398,7 @@ struct ar8xxx_chip {
 	u32 (*read_port_status)(struct ar8xxx_priv *priv, int port);
 	u32 (*read_port_eee_status)(struct ar8xxx_priv *priv, int port);
 	int (*atu_flush)(struct ar8xxx_priv *priv);
+	int (*atu_flush_port)(struct ar8xxx_priv *priv, int port);
 	void (*vtu_flush)(struct ar8xxx_priv *priv);
 	void (*vtu_load_vlan)(struct ar8xxx_priv *priv, u32 vid, u32 port_mask);
 	void (*phy_fixup)(struct ar8xxx_priv *priv, int phy);
diff --git a/target/linux/generic/files/drivers/net/phy/ar8327.c b/target/linux/generic/files/drivers/net/phy/ar8327.c
index 07e837e..a8d33a8 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8327.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8327.c
@@ -765,6 +765,24 @@ ar8327_atu_flush(struct ar8xxx_priv *priv)
 	return ret;
 }
 
+static int
+ar8327_atu_flush_port(struct ar8xxx_priv *priv, int port)
+{
+	u32 t;
+	int ret;
+
+	ret = ar8216_wait_bit(priv, AR8327_REG_ATU_FUNC,
+			      AR8327_ATU_FUNC_BUSY, 0);
+	if (!ret) {
+		t = (port << AR8327_ATU_PORT_NUM_S);
+		t |= AR8327_ATU_FUNC_OP_FLUSH_PORT;
+		t |= AR8327_ATU_FUNC_BUSY;
+		ar8xxx_write(priv, AR8327_REG_ATU_FUNC, t);
+	}
+
+	return ret;
+}
+
 static void
 ar8327_vtu_op(struct ar8xxx_priv *priv, u32 op, u32 val)
 {
@@ -1189,6 +1207,7 @@ const struct ar8xxx_chip ar8327_chip = {
 	.read_port_status = ar8327_read_port_status,
 	.read_port_eee_status = ar8327_read_port_eee_status,
 	.atu_flush = ar8327_atu_flush,
+	.atu_flush_port = ar8327_atu_flush_port,
 	.vtu_flush = ar8327_vtu_flush,
 	.vtu_load_vlan = ar8327_vtu_load_vlan,
 	.phy_fixup = ar8327_phy_fixup,
@@ -1222,6 +1241,7 @@ const struct ar8xxx_chip ar8337_chip = {
 	.read_port_status = ar8327_read_port_status,
 	.read_port_eee_status = ar8327_read_port_eee_status,
 	.atu_flush = ar8327_atu_flush,
+	.atu_flush_port = ar8327_atu_flush_port,
 	.vtu_flush = ar8327_vtu_flush,
 	.vtu_load_vlan = ar8327_vtu_load_vlan,
 	.phy_fixup = ar8327_phy_fixup,
diff --git a/target/linux/generic/files/drivers/net/phy/ar8327.h b/target/linux/generic/files/drivers/net/phy/ar8327.h
index 29eeb62..8d1fb3b 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8327.h
+++ b/target/linux/generic/files/drivers/net/phy/ar8327.h
@@ -144,11 +144,13 @@
 #define   AR8327_ATU_FUNC_OP_FLUSH		0x1
 #define   AR8327_ATU_FUNC_OP_LOAD		0x2
 #define   AR8327_ATU_FUNC_OP_PURGE		0x3
-#define   AR8327_ATU_FUNC_OP_FLUSH_LOCKED	0x4
-#define   AR8327_ATU_FUNC_OP_FLUSH_UNICAST	0x5
+#define   AR8327_ATU_FUNC_OP_FLUSH_UNLOCKED	0x4
+#define   AR8327_ATU_FUNC_OP_FLUSH_PORT		0x5
 #define   AR8327_ATU_FUNC_OP_GET_NEXT		0x6
 #define   AR8327_ATU_FUNC_OP_SEARCH_MAC		0x7
 #define   AR8327_ATU_FUNC_OP_CHANGE_TRUNK	0x8
+#define   AR8327_ATU_PORT_NUM			BITS(8, 4)
+#define   AR8327_ATU_PORT_NUM_S			8
 #define   AR8327_ATU_FUNC_BUSY			BIT(31)
 
 #define AR8327_REG_VTU_FUNC0			0x0610
-- 
2.2.2
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From hkallweit1 at gmail.com  Sat Jan 31 04:28:21 2015
From: hkallweit1 at gmail.com (Heiner Kallweit)
Date: Sat, 31 Jan 2015 10:28:21 +0100
Subject: [OpenWrt-Devel] [PATCH 3/4] ar8216: adjust ATU flushing in case of
	link changes
Message-ID: <54CCA035.8070302@gmail.com>

If a link goes down, don't flush the complete ARL table.
Only flush the entries for the respective port.
Don't touch ARL table if a link goes up.

Signed-off-by: Heiner Kallweit <hkallweit1 at gmail.com>
---
 target/linux/generic/files/drivers/net/phy/ar8216.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c
index f4c7b8d..9065915 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.c
@@ -1882,13 +1882,13 @@ ar8xxx_check_link_states(struct ar8xxx_priv *priv)
 
 		priv->link_up[i] = link_new;
 		changed = true;
+		/* flush ARL entries for this port if it went down*/
+		if (!link_new)
+			priv->chip->atu_flush_port(priv, i);
 		dev_info(&priv->phy->dev, "Port %d is %s\n",
 			 i, link_new ? "up" : "down");
 	}
 
-	if (changed)
-		priv->chip->atu_flush(priv);
-
 	mutex_unlock(&priv->reg_mutex);
 
 	return changed;
@@ -1900,9 +1900,7 @@ ar8xxx_phy_read_status(struct phy_device *phydev)
 	struct ar8xxx_priv *priv = phydev->priv;
 	struct switch_port_link link;
 
-	/* check for link changes and flush ATU
-	 * if a change was detected
-	 */
+	/* check for switch port link changes */
 	if (phydev->state == PHY_CHANGELINK)
 		ar8xxx_check_link_states(priv);
 
-- 
2.2.2
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From hkallweit1 at gmail.com  Sat Jan 31 04:28:32 2015
From: hkallweit1 at gmail.com (Heiner Kallweit)
Date: Sat, 31 Jan 2015 10:28:32 +0100
Subject: [OpenWrt-Devel] [PATCH 4/4] ar8216: add swconfig attributes for ARL
	table flushing
Message-ID: <54CCA040.4060603@gmail.com>

Add swconfig attributes for flushing the ARL table globally or per port.

Signed-off-by: Heiner Kallweit <hkallweit1 at gmail.com>
---
 .../linux/generic/files/drivers/net/phy/ar8216.c   | 48 +++++++++++++++++++++-
 .../linux/generic/files/drivers/net/phy/ar8216.h   |  8 ++++
 .../linux/generic/files/drivers/net/phy/ar8327.c   | 12 ++++++
 3 files changed, 67 insertions(+), 1 deletion(-)

diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c
index 9065915..75db1f1 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.c
@@ -1436,6 +1436,40 @@ ar8xxx_sw_get_arl_table(struct switch_dev *dev,
 	return 0;
 }
 
+int
+ar8xxx_sw_set_flush_arl_table(struct switch_dev *dev,
+			      const struct switch_attr *attr,
+			      struct switch_val *val)
+{
+	struct ar8xxx_priv *priv = swdev_to_ar8xxx(dev);
+	int ret;
+
+	mutex_lock(&priv->reg_mutex);
+	ret = priv->chip->atu_flush(priv);
+	mutex_unlock(&priv->reg_mutex);
+
+	return ret;
+}
+
+int
+ar8xxx_sw_set_flush_port_arl_table(struct switch_dev *dev,
+				   const struct switch_attr *attr,
+				   struct switch_val *val)
+{
+	struct ar8xxx_priv *priv = swdev_to_ar8xxx(dev);
+	int port, ret;
+
+	port = val->port_vlan;
+	if (port >= dev->ports)
+		return -EINVAL;
+
+	mutex_lock(&priv->reg_mutex);
+	ret = priv->chip->atu_flush_port(priv, port);
+	mutex_unlock(&priv->reg_mutex);
+
+	return ret;
+}
+
 static const struct switch_attr ar8xxx_sw_attr_globals[] = {
 	{
 		.type = SWITCH_TYPE_INT,
@@ -1490,9 +1524,15 @@ static const struct switch_attr ar8xxx_sw_attr_globals[] = {
 		.set = NULL,
 		.get = ar8xxx_sw_get_arl_table,
 	},
+	{
+		.type = SWITCH_TYPE_NOVAL,
+		.name = "flush_arl_table",
+		.description = "Flush ARL table",
+		.set = ar8xxx_sw_set_flush_arl_table,
+	},
 };
 
-const struct switch_attr ar8xxx_sw_attr_port[2] = {
+const struct switch_attr ar8xxx_sw_attr_port[] = {
 	{
 		.type = SWITCH_TYPE_NOVAL,
 		.name = "reset_mib",
@@ -1506,6 +1546,12 @@ const struct switch_attr ar8xxx_sw_attr_port[2] = {
 		.set = NULL,
 		.get = ar8xxx_sw_get_port_mib,
 	},
+	{
+		.type = SWITCH_TYPE_NOVAL,
+		.name = "flush_arl_table",
+		.description = "Flush port's ARL table entries",
+		.set = ar8xxx_sw_set_flush_port_arl_table,
+	},
 };
 
 const struct switch_attr ar8xxx_sw_attr_vlan[1] = {
diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.h b/target/linux/generic/files/drivers/net/phy/ar8216.h
index 5abbd55..14fe928 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.h
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.h
@@ -543,6 +543,14 @@ ar8xxx_sw_get_arl_table(struct switch_dev *dev,
 			const struct switch_attr *attr,
 			struct switch_val *val);
 int
+ar8xxx_sw_set_flush_arl_table(struct switch_dev *dev,
+			      const struct switch_attr *attr,
+			      struct switch_val *val);
+int
+ar8xxx_sw_set_flush_port_arl_table(struct switch_dev *dev,
+				   const struct switch_attr *attr,
+				   struct switch_val *val);
+int
 ar8216_wait_bit(struct ar8xxx_priv *priv, int reg, u32 mask, u32 val);
 
 static inline struct ar8xxx_priv *
diff --git a/target/linux/generic/files/drivers/net/phy/ar8327.c b/target/linux/generic/files/drivers/net/phy/ar8327.c
index a8d33a8..f26a310 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8327.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8327.c
@@ -1138,6 +1138,12 @@ static const struct switch_attr ar8327_sw_attr_globals[] = {
 		.set = NULL,
 		.get = ar8xxx_sw_get_arl_table,
 	},
+	{
+		.type = SWITCH_TYPE_NOVAL,
+		.name = "flush_arl_table",
+		.description = "Flush ARL table",
+		.set = ar8xxx_sw_set_flush_arl_table,
+	},
 };
 
 static const struct switch_attr ar8327_sw_attr_port[] = {
@@ -1162,6 +1168,12 @@ static const struct switch_attr ar8327_sw_attr_port[] = {
 		.get = ar8327_sw_get_eee,
 		.max = 1,
 	},
+	{
+		.type = SWITCH_TYPE_NOVAL,
+		.name = "flush_arl_table",
+		.description = "Flush port's ARL table entries",
+		.set = ar8xxx_sw_set_flush_port_arl_table,
+	},
 };
 
 static const struct switch_dev_ops ar8327_sw_ops = {
-- 
2.2.2
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From sscapi at gmail.com  Sat Jan 31 04:51:18 2015
From: sscapi at gmail.com (Sylwester Petela)
Date: Sat, 31 Jan 2015 10:51:18 +0100
Subject: [OpenWrt-Devel] p2812hnu-f1
In-Reply-To: <54CA05A6.6040903@gigabyte.getmyip.com>
References: <54CA05A6.6040903@gigabyte.getmyip.com>
Message-ID: <54CCA596.8030304@gmail.com>

W dniu 2015-01-29 o 11:04, Micha?l Zweers pisze:
> Hello ScApi,
>
> I have a short request: Can you add your dropbox link (https://www.dropbox.com/sh/movy1lhezgyhz2u/AABuA8_Vf6UHsugmVhU_Q5-ca?dl=0) to the ZyXEL P-2812HNU  wiki pages or maybe transfer the blops to a github repo and link that?
>
> Thanks in advance! 
>
> Kind regards,
> Micha?l
>
GitHub added to: http://wiki.openwrt.org/toh/zyxel/p2812hnu-fx

Best Regards / Pozdrawiam
Sylwester Petela / ScApi

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150131/1d972184/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

From cl at isbd.net  Sat Jan 31 05:52:12 2015
From: cl at isbd.net (Chris Green)
Date: Sat, 31 Jan 2015 10:52:12 +0000
Subject: [OpenWrt-Devel] [PATCH 1/4] ar8216: add reading ARL table for
 AR8216/AR8236/AR8316
In-Reply-To: <54CCA024.2050101@gmail.com>
References: <54CCA024.2050101@gmail.com>
Message-ID: <20150131105212.GC4316@esprimo>

On Sat, Jan 31, 2015 at 10:28:04AM +0100, Heiner Kallweit wrote:
> Adds the chip-specific part of reading ARL table for AR8216/AR8236/AR8316.
> 
> It's based on the AR8236 datasheet and compile-tested only as I couldn't
> find datasheets for AR8216/AR8316 and don't own devices with these chips.
> 
> The existing ar8216_atu_flush implementation was used for all three
> chip types, therefore I guess they share a common ATU register layout.
> 
> More testing would be appreciated.
> 
Does this relate to the issues I (and others) had with Mikrotek
Routerboard swithces not working?

I.e. would it be useful if I download and try the latest code?

(in my case I have an RB2011UiAS-2HnD)

-- 
Chris Green
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From hkallweit1 at gmail.com  Sat Jan 31 06:11:32 2015
From: hkallweit1 at gmail.com (Heiner Kallweit)
Date: Sat, 31 Jan 2015 12:11:32 +0100
Subject: [OpenWrt-Devel] [PATCH 1/4] ar8216: add reading ARL table for
 AR8216/AR8236/AR8316
In-Reply-To: <20150131105212.GC4316@esprimo>
References: <54CCA024.2050101@gmail.com> <20150131105212.GC4316@esprimo>
Message-ID: <54CCB864.2060008@gmail.com>

Am 31.01.2015 um 11:52 schrieb Chris Green:
> On Sat, Jan 31, 2015 at 10:28:04AM +0100, Heiner Kallweit wrote:
>> Adds the chip-specific part of reading ARL table for AR8216/AR8236/AR8316.
>>
>> It's based on the AR8236 datasheet and compile-tested only as I couldn't
>> find datasheets for AR8216/AR8316 and don't own devices with these chips.
>>
>> The existing ar8216_atu_flush implementation was used for all three
>> chip types, therefore I guess they share a common ATU register layout.
>>
>> More testing would be appreciated.
>>
> Does this relate to the issues I (and others) had with Mikrotek
> Routerboard swithces not working?
No. IIRC the Routerboard issues were related to some misconfigured clock
in the SoC. Please check the list archive.
> I.e. would it be useful if I download and try the latest code?
> 
> (in my case I have an RB2011UiAS-2HnD)
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From mhei at heimpold.de  Sat Jan 31 06:41:36 2015
From: mhei at heimpold.de (Michael Heimpold)
Date: Sat, 31 Jan 2015 12:41:36 +0100
Subject: [OpenWrt-Devel] Status of new standard ETSI EN 300 328 (ralink)
Message-ID: <4718339.YJnIxj0IMF@kerker>

Hi wifi gurus :-)

I recently learned that devices for the european market must fulfill the
new ETSI standard EN 300 328 V1.8.1 since 2015-01-01. I also understand
that most wifi chips require a firmware, often this is a binary vendor blob,
which is just uploaded into the chip. Then a hardware dependend wifi linux
driver adopts  to cfg80211 and mac80211 and so on...

So my question is: which parts must be changed to comply with this new
standard. I guess the firmware blob must provide several functions which
are used by drivers?
Next question is: what is the current state of this support in the ralink
driver, I have a rt5380 based device.

I googled a little bit around, but I only found this thread which is for atheros:
http://comments.gmane.org/gmane.linux.drivers.ath9k.devel/13280

So any further information would be welcome.

Thanks, Michael
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From cl at isbd.net  Sat Jan 31 06:57:49 2015
From: cl at isbd.net (Chris Green)
Date: Sat, 31 Jan 2015 11:57:49 +0000
Subject: [OpenWrt-Devel] [PATCH 1/4] ar8216: add reading ARL table for
 AR8216/AR8236/AR8316
In-Reply-To: <54CCB864.2060008@gmail.com>
References: <54CCA024.2050101@gmail.com> <20150131105212.GC4316@esprimo>
 <54CCB864.2060008@gmail.com>
Message-ID: <20150131115748.GA5517@esprimo>

On Sat, Jan 31, 2015 at 12:11:32PM +0100, Heiner Kallweit wrote:
> Am 31.01.2015 um 11:52 schrieb Chris Green:
> > On Sat, Jan 31, 2015 at 10:28:04AM +0100, Heiner Kallweit wrote:
> >> It's based on the AR8236 datasheet and compile-tested only as I couldn't
> >> find datasheets for AR8216/AR8316 and don't own devices with these chips.
> >>
> >> The existing ar8216_atu_flush implementation was used for all three
> >> chip types, therefore I guess they share a common ATU register layout.
> >>
> >> More testing would be appreciated.
> >>
> > Does this relate to the issues I (and others) had with Mikrotek
> > Routerboard swithces not working?
> No. IIRC the Routerboard issues were related to some misconfigured clock
> in the SoC. Please check the list archive.

OK, sorry, yes I have still got the discussion about this in my local
E-Mail.  I just wanted to be sure.

I'm also not sure if the fixes for the misconfigured clock got into
the current CC tree, that's really why I asked this question.  It
would be a pity if the fixes for Routerboard got lost.

-- 
Chris Green
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


From jow at openwrt.org  Sat Jan 31 07:59:02 2015
From: jow at openwrt.org (Jo-Philipp Wich)
Date: Sat, 31 Jan 2015 13:59:02 +0100
Subject: [OpenWrt-Devel] hardened openwrt & luci
In-Reply-To: <CAOdf3gpSjL2+yVPR1WfD3RgzWyR14KtTVEa1pVX1LqWGFM50wQ@mail.gmail.com>
References: <CAOdf3gpSjL2+yVPR1WfD3RgzWyR14KtTVEa1pVX1LqWGFM50wQ@mail.gmail.com>
Message-ID: <54CCD196.5080508@openwrt.org>

Hi.

> I've tested yesterday Openwrt CC (r44203) with all hardening options on
> PKG_CC_STACKPROTECTOR_STRONG
> KERNEL_CC_STACKPROTECTOR_STRONG
> PKG_FORTIFY_SOURCE_2
> PKG_RELRO_FULL
> 
> i've only done basic testing but it seems to work,
> except luci which send me bad gatway.

Execute /www/cgi-bin/luci on the cli.

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


From christian.schoenebeck at gmail.com  Sat Jan 31 09:00:47 2015
From: christian.schoenebeck at gmail.com (Christian Schoenebeck)
Date: Sat, 31 Jan 2015 15:00:47 +0100
Subject: [OpenWrt-Devel] cURL: implement new functionality with cleanup and
	fixes
Message-ID: <54CCE00F.5000909@gmail.com>

remove obsolete configuration settings
  --disable-thread
  --enable-nonblocking
  --without-krb4
remove SSPI support
  only supported on windows
correct --with/without-ca-path handling
  only supported with OpenSSL and PolarSSL
correct LDAP/LDAPS protocol
  add dependency libopenldap
added SCP/SFTP protocol
  default "No"
  depends on libssh2
added IDN support
  default "No"
  depends on libidn
added SMB protocol (new in 7.40)
  default "No"
  require 'cryptographic authentication' and either 'GnuTLS' or 'OpenSSL' selected
added Unix sockets support (new in 7.40)
  default "No"
added error verbose messages
  default "No"
changes to Makefile
  Increase PKG_RELEASE
  PKG_CONFIG_DEPENDS and CONFIGURE_ARGS
    extended for new functionality
    use "autoconf_bool" for all --enable/--disable options
    restructure for easier reading
changes to Config.in
  extended for new functionality
  implement dependencies
  restructure and grouping for easier reading
build tested on XUbuntu 14.10 x86 for x86 (generic) and ar71xx (WNDR3800)

Signed-off-by: Christian Schoenebeck <christian.schoenebeck at gmail.com>

---
 package/network/utils/curl/Config.in | 137 +++++++++++++++++++++++------------
 package/network/utils/curl/Makefile  | 114 ++++++++++++++++-------------
 2 files changed, 155 insertions(+), 96 deletions(-)

diff --git a/package/network/utils/curl/Config.in b/package/network/utils/curl/Config.in
index 87e5f99..11cfa39 100644
--- a/package/network/utils/curl/Config.in
+++ b/package/network/utils/curl/Config.in
@@ -1,111 +1,154 @@
 if PACKAGE_libcurl
 
+comment "SSL support"
+
 choice
-	prompt "SSL library"
+	prompt "Selected SSL library"
 	default LIBCURL_POLARSSL
 
-config LIBCURL_POLARSSL
-	bool "PolarSSL"
+	config LIBCURL_POLARSSL
+		bool "PolarSSL"
 
-config LIBCURL_CYASSL
-	bool "CyaSSL"
+	config LIBCURL_CYASSL
+		bool "CyaSSL"
 
-config LIBCURL_AXTLS
-	bool "axTLS"
+	config LIBCURL_AXTLS
+		bool "axTLS"
 
-config LIBCURL_OPENSSL
-	bool "OpenSSL"
+	config LIBCURL_OPENSSL
+		bool "OpenSSL"
 
-config LIBCURL_GNUTLS
-	bool "GNUTLS"
+	config LIBCURL_GNUTLS
+		bool "GNUTLS"
 
-config LIBCURL_NOSSL
-	bool "No SSL support"
+	config LIBCURL_NOSSL
+		bool "No SSL support"
 
 endchoice
 
-config LIBCURL_COOKIES
-	bool "Enable cookies support"
-	default y
-
-config LIBCURL_CRYPTO_AUTH
-	bool "Enable cryptographic authentication"
-	default n
+comment "Supported protocols"
 
 config LIBCURL_DICT
-	bool "Enable DICT support"
+	bool "DICT protocol"
 	default n
 
 config LIBCURL_FILE
-	bool "Enable FILE support"
+	bool "FILE protocol"
 	default y
 
 config LIBCURL_FTP
-	bool "Enable FTP support"
+	bool "FTP / FTPS protocol"
 	default y
 
 config LIBCURL_GOPHER
-	bool "Enable Gopher support"
+	bool "Gopher protocol"
 	default n
 
 config LIBCURL_HTTP
-	bool "Enable HTTP support"
+	bool "HTTP / HTTPS protocol"
+	default y
+
+config LIBCURL_COOKIES
+	bool "Enable Cookies support"
+	depends on LIBCURL_HTTP
 	default y
 
 config LIBCURL_IMAP
-	bool "Enable IMAP support"
+	bool "IMAP / IMAPS protocol"
 	default n
 
 config LIBCURL_LDAP
-	bool "Enable LDAP support"
+	bool "LDAP protocol"
 	default n
 
 config LIBCURL_LDAPS
 	bool "Enable LDAPS support"
+	depends on LIBCURL_LDAP && !LIBCURL_NOSSL
+	default y
+
+config LIBCURL_POP3
+	bool "POP3 / POP3S protocol"
 	default n
 
-config LIBCURL_LIBCURL_OPTION
-	bool "Enable --libcurl C code generation support"
+config LIBCURL_RTSP
+	bool "RTSP protocol"
+	depends on LIBCURL_HTTP
 	default n
+config LIBCURL_NO_RTSP
+	string "RTSP require HTTP protocol"
+	depends on !LIBCURL_HTTP
+	default "!"
 
-config LIBCURL_POP3
-	bool "Enable POP3 support"
+config LIBCURL_SSH2
+	bool "SCP / SFTP protocol"
+	default n
+
+config LIBCURL_SMB
+	bool "SMB protocol (CIFS)"
+	depends on LIBCURL_CRYPTO_AUTH && (LIBCURL_GNUTLS || LIBCURL_OPENSSL)
+	default n
+config LIBCURL_NO_SMB
+	string "SMB require 'cryptographic authentication' and either 'GnuTLS' or 'OpenSSL'"
+	depends on !LIBCURL_CRYPTO_AUTH || (!LIBCURL_GNUTLS && !LIBCURL_OPENSSL)
+	default "!"
+
+config LIBCURL_SMTP
+	bool "SMTP / SMTPS protocol"
 	default n
 
+config LIBCURL_TELNET
+	bool "TELNET protocol"
+	default n
+
+config LIBCURL_TFTP
+	bool "TFTP protocol"
+	default n
+
+comment "Miscellaneous"
+
 config LIBCURL_PROXY
 	bool "Enable proxy support"
 	default y
 
-config LIBCURL_RTSP
-	bool "Enable RTSP support"
+config LIBCURL_CRYPTO_AUTH
+	bool "Enable cryptographic authentication"
 	default n
 
-config LIBCURL_SMTP
-	bool "Enable SMTP support"
+config LIBCURL_TLS_SRP
+	bool "Enable TLS-SRP authentication"
 	default n
 
-config LIBCURL_SSPI
-	bool "Enable SSPI"
+config LIBCURL_LIBIDN
+	bool "Enable IDN support"
 	default n
 
-config LIBCURL_TELNET
-	bool "Enable TELNET support"
+config LIBCURL_THREADED_RESOLVER
+	bool "Enable threaded DNS resolver"
 	default n
+	help
+		Enable POSIX threaded asynchronous DNS resolution
 
-config LIBCURL_TFTP
-	bool "Enable TFTP support"
+config LIBCURL_ZLIB
+	bool "Enable zlib support"
 	default n
 
-config LIBCURL_THREADED_RESOLVER
-	bool "Enable threaded resolver"
+config LIBCURL_UNIX_SOCKETS
+	bool "Enable unix domain socket support"
 	default n
+	help
+		Enable HTTP over unix domain sockets.
+		To use this with the curl command line, you specify the socket path to the new --unix-domain option.
+		This feature is actually not limited to HTTP, you can do all the TCP-based protocols 
+		except FTP over the unix domain socket, but it is only HTTP that is regularly used this way. 
+		The reason FTP isn't supported is of course its use of two connections 
+		which would be even weirder to do like this.
 
-config LIBCURL_TLS-SRP
-	bool "Enable TLS-SRP authentication"
+config LIBCURL_LIBCURL_OPTION
+	bool "Enable generation of C code"
 	default n
 
-config LIBCURL_ZLIB
-	bool "Use zlib"
+config LIBCURL_VERBOSE
+	bool "Enable verbose error strings"
 	default n
 
 endif
diff --git a/package/network/utils/curl/Makefile b/package/network/utils/curl/Makefile
index 7274e2c..6da3a66 100644
--- a/package/network/utils/curl/Makefile
+++ b/package/network/utils/curl/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=curl
 PKG_VERSION:=7.40.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://curl.haxx.se/download/ \
@@ -26,34 +26,45 @@ PKG_LICENSE_FILES:=COPYING
 PKG_FIXUP:=autoreconf
 PKG_BUILD_PARALLEL:=1
 
-PKG_CONFIG_DEPENDS := \
+PKG_CONFIG_DEPENDS:= \
+  CONFIG_IPV6 \
+  \
   LIBCURL_AXTLS \
-  LIBCURL_COOKIES \
-  LIBCURL_CRYPTO_AUTH \
   LIBCURL_CYASSL \
+  LIBCURL_GNUTLS \
+  LIBCURL_OPENSSL \
+  LIBCURL_POLARSSL \
+  LIBCURL_NOSSL \
+  \
+  LIBCURL_LIBIDN \
+  LIBCURL_SSH2 \
+  LIBCURL_ZLIB \
+  \
   LIBCURL_DICT \
   LIBCURL_FILE \
   LIBCURL_FTP \
-  LIBCURL_GNUTLS \
   LIBCURL_GOPHER \
   LIBCURL_HTTP \
   LIBCURL_IMAP \
   LIBCURL_LDAP \
   LIBCURL_LDAPS \
-  LIBCURL_LIBCURL_OPTION \
-  LIBCURL_NOSSL \
-  LIBCURL_OPENSSL \
-  LIBCURL_POLARSSL \
   LIBCURL_POP3 \
-  LIBCURL_PROXY \
   LIBCURL_RTSP \
+  LIBCURL_NO_RTSP \
+  LIBCURL_SMB \
+  LIBCURL_NO_SMB \
   LIBCURL_SMTP \
-  LIBCURL_SSPI \
   LIBCURL_TELNET \
   LIBCURL_TFTP \
+  \
+  LIBCURL_COOKIES \
+  LIBCURL_CRYPTO_AUTH \
+  LIBCURL_LIBCURL_OPTION \
+  LIBCURL_PROXY \
   LIBCURL_THREADED_RESOLVER \
-  LIBCURL_TLS-SRP \
-  LIBCURL_ZLIB
+  LIBCURL_TLS_SRP \
+  LIBCURL_UNIX_SOCKETS \
+  LIBCURL_VERBOSE \
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -75,8 +86,9 @@ define Package/libcurl
   $(call Package/curl/Default)
   SECTION:=libs
   CATEGORY:=Libraries
-  DEPENDS:=+LIBCURL_POLARSSL:libpolarssl +LIBCURL_CYASSL:libcyassl +LIBCURL_AXTLS:libaxtls +LIBCURL_OPENSSL:libopenssl +LIBCURL_GNUTLS:libgnutls +LIBCURL_ZLIB:zlib +LIBCURL_THREADED_RESOLVER:libpthread
-  TITLE:=A client-side URL transfer library using $(if $(CONFIG_LIBCURL_POLARSSL),PolarSSL)$(if $(CONFIG_LIBCURL_OPENSSL),OpenSSL)$(if $(CONFIG_LIBCURL_GNUTLS),GNUTLS)$(if $(CONFIG_LIBCURL_NOSSL),no SSL)
+  DEPENDS:=+LIBCURL_POLARSSL:libpolarssl +LIBCURL_CYASSL:libcyassl +LIBCURL_AXTLS:libaxtls +LIBCURL_OPENSSL:libopenssl +LIBCURL_GNUTLS:libgnutls 
+  DEPENDS += +LIBCURL_ZLIB:zlib +LIBCURL_THREADED_RESOLVER:libpthread +LIBCURL_LDAP:libopenldap +LIBCURL_LIBIDN:libidn +LIBCURL_SSH2:libssh2
+  TITLE:=A client-side URL transfer library
   MENU:=1
 endef
 
@@ -88,47 +100,51 @@ endef
 TARGET_CFLAGS += $(FPIC)
 
 CONFIGURE_ARGS += \
+	--disable-debug \
+	--disable-ares \
 	--enable-shared \
 	--enable-static \
-	--disable-thread \
-	--enable-nonblocking \
-	--disable-ares \
-	--disable-debug \
 	--disable-manual \
-	--disable-verbose \
 	--without-ca-bundle \
-	$(if $(CONFIG_LIBCURL_NOSSL),,--with-ca-path=/etc/ssl/certs/) \
-	--without-krb4 \
-	--without-libidn \
 	--without-nss \
-	--without-libssh2 \
+	--without-libmetalink \
+	--without-librtmp \
+	\
 	$(call autoconf_bool,CONFIG_IPV6,ipv6) \
-	$(if $(CONFIG_LIBCURL_AXTLS),--with-axtls="$(STAGING_DIR)/usr",--without-axtls) \
-	$(if $(CONFIG_LIBCURL_COOKIES),--enable,--disable)-cookies \
-	$(if $(CONFIG_LIBCURL_CRYPTO_AUTH),--enable,--disable)-crypto-auth \
-	$(if $(CONFIG_LIBCURL_CYASSL),--with-cyassl="$(STAGING_DIR)/usr",--without-cyassl) \
-	$(if $(CONFIG_LIBCURL_DICT),--enable,--disable)-dict \
-	$(if $(CONFIG_LIBCURL_FILE),--enable,--disable)-file \
-	$(if $(CONFIG_LIBCURL_FTP),--enable,--disable)-ftp \
-	$(if $(CONFIG_LIBCURL_GOPHER),--enable,--disable)-gopher \
-	$(if $(CONFIG_LIBCURL_GNUTLS),--with-gnutls="$(STAGING_DIR)/usr",--without-gnutls) \
-	$(if $(CONFIG_LIBCURL_HTTP),--enable,--disable)-http \
-	$(if $(CONFIG_LIBCURL_IMAP),--enable,--disable)-imap \
-	$(if $(CONFIG_LIBCURL_LDAP),--enable,--disable)-ldap \
-	$(if $(CONFIG_LIBCURL_LDAPS),--enable,--disable)-ldaps \
-	$(if $(CONFIG_LIBCURL_LIBCURL_OPTION),--enable,--disable)-libcurl-option \
-	$(if $(CONFIG_LIBCURL_OPENSSL),--with-ssl="$(STAGING_DIR)/usr",--without-ssl) \
-	$(if $(CONFIG_LIBCURL_POLARSSL),--with-polarssl="$(STAGING_DIR)/usr",--without-polarssl) \
-	$(if $(CONFIG_LIBCURL_POP3),--enable,--disable)-pop3 \
-	$(if $(CONFIG_LIBCURL_PROXY),--enable,--disable)-proxy \
-	$(if $(CONFIG_LIBCURL_RTSP),--enable,--disable)-rtsp \
-	$(if $(CONFIG_LIBCURL_TELNET),--enable,--disable)-telnet \
-	$(if $(CONFIG_LIBCURL_TFTP),--enable,--disable)-tftp \
-	$(if $(CONFIG_LIBCURL_SMTP),--enable,--disable)-smtp \
-	$(if $(CONFIG_LIBCURL_SSPI),--enable,--disable)-sspi \
-	$(if $(CONFIG_LIBCURL_THREADED_RESOLVER),--enable,--disable)-threaded-resolver \
-	$(if $(CONFIG_LIBCURL_TLS-SRP),--enable,--disable)-tls-srp \
+	\
+	$(if $(CONFIG_LIBCURL_AXTLS),--with-axtls="$(STAGING_DIR)/usr" --without-ca-path,--without-axtls) \
+	$(if $(CONFIG_LIBCURL_CYASSL),--with-cyassl="$(STAGING_DIR)/usr" --without-ca-path,--without-cyassl) \
+	$(if $(CONFIG_LIBCURL_GNUTLS),--with-gnutls="$(STAGING_DIR)/usr" --without-ca-path,--without-gnutls) \
+	$(if $(CONFIG_LIBCURL_OPENSSL),--with-ssl="$(STAGING_DIR)/usr" --with-ca-path=/etc/ssl/certs,--without-ssl) \
+	$(if $(CONFIG_LIBCURL_POLARSSL),--with-polarssl="$(STAGING_DIR)/usr" --with-ca-path=/etc/ssl/certs,--without-polarssl) \
+	\
+	$(if $(CONFIG_LIBCURL_LIBIDN),--with-libidn="$(STAGING_DIR)/usr",--without-libidn) \
+	$(if $(CONFIG_LIBCURL_SSH2),--with-libssh2="$(STAGING_DIR)/usr",--without-libssh2) \
 	$(if $(CONFIG_LIBCURL_ZLIB),--with-zlib="$(STAGING_DIR)/usr",--without-zlib) \
+	\
+	$(call autoconf_bool,CONFIG_LIBCURL_DICT,dict) \
+	$(call autoconf_bool,CONFIG_LIBCURL_FILE,file) \
+	$(call autoconf_bool,CONFIG_LIBCURL_FTP,ftp) \
+	$(call autoconf_bool,CONFIG_LIBCURL_GOPHER,gopher) \
+	$(call autoconf_bool,CONFIG_LIBCURL_HTTP,http) \
+	$(call autoconf_bool,CONFIG_LIBCURL_IMAP,imap) \
+	$(call autoconf_bool,CONFIG_LIBCURL_LDAP,ldap) \
+	$(call autoconf_bool,CONFIG_LIBCURL_LDAPS,ldaps) \
+	$(call autoconf_bool,CONFIG_LIBCURL_POP3,pop3) \
+	$(call autoconf_bool,CONFIG_LIBCURL_RTSP,rtsp) \
+	$(call autoconf_bool,CONFIG_LIBCURL_SMB,smb) \
+	$(call autoconf_bool,CONFIG_LIBCURL_SMTP,smtp) \
+	$(call autoconf_bool,CONFIG_LIBCURL_TELNET,telnet) \
+	$(call autoconf_bool,CONFIG_LIBCURL_TFTP,tftp) \
+	\
+	$(call autoconf_bool,CONFIG_LIBCURL_COOKIES,cookies) \
+	$(call autoconf_bool,CONFIG_LIBCURL_CRYPTO_AUTH,crypto-auth) \
+	$(call autoconf_bool,CONFIG_LIBCURL_LIBCURL_OPTION,libcurl-option) \
+	$(call autoconf_bool,CONFIG_LIBCURL_PROXY,proxy) \
+	$(call autoconf_bool,CONFIG_LIBCURL_THREADED_RESOLVER,threaded-resolver) \
+	$(call autoconf_bool,CONFIG_LIBCURL_TLS_SRP,tls-srp) \
+	$(call autoconf_bool,CONFIG_LIBCURL_UNIX_SOCKETS,unix-sockets) \
+	$(call autoconf_bool,CONFIG_LIBCURL_VERBOSE,verbose) \
 
 define Build/Compile
 	+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
-- 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


