Re: [U-Boot] [PATCH v3] dfu: Introduction of the dfu_hash_algo env variable for checksum method setting

2014-05-09 Thread Lukasz Majewski
Hi Wolfgang,

 Dear Lukasz Majewski,
 
 In message 1399552067-31208-1-git-send-email-l.majew...@samsung.com
 you wrote:
  Up till now the CRC32 of received data was calculated
  unconditionally. The standard crc32 implementation causes long
  delay when large images were uploaded.
  
  The dfu_hash_algo environment variable gives the opportunity to
  enable on demand (when e.g. debugging) the hash (crc32) calculation.
  It can be done without need to recompile the u-boot binary and
  reuses the generic hash framework.
  
  By default the crc32 is NOT calculated anymore.
 
 I consider this a VARY BAD idea, as it causes a significant decrease
 of reliability and robustness of the systems.  Please do not do this.

I do understand that reliability is very important, but please
consider following arguments:

1. Now calculated crc32 is only used for debugging. 

For automated tests I use MD5 and compare this value before sending
data to target via DFU and after I read it. This testing is done purely
on HOST machine.

Please refer to the discussion which we had at previous version of this
patch:

http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/183311/focus=183455

Participants have agreed, that we shall optionally enable crc32 (or
other algorithm) calculation. 

2. The current crc32 implementation is painfully slow (although I have
only L1 enabled on my target). 

3. With large files (like rootfs images) we store data (to medium) with
32 MiB chunks, which means that when we calculate complete crc32 the
image is already written to its final destination.

Of course we could store the rootfs to some free space on the eMMC,
then calculate crc32 and store it to the final position. This however
would take considerable time and require wrapping our binaries to
special headers (as described below). 

4. This patch also allows some flexibility: by setting the env variable
we can decide which algorithm to use (crc32, sha1, etc). It is
appealing since we use the hash_* code anyway.

 
 In any case, if you introduce this, the behaviour should be
 documented, and the default setting should be such as to keep the
 previous behaviour, i. e. CRC checking should remain on by default.
 then people who are willing to trade reliability for a little speed

I would not touch the code if the speedup wouldn't be so significant.
Reducing flashing time of 400 MiB file from 65 s to 25 s is worth its
effort.

 can still switch it off, but the unawarerest of the users will not
 suffer.

As I've stated previously the crc32 in the current dfu implementation
is only informative.

To take the full advantage of it, we would need to modify the dfu-util
to wrap the sent file to some kind of header or locally write some
script to do that. However, this is not specified by the standard and
would be u-boot's extension of the DFU. 

Even more important issue is that it would work only for small files
(like uImage).

 
 
 Best regards,
 
 Wolfgang Denk
 

-- 
Best regards,

Lukasz Majewski

Samsung RD Institute Poland (SRPOL) | Linux Platform Group
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4 1/3] usb:gadget:f_thor: code cleanup in function download_tail()

2014-05-09 Thread Przemyslaw Marczak

Hello Marek,

On 04/28/2014 06:57 PM, Przemyslaw Marczak wrote:

In thor's download_tail() function, dfu_get_entity() is called
before each dfu_write() call and the returned entity pointers
are the same. So dfu_get_entity() can be called just once and
this patch changes this.

Signed-off-by: Przemyslaw Marczak p.marc...@samsung.com
Cc: Lukasz Majewski l.majew...@samsung.com
Cc: Marek Vasut ma...@denx.de
Cc: Heiko Schocher h...@denx.de
Cc: Tom Rini tr...@ti.com

---
Changes v2:
- separate fix and cleanup into two commits

Changes v3:
- download_tail(): add exit label

Changes v4:
- none


I've checked the u-boot-usb/master tree and I found that one commit of 
this patch set is missed, because it is v3 (there was only two commits).

Could you please apply the patch set version 4?

Thank you,
--
Przemyslaw Marczak
Samsung RD Institute Poland
Samsung Electronics
p.marc...@samsung.com
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3] dfu: Introduction of the dfu_hash_algo env variable for checksum method setting

2014-05-09 Thread Wolfgang Denk
Dear Lukasz,

In message 20140509085203.31133238@amdc2363 you wrote:
 
 For automated tests I use MD5 and compare this value before sending
 data to target via DFU and after I read it. This testing is done purely
 on HOST machine.

This is unsufficient.  You should always verify the image on the
target after the download has completed.

 Participants have agreed, that we shall optionally enable crc32 (or
 other algorithm) calculation. 

If this is the default now, it should remain the default.

 2. The current crc32 implementation is painfully slow (although I have
 only L1 enabled on my target). 

This is an unrelated problem then, which should excluded from this
discussion here.

 3. With large files (like rootfs images) we store data (to medium) with
 32 MiB chunks, which means that when we calculate complete crc32 the
 image is already written to its final destination.

You can still detect if the download was corrupted, report a proper
error and initiate a re-download.  This would at least give you a
chance to react to corrupted data.  Just closing the eyes and hoping
no errors will ever happen has always been a bad strategy.

 4. This patch also allows some flexibility: by setting the env variable
 we can decide which algorithm to use (crc32, sha1, etc). It is
 appealing since we use the hash_* code anyway.

Agreed.  This was not my point.

What I complained about is the change in behaviour.  I asked to make
the existing behaviour the default, so unaware users will not be
affected. Only if you intentionally want some other behaviour you can
then enable this by setting the env variable.

  In any case, if you introduce this, the behaviour should be
  documented, and the default setting should be such as to keep the
  previous behaviour, i. e. CRC checking should remain on by default.
  then people who are willing to trade reliability for a little speed
 
 I would not touch the code if the speedup wouldn't be so significant.
 Reducing flashing time of 400 MiB file from 65 s to 25 s is worth its
 effort.

I disagree, if you pay for the speed by reduced reliability, and if
you don't even inform the user about this new behaviour.

Also, I feel it might be worth to investigate why the checksumming is
slow on your system.

 As I've stated previously the crc32 in the current dfu implementation
 is only informative.

It is pretty useful information, isn't it?

 To take the full advantage of it, we would need to modify the dfu-util
 to wrap the sent file to some kind of header or locally write some
 script to do that. However, this is not specified by the standard and
 would be u-boot's extension of the DFU. 

Ok, add this to the many deficientcies of DFU :-(

 Even more important issue is that it would work only for small files
 (like uImage).

Why so? Can we not calculate CRC even when the transfer is broken
down into several chunks?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
I don't mind criticism. You know me. I've  never  been  one  to  take
offence  at  criticism. No one could say I'm the sort to take offence
at criticism -- Not twice, anyway. Not without blowing bubbles.
  - Terry Pratchett, _Witches Abroad_
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4 1/3] usb:gadget:f_thor: code cleanup in function download_tail()

2014-05-09 Thread Lukasz Majewski
Hi Przemyslaw, Marek,

 Hello Marek,
 
 On 04/28/2014 06:57 PM, Przemyslaw Marczak wrote:
  In thor's download_tail() function, dfu_get_entity() is called
  before each dfu_write() call and the returned entity pointers
  are the same. So dfu_get_entity() can be called just once and
  this patch changes this.
 
  Signed-off-by: Przemyslaw Marczak p.marc...@samsung.com
  Cc: Lukasz Majewski l.majew...@samsung.com
  Cc: Marek Vasut ma...@denx.de
  Cc: Heiko Schocher h...@denx.de
  Cc: Tom Rini tr...@ti.com
 
  ---
  Changes v2:
  - separate fix and cleanup into two commits
 
  Changes v3:
  - download_tail(): add exit label
 
  Changes v4:
  - none
 
 I've checked the u-boot-usb/master tree and I found that one commit
 of this patch set is missed, because it is v3 (there was only two
 commits). Could you please apply the patch set version 4?

I've discussed this issue with Przemek, and we agreed that Przemek will
prepare diff patch between version 3, which is already in mainline and
version 4.

Then, after ML review, I will pull them to u-boot-dfu branch.

Marek, does it work for you?

 
 Thank you,



-- 
Best regards,

Lukasz Majewski

Samsung RD Institute Poland (SRPOL) | Linux Platform Group
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Pull request for u-boot-arm - u-boot?

2014-05-09 Thread Albert ARIBAUD
Hi Marek,

On Mon, 5 May 2014 19:46:13 +0200, Marek Vasut ma...@denx.de wrote:

 On Monday, May 05, 2014 at 06:46:36 PM, Stephen Warren wrote:
  Albert,
  
  I was wondering when the next pull request for u-boot-arm/master -
  u-boot/master was likely to be?
  
  I asked because some changes to the Tegra USB driver went through the
  u-boot-tegra/master and hence are now in u-boot-arm/master, but not in
  u-boot-usb/master. I have some more USB driver changes which rely on the
  earlier USB patches, and these should really go through
  u-boot-usb/master rather than the Tegra/ARM tree. For this to happen,
  u-boot-usb/master needs to contain the patches currently in
  u-boot-arm/master, and the best way for that to happen is for those
  patches to get into u-boot/master so that u-boot-usb/master can merge them.
  
  Or, should Marek just merge u-boot-arm/master into his tree directly?
 
 I will not merge u-boot-arm/master into my tree, no. I will wait for the 
 higher-
 ups to solve this ... Albert, we're waiting :b

On it now.

 Best regards,
 Marek Vasut

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


Re: [U-Boot] [PATCH v3] dfu: Introduction of the dfu_hash_algo env variable for checksum method setting

2014-05-09 Thread Lukasz Majewski
Hi Wolfgang,

 Dear Lukasz,
 
 In message 20140509085203.31133238@amdc2363 you wrote:
  
  For automated tests I use MD5 and compare this value before sending
  data to target via DFU and after I read it. This testing is done
  purely on HOST machine.
 
 This is unsufficient.  You should always verify the image on the
 target after the download has completed.

I agree.

 
  Participants have agreed, that we shall optionally enable crc32 (or
  other algorithm) calculation. 
 
 If this is the default now, it should remain the default.
 
  2. The current crc32 implementation is painfully slow (although I
  have only L1 enabled on my target). 
 
 This is an unrelated problem then, which should excluded from this
 discussion here.
 
  3. With large files (like rootfs images) we store data (to medium)
  with 32 MiB chunks, which means that when we calculate complete
  crc32 the image is already written to its final destination.
 
 You can still detect if the download was corrupted, report a proper
 error and initiate a re-download.  This would at least give you a
 chance to react to corrupted data. 

In this particular case I would need to chop the large file either at
dfu-util or on some script, where each chunk need to have the header
with its crc32. Then before storing each chunk I can assess if data
wasn't corrupted.

This would provide reliability.

Now, even that I have the crc32 calculated for a chunk, I don't have
the original one to compare.

 Just closing the eyes and hoping
 no errors will ever happen has always been a bad strategy.

+1

 
  4. This patch also allows some flexibility: by setting the env
  variable we can decide which algorithm to use (crc32, sha1, etc).
  It is appealing since we use the hash_* code anyway.
 
 Agreed.  This was not my point.
 
 What I complained about is the change in behaviour.  I asked to make
 the existing behaviour the default, so unaware users will not be
 affected. Only if you intentionally want some other behaviour you can
 then enable this by setting the env variable.

Ok. I will preserve the default behavior. However, personally I think
that for a long term this proposed solution is better.

 
   In any case, if you introduce this, the behaviour should be
   documented, and the default setting should be such as to keep the
   previous behaviour, i. e. CRC checking should remain on by
   default. then people who are willing to trade reliability for a
   little speed
  
  I would not touch the code if the speedup wouldn't be so
  significant. Reducing flashing time of 400 MiB file from 65 s to 25
  s is worth its effort.
 
 I disagree, if you pay for the speed by reduced reliability, and if
 you don't even inform the user about this new behaviour.
 
 Also, I feel it might be worth to investigate why the checksumming is
 slow on your system.
 
  As I've stated previously the crc32 in the current dfu
  implementation is only informative.
 
 It is pretty useful information, isn't it?

It depends what do you want to do with it. If you have target
connected via serial to some test setup and log this output and process
it on HOST afterwards, then it is useful. 

Otherwise, you only see on console the CRC, which you can by hand
compare with crc calculated on your host. And this information displays
just after you stored the data to the medium (and corrupted the
previous one).

 
  To take the full advantage of it, we would need to modify the
  dfu-util to wrap the sent file to some kind of header or locally
  write some script to do that. However, this is not specified by the
  standard and would be u-boot's extension of the DFU. 
 
 Ok, add this to the many deficientcies of DFU :-(

The standard only allow the file which is the input to dfu-util to be
protected by CRC. Then dfu-util check this value and strips off the
header.

 
  Even more important issue is that it would work only for small files
  (like uImage).
 
 Why so? Can we not calculate CRC even when the transfer is broken
 down into several chunks?

To do that one would need to:

- chop the large file to several smaller ones (and the chunk size can
  be different for each platform and must be know for HOST utils)
- calculate crc32 for each chunk
- wrap it to some header not conforming to the DFU standard -it would
  be the u-boot extension
- send each chunk separately to target - by calling dfu-util several
  times.

Handling of this would be difficult because of the need of DFU state
machine extension.


 
 Best regards,
 
 Wolfgang Denk
 



-- 
Best regards,

Lukasz Majewski

Samsung RD Institute Poland (SRPOL) | Linux Platform Group
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Pull request for u-boot-arm - u-boot?

2014-05-09 Thread Albert ARIBAUD
Hi Tom,

On Mon, 5 May 2014 13:46:54 -0400, Tom Rini tr...@ti.com wrote:

 On Mon, May 05, 2014 at 10:46:36AM -0600, Stephen Warren wrote:
 
  Albert,
  
  I was wondering when the next pull request for u-boot-arm/master -
  u-boot/master was likely to be?
  
  I asked because some changes to the Tegra USB driver went through the
  u-boot-tegra/master and hence are now in u-boot-arm/master, but not in
  u-boot-usb/master. I have some more USB driver changes which rely on the
  earlier USB patches, and these should really go through
  u-boot-usb/master rather than the Tegra/ARM tree. For this to happen,
  u-boot-usb/master needs to contain the patches currently in
  u-boot-arm/master, and the best way for that to happen is for those
  patches to get into u-boot/master so that u-boot-usb/master can merge them.
  
  Or, should Marek just merge u-boot-arm/master into his tree directly?
 
 There's also still a handful of outstanding other patches needing to go
 in, and really, I'm fine with more frequent PRs rather than waiting for
 everyone elses to percolate up and then get one with everything.

I'll send out more frequent PRs.

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


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

2014-05-09 Thread Albert ARIBAUD
Hello Tom,

The following changes since commit
173d294b94cfec10063a5be40934d6d8fb7981ce:

  Merge branch 'serial' of git://www.denx.de/git/u-boot-microblaze
  (2014-05-06 14:55:45 -0400)

are available in the git repository at:


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

for you to fetch changes up to d2a3e911390f9fc4d8c0ee4b3c7fc75f4fd3fd19:

  Merge branch 'u-boot/master' (2014-05-09 11:50:14 +0200)

Note that there was a trivial merge conflict between ARM and mainline
trees on drivers/net/Makefile:

 HEAD
obj-$(CONFIG_INCA_IP_SWITCH) += inca-ip_sw.o
obj-$(CONFIG_DRIVER_TI_KEYSTONE_NET) += keystone_net.o
===
 u-boot/master

This is solved in the ARM ToT commit d2a3e911.



Albert ARIBAUD (3):
  Merge branch 'u-boot-tegra/master' into 'u-boot-arm/master'
  Merge branch 'u-boot-ti/master' into 'u-boot-arm/master'
  Merge branch 'u-boot/master'

Karicheri, Muralidharan (6):
  tools: mkimage: add support for gpimage format
  NAND: DaVinci: allow forced disable of subpage writes
  i2c, davinci: move i2c_defs.h to the drivers/i2c directory
  spi: davinci: add support for multiple bus and chip select
  k2hk-evm: add configuration for spi1 and spi2 support
  keystone2: net: add keystone ethernet driver

Manish Badarkhe (1):
  arm, da850: staticize funtions

Nishanth Menon (11):
  OMAP: common: consolidate fake USB ethernet MAC address creation
  omap3/sys_info: provide interface to read die id
  OMAP3: beagle-xm: generate fake USB ethernet MAC address from
dieid omap3: zoom1: enable CONFIG_SYS_GENERIC_BOARD
  OMAP3: zoom1: Configure GPMC for Ethernet
  OMAP3: zoom1: enable LAN9211
  omap3: zoom1: enable common network commands
  omap3: zoom1: disable JFFS2 and enable FS_GENERIC
  omap3: zoom1: enable bootz
  omap3: zoom1: fix default console
  omap3: zoom1: switch to generic ti_omap3_common config header

Poddar, Sourav (1):
  spi: ti_qspi: Add delay for successful bulk erase.

Rob Herring (2):
  ARM: highbank: use config_distro_defaults.h
  ARM: highbank: use default prompt

Stefan Agner (3):
  usb: tegra: fix USB2 powerdown for Tegra30 and later
  usb: tegra: fix PHY configuration
  usb: tegra: combine header file

Stephen Warren (14):
  ARM: tegra: pinctrl: remove func_safe
  ARM: tegra: pinctrl: remove vddio
  ARM: tegra: pinctrl: make pmux_func values consistent on Tegra20
  ARM: tegra: prototype pinmux_init() in board.h
  ARM: tegra: use apb_misc.h in more places
  ARM: tegra: pinctrl: remove duplication
  ARM: tegra: reduce public pinmux API
  ARM: tegra: pinmux naming consistency fixes
  ARM: tegra: Tegra20 pinmux cleanup
  ARM: tegra: Tegra30 pinmux cleanup
  ARM: tegra: Tegra114 pinmux cleanup
  ARM: tegra: Tegra124 pinmux cleanup
  ARM: tegra: add Jetson TK1 board
  ARM: tegra: pack pinmux data tables tighter

Tom Rini (22):
  fw_env.c: Switch get_config to use '%ms' in sscanf
  env_mmc.c: Allow environment to be used within SPL
  env_mmc.c: Remove NULL check on tmp_env1/2
  mtd: Add a CONFIG_SPL_MTD_SUPPORT for a more full NAND subsystem
in SPL mtd: Build nand_util.o for CONFIG_ENV_IS_IN_NAND in SPL
  am335x_evm: Make SPL_OS also check the boot_os variable for
falcon mode README: Add CONFIG_SPL_OS_BOOT to README
  README.falcon: Document environment variables for falcon mode
  a3m071: Make spl_start_uboot test like getenv_yesno does
  spl_mmc/CONFIG_SPL_OS_BOOT: Allow environment to determine what
to boot TI: Add, use a DEFAULT_LINUX_BOOT_ENV environment string
  am335x_evm: Update the ramdisk args, we pass things in just fine
via DT am43xx_evm: Update the ramdisk args, we pass things in just fine
via DT TI:omap5: Move CONFIG_ENV_SIZE to board config files
  TI:armv7: Change Falcon Mode DT load address
  am335x_evm: Drop SPI SPL support from the default build
  SPL:SPI: Add Falcon Mode support
  dra7xx_evm: Add QSPI_4 support, qspiboot build target
  TI:armv7: Switch to CONFIG_SYS_BOARD_GENERIC
  TI:omap3: Convert omap3_beagle to ti_omap3_common.h
  am335x: Switch to CONFIG_SKIP_LOWLEVEL_INIT from guarding SPL or
NOR_BOOT am43xx_evm: Drop SPI SPL

Vitaly Andrianov (5):
  fdt: call ft_board_setup_ex() at the end of image_setup_libfdt()
  arm: add support for arch timer
  i2c, davinci: convert driver to new mutlibus/mutliadapter
framework k2hk: add support for k2hk SOC and EVM
  keystone2: add keystone multicore navigator driver

Wolfgang Denk (3):
  ARM: OMAP: remove sr32() from OMAP board code
  ARM: OMAP: hide custom bit manipulation function sr32()
  ARM: OMAP: replace custom sr32() by standard I/O accessors

 Makefile |  10 ++
 README   |  13 

Re: [U-Boot] [RFC] POWER framework v3 - wish list

2014-05-09 Thread Przemyslaw Marczak

Hello,

Some time ago I had a pleasure to work on some kind of a simple
charger manager for u-boot. For checking battery charge level, cable
state, and some more info I made a common calls which were implemented 
in board files, so actually it didn't base directly on PMIC framework. 
This allowed making charger abstraction but it was a second power 
related framework next to the PMIC.
From my side I would like to introduce its next version according to 
the doc/README.power-framework documents TO DO list and some more...


In this RFC any comments about next version of power management 
framework are welcome.

What new PMIC framework should provide?
How to extend it?
What can be fixed?

So, what should be done (in my opinion):

1. Framework architecture:

I think that current PMIC hierarchy is not so clean as it could be.
It is just based on Trats board architecture. I would like to add
there some more abstraction to make it common and simply to use.

The main problem is that current PMIC framework is based on names of 
devices. 
So to check some specific device options I need to know the name of such 
device.


Examples of useful options:
 - battery state,
 - battery level
 - charger state,
 - charger type,
 - battery charge,
   and some else...

On Trats2 which I mostly use, not every option refers to a single PMIC
device. Now this problem refers only to few Samsung boards - no more
supports battery charger at present - but this maybe change...

Looking at pmic header we can find some specific ops:
   [struct structure_name: fields (ops)]
 - struct power_fg: fg_battery_check; fg_battery_update;
 - struct power_chrg: chrg_type; chrg_bat_present; chrg_state;
 - struct power_battery: struct bat; battery_init; battery_charge;

To simplify this - in my opinion those all operations could be stored in 
a single structure,

because actually it refers to one abstract device - CHARGER.
Battery should not be treated as a device because it is only passive
element and actually in a simple version it has no logical interface
besides power contacts - so actually charger is responsible for 
maintaining battery condition and checking its state.


Next architectural change which I'm thinking of about is to add some 
abstraction of real IC features.
Nowadays boards come with highly integrated power management ICs which 
provide various subsystems like:

 - ldo / buck
 - battery charger
 - micro USB interface controller
 - gpio / keys
 - rtc
 - led flash driver
 - motor driver
 - system temperature control
 - and more, and more...(e.g. device power off feature)

 And this all is often controlled by more then one device/interface.

 Example in trats2: there are two power ICs registered as many devices, 
some of them share the same interface and bus.


This is shown on diagram below:
(taken from: doc/README.power-framework)
  -
  | BAT   |
  |   |   |   |
  |   -   |
  |   |   |
 \|/ \|/ \|/
  --- -   -
  |FG   | |MUIC   |   |CHRG   |
  | | |   |   |   |
  --- -   -
MAX77693MAX77693MAX77693
  addr: 0x6C  addr: 0x4A  addr: 0xCC

 There is also another ic: MAX77686 - which acts as:
 - LDO/BUCK regulator, pwr key event (i2c addr: 0x12)
 - rtc (i2c addr: 0x0C)

 So this is the main POWER device - but framework doesn't provide any
 common ops for it besides standard register's read/write.

I think that this architecture could look as shown on the diagram below.

   -
 | COMMON POWER FRAMEWORK  |
 | with supported ops: |
 | - A |
 | - B |
 | - C |
 | - and N - others|
   -
| | | | | |
   (N-number of registered power devices)

|   |   . . .   |
|   |   |
   -  -  
 | POWER DEV   | | POWER DEV   ||
 | name AAA  |   | name BBB  ||
 | dev id 0| | dev id 1| . . .  |
 |-| |-|| . . .
 | ops type A  | | ops type B  ||
 | iface I2C1  | | iface SPI1  ||
 |-|  - |
 | ops type B  ||
 | iface I2C2  |.
 |-|.
 | ops type C  |.
 | iface   |
   -

 So the main change is to add multiple ops on a multiple interfaces.

 And 

[U-Boot] Booting using intiramfs isnetad of uramdisk (Zynq)

2014-05-09 Thread Heshsham Abdul Basit
Hi,

I have taken boot.bin and u-boot.img from teh TOPDIR after compiling
teh u-boot source code from master-next branch.

I have my own uImage that expect a initramfs.

When I am trying to boot, I observed that u-boot is expecting ramdsik
and not initramfs.   In the same SD card I have a uramdisk.image.gz,
and so you boot loads it. then the kernel starts ,  and hangs later
on. I suspect this is because kernel is expecting initramfs which is
not loaded by u-boot.img

How do I make u-boot.img load initramfs instead of uramdisk.image.gz.?

Thanks and regards,

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


[U-Boot] [PATCH] powerpc/t2080qds: add fdt_fixup_dma3

2014-05-09 Thread Shengzhou Liu
On T2080 the 3rd DMA is not functional if SRIO2 is chosen in SerDes2.
we add fdt_fixup_dma3() to disable the 3rd DMA if SRIO2 is chosen.

Signed-off-by: Shengzhou Liu shengzhou@freescale.com
---
 board/freescale/t208xqds/t208xqds.c | 27 +++
 1 file changed, 27 insertions(+)

diff --git a/board/freescale/t208xqds/t208xqds.c 
b/board/freescale/t208xqds/t208xqds.c
index 9cfc0bd..548d46a 100644
--- a/board/freescale/t208xqds/t208xqds.c
+++ b/board/freescale/t208xqds/t208xqds.c
@@ -433,6 +433,32 @@ int misc_init_r(void)
return 0;
 }
 
+void fdt_fixup_dma3(void *blob)
+{
+   /* the 3rd DMA is not functional if SRIO2 is chosen in SerDes2 */
+   int nodeoff;
+   ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
+   u32 srds_prtcl_s2 = in_be32(gur-rcwsr[4]) 
+   FSL_CORENET2_RCWSR4_SRDS2_PRTCL;
+   srds_prtcl_s2 = FSL_CORENET2_RCWSR4_SRDS2_PRTCL_SHIFT;
+#define CONFIG_SYS_ELO3_DMA2 (0xffe00 + 0x102300)
+
+   switch (srds_prtcl_s2) {
+   case 0x29:
+   case 0x2d:
+   case 0x2e:
+   nodeoff = fdt_node_offset_by_compat_reg(blob, fsl,elo3-dma,
+   CONFIG_SYS_ELO3_DMA2);
+   if (nodeoff  0)
+   fdt_status_disabled(blob, nodeoff);
+   else
+   printf(\nWARNING unable to set status for dma3\n);
+   break;
+   default:
+   return;
+   }
+}
+
 void ft_board_setup(void *blob, bd_t *bd)
 {
phys_addr_t base;
@@ -456,4 +482,5 @@ void ft_board_setup(void *blob, bd_t *bd)
fdt_fixup_fman_ethernet(blob);
fdt_fixup_board_enet(blob);
 #endif
+   fdt_fixup_dma3(blob);
 }
-- 
1.8.0

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


Re: [U-Boot] [PATCH 4/4] [PATCH] ventana: Add support for the LTC3676 PMIC

2014-05-09 Thread Stefano Babic
On 05/05/2014 17:22, Tim Harvey wrote:
 The LTC3676 PMIC is used instead of the PFUZE100 PMIC on the
 GW51xx/GW52xx/GW53xx Ventana baseboards. In order to support the IMX6Q SoC
 at 1GHz on those baseboards, we need to adjust the voltage scaling for the SW1
 and SW3 DC/DC converters on the LTC3676 for 1225mV. Note that the scalar
 values for the LTC3676 are board-specific as they relate to a resistor devider
 chosen by the board design.
 
 Signed-off-by: Tim Harvey thar...@gateworks.com
 ---

Applied after fixing:

board/gateworks/gw_ventana/gw_ventana.c: In function 'power_init_board':
board/gateworks/gw_ventana/gw_ventana.c:788:1: warning: control reaches
end of non-void function [-Wreturn-type]

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 3/4] power: Add support for LTC3676 PMIC

2014-05-09 Thread Stefano Babic
Hi Tim,

On 23/04/2014 06:53, Tim Harvey wrote:
 The LTC3676 PMIC includes four DC/DC converters, and three 300mA
 LDO Regulators (two Adjustable). The DC/DC converters are adjustable based
 on a resistor devider (board-specific).
 
 This adds support for the LTC3676 by creating a namespace unique init function
 that uses the PMIC API to allocate a pmic and defines the registers.
 
 Signed-off-by: Tim Harvey thar...@gateworks.com
 ---

Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic


-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/4] power: make pfuze100 be able to coexist with other pmics

2014-05-09 Thread Stefano Babic
On 23/04/2014 06:53, Tim Harvey wrote:
 Avoid uding pmic_init() as this forces the model of only allowing a
 single PMIC driver to be built at a time.
 
 Signed-off-by: Tim Harvey thar...@gateworks.com
 ---
  drivers/power/pmic/pmic_pfuze100.c | 2 +-
  include/power/pfuze100_pmic.h  | 1 +
  2 files changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/power/pmic/pmic_pfuze100.c 
 b/drivers/power/pmic/pmic_pfuze100.c
 index 22c1f15..21f12d2 100644
 --- a/drivers/power/pmic/pmic_pfuze100.c
 +++ b/drivers/power/pmic/pmic_pfuze100.c
 @@ -11,7 +11,7 @@
  #include power/pmic.h
  #include power/pfuze100_pmic.h
  
 -int pmic_init(unsigned char bus)
 +int power_pfuze100_init(unsigned char bus)
  {
   static const char name[] = PFUZE100_PMIC;
   struct pmic *p = pmic_alloc();
 diff --git a/include/power/pfuze100_pmic.h b/include/power/pfuze100_pmic.h
 index 2a9032a..444aba6 100644
 --- a/include/power/pfuze100_pmic.h
 +++ b/include/power/pfuze100_pmic.h
 @@ -93,4 +93,5 @@ enum {
  #define SWBST_MODE_AUTO  (2  2)
  #define SWBST_MODE_APS   (2  3)
  
 +int power_pfuze100_init(unsigned char bus);
  #endif
 
Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic


-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/4] ventana: use non-generic pfuze100 init

2014-05-09 Thread Stefano Babic
On 23/04/2014 06:53, Tim Harvey wrote:
 Signed-off-by: Tim Harvey thar...@gateworks.com
 ---
  board/gateworks/gw_ventana/gw_ventana.c | 5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)
 
 diff --git a/board/gateworks/gw_ventana/gw_ventana.c 
 b/board/gateworks/gw_ventana/gw_ventana.c
 index c130e2c..48e90e0 100644
 --- a/board/gateworks/gw_ventana/gw_ventana.c
 +++ b/board/gateworks/gw_ventana/gw_ventana.c
 @@ -1077,10 +1077,11 @@ int misc_init_r(void)
   }
  
   /* configure PFUZE100 PMIC (not used on all Ventana baseboards) */
 - if ((board_type == GW54xx || board_type == GW54proto) 
 - !pmic_init(I2C_PMIC)) {
 + power_pfuze100_init(I2C_PMIC);
 + if (board_type == GW54xx || board_type == GW54proto) {
   struct pmic *p = pmic_get(PFUZE100_PMIC);
   u32 reg;
 +
   if (p  !pmic_probe(p)) {
   pmic_reg_read(p, PFUZE100_DEVICEID, reg);
   printf(PMIC:  PFUZE100 ID=0x%02x\n, reg);
 

Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2] iomux-v3: Add support for mx6sl LVE bit

2014-05-09 Thread Stefano Babic
On 29/04/2014 15:15, Fabio Estevam wrote:
 On mx6sl there is a LVE (Low Voltage Enable) bit in the IOMUXC_SW_PAD_CTL 
 register that can enable or disable low voltage on the pad.
 
 LVE is bit 22 of IOMUXC_SW_PAD_CTL register, but in order to make the 
 calculation easier we can define it as a flag in bit 1, since this bit is 
 unused.
 
 Add support for it.
 
 Signed-off-by: Fabio Estevam fabio.este...@freescale.com
 ---

Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic



-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/4] imx25: Add new hardware registers

2014-05-09 Thread Stefano Babic
On 23/04/2014 07:52, die...@gmx.de wrote:
 From: Thomas Diener die...@gmx.de
 
 Signed-off-by: Thomas Diener die...@gmx.de
 ---

Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic



-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/4] video: Add support for imx25 lcd controller

2014-05-09 Thread Stefano Babic
On 23/04/2014 07:52, die...@gmx.de wrote:
 From: Thomas Diener die...@gmx.de
 
 This patch adds support for the imx25 lcd display controller.
 
 Signed-off-by: Thomas Diener die...@gmx.de
 ---


Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic


-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/4] bootm: allow to disable legacy image format

2014-05-09 Thread Simon Glass
Hi,

On 8 May 2014 23:12, Heiko Schocher h...@denx.de wrote:
 Hello Mike,

 Am 08.05.2014 15:02, schrieb mike:

 Hi Heiko,

 Did you see my last email? The one that bounced with a mime header and
 where I attached a patch file.


 Seems I missed this EMail ...


 I just wonder if its not better to switch the define to be

 if (CONFIG_SIGNATURE_VERIFICATION_WITH_LEGACY_SIDE_DOOR). It can become
 mutually exclusive with the existing signature verification define.


 The define length seems a little long, but this is also an option.
 I just prepared my patch after Simons comment, see:

 http://lists.denx.de/pipermail/u-boot/2014-May/179139.html

I agree that it might be dangerous to allow legacy boot when signature
verification is used. It would be nice to fix that.

Ideally we could have something like CONFIG_IMAGE_LEGACY to enable the
legacy feature. We would need to enable it for most boards though.
Also it breaks the rule of changing the behaviour of existing
features. CONFIG_IMAGE_NO_LEGACY?

A rather more convoluted approach might be something awful like this
in config_defaults:

#ifdef CONFIG_FIT_SIGNATURE_VERIFICATION
# ifdef CONFIG_IMAGE_LEGACY_SIDE_DOOR
#  define CONFIG_IMAGE_LEGACY
# endif
#else
#define CONFIG_IMAGE_LEGACY
#endif

This means that legacy is on by default, unless signature verification
is enabled, in which case the default flips. But I worry that it might
only confuse people. This seems like a Wolfgang / Tom question :-)



 That way the legacy stuff is removed automatically upon requesting
 verification unless defined otherwise. When you fail to boot an unsigned
 legacy kernel then its kind of obvious that you have to solve something but
 if you implement verified boot and
 forget this new variable then you leave a security hole.

 In my last email I also discussed my confusion regard the 'required'
 variable. Similar argument to the above plus some other thoughts.


 Was this EMail on the U-Boot ML? I could not find it...
 Can you send a link?

 bye,
 Heiko

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


Re: [U-Boot] [PATCH] imx: ventana: add HDMI and LVDS display capability

2014-05-09 Thread Stefano Babic
On 26/04/2014 00:39, Tim Harvey wrote:
 Signed-off-by: Tim Harvey thar...@gateworks.com
 ---


Applied after fixing the following checkpatch errors:

ERROR: return is not a function, parentheses are not required
#45: FILE: board/gateworks/gw_ventana/gw_ventana.c:383:
+   return ((0 == i2c_set_bus_num(dev-bus))

CHECK: Logical continuations should be on the previous line
#46: FILE: board/gateworks/gw_ventana/gw_ventana.c:384:
+   return ((0 == i2c_set_bus_num(dev-bus))
+   

total: 1 errors, 0 warnings, 1 checks, 180 lines checked

Best regards,
Stefano Babic


-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] imx6: ventana: fix system-serial dt property

2014-05-09 Thread Stefano Babic
On 25/04/2014 18:18, Tim Harvey wrote:
 Fix typo in setting of system-serial property causing the prop len to be
 off by 1.
 
 Signed-off-by: Tim Harvey thar...@gateworks.com
 ---
  board/gateworks/gw_ventana/gw_ventana.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/board/gateworks/gw_ventana/gw_ventana.c 
 b/board/gateworks/gw_ventana/gw_ventana.c
 index f38a777..79b3e01 100644
 --- a/board/gateworks/gw_ventana/gw_ventana.c
 +++ b/board/gateworks/gw_ventana/gw_ventana.c
 @@ -1278,7 +1278,7 @@ void ft_board_setup(void *blob, bd_t *bd)
  
   /* board serial number */
   fdt_setprop(blob, 0, system-serial, getenv(serial#),
 - strlen(getenv(serial#) + 1));
 + strlen(getenv(serial#)) + 1);
  
   /* board (model contains model from device-tree) */
   fdt_setprop(blob, 0, board, info-model,
 

Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] imx: ventana: Convert to generic board

2014-05-09 Thread Stefano Babic
On 26/04/2014 00:17, Tim Harvey wrote:
 Enable CONFIG_SYS_GENERIC_BOARD on ventana.
 
 Signed-off-by: Tim Harvey thar...@gateworks.com
 ---
  include/configs/gw_ventana.h | 2 ++
  1 file changed, 2 insertions(+)
 
 diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h
 index b984f27..335f2ff 100644
 --- a/include/configs/gw_ventana.h
 +++ b/include/configs/gw_ventana.h
 @@ -24,6 +24,8 @@
  #define CONFIG_SERIAL_TAG
  #define CONFIG_REVISION_TAG
  
 +#define CONFIG_SYS_GENERIC_BOARD
 +
  /* Size of malloc() pool */
  #define CONFIG_SYS_MALLOC_LEN(10 * 1024 * 1024)
  
 

Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic


-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 1/2] wandboard: add Future Eletronics 7 WVGA LCD extension board

2014-05-09 Thread Stefano Babic
On 02/05/2014 00:02, Otavio Salvador wrote:
 This adds support for the 7 WVGA produced by Future Eletronics and
 make it dynamically detect if it is connected or not based on the
 touchscreen controller.
 
 Signed-off-by: Otavio Salvador ota...@ossystems.com.br
 ---
 

Applied after fixing the following compiler warning:

board/wandboard/wandboard.c: In function 'setup_display':
board/wandboard/wandboard.c:336:17: warning: unused variable 'iomux'
[-Wunused-variable]

Best regards,
Stefano Babic


-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 2/2] wandboard: Pass video kernel arguments for HDMI and LCD

2014-05-09 Thread Stefano Babic
On 02/05/2014 00:02, Otavio Salvador wrote:
 This checks if the 7 WVGA produced by Future Eletronics is detected
 and pass the needed kernel arguments for it to work.
 
 Signed-off-by: Otavio Salvador ota...@ossystems.com.br
 ---

Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic


-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/4] bootm: allow to disable legacy image format

2014-05-09 Thread Wolfgang Denk
Dear Simon,

In message CAPnjgZ1_Cf-eu592YqF0=th7mt1da6gh7pv1lxaf79kv8lw...@mail.gmail.com 
you wrote:
 
 I agree that it might be dangerous to allow legacy boot when signature
 verification is used. It would be nice to fix that.

I think there is general agreement on this point.

 This means that legacy is on by default, unless signature verification
 is enabled, in which case the default flips. But I worry that it might
 only confuse people. This seems like a Wolfgang / Tom question :-)

OK, here is my 0.02€ to it:

I think, no matter how we implement it, this should exactly the
behaviour.  Average users tend to avoid reading documentation, so if
they enable signature verification the most likely want a secure
system, so we should give them just that.  Only if someone really
knows what he is doing he should be able to enable support for
(insecure) legacy images.

As for the implementation - yes, the
#ifdef CONFIG_FIT_SIGNATURE_VERIFICATION
approach indeed does not look very nice, but then, it appears to be
the straightforward implementation of what we want to do?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Time is an illusion perpetrated by the manufacturers of space.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Why is u-boot SPL reading u-boot.img twice [Zynq z7c02]?

2014-05-09 Thread Heshsham Abdul Basit
Hi,

Target: Zynq z7c02

Whenever I run boot.bin generated in TOPDIR/u-boot source  after
compiling u-boot source,

I observe it reads u-boot.img twice:

U-Boot SPL printing from common/spl/spl.c 2014.01-dirty (May 06 2014 - 16:48:05)

mmc boot, reading file arch/arm/cpu/armv7/zynq/spl.c

reading u-boot.img

reading u-boot.img

Why is it reading twice?

Thanks and regards,

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


[U-Boot] [PATCH v2] dfu: mmc: Provide support for eMMC boot partition access

2014-05-09 Thread Lukasz Majewski
Before this patch it was only possible to access the default eMMC HW
partition. By partition selection I mean the access to eMMC via the
ext_csd[179] register programming.

It sometimes happens that it is necessary to write to other partitions.
This patch adds extra attribute to raw sub type of the dfu_alt_info
environment variable (e.g. boot-mmc.bin raw 0x0 0x200 mmcpart 1;)

It saves the original boot value and restores it after storing the file.

Signed-off-by: Lukasz Majewski l.majew...@samsung.com
---
Changes for v2:
- Adjust the code to be applicable on top of newest u-boot-usb branch
---
 drivers/dfu/dfu_mmc.c |   46 ++
 include/dfu.h |3 +++
 2 files changed, 49 insertions(+)

diff --git a/drivers/dfu/dfu_mmc.c b/drivers/dfu/dfu_mmc.c
index 5e10ea7..63cc876 100644
--- a/drivers/dfu/dfu_mmc.c
+++ b/drivers/dfu/dfu_mmc.c
@@ -18,11 +18,29 @@ static unsigned char __aligned(CONFIG_SYS_CACHELINE_SIZE)
dfu_file_buf[CONFIG_SYS_DFU_MAX_FILE_SIZE];
 static long dfu_file_buf_len;
 
+static int mmc_access_part(struct dfu_entity *dfu, struct mmc *mmc, int part)
+{
+   int ret;
+
+   if (part == mmc-part_num)
+   return 0;
+
+   ret = mmc_switch_part(dfu-dev_num, part);
+   if (ret) {
+   error(Cannot switch to partition %d\n, part);
+   return ret;
+   }
+   mmc-part_num = part;
+
+   return 0;
+}
+
 static int mmc_block_op(enum dfu_op op, struct dfu_entity *dfu,
u64 offset, void *buf, long *len)
 {
struct mmc *mmc = find_mmc_device(dfu-dev_num);
u32 blk_start, blk_count, n = 0;
+   int ret, part_num_bkp = 0;
 
/*
 * We must ensure that we work in lba_blk_size chunks, so ALIGN
@@ -39,6 +57,13 @@ static int mmc_block_op(enum dfu_op op, struct dfu_entity 
*dfu,
return -EINVAL;
}
 
+   if (dfu-data.mmc.hw_partition = 0) {
+   part_num_bkp = mmc-part_num;
+   ret = mmc_access_part(dfu, mmc, dfu-data.mmc.hw_partition);
+   if (ret)
+   return ret;
+   }
+
debug(%s: %s dev: %d start: %d cnt: %d buf: 0x%p\n, __func__,
  op == DFU_OP_READ ? MMC READ : MMC WRITE, dfu-dev_num,
  blk_start, blk_count, buf);
@@ -57,9 +82,17 @@ static int mmc_block_op(enum dfu_op op, struct dfu_entity 
*dfu,
 
if (n != blk_count) {
error(MMC operation failed);
+   if (dfu-data.mmc.hw_partition = 0)
+   mmc_access_part(dfu, mmc, part_num_bkp);
return -EIO;
}
 
+   if (dfu-data.mmc.hw_partition = 0) {
+   ret = mmc_access_part(dfu, mmc, part_num_bkp);
+   if (ret)
+   return ret;
+   }
+
return 0;
 }
 
@@ -194,6 +227,8 @@ int dfu_read_medium_mmc(struct dfu_entity *dfu, u64 offset, 
void *buf,
  * 2nd and 3rd:
  * lba_start and lba_size, for raw write
  * mmc_dev and mmc_part, for filesystems and part
+ * 4th (optional):
+ * mmcpart num (access to HW eMMC partitions)
  */
 int dfu_fill_entity_mmc(struct dfu_entity *dfu, char *s)
 {
@@ -233,11 +268,22 @@ int dfu_fill_entity_mmc(struct dfu_entity *dfu, char *s)
return -ENODEV;
}
 
+   dfu-data.mmc.hw_partition = -EINVAL;
if (!strcmp(entity_type, raw)) {
dfu-layout = DFU_RAW_ADDR;
dfu-data.mmc.lba_start = second_arg;
dfu-data.mmc.lba_size  = third_arg;
dfu-data.mmc.lba_blk_size  = mmc-read_bl_len;
+
+   /*
+* Check for an extra entry at dfu_alt_info env variable
+* specifying the mmc HW defined partition number
+*/
+   if (s)
+   if (!strcmp(strsep(s,  ), mmcpart))
+   dfu-data.mmc.hw_partition =
+   simple_strtoul(s, NULL, 0);
+
} else if (!strcmp(entity_type, part)) {
disk_partition_t partinfo;
block_dev_desc_t *blk_dev = mmc-block_dev;
diff --git a/include/dfu.h b/include/dfu.h
index 986598e..26ffbc8 100644
--- a/include/dfu.h
+++ b/include/dfu.h
@@ -43,6 +43,9 @@ struct mmc_internal_data {
unsigned int lba_size;
unsigned int lba_blk_size;
 
+   /* eMMC HW partition access */
+   int hw_partition;
+
/* FAT/EXT */
unsigned int dev;
unsigned int part;
-- 
1.7.10.4

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


Re: [U-Boot] [i2c] Pull request

2014-05-09 Thread Tom Rini
On Thu, May 08, 2014 at 07:05:40AM +0200, Heiko Schocher wrote:

 Hello Tom,
 
 please pull from u-boot-i2c.git, thanks!
 
 The following changes since commit 173d294b94cfec10063a5be40934d6d8fb7981ce:
 
   Merge branch 'serial' of git://www.denx.de/git/u-boot-microblaze 
 (2014-05-06 14:55:45 -0400)
 
 are available in the git repository at:
 
 
   git://git.denx.de/u-boot-i2c.git master
 
 for you to fetch changes up to 5146fc2b37a3098f0973b2f2339e069adfc7d272:
 
   i2c: zynq: Fixed compilation errors when using DEBUG (2014-05-08 07:03:37 
 +0200)
 
 
 Jesper B. Christensen (1):
   i2c: zynq: Fixed compilation errors when using DEBUG
 
  drivers/i2c/zynq_i2c.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

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] zynq: add empty xil_io.h to avoid compile error

2014-05-09 Thread Tom Rini
On Thu, May 08, 2014 at 10:29:25AM +0200, Michal Simek wrote:
 On 05/08/2014 10:13 AM, Masahiro Yamada wrote:
  ps7_init.c exported by hw project has #include xil_io.h line
  but U-Boot does not have xil_io.h.
  
  So we get an error on SPL build:
ps7_init.c:12581:20: fatal error: xil_io.h: No such file or directory
  
  We can delete the include directive in ps7_init.c to avoid this error.
  But it is painful to do this every time we export ps7_init.c file.
  
  Instead, we can put an empty xil_io.h in the same directory
  so we can directly copy ps7_init.c as is.
  
  Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com
  Cc: Michal Simek michal.si...@xilinx.com
  ---
   board/xilinx/zynq/xil_io.h | 13 +
   1 file changed, 13 insertions(+)
   create mode 100644 board/xilinx/zynq/xil_io.h
  
  diff --git a/board/xilinx/zynq/xil_io.h b/board/xilinx/zynq/xil_io.h
  new file mode 100644
  index 000..e59a977
  --- /dev/null
  +++ b/board/xilinx/zynq/xil_io.h
  @@ -0,0 +1,13 @@
  +/*
  + * SPDX-License-Identifier:GPL-2.0+
  + */
  +
  +#ifndef XIL_IO_H   /* prevent circular inclusions */
  +#define XIL_IO_H
  +
  +/*
  + * This empty file is here because ps7_init.c exported by hw project
  + * has #include xil_io.h line.
  + */
  +
  +#endif /* XIL_IO_H */
  
 
 This is good if this is acceptable by others.
 
 Acked-by: Michal Simek mon...@monstr.eu

I can live with this too.

Acked-by: Tom Rini tr...@ti.com

-- 
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] Building under Cygwin - -ansi flag?

2014-05-09 Thread Tom Rini
On Thu, May 08, 2014 at 02:49:35PM +0300, Vasili Galka wrote:
 Hi,
 
 I'm building u-boot (am335x_evm config) using arm-none-eabi toolchain
 under Cygwin. When trying to build unmodified v2014.04 tag I get some
 errors. However, if I remove the -ansi flag from the Makefile,
 everything builds fine:
 
 -ifeq ($(HOSTOS),cygwin)
 -HOSTCFLAGS+= -ansi
 -endif
 
 I tried tracking down where those lines came from and why building
 under Cygwin requires separate treatment. I found our this originates
 from the following commit (dated Jan 2008):
 
   SHA-1: 883e3925d99a8dd69c5b0201cba5b1887f88f95c
 
   * Fix build problems under Cygwin
 
   This patch allows u-boot to build without error in a cygwin
   environment.  Cygwin does not define __u64 in it's
   include/asm/types.h file.  The -idirafter flag in the u-boot
   build causes the inclusion of the cygwin types.h file as opposed
   to u-bot/include/asm/types.h file which does define __u64.
   Subsequently, sha1.c compile fails due to unknown symbol.
 
   Signed-off-by: Brian Miller raptorbr...@netscape.net
 
 This comment does not really explain why -ansi flag is required.

-ansi changes include order perhaps?

 Personally, I don't see any reason for it.
 
 Maybe it should be removed at all?

Yes, but can you please test a few more builds?  If you're able to use
MAKEALL, please run MAKEALL -a arm

-- 
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] [sparc] Pull request

2014-05-09 Thread Tom Rini
On Thu, May 08, 2014 at 09:55:16PM +0200, Daniel Hellstrom wrote:

 Hello Tom,
 
 Please pull from u-boot-sparc.git, thanks! One of the fixes enables
 the SPARC platform to build again, sorry for the long delay and
 thanks for informing me about the problem.
 
 The following changes since commit 09865465821fd35eabedcd9f102f1d576c626ad8:
 Michal Simek (1):
 serial: zynq: Fix typo in suffix function name
 
 are available in the git repository at:
 
 git://git.denx.de/u-boot-sparc.git master
 
 Daniel Hellstrom (2):
 leon: use CONFIG_SYS_HZ to config timer prescaler
 leon: implement missing get_tbclk()
 
 arch/sparc/cpu/leon2/cpu_init.c | 22 ++
 arch/sparc/cpu/leon3/cpu_init.c | 22 ++
 2 files changed, 28 insertions(+), 16 deletions(-)

Applied to u-boot/master, thanks!

That said, I don't see the patches having been posted to the ML first,
which is required.  I did a git diff and everything looks fine, and I
want to put sparc back into my loop so I've applied it however.

-- 
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] [sparc] Pull request

2014-05-09 Thread Daniel Hellstrom


On 05/09/2014 05:12 PM, Tom Rini wrote:

Applied to u-boot/master, thanks!

Thanks!

That said, I don't see the patches having been posted to the ML first,
which is required.  I did a git diff and everything looks fine, and I
want to put sparc back into my loop so I've applied it however.

You are right, I forgot about that. I will do that next time.

Regards,
Daniel Hellstrom

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


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

2014-05-09 Thread Tom Rini
On Fri, May 09, 2014 at 11:56:56AM +0200, Albert ARIBAUD wrote:

 Hello Tom,
 
 The following changes since commit
 173d294b94cfec10063a5be40934d6d8fb7981ce:
 
   Merge branch 'serial' of git://www.denx.de/git/u-boot-microblaze
   (2014-05-06 14:55:45 -0400)
 
 are available in the git repository at:
 
 
   git://git.denx.de/u-boot-arm master
 
 for you to fetch changes up to d2a3e911390f9fc4d8c0ee4b3c7fc75f4fd3fd19:
 
   Merge branch 'u-boot/master' (2014-05-09 11:50:14 +0200)
 
 Note that there was a trivial merge conflict between ARM and mainline
 trees on drivers/net/Makefile:
 
HEAD
   obj-$(CONFIG_INCA_IP_SWITCH) += inca-ip_sw.o
   obj-$(CONFIG_DRIVER_TI_KEYSTONE_NET) += keystone_net.o
   ===
u-boot/master
 
 This is solved in the ARM ToT commit d2a3e911.
 
 
 
 Albert ARIBAUD (3):
   Merge branch 'u-boot-tegra/master' into 'u-boot-arm/master'
   Merge branch 'u-boot-ti/master' into 'u-boot-arm/master'
   Merge branch 'u-boot/master'
 
 Karicheri, Muralidharan (6):
   tools: mkimage: add support for gpimage format
   NAND: DaVinci: allow forced disable of subpage writes
   i2c, davinci: move i2c_defs.h to the drivers/i2c directory
   spi: davinci: add support for multiple bus and chip select
   k2hk-evm: add configuration for spi1 and spi2 support
   keystone2: net: add keystone ethernet driver
 
 Manish Badarkhe (1):
   arm, da850: staticize funtions
 
 Nishanth Menon (11):
   OMAP: common: consolidate fake USB ethernet MAC address creation
   omap3/sys_info: provide interface to read die id
   OMAP3: beagle-xm: generate fake USB ethernet MAC address from
 dieid omap3: zoom1: enable CONFIG_SYS_GENERIC_BOARD
   OMAP3: zoom1: Configure GPMC for Ethernet
   OMAP3: zoom1: enable LAN9211
   omap3: zoom1: enable common network commands
   omap3: zoom1: disable JFFS2 and enable FS_GENERIC
   omap3: zoom1: enable bootz
   omap3: zoom1: fix default console
   omap3: zoom1: switch to generic ti_omap3_common config header
 
 Poddar, Sourav (1):
   spi: ti_qspi: Add delay for successful bulk erase.
 
 Rob Herring (2):
   ARM: highbank: use config_distro_defaults.h
   ARM: highbank: use default prompt
 
 Stefan Agner (3):
   usb: tegra: fix USB2 powerdown for Tegra30 and later
   usb: tegra: fix PHY configuration
   usb: tegra: combine header file
 
 Stephen Warren (14):
   ARM: tegra: pinctrl: remove func_safe
   ARM: tegra: pinctrl: remove vddio
   ARM: tegra: pinctrl: make pmux_func values consistent on Tegra20
   ARM: tegra: prototype pinmux_init() in board.h
   ARM: tegra: use apb_misc.h in more places
   ARM: tegra: pinctrl: remove duplication
   ARM: tegra: reduce public pinmux API
   ARM: tegra: pinmux naming consistency fixes
   ARM: tegra: Tegra20 pinmux cleanup
   ARM: tegra: Tegra30 pinmux cleanup
   ARM: tegra: Tegra114 pinmux cleanup
   ARM: tegra: Tegra124 pinmux cleanup
   ARM: tegra: add Jetson TK1 board
   ARM: tegra: pack pinmux data tables tighter
 
 Tom Rini (22):
   fw_env.c: Switch get_config to use '%ms' in sscanf
   env_mmc.c: Allow environment to be used within SPL
   env_mmc.c: Remove NULL check on tmp_env1/2
   mtd: Add a CONFIG_SPL_MTD_SUPPORT for a more full NAND subsystem
 in SPL mtd: Build nand_util.o for CONFIG_ENV_IS_IN_NAND in SPL
   am335x_evm: Make SPL_OS also check the boot_os variable for
 falcon mode README: Add CONFIG_SPL_OS_BOOT to README
   README.falcon: Document environment variables for falcon mode
   a3m071: Make spl_start_uboot test like getenv_yesno does
   spl_mmc/CONFIG_SPL_OS_BOOT: Allow environment to determine what
 to boot TI: Add, use a DEFAULT_LINUX_BOOT_ENV environment string
   am335x_evm: Update the ramdisk args, we pass things in just fine
 via DT am43xx_evm: Update the ramdisk args, we pass things in just fine
 via DT TI:omap5: Move CONFIG_ENV_SIZE to board config files
   TI:armv7: Change Falcon Mode DT load address
   am335x_evm: Drop SPI SPL support from the default build
   SPL:SPI: Add Falcon Mode support
   dra7xx_evm: Add QSPI_4 support, qspiboot build target
   TI:armv7: Switch to CONFIG_SYS_BOARD_GENERIC
   TI:omap3: Convert omap3_beagle to ti_omap3_common.h
   am335x: Switch to CONFIG_SKIP_LOWLEVEL_INIT from guarding SPL or
 NOR_BOOT am43xx_evm: Drop SPI SPL
 
 Vitaly Andrianov (5):
   fdt: call ft_board_setup_ex() at the end of image_setup_libfdt()
   arm: add support for arch timer
   i2c, davinci: convert driver to new mutlibus/mutliadapter
 framework k2hk: add support for k2hk SOC and EVM
   keystone2: add keystone multicore navigator driver
 
 Wolfgang Denk (3):
   ARM: OMAP: remove sr32() from OMAP board code
   ARM: OMAP: hide custom bit manipulation function sr32()
   ARM: OMAP: replace 

[U-Boot] [PATCH v4] mx6sabred: Add PFUZE100 PMIC support

2014-05-09 Thread Fabio Estevam
From: Fabio Estevam fabio.este...@freescale.com

mx6sabresd boards have a PFUZE100 PMIC connected to I2C2 bus.

Add support for it

Signed-off-by: Fabio Estevam fabio.este...@freescale.com
---
Changes since v3:
- Rebase against latest u-boot.imx and call 'power_pfuze100_init'
Changes since v2:
- Remove uneeded CONFIG_BOARD_LATE_INI inside mx6sabresd.h as this is already
included in mx6sabre_common.h
Changes since v1:
- Init the PMIC inside board_late_init()

Stefano,

I tried your suggestion of calling the pmic init inside power_init_board(), but
pmic dump command fails, so I am calling the pmic init from board_late_init()
as done on other boards for now.
 board/freescale/mx6sabresd/mx6sabresd.c | 84 +
 include/configs/mx6sabresd.h| 12 +
 include/power/pfuze100_pmic.h   |  4 ++
 3 files changed, 100 insertions(+)

diff --git a/board/freescale/mx6sabresd/mx6sabresd.c 
b/board/freescale/mx6sabresd/mx6sabresd.c
index 3e314da..d7c4b4f 100644
--- a/board/freescale/mx6sabresd/mx6sabresd.c
+++ b/board/freescale/mx6sabresd/mx6sabresd.c
@@ -12,6 +12,7 @@
 #include asm/arch/mx6-pins.h
 #include asm/errno.h
 #include asm/gpio.h
+#include asm/imx-common/mxc_i2c.h
 #include asm/imx-common/iomux-v3.h
 #include asm/imx-common/boot_mode.h
 #include asm/imx-common/video.h
@@ -23,6 +24,9 @@
 #include asm/arch/crm_regs.h
 #include asm/io.h
 #include asm/arch/sys_proto.h
+#include i2c.h
+#include power/pmic.h
+#include power/pfuze100_pmic.h
 DECLARE_GLOBAL_DATA_PTR;
 
 #define UART_PAD_CTRL  (PAD_CTL_PUS_100K_UP |  \
@@ -39,6 +43,14 @@ DECLARE_GLOBAL_DATA_PTR;
 #define SPI_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_SPEED_MED | \
  PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST)
 
+#define I2C_PAD_CTRL  (PAD_CTL_PUS_100K_UP |   \
+   PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS |   \
+   PAD_CTL_ODE | PAD_CTL_SRE_FAST)
+
+#define I2C_PMIC   1
+
+#define I2C_PAD MUX_PAD_CTRL(I2C_PAD_CTRL)
+
 int dram_init(void)
 {
gd-ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE);
@@ -129,6 +141,19 @@ iomux_v3_cfg_t const ecspi1_pads[] = {
MX6_PAD_KEY_ROW1__GPIO4_IO09 | MUX_PAD_CTRL(NO_PAD_CTRL),
 };
 
+static struct i2c_pads_info i2c_pad_info1 = {
+   .scl = {
+   .i2c_mode = MX6_PAD_KEY_COL3__I2C2_SCL | I2C_PAD,
+   .gpio_mode = MX6_PAD_KEY_COL3__GPIO4_IO12 | I2C_PAD,
+   .gp = IMX_GPIO_NR(4, 12)
+   },
+   .sda = {
+   .i2c_mode = MX6_PAD_KEY_ROW3__I2C2_SDA | I2C_PAD,
+   .gpio_mode = MX6_PAD_KEY_ROW3__GPIO4_IO13 | I2C_PAD,
+   .gp = IMX_GPIO_NR(4, 13)
+   }
+};
+
 static void setup_spi(void)
 {
imx_iomux_v3_setup_multiple_pads(ecspi1_pads, ARRAY_SIZE(ecspi1_pads));
@@ -426,6 +451,64 @@ int board_init(void)
 #ifdef CONFIG_MXC_SPI
setup_spi();
 #endif
+   setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, i2c_pad_info1);
+
+   return 0;
+}
+
+static int pfuze_init(void)
+{
+   struct pmic *p;
+   int ret;
+   unsigned int reg;
+
+   ret = power_pfuze100_init(I2C_PMIC);
+   if (ret)
+   return ret;
+
+   p = pmic_get(PFUZE100_PMIC);
+   ret = pmic_probe(p);
+   if (ret)
+   return ret;
+
+   pmic_reg_read(p, PFUZE100_DEVICEID, reg);
+   printf(PMIC:  PFUZE100 ID=0x%02x\n, reg);
+
+   /* Increase VGEN3 from 2.5 to 2.8V */
+   pmic_reg_read(p, PFUZE100_VGEN3VOL, reg);
+   reg = ~0xf;
+   reg |= 0xa;
+   pmic_reg_write(p, PFUZE100_VGEN3VOL, reg);
+
+   /* Increase VGEN5 from 2.8 to 3V */
+   pmic_reg_read(p, PFUZE100_VGEN5VOL, reg);
+   reg = ~0xf;
+   reg |= 0xc;
+   pmic_reg_write(p, PFUZE100_VGEN5VOL, reg);
+
+   /* Set SW1AB stanby volage to 0.975V */
+   pmic_reg_read(p, PFUZE100_SW1ABSTBY, reg);
+   reg = ~0x3f;
+   reg |= 0x1b;
+   pmic_reg_write(p, PFUZE100_SW1ABSTBY, reg);
+
+   /* Set SW1AB/VDDARM step ramp up time from 16us to 4us/25mV */
+   pmic_reg_read(p, PUZE_100_SW1ABCONF, reg);
+   reg = ~0xc0;
+   reg |= 0x40;
+   pmic_reg_write(p, PUZE_100_SW1ABCONF, reg);
+
+   /* Set SW1C standby voltage to 0.975V */
+   pmic_reg_read(p, PFUZE100_SW1CSTBY, reg);
+   reg = ~0x3f;
+   reg |= 0x1b;
+   pmic_reg_write(p, PFUZE100_SW1CSTBY, reg);
+
+   /* Set SW1C/VDDSOC step ramp up time from 16us to 4us/25mV */
+   pmic_reg_read(p, PFUZE100_SW1CCONF, reg);
+   reg = ~0xc0;
+   reg |= 0x40;
+   pmic_reg_write(p, PFUZE100_SW1CCONF, reg);
 
return 0;
 }
@@ -446,6 +529,7 @@ int board_late_init(void)
 #ifdef CONFIG_CMD_BMODE
add_board_boot_modes(board_boot_modes);
 #endif
+   pfuze_init();
 
return 0;
 }
diff --git a/include/configs/mx6sabresd.h b/include/configs/mx6sabresd.h
index 0fa6573..e666ebb 100644
--- a/include/configs/mx6sabresd.h
+++ b/include/configs/mx6sabresd.h
@@ -59,4 +59,16 @@
 #define 

Re: [U-Boot] Why is u-boot SPL reading u-boot.img twice [Zynq z7c02]?

2014-05-09 Thread Tom Rini
On Fri, May 09, 2014 at 07:56:21PM +0530, Heshsham Abdul Basit wrote:

 Hi,
 
 Target: Zynq z7c02
 
 Whenever I run boot.bin generated in TOPDIR/u-boot source  after
 compiling u-boot source,
 
 I observe it reads u-boot.img twice:
 
 U-Boot SPL printing from common/spl/spl.c 2014.01-dirty (May 06 2014 - 
 16:48:05)
 
 mmc boot, reading file arch/arm/cpu/armv7/zynq/spl.c
 
 reading u-boot.img
 
 reading u-boot.img
 
 Why is it reading twice?

The first read is only reading the header to see where to load to for
real.  The second read is of the whole file.  See common/spl/spl_fat.c

-- 
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 2/2] omap3_beagle: xM A/B validate new dtb exits in file system

2014-05-09 Thread Tom Rini
On Fri, May 02, 2014 at 03:17:59PM -0500, Robert Nelson wrote:
 On Fri, May 2, 2014 at 3:15 PM, robertcnelson robertcnel...@gmail.com wrote:
  From: Robert Nelson robertcnel...@gmail.com
 
  Fall back to previous dtb used when omap3-beagle-xm-ab.dtb doesn't exist in 
  file system
 
  Signed-off-by: Robert Nelson robertcnel...@gmail.com
  CC: Tom Rini tr...@ti.com
  CC: Nishanth Menon n...@ti.com
  ---
   include/configs/omap3_beagle.h | 8 +++-
   1 file changed, 7 insertions(+), 1 deletion(-)
 
  diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
  index a1d38ff..06b9006 100644
  --- a/include/configs/omap3_beagle.h
  +++ b/include/configs/omap3_beagle.h
  @@ -248,6 +248,12 @@
  setenv fdtfile omap3-beagle-xm.dtb; fi;  \
  if test $fdtfile = undefined; then  \
  echo WARNING: Could not determine device tree to 
  use; fi; \0 \
  +   validatefdt= \
  +   if test $beaglerev = xMAB; then  \
  +   if test ! -e mmc ${bootpart} 
  ${bootdir}/${fdtfile}; then  \
  +   setenv fdtfile omap3-beagle-xm.dtb;  \
  +   fi;  \
  +   fi; \0 \
  bootenv=uEnv.txt\0 \
  loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}\0 \
  importbootenv=echo Importing environment from mmc ...;  \
  @@ -263,7 +269,7 @@
  rootfstype=${ramrootfstype}\0 \
  loadramdisk=load mmc ${bootpart} ${rdaddr} 
  ${bootdir}/${ramdisk}\0 \
  loadimage=load mmc ${bootpart} ${loadaddr} 
  ${bootdir}/${bootfile}\0 \
  -   loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0 \
  +   loadfdt=run validatefdt; load mmc ${bootpart} ${fdtaddr} 
  ${bootdir}/${fdtfile}\0 \
  mmcboot=echo Booting from mmc ...;  \
  run mmcargs;  \
  bootm ${loadaddr}\0 \
  --
  1.9.2
 
 Little git send-email failure here, I was trying to send this second
 as patch as [RFC].
 
 This is my first thoughts of keeping backward compatibility with less
 then v3.15-rc3 kernels.
 
 Thoughts?

Work for me since everything else in the sequence is MMC-centric.

Acked-by: Tom Rini tr...@ti.com

-- 
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] [RFC PATCH v2 0/13] Enable driver model for GPIOs on Tegra

2014-05-09 Thread Simon Glass
Now that driver model is part of U-Boot, the task of converting drivers over
to it begins. GPIO is one of the easiest to convert, since it already has a
sandbox driver and a uclass driver.

The Tegra GPIO driver is relatively simple since it has a linear numbering
and already uses the generic GPIO framework.

Along the way some minor deficiencies were found with driver model - these
are corrected in this series.

Also it was difficult to exhaustively test the new driver against the old,
so a new 'iotrace' framework was created to make this easier for future
driver authors.

This series has been tested on Trimslice (Tegra 20). I will try it on a
beaver also.

Changes in v3:
- Remove use of bool in header file to avoid exynos5 build failure
- Create a symlink for each arch to dt-bindings
- Bring in GPIO bindings for tegra{30,114,124} also
- Fix typo in commit subject
- Enable dm command in this patch instead of the next
- Move dm command enable to previous patch
- Use gpio number for the internal helper functions

Changes in v2:
- Add a new patch for an I/O tracing feature
- Add a new patch to enable iotrace for arm
- Add a new patch to enable iotrace for sandbox
- Add new patch to support include files for .dts files
- Add new patch to bring in Tegra device tree files from linux
- Update README to encourage conversion to driver model
- Add new patch to use case-insensitive comparison for GPIO banks
- Add new patch to add missing header files in lists and root
- Add new patch to deal with const-ness of the global_data pointer
- Add new patch to allow driver model tests only for sandbox
- Add new patch to fix printf() strings in the 'dm' command
- Split out a separate patch to enable driver model for tegra
- Split out driver model changes into separate patches
- Correct bugs found during testing

Simon Glass (13):
  Add an I/O tracing feature
  arm: Support iotrace feature
  sandbox: Support iotrace feature
  Makefile: Support include files for .dts files
  tegra: dts: Bring in GPIO bindings from linux
  dm: Update README to encourage conversion to driver model
  dm: Use case-insensitive comparison for GPIO banks
  dm: Add missing header files in lists and root
  dm: Cast away the const-ness of the global_data pointer
  dm: Allow driver model tests only for sandbox
  dm: Fix printf() strings in the 'dm' command
  tegra: Enable driver model
  tegra: Convert tegra GPIO driver to use driver model

 README |  28 ++
 arch/arm/dts/include/dt-bindings   |   1 +
 arch/arm/dts/tegra114.dtsi |  21 +-
 arch/arm/dts/tegra124.dtsi |  23 +-
 arch/arm/dts/tegra20.dtsi  |  15 +-
 arch/arm/dts/tegra30.dtsi  |  21 +-
 arch/arm/include/asm/arch-tegra/gpio.h |  14 +-
 arch/arm/include/asm/io.h  |   3 +
 arch/microblaze/dts/include/dt-bindings|   1 +
 arch/sandbox/dts/include/dt-bindings   |   1 +
 arch/sandbox/include/asm/io.h  |  10 +
 arch/x86/dts/include/dt-bindings   |   1 +
 board/nvidia/seaboard/seaboard.c   |   2 +-
 common/Makefile|   2 +
 common/cmd_iotrace.c   |  73 +
 common/iotrace.c   | 169 +++
 drivers/core/lists.c   |   1 +
 drivers/core/root.c|   7 +-
 drivers/core/uclass.c  |   2 +-
 drivers/gpio/gpio-uclass.c |   2 +-
 drivers/gpio/tegra_gpio.c  | 313 +
 include/configs/sandbox.h  |   3 +
 include/configs/tegra-common.h |   4 +
 include/dm/device-internal.h   |   4 +
 include/dt-bindings/gpio/gpio.h|  15 +
 include/dt-bindings/gpio/tegra-gpio.h  |  51 
 include/dt-bindings/interrupt-controller/arm-gic.h |  22 ++
 include/dt-bindings/interrupt-controller/irq.h |  19 ++
 include/iotrace.h  | 104 +++
 scripts/Makefile.lib   |   1 +
 test/dm/Makefile   |   2 +
 test/dm/cmd_dm.c   |  19 +-
 32 files changed, 849 insertions(+), 105 deletions(-)
 create mode 12 arch/arm/dts/include/dt-bindings
 create mode 12 arch/microblaze/dts/include/dt-bindings
 create mode 12 arch/sandbox/dts/include/dt-bindings
 create mode 12 arch/x86/dts/include/dt-bindings
 create mode 100644 common/cmd_iotrace.c
 create mode 100644 common/iotrace.c
 create mode 100644 include/dt-bindings/gpio/gpio.h
 create mode 100644 include/dt-bindings/gpio/tegra-gpio.h
 create mode 100644 include/dt-bindings/interrupt-controller/arm-gic.h
 create mode 100644 

[U-Boot] [RFC PATCH v2 02/13] arm: Support iotrace feature

2014-05-09 Thread Simon Glass
Support the iotrace feature for ARM, when enabled.

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

Changes in v3: None
Changes in v2:
- Add a new patch to enable iotrace for arm

 arch/arm/include/asm/io.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
index 6a1f05a..9f35fd6 100644
--- a/arch/arm/include/asm/io.h
+++ b/arch/arm/include/asm/io.h
@@ -437,4 +437,7 @@ out:
 
 #endif /* __mem_isa */
 #endif /* __KERNEL__ */
+
+#include iotrace.h
+
 #endif /* __ASM_ARM_IO_H */
-- 
1.9.1.423.g4596e3a

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


[U-Boot] [RFC PATCH v2 05/13] tegra: dts: Bring in GPIO bindings from linux

2014-05-09 Thread Simon Glass
These files are taken from Linux 3.14.

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

Changes in v3:
- Bring in GPIO bindings for tegra{30,114,124} also

Changes in v2:
- Add new patch to bring in Tegra device tree files from linux

 arch/arm/dts/tegra114.dtsi | 21 +
 arch/arm/dts/tegra124.dtsi | 23 +-
 arch/arm/dts/tegra20.dtsi  | 15 ++-
 arch/arm/dts/tegra30.dtsi  | 21 +
 include/dt-bindings/gpio/gpio.h| 15 +++
 include/dt-bindings/gpio/tegra-gpio.h  | 51 ++
 include/dt-bindings/interrupt-controller/arm-gic.h | 22 ++
 include/dt-bindings/interrupt-controller/irq.h | 19 
 8 files changed, 157 insertions(+), 30 deletions(-)
 create mode 100644 include/dt-bindings/gpio/gpio.h
 create mode 100644 include/dt-bindings/gpio/tegra-gpio.h
 create mode 100644 include/dt-bindings/interrupt-controller/arm-gic.h
 create mode 100644 include/dt-bindings/interrupt-controller/irq.h

diff --git a/arch/arm/dts/tegra114.dtsi b/arch/arm/dts/tegra114.dtsi
index f52fcf1..59434e0 100644
--- a/arch/arm/dts/tegra114.dtsi
+++ b/arch/arm/dts/tegra114.dtsi
@@ -1,3 +1,6 @@
+#include dt-bindings/gpio/tegra-gpio.h
+#include dt-bindings/interrupt-controller/arm-gic.h
+
 #include skeleton.dtsi
 
 / {
@@ -46,17 +49,17 @@
  0 143 0x04;
};
 
