From patchwork Thu Nov 29 06:41:37 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kim, Milo" X-Patchwork-Id: 1820431 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id C7AEEDF24C for ; Thu, 29 Nov 2012 06:42:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752331Ab2K2Glq (ORCPT ); Thu, 29 Nov 2012 01:41:46 -0500 Received: from bear.ext.ti.com ([192.94.94.41]:42216 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751553Ab2K2Glo convert rfc822-to-8bit (ORCPT ); Thu, 29 Nov 2012 01:41:44 -0500 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id qAT6feiA016626; Thu, 29 Nov 2012 00:41:41 -0600 Received: from DQHE71.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id qAT6fbLw029034; Thu, 29 Nov 2012 12:11:38 +0530 (IST) Received: from DQHE73.ent.ti.com (172.16.34.100) by DQHE71.ent.ti.com (172.16.34.86) with Microsoft SMTP Server (TLS) id 14.1.323.3; Thu, 29 Nov 2012 14:41:37 +0800 Received: from DQHE02.ent.ti.com ([fe80::19f9:3779:aee:e323]) by DQHE73.ent.ti.com ([fe80::998a:f184:2965:ab08%38]) with mapi id 14.01.0323.003; Thu, 29 Nov 2012 14:41:37 +0800 From: "Kim, Milo" To: "tony@atomide.com" CC: "paul@pwsan.com" , "Hiremath, Vaibhav" , "srinath@mistralsolutions.com" , "linux-omap@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: [PATCH 1/3] omap: craneboard: support NAND device Thread-Topic: [PATCH 1/3] omap: craneboard: support NAND device Thread-Index: Ac3N/JO+DMulpR+rTCaDo4me8z+9bg== Date: Thu, 29 Nov 2012 06:41:37 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.16.34.32] MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org This patch enables the NAND device on the AM3517 Craneboard. MTD partitions are created as below. 0x000000000000-0x000000080000 : "X-Loader" 0x000000080000-0x000000240000 : "U-Boot" 0x000000240000-0x000000280000 : "U-Boot Env" 0x000000280000-0x000000780000 : "Kernel" 0x000000780000-0x000010000000 : "File System" Signed-off-by: Milo(Woogyom) Kim --- arch/arm/mach-omap2/board-am3517crane.c | 38 +++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/arch/arm/mach-omap2/board-am3517crane.c b/arch/arm/mach-omap2/board-am3517crane.c index 51b96a1..37646e5 100644 --- a/arch/arm/mach-omap2/board-am3517crane.c +++ b/arch/arm/mach-omap2/board-am3517crane.c @@ -20,12 +20,17 @@ #include #include #include +#include +#include +#include #include #include #include #include "common.h" +#include "common-board-devices.h" +#include "board-flash.h" #include "am35xx-emac.h" #include "mux.h" @@ -51,6 +56,36 @@ static struct usbhs_omap_board_data usbhs_bdata __initdata = { .reset_gpio_port[2] = -EINVAL }; +static struct mtd_partition crane_nand_partitions[] = { + { + .name = "X-Loader", + .offset = 0, + .size = 4 * NAND_BLOCK_SIZE, + .mask_flags = MTD_WRITEABLE, + }, + { + .name = "U-Boot", + .offset = MTDPART_OFS_APPEND, + .size = 14 * NAND_BLOCK_SIZE, + .mask_flags = MTD_WRITEABLE, + }, + { + .name = "U-Boot Env", + .offset = MTDPART_OFS_APPEND, + .size = 2 * NAND_BLOCK_SIZE, + }, + { + .name = "Kernel", + .offset = MTDPART_OFS_APPEND, + .size = 40 * NAND_BLOCK_SIZE, + }, + { + .name = "File System", + .offset = MTDPART_OFS_APPEND, + .size = MTDPART_SIZ_FULL, + }, +}; + static void __init am3517_crane_init(void) { int ret; @@ -58,6 +93,9 @@ static void __init am3517_crane_init(void) omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); omap_serial_init(); omap_sdrc_init(NULL, NULL); + board_nand_init(crane_nand_partitions, + ARRAY_SIZE(crane_nand_partitions), 0, + NAND_BUSWIDTH_16, NULL); /* Configure GPIO for EHCI port */ if (omap_mux_init_gpio(GPIO_USB_NRESET, OMAP_PIN_OUTPUT)) {