Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
c085052b
Commit
c085052b
authored
Nov 29, 2010
by
Eric Miao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ARM: pxa: add clock for static memory controller
Signed-off-by:
Eric Miao
<
eric.y.miao@gmail.com
>
parent
a3172e54
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
3 deletions
+25
-3
arch/arm/mach-pxa/clock-pxa3xx.c
arch/arm/mach-pxa/clock-pxa3xx.c
+22
-3
arch/arm/mach-pxa/clock.h
arch/arm/mach-pxa/clock.h
+1
-0
arch/arm/mach-pxa/pxa3xx.c
arch/arm/mach-pxa/pxa3xx.c
+2
-0
No files found.
arch/arm/mach-pxa/clock-pxa3xx.c
View file @
c085052b
...
...
@@ -9,7 +9,9 @@
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/io.h>
#include <mach/smemc.h>
#include <mach/pxa3xx-regs.h>
#include "clock.h"
...
...
@@ -23,9 +25,6 @@
#define ACCR_D0CS (1 << 26)
#define ACCR_PCCE (1 << 11)
/* crystal frequency to static memory controller multiplier (SMCFS) */
static
unsigned
char
smcfs_mult
[
8
]
=
{
6
,
0
,
8
,
0
,
0
,
16
,
};
/* crystal frequency to HSIO bus frequency multiplier (HSS) */
static
unsigned
char
hss_mult
[
4
]
=
{
8
,
12
,
16
,
24
};
...
...
@@ -108,6 +107,20 @@ static unsigned long clk_pxa3xx_hsio_getrate(struct clk *clk)
return
hsio_clk
;
}
/* crystal frequency to static memory controller multiplier (SMCFS) */
static
unsigned
int
smcfs_mult
[
8
]
=
{
6
,
0
,
8
,
0
,
0
,
16
,
};
static
unsigned
int
df_clkdiv
[
4
]
=
{
1
,
2
,
4
,
1
};
static
unsigned
long
clk_pxa3xx_smemc_getrate
(
struct
clk
*
clk
)
{
unsigned
long
acsr
=
ACSR
;
unsigned
long
memclkcfg
=
__raw_readl
(
MEMCLKCFG
);
unsigned
int
smcfs
=
(
acsr
>>
23
)
&
0x7
;
return
BASE_CLK
*
smcfs_mult
[(
acsr
>>
23
)
&
0x7
]
/
df_clkdiv
[(
memclkcfg
>>
16
)
&
0x3
];
}
void
clk_pxa3xx_cken_enable
(
struct
clk
*
clk
)
{
unsigned
long
mask
=
1ul
<<
(
clk
->
cken
&
0x1f
);
...
...
@@ -145,6 +158,12 @@ const struct clkops clk_pxa3xx_ac97_ops = {
.
getrate
=
clk_pxa3xx_ac97_getrate
,
};
const
struct
clkops
clk_pxa3xx_smemc_ops
=
{
.
enable
=
clk_pxa3xx_cken_enable
,
.
disable
=
clk_pxa3xx_cken_disable
,
.
getrate
=
clk_pxa3xx_smemc_getrate
,
};
static
void
clk_pout_enable
(
struct
clk
*
clk
)
{
OSCC
|=
OSCC_PEN
;
...
...
arch/arm/mach-pxa/clock.h
View file @
c085052b
...
...
@@ -69,6 +69,7 @@ extern const struct clkops clk_pxa3xx_cken_ops;
extern
const
struct
clkops
clk_pxa3xx_hsio_ops
;
extern
const
struct
clkops
clk_pxa3xx_ac97_ops
;
extern
const
struct
clkops
clk_pxa3xx_pout_ops
;
extern
const
struct
clkops
clk_pxa3xx_smemc_ops
;
extern
void
clk_pxa3xx_cken_enable
(
struct
clk
*
);
extern
void
clk_pxa3xx_cken_disable
(
struct
clk
*
);
...
...
arch/arm/mach-pxa/pxa3xx.c
View file @
c085052b
...
...
@@ -59,6 +59,7 @@ static DEFINE_PXA3_CKEN(pxa3xx_mmc1, MMC1, 19500000, 0);
static
DEFINE_PXA3_CKEN
(
pxa3xx_mmc2
,
MMC2
,
19500000
,
0
);
static
DEFINE_CK
(
pxa3xx_lcd
,
LCD
,
&
clk_pxa3xx_hsio_ops
);
static
DEFINE_CK
(
pxa3xx_smemc
,
SMC
,
&
clk_pxa3xx_smemc_ops
);
static
DEFINE_CK
(
pxa3xx_camera
,
CAMERA
,
&
clk_pxa3xx_hsio_ops
);
static
DEFINE_CK
(
pxa3xx_ac97
,
AC97
,
&
clk_pxa3xx_ac97_ops
);
static
DEFINE_CLK
(
pxa3xx_pout
,
&
clk_pxa3xx_pout_ops
,
13000000
,
70
);
...
...
@@ -87,6 +88,7 @@ static struct clk_lookup pxa3xx_clkregs[] = {
INIT_CLKREG
(
&
clk_pxa3xx_pwm1
,
"pxa27x-pwm.1"
,
NULL
),
INIT_CLKREG
(
&
clk_pxa3xx_mmc1
,
"pxa2xx-mci.0"
,
NULL
),
INIT_CLKREG
(
&
clk_pxa3xx_mmc2
,
"pxa2xx-mci.1"
,
NULL
),
INIT_CLKREG
(
&
clk_pxa3xx_smemc
,
"pxa2xx-pcmcia"
,
NULL
),
};
#ifdef CONFIG_PM
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment