ARM: OMAP2+: remove unnecesary include in gpmc driver
Subsystems (6)
PATCH 1/2 ARM: OMAP2+: remove unnecesary include in gpmc driver
The GPMC driver includes arch/arm/mach-omap2/common.h but it does not use anything on that header so can be removed.
--- arch/arm/mach-omap2/gpmc.c | 1 - 1 file changed, 1 deletion(-)
arch/arm/mach-omap2/gpmc.c +0 -1
@@ -37,7 +37,6 @@#include <asm/mach-types.h> #include "soc.h" -#include "common.h" #include "omap_device.h" #include "gpmc.h" #include "gpmc-nand.h"
Signature · 1 line
1.8.4.rc3
PATCH 2/2 ARM: OMAP2+: move gpmc headers to include/linux/platform_data
The OMAP2+ General-Purpose Memory Controller (GPMC) driver should eventually be moved from arch/arm/mach-omap2 to drivers/memory. Unfortunately this is not trivial since it includes headers files that still resides under mach-omap2 and can't be moved easilly.
This patch is the first step for taking the gpmc driver outside arch/arm/mach-omap2 by moving its related headers files to include/linux/platform_data.
---
Hi Tony,
I wonder what's your plan to move drivers outside of mach-omap2. Currently this driver still includes soc.h and omap_device.h that are on mach-omap2.
If we want to move out these two headers files then also omap hwmod and per SoC family headers have to be moved out mach-omap2.
Do you want me to do a follow-up patch-set to move all these headers out of mach-omap2 so the gpmc and other drivers can be moved to drivers/?
Is include/linux/platform_data the right place to put these headers or there is a better place for them?
Thanks a lot and best regards,
Javier
arch/arm/mach-omap2/board-2430sdp.c | 5 +- arch/arm/mach-omap2/board-3430sdp.c | 4 +- arch/arm/mach-omap2/board-cm-t35.c | 6 +- arch/arm/mach-omap2/board-cm-t3517.c | 4 +- arch/arm/mach-omap2/board-devkit8000.c | 2 +- arch/arm/mach-omap2/board-flash.c | 6 +- arch/arm/mach-omap2/board-flash.h | 2 +- arch/arm/mach-omap2/board-h4.c | 5 +- arch/arm/mach-omap2/board-ldp.c | 4 +- arch/arm/mach-omap2/board-n8x0.c | 3 +- arch/arm/mach-omap2/board-omap3beagle.c | 2 +- arch/arm/mach-omap2/board-omap3logic.c | 5 +- arch/arm/mach-omap2/board-omap3pandora.c | 3 +- arch/arm/mach-omap2/board-omap3stalker.c | 4 +- arch/arm/mach-omap2/board-omap3touchbook.c | 2 +- arch/arm/mach-omap2/board-overo.c | 4 +- arch/arm/mach-omap2/board-rx51-peripherals.c | 6 +- arch/arm/mach-omap2/board-rx51.c | 2 +- arch/arm/mach-omap2/gpmc-nand.c | 4 +- arch/arm/mach-omap2/gpmc-nand.h | 27 --- arch/arm/mach-omap2/gpmc-onenand.c | 4 +- arch/arm/mach-omap2/gpmc-onenand.h | 24 --- arch/arm/mach-omap2/gpmc-smc91x.c | 4 +- arch/arm/mach-omap2/gpmc-smc91x.h | 42 ----- arch/arm/mach-omap2/gpmc-smsc911x.c | 4 +- arch/arm/mach-omap2/gpmc-smsc911x.h | 35 ---- arch/arm/mach-omap2/gpmc.c | 7 +- arch/arm/mach-omap2/gpmc.h | 231 ----------------------- arch/arm/mach-omap2/pm34xx.c | 2 +- arch/arm/mach-omap2/usb-tusb6010.c | 3 +- include/linux/platform_data/gpmc-nand-omap.h | 27 +++ include/linux/platform_data/gpmc-omap.h | 231 +++++++++++++++++++++++ include/linux/platform_data/gpmc-onenand-omap.h | 25 +++ include/linux/platform_data/gpmc-smc91x-omap.h | 42 +++++ include/linux/platform_data/gpmc-smsc911x-omap.h | 35 ++++ 35 files changed, 403 insertions(+), 413 deletions(-) delete mode 100644 arch/arm/mach-omap2/gpmc-nand.h delete mode 100644 arch/arm/mach-omap2/gpmc-onenand.h delete mode 100644 arch/arm/mach-omap2/gpmc-smc91x.h delete mode 100644 arch/arm/mach-omap2/gpmc-smsc911x.h delete mode 100644 arch/arm/mach-omap2/gpmc.h create mode 100644 include/linux/platform_data/gpmc-nand-omap.h create mode 100644 include/linux/platform_data/gpmc-omap.h create mode 100644 include/linux/platform_data/gpmc-onenand-omap.h create mode 100644 include/linux/platform_data/gpmc-smc91x-omap.h create mode 100644 include/linux/platform_data/gpmc-smsc911x-omap.h
arch/arm/mach-omap2/board-2430sdp.c +3 -2
@@ -34,8 +34,9 @@#include <asm/mach/map.h> #include "common.h" -#include "gpmc.h" -#include "gpmc-smc91x.h" + +#include <linux/platform_data/gpmc-omap.h> +#include <linux/platform_data/gpmc-smc91x-omap.h> #include <video/omapdss.h> #include <video/omap-panel-data.h>
arch/arm/mach-omap2/board-3430sdp.c +2 -2
@@ -37,8 +37,8 @@#include <video/omapdss.h> #include <video/omap-panel-data.h> -#include "gpmc.h" -#include "gpmc-smc91x.h" +#include <linux/platform_data/gpmc-omap.h> +#include <linux/platform_data/gpmc-smc91x-omap.h> #include "soc.h" #include "board-flash.h"
arch/arm/mach-omap2/board-cm-t35.c +3 -3
@@ -49,8 +49,8 @@#include "sdram-micron-mt46h32m32lf-6.h" #include "hsmmc.h" #include "common-board-devices.h" -#include "gpmc.h" -#include "gpmc-nand.h" +#include <linux/platform_data/gpmc-omap.h> +#include <linux/platform_data/gpmc-nand-omap.h> #define CM_T35_GPIO_PENDOWN 57#define SB_T35_USB_HUB_RESET_GPIO 167
@@ -62,7 +62,7 @@#if defined(CONFIG_SMSC911X ) || defined(CONFIG_SMSC911X_MODULE )#include <linux/smsc911x.h> -#include "gpmc-smsc911x.h" +#include <linux/platform_data/gpmc-smsc911x-omap.h> static struct omap_smsc911x_platform_data cm_t35_smsc911x_cfg = { .id = 0,
arch/arm/mach-omap2/board-cm-t3517.c +1 -3
@@ -40,8 +40,7 @@#include <asm/mach/map.h> #include "common.h" -#include <linux/platform_data/mtd-nand-omap2.h> -#include "gpmc.h" +#include <linux/platform_data/gpmc-nand-omap.h> #include "am35xx.h"
@@ -50,7 +49,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-devkit8000.c +1 -1
@@ -40,7 +40,7 @@#include <asm/mach/flash.h> #include "common.h" -#include "gpmc.h" +#include <linux/platform_data/gpmc-omap.h> #include <linux/platform_data/mtd-nand-omap2.h> #include <video/omapdss.h> #include <video/omap-panel-data.h>
arch/arm/mach-omap2/board-flash.c +2 -4
@@ -17,14 +17,12 @@#include <linux/mtd/physmap.h> #include <linux/io.h> -#include <linux/platform_data/mtd-nand-omap2.h> -#include <linux/platform_data/mtd-onenand-omap2.h> +#include <linux/platform_data/gpmc-nand-omap.h> +#include <linux/platform_data/gpmc-onenand-omap.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 +1 -1
@@ -12,7 +12,7 @@*/ #include <linux/mtd/mtd.h> #include <linux/mtd/partitions.h> -#include "gpmc.h" +#include <linux/platform_data/gpmc-omap.h> #define PDC_NOR 1#define PDC_NAND 2
arch/arm/mach-omap2/board-h4.c +3 -2
@@ -36,11 +36,12 @@#include <video/omapdss.h> #include <video/omap-panel-data.h> +#include <linux/platform_data/gpmc-omap.h> +#include <linux/platform_data/gpmc-smc91x-omap.h> +#include "common.h" #include "mux.h" #include "control.h" -#include "gpmc.h" -#include "gpmc-smc91x.h" #define H4_FLASH_CS 0
arch/arm/mach-omap2/board-ldp.c +2 -2
@@ -36,8 +36,8 @@#include <asm/mach/map.h> #include "common.h" -#include "gpmc.h" -#include "gpmc-smsc911x.h" +#include <linux/platform_data/gpmc-omap.h> +#include <linux/platform_data/gpmc-smsc911x-omap.h> #include <video/omapdss.h> #include <video/omap-panel-data.h>
arch/arm/mach-omap2/board-n8x0.c +1 -2
@@ -23,7 +23,7 @@#include <linux/usb/musb.h> #include <linux/platform_data/i2c-cbus-gpio.h> #include <linux/platform_data/spi-omap2-mcspi.h> -#include <linux/platform_data/mtd-onenand-omap2.h> +#include <linux/platform_data/gpmc-onenand-omap.h> #include <linux/mfd/menelaus.h> #include <sound/tlv320aic3x.h>
@@ -34,7 +34,6 @@#include "mmc.h" #include "mux.h" -#include "gpmc-onenand.h" #define TUSB6010_ASYNC_CS 1#define TUSB6010_SYNC_CS 4
arch/arm/mach-omap2/board-omap3beagle.c +1 -1
@@ -46,10 +46,10 @@#include <video/omapdss.h> #include <video/omap-panel-data.h> #include <linux/platform_data/mtd-nand-omap2.h> +#include <linux/platform_data/gpmc-omap.h> #include "common.h" #include "omap_device.h" -#include "gpmc.h" #include "soc.h" #include "mux.h" #include "hsmmc.h"
arch/arm/mach-omap2/board-omap3logic.c +3 -2
@@ -35,13 +35,14 @@#include <asm/mach/arch.h> #include <asm/mach/map.h> +#include <linux/platform_data/gpmc-omap.h> +#include <linux/platform_data/gpmc-smsc911x-omap.h> +#include "common.h" #include "mux.h" #include "hsmmc.h" #include "control.h" #include "common-board-devices.h" -#include "gpmc.h" -#include "gpmc-smsc911x.h" #define OMAP3LOGIC_SMSC911X_CS 1
arch/arm/mach-omap2/board-omap3pandora.c +1 -2
@@ -45,13 +45,12 @@#include "common.h" #include <video/omapdss.h> #include <video/omap-panel-data.h> -#include <linux/platform_data/mtd-nand-omap2.h> +#include <linux/platform_data/gpmc-nand-omap.h> #include "mux.h" #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-omap3stalker.c +2 -2
@@ -41,7 +41,7 @@#include <asm/mach/flash.h> #include "common.h" -#include "gpmc.h" +#include <linux/platform_data/gpmc-omap.h> #include <linux/platform_data/mtd-nand-omap2.h> #include <video/omapdss.h> #include <video/omap-panel-data.h>
@@ -54,7 +54,7 @@#include "common-board-devices.h" #if defined(CONFIG_SMSC911X ) || defined(CONFIG_SMSC911X_MODULE ) -#include "gpmc-smsc911x.h" +#include <linux/platform_data/gpmc-smsc911x-omap.h> #define OMAP3STALKER_ETHR_START 0x2c000000#define OMAP3STALKER_ETHR_SIZE 1024
arch/arm/mach-omap2/board-omap3touchbook.c +1 -1
@@ -45,7 +45,7 @@#include <asm/system_info.h> #include "common.h" -#include "gpmc.h" +#include <linux/platform_data/gpmc-omap.h> #include <linux/platform_data/mtd-nand-omap2.h> #include "mux.h"
arch/arm/mach-omap2/board-overo.c +2 -2
@@ -40,6 +40,7 @@#include <linux/platform_data/mtd-nand-omap2.h> #include <linux/platform_data/spi-omap2-mcspi.h> +#include <linux/platform_data/gpmc-omap.h> #include <asm/mach-types.h> #include <asm/mach/arch.h>
@@ -52,7 +53,6 @@#include "common.h" #include "mux.h" #include "sdram-micron-mt46h32m32lf-6.h" -#include "gpmc.h" #include "hsmmc.h" #include "board-flash.h" #include "common-board-devices.h"
@@ -120,7 +120,7 @@ static inline void __init overo_ads7846_init(void) { return; }#if defined(CONFIG_SMSC911X ) || defined(CONFIG_SMSC911X_MODULE )#include <linux/smsc911x.h> -#include "gpmc-smsc911x.h" +#include <linux/platform_data/gpmc-smsc911x-omap.h> static struct omap_smsc911x_platform_data smsc911x_cfg = { .id = 0,
arch/arm/mach-omap2/board-rx51-peripherals.c +2 -4
@@ -26,13 +26,13 @@#include <linux/mmc/host.h> #include <linux/power/isp1704_charger.h> #include <linux/platform_data/spi-omap2-mcspi.h> -#include <linux/platform_data/mtd-onenand-omap2.h> +#include <linux/platform_data/gpmc-onenand-omap.h> +#include <linux/platform_data/gpmc-smc91x-omap.h> #include <asm/system_info.h> #include "common.h" #include <linux/omap-dma.h> -#include "gpmc-smc91x.h" #include "board-rx51.h"
@@ -55,8 +55,6 @@#include "omap-pm.h" #include "hsmmc.h" #include "common-board-devices.h" -#include "gpmc.h" -#include "gpmc-onenand.h" #define SYSTEM_REV_B_USES_VAUX3 0x1699#define SYSTEM_REV_S_USES_VAUX3 0x8
arch/arm/mach-omap2/board-rx51.c +1 -1
@@ -20,6 +20,7 @@#include <linux/usb/phy.h> #include <linux/usb/musb.h> #include <linux/platform_data/spi-omap2-mcspi.h> +#include <linux/platform_data/gpmc-omap.h> #include <asm/mach-types.h> #include <asm/mach/arch.h>
@@ -29,7 +30,6 @@#include "common.h" #include "mux.h" -#include "gpmc.h" #include "pm.h" #include "sdram-nokia.h"
arch/arm/mach-omap2/gpmc-nand.c +1 -3
@@ -13,13 +13,11 @@#include <linux/platform_device.h> #include <linux/io.h> #include <linux/mtd/nand.h> -#include <linux/platform_data/mtd-nand-omap2.h> +#include <linux/platform_data/gpmc-nand-omap.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-nand.h deleted +0 -27
@@ -1,27 +0,0 @@ -/* -* arch/arm/mach-omap2/gpmc-nand.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_NAND_H -#define __OMAP2_GPMC_NAND_H - -#include "gpmc.h" -#include <linux/platform_data/mtd-nand-omap2.h> - -#if IS_ENABLED (CONFIG_MTD_NAND_OMAP2 ) -extern int gpmc_nand_init (struct omap_nand_platform_data *d, -struct gpmc_timings *gpmc_t); -#else -static inline int gpmc_nand_init (struct omap_nand_platform_data *d, -struct gpmc_timings *gpmc_t) -{ -return 0 ; -} -#endif - -#endif
arch/arm/mach-omap2/gpmc-onenand.c +1 -3
@@ -15,14 +15,12 @@#include <linux/platform_device.h> #include <linux/mtd/onenand_regs.h> #include <linux/io.h> -#include <linux/platform_data/mtd-onenand-omap2.h> +#include <linux/platform_data/gpmc-onenand-omap.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-smc91x.c +2 -2
@@ -17,8 +17,8 @@#include <linux/io.h> #include <linux/smc91x.h> -#include "gpmc.h" -#include "gpmc-smc91x.h" +#include <linux/platform_data/gpmc-omap.h> +#include <linux/platform_data/gpmc-smc91x-omap.h> #include "soc.h"
arch/arm/mach-omap2/gpmc-smc91x.h deleted +0 -42
42 lines not on this page · raw message
arch/arm/mach-omap2/gpmc-smsc911x.c +2 -2
@@ -20,8 +20,8 @@#include <linux/io.h> #include <linux/smsc911x.h> -#include "gpmc.h" -#include "gpmc-smsc911x.h" +#include <linux/platform_data/gpmc-omap.h> +#include <linux/platform_data/gpmc-smsc911x-omap.h> static struct resource gpmc_smsc911x_resources[] = { [0 ] = {
arch/arm/mach-omap2/gpmc-smsc911x.h deleted +0 -35
@@ -1,35 +0,0 @@ -/* -* arch/arm/plat-omap/include/plat/gpmc-smsc911x.h -* -* Copyright (C) 2009 Li-Pro.Net -* Stephan Linz <[email protected]> -* -* Modified from arch/arm/plat-omap/include/plat/gpmc-smc91x.h -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -*/ - -#ifndef __ASM_ARCH_OMAP_GPMC_SMSC911X_H__ - -struct omap_smsc911x_platform_data { -int id; -int cs; -int gpio_irq; -int gpio_reset; -u32 flags; -}; - -#if defined(CONFIG_SMSC911X ) || defined(CONFIG_SMSC911X_MODULE ) - -extern void gpmc_smsc911x_init (struct omap_smsc911x_platform_data *d); - -#else - -static inline void gpmc_smsc911x_init (struct omap_smsc911x_platform_data *d) -{ -} - -#endif -#endif
arch/arm/mach-omap2/gpmc.c +3 -4
@@ -32,15 +32,14 @@#include <linux/mtd/nand.h> #include <linux/pm_runtime.h> -#include <linux/platform_data/mtd-nand-omap2.h> +#include <linux/platform_data/gpmc-omap.h> +#include <linux/platform_data/gpmc-nand-omap.h> +#include <linux/platform_data/gpmc-onenand-omap.h> #include <asm/mach-types.h> #include "soc.h" #include "omap_device.h" -#include "gpmc.h" -#include "gpmc-nand.h" -#include "gpmc-onenand.h" #define DEVICE_NAME "omap-gpmc"
arch/arm/mach-omap2/gpmc.h deleted +0 -231
231 lines not on this page · raw message
arch/arm/mach-omap2/pm34xx.c +1 -1
@@ -30,6 +30,7 @@#include <linux/slab.h> #include <linux/omap-dma.h> #include <linux/platform_data/gpio-omap.h> +#include <linux/platform_data/gpmc-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"
arch/arm/mach-omap2/usb-tusb6010.c +1 -2
@@ -17,11 +17,10 @@#include <linux/gpio.h> #include <linux/export.h> #include <linux/platform_data/usb-omap.h> +#include <linux/platform_data/gpmc-omap.h> #include <linux/usb/musb.h> -#include "gpmc.h" -#include "mux.h" static u8 async_cs, sync_cs;
include/linux/platform_data/gpmc-nand-omap.h new file +27 -0
@@ -0,0 +1,27 @@ +/* +* arch/arm/mach-omap2/gpmc-nand.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_NAND_H +#define __OMAP2_GPMC_NAND_H + +#include <linux/platform_data/gpmc-omap.h> +#include <linux/platform_data/mtd-nand-omap2.h> + +#if IS_ENABLED (CONFIG_MTD_NAND_OMAP2 ) +extern int gpmc_nand_init (struct omap_nand_platform_data *d, +struct gpmc_timings *gpmc_t); +#else +static inline int gpmc_nand_init (struct omap_nand_platform_data *d, +struct gpmc_timings *gpmc_t) +{ +return 0 ; +} +#endif + +#endif
include/linux/platform_data/gpmc-omap.h new file +231 -0
231 lines not on this page · raw message
include/linux/platform_data/gpmc-onenand-omap.h new file +25 -0
@@ -0,0 +1,25 @@ +/* +* 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/gpmc-omap.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
include/linux/platform_data/gpmc-smc91x-omap.h new file +42 -0
42 lines not on this page · raw message
include/linux/platform_data/gpmc-smsc911x-omap.h new file +35 -0
@@ -0,0 +1,35 @@ +/* +* arch/arm/plat-omap/include/plat/gpmc-smsc911x.h +* +* Copyright (C) 2009 Li-Pro.Net +* Stephan Linz <[email protected]> +* +* Modified from arch/arm/plat-omap/include/plat/gpmc-smc91x.h +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +#ifndef __ASM_ARCH_OMAP_GPMC_SMSC911X_H__ + +struct omap_smsc911x_platform_data { +int id; +int cs; +int gpio_irq; +int gpio_reset; +u32 flags; +}; + +#if defined(CONFIG_SMSC911X ) || defined(CONFIG_SMSC911X_MODULE ) + +extern void gpmc_smsc911x_init (struct omap_smsc911x_platform_data *d); + +#else + +static inline void gpmc_smsc911x_init (struct omap_smsc911x_platform_data *d) +{ +} + +#endif +#endif
Signature · 1 line
1.8.4.rc3
PATCH 2/2 ARM: OMAP2+: move gpmc headers to include/linux/platform_data
Hey Javier,
Quoted 70 lines · Javier Martinez Canillas
The OMAP2+ General-Purpose Memory Controller (GPMC) driver should eventually be moved from
arch/arm/mach-omap2todrivers/memory. Unfortunately this is not trivial since it includes headers files that still resides under mach-omap2 and can't be moved easilly.This patch is the first step for taking the gpmc driver outside
arch/arm/mach-omap2by moving its related headers files toinclude/linux/platform_data.Signed-off-by Javier Martinez Canillas <[email protected]>---
Hi Tony,
I wonder what's your plan to move drivers outside of mach-omap2. Currently this driver still includes
soc.handomap_device.hthat are on mach-omap2.If we want to move out these two headers files then also omap hwmod and per SoC family headers have to be moved out mach-omap2.
Do you want me to do a follow-up patch-set to move all these headers out of mach-omap2 so the gpmc and other drivers can be moved to
drivers/?Is
include/linux/platform_datathe right place to put these headers or there is a better place for them?Thanks a lot and best regards,
Javierarch/arm/mach-omap2/board-2430sdp.c | 5 +- arch/arm/mach-omap2/board-3430sdp.c | 4 +- arch/arm/mach-omap2/board-cm-t35.c | 6 +- arch/arm/mach-omap2/board-cm-t3517.c | 4 +- arch/arm/mach-omap2/board-devkit8000.c | 2 +- arch/arm/mach-omap2/board-flash.c | 6 +- arch/arm/mach-omap2/board-flash.h | 2 +- arch/arm/mach-omap2/board-h4.c | 5 +- arch/arm/mach-omap2/board-ldp.c | 4 +- arch/arm/mach-omap2/board-n8x0.c | 3 +- arch/arm/mach-omap2/board-omap3beagle.c | 2 +- arch/arm/mach-omap2/board-omap3logic.c | 5 +- arch/arm/mach-omap2/board-omap3pandora.c | 3 +- arch/arm/mach-omap2/board-omap3stalker.c | 4 +- arch/arm/mach-omap2/board-omap3touchbook.c | 2 +- arch/arm/mach-omap2/board-overo.c | 4 +- arch/arm/mach-omap2/board-rx51-peripherals.c | 6 +- arch/arm/mach-omap2/board-rx51.c | 2 +- arch/arm/mach-omap2/gpmc-nand.c | 4 +- arch/arm/mach-omap2/gpmc-nand.h | 27 --- arch/arm/mach-omap2/gpmc-onenand.c | 4 +- arch/arm/mach-omap2/gpmc-onenand.h | 24 --- arch/arm/mach-omap2/gpmc-smc91x.c | 4 +- arch/arm/mach-omap2/gpmc-smc91x.h | 42 ----- arch/arm/mach-omap2/gpmc-smsc911x.c | 4 +- arch/arm/mach-omap2/gpmc-smsc911x.h | 35 ---- arch/arm/mach-omap2/gpmc.c | 7 +- arch/arm/mach-omap2/gpmc.h | 231 ----------------------- arch/arm/mach-omap2/pm34xx.c | 2 +- arch/arm/mach-omap2/usb-tusb6010.c | 3 +- include/linux/platform_data/gpmc-nand-omap.h | 27 +++ include/linux/platform_data/gpmc-omap.h | 231 +++++++++++++++++++++++ include/linux/platform_data/gpmc-onenand-omap.h | 25 +++ include/linux/platform_data/gpmc-smc91x-omap.h | 42 +++++ include/linux/platform_data/gpmc-smsc911x-omap.h | 35 ++++ 35 files changed, 403 insertions(+), 413 deletions(-) delete mode 100644 arch/arm/mach-omap2/gpmc-nand.h delete mode 100644 arch/arm/mach-omap2/gpmc-onenand.h
Quoted 9 lines
delete mode 100644 arch/arm/mach-omap2/gpmc-smc91x.h delete mode 100644 arch/arm/mach-omap2/gpmc-smsc911x.h delete mode 100644 arch/arm/mach-omap2/gpmc.h create mode 100644 include/linux/platform_data/gpmc-nand-omap.h create mode 100644 include/linux/platform_data/gpmc-omap.h create mode 100644 include/linux/platform_data/gpmc-onenand-omap.h create mode 100644 include/linux/platform_data/gpmc-smc91x-omap.h create mode 100644 include/linux/platform_data/gpmc-smsc911x-omap.h
I'm not too convinced about the above diffstat. Maybe you can try a a better approach of making the move by: 1) renaming/moving a file, using 'git format-patch -M' and 2) then make the necessary changes in the new place.
Or, if the above ends up not fully bisectable you can try first (2) then (1).
What bothers me most is seeing things like this:
arch/arm/mach-omap2/gpmc-nand.h | 27 --- arch/arm/mach-omap2/gpmc.h | 231 ----------------------- include/linux/platform_data/gpmc-nand-omap.h | 27 +++ include/linux/platform_data/gpmc-omap.h | 231 +++++++++++++++++++++++
What do you think?
Signature · 3 lines
Ezequiel Garc?a, Free Electrons Embedded Linux, Kernel and Android Engineering http://free-electrons.com
PATCH 2/2 ARM: OMAP2+: move gpmc headers to include/linux/platform_data
Quoted 2 lines · Ezequiel Garcia
Hey Javier,
Hi Ezequiel, thanks a lot for your feedback.
Quoted 89 lines · Javier Martinez Canillas
Quoted 70 lines
The OMAP2+ General-Purpose Memory Controller (GPMC) driver should eventually be moved from
arch/arm/mach-omap2todrivers/memory. Unfortunately this is not trivial since it includes headers files that still resides under mach-omap2 and can't be moved easilly.This patch is the first step for taking the gpmc driver outside
arch/arm/mach-omap2by moving its related headers files toinclude/linux/platform_data.Signed-off-by Javier Martinez Canillas <[email protected]>---
Hi Tony,
I wonder what's your plan to move drivers outside of mach-omap2. Currently this driver still includes
soc.handomap_device.hthat are on mach-omap2.If we want to move out these two headers files then also omap hwmod and per SoC family headers have to be moved out mach-omap2.
Do you want me to do a follow-up patch-set to move all these headers out of mach-omap2 so the gpmc and other drivers can be moved to
drivers/?Is
include/linux/platform_datathe right place to put these headers or there is a better place for them?Thanks a lot and best regards,
Javierarch/arm/mach-omap2/board-2430sdp.c | 5 +- arch/arm/mach-omap2/board-3430sdp.c | 4 +- arch/arm/mach-omap2/board-cm-t35.c | 6 +- arch/arm/mach-omap2/board-cm-t3517.c | 4 +- arch/arm/mach-omap2/board-devkit8000.c | 2 +- arch/arm/mach-omap2/board-flash.c | 6 +- arch/arm/mach-omap2/board-flash.h | 2 +- arch/arm/mach-omap2/board-h4.c | 5 +- arch/arm/mach-omap2/board-ldp.c | 4 +- arch/arm/mach-omap2/board-n8x0.c | 3 +- arch/arm/mach-omap2/board-omap3beagle.c | 2 +- arch/arm/mach-omap2/board-omap3logic.c | 5 +- arch/arm/mach-omap2/board-omap3pandora.c | 3 +- arch/arm/mach-omap2/board-omap3stalker.c | 4 +- arch/arm/mach-omap2/board-omap3touchbook.c | 2 +- arch/arm/mach-omap2/board-overo.c | 4 +- arch/arm/mach-omap2/board-rx51-peripherals.c | 6 +- arch/arm/mach-omap2/board-rx51.c | 2 +- arch/arm/mach-omap2/gpmc-nand.c | 4 +- arch/arm/mach-omap2/gpmc-nand.h | 27 --- arch/arm/mach-omap2/gpmc-onenand.c | 4 +- arch/arm/mach-omap2/gpmc-onenand.h | 24 --- arch/arm/mach-omap2/gpmc-smc91x.c | 4 +- arch/arm/mach-omap2/gpmc-smc91x.h | 42 ----- arch/arm/mach-omap2/gpmc-smsc911x.c | 4 +- arch/arm/mach-omap2/gpmc-smsc911x.h | 35 ---- arch/arm/mach-omap2/gpmc.c | 7 +- arch/arm/mach-omap2/gpmc.h | 231 ----------------------- arch/arm/mach-omap2/pm34xx.c | 2 +- arch/arm/mach-omap2/usb-tusb6010.c | 3 +- include/linux/platform_data/gpmc-nand-omap.h | 27 +++ include/linux/platform_data/gpmc-omap.h | 231 +++++++++++++++++++++++ include/linux/platform_data/gpmc-onenand-omap.h | 25 +++ include/linux/platform_data/gpmc-smc91x-omap.h | 42 +++++ include/linux/platform_data/gpmc-smsc911x-omap.h | 35 ++++ 35 files changed, 403 insertions(+), 413 deletions(-) delete mode 100644 arch/arm/mach-omap2/gpmc-nand.h delete mode 100644 arch/arm/mach-omap2/gpmc-onenand.hQuoted 9 lines
delete mode 100644 arch/arm/mach-omap2/gpmc-smc91x.h delete mode 100644 arch/arm/mach-omap2/gpmc-smsc911x.h delete mode 100644 arch/arm/mach-omap2/gpmc.h create mode 100644 include/linux/platform_data/gpmc-nand-omap.h create mode 100644 include/linux/platform_data/gpmc-omap.h create mode 100644 include/linux/platform_data/gpmc-onenand-omap.h create mode 100644 include/linux/platform_data/gpmc-smc91x-omap.h create mode 100644 include/linux/platform_data/gpmc-smsc911x-omap.hI'm not too convinced about the above diffstat. Maybe you can try a a better approach of making the move by: 1) renaming/moving a file, using 'git format-patch -M' and 2) then make the necessary changes in the new place.
Or, if the above ends up not fully bisectable you can try first (2) then (1).
Quoted 9 lines
What bothers me most is seeing things like this:
arch/arm/mach-omap2/gpmc-nand.h | 27 --- arch/arm/mach-omap2/gpmc.h | 231 ----------------------- include/linux/platform_data/gpmc-nand-omap.h | 27 +++ include/linux/platform_data/gpmc-omap.h | 231 +++++++++++++++++++++++What do you think?
Agreed, I completely forgot about -M when generating the patches.
I'll wait to see what Tony thinks about this approach to take the gpmc driver outside of mach-omap2 and send a v2 addressing the issues you pointed out.
Best regards,
Javier
Tony Lindgren
maintainerPATCH 2/2 ARM: OMAP2+: move gpmc headers to include/linux/platform_data
Quoted 17 lines · Javier Martinez Canillas
Quoted 16 lines · Ezequiel Garcia
I'm not too convinced about the above diffstat. Maybe you can try a a better approach of making the move by: 1) renaming/moving a file, using 'git format-patch -M' and 2) then make the necessary changes in the new place.
Or, if the above ends up not fully bisectable you can try first (2) then (1).
What bothers me most is seeing things like this:
arch/arm/mach-omap2/gpmc-nand.h | 27 --- arch/arm/mach-omap2/gpmc.h | 231 ----------------------- include/linux/platform_data/gpmc-nand-omap.h | 27 +++ include/linux/platform_data/gpmc-omap.h | 231 +++++++++++++++++++++++
Quoted 7 lines
Quoted 2 lines
What do you think?
Agreed, I completely forgot about -M when generating the patches.
I'll wait to see what Tony thinks about this approach to take the gpmc driver outside of mach-omap2 and send a v2 addressing the issues you pointed out.
Well the headers in include/linux/platform_data should only contain platform data passed to the driver. So you should keep arch/arm/mach-omap2 specific stuff in the local headers, then have the driver specific stuff private to the drivers, and then have separate minimal platform data headers.
Please also try to avoid patching all the board-*.c files if possible by keeping the the local headers in place as the board files will be going away for v3.14 anyways. You can include the new platform data header from those local files as that cuts down extra churn in the board-*.c files a bit ;)
Regards,
Tony
PATCH 2/2 ARM: OMAP2+: move gpmc headers to include/linux/platform_data
Quoted 18 lines · Tony Lindgren
Quoted 17 lines · Javier Martinez Canillas
Quoted 16 lines · Ezequiel Garcia
I'm not too convinced about the above diffstat. Maybe you can try a a better approach of making the move by: 1) renaming/moving a file, using 'git format-patch -M' and 2) then make the necessary changes in the new place.
Or, if the above ends up not fully bisectable you can try first (2) then (1).
What bothers me most is seeing things like this:
arch/arm/mach-omap2/gpmc-nand.h | 27 --- arch/arm/mach-omap2/gpmc.h | 231 ----------------------- include/linux/platform_data/gpmc-nand-omap.h | 27 +++ include/linux/platform_data/gpmc-omap.h | 231 +++++++++++++++++++++++
Quoted 8 lines
Quoted 7 lines
Quoted 2 lines
What do you think?
Agreed, I completely forgot about -M when generating the patches.
I'll wait to see what Tony thinks about this approach to take the gpmc driver outside of mach-omap2 and send a v2 addressing the issues you pointed out.
Hi Tony,
Quoted 6 lines
Well the headers in
include/linux/platform_datashould only contain platform data passed to the driver. So you should keeparch/arm/mach-omap2specific stuff in the local headers, then have the driver specific stuff private to the drivers, and then have separate minimal platform data headers.
Thanks a lot for the explanation. It wasn't clear to me before what should be included in include/linux/platform_data and what should be kept in arch/arm/mach-omap2.
Quoted 6 lines
Please also try to avoid patching all the board-*.c files if possible by keeping the the local headers in place as the board files will be going away for v3.14 anyways. You can include the new platform data header from those local files as that cuts down extra churn in the board-*.c files a bit ;)
Yes, In fact I guess is just better to wait after v3.14 (when board files are finally removed) in order to avoid unnecessary merge conflicts :)
Quoted 4 lines
Regards,
Tony
Best regards,
Javier