Re: [U-Boot] [U-Boot,v3] gpio: atmel: Add the PIO4 driver support

2015-11-30 Thread Andreas Bießmann
Dear Wenyou Yang,

Wenyou Yang  writes:
>The PIO4 is introduced from SAMA5D2, as a new version
>for Atmel PIO controller.
>
>Signed-off-by: Wenyou Yang 
>---
>
>Changes in v3:
> 1./ add return to atmel_pio4_set_pio_output() to avoid compilation
> warning.
>
>Changes in v2:
> 1./ update the macro definitions according to the latest datasheet.
> 2./ change the return value to -ENODEV.
> 3./ add check to port_base, pin and return -ENODEV.
> 4./ change the return value for set/get_pio_output/input function.
>
> arch/arm/mach-at91/include/mach/atmel_pio4.h |   48 +
> drivers/gpio/Kconfig |   11 +
> drivers/gpio/Makefile|1 +
> drivers/gpio/atmel_pio4.c|  296 ++
> 4 files changed, 356 insertions(+)
> create mode 100644 arch/arm/mach-at91/include/mach/atmel_pio4.h
> create mode 100644 drivers/gpio/atmel_pio4.c

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

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


Re: [U-Boot] [PATCH 1/4] eth-raw-os.c: Add cast to bind(2) call

2015-11-30 Thread Joe Hershberger
On Sat, Nov 28, 2015 at 7:04 AM, Tom Rini  wrote:
> With more recent gcc versions we otherwise get an error like:
> note: expected 'const struct sockaddr *' but argument is of type
> 'struct sockaddr_in *'
>
> and the common solution here is to cast, rather than re-work the code.
>
> Cc: Joe Hershberger 
> Cc: Simon Glass 
> Signed-off-by: Tom Rini 

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


Re: [U-Boot] [U-Boot, v2, 1/5] arm: at91/spl: matrix: move matrix init to separate file

2015-11-30 Thread Andreas Bießmann
Dear Wenyou Yang,

Wenyou Yang  writes:
>To make the matrix initialization code sharing with other SoCs,
>move it from SAMA5D4 particular file,
>mach-at91/armv7/sama5d4_devices.c to a separate file,
>mach-at91/matrix.c
>
>Signed-off-by: Wenyou Yang 
>Reviewed-by: Andreas Bießmann 
>---
>
>Changes in v2: None
>
> arch/arm/mach-at91/Makefile|2 +-
> arch/arm/mach-at91/armv7/sama5d4_devices.c |   42 ---
> arch/arm/mach-at91/matrix.c|   51 
> 3 files changed, 52 insertions(+), 43 deletions(-)
> create mode 100644 arch/arm/mach-at91/matrix.c

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

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


Re: [U-Boot] [U-Boot,v6] arm: atmel: Add SAMA5D2 Xplained board

2015-11-30 Thread Andreas Bießmann
Dear Wenyou Yang,

Wenyou Yang  writes:
>The board supports following features:
> - Boot media support: SD card/e.MMC/SPI flash,
> - Support LCD display (optional, disabled by default),
> - Support ethernet,
> - Support USB mass storage.
>
>Signed-off-by: Wenyou Yang 
>[fix checkpatch warnings]
>Signed-off-by: Andreas Bießmann 
>---
>The patch is based on the following patches sent in mailing list.
>   [PATCH] gpio: atmel: Add the PIO4 driver support
>   [PATCH] arm: at91: Change the Chip ID registers' addresses
>   [PATCH v4] mmc: atmel: Add atmel sdhci support
>   [PATCH v3] arm: at91: clock: Add the generated clock support
>
>Changes in v6:
> 1./ change function invocation due to its declaration change,
>   at91_enable_periph_generated_clk().
>
>Changes in v5:
> 1./ remove wrong pin config for USB hw init.
>
>Changes in v4:
> 1./ remove __weak attribute for has_lcdc() added in v3.
> 2./ remove unused goto err_exit.
>
>Changes in v3:
> 1./ change defines-->definitions for more clearly in asm/arch/sama5d2.h.
> 2./ remove unused cpu_is_sama5d2x() macros.
> 3./ fix spelling error "adress".
> 4./ add __weak attribute for has_lcdc().
> 5./ remove SPL configs.
>
>Changes in v2:
> 1./ re-order SAMA5D2 statements alphabetically.
> 2./ remove redundant "Unknown CPU type".
> 3./ rework sama5d2's macros.
> 4./ remove some #ifdef before functions.
> 5./ move CONFIG_CMD_SF to Kconfig.
> 6./ remove NAND macros from config file.
> 7./ CONFIG_BOOTCOMMAND for sf uses defines in at91-sama5_common.h.
>
> arch/arm/mach-at91/Kconfig   |5 +
> arch/arm/mach-at91/armv7/Makefile|1 +
> arch/arm/mach-at91/armv7/sama5d2_devices.c   |   59 +
> arch/arm/mach-at91/include/mach/at91_pmc.h   |9 +-
> arch/arm/mach-at91/include/mach/atmel_usba_udc.h |3 +-
> arch/arm/mach-at91/include/mach/hardware.h   |2 +
> arch/arm/mach-at91/include/mach/sama5d2.h|  203 
> board/atmel/sama5d2_xplained/Kconfig |   15 ++
> board/atmel/sama5d2_xplained/MAINTAINERS |7 +
> board/atmel/sama5d2_xplained/Makefile|8 +
> board/atmel/sama5d2_xplained/sama5d2_xplained.c  |  284 ++
> configs/sama5d2_xplained_mmc_defconfig   |   11 +
> configs/sama5d2_xplained_spiflash_defconfig  |   11 +
> include/configs/sama5d2_xplained.h   |  122 ++
> 14 files changed, 734 insertions(+), 6 deletions(-)
> create mode 100644 arch/arm/mach-at91/armv7/sama5d2_devices.c
> create mode 100644 arch/arm/mach-at91/include/mach/sama5d2.h
> create mode 100644 board/atmel/sama5d2_xplained/Kconfig
> create mode 100644 board/atmel/sama5d2_xplained/MAINTAINERS
> create mode 100644 board/atmel/sama5d2_xplained/Makefile
> create mode 100644 board/atmel/sama5d2_xplained/sama5d2_xplained.c
> create mode 100644 configs/sama5d2_xplained_mmc_defconfig
> create mode 100644 configs/sama5d2_xplained_spiflash_defconfig
> create mode 100644 include/configs/sama5d2_xplained.h

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

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


Re: [U-Boot] [U-Boot, v2, 3/5] arm: at91/spl: matrix: remove security peripheral select code

2015-11-30 Thread Andreas Bießmann
Dear Wenyou Yang,

Wenyou Yang  writes:
>Remove the security peripheral select code, keep the default value
>in these registers, that is, the peripheral address space is
>configured as "Secured" access, it is suitable for SPL.
>
>Signed-off-by: Wenyou Yang 
>Reviewed-by: Andreas Bießmann 
>---
>
>Changes in v2: None
>
> arch/arm/mach-at91/matrix.c |9 -
> 1 file changed, 9 deletions(-)

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

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


Re: [U-Boot] [U-Boot, v2, 2/5] arm: at91/spl: matrix: remove matrix write protection code

2015-11-30 Thread Andreas Bießmann
Dear Wenyou Yang,

Wenyou Yang  writes:
>On processor reset, the matrix write protection is disabled,
>so no need to disable/enable write protection when writing
>the matrix registers.
>
>Signed-off-by: Wenyou Yang 
>Reviewed-by: Andreas Bießmann 
>---
>
>Changes in v2: None
>
> arch/arm/mach-at91/matrix.c |8 
> 1 file changed, 8 deletions(-)

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

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


Re: [U-Boot] [U-Boot, v2, 4/5] arm: at91/spl: matrix: use matrix slave id macros

2015-11-30 Thread Andreas Bießmann
Dear Wenyou Yang,

Wenyou Yang  writes:
>To make matrix initialization code sharing with others,
>use the matrix slave id macros, instead of hard-coding.
>
>Signed-off-by: Wenyou Yang 
>Reviewed-by: Andreas Bießmann 
>---
>
>Changes in v2: None
>
> arch/arm/mach-at91/include/mach/sama5d4.h |   25 +
> arch/arm/mach-at91/matrix.c   |   18 +-
> 2 files changed, 34 insertions(+), 9 deletions(-)

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

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


Re: [U-Boot] [PATCH v2 2/2] usb: eth: add Realtek RTL8152B/RTL8153 driver

2015-11-30 Thread Joe Hershberger
Hi Ted,

On Tue, Nov 24, 2015 at 11:30 PM, Ted Chen  wrote:
> From: Ted Chen 
>
> This patch adds driver support for the Realtek RTL8152B/RTL8153 USB
> network adapters.
>
> Signed-off-by: Ted Chen 
> [swarren, fixed a few compiler warnings]
> [swarren, with permission, converted license header to SPDX]
> [swarren, removed printf() spew during probe()]
> Signed-off-by: Stephen Warren 
>
> Changes for v2: Modified by Marek's comments.
> - Remove pattern informations.
> - Don't allocate & free when read/write register.
> - relpace udelay to mdelay.
> - pull firmware into global variable.
> - code review.
>
> Signed-off-by: Ted Chen 
> ---
>  drivers/usb/eth/Makefile|1 +
>  drivers/usb/eth/r8152.c | 3099 
> +++
>  drivers/usb/eth/usb_ether.c |8 +
>  include/usb_ether.h |6 +
>  4 files changed, 3114 insertions(+)
>  create mode 100644 drivers/usb/eth/r8152.c
>
> diff --git a/drivers/usb/eth/Makefile b/drivers/usb/eth/Makefile
> index c92d2b0..74f5f87 100644
> --- a/drivers/usb/eth/Makefile
> +++ b/drivers/usb/eth/Makefile
> @@ -9,3 +9,4 @@ obj-$(CONFIG_USB_ETHER_ASIX) += asix.o
>  obj-$(CONFIG_USB_ETHER_ASIX88179) += asix88179.o
>  obj-$(CONFIG_USB_ETHER_MCS7830) += mcs7830.o
>  obj-$(CONFIG_USB_ETHER_SMSC95XX) += smsc95xx.o
> +obj-$(CONFIG_USB_ETHER_RTL8152) += r8152.o
> diff --git a/drivers/usb/eth/r8152.c b/drivers/usb/eth/r8152.c
> new file mode 100644
> index 000..345f2c3
> --- /dev/null
> +++ b/drivers/usb/eth/r8152.c
> @@ -0,0 +1,3099 @@
> +/*
> + * Copyright (c) 2015 Realtek Semiconductor Corp. All rights reserved.
> + *
> + * SPDX-License-Identifier:GPL-2.0
> + *
> +  */
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include "usb_ether.h"
> +
> +#define DRIVER_VERSION "v1.0 (2015/11/24)"

If this is somehow useful to link back to a Realtek release or
something, then in belongs in the commit log, not in the code.

> +
> +#define R8152_PHY_ID   32
> +

8< snip >8

> +
> +/* The forced speed, 10Mb, 100Mb, gigabit, [2.5|5|10|20|25|40|50|56|100]GbE. 
> */
> +#define SPEED_1010
> +#define SPEED_100   100
> +#define SPEED_1000  1000
> +#define SPEED_2500  2500
> +#define SPEED_5000  5000
> +#define SPEED_1 1
> +#define SPEED_2 2
> +#define SPEED_25000 25000
> +#define SPEED_4 4
> +#define SPEED_5 5
> +#define SPEED_56000 56000
> +#define SPEED_1010

Are all the speeds really relevant to define? They aren't used. Maybe
lose all the unused ones.

> +#define SPEED_UNKNOWN   -1
> +
> +/* Duplex, half or full. */
> +#define DUPLEX_HALF 0x00
> +#define DUPLEX_FULL 0x01
> +#define DUPLEX_UNKNOWN  0xff
> +
> +/* Enable or disable autonegotiation. */
> +#define AUTONEG_DISABLE 0x00
> +#define AUTONEG_ENABLE  0x01
> +
> +
> +/* Generic MII registers. */
> +#define MII_BMCR0x00/* Basic mode control register */
> +#define MII_BMSR0x01/* Basic mode status register  */
> +#define MII_PHYSID1 0x02/* PHYS ID 1   */
> +#define MII_PHYSID2 0x03/* PHYS ID 2   */
> +#define MII_ADVERTISE   0x04/* Advertisement control reg   */
> +#define MII_LPA 0x05/* Link partner ability reg*/
> +#define MII_EXPANSION   0x06/* Expansion register  */
> +#define MII_CTRL10000x09/* 1000BASE-T control  */
> +#define MII_STAT10000x0a/* 1000BASE-T status   */
> +#define MII_MMD_CTRL0x0d/* MMD Access Control Register */
> +#define MII_MMD_DATA0x0e/* MMD Access Data Register */
> +#define MII_ESTATUS 0x0f/* Extended Status */
> +#define MII_DCOUNTER0x12/* Disconnect counter  */
> +#define MII_FCSCOUNTER  0x13/* False carrier counter   */
> +#define MII_NWAYTEST0x14/* N-way auto-neg test reg */
> +#define MII_RERRCOUNTER 0x15/* Receive error counter   */
> +#define MII_SREVISION   0x16/* Silicon revision*/
> +#define MII_RESV1   0x17/* Reserved... */
> +#define MII_LBRERROR0x18/* Lpback, rx, bypass error*/
> +#define MII_PHYADDR 0x19/* PHY address */
> +#define MII_RESV2   0x1a/* Reserved... */
> +#define MII_TPISTATUS   0x1b/* TPI status for 10mbps   */
> +#define MII_NCONFIG 0x1c/* Network interface config*/
> +
> +#define agg_buf_sz 2048
> +
> +/* local vars */
> +static int 

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

2015-11-30 Thread Andreas Bießmann
Hi Tom,

please pull the following changes into u-boot/master

Andreas

The following changes since commit fa8883a1e39a20e72aaa5093af0c80062cb95757:

  Merge branch 'master' of git://git.denx.de/u-boot-i2c (2015-11-27 08:41:03 
-0500)

are available in the git repository at:

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

for you to fetch changes up to e4677f1ae221ac615f32c993aaf3d2497ad5009d:

  arm: at91/spl: atmel_sfr: move saic redirect to separate file (2015-11-30 
22:27:55 +0100)


Wenyou Yang (7):
  gpio: atmel: Add the PIO4 driver support
  arm: atmel: Add SAMA5D2 Xplained board
  arm: at91/spl: matrix: move matrix init to separate file
  arm: at91/spl: matrix: remove matrix write protection code
  arm: at91/spl: matrix: remove security peripheral select code
  arm: at91/spl: matrix: use matrix slave id macros
  arm: at91/spl: atmel_sfr: move saic redirect to separate file

 arch/arm/mach-at91/Kconfig   |   5 +
 arch/arm/mach-at91/Makefile  |   2 +-
 arch/arm/mach-at91/armv7/Makefile|   1 +
 arch/arm/mach-at91/armv7/sama5d2_devices.c   |  57 +
 arch/arm/mach-at91/armv7/sama5d4_devices.c   |  55 -
 arch/arm/mach-at91/atmel_sfr.c   |  21 ++
 arch/arm/mach-at91/include/mach/at91_pmc.h   |   9 +-
 arch/arm/mach-at91/include/mach/atmel_pio4.h |  48 
 arch/arm/mach-at91/include/mach/atmel_usba_udc.h |   3 +-
 arch/arm/mach-at91/include/mach/hardware.h   |   2 +
 arch/arm/mach-at91/include/mach/sama5_sfr.h  |   1 -
 arch/arm/mach-at91/include/mach/sama5d2.h| 203 
 arch/arm/mach-at91/include/mach/sama5d4.h|  28 +++
 arch/arm/mach-at91/matrix.c  |  34 +++
 board/atmel/sama5d2_xplained/Kconfig |  15 ++
 board/atmel/sama5d2_xplained/MAINTAINERS |   7 +
 board/atmel/sama5d2_xplained/Makefile|   8 +
 board/atmel/sama5d2_xplained/sama5d2_xplained.c  | 283 ++
 configs/sama5d2_xplained_mmc_defconfig   |  11 +
 configs/sama5d2_xplained_spiflash_defconfig  |  11 +
 drivers/gpio/Kconfig |  11 +
 drivers/gpio/Makefile|   1 +
 drivers/gpio/atmel_pio4.c| 296 +++
 include/configs/sama5d2_xplained.h   | 122 ++
 24 files changed, 1171 insertions(+), 63 deletions(-)
 create mode 100644 arch/arm/mach-at91/armv7/sama5d2_devices.c
 create mode 100644 arch/arm/mach-at91/atmel_sfr.c
 create mode 100644 arch/arm/mach-at91/include/mach/atmel_pio4.h
 create mode 100644 arch/arm/mach-at91/include/mach/sama5d2.h
 create mode 100644 arch/arm/mach-at91/matrix.c
 create mode 100644 board/atmel/sama5d2_xplained/Kconfig
 create mode 100644 board/atmel/sama5d2_xplained/MAINTAINERS
 create mode 100644 board/atmel/sama5d2_xplained/Makefile
 create mode 100644 board/atmel/sama5d2_xplained/sama5d2_xplained.c
 create mode 100644 configs/sama5d2_xplained_mmc_defconfig
 create mode 100644 configs/sama5d2_xplained_spiflash_defconfig
 create mode 100644 drivers/gpio/atmel_pio4.c
 create mode 100644 include/configs/sama5d2_xplained.h
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot, v2, 5/5] arm: at91/spl: atmel_sfr: move saic redirect to separate file

2015-11-30 Thread Andreas Bießmann
Dear Wenyou Yang,

Wenyou Yang  writes:
>To make saic redirect code sharing with other SoCs, move the
>saic redirect code from SAMA5D4 particular file,
>mach-at91/armv7/sama5d4_devices.c to a separate file,
>mach-at91/atmel_sfr.c
>
>Move ATMEL_SFR_AICREDIR_KEY definition to sama5d4.h, because each
>SoC has its own value.
>
>Signed-off-by: Wenyou Yang 
>Reviewed-by: Andreas Bießmann 
>---
>
>Changes in v2:
> 1./ split the version 1 [PATCH 2/3] into three patches for
> more legible.
>
> arch/arm/mach-at91/Makefile |2 +-
> arch/arm/mach-at91/armv7/sama5d4_devices.c  |   13 -
> arch/arm/mach-at91/atmel_sfr.c  |   21 +
> arch/arm/mach-at91/include/mach/sama5_sfr.h |1 -
> arch/arm/mach-at91/include/mach/sama5d4.h   |3 +++
> 5 files changed, 25 insertions(+), 15 deletions(-)
> create mode 100644 arch/arm/mach-at91/atmel_sfr.c

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

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


[U-Boot] [PATCH] drivers:usb:fsl: Add T4080 as affected soc for Erratum A007792 sw workaround

2015-11-30 Thread Rajesh Bhagat
Apply Erratum A007792 sw workaround for T4080

Signed-off-by: Sriram Dash 
Signed-off-by: Rajesh Bhagat 
Signed-off-by: Ramneek Mehresh 
---
 include/fsl_usb.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/fsl_usb.h b/include/fsl_usb.h
index 8e3dded..187e384 100644
--- a/include/fsl_usb.h
+++ b/include/fsl_usb.h
@@ -181,6 +181,7 @@ static inline bool has_erratum_a007792(void)
switch (soc) {
case SVR_T4240:
case SVR_T4160:
+   case SVR_T4080:
return IS_SVR_REV(svr, 2, 0);
case SVR_T1024:
case SVR_T1023:
-- 
2.6.2.198.g614a2ac

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


Re: [U-Boot] [PATCH v5 00/21] Bring up rk3036 uboot

2015-11-30 Thread Stefan Roese

On 30.11.2015 09:39, Sjoerd Simons wrote:

On Mon, 2015-11-30 at 09:24 +0100, Stefan Roese wrote:

Hi Sjoerd,

On 30.11.2015 09:12, Sjoerd Simons wrote:

On Fri, 2015-11-27 at 16:21 -0800, Simon Glass wrote:

+a few others who have submitted patches


I suspect this is unrelated to the 3036 bringup, but at the moment
i
can't build the 3288 firefly SPL smaller then 32k :( (iotw small
enoug
to be used as an SD card image). The image ends up being about 250
bytes too big..

Playing silly games with nm, it seems the big items are the sdram
bringup-code, mmc core/drivers and ofcourse (vs)printf related
functions (followed by a long tail of smaller things).

Seems like a bit of dieting is required ;)


Did you try using the new tiny-printf implementation
(CONFIG_USE_TINY_PRINTF)? It should save you ~2.5KiB.


Thanks for the tip, a first quick tried unfortunately shows that both
the gpio uclass and the mmc core support fail to build when that option
is enabled (missing sprintf, and various _strtoXX functiosn).


Ah, right. This new option has not been enabled on a SPL-DM
platform yet. Something might be missing there.


Probably worth a try in fixing that though given the pontential
savings.


Yes, this should hopefully not be too hard to fix.

Thanks,
Stefan

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


Re: [U-Boot] [PATCH v2 12/26] dm: pci: video: Convert video and pci_rom to use DM PCI API

2015-11-30 Thread Anatolij Gustschin
Hi Simon,

On Sun, 29 Nov 2015 13:17:57 -0700
Simon Glass  wrote:

> Adjust these files to use the driver-model PCI API instead of the legacy
> functions.
> 
> Signed-off-by: Simon Glass 
> ---
> 
> Changes in v2:
> - Rename pci_run_vga_bios() to dm_pci_run_vga_bios()
> - Require driver model with pci_rom.c
> - Use dev_get_parent_platdata() instead of re-reading values from the device
> 
>  arch/x86/cpu/ivybridge/gma.c |  4 ++--
>  drivers/pci/Makefile |  3 ++-
>  drivers/pci/pci_rom.c| 51 
> +---
>  drivers/video/vesa_fb.c  | 10 -
>  include/pci_rom.h|  6 +++---
>  5 files changed, 36 insertions(+), 38 deletions(-)

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


Re: [U-Boot] [PATCH] arm: imx6: novena, gw_ventana: Fix use of pfuze100 bit definitions

2015-11-30 Thread Przemyslaw Marczak

Hello Stefano,

On 11/26/2015 02:08 PM, Marek Vasut wrote:

The following patch changed the PFUZE100 swbst register bit definitions
and broke PMIC configuration on multiple boards, at least on the novena
and gw_ventana. This patch fixes it.

commit 8fa46350a4c7dca7710362f6c871098557b934ad
Author: Peng Fan 
Date:   Fri Aug 7 16:43:45 2015 +0800

 power: regulator: add pfuze100 support

Signed-off-by: Marek Vasut 
Cc: Fabio Estevam 
Cc: Peng Fan 
Cc: Przemyslaw Marczak 
Cc: Stefano Babic 
Cc: Tim Harvey 
Cc: Vagrant Cascadian 
---
  board/gateworks/gw_ventana/common.c | 2 +-
  board/kosagi/novena/novena.c| 2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)


Will you pick-up this patch, or should it go through PMIC tree?

Best regards,
--
Przemyslaw Marczak
Samsung R 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] arm: imx6: novena, gw_ventana: Fix use of pfuze100 bit definitions

2015-11-30 Thread Stefano Babic
On 30/11/2015 10:53, Przemyslaw Marczak wrote:
> Hello Stefano,
> 
> On 11/26/2015 02:08 PM, Marek Vasut wrote:
>> The following patch changed the PFUZE100 swbst register bit definitions
>> and broke PMIC configuration on multiple boards, at least on the novena
>> and gw_ventana. This patch fixes it.
>>
>> commit 8fa46350a4c7dca7710362f6c871098557b934ad
>> Author: Peng Fan 
>> Date:   Fri Aug 7 16:43:45 2015 +0800
>>
>>  power: regulator: add pfuze100 support
>>
>> Signed-off-by: Marek Vasut 
>> Cc: Fabio Estevam 
>> Cc: Peng Fan 
>> Cc: Przemyslaw Marczak 
>> Cc: Stefano Babic 
>> Cc: Tim Harvey 
>> Cc: Vagrant Cascadian 
>> ---
>>   board/gateworks/gw_ventana/common.c | 2 +-
>>   board/kosagi/novena/novena.c| 2 +-
>>   2 files changed, 2 insertions(+), 2 deletions(-)
> 
> Will you pick-up this patch, or should it go through PMIC tree?

They are i.MXes, I pick them up.

Best regards,
Stefano


-- 
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
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] arm, ubifs: fix gcc5.x compiler warning

2015-11-30 Thread Heiko Schocher

Hello Jeroen,

Am 30.11.2015 um 10:20 schrieb Jeroen Hofstee:

Hello Heiko,

On 30-11-15 08:47, Heiko Schocher wrote:

compiling U-Boot for openrd_base_defconfig with
gcc 5.x shows the following warning:

   CC  fs/ubifs/super.o
In file included from fs/ubifs/ubifs.h:35:0,
  from fs/ubifs/super.c:37:
fs/ubifs/super.c: In function 'atomic_inc':
./arch/arm/include/asm/atomic.h:55:2: warning: 'flags' is used uninitialized in 
this function
[-Wuninitialized]
   local_irq_save(flags);
   ^
fs/ubifs/super.c: In function 'atomic_dec':
./arch/arm/include/asm/atomic.h:64:2: warning: 'flags' is used uninitialized in 
this function
[-Wuninitialized]
   local_irq_save(flags);
   ^
   CC  fs/ubifs/sb.o
[...]
   CC  fs/ubifs/lpt.o
In file included from include/linux/bitops.h:123:0,
  from include/common.h:20,
  from include/ubi_uboot.h:17,
  from fs/ubifs/ubifs.h:37,
  from fs/ubifs/lpt.c:35:
fs/ubifs/lpt.c: In function 'test_and_set_bit':
./arch/arm/include/asm/bitops.h:57:2: warning: 'flags' is used uninitialized in 
this function
[-Wuninitialized]
   local_irq_save(flags);
   ^
   CC  fs/ubifs/lpt_commit.o
In file included from include/linux/bitops.h:123:0,
  from include/common.h:20,
  from include/ubi_uboot.h:17,
  from fs/ubifs/ubifs.h:37,
  from fs/ubifs/lpt_commit.c:26:
fs/ubifs/lpt_commit.c: In function 'test_and_set_bit':
./arch/arm/include/asm/bitops.h:57:2: warning: 'flags' is used uninitialized in 
this function
[-Wuninitialized]
   local_irq_save(flags);
   ^
   CC  fs/ubifs/scan.o
   CC  fs/ubifs/lprops.o
   CC  fs/ubifs/tnc.o
In file included from include/linux/bitops.h:123:0,
  from include/common.h:20,
  from include/ubi_uboot.h:17,
  from fs/ubifs/ubifs.h:37,
  from fs/ubifs/tnc.c:30:
fs/ubifs/tnc.c: In function 'test_and_set_bit':
./arch/arm/include/asm/bitops.h:57:2: warning: 'flags' is used uninitialized in 
this function
[-Wuninitialized]
   local_irq_save(flags);
   ^
   CC  fs/ubifs/tnc_misc.o

Fix it.

Signed-off-by: Heiko Schocher 
---

  arch/arm/include/asm/atomic.h | 14 +++---
  arch/arm/include/asm/bitops.h |  4 ++--
  2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/arch/arm/include/asm/atomic.h b/arch/arm/include/asm/atomic.h
index 34c07fe..9b79506 100644
--- a/arch/arm/include/asm/atomic.h
+++ b/arch/arm/include/asm/atomic.h
@@ -32,7 +32,7 @@ typedef struct { volatile int counter; } atomic_t;
  static inline void atomic_add(int i, volatile atomic_t *v)
  {
-unsigned long flags;
+unsigned long flags = 0;
  local_irq_save(flags);
  v->counter += i;
@@ -41,7 +41,7 @@ static inline void atomic_add(int i, volatile atomic_t *v)


Since flags is an "out" argument, something else must be wrong.
There should be no need to initialize it, since local_irq_save should
do that afaik.


yes, you are right, it should be, but gcc 5.x seems to have problems
with it ... compiled code size for the openrd_base config is same with
my patch ...

Hmm... for the openrd_base compile local_irq_save() is used from:
arch/arm/thumb1/include/asm/proc-armv/system.h

with:
static inline void local_irq_save(
unsigned long flags __attribute__((unused)))
{
__asm__ __volatile__ ("" : : : "memory");
}

flasg marked as unused ... seems correct to me, but I have
no idea, why gcc 5.x prints a warning ... any ideas?

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


Re: [U-Boot] [PATCH] arm: imx6: novena, gw_ventana: Fix use of pfuze100 bit definitions

2015-11-30 Thread Przemyslaw Marczak


On 11/30/2015 11:00 AM, Stefano Babic wrote:

On 30/11/2015 10:53, Przemyslaw Marczak wrote:

Hello Stefano,

On 11/26/2015 02:08 PM, Marek Vasut wrote:

The following patch changed the PFUZE100 swbst register bit definitions
and broke PMIC configuration on multiple boards, at least on the novena
and gw_ventana. This patch fixes it.

commit 8fa46350a4c7dca7710362f6c871098557b934ad
Author: Peng Fan 
Date:   Fri Aug 7 16:43:45 2015 +0800

  power: regulator: add pfuze100 support

Signed-off-by: Marek Vasut 
Cc: Fabio Estevam 
Cc: Peng Fan 
Cc: Przemyslaw Marczak 
Cc: Stefano Babic 
Cc: Tim Harvey 
Cc: Vagrant Cascadian 
---
   board/gateworks/gw_ventana/common.c | 2 +-
   board/kosagi/novena/novena.c| 2 +-
   2 files changed, 2 insertions(+), 2 deletions(-)


Will you pick-up this patch, or should it go through PMIC tree?


They are i.MXes, I pick them up.

Best regards,
Stefano




Ok, thank you.

Best regards,
--
Przemyslaw Marczak
Samsung R 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] imx: mx6: add missing return value

2015-11-30 Thread Stefano Babic
On 30/11/2015 02:46, Peng Fan wrote:
> Hi Jeroen,
> On Sun, Nov 29, 2015 at 06:30:34PM +0100, Jeroen Hofstee wrote:
>> cc: Peng Fan 
>> Signed-off-by: Jeroen Hofstee 
>> ---
>> not tested ;)
>>
>> arch/arm/cpu/armv7/mx6/clock.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/arch/arm/cpu/armv7/mx6/clock.c b/arch/arm/cpu/armv7/mx6/clock.c
>> index 67e0f32..4f6fe86 100644
>> --- a/arch/arm/cpu/armv7/mx6/clock.c
>> +++ b/arch/arm/cpu/armv7/mx6/clock.c
>> @@ -715,6 +715,8 @@ int enable_lcdif_clock(u32 base_addr)
>>  reg = readl(_ccm->CCGR2);
>>  reg |= MXC_CCM_CCGR2_LCD_MASK;
>>  writel(reg, _ccm->CCGR2);
>> +
>> +return 0;
> 
> I CCed i.MX branch maintainer for you.
> 
> Reviewed-by: Peng Fan 
> 

Thanks.

Reviewed-by: Stefano Babic 

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
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] checkpatch.pl: Fix checkpatch.pl warnings with Perl 5.22

2015-11-30 Thread Alexey Brodkin
Hi Joe,

On Thu, 2015-09-03 at 15:46 -0500, Joe Hershberger wrote:
> Hi Moritz,
> 
> On Thu, Sep 3, 2015 at 2:25 PM, Moritz Fischer  
> wrote:
> > This patch fixes a bunch of deprecation warings that show up when using
> > checkpatch.pl with Perl 5.22.
> > 
> > Unescaped left brace in regex is deprecated, passed through in regex;
> > marked by <-- HERE in m/\#\s*define.*do\s{ <-- HERE / at
> > ./scripts/checkpatch.pl line 2829.
> > 
> > Unescaped left brace in regex is deprecated, passed through in regex;
> > marked by <-- HERE in m/\(.*\){ <-- HERE / at
> > ./scripts/checkpatch.pl line 3262.
> > 
> > Unescaped left brace in regex is deprecated, passed through in regex;
> > marked by <-- HERE in m/do{ <-- HERE / at
> > ./scripts/checkpatch.pl line 3263.
> > 
> > Unescaped left brace in regex is deprecated, passed through in regex;
> > marked by <-- HERE in m/^\({ <-- HERE / at
> > ./scripts/checkpatch.pl line 3636.
> > 
> > Unescaped left brace in regex is deprecated, passed through in regex;
> > marked by <-- HERE in m/(?^x:
> > 
> > Signed-off-by: Moritz Fischer 
> 
> Please submit this and have it accepted in the Linux tree. We will
> then pull it in here once it is accepted there.

Similar fix is already in Linus' master tree, see
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=4e5d56bdf892e18832a6540b63ebf709966bce2a

Also note:
 [1] That commit from Linux tree won't apply cleanly on U-Boot
 due to a bit different context.
 [2] Even if manually tweaked it looks like it is incomplete:
 --->8---
 )\(.*\).*\s{ <-- HERE / at scripts/checkpatch.pl line 2828.
 --->8---

So with above in mind could you please apply that patch posted by
Moritz?

This fixes checkpatch in Fedora 23 - in current state it is way too noisy.

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


Re: [U-Boot] [PATCH] imx: mx7dsabresd: Add QSPI support

2015-11-30 Thread Stefano Babic
On 30/11/2015 10:45, Peng Fan wrote:
> Support qspi flashes for mx7dsabresd
> 1. introduce pin mux settings
> 2. enable qspi clock
> 3. introduce related macro definitions
> 
> Default QSPI is not enabled, since we need hardware rework to use QSPI,
> see SPF-28590, page 9:
> "
> QSPI signals are muxed with EPDC_D[7:0]
> When using QSPI: de-populate R388-R391, R396-R399
> populate R392-R395, R299, R300
> "
> 
> After hardware rework, define CONFIG_FSL_QSPI in mx7dsabresd.h. qspi
> flashes can be deteced and read/erase/write. Log info:
> "
> => sf probe
> SF: Detected MX25L51235F with page size 256 Bytes, erase size 64 KiB, total 
> 64 MiB
> => sf read 0x8000 0 0x400
> device 0 whole chip
> SF: 67108864 bytes @ 0x0 Read: OK
> => sf erase 0 0x400
> SF: 67108864 bytes @ 0x0 Erased: OK
> => sf write 0x8000 0 0x400
> device 0 whole chip
> SF: 67108864 bytes @ 0x0 Written: OK
> "
> 
> Signed-off-by: Peng Fan 
> Cc: Stefano Babic 
> Cc: Fabio Estevam 
> Cc: Adrian Alonso 
> ---
>  board/freescale/mx7dsabresd/mx7dsabresd.c | 30 ++
>  include/configs/mx7dsabresd.h | 15 +++
>  2 files changed, 45 insertions(+)
> 
> diff --git a/board/freescale/mx7dsabresd/mx7dsabresd.c 
> b/board/freescale/mx7dsabresd/mx7dsabresd.c
> index 6c863da..f8ae973 100644
> --- a/board/freescale/mx7dsabresd/mx7dsabresd.c
> +++ b/board/freescale/mx7dsabresd/mx7dsabresd.c
> @@ -44,6 +44,9 @@ DECLARE_GLOBAL_DATA_PTR;
>  #define LCD_PAD_CTRL(PAD_CTL_HYS | PAD_CTL_PUS_PU100KOHM | \
>   PAD_CTL_DSE_3P3V_49OHM)
>  
> +#define QSPI_PAD_CTRL\
> + (PAD_CTL_DSE_3P3V_49OHM | PAD_CTL_PUE | PAD_CTL_PUS_PU47KOHM)
> +
>  #ifdef CONFIG_SYS_I2C_MXC
>  #define PC MUX_PAD_CTRL(I2C_PAD_CTRL)
>  /* I2C1 for PMIC */
> @@ -455,6 +458,29 @@ int board_phy_config(struct phy_device *phydev)
>  }
>  #endif
>  
> +#ifdef CONFIG_FSL_QSPI
> +static iomux_v3_cfg_t const quadspi_pads[] = {
> + MX7D_PAD_EPDC_DATA00__QSPI_A_DATA0 | MUX_PAD_CTRL(QSPI_PAD_CTRL),
> + MX7D_PAD_EPDC_DATA01__QSPI_A_DATA1 | MUX_PAD_CTRL(QSPI_PAD_CTRL),
> + MX7D_PAD_EPDC_DATA02__QSPI_A_DATA2 | MUX_PAD_CTRL(QSPI_PAD_CTRL),
> + MX7D_PAD_EPDC_DATA03__QSPI_A_DATA3 | MUX_PAD_CTRL(QSPI_PAD_CTRL),
> + MX7D_PAD_EPDC_DATA05__QSPI_A_SCLK  | MUX_PAD_CTRL(QSPI_PAD_CTRL),
> + MX7D_PAD_EPDC_DATA06__QSPI_A_SS0_B | MUX_PAD_CTRL(QSPI_PAD_CTRL),
> +};
> +
> +int board_qspi_init(void)
> +{
> + /* Set the iomux */
> + imx_iomux_v3_setup_multiple_pads(quadspi_pads,
> +  ARRAY_SIZE(quadspi_pads));
> +
> + /* Set the clock */
> + set_clk_qspi();
> +
> + return 0;
> +}
> +#endif
> +
>  int board_early_init_f(void)
>  {
>   setup_iomux_uart();
> @@ -481,6 +507,10 @@ int board_init(void)
>   setup_lcd();
>  #endif
>  
> +#ifdef CONFIG_FSL_QSPI
> + board_qspi_init();
> +#endif
> +
>   return 0;
>  }
>  
> diff --git a/include/configs/mx7dsabresd.h b/include/configs/mx7dsabresd.h
> index cc98547..22e515c 100644
> --- a/include/configs/mx7dsabresd.h
> +++ b/include/configs/mx7dsabresd.h
> @@ -236,4 +236,19 @@
>  #define CONFIG_VIDEO_BMP_LOGO
>  #endif
>  
> +#ifdef CONFIG_FSL_QSPI
> +#define CONFIG_CMD_SF
> +#define CONFIG_SPI_FLASH
> +#define CONFIG_SPI_FLASH_MACRONIX
> +#define CONFIG_SPI_FLASH_BAR
> +#define CONFIG_SF_DEFAULT_BUS0
> +#define CONFIG_SF_DEFAULT_CS 0
> +#define CONFIG_SF_DEFAULT_SPEED  4000
> +#define CONFIG_SF_DEFAULT_MODE   SPI_MODE_0
> +#define FSL_QSPI_FLASH_NUM   1
> +#define FSL_QSPI_FLASH_SIZE  SZ_64M
> +#define QSPI0_BASE_ADDR  QSPI1_IPS_BASE_ADDR
> +#define QSPI0_AMBA_BASE  QSPI0_ARB_BASE_ADDR
> +#endif
> +
>  #endif   /* __CONFIG_H */
> 

Reviewed-by: Stefano Babic 

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
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] arm: imx6: novena, gw_ventana: Fix use of pfuze100 bit definitions

2015-11-30 Thread Tim Harvey
On Thu, Nov 26, 2015 at 5:08 AM, Marek Vasut  wrote:
> The following patch changed the PFUZE100 swbst register bit definitions
> and broke PMIC configuration on multiple boards, at least on the novena
> and gw_ventana. This patch fixes it.
>
> commit 8fa46350a4c7dca7710362f6c871098557b934ad
> Author: Peng Fan 
> Date:   Fri Aug 7 16:43:45 2015 +0800
>
> power: regulator: add pfuze100 support
>
> Signed-off-by: Marek Vasut 
> Cc: Fabio Estevam 
> Cc: Peng Fan 
> Cc: Przemyslaw Marczak 
> Cc: Stefano Babic 
> Cc: Tim Harvey 
> Cc: Vagrant Cascadian 
> ---
>  board/gateworks/gw_ventana/common.c | 2 +-
>  board/kosagi/novena/novena.c| 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/board/gateworks/gw_ventana/common.c 
> b/board/gateworks/gw_ventana/common.c
> index d406c83..a20190e 100644
> --- a/board/gateworks/gw_ventana/common.c
> +++ b/board/gateworks/gw_ventana/common.c
> @@ -806,7 +806,7 @@ void setup_pmic(void)
> /* Set SWBST to 5.0V and enable */
> pmic_reg_read(p, PFUZE100_SWBSTCON1, );
> reg &= ~(SWBST_MODE_MASK | SWBST_VOL_MASK);
> -   reg |= (SWBST_5_00V | SWBST_MODE_AUTO);
> +   reg |= (SWBST_5_00V | (SWBST_MODE_AUTO << 
> SWBST_MODE_SHIFT));
> pmic_reg_write(p, PFUZE100_SWBSTCON1, reg);
> }
> }
> diff --git a/board/kosagi/novena/novena.c b/board/kosagi/novena/novena.c
> index babba85..b3159d3 100644
> --- a/board/kosagi/novena/novena.c
> +++ b/board/kosagi/novena/novena.c
> @@ -216,7 +216,7 @@ int power_init_board(void)
> /* Set SWBST to 5.0V and enable (for USB) */
> pmic_reg_read(p, PFUZE100_SWBSTCON1, );
> reg &= ~(SWBST_MODE_MASK | SWBST_VOL_MASK);
> -   reg |= (SWBST_5_00V | SWBST_MODE_AUTO);
> +   reg |= (SWBST_5_00V | (SWBST_MODE_AUTO << SWBST_MODE_SHIFT));
> pmic_reg_write(p, PFUZE100_SWBSTCON1, reg);
>
> return 0;
> --
> 2.1.4
>

Acked-by: Tim Harvey 

Thanks Marek!

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


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

2015-11-30 Thread Marek Vasut
On Monday, November 30, 2015 at 05:40:11 PM, Tom Rini wrote:
> On Mon, Nov 30, 2015 at 01:33:56PM +0100, Marek Vasut wrote:
> > The following changes since commit fa8883a1e39a20e72aaa5093af0c80062cb95757:
> >   Merge branch 'master' of git://git.denx.de/u-boot-i2c (2015-11-27
> >   08:41:03
> > 
> > -0500)
> > 
> > are available in the git repository at:
> >   git://git.denx.de/u-boot-usb.git
> > 
> > for you to fetch changes up to b5c6f21bf9761f12b43dfc652e5635ab8ec0d7c2:
> >   drivers:usb:fsl: Add T4080 as affected soc for Erratum A007792 sw
> >   workaround
> > 
> > (2015-11-30 13:33:22 +0100)
> 
> NAK:
> +(CSQ_CS908,Linksprite_pcDuino,Cubieboard,Lamobo_R1,Mele_A1000,Mele_A1000G_
> quad,i12-tvbo
> x,mk802_a10s,Wobo_i5,Auxtek-T004,Auxtek-T003,mk802,Linksprite_pcDuino3_Nan
> o,A10-OLinuXin
> o-Lime,Hummingbird_A31,Linksprite_pcDuino3,A20-OLinuXino_MICRO,A20-OLinuXi
> no-Lime,r7-tv-
> dongle,ga10h_v1_1,MK808C,mixtile_loftq,sunxi_Gemei_G9,Cubieboard2,Mele_M3,
> Mele_M5,Mele_M
> 9,A13-OLinuXino,A10s-OLinuXino-M,Bananapro,mk802ii,Marsboard_A10,ba10_tv_b
> ox,Wits_Pro_A2
> 0_DKT,Sinovoip_BPI_M2,Mele_I7,A20-Olimex-SOM-EVB,Cubietruck,Colombus,Orang
> epi,Wexler_TAB
> 7200,inet1,jesurun_q5,Orangepi_mini,A20-OLinuXino-Lime2,Bananapi,Mini-X,A1
> 3-OLinuXinoM)
> drivers/usb/host/ehci-sunxi.o:(.u_boot_list_2_driver_2_usb_ehci+0x0):
> multiple definition of `_u_boot_list_2_driver_2_usb_ehci'
> ...
> +(ph1_sld8,ph1_sld3,ph1_ld4)
> build/../drivers/usb/host/ehci-generic.c:33: undefined reference to
> `ehci_deregister'
> ...
> w+(xilinx_zynqmp_ep) ../drivers/usb/host/xhci-zynqmp.c:142:2: warning:
> 'return' with a value, in function returning void

Can you try dropping the ehci-generic patch ?

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


Re: [U-Boot] [Patch V4 6/7] armv8/ls1043ardb: add DSPI support

2015-11-30 Thread York Sun


On 11/11/2015 01:58 AM, Gong Qianyu wrote:
> Use the U-Boot Driver Model. Just enable Freescale DSPI driver
> and set DSPI related parameters in dts file.
> 
> Signed-off-by: Gong Qianyu 
> ---
> V4:
>  - No change.
> V3:
>  - New Patch.
>  - Tested on LS1043ARDB board.
> 
>  arch/arm/dts/fsl-ls1043a-rdb.dts| 19 +++
>  arch/arm/dts/fsl-ls1043a.dtsi   | 26 ++
>  configs/ls1043ardb_defconfig|  3 +++
>  configs/ls1043ardb_nand_defconfig   |  5 +
>  configs/ls1043ardb_sdcard_defconfig |  5 +
>  include/configs/ls1043ardb.h| 10 ++
>  6 files changed, 68 insertions(+)

Applied to fsl-qoriq master. Thanks.

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


Re: [U-Boot] [Patch V4 7/7] armv8/ls1043ardb: add USB support

2015-11-30 Thread York Sun


On 11/11/2015 01:58 AM, Gong Qianyu wrote:
> Add support for the third USB controller for LS1043A.
> 
> Signed-off-by: Gong Qianyu 
> ---
> V4:
>  - No change.
> V3:
>  - New Patch. Tested on LS1043ARDB board.
> 
>  arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h |  6 +++---
>  board/freescale/ls1043ardb/ls1043ardb.c| 16 
>  include/configs/ls1043ardb.h   | 13 +
>  include/linux/usb/xhci-fsl.h   |  9 -
>  4 files changed, 40 insertions(+), 4 deletions(-)
> 

Applied to fsl-qoriq master. Thanks.

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


Re: [U-Boot] [PATCH v1] armv8: fsl-layerscape: Fix "cpu release" command

2015-11-30 Thread York Sun


On 11/12/2015 12:38 PM, York Sun wrote:
> When one core is released, other cores may not have valid entry
> address. Those cores are trapped by "wfe" and wait for further
> instruction. When their address is set, they need to be kicked
> off by "sev".
> 
> Signed-off-by: York Sun 
> 
> ---
> 
>  arch/arm/cpu/armv8/fsl-layerscape/mp.c |6 ++
>  1 file changed, 6 insertions(+)
> 

Applied to fsl-qoriq master.

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


Re: [U-Boot] [PATCH] drivers/ddr/fsl: Fix typo in BIST test for DDR4

2015-11-30 Thread York Sun


On 11/06/2015 09:58 AM, York Sun wrote:
> BIST test code has a typo, resulting the binding registers not
> maintained as expected. This typo results BIST runs twice on
> the covered memory.
> 
> Signed-off-by: York Sun 
> Reported-by: Shengzhou Liu 
> ---
> 
>  drivers/ddr/fsl/fsl_ddr_gen4.c |   24 
>  1 file changed, 12 insertions(+), 12 deletions(-)
> 

Applied to fsl-qoriq master.

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


Re: [U-Boot] [PATCH] driver: net: ldpaa: Update the lane number to DPMAC mapping

2015-11-30 Thread York Sun


On 11/24/2015 09:54 PM, Prabhakar Kushwaha wrote:
> As of patch "http://patchwork.ozlabs.org/patch/539748/;, serdes_init() is
> passing correct DPMAC id.
> 
> So Update the lane to DPMAC mapping.
> 
> Signed-off-by: Prabhakar Kushwaha 
> ---
>  drivers/net/ldpaa_eth/ldpaa_wriop.c | 17 -
>  1 file changed, 8 insertions(+), 9 deletions(-)

Squashed with patch "armv8: lsch3: Fix lane protocol parsing logic"
http://patchwork.ozlabs.org/patch/539748/

York

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


Re: [U-Boot] [PATCH] arm: ls1021a: Ensure LS1021 ARM Generic Timer CompareValue Set 64-bit

2015-11-30 Thread York Sun


