Commit e6a90288 authored by Dai Okamura's avatar Dai Okamura Committed by Masahiro Yamada
Browse files

uniphier: revise SCP protocol handshake



When the SoC issues a command IRQ to SCP, SCP sets STMTOBEIRQ as ACK.
The SoC must wait for it before issuing the next command.

This commit makes sure to meet the requirement.
Signed-off-by: default avatarDai Okamura <okamura.dai@socionext.com>
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
parent 8be7850f
...@@ -12,7 +12,9 @@ ...@@ -12,7 +12,9 @@
#define UNIPHIER_ROM_RSV3 0x5980120c #define UNIPHIER_ROM_RSV3 0x5980120c
#define UNIPHIER_STMBE2COM 0x5f800030 #define UNIPHIER_STMBE2COM 0x5f800030
#define UNIPHIER_STMTOBEIRQ 0x5f800060
#define UNIPHIER_BETOSTMIRQ0PT 0x5f800070 #define UNIPHIER_BETOSTMIRQ0PT 0x5f800070
#define UNIPHIER_BEIRQCLRPT 0x5f800072
#define UNIPHIER_SCP_READY_MAGIC 0x0000b6a5 #define UNIPHIER_SCP_READY_MAGIC 0x0000b6a5
...@@ -59,6 +61,10 @@ static void uniphier_scp_send_packet(const uint8_t *packet, int packet_len) ...@@ -59,6 +61,10 @@ static void uniphier_scp_send_packet(const uint8_t *packet, int packet_len)
} }
mmio_write_8(UNIPHIER_BETOSTMIRQ0PT, 0x55); 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) static void uniphier_scp_send_cmd(const uint8_t *cmd, int cmd_len)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment