Re: [PATCH] ARM: mx35: add WEIM register addresses

From: Sascha Hauer
Date: Thu Jun 07 2012 - 15:24:39 EST


On Thu, Jun 07, 2012 at 08:17:29PM +0200, Christoph Fritz wrote:
> On Thu, 2012-06-07 at 20:07 +0200, Sascha Hauer wrote:
>
> > The same could be used on i.MX25 aswell. I think we should clean this
> > up before adding more SoCs.
>
> :) full ack. What would you suggest? A macro?

Something like the following should do. We still could do better, but at
least we have all pieces together.

imx-weim.h:

#define IMX_WEIM_CSU_BITS ...

static inline void imx_weim_cs(void __iomem *base, int cs, u32 csu, u32 csl, u32 csa)
{
do_it
}

static inline void mx27_weim_cs(int cs, u32 csu, u32 csl, u32 csa)
{
imx_weim_cs(MX27_IO_ADDRESS(MX27_WEIM_BASE), cs, csu, csl, csa));
}


--
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 |
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/