Yann Gautier | caf575b | 2018-07-24 17:18:19 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2017-2018, STMicroelectronics - All Rights Reserved |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
Yann Gautier | caf575b | 2018-07-24 17:18:19 +0200 | [diff] [blame] | 7 | #include <platform_def.h> |
Antonio Nino Diaz | e0f9063 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 8 | |
| 9 | #include <drivers/st/stm32mp1_ddr_helpers.h> |
| 10 | #include <drivers/st/stm32mp1_rcc.h> |
| 11 | #include <lib/mmio.h> |
Yann Gautier | caf575b | 2018-07-24 17:18:19 +0200 | [diff] [blame] | 12 | |
| 13 | void ddr_enable_clock(void) |
| 14 | { |
| 15 | mmio_setbits_32(RCC_BASE + RCC_DDRITFCR, |
| 16 | RCC_DDRITFCR_DDRC1EN | |
| 17 | RCC_DDRITFCR_DDRC2EN | |
| 18 | RCC_DDRITFCR_DDRPHYCEN | |
| 19 | RCC_DDRITFCR_DDRPHYCAPBEN | |
| 20 | RCC_DDRITFCR_DDRCAPBEN); |
| 21 | } |