Browse Source

refactor(st): move SDMMC definitions to driver

Those specific SDMMC definitions are only used in stm32_sdmmc2.c driver.
Move them there.

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Change-Id: Iac7e505e9421aa7630bee8ce6fc2277b98581995
pull/2003/head
Yann Gautier 1 year ago
committed by Yann Gautier
parent
commit
136f632fbc
  1. 8
      drivers/st/mmc/stm32_sdmmc2.c
  2. 6
      plat/st/stm32mp1/stm32mp1_def.h

8
drivers/st/mmc/stm32_sdmmc2.c

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2022, STMicroelectronics - All Rights Reserved
* Copyright (c) 2018-2023, STMicroelectronics - All Rights Reserved
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@ -131,6 +131,12 @@
#define SDMMC_FIFO_SIZE 64U
#define STM32MP_MMC_INIT_FREQ U(400000) /*400 KHz*/
#define STM32MP_SD_NORMAL_SPEED_MAX_FREQ U(25000000) /*25 MHz*/
#define STM32MP_SD_HIGH_SPEED_MAX_FREQ U(50000000) /*50 MHz*/
#define STM32MP_EMMC_NORMAL_SPEED_MAX_FREQ U(26000000) /*26 MHz*/
#define STM32MP_EMMC_HIGH_SPEED_MAX_FREQ U(52000000) /*52 MHz*/
static void stm32_sdmmc2_init(void);
static int stm32_sdmmc2_send_cmd_req(struct mmc_cmd *cmd);
static int stm32_sdmmc2_send_cmd(struct mmc_cmd *cmd);

6
plat/st/stm32mp1/stm32mp1_def.h

@ -416,12 +416,6 @@ enum ddr_type {
#define STM32MP_SDMMC2_BASE U(0x58007000)
#define STM32MP_SDMMC3_BASE U(0x48004000)
#define STM32MP_MMC_INIT_FREQ U(400000) /*400 KHz*/
#define STM32MP_SD_NORMAL_SPEED_MAX_FREQ U(25000000) /*25 MHz*/
#define STM32MP_SD_HIGH_SPEED_MAX_FREQ U(50000000) /*50 MHz*/
#define STM32MP_EMMC_NORMAL_SPEED_MAX_FREQ U(26000000) /*26 MHz*/
#define STM32MP_EMMC_HIGH_SPEED_MAX_FREQ U(52000000) /*52 MHz*/
/*******************************************************************************
* STM32MP1 BSEC / OTP
******************************************************************************/

Loading…
Cancel
Save