On 07/15/2015 12:13 AM, Alison Wang wrote:
> This patch addresses a problem mentioned recently on this mailing list:
> [1].
> 
> In that posting a LS1021 based system was locking up at about 5 minutes
> after boot, but the problem was mysteriously related to the toolchain
> used for building u-boot.  Debugging the problem reveals a stuck
> interrupt 29 on the GIC.
> 
> It appears Freescale's LS1021 support in u-boot erroneously sets the
> 64-bit ARM generic PL1 physical time CompareValue register to all-ones
> with a 32-bit value.  This causes the timer compare to fire 344 seconds
> after u-boot configures it.  Depending on how fast u-boot gets the
> kernel booted, this amounts to about 5-minutes of Linux uptime before
> locking up.
> 
> Apparently the bug is masked by some toolchains.  Perhaps this is
> explained by default compiler options, word sizes, or binutils versions.
> At any rate this patch makes the manipulation explicitly 64-bit which
> alleviates the issue.
> 
> [1]
> https://lists.yoctoproject.org/pipermail/meta-freescale/2015-June/014400.html
> 
> Signed-off-by: Chris Kilgour 
> Signed-off-by: Alison Wang 
> ---

Applied to fsl-qoriq master. Thanks.

York



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


[U-Boot] [PATCHv1 0/3] Retrieve MAC address from EEPROM

2015-11-30 Thread Olliver Schinagl
From: Olliver Schinagl 

This patch-series introduces methods to retrieve the MAC address from an
onboard EEPROM. I know there is probably a thing or two that might needed
to be changed to make the concept apply in a more generic way.

The reason we might want to read the MAC address from an EEPROM instead of
storing the entire environment is mostly a size thing. Our default environment
already is bigger then the EEPROM so it is understandable that someone might
not give up the entire eeprom just for the u-boot environment. Especially if
only board specific things might be stored in the eeprom (MAC, serial, product
number etc).

The current idea of the eeprom layout, is to skip the first 8 bytes, so that
other information can be stored there if needed, for example a header with some
magic to identify the EEPROM. Or equivalent purposes.

After those 8 bytes the MAC address follows and identifier byte to indicate the
interface the MAC is applicable too, 0x00 - 0xFE to indicate ethernet interface
0 to 254. 0xFF has special meaning that it does not matter. This bit
(no pun intended) is where I am not sure it should be in here at all, but it
seemed more logical than simple order based. For example, if there are 2
ethernet devices on a board, eth0 being an internal device, and eth1 being an
external facing device and only 1 MAC address per device is allotted, it can
seem logical that eth1 gets the MAC address and eth0 gets a randomly chosen MAC
address (or whatever the fall back behavior is).

These 7 bytes are then appended with a CRC8 byte and can be optionally checked,
although the whole optional-ness could be very well dropped.

Hans de Goede and I talked about retrieving the MAC from the EEPROM for sunxi
based boards a while ago, but hopefully this patch makes possible to have
something slightly more generic, even if only the configuration option and the
EEPROM layout.

Since the Olimex OLinuXino sunxi boards all seem to have an eeprom, I started
my work on one of these and tested the implementation with one of our own real
MAC addresses.

Features planned for v2, simple tool to write the MAC address to the eeprom
from Linux.

Olliver Schinagl (3):
  net: Add ability to set MAC address via EEPROM to Kconfig
  sunxi: net: Allow the sunxi to set the MAC from an EEPROM
  sunxi: net: Enable eeprom on OLinuXino Lime2 boards

 board/sunxi/Kconfig   |  4 +++
 board/sunxi/board.c   | 36 +
 configs/A20-OLinuXino-Lime2_defconfig |  3 ++
 doc/README.enetaddr   | 36 +
 net/Kconfig   | 59 +++
 5 files changed, 138 insertions(+)

-- 
2.6.2

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


[U-Boot] [PATCHv1 3/3] sunxi: net: Enable eeprom on OLinuXino Lime2 boards

2015-11-30 Thread Olliver Schinagl
From: Olliver Schinagl 

This patch enables the I2C EEPROM to be probed for a MAC address on the
OLinuXino board.

Signed-off-by: Olliver Schinagl 
---
 configs/A20-OLinuXino-Lime2_defconfig | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/configs/A20-OLinuXino-Lime2_defconfig 
b/configs/A20-OLinuXino-Lime2_defconfig
index b5181c6..5e38618 100644
--- a/configs/A20-OLinuXino-Lime2_defconfig
+++ b/configs/A20-OLinuXino-Lime2_defconfig
@@ -14,4 +14,7 @@ 
CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,AHCI,SATAPWR=SUNXI_GPC(3)"
 # CONFIG_CMD_FPGA is not set
 CONFIG_CMD_GPIO=y
 CONFIG_ETH_DESIGNWARE=y
+CONFIG_NET_ETHADDR_EEPROM=y
+CONFIG_NET_ETHADDR_EEPROM_I2C=y
+CONFIG_NET_ETHADDR_EEPROM_I2C_BUS=1
 CONFIG_USB_EHCI_HCD=y
-- 
2.6.2

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


Re: [U-Boot] [PATCH] arm: ls1021a: Ensure Generic Timer disabled before jumping into the OS

2015-11-30 Thread York Sun


On 08/03/2015 06:55 PM, Alison Wang wrote:
> This patch addresses a problem mentioned recently on this mailing list:
> [1].
> 
> In that posting a LS1021 based system was locking up at about 5 minutes
> after boot,but the problem was mysteriously related to the toolchain
> used for building u-boot.Debugging the problem reveals a stuck
> interrupt 29 on the GIC.
> 
> It appears Freescale's LS1021 support in u-boot erroneously sets the
> 64-bit ARM generic PL1 physical time CompareValue register to all-ones
> with a 32-bit value.This causes the timer compare to fire 344 seconds
> after u-boot configures it.Depending on how fast u-boot gets the
> kernel booted,this amounts to about 5-minutes of Linux uptime before
> locking up.
> 
> Apparently the bug is masked by some toolchains. Perhaps this is
> explained by default compiler options, word sizes, or binutils versions.
> 
> To fix the above issue, the generic physical timer is disabled
> before jumping to the OS.
> 
> [1]
> https://lists.yoctoproject.org/pipermail/meta-freescale/2015-June/014400.html
> 
> Signed-off-by: Chris Kilgour 
> Signed-off-by: Alison Wang 
> ---

Applied to fsl-qoriq master. Thanks.

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


[U-Boot] [PATCHv1 2/3] sunxi: net: Allow the sunxi to set the MAC from an EEPROM

2015-11-30 Thread Olliver Schinagl
From: Olliver Schinagl 

This patch uses the newly introduced Kconfig options to set the MAC
address from an EEPROM, this will be especially useful for the Olimex
OLinuXino series of sunxi boards as they all have an 2k i2c eeprom chip.

The MAC address is in the eeprom is ignored if there is already a MAC
address in the environment or (if enabled) the CRC8 check fails.

Signed-off-by: Olliver Schinagl 
---
 board/sunxi/Kconfig |  4 
 board/sunxi/board.c | 36 
 net/Kconfig |  1 +
 3 files changed, 41 insertions(+)

diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
index 2dd9d3b..a2da3a6 100644
--- a/board/sunxi/Kconfig
+++ b/board/sunxi/Kconfig
@@ -339,18 +339,21 @@ config I2C0_ENABLE
 
 config I2C1_ENABLE
bool "Enable I2C/TWI controller 1"
+   default y if (NET_ETHADDR_EEPROM_I2C_BUS = 1)
default n
---help---
See I2C0_ENABLE help text.
 
 config I2C2_ENABLE
bool "Enable I2C/TWI controller 2"
+   default y if NET_ETHADDR_EEPROM_I2C_BUS = 2
default n
---help---
See I2C0_ENABLE help text.
 
 if MACH_SUN6I || MACH_SUN7I
 config I2C3_ENABLE
+   default y if NET_ETHADDR_EEPROM_I2C_BUS = 3
bool "Enable I2C/TWI controller 3"
default n
---help---
@@ -359,6 +362,7 @@ endif
 
 if MACH_SUN7I
 config I2C4_ENABLE
+   default y if NET_ETHADDR_EEPROM_I2C_BUS = 4
bool "Enable I2C/TWI controller 4"
default n
---help---
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index 6ac398c..5087478 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -12,6 +12,7 @@
  */
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -23,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -510,6 +512,37 @@ void get_board_serial(struct tag_serialnr *serialnr)
 }
 #endif
 
+#if defined(CONFIG_NET_ETHADDR_EEPROM) && 
defined(CONFIG_NET_ETHADDR_EEPROM_I2C)
+static int read_mac_from_eeprom(uint8_t *mac_addr)
+{
+   uint8_t eeprom[8];
+   int old_i2c_bus;
+
+   old_i2c_bus = i2c_get_bus_num();
+   i2c_set_bus_num(CONFIG_NET_ETHADDR_EEPROM_I2C_BUS);
+   if (i2c_read(CONFIG_NET_ETHADDR_EEPROM_I2C_ADDR,
+CONFIG_NET_ETHADDR_EEPROM_OFFSET,
+CONFIG_NET_ETHADDR_EEPROM_I2C_ADDRLEN,
+eeprom, 8)) {
+   i2c_set_bus_num(old_i2c_bus);
+   puts("Could not read the EEPROM; EEPROM missing?\n");
+   return -1;
+   }
+   i2c_set_bus_num(old_i2c_bus);
+#ifdef CONFIG_NET_ETHADDR_EEPROM_CRC8
+   if (crc8(eeprom, 7) != eeprom[7]) {
+   puts("CRC error on MAC address from EEPROM.\n");
+   return -1;
+   }
+#endif
+   memcpy(mac_addr, eeprom, 6);
+
+   return 0;
+}
+#else
+static int read_mac_from_eeprom(uint8_t *mac_addr) { return -1; }
+#endif
+
 #if !defined(CONFIG_SPL_BUILD)
 #include 
 
@@ -553,6 +586,9 @@ int misc_init_r(void)
}
 #endif
 
+   if ((!getenv("ethaddr")) && (!read_mac_from_eeprom(mac_addr)))
+   eth_setenv_enetaddr("ethaddr", mac_addr);
+
ret = sunxi_get_sid(sid);
if (ret == 0 && sid[0] != 0 && sid[3] != 0) {
if (!getenv("ethaddr")) {
diff --git a/net/Kconfig b/net/Kconfig
index aced51e..0f4cc5a 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -8,6 +8,7 @@ menuconfig NET
 if NET
 
 config NET_ETHADDR_EEPROM
+   depends on ARCH_SUNXI
bool "Get ethaddr from eeprom"
help
  Selecting this will try to get the Ethernet address from an onboard
-- 
2.6.2

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


[U-Boot] [PATCHv1 1/3] net: Add ability to set MAC address via EEPROM to Kconfig

2015-11-30 Thread Olliver Schinagl
From: Olliver Schinagl 

This patch allows Kconfig to enable and set parameters to make it
possible to read the MAC address from an EEPROM. This patch only sets up
some environment variables, it is up to the specific boards to actually
use these defines.

Besides the various tuneables as to how to access the eeprom (bus,
address, addressing mode/length, 2 configurable that are EEPROM generic
(e.g. SPI or some other form of access) which are:

NET_ETHADDR_EEPROM_OFFSET, indicating where in the EEPROM the start of
the MAC address is. The default is 8 allowing for 8 bytes before the MAC
for other purposes (header MAGIC for example).

NET_ETHADDR_EEPROM_CRC8, indicating the MAC is appended with a CRC8-CCIT
checksum that should be verified.

Currently only I2C eeproms have been tested and thus only those options
are available, but shouldn't be a limit. NET_ETHADDR_EEPROM_SPI can be
just as created.

Signed-off-by: Olliver Schinagl 
---
 doc/README.enetaddr | 36 +
 net/Kconfig | 58 +
 2 files changed, 94 insertions(+)

diff --git a/doc/README.enetaddr b/doc/README.enetaddr
index 50e4899..c53b455 100644
--- a/doc/README.enetaddr
+++ b/doc/README.enetaddr
@@ -47,6 +47,42 @@ Correct flow of setting up the MAC address (summarized):
 Previous behavior had the MAC address always being programmed into hardware
 in the device's init() function.
 
+
+ EEPROM
+
+
+When there is an EEPROM available on a board, but the EEPROM is not large 
enough
+to store the whole environment, it may be desired to store a MAC address in the
+onboard EEPROM. Using CONFIG_NET_ETHADDR_EEPROM enables this feature. Depending
+on the board, the EEPROM may be connected on various methods, but currently,
+only the I2C bus is available via CONFIG_NET_ETHADDR_EEPROM_I2C.
+CONFIG_NET_ETHADDR_EEPROM_I2C_BUS I2C bus on which the eeprom is present and
+CONFIG_NET_ETHADDR_EEPROM_I2C_ADDR set the address of the EEPROM, which
+defaults to the very common 0x50. Small size EEPROM's generally use single byte
+addressing but larger EEPROM's may use double byte addressing, which can be
+configured using CONFIG_NET_ETHADDR_EEPROM_ADDRLEN.
+
+Within the EEPROM, the MAC address can be stored on any arbitrary offset,
+CONFIG_NET_ETHADDR_EEPROM_OFFSET sets this to 8 as a default however, allowing
+the first 8 bytes to be used for some header magic for example.
+
+After the 6 bytes used for the MAC address, there is an 8 byte field to 
indicate
+the ID of the network interface this MAC address is for. 0xff here means 'for
+the first available interface' and 0x00 means the first network interface, 0x01
+the second, etc. It is up to the platform however to enforce this.
+
+Appending the 6 MAC bytes and the 7th interface byte is a CRC8 byte over the
+previous 7 bytes. Whether to check this CRC8 or not is dependent on
+CONFIG_NET_ETHADDR_EEPROM_CRC8.
+
+Layout example:
+
+  21 4d 61 67 69 63 2e 21  01 23 45 67 89 ab ff c0  |!Magic.!.#Eg|
+
+where the Header magic (!Magic.!) is spread over the first 8 bytes, and the MAC
+address '01-23-45-67-89-ab' for the first interface (0xff) with the CRC8
+checksum 0xc0.
+
 ---
  Usage
 ---
diff --git a/net/Kconfig b/net/Kconfig
index a44a783..aced51e 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -7,6 +7,64 @@ menuconfig NET
 
 if NET
 
+config NET_ETHADDR_EEPROM
+   bool "Get ethaddr from eeprom"
+   help
+ Selecting this will try to get the Ethernet address from an onboard
+ EEPROM and set into the environment if and only if the environment
+ does currently not already hold a MAC address. For more information
+ see doc/README.enetaddr.
+
+config NET_ETHADDR_EEPROM_I2C
+   depends on NET_ETHADDR_EEPROM
+   bool "EEPROM on I2C bus"
+   help
+ This switch enables checks for an EEPROM on the I2C bus. Naturally
+ this will only work if there is an actual EEPROM connected on the
+ I2C bus and the bus and device are properly configured via the
+ options below.
+
+config NET_ETHADDR_EEPROM_I2C_BUS
+   depends on NET_ETHADDR_EEPROM_I2C
+   int "I2C bus"
+   default 0
+   help
+ Select the bus on which the EEPROM is present, defaults to bus 0.
+
+config NET_ETHADDR_EEPROM_I2C_ADDR
+   depends on NET_ETHADDR_EEPROM_I2C
+   hex "eeprom address"
+   default 0x50
+   help
+ Select the address of the eeprom, defaults to address 0x50.
+
+config NET_ETHADDR_EEPROM_I2C_ADDRLEN
+   depends on NET_ETHADDR_EEPROM_I2C
+   int "eeprom address length"
+   default 1
+   help
+ Number of bytes to be used for the I2C address length. Typically 1,
+ 2 for large memories, 0 for register type devices with only one
+ register.
+
+config NET_ETHADDR_EEPROM_OFFSET
+   depends on NET_ETHADDR_EEPROM
+   int 

Re: [U-Boot] [PATCH 01/10][v4] armv8: lsch3: Fix lane protocol parsing logic

2015-11-30 Thread York Sun


On 11/03/2015 10:55 PM, Prabhakar Kushwaha wrote:
> Current implementation only consider SGMIIs for dpmac initialization.
> XFI serdes protocols also uses dpmac.
> 
> Also, fix lane protocol parsing logic to consider both XFIs and SGMIIs.
> 
> Signed-off-by: Prabhakar Kushwaha 
> ---
>  Changes for v2: Sending as it is
>  Changes for v3: Sending as it is
>  Changes for v4: Update SerDes Parsing logic
> 
>  .../cpu/armv8/fsl-layerscape/fsl_lsch3_serdes.c| 25 
> --
>  1 file changed, 23 insertions(+), 2 deletions(-)

Squashed with patch "driver: net: ldpaa: Update the lane number to DPMAC
mapping". Applied to fsl-qoriq master. Thanks.

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


Re: [U-Boot] [PATCH 02/10][v4] driver: net: fsl-mc: Add create, destroy APIs in flibs

2015-11-30 Thread York Sun


On 11/03/2015 10:55 PM, Prabhakar Kushwaha wrote:
> Current Management Complex Flibs does not support APIs for adding and
> destroying the objects.
> 
> Add APIs to create and destroy objects for DPBP, DPIO, DPNI and DPRC.
> 
> Signed-off-by: Prabhakar Kushwaha 
> ---
>  Changes for v2: Sending as it is
>  Changes for v3: Sending as it is
>  Changes for v4: Sending as it is
> 
>  drivers/net/fsl-mc/dpbp.c  |  41 +
>  drivers/net/fsl-mc/dpio/dpio.c |  40 +
>  drivers/net/fsl-mc/dpni.c  |  40 +
>  drivers/net/fsl-mc/dprc.c  |  46 ++
>  include/fsl-mc/fsl_dpbp.h  |  48 +++
>  include/fsl-mc/fsl_dpio.h  |  60 +
>  include/fsl-mc/fsl_dpni.h  | 189 
> +
>  include/fsl-mc/fsl_dprc.h  |  84 ++
>  8 files changed, 548 insertions(+)

Applied to fsl-qoriq master. Thanks.

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


Re: [U-Boot] [PATCH 04/10][v4] armv8: ls2085aqds: Print function name during SerDes error

2015-11-30 Thread York Sun


On 11/03/2015 10:55 PM, Prabhakar Kushwaha wrote:
> Print function name along with SerDes Protocol during SerDes Protocol
> not supported error.
> 
> Signed-off-by: Prabhakar Kushwaha 
> ---
>  Changes for v2: Sending as it is
>  Changes for v3: Sending as it is
>  Changes for v4: Sending as it is
> 
>  board/freescale/ls2085aqds/eth.c | 16 
>  1 file changed, 8 insertions(+), 8 deletions(-)

Applied to fsl-qoriq master. Thanks.

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


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

2015-11-30 Thread Tom Rini
On Mon, Nov 30, 2015 at 05:44:15PM +0100, Marek Vasut wrote:
> On Monday, November 30, 2015 at 05:40:11 PM, Tom Rini wrote:
> > On Mon, Nov 30, 2015 at 01:33:56PM +0100, Marek Vasut wrote:
> > > The following changes since commit 
> > > fa8883a1e39a20e72aaa5093af0c80062cb95757:
> > >   Merge branch 'master' of git://git.denx.de/u-boot-i2c (2015-11-27
> > >   08:41:03
> > > 
> > > -0500)
> > > 
> > > are available in the git repository at:
> > >   git://git.denx.de/u-boot-usb.git
> > > 
> > > for you to fetch changes up to b5c6f21bf9761f12b43dfc652e5635ab8ec0d7c2:
> > >   drivers:usb:fsl: Add T4080 as affected soc for Erratum A007792 sw
> > >   workaround
> > > 
> > > (2015-11-30 13:33:22 +0100)
> > 
> > NAK:
> > +(CSQ_CS908,Linksprite_pcDuino,Cubieboard,Lamobo_R1,Mele_A1000,Mele_A1000G_
> > quad,i12-tvbo
> > x,mk802_a10s,Wobo_i5,Auxtek-T004,Auxtek-T003,mk802,Linksprite_pcDuino3_Nan
> > o,A10-OLinuXin
> > o-Lime,Hummingbird_A31,Linksprite_pcDuino3,A20-OLinuXino_MICRO,A20-OLinuXi
> > no-Lime,r7-tv-
> > dongle,ga10h_v1_1,MK808C,mixtile_loftq,sunxi_Gemei_G9,Cubieboard2,Mele_M3,
> > Mele_M5,Mele_M
> > 9,A13-OLinuXino,A10s-OLinuXino-M,Bananapro,mk802ii,Marsboard_A10,ba10_tv_b
> > ox,Wits_Pro_A2
> > 0_DKT,Sinovoip_BPI_M2,Mele_I7,A20-Olimex-SOM-EVB,Cubietruck,Colombus,Orang
> > epi,Wexler_TAB
> > 7200,inet1,jesurun_q5,Orangepi_mini,A20-OLinuXino-Lime2,Bananapi,Mini-X,A1
> > 3-OLinuXinoM)
> > drivers/usb/host/ehci-sunxi.o:(.u_boot_list_2_driver_2_usb_ehci+0x0):
> > multiple definition of `_u_boot_list_2_driver_2_usb_ehci'
> > ...
> > +(ph1_sld8,ph1_sld3,ph1_ld4)
> > build/../drivers/usb/host/ehci-generic.c:33: undefined reference to
> > `ehci_deregister'
> > ...
> > w+(xilinx_zynqmp_ep) ../drivers/usb/host/xhci-zynqmp.c:142:2: warning:
> > 'return' with a value, in function returning void
> 
> Can you try dropping the ehci-generic patch ?

I'm re-testing a number of other PRs right now.  Please try it locally,
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 03/10][v4] driver: net: fsl-mc: Add APIs for DPMAC objects in FLIB

2015-11-30 Thread York Sun


On 11/03/2015 10:55 PM, Prabhakar Kushwaha wrote:
> DPMAC object of Management complex controls Physical MAC and MDIO controller.
> It provides APIs for MDIO and link state updates. It also provides APIs for
> PHY/link configuration.
> 
> Signed-off-by: Prabhakar Kushwaha 
> ---
>  Changes for v2: Updated Copyright year
>  Changes for v3: Sending as it is
>  Changes for v4: Sending as it is
> 
>  drivers/net/fsl-mc/Makefile |   3 +-
>  drivers/net/fsl-mc/dpmac.c  | 222 +
>  include/fsl-mc/fsl_dpmac.h  | 468 
> 
>  3 files changed, 692 insertions(+), 1 deletion(-)
>  create mode 100644 drivers/net/fsl-mc/dpmac.c
>  create mode 100644 include/fsl-mc/fsl_dpmac.h

Applied to fsl-qoriq master. Thanks.

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


Re: [U-Boot] [PATCH 05/10][v4] driver: ldpaa: Add api to return linked PHY ID of DPMAC

2015-11-30 Thread York Sun


On 11/03/2015 10:55 PM, Prabhakar Kushwaha wrote:
> DPMAC represents physical line on the board. This physical
> line eventually asscociate with on-board PHY.
> 
> So Add an api to return linked PHY ID of DPMAC object.
> 
> Signed-off-by: Prabhakar Kushwaha 
> ---
>  Changes for v2: Sending as it is
>  Changes for v3: Sending as it is
>  Changes for v4: Sending as it is
> 
>  drivers/net/ldpaa_eth/ldpaa_wriop.c | 12 
>  include/fsl-mc/ldpaa_wriop.h|  3 ++-
>  2 files changed, 14 insertions(+), 1 deletion(-)

Applied to fsl-qoriq master. Thanks.

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


Re: [U-Boot] [PATCH 06/10][v4] driver: net: fsl-mc: Increase MC command timeout

2015-11-30 Thread York Sun


On 11/03/2015 10:55 PM, Prabhakar Kushwaha wrote:
> dpni_create API take takes more time as comapred to existing supported
> APIs of MC Flib.
> So increase MC command timeout.
> 
> Signed-off-by: Prabhakar Kushwaha 
> ---
>  Changes for v2: Sending as it is
>  Changes for v3: Sending as it is
>  Changes for v4: Sending as it is
> 
>  drivers/net/fsl-mc/mc_sys.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Applied to fsl-qoriq master. Thanks.

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


Re: [U-Boot] [PATCH 07/10][v4] driver: net: fsl-mc: Add DPAA2 commands to manage MC

2015-11-30 Thread York Sun


On 11/03/2015 10:55 PM, Prabhakar Kushwaha wrote:
> Management complex Firmware, DPL and DPC are depolyed during u-boot boot
> sequence.
> 
> Add new DPAA2 commands to manage Management Complex (MC) i.e. start mc, aiop
> and apply DPL from u-boot command prompt.
> 
> Signed-off-by: Prabhakar Kushwaha 
> ---
>  Changes for v2: Sending as it is
>  Changes for v3: fix compilation for ls2085_emu target
>  Changes for v4: Sending as it is
> 
>  arch/arm/cpu/armv8/fsl-layerscape/README.lsch3 |  30 ++
>  drivers/net/fsl-mc/mc.c| 382 
> -
>  include/configs/ls2085aqds.h   |  12 -
>  include/configs/ls2085ardb.h   |  12 -
>  include/fsl-mc/fsl_mc.h|   5 +
>  include/fsl-mc/fsl_mc_private.h|   2 +-
>  6 files changed, 220 insertions(+), 223 deletions(-)
> 

Squashed with patch "armv8: README: Update README for DPAA2 commands for MC".
Applied to fsl-qoriq master. Thanks.

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


Re: [U-Boot] [PATCH 08/10][v4] driver: net: fsl-mc: Create DPAA2 object at run-time

2015-11-30 Thread York Sun


On 11/03/2015 10:55 PM, Prabhakar Kushwaha wrote:
> Freescale's DPAA2 ethernet driver depends upon the static DPL for the
> DPRC, DPNI, DPBP, DPIO objects.
> 
> Instead of static objects, Create DPNI, DPBP, DPIO objects at run-time.
> 
> Signed-off-by: Prabhakar Kushwaha 
> ---
>  Changes for v2: Use Child container for object creation
>  Changes for v3: 
>   - Avoid linux boot if MC up and DPL is not deployed
>   - Boot Linux is MC is not booted
>  Changes for v4: Sending as it is
> 
>  board/freescale/ls2085aqds/ls2085aqds.c |   5 +-
>  board/freescale/ls2085ardb/ls2085ardb.c |   5 +-
>  drivers/net/fsl-mc/mc.c | 467 
> +---
>  drivers/net/ldpaa_eth/ldpaa_eth.c   |   4 +-
>  include/fsl-mc/fsl_mc.h |   5 +-
>  include/fsl-mc/fsl_mc_private.h |  23 +-
>  6 files changed, 468 insertions(+), 41 deletions(-)

Applied to fsl-qoriq master. Thanks.

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


Re: [U-Boot] [PATCH 09/10][v4] driver: net: ldpaa: Use DPMAC as net device

2015-11-30 Thread York Sun


On 11/03/2015 10:56 PM, Prabhakar Kushwaha wrote:
> As per current implementation of DPAA2 ethernet driver DPNI is used as
> net device. DPNI is tangible objects can be multiple connected to same 
> physical lane.
> 
> Use DPMAC as net device where it represents physical lane.
> Below modification done in driver
>  - Use global DPNI object
>  - Connect DPMAC to DPNI
>  - Create and destroy DPMAC
> 
> Signed-off-by: Prabhakar Kushwaha 
> ---
>  Changes for v2: Use Child container for DPMAC, DPMAC-DPNI connection
>  Changes for v3: Sending as it is
>  Changes for v4: Set link speed in DPMAC 
> 
>  drivers/net/fsl-mc/mc.c   |   6 ++
>  drivers/net/ldpaa_eth/ldpaa_eth.c | 163 
> +-
>  drivers/net/ldpaa_eth/ldpaa_eth.h |  17 ++--
>  include/fsl-mc/fsl_mc_private.h   |   3 +-
>  4 files changed, 144 insertions(+), 45 deletions(-)

Applied to fsl-qoriq master. Thanks.

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


Re: [U-Boot] [PATCH 10/10][v4] driver: net: ldpaa: Add debug information

2015-11-30 Thread York Sun


On 11/03/2015 10:56 PM, Prabhakar Kushwaha wrote:
> Add following debug information in the driver
>  - Get various DPNI counter values
>  - Get link status of DPNI objects
>  - Get information of both ends of connection (DPMAC - DPNI)
> 
> Signed-off-by: Prabhakar Kushwaha 
> ---
>  Changes for v2: Use child container for DPMAC-DPNI connection
>  Changes for v3: Sending as it is
>  Changes for v4: Sending as it is
> 
> 
>  drivers/net/ldpaa_eth/ldpaa_eth.c | 123 
> ++
>  1 file changed, 123 insertions(+)
> 

Applied to fsl-qoriq master. Thanks.

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


Re: [U-Boot] [PATCH][v2] driver: net: ldpaa: Fix Rx buffer alignment

2015-11-30 Thread York Sun


On 11/03/2015 10:56 PM, Prabhakar Kushwaha wrote:
> MC 0.7.1.2 enforces limitation i.e.: "Packets may be corrupted
> in several combinations of buffer size and frame offsets.
> Workaround: Use buffers that are of size that is a multiple of 256, and
> frame offset that is a multiple of 256"
> 
> Updating the DPNI Eth driver to comply with the restriction.
> 
> Signed-off-by: Bogdan Hamciuc 
> Signed-off-by: Prabhakar Kushwaha 
> ---
> Changes for v2: Updated description
> 
>  drivers/net/ldpaa_eth/ldpaa_eth.c | 11 ---
>  drivers/net/ldpaa_eth/ldpaa_eth.h |  6 +++---
>  2 files changed, 11 insertions(+), 6 deletions(-)

Applied to fsl-qoriq master. Thanks.

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


Re: [U-Boot] [PATCH 1/2][v2] armv8: LS2080A: Rename LS2085A to reflect LS2080A

2015-11-30 Thread York Sun


On 11/09/2015 03:12 AM, Prabhakar Kushwaha wrote:
> LS2080A is a prime personality of Freescale’s LS2085A. It is a non-AIOP
> personality without support of DP-DDR, L2 switch, 1588, PCIe endpoint etc.
> So renaming existing LS2085A code base to reflect LS2080A (Prime personality)
> 
> Signed-off-by: Pratiyush Mohan Srivastava 
> Signed-off-by: Prabhakar Kushwaha 
> ---
> Changes for v2: Rebased on LS1043 patch set

Dropped #ifdef for table cpu_type_list.
Applied to fsl-qoriq master. Thanks.

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


Re: [U-Boot] [Patch V4 4/7] armv8/ls1043aqds: add LS1043AQDS board support

2015-11-30 Thread York Sun


On 11/11/2015 01:58 AM, Gong Qianyu wrote:
> From: Shaohui Xie 
> 
> LS1043AQDS Specification:
> -
> Memory subsystem:
>  * 2GByte DDR4 DIMM
>  * 128 Mbyte NOR flash single-chip memory
>  * 512 Mbyte NAND flash
>  * 16 Mbyte high-speed SPI flash
>  * SD connector to interface with the SD memory card
> 
> Ethernet:
>  * Two RGMII ports
>  * XFI 10G port
>  * SGMII
>  * QSGMII with 4x 1G ports
> 
> PCIe: supports Gen 1 and Gen 2
> 
> SATA 3.0: one SATA 3.0 port
> 
> USB 3.0: two micro AB connector and one type A connector
> 
> UART: supports two UARTs up to 115200 bps for console
> 
> Signed-off-by: Shaohui Xie 
> Signed-off-by: Mingkai Hu 
> Signed-off-by: Hou Zhiqiang 
> Signed-off-by: Gong Qianyu 
> ---
> V4:
>  - Fix vid macros in config file and add vid support.
>  - Remove RAW_TIMING definition for DDR3.
>  - Remove LS1043AQDS_MDIO_10GC related code because LS1043AQDS has no phy for 
> it.
> V3:
>  - Update the commit message.
>  - Remove #ifdef in fdt.h.
>  - Rename ls1043aqds_sdcard_defconfig to ls1043aqds_sdcard_ifc_defconfig.
> V2:
>  - No change.
> 
>  arch/arm/Kconfig   |   9 +
>  arch/arm/include/asm/arch-fsl-layerscape/fdt.h |   1 +
>  board/freescale/common/vid.c   |  22 +
>  board/freescale/ls1043aqds/Kconfig |  15 +
>  board/freescale/ls1043aqds/MAINTAINERS |   9 +
>  board/freescale/ls1043aqds/Makefile|   9 +
>  board/freescale/ls1043aqds/README  |  96 
>  board/freescale/ls1043aqds/ddr.c   | 131 ++
>  board/freescale/ls1043aqds/ddr.h   |  60 +++
>  board/freescale/ls1043aqds/eth.c   | 492 
> +
>  board/freescale/ls1043aqds/ls1043aqds.c| 333 ++
>  board/freescale/ls1043aqds/ls1043aqds_pbi.cfg  |  14 +
>  board/freescale/ls1043aqds/ls1043aqds_qixis.h  |  39 ++
>  board/freescale/ls1043aqds/ls1043aqds_rcw_nand.cfg |   7 +
>  .../freescale/ls1043aqds/ls1043aqds_rcw_sd_ifc.cfg |   8 +
>  configs/ls1043aqds_defconfig   |   3 +
>  configs/ls1043aqds_nand_defconfig  |   4 +
>  configs/ls1043aqds_nor_ddr3_defconfig  |   2 +
>  configs/ls1043aqds_sdcard_ifc_defconfig|   4 +
>  include/configs/ls1043aqds.h   | 387 
>  20 files changed, 1645 insertions(+)

Added CONFIG_SYS_NS16550=y in defconfig files.
Applied to fsl-qoriq master. Thanks.

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


Re: [U-Boot] [Patch V4 5/7] armv8/ls1043aqds: dts: add dtb support

2015-11-30 Thread York Sun


On 11/11/2015 01:58 AM, Gong Qianyu wrote:
> Reuse the dts files from ls1043a linux kernel.
> 
> Signed-off-by: Gong Qianyu 
> ---
> V4:
>  - No change.
> V3:
>  - No change.
> V2:
>  - New Patch.
> 
>  arch/arm/dts/Makefile|   3 +-
>  arch/arm/dts/fsl-ls1043a-qds.dts | 124 
> +++
>  configs/ls1043aqds_defconfig |   2 +
>  3 files changed, 128 insertions(+), 1 deletion(-)
> 

Applied to fsl-qoriq master. Thanks.

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


Re: [U-Boot] [PATCH] armv8/layerscape: Update MMU table with execute-never bits

2015-11-30 Thread York Sun


On 11/04/2015 07:15 PM, Alison Wang wrote:
> For most device addresses excution shouldn't be allowed. Revise
> the MMU table to enforce execute-never bits. OCRAM, DDR and IFC
> are allowed for excution.
> 
> Signed-off-by: York Sun 
> Signed-off-by: Alison Wang 
> Reported-by: Zhichun Hua 
> ---
>  arch/arm/cpu/armv8/cache_v8.c  |  4 +-
>  arch/arm/cpu/armv8/fsl-layerscape/cpu.c|  2 +-
>  arch/arm/include/asm/arch-fsl-layerscape/cpu.h | 79 
> +-
>  arch/arm/include/asm/armv8/mmu.h   |  2 +-
>  4 files changed, 56 insertions(+), 31 deletions(-)
> 

Applied to fsl-qoriq master. Thanks.

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


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

2015-11-30 Thread Marek Vasut
On Monday, November 30, 2015 at 05:40:11 PM, Tom Rini wrote:
> On Mon, Nov 30, 2015 at 01:33:56PM +0100, Marek Vasut wrote:
> > The following changes since commit fa8883a1e39a20e72aaa5093af0c80062cb95757:
> >   Merge branch 'master' of git://git.denx.de/u-boot-i2c (2015-11-27
> >   08:41:03
> > 
> > -0500)
> > 
> > are available in the git repository at:
> >   git://git.denx.de/u-boot-usb.git
> > 
> > for you to fetch changes up to b5c6f21bf9761f12b43dfc652e5635ab8ec0d7c2:
> >   drivers:usb:fsl: Add T4080 as affected soc for Erratum A007792 sw
> >   workaround
> > 
> > (2015-11-30 13:33:22 +0100)
> 
> NAK:
> +(CSQ_CS908,Linksprite_pcDuino,Cubieboard,Lamobo_R1,Mele_A1000,Mele_A1000G_
> quad,i12-tvbo
> x,mk802_a10s,Wobo_i5,Auxtek-T004,Auxtek-T003,mk802,Linksprite_pcDuino3_Nan
> o,A10-OLinuXin
> o-Lime,Hummingbird_A31,Linksprite_pcDuino3,A20-OLinuXino_MICRO,A20-OLinuXi
> no-Lime,r7-tv-
> dongle,ga10h_v1_1,MK808C,mixtile_loftq,sunxi_Gemei_G9,Cubieboard2,Mele_M3,
> Mele_M5,Mele_M
> 9,A13-OLinuXino,A10s-OLinuXino-M,Bananapro,mk802ii,Marsboard_A10,ba10_tv_b
> ox,Wits_Pro_A2
> 0_DKT,Sinovoip_BPI_M2,Mele_I7,A20-Olimex-SOM-EVB,Cubietruck,Colombus,Orang
> epi,Wexler_TAB
> 7200,inet1,jesurun_q5,Orangepi_mini,A20-OLinuXino-Lime2,Bananapi,Mini-X,A1
> 3-OLinuXinoM)
> drivers/usb/host/ehci-sunxi.o:(.u_boot_list_2_driver_2_usb_ehci+0x0):
> multiple definition of `_u_boot_list_2_driver_2_usb_ehci'

Not my doing, but I can fix this.

> +(ph1_sld8,ph1_sld3,ph1_ld4)
> build/../drivers/usb/host/ehci-generic.c:33: undefined reference to
> `ehci_deregister'

I'm dropping the ehci-generic for now.

> ...
> w+(xilinx_zynqmp_ep) ../drivers/usb/host/xhci-zynqmp.c:142:2: warning:
> 'return' with a value, in function returning void

OK, I fixed this one.

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


[U-Boot] [PATCH] sunxi: usb: Rename the sunxi usb driver DM entry

2015-11-30 Thread Marek Vasut
The DM entry should be unique, otherwise it will collide with other
drivers. Fix this by assigning the driver a more unique name than
usb_ehci.

Signed-off-by: Marek Vasut 
Cc: Hans de Goede 
Cc: Ian Campbell 
Cc: Simon Glass 
---
 drivers/usb/host/ehci-sunxi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/host/ehci-sunxi.c b/drivers/usb/host/ehci-sunxi.c
index 38d5f92..d494ca1 100644
--- a/drivers/usb/host/ehci-sunxi.c
+++ b/drivers/usb/host/ehci-sunxi.c
@@ -87,7 +87,7 @@ static const struct udevice_id ehci_usb_ids[] = {
{ }
 };
 
-U_BOOT_DRIVER(usb_ehci) = {
+U_BOOT_DRIVER(ehci_sunxi) = {
.name   = "ehci_sunxi",
.id = UCLASS_USB,
.of_match = ehci_usb_ids,
-- 
2.1.4

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


[U-Boot] [PATCH 2/3] spl: mmc: Rename 'mmc' variable to 'mmcp'

2015-11-30 Thread Simon Glass
The 'p' suffix makes it more obvious that we are dealing with a pointer
to a (pointer) value that will be returned to its caller.

Signed-off-by: Simon Glass 
---

 common/spl/spl_mmc.c | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index 9df4786..8d47059 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -79,12 +79,12 @@ int spl_mmc_get_device_index(u32 boot_device)
 }
 
 #ifdef CONFIG_DM_MMC
-static int spl_mmc_find_device(struct mmc **mmc, u32 boot_device)
+static int spl_mmc_find_device(struct mmc **mmcp, u32 boot_device)
 {
struct udevice *dev;
int err, mmc_dev;
 
-   *mmc = NULL;
+   *mmcp = NULL;
mmc_dev = spl_mmc_get_device_index(boot_device);
if (mmc_dev < 0)
return mmc_dev;
@@ -105,11 +105,11 @@ static int spl_mmc_find_device(struct mmc **mmc, u32 
boot_device)
return err;
}
 
-   *mmc = mmc_get_mmc_dev(dev);
-   return *mmc != NULL ? 0 : -ENODEV;
+   *mmcp = mmc_get_mmc_dev(dev);
+   return *mmcp != NULL ? 0 : -ENODEV;
 }
 #else
-static int spl_mmc_find_device(struct mmc **mmc, u32 boot_device)
+static int spl_mmc_find_device(struct mmc **mmcp, u32 boot_device)
 {
int err, mmc_dev;
 
@@ -126,8 +126,8 @@ static int spl_mmc_find_device(struct mmc **mmc, u32 
boot_device)
}
 
/* We register only one device. So, the dev id is always 0 */
-   *mmc = find_mmc_device(mmc_dev);
-   if (!*mmc) {
+   *mmcp = find_mmc_device(mmc_dev);
+   if (!*mmcp) {
 #ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
puts("spl: mmc device not found\n");
 #endif
-- 
2.6.0.rc2.230.g3dd15c0

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


[U-Boot] [PATCH 3/3] spl: mmc: Unify non/driver model spl_mmc_find_device()

2015-11-30 Thread Simon Glass
It is risky to have two different functions with much the same code. Future
authors may update one but not the other. It is hard to see which parts are
the same and which are different.

Unify the functions and drop the differences that are not really needed.

Note that one puts() becomes printf() as Tom mentioned that this does not
affect image size:

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

Note: It would be better to have an empty printf() and avoid the #ifdef for
CONFIG_SPL_LIBCOMMON_SUPPORT.

Signed-off-by: Simon Glass 
---

 common/spl/spl_mmc.c | 40 +---
 1 file changed, 9 insertions(+), 31 deletions(-)

diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index 8d47059..d9416a8 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -78,10 +78,11 @@ int spl_mmc_get_device_index(u32 boot_device)
return -ENODEV;
 }
 
-#ifdef CONFIG_DM_MMC
 static int spl_mmc_find_device(struct mmc **mmcp, u32 boot_device)
 {
+#ifdef CONFIG_DM_MMC
struct udevice *dev;
+#endif
int err, mmc_dev;
 
*mmcp = NULL;
@@ -97,46 +98,23 @@ static int spl_mmc_find_device(struct mmc **mmcp, u32 
boot_device)
return err;
}
 
+#ifdef CONFIG_DM_MMC
err = uclass_get_device(UCLASS_MMC, mmc_dev, );
-   if (err) {
-#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
-   printf("spl: could not find mmc device. error: %d\n", err);
-#endif
-   return err;
-   }
-
-   *mmcp = mmc_get_mmc_dev(dev);
-   return *mmcp != NULL ? 0 : -ENODEV;
-}
+   if (!err)
+   *mmcp = mmc_get_mmc_dev(dev);
 #else
-static int spl_mmc_find_device(struct mmc **mmcp, u32 boot_device)
-{
-   int err, mmc_dev;
-
-   mmc_dev = spl_mmc_get_device_index(boot_device);
-   if (mmc_dev < 0)
-   return mmc_dev;
-
-   err = mmc_initialize(gd->bd);
+   *mmcp = find_mmc_device(mmc_dev);
+   err = *mmcp ? 0 : -ENODEV;
+#endif
if (err) {
 #ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
-   printf("spl: could not initialize mmc. error: %d\n", err);
+   printf("spl: could not find mmc device. error: %d\n", err);
 #endif
return err;
}
 
-   /* We register only one device. So, the dev id is always 0 */
-   *mmcp = find_mmc_device(mmc_dev);
-   if (!*mmcp) {
-#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
-   puts("spl: mmc device not found\n");
-#endif
-   return -ENODEV;
-   }
-
return 0;
 }
-#endif
 
 #ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION
 static int mmc_load_image_raw_partition(struct mmc *mmc, int partition)
-- 
2.6.0.rc2.230.g3dd15c0

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


Re: [U-Boot] [PATCH] net: phy: added aquantia PHY AQR405 support

2015-11-30 Thread York Sun


On 11/10/2015 03:16 AM, shh@gmail.com wrote:
> From: Shaohui Xie 
> 
> The phy can share driver with other aquantia PHYs, so we only added PHY
> ID.
> 
> Signed-off-by: Shaohui Xie 
> ---
>  drivers/net/phy/aquantia.c | 15 +++
>  1 file changed, 15 insertions(+)

Applied to fsl-qoriq master. Thanks.

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


Re: [U-Boot] [PATCH][v3] armv8: ls2085a: Add workaround of errata A009635

2015-11-30 Thread York Sun


On 11/04/2015 10:30 PM, Prabhakar Kushwaha wrote:
> If the core runs at higher than x3 speed of the platform, there is
> possiblity about sev instruction to getting missed by other cores.
> This is because of SoC Run Control block may not able to sample
> the EVENTI(Sev) signals.
> 
> Configure Run Control and EPU to periodically send out EVENTI signals to
> wake up A57 cores.
> 
> Signed-off-by: Prabhakar Kushwaha 
> ---
> Changes for v2: Updated description
> Changes for v3: Added README and comments
> 
>  arch/arm/cpu/armv8/fsl-layerscape/README.lsch3| 21 +++
>  arch/arm/cpu/armv8/fsl-layerscape/cpu.c   |  6 
>  arch/arm/cpu/armv8/fsl-layerscape/soc.c   | 43 
> +++
>  arch/arm/include/asm/arch-fsl-layerscape/config.h |  9 +
>  arch/arm/include/asm/arch-fsl-layerscape/soc.h|  3 ++
>  5 files changed, 82 insertions(+)
> 

Applied to fsl-qoriq master. Thanks.

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


[U-Boot] [PATCH] axs10x: add support of generic ECHI USB 2.0 controller

2015-11-30 Thread Alexey Brodkin
This commit adds support of USB 2.0 storage media on AXS10x boards.

Signed-off-by: Alexey Brodkin 
---
 arch/arc/dts/axs10x.dts  | 6 ++
 configs/axs101_defconfig | 5 +
 configs/axs103_defconfig | 5 +
 3 files changed, 16 insertions(+)

diff --git a/arch/arc/dts/axs10x.dts b/arch/arc/dts/axs10x.dts
index 8fe1837..80e6d6b 100644
--- a/arch/arc/dts/axs10x.dts
+++ b/arch/arc/dts/axs10x.dts
@@ -42,4 +42,10 @@
clock-names = "stmmaceth";
max-speed = <100>;
};
+
+   ehci@0xe004 {
+   compatible = "generic-ehci";
+   reg = < 0xe004 0x100 >;
+   interrupts = < 8 >;
+   };
 };
diff --git a/configs/axs101_defconfig b/configs/axs101_defconfig
index 52d5e2f..b7d487b 100644
--- a/configs/axs101_defconfig
+++ b/configs/axs101_defconfig
@@ -8,6 +8,7 @@ CONFIG_DEFAULT_DEVICE_TREE="axs10x"
 CONFIG_SYS_PROMPT="AXS# "
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
+CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
@@ -18,5 +19,9 @@ CONFIG_DM=y
 CONFIG_CLK=y
 CONFIG_DM_ETH=y
 CONFIG_ETH_DESIGNWARE=y
+CONFIG_USB=y
+CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_STORAGE=y
 CONFIG_SYS_NS16550=y
 CONFIG_USE_PRIVATE_LIBGCC=y
diff --git a/configs/axs103_defconfig b/configs/axs103_defconfig
index a7f3c38..d25539e 100644
--- a/configs/axs103_defconfig
+++ b/configs/axs103_defconfig
@@ -7,6 +7,7 @@ CONFIG_DEFAULT_DEVICE_TREE="axs10x"
 CONFIG_SYS_PROMPT="AXS# "
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
+CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
@@ -17,5 +18,9 @@ CONFIG_DM=y
 CONFIG_CLK=y
 CONFIG_DM_ETH=y
 CONFIG_ETH_DESIGNWARE=y
+CONFIG_USB=y
+CONFIG_DM_USB=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_STORAGE=y
 CONFIG_SYS_NS16550=y
 CONFIG_USE_PRIVATE_LIBGCC=y
-- 
2.5.0

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


Re: [U-Boot] [PATCH] Implement pytest-based test infrastructure

