mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 4/9] usb: imx-usb-phy: Drop unnecessary read/modify/write
Date: Thu, 29 Sep 2016 14:38:55 +0200	[thread overview]
Message-ID: <20160929123900.24853-4-s.hauer@pengutronix.de> (raw)
In-Reply-To: <20160929123900.24853-1-s.hauer@pengutronix.de>

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@pengutronix.de>
---
 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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2016-09-29 12:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-29 12:38 [PATCH 1/9] usb: Use standard debug macro Sascha Hauer
2016-09-29 12:38 ` [PATCH 2/9] usb: Add usb phy to usb host Sascha Hauer
2016-09-29 12:38 ` [PATCH 3/9] usb: ehci: forward phy given in registration data to host Sascha Hauer
2016-09-29 12:38 ` Sascha Hauer [this message]
2016-09-29 12:38 ` [PATCH 5/9] phy: Introduce of_phy_get_by_phandle Sascha Hauer
2016-09-29 12:38 ` [PATCH 6/9] phy: Introduce to_usbphy conversion function Sascha Hauer
2016-09-29 12:38 ` [PATCH 7/9] phy: Add usb-nop-xceiv support Sascha Hauer
2016-09-29 12:38 ` [PATCH 8/9] usb: imx-us-phy: Convert driver to generic phy support Sascha Hauer
2016-09-29 12:39 ` [PATCH 9/9] usb: imx-us-phy: implement notify_(dis)concect Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160929123900.24853-4-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox