@@ -22,6 +22,9 @@ LOG_MODULE_REGISTER(nxp_imx_eth_psi);
22
22
#include "../eth.h"
23
23
#include "eth_nxp_imx_netc_priv.h"
24
24
25
+ #define DEV_CFG (_dev ) ((const struct netc_eth_config *)(_dev)->config)
26
+ #define DEV_DATA (_dev ) ((struct netc_eth_data *)(_dev)->data)
27
+
25
28
static void netc_eth_phylink_callback (const struct device * pdev , struct phy_link_state * state ,
26
29
void * user_data )
27
30
{
@@ -104,6 +107,9 @@ static int netc_eth_init(const struct device *dev)
104
107
const struct netc_eth_config * cfg = dev -> config ;
105
108
int err ;
106
109
110
+ DEVICE_MMIO_NAMED_MAP (dev , port , K_MEM_CACHE_NONE | K_MEM_DIRECT_MAP );
111
+ DEVICE_MMIO_NAMED_MAP (dev , pfconfig , K_MEM_CACHE_NONE | K_MEM_DIRECT_MAP );
112
+
107
113
if (cfg -> pseudo_mac ) {
108
114
goto init_common ;
109
115
}
@@ -192,6 +198,8 @@ static const struct ethernet_api netc_eth_api = {.iface_api.init = netc_eth_ifac
192
198
.rx_frame = eth##n##_rx_frame, \
193
199
}; \
194
200
static const struct netc_eth_config netc_eth##n##_config = { \
201
+ DEVICE_MMIO_NAMED_ROM_INIT_BY_NAME(port, DT_DRV_INST(n)), \
202
+ DEVICE_MMIO_NAMED_ROM_INIT_BY_NAME(pfconfig, DT_DRV_INST(n)), \
195
203
.generate_mac = netc_eth##n##_generate_mac, \
196
204
.bdr_init = netc_eth##n##_bdr_init, \
197
205
.phy_dev = (COND_CODE_1(DT_INST_NODE_HAS_PROP(n, phy_handle), \
0 commit comments