Message ID | 20200503144120.30038-8-peng.fan@nxp.com |
---|---|
State | Accepted |
Commit | 580fab4a821d50021f251452a6a3c056f0280941 |
Delegated to: | Stefano Babic |
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=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.a=rsa-sha256 header.s=selector2 header.b=VS12/GxV; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 49FSmz4vdqz9sSW for <incoming@patchwork.ozlabs.org>; Mon, 4 May 2020 00:20:03 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D2A9781F11; Sun, 3 May 2020 16:18:54 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=nxp.com header.i=@nxp.com header.b="VS12/GxV"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 33A0A81F09; Sun, 3 May 2020 16:18:47 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FORGED_SPF_HELO,MSGID_FROM_MTA_HEADER, SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2061c.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e1b::61c]) (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 3D10D81994 for <u-boot@lists.denx.de>; Sun, 3 May 2020 16:18:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=peng.fan@nxp.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Sh70642eVrwAtTHJcEskZnk+2UiABMsACriQlluMdfA6kaugVa6Pt2T4THuIDCkB1tP24L4Tes3f5x9C/qy7T4WNQQ97XlvAyngCh/cNFS8GXUEfW0/hqHlkKVE+gG8KNn18BEXDyvVF71u1JpmjwTO270l5DvjNIqAeebYZ3DKxbPyWVaOodC91+QIYsgi5I1vIqB8EjpNAYKKXuHQYlnflI60abmV8uvg0eUMkLulVVTpeiSlw0nosmKXifaLFGr53PPEGmoM+SnPCfuJeX/j51oFvm9zeT+Wol0Uf+2R1DA9PdCZDfMr0PCIqM3K0Me3tNsPSnCdUyJWTOHxpig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4QCZKDfZmHwt6qrF5Ma1V7diPZAngQSt/qwgh1awm4s=; b=nwLJJ6BpHaTap8irmXtWsNlw4H8SsaG7cDwkLYFuo+4buyqeTS419+gWQrbxdGSsKYFJS0aloCNhdQYn37hV6gxoXGxF8ID/DPTo855HUpi3ZwK3QYQybbShaYpNgj3+FFknUyQ/4yS+R0ZyEFpENrZA0OvW0uaw4NOyM5WnPtbRje+KidTI7ZPr7DySVXdXlnKaEm/7qPkzEiuFDnyMRHrWpjvZak3advkgcsrIZk17pllVP2oK47nv1rp+GQ27MIs+5K4JQ68BWGmmr0S35Nt4X2kif+fdgp3aKG1ESveqgjAZiCJeLPqrgb6RTj+HhX7wv2fnPCUiP3I58Qog3A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4QCZKDfZmHwt6qrF5Ma1V7diPZAngQSt/qwgh1awm4s=; b=VS12/GxVW/aCPeG7z69PPs34cKnz9EPjUAdzxpYTzstpp2bDdAFajjdyYMyWdXHhzoFcDQyOOQV28QpxIlex5RXpIPlrivpDLU5Gnd7glZ1UPvGHaR6DH44bnG8tZTryAfqCrmUuDoYGzgX6rCwjF2fVEV/4uGhWS9WvPNx89ZM= Authentication-Results: ni.com; dkim=none (message not signed) header.d=none;ni.com; dmarc=none action=none header.from=nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB6PR0402MB2902.eurprd04.prod.outlook.com (2603:10a6:4:9a::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.20; Sun, 3 May 2020 14:18:42 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d17b:d767:19c3:b871]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::d17b:d767:19c3:b871%6]) with mapi id 15.20.2958.029; Sun, 3 May 2020 14:18:42 +0000 From: Peng Fan <peng.fan@nxp.com> To: joe.hershberger@ni.com Cc: sbabic@denx.de, ccaione@baylibre.com, u-boot@lists.denx.de, uboot-imx@nxp.com, Ye Li <ye.li@nxp.com>, Peng Fan <peng.fan@nxp.com> Subject: [PATCH V2 8/8] eQos: Implement the read_rom_hwaddr callback Date: Sun, 3 May 2020 22:41:20 +0800 Message-Id: <20200503144120.30038-8-peng.fan@nxp.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20200503144120.30038-1-peng.fan@nxp.com> References: <20200503144120.30038-1-peng.fan@nxp.com> Content-Type: text/plain X-ClientProxiedBy: SG2PR03CA0090.apcprd03.prod.outlook.com (2603:1096:4:7c::18) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from linux-1xn6.ap.freescale.net (119.31.174.71) by SG2PR03CA0090.apcprd03.prod.outlook.com (2603:1096:4:7c::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.14 via Frontend Transport; Sun, 3 May 2020 14:18:39 +0000 X-Mailer: git-send-email 2.16.4 X-Originating-IP: [119.31.174.71] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 6fe7a39f-a8be-4745-3333-08d7ef6ce1a9 X-MS-TrafficTypeDiagnostic: DB6PR0402MB2902:|DB6PR0402MB2902: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: <DB6PR0402MB2902FADA4BD2D68B5EB1EA9288A90@DB6PR0402MB2902.eurprd04.prod.outlook.com> X-MS-Oob-TLC-OOBClassifiers: OLM:3513; X-Forefront-PRVS: 0392679D18 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1oYql0ohfQNYly+Pde0GkOaL+C5cKlK3ROCh8inpf6GwrbUX39bLbIOd/SBmNDyQGhEMxWEzHC79EWvnxmSSnIycJCSnSc2N4XcUyxODYZ7FJndqx17QYQUMYVEva/G+BcFh0udPY3W9ToR07JW2kpXGUdu/e81UddTnJ91OAFI7zVPyeBDUGgsHuDblWeCJlHDo7ASLRukVbMW8na8aG3cVK2XhMQbDDJ0ayEjM8KJhBQRA5HYo0qe1TE44kKdw1TMGZWb2CbzPNerhjJjvMD4YiRHK6RHtbN12inYyWWbJuK4Kyuzvxi00f3M/j1lliGPIwNdaZ5fFpranCcKzzaoaIxuEmbQbgMrnjpfS/QouCs0a0/kMOiMS4AKFrYPuokJBciuXFBX6Ghv1wGI0dgxjU7FHIzeRHl7WkHCS5Bm1NDb0rs1JeO31yNY+7BqI X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(346002)(376002)(136003)(39860400002)(396003)(366004)(44832011)(36756003)(8676002)(956004)(2616005)(2906002)(1076003)(26005)(66946007)(16526019)(186003)(66476007)(66556008)(6506007)(6512007)(6916009)(4326008)(6486002)(52116002)(54906003)(5660300002)(86362001)(316002)(6666004)(8936002)(478600001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 5tawU5w5WBku9jWmEyPnqG/s5XJzvy16x5bjOzkaFnNCR9j/aj7kwtgMC81DIOrH63FQp5OhuxQQkN/OhRq+2qD3KX1AGWh5PvDfdbZiePTnpBQZ/WtwVI/qA/QitndtLAEIf+27nMGlyBk+zzccGwCJfnfQ2MRSVSUdQGHVLThhdIlCTACPgT0TBP7vnEBeeX25sf6O9cUiGwaWjSgPA1AW6uuAfNbfxilusoSLHt1k4WV12PHv83a1SGNjMQ2RyRZt7XqAoPfYKSZGloHNJ3IYSF+ABFlO9pzS6BUeQzNEe4xDoWvuDSc3d6K/hfbBBxCvmbb1LvEeWWwKXZGvmA6LOMfo26iGLi3YX3TGMY/2tbItqeokpsqlM1ppgIgksni64tuDvkBxtw3y7fKlwpkJw3HkSzAK8cfSCzB5xNGL3JhelvX8l9UkRw7hHpqhltF+HRhLMFWgfr1PE0/tp6nl0IRsPvMFiAKtOSAJPGweSqu3Uv7cL3RizefQEE9GxORaZsA4Pvfz+l+SUBImeVwoM6/jJ36m5fHaVMQffXRGfaybf8uBnqglumiS44FA/2tPZd1EqJI3fvZuusTH5rjuUgTy01HEF2ISF8aYyUmNTtUi3V8KbmFwwRmA46PCM6jWuMqFAi4cG8IL5K66/J/wT2WAqA4NhqGX4yg10k+E7Y58TBRREz6+YUAkC9XRDS1hSq9YO0mu1z5vfKYqfPferGH9v7/xHbxFZpCj1ZAn7PrG1JB7Iiwzjxwe40XbKBvJp5wWXUKDG1ycWGN9YKjbtQmwDQWxWgmMdficSds= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6fe7a39f-a8be-4745-3333-08d7ef6ce1a9 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 May 2020 14:18:42.0791 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: FUmO4mw3MWlXm++ZBParHiCL7FWSnzYam26AvEz4/e8qiWFdpFMXidjFN0vTHjx5ZnFCZAdao8U6wERKovCl8w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0402MB2902 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 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.2 at phobos.denx.de X-Virus-Status: Clean |
Series |
[V2,1/8] net: eth-uclass: add return value check
|
expand
|
> From: Ye Li <ye.li@nxp.com> > Implement the read_rom_hwaddr callback to load MAC address from fuse > for imx8m platforms. > Reviewed-by: Fugang Duan <fugang.duan@nxp.com> > Signed-off-by: Ye Li <ye.li@nxp.com> > Signed-off-by: Peng Fan <peng.fan@nxp.com> Applied to u-boot-imx, master, thanks ! Best regards, Stefano Babic
diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c index 15dae20e57..55a35db739 100644 --- a/drivers/net/dwc_eth_qos.c +++ b/drivers/net/dwc_eth_qos.c @@ -1145,6 +1145,16 @@ static int eqos_write_hwaddr(struct udevice *dev) return 0; } +static int eqos_read_rom_hwaddr(struct udevice *dev) +{ + struct eth_pdata *pdata = dev_get_platdata(dev); + +#ifdef CONFIG_ARCH_IMX8M + imx_get_mac_from_fuse(dev->req_seq, pdata->enetaddr); +#endif + return !is_valid_ethaddr(pdata->enetaddr); +} + static int eqos_start(struct udevice *dev) { struct eqos_priv *eqos = dev_get_priv(dev); @@ -2058,6 +2068,7 @@ static const struct eth_ops eqos_ops = { .recv = eqos_recv, .free_pkt = eqos_free_pkt, .write_hwaddr = eqos_write_hwaddr, + .read_rom_hwaddr = eqos_read_rom_hwaddr, }; static struct eqos_ops eqos_tegra186_ops = {