Message ID | 20210629023240.22394-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 u10csp4507996jao; Mon, 28 Jun 2021 19:04:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKyexvJYWlIpAIInmpsZZnY5Bo4AiBWkP7WX8x+ZxobK3XpjBYHTS2BJvz5R+S8YrHi8s6 X-Received: by 2002:a05:6402:2210:: with SMTP id cq16mr36819712edb.261.1624932273663; Mon, 28 Jun 2021 19:04:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1624932273; cv=pass; d=google.com; s=arc-20160816; b=0gOjTI0HRCvHPZNOrsvC5OQ7gH1PXcsUqQL6hMBN0PNmMGOhJ0u0iWI5rMyaBEmkTR fAR7VfMPu6Z60xnz+6ytDvSp/hqyFydRmsTXhtyvEF66Fjf8uxFtdRGQaYpu8X/TTGJb RTGLURvx6+EWvETRJsX/6xWVlOCv6EgGWXkeG5LWEBRBESfiHTp0KBmCAmCtfz6n8pwo 0nHdCCM6j4AmLR6Z+mZPklTzrmKHNH610h8sHgc/Ik73d2NLkIhc8l4n6cTJUkl1wlse 7Vdjkvc59zXi/C4Owabwo3R5q0ud9yngumC6zTtrlQhaYRtAHOLukrSx3Pl99ovk2d7U AZYQ== 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=P2xBeKRuCNG6uz8w+rgMuuG1AGYStXU3btUWzYJP7f3rHwv1xajxDkpVLhCfSg37Cx xCLM1tIWEKQ855Ct/B6HHxq6jTYjPgefB3d7nBBen9z7n3pKXqjMuAlrrtAazpzj/ZcF BHruY7br6RUyJZAYjRvH6AkHnJQE9CDtwI1ZbZJL6zYS4EEAMEAEqFkxIKVwbACv5s1n 5NpKmQ28F/djcA1/IDwWX91d7mWQWzw6CLV4jq3ATCFurd4FRPQouL627WFjKHg6Bocb FhfFT5MaioiGcxzoP8OHXY75Ye1UGJPvDEdecZTkUiNoEIj2Fh/TrMv87b0tv3iWm+ZW ntSA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=RKRTSlnM; 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 er20si15683636ejc.153.2021.06.28.19.04.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Jun 2021 19:04:33 -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=RKRTSlnM; 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 4EBBB83123; Tue, 29 Jun 2021 04:01:09 +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="RKRTSlnM"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8EABE8312B; Tue, 29 Jun 2021 04:00:35 +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-he1eur04on0624.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe0d::624]) (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 192BA83114 for <u-boot@lists.denx.de>; Tue, 29 Jun 2021 04:00:23 +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=BBhwLcvLp7GpS4u/PlQ69I9H/LT6XEAv+Chmh58SAKGHObzCbveCp7RmquJL77UjgopQb72yG4qLsHIKqaxyzV/v/Mhc8GM6BANOzb6aEZm69b1CQCjsE+DBUCdm+jKiFzF04ldpAguv4H7RrPWqbVMmOf/vMQX9QU4MGoGOOnneU6QOWZjqwvjIU4I+kL1uJ0NB6egKFMcPjdq73WtV8p6ekfnhFPraw0bflMcaf1PHoaOmWYxOl2QWiw3cGtRpvBRFrv7DcZqqkjkjqExQxgTgmQpFqqdSQbiqI7g7jd9eo8JuMwBkeqi6B+GJP1a9Es5Sn7NmUZ+KgviK9BoQoA== 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=DsaFEVkZScckzkWSOpfKaj23ZlDhDSRXOUuodNN5Z8pKUQdFEIdpTWDURwQvQKT4TUu+LVm3Ejhg+mU8rPEgOPa48Vvha/Dqkuw0tjFB+WCFric2HJOX7VKnaxvH2MrCXdZGQHG31K3bsMpA8B5qy0QPemO3Rh6HSEfhdTYf/YRCeSbjUa6Ixj1p9SL0ifXQDiNeyQLCrkTEn/r1ZvM8VsTtevahmfsTIt6h5CN+jkiDe4bC7hVMEXbH42LB73e1UaJb2c+BgVeCNnTMjKOSkQW6idwW1ImIOa1Zr8Ywe0xgwAk35I39jgdit9Zy47hiXQUy5X/Lh4o9kFqTydHGSg== 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=RKRTSlnMcUp5gbcFaYVfLJ/3kY4smAjP3MVs7UEtAonLqkaibM+T1DT+CKrJKb6oqJv37ZDd2ksdBOcODjdM+NKVnunBby8wJzEHGL/LHiWY7H+3vpYlC28MI3kI6+z2LiGYTP3KxJ+23OJJbHrvzbG6i3WoR4mfGXnkPoM6z2o= 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 DB6PR04MB3126.eurprd04.prod.outlook.com (2603:10a6:6:7::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.23; Tue, 29 Jun 2021 02:00:21 +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.4264.026; Tue, 29 Jun 2021 02:00:21 +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 V2 28/46] arm: imx8ulp: add trdc release request Date: Tue, 29 Jun 2021 10:32:22 +0800 Message-Id: <20210629023240.22394-29-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210629023240.22394-1-peng.fan@oss.nxp.com> References: <20210629023240.22394-1-peng.fan@oss.nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: SG2PR06CA0088.apcprd06.prod.outlook.com (2603:1096:3:14::14) 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 SG2PR06CA0088.apcprd06.prod.outlook.com (2603:1096:3:14::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.19 via Frontend Transport; Tue, 29 Jun 2021 02:00:19 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9cb49494-70d6-4b4e-2024-08d93aa1a6fc X-MS-TrafficTypeDiagnostic: DB6PR04MB3126: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: <DB6PR04MB31263EA7CE6FDC5A7135B191C9029@DB6PR04MB3126.eurprd04.prod.outlook.com> X-MS-Oob-TLC-OOBClassifiers: OLM:159; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9Nf1kTFwW1cnvoLSTlpCXNRtAf84WJtlJon++GUPQaUW+wt5Nah0ClU5a3UOaQqdfo54EVkxKEtVFquEXKbvVgLwyywl5Fk1cSoWvg6/8BQt8rVhoxYKTIaaMgIc9KqOBb6Kmh4hOtmGeDRCq8KrLKaFZtzcIMzwwafpfFSe9emEwEMGL02Ef5F5vZO4+jc4h2Ux9k1RuZgZF5gPMIq4E1Ibyf+qyPVZKRoN/fCbUWGcCRSfdd/b5FIOv5ZHs6+zTnru2UhheXH98vvI/+dU6/fTRFTBgdeJXVSBnl6RoHoHqRcsLDFOgPJLViDmuEmaYmZIvIWnoS2jwrjaUirenJCfgNku7HtXMxZh6MuYFvCex9neUjMss/6yw3U9cggg6MIE8UxFUSXehdEaJwoVgLkikphxtzXZlsgzhoWRCBmIiGs2uTMsJZb2yR0Gq7ArRLPQ16R9mDqPrgIBaDhxoortpCi52NeOiCD2V+WdlaMqSwIt5ec5V83QSNvGpkx3JFwl5sYBcxxZ+2O/l2g9Q5/3ZPyh92Hul6ls+QrF8+nRXw5kkiW/wP/EEIVc4osyMoPX4g/99s0ZPCk9kNQLZH+s+DOExMoU3LObOZRVrJ3MRUfa+3rwIal4GiCVZOmRaf0IZ2lTJwUr/SKOpt+AFtTSwuAlVI4at9JYErC7Jtleyz412ATXCOszMOWQrHAef8K4RFknO8imidbUzZEK2uM1KtUz8Kiblviyg4aqNC4= 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)(39860400002)(346002)(366004)(376002)(396003)(136003)(66946007)(316002)(38100700002)(66476007)(52116002)(38350700002)(186003)(4326008)(956004)(6512007)(6486002)(2906002)(26005)(16526019)(66556008)(8936002)(86362001)(478600001)(5660300002)(6506007)(8676002)(6666004)(83380400001)(1076003)(2616005)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: w+y9E4XLHWfb7Sb5t9/7Gryd6poekl3Ux5JvHYaA1vr2ZtwucThj/YaPvahZrNbK1vKrkItbGFml3jHs1HEJBFPKgybmUXveLSszdl4+drVKQFnx/CCXXY+4en6LeuVB4fzwyj1ZlfXyOPeisHhxtkhmtGwO1lVfyevskUNbgA9vshWY761qMj2l0DA56Bqw0gUxDeQG6aid5si1d4/2CA5iTY28T72AdFs7fDJLbHl6HdIWfwuBMBc+qPWT0mRN2aXZdIuT4V/CrqmLG0CXyAU+tLTAeGzyy1n5/8CAMl2nByTfFkrolb+tA3RbJKJ26/BfaADI5DdjWlfwnNEeM8GAHVjsbNp3JAfq3w31m2JvWZjKlU5myQvbn0oxJlSCwsdp5tgNDKqH1THIlwawuAm+ICbFyMtZtaCojVNcPZQKdW7mLugBOhOTmV2a7ArbNgbnzASocj6r+hTqmOF6Io2F4FaAI/cuZOYudv+MuvUfU7eknh+iQyPtyDDjTJBHVqyyYcLesJNQeLpgDFgjOxxELeWnBQ54cRlig4nnqzLLyqlHW2PF+CTW6AhLOVw8ehrHiSkjMYlnfXGy4SWDFaYUewEPFywHefvYLlFQtZyDG+JaS/jSEyKe8wfTIP4+AVXMfkvAlvehCfTp4IOoHC7/RD0AnWHja/PITKUfKnISzeHqfqtALmCFhX7ZmGABUDc0KiOcN/dTevgg/2RraNyCsxnH63qjr/lqHpWFnfhrJMpEquVpHegVBdFu+30r2eXSMFalK91CDrw3FZt5+gM63+oSMXuKCqMf0//AdBy9EpBNtQLKaC3HDsDtLiUx05hOTWlwQJsLDlB6sxAybJJYf3noGatqqTT/liEviOODbH72+ZdRTCjqmLpbx+aKYwn2EGglG9xpoMQJw8OcovyZVUklWsG0vtnXO9rjp2oO4HoDqCakbHJCiG3SwApojC7lcMaoqLQmuc0AF1RWezAw5xAr8/uAcWFz6HDpq31oX8kVL4dPp6HITG8Q6LXO0cSRTffMU0TURFEx0xt8+PSY7biZ5kI/Kd2y2148bglSCKcq5UZJmSwejESqZ4RPBKw7meTzjcThn08DAYPfB0UjJsrhb7vLtH0D3FIVh8mqgQWMSp+G+0WAO0K7+e9sb9buqcF4m53vdLDEIU5UWNRUVAHaaDGcnOfmDSk5pRsE6021p+65JmM9s02w1/03CK240ZlYsyDYrOSRULPjB4lND9K6VoChn7dQsAyTdx8JNJkUBcmeAYr7HBzpqbpfgFRJecGNg0YghPR4t7IE4J/TyxcTgPYt306XJ9r+obJOeuLu5XDuJHTnFR9liotN X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9cb49494-70d6-4b4e-2024-08d93aa1a6fc X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jun 2021 02:00:21.7461 (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: CulL4UG40LTFhzTpm3uLR+W/dhKL6XzZC2UrLwMiVRu8RZy4XoTIcEKgv1rpH+XYXJ04GVVlhhkUnmyl15OnqA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR04MB3126 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();