From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 332D0C433EF for ; Wed, 30 Mar 2022 22:09:12 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6FB5E841B3; Thu, 31 Mar 2022 00:08:20 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id C2A8A8419F; Thu, 31 Mar 2022 00:07:53 +0200 (CEST) Received: from mail-qt1-f169.google.com (mail-qt1-f169.google.com [209.85.160.169]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 722C184181 for ; Thu, 31 Mar 2022 00:07:45 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=tom.rini@gmail.com Received: by mail-qt1-f169.google.com with SMTP id z19so16394158qtw.2 for ; Wed, 30 Mar 2022 15:07:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QVOS23W7kxVhgqGG5GX0fdA/IN6fRGhHnBuNz8cgAiw=; b=069xEppgR1cPmMOgcR8fkKj3xhqx8ZvTlUXJvYEUXR4nO0YgH21aZXPoOT0X4TxjXN +Mm/DccP9KRaQYOeQpCEaByNbBSkMRparpKlU78T9NgIZDQlYe1rGLD/VYgxqruP/beN TsDQ5zHkTmhviuzyTyx2rwxMsUvCEquHmhOlQVHt1M1XsdNkqC6vBFEN+XnrBkwFM0fB g5NvAFdbO9PC5GUjW4U1pURj9MoGlBqNRM4ckDiYR1F374fSadF9SqnsrY2HNslSac3I Kc1EzqCQjg/pomfkp/SbdUIpmBsFGSLx49SLHXXR3GrFMEZy1tuh3natwhu0GtsZ3Q/6 D5oA== X-Gm-Message-State: AOAM532VOc5ryuGYOhvwbh1n1F/VCXRbmdxz+gR16OBzEOb3nBcsIPKB AMEuLb8gl4tADQEoMVJ1HejUBiQzqg== X-Google-Smtp-Source: ABdhPJysH2h8t39LdYyk2TgKH+SauRVfRZ1xLZ7uvXjQm4xHhfoNuIQUTypmSXAnevFV+ztDqRmPNg== X-Received: by 2002:a05:622a:1910:b0:2e1:ef94:63f1 with SMTP id w16-20020a05622a191000b002e1ef9463f1mr1670264qtc.360.1648678064130; Wed, 30 Mar 2022 15:07:44 -0700 (PDT) Received: from bill-the-cat.lan (2603-6081-7b01-cbda-2ef0-5dff-fedb-a8ba.res6.spectrum.com. [2603:6081:7b01:cbda:2ef0:5dff:fedb:a8ba]) by smtp.gmail.com with ESMTPSA id h2-20020ac85842000000b002e1ec550506sm17749694qth.87.2022.03.30.15.07.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Mar 2022 15:07:43 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Cc: Heiko Schocher Subject: [PATCH 08/25] corvus: Migrate CONFIG_*_LED out of CONFIG namespace Date: Wed, 30 Mar 2022 18:07:18 -0400 Message-Id: <20220330220735.908616-8-trini@konsulko.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220330220735.908616-1-trini@konsulko.com> References: <20220330220735.908616-1-trini@konsulko.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean This code is only used on the corvus platform, so migrate the LED on/off code to this platform and remove it from the CONFIG namespace. In theory, this should likely be moved to the modern GPIO LED driver as a further cleanup. Cc: Heiko Schocher Signed-off-by: Tom Rini --- board/siemens/corvus/board.c | 24 ++++++++++++++++++++++-- include/configs/corvus.h | 4 ---- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/board/siemens/corvus/board.c b/board/siemens/corvus/board.c index a6e1737be022..90fece7f958d 100644 --- a/board/siemens/corvus/board.c +++ b/board/siemens/corvus/board.c @@ -52,8 +52,28 @@ static void corvus_request_gpio(void) gpio_request(AT91_PIN_PD3, "USB1"); gpio_request(AT91_PIN_PB18, "SPICS1"); gpio_request(AT91_PIN_PB3, "SPICS0"); - gpio_request(CONFIG_RED_LED, "red led"); - gpio_request(CONFIG_GREEN_LED, "green led"); + gpio_request(AT91_PIN_PD31, "red led"); /* this is the user1 led */ + gpio_request(AT91_PIN_PD0, "green led"); /* this is the user2 led */ +} + +void red_led_on(void) +{ + gpio_set_value(AT91_PIN_PD31, 1); +} + +void red_led_off(void) +{ + gpio_set_value(AT91_PIN_PD31, 0); +} + +void green_led_on(void) +{ + gpio_set_value(AT91_PIN_PD0, 0); +} + +void green_led_off(void) +{ + gpio_set_value(AT91_PIN_PD0, 1); } static void corvus_nand_hw_init(void) diff --git a/include/configs/corvus.h b/include/configs/corvus.h index bb73201b54fe..4809b59ecc39 100644 --- a/include/configs/corvus.h +++ b/include/configs/corvus.h @@ -31,10 +31,6 @@ #define CONFIG_USART_BASE ATMEL_BASE_DBGU #define CONFIG_USART_ID ATMEL_ID_SYS -/* LED */ -#define CONFIG_RED_LED AT91_PIN_PD31 /* this is the user1 led */ -#define CONFIG_GREEN_LED AT91_PIN_PD0 /* this is the user2 led */ - /* SDRAM */ #define CONFIG_SYS_SDRAM_BASE ATMEL_BASE_CS6 #define CONFIG_SYS_SDRAM_SIZE 0x08000000 -- 2.25.1