Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 08a456aa authored by Andrew Donnellan's avatar Andrew Donnellan Committed by Michael Ellerman
Browse files

powerpc/powernv: Move SCOM access code into powernv platform



The powernv platform is the only one that directly accesses SCOMs.
Move the support code to platforms/powernv, and get rid of the
PPC_SCOM Kconfig option, as SCOM support is always selected when
compiling for powernv.

This also means that the Kconfig item for CONFIG_SCOM_DEBUGFS will
show up in menuconfig in the platform menu, rather than at the root,
which is a much better location.

Signed-off-by: default avatarAndrew Donnellan <ajd@linux.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20190509051119.7694-1-ajd@linux.ibm.com
parent 0df3e421
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -12,7 +12,6 @@ config PPC_POWERNV
	select EPAPR_BOOT
	select PPC_INDIRECT_PIO
	select PPC_UDBG_16550
	select PPC_SCOM
	select ARCH_RANDOM
	select CPU_FREQ
	select PPC_DOORBELL
@@ -47,3 +46,7 @@ config PPC_VAS
	  VAS adapters are found in POWER9 based systems.

	  If unsure, say N.

config SCOM_DEBUGFS
	bool "Expose SCOM controllers via debugfs"
	depends on DEBUG_FS
+1 −1
Original line number Diff line number Diff line
@@ -4,12 +4,12 @@ obj-y += idle.o opal-rtc.o opal-nvram.o opal-lpc.o opal-flash.o
obj-y			+= rng.o opal-elog.o opal-dump.o opal-sysparam.o opal-sensor.o
obj-y			+= opal-msglog.o opal-hmi.o opal-power.o opal-irqchip.o
obj-y			+= opal-kmsg.o opal-powercap.o opal-psr.o opal-sensor-groups.o
obj-y			+= opal-xscom.o scom.o

obj-$(CONFIG_SMP)	+= smp.o subcore.o subcore-asm.o
obj-$(CONFIG_PCI)	+= pci.o pci-ioda.o npu-dma.o pci-ioda-tce.o
obj-$(CONFIG_CXL_BASE)	+= pci-cxl.o
obj-$(CONFIG_EEH)	+= eeh-powernv.o
obj-$(CONFIG_PPC_SCOM)	+= opal-xscom.o
obj-$(CONFIG_MEMORY_FAILURE)	+= opal-memory-errors.o
obj-$(CONFIG_OPAL_PRD)	+= opal-prd.o
obj-$(CONFIG_PERF_EVENTS) += opal-imc.o
+2 −1
Original line number Diff line number Diff line
@@ -14,7 +14,8 @@
#include <asm/machdep.h>
#include <asm/firmware.h>
#include <asm/opal.h>
#include <asm/scom.h>

#include "scom.h"

/*
 * We could probably fit that inside the scom_map_t
+2 −1
Original line number Diff line number Diff line
@@ -10,9 +10,10 @@
#include <linux/export.h>
#include <asm/debugfs.h>
#include <asm/prom.h>
#include <asm/scom.h>
#include <linux/uaccess.h>

#include "scom.h"

const struct scom_controller *scom_controller;
EXPORT_SYMBOL_GPL(scom_controller);

+3 −10
Original line number Diff line number Diff line
@@ -5,12 +5,8 @@
 *     and        David Gibson, IBM Corporation.
 */

#ifndef _ASM_POWERPC_SCOM_H
#define _ASM_POWERPC_SCOM_H

#ifdef __KERNEL__
#ifndef __ASSEMBLY__
#ifdef CONFIG_PPC_SCOM
#ifndef _SCOM_H
#define _SCOM_H

/*
 * The SCOM bus is a sideband bus used for accessing various internal
@@ -148,7 +144,4 @@ static inline int scom_write(scom_map_t map, u64 reg, u64 value)
}


#endif /* CONFIG_PPC_SCOM */
#endif /* __ASSEMBLY__ */
#endif /* __KERNEL__ */
#endif /* _ASM_POWERPC_SCOM_H */
#endif /* _SCOM_H */
Loading