Linux-mtd Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mtd: orion_nand: remove <mach/hardware.h> include
       [not found] ` <1346110528-30858-1-git-send-email-thomas.petazzoni@free-electrons.com>
@ 2012-08-27 23:35   ` Thomas Petazzoni
  2012-08-28  9:11     ` Andrew Lunn
                       ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2012-08-27 23:35 UTC (permalink / raw)
  To: Jason Cooper, Andrew Lunn, Gregory Clement
  Cc: Lior Amsalem, Ike Pan, Albert Stone, Nadav Haklai, linux-mtd,
	Ian Molton, Yehuda Yitschak, Jani Monoses, Tawfik Bayouk,
	Dan Frazier, Eran Ben-Avi, Li Li, Leif Lindholm,
	Sebastian Hesselbarth, Arnd Bergmann, Jon Masters, Ben Dooks,
	linux-arm-kernel, Thomas Petazzoni, Chris Van Hoof, Nicolas Pitre,
	Artem Bityutskiy, Maen Suleiman, Shadi Ammouri, Olof Johansson,
	Eric Miao, David Woodhouse

Commit c085d965fb63ac3b4cc7379d45588c0b39e2bdb0 made the ARCH_MVEBU
platform select PLAT_ORION, which means that now all Orion drivers can
be enabled on ARCH_MVEBU. This works fine for most drivers, except for
orion_nand, because it includes <mach/hardware.h>, but mach-mvebu does
not have a mach/hardware.h header (it is considered as a deprecated
practice).

It turns out that the <mach/hardware.h> include in orion_nand is not
necessary: the driver builds perfectly fine without it, so we simply
get rid of it.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: linux-mtd@lists.infradead.org
Cc: Artem Bityutskiy <dedekind1@gmail.com>
---
 drivers/mtd/nand/orion_nand.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/mtd/nand/orion_nand.c b/drivers/mtd/nand/orion_nand.c
index fc5a868..9ee436d 100644
--- a/drivers/mtd/nand/orion_nand.c
+++ b/drivers/mtd/nand/orion_nand.c
@@ -21,7 +21,6 @@
 #include <linux/err.h>
 #include <asm/io.h>
 #include <asm/sizes.h>
-#include <mach/hardware.h>
 #include <plat/orion_nand.h>
 
 static void orion_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
-- 
1.7.9.5

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

* Re: [PATCH] mtd: orion_nand: remove <mach/hardware.h> include
  2012-08-27 23:35   ` [PATCH] mtd: orion_nand: remove <mach/hardware.h> include Thomas Petazzoni
@ 2012-08-28  9:11     ` Andrew Lunn
  2012-08-28  9:31       ` Sebastian Hesselbarth
  2012-08-28 12:22       ` Thomas Petazzoni
  2012-08-28 18:12     ` Jason Cooper
  2012-08-29 15:46     ` Artem Bityutskiy
  2 siblings, 2 replies; 6+ messages in thread
From: Andrew Lunn @ 2012-08-28  9:11 UTC (permalink / raw)
  To: Thomas Petazzoni
  Cc: Lior Amsalem, Andrew Lunn, Ike Pan, Albert Stone, Nadav Haklai,
	linux-mtd, Ian Molton, Yehuda Yitschak, Jani Monoses,
	Tawfik Bayouk, Dan Frazier, Eran Ben-Avi, Li Li, Leif Lindholm,
	Sebastian Hesselbarth, Jason Cooper, Arnd Bergmann, Jon Masters,
	Ben Dooks, Gregory Clement, linux-arm-kernel, Chris Van Hoof,
	Nicolas Pitre, Artem Bityutskiy, Maen Suleiman, Shadi Ammouri,
	Olof Johansson, Eric Miao, David Woodhouse

On Tue, Aug 28, 2012 at 01:35:28AM +0200, Thomas Petazzoni wrote:
> Commit c085d965fb63ac3b4cc7379d45588c0b39e2bdb0 made the ARCH_MVEBU
> platform select PLAT_ORION, which means that now all Orion drivers can
> be enabled on ARCH_MVEBU. This works fine for most drivers, except for
> orion_nand, because it includes <mach/hardware.h>, but mach-mvebu does
> not have a mach/hardware.h header (it is considered as a deprecated
> practice).
> 
> It turns out that the <mach/hardware.h> include in orion_nand is not
> necessary: the driver builds perfectly fine without it, so we simply
> get rid of it.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Cc: David Woodhouse <dwmw2@infradead.org>
> Cc: linux-mtd@lists.infradead.org
> Cc: Artem Bityutskiy <dedekind1@gmail.com>
> ---
>  drivers/mtd/nand/orion_nand.c |    1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/mtd/nand/orion_nand.c b/drivers/mtd/nand/orion_nand.c
> index fc5a868..9ee436d 100644
> --- a/drivers/mtd/nand/orion_nand.c
> +++ b/drivers/mtd/nand/orion_nand.c
> @@ -21,7 +21,6 @@
>  #include <linux/err.h>
>  #include <asm/io.h>
>  #include <asm/sizes.h>
> -#include <mach/hardware.h>
>  #include <plat/orion_nand.h>
>  
>  static void orion_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
> -- 
> 1.7.9.5
> 

Hi Thomas

I compiled tested on Dove, Kirkwood, Orion5x and mv78xx0.

Tested-by: Andrew Lunn <andrew@lunn.ch>

One other driver you might want to look at is:

drivers/watchdog/orion_wdt.c

It uses <mach/bridge-regs.h>

   Andrew

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

* Re: [PATCH] mtd: orion_nand: remove <mach/hardware.h> include
  2012-08-28  9:11     ` Andrew Lunn
@ 2012-08-28  9:31       ` Sebastian Hesselbarth
  2012-08-28 12:22       ` Thomas Petazzoni
  1 sibling, 0 replies; 6+ messages in thread
From: Sebastian Hesselbarth @ 2012-08-28  9:31 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Lior Amsalem, Ike Pan, Albert Stone, Nadav Haklai, linux-mtd,
	Ian Molton, Yehuda Yitschak, Jani Monoses, Tawfik Bayouk,
	Dan Frazier, Eran Ben-Avi, Li Li, Leif Lindholm, Jason Cooper,
	Arnd Bergmann, Jon Masters, Ben Dooks, Gregory Clement,
	linux-arm-kernel, Thomas Petazzoni, Chris Van Hoof, Nicolas Pitre,
	Artem Bityutskiy, Maen Suleiman, Shadi Ammouri, Olof Johansson,
	Eric Miao, David Woodhouse

On 8/28/12, Andrew Lunn <andrew@lunn.ch> wrote:
> One other driver you might want to look at is:
>
> drivers/watchdog/orion_wdt.c
> It uses <mach/bridge-regs.h>

Andrew, Thomas,

both current watchdog and timer are using the bridge-regs to clear the
interrupt cause. On orion the cause register is located in bridge-regs.
>From the work on timer together with Gregory, I expect Armada 370/XP
to have the watchdog cause bit also within timer registers.

Sebastian

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

* Re: [PATCH] mtd: orion_nand: remove <mach/hardware.h> include
  2012-08-28  9:11     ` Andrew Lunn
  2012-08-28  9:31       ` Sebastian Hesselbarth
