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

2016-08-15 Thread Alexander Graf


> Am 16.08.2016 um 05:30 schrieb Stephen Warren :
> 
>> On 08/15/2016 09:48 AM, Alexander Graf wrote:
>> 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.
> 
> Acked-by: Stephen Warren 
> 
> Nits:
> 
> I'd hope for a core DM feature to disable statically created devices rather 
> than re-implementing it per driver, so we don't have to re-invent this each 
> time we need it. Still, we can refactor this later if it turns out to be more 
> generally useful.
> 
> Perhaps a separate patch for the raw serial driver feature 
> (serial_bcm283x_mu.h, serial_bcm283x_mu.c), and the board-specific logic (all 
> the other files)?

I was thinking about it, but figured that these two lines of code are so 
heavily intertwined with the fact that you want to actually set the disabled 
property. So I decided against splitting them out - it wouldn't benefit 
readability, bisectability or revertability (which are the usual reasons for 
splitting patches).


Alex


___
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 John Tobias
Hi Łukasz Majewski,


On Mon, Aug 15, 2016 at 6:17 AM, Lukasz Majewski  wrote:
> 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?

Yes, that is correct.

>
>> How did you fix it?.
>
> (For now) no solution... I need to investigate this issue.
>

Btw, problem happened in iMX6 processor.


>>
>> Regards,
>>
>> John
>
> Best regards,
> Łukasz Majewski
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


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

2016-08-15 Thread Heiko Schocher

Hello Stephen,

Am 16.08.2016 um 05:35 schrieb Stephen Warren:

On 08/15/2016 05:20 PM, Tom Rini wrote:

On Mon, Aug 15, 2016 at 04:59:02PM -0600, Stephen Warren wrote:

On 08/15/2016 04:49 PM, Tom Rini wrote:

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!


