Message ID | 20210807080113.16020-29-peng.fan@oss.nxp.com |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a05:6638:396:0:0:0:0 with SMTP id y22csp1030566jap; Sat, 7 Aug 2021 00:32:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzy6uQ7QTvzc/k4ErVvMNE9/nhFF2cLs4zKMAMbCKnxTQ7zQmxS8wQTBE0G3EYrwcvrlvdG X-Received: by 2002:a17:906:12c6:: with SMTP id l6mr13823307ejb.373.1628321563424; Sat, 07 Aug 2021 00:32:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1628321563; cv=pass; d=google.com; s=arc-20160816; b=tepbNtAJD6WQJr7Mtf5BKY6fAryAyElH7HyPHe3f5CsdDir4Ora6g71wDsIlBRr7DC dca7fS9kl9cS4QS3F9qqgR5D6H/jyBKXwwDvVFcKRiLJfuy9a3u3rbqYe8hsMIpafeU0 IeLliEvnQvdeRjTjvYCrOxJTXVnhApjwvAZUHNBeTvKd0uUZvOLQFWRTV9vn8EuSATUI hU4JKmtcs8JgZiX6ZcnsCnJOkIiM5kUZCQIUTbjpPlZaLP4Pg3qUrlhSbFVJ0FB3enN1 WGyGnN+R5Ypm/QXS3WOmCNWnNxGEbb9blX45SlYxylsst0EDLj5ZHruXl5XT82zuOLwr KL/g== 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=L7Ji3as8WSrghRDYNmGQ/gJYMhTJofc1cHRBA5YAr50=; b=OJzC7mxLpbWWviNFTNKXkwGZkIyZBQGhS+KvaQ2fVTbvzYf9qGQCJmznAM31d9e7UZ hfgXUCOIQ3KYUUdWWVjYVgGkD62kOexRoTy9SmTDhoA72dGJljT+B3C5I/9hyg2ppEzc kIcVflmFBGMDNMJWdSghFvvuY2Z5HllEpwl1S134Yv8knaedZxERaPL3ehzg6+77fbTM KOknmxARABlO1UnH70A1XlzZB/oZ/hPAlB9JL2w5zXu3JyhcT6bsc7CtGGfS9X10CEdm LOWbFe8jlqJgh7DRKSNkQixR5Iyn4L6LNuGG9gbndwWdycTwJxDB4+Zb7QhoQAw6fsRh 8h5w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=J5wRP7o9; 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 85.214.62.61 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: <u-boot-bounces@lists.denx.de> Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id w24si11159229edr.159.2021.08.07.00.32.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Aug 2021 00:32:43 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=J5wRP7o9; 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 85.214.62.61 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 A26E9832B5; Sat, 7 Aug 2021 09:29:52 +0200 (CEST) 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="J5wRP7o9"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 582818326B; Sat, 7 Aug 2021 09:28:25 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FORGED_SPF_HELO,MSGID_FROM_MTA_HEADER,SPF_HELO_PASS autolearn=no autolearn_force=no version=3.4.2 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on060d.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe0d::60d]) (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 2B1BF831E5 for <u-boot@lists.denx.de>; Sat, 7 Aug 2021 09:27:55 +0200 (CEST) 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=NEzycKmADcsVvj96Jt8hBFBCEtcYnzLux+Saz4mNUkEdiu0Xv3xBjaXDl2KeqS6JbDF8DszQ8kYcrXL1NLKv/Y5032BSLT0sdN7M/V8Oi7PniN+WDs9fzXehWY0jf6fKI971eQYRjT2jxml7sRMlT/G3wzN+XbOKFCz/vxUb9YGkj/eD+ljGJzpURijHukx+Z3VrJLO2ArSFxaaMbX6LsKDAT5oi4uqUs4OcxVir/qcBjbM7GzBx+NDIamfBFbbMx7r7y4cmZ42oYKFWwGyTBIl7dUOB7rV8mITk4H6fPeLxnxy9bHlTYEAa81Kgh/OayL6vnK/QBjQETYRKWxz+RQ== 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=L7Ji3as8WSrghRDYNmGQ/gJYMhTJofc1cHRBA5YAr50=; b=IJmNpP2W+mn/t4wle0YQX8TfEBiM4W0RBTcgdTJ7Sutzpl2EzR1ZzSfi1iQWheSGPweTL4MM4+9w1ILOS2AsayCcPUrdl9pEgdH4sP+IToQHXsYaLTEpSIgVrytDS99ebabWqIvBAXBsqP0plV5X7QYoTwwbD9PUvh4UXlicZAUMdkj+UMxIcl7wBbYPBxQmTdf1W7MUrLN5niG9HGnpgBgPyqAzDVt4q0aN0u17ap9E3sgbUg8derOmRk6J/7NlrSadnVUOKJOVinpLEUYoaOLbUVtQ6lJLgaYUE3gVjtR3b0j2iaARg43BV4U7DcdqNoZ/v1ssWuRB8GxAnPitDA== 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=L7Ji3as8WSrghRDYNmGQ/gJYMhTJofc1cHRBA5YAr50=; b=J5wRP7o9ZVDuCimsTHmyGycpz4p/eGMRFDKEnSAL2s4cefw5qWS8V2dqPtZ6hqTq71fv/NPbjlfzgyCSoT0itbAyGMSf/w1dgLL76ChdXt1rHckBmrOGI3m0IcNN5F5rl9nBxAtPYt8/oiJ87qGL+IVZhhhaxn0Oolsf9O3ZrBw= 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 DB6PR0402MB2758.eurprd04.prod.outlook.com (2603:10a6:4:96::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4394.16; Sat, 7 Aug 2021 07:27:53 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c445:d742:eb76:86dd]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c445:d742:eb76:86dd%9]) with mapi id 15.20.4394.019; Sat, 7 Aug 2021 07:27:53 +0000 From: "Peng Fan (OSS)" <peng.fan@oss.nxp.com> To: sbabic@denx.de, festevam@gmail.com Cc: u-boot@lists.denx.de, uboot-imx@nxp.com, Peng Fan <peng.fan@nxp.com> Subject: [PATCH V5 28/44] arm: imx8ulp: add trdc release request Date: Sat, 7 Aug 2021 16:00:57 +0800 Message-Id: <20210807080113.16020-29-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210807080113.16020-1-peng.fan@oss.nxp.com> References: <20210807080113.16020-1-peng.fan@oss.nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR01CA0133.apcprd01.prod.exchangelabs.com (2603:1096:4:8f::13) 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 SG2PR01CA0133.apcprd01.prod.exchangelabs.com (2603:1096:4:8f::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4394.15 via Frontend Transport; Sat, 7 Aug 2021 07:27:51 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 314cb80d-183e-4ff1-6ace-08d95974de77 X-MS-TrafficTypeDiagnostic: DB6PR0402MB2758: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: <DB6PR0402MB2758630ACF06F29142B459DBC9F49@DB6PR0402MB2758.eurprd04.prod.outlook.com> X-MS-Oob-TLC-OOBClassifiers: OLM:159; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Oqo9jhBjiGk330lKfr7TUvJ6fcK6DaQoVc872SrVg064Xgv2f9SLpVTgdBBRlMNmLq4gBgcDrQgtQ4YvyX2UBZdlssn+pJW+jYqEEIZMttn0QTWCexHHwATAMiMoQsSpM2wDB0wHNHzZcy5iKVovFlKUElVfuktPHDfqWFJcFrmy5ajvOKcFpnuKTSuaYsqlpkZcHGn8+Jr/jyI1ljHM15KzkqRaY+45W99H/z66NBrVK2MujOUoafKE8UrD7btOmQkbFdkBaIu39gP2INWWMlLGbpbRGHFAiibFFnONipevSo5fEcVsij3gf4oYLkg9Ow04c3YfrbGZILu+hQD5XfhYpKRs3YHSZ/8UxlZctbGV4zvF8BR560TahurBNz1Uxz/bPbacd+svwoQWMH1fsyKX4jp10whQjdkVZjYfzW08hFmsCG/LjG3bNS8EdCT8nm9RjrdmhvGcBmOvMj853g0Iykx9XpVk2m2SPIX6GvJy7gNAVY1scCjrePOKtQU5MKxsvTVB6xvK20/lmWGGizwP0PuYYszdWpWlcT9P4MfqwbkLHkZH2A/ILDBzvheU2HaYfaxZNIxNtwawsU4yHI9RT9slUw7hT55uMmOKnqFR4yyJLD/M6adDiMug4pURIsWom87W8pPSXZsmeckon65ymJbbVnqdEhmQMctSvReSfsj7Oi9xQV9dfxUtGQV3QxH9bLjZ5hmkcFkewNZXuKaxp+CyiZ4Bnn5JEFA8lD8= 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)(366004)(136003)(396003)(39860400002)(346002)(376002)(66946007)(66556008)(66476007)(8936002)(52116002)(5660300002)(6506007)(4326008)(6512007)(38100700002)(2906002)(38350700002)(2616005)(8676002)(478600001)(956004)(1076003)(83380400001)(186003)(26005)(86362001)(6486002)(316002)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: PDZSHlFLmcoGAsbdDfiC5O5Q0lLmsYhCIyLkNLUx5viSvbdZWLp5XOaSqhAmnnFZpsz3nxIkvDIwuefcpDzwcHR7AdnUgOJr2H8iV+5DvBNBkAsxYDv7H3IGWKRtDeK7ZMW7imQLkbiqRk/LyKU+A6NvHNScPaPuBXv6nCJ9SsYsKK05SH0JSr5mQcIFmfGB/V+SCrY5zoIt2lVsKZxhK9v7PtFPZYsSUsNW0AvW1PGva534wYdrNdfyo/fVgBGTbjfR+DzMsDM5dKASGbBEZBMXnqMVMmAkx8YbpZaGaJap6iPKtrLshHvFgK7SCpm2isr5M/lSkMOVmesnsGuoCBV0KrJvmg2J40hFHjxaqfjti/S2thvPJFHLY8MrbexheeBEfB/C3JOu/tCIb2QvXDQsYaDxVWEqkh1QZ5thojUl3vLoVtzGoMqERHCa5tIteGGITKzSIjsrBmSHesTlkod12pXX7zvOe5cK9pXHFPzxYwcbR8dxeT2AFZw4oJUSb0Qfuyo2brcuQazlXx0cZebUPzvqZmg+kGGuXg0ZAqL4LOSeumAXDIu32vuNHKlBe2O8gFPAh9aZyACfdJqu85f0JI7yP6xq/1zwXuDCI9GIYY5feJuyXT6gZh/fGOSIKYNbhcLApjhDn5pjMsQtb9TrnXVUSg1/TrV+BDs8dBXTw1CfvatQjf0DVV9qZtMobPGOZFbPaE4iRKZAvgVPrQXMCOPTXs9cSGvNPlO8XaNHS8ZdU4acRL01TWpHdihO9nugKbExqZ6mTlWxyp7e8uIYdAcTIqmiM4tXkCuDjoJhxkMMPG2gBklHuB7HBjG+934EBnswTdve65cGbjRcmO9LMOoDxABekYC2Rm0PJLOph4hw3LgJYxfUNXJCQwbxxp/ay48IvhfPaTkmfmV+V5EG8zkt5r8p46kAsl8u8IE4C91+HSmKZyKCraNwsS6PqLiZjg2+qq6ZCy9Gai3Vngg+P1veQCcD+fbYkxn1MWT0GabKe2+BWh1R44ozNl+4T1pF+anZv681NL4XQEYN6xHI0Wfgv7/+psC5W8mV+5o7MT0EzeafboAx4KRX0jYzWlcJn/5HLjiGG1mTGEassYnA6aanM7hCvfoRKN/mCc+OowqGjzPwTIfb6YksT/1nPX8XpH7YtVq8X+B2aillBKlHGRPrRgNDNzNtv/ov0gpIiFZksEFh4UVId2GzU8eLwW4+tbOriLPeL0ZoRvNDan4z3+IB/Fu4xowKfii2m1vBT80s1q9p0gmKaZPcYifRkESyLRjGMgpUtbDwLLAx0EpjE+MAYnMWGfMh1r6OAKezduuPixUFfgN0kF5LjwB8 X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 314cb80d-183e-4ff1-6ace-08d95974de77 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Aug 2021 07:27:53.5871 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: hNs8Lt11N9RNywRWJWhHcxS9G7FFN02dFFKga9unJz961DvH8nR/pYE0Eb/EpuRnYCg/OfEc2XGsvempy/BooA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0402MB2758 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean |
Series |
imx: add i.MX8ULP support
|
expand
|
diff --git a/arch/arm/mach-imx/imx8ulp/soc.c b/arch/arm/mach-imx/imx8ulp/soc.c index 62c02a6223..43fe62c2fd 100644 --- a/arch/arm/mach-imx/imx8ulp/soc.c +++ b/arch/arm/mach-imx/imx8ulp/soc.c @@ -344,17 +344,23 @@ static void set_core0_reset_vector(u32 entry) setbits_le32(SIM1_BASE_ADDR + 0x8, (0x1 << 26)); } -static int release_xrdc(void) +enum rdc_type { + RDC_TRDC, + RDC_XRDC, +}; + +static int release_rdc(enum rdc_type type) { ulong s_mu_base = 0x27020000UL; struct imx8ulp_s400_msg msg; int ret; + u32 rdc_id = (type == RDC_XRDC) ? 0x78 : 0x74; msg.version = AHAB_VERSION; msg.tag = AHAB_CMD_TAG; msg.size = 2; msg.command = AHAB_RELEASE_RDC_REQ_CID; - msg.data[0] = (0x78 << 8) | 0x2; /* A35 XRDC */ + msg.data[0] = (rdc_id << 8) | 0x2; /* A35 XRDC */ mu_hal_init(s_mu_base); mu_hal_sendmsg(s_mu_base, 0, *((u32 *)&msg)); @@ -363,13 +369,12 @@ static int release_xrdc(void) ret = mu_hal_receivemsg(s_mu_base, 0, (u32 *)&msg); if (!ret) { ret = mu_hal_receivemsg(s_mu_base, 1, &msg.data[0]); - if (!ret) - return ret; + if (!ret) { + if ((msg.data[0] & 0xff) == 0xd6) + return 0; + } - if ((msg.data[0] & 0xff) == 0) - return 0; - else - return -EIO; + return -EIO; } return ret; @@ -423,8 +428,11 @@ int arch_cpu_init(void) /* Disable wdog */ init_wdog(); + if (get_boot_mode() == SINGLE_BOOT) + release_rdc(RDC_TRDC); + /* release xrdc, then allow A35 to write SRAM2 */ - release_xrdc(); + release_rdc(RDC_XRDC); xrdc_mrc_region_set_access(2, CONFIG_SPL_TEXT_BASE, 0xE00); clock_init();