[U-Boot] [PATCH 04/16] usb: ohci: Pass around a pointer to ohci_t rather then accessing global vars

2015-05-05 Thread Hans de Goede
This is a preparation patch for adding driver-model support. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/host/ohci-hcd.c | 124 +++- 1 file changed, 64 insertions(+), 60 deletions(-) diff --git a/drivers/usb/host/ohci-hcd.c b/drivers

[U-Boot] [PATCH 05/16] usb: ohci: Move the ohci_dev struct to inside the main ohci struct

2015-05-05 Thread Hans de Goede
This is a preparation patch for adding driver-model support. Note we do keep ohci_dev as a separate struct so that we can later add support for interrupt-queues which requires allocating a separate ohci_dev per interrupt-queue. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb

[U-Boot] [PATCH 1/2] sunxi: Set SYS_MALLOC_CLEAR_ON_INIT to n

2015-05-05 Thread Hans de Goede
We don't need this on sunxi, and not having is shaves some time of out boot time. Signed-off-by: Hans de Goede hdego...@redhat.com --- board/sunxi/Kconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig index bd1e988..940b6c7 100644 --- a/board

[U-Boot] [PATCH 2/2] console: Fix pre-console flushing via cfb_console being very slow

2015-05-05 Thread Hans de Goede
CONFIG_PRE_CON_BUF_SZ to actually fit on the stack. Sunxi currently is the only user of the pre-console code so no other boards need to be adjusted. Signed-off-by: Hans de Goede hdego...@redhat.com --- README | 3 +++ common/console.c | 40

Re: [U-Boot] [PATCH] sunxi: display: Align end of memory to work around a linux-4.0 bug

2015-05-04 Thread Hans de Goede
Hi, On 02-05-15 15:21, Ian Campbell wrote: On Fri, 2015-04-24 at 20:39 +0200, Hans de Goede wrote: Linux-4.0 as shipped has a bug causing it to not boot if the end of memory is not aligned to a multiple of 2 MiB. For details see the linux-arm mailing list post titled: Memory size unaligned

Re: [U-Boot] [PATCH v2 03/10] sunxi: Introduce a hidden SUNXI_GEN_SUNxI Kconfig bool

2015-05-04 Thread Hans de Goede
Hi, On 02-05-15 15:31, Ian Campbell wrote: On Sun, 2015-04-26 at 17:21 +0200, Hans de Goede wrote: sun6i and newer (derived) SoCs such as the sun8i-a23, sun8i-a33 and sun9i have a various things in common, like having separate ahb reset control registers, the SID living inside the pmic, custom

Re: [U-Boot] [PATCH v2 08/10] sunxi: Add basic A33 basic support

2015-05-04 Thread Hans de Goede
Hi, On 02-05-15 15:36, Ian Campbell wrote: On Sun, 2015-04-26 at 20:52 +0200, Hans de Goede wrote: From: Vishnu Patekar vishnupatekar0...@gmail.com Enable full support for the A33 SoC including display, otg-usb, etc. Signed-off-by: Vishnu Patekar vishnupatekar0...@gmail.com Signed-off

Re: [U-Boot] [PATCH v2 03/10] sunxi: Introduce a hidden SUNXI_GEN_SUNxI Kconfig bool

2015-05-04 Thread Hans de Goede
Hi, On 04-05-15 11:31, Ian Campbell wrote: On Mon, 2015-05-04 at 11:04 +0200, Hans de Goede wrote: Hi, On 02-05-15 15:31, Ian Campbell wrote: On Sun, 2015-04-26 at 17:21 +0200, Hans de Goede wrote: sun6i and newer (derived) SoCs such as the sun8i-a23, sun8i-a33 and sun9i have a various

Re: [U-Boot] [PATCH 18/21] sunxi: dts: Add minimal dts files for board which lack a dts sofar

2015-05-04 Thread Hans de Goede
Hi, On 05/02/2015 03:48 PM, Ian Campbell wrote: On Sun, 2015-04-26 at 11:57 +0200, Hans de Goede wrote: Hi, On 26-04-15 05:30, Ian Campbell wrote: On Fri, 2015-04-24 at 15:48 +0200, Hans de Goede wrote: u-boot has support for a number of boards for which a dts file still needs to be written

Re: [U-Boot] [PATCH 8/8] sunxi: ehci: Convert to the driver-model

