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
Arm Trusted Firmware
Commits
6f2ad3a9
Unverified
Commit
6f2ad3a9
authored
6 years ago
by
Antonio Niño Díaz
Committed by
GitHub
6 years ago
Browse files
Options
Download
Plain Diff
Merge pull request #1656 from masahir0y/uniphier
uniphier: clean-up and improve SCP handling code
parents
eb47f14d
e6a90288
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
plat/socionext/uniphier/uniphier.h
+0
-1
plat/socionext/uniphier/uniphier.h
plat/socionext/uniphier/uniphier_bl2_setup.c
+0
-10
plat/socionext/uniphier/uniphier_bl2_setup.c
plat/socionext/uniphier/uniphier_io_storage.c
+0
-18
plat/socionext/uniphier/uniphier_io_storage.c
plat/socionext/uniphier/uniphier_scp.c
+6
-0
plat/socionext/uniphier/uniphier_scp.c
with
6 additions
and
29 deletions
+6
-29
plat/socionext/uniphier/uniphier.h
View file @
6f2ad3a9
...
...
@@ -41,7 +41,6 @@ int uniphier_nand_init(uintptr_t *block_dev_spec);
int
uniphier_usb_init
(
unsigned
int
soc
,
uintptr_t
*
block_dev_spec
);
int
uniphier_io_setup
(
unsigned
int
soc
);
int
uniphier_check_image
(
unsigned
int
image_id
);
struct
image_info
;
struct
image_info
*
uniphier_get_image_info
(
unsigned
int
image_id
);
...
...
This diff is collapsed.
Click to expand it.
plat/socionext/uniphier/uniphier_bl2_setup.c
View file @
6f2ad3a9
...
...
@@ -88,16 +88,6 @@ void bl2_el3_plat_arch_setup(void)
break
;
}
if
(
!
skip_scp
)
{
ret
=
uniphier_check_image
(
SCP_BL2_IMAGE_ID
);
if
(
ret
)
{
WARN
(
"SCP_BL2 image not found. SCP_BL2 load will be skipped.
\n
"
);
WARN
(
"You must setup SCP by other means.
\n
"
);
skip_scp
=
1
;
uniphier_bl2_kick_scp
=
0
;
}
}
if
(
skip_scp
)
{
struct
image_info
*
image_info
;
...
...
This diff is collapsed.
Click to expand it.
plat/socionext/uniphier/uniphier_io_storage.c
View file @
6f2ad3a9
...
...
@@ -335,21 +335,3 @@ int plat_get_image_source(unsigned int image_id, uintptr_t *dev_handle,
return
io_dev_init
(
*
dev_handle
,
init_params
);
}
int
uniphier_check_image
(
unsigned
int
image_id
)
{
uintptr_t
dev_handle
,
image_spec
,
image_handle
;
int
ret
;
ret
=
plat_get_image_source
(
image_id
,
&
dev_handle
,
&
image_spec
);
if
(
ret
)
return
ret
;
ret
=
io_open
(
dev_handle
,
image_spec
,
&
image_handle
);
if
(
ret
)
return
ret
;
io_close
(
image_handle
);
return
0
;
}
This diff is collapsed.
Click to expand it.
plat/socionext/uniphier/uniphier_scp.c
View file @
6f2ad3a9
...
...
@@ -12,7 +12,9 @@
#define UNIPHIER_ROM_RSV3 0x5980120c
#define UNIPHIER_STMBE2COM 0x5f800030
#define UNIPHIER_STMTOBEIRQ 0x5f800060
#define UNIPHIER_BETOSTMIRQ0PT 0x5f800070
#define UNIPHIER_BEIRQCLRPT 0x5f800072
#define UNIPHIER_SCP_READY_MAGIC 0x0000b6a5
...
...
@@ -59,6 +61,10 @@ static void uniphier_scp_send_packet(const uint8_t *packet, int packet_len)
}
mmio_write_8
(
UNIPHIER_BETOSTMIRQ0PT
,
0x55
);
while
(
!
(
mmio_read_32
(
UNIPHIER_STMTOBEIRQ
)
&
BIT
(
1
)))
;
mmio_write_8
(
UNIPHIER_BEIRQCLRPT
,
BIT
(
1
)
|
BIT
(
0
));
}
static
void
uniphier_scp_send_cmd
(
const
uint8_t
*
cmd
,
int
cmd_len
)
...
...
This diff is collapsed.
Click to expand it.
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