From patchwork Wed Jul 21 14:17:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan \(OSS\)" X-Patchwork-Id: 483302 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp6214591jao; Wed, 21 Jul 2021 06:50:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyv6IqazaVCXnFvnd+jEG5/QdjYJLRrp5k82gE3ll8FBz58bgPDB4duxKKfAjbcJfCthjTO X-Received: by 2002:aa7:d34a:: with SMTP id m10mr48173619edr.12.1626875442254; Wed, 21 Jul 2021 06:50:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1626875442; cv=pass; d=google.com; s=arc-20160816; b=IvtHKrXJ2ztJo9Txy0csF8BO2Ey/bPPwBzB+Alg/3QGoBY0BrwOt1AEkcm9sg7OLlU 3nshc5KKG99hEL12LeVIjSjAE148vrYB1XnX+oxL1zNpx7l3MKA7MwPmjEIxI8TREsyl lg0C0kqwCFcnroSXvJmTiUxX9XOzGceFHFd4jScqUEIdPqCsfEbkro/1jLL193iw72Vz /r9f5s6BWCQTA9pfH3/IZgRef9ZxgfBVUgX8Z1Uyc9rqcarw9knexaEnwQApru5OmQeL J2CFaA9LsiqUxR6kVCgSBrHxyIy9fO2O8blZzQL4CnTRlVFFROO3vh0B5AJBhgxrK0gc ZGTA== 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=eAWRDIxHXGJB1uyXbBztSac5e1FzM0AwnfIG49R+JFM=; b=yrMrcIDq9tqGHxjw0gEcmexzZwRhxDMRNJPgJOygySP17yXQjmQooDYAKRDgXxvcSH zKORzqBCg5vF8k/buNFYPbHDHmOJz5O3QsfwiAIjLHdYy5RrUEH20nVGV5+AGSoFXT4p IfWd2i5YexC22nOqTZfQptf64I1GswqqPqd88JtCv/5BZDw7pzAeAmaoYwzUS1CcQMPQ 0medrWSuLs4EIXX0+zAAftEGwUow/7sJdMHQPlcPzXiC5cBm7spbegkC6VO1plBi3ygp npnzOiICewyEBFPx6B6KYMXlXteXvVTFNz7wcEoTM9oih3HK98/lEmrQ9dpqRdMnwdsB BmZA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=IYOw7Zi3; 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: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id w19si3051931edq.290.2021.07.21.06.50.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jul 2021 06:50:42 -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=IYOw7Zi3; 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 CAF3B82DFE; Wed, 21 Jul 2021 15:46:58 +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="IYOw7Zi3"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 09FFD82D7E; Wed, 21 Jul 2021 15:45:17 +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-vi1eur04on062a.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe0e::62a]) (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 4717882C95 for ; Wed, 21 Jul 2021 15:45:00 +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=B14mQnPajB5DEgKFSzNL4tdtoTeM5FZjv+KY+03Cmqc+kyAmXdBFxvZd8xInPuC8kJ2e9gjbQ05dSXs23TQ61n/PyDu1CGS2h9zQkeyJN84w+5W4woBpd3FJjVQsB5tI+kqOhrZMtAJaFhkxscVdXLq8bVyEUV2jhBIlLyU4x276RoZfMSXSlA3G1TUEKJgXsGjeUdSD+nbAOyoc+akxgP3NaqweEwDKdPgz1QFn1gnEpfJraRbxU+s1usALhGRSTkFw29C8xeRwGDGK/UIk9Pdua8/l3dmdeXwqm5W2IrflYlpXFm8eSTqz8dNhRrzhh/tQGPgxcfrZzKJOSDSCPA== 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=eAWRDIxHXGJB1uyXbBztSac5e1FzM0AwnfIG49R+JFM=; b=NfTkuCeZe0tDTT5NvgkVUMOWyDlcZUqd3SsbeTwF7S3sQKf37QrS0oswBvuTS5CHb5Icgq3ee85kbYOKS1uvfeqM5w7ww8yFGSBqo3QMRwzMtvm3BL43V5ChO25Fj2MVvGyYpA4qj0T+lWjGFzibEK8Yqyg23UhanMZSJ1RgwzYk15hqgn1vPSMfuImWIWHgNkNW1o8GLdTcUKUjWSjupdFLv7pJpkMTuavItOR+G8B8OyrRogsQstA6Wjt4nJYwwV592JwSRo9v9vebi0/YL29Gayba9HDvHD/xQvK3k9cl49ikddEEfrZOx4tx2XPVlva0Sz3h/8N7j+fvqB/rrQ== 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=eAWRDIxHXGJB1uyXbBztSac5e1FzM0AwnfIG49R+JFM=; b=IYOw7Zi3eiks/eCOtm6p9Kn2trMtQtKv0hRRfz64NlbGmOWyTv1KEJCONqEkzkyS7LKGic8W8ZoahHloqrMbX3lVrt34LbE0Di23mKC+SZbLDTK8TStjfraibHrIs2TYdpEqmXiQtgFPROPBl+dC+S1TXbWKc/sjHM2wrAvxnPI= 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:59 +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:59 +0000 From: "Peng Fan (OSS)" To: sbabic@denx.de, festevam@gmail.com Cc: uboot-imx@nxp.com, u-boot@lists.denx.de, Peng Fan Subject: [PATCH V4 40/44] imx8ulp: move struct mu_type to common header Date: Wed, 21 Jul 2021 22:17:21 +0800 Message-Id: <20210721141725.23346-41-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> 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:57 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e7533149-e3f0-4544-8a16-08d94c4dbb7d X-MS-TrafficTypeDiagnostic: DB6PR0402MB2757: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:826; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qnL4l0WxwORRU4f1t92TAE8tCtR+6jtdtHNWWX2doIzUfBRe5uYxriDzvqXZfNLtHfvp2DY/GsL5SkzS9A9SBc2JxA+YB2HsEuinJ0HqcwLSJO/PbnJxGwiXPxMZVJW68NDy3Njx4dPB8lfRuJuaCwAzi6/FiOWJS6uETD4QyCkOi1qdO0iWMy5Iyo6Ykv0Q/7+vxBqgET4XGwbKrzaYrTPReXKn9MlrzgDe1bRYQP5BDZ/mKLvfh52Chc6D8yOn8c/hWIX64FI0GTtT5bGsyogy2Z1lD4m1qoFzYzwUsb/n34UvcRngl0YILltBQ4f0tC6cJu1N0GmKbOJ4qRnJwJhoA9ElCAvlX87vegsan66rcO2pRwhAEl7cwvzlvb4PI+S+UYDNFmPLLaI+hx+nE5oWyijxLjg0W9EZXkmzJep2jQxCQrmHZaLgiFVT0BtEJHE2gX+2APkU8QRUi3sVBAUaIxz3+Np7Rqslc/+bd/mguWHU+FnUayZ12AzpskA09+i4SfiUxwdLBGcRzbAsg5mglRRrn7JwczmJ3eIk0oOx3K3ILI1nGw3o8nyu5cZ4CV1YJT6S6eVWIMJwP6N7t0oQmmf0zCekmaxY5T4vsTPOlA9Hz9Uh/VQwBdIAr5F2GPa0GUbHlaYNr0jPetUjVt58j4JamylFD872majhGbOHJc1var5wo1BDtIekFGVkADbuPnA4zdp7YPq/6ygAFEF4TreklxjunOk02P9CEnk= 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: h421rw1bOs/aKzCnslA+xSu0VMWnLVyBZiR96oAq1JtgZRkRNz7z7HgC8M7m6kf2S/QNJcPLIo9jmO0C58PWbSrprsvas5vYEE+U+FZ1sF/MK7Z8yd0tXDGmpN4i0YBN/Quq6IiVZ3AT/cwo+AEB8Ox18q3wt1KevsTWeKsWBqC/P92ihgAlqB8X+9QM7KmdOiNVeazV319ETwV6ChpwafRF2bwBsoTZmeGdIA6DvVyNeG9/c1uTpis8DVuB4YDtXqIeaQk/8sbbLWPgmSFN5AMqFcrDVAv1T5GfkTacIpRliH9s5Xxvk8wFelKBbvI+Ao0ckukqsePeIsIw7iSX/DMCd1ItM+tZaxcoV74IBubap5zWTsh8zxBUOEhkQ6l4M12SwsZkN2HG2Eh1TIloqqBtmO865/asafL7N/rCBqHTB/WuYK38xoz+nX04bI9WW8KAgxY86lxlu8Qgv7lHZmNGK5WMvf2IX4L8CrfJ7XVd2D6g+7c+IQSrYNBIKkxDi7QjXtgmwORe4s8Gh+OKNK/xzW0acw/zx4VJRD+9GNRv53jMG92gHOVxMBj6SkgjVZ7+ndgCxw332LugddADYsqGMGn5EiYF5UVQC4hNSNtwC87ysPO6HdKw4WyMwtnkgPwSWnBjAao9uy/nHgq8ArQ3BmP+TGmM4loSpS0qrjMUHlqWnJodtH2XzjxyiNSMHHXBgnblS7Y5z4o7eq5dkU1208HDq4SgsFtXXdQ73/xYP9f7sP3UCo116mo/bsGLnBd3uMheh6GHWFbHJ42gIEBn6YLeFGPRqnBsZBhwOudexEgSdl4z++H/NnxPmYPfOERTs7q4QFTjC1aE1wNh5bhvFYYV8cVj8txCBVcOwo/K/YgmFKN9FYjFBGsXSiCPw+JX81Lfb4t3p7SSgrIwQ6tn1dwMEP/98chIbdIP5finj1xnNsC//hFQclT7Har9iflvVIJFTSj470ub8b9sXQigsol75LMtdyP1dPcyVPFi1D9utzg0ZxFiFqo0BmBOwWSJtfpatmCEqXqLHUJaRl7q/6K41uiulQ/JFcT1s/bMgxI43ojg/CklOogtRfOrsb2UyzH1mgN8Pg3Bu/88hrTHPJSya3v5tDo/Lf2lwOwoAUhIZI+Ha5f44JvYi2bBb4rWM+6OtHFqqzzNRnZdTnUh3xzud+Sp6R9YAjJFjELzT6q6RPafNk0LzMiWVqLJdMQBRXWd8ydH0LBHHHqmOVlgKU6euy1SZ1o7iRnr8tpc8HueMNGAfxr43G+s3B9m7cNVQniS9rhBfuNV9dV1jRzKMmr7evadRmVckoSypl08SnY5ct3qBOKzzc7itQoN X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e7533149-e3f0-4544-8a16-08d94c4dbb7d 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:59.3874 (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: 7dJwgp7YRs5NGjvWlPlfFFbwmd4JO+uXp9f6T0o6iJKcVIjhjCQ1rNmUxm0tYPM4VUziZbPouSacTfYjCKVoVA== 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean From: Peng Fan Move struct mu_type to common header to make it reusable by upower and S400 Signed-off-by: Peng Fan --- arch/arm/include/asm/arch-imx8ulp/imx-regs.h | 25 ++++++++++++++++++++ drivers/misc/imx8ulp/imx8ulp_mu.c | 19 +-------------- 2 files changed, 26 insertions(+), 18 deletions(-) -- 2.30.0 diff --git a/arch/arm/include/asm/arch-imx8ulp/imx-regs.h b/arch/arm/include/asm/arch-imx8ulp/imx-regs.h index 5231155089..af6845cbff 100644 --- a/arch/arm/include/asm/arch-imx8ulp/imx-regs.h +++ b/arch/arm/include/asm/arch-imx8ulp/imx-regs.h @@ -63,6 +63,31 @@ #if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__)) #include +struct mu_type { + u32 ver; + u32 par; + u32 cr; + u32 sr; + u32 reserved0[60]; + u32 fcr; + u32 fsr; + u32 reserved1[2]; + u32 gier; + u32 gcr; + u32 gsr; + u32 reserved2; + u32 tcr; + u32 tsr; + u32 rcr; + u32 rsr; + u32 reserved3[52]; + u32 tr[16]; + u32 reserved4[16]; + u32 rr[16]; + u32 reserved5[14]; + u32 mu_attr; +}; + struct usbphy_regs { u32 usbphy_pwd; /* 0x000 */ u32 usbphy_pwd_set; /* 0x004 */ diff --git a/drivers/misc/imx8ulp/imx8ulp_mu.c b/drivers/misc/imx8ulp/imx8ulp_mu.c index 913ebe7ad3..333ebdf576 100644 --- a/drivers/misc/imx8ulp/imx8ulp_mu.c +++ b/drivers/misc/imx8ulp/imx8ulp_mu.c @@ -10,29 +10,12 @@ #include #include #include +#include #include #include DECLARE_GLOBAL_DATA_PTR; -struct mu_type { - u32 ver; - u32 par; - u32 cr; - u32 sr; - u32 reserved0[68]; - u32 tcr; - u32 tsr; - u32 rcr; - u32 rsr; - u32 reserved1[52]; - u32 tr[16]; - u32 reserved2[16]; - u32 rr[16]; - u32 reserved4[14]; - u32 mu_attr; -}; - struct imx8ulp_mu { struct mu_type *base; };