From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Fri, 7 Nov 2014 09:26:32 +0100 Subject: [U-Boot] [PATCH v2 1/3] usb:ehci-mx6 add board_ehci_usb_mode function In-Reply-To: <545C1C04.7090108@freescale.com> References: <1415087402-26007-1-git-send-email-Peng.Fan@freescale.com> <201411062120.22547.marex@denx.de> <545C1C04.7090108@freescale.com> Message-ID: <201411070926.32964.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Friday, November 07, 2014 at 02:10:28 AM, Peng Fan wrote: [...] > >> In board/freescale/mx6sxsabresd/mx6sxsabresd.c: > >> 295 int board_usb_phy_mode(int port) > >> 296 { > >> 297 void __iomem *phy_reg; > >> 298 void __iomem *phy_ctrl; > >> 299 u32 val; > >> 300 > >> 301 switch (port) { > >> 302 case 0: > >> 303 phy_reg = (void __iomem *)USB_PHY0_BASE_ADDR; > >> 304 phy_ctrl = (void __iomem *)(phy_reg + USBPHY_CTRL); > >> 305 val = __raw_readl(phy_ctrl); > >> 306 return val & USBPHY_CTRL_OTG_ID; > >> 307 case 1: > >> 308 /* Work in HOST mode. */ > >> 309 return 0; > >> 310 } > >> 311 > >> 312 /* suppress warning msg */ > >> 313 return 0; > >> 314 } > >> > >> Is this piece of code fine? > > > > These ad-hoc hooks are starting to become absolute horror, but I guess > > this one (if properly documented) might just work. Let's see what will > > come out of this approach. > > Sent out v3 patch set just now. Please review. Done, there're only minor comments. Thanks! Best regards, Marek Vasut