public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Igor Grinberg <grinberg@compulab.co.il>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3] USB: Remove __attribute__ ((packed)) for struct	ehci_hccr and ehci_hcor
Date: Thu, 21 Apr 2011 09:29:43 +0300	[thread overview]
Message-ID: <4DAFCED7.9010207@compulab.co.il> (raw)
In-Reply-To: <1303343572-19972-28-git-send-email-jkridner@beagleboard.org>

On 04/21/11 02:52, Jason Kridner wrote:

> Remove __attribute__ ((packed)) to prevent byte access to soc
> registers in some gcc versions.
>
> Having patches to enable ehci for the BeagleBoard lying around for
> several month, this one was the show-stopper.
>
> Credits have to go to Laine Walker-Avina <lwalkera@ieee.org> for
> finding the problem.
>
> Signed-off-by: Jason Kridner <jkridner@beagleboard.org>
> Cc: Alexander Holler <holler@ahsoftware.de>
> Cc: Sandeep Paulraj <s-paulraj@ti.com>
> ---
> Changes for v2:
> * Original and v2 were provided by Alexander Holler.
> * v1 was http://patchwork.ozlabs.org/patch/89358/
> * v2 was http://patchwork.ozlabs.org/patch/89362/
>
> Changes for v3:
> * Switched to align(4), rather than remove the attribute, per suggestion
>   from Alexander.

Also fixing the commit message would help
as the change log won't be available after the patch applied.

> ---
>  drivers/usb/host/ehci.h |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
> index 945ab64..3d0ad0c 100644
> --- a/drivers/usb/host/ehci.h
> +++ b/drivers/usb/host/ehci.h
> @@ -55,7 +55,7 @@ struct ehci_hccr {
>  #define HCS_N_PORTS(p)		(((p) >> 0) & 0xf)
>  	uint32_t cr_hccparams;
>  	uint8_t cr_hcsp_portrt[8];
> -} __attribute__ ((packed));
> +} __attribute__ ((packed, aligned(4)));
>  
>  struct ehci_hcor {
>  	uint32_t or_usbcmd;
> @@ -85,7 +85,7 @@ struct ehci_hcor {
>  #define FLAG_CF		(1 << 0)	/* true:  we'll support "high speed" */
>  	uint32_t or_portsc[CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS];
>  	uint32_t or_systune;
> -} __attribute__ ((packed));
> +} __attribute__ ((packed, aligned(4)));
>  
>  #define USBMODE		0x68		/* USB Device mode */
>  #define USBMODE_SDIS	(1 << 3)	/* Stream disable */

-- 
Regards,
Igor.

  parent reply	other threads:[~2011-04-21  6:29 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-20 23:52 [U-Boot] [PATCH] BeagleBoard updates rebased on u-boot-ti and debugged Jason Kridner
2011-04-20 23:52 ` [U-Boot] [PATCH] BeagleBoard: add xM rev C to ID table Jason Kridner
2011-04-20 23:52   ` [U-Boot] [PATCH] BeagleBoard: fixed typo in typecast Jason Kridner
2011-04-20 23:52     ` [U-Boot] [PATCH] Corrected LED name match finding Jason Kridner
2011-04-20 23:52       ` [U-Boot] [PATCH] BeagleBoard: fix LED 0/1 in driver Jason Kridner
2011-04-20 23:52         ` [U-Boot] [PATCH] led: added cmd_led to Makefile Jason Kridner
2011-04-20 23:52           ` [U-Boot] [PATCH] led: correct off/on locations in structure Jason Kridner
2011-04-20 23:52             ` [U-Boot] [PATCH] led: remove trailing whitespace Jason Kridner
2011-04-20 23:52               ` [U-Boot] [PATCH] led: loop through all leds Jason Kridner
2011-04-20 23:52                 ` [U-Boot] [PATCH] led: fixup help/usage Jason Kridner
2011-04-20 23:52                   ` [U-Boot] [PATCH] BeagleBoard: Pin mux initialization glitch fix Jason Kridner
2011-04-20 23:52                     ` [U-Boot] [PATCH] BeagleBoard: config: Switch default console from ttyS2 to ttyO2 Jason Kridner
2011-04-20 23:52                       ` [U-Boot] [PATCH] BeagleBoard: config: Remove omapfb.debug=y from Beagle and Overo env settings Jason Kridner
2011-04-20 23:52                         ` [U-Boot] [PATCH] BeagleBoard: config: reduce BOOTDELAY to 3 Jason Kridner
2011-04-20 23:52                           ` [U-Boot] [PATCH] BeagleBoard: config: change default resolution to VGA Jason Kridner
2011-04-20 23:52                             ` [U-Boot] [PATCH] BeagleBoard: config: don't suck in blank line Jason Kridner
2011-04-20 23:52                               ` [U-Boot] [PATCH] BeagleBoard: config: make mtest run Jason Kridner
2011-04-20 23:52                                 ` [U-Boot] [PATCH] BeagleBoard: config: increase command-line functionality Jason Kridner
2011-04-20 23:52                                   ` [U-Boot] [PATCH] BeagleBoard: config: load kernel via MMC ext2 Jason Kridner
2011-04-20 23:52                                     ` [U-Boot] [PATCH] BeagleBoard: config: add optargs/buddy/camera Jason Kridner
2011-04-20 23:52                                       ` [U-Boot] [PATCH] BeagleBoard: config: add ramboot Jason Kridner
2011-04-20 23:52                                         ` [U-Boot] [PATCH v2] BeagleBoard: Added userbutton command Jason Kridner
2011-04-20 23:52                                           ` [U-Boot] [PATCH] BeagleBoard: config: use the USERBUTTON command Jason Kridner
2011-04-20 23:52                                             ` [U-Boot] [PATCH] video: DSS makefile update Jason Kridner
2011-04-20 23:52                                               ` [U-Boot] [PATCH v3] OMAP3: Add DSS driver for OMAP3 Jason Kridner
2011-04-20 23:52                                                 ` [U-Boot] [PATCH] BeagleBoard: config: enable DSS Jason Kridner
2011-04-20 23:52                                                   ` [U-Boot] [PATCH] BeagleBoard: Configure DVI/S-video Jason Kridner
2011-04-20 23:52                                                     ` [U-Boot] [PATCH v3] USB: Remove __attribute__ ((packed)) for struct ehci_hccr and ehci_hcor Jason Kridner
2011-04-20 23:52                                                       ` [U-Boot] [PATCH] TWL4030/BeagleBoard: Added hub power enable Jason Kridner
2011-04-21  6:29                                                       ` Igor Grinberg [this message]
2011-04-21  6:26                                                     ` [U-Boot] [PATCH] BeagleBoard: Configure DVI/S-video Igor Grinberg
2011-07-04 21:58                                                 ` [U-Boot] [PATCH v3] OMAP3: Add DSS driver for OMAP3 Anatolij Gustschin
2011-08-04 20:54                                                 ` Wolfgang Denk
2011-08-04 21:14                                                   ` Jason Kridner
2011-08-04 21:02                                                 ` Wolfgang Denk
2011-07-04 21:51                                               ` [U-Boot] [PATCH] video: update Makefile to include OMAP3 DSS driver Anatolij Gustschin
2011-07-04 22:40                                                 ` Anatolij Gustschin
2011-04-21  5:58             ` [U-Boot] [PATCH] led: correct off/on locations in structure Igor Grinberg
2011-04-30  5:46     ` [U-Boot] [beagleboard] [PATCH] BeagleBoard: fixed typo in typecast Dirk Behme

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=4DAFCED7.9010207@compulab.co.il \
    --to=grinberg@compulab.co.il \
    --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