From patchwork Mon Jan 31 11:29:11 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexis RODET X-Patchwork-Id: 81094 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C7E7BB70EA for ; Mon, 31 Jan 2011 22:34:16 +1100 (EST) Received: from canuck.infradead.org ([134.117.69.58]) by bombadil.infradead.org with esmtps (Exim 4.72 #1 (Red Hat Linux)) id 1PjrxF-0000KC-1O; Mon, 31 Jan 2011 11:29:57 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1PjrxE-00068Y-7O; Mon, 31 Jan 2011 11:29:56 +0000 Received: from smtp1-g21.free.fr ([212.27.42.1]) by canuck.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1PjrxA-00068D-L5 for linux-mtd@lists.infradead.org; Mon, 31 Jan 2011 11:29:54 +0000 Received: from curvature (unknown [82.67.197.130]) by smtp1-g21.free.fr (Postfix) with ESMTP id 78DE294017E; Mon, 31 Jan 2011 12:29:45 +0100 (CET) From: Alexis RODET To: 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> X-Mailer: git-send-email 1.7.1 In-Reply-To: <4D3E9683.5090906@bvs-tech.com> References: <4D3E9683.5090906@bvs-tech.com> To: Grant Likely X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110131_062953_259802_6ADDCEF5 X-CRM114-Status: GOOD ( 14.26 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, low trust [212.27.42.1 listed in list.dnswl.org] Cc: Baruch Siach , Alexis RODET , David Brownell , linux-mtd@lists.infradead.org, spi-devel-general@lists.sourceforge.net, David Woodhouse X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.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