Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1701205 > unrolled thread
| Started by | Jassi Brar <jassisinghbrar@gmail.com> |
|---|---|
| First post | 2017-08-01 18:20 +0200 |
| Last post | 2017-08-01 18:20 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v2 2/3] mailbox: introduce ARM SMC based mailbox Jassi Brar <jassisinghbrar@gmail.com> - 2017-08-01 18:20 +0200
| From | Jassi Brar <jassisinghbrar@gmail.com> |
|---|---|
| Date | 2017-08-01 18:20 +0200 |
| Subject | Re: [PATCH v2 2/3] mailbox: introduce ARM SMC based mailbox |
| Message-ID | <u9I3M-6bX-11@gated-at.bofh.it> |
On Mon, Jul 24, 2017 at 4:53 AM, Andre Przywara <andre.przywara@arm.com> wrote:
> +static int arm_smc_send_data(struct mbox_chan *link, void *data)
> +{
> + struct arm_smc_chan_data *chan_data = link->con_priv;
> + u32 function_id = chan_data->function_id;
> + struct arm_smccc_res res;
> + u32 msg = *(u32 *)data;
> +
> + if (chan_data->flags & ARM_SMC_MBOX_USE_HVC)
> + arm_smccc_hvc(function_id, msg, 0, 0, 0, 0, 0, 0, &res);
> + else
> + arm_smccc_smc(function_id, msg, 0, 0, 0, 0, 0, 0, &res);
> +
Sorry, I didn't notice earlier that you cull parameters [R2, R7] to
SMC/HVC call by making them all 0s ...
arm_smccc_smc(function_id, msg, 0, 0, 0, 0, 0, 0, &res);
I see you have SCMI/SCPI on your mind, however we need to make
controller drivers independent of users.
I think this driver should simply emulate mailbox over the SMC/HVC
calls. That is, respect all parameters.
So maybe we should define a
struct arm_smccc_mbox_cmd {
unsigned long a0, a1, a2, a3, a4, a5, a6, a7;
}
and have
static int arm_smc_send_data(struct mbox_chan *link, void *data)
{
struct arm_smc_chan_data *chan_data = link->con_priv;
struct arm_smccc_res res;
struct arm_smccc_mbox_cmd *cmd = data;
u32 function_id = cmd->a0;
..... and pass cmd.{a1, a2, a3, a4, a5, a6, a7} to the SMC/HVC call.
....
}
And BTW, instead of specifying 'func-ids' in DT, we can have
'num-chans' which will tell how many identical channels to populate.
Also because the Function-Identifier seems like belong to the client
driver more than controller.
Cheers!
Back to top | Article view | linux.kernel
csiph-web