Message ID | 20210721141725.23346-5-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 u10csp6209273jao; Wed, 21 Jul 2021 06:44:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyAf+rxxYzjv6ZoguS+wSbNWg8bwYguZP2edp0dpvFitec59Kq2uh1MdV1SyT2CBY6k4nRZ X-Received: by 2002:aa7:c38d:: with SMTP id k13mr47823871edq.178.1626875062956; Wed, 21 Jul 2021 06:44:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1626875062; cv=pass; d=google.com; s=arc-20160816; b=vwMmgJZs32/sJ8BZMIHweORyp7007l5zhkpsPEVfJSY8iS6lY/8i6Z+dyCJW0iMydY zqkU+ZLjeHVAi67jtPDNc3+f7+fnu3kqz66CYLRhKgtc+qTyxTVfTaRhMwMqg2BNjW1Y lCaKIintQsd2yc2ReBKfoNcmbUgrZ390QUHSGKl+X85pzRG989siHq7F40G2MXak1ezM w6allUk8Rj1Q4A/+17OkdXIlYUZPnOmJtQBl+szZkXtA5A2Pon8XM3zyJ17xQ993PUW+ Y5ZCqcWOxI2bIuqlSZAPJ2usSo+JvUe3M9bK1qxD6vMYWCqz8bM9mU8MX0inWvMfK9Ob rNCQ== 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=kwM/VFGliySbjojaIhmHRZrB+Fn+jSbCK0ooRc0id4w=; b=Xwb6Xq9Oii22spbL1JiThC7pPf/x+Sya1VtGTLAdAUI1N8WrBc1Cgr30qudY95UPc8 WZlxrTiV7lpI70EpYO697BRbYA+DBvvl30+eg2k4bnKDAaLKixtA0gqd4qwirzQ4WS0Z 6EBhr3MYpI0mubH8Px7NF6iIQF8jlSJ2F/ZcpYWXzKCgGo73KKjYx4HVKF1yfI9ObAnJ mFNXuLvt5frTzFREbSDs31ujYlYSXnD9V2m6mLRwGOJWa5geRnzJgigU3x+Q91pVG7Uk tFDycxJl/SQxCxpwj5T+AF8pJjeprbJdfhhaiGGaknUbLvetWVcoqml3mmYkoIZE5w7Q uChg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=kAA70sjc; 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 f21si5796486edv.421.2021.07.21.06.44.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jul 2021 06:44:22 -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=kAA70sjc; 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 D905682C59; Wed, 21 Jul 2021 15:43: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="kAA70sjc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1FC0C81E8F; Wed, 21 Jul 2021 15:43:37 +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 EUR02-VE1-obe.outbound.protection.outlook.com (mail-ve1eur02on0601.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe06::601]) (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 18FF1829C7 for <u-boot@lists.denx.de>; Wed, 21 Jul 2021 15:43:28 +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=e/rKySrUpDaMMxrxX3jhiy8am9gnc5Yod1p101GW5E1C9RQE11gKvuuqLU7EojRo/XoObNfuhxVxH+mfN84HQH2ZAA5zewxOdA5Zz7TkRVubPvMRBYfM9JUm5gBb2c4nov1zCN7ozjCv71x74DU1aFdC1+iaZ7UKG3Hvq/mRTjzmjpEx4OUJIG/Q6ddYoerv5tclrIzbUmZziZsNSUWph4+iGA0CtDwtL/IltHYe3lshj8xNewR6W6Oal89dmW6GBIjYp4sNjTRtYsyMb1u4cVefxDl7ioANtjZKL1pxJKaNGP0lo8qvv3oLQvbxKfuM4qGBsS9o9ikuSTeKc90CPA== 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=kwM/VFGliySbjojaIhmHRZrB+Fn+jSbCK0ooRc0id4w=; b=EFrxu7odVvuXj2XaQhLXwu+bK21eMMfQpxz888UAKE1/5mdkTivI7iIM7mggmgNEqQ9gqkMgx7TsWrlag+1ODu77hSM4GSeR8N6XOHutYSkdC+mehqwdeC8VAbvLvPr0Bf8eCYekB8nMVeyWxnHiqx6kw4J3z96FrZaphRZ0JmLzy8RTNJR0XzZj3dXGLHbtIQSa58RSJ5so4CCUfhskRw6MxKzIEDu/CcPDe3z25PL1q8maKXK8i8anxrG8zOwIT9oZkLsRDtGYjKPaRXy2V3otZd1W4i8ZMf4fAGmGvonxPdnJaHOyMhMlKMzkHhMmsvRUs9DqOKoWzgzb52C/lg== 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=kwM/VFGliySbjojaIhmHRZrB+Fn+jSbCK0ooRc0id4w=; b=kAA70sjcpshdSX/Q9P9KauM4Ct4bp2VviA+TTvcOybYjL+UlewUDtV/EMkjZ0HA9FExmwImeKJtpOzHhYkrl/SH/dXzu4SdekO7j6UDGnmBrD1aZUFjNX9xkDWrBRqKRyJyW8mFXXC6IngE5iHTR+XNfvenHArOgRNoz5VeHDzo= 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 DB8PR04MB5802.eurprd04.prod.outlook.com (2603:10a6:10:a4::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4352.24; Wed, 21 Jul 2021 13:43:26 +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:43:26 +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 04/44] arm: imx8ulp: support print cpu info Date: Wed, 21 Jul 2021 22:16:45 +0800 Message-Id: <20210721141725.23346-5-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:43:24 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7393be51-497c-4500-19ff-08d94c4d83e3 X-MS-TrafficTypeDiagnostic: DB8PR04MB5802: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: <DB8PR04MB580282C18273D2DD09A71B4FC9E39@DB8PR04MB5802.eurprd04.prod.outlook.com> X-MS-Oob-TLC-OOBClassifiers: OLM:5516; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rCJuBoyQL/i6V33HaxUDqNw8v/8Bdu7uNlSN6ZVbd18uVbVCfZmunEttlIY7lpTYOjcqUhrHKTbisMhOoCgxEa9DzDW+RzQFqampk64eH5Z81GHPT5SgsMCqq8uPL6gdGDG+DQP48sVW0wHW94krV3siCsjf9BBAs4/WQ+6dkV5/NqRsFpgeXGkkrOXOBj9WgH1AcEzYo28HJfdsJGIcjqkunOYhzd9192yXSpKbc59hgzVpA01oSR9dSnA6dJfCWh6L0KMknx159hT1pZqGkeXzSd+5w9w1qf9zE7WPBO0Us3swRQpujihDkRd0ypHfRe+2qDPOPBd3HJ+Ah6dwM6+zZuQNTTjurRBaQ7FfzwBEJlLuz6iDbeC977vdkJ4xso9FXb6oxx0cmb20VhJbHd5n/GAyFkouggS36W/d+vUnf6aibvw8kIvjY7Bg0pRx6VxaQo6FWkjxUhnI7ndTQE+FKQjGQwfghykHxZsL9UwL6q2FsdSBD2jB6/qy9HeLok6CxPg+/yUVocI2YDwpc72umtLoiICfHM8lTVZ7YTms2Q9pbuoARU/dBtgNUVhGT7qRlDEBgVFGuMMqNJEzHHMBOFSmcwdHGUTdqSC1hSt4dhhUSNpk5YiZExirqeoGo5oEu3Rtxj2zGTyKeCS71cR8woEDW9CVyCZpmuCYj6I1gdWLm38TLe4pq8tZYC+nWqb+4m/J0KSYNC48fUtc4QKYzMyl4dEStL2DXZKUu7g= 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)(376002)(39860400002)(396003)(346002)(136003)(6666004)(8936002)(6512007)(4326008)(5660300002)(8676002)(2906002)(1076003)(38350700002)(38100700002)(956004)(66556008)(66476007)(66946007)(316002)(86362001)(6486002)(26005)(83380400001)(52116002)(2616005)(186003)(6506007)(478600001)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: yUnblyC1EGa6Ty9lYkYLpOOK7O42SC4iLe+OFNj0ALsau+59eFSWmIxGoylFMM4vMlGUJ0sCcnxZ7dnk41eEzOUjRe2WqhEbJAxQ2fPRutpq14k1MZJU1/pXhtHITJmU3zTMDiUQS+sejuAQifQyMkOEcw7nSmoGXewR7TbTAdrCwWI0PmwLbkUsZ1vZ5IhNBmJ+ecKRT3tLf540xtaHwlmpNuTsIsRSWe3L9Uxn5UYq0j/32KoDfJH5zxma2nrCGpAoc3QPKbQW1N/QGhT7h9Ry53eUtwlu6zmM3iLlfqjyu++kiizNHyWuv14IZyQZZSPkknaitja/cqXJSx1Y+OMzq5aoYx8Pyrz1V2i3k65TuLTFirkzj+Y+yC34LiVwmWiLdICITVz5hz7KSWRnHLSdqiaVjkYVGkIFzwZsSzECZltRNfIKeVlyKmt3ruZ95WTyXnsKnB/QmJM+prT9ANLwgFf/bPRnfY/UqE2tGBEwVWPJI7fXz+OQVcRCWvxe6D2VYAN7BIl69j4R+5lkGO8zNAWuRip5kr02BdhvUkt9pazU7UPMmG/bZKYDnwxLgG7lA0kyRXjXplKCjw5MscbfllNzSD+yr23wOA5jROfSljaWF7PI9TVBVUz1Bk9J9OLgVxuPtpd/NnS7tHMYhzAVLdadDDXPkhroCtfYtw7VXy0FRi/zpE26+znE8+vREyZHSqakrYXiLRDuQw7YFUzydNuI2e9P+KYK69vw3V+IhECDGT0d5HDCEf57UyT87xESGzaf9ux9QB0EBd9iqjaKpZBaaPIMT1ceHXpAWgb5ZJdoMQemsZEhENRZ1M3HlJu+FYaBdQOScBcvS8i1COy2q3j0Ms5hJU8Yi4QRW5NJedNf0yObpoE4D1XRfKo8neng7VIee1kCuSjh2Z3opBi7Yd0lcoMqYbAqIL9a+rKL37REfbnWr2YabZl8dO1ehMaFAsh8hKzvTBz6KAuvQ/hz1ktVwAZT1MtCSZXjCMz+hTxUbN9/RfNPnPqXfCrImyAWlKTTTISNC1eBH+KmJTUPhNFy1fq3ddhp6VUsMxdJwNxgG1DxCFrsEnkyjIuh/MezTlS3IltRbwRH10zl0A9yRN5x0bs85rqmVCTn1pWd6N8wZRsXuntP1aHg2bHKzdpyl0qahieQbJ0ca6AF59QDVRfl/qL4oMgMYkf7NOFQ62aQtc4E7478kMb17HEikme30ophY7ni2RUTv2fUgfJnWX1gEiMfjeh4tUuYr1zcIy/S/G6xXGo/2TR020NKqgD73QGa9RTSjrvzFuHUKwGg8vCUc0JCkqMgM5mcdvNDSnQIWxWU8Grz2ocseTB7 X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7393be51-497c-4500-19ff-08d94c4d83e3 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:43:26.1915 (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: BDPLGzHnric5/ddZxvbWi6iv7T7vmF8GKe2Pw8OBkef8+9m7QASuIV0pO7nikBOZBlOtRlir+EKp1pZSKiPGUQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB5802 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/include/asm/arch-imx8ulp/sys_proto.h b/arch/arm/include/asm/arch-imx8ulp/sys_proto.h index cab12c218e..8894611a0f 100644 --- a/arch/arm/include/asm/arch-imx8ulp/sys_proto.h +++ b/arch/arm/include/asm/arch-imx8ulp/sys_proto.h @@ -8,4 +8,7 @@ #include <asm/mach-imx/sys_proto.h> +extern unsigned long rom_pointer[]; + +enum bt_mode get_boot_mode(void); #endif diff --git a/arch/arm/mach-imx/imx8ulp/soc.c b/arch/arm/mach-imx/imx8ulp/soc.c index b3679aefcb..e6ac5f8d25 100644 --- a/arch/arm/mach-imx/imx8ulp/soc.c +++ b/arch/arm/mach-imx/imx8ulp/soc.c @@ -3,9 +3,68 @@ * Copyright 2021 NXP */ +#include <asm/io.h> +#include <asm/arch/clock.h> +#include <asm/arch/imx-regs.h> #include <asm/arch/sys_proto.h> +#include <asm/mach-imx/boot_mode.h> u32 get_cpu_rev(void) { return (MXC_CPU_IMX8ULP << 12) | CHIP_REV_1_0; } + +enum bt_mode get_boot_mode(void) +{ + u32 bt0_cfg = 0; + + bt0_cfg = readl(CMC0_RBASE + 0x80); + bt0_cfg &= (BT0CFG_LPBOOT_MASK | BT0CFG_DUALBOOT_MASK); + + if (!(bt0_cfg & BT0CFG_LPBOOT_MASK)) { + /* No low power boot */ + if (bt0_cfg & BT0CFG_DUALBOOT_MASK) + return DUAL_BOOT; + else + return SINGLE_BOOT; + } + + return LOW_POWER_BOOT; +} + +#if defined(CONFIG_DISPLAY_CPUINFO) +const char *get_imx_type(u32 imxtype) +{ + return "8ULP"; +} + +int print_cpuinfo(void) +{ + u32 cpurev; + char cause[18]; + + cpurev = get_cpu_rev(); + + printf("CPU: Freescale i.MX%s rev%d.%d at %d MHz\n", + get_imx_type((cpurev & 0xFF000) >> 12), + (cpurev & 0x000F0) >> 4, (cpurev & 0x0000F) >> 0, + mxc_get_clock(MXC_ARM_CLK) / 1000000); + + printf("Boot mode: "); + switch (get_boot_mode()) { + case LOW_POWER_BOOT: + printf("Low power boot\n"); + break; + case DUAL_BOOT: + printf("Dual boot\n"); + break; + case SINGLE_BOOT: + default: + printf("Single boot\n"); + break; + } + + return 0; +} +#endif +