2015-05-04 Thread Hans de Goede
Hi, On 05/02/2015 04:03 PM, Ian Campbell wrote: On Thu, 2015-04-30 at 16:35 +0200, Hans de Goede wrote: + if (hccr == (void *)SUNXI_USB1_BASE) { + priv-ahb_gate_mask = 1 AHB_GATE_OFFSET_USB_EHCI0; + priv-phy_index = 1; Inferring these from the base address

Re: [U-Boot] [PATCH 5/5] nand: sunxi: And a20_nandread command utilizing spl nand read driver

2015-05-04 Thread Hans de Goede
boot cmds from config_distro_bootcmd.h work rather then needing special nand boot commands. Regards, Hans Signed-off-by: Daniel KochmaƄski dkochman...@turtle-solutions.eu Cc: Ian Campbell i...@hellion.org.uk Cc: Hans De Goede hdego...@redhat.com --- common/Kconfig| 7

[U-Boot] Please pull u-boot-sunxi master

2015-05-04 Thread Hans de Goede
://git.denx.de/u-boot-sunxi.git for you to fetch changes up to fd01ae1384a67c354eb53fc8a4c1e0d519014ae8: sunxi: usb: Protect phy-init and phy-power-on against multiple calls (2015-05-04 16:51:55 +0200) Hans de Goede (36

Re: [U-Boot] [PATCH 09/10] sunxi: Add softwinner astar mid756 A33 tablet board defconfig

2015-05-04 Thread Hans de Goede
Hi, On 05/04/2015 05:48 PM, Chen-Yu Tsai wrote: On Thu, Apr 16, 2015 at 4:01 AM, Ian Campbell i...@hellion.org.uk wrote: On Tue, 2015-04-14 at 18:07 +0200, Hans de Goede wrote: From: Vishnu Patekar vishnupatekar0...@gmail.com The Astar MID756 is a 7 tablet using the A33 SoC with a 800x480

[U-Boot] [PATCH v3] dm: usb: Copy over usb_device values from usb_scan_device() to final usb_device

2015-05-04 Thread Hans de Goede
usb_device_platdata, store a pointer to the in stack usb_device (which is still valid when usb_child_pre_probe() gets called) and copy over the entire struct. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/host/usb-uclass.c | 30 +- include/usb.h

[U-Boot] [PATCH v3 0/1] dm: usb: Copy over usb_device values from usb_scan_device() to final usb_device

2015-05-04 Thread Hans de Goede
Hi Simon, Here is v3 of my patch to fix the maxpacketsize0 not being set issue I found and related issues. I've added a big fat comment to explain that the usb_device pointer is a hack and should not be used outside of usb-uclass.c as requested. I hope this version is to your liking and you can

Re: [U-Boot] [PATCH v3 0/1] dm: usb: Copy over usb_device values from usb_scan_device() to final usb_device

2015-05-04 Thread Hans de Goede
Hi, On 04-05-15 19:22, Simon Glass wrote: Hi Hans, On 4 May 2015 at 11:19, Hans de Goede hdego...@redhat.com wrote: Hi Simon, Here is v3 of my patch to fix the maxpacketsize0 not being set issue I found and related issues. I've added a big fat comment to explain that the usb_device pointer

[U-Boot] [PATCH] dm: usb: Do not use bus-seq before device_probe(bus)

2015-05-04 Thread Hans de Goede
Do not use bus-seq before device_probe(bus), as bus-seq is not set until after the device_probe() call. This fixes u-boot printing: USB-1:for each bus it scans. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/host/usb-uclass.c | 3 +-- 1 file changed, 1 insertion(+), 2

Re: [U-Boot] [PATCH v2 3/9] dm: usb: Use usb_get_bus in dm ehci code

2015-05-03 Thread Hans de Goede
Hi, On 05/03/2015 06:59 PM, Simon Glass wrote: Hi Hans, On 1 May 2015 at 04:04, Hans de Goede hdego...@redhat.com wrote: Use usb_get_bus in dm ehci code rather then re-implementing it. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/host/ehci-hcd.c | 9 + 1 file

Re: [U-Boot] [PATCH 0/8] usb: driver-model fixes and dm support sunxi-ehci.c

2015-05-01 Thread Hans de Goede
Hi, On 01-05-15 00:04, Simon Glass wrote: Hi Hans, On 30 April 2015 at 13:38, Hans de Goede hdego...@redhat.com wrote: Hi, On 30-04-15 16:48, Simon Glass wrote: Hi Hans, On 30 April 2015 at 08:35, Hans de Goede hdego...@redhat.com wrote: Hi Simon and Marek, This series completes my

Re: [U-Boot] [PATCH 1/8] dm: usb: Copy over usb_device values from usb_scan_device() to final usb_device

2015-05-01 Thread Hans de Goede
Hi, On 01-05-15 06:11, Simon Glass wrote: Hi Hans, On 30 April 2015 at 08:35, Hans de Goede hdego...@redhat.com wrote: Currently we copy over a number of usb_device values stored in the on stack struct usb_device probed in usb_scan_device() to the final driver-model managed struct usb_device

Re: [U-Boot] [PATCH 1/8] dm: usb: Copy over usb_device values from usb_scan_device() to final usb_device

2015-05-01 Thread Hans de Goede
Hi, On 01-05-15 09:21, Hans de Goede wrote: Hi, On 01-05-15 06:11, Simon Glass wrote: Hi Hans, On 30 April 2015 at 08:35, Hans de Goede hdego...@redhat.com wrote: Currently we copy over a number of usb_device values stored in the on stack struct usb_device probed in usb_scan_device

Re: [U-Boot] [PATCH 8/8] sunxi: ehci: Convert to the driver-model

2015-05-01 Thread Hans de Goede
Hi, On 01-05-15 06:12, Simon Glass wrote: Hi Hans, On 30 April 2015 at 08:35, Hans de Goede hdego...@redhat.com wrote: Convert sunxi-boards which use the sunxi-ehci code to the driver-model. Signed-off-by: Hans de Goede hdego...@redhat.com --- board/sunxi/Kconfig | 3

[U-Boot] [PATCH v2 6/9] dm: usb: Add support for interrupt queues to the dm usb code

2015-05-01 Thread Hans de Goede
code. See the added doc comments for more details. Signed-off-by: Hans de Goede hdego...@redhat.com Acked-by: Simon Glass s...@chromium.org --- drivers/usb/host/usb-uclass.c | 36 include/usb.h | 48 ++- 2

[U-Boot] [PATCH v2 9/9] sunxi: ehci: Convert to the driver-model

2015-05-01 Thread Hans de Goede
Convert sunxi-boards which use the sunxi-ehci code to the driver-model. Signed-off-by: Hans de Goede hdego...@redhat.com Acked-by: Simon Glass s...@chromium.org --- board/sunxi/Kconfig | 3 ++ drivers/usb/host/ehci-sunxi.c | 89 +-- 2 files

[U-Boot] [PATCH v2 4/9] dm: usb: Fix finding of first upstream usb-2 hub in the ehci dm code

2015-05-01 Thread Hans de Goede
correctly. This commit fixes all this making usb-1 devices attached to usb-2 hubs, including usb-1 devices attached to usb-1 hubs attached to usb-2 hubs, work. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/host/ehci-hcd.c | 34 ++ 1 file changed, 22

[U-Boot] [PATCH v2 7/9] dm: usb: Prefix ehci interrupt-queue functions with _ehci_

2015-05-01 Thread Hans de Goede
This is a preparation patch for adding interrupt-queue support to the ehci dm code. Signed-off-by: Hans de Goede hdego...@redhat.com Acked-by: Simon Glass s...@chromium.org --- drivers/usb/host/ehci-hcd.c | 31 +-- 1 file changed, 25 insertions(+), 6 deletions

Re: [U-Boot] [PATCH 2/8] dm: usb: Use controller_dev in dm ehci code

2015-05-01 Thread Hans de Goede
Hi, On 01-05-15 06:11, Simon Glass wrote: Hi Hans, On 30 April 2015 at 08:35, Hans de Goede hdego...@redhat.com wrote: Use the controller_dev pointer in the ehci hcd code rather then going up the tree till we find the first UCLASS_USB device. Signed-off-by: Hans de Goede hdego...@redhat.com

Re: [U-Boot] [PATCH 3/8] dm: usb: Store usb_device parent pointer in usb_device

2015-05-01 Thread Hans de Goede
Hi, On 01-05-15 06:11, Simon Glass wrote: Hi Hans, On 30 April 2015 at 08:35, Hans de Goede hdego...@redhat.com wrote: When calling into the hcd code in usb_scan_device() we do not yet have the actual udevice for the device we are scanning, so we temporarily set usb_device.dev to the parent

[U-Boot] [PATCH v2 1/9] dm: usb: Copy over usb_device values from usb_scan_device() to final usb_device

2015-05-01 Thread Hans de Goede
usb_device_platdata, store a pointer to the in stack usb_device (which is still valid when usb_child_pre_probe() gets called) and copy over the entire struct. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/host/usb-uclass.c | 27 ++- include/usb.h

[U-Boot] [PATCH v2 5/9] dm: usb: Set desc_before_addr from ehci dm code

2015-05-01 Thread Hans de Goede
Without this usb-1 device descriptors do not get read properly. Signed-off-by: Hans de Goede hdego...@redhat.com Acked-by: Simon Glass s...@chromium.org --- drivers/usb/host/ehci-hcd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci

[U-Boot] [PATCH v2 0/9] usb: driver-model fixes and dm support sunxi-ehci.c

2015-05-01 Thread Hans de Goede
Hi Simon and Marek, Here is v2 of my driver-model fixes and dm support for sunxi-ehci.c set. Changes since v1: -Improved the commit mesg for dm: usb: Copy over usb_device values from usb_scan_device() to final usb_device adding that doing select config twice does not work for (some) usb-1

[U-Boot] [PATCH v2 3/9] dm: usb: Use usb_get_bus in dm ehci code

2015-05-01 Thread Hans de Goede
Use usb_get_bus in dm ehci code rather then re-implementing it. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/host/ehci-hcd.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index bd9861d

[U-Boot] [PATCH v2 8/9] dm: usb: Add support for interrupt queues to the dm ehci code

2015-05-01 Thread Hans de Goede
Add support for interrupt queues to the dm ehci code. Signed-off-by: Hans de Goede hdego...@redhat.com Acked-by: Simon Glass s...@chromium.org --- drivers/usb/host/ehci-hcd.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb

[U-Boot] [PATCH v2 2/9] dm: usb: Make usb_get_bus easier to use for callers

2015-05-01 Thread Hans de Goede
Make usb_get_bus easier to use for callers, by directly returning the bus rather then returning it via a pass-by-ref argument. This also removes the error checking from the single current caller, as we alreayd have an assert() for bus not being NULL in usb_get_bus(). Signed-off-by: Hans de Goede

Re: [U-Boot] [RFC 0/4] dm-usb fixes + dm conversion for sunxi-ehci

2015-04-30 Thread Hans de Goede
Hi, On 29-04-15 21:18, Hans de Goede wrote: Hi All, Here are a couple of dm-usb fixes and the dm conversion for sunxi-ehci, note that this series is currently still RFC only as I'm still having some issues with USB-1 devices not working which I need to investigate further. I guess that some

[U-Boot] [PATCH 6/8] dm: usb: Prefix ehci interrupt-queue functions with _ehci_

2015-04-30 Thread Hans de Goede
This is a preparation patch for adding interrupt-queue support to the ehci dm code. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/host/ehci-hcd.c | 31 +-- 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/drivers/usb/host/ehci-hcd.c b

[U-Boot] [PATCH 1/8] dm: usb: Copy over usb_device values from usb_scan_device() to final usb_device

2015-04-30 Thread Hans de Goede
() gets called) and copy over the entire struct. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/host/usb-uclass.c | 27 ++- include/usb.h | 5 + 2 files changed, 7 insertions(+), 25 deletions(-) diff --git a/drivers/usb/host/usb-uclass.c b

