summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/renesas/rcar_gen4_ptp.c
Commit message (Collapse)AuthorAgeFilesLines
* net: ethernet: renesas: rcar_gen4_ptp: Break out to moduleNiklas Söderlund2023-11-231-0/+7
| | | | | | | | | | 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>
* net: ethernet: renesas: rcar_gen4_ptp: Get clock increment from clock rateNiklas Söderlund2023-11-231-2/+12
| | | | | | | | | | | | | | | | | | | | | | 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>
* net: ethernet: renesas: rcar_gen4_ptp: Prepare for shared register layoutNiklas Söderlund2023-11-231-3/+3
| | | | | | | | | | | 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>
* net: ethernet: renesas: rcar_gen4_ptp: Fail on unknown register layoutNiklas Söderlund2023-11-231-4/+11
| | | | | | | | | | | 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>
* net: ethernet: renesas: rswitch: Add R-Car Gen4 gPTP supportYoshihiro Shimoda2022-11-021-0/+181
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>