From patchwork Mon Dec 20 14:04:54 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Lunz X-Patchwork-Id: 76206 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from canuck.infradead.org (canuck.infradead.org [134.117.69.58]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 02B13B7082 for ; Tue, 21 Dec 2010 01:13:46 +1100 (EST) 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 1PUgMQ-0008KN-1m; Mon, 20 Dec 2010 14:05:10 +0000 Received: from smtp.falooley.org ([66.180.170.91]) by canuck.infradead.org with esmtps (Exim 4.72 #1 (Red Hat Linux)) id 1PUgMK-0008Ip-Jd for linux-mtd@lists.infradead.org; Mon, 20 Dec 2010 14:05:07 +0000 Received: from adsl-68-73-99-17.dsl.dytnoh.sbcglobal.net ([68.73.99.17] helo=fig) by smtp.falooley.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1PUgMh-00011p-MS; Mon, 20 Dec 2010 06:05:28 -0800 Received: by fig (Postfix, from userid 1000) id E3B3DB6F5A; Mon, 20 Dec 2010 06:04:54 -0800 (PST) Date: Mon, 20 Dec 2010 09:04:54 -0500 From: Jason Lunz To: Artem Bityutskiy Subject: [PATCH] mtd: allow mtd and jffs2 when ARCH=um Message-ID: <20101220140454.GA26229@falooley.org> References: <20101207072919.GA8511@falooley.org> <20101207182012.GA10546@falooley.org> <1292343878.2538.80.camel@localhost> <20101214195124.GA6010@falooley.org> <20101216230110.65156c55@wker> <20101217042759.GA3148@falooley.org> <1292777276.2140.1.camel@koala> <20101219190720.GA16710@falooley.org> <1292844216.13362.19.camel@koala> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1292844216.13362.19.camel@koala> User-Agent: Mutt/1.5.20 (2009-06-14) X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20101220_090504_731556_55E986CE X-CRM114-Status: GOOD ( 14.37 ) 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 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain Cc: Anatolij Gustschin , linux-mtd@lists.infradead.org, lkml 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: , Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org On Mon, Dec 20, 2010 at 01:23:36PM +0200, Artem Bityutskiy wrote: > Ok, could you please re-sent the final patch with the commit message > etc? Sure, here's everything as a single patch. ------------------------------------->8 Allow parts of drivers/mtd to compile on uml by pushing the HAS_IOMEM dependencies down closer to the parts of mtd that actually need it. This allows enough of mtd to build to let jffs2 be used on uml. Signed-off-by: Jason Lunz --- arch/um/Kconfig.rest | 4 +--- drivers/mtd/Kconfig | 8 ++++++-- drivers/mtd/Makefile | 3 ++- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/arch/um/Kconfig.rest b/arch/um/Kconfig.rest index 0ccad0f..e34f399 100644 --- a/arch/um/Kconfig.rest +++ b/arch/um/Kconfig.rest @@ -28,9 +28,7 @@ source "drivers/scsi/Kconfig" source "drivers/md/Kconfig" -if BROKEN - source "drivers/mtd/Kconfig" -endif +source "drivers/mtd/Kconfig" source "drivers/leds/Kconfig" diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig index 7741470..603e447 100644 --- a/drivers/mtd/Kconfig +++ b/drivers/mtd/Kconfig @@ -1,6 +1,5 @@ menuconfig MTD tristate "Memory Technology Device (MTD) support" - depends on HAS_IOMEM help Memory Technology Devices are flash, RAM and similar chips, often used for solid state file systems on embedded devices. This option @@ -178,6 +177,7 @@ comment "User Modules And Translation Layers" config MTD_CHAR tristate "Direct char device access to MTD devices" + depends on HAS_IOMEM help This provides a character device for each MTD device present in the system, allowing the user to read and write directly to the @@ -310,7 +310,7 @@ config SSFDC config SM_FTL tristate "SmartMedia/xD new translation layer" - depends on EXPERIMENTAL && BLOCK + depends on EXPERIMENTAL && BLOCK && HAS_IOMEM select MTD_BLKDEVS select MTD_NAND_ECC help @@ -333,6 +333,8 @@ config MTD_OOPS To use, add console=ttyMTDx to the kernel command line, where x is the MTD device number to use. +if HAS_IOMEM + source "drivers/mtd/chips/Kconfig" source "drivers/mtd/maps/Kconfig" @@ -345,6 +347,8 @@ source "drivers/mtd/onenand/Kconfig" source "drivers/mtd/lpddr/Kconfig" +endif # HAS_IOMEM + source "drivers/mtd/ubi/Kconfig" endif # MTD diff --git a/drivers/mtd/Makefile b/drivers/mtd/Makefile index d4e7f25..c83eee4 100644 --- a/drivers/mtd/Makefile +++ b/drivers/mtd/Makefile @@ -30,6 +30,7 @@ obj-$(CONFIG_MTD_OOPS) += mtdoops.o nftl-objs := nftlcore.o nftlmount.o inftl-objs := inftlcore.o inftlmount.o -obj-y += chips/ lpddr/ maps/ devices/ nand/ onenand/ tests/ +obj-y += tests/ +obj-$(CONFIG_HAS_IOMEM) += chips/ lpddr/ maps/ devices/ nand/ onenand/ obj-$(CONFIG_MTD_UBI) += ubi/