Thread (35 messages) 35 messages, 5 authors, 2012-03-12
STALE5189d

[PATCH 7/8] ARM: OMAP: Remove plat/io.h by moving it into mach/io.h

From: tony@atomide.com (Tony Lindgren)
Date: 2012-02-24 00:06:58
Also in: linux-omap

* Rob Herring [off-list ref] [120221 17:53]:
On 02/21/2012 05:40 PM, Tony Lindgren wrote:
quoted
This is needed so we can eventually remove mach/io.h
for omap2+.
...
quoted
-#include <plat/io.h>
+#ifndef __ASM_ARM_ARCH_IO_H
+#define __ASM_ARM_ARCH_IO_H
+
+#include <mach/hardware.h>
This shouldn't be needed.
Good catch, will update things for that.
 
quoted
+
+#define IO_SPACE_LIMIT 0xffffffff
+
+/*
+ * We don't actually have real ISA nor PCI buses, but there is so many
+ * drivers out there that might just work if we fake them...
+ */
+#define __io(a)		__typesafe_io(a)
+#define __mem_pci(a)	(a)
+
+/*
+ * ----------------------------------------------------------------------------
+ * I/O mapping
+ * ----------------------------------------------------------------------------
+ */
+
+#ifdef __ASSEMBLER__
+#define IOMEM(x)		(x)
+#else
+#define IOMEM(x)		((void __force __iomem *)(x))
+#endif
+
This can't be moved to iomap.h? I did that for other platforms.
Well I was thinking we should define these somewhere for everybody,
so I was trying to avoid adding yet another copy.. But I can move
it and then we can clean it up later to avoid more dependencies here.
 
quoted
+/*
+ * ----------------------------------------------------------------------------
+ * Omap specific register access
+ * ----------------------------------------------------------------------------
+ */
+
+#ifndef __ASSEMBLER__
+
+/*
+ * NOTE: Please use ioremap + __raw_read/write where possible instead of these
+ */
+
+extern u8 omap_readb(u32 pa);
+extern u16 omap_readw(u32 pa);
+extern u32 omap_readl(u32 pa);
+extern void omap_writeb(u8 v, u32 pa);
+extern void omap_writew(u16 v, u32 pa);
+extern void omap_writel(u32 v, u32 pa);
These can't be moved to common.h like omap2?
Not for omap1 currently because a bunch of legacy drivers are
using them :(

Anyways, that should be OK for now as omap1 requires v5 flags
and it currently does not make sense to try to compile into a
common zImage. At least the USB driver already needs to be
cleaned up for that, so eventually omap1 io.h can disappear
too.
 
Same comments on omap2 io.h.
Thanks, will post an updated patch.

Regards,

Tony
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help