From: sergei.shtylyov@cogentembedded.com (Sergei Shtylyov)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] usb: ehci-orion: add more constants for register values
Date: Thu, 19 Mar 2015 16:42:13 +0300 [thread overview]
Message-ID: <550AD235.4020305@cogentembedded.com> (raw)
In-Reply-To: <1426761136-4118-1-git-send-email-thomas.petazzoni@free-electrons.com>
Hello.
On 3/19/2015 1:32 PM, Thomas Petazzoni wrote:
> This commit adds new register values for the USB_CMD and USB_MODE
> registers, which allows to avoid the usage of a number of magic values
> in orion_usb_phy_v1_setup().
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
> drivers/usb/host/ehci-orion.c | 18 ++++++++++++------
> 1 file changed, 12 insertions(+), 6 deletions(-)
> diff --git a/drivers/usb/host/ehci-orion.c b/drivers/usb/host/ehci-orion.c
> index f6eafec..0feca8a 100644
> --- a/drivers/usb/host/ehci-orion.c
> +++ b/drivers/usb/host/ehci-orion.c
> @@ -29,7 +29,13 @@
> #define wrl(off, val) writel_relaxed((val), hcd->regs + (off))
>
> #define USB_CMD 0x140
> +#define USB_CMD_RUN BIT(0)
> +#define USB_CMD_RESET BIT(1)
Please use tabs to align the values, not spaces.
> #define USB_MODE 0x1a8
> +#define USB_MODE_MASK GENMASK(1, 0)
> +#define USB_MODE_DEVICE 0x2
> +#define USB_MODE_HOST 0x3
> +#define USB_MODE_SDIS BIT(4)
Here too.
> #define USB_CAUSE 0x310
> #define USB_MASK 0x314
> #define USB_WINDOW_CTRL(i) (0x320 + ((i) << 4))
[...]
WBR, Sergei
prev parent reply other threads:[~2015-03-19 13:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-19 10:32 [PATCH] usb: ehci-orion: add more constants for register values Thomas Petazzoni
2015-03-19 13:42 ` Sergei Shtylyov [this message]
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=550AD235.4020305@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=linux-arm-kernel@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;
as well as URLs for NNTP newsgroup(s).