Skip to contentSkip to conversation

move pSeries nvram code to neutral location

PATCH In review Nathan Lynch 2 participants 3 messages Jan 25, 2007 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 move pSeries nvram code to neutral location

Move arch/powerpc/platforms/pseries/nvram.c to arch/powerpc/sysdev/rtas_nvram.c so other platforms with RTAS support for manipulating nvram can use it.

Add a RTAS_NVRAM Kconfig option which triggers the build of arch/powerpc/sysdev/rtas_nvram.o.

Select RTAS_NVRAM for pSeries and Maple platforms.

---
 arch/powerpc/Kconfig                    |    6 ++
 arch/powerpc/platforms/pseries/Makefile |    5 +-
 arch/powerpc/platforms/pseries/nvram.c  |  149 -------------------------------
 arch/powerpc/sysdev/Makefile            |    1 +
 arch/powerpc/sysdev/rtas_nvram.c        |  149 +++++++++++++++++++++++++++++++
 5 files changed, 158 insertions(+), 152 deletions(-)
arch/powerpc/Kconfig +6 -0
index 0855d55..e7b06f5 100644
@@ -406,6 +406,7 @@ config PPC_PSERIES
 	select RTAS_ERROR_LOGGING
 	select PPC_UDBG_16550
 	select PPC_NATIVE
+	select RTAS_NVRAM
 	default y
 
 config PPC_ISERIES
@@ -484,6 +485,7 @@ config PPC_MAPLE
 	select PPC_970_NAP
 	select PPC_NATIVE
 	select PPC_RTAS
+	select RTAS_NVRAM
 	default n
 	help
           This option enables support for the Maple 970FX Evaluation Board.
@@ -577,6 +579,10 @@ config MMIO_NVRAM
 	bool
 	default n
 
+config RTAS_NVRAM
+	bool
+	default n
+
 config MPIC_BROKEN_U3
 	bool
 	depends on PPC_MAPLE
arch/powerpc/platforms/pseries/Makefile +2 -3
index 69590fb..da0a349 100644
@@ -2,9 +2,8 @@ ifeq ($(CONFIG_PPC64),y)
 EXTRA_CFLAGS		+= -mno-minimal-toc
 endif
 
-obj-y			:= pci.o lpar.o hvCall.o nvram.o reconfig.o \
-			   setup.o iommu.o ras.o rtasd.o pci_dlpar.o \
-			   firmware.o
+obj-y			:= pci.o lpar.o hvCall.o reconfig.o setup.o \
+			   iommu.o ras.o rtasd.o pci_dlpar.o firmware.o
 obj-$(CONFIG_SMP)	+= smp.o
 obj-$(CONFIG_XICS)	+= xics.o
 obj-$(CONFIG_SCANLOG)	+= scanlog.o
arch/powerpc/platforms/pseries/nvram.c deleted +0 -149

149 lines not on this page · raw message

arch/powerpc/sysdev/Makefile +1 -0
index 2621a7e..fddae64 100644
@@ -9,6 +9,7 @@ obj-$(CONFIG_PPC_DCR)		+= dcr.o
 obj-$(CONFIG_PPC_DCR_NATIVE)	+= dcr-low.o
 obj-$(CONFIG_U3_DART)		+= dart_iommu.o
 obj-$(CONFIG_MMIO_NVRAM)	+= mmio_nvram.o
+obj-$(CONFIG_RTAS_NVRAM)	+= rtas_nvram.o
 obj-$(CONFIG_FSL_SOC)		+= fsl_soc.o
 obj-$(CONFIG_TSI108_BRIDGE)	+= tsi108_pci.o tsi108_dev.o
 obj-$(CONFIG_QUICC_ENGINE)	+= qe_lib/
arch/powerpc/sysdev/rtas_nvram.c new file +149 -0

149 lines not on this page · raw message

Signature · 1 line
1.4.4.3
#1 lore raw
Quoted 8 lines

Move arch/powerpc/platforms/pseries/nvram.c to arch/powerpc/sysdev/rtas_nvram.c so other platforms with RTAS support for manipulating nvram can use it.

Add a RTAS_NVRAM Kconfig option which triggers the build of arch/powerpc/sysdev/rtas_nvram.o.

Select RTAS_NVRAM for pSeries and Maple platforms.

The patch seems to select it for pSeries and iSeries, instead?

arch/powerpc/Kconfig config MMIO_NVRAM · line 584

Quoted 5 lines
arch/powerpc/Kconfig +3 -0
+config RTAS_NVRAM
+	bool
+	default n

No need for "default n", all defaults are "n" by default ;-)

arch/powerpc/sysdev/rtas_nvram.c

Quoted 5 lines
arch/powerpc/platforms/pseries/nvram.c deleted +0 -0
arch/powerpc/sysdev/rtas_nvram.c new file +0 -0

You can do a "git diff -M" -- that way, we can see that you're not trying to sneak in any changes ;-) (and it makes you patch much more legible and smaller, too).

Looks good otherwise, thanks!

Segher

#2 lore raw
Quoted 10 lines · Segher Boessenkool
Quoted 8 lines

Move arch/powerpc/platforms/pseries/nvram.c to arch/powerpc/sysdev/rtas_nvram.c so other platforms with RTAS support for manipulating nvram can use it.

Add a RTAS_NVRAM Kconfig option which triggers the build of arch/powerpc/sysdev/rtas_nvram.o.

Select RTAS_NVRAM for pSeries and Maple platforms.

The patch seems to select it for pSeries and iSeries, instead?

Aw crap, evidently damage introduced when rebasing (Kconfig files seem so fragile in this regard).

Quoted 5 lines

arch/powerpc/Kconfig config MMIO_NVRAM · line 584

Quoted 3 lines
arch/powerpc/Kconfig +3 -0
+config RTAS_NVRAM
+	bool
+	default n

No need for "default n", all defaults are "n" by default ;-)

Duh, will fix.

Quoted 9 lines

arch/powerpc/sysdev/rtas_nvram.c

Quoted 5 lines
arch/powerpc/platforms/pseries/nvram.c deleted +0 -0
arch/powerpc/sysdev/rtas_nvram.c new file +0 -0

You can do a "git diff -M" -- that way, we can see that you're not trying to sneak in any changes ;-) (and it makes you patch much more legible and smaller, too).

Thanks for the tip, I'll try it that way.