[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJe_ZheUknLZuMg-02V-AqyjxX8Nx4oK3O2HapqfCLkkXjngAg@mail.gmail.com>
Date: Thu, 11 Jun 2015 17:24:19 +0530
From: Jassi Brar <jaswinder.singh@...aro.org>
To: Sudeep Holla <sudeep.holla@....com>
Cc: lkml <linux-kernel@...r.kernel.org>, linux-pm@...r.kernel.org,
linux-clk@...r.kernel.org,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"Jon Medhurst (Tixy)" <tixy@...aro.org>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Arnd Bergmann <arnd@...db.de>,
Kevin Hilman <khilman@...nel.org>,
Jassi Brar <jassisinghbrar@...il.com>,
Liviu Dudau <Liviu.Dudau@....com>,
Olof Johansson <olof@...om.net>
Subject: Re: [PATCH v4 2/8] firmware: add support for ARM System Control and
Power Interface(SCPI) protocol
On 8 June 2015 at 16:09, Sudeep Holla <sudeep.holla@....com> wrote:
...
> +
> +static void scpi_process_cmd(struct scpi_chan *ch, u32 cmd)
> +{
> + unsigned long flags;
> + struct scpi_xfer *t, *match = NULL;
> +
> + spin_lock_irqsave(&ch->rx_lock, flags);
> + if (list_empty(&ch->rx_pending)) {
> + spin_unlock_irqrestore(&ch->rx_lock, flags);
> + return;
> + }
> +
> + list_for_each_entry(t, &ch->rx_pending, node)
> + if (CMD_XTRACT_UNIQ(t->cmd) == CMD_XTRACT_UNIQ(cmd)) {
> + list_del(&t->node);
> + match = t;
> + break;
> + }
> + /* check if wait_for_completion is in progress or timed-out */
> + if (match && !completion_done(&match->done)) {
> + struct scpi_shared_mem *mem = ch->rx_payload;
> + unsigned int len = min(match->rx_len, CMD_SIZE(cmd));
> +
> + match->status = le32_to_cpu(mem->status);
> + memcpy_fromio(match->rx_buf, mem->payload, len);
> + if (match->rx_len > len)
> + memset(match->rx_buf + len, 0, match->rx_len - len);
> + complete(&match->done);
> + }
> + spin_unlock_irqrestore(&ch->rx_lock, flags);
> +}
There doesn't seem to be support for commands sent by remote?
Something like when remote is the thermal master and it needs to send
sensor readings crossing thresholds.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists