Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3707548rwb; Sun, 9 Oct 2022 09:35:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5yN2uZPM8ryr8R5g9odWbAf+DG+hFEy7shY//YKi4jQ54km6U1FWHHUMcvzarbO+Uyh+sY X-Received: by 2002:a05:6402:1941:b0:457:13a:cce9 with SMTP id f1-20020a056402194100b00457013acce9mr14324144edz.265.1665333352644; Sun, 09 Oct 2022 09:35:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665333352; cv=none; d=google.com; s=arc-20160816; b=wC7UkFylNg3BSKgFUmgGeWpUYIIPwfc/HNxOvdPldClzynVoJKIwkvnHxJ5BY+oGN9 gZimh/YCqHwKwEyXDdnfxhM0Ae+DjF5nYR3w0G/ax3peVMvRayrswbRv9oTJ86bS/sPm m1VTLp89pUUFForu5wuXrn6UGw+GXdZXTffcFTI8KoTbLT+knR2mteq2z50MmZPXGSr9 Cb7oJDV1fpZEEoJO2J2aS8531okPYe0SUMFkJSWJheYmpxmyVPimH9VY/2GZHQZKL+HM LNdHjnyoPIT2uEwWK/bDMsKNyOEPRA6x9Oxt4Gg8MKfT4MM4eSEoYj0zmcJ779Hdvrnf 94sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=SO1TmYRzVoHklfVWV2veG4c4uoDkHH0U7qb+EJZK12w=; b=LXZtBZpTSh7/wE3hN2NHOTt8WS89WZzxXxymO9dHUpFlCrlwns+KpFiGfpZbqjNeVM dibTqrKCmU+Tr8c3nnmW9JANFi3nl/7p/P404liECMJ3jVKS1JuWUUD9N6nKLHLerguU AsJ0YTAmJu4MITKeV8QmhxnWXEiH83bXQrn/CBIVqhUjB14e1Q00RGX9/84LpJVAAaQD aUFDrUXGPDOjuI6kwUc3lhJA+w5B18jig1c9i3WPgSdBJmi0D4sgJcvPxE2pom2mRAzA jjeiyFs9ithRT0PQFkmgIZXO1/KeFeka4dw2aYwAbPbjlnqK3d1NdNGKtjoifFlzWYKs 1U4w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=lohu.info Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dd17-20020a1709069b9100b00781b6ce15e1si7927631ejc.101.2022.10.09.09.35.24; Sun, 09 Oct 2022 09:35:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=lohu.info Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229973AbiJIQX7 (ORCPT + 99 others); Sun, 9 Oct 2022 12:23:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229980AbiJIQXm (ORCPT ); Sun, 9 Oct 2022 12:23:42 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.154.221.58]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5A622B185; Sun, 9 Oct 2022 09:23:40 -0700 (PDT) X-QQ-mid: bizesmtp62t1665332600t7odh38m Received: from localhost.localdomain ( [58.247.70.42]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 10 Oct 2022 00:23:19 +0800 (CST) X-QQ-SSF: 01100000002000G0Z000B00A0000000 X-QQ-FEAT: fs34Pe/+C2TRRIMPMY6EuhGRcUlkuDlYD9T688osuzNd+aO2IxqPU9q1csLTw eFvw7YdWc7ddI4mcnGNno6LMd5RRTKOU3o4pm59a/QzJ5sg/ZHe/a6ikOh3WroOuMhHt5DW BDRWG39HUU+0u/KphSyO8RYDbpquNmiDllqQ/FdmxrFVfLM63tcmJyKRJYhsVUGq9sGDrEW jZ5IVnEuu+xs3GW04ZfkSJui5CEaYbYR/YiuuIFd2SJdqIKIGW005aT4rQoNvWQ2MPLfQ6Y 8x9kpnGSLP/vmbqrJ9AKAJAHJ+8kA2STRwXyD4/g8pKsyencxbVEL4+T8Fb0H9Ulas4V0uc Kd89urL8sK2v4GMhlNRSdVdE66v33MF9PdQ3EGjd7CQ1a9D5oxqkdiVD+plLA== X-QQ-GoodBg: 0 From: Soha Jin To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Yangyu Chen , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Soha Jin Subject: [PATCH 2/3] net: stmmac: add Phytium's PHYT0004 to dwmac-generic compatible devices Date: Mon, 10 Oct 2022 00:22:46 +0800 Message-Id: <20221009162247.1336-3-soha@lohu.info> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221009162247.1336-1-soha@lohu.info> References: <20221009162247.1336-1-soha@lohu.info> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:lohu.info:qybglogicsvr:qybglogicsvr3 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Phytium's GMAC devices (ACPI HID: PHYT0004) can be run by DWMAC's generic driver, add it to the match table. Signed-off-by: Soha Jin Tested-by: Yangyu Chen --- drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c index 4d272605a8b7..bde827bc7b72 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c @@ -66,7 +66,7 @@ static int dwmac_generic_probe(struct platform_device *pdev) return ret; } -static const struct of_device_id dwmac_generic_match[] = { +static const struct of_device_id dwmac_generic_match_of[] = { { .compatible = "st,spear600-gmac"}, { .compatible = "snps,dwmac-3.40a"}, { .compatible = "snps,dwmac-3.50a"}, @@ -80,7 +80,13 @@ static const struct of_device_id dwmac_generic_match[] = { { .compatible = "snps,dwxgmac"}, { } }; -MODULE_DEVICE_TABLE(of, dwmac_generic_match); +MODULE_DEVICE_TABLE(of, dwmac_generic_match_of); + +static const struct acpi_device_id dwmac_generic_match_acpi[] = { + {"PHYT0004"}, + {} +}; +MODULE_DEVICE_TABLE(acpi, dwmac_generic_match_acpi); static struct platform_driver dwmac_generic_driver = { .probe = dwmac_generic_probe, @@ -88,7 +94,8 @@ static struct platform_driver dwmac_generic_driver = { .driver = { .name = STMMAC_RESOURCE_NAME, .pm = &stmmac_pltfr_pm_ops, - .of_match_table = of_match_ptr(dwmac_generic_match), + .of_match_table = dwmac_generic_match_of, + .acpi_match_table = dwmac_generic_match_acpi }, }; module_platform_driver(dwmac_generic_driver); -- 2.30.2