driver: npcx7: replace platform specific functions with 'npcx_' prefix.
Replace all platform specific functions with 'npcx_' prefix. Signed-off-by: Mulin Chao <MLChao@nuvoton.com>
This commit is contained in:
parent
52bf482471
commit
d55aa5a71b
11 changed files with 57 additions and 57 deletions
|
@ -171,13 +171,13 @@ static void espi_init_wui_callback(const struct device *dev,
|
|||
return;
|
||||
|
||||
/* Install callback function */
|
||||
soc_miwu_init_dev_callback(callback, wui, handler, dev);
|
||||
soc_miwu_manage_dev_callback(callback, 1);
|
||||
npcx_miwu_init_dev_callback(callback, wui, handler, dev);
|
||||
npcx_miwu_manage_dev_callback(callback, 1);
|
||||
|
||||
/* Congiure MIWU setting and enable its interrupt */
|
||||
soc_miwu_interrupt_configure(wui, NPCX_MIWU_MODE_EDGE,
|
||||
npcx_miwu_interrupt_configure(wui, NPCX_MIWU_MODE_EDGE,
|
||||
NPCX_MIWU_TRIG_BOTH);
|
||||
soc_miwu_irq_enable(wui);
|
||||
npcx_miwu_irq_enable(wui);
|
||||
}
|
||||
|
||||
/* eSPI local bus interrupt service functions */
|
||||
|
@ -388,7 +388,7 @@ static void espi_vw_notify_plt_rst(const struct device *dev)
|
|||
/* Set Peripheral Channel ready when PLTRST is de-asserted */
|
||||
inst->ESPICFG |= BIT(NPCX_ESPICFG_PCHANEN);
|
||||
/* Configure all host sub-modules in host doamin */
|
||||
soc_host_init_subs_host_domain();
|
||||
npcx_host_init_subs_host_domain();
|
||||
}
|
||||
|
||||
/* PLT_RST will be received several times */
|
||||
|
@ -633,7 +633,7 @@ static int espi_npcx_read_lpc_request(const struct device *dev,
|
|||
if (!IS_BIT_SET(inst->ESPICFG, NPCX_ESPICFG_PCHANEN))
|
||||
return -ENOTSUP;
|
||||
|
||||
return soc_host_periph_read_request(op, data);
|
||||
return npcx_host_periph_read_request(op, data);
|
||||
}
|
||||
|
||||
static int espi_npcx_write_lpc_request(const struct device *dev,
|
||||
|
@ -646,7 +646,7 @@ static int espi_npcx_write_lpc_request(const struct device *dev,
|
|||
if (!IS_BIT_SET(inst->ESPICFG, NPCX_ESPICFG_PCHANEN))
|
||||
return -ENOTSUP;
|
||||
|
||||
return soc_host_periph_write_request(op, data);
|
||||
return npcx_host_periph_write_request(op, data);
|
||||
}
|
||||
|
||||
#if defined(CONFIG_ESPI_OOB_CHANNEL)
|
||||
|
@ -863,10 +863,10 @@ static int espi_npcx_init(const struct device *dev)
|
|||
&config->espi_rst_wui, espi_vw_espi_rst_isr);
|
||||
|
||||
/* Configure pin-mux for eSPI bus device */
|
||||
soc_pinctrl_mux_configure(config->alts_list, config->alts_size, 1);
|
||||
npcx_pinctrl_mux_configure(config->alts_list, config->alts_size, 1);
|
||||
|
||||
/* Configure host sub-modules which HW blocks belong to core domain */
|
||||
soc_host_init_subs_core_domain(dev, &data->callbacks);
|
||||
npcx_host_init_subs_core_domain(dev, &data->callbacks);
|
||||
|
||||
/* eSPI Bus interrupt installation */
|
||||
IRQ_CONNECT(DT_INST_IRQN(0),
|
||||
|
|
|
@ -447,7 +447,7 @@ void host_uart_init(void)
|
|||
struct c2h_reg *const inst_c2h = host_sub_cfg.inst_c2h;
|
||||
|
||||
/* Configure pin-mux for serial port device */
|
||||
soc_pinctrl_mux_configure(host_uart_alts, ARRAY_SIZE(host_uart_alts),
|
||||
npcx_pinctrl_mux_configure(host_uart_alts, ARRAY_SIZE(host_uart_alts),
|
||||
1);
|
||||
/* Make sure unlock host access of serial port */
|
||||
inst_c2h->LKSIOHA &= ~BIT(NPCX_LKSIOHA_LKSPHA);
|
||||
|
@ -582,8 +582,8 @@ uint8_t host_c2h_read_io_cfg_reg(uint8_t reg_index)
|
|||
return data_val;
|
||||
}
|
||||
|
||||
/* Soc specific host sub modules functions */
|
||||
int soc_host_periph_read_request(enum lpc_peripheral_opcode op,
|
||||
/* Platform specific host sub modules functions */
|
||||
int npcx_host_periph_read_request(enum lpc_peripheral_opcode op,
|
||||
uint32_t *data)
|
||||
{
|
||||
struct kbc_reg *const inst_kbc = host_sub_cfg.inst_kbc;
|
||||
|
@ -620,7 +620,7 @@ int soc_host_periph_read_request(enum lpc_peripheral_opcode op,
|
|||
return 0;
|
||||
}
|
||||
|
||||
int soc_host_periph_write_request(enum lpc_peripheral_opcode op,
|
||||
int npcx_host_periph_write_request(enum lpc_peripheral_opcode op,
|
||||
uint32_t *data)
|
||||
{
|
||||
volatile uint32_t __attribute__((unused)) dummy;
|
||||
|
@ -687,7 +687,7 @@ int soc_host_periph_write_request(enum lpc_peripheral_opcode op,
|
|||
return 0;
|
||||
}
|
||||
|
||||
void soc_host_init_subs_host_domain(void)
|
||||
void npcx_host_init_subs_host_domain(void)
|
||||
{
|
||||
struct c2h_reg *const inst_c2h = host_sub_cfg.inst_c2h;
|
||||
|
||||
|
@ -744,7 +744,7 @@ void soc_host_init_subs_host_domain(void)
|
|||
LOG_DBG("Hos sub-modules configurations are done!");
|
||||
}
|
||||
|
||||
int soc_host_init_subs_core_domain(const struct device *host_bus_dev,
|
||||
int npcx_host_init_subs_core_domain(const struct device *host_bus_dev,
|
||||
sys_slist_t *callbacks)
|
||||
{
|
||||
struct mswc_reg *const inst_mswc = host_sub_cfg.inst_mswc;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue