From patchwork Thu Nov 22 09:07:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 10693709 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E2BCB5A4 for ; Thu, 22 Nov 2018 09:08:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D3E622C2FE for ; Thu, 22 Nov 2018 09:08:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C76C12C302; Thu, 22 Nov 2018 09:08:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 413B62C2F1 for ; Thu, 22 Nov 2018 09:08:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=kN1WCJV3O24P7WpvxaxFPN34vSFOAJfupupUA4requg=; b=GkzCCt3m5Uwohh rjfflS3d3jTjuG45BOUkkXZ5LYFGvGYGwHNA6WnVWOyWRMWgkTY0KOYSYSe7WJOBRoBdwyUQx+S8q Tlwg9amiVamu+REpdwYZNXtnLcEcVPn8BQjQpbh1ZGTN8J5ySVz1BE1zjNy2gtnz0z2bGOtbcHzBx /bi1rz6MC6UcQ02sBm3Fw9W7oo6d0qzFNypB2TiE+oJyeJvzMjj9P+z33gCECZsdI1x5ERgHs0n30 kZeiA6YPf5gylMkcnqsOyEE8YoBgv9ck8uNYQYTo7VCOXHSMAI/ZxVMJr0pQKMHBM0HiZI9KFG8eA kZLqA8ZuJtNMDn0RCWdg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gPky7-0008J3-Ud; Thu, 22 Nov 2018 09:08:15 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gPkxs-0007xd-Ic for linux-amlogic@lists.infradead.org; Thu, 22 Nov 2018 09:08:04 +0000 Received: by mail-wr1-x444.google.com with SMTP id t27so484376wra.6 for ; Thu, 22 Nov 2018 01:07:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wUetj3FSyjOoNhfjkR7/JNYOs+lmAq6PVGym8rFfP6w=; b=aOKPGu0yrD2eQ2XWh63q7kqo/HuvqqZQ3wF+2IkuTo4QsOnPRDuwc+R1oBvnhVGglG i1DUrd3PeOnh7qr+ftfUh5SF16khC1khcBgfYzndXdPS5QMhi7Ul929Gq1PrQboiQwB0 /wHHwNrYAkjepJmkdGXZA9CXQGtQR4A3YMFrxUNxcjndKDb+TAQBRWBhNotWOCO615NK OYAfNbeWaJR0KAK1AFqXpWSOUzUAk9AviRxeDSYl/K2AYpAbQuQNnfdOoBDFG+jUu6K9 ssySsZLqx7HXBgUbYOYkNrHTB69UxucG5stqkxZdy2HUtTshdu0pm9oGgRrtI0ECeUq8 SCKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wUetj3FSyjOoNhfjkR7/JNYOs+lmAq6PVGym8rFfP6w=; b=hhme3zgXhTcUOpAdTf9fnl1MHgC8/3xL4EUrPz98v9bjbVF5LcvYNXG01XCF5uLh4R rAfrxjhejcQ8zaNBic3vvE28ErazMEmkUVQPdv8SqvJ2UCdikXTiwASyq2baLGtOy6xj BPelNdVcP/UYKRdwKe78O5UHiuwpTAAdBFiFawqRLvfY9rxlCo7R19mA0fhFKGxWN6Wg POrG61N0F+gRSvO0CyEdnRAuNC/z4bM05ydnyG4kQKpHZ0lCy9TlZHzvYh037ElcvxYA tLqKw4dY8bs98nGLBW/QDM15+Ojphyg7qe4tY1FuyBy+8PyIuldXHbiwE9ULZRUTXoI8 UEAg== X-Gm-Message-State: AA+aEWZbBHCIeYpaWHQHWxsp+yXjX4jhsLOj9OPBYaiDTLuJ2TuoWV1e Pu6VTYks3zpUww0C396n/IW0Fg== X-Google-Smtp-Source: AFSGD/VqAviVk04h0Uqpm28uQPwozKWIkGIEUWlyoID0Oua+B2oDdXMCbRjaIsPwPxijB9cfEHVaFA== X-Received: by 2002:adf:e846:: with SMTP id d6mr9127580wrn.72.1542877668928; Thu, 22 Nov 2018 01:07:48 -0800 (PST) Received: from bender.baylibre.local (lmontsouris-657-1-212-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.gmail.com with ESMTPSA id y9sm13856434wrq.55.2018.11.22.01.07.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 22 Nov 2018 01:07:48 -0800 (PST) From: Neil Armstrong To: u-boot@lists.denx.de Subject: [PATCH u-boot v2 05/19] board: amlogic: factorise gxbb boards Date: Thu, 22 Nov 2018 10:07:26 +0100 Message-Id: <20181122090740.29739-6-narmstrong@baylibre.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181122090740.29739-1-narmstrong@baylibre.com> References: <20181122090740.29739-1-narmstrong@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181122_010800_617860_E7687FEB X-CRM114-Status: GOOD ( 13.63 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-amlogic@lists.infradead.org, Neil Armstrong , trini@konsulko.com, Jerome Brunet Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jerome Brunet The nanopi-k2 and the odroid-c2 are similar enough to be supported by the same u-boot board. This change use odroid-c2 u-boot board for the nanopi-k2 as well. Dedicated defconfig are kept to customize the names and device tree. Signed-off-by: Jerome Brunet Signed-off-by: Neil Armstrong --- arch/arm/mach-meson/Kconfig | 11 +--- board/amlogic/nanopi-k2/Kconfig | 12 ---- board/amlogic/nanopi-k2/MAINTAINERS | 6 -- board/amlogic/nanopi-k2/Makefile | 7 --- board/amlogic/nanopi-k2/nanopi-k2.c | 55 ------------------- board/amlogic/odroid-c2/MAINTAINERS | 1 + .../README => odroid-c2/README.nanopi-k2} | 0 .../odroid-c2/{README => README.odroid-c2} | 0 configs/nanopi-k2_defconfig | 2 +- 9 files changed, 3 insertions(+), 91 deletions(-) delete mode 100644 board/amlogic/nanopi-k2/Kconfig delete mode 100644 board/amlogic/nanopi-k2/MAINTAINERS delete mode 100644 board/amlogic/nanopi-k2/Makefile delete mode 100644 board/amlogic/nanopi-k2/nanopi-k2.c rename board/amlogic/{nanopi-k2/README => odroid-c2/README.nanopi-k2} (100%) rename board/amlogic/odroid-c2/{README => README.odroid-c2} (100%) diff --git a/arch/arm/mach-meson/Kconfig b/arch/arm/mach-meson/Kconfig index 98303dbda1..d86b1bed78 100644 --- a/arch/arm/mach-meson/Kconfig +++ b/arch/arm/mach-meson/Kconfig @@ -31,14 +31,7 @@ config TARGET_ODROID_C2 ODROID-C2 is a single board computer based on Meson GXBaby with 2 GiB of RAM, Gigabit Ethernet, HDMI, 4 USB, micro-SD slot, eMMC, IR receiver and a 40-pin GPIO header. - -config TARGET_NANOPI_K2 - bool "NANOPI_K2" - select MESON_GXBB - help - NANOPI_K2 is a single board computer based on Meson GXBaby - with 2 GiB of RAM, Gigabit Ethernet,AP6212 Wifi, HDMI, 4 USB, - micro-SD slot, eMMC, IR receiver and a 40-pin GPIO header. + You should also select this TARGET if you have an nanopi-k2 config TARGET_P212 bool "P212" @@ -69,8 +62,6 @@ config SYS_MALLOC_F_LEN source "board/amlogic/odroid-c2/Kconfig" -source "board/amlogic/nanopi-k2/Kconfig" - source "board/amlogic/p212/Kconfig" source "board/amlogic/q200/Kconfig" diff --git a/board/amlogic/nanopi-k2/Kconfig b/board/amlogic/nanopi-k2/Kconfig deleted file mode 100644 index 374bda200c..0000000000 --- a/board/amlogic/nanopi-k2/Kconfig +++ /dev/null @@ -1,12 +0,0 @@ -if TARGET_NANOPI_K2 - -config SYS_BOARD - default "nanopi-k2" - -config SYS_VENDOR - default "amlogic" - -config SYS_CONFIG_NAME - default "nanopi-k2" - -endif diff --git a/board/amlogic/nanopi-k2/MAINTAINERS b/board/amlogic/nanopi-k2/MAINTAINERS deleted file mode 100644 index 0452bd1fa1..0000000000 --- a/board/amlogic/nanopi-k2/MAINTAINERS +++ /dev/null @@ -1,6 +0,0 @@ -NANOPI-K2 -M: Neil Armstrong -S: Maintained -F: board/amlogic/nanopi-k2/ -F: include/configs/nanopi-k2.h -F: configs/nanopi-k2_defconfig diff --git a/board/amlogic/nanopi-k2/Makefile b/board/amlogic/nanopi-k2/Makefile deleted file mode 100644 index 7d9b666e76..0000000000 --- a/board/amlogic/nanopi-k2/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -# -# (C) Copyright 2018 Thomas McKahan -# -# SPDX-License-Identifier: GPL-2.0+ -# - -obj-y := nanopi-k2.o diff --git a/board/amlogic/nanopi-k2/nanopi-k2.c b/board/amlogic/nanopi-k2/nanopi-k2.c deleted file mode 100644 index ae29dd6fa4..0000000000 --- a/board/amlogic/nanopi-k2/nanopi-k2.c +++ /dev/null @@ -1,55 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * (C) Copyright 2018 Thomas McKahan - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#define EFUSE_SN_OFFSET 20 -#define EFUSE_SN_SIZE 16 -#define EFUSE_MAC_OFFSET 52 -#define EFUSE_MAC_SIZE 6 - -int board_init(void) -{ - return 0; -} - -int misc_init_r(void) -{ - u8 mac_addr[EFUSE_MAC_SIZE]; - char serial[EFUSE_SN_SIZE]; - ssize_t len; - - meson_gx_eth_init(PHY_INTERFACE_MODE_RGMII, 0); - - if (!eth_env_get_enetaddr("ethaddr", mac_addr)) { - len = meson_sm_read_efuse(EFUSE_MAC_OFFSET, - mac_addr, EFUSE_MAC_SIZE); - if (len == EFUSE_MAC_SIZE && is_valid_ethaddr(mac_addr)) - eth_env_set_enetaddr("ethaddr", mac_addr); - } - - if (!env_get("serial#")) { - len = meson_sm_read_efuse(EFUSE_SN_OFFSET, serial, - EFUSE_SN_SIZE); - if (len == EFUSE_SN_SIZE) - env_set("serial#", serial); - } - - return 0; -} - -int ft_board_setup(void *blob, bd_t *bd) -{ - meson_gx_init_reserved_memory(blob); - - return 0; -} diff --git a/board/amlogic/odroid-c2/MAINTAINERS b/board/amlogic/odroid-c2/MAINTAINERS index 699850fd0c..fd74d53bfe 100644 --- a/board/amlogic/odroid-c2/MAINTAINERS +++ b/board/amlogic/odroid-c2/MAINTAINERS @@ -1,5 +1,6 @@ ODROID-C2 M: Beniamino Galvani +M: Neil Armstrong S: Maintained F: board/amlogic/odroid-c2/ F: include/configs/odroid-c2.h diff --git a/board/amlogic/nanopi-k2/README b/board/amlogic/odroid-c2/README.nanopi-k2 similarity index 100% rename from board/amlogic/nanopi-k2/README rename to board/amlogic/odroid-c2/README.nanopi-k2 diff --git a/board/amlogic/odroid-c2/README b/board/amlogic/odroid-c2/README.odroid-c2 similarity index 100% rename from board/amlogic/odroid-c2/README rename to board/amlogic/odroid-c2/README.odroid-c2 diff --git a/configs/nanopi-k2_defconfig b/configs/nanopi-k2_defconfig index 5c8c747bf3..01196d6655 100644 --- a/configs/nanopi-k2_defconfig +++ b/configs/nanopi-k2_defconfig @@ -2,7 +2,7 @@ CONFIG_ARM=y CONFIG_ARCH_MESON=y CONFIG_SYS_TEXT_BASE=0x01000000 CONFIG_MESON_GXBB=y -CONFIG_TARGET_NANOPI_K2=y +CONFIG_TARGET_ODROID_C2=y CONFIG_DEBUG_UART_BASE=0xc81004c0 CONFIG_DEBUG_UART_CLOCK=24000000 CONFIG_IDENT_STRING=" nanopi-k2"