[PATCH 4/9] usb: imx-usb-phy: Drop unnecessary read/modify/write

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When writing to the USBPHY_CTRL register read/modify/write is unncessary
since we are writing to the associated bit set register anyway.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 drivers/usb/imx/imx-usb-phy.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/imx/imx-usb-phy.c b/drivers/usb/imx/imx-usb-phy.c
index 1aa12be..eec195d 100644
--- a/drivers/usb/imx/imx-usb-phy.c
+++ b/drivers/usb/imx/imx-usb-phy.c
@@ -39,8 +39,6 @@ struct imx_usbphy {
 
 static int imx_usbphy_enable(struct imx_usbphy *imxphy)
 {
-	u32 val;
-
 	clk_enable(imxphy->clk);
 
 	/* reset usbphy */
@@ -56,9 +54,8 @@ static int imx_usbphy_enable(struct imx_usbphy *imxphy)
 	writel(0xffffffff, imxphy->base + CLR);
 
 	/* set utmilvl2/3 */
-	val = readl(imxphy->base + USBPHY_CTRL);
-	val |= USBPHY_CTRL_ENUTMILEVEL3 | USBPHY_CTRL_ENUTMILEVEL2;
-	writel(val, imxphy->base + USBPHY_CTRL + SET);
+	writel(USBPHY_CTRL_ENUTMILEVEL3 | USBPHY_CTRL_ENUTMILEVEL2,
+	       imxphy->base + USBPHY_CTRL + SET);
 
 	return 0;
 }
-- 
2.9.3


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux