From patchwork Fri Jan 21 11:22:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abel Vesa X-Patchwork-Id: 12719620 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B1759C433F5 for ; Fri, 21 Jan 2022 11:24:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=CWqbEJCiVSGXBedl4m7Ylatox7hVnbwWZpSNg/6EJ7s=; b=VdHrHPM1TaPRGk evun96T+0L4hQmHgyWtVg6FiMvvqJzXquXsPPzEcYCO2Z9na2n3KYq0GEuLkHZTi3sqfvmCRotP3Q /62deZRfzxxeMZ3Qhx+FRtbGU5112YYG1O1fyRiO1yKQUac+kAsQ3un01EzCcN2vECCDr9inZ0Sip micZRjUd71vZvjbdIajwF0Fh2mqxzGXGqp+TfNE0XkHlkjFhryUKZxpcZsT8al6DO9kRQ+qNh0EW/ jxP6pCnBIzf0a4oGrXU2ZlpRLDWPnCYnlHvNy3IQH4NekQGAbAUjunKTZPUHNxBu/0zd+rGVDou/n NjsEVD2Pb5LubTh1C1Dw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nAs0S-00ElWa-K3; Fri, 21 Jan 2022 11:23:00 +0000 Received: from mail-eopbgr130087.outbound.protection.outlook.com ([40.107.13.87] helo=EUR01-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nAs0O-00ElVG-OG for linux-arm-kernel@lists.infradead.org; Fri, 21 Jan 2022 11:22:58 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gXVaBvLIX4z6LUskL1w9PkK6/YStmyJm6vAywBjs5d8jDgao/RHEMgBZdPBdVR0cqbWRzqPM5mjwDao/WhUnn8lF37A1EC0KqcXmXuc3KKiEzMwF11kB1/kcEY2cpmA74TUjCKzOrESh5f6D2RfNRslCVwGHdyLaJdThKjBxriHOLnd36mhCubcDvLwLIFd0TfQmoirMenkWXIZeTLn5Zy9ntNPdZuD2jNQfImGfZhB7vIHlHGC0Vvk0eZEprfoGDsbRjwdUaWeZOLaLAQnCfMbwN++2MJFp/nCYo/Wyjle3sJS78ZkPxaNgIUchIM0oP01rpd0BR+dY/yLi18Q/pg== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=MG+NRdA9x4fxcHP4UobbuLjrnZ9XW/BELvx3bKO0u1M=; b=WzHXcmSOe5nKV+fHMhl0qjQO2Fecgwzlw4WgOag7qwM8F5gvm6wCJ+O6VftP9YGWymdXujwNKietwMjGLe5B2tsAGKosuZoxuDVlPBm8ECagtiTO0pNcYN+7w1XuAwu1dcPVU0w1N9ozIzgzu0azcQC2/YfYcxNUw64GZJESLsn2KygXqRCi64W1Xr3r7zwDqXYSooQnzboxwKF6liUpzZ6E/S9ePhMmkE2BYvyzaBNfbbxqueydH/rEmC4pWkhstk6rfGowvtDpjcmKlyFMlf3sdTqX7gngGQhkMa7fO0yxmxy3OoRGBT/g6CU00DCuwMLdCzB2MaVP8+QspNn9qQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MG+NRdA9x4fxcHP4UobbuLjrnZ9XW/BELvx3bKO0u1M=; b=EnhK+RAoARCNZeA+KIAo8jLAOYtq8+S2C5yZz9AXs4QVu0WoC8IpNXEQl21IpRNa1RjRkZ7Hqn1PGef2CneLZzqnuiWBxdnegtan/tGmUwA4pIW8/OQKeFSQ8F5CUTgkPoPU1mx4mbHvbTei/QBJgBX9dDk3z0Vf/UzhWATzPeU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB4688.eurprd04.prod.outlook.com (2603:10a6:803:6a::30) by DB8PR04MB6731.eurprd04.prod.outlook.com (2603:10a6:10:104::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.10; Fri, 21 Jan 2022 11:22:52 +0000 Received: from VI1PR04MB4688.eurprd04.prod.outlook.com ([fe80::f853:4e9a:7ab6:dbf7]) by VI1PR04MB4688.eurprd04.prod.outlook.com ([fe80::f853:4e9a:7ab6:dbf7%6]) with mapi id 15.20.4909.010; Fri, 21 Jan 2022 11:22:52 +0000 From: Abel Vesa To: Shawn Guo , Sascha Hauer , Fabio Estevam , Lucas Stach Cc: Pengutronix Kernel Team , NXP Linux Team , Frieder Schrempf , Ezequiel Garcia , Linux Kernel Mailing List , linux-arm-kernel@lists.infradead.org Subject: [RFC 0/3] soc: imx: Refactor BLK CTRL driver Date: Fri, 21 Jan 2022 13:22:35 +0200 Message-Id: <20220121112238.47281-1-abel.vesa@nxp.com> X-Mailer: git-send-email 2.31.1 X-ClientProxiedBy: VI1PR08CA0238.eurprd08.prod.outlook.com (2603:10a6:802:15::47) To VI1PR04MB4688.eurprd04.prod.outlook.com (2603:10a6:803:6a::30) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0ff607d2-6719-44d4-e989-08d9dcd05ccc X-MS-TrafficTypeDiagnostic: DB8PR04MB6731:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sJmKfwBnMQQm4+thIobh8MHzZXvJhofOx0YrMcI8kgB2A41V39d90YOCAjbYc3fu9Kj2ekpe4kqJmIQ8jPqAODuychMSvZnbfm4pULxyaXMurEGELMb+PhIqJpziflijQiP5JL2hv59A9xWbwo7rDTADTZ5IdY0diGz3arREh4EVpGyxI7ZLjow2smrum/BqJWNOT3bUGHNuUwQD1wb/B/WGre8SUoRFTrX3EDJKHcsOMIxY2ok1sFVF5c0rxx2Gs3x7rHvNKDZOag7mu4H4uGMkYeGrBsAm1g7SnmYK2ZbRy7p5DsXVrFILe/htvOABG4QRWtnKiqzSWCI+DsjewgBPIrGRuYa9wQanje7ow/gtKkcNUz05dZ3DczdeE3OsFUppslN07RXqr6kL8n5gbNbS4jw/0FkQRw+yuHRmK1YKD53i2IFlChyO+l0XEaD3nlmqlLqjizdN9nShHvpkeiqu0pvx3Hvo95t9WzcJj8UPMOVcpaLDmtvRWu3tG3yVot/2YCwpOmcsxWNbPfZ3SAzkDj0rkbD1OUOfTHoAHo0ZCOM/vRZQdswLXR97foElMdL41spc4GUutY1N36TBvvhKSddzhHv63r1xLsGtARdOe/eModKAGoxW9wyv54y8DL61kRHjlF+EXWKLkIiIpGen8Rl98kVq2fR6Y28QWx2nMyEbRkr7KOvGkELR8d0xhGp9RtFpHdgWnWhVmKOE5BOCOOSvGfXPAuqhtcVAaGTfP6at4kYCM7PZT2Hj5xY59ZGXG4cBplSlv5tuhG2bnihC6J8rVn+bF+KgkK0NLw4= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR04MB4688.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(38100700002)(38350700002)(52116002)(2616005)(8676002)(6512007)(1076003)(6666004)(316002)(110136005)(54906003)(86362001)(6506007)(6486002)(966005)(66946007)(5660300002)(4326008)(66556008)(66476007)(8936002)(36756003)(44832011)(83380400001)(2906002)(186003)(26005)(508600001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: vDNf5EGPAlpfZqB7Kb6W7yhWAqArd0ORalQGosn3EHW95T81IK69ehhlZrC3pfI5V/lQtppny4i7CKHKOd29xwE1wIOhpO4ptMPx/YS0i7edgaja++cWO2Mm5YgXj7NWi8xPnBmKNAXdwe+KEVydCgf1g25bPajBPMoPE/PS6oC7Ael/uvpLWEU4vWQ0bLwy9sKN9p2wPCXhiNapbq62zG6L2mX/ngHZ49UKpS3VJrv4yYZqCndZYcSXXNrxktMmqJcS1Ga2GAUoadNtx6KAWMWcw7dAtjorhg7EM6xiGDmd+AEvwiT7GtiEBasz2tYiCPDbi9G8y9bdNkMcfPNSUsl/j3PUVIuojYJBc6dZZN6W9yLSdkAEnBtqLwMUYX9WRrvbP33D0J99jFEZKQMdDBoefwuVcQEeqjVRhMG9sqfC8UqLuCavl9qV1ttjVMFSwkXFDglyx0vEBOi0pEpKF5l2GYuRPTBaaVM98fswWO1wGefj2y67JGW8fZWt87awnvQDsC0BmpFEbapbZROHzM/+aMCmK+bnNzKf3Y8QfWw/Mmh/MW/PLzS0roNKX4HWO4PvNpLmjjBksFmgh5WUBxZlee2oTOPZ78/KUZv5FwYkdxtepngng/P9+p7G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ccc X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB4688.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jan 2022 11:22:51.9439 (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: VGK6a9Z39w3hFpCzgU6REFy7D8TqS1PO6qgwEO4wC4+CZFvBEu+Fb9iu1hkrQgiPYi8m/QbtiYmNHpjhzY9XpQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6731 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220121_032256_898127_9A17464C X-CRM114-Status: GOOD ( 11.03 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This splits the SoC specific parts into separate drivers for i.MX8MM and i.MX8MN. Should be more readable and easier to maintain. As for the i.MX8MP BLK CTRL driver (sent by Lucas here: https://lore.kernel.org/linux-arm-kernel/20220119134027.2931945-7-l.stach@pengutronix.de/raw) It can remain as a separate driver until we figure out what is the overlap and how can we make it use the generic part. This patchset doesn't rely on the above-mentioned patch and does not impact it in any way. Abel Vesa (3): soc: imx: make i.MX8MM BLK CTRL a separate driver soc: imx: make i.MX8MN BLK CTRL a separate driver soc: imx: Rename generic BLK CTRL driver to suggest future usability drivers/soc/imx/Kconfig | 14 + drivers/soc/imx/Makefile | 4 +- drivers/soc/imx/imx-blk-ctrl.c | 322 ++++++++++++++++ drivers/soc/imx/imx-blk-ctrl.h | 72 ++++ drivers/soc/imx/imx8m-blk-ctrl.c | 617 ------------------------------ drivers/soc/imx/imx8mm-blk-ctrl.c | 173 +++++++++ drivers/soc/imx/imx8mn-blk-ctrl.c | 101 +++++ 7 files changed, 685 insertions(+), 618 deletions(-) create mode 100644 drivers/soc/imx/imx-blk-ctrl.c create mode 100644 drivers/soc/imx/imx-blk-ctrl.h delete mode 100644 drivers/soc/imx/imx8m-blk-ctrl.c create mode 100644 drivers/soc/imx/imx8mm-blk-ctrl.c create mode 100644 drivers/soc/imx/imx8mn-blk-ctrl.c