Subject: [PATCH 3/3] drivers: bus: Move omap gpmc code to live under drivers

From: [email-masked] (Roger Quadros)
Date: Fri, 21 Nov 2014 11:15:05 +0200

Hi Tony,

On 11/21/2014 12:28 AM, Tony Lindgren wrote:
> Just move to drivers as further clean-up can now happen there
> finally.
> 
> Cc: Arnd Bergmann <[email-masked]>
> Cc: Roger Quadros <[email-masked]>
> Signed-off-by: Tony Lindgren <[email-masked]>
> ---
>  arch/arm/mach-omap2/Kconfig                           | 1 +
>  arch/arm/mach-omap2/Makefile                          | 2 +-
>  drivers/bus/Kconfig                                   | 3 +++
>  drivers/bus/Makefile                                  | 3 ++-
>  arch/arm/mach-omap2/gpmc.c => drivers/bus/omap-gpmc.c | 0
>  5 files changed, 7 insertions(+), 2 deletions(-)
>  rename arch/arm/mach-omap2/gpmc.c => drivers/bus/omap-gpmc.c (100%)

Should we move it to drivers/memory/ instead?
TI_AEMIF driver lives there. This is similar to OMAP-GPMC for but for
Davinci and Keystone platforms.

> 
> diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
> index f4d06ae..3021901 100644
> --- a/arch/arm/mach-omap2/Kconfig
> +++ b/arch/arm/mach-omap2/Kconfig
> @@ -80,6 +80,7 @@ config ARCH_OMAP2PLUS
>  	select GENERIC_IRQ_CHIP
>  	select MACH_OMAP_GENERIC
>  	select OMAP_DM_TIMER
> +	select OMAP_GPMC
>  	select PINCTRL
>  	select SOC_BUS
>  	select TI_PRIV_EDMA
> diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
> index 3e824f8..bd85741 100644
> --- a/arch/arm/mach-omap2/Makefile
> +++ b/arch/arm/mach-omap2/Makefile
> @@ -6,7 +6,7 @@ ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \
>  	-I$(srctree)/arch/arm/plat-omap/include
>  
>  # Common support
> -obj-y := id.o io.o control.o mux.o devices.o fb.o serial.o gpmc.o timer.o pm.o \
> +obj-y := id.o io.o control.o mux.o devices.o fb.o serial.o timer.o pm.o \
>  	 common.o gpio.o dma.o wd_timer.o display.o i2c.o hdq1w.o omap_hwmod.o \
>  	 omap_device.o sram.o drm.o
>  
> diff --git a/drivers/bus/Kconfig b/drivers/bus/Kconfig
> index 603eb1b..09aacc8 100644
> --- a/drivers/bus/Kconfig
> +++ b/drivers/bus/Kconfig
> @@ -27,6 +27,9 @@ config MVEBU_MBUS
>  	  Driver needed for the MBus configuration on Marvell EBU SoCs
>  	  (Kirkwood, Dove, Orion5x, MV78XX0 and Armada 370/XP).
>  
> +config OMAP_GPMC
> +	bool
> +

Description? I had put this from a similar patch that I created earlier

+	 This driver is for the General Purpose Memory Controller (GPMC)
+	 present on Texas Instruments SoCs (e.g. OMAP2+). GPMC allows
+	 interfacing to a variety of asynchronous as well as synchronous
+	 memory drives like NOR, NAND, OneNAND, SRAM.
+

cheers,
-roger

>  config OMAP_OCP2SCP
>  	tristate "OMAP OCP2SCP DRIVER"
>  	depends on ARCH_OMAP2PLUS
> diff --git a/drivers/bus/Makefile b/drivers/bus/Makefile
> index 2973c18..96e77dd 100644
> --- a/drivers/bus/Makefile
> +++ b/drivers/bus/Makefile
> @@ -5,7 +5,8 @@
>  obj-$(CONFIG_BRCMSTB_GISB_ARB)	+= brcmstb_gisb.o
>  obj-$(CONFIG_IMX_WEIM)	+= imx-weim.o
>  obj-$(CONFIG_MVEBU_MBUS) += mvebu-mbus.o
> -obj-$(CONFIG_OMAP_OCP2SCP)	+= omap-ocp2scp.o
> +
> +obj-$(CONFIG_OMAP_GPMC)		+= omap-gpmc.o
>  
>  # Interconnect bus driver for OMAP SoCs.
>  obj-$(CONFIG_OMAP_INTERCONNECT)	+= omap_l3_smx.o omap_l3_noc.o
> diff --git a/arch/arm/mach-omap2/gpmc.c b/drivers/bus/omap-gpmc.c
> similarity index 100%
> rename from arch/arm/mach-omap2/gpmc.c
> rename to drivers/bus/omap-gpmc.c
>