[PATCH v2 1/2] powerpc/85xx: introduce corenet_generic machine

2013-09-22 Thread Kevin Hao
In the current kernel, the board files for p2041rdb, p3041ds, p4080ds,
p5020ds, p5040ds, t4240qds and b4qds are almost the same except the
machine name. So this introduces a cornet_generic machine to support
all these boards to avoid the code duplication.

With these changes the file corenet_ds.h becomes useless. Just delete
it.

Signed-off-by: Kevin Hao 
---
v2:
  - Fix the typo in subject.
  - Fold the original patch 2 into this one.
  - Change the machine name from "CORENET GENERIC" to "CORENET Generic".

v1:
  - This patch is based on http://patchwork.ozlabs.org/patch/274390/

 arch/powerpc/platforms/85xx/Kconfig  | 10 
 arch/powerpc/platforms/85xx/Makefile |  8 +--
 arch/powerpc/platforms/85xx/b4_qds.c | 97 
 arch/powerpc/platforms/85xx/corenet_ds.c | 86 
 arch/powerpc/platforms/85xx/corenet_ds.h | 19 ---
 arch/powerpc/platforms/85xx/p2041_rdb.c  | 87 
 arch/powerpc/platforms/85xx/p3041_ds.c   | 89 -
 arch/powerpc/platforms/85xx/p4080_ds.c   | 87 
 arch/powerpc/platforms/85xx/p5020_ds.c   | 93 --
 arch/powerpc/platforms/85xx/p5040_ds.c   | 84 ---
 arch/powerpc/platforms/85xx/t4240_qds.c  | 93 --
 11 files changed, 97 insertions(+), 656 deletions(-)
 delete mode 100644 arch/powerpc/platforms/85xx/b4_qds.c
 delete mode 100644 arch/powerpc/platforms/85xx/corenet_ds.h
 delete mode 100644 arch/powerpc/platforms/85xx/p2041_rdb.c
 delete mode 100644 arch/powerpc/platforms/85xx/p3041_ds.c
 delete mode 100644 arch/powerpc/platforms/85xx/p4080_ds.c
 delete mode 100644 arch/powerpc/platforms/85xx/p5020_ds.c
 delete mode 100644 arch/powerpc/platforms/85xx/p5040_ds.c
 delete mode 100644 arch/powerpc/platforms/85xx/t4240_qds.c

diff --git a/arch/powerpc/platforms/85xx/Kconfig 
b/arch/powerpc/platforms/85xx/Kconfig
index de2eb93..3bee943 100644
--- a/arch/powerpc/platforms/85xx/Kconfig
+++ b/arch/powerpc/platforms/85xx/Kconfig
@@ -228,6 +228,7 @@ config P2041_RDB
select GPIO_MPC8XXX
select HAS_RAPIDIO
select PPC_EPAPR_HV_PIC
+   select CORENET_GENERIC
help
  This option enables support for the P2041 RDB board
 
@@ -241,6 +242,7 @@ config P3041_DS
select GPIO_MPC8XXX
select HAS_RAPIDIO
select PPC_EPAPR_HV_PIC
+   select CORENET_GENERIC
help
  This option enables support for the P3041 DS board
 
@@ -254,6 +256,7 @@ config P4080_DS
select GPIO_MPC8XXX
select HAS_RAPIDIO
select PPC_EPAPR_HV_PIC
+   select CORENET_GENERIC
help
  This option enables support for the P4080 DS board
 
@@ -278,6 +281,7 @@ config P5020_DS
select GPIO_MPC8XXX
select HAS_RAPIDIO
select PPC_EPAPR_HV_PIC
+   select CORENET_GENERIC
help
  This option enables support for the P5020 DS board
 
@@ -292,6 +296,7 @@ config P5040_DS
select GPIO_MPC8XXX
select HAS_RAPIDIO
select PPC_EPAPR_HV_PIC
+   select CORENET_GENERIC
help
  This option enables support for the P5040 DS board
 
@@ -323,6 +328,7 @@ config T4240_QDS
select GPIO_MPC8XXX
select HAS_RAPIDIO
select PPC_EPAPR_HV_PIC
+   select CORENET_GENERIC
help
  This option enables support for the T4240 QDS board
 
@@ -337,6 +343,7 @@ config B4_QDS
select ARCH_REQUIRE_GPIOLIB
select HAS_RAPIDIO
select PPC_EPAPR_HV_PIC
+   select CORENET_GENERIC
help
  This option enables support for the B4 QDS board
  The B4 application development system B4 QDS is a complete
@@ -348,3 +355,6 @@ endif # FSL_SOC_BOOKE
 
 config TQM85xx
bool
+
+config CORENET_GENERIC
+   bool
diff --git a/arch/powerpc/platforms/85xx/Makefile 
b/arch/powerpc/platforms/85xx/Makefile
index 53c9f75..a6c281d 100644
--- a/arch/powerpc/platforms/85xx/Makefile
+++ b/arch/powerpc/platforms/85xx/Makefile
@@ -18,13 +18,7 @@ obj-$(CONFIG_P1010_RDB)   += p1010rdb.o
 obj-$(CONFIG_P1022_DS)+= p1022_ds.o
 obj-$(CONFIG_P1022_RDK)   += p1022_rdk.o
 obj-$(CONFIG_P1023_RDS)   += p1023_rds.o
