From mboxrd@z Thu Jan 1 00:00:00 1970 From: Troy Kisky Date: Fri, 02 Aug 2013 16:41:25 -0700 Subject: [U-Boot] [PATCH V3 01/20] Add functions for use with i.mx6 otg udc In-Reply-To: <201308030010.41510.marex@denx.de> References: <1375399657-25642-1-git-send-email-troy.kisky@boundarydevices.com> <201308021248.52104.marex@denx.de> <51FC0C2D.3070008@boundarydevices.com> <201308030010.41510.marex@denx.de> Message-ID: <51FC43A5.4010002@boundarydevices.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 8/2/2013 3:10 PM, Marek Vasut wrote: > Dear Troy Kisky, > >> On 8/2/2013 3:48 AM, Marek Vasut wrote: >>> Dear Troy Kisky, >>> >>>> Add functions for use with mx6 soc >>>> void otg_enable(void); >>>> void reset_usb_phy1(void); >>>> >>>> Signed-off-by: Troy Kisky >>>> --- >>>> >>>> arch/arm/cpu/armv7/mx6/soc.c | 47 >>>> >>>> +++++++++++++++++++++++++++++++ arch/arm/include/asm/arch-mx6/crm_regs.h >>>> >>>> | 3 ++ >>>> >>>> arch/arm/include/asm/arch-mx6/imx-regs.h | 17 +++++++++++ >>>> arch/arm/include/asm/arch-mx6/sys_proto.h | 4 +++ >>>> 4 files changed, 71 insertions(+) >>> [...] >>> >>>> diff --git a/arch/arm/include/asm/arch-mx6/imx-regs.h >>>> b/arch/arm/include/asm/arch-mx6/imx-regs.h index 5d6bccb..3eed4d8 100644 >>>> --- a/arch/arm/include/asm/arch-mx6/imx-regs.h >>>> +++ b/arch/arm/include/asm/arch-mx6/imx-regs.h >>>> @@ -419,6 +419,23 @@ struct cspi_regs { >>>> >>>> ECSPI5_BASE_ADDR >>>> >>>> #endif >>>> >>>> +struct set_clr_tog { >>>> + u32 val; >>>> + u32 set; >>>> + u32 clr; >>>> + u32 tog; >>>> +}; >>>> + >>>> +struct usbphy { >>>> + struct set_clr_tog pwd; >>>> + struct set_clr_tog tx; >>>> + struct set_clr_tog rx; >>>> + struct set_clr_tog ctrl; >>>> +}; >>> Maybe you want to keep the naming here consistent with MX28 and MX6? >>> >>> See arch/arm/include/asm/imx-common/regs-common.h >>> >>> [...] >>> >>> Best regards, >>> Marek Vasut >> Wow, arch/arm/include/asm/imx-common/regs-common.h >> is damn ugly. I personally hate unions even when there is a very good >> reason. >> >> Would you like to see me attempt to clean it up or do you like it the >> way it is >> since your commit started the unions ? > I think it works perfectly well and does exactly what it's supposed to do. > What's your problem with the file? > > Best regards, > Marek Vasut > Why is there a union ? It looks to me like you just want to access the same variable with 2 naming strategies. Troy