drivers: disk: cleanup after driver relocation
Add common SDMMC_LOG_LEVEL and SDMMC_VOLUME_NAME. Initialize drivers at POST_KERNEL level. Update CODEOWNERS after sdmmc drivers relocation. Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This commit is contained in:
parent
03101e75d8
commit
69a5f07d16
5 changed files with 21 additions and 22 deletions
|
@ -275,6 +275,11 @@
|
||||||
/drivers/serial/*xmc4xxx* @parthitce
|
/drivers/serial/*xmc4xxx* @parthitce
|
||||||
/drivers/serial/*nuvoton* @ssekar15
|
/drivers/serial/*nuvoton* @ssekar15
|
||||||
/drivers/serial/*apbuart* @martin-aberg
|
/drivers/serial/*apbuart* @martin-aberg
|
||||||
|
/drivers/disk/ @jfischer-no
|
||||||
|
/drivers/disk/sdmmc_sdhc.h @JunYangNXP
|
||||||
|
/drivers/disk/sdmmc_spi.c @JunYangNXP
|
||||||
|
/drivers/disk/usdhc.c @JunYangNXP
|
||||||
|
/drivers/disk/sdmmc_stm32.c @anthonybrandon
|
||||||
/drivers/net/ @jukkar @tbursztyka
|
/drivers/net/ @jukkar @tbursztyka
|
||||||
/drivers/ptp_clock/ @jukkar
|
/drivers/ptp_clock/ @jukkar
|
||||||
/drivers/spi/ @tbursztyka
|
/drivers/spi/ @tbursztyka
|
||||||
|
@ -556,10 +561,6 @@
|
||||||
/subsys/tracing/ @nashif
|
/subsys/tracing/ @nashif
|
||||||
/subsys/debug/asan_hacks.c @vanwinkeljan @aescolar @daor-oti
|
/subsys/debug/asan_hacks.c @vanwinkeljan @aescolar @daor-oti
|
||||||
/subsys/demand_paging/ @dcpleung @nashif
|
/subsys/demand_paging/ @dcpleung @nashif
|
||||||
/subsys/disk/disk_access_spi_sdhc.c @JunYangNXP
|
|
||||||
/subsys/disk/disk_access_sdhc.h @JunYangNXP
|
|
||||||
/subsys/disk/disk_access_usdhc.c @JunYangNXP
|
|
||||||
/subsys/disk/disk_access_stm32_sdmmc.c @anthonybrandon
|
|
||||||
/subsys/emul/ @sjg20
|
/subsys/emul/ @sjg20
|
||||||
/subsys/fb/ @jfischer-no
|
/subsys/fb/ @jfischer-no
|
||||||
/subsys/fs/ @nashif
|
/subsys/fs/ @nashif
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
#ifndef ZEPHYR_INCLUDE_DISK_ACCESS_SDHC_H_
|
#ifndef ZEPHYR_INCLUDE_DISK_DRIVER_SDMMC_H_
|
||||||
#define ZEPHYR_INCLUDE_DISK_ACCESS_SDHC_H_
|
#define ZEPHYR_INCLUDE_DISK_DRIVER_SDMMC_H_
|
||||||
|
|
||||||
#include <drivers/spi.h>
|
#include <drivers/spi.h>
|
||||||
|
|
||||||
|
@ -745,4 +745,4 @@ static inline void sdhc_decode_cid(struct sd_cid *cid,
|
||||||
cid->date = (uint16_t)((raw_cid[0U] & 0xFFF00U) >> 8U);
|
cid->date = (uint16_t)((raw_cid[0U] & 0xFFF00U) >> 8U);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /*ZEPHYR_INCLUDE_DISK_ACCESS_SDHC_H_*/
|
#endif /*ZEPHYR_INCLUDE_DISK_DRIVER_SDMMC_H_*/
|
||||||
|
|
|
@ -8,14 +8,14 @@
|
||||||
|
|
||||||
#include <logging/log.h>
|
#include <logging/log.h>
|
||||||
|
|
||||||
LOG_MODULE_REGISTER(sdhc_spi, CONFIG_DISK_LOG_LEVEL);
|
LOG_MODULE_REGISTER(sdmmc_spi, CONFIG_SDMMC_LOG_LEVEL);
|
||||||
|
|
||||||
#include <disk/disk_access.h>
|
#include <disk/disk_access.h>
|
||||||
#include <drivers/gpio.h>
|
#include <drivers/gpio.h>
|
||||||
#include <sys/byteorder.h>
|
#include <sys/byteorder.h>
|
||||||
#include <drivers/spi.h>
|
#include <drivers/spi.h>
|
||||||
#include <sys/crc.h>
|
#include <sys/crc.h>
|
||||||
#include "disk_access_sdhc.h"
|
#include "sdmmc_sdhc.h"
|
||||||
|
|
||||||
/* Clock speed used during initialisation */
|
/* Clock speed used during initialisation */
|
||||||
#define SDHC_SPI_INITIAL_SPEED 400000
|
#define SDHC_SPI_INITIAL_SPEED 400000
|
||||||
|
@ -962,7 +962,7 @@ static const struct disk_operations spi_sdhc_disk_ops = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct disk_info spi_sdhc_disk = {
|
static struct disk_info spi_sdhc_disk = {
|
||||||
.name = CONFIG_DISK_SDHC_VOLUME_NAME,
|
.name = CONFIG_SDMMC_VOLUME_NAME,
|
||||||
.ops = &spi_sdhc_disk_ops,
|
.ops = &spi_sdhc_disk_ops,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -981,5 +981,5 @@ static struct sdhc_spi_data sdhc_spi_data_0;
|
||||||
|
|
||||||
DEVICE_DT_INST_DEFINE(0, sdhc_spi_init, device_pm_control_nop,
|
DEVICE_DT_INST_DEFINE(0, sdhc_spi_init, device_pm_control_nop,
|
||||||
&sdhc_spi_data_0, NULL,
|
&sdhc_spi_data_0, NULL,
|
||||||
APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, NULL);
|
POST_KERNEL, CONFIG_SDMMC_INIT_PRIORITY, NULL);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#include <soc.h>
|
#include <soc.h>
|
||||||
#include <stm32_ll_rcc.h>
|
#include <stm32_ll_rcc.h>
|
||||||
|
|
||||||
LOG_MODULE_REGISTER(stm32_sdmmc);
|
LOG_MODULE_REGISTER(stm32_sdmmc, CONFIG_SDMMC_LOG_LEVEL);
|
||||||
|
|
||||||
struct stm32_sdmmc_priv {
|
struct stm32_sdmmc_priv {
|
||||||
SD_HandleTypeDef hsd;
|
SD_HandleTypeDef hsd;
|
||||||
|
@ -210,7 +210,7 @@ static const struct disk_operations stm32_sdmmc_ops = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct disk_info stm32_sdmmc_info = {
|
static struct disk_info stm32_sdmmc_info = {
|
||||||
.name = CONFIG_DISK_STM32_SDMMC_VOLUME_NAME,
|
.name = CONFIG_SDMMC_VOLUME_NAME,
|
||||||
.ops = &stm32_sdmmc_ops,
|
.ops = &stm32_sdmmc_ops,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -429,7 +429,7 @@ static struct stm32_sdmmc_priv stm32_sdmmc_priv_1 = {
|
||||||
};
|
};
|
||||||
|
|
||||||
DEVICE_DT_INST_DEFINE(0, disk_stm32_sdmmc_init, device_pm_control_nop,
|
DEVICE_DT_INST_DEFINE(0, disk_stm32_sdmmc_init, device_pm_control_nop,
|
||||||
&stm32_sdmmc_priv_1, NULL, APPLICATION,
|
&stm32_sdmmc_priv_1, NULL, POST_KERNEL,
|
||||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
|
CONFIG_SDMMC_INIT_PRIORITY,
|
||||||
NULL);
|
NULL);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
/* disk_access_usdhc.c - NXP USDHC driver*/
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2019 NXP
|
* Copyright (c) 2019 NXP
|
||||||
*
|
*
|
||||||
|
@ -15,10 +13,10 @@
|
||||||
#include <soc.h>
|
#include <soc.h>
|
||||||
#include <drivers/clock_control.h>
|
#include <drivers/clock_control.h>
|
||||||
|
|
||||||
#include "disk_access_sdhc.h"
|
#include "sdmmc_sdhc.h"
|
||||||
|
|
||||||
#include <logging/log.h>
|
#include <logging/log.h>
|
||||||
LOG_MODULE_REGISTER(usdhc, LOG_LEVEL_INF);
|
LOG_MODULE_REGISTER(usdhc, CONFIG_SDMMC_LOG_LEVEL);
|
||||||
|
|
||||||
enum usdhc_cmd_type {
|
enum usdhc_cmd_type {
|
||||||
USDHC_CMD_TYPE_NORMAL = 0U,
|
USDHC_CMD_TYPE_NORMAL = 0U,
|
||||||
|
@ -2783,7 +2781,7 @@ static const struct disk_operations usdhc_disk_ops = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct disk_info usdhc_disk = {
|
static struct disk_info usdhc_disk = {
|
||||||
.name = CONFIG_DISK_SDHC_VOLUME_NAME,
|
.name = CONFIG_SDMMC_VOLUME_NAME,
|
||||||
.ops = &usdhc_disk_ops,
|
.ops = &usdhc_disk_ops,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2844,8 +2842,8 @@ static int disk_usdhc_init(const struct device *dev)
|
||||||
device_pm_control_nop, \
|
device_pm_control_nop, \
|
||||||
&usdhc_priv_##n, \
|
&usdhc_priv_##n, \
|
||||||
&usdhc_config_##n, \
|
&usdhc_config_##n, \
|
||||||
APPLICATION, \
|
POST_KERNEL, \
|
||||||
CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
|
CONFIG_SDMMC_INIT_PRIORITY, \
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
DT_INST_FOREACH_STATUS_OKAY(DISK_ACCESS_USDHC_INIT)
|
DT_INST_FOREACH_STATUS_OKAY(DISK_ACCESS_USDHC_INIT)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue