From patchwork Fri Sep 6 19:53:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Rosen Penev X-Patchwork-Id: 13794718 X-Patchwork-Delegate: kvalo@adurom.com Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8CF3413C3F2 for ; Fri, 6 Sep 2024 19:54:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725652444; cv=none; b=thcjkMTp8c9KYOt3dG8Xg4v1oEgy2OZGSbcJwZmlClj7VA8xTZ7CsCpaISu2xkccT4NCZlcJHNeCvJaxUXw3TsTFnBnYPLZcOPWK5T3/iRTKNuFsuo+NLtSdU5LSZO85zaTF+TswAmgKGc8GrlVQrib9tmm/wdUE/fyByEUe2p0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725652444; c=relaxed/simple; bh=WnvyFFK3cuKEwdYAd9S+ApvA6FKMM6oYN4T0bScrlTY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OKPin8BwBN/sMdkLtZ/yWYe1bG6EaExEvyn7P/C8TScYyTB8CnIzQt+nsShavk4ENZAvfjOBr6CEZrjb/3SkKYLUXR9OA0SWbcTrcVK9jfEb4XVn764eNWIWvDhsIfNIG2mjQSCH5FQ8KDs+189h+i3wl2EfFDHi+Ph0VgaTYjE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=gV4F1ymp; arc=none smtp.client-ip=209.85.216.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gV4F1ymp" Received: by mail-pj1-f52.google.com with SMTP id 98e67ed59e1d1-2d8a7c50607so1748990a91.1 for ; Fri, 06 Sep 2024 12:54:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725652443; x=1726257243; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+tOAE5lYXIqswc9ysrQaHFWZw9vsI1EIllIjuF/U03w=; b=gV4F1ympgLVM2in7E/lB0y8wtl5HuVZ7vvUFIH1KHtxeYXiUJiMj0mElQKMVBc7nH/ hcXpNX4UdHQR8p9q1PhEIzIC/M3NlPQD81Ul88MFWg7LaDeJShj5nYmqpMjt0rDIxJbw lrp4koGtZMFELnbjEhSm7iWQBLRU7CzuWJcW0dWPxhcXANkMEtsgiOsyIj7oGX/1tvhW VeekSSHU3FyB5jRxjh6FMSrSP1ycTZT1W23fAaoQOkQN0+rQuKon8/RRbE2Co6HEdi8y 4nU3PmKDwwdBJBB/8IL8qhBOtoCeMxujvpK/bUlsln14HrcA1aDyIAJVWa7+T6UrG6Ic AuNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725652443; x=1726257243; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+tOAE5lYXIqswc9ysrQaHFWZw9vsI1EIllIjuF/U03w=; b=uFXw2PO3N06PRoEVaHsBeQ2N/77BRArxGGKYVTqx1na7ulRZgsJhCiX+m7XL1h311y cE6M2B7Mp4WzbGtbFwGmOf0itLSW1M18OR9tIBUJgZJ//jxPXWYca94ztuPlKOqsGgEu 2ga1/dog1Jsav2YGQCzhBvt9HTkrUiicfvMMsX4J23x3scXIl6j3LrE8kwEoY831ng+L zXXnmJZ81uhvKj+l2+y/Yb7W5KHOkKmQpjDIK35P+mNr+q4XmLn71vJKEwPg1XvRh680 /DxWCdElEB8AzIB6QaML53XlDZTQEROk6cgs2LZ9FM6twE7Fbj65VlZDEO382DYZk+Fh 1mLw== X-Gm-Message-State: AOJu0YzHbCfhu/+V/RwsMpwNFN3An/KZNMJj+YaTUyQZrXGBY56gpC5k hR96VP/i1YltmLy06dRBAvWbb7+/wmu8VlQh65gk9pz8Q+/4daXSIU2zyJBh X-Google-Smtp-Source: AGHT+IEAxLuKHyDiVwkRTs0sVrnegDh5X9tJHXAOwradxbTubLzaXRj1nNXRkbf7iucdsEsZ9lVOAw== X-Received: by 2002:a17:90a:39cb:b0:2d8:8509:85d1 with SMTP id 98e67ed59e1d1-2dad50fc7c2mr4299655a91.38.1725652442611; Fri, 06 Sep 2024 12:54:02 -0700 (PDT) Received: from ryzen.lan ([2601:644:8200:dab8::a86]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2dadc0782dfsm2015954a91.34.2024.09.06.12.54.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 12:54:02 -0700 (PDT) From: Rosen Penev To: linux-wireless@vger.kernel.org Cc: kvalo@kernel.org, toke@toke.dk, nbd@nbd.name, yangshiji66@outlook.com, hauke@hauke-m.de Subject: [PATCHv2 1/3] wifi: ath9k: eeprom: remove platform data Date: Fri, 6 Sep 2024 12:53:57 -0700 Message-ID: <20240906195359.6982-2-rosenp@gmail.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240906195359.6982-1-rosenp@gmail.com> References: <20240906195359.6982-1-rosenp@gmail.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 There are no more board files defining platform data for this driver and eeprom support through NVMEM has already been implemented. No need to keep this old functionality around. Signed-off-by: Rosen Penev Acked-by: Toke Høiland-Jørgensen --- drivers/net/wireless/ath/ath9k/eeprom.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/eeprom.c b/drivers/net/wireless/ath/ath9k/eeprom.c index efb7889142d4..df58dc02e104 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom.c +++ b/drivers/net/wireless/ath/ath9k/eeprom.c @@ -15,7 +15,6 @@ */ #include "hw.h" -#include void ath9k_hw_analog_shift_regwrite(struct ath_hw *ah, u32 reg, u32 val) { @@ -119,14 +118,6 @@ static bool ath9k_hw_nvram_read_array(u16 *blob, size_t blob_size, return true; } -static bool ath9k_hw_nvram_read_pdata(struct ath9k_platform_data *pdata, - off_t offset, u16 *data) -{ - return ath9k_hw_nvram_read_array(pdata->eeprom_data, - ARRAY_SIZE(pdata->eeprom_data), - offset, data); -} - static bool ath9k_hw_nvram_read_firmware(const struct firmware *eeprom_blob, off_t offset, u16 *data) { @@ -146,15 +137,12 @@ static bool ath9k_hw_nvram_read_nvmem(struct ath_hw *ah, off_t offset, bool ath9k_hw_nvram_read(struct ath_hw *ah, u32 off, u16 *data) { struct ath_common *common = ath9k_hw_common(ah); - struct ath9k_platform_data *pdata = ah->dev->platform_data; bool ret; if (ah->nvmem_blob) ret = ath9k_hw_nvram_read_nvmem(ah, off, data); else if (ah->eeprom_blob) ret = ath9k_hw_nvram_read_firmware(ah->eeprom_blob, off, data); - else if (pdata && !pdata->use_eeprom) - ret = ath9k_hw_nvram_read_pdata(pdata, off, data); else ret = common->bus_ops->eeprom_read(common, off, data); From patchwork Fri Sep 6 19:53:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Rosen Penev X-Patchwork-Id: 13794719 X-Patchwork-Delegate: kvalo@adurom.com Received: from mail-pj1-f49.google.com (mail-pj1-f49.google.com [209.85.216.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 93ED51D5CF2 for ; Fri, 6 Sep 2024 19:54:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725652445; cv=none; b=usanG9de1aSPL0WnIZsgM4wzdjF5x/9meQYeOSEssGt0R6Igt9VrgOAmv/K+tiX0+v7tx4CqNflDXA+DpaQPWXl+v4FQu5lGbSZmTqRk5iAyBlmqtd9M6oyToez9d7GWCfRSZFI5O2SiHN6Z4mqw2FbAw8GH3L+GNvw3F5ySrEg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725652445; c=relaxed/simple; bh=dG0wU+ELooHhl9kop/9dQyFss5A+Lg7jzeXqR4UOovc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Ibe7fwDQXHWQTc41QQwIqiV3cVHP9fretjrgxWp2rT1fjES6Iei0+aha/WlLVoIqfx348h9b171liaKaLMlIMvdB42+DIkkONHNpTeklRS4WWxppakDG3S0XJby0WecEcWkDkqOdqWG/p7hkkm3HAKYBj2ehIuDebvDVBoZS29w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=BrEoQyig; arc=none smtp.client-ip=209.85.216.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BrEoQyig" Received: by mail-pj1-f49.google.com with SMTP id 98e67ed59e1d1-2d889ba25f7so1773094a91.0 for ; Fri, 06 Sep 2024 12:54:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725652444; x=1726257244; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bnaZJziqDKdiONAxSzGup/wlqumDXm6layBdbBHOfg4=; b=BrEoQyigM4tQXfT5NWCWntzDGPA1xXCJ9Hanaa7Dxzk1Z4MZFd+TVK3ZZhTzVxXvDU fYSQ5xZxTJN6KhM7EAjLGd7NS29kFWY6b7dEVo0+J6D2MdlVPPZztA+Lj4ewkj+PujLT ABTsO/4Pi3pos3LvQhmzRuoWr+MxydLLHc6V5w2pLCnhcwKvuhh2oqDveTH6SbNBpXJw M8QypCVZQPQNurWzLwH3USGnCm8DdVOERrnEPnJMwqfb4AINTNR1lLaoEeG/gLiqT7fH oIFwPHlpAu/jmbhMY5R+dzP1OYjLEzEr4Eoh/dpVAMYcEgAT/j+9VuMElMQnRITsJZDv nwPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725652444; x=1726257244; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bnaZJziqDKdiONAxSzGup/wlqumDXm6layBdbBHOfg4=; b=pOgtaGiBby+3ou+oI6dFXw2o31/e+RmXzQuYHJDr0ytsDi1N1h8uXQ0LU9LdrOjBDK 0iuNaDyLU+jqnmMvn/Do7YUpSs4KTU3oD6zhJ56niyKLHcEbYr0RedquY1hMMhaMnGtD qPUsmESMKfUZSXSkHZ9jwmXyeXmNY1yP0jR81iehgrmpoxun2/Qr2ZOdJAdkNsvaiDcx kj7kRNSP6QqERlxC9Ru43nDz377o5rlHmRgAEtCh+FVbN3qkt+whFg/Q7v/dICUAB4Pt CEHd+RDFAmGri9HV5MvsWCc62sRslDuK/DkspRWCxvUxm9iWmyUliy4ied//OnZon9jR vGVA== X-Gm-Message-State: AOJu0YxRMin9o74PZaZxszXOX4AFpFMc6QIe/26o0u+kSNf/4Br+v1ZD Y+8o38VkJTLDUvJJm/GAATIKnGuQNVh283+QIJtB/bnDqkRMVip6hkGepA6b X-Google-Smtp-Source: AGHT+IEHl/2mlmZkKhyPyZuYy2lTmUWE19w04MwDWE7cKEJeOlSua8Yzli7SaDJ9XX5HnMHnmf+n7A== X-Received: by 2002:a17:90a:c086:b0:2d8:816a:69c5 with SMTP id 98e67ed59e1d1-2dad501ba04mr4551820a91.23.1725652443644; Fri, 06 Sep 2024 12:54:03 -0700 (PDT) Received: from ryzen.lan ([2601:644:8200:dab8::a86]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2dadc0782dfsm2015954a91.34.2024.09.06.12.54.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 12:54:03 -0700 (PDT) From: Rosen Penev To: linux-wireless@vger.kernel.org Cc: kvalo@kernel.org, toke@toke.dk, nbd@nbd.name, yangshiji66@outlook.com, hauke@hauke-m.de Subject: [PATCHv2 2/3] wifi: ath9k: btcoex: remove platform_data Date: Fri, 6 Sep 2024 12:53:58 -0700 Message-ID: <20240906195359.6982-3-rosenp@gmail.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240906195359.6982-1-rosenp@gmail.com> References: <20240906195359.6982-1-rosenp@gmail.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 This is completely unused as platform files are no longer used anywhere. Signed-off-by: Rosen Penev Acked-by: Toke Høiland-Jørgensen --- drivers/net/wireless/ath/ath9k/btcoex.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/btcoex.c b/drivers/net/wireless/ath/ath9k/btcoex.c index 9b393a8f7c3a..ad3a3fda1b9c 100644 --- a/drivers/net/wireless/ath/ath9k/btcoex.c +++ b/drivers/net/wireless/ath/ath9k/btcoex.c @@ -16,7 +16,6 @@ #include #include -#include #include "hw.h" enum ath_bt_mode { @@ -115,23 +114,14 @@ static void ath9k_hw_btcoex_pin_init(struct ath_hw *ah, u8 wlanactive_gpio, u8 btactive_gpio, u8 btpriority_gpio) { struct ath_btcoex_hw *btcoex_hw = &ah->btcoex_hw; - struct ath9k_platform_data *pdata = ah->dev->platform_data; if (btcoex_hw->scheme != ATH_BTCOEX_CFG_2WIRE && btcoex_hw->scheme != ATH_BTCOEX_CFG_3WIRE) return; - /* bt priority GPIO will be ignored by 2 wire scheme */ - if (pdata && (pdata->bt_active_pin || pdata->bt_priority_pin || - pdata->wlan_active_pin)) { - btcoex_hw->btactive_gpio = pdata->bt_active_pin; - btcoex_hw->wlanactive_gpio = pdata->wlan_active_pin; - btcoex_hw->btpriority_gpio = pdata->bt_priority_pin; - } else { - btcoex_hw->btactive_gpio = btactive_gpio; - btcoex_hw->wlanactive_gpio = wlanactive_gpio; - btcoex_hw->btpriority_gpio = btpriority_gpio; - } + btcoex_hw->btactive_gpio = btactive_gpio; + btcoex_hw->wlanactive_gpio = wlanactive_gpio; + btcoex_hw->btpriority_gpio = btpriority_gpio; } void ath9k_hw_btcoex_init_scheme(struct ath_hw *ah) From patchwork Fri Sep 6 19:53:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Rosen Penev X-Patchwork-Id: 13794720 X-Patchwork-Delegate: kvalo@adurom.com Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5D2931B85E6 for ; Fri, 6 Sep 2024 19:54:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.169 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725652446; cv=none; b=CiQ/+eGu99MjF9C3EIhrQClwPpva4aXa33IRi/W/rgZcnAEQdI1p7XQ8cHBndoq7b1oioU162fXsqjs2jpKysnBjMkvuaCbEmsZgRWniTmyVKSZ9yY7Zee6ldYU01vg0ymmp2DdqQdb2zlRsQ+W3R2Uz/9hgVDVx2VLXHESwuso= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725652446; c=relaxed/simple; bh=Wz9L6wgxbBQmjzHr4EFSsPeGD25o9g37rvuModMahIo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=B3fvnQPnITyxWlAQwz9biYNI8Z22vvz/f0gEMErdKTPnhgdhEAQ04jTyyYerlzdZJhb5gtl3C/RSA6s2FljExbTsKEKC5Plo4bWPERlFHploSigoz5I/Fy+G6F9qUSF8JmMRSE5iZlRuW3jF2Z63ML2GVcMT4Byi3O3tDIxxQ8w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Fh4iJLRs; arc=none smtp.client-ip=209.85.215.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Fh4iJLRs" Received: by mail-pg1-f169.google.com with SMTP id 41be03b00d2f7-7cb3db0932cso1947283a12.1 for ; Fri, 06 Sep 2024 12:54:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725652445; x=1726257245; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=cmePR3Tl9e7BpX1XbkrluQ6eNEFtesj3DI5lbG85yuM=; b=Fh4iJLRs2wui3ioOlu3R51igPoqMdkq8pzGQUFHqHvuiPwXJSbQWvbmgNK//qXLyiS 5QCDvP9w21jPgSJnsQ4RJvEyI64hMyGvX/royhrjE5p5a2Olx4SvL2vdN56ez7NmV1kv Xt8uaMEvkGXskE6lEgYh8cp0OxdScScsXziDj8JaENsnQMggKpuE5v1kn3XKFOUaDCYf TOP09Mk/RrL0EZG2dlym6z3N8G0AvfXMantXfL6QLlfdFctpKAAN0Pn32aaLL/A0V2w6 U8t3jyy8TZuGSTpguSmhHk3x3QQWUA7CdJ+MmaRldIOKwWItxv9EkxrhglxztRxrg30P 2z7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725652445; x=1726257245; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cmePR3Tl9e7BpX1XbkrluQ6eNEFtesj3DI5lbG85yuM=; b=mJyZvyXN/2N3HMw47tip/bfDu25ieePhlEly378jYR/Wai+ESTeD5E/bQKl/XMxee6 /EF2PIdRohInz9Q2CSnGzEMP2MOled8vIR6D09qHch83o2VnDOtY4M9KCwaKg+3Bkmry 1c5FnDSm20YPeHZlOZCBEAAG7pe3Z8IQbfamMHf02s+XIjNh2fUwq0qJXbfRrP82YJ7H XjvqYQAPH5BkiVkBoSlnzcjh0tgOmHAU3LMDzVwYHQ5MED9J8HHnsbPFxrpMgUFL9dT6 tw0/ki1xQdmw/bVGwT1ML226RGEW4NMstFbSC+P7c76+7y99ivZXl3RJiyHnK4YS+Bt8 FJ2g== X-Gm-Message-State: AOJu0YzFGwJcxGwWYuRi4HRnTAsPz7dWHyB3/3Vl7uFjD/SuHGl8uNdt ssNGwHHuJuJvB3Bd9EAL/kpUxfjHDebQiYcRAVLtWKBoGwRjaetbhRpr4Snx X-Google-Smtp-Source: AGHT+IEYbaw0FQIR9ylII+U8lbLPCmoDq60ju0tR3qH5nh6PR9ksha6zwilUm+owvWoHAfFNjv6wvg== X-Received: by 2002:a17:90a:7802:b0:2da:d2a2:4a71 with SMTP id 98e67ed59e1d1-2dafd0bd6f9mr495069a91.40.1725652444693; Fri, 06 Sep 2024 12:54:04 -0700 (PDT) Received: from ryzen.lan ([2601:644:8200:dab8::a86]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2dadc0782dfsm2015954a91.34.2024.09.06.12.54.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 12:54:04 -0700 (PDT) From: Rosen Penev To: linux-wireless@vger.kernel.org Cc: kvalo@kernel.org, toke@toke.dk, nbd@nbd.name, yangshiji66@outlook.com, hauke@hauke-m.de Subject: [PATCHv2 3/3] wifi: ath9k: remove ath9k_platform_data Date: Fri, 6 Sep 2024 12:53:59 -0700 Message-ID: <20240906195359.6982-4-rosenp@gmail.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240906195359.6982-1-rosenp@gmail.com> References: <20240906195359.6982-1-rosenp@gmail.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Completely unused here in favor of Device Tree based setup. The DT code in here should currently match what is available with platform files. Any such lapse can always be added. Signed-off-by: Rosen Penev Acked-by: Toke Høiland-Jørgensen --- .../wireless/ath/ath9k/ath9k_pci_owl_loader.c | 1 - drivers/net/wireless/ath/ath9k/hw.c | 2 +- drivers/net/wireless/ath/ath9k/init.c | 52 +------------------ include/linux/ath9k_platform.h | 51 ------------------ 4 files changed, 3 insertions(+), 103 deletions(-) delete mode 100644 include/linux/ath9k_platform.h diff --git a/drivers/net/wireless/ath/ath9k/ath9k_pci_owl_loader.c b/drivers/net/wireless/ath/ath9k/ath9k_pci_owl_loader.c index 004ca5f536be..fe1013a3a588 100644 --- a/drivers/net/wireless/ath/ath9k/ath9k_pci_owl_loader.c +++ b/drivers/net/wireless/ath/ath9k/ath9k_pci_owl_loader.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 04a4b9ea61c3..36db734c74ae 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c @@ -490,7 +490,7 @@ static void ath9k_hw_init_macaddr(struct ath_hw *ah) u16 eeval; static const u32 EEP_MAC[] = { EEP_MAC_LSW, EEP_MAC_MID, EEP_MAC_MSW }; - /* MAC address may already be loaded via ath9k_platform_data */ + /* MAC address may already be loaded via NVMEM */ if (is_valid_ether_addr(common->macaddr)) return; diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index 7fad7e75af6a..f9e77c4624d9 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c @@ -18,7 +18,6 @@ #include #include -#include #include #include #include @@ -583,8 +582,8 @@ static int ath9k_nvmem_request_eeprom(struct ath_softc *sc) /* nvmem cell might not be defined, or the nvmem * subsystem isn't included. In this case, follow - * the established "just return 0;" convention of - * ath9k_init_platform to say: + * the established "just return 0;" convention + * to say: * "All good. Nothing to see here. Please go on." */ if (err == -ENOENT || err == -EOPNOTSUPP) @@ -620,49 +619,6 @@ static int ath9k_nvmem_request_eeprom(struct ath_softc *sc) return 0; } -static int ath9k_init_platform(struct ath_softc *sc) -{ - struct ath9k_platform_data *pdata = sc->dev->platform_data; - struct ath_hw *ah = sc->sc_ah; - struct ath_common *common = ath9k_hw_common(ah); - int ret; - - if (!pdata) - return 0; - - if (!pdata->use_eeprom) { - ah->ah_flags &= ~AH_USE_EEPROM; - ah->gpio_mask = pdata->gpio_mask; - ah->gpio_val = pdata->gpio_val; - ah->led_pin = pdata->led_pin; - ah->is_clk_25mhz = pdata->is_clk_25mhz; - ah->get_mac_revision = pdata->get_mac_revision; - ah->external_reset = pdata->external_reset; - ah->disable_2ghz = pdata->disable_2ghz; - ah->disable_5ghz = pdata->disable_5ghz; - - if (!pdata->endian_check) - ah->ah_flags |= AH_NO_EEP_SWAP; - } - - if (pdata->eeprom_name) { - ret = ath9k_eeprom_request(sc, pdata->eeprom_name); - if (ret) - return ret; - } - - if (pdata->led_active_high) - ah->config.led_active_high = true; - - if (pdata->tx_gain_buffalo) - ah->config.tx_gain_buffalo = true; - - if (pdata->macaddr) - ether_addr_copy(common->macaddr, pdata->macaddr); - - return 0; -} - static int ath9k_of_init(struct ath_softc *sc) { struct device_node *np = sc->dev->of_node; @@ -748,10 +704,6 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc, */ ath9k_init_pcoem_platform(sc); - ret = ath9k_init_platform(sc); - if (ret) - return ret; - ret = ath9k_of_init(sc); if (ret) return ret; diff --git a/include/linux/ath9k_platform.h b/include/linux/ath9k_platform.h deleted file mode 100644 index 76860a461ed2..000000000000 --- a/include/linux/ath9k_platform.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2008 Atheros Communications Inc. - * Copyright (c) 2009 Gabor Juhos - * Copyright (c) 2009 Imre Kaloz - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef _LINUX_ATH9K_PLATFORM_H -#define _LINUX_ATH9K_PLATFORM_H - -#define ATH9K_PLAT_EEP_MAX_WORDS 2048 - -struct ath9k_platform_data { - const char *eeprom_name; - - u16 eeprom_data[ATH9K_PLAT_EEP_MAX_WORDS]; - u8 *macaddr; - - int led_pin; - u32 gpio_mask; - u32 gpio_val; - - u32 bt_active_pin; - u32 bt_priority_pin; - u32 wlan_active_pin; - - bool endian_check; - bool is_clk_25mhz; - bool tx_gain_buffalo; - bool disable_2ghz; - bool disable_5ghz; - bool led_active_high; - - int (*get_mac_revision)(void); - int (*external_reset)(void); - - bool use_eeprom; -}; - -#endif /* _LINUX_ATH9K_PLATFORM_H */