driver/memory:Move Freescale IFC driver to a common driver
Subsystems (6)
PATCH v3 1/2 driver/memory: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/memory and fix the header file includes.
Also remove module_platform_driver() and instead call platform_driver_register() from subsys_initcall() to make sure this module has been loaded before MTD partition parsing starts.
---
Changes for v2:
- Move fsl_ifc in driver/memory
Changes for v3:
- move device tree bindings to memory
.../{powerpc => memory-controllers}/fsl/ifc.txt | 0
arch/powerpc/sysdev/Makefile | 1 -
drivers/memory/Makefile | 1 +
{arch/powerpc/sysdev => drivers/memory}/fsl_ifc.c | 8 ++++++--
drivers/mtd/nand/fsl_ifc_nand.c | 2 +-
.../include/asm => include/linux}/fsl_ifc.h | 0
6 files changed, 8 insertions(+), 4 deletions(-)
rename Documentation/devicetree/bindings/{powerpc => memory-controllers}/fsl/ifc.txt (100%)
rename {arch/powerpc/sysdev => drivers/memory}/fsl_ifc.c (98%)
rename {arch/powerpc/include/asm => include/linux}/fsl_ifc.h (100%)Documentation/devicetree/bindings/memory-controllers/fsl/ifc.txt renamed from Documentation/devicetree/bindings/powerpc/fsl/ifc.txt +0 -0
arch/powerpc/sysdev/Makefile +0 -1
@@ -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/memory/Makefile +1 -0
@@ -6,6 +6,7 @@ ifeq ($(CONFIG_DDR),y) obj-$(CONFIG_OF) += of_memory.o endif obj-$(CONFIG_TI_EMIF) += emif.o +obj-$(CONFIG_FSL_IFC) += fsl_ifc.o obj-$(CONFIG_MVEBU_DEVBUS) += mvebu-devbus.o obj-$(CONFIG_TEGRA20_MC) += tegra20-mc.o obj-$(CONFIG_TEGRA30_MC) += tegra30-mc.o
drivers/memory/fsl_ifc.c renamed from arch/powerpc/sysdev/fsl_ifc.c +6 -2
@@ -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);
@@ -299,7 +299,11 @@ static struct platform_driver fsl_ifc_ctrl_driver = { .remove = fsl_ifc_ctrl_remove, }; -module_platform_driver (fsl_ifc_ctrl_driver); +static int __init fsl_ifc_init (void ) +{ +return platform_driver_register (&fsl_ifc_ctrl_driver); +} +subsys_initcall (fsl_ifc_init);MODULE_LICENSE ("GPL" );MODULE_AUTHOR ("Freescale Semiconductor" );
drivers/mtd/nand/fsl_ifc_nand.c +1 -1
@@ -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
Signature · 1 line
1.7.9.5
Quoted 2 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/memory
Quoted 4 lines
and fix the header file includes.
=20
Also removemodule_platform_driver()and instead callplatform_driver_register()fromsubsys_initcall()to make sure this =
module
Quoted 12 lines
has been loaded before MTD partition parsing starts. =20
Signed-off-by Prabhakar Kushwaha <[email protected]>Acked-by Arnd Bergmann <[email protected]>---
Changes for v2:
- Movefsl_ifcin driver/memory
=20
Changes for v3:
- move device tree bindings to memory
=20
.../{powerpc =3D>memory-controllers}/fsl/ifc.txt| 0
Quoted 7 lines
arch/powerpc/sysdev/Makefile | 1 - drivers/memory/Makefile | 1 + {arch/powerpc/sysdev =3D> drivers/memory}/fsl_ifc.c | 8 ++++++-- drivers/mtd/nand/fsl_ifc_nand.c | 2 +- .../include/asm =3D> include/linux}/fsl_ifc.h | 0 6 files changed, 8 insertions(+), 4 deletions(-)rename
Documentation/devicetree/bindings/{powerpc=3D> =
memory-controllers}/fsl/ifc.txt (100%)
Quoted 2 lines
rename {
arch/powerpc/sysdev=3D>drivers/memory}/fsl_ifc.c(98%) rename {arch/powerpc/include/asm=3D>include/linux}/fsl_ifc.h(100%)
The Kconfig option for FSL_IFC should move into drivers/memory/Kconfig
=
Quoted 2 lines
=20
= renamed from Documentation/devicetree/bindings/powerpc/fsl/ifc.txt +0
-0
b/Documentation/devicetree/bindings/memory-controllers/fsl/ifc.txt
Quoted 3 lines
similarity index 100%
rename fromDocumentation/devicetree/bindings/powerpc/fsl/ifc.txtrename to =
Documentation/devicetree/bindings/memory-controllers/fsl/ifc.txt
=
Quoted 1 line
= renamed from arch/powerpc/sysdev/Makefile +0
-0
b/arch/powerpc/sysdev/Makefile
arch/powerpc/sysdev/Makefile obj-$(CONFIG_FSL_SOC) +=3D fsl_soc.o =
Quoted 4 lines
index f67ac90..afbcc37 100644
arch/powerpc/sysdev/Makefile +0
-0@@ -21,7 +21,6 @@ obj-$(CONFIG_FSL_SOC) +=3D fsl_soc.o =
fsl_mpic_err.o
Quoted 6 lines
arch/powerpc/sysdev/Makefile +0
-0obj-$(CONFIG_FSL_PCI) +=3D fsl_pci.o $(fsl-msi-obj-y)obj-$(CONFIG_FSL_PMC) +=3D fsl_pmc.o
obj-$(CONFIG_FSL_LBC) +=3D fsl_lbc.o
-obj-$(CONFIG_FSL_IFC) +=3D fsl_ifc.o
obj-$(CONFIG_FSL_GTM) +=3D fsl_gtm.o
obj-$(CONFIG_FSL_85XX_CACHE_SRAM) +=3D fsl_85xx_l2ctlr.o =
fsl_85xx_cache_sram.o
drivers/memory/fsl_ifc.c static struct platform_driver fsl_ifc_ctrl_driver =
Quoted 31 lines
obj-$(CONFIG_SIMPLE_GPIO) +=3D simple_gpio.o
drivers/memory/Makefile +0
-0@@ -6,6 +6,7 @@ ifeq ($(CONFIG_DDR),y)obj-$(CONFIG_OF) +=3D of_memory.o
endif
obj-$(CONFIG_TI_EMIF) +=3D emif.o
+obj-$(CONFIG_FSL_IFC) +=3D fsl_ifc.o
obj-$(CONFIG_MVEBU_DEVBUS) +=3D mvebu-devbus.o
obj-$(CONFIG_TEGRA20_MC) +=3D tegra20-mc.o
obj-$(CONFIG_TEGRA30_MC) +=3D tegra30-mc.odrivers/memory/fsl_ifc.c renamed from arch/powerpc/sysdev/fsl_ifc.c +1
-1@@ -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> =20
structfsl_ifc_ctrl*fsl_ifc_ctrl_dev;EXPORT_SYMBOL(fsl_ifc_ctrl_dev);drivers/memory/fsl_ifc.c renamed from arch/powerpc/sysdev/fsl_ifc.c +0
-0@@ -299,7 +299,11 @@ static struct platform_driver fsl_ifc_ctrl_driver =
=3D {
=
Quoted 13 lines
drivers/memory/fsl_ifc.c renamed from arch/powerpc/sysdev/fsl_ifc.c +0
-0.remove =3D fsl_ifc_ctrl_remove, };=20
drivers/memory/fsl_ifc.c renamed from arch/powerpc/sysdev/fsl_ifc.c +5
-1-module_platform_driver (fsl_ifc_ctrl_driver); +static int __init fsl_ifc_init (void ) +{ +return platform_driver_register (&fsl_ifc_ctrl_driver); +} +subsys_initcall (fsl_ifc_init);=20
MODULE_LICENSE("GPL");MODULE_AUTHOR("Freescale Semiconductor");= renamed from drivers/mtd/nand/fsl_ifc_nand.c +0
-0
b/drivers/mtd/nand/fsl_ifc_nand.c
=
Quoted 13 lines
index 4335577..865b323 100644
drivers/mtd/nand/fsl_ifc_nand.c +1
-1@@ -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> =20
#defineFSL_IFC_V1_1_00x01010000
#defineERR_BYTE0xFF/* Value returned for read= renamed from arch/powerpc/include/asm/fsl_ifc.h +0
-0
b/include/linux/fsl_ifc.h
Quoted 10 lines
similarity index 100%
rename fromarch/powerpc/include/asm/fsl_ifc.hrename toinclude/linux/fsl_ifc.h
--=20
1.7.9.5
=20
=20
=20
--
To unsubscribe from this list: send the line "unsubscribe =
linux-kernel" in
Quoted 3 lines
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Quoted 29 lines · Kumar Gala
Quoted 24 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/memory and fix the header file includes.
Also remove
module_platform_driver()and instead callplatform_driver_register()fromsubsys_initcall()to make sure this module has been loaded before MTD partition parsing starts.Signed-off-by Prabhakar Kushwaha <[email protected]>Acked-by Arnd Bergmann <[email protected]>---
Changes for v2:
- Movefsl_ifcin driver/memoryChanges for v3:
- move device tree bindings to memory.../{powerpc => memory-controllers}/fsl/ifc.txt | 0 arch/powerpc/sysdev/Makefile | 1 - drivers/memory/Makefile | 1 + {arch/powerpc/sysdev => drivers/memory}/fsl_ifc.c | 8 ++++++-- drivers/mtd/nand/fsl_ifc_nand.c | 2 +- .../include/asm => include/linux}/fsl_ifc.h | 0 6 files changed, 8 insertions(+), 4 deletions(-)Quoted 3 lines
rename
Documentation/devicetree/bindings/{powerpc=>memory-controllers}/fsl/ifc.txt(100%) rename {arch/powerpc/sysdev=>drivers/memory}/fsl_ifc.c(98%)
rename {arch/powerpc/include/asm=>include/linux}/fsl_ifc.h(100%)
Quoted 1 line
The
Kconfigoption forFSL_IFCshould move intodrivers/memory/Kconfig
Thanks Kumar for taking time and review this patch.
You are correct. I was checking sysdev/Kconfig but it is defined in powerpc/Kconfig I missed it :)
Regards,
Prabhakar