Message ID | 20201205100316.179531-33-eugen.hristev@microchip.com |
---|---|
State | Accepted |
Commit | a07d2a1121a724733d61f157a2d8b546737c80ae |
Delegated to: | Eugen Hristev |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=fail (p=quarantine dis=none) header.from=microchip.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=microchip.com header.i=@microchip.com header.a=rsa-sha256 header.s=mchp header.b=veKUSbgS; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Cp50k2qfdz9sWP for <incoming@patchwork.ozlabs.org>; Sat, 5 Dec 2020 21:09:58 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 152C182764; Sat, 5 Dec 2020 11:06:46 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=quarantine dis=none) header.from=microchip.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=microchip.com header.i=@microchip.com header.b="veKUSbgS"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1A82582764; Sat, 5 Dec 2020 11:06:45 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from esa5.microchip.iphmx.com (esa5.microchip.iphmx.com [216.71.150.166]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 388AE824A4 for <u-boot@lists.denx.de>; Sat, 5 Dec 2020 11:06:42 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=microchip.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=Eugen.Hristev@microchip.com DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1607162803; x=1638698803; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=widM8lJ8j3yAKlxCOE+6QH8HlPaq8Ck1CjwyNa6Pu6I=; b=veKUSbgSiL1B107/+ajjzUtE/ttIkJGP4Retl/16D3+OBdKYRoG9WM3e MoF+NdSu5FgD9jn6cER01WPq640WB6DuqC/52ddAde9Y/H+G/hQ+5JSJX EWfowY2VTvm8NqudaP0CG04nNcfnXqaj1NPB3YefbhvmNj64ZJixGpP/Z bExOj7QTmt0Z+8FW9zqAU6kLsgyIit5fcDiOp3yKRtAQA7D24MVzM6W/Q j5R86R2wEI42L0fB+UHWbBoIUxJGiMsdaBqzJwFDdVokJeYNR8Fo0IbQl vZJA5dofZul2bFyOFujb+yYbMHmLfjpD/KNUj3K2dTwl4TLW+PlfN5hK2 A==; IronPort-SDR: SAV2Ffrq1FDmN96MXbEPihK89rDKAUuud/2d6Vfq4VMUdYRzl5xjSSr3TcMImi6l5g3SLkp5UZ p3tU6qMaebthdwlsloZ8eAimqvTB1QaL+2DnWQiSLELb07gQkbxGcA95sBeK7ZvMVo+tfc75i4 OKPxXq61pOF5gwot+bgQbqO/EQ99Ruwx0UOIzMnukZrOFTMEfzyUO2bmTTarCmG3NW/dYZ1dYD Ib03RtaMiZZ6QSPBLl0bdyZHApj9Mw3pz6Y6DentCIRMz0WYtpi1G7au4lpgosrWpgwxpV7Ym5 MiM= X-IronPort-AV: E=Sophos;i="5.78,395,1599548400"; d="scan'208";a="101036082" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 05 Dec 2020 03:06:41 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Sat, 5 Dec 2020 03:06:40 -0700 Received: from ROB-ULT-M18282.microchip.com (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.1979.3 via Frontend Transport; Sat, 5 Dec 2020 03:06:38 -0700 From: Eugen Hristev <eugen.hristev@microchip.com> To: <u-boot@lists.denx.de> CC: <claudiu.beznea@microchip.com>, <nicolas.ferre@microchip.com>, <eugen.hristev@microchip.com> Subject: [PATCH v2 32/34] board: atmel: sama7g5ek: add support for MAC address retreival Date: Sat, 5 Dec 2020 12:03:14 +0200 Message-ID: <20201205100316.179531-33-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201205100316.179531-1-eugen.hristev@microchip.com> References: <20201205100316.179531-1-eugen.hristev@microchip.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean |
Series |
Sama7g5 Evaluation Kit support
|
expand
|
diff --git a/board/atmel/sama7g5ek/sama7g5ek.c b/board/atmel/sama7g5ek/sama7g5ek.c index 42b032cf36..b5cece08ac 100644 --- a/board/atmel/sama7g5ek/sama7g5ek.c +++ b/board/atmel/sama7g5ek/sama7g5ek.c @@ -46,6 +46,19 @@ int board_early_init_f(void) return 0; } +#define MAC24AA_MAC_OFFSET 0xfa + +#if (IS_ENABLED(CONFIG_MISC_INIT_R)) +int misc_init_r(void) +{ +#if (IS_ENABLED(CONFIG_I2C_EEPROM)) + at91_set_ethaddr(MAC24AA_MAC_OFFSET); + at91_set_eth1addr(MAC24AA_MAC_OFFSET); +#endif + return 0; +} +#endif + int board_init(void) { /* address of boot parameters */ @@ -61,8 +74,3 @@ int dram_init(void) return 0; } -int misc_init_r(void) -{ - return 0; -} -
Obtain two MAC addresses from the two EEPROMs and configure the two available Ethernet interfaces accordingly. Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com> --- board/atmel/sama7g5ek/sama7g5ek.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-)