From patchwork Thu Jun 25 10:04:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dirk Neukirchen X-Patchwork-Id: 488366 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 208321402EC for ; Thu, 25 Jun 2015 20:05:50 +1000 (AEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id A09CC2803E9; Thu, 25 Jun 2015 12:05:33 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id F0FC2280745 for ; Thu, 25 Jun 2015 12:05:25 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .web. - helo: .mout.web. - helo-domain: .web.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -8.5 Received: from mout.web.de (mout.web.de [212.227.15.4]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Thu, 25 Jun 2015 12:05:25 +0200 (CEST) Received: from [192.168.3.157] ([91.66.247.224]) by smtp.web.de (mrweb001) with ESMTPSA (Nemesis) id 0Lsy7e-1YwLjS19WE-012UAf for ; Thu, 25 Jun 2015 12:05:32 +0200 To: OpenWrt Development List From: Dirk Neukirchen Message-ID: <558BD23B.4070507@web.de> Date: Thu, 25 Jun 2015 12:04:43 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1 MIME-Version: 1.0 X-Provags-ID: V03:K0:jNfYnth+jdQazsCL4b1i2UnQpGExHhoO5PhCh2u1IqLEvqtY7y9 krrltmiOFRglEX18PTD0uwQM7Vz46A4d2y0/14mkscCv8O8W2eab8gdj1XyfTzGHPpLVur9 om/vcWsVLy56JYactyKCg0p7p6JTsljoRGLXiitsqpjbDBFXE2Lea9Feq8W56Yqd77xTeOX d8tUiHa2dRjAInFajuwZg== X-UI-Out-Filterresults: notjunk:1; V01:K0:SL8vNR+YRYk=:XYzpS2hlndomMajbDb9YN9 jQZbL2pMnGBI814/i/fxsd5+GGdmeCp8NB3z+MPjraTc3NuSP7vAW0YfvjbfuIniRzOLKTod+ dHD+qHrNO1RXOP6peROWuNIPWqCi046Iu4ZSZS5Adjv0uy7DkZplX+KG3g24KLcEOjt+dU7iR 0+qVarhaGxHpJaTVbfdkB4m5DrlDeETwpgT4NkcDanzxifhBrNJeApem8FeJLVqFmQ9u/aWGz fws3huRf8GjKPgaLvi/GXD8zb4My1ItBQl/cor5eWEE/FVzZ3KAoM704p0bX+tnEsCKriMLRn EpbYMUeCM5wiwDb8IeOXLEOsr4d95wn2m/+v86TpI+WY2RXJml5OSqPCj7e5D0jJmKCF3GoVz Ys+54IQb0DXgz+gw3/7AGg47wlwCyqylVlUcS4h+N495GeSndLJT6E+CRA2Tn5nNZobmmHCRw 6Xrx1T7r/tJD8SjEiT6h2MbKYe4AJ7n6lE/0ZdynFPNKMYQAGdsaOuyL4m0cBOv6iNEvaVlFA Piaq2WVBTqIs/+QEyr2TwoWAwyUkmtNSLSub8HlMTSJoRI2nguXsIstjhERdZK6z+gDdi98qm rxa9nyTgQ2QI9AB16BKhSvXi3IzQnCTflduMEYK6Y0S4Kp1XAnYTvl18Bio6rpv9P+I5fYNBJ J+xG0zPGEyEUnO1MngsdHVc7wa6XV4o4DPNkF/lXFeiMEu2hf8QCeEyn4GFBH+qxMgzE= Subject: [OpenWrt-Devel] mac80211: remove wlcore patch X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" - reported by buildbot, replicated - same patch was removed from kernel tree already - patch fails with 3.18 - newer version should be included in Kernel 4.x Signed-off-by: Dirk Neukirchen diff --git a/package/kernel/mac80211/patches/900-wlcore-Add-support-for-DT-platform-data.patch b/package/kernel/mac80211/patches/900-wlcore-Add-support-for-DT-platform-data.patch deleted file mode 100644 index 856dea8..0000000 --- a/package/kernel/mac80211/patches/900-wlcore-Add-support-for-DT-platform-data.patch +++ /dev/null @@ -1,139 +0,0 @@ -When running with DT, we no longer have a board file that can set up the -platform data for wlcore. Allow this data to be passed from DT. - -Since some platforms use a gpio-irq, add support for passing either the -irq number or the gpio number. For the latter case, the driver will -request the gpio and convert it to the irq number. If an irq is -specified, it'll be used as is. - -[Arik - the pdev_data pointer does not belong to us and is freed when -the device is released. Dereference to our private data first.] - -Signed-off-by: Ido Yariv -Signed-off-by: Arik Nemtsov ---- - drivers/net/wireless/ti/wlcore/sdio.c | 71 ++++++++++++++++++++++++++++++++--- - include/linux/wl12xx.h | 3 +- - 2 files changed, 67 insertions(+), 7 deletions(-) - ---- a/drivers/net/wireless/ti/wlcore/sdio.c -+++ b/drivers/net/wireless/ti/wlcore/sdio.c -@@ -34,6 +34,7 @@ - #include - #include - #include -+#include - - #include "wlcore.h" - #include "wl12xx_80211.h" -@@ -214,6 +215,61 @@ static struct wl1271_if_operations sdio_ - .set_block_size = wl1271_sdio_set_block_size, - }; - -+static const struct of_device_id wlcore_of_match[] = { -+ { -+ .compatible = "wlcore", -+ }, -+ {} -+}; -+MODULE_DEVICE_TABLE(of, wlcore_of_match); -+ -+static struct wl12xx_platform_data *get_platform_data(struct device *dev) -+{ -+ struct wl12xx_platform_data *pdata; -+ struct device_node *np; -+ u32 gpio; -+ -+ pdata = wl12xx_get_platform_data(); -+ if (!IS_ERR(pdata)) -+ return kmemdup(pdata, sizeof(*pdata), GFP_KERNEL); -+ -+ np = of_find_matching_node(NULL, wlcore_of_match); -+ if (!np) { -+ dev_err(dev, "No platform data set\n"); -+ return NULL; -+ } -+ -+ pdata = kzalloc(sizeof(*pdata), GFP_KERNEL); -+ if (!pdata) { -+ dev_err(dev, "Can't allocate platform data\n"); -+ return NULL; -+ } -+ -+ if (of_property_read_u32(np, "irq", &pdata->irq)) { -+ if (!of_property_read_u32(np, "gpio", &gpio) && -+ !gpio_request_one(gpio, GPIOF_IN, "wlcore_irq")) { -+ pdata->gpio = gpio; -+ pdata->irq = gpio_to_irq(gpio); -+ } -+ } -+ -+ /* Optional fields */ -+ pdata->use_eeprom = of_property_read_bool(np, "use-eeprom"); -+ of_property_read_u32(np, "board-ref-clock", &pdata->board_ref_clock); -+ of_property_read_u32(np, "board-tcxo-clock", &pdata->board_tcxo_clock); -+ of_property_read_u32(np, "platform-quirks", &pdata->platform_quirks); -+ -+ return pdata; -+} -+ -+static void del_platform_data(struct wl12xx_platform_data *pdata) -+{ -+ if (pdata->gpio) -+ gpio_free(pdata->gpio); -+ -+ kfree(pdata); -+} -+ - static int wl1271_probe(struct sdio_func *func, - const struct sdio_device_id *id) - { -@@ -245,10 +301,10 @@ static int wl1271_probe(struct sdio_func - /* Use block mode for transferring over one block size of data */ - func->card->quirks |= MMC_QUIRK_BLKSZ_FOR_BYTE_MODE; - -- pdev_data.pdata = wl12xx_get_platform_data(); -- if (IS_ERR(pdev_data.pdata)) { -- ret = PTR_ERR(pdev_data.pdata); -- dev_err(glue->dev, "missing wlan platform data: %d\n", ret); -+ pdev_data.pdata = get_platform_data(&func->dev); -+ if (!pdev_data.pdata) { -+ ret = -EINVAL; -+ dev_err(glue->dev, "missing wlan platform data\n"); - goto out_free_glue; - } - -@@ -279,7 +335,7 @@ static int wl1271_probe(struct sdio_func - if (!glue->core) { - dev_err(glue->dev, "can't allocate platform_device"); - ret = -ENOMEM; -- goto out_free_glue; -+ goto out_free_pdata; - } - - glue->core->dev.parent = &func->dev; -@@ -313,6 +369,9 @@ static int wl1271_probe(struct sdio_func - out_dev_put: - platform_device_put(glue->core); - -+out_free_pdata: -+ del_platform_data(pdev_data->pdata); -+ - out_free_glue: - kfree(glue); - -@@ -323,11 +382,14 @@ out: - static void wl1271_remove(struct sdio_func *func) - { - struct wl12xx_sdio_glue *glue = sdio_get_drvdata(func); -+ struct wlcore_platdev_data *pdev_data = glue->core->dev.platform_data; -+ struct wl12xx_platform_data *pdata = pdev_data->pdata; - - /* Undo decrement done above in wl1271_probe */ - pm_runtime_get_noresume(&func->dev); - - platform_device_unregister(glue->core); -+ del_platform_data(pdata); - kfree(glue); - } -