diff options
author | Prabhakar Kushwaha <prabhakar@freescale.com> | 2014-01-17 00:45:16 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-02-18 15:20:45 -0500 |
commit | d2ae2e20fbdde5a65f3a5a153044ab1e5c53f7cc (patch) | |
tree | f707fc47d57b18f5eec3a17b8b57f8c12b614f48 | |
parent | 3503958cb0a5f183ddbdafe0f352607920cd8668 (diff) |
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.
Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | Documentation/devicetree/bindings/memory-controllers/fsl/ifc.txt (renamed from Documentation/devicetree/bindings/powerpc/fsl/ifc.txt) | 0 | ||||
-rw-r--r-- | arch/powerpc/sysdev/Makefile | 1 | ||||
-rw-r--r-- | drivers/memory/Makefile | 1 | ||||
-rw-r--r-- | drivers/memory/fsl_ifc.c (renamed from arch/powerpc/sysdev/fsl_ifc.c) | 8 | ||||
-rw-r--r-- | drivers/mtd/nand/fsl_ifc_nand.c | 2 | ||||
-rw-r--r-- | include/linux/fsl_ifc.h (renamed from arch/powerpc/include/asm/fsl_ifc.h) | 0 |
6 files changed, 8 insertions, 4 deletions
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/ifc.txt b/Documentation/devicetree/bindings/memory-controllers/fsl/ifc.txt index d5e370450ac0..d5e370450ac0 100644 --- a/Documentation/devicetree/bindings/powerpc/fsl/ifc.txt +++ b/Documentation/devicetree/bindings/memory-controllers/fsl/ifc.txt | |||
diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile index f67ac900d870..afbcc37aa094 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 | |||
21 | obj-$(CONFIG_FSL_PCI) += fsl_pci.o $(fsl-msi-obj-y) | 21 | obj-$(CONFIG_FSL_PCI) += fsl_pci.o $(fsl-msi-obj-y) |
22 | obj-$(CONFIG_FSL_PMC) += fsl_pmc.o | 22 | obj-$(CONFIG_FSL_PMC) += fsl_pmc.o |
23 | obj-$(CONFIG_FSL_LBC) += fsl_lbc.o | 23 | obj-$(CONFIG_FSL_LBC) += fsl_lbc.o |
24 | obj-$(CONFIG_FSL_IFC) += fsl_ifc.o | ||
25 | obj-$(CONFIG_FSL_GTM) += fsl_gtm.o | 24 | obj-$(CONFIG_FSL_GTM) += fsl_gtm.o |
26 | obj-$(CONFIG_FSL_85XX_CACHE_SRAM) += fsl_85xx_l2ctlr.o fsl_85xx_cache_sram.o | 25 | obj-$(CONFIG_FSL_85XX_CACHE_SRAM) += fsl_85xx_l2ctlr.o fsl_85xx_cache_sram.o |
27 | obj-$(CONFIG_SIMPLE_GPIO) += simple_gpio.o | 26 | obj-$(CONFIG_SIMPLE_GPIO) += simple_gpio.o |
diff --git a/drivers/memory/Makefile b/drivers/memory/Makefile index 969d923dad93..f2bf25c801d0 100644 --- a/drivers/memory/Makefile +++ b/drivers/memory/Makefile | |||
@@ -6,6 +6,7 @@ ifeq ($(CONFIG_DDR),y) | |||
6 | obj-$(CONFIG_OF) += of_memory.o | 6 | obj-$(CONFIG_OF) += of_memory.o |
7 | endif | 7 | endif |
8 | obj-$(CONFIG_TI_EMIF) += emif.o | 8 | obj-$(CONFIG_TI_EMIF) += emif.o |
9 | obj-$(CONFIG_FSL_IFC) += fsl_ifc.o | ||
9 | obj-$(CONFIG_MVEBU_DEVBUS) += mvebu-devbus.o | 10 | obj-$(CONFIG_MVEBU_DEVBUS) += mvebu-devbus.o |
10 | obj-$(CONFIG_TEGRA20_MC) += tegra20-mc.o | 11 | obj-$(CONFIG_TEGRA20_MC) += tegra20-mc.o |
11 | obj-$(CONFIG_TEGRA30_MC) += tegra30-mc.o | 12 | obj-$(CONFIG_TEGRA30_MC) += tegra30-mc.o |
diff --git a/arch/powerpc/sysdev/fsl_ifc.c b/drivers/memory/fsl_ifc.c index fbc885b31946..3d5d792d5cb2 100644 --- a/arch/powerpc/sysdev/fsl_ifc.c +++ b/drivers/memory/fsl_ifc.c | |||
@@ -29,8 +29,8 @@ | |||
29 | #include <linux/of.h> | 29 | #include <linux/of.h> |
30 | #include <linux/of_device.h> | 30 | #include <linux/of_device.h> |
31 | #include <linux/platform_device.h> | 31 | #include <linux/platform_device.h> |
32 | #include <linux/fsl_ifc.h> | ||
32 | #include <asm/prom.h> | 33 | #include <asm/prom.h> |
33 | #include <asm/fsl_ifc.h> | ||
34 | 34 | ||
35 | struct fsl_ifc_ctrl *fsl_ifc_ctrl_dev; | 35 | struct fsl_ifc_ctrl *fsl_ifc_ctrl_dev; |
36 | EXPORT_SYMBOL(fsl_ifc_ctrl_dev); | 36 | EXPORT_SYMBOL(fsl_ifc_ctrl_dev); |
@@ -298,7 +298,11 @@ static struct platform_driver fsl_ifc_ctrl_driver = { | |||
298 | .remove = fsl_ifc_ctrl_remove, | 298 | .remove = fsl_ifc_ctrl_remove, |
299 | }; | 299 | }; |
300 | 300 | ||
301 | module_platform_driver(fsl_ifc_ctrl_driver); | 301 | static int __init fsl_ifc_init(void) |
302 | { | ||
303 | return platform_driver_register(&fsl_ifc_ctrl_driver); | ||
304 | } | ||
305 | subsys_initcall(fsl_ifc_init); | ||
302 | 306 | ||
303 | MODULE_LICENSE("GPL"); | 307 | MODULE_LICENSE("GPL"); |
304 | MODULE_AUTHOR("Freescale Semiconductor"); | 308 | MODULE_AUTHOR("Freescale Semiconductor"); |
diff --git a/drivers/mtd/nand/fsl_ifc_nand.c b/drivers/mtd/nand/fsl_ifc_nand.c index 90ca7e75d6f0..50d9161c4faf 100644 --- a/drivers/mtd/nand/fsl_ifc_nand.c +++ b/drivers/mtd/nand/fsl_ifc_nand.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #include <linux/mtd/nand.h> | 30 | #include <linux/mtd/nand.h> |
31 | #include <linux/mtd/partitions.h> | 31 | #include <linux/mtd/partitions.h> |
32 | #include <linux/mtd/nand_ecc.h> | 32 | #include <linux/mtd/nand_ecc.h> |
33 | #include <asm/fsl_ifc.h> | 33 | #include <linux/fsl_ifc.h> |
34 | 34 | ||
35 | #define FSL_IFC_V1_1_0 0x01010000 | 35 | #define FSL_IFC_V1_1_0 0x01010000 |
36 | #define ERR_BYTE 0xFF /* Value returned for read | 36 | #define ERR_BYTE 0xFF /* Value returned for read |
diff --git a/arch/powerpc/include/asm/fsl_ifc.h b/include/linux/fsl_ifc.h index f49ddb1b2273..f49ddb1b2273 100644 --- a/arch/powerpc/include/asm/fsl_ifc.h +++ b/include/linux/fsl_ifc.h | |||