Skip to content

Commit

Permalink
soc: nxp_imx: rt: remove unnecessary pinmux callbacks
Browse files Browse the repository at this point in the history
All iMX RT 1xxx boards are now expected to use pin control, so the USDHC
pinmuxing callbacks can be removed.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
  • Loading branch information
danieldegrasse committed Mar 25, 2022
1 parent 0ad00d0 commit 40526f8
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 113 deletions.
20 changes: 0 additions & 20 deletions soc/arm/nxp_imx/rt/soc.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,6 @@
extern "C" {
#endif

#if CONFIG_DISK_DRIVER_SDMMC && \
(DT_NODE_HAS_STATUS(DT_NODELABEL(usdhc1), okay) || \
DT_NODE_HAS_STATUS(DT_NODELABEL(usdhc2), okay))

typedef void (*usdhc_pin_cfg_cb)(uint16_t nusdhc, bool init,
uint32_t speed, uint32_t strength);

void imxrt_usdhc_pinmux(uint16_t nusdhc,
bool init, uint32_t speed, uint32_t strength);

void imxrt_usdhc_pinmux_cb_register(usdhc_pin_cfg_cb cb);

typedef void (*usdhc_dat3_cfg_cb)(bool pullup);

void imxrt_usdhc_dat3_cb_register(usdhc_dat3_cfg_cb cb);

void imxrt_usdhc_dat3_pull(bool pullup);

#endif

#if CONFIG_I2S_MCUX_SAI
void imxrt_audio_codec_pll_init(uint32_t clock_name, uint32_t clk_src,
uint32_t clk_pre_div, uint32_t clk_src_div);
Expand Down
46 changes: 0 additions & 46 deletions soc/arm/nxp_imx/rt/soc_rt10xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,52 +219,6 @@ static ALWAYS_INLINE void clock_init(void)

}

#if (DT_NODE_HAS_STATUS(DT_NODELABEL(usdhc1), okay) && CONFIG_DISK_DRIVER_SDMMC)

/* Usdhc driver needs to re-configure pinmux
* Pinmux depends on board design.
* From the perspective of Usdhc driver,
* it can't access board specific function.
* So SoC provides this for board to register
* its usdhc pinmux and for usdhc to access
* pinmux.
*/

static usdhc_pin_cfg_cb g_usdhc_pin_cfg_cb;

void imxrt_usdhc_pinmux_cb_register(usdhc_pin_cfg_cb cb)
{
g_usdhc_pin_cfg_cb = cb;
}

void imxrt_usdhc_pinmux(uint16_t nusdhc, bool init,
uint32_t speed, uint32_t strength)
{
if (g_usdhc_pin_cfg_cb)
g_usdhc_pin_cfg_cb(nusdhc, init,
speed, strength);
}

/* Usdhc driver needs to reconfigure the dat3 line to a pullup in order to
* detect an SD card on the bus. Expose a callback to do that here. The board
* must register this callback in its init function.
*/
static usdhc_dat3_cfg_cb g_usdhc_dat3_cfg_cb;

void imxrt_usdhc_dat3_cb_register(usdhc_dat3_cfg_cb cb)
{
g_usdhc_dat3_cfg_cb = cb;
}

void imxrt_usdhc_dat3_pull(bool pullup)
{
if (g_usdhc_dat3_cfg_cb) {
g_usdhc_dat3_cfg_cb(pullup);
}
}

#endif

#if CONFIG_I2S_MCUX_SAI
void imxrt_audio_codec_pll_init(uint32_t clock_name, uint32_t clk_src,
uint32_t clk_pre_div, uint32_t clk_src_div)
Expand Down
47 changes: 0 additions & 47 deletions soc/arm/nxp_imx/rt/soc_rt11xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -463,53 +463,6 @@ static ALWAYS_INLINE void clock_init(void)
#endif
}

#if DT_NODE_HAS_STATUS(DT_NODELABEL(usdhc1), okay) && CONFIG_DISK_DRIVER_SDMMC

/* Usdhc driver needs to re-configure pinmux
* Pinmux depends on board design.
* From the perspective of Usdhc driver,
* it can't access board specific function.
* So SoC provides this for board to register
* its usdhc pinmux and for usdhc to access
* pinmux.
*/

static usdhc_pin_cfg_cb g_usdhc_pin_cfg_cb;

void imxrt_usdhc_pinmux_cb_register(usdhc_pin_cfg_cb cb)
{
g_usdhc_pin_cfg_cb = cb;
}

void imxrt_usdhc_pinmux(uint16_t nusdhc, bool init,
uint32_t speed, uint32_t strength)
{
if (g_usdhc_pin_cfg_cb)
g_usdhc_pin_cfg_cb(nusdhc, init,
speed, strength);
}

/* Usdhc driver needs to reconfigure the dat3 line to a pullup in order to
* detect an SD card on the bus. Expose a callback to do that here. The board
* must register this callback in its init function.
*/
static usdhc_dat3_cfg_cb g_usdhc_dat3_cfg_cb;

void imxrt_usdhc_dat3_cb_register(usdhc_dat3_cfg_cb cb)
{
g_usdhc_dat3_cfg_cb = cb;
}

void imxrt_usdhc_dat3_pull(bool pullup)
{
if (g_usdhc_dat3_cfg_cb) {
g_usdhc_dat3_cfg_cb(pullup);
}
}

#endif


#if CONFIG_I2S_MCUX_SAI
void imxrt_audio_codec_pll_init(uint32_t clock_name, uint32_t clk_src,
uint32_t clk_pre_div, uint32_t clk_src_div)
Expand Down

0 comments on commit 40526f8

Please sign in to comment.