From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0C4DFC48BD1 for ; Fri, 11 Jun 2021 16:14:48 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 549DE613D9 for ; Fri, 11 Jun 2021 16:14:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 549DE613D9 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=in.bosch.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DE0F080C85; Fri, 11 Jun 2021 18:14:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=in.bosch.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=in.bosch.com header.i=@in.bosch.com header.b="KncivjlD"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 43B8380F28; Fri, 11 Jun 2021 18:14:31 +0200 (CEST) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on20630.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e1a::630]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 54E66803B9 for ; Fri, 11 Jun 2021 18:14:27 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=in.bosch.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=Gireesh.Hiremath@in.bosch.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=km9BV7iJp3ghdC7CnIHRpGcKCYFmy3THubdMFVPnsrnH94m+n8pVJzjVcRR64Q1A0C6pZo5UfTaf7L182EdTZ42e7MhJFVt9IOe3bveAn2G8JRnQpBMcqJfzQ4kUufP6tKasA4KyxE5gJ1K9Vkrz25giVOe/u8n0nSL95gee+rM03QZOkt1tGJmlGMhaZePFdQPJL3Md/LJd1ZkJapmaFnMBVTlqzdnkDsdprffoGqJGmmSxerdyzbCrQr6Q1bAf04dG9ejMf9p+5mqkf5GNEuscrnLxW+mGijqWLyoI2WPb8pRY75mC0fw/sX/5GEwQV5oy6nqwJLBdTBNY57JtLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vSUICgS6q37SGUU4yTOAFa1dF7AdG2RNdn1woEwd/t0=; b=WW6v8sU3PudqtWCMVni0bniV5q+ObryhfK43QMO/Cbv7YhC4fxBhoZumHU7NGjkhPwr/iEvsALNUORk7TUNtsd2JmzVtEgQXb9zleWDI6oZAtruP0LKEa9zWBwSD2KAQkwP/7LVeeNUKG946hFjnSVeGnwlRwAZjJERtwxlTH1KsgRJ+51pONkBM00TFfb4d3wfztO/BpsWuVO2YHk+3TxY8O1K2kyarxcV3lpgFclr58WEYIL190GYRiklfj+8zsnq3dsg7X1Alr5K1kImbQkAbUm1pvyz143636+mPJGXDSs+KINphRTNeh4rhz4ic+gRf5u372kq7GGNBsQ1iug== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 139.15.153.203) smtp.rcpttodomain=lists.denx.de smtp.mailfrom=in.bosch.com; dmarc=pass (p=reject sp=none pct=100) action=none header.from=in.bosch.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=in.bosch.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vSUICgS6q37SGUU4yTOAFa1dF7AdG2RNdn1woEwd/t0=; b=KncivjlDcmZkE4v7iu2DLDQFMoemHckphneT6Mq7efS48LwXoOtrOYiKIQgJA5/RIByk34S5ACLk2W/AWX/vPoMJfQWK908Pi8rZRf5r3fVY5MTxu0y39gCmMuYxsnIuCqGZM5gznMmStouZBrNEoN6gVOjU4jWh4E+3CWFnrTI= Received: from AM7PR02CA0028.eurprd02.prod.outlook.com (2603:10a6:20b:100::38) by DB7PR10MB2396.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:41::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.21; Fri, 11 Jun 2021 16:14:26 +0000 Received: from VE1EUR03FT030.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:100:cafe::f9) by AM7PR02CA0028.outlook.office365.com (2603:10a6:20b:100::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.20 via Frontend Transport; Fri, 11 Jun 2021 16:14:26 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 139.15.153.203) smtp.mailfrom=in.bosch.com; lists.denx.de; dkim=none (message not signed) header.d=none; lists.denx.de; dmarc=pass action=none header.from=in.bosch.com; Received-SPF: Pass (protection.outlook.com: domain of in.bosch.com designates 139.15.153.203 as permitted sender) receiver=protection.outlook.com; client-ip=139.15.153.203; helo=eop.bosch-org.com; Received: from eop.bosch-org.com (139.15.153.203) by VE1EUR03FT030.mail.protection.outlook.com (10.152.18.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.21 via Frontend Transport; Fri, 11 Jun 2021 16:14:25 +0000 Received: from SI-EXCAS2000.de.bosch.com (10.139.217.201) by eop.bosch-org.com (139.15.153.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2176.14; Fri, 11 Jun 2021 18:14:12 +0200 Received: from SI-HUB2000.de.bosch.com (10.4.103.108) by SI-EXCAS2000.de.bosch.com (10.139.217.201) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2176.14; Fri, 11 Jun 2021 18:14:11 +0200 Received: from localhost.localdomain (10.141.230.85) by SI-HUB2000.de.bosch.com (10.4.103.108) with Microsoft SMTP Server id 15.1.2176.14; Fri, 11 Jun 2021 18:14:09 +0200 From: To: , , CC: , , Subject: [PATCH v4 02/18] am335x, guardian: mem: Add board dependent mem values Date: Fri, 11 Jun 2021 16:13:34 +0000 Message-ID: <20210611161350.2141-3-Gireesh.Hiremath@in.bosch.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210611161350.2141-1-Gireesh.Hiremath@in.bosch.com> References: <20210611161350.2141-1-Gireesh.Hiremath@in.bosch.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.141.230.85] X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b320ac1d-9e2f-43ac-e620-08d92cf3fb8e X-MS-TrafficTypeDiagnostic: DB7PR10MB2396: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jHWld4UxTr21QqWE4kJyuxkEFPJ3PVeUPcRsIUTQA3UPoGaVEhtdyPKRPYbshp90GVH/f6NJo8wYnHDvZbw0TrS+MhxYolZt9zNVbVWk+Q2ymwrYc4kX+BN0+OTArc0BmzXy6uRSF0mMjNZYgHzuzGGaPOa809wIUOAQeTwdkct0htYNEkxcUHU/Ax/07dVwqP3gJ8qPZE9BG+ycjID9aqwbqPthM1n8F9/sitGhAYIX3h1oJ0IV+8dDN++50EXZSgWufm5Ob8OXhRazYRmwRqLkKUGn4KrnRASaWtTAI2UJnrgAkZs+yr+9SmB19LjgCfNn/Nzlvcyh1StBQjLHZ9kqwT+mQ/m5/1eJTHRt37H3wC4H2Brcs7Ew3pHj85RoFYl7BKvZ4PrYIB4I5K0H89hvZjnc5QwJ14OWa8dA4lIAvSWtMBTu6zjjJ9+RbMDTy8BD9QiT0WDf8e6PRfxUZ28DiR/KemC7PcsR3iUWk+VQTbKCC8lgouixW0uhzuXt4VSZ/med1Nk/LBe9ICcRIjrDkSslG8vF/+d0Yy+JNuuGRzP47BROqJPpNt57SAN65sflPSTk/i2kfTPv+d+JXMCXnyJkf2rAwl9bOlbUzKsJEZQyjEXfwCNtBK00xY/4mjqqBunhJccECeSCsA9yIbWPh3gsXC2Xjz/EDlNMbho+TqgW8ImkB0nHDnFki4/bedvNCnJtXw8TQLvU/m5UkwNdJYFcWmPDeP4o7WwgBFwrHzQs5MNqzZq8r1QNFlUjlURuKixpNK0Wmoy6g6MCBQybDNXXW0DR1dXDcabEq1slPzU+F9eEC0Sjo9lKLzLo X-Forefront-Antispam-Report: CIP:139.15.153.203; CTRY:DE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:eop.bosch-org.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(4636009)(36840700001)(46966006)(2876002)(356005)(107886003)(82310400003)(2906002)(5660300002)(1076003)(4326008)(83380400001)(47076005)(110136005)(36860700001)(8936002)(498600001)(86362001)(16526019)(186003)(26005)(6666004)(336012)(70586007)(2616005)(70206006)(8676002)(81166007)(54906003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: in.bosch.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jun 2021 16:14:25.7667 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b320ac1d-9e2f-43ac-e620-08d92cf3fb8e X-MS-Exchange-CrossTenant-Id: 0ae51e19-07c8-4e4b-bb6d-648ee58410f4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=0ae51e19-07c8-4e4b-bb6d-648ee58410f4; Ip=[139.15.153.203]; Helo=[eop.bosch-org.com] X-MS-Exchange-CrossTenant-AuthSource: VE1EUR03FT030.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR10MB2396 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean From: Moses Christopher - Add mem-guardian.h derived from am33xx/mem.h * Add GPMC config values optimized for Bosch Guardian Board * NAND Chip used by Bosch Guardian Board is Micron MT29F4G08ABBFA Signed-off-by: Moses Christopher --- .../include/asm/arch-am33xx/mem-guardian.h | 63 +++++++++++++++++++ arch/arm/mach-omap2/am33xx/board.c | 4 ++ arch/arm/mach-omap2/mem-common.c | 4 ++ board/bosch/guardian/board.c | 2 +- 4 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 arch/arm/include/asm/arch-am33xx/mem-guardian.h diff --git a/arch/arm/include/asm/arch-am33xx/mem-guardian.h b/arch/arm/include/asm/arch-am33xx/mem-guardian.h new file mode 100644 index 0000000000..e864a0fd36 --- /dev/null +++ b/arch/arm/include/asm/arch-am33xx/mem-guardian.h @@ -0,0 +1,63 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * (C) Copyright 2006-2008 + * Texas Instruments, + * + * (C) Copyright 2020 + * Robert Bosch Power Tools GmbH + * + * Author + * Moses Christopher + * + * Copied from: + * arch/arm/include/asm/arch-am33xx/mem.h + * + * Initial Code from: + * Mansoor Ahamed + * Richard Woodruff + */ + +#ifndef _MEM_GUARDIAN_H_ +#define _MEM_GUARDIAN_H_ + +/* + * GPMC settings - + * Definitions is as per the following format + * #define _GPMC_CONFIG + * Where: + * PART is the part name e.g. M_NAND - Micron Nand Flash + * x is GPMC config registers from 1 to 7 (there will be 7 macros) + * Value is corresponding value + * + * For every valid PRCM configuration there should be only one definition of + * the same. + * + * The following values are optimized for improving the NAND Read speed + * They are applicable and tested for Bosch Guardian Board. + * Read Speeds rose from 1.5MiBs to over 7.6MiBs + * + * Currently valid part Names are (PART): + * M_NAND - Micron NAND + */ +#define GPMC_SIZE_256M 0x0 +#define GPMC_SIZE_128M 0x8 +#define GPMC_SIZE_64M 0xC +#define GPMC_SIZE_32M 0xE +#define GPMC_SIZE_16M 0xF + +#define M_NAND_GPMC_CONFIG1 0x00000800 +#define M_NAND_GPMC_CONFIG2 0x00030300 +#define M_NAND_GPMC_CONFIG3 0x00030300 +#define M_NAND_GPMC_CONFIG4 0x02000201 +#define M_NAND_GPMC_CONFIG5 0x00030303 +#define M_NAND_GPMC_CONFIG6 0x000000C0 +#define M_NAND_GPMC_CONFIG7 0x00000008 + +/* max number of GPMC Chip Selects */ +#define GPMC_MAX_CS 8 +/* max number of GPMC regs */ +#define GPMC_MAX_REG 7 + +#define DBG_MPDB 6 + +#endif /* endif _MEM_GUARDIAN_H_ */ diff --git a/arch/arm/mach-omap2/am33xx/board.c b/arch/arm/mach-omap2/am33xx/board.c index 62178f1e70..4bf0535e3c 100644 --- a/arch/arm/mach-omap2/am33xx/board.c +++ b/arch/arm/mach-omap2/am33xx/board.c @@ -23,7 +23,11 @@ #include #include #include +#if IS_ENABLED(CONFIG_TARGET_AM335X_GUARDIAN) +#include +#else #include +#endif #include #include #include diff --git a/arch/arm/mach-omap2/mem-common.c b/arch/arm/mach-omap2/mem-common.c index 50d5f3e9eb..2dcf0cf9c3 100644 --- a/arch/arm/mach-omap2/mem-common.c +++ b/arch/arm/mach-omap2/mem-common.c @@ -15,7 +15,11 @@ #include #include #include +#if IS_ENABLED(CONFIG_TARGET_AM335X_GUARDIAN) +#include +#else #include +#endif #include #include #include diff --git a/board/bosch/guardian/board.c b/board/bosch/guardian/board.c index 113838f8b7..9429454a74 100644 --- a/board/bosch/guardian/board.c +++ b/board/bosch/guardian/board.c @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include #include -- 2.20.1