From: Julien Grall <julien.grall@linaro.org>
To: suravee.suthikulpanit@amd.com, stefano.stabellini@eu.citrix.com,
ian.campbell@citrix.com
Cc: xen-devel@lists.xen.org
Subject: Re: [V2 3/3] amd/seattle: Initial revision of AMD Seattle support
Date: Thu, 02 Oct 2014 11:41:54 +0100 [thread overview]
Message-ID: <542D2BF2.2070205@linaro.org> (raw)
In-Reply-To: <1412193085-30828-4-git-send-email-suravee.suthikulpanit@amd.com>
Hi Suravee,
On 10/01/2014 08:51 PM, suravee.suthikulpanit@amd.com wrote:
> From: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
>
> This patch add inital (minimal) platform support for AMD Seattle,
> which mainly just define the matching ID, and specify system_off,
> and sytem_reset mechanism.
>
> Initially, the firmware only support a subset of PSCI-0.2 functions,
> system-off and sytem-reset. The boot protocol is still using spin-table.
s/sytem-reset/system-reset/
I find "the boot protocol" not clear, I guess you are talking about CPU
bring up. Maybe something like "CPU management ..." will be better?
>
> Signed-off-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
> ---
> xen/arch/arm/platforms/Makefile | 1 +
> xen/arch/arm/platforms/seattle.c | 69 ++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 70 insertions(+)
> create mode 100644 xen/arch/arm/platforms/seattle.c
>
> diff --git a/xen/arch/arm/platforms/Makefile b/xen/arch/arm/platforms/Makefile
> index 680364f..03e7a14 100644
> --- a/xen/arch/arm/platforms/Makefile
> +++ b/xen/arch/arm/platforms/Makefile
> @@ -4,3 +4,4 @@ obj-$(CONFIG_ARM_32) += midway.o
> obj-$(CONFIG_ARM_32) += omap5.o
> obj-$(CONFIG_ARM_32) += sunxi.o
> obj-$(CONFIG_ARM_64) += xgene-storm.o
> +obj-$(CONFIG_ARM_64) += seattle.o
NIT: Could we order the platform name alphabetically? i.e move
"seattle.o" just above "xgene-storm.o".
> diff --git a/xen/arch/arm/platforms/seattle.c b/xen/arch/arm/platforms/seattle.c
> new file mode 100644
> index 0000000..06d4e99
> --- /dev/null
> +++ b/xen/arch/arm/platforms/seattle.c
> @@ -0,0 +1,69 @@
> +/*
> + * xen/arch/arm/seattle.c
> + *
> + * AMD Seattle specific settings
> + *
> + * Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
> + * Copyright (c) 2014 Advance Micro Devices Inc.
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + */
> +
> +#include <asm/platform.h>
> +#include <xen/mm.h>
> +#include <xen/vmap.h>
> +#include <asm/io.h>
> +#include <asm/gic.h>
I don't think those 4 includes are required here.
> +#include <asm/psci.h>
> +
> +static const char * const seattle_dt_compat[] __initconst =
> +{
> + "amd,seattle",
> + NULL
> +};
> +
> +/* Seattle firmware only implements PSCI handler for
> + * system off and system reset at this point.
> + * This is temporary until full PSCI-0.2 is supported.
> + * Then, these function will be removed.
> + */
> +static noinline void seattle_smc_psci(register_t func_id)
> +{
> + asm volatile(
> + "smc #0"
> + : "+r" (func_id)
> + :);
> +}
We already have multiple implementation of smc in different place. Can
we provide a common function rather than adding another one?
> +static noinline void seattle_system_reset(void)
noinline is not necessary here.
> +{
> + seattle_smc_psci(PSCI_0_2_FN_SYSTEM_RESET);
> +}
> +
> +static noinline void seattle_system_off(void)
ditto
> +{
> + seattle_smc_psci(PSCI_0_2_FN_SYSTEM_OFF);
> +}
> +
> +PLATFORM_START(seattle, "SEATTLE")
> + .compatible = seattle_dt_compat,
> + .reset = seattle_system_reset,
> + .poweroff = seattle_system_off,
> +PLATFORM_END
> +
> +/*
> + * Local variables:
> + * mode: C
> + * c-file-style: "BSD"
> + * c-basic-offset: 4
> + * indent-tabs-mode: nil
> + * End:
> + */
>
Regards,
--
Julien Grall
next prev parent reply other threads:[~2014-10-02 10:41 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-01 19:51 [V2 0/3] Introduce AMD Seattle platform support suravee.suthikulpanit
2014-10-01 19:51 ` [V2 1/3] gicv2: Add compatibility id for gic-400 suravee.suthikulpanit
2014-10-01 19:51 ` [V2 2/3] amd/seattle: Add early printk message for the platform suravee.suthikulpanit
2014-10-02 15:52 ` Julien Grall
2014-10-02 18:40 ` Suravee Suthikulpanit
2014-10-01 19:51 ` [V2 3/3] amd/seattle: Initial revision of AMD Seattle support suravee.suthikulpanit
2014-10-02 10:41 ` Julien Grall [this message]
2014-10-02 19:04 ` Suravee Suthikulpanit
2014-10-02 20:37 ` Suravee Suthikulpanit
2014-10-02 21:26 ` Ian Campbell
2014-10-02 21:44 ` Julien Grall
2014-10-02 12:59 ` [V2 0/3] Introduce AMD Seattle platform support Ian Campbell
2014-10-02 15:10 ` Konrad Rzeszutek Wilk
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=542D2BF2.2070205@linaro.org \
--to=julien.grall@linaro.org \
--cc=ian.campbell@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=suravee.suthikulpanit@amd.com \
--cc=xen-devel@lists.xen.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).