net: ethernet: renesas: rcar_gen4_ptp: Break out to module
The Gen4 gPTP support will be shared between the existing Renesas Ethernet Switch driver and the upcoming Renesas Ethernet-TSN driver. In preparation for this break out the gPTP support to its own module. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
parent
be5f81d37f
commit
8c1c66235e
3 changed files with 19 additions and 2 deletions
|
@ -44,7 +44,16 @@ config RENESAS_ETHER_SWITCH
|
||||||
select CRC32
|
select CRC32
|
||||||
select MII
|
select MII
|
||||||
select PHYLINK
|
select PHYLINK
|
||||||
|
select RENESAS_GEN4_PTP
|
||||||
help
|
help
|
||||||
Renesas Ethernet Switch device driver.
|
Renesas Ethernet Switch device driver.
|
||||||
|
|
||||||
|
config RENESAS_GEN4_PTP
|
||||||
|
tristate "Renesas R-Car Gen4 gPTP support" if COMPILE_TEST
|
||||||
|
select CRC32
|
||||||
|
select MII
|
||||||
|
select PHYLIB
|
||||||
|
help
|
||||||
|
Renesas R-Car Gen4 gPTP device driver.
|
||||||
|
|
||||||
endif # NET_VENDOR_RENESAS
|
endif # NET_VENDOR_RENESAS
|
||||||
|
|
|
@ -8,5 +8,6 @@ obj-$(CONFIG_SH_ETH) += sh_eth.o
|
||||||
ravb-objs := ravb_main.o ravb_ptp.o
|
ravb-objs := ravb_main.o ravb_ptp.o
|
||||||
obj-$(CONFIG_RAVB) += ravb.o
|
obj-$(CONFIG_RAVB) += ravb.o
|
||||||
|
|
||||||
rswitch_drv-objs := rswitch.o rcar_gen4_ptp.o
|
obj-$(CONFIG_RENESAS_ETHER_SWITCH) += rswitch.o
|
||||||
obj-$(CONFIG_RENESAS_ETHER_SWITCH) += rswitch_drv.o
|
|
||||||
|
obj-$(CONFIG_RENESAS_GEN4_PTP) += rcar_gen4_ptp.o
|
||||||
|
|
|
@ -176,6 +176,7 @@ int rcar_gen4_ptp_register(struct rcar_gen4_ptp_private *ptp_priv,
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(rcar_gen4_ptp_register);
|
||||||
|
|
||||||
int rcar_gen4_ptp_unregister(struct rcar_gen4_ptp_private *ptp_priv)
|
int rcar_gen4_ptp_unregister(struct rcar_gen4_ptp_private *ptp_priv)
|
||||||
{
|
{
|
||||||
|
@ -183,6 +184,7 @@ int rcar_gen4_ptp_unregister(struct rcar_gen4_ptp_private *ptp_priv)
|
||||||
|
|
||||||
return ptp_clock_unregister(ptp_priv->clock);
|
return ptp_clock_unregister(ptp_priv->clock);
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(rcar_gen4_ptp_unregister);
|
||||||
|
|
||||||
struct rcar_gen4_ptp_private *rcar_gen4_ptp_alloc(struct platform_device *pdev)
|
struct rcar_gen4_ptp_private *rcar_gen4_ptp_alloc(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
|
@ -196,3 +198,8 @@ struct rcar_gen4_ptp_private *rcar_gen4_ptp_alloc(struct platform_device *pdev)
|
||||||
|
|
||||||
return ptp;
|
return ptp;
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(rcar_gen4_ptp_alloc);
|
||||||
|
|
||||||
|
MODULE_AUTHOR("Yoshihiro Shimoda");
|
||||||
|
MODULE_DESCRIPTION("Renesas R-Car Gen4 gPTP driver");
|
||||||
|
MODULE_LICENSE("GPL");
|
||||||
|
|
Loading…
Add table
Reference in a new issue