Consolidation of 83xx/85xx board files
Subsystems (4)
cover Consolidation of 83xx/85xx board files
I think it's already too late for this merge window, so this should stay for 3.2 merge window. Board files for mpc83xx platforms show lots of common code. Same goes for mpc85xx boards. This patchset is an initial attempt to merge some (most) of the common code. Based on the tree by Kumar Gala.
The following changes since commit 6471fc6630a507fd54fdaceceee1ddaf3c917cde:
powerpc: Dont require a dma_ops struct to set dma mask (2011-07-08 00:21:36 -0500)
Dmitry Eremin-Solenikov (14):
83xx: consolidate init_IRQ functions
83xx: consolidate of_platform_bus_probe calls
mpc8349emitx: mark localbus as compatible with simple-bus 83xx/mpc834x_itx: drop pq2pro-localbus-specific code
83xx: headers cleanup
85xx/sbc8560: correct compilation if CONFIG_PHYS_ADDR_T_64BIT is set 85xx/ksi8560: declare that localbus is compatbile with simple-bus 85xx/sbc8560: declare that localbus is compatbile with simple-bus 85xx/sbc8548: read hardware revision when it's required for first time 85xx/mpc85xx_rdb: merge p1020_rdb and p2020_rdb machine entries 85xx: merge 32-bit QorIQ with DPA boards support 85xx/mpc85xx_ds,ads,cds: move .pci_exclude_device setting to machine definitions 85xx: consolidate of_platform_bus_probe calls
85xx: separate cpm2 pic init
arch/powerpc/boot/dts/ksi8560.dts | 2 +-
arch/powerpc/boot/dts/mpc8349emitx.dts | 3 +-
arch/powerpc/boot/dts/sbc8560.dts | 2 +-
arch/powerpc/platforms/83xx/asp834x.c | 37 +--------
arch/powerpc/platforms/83xx/km83xx.c | 77 +----------------
arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c | 5 -
arch/powerpc/platforms/83xx/misc.c | 64 ++++++++++++++-
arch/powerpc/platforms/83xx/mpc830x_rdb.c | 36 +-------
arch/powerpc/platforms/83xx/mpc831x_rdb.c | 34 +-------
arch/powerpc/platforms/83xx/mpc832x_mds.c | 80 +-----------------
arch/powerpc/platforms/83xx/mpc832x_rdb.c | 60 +-------------
arch/powerpc/platforms/83xx/mpc834x_itx.c | 51 +-----------
arch/powerpc/platforms/83xx/mpc834x_mds.c | 53 +-----------
arch/powerpc/platforms/83xx/mpc836x_mds.c | 79 +-----------------
arch/powerpc/platforms/83xx/mpc836x_rdk.c | 47 +----------
arch/powerpc/platforms/83xx/mpc837x_mds.c | 39 +--------
arch/powerpc/platforms/83xx/mpc837x_rdb.c | 38 +--------
arch/powerpc/platforms/83xx/mpc83xx.h | 10 ++
arch/powerpc/platforms/83xx/sbc834x.c | 55 +------------
arch/powerpc/platforms/83xx/suspend.c | 8 --
arch/powerpc/platforms/83xx/usb.c | 8 --
arch/powerpc/platforms/85xx/Kconfig | 32 +------
arch/powerpc/platforms/85xx/Makefile | 6 +-
arch/powerpc/platforms/85xx/ksi8560.c | 46 +----------
arch/powerpc/platforms/85xx/mpc8536_ds.c | 16 +---
arch/powerpc/platforms/85xx/mpc85xx.h | 11 +++
arch/powerpc/platforms/85xx/mpc85xx_ads.c | 57 ++-----------
arch/powerpc/platforms/85xx/mpc85xx_cds.c | 21 +----
arch/powerpc/platforms/85xx/mpc85xx_common.c | 65 ++++++++++++++
arch/powerpc/platforms/85xx/mpc85xx_ds.c | 25 ++----
arch/powerpc/platforms/85xx/mpc85xx_mds.c | 46 +---------
arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 54 +++----------
arch/powerpc/platforms/85xx/p1022_ds.c | 7 +-
arch/powerpc/platforms/85xx/p2040_rdb.c | 88 --------------------
arch/powerpc/platforms/85xx/p4080_ds.c | 88 --------------------
.../platforms/85xx/{p3041_ds.c => qoriq_dpa_ds.c} | 26 +++---
arch/powerpc/platforms/85xx/sbc8548.c | 26 ++----
arch/powerpc/platforms/85xx/sbc8560.c | 52 +-----------
arch/powerpc/platforms/85xx/socrates.c | 13 +---
arch/powerpc/platforms/85xx/stx_gp3.c | 16 +---
arch/powerpc/platforms/85xx/tqm85xx.c | 51 +-----------
arch/powerpc/platforms/85xx/xes_mpc85xx.c | 20 +----
42 files changed, 278 insertions(+), 1276 deletions(-)
create mode 100644 arch/powerpc/platforms/85xx/mpc85xx.h
create mode 100644 arch/powerpc/platforms/85xx/mpc85xx_common.c
delete mode 100644 arch/powerpc/platforms/85xx/p2040_rdb.c
delete mode 100644 arch/powerpc/platforms/85xx/p4080_ds.c
rename arch/powerpc/platforms/85xx/{p3041_ds.c => qoriq_dpa_ds.c} (72%)PATCH 1/14 83xx: consolidate init_IRQ functions
On mpc83xx platform nearly all _init_IRQ functions look alike. They either just setup ipic, or setup ipic and QE PIC. Separate this to special functions to be either referenced from ppc_md, or called from board file.
--- arch/powerpc/platforms/83xx/asp834x.c | 20 +------------ arch/powerpc/platforms/83xx/km83xx.c | 33 +-------------------- arch/powerpc/platforms/83xx/misc.c | 46 +++++++++++++++++++++++++++++ arch/powerpc/platforms/83xx/mpc830x_rdb.c | 18 +---------- arch/powerpc/platforms/83xx/mpc831x_rdb.c | 18 +---------- arch/powerpc/platforms/83xx/mpc832x_mds.c | 30 +------------------ arch/powerpc/platforms/83xx/mpc832x_rdb.c | 31 +------------------- arch/powerpc/platforms/83xx/mpc834x_itx.c | 18 +---------- arch/powerpc/platforms/83xx/mpc834x_mds.c | 18 +---------- arch/powerpc/platforms/83xx/mpc836x_mds.c | 30 +------------------ arch/powerpc/platforms/83xx/mpc836x_rdk.c | 28 +----------------- arch/powerpc/platforms/83xx/mpc837x_mds.c | 18 +---------- arch/powerpc/platforms/83xx/mpc837x_rdb.c | 18 +---------- arch/powerpc/platforms/83xx/mpc83xx.h | 9 +++++ arch/powerpc/platforms/83xx/sbc834x.c | 20 +------------ 15 files changed, 68 insertions(+), 287 deletions(-)
arch/powerpc/platforms/83xx/asp834x.c +1 -19
@@ -36,24 +36,6 @@ static void __init asp834x_setup_arch(void)mpc834x_usb_cfg (); } -static void __init asp834x_init_IRQ (void ) -{ -struct device_node *np; - - np =of_find_node_by_type (NULL ,"ipic" ); -if (!np) -return ; - -ipic_init (np,0 ); - -of_node_put (np); - -/* Initialize the default interrupt mapping priorities, -* in case the boot rom changed something on us. -*/ -ipic_set_default_priority (); -} -static struct __initdata of_device_id asp8347_ids[] = { { .type ="soc" , }, { .compatible ="soc" , },
@@ -82,7 +64,7 @@ define_machine(asp834x) { .name = "ASP8347E", .probe = asp834x_probe, .setup_arch = asp834x_setup_arch, - .init_IRQ = asp834x_init_IRQ, + .init_IRQ = mpc83xx_ipic_init_IRQ, .get_irq = ipic_get_irq, .restart = mpc83xx_restart, .time_init = mpc83xx_time_init,
arch/powerpc/platforms/83xx/km83xx.c +1 -32
@@ -140,37 +140,6 @@ static int __init kmeter_declare_of_platform_devices(void) }machine_device_initcall (mpc83xx_km, kmeter_declare_of_platform_devices); -static void __init mpc83xx_km_init_IRQ (void ) -{ -struct device_node *np; - - np =of_find_compatible_node (NULL ,NULL ,"fsl,pq2pro-pic" ); -if (!np) { - np =of_find_node_by_type (NULL ,"ipic" ); -if (!np) -return ; - } - -ipic_init (np,0 ); - -/* Initialize the default interrupt mapping priorities, -* in case the boot rom changed something on us. -*/ -ipic_set_default_priority (); -of_node_put (np); - -#ifdef CONFIG_QUICC_ENGINE - np =of_find_compatible_node (NULL ,NULL ,"fsl,qe-ic" ); -if (!np) { - np =of_find_node_by_type (NULL ,"qeic" ); -if (!np) -return ; - } -qe_ic_init (np,0 , qe_ic_cascade_low_ipic, qe_ic_cascade_high_ipic); -of_node_put (np); -#endif /* CONFIG_QUICC_ENGINE */ -} -/* list of the supported boards */ static char *board[]__initdata = {"Keymile,KMETER1" ,
@@ -198,7 +167,7 @@ define_machine(mpc83xx_km) { .name = "mpc83xx-km-platform", .probe = mpc83xx_km_probe, .setup_arch = mpc83xx_km_setup_arch, - .init_IRQ = mpc83xx_km_init_IRQ, + .init_IRQ = mpc83xx_both_init_IRQ, .get_irq = ipic_get_irq, .restart = mpc83xx_restart, .time_init = mpc83xx_time_init,
arch/powerpc/platforms/83xx/misc.c +46 -0
58 lines not on this page · raw message
arch/powerpc/platforms/83xx/mpc830x_rdb.c +1 -17
@@ -41,22 +41,6 @@ static void __init mpc830x_rdb_setup_arch(void)mpc831x_usb_cfg (); } -static void __init mpc830x_rdb_init_IRQ (void ) -{ -struct device_node *np; - - np =of_find_node_by_type (NULL ,"ipic" ); -if (!np) -return ; - -ipic_init (np,0 ); - -/* Initialize the default interrupt mapping priorities, -* in case the boot rom changed something on us. -*/ -ipic_set_default_priority (); -} -static const char *board[]__initdata = {"MPC8308RDB" ,"fsl,mpc8308rdb" ,
@@ -89,7 +73,7 @@ define_machine(mpc830x_rdb) { .name = "MPC830x RDB", .probe = mpc830x_rdb_probe, .setup_arch = mpc830x_rdb_setup_arch, - .init_IRQ = mpc830x_rdb_init_IRQ, + .init_IRQ = mpc83xx_ipic_init_IRQ, .get_irq = ipic_get_irq, .restart = mpc83xx_restart, .time_init = mpc83xx_time_init,
arch/powerpc/platforms/83xx/mpc831x_rdb.c +1 -17
@@ -44,22 +44,6 @@ static void __init mpc831x_rdb_setup_arch(void)mpc831x_usb_cfg (); } -static void __init mpc831x_rdb_init_IRQ (void ) -{ -struct device_node *np; - - np =of_find_node_by_type (NULL ,"ipic" ); -if (!np) -return ; - -ipic_init (np,0 ); - -/* Initialize the default interrupt mapping priorities, -* in case the boot rom changed something on us. -*/ -ipic_set_default_priority (); -} -static const char *board[]__initdata = {"MPC8313ERDB" ,"fsl,mpc8315erdb" ,
@@ -92,7 +76,7 @@ define_machine(mpc831x_rdb) { .name = "MPC831x RDB", .probe = mpc831x_rdb_probe, .setup_arch = mpc831x_rdb_setup_arch, - .init_IRQ = mpc831x_rdb_init_IRQ, + .init_IRQ = mpc83xx_ipic_init_IRQ, .get_irq = ipic_get_irq, .restart = mpc83xx_restart, .time_init = mpc83xx_time_init,
arch/powerpc/platforms/83xx/mpc832x_mds.c +1 -29
@@ -119,34 +119,6 @@ static int __init mpc832x_declare_of_platform_devices(void) }machine_device_initcall (mpc832x_mds, mpc832x_declare_of_platform_devices); -static void __init mpc832x_sys_init_IRQ (void ) -{ -struct device_node *np; - - np =of_find_node_by_type (NULL ,"ipic" ); -if (!np) -return ; - -ipic_init (np,0 ); - -/* Initialize the default interrupt mapping priorities, -* in case the boot rom changed something on us. -*/ -ipic_set_default_priority (); -of_node_put (np); - -#ifdef CONFIG_QUICC_ENGINE - np =of_find_compatible_node (NULL ,NULL ,"fsl,qe-ic" ); -if (!np) { - np =of_find_node_by_type (NULL ,"qeic" ); -if (!np) -return ; - } -qe_ic_init (np,0 , qe_ic_cascade_low_ipic, qe_ic_cascade_high_ipic); -of_node_put (np); -#endif /* CONFIG_QUICC_ENGINE */ -} -/* * Called very early, MMU is off, device-tree isn't unflattened */
@@ -161,7 +133,7 @@ define_machine(mpc832x_mds) { .name = "MPC832x MDS", .probe = mpc832x_sys_probe, .setup_arch = mpc832x_sys_setup_arch, - .init_IRQ = mpc832x_sys_init_IRQ, + .init_IRQ = mpc83xx_both_init_IRQ, .get_irq = ipic_get_irq, .restart = mpc83xx_restart, .time_init = mpc83xx_time_init,
arch/powerpc/platforms/83xx/mpc832x_rdb.c +1 -30
@@ -236,35 +236,6 @@ static int __init mpc832x_declare_of_platform_devices(void) }machine_device_initcall (mpc832x_rdb, mpc832x_declare_of_platform_devices); -static void __init mpc832x_rdb_init_IRQ (void ) -{ - -struct device_node *np; - - np =of_find_node_by_type (NULL ,"ipic" ); -if (!np) -return ; - -ipic_init (np,0 ); - -/* Initialize the default interrupt mapping priorities, -* in case the boot rom changed something on us. -*/ -ipic_set_default_priority (); -of_node_put (np); - -#ifdef CONFIG_QUICC_ENGINE - np =of_find_compatible_node (NULL ,NULL ,"fsl,qe-ic" ); -if (!np) { - np =of_find_node_by_type (NULL ,"qeic" ); -if (!np) -return ; - } -qe_ic_init (np,0 , qe_ic_cascade_low_ipic, qe_ic_cascade_high_ipic); -of_node_put (np); -#endif /* CONFIG_QUICC_ENGINE */ -} -/* * Called very early, MMU is off, device-tree isn't unflattened */
@@ -279,7 +250,7 @@ define_machine(mpc832x_rdb) { .name = "MPC832x RDB", .probe = mpc832x_rdb_probe, .setup_arch = mpc832x_rdb_setup_arch, - .init_IRQ = mpc832x_rdb_init_IRQ, + .init_IRQ = mpc83xx_both_init_IRQ, .get_irq = ipic_get_irq, .restart = mpc83xx_restart, .time_init = mpc83xx_time_init,
arch/powerpc/platforms/83xx/mpc834x_itx.c +1 -17
@@ -74,22 +74,6 @@ static void __init mpc834x_itx_setup_arch(void)mpc834x_usb_cfg (); } -static void __init mpc834x_itx_init_IRQ (void ) -{ -struct device_node *np; - - np =of_find_node_by_type (NULL ,"ipic" ); -if (!np) -return ; - -ipic_init (np,0 ); - -/* Initialize the default interrupt mapping priorities, -* in case the boot rom changed something on us. -*/ -ipic_set_default_priority (); -} -/* * Called very early, MMU is off, device-tree isn't unflattened */
@@ -104,7 +88,7 @@ define_machine(mpc834x_itx) { .name = "MPC834x ITX", .probe = mpc834x_itx_probe, .setup_arch = mpc834x_itx_setup_arch, - .init_IRQ = mpc834x_itx_init_IRQ, + .init_IRQ = mpc83xx_ipic_init_IRQ, .get_irq = ipic_get_irq, .restart = mpc83xx_restart, .time_init = mpc83xx_time_init,
arch/powerpc/platforms/83xx/mpc834x_mds.c +1 -17
@@ -92,22 +92,6 @@ static void __init mpc834x_mds_setup_arch(void)mpc834xemds_usb_cfg (); } -static void __init mpc834x_mds_init_IRQ (void ) -{ -struct device_node *np; - - np =of_find_node_by_type (NULL ,"ipic" ); -if (!np) -return ; - -ipic_init (np,0 ); - -/* Initialize the default interrupt mapping priorities, -* in case the boot rom changed something on us. -*/ -ipic_set_default_priority (); -} -static struct of_device_id mpc834x_ids[] = { { .type ="soc" , }, { .compatible ="soc" , },
@@ -137,7 +121,7 @@ define_machine(mpc834x_mds) { .name = "MPC834x MDS", .probe = mpc834x_mds_probe, .setup_arch = mpc834x_mds_setup_arch, - .init_IRQ = mpc834x_mds_init_IRQ, + .init_IRQ = mpc83xx_ipic_init_IRQ, .get_irq = ipic_get_irq, .restart = mpc83xx_restart, .time_init = mpc83xx_time_init,
arch/powerpc/platforms/83xx/mpc836x_mds.c +1 -29
@@ -226,34 +226,6 @@ err:machine_arch_initcall (mpc836x_mds, mpc836x_usb_cfg);#endif /* CONFIG_QE_USB */ -static void __init mpc836x_mds_init_IRQ (void ) -{ -struct device_node *np; - - np =of_find_node_by_type (NULL ,"ipic" ); -if (!np) -return ; - -ipic_init (np,0 ); - -/* Initialize the default interrupt mapping priorities, -* in case the boot rom changed something on us. -*/ -ipic_set_default_priority (); -of_node_put (np); - -#ifdef CONFIG_QUICC_ENGINE - np =of_find_compatible_node (NULL ,NULL ,"fsl,qe-ic" ); -if (!np) { - np =of_find_node_by_type (NULL ,"qeic" ); -if (!np) -return ; - } -qe_ic_init (np,0 , qe_ic_cascade_low_ipic, qe_ic_cascade_high_ipic); -of_node_put (np); -#endif /* CONFIG_QUICC_ENGINE */ -} -/* * Called very early, MMU is off, device-tree isn't unflattened */
@@ -268,7 +240,7 @@ define_machine(mpc836x_mds) { .name = "MPC836x MDS", .probe = mpc836x_mds_probe, .setup_arch = mpc836x_mds_setup_arch, - .init_IRQ = mpc836x_mds_init_IRQ, + .init_IRQ = mpc83xx_both_init_IRQ, .get_irq = ipic_get_irq, .restart = mpc83xx_restart, .time_init = mpc83xx_time_init,
arch/powerpc/platforms/83xx/mpc836x_rdk.c +1 -27
@@ -56,32 +56,6 @@ static void __init mpc836x_rdk_setup_arch(void)#endif } -static void __init mpc836x_rdk_init_IRQ (void ) -{ -struct device_node *np; - - np =of_find_compatible_node (NULL ,NULL ,"fsl,ipic" ); -if (!np) -return ; - -ipic_init (np,0 ); - -/* -* Initialize the default interrupt mapping priorities, -* in case the boot rom changed something on us. -*/ -ipic_set_default_priority (); -of_node_put (np); -#ifdef CONFIG_QUICC_ENGINE - np =of_find_compatible_node (NULL ,NULL ,"fsl,qe-ic" ); -if (!np) -return ; - -qe_ic_init (np,0 , qe_ic_cascade_low_ipic, qe_ic_cascade_high_ipic); -of_node_put (np); -#endif -} -/* * Called very early, MMU is off, device-tree isn't unflattened. */
@@ -96,7 +70,7 @@ define_machine(mpc836x_rdk) { .name = "MPC836x RDK", .probe = mpc836x_rdk_probe, .setup_arch = mpc836x_rdk_setup_arch, - .init_IRQ = mpc836x_rdk_init_IRQ, + .init_IRQ = mpc83xx_both_init_IRQ, .get_irq = ipic_get_irq, .restart = mpc83xx_restart, .time_init = mpc83xx_time_init,
arch/powerpc/platforms/83xx/mpc837x_mds.c +1 -17
@@ -112,22 +112,6 @@ static int __init mpc837x_declare_of_platform_devices(void) }machine_device_initcall (mpc837x_mds, mpc837x_declare_of_platform_devices); -static void __init mpc837x_mds_init_IRQ (void ) -{ -struct device_node *np; - - np =of_find_compatible_node (NULL ,NULL ,"fsl,ipic" ); -if (!np) -return ; - -ipic_init (np,0 ); - -/* Initialize the default interrupt mapping priorities, -* in case the boot rom changed something on us. -*/ -ipic_set_default_priority (); -} -/* * Called very early, MMU is off, device-tree isn't unflattened */
@@ -142,7 +126,7 @@ define_machine(mpc837x_mds) { .name = "MPC837x MDS", .probe = mpc837x_mds_probe, .setup_arch = mpc837x_mds_setup_arch, - .init_IRQ = mpc837x_mds_init_IRQ, + .init_IRQ = mpc83xx_ipic_init_IRQ, .get_irq = ipic_get_irq, .restart = mpc83xx_restart, .time_init = mpc83xx_time_init,
arch/powerpc/platforms/83xx/mpc837x_rdb.c +1 -17
@@ -85,22 +85,6 @@ static int __init mpc837x_declare_of_platform_devices(void) }machine_device_initcall (mpc837x_rdb, mpc837x_declare_of_platform_devices); -static void __init mpc837x_rdb_init_IRQ (void ) -{ -struct device_node *np; - - np =of_find_compatible_node (NULL ,NULL ,"fsl,ipic" ); -if (!np) -return ; - -ipic_init (np,0 ); - -/* Initialize the default interrupt mapping priorities, -* in case the boot rom changed something on us. -*/ -ipic_set_default_priority (); -} -static const char *board[]__initdata = {"fsl,mpc8377rdb" ,"fsl,mpc8378rdb" ,
@@ -121,7 +105,7 @@ define_machine(mpc837x_rdb) { .name = "MPC837x RDB/WLAN", .probe = mpc837x_rdb_probe, .setup_arch = mpc837x_rdb_setup_arch, - .init_IRQ = mpc837x_rdb_init_IRQ, + .init_IRQ = mpc83xx_ipic_init_IRQ, .get_irq = ipic_get_irq, .restart = mpc83xx_restart, .time_init = mpc83xx_time_init,
arch/powerpc/platforms/83xx/mpc83xx.h +9 -0
@@ -70,5 +70,14 @@ extern long mpc83xx_time_init(void);extern int mpc837x_usb_cfg (void );extern int mpc834x_usb_cfg (void );extern int mpc831x_usb_cfg (void ); +extern void mpc83xx_ipic_init_IRQ (void ); +#ifdef CONFIG_QUICC_ENGINE +extern void mpc83xx_qe_init_IRQ (void ); +extern void mpc83xx_both_init_IRQ (void ); +#else +static inline void __init mpc83xx_qe_init_IRQ (void ) {} +#define mpc83xx_both_init_IRQ mpc83xx_ipic_init_IRQ +#endif /* CONFIG_QUICC_ENGINE */ +#endif /* __MPC83XX_H__ */
arch/powerpc/platforms/83xx/sbc834x.c +1 -19
@@ -62,24 +62,6 @@ static void __init sbc834x_setup_arch(void) } -static void __init sbc834x_init_IRQ (void ) -{ -struct device_node *np; - - np =of_find_node_by_type (NULL ,"ipic" ); -if (!np) -return ; - -ipic_init (np,0 ); - -/* Initialize the default interrupt mapping priorities, -* in case the boot rom changed something on us. -*/ -ipic_set_default_priority (); - -of_node_put (np); -} -static struct __initdata of_device_id sbc834x_ids[] = { { .type ="soc" , }, { .compatible ="soc" , },
@@ -109,7 +91,7 @@ define_machine(sbc834x) { .name = "SBC834x", .probe = sbc834x_probe, .setup_arch = sbc834x_setup_arch, - .init_IRQ = sbc834x_init_IRQ, + .init_IRQ = mpc83xx_ipic_init_IRQ, .get_irq = ipic_get_irq, .restart = mpc83xx_restart, .time_init = mpc83xx_time_init,
Signature · 1 line
1.7.2.5
PATCH 2/14 83xx: consolidate of_platform_bus_probe calls
In reply to Dmitry Eremin-Solenikov83xx board files have a lot of duplication in *_declare_of_platform_devices() functions. Merge that into a single function common to most of the boards.
The only leftover is mpc834x_itx.c board file which explicitly asks for fsl,pq2pro-localbus, as corresponding bindings don't provide "simple-bus" compatibility in localbus node.
--- arch/powerpc/platforms/83xx/asp834x.c | 15 +-------------- arch/powerpc/platforms/83xx/km83xx.c | 18 +----------------- arch/powerpc/platforms/83xx/misc.c | 17 +++++++++++++++++ arch/powerpc/platforms/83xx/mpc830x_rdb.c | 13 +------------ arch/powerpc/platforms/83xx/mpc831x_rdb.c | 14 +------------- arch/powerpc/platforms/83xx/mpc832x_mds.c | 18 +----------------- arch/powerpc/platforms/83xx/mpc832x_rdb.c | 18 +----------------- arch/powerpc/platforms/83xx/mpc834x_itx.c | 3 +-- arch/powerpc/platforms/83xx/mpc834x_mds.c | 15 +-------------- arch/powerpc/platforms/83xx/mpc836x_mds.c | 18 +----------------- arch/powerpc/platforms/83xx/mpc836x_rdk.c | 11 +---------- arch/powerpc/platforms/83xx/mpc837x_mds.c | 17 +---------------- arch/powerpc/platforms/83xx/mpc837x_rdb.c | 18 +----------------- arch/powerpc/platforms/83xx/mpc83xx.h | 1 + arch/powerpc/platforms/83xx/sbc834x.c | 15 +-------------- 15 files changed, 31 insertions(+), 180 deletions(-)
arch/powerpc/platforms/83xx/asp834x.c +1 -14
@@ -36,20 +36,7 @@ static void __init asp834x_setup_arch(void)mpc834x_usb_cfg (); } -static struct __initdata of_device_id asp8347_ids[] = { - { .type ="soc" , }, - { .compatible ="soc" , }, - { .compatible ="simple-bus" , }, - { .compatible ="gianfar" , }, - {}, -}; - -static int __init asp8347_declare_of_platform_devices (void ) -{ -of_platform_bus_probe (NULL , asp8347_ids,NULL ); -return 0 ; -} -machine_device_initcall (asp834x, asp8347_declare_of_platform_devices); +machine_device_initcall (asp834x, mpc83xx_declare_of_platform_devices);/* * Called very early, MMU is off, device-tree isn't unflattened
arch/powerpc/platforms/83xx/km83xx.c +1 -17
@@ -122,23 +122,7 @@ static void __init mpc83xx_km_setup_arch(void)#endif /* CONFIG_QUICC_ENGINE */ } -static struct of_device_id kmpbec83xx_ids[] = { - { .type ="soc" , }, - { .compatible ="soc" , }, - { .compatible ="simple-bus" , }, - { .type ="qe" , }, - { .compatible ="fsl,qe" , }, - {}, -}; - -static int __init kmeter_declare_of_platform_devices (void ) -{ -/* Publish the QE devices */ -of_platform_bus_probe (NULL , kmpbec83xx_ids,NULL ); - -return 0 ; -} -machine_device_initcall (mpc83xx_km, kmeter_declare_of_platform_devices); +machine_device_initcall (mpc83xx_km, mpc83xx_declare_of_platform_devices);/* list of the supported boards */ static char *board[]__initdata = {
arch/powerpc/platforms/83xx/misc.c +17 -0
@@ -111,3 +111,20 @@ void __init mpc83xx_both_init_IRQ(void) mpc83xx_qe_init_IRQ(); }#endif /* CONFIG_QUICC_ENGINE */ + +static struct of_device_id __initdata of_bus_ids[] = { + { .type ="soc" , }, + { .compatible ="soc" , }, + { .compatible ="simple-bus" }, + { .compatible ="gianfar" }, + { .compatible ="gpio-leds" , }, + { .type ="qe" , }, + { .compatible ="fsl,qe" , }, + {}, +}; + +int __init mpc83xx_declare_of_platform_devices (void ) +{ +of_platform_bus_probe (NULL , of_bus_ids,NULL ); +return 0 ; +}
arch/powerpc/platforms/83xx/mpc830x_rdb.c +1 -12
@@ -56,18 +56,7 @@ static int __init mpc830x_rdb_probe(void)return of_flat_dt_match (of_get_flat_dt_root (), board); } -static struct of_device_id __initdata of_bus_ids[] = { - { .compatible ="simple-bus" }, - { .compatible ="gianfar" }, - {}, -}; - -static int __init declare_of_platform_devices (void ) -{ -of_platform_bus_probe (NULL , of_bus_ids,NULL ); -return 0 ; -} -machine_device_initcall (mpc830x_rdb, declare_of_platform_devices); +machine_device_initcall (mpc830x_rdb, mpc83xx_declare_of_platform_devices);define_machine (mpc830x_rdb) { .name = "MPC830x RDB",
arch/powerpc/platforms/83xx/mpc831x_rdb.c +1 -13
@@ -58,19 +58,7 @@ static int __init mpc831x_rdb_probe(void)return of_flat_dt_match (of_get_flat_dt_root (), board); } -static struct of_device_id __initdata of_bus_ids[] = { - { .compatible ="simple-bus" }, - { .compatible ="gianfar" }, - { .compatible ="gpio-leds" , }, - {}, -}; - -static int __init declare_of_platform_devices (void ) -{ -of_platform_bus_probe (NULL , of_bus_ids,NULL ); -return 0 ; -} -machine_device_initcall (mpc831x_rdb, declare_of_platform_devices); +machine_device_initcall (mpc831x_rdb, mpc83xx_declare_of_platform_devices);define_machine (mpc831x_rdb) { .name = "MPC831x RDB",
arch/powerpc/platforms/83xx/mpc832x_mds.c +1 -17
@@ -101,23 +101,7 @@ static void __init mpc832x_sys_setup_arch(void)#endif /* CONFIG_QUICC_ENGINE */ } -static struct of_device_id mpc832x_ids[] = { - { .type ="soc" , }, - { .compatible ="soc" , }, - { .compatible ="simple-bus" , }, - { .type ="qe" , }, - { .compatible ="fsl,qe" , }, - {}, -}; - -static int __init mpc832x_declare_of_platform_devices (void ) -{ -/* Publish the QE devices */ -of_platform_bus_probe (NULL , mpc832x_ids,NULL ); - -return 0 ; -} -machine_device_initcall (mpc832x_mds, mpc832x_declare_of_platform_devices); +machine_device_initcall (mpc832x_mds, mpc83xx_declare_of_platform_devices);/* * Called very early, MMU is off, device-tree isn't unflattened
arch/powerpc/platforms/83xx/mpc832x_rdb.c +1 -17
@@ -218,23 +218,7 @@ static void __init mpc832x_rdb_setup_arch(void)#endif /* CONFIG_QUICC_ENGINE */ } -static struct of_device_id mpc832x_ids[] = { - { .type ="soc" , }, - { .compatible ="soc" , }, - { .compatible ="simple-bus" , }, - { .type ="qe" , }, - { .compatible ="fsl,qe" , }, - {}, -}; - -static int __init mpc832x_declare_of_platform_devices (void ) -{ -/* Publish the QE devices */ -of_platform_bus_probe (NULL , mpc832x_ids,NULL ); - -return 0 ; -} -machine_device_initcall (mpc832x_rdb, mpc832x_declare_of_platform_devices); +machine_device_initcall (mpc832x_rdb, mpc83xx_declare_of_platform_devices);/* * Called very early, MMU is off, device-tree isn't unflattened
arch/powerpc/platforms/83xx/mpc834x_itx.c +1 -2
@@ -41,13 +41,12 @@static struct of_device_id __initdata mpc834x_itx_ids[] = { { .compatible ="fsl,pq2pro-localbus" , }, - { .compatible ="simple-bus" , }, - { .compatible ="gianfar" , }, {}, };static int __init mpc834x_itx_declare_of_platform_devices (void ) { +mpc83xx_declare_of_platform_devices ();return of_platform_bus_probe (NULL , mpc834x_itx_ids,NULL ); }machine_device_initcall (mpc834x_itx, mpc834x_itx_declare_of_platform_devices);
arch/powerpc/platforms/83xx/mpc834x_mds.c +1 -14
@@ -92,20 +92,7 @@ static void __init mpc834x_mds_setup_arch(void)mpc834xemds_usb_cfg (); } -static struct of_device_id mpc834x_ids[] = { - { .type ="soc" , }, - { .compatible ="soc" , }, - { .compatible ="simple-bus" , }, - { .compatible ="gianfar" , }, - {}, -}; - -static int __init mpc834x_declare_of_platform_devices (void ) -{ -of_platform_bus_probe (NULL , mpc834x_ids,NULL ); -return 0 ; -} -machine_device_initcall (mpc834x_mds, mpc834x_declare_of_platform_devices); +machine_device_initcall (mpc834x_mds, mpc83xx_declare_of_platform_devices);/* * Called very early, MMU is off, device-tree isn't unflattened
arch/powerpc/platforms/83xx/mpc836x_mds.c +1 -17
@@ -144,23 +144,7 @@ static void __init mpc836x_mds_setup_arch(void)#endif /* CONFIG_QUICC_ENGINE */ } -static struct of_device_id mpc836x_ids[] = { - { .type ="soc" , }, - { .compatible ="soc" , }, - { .compatible ="simple-bus" , }, - { .type ="qe" , }, - { .compatible ="fsl,qe" , }, - {}, -}; - -static int __init mpc836x_declare_of_platform_devices (void ) -{ -/* Publish the QE devices */ -of_platform_bus_probe (NULL , mpc836x_ids,NULL ); - -return 0 ; -} -machine_device_initcall (mpc836x_mds, mpc836x_declare_of_platform_devices); +machine_device_initcall (mpc836x_mds, mpc83xx_declare_of_platform_devices);#ifdef CONFIG_QE_USB static int __init mpc836x_usb_cfg (void )
arch/powerpc/platforms/83xx/mpc836x_rdk.c +1 -10
@@ -27,16 +27,7 @@#include "mpc83xx.h" -static struct of_device_id __initdata mpc836x_rdk_ids[] = { - { .compatible ="simple-bus" , }, - {}, -}; - -static int __init mpc836x_rdk_declare_of_platform_devices (void ) -{ -return of_platform_bus_probe (NULL , mpc836x_rdk_ids,NULL ); -} -machine_device_initcall (mpc836x_rdk, mpc836x_rdk_declare_of_platform_devices); +machine_device_initcall (mpc836x_rdk, mpc83xx_declare_of_platform_devices);static void __init mpc836x_rdk_setup_arch (void ) {
arch/powerpc/platforms/83xx/mpc837x_mds.c +1 -16
@@ -95,22 +95,7 @@ static void __init mpc837x_mds_setup_arch(void)mpc837xmds_usb_cfg (); } -static struct of_device_id mpc837x_ids[] = { - { .type ="soc" , }, - { .compatible ="soc" , }, - { .compatible ="simple-bus" , }, - { .compatible ="gianfar" , }, - {}, -}; - -static int __init mpc837x_declare_of_platform_devices (void ) -{ -/* Publish platform_device */ -of_platform_bus_probe (NULL , mpc837x_ids,NULL ); - -return 0 ; -} -machine_device_initcall (mpc837x_mds, mpc837x_declare_of_platform_devices); +machine_device_initcall (mpc837x_mds, mpc83xx_declare_of_platform_devices);/* * Called very early, MMU is off, device-tree isn't unflattened
arch/powerpc/platforms/83xx/mpc837x_rdb.c +1 -17
@@ -67,23 +67,7 @@ static void __init mpc837x_rdb_setup_arch(void)mpc837x_rdb_sd_cfg (); } -static struct of_device_id mpc837x_ids[] = { - { .type ="soc" , }, - { .compatible ="soc" , }, - { .compatible ="simple-bus" , }, - { .compatible ="gianfar" , }, - { .compatible ="gpio-leds" , }, - {}, -}; - -static int __init mpc837x_declare_of_platform_devices (void ) -{ -/* Publish platform_device */ -of_platform_bus_probe (NULL , mpc837x_ids,NULL ); - -return 0 ; -} -machine_device_initcall (mpc837x_rdb, mpc837x_declare_of_platform_devices); +machine_device_initcall (mpc837x_rdb, mpc83xx_declare_of_platform_devices);static const char *board[]__initdata = {"fsl,mpc8377rdb" ,
arch/powerpc/platforms/83xx/mpc83xx.h +1 -0
@@ -79,5 +79,6 @@ static inline void __init mpc83xx_qe_init_IRQ(void) {}#define mpc83xx_both_init_IRQ mpc83xx_ipic_init_IRQ#endif /* CONFIG_QUICC_ENGINE */ +extern int mpc83xx_declare_of_platform_devices (void );#endif /* __MPC83XX_H__ */
arch/powerpc/platforms/83xx/sbc834x.c +1 -14
@@ -62,20 +62,7 @@ static void __init sbc834x_setup_arch(void) } -static struct __initdata of_device_id sbc834x_ids[] = { - { .type ="soc" , }, - { .compatible ="soc" , }, - { .compatible ="simple-bus" , }, - { .compatible ="gianfar" , }, - {}, -}; - -static int __init sbc834x_declare_of_platform_devices (void ) -{ -of_platform_bus_probe (NULL , sbc834x_ids,NULL ); -return 0 ; -} -machine_device_initcall (sbc834x, sbc834x_declare_of_platform_devices); +machine_device_initcall (sbc834x, mpc83xx_declare_of_platform_devices);/* * Called very early, MMU is off, device-tree isn't unflattened
Signature · 1 line
1.7.2.5
PATCH 3/14 mpc8349emitx: mark localbus as compatible with simple-bus
In reply to Dmitry Eremin-Solenikov--- arch/powerpc/boot/dts/mpc8349emitx.dts | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
arch/powerpc/boot/dts/mpc8349emitx.dts +2 -1
@@ -390,7 +390,8 @@ #address-cells = <2>; #size-cells = <1>; compatible = "fsl,mpc8349e-localbus", - "fsl,pq2pro-localbus"; + "fsl,pq2pro-localbus", + "simple-bus"; reg = <0xe0005000 0xd8>; ranges = <0x0 0x0 0xfe000000 0x1000000 /* flash */ 0x1 0x0 0xf8000000 0x20000 /* VSC 7385 */
Signature · 1 line
1.7.2.5
PATCH 5/14 83xx: headers cleanup
In reply to Dmitry Eremin-SolenikovDrop lots of unused headers after board files merge/splitup
--- arch/powerpc/platforms/83xx/asp834x.c | 2 - arch/powerpc/platforms/83xx/km83xx.c | 24 +------------------ arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c | 5 ---- arch/powerpc/platforms/83xx/misc.c | 1 - arch/powerpc/platforms/83xx/mpc830x_rdb.c | 5 +-- arch/powerpc/platforms/83xx/mpc831x_rdb.c | 2 - arch/powerpc/platforms/83xx/mpc832x_mds.c | 30 ------------------------ arch/powerpc/platforms/83xx/mpc832x_rdb.c | 11 -------- arch/powerpc/platforms/83xx/mpc834x_itx.c | 20 ---------------- arch/powerpc/platforms/83xx/mpc834x_mds.c | 20 ---------------- arch/powerpc/platforms/83xx/mpc836x_mds.c | 29 ----------------------- arch/powerpc/platforms/83xx/mpc836x_rdk.c | 8 +----- arch/powerpc/platforms/83xx/mpc837x_mds.c | 4 --- arch/powerpc/platforms/83xx/mpc837x_rdb.c | 2 - arch/powerpc/platforms/83xx/sbc834x.c | 20 ---------------- arch/powerpc/platforms/83xx/suspend.c | 8 ------ arch/powerpc/platforms/83xx/usb.c | 8 ------ 17 files changed, 4 insertions(+), 195 deletions(-)
arch/powerpc/platforms/83xx/asp834x.c +0 -2
@@ -14,10 +14,8 @@* option) any later version. */ -#include <linux/pci.h> #include <linux/of_platform.h> -#include <asm/time.h> #include <asm/ipic.h> #include <asm/udbg.h>
arch/powerpc/platforms/83xx/km83xx.c +2 -24
@@ -11,35 +11,13 @@* option) any later version. */ -#include <linux/stddef.h> #include <linux/kernel.h> -#include <linux/init.h> -#include <linux/errno.h> -#include <linux/reboot.h> #include <linux/pci.h> -#include <linux/kdev_t.h> -#include <linux/major.h> -#include <linux/console.h> -#include <linux/delay.h> -#include <linux/seq_file.h> -#include <linux/root_dev.h> -#include <linux/initrd.h> -#include <linux/of_platform.h> -#include <linux/of_device.h> - -#include <asm/system.h> -#include <asm/atomic.h> -#include <asm/time.h> -#include <asm/io.h> -#include <asm/machdep.h> +#include <asm/ipic.h> -#include <asm/irq.h> -#include <asm/prom.h> #include <asm/udbg.h> -#include <sysdev/fsl_soc.h> -#include <sysdev/fsl_pci.h> #include <asm/qe.h> -#include <asm/qe_ic.h> +#include <sysdev/fsl_pci.h> #include "mpc83xx.h"
arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c +0 -5
@@ -11,17 +11,12 @@* (at your option) any later version. */ -#include <linux/init.h> #include <linux/kernel.h> #include <linux/module.h> -#include <linux/device.h> -#include <linux/mutex.h> #include <linux/i2c.h> -#include <linux/gpio.h> #include <linux/of.h> #include <linux/of_gpio.h> #include <linux/slab.h> -#include <asm/prom.h> #include <asm/machdep.h> /*
arch/powerpc/platforms/83xx/misc.c +0 -1
@@ -9,7 +9,6 @@* option) any later version. */ -#include <linux/stddef.h> #include <linux/kernel.h> #include <linux/of_platform.h>
arch/powerpc/platforms/83xx/mpc830x_rdb.c +2 -3
@@ -14,12 +14,11 @@*/ #include <linux/pci.h> -#include <linux/of_platform.h> -#include <asm/time.h> +#include <asm/ipic.h> #include <asm/udbg.h> #include <sysdev/fsl_pci.h> -#include <sysdev/fsl_soc.h> +#include "mpc83xx.h" /*
arch/powerpc/platforms/83xx/mpc831x_rdb.c +0 -2
@@ -14,9 +14,7 @@*/ #include <linux/pci.h> -#include <linux/of_platform.h> -#include <asm/time.h> #include <asm/ipic.h> #include <asm/udbg.h> #include <sysdev/fsl_pci.h>
arch/powerpc/platforms/83xx/mpc832x_mds.c +1 -31
@@ -10,45 +10,15 @@* option) any later version. */ -#include <linux/stddef.h> -#include <linux/kernel.h> -#include <linux/init.h> -#include <linux/errno.h> -#include <linux/reboot.h> #include <linux/pci.h> -#include <linux/kdev_t.h> -#include <linux/major.h> -#include <linux/console.h> -#include <linux/delay.h> -#include <linux/seq_file.h> -#include <linux/root_dev.h> -#include <linux/initrd.h> -#include <linux/of_platform.h> -#include <linux/of_device.h> - -#include <asm/system.h> -#include <asm/atomic.h> -#include <asm/time.h> -#include <asm/io.h> -#include <asm/machdep.h> +#include <asm/ipic.h> -#include <asm/irq.h> -#include <asm/prom.h> #include <asm/udbg.h> -#include <sysdev/fsl_soc.h> #include <sysdev/fsl_pci.h> #include <asm/qe.h> -#include <asm/qe_ic.h> #include "mpc83xx.h" -#undef DEBUG -#ifdef DEBUG -#define DBG(fmt...) udbg_printf(fmt) -#else -#define DBG(fmt...) -#endif -/* ************************************************************************ * * Setup the architecture
arch/powerpc/platforms/83xx/mpc832x_rdb.c +0 -11
@@ -15,30 +15,19 @@*/ #include <linux/pci.h> -#include <linux/interrupt.h> #include <linux/spi/spi.h> #include <linux/spi/mmc_spi.h> #include <linux/mmc/host.h> -#include <linux/of_platform.h> #include <linux/fsl_devices.h> -#include <asm/time.h> #include <asm/ipic.h> #include <asm/udbg.h> #include <asm/qe.h> -#include <asm/qe_ic.h> #include <sysdev/fsl_soc.h> #include <sysdev/fsl_pci.h> #include "mpc83xx.h" -#undef DEBUG -#ifdef DEBUG -#define DBG(fmt...) udbg_printf(fmt) -#else -#define DBG(fmt...) -#endif -#ifdef CONFIG_QUICC_ENGINE static int __init of_fsl_spi_probe(char *type, char *compatible, u32 sysclk, struct spi_board_info *board_infos,
arch/powerpc/platforms/83xx/mpc834x_itx.c +0 -20
@@ -11,30 +11,10 @@* option) any later version. */ -#include <linux/stddef.h> -#include <linux/kernel.h> -#include <linux/init.h> -#include <linux/errno.h> -#include <linux/reboot.h> #include <linux/pci.h> -#include <linux/kdev_t.h> -#include <linux/major.h> -#include <linux/console.h> -#include <linux/delay.h> -#include <linux/seq_file.h> -#include <linux/root_dev.h> -#include <linux/of_platform.h> -#include <asm/system.h> -#include <asm/atomic.h> -#include <asm/time.h> -#include <asm/io.h> -#include <asm/machdep.h> #include <asm/ipic.h> -#include <asm/irq.h> -#include <asm/prom.h> #include <asm/udbg.h> -#include <sysdev/fsl_soc.h> #include <sysdev/fsl_pci.h> #include "mpc83xx.h"
arch/powerpc/platforms/83xx/mpc834x_mds.c +0 -20
@@ -11,30 +11,10 @@* option) any later version. */ -#include <linux/stddef.h> -#include <linux/kernel.h> -#include <linux/init.h> -#include <linux/errno.h> -#include <linux/reboot.h> #include <linux/pci.h> -#include <linux/kdev_t.h> -#include <linux/major.h> -#include <linux/console.h> -#include <linux/delay.h> -#include <linux/seq_file.h> -#include <linux/root_dev.h> -#include <linux/of_platform.h> -#include <asm/system.h> -#include <asm/atomic.h> -#include <asm/time.h> -#include <asm/io.h> -#include <asm/machdep.h> #include <asm/ipic.h> -#include <asm/irq.h> -#include <asm/prom.h> #include <asm/udbg.h> -#include <sysdev/fsl_soc.h> #include <sysdev/fsl_pci.h> #include "mpc83xx.h"
arch/powerpc/platforms/83xx/mpc836x_mds.c +1 -30
@@ -16,31 +16,9 @@* option) any later version. */ -#include <linux/stddef.h> -#include <linux/kernel.h> -#include <linux/compiler.h> -#include <linux/init.h> -#include <linux/errno.h> -#include <linux/reboot.h> #include <linux/pci.h> -#include <linux/kdev_t.h> -#include <linux/major.h> -#include <linux/console.h> -#include <linux/delay.h> -#include <linux/seq_file.h> -#include <linux/root_dev.h> -#include <linux/initrd.h> -#include <linux/of_platform.h> -#include <linux/of_device.h> - -#include <asm/system.h> -#include <asm/atomic.h> -#include <asm/time.h> -#include <asm/io.h> -#include <asm/machdep.h> +#include <asm/ipic.h> -#include <asm/irq.h> -#include <asm/prom.h> #include <asm/udbg.h> #include <sysdev/fsl_soc.h> #include <sysdev/fsl_pci.h>
@@ -50,13 +28,6 @@#include "mpc83xx.h" -#undef DEBUG -#ifdef DEBUG -#define DBG(fmt...) udbg_printf(fmt) -#else -#define DBG(fmt...) -#endif -/* ************************************************************************ * * Setup the architecture
arch/powerpc/platforms/83xx/mpc836x_rdk.c +1 -7
@@ -12,17 +12,11 @@* option) any later version. */ -#include <linux/kernel.h> #include <linux/pci.h> -#include <linux/of_platform.h> -#include <linux/io.h> -#include <asm/prom.h> -#include <asm/time.h> +#include <asm/ipic.h> #include <asm/udbg.h> #include <asm/qe.h> -#include <asm/qe_ic.h> -#include <sysdev/fsl_soc.h> #include <sysdev/fsl_pci.h> #include "mpc83xx.h"
arch/powerpc/platforms/83xx/mpc837x_mds.c +0 -4
@@ -12,13 +12,9 @@*/ #include <linux/pci.h> -#include <linux/of.h> -#include <linux/of_platform.h> -#include <asm/time.h> #include <asm/ipic.h> #include <asm/udbg.h> -#include <asm/prom.h> #include <sysdev/fsl_pci.h> #include "mpc83xx.h"
arch/powerpc/platforms/83xx/mpc837x_rdb.c +0 -2
@@ -12,9 +12,7 @@*/ #include <linux/pci.h> -#include <linux/of_platform.h> -#include <asm/time.h> #include <asm/ipic.h> #include <asm/udbg.h> #include <sysdev/fsl_soc.h>
arch/powerpc/platforms/83xx/sbc834x.c +0 -20
@@ -13,30 +13,10 @@* option) any later version. */ -#include <linux/stddef.h> -#include <linux/kernel.h> -#include <linux/init.h> -#include <linux/errno.h> -#include <linux/reboot.h> #include <linux/pci.h> -#include <linux/kdev_t.h> -#include <linux/major.h> -#include <linux/console.h> -#include <linux/delay.h> -#include <linux/seq_file.h> -#include <linux/root_dev.h> -#include <linux/of_platform.h> -#include <asm/system.h> -#include <asm/atomic.h> -#include <asm/time.h> -#include <asm/io.h> -#include <asm/machdep.h> #include <asm/ipic.h> -#include <asm/irq.h> -#include <asm/prom.h> #include <asm/udbg.h> -#include <sysdev/fsl_soc.h> #include <sysdev/fsl_pci.h> #include "mpc83xx.h"
arch/powerpc/platforms/83xx/suspend.c +0 -8
@@ -10,21 +10,13 @@* by the Free Software Foundation. */ -#include <linux/init.h> -#include <linux/pm.h> -#include <linux/types.h> -#include <linux/ioport.h> #include <linux/interrupt.h> #include <linux/wait.h> #include <linux/kthread.h> #include <linux/freezer.h> #include <linux/suspend.h> -#include <linux/fsl_devices.h> #include <linux/of_platform.h> -#include <asm/reg.h> -#include <asm/io.h> -#include <asm/time.h> #include <asm/mpc6xx.h> #include <sysdev/fsl_soc.h>
arch/powerpc/platforms/83xx/usb.c +0 -8
@@ -10,14 +10,6 @@* option) any later version. */ - -#include <linux/stddef.h> -#include <linux/kernel.h> -#include <linux/errno.h> -#include <linux/of.h> - -#include <asm/io.h> -#include <asm/prom.h> #include <sysdev/fsl_soc.h> #include "mpc83xx.h"
Signature · 1 line
1.7.2.5
PATCH 4/14 83xx/mpc834x_itx: drop pq2pro-localbus-specific code
In reply to Dmitry Eremin-SolenikovAs localbus on mpc8349e-mitx now provides simple-bus compatibility, we can drop code asking for pq2pro-localbus devices on mpc834x_itx boards.
--- arch/powerpc/platforms/83xx/mpc834x_itx.c | 12 +----------- 1 files changed, 1 insertions(+), 11 deletions(-)
arch/powerpc/platforms/83xx/mpc834x_itx.c +1 -11
@@ -39,17 +39,7 @@#include "mpc83xx.h" -static struct of_device_id __initdata mpc834x_itx_ids[] = { - { .compatible ="fsl,pq2pro-localbus" , }, - {}, -}; - -static int __init mpc834x_itx_declare_of_platform_devices (void ) -{ -mpc83xx_declare_of_platform_devices (); -return of_platform_bus_probe (NULL , mpc834x_itx_ids,NULL ); -} -machine_device_initcall (mpc834x_itx, mpc834x_itx_declare_of_platform_devices); +machine_device_initcall (mpc834x_itx, mpc83xx_declare_of_platform_devices);/* ************************************************************************ *
Signature · 1 line
1.7.2.5
PATCH 6/14 85xx/sbc8560: correct compilation if CONFIG_PHYS_ADDR_T_64BIT is set
In reply to Dmitry Eremin-SolenikovIf CONFIG_PHYS_ADDR_T_64BIT is set, compilation of sbc8560 fails with the following error:
arch/powerpc/platforms/85xx/sbc8560.c: In function ‘sbc8560_bdrstcr_init’:arch/powerpc/platforms/85xx/sbc8560.c:286: error: format ‘%x’ expects type ‘unsigned int’, but argument 2 has type ‘resource_size_t’
Fix that by using %pR format instead of just printing the start of resource.
--- arch/powerpc/platforms/85xx/sbc8560.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/powerpc/platforms/85xx/sbc8560.c +1 -1
@@ -283,7 +283,7 @@ static int __init sbc8560_bdrstcr_init(void)of_address_to_resource (np,0 , &res); -printk (KERN_INFO "sbc8560: Found BRSTCR at i/o 0x%x\n" , res.start); +printk (KERN_INFO "sbc8560: Found BRSTCR at %pR\n" , &res); brstcr =ioremap (res.start, res.end - res.start);if (!brstcr)
Signature · 1 line
1.7.2.5
PATCH 8/14 85xx/sbc8560: declare that localbus is compatbile with simple-bus
In reply to Dmitry Eremin-Solenikov--- arch/powerpc/boot/dts/sbc8560.dts | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/powerpc/boot/dts/sbc8560.dts +1 -1
@@ -331,7 +331,7 @@ }; localbus@ff705000 { - compatible = "fsl,mpc8560-localbus"; + compatible = "fsl,mpc8560-localbus", "simple-bus"; #address-cells = <2>; #size-cells = <1>; reg = <0xff705000 0x100>; // BRx, ORx, etc.
Signature · 1 line
1.7.2.5
PATCH 7/14 85xx/ksi8560: declare that localbus is compatbile with simple-bus
In reply to Dmitry Eremin-Solenikov--- arch/powerpc/boot/dts/ksi8560.dts | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/powerpc/boot/dts/ksi8560.dts +1 -1
@@ -306,7 +306,7 @@ localbus@fdf05000 { #address-cells = <2>; #size-cells = <1>; - compatible = "fsl,mpc8560-localbus"; + compatible = "fsl,mpc8560-localbus", "simple-bus"; reg = <0xfdf05000 0x68>; ranges = <0x0 0x0 0xe0000000 0x00800000
Signature · 1 line
1.7.2.5
PATCH 10/14 85xx/mpc85xx_rdb: merge p1020_rdb and p2020_rdb machine entries
In reply to Dmitry Eremin-Solenikovp1020_rdb and p2020_rdb machine entries bear no in-kernel differencies other than dt compatible strings. Merge them into single machine entry named mpc85xx_rdb
--- arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 40 ++++++---------------------- 1 files changed, 9 insertions(+), 31 deletions(-)
arch/powerpc/platforms/85xx/mpc85xx_rdb.c +9 -31
@@ -120,47 +120,25 @@ static int __init mpc85xxrdb_publish_devices(void) {return of_platform_bus_probe (NULL , mpc85xxrdb_ids,NULL ); } -machine_device_initcall (p2020_rdb, mpc85xxrdb_publish_devices); -machine_device_initcall (p1020_rdb, mpc85xxrdb_publish_devices); +machine_device_initcall (mpc85xx_rdb, mpc85xxrdb_publish_devices);/* * Called very early, device-tree isn't unflattened */ -static int __init p2020_rdb_probe (void ) +static int __init mpc85xx_rdb_probe (void ) {unsigned long root =of_get_flat_dt_root (); -if (of_flat_dt_is_compatible (root,"fsl,P2020RDB" )) +if (of_flat_dt_is_compatible (root,"fsl,P1020RDB" ) || +of_flat_dt_is_compatible (root,"fsl,P2020RDB" )) {return 1 ; -return 0 ; + }else +return 0 ; } -static int __init p1020_rdb_probe (void ) -{ -unsigned long root =of_get_flat_dt_root (); - -if (of_flat_dt_is_compatible (root,"fsl,P1020RDB" )) -return 1 ; -return 0 ; -} - -define_machine (p2020_rdb) { - .name = "P2020 RDB", - .probe = p2020_rdb_probe, - .setup_arch = mpc85xx_rdb_setup_arch, - .init_IRQ = mpc85xx_rdb_pic_init, -#ifdef CONFIG_PCI - .pcibios_fixup_bus = fsl_pcibios_fixup_bus, -#endif - .get_irq = mpic_get_irq, - .restart = fsl_rstcr_restart, - .calibrate_decr = generic_calibrate_decr, - .progress = udbg_progress, -}; - -define_machine (p1020_rdb) { - .name = "P1020 RDB", - .probe = p1020_rdb_probe, +define_machine (mpc85xx_rdb) { + .name = "MPC85xx RDB", + .probe = mpc85xx_rdb_probe, .setup_arch = mpc85xx_rdb_setup_arch, .init_IRQ = mpc85xx_rdb_pic_init,#ifdef CONFIG_PCI
Signature · 1 line
1.7.2.5
PATCH 9/14 85xx/sbc8548: read hardware revision when it's required for first time
In reply to Dmitry Eremin-SolenikovCurrently sbc8548 reads hardware revision during bootup. To simplify things read it when it's first required when the kernel is up and running.
--- arch/powerpc/platforms/85xx/sbc8548.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-)
arch/powerpc/platforms/85xx/sbc8548.c +5 -3
@@ -49,7 +49,7 @@#include <sysdev/fsl_soc.h> #include <sysdev/fsl_pci.h> -static int sbc_rev; +static int sbc_rev = -EINVAL ;static void __init sbc8548_pic_init (void ) {
@@ -82,7 +82,7 @@ static void __init sbc8548_pic_init(void) }/* Extract the HW Rev from the EPLD on the board */ -static int __init sbc8548_hw_rev (void ) +static int sbc8548_hw_rev (void ) {struct device_node *np;struct resource res;
@@ -130,7 +130,6 @@ static void __init sbc8548_setup_arch(void) } }#endif - sbc_rev =sbc8548_hw_rev (); }static void sbc8548_show_cpuinfo (struct seq_file *m)
@@ -140,6 +139,9 @@ static void sbc8548_show_cpuinfo(struct seq_file *m) pvid =mfspr (SPRN_PVR ); svid =mfspr (SPRN_SVR ); +if (sbc_rev == -EINVAL ) + sbc_rev =sbc8548_hw_rev (); +seq_printf (m,"Vendor\t\t: Wind River\n" );seq_printf (m,"Machine\t\t: SBC8548 v%d\n" , sbc_rev);seq_printf (m,"PVR\t\t: 0x%x\n" , pvid);
Signature · 1 line
1.7.2.5
PATCH 11/14 85xx: merge 32-bit QorIQ with DPA boards support
In reply to Dmitry Eremin-SolenikovBoard support files for p4080ds, p3041ds and p2040rdb don't differ at all (all differencies are hidden in dts files). So merge them into single board file containing all necessary stuff.
---
arch/powerpc/platforms/85xx/Kconfig | 32 +------
arch/powerpc/platforms/85xx/Makefile | 4 +-
arch/powerpc/platforms/85xx/p2040_rdb.c | 88 -------------------
arch/powerpc/platforms/85xx/p3041_ds.c | 90 --------------------
.../platforms/85xx/{p4080_ds.c => qoriq_dpa_ds.c} | 24 +++--
5 files changed, 20 insertions(+), 218 deletions(-)
delete mode 100644 arch/powerpc/platforms/85xx/p2040_rdb.c
delete mode 100644 arch/powerpc/platforms/85xx/p3041_ds.c
rename arch/powerpc/platforms/85xx/{p4080_ds.c => qoriq_dpa_ds.c} (72%)arch/powerpc/platforms/85xx/Kconfig +5 -27
@@ -171,8 +171,8 @@ config SBC8560 help This option enables support for the Wind River SBC8560 board -config P2040_RDB - bool "Freescale P2040 RDB" +config QORIQ_DPA_DS + bool "Freescale QorIQ with DPA development systems" select DEFAULT_UIMAGE select PPC_E500MC select PHYS_64BIT
@@ -181,31 +181,9 @@ config P2040_RDB select HAS_RAPIDIO select PPC_EPAPR_HV_PIC help - This option enables support for the P2040 RDB board - -config P3041_DS - bool "Freescale P3041 DS" - select DEFAULT_UIMAGE - select PPC_E500MC - select PHYS_64BIT - select SWIOTLB - select MPC8xxx_GPIO - select HAS_RAPIDIO - select PPC_EPAPR_HV_PIC - help - This option enables support for the P3041 DS board - -config P4080_DS - bool "Freescale P4080 DS" - select DEFAULT_UIMAGE - select PPC_E500MC - select PHYS_64BIT - select SWIOTLB - select MPC8xxx_GPIO - select HAS_RAPIDIO - select PPC_EPAPR_HV_PIC - help - This option enables support for the P4080 DS board + This option enables support for the Freescale boards + based on the QorIQ CPU with DPA: P2040 RDB, P3041 DS and + P4080 DS boards endif # PPC32
arch/powerpc/platforms/85xx/Makefile +1 -3
@@ -13,9 +13,7 @@ obj-$(CONFIG_MPC85xx_RDB) += mpc85xx_rdb.o obj-$(CONFIG_P1010_RDB) += p1010rdb.o obj-$(CONFIG_P1022_DS) += p1022_ds.o obj-$(CONFIG_P1023_RDS) += p1023_rds.o -obj-$(CONFIG_P2040_RDB) += p2040_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_QORIQ_DPA_DS) += qoriq_dpa_ds.o corenet_ds.o obj-$(CONFIG_P5020_DS) += p5020_ds.o corenet_ds.o obj-$(CONFIG_STX_GP3) += stx_gp3.o obj-$(CONFIG_TQM85xx) += tqm85xx.o
arch/powerpc/platforms/85xx/p2040_rdb.c deleted +0 -88
88 lines not on this page · raw message
arch/powerpc/platforms/85xx/p3041_ds.c deleted +0 -90
90 lines not on this page · raw message
arch/powerpc/platforms/85xx/qoriq_dpa_ds.c renamed from arch/powerpc/platforms/85xx/p4080_ds.c +14 -10
@@ -1,9 +1,9 @@/* -* P4080 DS Setup +* Setup for Freescale boards based on QorIQ with DPA * * Maintained by Kumar Gala (see MAINTAINERS for contact information) * -* Copyright 2009 Freescale Semiconductor Inc. +* Copyright 2009-2011 Freescale Semiconductor Inc. * * 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
@@ -36,18 +36,22 @@/* * Called very early, device-tree isn't unflattened */ -static int __init p4080_ds_probe (void ) +static int __init qoriq_dpa_probe (void ) {unsigned long root =of_get_flat_dt_root ();#ifdef CONFIG_SMP extern struct smp_ops_t smp_85xx_ops;#endif -if (of_flat_dt_is_compatible (root,"fsl,P4080DS" )) +if (of_flat_dt_is_compatible (root,"fsl,P2040RDB" ) || +of_flat_dt_is_compatible (root,"fsl,P3041DS" ) || +of_flat_dt_is_compatible (root,"fsl,P4080DS" )) {return 1 ;/* Check if we're running under the Freescale hypervisor */ -if (of_flat_dt_is_compatible (root,"fsl,P4080DS-hv" )) { +if (of_flat_dt_is_compatible (root,"fsl,P2040RDB-hv" ) || +of_flat_dt_is_compatible (root,"fsl,P3041DS-hv" ) || +of_flat_dt_is_compatible (root,"fsl,P4080DS-hv" )) { ppc_md.init_IRQ = ehv_pic_init; ppc_md.get_irq = ehv_pic_get_irq; ppc_md.restart = fsl_hv_restart;
@@ -67,9 +71,9 @@ static int __init p4080_ds_probe(void)return 0 ; } -define_machine (p4080_ds) { - .name = "P4080 DS", - .probe = p4080_ds_probe, +define_machine (qoriq_dpa) { + .name = "QorIQ with DPA DS", + .probe = qoriq_dpa_probe, .setup_arch = corenet_ds_setup_arch, .init_IRQ = corenet_ds_pic_init,#ifdef CONFIG_PCI
@@ -82,7 +86,7 @@ define_machine(p4080_ds) { .power_save = e500_idle, }; -machine_device_initcall (p4080_ds, corenet_ds_publish_devices); +machine_device_initcall (qoriq_dpa, corenet_ds_publish_devices);#ifdef CONFIG_SWIOTLB -machine_arch_initcall (p4080_ds, swiotlb_setup_bus_notifier); +machine_arch_initcall (qoriq_dpa, swiotlb_setup_bus_notifier);#endif
Signature · 1 line
1.7.2.5
PATCH 12/14 85xx/mpc85xx_ds, ads, cds: move .pci_exclude_device setting to machine definitions
In reply to Dmitry Eremin-Solenikov--- arch/powerpc/platforms/85xx/mpc85xx_ads.c | 5 +++-- arch/powerpc/platforms/85xx/mpc85xx_cds.c | 5 ++--- arch/powerpc/platforms/85xx/mpc85xx_ds.c | 5 +++-- 3 files changed, 8 insertions(+), 7 deletions(-)
arch/powerpc/platforms/85xx/mpc85xx_ads.c +3 -2
@@ -200,8 +200,6 @@ static void __init mpc85xx_ads_setup_arch(void)#ifdef CONFIG_PCI for_each_compatible_node (np,"pci" ,"fsl,mpc8540-pci" )fsl_add_bridge (np,1 ); - - ppc_md.pci_exclude_device = mpc85xx_exclude_device;#endif }
@@ -254,6 +252,9 @@ define_machine(mpc85xx_ads) { .probe = mpc85xx_ads_probe, .setup_arch = mpc85xx_ads_setup_arch, .init_IRQ = mpc85xx_ads_pic_init, +#ifdef CONFIG_PCI + .pci_exclude_device = mpc85xx_exclude_device, +#endif .show_cpuinfo = mpc85xx_ads_show_cpuinfo, .get_irq = mpic_get_irq, .restart = fsl_rstcr_restart,
arch/powerpc/platforms/85xx/mpc85xx_cds.c +2 -3
@@ -297,9 +297,6 @@ static void __init mpc85xx_cds_setup_arch(void) fsl_add_bridge(np, 0); } } - - ppc_md.pci_irq_fixup = mpc85xx_cds_pci_irq_fixup; - ppc_md.pci_exclude_device = mpc85xx_exclude_device;#endif }
@@ -355,6 +352,8 @@ define_machine(mpc85xx_cds) {#ifdef CONFIG_PCI .restart = mpc85xx_cds_restart, .pcibios_fixup_bus = fsl_pcibios_fixup_bus, + .pci_irq_fixup = mpc85xx_cds_pci_irq_fixup, + .pci_exclude_device = mpc85xx_exclude_device, #else .restart = fsl_rstcr_restart,#endif
arch/powerpc/platforms/85xx/mpc85xx_ds.c +3 -2
@@ -182,8 +182,6 @@ static void __init mpc85xx_ds_setup_arch(void) hose->dma_window_size); } } - - ppc_md.pci_exclude_device = mpc85xx_exclude_device;#endif #ifdef CONFIG_SMP
@@ -279,6 +277,7 @@ define_machine(mpc8544_ds) { .init_IRQ = mpc85xx_ds_pic_init, #ifdef CONFIG_PCI .pcibios_fixup_bus = fsl_pcibios_fixup_bus, + .pci_exclude_device = mpc85xx_exclude_device, #endif .get_irq = mpic_get_irq, .restart = fsl_rstcr_restart,
@@ -293,6 +292,7 @@ define_machine(mpc8572_ds) { .init_IRQ = mpc85xx_ds_pic_init, #ifdef CONFIG_PCI .pcibios_fixup_bus = fsl_pcibios_fixup_bus, + .pci_exclude_device = mpc85xx_exclude_device, #endif .get_irq = mpic_get_irq, .restart = fsl_rstcr_restart,
@@ -307,6 +307,7 @@ define_machine(p2020_ds) { .init_IRQ = mpc85xx_ds_pic_init, #ifdef CONFIG_PCI .pcibios_fixup_bus = fsl_pcibios_fixup_bus, + .pci_exclude_device = mpc85xx_exclude_device, #endif .get_irq = mpic_get_irq, .restart = fsl_rstcr_restart,
Signature · 1 line
1.7.2.5
PATCH 13/14 85xx: consolidate of_platform_bus_probe calls
In reply to Dmitry Eremin-Solenikov85xx board files have a lot of duplication in *_publish_devices()/ *_declare_of_platform_devices() functions. Merge that into a single function common to most of the boards.
--- arch/powerpc/platforms/85xx/Makefile | 2 + arch/powerpc/platforms/85xx/ksi8560.c | 18 +--------- arch/powerpc/platforms/85xx/mpc8536_ds.c | 16 ++------- arch/powerpc/platforms/85xx/mpc85xx.h | 4 ++ arch/powerpc/platforms/85xx/mpc85xx_ads.c | 20 ++--------- arch/powerpc/platforms/85xx/mpc85xx_cds.c | 16 ++------- arch/powerpc/platforms/85xx/mpc85xx_common.c | 26 ++++++++++++++ arch/powerpc/platforms/85xx/mpc85xx_ds.c | 20 +++-------- arch/powerpc/platforms/85xx/mpc85xx_mds.c | 46 ++----------------------- arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 16 ++------- arch/powerpc/platforms/85xx/p1022_ds.c | 7 ++-- arch/powerpc/platforms/85xx/sbc8548.c | 18 ++-------- arch/powerpc/platforms/85xx/sbc8560.c | 20 ++--------- arch/powerpc/platforms/85xx/socrates.c | 13 +------ arch/powerpc/platforms/85xx/stx_gp3.c | 16 ++------- arch/powerpc/platforms/85xx/tqm85xx.c | 16 ++------- arch/powerpc/platforms/85xx/xes_mpc85xx.c | 20 +++-------- 17 files changed, 77 insertions(+), 217 deletions(-) create mode 100644 arch/powerpc/platforms/85xx/mpc85xx.h create mode 100644 arch/powerpc/platforms/85xx/mpc85xx_common.c
arch/powerpc/platforms/85xx/Makefile +2 -0
@@ -3,6 +3,8 @@ # obj-$(CONFIG_SMP) += smp.o +obj-y += mpc85xx_common.o + obj-$(CONFIG_MPC8540_ADS) += mpc85xx_ads.o obj-$(CONFIG_MPC8560_ADS) += mpc85xx_ads.o obj-$(CONFIG_MPC85xx_CDS) += mpc85xx_cds.o
arch/powerpc/platforms/85xx/ksi8560.c +2 -16
@@ -35,6 +35,7 @@#include <asm/cpm2.h> #include <sysdev/cpm2_pic.h> +#include "mpc85xx.h" #define KSI8560_CPLD_HVR 0x04/* Hardware Version Register */ #define KSI8560_CPLD_PVR 0x08/* PLD Version Register */
@@ -215,22 +216,7 @@ static void ksi8560_show_cpuinfo(struct seq_file *m)seq_printf (m,"PLL setting\t: 0x%x\n" , ((phid1 >>24 ) &0x3f )); } -static struct of_device_id __initdata of_bus_ids[] = { - { .type ="soc" , }, - { .type ="simple-bus" , }, - { .name ="cpm" , }, - { .name ="localbus" , }, - { .compatible ="gianfar" , }, - {}, -}; - -static int __init declare_of_platform_devices (void ) -{ -of_platform_bus_probe (NULL , of_bus_ids,NULL ); - -return 0 ; -} -machine_device_initcall (ksi8560, declare_of_platform_devices); +machine_device_initcall (ksi8560, mpc85xx_common_publish_devices);/* * Called very early, device-tree isn't unflattened
arch/powerpc/platforms/85xx/mpc8536_ds.c +3 -13
@@ -32,6 +32,8 @@#include <sysdev/fsl_soc.h> #include <sysdev/fsl_pci.h> +#include "mpc85xx.h" +void __init mpc8536_ds_pic_init (void ) {struct mpic *mpic;
@@ -104,19 +106,7 @@ static void __init mpc8536_ds_setup_arch(void)printk ("MPC8536 DS board from Freescale Semiconductor\n" ); } -static struct of_device_id __initdata mpc8536_ds_ids[] = { - { .type ="soc" , }, - { .compatible ="soc" , }, - { .compatible ="simple-bus" , }, - { .compatible ="gianfar" , }, - {}, -}; - -static int __init mpc8536_ds_publish_devices (void ) -{ -return of_platform_bus_probe (NULL , mpc8536_ds_ids,NULL ); -} -machine_device_initcall (mpc8536_ds, mpc8536_ds_publish_devices); +machine_device_initcall (mpc8536_ds, mpc85xx_common_publish_devices);machine_arch_initcall (mpc8536_ds, swiotlb_setup_bus_notifier);
arch/powerpc/platforms/85xx/mpc85xx.h new file +4 -0
@@ -0,0 +1,4 @@ +#ifndef MPC85xx_H +#define MPC85xx_H +extern int mpc85xx_common_publish_devices (void ); +#endif
arch/powerpc/platforms/85xx/mpc85xx_ads.c +3 -17
@@ -35,6 +35,8 @@#include <sysdev/cpm2_pic.h> #endif +#include "mpc85xx.h" +#ifdef CONFIG_PCI static int mpc85xx_exclude_device (struct pci_controller *hose,u_char bus,u_char devfn)
@@ -219,23 +221,7 @@ static void mpc85xx_ads_show_cpuinfo(struct seq_file *m)seq_printf (m,"PLL setting\t: 0x%x\n" , ((phid1 >>24 ) &0x3f )); } -static struct of_device_id __initdata of_bus_ids[] = { - { .name ="soc" , }, - { .type ="soc" , }, - { .name ="cpm" , }, - { .name ="localbus" , }, - { .compatible ="simple-bus" , }, - { .compatible ="gianfar" , }, - {}, -}; - -static int __init declare_of_platform_devices (void ) -{ -of_platform_bus_probe (NULL , of_bus_ids,NULL ); - -return 0 ; -} -machine_device_initcall (mpc85xx_ads, declare_of_platform_devices); +machine_device_initcall (mpc85xx_ads, mpc85xx_common_publish_devices);/* * Called very early, device-tree isn't unflattened
arch/powerpc/platforms/85xx/mpc85xx_cds.c +3 -13
@@ -47,6 +47,8 @@#include <sysdev/fsl_soc.h> #include <sysdev/fsl_pci.h> +#include "mpc85xx.h" +/* CADMUS info */ /* xxx - galak, move into device tree */ #define CADMUS_BASE (0xf8004000)
@@ -328,19 +330,7 @@ static int __init mpc85xx_cds_probe(void)return of_flat_dt_is_compatible (root,"MPC85xxCDS" ); } -static struct of_device_id __initdata of_bus_ids[] = { - { .type ="soc" , }, - { .compatible ="soc" , }, - { .compatible ="simple-bus" , }, - { .compatible ="gianfar" , }, - {}, -}; - -static int __init declare_of_platform_devices (void ) -{ -return of_platform_bus_probe (NULL , of_bus_ids,NULL ); -} -machine_device_initcall (mpc85xx_cds, declare_of_platform_devices); +machine_device_initcall (mpc85xx_cds, mpc85xx_common_publish_devices);define_machine (mpc85xx_cds) { .name = "MPC85xx CDS",
arch/powerpc/platforms/85xx/mpc85xx_common.c new file +26 -0
@@ -0,0 +1,26 @@ +/* +* Routines common to most mpc85xx-based boards. +* +* This is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ +#include <linux/kernel.h> +#include <linux/of_platform.h> + +#include "mpc85xx.h" + +static struct of_device_id __initdata mpc85xx_common_ids[] = { + { .type ="soc" , }, + { .compatible ="soc" , }, + { .compatible ="simple-bus" , }, + { .compatible ="gianfar" , }, + { .compatible ="fsl,qe" , }, + { .compatible ="fsl,cpm2" , }, + {}, +}; + +int __init mpc85xx_common_publish_devices (void ) +{ +return of_platform_bus_probe (NULL , mpc85xx_common_ids,NULL ); +}
arch/powerpc/platforms/85xx/mpc85xx_ds.c +5 -15
@@ -36,6 +36,8 @@#include <sysdev/fsl_soc.h> #include <sysdev/fsl_pci.h> +#include "mpc85xx.h" +#undef DEBUG#ifdef DEBUG
@@ -216,21 +218,9 @@ static int __init mpc8544_ds_probe(void)return 0 ; } -static struct of_device_id __initdata mpc85xxds_ids[] = { - { .type ="soc" , }, - { .compatible ="soc" , }, - { .compatible ="simple-bus" , }, - { .compatible ="gianfar" , }, - {}, -}; - -static int __init mpc85xxds_publish_devices (void ) -{ -return of_platform_bus_probe (NULL , mpc85xxds_ids,NULL ); -} -machine_device_initcall (mpc8544_ds, mpc85xxds_publish_devices); -machine_device_initcall (mpc8572_ds, mpc85xxds_publish_devices); -machine_device_initcall (p2020_ds, mpc85xxds_publish_devices); +machine_device_initcall (mpc8544_ds, mpc85xx_common_publish_devices); +machine_device_initcall (mpc8572_ds, mpc85xx_common_publish_devices); +machine_device_initcall (p2020_ds, mpc85xx_common_publish_devices);machine_arch_initcall (mpc8544_ds, swiotlb_setup_bus_notifier);machine_arch_initcall (mpc8572_ds, swiotlb_setup_bus_notifier);
arch/powerpc/platforms/85xx/mpc85xx_mds.c +4 -42
89 lines not on this page · raw message
arch/powerpc/platforms/85xx/mpc85xx_rdb.c +3 -13
@@ -30,6 +30,8 @@#include <sysdev/fsl_soc.h> #include <sysdev/fsl_pci.h> +#include "mpc85xx.h" +#undef DEBUG#ifdef DEBUG
@@ -108,19 +110,7 @@ static void __init mpc85xx_rdb_setup_arch(void)printk (KERN_INFO "MPC85xx RDB board from Freescale Semiconductor\n" ); } -static struct of_device_id __initdata mpc85xxrdb_ids[] = { - { .type ="soc" , }, - { .compatible ="soc" , }, - { .compatible ="simple-bus" , }, - { .compatible ="gianfar" , }, - {}, -}; - -static int __init mpc85xxrdb_publish_devices (void ) -{ -return of_platform_bus_probe (NULL , mpc85xxrdb_ids,NULL ); -} -machine_device_initcall (mpc85xx_rdb, mpc85xxrdb_publish_devices); +machine_device_initcall (mpc85xx_rdb, mpc85xx_common_publish_devices);/* * Called very early, device-tree isn't unflattened
arch/powerpc/platforms/85xx/p1022_ds.c +3 -4
@@ -27,6 +27,8 @@#include <sysdev/fsl_pci.h> #include <asm/fsl_guts.h> +#include "mpc85xx.h" +#if defined(CONFIG_FB_FSL_DIU ) || defined(CONFIG_FB_FSL_DIU_MODULE )/*
@@ -325,10 +327,6 @@ static void __init p1022_ds_setup_arch(void) }static struct of_device_id __initdata p1022_ds_ids[] = { - { .type ="soc" , }, - { .compatible ="soc" , }, - { .compatible ="simple-bus" , }, - { .compatible ="gianfar" , },/* So that the DMA channel nodes can be probed individually: */ { .compatible ="fsl,eloplus-dma" , }, {},
@@ -338,6 +336,7 @@ static int __init p1022_ds_publish_devices(void) {return of_platform_bus_probe (NULL , p1022_ds_ids,NULL ); } +machine_device_initcall (p1022_ds, mpc85xx_common_publish_devices);machine_device_initcall (p1022_ds, p1022_ds_publish_devices);machine_arch_initcall (p1022_ds, swiotlb_setup_bus_notifier);
arch/powerpc/platforms/85xx/sbc8548.c +3 -15
@@ -49,6 +49,8 @@#include <sysdev/fsl_soc.h> #include <sysdev/fsl_pci.h> +#include "mpc85xx.h" +static int sbc_rev = -EINVAL ;static void __init sbc8548_pic_init (void )
@@ -152,21 +154,7 @@ static void sbc8548_show_cpuinfo(struct seq_file *m)seq_printf (m,"PLL setting\t: 0x%x\n" , ((phid1 >>24 ) &0x3f )); } -static struct of_device_id __initdata of_bus_ids[] = { - { .name ="soc" , }, - { .type ="soc" , }, - { .compatible ="simple-bus" , }, - { .compatible ="gianfar" , }, - {}, -}; - -static int __init declare_of_platform_devices (void ) -{ -of_platform_bus_probe (NULL , of_bus_ids,NULL ); - -return 0 ; -} -machine_device_initcall (sbc8548, declare_of_platform_devices); +machine_device_initcall (sbc8548, mpc85xx_common_publish_devices);/* * Called very early, device-tree isn't unflattened
arch/powerpc/platforms/85xx/sbc8560.c +3 -17
@@ -37,6 +37,8 @@#include <sysdev/cpm2_pic.h> #endif +#include "mpc85xx.h" +#ifdef CONFIG_CPM2 static void cpm2_cascade (unsigned int irq,struct irq_desc *desc)
@@ -208,23 +210,7 @@ static void sbc8560_show_cpuinfo(struct seq_file *m)seq_printf (m,"PLL setting\t: 0x%x\n" , ((phid1 >>24 ) &0x3f )); } -static struct of_device_id __initdata of_bus_ids[] = { - { .name ="soc" , }, - { .type ="soc" , }, - { .name ="cpm" , }, - { .name ="localbus" , }, - { .compatible ="simple-bus" , }, - { .compatible ="gianfar" , }, - {}, -}; - -static int __init declare_of_platform_devices (void ) -{ -of_platform_bus_probe (NULL , of_bus_ids,NULL ); - -return 0 ; -} -machine_device_initcall (sbc8560, declare_of_platform_devices); +machine_device_initcall (sbc8560, mpc85xx_common_publish_devices);/* * Called very early, device-tree isn't unflattened
arch/powerpc/platforms/85xx/socrates.c +2 -11
@@ -41,6 +41,7 @@#include <sysdev/fsl_soc.h> #include <sysdev/fsl_pci.h> +#include "mpc85xx.h" #include "socrates_fpga_pic.h" static void __init socrates_pic_init (void )
@@ -96,17 +97,7 @@ static void __init socrates_setup_arch(void)#endif } -static struct of_device_id __initdata socrates_of_bus_ids[] = { - { .compatible ="simple-bus" , }, - { .compatible ="gianfar" , }, - {}, -}; - -static int __init socrates_publish_devices (void ) -{ -return of_platform_bus_probe (NULL , socrates_of_bus_ids,NULL ); -} -machine_device_initcall (socrates, socrates_publish_devices); +machine_device_initcall (socrates, mpc85xx_common_publish_devices);/* * Called very early, device-tree isn't unflattened
arch/powerpc/platforms/85xx/stx_gp3.c +3 -13
@@ -40,6 +40,8 @@#include <sysdev/fsl_soc.h> #include <sysdev/fsl_pci.h> +#include "mpc85xx.h" +#ifdef CONFIG_CPM2 #include <asm/cpm2.h> #include <sysdev/cpm2_pic.h>
@@ -144,19 +146,7 @@ static void stx_gp3_show_cpuinfo(struct seq_file *m)seq_printf (m,"PLL setting\t: 0x%x\n" , ((phid1 >>24 ) &0x3f )); } -static struct of_device_id __initdata of_bus_ids[] = { - { .compatible ="simple-bus" , }, - { .compatible ="gianfar" , }, - {}, -}; - -static int __init declare_of_platform_devices (void ) -{ -of_platform_bus_probe (NULL , of_bus_ids,NULL ); - -return 0 ; -} -machine_device_initcall (stx_gp3, declare_of_platform_devices); +machine_device_initcall (stx_gp3, mpc85xx_common_publish_devices);/* * Called very early, device-tree isn't unflattened
arch/powerpc/platforms/85xx/tqm85xx.c +3 -13
@@ -38,6 +38,8 @@#include <sysdev/fsl_soc.h> #include <sysdev/fsl_pci.h> +#include "mpc85xx.h" +#ifdef CONFIG_CPM2 #include <asm/cpm2.h> #include <sysdev/cpm2_pic.h>
@@ -173,19 +175,7 @@ static void __init tqm85xx_ti1520_fixup(struct pci_dev *pdev)DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_TI ,PCI_DEVICE_ID_TI_1520 , tqm85xx_ti1520_fixup); -static struct of_device_id __initdata of_bus_ids[] = { - { .compatible ="simple-bus" , }, - { .compatible ="gianfar" , }, - {}, -}; - -static int __init declare_of_platform_devices (void ) -{ -of_platform_bus_probe (NULL , of_bus_ids,NULL ); - -return 0 ; -} -machine_device_initcall (tqm85xx, declare_of_platform_devices); +machine_device_initcall (tqm85xx, mpc85xx_common_publish_devices);static const char *board[]__initdata = {"tqc,tqm8540" ,
arch/powerpc/platforms/85xx/xes_mpc85xx.c +5 -15
@@ -33,6 +33,8 @@#include <sysdev/fsl_soc.h> #include <sysdev/fsl_pci.h> +#include "mpc85xx.h" +/* A few bit definitions needed for fixups on some boards */ #define MPC85xx_L2CTL_L2E 0x80000000/* L2 enable */ #define MPC85xx_L2CTL_L2I 0x40000000/* L2 flash invalidate */
@@ -177,21 +179,9 @@ static void __init xes_mpc85xx_setup_arch(void)#endif } -static struct of_device_id __initdata xes_mpc85xx_ids[] = { - { .type ="soc" , }, - { .compatible ="soc" , }, - { .compatible ="simple-bus" , }, - { .compatible ="gianfar" , }, - {}, -}; - -static int __init xes_mpc85xx_publish_devices (void ) -{ -return of_platform_bus_probe (NULL , xes_mpc85xx_ids,NULL ); -} -machine_device_initcall (xes_mpc8572, xes_mpc85xx_publish_devices); -machine_device_initcall (xes_mpc8548, xes_mpc85xx_publish_devices); -machine_device_initcall (xes_mpc8540, xes_mpc85xx_publish_devices); +machine_device_initcall (xes_mpc8572, mpc85xx_common_publish_devices); +machine_device_initcall (xes_mpc8548, mpc85xx_common_publish_devices); +machine_device_initcall (xes_mpc8540, mpc85xx_common_publish_devices);/* * Called very early, device-tree isn't unflattened
Signature · 1 line
1.7.2.5
PATCH 14/14 85xx: separate cpm2 pic init
In reply to Dmitry Eremin-SolenikovSeparate handling of CPM2 PIC initialization to mpc85xx_cpm2_pic_init() function.
--- arch/powerpc/platforms/85xx/ksi8560.c | 28 +------------------ arch/powerpc/platforms/85xx/mpc85xx.h | 7 ++++ arch/powerpc/platforms/85xx/mpc85xx_ads.c | 32 +-------------------- arch/powerpc/platforms/85xx/mpc85xx_common.c | 39 ++++++++++++++++++++++++++ arch/powerpc/platforms/85xx/sbc8560.c | 32 +-------------------- arch/powerpc/platforms/85xx/tqm85xx.c | 35 +---------------------- 6 files changed, 50 insertions(+), 123 deletions(-)
arch/powerpc/platforms/85xx/ksi8560.c +1 -27
@@ -55,25 +55,11 @@ static void machine_restart(char *cmd)for (;;); } -static void cpm2_cascade (unsigned int irq,struct irq_desc *desc) -{ -struct irq_chip *chip =irq_desc_get_chip (desc); -int cascade_irq; - -while ((cascade_irq =cpm2_get_irq ()) >=0 ) -generic_handle_irq (cascade_irq); - - chip->irq_eoi (&desc->irq_data); -} -static void __init ksi8560_pic_init (void ) {struct mpic *mpic;struct resource r;struct device_node *np; -#ifdef CONFIG_CPM2 -int irq; -#endif np =of_find_node_by_type (NULL ,"open-pic" );
@@ -96,19 +82,7 @@ static void __init ksi8560_pic_init(void)mpic_init (mpic); -#ifdef CONFIG_CPM2 -/* Setup CPM2 PIC */ - np =of_find_compatible_node (NULL ,NULL ,"fsl,cpm2-pic" ); -if (np ==NULL ) { -printk (KERN_ERR "PIC init: can not find fsl,cpm2-pic node\n" ); -return ; - } - irq =irq_of_parse_and_map (np,0 ); - -cpm2_pic_init (np); -of_node_put (np); -irq_set_chained_handler (irq, cpm2_cascade); -#endif +mpc85xx_cpm2_pic_init (); }#ifdef CONFIG_CPM2
arch/powerpc/platforms/85xx/mpc85xx.h +7 -0
@@ -1,4 +1,11 @@#ifndef MPC85xx_H#define MPC85xx_Hextern int mpc85xx_common_publish_devices (void ); + +#ifdef CONFIG_CPM2 +extern void mpc85xx_cpm2_pic_init (void ); +#else +static inline void __init mpc85xx_cpm2_pic_init (void ) {} +#endif /* CONFIG_CPM2 */ +#endif
arch/powerpc/platforms/85xx/mpc85xx_ads.c +1 -31
@@ -48,29 +48,11 @@ static int mpc85xx_exclude_device(struct pci_controller *hose, }#endif /* CONFIG_PCI */ -#ifdef CONFIG_CPM2 - -static void cpm2_cascade (unsigned int irq,struct irq_desc *desc) -{ -struct irq_chip *chip =irq_desc_get_chip (desc); -int cascade_irq; - -while ((cascade_irq =cpm2_get_irq ()) >=0 ) -generic_handle_irq (cascade_irq); - - chip->irq_eoi (&desc->irq_data); -} - -#endif /* CONFIG_CPM2 */ -static void __init mpc85xx_ads_pic_init (void ) {struct mpic *mpic;struct resource r;struct device_node *np =NULL ; -#ifdef CONFIG_CPM2 -int irq; -#endif np =of_find_node_by_type (np,"open-pic" );if (!np) {
@@ -92,19 +74,7 @@ static void __init mpc85xx_ads_pic_init(void)mpic_init (mpic); -#ifdef CONFIG_CPM2 -/* Setup CPM2 PIC */ - np =of_find_compatible_node (NULL ,NULL ,"fsl,cpm2-pic" ); -if (np ==NULL ) { -printk (KERN_ERR "PIC init: can not find fsl,cpm2-pic node\n" ); -return ; - } - irq =irq_of_parse_and_map (np,0 ); - -cpm2_pic_init (np); -of_node_put (np); -irq_set_chained_handler (irq, cpm2_cascade); -#endif +mpc85xx_cpm2_pic_init (); }/*
arch/powerpc/platforms/85xx/mpc85xx_common.c +39 -0
@@ -8,6 +8,8 @@#include <linux/kernel.h> #include <linux/of_platform.h> +#include <sysdev/cpm2_pic.h> +#include "mpc85xx.h" static struct of_device_id __initdata mpc85xx_common_ids[] = {
@@ -24,3 +26,40 @@ int __init mpc85xx_common_publish_devices(void) {return of_platform_bus_probe (NULL , mpc85xx_common_ids,NULL ); } + +#ifdef CONFIG_CPM2 +static void cpm2_cascade (unsigned int irq,struct irq_desc *desc) +{ +struct irq_chip *chip =irq_desc_get_chip (desc); +int cascade_irq; + +while ((cascade_irq =cpm2_get_irq ()) >=0 ) +generic_handle_irq (cascade_irq); + + chip->irq_eoi (&desc->irq_data); +} + + +void __init mpc85xx_cpm2_pic_init (void ) +{ +struct device_node *np; +int irq; + +/* Setup CPM2 PIC */ + np =of_find_compatible_node (NULL ,NULL ,"fsl,cpm2-pic" ); +if (np ==NULL ) { +printk (KERN_ERR "PIC init: can not find fsl,cpm2-pic node\n" ); +return ; + } + irq =irq_of_parse_and_map (np,0 ); +if (irq ==NO_IRQ ) { +of_node_put (np); +printk (KERN_ERR "PIC init: got no IRQ for cpm cascade\n" ); +return ; + } + +cpm2_pic_init (np); +of_node_put (np); +irq_set_chained_handler (irq, cpm2_cascade); +} +#endif
arch/powerpc/platforms/85xx/sbc8560.c +1 -31
@@ -39,29 +39,11 @@#include "mpc85xx.h" -#ifdef CONFIG_CPM2 - -static void cpm2_cascade (unsigned int irq,struct irq_desc *desc) -{ -struct irq_chip *chip =irq_desc_get_chip (desc); -int cascade_irq; - -while ((cascade_irq =cpm2_get_irq ()) >=0 ) -generic_handle_irq (cascade_irq); - - chip->irq_eoi (&desc->irq_data); -} - -#endif /* CONFIG_CPM2 */ -static void __init sbc8560_pic_init (void ) {struct mpic *mpic;struct resource r;struct device_node *np =NULL ; -#ifdef CONFIG_CPM2 -int irq; -#endif np =of_find_node_by_type (np,"open-pic" );if (!np) {
@@ -83,19 +65,7 @@ static void __init sbc8560_pic_init(void)mpic_init (mpic); -#ifdef CONFIG_CPM2 -/* Setup CPM2 PIC */ - np =of_find_compatible_node (NULL ,NULL ,"fsl,cpm2-pic" ); -if (np ==NULL ) { -printk (KERN_ERR "PIC init: can not find fsl,cpm2-pic node\n" ); -return ; - } - irq =irq_of_parse_and_map (np,0 ); - -cpm2_pic_init (np); -of_node_put (np); -irq_set_chained_handler (irq, cpm2_cascade); -#endif +mpc85xx_cpm2_pic_init (); }/*
arch/powerpc/platforms/85xx/tqm85xx.c +1 -34
@@ -42,18 +42,6 @@#ifdef CONFIG_CPM2 #include <asm/cpm2.h> -#include <sysdev/cpm2_pic.h> - -static void cpm2_cascade (unsigned int irq,struct irq_desc *desc) -{ -struct irq_chip *chip =irq_desc_get_chip (desc); -int cascade_irq; - -while ((cascade_irq =cpm2_get_irq ()) >=0 ) -generic_handle_irq (cascade_irq); - - chip->irq_eoi (&desc->irq_data); -}#endif /* CONFIG_CPM2 */ static void __init tqm85xx_pic_init (void )
@@ -61,9 +49,6 @@ static void __init tqm85xx_pic_init(void)struct mpic *mpic;struct resource r;struct device_node *np; -#ifdef CONFIG_CPM2 -int irq; -#endif np =of_find_node_by_type (NULL ,"open-pic" );if (!np) {
@@ -85,25 +70,7 @@ static void __init tqm85xx_pic_init(void)mpic_init (mpic); -#ifdef CONFIG_CPM2 -/* Setup CPM2 PIC */ - np =of_find_compatible_node (NULL ,NULL ,"fsl,cpm2-pic" ); -if (np ==NULL ) { -printk (KERN_ERR "PIC init: can not find fsl,cpm2-pic node\n" ); -return ; - } - irq =irq_of_parse_and_map (np,0 ); - -if (irq ==NO_IRQ ) { -of_node_put (np); -printk (KERN_ERR "PIC init: got no IRQ for cpm cascade\n" ); -return ; - } - -cpm2_pic_init (np); -of_node_put (np); -irq_set_chained_handler (irq, cpm2_cascade); -#endif +mpc85xx_cpm2_pic_init (); }/*
Signature · 1 line
1.7.2.5
Re: [PATCH 12/14] 85xx/mpc85xx_ds, ads, cds: move .pci_exclude_device setting to machine definitions
In reply to Dmitry Eremin-SolenikovQuoted 6 lines · Dmitry Eremin-Solenikov
Signed-off-by Dmitry Eremin-Solenikov <[email protected]>---
arch/powerpc/platforms/85xx/mpc85xx_ads.c | 5 +++-- arch/powerpc/platforms/85xx/mpc85xx_cds.c | 5 ++--- arch/powerpc/platforms/85xx/mpc85xx_ds.c | 5 +++-- 3 files changed, 8 insertions(+), 7 deletions(-)
I believe these are done this way for a reason (its been some time). I = can't remember if it maters or not, but having pci_exclude_device() = means that any code in fsl_add_bridge() would not be impacted by the = exclude function.
Not sure what value making this change has at this point.
- k
=
Quoted 2 lines
=20
= renamed from arch/powerpc/platforms/85xx/mpc85xx_ads.c +0
-0
b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
=
Quoted 23 lines
index 3b2c9bb..2483929 100644
arch/powerpc/platforms/85xx/mpc85xx_ads.c +0
-2@@ -200,8 +200,6 @@ static void __init mpc85xx_ads_setup_arch(void)#ifdef CONFIG_PCI for_each_compatible_node (np,"pci" ,"fsl,mpc8540-pci" )fsl_add_bridge (np,1 ); - - ppc_md.pci_exclude_device =3D mpc85xx_exclude_device;#endif }=20
arch/powerpc/platforms/85xx/mpc85xx_ads.c +3
-0@@ -254,6 +252,9 @@ define_machine(mpc85xx_ads) { .probe =3D mpc85xx_ads_probe, .setup_arch =3D mpc85xx_ads_setup_arch, .init_IRQ =3D mpc85xx_ads_pic_init, +#ifdef CONFIG_PCI + .pci_exclude_device =3D mpc85xx_exclude_device, +#endif .show_cpuinfo =3D mpc85xx_ads_show_cpuinfo, .get_irq =3D mpic_get_irq, .restart =3D fsl_rstcr_restart,= renamed from arch/powerpc/platforms/85xx/mpc85xx_cds.c +0
-0
b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
=
Quoted 23 lines
index 6299a2a..e209c23 100644
arch/powerpc/platforms/85xx/mpc85xx_cds.c +0
-3@@ -297,9 +297,6 @@ static void __init mpc85xx_cds_setup_arch(void) fsl_add_bridge(np, 0); } } - - ppc_md.pci_irq_fixup =3D mpc85xx_cds_pci_irq_fixup; - ppc_md.pci_exclude_device =3D mpc85xx_exclude_device;#endif }=20
arch/powerpc/platforms/85xx/mpc85xx_cds.c +2
-0@@ -355,6 +352,8 @@ define_machine(mpc85xx_cds) {#ifdef CONFIG_PCI .restart =3D mpc85xx_cds_restart, .pcibios_fixup_bus =3D fsl_pcibios_fixup_bus, + .pci_irq_fixup =3D mpc85xx_cds_pci_irq_fixup, + .pci_exclude_device =3D mpc85xx_exclude_device, #else .restart =3D fsl_rstcr_restart,#endif = renamed from arch/powerpc/platforms/85xx/mpc85xx_ds.c +0
-0
b/arch/powerpc/platforms/85xx/mpc85xx_ds.c
Quoted 38 lines
index c7b97f7..53bf07d 100644
arch/powerpc/platforms/85xx/mpc85xx_ds.c +0
-2@@ -182,8 +182,6 @@ static void __init mpc85xx_ds_setup_arch(void) hose->dma_window_size); } } - - ppc_md.pci_exclude_device =3D mpc85xx_exclude_device;#endif =20
#ifdefCONFIG_SMParch/powerpc/platforms/85xx/mpc85xx_ds.c +3
-1@@ -279,6 +277,7 @@ define_machine(mpc8544_ds) { .init_IRQ =3D mpc85xx_ds_pic_init, #ifdef CONFIG_PCI .pcibios_fixup_bus =3D fsl_pcibios_fixup_bus, + .pci_exclude_device =3D mpc85xx_exclude_device, #endif .get_irq =3D mpic_get_irq, .restart =3D fsl_rstcr_restart,@@ -293,6 +292,7 @@ define_machine(mpc8572_ds) { .init_IRQ =3D mpc85xx_ds_pic_init, #ifdef CONFIG_PCI .pcibios_fixup_bus =3D fsl_pcibios_fixup_bus, + .pci_exclude_device =3D mpc85xx_exclude_device, #endif .get_irq =3D mpic_get_irq, .restart =3D fsl_rstcr_restart,@@ -307,6 +307,7 @@ define_machine(p2020_ds) { .init_IRQ =3D mpc85xx_ds_pic_init, #ifdef CONFIG_PCI .pcibios_fixup_bus =3D fsl_pcibios_fixup_bus, + .pci_exclude_device =3D mpc85xx_exclude_device, #endif .get_irq =3D mpic_get_irq, .restart =3D fsl_rstcr_restart, --=201.7.2.5
Re: [PATCH 10/14] 85xx/mpc85xx_rdb: merge p1020_rdb and p2020_rdb machine entries
In reply to Dmitry Eremin-SolenikovQuoted 7 lines · Dmitry Eremin-Solenikov
p1020_rdbandp2020_rdbmachine entries bear no in-kernel differencies other than dt compatible strings. Merge them into single machine entry namedmpc85xx_rdb
=20Signed-off-by Dmitry Eremin-Solenikov <[email protected]>---
arch/powerpc/platforms/85xx/mpc85xx_rdb.c| 40 =
++++++----------------------
=
Quoted 3 lines
1 files changed, 9 insertions(+), 31 deletions(-)=20
= renamed from arch/powerpc/platforms/85xx/mpc85xx_rdb.c +0
-0
b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c
arch/powerpc/platforms/85xx/mpc85xx_rdb.c static int __init =
Quoted 4 lines
index 088f30b..7a3a37b 100644
arch/powerpc/platforms/85xx/mpc85xx_rdb.c +0
-0@@ -120,47 +120,25 @@ static int __init =
mpc85xxrdb_publish_devices(void)
Quoted 42 lines
arch/powerpc/platforms/85xx/mpc85xx_rdb.c +1
-2{return of_platform_bus_probe (NULL , mpc85xxrdb_ids,NULL ); } -machine_device_initcall (p2020_rdb, mpc85xxrdb_publish_devices); -machine_device_initcall (p1020_rdb, mpc85xxrdb_publish_devices); +machine_device_initcall (mpc85xx_rdb, mpc85xxrdb_publish_devices);=20
/*
* Called very early, device-tree isn't unflattened */arch/powerpc/platforms/85xx/mpc85xx_rdb.c +1
-1-static int __init p2020_rdb_probe (void ) +static int __init mpc85xx_rdb_probe (void ){ unsigned long root =3D of_get_flat_dt_root();=20
arch/powerpc/platforms/85xx/mpc85xx_rdb.c +2
-1-if (of_flat_dt_is_compatible (root,"fsl,P2020RDB" )) +if (of_flat_dt_is_compatible (root,"fsl,P1020RDB" ) || +of_flat_dt_is_compatible (root,"fsl,P2020RDB" )) {return 1;arch/powerpc/platforms/85xx/mpc85xx_rdb.c +2
-1-return 0 ; + }else +return 0 ;}
=20arch/powerpc/platforms/85xx/mpc85xx_rdb.c +0
-18-static int __init p1020_rdb_probe (void ) -{ - unsigned long root =3D of_get_flat_dt_root(); - -if (of_flat_dt_is_compatible (root,"fsl,P1020RDB" )) -return 1 ; -return 0 ; -} - -define_machine (p2020_rdb) { - .name =3D "P2020 RDB", - .probe =3D p2020_rdb_probe, - .setup_arch =3D mpc85xx_rdb_setup_arch, - .init_IRQ =3D mpc85xx_rdb_pic_init, -#ifdef CONFIG_PCI - .pcibios_fixup_bus =3D fsl_pcibios_fixup_bus, -#endif - .get_irq =3D mpic_get_irq,
arch/powerpc/platforms/85xx/mpc85xx_rdb.c static int __init mpc85xxrdb_publish_devices(void)
Quoted 10 lines
arch/powerpc/platforms/85xx/mpc85xx_rdb.c +2
-8- .restart =3D fsl_rstcr_restart, - .calibrate_decr =3D generic_calibrate_decr, - .progress =3D udbg_progress, -}; - -define_machine (p1020_rdb) { - .name =3D "P1020 RDB", - .probe =3D p1020_rdb_probe, +define_machine (mpc85xx_rdb) { + .name =3D "MPC85xx RDB",
breaking 'name' this way isn't acceptable.
Quoted 6 lines
arch/powerpc/platforms/85xx/mpc85xx_rdb.c +1
-0+ .probe =3D mpc85xx_rdb_probe,.setup_arch =3D mpc85xx_rdb_setup_arch, .init_IRQ =3D mpc85xx_rdb_pic_init,#ifdef
CONFIG_PCI
--=20
1.7.2.5
Re: [PATCH 09/14] 85xx/sbc8548: read hardware revision when it's required for first time
In reply to Dmitry Eremin-SolenikovQuoted 8 lines · Dmitry Eremin-Solenikov
Currently sbc8548 reads hardware revision during bootup. To simplify things read it when it's first required when the kernel is up and running.
=20Signed-off-by Dmitry Eremin-Solenikov <[email protected]>---
arch/powerpc/platforms/85xx/sbc8548.c| 8 +++++---1 files changed, 5 insertions(+), 3 deletions(-)
How is this simplifying things, seems more complicated to add an = additional if() check.
- k
=
Quoted 2 lines
=20
= renamed from arch/powerpc/platforms/85xx/sbc8548.c +0
-0
b/arch/powerpc/platforms/85xx/sbc8548.c
arch/powerpc/platforms/85xx/sbc8548.c static void sbc8548_show_cpuinfo(struct seq_file =
Quoted 30 lines
index ecdd8c0..2eeb376 100644
arch/powerpc/platforms/85xx/sbc8548.c +0
-0@@ -49,7 +49,7 @@#include <sysdev/fsl_soc.h> #include <sysdev/fsl_pci.h> =20
arch/powerpc/platforms/85xx/sbc8548.c +1
-1-static int sbc_rev; +static int sbc_rev =3D -EINVAL ;=20
static void__initsbc8548_pic_init(void)
{arch/powerpc/platforms/85xx/sbc8548.c +0
-0@@ -82,7 +82,7 @@ static void __init sbc8548_pic_init(void) }=20
/* Extract the HW Rev from the EPLD on the board */arch/powerpc/platforms/85xx/sbc8548.c +1
-1-static int __init sbc8548_hw_rev (void ) +static int sbc8548_hw_rev (void ){ struct device_node *np; struct resource res;arch/powerpc/platforms/85xx/sbc8548.c +0
-1@@ -130,7 +130,6 @@ static void __init sbc8548_setup_arch(void) } }#endif - sbc_rev =3D sbc8548_hw_rev(); }=20
static voidsbc8548_show_cpuinfo(struct seq_file *m)arch/powerpc/platforms/85xx/sbc8548.c +0
-0@@ -140,6 +139,9 @@ static void sbc8548_show_cpuinfo(struct seq_file =
*m)
Quoted 11 lines
arch/powerpc/platforms/85xx/sbc8548.c +0
-0pvid =3D mfspr(SPRN_PVR); svid =3D mfspr(SPRN_SVR);=20
arch/powerpc/platforms/85xx/sbc8548.c +3
-0+ if (sbc_rev =3D=3D -EINVAL) + sbc_rev =3D sbc8548_hw_rev(); +seq_printf(m, "Vendor\t\t: Wind River\n"); seq_printf(m, "Machine\t\t: SBC8548 v%d\n", sbc_rev); seq_printf(m, "PVR\t\t: 0x%x\n", pvid);--=20
1.7.2.5
Kumar Gala
NAKRe: [PATCH 11/14] 85xx: merge 32-bit QorIQ with DPA boards support
In reply to Dmitry Eremin-SolenikovQuoted 9 lines · Dmitry Eremin-Solenikov
Board support files for p4080ds, p3041ds and p2040rdb don't differ at all (all differencies are hidden in dts files). So merge them into single board file containing all necessary stuff.
=20Signed-off-by Dmitry Eremin-Solenikov <[email protected]>---
arch/powerpc/platforms/85xx/Kconfig | 32 +------ arch/powerpc/platforms/85xx/Makefile | 4 +- arch/powerpc/platforms/85xx/p2040_rdb.c | 88 =
-------------------
Quoted 1 line
arch/powerpc/platforms/85xx/p3041_ds.c| 90 =
--------------------
Quoted 5 lines
.../platforms/85xx/{p4080_ds.c=3D>qoriq_dpa_ds.c} | 24 +++--5 files changed, 20 insertions(+), 218 deletions(-)delete mode 100644
arch/powerpc/platforms/85xx/p2040_rdb.cdelete mode 100644arch/powerpc/platforms/85xx/p3041_ds.crenamearch/powerpc/platforms/85xx/{p4080_ds.c=3D>qoriq_dpa_ds.c} =
(72%)
NAK, there are other reasons these are split like they are today.
- k=
Re: [PATCH 13/14] 85xx: consolidate of_platform_bus_probe calls
In reply to Dmitry Eremin-SolenikovQuoted 6 lines · Dmitry Eremin-Solenikov
85xx board files have a lot of duplication in *_publish_devices()/
*_declare_of_platform_devices()functions. Merge that into a single function common to most of the boards.
=20Signed-off-by Dmitry Eremin-Solenikov <[email protected]>---
Quoted 9 lines
arch/powerpc/platforms/85xx/Makefile | 2 + arch/powerpc/platforms/85xx/ksi8560.c | 18 +--------- arch/powerpc/platforms/85xx/mpc8536_ds.c | 16 ++------- arch/powerpc/platforms/85xx/mpc85xx.h | 4 ++ arch/powerpc/platforms/85xx/mpc85xx_ads.c | 20 ++--------- arch/powerpc/platforms/85xx/mpc85xx_cds.c | 16 ++------- arch/powerpc/platforms/85xx/mpc85xx_common.c | 26 ++++++++++++++ arch/powerpc/platforms/85xx/mpc85xx_ds.c | 20 +++-------- arch/powerpc/platforms/85xx/mpc85xx_mds.c | 46 =
++-----------------------
Quoted 11 lines
arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 16 ++------- arch/powerpc/platforms/85xx/p1022_ds.c | 7 ++-- arch/powerpc/platforms/85xx/sbc8548.c | 18 ++-------- arch/powerpc/platforms/85xx/sbc8560.c | 20 ++--------- arch/powerpc/platforms/85xx/socrates.c | 13 +------ arch/powerpc/platforms/85xx/stx_gp3.c | 16 ++------- arch/powerpc/platforms/85xx/tqm85xx.c | 16 ++------- arch/powerpc/platforms/85xx/xes_mpc85xx.c | 20 +++-------- 17 files changed, 77 insertions(+), 217 deletions(-)create mode 100644
arch/powerpc/platforms/85xx/mpc85xx.hcreate mode 100644arch/powerpc/platforms/85xx/mpc85xx_common.c
In general this looks ok, can you refactor so its earlier in the patch = sequence
- k
=
Quoted 2 lines
=20
= renamed from arch/powerpc/platforms/85xx/Makefile +0
-0
b/arch/powerpc/platforms/85xx/Makefile
=
Quoted 13 lines
index 43b2162..ca4b1b9 100644
arch/powerpc/platforms/85xx/Makefile +0
-0@@ -3,6 +3,8 @@ #obj-$(CONFIG_SMP) +=3D smp.o
=20arch/powerpc/platforms/85xx/Makefile +2
-0+obj-y +=3D mpc85xx_common.o +obj-$(CONFIG_MPC8540_ADS) +=3D mpc85xx_ads.o obj-$(CONFIG_MPC8560_ADS) +=3D mpc85xx_ads.o obj-$(CONFIG_MPC85xx_CDS) +=3D mpc85xx_cds.o
= renamed from arch/powerpc/platforms/85xx/ksi8560.c +0
-0
b/arch/powerpc/platforms/85xx/ksi8560.c
Quoted 10 lines
index c46f935..7657e1a 100644
arch/powerpc/platforms/85xx/ksi8560.c +0
-0@@ -35,6 +35,7 @@#include <asm/cpm2.h> #include <sysdev/cpm2_pic.h> =20
+#include "mpc85xx.h"
=20
#defineKSI8560_CPLD_HVR0x04/* Hardware Version =
Register */
arch/powerpc/platforms/85xx/ksi8560.c static void ksi8560_show_cpuinfo(struct seq_file =
Quoted 2 lines
#define
KSI8560_CPLD_PVR0x08/* PLD Version Register */arch/powerpc/platforms/85xx/ksi8560.c +0
-0@@ -215,22 +216,7 @@ static void ksi8560_show_cpuinfo(struct seq_file =
*m)
=
Quoted 24 lines
arch/powerpc/platforms/85xx/ksi8560.c +0
-0seq_printf (m,"PLL setting\t: 0x%x\n" , ((phid1 >>24 ) &0x3f )); }=20
arch/powerpc/platforms/85xx/ksi8560.c +1
-16-static struct of_device_id __initdata of_bus_ids[] =3D { - { .type =3D "soc", }, - { .type =3D "simple-bus", }, - { .name =3D "cpm", }, - { .name =3D "localbus", }, - { .compatible =3D "gianfar", }, - {}, -}; - -static int __init declare_of_platform_devices (void ) -{ -of_platform_bus_probe (NULL , of_bus_ids,NULL ); - -return 0 ; -} -machine_device_initcall (ksi8560, declare_of_platform_devices); +machine_device_initcall (ksi8560, mpc85xx_common_publish_devices);=20
/*
* Called very early, device-tree isn't unflattened= renamed from arch/powerpc/platforms/85xx/mpc8536_ds.c +0
-0
b/arch/powerpc/platforms/85xx/mpc8536_ds.c
=
Quoted 34 lines
index f79f2f1..9ee6455 100644
arch/powerpc/platforms/85xx/mpc8536_ds.c +0
-0@@ -32,6 +32,8 @@#include <sysdev/fsl_soc.h> #include <sysdev/fsl_pci.h> =20
arch/powerpc/platforms/85xx/mpc8536_ds.c +2
-0+#include "mpc85xx.h" +void
__initmpc8536_ds_pic_init(void){ struct mpic *mpic;arch/powerpc/platforms/85xx/mpc8536_ds.c +0
-0@@ -104,19 +106,7 @@ static void __init mpc8536_ds_setup_arch(void)printk ("MPC8536 DS board from Freescale Semiconductor\n" ); }=20
arch/powerpc/platforms/85xx/mpc8536_ds.c +1
-13-static struct of_device_id __initdata mpc8536_ds_ids[] =3D { - { .type =3D "soc", }, - { .compatible =3D "soc", }, - { .compatible =3D "simple-bus", }, - { .compatible =3D "gianfar", }, - {}, -}; - -static int __init mpc8536_ds_publish_devices (void ) -{ -return of_platform_bus_probe (NULL , mpc8536_ds_ids,NULL ); -} -machine_device_initcall (mpc8536_ds, mpc8536_ds_publish_devices); +machine_device_initcall (mpc8536_ds, mpc85xx_common_publish_devices);=20
machine_arch_initcall(mpc8536_ds, swiotlb_setup_bus_notifier); =20= renamed from arch/powerpc/platforms/85xx/mpc85xx.h +0
-0
b/arch/powerpc/platforms/85xx/mpc85xx.h
=
Quoted 10 lines
new file mode 100644
index 0000000..1a1b4ebarch/powerpc/platforms/85xx/mpc85xx.h new file +4
-0@@ -0,0 +1,4 @@ +#ifndef MPC85xx_H +#define MPC85xx_H +extern int mpc85xx_common_publish_devices (void ); +#endif = renamed from arch/powerpc/platforms/85xx/mpc85xx_ads.c +0
-0
b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
arch/powerpc/platforms/85xx/mpc85xx_ads.c static void mpc85xx_ads_show_cpuinfo(struct =
Quoted 13 lines
index 2483929..3bc2acc 100644
arch/powerpc/platforms/85xx/mpc85xx_ads.c +0
-0@@ -35,6 +35,8 @@#include <sysdev/cpm2_pic.h> #endif =20
arch/powerpc/platforms/85xx/mpc85xx_ads.c +2
-0+#include "mpc85xx.h" +#ifdef
CONFIG_PCI
static int mpc85xx_exclude_device(structpci_controller*hose,
u_charbus,u_chardevfn)arch/powerpc/platforms/85xx/mpc85xx_ads.c +0
-0@@ -219,23 +221,7 @@ static void mpc85xx_ads_show_cpuinfo(struct =
seq_file *m)
=
Quoted 25 lines
arch/powerpc/platforms/85xx/mpc85xx_ads.c +0
-0seq_printf (m,"PLL setting\t: 0x%x\n" , ((phid1 >>24 ) &0x3f )); }=20
arch/powerpc/platforms/85xx/mpc85xx_ads.c +1
-17-static struct of_device_id __initdata of_bus_ids[] =3D { - { .name =3D "soc", }, - { .type =3D "soc", }, - { .name =3D "cpm", }, - { .name =3D "localbus", }, - { .compatible =3D "simple-bus", }, - { .compatible =3D "gianfar", }, - {}, -}; - -static int __init declare_of_platform_devices (void ) -{ -of_platform_bus_probe (NULL , of_bus_ids,NULL ); - -return 0 ; -} -machine_device_initcall (mpc85xx_ads, declare_of_platform_devices); +machine_device_initcall (mpc85xx_ads, mpc85xx_common_publish_devices);=20
/*
* Called very early, device-tree isn't unflattened= renamed from arch/powerpc/platforms/85xx/mpc85xx_cds.c +0
-0
b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
=
Quoted 34 lines
index e209c23..281ecc5 100644
arch/powerpc/platforms/85xx/mpc85xx_cds.c +0
-0@@ -47,6 +47,8 @@#include <sysdev/fsl_soc.h> #include <sysdev/fsl_pci.h> =20
arch/powerpc/platforms/85xx/mpc85xx_cds.c +2
-0+#include "mpc85xx.h" +/* CADMUS info */
/* xxx - galak, move into device tree */
#defineCADMUS_BASE(0xf8004000)arch/powerpc/platforms/85xx/mpc85xx_cds.c +0
-0@@ -328,19 +330,7 @@ static int __init mpc85xx_cds_probe(void)return of_flat_dt_is_compatible (root,"MPC85xxCDS" ); }=20
arch/powerpc/platforms/85xx/mpc85xx_cds.c +1
-13-static struct of_device_id __initdata of_bus_ids[] =3D { - { .type =3D "soc", }, - { .compatible =3D "soc", }, - { .compatible =3D "simple-bus", }, - { .compatible =3D "gianfar", }, - {}, -}; - -static int __init declare_of_platform_devices (void ) -{ -return of_platform_bus_probe (NULL , of_bus_ids,NULL ); -} -machine_device_initcall (mpc85xx_cds, declare_of_platform_devices); +machine_device_initcall (mpc85xx_cds, mpc85xx_common_publish_devices);=20
define_machine(mpc85xx_cds) { .name =3D "MPC85xx CDS",= renamed from arch/powerpc/platforms/85xx/mpc85xx_common.c +0
-0
b/arch/powerpc/platforms/85xx/mpc85xx_common.c
=
Quoted 32 lines
new file mode 100644
index 0000000..999567aarch/powerpc/platforms/85xx/mpc85xx_common.c new file +26
-0@@ -0,0 +1,26 @@ +/* +* Routines common to most mpc85xx-based boards. +* +* This is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ +#include <linux/kernel.h> +#include <linux/of_platform.h> + +#include "mpc85xx.h" + +static struct of_device_id __initdata mpc85xx_common_ids[] =3D { + { .type =3D "soc", }, + { .compatible =3D "soc", }, + { .compatible =3D "simple-bus", }, + { .compatible =3D "gianfar", }, + { .compatible =3D "fsl,qe", }, + { .compatible =3D "fsl,cpm2", }, + {}, +}; + +int __init mpc85xx_common_publish_devices (void ) +{ +return of_platform_bus_probe (NULL , mpc85xx_common_ids,NULL ); +}= renamed from arch/powerpc/platforms/85xx/mpc85xx_ds.c +0
-0
b/arch/powerpc/platforms/85xx/mpc85xx_ds.c
=
Quoted 38 lines
index 53bf07d..7a0b728 100644
arch/powerpc/platforms/85xx/mpc85xx_ds.c +0
-0@@ -36,6 +36,8 @@#include <sysdev/fsl_soc.h> #include <sysdev/fsl_pci.h> =20
arch/powerpc/platforms/85xx/mpc85xx_ds.c +2
-0+#include "mpc85xx.h" +#undef DEBUG
=20
#ifdef DEBUGarch/powerpc/platforms/85xx/mpc85xx_ds.c +0
-0@@ -216,21 +218,9 @@ static int __init mpc8544_ds_probe(void)return 0 ; }=20
arch/powerpc/platforms/85xx/mpc85xx_ds.c +3
-15-static struct of_device_id __initdata mpc85xxds_ids[] =3D { - { .type =3D "soc", }, - { .compatible =3D "soc", }, - { .compatible =3D "simple-bus", }, - { .compatible =3D "gianfar", }, - {}, -}; - -static int __init mpc85xxds_publish_devices (void ) -{ -return of_platform_bus_probe (NULL , mpc85xxds_ids,NULL ); -} -machine_device_initcall (mpc8544_ds, mpc85xxds_publish_devices); -machine_device_initcall (mpc8572_ds, mpc85xxds_publish_devices); -machine_device_initcall (p2020_ds, mpc85xxds_publish_devices); +machine_device_initcall (mpc8544_ds, mpc85xx_common_publish_devices); +machine_device_initcall (mpc8572_ds, mpc85xx_common_publish_devices); +machine_device_initcall (p2020_ds, mpc85xx_common_publish_devices);=20
machine_arch_initcall(mpc8544_ds, swiotlb_setup_bus_notifier);machine_arch_initcall(mpc8572_ds, swiotlb_setup_bus_notifier);= renamed from arch/powerpc/platforms/85xx/mpc85xx_mds.c +0
-0
b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
arch/powerpc/platforms/85xx/mpc85xx_mds.c machine_arch_initcall(mpc8568_mds, =
Quoted 47 lines
index 747d1ee..fde37e5 100644
arch/powerpc/platforms/85xx/mpc85xx_mds.c +0
-0@@ -53,6 +53,8 @@#include <asm/mpic.h> #include <asm/swiotlb.h> =20
arch/powerpc/platforms/85xx/mpc85xx_mds.c +2
-0+#include "mpc85xx.h" +#undef DEBUG
#ifdef DEBUG
#define DBG(fmt...)udbg_printf(fmt)arch/powerpc/platforms/85xx/mpc85xx_mds.c +0
-0@@ -159,25 +161,6 @@ extern void __init mpc85xx_smp_init(void);#endif =20
#ifdefCONFIG_QUICC_ENGINEarch/powerpc/platforms/85xx/mpc85xx_mds.c +0
-19-static struct of_device_id mpc85xx_qe_ids[] __initdata =3D { - { .type =3D "qe", }, - { .compatible =3D "fsl,qe", }, - { }, -}; - -static void __init mpc85xx_publish_qe_devices (void ) -{ -struct device_node *np; - - np =3D of_find_compatible_node(NULL, NULL, "fsl,qe"); -if (!of_device_is_available (np)) { -of_node_put (np); -return ; - } - -of_platform_bus_probe (NULL , mpc85xx_qe_ids,NULL ); -} -static void
__initmpc85xx_mds_reset_ucc_phys(void){ struct device_node *np;arch/powerpc/platforms/85xx/mpc85xx_mds.c +0
-1@@ -348,7 +331,6 @@ static void __init mpc85xx_mds_qeic_init(void) of_node_put(np); }#else -static void __init mpc85xx_publish_qe_devices (void ) { }static void __init mpc85xx_mds_qe_init (void ) { }static void __init mpc85xx_mds_qeic_init (void ) { }#endif /* CONFIG_QUICC_ENGINE */ @@ -430,24 +412,12 @@ machine_arch_initcall(mpc8568_mds, =
board_fixups);
=
Quoted 51 lines
arch/powerpc/platforms/85xx/mpc85xx_mds.c +0
-0machine_arch_initcall (mpc8569_mds, board_fixups);=20
static structof_device_idmpc85xx_ids[] =3D {arch/powerpc/platforms/85xx/mpc85xx_mds.c +0
-4- { .type =3D "soc", }, - { .compatible =3D "soc", }, - { .compatible =3D "simple-bus", }, - { .compatible =3D "gianfar", },{ .compatible =3D "fsl,rapidio-delta", }, { .compatible =3D "fsl,mpc8548-guts", }, { .compatible =3D "gpio-leds", }, {}, };=20
arch/powerpc/platforms/85xx/mpc85xx_mds.c +0
-8-static struct of_device_id p1021_ids[] =3D { - { .type =3D "soc", }, - { .compatible =3D "soc", }, - { .compatible =3D "simple-bus", }, - { .compatible =3D "gianfar", }, - {}, -}; -static int
__initmpc85xx_publish_devices(void){ if (machine_is(mpc8568_mds))arch/powerpc/platforms/85xx/mpc85xx_mds.c +0
-0@@ -455,23 +425,15 @@ static int __init mpc85xx_publish_devices(void)if (machine_is (mpc8569_mds))simple_gpiochip_init ("fsl,mpc8569mds-bcsr-gpio" );=20
arch/powerpc/platforms/85xx/mpc85xx_mds.c +1
-0+mpc85xx_common_publish_devices ();of_platform_bus_probe(NULL, mpc85xx_ids, NULL);arch/powerpc/platforms/85xx/mpc85xx_mds.c +0
-9-mpc85xx_publish_qe_devices (); - -return 0 ; -} - -static int __init p1021_publish_devices (void ) -{ -of_platform_bus_probe (NULL , p1021_ids,NULL ); -mpc85xx_publish_qe_devices ();=20
return 0; }=20
machine_device_initcall(mpc8568_mds, mpc85xx_publish_devices);machine_device_initcall(mpc8569_mds, mpc85xx_publish_devices);arch/powerpc/platforms/85xx/mpc85xx_mds.c +1
-1-machine_device_initcall (p1021_mds, p1021_publish_devices); +machine_device_initcall (p1021_mds, mpc85xx_common_publish_devices);=20
machine_arch_initcall(mpc8568_mds, swiotlb_setup_bus_notifier);machine_arch_initcall(mpc8569_mds, swiotlb_setup_bus_notifier);= renamed from arch/powerpc/platforms/85xx/mpc85xx_rdb.c +0
-0
b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c
Quoted 13 lines
index 7a3a37b..5846025 100644
arch/powerpc/platforms/85xx/mpc85xx_rdb.c +0
-0@@ -30,6 +30,8 @@#include <sysdev/fsl_soc.h> #include <sysdev/fsl_pci.h> =20
arch/powerpc/platforms/85xx/mpc85xx_rdb.c +2
-0+#include "mpc85xx.h" +#undef DEBUG
=20
#ifdef DEBUG
arch/powerpc/platforms/85xx/mpc85xx_rdb.c static void __init mpc85xx_rdb_setup_arch(void) · line 110
Quoted 1 line
arch/powerpc/platforms/85xx/mpc85xx_rdb.c +0
-0@@ -108,19 +110,7 @@ static void __init mpc85xx_rdb_setup_arch(void) printk(KERN_INFO "MPC85xx RDB board from Freescale =
Semiconductor\n");
=
Quoted 20 lines
arch/powerpc/platforms/85xx/mpc85xx_rdb.c +0
-0}=20
arch/powerpc/platforms/85xx/mpc85xx_rdb.c +1
-13-static struct of_device_id __initdata mpc85xxrdb_ids[] =3D { - { .type =3D "soc", }, - { .compatible =3D "soc", }, - { .compatible =3D "simple-bus", }, - { .compatible =3D "gianfar", }, - {}, -}; - -static int __init mpc85xxrdb_publish_devices (void ) -{ -return of_platform_bus_probe (NULL , mpc85xxrdb_ids,NULL ); -} -machine_device_initcall (mpc85xx_rdb, mpc85xxrdb_publish_devices); +machine_device_initcall (mpc85xx_rdb, mpc85xx_common_publish_devices);=20
/*
* Called very early, device-tree isn't unflattened= renamed from arch/powerpc/platforms/85xx/p1022_ds.c +0
-0
b/arch/powerpc/platforms/85xx/p1022_ds.c
=
Quoted 32 lines
index 266b3aa..26e6f75 100644
arch/powerpc/platforms/85xx/p1022_ds.c +0
-0@@ -27,6 +27,8 @@#include <sysdev/fsl_pci.h> #include <asm/fsl_guts.h> =20
arch/powerpc/platforms/85xx/p1022_ds.c +2
-0+#include "mpc85xx.h" +#if
defined(CONFIG_FB_FSL_DIU)||defined(CONFIG_FB_FSL_DIU_MODULE)=20
/*arch/powerpc/platforms/85xx/p1022_ds.c +0
-0@@ -325,10 +327,6 @@ static void __init p1022_ds_setup_arch(void) }=20
static structof_device_id__initdatap1022_ds_ids[] =3D {arch/powerpc/platforms/85xx/p1022_ds.c +0
-4- { .type =3D "soc", }, - { .compatible =3D "soc", }, - { .compatible =3D "simple-bus", }, - { .compatible =3D "gianfar", },/* So that the DMA channel nodes can be probed individually: */ { .compatible =3D "fsl,eloplus-dma", }, {},arch/powerpc/platforms/85xx/p1022_ds.c +1
-0@@ -338,6 +336,7 @@ static int __init p1022_ds_publish_devices(void) {return of_platform_bus_probe (NULL , p1022_ds_ids,NULL ); } +machine_device_initcall (p1022_ds, mpc85xx_common_publish_devices);machine_device_initcall (p1022_ds, p1022_ds_publish_devices);=20
machine_arch_initcall(p1022_ds, swiotlb_setup_bus_notifier);= renamed from arch/powerpc/platforms/85xx/sbc8548.c +0
-0
b/arch/powerpc/platforms/85xx/sbc8548.c
arch/powerpc/platforms/85xx/sbc8548.c static void sbc8548_show_cpuinfo(struct seq_file =
Quoted 13 lines
index 2eeb376..42343ac 100644
arch/powerpc/platforms/85xx/sbc8548.c +0
-0@@ -49,6 +49,8 @@#include <sysdev/fsl_soc.h> #include <sysdev/fsl_pci.h> =20
arch/powerpc/platforms/85xx/sbc8548.c +2
-0+#include "mpc85xx.h" +static int
sbc_rev=3D-EINVAL;
=20
static void__initsbc8548_pic_init(void)arch/powerpc/platforms/85xx/sbc8548.c +0
-0@@ -152,21 +154,7 @@ static void sbc8548_show_cpuinfo(struct seq_file =
*m)
=
Quoted 23 lines
arch/powerpc/platforms/85xx/sbc8548.c +0
-0seq_printf (m,"PLL setting\t: 0x%x\n" , ((phid1 >>24 ) &0x3f )); }=20
arch/powerpc/platforms/85xx/sbc8548.c +1
-15-static struct of_device_id __initdata of_bus_ids[] =3D { - { .name =3D "soc", }, - { .type =3D "soc", }, - { .compatible =3D "simple-bus", }, - { .compatible =3D "gianfar", }, - {}, -}; - -static int __init declare_of_platform_devices (void ) -{ -of_platform_bus_probe (NULL , of_bus_ids,NULL ); - -return 0 ; -} -machine_device_initcall (sbc8548, declare_of_platform_devices); +machine_device_initcall (sbc8548, mpc85xx_common_publish_devices);=20
/*
* Called very early, device-tree isn't unflattened= renamed from arch/powerpc/platforms/85xx/sbc8560.c +0
-0
b/arch/powerpc/platforms/85xx/sbc8560.c
arch/powerpc/platforms/85xx/sbc8560.c static void sbc8560_show_cpuinfo(struct seq_file =
Quoted 13 lines
index 678f5a8..bbb656f 100644
arch/powerpc/platforms/85xx/sbc8560.c +0
-0@@ -37,6 +37,8 @@#include <sysdev/cpm2_pic.h> #endif =20
arch/powerpc/platforms/85xx/sbc8560.c +2
-0+#include "mpc85xx.h" +#ifdef
CONFIG_CPM2
=20
static voidcpm2_cascade(unsigned int irq, struct irq_desc *desc)arch/powerpc/platforms/85xx/sbc8560.c +0
-0@@ -208,23 +210,7 @@ static void sbc8560_show_cpuinfo(struct seq_file =
*m)
=
Quoted 25 lines
arch/powerpc/platforms/85xx/sbc8560.c +0
-0seq_printf (m,"PLL setting\t: 0x%x\n" , ((phid1 >>24 ) &0x3f )); }=20
arch/powerpc/platforms/85xx/sbc8560.c +1
-17-static struct of_device_id __initdata of_bus_ids[] =3D { - { .name =3D "soc", }, - { .type =3D "soc", }, - { .name =3D "cpm", }, - { .name =3D "localbus", }, - { .compatible =3D "simple-bus", }, - { .compatible =3D "gianfar", }, - {}, -}; - -static int __init declare_of_platform_devices (void ) -{ -of_platform_bus_probe (NULL , of_bus_ids,NULL ); - -return 0 ; -} -machine_device_initcall (sbc8560, declare_of_platform_devices); +machine_device_initcall (sbc8560, mpc85xx_common_publish_devices);=20
/*
* Called very early, device-tree isn't unflattened= renamed from arch/powerpc/platforms/85xx/socrates.c +0
-0
b/arch/powerpc/platforms/85xx/socrates.c
=
Quoted 31 lines
index 747d8fb..fec496a 100644
arch/powerpc/platforms/85xx/socrates.c +0
-0@@ -41,6 +41,7 @@#include <sysdev/fsl_soc.h> #include <sysdev/fsl_pci.h> =20
+#include "mpc85xx.h"
#include "socrates_fpga_pic.h"
=20
static void__initsocrates_pic_init(void)arch/powerpc/platforms/85xx/socrates.c +0
-0@@ -96,17 +97,7 @@ static void __init socrates_setup_arch(void)#endif }=20
arch/powerpc/platforms/85xx/socrates.c +1
-11-static struct of_device_id __initdata socrates_of_bus_ids[] =3D { - { .compatible =3D "simple-bus", }, - { .compatible =3D "gianfar", }, - {}, -}; - -static int __init socrates_publish_devices (void ) -{ -return of_platform_bus_probe (NULL , socrates_of_bus_ids,NULL ); -} -machine_device_initcall (socrates, socrates_publish_devices); +machine_device_initcall (socrates, mpc85xx_common_publish_devices);=20
/*
* Called very early, device-tree isn't unflattened= renamed from arch/powerpc/platforms/85xx/stx_gp3.c +0
-0
b/arch/powerpc/platforms/85xx/stx_gp3.c
arch/powerpc/platforms/85xx/stx_gp3.c static void stx_gp3_show_cpuinfo(struct seq_file =
Quoted 13 lines
index 5387e9f..ab80044 100644
arch/powerpc/platforms/85xx/stx_gp3.c +0
-0@@ -40,6 +40,8 @@#include <sysdev/fsl_soc.h> #include <sysdev/fsl_pci.h> =20
arch/powerpc/platforms/85xx/stx_gp3.c +2
-0+#include "mpc85xx.h" +#ifdef
CONFIG_CPM2
#include <asm/cpm2.h>
#include <sysdev/cpm2_pic.h>arch/powerpc/platforms/85xx/stx_gp3.c +0
-0@@ -144,19 +146,7 @@ static void stx_gp3_show_cpuinfo(struct seq_file =
*m)
=
Quoted 21 lines
arch/powerpc/platforms/85xx/stx_gp3.c +0
-0seq_printf (m,"PLL setting\t: 0x%x\n" , ((phid1 >>24 ) &0x3f )); }=20
arch/powerpc/platforms/85xx/stx_gp3.c +1
-13-static struct of_device_id __initdata of_bus_ids[] =3D { - { .compatible =3D "simple-bus", }, - { .compatible =3D "gianfar", }, - {}, -}; - -static int __init declare_of_platform_devices (void ) -{ -of_platform_bus_probe (NULL , of_bus_ids,NULL ); - -return 0 ; -} -machine_device_initcall (stx_gp3, declare_of_platform_devices); +machine_device_initcall (stx_gp3, mpc85xx_common_publish_devices);=20
/*
* Called very early, device-tree isn't unflattened= renamed from arch/powerpc/platforms/85xx/tqm85xx.c +0
-0
b/arch/powerpc/platforms/85xx/tqm85xx.c
arch/powerpc/platforms/85xx/tqm85xx.c static void __init tqm85xx_ti1520_fixup(struct =
Quoted 13 lines
index 325de77..19e711f 100644
arch/powerpc/platforms/85xx/tqm85xx.c +0
-0@@ -38,6 +38,8 @@#include <sysdev/fsl_soc.h> #include <sysdev/fsl_pci.h> =20
arch/powerpc/platforms/85xx/tqm85xx.c +2
-0+#include "mpc85xx.h" +#ifdef
CONFIG_CPM2
#include <asm/cpm2.h>
#include <sysdev/cpm2_pic.h>arch/powerpc/platforms/85xx/tqm85xx.c +0
-0@@ -173,19 +175,7 @@ static void __init tqm85xx_ti1520_fixup(struct =
pci_dev *pdev)
=
Quoted 21 lines
arch/powerpc/platforms/85xx/tqm85xx.c +0
-0DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_TI ,PCI_DEVICE_ID_TI_1520 , tqm85xx_ti1520_fixup);=20
arch/powerpc/platforms/85xx/tqm85xx.c +1
-13-static struct of_device_id __initdata of_bus_ids[] =3D { - { .compatible =3D "simple-bus", }, - { .compatible =3D "gianfar", }, - {}, -}; - -static int __init declare_of_platform_devices (void ) -{ -of_platform_bus_probe (NULL , of_bus_ids,NULL ); - -return 0 ; -} -machine_device_initcall (tqm85xx, declare_of_platform_devices); +machine_device_initcall (tqm85xx, mpc85xx_common_publish_devices);=20
static const char *board[] __initdata =3D { "tqc,tqm8540",= renamed from arch/powerpc/platforms/85xx/xes_mpc85xx.c +0
-0
b/arch/powerpc/platforms/85xx/xes_mpc85xx.c
Quoted 9 lines
index 0125604..0ee3721 100644
arch/powerpc/platforms/85xx/xes_mpc85xx.c +0
-0@@ -33,6 +33,8 @@#include <sysdev/fsl_soc.h> #include <sysdev/fsl_pci.h> =20
arch/powerpc/platforms/85xx/xes_mpc85xx.c +2
-0+#include "mpc85xx.h" +
Quoted 3 lines
/* A few bit definitions needed for fixups on some boards */
#defineMPC85xx_L2CTL_L2E0x80000000/* L2 enable */
#defineMPC85xx_L2CTL_L2I0x40000000/* L2 flash =
invalidate */
Quoted 27 lines
arch/powerpc/platforms/85xx/xes_mpc85xx.c +0
-0@@ -177,21 +179,9 @@ static void __init xes_mpc85xx_setup_arch(void)#endif }=20
arch/powerpc/platforms/85xx/xes_mpc85xx.c +3
-15-static struct of_device_id __initdata xes_mpc85xx_ids[] =3D { - { .type =3D "soc", }, - { .compatible =3D "soc", }, - { .compatible =3D "simple-bus", }, - { .compatible =3D "gianfar", }, - {}, -}; - -static int __init xes_mpc85xx_publish_devices (void ) -{ -return of_platform_bus_probe (NULL , xes_mpc85xx_ids,NULL ); -} -machine_device_initcall (xes_mpc8572, xes_mpc85xx_publish_devices); -machine_device_initcall (xes_mpc8548, xes_mpc85xx_publish_devices); -machine_device_initcall (xes_mpc8540, xes_mpc85xx_publish_devices); +machine_device_initcall (xes_mpc8572, mpc85xx_common_publish_devices); +machine_device_initcall (xes_mpc8548, mpc85xx_common_publish_devices); +machine_device_initcall (xes_mpc8540, mpc85xx_common_publish_devices);=20
/*
* Called very early, device-tree isn't unflattened
--=20
1.7.2.5
Re: [PATCH 14/14] 85xx: separate cpm2 pic init
In reply to Dmitry Eremin-SolenikovQuoted 1 line · Dmitry Eremin-Solenikov
Separate handling of CPM2 PIC initialization to =
mpc85xx_cpm2_pic_init()
Quoted 5 lines
function.
=20Signed-off-by Dmitry Eremin-Solenikov <[email protected]>---
arch/powerpc/platforms/85xx/ksi8560.c| 28 =
+------------------ > arch/powerpc/platforms/85xx/mpc85xx.h | 7 ++++ > arch/powerpc/platforms/85xx/mpc85xx_ads.c | 32 = +-------------------- > arch/powerpc/platforms/85xx/mpc85xx_common.c | 39 =
++++++++++++++++++++++++++
Quoted 1 line
arch/powerpc/platforms/85xx/sbc8560.c| 32 =
+-------------------- > arch/powerpc/platforms/85xx/tqm85xx.c | 35 = +----------------------
Quoted 1 line
6 files changed, 50 insertions(+), 123 deletions(-)
looks fine, move earlier in the sequence.
- k=
Kumar Gala
AppliedRe: [PATCH 06/14] 85xx/sbc8560: correct compilation if CONFIG_PHYS_ADDR_T_64BIT is set
In reply to Dmitry Eremin-SolenikovQuoted 4 lines · Dmitry Eremin-Solenikov
If
CONFIG_PHYS_ADDR_T_64BITis set, compilation of sbc8560 fails with the following error:
=20arch/powerpc/platforms/85xx/sbc8560.c: In function =
=91sbc8560_bdrstcr_init=92:
Quoted 1 line
arch/powerpc/platforms/85xx/sbc8560.c:286: error: format =91%x=92 =
expects type =91unsigned int=92, but argument 2 has type = =91resource_size_t=92
Quoted 8 lines
=20
Fix that by using %pR format instead of just printing the start of resource.
=20Signed-off-by Dmitry Eremin-Solenikov <[email protected]>---
arch/powerpc/platforms/85xx/sbc8560.c| 2 +-1 files changed, 1 insertions(+), 1 deletions(-)
applied to next-3.2
- k=
Kumar Gala
AppliedRe: [PATCH 07/14] 85xx/ksi8560: declare that localbus is compatbile with simple-bus
In reply to Dmitry Eremin-SolenikovQuoted 4 lines · Dmitry Eremin-Solenikov
Signed-off-by Dmitry Eremin-Solenikov <[email protected]>---
arch/powerpc/boot/dts/ksi8560.dts| 2 +-1 files changed, 1 insertions(+), 1 deletions(-)
applied to next-3.2
- k
Kumar Gala
AppliedRe: [PATCH 08/14] 85xx/sbc8560: declare that localbus is compatbile with simple-bus
In reply to Dmitry Eremin-SolenikovQuoted 4 lines · Dmitry Eremin-Solenikov
Signed-off-by Dmitry Eremin-Solenikov <[email protected]>---
arch/powerpc/boot/dts/sbc8560.dts| 2 +-1 files changed, 1 insertions(+), 1 deletions(-)
applied to next-3.2
- k
Quoted 1 line · Dmitry Eremin-Solenikov
I think it's already too late for this merge window, so this should =
stay
Quoted 1 line
for 3.2 merge window. Board files for mpc83xx platforms show lots of =
common
Quoted 1 line
code. Same goes for mpc85xx boards. This patchset is an initial =
attempt
Quoted 1 line
to merge some (most) of the common code. Based on the tree by Kumar =
Gala.
Quoted 2 lines
=20
The following changes since commit =
6471fc6630a507fd54fdaceceee1ddaf3c917cde:
Quoted 2 lines
=20
powerpc: Dont require adma_opsstruct to set dma mask (2011-07-08 =
00:21:36 -0500)
Quoted 8 lines
=20
Dmitry Eremin-Solenikov (14):
83xx: consolidateinit_IRQfunctions
83xx: consolidateof_platform_bus_probecalls
mpc8349emitx: mark localbus as compatible with simple-bus 83xx/mpc834x_itx: drop pq2pro-localbus-specific code 83xx: headers cleanup
85xx/sbc8560: correct compilation ifCONFIG_PHYS_ADDR_T_64BITis =
set
Quoted 3 lines
85xx/ksi8560: declare that localbus is compatbile with simple-bus 85xx/sbc8560: declare that localbus is compatbile with simple-bus 85xx/sbc8548: read hardware revision when it's required for first =
time
Quoted 3 lines
85xx/mpc85xx_rdb: merge
p1020_rdbandp2020_rdbmachine entries 85xx: merge 32-bit QorIQ with DPA boards support 85xx/mpc85xx_ds,ads,cds: move .pci_exclude_device setting to =
machine definitions
Quoted 2 lines
85xx: consolidate
of_platform_bus_probecalls 85xx: separate cpm2 pic init
Also patches subject should be of the form:
powerpc/85xx: ....
Please fix on next patch posting.
- k=
Re: [PATCH 01/14] 83xx: consolidate init_IRQ functions
In reply to Dmitry Eremin-SolenikovQuoted 1 line · Dmitry Eremin-Solenikov
On mpc83xx platform nearly all
_init_IRQfunctions look alike. They =
either
Quoted 1 line
just setup ipic, or setup ipic and QE PIC. Separate this to special =
functions
Quoted 7 lines
to be either referenced from
ppc_md, or called from board file. =20Signed-off-by Dmitry Eremin-Solenikov <[email protected]>---
arch/powerpc/platforms/83xx/asp834x.c | 20 +------------ arch/powerpc/platforms/83xx/km83xx.c | 33 +-------------------- arch/powerpc/platforms/83xx/misc.c | 46 =
+++++++++++++++++++++++++++++
=
Quoted 15 lines
arch/powerpc/platforms/83xx/mpc830x_rdb.c | 18 +---------- arch/powerpc/platforms/83xx/mpc831x_rdb.c | 18 +---------- arch/powerpc/platforms/83xx/mpc832x_mds.c | 30 +------------------ arch/powerpc/platforms/83xx/mpc832x_rdb.c | 31 +------------------- arch/powerpc/platforms/83xx/mpc834x_itx.c | 18 +---------- arch/powerpc/platforms/83xx/mpc834x_mds.c | 18 +---------- arch/powerpc/platforms/83xx/mpc836x_mds.c | 30 +------------------ arch/powerpc/platforms/83xx/mpc836x_rdk.c | 28 +----------------- arch/powerpc/platforms/83xx/mpc837x_mds.c | 18 +---------- arch/powerpc/platforms/83xx/mpc837x_rdb.c | 18 +---------- arch/powerpc/platforms/83xx/mpc83xx.h | 9 +++++ arch/powerpc/platforms/83xx/sbc834x.c | 20 +------------ 15 files changed, 68 insertions(+), 287 deletions(-)=20
= renamed from arch/powerpc/platforms/83xx/asp834x.c +0
-0
b/arch/powerpc/platforms/83xx/asp834x.c
=
Quoted 38 lines
index aa0d84d..90b6c06 100644
arch/powerpc/platforms/83xx/asp834x.c +0
-0@@ -36,24 +36,6 @@ static void __init asp834x_setup_arch(void)mpc834x_usb_cfg (); }=20
arch/powerpc/platforms/83xx/asp834x.c +0
-18-static void __init asp834x_init_IRQ (void ) -{ -struct device_node *np; - - np =3D of_find_node_by_type(NULL, "ipic"); -if (!np) -return ; - -ipic_init (np,0 ); - -of_node_put (np); - -/* Initialize the default interrupt mapping priorities, -* in case the boot rom changed something on us. -*/ -ipic_set_default_priority (); -} -static struct __initdata of_device_id asp8347_ids[] =3D { { .type =3D "soc", }, { .compatible =3D "soc", },arch/powerpc/platforms/83xx/asp834x.c +1
-1@@ -82,7 +64,7 @@ define_machine(asp834x) { .name =3D "ASP8347E", .probe =3D asp834x_probe, .setup_arch =3D asp834x_setup_arch, - .init_IRQ =3D asp834x_init_IRQ, + .init_IRQ =3D mpc83xx_ipic_init_IRQ, .get_irq =3D ipic_get_irq, .restart =3D mpc83xx_restart, .time_init =3D mpc83xx_time_init,= renamed from arch/powerpc/platforms/83xx/km83xx.c +0
-0
b/arch/powerpc/platforms/83xx/km83xx.c
arch/powerpc/platforms/83xx/km83xx.c static int __init =
Quoted 4 lines
index a2b9b9e..71ba863 100644
arch/powerpc/platforms/83xx/km83xx.c +0
-0@@ -140,37 +140,6 @@ static int __init =
kmeter_declare_of_platform_devices(void)
Quoted 2 lines
arch/powerpc/platforms/83xx/km83xx.c +0
-0}machine_device_initcall(mpc83xx_km, =
kmeter_declare_of_platform_devices);
Quoted 18 lines
=20
arch/powerpc/platforms/83xx/km83xx.c +0
-17-static void __init mpc83xx_km_init_IRQ (void ) -{ -struct device_node *np; - - np =3D of_find_compatible_node(NULL, NULL, "fsl,pq2pro-pic"); -if (!np) { - np =3D of_find_node_by_type(NULL, "ipic"); -if (!np) -return ; - } - -ipic_init (np,0 ); - -/* Initialize the default interrupt mapping priorities, -* in case the boot rom changed something on us. -*/ -ipic_set_default_priority ();
arch/powerpc/platforms/83xx/km83xx.c static int __init kmeter_declare_of_platform_devices(void)
Quoted 10 lines
arch/powerpc/platforms/83xx/km83xx.c +0
-10-of_node_put (np); - -#ifdef CONFIG_QUICC_ENGINE - np =3D of_find_compatible_node(NULL, NULL, "fsl,qe-ic"); -if (!np) { - np =3D of_find_node_by_type(NULL, "qeic"); -if (!np) -return ; - } - qe_ic_init(np, 0, qe_ic_cascade_low_ipic, =
qe_ic_cascade_high_ipic);
arch/powerpc/platforms/83xx/km83xx.c define_machine(mpc83xx_km) { · line 170
Quoted 13 lines
arch/powerpc/platforms/83xx/km83xx.c +0
-4-of_node_put (np); -#endif /* CONFIG_QUICC_ENGINE */ -} -/* list of the supported boards */
static char *board[] __initdata =3D { "Keymile,KMETER1",arch/powerpc/platforms/83xx/km83xx.c +1
-1@@ -198,7 +167,7 @@ define_machine(mpc83xx_km) { .name =3D "mpc83xx-km-platform", .probe =3D mpc83xx_km_probe, .setup_arch =3D mpc83xx_km_setup_arch, - .init_IRQ =3D mpc83xx_km_init_IRQ, + .init_IRQ =3D mpc83xx_both_init_IRQ,
make this mpc83xx_ipic_and_qe_init_IRQ
=
Quoted 4 lines
arch/powerpc/platforms/83xx/km83xx.c +0
-0.get_irq =3D ipic_get_irq, .restart =3D mpc83xx_restart, .time_init =3D mpc83xx_time_init,= renamed from arch/powerpc/platforms/83xx/misc.c +0
-0
b/arch/powerpc/platforms/83xx/misc.c
Quoted 20 lines
index f01806c..95f2274 100644
arch/powerpc/platforms/83xx/misc.c +0
-0@@ -11,9 +11,12 @@=20
#include <linux/stddef.h>
#include <linux/kernel.h>
+#include <linux/of_platform.h>
=20
#include <asm/io.h>
#include <asm/hw_irq.h>arch/powerpc/platforms/83xx/misc.c +2
-0+#include <asm/ipic.h> +#include <asm/qe_ic.h> #include <
sysdev/fsl_soc.h>
=20
#include "mpc83xx.h"arch/powerpc/platforms/83xx/misc.c +0
-0@@ -65,3 +68,46 @@ long __init mpc83xx_time_init(void)=20
return 0; }
arch/powerpc/platforms/83xx/misc.c long __init mpc83xx_time_init(void)
Quoted 6 lines
arch/powerpc/platforms/83xx/misc.c +6
-0+ +void __init mpc83xx_ipic_init_IRQ (void ) +{ +struct device_node *np; + +/* looking for fsl,pq2pro-pic which is asl compatible with =
fsl,ipic */
Quoted 18 lines
arch/powerpc/platforms/83xx/misc.c +18
-0+ np =3D of_find_compatible_node(NULL, NULL, "fsl,ipic"); +if (!np) + np =3D of_find_node_by_type(NULL, "ipic"); +if (!np) +return ; + +ipic_init (np,0 ); + +of_node_put (np); + +/* Initialize the default interrupt mapping priorities, +* in case the boot rom changed something on us. +*/ +ipic_set_default_priority (); +} + +#ifdef CONFIG_QUICC_ENGINE +void __init mpc83xx_qe_init_IRQ (void )
arch/powerpc/platforms/83xx/misc.c long __init mpc83xx_time_init(void)
Quoted 10 lines
arch/powerpc/platforms/83xx/misc.c +10
-0+{ +struct device_node *np; + + np =3D of_find_compatible_node(NULL, NULL, "fsl,qe-ic"); +if (!np) { + np =3D of_find_node_by_type(NULL, "qeic"); +if (!np) +return ; + } + qe_ic_init(np, 0, qe_ic_cascade_low_ipic, =
qe_ic_cascade_high_ipic);
arch/powerpc/platforms/83xx/misc.c long __init mpc83xx_time_init(void) · line 108
Quoted 4 lines
arch/powerpc/platforms/83xx/misc.c +4
-0+of_node_put (np); +} + +void __init mpc83xx_both_init_IRQ (void )
make this mpc83xx_ipic_and_qe_init_IRQ
arch/powerpc/platforms/83xx/misc.c long __init mpc83xx_time_init(void) · line 113
Quoted 5 lines
arch/powerpc/platforms/83xx/misc.c +5
-0+{ +mpc83xx_ipic_init_IRQ (); +mpc83xx_qe_init_IRQ (); +} +#endif /* CONFIG_QUICC_ENGINE */
- k
Kumar Gala
AppliedRe: [PATCH 03/14] mpc8349emitx: mark localbus as compatible with simple-bus
In reply to Dmitry Eremin-SolenikovQuoted 4 lines · Dmitry Eremin-Solenikov
Signed-off-by Dmitry Eremin-Solenikov <[email protected]>---
arch/powerpc/boot/dts/mpc8349emitx.dts| 3 ++-1 files changed, 2 insertions(+), 1 deletions(-)
applied to next-3.2
- k
Quoted 1 line · Dmitry Eremin-Solenikov
I think it's already too late for this merge window, so this should =
stay
Quoted 1 line
for 3.2 merge window. Board files for mpc83xx platforms show lots of =
common
Quoted 1 line
code. Same goes for mpc85xx boards. This patchset is an initial =
attempt
Quoted 1 line
to merge some (most) of the common code. Based on the tree by Kumar =
Gala.
Quoted 2 lines
=20
The following changes since commit =
6471fc6630a507fd54fdaceceee1ddaf3c917cde:
Quoted 2 lines
=20
powerpc: Dont require adma_opsstruct to set dma mask (2011-07-08 =
00:21:36 -0500)
Quoted 8 lines
=20
Dmitry Eremin-Solenikov (14):
83xx: consolidateinit_IRQfunctions
83xx: consolidateof_platform_bus_probecalls
mpc8349emitx: mark localbus as compatible with simple-bus 83xx/mpc834x_itx: drop pq2pro-localbus-specific code 83xx: headers cleanup
85xx/sbc8560: correct compilation ifCONFIG_PHYS_ADDR_T_64BITis =
set
Quoted 3 lines
85xx/ksi8560: declare that localbus is compatbile with simple-bus 85xx/sbc8560: declare that localbus is compatbile with simple-bus 85xx/sbc8548: read hardware revision when it's required for first =
time
Quoted 3 lines
85xx/mpc85xx_rdb: merge
p1020_rdbandp2020_rdbmachine entries 85xx: merge 32-bit QorIQ with DPA boards support 85xx/mpc85xx_ds,ads,cds: move .pci_exclude_device setting to =
machine definitions
Quoted 2 lines
85xx: consolidate
of_platform_bus_probecalls 85xx: separate cpm2 pic init
So for next round can you split this into two groups. One for 83xx and = one for 85xx.
- k=
Re: [PATCH 04/14] 83xx/mpc834x_itx: drop pq2pro-localbus-specific code
In reply to Dmitry Eremin-SolenikovQuoted 2 lines · On Tue, 19 Jul 2011 12:53:41 +0400 Dmitry Eremin-Solenikov…
As localbus on mpc8349e-mitx now provides simple-bus compatibility, we can drop code asking for pq2pro-localbus devices on
mpc834x_itxboards.
Do we have a good reason for breaking compatibility with older device trees?
-Scott
Re: [PATCH 13/14] 85xx: consolidate of_platform_bus_probe calls
In reply to Dmitry Eremin-Solenikovarch/powerpc/platforms/85xx/mpc85xx_common.c line 21
Quoted 9 lines · On Tue, 19 Jul 2011 12:53:50 +0400 Dmitry Eremin-Solenikov…
arch/powerpc/platforms/85xx/mpc85xx_common.c new file +9
-0+static struct of_device_id __initdata mpc85xx_common_ids[] = { + { .type ="soc" , }, + { .compatible ="soc" , }, + { .compatible ="simple-bus" , }, + { .compatible ="gianfar" , }, + { .compatible ="fsl,qe" , }, + { .compatible ="fsl,cpm2" , }, + {}, +};
Same comment as for 83xx regarding localbus and compatibility with old device trees.
-Scott
Re: [PATCH 08/14] 85xx/sbc8560: declare that localbus is compatbile with simple-bus
In reply to Dmitry Eremin-SolenikovSomething has gone off the rails with getmaintainer.pl or similar -- I'm guessing that
PaulM doesn't care about dts patches for some aging sbc8560 board,
P.
arch/powerpc/boot/dts/sb=
Quoted 6 lines · Dmitry Eremin-Solenikov
Signed-off-by Dmitry Eremin-Solenikov <[email protected]>---
=A0arch/powerpc/boot/dts/sbc8560.dts | =A0 =A02 +- =A01 files changed, 1 insertions(+), 1 deletions(-)arch/powerpc/boot/dts/sb= renamed from arch/powerpc/boot/dts/sbc8560.dts +0
-0
c8560.dts
arch/powerpc/boot/dts/sbc8560.dts line 334
Quoted 9 lines
index 9e13ed8..72078eb 100644
arch/powerpc/boot/dts/sbc8560.dts +1
-1@@ -331,7 +331,7 @@ =A0 =A0 =A0 =A0}; =A0 =A0 =A0 =A0localbus@ff705000 { - =A0 =A0 =A0 =A0 =A0 =A0 =A0 compatible =3D "fsl,mpc8560-localbus"; + =A0 =A0 =A0 =A0 =A0 =A0 =A0 compatible =3D "fsl,mpc8560-localbus", "sim=
ple-bus";
Quoted 3 lines
arch/powerpc/boot/dts/sbc8560.dts +0
-0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0#address-cells =3D <2>; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0#size-cells =3D <1>;=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0reg =3D <
0xff7050000x100>; =A0 =A0 =A0 //=
BRx, ORx, etc.
Quoted 8 lines
--
1.7.2.5_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 09/14] 85xx/sbc8548: read hardware revision when it's required for first time
In reply to Kumar GalaOn Tue, Jul 19, 2011 at 10:12 AM, Kumar Gala <[email protected]> wr= ote:
Quoted 7 lines · Dmitry Eremin-Solenikov
Quoted 5 lines
Currently sbc8548 reads hardware revision during bootup. To simplify things read it when it's first required when the kernel is up and running.
Quoted 6 lines
Quoted 4 lines
Signed-off-by Dmitry Eremin-Solenikov <[email protected]>---
arch/powerpc/platforms/85xx/sbc8548.c| =A0 =A08 +++++---1 files changed, 5 insertions(+), 3 deletions(-)How is this simplifying things, seems more complicated to add an addition=
al if() check.
Agreed -- I don't see what this is meant to achieve.
Paul.
Quoted 5 lines
- k
arch/powerpc/platfo=
Quoted 2 lines
arch/powerpc/platfo= renamed from arch/powerpc/platforms/85xx/sbc8548.c +0
-0
rms/85xx/sbc8548.c
Quoted 47 lines
Quoted 40 lines
index ecdd8c0..2eeb376 100644
arch/powerpc/platforms/85xx/sbc8548.c +5
-4@@ -49,7 +49,7 @@#include <sysdev/fsl_soc.h> #include <sysdev/fsl_pci.h> -static int sbc_rev; +static int sbc_rev =3D -EINVAL ;static void __init sbc8548_pic_init (void ) {@@ -82,7 +82,7 @@ static void __init sbc8548_pic_init(void) }/* Extract the HW Rev from the EPLD on the board */ -static int __init sbc8548_hw_rev (void ) +static int sbc8548_hw_rev (void ) { =A0 =A0 =A0 struct device_node *np; =A0 =A0 =A0 struct resource res;@@ -130,7 +130,6 @@ static void __init sbc8548_setup_arch(void) =A0 =A0 =A0 =A0 =A0 =A0 =A0 } =A0 =A0 =A0 }#endif - =A0 =A0 sbc_rev =3D sbc8548_hw_rev(); }static void sbc8548_show_cpuinfo (struct seq_file *m)@@ -140,6 +139,9 @@ static void sbc8548_show_cpuinfo(struct seq_file *m) =A0 =A0 =A0 pvid =3D mfspr(SPRN_PVR); =A0 =A0 =A0 svid =3D mfspr(SPRN_SVR); + =A0 =A0 if (sbc_rev =3D=3D -EINVAL) + =A0 =A0 =A0 =A0 =A0 =A0 sbc_rev =3D sbc8548_hw_rev(); + =A0 =A0 =A0 seq_printf(m, "Vendor\t\t: Wind River\n"); =A0 =A0 =A0 seq_printf(m, "Machine\t\t: SBC8548 v%d\n", sbc_rev); =A0 =A0 =A0 seq_printf(m, "PVR\t\t: 0x%x\n", pvid); --Quoted 1 line
1.7.2.5
_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 04/14] 83xx/mpc834x_itx: drop pq2pro-localbus-specific code
In reply to Scott WoodQuoted 7 lines · Scott Wood
Quoted 2 lines · On Tue, 19 Jul 2011 12:53:41 +0400 Dmitry Eremin-Solenikov…
As localbus on mpc8349e-mitx now provides simple-bus compatibility, we can drop code asking for pq2pro-localbus devices on
mpc834x_itxboards.Do we have a good reason for breaking compatibility with older device trees?
Hmm. No real reason if you look from this POV. Just didn't thought in this direction.
BTW: Documentation/devicetree/fsl/lbc.txt doesn't talk at all about "compatible" property. Maybe one can add there something (like asking to add simple-bus for new platforms). I feel myself too unexperienced to fix that.
Signature · 2 lines
With best wishes Dmitry
Re: [PATCH 13/14] 85xx: consolidate of_platform_bus_probe calls
In reply to Scott WoodQuoted 15 lines · Scott Wood
arch/powerpc/platforms/85xx/mpc85xx_common.c line 21
Quoted 9 lines · On Tue, 19 Jul 2011 12:53:50 +0400 Dmitry Eremin-Solenikov…
arch/powerpc/platforms/85xx/mpc85xx_common.c new file +9
-0+static struct of_device_id __initdata mpc85xx_common_ids[] = { + { .type ="soc" , }, + { .compatible ="soc" , }, + { .compatible ="simple-bus" , }, + { .compatible ="gianfar" , }, + { .compatible ="fsl,qe" , }, + { .compatible ="fsl,cpm2" , }, + {}, +};Same comment as for 83xx regarding localbus and compatibility with old device trees.
I checked for in-kernel device trees. Unless I miss something, there are no leftovers from this list. (83xx provided no simple-bus property for localbus, so your argument is valid there). If we should care about strange cases, not even blessed by kernel trees, I can add some of the old probes back.
What do you thing?
Signature · 2 lines
With best wishes Dmitry
Re: [PATCH 10/14] 85xx/mpc85xx_rdb: merge p1020_rdb and p2020_rdb machine entries
In reply to Kumar GalaQuoted 65 lines · Kumar Gala
Quoted 62 lines · Dmitry Eremin-Solenikov
p1020_rdbandp2020_rdbmachine entries bear no in-kernel differencies other than dt compatible strings. Merge them into single machine entry namedmpc85xx_rdbSigned-off-by Dmitry Eremin-Solenikov <[email protected]>---
arch/powerpc/platforms/85xx/mpc85xx_rdb.c| 40
++++++----------------------1 files changed, 9 insertions(+), 31 deletions(-)arch/powerpc/platforms/85xx/mpc85xx_rdb.c +6
-27@@ -120,47 +120,25 @@ static int __init mpc85xxrdb_publish_devices(void) {return of_platform_bus_probe (NULL , mpc85xxrdb_ids,NULL ); } -machine_device_initcall (p2020_rdb, mpc85xxrdb_publish_devices); -machine_device_initcall (p1020_rdb, mpc85xxrdb_publish_devices); +machine_device_initcall (mpc85xx_rdb, mpc85xxrdb_publish_devices);/* * Called very early, device-tree isn't unflattened */ -static int __init p2020_rdb_probe (void ) +static int __init mpc85xx_rdb_probe (void ) {unsigned long root =of_get_flat_dt_root (); -if (of_flat_dt_is_compatible (root,"fsl,P2020RDB" )) +if (of_flat_dt_is_compatible (root,"fsl,P1020RDB" ) || +of_flat_dt_is_compatible (root,"fsl,P2020RDB" )) {return 1 ; -return 0 ; + }else +return 0 ; } -static int __init p1020_rdb_probe (void ) -{ -unsigned long root =of_get_flat_dt_root (); - -if (of_flat_dt_is_compatible (root,"fsl,P1020RDB" )) -return 1 ; -return 0 ; -} - -define_machine (p2020_rdb) { - .name = "P2020 RDB", - .probe = p2020_rdb_probe, - .setup_arch = mpc85xx_rdb_setup_arch, - .init_IRQ = mpc85xx_rdb_pic_init, -#ifdef CONFIG_PCI - .pcibios_fixup_bus = fsl_pcibios_fixup_bus, -#endif - .get_irq = mpic_get_irq, - .restart = fsl_rstcr_restart, - .calibrate_decr = generic_calibrate_decr, - .progress = udbg_progress, -};
Quoted 8 lines
arch/powerpc/platforms/85xx/mpc85xx_rdb.c static int __init mpc85xxrdb_publish_devices(void) · line 140
Quoted 6 lines
arch/powerpc/platforms/85xx/mpc85xx_rdb.c +2
-4- -define_machine (p1020_rdb) { - .name = "P1020 RDB", - .probe = p1020_rdb_probe, +define_machine (mpc85xx_rdb) { + .name = "MPC85xx RDB",breaking 'name' this way isn't acceptable.
What would be suitable from your point of view? Does "Px020 RDB" look good? Or something like it?
Quoted 9 lines
Quoted 7 lines
arch/powerpc/platforms/85xx/mpc85xx_rdb.c +1
-1+ .probe = mpc85xx_rdb_probe, .setup_arch = mpc85xx_rdb_setup_arch, .init_IRQ = mpc85xx_rdb_pic_init,#ifdef CONFIG_PCI --1.7.2.5
Signature · 2 lines
With best wishes Dmitry
Re: [PATCH 12/14] 85xx/mpc85xx_ds,ads,cds: move .pci_exclude_device setting to machine definitions
In reply to Kumar GalaQuoted 10 lines · Kumar Gala
Quoted 6 lines · Dmitry Eremin-Solenikov
Signed-off-by Dmitry Eremin-Solenikov <[email protected]>---
arch/powerpc/platforms/85xx/mpc85xx_ads.c | 5 +++-- arch/powerpc/platforms/85xx/mpc85xx_cds.c | 5 ++--- arch/powerpc/platforms/85xx/mpc85xx_ds.c | 5 +++-- 3 files changed, 8 insertions(+), 7 deletions(-)
Quoted 4 lines
I believe these are done this way for a reason (its been some time). I can't remember if it maters or not, but having
pci_exclude_device()means that any code infsl_add_bridge()would not be impacted by the exclude function.
Hmm. I have to check this.
BTW: what is the point in disabling access to bus == 0 && PCI_SLOT == 0 on some of those boards (esp. ads)? Other boards lack this check/exclude. Does it mean something historical (and so can be dropped), is it some workaround/bugfix (then it should be propagated to other boards??) or something else?
Quoted 2 lines
Not sure what value making this change has at this point.
One of my big goals is to drop most of differencies from setup_arch functions (one simple function can handle all things like PCI, SWIOTLB, etc). Not yet ready
for submission though (not enough time to clean all the things). And moving this assignment to static code would allow me to drop setup_arch() function completely
(more or less) on these boards.
Quoted 94 lines
- k
Quoted 89 lines
arch/powerpc/platforms/85xx/mpc85xx_ads.c +3
-2@@ -200,8 +200,6 @@ static void __init mpc85xx_ads_setup_arch(void)#ifdef CONFIG_PCI for_each_compatible_node (np,"pci" ,"fsl,mpc8540-pci" )fsl_add_bridge (np,1 ); - - ppc_md.pci_exclude_device = mpc85xx_exclude_device;#endif }@@ -254,6 +252,9 @@ define_machine(mpc85xx_ads) { .probe = mpc85xx_ads_probe, .setup_arch = mpc85xx_ads_setup_arch, .init_IRQ = mpc85xx_ads_pic_init, +#ifdef CONFIG_PCI + .pci_exclude_device = mpc85xx_exclude_device, +#endif .show_cpuinfo = mpc85xx_ads_show_cpuinfo, .get_irq = mpic_get_irq, .restart = fsl_rstcr_restart,arch/powerpc/platforms/85xx/mpc85xx_cds.c +2
-3@@ -297,9 +297,6 @@ static void __init mpc85xx_cds_setup_arch(void) fsl_add_bridge(np, 0); } } - - ppc_md.pci_irq_fixup = mpc85xx_cds_pci_irq_fixup; - ppc_md.pci_exclude_device = mpc85xx_exclude_device;#endif }@@ -355,6 +352,8 @@ define_machine(mpc85xx_cds) {#ifdef CONFIG_PCI .restart = mpc85xx_cds_restart, .pcibios_fixup_bus = fsl_pcibios_fixup_bus, + .pci_irq_fixup = mpc85xx_cds_pci_irq_fixup, + .pci_exclude_device = mpc85xx_exclude_device, #else .restart = fsl_rstcr_restart,#endif arch/powerpc/platforms/85xx/mpc85xx_ds.c +3
-3@@ -182,8 +182,6 @@ static void __init mpc85xx_ds_setup_arch(void) hose->dma_window_size); } } - - ppc_md.pci_exclude_device = mpc85xx_exclude_device;#endif #ifdef CONFIG_SMP @@ -279,6 +277,7 @@ define_machine(mpc8544_ds) { .init_IRQ = mpc85xx_ds_pic_init, #ifdef CONFIG_PCI .pcibios_fixup_bus = fsl_pcibios_fixup_bus, + .pci_exclude_device = mpc85xx_exclude_device, #endif .get_irq = mpic_get_irq, .restart = fsl_rstcr_restart,@@ -293,6 +292,7 @@ define_machine(mpc8572_ds) { .init_IRQ = mpc85xx_ds_pic_init, #ifdef CONFIG_PCI .pcibios_fixup_bus = fsl_pcibios_fixup_bus, + .pci_exclude_device = mpc85xx_exclude_device, #endif .get_irq = mpic_get_irq, .restart = fsl_rstcr_restart,@@ -307,6 +307,7 @@ define_machine(p2020_ds) { .init_IRQ = mpc85xx_ds_pic_init, #ifdef CONFIG_PCI .pcibios_fixup_bus = fsl_pcibios_fixup_bus, + .pci_exclude_device = mpc85xx_exclude_device, #endif .get_irq = mpic_get_irq, .restart = fsl_rstcr_restart, --1.7.2.5
Signature · 2 lines
With best wishes Dmitry
Re: [PATCH 10/14] 85xx/mpc85xx_rdb: merge p1020_rdb and p2020_rdb machine entries
In reply to Kumar GalaQuoted 65 lines · Kumar Gala
Quoted 62 lines · Dmitry Eremin-Solenikov
p1020_rdbandp2020_rdbmachine entries bear no in-kernel differencies other than dt compatible strings. Merge them into single machine entry namedmpc85xx_rdbSigned-off-by Dmitry Eremin-Solenikov <[email protected]>---
arch/powerpc/platforms/85xx/mpc85xx_rdb.c| 40
++++++----------------------1 files changed, 9 insertions(+), 31 deletions(-)arch/powerpc/platforms/85xx/mpc85xx_rdb.c +6
-27@@ -120,47 +120,25 @@ static int __init mpc85xxrdb_publish_devices(void) {return of_platform_bus_probe (NULL , mpc85xxrdb_ids,NULL ); } -machine_device_initcall (p2020_rdb, mpc85xxrdb_publish_devices); -machine_device_initcall (p1020_rdb, mpc85xxrdb_publish_devices); +machine_device_initcall (mpc85xx_rdb, mpc85xxrdb_publish_devices);/* * Called very early, device-tree isn't unflattened */ -static int __init p2020_rdb_probe (void ) +static int __init mpc85xx_rdb_probe (void ) {unsigned long root =of_get_flat_dt_root (); -if (of_flat_dt_is_compatible (root,"fsl,P2020RDB" )) +if (of_flat_dt_is_compatible (root,"fsl,P1020RDB" ) || +of_flat_dt_is_compatible (root,"fsl,P2020RDB" )) {return 1 ; -return 0 ; + }else +return 0 ; } -static int __init p1020_rdb_probe (void ) -{ -unsigned long root =of_get_flat_dt_root (); - -if (of_flat_dt_is_compatible (root,"fsl,P1020RDB" )) -return 1 ; -return 0 ; -} - -define_machine (p2020_rdb) { - .name = "P2020 RDB", - .probe = p2020_rdb_probe, - .setup_arch = mpc85xx_rdb_setup_arch, - .init_IRQ = mpc85xx_rdb_pic_init, -#ifdef CONFIG_PCI - .pcibios_fixup_bus = fsl_pcibios_fixup_bus, -#endif - .get_irq = mpic_get_irq, - .restart = fsl_rstcr_restart, - .calibrate_decr = generic_calibrate_decr, - .progress = udbg_progress, -};
Quoted 8 lines
arch/powerpc/platforms/85xx/mpc85xx_rdb.c static int __init mpc85xxrdb_publish_devices(void) · line 140
Quoted 6 lines
arch/powerpc/platforms/85xx/mpc85xx_rdb.c +2
-4- -define_machine (p1020_rdb) { - .name = "P1020 RDB", - .probe = p1020_rdb_probe, +define_machine (mpc85xx_rdb) { + .name = "MPC85xx RDB",breaking 'name' this way isn't acceptable.
BTW: what is so special in p1010rdb, so it's not merged into this file, but exists as a separate .c file?
Quoted 9 lines
Quoted 7 lines
arch/powerpc/platforms/85xx/mpc85xx_rdb.c +1
-1+ .probe = mpc85xx_rdb_probe, .setup_arch = mpc85xx_rdb_setup_arch, .init_IRQ = mpc85xx_rdb_pic_init,#ifdef CONFIG_PCI --1.7.2.5
Signature · 2 lines
With best wishes Dmitry
Re: [PATCH 13/14] 85xx: consolidate of_platform_bus_probe calls
In reply to Dmitry Eremin-SolenikovQuoted 17 lines · On Fri, 22 Jul 2011 23:44:01 +0400 Dmitry Eremin-Solenikov…
Quoted 15 lines · Scott Wood
arch/powerpc/platforms/85xx/mpc85xx_common.c line 21
Quoted 9 lines · On Tue, 19 Jul 2011 12:53:50 +0400 Dmitry Eremin-Solenikov…
arch/powerpc/platforms/85xx/mpc85xx_common.c new file +9
-0+static struct of_device_id __initdata mpc85xx_common_ids[] = { + { .type ="soc" , }, + { .compatible ="soc" , }, + { .compatible ="simple-bus" , }, + { .compatible ="gianfar" , }, + { .compatible ="fsl,qe" , }, + { .compatible ="fsl,cpm2" , }, + {}, +};Same comment as for 83xx regarding localbus and compatibility with old device trees.
Quoted 4 lines
I checked for in-kernel device trees. Unless I miss something, there are no leftovers from this list. (83xx provided no simple-bus property for localbus, so your argument is valid there). If we should care about strange cases, not even blessed by kernel trees, I can add some of the old probes back.
I see simple-bus missing in sbc8560 and ksi8560 -- were these included in the consolidation? Plus some of the others may have had simple-bus added after their initial version.
As for out-of-tree trees (which could include trees dynamically generated/augmented by firmware, as well as device trees for custom boards that forked off of an old reference board tree), it's still nice to not break them as long as they stick to the binding.
While the localbus binding is deficient regarding the compatible property, IIRC localbus preceded the introduction of simple-bus, which appears to be defined only in ePAPR (not in Linux or on devicetree.org). The ePAPR language does not suggest that it's mandatory for all buses that don't need special handling -- in fact, the language could be read as suggesting that it's only applicable to the "internal I/O bus" on an SoC (whereas this is an external bus), though that wasn't the intent behind it.
The notion of probing buses isn't really a part of the device tree specs; they're more concerned with binding the devices themselves. In theory Linux should probably be probing everything that a driver will match, regardless of where in the tree it is, except where an ancestor node is diasbled, has matched a driver that wants to do things differently, or is on a blacklist. Of course, that's somewhat of a philosophical question on whether it's better to risk probing someting that shouldn't be, or not probing something that should be. The former is often nastier but more obvious, the latter is more likely until simple-bus is more widely used, and either one results in something not working.
Leaving the localbus in may help someone, and it shouldn't hurt anything.
-Scott
Re: [PATCH 13/14] 85xx: consolidate of_platform_bus_probe calls
Quoted 27 lines · Scott Wood
Quoted 17 lines · On Fri, 22 Jul 2011 23:44:01 +0400 Dmitry Eremin-Solenikov…
Quoted 15 lines · Scott Wood
arch/powerpc/platforms/85xx/mpc85xx_common.c line 21
Quoted 9 lines · On Tue, 19 Jul 2011 12:53:50 +0400 Dmitry Eremin-Solenikov…
arch/powerpc/platforms/85xx/mpc85xx_common.c new file +9
-0+static struct of_device_id __initdata mpc85xx_common_ids[] = { + { .type ="soc" , }, + { .compatible ="soc" , }, + { .compatible ="simple-bus" , }, + { .compatible ="gianfar" , }, + { .compatible ="fsl,qe" , }, + { .compatible ="fsl,cpm2" , }, + {}, +};Same comment as for 83xx regarding localbus and compatibility with old device trees.
Quoted 6 lines
I checked for in-kernel device trees. Unless I miss something, there are no
leftovers from this list. (83xx provided no simple-bus property for localbus,
so your argument is valid there). If we should care about strange cases, not even blessed by kernel trees, I can add some of the old probes back.
Quoted 3 lines
I see simple-bus missing in sbc8560 and ksi8560 -- were these included in the consolidation? Plus some of the others may have had simple-bus added after their initial version.
Patches for those are included in the patch serie. Kumar has applied them to next-3.2.
Quoted 4 lines
As for out-of-tree trees (which could include trees dynamically generated/augmented by firmware, as well as device trees for custom boards that forked off of an old reference board tree), it's still nice to not break them as long as they stick to the binding.
I see your point. I just wasn't thinking too much about ot-of-tree trees. My thought was that if someone updates the kernel, he can also update the dtb.
Quoted 7 lines
While the localbus binding is deficient regarding the compatible property, IIRC localbus preceded the introduction of simple-bus, which appears to be defined only in ePAPR (not in Linux or on devicetree.org). The ePAPR language does not suggest that it's mandatory for all buses that don't need special handling -- in fact, the language could be read as suggesting that it's only applicable to the "internal I/O bus" on an SoC (whereas this is an external bus), though that wasn't the intent behind it.
Could you please update the lbc.txt suggesting the compatibility with simple-bus for lbc? Or you thing that it would be wrong?
I think we should define compatibility list as "fsl,mpcXXXX-localbus", "fsl,pqXXXXX-localbus", "simple-bus", noting that by default new platforms/boards should only use "simple-bus" internally. Does this look reasonable for you? I can then try to provide a patch.
Quoted 11 lines
The notion of probing buses isn't really a part of the device tree specs; they're more concerned with binding the devices themselves. In theory Linux should probably be probing everything that a driver will match, regardless of where in the tree it is, except where an ancestor node is diasbled, has matched a driver that wants to do things differently, or is on a blacklist. Of course, that's somewhat of a philosophical question on whether it's better to risk probing someting that shouldn't be, or not probing something that should be. The former is often nastier but more obvious, the latter is more likely until simple-bus is more widely used, and either one results in something not working.
Quoted 1 line
Leaving the localbus in may help someone, and it shouldn't hurt anything.
What do you suggest/prefer? To add .name="localbus" to generic code or to have board-specific hooks (like one for mpc834xemitx)?
So,
Quoted 4 lines
-Scott
Signature · 2 lines
With best wishes Dmitry
Re: [PATCH 13/14] 85xx: consolidate of_platform_bus_probe calls
Quoted 2 lines · On Sat, 23 Jul 2011 01:45:53 +0400 Dmitry Eremin-Solenikov…
I see your point. I just wasn't thinking too much about ot-of-tree trees. My thought was that if someone updates the kernel, he can also update the dtb.
Sometimes there are firmware dependencies that make that difficult. And even if it's just user laziness/forgetfulness, that still translates to extra support requests.
Quoted 7 lines
Could you please update the lbc.txt suggesting the compatibility with simple-bus for lbc? Or you thing that it would be wrong?
I think we should define compatibility list as "fsl,mpcXXXX-localbus", "fsl,pqXXXXX-localbus", "simple-bus", noting that by default new platforms/boards should only use "simple-bus" internally. Does this look reasonable for you? I can then try to provide a patch.
I'm OK with saying that localbus nodes should have simple-bus in new trees, and defining canonical compatible values (chips with eLBC should be "fsl,XXXX-elbc", "fsl,elbc", "simple-bus"). I'm not sure what you mean by "should only use simple-bus internally", especially in the context of the binding.
Quoted 2 lines
What do you suggest/prefer? To add .name="localbus" to generic code or to have board-specific hooks (like one for mpc834xemitx)?
Just add localbus to the generic table.
-Scott