From patchwork Sun Jan 25 17:36:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= X-Patchwork-Id: 432578 X-Patchwork-Delegate: jogo@openwrt.org 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.1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 8415D140077 for ; Mon, 26 Jan 2015 04:36:47 +1100 (AEDT) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 3CED228BE25; Sun, 25 Jan 2015 18:34:15 +0100 (CET) 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_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id CEFD628BE1A for ; Sun, 25 Jan 2015 18:34:08 +0100 (CET) X-policyd-weight: using cached result; rate: -8.5 Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Sun, 25 Jan 2015 18:34:07 +0100 (CET) Received: by mail-wi0-f172.google.com with SMTP id h11so5839311wiw.5 for ; Sun, 25 Jan 2015 09:36:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=Iy8x/+CFRM+hFSC6mwkN9FXZJA2lM+TGaKyfBbkjo5s=; b=BfsVOdKRJkidYA3aELYgxK2ol6phgivKz5kjSw5NU2a5Lq/+PTF4YGxU5q2GDJfRLi 8QBFgFn4ZjHOWUijwYIo6hO69DLyq2TKBgLuU5tzFycPq6jDaY6Z3G1IHcTllVxaMM5O u+pLt8BZBZ+vYq/1YvaZR7gjrvJQDnyD/sZS8496wkLDl+GFys/nmwnDW2ihKvScfi+R sYVHlplidKr671g6paJNm1E5L9OCoE+N/mX4bu2MvduclV2jutDIUJqxiFNt86wFw+Kw HprdL5WOrOZBsMYIw+OJ4jDWcLObIy23VlcTsAiX7eSkSDdsTAlwMtayD1r+Zy7w6Cz1 LKIQ== X-Received: by 10.180.74.52 with SMTP id q20mr13083633wiv.0.1422207390755; Sun, 25 Jan 2015 09:36:30 -0800 (PST) Received: from [192.168.1.10] (240.Red-83-49-122.dynamicIP.rima-tde.net. [83.49.122.240]) by mx.google.com with ESMTPSA id r3sm10550325wic.10.2015.01.25.09.36.29 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Jan 2015 09:36:30 -0800 (PST) Message-ID: <54C52998.3060402@gmail.com> Date: Sun, 25 Jan 2015 18:36:24 +0100 From: =?windows-1252?Q?=C1lvaro_Fern=E1ndez_Rojas?= User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: OpenWrt Development List , Jonas Gorski References: <5488DC9C.3000504@gmail.com> <54C528DE.8030504@gmail.com> In-Reply-To: <54C528DE.8030504@gmail.com> Subject: [OpenWrt-Devel] [PATCH V3 2/5] brcm63xx: prefer DT GPIOs over legacy 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" Signed-off-by: Álvaro Fernández Rojas diff --git a/target/linux/brcm63xx/patches-3.14/377-DT-GPIO-over-legacy.patch b/target/linux/brcm63xx/patches-3.14/377-DT-GPIO-over-legacy.patch new file mode 100644 index 0000000..f56c8ca --- /dev/null +++ b/target/linux/brcm63xx/patches-3.14/377-DT-GPIO-over-legacy.patch @@ -0,0 +1,43 @@ +--- a/arch/mips/bcm63xx/boards/board_common.c ++++ b/arch/mips/bcm63xx/boards/board_common.c +@@ -204,6 +204,10 @@ int __init board_register_devices(void) + } + #endif + ++ if (!board_of_device_present("gpio0")) { ++ bcm63xx_gpio_init(); ++ } ++ + if (board.has_uart0) + bcm63xx_uart_register(0); + +@@ -269,7 +273,7 @@ int __init board_register_devices(void) + while (led_count < ARRAY_SIZE(board.leds) && board.leds[led_count].name) + led_count++; + +- if (led_count) { ++ if (led_count && !board_of_device_present("gpio0")) { + bcm63xx_led_data.num_leds = led_count; + bcm63xx_led_data.leds = board.leds; + +@@ -284,7 +288,7 @@ int __init board_register_devices(void) + while (button_count < ARRAY_SIZE(board.buttons) && board.buttons[button_count].desc) + button_count++; + +- if (button_count) { ++ if (button_count && !board_of_device_present("gpio0")) { + bcm63xx_gpio_keys_data.nbuttons = button_count; + bcm63xx_gpio_keys_data.buttons = board.buttons; + +--- a/arch/mips/bcm63xx/prom.c ++++ b/arch/mips/bcm63xx/prom.c +@@ -54,9 +54,6 @@ void __init prom_init(void) + reg &= ~mask; + bcm_perf_writel(reg, PERF_CKCTL_REG); + +- /* register gpiochip */ +- bcm63xx_gpio_init(); +- + /* detect and setup flash access */ + bcm63xx_flash_detect(); + diff --git a/target/linux/brcm63xx/patches-3.18/375-DT-GPIO-over-legacy.patch b/target/linux/brcm63xx/patches-3.18/375-DT-GPIO-over-legacy.patch new file mode 100644 index 0000000..f56c8ca --- /dev/null +++ b/target/linux/brcm63xx/patches-3.18/375-DT-GPIO-over-legacy.patch @@ -0,0 +1,43 @@ +--- a/arch/mips/bcm63xx/boards/board_common.c ++++ b/arch/mips/bcm63xx/boards/board_common.c +@@ -204,6 +204,10 @@ int __init board_register_devices(void) + } + #endif + ++ if (!board_of_device_present("gpio0")) { ++ bcm63xx_gpio_init(); ++ } ++ + if (board.has_uart0) + bcm63xx_uart_register(0); + +@@ -269,7 +273,7 @@ int __init board_register_devices(void) + while (led_count < ARRAY_SIZE(board.leds) && board.leds[led_count].name) + led_count++; + +- if (led_count) { ++ if (led_count && !board_of_device_present("gpio0")) { + bcm63xx_led_data.num_leds = led_count; + bcm63xx_led_data.leds = board.leds; + +@@ -284,7 +288,7 @@ int __init board_register_devices(void) + while (button_count < ARRAY_SIZE(board.buttons) && board.buttons[button_count].desc) + button_count++; + +- if (button_count) { ++ if (button_count && !board_of_device_present("gpio0")) { + bcm63xx_gpio_keys_data.nbuttons = button_count; + bcm63xx_gpio_keys_data.buttons = board.buttons; + +--- a/arch/mips/bcm63xx/prom.c ++++ b/arch/mips/bcm63xx/prom.c +@@ -54,9 +54,6 @@ void __init prom_init(void) + reg &= ~mask; + bcm_perf_writel(reg, PERF_CKCTL_REG); + +- /* register gpiochip */ +- bcm63xx_gpio_init(); +- + /* detect and setup flash access */ + bcm63xx_flash_detect(); +