From patchwork Mon Mar 15 13:24:43 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: 12139403 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.8 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, 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 41DCAC4361A for ; Mon, 15 Mar 2021 13:26:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C3ABA64F01 for ; Mon, 15 Mar 2021 13:26:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231156AbhCON0T (ORCPT ); Mon, 15 Mar 2021 09:26:19 -0400 Received: from mail-eopbgr700067.outbound.protection.outlook.com ([40.107.70.67]:56801 "EHLO NAM04-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229602AbhCONZk (ORCPT ); Mon, 15 Mar 2021 09:25:40 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fE+5oYpb+tWkYgkvvd89AT04QelJfbBBeRcpjmMcrGmNMaL/EOfoYIy9JxGcf6qX6zc4siVN2xJ92X+aT7AhWJX4/yz+yiPkz9HmyGiXZyHgdddCn4we5XPYUbVs36JY600ZVjSbVURhV8KP/b+bdJ0wAkz3YSSusfb9aQJBgQseLWOA6sZN2tx8BP9KGEMQJl+lcNu6JpN3IJLu8llQD+sSJ879rvvlVttQ69UnyGAvaXucrWlQte89kdEsLm1/f0REfLFk4qrQDNMy7r/bbFcSpmUVHwMSO4qYXw57wa1goBwFcMOAK7tl8h1Zjn25iZqyMC4RmxZ1Naqu92n8fg== 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=U1LoP48ZGSd2f1U07K/MUUWnOqW+uQqKdD4TF7rzSgI=; b=jl8kSiCtvWKVKLwX6hnBFAJuLIVHIuZ9FYREeoa5XJ0HJxizss0qzA7IpiDtxqQFrmcbal2e+6IHVJuMrr32JIZPYE3UxmrxZwSbCY2G1V9mqUSGaYCeSpQdTaQe3Pr2aq0lqa/DoL5BzqlGFGNlkWr/iBAB9X58T03qoLd5i//Pfy/wuygba7U1OJjNWoAuxrzW/0wwAmbMwL8X+0TzO86AN/LCwLFahP4cEu9yyFYFatjrAzQk4BBZ52+J/imfcq478h20Hrkc9Zn7BuxACOr0d9CugkV+KJhQESm1dLkL16dG3vPNA5nMtM8usKzkM/5M7rlwNSWnncVldyWnhA== 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=U1LoP48ZGSd2f1U07K/MUUWnOqW+uQqKdD4TF7rzSgI=; b=e1Jj1SSiIkq6LZ2G4GNUoI1jvhpYdNbQaDWhX+/5g5TrK4feREbHo8fY/FHS5aneCulL9m9GGud72ux4oWmbXNt1HsTse/253Ii4HMZlBtqjtgXdWtRqDVMeXCxjgA5WRyVHxLAhkOtGXKQ6IRpyqjFD2/A3cVM3fEE7Bkk3KDU= 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 SA2PR11MB5099.namprd11.prod.outlook.com (2603:10b6:806:f9::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3933.32; Mon, 15 Mar 2021 13:25:39 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::41bc:5ce:dfa0:9701]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::41bc:5ce:dfa0:9701%7]) with mapi id 15.20.3933.032; Mon, 15 Mar 2021 13:25:39 +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 v5 06/24] wfx: add bus.h Date: Mon, 15 Mar 2021 14:24:43 +0100 Message-Id: <20210315132501.441681-7-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315132501.441681-1-Jerome.Pouiller@silabs.com> References: <20210315132501.441681-1-Jerome.Pouiller@silabs.com> X-Originating-IP: [2a01:e35:2435:66a0:544b:f17b:7ae8:fb7] X-ClientProxiedBy: SN4PR0801CA0014.namprd08.prod.outlook.com (2603:10b6:803:29::24) 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 (2a01:e35:2435:66a0:544b:f17b:7ae8:fb7) by SN4PR0801CA0014.namprd08.prod.outlook.com (2603:10b6:803:29::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3933.32 via Frontend Transport; Mon, 15 Mar 2021 13:25:36 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 66f883dc-52e2-48c3-61f6-08d8e7b5d305 X-MS-TrafficTypeDiagnostic: SA2PR11MB5099: 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: fHPfcwLN4JzhKqGyNM82hwpHgzI7z6gka2tqrOoUgIGNqaO7VZY2VziWU9VKbaxTgCP/QeU13VGZ8SLe+anCGSMeTcAlnbPsIYoo6qp6bp0dO3SSNlr91VChFpJWJuShZmkNl5woLLCgL58KkK7tLgkQ583ql9TjJ/PYTfnaTzaH5Q3GogWKjdXxbnfHWBj+UOPYFGTU/eWdHMvWGvP9BKAU/aYxOSbhgc5fU8iury/AwPRKSRkjSf44OjWUQ9D458pNLZIoNTgrgoNi5DTpzqarQK6wv9uwF05jJKojG6bLYW5mEE5F5AlKvu0otg38vs6BtFBA7E2d/8KTv0nwahf9Fq1NsmgZrBlDSBy65aS4JvzLlLhHb5EfWJLJkNTUoMtkeQgPfi6JDXPJP0xmJ7wsAvIKy1Jl51eUU5hLD/5MrpFlOi7G7bEkOACjK01xd/omZtcGZ3t66vVd0zvAe4GgYM+EQnJc08QMHJYL3fhUUI98867HWztnodIP/x9Dku5k6tN/YLm7/TfFdLJRxvl1c4ffpomJtT2cPGzSjbeESDmoe8zpDHXqhpfq8wEE 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:(346002)(136003)(396003)(39850400004)(376002)(366004)(186003)(7416002)(2616005)(107886003)(4326008)(478600001)(83380400001)(16526019)(66476007)(86362001)(66946007)(54906003)(66556008)(8936002)(316002)(5660300002)(66574015)(8676002)(1076003)(52116002)(7696005)(6666004)(36756003)(2906002)(6486002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?q?tOMssphBFU664ZBROiqv+4IJppGNhI?= =?utf-8?q?vMeJENECKnB7mH2X7fHS3GUvmHwXbe/Cv6ZOEkpkjTJex6gK4PlMdAfrhiL4utB9I?= =?utf-8?q?s23FtLELvSPBq6ttloSxKe8aEjrv1MyZbd47Ak45stRYK6x5LyryfCCp1u7PNKrde?= =?utf-8?q?9L1WgA/l37Kmaz0h2lW7nrsw3roOThfz8Clp6CwSBHnjY5/+2hjDYh7odZFUiTYXC?= =?utf-8?q?ywkvKCb43vv4ymfNHGuxz7J+TKW3jUua30z5aBrqJed5GrgAR5fXqwNksjfHX4GGb?= =?utf-8?q?rDAfVpNNcdj0Ufjr4do2eCOl+p5mja6Q1gDgM3pXOnNOzxfJ2LdLWvc7gHTSeDoIE?= =?utf-8?q?VxcvU/0KNr0Y7n0n3Fn3VvXpaBXv9CI9dlYd8B6EnTKyH3NLN5VCfe3kYfY7xFmiZ?= =?utf-8?q?rZzIXet+rgeCk9Ii0koYYtNCG29hDcqXPSTnwUhDRq1IYY8bjG0RynAYSgGiLtXXU?= =?utf-8?q?KF2aV4u/EY25AEwxsaQbynjU3RGMCx3Nl+BZQhINjssjc+vdmdWNKg5MdqFUWiD9J?= =?utf-8?q?+fRtQSvH4OSse0FiSM3iYtPTzbJVZOEyTuGXghnjGNApOfB9S1ykMA0csUk7mxr2g?= =?utf-8?q?BNeQRBX/nSzxkxpZsazbU5SWLtm3xWkH7nVYvjU79RM8iQ9EJHUu6TEylYzHFG7y/?= =?utf-8?q?z8KRdg4hHCaHFBbxh9DO/KdnLE+iqQBFjqWwlHbLYAJsj15HkgDBYDNTJlUwVTn2B?= =?utf-8?q?DjGKJEAsQL29v24G777Z7KmxRTKfFHa9cQtURNpP51iUq/NLdHvyWwAYPN6OYz1vZ?= =?utf-8?q?Ega4WLsKmGsQH2uLIec0zev5I9xbmapKG3e+NeM0z46eTz5Zas7LGuITXo2Gwk5nz?= =?utf-8?q?EhG12NY7mjMYJOCOh0sUAbYkIVYbdGaju0SSyN0ouerYXozvyn1uyVWXjn0U74snG?= =?utf-8?q?AfDEkjBJJxuuks1ZNYIvSgB49EdRZid/RneXPfEAv89Z36L9HR0Ny1mWPnwaQ+M/j?= =?utf-8?q?UtA62GT0H3o9tqcYOJ9ksyLX4V95mEX0mYgNNw8qTYtyTksQYV8Dwuut6kMgbHGwY?= =?utf-8?q?Dg+YYYRs0P5aIhj5yCms57wNUsxK7wLRVd3WE4MP9xG7dhfHtb8qIXgXFodXO7lVr?= =?utf-8?q?amu7EzXGxkk4U6hpWdH6N7bGslrHDrzyMt8DlNgmCZ6PTjvRJ7O0WafdNPngFhdFX?= =?utf-8?q?V/hGcKTgoUVKrpMhLTC1Ue5tU/r778bgGL8tDQAOs2AX10yXRGL84LjEcec+31VNZ?= =?utf-8?q?2/lMXheHFlt897oUP5TEgUCAC6Zpcwec6Xx6WJkD3oCT49TRxGqtBRQx/H9FhS6l7?= =?utf-8?q?VTE2KySusgGkVJFcPh0xjzOSrbAK5UNSiE+oYmvMdvBXQGkJ34wCY26+uACoPrB5W?= =?utf-8?q?yw7BBvB5Bhaef?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 66f883dc-52e2-48c3-61f6-08d8e7b5d305 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Mar 2021 13:25:39.0855 (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: iAbc8acNpYzeiye5uNBTvIsvSqp/A+6PtsMKZAqe0bSR1YwJirWubRUdUsxRvytXQ4ZY88V5h+X2R9QZgDgKxA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB5099 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