From patchwork Tue Oct 20 12:57:59 2020 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: 286531 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=-12.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, 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 E95BCC43457 for ; Tue, 20 Oct 2020 13:02:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7A9A7224DE for ; Tue, 20 Oct 2020 13:02:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="LropplEP" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406788AbgJTM7I (ORCPT ); Tue, 20 Oct 2020 08:59:08 -0400 Received: from mail-dm6nam12on2042.outbound.protection.outlook.com ([40.107.243.42]:21473 "EHLO NAM12-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2406822AbgJTM7G (ORCPT ); Tue, 20 Oct 2020 08:59:06 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EUdoOqYor5Hl+P7LqXNOqQbOQM+LRIc8/cwliAHRvjeqbjJUmXvVwNFpUUyYyHtkb9BtBqhlFyK+os7zexED8y28XFHR+xGeAlqHJVJf7lq3CEsR/VON+py/MCRoIwHrHTDoXZMpKkXKx0b5jtyRtB3I80SOR2u20bHqAAdIIb6bFCIBSH6+Lm+7+phMpBC2hH/K9xdp1yaJ55quRZYyxXCxAhfm4QNLptp8P5rWm9knQbnFJl3DVr+54EVQpTY56kH0Z+4aglAJSAcoJM0mIQwjJaXEWKuK4Xdy+8RJtF+iikX4WGoMVIGeiNvRlC+8n5xjqBFkYUuSKIfWYVSXlQ== 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=sj+FvaSzNUL70rljsFsFSy63ayCemnk7bCXXALwJfCM=; b=WaVxIclEl4dKr2WOrP9GQz4mRc5mbHG8E9h3VQg7E45yHcTqFggibUh3pExhAJhXs2tBMgBUDdDPjgMruITUyTAxfvvtsBAjft3Qt9Q0HoatXYveTmDfgqbDsBQBZ/XXf0YNAOAMhqCQHoEUe6KcQY/SPApworUDr6UCjt0d/GRK6QBdZElqyn/QppfJEyqE9TYH5cY80Nf1Ka1l+pzB9gejMux0zCuWVDfpl+QhiGSnljUTFupZN1BgBX0XBALhX2su2++Zq7MsEvV+u61h9D8SVm2WmlSaTsB1IzRKeotiyMy8CDZTrtUhOpOpBwfgwnfiHCenMiUT8xifpTW0CQ== 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=sj+FvaSzNUL70rljsFsFSy63ayCemnk7bCXXALwJfCM=; b=LropplEPzZ+t9iSMS/Q+2gja/V3xXQEqXP6gc82432n4VsZZuPf4UPOzxtSsuDpuGUDJ/84SoKD/mhaMieD6X+eHB976qthiIc2WmgJ/e88jJ2VTMhpbjitT4hVmB3Rfqv314pgmLsaACMRunXeEgkC7tOC6AMahOttXTcDcPxU= 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 SN6PR11MB2656.namprd11.prod.outlook.com (2603:10b6:805:58::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.28; Tue, 20 Oct 2020 12:58:55 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::4f5:fbe5:44a7:cb8a]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::4f5:fbe5:44a7:cb8a%5]) with mapi id 15.20.3477.028; Tue, 20 Oct 2020 12:58:55 +0000 From: Jerome Pouiller To: linux-wireless@vger.kernel.org, netdev@vger.kernel.org Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , devicetree@vger.kernel.org, Rob Herring , linux-mmc@vger.kernel.org, =?utf-8?q?Pali_Roh=C3=A1r?= , Ulf Hansson , =?utf-8?b?SsOpcsO0bWUg?= =?utf-8?q?Pouiller?= Subject: [PATCH v2 06/24] wfx: add bus.h Date: Tue, 20 Oct 2020 14:57:59 +0200 Message-Id: <20201020125817.1632995-7-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201020125817.1632995-1-Jerome.Pouiller@silabs.com> References: <20201020125817.1632995-1-Jerome.Pouiller@silabs.com> X-Originating-IP: [37.71.187.125] X-ClientProxiedBy: PR3P192CA0026.EURP192.PROD.OUTLOOK.COM (2603:10a6:102:56::31) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.silabs.com (37.71.187.125) by PR3P192CA0026.EURP192.PROD.OUTLOOK.COM (2603:10a6:102:56::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.21 via Frontend Transport; Tue, 20 Oct 2020 12:58:52 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 74aedc56-9e8e-4bc0-278e-08d874f7e6a7 X-MS-TrafficTypeDiagnostic: SN6PR11MB2656: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:421; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: l6j+YohVet8MKUpXfHlAiFdQ3jnmB8q3dAz2xBWiuJVBr4BUwsSoeuliy1BqimDolvAvnRB8aa63yy3xrnukKYwmya0gpPC4c61+XbpXdY8MTkT0OdSUlrUiNr5QsOln+hJv0B5dYWQjzva1+QXqe93YqNN3frQKyepTCwihkFbKa47XYLSsg2ME+2rdflyv0mUdeVRziB9yWMuiOwrhq8yXVefy3xs7OCq1RP76eBOig53bsw/vfSRmCWo/gvmUbkNzhQbTMstPouBsF1sDf8QxK8Ph2heSj806leMBDfvqOZv1E1SguCaZa5QCowhb 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:(396003)(366004)(136003)(39830400003)(346002)(376002)(186003)(316002)(4326008)(107886003)(8676002)(86362001)(26005)(2906002)(7696005)(478600001)(16526019)(956004)(6486002)(52116002)(36756003)(8936002)(2616005)(54906003)(5660300002)(1076003)(7416002)(66574015)(66556008)(66476007)(66946007)(83380400001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 6G9sEpBjfdj/Bl6OTZ5BvOzLRV6JY5bEAcYmurZxwrd506h0e79nQfmeuNsFHNKpOCfy1IzQAMnAaIqVA8iUbn8UMjgqwJPseEcBXfZX3VSXHvKS3S5dsmqcgRn2VXCVfdDxm9eFzurFlcqrv/kG4Jgp6NHZo7cHJnVpA5zLXkDiWJ8ZHn4145JNcFeRidnV5mLF7azUsTr/2DKxQrkj4ZxxT9p2gAG4mcmUgehEbr+TPTkOZo0RZ3BCdsBfPmV6kTqlw9ACd4Ov5zhZcodIU/5oYhm4f1Kaw3qvAWihb3HDwrfV7QGICKHvGyPZUxxrhuDQwgHJdGlYSWPLc0TBzchjMSotIU1fmlCH1d5fccrHlyXJYp9ih1PMbg9NLM7pIYB7mntAYSPmC1HjE5hJ7ICWb1hoom2xYBqvSQcxwsycSedPiiDRi+00N8YauGcCruJXdr5Sg49K5kXwwHeYkC16HC+p8EL6hsKiK18Zb5/rdq2wy8du8I25F0tzPS5+0xu/gWhBvDySqkvpV1IDZdS1UmmD87IUgUjBQgTdxE73ucKjl5mvwbVGm95lbAcJzWaW/GrKQoHQGrxfUQIwNrjSb+CYsrb+zxtyfBsD0XHiXoZ9kZ6BBgKxei1JCzgIYFYb4I5QNPth1iz7epnw3w== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 74aedc56-9e8e-4bc0-278e-08d874f7e6a7 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2020 12:58:54.9592 (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: GDIysAXmgASqv4SR/gGOR3ukkvgAhy9LIm6o9L/h27UtQCuCTdN2P37ScYn6LqXLUQtC/DNoMRdzlOIfrvK2ww== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2656 Precedence: bulk List-ID: X-Mailing-List: linux-mmc@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