[U-Boot] Pull request: u-boot-spi/master

2015-07-04 Thread Jagan Teki
Hi Tom,

Please pull this PR.

thanks!
Jagan.

The following changes since commit 891b487098ee2169a16b1bbb354aaef28aa90630:

  Merge branch 'master' of git://git.denx.de/u-boot-spi (2015-07-01 15:38:12 
-0400)

are available in the git repository at:


  git://git.denx.de/u-boot-spi.git master

for you to fetch changes up to 8097cba809d8c40d8fe72f792c7dc0644c845a32:

  spi: cadence_qspi: add device tree binding doc (2015-07-03 13:50:53 +0530)


Vikas Manocha (10):
  stv0991: enable saving enrironment in spi flash
  stv0991: move OF_CONTROL config to defconfig
  stv0991: remove define CONFIG_OF_SEPARATE from board file
  stv0991: configure clock  pad muxing for qspi
  stv0991: enable cadence qspi controller  spi flash
  stv0991: configure device tree for cadence qspi  flash
  spi: cadence_qspi: move the sram partition in init
  spi: cadence_qspi: get sram size from device tree
  spi: cadence_qspi: support FIFO width other than 4 bytes
  spi: cadence_qspi: add device tree binding doc

 arch/arm/Kconfig   |  3 ++
 arch/arm/cpu/armv7/stv0991/clock.c |  4 +-
 arch/arm/cpu/armv7/stv0991/pinmux.c|  5 ++
 arch/arm/dts/socfpga.dtsi  |  1 +
 arch/arm/dts/stv0991.dts   | 30 +++
 arch/arm/include/asm/arch-stv0991/stv0991_cgu.h| 15 ++
 arch/arm/include/asm/arch-stv0991/stv0991_creg.h   |  9 
 arch/arm/include/asm/arch-stv0991/stv0991_periph.h |  2 +
 board/st/stv0991/stv0991.c |  8 +++
 configs/stv0991_defconfig  |  2 +-
 doc/device-tree-bindings/spi/spi-cadence.txt   | 28 ++
 drivers/spi/cadence_qspi.c |  1 +
 drivers/spi/cadence_qspi.h |  1 +
 drivers/spi/cadence_qspi_apb.c | 62 +-
 include/configs/stv0991.h  | 21 ++--
 15 files changed, 151 insertions(+), 41 deletions(-)
 create mode 100644 doc/device-tree-bindings/spi/spi-cadence.txt
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 1/5] arm1176/cpu: Match cache_flush to arm1136

2015-07-04 Thread Alexander Stein
This is effectively the same code but it also does a clean cache before
invalidating and doing a memory barrier.

Signed-off-by: Alexander Stein alexander...@web.de
---
 arch/arm/cpu/arm1176/cpu.c | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/arch/arm/cpu/arm1176/cpu.c b/arch/arm/cpu/arm1176/cpu.c
index 2d81651..24b5cc7 100644
--- a/arch/arm/cpu/arm1176/cpu.c
+++ b/arch/arm/cpu/arm1176/cpu.c
@@ -41,11 +41,13 @@ int cleanup_before_linux (void)
return 0;
 }
 
-/* flush I/D-cache */
-static void cache_flush (void)
+static void cache_flush(void)
 {
+   unsigned long i = 0;
+   /* clean entire data cache */
+   asm volatile(mcr p15, 0, %0, c7, c10, 0 : : r (i));
/* invalidate both caches and flush btb */
-   asm (mcr p15, 0, %0, c7, c7, 0: :r (0));
+   asm volatile(mcr p15, 0, %0, c7, c7, 0 : : r (i));
/* mem barrier to sync things */
-   asm (mcr p15, 0, %0, c7, c10, 4: :r (0));
+   asm volatile(mcr p15, 0, %0, c7, c10, 4 : : r (i));
 }
-- 
2.4.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 4/5] arm/mach-bcm283x/mbox: Flush and invalidate dcache when using fw mailbox

2015-07-04 Thread Alexander Stein
When using dcache the setup data for the mailbox must be actually written
into memory before calling into firmware. Thus flush and invalidate the
memory.

Signed-off-by: Alexander Stein alexander...@web.de
---
 arch/arm/mach-bcm283x/mbox.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm/mach-bcm283x/mbox.c b/arch/arm/mach-bcm283x/mbox.c
index 1af9be7..237c76c 100644
--- a/arch/arm/mach-bcm283x/mbox.c
+++ b/arch/arm/mach-bcm283x/mbox.c
@@ -111,6 +111,12 @@ int bcm2835_mbox_call_prop(u32 chan, struct 
bcm2835_mbox_hdr *buffer)
dump_buf(buffer);
 #endif
 
+   flush_dcache_range((unsigned long)buffer,
+  (unsigned long)((void *)buffer +
+  buffer-buf_size));
+   invalidate_dcache_range((unsigned long)buffer,
+   (unsigned long)((void *)buffer +
+   buffer-buf_size));
ret = bcm2835_mbox_call_raw(chan, phys_to_bus((u32)buffer), rbuffer);
if (ret)
return ret;
-- 
2.4.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 0/5] dcache support for Raspberry Pi 1

2015-07-04 Thread Alexander Stein
This patchset enables dcache support for Raspberry Pi 1.
First the cache support code was made similar to existing arm1136 code.
The invalidate and flush functions were inprovoed to accept also non-cacheline
aligned addresses. This reduces the cacheline size knowledge from generic
code.
Then rpi mailbox code has now dcache flush for writing the mailbox request and
a dcache invalidation for receiving the mailbox answer.
Finally the CONFIG_SYS_DCACHE_OFF switch got removed from rpi config.

dcache supprt increases the MMC read performance on RPI 1 from 5,4 MiB/s to
12.3 MiB/s. It doesn't seem to have any affect on RPI 2 though. I just get
error messages about non-cacheline aligned address upon invalidation.
The performance stucks at 1.2 MiB/s.

This was tested by the following command:
 fatload mmc 0:1 ${kernel_addr_r} zImage

Alexander Stein (5):
  arm1176/cpu: Match cache_flush to arm1136
  arm1176/cpu: Add icache and dcache support
  arm1176/cpu: Align cache flushing addresses to cacheline size
  arm/mach-bcm283x/mbox: Flush and invalidate dcache when using fw
mailbox
  arm/rpi: Enable dcache

 arch/arm/cpu/arm1176/cpu.c   | 114 +--
 arch/arm/mach-bcm283x/mbox.c |   6 +++
 include/configs/rpi-common.h |   1 -
 3 files changed, 116 insertions(+), 5 deletions(-)

-- 
2.4.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 2/5] arm1176/cpu: Add icache and dcache support

2015-07-04 Thread Alexander Stein
The code is copied 1:1 from arm1136 which uses the same cp15 registers.

Signed-off-by: Alexander Stein alexander...@web.de
---
 arch/arm/cpu/arm1176/cpu.c | 97 ++
 1 file changed, 97 insertions(+)

diff --git a/arch/arm/cpu/arm1176/cpu.c b/arch/arm/cpu/arm1176/cpu.c
index 24b5cc7..2ff0e25 100644
--- a/arch/arm/cpu/arm1176/cpu.c
+++ b/arch/arm/cpu/arm1176/cpu.c
@@ -51,3 +51,100 @@ static void cache_flush(void)
/* mem barrier to sync things */
asm volatile(mcr p15, 0, %0, c7, c10, 4 : : r (i));
 }
