From patchwork Sat Aug 25 10:40:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 10576115 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 4A777109C for ; Sat, 25 Aug 2018 10:42:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 39E5D2AF1F for ; Sat, 25 Aug 2018 10:42:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2C5302B009; Sat, 25 Aug 2018 10:42:02 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BC1442AF1F for ; Sat, 25 Aug 2018 10:42:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=U1ErOgudTmri/JCGU4Eojtsf4k+2e2rKakwlgJD9Wao=; b=Lbv XQpf3iCzboVAhECRA5WKpcPfRxgvcLDRytWZg3aNpNS8wN/j72kHDUkC6AO+ykwoGXNO9srs7P/Sz fTj7gTS7MMs/nPt2/hFExDKJn2E8BlHQyWnBCMwV2oDAgKZbUPnO8wptq6YArmqWbNh7RnZugSp2a 88NYRhzDTh6tp4HVCFegih8BiWqqP/jRNDJ783Prrj2iSTsFSmYTyR+8WcSorOXSCUOHcmOdqVaGP y4Bzbe1VKavhHtHX12AgPp8Dex1gxP/BWmqgBro/uM7EuPKIT/42r9PZ7mCEFfhKNTXZ2Afv2dPq5 BfLZyHPg2H0bIJvdMftBJsNMFYNTmFA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1ftW10-0005LQ-Ju for patchwork-linux-mediatek@patchwork.kernel.org; Sat, 25 Aug 2018 10:41:58 +0000 Received: from mail-wr1-f66.google.com ([209.85.221.66]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1ftW0O-0004vf-23 for linux-mediatek@lists.infradead.org; Sat, 25 Aug 2018 10:41:23 +0000 Received: by mail-wr1-f66.google.com with SMTP id g33-v6so9452234wrd.1 for ; Sat, 25 Aug 2018 03:41:09 -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=QOLwGPt5VaS1BVWTn01/K9PL1idQIJaxAhsKBFETJOs=; b=IqxVu3pIkrddSipRECWORVbvOMXVwQbbL/P/XJCfcWa67FIr3bTHV51t19k9yNsAUy zv/lsVGpF1H6/21H5drM3Xahl2dk+y7b5KFArY/HkYlUUM437UV6Aagakv1/cTwZTp3z EAOta6HG6GHkbi8Ob+WmvWMSprgUMiGcWi7aMoOg8GYtXD5dwPQ2uvYiBXsoWNtNE2ZK bLMsDzB2vT+zVgSxoYYCl9ZXymBVCkBeQw20MlNtgSCL+xBaWKTtnCQ67g2QzOFMzwqf rlFEI7fv0SOpY9OlvK/hFrVeSpvQowsY91CUhD856jLnLkkmM8PvVQiriQoOln3KKKpK or5g== X-Gm-Message-State: APzg51DJhOvMjBR5Lj5AkgJpz+BEXGQlSF4w9wtrqv9cl/5xsJG0uy9A DEpXc16y+AoHgplgdHEdBupk5A== X-Google-Smtp-Source: ANB0VdapExPqkT28/u0uRZNljrzp7naqJrbnz78Wi29fhBkjNH7dU37SkfAfP8Z+AceRgz0GFDPrrw== X-Received: by 2002:adf:d110:: with SMTP id a16-v6mr3726463wri.17.1535193668406; Sat, 25 Aug 2018 03:41:08 -0700 (PDT) Received: from localhost.localdomain ([151.66.53.29]) by smtp.gmail.com with ESMTPSA id l18-v6sm16391708wru.75.2018.08.25.03.41.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 25 Aug 2018 03:41:07 -0700 (PDT) From: Lorenzo Bianconi To: nbd@nbd.name Subject: [PATCH 06/16] mt76x0: remove mt76x0_vendor_reset routine Date: Sat, 25 Aug 2018 12:40:46 +0200 Message-Id: <20180825104056.9130-7-lorenzo.bianconi@redhat.com> X-Mailer: git-send-email 2.18.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180825_034120_173551_D140A372 X-CRM114-Status: UNSURE ( 9.42 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-wireless@vger.kernel.org, linux-mediatek@lists.infradead.org, sgruszka@redhat.com MIME-Version: 1.0 Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Remove mt76x0_vendor_reset duplicated routine and use mt76u_mcu_fw_reset utility function for mcu fw reset Signed-off-by: Lorenzo Bianconi --- drivers/net/wireless/mediatek/mt76/mt76x0/mcu.c | 2 +- drivers/net/wireless/mediatek/mt76/mt76x0/usb.c | 6 ------ drivers/net/wireless/mediatek/mt76/mt76x0/usb.h | 1 - 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/mcu.c b/drivers/net/wireless/mediatek/mt76/mt76x0/mcu.c index 75768ebf8b30..c8ea3126e7dc 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x0/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/mcu.c @@ -571,7 +571,7 @@ static int mt76x0_load_firmware(struct mt76x0_dev *dev) mt76_set(dev, MT_USB_DMA_CFG, (MT_USB_DMA_CFG_RX_BULK_EN | MT_USB_DMA_CFG_TX_BULK_EN) | FIELD_PREP(MT_USB_DMA_CFG_RX_BULK_AGG_TOUT, 0x20)); - mt76x0_vendor_reset(dev); + mt76u_mcu_fw_reset(&dev->mt76); msleep(5); /* mt76x0_rmw(dev, MT_PBF_CFG, 0, (MT_PBF_CFG_TX0Q_EN | diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c b/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c index 09e7f9590f01..fdb71b907419 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c @@ -131,12 +131,6 @@ int mt76x0_vendor_request(struct mt76x0_dev *dev, const u8 req, return ret; } -void mt76x0_vendor_reset(struct mt76x0_dev *dev) -{ - mt76x0_vendor_request(dev, MT_VEND_DEV_MODE, USB_DIR_OUT, - MT_VEND_DEV_MODE_RESET, 0, NULL, 0); -} - int mt76x0_vendor_single_wr(struct mt76x0_dev *dev, const u8 req, const u16 offset, const u32 val) { diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/usb.h b/drivers/net/wireless/mediatek/mt76/mt76x0/usb.h index 492e431390a8..d23ca45a294e 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x0/usb.h +++ b/drivers/net/wireless/mediatek/mt76/mt76x0/usb.h @@ -54,7 +54,6 @@ void mt76x0_complete_urb(struct urb *urb); int mt76x0_vendor_request(struct mt76x0_dev *dev, const u8 req, const u8 direction, const u16 val, const u16 offset, void *buf, const size_t buflen); -void mt76x0_vendor_reset(struct mt76x0_dev *dev); int mt76x0_vendor_single_wr(struct mt76x0_dev *dev, const u8 req, const u16 offset, const u32 val);