mtd: gpmi: remove unneccessary header
Subsystems (2)
PATCH 1/1 mtd: gpmi: remove unneccessary header
The whole gpmi-nand driver has turned to pure devicetree supported. So the linux/mtd/gpmi-nand.h is not neccessary now. Just remove it, and move some macros to the gpmi-nand driver itself.
--- drivers/mtd/nand/gpmi-nand/gpmi-lib.c | 1 - drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 7 +++- drivers/mtd/nand/gpmi-nand/gpmi-nand.h | 1 - include/linux/mtd/gpmi-nand.h | 68 -------------------------------- 4 files changed, 6 insertions(+), 71 deletions(-) delete mode 100644 include/linux/mtd/gpmi-nand.h
drivers/mtd/nand/gpmi-nand/gpmi-lib.c +0 -1
@@ -18,7 +18,6 @@* with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include <linux/mtd/gpmi-nand.h> #include <linux/delay.h> #include <linux/clk.h>
drivers/mtd/nand/gpmi-nand/gpmi-nand.c +6 -1
@@ -25,7 +25,6 @@#include <linux/slab.h> #include <linux/interrupt.h> #include <linux/module.h> -#include <linux/mtd/gpmi-nand.h> #include <linux/mtd/partitions.h> #include <linux/pinctrl/consumer.h> #include <linux/of.h>
@@ -33,6 +32,12 @@#include <linux/of_mtd.h> #include "gpmi-nand.h" +/* Resource names for the GPMI NAND driver. */ +#define GPMI_NAND_GPMI_REGS_ADDR_RES_NAME "gpmi-nand" +#define GPMI_NAND_BCH_REGS_ADDR_RES_NAME "bch" +#define GPMI_NAND_BCH_INTERRUPT_RES_NAME "bch" +#define GPMI_NAND_DMA_INTERRUPT_RES_NAME "gpmi-dma" +/* add our owner bbt descriptor */ static uint8_t scan_ff_pattern[] = {0xff };static struct nand_bbt_descr gpmi_bbt_descr = {
drivers/mtd/nand/gpmi-nand/gpmi-nand.h +0 -1
@@ -130,7 +130,6 @@ struct gpmi_nand_data {/* System Interface */ struct device *dev;struct platform_device *pdev; -struct gpmi_nand_platform_data *pdata;/* Resources */ struct resources resources;
include/linux/mtd/gpmi-nand.h deleted +0 -68
68 lines not on this page · raw message
Signature · 1 line
1.7.4.4
ping.
Quoted 139 lines · Huang Shijie
The whole gpmi-nand driver has turned to pure devicetree supported. So the
linux/mtd/gpmi-nand.his not neccessary now. Just remove it, and move some macros to the gpmi-nand driver itself.Signed-off-by Huang Shijie <[email protected]>--- drivers/mtd/nand/gpmi-nand/gpmi-lib.c | 1 - drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 7 +++- drivers/mtd/nand/gpmi-nand/gpmi-nand.h | 1 - include/linux/mtd/gpmi-nand.h | 68 -------------------------------- 4 files changed, 6 insertions(+), 71 deletions(-) delete mode 100644 include/linux/mtd/gpmi-nand.hdrivers/mtd/nand/gpmi-nand/gpmi-lib.c +0
-1@@ -18,7 +18,6 @@* with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include <linux/mtd/gpmi-nand.h> #include <linux/delay.h> #include <linux/clk.h> drivers/mtd/nand/gpmi-nand/gpmi-nand.c +6
-1@@ -25,7 +25,6 @@#include <linux/slab.h> #include <linux/interrupt.h> #include <linux/module.h> -#include <linux/mtd/gpmi-nand.h> #include <linux/mtd/partitions.h> #include <linux/pinctrl/consumer.h> #include <linux/of.h> @@ -33,6 +32,12 @@#include <linux/of_mtd.h> #include "gpmi-nand.h" +/* Resource names for the GPMI NAND driver. */ +#define GPMI_NAND_GPMI_REGS_ADDR_RES_NAME "gpmi-nand" +#define GPMI_NAND_BCH_REGS_ADDR_RES_NAME "bch" +#define GPMI_NAND_BCH_INTERRUPT_RES_NAME "bch" +#define GPMI_NAND_DMA_INTERRUPT_RES_NAME "gpmi-dma" +/* add our owner bbt descriptor */ static uint8_t scan_ff_pattern[] = {0xff };static struct nand_bbt_descr gpmi_bbt_descr = {drivers/mtd/nand/gpmi-nand/gpmi-nand.h +0
-1@@ -130,7 +130,6 @@ struct gpmi_nand_data {/* System Interface */ struct device *dev;struct platform_device *pdev; -struct gpmi_nand_platform_data *pdata;/* Resources */ struct resources resources;include/linux/mtd/gpmi-nand.h deleted +0
-69@@ -1,68 +0,0 @@ -/* -* Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved. -* -* 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. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License along -* with this program; if not, write to the Free Software Foundation, Inc., -* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -*/ - -#ifndef __MACH_MXS_GPMI_NAND_H__ -#define __MACH_MXS_GPMI_NAND_H__ - -/* The size of the resources is fixed. */ -#define GPMI_NAND_RES_SIZE 6 - -/* Resource names for the GPMI NAND driver. */ -#define GPMI_NAND_GPMI_REGS_ADDR_RES_NAME "gpmi-nand" -#define GPMI_NAND_GPMI_INTERRUPT_RES_NAME "GPMI NAND GPMI Interrupt" -#define GPMI_NAND_BCH_REGS_ADDR_RES_NAME "bch" -#define GPMI_NAND_BCH_INTERRUPT_RES_NAME "bch" -#define GPMI_NAND_DMA_CHANNELS_RES_NAME "GPMI NAND DMA Channels" -#define GPMI_NAND_DMA_INTERRUPT_RES_NAME "gpmi-dma" - -/** -* struct gpmi_nand_platform_data - GPMI NAND driver platform data. -* -* This structure communicates platform-specific information to the GPMI NAND -* driver that can't be expressed as resources. -* -* @platform_init: A pointer to a function the driver will call to -* initialize the platform (e.g., set up the pin mux). -* @min_prop_delay_in_ns: Minimum propagation delay of GPMI signals to and -* from the NAND Flash device, in nanoseconds. -* @max_prop_delay_in_ns: Maximum propagation delay of GPMI signals to and -* from the NAND Flash device, in nanoseconds. -* @max_chip_count: The maximum number of chips for which the driver -* should configure the hardware. This value most -* likely reflects the number of pins that are -* connected to a NAND Flash device. If this is -* greater than the SoC hardware can support, the -* driver will print a message and fail to initialize. -* @partitions: An optional pointer to an array of partition -* descriptions. -* @partition_count: The number of elements in the partitions array. -*/ -struct gpmi_nand_platform_data { -/* SoC hardware information. */ -int (*platform_init)(void ); - -/* NAND Flash information. */ -unsigned int min_prop_delay_in_ns; -unsigned int max_prop_delay_in_ns; -unsigned int max_chip_count; - -/* Medium information. */ -struct mtd_partition *partitions; -unsigned partition_count; -}; -#endif --1.7.4.4
Quoted 5 lines · Huang Shijie
The whole gpmi-nand driver has turned to pure devicetree supported. So the
linux/mtd/gpmi-nand.his not neccessary now. Just remove it, and move some macros to the gpmi-nand driver itself.Signed-off-by Huang Shijie <[email protected]>
I cannot compile-test it because the MXS configuration file I always used for compile-testing gpmi-nand patches (attached) does not work anymore - I get the following compilation errors:
/home/dedekind/git/l2-mtd/arch/arm/include/asm/processor.h:82: warning: "__LINUX_ARM_ARCH__" is not defined /home/dedekind/git/l2-mtd/arch/arm/include/asm/processor.h:97: warning: "__LINUX_ARM_ARCH__" is not defined In file included from include/linux/time.h:6,
from include/uapi/linux/timex.h:56,
from include/linux/timex.h:56,
from include/linux/sched.h:17,
from arch/arm/kernel/asm-offsets.c:13:include/linux/math64.h: In function 'div_u64_rem':include/linux/math64.h:55: error: '__LINUX_ARM_ARCH__' undeclared (first use in this function) include/linux/math64.h:55: error: (Each undeclared identifier is reported only once include/linux/math64.h:55: error: for each function it appears in.)
In file included from include/linux/mm_types.h:15,
from include/linux/sched.h:24,
from arch/arm/kernel/asm-offsets.c:13:/home/dedekind/git/l2-mtd/arch/arm/include/asm/page.h: At top level:/home/dedekind/git/l2-mtd/arch/arm/include/asm/page.h:107: error: #error Unknown user operations model
In file included from include/linux/mm.h:44,
from arch/arm/kernel/asm-offsets.c:14:/home/dedekind/git/l2-mtd/arch/arm/include/asm/pgtable.h:210: warning: "__LINUX_ARM_ARCH__" is not defined
In file included from include/linux/scatterlist.h:10,
from include/linux/dma-mapping.h:9,
from arch/arm/kernel/asm-offsets.c:15:/home/dedekind/git/l2-mtd/arch/arm/include/asm/io.h:50: warning: "__LINUX_ARM_ARCH__" is not defined
In file included from include/linux/dma-mapping.h:76,
from arch/arm/kernel/asm-offsets.c:15:/home/dedekind/git/l2-mtd/arch/arm/include/asm/dma-mapping.h: In function 'dma_mapping_error':/home/dedekind/git/l2-mtd/arch/arm/include/asm/dma-mapping.h:94: error: implicit declaration of function 'debug_dma_mapping_error' In file included from /home/dedekind/git/l2-mtd/arch/arm/include/asm/cacheflush.h:15,
from arch/arm/kernel/asm-offsets.c:16:/home/dedekind/git/l2-mtd/arch/arm/include/asm/glue-cache.h: At top level:/home/dedekind/git/l2-mtd/arch/arm/include/asm/glue-cache.h:129: error: #error Unknown cache maintenance model In file included from /home/dedekind/git/l2-mtd/arch/arm/include/asm/cacheflush.h:17,
from arch/arm/kernel/asm-offsets.c:16:/home/dedekind/git/l2-mtd/arch/arm/include/asm/cachetype.h:28: warning: "__LINUX_ARM_ARCH__" is not defined /home/dedekind/git/l2-mtd/arch/arm/include/asm/cachetype.h:33: warning: "__LINUX_ARM_ARCH__" is not defined In file included from arch/arm/kernel/asm-offsets.c:16:/home/dedekind/git/l2-mtd/arch/arm/include/asm/cacheflush.h:204: warning: "__LINUX_ARM_ARCH__" is not defined /home/dedekind/git/l2-mtd/arch/arm/include/asm/cacheflush.h:206: warning: "__LINUX_ARM_ARCH__" is not defined In file included from arch/arm/kernel/asm-offsets.c:17:/home/dedekind/git/l2-mtd/arch/arm/include/asm/glue-df.h:99: error: #error Unknown data abort handler type
In file included from arch/arm/kernel/asm-offsets.c:18:/home/dedekind/git/l2-mtd/arch/arm/include/asm/glue-pf.h:54: error: #error Unknown prefetch abort handler type make[1]: *** [arch/arm/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2
Signature · 2 lines
Best Regards, Artem Bityutskiy
CONFIG_EXPERIMENTAL=yCONFIG_SYSVIPC=yCONFIG_NO_HZ=yCONFIG_HIGH_RES_TIMERS=yCONFIG_IKCONFIG=yCONFIG_IKCONFIG_PROC=y
# CONFIG_UTS_NS is not set
# CONFIG_IPC_NS is not set
# CONFIG_PID_NS is not setCONFIG_PERF_EVENTS=y
# CONFIG_COMPAT_BRK is not setCONFIG_MODULES=yCONFIG_MODULE_FORCE_LOAD=yCONFIG_MODULE_UNLOAD=yCONFIG_MODULE_FORCE_UNLOAD=yCONFIG_MODVERSIONS=yCONFIG_BLK_DEV_INTEGRITY=y
# CONFIG_IOSCHED_DEADLINE is not set
# CONFIG_IOSCHED_CFQ is not setCONFIG_ARCH_MXS=yCONFIG_PREEMPT_VOLUNTARY=yCONFIG_AEABI=yCONFIG_DEFAULT_MMAP_MIN_ADDR=65536CONFIG_AUTO_ZRELADDR=yCONFIG_FPE_NWFPE=yCONFIG_DEVTMPFS=y
# CONFIG_FIRMWARE_IN_KERNEL is not setCONFIG_MTD=yCONFIG_MTD_TESTS=mCONFIG_MTD_REDBOOT_PARTS=yCONFIG_MTD_REDBOOT_PARTS_READONLY=yCONFIG_MTD_CMDLINE_PARTS=yCONFIG_MTD_AFS_PARTS=yCONFIG_MTD_AR7_PARTS=mCONFIG_MTD_CHAR=yCONFIG_MTD_BLOCK=mCONFIG_MTD_BLOCK_RO=yCONFIG_FTL=mCONFIG_NFTL=yCONFIG_NFTL_RW=yCONFIG_INFTL=mCONFIG_RFD_FTL=yCONFIG_SSFDC=yCONFIG_SM_FTL=yCONFIG_MTD_OOPS=yCONFIG_MTD_SWAP=yCONFIG_MTD_CFI=yCONFIG_MTD_JEDECPROBE=yCONFIG_MTD_CFI_ADV_OPTIONS=yCONFIG_MTD_CFI_INTELEXT=mCONFIG_MTD_CFI_AMDSTD=mCONFIG_MTD_CFI_STAA=yCONFIG_MTD_ROM=mCONFIG_MTD_ABSENT=yCONFIG_MTD_COMPLEX_MAPPINGS=yCONFIG_MTD_PHYSMAP=mCONFIG_MTD_PHYSMAP_COMPAT=yCONFIG_MTD_IMPA7=mCONFIG_MTD_GPIO_ADDR=yCONFIG_MTD_PLATRAM=yCONFIG_MTD_LATCH_ADDR=yCONFIG_MTD_DATAFLASH=mCONFIG_MTD_DATAFLASH_OTP=yCONFIG_MTD_M25P80=m
# CONFIG_M25PXX_USE_FAST_READ is not setCONFIG_MTD_SST25L=mCONFIG_MTD_SLRAM=yCONFIG_MTD_PHRAM=yCONFIG_MTD_MTDRAM=yCONFIG_MTD_BLOCK2MTD=yCONFIG_MTD_DOC2000=mCONFIG_MTD_DOC2001=mCONFIG_MTD_DOC2001PLUS=mCONFIG_MTD_DOCG3=yCONFIG_MTD_NAND_ECC_SMC=yCONFIG_MTD_NAND=yCONFIG_MTD_NAND_ECC_BCH=yCONFIG_MTD_NAND_MUSEUM_IDS=yCONFIG_MTD_NAND_GPIO=yCONFIG_MTD_NAND_DISKONCHIP=yCONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED=yCONFIG_MTD_NAND_DISKONCHIP_PROBE_HIGH=yCONFIG_MTD_NAND_DOCG4=yCONFIG_MTD_NAND_NANDSIM=mCONFIG_MTD_NAND_PLATFORM=yCONFIG_MTD_ONENAND=mCONFIG_MTD_ONENAND_VERIFY_WRITE=yCONFIG_MTD_ONENAND_GENERIC=mCONFIG_MTD_ONENAND_OTP=yCONFIG_MTD_ONENAND_SIM=mCONFIG_MTD_LPDDR=mCONFIG_MTD_UBI=mCONFIG_MTD_UBI_GLUEBI=m
# CONFIG_BLK_DEV is not setCONFIG_ATMEL_PWM=y
# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
# CONFIG_INPUT_KEYBOARD is not set
# CONFIG_INPUT_MOUSE is not set
# CONFIG_SERIO is not set
# CONFIG_LEGACY_PTYS is not set
# CONFIG_DEVKMEM is not set
# CONFIG_HW_RANDOM is not setCONFIG_I2C=yCONFIG_SPI=yCONFIG_DEBUG_GPIO=yCONFIG_GPIO_SYSFS=y
# CONFIG_HWMON is not set
# CONFIG_USB_SUPPORT is not setCONFIG_DMADEVICES=y
# CONFIG_IOMMU_SUPPORT is not set
# CONFIG_DNOTIFY is not set
# CONFIG_INOTIFY_USER is not setCONFIG_JFFS2_FS=m
# CONFIG_JFFS2_FS_WRITEBUFFER is not setCONFIG_JFFS2_SUMMARY=yCONFIG_JFFS2_FS_XATTR=yCONFIG_JFFS2_COMPRESSION_OPTIONS=y
# CONFIG_JFFS2_RTIME is not setCONFIG_JFFS2_RUBIN=yCONFIG_JFFS2_CMODE_NONE=yCONFIG_UBIFS_FS=mCONFIG_UBIFS_FS_ADVANCED_COMPR=y
# CONFIG_UBIFS_FS_LZO is not setCONFIG_LOGFS=yCONFIG_PRINTK_TIME=yCONFIG_FRAME_WARN=2048CONFIG_MAGIC_SYSRQ=yCONFIG_UNUSED_SYMBOLS=yCONFIG_DEBUG_KERNEL=yCONFIG_LOCKUP_DETECTOR=yCONFIG_TIMER_STATS=yCONFIG_PROVE_LOCKING=yCONFIG_DEBUG_INFO=yCONFIG_BLK_DEV_IO_TRACE=yCONFIG_STRICT_DEVMEM=yCONFIG_DEBUG_USER=yCONFIG_KEYS=yCONFIG_CRYPTO=yCONFIG_CRYPTO_CRC32C=m
# CONFIG_CRYPTO_ANSI_CPRNG is not set
# CONFIG_CRYPTO_HW is not setCONFIG_CRC_ITU_T=mCONFIG_CRC7=m
Quoted 8 lines · Huang Shijie
Quoted 7 lines · Artem Bityutskiy
Quoted 5 lines · Huang Shijie
The whole gpmi-nand driver has turned to pure devicetree supported. So the
linux/mtd/gpmi-nand.his not neccessary now. Just remove it, and move some macros to the gpmi-nand driver itself.Signed-off-by Huang Shijie <[email protected]>I cannot compile-test it because the MXS configuration file I always
Quoted 8 lines
I tested this patch in mxs and mx6q with the linux-next-20121026. I do not meet such compiler errors.
I think the l2-mtd tree is lack of some patches in other people's tree.
In the current l2-mtd tree, even i DISABLE the gpmi driver, the kernel still
meets the compiler errors.
It is based on v3.7-rc4. Once the patches you refer are in Linus's tree, let me know. Thanks!
Signature · 2 lines
Best Regards, Artem Bityutskiy
Quoted 12 lines · Artem Bityutskiy
Quoted 11 lines · Huang Shijie
Quoted 7 lines · Artem Bityutskiy
Quoted 5 lines · Huang Shijie
The whole gpmi-nand driver has turned to pure devicetree supported. So the
linux/mtd/gpmi-nand.his not neccessary now. Just remove it, and move some macros to the gpmi-nand driver itself.Signed-off-by Huang Shijie <[email protected]>I cannot compile-test it because the MXS configuration file I always
I tested this patch in mxs and mx6q with the linux-next-20121026. I do not meet such compiler errors.
Quoted 9 lines
Quoted 5 lines
I think the l2-mtd tree is lack of some patches in other people's tree.
In the current l2-mtd tree, even i DISABLE the gpmi driver, the kernel still
meets the compiler errors.It is based on v3.7-rc4. Once the patches you refer are in Linus's tree, let me know. Thanks!
I re-created the .config based on the latest l2-mtd tree. I compiled the kernel with this patch again, and
there is no compiler error anymore.
Could you re-create your mxs config with "make ARCH=ARM mxs_defconfig", and test this patch again?
thanks
Huang Shijie
Quoted 3 lines
--
Best Regards,
Artem Bityutskiy
Quoted 2 lines · Huang Shijie
Could you re-create your mxs config with "make ARCH=ARM
mxs_defconfig", and test this patch again?
Done, works now, pushed your patch to l2-mtd.git, thanks!
Signature · 2 lines
Best Regards, Artem Bityutskiy