Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753703AbbFKNYA (ORCPT ); Thu, 11 Jun 2015 09:24:00 -0400 Received: from foss.arm.com ([217.140.101.70]:56247 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752647AbbFKNXx (ORCPT ); Thu, 11 Jun 2015 09:23:53 -0400 Message-ID: <55798BE4.2000604@arm.com> Date: Thu, 11 Jun 2015 14:23:48 +0100 From: Sudeep Holla User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Jassi Brar CC: Sudeep Holla , lkml , "linux-pm@vger.kernel.org" , "linux-clk@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "Jon Medhurst (Tixy)" , Lorenzo Pieralisi , Arnd Bergmann , Kevin Hilman , Jassi Brar , Liviu Dudau , Olof Johansson Subject: Re: [PATCH v4 2/8] firmware: add support for ARM System Control and Power Interface(SCPI) protocol References: <1433760002-24120-1-git-send-email-sudeep.holla@arm.com> <1433760002-24120-3-git-send-email-sudeep.holla@arm.com> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1968 Lines: 51 On 11/06/15 12:54, Jassi Brar wrote: > On 8 June 2015 at 16:09, Sudeep Holla 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. > SCP firmware claims to support that but never tested on Juno platform. So I would like to add it when there's first user for that. Regards, Sudeep -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/