+
+#ifndef CONFIG_SYS_DCACHE_OFF
+
+#ifndef CONFIG_SYS_CACHELINE_SIZE
+#define CONFIG_SYS_CACHELINE_SIZE  32
+#endif
+
+void invalidate_dcache_all(void)
+{
+   asm volatile(mcr p15, 0, %0, c7, c6, 0 : : r (0));
+}
+
+void flush_dcache_all(void)
+{
+   asm volatile(mcr p15, 0, %0, c7, c10, 0 : : r (0));
+   asm volatile(mcr p15, 0, %0, c7, c10, 4 : : r (0));
+}
+
+static int check_cache_range(unsigned long start, unsigned long stop)
+{
+   int ok = 1;
+
+   if (start  (CONFIG_SYS_CACHELINE_SIZE - 1))
+   ok = 0;
+
+   if (stop  (CONFIG_SYS_CACHELINE_SIZE - 1))
+   ok = 0;
+
+   if (!ok)
+   debug(CACHE: Misaligned operation at range [%08lx, %08lx]\n,
+   start, stop);
+
+   return ok;
+}
+
+void invalidate_dcache_range(unsigned long start, unsigned long stop)
+{
+   if (!check_cache_range(start, stop))
+   return;
+
+   while (start  stop) {
+   asm volatile(mcr p15, 0, %0, c7, c6, 1 : : r (start));
+   start += CONFIG_SYS_CACHELINE_SIZE;
+   }
+}
+
+void flush_dcache_range(unsigned long start, unsigned long stop)
+{
+   if (!check_cache_range(start, stop))
+   return;
+
+   while (start  stop) {
+   asm volatile(mcr p15, 0, %0, c7, c14, 1 : : r (start));
+   start += CONFIG_SYS_CACHELINE_SIZE;
+   }
+
+   asm volatile(mcr p15, 0, %0, c7, c10, 4 : : r (0));
+}
+
+void flush_cache(unsigned long start, unsigned long size)
+{
+   flush_dcache_range(start, start + size);
+}
+
+#else /* #ifndef CONFIG_SYS_DCACHE_OFF */
+void invalidate_dcache_all(void)
+{
+}
+
+void flush_dcache_all(void)
+{
+}
+
+void invalidate_dcache_range(unsigned long start, unsigned long stop)
+{
+}
+
+void flush_dcache_range(unsigned long start, unsigned long stop)
+{
+}
+
+void flush_cache(unsigned long start, unsigned long size)
+{
+}
+#endif /* #ifndef CONFIG_SYS_DCACHE_OFF */
+
+#if !defined(CONFIG_SYS_ICACHE_OFF) || !defined(CONFIG_SYS_DCACHE_OFF)
+void enable_caches(void)
+{
+#ifndef CONFIG_SYS_ICACHE_OFF
+   icache_enable();
+#endif
+#ifndef CONFIG_SYS_DCACHE_OFF
+   dcache_enable();
+#endif
+}
+#endif
-- 
2.4.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 3/5] arm1176/cpu: Align cache flushing addresses to cacheline size

2015-07-04 Thread Alexander Stein
cache flushing addresses must be cacheline size aligned, so mask the
start and stop address appropriately.

Signed-off-by: Alexander Stein alexander...@web.de
---
 arch/arm/cpu/arm1176/cpu.c | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/cpu/arm1176/cpu.c b/arch/arm/cpu/arm1176/cpu.c
index 2ff0e25..5ac8e79 100644
--- a/arch/arm/cpu/arm1176/cpu.c
+++ b/arch/arm/cpu/arm1176/cpu.c
@@ -57,6 +57,7 @@ static void cache_flush(void)
 #ifndef CONFIG_SYS_CACHELINE_SIZE
 #define CONFIG_SYS_CACHELINE_SIZE  32
 #endif
+#define CACHLINE_MASK (CONFIG_SYS_CACHELINE_SIZE - 1)
 
 void invalidate_dcache_all(void)
 {
@@ -88,6 +89,9 @@ static int check_cache_range(unsigned long start, unsigned 
long stop)
 
 void invalidate_dcache_range(unsigned long start, unsigned long stop)
 {
+   stop = (stop + CACHLINE_MASK)  ~CACHLINE_MASK;
+   start = ~CACHLINE_MASK;
+
if (!check_cache_range(start, stop))
return;
 
@@ -99,6 +103,9 @@ void invalidate_dcache_range(unsigned long start, unsigned 
long stop)
 
 void flush_dcache_range(unsigned long start, unsigned long stop)
 {
+   stop = (stop + CACHLINE_MASK)  ~CACHLINE_MASK;
+   start = ~CACHLINE_MASK;
+
if (!check_cache_range(start, stop))
return;
 
-- 
2.4.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 5/5] arm/rpi: Enable dcache

2015-07-04 Thread Alexander Stein
Now that mailbox driver supports cache flush and invalidation, we can
enable dcache.

Signed-off-by: Alexander Stein alexander...@web.de
---
 include/configs/rpi-common.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/configs/rpi-common.h b/include/configs/rpi-common.h
index 1012cdd..dd638c4 100644
--- a/include/configs/rpi-common.h
+++ b/include/configs/rpi-common.h
@@ -14,7 +14,6 @@
 #define CONFIG_SYS_GENERIC_BOARD
 #define CONFIG_BCM2835
 #define CONFIG_ARCH_CPU_INIT
-#define CONFIG_SYS_DCACHE_OFF
 
 #define CONFIG_SYS_TIMER_RATE  100
 #define CONFIG_SYS_TIMER_COUNTER   \
-- 
2.4.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] New sunxi board: Lamobo Bananapi R1

2015-07-04 Thread Hans de Goede

Hi Fabioca,

On 15-06-15 15:17, fabioca wrote:

Please find patch below. I indicated as maintainer name Hans The Goede, as he
his the maintainer of all other sunxi boards. Hope that was the correct
thing to do.


For the next version of this patch please set the MAINTAINERS entry to
yourself, I do not have such a board so I cannot maintain it.


Fabio

commit dacdf4dc3174ef1e86884c7d47700abad19b5bb3
Author: Fabio Cannizzo fabio_canni...@yahoo.com
Date:   Sun Jun 14 21:22:21 2015 +0800

 ARM: sun7i: Add config and dts file for Lamobo bananapi R1 board.

 The config file is a copy of the one for bananapi

 This dts file is an almost exact copy of the one for bananapi, except
for the following differences:
 - changed the device name
 - overriden the value of PB3 to pull-up, to allow SATA to work with the
standard u-boot parameters
 Perhaps soemone with more experience of dts files should create an
include file with all common definitions.


Have you submitted the dts file for inclusion into the upstream kernel already?

Also please change the name to not use bananapi in imt, the bananaFOO boards
are made by lemaker.org and this is not a lemaker board, the print on the board
itself calls it the lamobo-rq, as does the linux-sunxi community page and
the lamobo page:

http://linux-sunxi.org/Lamobo_R1
http://www.lamobo.com/lamobor.html

So please call the defconfig Lamobo_R1_defconfig and the dts file
sun7i-a20-lamobo-r1.dts

And set the model and compatible fields in the dts
accordingly.

Also I understand that a CONFIG_GMAC_TX_DELAY=4 may be better
for this board, have you tested this ?

Regards,

Hans





---
View this message in context: 
http://u-boot.10912.n7.nabble.com/New-sunxi-board-Lamobo-Bananapi-R1-tp217120.html
Sent from the U-Boot mailing list archive at Nabble.com.

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 9c735c6..a32d772 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -103,6 +103,7 @@ dtb-$(CONFIG_MACH_SUN7I) += \
sun7i-a20-ainol-aw1.dtb \
sun7i-a20-bananapi.dtb \
sun7i-a20-bananapro.dtb \
+   sun7i-a20-bananapir1.dtb \
sun7i-a20-cubieboard2.dtb \
sun7i-a20-cubietruck.dtb \
sun7i-a20-hummingbird.dtb \
diff --git a/arch/arm/dts/sun7i-a20-bananapir1.dts
b/arch/arm/dts/sun7i-a20-bananapir1.dts
new file mode 100644
index 000..a77fb5c
--- /dev/null
+++ b/arch/arm/dts/sun7i-a20-bananapir1.dts
@@ -0,0 +1,231 @@
+/*
+ * Copyright 2014 Hans de Goede hdego...@redhat.com
+ *
+ * Hans de Goede hdego...@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 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 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.
+ *
+ * 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/gpio/gpio.h
+#include dt-bindings/interrupt-controller/irq.h
+#include dt-bindings/pinctrl/sun4i-a10.h
+
+/ {
+   model = Lamobo Banana Pi R1;
+   compatible = lemaker,bananapi, allwinner,sun7i-a20;
+
+   aliases {
+   serial0 = uart0;
+   serial1 = uart3;
+   serial2 = uart7;
+   };
+
+   

Re: [U-Boot] [PATCH v2 0/8] JFFS2 fixes and performance improvements

2015-07-04 Thread Chris Packham
Mark,

On Wed, Jul 1, 2015 at 4:38 PM, Mark Tomlinson
mark.tomlin...@alliedtelesis.co.nz wrote:

 In reply to comments from Wolfgang Denk and Heiko Schocher:

I think you forgot to Cc Wolfgang and Heiko on this. Ditto with the
updated patches Heiko reviewed from v1.

 My aim was to optimize U-Boot's loading of a JFFS2 file, since we needed to
 boot much more quickly on one of our devices than we currently were. We had
 discussed the possibility of abandoning JFFS2 entirely, but chose to see
 how quickly JFFS2 could be made to work. We also knew that Linux would
 mount this file system much quicker than u-boot did, so knew that at least
 some speed improvement was possible.

 The improvments was from three sources: (1) searching U-Boot mailing list
 archives, (2) looking at the linux kernel, and (3) our own measurements and
 improvements. For example, the merge sort (before my modifications) can be
 found here: http://lists.denx.de/pipermail/u-boot/2007-January/018777.html

 Two of the patches were inspired from the Linux kernel: Changing scansize,
 and recognising the CLEANMARKER. While trying to synchronize U-Boot code
 with Linux sounds like a good idea, I think this wouldn't be the right way
 to go, since Linux needs to also build lists of blocks which are empty, and
 a list of blocks that still need to be erased. Stripping this out is more
 work than just enhancing what U-Boot currently has.

 === Original cover message follows ===

 These patches fix bugs and improve performance of JFFS2. Some of these
 improvements can already be found in old mailing lists, but for some
 reason they have not made their way into the u-boot source. I have the
 feeling that any one of these patches didn't show enough performance gain
 to warrant adding it to the source. I am hopeful that together, all these
 patches can be seen to make a big difference.

 One of these patches (Only list each directory entry once) is a bug fix,
 all the rest are for performance. Although performance is not high on the
 priority list for a bootloader, the length of time it was taking to scan
 a JFFS2 filesystem was painfully slow.

 The code for mergesort was found in an abandoned u-boot patch, although I
 have refactored the code somewhat. The original author is still shown at
 the top of that file.

 The timings below are with jffs2_summary_support turned off. With these
 improvements, summary support was no longer useful - most of our time is
 now spent loading the actual release. Even without this feature turned on,
 the code will still load from a filesystem that has summary nodes.

 Due to not having other resources, I also have not done anything for NAND
 flash. At least some of these changes will be directly applicable to NAND
 as well as NOR.

 My own testing is on a system with a 1GHz PowerPC, and 256MB of NOR Flash.
 The flash accesses are slow compared with processing power and RAM, so
 minimising the number of flash accesses makes a huge difference. Here are
 the timing comparisons for three JFFS2 operations on this system:
 1) Scanning the file system
 2) Getting a director listing of the top level, and
 3) Loading a 30MB file.

 Times are in seconds, and the contribution from each patch has been
 measured:

  ScanListLoadTotal
 Original:   266.017.323.4   306.7
 Speed up comparison: 52.317.323.493.0
 List dir entries once:   52.311.023.486.7
 Improve read speed:  52.3 0.8 5.458.5
 Optimize building lists: 31.9 0.8 5.438.1
 Change scansize: 30.8 0.8 5.437.0
 Use cleanmarker: 16.0 0.8 5.422.2
 Use mergesort:2.0 0.8 5.4 8.2

 Note that List dir entries once is not a speed improvement as such, but
 because old versions of a file and deleted files are no longer scanned,
 there is an improvement on this filesystem (the flash is approx half full).

 Also, change scansize appears to do very little in this benchmark list.
 But without it, the use cleanmarker would not show as much improvement.

 Changes in v2:
 - Fix comment style
 - Remove extra {} pair.
 - Changed comment style.
 - Fixed some missing calls to put_fl_mem().
 - Change comment style
 - Change comment style
 - Changed comment style
 - Changed copyright notice to use SPDX-Licence-Identifier.
 - Added URL to original mergesort code.
 - Removed #ifdef, using Makefile change instead.

 Mark Tomlinson (8):
   JFFS2: Return early when file read not necessary
   JFFS2: Speed up and fix comparison functions
   JFFS2: Only list each directory entry once
   JFFS2: Improve speed reading flash files
   JFFS2: Optimize building lists during scan
   JFFS2: Change scansize to match linux kernel
   JFFS2: Use CLEANMARKER to reduce scanning time
   JFFS2: Use merge sort when parsing filesystem

  fs/jffs2/Makefile|   1 +
  fs/jffs2/jffs2_1pass.c   | 257 
 ++-
 

Re: [U-Boot] [PATCH v2 1/4] usb: USB download gadget and functions config options coherent naming

2015-07-04 Thread Paul Kocialkowski
Le vendredi 12 juin 2015 à 19:56 +0200, Paul Kocialkowski a écrit :
 This introduces a coherent scheme for naming USB download gadget and functions
 config options. The download USB gadget config option is moved to
 CONFIG_USB_GADGET_DOWNLOAD for better consistency with other gadgets and each
 function's config option is moved to a CONFIG_USB_FUNCTION_ prefix.

Lukasz, does that series look good to you (now that there is Odroid XU3
support too)? Could this be merged soon?

Thanks!

 Signed-off-by: Paul Kocialkowski cont...@paulk.fr
 ---
  README| 2 +-
  board/samsung/common/Makefile | 2 +-
  board/siemens/common/factoryset.c | 4 ++--
  doc/README.android-fastboot   | 2 +-
  drivers/dfu/Makefile  | 2 +-
  drivers/usb/gadget/Makefile   | 8 
  include/configs/am335x_evm.h  | 4 ++--
  include/configs/am43xx_evm.h  | 4 ++--
  include/configs/bav335x.h | 6 +++---
  include/configs/colibri_vf.h  | 6 +++---
  include/configs/dra7xx_evm.h  | 4 ++--
  include/configs/exynos4-common.h  | 8 
  include/configs/gw_ventana.h  | 4 ++--
  include/configs/mx6sabre_common.h | 4 ++--
  include/configs/nitrogen6x.h  | 4 ++--
  include/configs/odroid_xu3.h  | 8 
  include/configs/omap3_beagle.h| 2 +-
  include/configs/s5p_goni.h| 8 
  include/configs/siemens-am33x-common.h| 4 ++--
  include/configs/socfpga_common.h  | 6 +++---
  include/configs/tbs2910.h | 4 ++--
  include/configs/tegra-common-usb-gadget.h | 6 +++---
  include/configs/warp.h| 6 +++---
  include/configs/zynq-common.h | 6 +++---
  24 files changed, 57 insertions(+), 57 deletions(-)
 
 diff --git a/README b/README
 index 119bbc9..f404812 100644
 --- a/README
 +++ b/README
 @@ -1675,7 +1675,7 @@ The following options need to be configured:
   key for the Replay Protection Memory Block partition in eMMC.
  
  - USB Device Firmware Update (DFU) class support:
 - CONFIG_DFU_FUNCTION
 + CONFIG_USB_FUNCTION_DFU
   This enables the USB portion of the DFU USB class
  
   CONFIG_CMD_DFU
 diff --git a/board/samsung/common/Makefile b/board/samsung/common/Makefile
 index 93347ef..5fb01ce 100644
 --- a/board/samsung/common/Makefile
 +++ b/board/samsung/common/Makefile
 @@ -6,7 +6,7 @@
  #
  
  obj-$(CONFIG_SOFT_I2C_MULTI_BUS) += multi_i2c.o
 -obj-$(CONFIG_USBDOWNLOAD_GADGET) += gadget.o
 +obj-$(CONFIG_USB_GADGET_DOWNLOAD) += gadget.o
  obj-$(CONFIG_MISC_COMMON) += misc.o
  
  ifndef CONFIG_SPL_BUILD
 diff --git a/board/siemens/common/factoryset.c 
 b/board/siemens/common/factoryset.c
 index d81f548..6c869ed 100644
 --- a/board/siemens/common/factoryset.c
 +++ b/board/siemens/common/factoryset.c
 @@ -144,7 +144,7 @@ int factoryset_read_eeprom(int i2c_addr)
   unsigned char eeprom_buf[0x3c00], hdr[4], buf[MAX_STRING_LENGTH];
   unsigned char *cp, *cp1;
  
 -#if defined(CONFIG_DFU_FUNCTION)
 +#if defined(CONFIG_USB_FUNCTION_DFU)
   factory_dat.usb_vendor_id = CONFIG_G_DNL_VENDOR_NUM;
   factory_dat.usb_product_id = CONFIG_G_DNL_PRODUCT_NUM;
  #endif
 @@ -202,7 +202,7 @@ int factoryset_read_eeprom(int i2c_addr)
   cp1 += 3;
   }
  
 -#if defined(CONFIG_DFU_FUNCTION)
 +#if defined(CONFIG_USB_FUNCTION_DFU)
   /* read vid and pid for dfu mode */
   if (0 = get_factory_record_val(cp, size, (uchar *)USBD1,
   (uchar *)vid, buf,
 diff --git a/doc/README.android-fastboot b/doc/README.android-fastboot
 index 04411e9..c2a2418 100644
 --- a/doc/README.android-fastboot
 +++ b/doc/README.android-fastboot
 @@ -33,7 +33,7 @@ Board specific
  The fastboot gadget relies on the USB download gadget, so the following
  options must be configured:
  
 -CONFIG_USBDOWNLOAD_GADGET
 +CONFIG_USB_GADGET_DOWNLOAD
  CONFIG_G_DNL_VENDOR_NUM
  CONFIG_G_DNL_PRODUCT_NUM
  CONFIG_G_DNL_MANUFACTURER
 diff --git a/drivers/dfu/Makefile b/drivers/dfu/Makefile
 index 5cc535e..cebea30 100644
 --- a/drivers/dfu/Makefile
 +++ b/drivers/dfu/Makefile
 @@ -5,7 +5,7 @@
  # SPDX-License-Identifier:   GPL-2.0+
  #
  
 -obj-$(CONFIG_DFU_FUNCTION) += dfu.o
 +obj-$(CONFIG_USB_FUNCTION_DFU) += dfu.o
  obj-$(CONFIG_DFU_MMC) += dfu_mmc.o
  obj-$(CONFIG_DFU_NAND) += dfu_nand.o
  obj-$(CONFIG_DFU_RAM) += dfu_ram.o
 diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile
 index 70bb550..46d7d94 100644
 --- a/drivers/usb/gadget/Makefile
 +++ b/drivers/usb/gadget/Makefile
 @@ -15,10 +15,10 @@ obj-$(CONFIG_USB_GADGET_S3C_UDC_OTG) += s3c_udc_otg.o
  obj-$(CONFIG_USB_GADGET_S3C_UDC_OTG_PHY) += s3c_udc_otg_phy.o
  obj-$(CONFIG_USB_GADGET_FOTG210) += fotg210.o
  obj-$(CONFIG_CI_UDC) += ci_udc.o
 -obj-$(CONFIG_THOR_FUNCTION) += f_thor.o
 

[U-Boot] [PATCH 2/2] usb: gadget: fastboot: Dequeue the previous IN request for the current request

2015-07-04 Thread Paul Kocialkowski
Recent versions of the fastboot tool will query the partition type before doing
an operation on a partition (such as erase, flash, etc). It will then submit
the operation as soon as the response for the partition type is received.

Usually, the MUSB controller will see that the partition type request return
status was read by the host at the very same time as the actual operation
request is submitted by the host. However, the operation will be read first
(int_rx is handled first in musb_interrupt) and after it is completed, the
fastboot USB gadget driver will send another return status. Hence, this happens
before the musb gadget framework has had a chance to handle the previous
acknowledgement that the host read the return status and dequeue the request.

The host will then usually empty the FIFO by the time musb_interrupt gets around
handling the return status acknowledgement (for the previous request, this is
still on the same musb_interrupt call), so no other interrupt is generated and
the most recent return status acknowledgement remains unaccounted for.

It will then be used as a response for the next command, and the proper response
for it will be delayed to the next command, and so on.

Dequeuing the previous IN request in the fastboot code ensures that no previous
return status remains. It is acceptable to do it since there is no callback to
it anyways.

Signed-off-by: Paul Kocialkowski cont...@paulk.fr
---
 drivers/usb/gadget/f_fastboot.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
index b9a9099..60c846d 100644
--- a/drivers/usb/gadget/f_fastboot.c
+++ b/drivers/usb/gadget/f_fastboot.c
@@ -311,6 +311,9 @@ static int fastboot_tx_write(const char *buffer, unsigned 
int buffer_size)
 
memcpy(in_req-buf, buffer, buffer_size);
in_req-length = buffer_size;
+
+   usb_ep_dequeue(fastboot_func-in_ep, in_req);
+
ret = usb_ep_queue(fastboot_func-in_ep, in_req, 0);
if (ret)
printf(Error %d on queue\n, ret);
-- 
1.9.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 1/2] usb: gadget: fastboot: Request status and length check in rx handler

2015-07-04 Thread Paul Kocialkowski
This avoids handling requests that have an error status or no data.
In particular, this avoids showing unnecessary error messages when the USB
gadget gets disconnected (e.g. with fastboot continue) and the fastboot USB
gadget driver sends an error back to the host (that has disconnected already).

Signed-off-by: Paul Kocialkowski cont...@paulk.fr
---
 drivers/usb/gadget/f_fastboot.c | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
index 206b6d1..b9a9099 100644
--- a/drivers/usb/gadget/f_fastboot.c
+++ b/drivers/usb/gadget/f_fastboot.c
@@ -635,6 +635,9 @@ static void rx_handler_command(struct usb_ep *ep, struct 
usb_request *req)
void (*func_cb)(struct usb_ep *ep, struct usb_request *req) = NULL;
int i;
 
+   if (req-status != 0 || req-length == 0)
+   return;
+
for (i = 0; i  ARRAY_SIZE(cmd_dispatch_info); i++) {
if (!strcmp_l1(cmd_dispatch_info[i].cmd, cmdbuf)) {
func_cb = cmd_dispatch_info[i].cb;
@@ -656,9 +659,7 @@ static void rx_handler_command(struct usb_ep *ep, struct 
usb_request *req)
}
}
 
-   if (req-status == 0) {
-   *cmdbuf = '\0';
-   req-actual = 0;
-   usb_ep_queue(ep, req, 0);
-   }
+   *cmdbuf = '\0';
+   req-actual = 0;
+   usb_ep_queue(ep, req, 0);
 }
-- 
1.9.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 2/4] kbuild: sync with Linux 4.1

2015-07-04 Thread Masahiro Yamada
Update some build scripts to match Linux 4.1.  Commit-based syncing
was done so as not to break U-Boot specific changes.
The previous big sync was from Linux 3.18-rc1 by commit 176d09827725
(kbuild: sync misc scripts with Linux 3.18-rc1).

The commits imported from Linux (some with adjustments) are:

[1] commit 9fb5e5372208973984a23ee6f5f025c05d364633
Author: Robert Richter rrich...@cavium.com
dts, kbuild: Factor out dtbs install rules to Makefile.dtbinst

[2] commit 371fdc77af44f4cb32475fd499e1d912ccc30890
Author: Masahiro Yamada yamad...@jp.panasonic.com
kbuild: collect shorthands into scripts/Kbuild.include

[3] commit a29b82326ed4eb5567b03c85b52c6891578d5a03
Author: Michal Marek mma...@suse.cz
kbuild: Remove duplicate $(cmd) definition in Makefile.clean

[4] commit 1846dfbde3e8a53f3673dcb1c1b79fd9b3f8d40d
Author: Masahiro Yamada yamad...@jp.panasonic.com
kbuild: remove redundant -rR flag of hdr-inst

[5] commit 34948e0bbf98640fc1821751b01d2f0cd17d84d5
Author: Michal Marek mma...@suse.cz
kbuild: Drop support for clean-rule

[6] commit a16c5f99a28c9945165c46da27fff8e6f26f8736
Author: Michal Marek mma...@suse.cz
kbuild: Fix removal of the debian/ directory

[7] commit d0d38cd9e853db11e0242b3df4c9c3c4a663fbb4
Author: Masahiro Yamada yamad...@jp.panasonic.com
kbuild: use mixed-targets when two or more config targets are given

[8] commit dd33c03b18b3f2db791eb6a17c37d2de66e4de18
Author: Masahiro Yamada yamad...@jp.panasonic.com
kbuild: fix cc-ifversion macro

[9] commit 665d92e38f65d70796aad2b8e49e42e80815d4a4
Author: Masahiro Yamada yamad...@jp.panasonic.com
kbuild: do not add $(call ...) to invoke cc-version or cc-fullversion

[10] commit 6dcb4e5edf39e3b65a75ca76f087b2fdbee8a808
Author: Masahiro Yamada yamad...@jp.panasonic.com
kbuild: allow cc-ifversion to have the argument for false condition

[11] commit c0a80c0c27e5e65b180a25e6c4c2f7ef9e386cd3
Author: Heiko Carstens heiko.carst...@de.ibm.com
ftrace: allow architectures to specify ftrace compile options

