public inbox for linuxppc-dev@ozlabs.org
 help / color / mirror / Atom feed
* [PATCH 1/2][v6] driver/memory:Move Freescale IFC driver to a common driver
@ 2014-01-25 12:06 Prabhakar Kushwaha
  2014-01-27 22:06 ` Kumar Gala
  2014-01-27 23:04 ` Scott Wood
  0 siblings, 2 replies; 3+ messages in thread
From: Prabhakar Kushwaha @ 2014-01-25 12:06 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: 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/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>
---
Based upon git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git
Branch next

Changes for v2:
	- Move fsl_ifc in driver/memory

Changes for v3:
	- move device tree bindings to memory

Changes for v4: Rebased to 
	git://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux.git

Changes for v5: 
	- Moved powerpc/Kconfig option to driver/memory

Changes for v6:
	- Update Kconfig details

 .../{powerpc => memory-controllers}/fsl/ifc.txt    |    0
 arch/powerpc/Kconfig                               |    4 ----
 arch/powerpc/sysdev/Makefile                       |    1 -
 drivers/memory/Kconfig                             |    9 +++++++++
 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
 8 files changed, 17 insertions(+), 8 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%)

diff --git a/Documentation/devicetree/bindings/powerpc/fsl/ifc.txt b/Documentation/devicetree/bindings/memory-controllers/fsl/ifc.txt
similarity index 100%
rename from Documentation/devicetree/bindings/powerpc/fsl/ifc.txt
rename to Documentation/devicetree/bindings/memory-controllers/fsl/ifc.txt
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index fa39517..91dc43c 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -727,10 +727,6 @@ config FSL_LBC
 	  controller.  Also contains some common code used by
 	  drivers for specific local bus peripherals.
 
-config FSL_IFC
-	bool
-        depends on FSL_SOC
-
 config FSL_GTM
 	bool
 	depends on PPC_83xx || QUICC_ENGINE || CPM2
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/memory/Kconfig b/drivers/memory/Kconfig
index 29a11db..555d26f 100644
--- a/drivers/memory/Kconfig
+++ b/drivers/memory/Kconfig
@@ -50,4 +50,13 @@ config TEGRA30_MC
 	  analysis, especially for IOMMU/SMMU(System Memory Management
 	  Unit) module.
 
+config FSL_IFC
+	bool "Freescale Integrated Flash Controller"
+	default y
+        depends on FSL_SOC
+	help
+	  This driver is for the Integrated Flash Controller Controller(IFC) 
+	  module available in Freescale SoCs. This controller allows to handle flash
+	  devices such as NOR, NAND, FPGA and ASIC etc
+
 endif
diff --git a/drivers/memory/Makefile b/drivers/memory/Makefile
index 969d923..f2bf25c 100644
--- a/drivers/memory/Makefile
+++ b/drivers/memory/Makefile
@@ -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
diff --git a/arch/powerpc/sysdev/fsl_ifc.c b/drivers/memory/fsl_ifc.c
similarity index 98%
rename from arch/powerpc/sysdev/fsl_ifc.c
rename to drivers/memory/fsl_ifc.c
index fbc885b..3d5d792 100644
--- a/arch/powerpc/sysdev/fsl_ifc.c
+++ b/drivers/memory/fsl_ifc.c
@@ -29,8 +29,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);
@@ -298,7 +298,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");
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] 3+ messages in thread

* Re: [PATCH 1/2][v6] driver/memory:Move Freescale IFC driver to a common driver
  2014-01-25 12:06 [PATCH 1/2][v6] driver/memory:Move Freescale IFC driver to a common driver Prabhakar Kushwaha
@ 2014-01-27 22:06 ` Kumar Gala
  2014-01-27 23:04 ` Scott Wood
  1 sibling, 0 replies; 3+ messages in thread
From: Kumar Gala @ 2014-01-27 22:06 UTC (permalink / raw)
  To: Prabhakar Kushwaha; +Cc: Scott Wood, linuxppc-dev


