From patchwork Tue Oct 5 13:53: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: 12536795 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6E428C433FE for ; Tue, 5 Oct 2021 13:56:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 44C33610EA for ; Tue, 5 Oct 2021 13:56:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235858AbhJEN6n (ORCPT ); Tue, 5 Oct 2021 09:58:43 -0400 Received: from mail-dm3nam07on2066.outbound.protection.outlook.com ([40.107.95.66]:60512 "EHLO NAM02-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S235108AbhJEN5v (ORCPT ); Tue, 5 Oct 2021 09:57:51 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Z+rdJUyrJsiUjjhrSmCTKABReUTe1TgWI+EsILWGysOrLYxj2O3qOEQe1ZKFDFqabCeaLD/ehOihKezAxi0Rkv71Aak4+ZiGac9IjTSHpqZVlv951yhoPR6joYI+pmri63z7WaQ2r3GAlYegdSwYJuP6hOS/dimF7sYgoRzIdmLiGsd3tRTI4Lg6EJ9ivhA0vlXkcEQMef9/hk4MEjd+AnxkxCYgRAhxHRZS4oR7wdJcnrJXcQ9t9Go3G0xBpRxl49sm5ukPhEztLAPkaP1sqkSFcRU+2BKLgeKqF/pR3M2baoOGoox0s183+w87BHP5aPCcm9h0OxHdYuKZJoxYYQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=qIcBw+CXFbHocWcIz5G7RvVUqP94pZAy4g3KTZUqhx8=; b=ExolxzSTHK2ID+ReaP7CsFSHubpyvTixJXL1NG1NkNMkI7ksO69zQLAra6LUfB4Q+vJuoME5kUYPvoPm7G+1kS3Qa5Hc3ighii1dONX0lIxys9PTIdTyP9X7rplRh+SDOg4P82Vxi162Am3hKrCNuB6lS5k6kjb0JDpUC9arq/6uj7orQKEmAuDAeqb1E3+T4JuNpVE4EH3Qjb6hrQoxQU/6K77fK6cHEYBhHR3SWoviCcvY+xsXS6rgx/xXqcGReF1dntCR2H73R7QBEo0mdRdj5Xq0q4k0RLakk+tdjmVXfAxGTNs6IOywDhaOE0SxRf5qopxmvjyj6lGWiAV4aw== 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=qIcBw+CXFbHocWcIz5G7RvVUqP94pZAy4g3KTZUqhx8=; b=c7CvOsKjPGSy+J6UfQT0OjZVfzi0iHCSiCojvDdt6oNti3KNdECqTM4YQB4R7hmtfLboTxl3ceDGZ7a5pTC0yI1WdtbMF9n3X59+5+vt5l0b62A5oWouVoheuQ43ysD2tXOgTOM0ARpppz3BHXeMMBkaRgWyO6fZmiMihyQvA9w= 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 PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) by PH0PR11MB5643.namprd11.prod.outlook.com (2603:10b6:510:d5::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.14; Tue, 5 Oct 2021 13:54:37 +0000 Received: from PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::31cb:3b13:b0e8:d8f4]) by PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::31cb:3b13:b0e8:d8f4%9]) with mapi id 15.20.4566.022; Tue, 5 Oct 2021 13:54:37 +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 v8 06/24] wfx: add bus.h Date: Tue, 5 Oct 2021 15:53:42 +0200 Message-Id: <20211005135400.788058-7-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211005135400.788058-1-Jerome.Pouiller@silabs.com> References: <20211005135400.788058-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR3P189CA0084.EURP189.PROD.OUTLOOK.COM (2603:10a6:102:b4::29) To PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) MIME-Version: 1.0 Received: from pc-42.silabs.com (37.71.187.125) by PR3P189CA0084.EURP189.PROD.OUTLOOK.COM (2603:10a6:102:b4::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.14 via Frontend Transport; Tue, 5 Oct 2021 13:54:34 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c7dfbdc2-178e-43b0-54c7-08d98807ab43 X-MS-TrafficTypeDiagnostic: PH0PR11MB5643: 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: /bn52ewJUvcBY5F4xBg8so79Lh96fjXboyHblgZO17zd2lm0eXPiknM+Mq1B2ml+V2ljF9rfcu0/u7cHe9ZTeWUWdyRpWIvEmrZnRry0c1n6FaO2ODV4wdU2UITndfjkOXlxNODFx+acC9rT/nRdp+3gzEKNOl4hRKOQ+y/j7U+AU5RNMSTesnAMYijoPPQZasG14mdh8l3ZUT6/cHUFEC9LAkoRmRsmSi1N7jjK7cYCCSKXJ4SYo3+5ljQNnp4gHxaacVkf7FtYd66tGeZrQc+lEH1JH3CSmfhIeCnwfxuUK9IKr69Gj0rztVQkRWR00+93iIBAxJ8xobIIsbW+7Ayw1nX0EiM10sCpZshJWsTot2YDMA5O/L/vgR6tWtdYAhhKgWsGdaOelM5mQwcOGNsFQ2cW1Kb9wuA3IdJTeRNtnTHNGKwoBfJf1ZRbi9jh8zrR/LkxyWsj6PM4NYsOmUdaQnBWs29hvapCKw2ir2RXvwITKT3ypNtvoiXvzIyz4SuaqsbbaB8A4ULQRqLLHxb14/1g66MEpspiut4yXkNlHKkoKvHYsxkVB0twP0ug3VbUEvBNvsSK9lzVUjXkOqT+2Ck0GSYn3r4DExh4FS6azezVI8ZwbxNkdLFvFsD95PRzbVbXSF7zI13TuiHaLGukJ4BIfAD7NhT9BRN7l12mO1PJpo0+tfWd3YcZzZv9SQ48xz+yeRVZOm2oGtpMJg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR11MB5657.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(7416002)(2616005)(956004)(54906003)(8936002)(66574015)(36756003)(1076003)(186003)(38100700002)(86362001)(6486002)(83380400001)(6916009)(5660300002)(38350700002)(66946007)(66476007)(66556008)(52116002)(7696005)(508600001)(6666004)(2906002)(316002)(4326008)(26005)(107886003)(8676002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?BWdgCdE1bewUS0jmDz+yYGdVuVq/?= =?utf-8?q?htQCD0xkbGrYscz5kn84kn7m5y/JnH2VAINIVx4sY0bAVkd1VAkHItIfrn76K0mUU?= =?utf-8?q?6I4iPw5Xew1YHqtlnI7zbWn/WE94qlhA17iSVAk9i7JAiDP2ad70dlDoSgENoNTAk?= =?utf-8?q?Iq+SBtzbsKL97kiHIMedDTZUu0nZeel6Z01Cdi482JR9GQuBOHDqeeowRnouU/R91?= =?utf-8?q?T8GIbv168c/xDd3V2T7ujCnsZkCNEI8xSwkQ/NNiP8EVCG0usdd41sRsQ6EJmkkHW?= =?utf-8?q?p5HeEsfQAaH1Y7kESgR7sabBSq+/fqHmF7HqSq8lceE2O3AfAf8I48r5ybHGZ8u3u?= =?utf-8?q?ikfdTkTPRH+RVv2AvG823r/w4MAcPGriO/ILL8ps4U8UA8hzyGWhHMXCWksUVSf3U?= =?utf-8?q?a2zMFBeTbSH+0iVAdYAf7PUlp3o762WNru25i36d/0CLxBjof0+++JsjVPLrHuBcW?= =?utf-8?q?5AGZ817YGIGEN04M45fUGAG7a/zh5VEuQ6HllqIjwuhQtc//Q0r/3SCS5ZzjyUrA9?= =?utf-8?q?A+5j2YeB1Zqo+k8xhFv77O8UL7Tl8YIwuPM1rs3KjV+3K3oRnXhC7KNxmxFhQAB2O?= =?utf-8?q?zetcejvfulhyAGleCGdq6TFbOp0+gj4xU0BNrUFZj8bhXqYp40GVY+m8PovfQASoV?= =?utf-8?q?pUu7m8x2BiNd1wnndlJO2q42yrIU7MJzQsYnmPesvtNMvBrkGtTMTA9cqQPXrl/23?= =?utf-8?q?vdBuaBuuovBJeKH6CklDRS4OIeDBJrUXP0U1wQfM+lO+xbdaYJu4+LrLTIQ/L6Uh6?= =?utf-8?q?8PXL5aiwFbGAZDVdszu5m6s2JfjK1GMBoapz30JMbvvZXIcPDWzU59Uu1uApuIL18?= =?utf-8?q?wluefXcxh0FoEJXx3C955WkpIBzb9KYIYMMSdjum/qNMz6Jng0FLOMpP/Utthi0Qx?= =?utf-8?q?iNXC4EoFN5YseCwHjCuK1N6zRpuXgYd2qIm5UCBFVpJB5U+jrbCOrQYxMnxbHRufx?= =?utf-8?q?4OQw5Tmt2gUvKNtalilmp3DdjUfjS6YpEKmPb3Wmq8gpPtVIthOkAo3hQu6SoECGy?= =?utf-8?q?I/8lp/B6mP7+CD/FpxhrooeIps4BVNc15PoPBfmKFL38TdUBsMQwtjOVN9CuLt9CW?= =?utf-8?q?dhrQS3DNmxCSP0RaRKUGQ0qy/yJhR3hLlZ738BT6FrDLGvqHKoslf9IeGeYx6Dp2o?= =?utf-8?q?LuacOTD1wQjwNb6nfizU5KuDnEiGQWFZ9IrP1Fnytva155k0mVY+8TuHryb50ipq/?= =?utf-8?q?1ekC6WCCwDjXZ4b37Yh7ZCLfPcXdv/yiG7QcmUuMzelBOSb8WXxtv0Pu8nF4GUdlb?= =?utf-8?q?SeRMEQTxHq8W3kG7?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: c7dfbdc2-178e-43b0-54c7-08d98807ab43 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5657.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Oct 2021 13:54:37.0793 (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: ujRb6xkMYm9diwhvgB/j45yLXrdD6Uvf7cbmBua6SSBmE5uictTSAhW7ZzXceFdjluWoQTQ3/aySUZRfRO7gTQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5643 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..91b5a545b8ff --- /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 wfx_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