linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Haojian Zhuang <haojian.zhuang@gmail.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linaro-kernel@lists.linaro.org
Subject: Re: [PATCH 4/4] [RFC] ARM: treewide: manually change more mach-*/*.h includes
Date: Tue, 28 Aug 2012 06:16:35 +0800	[thread overview]
Message-ID: <CAN1soZw4scDo7mgcBKrk_kdMt7aP_ty+hRGX=iMDjkfSbO6k8A@mail.gmail.com> (raw)
In-Reply-To: <201208221301.19439.arnd@arndb.de>

On Wed, Aug 22, 2012 at 9:01 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> These are lots of device drivers that include machine
> specific header files from ARM platforms and that are
> not easily scriptable. The changes have been found through
> manual inspection and should cause no visible changes
> because of the build script that maps the old names to the
> new ones.
>
Here's the potential issues.

arch/arm/include/asm/irq.h:
#ifndef CONFIG_SPARSE_IRQ
#include <mach/irqs.h>
#else
#define NR_IRQS NR_IRQS_LEGACY
#endif

arch/arm/include/asm/io.h:
#ifdef CONFIG_NEED_MACH_IO_H
#include <mach/io.h>
#else
#define __io(a)         __typesafe_io((a) & IO_SPACE_LIMIT)
#endif


And you also need the code in below.

diff --git a/drivers/gpio/gpio-sa1100.c b/drivers/gpio/gpio-sa1100.c
index 8ea3b33..0258c06 100644
--- a/drivers/gpio/gpio-sa1100.c
+++ b/drivers/gpio/gpio-sa1100.c
@@ -11,8 +11,8 @@
 #include <linux/init.h>
 #include <linux/module.h>

-#include <mach/hardware.h>
-#include <mach/irqs.h>
+#include <mach-sa1100/hardware.h>
+#include <mach-sa1100/irqs.h>

 static int sa1100_gpio_get(struct gpio_chip *chip, unsigned offset)
 {
diff --git a/drivers/input/keyboard/pxa27x_keypad.c
b/drivers/input/keyboard/pxa27x_keypad.c
index b2e642a..d4b1e80 100644
--- a/drivers/input/keyboard/pxa27x_keypad.c
+++ b/drivers/input/keyboard/pxa27x_keypad.c
@@ -31,7 +31,14 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>

-#include <mach/hardware.h>
+#ifdef CONFIG_ARCH_PXA
+#include <mach-pxa/hardware.h>
+#endif
+
+#ifdef CONFIG_ARCH_MMP
+#include <mach-mmp/hardware.h>
+#endif
+
 #include <plat-pxa/pxa27x_keypad.h>
 /*
  * Keypad Controller registers
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c
index d6683b7..f83d5ce 100644
--- a/drivers/mtd/nand/pxa3xx_nand.c
+++ b/drivers/mtd/nand/pxa3xx_nand.c
@@ -23,7 +23,7 @@
 #include <linux/irq.h>
 #include <linux/slab.h>

-#include <mach/dma.h>
+#include <mach-pxa/dma.h>
 #include <plat-pxa/pxa3xx_nand.h>

 #define	CHIP_DELAY_TIMEOUT	(2 * HZ/10)
diff --git a/drivers/pcmcia/pxa2xx_sharpsl.c b/drivers/pcmcia/pxa2xx_sharpsl.c
index b066273..77264ba 100644
--- a/drivers/pcmcia/pxa2xx_sharpsl.c
+++ b/drivers/pcmcia/pxa2xx_sharpsl.c
@@ -19,9 +19,9 @@
 #include <linux/platform_device.h>

 #include <asm/mach-types.h>
-#include <mach/hardware.h>
 #include <asm/irq.h>
 #include <asm/hardware/scoop.h>
+#include <mach-pxa/hardware.h>

 #include "soc_common.h"

diff --git a/drivers/pcmcia/sa1111_generic.c b/drivers/pcmcia/sa1111_generic.c
index 70f728c..ebfd5eb 100644
--- a/drivers/pcmcia/sa1111_generic.c
+++ b/drivers/pcmcia/sa1111_generic.c
@@ -16,7 +16,7 @@

 #include <pcmcia/ss.h>

-#include <mach/hardware.h>
+#include <mach-sa1100/hardware.h>
 #include <asm/hardware/sa1111.h>
 #include <asm/irq.h>

diff --git a/drivers/rtc/rtc-sa1100.c b/drivers/rtc/rtc-sa1100.c
index 50a5c4a..812f39c 100644
--- a/drivers/rtc/rtc-sa1100.c
+++ b/drivers/rtc/rtc-sa1100.c
@@ -35,11 +35,21 @@
 #include <linux/bitops.h>
 #include <linux/io.h>

-#include <mach/hardware.h>
-#include <mach/irqs.h>
+#ifdef CONFIG_ARCH_MMP
+#include <mach-mmp/hardware.h>
+#include <mach-mmp/irqs.h>
+#include <mach-mmp/regs-rtc.h>
+#endif
+
+#ifdef CONFIG_ARCH_PXA
+#include <mach-pxa/hardware.h>
+#include <mach-pxa/irqs.h>
+#include <mach-pxa/regs-rtc.h>
+#endif

-#if defined(CONFIG_ARCH_PXA) || defined(CONFIG_ARCH_MMP)
-#include <mach/regs-rtc.h>
+#ifdef CONFIG_ARCH_SA1100
+#include <mach-sa1100/hardware.h>
+#include <mach-sa1100/irqs.h>
 #endif

 #define RTC_DEF_DIVIDER		(32768 - 1)
diff --git a/drivers/watchdog/sa1100_wdt.c b/drivers/watchdog/sa1100_wdt.c
index ccd6b29..3579d90 100644
--- a/drivers/watchdog/sa1100_wdt.c
+++ b/drivers/watchdog/sa1100_wdt.c
@@ -34,11 +34,15 @@
 #include <linux/timex.h>

 #ifdef CONFIG_ARCH_PXA
-#include <mach/regs-ost.h>
+#include <mach-pxa/regs-ost.h>
+#include <mach-pxa/reset.h>
+#include <mach-pxa/hardware.h>
 #endif

-#include <mach/reset.h>
-#include <mach/hardware.h>
+#ifdef CONFIG_ARCH_SA1100
+#include <mach-sa1100/reset.h>
+#include <mach-sa1100/hardware.h>
+#endif

 static unsigned long oscr_freq;
 static unsigned long sa1100wdt_users;

  parent reply	other threads:[~2012-08-27 22:16 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-22 12:53 [PATCH 0/4] [RFC] ARM: multiplatform: rename all mach headers Arnd Bergmann
2012-08-22 12:54 ` [PATCH 1/4] [RFC] ARM: autogenerate mach-foo/* and plat-foo/* header redirects Arnd Bergmann
2012-08-22 15:24   ` Nicolas Pitre
2012-08-24 13:44   ` Rob Herring
2012-08-22 12:56 ` [PATCH 2/4] [RFC] ARM: mass move of mach-*/plat-* header files Arnd Bergmann
2012-08-22 15:28   ` Nicolas Pitre
2012-08-22 15:37     ` Arnd Bergmann
2012-08-22 13:00 ` [PATCH 3/4] [RFC] ARM: multiplatform: rename all mach headers Arnd Bergmann
2012-08-22 15:31   ` Nicolas Pitre
2012-08-22 13:01 ` [PATCH 4/4] [RFC] ARM: treewide: manually change more mach-*/*.h includes Arnd Bergmann
2012-08-22 15:33   ` Nicolas Pitre
2012-08-22 21:43   ` Russell King - ARM Linux
2012-08-23 11:35     ` Arnd Bergmann
2012-08-23 12:37       ` Nicolas Ferre
2012-08-23 13:31         ` Arnd Bergmann
2012-08-23 17:26       ` Arnd Bergmann
2012-08-24 20:36         ` Tony Lindgren
2012-08-30 19:04           ` Tony Lindgren
2012-09-05  0:36             ` Tony Lindgren
2012-08-24 20:47         ` Russell King - ARM Linux
2012-08-24 20:52       ` Russell King - ARM Linux
2012-08-27 22:16   ` Haojian Zhuang [this message]
2012-08-22 15:23 ` [PATCH 0/4] [RFC] ARM: multiplatform: rename all mach headers Nicolas Pitre
2012-08-22 15:31   ` Arnd Bergmann
2012-08-22 19:44 ` Stephen Warren
2012-08-22 20:04   ` Arnd Bergmann
2012-08-24 13:19 ` Shawn Guo
2012-08-24 13:55 ` Rob Herring

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='CAN1soZw4scDo7mgcBKrk_kdMt7aP_ty+hRGX=iMDjkfSbO6k8A@mail.gmail.com' \
    --to=haojian.zhuang@gmail.com \
    --cc=arnd@arndb.de \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.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).