mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Antony Pavlov <antonynpavlov@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH v2] usb: ehci: use linux-way ehci_readl and ehci_writel
Date: Mon, 28 Jul 2014 07:35:20 +0200	[thread overview]
Message-ID: <20140728053520.GS23235@pengutronix.de> (raw)
In-Reply-To: <1406217337-17082-1-git-send-email-antonynpavlov@gmail.com>

On Thu, Jul 24, 2014 at 07:55:37PM +0400, Antony Pavlov wrote:
> Also drop nowhere defined CONFIG_EHCI_DESC_BIG_ENDIAN.
> 
> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>

Applied, thanks

Sascha

> ---
>  drivers/usb/host/ehci.h | 19 +++++++++++--------
>  1 file changed, 11 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
> index 8cc477a..d71d056 100644
> --- a/drivers/usb/host/ehci.h
> +++ b/drivers/usb/host/ehci.h
> @@ -18,6 +18,8 @@
>  #ifndef USB_EHCI_H
>  #define USB_EHCI_H
>  
> +#include <io.h>
> +
>  #if !defined(CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS)
>  #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS	16
>  #endif
> @@ -68,14 +70,15 @@ struct ehci_hcor {
>  #define USBMODE_CM_HC	(3 << 0)	/* host controller mode */
>  #define USBMODE_CM_IDLE	(0 << 0)	/* idle state */
>  
> -#if defined CONFIG_EHCI_DESC_BIG_ENDIAN
> -#define	ehci_readl(x)		(*((volatile u32 *)(x)))
> -#define ehci_writel(a, b)	(*((volatile u32 *)(a)) = ((volatile u32)b))
> -#else
> -#define ehci_readl(x)		cpu_to_le32((*((volatile u32 *)(x))))
> -#define ehci_writel(a, b)	(*((volatile u32 *)(a)) = \
> -					cpu_to_le32(((volatile u32)b)))
> -#endif
> +static inline void ehci_writel(__u32 __iomem *regs, const unsigned int val)
> +{
> +	writel(val, regs);
> +}
> +
> +static inline unsigned int ehci_readl(__u32 __iomem *regs)
> +{
> +	return readl(regs);
> +}
>  
>  #if defined CONFIG_EHCI_MMIO_BIG_ENDIAN
>  #define hc32_to_cpu(x)		be32_to_cpu((x))
> -- 
> 2.0.1
> 
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

      reply	other threads:[~2014-07-28  5:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-24 15:55 Antony Pavlov
2014-07-28  5:35 ` Sascha Hauer [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=20140728053520.GS23235@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=antonynpavlov@gmail.com \
    --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