From patchwork Sun Sep 9 20:32:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 10593419 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 000E513BB for ; Sun, 9 Sep 2018 20:32:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DDBC228451 for ; Sun, 9 Sep 2018 20:32:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D0C8728528; Sun, 9 Sep 2018 20:32:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 564F328451 for ; Sun, 9 Sep 2018 20:32:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726668AbeIJBXr (ORCPT ); Sun, 9 Sep 2018 21:23:47 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:35770 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726609AbeIJBXr (ORCPT ); Sun, 9 Sep 2018 21:23:47 -0400 Received: by mail-wm0-f66.google.com with SMTP id o18-v6so19378539wmc.0 for ; Sun, 09 Sep 2018 13:32:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=CePwU6qCT0OK4QkE4ZW8qQeeQtu+tKxhOvoRJdvtQLA=; b=duXmNNjhpbDuHla1FPQomlKiQgAXNMA1PllERJv3c0V+mz3UmRGOyL6vh5mPJyIqp9 L+s3GEEOiobh2Gwekdzdg9tyJffx24J2k6tE6N178HFkmT9eECMfmMC3gkhjc6oNDzNS IReOx+kOq6AWR9ln5i5UXaLpWPVw+hPm5S8b4tuQqkP5YJvqjviteBUyGJYCSZnrQOSQ K1Q9bI2BdK1tJxT79N8+5HFKQQQ+hBSgV9K96DLl0VbiP+Dts/mR5ZZ/rwI/uEmk0f3Z J8CIWnOFdFFTwiYWKuWe1eH7l0uSDAPWD53ODIaN8hFcQYvcr3+ISWZSme7fskFufkI5 sn/g== X-Gm-Message-State: APzg51AYrv2s/isejFdd4t3A8GNQNHy8RBbCKa8BI8Xk5otFmDMjhwWJ ei1ufk+x+gC8QPxD/vJXo0FPqnNhfus= X-Google-Smtp-Source: ANB0Vda41cu4leUBt/B7ygeNVRYD49aD/5rei9eFDbcPjhUI2C/hNcO7kyib+NY00CBdIm5B04Po+g== X-Received: by 2002:a1c:d702:: with SMTP id o2-v6mr11054759wmg.115.1536525173284; Sun, 09 Sep 2018 13:32:53 -0700 (PDT) Received: from localhost.localdomain ([151.66.53.29]) by smtp.gmail.com with ESMTPSA id y184-v6sm13652006wmg.17.2018.09.09.13.32.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Sep 2018 13:32:52 -0700 (PDT) From: Lorenzo Bianconi To: nbd@nbd.name Cc: sgruszka@redhat.com, linux-wireless@vger.kernel.org Subject: [PATCH 00/11] move mcu usb code in mt76x02-lib module Date: Sun, 9 Sep 2018 22:32:35 +0200 Message-Id: <20180909203246.21608-1-lorenzo.bianconi@redhat.com> X-Mailer: git-send-email 2.18.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This is the first of two series that unify mcu code between pci and usb drivers. That patchset will be used to properly support mt76x0e chipsets without duplicating the code. Moreover this patchset moves MT_TXD_INFO, MT_MCU_MSG and MT_RX_FCE_INFO definitions in mt76x02-lib module since other chipsets (e.g. mt7603) use different dma definitions The full series can be found at: https://github.com/LorenzoBianconi/wireless-drivers-next/tree/mt76_mcu_unify This patchset is rebased on top of https://marc.info/?l=linux-wireless&m=153635751522507&w=2 and https://marc.info/?l=linux-wireless&m=153622554611313&w=2 (dropping patch 38/42 and 39/42) Lorenzo Bianconi (7): mt76: move mt76x0 and mt76x2 mcu shared defs in mt76x02_mcu.h mt76: add mt76_mcu_ops data structure for mcu related pointers mt76: usb: use common helpers for mcu_alloc_msg()/mcu_send_msg() mt76: usb: move mt76x02 mcu code in mt76x02-usb module mt76: usb: move mt76u_skb_dma_info in mt76x02_usb_core.c mt76x02: move TXD/RXD/MCU definitions in mt76x02_dma.h mt76x02: add static qualifier to mt76x02_remove_dma_hdr Stanislaw Gruszka (4): mt76: add usb implementation of {wr,rd}_rp mt76: add rd_rp and wr_rp to bus_ops/mcu_ops mt76x0: remove unused mt76x0_burst_read_regs mt76x0: remove mt76x0_burst_write_regs() drivers/net/wireless/mediatek/mt76/Kconfig | 8 +- drivers/net/wireless/mediatek/mt76/Makefile | 3 + drivers/net/wireless/mediatek/mt76/dma.h | 38 -- drivers/net/wireless/mediatek/mt76/mt76.h | 39 +- .../net/wireless/mediatek/mt76/mt76x0/init.c | 30 +- .../net/wireless/mediatek/mt76/mt76x0/mcu.c | 171 +-------- .../net/wireless/mediatek/mt76/mt76x0/mcu.h | 51 +-- .../wireless/mediatek/mt76/mt76x0/mt76x0.h | 7 - .../net/wireless/mediatek/mt76/mt76x0/phy.c | 9 +- .../net/wireless/mediatek/mt76/mt76x0/tx.c | 3 +- .../net/wireless/mediatek/mt76/mt76x0/usb.c | 2 + .../net/wireless/mediatek/mt76/mt76x02_dma.h | 60 +++ .../net/wireless/mediatek/mt76/mt76x02_mcu.h | 71 ++++ .../net/wireless/mediatek/mt76/mt76x02_usb.h | 29 ++ .../wireless/mediatek/mt76/mt76x02_usb_core.c | 72 ++++ .../wireless/mediatek/mt76/mt76x02_usb_mcu.c | 359 ++++++++++++++++++ .../net/wireless/mediatek/mt76/mt76x02_util.c | 26 +- .../net/wireless/mediatek/mt76/mt76x02_util.h | 2 - .../net/wireless/mediatek/mt76/mt76x2_dma.c | 2 +- .../net/wireless/mediatek/mt76/mt76x2_mcu.c | 2 +- .../net/wireless/mediatek/mt76/mt76x2_mcu.h | 49 +-- .../net/wireless/mediatek/mt76/mt76x2_tx.c | 2 +- .../net/wireless/mediatek/mt76/mt76x2_usb.c | 2 + drivers/net/wireless/mediatek/mt76/mt76x2u.h | 2 +- .../net/wireless/mediatek/mt76/mt76x2u_core.c | 3 +- .../net/wireless/mediatek/mt76/mt76x2u_mcu.c | 69 ++-- drivers/net/wireless/mediatek/mt76/usb.c | 92 +++-- drivers/net/wireless/mediatek/mt76/usb_mcu.c | 242 ------------ 28 files changed, 764 insertions(+), 681 deletions(-) create mode 100644 drivers/net/wireless/mediatek/mt76/mt76x02_dma.h create mode 100644 drivers/net/wireless/mediatek/mt76/mt76x02_mcu.h create mode 100644 drivers/net/wireless/mediatek/mt76/mt76x02_usb.h create mode 100644 drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c create mode 100644 drivers/net/wireless/mediatek/mt76/mt76x02_usb_mcu.c