From patchwork Wed Nov 4 15:51:49 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: 11881297 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 21F43921 for ; Wed, 4 Nov 2020 15:56:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EE91022280 for ; Wed, 4 Nov 2020 15:56:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="S9QWxj1X" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731006AbgKDPwx (ORCPT ); Wed, 4 Nov 2020 10:52:53 -0500 Received: from mail-dm6nam11on2049.outbound.protection.outlook.com ([40.107.223.49]:54240 "EHLO NAM11-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730968AbgKDPwu (ORCPT ); Wed, 4 Nov 2020 10:52:50 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JfWtwCOj2zowsK7OAdtjdinK+3UYpuphK1yRgzZbjvDTBkwbioM8ksItootBOIjtCG46i6cDAH6rulJ5mYVBDwYKnZtKy4rW3qYnPo6MSSE2aJRXyXczo7FYYEUxuQfxD4xZl1cPQeyVCO9U5WA6GWQ4/IBqGPdfUZSfDZHotsNCJAwIocK28pyNUp0Z/rLG6CqB+YEZHp2N3OZdsEhEMc9L2Bh0t+wlAdRKsEEtgGmlDUy4bkTFk5b2UbNrCcS1C27k01u1VhhAbFMlxLGosjiMCruimXdvOutTd2TEZaboneRkyYjfgZgZujFnztQR5fqtZ/65/ZhmUhxutwrBCA== 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=A08+8mPSB7gt6qLgBzL41XN4HiY26PE3e1sIdDR3goyajd5o9ZebNfo+HXzdOeUlxwXdtkkn7tzUfwLBtyc5hku26UIgFeI1tse8TRmH0N0z4efNHkIP+LBfmgWDc7447ddTuuj6dyeByX7Ui543W1e/KVuloLezQbXFXXh0fK0OX7mWz9LmcQ/6fOp1CmtiodEolaHr3E291YIRVs+whg8SeEDfRq8vy0biiRj3aT2oVrMbIUFLefk2GhPPYL0vJmJ0IXIpkWD0JMABWB0jWgkodlZyOVwvQ0sMkAhnEqIMN75TAIvBA8TtFEvibtkmAAmSWg1+5LFJnS6aOn7mow== 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=S9QWxj1XaV4kZsTR3MT8jyaTRhx5FHsHIEUZYPQmHPCTDT8VOeguncloqakcYnqSQWB5gIU4GVrAD/g5FP4mKlxyl5XXMI7qLoDLiGE4N0jNotB6Xv4UVqhnzlC+sKn7Gel7LUikCR3FycrQtG6pr+h6rxloiwyfg+GIpFms2q4= 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 SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.32; Wed, 4 Nov 2020 15:52:35 +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.3499.032; Wed, 4 Nov 2020 15:52:35 +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?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH v3 06/24] wfx: add bus.h Date: Wed, 4 Nov 2020 16:51:49 +0100 Message-Id: <20201104155207.128076-7-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201104155207.128076-1-Jerome.Pouiller@silabs.com> References: <20201104155207.128076-1-Jerome.Pouiller@silabs.com> X-Originating-IP: [82.67.86.106] X-ClientProxiedBy: SN6PR01CA0032.prod.exchangelabs.com (2603:10b6:805:b6::45) 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 (82.67.86.106) by SN6PR01CA0032.prod.exchangelabs.com (2603:10b6:805:b6::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.19 via Frontend Transport; Wed, 4 Nov 2020 15:52:33 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 21f4aa8b-acf7-4b94-28e2-08d880d9a5dc X-MS-TrafficTypeDiagnostic: SN6PR11MB2718: 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: guQPnc13TVkt1jEH8uZDxPqh0uQCjDoLRnd98SFgUAyLOhZICYvveyBKrPpsELsoafaTSvD2Ot1Rq6pbhBZ8UyKWKB3ArgW27/CM2EqAq8/maiUatpS4O17Y+Jowlh37BCDLnQriyvPX2DG4TmR8IQU18D12pmNeJEcSLLxpduBiB8ADt1nWXmwSqZVIV0bWINsfgwEI9yS4fULw8ZWiUwxRuHoj0bbW3JfRK/24DT3+n0U4u7+bLemNv0CNj+gCAgV5vJrXtsIbMvuSePBoCjaJsGD3xMZ2nxr9009GTJMwACZZsbW57JqS5dTEt9R8 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:(366004)(346002)(376002)(39850400004)(136003)(396003)(8936002)(478600001)(186003)(16526019)(956004)(2616005)(6486002)(8676002)(66574015)(66476007)(66556008)(66946007)(316002)(7696005)(6666004)(83380400001)(26005)(54906003)(107886003)(36756003)(52116002)(7416002)(4326008)(5660300002)(86362001)(1076003)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: NzWtIhBtHBMXCr0DfxFFvVTI0jhdmyICA+vacrOKByjlxxu1zY/KGXCg4HI4wxxqpd/qEEDcCW9g0nNWzECySTUnGvWDFk+9jjvQzqKQkibFrcJbgQViOgn8imp/FBCSbO+LYd65calIytdvzM1Yorm3Hv29Jzua6dvQaQPrSBdW3uE4+k4zGU+/FQLMNFLyMuvSb4v5DMGEg7l0JLttn3O94FMTlPaVnLU99YHFybFs5g9x1EIy1zRAoiQiscYc0+jnALuVxhnEYqFR8Ud5zKlhIqKz94G9Pf3gBdpH+uRh+3EekQed/ZfGHh0Qvj8I3MKjf8xmmq57rlOOeLpu819p41ONYpWB/ZgJRnlsiegDH+y/YGfr96DlLX7X/OWzFqW59s23tXT/yZmDdnDRyiTe03/1fgw3N7bJUMysBs5Q9KY1wXCvbOPHcig3CEZfxAK9nWXPKGYR1ZpO91QbtqK55FQQxecLuNzknHoMcJzPlxDPv9F9qtpAZ/tDm4snuZD7lEDzlCCnFQl9OdilTdcjgmVw62z0ydLLzjmTgPyY9E3zJqtnvmb+pXZ0KVhxCdnsgpafX7QUfcqL+DBkKKJPHwIBYP0fz0iJFuSrNda956ob++0Ln+OnXCZAttz9N40MRPxLePtNQmQofvxJPg== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 21f4aa8b-acf7-4b94-28e2-08d880d9a5dc X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Nov 2020 15:52:35.4621 (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: eA55/wyzM/SiyRMkEHFf2y+h2t/AFJQ3iz7LVAy28+2Uu/a2rVfXPheo61i4CuJO+UW4CtMuMYgekUB5rhbwrA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2718 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@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