linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Allow absence of mach/io.h
@ 2010-06-25  7:44 Eric Miao
  2010-06-25  7:44 ` [PATCH 1/4] [ARM] Remove useless __mem_isa() definitions Eric Miao
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Eric Miao @ 2010-06-25  7:44 UTC (permalink / raw)
  To: linux-arm-kernel

Introduce USE_DEFAULT_IO_H to allow default definitions of

  IO_SPACE_LIMIT
  __mem_pci()
  __io()

And most SoC can actually use these default definitions without the
need to have a specific mach/io.h. PXA and MMP are two examples in
the last patch, where the files are removed.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/4] [ARM] Remove useless __mem_isa() definitions
  2010-06-25  7:44 [PATCH 0/4] Allow absence of mach/io.h Eric Miao
@ 2010-06-25  7:44 ` Eric Miao
  2010-07-23  9:25   ` Eric Miao
  2010-06-25  7:44 ` [PATCH 2/4] [ARM] shmobile: change __io() definition to use __typesafe_io() Eric Miao
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Eric Miao @ 2010-06-25  7:44 UTC (permalink / raw)
  To: linux-arm-kernel

From: Eric Miao <eric.miao@canonical.com>

__mem_isa() is used nowhere, keeping it there will just add confusion.

Signed-off-by: Eric Miao <eric.miao@canonical.com>
---
 arch/arm/mach-davinci/include/mach/io.h  |    1 -
 arch/arm/mach-iop13xx/include/mach/io.h  |    1 -
 arch/arm/mach-ns9xxx/include/mach/io.h   |    1 -
 arch/arm/plat-stmp3xxx/include/mach/io.h |    1 -
 4 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-davinci/include/mach/io.h b/arch/arm/mach-davinci/include/mach/io.h
index 62b0a90..84b4b17 100644
--- a/arch/arm/mach-davinci/include/mach/io.h
+++ b/arch/arm/mach-davinci/include/mach/io.h
@@ -19,7 +19,6 @@
  */
 #define __io(a)			__typesafe_io(a)
 #define __mem_pci(a)		(a)
-#define __mem_isa(a)		(a)
 
 #ifndef __ASSEMBLER__
 #define __arch_ioremap(p, s, t)	davinci_ioremap(p, s, t)
diff --git a/arch/arm/mach-iop13xx/include/mach/io.h b/arch/arm/mach-iop13xx/include/mach/io.h
index a6e0f9e..ccf69ed 100644
--- a/arch/arm/mach-iop13xx/include/mach/io.h
+++ b/arch/arm/mach-iop13xx/include/mach/io.h
@@ -23,7 +23,6 @@
 
 #define __io(a) __iop13xx_io(a)
 #define __mem_pci(a) (a)
