Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Sunxi Tools
Commits
dbc4515e
Commit
dbc4515e
authored
Jul 23, 2012
by
Alejandro Mery
Browse files
fexc: add port:power support
parent
81569121
Changes
2
Hide whitespace changes
Inline
Side-by-side
script_bin.c
View file @
dbc4515e
...
@@ -253,8 +253,10 @@ static int decompile_section(void *bin, size_t UNUSED(bin_size),
...
@@ -253,8 +253,10 @@ static int decompile_section(void *bin, size_t UNUSED(bin_size),
if
(
words
!=
6
)
{
if
(
words
!=
6
)
{
pr_err
(
"%s: %s.%s: invalid length %d (assuming %d)
\n
"
,
pr_err
(
"%s: %s.%s: invalid length %d (assuming %d)
\n
"
,
filename
,
section
->
name
,
entry
->
name
,
words
,
6
);
filename
,
section
->
name
,
entry
->
name
,
words
,
6
);
}
else
if
(
gpio
->
port
==
0xffff
)
{
;
/* port:power */
}
else
if
(
gpio
->
port
<
1
||
gpio
->
port
>
10
)
{
}
else
if
(
gpio
->
port
<
1
||
gpio
->
port
>
10
)
{
pr_err
(
"%s: %s.%s: unknown GPIO port type %
d
\n
"
,
pr_err
(
"%s: %s.%s: unknown GPIO port type %
u
\n
"
,
filename
,
section
->
name
,
entry
->
name
,
gpio
->
port
);
filename
,
section
->
name
,
entry
->
name
,
gpio
->
port
);
goto
failure
;
goto
failure
;
}
}
...
...
script_fex.c
View file @
dbc4515e
...
@@ -125,8 +125,14 @@ int script_generate_fex(FILE *out, const char *UNUSED(filename),
...
@@ -125,8 +125,14 @@ int script_generate_fex(FILE *out, const char *UNUSED(filename),
struct
script_gpio_entry
*
gpio
;
struct
script_gpio_entry
*
gpio
;
gpio
=
container_of
(
entry
,
struct
script_gpio_entry
,
entry
);
gpio
=
container_of
(
entry
,
struct
script_gpio_entry
,
entry
);
port
+=
gpio
->
port
;
if
(
gpio
->
port
==
0xffff
)
{
fprintf
(
out
,
"%s = port:P%c%02d"
,
entry
->
name
,
port
,
gpio
->
port_num
);
fprintf
(
out
,
"%s = port:power%u"
,
entry
->
name
,
gpio
->
port_num
);
}
else
{
port
+=
gpio
->
port
;
fprintf
(
out
,
"%s = port:P%c%02u"
,
entry
->
name
,
port
,
gpio
->
port_num
);
}
for
(
const
int
*
p
=
gpio
->
data
,
*
pe
=
p
+
4
;
p
!=
pe
;
p
++
)
{
for
(
const
int
*
p
=
gpio
->
data
,
*
pe
=
p
+
4
;
p
!=
pe
;
p
++
)
{
if
(
*
p
==
-
1
)
if
(
*
p
==
-
1
)
fputs
(
"<default>"
,
out
);
fputs
(
"<default>"
,
out
);
...
...
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