All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V4] amd/seattle: Initial revision of AMD Seattle support
@ 2014-10-03 14:16 suravee.suthikulpanit
  2014-10-03 14:31 ` Julien Grall
  2014-10-03 14:41 ` Ian Campbell
  0 siblings, 2 replies; 3+ messages in thread
From: suravee.suthikulpanit @ 2014-10-03 14:16 UTC (permalink / raw)
  To: stefano.stabellini, julien.grall, konrad.wilk, ian.campbell
  Cc: Suravee Suthikulpanit, xen-devel

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 system_reset mechanism.

Initially, the firmware only support a subset of PSCI-0.2 functions,
system-off and sytem-reset. The mechanism for bring up auxiliary processors
is still using spin-table.

Signed-off-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
---
Changes in V4:
    * Add the dom0_gnttab_start and dom0_gnttab_size (per Julien suggestions)

 xen/arch/arm/platforms/Makefile  |  1 +
 xen/arch/arm/platforms/seattle.c | 68 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 69 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..e1fde6e 100644
--- a/xen/arch/arm/platforms/Makefile
+++ b/xen/arch/arm/platforms/Makefile
@@ -3,4 +3,5 @@ obj-$(CONFIG_ARM_32) += exynos5.o
 obj-$(CONFIG_ARM_32) += midway.o
 obj-$(CONFIG_ARM_32) += omap5.o
 obj-$(CONFIG_ARM_32) += sunxi.o
+obj-$(CONFIG_ARM_64) += seattle.o
 obj-$(CONFIG_ARM_64) += 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..edfc391
--- /dev/null
+++ b/xen/arch/arm/platforms/seattle.c
@@ -0,0 +1,68 @@
+/*
+ * 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 <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)
+        :);
+}
+
+static void seattle_system_reset(void)
+{
+    seattle_smc_psci(PSCI_0_2_FN_SYSTEM_RESET);
+}
+
+static void seattle_system_off(void)
+{
+    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,
+
+    .dom0_gnttab_start = 0xe1700000,
+    .dom0_gnttab_size = 0x20000,
+PLATFORM_END
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH V4] amd/seattle: Initial revision of AMD Seattle support
  2014-10-03 14:16 [PATCH V4] amd/seattle: Initial revision of AMD Seattle support suravee.suthikulpanit
@ 2014-10-03 14:31 ` Julien Grall
  2014-10-03 14:41 ` Ian Campbell
  1 sibling, 0 replies; 3+ messages in thread
From: Julien Grall @ 2014-10-03 14:31 UTC (permalink / raw)
  To: suravee.suthikulpanit, stefano.stabellini, konrad.wilk,
	ian.campbell
  Cc: xen-devel

Hi Suravee,

On 10/03/2014 03:16 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 system_reset mechanism.
> 
> Initially, the firmware only support a subset of PSCI-0.2 functions,
> system-off and sytem-reset. The mechanism for bring up auxiliary processors
> is still using spin-table.
> 
> Signed-off-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
Reviewed-by: Julien Grall <julien.grall@linaro.org>

Regards,

-- 
Julien Grall

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH V4] amd/seattle: Initial revision of AMD Seattle support
  2014-10-03 14:16 [PATCH V4] amd/seattle: Initial revision of AMD Seattle support suravee.suthikulpanit
  2014-10-03 14:31 ` Julien Grall
@ 2014-10-03 14:41 ` Ian Campbell
  1 sibling, 0 replies; 3+ messages in thread
From: Ian Campbell @ 2014-10-03 14:41 UTC (permalink / raw)
  To: suravee.suthikulpanit; +Cc: julien.grall, xen-devel, stefano.stabellini

On Fri, 2014-10-03 at 09:16 -0500, 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 system_reset mechanism.
> 
> Initially, the firmware only support a subset of PSCI-0.2 functions,
> system-off and sytem-reset. The mechanism for bring up auxiliary processors
> is still using spin-table.
> 
> Signed-off-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>

Acked + applied, thanks.

I did s/inital/initial and s/sytem-reset/system-reset/ on the commit
message.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-10-03 14:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-03 14:16 [PATCH V4] amd/seattle: Initial revision of AMD Seattle support suravee.suthikulpanit
2014-10-03 14:31 ` Julien Grall
2014-10-03 14:41 ` Ian Campbell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.