-#define __mem_isa(a) (a)
 
 extern void __iomem * __iop13xx_io(unsigned long io_addr);
 extern void __iomem *__iop13xx_ioremap(unsigned long cookie, size_t size,
diff --git a/arch/arm/mach-ns9xxx/include/mach/io.h b/arch/arm/mach-ns9xxx/include/mach/io.h
index f08451d..c261d7b 100644
--- a/arch/arm/mach-ns9xxx/include/mach/io.h
+++ b/arch/arm/mach-ns9xxx/include/mach/io.h
@@ -15,6 +15,5 @@
 
 #define __io(a)		__typesafe_io(a)
 #define __mem_pci(a)    (a)
-#define __mem_isa(a)    (IO_BASE + (a))
 
 #endif /* ifndef __ASM_ARCH_IO_H */
diff --git a/arch/arm/plat-stmp3xxx/include/mach/io.h b/arch/arm/plat-stmp3xxx/include/mach/io.h
index d08b1b7..7aef4d9 100644
--- a/arch/arm/plat-stmp3xxx/include/mach/io.h
+++ b/arch/arm/plat-stmp3xxx/include/mach/io.h
@@ -20,6 +20,5 @@
 
 #define __io(a) 	__typesafe_io(a)
 #define __mem_pci(a)	(a)
-#define __mem_isa(a)	(a)
 
 #endif
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/4] [ARM] shmobile: change __io() definition to use __typesafe_io()
  2010-06-25  7:44 [PATCH 0/4] Allow absence of mach/io.h Eric Miao
  2010-06-25  7:44 ` [PATCH 1/4] [ARM] Remove useless __mem_isa() definitions Eric Miao
@ 2010-06-25  7:44 ` Eric Miao
  2010-06-25  8:24   ` Magnus Damm
  2010-06-25  7:44 ` [PATCH 3/4] [ARM] Introduce USE_DEFAULT_IO_H to use default definitions in asm/io.h Eric Miao
  2010-06-25  7:44 ` [PATCH 4/4] [ARM] Make pxa and mmp to USE_DEFAULT_IO_H Eric Miao
  3 siblings, 1 reply; 9+ messages in thread
From: Eric Miao @ 2010-06-25  7:44 UTC (permalink / raw)
  To: linux-arm-kernel

From: Eric Miao <eric.miao@canonical.com>

Cc: Magnus Damm <magnus.damm@gmail.com>
Signed-off-by: Eric Miao <eric.miao@canonical.com>
---
 arch/arm/mach-shmobile/include/mach/io.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-shmobile/include/mach/io.h b/arch/arm/mach-shmobile/include/mach/io.h
index 7339fe4..df793df 100644
--- a/arch/arm/mach-shmobile/include/mach/io.h
+++ b/arch/arm/mach-shmobile/include/mach/io.h
@@ -3,7 +3,7 @@
 
 #define IO_SPACE_LIMIT		0xffffffff
 
-#define __io(a)			((void __iomem *)(a))
+#define __io(a)			__typesafe_io(a)
 #define __mem_pci(a)		(a)
 
 #endif /* __ASM_MACH_IO_H */
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/4] [ARM] Introduce USE_DEFAULT_IO_H to use default definitions in asm/io.h
  2010-06-25  7:44 [PATCH 0/4] Allow absence of mach/io.h Eric Miao
  2010-06-25  7:44 ` [PATCH 1/4] [ARM] Remove useless __mem_isa() definitions Eric Miao
  2010-06-25  7:44 ` [PATCH 2/4] [ARM] shmobile: change __io() definition to use __typesafe_io() Eric Miao
@ 2010-06-25  7:44 ` Eric Miao
  2010-06-25 18:30   ` Nicolas Pitre
  2010-06-25  7:44 ` [PATCH 4/4] [ARM] Make pxa and mmp to USE_DEFAULT_IO_H Eric Miao
  3 siblings, 1 reply; 9+ messages in thread
From: Eric Miao @ 2010-06-25  7:44 UTC (permalink / raw)
  To: linux-arm-kernel

From: Eric Miao <eric.miao@canonical.com>

For those machines that can just use the default definitions in asm/io.h,
there is no need to have a machine specific mach/io.h. Introduce an config
option for them.

Signed-off-by: Eric Miao <eric.miao@canonical.com>
---
 arch/arm/Kconfig          |    3 +++
 arch/arm/include/asm/io.h |    6 ++++++
 2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 1f254bd..46c00a1 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -189,6 +189,9 @@ config VECTORS_BASE
 	help
 	  The base address of exception vectors.
 
+config USE_DEFAULT_IO_H
+	def_bool n
+
 source "init/Kconfig"
 
 source "kernel/Kconfig.freezer"
diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
index c980156..179d317 100644
--- a/arch/arm/include/asm/io.h
+++ b/arch/arm/include/asm/io.h
@@ -97,7 +97,13 @@ static inline void __iomem *__typesafe_io(unsigned long addr)
 /*
  * Now, pick up the machine-defined IO definitions
  */
+#ifndef CONFIG_USE_DEFAULT_IO_H
 #include <mach/io.h>
+#else
+#define IO_SPACE_LIMIT	0xffffffff
+#define __io(a)		__typesafe_io(a)
+#define __mem_pci(a)	(a)
+#endif
 
 /*
  *  IO port access primitives
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 4/4] [ARM] Make pxa and mmp to USE_DEFAULT_IO_H
  2010-06-25  7:44 [PATCH 0/4] Allow absence of mach/io.h Eric Miao
                   ` (2 preceding siblings ...)
  2010-06-25  7:44 ` [PATCH 3/4] [ARM] Introduce USE_DEFAULT_IO_H to use default definitions in asm/io.h Eric Miao
@ 2010-06-25  7:44 ` Eric Miao
  3 siblings, 0 replies; 9+ messages in thread
From: Eric Miao @ 2010-06-25  7:44 UTC (permalink / raw)
  To: linux-arm-kernel

From: Eric Miao <eric.miao@canonical.com>

Signed-off-by: Eric Miao <eric.miao@canonical.com>
---
 arch/arm/Kconfig                    |    2 ++
 arch/arm/mach-mmp/include/mach/io.h |   21 ---------------------
 arch/arm/mach-pxa/include/mach/io.h |   18 ------------------
 3 files changed, 2 insertions(+), 39 deletions(-)
 delete mode 100644 arch/arm/mach-mmp/include/mach/io.h
 delete mode 100644 arch/arm/mach-pxa/include/mach/io.h

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 46c00a1..f2da68a 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -517,6 +517,7 @@ config ARCH_MMP
 	select GENERIC_CLOCKEVENTS
 	select TICK_ONESHOT
 	select PLAT_PXA
+	select USE_DEFAULT_IO_H
 	help
 	  Support for Marvell's PXA168/PXA910(MMP) and MMP2 processor line.
 
@@ -582,6 +583,7 @@ config ARCH_PXA
 	select GENERIC_CLOCKEVENTS
 	select TICK_ONESHOT
 	select PLAT_PXA
+	select USE_DEFAULT_IO_H
 	help
 	  Support for Intel/Marvell's PXA2xx/PXA3xx processor line.
 
diff --git a/arch/arm/mach-mmp/include/mach/io.h b/arch/arm/mach-mmp/include/mach/io.h
deleted file mode 100644
index e7adf3d..0000000
--- a/arch/arm/mach-mmp/include/mach/io.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * linux/arch/arm/mach-mmp/include/mach/io.h
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#ifndef __ASM_MACH_IO_H
-#define __ASM_MACH_IO_H
-
-#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)
-
-#endif /* __ASM_MACH_IO_H */
diff --git a/arch/arm/mach-pxa/include/mach/io.h b/arch/arm/mach-pxa/include/mach/io.h
deleted file mode 100644
index 262691f..0000000
--- a/arch/arm/mach-pxa/include/mach/io.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * arch/arm/mach-pxa/include/mach/io.h
- *
- * Copied from asm/arch/sa1100/io.h
- */
-#ifndef __ASM_ARM_ARCH_IO_H
-#define __ASM_ARM_ARCH_IO_H
-
-#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)
-
-#endif
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/4] [ARM] shmobile: change __io() definition to use __typesafe_io()
  2010-06-25  7:44 ` [PATCH 2/4] [ARM] shmobile: change __io() definition to use __typesafe_io() Eric Miao
@ 2010-06-25  8:24   ` Magnus Damm
  2010-06-25  8:29     ` Eric Miao
  0 siblings, 1 reply; 9+ messages in thread
From: Magnus Damm @ 2010-06-25  8:24 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jun 25, 2010 at 4:44 PM, Eric Miao <eric.y.miao@gmail.com> wrote:
> From: Eric Miao <eric.miao@canonical.com>
>
> Cc: Magnus Damm <magnus.damm@gmail.com>
> Signed-off-by: Eric Miao <eric.miao@canonical.com>
> ---

Acked-by: Magnus Damm <damm@opensource.se>

FYI, Paul Mundt handles the genesis-2.6 git tree, so you probably also
want to CC him and/or the linux-sh list.

Thank you!

/ magnus

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 2/4] [ARM] shmobile: change __io() definition to use __typesafe_io()
  2010-06-25  8:24   ` Magnus Damm
@ 2010-06-25  8:29     ` Eric Miao
  0 siblings, 0 replies; 9+ messages in thread
From: Eric Miao @ 2010-06-25  8:29 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jun 25, 2010 at 4:24 PM, Magnus Damm <magnus.damm@gmail.com> wrote:
> On Fri, Jun 25, 2010 at 4:44 PM, Eric Miao <eric.y.miao@gmail.com> wrote:
>> From: Eric Miao <eric.miao@canonical.com>
>>
>> Cc: Magnus Damm <magnus.damm@gmail.com>
>> Signed-off-by: Eric Miao <eric.miao@canonical.com>
>> ---
>
> Acked-by: Magnus Damm <damm@opensource.se>
>
> FYI, Paul Mundt handles the genesis-2.6 git tree, so you probably also
> want to CC him and/or the linux-sh list.
>

Cc'ed. Thanks.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 3/4] [ARM] Introduce USE_DEFAULT_IO_H to use default definitions in asm/io.h
  2010-06-25  7:44 ` [PATCH 3/4] [ARM] Introduce USE_DEFAULT_IO_H to use default definitions in asm/io.h Eric Miao
@ 2010-06-25 18:30   ` Nicolas Pitre
  0 siblings, 0 replies; 9+ messages in thread
From: Nicolas Pitre @ 2010-06-25 18:30 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, 25 Jun 2010, Eric Miao wrote:

> From: Eric Miao <eric.miao@canonical.com>
> 
> For those machines that can just use the default definitions in asm/io.h,
> there is no need to have a machine specific mach/io.h. Introduce an config
> option for them.

I like this approach.  This allows us to transition specific machines 
gradually, and provide a clear set of conditions for multiple machine 
families to be eventually compilable together.


Nicolas

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/4] [ARM] Remove useless __mem_isa() definitions
  2010-06-25  7:44 ` [PATCH 1/4] [ARM] Remove useless __mem_isa() definitions Eric Miao
