From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexis RODET Subject: [PATCH 1/1] merging arch/arm/include/asm/mach/flash.h and include/linux/spi/flash.h into single header file include/linux/mtd/flash.h Date: Mon, 31 Jan 2011 12:29:11 +0100 Message-ID: <1296473351-22771-1-git-send-email-alexis.rodet@bvs-tech.com> References: <4D3E9683.5090906@bvs-tech.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Alexis RODET , David Brownell , linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, David Woodhouse Return-path: To: In-Reply-To: <4D3E9683.5090906-zROAmvwsW6hWk0Htik3J/w@public.gmane.org> To: Grant Likely List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spi-devel-general-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: linux-spi.vger.kernel.org Signed-off-by: Alexis RODET --- arch/arm/include/asm/mach/flash.h | 35 +------------------------ include/linux/mtd/flash.h | 51 +++++++++++++++++++++++++++++++++++++ include/linux/spi/flash.h | 27 +------------------- 3 files changed, 53 insertions(+), 60 deletions(-) diff --git a/arch/arm/include/asm/mach/flash.h b/arch/arm/include/asm/mach/flash.h index 4ca69fe..28bd58b 100644 --- a/arch/arm/include/asm/mach/flash.h +++ b/arch/arm/include/asm/mach/flash.h @@ -1,39 +1,6 @@ -/* - * arch/arm/include/asm/mach/flash.h - * - * Copyright (C) 2003 Russell King, 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 version 2 as - * published by the Free Software Foundation. - */ #ifndef ASMARM_MACH_FLASH_H #define ASMARM_MACH_FLASH_H -struct mtd_partition; -struct mtd_info; - -/* - * map_name: the map probe function name - * name: flash device name (eg, as used with mtdparts=) - * width: width of mapped device - * init: method called at driver/device initialisation - * exit: method called at driver/device removal - * set_vpp: method called to enable or disable VPP - * mmcontrol: method called to enable or disable Sync. Burst Read in OneNAND - * parts: optional array of mtd_partitions for static partitioning - * nr_parts: number of mtd_partitions for static partitoning - */ -struct flash_platform_data { - const char *map_name; - const char *name; - unsigned int width; - int (*init)(void); - void (*exit)(void); - void (*set_vpp)(int on); - void (*mmcontrol)(struct mtd_info *mtd, int sync_read); - struct mtd_partition *parts; - unsigned int nr_parts; -}; +#include #endif diff --git a/include/linux/mtd/flash.h b/include/linux/mtd/flash.h new file mode 100644 index 0000000..5379eee --- /dev/null +++ b/include/linux/mtd/flash.h @@ -0,0 +1,51 @@ +/* + * include/linux/mtd/flash.h + * merged from arch/arm/include/asm/mach/flash.h and include/linux/spi/flash.h + * + * Copyright (C) 2003 Russell King, 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 version 2 as + * published by the Free Software Foundation. + */ +#ifndef LINUX_MTD_FLASH_H +#define LINUX_MTD_FLASH_H + +struct mtd_partition; +struct mtd_info; + +/** + * struct flash_platform_data: board-specific flash data + * @map_name: the map probe function name + * @name: optional flash device name (eg, as used with mtdparts=) + * @width: width of mapped device + * @init: method called at driver/device initialisation + * @exit: method called at driver/device removal + * @set_vpp: method called to enable or disable VPP + * @mmcontrol: method called to enable or disable Sync. Burst Read in OneNAND + * @parts: optional array of mtd_partitions for static partitioning + * @nr_parts: number of mtd_partitions for static partitoning + * @type: optional flash device type (e.g. m25p80 vs m25p64), for use + * with chips that can't be queried for JEDEC or other IDs + * + * Board init code (in arch/.../mach-xxx/board-yyy.c files) can + * provide information about SPI flash parts (such as DataFlash) to + * help set up the device and its appropriate default partitioning. + * + * Note that for DataFlash, sizes for pages, blocks, and sectors are + * rarely powers of two; and partitions should be sector-aligned. + */ +struct flash_platform_data { + const char *map_name; + const char *name; + unsigned int width; + int (*init)(void); + void (*exit)(void); + void (*set_vpp)(int on); + void (*mmcontrol)(struct mtd_info *mtd, int sync_read); + struct mtd_partition *parts; + unsigned int nr_parts; + const char *type; +}; + +#endif diff --git a/include/linux/spi/flash.h b/include/linux/spi/flash.h index 3f22932..c7ed65e 100644 --- a/include/linux/spi/flash.h +++ b/include/linux/spi/flash.h @@ -1,31 +1,6 @@ #ifndef LINUX_SPI_FLASH_H #define LINUX_SPI_FLASH_H -struct mtd_partition; - -/** - * struct flash_platform_data: board-specific flash data - * @name: optional flash device name (eg, as used with mtdparts=) - * @parts: optional array of mtd_partitions for static partitioning - * @nr_parts: number of mtd_partitions for static partitoning - * @type: optional flash device type (e.g. m25p80 vs m25p64), for use - * with chips that can't be queried for JEDEC or other IDs - * - * Board init code (in arch/.../mach-xxx/board-yyy.c files) can - * provide information about SPI flash parts (such as DataFlash) to - * help set up the device and its appropriate default partitioning. - * - * Note that for DataFlash, sizes for pages, blocks, and sectors are - * rarely powers of two; and partitions should be sector-aligned. - */ -struct flash_platform_data { - char *name; - struct mtd_partition *parts; - unsigned int nr_parts; - - char *type; - - /* we'll likely add more ... use JEDEC IDs, etc */ -}; +#include #endif -- 1.7.1 ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d