Message ID | 20210412121306.11484-29-peng.fan@oss.nxp.com |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a02:c4d2:0:0:0:0:0 with SMTP id h18csp1665009jaj; Mon, 12 Apr 2021 04:52:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxeCLAsQ/kfibmfXvUghXpbartfMLVXFgkJgCbZgjK8YZXsrj9pzae/DvkLf5FPsBKhT1Go X-Received: by 2002:a17:906:eb4a:: with SMTP id mc10mr16820214ejb.392.1618228350131; Mon, 12 Apr 2021 04:52:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1618228350; cv=pass; d=google.com; s=arc-20160816; b=Pi83/jPdONMulp1ZsjwGuBw4+10BCoHpctmLJC8Nslp8VbwSvE4MU32gqjNJxwxYJu rCKNyjgbKShM0gbK8KXcZgsfDiZ5Gcc3vvScw4nXHV3ur2lh2InwqhWB1VAKOtuSYWre A6CpDxb8KAmThykj2PWgBuH540iGfXRYzIgs41BJSx0p/Nwzvxjb2BgCEmp3ALnW9QGL Ckb6xJpAF4L7uODM4Th283+3BmBoQp7Wd7HyDtTzYAlcIMf1lFP0LmZe1rJLvHAUY4el b+NL04w4xoxP3ko7rlipgU1P81FwSjEC4wP29jmSqKUy9YcyVJUxkZPaHBrHHiy2MTK2 G+zw== 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=5P1odcOkgttPEtaHMWQKQ5nfjwWx1ZWM2e9obkGMwLw=; b=0ZAFv9C4MSA2DYw7pU034LeaZGl1ZRO+WhF+JVE+j+WQax5ijOBsmrFpZwhhzwUPjt Wp/tbQFNEMxQWPs/Bsi1mp99tZV3MMhdSGr94c2ZAkJBBX6dbPmHtmeutfTHBvGrhtVc ayJP12Fd3Z27IcXAXpgCgRhTYHI5Kh18iyQCF2IsGNiBgTLudP3NF1UmLsL811d8a/pO 3p1SHMidCx6EQjBgC/rRsPbXHX6friZNkR/ZBnloCt53lSe4VbXBbsV+8HBRLnt6DAAg FqDYR6xXPA9T1VCLr8novdjZEkCt7Qg/UExIaWsUqxh9YJdfdOjBKY4YLKfKF27WtLuz V5mw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=BVvSsI8a; 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 o4si7430921ejh.725.2021.04.12.04.52.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Apr 2021 04:52:30 -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=BVvSsI8a; 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 D177C81E7F; Mon, 12 Apr 2021 13:52:25 +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="BVvSsI8a"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 12DFA820A3; Mon, 12 Apr 2021 13:44:44 +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=1.0 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 EUR03-DB5-obe.outbound.protection.outlook.com (mail-db5eur03on060e.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe0a::60e]) (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 CCD3C8204E for <u-boot@lists.denx.de>; Mon, 12 Apr 2021 13:42:43 +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=iio19LpfaifwMtgLSJCUpQgi3BXKodW171Dgc7ss6hWkmuV2bx4TAYcDp6T4Mai6L3zJTYucRKIBDN6AWEGCG6uIePkbmKKwu0YWNd2jrWQ9Oq7/c3V1KTTCXjm3eSlYxOhM4YaAp5Ir7zHXyGoQvi4ZCmQSn+7z5hAN7stqgBWFkkZ9/BIR4cNtdpaalIPZtbVbKM6JFg+jSe/ELlMinVBA9hyayGbAQpCnBNc1msw9Z0WH/t8CbWKFeGL6USymoK91dsZRrdB0WEgAbswPVqCgs4npYbf1pZSpnRg8EBMlUcVRehROH5FNiOBpt/yPJ6J3CBA8A1QhsC9sx9rBZA== 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=5P1odcOkgttPEtaHMWQKQ5nfjwWx1ZWM2e9obkGMwLw=; b=hblMewSZckcJFV/t+f74j9UNoGh34lVMoN4B5FTzqI/6OSStNw/jRLn3BdP4TenLBpncYTkaCf0NaTBI0u67Mlj9LR6BAhJDFEBfhlR0w3IZbQN/LfeGI5kVeCw63FGCjP6a1vo/NvTHwV/ixEiT3L7nIWTWJ2r9JN5XMj5lekG4biDy+7PfVZIcKO+25sYGDKSRtMS7ahgvSaP1EtNwg1aZKclpJZQiA1tg+LZFtI5EILiiRCK4Z93oUfpVJ81es0sVdy5ppA2pTlFFZe+NUGVaM86/Eflu0c84Q9KKz9kTtG3H4uX6MuH8JgLRj5vWNGPAwt3+ORn2zVCtusdK5Q== 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=5P1odcOkgttPEtaHMWQKQ5nfjwWx1ZWM2e9obkGMwLw=; b=BVvSsI8avA3yq/29LMcea4jndpHpyP1YdzFcCQvRz6/2mUF+BumZ6wtD1J05d8+NnYb1JxXXXmUIPZafmbYu7lgGOhyzWi/lZdoEG2qwWh1Z1dSf99pQKkTWjNPh0wxHujXHDCamGL/EWmLrDeWe5KeKAASfXsxUlag+DUQvD/c= 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.4020.22; Mon, 12 Apr 2021 11:42:41 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c57a:6964:f72c:21cf]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::c57a:6964:f72c:21cf%11]) with mapi id 15.20.3999.032; Mon, 12 Apr 2021 11:42:41 +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 28/37] arm: imx8ulp: add trdc release request Date: Mon, 12 Apr 2021 20:12:57 +0800 Message-Id: <20210412121306.11484-29-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210412121306.11484-1-peng.fan@oss.nxp.com> References: <20210412121306.11484-1-peng.fan@oss.nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: HK2PR0401CA0009.apcprd04.prod.outlook.com (2603:1096:202:2::19) 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 HK2PR0401CA0009.apcprd04.prod.outlook.com (2603:1096:202:2::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.16 via Frontend Transport; Mon, 12 Apr 2021 11:42:39 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9599fc3b-3f4f-4e59-38b1-08d8fda8149a X-MS-TrafficTypeDiagnostic: DB7PR04MB4233: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: <DB7PR04MB4233FF5C5949D55941B8979CC9709@DB7PR04MB4233.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: PQxwGTR5cP7CAYhHgEa0bWfcXv73X/4EWA64u7ylsZ8lXYL7GqEk8s8f8K9ZXfVDyMlRlXVekxj4MeUGyBl4jlGM+GkHH6oAyi3sJf6bCAaE/p6kZ7K5f3vazo1DWtAFTDQSxUF2Ochk6SvzqdmqZ2fbpdXBolUwMOP9Szidv09eUUns/G9P3nzvAjUxWSdPkcrYIeoAlQPR94hB/UnXnLMUOZQ5CbV61LFOb4jiD2VU2dqFwG2xfclgdUgK8aPW1QV35ktdIBt8cWm5iJkVvf2zljMnqLDjJ9DVbug2oDbjP4XHOfgc2j/ukq2JdOacELpr8DmWHH2YFBCYicKyZisOSdDFzq3vVBSM8X9aW/KUVlWI1CH5KSs+H2GBIxzZsHbt2CNjRobgy6ePzayqx/L/eDPBPzEr9IdJsZFqwqiuB8c9fO4USVr+I+Emsz8vPMQqqkX7ur6zB1S3rHVsYW9KyxHI9v61ogukP2JWO6RLnuSrKI5qw1SZIpaLctHIcF9azh43PO/HvV7P5mz83d3kNCJriEAysQtGeTjFNl/12p92wUt9MiYCapQaM2Tj1tYBGX0EkFZZhJpCybZNHaMP1Wfl+cqe6OzTX8SJiKxQR9ZOgrK0k7askgh0wXy8xwif5ZlF6Cq5gQvSIcRq7QHgw+ThLllIB6ZmVIpzG4s= 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)(136003)(346002)(366004)(52116002)(83380400001)(956004)(86362001)(2616005)(6506007)(66476007)(8676002)(66556008)(1076003)(2906002)(4326008)(16526019)(316002)(26005)(5660300002)(6512007)(186003)(8936002)(38350700002)(38100700002)(478600001)(6666004)(6486002)(66946007)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: a1BVdT+lC2YZyCZ7eu8rWqq1hCW5bY6uwVyIovGNZ0DuvzroXOZJJ2k8U/BnNjvfnMR0RYw48AxE2yqS8L6dnM3JVhsNdvrbF5xbcONwrm11l1z/XFRWqdPaDmOxH7o27o3weVU3DwSXK3JYU6nPiETj2MaylCNaoArxMoQe3LnH9ViKPGg2lOE3+ZEGvoMhnMS17MGaxFzZnLXHi4wQaI9Q4kRvnPzAiXuSlUFz76UCr29yGyRlLX7FGaLgU+JbbgNh0LesDAEYmhPtwdzunR7EjxjeGPuGGSLHYnUnpcZeaeTr1+K51M9HfZ/Y/AUNMDSXi5I/6Uz/6XMMzGfIvbWMZmwVV6VQ1AH0IAHuUUzmh+rbBdxKwiwnzabrim05l8LxXM+oNnRtUxKmVfhZTMp2ui5QY2hHm2/WjLov8f5Ic4JyINWvS2hdazkidCC+Yklsxq57UKkqJq2jR5EhP9yWBrzQ8vC9BRKST5zQZ85GPbd0zfmTzES53UfFY9MbFGBL6fo4QlEoZiyrQTfxn7YFw4PNCJydEtgivHxnlk0IW0PlmONquh1707Car2Id1rQeOjGEZZQ/LddLBsUa4Um0N90rm2G+WaMEO8J4xum5fkNCkM/sxt4nY8PljZZfwgMzSKFH/Mnaex2czrESyRBOjuOeIkhq2u7TRzdc3XGDuQecOiGWSEhrehr6RiqxEEoSm81KXV0uaKKcTrpshANrnm/J4yJyKd8yBlXShdSp1fQei8lHVClRB+Hh6YdrO6faumUEnAdncH6NdmBP26uZwmfOhL6dyJbOO5NrTZLgAYVsiVCjJC/jz2Js4DDy0iUyW8qlIYRzjrArOF6LfXqGnbfeXcOYRpbdDL4jWC8dOfF3UmwPWBiI0hFTbyIcxiClMV4+nE8g7JzeLsYpJWvjRaxuAwzjLS2+fKVDBoIENxtgITzmo6+/bCWf8z91RtJwJl61AG6L5nD3Qyp1aBXDYuRKZxIP7miJ6sSJERmeR/+NTyrLZamfbxUwox30TDKDLl2nJVkSlfRaNyYc70sS937j2besfZJW6XTiupYSHIG30tRUCd69Blsr8I/PNTIhT3e7xZR+gW8CjLv9PyHvmLLwJJLhaDLvrbLE0D07HujPq59063dmDrb1u9edaDK56q2NkTrySkIXqrwie+jbtMuYiceuWqycfqvX0d8sSz3kaW8pkeWNoVXrEy2y2/xEIC4JDLS2G9TOF5REuoNA7LAbwe0lem4Zq3bEC2ferHuiR0EXtjJ58mlADx9P0XxwRpy3RlTnRRNN3LlCUedu7opV1w2MIAvUBunuXKz3PBqGRw6luNkX37pCw9OG X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9599fc3b-3f4f-4e59-38b1-08d8fda8149a X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2021 11:42:41.6368 (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: r3DgoFIrix963LpElinB7xABuAhdMBxaf3N9Do4i4VSpEaKQPo9b+v4fcQFUYzk9s7Yo4v7fcHWY3ilmHkjbJw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4233 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.102.4 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 32389629ba..ad57c88674 100644 --- a/arch/arm/mach-imx/imx8ulp/soc.c +++ b/arch/arm/mach-imx/imx8ulp/soc.c @@ -341,17 +341,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)); @@ -360,13 +366,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; @@ -420,8 +425,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();