I'm not certain that anyone other than myself is running test.py on
real HW (vs. sandbox where it's trivial).

If you look at test-log.html it should show what U-Boot outputs on
the console, and where any error was detected in the test.
Alternativeluy, add "-s" to the invocation and U-Boot output should
show up on stdout while the tests are running. What's the error
reported there; just a timeout waiting for the CRC? Here's an
example of what test_net_tftpboot looks like for me:


Tegra210 (P2371-2180) # tftpboot 8000 ubtest-readable.bin
Using eth_rtl8169 device
TFTP from server 10.20.204.51; our IP address is 10.20.204.52
Filename 'ubtest-readable.bin'.
Load address: 0x8000
Loading: *%08#
 #
 #
 #
 #
 
 2.9 MiB/s
done
Bytes transferred = 5058624 (4d3040 hex)
Tegra210 (P2371-2180) # crc32 8000 $filesize
crc32 for 8000 ... 804d303f ==> c2244b26
Tegra210 (P2371-2180) #


In the past, I have seen tests pass when run manually but not under
test.py, e.g. due to heap fragmentation, state, or corrupted memory
due to earlier tests, which weren't run in the manual case. Might
that be the issue?


Adding in -s this is part of what I see:

=> .s=> ping $serverip
Waiting for Ethernet connection... done.
Using sms0 device
host 192.168.0.3 is alive
=> .=> tftpboot 8000 1MiBtest.bin
Waiting for Ethernet connection... done.
Using sms0 device
TFTP from server 192.168.0.3; our IP address is 192.168.0.140
Filename '1MiBtest.bin'.
Load address: 0x8000
Loading: #
 #
 #
 ##
 171.9 KiB/s
done
Bytes transferred = 1048576 (10 hex)
=> crc32 8000 $filesize
CRC32 for 8000 ... 800f ==> F2fa737e0
=>

For some reason there's an extra 'F' at the start of the crc32 output.
Looking at it in the html file, it looks all correct there.  In the
output from test.py the captured stdout end just before the CRC32 value
would be.  I've tried larger test binaries and get the same output so
I'd assume if there was some heap corruption or similar, I'd not tickle
it with bigger files too (2MiB, 4MiB and I think even 8MiB are small
enough to be downloaded in the time the test allows).  Thanks!


The "F" is coming from the test infrastructure, not U-Boot's output. A 
character is printed per
test, such as "." for pass, "s" for skip, and "F" for fail. For some reason, 
the test is seeing a
failure before it's read the output from the crc32 command.

Ah, I see the issue now: the command prompt (=>) in use is part of the output 
from the crc32
command, so the test infra-structure thinks the ==> printed by crc32 is the end 
of the crc32 output.
Perhaps test.py should look for "[\r\n]${prompt}" rather than "${prompt}", or 
this board could have
a prompt that's slightly less likely to trigger false matches.


Argh, yes, I had the same problem and added an "ignore list" to
tbot, see:
https://github.com/hsdenx/tbot/blob/master/src/common/tbot_connection_paramiko.py#L39

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


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

2016-08-15 Thread Heiko Schocher

Hello Stephen,

Am 16.08.2016 um 00:59 schrieb Stephen Warren:

On 08/15/2016 04:49 PM, Tom Rini wrote:

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!


I'm not certain that anyone other than myself is running test.py on real HW 
(vs. sandbox where it's
trivial).


I run it on real hw, as I start test.py from tbot on at91, am335x and imx6
based boards ...
(Ok, I had to admit that I did not found time since my vacation to look,
 why my cyclic automated tests with buildbot not work ...) but for an older
example:
http://xeidos.ddns.net/tests/test_db_auslesen.php#60
(may slow as tbot and this webserver runs on a raspberry pi)

and click on "test py result" to see test.py output ...

But sorry, yes, I did not run the crc32 tftp tests ...

bye,
Heiko

If you look at test-log.html it should show what U-Boot outputs on the console, 
and where any error
was detected in the test. Alternativeluy, add "-s" to the invocation and U-Boot 
output should show
up on stdout while the tests are running. What's the error reported there; just 
a timeout waiting
for the CRC? Here's an example of what test_net_tftpboot looks like for me:


Tegra210 (P2371-2180) # tftpboot 8000 ubtest-readable.bin
Using eth_rtl8169 device
TFTP from server 10.20.204.51; our IP address is 10.20.204.52
Filename 'ubtest-readable.bin'.
Load address: 0x8000
Loading: *%08#
 #
 #
 #
 #
 
 2.9 MiB/s
done
Bytes transferred = 5058624 (4d3040 hex)
Tegra210 (P2371-2180) # crc32 8000 $filesize
crc32 for 8000 ... 804d303f ==> c2244b26
Tegra210 (P2371-2180) #


In the past, I have seen tests pass when run manually but not under test.py, 
e.g. due to heap
fragmentation, state, or corrupted memory due to earlier tests, which weren't 
run in the manual
case. Might that be the issue?
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot



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


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

2016-08-15 Thread Heiko Schocher

Hello Simon, Stefan,

Am 16.08.2016 um 06:50 schrieb Simon Glass:

Hi Stefan,

On 15 August 2016 at 04:02, Stefan Roese  wrote:

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?


Yes I suppose a flag is the best idea. You should be able to add one
to the existing flags. Then it can be configured from the device or
via the command line 'i2c flags'.


Yes, an "i2c flag" seems a good solution.

Hmm.. thinking about it ...

May we need such a functionality like in linux:/include/uapi/linux/i2c.h
I2C_FUNC_* and i2c_check_functionality() ?

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


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

2016-08-15 Thread Simon Glass
On 15 August 2016 at 21:30, Stephen Warren  wrote:
>
> On 08/15/2016 09:48 AM, Alexander Graf wrote:
>>
>> 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.
>
>
> Acked-by: Stephen Warren 
>
> Nits:
>
> I'd hope for a core DM feature to disable statically created devices rather 
> than re-implementing it per driver, so we don't have to re-invent this each 
> time we need it. Still, we can refactor this later if it turns out to be more 
> generally useful.
>

Agreed - yes let's wait until we have another case or two.

Reviewed-by: Simon Glass 

> Perhaps a separate patch for the raw serial driver feature 
> (serial_bcm283x_mu.h, serial_bcm283x_mu.c), and the board-specific logic (all 
> the other files)?

- Simon
___
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 Simon Glass
On 15 August 2016 at 13:04, 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---
>
> Signed-off-by: Andreas Bießmann 
> ---
>
>  include/clk.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Simon Glass 
___
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 Simon Glass
Hi Stefan,

On 15 August 2016 at 04:02, Stefan Roese  wrote:
> 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?

Yes I suppose a flag is the best idea. You should be able to add one
to the existing flags. Then it can be configured from the device or
via the command line 'i2c flags'.

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


Re: [U-Boot] [PATCH 5/5] rk3288: add arch_cpu_init for rk3288

2016-08-15 Thread Simon Glass
On 12 August 2016 at 03:58, Kever Yang  wrote:
>
> We do some SoC level one time setting initialization in
> arch_cpu_init.
>
> Signed-off-by: Kever Yang 
> ---
>
>  arch/arm/mach-rockchip/rk3288/Makefile |  1 +
>  arch/arm/mach-rockchip/rk3288/rk3288.c | 19 +++
>  2 files changed, 20 insertions(+)
>  create mode 100644 arch/arm/mach-rockchip/rk3288/rk3288.c


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


[U-Boot] Please pull u-boot-x86

2016-08-15 Thread Bin Meng
Hi Tom,

The following changes since commit 4cc9699be7ffc6072482240f5ba208488abe1090:

  common: env_nand: Ensure that we have nand_info[0] prior to use
(2016-08-15 18:46:41 -0400)

are available in the git repository at:

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

for you to fetch changes up to 27daffe7cec26ec1462245e4e15c36d19d886221:

  x86: Add theadorable-x86-dfi-bt700 board support (2016-08-16 11:44:09 +0800)


Bin Meng (1):
  x86: bayleybay: Add PS/2 keyboard and mouse to ASL file

George McCollister (1):
  x86: som-db5800-som-6867: fix SERIRQ on reset

Simon Glass (5):
  x86: Mention how to boot a 64-bit kernel from U-Boot
  x86: Add a reference to README.efi
  x86: Mention running U-Boot in 64-bit mode in the README
  bdinfo: Don't print out empty DRAM banks
  x86: bdinfo: Drop meaningless values

Stefan Roese (9):
  x86: conga-qeval20-qa3: Add missing MAINTERNERS entry
  x86: doc: Add note about the debug FSP usage on BayTrail
  x86: cache.h: Add default for CONFIG_SYS_CACHELINE_SIZE
  x86: baytrail: Add SIO HS-UART clock setup
  misc: Add simple driver for some Nuvoton NCT6102D devices
  i2c: intel_i2c: SMBus driver PCI addition (e.g. BayTrail)
  x86: conga-qeval20-qa3: Add SMBus support and SMSC2513 config code
  x86: Add DFI BT700 BayTrail board support
  x86: Add theadorable-x86-dfi-bt700 board support

Yaroslav K (1):
  cbfs: Fix incorrect CBFS file header size being used

 arch/x86/Kconfig   |   4 ++
 arch/x86/cpu/baytrail/cpu.c|  48 +
 arch/x86/dts/Makefile  |   2 +
 arch/x86/dts/baytrail_som-db5800-som-6867.dts  |   6 ++
 arch/x86/dts/conga-qeval20-qa3-e3845.dts   |  18 +++--
 arch/x86/dts/dfi-bt700-q7x-151.dts |  22 ++
 arch/x86/dts/dfi-bt700.dtsi| 308
+++
 arch/x86/dts/theadorable-x86-dfi-bt700.dts |  21 ++
 arch/x86/include/asm/arch-ivybridge/pch.h  |  26 ---
 arch/x86/include/asm/cache.h   |   8 +--
 board/congatec/conga-qeval20-qa3-e3845/MAINTAINERS |   1 +
 board/congatec/conga-qeval20-qa3-e3845/conga-qeval20-qa3.c |  40 +++
 board/dfi/Kconfig  |  29 
 board/dfi/dfi-bt700/Kconfig|  28 
 board/dfi/dfi-bt700/MAINTAINERS|  10 +++
 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 +++
 board/intel/bayleybay/acpi/mainboard.asl   |  38 +++
 cmd/bdinfo.c   |  18 ++---
 configs/conga-qeval20-qa3-e3845-internal-uart_defconfig|   3 +
 configs/conga-qeval20-qa3-e3845_defconfig  |   3 +
 configs/dfi-bt700-q7x-151_defconfig|  63
+
 configs/theadorable-x86-dfi-bt700_defconfig|  60

 doc/README.x86 |  33 +
 doc/uImage.FIT/kernel.its  |   4 ++
 doc/uImage.FIT/x86-fit-boot.txt|  14 ++--
 drivers/i2c/intel_i2c.c| 290
--
 drivers/misc/Kconfig   |   8 +++
 drivers/misc/Makefile  |   1 +
 drivers/misc/nuvoton_nct6102d.c|  56
+++
 fs/cbfs/cbfs.c |   8 +--
 include/configs/conga-qeval20-qa3-e3845.h  |  12 ++--
 include/configs/dfi-bt700.h|  74

 include/nuvoton_nct6102d.h |  34 ++
 37 files changed, 1275 insertions(+), 89 deletions(-)
 create mode 100644 arch/x86/dts/dfi-bt700-q7x-151.dts
 create mode 100644 arch/x86/dts/dfi-bt700.dtsi
 create mode 100644 arch/x86/dts/theadorable-x86-dfi-bt700.dts
 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/df

Re: [U-Boot] [PATCH 0/5] ARM: Enable CMD_TIME on all TI platforms

2016-08-15 Thread Lokesh Vutla


On Thursday 11 August 2016 07:01 PM, Tom Rini wrote:
> On Thu, Aug 11, 2016 at 06:39:12PM +0530, Lokesh Vutla wrote:
> 
>> This series enables CMD_TIME on all TI platforms.
>>
>> Lokesh Vutla (5):
>>   configs: am335x: Enable CMD_TIME
>>   configs: am43xx: Enable CMD_TIME
>>   configs: am57xx: Enable CMD_TIME
>>   configs: dra7xx: Enable CMD_TIME
>>   configs: ks2: Enable CMD_TIME
>>
>>  configs/am335x_boneblack_defconfig| 1 +
>>  configs/am335x_evm_defconfig  | 1 +
>>  configs/am335x_evm_nor_defconfig  | 1 +
>>  configs/am335x_evm_norboot_defconfig  | 1 +
>>  configs/am335x_evm_spiboot_defconfig  | 1 +
>>  configs/am335x_evm_usbspl_defconfig   | 1 +
>>  configs/am43xx_evm_defconfig  | 1 +
>>  configs/am43xx_evm_ethboot_defconfig  | 1 +
>>  configs/am43xx_evm_qspiboot_defconfig | 1 +
>>  configs/am43xx_evm_usbhost_boot_defconfig | 1 +
>>  configs/am43xx_hs_evm_defconfig   | 1 +
>>  configs/am57xx_evm_defconfig  | 1 +
>>  configs/am57xx_hs_evm_defconfig   | 1 +
>>  configs/dra7xx_evm_defconfig  | 1 +
>>  configs/dra7xx_hs_evm_defconfig   | 1 +
>>  configs/k2e_evm_defconfig | 1 +
>>  configs/k2g_evm_defconfig | 1 +
>>  configs/k2hk_evm_defconfig| 1 +
>>  configs/k2l_evm_defconfig | 1 +
>>  19 files changed, 19 insertions(+)
> 
> This would have been a 1 line change to
> include/configs/ti_armv7_common.h and is now 19 files and 19 lines, so a

IIRC, this solution was rejected as CMD_TIME has Kconfig and has to be
enabled in defconfig.

> step backwards.  Further, this isn't a SoC thing, it's a TI eval
> platform consistency (and I imagine testing) thing.  I think it's time
> to look at adding in board/ti/Kconfig (and other vendors too given the
> existing include/configs/*common* files) for style things that don't
> belong in arch/arm/cpu/armv7/omap-common/Kconfig (which needs to get
> moved to arch/arm/mach-omap to match other platforms, yes) in this case.
> 
> The first patch to introduce board/ti/Kconfig will be "big" as the
> board/ti/*/Kconfig will need to bring it in but follow up migration of
> stuff out of include/configs/ti_*common.h will be smaller.

Okay, ill work on this.

Thanks and regards,
Lokesh

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


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

2016-08-15 Thread Bin Meng
On Mon, Aug 15, 2016 at 7:50 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 
> ---
> 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
>

applied to u-boot-x86, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


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

2016-08-15 Thread Bin Meng
On Mon, Aug 15, 2016 at 7:50 PM, Stefan Roese  wrote:
> 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
>

applied to u-boot-x86, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


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

2016-08-15 Thread Stephen Warren

On 08/15/2016 05:20 PM, Tom Rini wrote:

On Mon, Aug 15, 2016 at 04:59:02PM -0600, Stephen Warren wrote:

On 08/15/2016 04:49 PM, Tom Rini wrote:

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!


I'm not certain that anyone other than myself is running test.py on
real HW (vs. sandbox where it's trivial).

If you look at test-log.html it should show what U-Boot outputs on
the console, and where any error was detected in the test.
Alternativeluy, add "-s" to the invocation and U-Boot output should
show up on stdout while the tests are running. What's the error
reported there; just a timeout waiting for the CRC? Here's an
example of what test_net_tftpboot looks like for me:


Tegra210 (P2371-2180) # tftpboot 8000 ubtest-readable.bin
Using eth_rtl8169 device
TFTP from server 10.20.204.51; our IP address is 10.20.204.52
Filename 'ubtest-readable.bin'.
Load address: 0x8000
Loading: *%08#
 #
 #
 #
 #
 
 2.9 MiB/s
done
Bytes transferred = 5058624 (4d3040 hex)
Tegra210 (P2371-2180) # crc32 8000 $filesize
crc32 for 8000 ... 804d303f ==> c2244b26
Tegra210 (P2371-2180) #


In the past, I have seen tests pass when run manually but not under
test.py, e.g. due to heap fragmentation, state, or corrupted memory
due to earlier tests, which weren't run in the manual case. Might
that be the issue?


Adding in -s this is part of what I see:

=> .s=> ping $serverip
Waiting for Ethernet connection... done.
Using sms0 device
host 192.168.0.3 is alive
=> .=> tftpboot 8000 1MiBtest.bin
Waiting for Ethernet connection... done.
Using sms0 device
TFTP from server 192.168.0.3; our IP address is 192.168.0.140
Filename '1MiBtest.bin'.
Load address: 0x8000
Loading: #
 #
 #
 ##
 171.9 KiB/s
done
Bytes transferred = 1048576 (10 hex)
=> crc32 8000 $filesize
CRC32 for 8000 ... 800f ==> F2fa737e0
=>

For some reason there's an extra 'F' at the start of the crc32 output.
Looking at it in the html file, it looks all correct there.  In the
output from test.py the captured stdout end just before the CRC32 value
would be.  I've tried larger test binaries and get the same output so
I'd assume if there was some heap corruption or similar, I'd not tickle
it with bigger files too (2MiB, 4MiB and I think even 8MiB are small
enough to be downloaded in the time the test allows).  Thanks!


The "F" is coming from the test infrastructure, not U-Boot's output. A 
character is printed per test, such as "." for pass, "s" for skip, and 
"F" for fail. For some reason, the test is seeing a failure before it's 
read the output from the crc32 command.


Ah, I see the issue now: the command prompt (=>) in use is part of the 
output from the crc32 command, so the test infra-structure thinks the 
==> printed by crc32 is the end of the crc32 output. Perhaps test.py 
should look for "[\r\n]${prompt}" rather than "${prompt}", or this board 
could have a prompt that's slightly less likely to trigger false matches.

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


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

2016-08-15 Thread Bin Meng
On Tue, Aug 16, 2016 at 11:31 AM, Bin Meng  wrote:
> On Mon, Aug 15, 2016 at 7:51 PM, Stefan Roese  wrote:
>> 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(+)
>>
>
> Reviewed-by: Bin Meng 

applied to u-boot-x86, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


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

2016-08-15 Thread Bin Meng
On Mon, Aug 15, 2016 at 7:51 PM, Stefan Roese  wrote:
> 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(+)
>

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


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

2016-08-15 Thread Stephen Warren

On 08/15/2016 09:48 AM, Alexander Graf wrote:

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.


Acked-by: Stephen Warren 

Nits:

I'd hope for a core DM feature to disable statically created devices 
rather than re-implementing it per driver, so we don't have to re-invent 
this each time we need it. Still, we can refactor this later if it turns 
out to be more generally useful.


Perhaps a separate patch for the raw serial driver feature 
(serial_bcm283x_mu.h, serial_bcm283x_mu.c), and the board-specific logic 
(all the other files)?

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


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

2016-08-15 Thread Yunhui Cui

On August 15, 2016 4:02 PM, Jagan Teki Wrote:
> 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.

[Yunhui] the spansion s25fs-s family cannot share the existing lock code, 
because it need some specific operations through SR1NV.thanks

> 
> --
> 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 v3 00/27] spi/sf: Updates on flash detection

2016-08-15 Thread Jagan Teki
Hi Bin,

On 16 August 2016 at 06:55, Bin Meng  wrote:
> Hi Jagan,
>
> On Mon, Aug 15, 2016 at 6:09 PM, Jagan Teki  wrote:
>> 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?
>>
>
> I am not sure why you can't run buildman yourself. You are the
> u-boot-spi maintainer and you need make sure every commit builds
> without any warnings or errors. Anyway, here are some logs:

Thanks for running buildman, Since I've an issue on my host with
overheating issues, I couldn't able to run buildman - reported the
same on previous mail. Anyway I will run it from my end once host
fixed.

thanks!
-- 
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] [U-Boot, v4, 01/13] cmd: fdt: Narrow the check for fdt addr

2016-08-15 Thread Tom Rini
On Tue, Aug 16, 2016 at 10:52:04AM +0900, Jaehoon Chung wrote:
> Hi,
> 
> On 07/05/2016 05:26 PM, Maxime Ripard wrote:
> > The current code only checks if the fdt subcommand is fdt addr by checking
> > whether it starts with 'a'.
> > 
> > Since this is a pretty widely used letter, narrow down that check a bit.
> > 
> > Acked-by: Simon Glass 
> > Acked-by: Pantelis Antoniou 
> > Signed-off-by: Maxime Ripard 
> 
> I don't know what these patchset were delegated to me..I think it's not my 
> scope.
> Simon is FDT maintainer..Could you check these patch-set?

Ah whoops, that would be me.  I assigned Pantelis some FDT stuff in
patchwork too, but I bulk changed it all over to you, sorry!

-- 
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] [U-Boot, v4, 01/13] cmd: fdt: Narrow the check for fdt addr

2016-08-15 Thread Jaehoon Chung
Hi,

On 07/05/2016 05:26 PM, Maxime Ripard wrote:
> The current code only checks if the fdt subcommand is fdt addr by checking
> whether it starts with 'a'.
> 
> Since this is a pretty widely used letter, narrow down that check a bit.
> 
> Acked-by: Simon Glass 
> Acked-by: Pantelis Antoniou 
> Signed-off-by: Maxime Ripard 

I don't know what these patchset were delegated to me..I think it's not my 
scope.
Simon is FDT maintainer..Could you check these patch-set?

Best Regards,
Jaehoon Chung

> ---
>  cmd/fdt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/cmd/fdt.c b/cmd/fdt.c
> index 898217ffe5f8..0f5923e75a41 100644
> --- a/cmd/fdt.c
> +++ b/cmd/fdt.c
> @@ -87,7 +87,7 @@ static int do_fdt(cmd_tbl_t *cmdtp, int flag, int argc, 
> char * const argv[])
>   /*
>* Set the address of the fdt
>*/
> - if (argv[1][0] == 'a') {
> + if (strncmp(argv[1], "ad", 2) == 0) {
>   unsigned long addr;
>   int control = 0;
>   struct fdt_header *blob;
> 

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


[U-Boot] [PATCH] Please pull u-boot-mmc

2016-08-15 Thread Jaehoon Chung
Dear Tom,

Sorry for confusing..Could you pull these patches on u-boot/master?
If there are other problems, let me know, plz.

Rebased on latest u-boot/master. (Wenyou's patches was applied on u-boot-atmel.)
Sorry for late..

Best Regards,
Jaehoon Chung

The following changes since commit 4cc9699be7ffc6072482240f5ba208488abe1090:

  common: env_nand: Ensure that we have nand_info[0] prior to use (2016-08-15 
18:46:41 -0400)

are available in the git repository at:

  http://git.denx.de/u-boot-mmc.git master

for you to fetch changes up to 177381a9f9e956353deaa56d86bec47e02995ff3:

  mmc: mmc_legacy: fix the compiler error with disabled CONFIG_DM_MMC_OPS 
(2016-08-16 10:27:24 +0900)


Jaehoon Chung (1):
  mmc: mmc_legacy: fix the compiler error with disabled CONFIG_DM_MMC_OPS

Sekhar Nori (4):
  drivers: mmc: omap_hsmmc: fix build breakage
  ARM: dts: K2G: Add support for MMC controller
  ARM: dts: k2g-evm: enable mmc/sd suppport
  defconfig: k2g_evm_defconfig: Enable mmc driver model

Yangbo Lu (1):
  mmc: send CMD0 before CMD1 for some MMC cards

 arch/arm/dts/k2g-evm.dts  |  8 
 arch/arm/dts/k2g.dtsi | 23 +++
 configs/k2g_evm_defconfig |  1 +
 drivers/mmc/mmc.c |  3 +++
 drivers/mmc/mmc_legacy.c  |  9 +++--
 drivers/mmc/omap_hsmmc.c  |  2 ++
 6 files changed, 44 insertions(+), 2 deletions(-)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V2] mmc: mmc_legacy: fix the compiler error with disabled CONFIG_DM_MMC_OPS

2016-08-15 Thread Jaehoon Chung
Hi,

On 08/13/2016 02:20 AM, Simon Glass wrote:
> On 11 August 2016 at 20:39, Jaehoon Chung  wrote:
>> To prevent the compiler error, split the checking condition whether
>> cfg->ops is NULL or not.
>> It's more clearly, because it's not included in mmc_config structure
>> when CONFIG_DM_MMC_OPS is disabled.
>>
>> drivers/mmc/mmc_legacy.c: In function ‘mmc_create’:
>> drivers/mmc/mmc_legacy.c:118:31: error: ‘const struct mmc_config’ has no 
>> member named ‘ops’
>> drivers/mmc/mmc_legacy.c:118:58: error: ‘const struct mmc_config’ has no 
>> member named ‘ops’
>> make[1]: *** [drivers/mmc/mmc_legacy.o] Error 1
>>
>> Signed-off-by: Jaehoon Chung 
>> ---
>> Changes for V2:
>> - Fixed the wrong condition checking
>>
>>  drivers/mmc/mmc_legacy.c | 9 +++--
>>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> Reviewed-by: Simon Glass 

Applied on u-boot-mmc. Thanks!

Best Regards,
Jaehoon Chung

> 
> 
> 

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


Re: [U-Boot] [v2] mmc: send CMD0 before CMD1 for some MMC cards

2016-08-15 Thread Jaehoon Chung
Hi Yangbo,

On 08/09/2016 08:06 AM, Jaehoon Chung wrote:
> Hi Yangbo,
> 
> On 08/02/2016 04:33 PM, Yangbo Lu wrote:
>> When the MMC framework was added in u-boot, the mmc_go_idle was
>> added before mmc_send_op_cond_iter in function mmc_send_op_cond
>> annotating that some cards seemed to need this. Actually, we still
>> need to do this in function mmc_complete_op_cond for those cards.
>> This has been verified on Micron MTFC4GACAECN eMMC chip.
> 
> This patch is not bad.. but i need to verify more about entire sequence.
> Could you wait a bit?

Applied on u-boot-mmc. Thanks!

Best Regards,
Jaehoon Chung

> 
> Best Regards,
> Jaehoon Chung
> 
>>
>> Signed-off-by: Yangbo Lu 
>> ---
>>  drivers/mmc/mmc.c | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
>> index f8e5f7a..d4e96bc 100644
>> --- a/drivers/mmc/mmc.c
>> +++ b/drivers/mmc/mmc.c
>> @@ -422,6 +422,9 @@ static int mmc_complete_op_cond(struct mmc *mmc)
>>  
>>  mmc->op_cond_pending = 0;
>>  if (!(mmc->ocr & OCR_BUSY)) {
>> +/* Some cards seem to need this */
>> +mmc_go_idle(mmc);
>> +
>>  start = get_timer(0);
>>  while (1) {
>>  err = mmc_send_op_cond_iter(mmc, 1);
>>
> 
> ___
> 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


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

2016-08-15 Thread Bin Meng
Hi Jagan,

On Mon, Aug 15, 2016 at 6:09 PM, Jagan Teki  wrote:
> 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?
>

I am not sure why you can't run buildman yourself. You are the
u-boot-spi maintainer and you need make sure every commit builds
without any warnings or errors. Anyway, here are some logs:

+../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

+  ext_jedec = idcode[3] << 8 | idcode[4];
+  if (idcode[0] == SPI_FLASH_CFI_MFR_ATMEL ||
+ ^
+  jedec = idcode[1] << 8 | idcode[2];
+^
+^
+   ^
+../drivers/mtd/spi/spi_flash.c: In function ‘spi_flash_scan’:
+../drivers/mtd/spi/spi_flash.c:1088: warning: ‘idcode[0]’ may be used
uninitialized in this function
+../drivers/mtd/spi/spi_flash.c:1049: warning: ‘idcode[4]’ may be used
uninitialized in this function
+../drivers/mtd/spi/spi_flash.c:1049: warning: ‘idcode[3]’ may be used
uninitialized in this function
+../drivers/mtd/spi/spi_flash.c:1048: warning: ‘idcode[2]’ may be used
uninitialized in this function
+../drivers/mtd/spi/spi_flash.c:1048: warning: ‘idcode[1]’ may be used
uninitialized in this function
+../drivers/mtd/spi/spi_flash.c:1042: warning: ‘ret’ may be used
uninitialized in this function
+  int ret;
+  ^
+../drivers/mtd/spi/spi_flash.c: In function 'spi_flash_scan':
+../drivers/mtd/spi/spi_flash.c:1088: warning: 'idcode[0]' is used
uninitialized in this function
+../drivers/mtd/spi/spi_flash.c:1049: warning: 'idcode[4]' is used
uninitialized in this function
+../drivers/mtd/spi/spi_flash.c:1049: warning: 'idcode[3]' is used
uninitialized in this function
+../drivers/mtd/spi/spi_flash.c:1048: warning: 'idcode[2]' is used
uninitialized in this function
+../drivers/mtd/spi/spi_flash.c:1048: warning: 'idcode[1]' is used
uninitialized in this function
+../drivers/mtd/spi/spi_flash.c:1042: warning: 'ret' may be used
uninitialized in this function

w+../drivers/mtd/spi/spi_flash.c:1043:13: warning: variable
'ext_jedec' set but not used [-Wunused-but-set-variable]
w+../drivers/mtd/spi/spi_flash.c:1043:6: warning: variable 'jedec' set
but not used [-Wunused-but-set-variable]
w+../drivers/mtd/spi/spi_flash.c:1045:6: warning: 'ret' may be used
uninitialized in this function [-Wmaybe-uninitialized]

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


Re: [U-Boot] [PATCH] Please pull u-boot-mmc

2016-08-15 Thread Jaehoon Chung
Hi All,

On 08/12/2016 09:56 PM, Andreas Bießmann wrote:
> On 2016-08-12 14:48, Tom Rini wrote:
>> On Fri, Aug 12, 2016 at 02:40:12PM +0200, andr...@biessmann.de wrote:
>>> On 2016-08-12 14:04, Tom Rini wrote:
>>> >On Fri, Aug 12, 2016 at 04:34:01PM +0900, Jaehoon Chung wrote:
>>> >
>>> >>Dear Tom,
>>> >>
>>> >>Here is the mmc updates.
>>> >>- Supports the Driver model for atmel_sdhci.
>>> >>- Fixed the build error for omap_hsmmc.
>>> >>
>>> >>Could you pull these patch to u-boot/master?
>>> >>
>>> >>Best Regards,
>>> >>Jaehoon Chung
>>> >>
>>> >>The following changes since commit
>>> >>28cd88baa3f11cdb52be3b6d0610dcf32c60871a:
>>> >>
>>> >>  Merge branch 'master' of git://git.denx.de/u-boot-uniphier
>>> >>(2016-08-11 10:45:53 -0400)
>>> >>
>>> >>are available in the git repository at:
>>> >>
>>> >>
>>> >>  http://git.denx.de/u-boot-mmc.git master
>>> >>
>>> >>for you to fetch changes up to
>>> >>761326b33f1a14b19c0a4f7e8c336f8ed153d00c:
>>> >>
>>> >>  defconfig: k2g_evm_defconfig: Enable mmc driver model
>>> >>(2016-08-12 16:23:07 +0900)
>>> >>
>>> >>
>>> >>Sekhar Nori (4):
>>> >>  drivers: mmc: omap_hsmmc: fix build breakage
>>> >>  ARM: dts: K2G: Add support for MMC controller
>>> >>  ARM: dts: k2g-evm: enable mmc/sd suppport
>>> >>  defconfig: k2g_evm_defconfig: Enable mmc driver model
>>> >>
>>> >>Wenyou Yang (1):
>>> >>  mmc: atmel_sdhci: Convert to the driver model support
>>> >
>>> >NAK.  This atmel change, like the all of the others in their
>>> >series need
>>> >to come in via Andreas' tree as it's introducing a warning due to some
>>> >other patch being required:
>>> >+   sama5d2_xplained_spiflash
>>> >+(sama5d2_xplained_spiflash)  static int clk_get_by_name(struct
>>> >udevice *dev, const char *name,
>>> >+(sama5d2_xplained_spiflash) ^
>>> >w+(sama5d2_xplained_spiflash) In file included from
>>> >drivers/mmc/atmel_sdhci.c:9:0:
>>> >w+(sama5d2_xplained_spiflash) include/clk.h:107:12: warning:
>>> >'clk_get_by_name' defined but not used [-Wunused-function]
>>>
>>> Sorry, I had no time to prepare a pull request early enough for rc1.
>>> I'll have a look for outstanding patches next few days and could
>>> also grab this one.
>>
>> Thanks!  Note that Wenyou has a number of patches along these lines and
>> they're delegated to various people in patchwork, but please just grab
>> them all (unless someone nak'd them of course) once you've also found
>> the one that makes us also not have that warning :)
> 
> I think I know the right one (clk framework rework, ack'ed by at least 
> simon). I will have prepared it by end of this weekend.

Well..Then Could Andreas also pick Wenyou's patch "atmel_sdhci: Convert to the 
driver model support"?
Otherwise, I will wait for your PR. I want to know best the way how i do.

Could you give me your suggestions?

I think good that Andreas will pick the Wenyou's patch..So i will rebase 
without Wenyou's patch.

Best Regards,
Jaehoon Chung

> 
> Andreas
> 
> 
> 

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


Re: [U-Boot] [U-Boot, v3] 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 01:02:15PM -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 
> Acked-by: Scott Wood 

Applied to u-boot/master, 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] [U-Boot, v4, 6/6] xtensa: add support for the 'xtfpga' evaluation board

2016-08-15 Thread Tom Rini
On Wed, Aug 10, 2016 at 06:36:48PM +0300, Max Filippov wrote:

> From: Chris Zankel 
> 
> The 'xtfpga' board is actually a set of FPGA evaluation boards that
> can be configured to run an Xtensa processor.
> 
>  - Avnet Xilinx LX60
>  - Avnet Xilinx LX110
>  - Avnet Xilinx LX200
>  - Xilinx ML605
>  - Xilinx KC705
> 
> These boards share the same components (open-ethernet, ns16550 serial,
> lcd display, flash, etc.).
> 
> Signed-off-by: Chris Zankel 
> Signed-off-by: Max Filippov 
> Reviewed-by: Simon Glass 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, 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] [U-Boot, RFC:, v2] tools/env: ensure environment starts at erase block boundary

2016-08-15 Thread Tom Rini
On Thu, Aug 11, 2016 at 09:39:17PM +0200, Andreas Fenkart wrote:

> 56086921 added support for unaligned environments access.
> U-boot itself does not support this:
> - env_nand.c fails when using an unaligned offset. It produces an
>   error in nand_erase_opts{drivers/mtd/nand/nand_util.c}
> - in env_sf/env_flash the unused space at the end is preserved, but
>   not in the beginning. block alignment is assumed
> - env_sata/env_mmc aligns offset/length to the block size of the
>   underlying device. data is silently redirected to the beginning of
>   a block
> 
> There is seems no use case for unaligned environment. If there is
> some useful data at the beginning of the the block (e.g. end of u-boot)
> that would be very unsafe. If the redundant environments are hosted by
> the same erase block then that invalidates the idea of double buffering.
> It might be that unaligned access was allowed in the past, and that
> people with legacy u-boot are trapped. But at the time of 56086921
> it wasn't supported and due to reasons above I guess it was never
> introduced.
> I prefer to remove that (unused) feature in favor of simplicity
> 
> Signed-off-by: Andreas Fenkart 
> Acked-by: Stefan Agner 

Applied to u-boot/master, 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] [U-Boot, v4, 4/6] xtensa: add core information for the dc233c processor

2016-08-15 Thread Tom Rini
On Wed, Aug 10, 2016 at 06:36:46PM +0300, Max Filippov wrote:

> DC233C is an xtensa processor with full MMUv3 capable of running Linux.
> Core information files are autogenerated from the processor description
> and are not meant to be edited.
> 
> Signed-off-by: Max Filippov 
> Reviewed-by: Simon Glass 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, 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] [U-Boot, v4, 5/6] xtensa: add core information for the de212 processor

2016-08-15 Thread Tom Rini
On Wed, Aug 10, 2016 at 06:36:47PM +0300, Max Filippov wrote:

> DE212 is a general purpose xtensa processor without full MMU.
> Core information files are autogenerated from the processor description
> and are not meant to be edited.
> 
> Signed-off-by: Max Filippov 
> Reviewed-by: Simon Glass 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, 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] [U-Boot, v4, 3/6] xtensa: add core information for the dc232b processor

2016-08-15 Thread Tom Rini
On Wed, Aug 10, 2016 at 06:36:45PM +0300, Max Filippov wrote:

> From: Chris Zankel 
> 
> DC232B is an xtensa processor with full MMUv2 capable of running Linux.
> Core information files are autogenerated from the processor description
> and are not meant to be edited.
> 
> Signed-off-by: Chris Zankel 
> Signed-off-by: Max Filippov 
> Reviewed-by: Simon Glass 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, 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] [U-Boot, v4, 2/6] xtensa: add support for the xtensa processor architecture [2/2]

