From mboxrd@z Thu Jan 1 00:00:00 1970 From: Amit Virdi Date: Wed, 7 Mar 2012 13:53:42 +0530 Subject: [U-Boot] [PATCH] USB:host: Attribute packed removed from usb structures In-Reply-To: <201203061111.14475.vapier@gentoo.org> References: <1330084720-16878-1-git-send-email-amit.virdi@st.com> <4F4DFD0C.4010707@st.com> <4F55FDBE.2000904@st.com> <201203061111.14475.vapier@gentoo.org> Message-ID: <4F571B0E.7080604@st.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Mike, >> >> I did the changes suggested by you and tested the build. The issue >> didn't come up. Then I reverted the code to the original (attributes >> retained and ehci directly de-referencing the pointers. The issue didn't >> come here too. >> >> Today, I used armv7-linux-gcc (GCC) v4.6.2 >> So I suspect there has been some fix done in the GCC. >> >> Now, even with the packed attributes, the word fields are accessed >> word-by-word in contrast to the earlier observed behavior >> (byte-by-byte). I could see ldr and str in the disassembly. >> >> May be, we can discard this patch and keep drivers/usb/host/ehci.h intact. > > not sure ... in general, device registers should be accessed with io.h helpers > instead of dereferenced by volatile pointers. i can think of cases on Blackfin > where the io.h helpers would be required, and even using volatile pointers > could result in misbehavior. If you guys agree, I can float the patch but how can we distribute the responsibility for testing on other architectures? Thanks Amit Virdi