From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/3] soc: xilinx: zynqmp: Add firmware interface
Date: Wed, 16 Aug 2017 17:05:51 +0200 [thread overview]
Message-ID: <CAK8P3a2h27MSyUhTdU07m8dyGj92o2E5h0dviQ+mp7AtTYhM_A@mail.gmail.com> (raw)
In-Reply-To: <3809b6a0-1cb9-37af-a524-8bc1986268ec@xilinx.com>
On Wed, Aug 16, 2017 at 4:34 PM, Michal Simek <michal.simek@xilinx.com> wrote:
> On 16.8.2017 16:00, Michal Simek wrote:
>> On 16.8.2017 14:41, Arnd Bergmann wrote:
>>
>
> What do you think?
> ret_payload[0] = lower_32_bits(le64_to_cpu(res.a0));
> ret_payload[1] = upper_32_bits(le64_to_cpu(res.a0));
> ret_payload[2] = lower_32_bits(le64_to_cpu(res.a1));
> ret_payload[3] = upper_32_bits(le64_to_cpu(res.a1));
> ret_payload[4] = lower_32_bits(le64_to_cpu(res.a2));
>
> There should be probably also change in invoke_pm_fn to do conversion
> from cpu to le64.
>
> int invoke_pm_fn(u32 pm_api_id, u32 arg0, u32 arg1, u32 arg2, u32 arg3,
> u32 *ret_payload)
> {
> /*
> * Added SIP service call Function Identifier
> * Make sure to stay in x0 register
> */
> u64 smc_arg[4];
>
> smc_arg[0] = cpu_to_le64(PM_SIP_SVC | pm_api_id);
> smc_arg[1] = cpu_to_le64(((u64)arg1 << 32) | arg0);
> smc_arg[2] = cpu_to_le64(((u64)arg3 << 32) | arg2);
>
> return do_fw_call(smc_arg[0], smc_arg[1], smc_arg[2], ret_payload);
> }
>
> This is not tested on BE just on LE.
Looks good, just make sure you also check with sparse (make C=1)
to ensure you have the right __le64/__le32 types everywhere.
Arnd
next prev parent reply other threads:[~2017-08-16 15:05 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-04 13:45 [PATCH 0/3] arm64 xilinx zynqmp firmware interface Michal Simek
2017-08-04 13:45 ` [PATCH 1/3] dt: xilinx: zynqmp: Add bindings for PM firmware Michal Simek
2017-08-10 19:10 ` Rob Herring
2017-08-11 12:58 ` Michal Simek
2017-08-11 13:54 ` Edgar E. Iglesias
2017-08-14 13:47 ` Michal Simek
2017-08-14 14:03 ` Rob Herring
2017-08-14 14:35 ` Michal Simek
2017-08-04 13:45 ` [PATCH 2/3] arm64: zynqmp: dt: Add PM firmware node Michal Simek
2017-08-04 13:45 ` [PATCH 3/3] soc: xilinx: zynqmp: Add firmware interface Michal Simek
2017-08-14 15:06 ` Arnd Bergmann
2017-08-16 11:51 ` Michal Simek
2017-08-16 12:05 ` Michal Simek
2017-08-16 12:41 ` Arnd Bergmann
2017-08-16 14:00 ` Michal Simek
2017-08-16 14:34 ` Michal Simek
2017-08-16 15:05 ` Arnd Bergmann [this message]
2017-08-17 10:48 ` Michal Simek
2017-08-17 21:11 ` Arnd Bergmann
2017-08-18 12:14 ` Michal Simek
2017-08-05 4:23 ` [PATCH 0/3] arm64 xilinx zynqmp " Alexander Graf
2017-08-07 6:09 ` Michal Simek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAK8P3a2h27MSyUhTdU07m8dyGj92o2E5h0dviQ+mp7AtTYhM_A@mail.gmail.com \
--to=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).