[U-Boot] [PATCH 4/8] dm: usb: Set desc_before_addr from ehci dm code

2015-04-30 Thread Hans de Goede
Without this usb-1 device descriptors do not get read properly. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/host/ehci-hcd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 00c038c..9fc1e33 100644

[U-Boot] [PATCH 7/8] dm: usb: Add support for interrupt queues to the dm ehci code

2015-04-30 Thread Hans de Goede
Add support for interrupt queues to the dm ehci code. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/host/ehci-hcd.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 12145ed..9e8bacb

[U-Boot] [PATCH 5/8] dm: usb: Add support for interrupt queues to the dm usb code

2015-04-30 Thread Hans de Goede
code. See the added doc comments for more details. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/host/usb-uclass.c | 36 include/usb.h | 48 ++- 2 files changed, 83 insertions(+), 1 deletion

[U-Boot] [PATCH 2/8] dm: usb: Use controller_dev in dm ehci code

2015-04-30 Thread Hans de Goede
Use the controller_dev pointer in the ehci hcd code rather then going up the tree till we find the first UCLASS_USB device. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/host/ehci-hcd.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/usb

[U-Boot] [PATCH 0/8] usb: driver-model fixes and dm support sunxi-ehci.c

2015-04-30 Thread Hans de Goede
Hi Simon and Marek, This series completes my work on converting the sunxi usb/ehci code to the driver model. With this series everything works as it did before, and all the issues I've been seeing when switching to the driver model are resolved. Please review / merge. I think it would be best to

Re: [U-Boot] [PATCH 0/8] usb: driver-model fixes and dm support sunxi-ehci.c

2015-04-30 Thread Hans de Goede
Hi, On 30-04-15 16:35, Hans de Goede wrote: Hi Simon and Marek, This series completes my work on converting the sunxi usb/ehci code to the driver model. With this series everything works as it did before, and all the issues I've been seeing when switching to the driver model are resolved

[U-Boot] [PATCH 8/8] sunxi: ehci: Convert to the driver-model

2015-04-30 Thread Hans de Goede
Convert sunxi-boards which use the sunxi-ehci code to the driver-model. Signed-off-by: Hans de Goede hdego...@redhat.com --- board/sunxi/Kconfig | 3 ++ drivers/usb/host/ehci-sunxi.c | 95 ++- 2 files changed, 69 insertions(+), 29 deletions

[U-Boot] [PATCH 3/8] dm: usb: Store usb_device parent pointer in usb_device

2015-04-30 Thread Hans de Goede
. This fixes usb-1 devices plugged into usb-2 hubs not working with the driver model. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/host/ehci-hcd.c | 24 +--- drivers/usb/host/usb-uclass.c | 5 ++--- include/usb.h | 2 +- 3 files changed, 4

Re: [U-Boot] [PATCH 0/8] usb: driver-model fixes and dm support sunxi-ehci.c

2015-04-30 Thread Hans de Goede
Hi, On 30-04-15 16:48, Simon Glass wrote: Hi Hans, On 30 April 2015 at 08:35, Hans de Goede hdego...@redhat.com wrote: Hi Simon and Marek, This series completes my work on converting the sunxi usb/ehci code to the driver model. With this series everything works as it did before, and all

[U-Boot] [PATCH 0/1] dm: usb: Fix divide by 0 errors in host drivers caused by not setting maxpsize

2015-04-29 Thread Hans de Goede
Hi Simon, While working on moving the sunxi ehci code over to the driver model I've found this bug in the usb uclass which causes a div by zero error. I've spend a couple of hours yesterday evening debugging this and I'm happy to report that I've a fix now. This fix has not seen as much testing

[U-Boot] [PATCH] dm: usb: Fix divide by 0 errors in host drivers caused by not setting maxpsize

2015-04-29 Thread Hans de Goede
in the ehci driver. This commit fixes this by passing the maxpacketsize through the usb_device_platdata and setting it in usb_child_pre_probe(). Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/host/usb-uclass.c | 4 include/usb.h | 3 +++ 2 files changed, 7

[U-Boot] [PATCH] dm: usb: Copy over usb_device values from usb_scan_device() to final usb_device

2015-04-29 Thread Hans de Goede
() gets called) and copy over the entire struct. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/host/usb-uclass.c | 23 --- include/usb.h | 5 + 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/drivers/usb/host/usb-uclass.c b

[U-Boot] [RFC 4/4] sunxi: ehci: Convert to the driver-model

2015-04-29 Thread Hans de Goede
Convert sunxi-boards which use the sunxi-ehci code to the driver-model. Signed-off-by: Hans de Goede hdego...@redhat.com --- board/sunxi/Kconfig | 3 ++ drivers/usb/host/ehci-sunxi.c | 95 ++- 2 files changed, 69 insertions(+), 29 deletions

[U-Boot] [RFC 3/4] dm: usb: Store usb_device parent pointer in usb_device

2015-04-29 Thread Hans de Goede
. This fixes usb-1 devices plugged into usb-2 hubs not working with the driver model. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/host/ehci-hcd.c | 24 +--- drivers/usb/host/usb-uclass.c | 5 ++--- include/usb.h | 2 +- 3 files changed, 4

[U-Boot] [RFC 2/4] dm: usb: Use controller_dev in dm ehci code

