diff options
author | Antoine Tenart <antoine.tenart@bootlin.com> | 2019-08-12 16:45:34 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-08-15 16:31:11 -0700 |
commit | 45bce1719cbd1ad3fb48f840accb1d120b6b0209 (patch) | |
tree | 25311896df07ed90c4d86f078cd3dcc9ec5e2764 /drivers/net/ethernet/mscc/ocelot_board.c | |
parent | Documentation/bindings: net: ocelot: document the PTP ready IRQ (diff) | |
download | linux-dev-45bce1719cbd1ad3fb48f840accb1d120b6b0209.tar.xz linux-dev-45bce1719cbd1ad3fb48f840accb1d120b6b0209.zip |
net: mscc: describe the PTP register range
This patch adds support for using the PTP register range, and adds a
description of its registers. This bank is used when configuring PTP.
Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mscc/ocelot_board.c')
-rw-r--r-- | drivers/net/ethernet/mscc/ocelot_board.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mscc/ocelot_board.c b/drivers/net/ethernet/mscc/ocelot_board.c index 2451d4a96490..990027f04d1b 100644 --- a/drivers/net/ethernet/mscc/ocelot_board.c +++ b/drivers/net/ethernet/mscc/ocelot_board.c @@ -182,6 +182,7 @@ static int mscc_ocelot_probe(struct platform_device *pdev) struct { enum ocelot_target id; char *name; + u8 optional:1; } res[] = { { SYS, "sys" }, { REW, "rew" }, @@ -189,6 +190,7 @@ static int mscc_ocelot_probe(struct platform_device *pdev) { ANA, "ana" }, { QS, "qs" }, { S2, "s2" }, + { PTP, "ptp", 1 }, }; if (!np && !pdev->dev.platform_data) @@ -205,8 +207,14 @@ static int mscc_ocelot_probe(struct platform_device *pdev) struct regmap *target; target = ocelot_io_platform_init(ocelot, pdev, res[i].name); - if (IS_ERR(target)) + if (IS_ERR(target)) { + if (res[i].optional) { + ocelot->targets[res[i].id] = NULL; + continue; + } + return PTR_ERR(target); + } ocelot->targets[res[i].id] = target; } |