From: John Jacques <john.jacq...@intel.com>

On Axxia systems, the NCR driver allows access to a configuration
ring.  This commit exports a symbol that other configuration ring
clients can use to tell that a reset is active.

Signed-off-by: Gary McGee <gary.mc...@intel.com>
Signed-off-by: John Jacques <john.jacq...@intel.com>
---
 arch/arm/mach-axxia/axxia.c | 6 +-----
 drivers/misc/Kconfig        | 8 ++++++++
 drivers/misc/lsi-ncr.c      | 3 +++
 3 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-axxia/axxia.c b/arch/arm/mach-axxia/axxia.c
index 8a4722c..e1a77db 100644
--- a/arch/arm/mach-axxia/axxia.c
+++ b/arch/arm/mach-axxia/axxia.c
@@ -39,6 +39,7 @@
 #include <linux/sizes.h>
 #include <linux/pmu.h>
 #include <linux/kexec.h>
+#include <linux/lsi-ncr.h>
 #ifdef CONFIG_ARM_ARCH_TIMER
 #include <asm/arch_timer.h>
 #endif
@@ -64,11 +65,6 @@ static const char *axxia_dt_match[] __initconst = {
 static void __iomem *base;
 void __iomem *dickens;
 
-#ifdef CONFIG_ARCH_AXXIA_NCR_RESET_CHECK
-int ncr_reset_active;
-EXPORT_SYMBOL(ncr_reset_active);
-#endif
-
 static void set_l3_pstate(u32 newstate)
 {
        static const u8 hnf[] = {
diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
index 07767fd..0313169 100644
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -559,6 +559,14 @@ config LSI_NCR
        help
          Provides access to the LSI Axxia NCR bus.
 
+config ARCH_AXXIA_NCR_RESET_CHECK
+       bool "Axxia NCR driver reset checking"
+       depends on LSI_NCR
+       help
+         Enabling this option will allow the Axxia NCA Config Ring driver
+         to coordinate with the RTE ncp driver to detect when NCA hardware
+         is being held in reset.
+
 config LSI_SMMON
        tristate "LSI System Memory Monitor"
        depends on ARCH_AXXIA || ACP
diff --git a/drivers/misc/lsi-ncr.c b/drivers/misc/lsi-ncr.c
index 7b8d156..7c98018 100644
--- a/drivers/misc/lsi-ncr.c
+++ b/drivers/misc/lsi-ncr.c
@@ -78,6 +78,9 @@ static unsigned long ncr_spin_flags;
  * is some valid case where this may occur we can re-implement
  * this as a wait loop.
  */
+int ncr_reset_active;
+EXPORT_SYMBOL(ncr_reset_active);
+
 #define AXXIA_NCR_RESET_ACTIVE_CHECK()                 \
        do { if (ncr_reset_active) BUG(); } while (0)
 #else
-- 
2.7.4

-- 
_______________________________________________
linux-yocto mailing list
linux-yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/linux-yocto

Reply via email to