[12] commit 0b24becc810dc3be6e3f94103a866f214c282394
Author: Andrey Ryabinin a.ryabi...@samsung.com
kasan: add kernel address sanitizer infrastructure

[13] commit 4218affdf57f938c04e3a916a9685ee27079f377
Author: Masahiro Yamada yamad...@jp.panasonic.com
kbuild: remove warning about make depend

[14] commit 77479b38e2f58890eb221a0418357502a5b41cd6
Author: Nathan Rossi nathan.ro...@xilinx.com
kbuild: Create directory for target DTB

Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com
Signed-off-by: Robert Richter rrich...@cavium.com
Signed-off-by: Heiko Carstens heiko.carst...@de.ibm.com
Signed-off-by: Martin Schwidefsky schwidef...@de.ibm.com
Signed-off-by: Andrey Ryabinin a.ryabi...@samsung.com
Signed-off-by: Nathan Rossi nathan.ro...@xilinx.com
Signed-off-by: Michal Simek michal.si...@xilinx.com
Signed-off-by: Olof Johansson o...@lixom.net
Signed-off-by: Michal Marek mma...@suse.cz
Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com
---

 Makefile   | 13 +
 scripts/Kbuild.include | 25 -
 scripts/Makefile.build |  5 +++--
 scripts/Makefile.clean | 29 +
 scripts/Makefile.lib   | 25 -
 5 files changed, 45 insertions(+), 52 deletions(-)

diff --git a/Makefile b/Makefile
index 37cc4c3..865c25d 100644
--- a/Makefile
+++ b/Makefile
@@ -437,7 +437,7 @@ endif
 ifeq ($(KBUILD_EXTMOD),)
 ifneq ($(filter config %config,$(MAKECMDGOALS)),)
 config-targets := 1
-ifneq ($(filter-out config %config,$(MAKECMDGOALS)),)
+ifneq ($(words $(MAKECMDGOALS)),1)
 mixed-targets := 1
 endif
 endif
@@ -1243,12 +1243,6 @@ $(timestamp_h): $(srctree)/Makefile FORCE
$(call filechk,timestamp.h)
 
 # ---
-
-PHONY += depend dep
-depend dep:
-   @echo '*** Warning: make $@ is unnecessary now.'
-
-# ---
 quiet_cmd_cpp_lds = LDS $@
 cmd_cpp_lds = $(CPP) -Wp,-MD,$(depfile) $(cpp_flags) $(LDPPFLAGS) -ansi \
-D__ASSEMBLY__ -x assembler-with-cpp -P -o $@ $
@@ -1548,11 +1542,6 @@ ifneq ($(cmd_files),)
   include $(cmd_files)
 endif
 
-# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.clean obj=dir
-# Usage:
-# $(Q)$(MAKE) $(clean)=dir
-clean := -f $(srctree)/scripts/Makefile.clean obj
-
 endif  # skip-makefile
 
 PHONY += FORCE
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index d20f20a..f02eb37 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -131,17 +131,15 @@ cc-disable-warning = $(call try-run,\
$(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -W$(strip $(1)) -c -x c 
/dev/null -o $$TMP,-Wno-$(strip $(1)))
 
 # cc-version
-# Usage gcc-ver := $(call cc-version)
 

[U-Boot] [PATCH 1/4] kconfig: sync with Linux 4.1

2015-07-04 Thread Masahiro Yamada
Update the files under scripts/kconfig/ to match Linux 4.1.
Some Kconfig sources have diverged from those in the kernel,
so commit-base syncing was done not to lose U-Boot specific updates.

The commits cherry-picked from Linux are:

[1] commit be8af2d54a66911693eddc556e4f7a866670082b
Author: Bjørn Forsman bjorn.fors...@gmail.com
kconfig/lxdialog: get ncurses CFLAGS with pkg-config

[2] commit 3943f42c11896ce82ad3da132c8a5630313bdd0e
Author: Andrey Utkin andrey.krieger.ut...@gmail.com
Replace mentions of list_struct to list_head

[3] commit e4e458b45c5861808674eebfea94cee2258bb2ea
Author: Arjun Sreedharan arjun...@gmail.com
calloc/xcalloc: Fix argument order

[4] commit 09950bc256e3628d275f90e016e6f5a039fbdcab
Author: Olof Johansson o...@lixom.net
merge_config.sh: Display usage if given too few arguments

[5] commit b6a2ab2cd4739a9573ed41677e53171987b8da34
Author: Colin Ian King colin.k...@canonical.com
kconfig: use va_end to match corresponding va_start

[6] commit 70529b1a1784503169416df19ce3d68746401340
Author: Michal Marek mma...@suse.cz
kconfig: Get rid of the P() macro in headers

[7] commit 463157444e377bf9b279101b1f16a94c4648c03a
Author: Michal Marek mma...@suse.cz
kconfig: Remove dead code

[8] commit ad8d40cda3ad22ad9e8863d55a5c88f85c0173f0
Author: Michal Marek mma...@suse.cz
kconfig: Remove unnecessary prototypes from headers

[9] commit de4619937229378e81f95e99c9866acc8e207d34
Author: Masahiro Yamada yamada.masah...@socionext.com
kbuild: mergeconfig: fix jobserver unavailable warning

[10] commit b9fe99c5b994c6ddc57780993966b18899526c0b
Author: Masahiro Yamada yamada.masah...@socionext.com
kbuild: mergeconfig: move an error check to merge_config.sh

[11] commit 371cfd4ff0611d8bc5d18bbb9cc6a2bc3d56cd3d
Author: Masahiro Yamada yamada.masah...@socionext.com
kbuild: mergeconfig: remove redundant $(objtree)

[12] commit 3a975b8cfcbe026b535f83bde9a3c009bae214f9
Author: Masahiro Yamada yamada.masah...@socionext.com
merge_config.sh: improve indentation

[13] commit bc8f8f5fc47cd02c2c5f3580dac2fe6695af1edd
Author: Masahiro Yamada yamada.masah...@socionext.com
merge_config.sh: rename MAKE to RUNMAKE

[14] commit 63a91033d52e64a22e571fe84924c0b7f21c280d
Author: Masahiro Yamada yamada.masah...@socionext.com
kbuild: add generic mergeconfig target, %.config

[15] commit 1cba0c305758c3c1786ecaceb03e142c95a4edc9
Author: Michal Marek mma...@suse.cz
kconfig: Simplify Makefile

[16] commit 0a1f00a1c86421cc07cec87011c7cf4df68ee54b
Author: Michal Marek mma...@suse.cz
kconfig: Do not print status messages in make -s mode

Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com
Signed-off-by: Bjørn Forsman bjorn.fors...@gmail.com
Signed-off-by: Andrey Utkin andrey.krieger.ut...@gmail.com
Signed-off-by: Jiri Kosina jkos...@suse.cz
Signed-off-by: Arjun Sreedharan arjun...@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo a...@redhat.com
Signed-off-by: Olof Johansson o...@lixom.net
Signed-off-by: Colin Ian King colin.k...@canonical.com
Signed-off-by: Michal Marek mma...@suse.cz
---

 scripts/kconfig/Makefile   | 80 ++--
 scripts/kconfig/conf.c |  8 ++-
 scripts/kconfig/confdata.c |  6 +++
 scripts/kconfig/expr.c | 22 
 scripts/kconfig/expr.h |  5 --
 scripts/kconfig/gconf.c| 29 ++
 scripts/kconfig/list.h |  6 +--
 scripts/kconfig/lkc.h  | 14 -
 scripts/kconfig/lkc_proto.h| 85 ++
 scripts/kconfig/lxdialog/check-lxdialog.sh |  6 ++-
 scripts/kconfig/mconf.c| 35 +++-
 scripts/kconfig/menu.c |  4 +-
 scripts/kconfig/merge_config.sh| 30 +++
 scripts/kconfig/nconf.c|  5 ++
 scripts/kconfig/qconf.cc   |  5 +-
 scripts/kconfig/symbol.c   | 42 +++
 scripts/kconfig/util.c | 10 
 17 files changed, 189 insertions(+), 203 deletions(-)

diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index ff4ce6e..46ddf2d 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -2,7 +2,7 @@
 # Kernel configuration targets
 # These targets are used from top-level makefile
 
-PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig 
update-po-config \
+PHONY += xconfig gconfig menuconfig config silentoldconfig update-po-config \
localmodconfig localyesconfig
 
 # Added for U-Boot
@@ -17,30 +17,31 @@ else
 Kconfig := Kconfig
 endif
 
+ifeq ($(quiet),silent_)
+silent := -s
+endif
+
 # We need this, in case the user has it in its environment
 unexport CONFIG_
 
 xconfig: $(obj)/qconf
-   $ $(Kconfig)
+   $ $(silent) $(Kconfig)
 
 gconfig: $(obj)/gconf
-   $ $(Kconfig)
+   

[U-Boot] [PATCH 3/4] kbuild: do not add $((generic-)offsets-file) to targets

2015-07-04 Thread Masahiro Yamada
$(always) is added to targets by scripts/Makefile.build.
Moreover, filechk does not need .*.cmd files.

Adding these two files to targets is redundant.

Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com
---

 Kbuild | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/Kbuild b/Kbuild
index 465b930..e2e3b29 100644
--- a/Kbuild
+++ b/Kbuild
@@ -36,7 +36,7 @@ endef
 generic-offsets-file := include/generated/generic-asm-offsets.h
 
 always  := $(generic-offsets-file)
-targets := $(generic-offsets-file) lib/asm-offsets.s
+targets := lib/asm-offsets.s
 
 # We use internal kbuild rules to avoid the is up to date message from make
 lib/asm-offsets.s: lib/asm-offsets.c FORCE
@@ -55,7 +55,6 @@ offsets-file := include/generated/asm-offsets.h
 endif
 
 always  += $(offsets-file)
-targets += $(offsets-file)
 targets += arch/$(ARCH)/lib/asm-offsets.s
 
 CFLAGS_asm-offsets.o := -DDO_DEPS_ONLY
-- 
1.9.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 0/4] kbuild kconfig: sync with Linux 4.1

2015-07-04 Thread Masahiro Yamada

These change sets have been imported from Linux.

This series should not change any boards.



Masahiro Yamada (4):
  kconfig: sync with Linux 4.1
  kbuild: sync with Linux 4.1
  kbuild: do not add $((generic-)offsets-file) to targets
  kbuild: use relative path more to include Makefile

 Kbuild |  3 +-
 Makefile   | 33 
 scripts/Kbuild.include | 25 +++--
 scripts/Makefile.build |  5 +-
 scripts/Makefile.clean | 29 --
 scripts/Makefile.lib   | 25 +
 scripts/kconfig/Makefile   | 80 ++--
 scripts/kconfig/conf.c |  8 ++-
 scripts/kconfig/confdata.c |  6 +++
 scripts/kconfig/expr.c | 22 
 scripts/kconfig/expr.h |  5 --
 scripts/kconfig/gconf.c| 29 ++
 scripts/kconfig/list.h |  6 +--
 scripts/kconfig/lkc.h  | 14 -
 scripts/kconfig/lkc_proto.h| 85 ++
 scripts/kconfig/lxdialog/check-lxdialog.sh |  6 ++-
 scripts/kconfig/mconf.c| 35 +++-
 scripts/kconfig/menu.c |  4 +-
 scripts/kconfig/merge_config.sh| 30 +++
 scripts/kconfig/nconf.c|  5 ++
 scripts/kconfig/qconf.cc   |  5 +-
 scripts/kconfig/symbol.c   | 42 +++
 scripts/kconfig/util.c | 10 
 23 files changed, 244 insertions(+), 268 deletions(-)

-- 
1.9.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 4/4] kbuild: use relative path more to include Makefile

2015-07-04 Thread Masahiro Yamada
Prior to this commit, it was impossible to use relative path to
include Makefiles from the top level Makefile because the option
--include-dir=$(srctree) becomes effective when Make enters into
sub Makefiles.

To use relative path in any places, this commit moves the option
above the sub-make target.

This was imported from Linux (commit a436bb7b8063) and adjusted for
U-Boot.

Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com
Signed-off-by: Michal Marek mma...@suse.cz
---

 Makefile | 20 +---
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/Makefile b/Makefile
index 865c25d..7471a4f 100644
--- a/Makefile
+++ b/Makefile
@@ -10,9 +10,10 @@ NAME =
 # Comments in this file are targeted only to the developer, do not
 # expect to learn how to build the kernel reading this file.
 
-# Do not use make's built-in rules and variables
-# (this increases performance and avoids hard-to-debug behaviour);
-MAKEFLAGS += -rR
+# o Do not use make's built-in rules and variables
+#   (this increases performance and avoids hard-to-debug behaviour);
+# o Look for make include files relative to root of kernel src
+MAKEFLAGS += -rR --include-dir=$(CURDIR)
 
 # Avoid funny character set dependencies
 unexport LC_ALL
@@ -319,12 +320,9 @@ endif
 export KBUILD_MODULES KBUILD_BUILTIN
 export KBUILD_CHECKSRC KBUILD_SRC KBUILD_EXTMOD
 
-# Look for make include files relative to root of kernel src
-MAKEFLAGS += --include-dir=$(srctree)
-
 # We need some generic definitions (do not try to remake the file).
-$(srctree)/scripts/Kbuild.include: ;
-include $(srctree)/scripts/Kbuild.include
+scripts/Kbuild.include: ;
+include scripts/Kbuild.include
 
 # Make variables (CC, etc...)
 
@@ -518,8 +516,8 @@ ifneq ($(wildcard include/config/auto.conf),)
 autoconf_is_old := $(shell find . -path ./$(KCONFIG_CONFIG) -newer \
include/config/auto.conf)
 ifeq ($(autoconf_is_old),)
-include $(srctree)/config.mk
-include $(srctree)/arch/$(ARCH)/Makefile
+include config.mk
+include arch/$(ARCH)/Makefile
 endif
 endif
 endif
@@ -594,7 +592,7 @@ endif
 
 export CONFIG_SYS_TEXT_BASE
 
-include $(srctree)/scripts/Makefile.extrawarn
+include scripts/Makefile.extrawarn
 
 # Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments
 KBUILD_CPPFLAGS += $(KCPPFLAGS)
-- 
1.9.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 09/11] dma: ti-edma3: Add BIT(x) macro definition

2015-07-04 Thread Jagan Teki
On 4 July 2015 at 18:23, R, Vignesh vigne...@ti.com wrote:


 On 7/3/2015 7:27 PM, Andy Pont wrote:
 Vignesh wrote...

 [snip]

 +#define BIT(x)  (1  (x))
 +

 Is this not something that would be better in a global header file somewhere 
 rather than it starting a trend of a per-driver, per-arch, etc. definitions?

 I agree there are few per arch defintions.
 How about adding it to include/linux/bitops.h as in linux kernel?

Patch is under review [1] in fact you may give comment on the same.

[1] https://patchwork.ozlabs.org/patch/470478/

thanks!
-- 
Jagan | openedev.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] net/designware: revert MAC-address setup on init

2015-07-04 Thread Alexey Brodkin
Hi Joe,

On Wed, 2015-07-01 at 18:02 -0400, Tom Rini wrote:
 On Wed, Jul 01, 2015 at 10:26:21AM -0500, Joe Hershberger wrote:
  Hi Alexey,
  
  On Wed, Jul 1, 2015 at 9:25 AM, Alexey Brodkin
  alexey.brod...@synopsys.com wrote:
   Hi Tom, Joe,
   
   On Wed, 2015-07-01 at 22:22 +0800, Bin Meng wrote:
Hi Alexey,

On Wed, Jul 1, 2015 at 9:59 PM, Alexey Brodkin
alexey.brod...@synopsys.com wrote:
 http://git.denx.de/?p=u
 -boot.git;a=patch;h=f566c9949fbdce2e09a900c5343ca9986e5ba360
 broke DW GMAC operation if !DM_ETH because eth_write_hwaddr()
 doesn't
 exist if !DM_NET.
 
 As for DM_ETH case I'm still not sure if existing 
 implementation
 will
 fly.
 
 The point is as it is said in the comment on soft reset 
 that is
 triggered with setting DMAMAC_SRST in busmode register HW 
 address
 gets
 reset as well. And we inevitably need to set HW address 
 again.
 
 So probably better solution is to move mentioned soft-reset 
 from
 init (that is used on start of any network activity) to
 initialize
 (which is only executed once in board_r sequence). But 
 that's a
 bit of
 a different story and for now let's just get DW GMAC 
 functional
 again.
 
 Signed-off-by: Alexey Brodkin abrod...@synopsys.com
 Cc: Joe Hershberger joe.hershber...@ni.com
 Cc: Michal Simek michal.si...@xilinx.com
 Cc: Tom Rini tr...@konsulko.com
 ---
  drivers/net/designware.c | 4 
  1 file changed, 4 insertions(+)
 
 diff --git a/drivers/net/designware.c 
 b/drivers/net/designware.c
 index ae51cf3..07281a6 100644
 --- a/drivers/net/designware.c
 +++ b/drivers/net/designware.c
 @@ -243,6 +243,10 @@ static int _dw_eth_init(struct 
 dw_eth_dev
 *priv, u8 *enetaddr)
 mdelay(100);
 };
 
 +   /* Soft reset above clears HW address registers.
 +* So we have to set it here once again */
 +   _dw_write_hwaddr(priv, enetaddr);
 +
 rx_descs_init(priv);
 tx_descs_init(priv);
 
 --

There is already a patch submitted. Please check
http://patchwork.ozlabs.org/patch/484214/
   
   Any chance for mentioned patch net: designware: Program MAC 
   address to
   hardware after soft reset to be applied?
   
   This really fixes GMAC operation and it would be nice to have 
   this fix
   in upcoming release.
  
  I think that sounds appropriate. Tom?
 
 Yes.  Of the handful of recent (in my mind anyhow) net patches, are 
 you
 going to do a PR for them or should I just grab things?

Any chance to see that patch upstream anytime soon?

-Alexey
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] mtd: fix false positive Offset exceeds device limit error

2015-07-04 Thread Heiko Schocher

Hello Masahiro,

Am 04.07.2015 um 19:07 schrieb Masahiro Yamada:

Hey, quick review and apply please?

NAND commands are not working!




2015-07-01 21:35 GMT+09:00 Masahiro Yamada yamada.masah...@socionext.com:

Since commit 09c3280754f8 (mtd, nand: Move common functions from
cmd_nand.c to common place), NAND commands would not work at all
on large devices.

 = nand read 8000 1 1

 NAND read: Offset exceeds device limit
 = nand erase 10 10

 NAND erase: Offset exceeds device limit

The type of the size of struct mtd_info is uint64_t, while
mtd_arg_off_size() and mtd_arg_off() treat chipsize as int type.
The chipsize is wrapped around if the argument is given with 2GB
or larger.

Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com
---

  drivers/mtd/mtd_uboot.c | 5 +++--
  include/linux/mtd/mtd.h | 5 +++--
  2 files changed, 6 insertions(+), 4 deletions(-)


Thanks!

Acked-by: Heiko Schocher h...@denx.de

bye,
Heiko


diff --git a/drivers/mtd/mtd_uboot.c b/drivers/mtd/mtd_uboot.c
index 7197007..c517b9c 100644
--- a/drivers/mtd/mtd_uboot.c
+++ b/drivers/mtd/mtd_uboot.c
@@ -43,7 +43,7 @@ static int get_part(const char *partname, int *idx, loff_t 
*off, loff_t *size,
  }

  int mtd_arg_off(const char *arg, int *idx, loff_t *off, loff_t *size,
-   loff_t *maxsize, int devtype, int chipsize)
+   loff_t *maxsize, int devtype, uint64_t chipsize)
  {
 if (!str2off(arg, off))
 return get_part(arg, idx, off, size, maxsize, devtype);
@@ -59,7 +59,8 @@ int mtd_arg_off(const char *arg, int *idx, loff_t *off, 
loff_t *size,
  }

  int mtd_arg_off_size(int argc, char *const argv[], int *idx, loff_t *off,
-loff_t *size, loff_t *maxsize, int devtype, int chipsize)
+loff_t *size, loff_t *maxsize, int devtype,
+uint64_t chipsize)
  {
 int ret;

diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index 33669da..552d4d6 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -484,8 +484,9 @@ int add_mtd_partitions(struct mtd_info *, const struct 
mtd_partition *, int);
  int del_mtd_partitions(struct mtd_info *);

  int mtd_arg_off(const char *arg, int *idx, loff_t *off, loff_t *size,
-   loff_t *maxsize, int devtype, int chipsize);
+   loff_t *maxsize, int devtype, uint64_t chipsize);
  int mtd_arg_off_size(int argc, char *const argv[], int *idx, loff_t *off,
-loff_t *size, loff_t *maxsize, int devtype, int chipsize);
+loff_t *size, loff_t *maxsize, int devtype,
+uint64_t chipsize);
  #endif
  #endif /* __MTD_MTD_H__ */
--
1.9.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot






--
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 19/55] dm: gpio: Add support for setting a GPIO's pull direction

2015-07-04 Thread Masahiro Yamada
Hi Simon,


2015-07-03 9:15 GMT+09:00 Simon Glass s...@chromium.org:
 At present the driver model GPIO API does not support pull-up/pull-down on
 input GPIOs. This is required in some cases.

 Add this feature to the API with two new methods that drivers can optionally
 implement.

 Signed-off-by: Simon Glass s...@chromium.org
 ---

  drivers/gpio/gpio-uclass.c | 31 +++
  include/asm-generic/gpio.h | 46 
 ++
  2 files changed, 77 insertions(+)

 diff --git a/drivers/gpio/gpio-uclass.c b/drivers/gpio/gpio-uclass.c
 index 4efda31..c4ba580 100644
 --- a/drivers/gpio/gpio-uclass.c
 +++ b/drivers/gpio/gpio-uclass.c
 @@ -374,6 +374,37 @@ int dm_gpio_set_dir(struct gpio_desc *desc)
 return dm_gpio_set_dir_flags(desc, desc-flags);
  }

 +int dm_gpio_set_pull(struct gpio_desc *desc, enum gpio_pull pull)
 +{
 +   struct dm_gpio_ops *ops = gpio_get_ops(desc-dev);
 +   int ret;
 +
 +   ret = check_reserved(desc, set_pull);
 +   if (ret)
 +   return ret;
 +
 +   if (!ops-set_pull)
 +   return -ENOSYS;
 +
 +   return ops-set_pull(desc-dev, desc-offset, pull);
 +}
 +
 +int dm_gpio_get_pull(struct gpio_desc *desc, unsigned offset)
 +{
 +   struct dm_gpio_ops *ops = gpio_get_ops(desc-dev);
 +   int ret;
 +
 +   ret = check_reserved(desc, get_pull);
 +   if (ret)
 +   return ret;
 +
 +   if (!ops-get_pull)
 +   return -ENOSYS;
 +
 +   return ops-get_pull(desc-dev, desc-offset);
 +}
 +
 +
  /**
   * gpio_get_value() - [COMPAT] Sample GPIO pin and return it's value
   * gpio:   GPIO number
 diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
 index 0af599f..db5504f 100644
 --- a/include/asm-generic/gpio.h
 +++ b/include/asm-generic/gpio.h
 @@ -126,6 +126,13 @@ struct gpio_desc {
  */
  };

 +/* GPIO pull directions (used for input lines) */
 +enum gpio_pull {
 +   GPIO_PULL_NONE,
 +   GPIO_PULL_DOWN,
 +   GPIO_PULL_UP,
 +};
 +
  /**
   * dm_gpio_is_valid() - Check if a GPIO is valid
   *
 @@ -276,6 +283,26 @@ struct dm_gpio_ops {
  */
 int (*xlate)(struct udevice *dev, struct gpio_desc *desc,
  struct fdtdec_phandle_args *args);
 +
 +   /**
 +* set_pull() - set pull direction
 +*
 +* @dev:Device to adjust
 +* @offset: GPIO offset within device
 +* @pull:   New pull direction
 +* @return 0 if OK, -ve on error
 +*/
 +   int (*set_pull)(struct udevice *dev, unsigned offset,
 +   enum gpio_pull pull);
 +
 +   /**
 +* get_pull() - get pull direction
 +*
 +* @dev:Device to check
 +* @offset: GPIO offset within device
 +* @return current pull direction or -ve on error
 +*/
 +   int (*get_pull)(struct udevice *dev, unsigned offset);
  };



Do you want to control pull-up/down only for GPIOs?
Pin-biasing makes sense for dedicated functions as well as GPIOs.
At least, I am inclined to enable pull-up registers for SCL/SDA (I2C)
pins on my boards.

As far as I know, in Linux, such stuff is handled in pinctrl drivers.
I see no .set_pull() callback in struct gpio_chip in Linux.

As far as I see your pinctrl implementation,
(http://patchwork.ozlabs.org/patch/487801/)
it looks like pinctrl = pinmuxing in U-Boot, whereas pinctrl =
pinmuxing + pin-configuration in Linux.




-- 
Best Regards
Masahiro Yamada
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 08/11] spi: ti_qspi: Use DMA to read from qspi flash

2015-07-04 Thread R, Vignesh


On 7/3/2015 5:12 PM, Tom Rini wrote:
 On Fri, Jul 03, 2015 at 04:46:10PM +0530, Vignesh R wrote:
 
 ti_qspi uses memory map mode for faster read. Enabling DMA will increase
 read speed by 3x @48MHz on DRA74 EVM.

 Signed-off-by: Vignesh R vigne...@ti.com
 
 This ignores the feedback from
 http://lists.denx.de/pipermail/u-boot/2014-July/183715.html where we
 need to model the DMA changes on how it's done for mxs_spi.c
 

Sorry.. I didn't look into that before.
mxs_spi uses peripheral DMA to read/write flash. But ti_qspi can use DMA
to read from flash in mmap mode only. In current u-boot, defining
CONFIG_TI_SPI_MMAP will make memory map address available
(spi_flash-memory_map) to sf layer and spi_flash_cmd_read_ops() (in
sf_ops.c) directly calls memcpy() to read data from flash into buffer.
There is no spi_xfer() call to the ti_qspi driver at all.

In order to implement mxs_spi like approach for ti_qspi.c, I can delete
mmap handling in sf_ops.c( I don't think any other spi driver uses this
part of code), so that spi_xfer() is always called. And then, in
spi_xfer() implementation of ti_qspi, I can do DMA transfer similar to
mxs_spi.c. Is this approach ok?

And are you ok with patch 1 and 2 of this series?

Regards
Vignesh
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 09/11] dma: ti-edma3: Add BIT(x) macro definition

2015-07-04 Thread R, Vignesh


On 7/3/2015 7:27 PM, Andy Pont wrote:
 Vignesh wrote...
 
 [snip]
 
 +#define BIT(x)  (1  (x))
 +
 
 Is this not something that would be better in a global header file somewhere 
 rather than it starting a trend of a per-driver, per-arch, etc. definitions?

I agree there are few per arch defintions.
How about adding it to include/linux/bitops.h as in linux kernel?

Regards
Vignesh
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] mtd: fix false positive Offset exceeds device limit error

2015-07-04 Thread Masahiro Yamada
Hey, quick review and apply please?

NAND commands are not working!




2015-07-01 21:35 GMT+09:00 Masahiro Yamada yamada.masah...@socionext.com:
 Since commit 09c3280754f8 (mtd, nand: Move common functions from
 cmd_nand.c to common place), NAND commands would not work at all
 on large devices.

 = nand read 8000 1 1

 NAND read: Offset exceeds device limit
 = nand erase 10 10

 NAND erase: Offset exceeds device limit

 The type of the size of struct mtd_info is uint64_t, while
 mtd_arg_off_size() and mtd_arg_off() treat chipsize as int type.
 The chipsize is wrapped around if the argument is given with 2GB
 or larger.

 Signed-off-by: Masahiro Yamada yamada.masah...@socionext.com
 ---

  drivers/mtd/mtd_uboot.c | 5 +++--
  include/linux/mtd/mtd.h | 5 +++--
  2 files changed, 6 insertions(+), 4 deletions(-)

 diff --git a/drivers/mtd/mtd_uboot.c b/drivers/mtd/mtd_uboot.c
 index 7197007..c517b9c 100644
 --- a/drivers/mtd/mtd_uboot.c
 +++ b/drivers/mtd/mtd_uboot.c
 @@ -43,7 +43,7 @@ static int get_part(const char *partname, int *idx, loff_t 
 *off, loff_t *size,
  }

  int mtd_arg_off(const char *arg, int *idx, loff_t *off, loff_t *size,
 -   loff_t *maxsize, int devtype, int chipsize)
 +   loff_t *maxsize, int devtype, uint64_t chipsize)
  {
 if (!str2off(arg, off))
 return get_part(arg, idx, off, size, maxsize, devtype);
 @@ -59,7 +59,8 @@ int mtd_arg_off(const char *arg, int *idx, loff_t *off, 
 loff_t *size,
  }

  int mtd_arg_off_size(int argc, char *const argv[], int *idx, loff_t *off,
 -loff_t *size, loff_t *maxsize, int devtype, int chipsize)
 +loff_t *size, loff_t *maxsize, int devtype,
 +uint64_t chipsize)
  {
 int ret;

 diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
 index 33669da..552d4d6 100644
 --- a/include/linux/mtd/mtd.h
 +++ b/include/linux/mtd/mtd.h
 @@ -484,8 +484,9 @@ int add_mtd_partitions(struct mtd_info *, const struct 
 mtd_partition *, int);
  int del_mtd_partitions(struct mtd_info *);

  int mtd_arg_off(const char *arg, int *idx, loff_t *off, loff_t *size,
 -   loff_t *maxsize, int devtype, int chipsize);
 +   loff_t *maxsize, int devtype, uint64_t chipsize);
  int mtd_arg_off_size(int argc, char *const argv[], int *idx, loff_t *off,
 -loff_t *size, loff_t *maxsize, int devtype, int chipsize);
 +loff_t *size, loff_t *maxsize, int devtype,
 +uint64_t chipsize);
  #endif
  #endif /* __MTD_MTD_H__ */
 --
 1.9.1

 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot



-- 
Best Regards
Masahiro Yamada
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] cmd_fdt: save fdtaddr in hex format

2015-07-04 Thread Sudeep Holla
Commit 90fbee3e4051 (cmd_fdt: Actually fix fdt command in sandbox)
changed the format(from hex address to unsigned long) in which fdtaddr
is saved . However do_fdt continues reads the fdtaddr assuming it to
be in hex format. This may lead to fdt being either loaded or attempted
to load at erroneous address generating fault if the address is out of
memory.

This patch changes back the format to hex while saving the fdtaddr
as it was done before.

Cc: Linus Walleij linus.wall...@linaro.org
Cc: Tom Rini tr...@konsulko.com
Cc: Simon Glass s...@chromium.org
Cc: Hua Yanghao huayang...@gmail.com
Cc: Heiko Schocher h...@denx.de
---
 common/cmd_fdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Hi,

You will see my signoff missing and it's intentional as I officially
can't contribute to Uboot. I found this issue and it's been there for a
while now, so thought of atleast reporting it(with a patch). So if anyone
can review and submit this or any appropriate fix that would be great.
I see this issue on vexpress TC2.

Regards,
Sudeep

diff --git a/common/cmd_fdt.c b/common/cmd_fdt.c
index 682b6553958f..4c18962d8532 100644
--- a/common/cmd_fdt.c
+++ b/common/cmd_fdt.c
@@ -45,7 +45,7 @@ void set_working_fdt_addr(ulong addr)

buf = map_sysmem(addr, 0);
working_fdt = buf;
-   setenv_ulong(fdtaddr, addr);
+   setenv_hex(fdtaddr, addr);
 }

 /*
--
1.9.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Pull request: u-boot-spi/master

2015-07-04 Thread Tom Rini
On Sat, Jul 04, 2015 at 02:11:35PM +0530, Jagan Teki wrote:
 Hi Tom,
 
 Please pull this PR.
 
 thanks!
 Jagan.
 
 The following changes since commit 891b487098ee2169a16b1bbb354aaef28aa90630:
 
   Merge branch 'master' of git://git.denx.de/u-boot-spi (2015-07-01 15:38:12 
 -0400)
 
 are available in the git repository at:
 
 
   git://git.denx.de/u-boot-spi.git master
 
 for you to fetch changes up to 8097cba809d8c40d8fe72f792c7dc0644c845a32:
 
   spi: cadence_qspi: add device tree binding doc (2015-07-03 13:50:53 +0530)
 
 
 Vikas Manocha (10):
   stv0991: enable saving enrironment in spi flash
   stv0991: move OF_CONTROL config to defconfig
   stv0991: remove define CONFIG_OF_SEPARATE from board file
   stv0991: configure clock  pad muxing for qspi
   stv0991: enable cadence qspi controller  spi flash
   stv0991: configure device tree for cadence qspi  flash
   spi: cadence_qspi: move the sram partition in init
   spi: cadence_qspi: get sram size from device tree
   spi: cadence_qspi: support FIFO width other than 4 bytes
   spi: cadence_qspi: add device tree binding doc

Given the planned release on the 13th, is any of this stuff that can't
wait?  Thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot