From patchwork Wed Nov 17 12:51:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Padmarao Begari X-Patchwork-Id: 1556164 X-Patchwork-Delegate: uboot@andestech.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.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=nozC20zb; dkim-atps=neutral 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=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4HvNB35rwLz9s5P for ; Wed, 17 Nov 2021 23:52:27 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1605882F6F; Wed, 17 Nov 2021 13:52:24 +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="nozC20zb"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 743E682F8B; Wed, 17 Nov 2021 13:52:11 +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=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (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 5BD8C82F79 for ; Wed, 17 Nov 2021 13:52:01 +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=Padmarao.Begari@microchip.com DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1637153521; x=1668689521; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=XVvDypDT5EysfqmHNLn0agZO5foX8iiwCkslEH4XaV0=; b=nozC20zbCK1vizaNesUQt8AU0uUszCVq3hFUk5VoXDquVWwjdGMvzZjg 3uinrH0nSpV+8C3cFKbXRGmhfkgfKMAifS0KU+dB2HqpQ/raCxSpGKN6p tG1FaiFKYUxz1v9WJpSws7GNeu0uhWAfLd/XbLKhqRTGQnb6nY9I6kKV5 9tVGPLLCX6Nu3vku3xRdLXPsUjykqP+k5gnQXxPwUFn/wxbFpiDgrdbya ZF38FeWwCeZri0qlqfYxVU2yiWgvEl9uZv3xrO9ctTOl/NaBITbNX+8cz 0DSZXet7nW7cm9i/UWgGutniKooiQ1IvDlFVB9rHyn/R+P5hjhqNbAQLS g==; IronPort-SDR: T2xlfrq5hEL/+No3USgEbQwzuNEPaeai+dKeT8NUfWx3iM4miIKlbpHbFWn6p44oBXkL/RXsJF WC6E67DqoNhG13Yf+V5VbcuFLpj/1UqV96yKLZqBdoSeFIVJkJeJANFl9UuLKtszoLkZj6oyqn 8HeAgGfsmtyve4ZvL+Mwn0CFAPtKdImN3tPWxgJLmblrraEI6Ah6zl4mI36j21yaM1mE2F6x8g nM6psQ89xNv8yMl6v+h2Ej4sKBj5rD7MI9y38/DS7/IhAUUKVEPodqf1q6p0TKnjIQTP4gi8Rs nW2jTWprHDJZESA0+ER9HcW5 X-IronPort-AV: E=Sophos;i="5.87,241,1631602800"; d="scan'208";a="143657019" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 17 Nov 2021 05:51:59 -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.2176.14; Wed, 17 Nov 2021 05:51:58 -0700 Received: from padmarao-Vostro-460.microchip.com (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Wed, 17 Nov 2021 05:51:54 -0700 From: Padmarao Begari To: , , , , , CC: , , , , , , Padmarao Begari Subject: [PATCH v2 1/5] net: macb: Remove Microchip compatible string Date: Wed, 17 Nov 2021 18:21:15 +0530 Message-ID: <20211117125119.29846-2-padmarao.begari@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211117125119.29846-1-padmarao.begari@microchip.com> References: <20211117125119.29846-1-padmarao.begari@microchip.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.35 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.2 at phobos.denx.de X-Virus-Status: Clean Remove the microchip compatible string and default compatible "cdns,macb" support both 32-bit and 64-bit DMA access. Signed-off-by: Padmarao Begari Reviewed-by: Leo Yu-Chi Liang --- drivers/net/macb.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/drivers/net/macb.c b/drivers/net/macb.c index 8c6461e717..37eed59a69 100644 --- a/drivers/net/macb.c +++ b/drivers/net/macb.c @@ -1348,7 +1348,7 @@ static const struct macb_usrio_cfg macb_default_usrio = { .clken = MACB_BIT(CLKEN), }; -static const struct macb_config default_gem_config = { +static struct macb_config default_gem_config = { .dma_burst_length = 16, .hw_dma_cap = HW_DMA_CAP_32B, .clk_init = NULL, @@ -1383,8 +1383,13 @@ static int macb_eth_probe(struct udevice *dev) macb->is_big_endian = (cpu_to_be32(0x12345678) == 0x12345678); macb->config = (struct macb_config *)dev_get_driver_data(dev); - if (!macb->config) + if (!macb->config) { + if (IS_ENABLED(CONFIG_DMA_ADDR_T_64BIT)) { + if (GEM_BFEXT(DAW64, gem_readl(macb, DCFG6))) + default_gem_config.hw_dma_cap = HW_DMA_CAP_64B; + } macb->config = &default_gem_config; + } #ifdef CONFIG_CLK ret = macb_enable_clk(dev); @@ -1453,13 +1458,6 @@ static const struct macb_usrio_cfg sama7g5_usrio = { .clken = BIT(2), }; -static const struct macb_config microchip_config = { - .dma_burst_length = 16, - .hw_dma_cap = HW_DMA_CAP_64B, - .clk_init = NULL, - .usrio = &macb_default_usrio, -}; - static const struct macb_config sama5d4_config = { .dma_burst_length = 4, .hw_dma_cap = HW_DMA_CAP_32B, @@ -1502,8 +1500,6 @@ static const struct udevice_id macb_eth_ids[] = { { .compatible = "cdns,zynq-gem" }, { .compatible = "sifive,fu540-c000-gem", .data = (ulong)&sifive_config }, - { .compatible = "microchip,mpfs-mss-gem", - .data = (ulong)µchip_config }, { } };