From patchwork Sun May 24 09:09:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dirk Neukirchen X-Patchwork-Id: 475956 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 0518E1402B7 for ; Sun, 24 May 2015 19:10:06 +1000 (AEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id C081C28BD0F; Sun, 24 May 2015 11:08:34 +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 C49CE28BCEA for ; Sun, 24 May 2015 11:08:29 +0200 (CEST) X-policyd-weight: using cached result; rate: -8.5 Received: from mout.web.de (mout.web.de [212.227.15.4]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Sun, 24 May 2015 11:08:29 +0200 (CEST) Received: from [192.168.3.157] ([91.64.206.248]) by smtp.web.de (mrweb004) with ESMTPSA (Nemesis) id 0M5bEe-1ZKZRp3s8e-00xcsI for ; Sun, 24 May 2015 11:09:53 +0200 Message-ID: <55619552.6080602@web.de> Date: Sun, 24 May 2015 11:09:38 +0200 From: Dirk Neukirchen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: OpenWrt Development List X-Provags-ID: V03:K0:tiY/QIbJtlyj/vgWztb1UhRZvTy48D2KRLGbRbX2xM1tcIVRJln +yUQCc41BnO4/FpFNTLlkwas/0UktkwfCwwpmRFgmR/ua2sRvvBknrZIUs4Ne2864xa9kd5 JLPCvlQYnygiHWZ3Jl/Lw0UVy4UXV77hgq87WGj7/El+/R/YijAUw7e39Cz1pMo6ue7JEqT WDZI0CXxZGdkP4OpZCnTQ== X-UI-Out-Filterresults: notjunk:1; Subject: [OpenWrt-Devel] [PATCH] 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" - does not compile (omap target) - 4.1 suppose to carry changes according to: http://lists.infradead.org/pipermail/linux-arm-kernel/2015-March/333547.html Signed-off-by: Dirk Neukirchen --- ...0-wlcore-Add-support-for-DT-platform-data.patch | 139 --------------------- 1 file changed, 139 deletions(-) delete mode 100644 package/kernel/mac80211/patches/900-wlcore-Add-support-for-DT-platform-data.patch 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); - } -