Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1706427 > unrolled thread

[PATCH 00/12] powerpc/8xx: Some cleanup

Started byChristophe Leroy <christophe.leroy@c-s.fr>
First post2017-08-08 14:00 +0200
Last post2017-08-08 14:10 +0200
Articles 9 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH 00/12] powerpc/8xx: Some cleanup Christophe Leroy <christophe.leroy@c-s.fr> - 2017-08-08 14:00 +0200
    [PATCH 09/12] powerpc/8xx: remove CONFIG_8xx Christophe Leroy <christophe.leroy@c-s.fr> - 2017-08-08 14:00 +0200
    [PATCH 12/12] powerpc/8xx: Remove cpu dependent macro instructions  from head_8xx Christophe Leroy <christophe.leroy@c-s.fr> - 2017-08-08 14:00 +0200
    [PATCH 11/12] powerpc/8xx: Use symbolic names for DSISR bits in DSI Christophe Leroy <christophe.leroy@c-s.fr> - 2017-08-08 14:00 +0200
    [PATCH 10/12] powerpc/8xx: Use symbolic PVR value Christophe Leroy <christophe.leroy@c-s.fr> - 2017-08-08 14:10 +0200
    [PATCH 06/12] powerpc/time: refactor MFTB() to limit number of ifdefs Christophe Leroy <christophe.leroy@c-s.fr> - 2017-08-08 14:10 +0200
    [PATCH 03/12] powerpc/8xx: Remove SoftwareEmulation() Christophe Leroy <christophe.leroy@c-s.fr> - 2017-08-08 14:10 +0200
    [PATCH 04/12] powerpc/cpm1: link to CONFIG_CPM1 instead of CONFIG_8xx Christophe Leroy <christophe.leroy@c-s.fr> - 2017-08-08 14:10 +0200
    [PATCH 05/12] powerpc/8xx: Move mpc8xx_pic.c from sysdev to  platform/8xx Christophe Leroy <christophe.leroy@c-s.fr> - 2017-08-08 14:10 +0200

#1706427 — [PATCH 00/12] powerpc/8xx: Some cleanup

FromChristophe Leroy <christophe.leroy@c-s.fr>
Date2017-08-08 14:00 +0200
Subject[PATCH 00/12] powerpc/8xx: Some cleanup
Message-ID<ucbkZ-7TS-3@gated-at.bofh.it>
This serie does some cleanup in the area of the 8xx.

In the same spirit as what Michael did for 4xx, move 8xx
specific stuff into platforms/8xx

Then try to reduce the amount of #ifdefs specific to 8xx

Remove the CONFIG_8xx which is redundant with CONFIG_PPC_8xx

Plus some misc cleanups

Christophe Leroy (12):
  powerpc/8xx: Simplify CONFIG_8xx checks in Makefile
  powerpc/8xx: Move 8xx machine check handlers into platforms/8xx
  powerpc/8xx: Remove SoftwareEmulation()
  powerpc/cpm1: link to CONFIG_CPM1 instead of CONFIG_8xx
  powerpc/8xx: Move mpc8xx_pic.c from sysdev to platform/8xx
  powerpc/time: refactor MFTB() to limit number of ifdefs
  powerpc/kconfig: Simplify PCI_QSPAN selection
  powerpc/8xx: Getting rid of remaining use of CONFIG_8xx
  powerpc/8xx: remove CONFIG_8xx
  powerpc/8xx: Use symbolic PVR value
  powerpc/8xx: Use symbolic names for DSISR bits in DSI
  powerpc/8xx: Remove cpu dependent macro instructions from head_8xx

 arch/powerpc/Kconfig                               |  8 ++--
 arch/powerpc/Makefile                              |  2 +-
 arch/powerpc/boot/Makefile                         |  4 +-
 arch/powerpc/boot/ppc_asm.h                        |  8 ++++
 arch/powerpc/boot/util.S                           | 24 +++---------
 arch/powerpc/include/asm/cache.h                   |  2 +-
 arch/powerpc/include/asm/cputable.h                |  4 +-
 arch/powerpc/include/asm/fs_pd.h                   |  2 +-
 arch/powerpc/include/asm/nohash/32/pgtable.h       |  2 +-
 arch/powerpc/include/asm/ppc_asm.h                 | 14 +++++--
 arch/powerpc/include/asm/reg.h                     | 16 ++++----
 arch/powerpc/include/asm/timex.h                   |  6 +--
 arch/powerpc/kernel/Makefile                       |  2 +-
 arch/powerpc/kernel/cputable.c                     |  6 +--
 arch/powerpc/kernel/head_8xx.S                     |  9 ++---
 arch/powerpc/kernel/irq.c                          |  2 +-
 arch/powerpc/kernel/kgdb.c                         |  4 +-
 arch/powerpc/kernel/traps.c                        | 43 ----------------------
 arch/powerpc/kernel/vdso32/gettimeofday.S          | 12 ++----
 arch/powerpc/mm/fault.c                            |  4 +-
 arch/powerpc/mm/mem.c                              |  2 +-
 arch/powerpc/mm/mmu_decl.h                         | 10 ++---
 arch/powerpc/mm/tlb_nohash_low.S                   |  2 +-
 arch/powerpc/platforms/8xx/Kconfig                 |  1 -
 arch/powerpc/platforms/8xx/Makefile                |  2 +-
 arch/powerpc/platforms/8xx/m8xx_setup.c            |  2 +-
 arch/powerpc/platforms/8xx/machine_check.c         | 37 +++++++++++++++++++
 .../{sysdev/mpc8xx_pic.c => platforms/8xx/pic.c}   |  2 +-
 .../{sysdev/mpc8xx_pic.h => platforms/8xx/pic.h}   |  0
 arch/powerpc/platforms/Kconfig.cputype             |  7 +---
 arch/powerpc/sysdev/Makefile                       |  2 +-
 arch/powerpc/sysdev/fsl_soc.c                      |  2 +-
 arch/powerpc/sysdev/fsl_soc.h                      |  2 +-
 33 files changed, 109 insertions(+), 136 deletions(-)
 create mode 100644 arch/powerpc/platforms/8xx/machine_check.c
 rename arch/powerpc/{sysdev/mpc8xx_pic.c => platforms/8xx/pic.c} (99%)
 rename arch/powerpc/{sysdev/mpc8xx_pic.h => platforms/8xx/pic.h} (100%)

-- 
2.13.3

[toc] | [next] | [standalone]


#1706428 — [PATCH 09/12] powerpc/8xx: remove CONFIG_8xx

FromChristophe Leroy <christophe.leroy@c-s.fr>
Date2017-08-08 14:00 +0200
Subject[PATCH 09/12] powerpc/8xx: remove CONFIG_8xx
Message-ID<ucbl0-7TS-29@gated-at.bofh.it>
In reply to#1706427
Two config options exist to define powerpc MPC8xx:
* CONFIG_PPC_8xx
* CONFIG_8xx

arch/powerpc/platforms/Kconfig.cputype has contained the following
comment about CONFIG_8xx item for some years:
"# this is temp to handle compat with arch=ppc"

There is no more users of CONFIG_8xx, so remove it.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
 arch/powerpc/platforms/Kconfig.cputype | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
index 395593ef580c..13663efc1d31 100644
--- a/arch/powerpc/platforms/Kconfig.cputype
+++ b/arch/powerpc/platforms/Kconfig.cputype
@@ -32,7 +32,6 @@ config PPC_85xx
 config PPC_8xx
 	bool "Freescale 8xx"
 	select FSL_SOC
-	select 8xx
 	select PPC_LIB_RHEAP
 	select SYS_SUPPORTS_HUGETLBFS
 
@@ -149,10 +148,6 @@ config 6xx
 	depends on PPC32 && PPC_BOOK3S
 	select PPC_HAVE_PMU_SUPPORT
 
-# this is temp to handle compat with arch=ppc
-config 8xx
-	bool
-
 config E500
 	select FSL_EMB_PERFMON
 	select PPC_FSL_BOOK3E
-- 
2.13.3

[toc] | [prev] | [next] | [standalone]


#1706429 — [PATCH 12/12] powerpc/8xx: Remove cpu dependent macro instructions from head_8xx

FromChristophe Leroy <christophe.leroy@c-s.fr>
Date2017-08-08 14:00 +0200
Subject[PATCH 12/12] powerpc/8xx: Remove cpu dependent macro instructions from head_8xx
Message-ID<ucbl0-7TS-31@gated-at.bofh.it>
In reply to#1706427
head_8xx is dedicated to 8xx so no need to use macros that
depends on the CPU

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
 arch/powerpc/kernel/head_8xx.S | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S
index a1c2a2cfec7e..471936704261 100644
--- a/arch/powerpc/kernel/head_8xx.S
+++ b/arch/powerpc/kernel/head_8xx.S
@@ -123,7 +123,6 @@ turn_on_mmu:
 	lis	r0,start_here@h
 	ori	r0,r0,start_here@l
 	mtspr	SPRN_SRR0,r0
-	SYNC
 	rfi				/* enables MMU */
 
 /*
@@ -170,7 +169,7 @@ turn_on_mmu:
 	stw	r1,0(r11);	\
 	tovirt(r1,r11);			/* set new kernel sp */	\
 	li	r10,MSR_KERNEL & ~(MSR_IR|MSR_DR); /* can take exceptions */ \
-	MTMSRD(r10);			/* (except for mach check in rtas) */ \
+	mtmsr	r10;		\
 	stw	r0,GPR0(r11);	\
 	SAVE_4GPRS(3, r11);	\
 	SAVE_2GPRS(7, r11)
@@ -915,10 +914,8 @@ start_here:
 	rfi
 /* Load up the kernel context */
 2:
-	SYNC			/* Force all PTE updates to finish */
 	tlbia			/* Clear all TLB entries */
 	sync			/* wait for tlbia/tlbie to finish */
-	TLBSYNC			/* ... on all CPUs */
 
 	/* set up the PTE pointers for the Abatron bdiGDB.
 	*/
-- 
2.13.3

[toc] | [prev] | [next] | [standalone]


#1706430 — [PATCH 11/12] powerpc/8xx: Use symbolic names for DSISR bits in DSI

FromChristophe Leroy <christophe.leroy@c-s.fr>
Date2017-08-08 14:00 +0200
Subject[PATCH 11/12] powerpc/8xx: Use symbolic names for DSISR bits in DSI
Message-ID<ucbl0-7TS-37@gated-at.bofh.it>
In reply to#1706427
Use symbolic names for DSISR bits in DSI

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
 arch/powerpc/kernel/head_8xx.S | 2 +-
 arch/powerpc/mm/fault.c        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S
index 778a0e11d0e6..a1c2a2cfec7e 100644
--- a/arch/powerpc/kernel/head_8xx.S
+++ b/arch/powerpc/kernel/head_8xx.S
@@ -595,7 +595,7 @@ DARFixed:/* Return from dcbx instruction bug workaround */
 	mfspr	r5,SPRN_DSISR
 	stw	r5,_DSISR(r11)
 	mfspr	r4,SPRN_DAR
-	andis.	r10,r5,0x4000
+	andis.	r10,r5,DSISR_NOHPTE@h
 	beq+	1f
 	tlbie	r4
 dtlbie:
diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c
index 7a218f69f956..6948d0628cde 100644
--- a/arch/powerpc/mm/fault.c
+++ b/arch/powerpc/mm/fault.c
@@ -392,7 +392,7 @@ static void sanity_check_fault(bool is_write, unsigned long error_code) { }
 #else
 #define page_fault_is_write(__err)	((__err) & DSISR_ISSTORE)
 #if defined(CONFIG_PPC_8xx)
-#define page_fault_is_bad(__err)	((__err) & 0x10000000)
+#define page_fault_is_bad(__err)	((__err) & DSISR_NOEXEC_OR_G)
 #elif defined(CONFIG_PPC64)
 #define page_fault_is_bad(__err)	((__err) & DSISR_BAD_FAULT_64S)
 #else
-- 
2.13.3

[toc] | [prev] | [next] | [standalone]


#1706447 — [PATCH 10/12] powerpc/8xx: Use symbolic PVR value

FromChristophe Leroy <christophe.leroy@c-s.fr>
Date2017-08-08 14:10 +0200
Subject[PATCH 10/12] powerpc/8xx: Use symbolic PVR value
Message-ID<ucbuG-8cT-33@gated-at.bofh.it>
In reply to#1706427
For the 8xx, PVR values defined in arch/powerpc/include/asm/reg.h
are nowhere used.

Remove all defines and add PVR_8xx

Use it in arch/powerpc/kernel/cputable.c

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
 arch/powerpc/include/asm/reg.h | 6 ++----
 arch/powerpc/kernel/cputable.c | 2 +-
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h
index 70722e5b93e7..c36823d64ec9 100644
--- a/arch/powerpc/include/asm/reg.h
+++ b/arch/powerpc/include/asm/reg.h
@@ -1247,10 +1247,8 @@
  * differentiated by the version number in the Communication Processor
  * Module (CPM).
  */
-#define PVR_821		0x00500000
-#define PVR_823		PVR_821
-#define PVR_850		PVR_821
-#define PVR_860		PVR_821
+#define PVR_8xx		0x00500000
+
 #define PVR_8240	0x00810100
 #define PVR_8245	0x80811014
 #define PVR_8260	PVR_8240
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
index e9ba5b84ac9b..760872916013 100644
--- a/arch/powerpc/kernel/cputable.c
+++ b/arch/powerpc/kernel/cputable.c
@@ -1262,7 +1262,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
 #ifdef CONFIG_PPC_8xx
 	{	/* 8xx */
 		.pvr_mask		= 0xffff0000,
-		.pvr_value		= 0x00500000,
+		.pvr_value		= PVR_8xx,
 		.cpu_name		= "8xx",
 		/* CPU_FTR_MAYBE_CAN_DOZE is possible,
 		 * if the 8xx code is there.... */
-- 
2.13.3

[toc] | [prev] | [next] | [standalone]


#1706454 — [PATCH 06/12] powerpc/time: refactor MFTB() to limit number of ifdefs

FromChristophe Leroy <christophe.leroy@c-s.fr>
Date2017-08-08 14:10 +0200
Subject[PATCH 06/12] powerpc/time: refactor MFTB() to limit number of ifdefs
Message-ID<ucbuH-8cT-47@gated-at.bofh.it>
In reply to#1706427
The 8xx cannot access the TBL and TBU registers using mfspr/mtspr
It must be accessed using mftb/mftbu

Due to this, there is a number of places with #ifdef CONFIG_8xx

This patch defines new macros MFTBL(x) and MFTBU(x) on the same model
as MFTB(x) and tries to make use of them as much as possible.

In arch/powerpc/include/asm/timex.h, we also remove the ifdef
for the asm() operands as the compiler doesn't mind unused operands

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
 arch/powerpc/boot/ppc_asm.h               |  8 ++++++++
 arch/powerpc/boot/util.S                  | 24 +++++-------------------
 arch/powerpc/include/asm/ppc_asm.h        | 12 +++++++++---
 arch/powerpc/include/asm/timex.h          |  4 ----
 arch/powerpc/kernel/vdso32/gettimeofday.S | 12 +++---------
 5 files changed, 25 insertions(+), 35 deletions(-)

diff --git a/arch/powerpc/boot/ppc_asm.h b/arch/powerpc/boot/ppc_asm.h
index 68e388ee94fe..c63299f9fdd9 100644
--- a/arch/powerpc/boot/ppc_asm.h
+++ b/arch/powerpc/boot/ppc_asm.h
@@ -80,4 +80,12 @@
 	.long 0xa6037b7d; /* mtsrr1 r11				*/ \
 	.long 0x2400004c  /* rfid				*/
 
+#ifdef CONFIG_PPC_8xx
+#define MFTBL(dest)			mftb dest
+#define MFTBU(dest)			mftbu dest
+#else
+#define MFTBL(dest)			mfspr dest, SPRN_TBRL
+#define MFTBU(dest)			mfspr dest, SPRN_TBRU
+#endif
+
 #endif /* _PPC64_PPC_ASM_H */
diff --git a/arch/powerpc/boot/util.S b/arch/powerpc/boot/util.S
index 243b8497d58b..ec069177d942 100644
--- a/arch/powerpc/boot/util.S
+++ b/arch/powerpc/boot/util.S
@@ -71,32 +71,18 @@ udelay:
 	add	r4,r4,r5
 	addi	r4,r4,-1
 	divw	r4,r4,r5	/* BUS ticks */
-#ifdef CONFIG_8xx
-1:	mftbu	r5
-	mftb	r6
-	mftbu	r7
-#else
-1:	mfspr	r5, SPRN_TBRU
-	mfspr	r6, SPRN_TBRL
-	mfspr	r7, SPRN_TBRU
-#endif
+1:	MFTBU(r5)
+	MFTBL(r6)
+	MFTBU(r7)
 	cmpw	0,r5,r7
 	bne	1b		/* Get [synced] base time */
 	addc	r9,r6,r4	/* Compute end time */
 	addze	r8,r5
-#ifdef CONFIG_8xx
-2:	mftbu	r5
-#else
-2:	mfspr	r5, SPRN_TBRU
-#endif
+2:	MFTBU(r5)
 	cmpw	0,r5,r8
 	blt	2b
 	bgt	3f
-#ifdef CONFIG_8xx
-	mftb	r6
-#else
-	mfspr	r6, SPRN_TBRL
-#endif
+	MFTBL(r6)
 	cmpw	0,r6,r9
 	blt	2b
 3:	blr
diff --git a/arch/powerpc/include/asm/ppc_asm.h b/arch/powerpc/include/asm/ppc_asm.h
index 6baeeb9acd0d..d0e4f909ee36 100644
--- a/arch/powerpc/include/asm/ppc_asm.h
+++ b/arch/powerpc/include/asm/ppc_asm.h
@@ -378,10 +378,16 @@ BEGIN_FTR_SECTION_NESTED(96);		\
 	cmpwi dest,0;			\
 	beq-  90b;			\
 END_FTR_SECTION_NESTED(CPU_FTR_CELL_TB_BUG, CPU_FTR_CELL_TB_BUG, 96)
-#elif defined(CONFIG_8xx)
-#define MFTB(dest)			mftb dest
 #else
-#define MFTB(dest)			mfspr dest, SPRN_TBRL
+#define MFTB(dest)			MFTBL(dest)
+#endif
+
+#ifdef CONFIG_PPC_8xx
+#define MFTBL(dest)			mftb dest
+#define MFTBU(dest)			mftbu dest
+#else
+#define MFTBL(dest)			mfspr dest, SPRN_TBRL
+#define MFTBU(dest)			mfspr dest, SPRN_TBRU
 #endif
 
 #ifndef CONFIG_SMP
diff --git a/arch/powerpc/include/asm/timex.h b/arch/powerpc/include/asm/timex.h
index 2cf846edb3fc..b467dbcb0fb7 100644
--- a/arch/powerpc/include/asm/timex.h
+++ b/arch/powerpc/include/asm/timex.h
@@ -45,11 +45,7 @@ static inline cycles_t get_cycles(void)
 		"	.long 0\n"
 		"	.long 0\n"
 		".previous"
-#ifdef CONFIG_8xx
-		: "=r" (ret) : "i" (CPU_FTR_601));
-#else
 		: "=r" (ret) : "i" (CPU_FTR_601), "i" (SPRN_TBRL));
-#endif
 	return ret;
 #endif
 }
diff --git a/arch/powerpc/kernel/vdso32/gettimeofday.S b/arch/powerpc/kernel/vdso32/gettimeofday.S
index 6b2b69616e77..769c2624e0a6 100644
--- a/arch/powerpc/kernel/vdso32/gettimeofday.S
+++ b/arch/powerpc/kernel/vdso32/gettimeofday.S
@@ -232,15 +232,9 @@ __do_get_tspec:
 	lwz	r6,(CFG_TB_ORIG_STAMP+4)(r9)
 
 	/* Get a stable TB value */
-#ifdef CONFIG_8xx
-2:	mftbu	r3
-	mftbl	r4
-	mftbu	r0
-#else
-2:	mfspr	r3, SPRN_TBRU
-	mfspr	r4, SPRN_TBRL
-	mfspr	r0, SPRN_TBRU
-#endif
+2:	MFTBU(r3)
+	MFTBL(r4)
+	MFTBU(r0)
 	cmplw	cr0,r3,r0
 	bne-	2b
 
-- 
2.13.3

[toc] | [prev] | [next] | [standalone]


#1706460 — [PATCH 03/12] powerpc/8xx: Remove SoftwareEmulation()

FromChristophe Leroy <christophe.leroy@c-s.fr>
Date2017-08-08 14:10 +0200
Subject[PATCH 03/12] powerpc/8xx: Remove SoftwareEmulation()
Message-ID<ucbuI-8cT-63@gated-at.bofh.it>
In reply to#1706427
Since commit aa42c69c67f82 ("[POWERPC] Add support for FP emulation
for the e300c2 core"), program_check_exception() can be called for
math emulation. In that case, 'reason' is 0.

On the 8xx, there is a Software Emulation interrupt which is
called for all unimplemented and illegal instructions. This
interrupt calls SoftwareEmulation() which does almost the
same as program_check_exception() called with reason = 0.

The Software Emulation interrupt sets all reason bits to 0,
it is therefore possible to call program_check_exception()
directly from the interrupt handler.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
 arch/powerpc/kernel/head_8xx.S |  2 +-
 arch/powerpc/kernel/traps.c    | 18 ------------------
 2 files changed, 1 insertion(+), 19 deletions(-)

diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S
index 07ddced6bab3..778a0e11d0e6 100644
--- a/arch/powerpc/kernel/head_8xx.S
+++ b/arch/powerpc/kernel/head_8xx.S
@@ -300,7 +300,7 @@ SystemCall:
 /* On the MPC8xx, this is a software emulation interrupt.  It occurs
  * for all unimplemented and illegal instructions.
  */
-	EXCEPTION(0x1000, SoftEmu, SoftwareEmulation, EXC_XFER_STD)
+	EXCEPTION(0x1000, SoftEmu, program_check_exception, EXC_XFER_STD)
 
 	. = 0x1100
 /*
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index b328ca2aef9c..9d1f600bda08 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -1518,24 +1518,6 @@ void performance_monitor_exception(struct pt_regs *regs)
 	perf_irq(regs);
 }
 
-#ifdef CONFIG_8xx
-void SoftwareEmulation(struct pt_regs *regs)
-{
-	CHECK_FULL_REGS(regs);
-
-	if (!user_mode(regs)) {
-		debugger(regs);
-		die("Kernel Mode Unimplemented Instruction or SW FPU Emulation",
-			regs, SIGFPE);
-	}
-
-	if (!emulate_math(regs))
-		return;
-
-	_exception(SIGILL, regs, ILL_ILLOPC, regs->nip);
-}
-#endif /* CONFIG_8xx */
-
 #ifdef CONFIG_PPC_ADV_DEBUG_REGS
 static void handle_debug(struct pt_regs *regs, unsigned long debug_status)
 {
-- 
2.13.3

[toc] | [prev] | [next] | [standalone]


#1706463 — [PATCH 04/12] powerpc/cpm1: link to CONFIG_CPM1 instead of CONFIG_8xx

FromChristophe Leroy <christophe.leroy@c-s.fr>
Date2017-08-08 14:10 +0200
Subject[PATCH 04/12] powerpc/cpm1: link to CONFIG_CPM1 instead of CONFIG_8xx
Message-ID<ucbuI-8cT-65@gated-at.bofh.it>
In reply to#1706427
To remain consistent with what is done with CPM2, let's link
CPM1 related parts to CONFIG_CPM1 instead of CONFIG_8xx

When something depends on both CPM1 and CPM2 we associate it
with CONFIG_CPM

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
 arch/powerpc/sysdev/Makefile  | 3 ++-
 arch/powerpc/sysdev/fsl_soc.c | 2 +-
 arch/powerpc/sysdev/fsl_soc.h | 2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile
index 9e70421ad323..ff80780a2568 100644
--- a/arch/powerpc/sysdev/Makefile
+++ b/arch/powerpc/sysdev/Makefile
@@ -41,10 +41,11 @@ obj-$(CONFIG_XILINX_PCI)	+= xilinx_pci.o
 obj-$(CONFIG_OF_RTC)		+= of_rtc.o
 
 obj-$(CONFIG_CPM)		+= cpm_common.o
+obj-$(CONFIG_CPM1)		+= cpm1.o
 obj-$(CONFIG_CPM2)		+= cpm2.o cpm2_pic.o
 obj-$(CONFIG_QUICC_ENGINE)	+= cpm_common.o
 obj-$(CONFIG_PPC_DCR)		+= dcr.o
-obj-$(CONFIG_8xx)		+= mpc8xx_pic.o cpm1.o
+obj-$(CONFIG_PPC_8xx)		+= mpc8xx_pic.o
 obj-$(CONFIG_UCODE_PATCH)	+= micropatch.o
 
 obj-$(CONFIG_PPC_MPC512x)	+= mpc5xxx_clocks.o
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index 19101f9cfcfc..1f614fb2be56 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -98,7 +98,7 @@ u32 fsl_get_sys_freq(void)
 }
 EXPORT_SYMBOL(fsl_get_sys_freq);
 
-#if defined(CONFIG_CPM2) || defined(CONFIG_QUICC_ENGINE) || defined(CONFIG_8xx)
+#if defined(CONFIG_CPM) || defined(CONFIG_QUICC_ENGINE)
 
 u32 get_brgfreq(void)
 {
diff --git a/arch/powerpc/sysdev/fsl_soc.h b/arch/powerpc/sysdev/fsl_soc.h
index d73daa4f0ccf..2640446f8bc4 100644
--- a/arch/powerpc/sysdev/fsl_soc.h
+++ b/arch/powerpc/sysdev/fsl_soc.h
@@ -7,7 +7,7 @@
 struct spi_device;
 
 extern phys_addr_t get_immrbase(void);
-#if defined(CONFIG_CPM2) || defined(CONFIG_QUICC_ENGINE) || defined(CONFIG_8xx)
+#if defined(CONFIG_CPM) || defined(CONFIG_QUICC_ENGINE)
 extern u32 get_brgfreq(void);
 extern u32 get_baudrate(void);
 #else
-- 
2.13.3

[toc] | [prev] | [next] | [standalone]


#1706465 — [PATCH 05/12] powerpc/8xx: Move mpc8xx_pic.c from sysdev to platform/8xx

FromChristophe Leroy <christophe.leroy@c-s.fr>
Date2017-08-08 14:10 +0200
Subject[PATCH 05/12] powerpc/8xx: Move mpc8xx_pic.c from sysdev to platform/8xx
Message-ID<ucbuI-8cT-71@gated-at.bofh.it>
In reply to#1706427
mpc8xx_pic.c is dedicated to the 8xx, so move it to platform/8xx

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
 arch/powerpc/platforms/8xx/Makefile                       | 2 +-
 arch/powerpc/platforms/8xx/m8xx_setup.c                   | 2 +-
 arch/powerpc/{sysdev/mpc8xx_pic.c => platforms/8xx/pic.c} | 2 +-
 arch/powerpc/{sysdev/mpc8xx_pic.h => platforms/8xx/pic.h} | 0
 arch/powerpc/sysdev/Makefile                              | 1 -
 5 files changed, 3 insertions(+), 4 deletions(-)
 rename arch/powerpc/{sysdev/mpc8xx_pic.c => platforms/8xx/pic.c} (99%)
 rename arch/powerpc/{sysdev/mpc8xx_pic.h => platforms/8xx/pic.h} (100%)

diff --git a/arch/powerpc/platforms/8xx/Makefile b/arch/powerpc/platforms/8xx/Makefile
index 756be8345868..f9af3218bd9c 100644
--- a/arch/powerpc/platforms/8xx/Makefile
+++ b/arch/powerpc/platforms/8xx/Makefile
@@ -1,7 +1,7 @@
 #
 # Makefile for the PowerPC 8xx linux kernel.
 #
-obj-y			+= m8xx_setup.o machine_check.o
+obj-y			+= m8xx_setup.o machine_check.o pic.o
 obj-$(CONFIG_MPC885ADS)   += mpc885ads_setup.o
 obj-$(CONFIG_MPC86XADS)   += mpc86xads_setup.o
 obj-$(CONFIG_PPC_EP88XC)  += ep88xc.o
diff --git a/arch/powerpc/platforms/8xx/m8xx_setup.c b/arch/powerpc/platforms/8xx/m8xx_setup.c
index f81069f79a94..1917d69f84df 100644
--- a/arch/powerpc/platforms/8xx/m8xx_setup.c
+++ b/arch/powerpc/platforms/8xx/m8xx_setup.c
@@ -23,7 +23,7 @@
 #include <asm/fs_pd.h>
 #include <mm/mmu_decl.h>
 
-#include <sysdev/mpc8xx_pic.h>
+#include "pic.h"
 
 #include "mpc8xx.h"
 
diff --git a/arch/powerpc/sysdev/mpc8xx_pic.c b/arch/powerpc/platforms/8xx/pic.c
similarity index 99%
rename from arch/powerpc/sysdev/mpc8xx_pic.c
rename to arch/powerpc/platforms/8xx/pic.c
index 2842f9d63d21..8d5a25d43ef3 100644
--- a/arch/powerpc/sysdev/mpc8xx_pic.c
+++ b/arch/powerpc/platforms/8xx/pic.c
@@ -9,7 +9,7 @@
 #include <asm/io.h>
 #include <asm/8xx_immap.h>
 
-#include "mpc8xx_pic.h"
+#include "pic.h"
 
 
 #define PIC_VEC_SPURRIOUS      15
diff --git a/arch/powerpc/sysdev/mpc8xx_pic.h b/arch/powerpc/platforms/8xx/pic.h
similarity index 100%
rename from arch/powerpc/sysdev/mpc8xx_pic.h
rename to arch/powerpc/platforms/8xx/pic.h
diff --git a/arch/powerpc/sysdev/Makefile b/arch/powerpc/sysdev/Makefile
index ff80780a2568..79416fa2e3ba 100644
--- a/arch/powerpc/sysdev/Makefile
+++ b/arch/powerpc/sysdev/Makefile
@@ -45,7 +45,6 @@ obj-$(CONFIG_CPM1)		+= cpm1.o
 obj-$(CONFIG_CPM2)		+= cpm2.o cpm2_pic.o
 obj-$(CONFIG_QUICC_ENGINE)	+= cpm_common.o
 obj-$(CONFIG_PPC_DCR)		+= dcr.o
-obj-$(CONFIG_PPC_8xx)		+= mpc8xx_pic.o
 obj-$(CONFIG_UCODE_PATCH)	+= micropatch.o
 
 obj-$(CONFIG_PPC_MPC512x)	+= mpc5xxx_clocks.o
-- 
2.13.3

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web