powerpc/fsl-pci: Unify pci/pcie initialization code
Subsystems (5)
PATCH v10 1/1 powerpc/fsl-pci: Unify pci/pcie initialization code
We unified the Freescale pci/pcie initialization by changing the fsl_pci to a platform driver. In previous PCI code architecture the initialization routine is called at board_setup_arch stage. Now the initialization is done in probe function which is architectural better. Also It's convenient for adding PM support for PCI controller in later patch.
Now we registered pci controllers as platform devices. So we combine two initialization code as one platform driver.
---
Changes for V10:
* Just update comments for mpc85xx_cds_pci_assign_primary
arch/powerpc/platforms/85xx/common.c | 10 +++ arch/powerpc/platforms/85xx/corenet_ds.c | 34 ++-------- arch/powerpc/platforms/85xx/ge_imp3a.c | 62 ++++++----------- arch/powerpc/platforms/85xx/mpc8536_ds.c | 36 +--------- arch/powerpc/platforms/85xx/mpc85xx_ads.c | 11 +-- arch/powerpc/platforms/85xx/mpc85xx_cds.c | 44 +++++++++---- arch/powerpc/platforms/85xx/mpc85xx_ds.c | 14 ++-- arch/powerpc/platforms/85xx/mpc85xx_mds.c | 40 ++--------- arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 30 +++----- arch/powerpc/platforms/85xx/p1010rdb.c | 14 +--- arch/powerpc/platforms/85xx/p1022_ds.c | 36 +--------- arch/powerpc/platforms/85xx/p1022_rdk.c | 36 +--------- arch/powerpc/platforms/85xx/p1023_rds.c | 9 +-- arch/powerpc/platforms/85xx/p2041_rdb.c | 2 +- arch/powerpc/platforms/85xx/p3041_ds.c | 2 +- arch/powerpc/platforms/85xx/p4080_ds.c | 2 +- arch/powerpc/platforms/85xx/p5020_ds.c | 2 +- arch/powerpc/platforms/85xx/p5040_ds.c | 2 +- arch/powerpc/platforms/85xx/qemu_e500.c | 4 +- arch/powerpc/platforms/85xx/sbc8548.c | 21 +----- arch/powerpc/platforms/85xx/socrates.c | 11 +--- arch/powerpc/platforms/85xx/stx_gp3.c | 13 +--- arch/powerpc/platforms/85xx/tqm85xx.c | 21 +----- arch/powerpc/platforms/85xx/xes_mpc85xx.c | 56 ++------------- arch/powerpc/platforms/86xx/gef_ppc9a.c | 12 +-- arch/powerpc/platforms/86xx/gef_sbc310.c | 13 +--- arch/powerpc/platforms/86xx/gef_sbc610.c | 12 +-- arch/powerpc/platforms/86xx/mpc8610_hpcd.c | 21 ++---- arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 42 ++---------- arch/powerpc/platforms/86xx/sbc8641d.c | 14 +--- arch/powerpc/sysdev/fsl_pci.c | 102 +++++++++++++++++----------- arch/powerpc/sysdev/fsl_pci.h | 15 +++- drivers/edac/mpc85xx_edac.c | 43 +++--------- 33 files changed, 249 insertions(+), 537 deletions(-)
arch/powerpc/platforms/85xx/common.c +10 -0
@@ -27,6 +27,16 @@ static struct of_device_id __initdata mpc85xx_common_ids[] = { { .compatible = "fsl,mpc8548-guts", }, /* Probably unnecessary? */ { .compatible = "gpio-leds", }, + /* For all PCI controllers */ + { .compatible = "fsl,mpc8540-pci", }, + { .compatible = "fsl,mpc8548-pcie", }, + { .compatible = "fsl,p1022-pcie", }, + { .compatible = "fsl,p1010-pcie", }, + { .compatible = "fsl,p1023-pcie", }, + { .compatible = "fsl,p4080-pcie", }, + { .compatible = "fsl,qoriq-pcie-v2.4", }, + { .compatible = "fsl,qoriq-pcie-v2.3", }, + { .compatible = "fsl,qoriq-pcie-v2.2", }, {}, };
arch/powerpc/platforms/85xx/corenet_ds.c +5 -29
@@ -16,7 +16,6 @@#include <linux/kdev_t.h> #include <linux/delay.h> #include <linux/interrupt.h> -#include <linux/memblock.h> #include <asm/time.h> #include <asm/machdep.h>
@@ -52,39 +51,16 @@ void __init corenet_ds_pic_init(void)*/ void __init corenet_ds_setup_arch (void ) { -#ifdef CONFIG_PCI -struct device_node *np; -struct pci_controller *hose; -#endif -dma_addr_t max =0xffffffff ; -mpc85xx_smp_init (); -#ifdef CONFIG_PCI -for_each_node_by_type (np,"pci" ) { -if (of_device_is_compatible (np,"fsl,p4080-pcie" ) || -of_device_is_compatible (np,"fsl,qoriq-pcie-v2.2" ) || -of_device_is_compatible (np,"fsl,qoriq-pcie-v2.3" ) || -of_device_is_compatible (np,"fsl,qoriq-pcie-v2.4" )) { -fsl_add_bridge (np,0 ); - hose =pci_find_hose_for_OF_device (np); - max =min (max, hose->dma_window_base_cur + - hose->dma_window_size); - } - } - -#ifdef CONFIG_PPC64 +#if defined(CONFIG_PCI ) && defined(CONFIG_PPC64 )pci_devs_phb_init ();#endif -#endif -#ifdef CONFIG_SWIOTLB -if ((memblock_end_of_DRAM () -1 ) > max) { - ppc_swiotlb_enable =1 ; -set_pci_dma_ops (&swiotlb_dma_ops); - ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb; - } -#endif +fsl_pci_assign_primary (); + +swiotlb_detect_4g (); +pr_info ("%s board from Freescale Semiconductor\n" , ppc_md.name); }
arch/powerpc/platforms/85xx/ge_imp3a.c +20 -42
97 lines not on this page · raw message
arch/powerpc/platforms/85xx/mpc8536_ds.c +3 -33
@@ -17,7 +17,6 @@#include <linux/seq_file.h> #include <linux/interrupt.h> #include <linux/of_platform.h> -#include <linux/memblock.h> #include <asm/time.h> #include <asm/machdep.h>
@@ -46,46 +45,17 @@ void __init mpc8536_ds_pic_init(void)*/ static void __init mpc8536_ds_setup_arch (void ) { -#ifdef CONFIG_PCI -struct device_node *np; -struct pci_controller *hose; -#endif -dma_addr_t max =0xffffffff ; -if (ppc_md.progress) ppc_md.progress ("mpc8536_ds_setup_arch()" ,0 ); -#ifdef CONFIG_PCI -for_each_node_by_type (np,"pci" ) { -if (of_device_is_compatible (np,"fsl,mpc8540-pci" ) || -of_device_is_compatible (np,"fsl,mpc8548-pcie" )) { -struct resource rsrc; -of_address_to_resource (np,0 , &rsrc); -if ((rsrc.start &0xfffff ) ==0x8000 ) -fsl_add_bridge (np,1 ); -else -fsl_add_bridge (np,0 ); - - hose =pci_find_hose_for_OF_device (np); - max =min (max, hose->dma_window_base_cur + - hose->dma_window_size); - } - } - -#endif +fsl_pci_assign_primary (); -#ifdef CONFIG_SWIOTLB -if ((memblock_end_of_DRAM () -1 ) > max) { - ppc_swiotlb_enable =1 ; -set_pci_dma_ops (&swiotlb_dma_ops); - ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb; - } -#endif +swiotlb_detect_4g ();printk ("MPC8536 DS board from Freescale Semiconductor\n" ); } -machine_device_initcall (mpc8536_ds, mpc85xx_common_publish_devices); +machine_arch_initcall (mpc8536_ds, mpc85xx_common_publish_devices);machine_arch_initcall (mpc8536_ds, swiotlb_setup_bus_notifier);
arch/powerpc/platforms/85xx/mpc85xx_ads.c +3 -8
@@ -137,10 +137,6 @@ static void __init init_ioports(void)static void __init mpc85xx_ads_setup_arch (void ) { -#ifdef CONFIG_PCI -struct device_node *np; -#endif -if (ppc_md.progress) ppc_md.progress ("mpc85xx_ads_setup_arch()" ,0 );
@@ -150,11 +146,10 @@ static void __init mpc85xx_ads_setup_arch(void)#endif #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 + +fsl_pci_assign_primary (); }static void mpc85xx_ads_show_cpuinfo (struct seq_file *m)
@@ -173,7 +168,7 @@ static void mpc85xx_ads_show_cpuinfo(struct seq_file *m)seq_printf (m,"PLL setting\t: 0x%x\n" , ((phid1 >>24 ) &0x3f )); } -machine_device_initcall (mpc85xx_ads, mpc85xx_common_publish_devices); +machine_arch_initcall (mpc85xx_ads, mpc85xx_common_publish_devices);/* * Called very early, device-tree isn't unflattened
arch/powerpc/platforms/85xx/mpc85xx_cds.c +31 -13
65 lines not on this page · raw message
arch/powerpc/platforms/85xx/mpc85xx_ds.c +6 -8
@@ -20,7 +20,6 @@#include <linux/seq_file.h> #include <linux/interrupt.h> #include <linux/of_platform.h> -#include <linux/memblock.h> #include <asm/time.h> #include <asm/machdep.h>
@@ -129,13 +128,11 @@ static int mpc85xx_exclude_device(struct pci_controller *hose, }#endif /* CONFIG_PCI */ -static void __init mpc85xx_ds_pci_init (void ) +static void __init mpc85xx_ds_uli_init (void ) {#ifdef CONFIG_PCI struct device_node *node; -fsl_pci_init (); -/* See if we have a ULI under the primary */ node =of_find_node_by_name (NULL ,"uli1575" );
@@ -160,7 +157,8 @@ static void __init mpc85xx_ds_setup_arch(void) ppc_md.progress ("mpc85xx_ds_setup_arch()" ,0 );swiotlb_detect_4g (); -mpc85xx_ds_pci_init (); +fsl_pci_assign_primary (); +mpc85xx_ds_uli_init ();mpc85xx_smp_init ();printk ("MPC85xx DS board from Freescale Semiconductor\n" );
@@ -176,9 +174,9 @@ static int __init mpc8544_ds_probe(void)return !!of_flat_dt_is_compatible (root,"MPC8544DS" ); } -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, mpc85xx_common_publish_devices); +machine_arch_initcall (mpc8572_ds, mpc85xx_common_publish_devices); +machine_arch_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 +6 -34
@@ -327,44 +327,16 @@ static void __init mpc85xx_mds_qeic_init(void) { }static void __init mpc85xx_mds_setup_arch (void ) { -#ifdef CONFIG_PCI -struct pci_controller *hose; -struct device_node *np; -#endif -dma_addr_t max =0xffffffff ; -if (ppc_md.progress) ppc_md.progress ("mpc85xx_mds_setup_arch()" ,0 ); -#ifdef CONFIG_PCI -for_each_node_by_type (np,"pci" ) { -if (of_device_is_compatible (np,"fsl,mpc8540-pci" ) || -of_device_is_compatible (np,"fsl,mpc8548-pcie" )) { -struct resource rsrc; -of_address_to_resource (np,0 , &rsrc); -if ((rsrc.start &0xfffff ) ==0x8000 ) -fsl_add_bridge (np,1 ); -else -fsl_add_bridge (np,0 ); - - hose =pci_find_hose_for_OF_device (np); - max =min (max, hose->dma_window_base_cur + - hose->dma_window_size); - } - } -#endif -mpc85xx_smp_init ();mpc85xx_mds_qe_init (); -#ifdef CONFIG_SWIOTLB -if ((memblock_end_of_DRAM () -1 ) > max) { - ppc_swiotlb_enable =1 ; -set_pci_dma_ops (&swiotlb_dma_ops); - ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb; - } -#endif +fsl_pci_assign_primary (); + +swiotlb_detect_4g (); }
@@ -409,9 +381,9 @@ static int __init mpc85xx_publish_devices(void)return mpc85xx_common_publish_devices (); } -machine_device_initcall (mpc8568_mds, mpc85xx_publish_devices); -machine_device_initcall (mpc8569_mds, mpc85xx_publish_devices); -machine_device_initcall (p1021_mds, mpc85xx_common_publish_devices); +machine_arch_initcall (mpc8568_mds, mpc85xx_publish_devices); +machine_arch_initcall (mpc8569_mds, mpc85xx_publish_devices); +machine_arch_initcall (p1021_mds, mpc85xx_common_publish_devices);machine_arch_initcall (mpc8568_mds, swiotlb_setup_bus_notifier);machine_arch_initcall (mpc8569_mds, swiotlb_setup_bus_notifier);
arch/powerpc/platforms/85xx/mpc85xx_rdb.c +12 -18
@@ -86,23 +86,17 @@ void __init mpc85xx_rdb_pic_init(void)*/ static void __init mpc85xx_rdb_setup_arch (void ) { -#if defined(CONFIG_PCI ) || defined(CONFIG_QUICC_ENGINE ) +#ifdef CONFIG_QUICC_ENGINE struct device_node *np;#endif if (ppc_md.progress) ppc_md.progress ("mpc85xx_rdb_setup_arch()" ,0 ); -#ifdef CONFIG_PCI -for_each_node_by_type (np,"pci" ) { -if (of_device_is_compatible (np,"fsl,mpc8548-pcie" )) -fsl_add_bridge (np,0 ); - } - -#endif -mpc85xx_smp_init (); +fsl_pci_assign_primary (); +#ifdef CONFIG_QUICC_ENGINE np =of_find_compatible_node (NULL ,NULL ,"fsl,qe" );if (!np) {
@@ -161,15 +155,15 @@ qe_fail:printk (KERN_INFO "MPC85xx RDB board from Freescale Semiconductor\n" ); } -machine_device_initcall (p2020_rdb, mpc85xx_common_publish_devices); -machine_device_initcall (p2020_rdb_pc, mpc85xx_common_publish_devices); -machine_device_initcall (p1020_mbg_pc, mpc85xx_common_publish_devices); -machine_device_initcall (p1020_rdb, mpc85xx_common_publish_devices); -machine_device_initcall (p1020_rdb_pc, mpc85xx_common_publish_devices); -machine_device_initcall (p1020_utm_pc, mpc85xx_common_publish_devices); -machine_device_initcall (p1021_rdb_pc, mpc85xx_common_publish_devices); -machine_device_initcall (p1025_rdb, mpc85xx_common_publish_devices); -machine_device_initcall (p1024_rdb, mpc85xx_common_publish_devices); +machine_arch_initcall (p2020_rdb, mpc85xx_common_publish_devices); +machine_arch_initcall (p2020_rdb_pc, mpc85xx_common_publish_devices); +machine_arch_initcall (p1020_mbg_pc, mpc85xx_common_publish_devices); +machine_arch_initcall (p1020_rdb, mpc85xx_common_publish_devices); +machine_arch_initcall (p1020_rdb_pc, mpc85xx_common_publish_devices); +machine_arch_initcall (p1020_utm_pc, mpc85xx_common_publish_devices); +machine_arch_initcall (p1021_rdb_pc, mpc85xx_common_publish_devices); +machine_arch_initcall (p1025_rdb, mpc85xx_common_publish_devices); +machine_arch_initcall (p1024_rdb, mpc85xx_common_publish_devices);/* * Called very early, device-tree isn't unflattened
arch/powerpc/platforms/85xx/p1010rdb.c +2 -12
@@ -46,25 +46,15 @@ void __init p1010_rdb_pic_init(void)*/ static void __init p1010_rdb_setup_arch (void ) { -#ifdef CONFIG_PCI -struct device_node *np; -#endif -if (ppc_md.progress) ppc_md.progress ("p1010_rdb_setup_arch()" ,0 ); -#ifdef CONFIG_PCI -for_each_node_by_type (np,"pci" ) { -if (of_device_is_compatible (np,"fsl,p1010-pcie" )) -fsl_add_bridge (np,0 ); - } - -#endif +fsl_pci_assign_primary ();printk (KERN_INFO "P1010 RDB board from Freescale Semiconductor\n" ); } -machine_device_initcall (p1010_rdb, mpc85xx_common_publish_devices); +machine_arch_initcall (p1010_rdb, mpc85xx_common_publish_devices);machine_arch_initcall (p1010_rdb, swiotlb_setup_bus_notifier);/*
arch/powerpc/platforms/85xx/p1022_ds.c +4 -32
@@ -18,7 +18,6 @@#include <linux/pci.h> #include <linux/of_platform.h> -#include <linux/memblock.h> #include <asm/div64.h> #include <asm/mpic.h> #include <asm/swiotlb.h>
@@ -507,32 +506,9 @@ early_param("video", early_video_setup);*/ static void __init p1022_ds_setup_arch (void ) { -#ifdef CONFIG_PCI -struct device_node *np; -#endif -dma_addr_t max =0xffffffff ; -if (ppc_md.progress) ppc_md.progress ("p1022_ds_setup_arch()" ,0 ); -#ifdef CONFIG_PCI -for_each_compatible_node (np,"pci" ,"fsl,p1022-pcie" ) { -struct resource rsrc; -struct pci_controller *hose; - -of_address_to_resource (np,0 , &rsrc); - -if ((rsrc.start &0xfffff ) ==0x8000 ) -fsl_add_bridge (np,1 ); -else -fsl_add_bridge (np,0 ); - - hose =pci_find_hose_for_OF_device (np); - max =min (max, hose->dma_window_base_cur + - hose->dma_window_size); - } -#endif -#if defined(CONFIG_FB_FSL_DIU ) || defined(CONFIG_FB_FSL_DIU_MODULE ) diu_ops.get_pixel_format = p1022ds_get_pixel_format; diu_ops.set_gamma_table = p1022ds_set_gamma_table;
@@ -601,18 +577,14 @@ static void __init p1022_ds_setup_arch(void)mpc85xx_smp_init (); -#ifdef CONFIG_SWIOTLB -if ((memblock_end_of_DRAM () -1 ) > max) { - ppc_swiotlb_enable =1 ; -set_pci_dma_ops (&swiotlb_dma_ops); - ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb; - } -#endif +fsl_pci_assign_primary (); + +swiotlb_detect_4g ();pr_info ("Freescale P1022 DS reference board\n" ); } -machine_device_initcall (p1022_ds, mpc85xx_common_publish_devices); +machine_arch_initcall (p1022_ds, mpc85xx_common_publish_devices);machine_arch_initcall (p1022_ds, swiotlb_setup_bus_notifier);
arch/powerpc/platforms/85xx/p1022_rdk.c +4 -32
@@ -14,7 +14,6 @@#include <linux/pci.h> #include <linux/of_platform.h> -#include <linux/memblock.h> #include <asm/div64.h> #include <asm/mpic.h> #include <asm/swiotlb.h>
@@ -121,32 +120,9 @@ void __init p1022_rdk_pic_init(void)*/ static void __init p1022_rdk_setup_arch (void ) { -#ifdef CONFIG_PCI -struct device_node *np; -#endif -dma_addr_t max =0xffffffff ; -if (ppc_md.progress) ppc_md.progress ("p1022_rdk_setup_arch()" ,0 ); -#ifdef CONFIG_PCI -for_each_compatible_node (np,"pci" ,"fsl,p1022-pcie" ) { -struct resource rsrc; -struct pci_controller *hose; - -of_address_to_resource (np,0 , &rsrc); - -if ((rsrc.start &0xfffff ) ==0x8000 ) -fsl_add_bridge (np,1 ); -else -fsl_add_bridge (np,0 ); - - hose =pci_find_hose_for_OF_device (np); - max =min (max, hose->dma_window_base_cur + - hose->dma_window_size); - } -#endif -#if defined(CONFIG_FB_FSL_DIU ) || defined(CONFIG_FB_FSL_DIU_MODULE ) diu_ops.set_monitor_port = p1022rdk_set_monitor_port; diu_ops.set_pixel_clock = p1022rdk_set_pixel_clock;
@@ -155,18 +131,14 @@ static void __init p1022_rdk_setup_arch(void)mpc85xx_smp_init (); -#ifdef CONFIG_SWIOTLB -if ((memblock_end_of_DRAM () -1 ) > max) { - ppc_swiotlb_enable =1 ; -set_pci_dma_ops (&swiotlb_dma_ops); - ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb; - } -#endif +fsl_pci_assign_primary (); + +swiotlb_detect_4g ();pr_info ("Freescale / iVeia P1022 RDK reference board\n" ); } -machine_device_initcall (p1022_rdk, mpc85xx_common_publish_devices); +machine_arch_initcall (p1022_rdk, mpc85xx_common_publish_devices);machine_arch_initcall (p1022_rdk, swiotlb_setup_bus_notifier);
arch/powerpc/platforms/85xx/p1023_rds.c +3 -6
@@ -80,15 +80,12 @@ static void __init mpc85xx_rds_setup_arch(void) } } -#ifdef CONFIG_PCI -for_each_compatible_node (np,"pci" ,"fsl,p1023-pcie" ) -fsl_add_bridge (np,0 ); -#endif -mpc85xx_smp_init (); + +fsl_pci_assign_primary (); } -machine_device_initcall (p1023_rds, mpc85xx_common_publish_devices); +machine_arch_initcall (p1023_rds, mpc85xx_common_publish_devices);static void __init mpc85xx_rds_pic_init (void ) {
arch/powerpc/platforms/85xx/p2041_rdb.c +1 -1
@@ -80,7 +80,7 @@ define_machine(p2041_rdb) { .power_save = e500_idle, }; -machine_device_initcall (p2041_rdb, corenet_ds_publish_devices); +machine_arch_initcall (p2041_rdb, corenet_ds_publish_devices);#ifdef CONFIG_SWIOTLB machine_arch_initcall (p2041_rdb, swiotlb_setup_bus_notifier);
arch/powerpc/platforms/85xx/p3041_ds.c +1 -1
@@ -82,7 +82,7 @@ define_machine(p3041_ds) { .power_save = e500_idle, }; -machine_device_initcall (p3041_ds, corenet_ds_publish_devices); +machine_arch_initcall (p3041_ds, corenet_ds_publish_devices);#ifdef CONFIG_SWIOTLB machine_arch_initcall (p3041_ds, swiotlb_setup_bus_notifier);
arch/powerpc/platforms/85xx/p4080_ds.c +1 -1
@@ -81,7 +81,7 @@ define_machine(p4080_ds) { .power_save = e500_idle, }; -machine_device_initcall (p4080_ds, corenet_ds_publish_devices); +machine_arch_initcall (p4080_ds, corenet_ds_publish_devices);#ifdef CONFIG_SWIOTLB machine_arch_initcall (p4080_ds, swiotlb_setup_bus_notifier);#endif
arch/powerpc/platforms/85xx/p5020_ds.c +1 -1
@@ -91,7 +91,7 @@ define_machine(p5020_ds) {#endif }; -machine_device_initcall (p5020_ds, corenet_ds_publish_devices); +machine_arch_initcall (p5020_ds, corenet_ds_publish_devices);#ifdef CONFIG_SWIOTLB machine_arch_initcall (p5020_ds, swiotlb_setup_bus_notifier);
arch/powerpc/platforms/85xx/p5040_ds.c +1 -1
@@ -82,7 +82,7 @@ define_machine(p5040_ds) {#endif }; -machine_device_initcall (p5040_ds, corenet_ds_publish_devices); +machine_arch_initcall (p5040_ds, corenet_ds_publish_devices);#ifdef CONFIG_SWIOTLB machine_arch_initcall (p5040_ds, swiotlb_setup_bus_notifier);
arch/powerpc/platforms/85xx/qemu_e500.c +2 -2
@@ -41,7 +41,7 @@ static void __init qemu_e500_setup_arch(void) { ppc_md.progress ("qemu_e500_setup_arch()" ,0 ); -fsl_pci_init (); +fsl_pci_assign_primary ();swiotlb_detect_4g ();mpc85xx_smp_init (); }
@@ -56,7 +56,7 @@ static int __init qemu_e500_probe(void)return !!of_flat_dt_is_compatible (root,"fsl,qemu-e500" ); } -machine_device_initcall (qemu_e500, mpc85xx_common_publish_devices); +machine_arch_initcall (qemu_e500, mpc85xx_common_publish_devices);define_machine (qemu_e500) { .name = "QEMU e500",
arch/powerpc/platforms/85xx/sbc8548.c +3 -18
@@ -88,26 +88,11 @@ static int __init sbc8548_hw_rev(void)*/ static void __init sbc8548_setup_arch (void ) { -#ifdef CONFIG_PCI -struct device_node *np; -#endif -if (ppc_md.progress) ppc_md.progress ("sbc8548_setup_arch()" ,0 ); -#ifdef CONFIG_PCI -for_each_node_by_type (np,"pci" ) { -if (of_device_is_compatible (np,"fsl,mpc8540-pci" ) || -of_device_is_compatible (np,"fsl,mpc8548-pcie" )) { -struct resource rsrc; -of_address_to_resource (np,0 , &rsrc); -if ((rsrc.start &0xfffff ) ==0x8000 ) -fsl_add_bridge (np,1 ); -else -fsl_add_bridge (np,0 ); - } - } -#endif +fsl_pci_assign_primary (); + sbc_rev =sbc8548_hw_rev (); }
@@ -128,7 +113,7 @@ static void sbc8548_show_cpuinfo(struct seq_file *m)seq_printf (m,"PLL setting\t: 0x%x\n" , ((phid1 >>24 ) &0x3f )); } -machine_device_initcall (sbc8548, mpc85xx_common_publish_devices); +machine_arch_initcall (sbc8548, mpc85xx_common_publish_devices);/* * Called very early, device-tree isn't unflattened
arch/powerpc/platforms/85xx/socrates.c +2 -9
@@ -66,20 +66,13 @@ static void __init socrates_pic_init(void)*/ static void __init socrates_setup_arch (void ) { -#ifdef CONFIG_PCI -struct device_node *np; -#endif -if (ppc_md.progress) ppc_md.progress ("socrates_setup_arch()" ,0 ); -#ifdef CONFIG_PCI -for_each_compatible_node (np,"pci" ,"fsl,mpc8540-pci" ) -fsl_add_bridge (np,1 ); -#endif +fsl_pci_assign_primary (); } -machine_device_initcall (socrates, mpc85xx_common_publish_devices); +machine_arch_initcall (socrates, mpc85xx_common_publish_devices);/* * Called very early, device-tree isn't unflattened
arch/powerpc/platforms/85xx/stx_gp3.c +3 -10
@@ -60,21 +60,14 @@ static void __init stx_gp3_pic_init(void)*/ static void __init stx_gp3_setup_arch (void ) { -#ifdef CONFIG_PCI -struct device_node *np; -#endif -if (ppc_md.progress) ppc_md.progress ("stx_gp3_setup_arch()" ,0 ); +fsl_pci_assign_primary (); +#ifdef CONFIG_CPM2 cpm2_reset ();#endif - -#ifdef CONFIG_PCI -for_each_compatible_node (np,"pci" ,"fsl,mpc8540-pci" ) -fsl_add_bridge (np,1 ); -#endif }static void stx_gp3_show_cpuinfo (struct seq_file *m)
@@ -93,7 +86,7 @@ static void stx_gp3_show_cpuinfo(struct seq_file *m)seq_printf (m,"PLL setting\t: 0x%x\n" , ((phid1 >>24 ) &0x3f )); } -machine_device_initcall (stx_gp3, mpc85xx_common_publish_devices); +machine_arch_initcall (stx_gp3, mpc85xx_common_publish_devices);/* * Called very early, device-tree isn't unflattened
arch/powerpc/platforms/85xx/tqm85xx.c +2 -19
@@ -59,10 +59,6 @@ static void __init tqm85xx_pic_init(void)*/ static void __init tqm85xx_setup_arch (void ) { -#ifdef CONFIG_PCI -struct device_node *np; -#endif -if (ppc_md.progress) ppc_md.progress ("tqm85xx_setup_arch()" ,0 );
@@ -70,20 +66,7 @@ static void __init tqm85xx_setup_arch(void)cpm2_reset ();#endif -#ifdef CONFIG_PCI -for_each_node_by_type (np,"pci" ) { -if (of_device_is_compatible (np,"fsl,mpc8540-pci" ) || -of_device_is_compatible (np,"fsl,mpc8548-pcie" )) { -struct resource rsrc; -if (!of_address_to_resource (np,0 , &rsrc)) { -if ((rsrc.start &0xfffff ) ==0x8000 ) -fsl_add_bridge (np,1 ); -else -fsl_add_bridge (np,0 ); - } - } - } -#endif +fsl_pci_assign_primary (); }static void tqm85xx_show_cpuinfo (struct seq_file *m)
@@ -123,7 +106,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); -machine_device_initcall (tqm85xx, mpc85xx_common_publish_devices); +machine_arch_initcall (tqm85xx, mpc85xx_common_publish_devices);static const char *board[]__initdata = {"tqc,tqm8540" ,
arch/powerpc/platforms/85xx/xes_mpc85xx.c +8 -48
94 lines not on this page · raw message
arch/powerpc/platforms/86xx/gef_ppc9a.c +4 -8
@@ -73,13 +73,6 @@ static void __init gef_ppc9a_init_irq(void)static void __init gef_ppc9a_setup_arch (void ) {struct device_node *regs; -#ifdef CONFIG_PCI -struct device_node *np; - -for_each_compatible_node (np,"pci" ,"fsl,mpc8641-pcie" ) { -fsl_add_bridge (np,1 ); - } -#endif printk (KERN_INFO "GE Intelligent Platforms PPC9A 6U VME SBC\n" );
@@ -87,6 +80,8 @@ static void __init gef_ppc9a_setup_arch(void)mpc86xx_smp_init ();#endif +fsl_pci_assign_primary (); +/* Remap basic board registers */ regs =of_find_compatible_node (NULL ,NULL ,"gef,ppc9a-fpga-regs" );if (regs) {
@@ -221,6 +216,7 @@ static long __init mpc86xx_time_init(void)static __initdata struct of_device_id of_bus_ids[] = { { .compatible ="simple-bus" , }, { .compatible ="gianfar" , }, + { .compatible ="fsl,mpc8641-pcie" , }, {}, };
@@ -231,7 +227,7 @@ static int __init declare_of_platform_devices(void)return 0 ; } -machine_device_initcall (gef_ppc9a, declare_of_platform_devices); +machine_arch_initcall (gef_ppc9a, declare_of_platform_devices);define_machine (gef_ppc9a) { .name = "GE PPC9A",
arch/powerpc/platforms/86xx/gef_sbc310.c +4 -9
@@ -73,20 +73,14 @@ static void __init gef_sbc310_init_irq(void)static void __init gef_sbc310_setup_arch (void ) {struct device_node *regs; -#ifdef CONFIG_PCI -struct device_node *np; - -for_each_compatible_node (np,"pci" ,"fsl,mpc8641-pcie" ) { -fsl_add_bridge (np,1 ); - } -#endif -printk (KERN_INFO "GE Intelligent Platforms SBC310 6U VPX SBC\n" );#ifdef CONFIG_SMP mpc86xx_smp_init ();#endif +fsl_pci_assign_primary (); +/* Remap basic board registers */ regs =of_find_compatible_node (NULL ,NULL ,"gef,fpga-regs" );if (regs) {
@@ -209,6 +203,7 @@ static long __init mpc86xx_time_init(void)static __initdata struct of_device_id of_bus_ids[] = { { .compatible ="simple-bus" , }, { .compatible ="gianfar" , }, + { .compatible ="fsl,mpc8641-pcie" , }, {}, };
@@ -219,7 +214,7 @@ static int __init declare_of_platform_devices(void)return 0 ; } -machine_device_initcall (gef_sbc310, declare_of_platform_devices); +machine_arch_initcall (gef_sbc310, declare_of_platform_devices);define_machine (gef_sbc310) { .name = "GE SBC310",
arch/powerpc/platforms/86xx/gef_sbc610.c +4 -8
@@ -73,13 +73,6 @@ static void __init gef_sbc610_init_irq(void)static void __init gef_sbc610_setup_arch (void ) {struct device_node *regs; -#ifdef CONFIG_PCI -struct device_node *np; - -for_each_compatible_node (np,"pci" ,"fsl,mpc8641-pcie" ) { -fsl_add_bridge (np,1 ); - } -#endif printk (KERN_INFO "GE Intelligent Platforms SBC610 6U VPX SBC\n" );
@@ -87,6 +80,8 @@ static void __init gef_sbc610_setup_arch(void)mpc86xx_smp_init ();#endif +fsl_pci_assign_primary (); +/* Remap basic board registers */ regs =of_find_compatible_node (NULL ,NULL ,"gef,fpga-regs" );if (regs) {
@@ -198,6 +193,7 @@ static long __init mpc86xx_time_init(void)static __initdata struct of_device_id of_bus_ids[] = { { .compatible ="simple-bus" , }, { .compatible ="gianfar" , }, + { .compatible ="fsl,mpc8641-pcie" , }, {}, };
@@ -208,7 +204,7 @@ static int __init declare_of_platform_devices(void)return 0 ; } -machine_device_initcall (gef_sbc610, declare_of_platform_devices); +machine_arch_initcall (gef_sbc610, declare_of_platform_devices);define_machine (gef_sbc610) { .name = "GE SBC610",
arch/powerpc/platforms/86xx/mpc8610_hpcd.c +6 -15
@@ -91,6 +91,9 @@ static struct of_device_id __initdata mpc8610_ids[] = { { .compatible = "simple-bus", }, /* So that the DMA channel nodes can be probed individually: */ { .compatible = "fsl,eloplus-dma", }, + /* PCI controllers */ + { .compatible = "fsl,mpc8610-pci", }, + { .compatible = "fsl,mpc8641-pcie", }, {} };
@@ -107,7 +110,7 @@ static int __init mpc8610_declare_of_platform_devices(void)return 0 ; } -machine_device_initcall (mpc86xx_hpcd, mpc8610_declare_of_platform_devices); +machine_arch_initcall (mpc86xx_hpcd, mpc8610_declare_of_platform_devices);#if defined(CONFIG_FB_FSL_DIU ) || defined(CONFIG_FB_FSL_DIU_MODULE )
@@ -278,25 +281,13 @@ mpc8610hpcd_valid_monitor_port(enum fsl_diu_monitor_port port)static void __init mpc86xx_hpcd_setup_arch (void ) {struct resource r; -struct device_node *np;unsigned char *pixis;if (ppc_md.progress) ppc_md.progress ("mpc86xx_hpcd_setup_arch()" ,0 ); -#ifdef CONFIG_PCI -for_each_node_by_type (np,"pci" ) { -if (of_device_is_compatible (np,"fsl,mpc8610-pci" ) - ||of_device_is_compatible (np,"fsl,mpc8641-pcie" )) { -struct resource rsrc; -of_address_to_resource (np,0 , &rsrc); -if ((rsrc.start &0xfffff ) ==0xa000 ) -fsl_add_bridge (np,1 ); -else -fsl_add_bridge (np,0 ); - } - } -#endif +fsl_pci_assign_primary (); +#if defined(CONFIG_FB_FSL_DIU ) || defined(CONFIG_FB_FSL_DIU_MODULE ) diu_ops.get_pixel_format = mpc8610hpcd_get_pixel_format; diu_ops.set_gamma_table = mpc8610hpcd_set_gamma_table;
arch/powerpc/platforms/86xx/mpc86xx_hpcn.c +6 -36
84 lines not on this page · raw message
arch/powerpc/platforms/86xx/sbc8641d.c +4 -10
@@ -38,23 +38,16 @@static void __init sbc8641_setup_arch (void ) { -#ifdef CONFIG_PCI -struct device_node *np; -#endif -if (ppc_md.progress) ppc_md.progress ("sbc8641_setup_arch()" ,0 ); -#ifdef CONFIG_PCI -for_each_compatible_node (np,"pci" ,"fsl,mpc8641-pcie" ) -fsl_add_bridge (np,0 ); -#endif -printk ("SBC8641 board from Wind River\n" );#ifdef CONFIG_SMP mpc86xx_smp_init ();#endif + +fsl_pci_assign_primary (); }
@@ -102,6 +95,7 @@ mpc86xx_time_init(void)static __initdata struct of_device_id of_bus_ids[] = { { .compatible ="simple-bus" , }, { .compatible ="gianfar" , }, + { .compatible ="fsl,mpc8641-pcie" , }, {}, };
@@ -111,7 +105,7 @@ static int __init declare_of_platform_devices(void)return 0 ; } -machine_device_initcall (sbc8641, declare_of_platform_devices); +machine_arch_initcall (sbc8641, declare_of_platform_devices);define_machine (sbc8641) { .name = "SBC8641D",
arch/powerpc/sysdev/fsl_pci.c +63 -39
117 lines not on this page · raw message
arch/powerpc/sysdev/fsl_pci.h +12 -3
@@ -95,10 +95,19 @@ u64 fsl_pci_immrbar_base(struct pci_controller *hose);extern struct device_node *fsl_pci_primary; -#ifdef CONFIG_FSL_PCI -void fsl_pci_init (void ); +#ifdef CONFIG_PCI +void fsl_pci_assign_primary (void );#else -static inline void fsl_pci_init (void ) {} +static inline void fsl_pci_assign_primary (void ) {} +#endif + +#ifdef CONFIG_EDAC_MPC85XX +int mpc85xx_pci_err_probe (struct platform_device *op); +#else +static inline int mpc85xx_pci_err_probe (struct platform_device *op) +{ +return -ENOTSUPP ; +}#endif #endif /* __POWERPC_FSL_PCI_H */
drivers/edac/mpc85xx_edac.c +12 -31
79 lines not on this page · raw message
Signature · 1 line
1.7.5.1
Quoted 1 line · Jia Hongtao
We unified the Freescale pci/pcie initialization by changing the =
fsl_pci
Quoted 1 line
to a platform driver. In previous PCI code architecture the =
initialization
Quoted 1 line
routine is called at
board_setup_archstage. Now the initialization is =
done
Quoted 1 line
in probe function which is architectural better. Also It's convenient =
for
Quoted 3 lines
adding PM support for PCI controller in later patch.
=20
Now we registered pci controllers as platform devices. So we combine =
two
Quoted 8 lines
initialization code as one platform driver.
=20Signed-off-by Jia Hongtao <[email protected]>Signed-off-by Li Yang <[email protected]>Signed-off-by Chunhe Lan <[email protected]>---
Changes for V10:
* Just update comments formpc85xx_cds_pci_assign_primary
What do we have to say w/regards to Ben's comment about breaking of = pci_fixup_final by moving to a platform driver?
- k=
Quoted 29 lines
-----Original Message-----
From: Kumar Gala [mailto:[email protected]]
Sent: Friday, August 31, 2012 12:54 AM
To: Jia Hongtao-B38951
Cc: [email protected]; Li Yang-R58472; Wood Scott-B07421
Subject: Re: [PATCH V10] powerpc/fsl-pci: Unify pci/pcie initialization code
=20
=20
On Aug 28, 2012, at 2:44 AM, Jia Hongtao wrote:
=20Quoted 5 lines
We unified the Freescale pci/pcie initialization by changing the
fsl_pcito a platform driver. In previous PCI code architecture the initialization routine is called atboard_setup_archstage. Now the initialization is done in probe function which is architectural better. Also It's convenient for adding PM support for PCI controllerin later patch.
Quoted 10 lines
Now we registered pci controllers as platform devices. So we combine two initialization code as one platform driver.
Signed-off-by Jia Hongtao <[email protected]>Signed-off-by Li Yang <[email protected]>Signed-off-by Chunhe Lan <[email protected]>---
Changes for V10:
* Just update comments formpc85xx_cds_pci_assign_primary
Quoted 5 lines
=20
What do we have to say w/regards to Ben's comment about breaking ofpci_fixup_finalby moving to a platform driver?
=20
- k
If Ben mean the fixup order I have already gave some explanations as follow= :
I have already done some investigations and the sequence of fixup (including early, header, final) will not be changed in platform driver.
We register and init PCI controllers as platform devices at arch_initcall stage and PCI scanning (pcibios_init) is at subsys_initcall stage in which early and header fixup will be done in right sequence. The final fixup will be start at rootfs_initcall stage which is later than early and header fixu= p.
- Hongtao.
Hi Kumar,=0A=
=0A=
Do you or Ben has any comment on this?=0A=
Please let me know.=0A=
=0A=
Thanks.=0A=
=0A=
________________________________________=0A=
From: Jia Hongtao-B38951=0A=
Sent: Friday, August 31, 2012 10:25 AM=0A=
To: Kumar Gala=0A=
Cc: [email protected]; Li Yang-R58472; Wood Scott-B07421=0A=
Subject: RE: [PATCH V10] powerpc/fsl-pci: Unify pci/pcie initialization cod= e=0A=
=0A=
Quoted 6 lines
-----Original Message-----=0A=
From: Kumar Gala [mailto:[email protected]]=0A=
Sent: Friday, August 31, 2012 12:54 AM=0A=
To: Jia Hongtao-B38951=0A=
Cc: [email protected]; Li Yang-R58472; Wood Scott-B07421=0A=
Subject: Re: [PATCH V10] powerpc/fsl-pci: Unify pci/pcie initialization=
=0A=
Quoted 10 lines
code=0A=
=0A=
=0A=
On Aug 28, 2012, at 2:44 AM, Jia Hongtao wrote:=0A= =0A=Quoted 5 lines
We unified the Freescale pci/pcie initialization by changing the=0A=
fsl_pcito a platform driver. In previous PCI code architecture the=0A= initialization routine is called atboard_setup_archstage. Now the=0A= initialization is done in probe function which is architectural=0A= better. Also It's convenient for adding PM support for PCI controller=
=0A=
Quoted 11 lines
in later patch.=0A=
Quoted 10 lines
=0A=
Now we registered pci controllers as platform devices. So we combine=0A= two initialization code as one platform driver.=0A=
=0A=Signed-off-by Jia Hongtao <[email protected]>=0A=Signed-off-by Li Yang <[email protected]>=0A=Signed-off-by Chunhe Lan <[email protected]>=0A=---=0A=
Changes for V10:=0A=
* Just update comments for mpc85xx_cds_pci_assign_primary=0A=
Quoted 5 lines
=0A=
What do we have to say w/regards to Ben's comment about breaking of=0A=pci_fixup_finalby moving to a platform driver?=0A=
=0A=
- k=0A=
=0A=
If Ben mean the fixup order I have already gave some explanations as follow= :=0A=
=0A=
I have already done some investigations and the sequence of fixup=0A= (including early, header, final) will not be changed in platform driver.=0A= =0A=
We register and init PCI controllers as platform devices at arch_initcall= =0A=
stage and PCI scanning (pcibios_init) is at subsys_initcall stage in which= =0A=
early and header fixup will be done in right sequence. The final fixup will= =0A=
be start at rootfs_initcall stage which is later than early and header fixu= p.=0A=
=0A=
- Hongtao.=0A=
Kumar Gala
AppliedQuoted 1 line · Jia Hongtao
We unified the Freescale pci/pcie initialization by changing the =
fsl_pci
Quoted 1 line
to a platform driver. In previous PCI code architecture the =
initialization
Quoted 1 line
routine is called at
board_setup_archstage. Now the initialization is =
done
Quoted 1 line
in probe function which is architectural better. Also It's convenient =
for
Quoted 3 lines
adding PM support for PCI controller in later patch.
=20
Now we registered pci controllers as platform devices. So we combine =
two
Quoted 32 lines
initialization code as one platform driver.
=20Signed-off-by Jia Hongtao <[email protected]>Signed-off-by Li Yang <[email protected]>Signed-off-by Chunhe Lan <[email protected]>---
Changes for V10:
* Just update comments formpc85xx_cds_pci_assign_primary=20arch/powerpc/platforms/85xx/common.c | 10 +++ arch/powerpc/platforms/85xx/corenet_ds.c | 34 ++-------- arch/powerpc/platforms/85xx/ge_imp3a.c | 62 ++++++----------- arch/powerpc/platforms/85xx/mpc8536_ds.c | 36 +--------- arch/powerpc/platforms/85xx/mpc85xx_ads.c | 11 +-- arch/powerpc/platforms/85xx/mpc85xx_cds.c | 44 +++++++++---- arch/powerpc/platforms/85xx/mpc85xx_ds.c | 14 ++-- arch/powerpc/platforms/85xx/mpc85xx_mds.c | 40 ++--------- arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 30 +++----- arch/powerpc/platforms/85xx/p1010rdb.c | 14 +--- arch/powerpc/platforms/85xx/p1022_ds.c | 36 +--------- arch/powerpc/platforms/85xx/p1022_rdk.c | 36 +--------- arch/powerpc/platforms/85xx/p1023_rds.c | 9 +-- arch/powerpc/platforms/85xx/p2041_rdb.c | 2 +- arch/powerpc/platforms/85xx/p3041_ds.c | 2 +- arch/powerpc/platforms/85xx/p4080_ds.c | 2 +- arch/powerpc/platforms/85xx/p5020_ds.c | 2 +- arch/powerpc/platforms/85xx/p5040_ds.c | 2 +- arch/powerpc/platforms/85xx/qemu_e500.c | 4 +- arch/powerpc/platforms/85xx/sbc8548.c | 21 +----- arch/powerpc/platforms/85xx/socrates.c | 11 +--- arch/powerpc/platforms/85xx/stx_gp3.c | 13 +--- arch/powerpc/platforms/85xx/tqm85xx.c | 21 +-----
Quoted 8 lines
arch/powerpc/platforms/85xx/xes_mpc85xx.c | 56 ++------------- arch/powerpc/platforms/86xx/gef_ppc9a.c | 12 +-- arch/powerpc/platforms/86xx/gef_sbc310.c | 13 +--- arch/powerpc/platforms/86xx/gef_sbc610.c | 12 +-- arch/powerpc/platforms/86xx/mpc8610_hpcd.c | 21 ++---- arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 42 ++---------- arch/powerpc/platforms/86xx/sbc8641d.c | 14 +--- arch/powerpc/sysdev/fsl_pci.c | 102 =
+++++++++++++++++-----------
Quoted 3 lines
arch/powerpc/sysdev/fsl_pci.h | 15 +++- drivers/edac/mpc85xx_edac.c | 43 +++--------- 33 files changed, 249 insertions(+), 537 deletions(-)
applied to next
- k=
Quoted 61 lines
-----Original Message-----
From: Kumar Gala [mailto:[email protected]]
Sent: Thursday, September 13, 2012 4:20 AM
To: Jia Hongtao-B38951
Cc: [email protected]; Li Yang-R58472; Wood Scott-B07421
Subject: Re: [PATCH V10] powerpc/fsl-pci: Unify pci/pcie initialization code
=20
=20
On Aug 28, 2012, at 2:44 AM, Jia Hongtao wrote:
=20Quoted 5 lines
We unified the Freescale pci/pcie initialization by changing the
fsl_pcito a platform driver. In previous PCI code architecture the initialization routine is called atboard_setup_archstage. Now the initialization is done in probe function which is architectural better. Also It's convenient for adding PM support for PCI controllerin later patch.
Quoted 34 lines
Now we registered pci controllers as platform devices. So we combine two initialization code as one platform driver.
Signed-off-by Jia Hongtao <[email protected]>Signed-off-by Li Yang <[email protected]>Signed-off-by Chunhe Lan <[email protected]>---
Changes for V10:
* Just update comments formpc85xx_cds_pci_assign_primaryarch/powerpc/platforms/85xx/common.c | 10 +++ arch/powerpc/platforms/85xx/corenet_ds.c | 34 ++-------- arch/powerpc/platforms/85xx/ge_imp3a.c | 62 ++++++----------- arch/powerpc/platforms/85xx/mpc8536_ds.c | 36 +--------- arch/powerpc/platforms/85xx/mpc85xx_ads.c | 11 +-- arch/powerpc/platforms/85xx/mpc85xx_cds.c | 44 +++++++++---- arch/powerpc/platforms/85xx/mpc85xx_ds.c | 14 ++-- arch/powerpc/platforms/85xx/mpc85xx_mds.c | 40 ++--------- arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 30 +++----- arch/powerpc/platforms/85xx/p1010rdb.c | 14 +--- arch/powerpc/platforms/85xx/p1022_ds.c | 36 +--------- arch/powerpc/platforms/85xx/p1022_rdk.c | 36 +--------- arch/powerpc/platforms/85xx/p1023_rds.c | 9 +-- arch/powerpc/platforms/85xx/p2041_rdb.c | 2 +- arch/powerpc/platforms/85xx/p3041_ds.c | 2 +- arch/powerpc/platforms/85xx/p4080_ds.c | 2 +- arch/powerpc/platforms/85xx/p5020_ds.c | 2 +- arch/powerpc/platforms/85xx/p5040_ds.c | 2 +- arch/powerpc/platforms/85xx/qemu_e500.c | 4 +- arch/powerpc/platforms/85xx/sbc8548.c | 21 +----- arch/powerpc/platforms/85xx/socrates.c | 11 +--- arch/powerpc/platforms/85xx/stx_gp3.c | 13 +--- arch/powerpc/platforms/85xx/tqm85xx.c | 21 +-----Quoted 8 lines
arch/powerpc/platforms/85xx/xes_mpc85xx.c | 56 ++------------- arch/powerpc/platforms/86xx/gef_ppc9a.c | 12 +-- arch/powerpc/platforms/86xx/gef_sbc310.c | 13 +--- arch/powerpc/platforms/86xx/gef_sbc610.c | 12 +-- arch/powerpc/platforms/86xx/mpc8610_hpcd.c | 21 ++---- arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 42 ++---------- arch/powerpc/platforms/86xx/sbc8641d.c | 14 +--- arch/powerpc/sysdev/fsl_pci.c | 102 +++++++++++++++++----
Quoted 8 lines
-------
Quoted 3 lines
arch/powerpc/sysdev/fsl_pci.h | 15 +++- drivers/edac/mpc85xx_edac.c | 43 +++--------- 33 files changed, 249 insertions(+), 537 deletions(-)=20
applied to next
=20
- k
Thanks.
I will sent PM patch for PCI soon.
- Hongtao.
Quoted 25 lines
arch/powerpc/sysdev/fsl_pci.c +16
-7+static int __devinit fsl_pci_probe (struct platform_device *pdev) +{ +int ret; +struct device_node *node; +struct pci_controller *hose; + + node = pdev->dev.of_node; + ret =fsl_add_bridge (node, fsl_pci_primary == node);#ifdef CONFIG_SWIOTLB -/* -* if we couldn't map all of DRAM via the dma windows -* we need SWIOTLB to handle buffers located outside of -* dma capable memory region -*/ -if (memblock_end_of_DRAM () -1 > max) - ppc_swiotlb_enable =1 ; +if (ret ==0 ) { + hose =pci_find_hose_for_OF_device (pdev->dev.of_node); + +/* +* if we couldn't map all of DRAM via the dma windows +* we need SWIOTLB to handle buffers located outside of +* dma capable memory region +*/
arch/powerpc/sysdev/fsl_pci.c static const struct of_device_id pci_ids[] = { · line 888
Quoted 10 lines
arch/powerpc/sysdev/fsl_pci.c +9
-0+if (memblock_end_of_DRAM () -1 > hose->dma_window_base_cur + + hose->dma_window_size) + ppc_swiotlb_enable = 1; + }#endif + +mpc85xx_pci_err_probe (pdev); + +return 0 ; +}
This breaks when CONFIG_SWIOTLB is disabled (chroma_defconfig hit this next-20120918), but think this could also hit in Linus tree:
arch/powerpc/sysdev/fsl_pci.c: In function 'fsl_pci_probe':
arch/powerpc/sysdev/fsl_pci.c:867:25: error: unused variable 'hose' [-Werror=unused-variable]
cc1: all warnings being treated as errors
Mikey
Quoted 49 lines
-----Original Message-----
From: Michael Neuling [mailto:[email protected]]
Sent: Tuesday, September 18, 2012 5:56 PM
To: Jia Hongtao-B38951
Cc: [email protected]; [email protected]; Wood Scott- B07421; [email protected]; [email protected]
Subject: Re: [PATCH V10] powerpc/fsl-pci: Unify pci/pcie initialization codeQuoted 24 lines
arch/powerpc/sysdev/fsl_pci.c +15
-7+static int __devinit fsl_pci_probe (struct platform_device *pdev) { +int ret; +struct device_node *node; +struct pci_controller *hose; + + node = pdev->dev.of_node; + ret =fsl_add_bridge (node, fsl_pci_primary == node);#ifdef CONFIG_SWIOTLB -/* -* if we couldn't map all of DRAM via the dma windows -* we need SWIOTLB to handle buffers located outside of -* dma capable memory region -*/ -if (memblock_end_of_DRAM () -1 > max) - ppc_swiotlb_enable =1 ; +if (ret ==0 ) { + hose =pci_find_hose_for_OF_device (pdev->dev.of_node); + +/* +* if we couldn't map all of DRAM via the dma windows +* we need SWIOTLB to handle buffers located outside of +* dma capable memory region +*/ arch/powerpc/sysdev/fsl_pci.c static const struct of_device_id pci_ids[] = { · line 888
Quoted 10 lines
arch/powerpc/sysdev/fsl_pci.c +9
-0+if (memblock_end_of_DRAM () -1 > hose->dma_window_base_cur + + hose->dma_window_size) + ppc_swiotlb_enable = 1; + }#endif + +mpc85xx_pci_err_probe (pdev); + +return 0 ; +}This breaks when
CONFIG_SWIOTLBis disabled (chroma_defconfighit this next-20120918), but think this could also hit in Linus tree:
Quoted 6 lines
arch/powerpc/sysdev/fsl_pci.c: In function 'fsl_pci_probe':
arch/powerpc/sysdev/fsl_pci.c:867:25: error: unused variable 'hose' [-
Werror=unused-variable]
cc1: all warnings being treated as errorsMikey
You are right, it's a problem.
I already send a patch to fix this.
Pls refer to http://patchwork.ozlabs.org/patch/184673/
Thanks for your response.
- Hongtao.