Re: [U-Boot] [PATCH] image-fit: fix fit_image_load() OS check

2016-08-15 Thread Andreas Bießmann

Hi Michal,

On 2016-08-15 08:41, Michal Simek wrote:

On 14.8.2016 20:31, Andreas Bießmann wrote:
Commit 62afc601883e788f3f22291202d5b2a23c1a8b06 introduced fpga image 
load via

bootm but broke the OS check in fit_image_load().

This commit removes following compiler warning:

---8<---
In file included from tools/common/image-fit.c:1:
/Volumes/devel/u-boot/tools/../common/image-fit.c:1715:39: warning: 
use of logical '||' with constant operand [-Wconstant-logical-operand]

os_ok = image_type == IH_TYPE_FLATDT || IH_TYPE_FPGA ||
 ^  
/Volumes/devel/u-boot/tools/../common/image-fit.c:1715:39: note: use 
'|' for a bitwise operation

os_ok = image_type == IH_TYPE_FLATDT || IH_TYPE_FPGA ||
 ^~
 |
1 warning generated.
--->8---

Signed-off-by: Andreas Bießmann 
Cc: Michal Simek 
---
 common/image-fit.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/common/image-fit.c b/common/image-fit.c
index d8d4e95..f833fe3 100644
--- a/common/image-fit.c
+++ b/common/image-fit.c
@@ -1712,7 +1712,8 @@ int fit_image_load(bootm_headers_t *images, 
ulong addr,

  (image_type == IH_TYPE_KERNEL &&
   fit_image_check_type(fit, noffset, IH_TYPE_KERNEL_NOLOAD));

-   os_ok = image_type == IH_TYPE_FLATDT || IH_TYPE_FPGA ||
+   os_ok = image_type == IH_TYPE_FLATDT ||
+   image_type == IH_TYPE_FPGA ||
fit_image_check_os(fit, noffset, IH_OS_LINUX) ||
fit_image_check_os(fit, noffset, IH_OS_U_BOOT) ||
fit_image_check_os(fit, noffset, IH_OS_OPENRTOS);




hm. Interesting. I didn't see that compilation warning.


It is an llvm 3.6 or so compiler (latest OS X)

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


[U-Boot] [PATCH] driver: spi: add spansion s25fs-s family protect/unprotect

2016-08-15 Thread Yunhui Cui
From: Yunhui Cui 

In order to support spansion s25fs512s flash protect/unprotect:

[1] Fill callbak flash->lock/unlock/is_locked by spansion_lock/
unlock/is_locked.

[2] Achieve protect/unprotected by operating sr1nv, cr1nv.

Signed-off-by: Yunhui Cui 
---
 drivers/mtd/spi/spi_flash.c | 195 
 1 file changed, 195 insertions(+)

diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c
index 64d4e0f..446e6e3 100644
--- a/drivers/mtd/spi/spi_flash.c
+++ b/drivers/mtd/spi/spi_flash.c
@@ -839,6 +839,194 @@ int stm_unlock(struct spi_flash *flash, u32 ofs, size_t 
len)
 }
 #endif
 
+#if defined(CONFIG_SPI_FLASH_SPANSION)
+/*
+ * Return 1 if the entire region is locked, 0 otherwise
+ */
+static int spansion_is_locked_sr(struct spi_flash *flash, u32 ofs, u32 len,
+   u8 sr)
+{
+   loff_t lock_offs;
+   u64 lock_len;
+
+   stm_get_locked_range(flash, sr, &lock_offs, &lock_len);
+
+   return (ofs + len <= lock_offs + lock_len) && (ofs >= lock_offs);
+}
+
+/*
+ * Check if a region of the flash is (completely) locked. See spansion_lock()
+ * for more info.
+ *
+ * Returns 1 if entire region is locked, 0 if any portion is unlocked, and
+ * negative on errors.
+ */
+int spansion_is_locked(struct spi_flash *flash, u32 ofs, size_t len)
+{
+   u8 cmd[4];
+   u32 sr1nv_offset = 0x0;
+   u8 sr1nv;
+   int ret;
+
+   cmd[0] = CMD_SPANSION_RDAR;
+   cmd[1] = sr1nv_offset >> 16;
+   cmd[2] = sr1nv_offset >> 8;
+   cmd[3] = sr1nv_offset >> 0;
+
+   ret = spi_flash_cmd_read(flash->spi, cmd, 4, &sr1nv, 1);
+   if (ret)
+   return -EIO;
+
+   return spansion_is_locked_sr(flash, ofs, len, sr1nv);
+}
+
+/*
+ * Lock a region of the flash. Compatible with Spansion s25fs-s family flash.
+ * Supports only the block protection bits BP{0,1,2} in the Status Register-1
+ * Non-Volatile(SR1NV).
+ *
+ * Sample table portion for 64MB flash (S25FS512S):
+ * Configuration Register-1 Non-Volatile(CR1NV[5])== 0
+ *
+ *  |  BP2  |  BP1  |  BP0  |  Prot Length  | Protected Portion
+ *  
+ *  |   0   |   0   |   0   |  NONE  | NONE
+ *  |   0   |   0   |   1   |  1  MB | Upper 1/64
+ *  |   0   |   1   |   0   |  2  MB | Upper 1/32
+ *  |   0   |   1   |   1   |  4  MB | Upper 1/16
+ *  |   1   |   0   |   0   |  8  MB | Upper 1/8
+ *  |   1   |   0   |   1   |  16 MB | Upper 1/4
+ *  |   1   |   1   |   0   |  32 MB | Upper 1/2
+ *  |   1   |   1   |   1   |  64 MB | ALL
+ *
+ * When CR1NV[5] == 1, the Lower memory array are protected.
+ *
+ * Returns negative on errors, 0 on success.
+ */
+int spansion_lock(struct spi_flash *flash, u32 ofs, size_t len)
+{
+   u8 status_old, status_new;
+   u8 mask = SR_BP2 | SR_BP1 | SR_BP0;
+   u8 shift = ffs(mask) - 1, pow, val;
+   int ret;
+   u8 cmd[4];
+   u32 sr1nv_offset = 0x0;
+   u8 sr1nv;
+
+   cmd[0] = CMD_SPANSION_RDAR;
+   cmd[1] = sr1nv_offset >> 16;
+   cmd[2] = sr1nv_offset >> 8;
+   cmd[3] = sr1nv_offset >> 0;
+
+   ret = spi_flash_cmd_read(flash->spi, cmd, 4, &sr1nv, 1);
+   if (ret)
+   return -EIO;
+   status_old = sr1nv;
+
+   /* SPI NOR always locks to the end */
+   if (ofs + len != flash->size) {
+   /* Does combined region extend to end? */
+   if (!stm_is_locked_sr(flash, ofs + len, flash->size - ofs - len,
+ status_old))
+   return -EINVAL;
+   len = flash->size - ofs;
+   }
+
+   /*
+* Need smallest pow such that:
+*
+*   1 / (2^pow) <= (len / size)
+*
+* so (assuming power-of-2 size) we do:
+*
+*   pow = ceil(log2(size / len)) = log2(size) - floor(log2(len))
+*/
+   pow = ilog2(flash->size) - ilog2(len);
+   val = mask - (pow << shift);
+   if (val & ~mask)
+   return -EINVAL;
+
+   /* Don't "lock" with no region! */
+   if (!(val & mask))
+   return -EINVAL;
+
+   status_new = (status_old & ~mask) | val;
+
+   /* Only modify protection if it will not unlock other areas */
+   if ((status_new & mask) <= (status_old & mask))
+   return -EINVAL;
+
+   cmd[0] = CMD_SPANSION_WRAR;
+   ret = spi_flash_cmd_write(flash->spi, cmd, 4, &status_new, 1);
+   if (ret)
+   return -EIO;
+
+   return 0;
+}
+
+/*
+ * Unlock a region of the flash. See spansion_lock() for more info
+ *
+ * Returns negative on errors, 0 on success.
+ */
+int spansion_unlock(struct spi_flash *flash, u32 ofs, size_t len)
+{
+   uint8_t status_old, status_new;
+   u8 mask = SR_BP2 | SR_BP1 | SR_BP0;
+   u8 shift = ffs(mask) - 1, pow, val;
+   int ret;
+
+   u8 cmd[4];
+   u32 sr1nv_offset = 0x0;
+

Re: [U-Boot] [PATCH] driver: spi: add spansion s25fs-s family protect/unprotect

2016-08-15 Thread Jagan Teki
On 15 August 2016 at 11:42, Yunhui Cui  wrote:
> From: Yunhui Cui 
>
> In order to support spansion s25fs512s flash protect/unprotect:
>
> [1] Fill callbak flash->lock/unlock/is_locked by spansion_lock/
> unlock/is_locked.

Try to use existing lock code and add spansion on top of that.

-- 
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/2 v3] x86: Add DFI BT700 BayTrail board support

2016-08-15 Thread Stefan Roese

Hi Bin,

On 12.08.2016 04:41, Bin Meng wrote:

On Fri, Aug 12, 2016 at 9:44 AM, Bin Meng  wrote:

On Tue, Jul 19, 2016 at 1:51 PM, Stefan Roese  wrote:

This patch adds support for the DFI BayTrail BT700 QSeven SoM installed
on the DFI Q7X-151 baseboard. The baseboard is equipped with the Nuvoton
NCT6102D Super IO chip providing the UART as console.

Signed-off-by: Stefan Roese 
Cc: Simon Glass 
Reviewed-by: Bin Meng 
---
v3:
- Change comment Winbond > Nuvoton
- Remove unneeded compatible property in HS-UART DTS node

v2:
- Added missing text to Kconfig entry

 arch/x86/Kconfig  |   4 +
 arch/x86/dts/Makefile |   1 +
 arch/x86/dts/dfi-bt700-q7x-151.dts|  22 +++
 arch/x86/dts/dfi-bt700.dtsi   | 308 ++
 board/dfi/Kconfig |  29 +++
 board/dfi/dfi-bt700/Kconfig   |  28 +++
 board/dfi/dfi-bt700/MAINTAINERS   |   8 +
 board/dfi/dfi-bt700/Makefile  |   8 +
 board/dfi/dfi-bt700/acpi/mainboard.asl|  13 ++
 board/dfi/dfi-bt700/dfi-bt700.c   |  30 +++
 board/dfi/dfi-bt700/dsdt.asl  |  14 ++
 board/dfi/dfi-bt700/start.S   |   9 +
 configs/dfi-bt700-internal-uart_defconfig |  61 ++
 configs/dfi-bt700-q7x-151_defconfig   |  63 ++
 include/configs/dfi-bt700.h   |  74 +++
 15 files changed, 672 insertions(+)
 create mode 100644 arch/x86/dts/dfi-bt700-q7x-151.dts
 create mode 100644 arch/x86/dts/dfi-bt700.dtsi
 create mode 100644 board/dfi/Kconfig
 create mode 100644 board/dfi/dfi-bt700/Kconfig
 create mode 100644 board/dfi/dfi-bt700/MAINTAINERS
 create mode 100644 board/dfi/dfi-bt700/Makefile
 create mode 100644 board/dfi/dfi-bt700/acpi/mainboard.asl
 create mode 100644 board/dfi/dfi-bt700/dfi-bt700.c
 create mode 100644 board/dfi/dfi-bt700/dsdt.asl
 create mode 100644 board/dfi/dfi-bt700/start.S
 create mode 100644 configs/dfi-bt700-internal-uart_defconfig
 create mode 100644 configs/dfi-bt700-q7x-151_defconfig
 create mode 100644 include/configs/dfi-bt700.h



applied to u-boot-x86, thanks!


Unfortunately the dfi-bt700-internal-uart_defconfig does not build.
Can you please look at this?

+
+Device Tree Source is not correctly specified.
+Please define 'CONFIG_DEFAULT_DEVICE_TREE'
+or build with 'DEVICE_TREE=' argument
+make[2]: *** [arch/x86/dts/dfi-bt700.dtb] Error 1
+make[1]: *** [dts/dt.dtb] Error 2

Also buildman reports the following warnings:

WARNING: no status info for 'theadorable-x86-dfi-bt700'
WARNING: no maintainers for 'theadorable-x86-dfi-bt700'
WARNING: no status info for 'dfi-bt700-internal-uart'
WARNING: no maintainers for 'dfi-bt700-internal-uart'

WARNING: no status info for 'conga-qeval20-qa3-e3845-internal-uart'
WARNING: no maintainers for 'conga-qeval20-qa3-e3845-internal-uart'

Can you please fix these too?


Sorry for the problems. I'm just back from vacation and will take
a look at it today.

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


Re: [U-Boot] [PATCH 1/2 v3] x86: Add DFI BT700 BayTrail board support

2016-08-15 Thread Bin Meng
Hi Stefan,

On Mon, Aug 15, 2016 at 5:11 PM, Stefan Roese  wrote:
> Hi Bin,
>
>
> On 12.08.2016 04:41, Bin Meng wrote:
>>
>> On Fri, Aug 12, 2016 at 9:44 AM, Bin Meng  wrote:
>>>
>>> On Tue, Jul 19, 2016 at 1:51 PM, Stefan Roese  wrote:

 This patch adds support for the DFI BayTrail BT700 QSeven SoM installed
 on the DFI Q7X-151 baseboard. The baseboard is equipped with the Nuvoton
 NCT6102D Super IO chip providing the UART as console.

 Signed-off-by: Stefan Roese 
 Cc: Simon Glass 
 Reviewed-by: Bin Meng 
 ---
 v3:
 - Change comment Winbond > Nuvoton
 - Remove unneeded compatible property in HS-UART DTS node

 v2:
 - Added missing text to Kconfig entry

  arch/x86/Kconfig  |   4 +
  arch/x86/dts/Makefile |   1 +
  arch/x86/dts/dfi-bt700-q7x-151.dts|  22 +++
  arch/x86/dts/dfi-bt700.dtsi   | 308
 ++
  board/dfi/Kconfig |  29 +++
  board/dfi/dfi-bt700/Kconfig   |  28 +++
  board/dfi/dfi-bt700/MAINTAINERS   |   8 +
  board/dfi/dfi-bt700/Makefile  |   8 +
  board/dfi/dfi-bt700/acpi/mainboard.asl|  13 ++
  board/dfi/dfi-bt700/dfi-bt700.c   |  30 +++
  board/dfi/dfi-bt700/dsdt.asl  |  14 ++
  board/dfi/dfi-bt700/start.S   |   9 +
  configs/dfi-bt700-internal-uart_defconfig |  61 ++
  configs/dfi-bt700-q7x-151_defconfig   |  63 ++
  include/configs/dfi-bt700.h   |  74 +++
  15 files changed, 672 insertions(+)
  create mode 100644 arch/x86/dts/dfi-bt700-q7x-151.dts
  create mode 100644 arch/x86/dts/dfi-bt700.dtsi
  create mode 100644 board/dfi/Kconfig
  create mode 100644 board/dfi/dfi-bt700/Kconfig
  create mode 100644 board/dfi/dfi-bt700/MAINTAINERS
  create mode 100644 board/dfi/dfi-bt700/Makefile
  create mode 100644 board/dfi/dfi-bt700/acpi/mainboard.asl
  create mode 100644 board/dfi/dfi-bt700/dfi-bt700.c
  create mode 100644 board/dfi/dfi-bt700/dsdt.asl
  create mode 100644 board/dfi/dfi-bt700/start.S
  create mode 100644 configs/dfi-bt700-internal-uart_defconfig
  create mode 100644 configs/dfi-bt700-q7x-151_defconfig
  create mode 100644 include/configs/dfi-bt700.h

>>>
>>> applied to u-boot-x86, thanks!
>>
>>
>> Unfortunately the dfi-bt700-internal-uart_defconfig does not build.
>> Can you please look at this?
>>
>> +
>> +Device Tree Source is not correctly specified.
>> +Please define 'CONFIG_DEFAULT_DEVICE_TREE'
>> +or build with 'DEVICE_TREE=' argument
>> +make[2]: *** [arch/x86/dts/dfi-bt700.dtb] Error 1
>> +make[1]: *** [dts/dt.dtb] Error 2
>>
>> Also buildman reports the following warnings:
>>
>> WARNING: no status info for 'theadorable-x86-dfi-bt700'
>> WARNING: no maintainers for 'theadorable-x86-dfi-bt700'
>> WARNING: no status info for 'dfi-bt700-internal-uart'
>> WARNING: no maintainers for 'dfi-bt700-internal-uart'
>>
>> WARNING: no status info for 'conga-qeval20-qa3-e3845-internal-uart'
>> WARNING: no maintainers for 'conga-qeval20-qa3-e3845-internal-uart'
>>
>> Can you please fix these too?
>
>
> Sorry for the problems. I'm just back from vacation and will take
> a look at it today.

Thanks for checking. Please post new version patches with the
additional changes and I will re-apply them.

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


[U-Boot] [PATCH v2 0/5] add pinctrl driver for rk3399

2016-08-15 Thread Kever Yang

This patch set add the pinctrl driver for rk3399 and enable pinctrl for
pwm module.
Module with pinctrl driver support and with interrupt number and default
pinctrl in dts node will get pinctrl initialized when driver probe.
Module like pwm which without interrupt number need to call the pinctrl
API manually.


Changes in v2:
- move and reg value MACRO in C source, and use MASK/SHIFT

Kever Yang (5):
  rk3399: syscon: add support for pmugrf
  pinctrl: add driver for rk3399
  config: evb-rk3399: enable pinctrl driver
  rk3399: enable the pwm2/3 pinctrl in board init
  dts: rk3399: add pinctrl for sdmmc

 arch/arm/dts/rk3399.dtsi|  37 ++
 arch/arm/include/asm/arch-rockchip/clock.h  |   1 +
 arch/arm/include/asm/arch-rockchip/grf_rk3399.h | 330 ++
 arch/arm/mach-rockchip/rk3399/syscon_rk3399.c   |   1 +
 board/rockchip/evb_rk3399/evb-rk3399.c  |  31 +-
 configs/evb-rk3399_defconfig|   2 +
 drivers/pinctrl/Kconfig |   9 +
 drivers/pinctrl/rockchip/Makefile   |   1 +
 drivers/pinctrl/rockchip/pinctrl_rk3399.c   | 441 
 9 files changed, 852 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/include/asm/arch-rockchip/grf_rk3399.h
 create mode 100644 drivers/pinctrl/rockchip/pinctrl_rk3399.c

-- 
1.9.1


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


[U-Boot] [PATCH v2 1/5] rk3399: syscon: add support for pmugrf

2016-08-15 Thread Kever Yang
pmugrf is a module like grf which contain some of the iomux registers
and other registers.

Signed-off-by: Kever Yang 
Acked-by: Simon Glass 
---

Changes in v2: None

 arch/arm/include/asm/arch-rockchip/clock.h| 1 +
 arch/arm/mach-rockchip/rk3399/syscon_rk3399.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/arch/arm/include/asm/arch-rockchip/clock.h 
b/arch/arm/include/asm/arch-rockchip/clock.h
index 21edbc2..804c77b 100644
--- a/arch/arm/include/asm/arch-rockchip/clock.h
+++ b/arch/arm/include/asm/arch-rockchip/clock.h
@@ -16,6 +16,7 @@ enum {
ROCKCHIP_SYSCON_GRF,
ROCKCHIP_SYSCON_SGRF,
ROCKCHIP_SYSCON_PMU,
+   ROCKCHIP_SYSCON_PMUGRF,
 };
 
 /* Standard Rockchip clock numbers */
diff --git a/arch/arm/mach-rockchip/rk3399/syscon_rk3399.c 
b/arch/arm/mach-rockchip/rk3399/syscon_rk3399.c
index 2d81c55..2cef68b 100644
--- a/arch/arm/mach-rockchip/rk3399/syscon_rk3399.c
+++ b/arch/arm/mach-rockchip/rk3399/syscon_rk3399.c
@@ -11,6 +11,7 @@
 
 static const struct udevice_id rk3399_syscon_ids[] = {
{ .compatible = "rockchip,rk3399-grf", .data = ROCKCHIP_SYSCON_GRF },
+   { .compatible = "rockchip,rk3399-pmugrf", .data = 
ROCKCHIP_SYSCON_PMUGRF },
 };
 
 U_BOOT_DRIVER(syscon_rk3399) = {
-- 
1.9.1


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


Re: [U-Boot] [PATCH v2] i2c: intel_i2c: SMBus driver PCI addition (e.g. BayTrail)

2016-08-15 Thread Stefan Roese

Hi Simon,

On 10.08.2016 04:59, Simon Glass wrote:

On 8 August 2016 at 23:41, Stefan Roese  wrote:

This patch adds support for the SMBus block read/write functionality.
Other protocols like the SMBus quick command need to get added
if this is needed.

This patch also removed the SMBus related defines from the Ivybridge
pch.h header. As they are integrated in this driver and should be
used from here. This change is added in this patch to avoid compile
breakage to keep the source git bisectable.

Tested on a congatec BayTrail board to configure the SMSC2513 USB
hub.

Signed-off-by: Stefan Roese 
Cc: Bin Meng 
Cc: Simon Glass 
Cc: Heiko Schocher 
Cc: George McCollister 
---
v2:
- Avoid using BSS. Patch from Simon intergrated to fix problem before
  relocation.
- Remove IvyBridge code and add PCI device for IvyBridge (Panther Point
  PCH).
- Add overrun check to smbus_block_read() as suggested by George

 arch/x86/include/asm/arch-ivybridge/pch.h |  26 ---
 drivers/i2c/intel_i2c.c   | 290 +++---
 2 files changed, 269 insertions(+), 47 deletions(-)



This does not crash, but I see nothing on the bus with 'i2c dev 0; i2c
probe'. Is that expected?


This depends on the devices available on the I2C bus. As SMBus defines
multiples protocols (byte read/write, block read/write...), and your
I2C devices probably don't support the currently implemented block
read/write protocol, we need to find a way configure / switch the SMBus
protocol. Do you have an idea on how to do this? Perhaps we need to add
a config call for this to switch between the different protocols? And
also add a way to do this from the cmdline. Perhaps "i2c flags" can be
used for this?

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


[U-Boot] dm video question

2016-08-15 Thread Peng Fan

Hi Simon,

I am trying to coverting mxsfb.c to support dm.

But met the following issue.
"
mxsfb_lcd_bind: Frame buffer size 200400
Video device 'lcdif@021c8000' cannot allocate frame buffer memory -ensure the 
device is set up before relocation
"

I add "u-boot, dm-pre-reloc" in dts as the following, but no help.

&lcdif {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_lcdif_dat
 &pinctrl_lcdif_ctrl
 &pinctrl_lcdif_reset>;
display = <&display0>;
status = "okay";
u-boot,dm-pre-reloc;

display0: display {
bits-per-pixel = <16>;
bus-width = <24>;
u-boot,dm-pre-reloc;
status = "okay";

display-timings {
native-mode = <&timing0>;
u-boot,dm-pre-reloc;
timing0: timing0 {
u-boot,dm-pre-reloc;
clock-frequency = <920>;
hactive = <480>;
vactive = <272>;
hfront-porch = <8>;
hback-porch = <4>;
hsync-len = <41>;
vback-porch = <2>;
vfront-porch = <4>;
vsync-len = <10>;

hsync-active = <0>;
vsync-active = <0>;
de-active = <1>;
pixelclk-active = <0>;
};
};
};
};
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 00/27] spi/sf: Updates on flash detection

2016-08-15 Thread Jagan Teki
Hi Bin,

On 12 August 2016 at 23:28, Jagan Teki  wrote:
> On 12 August 2016 at 04:37, york sun  wrote:
>> I saw some errors when compiling for arm. Compiling for power is still
>> going.
>
> Can you please try again?

Please let me know in case if you find any buildman issues?

-- 
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 1/2 v4] x86: Add DFI BT700 BayTrail board support

