From patchwork Mon Jul 19 07:47:30 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: 479826 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp3871030jao; Mon, 19 Jul 2021 00:20:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJrJsgvtjmmW+e2/De1Dlz7C1dgq7JkQM00YSpTZiQuShNOgCMR+vdIywMxUDlTA09ID3R X-Received: by 2002:a05:6402:2044:: with SMTP id bc4mr33749651edb.307.1626679259400; Mon, 19 Jul 2021 00:20:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1626679259; cv=pass; d=google.com; s=arc-20160816; b=DhIqiFZibBxqPDH0M3jQQ5r9Eyr5RLn4/49YbRR8plJeUDWE/DPbQYmjurIfaD+BfJ +zyk4I7GKoiqpfVhsyG2il9qkDW6c4bdNCP5fbKruRf2AikkXxx0T4/zGvQJ5dVssg0+ Q80VBfLIWNPrPt5kk/wte1bN+MkOdyXvNe76/qsbiE6U9WOX3Qpls9Lw4CkU3l4hu0kr X1+GXscwtW2Ghgz83VdcsjL+NOSO8FIkfYP1EDEH3es48kB98QkJhnAMugqPluhVI4w5 ElNJ6b9rb0vqojiB1gBNU3eEuzJv1DbeK98JosOFk5hz8Y283hIFATonYo0zAEelrAyj fjQQ== 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=Xs5lxCC5s/rVdr/IKuvKk4SjL5a9bXL87O7R8opPZdaNMebybVZ01MzpedM7QJK/ZM YxrU3OqfbMoAUbzijzIlN6iJciEkEXHlongB+pFixh3bfzQwg/bAS1uU/+UCIT18qgb7 iodzNWZMCZ326cMfqOv+4Rkgyd0jrXA9/1XfhI2zenQlOwEPeco0Iy6MSlYWIdsq/dpE BbHGyy/9nhOGsXYSmQi/iXlqxslwsrXDzPu9ek95EWmCY6tLTJfY6an07sZ0tkQrjPeH /vYmzgfzOBrWZwDlGkJr99+FUqmp62la+vEqHWR3MTkIVKWd20gk6O/e6z37a/nTOo8R uZxQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=Rrjn64oM; 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 f17si21494079ejz.260.2021.07.19.00.20.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jul 2021 00:20:59 -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=Rrjn64oM; 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 783D282DC8; Mon, 19 Jul 2021 09:16: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=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="Rrjn64oM"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7D86C82D2D; Mon, 19 Jul 2021 09:15:23 +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.6 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-he1eur04on061b.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe0d::61b]) (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 94EFA82C1A for ; Mon, 19 Jul 2021 09:15:17 +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=O/f0StACEi9E0IxJ8RGf7dCw653sEdjdGSHwqYefogxNMWHnmX54Vg8zOdT/NXEmdPKI6Im63jBpfk8/aPtNyEgpJHB2oeMQZyAYIeufm2hNzSUpDopmFLJcOZv40k7p17VhceconDPHMmbTnGoD80UKoaDU9QR2chwyqu769x5i7Zi2xWPg0vuwJ/UbqZ/8HKs51lVr3/eTmKqCBrK/v0j4UaxVlJAbrcGJ8qqmjLYGuJyGTmp7hKKUdQk6DmJpbQpVmB1DCnh8DZDQ7fdApuewUDG99R/iyJDA6bCcmX1lyB5pQrJ5Gnji3MLKwqD8rKffRMqfVnEYTj+E/W80xw== 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=Td9aMTB0d3KYu/k0/ZQTSeMu7mFbo6JIG9xvil/G//E3xzO+GalPPjne45lJFCY8gVfy4NffHOXWPccgkq7Dqfby79itWmKRCNghqnI5HTO/xbdbt008Y7gvR25/JtU4wzJow0+O3BHqRrw60/KjgOVUjHs583PYnWK/p7rRNWvVv+gbVuXqgleX9DMQEULjLKQO3LJ05eggLO9peIwVnBs4O4Jw7Ctb9hAS7kqnsmaGuTLjgX/hxjPMijL+xjtFFAN7xQfGvsrZMKevYTU1BpdgJbCL0VW1Df23+2q3dDlyRcUbNtF482m7SEN35EfVDMEqydcMK20R/yFQpuky6A== 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=Rrjn64oM291PG2wWczkMkKgi0wXJA/88WUH/HksuB4RGtrgqxbltpUrRNKDW0d9COtiHrolsmeQ4fUcBi1l0L6hSXQnbY19AfBLNIwFCnh8Pd/u/NrYX3LDvVxpOG17S7D7QIb1+9yJgdC2/YZ3XZH0olXzSUGrl9zosBAJrF4Y= 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 DBAPR04MB7302.eurprd04.prod.outlook.com (2603:10a6:10:1a5::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.25; Mon, 19 Jul 2021 07:15:16 +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.032; Mon, 19 Jul 2021 07:15:16 +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 V3 40/44] imx8ulp: move struct mu_type to common header Date: Mon, 19 Jul 2021 15:47:30 +0800 Message-Id: <20210719074734.29170-41-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210719074734.29170-1-peng.fan@oss.nxp.com> References: <20210719074734.29170-1-peng.fan@oss.nxp.com> X-ClientProxiedBy: SGAP274CA0006.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::18) 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 SGAP274CA0006.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.21 via Frontend Transport; Mon, 19 Jul 2021 07:15:14 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0da06e48-63cc-4a09-80c2-08d94a84f54a X-MS-TrafficTypeDiagnostic: DBAPR04MB7302: 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: hOMy/PddH+TyVKSlp8mBcnMmZMFVOsEdoIabNQpKnraSVZ3WzZM64eeWLhCVRGE5s34x1Au+fH7HHS3pjrpj2rvmEdkP9L6GMUjx1TFd1rWiSMq4tSXbpIzmWSNI7YIh+a140kSe6KXtn4ygoCLkTBEFC0zLZx2EJ10WhsgXuavERoxQ80dS/Z2aT6SXTBYceJN8P98o4qiVCZf8p/je/H9QJGAy5J6uWxW9A3afEtLF1yaA5BlgqnAFxZnp750smgBHXbG4CCk3AgrmHNpLG51KHfznVPjUTTn0fJ1M5q4h8/xJpCMTmNNgIM3o05FGm14rjcEhMF1+DQ70mX6WMwvhIV6XV4I3+uD5N/UynesOushV2ojoV40UJaK9F+T+VbeSrbzMwZ0IrMTJrPoxVz1GG+dNpDc/dX7Jyf8aXDkPfsoGa2AWT8OUx/6+qK6mcVH2Frv4cd5Jc75oHnfvlYM4Kdny6qmCLiufKY0xtVrGwNzB86FjsFIfo7PpWeznvFjflhVrhuT0RLCAZVvI+lWZQT496eT6cCjZPpCN7ba0WQUbD06nx9O+jmHuHJyuPzg+el52YSlhd9XQuFOmgzZWYsdsNmFxvIPKWX7wnWXJbNnkNWJb1XC31It5DujdxBH/k+s7N3WmY5kl52nufnQUjDPa2jyCVuHlnrHJIeQMnMtRI7vHDqhhp0rluOsEMh7j1Vn1wJvzqZo+iYeVueGZCVv5NwM2PaHdGwtKVUs= 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)(2906002)(1076003)(6506007)(8936002)(52116002)(186003)(26005)(86362001)(83380400001)(316002)(66556008)(5660300002)(2616005)(6666004)(6512007)(508600001)(8676002)(6486002)(66476007)(66946007)(4326008)(956004)(38350700002)(38100700002)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 3rcV2eHx5wtyuCn8bQEfsbF+onceJvC/Qk00OGZSplxpnaqsHkOxyXaxYgbI0eCFvXRLc+HoGSH8srbMzMICiHHtXGfWGz0dmHQcPtLNEJDiHrWN3sVBcwL+WvJY45hykdATuPEOnc6Z00ZP/5n3lSGFOjlmcbmstT2bOd0EtXj84R6/M1t8td2tbWjidQ6LjP9C6qv2MoEUPt4eBg2WCKZUwjsZcxCWV5taKCW4W9mfuGCHXv/kCmGmefUvFOtT2HjQ8C5dSvZq+qnblk3eSCMR2HgY+UMmzvXUbUiZdGQQ4RoLDHKcsMCwe/3vwUSaySxZdEgpfUfS+SAgCY3awUk++4y56zhY8qthYmNTzv08iQj4q0NreJHud9X/7FSvZCUoMK54ePaH/8JTNAzcxsu6CP2mQA1YxPYfKzde67gbRlbHavLbtjFz+Ph0/jr9fsb3lZlEzfCbULFYuS6EAsqkxhZgRftlIDUy9GYuQEj1z/pdQdel80sR7HLSO2v3iikd3mw5sAojHgGkIDzwKeP5iVnLJ8rFwQeauFlCcAXR69+ty/vkb6nm6saoS3Mn97uyolOJWwbqN8O0BkC2AJVVmHtWHOHdxXGKKkD86KFX/QEZXtft3/MeGx/ppZlZttdzuL8Wc+Fr3+7OcF9CX7qdN6XBUmExsNY2bP8f5XhWjLCi8XiFSPQp96jlzl6kHh+28LzdvHr0MMuRO8A337aQtzz5poVV3p8CxsTyQdyGfP3QadD42NrwuKugnlZ1/LXp0CEe6p2jqd0avi6lV+oYCVBK4QaNDgfsPB68Nr/K+r1WoIOp76QIqZi38xtIejojyrfu+0By57s4eGKS4m/igZj4/D6V9bQFpe6xobeY7t60vYVeRX8u0aZmPjkohQuHuojP6/rXH6YR6NscCMBbDPsT56CAuObXVOgLOK1M/DhMCQczO/YT1/ddiiCr2HAevx2NlNKp4x2/ZgOX5Kg5moqcejfy1lvKFn7YHUCGqXoUpdWKclKcZ62wEnpIohTB8IrLD29wUTTC6dS/Mvov0xe2YD5bWs4s9LI8sKty3Amk/2yus06uMGZRRrUItOMcCM7qneSTxbC0knz6xX9dXBSxGWW2Uat04htBF5ZAtQUZOzkQTJDmEUWVrGZoFuLucu9f9Ob4VV0wBqRhRms2tqEusN9K693kxtKq7VnMSMm7dMBu1IPb+LHxJb6zkDQOPJP6qUQ9cJZuzWsa6YLRYCBD82qt9DnbxxQdos0RBsg8YVxhvLaPoGBv129vG8dnewPpSPi1qNhy4FGxb1s3HpIUyhjT+sTof1p8LSsYVcWUlFhWsLcBl41EPge/ X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0da06e48-63cc-4a09-80c2-08d94a84f54a X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jul 2021 07:15:16.3133 (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: B41puY0IkwnC+DeY1JTweHg8RVqZqvklW/f0PNbnEQMKRmMq3Js+ycYG+N+aNMc8iCL4onB8GiQkHr5QHq6L1g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR04MB7302 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; };