ARM: tegra: Implement clk_m
On currently supported SoCs, clk_m always runs at the same frequency as the oscillator input. However newer SoC generations such as Tegra210 no longer have that restriction. Prepare for that by separating clk_m from the oscillator clock and allow SoC code to override the clk_m rate. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Tom Warren <twarren@nvidia.com>
This commit is contained in:

committed by
Tom Warren

parent
70bcb43e7d
commit
c043c0259c
@@ -44,6 +44,9 @@ enum {
|
||||
/* return the current oscillator clock frequency */
|
||||
enum clock_osc_freq clock_get_osc_freq(void);
|
||||
|
||||
/* return the clk_m frequency */
|
||||
unsigned int clk_m_get_rate(unsigned int parent_rate);
|
||||
|
||||
/**
|
||||
* Start PLL using the provided configuration parameters.
|
||||
*
|
||||
@@ -338,8 +341,8 @@ void arch_timer_init(void);
|
||||
|
||||
void tegra30_set_up_pllp(void);
|
||||
|
||||
/* Number of PLL-based clocks (i.e. not OSC or 32KHz) */
|
||||
#define CLOCK_ID_PLL_COUNT (CLOCK_ID_COUNT - 2)
|
||||
/* Number of PLL-based clocks (i.e. not OSC, MCLK or 32KHz) */
|
||||
#define CLOCK_ID_PLL_COUNT (CLOCK_ID_COUNT - 3)
|
||||
|
||||
struct clk_pll_info {
|
||||
u32 m_shift:5; /* DIVM_SHIFT */
|
||||
|
@@ -38,6 +38,7 @@ enum clock_id {
|
||||
/* These are the base clocks (inputs to the Tegra SOC) */
|
||||
CLOCK_ID_32KHZ,
|
||||
CLOCK_ID_OSC,
|
||||
CLOCK_ID_CLK_M,
|
||||
|
||||
CLOCK_ID_COUNT, /* number of PLLs */
|
||||
CLOCK_ID_DISPLAY2, /* placeholder */
|
||||
|
@@ -30,6 +30,7 @@ enum clock_id {
|
||||
/* These are the base clocks (inputs to the Tegra SoC) */
|
||||
CLOCK_ID_32KHZ,
|
||||
CLOCK_ID_OSC,
|
||||
CLOCK_ID_CLK_M,
|
||||
|
||||
CLOCK_ID_COUNT, /* number of PLLs */
|
||||
|
||||
|
@@ -29,6 +29,7 @@ enum clock_id {
|
||||
/* These are the base clocks (inputs to the Tegra SOC) */
|
||||
CLOCK_ID_32KHZ,
|
||||
CLOCK_ID_OSC,
|
||||
CLOCK_ID_CLK_M,
|
||||
|
||||
CLOCK_ID_COUNT, /* number of clocks */
|
||||
CLOCK_ID_NONE = -1,
|
||||
|
@@ -30,6 +30,7 @@ enum clock_id {
|
||||
/* These are the base clocks (inputs to the Tegra SoC) */
|
||||
CLOCK_ID_32KHZ,
|
||||
CLOCK_ID_OSC,
|
||||
CLOCK_ID_CLK_M,
|
||||
|
||||
CLOCK_ID_COUNT, /* number of PLLs */
|
||||
|
||||
|
@@ -38,6 +38,7 @@ enum clock_id {
|
||||
/* These are the base clocks (inputs to the Tegra SOC) */
|
||||
CLOCK_ID_32KHZ,
|
||||
CLOCK_ID_OSC,
|
||||
CLOCK_ID_CLK_M,
|
||||
|
||||
CLOCK_ID_COUNT, /* number of PLLs */
|
||||
CLOCK_ID_DISPLAY2, /* Tegra3, placeholder */
|
||||
|
Reference in New Issue
Block a user