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
a4485b54
Commit
a4485b54
authored
Jul 05, 2017
by
Rob Herring
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dt/property-move' into dt/next
parents
5e1743c0
b8ba92b1
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
850 additions
and
744 deletions
+850
-744
drivers/of/Makefile
drivers/of/Makefile
+1
-1
drivers/of/base.c
drivers/of/base.c
+2
-733
drivers/of/property.c
drivers/of/property.c
+806
-0
include/linux/of.h
include/linux/of.h
+20
-10
include/linux/of_graph.h
include/linux/of_graph.h
+21
-0
No files found.
drivers/of/Makefile
View file @
a4485b54
obj-y
=
base.o device.o platform.o
obj-y
=
base.o device.o platform.o
property.o
obj-$(CONFIG_OF_DYNAMIC)
+=
dynamic.o
obj-$(CONFIG_OF_FLATTREE)
+=
fdt.o
obj-$(CONFIG_OF_EARLY_FLATTREE)
+=
fdt_address.o
...
...
drivers/of/base.c
View file @
a4485b54
This diff is collapsed.
Click to expand it.
drivers/of/property.c
0 → 100644
View file @
a4485b54
This diff is collapsed.
Click to expand it.
include/linux/of.h
View file @
a4485b54
...
...
@@ -148,18 +148,28 @@ extern raw_spinlock_t devtree_lock;
#ifdef CONFIG_OF
void
of_core_init
(
void
);
static
inline
bool
is_of_node
(
struct
fwnode_handle
*
fwnode
)
static
inline
bool
is_of_node
(
const
struct
fwnode_handle
*
fwnode
)
{
return
!
IS_ERR_OR_NULL
(
fwnode
)
&&
fwnode
->
type
==
FWNODE_OF
;
}
static
inline
struct
device_node
*
to_of_node
(
struct
fwnode_handle
*
fwnode
)
{
return
is_of_node
(
fwnode
)
?
container_of
(
fwnode
,
struct
device_node
,
fwnode
)
:
NULL
;
}
#define of_fwnode_handle(node) (&(node)->fwnode)
#define to_of_node(__fwnode) \
({ \
typeof(__fwnode) __to_of_node_fwnode = (__fwnode); \
\
is_of_node(__to_of_node_fwnode) ? \
container_of(__to_of_node_fwnode, \
struct device_node, fwnode) : \
NULL; \
})
#define of_fwnode_handle(node) \
({ \
typeof(node) __of_fwnode_handle_node = (node); \
\
__of_fwnode_handle_node ? \
&__of_fwnode_handle_node->fwnode : NULL; \
})
static
inline
bool
of_have_populated_dt
(
void
)
{
...
...
@@ -533,12 +543,12 @@ static inline void of_core_init(void)
{
}
static
inline
bool
is_of_node
(
struct
fwnode_handle
*
fwnode
)
static
inline
bool
is_of_node
(
const
struct
fwnode_handle
*
fwnode
)
{
return
false
;
}
static
inline
struct
device_node
*
to_of_node
(
struct
fwnode_handle
*
fwnode
)
static
inline
struct
device_node
*
to_of_node
(
const
struct
fwnode_handle
*
fwnode
)
{
return
NULL
;
}
...
...
include/linux/of_graph.h
View file @
a4485b54
...
...
@@ -43,11 +43,15 @@ struct of_endpoint {
#ifdef CONFIG_OF
int
of_graph_parse_endpoint
(
const
struct
device_node
*
node
,
struct
of_endpoint
*
endpoint
);
int
of_graph_get_endpoint_count
(
const
struct
device_node
*
np
);
struct
device_node
*
of_graph_get_port_by_id
(
struct
device_node
*
node
,
u32
id
);
struct
device_node
*
of_graph_get_next_endpoint
(
const
struct
device_node
*
parent
,
struct
device_node
*
previous
);
struct
device_node
*
of_graph_get_endpoint_by_regs
(
const
struct
device_node
*
parent
,
int
port_reg
,
int
reg
);
struct
device_node
*
of_graph_get_remote_endpoint
(
const
struct
device_node
*
node
);
struct
device_node
*
of_graph_get_port_parent
(
struct
device_node
*
node
);
struct
device_node
*
of_graph_get_remote_port_parent
(
const
struct
device_node
*
node
);
struct
device_node
*
of_graph_get_remote_port
(
const
struct
device_node
*
node
);
...
...
@@ -61,6 +65,11 @@ static inline int of_graph_parse_endpoint(const struct device_node *node,
return
-
ENOSYS
;
}
static
inline
int
of_graph_get_endpoint_count
(
const
struct
device_node
*
np
)
{
return
0
;
}
static
inline
struct
device_node
*
of_graph_get_port_by_id
(
struct
device_node
*
node
,
u32
id
)
{
...
...
@@ -80,6 +89,18 @@ static inline struct device_node *of_graph_get_endpoint_by_regs(
return
NULL
;
}
static
inline
struct
device_node
*
of_graph_get_remote_endpoint
(
const
struct
device_node
*
node
)
{
return
NULL
;
}
static
inline
struct
device_node
*
of_graph_get_port_parent
(
struct
device_node
*
node
)
{
return
NULL
;
}
static
inline
struct
device_node
*
of_graph_get_remote_port_parent
(
const
struct
device_node
*
node
)
{
...
...
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