From b38d06d8c48e8a866bf8f0ae5dabd9eea9c63f7c Mon Sep 17 00:00:00 2001 From: Li Yang Date: Thu, 10 May 2007 11:14:57 +0800 Subject: [POWERPC] 83xx: Suppress warning when CONFIG_PCI is not defined Suppress warning when CONFIG_PCI is not defined. Signed-off-by: Li Yang Signed-off-by: Kumar Gala --- arch/powerpc/platforms/83xx/mpc8313_rdb.c | 2 ++ arch/powerpc/platforms/83xx/mpc834x_itx.c | 2 ++ arch/powerpc/platforms/83xx/mpc834x_mds.c | 2 ++ 3 files changed, 6 insertions(+) (limited to 'arch/powerpc/platforms') diff --git a/arch/powerpc/platforms/83xx/mpc8313_rdb.c b/arch/powerpc/platforms/83xx/mpc8313_rdb.c index 32e9e949284..96970ac887e 100644 --- a/arch/powerpc/platforms/83xx/mpc8313_rdb.c +++ b/arch/powerpc/platforms/83xx/mpc8313_rdb.c @@ -40,7 +40,9 @@ unsigned long isa_mem_base = 0; */ static void __init mpc8313_rdb_setup_arch(void) { +#ifdef CONFIG_PCI struct device_node *np; +#endif if (ppc_md.progress) ppc_md.progress("mpc8313_rdb_setup_arch()", 0); diff --git a/arch/powerpc/platforms/83xx/mpc834x_itx.c b/arch/powerpc/platforms/83xx/mpc834x_itx.c index 3c009f6d4a4..40a01947d68 100644 --- a/arch/powerpc/platforms/83xx/mpc834x_itx.c +++ b/arch/powerpc/platforms/83xx/mpc834x_itx.c @@ -50,7 +50,9 @@ unsigned long isa_mem_base = 0; */ static void __init mpc834x_itx_setup_arch(void) { +#ifdef CONFIG_PCI struct device_node *np; +#endif if (ppc_md.progress) ppc_md.progress("mpc834x_itx_setup_arch()", 0); diff --git a/arch/powerpc/platforms/83xx/mpc834x_mds.c b/arch/powerpc/platforms/83xx/mpc834x_mds.c index 8aa9a93e2aa..10394b2d7e7 100644 --- a/arch/powerpc/platforms/83xx/mpc834x_mds.c +++ b/arch/powerpc/platforms/83xx/mpc834x_mds.c @@ -120,7 +120,9 @@ static int mpc834x_usb_cfg(void) */ static void __init mpc834x_mds_setup_arch(void) { +#ifdef CONFIG_PCI struct device_node *np; +#endif if (ppc_md.progress) ppc_md.progress("mpc834x_mds_setup_arch()", 0); -- cgit v1.2.3 From c9ec87e5121b1777172fc07a14322ebb32a04ba9 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Wed, 9 May 2007 22:48:53 -0500 Subject: [POWERPC] 83xx: Suppress warning when CONFIG_ options aren't defined Suppress warning when CONFIG_PCI & CONFIG_QUICC_ENGINE is not defined Signed-off-by: Kumar Gala --- arch/powerpc/platforms/83xx/mpc832x_rdb.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/powerpc/platforms') diff --git a/arch/powerpc/platforms/83xx/mpc832x_rdb.c b/arch/powerpc/platforms/83xx/mpc832x_rdb.c index b0b22bb29de..3db68b73fc3 100644 --- a/arch/powerpc/platforms/83xx/mpc832x_rdb.c +++ b/arch/powerpc/platforms/83xx/mpc832x_rdb.c @@ -44,7 +44,9 @@ unsigned long isa_mem_base = 0; */ static void __init mpc832x_rdb_setup_arch(void) { +#if defined(CONFIG_PCI) || defined(CONFIG_QUICC_ENGINE) struct device_node *np; +#endif if (ppc_md.progress) ppc_md.progress("mpc832x_rdb_setup_arch()", 0); -- cgit v1.2.3 From 742226c579c573c24386aaf41969a01ee058b97e Mon Sep 17 00:00:00 2001 From: Jason Jin Date: Wed, 2 May 2007 16:53:38 -0500 Subject: [POWERPC] 86xx: Enable the AC97 interface on 8641D board. HD interface and AC97 interface share some pins and they are enabled at the same time, In order to use AC97 interface, we need to disable the HD interface first. Signed-off-by:Jason Jin Acked-by: Jon Loeliger Signed-off-by: Kumar Gala --- arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'arch/powerpc/platforms') diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c index 90877565caa..1051702c8d4 100644 --- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c +++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c @@ -168,7 +168,7 @@ static void __devinit quirk_uli1575(struct pci_dev *dev) { unsigned short temp; struct pci_controller *hose = pci_bus_to_host(dev->bus); - unsigned char irq2pin[16]; + unsigned char irq2pin[16], c; unsigned long pirq_map_word = 0; u32 irq; int i; @@ -288,6 +288,11 @@ static void __devinit quirk_uli1575(struct pci_dev *dev) outb(0x1e, 0x4d1); #undef ULI1575_SET_DEV_IRQ + + /* Disable the HD interface and enable the AC97 interface. */ + pci_read_config_byte(dev, 0xb8, &c); + c &= 0x7f; + pci_write_config_byte(dev, 0xb8, c); } static void __devinit quirk_uli5288(struct pci_dev *dev) -- cgit v1.2.3 From d1af5b4ea970d8cccdacf243ae42899f3784ad85 Mon Sep 17 00:00:00 2001 From: Ishizaki Kou Date: Wed, 9 May 2007 17:34:08 +1000 Subject: [POWERPC] celleb: Fix support for multiple PCI domains Celleb has multiple PCI host bridges (phbs). Previous boot logic gives non-overlapped bus IDs between PCI host bridges so you can identify PHB by bus ID. But newer boot logic gives same bus ID between PHBs (it gives bus ID 0 as root bus.) So we have to set 'phb->buid' as non-zero. Signed-off-by: Kou Ishizaki Signed-off-by: Paul Mackerras --- arch/powerpc/platforms/celleb/pci.c | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/powerpc/platforms') diff --git a/arch/powerpc/platforms/celleb/pci.c b/arch/powerpc/platforms/celleb/pci.c index d1adf34cd5e..e9ac19c4bba 100644 --- a/arch/powerpc/platforms/celleb/pci.c +++ b/arch/powerpc/platforms/celleb/pci.c @@ -457,6 +457,7 @@ int __devinit celleb_setup_phb(struct pci_controller *phb) pr_debug("PCI: celleb_setup_phb() %s\n", name); phb_set_bus_ranges(dev, phb); + phb->buid = 1; if (strcmp(name, "epci") == 0) { phb->ops = &celleb_epci_ops; -- cgit v1.2.3 From 0f6e74a3e0c5e805d5f67f7631259c886158a47b Mon Sep 17 00:00:00 2001 From: Ishizaki Kou Date: Wed, 9 May 2007 17:36:40 +1000 Subject: [POWERPC] celleb: Fix PCI config space accesses to subordinate buses Checking whether bus->self is NULL is not enough to know "bus" is the primary bus. Signed-off-by: Kou Ishizaki Signed-off-by: Paul Mackerras --- arch/powerpc/platforms/celleb/scc_epci.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'arch/powerpc/platforms') diff --git a/arch/powerpc/platforms/celleb/scc_epci.c b/arch/powerpc/platforms/celleb/scc_epci.c index fb23d53eb09..c4b011094bd 100644 --- a/arch/powerpc/platforms/celleb/scc_epci.c +++ b/arch/powerpc/platforms/celleb/scc_epci.c @@ -133,13 +133,13 @@ static int celleb_epci_check_abort(struct pci_controller *hose, } static volatile void __iomem *celleb_epci_make_config_addr( + struct pci_bus *bus, struct pci_controller *hose, unsigned int devfn, int where) { volatile void __iomem *addr; - struct pci_bus *bus = hose->bus; - if (bus->self) + if (bus != hose->bus) addr = celleb_epci_get_epci_cfg(hose) + (((bus->number & 0xff) << 16) | ((devfn & 0xff) << 8) @@ -193,7 +193,7 @@ static int celleb_epci_read_config(struct pci_bus *bus, } else { clear_and_disable_master_abort_interrupt(hose); - addr = celleb_epci_make_config_addr(hose, devfn, where); + addr = celleb_epci_make_config_addr(bus, hose, devfn, where); switch (size) { case 1: @@ -257,7 +257,7 @@ static int celleb_epci_write_config(struct pci_bus *bus, } else { clear_and_disable_master_abort_interrupt(hose); - addr = celleb_epci_make_config_addr(hose, devfn, where); + addr = celleb_epci_make_config_addr(bus, hose, devfn, where); switch (size) { case 1: -- cgit v1.2.3 From b4f8b1087f0413f6f2a2423da66eed5c1fb70b06 Mon Sep 17 00:00:00 2001 From: Ishizaki Kou Date: Wed, 9 May 2007 17:38:03 +1000 Subject: [POWERPC] celleb: Fix parsing of machine type hack command line option This is a bugfix to install Fedora Core 6 by using kernel command line 'celleb_machine_type_hack=CHRP'. Yes, this is a one-character fix to add forgotten '='. Signed-off-by: Kou Ishizaki Signed-off-by: Paul Mackerras --- arch/powerpc/platforms/celleb/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/powerpc/platforms') diff --git a/arch/powerpc/platforms/celleb/setup.c b/arch/powerpc/platforms/celleb/setup.c index 596ab2a788d..5e9f7f16357 100644 --- a/arch/powerpc/platforms/celleb/setup.c +++ b/arch/powerpc/platforms/celleb/setup.c @@ -80,7 +80,7 @@ static int celleb_machine_type_hack(char *ptr) return 0; } -__setup("celleb_machine_type_hack", celleb_machine_type_hack); +__setup("celleb_machine_type_hack=", celleb_machine_type_hack); static void celleb_progress(char *s, unsigned short hex) { -- cgit v1.2.3 From 17213c3bf67bd532d4d04c286663f9bbf92b9c18 Mon Sep 17 00:00:00 2001 From: Linas Vepstas Date: Thu, 10 May 2007 02:38:11 +1000 Subject: [POWERPC] Assorted janitorial EEH cleanups Assorted minor cleanups to EEH code; -- use literals, use kerneldoc format. Signed-off-by: Linas Vepstas ---- arch/powerpc/platforms/pseries/eeh.c | 13 ++++++++++--- arch/powerpc/platforms/pseries/eeh_driver.c | 7 ++++--- include/asm-powerpc/ppc-pci.h | 18 +++++++++++++++--- 3 files changed, 29 insertions(+), 9 deletions(-) Signed-off-by: Paul Mackerras --- arch/powerpc/platforms/pseries/eeh.c | 13 ++++++++++--- arch/powerpc/platforms/pseries/eeh_driver.c | 7 ++++--- 2 files changed, 14 insertions(+), 6 deletions(-) (limited to 'arch/powerpc/platforms') diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c index 093438b93bd..5f3e6d8659f 100644 --- a/arch/powerpc/platforms/pseries/eeh.c +++ b/arch/powerpc/platforms/pseries/eeh.c @@ -76,7 +76,7 @@ */ #define EEH_MAX_FAILS 2100000 -/* Time to wait for a PCI slot to retport status, in milliseconds */ +/* Time to wait for a PCI slot to report status, in milliseconds */ #define PCI_BUS_RESET_WAIT_MSEC (60*1000) /* RTAS tokens */ @@ -95,11 +95,18 @@ EXPORT_SYMBOL(eeh_subsystem_enabled); /* Lock to avoid races due to multiple reports of an error */ static DEFINE_SPINLOCK(confirm_error_lock); -/* Buffer for reporting slot-error-detail rtas calls */ +/* Buffer for reporting slot-error-detail rtas calls. Its here + * in BSS, and not dynamically alloced, so that it ends up in + * RMO where RTAS can access it. + */ static unsigned char slot_errbuf[RTAS_ERROR_LOG_MAX]; static DEFINE_SPINLOCK(slot_errbuf_lock); static int eeh_error_buf_size; +/* Buffer for reporting pci register dumps. Its here in BSS, and + * not dynamically alloced, so that it ends up in RMO where RTAS + * can access it. + */ #define EEH_PCI_REGS_LOG_LEN 4096 static unsigned char pci_regs_buf[EEH_PCI_REGS_LOG_LEN]; @@ -218,7 +225,7 @@ static size_t gather_pci_data(struct pci_dn *pdn, char * buf, size_t len) void eeh_slot_error_detail(struct pci_dn *pdn, int severity) { size_t loglen = 0; - memset(pci_regs_buf, 0, EEH_PCI_REGS_LOG_LEN); + pci_regs_buf[0] = 0; rtas_pci_enable(pdn, EEH_THAW_MMIO); loglen = gather_pci_data(pdn, pci_regs_buf, EEH_PCI_REGS_LOG_LEN); diff --git a/arch/powerpc/platforms/pseries/eeh_driver.c b/arch/powerpc/platforms/pseries/eeh_driver.c index f07d849cfc8..161a5844ab6 100644 --- a/arch/powerpc/platforms/pseries/eeh_driver.c +++ b/arch/powerpc/platforms/pseries/eeh_driver.c @@ -378,8 +378,9 @@ struct pci_dn * handle_eeh_events (struct eeh_event *event) /* Since rtas may enable MMIO when posting the error log, * don't post the error log until after all dev drivers - * have been informed. */ - eeh_slot_error_detail(frozen_pdn, 1 /* Temporary Error */); + * have been informed. + */ + eeh_slot_error_detail(frozen_pdn, EEH_LOG_TEMP_FAILURE); /* If all device drivers were EEH-unaware, then shut * down all of the device drivers, and hope they @@ -470,7 +471,7 @@ hard_fail: location, drv_str, pci_str); perm_error: - eeh_slot_error_detail(frozen_pdn, 2 /* Permanent Error */); + eeh_slot_error_detail(frozen_pdn, EEH_LOG_PERM_FAILURE); /* Notify all devices that they're about to go down. */ pci_walk_bus(frozen_bus, eeh_report_failure, NULL); -- cgit v1.2.3 From de1132173a81ae11aaa6af11ed9ded5f0c565c87 Mon Sep 17 00:00:00 2001 From: Michael Neuling Date: Thu, 10 May 2007 15:16:27 +1000 Subject: [POWERPC] Minor pSeries IOMMU debug cleanup pci is not initialized before being used here, so this debug print is bogus at the current location. Move it to where it makes sense. Signed-off-by: Michael Neuling Signed-off-by: Paul Mackerras --- arch/powerpc/platforms/pseries/iommu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'arch/powerpc/platforms') diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c index eec684a8e44..be17d239507 100644 --- a/arch/powerpc/platforms/pseries/iommu.c +++ b/arch/powerpc/platforms/pseries/iommu.c @@ -520,7 +520,6 @@ static void pci_dma_dev_setup_pSeriesLP(struct pci_dev *dev) dev->dev.archdata.dma_data = PCI_DN(pdn)->iommu_table; return; } - DBG(" found DMA window, table: %p\n", pci->iommu_table); pci = PCI_DN(pdn); if (!pci->iommu_table) { @@ -534,6 +533,8 @@ static void pci_dma_dev_setup_pSeriesLP(struct pci_dev *dev) pci->iommu_table = iommu_init_table(tbl, pci->phb->node); DBG(" created table: %p\n", pci->iommu_table); + } else { + DBG(" found DMA window, table: %p\n", pci->iommu_table); } dev->dev.archdata.dma_data = pci->iommu_table; -- cgit v1.2.3 From f64071200acc124bd0d641ef7d750f38fbf5f8b8 Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Thu, 10 May 2007 22:17:18 +1000 Subject: [POWERPC] Fix compile error with kexec and CONFIG_SMP=n Commit 2f4dfe206a2fc07099dfad77a8ea2f4b4ae2140f moved the definition of hard_smp_processor_id() for the UP case from include/linux/smp.h to include/asm/smp.h. However, include/linux/smp.h only includes include/asm/smp.h in the SMP case, so code that wants to use hard_smp_processor_id() has to include explicitly to be sure of getting the definition. Signed-off-by: Paul Mackerras --- arch/powerpc/platforms/pseries/kexec.c | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/powerpc/platforms') diff --git a/arch/powerpc/platforms/pseries/kexec.c b/arch/powerpc/platforms/pseries/kexec.c index af268560745..412a5e7aff2 100644 --- a/arch/powerpc/platforms/pseries/kexec.c +++ b/arch/powerpc/platforms/pseries/kexec.c @@ -12,6 +12,7 @@ #include #include #include +#include #include "pseries.h" #include "xics.h" -- cgit v1.2.3