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
Kirill Smelkov
linux
Commits
04491ab0
Commit
04491ab0
authored
Dec 11, 2018
by
Tony Lindgren
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'omap-for-v4.21/ti-sysc' into omap-for-v4.21/driver
parents
3be5e10d
4014c08b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
13 deletions
+42
-13
arch/arm/mach-omap2/omap_hwmod.c
arch/arm/mach-omap2/omap_hwmod.c
+17
-6
drivers/bus/ti-sysc.c
drivers/bus/ti-sysc.c
+25
-7
No files found.
arch/arm/mach-omap2/omap_hwmod.c
View file @
04491ab0
...
...
@@ -2345,6 +2345,17 @@ static int __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data,
return
0
;
}
static
void
__init
parse_module_flags
(
struct
omap_hwmod
*
oh
,
struct
device_node
*
np
)
{
if
(
of_find_property
(
np
,
"ti,no-reset-on-init"
,
NULL
))
oh
->
flags
|=
HWMOD_INIT_NO_RESET
;
if
(
of_find_property
(
np
,
"ti,no-idle-on-init"
,
NULL
))
oh
->
flags
|=
HWMOD_INIT_NO_IDLE
;
if
(
of_find_property
(
np
,
"ti,no-idle"
,
NULL
))
oh
->
flags
|=
HWMOD_NO_IDLE
;
}
/**
* _init - initialize internal data for the hwmod @oh
* @oh: struct omap_hwmod *
...
...
@@ -2392,12 +2403,12 @@ static int __init _init(struct omap_hwmod *oh, void *data)
}
if
(
np
)
{
if
(
of_find_property
(
np
,
"ti,no-reset-on-init"
,
NULL
))
oh
->
flags
|=
HWMOD_INIT_NO_RESET
;
if
(
of_find_property
(
np
,
"ti,no-idle-on-init"
,
NULL
))
oh
->
flags
|=
HWMOD_INIT_NO_IDLE
;
if
(
of_find_property
(
np
,
"ti,no-idle"
,
NULL
)
)
oh
->
flags
|=
HWMOD_NO_IDLE
;
struct
device_node
*
child
;
parse_module_flags
(
oh
,
np
);
child
=
of_get_next_child
(
np
,
NULL
)
;
if
(
child
)
parse_module_flags
(
oh
,
child
)
;
}
oh
->
_state
=
_HWMOD_STATE_INITIALIZED
;
...
...
drivers/bus/ti-sysc.c
View file @
04491ab0
...
...
@@ -91,6 +91,9 @@ struct sysc {
struct
delayed_work
idle_work
;
};
static
void
sysc_parse_dts_quirks
(
struct
sysc
*
ddata
,
struct
device_node
*
np
,
bool
is_child
);
void
sysc_write
(
struct
sysc
*
ddata
,
int
offset
,
u32
value
)
{
writel_relaxed
(
value
,
ddata
->
module_va
+
offset
);
...
...
@@ -379,6 +382,7 @@ static int sysc_check_one_child(struct sysc *ddata,
dev_warn
(
ddata
->
dev
,
"really a child ti,hwmods property?"
);
sysc_check_quirk_stdout
(
ddata
,
np
);
sysc_parse_dts_quirks
(
ddata
,
np
,
true
);
return
0
;
}
...
...
@@ -1279,23 +1283,37 @@ static const struct sysc_dts_quirk sysc_dts_quirks[] = {
.
mask
=
SYSC_QUIRK_NO_RESET_ON_INIT
,
},
};
static
int
sysc_init_dts_quirks
(
struct
sysc
*
ddata
)
static
void
sysc_parse_dts_quirks
(
struct
sysc
*
ddata
,
struct
device_node
*
np
,
bool
is_child
)
{
struct
device_node
*
np
=
ddata
->
dev
->
of_node
;
const
struct
property
*
prop
;
int
i
,
len
,
error
;
u32
val
;
ddata
->
legacy_mode
=
of_get_property
(
np
,
"ti,hwmods"
,
NULL
);
int
i
,
len
;
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
sysc_dts_quirks
);
i
++
)
{
prop
=
of_get_property
(
np
,
sysc_dts_quirks
[
i
].
name
,
&
len
);
const
char
*
name
=
sysc_dts_quirks
[
i
].
name
;
prop
=
of_get_property
(
np
,
name
,
&
len
);
if
(
!
prop
)
continue
;
ddata
->
cfg
.
quirks
|=
sysc_dts_quirks
[
i
].
mask
;
if
(
is_child
)
{
dev_warn
(
ddata
->
dev
,
"dts flag should be at module level for %s
\n
"
,
name
);
}
}
}
static
int
sysc_init_dts_quirks
(
struct
sysc
*
ddata
)
{
struct
device_node
*
np
=
ddata
->
dev
->
of_node
;
int
error
;
u32
val
;
ddata
->
legacy_mode
=
of_get_property
(
np
,
"ti,hwmods"
,
NULL
);
sysc_parse_dts_quirks
(
ddata
,
np
,
false
);
error
=
of_property_read_u32
(
np
,
"ti,sysc-delay-us"
,
&
val
);
if
(
!
error
)
{
if
(
val
>
255
)
{
...
...
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