public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Driver/IFC: Move Freescale IFC driver to a common driver
@ 2014-01-13  5:24 Prabhakar Kushwaha
  2014-01-13 13:32 ` Arnd Bergmann
  0 siblings, 1 reply; 8+ messages in thread
From: Prabhakar Kushwaha @ 2014-01-13  5:24 UTC (permalink / raw)
  To: arnd, gregkh; +Cc: linux-kernel, scottwood, Prabhakar Kushwaha

Freescale IFC controller has been used for mpc8xxx. It will be used
for ARM-based SoC as well. This patch moves the driver to driver/misc
and fix the header file includes.

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
---
 arch/powerpc/sysdev/Makefile                       |    1 -
 drivers/misc/Makefile                              |    1 +
 {arch/powerpc/sysdev => drivers/misc}/fsl_ifc.c    |    2 +-
 drivers/mtd/nand/fsl_ifc_nand.c                    |    2 +-
 .../include/asm => include/linux}/fsl_ifc.h        |    0
 5 files changed, 3 insertions(+), 3 deletions(-)
 rename {arch/powerpc/sysdev => drivers/misc}/fsl_ifc.c (99%)
 rename {arch/powerpc/include/asm => include/linux}/fsl_ifc.h (100%)

diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile
index f67ac90..afbcc37 100644
--- a/arch/powerpc/sysdev/Makefile
+++ b/arch/powerpc/sysdev/Makefile
@@ -21,7 +21,6 @@ obj-$(CONFIG_FSL_SOC)		+= fsl_soc.o fsl_mpic_err.o
 obj-$(CONFIG_FSL_PCI)		+= fsl_pci.o $(fsl-msi-obj-y)
 obj-$(CONFIG_FSL_PMC)		+= fsl_pmc.o
 obj-$(CONFIG_FSL_LBC)		+= fsl_lbc.o
-obj-$(CONFIG_FSL_IFC)		+= fsl_ifc.o
 obj-$(CONFIG_FSL_GTM)		+= fsl_gtm.o
 obj-$(CONFIG_FSL_85XX_CACHE_SRAM)	+= fsl_85xx_l2ctlr.o fsl_85xx_cache_sram.o
 obj-$(CONFIG_SIMPLE_GPIO)	+= simple_gpio.o
diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile
index f45473e..61c6271 100644
--- a/drivers/misc/Makefile
+++ b/drivers/misc/Makefile
@@ -15,6 +15,7 @@ obj-$(CONFIG_BMP085_I2C)	+= bmp085-i2c.o
 obj-$(CONFIG_BMP085_SPI)	+= bmp085-spi.o
 obj-$(CONFIG_DUMMY_IRQ)		+= dummy-irq.o
 obj-$(CONFIG_ICS932S401)	+= ics932s401.o
+obj-$(CONFIG_FSL_IFC)		+= fsl_ifc.o
 obj-$(CONFIG_LKDTM)		+= lkdtm.o
 obj-$(CONFIG_TIFM_CORE)       	+= tifm_core.o
 obj-$(CONFIG_TIFM_7XX1)       	+= tifm_7xx1.o
diff --git a/arch/powerpc/sysdev/fsl_ifc.c b/drivers/misc/fsl_ifc.c
similarity index 99%
rename from arch/powerpc/sysdev/fsl_ifc.c
rename to drivers/misc/fsl_ifc.c
index d7fc722..d4ae878 100644
--- a/arch/powerpc/sysdev/fsl_ifc.c
+++ b/drivers/misc/fsl_ifc.c
@@ -30,8 +30,8 @@
 #include <linux/of.h>
 #include <linux/of_device.h>
 #include <linux/platform_device.h>
+#include <linux/fsl_ifc.h>
 #include <asm/prom.h>
-#include <asm/fsl_ifc.h>
 
 struct fsl_ifc_ctrl *fsl_ifc_ctrl_dev;
 EXPORT_SYMBOL(fsl_ifc_ctrl_dev);
diff --git a/drivers/mtd/nand/fsl_ifc_nand.c b/drivers/mtd/nand/fsl_ifc_nand.c
index 4335577..865b323 100644
--- a/drivers/mtd/nand/fsl_ifc_nand.c
+++ b/drivers/mtd/nand/fsl_ifc_nand.c
@@ -30,7 +30,7 @@
 #include <linux/mtd/nand.h>
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/nand_ecc.h>
-#include <asm/fsl_ifc.h>
+#include <linux/fsl_ifc.h>
 
 #define FSL_IFC_V1_1_0	0x01010000
 #define ERR_BYTE		0xFF /* Value returned for read
diff --git a/arch/powerpc/include/asm/fsl_ifc.h b/include/linux/fsl_ifc.h
similarity index 100%
rename from arch/powerpc/include/asm/fsl_ifc.h
rename to include/linux/fsl_ifc.h
-- 
1.7.9.5




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

* Re: [PATCH] Driver/IFC: Move Freescale IFC driver to a common driver
  2014-01-13  5:24 [PATCH] Driver/IFC: Move Freescale IFC driver to a common driver Prabhakar Kushwaha
@ 2014-01-13 13:32 ` Arnd Bergmann
  2014-01-13 18:47   ` Scott Wood
  0 siblings, 1 reply; 8+ messages in thread
From: Arnd Bergmann @ 2014-01-13 13:32 UTC (permalink / raw)
  To: Prabhakar Kushwaha; +Cc: gregkh, linux-kernel, scottwood

On Monday 13 January 2014, Prabhakar Kushwaha wrote:
> Freescale IFC controller has been used for mpc8xxx. It will be used
> for ARM-based SoC as well. This patch moves the driver to driver/misc
> and fix the header file includes.
> 
> Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>

No objections to the driver, but drivers/misc doesn't seem like the
right place. Why not drivers/mfd or drivers/memory?

You should also find a new place for the binding file, which is
currently in Documentation/devicetree/bindings/powerpc/fsl/ifc.txt.

	Arnd

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

* Re: [PATCH] Driver/IFC: Move Freescale IFC driver to a common driver
  2014-01-13 13:32 ` Arnd Bergmann
@ 2014-01-13 18:47   ` Scott Wood
  2014-01-13 19:45     ` Arnd Bergmann
  0 siblings, 1 reply; 8+ messages in thread
From: Scott Wood @ 2014-01-13 18:47 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Prabhakar Kushwaha, gregkh, linux-kernel

On Mon, 2014-01-13 at 14:32 +0100, Arnd Bergmann wrote:
> On Monday 13 January 2014, Prabhakar Kushwaha wrote:
> > Freescale IFC controller has been used for mpc8xxx. It will be used
> > for ARM-based SoC as well. This patch moves the driver to driver/misc
> > and fix the header file includes.
> > 
> > Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
> 
> No objections to the driver, but drivers/misc doesn't seem like the
> right place. Why not drivers/mfd or drivers/memory?

It's not a memory controller in the sense that I think most people would
interpret the phrase, but I guess it's similar in function to
mvebu-devbus.  If drivers/memory is broad enough to cover such things,
and doesn't have a memory controller subsystem that drivers are supposed
to register with, then that could work.

Are things in drivers/mfd expected to interact with mfd-core.c?  It's
not clear to me what that does or how it would be useful to the IFC
code.

-Scott



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

* Re: [PATCH] Driver/IFC: Move Freescale IFC driver to a common driver
  2014-01-13 18:47   ` Scott Wood
@ 2014-01-13 19:45     ` Arnd Bergmann
  2014-01-13 20:10       ` Scott Wood
  0 siblings, 1 reply; 8+ messages in thread
From: Arnd Bergmann @ 2014-01-13 19:45 UTC (permalink / raw)
  To: Scott Wood; +Cc: Prabhakar Kushwaha, gregkh, linux-kernel

On Monday 13 January 2014, Scott Wood wrote:
> On Mon, 2014-01-13 at 14:32 +0100, Arnd Bergmann wrote:
> > On Monday 13 January 2014, Prabhakar Kushwaha wrote:
> > > Freescale IFC controller has been used for mpc8xxx. It will be used
> > > for ARM-based SoC as well. This patch moves the driver to driver/misc
> > > and fix the header file includes.
> > > 
> > > Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
> > 
> > No objections to the driver, but drivers/misc doesn't seem like the
> > right place. Why not drivers/mfd or drivers/memory?
> 
> It's not a memory controller in the sense that I think most people would
> interpret the phrase, but I guess it's similar in function to
> mvebu-devbus.  If drivers/memory is broad enough to cover such things,
> and doesn't have a memory controller subsystem that drivers are supposed
> to register with, then that could work.
> 
> Are things in drivers/mfd expected to interact with mfd-core.c?  It's
> not clear to me what that does or how it would be useful to the IFC
> code.

Sorry, I meant mtd not mfd. mtd would make sense if the only devices
behind it are things like flash or sram memory.

	Arnd

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

* Re: [PATCH] Driver/IFC: Move Freescale IFC driver to a common driver
  2014-01-13 19:45     ` Arnd Bergmann
@ 2014-01-13 20:10       ` Scott Wood
  2014-01-13 21:22         ` Arnd Bergmann
  0 siblings, 1 reply; 8+ messages in thread
From: Scott Wood @ 2014-01-13 20:10 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Prabhakar Kushwaha, gregkh, linux-kernel

On Mon, 2014-01-13 at 20:45 +0100, Arnd Bergmann wrote:
> On Monday 13 January 2014, Scott Wood wrote:
> > On Mon, 2014-01-13 at 14:32 +0100, Arnd Bergmann wrote:
> > > On Monday 13 January 2014, Prabhakar Kushwaha wrote:
> > > > Freescale IFC controller has been used for mpc8xxx. It will be used
> > > > for ARM-based SoC as well. This patch moves the driver to driver/misc
> > > > and fix the header file includes.
> > > > 
> > > > Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
> > > 
> > > No objections to the driver, but drivers/misc doesn't seem like the
> > > right place. Why not drivers/mfd or drivers/memory?
> > 
> > It's not a memory controller in the sense that I think most people would
> > interpret the phrase, but I guess it's similar in function to
> > mvebu-devbus.  If drivers/memory is broad enough to cover such things,
> > and doesn't have a memory controller subsystem that drivers are supposed
> > to register with, then that could work.
> > 
> > Are things in drivers/mfd expected to interact with mfd-core.c?  It's
> > not clear to me what that does or how it would be useful to the IFC
> > code.
> 
> Sorry, I meant mtd not mfd. mtd would make sense if the only devices
> behind it are things like flash or sram memory.

Some of the things behind it are flash, but those portions of the driver
are already in drivers/mtd.  This is just the common code.

-Scott



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

* Re: [PATCH] Driver/IFC: Move Freescale IFC driver to a common driver
  2014-01-13 20:10       ` Scott Wood
@ 2014-01-13 21:22         ` Arnd Bergmann
  2014-01-13 21:24           ` Scott Wood
  0 siblings, 1 reply; 8+ messages in thread
From: Arnd Bergmann @ 2014-01-13 21:22 UTC (permalink / raw)
  To: Scott Wood; +Cc: Prabhakar Kushwaha, gregkh, linux-kernel

On Monday 13 January 2014, Scott Wood wrote:
> On Mon, 2014-01-13 at 20:45 +0100, Arnd Bergmann wrote:
> > On Monday 13 January 2014, Scott Wood wrote:
> > > On Mon, 2014-01-13 at 14:32 +0100, Arnd Bergmann wrote:
> > > > On Monday 13 January 2014, Prabhakar Kushwaha wrote:
> > > > > Freescale IFC controller has been used for mpc8xxx. It will be used
> > > > > for ARM-based SoC as well. This patch moves the driver to driver/misc
> > > > > and fix the header file includes.
> > > > > 
> > > > > Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
> > > > 
> > > > No objections to the driver, but drivers/misc doesn't seem like the
> > > > right place. Why not drivers/mfd or drivers/memory?
> > > 
> > > It's not a memory controller in the sense that I think most people would
> > > interpret the phrase, but I guess it's similar in function to
> > > mvebu-devbus.  If drivers/memory is broad enough to cover such things,
> > > and doesn't have a memory controller subsystem that drivers are supposed
> > > to register with, then that could work.
> > > 
> > > Are things in drivers/mfd expected to interact with mfd-core.c?  It's
> > > not clear to me what that does or how it would be useful to the IFC
> > > code.
> > 
> > Sorry, I meant mtd not mfd. mtd would make sense if the only devices
> > behind it are things like flash or sram memory.
> 
> Some of the things behind it are flash, but those portions of the driver
> are already in drivers/mtd.  This is just the common code.
> 

What are the things that are not flash then?

	Arnd

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

* Re: [PATCH] Driver/IFC: Move Freescale IFC driver to a common driver
  2014-01-13 21:22         ` Arnd Bergmann
