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
e57d339a
Commit
e57d339a
authored
Jan 16, 2014
by
Vineet Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ARC: [cmdline] support External Device Trees from u-boot
Signed-off-by:
Vineet Gupta
<
vgupta@synopsys.com
>
parent
59ed9413
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
arch/arc/kernel/setup.c
arch/arc/kernel/setup.c
+12
-3
No files found.
arch/arc/kernel/setup.c
View file @
e57d339a
...
...
@@ -323,22 +323,31 @@ static inline int is_kernel(unsigned long addr)
void
__init
setup_arch
(
char
**
cmdline_p
)
{
/* make sure that uboot passed pointer to cmdline/dtb is valid */
if
(
uboot_tag
&&
is_kernel
((
unsigned
long
)
uboot_arg
))
panic
(
"Invalid uboot arg
\n
"
);
/* See if u-boot passed an external Device Tree blob */
machine_desc
=
setup_machine_fdt
(
uboot_arg
);
/* uboot_tag == 2 */
if
(
!
machine_desc
)
{
/* No, so try the embedded one */
machine_desc
=
setup_machine_fdt
(
__dtb_start
);
if
(
!
machine_desc
)
panic
(
"Embedded DT invalid
\n
"
);
/*
* Append uboot cmdline to embedded DT cmdline.
* If we are here, it is established that @uboot_arg didn't
* point to DT blob. Instead if u-boot says it is cmdline,
* Appent to embedded DT cmdline.
* setup_machine_fdt() would have populated @boot_command_line
*/
if
(
uboot_tag
==
1
)
{
BUG_ON
(
is_kernel
(
unsigned
long
)
uboot_arg
);
/* Ensure a whitespace between the 2 cmdlines */
strlcat
(
boot_command_line
,
" "
,
COMMAND_LINE_SIZE
);
strlcat
(
boot_command_line
,
uboot_arg
,
COMMAND_LINE_SIZE
);
}
}
/* Save unparsed command line copy for /proc/cmdline */
*
cmdline_p
=
boot_command_line
;
...
...
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