1 /* SPDX-License-Identifier: GPL-2.0+ */
4 * Vipin Kumar, ST Micoelectronics, vipin.kumar@st.com.
10 * platform specific initializations are already done in Xloader
11 * Initializations already done include
12 * DDR, PLLs, IP's clock enable and reset release etc
18 /* void setfreq(unsigned int device, unsigned int frequency) */
27 /* Saving the function arguements for later use */
31 /* Putting DDR into self refresh */
41 ldr r2,REFRESH_CYCLES_V
42 orr r1, r1, r2, lsl #16
46 ldr r2,SREFRESH_MASK_V
54 /* Delay to ensure self refresh mode */
55 ldr r0,SREFRESH_DELAY_V
61 /* Putting system in slow mode */
66 /* Changing PLL(1/2) frequency */
73 /* Change PLL2 (DDR frequency) */
79 /* Change PLL1 (CPU frequency) */
108 /* Putting system back to normal mode */
113 /* Putting DDR back to normal */
116 ldr r2,SREFRESH_MASK_V
123 /* Delay to ensure self refresh mode */
124 ldr r0,SREFRESH_DELAY_V
131 /* Resuming back to code */
173 .word setfreq_sz - setfreq