From patchwork Tue Aug 17 08:30:49 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyungmin Park X-Patchwork-Id: 61868 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 E0941B70CB for ; Tue, 17 Aug 2010 18:32:27 +1000 (EST) Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1OlHZY-0000QA-H9; Tue, 17 Aug 2010 08:31:04 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by bombadil.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1OlHZU-0000HG-JU; Tue, 17 Aug 2010 08:31:01 +0000 Received: from epmmp2 (mailout3.samsung.com [203.254.224.33]) by mailout3.samsung.com (Sun Java(tm) System Messaging Server 7u3-15.01 64bit (built Feb 12 2010)) with ESMTP id <0L7A00B1YFNLHU50@mailout3.samsung.com>; Tue, 17 Aug 2010 17:30:57 +0900 (KST) Received: from TNRNDGASPAPP1.tn.corp.samsungelectronics.net ([165.213.149.150]) by mmp2.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0L7A00GHKFNLZ1@mmp2.samsung.com>; Tue, 17 Aug 2010 17:30:57 +0900 (KST) Received: from july ([10.89.10.219]) by TNRNDGASPAPP1.tn.corp.samsungelectronics.net with Microsoft SMTPSVC(6.0.3790.4675); Tue, 17 Aug 2010 17:30:56 +0900 Received: by july (sSMTP sendmail emulation); Tue, 17 Aug 2010 17:30:49 +0900 Date: Tue, 17 Aug 2010 17:30:49 +0900 From: Kyungmin Park Subject: [PATCH] ARM: S5PC210: OneNAND device support To: linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org Message-id: <20100817083049.GA20042@july> MIME-version: 1.0 Content-disposition: inline User-Agent: Mutt/1.5.17 (2007-11-01) X-OriginalArrivalTime: 17 Aug 2010 08:30:56.0385 (UTC) FILETIME=[833E1F10:01CB3DE6] X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20100817_043100_916867_49D341AF X-CRM114-Status: GOOD ( 21.23 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.3.1 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [203.254.224.33 listed in list.dnswl.org] Cc: kgene.kim@samsung.com, jy0922.shim@samsung.com 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 From: Kyungmin Park OneNAND device support on s5pc210 SoC. It's same as s5pc110 controller Signed-off-by: Kyungmin Park diff --git a/arch/arm/mach-s5pv310/Kconfig b/arch/arm/mach-s5pv310/Kconfig index 331b5bd..6a8427d 100644 --- a/arch/arm/mach-s5pv310/Kconfig +++ b/arch/arm/mach-s5pv310/Kconfig @@ -25,6 +25,11 @@ config S5PV310_SETUP_I2C2 help Common setup code for i2c bus 2. +config S5PC210_DEV_ONENAND + bool + help + Compile in platform device definition for OneNAND controller + # machine support config MACH_SMDKV310 diff --git a/arch/arm/mach-s5pv310/Makefile b/arch/arm/mach-s5pv310/Makefile index d5b51c7..9e585a3 100644 --- a/arch/arm/mach-s5pv310/Makefile +++ b/arch/arm/mach-s5pv310/Makefile @@ -28,3 +28,4 @@ obj-$(CONFIG_MACH_UNIVERSAL_C210) += mach-universal_c210.o obj-$(CONFIG_S5PV310_SETUP_I2C1) += setup-i2c1.o obj-$(CONFIG_S5PV310_SETUP_I2C2) += setup-i2c2.o +obj-$(CONFIG_S5PC210_DEV_ONENAND) += dev-onenand.o diff --git a/arch/arm/mach-s5pv310/dev-onenand.c b/arch/arm/mach-s5pv310/dev-onenand.c new file mode 100644 index 0000000..9090711 --- /dev/null +++ b/arch/arm/mach-s5pv310/dev-onenand.c @@ -0,0 +1,46 @@ +/* + * linux/arch/arm/mach-s5pv310/dev-onenand.c + * + * Copyright (c) 2010 Samsung Electronics + * Kyungmin Park + * + * S5PC210 series device definition for OneNAND devices + * + * 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. + */ + +#include +#include +#include +#include + +#include +#include + +static struct resource s5pc210_onenand_resources[] = { + [0] = { + .start = S5PC210_PA_ONENAND, + .end = S5PC210_PA_ONENAND + SZ_128K - 1, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = S5PC210_PA_ONENAND_DMA, + .end = S5PC210_PA_ONENAND_DMA + SZ_8K - 1, + .flags = IORESOURCE_MEM, + }, + [2] = { + .start = IRQ_ONENAND_AUDI, + .end = IRQ_ONENAND_AUDI, + .flags = IORESOURCE_IRQ, + }, +}; + +struct platform_device s5pc210_device_onenand = { + /* It's same as s5pc110 */ + .name = "s5pc110-onenand", + .id = -1, + .num_resources = ARRAY_SIZE(s5pc210_onenand_resources), + .resource = s5pc210_onenand_resources, +}; diff --git a/arch/arm/mach-s5pv310/include/mach/irqs.h b/arch/arm/mach-s5pv310/include/mach/irqs.h index 56885ca..f7fb2b8 100644 --- a/arch/arm/mach-s5pv310/include/mach/irqs.h +++ b/arch/arm/mach-s5pv310/include/mach/irqs.h @@ -66,6 +66,8 @@ #define IRQ_IIC COMBINER_IRQ(27, 0) +#define IRQ_ONENAND_AUDI COMBINER_IRQ(34, 0) + /* Set the default NR_IRQS */ #define NR_IRQS COMBINER_IRQ(MAX_COMBINER_NR, 0) diff --git a/arch/arm/mach-s5pv310/include/mach/map.h b/arch/arm/mach-s5pv310/include/mach/map.h index 87697c9..f714620 100644 --- a/arch/arm/mach-s5pv310/include/mach/map.h +++ b/arch/arm/mach-s5pv310/include/mach/map.h @@ -23,6 +23,9 @@ #include +#define S5PC210_PA_ONENAND (0x0C000000) +#define S5PC210_PA_ONENAND_DMA (0x0C600000) + #define S5PV310_PA_CHIPID (0x10000000) #define S5P_PA_CHIPID S5PV310_PA_CHIPID