Re: [U-Boot] i.MX dcache issues

2012-07-15 Thread Dirk Behme
On 15.07.2012 16:45, Benoît Thébaudeau wrote: On 15/07/2012 15:45, Stefano Babic wrote: On 14/07/2012 23:28, Benoît Thébaudeau wrote: Hi all, Hi, Has anyone tested i.MX25 or i.MX35 with dcache on? I'm working with U-Boot 2012.04.01 on several custom platforms using these processors. With

Re: [U-Boot] [PATCH] tools: add kwboot binary to .gitignore file

2012-07-15 Thread Prafulla Wadaskar
> -Original Message- > From: Luka Perkov [mailto:ub...@lukaperkov.net] > Sent: 15 July 2012 22:00 > To: u-boot@lists.denx.de > Cc: Prafulla Wadaskar > Subject: [PATCH] tools: add kwboot binary to .gitignore file > > > Signed-off-by: Luka Perkov > --- > > tools/.gitignore |1 + >

Re: [U-Boot] [PATCH] nds32: split common cache access from cpu into lib

2012-07-15 Thread Macpaul Lin
Hi Marek, 2012/7/15 Marek Vasut : > Dear Macpaul Lin, > >> This commit does the following updates. >> 1. Split the common cache access from cpu.c into lib folder. >> 2. Rename the following cache api to adapt common.h >> - dcache_flush_rang -> flush_dcache_rang >> - icache_inval_range -> invalid

Re: [U-Boot] [PATCH V2 4/8] ehci-hcd: fix external buffer cache handling

2012-07-15 Thread Marek Vasut
Dear Ilya Yanok, > Buffer coming from upper layers should be cacheline aligned/padded > to perform safe cache operations. For now we don't do bounce > buffering so getting unaligned buffer is an upper layer error. > We can't check if the buffer is properly padded with current > interface so just a

Re: [U-Boot] [PATCH V2 3/8] ehci-hcd.c, musb_core, usb.h: Add USB_DMA_MINALIGN define for cache alignment

2012-07-15 Thread Marek Vasut
Dear Ilya Yanok, > Dear Marek, > > On Sun, Jul 15, 2012 at 6:59 PM, Marek Vasut wrote: > > > index 04300be..59039f4 100644 > > > --- a/drivers/usb/host/ehci-hcd.c > > > +++ b/drivers/usb/host/ehci-hcd.c > > > @@ -34,7 +34,10 @@ struct ehci_hccr *hccr;/* R/O registers, not > > > need > > > >

Re: [U-Boot] [PATCH v2 1/2] bcm: Add GPIO driver

2012-07-15 Thread Stephen Warren
On 07/11/2012 02:37 PM, Vikram Narayanan wrote: > Driver for BCM2835 SoC. This gives the basic functionality of > setting/clearing the output. > diff --git a/arch/arm/include/asm/arch-bcm2835/gpio.h > b/arch/arm/include/asm/arch-bcm2835/gpio.h > +#define BCM2835_GPIO_BASE0x7E20 > +#defin

[U-Boot] [PATCH] tools: add kwboot binary to .gitignore file

2012-07-15 Thread Luka Perkov
Signed-off-by: Luka Perkov --- tools/.gitignore |1 + 1 file changed, 1 insertion(+) diff --git a/tools/.gitignore b/tools/.gitignore index e4d2c2f..a8bd819 100644 --- a/tools/.gitignore +++ b/tools/.gitignore @@ -2,6 +2,7 @@ /envcrc /gen_eth_addr /img2srec +/kwboot /mkenvimage /mkima

Re: [U-Boot] [PATCH V2 3/8] ehci-hcd.c, musb_core, usb.h: Add USB_DMA_MINALIGN define for cache alignment

2012-07-15 Thread Ilya Yanok
Dear Marek, On Sun, Jul 15, 2012 at 6:59 PM, Marek Vasut wrote: > > index 04300be..59039f4 100644 > > --- a/drivers/usb/host/ehci-hcd.c > > +++ b/drivers/usb/host/ehci-hcd.c > > @@ -34,7 +34,10 @@ struct ehci_hccr *hccr;/* R/O registers, not need > for > > volatile */ volatile struct ehci_hc

Re: [U-Boot] [PATCH V2 3/8] ehci-hcd.c, musb_core, usb.h: Add USB_DMA_MINALIGN define for cache alignment

2012-07-15 Thread Marek Vasut
Dear Ilya Yanok, [...] > diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c > index 04300be..59039f4 100644 > --- a/drivers/usb/host/ehci-hcd.c > +++ b/drivers/usb/host/ehci-hcd.c > @@ -34,7 +34,10 @@ struct ehci_hccr *hccr;/* R/O registers, not need for > volatile */ vola

Re: [U-Boot] [PATCH v2] usb_storage: fix ehci driver max transfer size

2012-07-15 Thread Ilya Yanok
Dear Marek, On Sun, Jul 15, 2012 at 1:51 PM, Marek Vasut wrote: > > Thanks! I'm marking this important in my mailbox to avoid missing that we > need > to fix this. Ilya, can you check the driver model papers and see if we can > somehow integrate this into that? > > I will try to. Regards, Ilya.

[U-Boot] [PATCH V2 8/8] smsc95xx: align buffers to cache line size

2012-07-15 Thread Ilya Yanok
Align buffers passed to the USB code to cache line size so they can be DMAed safely. Signed-off-by: Ilya Yanok --- drivers/usb/eth/smsc95xx.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/usb/eth/smsc95xx.c b/drivers/usb/eth/smsc95xx.c index c7aebea.

[U-Boot] [PATCH V2 7/8] ehci-hcd: change debug() to printf() in case of errors

2012-07-15 Thread Ilya Yanok
Printing message could be useful if something goes really wrong. Signed-off-by: Ilya Yanok --- drivers/usb/host/ehci-hcd.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index a6cd5e3..52df7fa 100644 --- a/dr

[U-Boot] [PATCH V2 6/8] usb: check return value of submit_{control, bulk}_msg

2012-07-15 Thread Ilya Yanok
Return values of submit_{control,bulk}_msg() functions should be checked to detect possible error. Signed-off-by: Ilya Yanok --- common/usb.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/usb.c b/common/usb.c index 46f4741..1b40228 100644 --- a/common/usb.c

[U-Boot] [PATCH V2 5/8] usb: pass cache-aligned buffer to usb_get_descriptor()

2012-07-15 Thread Ilya Yanok
usb_get_descriptor passes it's buffer argument directly to usb_control_msg() so it has to be properly aligned/padded. Signed-off-by: Ilya Yanok --- common/usb.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/usb.c b/common/usb.c index c80155c..46f4741 100644

[U-Boot] [PATCH V2 4/8] ehci-hcd: fix external buffer cache handling

2012-07-15 Thread Ilya Yanok
Buffer coming from upper layers should be cacheline aligned/padded to perform safe cache operations. For now we don't do bounce buffering so getting unaligned buffer is an upper layer error. We can't check if the buffer is properly padded with current interface so just assume it is (consider changi

[U-Boot] [PATCH V2 2/8] common.h: Introduce DEFINE_CACHE_ALIGN_BUFFER

2012-07-15 Thread Ilya Yanok
From: Marek Vasut This is the out-of-function-scope counterpart of ALLOC_CACHE_ALIGN_BUFFER. Signed-off-by: Marek Vasut Cc: Tom Rini [ilya.yanok]: added missing include and {DEFINE,ALLOC}_ALIGN_BUFFER macros allowing explicit alignment specification. Signed-off-by: Ilya Yanok --- Changes fro

[U-Boot] [PATCH V2 3/8] ehci-hcd.c, musb_core, usb.h: Add USB_DMA_MINALIGN define for cache alignment

2012-07-15 Thread Ilya Yanok
From: Tom Rini The USB spec says that 32 bytes is the minimum required alignment. However on some platforms we have a larger minimum requirement for cache coherency. In those cases, use that value rather than the USB spec minimum. We add a cpp check to to define USB_DMA_MINALIGN and make use o

[U-Boot] [PATCH V2 1/8] ehci-omap: Do not call dcache_off from omap_ehci_hcd_init

2012-07-15 Thread Ilya Yanok
From: Tom Rini This has never been completely sufficient and now happens too late to paper over the cache coherency problems with the current USB stack. Cc: Marek Vasut Signed-off-by: Tom Rini Signed-off-by: Ilya Yanok --- No changes from initial Tom's version. drivers/usb/host/ehci-omap.c

[U-Boot] [PATCH V2 0/8] Fixes to EHCI cache handling & smsc95xx

2012-07-15 Thread Ilya Yanok
This is my second version of long-dicussed series initially posted by Tom, then by me and then by Marek ;) This inlcudes proper alignment handling inside EHCI HCD driver, a little bit more careful error handling and cacheline alignment fix for smsc95xx USB Ethernet driver. I noticed no problems w

Re: [U-Boot] i.MX dcache issues

2012-07-15 Thread Benoît Thébaudeau
On 15/07/2012 15:45, Stefano Babic wrote: > On 14/07/2012 23:28, Benoît Thébaudeau wrote: > > Hi all, > > > > Hi, > > > Has anyone tested i.MX25 or i.MX35 with dcache on? > > > > I'm working with U-Boot 2012.04.01 on several custom platforms > > using these > > processors. > > > > With dcache

Re: [U-Boot] i.MX dcache issues

2012-07-15 Thread Benoît Thébaudeau
On Sun, Jul 15, 2012 at 08:56:35AM +0200, Dirk Behme wrote: > On 15.07.2012 00:08, Benoît Thébaudeau wrote: > > On Sat, Jul 14, 2012 at 11:28:03PM +0200, Benoît Thébaudeau wrote: > >> Shouldn't the MMC/eSDHC drivers flush/invalidate the dcache ranges > >> that they use > >> for DMA operations? Not

Re: [U-Boot] i.MX dcache issues

2012-07-15 Thread Stefano Babic
On 15/07/2012 00:08, Benoît Thébaudeau wrote: > On Sat, Jul 14, 2012 at 11:28:03PM +0200, Benoît Thébaudeau wrote: >> Shouldn't the MMC/eSDHC drivers flush/invalidate the dcache ranges >> that they use >> for DMA operations? Not doing so would explain why stack-allocated >> buffers are >> more affe

Re: [U-Boot] i.MX dcache issues

2012-07-15 Thread Stefano Babic
On 14/07/2012 23:28, Benoît Thébaudeau wrote: > Hi all, > Hi, > Has anyone tested i.MX25 or i.MX35 with dcache on? > > I'm working with U-Boot 2012.04.01 on several custom platforms using these > processors. > > With dcache off, everything works fine, but slowly. > > With dcache on, it's much

[U-Boot] DaVinci PHYs

2012-07-15 Thread Marek Vasut
Hi guys, is there any hope the ad-hoc implementation of davinci emac PHYs will ever be flipped to phylib ? Thanks! 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] fsl: board EEPROM has the CRC in the wrong location

2012-07-15 Thread Tabi Timur-B04825
Or Yoram-R56270 wrote: > 1. Correct the v1 documentation to specify 23 MAC addresses and placing the > CRC at 0xCC. > 2. Create a new code and documentation for v2, specifying 31 MAC addresses > and placing the CRC at 0xFC. Both of these are unnecessary. My patch fixes the code to match the spe

Re: [U-Boot] [PATCH v2] usb_storage: fix ehci driver max transfer size

2012-07-15 Thread Marek Vasut
Dear Ilya Yanok, > Dear Marek, > > On Sun, Jul 15, 2012 at 12:14 PM, Marek Vasut wrote: > > > The patch is good in the sense it does fix the real problem. But I > > > wonder if it's a good idea to expose lower layer details (like > > > size/number of buffers per EHCI TD) to upper layer driver? I

Re: [U-Boot] [PATCH v2] usb_storage: fix ehci driver max transfer size

2012-07-15 Thread Marek Vasut
Dear Wolfgang Denk, > The commit 5dd95cf93dfffa1d19a1928990852aac9f55b9d9 'usb_storage: > Fix EHCI "out of buffer pointers" with CD-ROM' introduce a bug in > usb_storage as it wrongly assumes that every transfer can use > 4096 bytes per qt_buffer. This is wrong if the start address of > the data i

Re: [U-Boot] [PATCH 2/2] ehci-hcd.c, musb_core, usb.h: Add USB_DMA_MINALIGN define for cache alignment

2012-07-15 Thread Marek Vasut
Dear Ilya Yanok, > Dear Marek, > > On Sun, Jul 15, 2012 at 12:07 PM, Marek Vasut wrote: > > > > @@ -207,8 +210,8 @@ static int > > > > > > > > ehci_submit_async(struct usb_device *dev, unsigned long pipe, void > > > > > > > > *buffer, > > > > > > > >int length, struct dev

Re: [U-Boot] [PATCH 2/2] ehci-hcd.c, musb_core, usb.h: Add USB_DMA_MINALIGN define for cache alignment

2012-07-15 Thread Ilya Yanok
Dear Marek, On Sun, Jul 15, 2012 at 12:07 PM, Marek Vasut wrote: > > > @@ -207,8 +210,8 @@ static int > > > > > > ehci_submit_async(struct usb_device *dev, unsigned long pipe, void > > > > > > *buffer, > > > > > >int length, struct devrequest *req) > > > > > > { > > > > > >

Re: [U-Boot] [PATCH v2] usb_storage: fix ehci driver max transfer size

2012-07-15 Thread Ilya Yanok
Dear Marek, On Sun, Jul 15, 2012 at 12:14 PM, Marek Vasut wrote: > > The patch is good in the sense it does fix the real problem. But I wonder > > if it's a good idea to expose lower layer details (like size/number of > > buffers per EHCI TD) to upper layer driver? I know EHCI is most common > U

Re: [U-Boot] [PATCH v2] usb_storage: fix ehci driver max transfer size

2012-07-15 Thread Marek Vasut
Dear Ilya Yanok, > Hi, > > The patch is good in the sense it does fix the real problem. But I wonder > if it's a good idea to expose lower layer details (like size/number of > buffers per EHCI TD) to upper layer driver? I know EHCI is most common USB > HCD but we have drivers for a bunch of other

Re: [U-Boot] [PATCH] nds32: split common cache access from cpu into lib

2012-07-15 Thread Marek Vasut
Dear Macpaul Lin, > This commit does the following updates. > 1. Split the common cache access from cpu.c into lib folder. > 2. Rename the following cache api to adapt common.h > - dcache_flush_rang -> flush_dcache_rang > - icache_inval_range -> invalidate_icache_range > 3. Add invalidate_dcache

Re: [U-Boot] [PATCH 2/2] ehci-hcd.c, musb_core, usb.h: Add USB_DMA_MINALIGN define for cache alignment

2012-07-15 Thread Marek Vasut
Dear Ilya Yanok, > Hi, > > On Sun, Jul 8, 2012 at 7:08 AM, Marek Vasut wrote: > > @@ -207,8 +210,8 @@ static int > > > > ehci_submit_async(struct usb_device *dev, unsigned long pipe, void > > > > *buffer, > > > >int length, struct devrequest *req) > > > > { > > > > -