From patchwork Fri Sep 17 15:13:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 12502553 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 43AC6C43219 for ; Fri, 17 Sep 2021 15:16:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 287E161248 for ; Fri, 17 Sep 2021 15:16:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344479AbhIQPSH (ORCPT ); Fri, 17 Sep 2021 11:18:07 -0400 Received: from mail-bn7nam10on2088.outbound.protection.outlook.com ([40.107.92.88]:46465 "EHLO NAM10-BN7-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1343723AbhIQPQv (ORCPT ); Fri, 17 Sep 2021 11:16:51 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QfpU3TzlfSJQY/5GHZv9y6Desmm3yVLv8YqJ2u0hLlf//1Wc8XipRhqneNRSgMV7DKQ/Ev2YwGZd2exLXBQ3rnU2wFfZMP04wfgMZ7DDMhoDJPnpwlKvy7vl2tgYo40fwYr59P7X/RRrYLjMSnoUn0o4oK8rJAGjjL1lrt9i3s+gcgTTodfjzY7xjdX7poWLukHKjvxhE85v0cFjhRGEzlzqcH900Nop5u6dAtu9+cMiAfV5POICohcaAOr+oNMgV9peAmgilfOkLimuzboZ1Rg+fBtlymIxRXyo9sSDr1kc8KS6/ZHHKxMepmp4E3eiF/2Pj8ClgpnnXAA9uo6+Bw== 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; bh=51XqWHJtByRQLPsnY3wtzpUPOfwDveF+8mA8Bal+JXA=; b=jBUeUWQ3h3tSELxfG3BxXxeT/KotJ+kFroiq8wpMW8o02nBdJ5vwJOMMcOzBdOGeJhnccsJTRIKRbdxqkSp3pmawSkccPD0g8Je60b8APpZxMbbV0Shyiyj4dLCFigdSg1AWGk24qxOxkcoysoO4IdoS880a+Fk2dH3lkGf+uIFSZ+zwsz+j4vNd3oXmhq6Ysyb306QSRhJ8xm7IT1uzOey1nvt9ymjgzP59ER+nRfEyMLjCfxcU/FCBPuH8fi1X74JLohAMIrW65PdJ/jVNmbKh+LkH1Iur6TmGSuct/4MaVj9M+6Ue74RrkhJaJwXUXrxZoy1hR+5oxUVNIkfgpg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=silabs.com; dmarc=pass action=none header.from=silabs.com; dkim=pass header.d=silabs.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silabs.onmicrosoft.com; s=selector2-silabs-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=51XqWHJtByRQLPsnY3wtzpUPOfwDveF+8mA8Bal+JXA=; b=WYrna+4j/+yeRhGVVnqRmhf2PE1cQ9tQ/vCgLCA1XaRhfbyS7PqWBLbuaHxk5jZwRUyTp+txogKB4Bklvc/Id879CY/bKz3YuvJhCljk7oSmGxN8ntee826OblgZ1LlP+1JjBo5A39H+hLzS4ed/8F4fUeKrJf/fvMz7N38dAsY= Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=silabs.com; Received: from SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SA0PR11MB4574.namprd11.prod.outlook.com (2603:10b6:806:71::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.14; Fri, 17 Sep 2021 15:14:33 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd%7]) with mapi id 15.20.4500.017; Fri, 17 Sep 2021 15:14:33 +0000 From: Jerome Pouiller To: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, Kalle Valo Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "David S . Miller" , devicetree@vger.kernel.org, Rob Herring , linux-mmc@vger.kernel.org, =?utf-8?q?Pali?= =?utf-8?q?_Roh=C3=A1r?= , Ulf Hansson , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH v6 06/24] wfx: add bus.h Date: Fri, 17 Sep 2021 17:13:42 +0200 Message-Id: <20210917151401.2274772-7-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210917151401.2274772-1-Jerome.Pouiller@silabs.com> References: <20210917151401.2274772-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: SA9PR03CA0029.namprd03.prod.outlook.com (2603:10b6:806:20::34) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 Received: from pc-42.silabs.com (2a01:e34:ecb5:66a0:9876:e1d7:65be:d294) by SA9PR03CA0029.namprd03.prod.outlook.com (2603:10b6:806:20::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.14 via Frontend Transport; Fri, 17 Sep 2021 15:14:31 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: dea0b8e9-df1b-4abe-5298-08d979eddad7 X-MS-TrafficTypeDiagnostic: SA0PR11MB4574: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:421; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MV62SnGooTwdJRsGV/IqegAwmXiVgXDqx9e663NaNURlz1vnDxuYl49f0Tqk/RxO5RvOUieCo1fcJQhC0gschEAON9lmx2BgESDZo21h+BZ1ecBRfkAioyGXRJsNPGw4KyxJwX9dOslo0LRE0WZbO4zIesVOZ1IaDi4aHzoKPweOV3t2eBJ8cdYO3T8K47NcIeDkDkqyMlKN4s5PmOyKc2JMTTOBtg6ciW9vgAklGp0X6ShLl9MYVYac21GdIXubOzT12A0d13aExwVqi+2+Ub/ro37ugTqlMinhw20IvFdjpAa3bj7i9Z2GQSzwni6yVgpJTT24hOjAo6U/jmkShqxeBdJjEKK2cBFaF5j4ZKWHFyu0/hKMQmaGCFFSzObqnf4lQXGJKFB3J3ZTLeIEXpXEfuZjc+YQQePI38IzdI6JSk33QQrd5vSlzsqImfBnMZ4WTXvvntNxMf1nrTxGp7HZP+w2+3Qzs6u94D63J9gVFmDbKZgHK/U+d7raY3Rfy5C/feuFbhWFzXBavh/YTT8IiIZKaTN5GZqRf96uqqdfJk3WsCtGSol9uik3JPyYyCS7K9+vWSqKvWW6PlYQ6qEKDuBCfswL/wFtTztXNQxog7gPmIarp25AOuZgBEBhuZxZfpt7QiEOHf/nCfUpJA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR11MB2718.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(136003)(346002)(376002)(39850400004)(396003)(366004)(52116002)(6666004)(38100700002)(8936002)(7696005)(478600001)(6486002)(186003)(7416002)(86362001)(5660300002)(54906003)(66556008)(66476007)(4326008)(1076003)(66946007)(2616005)(107886003)(6916009)(316002)(36756003)(8676002)(66574015)(2906002)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?iQklq8OEUVY6z9PbgDhjz+A5uCTt?= =?utf-8?q?mVNmzuzVz1Rb9snXuCns4MpBMryWrVE53VbiOJ7zTMxpIDIwO6XnSPmFA/fYPh0tN?= =?utf-8?q?ENASYaA84mmVNMcCP9LvPZWX4yKIo38BMUIbWfrI7ABsmSnbWe9r0MeLD7B9zNAiC?= =?utf-8?q?svd1pha3RtuCPU0z95+/vXMbH/vQhoggDa4gbwaU2wMJ7LyuNdalj+v4y/zlPpn6l?= =?utf-8?q?mxES8FCJrP87dkAhHLa9lfnTMBqAi77Yb0IvQlq5u5d4PxaE1J8x8eob82+kCkUoS?= =?utf-8?q?MdEZ8L9AXyFO4QbZuLx22AKIgVXL2va4TY60Uoz0K9b0mzK0ZThsqjsB71oGHEghj?= =?utf-8?q?UUeT+FThYytGt8Pb2firasWNcym7DjSvuVYWNnLvuiaR3ridP3mLlTnSAyOjs7VmF?= =?utf-8?q?a2d/FXSRPtM1VbJY/SOKTosE3T6lpbYijGy7621vbKSzC1inzR6YCr+NMjeKH2jim?= =?utf-8?q?+xYXbjWYD2MTFG5ggtGz5p7IAgJ3ziDrwHpAAnSP/7Iq1/nM4ZvOzIJw/8ENa38X6?= =?utf-8?q?wcRHEvy9ePaLHqYRx/klgJO7CGqscnVqwle/Ucxumqe6MkRRgWnkRu6o846vhBOf2?= =?utf-8?q?JcVk88XZ7fGeSV9wA9KXiFaN+jUXvnj5CT2PM2FpvabZmFAgdKkgkUovy+Tqhyal/?= =?utf-8?q?V51Q1uUj6dRF6NO/zjGR8toHAgyxiDkwaYPdSRHWMxtJwKOUunwrKVMTB7h5moL62?= =?utf-8?q?u7BtsWn0v1ypDiJJlL6BeVRJoP29A0DbsPdHY3l5OTNY33aitCsiQC8jW7w4Fn+VZ?= =?utf-8?q?70RVYeeyHg4zRgYc6MSjGfT/UNYAZaBBczBC6xnGE8oZT8rJRCuN25wgn0u7I42hi?= =?utf-8?q?GyI5Rl3Fy9Rh43rvBrTb51bdFxgR4EhMYerxEfIuVuIcmIvRGM1ReF5DMNv/Mv5B/?= =?utf-8?q?z9wVYSh9iyG/yQyJpDCAgWhpzBARviJZQG4CwLSVji85+A5vKOYad9rTffDhpiaIH?= =?utf-8?q?uYSfrnzVsMcxaNTZCvOparVUUD+zVqbcAR0U/2sjQPUN07/9v9JPg21ZvT4PAhxkL?= =?utf-8?q?/wkTjAVxSjpSKQp7JwNfSfdbNRcESlJnAm2yRycmxHoBrBfxVyfmAHLbDhC8Qvncc?= =?utf-8?q?gv5wqoC4/PC63e3faQHY923WoiOR4Y/PYlsuWerD8pHstxT2C2CnJSihqn07hr7uj?= =?utf-8?q?bI0SAOI6zFfLrdqnNp0sQHRv/rAo6/5zbt9fLnE6MZT0w5OcEcIOuHC3BtOeQxEcO?= =?utf-8?q?+lE9N+QEVILNrKIddtFl2+J5KbnFwwetvUebsY20/jKhEZFYRmL40iSR3lpujMSWg?= =?utf-8?q?0hhSw5Aq6zyMQy39YvGz3j6V7BdCj+FurJcNJxzGwShBi9+zNMWWkLrorTklLsWm7?= =?utf-8?q?WvFSqh2tiK6eHce?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: dea0b8e9-df1b-4abe-5298-08d979eddad7 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Sep 2021 15:14:33.7249 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 54dbd822-5231-4b20-944d-6f4abcd541fb X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: sHkqzX8EOhvX5b8G6qnv2UvneZloMrZbeVChiW1kBlTi/wjTuQQ+iH7LFuwwiB30zCiYlI0m/syCqngBocU01w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR11MB4574 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller Signed-off-by: Jérôme Pouiller --- drivers/net/wireless/silabs/wfx/bus.h | 38 +++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 drivers/net/wireless/silabs/wfx/bus.h diff --git a/drivers/net/wireless/silabs/wfx/bus.h b/drivers/net/wireless/silabs/wfx/bus.h new file mode 100644 index 000000000000..ca04b3da6204 --- /dev/null +++ b/drivers/net/wireless/silabs/wfx/bus.h @@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Common bus abstraction layer. + * + * Copyright (c) 2017-2020, Silicon Laboratories, Inc. + * Copyright (c) 2010, ST-Ericsson + */ +#ifndef WFX_BUS_H +#define WFX_BUS_H + +#include +#include + +#define WFX_REG_CONFIG 0x0 +#define WFX_REG_CONTROL 0x1 +#define WFX_REG_IN_OUT_QUEUE 0x2 +#define WFX_REG_AHB_DPORT 0x3 +#define WFX_REG_BASE_ADDR 0x4 +#define WFX_REG_SRAM_DPORT 0x5 +#define WFX_REG_SET_GEN_R_W 0x6 +#define WFX_REG_FRAME_OUT 0x7 + +struct hwbus_ops { + int (*copy_from_io)(void *bus_priv, unsigned int addr, + void *dst, size_t count); + int (*copy_to_io)(void *bus_priv, unsigned int addr, + const void *src, size_t count); + int (*irq_subscribe)(void *bus_priv); + int (*irq_unsubscribe)(void *bus_priv); + void (*lock)(void *bus_priv); + void (*unlock)(void *bus_priv); + size_t (*align_size)(void *bus_priv, size_t size); +}; + +extern struct sdio_driver wfx_sdio_driver; +extern struct spi_driver wfx_spi_driver; + +#endif