From: Kevin Hilman <khilman-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
To: Carlo Caione <carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org>
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-6IF/jdPJHihWk0Htik3J/w@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
afaerber-l3A5Bk7waGM@public.gmane.org,
arnd-r2nGTMty4D4@public.gmane.org,
jens.wiklander-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
mark.rutland-5wv7dgnIgG8@public.gmane.org,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
Carlo Caione <carlo-6IF/jdPJHihWk0Htik3J/w@public.gmane.org>
Subject: Re: [PATCH v3 1/4] firmware: Amlogic: Add secure monitor driver
Date: Mon, 23 May 2016 13:58:05 -0700 [thread overview]
Message-ID: <m2posco5k2.fsf@baylibre.com> (raw)
In-Reply-To: <1464021024-29380-2-git-send-email-carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org> (Carlo Caione's message of "Mon, 23 May 2016 18:30:21 +0200")
Carlo Caione <carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org> writes:
> From: Carlo Caione <carlo-6IF/jdPJHihWk0Htik3J/w@public.gmane.org>
>
> Introduce a driver to provide calls into secure monitor mode.
>
> In the Amlogic SoCs these calls are used for multiple reasons: access to
> NVMEM, set USB boot, enable JTAG, etc...
>
> Signed-off-by: Carlo Caione <carlo-6IF/jdPJHihWk0Htik3J/w@public.gmane.org>
[...]
> +static int meson_sm_probe(struct platform_device *pdev)
> +{
> + struct device_node *np = pdev->dev.of_node;
> + struct meson_sm_firmware *fw;
> + u32 sm_phy_in_base, sm_phy_out_base;
> + int cmd_in, cmd_out;
> +
> + fw = devm_kzalloc(&pdev->dev, sizeof(*fw), GFP_KERNEL);
> + if (!fw)
> + return -ENOMEM;
> +
> + fw->dev = &pdev->dev;
> +
> + if (of_property_read_u32(np, "amlogic,sm-cmd-input-base", &cmd_in))
> + return -EINVAL;
> +
> + if (of_property_read_u32(np, "amlogic,sm-cmd-output-base", &cmd_out))
> + return -EINVAL;
> +
> + sm_phy_in_base = meson_sm_call(cmd_in, 0, 0, 0, 0, 0);
Should there be any error checking here? Do we have any info on the
return values here in case of error, or in case of missing firmware,
etc.
Kevin
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-05-23 20:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-23 16:30 [PATCH v3 0/4] Add Amlogic secure monitor driver Carlo Caione
[not found] ` <1464021024-29380-1-git-send-email-carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org>
2016-05-23 16:30 ` [PATCH v3 1/4] firmware: Amlogic: Add " Carlo Caione
[not found] ` <1464021024-29380-2-git-send-email-carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org>
2016-05-23 20:58 ` Kevin Hilman [this message]
[not found] ` <m2posco5k2.fsf-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
2016-05-24 8:08 ` Carlo Caione
2016-05-23 16:30 ` [PATCH v3 2/4] firmware: dt-bindings: Add secure monitor header file for GXBB Carlo Caione
2016-05-23 16:30 ` [PATCH v3 3/4] ARM64: dts: amlogic: gxbb: Enable secure monitor Carlo Caione
2016-05-23 16:30 ` [PATCH v3 4/4] documentation: Add secure monitor binding documentation Carlo Caione
[not found] ` <1464021024-29380-5-git-send-email-carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org>
2016-05-23 16:38 ` Mark Rutland
2016-05-23 16:59 ` Carlo Caione
2016-05-23 17:11 ` Mark Rutland
2016-05-24 8:03 ` Carlo Caione
2016-05-23 17:04 ` [PATCH v3 0/4] Add Amlogic secure monitor driver Matthias Brugger
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=m2posco5k2.fsf@baylibre.com \
--to=khilman-rdvid1duhrbwk0htik3j/w@public.gmane.org \
--cc=afaerber-l3A5Bk7waGM@public.gmane.org \
--cc=arnd-r2nGTMty4D4@public.gmane.org \
--cc=carlo-6IF/jdPJHihWk0Htik3J/w@public.gmane.org \
--cc=carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=jens.wiklander-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-6IF/jdPJHihWk0Htik3J/w@public.gmane.org \
--cc=linux-amlogic-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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).