2016-08-15 Thread Stefan Roese
This patch adds support for the DFI BayTrail BT700 QSeven SoM installed
on the DFI Q7X-151 baseboard. The baseboard is equipped with the Nuvoton
NCT6102D Super IO chip providing the UART as console.

Signed-off-by: Stefan Roese 
Cc: Simon Glass 
Reviewed-by: Bin Meng 
---
v4:
- Remove dfi-bt700-internal-uart_defconfig
- Add missing entry to MAINTAINERS

v3:
- Change comment Winbond > Nuvoton
- Remove unneeded compatible property in HS-UART DTS node

v2:
- Added missing text to Kconfig entry

 arch/x86/Kconfig   |   4 +
 arch/x86/dts/Makefile  |   1 +
 arch/x86/dts/dfi-bt700-q7x-151.dts |  22 +++
 arch/x86/dts/dfi-bt700.dtsi| 308 +
 board/dfi/Kconfig  |  29 
 board/dfi/dfi-bt700/Kconfig|  28 +++
 board/dfi/dfi-bt700/MAINTAINERS|   8 +
 board/dfi/dfi-bt700/Makefile   |   8 +
 board/dfi/dfi-bt700/acpi/mainboard.asl |  13 ++
 board/dfi/dfi-bt700/dfi-bt700.c|  30 
 board/dfi/dfi-bt700/dsdt.asl   |  14 ++
 board/dfi/dfi-bt700/start.S|   9 +
 configs/dfi-bt700-q7x-151_defconfig|  63 +++
 include/configs/dfi-bt700.h|  74 
 14 files changed, 611 insertions(+)
 create mode 100644 arch/x86/dts/dfi-bt700-q7x-151.dts
 create mode 100644 arch/x86/dts/dfi-bt700.dtsi
 create mode 100644 board/dfi/Kconfig
 create mode 100644 board/dfi/dfi-bt700/Kconfig
 create mode 100644 board/dfi/dfi-bt700/MAINTAINERS
 create mode 100644 board/dfi/dfi-bt700/Makefile
 create mode 100644 board/dfi/dfi-bt700/acpi/mainboard.asl
 create mode 100644 board/dfi/dfi-bt700/dfi-bt700.c
 create mode 100644 board/dfi/dfi-bt700/dsdt.asl
 create mode 100644 board/dfi/dfi-bt700/start.S
 create mode 100644 configs/dfi-bt700-q7x-151_defconfig
 create mode 100644 include/configs/dfi-bt700.h

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 29d1120..5193ee7 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -17,6 +17,9 @@ config VENDOR_CONGATEC
 config VENDOR_COREBOOT
bool "coreboot"
 
+config VENDOR_DFI
+   bool "dfi"
+
 config VENDOR_EFI
bool "efi"
 
@@ -35,6 +38,7 @@ endchoice
 source "board/advantech/Kconfig"
 source "board/congatec/Kconfig"
 source "board/coreboot/Kconfig"
+source "board/dfi/Kconfig"
 source "board/efi/Kconfig"
 source "board/emulation/Kconfig"
 source "board/google/Kconfig"
diff --git a/arch/x86/dts/Makefile b/arch/x86/dts/Makefile
index 4f07f41..ca086bd 100644
--- a/arch/x86/dts/Makefile
+++ b/arch/x86/dts/Makefile
@@ -9,6 +9,7 @@ dtb-y += bayleybay.dtb \
conga-qeval20-qa3-e3845.dtb \
cougarcanyon2.dtb \
crownbay.dtb \
+   dfi-bt700-q7x-151.dtb \
efi.dtb \
galileo.dtb \
minnowmax.dtb \
diff --git a/arch/x86/dts/dfi-bt700-q7x-151.dts 
b/arch/x86/dts/dfi-bt700-q7x-151.dts
new file mode 100644
index 000..31d9679
--- /dev/null
+++ b/arch/x86/dts/dfi-bt700-q7x-151.dts
@@ -0,0 +1,22 @@
+/*
+ * Copyright (C) 2014, Bin Meng 
+ * Copyright (C) 2016 Stefan Roese 
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+/dts-v1/;
+
+#include "dfi-bt700.dtsi"
+
+#include "serial.dtsi"
+
+/ {
+   model = "DFI-BT700";
+   compatible = "dfi,bt700", "intel,baytrail";
+
+   aliases {
+   serial0 = &serial;
+   spi0 = &spi;
+   };
+};
diff --git a/arch/x86/dts/dfi-bt700.dtsi b/arch/x86/dts/dfi-bt700.dtsi
new file mode 100644
index 000..75ee6ad
--- /dev/null
+++ b/arch/x86/dts/dfi-bt700.dtsi
@@ -0,0 +1,308 @@
+/*
+ * Copyright (C) 2014, Bin Meng 
+ * Copyright (C) 2016 Stefan Roese 
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include 
+#include 
+
+#include "skeleton.dtsi"
+#include "rtc.dtsi"
+#include "tsc_timer.dtsi"
+
+/ {
+   config {
+   silent_console = <0>;
+   };
+
+   pch_pinctrl {
+   compatible = "intel,x86-pinctrl";
+   reg = <0 0>;
+
+   /* Add UART1 PAD configuration (SIO HS-UART) */
+   uart1_txd@0 {
+   pad-offset = <0x10>;
+   mode-func = <1>;
+   };
+
+   uart1_rxd@0 {
+   pad-offset = <0x20>;
+   mode-func = <1>;
+   };
+
+   /*
+* As of today, the latest version FSP (gold4) for BayTrail
+* misses the PAD configuration of the SD controller's Card
+* Detect signal. The default PAD value for the CD pin sets
+* the pin to work in GPIO mode, which causes card detect
+* status cannot be reflected by the Present State register
+* in the SD controller (bit 16 & bit 18 are always zero).
+*
+* Configure this pin to function 1 (SD controller).
+*/
+   sdmmc3_cd@0 {
+   pad-offset = <0x3a0>;
+   mode-func = <1>;
+   

[U-Boot] [PATCH] x86: conga-qeval20-qa3: Add missing MAINTERNERS entry

2016-08-15 Thread Stefan Roese
Add entry for the missing internal UART defconfig to the MAINTAINERS
file.

Signed-off-by: Stefan Roese 
Cc: Bin Meng 
CC: Simon Glass 
---
 board/congatec/conga-qeval20-qa3-e3845/MAINTAINERS | 1 +
 1 file changed, 1 insertion(+)

diff --git a/board/congatec/conga-qeval20-qa3-e3845/MAINTAINERS 
b/board/congatec/conga-qeval20-qa3-e3845/MAINTAINERS
index 5a4d4dc..3d7e8e2 100644
--- a/board/congatec/conga-qeval20-qa3-e3845/MAINTAINERS
+++ b/board/congatec/conga-qeval20-qa3-e3845/MAINTAINERS
@@ -4,4 +4,5 @@ S:  Maintained
 F: board/congatec/conga-qeval20-qa3-e3845
 F: include/configs/conga-qeval20-qa3-e3845.h
 F: configs/conga-qeval20-qa3-e3845_defconfig
+F: configs/conga-qeval20-qa3-e3845-internal-uart_defconfig
 F: arch/x86/dts/conga-qeval20-qa3-e3845.dts
-- 
2.9.3

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


[U-Boot] [PATCH 2/2 v2] x86: Add theadorable-x86-dfi-bt700 board support

2016-08-15 Thread Stefan Roese
This patch adds support for the BayTrail based theadorable-x86-dfi-bt700
board which uses the DFI BT700 BayTrail Qseven SoM on a custom baseboard.
The main difference to the DFI baseboard is, that it isn't equipped
with a Super IO chip and uses the internal HS SIO UART (memory mapped
PCI based) as the console UART.

Signed-off-by: Stefan Roese 
Cc: Simon Glass 
Cc: Bin Meng 
Reviewed-by: Simon Glass 
Reviewed-by: Bin Meng 
---
v2:
- Add missing MAINTAINERS entry

 arch/x86/dts/Makefile   |  1 +
 arch/x86/dts/theadorable-x86-dfi-bt700.dts  | 21 ++
 board/dfi/dfi-bt700/MAINTAINERS |  2 +
 configs/theadorable-x86-dfi-bt700_defconfig | 60 +
 4 files changed, 84 insertions(+)
 create mode 100644 arch/x86/dts/theadorable-x86-dfi-bt700.dts
 create mode 100644 configs/theadorable-x86-dfi-bt700_defconfig

diff --git a/arch/x86/dts/Makefile b/arch/x86/dts/Makefile
index ca086bd..3f534ad 100644
--- a/arch/x86/dts/Makefile
+++ b/arch/x86/dts/Makefile
@@ -15,6 +15,7 @@ dtb-y += bayleybay.dtb \
minnowmax.dtb \
qemu-x86_i440fx.dtb \
qemu-x86_q35.dtb \
+   theadorable-x86-dfi-bt700.dtb \
broadwell_som-6896.dtb \
baytrail_som-db5800-som-6867.dtb
 
diff --git a/arch/x86/dts/theadorable-x86-dfi-bt700.dts 
b/arch/x86/dts/theadorable-x86-dfi-bt700.dts
new file mode 100644
index 000..75f9ffa
--- /dev/null
+++ b/arch/x86/dts/theadorable-x86-dfi-bt700.dts
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2014, Bin Meng 
+ * Copyright (C) 2016 Stefan Roese 
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+/dts-v1/;
+
+#include "dfi-bt700.dtsi"
+
+/ {
+   model = "theadorable-x86-DFI-BT700";
+   compatible = "anonymous,theadorable-x86-dfi-bt700", "dfi,bt700",
+   "intel,baytrail";
+
+   aliases {
+   serial0 = &pciuart0;
+   spi0 = &spi;
+   };
+};
diff --git a/board/dfi/dfi-bt700/MAINTAINERS b/board/dfi/dfi-bt700/MAINTAINERS
index 9c3d699..6639787 100644
--- a/board/dfi/dfi-bt700/MAINTAINERS
+++ b/board/dfi/dfi-bt700/MAINTAINERS
@@ -4,5 +4,7 @@ S:  Maintained
 F: board/dfi/dfi-bt700
 F: include/configs/dfi-bt700.h
 F: configs/dfi-bt700-q7x-151_defconfig
+F: configs/theadorable-x86-dfi-bt700_defconfig
 F: arch/x86/dts/dfi-bt700.dtsi
 F: arch/x86/dts/dfi-bt700-q7x-151.dts
+F: arch/x86/dts/theadorable-x86-dfi-bt700.dts
diff --git a/configs/theadorable-x86-dfi-bt700_defconfig 
b/configs/theadorable-x86-dfi-bt700_defconfig
new file mode 100644
index 000..3aba157
--- /dev/null
+++ b/configs/theadorable-x86-dfi-bt700_defconfig
@@ -0,0 +1,60 @@
+CONFIG_X86=y
+CONFIG_DM_I2C=y
+CONFIG_VENDOR_DFI=y
+CONFIG_DEFAULT_DEVICE_TREE="theadorable-x86-dfi-bt700"
+CONFIG_TARGET_DFI_BT700=y
+CONFIG_HAVE_INTEL_ME=y
+CONFIG_ENABLE_MRC_CACHE=y
+CONFIG_SMP=y
+CONFIG_HAVE_VGA_BIOS=y
+CONFIG_GENERATE_PIRQ_TABLE=y
+CONFIG_GENERATE_MP_TABLE=y
+CONFIG_GENERATE_ACPI_TABLE=y
+CONFIG_SEABIOS=y
+CONFIG_FIT=y
+CONFIG_FIT_SIGNATURE=y
+CONFIG_BOOTSTAGE=y
+CONFIG_BOOTSTAGE_REPORT=y
+CONFIG_HUSH_PARSER=y
+CONFIG_CMD_CPU=y
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_MMC=y
+CONFIG_CMD_SF=y
+CONFIG_CMD_SPI=y
+CONFIG_CMD_USB=y
+CONFIG_CMD_GPIO=y
+# CONFIG_CMD_SETEXPR is not set
+CONFIG_CMD_DHCP=y
+# CONFIG_CMD_NFS is not set
+CONFIG_CMD_PING=y
+CONFIG_CMD_TIME=y
+CONFIG_CMD_BOOTSTAGE=y
+CONFIG_CMD_EXT2=y
+CONFIG_CMD_EXT4=y
+CONFIG_CMD_EXT4_WRITE=y
+CONFIG_CMD_FAT=y
+CONFIG_CMD_FS_GENERIC=y
+CONFIG_OF_CONTROL=y
+CONFIG_REGMAP=y
+CONFIG_SYSCON=y
+CONFIG_CPU=y
+CONFIG_NUVOTON_NCT6102D=y
+CONFIG_SPI_FLASH=y
+CONFIG_SPI_FLASH_GIGADEVICE=y
+CONFIG_SPI_FLASH_MACRONIX=y
+CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_SPI_FLASH_WINBOND=y
+CONFIG_DM_ETH=y
+CONFIG_E1000=y
+CONFIG_DM_PCI=y
+CONFIG_DM_RTC=y
+CONFIG_SYS_NS16550=y
+CONFIG_ICH_SPI=y
+CONFIG_TIMER=y
+CONFIG_USB=y
+CONFIG_DM_USB=y
+CONFIG_VIDEO_VESA=y
+CONFIG_FRAMEBUFFER_SET_VESA_MODE=y
+CONFIG_FRAMEBUFFER_VESA_MODE_114=y
+CONFIG_USE_PRIVATE_LIBGCC=y
-- 
2.9.3

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


Re: [U-Boot] A64 fastboot, faster way to compile/test

2016-08-15 Thread jonsm...@gmail.com
On Sun, Aug 14, 2016 at 9:58 PM, Sergey Kubushyn  wrote:
> On Sun, 14 Aug 2016, jonsm...@gmail.com wrote:
>
>> I'm trying out various versions of the A64 u-boot -- Allwinner lichee,
>> longsleep, apritzel, etc on the Pine64. I can get all of them up to
>> the prompt, but fastboot doesn't work in an of them. There is code
>> from Allwinner in there for implementing fastboot, but so far I've had
>> no luck getting it to do anything. I added a bunch of debug and the
>> USB controller does not appear to be generating interrupts.
>>
>> Has anyone worked with A64 fastboot? Any tips on what might be wrong?
>>
>> I want a faster was to update the SD Card without physically moving it
>> between machines.
>
>
> Use ums. Works like a charm. As of fastboot it is Android weirdo and its
> support in U-Boot is rudimentary. Dunno why it is in the source tree at
> all -- if it was me I would've removed it altogether...

ums would also work... but I have to locate an A64 uboot with
functioning USB gadget code.


>
> ---
> **
> *  KSI@homeKOI8 Net  < >  The impossible we do immediately.  *
> *  Las Vegas   NV, USA   < >  Miracles require 24-hour notice.   *
> **



-- 
Jon Smirl
jonsm...@gmail.com
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 3/6] arm: efi: Add a hello world test program

2016-08-15 Thread Leif Lindholm
On Tue, Aug 09, 2016 at 10:55:31PM +0200, Alexander Graf wrote:
> 
> 
> > Am 09.08.2016 um 20:16 schrieb Simon Glass :
> > 
> > Hi Bin,
> > 
> >> On 9 August 2016 at 00:50, Bin Meng  wrote:
> >> Hi Simon,
> >> 
> >>> On Sun, Aug 7, 2016 at 7:23 AM, Simon Glass  wrote:
> >>> It is useful to have a basic sanity check for EFI loader support. Add a
> >>> 'bootefi hello' command which loads HelloWord.efi and runs it under 
> >>> U-Boot.
> >>> 
> >>> Signed-off-by: Simon Glass 
> >>> ---
> >>> 
> >>> arch/arm/lib/HelloWorld32.efi  | Bin 0 -> 11712 bytes
> >>> arch/arm/lib/Makefile  |   6 ++
> >>> cmd/Kconfig|  10 ++
> >>> cmd/bootefi.c  |  26 --
> >>> include/asm-generic/sections.h |   2 ++
> >>> scripts/Makefile.lib   |  19 +++
> >>> 6 files changed, 57 insertions(+), 6 deletions(-)
> >>> create mode 100644 arch/arm/lib/HelloWorld32.efi
> >> 
> >> [snip]
> >> 
> >>> diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile
> >>> index a8d1557..0f3ea0c 100644
> >>> --- a/arch/arm/lib/Makefile
> >>> +++ b/arch/arm/lib/Makefile
> >>> @@ -29,6 +29,12 @@ obj-$(CONFIG_OF_LIBFDT) += bootm-fdt.o
> >>> obj-$(CONFIG_CMD_BOOTM) += bootm.o
> >>> obj-$(CONFIG_CMD_BOOTM) += zimage.o
> >>> obj-$(CONFIG_SYS_L2_PL310) += cache-pl310.o
> >>> +ifdef CONFIG_ARM64
> >>> +# This option does not work for arm64, as there is no binary.
> >> 
> >> If so, can we just remove this for arm64?
> > 
> > Actually I was hoping that Alexander might have a suitable arm64
> > HelloWorld.efi lying around. When I tried building UEFI for arm64, for
> > some reason it did not create it.
> 
> Is it part of edk2? If so, Leif (CC'ed) might have one :). I usually
> use grub as my hello world application.

There is a hello world application in EDK2, but it does not get built
as part of a normal platform build.
Currently it also fails to build for ARM* on its own :|
See
http://patchew.org/EDK2/1471021908-3509-1-git-send-email-leif.lindholm%40linaro.org/
for a hack of how to build one before upstream is resolved.

If cross compiling, prepend GCC5_AARCH64_PREFIX=aarch64-linux-gnu- to
build command line.

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


[U-Boot] [PATCH] warp: Fix RAM size runtime detection

2016-08-15 Thread Fabio Estevam
From: Fabio Estevam 

Since commit a13d3757f7df ("warp: Use imx_ddr_size() for calculating the
DDR size") warp board no longer boots.

The reason for the breakage is that the warp board is using the DDR
configuration from mx6slevk. A fundamental difference between warp and
mx6slevk is that warp only uses one DDR chip select while mx6slevk uses two.

The imx_ddr() function calculates the RAM size in runtime by reading the
values of registers MDCTL and MDMISC. 

So in order to fix this warp boot issue, create a imximage DDR file specific
to warp, where the MDCTL register is configured to only activates a single
chip select.

Reported-by: Breno Lima 
Signed-off-by: Fabio Estevam 
Tested-by: Breno Lima 
---
 board/warp/imximage.cfg | 115 
 configs/warp_defconfig  |   2 +-
 2 files changed, 116 insertions(+), 1 deletion(-)
 create mode 100644 board/warp/imximage.cfg

diff --git a/board/warp/imximage.cfg b/board/warp/imximage.cfg
new file mode 100644
index 000..7b1d6b7
--- /dev/null
+++ b/board/warp/imximage.cfg
@@ -0,0 +1,115 @@
+/*
+ * Copyright (C) 2013 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ *
+ * Refer docs/README.imxmage for more details about how-to configure
+ * and create imximage boot image
+ *
+ * The syntax is taken as close as possible with the kwbimage
+ */
+
+/* image version */
+
+IMAGE_VERSION 2
+
+/*
+ * Boot Device : one of
+ * spi, sd (the board has no nand neither onenand)
+ */
+
+BOOT_FROM  sd
+
+/*
+ * Device Configuration Data (DCD)
+ *
+ * Each entry must have the format:
+ * Addr-type   AddressValue
+ *
+ * where:
+ * Addr-type register length (1,2 or 4 bytes)
+ * Address   absolute address of the register
+ * value value to be stored in the register
+ */
+DATA 4 0x020c4018 0x00260324
+
+DATA 4 0x020c4068 0x
+DATA 4 0x020c406c 0x
+DATA 4 0x020c4070 0x
+DATA 4 0x020c4074 0x
+DATA 4 0x020c4078 0x
+DATA 4 0x020c407c 0x
+DATA 4 0x020c4080 0x
+
+DATA 4 0x020e0344 0x3030
+DATA 4 0x020e0348 0x3030
+DATA 4 0x020e034c 0x3030
+DATA 4 0x020e0350 0x3030
+DATA 4 0x020e030c 0x0030
+DATA 4 0x020e0310 0x0030
+DATA 4 0x020e0314 0x0030
+DATA 4 0x020e0318 0x0030
+DATA 4 0x020e0300 0x0030
+DATA 4 0x020e031c 0x0030
+DATA 4 0x020e0338 0x0028
+DATA 4 0x020e0320 0x0030
+DATA 4 0x020e032c 0x
+DATA 4 0x020e033c 0x0008
+DATA 4 0x020e0340 0x0008
+DATA 4 0x020e05c4 0x0030
+DATA 4 0x020e05cc 0x0030
+DATA 4 0x020e05d4 0x0030
+DATA 4 0x020e05d8 0x0030
+DATA 4 0x020e05ac 0x0030
+DATA 4 0x020e05c8 0x0030
+DATA 4 0x020e05b0 0x0002
+DATA 4 0x020e05b4 0x
+DATA 4 0x020e05c0 0x0002
+DATA 4 0x020e05d0 0x0008
+
+DATA 4 0x021b001c 0x8000
+DATA 4 0x021b085c 0x1b4700c7
+DATA 4 0x021b0800 0xa1390003
+DATA 4 0x021b0890 0x0040
+DATA 4 0x021b08b8 0x0800
+DATA 4 0x021b081c 0x
+DATA 4 0x021b0820 0x
+DATA 4 0x021b0824 0x
+DATA 4 0x021b0828 0x
+DATA 4 0x021b082c 0xf333
+DATA 4 0x021b0830 0xf333
+DATA 4 0x021b0834 0xf333
+DATA 4 0x021b0838 0xf333
+DATA 4 0x021b0848 0x4241444a
+DATA 4 0x021b0850 0x3030312b
+DATA 4 0x021b083c 0x2000
+DATA 4 0x021b0840 0x
+DATA 4 0x021b08c0 0x24911492
+DATA 4 0x021b08b8 0x0800
+DATA 4 0x021b000c 0x33374133
+DATA 4 0x021b0004 0x00020024
+DATA 4 0x021b0010 0x00100A82
+DATA 4 0x021b0014 0x0093
+DATA 4 0x021b0018 0x1688
+DATA 4 0x021b002c 0x0f9f26d2
+DATA 4 0x021b0030 0x009f0e10
+DATA 4 0x021b0038 0x00190778
+DATA 4 0x021b0008 0x
+DATA 4 0x021b0040 0x004f
+DATA 4 0x021b 0x8311
+DATA 4 0x021b001c 0x003f8030
+DATA 4 0x021b001c 0xff0a8030
+DATA 4 0x021b001c 0x82018030
+DATA 4 0x021b001c 0x04028030
+DATA 4 0x021b001c 0x02038030
+DATA 4 0x021b001c 0xff0a8038
+DATA 4 0x021b001c 0x82018038
+DATA 4 0x021b001c 0x04028038
+DATA 4 0x021b001c 0x02038038
+DATA 4 0x021b0800 0xa1310003
+DATA 4 0x021b0020 0x1800
+DATA 4 0x021b0818 0x
+DATA 4 0x021b08b8 0x0800
+DATA 4 0x021b0004 0x00025564
+DATA 4 0x021b0404 0x00011006
+DATA 4 0x021b001c 0x
diff --git a/configs/warp_defconfig b/configs/warp_defconfig
index 389bb7f..786d7e8 100644
--- a/configs/warp_defconfig
+++ b/configs/warp_defconfig
@@ -1,7 +1,7 @@
 CONFIG_ARM=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_WARP=y
-CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6slevk/imximage.cfg,MX6SL"
+CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/warp/imximage.cfg,MX6SL"
 CONFIG_BOOTDELAY=3
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
-- 
2.7.4

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


Re: [U-Boot] [RFC PATCH] ARM: cache: cp15: Align addresses when initial page_table setup is flushed

2016-08-15 Thread Lukasz Majewski
Hi Fabio,

> Hi Lukasz,
> 
> On Wed, Aug 10, 2016 at 5:15 AM, Lukasz Majewski
>  wrote:
> 
> > I see that I wasn't the only one.
> >
> > Both patches are identical, Stefan was first :-)
> >
> > My concern is that, as I've written with comment to my patch, that
> > when I was running build tests some other boards were broken since
> > they didn't define CONFIG_SYS_CACHELINE_SIZE.
> 
> For which boards did you see build failure with this patch?

Branch: master
SHA1: f60d0603edca472c4458b30956f38c6c1a836d66

Siemens: axm board

./tools/buildman/buildman.py --branch=HEAD siemens --detail --verbose
--show_errors --force-build --count=1 --output-dir=./BUILD/

04: ARM: cache: cp15: Align addresses when initial page_table setup is
flushed arm:  +   axm
+../arch/arm/lib/cache-cp15.c: In function
'mmu_set_region_dcache_behaviour': +../arch/arm/lib/cache-cp15.c:76:7:
error: 'CONFIG_SYS_CACHELINE_SIZE' undeclared (first use in this
function)
+   & ~(CONFIG_SYS_CACHELINE_SIZE - 1);


Samsung: smdk2410

01: ARM: cache: cp15: Align addresses when initial page_table setup is
flushed arm:  +   smdk2410
+../arch/arm/lib/cache-cp15.c: In function
'mmu_set_region_dcache_behaviour': +../arch/arm/lib/cache-cp15.c:76:7:
error: 'CONFIG_SYS_CACHELINE_SIZE' undeclared (first use in this
function)
+   & ~(CONFIG_SYS_CACHELINE_SIZE - 1);

Probably more boards is affected too.

> 
> Thanks

Best regards,
Łukasz Majewski


pgpF6EJUbtAh0.pgp
Description: OpenPGP digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] Revert "warp: Use imx_ddr_size() for calculating the DDR size"

