File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
drivers/ethernet/nxp_imx_netc Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -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,8 @@ 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 , base , K_MEM_CACHE_NONE | K_MEM_DIRECT_MAP );
111
+
107
112
if (cfg -> pseudo_mac ) {
108
113
goto init_common ;
109
114
}
@@ -192,6 +197,7 @@ static const struct ethernet_api netc_eth_api = {.iface_api.init = netc_eth_ifac
192
197
.rx_frame = eth##n##_rx_frame, \
193
198
}; \
194
199
static const struct netc_eth_config netc_eth##n##_config = { \
200
+ DEVICE_MMIO_NAMED_ROM_INIT(base, DT_DRV_INST(n)), \
195
201
.generate_mac = netc_eth##n##_generate_mac, \
196
202
.bdr_init = netc_eth##n##_bdr_init, \
197
203
.phy_dev = (COND_CODE_1(DT_INST_NODE_HAS_PROP(n, phy_handle), \
You can’t perform that action at this time.
0 commit comments