public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] usb: ci_udc: fix interaction with CONFIG_USB_ETH_CDC
Date: Mon, 30 Jun 2014 23:50:34 +0200	[thread overview]
Message-ID: <201406302350.34366.marex@denx.de> (raw)
In-Reply-To: <53B1D9FC.6090501@posteo.de>

On Monday, June 30, 2014 at 11:43:24 PM, J?rg Krause wrote:
> On 06/30/2014 11:15 PM, Marek Vasut wrote:
> > On Monday, June 30, 2014 at 10:55:37 PM, J?rg Krause wrote:
> > [...]
> > 
> >>>>> 2) You applied "allow multiple buffer allocs per ep"
> >>>> 
> >>>> Setting #define CONFIG_SYS_CACHELINE_SIZE 32 to my config file helped
> >>>> here. But still timeouts. First run almost always runs fine, only
> >>>> sometimes timeouts while receiving a packet, but always running to the
> >>>> end. Running tftp after this a second time and more fails with a
> >>>> ERROR: The remote end did not respond in time. at
> >>>> drivers/usb/gadget/ether.c:2388/usb_eth_init(), but sometimes it
> >>>> works.
> >>>> 
> >>>> Setting CONFIG_SYS_CACHELINE_SIZE 32 does not make it better (as I
> >>>> previously wrote it).
> >> 
> >> Sorry, this is a typo. It should be CONFIG_SYS_CACHELINE_SIZE 16 (not
> >> 32).
> > 
> > MX28 has 32b-long cachelines. Setting this to 16 is nonsense.
> > [...]
> 
> Yes it is. But if I do not set cacheline size to 32 in my config header
> file it will be 64, as I stated in a previous mail.
> 
>     I checked this and I found that ARCH_DMA_MINALIGN is set to 64,
>     which is not true for Freescale i.MX28. This processor has an
>     ARM926EJ-S, which has an cache line size of 32. In
>     arch/arm/include/asm/cache.h the macro ARCH_DMA_MINALIGN is defined
>     as followed:
>     #ifdef CONFIG_SYS_CACHELINE_SIZE
>     #define ARCH_DMA_MINALIGN    CONFIG_SYS_CACHELINE_SIZE
>     #else
>     #define ARCH_DMA_MINALIGN    64
>     #endif
> 
>     And in /arch/arm/cpu/arm926ejs/cache.c as followed:
>     #ifndef CONFIG_SYS_CACHELINE_SIZE
>     #define CONFIG_SYS_CACHELINE_SIZE    32
>     #endif
> 
>     arch/arm/include/asm/cache.h does not see the definition of
>     CONFIG_SYS_CACHELINE_SIZE in /arch/arm/cpu/arm926ejs/cache.c, so
>     it's a bad place to put it in there.
> 
> 
> I was just curious of the impact on the behaviour of the USB ethernet
> gadget driver.

Well okay, cacheline length and DMA alignment needs are two different things. 
Larger than necessary ARCH_DMA_MINALIGN cannot hurt, though there should be a 
patch adding CONFIG_SYS_CACHELINE_SIZE 32 for MXS into include/configs/mxs.h it 
seems.

Best regards,
Marek Vasut

  reply	other threads:[~2014-06-30 21:50 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-23 18:02 [U-Boot] [PATCH] usb: ci_udc: fix interaction with CONFIG_USB_ETH_CDC Stephen Warren
2014-06-23 19:03 ` Eric Nelson
2014-06-25 13:51 ` Marek Vasut
2014-06-25 16:06   ` Stephen Warren
2014-06-27 21:37     ` Jörg Krause
2014-06-27 21:52       ` Jörg Krause
2014-06-27 21:56         ` Stephen Warren
2014-06-27 23:27           ` Jörg Krause
2014-06-27 21:55       ` Stephen Warren
2014-06-27 23:16         ` Jörg Krause
2014-06-27 23:37           ` Stephen Warren
2014-06-28  0:09             ` Jörg Krause
2014-06-28  1:34             ` Jörg Krause
2014-06-28 20:37               ` Jörg Krause
2014-06-28 20:45                 ` Marek Vasut
2014-06-28 20:53                   ` Jörg Krause
2014-06-29 20:33                     ` Jörg Krause
2014-06-30  9:37                       ` Marek Vasut
2014-06-30 13:34                         ` Jörg Krause
2014-06-30 16:02               ` Stephen Warren
2014-06-30 19:55                 ` Stephen Warren
2014-06-30 22:44                   ` Jörg Krause
2014-06-30 22:51                     ` Stephen Warren
2014-06-30 23:17                       ` Jörg Krause
2014-06-30 23:56                         ` Marek Vasut
2014-06-30 20:55                 ` Jörg Krause
2014-06-30 21:15                   ` Marek Vasut
2014-06-30 21:43                     ` Jörg Krause
2014-06-30 21:50                       ` Marek Vasut [this message]
2014-06-25 20:20 ` Marek Vasut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201406302350.34366.marex@denx.de \
    --to=marex@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox