U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: macro.wave.z at gmail.com <macro.wave.z@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 6/6] ARMv8: LS1043A: Enable LS1043A default PSCI support
Date: Tue, 27 Sep 2016 17:29:06 +0800	[thread overview]
Message-ID: <1474968546-8285-7-git-send-email-hongbo.zhang@nxp.com> (raw)
In-Reply-To: <1474968546-8285-1-git-send-email-hongbo.zhang@nxp.com>

From: Hongbo Zhang <hongbo.zhang@nxp.com>

A most basic PSCI implementation with only one psci_version is added for
LS1043A, this can verify the generic PSCI framework, and more platform specific
implementation will be added later.

Signed-off-by: Hongbo Zhang <hongbo.zhang@nxp.com>
---
 arch/arm/cpu/armv8/fsl-layerscape/Makefile       |  1 +
 arch/arm/cpu/armv8/fsl-layerscape/ls1043a_psci.S | 20 ++++++++++++++++++++
 board/freescale/ls1043ardb/Kconfig               | 18 ++++++++++++++++++
 configs/ls1043ardb_defconfig                     |  1 +
 4 files changed, 40 insertions(+)
 create mode 100644 arch/arm/cpu/armv8/fsl-layerscape/ls1043a_psci.S

diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Makefile b/arch/arm/cpu/armv8/fsl-layerscape/Makefile
index 8c1317f..4eb0227 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/Makefile
+++ b/arch/arm/cpu/armv8/fsl-layerscape/Makefile
@@ -28,6 +28,7 @@ endif
 
 ifneq ($(CONFIG_LS1043A),)
 obj-$(CONFIG_SYS_HAS_SERDES) += ls1043a_serdes.o
+obj-$(CONFIG_ARMV8_PSCI) += ls1043a_psci.o
 endif
 
 ifneq ($(CONFIG_LS1012A),)
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/ls1043a_psci.S b/arch/arm/cpu/armv8/fsl-layerscape/ls1043a_psci.S
new file mode 100644
index 0000000..86045ac
--- /dev/null
+++ b/arch/arm/cpu/armv8/fsl-layerscape/ls1043a_psci.S
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2016 Freescale Semiconductor, Inc.
+ * Author: Hongbo Zhang <hongbo.zhang@nxp.com>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ * This file implements LS102X platform PSCI SYSTEM-SUSPEND function
+ */
+
+#include <config.h>
+#include <linux/linkage.h>
+#include <asm/psci.h>
+
+	.pushsection ._secure.text, "ax"
+
+.globl	psci_version
+psci_version:
+	ldr	w0, =0x00010000		/* PSCI v1.0 */
+	ret
+
+	.popsection
diff --git a/board/freescale/ls1043ardb/Kconfig b/board/freescale/ls1043ardb/Kconfig
index 51818ec..0dc37eb 100644
--- a/board/freescale/ls1043ardb/Kconfig
+++ b/board/freescale/ls1043ardb/Kconfig
@@ -13,4 +13,22 @@ config SYS_SOC
 config SYS_CONFIG_NAME
 	default "ls1043ardb"
 
+if ARMV8_PSCI
+
+config ARMV8_PSCI_NR_CPUS
+	int "Number of total CPUs on board"
+	default 4
+
+config CPU_PER_CLUSTER
+	int "Number of CPUs per cluster"
+	default 4
+
+config ARMV8_SECURE_BASE
+	hex "Address of PSCI text, data and stack"
+	default 0x10010000
+	help
+	  The PSCI is placed in OCRAM2.
+
+endif
+
 endif
diff --git a/configs/ls1043ardb_defconfig b/configs/ls1043ardb_defconfig
index 5c20e44..0f988a4 100644
--- a/configs/ls1043ardb_defconfig
+++ b/configs/ls1043ardb_defconfig
@@ -26,3 +26,4 @@ CONFIG_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
 CONFIG_USB_STORAGE=y
+CONFIG_ARMV8_PSCI=y
-- 
2.1.4

  parent reply	other threads:[~2016-09-27  9:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-27  9:29 [U-Boot] [PATCH 0/6] Add ARMv8 PSCI framework macro.wave.z at gmail.com
2016-09-27  9:29 ` [U-Boot] [PATCH 1/6] ARMv8: LS1043A: change macro CONFIG_ARMV8_PSCI definition macro.wave.z at gmail.com
2016-09-27  9:29 ` [U-Boot] [PATCH 2/6] ARMv8: Add secure sections for PSCI text and data macro.wave.z at gmail.com
2016-09-27  9:29 ` [U-Boot] [PATCH 3/6] ARMv8: Add basic PSCI framework macro.wave.z at gmail.com
2016-09-27  9:29 ` [U-Boot] [PATCH 4/6] ARMv8: Setup PSCI memory and dt macro.wave.z at gmail.com
2016-09-27 16:00   ` york sun
2016-09-28  7:41     ` Hongbo Zhang
2016-09-27  9:29 ` [U-Boot] [PATCH 5/6] ARMv8: Enable SMC instruction macro.wave.z at gmail.com
2016-09-28  7:48   ` Hongbo Zhang
2016-09-27  9:29 ` macro.wave.z at gmail.com [this message]
2016-09-27 17:23 ` [U-Boot] [PATCH 0/6] Add ARMv8 PSCI framework Tom Rini
2016-09-28  7:16   ` Hongbo Zhang
2016-09-28  8:27     ` Hongbo Zhang
2016-10-18  7:18       ` Hongbo Zhang
2016-10-26 18:17         ` york sun
2016-10-27  2:45           ` Hongbo Zhang
2016-10-28 13:30     ` Tom Rini
2016-10-31  3:00       ` Hongbo Zhang

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=1474968546-8285-7-git-send-email-hongbo.zhang@nxp.com \
    --to=macro.wave.z@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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