On Jan 25, 2014, at 6:06 AM, Prabhakar Kushwaha =
<prabhakar@freescale.com> 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/memory
> and fix the header file includes.
>=20
> 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.
>=20
> Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
> Acked-by: Arnd Bergmann <arnd@arndb.de>
> ---
> Based upon =
git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git
> Branch next
>=20
> Changes for v2:
> 	- Move fsl_ifc in driver/memory
>=20
> Changes for v3:
> 	- move device tree bindings to memory
>=20
> Changes for v4: Rebased to=20
> 	=
git://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux.git
>=20
> Changes for v5:=20
> 	- Moved powerpc/Kconfig option to driver/memory
>=20
> Changes for v6:
> 	- Update Kconfig details
>=20
> .../{powerpc =3D> memory-controllers}/fsl/ifc.txt    |    0
> arch/powerpc/Kconfig                               |    4 ----
> arch/powerpc/sysdev/Makefile                       |    1 -
> drivers/memory/Kconfig                             |    9 +++++++++
> 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
> 8 files changed, 17 insertions(+), 8 deletions(-)
> rename Documentation/devicetree/bindings/{powerpc =3D> =
memory-controllers}/fsl/ifc.txt (100%)
> rename {arch/powerpc/sysdev =3D> drivers/memory}/fsl_ifc.c (98%)
> rename {arch/powerpc/include/asm =3D> include/linux}/fsl_ifc.h (100%)
>=20
> diff --git a/Documentation/devicetree/bindings/powerpc/fsl/ifc.txt =
b/Documentation/devicetree/bindings/memory-controllers/fsl/ifc.txt
> similarity index 100%
> rename from Documentation/devicetree/bindings/powerpc/fsl/ifc.txt
> rename to =
Documentation/devicetree/bindings/memory-controllers/fsl/ifc.txt
> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
> index fa39517..91dc43c 100644
> --- a/arch/powerpc/Kconfig
> +++ b/arch/powerpc/Kconfig
> @@ -727,10 +727,6 @@ config FSL_LBC
> 	  controller.  Also contains some common code used by
> 	  drivers for specific local bus peripherals.
>=20
> -config FSL_IFC
> -	bool
> -        depends on FSL_SOC
> -
> config FSL_GTM
> 	bool
> 	depends on PPC_83xx || QUICC_ENGINE || CPM2
> 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)		+=3D fsl_soc.o =
fsl_mpic_err.o
> obj-$(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
> obj-$(CONFIG_SIMPLE_GPIO)	+=3D simple_gpio.o
> diff --git a/drivers/memory/Kconfig b/drivers/memory/Kconfig
> index 29a11db..555d26f 100644
> --- a/drivers/memory/Kconfig
> +++ b/drivers/memory/Kconfig
> @@ -50,4 +50,13 @@ config TEGRA30_MC
> 	  analysis, especially for IOMMU/SMMU(System Memory Management
> 	  Unit) module.
>=20
> +config FSL_IFC
> +	bool "Freescale Integrated Flash Controller"
> +	default y
> +        depends on FSL_SOC

minor white space nit (spaces instead of tab)

> +	help
> +	  This driver is for the Integrated Flash Controller =
Controller(IFC)=20
> +	  module available in Freescale SoCs. This controller allows to =
handle flash
> +	  devices such as NOR, NAND, FPGA and ASIC etc
> +
> endif

- k

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

* Re: [PATCH 1/2][v6] driver/memory:Move Freescale IFC driver to a common driver
  2014-01-25 12:06 [PATCH 1/2][v6] driver/memory:Move Freescale IFC driver to a common driver Prabhakar Kushwaha
  2014-01-27 22:06 ` Kumar Gala
@ 2014-01-27 23:04 ` Scott Wood
  1 sibling, 0 replies; 3+ messages in thread
From: Scott Wood @ 2014-01-27 23:04 UTC (permalink / raw)
  To: Prabhakar Kushwaha; +Cc: linuxppc-dev

On Sat, 2014-01-25 at 17:36 +0530, Prabhakar Kushwaha wrote:
> diff --git a/drivers/memory/Kconfig b/drivers/memory/Kconfig
> index 29a11db..555d26f 100644
> --- a/drivers/memory/Kconfig
> +++ b/drivers/memory/Kconfig
> @@ -50,4 +50,13 @@ config TEGRA30_MC
>  	  analysis, especially for IOMMU/SMMU(System Memory Management
>  	  Unit) module.
>  
> +config FSL_IFC
> +	bool "Freescale Integrated Flash Controller"
> +	default y

Don't use "default y".

-Scott

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

end of thread, other threads:[~2014-01-27 23:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-25 12:06 [PATCH 1/2][v6] driver/memory:Move Freescale IFC driver to a common driver Prabhakar Kushwaha
2014-01-27 22:06 ` Kumar Gala
2014-01-27 23:04 ` Scott Wood

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