From patchwork Mon Dec 28 12:17:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan \(OSS\)" X-Patchwork-Id: 352632 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp9746167jai; Mon, 28 Dec 2020 05:28:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJyYrTf/wPkolUlwkrw0LX/j90NlZH9HvwVxsUUHAhHoLPHa8ddQlVHXYwjtnAVQ47Xu0cTZ X-Received: by 2002:a17:906:f153:: with SMTP id gw19mr42527128ejb.272.1609162092366; Mon, 28 Dec 2020 05:28:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1609162092; cv=pass; d=google.com; s=arc-20160816; b=LZpm75JVa7nOW2hsqhHQ0xA3FlUGsO6A28FJW9scoxhSvrt7KycDTB0G5e4/DfdQAu F9SH0YFoN/CfX4Mu8diZADRDDRjYsy7wsqWyk+ruO7QtT5qIU/p4Cj2T6qtg9AQqSXD6 e5/kVE0W1NBsr7zUdq3pradTHXAyfxAUSO1DZJA4t6c+M70cPnY7whJMxsUmc0FwCTe5 J/VGkoQphzyZD2WqqbGvG8GUKUtHtutGTzkA158Ch8H81z3rKZkrFJLa0O6CY1Ajdrtb vfvu0MjyNnsLplS1PqMw9T8kBag6XDhfb7hLurc29f2dHcTQrpupWi+QQVdVDHiBet1Q BJVg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version :content-transfer-encoding:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=irfLpp8fyPqHOlYnHm/Yqp8E80+C7Se0s8ETA2MbOZE=; b=N43m2rShQPKOOZwZMXkW+3zoS6N0+1u1r+Tg01ATHRGn592so/Yq4CqFg8wVyLFwRH TCLf+4l1H688Va354d8uY1xkWDfdjUy3tg2h3OLFTsOuusUXf1bqeK64KnRNlY0y7zn4 1dN7KrIrbtCOsWkgTOtr/OK3BZ5FkX5uMhBsp+m+FbsvbZrsJll13gRx4EJ9T7o84W76 NdBFrqg7DbQJnzGLtXdP+1SKLd6cAhr1NuHYwAYV9XZcTN6JcYYiJEO+gxy7oW4uWK7+ igvjCXaCSUGyh4KV9YUziKmrcZm2qfbeguSGT+7wZT1toLwkG+jSla4EROYaaZXuklFH BBow== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=gknuTxVE; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id dm25si19217355edb.109.2020.12.28.05.28.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Dec 2020 05:28:12 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=gknuTxVE; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 548BF82602; Mon, 28 Dec 2020 14:26:52 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=oss.nxp.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=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="gknuTxVE"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9AC49823D3; Mon, 28 Dec 2020 12:48:43 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=no autolearn_force=no version=3.4.2 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on20602.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e1a::602]) (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 B4BEE8232D for ; Mon, 28 Dec 2020 12:48:40 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=oss.nxp.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=peng.fan@oss.nxp.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b0zrN4lISHJrSvMGWDKCcIFYBf8dOUnnTaRdYM2J5NR4CMEgsYVHraGBvaeq7zh58RFO9yUMvSAPdyNroi4OcnYQs+9bLmXQOkLpm/knzgH2rdH3tlO2B3H2a/Q40Xi9R27Iso8ejYswrQNgRmmeQ+xSISREB2SYDmwYoKi9wEDCwgilo0W4raHh8yGRQY5qNWB/tUiU0EVge+S8WOzJsOmq9tvkitQT5NFdjZG91sS+GoS7e0UBlxSgeB9DwWT7i8eaj6xy1no78Y79TX+g/p1QVoRKWgyytOIJzXorQoorRDmjdV4rDOlOBLEQcJQynfT8ip1vLzcgaymZ2y8vyA== 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=irfLpp8fyPqHOlYnHm/Yqp8E80+C7Se0s8ETA2MbOZE=; b=QznzTN+yZQ8zs2fiFfvIM0g8zKaBWafOWa/7WVvatS4U6yS/MxkDrx/L5UmZVd5OTuk5mK+fVhS8qj0gpHZGj8e6cOMFYne+sB1g3RBOyLcshC0K8z0gGuB0Anon6+Eu7ONUQgbDJVQS9/K+RdJJ/Z2eKcf2E61LvOrMgwYkiNqAEgOHP3LDQu5rZyunZN/dxoX2PjAylGhrBp2NY7HGggctdl03A60fPBj+WJ6XnlSe4wHtabCBNGd34CqNv5xiF8UFkGI/XYYV33wcfdhGDGPlX7nQ3iaDJSgMI3IA7A8dSdPlBHLmSylPgulHLbjQEqBN8Lm2q3jwycreZUkfXA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=irfLpp8fyPqHOlYnHm/Yqp8E80+C7Se0s8ETA2MbOZE=; b=gknuTxVEdM9pJ6wwq+1d2jWd57/fheR+sgrDleGDf5SOCmIcQMGbh0UL/ew3DfazXSh0Byq9gRRbK/jEB7yl5eq5Rdk0pwhkktK7LOkVk1YzpEIy5pLJlN+dlVBtIuH1BsNfFOTMsRm7+2dzz6DJW0lGPQO13dYZOEdywUT7+nA= Authentication-Results: denx.de; dkim=none (message not signed) header.d=none; denx.de; dmarc=none action=none header.from=oss.nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB7PR04MB4233.eurprd04.prod.outlook.com (2603:10a6:5:25::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3700.29; Mon, 28 Dec 2020 11:48:39 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c964:9:850a:fc5%10]) with mapi id 15.20.3700.031; Mon, 28 Dec 2020 11:48:39 +0000 From: "Peng Fan (OSS)" To: sbabic@denx.de, festevam@gmail.com Cc: uboot-imx@nxp.com, u-boot@lists.denx.de, Peng Fan Subject: [PATCH 05/13] imx: imx8mn_evk: correct stack/malloc adress Date: Mon, 28 Dec 2020 20:17:02 +0800 Message-Id: <20201228121710.17235-5-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201228121710.17235-1-peng.fan@oss.nxp.com> References: <20201228121710.17235-1-peng.fan@oss.nxp.com> X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: SG2PR04CA0149.apcprd04.prod.outlook.com (2603:1096:3:16::33) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from linux-1xn6.ap.freescale.net (119.31.174.71) by SG2PR04CA0149.apcprd04.prod.outlook.com (2603:1096:3:16::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3700.27 via Frontend Transport; Mon, 28 Dec 2020 11:48:37 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 6a3dbd12-17cb-4731-9b0f-08d8ab268453 X-MS-TrafficTypeDiagnostic: DB7PR04MB4233: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:242; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ec2IQITcnUJffIeEyFO4RHgZ+064bUKw/F9gbpRdBJ+CV53LaHKwsHVsVWuQJBXh+ikZBmujf2nt1e40Yl9KXw8oAqLYEfOgl4mo2Bs91HsW2DDsh81H55F9YuYyEijs2sErMiRiustxknIBDB2IunHDzYMR0s1GF1dd8LCFIJTnhl6r7TYIuZ2eqX2cyi6JQ60r8oQ4xyDvPmbweq3XrBqe3hpD3UY4dna7BUqXC+Bg4Yj3l307S8AzGwdaOwJbgjHf5vv31j5ID8A4RK1lYYRZIw3l3eIYYRWoZOhV6fNv2zY3ildNEyrOvK/4FDqASECg7oLQvYqYrJhf2vISH8EIN68GsLWH/r6stIDTc9UuJ9Faph80+vHmCdyw3YSfLS1bI0OxBU/w8KmxKxixmA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(346002)(136003)(366004)(39860400002)(376002)(83380400001)(6486002)(8676002)(186003)(16526019)(316002)(2906002)(2616005)(956004)(26005)(66476007)(6666004)(478600001)(8936002)(5660300002)(66946007)(52116002)(1076003)(6506007)(66556008)(4326008)(86362001)(6512007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: J3wSQUaRdGy+Ywgl06WYiImcNRbZpzCebgqiuUVMTdMQYaVD4BKvF4G3yJPIHYWdjm9u41W8JKYTO6+KKsVjyz1XwV+WSPPkOum6vBCtUfHoD7Xp8S9EKeWLqjanbpjlksQGZ3j9wSjsBXmSky97PRTNHpTQ9g49A7RKMYNpDSdzKpgyCS1crPcOSIr4Q2c48OnYBq4C9fh0deknWECuVq/wB/EqMRI+UX/qTpzJV67j5Z342sUAmXVPxSeRjhQ7yrEcKE/8CodMDTkPWPadTB/0GOOKDvPZqJfFcy0UVlZxbUQ7E5R8LljQnF5tOFSnBO/3IPGQLj2yCzOYuWjMGAKx08Y8Mg5Skmvmcc/W0Kj4O2xAGA2zJ+lPe2z9VVOK6swMUt0QuMeEDLHyl7NLJ2iSUmRoQUY9UYeoB0RzALaI+7rv55bRfVvc59KOLtFYasFExZRv9fxiAFEXgqDn87P0rISVG4HnRJXGest/T7tjkQsw1Lr+syOonRVWzZlpUM4O1L+dtn2qYNEzSbxo4qBtwVm3vWMMZ7gqIaOZXGSM8qCb+bAIxDx1N6mP31VMhY8Y1FD8hEaipbOX5h3wplquJfuIkPHucWRPiRx7GY2BESlM2nzrOlUthxLMKFpYMJTH4rpzh7tW+EsL96PvfuniSqvs88Q/prMyhR7NmtZwqvO8xeLJP7UZ4gTz6TvLuYtDhZwIfxEjAvCk/JDqZX/Uob5JExsn6npkO7iG/mTwy5lXB8WGBdXsQ/dMz80T9no3y5IYHKNKv3+NKuPniVwKeR5Wl14nnV9u1I9+uHun3reTn2Nq9yFXQkiShUZEylf0/tdO4OJy7WD/gg8VVDAUBJzb/7XDppP5Lt8I/hzXzgQx7g1szFyLpyYU0JKdTZbex+2xNWae7Mx9WTolDYPOLETvzXUs+PKc0+N8oatcSkJNBETFrB6q3X5jzMv4Ey939GoKprre3i88AgriRlOQe+M+M7pkpGC7gE9QsWcahmZGd5/vYkeArXI3a5ht X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Dec 2020 11:48:38.9544 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-Network-Message-Id: 6a3dbd12-17cb-4731-9b0f-08d8ab268453 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: PVWZG/A0fU3hXNxilAK9tN6qlM0dvNJltd39ZC8gSN5q/y+0SyL2SQApafrOi0WuK7CNz/GrpKJQnHM+XtHaFQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4233 X-Mailman-Approved-At: Mon, 28 Dec 2020 14:26:27 +0100 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.102.3 at phobos.denx.de X-Virus-Status: Clean From: Peng Fan Move SP to end of OCRAM space. Drop MALLOC_F to make it alloc from stack space. Signed-off-by: Peng Fan --- drivers/power/power_i2c.c | 8 ++++---- include/configs/imx8mn_evk.h | 9 +++------ 2 files changed, 7 insertions(+), 10 deletions(-) -- 2.28.0 diff --git a/drivers/power/power_i2c.c b/drivers/power/power_i2c.c index 5a0455e119..b67ac2f027 100644 --- a/drivers/power/power_i2c.c +++ b/drivers/power/power_i2c.c @@ -23,7 +23,7 @@ int pmic_reg_write(struct pmic *p, u32 reg, u32 val) if (check_reg(p, reg)) return -EINVAL; -#if defined(CONFIG_DM_I2C) +#if CONFIG_IS_ENABLED(DM_I2C) struct udevice *dev; int ret; @@ -67,7 +67,7 @@ int pmic_reg_write(struct pmic *p, u32 reg, u32 val) return -EINVAL; } -#if defined(CONFIG_DM_I2C) +#if CONFIG_IS_ENABLED(DM_I2C) return dm_i2c_write(dev, reg, buf, pmic_i2c_tx_num); #else return i2c_write(pmic_i2c_addr, reg, 1, buf, pmic_i2c_tx_num); @@ -83,7 +83,7 @@ int pmic_reg_read(struct pmic *p, u32 reg, u32 *val) if (check_reg(p, reg)) return -EINVAL; -#if defined(CONFIG_DM_I2C) +#if CONFIG_IS_ENABLED(DM_I2C) struct udevice *dev; ret = i2c_get_chip_for_busnum(p->bus, pmic_i2c_addr, @@ -131,7 +131,7 @@ int pmic_reg_read(struct pmic *p, u32 reg, u32 *val) int pmic_probe(struct pmic *p) { debug("Bus: %d PMIC:%s probed!\n", p->bus, p->name); -#if defined(CONFIG_DM_I2C) +#if CONFIG_IS_ENABLED(DM_I2C) struct udevice *dev; int ret; diff --git a/include/configs/imx8mn_evk.h b/include/configs/imx8mn_evk.h index a6333085fe..61db244e98 100644 --- a/include/configs/imx8mn_evk.h +++ b/include/configs/imx8mn_evk.h @@ -20,17 +20,14 @@ (QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512) #ifdef CONFIG_SPL_BUILD -#define CONFIG_SPL_STACK 0x95fff0 -#define CONFIG_SPL_BSS_START_ADDR 0x00950000 -#define CONFIG_SPL_BSS_MAX_SIZE SZ_8K /* 8 KB */ +#define CONFIG_SPL_STACK 0x980000 +#define CONFIG_SPL_BSS_START_ADDR 0x950000 +#define CONFIG_SPL_BSS_MAX_SIZE SZ_4K /* 8 KB */ #define CONFIG_SYS_SPL_MALLOC_START 0x42200000 #define CONFIG_SYS_SPL_MALLOC_SIZE SZ_512K /* 512 KB */ #define CONFIG_SYS_ICACHE_OFF #define CONFIG_SYS_DCACHE_OFF -/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */ -#define CONFIG_MALLOC_F_ADDR 0x00940000 - /* For RAW image gives a error info not panic */ #define CONFIG_SPL_ABORT_ON_RAW_IMAGE