Move omap GPMC to live in drivers/memory
Subsystems (6)
Tony Lindgren
maintainerv2 cover Move omap GPMC to live in drivers/memory
Hi,
Here's version 2 of the patches to move omap GPMC (General Purpose Memory Controller) to live under drivers for further clean-up work.
Changes from the first version are:
- Few randconfig fixes for the first patch in the series
- Don't include mach-omap2/gpmc.h any longer in any files we touch in this patch series, just keep it around for legacy reasons
- Move GPMC to drivers/memory instead of drivers/bus
Regards,
Tony
Tony Lindgren (3):
ARM: OMAP2+: Prepare to move GPMC to drivers by platform data header
ARM: OMAP2+: Move GPMC initcall to devices.c
memory: gpmc: Move omap gpmc code to live under drivers
MAINTAINERS | 8 + arch/arm/mach-omap2/Kconfig | 2 + arch/arm/mach-omap2/Makefile | 2 +- arch/arm/mach-omap2/board-am3517crane.c | 1 + arch/arm/mach-omap2/board-cm-t35.c | 3 +- arch/arm/mach-omap2/board-cm-t3517.c | 3 +- arch/arm/mach-omap2/board-flash.c | 4 +- arch/arm/mach-omap2/board-flash.h | 1 - arch/arm/mach-omap2/board-n8x0.c | 2 - arch/arm/mach-omap2/board-omap3pandora.c | 2 +- arch/arm/mach-omap2/board-rx51-peripherals.c | 3 +- arch/arm/mach-omap2/devices.c | 26 +++ arch/arm/mach-omap2/gpmc-nand.c | 3 +- arch/arm/mach-omap2/gpmc-onenand.c | 3 +- arch/arm/mach-omap2/gpmc-onenand.h | 24 --- arch/arm/mach-omap2/gpmc.h | 228 +-------------------- arch/arm/mach-omap2/pm34xx.c | 2 +- drivers/memory/Kconfig | 8 + drivers/memory/Makefile | 1 + .../gpmc.c => drivers/memory/omap-gpmc.c | 91 +++++--- .../gpmc-nand.h => include/linux/omap-gpmc.h | 18 +- include/linux/platform_data/omap-gpmc.h | 177 ++++++++++++++++ 22 files changed, 310 insertions(+), 302 deletions(-) delete mode 100644 arch/arm/mach-omap2/gpmc-onenand.h rename arch/arm/mach-omap2/gpmc.c => drivers/memory/omap-gpmc.c (95%) rename arch/arm/mach-omap2/gpmc-nand.h => include/linux/omap-gpmc.h (54%) create mode 100644 include/linux/platform_data/omap-gpmc.h
Signature · 1 line
2.1.3
Tony Lindgren
maintainerPATCH v2 1/3 ARM: OMAP2+: Prepare to move GPMC to drivers by platform data header
We still need to support platform data for omap3 until it's booting in device tree only mode. So let's add platform_data/omap-gpmc.h for that, and a minimal linux/omap-gpmc.h for the save and restore used by the PM code.
Let's also keep a minimal mach-omap2/gpmc.h still around to avoid churn on the board-*.c files. Once omap3 boots in device tree only mode, we can drop mach-omap2/gpmc.h and we can make the data structures in platform_data/omap-gpmc.h private to the GPMC driver.
Note that we can now also remove gpmc-nand.h and gpmc-onenand.h.
--- arch/arm/mach-omap2/board-am3517crane.c | 1 + arch/arm/mach-omap2/board-cm-t35.c | 3 +- arch/arm/mach-omap2/board-cm-t3517.c | 3 +- arch/arm/mach-omap2/board-flash.c | 4 +- arch/arm/mach-omap2/board-flash.h | 1 - arch/arm/mach-omap2/board-n8x0.c | 2 - arch/arm/mach-omap2/board-omap3pandora.c | 2 +- arch/arm/mach-omap2/board-rx51-peripherals.c | 3 +- arch/arm/mach-omap2/gpmc-nand.c | 3 +- arch/arm/mach-omap2/gpmc-onenand.c | 3 +- arch/arm/mach-omap2/gpmc-onenand.h | 24 --- arch/arm/mach-omap2/gpmc.c | 64 +++++- arch/arm/mach-omap2/gpmc.h | 228 +-------------------- arch/arm/mach-omap2/pm34xx.c | 2 +- .../gpmc-nand.h => include/linux/omap-gpmc.h | 18 +- include/linux/platform_data/omap-gpmc.h | 177 ++++++++++++++++ 16 files changed, 265 insertions(+), 273 deletions(-) delete mode 100644 arch/arm/mach-omap2/gpmc-onenand.h rename arch/arm/mach-omap2/gpmc-nand.h => include/linux/omap-gpmc.h (54%) create mode 100644 include/linux/platform_data/omap-gpmc.h
arch/arm/mach-omap2/board-am3517crane.c +1 -0
@@ -24,6 +24,7 @@#include <linux/mtd/mtd.h> #include <linux/mtd/nand.h> #include <linux/mtd/partitions.h> +#include <linux/platform_data/omap-gpmc.h> #include <asm/mach-types.h> #include <asm/mach/arch.h>
arch/arm/mach-omap2/board-cm-t35.c +1 -2
@@ -25,6 +25,7 @@#include <linux/input/matrix_keypad.h> #include <linux/delay.h> #include <linux/gpio.h> +#include <linux/omap-gpmc.h> #include <linux/platform_data/gpio-omap.h> #include <linux/platform_data/at24.h>
@@ -51,8 +52,6 @@#include "sdram-micron-mt46h32m32lf-6.h" #include "hsmmc.h" #include "common-board-devices.h" -#include "gpmc.h" -#include "gpmc-nand.h" #define CM_T35_GPIO_PENDOWN 57#define SB_T35_USB_HUB_RESET_GPIO 167
arch/arm/mach-omap2/board-cm-t3517.c +1 -2
@@ -28,6 +28,7 @@#include <linux/delay.h> #include <linux/gpio.h> #include <linux/leds.h> +#include <linux/omap-gpmc.h> #include <linux/rtc-v3020.h> #include <linux/mtd/mtd.h> #include <linux/mtd/nand.h>
@@ -41,7 +42,6 @@#include "common.h" #include <linux/platform_data/mtd-nand-omap2.h> -#include "gpmc.h" #include "am35xx.h"
@@ -50,7 +50,6 @@#include "hsmmc.h" #include "common-board-devices.h" #include "am35xx-emac.h" -#include "gpmc-nand.h" #if defined(CONFIG_LEDS_GPIO ) || defined(CONFIG_LEDS_GPIO_MODULE ) static struct gpio_led cm_t3517_leds[] = {
arch/arm/mach-omap2/board-flash.c +2 -2
@@ -13,18 +13,18 @@*/ #include <linux/kernel.h> +#include <linux/omap-gpmc.h> #include <linux/platform_device.h> #include <linux/mtd/physmap.h> #include <linux/io.h> +#include <linux/platform_data/omap-gpmc.h> #include <linux/platform_data/mtd-nand-omap2.h> #include <linux/platform_data/mtd-onenand-omap2.h> #include "soc.h" #include "common.h" #include "board-flash.h" -#include "gpmc-onenand.h" -#include "gpmc-nand.h" #define REG_FPGA_REV 0x10#define REG_FPGA_DIP_SWITCH_INPUT2 0x60
arch/arm/mach-omap2/board-flash.h +0 -1
@@ -12,7 +12,6 @@*/ #include <linux/mtd/mtd.h> #include <linux/mtd/partitions.h> -#include "gpmc.h" #define PDC_NOR 1#define PDC_NAND 2
arch/arm/mach-omap2/board-n8x0.c +0 -2
@@ -22,7 +22,6 @@#include <linux/spi/spi.h> #include <linux/usb/musb.h> #include <linux/platform_data/spi-omap2-mcspi.h> -#include <linux/platform_data/mtd-onenand-omap2.h> #include <linux/mfd/menelaus.h> #include <sound/tlv320aic3x.h>
@@ -32,7 +31,6 @@#include "common.h" #include "mmc.h" #include "soc.h" -#include "gpmc-onenand.h" #include "common-board-devices.h" #define TUSB6010_ASYNC_CS 1
arch/arm/mach-omap2/board-omap3pandora.c +1 -1
@@ -24,6 +24,7 @@#include <linux/spi/spi.h> #include <linux/regulator/machine.h> #include <linux/i2c/twl.h> +#include <linux/omap-gpmc.h> #include <linux/wl12xx.h> #include <linux/mtd/partitions.h> #include <linux/mtd/nand.h>
@@ -51,7 +52,6 @@#include "sdram-micron-mt46h32m32lf-6.h" #include "hsmmc.h" #include "common-board-devices.h" -#include "gpmc-nand.h" #define PANDORA_WIFI_IRQ_GPIO 21#define PANDORA_WIFI_NRESET_GPIO 23
arch/arm/mach-omap2/board-rx51-peripherals.c +1 -2
@@ -23,6 +23,7 @@#include <linux/regulator/machine.h> #include <linux/gpio.h> #include <linux/gpio_keys.h> +#include <linux/omap-gpmc.h> #include <linux/mmc/host.h> #include <linux/power/isp1704_charger.h> #include <linux/platform_data/spi-omap2-mcspi.h>
@@ -54,8 +55,6 @@#include "omap-pm.h" #include "hsmmc.h" #include "common-board-devices.h" -#include "gpmc.h" -#include "gpmc-onenand.h" #include "soc.h" #include "omap-secure.h"
arch/arm/mach-omap2/gpmc-nand.c +1 -2
@@ -13,13 +13,12 @@#include <linux/platform_device.h> #include <linux/io.h> #include <linux/mtd/nand.h> +#include <linux/platform_data/omap-gpmc.h> #include <linux/platform_data/mtd-nand-omap2.h> #include <asm/mach/flash.h> -#include "gpmc.h" #include "soc.h" -#include "gpmc-nand.h" /* minimum size for IO mapping */ #define NAND_IO_SIZE 4
arch/arm/mach-omap2/gpmc-onenand.c +1 -2
@@ -16,13 +16,12 @@#include <linux/mtd/onenand_regs.h> #include <linux/io.h> #include <linux/platform_data/mtd-onenand-omap2.h> +#include <linux/platform_data/omap-gpmc.h> #include <linux/err.h> #include <asm/mach/flash.h> -#include "gpmc.h" #include "soc.h" -#include "gpmc-onenand.h" #define ONENAND_IO_SIZE SZ_128K
arch/arm/mach-omap2/gpmc-onenand.h deleted +0 -24
@@ -1,24 +0,0 @@ -/* -* arch/arm/mach-omap2/gpmc-onenand.h -* -* This program is free software; you can redistribute it and/or modify it -* under the terms of the GNU General Public License as published by the -* Free Software Foundation; either version 2 of the License, or (at your -* option) any later version. -*/ - -#ifndef __OMAP2_GPMC_ONENAND_H -#define __OMAP2_GPMC_ONENAND_H - -#include <linux/platform_data/mtd-onenand-omap2.h> - -#if IS_ENABLED (CONFIG_MTD_ONENAND_OMAP2 ) -extern void gpmc_onenand_init (struct omap_onenand_platform_data *d); -#else -#define board_onenand_data NULL -static inline void gpmc_onenand_init (struct omap_onenand_platform_data *d) -{ -} -#endif - -#endif
arch/arm/mach-omap2/gpmc.c +59 -5
83 lines not on this page · raw message
arch/arm/mach-omap2/gpmc.h +6 -222
232 lines not on this page · raw message
arch/arm/mach-omap2/pm34xx.c +1 -1
@@ -29,6 +29,7 @@#include <linux/delay.h> #include <linux/slab.h> #include <linux/omap-dma.h> +#include <linux/omap-gpmc.h> #include <linux/platform_data/gpio-omap.h> #include <trace/events/power.h>
@@ -43,7 +44,6 @@#include "common.h" #include "cm3xxx.h" #include "cm-regbits-34xx.h" -#include "gpmc.h" #include "prm-regbits-34xx.h" #include "prm3xxx.h" #include "pm.h"
include/linux/omap-gpmc.h renamed from arch/arm/mach-omap2/gpmc-nand.h +13 -5
@@ -1,5 +1,5 @@/* -* arch/arm/mach-omap2/gpmc-nand.h +* OMAP GPMC (General Purpose Memory Controller) defines * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the
@@ -7,11 +7,12 @@* option) any later version. */ -#ifndef __OMAP2_GPMC_NAND_H -#define __OMAP2_GPMC_NAND_H +extern void omap3_gpmc_save_context (void ); +extern void omap3_gpmc_restore_context (void ); -#include "gpmc.h" -#include <linux/platform_data/mtd-nand-omap2.h> +struct gpmc_timings ; +struct omap_nand_platform_data ; +struct omap_onenand_platform_data ;#if IS_ENABLED (CONFIG_MTD_NAND_OMAP2 ) extern int gpmc_nand_init(struct omap_nand_platform_data *d,
@@ -24,4 +25,11 @@ static inline int gpmc_nand_init(struct omap_nand_platform_data *d, }#endif +#if IS_ENABLED (CONFIG_MTD_ONENAND_OMAP2 ) +extern void gpmc_onenand_init (struct omap_onenand_platform_data *d); +#else +#define board_onenand_data NULL +static inline void gpmc_onenand_init (struct omap_onenand_platform_data *d) +{ +}#endif
include/linux/platform_data/omap-gpmc.h new file +177 -0
177 lines not on this page · raw message
Signature · 1 line
2.1.3
PATCH 1/3 ARM: OMAP2+: Prepare to move GPMC to drivers by platform data header
Quoted 10 lines · Tony Lindgren
We still need to support platform data for omap3 until it's booting in device tree only mode. So let's add
platform_data/omap-gpmc.hfor that, and a minimallinux/omap-gpmc.hfor the save and restore used by the PM code.Let's also keep a minimal
mach-omap2/gpmc.hstill around to avoid churn on the board-*.c files. Once omap3 boots in device tree only mode, we can dropmach-omap2/gpmc.hand we can make the data structures inplatform_data/omap-gpmc.hprivate to the GPMC driver.
Quoted 5 lines
Note that we can now also remove
gpmc-nand.handgpmc-onenand.h.Cc Arnd Bergmann <[email protected]>Cc Roger Quadros <[email protected]>Signed-off-by Tony Lindgren <[email protected]>
cheers,
-roger
Tony Lindgren
maintainerPATCH v2 2/3 ARM: OMAP2+: Move GPMC initcall to devices.c
In reply to Tony LindgrenThis will us allow to just move gpmc.c to live under drivers in the next patch.
Note that we now also remove the omap specific check for the initcall. That's OK as gpmc_probe() checks for the pdata and bails out for other platforms compiled in.
Also the postcore_initcall() maybe possible to change to just regular module_init(), but let's do that in separate patch after the move to drivers is done.
--- arch/arm/mach-omap2/devices.c | 26 ++++++++++++++++++++++++++ arch/arm/mach-omap2/gpmc.c | 31 +------------------------------ 2 files changed, 27 insertions(+), 30 deletions(-)
arch/arm/mach-omap2/devices.c +26 -0
@@ -445,3 +445,29 @@ static int __init omap2_init_devices(void)return 0 ; }omap_arch_initcall (omap2_init_devices); + +static int __init omap_gpmc_init (void ) +{ +struct omap_hwmod *oh; +struct platform_device *pdev; +char *oh_name ="gpmc" ; + +/* +* if the board boots up with a populated DT, do not +* manually add the device from this initcall +*/ +if (of_have_populated_dt ()) +return -ENODEV ; + + oh =omap_hwmod_lookup (oh_name); +if (!oh) { +pr_err ("Could not look up %s\n" , oh_name); +return -ENODEV ; + } + + pdev =omap_device_build ("omap-gpmc" ,-1 , oh,NULL ,0 ); +WARN (IS_ERR (pdev),"could not build omap_device for %s\n" , oh_name); + +return PTR_RET (pdev); +} +omap_postcore_initcall (omap_gpmc_init);
arch/arm/mach-omap2/gpmc.c +1 -30
@@ -37,9 +37,6 @@#include <linux/platform_data/mtd-nand-omap2.h> #include <linux/platform_data/mtd-onenand-omap2.h> -#include "soc.h" -#include "omap_device.h" -#include <asm/mach-types.h> #define DEVICE_NAME "omap-gpmc"
@@ -2010,35 +2007,9 @@ static __exit void gpmc_exit(void) } -omap_postcore_initcall (gpmc_init); +postcore_initcall (gpmc_init);module_exit (gpmc_exit); -static int __init omap_gpmc_init (void ) -{ -struct omap_hwmod *oh; -struct platform_device *pdev; -char *oh_name ="gpmc" ; - -/* -* if the board boots up with a populated DT, do not -* manually add the device from this initcall -*/ -if (of_have_populated_dt ()) -return -ENODEV ; - - oh =omap_hwmod_lookup (oh_name); -if (!oh) { -pr_err ("Could not look up %s\n" , oh_name); -return -ENODEV ; - } - - pdev =omap_device_build (DEVICE_NAME ,-1 , oh,NULL ,0 ); -WARN (IS_ERR (pdev),"could not build omap_device for %s\n" , oh_name); - -return PTR_RET (pdev); -} -omap_postcore_initcall (omap_gpmc_init); -static irqreturn_t gpmc_handle_irq (int irq,void *dev) {int i;
Signature · 1 line
2.1.3
Tony Lindgren
maintainerPATCH v2 3/3 memory: gpmc: Move omap gpmc code to live under drivers
In reply to Tony LindgrenJust move to drivers as further clean-up can now happen there finally.
Let's also add Roger and me to the MAINTAINERS so we get notified for any patches related to GPMC.
--- MAINTAINERS | 8 ++++++++ arch/arm/mach-omap2/Kconfig | 2 ++ arch/arm/mach-omap2/Makefile | 2 +- drivers/memory/Kconfig | 8 ++++++++ drivers/memory/Makefile | 1 + arch/arm/mach-omap2/gpmc.c => drivers/memory/omap-gpmc.c | 0 6 files changed, 20 insertions(+), 1 deletion(-) rename arch/arm/mach-omap2/gpmc.c => drivers/memory/omap-gpmc.c (100%)
MAINTAINERS +8 -0
@@ -6629,6 +6629,14 @@ L: linux-omap at vger.kernel.org S: Maintained F: sound/soc/omap/ +OMAP GENERAL PURPOSE MEMORY CONTROLLER SUPPORT +M: Roger Quadros <[email protected]> +M: Tony Lindgren <[email protected]> +L: linux-omap at vger.kernel.org +S: Maintained +F: drivers/memory/omap-gpmc.c +F: arch/arm/mach-omap2/*gpmc* + OMAP FRAMEBUFFER SUPPORT M: Tomi Valkeinen <[email protected]> L: linux-fbdev at vger.kernel.org
arch/arm/mach-omap2/Kconfig +2 -0
@@ -79,7 +79,9 @@ config ARCH_OMAP2PLUS select CLKSRC_MMIO select GENERIC_IRQ_CHIP select MACH_OMAP_GENERIC + select MEMORY select OMAP_DM_TIMER + select OMAP_GPMC select PINCTRL select SOC_BUS select TI_PRIV_EDMA
arch/arm/mach-omap2/Makefile +1 -1
@@ -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
drivers/memory/Kconfig +8 -0
@@ -41,6 +41,14 @@ config TI_EMIF parameters and other settings during frequency, voltage and temperature changes +config OMAP_GPMC + bool + help + 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. + config MVEBU_DEVBUS bool "Marvell EBU Device Bus Controller" default y
drivers/memory/Makefile +1 -0
@@ -8,6 +8,7 @@ endif obj-$(CONFIG_ATMEL_SDRAMC) += atmel-sdramc.o obj-$(CONFIG_TI_AEMIF) += ti-aemif.o obj-$(CONFIG_TI_EMIF) += emif.o +obj-$(CONFIG_OMAP_GPMC) += omap-gpmc.o obj-$(CONFIG_FSL_CORENET_CF) += fsl-corenet-cf.o obj-$(CONFIG_FSL_IFC) += fsl_ifc.o obj-$(CONFIG_MVEBU_DEVBUS) += mvebu-devbus.o
drivers/memory/omap-gpmc.c renamed from arch/arm/mach-omap2/gpmc.c +0 -0
Signature · 1 line
2.1.3
PATCH 3/3 memory: gpmc: Move omap gpmc code to live under drivers
Quoted 70 lines · Tony Lindgren
Just move to drivers as further clean-up can now happen there finally.
Let's also add Roger and me to the
MAINTAINERSso we get notified for any patches related to GPMC.Cc Arnd Bergmann <[email protected]>Cc Roger Quadros <[email protected]>Signed-off-by Tony Lindgren <[email protected]>--- MAINTAINERS | 8 ++++++++ arch/arm/mach-omap2/Kconfig | 2 ++ arch/arm/mach-omap2/Makefile | 2 +- drivers/memory/Kconfig | 8 ++++++++ drivers/memory/Makefile | 1 + arch/arm/mach-omap2/gpmc.c => drivers/memory/omap-gpmc.c | 0 6 files changed, 20 insertions(+), 1 deletion(-) rename arch/arm/mach-omap2/gpmc.c => drivers/memory/omap-gpmc.c (100%)MAINTAINERS +8
-0@@ -6629,6 +6629,14 @@ L: linux-omap at vger.kernel.org S: Maintained F: sound/soc/omap/ +OMAP GENERAL PURPOSE MEMORY CONTROLLER SUPPORT +M: Roger Quadros <[email protected]> +M: Tony Lindgren <[email protected]> +L: linux-omap at vger.kernel.org +S: Maintained +F: drivers/memory/omap-gpmc.c +F: arch/arm/mach-omap2/*gpmc* + OMAP FRAMEBUFFER SUPPORT M: Tomi Valkeinen <[email protected]> L: linux-fbdev at vger.kernel.orgarch/arm/mach-omap2/Kconfig +2
-0@@ -79,7 +79,9 @@ config ARCH_OMAP2PLUS select CLKSRC_MMIO select GENERIC_IRQ_CHIP select MACH_OMAP_GENERIC + select MEMORY select OMAP_DM_TIMER + select OMAP_GPMC select PINCTRL select SOC_BUS select TI_PRIV_EDMAarch/arm/mach-omap2/Makefile +1
-1@@ -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.odrivers/memory/Kconfig +0
-0
drivers/memory/Kconfig config TI_EMIF · line 45
Quoted 5 lines
drivers/memory/Kconfig +2
-0@@ -41,6 +41,14 @@ config TI_EMIF parameters and other settings during frequency, voltage and temperature changes +config OMAP_GPMC + bool
shouldn't you make this selectable ? I might want to build a kernel without GPMC support because my board just doesn't use GPMC :-)
Signature · 8 lines
balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141121/ea451d7f/attachment.sig>
Tony Lindgren
maintainerPATCH v2 3/3 memory: gpmc: Move omap gpmc code to live under drivers
Quoted 7 lines · Felipe Balbi
Quoted 6 lines · Tony Lindgren
drivers/memory/Kconfig +0
-0@@ -41,6 +41,14 @@ config TI_EMIF parameters and other settings during frequency, voltage and temperature changes
Quoted 5 lines
drivers/memory/Kconfig config TI_EMIF · line 45
Quoted 2 lines
drivers/memory/Kconfig +2
-0+config OMAP_GPMC + boolshouldn't you make this selectable ? I might want to build a kernel without GPMC support because my board just doesn't use GPMC :-)
Eventually yes, but let's keep it separate from this move. We'd have to do something like this:
- Make omap MTD drivers depend on OMAP_GPMC
- Make tusb6010 depend on OMAP_GPMC
- Make smc911x depend on OMAP_GPMC
- Build arch/arm/mach-omap2/*gpmc*.c conditionally depending on OMAP_GPMC
Adding stubs for omap-gpmc probably does not make sense as these devices really depend on GPMC.
Regards,
Tony
PATCH 3/3 memory: gpmc: Move omap gpmc code to live under drivers
In reply to Tony LindgrenTony,
Quoted 70 lines · Tony Lindgren
Just move to drivers as further clean-up can now happen there finally.
Let's also add Roger and me to the
MAINTAINERSso we get notified for any patches related to GPMC.Cc Arnd Bergmann <[email protected]>Cc Roger Quadros <[email protected]>Signed-off-by Tony Lindgren <[email protected]>--- MAINTAINERS | 8 ++++++++ arch/arm/mach-omap2/Kconfig | 2 ++ arch/arm/mach-omap2/Makefile | 2 +- drivers/memory/Kconfig | 8 ++++++++ drivers/memory/Makefile | 1 + arch/arm/mach-omap2/gpmc.c => drivers/memory/omap-gpmc.c | 0 6 files changed, 20 insertions(+), 1 deletion(-) rename arch/arm/mach-omap2/gpmc.c => drivers/memory/omap-gpmc.c (100%)MAINTAINERS +8
-0@@ -6629,6 +6629,14 @@ L: linux-omap at vger.kernel.org S: Maintained F: sound/soc/omap/ +OMAP GENERAL PURPOSE MEMORY CONTROLLER SUPPORT +M: Roger Quadros <[email protected]> +M: Tony Lindgren <[email protected]> +L: linux-omap at vger.kernel.org +S: Maintained +F: drivers/memory/omap-gpmc.c +F: arch/arm/mach-omap2/*gpmc* + OMAP FRAMEBUFFER SUPPORT M: Tomi Valkeinen <[email protected]> L: linux-fbdev at vger.kernel.orgarch/arm/mach-omap2/Kconfig +2
-0@@ -79,7 +79,9 @@ config ARCH_OMAP2PLUS select CLKSRC_MMIO select GENERIC_IRQ_CHIP select MACH_OMAP_GENERIC + select MEMORY select OMAP_DM_TIMER + select OMAP_GPMC select PINCTRL select SOC_BUS select TI_PRIV_EDMAarch/arm/mach-omap2/Makefile +1
-1@@ -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.odrivers/memory/Kconfig +0
-0
drivers/memory/Kconfig config TI_EMIF · line 45
Quoted 5 lines
drivers/memory/Kconfig +2
-0@@ -41,6 +41,14 @@ config TI_EMIF parameters and other settings during frequency, voltage and temperature changes +config OMAP_GPMC + bool
We should depend on ARCH_OMAP2PLUS. Other platforms won't benefit anything from this driver.
drivers/memory/omap-gpmc.c
Quoted 26 lines
drivers/memory/Kconfig +6
-0+ help + 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. + config MVEBU_DEVBUS bool "Marvell EBU Device Bus Controller" default ydrivers/memory/Makefile +1
-0@@ -8,6 +8,7 @@ endif obj-$(CONFIG_ATMEL_SDRAMC) += atmel-sdramc.o obj-$(CONFIG_TI_AEMIF) += ti-aemif.o obj-$(CONFIG_TI_EMIF) += emif.o +obj-$(CONFIG_OMAP_GPMC) += omap-gpmc.o obj-$(CONFIG_FSL_CORENET_CF) += fsl-corenet-cf.o obj-$(CONFIG_FSL_IFC) += fsl_ifc.o obj-$(CONFIG_MVEBU_DEVBUS) += mvebu-devbus.odrivers/memory/omap-gpmc.c renamed from arch/arm/mach-omap2/gpmc.c +0
-0
cheers,
-roger
Tony Lindgren
maintainerPATCH v2 3/3 memory: gpmc: Move omap gpmc code to live under drivers
Quoted 7 lines · Roger Quadros
Quoted 6 lines · Tony Lindgren
drivers/memory/Kconfig +0
-0@@ -41,6 +41,14 @@ config TI_EMIF parameters and other settings during frequency, voltage and temperature changes
Quoted 5 lines
drivers/memory/Kconfig config TI_EMIF · line 45
Quoted 2 lines
drivers/memory/Kconfig +2
-0+config OMAP_GPMC + boolWe should depend on
ARCH_OMAP2PLUS. Other platforms won't benefit anything from this driver.
We can't do that yet until we have sorted out the remaining platform data issues with arch/arm/mach-omap2/*gpmc*.c files.
So OMAP_GPMC is currently a silent Kconfig option that does not show up as the description after the bool is not there, we select OMAP_GPMC automatically based on ARCH_OMAP2PLUS.
Once we have the remaining legacy code issues sorted out, we can make this into just a regular device driver.
Regards,
Tony
PATCH 3/3 memory: gpmc: Move omap gpmc code to live under drivers
Quoted 17 lines · Tony Lindgren
Quoted 7 lines · Roger Quadros
Quoted 6 lines · Tony Lindgren
drivers/memory/Kconfig +0
-0@@ -41,6 +41,14 @@ config TI_EMIF parameters and other settings during frequency, voltage and temperature changesQuoted 5 lines
drivers/memory/Kconfig config TI_EMIF · line 45
Quoted 2 lines
drivers/memory/Kconfig +2
-0+config OMAP_GPMC + boolWe should depend on
ARCH_OMAP2PLUS. Other platforms won't benefit anything from this driver.We can't do that yet until we have sorted out the remaining platform data issues with
arch/arm/mach-omap2/*gpmc*.cfiles.
Quoted 6 lines
So
OMAP_GPMCis currently a silentKconfigoption that does not show up as the description after the bool is not there, we selectOMAP_GPMCautomatically based onARCH_OMAP2PLUS.Once we have the remaining legacy code issues sorted out, we can make this into just a regular device driver.
OK. In that case,
cheers,
-roger
Tony Lindgren
maintainerPATCH v2 3/3 memory: gpmc: Move omap gpmc code to live under drivers
Quoted 22 lines · Roger Quadros
Quoted 21 lines · Tony Lindgren
Quoted 7 lines · Roger Quadros
Quoted 6 lines · Tony Lindgren
drivers/memory/Kconfig +0
-0@@ -41,6 +41,14 @@ config TI_EMIF parameters and other settings during frequency, voltage and temperature changesQuoted 5 lines
drivers/memory/Kconfig config TI_EMIF · line 45
Quoted 2 lines
drivers/memory/Kconfig +2
-0+config OMAP_GPMC + boolWe should depend on
ARCH_OMAP2PLUS. Other platforms won't benefit anything from this driver.We can't do that yet until we have sorted out the remaining platform data issues with
arch/arm/mach-omap2/*gpmc*.cfiles.So
OMAP_GPMCis currently a silentKconfigoption that does not show up as the description after the bool is not there, we selectOMAP_GPMCautomatically based onARCH_OMAP2PLUS.
Quoted 6 lines
Quoted 2 lines
Once we have the remaining legacy code issues sorted out, we can make this into just a regular device driver.
OK. In that case,
Acked-by Roger Quadros <[email protected]>
Thanks. FYI I did the move now based on what Arnd and I discussed on #armlinux as we were trying to figure out if the earlier gpmc changes should be merged to drivers branch.
Arnd, to prettify the diffstats for the arm-soc drivers branch, I've just sent a pull request for these as:
"[GIT PULL] move omap gpmc to drivers finally".
Regards,
Tony