From patchwork Fri Mar 1 14:40:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Adrian Schmutzler X-Patchwork-Id: 1050229 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=adrianschmutzler.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="JQloMCqt"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 449sY330CPz9s2R for ; Sat, 2 Mar 2019 01:40:54 +1100 (AEDT) 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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:Message-Id:Date:To :From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=TbPAvBwhrqU+sgvoP9DbJvgw61kG6YWzVkfTAARuvZ8=; b=JQloMCqtd5SIYF kHXnwbVeV+4e/54pu9kHOHHLo1b2dCvuIsUwq6vwcAf6KJbFKqZJhFcE98lloD3N4Ux0MGvhvgj2W FrQBoicuWf9zJoPXTBgSdJgA5YwLWyR21Jnph/x9xceV56pXpIaXIQZLo/98wTJqjHwkg6kdhtkZZ KM6RuqEsinXPUKCOjLge2qIyxtIxLKzFP8GNcBCQlQEYJ9/ypi8i7ulTcqzSIBrZ4JgPcO6wCQQat SfX6aI3xKydQx6bOsnu/eQ7BP6cXYLcTFxJY9RIgyVwYAOrhXrOBSY8sFpebxSxx7F3Ze7AhepTd/ 81jSkigm+1R6LLTNSmJA==; 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 1gzjL0-0005rK-PC; Fri, 01 Mar 2019 14:40:34 +0000 Received: from mout.kundenserver.de ([212.227.126.131]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gzjKx-0005pU-Po for openwrt-devel@lists.openwrt.org; Fri, 01 Mar 2019 14:40:33 +0000 Received: from localhost.localdomain ([188.194.105.77]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1M4K6z-1gzSLy23fN-000Kgz for ; Fri, 01 Mar 2019 15:40:27 +0100 From: Adrian Schmutzler To: openwrt-devel@lists.openwrt.org Date: Fri, 1 Mar 2019 15:40:16 +0100 Message-Id: <20190301144022.1984-1-freifunk@adrianschmutzler.de> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:YQEXu8mOwKF6id8U4wI+mtMLdmsjpdXQn4U6/PsevYzL+d3JO56 1Adkvp2Jhl8YKs/26Tz2YHtB/gtyvl7YAqLZ0e46Pyue+bdEwzqEu9bbENFPxc3rJCh/Ppu 38R50PC0keX2DnPQQ520V5d/cItXyRwRHdjobNIEWbTkJg51XkkTJJPe4Ro0VPepY93pto8 juBBcr+WNc1OYQl35kJ9g== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:02njhUcSFIk=:T6UyTF6ujEK8S6pzc12eYl 3lFmOKAeND3ZpZ6M3Hi8s6nDaWalz9pbjU/59GAjjBFtFZYjB9k7xGhIIIYc9G9th4qNc3Fa1 cw1ouGTkAe1xIgQVjqAyjHRWomPpMZ/ddZnpssaRfzw9nW3j9nEbrFwR8LO4t0x/F4y0UegxH CBq/CN2iMX4octPnrSjvGuMoPa+yc67MYvQctxllPARov0FIaIR0tu9yuNfJGcRNmIL4bIkwi YeQ+QK+krQXAPyYMUGVFwQ4n1axNfaQ75K2fysMvmWgVNJ/V66T3H5xVOpANxxx0GyBP5SvN2 6SXWt3sbWUQIMt+h6DeFWYExFaGXLPLVGvPu8tj/TKUBEhiqqfYUOaGDCnIC3XLJcENWVFasJ UprWrdLxuUaB42FGXsYL30N7dT0kwV7DGAx4Hp4gyQVPiakT2YNPAw2ajrvHRrMA20Ph36ZKg wmY+UVtgsddI4KRQQA/CFtbtIUTxUEeVe9NfEA7SweoLJw9p4KSVale7tJVl+E3x+e0tL8l5T gSHIxlxV7CcnOfkAVSfFk4DKszfeWtQjXeqAMat97bS4kMbIIcAiVa2obU7ropWitY3d+QyNL muXvLsNMk5V8JCYfeFtL+e1vpRpyTOoeEQ3+gWzmX/NU5uZrWUtgmCJrYAdyKCoqkptLX7UNH qfq+KpRoBBOq4JScqYQdvMi8yASOMsQtMT8bnOgxtsHRgYUpZ+a9+XgB13VjNh1ra/1PmBC0X 5GSNVfsiXekxMmxvP+E4Fq42vOfR2cAeSXWGiDW9rF85MsrHoIiPeNG5VX9hDMBxQOIEZANv1 k8mLbo0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190301_064032_131792_3057E34A X-CRM114-Status: GOOD ( 12.12 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [212.227.126.131 listed in list.dnswl.org] Subject: [OpenWrt-Devel] [PATCH v4 0/6] Speed up and merge caldata/eeprom extraction X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org This patchset goes on with the attempt to - speed up caldata/eeprom handling by reading blockwise, - merge the similar functions in one library. It depends on the patch "ath79: speed up ath9k-eeprom extraction" by Dmitry Tunin to be applied beforehand. Patchset v4 is just a rebase due to recently pushed hardware additions. The patches 1 to 4 have been run-tested (all at once) on the following devices: TP-Link WDR4300 (ar71xx and ath79) Ubnt AC Mesh (ath79) TP-Link CPE210 v2 (ar71xx) The patches 5 and 6 are optional. Since a have no ipq40xx or ramips device at hand, I cannot test them. Thus, one can apply patches 1 to 4 and then easily do patches 5 and 6 if/after they are tested. (So they do not hold up the earlier patches.) However, it would be nice if someone did test ramips and ipq40xx. If the eeprom.sh merge is not desired, but the speedup is, it is also possible to just merge patches 1 to 3. Adrian Schmutzler (6): ath79: Speed up caldata/eeprom handling ar71xx: Speed up caldata/eeprom handling ar71xx: Speed up mtd extraction in ar71xx.sh ar71xx/ath79: Merge eeprom/caldata extraction into eeprom.sh ipq40xx: Make use of common eeprom.sh library for caldata ramips: Merge ath9k-eeprom extraction to common eeprom.sh package/base-files/files/lib/functions/eeprom.sh | 91 ++++++++++++++++++++ .../etc/hotplug.d/firmware/10-ath9k-eeprom | 99 +++++----------------- .../etc/hotplug.d/firmware/11-ath10k-caldata | 80 ++++++----------- target/linux/ar71xx/base-files/lib/ar71xx.sh | 4 +- .../etc/hotplug.d/firmware/10-ath9k-eeprom | 86 ++++++------------- .../etc/hotplug.d/firmware/11-ath10k-caldata | 62 ++++---------- .../etc/hotplug.d/firmware/11-ath10k-caldata | 82 +++++------------- .../etc/hotplug.d/firmware/10-rt2x00-eeprom | 32 ++----- 8 files changed, 209 insertions(+), 327 deletions(-) create mode 100644 package/base-files/files/lib/functions/eeprom.sh Tested-by: Petr Štetiar