History log of /linux-master/drivers/net/ethernet/renesas/rcar_gen4_ptp.c
Revision Date Author Comments
# 8c1c6623 21-Nov-2023 Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

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>


# be5f81d3 21-Nov-2023 Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

net: ethernet: renesas: rcar_gen4_ptp: Get clock increment from clock rate

Instead of using hard coded clock increment values for each SoC derive
the clock increment from the module clock. This is done in preparation
to support a second platform, R-Car V4H that uses a 200Mhz clock
compared with the 320Mhz clock used on R-Car S4.

Tested on both SoCs,

S4 reports a clock of 320000000Hz which gives a value of 0x19000000.
Documentation says a 320Mhz clock is used and the correct increment for
that clock is 0x19000000.

V4H reports a clock of 199999992Hz which gives a value of 0x2800001a.
Documentation says a 200Mhz clock is used and the correct increment for
that clock is 0x28000000.

Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org>
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>


# 46c361a0 21-Nov-2023 Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

net: ethernet: renesas: rcar_gen4_ptp: Prepare for shared register layout

All known R-Car Gen4 SoC share the same register layout, rename the
R-Car S4 specific identifiers so they can be shared with the upcoming
R-Car V4H support.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>


# 9f399570 21-Nov-2023 Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

net: ethernet: renesas: rcar_gen4_ptp: Fail on unknown register layout

Instead of printing a warning and proceeding with an unknown register
layout return an error. The only call site is already prepared to
propagate the error.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>


# 6c6fa1a0 31-Oct-2022 Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>

net: ethernet: renesas: rswitch: Add R-Car Gen4 gPTP support

Add R-Car Gen4 gPTP support into the rswitch driver.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>