@ 2014-01-13 21:24           ` Scott Wood
  2014-01-13 22:17             ` Arnd Bergmann
  0 siblings, 1 reply; 8+ messages in thread
From: Scott Wood @ 2014-01-13 21:24 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Prabhakar Kushwaha, gregkh, linux-kernel

On Mon, 2014-01-13 at 22:22 +0100, Arnd Bergmann wrote:
> On Monday 13 January 2014, Scott Wood wrote:
> > On Mon, 2014-01-13 at 20:45 +0100, Arnd Bergmann wrote:
> > > On Monday 13 January 2014, Scott Wood wrote:
> > > > On Mon, 2014-01-13 at 14:32 +0100, Arnd Bergmann wrote:
> > > > > On Monday 13 January 2014, Prabhakar Kushwaha wrote:
> > > > > > Freescale IFC controller has been used for mpc8xxx. It will be used
> > > > > > for ARM-based SoC as well. This patch moves the driver to driver/misc
> > > > > > and fix the header file includes.
> > > > > > 
> > > > > > Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
> > > > > 
> > > > > No objections to the driver, but drivers/misc doesn't seem like the
> > > > > right place. Why not drivers/mfd or drivers/memory?
> > > > 
> > > > It's not a memory controller in the sense that I think most people would
> > > > interpret the phrase, but I guess it's similar in function to
> > > > mvebu-devbus.  If drivers/memory is broad enough to cover such things,
> > > > and doesn't have a memory controller subsystem that drivers are supposed
> > > > to register with, then that could work.
> > > > 
> > > > Are things in drivers/mfd expected to interact with mfd-core.c?  It's
> > > > not clear to me what that does or how it would be useful to the IFC
> > > > code.
> > > 
> > > Sorry, I meant mtd not mfd. mtd would make sense if the only devices
> > > behind it are things like flash or sram memory.
> > 
> > Some of the things behind it are flash, but those portions of the driver
> > are already in drivers/mtd.  This is just the common code.
> > 
> 
> What are the things that are not flash then?

FPGAs or any other random things that might get connected to it on a
custom board.

-Scott



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

* Re: [PATCH] Driver/IFC: Move Freescale IFC driver to a common driver
  2014-01-13 21:24           ` Scott Wood
@ 2014-01-13 22:17             ` Arnd Bergmann
  0 siblings, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2014-01-13 22:17 UTC (permalink / raw)
  To: Scott Wood; +Cc: Prabhakar Kushwaha, gregkh, linux-kernel

On Monday 13 January 2014, Scott Wood wrote:
> On Mon, 2014-01-13 at 22:22 +0100, Arnd Bergmann wrote:
> > On Monday 13 January 2014, Scott Wood wrote:
> > > 
> > > Some of the things behind it are flash, but those portions of the driver
> > > are already in drivers/mtd.  This is just the common code.
> > > 
> > 
> > What are the things that are not flash then?
> 
> FPGAs or any other random things that might get connected to it on a
> custom board.

Ok, that is similar to a number of other external buses then, like the
mvebu-devbus.c. I'd suggest you put it in drivers/memory.

	Arnd

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

end of thread, other threads:[~2014-01-13 22:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-13  5:24 [PATCH] Driver/IFC: Move Freescale IFC driver to a common driver Prabhakar Kushwaha
2014-01-13 13:32 ` Arnd Bergmann
2014-01-13 18:47   ` Scott Wood
2014-01-13 19:45     ` Arnd Bergmann
2014-01-13 20:10       ` Scott Wood
2014-01-13 21:22         ` Arnd Bergmann
2014-01-13 21:24           ` Scott Wood
2014-01-13 22:17             ` Arnd Bergmann

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