* [PATCH net-next v3 05/14] net: ethernet: oa_tc6: Move OA TC6 MMS definitions to header file
@ 2026-05-29 18:39 Selvamani Rajagopal
2026-05-29 22:24 ` Andrew Lunn
0 siblings, 1 reply; 3+ messages in thread
From: Selvamani Rajagopal @ 2026-05-29 18:39 UTC (permalink / raw)
To: Piergiorgio Beruto, parthiban.veerasooran, andrew+netdev, davem,
edumazet, kuba, pabeni, netdev, linux-kernel
To prepare for other files to share the constant definitions for
clause 45 registers memory map selectors, moving to header file.
The values are from table 6 in OPEN Alliance specification.
Signed-off-by: Selvamani Rajagopal <Selvamani.Rajagopal@onsemi.com>
---
drivers/net/ethernet/oa_tc6/oa_tc6_std_def.h | 9 ---------
include/linux/oa_tc6.h | 13 +++++++++++++
2 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ethernet/oa_tc6/oa_tc6_std_def.h b/drivers/net/ethernet/oa_tc6/oa_tc6_std_def.h
index fdde9ba719bf..2d8e28fb46fc 100644
--- a/drivers/net/ethernet/oa_tc6/oa_tc6_std_def.h
+++ b/drivers/net/ethernet/oa_tc6/oa_tc6_std_def.h
@@ -85,15 +85,6 @@
#define OA_TC6_DATA_FOOTER_END_BYTE_OFFSET GENMASK(13, 8)
#define OA_TC6_DATA_FOOTER_TX_CREDITS GENMASK(5, 1)
-/* PHY - Clause 45 registers memory map selector (MMS) as per table 6 in the
- * OPEN Alliance specification.
- */
-#define OA_TC6_PHY_C45_PCS_MMS2 2 /* MMD 3 */
-#define OA_TC6_PHY_C45_PMA_PMD_MMS3 3 /* MMD 1 */
-#define OA_TC6_PHY_C45_VS_PLCA_MMS4 4 /* MMD 31 */
-#define OA_TC6_PHY_C45_AUTO_NEG_MMS5 5 /* MMD 7 */
-#define OA_TC6_PHY_C45_POWER_UNIT_MMS6 6 /* MMD 13 */
-
#define OA_TC6_CTRL_HEADER_SIZE 4
#define OA_TC6_CTRL_REG_VALUE_SIZE 4
#define OA_TC6_CTRL_IGNORED_SIZE 4
diff --git a/include/linux/oa_tc6.h b/include/linux/oa_tc6.h
index 15f58e3c56c7..0d5cae460850 100644
--- a/include/linux/oa_tc6.h
+++ b/include/linux/oa_tc6.h
@@ -7,9 +7,21 @@
* Author: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>
*/
+#ifndef _LINUX_OA_TC6_H
+#define _LINUX_OA_TC6_H
+
#include <linux/etherdevice.h>
#include <linux/spi/spi.h>
+/* PHY - Clause 45 registers memory map selector (MMS) as per table 6 in
+ * the OPEN Alliance specification.
+ */
+#define OA_TC6_PHY_C45_PCS_MMS2 2 /* MMD 3 */
+#define OA_TC6_PHY_C45_PMA_PMD_MMS3 3 /* MMD 1 */
+#define OA_TC6_PHY_C45_VS_PLCA_MMS4 4 /* MMD 31 */
+#define OA_TC6_PHY_C45_AUTO_NEG_MMS5 5 /* MMD 7 */
+#define OA_TC6_PHY_C45_POWER_UNIT_MMS6 6 /* MMD 13 */
+
struct oa_tc6;
struct oa_tc6 *oa_tc6_init(struct spi_device *spi, struct net_device *netdev);
@@ -22,3 +34,4 @@ int oa_tc6_read_registers(struct oa_tc6 *tc6, u32 address, u32 value[],
u8 length);
netdev_tx_t oa_tc6_start_xmit(struct oa_tc6 *tc6, struct sk_buff *skb);
int oa_tc6_zero_align_receive_frame_enable(struct oa_tc6 *tc6);
+#endif /* _LINUX_OA_TC6_H */
--
2.43.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next v3 05/14] net: ethernet: oa_tc6: Move OA TC6 MMS definitions to header file
2026-05-29 18:39 [PATCH net-next v3 05/14] net: ethernet: oa_tc6: Move OA TC6 MMS definitions to header file Selvamani Rajagopal
@ 2026-05-29 22:24 ` Andrew Lunn
2026-05-29 23:48 ` Selvamani Rajagopal
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Lunn @ 2026-05-29 22:24 UTC (permalink / raw)
To: Selvamani Rajagopal
Cc: Piergiorgio Beruto, parthiban.veerasooran, andrew+netdev, davem,
edumazet, kuba, pabeni, netdev, linux-kernel
On Fri, May 29, 2026 at 06:39:52PM +0000, Selvamani Rajagopal wrote:
> To prepare for other files to share the constant definitions for
> clause 45 registers memory map selectors, moving to header file.
> The values are from table 6 in OPEN Alliance specification.
Please don't move them in one patch, and then move them again in the
next.
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH net-next v3 05/14] net: ethernet: oa_tc6: Move OA TC6 MMS definitions to header file
2026-05-29 22:24 ` Andrew Lunn
@ 2026-05-29 23:48 ` Selvamani Rajagopal
0 siblings, 0 replies; 3+ messages in thread
From: Selvamani Rajagopal @ 2026-05-29 23:48 UTC (permalink / raw)
To: Andrew Lunn
Cc: Piergiorgio Beruto, parthiban.veerasooran, andrew+netdev, davem,
edumazet, kuba, pabeni, netdev, linux-kernel
> Subject: Re: [PATCH net-next v3 05/14] net: ethernet: oa_tc6: Move OA TC6 MMS
> definitions to header file
>
>
> This Message Is From an External Sender
> This message came from outside your organization.
>
> On Fri, May 29, 2026 at 06:39:52PM +0000, Selvamani Rajagopal wrote:
> > To prepare for other files to share the constant definitions for
> > clause 45 registers memory map selectors, moving to header file.
> > The values are from table 6 in OPEN Alliance specification.
>
> Please don't move them in one patch, and then move them again in the
> next.
Andrew,
I thought it would be clearer.
4/14 patch would just move the contents as it is, without any change to oa_tc6_std_def.h first.
Then 5/15 would move MMS definition to another header file.
As opposed, a method where part of definitions (MMS) would move to oa_tc6.h and rest would
go to oa_tc6_std_def.h in a single patch.
I understand what you are saying. I can move the #defines to two different files in a single patch.
>
> Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-05-29 23:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-29 18:39 [PATCH net-next v3 05/14] net: ethernet: oa_tc6: Move OA TC6 MMS definitions to header file Selvamani Rajagopal
2026-05-29 22:24 ` Andrew Lunn
2026-05-29 23:48 ` Selvamani Rajagopal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®