drivers: dma: fix build warning issue for dma sedi driver
Remove unused functions to avoid build warning check. Signed-off-by: Ning Yang <ning.yang@intel.com>
This commit is contained in:
parent
98052aabb7
commit
be0cb45e1a
@ -366,58 +366,6 @@ static int dma_sedi_init(const struct device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_DEVICE
|
||||
|
||||
static bool is_dma_busy(sedi_dma_t dev)
|
||||
{
|
||||
sedi_dma_status_t chn_status;
|
||||
|
||||
for (int chn = 0; chn < DMA_CHANNEL_NUM; chn++) {
|
||||
sedi_dma_get_status(dev, chn, &chn_status);
|
||||
if (chn_status.busy == 1) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static int dma_change_device_power(const struct device *dev,
|
||||
enum pm_device_action action)
|
||||
{
|
||||
struct dma_sedi_driver_data *const data = DEV_DATA(dev);
|
||||
const struct dma_sedi_config_info *const info = DEV_CFG(dev);
|
||||
sedi_dma_t dma_dev = info->peripheral_id;
|
||||
int ret;
|
||||
|
||||
sedi_power_state_t state;
|
||||
|
||||
switch (action) {
|
||||
case PM_DEVICE_ACTION_RESUME:
|
||||
state = SEDI_POWER_FULL;
|
||||
break;
|
||||
case PM_DEVICE_ACTION_SUSPEND:
|
||||
if (is_dma_busy(dma_dev)) {
|
||||
return -EBUSY;
|
||||
}
|
||||
state = SEDI_POWER_SUSPEND;
|
||||
break;
|
||||
|
||||
default:
|
||||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
for (uint8_t chn = 0; chn < DMA_CHANNEL_NUM; chn++) {
|
||||
ret = sedi_dma_set_power(dma_dev, chn, state);
|
||||
if (ret != SEDI_DRIVER_OK) {
|
||||
return -EIO;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#define DMA_DEVICE_INIT_SEDI(inst) \
|
||||
static void dma_sedi_##inst##_irq_config(void); \
|
||||
\
|
||||
|
||||
Loading…
Reference in New Issue
Block a user