Lines Matching +full:sub +full:- +full:processor
1 // SPDX-License-Identifier: GPL-2.0+
38 * scu_ipc_send_command() - send command to SCU
43 * A write to this register results in an interrupt to the SCU core processor
49 writel(cmd, ®s->cmd); in scu_ipc_send_command()
53 * scu_ipc_check_status() - check status of last command
68 status = readl(®s->status); in scu_ipc_check_status()
73 } while (--loop_count); in scu_ipc_check_status()
75 return -ETIMEDOUT; in scu_ipc_check_status()
79 return -EIO; in scu_ipc_check_status()
85 static int scu_ipc_cmd(struct ipc_regs *regs, u32 cmd, u32 sub, in scu_ipc_cmd() argument
91 writel(*in++, ®s->wbuf[i]); in scu_ipc_cmd()
93 scu_ipc_send_command(regs, (inlen << 16) | (sub << 12) | cmd); in scu_ipc_cmd()
98 *out++ = readl(®s->rbuf[i]); in scu_ipc_cmd()
105 * scu_ipc_raw_command() - IPC command with data and pointers
107 * @sub: IPC command sub type
119 int scu_ipc_raw_command(u32 cmd, u32 sub, u32 *in, int inlen, u32 *out, in scu_ipc_raw_command() argument
135 return -EINVAL; in scu_ipc_raw_command()
137 writel(dptr, &scu->regs->dptr); in scu_ipc_raw_command()
138 writel(sptr, &scu->regs->sptr); in scu_ipc_raw_command()
141 * SRAM controller doesn't support 8-bit writes, it only in scu_ipc_raw_command()
142 * supports 32-bit writes, so we have to copy input data into in scu_ipc_raw_command()
152 return scu_ipc_cmd(scu->regs, cmd, sub, inbuf, inlen, out, outlen); in scu_ipc_raw_command()
156 * scu_ipc_simple_command() - send a simple command
158 * @sub: sub type
167 int scu_ipc_simple_command(u32 cmd, u32 sub) in scu_ipc_simple_command() argument
179 scu_ipc_send_command(scu->regs, sub << 12 | cmd); in scu_ipc_simple_command()
180 return scu_ipc_check_status(scu->regs); in scu_ipc_simple_command()
184 * scu_ipc_command - command with data
186 * @sub: sub type
194 int scu_ipc_command(u32 cmd, u32 sub, u32 *in, int inlen, u32 *out, int outlen) in scu_ipc_command() argument
206 return scu_ipc_cmd(scu->regs, cmd, sub, in, inlen, out, outlen); in scu_ipc_command()
213 scu->regs = syscon_get_first_range(X86_SYSCON_SCU); in scu_ipc_probe()
219 { .compatible = "intel,scu-ipc", .data = X86_SYSCON_SCU },