Message ID | 20210412121306.11484-21-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 h18csp1660589jaj; Mon, 12 Apr 2021 04:45:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFqogU2KRNW1bcPONNGpVZ/5sNdGgFq52UjXVBD67+Sa90TRyMliMf9aEcWxDZBntg82o0 X-Received: by 2002:a17:906:7194:: with SMTP id h20mr26421313ejk.432.1618227909686; Mon, 12 Apr 2021 04:45:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1618227909; cv=pass; d=google.com; s=arc-20160816; b=SQOOfDFnyZNbuqnV4f7D8s1T+imaiBIVci76tYZ9lgKyGZuanpRxDNTL2FAdlWTzrn JRV5Q2L+QhX/iqQo4n84Q8q70azIQh6xlYlNc+eZUgDo2gR4etOxzoJkqKnnimb9AEEp RZB41MuMEWbMWNf+t+/nplY7LUeED5eVIRY7CrJwY1tv9Mj+w3htgUROic0tyJJrcZ/3 2RTl9iX4cfPXrMQgmrW+oHG4JPh6UQ9E3hfOmhPeR785g6AF2eSnCqGRguEKod0dKLQB jNFjzVSvy+bnrLnozgnQWL9Yf0BmFXmhEBGjtq5lKoJXo0HcKWmBEOcofm95t8JNYzOY K6lg== 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=QgO6mgFaQFHGM3sBJ1D6pfOSqLAmGoSe5afwOWTq+lU=; b=Glj9vqQyauQfwPZFaPExoHFLldgyeKfHhjxyhDSA7wbQKXNQCl/hQxgmEg2UAeCRac BqQJ0eYPgmeU7l6FCHtYY3BCQSm5mG8pRRhedXipOMjjTZ7dQH8NczM2yShg/X14CoNn 7FGivIZwoHUUkL9oZ9ZLjbJTGkFaPw/k6GqJaf5xrqr0l8IJ/dfTucwQWXg9uB+R5qJ+ ZdxFswBGChC0YjYjk+bNnx1AThNT/mFxIMhiE01n656Zv2Ovhss10eeTHOh0jttS72o8 g4s2W2I7WwHjZblKIFXsLJtsxlVGKzO5d54ioPj3I7zxym/gTPWODmDE8xPOP9699BHG IU0g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=BlbcBlQC; 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 oz10si1513620ejb.8.2021.04.12.04.45.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Apr 2021 04:45:09 -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=BlbcBlQC; 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 A470982022; Mon, 12 Apr 2021 13: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=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="BlbcBlQC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CDE8782097; Mon, 12 Apr 2021 13:43:48 +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 EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on20621.outbound.protection.outlook.com [IPv6:2a01:111:f400:7d00::621]) (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 82E0881FFD for <u-boot@lists.denx.de>; Mon, 12 Apr 2021 13:42:22 +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=I2MQc+M1rAWiIpMOiLXhIEUMCQ35FPtuwkpvbXQNAeE/4eZuMu14Uu9kmuzHC4EwtZICoaThSlrKknySctXKpThEK9Glc84TPNFf1NGaiFr6FrVNmtFm8nXvzrcNqDGWAs+4ppamGqFGvsig+Tj4fVLhNzZBfVEsPgvoUEd98fHpDGlkXnzz3R1MPkyyol3H/QiHUTCpOGy9DBp/6Uvt7ezmh5CqXmvRfhUg5qxUS/yCIiLmpZ3ZdsaguG7zfieeJB5ymEoR3Gdnmqrx2Xbm8nh4sucEv/c3Bmp6Dz7a75I3ylp4DkIvYksJCpN7RoTLmjBcKmD2wRsrCkwaD9jvNg== 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=QgO6mgFaQFHGM3sBJ1D6pfOSqLAmGoSe5afwOWTq+lU=; b=EuUSO21xX86egJXtMn2QGNKm5mD0Ji+rHVQ994X8L2eAKpxDrWiHIAkvFHPmljdh1Y2OyzcupROyMSCORtmoZ/1FmnGCtFtwHjPGKpdfHlRM+Q6Y7oQBTOPEm63vlDPi7sZ/GtRPlcYAiztJWc/1d57qsvQoixjcG7jT+a32RRUmZxieDDsvglK7cMOsc2kUbsvB4VtofgoOrDNNgKTvEUZDPs0L9AnvCw+WfDaeslLQKymVmUS5lsdMLNiYadX0sCQYoADVWyw7K/TGpm5Xtw/jSbkrj9aWwuLfnAqO0Itdv7dS/eSok58D6w5LoSWYwZhCDn960NXCkjj5wQSeDQ== 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=QgO6mgFaQFHGM3sBJ1D6pfOSqLAmGoSe5afwOWTq+lU=; b=BlbcBlQCtlyr5uRkoSyNh8zaItlgWDiKrSGF2uX8etylk1zS3Vhg0ykX/QAzSzlpF2NgE1OZLIXlhugJE1dLe3AG4S+yHSKByZaGD1j4pgMHdg7T+6pB1fJBCDvoK+fn1qnu5CZJHF/hJKXtot4rn7h6hrX/1cbKKLoz25PpNx0= 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 DB7PR04MB5244.eurprd04.prod.outlook.com (2603:10a6:10:21::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.18; Mon, 12 Apr 2021 11:42:21 +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:21 +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 20/37] arm: imx8ulp: disable wdog3 Date: Mon, 12 Apr 2021 20:12:49 +0800 Message-Id: <20210412121306.11484-21-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:19 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 719ae8af-b869-4ae5-07bc-08d8fda80844 X-MS-TrafficTypeDiagnostic: DB7PR04MB5244: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: <DB7PR04MB5244D45F7293EC149DE42E69C9709@DB7PR04MB5244.eurprd04.prod.outlook.com> X-MS-Oob-TLC-OOBClassifiers: OLM:1247; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iQHLvOuYeSX5PeBzDw59SP6cGTZdr6OYbjUWOUnMeyA38PGWkJ2nR/ylbserOgyqAmiu4WF+vMPMpFAaXUFQQ63YTqHjSlS0IC8IKzwnnH9kB+zsGPpJ/exhdZfSn161735df3rq0YWj4qDrfK2SaVHyqiea30p7XZMgn3PDmzjBwSYWft52itHM8YYHPDPae/7Mh+6pDLnZlkBqT0YUtjv/fOSCe8VEg+sg+vcktPdP4KkPcjnCCyo88dbbGM1lS4oXkeNZR11U7qSZzZ5G4vCEOoKCz1RphQx+eVVBGXIMmAivR7q+X/CKNWERMXBwKXdKag8A9VMusF0Egs/rzATUzNEHLArka31KGCyxNq9+TJhW1p88BoVJpppskfM33G2fPNRky21iEm50uRi+1i4vi0ZR0pVzFxfzwvUzHNeomts/lJwIWsUZy8ngB4mBTopiOdnLDOxfuFrOmEKMFIs658QlCXn2dltm86FtBDbrb4FKVi5zabZtKyHk85BmekQtvWU6YcjCU+4ihvqSrnjm3V3F5W27e/BxZBX7m3YsO/NYLYia0UqHp0dw7VWAIbcl3jhMdB6q+Q9Frd4yaAe5XNfbQGKeGmkQOu9s53GwDKyXwwZuOUX9aRTi7jBGYGATMCTzZwmxqKvfAdfwQSYV9HCNl6ddjW8iQt9jBzJuQZjokor3ksY7CSCM6fEh 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)(346002)(136003)(366004)(39860400002)(396003)(16526019)(26005)(186003)(6506007)(38100700002)(66946007)(66556008)(66476007)(316002)(8936002)(38350700002)(4326008)(956004)(478600001)(6486002)(5660300002)(6666004)(86362001)(6512007)(2616005)(2906002)(8676002)(52116002)(83380400001)(1076003)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: M0BE6dIaZCD5ski/VtzUdOtTYttw1HEdpOFEqA/HgdafYTR4b0b0cTS4lHeGgtu8RxKqnT3uvWoV/wZeAiLgc1d8l6CAFeaVOf80bZlvWOM6FkD1WbIQbUOsg52aO0m88muw9mwgHskYCJ2Bq9nTrtX3DTFHcoA0tBJy6Ajt+ty+9Xh3z20SwhSCti2mi1OEB34hZZikMMjpO3Tn44AkfHkHcJWWCFSKNTEjCq/TRkFDW4b9xqIHNcp+6FBfxwdYlBOytbsIKskVsb/OZudnU1WUmWMYrq+/cFxbstXIYrUOLfLEgUAov8BOJNWxtCR4A0nXXTQZzyD1OXppuGlnwUJFKP6mikHg4l65Pc9Wt4N8lPkejNYyzMdzup9YmPhtvEpcDkdZ/ZvdgYSfVxXS+YlZ20Vcj7jGDiU2GyO/ZSRKWAPKBda7wa26+5mJEiQ/ihPkF/J8c6tCNIFIwGc2ymuJLRAnXhGmCGHgZT4Gyzehw4bkyV3lLkhkJdEUcNabM4pkZEjznNHN2e9upRHDTo46LGL5QKDIGp50dYbFYpDcMqXLN91gCbp/1N6jrGFc+wrfk2b2V8R5I2rNfX5jeR6AMu7Q1lNcWYcOtv16lS1G9Rui3EczuodtFUSKmZsTCOeYhc6/CWt2y3od+mEirkwZefII5PiUfuyqTvesKoE76/Obsg0FQG+qojWv88DreLR7osTT8la9rVSCuQ3seU+bOLMv/1kMvEmEO2RH3xNkg5ad3DPfoKqXokJyCvzOb7lP1dNrKTvDkVA0Xlb8X7V2wX/+t8LCzFCCjqx4fMYfnKomzaVU40SfTBJq9sppHFFTzWUi5IKep3vraOLQKJ1yp1MEXmqgm+dvfDXMCUlA9Nl8mLubd0NBT1qYgi1wGKKKRkpVxxXy+kOb1qiYPLngh03o1TMSd3frrk2a+vAu8Hc1QaaCNZuIXqONhvCu1JvXG5im1UBFywee4MBKJkSoQErvSq6hCj4253OgxervRuzO7mpICseXmeO5oeOCbFLENmPdj9XB4vFsF9wHhxy3Wtb2QcVvqLEGvtNY6A//DK2OKUvQoTr3MZUiK8ZwNU7A7cIMj8v5GNSgPa0lCLMwihxSDN0eLkNNJSXJ/TcatZd8wigTzUUZG2tq9du+zr1cFKhRWT31dSC5C+5wwJ5PqFH4R7oMnHHt+OPgzE2SnAu904+MEDkEQDxibjwNxRMEMfmzoP0Z2mefjgE0iyLzVsmeWUiiVFGmNnzyIcnaa+YJ3JxVqmQKdlFg3M/qRNz2J0PGm77HeW4JFUV549R57Ymn4+8dpaHz8LmXd3S0+xgugruwg8qqQXshrrbgjpjctBzOtXGZeZlSAGV/dA== X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 719ae8af-b869-4ae5-07bc-08d8fda80844 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:20.9533 (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: utJWXV67+KirYIbKhSPlLVgW7WSZQ8OJtCEChZamAAiQLSLPNHdZCN5sZQo79C3vGUR8d2SiHT5v+H1kQ5oLRw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB5244 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 be7d3d7259..a1c229c4f0 100644 --- a/arch/arm/mach-imx/imx8ulp/soc.c +++ b/arch/arm/mach-imx/imx8ulp/soc.c @@ -144,9 +144,43 @@ int print_cpuinfo(void) } #endif +#define UNLOCK_WORD0 0xC520 /* 1st unlock word */ +#define UNLOCK_WORD1 0xD928 /* 2nd unlock word */ +#define REFRESH_WORD0 0xA602 /* 1st refresh word */ +#define REFRESH_WORD1 0xB480 /* 2nd refresh word */ + +static void disable_wdog(void __iomem *wdog_base) +{ + u32 val_cs = readl(wdog_base + 0x00); + + if (!(val_cs & 0x80)) + return; + + dmb(); + __raw_writel(REFRESH_WORD0, (wdog_base + 0x04)); /* Refresh the CNT */ + __raw_writel(REFRESH_WORD1, (wdog_base + 0x04)); + dmb(); + + if (!(val_cs & 800)) { + dmb(); + __raw_writel(UNLOCK_WORD0, (wdog_base + 0x04)); + __raw_writel(UNLOCK_WORD1, (wdog_base + 0x04)); + dmb(); + + while (!(readl(wdog_base + 0x00) & 0x800)) + ; + } + writel(0x0, (wdog_base + 0x0C)); /* Set WIN to 0 */ + writel(0x400, (wdog_base + 0x08)); /* Set timeout to default 0x400 */ + writel(0x120, (wdog_base + 0x00)); /* Disable it and set update */ + + while (!(readl(wdog_base + 0x00) & 0x400)) + ; +} + void init_wdog(void) { - /* TODO */ + disable_wdog((void __iomem *)WDG3_RBASE); } void s_init(void)