Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci-2.6.23
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci-2.6.23
Commits
2c96f1a0
Commit
2c96f1a0
authored
Feb 10, 2006
by
Juha Yrjola
Browse files
Options
Browse Files
Download
Plain Diff
Merge source.mvista.com:linux-omap
parents
48fc6307
5d6ded7e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
5 deletions
+40
-5
arch/arm/mach-omap1/clock.h
arch/arm/mach-omap1/clock.h
+4
-2
arch/arm/plat-omap/clock.c
arch/arm/plat-omap/clock.c
+34
-1
drivers/mmc/omap.c
drivers/mmc/omap.c
+1
-2
include/asm-arm/arch-omap/clock.h
include/asm-arm/arch-omap/clock.h
+1
-0
No files found.
arch/arm/mach-omap1/clock.h
View file @
2c96f1a0
...
@@ -687,7 +687,8 @@ static struct clk bclk_16xx = {
...
@@ -687,7 +687,8 @@ static struct clk bclk_16xx = {
};
};
static
struct
clk
mmc1_ck
=
{
static
struct
clk
mmc1_ck
=
{
.
name
=
"mmc1_ck"
,
.
name
=
"mmc_ck"
,
.
id
=
1
,
/* Functional clock is direct from ULPD, interface clock is ARMPER */
/* Functional clock is direct from ULPD, interface clock is ARMPER */
.
parent
=
&
armper_ck
.
clk
,
.
parent
=
&
armper_ck
.
clk
,
.
rate
=
48000000
,
.
rate
=
48000000
,
...
@@ -701,7 +702,8 @@ static struct clk mmc1_ck = {
...
@@ -701,7 +702,8 @@ static struct clk mmc1_ck = {
};
};
static
struct
clk
mmc2_ck
=
{
static
struct
clk
mmc2_ck
=
{
.
name
=
"mmc2_ck"
,
.
name
=
"mmc_ck"
,
.
id
=
2
,
/* Functional clock is direct from ULPD, interface clock is ARMPER */
/* Functional clock is direct from ULPD, interface clock is ARMPER */
.
parent
=
&
armper_ck
.
clk
,
.
parent
=
&
armper_ck
.
clk
,
.
rate
=
48000000
,
.
rate
=
48000000
,
...
...
arch/arm/plat-omap/clock.c
View file @
2c96f1a0
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
#include <linux/string.h>
#include <linux/string.h>
#include <linux/clk.h>
#include <linux/clk.h>
#include <linux/mutex.h>
#include <linux/mutex.h>
#include <linux/platform_device.h>
#include <asm/io.h>
#include <asm/io.h>
#include <asm/semaphore.h>
#include <asm/semaphore.h>
...
@@ -37,17 +38,37 @@ static struct clk_functions *arch_clock;
...
@@ -37,17 +38,37 @@ static struct clk_functions *arch_clock;
* Standard clock functions defined in include/linux/clk.h
* Standard clock functions defined in include/linux/clk.h
*-------------------------------------------------------------------------*/
*-------------------------------------------------------------------------*/
/*
* Returns a clock. Note that we first try to use device id on the bus
* and clock name. If this fails, we try to use clock name only.
*/
struct
clk
*
clk_get
(
struct
device
*
dev
,
const
char
*
id
)
struct
clk
*
clk_get
(
struct
device
*
dev
,
const
char
*
id
)
{
{
struct
clk
*
p
,
*
clk
=
ERR_PTR
(
-
ENOENT
);
struct
clk
*
p
,
*
clk
=
ERR_PTR
(
-
ENOENT
);
int
idno
;
if
(
dev
==
NULL
||
dev
->
bus
!=
&
platform_bus_type
)
idno
=
-
1
;
else
idno
=
to_platform_device
(
dev
)
->
id
;
mutex_lock
(
&
clocks_mutex
);
mutex_lock
(
&
clocks_mutex
);
list_for_each_entry
(
p
,
&
clocks
,
node
)
{
if
(
p
->
id
==
idno
&&
strcmp
(
id
,
p
->
name
)
==
0
&&
try_module_get
(
p
->
owner
))
{
clk
=
p
;
break
;
}
}
list_for_each_entry
(
p
,
&
clocks
,
node
)
{
list_for_each_entry
(
p
,
&
clocks
,
node
)
{
if
(
strcmp
(
id
,
p
->
name
)
==
0
&&
try_module_get
(
p
->
owner
))
{
if
(
strcmp
(
id
,
p
->
name
)
==
0
&&
try_module_get
(
p
->
owner
))
{
clk
=
p
;
clk
=
p
;
break
;
break
;
}
}
}
}
mutex_unlock
(
&
clocks_mutex
);
mutex_unlock
(
&
clocks_mutex
);
return
clk
;
return
clk
;
...
@@ -59,6 +80,9 @@ int clk_enable(struct clk *clk)
...
@@ -59,6 +80,9 @@ int clk_enable(struct clk *clk)
unsigned
long
flags
;
unsigned
long
flags
;
int
ret
=
0
;
int
ret
=
0
;
if
(
clk
==
NULL
||
IS_ERR
(
clk
))
return
-
ENODEV
;
spin_lock_irqsave
(
&
clockfw_lock
,
flags
);
spin_lock_irqsave
(
&
clockfw_lock
,
flags
);
if
(
arch_clock
->
clk_enable
)
if
(
arch_clock
->
clk_enable
)
ret
=
arch_clock
->
clk_enable
(
clk
);
ret
=
arch_clock
->
clk_enable
(
clk
);
...
@@ -72,6 +96,9 @@ void clk_disable(struct clk *clk)
...
@@ -72,6 +96,9 @@ void clk_disable(struct clk *clk)
{
{
unsigned
long
flags
;
unsigned
long
flags
;
if
(
clk
==
NULL
||
IS_ERR
(
clk
))
return
;
spin_lock_irqsave
(
&
clockfw_lock
,
flags
);
spin_lock_irqsave
(
&
clockfw_lock
,
flags
);
if
(
arch_clock
->
clk_disable
)
if
(
arch_clock
->
clk_disable
)
arch_clock
->
clk_disable
(
clk
);
arch_clock
->
clk_disable
(
clk
);
...
@@ -84,6 +111,9 @@ int clk_get_usecount(struct clk *clk)
...
@@ -84,6 +111,9 @@ int clk_get_usecount(struct clk *clk)
unsigned
long
flags
;
unsigned
long
flags
;
int
ret
=
0
;
int
ret
=
0
;
if
(
clk
==
NULL
||
IS_ERR
(
clk
))
return
0
;
spin_lock_irqsave
(
&
clockfw_lock
,
flags
);
spin_lock_irqsave
(
&
clockfw_lock
,
flags
);
ret
=
clk
->
usecount
;
ret
=
clk
->
usecount
;
spin_unlock_irqrestore
(
&
clockfw_lock
,
flags
);
spin_unlock_irqrestore
(
&
clockfw_lock
,
flags
);
...
@@ -97,6 +127,9 @@ unsigned long clk_get_rate(struct clk *clk)
...
@@ -97,6 +127,9 @@ unsigned long clk_get_rate(struct clk *clk)
unsigned
long
flags
;
unsigned
long
flags
;
unsigned
long
ret
=
0
;
unsigned
long
ret
=
0
;
if
(
clk
==
NULL
||
IS_ERR
(
clk
))
return
0
;
spin_lock_irqsave
(
&
clockfw_lock
,
flags
);
spin_lock_irqsave
(
&
clockfw_lock
,
flags
);
ret
=
clk
->
rate
;
ret
=
clk
->
rate
;
spin_unlock_irqrestore
(
&
clockfw_lock
,
flags
);
spin_unlock_irqrestore
(
&
clockfw_lock
,
flags
);
...
...
drivers/mmc/omap.c
View file @
2c96f1a0
...
@@ -1191,8 +1191,7 @@ static int __init mmc_omap_probe(struct platform_device *pdev)
...
@@ -1191,8 +1191,7 @@ static int __init mmc_omap_probe(struct platform_device *pdev)
}
}
if
(
!
cpu_is_omap24xx
())
if
(
!
cpu_is_omap24xx
())
host
->
fclk
=
clk_get
(
&
pdev
->
dev
,
host
->
fclk
=
clk_get
(
&
pdev
->
dev
,
"mmc_ck"
);
(
host
->
id
==
1
)
?
"mmc1_ck"
:
"mmc2_ck"
);
else
else
host
->
fclk
=
clk_get
(
&
pdev
->
dev
,
"mmc_fck"
);
host
->
fclk
=
clk_get
(
&
pdev
->
dev
,
"mmc_fck"
);
...
...
include/asm-arm/arch-omap/clock.h
View file @
2c96f1a0
...
@@ -19,6 +19,7 @@ struct clk {
...
@@ -19,6 +19,7 @@ struct clk {
struct
list_head
node
;
struct
list_head
node
;
struct
module
*
owner
;
struct
module
*
owner
;
const
char
*
name
;
const
char
*
name
;
int
id
;
struct
clk
*
parent
;
struct
clk
*
parent
;
unsigned
long
rate
;
unsigned
long
rate
;
__u32
flags
;
__u32
flags
;
...
...
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