Commit c8e4c8b
phy: sparx5-serdes: add indirection layer to register macros
The register macros are used to read and write to the SERDES registers.
The registers are largely the same on Sparx5 and lan969x, however some
register target sizes differ. Therefore we introduce a new indirection
to the register macros. The target sizes are looked up, using a mapping
table (sparx5_serdes_tsize) that maps the register target to the
register target size.
With this addition, we can reuse all the existing macros for lan969x.
Also the autogenerated macros are now formatted slightly different, to
adhere to a 80 character limit.
Signed-off-by: Daniel Machon <[email protected]>
Reviewed-by: Steen Hegelund <[email protected]>
Link: https://lore.kernel.org/r/20240909-sparx5-lan969x-serdes-driver-v2-6-d695bcb57b84@microchip.com
Signed-off-by: Vinod Koul <[email protected]>1 parent f16df05 commit c8e4c8b
File tree
3 files changed
+507
-254
lines changed- drivers/phy/microchip
3 files changed
+507
-254
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
31 | 42 | | |
32 | 43 | | |
33 | 44 | | |
| |||
2506 | 2517 | | |
2507 | 2518 | | |
2508 | 2519 | | |
| 2520 | + | |
2509 | 2521 | | |
2510 | 2522 | | |
2511 | 2523 | | |
| |||
2568 | 2580 | | |
2569 | 2581 | | |
2570 | 2582 | | |
| 2583 | + | |
| 2584 | + | |
2571 | 2585 | | |
2572 | 2586 | | |
2573 | 2587 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| |||
0 commit comments