3 * Vipin Kumar, ST Micoelectronics, vipin.kumar@st.com.
5 * SPDX-License-Identifier: GPL-2.0+
11 * platform specific initializations are already done in Xloader
12 * Initializations already done include
13 * DDR, PLLs, IP's clock enable and reset release etc
19 /* void setfreq(unsigned int device, unsigned int frequency) */
28 /* Saving the function arguements for later use */
32 /* Putting DDR into self refresh */
42 ldr r2,REFRESH_CYCLES_V
43 orr r1, r1, r2, lsl #16
47 ldr r2,SREFRESH_MASK_V
55 /* Delay to ensure self refresh mode */
56 ldr r0,SREFRESH_DELAY_V
62 /* Putting system in slow mode */
67 /* Changing PLL(1/2) frequency */
74 /* Change PLL2 (DDR frequency) */
80 /* Change PLL1 (CPU frequency) */
109 /* Putting system back to normal mode */
114 /* Putting DDR back to normal */
117 ldr r2,SREFRESH_MASK_V
124 /* Delay to ensure self refresh mode */
125 ldr r0,SREFRESH_DELAY_V
132 /* Resuming back to code */
174 .word setfreq_sz - setfreq