Skip to contentSkip to conversation

Driver/IFC: Move Freescale IFC driver to a common driver

PATCH Superseded Prabhakar Kushwaha 3 participants 8 messages Jan 13, 2014

Subsystems (4)

v1 of 8 Superseded Latest is v8 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Driver/IFC: Move Freescale IFC driver to a common driver

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.

---
 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%)
arch/powerpc/sysdev/Makefile +0 -1
index f67ac90..afbcc37 100644
@@ -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
drivers/misc/Makefile +1 -0
index f45473e..61c6271 100644
@@ -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
drivers/misc/fsl_ifc.c renamed from arch/powerpc/sysdev/fsl_ifc.c +1 -1
similarity index 99%
rename from arch/powerpc/sysdev/fsl_ifc.c
rename to drivers/misc/fsl_ifc.c
index d7fc722..d4ae878 100644
@@ -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);
drivers/mtd/nand/fsl_ifc_nand.c +1 -1
index 4335577..865b323 100644
@@ -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
include/linux/fsl_ifc.h renamed from arch/powerpc/include/asm/fsl_ifc.h +0 -0
similarity index 100%
rename from arch/powerpc/include/asm/fsl_ifc.h
rename to include/linux/fsl_ifc.h
Signature · 1 line
1.7.9.5
maintainer
#1 lore raw
Quoted 5 lines · 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.

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

#2 lore raw
Quoted 9 lines · Arnd Bergmann
Quoted 5 lines · 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.

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

maintainer
#3 lore raw
Quoted 17 lines · Scott Wood
Quoted 9 lines · Arnd Bergmann
Quoted 5 lines · 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.

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.

Quoted 3 lines

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

#4 lore raw
Quoted 18 lines · Arnd Bergmann
Quoted 17 lines · Scott Wood
Quoted 9 lines · Arnd Bergmann
Quoted 5 lines · 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.

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.

Quoted 6 lines
Quoted 3 lines

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

maintainer
#5 lore raw
Quoted 23 lines · Scott Wood
Quoted 22 lines · Arnd Bergmann
Quoted 20 lines · Scott Wood
Quoted 9 lines · Arnd Bergmann
Quoted 5 lines · 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.

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.

Quoted 6 lines
Quoted 2 lines

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

#6 lore raw
Quoted 24 lines · Arnd Bergmann
Quoted 23 lines · Scott Wood
Quoted 22 lines · Arnd Bergmann
Quoted 20 lines · Scott Wood
Quoted 9 lines · Arnd Bergmann
Quoted 5 lines · 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.

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.

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

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

maintainer
#7 lore raw
Quoted 11 lines · Scott Wood
Quoted 7 lines · Arnd Bergmann
Quoted 4 lines · Scott Wood

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