Hi All,

I encountered a problem something like

struct xyz {
        int     x;
        int     y;
        int     z[CONST];
} __attribute__ ((packed));

struct xyz *abc;
u32 * status_reg = (u32 *)&abc->z[0];

writel(status, status_reg);

This writel results in writing byte by byte on the address pointed to by 
status_reg.
This problem is visible with both gcc version 4.4.1 as well as 4.5.0

Incidently, the same code works well with 4.2.4

The problem is visible in the usb host driver which uses the packed structures 
for 
accessing  device registers.

Regards
Vipin
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to