From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V2 3/8] ehci-hcd.c, musb_core, usb.h: Add USB_DMA_MINALIGN define for cache alignment
Date: Sun, 15 Jul 2012 16:59:56 +0200 [thread overview]
Message-ID: <201207151659.56796.marex@denx.de> (raw)
In-Reply-To: <1342363433-9284-4-git-send-email-ilya.yanok@cogentembedded.com>
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 */ volatile struct ehci_hcor *hcor;
>
> static uint16_t portreset;
> -static struct QH qh_list __attribute__((aligned(32)));
> +DEFINE_ALIGN_BUFFER(struct QH, qh_list, 1, USB_DMA_MINALIGN);
> +
> +#define ALIGN_END_ADDR(type, ptr, size) \
> + ((uint32_t)(ptr) + roundup((size) * sizeof(type), USB_DMA_MINALIGN))
>
> static struct descriptor {
> struct usb_hub_descriptor hub;
> @@ -207,8 +210,9 @@ static int
> ehci_submit_async(struct usb_device *dev, unsigned long pipe, void
> *buffer, int length, struct devrequest *req)
> {
> - static struct QH qh __attribute__((aligned(32)));
> - static struct qTD qtd[3] __attribute__((aligned (32)));
> + /* for some reason this doesn't work with non-static qh */
> + DEFINE_ALIGN_BUFFER(struct QH, qh, 1, USB_DMA_MINALIGN);
For some reason this doesn't work, but for obvious reason this is NAK. The rest
is OK, but this is not. Let's investigate.
> + ALLOC_ALIGN_BUFFER(struct qTD, qtd, 3, USB_DMA_MINALIGN);
> int qtd_counter = 0;
>
> volatile struct qTD *vtd;
[...]
I'll poke into this hopefully later today, but if you can try finding something
until then, that'd be great :)
next prev parent reply other threads:[~2012-07-15 14:59 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-15 14:43 [U-Boot] [PATCH V2 0/8] Fixes to EHCI cache handling & smsc95xx Ilya Yanok
2012-07-15 14:43 ` [U-Boot] [PATCH V2 1/8] ehci-omap: Do not call dcache_off from omap_ehci_hcd_init Ilya Yanok
2012-07-15 14:43 ` [U-Boot] [PATCH V2 2/8] common.h: Introduce DEFINE_CACHE_ALIGN_BUFFER Ilya Yanok
2012-07-15 14:43 ` [U-Boot] [PATCH V2 3/8] ehci-hcd.c, musb_core, usb.h: Add USB_DMA_MINALIGN define for cache alignment Ilya Yanok
2012-07-15 14:59 ` Marek Vasut [this message]
2012-07-15 15:51 ` Ilya Yanok
2012-07-15 17:12 ` Marek Vasut
2012-07-16 8:09 ` Ilya Yanok
2012-07-16 8:12 ` [U-Boot] [PATCH] ehci-hcd: program asynclistaddr before every transfer Ilya Yanok
2012-07-16 8:14 ` [U-Boot] [PATCH V2a 3/8] ehci-hcd.c, musb_core, usb.h: Add USB_DMA_MINALIGN define for cache alignment Ilya Yanok
2012-07-16 10:47 ` [U-Boot] [PATCH V2 " Marek Vasut
2012-07-17 17:58 ` Ilya Yanok
2012-07-18 12:52 ` Marek Vasut
2012-07-15 14:43 ` [U-Boot] [PATCH V2 4/8] ehci-hcd: fix external buffer cache handling Ilya Yanok
2012-07-16 0:29 ` Marek Vasut
2012-07-15 14:43 ` [U-Boot] [PATCH V2 5/8] usb: pass cache-aligned buffer to usb_get_descriptor() Ilya Yanok
2012-07-15 14:43 ` [U-Boot] [PATCH V2 6/8] usb: check return value of submit_{control, bulk}_msg Ilya Yanok
2012-07-15 14:43 ` [U-Boot] [PATCH V2 7/8] ehci-hcd: change debug() to printf() in case of errors Ilya Yanok
2012-07-15 14:43 ` [U-Boot] [PATCH V2 8/8] smsc95xx: align buffers to cache line size Ilya Yanok
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=201207151659.56796.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.