-   gpio: gpio {
+   gpio: gpio@6000d000 {
compatible = nvidia,tegra114-gpio, nvidia,tegra30-gpio;
reg = 0x6000d000 0x1000;
-   interrupts = 0 32 0x04
- 0 33 0x04
- 0 34 0x04
- 0 35 0x04
- 0 55 0x04
- 0 87 0x04
- 0 89 0x04
- 0 125 0x04;
+   interrupts = GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH,
+GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH,
+GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH,
+GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH,
+GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH,
+GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH,
+GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH,
+GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH;
#gpio-cells = 2;
gpio-controller;
#interrupt-cells = 2;
diff --git a/arch/arm/dts/tegra124.dtsi b/arch/arm/dts/tegra124.dtsi
index 18a8b24..a13cfe4 100644
--- a/arch/arm/dts/tegra124.dtsi
+++ b/arch/arm/dts/tegra124.dtsi
@@ -1,3 +1,6 @@
+#include dt-bindings/gpio/tegra-gpio.h
+#include dt-bindings/interrupt-controller/arm-gic.h
+
 #include skeleton.dtsi
 
 / {
@@ -46,17 +49,17 @@
  0 143 0x04;
};
 
-   gpio: gpio@6000d000 {
+   gpio: gpio@0,6000d000 {
compatible = nvidia,tegra124-gpio, nvidia,tegra30-gpio;
-   reg = 0x6000d000 0x1000;
-   interrupts = 0 32 0x04
- 0 33 0x04
- 0 34 0x04
- 0 35 0x04
- 0 55 0x04
- 0 87 0x04
- 0 89 0x04
- 0 125 0x04;
+   reg = 0x0 0x6000d000 0x0 0x1000;
+   interrupts = GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH,
+GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH,
+GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH,
+GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH,
+GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH,
+GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH,
+GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH,
+GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH;
#gpio-cells = 2;
gpio-controller;
#interrupt-cells = 2;
diff --git a/arch/arm/dts/tegra20.dtsi b/arch/arm/dts/tegra20.dtsi
index 3805750..a524f6e 100644
--- a/arch/arm/dts/tegra20.dtsi
+++ b/arch/arm/dts/tegra20.dtsi
@@ -1,3 +1,6 @@
+#include dt-bindings/gpio/tegra-gpio.h
+#include dt-bindings/interrupt-controller/arm-gic.h
+
 #include skeleton.dtsi
 
 / {
@@ -139,10 +142,18 @@
 
gpio: gpio@6000d000 {
compatible = nvidia,tegra20-gpio;
-   reg =  0x6000d000 0x1000 ;
-   interrupts =  64 65 66 67 87 119 121 ;
+   reg = 0x6000d000 0x1000;
+   interrupts = GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH,
+GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH,
+GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH,
+GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH,
+GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH,
+GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH,
+ 

[U-Boot] [RFC PATCH v2 06/13] dm: Update README to encourage conversion to driver model

2014-05-09 Thread Simon Glass
Add a note to encourage people to convert drivers to use driver model.

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

Changes in v3: None
Changes in v2:
- Update README to encourage conversion to driver model

 README | 5 +
 1 file changed, 5 insertions(+)

diff --git a/README b/README
index b226458..16485c3 100644
--- a/README
+++ b/README
@@ -5239,6 +5239,11 @@ Information structure as we define in 
include/asm-arch/u-boot.h,
 and make sure that your definition of IMAP_ADDR uses the same value
 as your U-Boot configuration in CONFIG_SYS_IMMR.
 
+Note that U-Boot now has a driver model, a unified model for drivers.
+If you are adding a new driver, plumb it into driver model. If there
+is no uclass available, you are encouraged to create one. See
+doc/driver-model.
+
 
 Configuring the Linux kernel:
 -
-- 
1.9.1.423.g4596e3a

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


[U-Boot] [RFC PATCH v2 03/13] sandbox: Support iotrace feature

2014-05-09 Thread Simon Glass
Support the iotrace feature for sandbox, and enable it, using some dummy
I/O access methods.

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

Changes in v3: None
Changes in v2:
- Add a new patch to enable iotrace for sandbox

 arch/sandbox/include/asm/io.h | 10 ++
 include/configs/sandbox.h |  3 +++
 2 files changed, 13 insertions(+)

diff --git a/arch/sandbox/include/asm/io.h b/arch/sandbox/include/asm/io.h
index 7956041..895fcb8 100644
--- a/arch/sandbox/include/asm/io.h
+++ b/arch/sandbox/include/asm/io.h
@@ -40,4 +40,14 @@ static inline void unmap_sysmem(const void *vaddr)
 /* Map from a pointer to our RAM buffer */
 phys_addr_t map_to_sysmem(const void *ptr);
 
+/* Define nops for sandbox I/O access */
+#define readb(addr) 0
+#define readw(addr) 0
+#define readl(addr) 0
+#define writeb(v, addr)
+#define writew(v, addr)
+#define writel(v, addr)
+
+#include iotrace.h
+
 #endif
diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h
index fa62cb6..8ca2a55 100644
--- a/include/configs/sandbox.h
+++ b/include/configs/sandbox.h
@@ -16,6 +16,9 @@
 
 #endif
 
+#define CONFIG_IO_TRACE
+#define CONFIG_CMD_IO_TRACE
+
 #define CONFIG_SYS_TIMER_RATE  100
 
 #define CONFIG_BOOTSTAGE
-- 
1.9.1.423.g4596e3a

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


[U-Boot] [RFC PATCH v2 07/13] dm: Use case-insensitive comparison for GPIO banks

2014-05-09 Thread Simon Glass
We want 'N0' and 'n0' to mean the same thing, so ensure that case is not
considered when naming GPIO banks.

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

Changes in v3: None
Changes in v2:
- Add new patch to use case-insensitive comparison for GPIO banks

 drivers/gpio/gpio-uclass.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-uclass.c b/drivers/gpio/gpio-uclass.c
index 56bfd11..ec605dc 100644
--- a/drivers/gpio/gpio-uclass.c
+++ b/drivers/gpio/gpio-uclass.c
@@ -58,7 +58,7 @@ int gpio_lookup_name(const char *name, struct device **devp,
uc_priv = dev-uclass_priv;
len = uc_priv-bank_name ? strlen(uc_priv-bank_name) : 0;
 
-   if (!strncmp(name, uc_priv-bank_name, len)) {
+   if (!strncasecmp(name, uc_priv-bank_name, len)) {
if (strict_strtoul(name + len, 10, offset))
continue;
if (devp)
-- 
1.9.1.423.g4596e3a

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


[U-Boot] [RFC PATCH v2 04/13] Makefile: Support include files for .dts files

2014-05-09 Thread Simon Glass
Linux supports this, and if we are to have compatible device tree files,
U-Boot should also.

Avoid giving the device tree files access to U-Boot's include/ directory.
Only include/dt-bindings is accessible.

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

Changes in v3:
- Create a symlink for each arch to dt-bindings

Changes in v2:
- Add new patch to support include files for .dts files

 arch/arm/dts/include/dt-bindings| 1 +
 arch/microblaze/dts/include/dt-bindings | 1 +
 arch/sandbox/dts/include/dt-bindings| 1 +
 arch/x86/dts/include/dt-bindings| 1 +
 scripts/Makefile.lib| 1 +
 5 files changed, 5 insertions(+)
 create mode 12 arch/arm/dts/include/dt-bindings
 create mode 12 arch/microblaze/dts/include/dt-bindings
 create mode 12 arch/sandbox/dts/include/dt-bindings
 create mode 12 arch/x86/dts/include/dt-bindings

diff --git a/arch/arm/dts/include/dt-bindings b/arch/arm/dts/include/dt-bindings
new file mode 12
index 000..0cecb3d
--- /dev/null
+++ b/arch/arm/dts/include/dt-bindings
@@ -0,0 +1 @@
+../../../../include/dt-bindings
\ No newline at end of file
diff --git a/arch/microblaze/dts/include/dt-bindings 
b/arch/microblaze/dts/include/dt-bindings
new file mode 12
index 000..0cecb3d
--- /dev/null
+++ b/arch/microblaze/dts/include/dt-bindings
@@ -0,0 +1 @@
+../../../../include/dt-bindings
\ No newline at end of file
diff --git a/arch/sandbox/dts/include/dt-bindings 
b/arch/sandbox/dts/include/dt-bindings
new file mode 12
index 000..0cecb3d
--- /dev/null
+++ b/arch/sandbox/dts/include/dt-bindings
@@ -0,0 +1 @@
+../../../../include/dt-bindings
\ No newline at end of file
diff --git a/arch/x86/dts/include/dt-bindings b/arch/x86/dts/include/dt-bindings
new file mode 12
index 000..0cecb3d
--- /dev/null
+++ b/arch/x86/dts/include/dt-bindings
@@ -0,0 +1 @@
+../../../../include/dt-bindings
\ No newline at end of file
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index a04439d..722afed 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -153,6 +153,7 @@ ld_flags   = $(LDFLAGS) $(ldflags-y)
 # Modified for U-Boot
 dtc_cpp_flags  = -Wp,-MD,$(depfile).pre.tmp -nostdinc\
 -I$(srctree)/arch/$(ARCH)/dts   \
+-I$(srctree)/arch/$(ARCH)/dts/include   \
 -undef -D__DTS__
 
 # Finds the multi-part object the current object will be linked into
-- 
1.9.1.423.g4596e3a

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


[U-Boot] [RFC PATCH v2 09/13] dm: Cast away the const-ness of the global_data pointer

2014-05-09 Thread Simon Glass
In a very few cases we need to adjust the driver model root device, such as
when setting it up at initialisation. Add a macro to make this easier.

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

Changes in v3:
- Fix typo in commit subject

Changes in v2:
- Add new patch to deal with const-ness of the global_data pointer

 drivers/core/root.c  | 6 +++---
 drivers/core/uclass.c| 2 +-
 include/dm/device-internal.h | 4 
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/core/root.c b/drivers/core/root.c
index 88d2f45..4427b81 100644
--- a/drivers/core/root.c
+++ b/drivers/core/root.c
@@ -43,9 +43,9 @@ int dm_init(void)
dm_warn(Virtual root driver already exists!\n);
return -EINVAL;
}
-   INIT_LIST_HEAD(gd-uclass_root);
+   INIT_LIST_HEAD(DM_UCLASS_ROOT());
 
-   ret = device_bind_by_name(NULL, root_info, gd-dm_root);
+   ret = device_bind_by_name(NULL, root_info, DM_ROOT());
if (ret)
return ret;
 
@@ -56,7 +56,7 @@ int dm_scan_platdata(void)
 {
int ret;
 
-   ret = lists_bind_drivers(gd-dm_root);
+   ret = lists_bind_drivers(DM_ROOT());
if (ret == -ENOENT) {
dm_warn(Some drivers were not found\n);
ret = 0;
diff --git a/drivers/core/uclass.c b/drivers/core/uclass.c
index 4df5a8b..afb5fdc 100644
--- a/drivers/core/uclass.c
+++ b/drivers/core/uclass.c
@@ -75,7 +75,7 @@ static int uclass_add(enum uclass_id id, struct uclass **ucp)
uc-uc_drv = uc_drv;
INIT_LIST_HEAD(uc-sibling_node);
INIT_LIST_HEAD(uc-dev_head);
-   list_add(uc-sibling_node, gd-uclass_root);
+   list_add(uc-sibling_node, DM_UCLASS_ROOT());
 
if (uc_drv-init) {
ret = uc_drv-init(uc);
diff --git a/include/dm/device-internal.h b/include/dm/device-internal.h
index c026e8e..e95b7a9 100644
--- a/include/dm/device-internal.h
+++ b/include/dm/device-internal.h
@@ -84,4 +84,8 @@ int device_remove(struct device *dev);
  */
 int device_unbind(struct device *dev);
 
+/* Cast away any volatile pointer */
+#define DM_ROOT()  (((gd_t *)gd)-dm_root)
+#define DM_UCLASS_ROOT()   (((gd_t *)gd)-uclass_root)
+
 #endif
-- 
1.9.1.423.g4596e3a

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


[U-Boot] [RFC PATCH v2 08/13] dm: Add missing header files in lists and root

2014-05-09 Thread Simon Glass
These files don't compile in some architectures. Fix it by adding the
missing headers.

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

Changes in v3: None
Changes in v2:
- Add new patch to add missing header files in lists and root

 drivers/core/lists.c | 1 +
 drivers/core/root.c  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/core/lists.c b/drivers/core/lists.c
index 4f2c126..6a53362 100644
--- a/drivers/core/lists.c
+++ b/drivers/core/lists.c
@@ -14,6 +14,7 @@
 #include dm/platdata.h
 #include dm/uclass.h
 #include dm/util.h
+#include fdtdec.h
 #include linux/compiler.h
 
 struct driver *lists_driver_lookup_name(const char *name)
diff --git a/drivers/core/root.c b/drivers/core/root.c
index 407bc0d..88d2f45 100644
--- a/drivers/core/root.c
+++ b/drivers/core/root.c
@@ -10,6 +10,7 @@
 #include common.h
 #include errno.h
 #include malloc.h
+#include libfdt.h
 #include dm/device.h
 #include dm/device-internal.h
 #include dm/lists.h
-- 
1.9.1.423.g4596e3a

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


[U-Boot] [RFC PATCH v2 13/13] tegra: Convert tegra GPIO driver to use driver model

2014-05-09 Thread Simon Glass
This is an implementation of GPIOs for Tegra that uses driver model. It has
been tested on trimslice and also using the new iotrace feature.

The implementation uses a top-level GPIO device (which has no actual GPIOS).
Under this all the banks are created as separate GPIO devices.

The GPIOs are named as per the Tegra datasheet/header files: A0..A7, B0..B7,
..., Z0..Z7, AA0..AA7, etc.

Since driver model is not yet available before relocation, or in SPL, a
special function is provided for seaboard's SPL code.

This series is marked RFC since the Tegra driver may need further discussion.
Signed-off-by: Simon Glass s...@chromium.org
---

Changes in v3:
- Move dm command enable to previous patch
- Use gpio number for the internal helper functions

Changes in v2:
- Split out driver model changes into separate patches
- Correct bugs found during testing

 arch/arm/include/asm/arch-tegra/gpio.h |  14 +-
 board/nvidia/seaboard/seaboard.c   |   2 +-
 drivers/gpio/tegra_gpio.c  | 313 +++--
 include/configs/tegra-common.h |   1 +
 4 files changed, 266 insertions(+), 64 deletions(-)

diff --git a/arch/arm/include/asm/arch-tegra/gpio.h 
b/arch/arm/include/asm/arch-tegra/gpio.h
index d97190d..80e4a73 100644
--- a/arch/arm/include/asm/arch-tegra/gpio.h
+++ b/arch/arm/include/asm/arch-tegra/gpio.h
@@ -6,6 +6,8 @@
 #ifndef _TEGRA_GPIO_H_
 #define _TEGRA_GPIO_H_
 
+#define TEGRA_GPIOS_PER_PORT   8
+#define TEGRA_PORTS_PER_BANK   4
 #define MAX_NUM_GPIOS   (TEGRA_GPIO_PORTS * TEGRA_GPIO_BANKS * 8)
 #define GPIO_NAME_SIZE 20  /* gpio_request max label len */
 
@@ -14,11 +16,13 @@
 #define GPIO_FULLPORT(x)   ((x)  3)
 #define GPIO_BIT(x)((x)  0x7)
 
-/*
- * Tegra-specific GPIO API
+/**
+ * tegra_spl_gpio_direction_output() - set the output value of a GPIO
+ *
+ * This function is only used from SPL on seaboard, which needs to enable a
+ * GPIO to get the UART running. It could be done in U-Boot rather than SPL,
+ * but for now, this gets it working
  */
+int tegra_spl_gpio_direction_output(int gpio, int value);
 
-void gpio_info(void);
-
-#define gpio_status()  gpio_info()
 #endif /* TEGRA_GPIO_H_ */
diff --git a/board/nvidia/seaboard/seaboard.c b/board/nvidia/seaboard/seaboard.c
index ef4e481..e27efcd 100644
--- a/board/nvidia/seaboard/seaboard.c
+++ b/board/nvidia/seaboard/seaboard.c
@@ -22,7 +22,7 @@ void gpio_early_init_uart(void)
 #ifndef CONFIG_SPL_BUILD
gpio_request(GPIO_PI3, NULL);
 #endif
-   gpio_direction_output(GPIO_PI3, 0);
+   tegra_spl_gpio_direction_output(GPIO_PI3, 0);
 }
 #endif
 
diff --git a/drivers/gpio/tegra_gpio.c b/drivers/gpio/tegra_gpio.c
index 82b30d5..f03d4ed 100644
--- a/drivers/gpio/tegra_gpio.c
+++ b/drivers/gpio/tegra_gpio.c
@@ -12,10 +12,17 @@
  */
 
 #include common.h
+#include dm.h
+#include malloc.h
+#include errno.h
+#include fdtdec.h
 #include asm/io.h
 #include asm/bitops.h
 #include asm/arch/tegra.h
 #include asm/gpio.h
+#include dm/device-internal.h
+
+DECLARE_GLOBAL_DATA_PTR;
 
 enum {
TEGRA_CMD_INFO,
@@ -24,14 +31,18 @@ enum {
TEGRA_CMD_INPUT,
 };
 
-static struct gpio_names {
-   char name[GPIO_NAME_SIZE];
-} gpio_names[MAX_NUM_GPIOS];
+struct tegra_gpio_platdata {
+   struct gpio_ctlr_bank *bank;
+   const char *port_name;  /* Name of port, e.g. B */
+   int base_port;  /* Port number for this port (0, 1,.., n-1) */
+};
 
-static char *get_name(int i)
-{
-   return *gpio_names[i].name ? gpio_names[i].name : UNKNOWN;
-}
+/* Information about each port at run-time */
+struct tegra_port_info {
+   char label[TEGRA_GPIOS_PER_PORT][GPIO_NAME_SIZE];
+   struct gpio_ctlr_bank *bank;
+   int base_port;  /* Port number for this port (0, 1,.., n-1) */
+};
 
 /* Return config of pin 'gpio' as GPIO (1) or SFPIO (0) */
 static int get_config(unsigned gpio)
@@ -121,38 +132,71 @@ static void set_level(unsigned gpio, int high)
writel(u, bank-gpio_out[GPIO_PORT(gpio)]);
 }
 
+static int check_reserved(struct device *dev, unsigned offset,
+ const char *func)
+{
+   struct tegra_port_info *state = dev_get_priv(dev);
+   struct gpio_dev_priv *uc_priv = dev-uclass_priv;
+
+   if (!*state-label[offset]) {
+   printf(tegra_gpio: %s: error: gpio %s%d not reserved\n,
+  func, uc_priv-bank_name, offset);
+   return -EPERM;
+   }
+
+   return 0;
+}
+
+#ifdef CONFIG_SPL
+/* set GPIO pin 'gpio' as an output, with polarity 'value' */
+int tegra_spl_gpio_direction_output(int gpio, int value)
+{
+   /* Configure GPIO output value. */
+   set_level(gpio, value);
+
+   /* Configure GPIO direction as output. */
+   set_direction(gpio, value);
+
+   return 0;
+}
+#endif /* CONFIG_SPL */
+
 /*
  * Generic_GPIO primitives.
  */
 
-int gpio_request(unsigned gpio, const char *label)
+static int tegra_gpio_request(struct device *dev, unsigned 

[U-Boot] [RFC PATCH v2 10/13] dm: Allow driver model tests only for sandbox

2014-05-09 Thread Simon Glass
The GPIO tests require the sandbox GPIO driver, so cannot be run on other
platforms. Similarly for the 'dm test' command.

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

Changes in v3: None
Changes in v2:
- Add new patch to allow driver model tests only for sandbox

 test/dm/Makefile |  2 ++
 test/dm/cmd_dm.c | 11 +--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/test/dm/Makefile b/test/dm/Makefile
index 4e9afe6..c0f2135 100644
--- a/test/dm/Makefile
+++ b/test/dm/Makefile
@@ -15,4 +15,6 @@ obj-$(CONFIG_DM_TEST) += ut.o
 # subsystem you must add sandbox tests here.
 obj-$(CONFIG_DM_TEST) += core.o
 obj-$(CONFIG_DM_TEST) += ut.o
+ifneq ($(CONFIG_SANDBOX),)
 obj-$(CONFIG_DM_GPIO) += gpio.o
+endif
diff --git a/test/dm/cmd_dm.c b/test/dm/cmd_dm.c
index a03fe20..62eccd6 100644
--- a/test/dm/cmd_dm.c
+++ b/test/dm/cmd_dm.c
@@ -93,16 +93,23 @@ static int do_dm_dump_uclass(cmd_tbl_t *cmdtp, int flag, 
int argc,
return 0;
 }
 
+#ifdef CONFIG_DM_TEST
 static int do_dm_test(cmd_tbl_t *cmdtp, int flag, int argc,
  char * const argv[])
 {
return dm_test_main();
 }
+#define TEST_HELP \ndm test Run tests
+#else
+#define TEST_HELP
+#endif
 
 static cmd_tbl_t test_commands[] = {
U_BOOT_CMD_MKENT(tree, 0, 1, do_dm_dump_all, , ),
U_BOOT_CMD_MKENT(uclass, 1, 1, do_dm_dump_uclass, , ),
+#ifdef CONFIG_DM_TEST
U_BOOT_CMD_MKENT(test, 1, 1, do_dm_test, , ),
+#endif
 };
 
 static int do_dm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
@@ -128,6 +135,6 @@ U_BOOT_CMD(
dm, 2,  1,  do_dm,
Driver model low level access,
tree Dump driver model tree\n
-   dm uclassDump list of instances for each uclass\n
-   dm test Run tests
+   dm uclassDump list of instances for each uclass
+   TEST_HELP
 );
-- 
1.9.1.423.g4596e3a

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


[U-Boot] [RFC PATCH v2 11/13] dm: Fix printf() strings in the 'dm' command

2014-05-09 Thread Simon Glass
The values here are int, but the map_to_sysmem() call can return a long.
Add a cast to deal with this.

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

Changes in v3: None
Changes in v2:
- Add new patch to fix printf() strings in the 'dm' command

 test/dm/cmd_dm.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/test/dm/cmd_dm.c b/test/dm/cmd_dm.c
index 62eccd6..c6b2eb8 100644
--- a/test/dm/cmd_dm.c
+++ b/test/dm/cmd_dm.c
@@ -23,7 +23,7 @@ static int display_succ(struct device *in, char *buf)
char local[16];
struct device *pos, *n, *prev = NULL;
 
-   printf(%s- %s @ %08x, buf, in-name, map_to_sysmem(in));
+   printf(%s- %s @ %08x, buf, in-name, (uint)map_to_sysmem(in));
if (in-flags  DM_FLAG_ACTIVATED)
puts( - activated);
puts(\n);
@@ -62,7 +62,7 @@ static int do_dm_dump_all(cmd_tbl_t *cmdtp, int flag, int 
argc,
struct device *root;
 
root = dm_root();
-   printf(ROOT %08x\n, map_to_sysmem(root));
+   printf(ROOT %08x\n, (uint)map_to_sysmem(root));
return dm_dump(root);
 }
 
@@ -84,8 +84,8 @@ static int do_dm_dump_uclass(cmd_tbl_t *cmdtp, int flag, int 
argc,
for (ret = uclass_first_device(id, dev);
 dev;
 ret = uclass_next_device(dev)) {
-   printf(  %s @  %08x:\n, dev-name,
-  map_to_sysmem(dev));
+   printf(  %s @ %08x:\n, dev-name,
+  (uint)map_to_sysmem(dev));
}
puts(\n);
}
-- 
1.9.1.423.g4596e3a

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


[U-Boot] [RFC PATCH v2 01/13] Add an I/O tracing feature

2014-05-09 Thread Simon Glass
When debugging drivers it is useful to see what I/O accesses were done
and in what order.

Even if the individual accesses are of little interest it can be useful to
verify that the access pattern is consistent each time an operation is
performed. In this case a checksum can be used to characterise the operation
of a driver. The checksum can be compared across different runs of the
operation to verify that the driver is working properly.

In particular, when performing major refactoring of the driver, where the
access pattern should not change, the checksum provides assurance that the
refactoring work has not broken the driver.

Add an I/O tracing feature and associated commands to provide this facility.
It works by sneaking into the io.h heder for an architecture and redirecting
I/O accesses through its tracing mechanism.

For now no commands are provided to examine the trace buffer. The format is
fairly simple, so 'md' is a reasonable substitute.

Note: The checksum feature is only useful for I/O regions where the contents
do not change outside of software control. Where this is not suitable you can
fall back to manually comparing the addresses. It might be useful to enhance
tracing to only checksum the accesses and not the data read/written.

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

Changes in v3:
- Remove use of bool in header file to avoid exynos5 build failure

Changes in v2:
- Add a new patch for an I/O tracing feature

 README   |  23 +++
 common/Makefile  |   2 +
 common/cmd_iotrace.c |  73 ++
 common/iotrace.c | 169 +++
 include/iotrace.h| 104 +++
 5 files changed, 371 insertions(+)
 create mode 100644 common/cmd_iotrace.c
 create mode 100644 common/iotrace.c
 create mode 100644 include/iotrace.h

diff --git a/README b/README
index b973344..b226458 100644
--- a/README
+++ b/README
@@ -987,6 +987,7 @@ The following options need to be configured:
CONFIG_CMD_IMLS   List all images found in NOR flash
CONFIG_CMD_IMLS_NAND* List all images found in NAND flash
CONFIG_CMD_IMMAP* IMMR dump support
+   CONFIG_CMD_IOTRACE  * I/O tracing for debugging
CONFIG_CMD_IMPORTENV* import an environment
CONFIG_CMD_INI  * import data from an ini file into the 
env
CONFIG_CMD_IRQ  * irqinfo
@@ -1158,6 +1159,28 @@ The following options need to be configured:
Note that if the GPIO device uses I2C, then the I2C interface
must also be configured. See I2C Support, below.
 
+- I/O tracing:
+   When CONFIG_IO_TRACE is selected, U-Boot intercepts all I/O
+   accesses and can checksum them or write a list of them out
+   to memory. See the 'iotrace' command for details. This is
+   useful for testing device drivers since it can confirm that
+   the driver behaves the same way before and after a code
+   change. Currently this is supported on sandbox and arm. To
+   add support for your architecture, add '#include iotrace.h'
+   to the bottom of arch/arch/include/asm/io.h and test.
+
+   Example output from the 'iotrace stats' command is below.
+   Note that if the trace buffer is exhausted, the checksum will
+   still continue to operate.
+
+   iotrace is enabled
+   Start:  1000(buffer start address)
+   Size:   0001(buffer size)
+   Offset: 0120(current buffer offset)
+   Output: 1120(start + offset)
+   Count:  0018(number of trace records)
+   CRC32:  9526fb66(CRC32 of all trace records)
+
 - Timestamp Support:
 
When CONFIG_TIMESTAMP is selected, the timestamp
diff --git a/common/Makefile b/common/Makefile
index 7c853ae..0dccb90 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -96,6 +96,7 @@ obj-$(CONFIG_CMD_FUSE) += cmd_fuse.o
 obj-$(CONFIG_CMD_GETTIME) += cmd_gettime.o
 obj-$(CONFIG_CMD_GPIO) += cmd_gpio.o
 obj-$(CONFIG_CMD_I2C) += cmd_i2c.o
+obj-$(CONFIG_CMD_IOTRACE) += cmd_iotrace.o
 obj-$(CONFIG_CMD_HASH) += cmd_hash.o
 obj-$(CONFIG_CMD_IDE) += cmd_ide.o
 obj-$(CONFIG_CMD_IMMAP) += cmd_immap.o
@@ -240,6 +241,7 @@ obj-y += image.o
 obj-$(CONFIG_OF_LIBFDT) += image-fdt.o
 obj-$(CONFIG_FIT) += image-fit.o
 obj-$(CONFIG_FIT_SIGNATURE) += image-sig.o
+obj-$(CONFIG_IO_TRACE) += iotrace.o
 obj-y += memsize.o
 obj-y += stdio.o
 
diff --git a/common/cmd_iotrace.c b/common/cmd_iotrace.c
new file mode 100644
index 000..f54276d
--- /dev/null
+++ b/common/cmd_iotrace.c
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2014 Google, Inc
+ *
+ * SPDX-License-Identifier:

[U-Boot] [RFC PATCH v2 12/13] tegra: Enable driver model

2014-05-09 Thread Simon Glass
Enable driver model for Tegra boards.

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

Changes in v3:
- Enable dm command in this patch instead of the next

Changes in v2:
- Split out a separate patch to enable driver model for tegra

 include/configs/tegra-common.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/configs/tegra-common.h b/include/configs/tegra-common.h
index ae786cf..24b909b 100644
--- a/include/configs/tegra-common.h
+++ b/include/configs/tegra-common.h
@@ -19,6 +19,9 @@
 
 #include asm/arch/tegra.h/* get chip and board defs */
 
+#define CONFIG_DM
+#define CONFIG_CMD_DM
+
 #define CONFIG_SYS_TIMER_RATE  100
 #define CONFIG_SYS_TIMER_COUNTER   NV_PA_TMRUS_BASE
 
-- 
1.9.1.423.g4596e3a

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


Re: [U-Boot] [RFC PATCH v2 0/13] Enable driver model for GPIOs on Tegra

2014-05-09 Thread Simon Glass
Hi,

On 9 May 2014 11:28, Simon Glass s...@chromium.org wrote:
 Now that driver model is part of U-Boot, the task of converting drivers over
 to it begins. GPIO is one of the easiest to convert, since it already has a
 sandbox driver and a uclass driver.

 The Tegra GPIO driver is relatively simple since it has a linear numbering
 and already uses the generic GPIO framework.

 Along the way some minor deficiencies were found with driver model - these
 are corrected in this series.

 Also it was difficult to exhaustively test the new driver against the old,
 so a new 'iotrace' framework was created to make this easier for future
 driver authors.

 This series has been tested on Trimslice (Tegra 20). I will try it on a
 beaver also.

One little update - region size increases:

$ ./tools/buildman/buildman -b us-gpio6  -sS seaboard
...
13: tegra: Enable driver model
   arm: (for 1/1 boards)  all +5088.0  bss -4.0  data +182.0
rodata +766.0  spl/u-boot-spl:all +16.0  spl/u-boot-spl:data +16.0
text +4144.0
14: tegra: Convert tegra GPIO driver to use driver model
   arm: (for 1/1 boards)  all -1422.0  bss -4480.0  data +88.0
rodata +330.0  spl/u-boot-spl:all +32.0  spl/u-boot-spl:text +32.0
text +2640.0

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


Re: [U-Boot] [PATCH v5 1/8] sunxi: add sun7i clocks and timer support.

2014-05-09 Thread Tom Rini
On Mon, May 05, 2014 at 11:52:23AM +0100, Ian Campbell wrote:

 This patch adds the basic clocks and timer support for the Allwinner A20
 (sun7i) processor. This code will not been compiled until the build is hooked
 up in a later patch. It has been split out to keep the patches manageable.
 
 Some of the code here is common to multiple sunxi subarchtectures, hence files
 are named sun4i which is the earliest similar variant.
 
 Signed-off-by: Alexandru Gagniuc mr.nuke...@gmail.com
 Signed-off-by: Chen-Yu Tsai w...@csie.org
 Signed-off-by: Emilio López emi...@elopez.com.ar
 Signed-off-by: Hans de Goede hdego...@redhat.com
 Signed-off-by: Henrik Nordstrom hen...@henriknordstrom.net
 Signed-off-by: Jens Kuske jensku...@gmail.com
 Signed-off-by: Luke Leighton l...@lkcl.net
 Signed-off-by: Oliver Schinagl oli...@schinagl.nl
 Signed-off-by: Ian Campbell i...@hellion.org.uk
 Cc: Stefan Roese s...@denx.de
 Cc: Tom Cubie mr.hip...@gmail.com

Reviewed-by: Tom Rini tr...@ti.com

-- 
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 v5 2/8] sunxi: add sun7i pinmux and gpio support

2014-05-09 Thread Tom Rini
On Mon, May 05, 2014 at 11:52:24AM +0100, Ian Campbell wrote:

 This patch adds the basic pinmux and gpio support for the Allwinner A20 
 (sun7i)
 processor. This code will not been compiled until the build is hooked up in a
 later patch. It has been split out to keep the patches manageable.
 
 Signed-off-by: Chen-Yu Tsai w...@csie.org
 Signed-off-by: Hans de Goede hdego...@redhat.com
 Signed-off-by: Ma Haijun mahaij...@gmail.com
 Signed-off-by: Oliver Schinagl oli...@schinagl.nl
 Signed-off-by: Henrik Nordström hen...@henriknordstrom.net
 Signed-off-by: Ian Campbell i...@hellion.org.uk
 Reviewed-by: Tom Rini tr...@ti.com
 Acked-by: Marek Vasut ma...@denx.de
 Cc: Stefan Roese s...@denx.de
 Cc: Tom Cubie mr.hip...@gmail.com

Reviewed-by: Tom Rini tr...@ti.com

-- 
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 v5 3/8] sunxi: add sun7i dram setup support

2014-05-09 Thread Tom Rini
On Mon, May 05, 2014 at 11:52:25AM +0100, Ian Campbell wrote:

 This patch adds DRAM initialisation support for the Allwinner A20 (sun7i)
 processor. This code will not been compiled until the build is hooked up in a
 later patch. It has been split out to keep the patches manageable.
 
 Signed-off-by: Alexandru Gagniuc mr.nuke...@gmail.com
 Signed-off-by: Emilio López emi...@elopez.com.ar
 Signed-off-by: Hans de Goede hdego...@redhat.com
 Signed-off-by: Henrik Nordstrom hen...@henriknordstrom.net
 Signed-off-by: Jens Kuske jensku...@gmail.com
 Signed-off-by: Luke Leighton l...@lkcl.net
 Signed-off-by: Oliver Schinagl oli...@schinagl.nl
 Signed-off-by: Siarhei Siamashka siarhei.siamas...@gmail.com
 Signed-off-by: Stefan Roese s...@denx.de
 Signed-off-by: Ian Campbell i...@hellion.org.uk
 Reviewed-by: Marek Vasut ma...@denx.de
 Cc: Tom Cubie mr.hip...@gmail.com

Reviewed-by: Tom Rini tr...@ti.com

-- 
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] [linux-sunxi] [PATCH v5 7/8] sunxi: mmc support

2014-05-09 Thread Tom Rini
On Mon, May 05, 2014 at 02:42:31PM +0100, Ian Campbell wrote:
[snip]
 From 20704e35a41664de5f516ed0e02981ac06085102 Mon Sep 17 00:00:00 2001
 From: Ian Campbell i...@hellion.org.uk
 Date: Fri, 7 Mar 2014 04:29:39 +
 Subject: [PATCH v5.1 7/8] sunxi: mmc support
 
 This adds support for the MMC controller on the Allwinner A20 (sun7i)
 processor.
 
 Signed-off-by: Henrik Nordstrom hen...@henriknordstrom.net
 Signed-off-by: Luke Leighton l...@lkcl.net
 Signed-off-by: Oliver Schinagl oli...@schinagl.nl
 Signed-off-by: Wills Wang wills.wang.o...@gmail.com
 Signed-off-by: Ian Campbell i...@hellion.org.uk
 Reviewed-by: Marek Vasut ma...@denx.de
 Reviewed-by: Stefan Roese s...@denx.de
 Cc: Tom Cubie mr.hip...@gmail.com
 Cc: Aaron Maoye leafy.m...@allwinnertech.com
 Cc: Pantelis Antoniou pa...@antoniou-consulting.com

Reviewed-by: Tom Rini tr...@ti.com

-- 
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 v5 8/8] sunxi: non-FEL SPL boot support for sun7i

2014-05-09 Thread Tom Rini
On Mon, May 05, 2014 at 11:52:30AM +0100, Ian Campbell wrote:

 Add support for booting from an MMC card.
 
 Signed-off-by: Stefan Roese s...@denx.de
 Signed-off-by: Henrik Nordström hen...@henriknordstrom.net
 Signed-off-by: Ian Campbell i...@hellion.org.uk
 Reviewed-by: Marek Vasut ma...@denx.de
 Cc: Tom Cubie mr.hip...@gmail.com

Reviewed-by: Tom Rini tr...@ti.com

-- 
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 v5 6/8] sunxi: add gmac Ethernet support

2014-05-09 Thread Tom Rini
On Mon, May 05, 2014 at 11:52:28AM +0100, Ian Campbell wrote:

 Add support for the GMAC Ethernet controller on Allwinner A20 (sun7i)
 processors. Enable for the Cubietruck.
 
 Signed-off-by: Chen-Yu Tsai w...@csie.org
 Signed-off-by: Jens Kuske jensku...@gmail.com
 Signed-off-by: Ian Campbell i...@hellion.org.uk
 Reviewed-by: Marek Vasut ma...@denx.de

Reviewed-by: Tom Rini tr...@ti.com

-- 
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 v5 4/8] sunxi: add sun7i cpu, board and start of day support

2014-05-09 Thread Tom Rini
On Mon, May 05, 2014 at 11:52:26AM +0100, Ian Campbell wrote:

 This patch adds generic board, start of day and basic build system support for
 the Allwinner A20 (sun7i) processor. This code will not been compiled until 
 the
 build is hooked up in a later patch. It has been split out to keep the patches
 manageable.
 
 Signed-off-by: Adam Sampson a...@offog.org
 Signed-off-by: Aleksei Mamlin mamli...@gmail.com
 Signed-off-by: Alexandru Gagniuc mr.nuke...@gmail.com
 Signed-off-by: Chen-Yu Tsai w...@csie.org
 Signed-off-by: Emilio López emi...@elopez.com.ar
 Signed-off-by: Hans de Goede hdego...@redhat.com
 Signed-off-by: Henrik Nordstrom hen...@henriknordstrom.net
 Signed-off-by: Jens Kuske jensku...@gmail.com
 Signed-off-by: Luc Verhaegen l...@skynet.be
 Signed-off-by: Luke Leighton l...@lkcl.net
 Signed-off-by: Oliver Schinagl oli...@schinagl.nl
 Signed-off-by: Patrick Wood patrickhw...@gmail.com
 Signed-off-by: Stefan Roese s...@denx.de
 Signed-off-by: Wills Wang wills.wang.o...@gmail.com
 Signed-off-by: Ian Campbell i...@hellion.org.uk
 Reviewed-by: Marek Vasut ma...@denx.de
 Cc: Tom Cubie mr.hip...@gmail.com

Reviewed-by: Tom Rini tr...@ti.com

-- 
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] env_eeprom: Assign default environment during board_init_f

2014-05-09 Thread Tom Rini
On Fri, Apr 25, 2014 at 03:49:04PM +0200, Michal Simek wrote:

 From: Siva Durga Prasad Paladugu siva.durga.palad...@xilinx.com
 
 Assign default environment and set env valid during board_init_f
 before relocation as the actual environment will be read from
 eeprom later.
 
 Signed-off-by: Siva Durga Prasad Paladugu siva...@xilinx.com
 Signed-off-by: Michal Simek michal.si...@xilinx.com
 ---
 
  common/env_eeprom.c | 5 +
  1 file changed, 5 insertions(+)
 
 diff --git a/common/env_eeprom.c b/common/env_eeprom.c
 index 0db2bb6..a4020bc 100644
 --- a/common/env_eeprom.c
 +++ b/common/env_eeprom.c
 @@ -224,6 +224,7 @@ int env_init(void)
  #else
  int env_init(void)
  {
 +#ifdef ENV_IS_EMBEDDED
   ulong crc, len, new;
   unsigned off;
   uchar buf[64];
 @@ -256,6 +257,10 @@ int env_init(void)
   gd-env_addr= 0;
   gd-env_valid   = 0;
   }
 +#else
 + gd-env_addr = (ulong)default_environment[0];
 + gd-env_valid = 1;
 +#endif
 
   return 0;
  }

Sorry for the delay.  This looks fine but doesn't correct the redundant
env case which has the same problem.  It would be nice if you had time
to first consolidate env_init for both cases (see how env_nand.c does
it) as well.  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 1/4] bootm: allow to disable legacy image format

2014-05-09 Thread Simon Glass
Hi Wolfgang,

On 9 May 2014 07:35, Wolfgang Denk w...@denx.de wrote:
 Dear Simon,

 In message 
 CAPnjgZ1_Cf-eu592YqF0=th7mt1da6gh7pv1lxaf79kv8lw...@mail.gmail.com you 
 wrote:

 I agree that it might be dangerous to allow legacy boot when signature
 verification is used. It would be nice to fix that.

 I think there is general agreement on this point.

 This means that legacy is on by default, unless signature verification
 is enabled, in which case the default flips. But I worry that it might
 only confuse people. This seems like a Wolfgang / Tom question :-)

 OK, here is my 0.02€ to it:

 I think, no matter how we implement it, this should exactly the
 behaviour.  Average users tend to avoid reading documentation, so if
 they enable signature verification the most likely want a secure
 system, so we should give them just that.  Only if someone really
 knows what he is doing he should be able to enable support for
 (insecure) legacy images.

 As for the implementation - yes, the
 #ifdef CONFIG_FIT_SIGNATURE_VERIFICATION
 approach indeed does not look very nice, but then, it appears to be
 the straightforward implementation of what we want to do?

OK, well in that case, let's do it that way.

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


Re: [U-Boot] [PATCH 1/4] bootm: allow to disable legacy image format

2014-05-09 Thread Tom Rini
On Fri, May 09, 2014 at 12:47:44PM -0600, Simon Glass wrote:
 Hi Wolfgang,
 
 On 9 May 2014 07:35, Wolfgang Denk w...@denx.de wrote:
  Dear Simon,
 
  In message 
  CAPnjgZ1_Cf-eu592YqF0=th7mt1da6gh7pv1lxaf79kv8lw...@mail.gmail.com you 
  wrote:
 
  I agree that it might be dangerous to allow legacy boot when signature
  verification is used. It would be nice to fix that.
 
  I think there is general agreement on this point.
 
  This means that legacy is on by default, unless signature verification
  is enabled, in which case the default flips. But I worry that it might
  only confuse people. This seems like a Wolfgang / Tom question :-)
 
  OK, here is my 0.02€ to it:
 
  I think, no matter how we implement it, this should exactly the
  behaviour.  Average users tend to avoid reading documentation, so if
  they enable signature verification the most likely want a secure
  system, so we should give them just that.  Only if someone really
  knows what he is doing he should be able to enable support for
  (insecure) legacy images.
 
  As for the implementation - yes, the
  #ifdef CONFIG_FIT_SIGNATURE_VERIFICATION
  approach indeed does not look very nice, but then, it appears to be
  the straightforward implementation of what we want to do?
 
 OK, well in that case, let's do it that way.

Agreed, then we can look for clever ways to refactor the code after.

-- 
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 3/4] lib, fdt: move fdtdec_get_int() out of lib/fdtdec.c

2014-05-09 Thread Simon Glass
Hi Heiko,

On 8 May 2014 05:05, Heiko Schocher h...@denx.de wrote:
 move fdtdec_get_int() out of lib/fdtdec.c into lib/fdtdec_common.c
 as this function is also used, if CONFIG_OF_CONTROL is not
 used. Poped up on the ids8313 board using signed FIT images,
 and activating CONFIG_SYS_GENERIC_BOARD. Without this patch
 it shows on boot:

 No valid FDT found - please append one to U-Boot binary, use u-boot-dtb.bin 
 or define CONFIG_OF_EMBED. For sandbox, use -d file.dtb

 With this patch, it boots again with CONFIG_SYS_GENERIC_BOARD
 enabled.

 Signed-off-by: Heiko Schocher h...@denx.de
 Cc: Simon Glass s...@chromium.org
 Cc: Tom Rini tr...@ti.com

What is the reason why we can't have a common function? Is it because
of the s32 type?

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


[U-Boot] [PATCH 0/3] add support for am43xx-sk

2014-05-09 Thread Felipe Balbi
Hi,

First patch prints out the board name because I really
didn't want to keep going back to design documents to find
out what's written on the EEPROM.

Second patch adds support for am43xx-sk.

Thir patch fixes mmcboot so that it actually tries to load
images from mmc.

cheers

Felipe Balbi (3):
  board: ti: am43xx: print unsupported board name
  board: ti: am43xx: add support for AM43xx Starter Kit
  configs: am43xx_evm: make sure to set devtype correctly

 board/ti/am43xx/board.c  | 9 ++---
 board/ti/am43xx/board.h  | 5 +
 include/configs/am43xx_evm.h | 3 +++
 3 files changed, 14 insertions(+), 3 deletions(-)

-- 
2.0.0.rc1

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


[U-Boot] [PATCH 1/3] board: ti: am43xx: print unsupported board name

2014-05-09 Thread Felipe Balbi
when porting u-boot to a new am43xx board, it
helps to know the name of the current unsupported
board so we don't have to hunt for design documents
to figure out what's written in the EEPROM.

Signed-off-by: Felipe Balbi ba...@ti.com
---
 board/ti/am43xx/board.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/board/ti/am43xx/board.c b/board/ti/am43xx/board.c
index d744977..24097b0 100644
--- a/board/ti/am43xx/board.c
+++ b/board/ti/am43xx/board.c
@@ -266,7 +266,7 @@ const struct dpll_params *get_dpll_ddr_params(void)
else if (board_is_gpevm())
return gp_evm_dpll_ddr;
 
-   puts( Board not supported\n);
+   printf( Board '%s' not supported\n, am43xx_board_name);
return NULL;
 }
 
-- 
2.0.0.rc1

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


[U-Boot] [PATCH 2/3] board: ti: am43xx: add support for AM43xx Starter Kit

2014-05-09 Thread Felipe Balbi
AM43xx Starter Kit is a new board based on
AM437x line of SoCs. Being a low-cost EVM and
small size EVM are intended to provide an entry
level development platform on a full fledged
Hardware System.

Signed-off-by: Felipe Balbi ba...@ti.com
---
 board/ti/am43xx/board.c  | 7 +--
 board/ti/am43xx/board.h  | 5 +
 include/configs/am43xx_evm.h | 2 ++
 3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/board/ti/am43xx/board.c b/board/ti/am43xx/board.c
index 24097b0..05546ac 100644
--- a/board/ti/am43xx/board.c
+++ b/board/ti/am43xx/board.c
@@ -244,7 +244,7 @@ void emif_get_ext_phy_ctrl_const_regs(const u32 **regs, u32 
*size)
if (board_is_eposevm()) {
*regs = ext_phy_ctrl_const_base_lpddr2;
*size = ARRAY_SIZE(ext_phy_ctrl_const_base_lpddr2);
-   } else if (board_is_gpevm()) {
+   } else if (board_is_gpevm() || board_is_sk()) {
*regs = ext_phy_ctrl_const_base_ddr3;
*size = ARRAY_SIZE(ext_phy_ctrl_const_base_ddr3);
}
@@ -263,7 +263,7 @@ const struct dpll_params *get_dpll_ddr_params(void)
 
if (board_is_eposevm())
return epos_evm_dpll_ddr;
-   else if (board_is_gpevm())
+   else if (board_is_gpevm() || board_is_sk())
return gp_evm_dpll_ddr;
 
printf( Board '%s' not supported\n, am43xx_board_name);
@@ -373,6 +373,9 @@ void sdram_init(void)
enable_vtt_regulator();
config_ddr(0, ioregs_ddr3, NULL, NULL,
   ddr3_emif_regs_400Mhz, 0);
+   } else if (board_is_sk()) {
+   config_ddr(0, ioregs_ddr3, NULL, NULL,
+  ddr3_emif_regs_400Mhz, 0);
}
 }
 #endif
diff --git a/board/ti/am43xx/board.h b/board/ti/am43xx/board.h
index 091162e..017047d 100644
--- a/board/ti/am43xx/board.h
+++ b/board/ti/am43xx/board.h
@@ -47,6 +47,11 @@ static inline int board_is_gpevm(void)
return !strncmp(am43xx_board_name, AM43__GP, HDR_NAME_LEN);
 }
 
+static inline int board_is_sk(void)
+{
+   return !strncmp(am43xx_board_name, AM43__SK, HDR_NAME_LEN);
+}
+
 void enable_uart0_pin_mux(void);
 void enable_board_pin_mux(void);
 void enable_i2c0_pin_mux(void);
diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h
index 614857d..d7866ff 100644
--- a/include/configs/am43xx_evm.h
+++ b/include/configs/am43xx_evm.h
@@ -196,6 +196,8 @@
setenv fdtfile am43x-epos-evm.dtb; fi;  \
if test $board_name = AM43__GP; then  \
setenv fdtfile am437x-gp-evm.dtb; fi;  \
+   if test $board_name = AM43__SK; then  \
+   setenv fdtfile am437x-sk-evm.dtb; fi;  \
if test $fdtfile = undefined; then  \
echo WARNING: Could not determine device tree; fi; \0
 
-- 
2.0.0.rc1

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


[U-Boot] [PATCH 3/3] configs: am43xx_evm: make sure to set devtype correctly

2014-05-09 Thread Felipe Balbi
if we don't set devtype properly 'load' will fail.

Signed-off-by: Felipe Balbi ba...@ti.com
---
 include/configs/am43xx_evm.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h
index d7866ff..e661c9c 100644
--- a/include/configs/am43xx_evm.h
+++ b/include/configs/am43xx_evm.h
@@ -153,6 +153,7 @@
loadimage=load ${devtype} ${bootpart} ${loadaddr} 
${bootdir}/${bootfile}\0 \
loadfdt=load ${devtype} ${bootpart} ${fdtaddr} 
${bootdir}/${fdtfile}\0 \
mmcboot=mmc dev ${mmcdev};  \
+   setenv devtype mmc;  \
setenv devnum ${mmcdev};  \
if mmc rescan; then  \
echo SD/MMC found on device ${devnum}; \
-- 
2.0.0.rc1

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


Re: [U-Boot] [PATCH v5 8/8] sunxi: non-FEL SPL boot support for sun7i

2014-05-09 Thread Ian Campbell
On Fri, 2014-05-09 at 13:54 -0400, Tom Rini wrote:
 On Mon, May 05, 2014 at 11:52:30AM +0100, Ian Campbell wrote:
 
  Add support for booting from an MMC card.
  
  Signed-off-by: Stefan Roese s...@denx.de
  Signed-off-by: Henrik Nordström hen...@henriknordstrom.net
  Signed-off-by: Ian Campbell i...@hellion.org.uk
  Reviewed-by: Marek Vasut ma...@denx.de
  Cc: Tom Cubie mr.hip...@gmail.com
 
 Reviewed-by: Tom Rini tr...@ti.com

I think that makes a full set of reviews from you, thank you!

Ian.

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


Re: [U-Boot] [PATCH v5 8/8] sunxi: non-FEL SPL boot support for sun7i

2014-05-09 Thread Tom Rini
On Fri, May 09, 2014 at 09:14:20PM +0100, Ian Campbell wrote:
 On Fri, 2014-05-09 at 13:54 -0400, Tom Rini wrote:
  On Mon, May 05, 2014 at 11:52:30AM +0100, Ian Campbell wrote:
  
   Add support for booting from an MMC card.
   
   Signed-off-by: Stefan Roese s...@denx.de
   Signed-off-by: Henrik Nordström hen...@henriknordstrom.net
   Signed-off-by: Ian Campbell i...@hellion.org.uk
   Reviewed-by: Marek Vasut ma...@denx.de
   Cc: Tom Cubie mr.hip...@gmail.com
  
  Reviewed-by: Tom Rini tr...@ti.com
 
 I think that makes a full set of reviews from you, thank you!

Yup.  Thanks for porting all of this over!

-- 
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] idirafter causes host sha256.h to be included

2014-05-09 Thread Jeroen Hofstee
Hello,

tools/Makefile uses the following substitution

HOST_EXTRACFLAGS += -include $(srctree)/include/libfdt_env.h \
$(patsubst -I%,-idirafter%, $(UBOOTINCLUDE)) \
...

Which adds -idirafterinclude when compiling image-fit.c. Since
mentioned file includes sha256.h, which is a system include on FreeBSD,
the system version is included instead of the intended U-boot
include/sha256.h and building fails. Without the substitution it builds
successfully.

What is the intention of using idirafter?

Regards,
Jeroen

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


[U-Boot] Please pull u-boot-x86.git branch 'tom'

2014-05-09 Thread Simon Glass
Hi Tom,

This collects together the patches in my queue. I have taken the
liberty of also adding 'Make 'run' use run_command_list() instead of
run_command()' which is here:

http://patchwork.ozlabs.org/patch/286250/

- Simon

The following changes since commit 146b468eb0203c9b1aa1de93723ffc82c85d1dc1:

  Merge branch 'master' of git://git.denx.de/u-boot-sparc (2014-05-09
11:09:59 -0400)

are available in the git repository at:


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

for you to fetch changes up to 097c5de5f4a64d3b121dc1dbe020f7f2545dabdb:

  sandbox: ignore sandbox.dtb (2014-05-09 14:51:20 -0600)


Masahiro Yamada (2):
  sandbox: move source files from board/ to arch/sandbox/
  sandbox: ignore sandbox.dtb

Simon Glass (6):
  sandbox: Support 'env import' and 'env export'
  Make 'run' use run_command_list() instead of run_command()
  sandbox: Provide a build option to avoid using SDL
  sandbox: Update and expand the README
  patman: Deal with 'git apply' failures correctly
  patman: Avoid duplicate sign-offs

 README|  11 +++
 arch/sandbox/config.mk|   6 ++
 arch/sandbox/dts/.gitignore   |   1 +
 arch/sandbox/lib/Makefile |   2 +-
 {board/sandbox/sandbox = arch/sandbox/lib}/sandbox.c |   0
 board/sandbox/sandbox/Makefile|   7 --
 board/sandbox/sandbox/README.sandbox  |  91
--
 boards.cfg|   2 +-
 common/cmd_nvedit.c   |  31 
 common/main.c |   2 +-
 doc/README.sandbox| 299
++
 include/configs/sandbox.h |  16 +++-
 tools/patman/README   |   1 +
 tools/patman/commit.py|  14 
 tools/patman/gitutil.py   |   6 +-
 tools/patman/patchstream.py   |  10 ++-
 16 files changed, 379 insertions(+), 120 deletions(-)
 create mode 100644 arch/sandbox/dts/.gitignore
 rename {board/sandbox/sandbox = arch/sandbox/lib}/sandbox.c (100%)
 delete mode 100644 board/sandbox/sandbox/Makefile
 delete mode 100644 board/sandbox/sandbox/README.sandbox
 create mode 100644 doc/README.sandbox
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/3] usb: tegra: fix PHY selection code

2014-05-09 Thread Stephen Warren
On 05/01/2014 10:47 PM, Marek Vasut wrote:
 On Thursday, May 01, 2014 at 06:56:24 PM, Stephen Warren wrote:
 On 05/01/2014 04:49 AM, Marek Vasut wrote:
 On Wednesday, April 30, 2014 at 11:09:55 PM, Stephen Warren wrote:
 From: Stephen Warren swar...@nvidia.com

 The TRM for Tegra30 and later all state that USBMODE_CM_HC must be set
 before writing to hostpc1_devlc to select which PHY to use for a USB
 controller. However, neither init_{utmi,ulpi}_usb_controller() do this
 today, so the register writes they perform for PHY selection do not
 work.

 For the UTMI case, this was hacked around in commit 7e44d9320ed4 ARM:
 Tegra: USB: EHCI: Add support for Tegra30/Tegra114 by adding code to
 ehci_hcd_init() which sets USBMODE_CM_HC and duplicates the PHY
 selection register write. This code doesn't cover the ULPI case, so I
 wouldn't be surprised if ULPI doesn't work with the current code, unless
 the ordering requirement only ends up being an issue in HW for UTMI not
 ULPI.

 This patch fixes init_{utmi,ulpi}_usb_controller() to correctly set
 USBMODE_CM_HC before selecting the PHY. Now that this works, we can
 remove the duplicate UTMI-specific code in ehci_hcd_init(), thus
 simplifying that function.

 This doesn't apply on u-boot-usb/master , so I cannot pick this, sorry .

 Ah right. That's because I'm working on top of a merge of
 u-boot-arm/master and u-boot/master, and that includes the following
 changes to the Tegra USB driver that went in through u-boot-tegra/master
 - u-boot-arm/master rather than the USB tree:

 8f9fd6caafb8 usb: tegra: combine header file
 b1d615f3f102 usb: tegra: fix PHY configuration
 b03f4b3742a7 usb: tegra: fix USB2 powerdown for Tegra30 and later

 What's the best fix here:

 * Wait until the previous patches get into u-boot/master, and
 u-boot-usb/master picks them up, and then apply this series.

 * Apply this series to u-boot-tegra/master with your ack?

 There's little point my rebasing this series on top of
 u-boot-usb/master, and applying it right now, since that will just cause
 the same conflicts when u-boot-usb/master gets merged into u-boot/master.
 
 Fine, can you poke me when this happens so I can apply ?

Everything that's needed to apply these patches is now in u-boot/master.
I validated that the patches apply there without git issues.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot