Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
MMC U-Boot Custodian Tree
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
U-Boot
Custodians
MMC U-Boot Custodian Tree
Commits
1436d510
Commit
1436d510
authored
13 years ago
by
Tom Warren
Committed by
Albert ARIBAUD
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
arm: Tegra2: Add missing PLLX init
Signed-off-by:
Tom Warren
<
twarren@nvidia.com
>
parent
6445a305
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
arch/arm/cpu/armv7/tegra2/ap20.c
+29
-0
29 additions, 0 deletions
arch/arm/cpu/armv7/tegra2/ap20.c
arch/arm/include/asm/arch-tegra2/clk_rst.h
+4
-2
4 additions, 2 deletions
arch/arm/include/asm/arch-tegra2/clk_rst.h
with
33 additions
and
2 deletions
arch/arm/cpu/armv7/tegra2/ap20.c
+
29
−
0
View file @
1436d510
...
...
@@ -32,6 +32,32 @@
u32
s_first_boot
=
1
;
void
init_pllx
(
void
)
{
struct
clk_rst_ctlr
*
clkrst
=
(
struct
clk_rst_ctlr
*
)
NV_PA_CLK_RST_BASE
;
u32
reg
;
/* If PLLX is already enabled, just return */
reg
=
readl
(
&
clkrst
->
crc_pllx_base
);
if
(
reg
&
PLL_ENABLE
)
return
;
/* Set PLLX_MISC */
reg
=
CPCON
;
/* CPCON[11:8] = 0001 */
writel
(
reg
,
&
clkrst
->
crc_pllx_misc
);
/* Use 12MHz clock here */
reg
=
(
PLL_BYPASS
|
PLL_DIVM
);
reg
|=
(
1000
<<
8
);
/* DIVN = 0x3E8 */
writel
(
reg
,
&
clkrst
->
crc_pllx_base
);
reg
|=
PLL_ENABLE
;
writel
(
reg
,
&
clkrst
->
crc_pllx_base
);
reg
&=
~
PLL_BYPASS
;
writel
(
reg
,
&
clkrst
->
crc_pllx_base
);
}
static
void
enable_cpu_clock
(
int
enable
)
{
struct
clk_rst_ctlr
*
clkrst
=
(
struct
clk_rst_ctlr
*
)
NV_PA_CLK_RST_BASE
;
...
...
@@ -47,6 +73,9 @@ static void enable_cpu_clock(int enable)
*/
if
(
enable
)
{
/* Initialize PLLX */
init_pllx
();
/* Wait until all clocks are stable */
udelay
(
PLL_STABILIZATION_DELAY
);
...
...
This diff is collapsed.
Click to expand it.
arch/arm/include/asm/arch-tegra2/clk_rst.h
+
4
−
2
View file @
1436d510
...
...
@@ -160,8 +160,8 @@ struct clk_rst_ctlr {
#define PLL_DIVP (1 << 20)
/* post divider, b22:20 */
#define PLL_DIVM 0x0C
/* input divider, b4:0 */
#define SWR_UARTD_RST (1 <<
2
)
#define CLK_ENB_UARTD (1 <<
2
)
#define SWR_UARTD_RST (1 <<
1
)
#define CLK_ENB_UARTD (1 <<
1
)
#define SWR_UARTA_RST (1 << 6)
#define CLK_ENB_UARTA (1 << 6)
...
...
@@ -189,4 +189,6 @@ struct clk_rst_ctlr {
#define CPU0_CLK_STP (1 << 8)
#define CPU1_CLK_STP (1 << 9)
#define CPCON (1 << 8)
#endif
/* CLK_RST_H */
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment