summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/xscale
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2021-08-28 19:15:48 +0200
committerDavid S. Miller <davem@davemloft.net>2021-08-30 09:59:11 +0100
commite9e506221b425f3c48fbace164d9d7543643ff1f (patch)
treed07779fa175f466a13cb903ad12ca773030b047b /drivers/net/ethernet/xscale
parent323fb75dae2808750a87250ffc502ba10c231dad (diff)
ixp4xx_eth: Probe the PTP module from the device tree
This adds device tree probing support for the PTP module adjacent to the ethernet module. It is pretty straight forward, all resources are in the device tree as they come to the platform device. Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/xscale')
-rw-r--r--drivers/net/ethernet/xscale/ptp_ixp46x.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/net/ethernet/xscale/ptp_ixp46x.c b/drivers/net/ethernet/xscale/ptp_ixp46x.c
index c7ff150bf23f..ecece21315c3 100644
--- a/drivers/net/ethernet/xscale/ptp_ixp46x.c
+++ b/drivers/net/ethernet/xscale/ptp_ixp46x.c
@@ -6,6 +6,7 @@
*/
#include <linux/device.h>
#include <linux/module.h>
+#include <linux/mod_devicetable.h>
#include <linux/err.h>
#include <linux/init.h>
#include <linux/interrupt.h>
@@ -311,9 +312,19 @@ static int ptp_ixp_probe(struct platform_device *pdev)
return 0;
}
+static const struct of_device_id ptp_ixp_match[] = {
+ {
+ .compatible = "intel,ixp46x-ptp-timer",
+ },
+ { },
+};
+
static struct platform_driver ptp_ixp_driver = {
- .driver.name = "ptp-ixp46x",
- .driver.suppress_bind_attrs = true,
+ .driver = {
+ .name = "ptp-ixp46x",
+ .of_match_table = ptp_ixp_match,
+ .suppress_bind_attrs = true,
+ },
.probe = ptp_ixp_probe,
};
module_platform_driver(ptp_ixp_driver);