2016-08-15 Thread Tom Rini
On Wed, Aug 10, 2016 at 06:36:44PM +0300, Max Filippov wrote:

> From: Chris Zankel 
> 
> The Xtensa processor architecture is a configurable, extensible,
> and synthesizable 32-bit RISC processor core provided by Tensilica, inc.
> 
> This is the second part of the basic architecture port, adding the
> 'arch/xtensa' directory and a readme file.
> 
> Signed-off-by: Chris Zankel 
> Signed-off-by: Max Filippov 
> Reviewed-by: Simon Glass 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, 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] [U-Boot, v4, 1/6] xtensa: add support for the xtensa processor architecture [1/2]

2016-08-15 Thread Tom Rini
On Wed, Aug 10, 2016 at 06:36:43PM +0300, Max Filippov wrote:

> From: Chris Zankel 
> 
> The Xtensa processor architecture is a configurable, extensible,
> and synthesizable 32-bit RISC processor core provided by Cadence.
> 
> This is the first part of the basic architecture port with changes to
> common files. The 'arch/xtensa' directory, and boards and additional
> drivers will be in separate commits.
> 
> Signed-off-by: Chris Zankel 
> Signed-off-by: Max Filippov 
> Reviewed-by: Simon Glass 
> Reviewed-by: Tom Rini 

Applied to u-boot/master, 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] [PULL] u-boot-atmel/master -> u-boot/master

2016-08-15 Thread Tom Rini
On Mon, Aug 15, 2016 at 11:04:24PM +0200, Andreas Bießmann wrote:

> 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)
> 

Applied to u-boot/master, 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] [U-Boot, RFC] vexpress: Check TC2 firmware support before defaulting to nonsec booting

2016-08-15 Thread Tom Rini
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 

Applied to u-boot/master, 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] Pull request, u-boot-tegra/master

2016-08-15 Thread Tom Rini
On Mon, Aug 15, 2016 at 12:38:45PM -0700, Tom Warren wrote:

> 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)
> 

Applied to u-boot/master, 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] [PATCH v2 1/2] net: davinci_emac: Round up top tx buffer boundaries for dcache ops

2016-08-15 Thread Tom Rini
On Mon, Aug 15, 2016 at 05:23:00PM +, 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 

Reviewed-by: Tom Rini 

-- 
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] Pull request: u-boot-net.git master

2016-08-15 Thread Tom Rini
On Mon, Aug 15, 2016 at 03:30:26PM -0500, 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 cc2593128f7ad1b879e9e5bd3097f6c717cf4c9a:
> 
>   net: mii: Clean up legacy glue that is not used (2016-08-15 15:29:04 -0500)
> 

Applied to u-boot/master, 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] [PULL] u-boot-atmel/master -> u-boot/master

2016-08-15 Thread Tom Rini
On Mon, Aug 15, 2016 at 11:04:24PM +0200, Andreas Bießmann wrote:

> 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)
> 

Applied to u-boot/master, 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] [PATCH v2 2/2] net: davinci_emac: Invalidate only the received portion of a buffer

2016-08-15 Thread Tom Rini
On Mon, Aug 15, 2016 at 05:23:01PM +, Karl Beldan wrote:

> ATM when receiving a packet the whole buffer is invalidated, this change
> optimizes this behaviour.
> 
> Signed-off-by: Karl Beldan 

Reviewed-by: Tom Rini 

-- 
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] [PATCH] mmc: sdhci: Add the programmable clock mode support

2016-08-15 Thread Jaehoon Chung
Hi Andreas,

On 08/15/2016 01:17 AM, Andreas Bießmann wrote:
> Dear Pantelis,
> 
> On 20.06.16 03:58, Wenyou Yang wrote:
>> Add the programmable clock mode for the clock generator.
>>
> 
> this one is delegated to me, but I think it is out of my scope. Could
> you please have a look?

I will be delegated to me. I will check this patch.

Thanks.

Best Regards,
Jaehoon Chung

> 
> Andreas
> 
>> Signed-off-by: Wenyou Yang 
>> ---
>>
>>  drivers/mmc/sdhci.c | 49 +++--
>>  include/sdhci.h | 15 +++
>>  2 files changed, 54 insertions(+), 10 deletions(-)
>>
>> diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
>> index 5c71ab8..ee6d4a1 100644
>> --- a/drivers/mmc/sdhci.c
>> +++ b/drivers/mmc/sdhci.c
>> @@ -286,7 +286,7 @@ static int sdhci_send_command(struct mmc *mmc, struct 
>> mmc_cmd *cmd,
>>  static int sdhci_set_clock(struct mmc *mmc, unsigned int clock)
>>  {
>>  struct sdhci_host *host = mmc->priv;
>> -unsigned int div, clk, timeout, reg;
>> +unsigned int div, clk = 0, timeout, reg;
>>  
>>  /* Wait max 20 ms */
>>  timeout = 200;
>> @@ -310,14 +310,35 @@ static int sdhci_set_clock(struct mmc *mmc, unsigned 
>> int clock)
>>  return 0;
>>  
>>  if (SDHCI_GET_VERSION(host) >= SDHCI_SPEC_300) {
>> -/* Version 3.00 divisors must be a multiple of 2. */
>> -if (mmc->cfg->f_max <= clock)
>> -div = 1;
>> -else {
>> -for (div = 2; div < SDHCI_MAX_DIV_SPEC_300; div += 2) {
>> -if ((mmc->cfg->f_max / div) <= clock)
>> +/*
>> + * Check if the Host Controller supports Programmable Clock
>> + * Mode.
>> + */
>> +if (host->clk_mul) {
>> +for (div = 1; div <= 1024; div++) {
>> +if ((mmc->cfg->f_max * host->clk_mul / div)
>> +<= clock)
>>  break;
>>  }
>> +
>> +/*
>> + * Set Programmable Clock Mode in the Clock
>> + * Control register.
>> + */
>> +clk = SDHCI_PROG_CLOCK_MODE;
>> +div--;
>> +} else {
>> +/* Version 3.00 divisors must be a multiple of 2. */
>> +if (mmc->cfg->f_max <= clock) {
>> +div = 1;
>> +} else {
>> +for (div = 2;
>> + div < SDHCI_MAX_DIV_SPEC_300; div += 2) {
>> +if ((mmc->cfg->f_max / div) <= clock)
>> +break;
>> +}
>> +}
>> +div >>= 1;
>>  }
>>  } else {
>>  /* Version 2.00 divisors must be a power of 2. */
>> @@ -325,13 +346,13 @@ static int sdhci_set_clock(struct mmc *mmc, unsigned 
>> int clock)
>>  if ((mmc->cfg->f_max / div) <= clock)
>>  break;
>>  }
>> +div >>= 1;
>>  }
>> -div >>= 1;
>>  
>>  if (host->set_clock)
>>  host->set_clock(host->index, div);
>>  
>> -clk = (div & SDHCI_DIV_MASK) << SDHCI_DIVIDER_SHIFT;
>> +clk |= (div & SDHCI_DIV_MASK) << SDHCI_DIVIDER_SHIFT;
>>  clk |= ((div & SDHCI_DIV_HI_MASK) >> SDHCI_DIV_MASK_LEN)
>>  << SDHCI_DIVIDER_HI_SHIFT;
>>  clk |= SDHCI_CLOCK_INT_EN;
>> @@ -480,7 +501,7 @@ static const struct mmc_ops sdhci_ops = {
>>  
>>  int add_sdhci(struct sdhci_host *host, u32 max_clk, u32 min_clk)
>>  {
>> -unsigned int caps;
>> +unsigned int caps, caps_1;
>>  
>>  host->cfg.name = host->name;
>>  host->cfg.ops = &sdhci_ops;
>> @@ -546,6 +567,14 @@ int add_sdhci(struct sdhci_host *host, u32 max_clk, u32 
>> min_clk)
>>  
>>  host->cfg.b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT;
>>  
>> +/*
>> + * In case of Host Controller v3.00, find out whether clock
>> + * multiplier is supported.
>> + */
>> +caps_1 = sdhci_readl(host, SDHCI_CAPABILITIES_1);
>> +host->clk_mul = (caps_1 & SDHCI_CLOCK_MUL_MASK) >>
>> +SDHCI_CLOCK_MUL_SHIFT;
>> +
>>  sdhci_reset(host, SDHCI_RESET_ALL);
>>  
>>  host->mmc = mmc_create(&host->cfg, host);
>> diff --git a/include/sdhci.h b/include/sdhci.h
>> index e0f6667..5abe0a2 100644
>> --- a/include/sdhci.h
>> +++ b/include/sdhci.h
>> @@ -97,6 +97,7 @@
>>  #define  SDHCI_DIV_MASK 0xFF
>>  #define  SDHCI_DIV_MASK_LEN 8
>>  #define  SDHCI_DIV_HI_MASK  0x300
>> +#define  SDHCI_PROG_CLOCK_MODE  0x0020
>>  #define  SDHCI_CLOCK_CARD_EN0x0004
>>  #define  SDHCI_CLOCK_INT_STABLE 0x0002
>>  #define  SDHCI_CLOCK_INT_EN 0x0001
>> @@ -166,6 +167,19 @@
>>  #define  SDHCI_CAN_64BIT0x1000
>>  
>>  #define SD

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

2016-08-15 Thread Kever Yang
From: 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


Re: [U-Boot] [PATCH] Please pull u-boot-mmc

2016-08-15 Thread Jaehoon Chung
Hi Tom,

On 08/12/2016 09:04 PM, Tom Rini wrote:
> On Fri, Aug 12, 2016 at 04:34:01PM +0900, Jaehoon Chung wrote:
> 
>> Dear Tom,
>>
>> Here is the mmc updates.
>> - Supports the Driver model for atmel_sdhci.
>> - Fixed the build error for omap_hsmmc.
>>
>> Could you pull these patch to u-boot/master?
>>
>> Best Regards,
>> Jaehoon Chung
>>
>> The following changes since commit 28cd88baa3f11cdb52be3b6d0610dcf32c60871a:
>>
>>   Merge branch 'master' of git://git.denx.de/u-boot-uniphier (2016-08-11 
>> 10:45:53 -0400)
>>
>> are available in the git repository at:
>>
>>
>>   http://git.denx.de/u-boot-mmc.git master
>>
>> for you to fetch changes up to 761326b33f1a14b19c0a4f7e8c336f8ed153d00c:
>>
>>   defconfig: k2g_evm_defconfig: Enable mmc driver model (2016-08-12 16:23:07 
>> +0900)
>>
>> 
>> Sekhar Nori (4):
>>   drivers: mmc: omap_hsmmc: fix build breakage
>>   ARM: dts: K2G: Add support for MMC controller
>>   ARM: dts: k2g-evm: enable mmc/sd suppport
>>   defconfig: k2g_evm_defconfig: Enable mmc driver model
>>
>> Wenyou Yang (1):
>>   mmc: atmel_sdhci: Convert to the driver model support
> 
> NAK.  This atmel change, like the all of the others in their series need
> to come in via Andreas' tree as it's introducing a warning due to some
> other patch being required:

Sorry for this mistake, I will rebase without them.
I will check in more detail at next time. Thanks for pointing out.
And Sorry again.

Best Regards,
Jaehoon Chung

> +   sama5d2_xplained_spiflash
> +(sama5d2_xplained_spiflash)  static int clk_get_by_name(struct udevice *dev, 
> const char *name,
> +(sama5d2_xplained_spiflash) ^
> w+(sama5d2_xplained_spiflash) In file included from 
> drivers/mmc/atmel_sdhci.c:9:0:
> w+(sama5d2_xplained_spiflash) include/clk.h:107:12: warning: 
> 'clk_get_by_name' defined but not used [-Wunused-function]
> 

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


[U-Boot] [PATCH 2/2] fastboot: move to Kconfig

2016-08-15 Thread Steve Rae
- move bcm23550_w1d to Kconfig
- move bcm28155_ap to Kconfig

Signed-off-by: Steve Rae 
---

 configs/bcm23550_w1d_defconfig | 8 
 configs/bcm28155_ap_defconfig  | 8 
 include/configs/bcm23550_w1d.h | 8 
 include/configs/bcm28155_ap.h  | 8 
 4 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/configs/bcm23550_w1d_defconfig b/configs/bcm23550_w1d_defconfig
index 0ef4a37..ca4feaf 100644
--- a/configs/bcm23550_w1d_defconfig
+++ b/configs/bcm23550_w1d_defconfig
@@ -2,6 +2,13 @@ CONFIG_ARM=y
 CONFIG_ENABLE_ARM_SOC_BOOT0_HOOK=y
 CONFIG_TARGET_BCM23550_W1D=y
 CONFIG_HUSH_PARSER=y
+CONFIG_FASTBOOT=y
+CONFIG_USB_FUNCTION_FASTBOOT=y
+CONFIG_CMD_FASTBOOT=y
+CONFIG_FASTBOOT_BUF_ADDR=0x8000
+CONFIG_FASTBOOT_BUF_SIZE=0x1d00
+CONFIG_FASTBOOT_FLASH=y
+CONFIG_FASTBOOT_FLASH_MMC_DEV=0
 CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_IMLS is not set
 CONFIG_CMD_ASKENV=y
@@ -17,6 +24,7 @@ CONFIG_CMD_FAT=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_BCM_UDC_OTG_PHY=y
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_USB_GADGET_DWC2_OTG_PHY_BUS_WIDTH_8=y
 CONFIG_USB_GADGET_DOWNLOAD=y
diff --git a/configs/bcm28155_ap_defconfig b/configs/bcm28155_ap_defconfig
index 70eb44a..eb8aa35 100644
--- a/configs/bcm28155_ap_defconfig
+++ b/configs/bcm28155_ap_defconfig
@@ -3,6 +3,13 @@ CONFIG_ENABLE_ARM_SOC_BOOT0_HOOK=y
 CONFIG_TARGET_BCM28155_AP=y
 CONFIG_HUSH_PARSER=y
 # CONFIG_AUTOBOOT is not set
+CONFIG_FASTBOOT=y
+CONFIG_USB_FUNCTION_FASTBOOT=y
+CONFIG_CMD_FASTBOOT=y
+CONFIG_FASTBOOT_BUF_ADDR=0x8000
+CONFIG_FASTBOOT_BUF_SIZE=0x7ff0
+CONFIG_FASTBOOT_FLASH=y
+CONFIG_FASTBOOT_FLASH_MMC_DEV=0
 CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_IMLS is not set
 CONFIG_CMD_ASKENV=y
@@ -18,6 +25,7 @@ CONFIG_CMD_FAT=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_BCM_UDC_OTG_PHY=y
 CONFIG_USB_GADGET_DWC2_OTG=y
 CONFIG_USB_GADGET_DWC2_OTG_PHY_BUS_WIDTH_8=y
 CONFIG_USB_GADGET_DOWNLOAD=y
diff --git a/include/configs/bcm23550_w1d.h b/include/configs/bcm23550_w1d.h
index 8d041ed..770dd87 100644
--- a/include/configs/bcm23550_w1d.h
+++ b/include/configs/bcm23550_w1d.h
@@ -127,17 +127,9 @@
 /* Commands */
 #define CONFIG_FAT_WRITE
 
-/* Fastboot and USB OTG */
-#define CONFIG_USB_FUNCTION_FASTBOOT
-#define CONFIG_CMD_FASTBOOT
-#define CONFIG_FASTBOOT_FLASH
-#define CONFIG_FASTBOOT_FLASH_MMC_DEV  0
 #define CONFIG_SYS_CACHELINE_SIZE  64
-#define CONFIG_FASTBOOT_BUF_SIZE   0x1d00
-#define CONFIG_FASTBOOT_BUF_ADDR   CONFIG_SYS_SDRAM_BASE
 #undef CONFIG_USB_GADGET_VBUS_DRAW
 #define CONFIG_USB_GADGET_VBUS_DRAW0
-#define CONFIG_USB_GADGET_BCM_UDC_OTG_PHY
 #define CONFIG_USBID_ADDR  0x34052c46
 
 #define CONFIG_SYS_ICACHE_OFF
diff --git a/include/configs/bcm28155_ap.h b/include/configs/bcm28155_ap.h
index 889e5db..df0b2ba 100644
--- a/include/configs/bcm28155_ap.h
+++ b/include/configs/bcm28155_ap.h
@@ -126,15 +126,7 @@
 /* Commands */
 #define CONFIG_FAT_WRITE
 
-/* Fastboot and USB OTG */
-#define CONFIG_USB_FUNCTION_FASTBOOT
-#define CONFIG_CMD_FASTBOOT
-#define CONFIG_FASTBOOT_FLASH
-#define CONFIG_FASTBOOT_FLASH_MMC_DEV  0
 #define CONFIG_SYS_CACHELINE_SIZE  64
-#define CONFIG_FASTBOOT_BUF_SIZE   (CONFIG_SYS_SDRAM_SIZE - SZ_1M)
-#define CONFIG_FASTBOOT_BUF_ADDR   CONFIG_SYS_SDRAM_BASE
-#define CONFIG_USB_GADGET_BCM_UDC_OTG_PHY
 #define CONFIG_USBID_ADDR  0x34052c46
 
 #endif /* __BCM28155_AP_H */
-- 
1.8.5

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


[U-Boot] [PATCH 1/2] fastboot: implement Kconfig

2016-08-15 Thread Steve Rae
implement Kconfig for the 'fastboot' feature set

Signed-off-by: Steve Rae 
---
It did not seem feasible to use the "moveconfig.py" tool -- mostly because
some of these configurations use defines rather than actual values...
In addition, implemented "config FASTBOOT" enable/disable for this entire
Kconfig capability, so that the existing "include/configs/*.h" capability
would not conflict

 cmd/Kconfig|  2 ++
 cmd/fastboot/Kconfig   | 60 ++
 drivers/usb/gadget/Kconfig |  5 
 3 files changed, 67 insertions(+)
 create mode 100644 cmd/fastboot/Kconfig

diff --git a/cmd/Kconfig b/cmd/Kconfig
index d69b817..308a0c8 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -114,6 +114,8 @@ config AUTOBOOT_STOP_STR_SHA256
 
 endmenu
 
+source "cmd/fastboot/Kconfig"
+
 comment "Commands"
 
 menu "Info commands"
diff --git a/cmd/fastboot/Kconfig b/cmd/fastboot/Kconfig
new file mode 100644
index 000..a93d1c0
--- /dev/null
+++ b/cmd/fastboot/Kconfig
@@ -0,0 +1,60 @@
+comment "FASTBOOT"
+
+config FASTBOOT
+   bool ""
+
+menu "Fastboot support"
+   depends on FASTBOOT
+
+config USB_FUNCTION_FASTBOOT
+   bool "Enable USB fastboot gadget"
+   help
+ This enables the USB part of the fastboot gadget.
+
+config CMD_FASTBOOT
+   bool "Enable FASTBOOT command"
+   help
+ This enables the command "fastboot" which enables the Android
+ fastboot mode for the platform's USB device. Fastboot is a USB
+ protocol for downloading images, flashing and device control
+ used on Android devices.
+
+config ANDROID_BOOT_IMAGE
+   bool "Enable support for Android Boot Images"
+   help
+ This enables support for booting images which use the Android
+ image format header.
+
+if USB_FUNCTION_FASTBOOT
+
+config FASTBOOT_BUF_ADDR
+   hex "Define FASTBOOT buffer address"
+   help
+ The fastboot protocol requires a large memory buffer for
+ downloads. Define this to the starting RAM address to use for
+ downloaded images.
+
+config FASTBOOT_BUF_SIZE
+   hex "Define FASTBOOT buffer size"
+   help
+ The fastboot protocol requires a large memory buffer for
+ downloads. This buffer should be as large as possible for a
+ platform. Define this to the size available RAM for fastboot.
+
+config FASTBOOT_FLASH
+   bool "Enable FASTBOOT FLASH command"
+   help
+ The fastboot protocol includes a "flash" command for writing
+ the downloaded image to a non-volatile storage device. Define
+ this to enable the "fastboot flash" command.
+
+config FASTBOOT_FLASH_MMC_DEV
+   int "Define FASTBOOT MMC FLASH default device"
+   help
+ The fastboot "flash" command requires additional information
+ regarding the non-volatile storage device. Define this to
+ the eMMC device that fastboot should use to store the image.
+
+endif # USB_FUNCTION_FASTBOOT
+
+endmenu
diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index ae62476..40839d8 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -43,6 +43,11 @@ config USB_GADGET_ATMEL_USBA
  USBA is the integrated high-speed USB Device controller on
  the AT32AP700x, some AT91SAM9 and AT91CAP9 processors from Atmel.
 
+config USB_GADGET_BCM_UDC_OTG_PHY
+   bool "Broadcom UDC OTG PHY"
+   help
+ Enable the Broadcom UDC OTG physical device interface.
+
 config USB_GADGET_DWC2_OTG
bool "DesignWare USB2.0 HS OTG controller (gadget mode)"
select USB_GADGET_DUALSPEED
-- 
1.8.5

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


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

2016-08-15 Thread Tom Rini
On Mon, Aug 15, 2016 at 04:59:02PM -0600, Stephen Warren wrote:
> On 08/15/2016 04:49 PM, Tom Rini wrote:
> >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!
> 
> I'm not certain that anyone other than myself is running test.py on
> real HW (vs. sandbox where it's trivial).
> 
> If you look at test-log.html it should show what U-Boot outputs on
> the console, and where any error was detected in the test.
> Alternativeluy, add "-s" to the invocation and U-Boot output should
> show up on stdout while the tests are running. What's the error
> reported there; just a timeout waiting for the CRC? Here's an
> example of what test_net_tftpboot looks like for me:
> 
> >Tegra210 (P2371-2180) # tftpboot 8000 ubtest-readable.bin
> >Using eth_rtl8169 device
> >TFTP from server 10.20.204.51; our IP address is 10.20.204.52
> >Filename 'ubtest-readable.bin'.
> >Load address: 0x8000
> >Loading: 
> >*%08#
> >  #
> >  #
> >  #
> >  #
> >  
> >  2.9 MiB/s
> >done
> >Bytes transferred = 5058624 (4d3040 hex)
> >Tegra210 (P2371-2180) # crc32 8000 $filesize
> >crc32 for 8000 ... 804d303f ==> c2244b26
> >Tegra210 (P2371-2180) #
> 
> In the past, I have seen tests pass when run manually but not under
> test.py, e.g. due to heap fragmentation, state, or corrupted memory
> due to earlier tests, which weren't run in the manual case. Might
> that be the issue?

Adding in -s this is part of what I see:

=> .s=> ping $serverip
Waiting for Ethernet connection... done.
Using sms0 device
host 192.168.0.3 is alive
=> .=> tftpboot 8000 1MiBtest.bin
Waiting for Ethernet connection... done.
Using sms0 device
TFTP from server 192.168.0.3; our IP address is 192.168.0.140
Filename '1MiBtest.bin'.
Load address: 0x8000
Loading: #
 #
 #
 ##
 171.9 KiB/s
done
Bytes transferred = 1048576 (10 hex)
=> crc32 8000 $filesize
CRC32 for 8000 ... 800f ==> F2fa737e0
=>

For some reason there's an extra 'F' at the start of the crc32 output.
Looking at it in the html file, it looks all correct there.  In the
output from test.py the captured stdout end just before the CRC32 value
would be.  I've tried larger test binaries and get the same output so
I'd assume if there was some heap corruption or similar, I'd not tickle
it with bigger files too (2MiB, 4MiB and I think even 8MiB are small
enough to be downloaded in the time the test allows).  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] test.py and tftp crc32 test?

2016-08-15 Thread Stephen Warren

On 08/15/2016 04:49 PM, Tom Rini wrote:

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!


I'm not certain that anyone other than myself is running test.py on real 
HW (vs. sandbox where it's trivial).


If you look at test-log.html it should show what U-Boot outputs on the 
console, and where any error was detected in the test. Alternativeluy, 
add "-s" to the invocation and U-Boot output should show up on stdout 
while the tests are running. What's the error reported there; just a 
timeout waiting for the CRC? Here's an example of what test_net_tftpboot 
looks like for me:



Tegra210 (P2371-2180) # tftpboot 8000 ubtest-readable.bin
Using eth_rtl8169 device
TFTP from server 10.20.204.51; our IP address is 10.20.204.52
Filename 'ubtest-readable.bin'.
Load address: 0x8000
Loading: *%08#
 #
 #
 #
 #
 
 2.9 MiB/s
done
Bytes transferred = 5058624 (4d3040 hex)
Tegra210 (P2371-2180) # crc32 8000 $filesize
crc32 for 8000 ... 804d303f ==> c2244b26
Tegra210 (P2371-2180) #


In the past, I have seen tests pass when run manually but not under 
test.py, e.g. due to heap fragmentation, state, or corrupted memory due 
to earlier tests, which weren't run in the manual case. Might that be 
the issue?

___
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


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


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

[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] 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


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] [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 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] 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] 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] 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: 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/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] 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: 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] 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: 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: 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: 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: 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: 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


[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


[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


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


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


[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, 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


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,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,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, 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,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] 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, 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


[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] [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 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


[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 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 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 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 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


  1   2   >