-obj-$(CONFIG_P2041_RDB)   += p2041_rdb.o corenet_ds.o
-obj-$(CONFIG_P3041_DS)+= p3041_ds.o corenet_ds.o
-obj-$(CONFIG_P4080_DS)+= p4080_ds.o corenet_ds.o
-obj-$(CONFIG_P5020_DS)+= p5020_ds.o corenet_ds.o
-obj-$(CONFIG_P5040_DS)+= p5040_ds.o corenet_ds.o
-obj-$(CONFIG_T4240_QDS)   += t4240_qds.o corenet_ds.o
-obj-$(CONFIG_B4_QDS) += b4_qds.o corenet_ds.o
+obj-$(CONFIG_CORENET_GENERIC)   += corenet_ds.o
 obj-$(CONFIG_STX_GP3)+= stx_gp3.o
 obj-$(CONFIG_TQM85xx)+= tqm85xx.o
 obj-$(CONFIG_SBC8548) += sbc8548.o
diff --git a/arch/powerpc/platforms/85xx/b4_qds.c 
b/arch/powerpc/platforms/85xx/b4_qds.c
deleted file mode 100644
index 0f18663..000
--- a/arch/powerpc/platforms/85xx/b4_

Re: [PATCH v2 1/2] powerpc/85xx: introduce corenet_generic machine

2013-09-23 Thread Scott Wood
On Sun, 2013-09-22 at 15:42 +0800, Kevin Hao wrote:
> In the current kernel, the board files for p2041rdb, p3041ds, p4080ds,
> p5020ds, p5040ds, t4240qds and b4qds are almost the same except the
> machine name. So this introduces a cornet_generic machine to support
> all these boards to avoid the code duplication.
> 
> With these changes the file corenet_ds.h becomes useless. Just delete
> it.
> 
> Signed-off-by: Kevin Hao 
> ---
> v2:
>   - Fix the typo in subject.
>   - Fold the original patch 2 into this one.
>   - Change the machine name from "CORENET GENERIC" to "CORENET Generic".

CoreNet shouldn't be allcaps either.

> diff --git a/arch/powerpc/platforms/85xx/Kconfig 
> b/arch/powerpc/platforms/85xx/Kconfig
> index de2eb93..3bee943 100644
> --- a/arch/powerpc/platforms/85xx/Kconfig
> +++ b/arch/powerpc/platforms/85xx/Kconfig
> @@ -228,6 +228,7 @@ config P2041_RDB
>   select GPIO_MPC8XXX
>   select HAS_RAPIDIO
>   select PPC_EPAPR_HV_PIC
> + select CORENET_GENERIC
>   help
> This option enables support for the P2041 RDB board
>  
> @@ -241,6 +242,7 @@ config P3041_DS
>   select GPIO_MPC8XXX
>   select HAS_RAPIDIO
>   select PPC_EPAPR_HV_PIC
> + select CORENET_GENERIC
>   help
> This option enables support for the P3041 DS board
>  
> @@ -254,6 +256,7 @@ config P4080_DS
>   select GPIO_MPC8XXX
>   select HAS_RAPIDIO
>   select PPC_EPAPR_HV_PIC
> + select CORENET_GENERIC
>   help
> This option enables support for the P4080 DS board

As discussed earlier, I'd prefer if this were combined into one kconfig
option.  The help text can list boards that are known to work with it.

-Scott



___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH v2 1/2] powerpc/85xx: introduce corenet_generic machine

2013-09-23 Thread Kevin Hao
On Mon, Sep 23, 2013 at 05:33:58PM -0500, Scott Wood wrote:
> On Sun, 2013-09-22 at 15:42 +0800, Kevin Hao wrote:
> > In the current kernel, the board files for p2041rdb, p3041ds, p4080ds,
> > p5020ds, p5040ds, t4240qds and b4qds are almost the same except the
> > machine name. So this introduces a cornet_generic machine to support
> > all these boards to avoid the code duplication.
> > 
> > With these changes the file corenet_ds.h becomes useless. Just delete
> > it.
> > 
> > Signed-off-by: Kevin Hao 
> > ---
> > v2:
> >   - Fix the typo in subject.
> >   - Fold the original patch 2 into this one.
> >   - Change the machine name from "CORENET GENERIC" to "CORENET Generic".
> 
> CoreNet shouldn't be allcaps either.

OK. Will change it to "CoreNet Generic".

> 
> > diff --git a/arch/powerpc/platforms/85xx/Kconfig 
> > b/arch/powerpc/platforms/85xx/Kconfig
> > index de2eb93..3bee943 100644
> > --- a/arch/powerpc/platforms/85xx/Kconfig
> > +++ b/arch/powerpc/platforms/85xx/Kconfig
> > @@ -228,6 +228,7 @@ config P2041_RDB
> > select GPIO_MPC8XXX
> > select HAS_RAPIDIO
> > select PPC_EPAPR_HV_PIC
> > +   select CORENET_GENERIC
> > help
> >   This option enables support for the P2041 RDB board
> >  
> > @@ -241,6 +242,7 @@ config P3041_DS
> > select GPIO_MPC8XXX
> > select HAS_RAPIDIO
> > select PPC_EPAPR_HV_PIC
> > +   select CORENET_GENERIC
> > help
> >   This option enables support for the P3041 DS board
> >  
> > @@ -254,6 +256,7 @@ config P4080_DS
> > select GPIO_MPC8XXX
> > select HAS_RAPIDIO
> > select PPC_EPAPR_HV_PIC
> > +   select CORENET_GENERIC
> > help
> >   This option enables support for the P4080 DS board
> 
> As discussed earlier, I'd prefer if this were combined into one kconfig
> option.  The help text can list boards that are known to work with it.

OK, will do.

Thanks,
Kevin
> 
> -Scott
> 
> 
> 


pgpUKUYTFYwX4.pgp
Description: PGP signature
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev