Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3734820iog; Tue, 28 Jun 2022 01:21:50 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tMZ/wyZgW2Zr4jmYQSvXjjeO7RtZik7dV/Pz+tg+2/yJvcBelYGYJUjHLs6BRJJSanpiT4 X-Received: by 2002:a63:1b10:0:b0:404:1c03:9243 with SMTP id b16-20020a631b10000000b004041c039243mr16065588pgb.245.1656404510677; Tue, 28 Jun 2022 01:21:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1656404510; cv=pass; d=google.com; s=arc-20160816; b=zJWrgXomO9asbawMXSC3Srf9csDzmDzYQ9tB4c6iKeWz7DtSfaUosnHW1OyRC+IWsy SRzByogazhd/nOZigCbg04Os8vog2baWmIOcs0mKb7uQUwkoPe+0MuX4n7JgigQhP+/p SpvP2IqHguTEp0H+av7BKtyUcLyPxDA4IJrVrSzkWnGvKoS0NR2GEVaxh3jnlGlINWgd 59JWDxmOJMtqZs2P4mS7nFH3d3LlOc3iviJOBTK6DzyqQ7+I7d1yuoh169mymybeCDiQ AQ/0vxnIVdXPeScPPMYPGoZIPTlV0NcMBmGXwpoHahYvPk/F1Y7zvVm9+Bk03/hqP3Y0 0AzQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Vj88WRfFsVodv5LPCLp1LsJWC/szl038VLhyrxtp6Aw=; b=L+pROTyEzEfoq8YSwE2v1RGRk+hTrNNF3L1iMeh3ZN1JQ3dAsb0y1v5U65se4tdHc7 oNQSzTiTKnfEBXQJLGybcW07W6c5U4aHvNVqOJ/0PqqCgUANLQHSz5DATQWfGsxgCNC9 6sJxSsn5iTY7jxFDE3V0fsnEgjeCW6t0BjWoIdK8OQ5NHIFwK4lFbARKo7JU7uiKdKMx X94BRxUXaZ5ACN93WNYFk26dkGm4LzofgVSoQweHiHLse0HqRaLXc635SYeKtK8NiFeA Wz22mGZO7FEAga0K0qecROO7wQpcX3whKUV4vCZT/PP64WGuL69P7sIEqnrWJGGkLLKQ 63YA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@inadvantage.onmicrosoft.com header.s=selector2-inadvantage-onmicrosoft-com header.b="OYkKd/Wo"; arc=pass (i=1 spf=pass spfdomain=in-advantage.com dkim=pass dkdomain=in-advantage.com dmarc=pass fromdomain=in-advantage.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=in-advantage.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b38-20020a631b66000000b0040d6a795447si15772485pgm.510.2022.06.28.01.21.36; Tue, 28 Jun 2022 01:21:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@inadvantage.onmicrosoft.com header.s=selector2-inadvantage-onmicrosoft-com header.b="OYkKd/Wo"; arc=pass (i=1 spf=pass spfdomain=in-advantage.com dkim=pass dkdomain=in-advantage.com dmarc=pass fromdomain=in-advantage.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=in-advantage.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343771AbiF1IUu (ORCPT + 99 others); Tue, 28 Jun 2022 04:20:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243947AbiF1IS6 (ORCPT ); Tue, 28 Jun 2022 04:18:58 -0400 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam07on2136.outbound.protection.outlook.com [40.107.212.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB5452D1F5; Tue, 28 Jun 2022 01:17:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=X1s44+BipLKdrqut1FOUESR8S0v269HR7qn0m2JfMCejN43qvpTnjUp2Pg9m2gcOYpxpu3T0MZ0SEyhRqsDanZwW7BmDGiJA/CwBpXiz2THubBq7xqx3Jxp1QCRd1iv+6bypK7F0XwyQcsvJ4XJ79FHFPDutkqTVwZ6XwB28JrlDP4oqIjuIdSEJVBDYVTeawuXs60hvOmqH8AxhHKadPZjqTCdd8Ncd7jVCWRAjQ15CRD9sYxrb6gGSM0Uzb+35t1YponmkMFkqPi6d/HyoM32Kw+Yzxw8FJxxg0fF4rflCx3rwr2jLsyKA34QhsMzQmfCD8ca5XRT9ALQRkeyvVA== 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=Vj88WRfFsVodv5LPCLp1LsJWC/szl038VLhyrxtp6Aw=; b=eN3TfcMg8ecB9nYE+OhbZBjDTX9uw5kGJWxBw326jLhghP2c3qFai/d/n3ngSI73m1DGqGvAKiP9PMX/ywx1a0BD+22iFXBzWPBH6wbTg6BF/fKcRKFcHLgircUnv0N4Oto/M11zYyqo3kRl+6DclLG5uUEFC6GP7r4G1q7+GM7USl8Tuhb93YkyMGhGdILsPMMO/JX3lmsWPiULlgNVSqmHMrOdNBgyTtjXZJVXfya4Jox7L7D2zcLMhDYcMc9pf3QFtPcT3K0H/panTaPnSV+8vNv3tJDnyOf1WfKlhulp2Qhe55j4kgYtJZtPTUw31Nnv37YU+0MGGOdnXtKb+A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=in-advantage.com; dmarc=pass action=none header.from=in-advantage.com; dkim=pass header.d=in-advantage.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inadvantage.onmicrosoft.com; s=selector2-inadvantage-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Vj88WRfFsVodv5LPCLp1LsJWC/szl038VLhyrxtp6Aw=; b=OYkKd/WoqEbzWXb70q5j68xdxMgTtujeEZaER9IfiCcHLfIDBYT5CF3QXo7QRO9i5LEn6zafODzjl+SNm2PoY6TfEjsbKpgAaqAytisZGyS3xJwa/Mn4p2Pn36+nx4vTfSXqWi5/NnEhqD+Ww7fDzM1PanHfUpVnS2aWPNobu3A= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=in-advantage.com; Received: from MWHPR1001MB2351.namprd10.prod.outlook.com (2603:10b6:301:35::37) by SJ0PR10MB5891.namprd10.prod.outlook.com (2603:10b6:a03:425::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.17; Tue, 28 Jun 2022 08:17:28 +0000 Received: from MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::712f:6916:3431:e74e]) by MWHPR1001MB2351.namprd10.prod.outlook.com ([fe80::712f:6916:3431:e74e%6]) with mapi id 15.20.5373.018; Tue, 28 Jun 2022 08:17:28 +0000 From: Colin Foster To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org Cc: Vladimir Oltean , Lee Jones , Rob Herring , Krzysztof Kozlowski , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Lars Povlsen , Steen Hegelund , UNGLinuxDriver@microchip.com, Linus Walleij , Wolfram Sang , Terry Bowman , Andy Shevchenko Subject: [PATCH v11 net-next 4/9] pinctrl: ocelot: add ability to be used in a non-mmio configuration Date: Tue, 28 Jun 2022 01:17:04 -0700 Message-Id: <20220628081709.829811-5-colin.foster@in-advantage.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220628081709.829811-1-colin.foster@in-advantage.com> References: <20220628081709.829811-1-colin.foster@in-advantage.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: MW4PR04CA0259.namprd04.prod.outlook.com (2603:10b6:303:88::24) To MWHPR1001MB2351.namprd10.prod.outlook.com (2603:10b6:301:35::37) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d04a2e34-2d5d-44b2-89c1-08da58dea3a1 X-MS-TrafficTypeDiagnostic: SJ0PR10MB5891:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: N0Z+mMToR2oZeYXQ9gEGThd6u5Y6+KS3XN74Vjq3SRi++7MdJ2LVI28Oa32QrTHv0f8L+DBTwDea7Z0i18K+vy32V2YDSKQbE5Z9EPIjcpW1uDQv5/JHaIV83broowQNQ8filwUiWob7T6mwPt1w+M6CCfWRxHhAS9jCu+Adk4kzAw3SLlD2N8ZhSDsASaCWLMDu6QEhsxAAKIkLPl9OQzUBop8zu7x5og6dzGr4YeRwPpDOOXrIpUJKIv405gDRn05cHZhU0duJBcesOPgLvP8VVI3yyzmc4xhQO9D59cfzc20IfFG7yrG5Lgx3cQkGy7IpDlRbWznXdmCjdSAx+H278DJRVB7C1WbfrVaVtwsPfMWaY+X3hQBSWRbiSSbzCIFJa4Stax0Tkey33Y0Wzt0SJ+jKU9iNXMPuKtOgB98YkR+e4hBa9Qsxp33wOyCHa3YaJ27NzU9HTW9MLPHNlkzRAWbQ9JFbMI3bmfbQVJbpr+Y39fygNE006X2jffR0EyMh5Kd1FTtFD9+G0eDkiLzthnvlBSFXoKuRPotBbNuUXCrt8fvka9x8ajH+yEsKBbujs3kHvCJ4P69X5qVlg2NZy5toybHkehalmGxWfZfOGfmxe+/AXuMTo7eYwOEp7M3IIP1dmetoxAewp4Hhmh37ayDgvM26Pp0K+DnQ9hHKOZrrDfpFmDZkdbz8JhBgnVqu3ZmH7pC89YpFB1N+TK96FGovPxzVFbelO1MeovkVVO0aBhgxkj6dGPYsn58d0yXTMBr+ULPLm/U6lht047cPe+G2/ockYfY8EQpW9+4= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR1001MB2351.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(346002)(366004)(396003)(39840400004)(376002)(136003)(36756003)(38100700002)(6512007)(6666004)(41300700001)(38350700002)(44832011)(478600001)(8676002)(4326008)(2616005)(66946007)(66556008)(66476007)(6506007)(2906002)(54906003)(86362001)(1076003)(6486002)(8936002)(186003)(5660300002)(7416002)(316002)(83380400001)(26005)(52116002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?6TiD9pnTU9Fiv4BVVdWXElLgfcWzUl1v/S1FktuBwtstw7NOtqxtCPZJA6fE?= =?us-ascii?Q?nGjZc7lnfICJYPazM04k54kY18p9nfWXdmVOXWMJgdaLhONkXkWS9CXg7skq?= =?us-ascii?Q?2evzmXYZQRmCtN61/kX5sjot4cljSt2/QN5/cpDYn7Gaq6jHfFlfZMDqVJoa?= =?us-ascii?Q?YL0ChRIAWWVkxLBODgIkGz4Qa6Qg8hpAQuIuB58Wiigapc7ow3k1LHr0cnd7?= =?us-ascii?Q?IbZECPDLWGvbSVhA9OMiisAZHsqQg767QdLgm/rpR2AkpS4i5S7df1V6XH58?= =?us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3F/eKO1w0YS7pl86ijT6ipED9iFLeyxoK3dA2//4qrp?= =?us-ascii?Q?z2BB2ODa1gmzIdY9imcoNgs+Tv3wztPM7oC4SwkWq3mG/6Dj7qpIUySUaacx?= =?us-ascii?Q?CYkzG7x8zHORPYgZ6NIQmjpHkjJHgv+Ba9dXoERXqKmAqMnPPuqEq8PoJhHY?= =?us-ascii?Q?wvknnvtbZTNRdSpZzZQHNCVLOFa98/w7buF9XHVWIYicz6R7i4E0a3MUALlo?= =?us-ascii?Q?MeFIUtt1TdIeVb7O/X5d+hyy160nZVvOCRkY8NUoDunbDp19P99tuoVfApnn?= =?us-ascii?Q?pDyD7RQLpjzSdQ4uU1VKOFrnUF9MJc/8F6IbyL/qVm5F9wmn4Xfb3yM4LF4Q?= =?us-ascii?Q?gDsKUZ2rdS4EPz05mdEHHzexLkr2BzTdCflsv+2StmXYKkTSTAhEZgGO8CEx?= =?us-ascii?Q?+hupXRlt9VdIe4mp2d1Z1F5J9+0lwN+OIHZMLyrEUrlc/84NJOGMV1sYjQYI?= =?us-ascii?Q?Fg=3D=3D?= X-OriginatorOrg: in-advantage.com X-MS-Exchange-CrossTenant-Network-Message-Id: d04a2e34-2d5d-44b2-89c1-08da58dea3a1 X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2351.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jun 2022 08:17:27.9634 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 48e842ca-fbd8-4633-a79d-0c955a7d3aae X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: A7s22QZou7VCfLBADuw1q3q39H9vlc06Fs939O4ocSy5aBtfF5E1KrJ/sIw8jptm3MpA4v7CXbzopS9jFVRst39C5QmnHNvfC/QpuQiUZx4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB5891 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There are a few Ocelot chips that contain pinctrl logic, but can be controlled externally. Specifically the VSC7511, 7512, 7513 and 7514. In the externally controlled configurations these registers are not memory-mapped. Add support for these non-memory-mapped configurations. Signed-off-by: Colin Foster --- drivers/pinctrl/pinctrl-ocelot.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/pinctrl/pinctrl-ocelot.c b/drivers/pinctrl/pinctrl-ocelot.c index 5554c3014448..655bada7cc4b 100644 --- a/drivers/pinctrl/pinctrl-ocelot.c +++ b/drivers/pinctrl/pinctrl-ocelot.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -1918,7 +1919,6 @@ static int ocelot_pinctrl_probe(struct platform_device *pdev) struct ocelot_pinctrl *info; struct reset_control *reset; struct regmap *pincfg; - void __iomem *base; int ret; struct regmap_config regmap_config = { .reg_bits = 32, @@ -1938,16 +1938,12 @@ static int ocelot_pinctrl_probe(struct platform_device *pdev) "Failed to get reset\n"); reset_control_reset(reset); - base = devm_ioremap_resource(dev, - platform_get_resource(pdev, IORESOURCE_MEM, 0)); - if (IS_ERR(base)) - return PTR_ERR(base); - info->stride = 1 + (info->desc->npins - 1) / 32; regmap_config.max_register = OCELOT_GPIO_SD_MAP * info->stride + 15 * 4; - info->map = devm_regmap_init_mmio(dev, base, ®map_config); + info->map = ocelot_platform_init_regmap_from_resource(pdev, 0, + ®map_config); if (IS_ERR(info->map)) { dev_err(dev, "Failed to create regmap\n"); return PTR_ERR(info->map); @@ -1989,3 +1985,4 @@ builtin_platform_driver(ocelot_pinctrl_driver); MODULE_DESCRIPTION("Ocelot Chip Pinctrl Driver"); MODULE_LICENSE("Dual MIT/GPL"); +MODULE_IMPORT_NS(MFD_OCELOT); -- 2.25.1