Message ID | 20210721141725.23346-29-peng.fan@oss.nxp.com |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp6213015jao; Wed, 21 Jul 2021 06:48:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzuhSZBbHBzOwYyb4EtDtHha7fHwobBqMdvS+2u1ZkkvPFvNgmULC0AGCnEU1dhq5evDELo X-Received: by 2002:a05:6402:17c4:: with SMTP id s4mr8282157edy.101.1626875331107; Wed, 21 Jul 2021 06:48:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1626875331; cv=pass; d=google.com; s=arc-20160816; b=k/k5tOkbt+gdMRZyst7jervoHWmYdK7qj7pQSsCkniUyM1Fj256i4US1ZQPim/Z6KS jBXSVRfVSjAsyqyCA0dDsqPO8rij1XgV79fDKAsDUvQ5wYr5d6tVg/QV6M/6vxXsZYKt YOddQF9L9u+A5H3VZYJi61K/1fkj3m3/HtEkQt4Rt1kUP8ODvyTPYv4+A3KB3mlPpbac yvwdhzqdCtSIamgCIxiN6diO69WgK6yO7SvPh2EyxVrZR0JhNy3H9cf9IUZVjB3gBFA8 bETyQ8XWlkGdEsdWKYy4J0Kc0E3wY49u8EeM4bKd7tbs8Qedxos2XZPl4Ai3XHPCY9Yb v14A== 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=jOhj3ctWxOz+3WzX2xmJCqbYGdPauooa78MSNgWBDlDwxR24wKy8mt2y7GR2oGAYOf oRPB26eibI1X4mKvKcjjzJSZ8lGgpFMu/lRxpc9S0+2O/cZ7I++mZtFkVg+uEkbm+c1x XTI58dSesYj+cPh07RrTpnYjjXst61/W1IvrFVBj1ZicjgauxGqBcnHApfaJvzCBobPG 6RtXVTK9XUN679uR54dEqOVFGxWBeCJ9OQRWuRGBXZrVc7rH1PedS7mczoBGACVg0+dV lMvZVg7p4wzKSF8S7KGhqHltcTTiP9PxHFIaAqbBloIJVs8CrqSBUwORg5DpNYj2x31A mzxw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=kUvayd03; 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: <u-boot-bounces@lists.denx.de> Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id jg9si30730459ejc.230.2021.07.21.06.48.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jul 2021 06:48:51 -0700 (PDT) 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=kUvayd03; 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 C035D82DA1; Wed, 21 Jul 2021 15:45:59 +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="kUvayd03"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9BE3182C68; Wed, 21 Jul 2021 15:44:39 +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-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on0625.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe0e::625]) (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 9165D82CC1 for <u-boot@lists.denx.de>; Wed, 21 Jul 2021 15:44:30 +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=Vwhv1VZSZstG21PQkaV3ZVnmV4IH7JoFZO6GJNizjTvVWJSQ1M+kUiyZWch/lMfhCiZsjEIl4Uq0sd3F6ZnhmvqD9T0XmrloSyBbOn3+yPXQiekZ+UNTSmBMlJw/lZTnDb0HJBynSHbJL7RviMKLPOUvznhXJ3UMcxiCHUxbjorOutvYhCgZUjntp+C+QnkW+bDLZctxX44Qtfh540QVOZAVkjmmlq92CHHmHL9w2hPckoXqNay3HSZUnbHMttP23/tmI1A6vzD3buNzrv0Fa3ddhFtW5qrZqU9dGuZWgi6fhT6EhXD975bV5xcLlHRXJRslM0fQbQKleYMKfbEeoQ== 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=LIDGJrknGduOsXEHkdEUiGh4fBCEwLgCnNKGzztUFruoKb8ztiT/Sxu8yyk/yfPvBKc+dh6d13UUtmLbgWHu8WutuZwIeqrSkjX85hC0sfvUnvBFJtVqywkszbVxw74MTVNZKgobDClcmOIy0z3PrPP/xuk/pK77agYP/fgiin+/hYrC/eTcA0PviVPxaEapFa0Yn3qu3RgEsFPb8eHOz2cGLU+D6J6VXtFU7dUXscQ+yg3DKnbQEAnTbu2KGDYuiCf92/m7ScfkmzG/tfD8tigKtnNXKIGK1JAMdBrUxk+UUmiO5FZzHFxtBmQuFg2+T2E9mmpdLTqcCZku0AIBEQ== 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=kUvayd03IaetPQsuKELXZ+RMrs5slwnyb/oK9s1KtSmI/AbBpNGGKCqNg6m6qTK/x7Oi/CsBxqvZiRjgeejThge9pnPvl9M3e0JAm+hADqhh9tMWpnb5ZPNWeqFQjxUeY1j7cMWP3vbfS6M7dKeIsPw0kGOr6JvSyI6fOS3C2tI= 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 DB6PR0402MB2757.eurprd04.prod.outlook.com (2603:10a6:4:94::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.29; Wed, 21 Jul 2021 13:44:28 +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.4331.034; Wed, 21 Jul 2021 13:44:28 +0000 From: "Peng Fan (OSS)" <peng.fan@oss.nxp.com> To: sbabic@denx.de, festevam@gmail.com Cc: uboot-imx@nxp.com, u-boot@lists.denx.de, Peng Fan <peng.fan@nxp.com> Subject: [PATCH V4 28/44] arm: imx8ulp: add trdc release request Date: Wed, 21 Jul 2021 22:17:09 +0800 Message-Id: <20210721141725.23346-29-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210721141725.23346-1-peng.fan@oss.nxp.com> References: <20210721141725.23346-1-peng.fan@oss.nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR0401CA0015.apcprd04.prod.outlook.com (2603:1096:3:1::25) 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 SG2PR0401CA0015.apcprd04.prod.outlook.com (2603:1096:3:1::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.21 via Frontend Transport; Wed, 21 Jul 2021 13:44:26 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b05318a9-db94-4544-2e41-08d94c4da90a X-MS-TrafficTypeDiagnostic: DB6PR0402MB2757: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: <DB6PR0402MB2757565CD86F4E89CFB9C378C9E39@DB6PR0402MB2757.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: d+t40rSiyep5eHceiDbcvPos2DqoXuBSXaHEG+hOyUZtzC2taSQsvUWTZUTBHfYTBWmf7ctgGueApixnmahA6LTbnRbVRzrHOfRyyZ+JmI42JGgy6HZid20o6+EN+52p5ypq6H6fARI/DiHPuT18QuqnlEH4byDqgRC2DhT1ucqQ81fGEClkw9zD9xlQ6OB/9eZHw/q9jTF1w7HQDr/D6V/UK3+DeTnajL4m0AxVCq1ARVrAucTgXxHMeXevjURtBmbW/WLjVnZSFTX6hVD4y6Ef5j49E30AS8KHsHwSZD6X8AXFmGrtEdSZ09rBcjsBDPU/TfYOmXO2/5AjLtBRHKoqb/SsDeJEg+D67b0avDgoVTsHSZvFJKVMnRZ3w1PhWM2oXQi6BCG8AZCzkYq4i6ZMuVyw9Dy5QAkxWBIBmqVcj/EWPm2H++g0Iczir+K5AeP0FzNRcL6hJe4Mf5OOlI5Qe2XcLC8vo6hHoXN39OpvPLwfiMuW6h9xeuiNffL1LlWeyBE6Zbm7dIp5d2IU3d4c7ecV3MllCEvYYgV1GYI8zMl3+ud0QCmqS4992cvfqtDNzWtiIueku+KtoMMocQuewCBeWhvNZvuSg5QuKn+DMaP/Orgj89EvYYXu75fh72f+LfqXQEuX8+dG5j928+XocjiE2uXhNSQsNS2ESir56ePTRj4yL90f2Zr6Zx9MzuzHW4lbZoBMFHdIl61DibKDY2+jo6RwyAVuBkMM4bU= 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)(376002)(396003)(39860400002)(346002)(366004)(136003)(4326008)(38350700002)(5660300002)(186003)(86362001)(6666004)(6506007)(2906002)(26005)(8676002)(83380400001)(52116002)(8936002)(6486002)(478600001)(316002)(6512007)(38100700002)(66946007)(66556008)(956004)(1076003)(2616005)(66476007)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: uQp8z4vA79wsuZiriXOq0IRYdYn6EIHU6nkVFdHvPxI0vxZiMWbEyyC3F+49YOlx/w35bw+hA9yLy91rKL/DBSrRAEdyWMJhM2CjXsQLWZHAsNy8fD/Yq3rPnzILdbHb9s08hnckF8snCjhHhz7fIWO//8F6OQ42fwCt7YM60egAGFh+nr5hoPwye9fvSgufXQ79FNO/Z8QBpaRFkXVyIfsc155iJ+f3NRDACOSVIN1Rs48ZcRr9FRoqPCHZ2EDPowKspRsl5r9+mhEflAiE77T7dLraw24RRMmLuVKKGmX/mrV7VtUK9ERbWTUVk8VKaKvC6Que44joe1GfAIxWsaYSIA3h2iKHm/UAszG/fXybD4kH/FP34UKCo6tALz8m5XINHcGlMB4jhXsmbDBxm/HQ89fgeIbZjupFhjlVyauR8YNzr5BTYdkgFErxmJQgZkjZoGm6AIYRRnqTCfDqz2yfAXwJi4issyCLwTTzXGDoFAfCYV+C6ygPi0MpffNlgQ8Cls+El86Q2lvtf0ByKGQRtsClknXT6drmCbns2HZ/PvDZTISJBIUddw9dB0I3HANpJPk7LHXiYvOFK6EwkHPp19kK4w0jqDRWTHXaHKYvaWzagTTiiAX3U5eqmFL3lvpQ+Qpd9dl7Qfxw5mLDCuYlTXN6Ua3FJuMP/GKBUUZq9hfEgIZRX+bQ1/IzfhcpI2JIZq3CdsDFvfbt3nZNi+Q4ioXlwYtCppP66W7nu/W5+CT/e7A2q1MZzYBfx2pVhryhr1E2YttFETR5vrL4IG1w75YVerl6dUs5fD77T1ilNDWn5E/hifHKCxZDkdsgrz0tkXB5mAV3MJFpMTwTW1iJXamVJQLEuwfdDQOSPb1BwuSE0eKSLJZ5Uw4uNop1JVvgP4yqzd4QQvvDijvmxZAt/MXos8GvuP0CXfsSu9qkKey+bFOragG7hcFUqtcxHX3pBxE1v395hABXrYsw4NMnk+Vc3Z4HepK4T3Y5FvyQMc3OA2eRL2RXRhVmeLCno/xW8zGNOmOayETlNwKpiY4ybkmG4tDEt/rjnTWXqfBZWv2rhZL2rcn+MGISfeIVDb7aRGNCHsimg7knzVNAUCMFYAu9VN5xsbhDsT9rEsrgo711rFPL0Nhc70jbnRAR++HS3CWIxc+ebHrCeXcF3BE9mLeyjKBaAwU8CJ1b5JwLKsXrSSrzDqIK9/GnncEJgQnHDXvO6zS3ZSaCiHVGcNoMnkN/XZycLxjLnoH+sAekJ2HMbZ7OYDrCoeWvkQdBnWPorK4Shsh6PGkAJZ90aR1FzjNHcC9X8t83lKKA6dfFmtD2NkarMcKE6QKrXPV0 X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b05318a9-db94-4544-2e41-08d94c4da90a X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jul 2021 13:44:28.4034 (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: ct6O/owy1STDcNyOqdMnklI0fdH2/wZrjZfOPpEa3W4AA7gnDnshRqHzo0BsEqnhrXVsC+NiTj8OW48Ct38EzQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0402MB2757 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();