2015-11-30 Thread Stephen Warren

On 11/26/2015 07:52 PM, Simon Glass wrote:

Hi Stephen,

On 24 November 2015 at 13:28, Stephen Warren  wrote:

On 11/24/2015 12:04 PM, Simon Glass wrote:


Hi Stephen,

On 23 November 2015 at 21:44, Stephen Warren 
wrote:


On 11/23/2015 06:45 PM, Simon Glass wrote:


On 22 November 2015 at 10:30, Stephen Warren 
wrote:


On 11/21/2015 09:49 AM, Simon Glass wrote:




OK I got it working thank you. It is horribly slow though - do you
know what is holding it up? For me to takes 12 seconds to run the
(very basic) tests.


..


I put a bit of time measurement into run_command() and found that on my
system at work, for p.send("the shell command to execute") was actually
(marginally) slower on sandbox than on real HW, despite real HW being a
115200 baud serial port, and the code splitting the shell commands into
chunks that are sent and waited for synchronously to avoid overflowing
UART FIFOs. I'm not sure why this is. Looking at U-Boot's console, it
seems to be non-blocking, so I don't think termios VMIN/VTIME come into
play (setting them to 0 made no difference), and the two raw modes took
the same time. I meant to look into pexpect's termios settings to see if
there was anything to tweak there, but forgot today.

I did do one experiment to compare expect (the Tcl version) and pexpect.
If I do roughly the following in both:

spawn u-boot (sandbox)
wait for prompt
100 times:
  send "echo $foo\n"
  wait for "echo $foo"
  wait for shell prompt
send "reset"
wait for "reset"
send "\n"

... then Tcl is about 3x faster on my system (IIRC 0.5 vs. 1.5s). If I
remove all the "wait"s, then IIRC Tcl was about 15x faster or more.
That's a pity. Still, I'm sure as heck not going to rewrite all this in
Tcl:-( I wonder if something similar to pexpect but more targetted at
simple "interactive shell" cases would remove any of that overhead.



It is possible that we should use sandbox in 'cooked' mode so that
lines an entered synchronously. The -t option might help here, or we
may need something else.



I don't think cooked mode will work, since I believe cooked is
line-buffered, yet when U-Boot emits the shell prompt there's no \n printed
afterwards.


Do you mean we need fflush() after writing the prompt? If so, that
should be easy to arrange. We have a similar problem with the LCD, and
added lcd_sync().


Anything U-Boot does will only affect its own buffer when sending into 
the PTY.


If the test program used cooked mode for its reading side of the PTY, 
then even with fflush() on the sending side, I don't believe reading 
from the PTY would return characters until a \n appeared.


FWIW, passing "-t cooked" to U-Boot (which affects data in the other 
direction to the discussion above) (plus hacking the code to disable 
terminal-level input echoing) doesn't make any difference to the test 
timing. That's not particularly surprising, since the test program sends 
each command as a single write, so it's likely that U-Boot reads each 
command into its stdin buffers in one go anyway.



FWIW, I hacked out pexpect and replaced it with some custom code. That
reduced by sandbox execution time from ~5.1s to ~2.3s. Execution time
against real HW didn't seem to be affected at all. Some features like
timeouts and complete error handling are still missing, but I don't think
that would affect the execution time. See my github tree for the WIP patch.


Interesting, that's a big improvement. I wonder if we should look at
building U-Boot with SWIG to remove all these overheads? Then the
U-Boot command line (and any other feature we want) could become a
Python class. Of course that would only work for sandbox.


SWIG doesn't seem like a good direction; it would re-introduce different 
paths between sandbox and non-sandbox again. One of the main benefits of 
the test/py/ approach is that sandbox and real HW are treated the same.

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


[U-Boot] [PATCH] usb: zynqmp: Fix build warnings

2015-11-30 Thread Marek Vasut
The driver does "return 0" in function with void type.

Signed-off-by: Marek Vasut 
Cc: Michal Simek 
Cc: Siva Durga Prasad Paladugu 
---
 drivers/usb/host/xhci-zynqmp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/host/xhci-zynqmp.c b/drivers/usb/host/xhci-zynqmp.c
index e76a0c6..530d97c 100644
--- a/drivers/usb/host/xhci-zynqmp.c
+++ b/drivers/usb/host/xhci-zynqmp.c
@@ -139,5 +139,5 @@ void xhci_hcd_stop(int index)
 * sw. But this support may be added in future socs.
 */
 
-   return 0;
+   return;
 }
-- 
2.1.4

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


Re: [U-Boot] [PATCH] axs10x: add support of generic ECHI USB 2.0 controller

2015-11-30 Thread Marek Vasut
On Monday, November 30, 2015 at 06:12:53 PM, Alexey Brodkin wrote:
> This commit adds support of USB 2.0 storage media on AXS10x boards.
> 
> Signed-off-by: Alexey Brodkin 

The generic-ehci driver has issues, so please fix it and repost.
I had to drop it from the PR.

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


Re: [U-Boot] [PATCH] board/ls2085qds: Fix typo in README for QSGMII riser card

2015-11-30 Thread York Sun


On 11/04/2015 08:12 PM, Prabhakar Kushwaha wrote:
> DPMACx to PHY mapping for SGMII is mentioned as QSGMII.
> 
> So fix typo in README for QSGMII rise card.
> 
> Signed-off-by: Prabhakar Kushwaha 
> ---
>  board/freescale/ls2085aqds/README | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Applied to fsl-qoriq master. Thanks.

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


Re: [U-Boot] [PATCH] arm: ls102xa: Update fdt_high and initrd_high for LS1021AQDS board

2015-11-30 Thread York Sun


On 11/04/2015 07:16 PM, Alison Wang wrote:
> As 3G/1G user/kernel memory split is used on LS1021A, the Linux kernel
> fails to access the device tree blob on boot. The reason is that u-boot
> relocates the device tree blob into high memory when booting the kernel
> and the kernel is unable to access the blob.
> 
> To avoid this issue, fdt_high is set to the value of 0x. The
> device tree blob will not get relocated and is still in low memory to
> make it accessible to the kernel.
> 
> For the same reason, initrd_high is set to the value of 0x too.
> 
> This patch is to update fdt_high and initrd_high for LS1021AQDS board.
> 
> Signed-off-by: Alison Wang 
> ---
>  include/configs/ls1021aqds.h | 8 
>  1 file changed, 4 insertions(+), 4 deletions(-)

Applied to fsl-qoriq master. Thanks.

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


[U-Boot] [PATCH 0/3] spl: mmc: Fix warning and unify spl_mmc_find_device()

2015-11-30 Thread Simon Glass
This little series fixes a compiler warning in SPL MMC which affects
Rockchip. It also joins up the spl_mmc_find_device() function again. I feel
that splitting the function was the wrong approach as discussed here:

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

The first patch fixes the warning. The other two are suggested improvements
but are separate from that problem.


Simon Glass (3):
  spl: mmc: Fix compiler warning with CONFIG_DM_MMC
  spl: mmc: Rename 'mmc' variable to 'mmcp'
  spl: mmc: Unify non/driver model spl_mmc_find_device()

 common/spl/spl_mmc.c | 44 +++-
 1 file changed, 11 insertions(+), 33 deletions(-)

-- 
2.6.0.rc2.230.g3dd15c0

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


[U-Boot] [PATCH 1/3] spl: mmc: Fix compiler warning with CONFIG_DM_MMC

2015-11-30 Thread Simon Glass
Since commit 4188ba3 we get the following warning on rockchip boards:

common/spl/spl_mmc.c:111:10: error: 'mmc' undeclared (first use in this 
function)

Correct this by move the variable init earlier.

Signed-off-by: Simon Glass 
---

 common/spl/spl_mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index b3c2c64..9df4786 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -84,6 +84,7 @@ static int spl_mmc_find_device(struct mmc **mmc, u32 
boot_device)
struct udevice *dev;
int err, mmc_dev;
 
+   *mmc = NULL;
mmc_dev = spl_mmc_get_device_index(boot_device);
if (mmc_dev < 0)
return mmc_dev;
@@ -104,7 +105,6 @@ static int spl_mmc_find_device(struct mmc **mmc, u32 
boot_device)
return err;
}
 
-   *mmc = NULL;
*mmc = mmc_get_mmc_dev(dev);
return *mmc != NULL ? 0 : -ENODEV;
 }
-- 
2.6.0.rc2.230.g3dd15c0

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


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

2015-11-30 Thread Alexey Brodkin
Hi Tom,

On Mon, 2015-11-30 at 18:17 +0100, Marek Vasut wrote:
> On Monday, November 30, 2015 at 05:40:11 PM, Tom Rini wrote:
> > On Mon, Nov 30, 2015 at 01:33:56PM +0100, Marek Vasut wrote:
> > > T
> > +(ph1_sld8,ph1_sld3,ph1_ld4)
> > build/../drivers/usb/host/ehci-generic.c:33: undefined reference to
> > `ehci_deregister'

I'm wondering how may I reproduce this failure?

For me following (assuming ARC toolchain is in PATHs, see
http://www.denx.de/wiki/U-Boot/ARCNotes) works flawlessly:
-->8---
make axs101_defconfig && make
-->8---

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


Re: [U-Boot] [PATCH] arm, ubifs: fix gcc5.x compiler warning

2015-11-30 Thread Tom Rini
On Mon, Nov 30, 2015 at 11:03:53AM +0100, Heiko Schocher wrote:
> Hello Jeroen,
> 
> Am 30.11.2015 um 10:20 schrieb Jeroen Hofstee:
> >Hello Heiko,
> >
> >On 30-11-15 08:47, Heiko Schocher wrote:
> >>compiling U-Boot for openrd_base_defconfig with
> >>gcc 5.x shows the following warning:
> >>
> >>   CC  fs/ubifs/super.o
> >>In file included from fs/ubifs/ubifs.h:35:0,
> >>  from fs/ubifs/super.c:37:
> >>fs/ubifs/super.c: In function 'atomic_inc':
> >>./arch/arm/include/asm/atomic.h:55:2: warning: 'flags' is used 
> >>uninitialized in this function
> >>[-Wuninitialized]
> >>   local_irq_save(flags);
> >>   ^
> >>fs/ubifs/super.c: In function 'atomic_dec':
> >>./arch/arm/include/asm/atomic.h:64:2: warning: 'flags' is used 
> >>uninitialized in this function
> >>[-Wuninitialized]
> >>   local_irq_save(flags);
> >>   ^
> >>   CC  fs/ubifs/sb.o
> >>[...]
> >>   CC  fs/ubifs/lpt.o
> >>In file included from include/linux/bitops.h:123:0,
> >>  from include/common.h:20,
> >>  from include/ubi_uboot.h:17,
> >>  from fs/ubifs/ubifs.h:37,
> >>  from fs/ubifs/lpt.c:35:
> >>fs/ubifs/lpt.c: In function 'test_and_set_bit':
> >>./arch/arm/include/asm/bitops.h:57:2: warning: 'flags' is used 
> >>uninitialized in this function
> >>[-Wuninitialized]
> >>   local_irq_save(flags);
> >>   ^
> >>   CC  fs/ubifs/lpt_commit.o
> >>In file included from include/linux/bitops.h:123:0,
> >>  from include/common.h:20,
> >>  from include/ubi_uboot.h:17,
> >>  from fs/ubifs/ubifs.h:37,
> >>  from fs/ubifs/lpt_commit.c:26:
> >>fs/ubifs/lpt_commit.c: In function 'test_and_set_bit':
> >>./arch/arm/include/asm/bitops.h:57:2: warning: 'flags' is used 
> >>uninitialized in this function
> >>[-Wuninitialized]
> >>   local_irq_save(flags);
> >>   ^
> >>   CC  fs/ubifs/scan.o
> >>   CC  fs/ubifs/lprops.o
> >>   CC  fs/ubifs/tnc.o
> >>In file included from include/linux/bitops.h:123:0,
> >>  from include/common.h:20,
> >>  from include/ubi_uboot.h:17,
> >>  from fs/ubifs/ubifs.h:37,
> >>  from fs/ubifs/tnc.c:30:
> >>fs/ubifs/tnc.c: In function 'test_and_set_bit':
> >>./arch/arm/include/asm/bitops.h:57:2: warning: 'flags' is used 
> >>uninitialized in this function
> >>[-Wuninitialized]
> >>   local_irq_save(flags);
> >>   ^
> >>   CC  fs/ubifs/tnc_misc.o
> >>
> >>Fix it.
> >>
> >>Signed-off-by: Heiko Schocher 
> >>---
> >>
> >>  arch/arm/include/asm/atomic.h | 14 +++---
> >>  arch/arm/include/asm/bitops.h |  4 ++--
> >>  2 files changed, 9 insertions(+), 9 deletions(-)
> >>
> >>diff --git a/arch/arm/include/asm/atomic.h b/arch/arm/include/asm/atomic.h
> >>index 34c07fe..9b79506 100644
> >>--- a/arch/arm/include/asm/atomic.h
> >>+++ b/arch/arm/include/asm/atomic.h
> >>@@ -32,7 +32,7 @@ typedef struct { volatile int counter; } atomic_t;
> >>  static inline void atomic_add(int i, volatile atomic_t *v)
> >>  {
> >>-unsigned long flags;
> >>+unsigned long flags = 0;
> >>  local_irq_save(flags);
> >>  v->counter += i;
> >>@@ -41,7 +41,7 @@ static inline void atomic_add(int i, volatile atomic_t *v)
> >
> >Since flags is an "out" argument, something else must be wrong.
> >There should be no need to initialize it, since local_irq_save should
> >do that afaik.
> 
> yes, you are right, it should be, but gcc 5.x seems to have problems
> with it ... compiled code size for the openrd_base config is same with
> my patch ...
> 
> Hmm... for the openrd_base compile local_irq_save() is used from:
> arch/arm/thumb1/include/asm/proc-armv/system.h
> 
> with:
> static inline void local_irq_save(
> unsigned long flags __attribute__((unused)))
> {
> __asm__ __volatile__ ("" : : : "memory");
> }
> 
> flasg marked as unused ... seems correct to me, but I have
> no idea, why gcc 5.x prints a warning ... any ideas?

Well, gcc does get more vigerous in its checking now and yeah, it feels
like it's flagging false positives.   In this case I think the answer is
that we need to nop out the various calls a bit harder on ARM.  Glancing
at the kernel, I think for thumb1 we should just do what we do for
non-thumb, or translate that into thumb1 only code.

-- 
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] checkpatch.pl: Fix checkpatch.pl warnings with Perl 5.22

2015-11-30 Thread Tom Rini
On Mon, Nov 30, 2015 at 08:06:45AM -0800, Joe Perches wrote:
> On Mon, 2015-11-30 at 10:56 -0500, Tom Rini wrote:
> > On Mon, Nov 30, 2015 at 10:23:20AM +, Alexey Brodkin wrote:
> []
> > > Similar fix is already in Linus' master tree, see
> > > http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/comm
> > > it/?id=4e5d56bdf892e18832a6540b63ebf709966bce2a
> > > 
> > > Also note:
> > >  [1] That commit from Linux tree won't apply cleanly on U-Boot
> > >  due to a bit different context.
> > >  [2] Even if manually tweaked it looks like it is incomplete:
> > >  --->8---
> > >  )\(.*\).*\s{ <-- HERE / at scripts/checkpatch.pl line 2828.
> > >  --->8---
> > > 
> > > So with above in mind could you please apply that patch posted by
> > > Moritz?
> > > 
> > > This fixes checkpatch in Fedora 23 - in current state it is way too
> > > noisy.
> > 
> > Maybe we just need to re-sync again?
> 
> I don't track u-boot.
> 
> Are there any u-boot specific changes made to checkpatch
> that are inappropriate for the linux-kernel?
> 
> If there aren't, maybe whatever u-boot changes that have
> been made to checkpatch should be pulled into the kernel
> version.

My memory is hazy, sorry, so I dug this up:
https://lkml.org/lkml/2014/2/24/542 and then re-read most of it.  I had
a newer version of the __packed check that I didn't post (I'm pretty
sure) since the general feedback seemed to be that it wasn't wanted for
the kernel.  Other than that (and some other tiny things that are easy
to fixup) no, we don't have local changes.

-- 
Tom


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


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

2015-11-30 Thread Tom Rini
On Mon, Nov 30, 2015 at 01:33:56PM +0100, Marek Vasut wrote:

> The following changes since commit fa8883a1e39a20e72aaa5093af0c80062cb95757:
> 
>   Merge branch 'master' of git://git.denx.de/u-boot-i2c (2015-11-27 08:41:03 
> -0500)
> 
> are available in the git repository at:
> 
>   git://git.denx.de/u-boot-usb.git 
> 
> for you to fetch changes up to b5c6f21bf9761f12b43dfc652e5635ab8ec0d7c2:
> 
>   drivers:usb:fsl: Add T4080 as affected soc for Erratum A007792 sw 
> workaround 
> (2015-11-30 13:33:22 +0100)
> 

NAK:
+(CSQ_CS908,Linksprite_pcDuino,Cubieboard,Lamobo_R1,Mele_A1000,Mele_A1000G_quad,i12-tvbo
x,mk802_a10s,Wobo_i5,Auxtek-T004,Auxtek-T003,mk802,Linksprite_pcDuino3_Nano,A10-OLinuXin
o-Lime,Hummingbird_A31,Linksprite_pcDuino3,A20-OLinuXino_MICRO,A20-OLinuXino-Lime,r7-tv-
dongle,ga10h_v1_1,MK808C,mixtile_loftq,sunxi_Gemei_G9,Cubieboard2,Mele_M3,Mele_M5,Mele_M
9,A13-OLinuXino,A10s-OLinuXino-M,Bananapro,mk802ii,Marsboard_A10,ba10_tv_box,Wits_Pro_A2
0_DKT,Sinovoip_BPI_M2,Mele_I7,A20-Olimex-SOM-EVB,Cubietruck,Colombus,Orangepi,Wexler_TAB
7200,inet1,jesurun_q5,Orangepi_mini,A20-OLinuXino-Lime2,Bananapi,Mini-X,A13-OLinuXinoM)
 
drivers/usb/host/ehci-sunxi.o:(.u_boot_list_2_driver_2_usb_ehci+0x0):
multiple definition of `_u_boot_list_2_driver_2_usb_ehci'
...
+(ph1_sld8,ph1_sld3,ph1_ld4)
build/../drivers/usb/host/ehci-generic.c:33: undefined reference to
`ehci_deregister'
...
w+(xilinx_zynqmp_ep) ../drivers/usb/host/xhci-zynqmp.c:142:2: warning:
'return' with a value, in function returning void


-- 
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][v2] armv8: ls2085a: Add support of LS2085A SoC

2015-11-30 Thread York Sun


On 11/09/2015 03:12 AM, Prabhakar Kushwaha wrote:
> Freescale's LS2085A is a another personality of LS2080A SoC with
> support of AIOP and DP-DDR.
> This Patch adds support of LS2085A Personality.
> 
> Signed-off-by: Pratiyush Mohan Srivastava 
> Signed-off-by: Prabhakar Kushwaha 
> ---
> Changes for v2: Rebased on LS1043 patch set
> 

Dropped #ifdef in cpu.h.
Applied to fsl-qoriq master. Thanks.

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


Re: [U-Boot] [Patch V4 1/7] pci/layerscape: add support for LS1043A PCIe LUT register access

2015-11-30 Thread York Sun


On 11/11/2015 01:58 AM, Gong Qianyu wrote:
> From: Mingkai Hu 
> 
> The endian and base address of PEX LUT register region is different
> between Chassis 2 and Chassis 3, so move the base address definition
> to chassis specific header file and add pex_lut_* functions to access
> LUT register.
> 
> Signed-off-by: Mingkai Hu 
> Signed-off-by: Gong Qianyu 
> ---
> V4:
>  - Use #ifndef CONFIG_LS102XA instead of #ifdef CONFIG_FSL_LAYERSCAPE.
> V3:
>  - No change.
> V2:
>  - Fix compile errors for ls1021a.
> 
>  arch/arm/include/asm/arch-fsl-layerscape/config.h  |  2 ++
>  arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h |  4 
>  arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h |  4 
>  arch/arm/include/asm/arch-fsl-layerscape/soc.h |  8 
>  drivers/pci/pcie_layerscape.c  | 14 +++---
>  5 files changed, 25 insertions(+), 7 deletions(-)

Applied to fsl-qoriq master. Thanks.

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


Re: [U-Boot] [Patch V4 3/7] armv8/ls1043ardb: dts: add dtb support

2015-11-30 Thread York Sun


On 11/11/2015 01:58 AM, Gong Qianyu wrote:
> Reuse dts files from ls1043a linux kernel. Some parts in dts files
> may not be needed by U-Boot.
> 
> Signed-off-by: Gong Qianyu 
> ---
> V4:
>  - No change.
> V3:
>  - Modified the dts file according to ls1043a upstreaming linux kernel.
> V2:
>  - New Patch.
> 
>  arch/arm/dts/Makefile|   1 +
>  arch/arm/dts/fsl-ls1043a-rdb.dts |  84 
>  arch/arm/dts/fsl-ls1043a.dtsi| 160 
> +++
>  configs/ls1043ardb_defconfig |   2 +
>  4 files changed, 247 insertions(+)

Applied to fsl-qoriq master. Thanks.

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


Re: [U-Boot] [Patch V4 2/7] armv8/fsl-layerscape: Remove reference to gdata

2015-11-30 Thread York Sun


On 11/11/2015 01:58 AM, Gong Qianyu wrote:
> The global_data pointer (gd) has been set earlier in crt0_64.S.
> So there's no need to assign it again. Remove gdata since it is going
> away in U-Boot.
> 
> Signed-off-by: Gong Qianyu 
> ---
> V4:
>  - No change.
> V3:
>  - New Patch.
>  - Fix dead code.
>  
>  arch/arm/cpu/armv8/fsl-layerscape/spl.c | 2 --
>  1 file changed, 2 deletions(-)

Applied to fsl-qoriq master. Thanks.

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


Re: [U-Boot] [PATCH v1] drivers/ddr/fsl: Enable detection of one DDR controller operation for LSCH3

2015-11-30 Thread York Sun


On 11/04/2015 09:53 AM, York Sun wrote:
> Freescale LSCH3 platforms use two DDR controlers interleaving mode out of
> reset. It can be configured to disable one controller. To support this
> operation, the driver needs to detect and skip the disabled controller.
> 
> Signed-off-by: York Sun 
> 
> ---
> Change log
>   v1: Initial patch. Tested on LS2085AQDS and LS2085ARDB.
> 
>  arch/arm/include/asm/arch-fsl-layerscape/config.h |7 
>  drivers/ddr/fsl/main.c|1 +
>  drivers/ddr/fsl/util.c|   40 
> +
>  include/fsl_ddr.h |1 +
>  4 files changed, 49 insertions(+)

Applied to fsl-qoriq master.

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


Re: [U-Boot] [PATCH] armv8: ls2080a: Define CONFIG_ENV_OVERWRITE to overwrite serial and ethaddr

2015-11-30 Thread York Sun


On 11/13/2015 12:49 AM, Alison Wang wrote:
> As the environment variables "serial#" and "ethaddr" need to be
> overwriten by the users, CONFIG_ENV_OVERWRITE is defined to disable
> the write protection. Anybody can change or delete these parameters.
> 
> Signed-off-by: Alison Wang 
> ---
>  include/configs/ls2085a_common.h | 3 +++
>  1 file changed, 3 insertions(+)
> 

Applied to fsl-qoriq master. Thanks.

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


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

2015-11-30 Thread Marek Vasut
On Monday, November 30, 2015 at 06:23:15 PM, Alexey Brodkin wrote:
> Hi Tom,
> 
> On Mon, 2015-11-30 at 18:17 +0100, Marek Vasut wrote:
> > On Monday, November 30, 2015 at 05:40:11 PM, Tom Rini wrote:
> > > On Mon, Nov 30, 2015 at 01:33:56PM +0100, Marek Vasut wrote:
> > > > T
> > > 
> > > +(ph1_sld8,ph1_sld3,ph1_ld4)
> > > build/../drivers/usb/host/ehci-generic.c:33: undefined reference to
> > > `ehci_deregister'
> 
> I'm wondering how may I reproduce this failure?
> 
> For me following (assuming ARC toolchain is in PATHs, see
> http://www.denx.de/wiki/U-Boot/ARCNotes) works flawlessly:
> -->8---
> make axs101_defconfig && make
> -->8---

Try compiling either of the machines -- ph1_sld8 or ph1_sld3 or ph1_ld4

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


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

2015-11-30 Thread Tom Rini
On Mon, Nov 30, 2015 at 05:23:15PM +, Alexey Brodkin wrote:
> Hi Tom,
> 
> On Mon, 2015-11-30 at 18:17 +0100, Marek Vasut wrote:
> > On Monday, November 30, 2015 at 05:40:11 PM, Tom Rini wrote:
> > > On Mon, Nov 30, 2015 at 01:33:56PM +0100, Marek Vasut wrote:
> > > > T
> > > +(ph1_sld8,ph1_sld3,ph1_ld4)
> > > build/../drivers/usb/host/ehci-generic.c:33: undefined reference to
> > > `ehci_deregister'
> 
> I'm wondering how may I reproduce this failure?
> 
> For me following (assuming ARC toolchain is in PATHs, see
> http://www.denx.de/wiki/U-Boot/ARCNotes) works flawlessly:
> -->8---
> make axs101_defconfig && make
> -->8---

Build for ph1_sld8 or one of the other listed ARM boards :)

-- 
Tom


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


[U-Boot] [PATCH 01/14] ARM: zynq: Remove PHYLIB from config to defconfig

2015-11-30 Thread Michal Simek
Move PHYLIB from board config to defconfig

Signed-off-by: Michal Simek 
---

 configs/zynq_microzed_defconfig| 1 +
 configs/zynq_picozed_defconfig | 1 +
 configs/zynq_zc702_defconfig   | 1 +
 configs/zynq_zc706_defconfig   | 1 +
 configs/zynq_zc770_xm010_defconfig | 1 +
 configs/zynq_zc770_xm011_defconfig | 1 +
 configs/zynq_zc770_xm012_defconfig | 1 +
 configs/zynq_zc770_xm013_defconfig | 1 +
 configs/zynq_zed_defconfig | 1 +
 configs/zynq_zybo_defconfig| 1 +
 include/configs/zynq-common.h  | 1 -
 11 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/configs/zynq_microzed_defconfig b/configs/zynq_microzed_defconfig
index 3bf17cfc7ab7..0608d8a733cf 100644
--- a/configs/zynq_microzed_defconfig
+++ b/configs/zynq_microzed_defconfig
@@ -15,4 +15,5 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
+CONFIG_PHYLIB=y
 CONFIG_ZYNQ_QSPI=y
diff --git a/configs/zynq_picozed_defconfig b/configs/zynq_picozed_defconfig
index 600ca8b2f347..d6f0ce388832 100644
--- a/configs/zynq_picozed_defconfig
+++ b/configs/zynq_picozed_defconfig
@@ -8,3 +8,4 @@ CONFIG_SPL=y
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_PHYLIB=y
diff --git a/configs/zynq_zc702_defconfig b/configs/zynq_zc702_defconfig
index e3c1e23638ff..8318b94ecbb2 100644
--- a/configs/zynq_zc702_defconfig
+++ b/configs/zynq_zc702_defconfig
@@ -14,4 +14,5 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
+CONFIG_PHYLIB=y
 CONFIG_ZYNQ_QSPI=y
diff --git a/configs/zynq_zc706_defconfig b/configs/zynq_zc706_defconfig
index eaf15f2d700c..533aff9a7531 100644
--- a/configs/zynq_zc706_defconfig
+++ b/configs/zynq_zc706_defconfig
@@ -15,4 +15,5 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
+CONFIG_PHYLIB=y
 CONFIG_ZYNQ_QSPI=y
diff --git a/configs/zynq_zc770_xm010_defconfig 
b/configs/zynq_zc770_xm010_defconfig
index 381ace8ace6f..689d19e992da 100644
--- a/configs/zynq_zc770_xm010_defconfig
+++ b/configs/zynq_zc770_xm010_defconfig
@@ -17,5 +17,6 @@ CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_SPI_FLASH_WINBOND=y
+CONFIG_PHYLIB=y
 CONFIG_ZYNQ_SPI=y
 CONFIG_ZYNQ_QSPI=y
diff --git a/configs/zynq_zc770_xm011_defconfig 
b/configs/zynq_zc770_xm011_defconfig
index 49dd02554c88..c7125c304ab8 100644
--- a/configs/zynq_zc770_xm011_defconfig
+++ b/configs/zynq_zc770_xm011_defconfig
@@ -12,3 +12,4 @@ CONFIG_SYS_EXTRA_OPTIONS="ZC770_XM011"
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_PHYLIB=y
diff --git a/configs/zynq_zc770_xm012_defconfig 
b/configs/zynq_zc770_xm012_defconfig
index d50594371aaa..a8f28da11767 100644
--- a/configs/zynq_zc770_xm012_defconfig
+++ b/configs/zynq_zc770_xm012_defconfig
@@ -10,3 +10,4 @@ CONFIG_SYS_EXTRA_OPTIONS="ZC770_XM012"
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_PHYLIB=y
diff --git a/configs/zynq_zc770_xm013_defconfig 
b/configs/zynq_zc770_xm013_defconfig
index c2ae2ab2809d..6b2fd8ca4ebb 100644
--- a/configs/zynq_zc770_xm013_defconfig
+++ b/configs/zynq_zc770_xm013_defconfig
@@ -12,3 +12,4 @@ CONFIG_SYS_EXTRA_OPTIONS="ZC770_XM013"
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_PHYLIB=y
diff --git a/configs/zynq_zed_defconfig b/configs/zynq_zed_defconfig
index f603bb360106..4076c30707b1 100644
--- a/configs/zynq_zed_defconfig
+++ b/configs/zynq_zed_defconfig
@@ -15,4 +15,5 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
+CONFIG_PHYLIB=y
 CONFIG_ZYNQ_QSPI=y
diff --git a/configs/zynq_zybo_defconfig b/configs/zynq_zybo_defconfig
index 1227b7a14c32..c51049e664b1 100644
--- a/configs/zynq_zybo_defconfig
+++ b/configs/zynq_zybo_defconfig
@@ -11,6 +11,7 @@ CONFIG_FIT_SIGNATURE=y
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_PHYLIB=y
 CONFIG_DEBUG_UART=y
 CONFIG_DEBUG_UART_ZYNQ=y
 CONFIG_DEBUG_UART_BASE=0xe0001000
diff --git a/include/configs/zynq-common.h b/include/configs/zynq-common.h
index fa83ac7b15d0..a9e6bf046a97 100644
--- a/include/configs/zynq-common.h
+++ b/include/configs/zynq-common.h
@@ -50,7 +50,6 @@
 # define CONFIG_ZYNQ_GEM
 # define CONFIG_MII
 # define CONFIG_SYS_FAULT_ECHO_LINK_DOWN
-# define CONFIG_PHYLIB
 # define CONFIG_PHY_MARVELL
 # define CONFIG_BOOTP_SERVERIP
 # define CONFIG_BOOTP_BOOTPATH
-- 
1.9.1

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


Re: [U-Boot] MX6ULEVK does not boot

2015-11-30 Thread Fabio Estevam
Hi Peng,

On Mon, Nov 30, 2015 at 5:39 AM, Peng Fan  wrote:

> Sorry for this late reply. I missed you mail. I tried in my side
> with one sandisk 2GB macro sd card and one sandisk SDHC I 8GB card.
>
> Both boots fine. What card are you using? Also which revision board, RevA B 
> or C?

The card I have here that fails to boot is a SanDisk microSD HC I 8GB.

My mx6ulevk is revB. What about yours?

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


[U-Boot] [PATCH 06/14] net: gem: Remove phydev variable

2015-11-30 Thread Michal Simek
Resort code to use priv->phydev variable directly.
It will simplify move to DM.

Signed-off-by: Michal Simek 
---

 drivers/net/zynq_gem.c | 23 ++-
 1 file changed, 10 insertions(+), 13 deletions(-)

diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index 65ea5deb23c6..8f3fe9130066 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -315,7 +315,6 @@ static int zynq_gem_init(struct eth_device *dev, bd_t * bis)
u32 i;
int ret;
unsigned long clk_rate = 0;
-   struct phy_device *phydev;
struct zynq_gem_regs *regs = (struct zynq_gem_regs *)dev->iobase;
struct zynq_gem_priv *priv = dev->priv;
struct emac_bd *dummy_tx_bd = >tx_bd[TX_FREE_DESC];
@@ -394,23 +393,21 @@ static int zynq_gem_init(struct eth_device *dev, bd_t * 
bis)
return ret;
}
 
-   /* interface - look at tsec */
-   phydev = phy_connect(priv->bus, priv->phyaddr, dev,
-priv->interface);
+   priv->phydev = phy_connect(priv->bus, priv->phyaddr, dev,
+  priv->interface);
 
-   phydev->supported = supported | ADVERTISED_Pause |
-   ADVERTISED_Asym_Pause;
-   phydev->advertising = phydev->supported;
-   priv->phydev = phydev;
-   phy_config(phydev);
-   phy_startup(phydev);
+   priv->phydev->supported = supported | ADVERTISED_Pause |
+ ADVERTISED_Asym_Pause;
+   priv->phydev->advertising = priv->phydev->supported;
+   phy_config(priv->phydev);
+   phy_startup(priv->phydev);
 
-   if (!phydev->link) {
-   printf("%s: No link.\n", phydev->dev->name);
+   if (!priv->phydev->link) {
+   printf("%s: No link.\n", priv->phydev->dev->name);
return -1;
}
 
-   switch (phydev->speed) {
+   switch (priv->phydev->speed) {
case SPEED_1000:
writel(ZYNQ_GEM_NWCFG_INIT | ZYNQ_GEM_NWCFG_SPEED1000,
   >nwcfg);
-- 
1.9.1

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


[U-Boot] [PATCH 07/14] net: gem: Extract phy init code

2015-11-30 Thread Michal Simek
Move phy init code out of zynq_gem_init. DM drivers are normally calling
this code from probe function.

Signed-off-by: Michal Simek 
---

 drivers/net/zynq_gem.c | 47 ++-
 1 file changed, 30 insertions(+), 17 deletions(-)

diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index 8f3fe9130066..86bb75905071 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -310,15 +310,10 @@ static int zynq_gem_setup_mac(struct eth_device *dev)
return 0;
 }
 
-static int zynq_gem_init(struct eth_device *dev, bd_t * bis)
+static int zynq_phy_init(struct eth_device *dev)
 {
-   u32 i;
int ret;
-   unsigned long clk_rate = 0;
-   struct zynq_gem_regs *regs = (struct zynq_gem_regs *)dev->iobase;
struct zynq_gem_priv *priv = dev->priv;
-   struct emac_bd *dummy_tx_bd = >tx_bd[TX_FREE_DESC];
-   struct emac_bd *dummy_rx_bd = >tx_bd[TX_FREE_DESC + 2];
const u32 supported = SUPPORTED_10baseT_Half |
SUPPORTED_10baseT_Full |
SUPPORTED_100baseT_Half |
@@ -326,6 +321,33 @@ static int zynq_gem_init(struct eth_device *dev, bd_t * 
bis)
SUPPORTED_1000baseT_Half |
SUPPORTED_1000baseT_Full;
 
+   ret = phy_detection(dev);
+   if (ret) {
+   printf("GEM PHY init failed\n");
+   return ret;
+   }
+
+   priv->phydev = phy_connect(priv->bus, priv->phyaddr, dev,
+  priv->interface);
+
+   priv->phydev->supported = supported | ADVERTISED_Pause |
+ ADVERTISED_Asym_Pause;
+   priv->phydev->advertising = priv->phydev->supported;
+   phy_config(priv->phydev);
+
+   return 0;
+}
+
+static int zynq_gem_init(struct eth_device *dev, bd_t *bis)
+{
+   u32 i;
+   int ret;
+   unsigned long clk_rate = 0;
+   struct zynq_gem_regs *regs = (struct zynq_gem_regs *)dev->iobase;
+   struct zynq_gem_priv *priv = dev->priv;
+   struct emac_bd *dummy_tx_bd = >tx_bd[TX_FREE_DESC];
+   struct emac_bd *dummy_rx_bd = >tx_bd[TX_FREE_DESC + 2];
+
if (!priv->init) {
/* Disable all interrupts */
writel(0x, >idr);
@@ -387,19 +409,10 @@ static int zynq_gem_init(struct eth_device *dev, bd_t * 
bis)
priv->init++;
}
 
-   ret = phy_detection(dev);
-   if (ret) {
-   printf("GEM PHY init failed\n");
+   ret = zynq_phy_init(dev);
+   if (ret)
return ret;
-   }
-
-   priv->phydev = phy_connect(priv->bus, priv->phyaddr, dev,
-  priv->interface);
 
-   priv->phydev->supported = supported | ADVERTISED_Pause |
- ADVERTISED_Asym_Pause;
-   priv->phydev->advertising = priv->phydev->supported;
-   phy_config(priv->phydev);
phy_startup(priv->phydev);
 
if (!priv->phydev->link) {
-- 
1.9.1

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


[U-Boot] [PATCH 02/14] ARM: zynq: Remove CONFIG_API

2015-11-30 Thread Michal Simek
CONFIG_API is causing compilation error when DM_ETH is enabled because
eth_get_dev() is not available.

Signed-off-by: Michal Simek 
---

 include/configs/zynq-common.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/configs/zynq-common.h b/include/configs/zynq-common.h
index a9e6bf046a97..5db501188b18 100644
--- a/include/configs/zynq-common.h
+++ b/include/configs/zynq-common.h
@@ -297,7 +297,6 @@
 
 /* Boot FreeBSD/vxWorks from an ELF image */
 #if defined(CONFIG_ZYNQ_BOOT_FREEBSD)
-# define CONFIG_API
 # define CONFIG_SYS_MMC_MAX_DEVICE 1
 #endif
 
-- 
1.9.1

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


[U-Boot] [PATCH 04/14] net: gem: Change mdio_wait prototype to pass regs

2015-11-30 Thread Michal Simek
Pass regs instead of dev because this will be chagned by
driver model.

Signed-off-by: Michal Simek 
---

 drivers/net/zynq_gem.c | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index 1a5a366c9444..7f801d5c4c03 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -172,9 +172,8 @@ struct zynq_gem_priv {
struct mii_dev *bus;
 };
 
-static inline int mdio_wait(struct eth_device *dev)
+static inline int mdio_wait(struct zynq_gem_regs *regs)
 {
-   struct zynq_gem_regs *regs = (struct zynq_gem_regs *)dev->iobase;
u32 timeout = 2;
 
/* Wait till MDIO interface is ready to accept a new transaction. */
@@ -198,7 +197,7 @@ static u32 phy_setup_op(struct eth_device *dev, u32 
phy_addr, u32 regnum,
u32 mgtcr;
struct zynq_gem_regs *regs = (struct zynq_gem_regs *)dev->iobase;
 
-   if (mdio_wait(dev))
+   if (mdio_wait(regs))
return 1;
 
/* Construct mgtcr mask for the operation */
@@ -209,7 +208,7 @@ static u32 phy_setup_op(struct eth_device *dev, u32 
phy_addr, u32 regnum,
/* Write mgtcr and wait for completion */
writel(mgtcr, >phymntnc);
 
-   if (mdio_wait(dev))
+   if (mdio_wait(regs))
return 1;
 
if (op == ZYNQ_GEM_PHYMNTNC_OP_R_MASK)
-- 
1.9.1

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


[U-Boot] [PATCH 05/14] net: gem: Change mii function not to use eth_device structure

2015-11-30 Thread Michal Simek
Next step to move driver to driver model. Do not use eth_device
structure. Use private structure instead.
Add iobase to private structure to store gem iobase.

Signed-off-by: Michal Simek 
---

 drivers/net/zynq_gem.c | 32 +++-
 1 file changed, 19 insertions(+), 13 deletions(-)

diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index 7f801d5c4c03..65ea5deb23c6 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -167,6 +167,7 @@ struct zynq_gem_priv {
int phyaddr;
u32 emio;
int init;
+   struct zynq_gem_regs *iobase;
phy_interface_t interface;
struct phy_device *phydev;
struct mii_dev *bus;
@@ -191,11 +192,11 @@ static inline int mdio_wait(struct zynq_gem_regs *regs)
return 0;
 }
 
-static u32 phy_setup_op(struct eth_device *dev, u32 phy_addr, u32 regnum,
-   u32 op, u16 *data)
+static u32 phy_setup_op(struct zynq_gem_priv *priv, u32 phy_addr, u32 regnum,
+   u32 op, u16 *data)
 {
u32 mgtcr;
-   struct zynq_gem_regs *regs = (struct zynq_gem_regs *)dev->iobase;
+   struct zynq_gem_regs *regs = priv->iobase;
 
if (mdio_wait(regs))
return 1;
@@ -217,12 +218,13 @@ static u32 phy_setup_op(struct eth_device *dev, u32 
phy_addr, u32 regnum,
return 0;
 }
 
-static u32 phyread(struct eth_device *dev, u32 phy_addr, u32 regnum, u16 *val)
+static u32 phyread(struct zynq_gem_priv *priv, u32 phy_addr,
+  u32 regnum, u16 *val)
 {
u32 ret;
 
-   ret = phy_setup_op(dev, phy_addr, regnum,
-   ZYNQ_GEM_PHYMNTNC_OP_R_MASK, val);
+   ret = phy_setup_op(priv, phy_addr, regnum,
+  ZYNQ_GEM_PHYMNTNC_OP_R_MASK, val);
 
if (!ret)
debug("%s: phy_addr %d, regnum 0x%x, val 0x%x\n", __func__,
@@ -231,13 +233,14 @@ static u32 phyread(struct eth_device *dev, u32 phy_addr, 
u32 regnum, u16 *val)
return ret;
 }
 
-static u32 phywrite(struct eth_device *dev, u32 phy_addr, u32 regnum, u16 data)
+static u32 phywrite(struct zynq_gem_priv *priv, u32 phy_addr,
+   u32 regnum, u16 data)
 {
debug("%s: phy_addr %d, regnum 0x%x, data 0x%x\n", __func__, phy_addr,
  regnum, data);
 
-   return phy_setup_op(dev, phy_addr, regnum,
-   ZYNQ_GEM_PHYMNTNC_OP_W_MASK, );
+   return phy_setup_op(priv, phy_addr, regnum,
+   ZYNQ_GEM_PHYMNTNC_OP_W_MASK, );
 }
 
 static int phy_detection(struct eth_device *dev)
@@ -247,7 +250,7 @@ static int phy_detection(struct eth_device *dev)
struct zynq_gem_priv *priv = dev->priv;
 
if (priv->phyaddr != -1) {
-   phyread(dev, priv->phyaddr, PHY_DETECT_REG, );
+   phyread(priv, priv->phyaddr, PHY_DETECT_REG, );
if ((phyreg != 0x) &&
((phyreg & PHY_DETECT_MASK) == PHY_DETECT_MASK)) {
/* Found a valid PHY address */
@@ -265,7 +268,7 @@ static int phy_detection(struct eth_device *dev)
if (priv->phyaddr == -1) {
/* detect the PHY address */
for (i = 31; i >= 0; i--) {
-   phyread(dev, i, PHY_DETECT_REG, );
+   phyread(priv, i, PHY_DETECT_REG, );
if ((phyreg != 0x) &&
((phyreg & PHY_DETECT_MASK) == PHY_DETECT_MASK)) {
/* Found a valid PHY address */
@@ -561,9 +564,10 @@ static int zynq_gem_miiphyread(const char *devname, uchar 
addr,
uchar reg, ushort *val)
 {
struct eth_device *dev = eth_get_dev();
+   struct zynq_gem_priv *priv = dev->priv;
int ret;
 
-   ret = phyread(dev, addr, reg, val);
+   ret = phyread(priv, addr, reg, val);
debug("%s 0x%x, 0x%x, 0x%x\n", __func__, addr, reg, *val);
return ret;
 }
@@ -572,9 +576,10 @@ static int zynq_gem_miiphy_write(const char *devname, 
uchar addr,
uchar reg, ushort val)
 {
struct eth_device *dev = eth_get_dev();
+   struct zynq_gem_priv *priv = dev->priv;
 
debug("%s 0x%x, 0x%x, 0x%x\n", __func__, addr, reg, val);
-   return phywrite(dev, addr, reg, val);
+   return phywrite(priv, addr, reg, val);
 }
 
 int zynq_gem_initialize(bd_t *bis, phys_addr_t base_addr,
@@ -620,6 +625,7 @@ int zynq_gem_initialize(bd_t *bis, phys_addr_t base_addr,
sprintf(dev->name, "Gem.%lx", base_addr);
 
dev->iobase = base_addr;
+   priv->iobase = (struct zynq_gem_regs *)base_addr;
 
dev->init = zynq_gem_init;
dev->halt = zynq_gem_halt;
-- 
1.9.1

___
U-Boot mailing list
U-Boot@lists.denx.de

Re: [U-Boot] [PATCH] checkpatch.pl: Fix checkpatch.pl warnings with Perl 5.22

2015-11-30 Thread Joe Perches
On Mon, 2015-11-30 at 10:56 -0500, Tom Rini wrote:
> On Mon, Nov 30, 2015 at 10:23:20AM +, Alexey Brodkin wrote:
[]
> > Similar fix is already in Linus' master tree, see
> > http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/comm
> > it/?id=4e5d56bdf892e18832a6540b63ebf709966bce2a
> > 
> > Also note:
> >  [1] That commit from Linux tree won't apply cleanly on U-Boot
> >  due to a bit different context.
> >  [2] Even if manually tweaked it looks like it is incomplete:
> >  --->8---
> >  )\(.*\).*\s{ <-- HERE / at scripts/checkpatch.pl line 2828.
> >  --->8---
> > 
> > So with above in mind could you please apply that patch posted by
> > Moritz?
> > 
> > This fixes checkpatch in Fedora 23 - in current state it is way too
> > noisy.
> 
> Maybe we just need to re-sync again?

I don't track u-boot.

Are there any u-boot specific changes made to checkpatch
that are inappropriate for the linux-kernel?

If there aren't, maybe whatever u-boot changes that have
been made to checkpatch should be pulled into the kernel
version.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 11/14] net: gem: Fix miiphy_read name

2015-11-30 Thread Michal Simek
Sync it with write function.

Signed-off-by: Michal Simek 
---

 drivers/net/zynq_gem.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index a569c77aeb60..4e93707c7ab1 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -569,7 +569,7 @@ static void zynq_gem_halt(struct eth_device *dev)
ZYNQ_GEM_NWCTRL_TXEN_MASK, 0);
 }
 
-static int zynq_gem_miiphyread(const char *devname, uchar addr,
+static int zynq_gem_miiphy_read(const char *devname, uchar addr,
uchar reg, ushort *val)
 {
struct eth_device *dev = eth_get_dev();
@@ -645,7 +645,7 @@ int zynq_gem_initialize(bd_t *bis, phys_addr_t base_addr,
 
eth_register(dev);
 
-   miiphy_register(dev->name, zynq_gem_miiphyread, zynq_gem_miiphy_write);
+   miiphy_register(dev->name, zynq_gem_miiphy_read, zynq_gem_miiphy_write);
priv->bus = miiphy_get_dev_by_name(dev->name);
 
ret = zynq_phy_init(dev);
-- 
1.9.1

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


Re: [U-Boot] [PATCH v2 0/9] basic support for Allwinner A83T SOC.

2015-11-30 Thread Vishnu Patekar
Hello Hans,



On Mon, Nov 30, 2015 at 4:13 PM, Hans de Goede  wrote:
> Hi Vishnu,
>
>> This patch v2 of series that adds basic support for Allwinner A83T SOC
>> with
>> review comments addressed.
>
> Can you provide some quick instructions on how to test this on the
> A83T HomletV2 ?
>
> With v1 of these patches I tried to just build them and dd them to
> the sdcard, but that did not work.
>
> In the mean time I've figured out that I can get a serial console
> with the firmware in the nand using a sdcard breakout board, so
> I should be able to enter FEL mode by pressing 2 there, but it would
> be really nice if the board would just boot from sdcard...
>
I broke microsd connector of my A83T board, so boot from microsd not tested.

As you have microSD breakout UART working, you can set
CONFIG_UART0_PORT_F=y and use FEL mode, commands as below
sunxi-fel spl u-boot-sunxi-with-spl.bin
sunxi-fel  write 0x4a00 u-boot-dtb.bin

This is how i have tested it for now.

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


Re: [U-Boot] [PATCH] checkpatch.pl: Fix checkpatch.pl warnings with Perl 5.22

2015-11-30 Thread Tom Rini
On Mon, Nov 30, 2015 at 10:23:20AM +, Alexey Brodkin wrote:
> Hi Joe,
> 
> On Thu, 2015-09-03 at 15:46 -0500, Joe Hershberger wrote:
> > Hi Moritz,
> > 
> > On Thu, Sep 3, 2015 at 2:25 PM, Moritz Fischer  
> > wrote:
> > > This patch fixes a bunch of deprecation warings that show up when using
> > > checkpatch.pl with Perl 5.22.
> > > 
> > > Unescaped left brace in regex is deprecated, passed through in regex;
> > > marked by <-- HERE in m/\#\s*define.*do\s{ <-- HERE / at
> > > ./scripts/checkpatch.pl line 2829.
> > > 
> > > Unescaped left brace in regex is deprecated, passed through in regex;
> > > marked by <-- HERE in m/\(.*\){ <-- HERE / at
> > > ./scripts/checkpatch.pl line 3262.
> > > 
> > > Unescaped left brace in regex is deprecated, passed through in regex;
> > > marked by <-- HERE in m/do{ <-- HERE / at
> > > ./scripts/checkpatch.pl line 3263.
> > > 
> > > Unescaped left brace in regex is deprecated, passed through in regex;
> > > marked by <-- HERE in m/^\({ <-- HERE / at
> > > ./scripts/checkpatch.pl line 3636.
> > > 
> > > Unescaped left brace in regex is deprecated, passed through in regex;
> > > marked by <-- HERE in m/(?^x:
> > > 
> > > Signed-off-by: Moritz Fischer 
> > 
> > Please submit this and have it accepted in the Linux tree. We will
> > then pull it in here once it is accepted there.
> 
> Similar fix is already in Linus' master tree, see
> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=4e5d56bdf892e18832a6540b63ebf709966bce2a
> 
> Also note:
>  [1] That commit from Linux tree won't apply cleanly on U-Boot
>  due to a bit different context.
>  [2] Even if manually tweaked it looks like it is incomplete:
>  --->8---
>  )\(.*\).*\s{ <-- HERE / at scripts/checkpatch.pl line 2828.
>  --->8---
> 
> So with above in mind could you please apply that patch posted by
> Moritz?
> 
> This fixes checkpatch in Fedora 23 - in current state it is way too noisy.

Maybe we just need to re-sync again?

-- 
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] checkpatch.pl: Fix checkpatch.pl warnings with Perl 5.22

2015-11-30 Thread Tom Rini
On Mon, Nov 30, 2015 at 03:57:12PM +, Alexey Brodkin wrote:
> Hi Tom,
> 
> On Mon, 2015-11-30 at 10:56 -0500, Tom Rini wrote:
> > On Mon, Nov 30, 2015 at 10:23:20AM +, Alexey Brodkin wrote:
> > > Hi Joe,
> > > 
> > > On Thu, 2015-09-03 at 15:46 -0500, Joe Hershberger wrote:
> > > > Hi Moritz,
> > > > 
> > > > On Thu, Sep 3, 2015 at 2:25 PM, Moritz Fischer 
> > > >  wrote:
> > > > > This patch fixes a bunch of deprecation warings that show up when 
> > > > > using
> > > > > checkpatch.pl with Perl 5.22.
> > > > > 
> > > > > Unescaped left brace in regex is deprecated, passed through in regex;
> > > > > marked by <-- HERE in m/\#\s*define.*do\s{ <-- HERE / at
> > > > > ./scripts/checkpatch.pl line 2829.
> > > > > 
> > > > > Unescaped left brace in regex is deprecated, passed through in regex;
> > > > > marked by <-- HERE in m/\(.*\){ <-- HERE / at
> > > > > ./scripts/checkpatch.pl line 3262.
> > > > > 
> > > > > Unescaped left brace in regex is deprecated, passed through in regex;
> > > > > marked by <-- HERE in m/do{ <-- HERE / at
> > > > > ./scripts/checkpatch.pl line 3263.
> > > > > 
> > > > > Unescaped left brace in regex is deprecated, passed through in regex;
> > > > > marked by <-- HERE in m/^\({ <-- HERE / at
> > > > > ./scripts/checkpatch.pl line 3636.
> > > > > 
> > > > > Unescaped left brace in regex is deprecated, passed through in regex;
> > > > > marked by <-- HERE in m/(?^x:
> > > > > 
> > > > > Signed-off-by: Moritz Fischer 
> > > > 
> > > > Please submit this and have it accepted in the Linux tree. We will
> > > > then pull it in here once it is accepted there.
> > > 
> > > Similar fix is already in Linus' master tree, see
> > > http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=4e5d56bdf892e18832a6540b63ebf709966bce2a
> > > 
> > > Also note:
> > >  [1] That commit from Linux tree won't apply cleanly on U-Boot
> > >  due to a bit different context.
> > >  [2] Even if manually tweaked it looks like it is incomplete:
> > >  --->8---
> > >  )\(.*\).*\s{ <-- HERE / at scripts/checkpatch.pl line 2828.
> > >  --->8---
> > > 
> > > So with above in mind could you please apply that patch posted by
> > > Moritz?
> > > 
> > > This fixes checkpatch in Fedora 23 - in current state it is way too noisy.
> > 
> > Maybe we just need to re-sync again?
> > 
> 
> Do you mean to copy entire checkpatch.pl over from Linux to U-Boot?

Not quite blindly, we have an intentional change or two (I _think_ the
change for __packed detection / warning was rejected upstream, memory is
hazy) but by and large yes, it's just an import from the kernel anyhow.

-- 
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] checkpatch.pl: Fix checkpatch.pl warnings with Perl 5.22

2015-11-30 Thread Alexey Brodkin
Hi Tom,

On Mon, 2015-11-30 at 11:02 -0500, Tom Rini wrote:
> On Mon, Nov 30, 2015 at 03:57:12PM +, Alexey Brodkin wrote:
> > Hi Tom,
> > 
> > On Mon, 2015-11-30 at 10:56 -0500, Tom Rini wrote:
> > > On Mon, Nov 30, 2015 at 10:23:20AM +, Alexey Brodkin wrote:
> > > > Hi Joe,
> > > > 
> > > > On Thu, 2015-09-03 at 15:46 -0500, Joe Hershberger wrote:
> > > > > Hi Moritz,
> > > > > 
> > > > > On Thu, Sep 3, 2015 at 2:25 PM, Moritz Fischer 
> > > > >  wrote:
> > > > > > This patch fixes a bunch of deprecation warings that show up when 
> > > > > > using
> > > > > > checkpatch.pl with Perl 5.22.
> > > > > > 
> > > > > > Unescaped left brace in regex is deprecated, passed through in 
> > > > > > regex;
> > > > > > marked by <-- HERE in m/\#\s*define.*do\s{ <-- HERE / at
> > > > > > ./scripts/checkpatch.pl line 2829.
> > > > > > 
> > > > > > Unescaped left brace in regex is deprecated, passed through in 
> > > > > > regex;
> > > > > > marked by <-- HERE in m/\(.*\){ <-- HERE / at
> > > > > > ./scripts/checkpatch.pl line 3262.
> > > > > > 
> > > > > > Unescaped left brace in regex is deprecated, passed through in 
> > > > > > regex;
> > > > > > marked by <-- HERE in m/do{ <-- HERE / at
> > > > > > ./scripts/checkpatch.pl line 3263.
> > > > > > 
> > > > > > Unescaped left brace in regex is deprecated, passed through in 
> > > > > > regex;
> > > > > > marked by <-- HERE in m/^\({ <-- HERE / at
> > > > > > ./scripts/checkpatch.pl line 3636.
> > > > > > 
> > > > > > Unescaped left brace in regex is deprecated, passed through in 
> > > > > > regex;
> > > > > > marked by <-- HERE in m/(?^x:
> > > > > > 
> > > > > > Signed-off-by: Moritz Fischer 
> > > > > 
> > > > > Please submit this and have it accepted in the Linux tree. We will
> > > > > then pull it in here once it is accepted there.
> > > > 
> > > > Similar fix is already in Linus' master tree, see
> > > > http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=4e5d56bdf892e18832a6540b63ebf709966bce
> > > > 2a
> > > > 
> > > > Also note:
> > > >  [1] That commit from Linux tree won't apply cleanly on U-Boot
> > > >  due to a bit different context.
> > > >  [2] Even if manually tweaked it looks like it is incomplete:
> > > >  --->8---
> > > >  )\(.*\).*\s{ <-- HERE / at scripts/checkpatch.pl line 2828.
> > > >  --->8---
> > > > 
> > > > So with above in mind could you please apply that patch posted by
> > > > Moritz?
> > > > 
> > > > This fixes checkpatch in Fedora 23 - in current state it is way too 
> > > > noisy.
> > > 
> > > Maybe we just need to re-sync again?
> > > 
> > 
> > Do you mean to copy entire checkpatch.pl over from Linux to U-Boot?
> 
> Not quite blindly, we have an intentional change or two (I _think_ the
> change for __packed detection / warning was rejected upstream, memory is
> hazy) but by and large yes, it's just an import from the kernel anyhow.
> 

I'm fine with that but not sure if I may do it myself - at least I havent's 
tried it :)
Volunteers?

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


[U-Boot] [PATCH 03/14] net: gem: Do not continue if phy is not found

2015-11-30 Thread Michal Simek
Add return value for phy detection algorithm to stop init function when
phy is not found.

Signed-off-by: Michal Simek 
---

 drivers/net/zynq_gem.c | 14 ++
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index 858093f0d7e2..1a5a366c9444 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -241,7 +241,7 @@ static u32 phywrite(struct eth_device *dev, u32 phy_addr, 
u32 regnum, u16 data)
ZYNQ_GEM_PHYMNTNC_OP_W_MASK, );
 }
 
-static void phy_detection(struct eth_device *dev)
+static int phy_detection(struct eth_device *dev)
 {
int i;
u16 phyreg;
@@ -254,7 +254,7 @@ static void phy_detection(struct eth_device *dev)
/* Found a valid PHY address */
debug("Default phy address %d is valid\n",
  priv->phyaddr);
-   return;
+   return 0;
} else {
debug("PHY address is not setup correctly %d\n",
  priv->phyaddr);
@@ -272,11 +272,12 @@ static void phy_detection(struct eth_device *dev)
/* Found a valid PHY address */
priv->phyaddr = i;
debug("Found valid phy address, %d\n", i);
-   return;
+   return 0;
}
}
}
printf("PHY is not detected\n");
+   return -1;
 }
 
 static int zynq_gem_setup_mac(struct eth_device *dev)
@@ -310,6 +311,7 @@ static int zynq_gem_setup_mac(struct eth_device *dev)
 static int zynq_gem_init(struct eth_device *dev, bd_t * bis)
 {
u32 i;
+   int ret;
unsigned long clk_rate = 0;
struct phy_device *phydev;
struct zynq_gem_regs *regs = (struct zynq_gem_regs *)dev->iobase;
@@ -384,7 +386,11 @@ static int zynq_gem_init(struct eth_device *dev, bd_t * 
bis)
priv->init++;
}
 
-   phy_detection(dev);
+   ret = phy_detection(dev);
+   if (ret) {
+   printf("GEM PHY init failed\n");
+   return ret;
+   }
 
/* interface - look at tsec */
phydev = phy_connect(priv->bus, priv->phyaddr, dev,
-- 
1.9.1

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


[U-Boot] [PATCH 08/14] net: gem: Check if priv->phydev is valid

2015-11-30 Thread Michal Simek
Check return value.

Signed-off-by: Michal Simek 
---

 drivers/net/zynq_gem.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index 86bb75905071..d5540ec2155c 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -329,6 +329,8 @@ static int zynq_phy_init(struct eth_device *dev)
 
priv->phydev = phy_connect(priv->bus, priv->phyaddr, dev,
   priv->interface);
+   if (!priv->phydev)
+   return -ENODEV;
 
priv->phydev->supported = supported | ADVERTISED_Pause |
  ADVERTISED_Asym_Pause;
-- 
1.9.1

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


[U-Boot] [PATCH 12/14] net: gem: Move driver to DM

2015-11-30 Thread Michal Simek
- Enable DM_ETH by default for Zynq and ZynqMP
- Remove board_eth_init code
- Change miiphy_read function to return value instead of error code
  based on DM requirement
- Do not enable EMIO DT support by default

Signed-off-by: Michal Simek 
---

 arch/arm/Kconfig  |   2 +
 board/xilinx/zynq/board.c |  13 
 board/xilinx/zynqmp/zynqmp.c  |  25 ---
 drivers/mmc/zynq_sdhci.c  |  17 +
 drivers/net/zynq_gem.c| 166 --
 include/configs/zynq-common.h |   6 --
 include/netdev.h  |   2 -
 7 files changed, 116 insertions(+), 115 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 6542c38304a5..f989ab521469 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -551,6 +551,7 @@ config ARCH_ZYNQ
select OF_CONTROL
select SPL_OF_CONTROL
select DM
+   select DM_ETH
select SPL_DM
select DM_SPI
select DM_SERIAL
@@ -562,6 +563,7 @@ config ARCH_ZYNQMP
select ARM64
select DM
select OF_CONTROL
+   select DM_ETH
select DM_SERIAL
 
 config TEGRA
diff --git a/board/xilinx/zynq/board.c b/board/xilinx/zynq/board.c
index 237f2c2a2bf6..572b1468bf51 100644
--- a/board/xilinx/zynq/board.c
+++ b/board/xilinx/zynq/board.c
@@ -119,19 +119,6 @@ int board_eth_init(bd_t *bis)
ret |= xilinx_emaclite_initialize(bis, XILINX_EMACLITE_BASEADDR,
txpp, rxpp);
 #endif
-
-#if defined(CONFIG_ZYNQ_GEM)
-# if defined(CONFIG_ZYNQ_GEM0)
-   ret |= zynq_gem_initialize(bis, ZYNQ_GEM_BASEADDR0,
-  CONFIG_ZYNQ_GEM_PHY_ADDR0,
-  CONFIG_ZYNQ_GEM_EMIO0);
-# endif
-# if defined(CONFIG_ZYNQ_GEM1)
-   ret |= zynq_gem_initialize(bis, ZYNQ_GEM_BASEADDR1,
-  CONFIG_ZYNQ_GEM_PHY_ADDR1,
-  CONFIG_ZYNQ_GEM_EMIO1);
-# endif
-#endif
return ret;
 }
 
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index d105bb4de32f..51dc30f90d7e 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -65,31 +65,6 @@ void scsi_init(void)
 }
 #endif
 
-int board_eth_init(bd_t *bis)
-{
-   u32 ret = 0;
-
-#if defined(CONFIG_ZYNQ_GEM)
-# if defined(CONFIG_ZYNQ_GEM0)
-   ret |= zynq_gem_initialize(bis, ZYNQ_GEM_BASEADDR0,
-   CONFIG_ZYNQ_GEM_PHY_ADDR0, 0);
-# endif
-# if defined(CONFIG_ZYNQ_GEM1)
-   ret |= zynq_gem_initialize(bis, ZYNQ_GEM_BASEADDR1,
-   CONFIG_ZYNQ_GEM_PHY_ADDR1, 0);
-# endif
-# if defined(CONFIG_ZYNQ_GEM2)
-   ret |= zynq_gem_initialize(bis, ZYNQ_GEM_BASEADDR2,
-   CONFIG_ZYNQ_GEM_PHY_ADDR2, 0);
-# endif
-# if defined(CONFIG_ZYNQ_GEM3)
-   ret |= zynq_gem_initialize(bis, ZYNQ_GEM_BASEADDR3,
-   CONFIG_ZYNQ_GEM_PHY_ADDR3, 0);
-# endif
-#endif
-   return ret;
-}
-
 #ifdef CONFIG_CMD_MMC
 int board_mmc_init(bd_t *bd)
 {
diff --git a/drivers/mmc/zynq_sdhci.c b/drivers/mmc/zynq_sdhci.c
index e169b774932a..5ea992a3ce65 100644
--- a/drivers/mmc/zynq_sdhci.c
+++ b/drivers/mmc/zynq_sdhci.c
@@ -33,6 +33,23 @@ int zynq_sdhci_init(phys_addr_t regbase)
return 0;
 }
 
+
+
+static const struct udevice_id arasan_sdhci_ids[] = {
+   { .compatible = "arasan,sdhci-8.9a" },
+   { }
+};
+
+U_BOOT_DRIVER(arasan_sdhci_drv) = {
+   .name   = "rockchip_dwmmc",
+   .id = UCLASS_MMC,
+   .of_match   = rockchip_dwmmc_ids,
+   .ofdata_to_platdata = rockchip_dwmmc_ofdata_to_platdata,
+   .probe  = rockchip_dwmmc_probe,
+   .priv_auto_alloc_size = sizeof(struct rockchip_dwmmc_priv),
+};
+
+
 #if CONFIG_IS_ENABLED(OF_CONTROL)
 int zynq_sdhci_of_init(const void *blob)
 {
diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index 4e93707c7ab1..f2a14938036f 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -13,6 +13,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -23,6 +24,8 @@
 #include 
 #include 
 
+DECLARE_GLOBAL_DATA_PTR;
+
 #if !defined(CONFIG_PHYLIB)
 # error XILINX_GEM_ETHERNET requires PHYLIB
 #endif
@@ -241,7 +244,7 @@ static u32 phywrite(struct zynq_gem_priv *priv, u32 
phy_addr,
ZYNQ_GEM_PHYMNTNC_OP_W_MASK, );
 }
 
-static int phy_detection(struct eth_device *dev)
+static int phy_detection(struct udevice *dev)
 {
int i;
u16 phyreg;
@@ -280,20 +283,22 @@ static int phy_detection(struct eth_device *dev)
return -1;
 }
 
-static int zynq_gem_setup_mac(struct eth_device *dev)
+static int zynq_gem_setup_mac(struct udevice *dev)
 {
u32 i, macaddrlow, macaddrhigh;
-   struct zynq_gem_regs *regs = (struct zynq_gem_regs *)dev->iobase;
+   struct eth_pdata *pdata = 

[U-Boot] [PATCH 09/14] net: gem: Enable MDIO bus earlier

2015-11-30 Thread Michal Simek
Enable access to MDIO before zynq_gem_init is called.
It enables read information about phy earlier.

Signed-off-by: Michal Simek 
---

 drivers/net/zynq_gem.c | 14 +-
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index d5540ec2155c..9ce1221e8d0f 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -314,6 +314,7 @@ static int zynq_phy_init(struct eth_device *dev)
 {
int ret;
struct zynq_gem_priv *priv = dev->priv;
+   struct zynq_gem_regs *regs = (struct zynq_gem_regs *)dev->iobase;
const u32 supported = SUPPORTED_10baseT_Half |
SUPPORTED_10baseT_Full |
SUPPORTED_100baseT_Half |
@@ -321,6 +322,9 @@ static int zynq_phy_init(struct eth_device *dev)
SUPPORTED_1000baseT_Half |
SUPPORTED_1000baseT_Full;
 
+   /* Enable only MDIO bus */
+   writel(ZYNQ_GEM_NWCTRL_MDEN_MASK, >nwctrl);
+
ret = phy_detection(dev);
if (ret) {
printf("GEM PHY init failed\n");
@@ -343,7 +347,6 @@ static int zynq_phy_init(struct eth_device *dev)
 static int zynq_gem_init(struct eth_device *dev, bd_t *bis)
 {
u32 i;
-   int ret;
unsigned long clk_rate = 0;
struct zynq_gem_regs *regs = (struct zynq_gem_regs *)dev->iobase;
struct zynq_gem_priv *priv = dev->priv;
@@ -411,10 +414,6 @@ static int zynq_gem_init(struct eth_device *dev, bd_t *bis)
priv->init++;
}
 
-   ret = zynq_phy_init(dev);
-   if (ret)
-   return ret;
-
phy_startup(priv->phydev);
 
if (!priv->phydev->link) {
@@ -597,6 +596,7 @@ static int zynq_gem_miiphy_write(const char *devname, uchar 
addr,
 int zynq_gem_initialize(bd_t *bis, phys_addr_t base_addr,
int phy_addr, u32 emio)
 {
+   int ret;
struct eth_device *dev;
struct zynq_gem_priv *priv;
void *bd_space;
@@ -650,6 +650,10 @@ int zynq_gem_initialize(bd_t *bis, phys_addr_t base_addr,
miiphy_register(dev->name, zynq_gem_miiphyread, zynq_gem_miiphy_write);
priv->bus = miiphy_get_dev_by_name(dev->name);
 
+   ret = zynq_phy_init(dev);
+   if (ret)
+   return ret;
+
return 1;
 }
 
-- 
1.9.1

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


[U-Boot] [PATCH 10/14] net: gem: Remove zynq_gem_of_init()

2015-11-30 Thread Michal Simek
This function was used for OF init before DM.
Remove this function as the part of move to DM.

Signed-off-by: Michal Simek 
---

 drivers/net/zynq_gem.c | 42 --
 include/netdev.h   |  1 -
 2 files changed, 43 deletions(-)

diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index 9ce1221e8d0f..a569c77aeb60 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -13,8 +13,6 @@
 #include 
 #include 
 #include 
-#include 
-#include 
 #include 
 #include 
 #include 
@@ -656,43 +654,3 @@ int zynq_gem_initialize(bd_t *bis, phys_addr_t base_addr,
 
return 1;
 }
-
-#if CONFIG_IS_ENABLED(OF_CONTROL)
-int zynq_gem_of_init(const void *blob)
-{
-   int offset = 0;
-   u32 ret = 0;
-   u32 reg, phy_reg;
-
-   debug("ZYNQ GEM: Initialization\n");
-
-   do {
-   offset = fdt_node_offset_by_compatible(blob, offset,
-   "xlnx,ps7-ethernet-1.00.a");
-   if (offset != -1) {
-   reg = fdtdec_get_addr(blob, offset, "reg");
-   if (reg != FDT_ADDR_T_NONE) {
-   offset = fdtdec_lookup_phandle(blob, offset,
-  "phy-handle");
-   if (offset != -1)
-   phy_reg = fdtdec_get_addr(blob, offset,
- "reg");
-   else
-   phy_reg = 0;
-
-   debug("ZYNQ GEM: addr %x, phyaddr %x\n",
- reg, phy_reg);
-
-   ret |= zynq_gem_initialize(NULL, reg,
-  phy_reg, 0);
-
-   } else {
-   debug("ZYNQ GEM: Can't get base address\n");
-   return -1;
-   }
-   }
-   } while (offset != -1);
-
-   return ret;
-}
-#endif
diff --git a/include/netdev.h b/include/netdev.h
index 28eab4640760..5c6ae5b5624e 100644
--- a/include/netdev.h
+++ b/include/netdev.h
@@ -87,7 +87,6 @@ int xilinx_emaclite_initialize(bd_t *bis, unsigned long 
base_addr,
int txpp, int rxpp);
 int xilinx_ll_temac_eth_init(bd_t *bis, unsigned long base_addr, int flags,
unsigned long ctrl_addr);
-int zynq_gem_of_init(const void *blob);
 int zynq_gem_initialize(bd_t *bis, phys_addr_t base_addr,
int phy_addr, u32 emio);
 /*
-- 
1.9.1

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


Re: [U-Boot] [PATCH] checkpatch.pl: Fix checkpatch.pl warnings with Perl 5.22

2015-11-30 Thread Alexey Brodkin
Hi Tom,

On Mon, 2015-11-30 at 10:56 -0500, Tom Rini wrote:
> On Mon, Nov 30, 2015 at 10:23:20AM +, Alexey Brodkin wrote:
> > Hi Joe,
> > 
> > On Thu, 2015-09-03 at 15:46 -0500, Joe Hershberger wrote:
> > > Hi Moritz,
> > > 
> > > On Thu, Sep 3, 2015 at 2:25 PM, Moritz Fischer  
> > > wrote:
> > > > This patch fixes a bunch of deprecation warings that show up when using
> > > > checkpatch.pl with Perl 5.22.
> > > > 
> > > > Unescaped left brace in regex is deprecated, passed through in regex;
> > > > marked by <-- HERE in m/\#\s*define.*do\s{ <-- HERE / at
> > > > ./scripts/checkpatch.pl line 2829.
> > > > 
> > > > Unescaped left brace in regex is deprecated, passed through in regex;
> > > > marked by <-- HERE in m/\(.*\){ <-- HERE / at
> > > > ./scripts/checkpatch.pl line 3262.
> > > > 
> > > > Unescaped left brace in regex is deprecated, passed through in regex;
> > > > marked by <-- HERE in m/do{ <-- HERE / at
> > > > ./scripts/checkpatch.pl line 3263.
> > > > 
> > > > Unescaped left brace in regex is deprecated, passed through in regex;
> > > > marked by <-- HERE in m/^\({ <-- HERE / at
> > > > ./scripts/checkpatch.pl line 3636.
> > > > 
> > > > Unescaped left brace in regex is deprecated, passed through in regex;
> > > > marked by <-- HERE in m/(?^x:
> > > > 
> > > > Signed-off-by: Moritz Fischer 
> > > 
> > > Please submit this and have it accepted in the Linux tree. We will
> > > then pull it in here once it is accepted there.
> > 
> > Similar fix is already in Linus' master tree, see
> > http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=4e5d56bdf892e18832a6540b63ebf709966bce2a
> > 
> > Also note:
> >  [1] That commit from Linux tree won't apply cleanly on U-Boot
> >  due to a bit different context.
> >  [2] Even if manually tweaked it looks like it is incomplete:
> >  --->8---
> >  )\(.*\).*\s{ <-- HERE / at scripts/checkpatch.pl line 2828.
> >  --->8---
> > 
> > So with above in mind could you please apply that patch posted by
> > Moritz?
> > 
> > This fixes checkpatch in Fedora 23 - in current state it is way too noisy.
> 
> Maybe we just need to re-sync again?
> 

Do you mean to copy entire checkpatch.pl over from Linux to U-Boot?

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


[U-Boot] [PATCH 14/14] net: gem: Move gem to Kconfig

2015-11-30 Thread Michal Simek
Signed-off-by: Michal Simek 
---

 configs/xilinx_zynqmp_ep_defconfig | 1 +
 configs/zynq_microzed_defconfig| 1 +
 configs/zynq_picozed_defconfig | 1 +
 configs/zynq_zc702_defconfig   | 1 +
 configs/zynq_zc706_defconfig   | 1 +
 configs/zynq_zc770_xm010_defconfig | 1 +
 configs/zynq_zc770_xm011_defconfig | 1 +
 configs/zynq_zc770_xm012_defconfig | 1 +
 configs/zynq_zc770_xm013_defconfig | 1 +
 configs/zynq_zed_defconfig | 1 +
 configs/zynq_zybo_defconfig| 1 +
 drivers/net/Kconfig| 6 ++
 include/configs/xilinx_zynqmp.h| 4 +---
 include/configs/xilinx_zynqmp_ep.h | 3 ---
 include/configs/zynq-common.h  | 3 +--
 include/configs/zynq_microzed.h| 3 ---
 include/configs/zynq_picozed.h | 3 ---
 include/configs/zynq_zc70x.h   | 3 ---
 include/configs/zynq_zc770.h   | 4 
 include/configs/zynq_zed.h | 3 ---
 include/configs/zynq_zybo.h| 3 ---
 21 files changed, 19 insertions(+), 27 deletions(-)

diff --git a/configs/xilinx_zynqmp_ep_defconfig 
b/configs/xilinx_zynqmp_ep_defconfig
index 79304c1fb121..22915f19bfbb 100644
--- a/configs/xilinx_zynqmp_ep_defconfig
+++ b/configs/xilinx_zynqmp_ep_defconfig
@@ -22,4 +22,5 @@ CONFIG_CMD_TIME=y
 CONFIG_CMD_TIMER=y
 CONFIG_OF_EMBED=y
 CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_ZYNQ_GEM=y
 # CONFIG_REGEX is not set
diff --git a/configs/zynq_microzed_defconfig b/configs/zynq_microzed_defconfig
index 0608d8a733cf..c68efc8f41af 100644
--- a/configs/zynq_microzed_defconfig
+++ b/configs/zynq_microzed_defconfig
@@ -16,4 +16,5 @@ CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_PHYLIB=y
+CONFIG_ZYNQ_GEM=y
 CONFIG_ZYNQ_QSPI=y
diff --git a/configs/zynq_picozed_defconfig b/configs/zynq_picozed_defconfig
index d6f0ce388832..62eb79f630e3 100644
--- a/configs/zynq_picozed_defconfig
+++ b/configs/zynq_picozed_defconfig
@@ -9,3 +9,4 @@ CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_PHYLIB=y
+CONFIG_ZYNQ_GEM=y
diff --git a/configs/zynq_zc702_defconfig b/configs/zynq_zc702_defconfig
index 8318b94ecbb2..dd588aff72db 100644
--- a/configs/zynq_zc702_defconfig
+++ b/configs/zynq_zc702_defconfig
@@ -15,4 +15,5 @@ CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_PHYLIB=y
+CONFIG_ZYNQ_GEM=y
 CONFIG_ZYNQ_QSPI=y
diff --git a/configs/zynq_zc706_defconfig b/configs/zynq_zc706_defconfig
index 533aff9a7531..2e525b42d42a 100644
--- a/configs/zynq_zc706_defconfig
+++ b/configs/zynq_zc706_defconfig
@@ -16,4 +16,5 @@ CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_PHYLIB=y
+CONFIG_ZYNQ_GEM=y
 CONFIG_ZYNQ_QSPI=y
diff --git a/configs/zynq_zc770_xm010_defconfig 
b/configs/zynq_zc770_xm010_defconfig
index 689d19e992da..6f2ad17985e1 100644
--- a/configs/zynq_zc770_xm010_defconfig
+++ b/configs/zynq_zc770_xm010_defconfig
@@ -18,5 +18,6 @@ CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_PHYLIB=y
+CONFIG_ZYNQ_GEM=y
 CONFIG_ZYNQ_SPI=y
 CONFIG_ZYNQ_QSPI=y
diff --git a/configs/zynq_zc770_xm011_defconfig 
b/configs/zynq_zc770_xm011_defconfig
index c7125c304ab8..d20b3edf5cb3 100644
--- a/configs/zynq_zc770_xm011_defconfig
+++ b/configs/zynq_zc770_xm011_defconfig
@@ -13,3 +13,4 @@ CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_PHYLIB=y
+CONFIG_ZYNQ_GEM=y
diff --git a/configs/zynq_zc770_xm012_defconfig 
b/configs/zynq_zc770_xm012_defconfig
index a8f28da11767..4e963a45e2cf 100644
--- a/configs/zynq_zc770_xm012_defconfig
+++ b/configs/zynq_zc770_xm012_defconfig
@@ -11,3 +11,4 @@ CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_PHYLIB=y
+CONFIG_ZYNQ_GEM=y
diff --git a/configs/zynq_zc770_xm013_defconfig 
b/configs/zynq_zc770_xm013_defconfig
index 6b2fd8ca4ebb..f2d8f14f8784 100644
--- a/configs/zynq_zc770_xm013_defconfig
+++ b/configs/zynq_zc770_xm013_defconfig
@@ -13,3 +13,4 @@ CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_PHYLIB=y
+CONFIG_ZYNQ_GEM=y
diff --git a/configs/zynq_zed_defconfig b/configs/zynq_zed_defconfig
index 4076c30707b1..2e7c68d6a49e 100644
--- a/configs/zynq_zed_defconfig
+++ b/configs/zynq_zed_defconfig
@@ -16,4 +16,5 @@ CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_PHYLIB=y
+CONFIG_ZYNQ_GEM=y
 CONFIG_ZYNQ_QSPI=y
diff --git a/configs/zynq_zybo_defconfig b/configs/zynq_zybo_defconfig
index c51049e664b1..6f0bd0b79c5e 100644
--- a/configs/zynq_zybo_defconfig
+++ b/configs/zynq_zybo_defconfig
@@ -12,6 +12,7 @@ CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_PHYLIB=y
+CONFIG_ZYNQ_GEM=y
 CONFIG_DEBUG_UART=y
 CONFIG_DEBUG_UART_ZYNQ=y
 CONFIG_DEBUG_UART_BASE=0xe0001000
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index a03a95d0fbff..6905cc02e392 100644
--- a/drivers/net/Kconfig
+++ 

[U-Boot] [PATCH 13/14] net: gem: Read information about interface from DT

2015-11-30 Thread Michal Simek
Do not set interface via configs. Read information from DT.

Signed-off-by: Michal Simek 
---

 drivers/net/zynq_gem.c | 20 
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index f2a14938036f..6e9d183ad8c9 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -621,12 +621,6 @@ static int zynq_gem_probe(struct udevice *dev)
priv->bus->priv = priv;
strcpy(priv->bus->name, "gem");
 
-#ifndef CONFIG_ZYNQ_GEM_INTERFACE
-   priv->interface = PHY_INTERFACE_MODE_MII;
-#else
-   priv->interface = CONFIG_ZYNQ_GEM_INTERFACE;
-#endif
-
ret = mdio_register(priv->bus);
if (ret)
return ret;
@@ -649,6 +643,7 @@ static int zynq_gem_ofdata_to_platdata(struct udevice *dev)
struct eth_pdata *pdata = dev_get_platdata(dev);
struct zynq_gem_priv *priv = dev_get_priv(dev);
int offset = 0;
+   const char *phy_mode;
 
pdata->iobase = (phys_addr_t)dev_get_addr(dev);
priv->iobase = (struct zynq_gem_regs *)dev_get_addr(dev);
@@ -660,8 +655,17 @@ static int zynq_gem_ofdata_to_platdata(struct udevice *dev)
if (offset != -1)
priv->phyaddr = fdtdec_get_int(gd->fdt_blob, offset, "reg", 0);
 
-   printf("ZYNQ GEM: %lx, phyaddr %d\n", (ulong)priv->iobase,
-  priv->phyaddr);
+   phy_mode = fdt_getprop(gd->fdt_blob, dev->of_offset, "phy-mode", NULL);
+   if (phy_mode)
+   pdata->phy_interface = phy_get_interface_by_name(phy_mode);
+   if (pdata->phy_interface == -1) {
+   debug("%s: Invalid PHY interface '%s'\n", __func__, phy_mode);
+   return -EINVAL;
+   }
+   priv->interface = pdata->phy_interface;
+
+   printf("ZYNQ GEM: %lx, phyaddr %d, interface %s\n", (ulong)priv->iobase,
+  priv->phyaddr, phy_string_for_interface(priv->interface));
 
return 0;
 }
-- 
1.9.1

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


Re: [U-Boot] [PATCH 12/14] net: gem: Move driver to DM

2015-11-30 Thread Michal Simek
On 30.11.2015 16:05, Michal Simek wrote:
> - Enable DM_ETH by default for Zynq and ZynqMP
> - Remove board_eth_init code
> - Change miiphy_read function to return value instead of error code
>   based on DM requirement
> - Do not enable EMIO DT support by default
> 
> Signed-off-by: Michal Simek 
> ---
> 
>  arch/arm/Kconfig  |   2 +
>  board/xilinx/zynq/board.c |  13 
>  board/xilinx/zynqmp/zynqmp.c  |  25 ---
>  drivers/mmc/zynq_sdhci.c  |  17 +

Please ignore this file changes - will send v2 when this is reviewed.

Thanks,
Michal

-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform




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


Re: [U-Boot] [PATCH] arm: mx6: Reduce SPL malloc pool size

2015-11-30 Thread Tim Harvey
On Wed, Nov 25, 2015 at 5:32 AM, Marek Vasut  wrote:
> On Wednesday, November 25, 2015 at 02:15:13 PM, Przemyslaw Marczak wrote:
>> On 11/25/2015 01:16 PM, Marek Vasut wrote:
>> > On Wednesday, November 25, 2015 at 01:00:41 PM, Przemyslaw Marczak wrote:
>> >> Hello Marek,
>> >>
>> >> On 11/25/2015 11:56 AM, Marek Vasut wrote:
>> >>> On Wednesday, November 25, 2015 at 11:40:36 AM, Przemyslaw Marczak wrote:
>>  Hello Tim, Marek
>> 
>>  On 11/20/2015 10:40 PM, Tim Harvey wrote:
>> > On Fri, Nov 20, 2015 at 12:43 PM, Marek Vasut  wrote:
>> >> Using 50 MiB malloc pool in SPL is nonsense. Since the caches are
>> >> not enabled in SPL, it takes 2 seconds to init the pool and has no
>> >> obvious benefit. Reduce the size to 1 MiB.
>> >>
>> >> Signed-off-by: Marek Vasut 
>> >> Cc: Stefano Babic 
>> >> Cc: Tim Harvey 
>> >> ---
>> >>
>> >> include/configs/imx6_spl.h | 6 +++---
>> >> 1 file changed, 3 insertions(+), 3 deletions(-)
>> >>
>> >> diff --git a/include/configs/imx6_spl.h b/include/configs/imx6_spl.h
>> >> index 1744f2c..43ce7fe 100644
>> >> --- a/include/configs/imx6_spl.h
>> >> +++ b/include/configs/imx6_spl.h
>> >> @@ -63,15 +63,15 @@
>> >>
>> >> #if defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL) ||
>> >> defined(CONFIG_MX6SL) #define CONFIG_SPL_BSS_START_ADDR
>> >> 0x8820
>> >>
>> >> -#define CONFIG_SPL_BSS_MAX_SIZE0x10/* 1 MB */
>> >> +#define CONFIG_SPL_BSS_MAX_SIZE0x10/* 1
>> >> MB */
>> >>
>> >> #define CONFIG_SYS_SPL_MALLOC_START0x8830
>> >>
>> >> -#define CONFIG_SYS_SPL_MALLOC_SIZE 0x320   /* 50 MB */
>> >> +#define CONFIG_SYS_SPL_MALLOC_SIZE 0x10/* 1
>> >> MB */
>> >>
>> >> #define CONFIG_SYS_TEXT_BASE   0x8780
>> >> #else
>> >> #define CONFIG_SPL_BSS_START_ADDR  0x1820
>> >> #define CONFIG_SPL_BSS_MAX_SIZE0x10
>> >> /* 1 MB */ #define CONFIG_SYS_SPL_MALLOC_START0x1830
>> >>
>> >> -#define CONFIG_SYS_SPL_MALLOC_SIZE 0x320   /* 50 MB */
>> >> +#define CONFIG_SYS_SPL_MALLOC_SIZE 0x10/* 1 MB */
>> >>
>> >> #define CONFIG_SYS_TEXT_BASE   0x1780
>> >> #endif
>> >> #endif
>> >>
>> >> --
>> >> 2.1.4
>> >
>> > Acked-by: Tim Harvey 
>> >
>> > thanks for dropping 2 secs off our time to boot!
>> >
>> > Tim
>> 
>>  The boot time for SPL and U-Boot can be reduced more if
>>  CONFIG_SYS_MALLOC_CLEAR_ON_INIT is unset (default is set).
>> >>>
>> >>> This might confuse DM, so I don't want this. DM checks if it's
>> >>> structures were already inited and if we don't clear the malloc area,
>> >>> they would be.
>> >>
>> >> DM is safe - it uses calloc() for it's structures and also driver's
>> >> static structures are zeroed. Only some private data which is not
>> >> allocated by DM can be risky to use.
>> >>
>> >> To be precise - we don't use malloc() to get pointer for zeroed memory,
>> >> this is the job for the calloc().
>> >>
>> >> So any code with bad use of malloc() should be fixed ASAP.
>> >>
>> >> If you assume that clear the malloc pool at boot is safe to use, then
>> >> I'm asking you, what about the sequence malloc/free/malloc for
>> >> potentially the same area? You can't be sure that the second returned
>> >> pointer after calling free() - points to the initially zeroed pool.
>> >>
>> >> We don't clean the malloc pool for configs that we maintain and we
>> >> didn't noticed any issues related to this. And the boot time is reduced
>> >> significantly.
>> >
>> > Do you use DM in SPL ?
>>
>> No, we don't use the SPL - for the boards which we maintain.
>
> OK
>
>> > I just checked and I see it's probably only the GD which needs to be
>> > cleared out, so we should indeed be safe.  In which case, patch is
>> > welcome to enable CONFIG_SYS_MALLOC_CLEAR_ON_INIT .
>>
>> Yes I can see also for the Exynos SPL, that GD is manually cleared.
>>
>> But disabling the default CONFIG_SYS_MALLOC_CLEAR_ON_INIT, will help you
>> in reducing the U-Boot init time.
>> Just try and if you can easy measure the real difference for
>> enable/disable this config - share the results - it can give us an
>> interesting conclusions.
>
> Sure, thanks for the hint, but I still don't see any reason for having 50 MiB
> malloc area in SPL ;-)

Perhaps the use case for a >1MB malloc area is falcon mode. While a
1MB area certainly works for loading and bootstrapping to u-boot.img I
have used anywhere from 1MB to 8MB images for falcon mode.

Tim
___
U-Boot mailing list
U-Boot@lists.denx.de

[U-Boot] [PATCH v3] usb: add support for generic EHCI devices

2015-11-30 Thread Alexey Brodkin
From: Alexey Brodkin 

This driver is meant to be used with any EHCI-compatible host
controller in case if there's no need for platform-specific
glue such as setup of controller or PHY's power mode via
GPIOs etc.

Signed-off-by: Alexey Brodkin 
Reviewed-by: Simon Glass 
Reviewed-by: Marek Vasut 
Cc: Stephen Warren 
---

Changes compared to v2:
 * Driver is disabled by default now
 * Use uintptr_t instead of uint32_t for "struct ehci_hcor"
   address calculation

Changes compared to v1:
 * Updated commit message with removal of Synopsys board mention
 * Cleaned-up ehci_usb_remove()

 drivers/usb/host/Kconfig|  7 ++
 drivers/usb/host/Makefile   |  1 +
 drivers/usb/host/ehci-generic.c | 51 +
 3 files changed, 59 insertions(+)
 create mode 100644 drivers/usb/host/ehci-generic.c

diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index 2a2bffe..6bb9caa 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -73,4 +73,11 @@ config USB_EHCI_UNIPHIER
---help---
  Enables support for the on-chip EHCI controller on UniPhier SoCs.
 
+config USB_EHCI_GENERIC
+   bool "Support for generic EHCI USB controller"
+   depends on OF_CONTROL
+   default n
+   ---help---
+ Enables support for generic EHCI controller.
+
 endif
diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile
index f70f38c..b9b4471 100644
--- a/drivers/usb/host/Makefile
+++ b/drivers/usb/host/Makefile
@@ -32,6 +32,7 @@ else
 obj-$(CONFIG_USB_EHCI_FSL) += ehci-fsl.o
 endif
 obj-$(CONFIG_USB_EHCI_FARADAY) += ehci-faraday.o
+obj-$(CONFIG_USB_EHCI_GENERIC) += ehci-generic.o
 obj-$(CONFIG_USB_EHCI_EXYNOS) += ehci-exynos.o
 obj-$(CONFIG_USB_EHCI_MXC) += ehci-mxc.o
 obj-$(CONFIG_USB_EHCI_MXS) += ehci-mxs.o
diff --git a/drivers/usb/host/ehci-generic.c b/drivers/usb/host/ehci-generic.c
new file mode 100644
index 000..22e1ad0
--- /dev/null
+++ b/drivers/usb/host/ehci-generic.c
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2015 Alexey Brodkin 
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include 
+#include 
+#include "ehci.h"
+
+/*
+ * Even though here we don't explicitly use "struct ehci_ctrl"
+ * ehci_register() expects it to be the first thing that resides in
+ * device's private data.
+ */
+struct generic_ehci {
+   struct ehci_ctrl ctrl;
+};
+
+static int ehci_usb_probe(struct udevice *dev)
+{
+   struct ehci_hccr *hccr = (struct ehci_hccr *)dev_get_addr(dev);
+   struct ehci_hcor *hcor;
+
+   hcor = (struct ehci_hcor *)((uintptr_t)hccr +
+   HC_LENGTH(ehci_readl(>cr_capbase)));
+
+   return ehci_register(dev, hccr, hcor, NULL, 0, USB_INIT_HOST);
+}
+
+static int ehci_usb_remove(struct udevice *dev)
+{
+   return ehci_deregister(dev);
+}
+
+static const struct udevice_id ehci_usb_ids[] = {
+   { .compatible = "generic-ehci" },
+   { }
+};
+
+U_BOOT_DRIVER(usb_ehci) = {
+   .name   = "ehci_generic",
+   .id = UCLASS_USB,
+   .of_match = ehci_usb_ids,
+   .probe = ehci_usb_probe,
+   .remove = ehci_usb_remove,
+   .ops= _usb_ops,
+   .priv_auto_alloc_size = sizeof(struct generic_ehci),
+   .flags  = DM_FLAG_ALLOC_PRIV_DMA,
+};
+
-- 
2.5.0

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


Re: [U-Boot] [PATCH v3] usb: add support for generic EHCI devices

2015-11-30 Thread Alexey Brodkin
Hi Marek,

On Mon, 2015-11-30 at 19:05 +0100, Marek Vasut wrote:
> On Monday, November 30, 2015 at 06:47:45 PM, Alexey Brodkin wrote:
> > From: Alexey Brodkin 

> > +config USB_EHCI_GENERIC
> > +   bool "Support for generic EHCI USB controller"
> > +   depends on OF_CONTROL
> > +   default n
> > +   ---help---
> > + Enables support for generic EHCI controller.
> 
> This should depend on EHCI_HCD somehow, no (since it's using ehci_deregister 
> and 
> friends) ?

This symbol is in "if USB_EHCI_HCD" so if USB_EHCI_HCD is not enabled
EHCI_GENERIC won't be visible and hence USB_EHCI_HCD in defconfig.

Otherwise we'll need to add USB_EHCI_HCD dependency for other EHCI drivers
such as USB_EHCI_MARVELL, USB_EHCI_MX6 and USB_EHCI_UNIPHIER.
Do we want to do it? :)

Please check drivers/usb/host/Kconfig.

> [...]
> 
> > +static const struct udevice_id ehci_usb_ids[] = {
> > +   { .compatible = "generic-ehci" },
> > +   { }
> > +};
> > +
> > +U_BOOT_DRIVER(usb_ehci) = {
> 
> The driver name should be ehci_generic, not usb_ehci, otherwise this will 
> collide with other drivers who do the same mistake.

Ok but then some other drivers should be fixed as well, right?
See:
--->8
git grep U_BOOT_DRIVER drivers/usb/host/
drivers/usb/host/dwc2.c:U_BOOT_DRIVER(usb_dwc2) = {
drivers/usb/host/ehci-exynos.c:U_BOOT_DRIVER(usb_ehci) = {
drivers/usb/host/ehci-generic.c:U_BOOT_DRIVER(usb_ehci) = {
drivers/usb/host/ehci-marvell.c:U_BOOT_DRIVER(ehci_mvebu) = {
drivers/usb/host/ehci-pci.c:U_BOOT_DRIVER(ehci_pci) = {
drivers/usb/host/ehci-sunxi.c:U_BOOT_DRIVER(usb_ehci) = {
drivers/usb/host/ehci-tegra.c:U_BOOT_DRIVER(usb_ehci) = {
drivers/usb/host/ohci-sunxi.c:U_BOOT_DRIVER(usb_ohci) = {
drivers/usb/host/usb-sandbox.c:U_BOOT_DRIVER(usb_sandbox) = {
drivers/usb/host/usb-uclass.c:U_BOOT_DRIVER(usb_dev_generic_drv) = {
drivers/usb/host/xhci-exynos5.c:U_BOOT_DRIVER(usb_xhci) = {
--->8

I believe it all works because we don't enable 2 drivers at a time
[usually] :)

And in that light I don't see a point in having different names here.
Or you think there's a chance to have more than one USB controller enabled
simultaneously [and if it is possible at all with current implementation]?

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


  1   2   3   >