@@ -298,6 +298,28 @@ static struct sif_cmd_handler *handler_from_cid(u32 cmd_id)
return id < CMD_HANDLER_MAX ? &cmd_handlers[id] : NULL;
}
+static void cmd_rpc_end(const struct sif_cmd_header *header,
+ const void *data, void *arg)
+{
+ const struct sif_rpc_request_end_packet *packet = data;
+ struct sif_rpc_client *client = packet->client;
+
+ switch (packet->client_id) {
+ case SIF_CMD_RPC_CALL:
+ break;
+
+ case SIF_CMD_RPC_BIND:
+ client->server = packet->server;
+ client->server_buffer = packet->server_buffer;
+ break;
+
+ default:
+ BUG();
+ }
+
+ complete_all(&client->done);
+}
+
static void cmd_rpc_bind(const struct sif_cmd_header *header,
const void *data, void *arg)
{
@@ -406,6 +428,7 @@ static int sif_request_cmds(void)
} cmds[] = {
{ SIF_CMD_WRITE_SREG, cmd_write_sreg, NULL },
+ { SIF_CMD_RPC_END, cmd_rpc_end, NULL },
{ SIF_CMD_RPC_BIND, cmd_rpc_bind, NULL },
};
int err = 0;
The IOP responds with a bind end to the main processor's corresponding command, containing the IOP server memory address to store RPC data. Signed-off-by: Fredrik Noring <noring@nocrew.org> --- drivers/ps2/sif.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)