Vikas Manocha | 33913c5 | 2014-11-18 10:42:22 -0800 | [diff] [blame^] | 1 | /* |
| 2 | * (C) Copyright 2014 |
| 3 | * Vikas Manocha, ST Micoelectronics, vikas.manocha@st.com. |
| 4 | * |
| 5 | * SPDX-License-Identifier: GPL-2.0+ |
| 6 | */ |
| 7 | |
| 8 | #include <asm/io.h> |
| 9 | #include <asm/arch/hardware.h> |
| 10 | #include <asm/arch/stv0991_cgu.h> |
| 11 | #include<asm/arch/stv0991_periph.h> |
| 12 | |
| 13 | static struct stv0991_cgu_regs *const stv0991_cgu_regs = \ |
| 14 | (struct stv0991_cgu_regs *) (CGU_BASE_ADDR); |
| 15 | |
| 16 | void clock_setup(int peripheral) |
| 17 | { |
| 18 | switch (peripheral) { |
| 19 | case UART_CLOCK_CFG: |
| 20 | writel(UART_CLK_CFG, &stv0991_cgu_regs->uart_freq); |
| 21 | break; |
| 22 | case ETH_CLOCK_CFG: |
| 23 | break; |
| 24 | default: |
| 25 | break; |
| 26 | } |
| 27 | } |