2015-04-29 Thread Hans de Goede
Use the controller_dev pointer in the ehci hcd code rather then going up the tree till we find the first UCLASS_USB device. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/usb/host/ehci-hcd.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/usb

[U-Boot] [RFC 1/4] dm: usb: Copy over usb_device values from usb_scan_device() to final usb_device

2015-04-29 Thread Hans de Goede
() gets called) and copy over the entire struct. Signed-off-by: Hans de Goede hdego...@redhat.com --- Changes in v2: -Remove code setting controller_dev from usb_child_pre_probe as that is already done in usb_scan_device() and copied over with the rest --- drivers/usb/host/usb-uclass.c | 27

[U-Boot] [RFC 0/4] dm-usb fixes + dm conversion for sunxi-ehci

2015-04-29 Thread Hans de Goede
Hi All, Here are a couple of dm-usb fixes and the dm conversion for sunxi-ehci, note that this series is currently still RFC only as I'm still having some issues with USB-1 devices not working which I need to investigate further. I guess that some of the dm-usb fixed can be applied regardless as

Re: [U-Boot] [PATCH v2 6/6] sunxi: axp: Remove non driver-model support from the axp gpio code

2015-04-28 Thread Hans de Goede
Hi Simon, Thanks for the reviews. On 28-04-15 05:20, Simon Glass wrote: Hi Hans, On 26 April 2015 at 03:51, Hans de Goede hdego...@redhat.com wrote: Now that all sunxi boards are using driver-model for gpio (*), we can remove the non driver-model support from the axp gpio code, and the glue

[U-Boot] [PATCH 4/6] sunxi: usb: Rename the usbc.? files to usb_phy.?

2015-04-28 Thread Hans de Goede
The usbc.? files now only contain usb-phy related code, rename them to make this clear. Signed-off-by: Hans de Goede hdego...@redhat.com --- arch/arm/cpu/armv7/sunxi/Makefile | 2 +- arch/arm/cpu/armv7/sunxi/{usbc.c = usb_phy.c}| 2 +- arch/arm/include/asm/arch-sunxi

[U-Boot] [PATCH 5/6] sunxi: usb: Do not call phy_probe from hcd code

2015-04-28 Thread Hans de Goede
them to the end of the file while we are at it, as that is the most logical place for them. Signed-off-by: Hans de Goede hdego...@redhat.com --- arch/arm/cpu/armv7/sunxi/usb_phy.c| 106 -- arch/arm/include/asm/arch-sunxi/usb_phy.h | 4 +- board/sunxi/board.c

[U-Boot] [PATCH 3/6] sunxi: usb: Rename sunxi_usbc_foo functions to sunxi_usb_phy_bar

2015-04-28 Thread Hans de Goede
. Signed-off-by: Hans de Goede hdego...@redhat.com --- arch/arm/cpu/armv7/sunxi/usbc.c| 124 - arch/arm/include/asm/arch-sunxi/usbc.h | 25 +++ board/sunxi/board.c| 2 + drivers/usb/host/ehci-sunxi.c | 17 ++--- drivers/usb

[U-Boot] [PATCH 6/6] sunxi: usb: Protect phy-init and phy-power-on against multiple calls

2015-04-28 Thread Hans de Goede
Once we add support for the ohci controller the phy-init and phy-power-on functions may be called twice (once by the ehci code and once by the ohci code) protect them against this. Signed-off-by: Hans de Goede hdego...@redhat.com --- arch/arm/cpu/armv7/sunxi/usb_phy.c | 18 ++ 1

[U-Boot] [PATCH 1/6] sunxi: usb: Move setup of host controller clocks to the host controller drivers

2015-04-28 Thread Hans de Goede
support. Signed-off-by: Hans de Goede hdego...@redhat.com --- arch/arm/cpu/armv7/sunxi/usbc.c | 14 +- drivers/usb/host/ehci-sunxi.c | 24 ++-- drivers/usb/musb-new/sunxi.c| 20 3 files changed, 43 insertions(+), 15 deletions(-) diff --git

[U-Boot] [PATCH 2/6] sunxi: usb: Remove sunxi_usbc_get_io_base function

2015-04-28 Thread Hans de Goede
This is the only function left in sunxi/usbc.c which is not phy related, so remove it. This is a preparation patch for turning the usbc.c code into a proper usb phy driver. Signed-off-by: Hans de Goede hdego...@redhat.com --- arch/arm/cpu/armv7/sunxi/usbc.c| 30

[U-Boot] [PATCH 0/6] sunxi: usb: Turn the usbc code into a usb-phy driver

2015-04-28 Thread Hans de Goede
Hi, This is a preparation series for moving the sunxi ehci code over to the driver model and for adding ohci support. Regards, Hans ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

Re: [U-Boot] Regression in usb-storage in u-boot 2015.04 ???

2015-04-27 Thread Hans de Goede
Hi, On 27-04-15 03:09, Marek Vasut wrote: On Friday, March 27, 2015 at 09:47:25 AM, Hans de Goede wrote: Hi, Hi! [...] scanning usb for storage devices... 1 Storage Device(s) found that EHCI timeout appears to be random, it pops up maybe 20% of the time. tried with a few

[U-Boot] [PATCH v2 03/10] sunxi: Introduce a hidden SUNXI_GEN_SUNxI Kconfig bool

