Skip to content

Commit d04c0e2

Browse files
committed
drivers: net: sam_gmac: deprecate the 'mac-eeprom' option
Deprecate the 'ETH_SAM_GMAC_MAC_I2C_EEPROM' for the 'mac-eeprom' option, Add limitation to use it only there's only one activated GMAC instance. Signed-off-by: Tony Han <[email protected]>
1 parent 8657747 commit d04c0e2

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

drivers/ethernet/Kconfig.sam_gmac

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,10 @@ config ETH_SAM_GMAC_BUF_RX_COUNT
7474
and the other being processed by the higher layer networking stack.
7575

7676
config ETH_SAM_GMAC_MAC_I2C_EEPROM
77-
bool "Read from an I2C EEPROM"
77+
bool "Read from an I2C EEPROM [DEPRECATED]"
78+
select DEPRECATED
7879
help
79-
Read MAC address from an I2C EEPROM.
80+
Read MAC address from an I2C EEPROM. This option is deprecated.
8081

8182
if ETH_SAM_GMAC_MAC_I2C_EEPROM
8283

drivers/ethernet/eth_sam_gmac.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ static inline void dcache_clean(uint32_t addr, uint32_t size)
133133
#endif
134134
#endif /* !CONFIG_NET_TEST */
135135

136+
BUILD_ASSERT(!(DT_ANY_INST_HAS_PROP_STATUS_OKAY(mac_eeprom) &&
137+
(DT_NUM_INST_STATUS_OKAY(DT_DRV_COMPAT) > 1)),
138+
"Only support one activated instance get MAC address from EEPROM");
139+
136140
/* RX descriptors list */
137141
#define DEFN_RX_DESC(n) \
138142
static struct gmac_desc rx_desc##n##_que[PRIORITY_QUEUE_RX_DESC_COUNT] \

0 commit comments

Comments
 (0)