2016-08-15 Thread Fabio Estevam
Hi Stefano,

On Fri, Aug 12, 2016 at 9:49 PM, Fabio Estevam  wrote:
> Hi Stefano,
>
> On Fri, Aug 12, 2016 at 6:07 PM, Stefano Babic  wrote:
>
>> Let's say: if there won't be any fix before the release, it is ok to
>> revert this.
>
> Fair enough. I have prepared a patch that adds a imximage file for
> warp and fix the MDCTL register.
>
> Breno will test it on Monday.

Breno confirmed my patch fixes the warp board boot. I have just
submitted to the list.

Regards,

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


Re: [U-Boot] [U-Boot, RFC] vexpress: Check TC2 firmware support before defaulting to nonsec booting

2016-08-15 Thread Jon Medhurst (Tixy)
On Sun, 2016-08-14 at 16:05 -0400, Tom Rini wrote:
> On Thu, Jun 23, 2016 at 01:37:32PM +0100, Jon Medhurst (Tixy) wrote:
> 
> > The firmware on TC2 needs to be configured appropriately before booting
> > in nonsec mode will work as expected, so test for this and fall back to
> > sec mode if required.
> > 
> > Signed-off-by: Jon Medhurst 
> > Reviewed-by: Ryan Harkin 
> > Tested-by: Ryan Harkin 
> > ---
> > 
> > This is an implementation of Andre's suggestion in
> > http://lists.denx.de/pipermail/u-boot/2016-June/258873.html
> > 
> > Possibly the change to bootm.c should be in a separate patch?
> > 
> >  arch/arm/lib/bootm.c | 15 ++-
> >  board/armltd/vexpress/Makefile   |  1 +
> >  board/armltd/vexpress/vexpress_tc2.c | 33 +
> >  3 files changed, 44 insertions(+), 5 deletions(-)
> >  create mode 100644 board/armltd/vexpress/vexpress_tc2.c
> 
> So, this supersedes https://patchwork.ozlabs.org/patch/639232/ right?

Yes, it does.

Thanks

-- 
Tixy

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


Re: [U-Boot] UMS - maintain connection

2016-08-15 Thread Lukasz Majewski
Hi John Tobias,

> Hello All,
> 
> I am using ums (USB Mass Storage) in u-boot to expose the storage of
> my device into my host machine. Everything works okay except when the
> host machine wakeup from the sleep - my device got disconnect from
> host after it received an resume signal.
> 
> I tried the g_mass_storage driver in the kernel and it works fine. It
> never disconnect when the host machine goes to sleep and wake it up.
> 
> Does anyone have encountered the said issue?.

Frankly speaking, I did not anticipate such test case.

You probably connect to your laptop, which may go sleep?

> How did you fix it?.

(For now) no solution... I need to investigate this issue.

> 
> Regards,
> 
> John

Best regards,
Łukasz Majewski


pgpTPHbnTXutA.pgp
Description: OpenPGP digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] buildman error

2016-08-15 Thread Bin Meng
Hi Simon,

When building u-boot-spi/next, I got lots of error messages like below
after cloning, however the build seems to be not affected (ie: build
is running and the summary statistics is updating on the shell)

Exception in thread Thread-32:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
  File "/u-boot/tools/buildman/builderthread.py", line 477, in run
self.RunJob(job)
  File "/u-boot/tools/buildman/builderthread.py", line 410, in RunJob
self.builder.force_build_failures)
  File "/u-boot/tools/buildman/builderthread.py", line 187, in RunCommit
force=True)
  File "/u-boot/tools/buildman/../patman/gitutil.py", line 227, in Checkout
raise OSError, 'git checkout (%s): %s' % (pipe, result.stderr)
OSError: git checkout (['git', '--git-dir',
'/work/buildman/spi-next/.bm-work/31/.git', '--work-tree',
'/work/buildman/spi-next/.bm-work/31', 'checkout', '-f',
'1284caa4694d69d64e27191d7e5b822b51c3ea2c']): fatal: unable to create
threaded lstat

Do you know what's the issue here?

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


Re: [U-Boot] [PATCH] spi: tegra20: fix mode selection logic

2016-08-15 Thread Stephen Warren

On 08/13/2016 09:56 AM, Jagan Teki wrote:

On 13 August 2016 at 02:36, Stephen Warren  wrote:

From: Stephen Warren 

When the set_mode() function runs, the SPI bus is not active, and hence
the clocks to the SPI controller are not running. Any register read/write
at this time will hang the CPU. Remove the code from set_mode() that does
this, and move it to the correct place in claim_bus().


The idea of claim_bus is just to enable the bus for any transaction to
start, since set_mode is running before claim (ex: spi_get_bus_and_cs
while 'sf probe') it's .probe which actual driver binding
responsibility to initialize the SPI bus so-that .set_mode and
.set_speed will set the mode and freq for that initialized bus based
on the inputs from user, drivers like zynq, exynos will follow the
same.


I'd rather not re-structure the driver, and to be honest I see no point 
in mandating that drivers activate their clocks/resets in probe rather 
than solely during the actual SPI transaction.


Anyway, if the patch I sent isn't acceptable, please can you simply 
revert the patch it fixes so that SPI on Tegra works again? Thanks.


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


[U-Boot] [PATCH v4 2/2] serial: bcm283x_mu: Detect disabled serial device

2016-08-15 Thread Alexander Graf
On the raspberry pi, you can disable the serial port to gain dynamic frequency
scaling which can get handy at times.

However, in such a configuration the serial controller gets its rx queue filled
up with zero bytes which then happily get transmitted on to whoever calls
getc() today.

This patch adds detection logic for that case by checking whether the RX pin is
mapped to GPIO15 and disables the mini uart if it is not mapped properly.

That way we can leave the driver enabled in the tree and can determine during
runtime whether serial is usable or not, having a single binary that allows for
uart and non-uart operation.

Signed-off-by: Alexander Graf 

---

v2 -> v3:

  - Disable and detect pinmux in board file

v3 -> v4:

  - Detect in early code and disable by failing serial probe
---
 board/raspberrypi/rpi/rpi.c  | 34 +++-
 configs/rpi_3_32b_defconfig  |  2 ++
 configs/rpi_3_defconfig  |  2 ++
 drivers/gpio/bcm2835_gpio.c  |  1 +
 drivers/serial/serial_bcm283x_mu.c   |  3 +++
 include/configs/rpi.h|  1 +
 include/dm/platform_data/serial_bcm283x_mu.h |  1 +
 7 files changed, 43 insertions(+), 1 deletion(-)

diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
index 4c8253d..7f057e1 100644
--- a/board/raspberrypi/rpi/rpi.c
+++ b/board/raspberrypi/rpi/rpi.c
@@ -51,7 +51,7 @@ U_BOOT_DEVICE(bcm2835_serials) = {
.platdata = &serial_platdata,
 };
 #else
-static const struct bcm283x_mu_serial_platdata serial_platdata = {
+static struct bcm283x_mu_serial_platdata serial_platdata = {
.base = 0x3f215040,
.clock = 25000,
.skip_init = true,
@@ -453,6 +453,38 @@ int board_init(void)
return power_on_module(BCM2835_MBOX_POWER_DEVID_USB_HCD);
 }
 
+#ifndef CONFIG_PL01X_SERIAL
+static bool rpi_is_serial_active(void)
+{
+   int serial_gpio = 15;
+   struct udevice *dev;
+
+   /*
+* The RPi3 disables the mini uart by default. The easiest way to find
+* out whether it is available is to check if the RX pin is muxed.
+*/
+
+   if (uclass_first_device(UCLASS_GPIO, &dev) || !dev)
+   return true;
+
+   if (bcm2835_gpio_get_func_id(dev, serial_gpio) != BCM2835_GPIO_ALT5)
+   return false;
+
+   return true;
+}
+#endif
+
+int board_early_init_f(void)
+{
+#ifndef CONFIG_PL01X_SERIAL
+   /* Disable mini-UART I/O if it's not pinmuxed to our pins */
+   if (!rpi_is_serial_active())
+   serial_platdata.disabled = true;
+#endif
+
+   return 0;
+}
+
 int board_mmc_init(bd_t *bis)
 {
ALLOC_CACHE_ALIGN_BUFFER(struct msg_get_clock_rate, msg_clk, 1);
diff --git a/configs/rpi_3_32b_defconfig b/configs/rpi_3_32b_defconfig
index 922e01b..c59474c 100644
--- a/configs/rpi_3_32b_defconfig
+++ b/configs/rpi_3_32b_defconfig
@@ -20,3 +20,5 @@ CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_PHYS_TO_BUS=y
 CONFIG_OF_LIBFDT=y
+# CONFIG_REQUIRE_SERIAL_CONSOLE is not set
+CONFIG_SYS_MALLOC_F_LEN=0x2000
diff --git a/configs/rpi_3_defconfig b/configs/rpi_3_defconfig
index bff92df..67c4a0c 100644
--- a/configs/rpi_3_defconfig
+++ b/configs/rpi_3_defconfig
@@ -19,3 +19,5 @@ CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_PHYS_TO_BUS=y
 CONFIG_OF_LIBFDT=y
+# CONFIG_REQUIRE_SERIAL_CONSOLE is not set
+CONFIG_SYS_MALLOC_F_LEN=0x2000
diff --git a/drivers/gpio/bcm2835_gpio.c b/drivers/gpio/bcm2835_gpio.c
index 8b88d79..8dd7a28 100644
--- a/drivers/gpio/bcm2835_gpio.c
+++ b/drivers/gpio/bcm2835_gpio.c
@@ -123,5 +123,6 @@ U_BOOT_DRIVER(gpio_bcm2835) = {
.id = UCLASS_GPIO,
.ops= &gpio_bcm2835_ops,
.probe  = bcm2835_gpio_probe,
+   .flags  = DM_FLAG_PRE_RELOC,
.priv_auto_alloc_size = sizeof(struct bcm2835_gpios),
 };
diff --git a/drivers/serial/serial_bcm283x_mu.c 
b/drivers/serial/serial_bcm283x_mu.c
index 7357bbf..f4e062f 100644
--- a/drivers/serial/serial_bcm283x_mu.c
+++ b/drivers/serial/serial_bcm283x_mu.c
@@ -73,6 +73,9 @@ static int bcm283x_mu_serial_probe(struct udevice *dev)
struct bcm283x_mu_serial_platdata *plat = dev_get_platdata(dev);
struct bcm283x_mu_priv *priv = dev_get_priv(dev);
 
+   if (plat->disabled)
+   return -ENODEV;
+
priv->regs = (struct bcm283x_mu_regs *)plat->base;
 
return 0;
diff --git a/include/configs/rpi.h b/include/configs/rpi.h
index b5543f4..4e5b3f3 100644
--- a/include/configs/rpi.h
+++ b/include/configs/rpi.h
@@ -22,6 +22,7 @@
 
 /* Architecture, CPU, etc.*/
 #define CONFIG_ARCH_CPU_INIT
+#define CONFIG_BOARD_EARLY_INIT_F
 
 /* Use SoC timer for AArch32, but architected timer for AArch64 */
 #ifndef CONFIG_ARM64
diff --git a/include/dm/platform_data/serial_bcm283x_mu.h 
b/include/dm/platform_data/serial_bcm283x_mu.h
index 57ae6ad..c47d3c0 100644
--- a/include/dm/platform_data/serial_bcm283x_mu.h
+++ b/include/dm/platform_data/serial_bcm283x_mu.h
@@ 

[U-Boot] [PATCH] common: env_nand: Ensure that we have nand_info[0] prior to use

2016-08-15 Thread Tom Rini
Now that nand_info[] is an array of pointers we need to ensure that it's
been populated prior to use.  We may for example have ENV in NAND set in
configurations that run on boards with and without NAND (where default
env is fine enough, such as omap3_beagle and beagleboard (NAND) vs
beagle xM (no NAND)).

Fixes: b616d9b0a708 ("nand: Embed mtd_info in struct nand_chip")
Cc: Scott Wood 
Signed-off-by: Tom Rini 
---
 common/env_nand.c | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/common/env_nand.c b/common/env_nand.c
index fc99a5e3fc0d..9a2dec187690 100644
--- a/common/env_nand.c
+++ b/common/env_nand.c
@@ -132,6 +132,9 @@ static int writeenv(size_t offset, u_char *buf)
size_t blocksize, len;
u_char *char_ptr;
 
+   if (!nand_info[0])
+   return 1;
+
blocksize = nand_info[0]->erasesize;
len = min(blocksize, (size_t)CONFIG_ENV_SIZE);
 
@@ -244,10 +247,12 @@ static int readenv(size_t offset, u_char *buf)
 {
size_t end = offset + CONFIG_ENV_RANGE;
size_t amount_loaded = 0;
-   size_t blocksize, len;
+   size_t blocksize = 0, len;
u_char *char_ptr;
 
-   blocksize = nand_info[0]->erasesize;
+   if (nand_info[0])
+   blocksize = nand_info[0]->erasesize;
+
if (!blocksize)
return 1;
 
-- 
1.9.1

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


[U-Boot] [PATCH v2] common: env_nand: Ensure that we have nand_info[0] prior to use

2016-08-15 Thread Tom Rini
Now that nand_info[] is an array of pointers we need to ensure that it's
been populated prior to use.  We may for example have ENV in NAND set in
configurations that run on boards with and without NAND (where default
env is fine enough, such as omap3_beagle and beagleboard (NAND) vs
beagle xM (no NAND)).

Fixes: b616d9b0a708 ("nand: Embed mtd_info in struct nand_chip")
Cc: Scott Wood 
Signed-off-by: Tom Rini 
---
Changes in v2:
- Oops, move check on the saveenv side in to erase_and_write_env
---
 common/env_nand.c | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/common/env_nand.c b/common/env_nand.c
index fc99a5e3fc0d..96a1020b5e79 100644
--- a/common/env_nand.c
+++ b/common/env_nand.c
@@ -163,6 +163,9 @@ static int erase_and_write_env(const struct env_location 
*location,
 {
int ret = 0;
 
+   if (!nand_info[0])
+   return 1;
+
printf("Erasing %s...\n", location->name);
if (nand_erase_opts(nand_info[0], &location->erase_opts))
return 1;
@@ -244,10 +247,12 @@ static int readenv(size_t offset, u_char *buf)
 {
size_t end = offset + CONFIG_ENV_RANGE;
size_t amount_loaded = 0;
-   size_t blocksize, len;
+   size_t blocksize = 0, len;
u_char *char_ptr;
 
-   blocksize = nand_info[0]->erasesize;
+   if (nand_info[0])
+   blocksize = nand_info[0]->erasesize;
+
if (!blocksize)
return 1;
 
-- 
1.9.1

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


Re: [U-Boot] cmd: net: flush cache cacheline aligned

2016-08-15 Thread Joe Hershberger
On Sun, Aug 14, 2016 at 3:06 PM, Tom Rini  wrote:
> On Tue, Aug 02, 2016 at 12:20:28AM -0700, Stefan Agner wrote:
>
>> From: Stefan Agner 
>>
>> Flush loaded data cacheline aligned. This avoids warnings such as
>> CACHE: Misaligned operation at range [8100, 816d0fa8]
>>
>> Signed-off-by: Stefan Agner 
>> Tested-by: Fabio Estevam 
>> Reviewed-by: Simon Glass 
>> ---
>> Why do we actually have to flush caches after load? It seems to
>> have worked so far despite the caches did not get flushed (due to
>> missalignment).
>
> Joe, would you prefer to just drop this flush, given the rest of the
> thread?  Thanks!

That's what I'd prefer. I'm willing to wait for a bit more discussion. though.

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


Re: [U-Boot] [PATCH] drivers: net: keystone_net: add rgmii link type support when parsing dt

2016-08-15 Thread Joe Hershberger
On Thu, Aug 11, 2016 at 9:34 AM, Mugunthan V N  wrote:
> Add support to detect RGMII link interface from link-interface
> device tree entry. Also rename the existing link type enums so
> that it provides meaningful interface like SGMII.
>
> Signed-off-by: Mugunthan V N 

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


Re: [U-Boot] [PATCH 1/3] net: davinci_emac: Remove useless dcache ops on descriptors

2016-08-15 Thread Joe Hershberger
On Sun, Aug 14, 2016 at 10:03 AM, Karl Beldan  wrote:
> ATM the rx and tx descriptors are handled as cached memory while they
> lie in a dedicated RAM of the SoCs, which is an uncached area.
> Removing the said dcache ops, while optimizing the logic and clarifying
> the code, also gets rid of most of the check_cache_range() incurred
> warnings:
> CACHE: Misaligned operation at range
>
> Signed-off-by: Karl Beldan 

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


Re: [U-Boot] [PATCH 2/3] net: davinci_emac: Round up top buffer boundaries for dcache ops

2016-08-15 Thread Joe Hershberger
On Sun, Aug 14, 2016 at 10:47 AM, Tom Rini  wrote:
> On Sun, Aug 14, 2016 at 03:03:16PM +, Karl Beldan wrote:
>
>> check_cache_range() warns that the top boundaries are not properly
>> aligned while flushing and invalidating the buffers and make these
>> operations to fail.
>> ATM the RX bottom boundaries are aligned by design with EMAC_RXBUF_SIZE,
>> properly aligned with ARCH_DMA_MINALIGN, however the top ones are not.
>>
>> This gets rid of the warnings:
>> CACHE: Misaligned operation at range
>>
>> Signed-off-by: Karl Beldan 
>> ---
>>  drivers/net/davinci_emac.c | 6 --
>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
>> index 947bfab..55461b0 100644
>> --- a/drivers/net/davinci_emac.c
>> +++ b/drivers/net/davinci_emac.c
>> @@ -632,7 +632,8 @@ static int davinci_eth_send_packet (struct eth_device 
>> *dev,
>> EMAC_CPPI_EOP_BIT);
>>
>>   flush_dcache_range((unsigned long)packet,
>> - (unsigned long)packet + length);
>> +round_up((unsigned long)packet + length,
>> + ARCH_DMA_MINALIGN));
>
> It's preferred to use:
> (unsigned long)packet + ALIGN(length, PKTALIGN));
> here instead of ARCH_DMA_MINALIGN.

Correct, please resend.

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


Re: [U-Boot] [PATCH 2/2] fs/fat: Optimizes memory size with single global variable instead of 3

2016-08-15 Thread Stephen Warren

On 08/13/2016 04:57 PM, Benoît Thébaudeau wrote:

Hi,

On Tue, Aug 2, 2016 at 9:35 PM, Benoît Thébaudeau
 wrote:

On Tue, Aug 2, 2016 at 8:53 PM, Stephen Warren  wrote:

On 07/28/2016 12:11 AM, Tien Fong Chee wrote:


Single 64KB get_contents_vfatname_block global variable would be used for
all FAT implementation instead of allocating additional two global
variables
which are get_denfromdir_block and do_fat_read_at_block. This
implementation
can help in saving up 128KB memory space.



The series,

Tested-by: Stephen Warren 
(via DFU's FAT reading/writing on various Tegra; likely primarily FAT rather
than VFAT though)

Reviewed-by: Stephen Warren 


I suspect that reading a filename with VFAT entries crossing a cluster
boundary in a FAT32 root directory will be broken by this series. I do
not have time to test this and other corner cases right now though,
but it will be possible in the next few weeks.


I have tested VFAT long filenames with the current implementation on
Sandbox. It's completely broken:
 - There is a length limit somewhere between 111 and 120 characters,
instead of 256 characters. Beyond this limit, the files are invisible
with ls.
 - Some filenames are truncated or mixed up between files. I have
tested 111-character random filenames for 1000 empty files in the root
directory. Most filenames had the expected length, but a few were
shorter or longer.
 - If there are too many files in the root directory, ls hangs.

I am pretty sure that this series introduces some regressions, but
they seem to be in corner cases that cannot even be used or tested
because of other bugs, so this series might not make this
implementation much more broken than it currently is. It's risky,
though.

I've quickly looked into TianoCore EDK II. It is so deeply tied to the
EFI driver model and APIs that it would be a pain to port to U-Boot.
Its FAT module is not designed to be portable beyond EFI. Its build
system would complicate things too.

Stephen, according to what you say in test/fs/fat-noncontig-test.sh,
your solution to accelerate FatFs seems to be working, even if the
author is not interested in it, so maybe it would still be worth
maintaining locally in order to have a reliable FAT support, also with
a small memory footprint. barebox uses FatFs.


Tom, any thoughts here re: the FF FAT implementation again?

BTW, I had some user of FF FAT about the "contiguous read" patch 
claiming that it caused issues in some cases. I didn't investigate since 
we'd dropped the idea of using FF FAT. Hopefully I could find the email 
(or maybe it was a post of the FF forums) again.

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


Re: [U-Boot] [PATCH 3/3] net: davinci_emac: Invalidate only the received portion of a buffer

2016-08-15 Thread Joe Hershberger
On Sun, Aug 14, 2016 at 10:03 AM, Karl Beldan  wrote:
> ATM when receiving a packet the whole buffer is invalidated, this change
> optimizes this behaviour.
>
> Signed-off-by: Karl Beldan 
> ---
>  drivers/net/davinci_emac.c | 12 ++--
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
> index 55461b0..e26e727 100644
> --- a/drivers/net/davinci_emac.c
> +++ b/drivers/net/davinci_emac.c
> @@ -677,13 +677,13 @@ static int davinci_eth_rcv_packet (struct eth_device 
> *dev)
> printf ("WARN: emac_rcv_pkt: Error in packet\n");
> } else {
> unsigned long tmp = (unsigned 
> long)rx_curr_desc->buffer;
> +   unsigned short len =
> +   rx_curr_desc->buff_off_len & 0x;
>
> -   invalidate_dcache_range(tmp, round_up(tmp + 
> EMAC_RXBUF_SIZE,
> - 
> ARCH_DMA_MINALIGN));
> -   net_process_received_packet(
> -   rx_curr_desc->buffer,
> -   rx_curr_desc->buff_off_len & 0x);
> -   ret = rx_curr_desc->buff_off_len & 0x;
> +   invalidate_dcache_range(tmp, round_up(tmp + len,
> +   ARCH_DMA_MINALIGN));

Here again, please use tmp + ALIGN(len, PKTALIGN)

> +   net_process_received_packet(rx_curr_desc->buffer, 
> len);
> +   ret = len;
> }

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


Re: [U-Boot] [PATCH 2/3] net: davinci_emac: Round up top buffer boundaries for dcache ops

2016-08-15 Thread Karl Beldan
On Sun, Aug 14, 2016 at 07:43:56PM +, Karl Beldan wrote:
> On Sun, Aug 14, 2016 at 11:47:25AM -0400, Tom Rini wrote:
> > On Sun, Aug 14, 2016 at 03:03:16PM +, Karl Beldan wrote:
> > 
> > > check_cache_range() warns that the top boundaries are not properly
> > > aligned while flushing and invalidating the buffers and make these
> > > operations to fail.
> > > ATM the RX bottom boundaries are aligned by design with EMAC_RXBUF_SIZE,
> > > properly aligned with ARCH_DMA_MINALIGN, however the top ones are not.
> > > 
> > > This gets rid of the warnings:
> > > CACHE: Misaligned operation at range
> > > 
> > > Signed-off-by: Karl Beldan 
> > > ---
> > >  drivers/net/davinci_emac.c | 6 --
> > >  1 file changed, 4 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
> > > index 947bfab..55461b0 100644
> > > --- a/drivers/net/davinci_emac.c
> > > +++ b/drivers/net/davinci_emac.c
> > > @@ -632,7 +632,8 @@ static int davinci_eth_send_packet (struct eth_device 
> > > *dev,
> > > EMAC_CPPI_EOP_BIT);
> > >  
> > >   flush_dcache_range((unsigned long)packet,
> > > - (unsigned long)packet + length);
> > > +round_up((unsigned long)packet + length,
> > > + ARCH_DMA_MINALIGN));
> > 
> > It's preferred to use:
> > (unsigned long)packet + ALIGN(length, PKTALIGN)); 
> > here instead of ARCH_DMA_MINALIGN.
> > 
> 
> Hmm, I think your suggestion is buggy.
> The cache primitives act on [laddr, haddr[, i.e. haddr is excluded, IOW
> you are missing the tail of the packet (that's why I rounded up).
> 

Just checked, your ALIGN macro also rounds up so your suggestion is not
buggy, my bad.

> Conceptually I still prefer ARCH_DMA_MINALIGN, also all other code in
> the base does so.
> 

Your suggestion is seconded by Joe, I'll send v2.

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


Re: [U-Boot] [PATCH v2] common: env_nand: Ensure that we have nand_info[0] prior to use

2016-08-15 Thread Scott Wood
On Mon, 2016-08-15 at 11:56 -0400, Tom Rini wrote:
> Now that nand_info[] is an array of pointers we need to ensure that it's
> been populated prior to use.  We may for example have ENV in NAND set in
> configurations that run on boards with and without NAND (where default
> env is fine enough, such as omap3_beagle and beagleboard (NAND) vs
> beagle xM (no NAND)).
> 
> Fixes: b616d9b0a708 ("nand: Embed mtd_info in struct nand_chip")
> Cc: Scott Wood 
> Signed-off-by: Tom Rini 
> ---
> Changes in v2:
> - Oops, move check on the saveenv side in to erase_and_write_env
> ---
>  common/env_nand.c | 9 +++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/common/env_nand.c b/common/env_nand.c
> index fc99a5e3fc0d..96a1020b5e79 100644
> --- a/common/env_nand.c
> +++ b/common/env_nand.c
> @@ -163,6 +163,9 @@ static int erase_and_write_env(const struct env_location
> *location,
>  {
>   int ret = 0;
>  
> + if (!nand_info[0])
> + return 1;
> +
>   printf("Erasing %s...\n", location->name);
>   if (nand_erase_opts(nand_info[0], &location->erase_opts))
>   return 1;
> @@ -244,10 +247,12 @@ static int readenv(size_t offset, u_char *buf)
>  {
>   size_t end = offset + CONFIG_ENV_RANGE;
>   size_t amount_loaded = 0;
> - size_t blocksize, len;
> + size_t blocksize = 0, len;
>   u_char *char_ptr;
>  
> - blocksize = nand_info[0]->erasesize;
> + if (nand_info[0])
> + blocksize = nand_info[0]->erasesize;
> +
>   if (!blocksize)
>   return 1;
>  

Messing around with blocksize rather than directly returning is awkward -- it
makes it look as if you could proceed with blocksize zero until you read the
next statement.  And is there ever a case where blocksize can be zero, now
that uninitialized NAND devices will simply have a NULL pointer?

-Scott

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


Re: [U-Boot] [PATCH v2] common: env_nand: Ensure that we have nand_info[0] prior to use

2016-08-15 Thread Tom Rini
On Mon, Aug 15, 2016 at 11:48:31AM -0500, Scott Wood wrote:
> On Mon, 2016-08-15 at 11:56 -0400, Tom Rini wrote:
> > Now that nand_info[] is an array of pointers we need to ensure that it's
> > been populated prior to use.  We may for example have ENV in NAND set in
> > configurations that run on boards with and without NAND (where default
> > env is fine enough, such as omap3_beagle and beagleboard (NAND) vs
> > beagle xM (no NAND)).
> > 
> > Fixes: b616d9b0a708 ("nand: Embed mtd_info in struct nand_chip")
> > Cc: Scott Wood 
> > Signed-off-by: Tom Rini 
> > ---
> > Changes in v2:
> > - Oops, move check on the saveenv side in to erase_and_write_env
> > ---
> >  common/env_nand.c | 9 +++--
> >  1 file changed, 7 insertions(+), 2 deletions(-)
> > 
> > diff --git a/common/env_nand.c b/common/env_nand.c
> > index fc99a5e3fc0d..96a1020b5e79 100644
> > --- a/common/env_nand.c
> > +++ b/common/env_nand.c
> > @@ -163,6 +163,9 @@ static int erase_and_write_env(const struct env_location
> > *location,
> >  {
> >     int ret = 0;
> >  
> > +   if (!nand_info[0])
> > +   return 1;
> > +
> >     printf("Erasing %s...\n", location->name);
> >     if (nand_erase_opts(nand_info[0], &location->erase_opts))
> >     return 1;
> > @@ -244,10 +247,12 @@ static int readenv(size_t offset, u_char *buf)
> >  {
> >     size_t end = offset + CONFIG_ENV_RANGE;
> >     size_t amount_loaded = 0;
> > -   size_t blocksize, len;
> > +   size_t blocksize = 0, len;
> >     u_char *char_ptr;
> >  
> > -   blocksize = nand_info[0]->erasesize;
> > +   if (nand_info[0])
> > +   blocksize = nand_info[0]->erasesize;
> > +
> >     if (!blocksize)
> >     return 1;
> >  
> 
> Messing around with blocksize rather than directly returning is awkward -- it
> makes it look as if you could proceed with blocksize zero until you read the
> next statement.  And is there ever a case where blocksize can be zero, now
> that uninitialized NAND devices will simply have a NULL pointer?

OK, I can see how that reads awkwardly now.  And I suspect that no,
blocksize could never be valid and zero.  I'll re-work for a v3.

-- 
Tom


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


[U-Boot] [PATCH v3] common: env_nand: Ensure that we have nand_info[0] prior to use

2016-08-15 Thread Tom Rini
Now that nand_info[] is an array of pointers we need to ensure that it's
been populated prior to use.  We may for example have ENV in NAND set in
configurations that run on boards with and without NAND (where default
env is fine enough, such as omap3_beagle and beagleboard (NAND) vs
beagle xM (no NAND)).

Fixes: b616d9b0a708 ("nand: Embed mtd_info in struct nand_chip")
Cc: Scott Wood 
Signed-off-by: Tom Rini 
---
Changes in v3:
- Don't overload the blocksize check in readenv(), and now that
  blocksize would never be zero (this was the previous way to see that
  we had no NAND detected), remove that check.
- Address the CONFIG_ENV_OFFSET_OOB case in env_relocate_spec() as this
  too would fail now if no NAND was detected.

Changes in v2:
- Oops, move check on the saveenv side in to erase_and_write_env
---
 common/env_nand.c | 11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/common/env_nand.c b/common/env_nand.c
index fc99a5e3fc0d..2e28171ae094 100644
--- a/common/env_nand.c
+++ b/common/env_nand.c
@@ -163,6 +163,9 @@ static int erase_and_write_env(const struct env_location 
*location,
 {
int ret = 0;
 
+   if (!nand_info[0])
+   return 1;
+
printf("Erasing %s...\n", location->name);
if (nand_erase_opts(nand_info[0], &location->erase_opts))
return 1;
@@ -247,10 +250,10 @@ static int readenv(size_t offset, u_char *buf)
size_t blocksize, len;
u_char *char_ptr;
 
-   blocksize = nand_info[0]->erasesize;
-   if (!blocksize)
+   if (!nand_info[0])
return 1;
 
+   blocksize = nand_info[0]->erasesize;
len = min(blocksize, (size_t)CONFIG_ENV_SIZE);
 
while (amount_loaded < CONFIG_ENV_SIZE && offset < end) {
@@ -387,12 +390,12 @@ void env_relocate_spec(void)
ALLOC_CACHE_ALIGN_BUFFER(char, buf, CONFIG_ENV_SIZE);
 
 #if defined(CONFIG_ENV_OFFSET_OOB)
-   ret = get_nand_env_oob(nand_info[0], &nand_env_oob_offset);
/*
 * If unable to read environment offset from NAND OOB then fall through
 * to the normal environment reading code below
 */
-   if (!ret) {
+   if (nand_info[0] && !get_nand_env_oob(nand_info[0],
+ &nand_env_oob_offset)) {
printf("Found Environment offset in OOB..\n");
} else {
set_default_env("!no env offset in OOB");
-- 
1.9.1

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


Re: [U-Boot] [PATCH v3] common: env_nand: Ensure that we have nand_info[0] prior to use

2016-08-15 Thread Scott Wood
On Mon, 2016-08-15 at 13:02 -0400, Tom Rini wrote:
> Now that nand_info[] is an array of pointers we need to ensure that it's
> been populated prior to use.  We may for example have ENV in NAND set in
> configurations that run on boards with and without NAND (where default
> env is fine enough, such as omap3_beagle and beagleboard (NAND) vs
> beagle xM (no NAND)).
> 
> Fixes: b616d9b0a708 ("nand: Embed mtd_info in struct nand_chip")
> Cc: Scott Wood 
> Signed-off-by: Tom Rini 
> ---
> Changes in v3:
> - Don't overload the blocksize check in readenv(), and now that
>   blocksize would never be zero (this was the previous way to see that
>   we had no NAND detected), remove that check.
> - Address the CONFIG_ENV_OFFSET_OOB case in env_relocate_spec() as this
>   too would fail now if no NAND was detected.
> 
> Changes in v2:
> - Oops, move check on the saveenv side in to erase_and_write_env
> ---
>  common/env_nand.c | 11 +++
>  1 file changed, 7 insertions(+), 4 deletions(-)

Acked-by: Scott Wood 

-Scott

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


[U-Boot] [PATCH v2 1/2] net: davinci_emac: Round up top tx buffer boundaries for dcache ops

2016-08-15 Thread Karl Beldan
check_cache_range() warns that the top boundaries are not properly
aligned when flushing or invalidating the buffers and make these
operations fail.

This gets rid of the remaining warnings:
CACHE: Misaligned operation at range

Signed-off-by: Karl Beldan 
---
 drivers/net/davinci_emac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
index 947bfab..62b7a1d 100644
--- a/drivers/net/davinci_emac.c
+++ b/drivers/net/davinci_emac.c
@@ -632,7 +632,7 @@ static int davinci_eth_send_packet (struct eth_device *dev,
  EMAC_CPPI_EOP_BIT);
 
flush_dcache_range((unsigned long)packet,
-   (unsigned long)packet + length);
+  (unsigned long)packet + ALIGN(length, PKTALIGN));
 
/* Send the packet */
writel(BD_TO_HW((unsigned long)emac_tx_desc), &adap_emac->TX0HDP);
-- 
2.9.2

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


[U-Boot] [PATCH v2 2/2] net: davinci_emac: Invalidate only the received portion of a buffer

2016-08-15 Thread Karl Beldan
ATM when receiving a packet the whole buffer is invalidated, this change
optimizes this behaviour.

Signed-off-by: Karl Beldan 
---
 drivers/net/davinci_emac.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
index 62b7a1d..f43130a 100644
--- a/drivers/net/davinci_emac.c
+++ b/drivers/net/davinci_emac.c
@@ -676,12 +676,12 @@ static int davinci_eth_rcv_packet (struct eth_device *dev)
printf ("WARN: emac_rcv_pkt: Error in packet\n");
} else {
unsigned long tmp = (unsigned long)rx_curr_desc->buffer;
+   unsigned short len =
+   rx_curr_desc->buff_off_len & 0x;
 
-   invalidate_dcache_range(tmp, tmp + EMAC_RXBUF_SIZE);
-   net_process_received_packet(
-   rx_curr_desc->buffer,
-   rx_curr_desc->buff_off_len & 0x);
-   ret = rx_curr_desc->buff_off_len & 0x;
+   invalidate_dcache_range(tmp, tmp + ALIGN(len, 
PKTALIGN));
+   net_process_received_packet(rx_curr_desc->buffer, len);
+   ret = len;
}
 
/* Ack received packet descriptor */
-- 
2.9.2

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


[U-Boot] [PATCH v2 0/2] davinci emac dcache ops on buffers

2016-08-15 Thread Karl Beldan
Changes from v1:

 - Prefer dcache_op(base, base + ALIGN(len, PKTALIGN))
   to dcache_op(base, round_up(base + len, ARCH_DMA_MINALIGN))
   as suggested by Tom and Joe.

 - In v2_1/2, explicitly align the top tx buffers only since the rx top
   ones are obviously already properly aligned.

Karl Beldan (2):
  net: davinci_emac: Round up top tx buffer boundaries for dcache ops
  net: davinci_emac: Invalidate only the received portion of a buffer

 drivers/net/davinci_emac.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

-- 
2.9.2

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


Re: [U-Boot] [PATCH v2 2/2] net: davinci_emac: Invalidate only the received portion of a buffer

2016-08-15 Thread Joe Hershberger
On Mon, Aug 15, 2016 at 12:23 PM, Karl Beldan  wrote:
> ATM when receiving a packet the whole buffer is invalidated, this change
> optimizes this behaviour.
>
> Signed-off-by: Karl Beldan 

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


Re: [U-Boot] [PATCH v2 1/2] net: davinci_emac: Round up top tx buffer boundaries for dcache ops

2016-08-15 Thread Joe Hershberger
On Mon, Aug 15, 2016 at 12:23 PM, Karl Beldan  wrote:
> check_cache_range() warns that the top boundaries are not properly
> aligned when flushing or invalidating the buffers and make these
> operations fail.
>
> This gets rid of the remaining warnings:
> CACHE: Misaligned operation at range
>
> Signed-off-by: Karl Beldan 

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


Re: [U-Boot] [PATCH v3 00/27] spi/sf: Updates on flash detection

2016-08-15 Thread york sun
Sorry I am out of office this week.

York


 Original Message 
From: Jagan Teki 
Sent: Friday, August 12, 2016 11:58 AM
To: york sun 
Subject: Re: [PATCH v3 00/27] spi/sf: Updates on flash detection
CC: Tom Rini 
,u-boot@lists.denx.de,s...@chromium.org,bmeng...@gmail.com,vigne...@ti.com,mugunthan...@ti.com,michal.si...@xilinx.com,siva...@xilinx.com


On 12 August 2016 at 04:37, york sun  wrote:
> I saw some errors when compiling for arm. Compiling for power is still
> going.

Can you please try again?

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


[U-Boot] [PATCH] clk.h: inline clk_get_by_name()

2016-08-15 Thread Andreas Bießmann
Fix compile warning for non OF_CONTROL builds:

---8<---
In file included from /Volumes/devel/u-boot/drivers/gpio/atmel_pio4.c:10:0:
/Volumes/devel/u-boot/include/clk.h:107:12: warning: 'clk_get_by_name' defined 
but not used [-Wunused-function]
--->8---

Signed-off-by: Andreas Bießmann 
---

 include/clk.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/clk.h b/include/clk.h
index 161bc28..dc18b03 100644
--- a/include/clk.h
+++ b/include/clk.h
@@ -104,7 +104,7 @@ static inline int clk_get_by_index(struct udevice *dev, int 
index,
return -ENOSYS;
 }
 
-static int clk_get_by_name(struct udevice *dev, const char *name,
+static inline int clk_get_by_name(struct udevice *dev, const char *name,
   struct clk *clk)
 {
return -ENOSYS;
-- 
2.7.4 (Apple Git-66)

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


[U-Boot] Pull request, u-boot-tegra/master

2016-08-15 Thread Tom Warren
Tom,

Please pull u-boot-tegra/master into U-Boot/master. Thanks!

All Tegra builds are OK, and Stephen's automated test system reports that
all tests pass.

The following changes since commit f4b0df1823921ad3bc39820466e9c5201cef6210:

  Merge git://git.denx.de/u-boot-dm (2016-08-12 16:00:50 -0400)

are available in the git repository at:

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

for you to fetch changes up to b064c9124acddbcdc70843f62fda13a2d7d7a392:

  ARM: tegra: set vdd_core for Jetson TK1 (2016-08-15 10:26:14 -0700)


Bibek Basu (1):
  ARM: tegra: set vdd_core for Jetson TK1

Bryan Wu (3):
  i2c: tegra: add standardized clk/reset API support
  ARM: tegra: enable I2C buses for P2771-
  ARM: tegra: reduce CSITE clock from 204M to 136M

Stephen Warren (11):
  misc: add Tegra BPMP driver
  clock: add Tegra186 clock driver
  reset: add Tegra186 reset driver
  power domain: add Tegra186 driver
  i2c: add Tegra186 BPMP driver
  mmc: tegra: port to standard clock/reset APIs
  pci: tegra: port to standard clock/reset/pwr domain APIs
  ARM: tegra: enable SD card on p2771-
  ARM: tegra: enable PCIe controller on p2771-
  ARM: tegra: move ft_system_setup()
  ARM: tegra: fix trimslice environment location

 arch/arm/dts/tegra186-p2771--a02.dts |   24 +
 arch/arm/dts/tegra186-p2771--b00.dts |   24 +
 arch/arm/dts/tegra186-p2771-.dtsi|   49 +
 arch/arm/include/asm/arch-tegra/bpmp_abi.h   | 1591
++
 arch/arm/include/asm/arch-tegra/tegra_mmc.h  |8 +-
 arch/arm/mach-tegra/Kconfig  |6 +
 arch/arm/mach-tegra/Makefile |1 +
 arch/arm/mach-tegra/board186.c   |5 -
 arch/arm/mach-tegra/board2.c |   26 -
 arch/arm/mach-tegra/cpu.h|2 +-
 arch/arm/mach-tegra/dt-setup.c   |   34 +
 board/nvidia/p2771-/p2771-.c |   48 +
 board/nvidia/venice2/as3722_init.c   |   13 +-
 board/nvidia/venice2/as3722_init.h   |4 +-
 configs/p2771--a02_defconfig |6 +
 configs/p2771--b00_defconfig |6 +
 drivers/clk/Kconfig  |1 +
 drivers/clk/Makefile |2 +
 drivers/clk/tegra/Kconfig|6 +
 drivers/clk/tegra/Makefile   |5 +
 drivers/clk/tegra/tegra186-clk.c |  104 ++
 drivers/i2c/Kconfig  |   10 +
 drivers/i2c/Makefile |1 +
 drivers/i2c/tegra186_bpmp_i2c.c  |  129 +++
 drivers/i2c/tegra_i2c.c  |   89 +-
 drivers/misc/Kconfig |   12 +
 drivers/misc/Makefile|1 +
 drivers/misc/tegra186_bpmp.c |  257 +
 drivers/mmc/tegra_mmc.c  |   64 +-
 drivers/pci/Kconfig  |1 +
 drivers/pci/pci_tegra.c  |  163 ++-
 drivers/power/domain/Kconfig |7 +
 drivers/power/domain/Makefile|1 +
 drivers/power/domain/tegra186-power-domain.c |   92 ++
 drivers/reset/Kconfig|7 +
 drivers/reset/Makefile   |1 +
 drivers/reset/tegra186-reset.c   |   81 ++
 include/configs/p2771-.h |8 +
 include/configs/trimslice.h  |3 +-
 39 files changed, 2838 insertions(+), 54 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-tegra/bpmp_abi.h
 create mode 100644 arch/arm/mach-tegra/dt-setup.c
 create mode 100644 drivers/clk/tegra/Kconfig
 create mode 100644 drivers/clk/tegra/Makefile
 create mode 100644 drivers/clk/tegra/tegra186-clk.c
 create mode 100644 drivers/i2c/tegra186_bpmp_i2c.c
 create mode 100644 drivers/misc/tegra186_bpmp.c
 create mode 100644 drivers/power/domain/tegra186-power-domain.c
 create mode 100644 drivers/reset/tegra186-reset.c
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 2/3] net: nfs: Remove separate buffer for default name

2016-08-15 Thread Joe Hershberger
There is no reason to store the default filename in a separate buffer
only to immediately copy it to the main name buffer. Just write it there
directly and remove the other buffer.

Signed-off-by: Joe Hershberger 
---

 net/nfs.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/net/nfs.c b/net/nfs.c
index 4a5a1ab..d7aeef9 100644
--- a/net/nfs.c
+++ b/net/nfs.c
@@ -65,7 +65,6 @@ static int nfs_state;
 #define STATE_READ_REQ 6
 #define STATE_READLINK_REQ 7
 
-static char default_filename[64];
 static char *nfs_filename;
 static char *nfs_path;
 static char nfs_path_buff[2048];
@@ -720,12 +719,11 @@ void nfs_start(void)
}
 
if (net_boot_file_name[0] == '\0') {
-   sprintf(default_filename, "/nfsroot/%02X%02X%02X%02X.img",
+   sprintf(nfs_path, "/nfsroot/%02X%02X%02X%02X.img",
net_ip.s_addr & 0xFF,
(net_ip.s_addr >>  8) & 0xFF,
(net_ip.s_addr >> 16) & 0xFF,
(net_ip.s_addr >> 24) & 0xFF);
-   strcpy(nfs_path, default_filename);
 
printf("*** Warning: no boot file name; using '%s'\n",
   nfs_path);
-- 
1.7.11.5

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


[U-Boot] [PATCH 3/3] net: nfs: Remove unused define

2016-08-15 Thread Joe Hershberger
Unreferenced, so remove the noise.

Signed-off-by: Joe Hershberger 

---

 net/nfs.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/net/nfs.h b/net/nfs.h
index d69b422..2a1f4db 100644
--- a/net/nfs.h
+++ b/net/nfs.h
@@ -44,8 +44,6 @@
 #define NFS_READ_SIZE 1024 /* biggest power of two that fits Ether frame */
 #endif
 
-#define NFS_MAXLINKDEPTH 16
-
 struct rpc_t {
union {
uint8_t data[2048];
-- 
1.7.11.5

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


[U-Boot] [PATCH 0/3] Clean up some NFS issues not related to v3 support

2016-08-15 Thread Joe Hershberger
There were a few issues with related to NFS that existed previously.
Clean those up before adding v3 support.


Joe Hershberger (3):
  net: Stop including NFS overhead in defragment max
  net: nfs: Remove separate buffer for default name
  net: nfs: Remove unused define

 net/net.c | 10 +-
 net/nfs.c |  4 +---
 net/nfs.h |  2 --
 3 files changed, 2 insertions(+), 14 deletions(-)

-- 
1.7.11.5

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


[U-Boot] [PATCH 1/3] net: Stop including NFS overhead in defragment max

2016-08-15 Thread Joe Hershberger
At least on bfin, this "specimen" is actually allocated in the BSS and
wastes lots of memory in already tight memory conditions.

Also, with the introduction of NFSv3 support, this waste got
substantially larger.

Just remove it. If a board needs a specific different defragment size,
that board can override this setting.

Signed-off-by: Joe Hershberger 
---

 net/net.c | 10 +-
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/net/net.c b/net/net.c
index 1e1d23d..671d45d 100644
--- a/net/net.c
+++ b/net/net.c
@@ -834,15 +834,7 @@ int net_send_udp_packet(uchar *ether, struct in_addr dest, 
int dport, int sport,
 #ifndef CONFIG_NET_MAXDEFRAG
 #define CONFIG_NET_MAXDEFRAG 16384
 #endif
-/*
- * MAXDEFRAG, above, is chosen in the config file and  is real data
- * so we need to add the NFS overhead, which is more than TFTP.
- * To use sizeof in the internal unnamed structures, we need a real
- * instance (can't do "sizeof(struct rpc_t.u.reply))", unfortunately).
- * The compiler doesn't complain nor allocates the actual structure
- */
-static struct rpc_t rpc_specimen;
-#define IP_PKTSIZE (CONFIG_NET_MAXDEFRAG + sizeof(rpc_specimen.u.reply))
+#define IP_PKTSIZE (CONFIG_NET_MAXDEFRAG)
 
 #define IP_MAXUDP (IP_PKTSIZE - IP_HDR_SIZE)
 
-- 
1.7.11.5

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


[U-Boot] [PATCH 0/9] Fix up issues with new NFSv3 implementation

2016-08-15 Thread Joe Hershberger
This fixes most of the memory bloat that happened with the addition of NFSv3
Some checkpatch.pl issues are also fixed
Refactored some code to better share common snippets

These patches depend on the NFSv3 patch by Guillaume GARDET 

https://patchwork.ozlabs.org/patch/654061/


Joe Hershberger (9):
  net: nfs: Share the file handle buffer for v2 / v3
  net: nfs: Correct the reply data buffer size
  net: nfs: Fix lines that are too long
  net: nfs: Consolidate handling of NFSv3 attributes
  net: nfs: Correct a comment
  net: nfs: Use consistent names for the rpc_pkt
  net: nfs: Move some prints to debug statements
  net: nfs: Use the tx buffer to construct rpc msgs
  net: nfs: Simplify rpc_add_credentials()

 net/nfs.c | 330 +++---
 net/nfs.h |   2 +-
 2 files changed, 145 insertions(+), 187 deletions(-)

-- 
1.7.11.5

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


[U-Boot] [PATCH 2/9] net: nfs: Correct the reply data buffer size

2016-08-15 Thread Joe Hershberger
The type of the buffer is uint32_t, but the parameter used to size it
is referring to bytes. Divide by the size of the array elements.

Strictly speaking, this shouldn't be needed at all... It could just be 1
just like the request.

Signed-off-by: Joe Hershberger 
---

 net/nfs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/nfs.h b/net/nfs.h
index 45da246..aa4e450 100644
--- a/net/nfs.h
+++ b/net/nfs.h
@@ -76,7 +76,7 @@ struct rpc_t {
uint32_t verifier;
uint32_t v2;
uint32_t astatus;
-   uint32_t data[NFS_READ_SIZE];
+   uint32_t data[NFS_READ_SIZE / sizeof(uint32_t)];
} reply;
} u;
 };
-- 
1.7.11.5

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


[U-Boot] [PATCH 4/9] net: nfs: Consolidate handling of NFSv3 attributes

2016-08-15 Thread Joe Hershberger
Instead of repeating the same large snippet for dealing with attributes
it should be shared with a helper function.

Signed-off-by: Joe Hershberger 
---

 net/nfs.c | 151 --
 1 file changed, 59 insertions(+), 92 deletions(-)

diff --git a/net/nfs.c b/net/nfs.c
index 14a0d2f..08bdd92 100644
--- a/net/nfs.c
+++ b/net/nfs.c
@@ -588,10 +588,39 @@ static int nfs_lookup_reply(uchar *pkt, unsigned len)
return 0;
 }
 
+static int nfs3_get_attributes_offset(uint32_t *data)
+{
+   if (ntohl(data[1]) != 0) {
+   /* 'attributes_follow' flag is TRUE,
+* so we have attributes on 21 bytes */
+   /* Skip unused values :
+   type;   32 bits value,
+   mode;   32 bits value,
+   nlink;  32 bits value,
+   uid;32 bits value,
+   gid;32 bits value,
+   size;   64 bits value,
+   used;   64 bits value,
+   rdev;   64 bits value,
+   fsid;   64 bits value,
+   fileid; 64 bits value,
+   atime;  64 bits value,
+   mtime;  64 bits value,
+   ctime;  64 bits value,
+   */
+   return 22;
+   } else {
+   /* 'attributes_follow' flag is FALSE,
+* so we don't have any attributes */
+   return 1;
+   }
+}
+
 static int nfs_readlink_reply(uchar *pkt, unsigned len)
 {
struct rpc_t rpc_pkt;
int rlen;
+   int nfsv3_data_offset = 0;
 
debug("%s\n", __func__);
 
@@ -608,68 +637,28 @@ static int nfs_readlink_reply(uchar *pkt, unsigned len)
rpc_pkt.u.reply.data[0])
return -1;
 
-   if (supported_nfs_versions & NFSV2_FLAG) {
+   if (!(supported_nfs_versions & NFSV2_FLAG)) { /* NFSV3_FLAG */
+   nfsv3_data_offset =
+   nfs3_get_attributes_offset(rpc_pkt.u.reply.data);
+   }
 
-   rlen = ntohl(rpc_pkt.u.reply.data[1]); /* new path length */
+   /* new path length */
+   rlen = ntohl(rpc_pkt.u.reply.data[1 + nfsv3_data_offset]);
 
-   if (*((char *)&(rpc_pkt.u.reply.data[2])) != '/') {
-   int pathlen;
-   strcat(nfs_path, "/");
-   pathlen = strlen(nfs_path);
-   memcpy(nfs_path + pathlen,
-  (uchar *)&(rpc_pkt.u.reply.data[2]),
-  rlen);
-   nfs_path[pathlen + rlen] = 0;
-   } else {
-   memcpy(nfs_path,
-  (uchar *)&(rpc_pkt.u.reply.data[2]),
-  rlen);
-   nfs_path[rlen] = 0;
-   }
-   } else {  /* NFSV3_FLAG */
-   int nfsv3_data_offset = 0;
-   if (ntohl(rpc_pkt.u.reply.data[1]) != 0) {
-   /* 'attributes_follow' flag is TRUE,
-* so we have attributes on 21 bytes */
-   /* Skip unused values :
-   type;   32 bits value,
-   mode;   32 bits value,
-   nlink;  32 bits value,
-   uid;32 bits value,
-   gid;32 bits value,
-   size;   64 bits value,
-   used;   64 bits value,
-   rdev;   64 bits value,
-   fsid;   64 bits value,
-   fileid; 64 bits value,
-   atime;  64 bits value,
-   mtime;  64 bits value,
-   ctime;  64 bits value,
-   */
-   nfsv3_data_offset = 22;
-   } else {
-   /* 'attributes_follow' flag is FALSE,
-* so we don't have any attributes */
-   nfsv3_data_offset = 1;
-   }
+   if (*((char *)&(rpc_pkt.u.reply.data[2 + nfsv3_data_offset])) != '/') {
+   int pathlen;
 
-   /* new path length */
-   rlen = ntohl(rpc_pkt.u.reply.data[1+nfsv3_data_offset]);
-
-   if (*((char *)&(rpc_pkt.u.reply.data[2+nfsv3_data_offset])) != 
'/') {
-   int pathlen;
-   strcat(nfs_path, "/");
-   pathlen = strlen(nfs_path);
-   memcpy(nfs_path + pathlen,
-  (uchar 
*)&(rpc_pkt.u.reply.data[2+nfsv3_data_offset]),
-  rlen);
-   nfs_path[pathlen + rlen] = 0;
-   } else {
-   memcpy(nfs_path,
- 

[U-Boot] [PATCH 6/9] net: nfs: Use consistent names for the rpc_pkt

2016-08-15 Thread Joe Hershberger
Use the same name throughout the nfs code and use the same member of the
union to avoid casts.

Signed-off-by: Joe Hershberger 
---

 net/nfs.c | 34 +-
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/net/nfs.c b/net/nfs.c
index ade589c..bdbdc26 100644
--- a/net/nfs.c
+++ b/net/nfs.c
@@ -185,39 +185,39 @@ RPC_LOOKUP - Lookup RPC Port numbers
 **/
 static void rpc_req(int rpc_prog, int rpc_proc, uint32_t *data, int datalen)
 {
-   struct rpc_t pkt;
+   struct rpc_t rpc_pkt;
unsigned long id;
uint32_t *p;
int pktlen;
int sport;
 
id = ++rpc_id;
-   pkt.u.call.id = htonl(id);
-   pkt.u.call.type = htonl(MSG_CALL);
-   pkt.u.call.rpcvers = htonl(2);  /* use RPC version 2 */
-   pkt.u.call.prog = htonl(rpc_prog);
+   rpc_pkt.u.call.id = htonl(id);
+   rpc_pkt.u.call.type = htonl(MSG_CALL);
+   rpc_pkt.u.call.rpcvers = htonl(2);  /* use RPC version 2 */
+   rpc_pkt.u.call.prog = htonl(rpc_prog);
switch (rpc_prog) {
case PROG_NFS:
if (supported_nfs_versions & NFSV2_FLAG)
-   pkt.u.call.vers = htonl(2); /* NFS v2 */
+   rpc_pkt.u.call.vers = htonl(2); /* NFS v2 */
else /* NFSV3_FLAG */
-   pkt.u.call.vers = htonl(3); /* NFS v3 */
+   rpc_pkt.u.call.vers = htonl(3); /* NFS v3 */
break;
case PROG_PORTMAP:
case PROG_MOUNT:
default:
-   pkt.u.call.vers = htonl(2); /* portmapper is version 2 */
+   rpc_pkt.u.call.vers = htonl(2); /* portmapper is version 2 */
}
-   pkt.u.call.proc = htonl(rpc_proc);
-   p = (uint32_t *)&(pkt.u.call.data);
+   rpc_pkt.u.call.proc = htonl(rpc_proc);
+   p = (uint32_t *)&(rpc_pkt.u.call.data);
 
if (datalen)
memcpy((char *)p, (char *)data, datalen*sizeof(uint32_t));
 
-   pktlen = (char *)p + datalen*sizeof(uint32_t) - (char *)&pkt;
+   pktlen = (char *)p + datalen * sizeof(uint32_t) - (char *)&rpc_pkt;
 
memcpy((char *)net_tx_packet + net_eth_hdr_size() + IP_UDP_HDR_SIZE,
-  (char *)&pkt, pktlen);
+  &rpc_pkt.u.data[0], pktlen);
 
if (rpc_prog == PROG_PORTMAP)
sport = SUNRPC_PORT;
@@ -445,7 +445,7 @@ static int rpc_lookup_reply(int prog, uchar *pkt, unsigned 
len)
 {
struct rpc_t rpc_pkt;
 
-   memcpy((unsigned char *)&rpc_pkt, pkt, len);
+   memcpy(&rpc_pkt.u.data[0], pkt, len);
 
debug("%s\n", __func__);
 
@@ -477,7 +477,7 @@ static int nfs_mount_reply(uchar *pkt, unsigned len)
 
debug("%s\n", __func__);
 
-   memcpy((unsigned char *)&rpc_pkt, pkt, len);
+   memcpy(&rpc_pkt.u.data[0], pkt, len);
 
if (ntohl(rpc_pkt.u.reply.id) > rpc_id)
return -NFS_RPC_ERR;
@@ -503,7 +503,7 @@ static int nfs_umountall_reply(uchar *pkt, unsigned len)
 
debug("%s\n", __func__);
 
-   memcpy((unsigned char *)&rpc_pkt, pkt, len);
+   memcpy(&rpc_pkt.u.data[0], pkt, len);
 
if (ntohl(rpc_pkt.u.reply.id) > rpc_id)
return -NFS_RPC_ERR;
@@ -527,7 +527,7 @@ static int nfs_lookup_reply(uchar *pkt, unsigned len)
 
debug("%s\n", __func__);
 
-   memcpy((unsigned char *)&rpc_pkt, pkt, len);
+   memcpy(&rpc_pkt.u.data[0], pkt, len);
 
if (ntohl(rpc_pkt.u.reply.id) > rpc_id)
return -NFS_RPC_ERR;
@@ -671,7 +671,7 @@ static int nfs_read_reply(uchar *pkt, unsigned len)
 
debug("%s\n", __func__);
 
-   memcpy((uchar *)&rpc_pkt, pkt, sizeof(rpc_pkt.u.reply));
+   memcpy(&rpc_pkt.u.data[0], pkt, sizeof(rpc_pkt.u.reply));
 
if (ntohl(rpc_pkt.u.reply.id) > rpc_id)
return -NFS_RPC_ERR;
-- 
1.7.11.5

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


[U-Boot] [PATCH 9/9] net: nfs: Simplify rpc_add_credentials()

2016-08-15 Thread Joe Hershberger
We use an empty hostname, so remove all the "processing" of the
known-to-be-empty hostname and just write 0's where needed.

Signed-off-by: Joe Hershberger 

---

 net/nfs.c | 19 +++
 1 file changed, 3 insertions(+), 16 deletions(-)

diff --git a/net/nfs.c b/net/nfs.c
index 3fb253b..814751b 100644
--- a/net/nfs.c
+++ b/net/nfs.c
@@ -142,13 +142,6 @@ RPC_ADD_CREDENTIALS - Add RPC authentication/verifier 
entries
 **/
 static uint32_t *rpc_add_credentials(uint32_t *p)
 {
-   int hl;
-   int hostnamelen;
-   char hostname[256];
-
-   strcpy(hostname, "");
-   hostnamelen = strlen(hostname);
-
/* Here's the executive summary on authentication requirements of the
 * various NFS server implementations:  Linux accepts both AUTH_NONE
 * and AUTH_UNIX authentication (also accepts an empty hostname field
@@ -158,17 +151,11 @@ static uint32_t *rpc_add_credentials(uint32_t *p)
 * it (if the BOOTP/DHCP reply didn't give one, just use an empty
 * hostname).  */
 
-   hl = (hostnamelen + 3) & ~3;
-
/* Provide an AUTH_UNIX credential.  */
*p++ = htonl(1);/* AUTH_UNIX */
-   *p++ = htonl(hl+20);/* auth length */
-   *p++ = htonl(0);/* stamp */
-   *p++ = htonl(hostnamelen);  /* hostname string */
-   if (hostnamelen & 3)
-   *(p + hostnamelen / 4) = 0; /* add zero padding */
-   memcpy(p, hostname, hostnamelen);
-   p += hl / 4;
+   *p++ = htonl(20);   /* auth length */
+   *p++ = 0;   /* stamp */
+   *p++ = 0;   /* hostname string */
*p++ = 0;   /* uid */
*p++ = 0;   /* gid */
*p++ = 0;   /* auxiliary gid list */
-- 
1.7.11.5

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


[U-Boot] [PATCH 1/9] net: nfs: Share the file handle buffer for v2 / v3

2016-08-15 Thread Joe Hershberger
The v3 handles can be larger than v2, but that doesn't mean we need a
separate buffer. Reuse the same (larger) buffer for both.

Signed-off-by: Joe Hershberger 
---

 net/nfs.c | 12 +---
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/net/nfs.c b/net/nfs.c
index f61b96e..ac3cde4 100644
--- a/net/nfs.c
+++ b/net/nfs.c
@@ -52,10 +52,8 @@ static int nfs_len;
 static ulong nfs_timeout = NFS_TIMEOUT;
 
 static char dirfh[NFS_FHSIZE]; /* NFSv2 / NFSv3 file handle of directory */
-static char filefh[NFS_FHSIZE]; /* NFSv2 file handle */
-
-static char filefh3[NFS3_FHSIZE];  /* NFSv3 file handle  */
-static int filefh3_length; /* (variable) length of filefh3 */
+static char filefh[NFS3_FHSIZE]; /* NFSv2 / NFSv3 file handle */
+static int filefh3_length; /* (variable) length of filefh when NFSv3 */
 
 static enum net_loop_state nfs_download_state;
 static struct in_addr nfs_server_ip;
@@ -316,7 +314,7 @@ static void nfs_readlink_req(void)
p += (NFS_FHSIZE / 4);
} else { /* NFSV3_FLAG */
*p++ = htonl(filefh3_length);
-   memcpy(p, filefh3, filefh3_length);
+   memcpy(p, filefh, filefh3_length);
p += (filefh3_length / 4);
}
 
@@ -388,7 +386,7 @@ static void nfs_read_req(int offset, int readlen)
*p++ = 0;
} else { /* NFSV3_FLAG */
*p++ = htonl(filefh3_length);
-   memcpy(p, filefh3, filefh3_length);
+   memcpy(p, filefh, filefh3_length);
p += (filefh3_length / 4);
*p++ = htonl(0); /* offset is 64-bit long, so fill with 0 */
*p++ = htonl(offset);
@@ -582,7 +580,7 @@ static int nfs_lookup_reply(uchar *pkt, unsigned len)
filefh3_length = ntohl(rpc_pkt.u.reply.data[1]);
if (filefh3_length > NFS3_FHSIZE)
filefh3_length  = NFS3_FHSIZE;
-   memcpy(filefh3, rpc_pkt.u.reply.data + 2, filefh3_length);
+   memcpy(filefh, rpc_pkt.u.reply.data + 2, filefh3_length);
}
 
return 0;
-- 
1.7.11.5

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


[U-Boot] [PATCH 7/9] net: nfs: Move some prints to debug statements

2016-08-15 Thread Joe Hershberger
Much of the information is verbose and derived directly from the
environment. Only output in debug mode. This also saves about 300 bytes
from the code size.

Signed-off-by: Joe Hershberger 
---

 net/nfs.c | 43 ++-
 1 file changed, 22 insertions(+), 21 deletions(-)

diff --git a/net/nfs.c b/net/nfs.c
index bdbdc26..31047c2 100644
--- a/net/nfs.c
+++ b/net/nfs.c
@@ -557,11 +557,13 @@ static int nfs_lookup_reply(uchar *pkt, unsigned len)
return -NFS_RPC_PROG_MISMATCH;
case 4:
default:
-   printf("*** ERROR: NFS version not supported: 
Requested: V%d, accepted: min V%d - max V%d\n",
-  (supported_nfs_versions & NFSV2_FLAG) ?
+   puts("*** ERROR: NFS version not supported");
+   debug(": Requested: V%d, accepted: min V%d - 
max V%d\n",
+ (supported_nfs_versions & NFSV2_FLAG) ?
2 : 3,
-  ntohl(rpc_pkt.u.reply.data[0]),
-  ntohl(rpc_pkt.u.reply.data[1]));
+ ntohl(rpc_pkt.u.reply.data[0]),
+ ntohl(rpc_pkt.u.reply.data[1]));
+   puts("\n");
}
break;
case NFS_RPC_PROG_UNAVAIL:
@@ -569,8 +571,8 @@ static int nfs_lookup_reply(uchar *pkt, unsigned len)
case NFS_RPC_GARBAGE_ARGS:
case NFS_RPC_SYSTEM_ERR:
default: /* Unknown error on 'accept state' flag */
-   printf("*** ERROR: accept state error (%d)\n",
-  ntohl(rpc_pkt.u.reply.astatus));
+   debug("*** ERROR: accept state error (%d)\n",
+ ntohl(rpc_pkt.u.reply.astatus));
break;
}
return -1;
@@ -781,7 +783,7 @@ static void nfs_handler(uchar *pkt, unsigned dest, struct 
in_addr sip,
if (reply == -NFS_RPC_DROP) {
break;
} else if (reply == -NFS_RPC_ERR) {
-   puts("*** ERROR: Cannot umount\n");
+   debug("*** ERROR: Cannot umount\n");
net_set_state(NETLOOP_FAIL);
} else {
puts("\ndone\n");
@@ -845,7 +847,7 @@ static void nfs_handler(uchar *pkt, unsigned dest, struct 
in_addr sip,
if (!rlen)
nfs_download_state = NETLOOP_SUCCESS;
if (rlen < 0)
-   printf("NFS READ error (%d)\n", rlen);
+   debug("NFS READ error (%d)\n", rlen);
nfs_state = STATE_UMOUNT_REQ;
nfs_send();
}
@@ -864,7 +866,7 @@ void nfs_start(void)
 
if (nfs_path == NULL) {
net_set_state(NETLOOP_FAIL);
-   puts("*** ERROR: Fail allocate memory\n");
+   debug("*** ERROR: Fail allocate memory\n");
return;
}
 
@@ -875,8 +877,8 @@ void nfs_start(void)
(net_ip.s_addr >> 16) & 0xFF,
(net_ip.s_addr >> 24) & 0xFF);
 
-   printf("*** Warning: no boot file name; using '%s'\n",
-  nfs_path);
+   debug("*** Warning: no boot file name; using '%s'\n",
+ nfs_path);
} else {
char *p = net_boot_file_name;
 
@@ -894,10 +896,10 @@ void nfs_start(void)
nfs_filename = basename(nfs_path);
nfs_path = dirname(nfs_path);
 
-   printf("Using %s device\n", eth_get_name());
+   debug("Using %s device\n", eth_get_name());
 
-   printf("File transfer via NFS from server %pI4; our IP address is %pI4",
-  &nfs_server_ip, &net_ip);
+   debug("File transfer via NFS from server %pI4; our IP address is %pI4",
+ &nfs_server_ip, &net_ip);
 
/* Check if we need to send across this subnet */
if (net_gateway.s_addr && net_netmask.s_addr) {
@@ -907,18 +909,17 @@ void nfs_start(void)
our_net.s_addr = net_ip.s_addr & net_netmask.s_addr;
server_net.s_addr = net_server_ip.s_addr & net_netmask.s_addr;
if (our_net.s_addr != server_net.s_addr)
-   printf("; sending through gateway %pI4",
-  &net_gateway);
+   debug("; sending through gateway %pI4",
+ &net_gateway);
}
-   printf("\nFilename '%s/%s'.", nfs_path, nfs_filename);
+   debug("\nFilename '%s/%s'.", nfs_path, nfs_filename);
 
if (net_boot_file_expected_size_

[U-Boot] [PATCH 3/9] net: nfs: Fix lines that are too long

2016-08-15 Thread Joe Hershberger
Fix complaints from checkpatch.pl.

Signed-off-by: Joe Hershberger 
---

 net/nfs.c | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/net/nfs.c b/net/nfs.c
index ac3cde4..14a0d2f 100644
--- a/net/nfs.c
+++ b/net/nfs.c
@@ -547,7 +547,8 @@ static int nfs_lookup_reply(uchar *pkt, unsigned len)
/* Minimal supported NFS version */
case 3:
debug("*** Waring: NFS version not supported: 
Requested: V%d, accepted: min V%d - max V%d\n",
- (supported_nfs_versions & NFSV2_FLAG) ? 2 
: 3,
+ (supported_nfs_versions & NFSV2_FLAG) ?
+   2 : 3,
  ntohl(rpc_pkt.u.reply.data[0]),
  ntohl(rpc_pkt.u.reply.data[1]));
debug("Will retry with NFSv3\n");
@@ -557,7 +558,8 @@ static int nfs_lookup_reply(uchar *pkt, unsigned len)
case 4:
default:
printf("*** ERROR: NFS version not supported: 
Requested: V%d, accepted: min V%d - max V%d\n",
-  (supported_nfs_versions & NFSV2_FLAG) ? 
2 : 3,
+  (supported_nfs_versions & NFSV2_FLAG) ?
+   2 : 3,
   ntohl(rpc_pkt.u.reply.data[0]),
   ntohl(rpc_pkt.u.reply.data[1]));
}
@@ -828,7 +830,8 @@ static void nfs_handler(uchar *pkt, unsigned dest, struct 
in_addr sip,
puts("*** ERROR: File lookup fail\n");
nfs_state = STATE_UMOUNT_REQ;
nfs_send();
-   } else if (reply == -NFS_RPC_PROG_MISMATCH && 
supported_nfs_versions != 0) {
+   } else if (reply == -NFS_RPC_PROG_MISMATCH &&
+  supported_nfs_versions != 0) {
/* umount */
nfs_state = STATE_UMOUNT_REQ;
nfs_send();
-- 
1.7.11.5

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


Re: [U-Boot] [PATCH] clk.h: inline clk_get_by_name()

2016-08-15 Thread Stephen Warren

On 08/15/2016 01:04 PM, Andreas Bießmann wrote:

Fix compile warning for non OF_CONTROL builds:

---8<---
In file included from /Volumes/devel/u-boot/drivers/gpio/atmel_pio4.c:10:0:
/Volumes/devel/u-boot/include/clk.h:107:12: warning: 'clk_get_by_name' defined 
but not used [-Wunused-function]
--->8---


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


[U-Boot] [PATCH 5/9] net: nfs: Correct a comment

2016-08-15 Thread Joe Hershberger
The buffer is of 32-bit elements, not bytes.

Signed-off-by: Joe Hershberger 
---

 net/nfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/nfs.c b/net/nfs.c
index 08bdd92..ade589c 100644
--- a/net/nfs.c
+++ b/net/nfs.c
@@ -592,7 +592,7 @@ static int nfs3_get_attributes_offset(uint32_t *data)
 {
if (ntohl(data[1]) != 0) {
/* 'attributes_follow' flag is TRUE,
-* so we have attributes on 21 bytes */
+* so we have attributes on 21 dwords */
/* Skip unused values :
type;   32 bits value,
mode;   32 bits value,
-- 
1.7.11.5

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


[U-Boot] [PATCH 8/9] net: nfs: Use the tx buffer to construct rpc msgs

2016-08-15 Thread Joe Hershberger
Instead of always allocating a huge temporary buffer on the stack and
then memcpy()ing the result into the transmit buffer, simply figure out
where in the transmit buffer the bytes will belong and write them there
directly as each message is built.

Signed-off-by: Joe Hershberger 
---

 net/nfs.c | 88 ---
 1 file changed, 45 insertions(+), 43 deletions(-)

diff --git a/net/nfs.c b/net/nfs.c
index 31047c2..3fb253b 100644
--- a/net/nfs.c
+++ b/net/nfs.c
@@ -183,41 +183,41 @@ static uint32_t *rpc_add_credentials(uint32_t *p)
 /**
 RPC_LOOKUP - Lookup RPC Port numbers
 **/
-static void rpc_req(int rpc_prog, int rpc_proc, uint32_t *data, int datalen)
+static struct rpc_t *rpc_req_prep(void)
+{
+   return (struct rpc_t *)(net_tx_packet + net_eth_hdr_size() +
+   IP_UDP_HDR_SIZE);
+}
+
+static void rpc_req(int rpc_prog, int rpc_proc, struct rpc_t *rpc_pkt,
+   int datalen)
 {
-   struct rpc_t rpc_pkt;
unsigned long id;
-   uint32_t *p;
int pktlen;
int sport;
 
id = ++rpc_id;
-   rpc_pkt.u.call.id = htonl(id);
-   rpc_pkt.u.call.type = htonl(MSG_CALL);
-   rpc_pkt.u.call.rpcvers = htonl(2);  /* use RPC version 2 */
-   rpc_pkt.u.call.prog = htonl(rpc_prog);
+   rpc_pkt->u.call.id = htonl(id);
+   rpc_pkt->u.call.type = htonl(MSG_CALL);
+   rpc_pkt->u.call.rpcvers = htonl(2); /* use RPC version 2 */
+   rpc_pkt->u.call.prog = htonl(rpc_prog);
switch (rpc_prog) {
case PROG_NFS:
if (supported_nfs_versions & NFSV2_FLAG)
-   rpc_pkt.u.call.vers = htonl(2); /* NFS v2 */
+   rpc_pkt->u.call.vers = htonl(2);/* NFS v2 */
else /* NFSV3_FLAG */
-   rpc_pkt.u.call.vers = htonl(3); /* NFS v3 */
+   rpc_pkt->u.call.vers = htonl(3);/* NFS v3 */
break;
case PROG_PORTMAP:
case PROG_MOUNT:
default:
-   rpc_pkt.u.call.vers = htonl(2); /* portmapper is version 2 */
+   /* portmapper is version 2 */
+   rpc_pkt->u.call.vers = htonl(2);
}
-   rpc_pkt.u.call.proc = htonl(rpc_proc);
-   p = (uint32_t *)&(rpc_pkt.u.call.data);
-
-   if (datalen)
-   memcpy((char *)p, (char *)data, datalen*sizeof(uint32_t));
-
-   pktlen = (char *)p + datalen * sizeof(uint32_t) - (char *)&rpc_pkt;
+   rpc_pkt->u.call.proc = htonl(rpc_proc);
 
-   memcpy((char *)net_tx_packet + net_eth_hdr_size() + IP_UDP_HDR_SIZE,
-  &rpc_pkt.u.data[0], pktlen);
+   pktlen = ((char *)&rpc_pkt->u.call.data - (char *)&rpc_pkt) +
+   datalen * sizeof(uint32_t);
 
if (rpc_prog == PROG_PORTMAP)
sport = SUNRPC_PORT;
@@ -235,15 +235,17 @@ RPC_LOOKUP - Lookup RPC Port numbers
 **/
 static void rpc_lookup_req(int prog, int ver)
 {
-   uint32_t data[16];
+   uint32_t *data;
+   struct rpc_t *rpc_pkt = rpc_req_prep();
 
+   data = rpc_pkt->u.call.data;
data[0] = 0; data[1] = 0;   /* auth credential */
data[2] = 0; data[3] = 0;   /* auth verifier */
data[4] = htonl(prog);
data[5] = htonl(ver);
data[6] = htonl(17);/* IP_UDP */
data[7] = 0;
-   rpc_req(PROG_PORTMAP, PORTMAP_GETPORT, data, 8);
+   rpc_req(PROG_PORTMAP, PORTMAP_GETPORT, rpc_pkt, 8);
 }
 
 /**
@@ -251,14 +253,14 @@ NFS_MOUNT - Mount an NFS Filesystem
 **/
 static void nfs_mount_req(char *path)
 {
-   uint32_t data[1024];
uint32_t *p;
int len;
int pathlen;
+   struct rpc_t *rpc_pkt = rpc_req_prep();
 
pathlen = strlen(path);
 
-   p = &(data[0]);
+   p = rpc_pkt->u.call.data;
p = rpc_add_credentials(p);
 
*p++ = htonl(pathlen);
@@ -267,9 +269,9 @@ static void nfs_mount_req(char *path)
memcpy(p, path, pathlen);
p += (pathlen + 3) / 4;
 
-   len = (uint32_t *)p - (uint32_t *)&(data[0]);
+   len = (uint32_t *)p - (uint32_t *)&(rpc_pkt->u.call.data);
 
-   rpc_req(PROG_MOUNT, MOUNT_ADDENTRY, data, len);
+   rpc_req(PROG_MOUNT, MOUNT_ADDENTRY, rpc_pkt, len);
 }
 
 /**
@@ -277,20 +279,20 @@ NFS_UMOUNTALL - Unmount all our NFS Filesystems on the 
Server
 **/
 static void nfs_umountall_req(void)
 {
-   uint32_t data[1024];
uint32_t *p;
int len;
+ 

Re: [U-Boot] [U-Boot, v7, 1/4] gpio: atmel_pio4: Move PIO4 definitions to head file

2016-08-15 Thread Andreas Bießmann
Dear Wenyou Yang,

Wenyou Yang  writes:
>In order to make these PIO4 definitions shared with AT91 PIO4
>pinctrl driver, move them from the existing gpio driver to the
>head file, and rephrase them.
>
>Signed-off-by: Wenyou Yang 
>Reviewed-by: Simon Glass 
>---
>
>Changes in v7: None
>Changes in v6: None
>Changes in v5: None
>Changes in v4: None
>Changes in v3: None
>Changes in v2: None
>
> arch/arm/mach-at91/include/mach/atmel_pio4.h | 35 ++
> drivers/gpio/atmel_pio4.c| 71 +++-
> 2 files changed, 53 insertions(+), 53 deletions(-)

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] tpm: atmel_twi: Make compatible with DM I2C busses

2016-08-15 Thread Andreas Bießmann
Dear ,

Mario Six  writes:
>Commit 302c5db ("dm: tpm: Add Driver Model support for tpm_atmel_twi
>driver") converted the Atmel TWI TPM driver itself to driver model, but
>kept the legacy-style i2c_write/i2c_read calls.
>
>Commit 3e7d940 ("dm: tpm: Every TPM drivers should depends on DM_TPM")
>then made DM_I2C a dependency of the driver, effectively forcing users
>to turn on CONFIG_DM_I2C_COMPAT to get it to work.
>
>This patch adds the necessary dm_i2c_write/dm_i2c_read calls to make the
>driver compatible with DM, but also keeps the legacy calls in ifdefs, so
>that the driver is now compatible with both DM and non-DM setups.
>
>Signed-off-by: Mario Six 
>Reviewed-by: Simon Glass 
>Reviewed-by: Andreas Bießmann 
>---
> drivers/tpm/Kconfig |  2 +-
> drivers/tpm/tpm_atmel_twi.c | 15 ++-
> 2 files changed, 15 insertions(+), 2 deletions(-)

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot,v5] clk: at91: Add clock driver

2016-08-15 Thread Andreas Bießmann
Dear Wenyou Yang,

Wenyou Yang  writes:
>The patch is referred to at91 clock driver of Linux, to make
>the clock node descriptions in DT aligned with the Linux's.
>
>Signed-off-by: Wenyou Yang 
>Reviewed-by: Simon Glass 
>---
>
>Changes in v5:
> - Change clk_client.h -> clk.h to adapt to clk API conversion.
> - Fix missing semicolon and clk->dev in clk-generated.c.
> - Make clock options selectable via menuconfig.
>
>Changes in v4:
> - Add Reviewed-by tag.
> - Add more information in Kconfig help.
> - Use u32 for num_parents variable, not u8.
> - Change the check return from clk_get_rate().
> - Remove return -ENODEV line, use return ret.
> - Improve the comments in at91_system_clk_enable().
>
>Changes in v3:
> - Update based on [PATCH] clk: convert API to match reset/mailbox
>   style (http://patchwork.ozlabs.org/patch/625342/).
> - Remove [PATCH] clk: clk-uclass: Add post binding for CLK uclass,
>   add bind() method to bind the clk node without compatible.
> - Add help for Kconfig HAVE_AT91_XX option.
> - Add ofdata_to_platdata() method for generated clock driver
>   to handle the device tree.
> - Use setbits_le32() to replace readl()/writel().
> - Fixed the return value, -ENODEV->-EINVAL.
> - Use dev_get_addr_ptr() to replace dev_get_addr().
> - Remove check on dev_get_parent() return.
>
>Changes in v2:
> - Remove the redundant log print.
>
> arch/arm/mach-at91/include/mach/at91_pmc.h |  11 +-
> drivers/clk/Kconfig|   1 +
> drivers/clk/Makefile   |   1 +
> drivers/clk/at91/Kconfig   |  43 
> drivers/clk/at91/Makefile  |  11 ++
> drivers/clk/at91/clk-generated.c   | 162 +
> drivers/clk/at91/clk-h32mx.c   |  56 ++
> drivers/clk/at91/clk-main.c|  55 ++
> drivers/clk/at91/clk-master.c  |  33 ++
> drivers/clk/at91/clk-peripheral.c  |  60 +++
> drivers/clk/at91/clk-plla.c|  55 ++
> drivers/clk/at91/clk-slow.c|  37 +++
> drivers/clk/at91/clk-system.c  |  76 ++
> drivers/clk/at91/clk-utmi.c|  67 
> drivers/clk/at91/pmc.c |  71 +
> drivers/clk/at91/pmc.h |  18 
> drivers/clk/at91/sckc.c|  30 ++
> 17 files changed, 784 insertions(+), 3 deletions(-)
> create mode 100644 drivers/clk/at91/Kconfig
> create mode 100644 drivers/clk/at91/Makefile
> create mode 100644 drivers/clk/at91/clk-generated.c
> create mode 100644 drivers/clk/at91/clk-h32mx.c
> create mode 100644 drivers/clk/at91/clk-main.c
> create mode 100644 drivers/clk/at91/clk-master.c
> create mode 100644 drivers/clk/at91/clk-peripheral.c
> create mode 100644 drivers/clk/at91/clk-plla.c
> create mode 100644 drivers/clk/at91/clk-slow.c
> create mode 100644 drivers/clk/at91/clk-system.c
> create mode 100644 drivers/clk/at91/clk-utmi.c
> create mode 100644 drivers/clk/at91/pmc.c
> create mode 100644 drivers/clk/at91/pmc.h
> create mode 100644 drivers/clk/at91/sckc.c

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v7, 4/4] atmel: Bring in at91 pio4 device tree file and bindings

2016-08-15 Thread Andreas Bießmann
Dear Wenyou Yang,

Wenyou Yang  writes:
>Bring in required device tree file and bindings from Linux.
>
>Signed-off-by: Wenyou Yang 
>Reviewed-by: Andreas Bießmann 
>Reviewed-by: Simon Glass 
>---
>
>Changes in v7:
> - Drop [PATCH]: configs: sama5d2_xplained: Add #ifndef before
>   CONFIG_ATMEL_PIO4.
>
>Changes in v6: None
>Changes in v5: None
>Changes in v4: None
>Changes in v3: None
>Changes in v2:
> - add detailed example to show how to configure pinctrl for device.
> - remove interrupt and gpio property description.
> - add reviewed-by tag.
>
> arch/arm/dts/sama5d2-pinfunc.h | 880 +
> .../pinctrl/atmel,at91-pio4-pinctrl.txt|  66 ++
> 2 files changed, 946 insertions(+)
> create mode 100644 arch/arm/dts/sama5d2-pinfunc.h
> create mode 100644 
> doc/device-tree-bindings/pinctrl/atmel,at91-pio4-pinctrl.txt

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v7, 3/4] pinctrl: at91-pio4: Add pinctrl driver

2016-08-15 Thread Andreas Bießmann
Dear Wenyou Yang,

Wenyou Yang  writes:
>AT91 PIO4 controller is a combined gpio-controller, pin-mux and
>pin-config module. The peripheral's pins are assigned through
>per-pin based muxing logic.
>
>The pin configuration is performed on specific registers which
>are shared along with the gpio controller. So regard the pinctrl
>device as a child of atmel_pio4 device.
>
>Signed-off-by: Wenyou Yang 
>Reviewed-by: Simon Glass 
>Reviewed-by: Andreas Bießmann 
>---
>
>Changes in v7: None
>Changes in v6: None
>Changes in v5:
> - Fixed the return value, -ENODEV->-EINVAL.
> - Remove check on dev_get_parent() return.
>
>Changes in v4: None
>Changes in v3:
> - Rework due to the pinctrl device is regarded as atmel_pio4
>   device's child.
>
>Changes in v2:
> - remove meaningless comment.
> - add else path for argument of pinconf.
> - add inline attribute for atmel_pio4_bank_base().
> - add handle if the pinmux entries is greater maximum value.
>
> drivers/pinctrl/Kconfig |   7 ++
> drivers/pinctrl/Makefile|   1 +
> drivers/pinctrl/pinctrl-at91-pio4.c | 182 
> 3 files changed, 190 insertions(+)
> create mode 100644 drivers/pinctrl/pinctrl-at91-pio4.c

applied to u-boot-atmel/master, thanks!

I had to rebase this patch before applying.

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot,v3,2/2] i2c: atmel: DT binding for i2c driver

2016-08-15 Thread Andreas Bießmann
Dear Songjun Wu,

Songjun Wu  writes:
>DT binding documentation for atmel i2c driver.
>
>Signed-off-by: Songjun Wu 
>Reviewed-by: Heiko Schocher 
>Acked-by: Heiko Schocher 
>---
>
>Changes in v3: None
>Changes in v2:
>- Add phandles to input clocks
>
> doc/device-tree-bindings/i2c/i2c-at91.txt | 26 ++
> 1 file changed, 26 insertions(+)
> create mode 100644 doc/device-tree-bindings/i2c/i2c-at91.txt

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot,v3,1/2] i2c: atmel: add i2c driver

2016-08-15 Thread Andreas Bießmann
Dear Songjun Wu,

Songjun Wu  writes:
>Add i2c driver.
>
>Signed-off-by: Songjun Wu 
>Reviewed-by: Heiko Schocher 
>Acked-by: Heiko Schocher 
>---
>
>Changes in v3:
>- Update the clk API.
>
>Changes in v2:
>- Add code to get and enable clock.
>
> drivers/i2c/Kconfig|  10 ++
> drivers/i2c/Makefile   |   1 +
> drivers/i2c/at91_i2c.c | 338 +
> drivers/i2c/at91_i2c.h |  77 +++
> 4 files changed, 426 insertions(+)
> create mode 100644 drivers/i2c/at91_i2c.c
> create mode 100644 drivers/i2c/at91_i2c.h

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, RESEND, v3] dm: atmel: Add driver model support for the ehci driver

2016-08-15 Thread Andreas Bießmann
Dear Wenyou Yang,

Wenyou Yang  writes:
>Add driver model support while retaining the existing legacy code.
>This allows the driver to support boards that have converted to
>driver model as well as those that have not.
>
>Signed-off-by: Wenyou Yang 
>Acked-by: Simon Glass 
>---
>
>Changes in v3:
> - Change clk_client.h -> clk.h to adapt to clk API conversion.
>
>Changes in v2:
> - Collect Acked-by tag.
> - Update the clk API based on [PATCH] clk: convert API to match
>   reset/mailbox fstyle (http://patchwork.ozlabs.org/patch/625342/).
>
> drivers/usb/host/Kconfig  |   7 +++
> drivers/usb/host/ehci-atmel.c | 116 ++
> 2 files changed, 123 insertions(+)

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v11] mmc: atmel_sdhci: Convert to the driver model support

2016-08-15 Thread Andreas Bießmann
Dear Wenyou Yang,

Wenyou Yang  writes:
>Convert the driver to the driver model while retaining the existing
>legacy code. This allows the driver to support boards that have
>converted to driver model as well as those that have not.
>
>Signed-off-by: Wenyou Yang 
>Reviewed-by: Simon Glass 
>Reviewed-by: Jaehoon Chung 
>Reviewed-by: Heiko Schocher 
>---
>
>Changes in v11:
> - Due the removal of unnecessary arguments for sdhci_setup_cfg(),
>   change accordingly.
>
>Changes in v10:
> - Add Reviewed-by tag.
>
>Changes in v9:
> - Add Reviewed-by tag.
>
>Changes in v8:
> - Make atmel_sdhci_get_clk() to get clock device.
> - Use ulong type for gck_rate.
> - Remove meaningless type casting before dev->name.
>
>Changes in v7:
> - Add support for using driver model for block devices and MMC operations.
> - Change clk_client.h -> clk.h to adapt to clk API conversion.
>
>Changes in v6:
> - Remove unnecessary white space.
> - Use sdhci_read(), instead of readl().
> - Remove the local variables min_clk.
>
>Changes in v5:
> - Add Reviewed-by tag.
>
>Changes in v4:
> - Update the clk API based on [PATCH] clk: convert API to match
>   reset/mailbox fstyle (http://patchwork.ozlabs.org/patch/625342/).
> - Remove check on dev_get_parent() return.
> - Fixed the return value, such as -ENODEV->-EINVAL.
>
>Changes in v3:
> - Remove the redundant log print.
>
>Changes in v2:
> - Add clock support, include enabling peripheral clock
>   and generated clock.
> - Retain the existing legacy code to support boards which have not
>   converted to driver model.
>
> drivers/mmc/Kconfig   |  10 
> drivers/mmc/atmel_sdhci.c | 123 ++
> include/sdhci.h   |   2 +
> 3 files changed, 135 insertions(+)

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] ARM: at91/dt: Add device tree for SAMA5D2 Xplained

2016-08-15 Thread Andreas Bießmann
Dear Wenyou Yang,

Wenyou Yang  writes:
>Add device tree for SAMA5D2 Xplained board.
>
>Signed-off-by: Wenyou Yang 
>---
>
> arch/arm/dts/Makefile  |   3 +
> arch/arm/dts/at91-sama5d2_xplained.dts | 200 ++
> arch/arm/dts/sama5d2.dtsi  | 671 +
> 3 files changed, 874 insertions(+)
> create mode 100644 arch/arm/dts/at91-sama5d2_xplained.dts
> create mode 100644 arch/arm/dts/sama5d2.dtsi

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v7, 2/4] gpio: atmel_pio4: Rework to support DM & DT

2016-08-15 Thread Andreas Bießmann
Dear Wenyou Yang,

Wenyou Yang  writes:
>Rework the driver to support driver model and device tree, and
>support to regard the pio4 pinctrl device as a child of
>atmel_pio4 device.
>
>Signed-off-by: Wenyou Yang 
>Reviewed-by: Simon Glass 
>---
>
>Changes in v7:
> - Change clk_client.h -> clk.h to adapt to clk API conversion.
>
>Changes in v6:
> - Add Reviewed-by tag.
> - Fixed the return value, -EINVAL -> ret.
>
>Changes in v5:
> - Update the clk API based on [PATCH] clk: convert API to match
>   reset/mailbox fstyle (http://patchwork.ozlabs.org/patch/625342/).
> - Use clrbits_le32() to replace readl()/writel().
> - Fixed the return value, -ENODEV->-EINVAL.
> - Remove check on dev_get_parent() return.
>
>Changes in v4:
> - Remove the redundant log print.
>
>Changes in v3:
> - Add bind callback to support the pinctl device regarding as
>   a child of atmel_pio4 device.
> - Add clock support.
>
>Changes in v2: None
>
> drivers/gpio/Kconfig  |   2 +-
> drivers/gpio/atmel_pio4.c | 138 ++
> 2 files changed, 117 insertions(+), 23 deletions(-)

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PULL] u-boot-atmel/master -> u-boot/master

2016-08-15 Thread Andreas Bießmann
Hi Tom,

please pull the following changes into u-boot/master for v2016.09. It contains
one patch also available in the pull request for u-boot-mmc/master from
Jaehoon Chung.

Andreas

The following changes since commit f4b0df1823921ad3bc39820466e9c5201cef6210:

  Merge git://git.denx.de/u-boot-dm (2016-08-12 16:00:50 -0400)

are available in the git repository at:

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

for you to fetch changes up to 2fdbd8559a0a72930922435ecaa2eefb378b1f54:

  mmc: atmel_sdhci: Convert to the driver model support (2016-08-15 22:12:00 
+0200)


Songjun Wu (2):
  i2c: atmel: add i2c driver
  i2c: atmel: DT binding for i2c driver

Wenyou Yang (8):
  clk: at91: Add clock driver
  gpio: atmel_pio4: Move PIO4 definitions to head file
  gpio: atmel_pio4: Rework to support DM & DT
  pinctrl: at91-pio4: Add pinctrl driver
  atmel: Bring in at91 pio4 device tree file and bindings
  ARM: at91/dt: Add device tree for SAMA5D2 Xplained
  dm: atmel: Add driver model support for the ehci driver
  mmc: atmel_sdhci: Convert to the driver model support

mario@gdsys.cc (1):
  tpm: atmel_twi: Make compatible with DM I2C busses

 arch/arm/dts/Makefile  |   3 +
 arch/arm/dts/at91-sama5d2_xplained.dts | 200 +
 arch/arm/dts/sama5d2-pinfunc.h | 880 +
 arch/arm/dts/sama5d2.dtsi  | 671 
 arch/arm/mach-at91/include/mach/at91_pmc.h |  11 +-
 arch/arm/mach-at91/include/mach/atmel_pio4.h   |  35 +
 doc/device-tree-bindings/i2c/i2c-at91.txt  |  26 +
 .../pinctrl/atmel,at91-pio4-pinctrl.txt|  66 ++
 drivers/clk/Kconfig|   1 +
 drivers/clk/Makefile   |   1 +
 drivers/clk/at91/Kconfig   |  43 +
 drivers/clk/at91/Makefile  |  11 +
 drivers/clk/at91/clk-generated.c   | 162 
 drivers/clk/at91/clk-h32mx.c   |  56 ++
 drivers/clk/at91/clk-main.c|  55 ++
 drivers/clk/at91/clk-master.c  |  33 +
 drivers/clk/at91/clk-peripheral.c  |  60 ++
 drivers/clk/at91/clk-plla.c|  55 ++
 drivers/clk/at91/clk-slow.c|  37 +
 drivers/clk/at91/clk-system.c  |  76 ++
 drivers/clk/at91/clk-utmi.c|  67 ++
 drivers/clk/at91/pmc.c |  71 ++
 drivers/clk/at91/pmc.h |  18 +
 drivers/clk/at91/sckc.c|  30 +
 drivers/gpio/Kconfig   |   2 +-
 drivers/gpio/atmel_pio4.c  | 201 +++--
 drivers/i2c/Kconfig|  10 +
 drivers/i2c/Makefile   |   1 +
 drivers/i2c/at91_i2c.c | 338 
 drivers/i2c/at91_i2c.h |  77 ++
 drivers/mmc/Kconfig|  10 +
 drivers/mmc/atmel_sdhci.c  | 123 +++
 drivers/pinctrl/Kconfig|   7 +
 drivers/pinctrl/Makefile   |   1 +
 drivers/pinctrl/pinctrl-at91-pio4.c| 182 +
 drivers/tpm/Kconfig|   2 +-
 drivers/tpm/tpm_atmel_twi.c|  15 +-
 drivers/usb/host/Kconfig   |   7 +
 drivers/usb/host/ehci-atmel.c  | 116 +++
 include/sdhci.h|   2 +
 40 files changed, 3685 insertions(+), 77 deletions(-)
 create mode 100644 arch/arm/dts/at91-sama5d2_xplained.dts
 create mode 100644 arch/arm/dts/sama5d2-pinfunc.h
 create mode 100644 arch/arm/dts/sama5d2.dtsi
 create mode 100644 doc/device-tree-bindings/i2c/i2c-at91.txt
 create mode 100644 doc/device-tree-bindings/pinctrl/atmel,at91-pio4-pinctrl.txt
 create mode 100644 drivers/clk/at91/Kconfig
 create mode 100644 drivers/clk/at91/Makefile
 create mode 100644 drivers/clk/at91/clk-generated.c
 create mode 100644 drivers/clk/at91/clk-h32mx.c
 create mode 100644 drivers/clk/at91/clk-main.c
 create mode 100644 drivers/clk/at91/clk-master.c
 create mode 100644 drivers/clk/at91/clk-peripheral.c
 create mode 100644 drivers/clk/at91/clk-plla.c
 create mode 100644 drivers/clk/at91/clk-slow.c
 create mode 100644 drivers/clk/at91/clk-system.c
 create mode 100644 drivers/clk/at91/clk-utmi.c
 create mode 100644 drivers/clk/at91/pmc.c
 create mode 100644 drivers/clk/at91/pmc.h
 create mode 100644 drivers/clk/at91/sckc.c
 create mode 100644 drivers/i2c/at91_i2c.c
 create mode 100644 drivers/i2c/at91_i2c.h
 create mode 100644 drivers/pinctrl/pinctrl-at91-pio4.c
___
U-Boot mailing list
U-Boot@lists.denx.de
http://li

Re: [U-Boot] [U-Boot, RESEND, v3] dm: atmel: Add driver model support for the ehci driver

2016-08-15 Thread Marek Vasut
On 08/15/2016 10:16 PM, Andreas Bießmann wrote:
> Dear Wenyou Yang,
> 
> Wenyou Yang  writes:
>> Add driver model support while retaining the existing legacy code.
>> This allows the driver to support boards that have converted to
>> driver model as well as those that have not.
>>
>> Signed-off-by: Wenyou Yang 
>> Acked-by: Simon Glass 
>> ---
>>
>> Changes in v3:
>> - Change clk_client.h -> clk.h to adapt to clk API conversion.
>>
>> Changes in v2:
>> - Collect Acked-by tag.
>> - Update the clk API based on [PATCH] clk: convert API to match
>>   reset/mailbox fstyle (http://patchwork.ozlabs.org/patch/625342/).
>>
>> drivers/usb/host/Kconfig  |   7 +++
>> drivers/usb/host/ehci-atmel.c | 116 
>> ++
>> 2 files changed, 123 insertions(+)
> 
> applied to u-boot-atmel/master, thanks!
> 
> Best regards,
> Andreas Bießmann
> 
Wasn't this droppped because of some build issues ? See the USB PR mail.

-- 
Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Pull request: u-boot-net.git master

2016-08-15 Thread Joe Hershberger
On Mon, Aug 15, 2016 at 3:20 PM, Joe Hershberger  wrote:
> Hi Tom,
>
> The following changes since commit f4b0df1823921ad3bc39820466e9c5201cef6210:
>
>   Merge git://git.denx.de/u-boot-dm (2016-08-12 16:00:50 -0400)
>
> are available in the git repository at:
>
>
>   git://git.denx.de/u-boot-net.git master
>
> for you to fetch changes up to 23f728cd317c93e3342766614109ea15de07bf4d:
>
>   net: mii: Clean up legacy glue that is not used (2016-08-15 15:17:45 -0500)
>
> 
> Alban Bedel (1):
>   net: e1000: Fix the build with driver model and SPI EEPROM
>
> Chris Packham (1):
>   net: smsc95xx: Use correct get_unaligned functions
>
> Joe Hershberger (5):
>   scripts: Add a cocci patch for miiphy_register
>   net: mii: Use spatch to update miiphy_register
>   net: mii: Fix changes made by spatch
>   net: mii: Changes not made by spatch
>   net: mii: Clean up legacy glue that is not used

Ooops... meant to repull spatch series from mailing list... another
pull req to follow.

>
> Max Filippov (7):
>   net/ethoc: add Kconfig entry for the driver
>   net/ethoc: use priv instead of dev internally
>   net/ethoc: add CONFIG_DM_ETH support
>   net/ethoc: support device tree
>   net/ethoc: don't mix virtual and physical addresses
>   net/ethoc: support private memory configurations
>   net/ethoc: implement MDIO bus and support phylib
>
> Wenyou Yang (1):
>   net: macb: Fix build error for CONFIG_DM_ETH enabled
>
>  arch/m68k/include/asm/fec.h|   9 +-
>  arch/mips/mach-au1x00/au1x00_eth.c |  25 +-
>  arch/powerpc/cpu/mpc8260/ether_fcc.c   |  13 +-
>  arch/powerpc/cpu/mpc85xx/ether_fcc.c   |  13 +-
>  arch/powerpc/cpu/mpc8xx/fec.c  |  40 ++-
>  arch/powerpc/cpu/ppc4xx/miiphy.c   |  11 +-
>  board/gdsys/405ep/io.c |  13 +-
>  board/gdsys/405ep/iocon.c  |  27 +-
>  board/gdsys/405ex/io64.c   |  25 +-
>  board/gdsys/mpc8308/hrcon.c|  27 +-
>  board/gdsys/mpc8308/strider.c  |  27 +-
>  common/miiphyutil.c|  73 
>  configs/openrisc-generic_defconfig |   2 +
>  drivers/net/4xx_enet.c |  20 +-
>  drivers/net/Kconfig|   5 +
>  drivers/net/armada100_fec.c|  33 +-
>  drivers/net/at91_emac.c|  28 +-
>  drivers/net/bcm-sf2-eth-gmac.c |  18 +-
>  drivers/net/bcm-sf2-eth.c  |  13 +-
>  drivers/net/bcm-sf2-eth.h  |   8 +-
>  drivers/net/bfin_mac.c |  43 ++-
>  drivers/net/davinci_emac.c |  34 +-
>  drivers/net/e1000.c|   6 +-
>  drivers/net/e1000_spi.c|  59 ++--
>  drivers/net/eepro100.c |  34 +-
>  drivers/net/enc28j60.c |  26 +-
>  drivers/net/ep93xx_eth.c   |  40 ++-
>  drivers/net/ethoc.c| 526 
> +++--
>  drivers/net/fsl_mcdmafec.c |  13 +-
>  drivers/net/ftmac110.c |  35 +-
>  drivers/net/lpc32xx_eth.c  |  52 ++-
>  drivers/net/macb.c | 123 +--
>  drivers/net/mcffec.c   |  13 +-
>  drivers/net/mcfmii.c   |  19 +-
>  drivers/net/mpc512x_fec.c  |  30 +-
>  drivers/net/mpc5xxx_fec.c  |  30 +-
>  drivers/net/mvgbe.c|  33 +-
>  drivers/net/phy/miiphybb.c |  25 +-
>  drivers/net/sh_eth.c   |  12 +-
>  drivers/net/smc911x.c  |  35 +-
>  drivers/qe/uec.c   |  32 +-
>  drivers/usb/eth/smsc95xx.c |   4 +-
>  include/configs/corvus.h   |   1 +
>  include/configs/openrisc-generic.h |   1 -
>  include/configs/smartweb.h |   1 +
>  include/configs/snapper9g45.h  |   1 +
>  include/configs/taurus.h   |   1 +
>  include/dm/platform_data/net_ethoc.h   |  21 ++
>  include/miiphy.h   |  20 +-
>  scripts/coccinelle/net/mdio_register.cocci | 142 
>  50 files changed, 1326 insertions(+), 516 deletions(-)
>  create mode 100644 include/dm/platform_data/net_ethoc.h
>  create mode 100644 scripts/coccinelle/net/mdio_register.cocci
>
> Thanks!
> -Joe
> ___
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Pull request: u-boot-net.git master

2016-08-15 Thread Joe Hershberger
Hi Tom,

The following changes since commit f4b0df1823921ad3bc39820466e9c5201cef6210:

  Merge git://git.denx.de/u-boot-dm (2016-08-12 16:00:50 -0400)

are available in the git repository at:


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

for you to fetch changes up to 23f728cd317c93e3342766614109ea15de07bf4d:

  net: mii: Clean up legacy glue that is not used (2016-08-15 15:17:45 -0500)


Alban Bedel (1):
  net: e1000: Fix the build with driver model and SPI EEPROM

Chris Packham (1):
  net: smsc95xx: Use correct get_unaligned functions

Joe Hershberger (5):
  scripts: Add a cocci patch for miiphy_register
  net: mii: Use spatch to update miiphy_register
  net: mii: Fix changes made by spatch
  net: mii: Changes not made by spatch
  net: mii: Clean up legacy glue that is not used

Max Filippov (7):
  net/ethoc: add Kconfig entry for the driver
  net/ethoc: use priv instead of dev internally
  net/ethoc: add CONFIG_DM_ETH support
  net/ethoc: support device tree
  net/ethoc: don't mix virtual and physical addresses
  net/ethoc: support private memory configurations
  net/ethoc: implement MDIO bus and support phylib

Wenyou Yang (1):
  net: macb: Fix build error for CONFIG_DM_ETH enabled

 arch/m68k/include/asm/fec.h|   9 +-
 arch/mips/mach-au1x00/au1x00_eth.c |  25 +-
 arch/powerpc/cpu/mpc8260/ether_fcc.c   |  13 +-
 arch/powerpc/cpu/mpc85xx/ether_fcc.c   |  13 +-
 arch/powerpc/cpu/mpc8xx/fec.c  |  40 ++-
 arch/powerpc/cpu/ppc4xx/miiphy.c   |  11 +-
 board/gdsys/405ep/io.c |  13 +-
 board/gdsys/405ep/iocon.c  |  27 +-
 board/gdsys/405ex/io64.c   |  25 +-
 board/gdsys/mpc8308/hrcon.c|  27 +-
 board/gdsys/mpc8308/strider.c  |  27 +-
 common/miiphyutil.c|  73 
 configs/openrisc-generic_defconfig |   2 +
 drivers/net/4xx_enet.c |  20 +-
 drivers/net/Kconfig|   5 +
 drivers/net/armada100_fec.c|  33 +-
 drivers/net/at91_emac.c|  28 +-
 drivers/net/bcm-sf2-eth-gmac.c |  18 +-
 drivers/net/bcm-sf2-eth.c  |  13 +-
 drivers/net/bcm-sf2-eth.h  |   8 +-
 drivers/net/bfin_mac.c |  43 ++-
 drivers/net/davinci_emac.c |  34 +-
 drivers/net/e1000.c|   6 +-
 drivers/net/e1000_spi.c|  59 ++--
 drivers/net/eepro100.c |  34 +-
 drivers/net/enc28j60.c |  26 +-
 drivers/net/ep93xx_eth.c   |  40 ++-
 drivers/net/ethoc.c| 526 +++--
 drivers/net/fsl_mcdmafec.c |  13 +-
 drivers/net/ftmac110.c |  35 +-
 drivers/net/lpc32xx_eth.c  |  52 ++-
 drivers/net/macb.c | 123 +--
 drivers/net/mcffec.c   |  13 +-
 drivers/net/mcfmii.c   |  19 +-
 drivers/net/mpc512x_fec.c  |  30 +-
 drivers/net/mpc5xxx_fec.c  |  30 +-
 drivers/net/mvgbe.c|  33 +-
 drivers/net/phy/miiphybb.c |  25 +-
 drivers/net/sh_eth.c   |  12 +-
 drivers/net/smc911x.c  |  35 +-
 drivers/qe/uec.c   |  32 +-
 drivers/usb/eth/smsc95xx.c |   4 +-
 include/configs/corvus.h   |   1 +
 include/configs/openrisc-generic.h |   1 -
 include/configs/smartweb.h |   1 +
 include/configs/snapper9g45.h  |   1 +
 include/configs/taurus.h   |   1 +
 include/dm/platform_data/net_ethoc.h   |  21 ++
 include/miiphy.h   |  20 +-
 scripts/coccinelle/net/mdio_register.cocci | 142 
 50 files changed, 1326 insertions(+), 516 deletions(-)
 create mode 100644 include/dm/platform_data/net_ethoc.h
 create mode 100644 scripts/coccinelle/net/mdio_register.cocci

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


[U-Boot] Pull request: u-boot-net.git master

2016-08-15 Thread Joe Hershberger
Hi Tom,

The following changes since commit f4b0df1823921ad3bc39820466e9c5201cef6210:

  Merge git://git.denx.de/u-boot-dm (2016-08-12 16:00:50 -0400)

are available in the git repository at:


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

for you to fetch changes up to cc2593128f7ad1b879e9e5bd3097f6c717cf4c9a:

  net: mii: Clean up legacy glue that is not used (2016-08-15 15:29:04 -0500)


Alban Bedel (1):
  net: e1000: Fix the build with driver model and SPI EEPROM

Chris Packham (1):
  net: smsc95xx: Use correct get_unaligned functions

Joe Hershberger (5):
  scripts: Add a cocci patch for miiphy_register
  net: mii: Use spatch to update miiphy_register
  net: mii: Fix changes made by spatch
  net: mii: Changes not made by spatch
  net: mii: Clean up legacy glue that is not used

Max Filippov (7):
  net/ethoc: add Kconfig entry for the driver
  net/ethoc: use priv instead of dev internally
  net/ethoc: add CONFIG_DM_ETH support
  net/ethoc: support device tree
  net/ethoc: don't mix virtual and physical addresses
  net/ethoc: support private memory configurations
  net/ethoc: implement MDIO bus and support phylib

Wenyou Yang (1):
  net: macb: Fix build error for CONFIG_DM_ETH enabled

 arch/m68k/include/asm/fec.h|   9 +-
 arch/mips/mach-au1x00/au1x00_eth.c |  25 +-
 arch/powerpc/cpu/mpc8260/ether_fcc.c   |  13 +-
 arch/powerpc/cpu/mpc85xx/ether_fcc.c   |  13 +-
 arch/powerpc/cpu/mpc8xx/fec.c  |  40 ++-
 arch/powerpc/cpu/ppc4xx/miiphy.c   |  11 +-
 board/gdsys/405ep/io.c |  13 +-
 board/gdsys/405ep/iocon.c  |  27 +-
 board/gdsys/405ex/io64.c   |  25 +-
 board/gdsys/mpc8308/hrcon.c|  27 +-
 board/gdsys/mpc8308/strider.c  |  27 +-
 common/miiphyutil.c|  73 
 configs/openrisc-generic_defconfig |   2 +
 drivers/net/4xx_enet.c |  20 +-
 drivers/net/Kconfig|   5 +
 drivers/net/armada100_fec.c|  33 +-
 drivers/net/at91_emac.c|  28 +-
 drivers/net/bcm-sf2-eth-gmac.c |  18 +-
 drivers/net/bcm-sf2-eth.c  |  13 +-
 drivers/net/bcm-sf2-eth.h  |   8 +-
 drivers/net/bfin_mac.c |  43 ++-
 drivers/net/davinci_emac.c |  34 +-
 drivers/net/e1000.c|   6 +-
 drivers/net/e1000_spi.c|  59 ++--
 drivers/net/eepro100.c |  34 +-
 drivers/net/enc28j60.c |  26 +-
 drivers/net/ep93xx_eth.c   |  40 ++-
 drivers/net/ethoc.c| 526 +++--
 drivers/net/fsl_mcdmafec.c |  13 +-
 drivers/net/ftmac110.c |  35 +-
 drivers/net/lpc32xx_eth.c  |  52 ++-
 drivers/net/macb.c | 123 +--
 drivers/net/mcffec.c   |  13 +-
 drivers/net/mcfmii.c   |  19 +-
 drivers/net/mpc512x_fec.c  |  30 +-
 drivers/net/mpc5xxx_fec.c  |  30 +-
 drivers/net/mvgbe.c|  33 +-
 drivers/net/phy/miiphybb.c |  25 +-
 drivers/net/sh_eth.c   |  12 +-
 drivers/net/smc911x.c  |  35 +-
 drivers/qe/uec.c   |  32 +-
 drivers/usb/eth/smsc95xx.c |   4 +-
 include/configs/corvus.h   |   1 +
 include/configs/openrisc-generic.h |   1 -
 include/configs/smartweb.h |   1 +
 include/configs/snapper9g45.h  |   1 +
 include/configs/taurus.h   |   1 +
 include/dm/platform_data/net_ethoc.h   |  21 ++
 include/miiphy.h   |  20 +-
 scripts/coccinelle/net/mdio_register.cocci | 142 
 50 files changed, 1326 insertions(+), 516 deletions(-)
 create mode 100644 include/dm/platform_data/net_ethoc.h
 create mode 100644 scripts/coccinelle/net/mdio_register.cocci

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


Re: [U-Boot] [PULL] u-boot-atmel/master -> u-boot/master

2016-08-15 Thread Tom Rini
On Mon, Aug 15, 2016 at 10:23:29PM +0200, Andreas Bießmann wrote:

> Hi Tom,
> 
> please pull the following changes into u-boot/master for v2016.09. It contains
> one patch also available in the pull request for u-boot-mmc/master from
> Jaehoon Chung.
> 
> Andreas
> 
> The following changes since commit f4b0df1823921ad3bc39820466e9c5201cef6210:
> 
>   Merge git://git.denx.de/u-boot-dm (2016-08-12 16:00:50 -0400)
> 
> are available in the git repository at:
> 
>   git://git.denx.de/u-boot-atmel.git master
> 
> for you to fetch changes up to 2fdbd8559a0a72930922435ecaa2eefb378b1f54:
> 
>   mmc: atmel_sdhci: Convert to the driver model support (2016-08-15 22:12:00 
> +0200)
> 

NAK:
+   sama5d2_ptc_spiflash  
+(sama5d2_ptc_spiflash)  static int clk_get_by_name(struct udevice *dev, const 
char *name,
+(sama5d2_ptc_spiflash) ^
w+(sama5d2_ptc_spiflash) In file included from drivers/gpio/atmel_pio4.c:10:0:
w+(sama5d2_ptc_spiflash) include/clk.h:107:12: warning: 'clk_get_by_name' 
defined but not used [-Wunused-function]
w+(sama5d2_ptc_spiflash) In file included from 
drivers/usb/host/ehci-atmel.c:10:0:

-- 
Tom


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


Re: [U-Boot] net: macb: Fix build error for CONFIG_DM_ETH enabled

2016-08-15 Thread Joe Hershberger
Hi Wenyou,

https://patchwork.ozlabs.org/patch/622869/ was applied to u-boot-net.git.

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


Re: [U-Boot] net: smsc95xx: Use correct get_unaligned functions

2016-08-15 Thread Joe Hershberger
Hi Chris,

https://patchwork.ozlabs.org/patch/647651/ was applied to u-boot-net.git.

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


Re: [U-Boot] net/ethoc: support device tree

2016-08-15 Thread Joe Hershberger
Hi Max,

https://patchwork.ozlabs.org/patch/656241/ was applied to u-boot-net.git.

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


Re: [U-Boot] net: e1000: Fix the build with driver model and SPI EEPROM

2016-08-15 Thread Joe Hershberger
Hi Alban,

https://patchwork.ozlabs.org/patch/655311/ was applied to u-boot-net.git.

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


Re: [U-Boot] net/ethoc: add Kconfig entry for the driver

2016-08-15 Thread Joe Hershberger
Hi Max,

https://patchwork.ozlabs.org/patch/656236/ was applied to u-boot-net.git.

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


Re: [U-Boot] net/ethoc: use priv instead of dev internally

2016-08-15 Thread Joe Hershberger
Hi Max,

https://patchwork.ozlabs.org/patch/656238/ was applied to u-boot-net.git.

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


Re: [U-Boot] net/ethoc: don't mix virtual and physical addresses

2016-08-15 Thread Joe Hershberger
Hi Max,

https://patchwork.ozlabs.org/patch/656242/ was applied to u-boot-net.git.

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


Re: [U-Boot] net/ethoc: support private memory configurations

2016-08-15 Thread Joe Hershberger
Hi Max,

https://patchwork.ozlabs.org/patch/656237/ was applied to u-boot-net.git.

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


Re: [U-Boot] net/ethoc: add CONFIG_DM_ETH support

2016-08-15 Thread Joe Hershberger
Hi Max,

https://patchwork.ozlabs.org/patch/656240/ was applied to u-boot-net.git.

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


Re: [U-Boot] scripts: Add a cocci patch for miiphy_register

2016-08-15 Thread Joe Hershberger
Hi Joe,

https://patchwork.ozlabs.org/patch/656885/ was applied to u-boot-net.git.

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


Re: [U-Boot] net/ethoc: implement MDIO bus and support phylib

2016-08-15 Thread Joe Hershberger
Hi Max,

https://patchwork.ozlabs.org/patch/656239/ was applied to u-boot-net.git.

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


Re: [U-Boot] net: mii: Use spatch to update miiphy_register

2016-08-15 Thread Joe Hershberger
Hi Joe,

https://patchwork.ozlabs.org/patch/656902/ was applied to u-boot-net.git.

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


Re: [U-Boot] net: mii: Fix changes made by spatch

2016-08-15 Thread Joe Hershberger
Hi Joe,

https://patchwork.ozlabs.org/patch/656897/ was applied to u-boot-net.git.

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


Re: [U-Boot] net: mii: Changes not made by spatch

2016-08-15 Thread Joe Hershberger
Hi Joe,

https://patchwork.ozlabs.org/patch/656883/ was applied to u-boot-net.git.

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


Re: [U-Boot] net: mii: Clean up legacy glue that is not used

2016-08-15 Thread Joe Hershberger
Hi Joe,

https://patchwork.ozlabs.org/patch/656884/ was applied to u-boot-net.git.

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


Re: [U-Boot] Boot failure with a AT91RM9200 based custom board

2016-08-15 Thread Andreas Bießmann
Dear Peter,

On 12.08.16 02:24, Peter Kardos wrote:
> Greetings,
> 
> I'm looking for a AT91RM9200 specialist as I've got stuck porting board
> support from a old u-boot (v1.1.4) to the latest stable (v2016.07)...
> 
> I'm using the at91r9200ek board as a template to get things running...

I haven't booted that board for a while ...

> With the patches i can get to the state below and here the board hangs.
> When patch 0004 is omitted, it seems the board doesn't boot at all (I'm
> basing this assumption on the current consumption of the system).

AFAIR the address 0x0 is mapped to the boot source until REMAP (also
depending on the BMS setting). It may be flash for your setup ...
writing the flash with a copy instruction should fail so this could be
the cause why it is not working.

> The console shows the following...
> initcall: 1001cce0
> 
> 
> U-Boot 2016.07-g95a02a7 (Aug 12 2016 - 01:43:34 +0200)
> 
> initcall: 1000b5bc
> U-Boot code: 1000 -> 10030338  BSS: -> 1006B424
> initcall: 1000b3b4
> initcall: 1000bae8
> initcall: 1000b5e8
> DRAM:  initcall: 100010b8
> initcall: 1000b808
> Monitor len: 0006B424
> Ram size: 0400
> Ram top: 2400
> initcall: 1000b3dc
> initcall: 1000b564
> TLB table from 23ff to 23ff4000
> initcall: 1000b3f4
> initcall: 1000b518
> Reserving 429k for U-Boot at: 23f84000
> initcall: 1000b4ec
> Reserving 384k for malloc() at: 23f24000
> initcall: 1000b6e8
> Reserving 80 Bytes for Board Info at: 23f23fb0
> initcall: 1000b3fc
> initcall: 1000b4b8
> Reserving 192 Bytes for Global Data at: 23f23ef0
> initcall: 1000b440
> initcall: 1000b414
> initcall: 1000b884
> initcall: 1000b7e0
> initcall: 1000b738
> 
> RAM Configuration:
> Bank #0: 2000 64 MiB
> 
> DRAM:  64 MiB
> initcall: 1000b424
> New Stack Pointer is: 23f23ed0
> initcall: 1000b6ac
> initcall: 1000b640
> Relocation Offset is: 13f84000
> Relocating to 23f84000, new gd at 23f23ef0, sp at 23f23ed0

Could you please check, if the RAM initialisation is working properly?
AFAIR there was some problem with the u-boot RAM initialisation for this
board but never fixed (shame on me). Some set of known data and read
back before relocation should do the check.

Andreas

> Some detail about the board:
> AT91RM9200; external boot from /CS0
> 64Mbyte SDRAM (32bit)
> 32Mbyte NOR (16bit)
> Micrel KSZ8721
> 
> Any ideas, pointers, even flame is appreciated. If more info is needed
> I'm happy to deliver
> Thanx in advance.
> Cheers, Peter
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PULL] u-boot-atmel/master -> u-boot/master

2016-08-15 Thread Andreas Bießmann
Hi Tom,

On 15.08.16 22:33, Tom Rini wrote:
> On Mon, Aug 15, 2016 at 10:23:29PM +0200, Andreas Bießmann wrote:
> 
>> Hi Tom,
>>
>> please pull the following changes into u-boot/master for v2016.09. It 
>> contains
>> one patch also available in the pull request for u-boot-mmc/master from
>> Jaehoon Chung.
>>
>> Andreas
>>
>> The following changes since commit f4b0df1823921ad3bc39820466e9c5201cef6210:
>>
>>   Merge git://git.denx.de/u-boot-dm (2016-08-12 16:00:50 -0400)
>>
>> are available in the git repository at:
>>
>>   git://git.denx.de/u-boot-atmel.git master
>>
>> for you to fetch changes up to 2fdbd8559a0a72930922435ecaa2eefb378b1f54:
>>
>>   mmc: atmel_sdhci: Convert to the driver model support (2016-08-15 22:12:00 
>> +0200)
>>
> 
> NAK:
> +   sama5d2_ptc_spiflash  
> +(sama5d2_ptc_spiflash)  static int clk_get_by_name(struct udevice *dev, 
> const char *name,
> +(sama5d2_ptc_spiflash) ^
> w+(sama5d2_ptc_spiflash) In file included from drivers/gpio/atmel_pio4.c:10:0:
> w+(sama5d2_ptc_spiflash) include/clk.h:107:12: warning: 'clk_get_by_name' 
> defined but not used [-Wunused-function]
> w+(sama5d2_ptc_spiflash) In file included from 
> drivers/usb/host/ehci-atmel.c:10:0:
> 

Please see http://patchwork.ozlabs.org/patch/659378/
Sorry, should have mentioned this in the mail.

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


Re: [U-Boot] [U-Boot, RESEND, v3] dm: atmel: Add driver model support for the ehci driver

2016-08-15 Thread Andreas Bießmann
Hi Marek,

On 15.08.16 22:25, Marek Vasut wrote:
> On 08/15/2016 10:16 PM, Andreas Bießmann wrote:
>> Dear Wenyou Yang,
>>
>> Wenyou Yang  writes:
>>> Add driver model support while retaining the existing legacy code.
>>> This allows the driver to support boards that have converted to
>>> driver model as well as those that have not.
>>>
>>> Signed-off-by: Wenyou Yang 
>>> Acked-by: Simon Glass 
>>> ---
>>>
>>> Changes in v3:
>>> - Change clk_client.h -> clk.h to adapt to clk API conversion.
>>>
>>> Changes in v2:
>>> - Collect Acked-by tag.
>>> - Update the clk API based on [PATCH] clk: convert API to match
>>>   reset/mailbox fstyle (http://patchwork.ozlabs.org/patch/625342/).
>>>
>>> drivers/usb/host/Kconfig  |   7 +++
>>> drivers/usb/host/ehci-atmel.c | 116 
>>> ++
>>> 2 files changed, 123 insertions(+)
>>
>> applied to u-boot-atmel/master, thanks!
>>
>> Best regards,
>> Andreas Bießmann
>>
> Wasn't this droppped because of some build issues ? See the USB PR mail.
> 

Sorry, haven't seen that PR.
This patch depends on 'clk: at91: Add clock driver' (9e5935c in
u-boot-atmel/master).
No build error for arm nor avr32 here (also depends on
http://patchwork.ozlabs.org/patch/659378/; currently not on
u-boot-atmel/master).

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


Re: [U-Boot] [PULL] u-boot-atmel/master -> u-boot/master

2016-08-15 Thread Tom Rini
On Mon, Aug 15, 2016 at 10:45:16PM +0200, Andreas Bießmann wrote:
> Hi Tom,
> 
> On 15.08.16 22:33, Tom Rini wrote:
> > On Mon, Aug 15, 2016 at 10:23:29PM +0200, Andreas Bießmann wrote:
> > 
> >> Hi Tom,
> >>
> >> please pull the following changes into u-boot/master for v2016.09. It 
> >> contains
> >> one patch also available in the pull request for u-boot-mmc/master from
> >> Jaehoon Chung.
> >>
> >> Andreas
> >>
> >> The following changes since commit 
> >> f4b0df1823921ad3bc39820466e9c5201cef6210:
> >>
> >>   Merge git://git.denx.de/u-boot-dm (2016-08-12 16:00:50 -0400)
> >>
> >> are available in the git repository at:
> >>
> >>   git://git.denx.de/u-boot-atmel.git master
> >>
> >> for you to fetch changes up to 2fdbd8559a0a72930922435ecaa2eefb378b1f54:
> >>
> >>   mmc: atmel_sdhci: Convert to the driver model support (2016-08-15 
> >> 22:12:00 +0200)
> >>
> > 
> > NAK:
> > +   sama5d2_ptc_spiflash  
> > +(sama5d2_ptc_spiflash)  static int clk_get_by_name(struct udevice *dev, 
> > const char *name,
> > +(sama5d2_ptc_spiflash) ^
> > w+(sama5d2_ptc_spiflash) In file included from 
> > drivers/gpio/atmel_pio4.c:10:0:
> > w+(sama5d2_ptc_spiflash) include/clk.h:107:12: warning: 'clk_get_by_name' 
> > defined but not used [-Wunused-function]
> > w+(sama5d2_ptc_spiflash) In file included from 
> > drivers/usb/host/ehci-atmel.c:10:0:
> > 
> 
> Please see http://patchwork.ozlabs.org/patch/659378/
> Sorry, should have mentioned this in the mail.

OK, please grab that and put it in the tree such that we don't introduce
new errors :)  Thanks!

-- 
Tom


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


Re: [U-Boot] clk.h: inline clk_get_by_name()

2016-08-15 Thread Andreas Bießmann
Dear =?utf-8?q?Andreas_Bie=C3=9Fmann?=,

 writes:
>Fix compile warning for non OF_CONTROL builds:
>
>---8<---
>In file included from /Volumes/devel/u-boot/drivers/gpio/atmel_pio4.c:10:0:
>/Volumes/devel/u-boot/include/clk.h:107:12: warning: 'clk_get_by_name' defined 
>but not used [-Wunused-function]
>--->8---
>
>Signed-off-by: Andreas Bießmann 
>Acked-by: Stephen Warren 
>---
>
> include/clk.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PULL] u-boot-atmel/master -> u-boot/master

2016-08-15 Thread Andreas Bießmann
Hi Tom,

please pull the following changes into u-boot/master for v2016.09.

Andreas

The following changes since commit f4b0df1823921ad3bc39820466e9c5201cef6210:

  Merge git://git.denx.de/u-boot-dm (2016-08-12 16:00:50 -0400)

are available in the git repository at:

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

for you to fetch changes up to a0d0d86f5cfeefda87986f3825ed1a85efa24448:

  mmc: atmel_sdhci: Convert to the driver model support (2016-08-15 22:58:05 
+0200)


Andreas Bießmann (1):
  clk.h: inline clk_get_by_name()

Songjun Wu (2):
  i2c: atmel: add i2c driver
  i2c: atmel: DT binding for i2c driver

Wenyou Yang (8):
  clk: at91: Add clock driver
  gpio: atmel_pio4: Move PIO4 definitions to head file
  gpio: atmel_pio4: Rework to support DM & DT
  pinctrl: at91-pio4: Add pinctrl driver
  atmel: Bring in at91 pio4 device tree file and bindings
  ARM: at91/dt: Add device tree for SAMA5D2 Xplained
  dm: atmel: Add driver model support for the ehci driver
  mmc: atmel_sdhci: Convert to the driver model support

mario@gdsys.cc (1):
  tpm: atmel_twi: Make compatible with DM I2C busses

 arch/arm/dts/Makefile  |   3 +
 arch/arm/dts/at91-sama5d2_xplained.dts | 200 +
 arch/arm/dts/sama5d2-pinfunc.h | 880 +
 arch/arm/dts/sama5d2.dtsi  | 671 
 arch/arm/mach-at91/include/mach/at91_pmc.h |  11 +-
 arch/arm/mach-at91/include/mach/atmel_pio4.h   |  35 +
 doc/device-tree-bindings/i2c/i2c-at91.txt  |  26 +
 .../pinctrl/atmel,at91-pio4-pinctrl.txt|  66 ++
 drivers/clk/Kconfig|   1 +
 drivers/clk/Makefile   |   1 +
 drivers/clk/at91/Kconfig   |  43 +
 drivers/clk/at91/Makefile  |  11 +
 drivers/clk/at91/clk-generated.c   | 162 
 drivers/clk/at91/clk-h32mx.c   |  56 ++
 drivers/clk/at91/clk-main.c|  55 ++
 drivers/clk/at91/clk-master.c  |  33 +
 drivers/clk/at91/clk-peripheral.c  |  60 ++
 drivers/clk/at91/clk-plla.c|  55 ++
 drivers/clk/at91/clk-slow.c|  37 +
 drivers/clk/at91/clk-system.c  |  76 ++
 drivers/clk/at91/clk-utmi.c|  67 ++
 drivers/clk/at91/pmc.c |  71 ++
 drivers/clk/at91/pmc.h |  18 +
 drivers/clk/at91/sckc.c|  30 +
 drivers/gpio/Kconfig   |   2 +-
 drivers/gpio/atmel_pio4.c  | 201 +++--
 drivers/i2c/Kconfig|  10 +
 drivers/i2c/Makefile   |   1 +
 drivers/i2c/at91_i2c.c | 338 
 drivers/i2c/at91_i2c.h |  77 ++
 drivers/mmc/Kconfig|  10 +
 drivers/mmc/atmel_sdhci.c  | 123 +++
 drivers/pinctrl/Kconfig|   7 +
 drivers/pinctrl/Makefile   |   1 +
 drivers/pinctrl/pinctrl-at91-pio4.c| 182 +
 drivers/tpm/Kconfig|   2 +-
 drivers/tpm/tpm_atmel_twi.c|  15 +-
 drivers/usb/host/Kconfig   |   7 +
 drivers/usb/host/ehci-atmel.c  | 116 +++
 include/clk.h  |   2 +-
 include/sdhci.h|   2 +
 41 files changed, 3686 insertions(+), 78 deletions(-)
 create mode 100644 arch/arm/dts/at91-sama5d2_xplained.dts
 create mode 100644 arch/arm/dts/sama5d2-pinfunc.h
 create mode 100644 arch/arm/dts/sama5d2.dtsi
 create mode 100644 doc/device-tree-bindings/i2c/i2c-at91.txt
 create mode 100644 doc/device-tree-bindings/pinctrl/atmel,at91-pio4-pinctrl.txt
 create mode 100644 drivers/clk/at91/Kconfig
 create mode 100644 drivers/clk/at91/Makefile
 create mode 100644 drivers/clk/at91/clk-generated.c
 create mode 100644 drivers/clk/at91/clk-h32mx.c
 create mode 100644 drivers/clk/at91/clk-main.c
 create mode 100644 drivers/clk/at91/clk-master.c
 create mode 100644 drivers/clk/at91/clk-peripheral.c
 create mode 100644 drivers/clk/at91/clk-plla.c
 create mode 100644 drivers/clk/at91/clk-slow.c
 create mode 100644 drivers/clk/at91/clk-system.c
 create mode 100644 drivers/clk/at91/clk-utmi.c
 create mode 100644 drivers/clk/at91/pmc.c
 create mode 100644 drivers/clk/at91/pmc.h
 create mode 100644 drivers/clk/at91/sckc.c
 create mode 100644 drivers/i2c/at91_i2c.c
 create mode 100644 drivers/i2c/at91_i2c.h
 create mode 100644 drivers/pinctrl/pinctrl-at91-pio4.c
___
U-Boot mailing list
U-Boot@

Re: [U-Boot] [PATCH v7] dm: at91: Add driver model support for the spi driver

2016-08-15 Thread Andreas Bießmann
Hi Wenyou,

On 29.07.16 02:38, Wenyou Yang wrote:
> Add driver model support while retaining the existing legacy code.
> This allows the driver to support boards that have converted to
> driver model as well as those that have not.
> 
> Signed-off-by: Wenyou Yang 
> Reviewed-by: Simon Glass 

This one breaks avr32 boards:

---8<---
02: dm: at91: Add driver model support for the spi driver
 avr32:  +   atngw100 atngw100mkii
+../drivers/spi/atmel_spi.c:17:31: error: asm/arch/at91_spi.h: No such
file or directory
+../drivers/spi/atmel_spi.c:18:22: error: asm/gpio.h: No such file or
directory
+make[2]: *** [drivers/spi/atmel_spi.o] Error 1
+make[1]: *** [drivers/spi] Error 2
+make: *** [sub-make] Error 2
--->8---

please fix this

Andreas

> ---
> 
> Changes in v7:
>  - Move gpio_request_list_by_name() to _probe(), remove
>*_ofdata_to_platdata().
> 
> Changes in v6:
>  - Remove the two flash related options.
> 
> Changes in v5:
>  - Change clk_client.h -> clk.h to adapt to clk API conversion.
> 
> Changes in v4:
>  - Collect Reviewed-by tag.
>  - Update the clk API based on [PATCH] clk: convert API to match
>reset/mailbox fstyle (http://patchwork.ozlabs.org/patch/625342/).
>  - Remove check on dev_get_parent() return.
>  - Fixed the return value, -ENODEV->-EINVAL.
>  - Retain #include  line.
> 
> Changes in v3:
>  - Remove redundant log print.
> 
> Changes in v2:
>  - Add clock support.
> 
>  drivers/spi/Kconfig |   7 ++
>  drivers/spi/atmel_spi.c | 295 
> 
>  2 files changed, 302 insertions(+)
> 
> diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
> index aca385d..16ed231 100644
> --- a/drivers/spi/Kconfig
> +++ b/drivers/spi/Kconfig
> @@ -32,6 +32,13 @@ config ATH79_SPI
> uses driver model and requires a device tree binding to operate.
> please refer to doc/device-tree-bindings/spi/spi-ath79.txt.
>  
> +config ATMEL_SPI
> + bool "Atmel SPI driver"
> + depends on ARCH_AT91
> + help
> +   Enable the Atmel SPI driver. This driver can be used to access
> +   the SPI Flash, such as AT25DF321.
> +
>  config CADENCE_QSPI
>   bool "Cadence QSPI driver"
>   help
> diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c
> index ed6278b..db40631 100644
> --- a/drivers/spi/atmel_spi.c
> +++ b/drivers/spi/atmel_spi.c
> @@ -4,6 +4,9 @@
>   * SPDX-License-Identifier:  GPL-2.0+
>   */
>  #include 
> +#include 
> +#include 
> +#include 
>  #include 
>  #include 
>  
> @@ -11,9 +14,15 @@
>  
>  #include 
>  #include 
> +#include 
> +#include 
>  
>  #include "atmel_spi.h"
>  
> +DECLARE_GLOBAL_DATA_PTR;
> +
> +#ifndef CONFIG_DM_SPI
> +
>  static int spi_has_wdrbt(struct atmel_spi_slave *slave)
>  {
>   unsigned int ver;
> @@ -209,3 +218,289 @@ out:
>  
>   return 0;
>  }
> +
> +#else
> +
> +#define MAX_CS_COUNT 4
> +
> +struct atmel_spi_platdata {
> + struct at91_spi *regs;
> +};
> +
> +struct atmel_spi_priv {
> + unsigned int freq;  /* Default frequency */
> + unsigned int mode;
> + ulong bus_clk_rate;
> + struct gpio_desc cs_gpios[MAX_CS_COUNT];
> +};
> +
> +static int atmel_spi_claim_bus(struct udevice *dev)
> +{
> + struct udevice *bus = dev_get_parent(dev);
> + struct atmel_spi_platdata *bus_plat = dev_get_platdata(bus);
> + struct atmel_spi_priv *priv = dev_get_priv(bus);
> + struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev);
> + struct at91_spi *reg_base = bus_plat->regs;
> + u32 cs = slave_plat->cs;
> + u32 freq = priv->freq;
> + u32 scbr, csrx, mode;
> +
> + scbr = (priv->bus_clk_rate + freq - 1) / freq;
> + if (scbr > ATMEL_SPI_CSRx_SCBR_MAX)
> + return -EINVAL;
> +
> + if (scbr < 1)
> + scbr = 1;
> +
> + csrx = ATMEL_SPI_CSRx_SCBR(scbr);
> + csrx |= ATMEL_SPI_CSRx_BITS(ATMEL_SPI_BITS_8);
> +
> + if (!(priv->mode & SPI_CPHA))
> + csrx |= ATMEL_SPI_CSRx_NCPHA;
> + if (priv->mode & SPI_CPOL)
> + csrx |= ATMEL_SPI_CSRx_CPOL;
> +
> + writel(csrx, ®_base->csr[cs]);
> +
> + mode = ATMEL_SPI_MR_MSTR |
> +ATMEL_SPI_MR_MODFDIS |
> +ATMEL_SPI_MR_WDRBT |
> +ATMEL_SPI_MR_PCS(~(1 << cs));
> +
> + writel(mode, ®_base->mr);
> +
> + writel(ATMEL_SPI_CR_SPIEN, ®_base->cr);
> +
> + return 0;
> +}
> +
> +static int atmel_spi_release_bus(struct udevice *dev)
> +{
> + struct udevice *bus = dev_get_parent(dev);
> + struct atmel_spi_platdata *bus_plat = dev_get_platdata(bus);
> +
> + writel(ATMEL_SPI_CR_SPIDIS, &bus_plat->regs->cr);
> +
> + return 0;
> +}
> +
> +static void atmel_spi_cs_activate(struct udevice *dev)
> +{
> + struct udevice *bus = dev_get_parent(dev);
> + struct atmel_spi_priv *priv = dev_get_priv(bus);
> + struct dm_spi_slave_platdata *slave_plat = dev_get_parent_platdata(dev);
> + u32 cs = slave_plat->cs;
> +
> + dm_gpio_set_value(&priv->cs_gpios

Re: [U-Boot] [U-Boot, RESEND, v3] dm: atmel: Add driver model support for the ehci driver

2016-08-15 Thread Marek Vasut
On 08/15/2016 10:50 PM, Andreas Bießmann wrote:
> Hi Marek,
> 
> On 15.08.16 22:25, Marek Vasut wrote:
>> On 08/15/2016 10:16 PM, Andreas Bießmann wrote:
>>> Dear Wenyou Yang,
>>>
>>> Wenyou Yang  writes:
 Add driver model support while retaining the existing legacy code.
 This allows the driver to support boards that have converted to
 driver model as well as those that have not.

 Signed-off-by: Wenyou Yang 
 Acked-by: Simon Glass 
 ---

 Changes in v3:
 - Change clk_client.h -> clk.h to adapt to clk API conversion.

 Changes in v2:
 - Collect Acked-by tag.
 - Update the clk API based on [PATCH] clk: convert API to match
   reset/mailbox fstyle (http://patchwork.ozlabs.org/patch/625342/).

 drivers/usb/host/Kconfig  |   7 +++
 drivers/usb/host/ehci-atmel.c | 116 
 ++
 2 files changed, 123 insertions(+)
>>>
>>> applied to u-boot-atmel/master, thanks!
>>>
>>> Best regards,
>>> Andreas Bießmann
>>>
>> Wasn't this droppped because of some build issues ? See the USB PR mail.
>>
> 
> Sorry, haven't seen that PR.
> This patch depends on 'clk: at91: Add clock driver' (9e5935c in
> u-boot-atmel/master).
> No build error for arm nor avr32 here (also depends on
> http://patchwork.ozlabs.org/patch/659378/; currently not on
> u-boot-atmel/master).

Oh right, the clock driver. If it builds now, that's great :)
Thanks for picking it up.

-- 
Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] test.py and tftp crc32 test?

2016-08-15 Thread Tom Rini
Hey guys,

Is anyone else running the crc32 tftp tests with test.py?  I'm trying to
do it locally but even with a 2MiB file it looks like somehow the crc32
is never captured in the output.  I've already made sure that the crc32
value is in lowercase to match the U-Boot output and running the test
steps in console gives me the expected output.  And the rest of the
network tests pass, any ideas?  Thanks!

-- 
Tom


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


  1   2   >