@ 2012-08-28 12:22       ` Thomas Petazzoni
  1 sibling, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2012-08-28 12:22 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Lior Amsalem, Ike Pan, Albert Stone, Nadav Haklai, linux-mtd,
	Ian Molton, Yehuda Yitschak, Jani Monoses, Tawfik Bayouk,
	Dan Frazier, Eran Ben-Avi, Li Li, Leif Lindholm,
	Sebastian Hesselbarth, Jason Cooper, Arnd Bergmann, Jon Masters,
	Ben Dooks, Gregory Clement, linux-arm-kernel, Chris Van Hoof,
	Nicolas Pitre, Artem Bityutskiy, Maen Suleiman, Shadi Ammouri,
	Olof Johansson, Eric Miao, David Woodhouse

Le Tue, 28 Aug 2012 11:11:39 +0200,
Andrew Lunn <andrew@lunn.ch> a écrit :

> I compiled tested on Dove, Kirkwood, Orion5x and mv78xx0.
> 
> Tested-by: Andrew Lunn <andrew@lunn.ch>

Thanks! Will Jason take care of merging this on top of the previous
address decoding patches? Note that if you want to keep build
bisectability, it should be merged before my "arm: plat-orion: introduce
PLAT_ORION_LEGACY hidden config option" patch.

> One other driver you might want to look at is:
> 
> drivers/watchdog/orion_wdt.c
> 
> It uses <mach/bridge-regs.h>

This driver is:

config ORION_WATCHDOG
        tristate "Orion watchdog"
        depends on ARCH_ORION5X || ARCH_KIRKWOOD

so it isn't selectable with ARCH_MVEBU, so it will not cause problems
for now. Of course, at some point, we'll have a look at the watchdog
driver but for now, it's fine.

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* Re: [PATCH] mtd: orion_nand: remove <mach/hardware.h> include
  2012-08-27 23:35   ` [PATCH] mtd: orion_nand: remove <mach/hardware.h> include Thomas Petazzoni
  2012-08-28  9:11     ` Andrew Lunn
@ 2012-08-28 18:12     ` Jason Cooper
  2012-08-29 15:46     ` Artem Bityutskiy
  2 siblings, 0 replies; 6+ messages in thread
From: Jason Cooper @ 2012-08-28 18:12 UTC (permalink / raw)
  To: Thomas Petazzoni
  Cc: Lior Amsalem, Andrew Lunn, Ike Pan, Albert Stone, Nadav Haklai,
	linux-mtd, Ian Molton, Yehuda Yitschak, Jani Monoses,
	Tawfik Bayouk, Dan Frazier, Eran Ben-Avi, Li Li, Leif Lindholm,
	Sebastian Hesselbarth, Arnd Bergmann, Jon Masters, Ben Dooks,
	Gregory Clement, linux-arm-kernel, Chris Van Hoof, Nicolas Pitre,
	Artem Bityutskiy, Maen Suleiman, Shadi Ammouri, Olof Johansson,
	Eric Miao, David Woodhouse

On Tue, Aug 28, 2012 at 01:35:28AM +0200, Thomas Petazzoni wrote:
> Commit c085d965fb63ac3b4cc7379d45588c0b39e2bdb0 made the ARCH_MVEBU
> platform select PLAT_ORION, which means that now all Orion drivers can
> be enabled on ARCH_MVEBU. This works fine for most drivers, except for
> orion_nand, because it includes <mach/hardware.h>, but mach-mvebu does
> not have a mach/hardware.h header (it is considered as a deprecated
> practice).
> 
> It turns out that the <mach/hardware.h> include in orion_nand is not
> necessary: the driver builds perfectly fine without it, so we simply
> get rid of it.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Cc: David Woodhouse <dwmw2@infradead.org>
> Cc: linux-mtd@lists.infradead.org
> Cc: Artem Bityutskiy <dedekind1@gmail.com>

Applied to:

git://git.infradead.org/users/jcooper/linux.git boards-for-v3.7-v2

thx,

Jason.

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

* Re: [PATCH] mtd: orion_nand: remove <mach/hardware.h> include
  2012-08-27 23:35   ` [PATCH] mtd: orion_nand: remove <mach/hardware.h> include Thomas Petazzoni
  2012-08-28  9:11     ` Andrew Lunn
  2012-08-28 18:12     ` Jason Cooper
@ 2012-08-29 15:46     ` Artem Bityutskiy
  2 siblings, 0 replies; 6+ messages in thread
From: Artem Bityutskiy @ 2012-08-29 15:46 UTC (permalink / raw)
  To: Thomas Petazzoni
  Cc: Lior Amsalem, Andrew Lunn, Ike Pan, Albert Stone, Nadav Haklai,
	linux-mtd, Ian Molton, Yehuda Yitschak, Jani Monoses,
	Tawfik Bayouk, Dan Frazier, Eran Ben-Avi, Li Li, Leif Lindholm,
	Sebastian Hesselbarth, Jason Cooper, Arnd Bergmann, Jon Masters,
	Ben Dooks, Gregory Clement, linux-arm-kernel, Chris Van Hoof,
	Nicolas Pitre, Maen Suleiman, Shadi Ammouri, Olof Johansson,
	Eric Miao, David Woodhouse

[-- Attachment #1: Type: text/plain, Size: 754 bytes --]

On Tue, 2012-08-28 at 01:35 +0200, Thomas Petazzoni wrote:
> Commit c085d965fb63ac3b4cc7379d45588c0b39e2bdb0 made the ARCH_MVEBU
> platform select PLAT_ORION, which means that now all Orion drivers can
> be enabled on ARCH_MVEBU. This works fine for most drivers, except for
> orion_nand, because it includes <mach/hardware.h>, but mach-mvebu does
> not have a mach/hardware.h header (it is considered as a deprecated
> practice).
> 
> It turns out that the <mach/hardware.h> include in orion_nand is not
> necessary: the driver builds perfectly fine without it, so we simply
> get rid of it.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Pushed to l2-mtd.git, thanks!

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2012-08-29 15:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20120816183708.GT22226@titan.lakedaemon.net>
     [not found] ` <1346110528-30858-1-git-send-email-thomas.petazzoni@free-electrons.com>
2012-08-27 23:35   ` [PATCH] mtd: orion_nand: remove <mach/hardware.h> include Thomas Petazzoni
2012-08-28  9:11     ` Andrew Lunn
2012-08-28  9:31       ` Sebastian Hesselbarth
2012-08-28 12:22       ` Thomas Petazzoni
2012-08-28 18:12     ` Jason Cooper
2012-08-29 15:46     ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox