2018-06-22 11:15:38 +02:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2018, NXP
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
2020-04-02 00:13:55 +02:00
|
|
|
#define DT_DRV_COMPAT nxp_imx_mu
|
|
|
|
|
2018-06-22 11:15:38 +02:00
|
|
|
#include <errno.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <device.h>
|
|
|
|
#include <soc.h>
|
2019-06-25 21:53:55 +02:00
|
|
|
#include <drivers/ipm.h>
|
2022-02-15 23:08:47 +01:00
|
|
|
#if IS_ENABLED(CONFIG_IPM_IMX_REV2)
|
|
|
|
#include "fsl_mu.h"
|
|
|
|
#else
|
2018-06-22 11:15:38 +02:00
|
|
|
#include <mu_imx.h>
|
2022-02-15 23:08:47 +01:00
|
|
|
#endif
|
2018-06-22 11:15:38 +02:00
|
|
|
|
|
|
|
#define MU(config) ((MU_Type *)config->base)
|
|
|
|
|
|
|
|
#if ((CONFIG_IPM_IMX_MAX_DATA_SIZE % 4) != 0)
|
|
|
|
#error CONFIG_IPM_IMX_MAX_DATA_SIZE is invalid
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define IMX_IPM_DATA_REGS (CONFIG_IPM_IMX_MAX_DATA_SIZE / 4)
|
|
|
|
|
|
|
|
struct imx_mu_config {
|
|
|
|
MU_Type *base;
|
2020-04-30 20:33:38 +02:00
|
|
|
void (*irq_config_func)(const struct device *dev);
|
2018-06-22 11:15:38 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
struct imx_mu_data {
|
|
|
|
ipm_callback_t callback;
|
2020-07-29 09:14:14 +02:00
|
|
|
void *user_data;
|
2018-06-22 11:15:38 +02:00
|
|
|
};
|
|
|
|
|
2022-02-15 23:08:47 +01:00
|
|
|
#if IS_ENABLED(CONFIG_IPM_IMX_REV2)
|
|
|
|
/*!
|
|
|
|
* @brief Check RX full status.
|
|
|
|
*
|
|
|
|
* This function checks the specific receive register full status.
|
|
|
|
*
|
|
|
|
* @param base Register base address for the module.
|
|
|
|
* @param index RX register index to check.
|
|
|
|
* @retval true RX register is full.
|
|
|
|
* @retval false RX register is not full.
|
|
|
|
*/
|
|
|
|
static inline bool MU_IsRxFull(MU_Type *base, uint32_t index)
|
|
|
|
{
|
|
|
|
switch (index) {
|
|
|
|
case 0:
|
|
|
|
return (bool)(MU_GetStatusFlags(base) & kMU_Rx0FullFlag);
|
|
|
|
case 1:
|
|
|
|
return (bool)(MU_GetStatusFlags(base) & kMU_Rx1FullFlag);
|
|
|
|
case 2:
|
|
|
|
return (bool)(MU_GetStatusFlags(base) & kMU_Rx2FullFlag);
|
|
|
|
case 3:
|
|
|
|
return (bool)(MU_GetStatusFlags(base) & kMU_Rx3FullFlag);
|
|
|
|
default:
|
|
|
|
/* This shouldn't happen */
|
|
|
|
assert(false);
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* @brief Check TX empty status.
|
|
|
|
*
|
|
|
|
* This function checks the specific transmit register empty status.
|
|
|
|
*
|
|
|
|
* @param base Register base address for the module.
|
|
|
|
* @param index TX register index to check.
|
|
|
|
* @retval true TX register is empty.
|
|
|
|
* @retval false TX register is not empty.
|
|
|
|
*/
|
|
|
|
static inline bool MU_IsTxEmpty(MU_Type *base, uint32_t index)
|
|
|
|
{
|
|
|
|
switch (index) {
|
|
|
|
case 0:
|
|
|
|
return (bool)(MU_GetStatusFlags(base) & kMU_Tx0EmptyFlag);
|
|
|
|
case 1:
|
|
|
|
return (bool)(MU_GetStatusFlags(base) & kMU_Tx1EmptyFlag);
|
|
|
|
case 2:
|
|
|
|
return (bool)(MU_GetStatusFlags(base) & kMU_Tx2EmptyFlag);
|
|
|
|
case 3:
|
|
|
|
return (bool)(MU_GetStatusFlags(base) & kMU_Tx3EmptyFlag);
|
|
|
|
default:
|
|
|
|
/* This shouldn't happen */
|
|
|
|
assert(false);
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
isr: Normalize usage of device instance through ISR
The goal of this patch is to replace the 'void *' parameter by 'struct
device *' if they use such variable or just 'const void *' on all
relevant ISRs
This will avoid not-so-nice const qualifier tweaks when device instances
will be constant.
Note that only the ISR passed to IRQ_CONNECT are of interest here.
In order to do so, the script fix_isr.py below is necessary:
from pathlib import Path
import subprocess
import pickle
import mmap
import sys
import re
import os
cocci_template = """
@r_fix_isr_0
@
type ret_type;
identifier P;
identifier D;
@@
-ret_type <!fn!>(void *P)
+ret_type <!fn!>(const struct device *P)
{
...
(
const struct device *D = (const struct device *)P;
|
const struct device *D = P;
)
...
}
@r_fix_isr_1
@
type ret_type;
identifier P;
identifier D;
@@
-ret_type <!fn!>(void *P)
+ret_type <!fn!>(const struct device *P)
{
...
const struct device *D;
...
(
D = (const struct device *)P;
|
D = P;
)
...
}
@r_fix_isr_2
@
type ret_type;
identifier A;
@@
-ret_type <!fn!>(void *A)
+ret_type <!fn!>(const void *A)
{
...
}
@r_fix_isr_3
@
const struct device *D;
@@
-<!fn!>((void *)D);
+<!fn!>(D);
@r_fix_isr_4
@
type ret_type;
identifier D;
identifier P;
@@
-ret_type <!fn!>(const struct device *P)
+ret_type <!fn!>(const struct device *D)
{
...
(
-const struct device *D = (const struct device *)P;
|
-const struct device *D = P;
)
...
}
@r_fix_isr_5
@
type ret_type;
identifier D;
identifier P;
@@
-ret_type <!fn!>(const struct device *P)
+ret_type <!fn!>(const struct device *D)
{
...
-const struct device *D;
...
(
-D = (const struct device *)P;
|
-D = P;
)
...
}
"""
def find_isr(fn):
db = []
data = None
start = 0
try:
with open(fn, 'r+') as f:
data = str(mmap.mmap(f.fileno(), 0).read())
except Exception as e:
return db
while True:
isr = ""
irq = data.find('IRQ_CONNECT', start)
while irq > -1:
p = 1
arg = 1
p_o = data.find('(', irq)
if p_o < 0:
irq = -1
break;
pos = p_o + 1
while p > 0:
if data[pos] == ')':
p -= 1
elif data[pos] == '(':
p += 1
elif data[pos] == ',' and p == 1:
arg += 1
if arg == 3:
isr += data[pos]
pos += 1
isr = isr.strip(',\\n\\t ')
if isr not in db and len(isr) > 0:
db.append(isr)
start = pos
break
if irq < 0:
break
return db
def patch_isr(fn, isr_list):
if len(isr_list) <= 0:
return
for isr in isr_list:
tmplt = cocci_template.replace('<!fn!>', isr)
with open('/tmp/isr_fix.cocci', 'w') as f:
f.write(tmplt)
cmd = ['spatch', '--sp-file', '/tmp/isr_fix.cocci', '--in-place', fn]
subprocess.run(cmd)
def process_files(path):
if path.is_file() and path.suffix in ['.h', '.c']:
p = str(path.parent) + '/' + path.name
isr_list = find_isr(p)
patch_isr(p, isr_list)
elif path.is_dir():
for p in path.iterdir():
process_files(p)
if len(sys.argv) < 2:
print("You need to provide a dir/file path")
sys.exit(1)
process_files(Path(sys.argv[1]))
And is run: ./fix_isr.py <zephyr root directory>
Finally, some files needed manual fixes such.
Fixes #27399
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-06-17 14:58:56 +02:00
|
|
|
static void imx_mu_isr(const struct device *dev)
|
2018-06-22 11:15:38 +02:00
|
|
|
{
|
2020-05-28 20:44:16 +02:00
|
|
|
const struct imx_mu_config *config = dev->config;
|
2018-06-22 11:15:38 +02:00
|
|
|
MU_Type *base = MU(config);
|
2020-05-28 21:23:02 +02:00
|
|
|
struct imx_mu_data *data = dev->data;
|
2020-05-27 18:26:57 +02:00
|
|
|
uint32_t data32[IMX_IPM_DATA_REGS];
|
|
|
|
uint32_t status_reg;
|
|
|
|
int32_t id;
|
|
|
|
int32_t i;
|
2018-06-22 11:15:38 +02:00
|
|
|
bool all_registers_full;
|
|
|
|
|
|
|
|
status_reg = base->SR >>= MU_SR_RFn_SHIFT;
|
|
|
|
|
|
|
|
for (id = CONFIG_IPM_IMX_MAX_ID_VAL; id >= 0; id--) {
|
|
|
|
if (status_reg & 0x1U) {
|
|
|
|
/*
|
|
|
|
* Check if all receive registers are full. If not,
|
|
|
|
* it is violation of the protocol (status register
|
|
|
|
* are set earlier than all receive registers).
|
|
|
|
* Do not read any of the registers in such situation.
|
|
|
|
*/
|
|
|
|
all_registers_full = true;
|
|
|
|
for (i = 0; i < IMX_IPM_DATA_REGS; i++) {
|
|
|
|
if (!MU_IsRxFull(base,
|
|
|
|
(id * IMX_IPM_DATA_REGS) + i)) {
|
|
|
|
all_registers_full = false;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (all_registers_full) {
|
|
|
|
for (i = 0; i < IMX_IPM_DATA_REGS; i++) {
|
2022-02-15 23:08:47 +01:00
|
|
|
#if IS_ENABLED(CONFIG_IPM_IMX_REV2)
|
|
|
|
data32[i] = MU_ReceiveMsg(base,
|
|
|
|
(id * IMX_IPM_DATA_REGS) + i);
|
|
|
|
#else
|
2018-06-22 11:15:38 +02:00
|
|
|
MU_ReceiveMsg(base,
|
|
|
|
(id * IMX_IPM_DATA_REGS) + i,
|
|
|
|
&data32[i]);
|
2022-02-15 23:08:47 +01:00
|
|
|
#endif
|
2018-06-22 11:15:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (data->callback) {
|
2020-07-29 09:14:14 +02:00
|
|
|
data->callback(dev, data->user_data,
|
2020-05-27 18:26:57 +02:00
|
|
|
(uint32_t)id,
|
2018-06-22 11:15:38 +02:00
|
|
|
&data32[0]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
status_reg >>= IMX_IPM_DATA_REGS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Add for ARM errata 838869, affects Cortex-M4, Cortex-M4F
|
|
|
|
* Store immediate overlapping exception return operation
|
2022-02-15 23:08:47 +01:00
|
|
|
* might vector to incorrect interrupt. For Cortex-M7, if
|
|
|
|
* core speed much faster than peripheral register write
|
|
|
|
* speed, the peripheral interrupt flags may be still set
|
|
|
|
* after exiting ISR, this results to the same error similar
|
|
|
|
* with errata 838869.
|
2018-06-22 11:15:38 +02:00
|
|
|
*/
|
2022-02-15 23:08:47 +01:00
|
|
|
#if (defined __CORTEX_M) && ((__CORTEX_M == 4U) || (__CORTEX_M == 7U))
|
2018-06-22 11:15:38 +02:00
|
|
|
__DSB();
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2020-04-30 20:33:38 +02:00
|
|
|
static int imx_mu_ipm_send(const struct device *dev, int wait, uint32_t id,
|
2018-06-22 11:15:38 +02:00
|
|
|
const void *data, int size)
|
|
|
|
{
|
2020-05-28 20:44:16 +02:00
|
|
|
const struct imx_mu_config *config = dev->config;
|
2018-06-22 11:15:38 +02:00
|
|
|
MU_Type *base = MU(config);
|
2020-05-27 18:26:57 +02:00
|
|
|
uint32_t data32[IMX_IPM_DATA_REGS];
|
2022-02-15 23:08:47 +01:00
|
|
|
#if !IS_ENABLED(CONFIG_IPM_IMX_REV2)
|
2018-06-22 11:15:38 +02:00
|
|
|
mu_status_t status;
|
2022-02-15 23:08:47 +01:00
|
|
|
#endif
|
2018-06-22 11:15:38 +02:00
|
|
|
int i;
|
|
|
|
|
|
|
|
if (id > CONFIG_IPM_IMX_MAX_ID_VAL) {
|
|
|
|
return -EINVAL;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (size > CONFIG_IPM_IMX_MAX_DATA_SIZE) {
|
|
|
|
return -EMSGSIZE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Actual message is passing using 32 bits registers */
|
|
|
|
memcpy(data32, data, size);
|
|
|
|
|
2022-02-15 23:08:47 +01:00
|
|
|
#if IS_ENABLED(CONFIG_IPM_IMX_REV2)
|
|
|
|
if (wait) {
|
|
|
|
for (i = 0; i < IMX_IPM_DATA_REGS; i++) {
|
|
|
|
MU_SendMsgNonBlocking(base, id * IMX_IPM_DATA_REGS + i,
|
|
|
|
data32[i]);
|
|
|
|
}
|
|
|
|
while (!MU_IsTxEmpty(base,
|
|
|
|
(id * IMX_IPM_DATA_REGS) + IMX_IPM_DATA_REGS - 1)) {
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
for (i = 0; i < IMX_IPM_DATA_REGS; i++) {
|
|
|
|
if (MU_IsTxEmpty(base, id * IMX_IPM_DATA_REGS + i)) {
|
|
|
|
MU_SendMsg(base, id * IMX_IPM_DATA_REGS + i,
|
|
|
|
data32[i]);
|
|
|
|
} else {
|
|
|
|
return -EBUSY;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#else
|
2018-06-22 11:15:38 +02:00
|
|
|
for (i = 0; i < IMX_IPM_DATA_REGS; i++) {
|
|
|
|
status = MU_TrySendMsg(base, id * IMX_IPM_DATA_REGS + i,
|
|
|
|
data32[i]);
|
|
|
|
if (status == kStatus_MU_TxNotEmpty) {
|
|
|
|
return -EBUSY;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (wait) {
|
|
|
|
while (!MU_IsTxEmpty(base,
|
|
|
|
(id * IMX_IPM_DATA_REGS) + IMX_IPM_DATA_REGS - 1)) {
|
|
|
|
}
|
|
|
|
}
|
2022-02-15 23:08:47 +01:00
|
|
|
#endif
|
2018-06-22 11:15:38 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2020-04-30 20:33:38 +02:00
|
|
|
static int imx_mu_ipm_max_data_size_get(const struct device *dev)
|
2018-06-22 11:15:38 +02:00
|
|
|
{
|
|
|
|
ARG_UNUSED(dev);
|
|
|
|
|
|
|
|
return CONFIG_IPM_IMX_MAX_DATA_SIZE;
|
|
|
|
}
|
|
|
|
|
2020-04-30 20:33:38 +02:00
|
|
|
static uint32_t imx_mu_ipm_max_id_val_get(const struct device *dev)
|
2018-06-22 11:15:38 +02:00
|
|
|
{
|
|
|
|
ARG_UNUSED(dev);
|
|
|
|
|
|
|
|
return CONFIG_IPM_IMX_MAX_ID_VAL;
|
|
|
|
}
|
|
|
|
|
2020-04-30 20:33:38 +02:00
|
|
|
static void imx_mu_ipm_register_callback(const struct device *dev,
|
2018-06-22 11:15:38 +02:00
|
|
|
ipm_callback_t cb,
|
2020-07-29 09:14:14 +02:00
|
|
|
void *user_data)
|
2018-06-22 11:15:38 +02:00
|
|
|
{
|
2020-05-28 21:23:02 +02:00
|
|
|
struct imx_mu_data *driver_data = dev->data;
|
2018-06-22 11:15:38 +02:00
|
|
|
|
|
|
|
driver_data->callback = cb;
|
2020-07-29 09:14:14 +02:00
|
|
|
driver_data->user_data = user_data;
|
2018-06-22 11:15:38 +02:00
|
|
|
}
|
|
|
|
|
2020-04-30 20:33:38 +02:00
|
|
|
static int imx_mu_ipm_set_enabled(const struct device *dev, int enable)
|
2018-06-22 11:15:38 +02:00
|
|
|
{
|
2020-05-28 20:44:16 +02:00
|
|
|
const struct imx_mu_config *config = dev->config;
|
2018-06-22 11:15:38 +02:00
|
|
|
MU_Type *base = MU(config);
|
2022-02-15 23:08:47 +01:00
|
|
|
#if IS_ENABLED(CONFIG_IPM_IMX_REV2)
|
|
|
|
#if CONFIG_IPM_IMX_MAX_DATA_SIZE_4
|
|
|
|
if (enable) {
|
|
|
|
MU_EnableInterrupts(base, kMU_Rx0FullInterruptEnable);
|
|
|
|
MU_EnableInterrupts(base, kMU_Rx1FullInterruptEnable);
|
|
|
|
MU_EnableInterrupts(base, kMU_Rx2FullInterruptEnable);
|
|
|
|
MU_EnableInterrupts(base, kMU_Rx3FullInterruptEnable);
|
|
|
|
} else {
|
|
|
|
MU_DisableInterrupts(base, kMU_Rx0FullInterruptEnable);
|
|
|
|
MU_DisableInterrupts(base, kMU_Rx1FullInterruptEnable);
|
|
|
|
MU_DisableInterrupts(base, kMU_Rx2FullInterruptEnable);
|
|
|
|
MU_DisableInterrupts(base, kMU_Rx3FullInterruptEnable);
|
|
|
|
}
|
|
|
|
#elif CONFIG_IPM_IMX_MAX_DATA_SIZE_8
|
|
|
|
if (enable) {
|
|
|
|
MU_EnableInterrupts(base, kMU_Rx1FullInterruptEnable);
|
|
|
|
MU_EnableInterrupts(base, kMU_Rx3FullInterruptEnable);
|
|
|
|
} else {
|
|
|
|
MU_DisableInterrupts(base, kMU_Rx1FullInterruptEnable);
|
|
|
|
MU_DisableInterrupts(base, kMU_Rx3FullInterruptEnable);
|
|
|
|
}
|
|
|
|
#elif CONFIG_IPM_IMX_MAX_DATA_SIZE_16
|
|
|
|
if (enable) {
|
|
|
|
MU_EnableInterrupts(base, kMU_Rx3FullInterruptEnable);
|
|
|
|
} else {
|
|
|
|
MU_DisableInterrupts(base, kMU_Rx3FullInterruptEnable);
|
|
|
|
}
|
|
|
|
#else
|
|
|
|
#error "CONFIG_IPM_IMX_MAX_DATA_SIZE_n is not set"
|
|
|
|
#endif
|
|
|
|
#else
|
2018-06-22 11:15:38 +02:00
|
|
|
#if CONFIG_IPM_IMX_MAX_DATA_SIZE_4
|
|
|
|
if (enable) {
|
|
|
|
MU_EnableRxFullInt(base, 0U);
|
|
|
|
MU_EnableRxFullInt(base, 1U);
|
|
|
|
MU_EnableRxFullInt(base, 2U);
|
|
|
|
MU_EnableRxFullInt(base, 3U);
|
|
|
|
} else {
|
|
|
|
MU_DisableRxFullInt(base, 0U);
|
|
|
|
MU_DisableRxFullInt(base, 1U);
|
|
|
|
MU_DisableRxFullInt(base, 2U);
|
|
|
|
MU_DisableRxFullInt(base, 3U);
|
|
|
|
}
|
|
|
|
#elif CONFIG_IPM_IMX_MAX_DATA_SIZE_8
|
|
|
|
if (enable) {
|
|
|
|
MU_EnableRxFullInt(base, 1U);
|
|
|
|
MU_EnableRxFullInt(base, 3U);
|
|
|
|
} else {
|
|
|
|
MU_DisableRxFullInt(base, 1U);
|
|
|
|
MU_DisableRxFullInt(base, 3U);
|
|
|
|
}
|
|
|
|
#elif CONFIG_IPM_IMX_MAX_DATA_SIZE_16
|
|
|
|
if (enable) {
|
|
|
|
MU_EnableRxFullInt(base, 3U);
|
|
|
|
} else {
|
|
|
|
MU_DisableRxFullInt(base, 3U);
|
|
|
|
}
|
|
|
|
#else
|
|
|
|
#error "CONFIG_IPM_IMX_MAX_DATA_SIZE_n is not set"
|
2022-02-15 23:08:47 +01:00
|
|
|
#endif
|
2018-06-22 11:15:38 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2020-04-30 20:33:38 +02:00
|
|
|
static int imx_mu_init(const struct device *dev)
|
2018-06-22 11:15:38 +02:00
|
|
|
{
|
2020-05-28 20:44:16 +02:00
|
|
|
const struct imx_mu_config *config = dev->config;
|
2018-06-22 11:15:38 +02:00
|
|
|
|
|
|
|
MU_Init(MU(config));
|
|
|
|
config->irq_config_func(dev);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static const struct ipm_driver_api imx_mu_driver_api = {
|
|
|
|
.send = imx_mu_ipm_send,
|
|
|
|
.register_callback = imx_mu_ipm_register_callback,
|
|
|
|
.max_data_size_get = imx_mu_ipm_max_data_size_get,
|
|
|
|
.max_id_val_get = imx_mu_ipm_max_id_val_get,
|
|
|
|
.set_enabled = imx_mu_ipm_set_enabled
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Config MU */
|
|
|
|
|
2020-04-30 20:33:38 +02:00
|
|
|
static void imx_mu_config_func_b(const struct device *dev);
|
2018-06-22 11:15:38 +02:00
|
|
|
|
|
|
|
static const struct imx_mu_config imx_mu_b_config = {
|
2020-04-02 00:13:55 +02:00
|
|
|
.base = (MU_Type *)DT_INST_REG_ADDR(0),
|
2018-06-22 11:15:38 +02:00
|
|
|
.irq_config_func = imx_mu_config_func_b,
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct imx_mu_data imx_mu_b_data;
|
|
|
|
|
2020-12-16 15:17:21 +01:00
|
|
|
DEVICE_DT_INST_DEFINE(0,
|
2018-06-22 11:15:38 +02:00
|
|
|
&imx_mu_init,
|
2021-04-28 11:10:22 +02:00
|
|
|
NULL,
|
2018-06-22 11:15:38 +02:00
|
|
|
&imx_mu_b_data, &imx_mu_b_config,
|
|
|
|
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT,
|
|
|
|
&imx_mu_driver_api);
|
|
|
|
|
2020-04-30 20:33:38 +02:00
|
|
|
static void imx_mu_config_func_b(const struct device *dev)
|
2018-06-22 11:15:38 +02:00
|
|
|
{
|
2020-04-02 00:13:55 +02:00
|
|
|
IRQ_CONNECT(DT_INST_IRQN(0),
|
|
|
|
DT_INST_IRQ(0, priority),
|
2020-12-16 15:17:21 +01:00
|
|
|
imx_mu_isr, DEVICE_DT_INST_GET(0), 0);
|
2018-06-22 11:15:38 +02:00
|
|
|
|
2020-04-02 00:13:55 +02:00
|
|
|
irq_enable(DT_INST_IRQN(0));
|
2018-06-22 11:15:38 +02:00
|
|
|
}
|