From patchwork Mon Jun 20 18:27:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Tietz X-Patchwork-Id: 638203 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3rYK9t4Lygz9t0N for ; Tue, 21 Jun 2016 04:28:34 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D02D1A774C; Mon, 20 Jun 2016 20:27:34 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oxZuFenYKn0i; Mon, 20 Jun 2016 20:27:34 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D09E3A776C; Mon, 20 Jun 2016 20:27:20 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7169AA7704 for ; Mon, 20 Jun 2016 20:27:15 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ELxskFmDxHac for ; Mon, 20 Jun 2016 20:27:15 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail.moses.super-online.de (moses.super-online.de [5.9.156.4]) by theia.denx.de (Postfix) with ESMTPS id 4A2D6A7718 for ; Mon, 20 Jun 2016 20:27:06 +0200 (CEST) Received: by mail.moses.super-online.de (Postfix, from userid 303) id EB4D82840838; Mon, 20 Jun 2016 20:27:05 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on moses.super-online.de X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, RP_MATCHES_RCVD,URIBL_BLOCKED autolearn=ham version=3.3.2 Received: from mail.moses.super-online.de (localhost [127.0.0.1]) by mail.moses.super-online.de (Postfix) with ESMTP id E731828405E5 for ; Mon, 20 Jun 2016 20:27:02 +0200 (CEST) Received: from lightning.dresden.micronet24.de (dresden.micronet24.de [89.247.133.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: web53p1) by mail.moses.super-online.de (Postfix) with ESMTPSA id B59C528402C8 for ; Mon, 20 Jun 2016 20:27:02 +0200 (CEST) Received: from obelix.dresden.micronet24.de ([192.168.0.14]) by lightning.dresden.micronet24.de with esmtp (Exim 4.84_2) (envelope-from ) id 1bF3uX-0003oP-Qf for u-boot@lists.denx.de; Mon, 20 Jun 2016 20:27:01 +0200 Received: from localhost ([::1] helo=obelix.dresden.micronet24.de) by obelix.dresden.micronet24.de with esmtp (Exim 4.84_2) (envelope-from ) id 1bF3uX-0005ZP-Nw for u-boot@lists.denx.de; Mon, 20 Jun 2016 20:27:01 +0200 From: Benjamin Tietz To: u-boot@lists.denx.de Date: Mon, 20 Jun 2016 20:27:01 +0200 Message-ID: <20160620182701.21075.71891.stgit@obelix.dresden.micronet24.de> In-Reply-To: <20160620182505.21075.54136.stgit@obelix.dresden.micronet24.de> References: <20160620182505.21075.54136.stgit@obelix.dresden.micronet24.de> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-SA-Exim-Connect-IP: 192.168.0.14 X-SA-Exim-Mail-From: uboot@dresden.micronet24.de X-SA-Exim-Scanned: No (on lightning.dresden.micronet24.de); SAEximRunCond expanded to false X-Virus-Scanned: ClamAV SMTP VirusScan Subject: [U-Boot] [PATCH v2 12/22] STM32F429-discovery: led: disable board-specific code, if DM is selected X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Benjamin Tietz If the device-tree gpio selection is selected, the hardcoded board-specific led-initialization will fail. This will disable that code, if CONFIG_DM_GPIO is enabled. --- board/st/stm32f429-discovery/Makefile | 3 +++ include/configs/stm32f429-discovery.h | 10 +++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/board/st/stm32f429-discovery/Makefile b/board/st/stm32f429-discovery/Makefile index d94059d..34ee711 100644 --- a/board/st/stm32f429-discovery/Makefile +++ b/board/st/stm32f429-discovery/Makefile @@ -9,4 +9,7 @@ # obj-y := stm32f429-discovery.o + +ifndef CONFIG_DM_GPIO obj-y += led.o +endif diff --git a/include/configs/stm32f429-discovery.h b/include/configs/stm32f429-discovery.h index 9d275c0..04066ff 100644 --- a/include/configs/stm32f429-discovery.h +++ b/include/configs/stm32f429-discovery.h @@ -42,17 +42,21 @@ #define CONFIG_ENV_SECT_SIZE (128 << 10) #define CONFIG_ENV_SIZE (8 << 10) -#define CONFIG_BOARD_SPECIFIC_LED +#define CONFIG_GPIO_LED 1 +#ifndef CONFIG_DM_GPIO #define CONFIG_RED_LED 110 #define CONFIG_GREEN_LED 109 -#define CONFIG_GPIO_LED 1 -#define CONFIG_STATUS_LED +#ifdef CONFIG_STATUS_LED +#define CONFIG_BOARD_SPECIFIC_LED +#define STATUS_LED_RED CONFIG_RED_LED #define STATUS_LED_BIT CONFIG_RED_LED #define STATUS_LED_STATE 0 #define STATUS_LED_PERIOD 0 #define STATUS_LED_BIT1 CONFIG_GREEN_LED #define STATUS_LED_STATE1 0 #define STATUS_LED_PERIOD1 0 +#endif +#endif #define CONFIG_STM32_GPIO #define CONFIG_STM32_FLASH