1 /*
2  * Copyright (c) 2020, Intel Corporation. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 #include <lib/mmio.h>
7 
8 #include "socfpga_system_manager.h"
9 #include "agilex_clock_manager.h"
10 
agx_mmc_init(void)11 void agx_mmc_init(void)
12 {
13 	mmio_clrbits_32(CLKMGR_PERPLL + CLKMGR_PERPLL_EN,
14 		CLKMGR_PERPLL_EN_SDMMCCLK);
15 	mmio_write_32(SOCFPGA_SYSMGR(SDMMC),
16 		SYSMGR_SDMMC_SMPLSEL(0) | SYSMGR_SDMMC_DRVSEL(3));
17 	mmio_setbits_32(CLKMGR_PERPLL + CLKMGR_PERPLL_EN,
18 		CLKMGR_PERPLL_EN_SDMMCCLK);
19 }
20