From patchwork Mon Oct 12 10:46:30 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: 287820 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 71E7AC43457 for ; Mon, 12 Oct 2020 10:48:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0F819206B6 for ; Mon, 12 Oct 2020 10:48:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="gmS9RX9K" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387943AbgJLKsO (ORCPT ); Mon, 12 Oct 2020 06:48:14 -0400 Received: from mail-dm6nam11on2076.outbound.protection.outlook.com ([40.107.223.76]:59488 "EHLO NAM11-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387647AbgJLKri (ORCPT ); Mon, 12 Oct 2020 06:47:38 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Yp5I2Xfxc5g6Fl0mcvMK6r3l3u4kzEP3O8dXgiCS4cjyHtAo5S1eszdAyIfpnWsJ9yGXKq0B5unajZsPUQqoEbS16KodYyeQKswnHwkd9wKEo4jKGla4yqMDDdps1VskG62xCvO/H8JIvpb1PYHvMOy9TKF2Qy3AiKYe7r9E+ND0DO8L2/eYQ8N+GvvSUZdEeaXHTCoiCCwLfCqNow98bosZYDUwbn7z+uX6Y8KdDbr6yP/ES5WwGXA4Hw5FU8ba+B6u40YYgyaony3IhEwusgNOJkGI6r86HGRAPOXvFAhNgUI7xpSJ6ZxlYUFc/JuhJG82ybKSf1azrT4K+Ndjmg== 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=Cvnbxi4Rd65j6SMAf8QQEG7j2+Se1V0nUp+55LP1wqRFREKS9Z2nOpnEguIjE2Ts1M+UtQRmBag7q8ziL+yCI+zAyeFgEfWy4Pi9L+1kp5l7PnV4SGki3Cv9k3m1vjphNXwl3A8GgSjXB1oQ3MZA0Y1PufkFxKXXDqOzBvxFifJl+dXlHZOzliHd8mbvobA032RvctPiNkAhV00kqOnqYIMSyQeWLZzR/vhDAFL+W0I3oiJHl8rw8llEjNeDqxcw3gWCRql8HAE2bqTKgiTOnVasiX1C5GbqhgX9m+TUsZZBceeo7B5nQe5MMkt/7b4hEOj/+28HCPeW3HP10WUTgA== 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=gmS9RX9KlhKl0RKceO8KXrooFs42kReYJWEBJVrBfBOd4RIHL7/jHR51lsZyPgMI3eFUSq+KlJzlJEh4MQDzxq9euUhua6tkZ8t4Tv0Yme6qnDSElMvJM+flymSm4uDNQmwafVXi6SwlldbkxjKEbol5FlpwqzoEukrYkCOSQ7s= 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 SA0PR11MB4734.namprd11.prod.outlook.com (2603:10b6:806:99::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.23; Mon, 12 Oct 2020 10:47:15 +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.3455.029; Mon, 12 Oct 2020 10:47:15 +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 , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 05/23] wfx: add bus.h Date: Mon, 12 Oct 2020 12:46:30 +0200 Message-Id: <20201012104648.985256-6-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201012104648.985256-1-Jerome.Pouiller@silabs.com> References: <20201012104648.985256-1-Jerome.Pouiller@silabs.com> X-Originating-IP: [82.67.86.106] X-ClientProxiedBy: PR3P189CA0005.EURP189.PROD.OUTLOOK.COM (2603:10a6:102:52::10) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.home (82.67.86.106) by PR3P189CA0005.EURP189.PROD.OUTLOOK.COM (2603:10a6:102:52::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.21 via Frontend Transport; Mon, 12 Oct 2020 10:47:13 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 75e56157-e27a-4e9e-68b3-08d86e9c2ec1 X-MS-TrafficTypeDiagnostic: SA0PR11MB4734: 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: QlwIENSUku9CEEzsmC5PoND4QrVt6Oqjbb8z+BR/2Yk3v0bEJ3s72rp/wAHoJNmKPYyiH78BVzxzjb7Wscv5rxOVHHmmC6WX2kRO7VcVK63b4WAM2PpJtfrssYEDqN+jp1ikWpEWi49dNrhGpUNSskiIAb2aXUCCUrl0PpxMYQb2dbgtW+m+F0s8ieO/7bA57kDSgP3uaPFUYwyWzbMf3WZccTULMhqdql40jWV+VoqFYRTPFAB+Dw27p/guzE3e3vb4SB02AqwzTcuDAnsnPsepRJ+RvnZkrowIbUiAwvZihblXGBpvvfREkq6G+K3m 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:(39850400004)(396003)(366004)(136003)(346002)(376002)(66556008)(66476007)(6512007)(26005)(36756003)(66946007)(16526019)(186003)(316002)(4326008)(2616005)(956004)(1076003)(5660300002)(107886003)(6486002)(54906003)(86362001)(8676002)(83380400001)(8936002)(66574015)(52116002)(2906002)(6506007)(8886007)(6666004)(478600001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: sPbv9VrGdaXTwnbPr6nADWjtYZEWkmRR6bb/AQNb0C05iyhgHCe+kxENEkO3YRnaaISLyNgccXWtAU5Hi39K1mTDzfxoy1GmgprUIZSYrTY0kEeYC4sPtlYXYguxee/kD2pD4GXOxAsBNPMum6/rSMkuiDfVmEQFy27fgmWqpfkKXxi59HCpgV0p+BtC99T54hVJMIUS/xMDTUTaXq0HXgw3do+Lms+HsVyjxMySgNgk8PiaRtQzI/KsIRlC/1VfETJxTsyUcH6DOh2TQyHfNMAqFKiC9g/GKZhfNKovvMt+42XWH24WDi832+6y2krWnTO9Fu8XbHLxd76A4NOjNX2r7Zehzspk7zObVXRWwm3islLhfyDpF76d7zwqUPim5DJMrBIUL4wO+l/05OqXVgshqzuF8maBJzbWUiKXVsxAVMH1pSvGengnme+YFBhgXEg0kUVh3yVV8Nh80e/IuSz4N+YUzy98i15hHr58DNkd7ID9gJJ3Lo154u7r6FGISkNEj7gl9hj0NRrHeOq36C5fswO2xiSSJSOJkyzwnUmAcv6qiubd78TnTFVNHbcw7C5cbel5riAzh0MHfiyCFuHDXsKebO6LOsQFGl9kzU4BJx9SbjA4DiSeHJAYFNzKFOJCmkKQOIkUZOTaREm16w== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 75e56157-e27a-4e9e-68b3-08d86e9c2ec1 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Oct 2020 10:47:15.2725 (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: 5FfGzmN3Zn1UIhrzrhxzdVzh4mHUId/+qkqhTvwubuOHfjx6KSFSXCYdkxumlFoE3frlmtaDDGOiqFBiu5iy/Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR11MB4734 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