Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2893800pxb; Tue, 12 Oct 2021 16:02:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJza6Gx9/PvT4Jix/Y1eE+OS44CWE24jVsbNtmp52+zgQjG5BZtf3QuRT9jQzNIj/0xpN4KA X-Received: by 2002:a17:906:b247:: with SMTP id ce7mr36368024ejb.473.1634079738155; Tue, 12 Oct 2021 16:02:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634079738; cv=none; d=google.com; s=arc-20160816; b=rbHhwo+ArsOI/ke0Be2yyJHp4ycolrbmSNgxoSB5jBfgQzAY8n8SmegPptNzjNQjau yLLDbzmm6Cz8QFwe0YSoxTYZrBo0HH/GIJTom25xxiwTOkrkmqSS6+FBs7QybrJ5NNS4 bKy5zQkOt0HzN0r1MZLGw/GdAyYExKsjjQO1Nl9KnRkKtLMFgSuR/JB80fJLhn1x4Qcs c4p9zaMH33DTxO5MtpAHlDo1DcQi2gBlR+E/FJOuk0X5Y6ZlN1KX+0yAHgDx9FqzK3/f WBV5uujTJ17GE7yXpSqsEZZQDxhtmAQ36ziLRZPtci/110flFxbhH8F1NCQH6FhpVlST aE3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=5Y6sCG6n/cLgXFXvwHE7TOLGUt1o9JUem8TIfJ6inUk=; b=DkfPOc+kR1rOuj8IRzYgkWVVnIxPFwHMXEezdbBjMKZrwo7qGIQeXpPYIz/MxX/AWD 3KLsF7XjI4NFuu94F+IjOaRtWqS1AtZ3OKEYkX3da3r5279mwBsMnBTehBgk3u/B0sn3 Rfuig9559jeeiBl/lcR1ppFF+2Bh64eCkJ3GDwd3ECbAkYShBt4VPQYXOjl2asRmo3K8 dFqvcuRdGIuY65ocVJ0FlXwb3o1Ttgq8zZyQT7qwCAZ7IrHAlc30DFK8g+QWsH0FT2xO leSau6TP46AWZB+x2+/CAR1D/ZHLD+y+3x8OJBnX89uWbU2icUmwxuo2yUV/ourwIh0h s2yw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id sd37si1677934ejc.13.2021.10.12.16.02.02; Tue, 12 Oct 2021 16:02:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235775AbhJLXD6 (ORCPT + 63 others); Tue, 12 Oct 2021 19:03:58 -0400 Received: from mailgw01.mediatek.com ([216.200.240.184]:34259 "EHLO mailgw01.mediatek.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235142AbhJLXD6 (ORCPT ); Tue, 12 Oct 2021 19:03:58 -0400 X-UUID: 1b7e65cf6ef44331826a78eb36d11bbf-20211012 X-UUID: 1b7e65cf6ef44331826a78eb36d11bbf-20211012 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1163947230; Tue, 12 Oct 2021 16:01:52 -0700 Received: from mtkcas10.mediatek.inc (172.21.101.39) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 12 Oct 2021 15:52:13 -0700 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 13 Oct 2021 06:52:12 +0800 From: To: , CC: , , , , , , , , , , , , , , , , , , , , , , , , Sean Wang Subject: [PATCH v4 00/16] Add MT7921 SDIO WiFi support Date: Wed, 13 Oct 2021 06:51:53 +0800 Message-ID: X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Sean Wang The patchset adds the SDIO support to the MT7921 driver, basically are made up of 3 parts. PART 1: patch 1-5, 8-9 and 12-14 These are preliminary patches for mt7921s driver to refactor and reuse the current mt7921e driver as much as possible. PART 2: patch 6-7, 10 These are preliminary patches for mt7921s driver to refactor and reuse the current mt7663s driver as much as possible. PART 3: patch 11 and 15-16 These are specific patches for mt7921s driver and reset mechanism in the same framework where mt7921e have been supported. The patchset are built and generated against the current mt76 tree with the tag mt76-for-kvalo-2021-10-12 to help the review and merge process be easier. The change list from v1 to v2 1. rework the whole driver according to the new patches added ("mt76: introduce __mt76_mcu_send_firmware routine"), ("mt76: not accounting the MCU header size in __mt76_mcu_send_firmware for mt7915/21") and ("mt76: sdio: move common code in mt76_sdio module") 2. drop pci_init.c and sdio_init.c by moving the related logic to pci.c and sdio.c, respectively. 3. cosmetics the patches like removing unnecessary new line, adding an extra space to fixed_map table and so on ... 4. fix typo in commit message The change list from v2 to v3 1. rebase onto the latest mt76 branch 2. update per Lorenzo comments on v2 3. fix scheduling while atomic in mt7921_mac_sta_poll for mt7921s driver The change list from v3 to v4 1. change the title of coverletter 2. fix the git message in patch 14 3. rebase onto the mt76-for-kvalo-2021-10-12 Lorenzo Bianconi (1): mt76: sdio: move common code in mt76_sdio module Sean Wang (15): mt76: mt7921: refactor mac.c to be bus independent mt76: mt7921: refactor dma.c to be pcie specific mt76: mt7921: refactor mcu.c to be bus independent mt76: mt7921: refactor init.c to be bus independent mt76: mt7921: add MT7921_COMMON module mt76: connac: move mcu reg access utility routines in mt76_connac_lib module mt76: mt7663s: rely on mcu reg access utility mt76: mt7921: make all event parser reusable between mt7921s and mt7921e mt76: mt7921: use physical addr to unify register access mt76: sdio: extend sdio module to support CONNAC2 mt76: connac: extend mcu_get_nic_capability mt76: mt7921: rely on mcu_get_nic_capability mt76: mt7921: refactor mt7921_mcu_send_message mt76: mt7921: introduce mt7921s support mt76: mt7921s: add reset support drivers/net/wireless/mediatek/mt76/Makefile | 2 +- drivers/net/wireless/mediatek/mt76/mt76.h | 22 + .../wireless/mediatek/mt76/mt7615/Makefile | 2 +- .../net/wireless/mediatek/mt76/mt7615/mcu.c | 28 -- .../wireless/mediatek/mt76/mt7615/mt7615.h | 6 - .../net/wireless/mediatek/mt76/mt7615/sdio.c | 282 +------------ .../wireless/mediatek/mt76/mt7615/sdio_mcu.c | 11 +- .../wireless/mediatek/mt76/mt76_connac_mcu.c | 93 +++++ .../wireless/mediatek/mt76/mt76_connac_mcu.h | 2 + .../net/wireless/mediatek/mt76/mt7921/Kconfig | 18 +- .../wireless/mediatek/mt76/mt7921/Makefile | 8 +- .../wireless/mediatek/mt76/mt7921/debugfs.c | 18 +- .../net/wireless/mediatek/mt76/mt7921/dma.c | 38 +- .../wireless/mediatek/mt76/mt7921/eeprom.c | 101 ----- .../net/wireless/mediatek/mt76/mt7921/init.c | 51 +-- .../net/wireless/mediatek/mt76/mt7921/mac.c | 381 ++---------------- .../net/wireless/mediatek/mt76/mt7921/mac.h | 4 + .../net/wireless/mediatek/mt76/mt7921/main.c | 8 + .../net/wireless/mediatek/mt76/mt7921/mcu.c | 135 ++----- .../wireless/mediatek/mt76/mt7921/mt7921.h | 94 ++++- .../net/wireless/mediatek/mt76/mt7921/pci.c | 48 ++- .../wireless/mediatek/mt76/mt7921/pci_mac.c | 354 ++++++++++++++++ .../wireless/mediatek/mt76/mt7921/pci_mcu.c | 115 ++++++ .../net/wireless/mediatek/mt76/mt7921/regs.h | 22 +- .../net/wireless/mediatek/mt76/mt7921/sdio.c | 285 +++++++++++++ .../wireless/mediatek/mt76/mt7921/sdio_mac.c | 220 ++++++++++ .../wireless/mediatek/mt76/mt7921/sdio_mcu.c | 135 +++++++ drivers/net/wireless/mediatek/mt76/sdio.c | 282 +++++++++++++ .../mediatek/mt76/{mt7615 => }/sdio.h | 50 ++- .../mediatek/mt76/{mt7615 => }/sdio_txrx.c | 171 +++++--- 30 files changed, 1987 insertions(+), 999 deletions(-) delete mode 100644 drivers/net/wireless/mediatek/mt76/mt7921/eeprom.c create mode 100644 drivers/net/wireless/mediatek/mt76/mt7921/pci_mac.c create mode 100644 drivers/net/wireless/mediatek/mt76/mt7921/pci_mcu.c create mode 100644 drivers/net/wireless/mediatek/mt76/mt7921/sdio.c create mode 100644 drivers/net/wireless/mediatek/mt76/mt7921/sdio_mac.c create mode 100644 drivers/net/wireless/mediatek/mt76/mt7921/sdio_mcu.c rename drivers/net/wireless/mediatek/mt76/{mt7615 => }/sdio.h (68%) rename drivers/net/wireless/mediatek/mt76/{mt7615 => }/sdio_txrx.c (59%) -- 2.25.1