@ 2010-07-23  9:25   ` Eric Miao
  0 siblings, 0 replies; 9+ messages in thread
From: Eric Miao @ 2010-07-23  9:25 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jun 25, 2010 at 9:44 AM, Eric Miao <eric.y.miao@gmail.com> wrote:
> From: Eric Miao <eric.miao@canonical.com>
>
> __mem_isa() is used nowhere, keeping it there will just add confusion.
>

Ping?

> Signed-off-by: Eric Miao <eric.miao@canonical.com>
> ---
> ?arch/arm/mach-davinci/include/mach/io.h ?| ? ?1 -
> ?arch/arm/mach-iop13xx/include/mach/io.h ?| ? ?1 -
> ?arch/arm/mach-ns9xxx/include/mach/io.h ? | ? ?1 -
> ?arch/arm/plat-stmp3xxx/include/mach/io.h | ? ?1 -
> ?4 files changed, 0 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/mach-davinci/include/mach/io.h b/arch/arm/mach-davinci/include/mach/io.h
> index 62b0a90..84b4b17 100644
> --- a/arch/arm/mach-davinci/include/mach/io.h
> +++ b/arch/arm/mach-davinci/include/mach/io.h
> @@ -19,7 +19,6 @@
> ?*/
> ?#define __io(a) ? ? ? ? ? ? ? ? ? ? ? ?__typesafe_io(a)
> ?#define __mem_pci(a) ? ? ? ? ? (a)
> -#define __mem_isa(a) ? ? ? ? ? (a)
>
> ?#ifndef __ASSEMBLER__
> ?#define __arch_ioremap(p, s, t) ? ? ? ?davinci_ioremap(p, s, t)
> diff --git a/arch/arm/mach-iop13xx/include/mach/io.h b/arch/arm/mach-iop13xx/include/mach/io.h
> index a6e0f9e..ccf69ed 100644
> --- a/arch/arm/mach-iop13xx/include/mach/io.h
> +++ b/arch/arm/mach-iop13xx/include/mach/io.h
> @@ -23,7 +23,6 @@
>
> ?#define __io(a) __iop13xx_io(a)
> ?#define __mem_pci(a) (a)
> -#define __mem_isa(a) (a)
>
> ?extern void __iomem * __iop13xx_io(unsigned long io_addr);
> ?extern void __iomem *__iop13xx_ioremap(unsigned long cookie, size_t size,
> diff --git a/arch/arm/mach-ns9xxx/include/mach/io.h b/arch/arm/mach-ns9xxx/include/mach/io.h
> index f08451d..c261d7b 100644
> --- a/arch/arm/mach-ns9xxx/include/mach/io.h
> +++ b/arch/arm/mach-ns9xxx/include/mach/io.h
> @@ -15,6 +15,5 @@
>
> ?#define __io(a) ? ? ? ? ? ? ? ?__typesafe_io(a)
> ?#define __mem_pci(a) ? ?(a)
> -#define __mem_isa(a) ? ?(IO_BASE + (a))
>
> ?#endif /* ifndef __ASM_ARCH_IO_H */
> diff --git a/arch/arm/plat-stmp3xxx/include/mach/io.h b/arch/arm/plat-stmp3xxx/include/mach/io.h
> index d08b1b7..7aef4d9 100644
> --- a/arch/arm/plat-stmp3xxx/include/mach/io.h
> +++ b/arch/arm/plat-stmp3xxx/include/mach/io.h
> @@ -20,6 +20,5 @@
>
> ?#define __io(a) ? ? ? ?__typesafe_io(a)
> ?#define __mem_pci(a) ? (a)
> -#define __mem_isa(a) ? (a)
>
> ?#endif
> --
> 1.7.1
>
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-07-23  9:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-25  7:44 [PATCH 0/4] Allow absence of mach/io.h Eric Miao
2010-06-25  7:44 ` [PATCH 1/4] [ARM] Remove useless __mem_isa() definitions Eric Miao
2010-07-23  9:25   ` Eric Miao
2010-06-25  7:44 ` [PATCH 2/4] [ARM] shmobile: change __io() definition to use __typesafe_io() Eric Miao
2010-06-25  8:24   ` Magnus Damm
2010-06-25  8:29     ` Eric Miao
2010-06-25  7:44 ` [PATCH 3/4] [ARM] Introduce USE_DEFAULT_IO_H to use default definitions in asm/io.h Eric Miao
2010-06-25 18:30   ` Nicolas Pitre
2010-06-25  7:44 ` [PATCH 4/4] [ARM] Make pxa and mmp to USE_DEFAULT_IO_H Eric Miao

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).