summaryrefslogtreecommitdiff
path: root/packages/linux
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2008-08-04 17:10:17 +0000
committerKoen Kooi <koen@openembedded.org>2008-08-04 17:10:17 +0000
commit11329060327d787712fd51afcf6b574143a619e7 (patch)
tree8bd0533c41f2af513c942acdc32b2ba9daa8a5b5 /packages/linux
parent2d40567554c5bed84dec725cf1f24cc4deb84ce7 (diff)
linux-omap2 git: add missing patch
Diffstat (limited to 'packages/linux')
-rw-r--r--packages/linux/linux-omap2-git/beagleboard/flash2.patch226
1 files changed, 226 insertions, 0 deletions
diff --git a/packages/linux/linux-omap2-git/beagleboard/flash2.patch b/packages/linux/linux-omap2-git/beagleboard/flash2.patch
new file mode 100644
index 0000000000..1018d46517
--- /dev/null
+++ b/packages/linux/linux-omap2-git/beagleboard/flash2.patch
@@ -0,0 +1,226 @@
+Received: from mail.service.utwente.nl ([130.89.5.253]) by exchange.service.utwente.nl with Microsoft SMTPSVC(6.0.3790.3959);
+ Mon, 4 Aug 2008 17:59:27 +0200
+Received: from mx.utwente.nl ([130.89.2.12]) by mail.service.utwente.nl with Microsoft SMTPSVC(6.0.3790.3959);
+ Mon, 4 Aug 2008 17:59:27 +0200
+Received: from vger.kernel.org (vger.kernel.org [209.132.176.167])
+ by mx.utwente.nl (8.12.10/SuSE Linux 0.7) with ESMTP id m74FwiDh028981
+ for <k.kooi@student.utwente.nl>; Mon, 4 Aug 2008 17:58:46 +0200
+Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
+ id S1757030AbYHDP61 (ORCPT <rfc822;k.kooi@student.utwente.nl>);
+ Mon, 4 Aug 2008 11:58:27 -0400
+Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756149AbYHDP61
+ (ORCPT <rfc822;linux-omap-outgoing>); Mon, 4 Aug 2008 11:58:27 -0400
+Received: from fg-out-1718.google.com ([72.14.220.154]:19323 "EHLO
+ fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
+ with ESMTP id S1756263AbYHDP60 (ORCPT
+ <rfc822;linux-omap@vger.kernel.org>); Mon, 4 Aug 2008 11:58:26 -0400
+Received: by fg-out-1718.google.com with SMTP id 19so1022490fgg.17
+ for <linux-omap@vger.kernel.org>; Mon, 04 Aug 2008 08:58:25 -0700 (PDT)
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
+ d=googlemail.com; s=gamma;
+ h=domainkey-signature:received:received:message-id:date:from
+ :user-agent:x-accept-language:mime-version:to:cc:subject
+ :content-type;
+ bh=65WuA1p8Hw9I6a1ij+FIP5BOigKnPXbZo9w8e5jem0o=;
+ b=genF0tqD5fHKd9/hzb3nyfM8o27WacwLhM+JdeHMRbOSUrlu7L7la1ApxJgERFMcFq
+ xf6IPPxwpmi7JjsryIXlQbmRwqdF1XgJzndCYvCV9pZsWkPYr3FgeMBJmFxCyo41Yy5N
+ 9uz+miJK5pzkHnReQOeE9w3KGI083vvhmF+SQ=
+DomainKey-Signature: a=rsa-sha1; c=nofws;
+ d=googlemail.com; s=gamma;
+ h=message-id:date:from:user-agent:x-accept-language:mime-version:to
+ :cc:subject:content-type;
+ b=Nl4sgHVkS4ocH1hg5cxzO4FV+n1IteOKAHKHTV43OL7cXJqVZbyQ2b/cBPgCsBqAX7
+ 2xhUTl2Ruhq+w5MPlY+LJs/aLeIoS4DPcF3NjDAQJuuWYBWBsGMyrdUeClVfW76PsEEz
+ 2S6sDl51zZ/ay/nohOXD7MKL+qvkDrIsTjyA8=
+Received: by 10.86.72.15 with SMTP id u15mr10510585fga.22.1217865504927;
+ Mon, 04 Aug 2008 08:58:24 -0700 (PDT)
+Received: from ?192.168.178.25? ( [195.4.48.71])
+ by mx.google.com with ESMTPS id 4sm160959fge.5.2008.08.04.08.58.23
+ (version=TLSv1/SSLv3 cipher=RC4-MD5);
+ Mon, 04 Aug 2008 08:58:24 -0700 (PDT)
+Message-ID: <4897271E.6000408@googlemail.com>
+Date: Mon, 04 Aug 2008 17:58:22 +0200
+From: Dirk Behme <dirk.behme@googlemail.com>
+User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923)
+X-Accept-Language: en-us, en
+MIME-Version: 1.0
+To: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
+CC: Steve Sakoman <steve@sakoman.com>
+Subject: [PATCH 2/3 v2] OMAP3 Beagle: add nand support
+Content-Type: multipart/mixed;
+ boundary="------------030806030601010501010906"
+Sender: linux-omap-owner@vger.kernel.org
+Precedence: bulk
+List-ID: <linux-omap.vger.kernel.org>
+X-Mailing-List: linux-omap@vger.kernel.org
+X-UTwente-MailScanner-Information: Scanned by MailScanner. Contact servicedesk@icts.utwente.nl for more information.
+X-UTwente-MailScanner: Found to be clean
+X-UTwente-MailScanner-From: linux-omap-owner@vger.kernel.org
+X-Spam-Status: No
+Return-Path: linux-omap-owner@vger.kernel.org
+X-OriginalArrivalTime: 04 Aug 2008 15:59:27.0586 (UTC) FILETIME=[12A54420:01C8F64B]
+
+This is a multi-part message in MIME format.
+--------------030806030601010501010906
+Content-Type: text/plain; charset=ISO-8859-1; format=flowed
+Content-Transfer-Encoding: 7bit
+
+From: Steve Sakoman <steve@sakoman.com>, Dirk Behme <dirk.behme@gmail.com>
+
+Add nand support to omap3beagle
+
+Signed-off-by: Steve Sakoman <steve@sakoman.com>
+Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
+
+
+--------------030806030601010501010906
+Content-Type: text/plain;
+ name="2_nand.txt"
+Content-Transfer-Encoding: 7bit
+Content-Disposition: inline;
+ filename="2_nand.txt"
+
+Index: linux-beagle/arch/arm/mach-omap2/board-omap3beagle.c
+===================================================================
+--- linux-beagle.orig/arch/arm/mach-omap2/board-omap3beagle.c
++++ linux-beagle/arch/arm/mach-omap2/board-omap3beagle.c
+@@ -20,11 +20,15 @@
+ #include <linux/clk.h>
+ #include <linux/io.h>
+ #include <linux/leds.h>
++#include <linux/mtd/mtd.h>
++#include <linux/mtd/partitions.h>
++#include <linux/mtd/nand.h>
+
+ #include <asm/hardware.h>
+ #include <asm/mach-types.h>
+ #include <asm/mach/arch.h>
+ #include <asm/mach/map.h>
++#include <asm/mach/flash.h>
+
+ #include <asm/arch/gpio.h>
+ #include <asm/arch/board.h>
+@@ -32,6 +36,64 @@
+ #include <asm/arch/usb-ehci.h>
+ #include <asm/arch/hsmmc.h>
+ #include <asm/arch/common.h>
++#include <asm/arch/gpmc.h>
++#include <asm/arch/nand.h>
++
++#define GPMC_CS0_BASE 0x60
++#define GPMC_CS_SIZE 0x30
++
++static struct mtd_partition omap3beagle_nand_partitions[] = {
++ /* All the partition sizes are listed in terms of NAND block size */
++ {
++ .name = "X-Loader",
++ .offset = 0,
++ .size = 4*(64 * 2048),
++ .mask_flags = MTD_WRITEABLE, /* force read-only */
++ },
++ {
++ .name = "U-Boot",
++ .offset = MTDPART_OFS_APPEND, /* Offset = 0x80000 */
++ .size = 15*(64 * 2048),
++ .mask_flags = MTD_WRITEABLE, /* force read-only */
++ },
++ {
++ .name = "U-Boot Env",
++ .offset = MTDPART_OFS_APPEND, /* Offset = 0x260000 */
++ .size = 1*(64 * 2048),
++ },
++ {
++ .name = "Kernel",
++ .offset = MTDPART_OFS_APPEND, /* Offset = 0x280000 */
++ .size = 32*(64 * 2048),
++ },
++ {
++ .name = "File System",
++ .offset = MTDPART_OFS_APPEND, /* Offset = 0x680000 */
++ .size = MTDPART_SIZ_FULL,
++ },
++};
++
++static struct omap_nand_platform_data omap3beagle_nand_data = {
++ .parts = omap3beagle_nand_partitions,
++ .nr_parts = ARRAY_SIZE(omap3beagle_nand_partitions),
++ .dma_channel = -1, /* disable DMA in OMAP NAND driver */
++ .nand_setup = NULL,
++ .dev_ready = NULL,
++};
++
++static struct resource omap3beagle_nand_resource = {
++ .flags = IORESOURCE_MEM,
++};
++
++static struct platform_device omap3beagle_nand_device = {
++ .name = "omap2-nand",
++ .id = -1,
++ .dev = {
++ .platform_data = &omap3beagle_nand_data,
++ },
++ .num_resources = 1,
++ .resource = &omap3beagle_nand_resource,
++};
+
+ static struct omap_uart_config omap3_beagle_uart_config __initdata = {
+ .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
+@@ -113,6 +175,44 @@ static struct platform_device *omap3_bea
+ &leds_gpio,
+ };
+
++void __init omap3beagle_flash_init(void)
++{
++ u8 cs = 0;
++ u8 nandcs = GPMC_CS_NUM + 1;
++
++ u32 gpmc_base_add = OMAP34XX_GPMC_VIRT;
++
++ /* find out the chip-select on which NAND exists */
++ while (cs < GPMC_CS_NUM) {
++ u32 ret = 0;
++ ret = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG1);
++
++ if ((ret & 0xC00) == 0x800) {
++ printk(KERN_INFO "Found NAND on CS%d\n", cs);
++ if (nandcs > GPMC_CS_NUM)
++ nandcs = cs;
++ }
++ cs++;
++ }
++
++ if (nandcs > GPMC_CS_NUM) {
++ printk(KERN_INFO "NAND: Unable to find configuration "
++ "in GPMC\n ");
++ return;
++ }
++
++ if (nandcs < GPMC_CS_NUM) {
++ omap3beagle_nand_data.cs = nandcs;
++ omap3beagle_nand_data.gpmc_cs_baseaddr = (void *)
++ (gpmc_base_add + GPMC_CS0_BASE + nandcs * GPMC_CS_SIZE);
++ omap3beagle_nand_data.gpmc_baseaddr = (void *) (gpmc_base_add);
++
++ printk(KERN_INFO "Registering NAND on CS%d\n", nandcs);
++ if (platform_device_register(&omap3beagle_nand_device) < 0)
++ printk(KERN_ERR "Unable to register NAND device\n");
++ }
++}
++
+ static void __init omap3_beagle_init(void)
+ {
+ platform_add_devices(omap3_beagle_devices, ARRAY_SIZE(omap3_beagle_devices));
+@@ -122,6 +222,7 @@ static void __init omap3_beagle_init(voi
+ hsmmc_init();
+ usb_musb_init();
+ usb_ehci_init();
++ omap3beagle_flash_init();
+ }
+
+ arch_initcall(omap3_beagle_i2c_init);
+
+--------------030806030601010501010906--
+--
+To unsubscribe from this list: send the line "unsubscribe linux-omap" in
+the body of a message to majordomo@vger.kernel.org
+More majordomo info at http://vger.kernel.org/majordomo-info.html