2015-04-26 Thread Hans de Goede
bool which can be used to check for these features avoiding the need for an ever growing list of #if defined CONFIG_MACH_SUN?I conditionals as we add support for more new style sunxi SoCs. For completeness this also adds a SUNXI_GEN_SUN4I bool for A10/A13/A20. Signed-off-by: Hans de Goede hdego

[U-Boot] [PATCH v2 4/6] sunxi: axp: Move axp gpio code to a separate axpi-gpio driver

2015-04-26 Thread Hans de Goede
as we never need it in the SPL. Signed-off-by: Hans de Goede hdego...@redhat.com --- arch/arm/include/asm/arch-sunxi/gpio.h | 13 +++ board/sunxi/Kconfig | 6 ++ board/sunxi/board.c | 6 +- configs/A13-OLinuXino_defconfig | 1

[U-Boot] [PATCH v2 1/6] sunxi: axp: Change axp_gpio_foo prototypes to match gpio uclass ops

2015-04-26 Thread Hans de Goede
patch. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/gpio/sunxi_gpio.c | 8 drivers/power/axp209.c| 10 +- drivers/power/axp221.c| 10 +- include/axp209.h | 10 ++ include/axp221.h | 10 ++ 5 files changed, 26

[U-Boot] [PATCH v2 0/6] sunxi: Add driver-model support for axp pmic gpio pins

2015-04-26 Thread Hans de Goede
Hi Simon, Ian, Here is a new series to replace the 2 patches which added support for axp gpio-s to the sunxi_gpio.c driver-model code. As requested this series instead adds a new driver-model axp_gpio driver instead of bolting it on to the sunxi_gpio code. Patches 1-5 are intended to slot into

[U-Boot] [PATCH v2 2/6] sunxi: axp: Move axp pmic register helpers to a separate file

2015-04-26 Thread Hans de Goede
Move the register helpers used to access the registers via p2wi resp. rsb bus on the otherwise identical axp221 and axp223 pmics to a separate file, so that they can be used by the upcoming standalone axp gpio driver too. Signed-off-by: Hans de Goede hdego...@redhat.com --- arch/arm/cpu/armv7

[U-Boot] [PATCH v2 5/6] sunxi: axp: Add driver-model support to the axp_gpio code

2015-04-26 Thread Hans de Goede
Add driver-model support to the axp_gpio code, note that this needs a small tweak to the driver-model version of sunxi_name_to_gpio to deal with the vbus detect and enable pins which are not standard numbered gpios. Signed-off-by: Hans de Goede hdego...@redhat.com --- arch/arm/include/asm/arch

[U-Boot] [PATCH v2 6/6] sunxi: axp: Remove non driver-model support from the axp gpio code

2015-04-26 Thread Hans de Goede
, but the SPL never uses axp gpios support and we were already not building axp-gpio support for the SPL. Signed-off-by: Hans de Goede hdego...@redhat.com --- arch/arm/include/asm/arch-sunxi/gpio.h | 7 --- drivers/gpio/axp_gpio.c| 17 - drivers/gpio/sunxi_gpio.c

[U-Boot] [PATCH v2 3/6] sunxi: axp: Add support for i2c based PMICs to the pmic-bus helpers

2015-04-26 Thread Hans de Goede
Add support for the axp152 and axp209 PMICs to the pmic register access helpers. This is a preparation patch for moving the axp gpio code to a separate gpio driver. Signed-off-by: Hans de Goede hdego...@redhat.com --- arch/arm/cpu/armv7/sunxi/Makefile | 2 ++ arch/arm/cpu/armv7/sunxi

Re: [U-Boot] [PATCH 20/21] sunxi: Move all boards to the device-model

2015-04-26 Thread Hans de Goede
Hi, On 26-04-15 05:33, Ian Campbell wrote: On Fri, 2015-04-24 at 15:48 +0200, Hans de Goede wrote: diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig index 3831d3b..3997637 100644 --- a/board/sunxi/Kconfig +++ b/board/sunxi/Kconfig @@ -529,4 +529,16 @@ config GMAC_TX_DELAY ---help

Re: [U-Boot] [PATCH 12/21] sunxi: gmac: Move sunxi_gmac_initialize proto out of netdev.h

2015-04-26 Thread Hans de Goede
Hi, Thanks for the reviews! On 26-04-15 05:23, Ian Campbell wrote: On Fri, 2015-04-24 at 15:48 +0200, Hans de Goede wrote: netdev.h should not be included in device-model enabled builds (doing so causes compiler warnings about struct eth_device not being declared), but we do use

Re: [U-Boot] [PATCH 18/21] sunxi: dts: Add minimal dts files for board which lack a dts sofar

2015-04-26 Thread Hans de Goede
Hi, On 26-04-15 05:30, Ian Campbell wrote: On Fri, 2015-04-24 at 15:48 +0200, Hans de Goede wrote: u-boot has support for a number of boards for which a dts file still needs to be written, add minimal dts files for these boards so that we can switch them over to device-model / fdt. Can

[U-Boot] [PATCH v2 08/10] sunxi: Add basic A33 basic support

2015-04-26 Thread Hans de Goede
From: Vishnu Patekar vishnupatekar0...@gmail.com Enable full support for the A33 SoC including display, otg-usb, etc. Signed-off-by: Vishnu Patekar vishnupatekar0...@gmail.com Signed-off-by: Hans de Goede hdego...@redhat.com --- Changes in v2: -Add a comment to explain the 0 write to the usb CSR

Re: [U-Boot] [PATCH 06/10] sunxi: Add a33 dram init code

2015-04-26 Thread Hans de Goede
Hi, On 04/16/2015 11:09 AM, Ian Campbell wrote: On Thu, 2015-04-16 at 09:27 +0200, Hans de Goede wrote: Hi, On 15-04-15 21:56, Ian Campbell wrote: On Tue, 2015-04-14 at 18:06 +0200, Hans de Goede wrote: From: Vishnu Patekar vishnupatekar0...@gmail.com Based on Allwinner dram init code from

Re: [U-Boot] [PATCH 01/21] sunxi: Do not build i2c support when we've no i2c controllers

2015-04-25 Thread Hans de Goede
Hi, On 25-04-15 01:22, Simon Glass wrote: Hi Hans, On 24 April 2015 at 07:48, Hans de Goede hdego...@redhat.com wrote: This fixes the following errors being printed during boot: Error, wrong i2c adapter 0 max 0 possible Error, wrong i2c adapter 0 max 0 possible Signed-off-by: Hans de Goede

Re: [U-Boot] [PATCH 00/21] sunxi: Move ALL boards to the device-model

2015-04-25 Thread Hans de Goede
Hi Simon, Thanks for the quick review. On 25-04-15 01:23, Simon Glass wrote: Hi Hans, On 24 April 2015 at 07:48, Hans de Goede hdego...@redhat.com wrote: Hi Simon, Ian, As promised here is my patch-set to move all sunxi boards to the device-model, it was slightly more work then I expected

Re: [U-Boot] [PATCH 15/21] sunxi: emac: Add device model support

2015-04-25 Thread Hans de Goede
Hi, On 25-04-15 01:24, Simon Glass wrote: Hi Hans, On 24 April 2015 at 07:48, Hans de Goede hdego...@redhat.com wrote: Modify the sunxi-emac eth driver to support device model. Signed-off-by: Hans de Goede hdego...@redhat.com --- arch/arm/cpu/armv7/sunxi/board.c | 4 +- drivers/net

[U-Boot] [PATCH v2 0/4] sunxi: emac: Add driver model support

2015-04-25 Thread Hans de Goede
Hi All, Here is v2 of my patch series to add driver model support to the sunxi emac driver. Changes since v1: -Add a patch to rename DMA_CPU_TRRESHOLD to EMAC_RX_BUFSIZE. Please review. Regards, Hans ___ U-Boot mailing list U-Boot@lists.denx.de

[U-Boot] [PATCH v2 3/4] sunxi: emac: Rename DMA_CPU_TRRESHOLD to EMAC_RX_BUFSIZE

2015-04-25 Thread Hans de Goede
Besides being spelled wron, the DMA_CPU_TRRESHOLD define actually has nothing to do with DMA as we only use mmio fifo access. Rename it to EMAC_RX_BUFSIZE to properly reflect what it does. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/net/sunxi_emac.c | 4 ++-- 1 file changed, 2

[U-Boot] [PATCH v2 2/4] sunxi: emac: Prepare for driver-model support

2015-04-25 Thread Hans de Goede
Split all the core functionality out into functions taking a struct emac_eth_dev *priv argument as preparation for adding driver-model support. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/net/sunxi_emac.c | 115 +-- 1 file changed, 71

[U-Boot] [PATCH v2 1/4] sunxi: emac: port to phylib

2015-04-25 Thread Hans de Goede
This is a preparation-patch for adding device-model support to the emac driver. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/net/sunxi_emac.c | 111 + include/configs/sunxi-common.h | 2 + 2 files changed, 71 insertions(+), 42

[U-Boot] [PATCH v2 4/4] sunxi: emac: Add driver model support

2015-04-25 Thread Hans de Goede
Modify the sunxi-emac eth driver to support driver model. Signed-off-by: Hans de Goede hdego...@redhat.com --- arch/arm/cpu/armv7/sunxi/board.c | 4 +- drivers/net/sunxi_emac.c | 81 2 files changed, 84 insertions(+), 1 deletion(-) diff --git

Re: [U-Boot] [PATCH 03/21] sunxi: usbc: Fix vbus gpio handling to work with the device-model

2015-04-24 Thread Hans de Goede
Hi, On 24-04-15 20:10, Fabio Estevam wrote: On Fri, Apr 24, 2015 at 10:48 AM, Hans de Goede hdego...@redhat.com wrote: sunxi_usbc-gpio_vbus = get_vbus_gpio(index); - if (sunxi_usbc-gpio_vbus != -1) { + if (sunxi_usbc-gpio_vbus = 0) { What about using dm_gpio_is_valid

[U-Boot] [PATCH 18/21] sunxi: dts: Add minimal dts files for board which lack a dts sofar

2015-04-24 Thread Hans de Goede
u-boot has support for a number of boards for which a dts file still needs to be written, add minimal dts files for these boards so that we can switch them over to device-model / fdt. Signed-off-by: Hans de Goede hdego...@redhat.com --- arch/arm/dts/Makefile | 20

Re: [U-Boot] [PATCH 07/10] sunxi: Fix end of kernel memory alignment for A33

2015-04-24 Thread Hans de Goede
Hi Mark, On 17-04-15 12:20, Mark Rutland wrote: On Thu, Apr 16, 2015 at 08:12:31PM +0100, Hans de Goede wrote: Hi, On 16-04-15 19:35, Mark Rutland wrote: On Thu, Apr 16, 2015 at 08:32:03AM +0100, Hans de Goede wrote: Hi, On 15-04-15 21:57, Ian Campbell wrote: On Tue, 2015-04-14 at 18:06

[U-Boot] [PATCH] sunxi: display: Align end of memory to work around a linux-4.0 bug

2015-04-24 Thread Hans de Goede
specifically hits the sunxi display driver because we carve out the exact needed framebuffer size at the top of mem, this commit works around this issue by aligning the carve out. Cc: Stefan Agner ste...@agner.ch Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/video/sunxi_display.c | 13

[U-Boot] [PATCH 09/21] sunxi: gpio: Build sunxi_name_to_gpio_bank for device-model code too

2015-04-24 Thread Hans de Goede
When doing a device-model enabled build we still need sunxi_name_to_gpio_bank (for now) for the mmc pinmux code in board/sunxi/board.c, so build it for device-model enabled builds too. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/gpio/sunxi_gpio.c | 28

[U-Boot] [PATCH 07/21] sunxi: gpio: Add temporary implementation of name_to_gpio()

2015-04-24 Thread Hans de Goede
...@chromium.org Acked-by: Hans de Goede hdego...@redhat.com Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/gpio/sunxi_gpio.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpio/sunxi_gpio.c b/drivers/gpio/sunxi_gpio.c index 29301c4..89209df 100644 --- a/drivers/gpio

[U-Boot] [PATCH 17/21] sunxi: dts: Add dts files which have been submitted but not yet merged upstream

2015-04-24 Thread Hans de Goede
We need dts files for all boards we support, so bring in a few unmerged ones, these will be replaced with the upstream merged versions the next time we sync dts files. Signed-off-by: Hans de Goede hdego...@redhat.com --- arch/arm/dts/Makefile | 2 + arch/arm/dts/sun4i-a10

[U-Boot] [PATCH 00/21] sunxi: Move ALL boards to the device-model

2015-04-24 Thread Hans de Goede
Hi Simon, Ian, As promised here is my patch-set to move all sunxi boards to the device-model, it was slightly more work then I expected, and as such the patch-set is also somewhat larger then expected, but it is done :) Please review, since this all only touches sunxi specific files the

[U-Boot] [PATCH 20/21] sunxi: Move all boards to the device-model

2015-04-24 Thread Hans de Goede
Now that we've everything prepared for it remove the DM settings from the defconfig(s) and simply always set them for sunxi, so that all sunxi boards will allways use dm now. Signed-off-by: Hans de Goede hdego...@redhat.com --- arch/arm/Kconfig | 5 + board/sunxi

[U-Boot] [PATCH 13/21] sunxi: emac: port to phylib

2015-04-24 Thread Hans de Goede
This is a preparation-patch for adding device-model support to the emac driver. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/net/sunxi_emac.c | 111 + include/configs/sunxi-common.h | 2 + 2 files changed, 71 insertions(+), 42

[U-Boot] [PATCH 21/21] sunxi: emac: Remove non device-model code

2015-04-24 Thread Hans de Goede
All sunxi boards now use the device-model, so remove the non device-model code. Signed-off-by: Hans de Goede hdego...@redhat.com --- arch/arm/cpu/armv7/sunxi/board.c | 12 --- drivers/net/sunxi_emac.c | 69 include/netdev.h

Re: [U-Boot] [PATCH 11/21] sunxi: gpio: Add support for AXP gpios to the dm gpio code

2015-04-24 Thread Hans de Goede
Hi, On 24-04-15 15:48, Hans de Goede wrote: snip @@ -222,7 +266,7 @@ static int sunxi_gpio_set_value(struct udevice *dev, unsigned offset, struct sunxi_gpio_platdata *plat = dev_get_platdata(dev); u32 num = GPIO_NUM(offset); - clrsetbits_le32(plat-regs-dat, 1 num

[U-Boot] [PATCH 08/21] sunxi: gpio: Add compatible strings for all supported SoCs

2015-04-24 Thread Hans de Goede
We want to use device-model/fdt with other model SoCs too, so add compatible strings for the other SoCs to the dm sunxi gpio code. Signed-off-by: Hans de Goede hdego...@redhat.com --- drivers/gpio/sunxi_gpio.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpio/sunxi_gpio.c b

[U-Boot] [PATCH 03/21] sunxi: usbc: Fix vbus gpio handling to work with the device-model

2015-04-24 Thread Hans de Goede
The device-model gpio functions may return another value then -1 as error, make the sunxi usbc properly handle this. Signed-off-by: Hans de Goede hdego...@redhat.com --- arch/arm/cpu/armv7/sunxi/usbc.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/arch

[U-Boot] [PATCH 15/21] sunxi: emac: Add device model support

2015-04-24 Thread Hans de Goede
Modify the sunxi-emac eth driver to support device model. Signed-off-by: Hans de Goede hdego...@redhat.com --- arch/arm/cpu/armv7/sunxi/board.c | 4 +- drivers/net/sunxi_emac.c | 81 2 files changed, 84 insertions(+), 1 deletion(-) diff --git

[U-Boot] [PATCH 11/21] sunxi: gpio: Add support for AXP gpios to the dm gpio code

2015-04-24 Thread Hans de Goede
for the non dm case. This allows boards using axp gpios to be converted to dm. Signed-off-by: Hans de Goede hdego...@redhat.com --- arch/arm/include/asm/arch-sunxi/gpio.h | 6 ++-- drivers/gpio/sunxi_gpio.c | 64 +- 2 files changed, 60 insertions(+), 10

<    6   7   8   9   10   11   12   13   14   15   >