powerpc: consolidate mpc83xx platform files
Subsystems (2)
PATCH 1/1 powerpc: consolidate mpc83xx platform files
Eliminate code redundancy. mpc83[246]x_{mds,itx,sys,pb} files merged into a single setup.c. machine definitions moved to machdefs.c with corresponding probe fns. This patch also utilizes of_platform_bus_probe() in lieu of manually calling of_platform_device_create for each ucc_geth device.
---
arch/powerpc/kernel/of_platform.c | 1 + arch/powerpc/platforms/83xx/Makefile | 6 +- arch/powerpc/platforms/83xx/machdefs.c | 126 +++++++++++++++ arch/powerpc/platforms/83xx/mpc832x_mds.c | 232 ---------------------------- arch/powerpc/platforms/83xx/mpc832x_mds.h | 19 --- arch/powerpc/platforms/83xx/mpc834x_itx.c | 121 --------------- arch/powerpc/platforms/83xx/mpc834x_itx.h | 23 --- arch/powerpc/platforms/83xx/mpc834x_sys.c | 140 ----------------- arch/powerpc/platforms/83xx/mpc834x_sys.h | 23 --- arch/powerpc/platforms/83xx/mpc8360e_pb.c | 236 ----------------------------- arch/powerpc/platforms/83xx/mpc83xx.h | 2 + arch/powerpc/platforms/83xx/setup.c | 188 +++++++++++++++++++++++ 12 files changed, 318 insertions(+), 799 deletions(-)
arch/powerpc/kernel/of_platform.c +1 -0
@@ -50,6 +50,7 @@ static struct of_device_id of_default_bu { .type = "plb5", }, { .type = "plb4", }, { .type = "opb", }, + { .type = "qe", }, {}, };
arch/powerpc/platforms/83xx/Makefile +1 -5
@@ -1,9 +1,5 @@ # # Makefile for the PowerPC 83xx linux kernel. # -obj-y := misc.o +obj-y := machdefs.o setup.o misc.o obj-$(CONFIG_PCI) += pci.o -obj-$(CONFIG_MPC834x_SYS) += mpc834x_sys.o -obj-$(CONFIG_MPC834x_ITX) += mpc834x_itx.o -obj-$(CONFIG_MPC8360E_PB) += mpc8360e_pb.o -obj-$(CONFIG_MPC832x_MDS) += mpc832x_mds.o
arch/powerpc/platforms/83xx/machdefs.c new file +126 -0
126 lines not on this page · raw message
arch/powerpc/platforms/83xx/mpc832x_mds.c deleted +0 -232
232 lines not on this page · raw message
arch/powerpc/platforms/83xx/mpc832x_mds.h deleted +0 -19
@@ -1,19 +0,0 @@ -/* -* Copyright (C) Freescale Semicondutor, Inc. 2006. All rights reserved. -* -* Description: -* MPC832x MDS board specific header. -* -* This program is free software; you can redistribute it and/or modify it -* under the terms of the GNU General Public License as published by the -* Free Software Foundation; either version 2 of the License, or (at your -* option) any later version. -* -*/ - -#ifndef __MACH_MPC832x_MDS_H__ -#define __MACH_MPC832x_MDS_H__ - -extern u8 *get_bcsr (void ); - -#endif /* __MACH_MPC832x_MDS_H__ */
arch/powerpc/platforms/83xx/mpc834x_itx.c deleted +0 -121
121 lines not on this page · raw message
arch/powerpc/platforms/83xx/mpc834x_itx.h deleted +0 -23
@@ -1,23 +0,0 @@ -/* -* arch/powerpc/platforms/83xx/mpc834x_itx.h -* -* MPC834X ITX common board definitions -* -* Maintainer: Kumar Gala <[email protected]> -* -* This program is free software; you can redistribute it and/or modify it -* under the terms of the GNU General Public License as published by the -* Free Software Foundation; either version 2 of the License, or (at your -* option) any later version. -* -*/ - -#ifndef __MACH_MPC83XX_ITX_H__ -#define __MACH_MPC83XX_ITX_H__ - -#define PIRQA MPC83xx_IRQ_EXT4 -#define PIRQB MPC83xx_IRQ_EXT5 -#define PIRQC MPC83xx_IRQ_EXT6 -#define PIRQD MPC83xx_IRQ_EXT7 - -#endif /* __MACH_MPC83XX_ITX_H__ */
arch/powerpc/platforms/83xx/mpc834x_sys.c deleted +0 -140
140 lines not on this page · raw message
arch/powerpc/platforms/83xx/mpc834x_sys.h deleted +0 -23
@@ -1,23 +0,0 @@ -/* -* arch/powerpc/platforms/83xx/mpc834x_sys.h -* -* MPC834X SYS common board definitions -* -* Maintainer: Kumar Gala <[email protected]> -* -* This program is free software; you can redistribute it and/or modify it -* under the terms of the GNU General Public License as published by the -* Free Software Foundation; either version 2 of the License, or (at your -* option) any later version. -* -*/ - -#ifndef __MACH_MPC83XX_SYS_H__ -#define __MACH_MPC83XX_SYS_H__ - -#define PIRQA MPC83xx_IRQ_EXT4 -#define PIRQB MPC83xx_IRQ_EXT5 -#define PIRQC MPC83xx_IRQ_EXT6 -#define PIRQD MPC83xx_IRQ_EXT7 - -#endif /* __MACH_MPC83XX_SYS_H__ */
arch/powerpc/platforms/83xx/mpc8360e_pb.c deleted +0 -236
236 lines not on this page · raw message
arch/powerpc/platforms/83xx/mpc83xx.h +2 -0
@@ -13,5 +13,7 @@ extern int add_bridge(struct device_nodeextern int mpc83xx_exclude_device (u_char bus,u_char devfn);extern void mpc83xx_restart (char *cmd);extern long mpc83xx_time_init (void ); +extern void __init mpc83xx_setup_arch (void ); +extern void __init mpc83xx_init_IRQ (void );#endif /* __MPC83XX_H__ */
arch/powerpc/platforms/83xx/setup.c new file +188 -0
188 lines not on this page · raw message
Signature · 1 line
1.4.4
Quoted 8 lines · Kim Phillips
Eliminate code redundancy. mpc83[246]x_{mds,itx,sys,pb} files merged into a single
setup.c. machine definitions moved tomachdefs.cwith corresponding probe fns. This patch also utilizesof_platform_bus_probe()in lieu of manually callingof_platform_device_createfor eachucc_gethdevice.Signed-off-by Kim Phillips <[email protected]>---
Quoted 16 lines
arch/powerpc/kernel/of_platform.c | 1 + arch/powerpc/platforms/83xx/Makefile | 6 +- arch/powerpc/platforms/83xx/machdefs.c | 126 +++++++++++++++ arch/powerpc/platforms/83xx/mpc832x_mds.c | 232 ---------------------------- arch/powerpc/platforms/83xx/mpc832x_mds.h | 19 --- arch/powerpc/platforms/83xx/mpc834x_itx.c | 121 --------------- arch/powerpc/platforms/83xx/mpc834x_itx.h | 23 --- arch/powerpc/platforms/83xx/mpc834x_sys.c | 140 ----------------- arch/powerpc/platforms/83xx/mpc834x_sys.h | 23 --- arch/powerpc/platforms/83xx/mpc8360e_pb.c | 236 ----------------------------- arch/powerpc/platforms/83xx/mpc83xx.h | 2 + arch/powerpc/platforms/83xx/setup.c | 188 ++++++++++++++++++ +++++ 12 files changed, 318 insertions(+), 799 deletions(-)
We should split machdefs into <BOARD>.c and then fixup the Kconfig to you can build all of them together? I think this would be more clear and makes for good examples on how a custom board port should go.
- k