powerpc/fsl-pci: Fix MSI support on 83xx platforms
PATCH 1/1 powerpc/fsl-pci: Fix MSI support on 83xx platforms
The following commit broke 83xx because it assumed the 83xx platforms exposed the "IMMR" address in BAR0 like the 85xx/86xx/QoriQ devices do:
commit 3da34aae03d498ee62f75aa7467de93cce3030fd
Author: Kumar Gala <[email protected]> Date: Tue May 12 15:51:56 2009 -0500
powerpc/fsl: Support unique MSI addresses per PCIe Root Complex
However that is not true, so we have to search through the inbound window settings on 83xx to find which one matches the IMMR address to determine its PCI address.
--- arch/powerpc/sysdev/fsl_msi.c | 9 +++---- arch/powerpc/sysdev/fsl_pci.c | 43 ++++++++++++++++++++++++++++++++++++++++- arch/powerpc/sysdev/fsl_pci.h | 1 + 3 files changed, 47 insertions(+), 6 deletions(-)
arch/powerpc/sysdev/fsl_msi.c +4 -5
@@ -24,6 +24,7 @@#include <asm/ppc-pci.h> #include <asm/mpic.h> #include "fsl_msi.h" +#include "fsl_pci.h" LIST_HEAD (msi_head);
@@ -125,13 +126,11 @@ static void fsl_compose_msi_msg(struct pci_dev *pdev, int hwirq, {struct fsl_msi *msi_data = fsl_msi_data;struct pci_controller *hose =pci_bus_to_host (pdev->bus); -u32 base =0 ; +u64 base =fsl_pci_immrbar_base (hose); -pci_bus_read_config_dword (hose->bus, -PCI_DEVFN (0 ,0 ),PCI_BASE_ADDRESS_0 , &base); + msg->address_lo = msi_data->msi_addr_lo +lower_32_bits (base); + msg->address_hi = msi_data->msi_addr_hi +upper_32_bits (base); - msg->address_lo = msi_data->msi_addr_lo + base; - msg->address_hi = msi_data->msi_addr_hi; msg->data = hwirq; pr_debug("%s: allocated srs: %d, ibs: %d\n",
arch/powerpc/sysdev/fsl_pci.c +42 -1
73 lines not on this page · raw message
arch/powerpc/sysdev/fsl_pci.h +1 -0
@@ -88,6 +88,7 @@ struct ccsr_pci {extern int fsl_add_bridge (struct device_node *dev,int is_primary);extern void fsl_pcibios_fixup_bus (struct pci_bus *bus);extern int mpc83xx_add_bridge (struct device_node *dev); +u64 fsl_pci_immrbar_base (struct pci_controller *hose);#endif /* __POWERPC_FSL_PCI_H */ #endif /* __KERNEL__ */
Signature · 1 line
1.6.0.6
Hi Kumar,
Quoted 4 lines · Kumar Gala
However that is not true, so we have to search through the inbound window settings on 83xx to find which one matches the IMMR address to determine its PCI address.
Thanks, your patch really does help on MPC8308 board I use.
Regards, Ilya.
Hi Kumar,
Quoted 4 lines · Kumar Gala
The following commit broke 83xx because it assumed the 83xx platforms exposed the "IMMR" address in BAR0 like the 85xx/86xx/QoriQ devices do:
commit
3da34aae03d498ee62f75aa7467de93cce3030fd
Quoted 8 lines
Author: Kumar Gala<[email protected]> Date: Tue May 12 15:51:56 2009 -0500powerpc/fsl: Support unique MSI addresses per PCIe Root Complex
However that is not true, so we have to search through the inbound window settings on 83xx to find which one matches the IMMR address to determine its PCI address.
As I've already told you my testing on the MPC8308RDB board was successful. As for 85xx boards, Wolfgang told me that DENX doesn't have any 85xx boards that support MSI at the moment, so I can't do complete testing. I'm sorry. I've tested that TQM8560 boards is able to boot and PCI is working as expected though (with your patch applied). I fear I can't do anything else here.
Thanks.
Regards, Ilya.
Hi Kumar,
Quoted 4 lines · Kumar Gala
The following commit broke 83xx because it assumed the 83xx platforms exposed the "IMMR" address in BAR0 like the 85xx/86xx/QoriQ devices do:
commit
3da34aae03d498ee62f75aa7467de93cce3030fd
Quoted 8 lines
Author: Kumar Gala<[email protected]> Date: Tue May 12 15:51:56 2009 -0500powerpc/fsl: Support unique MSI addresses per PCIe Root Complex
However that is not true, so we have to search through the inbound window settings on 83xx to find which one matches the IMMR address to determine its PCI address.
As I've already told you my testing on the MPC8308RDB board was successful. As for 85xx boards, Wolfgang told me that DENX doesn't have any 85xx boards that support MSI at the moment, so I can't do complete testing. I'm sorry. I've tested that TQM8560 board is able to boot and PCI is working as expected though (with your patch applied). I fear I can't do anything else here.
Thanks.
Regards, Ilya.
Kumar Gala
AppliedQuoted 2 lines · Kumar Gala
The following commit broke 83xx because it assumed the 83xx platforms exposed the "IMMR" address in BAR0 like the 85xx/86xx/QoriQ devices =
do:
Quoted 11 lines
=20
commit3da34aae03d498ee62f75aa7467de93cce3030fdAuthor: Kumar Gala <[email protected]> Date: Tue May 12 15:51:56 2009 -0500=20
powerpc/fsl: Support unique MSI addresses per PCIe Root Complex
=20
However that is not true, so we have to search through the inbound window settings on 83xx to find which one matches the IMMR address to determine its PCI address.
=20
Quoted 5 lines
Reported-by Ilya Yanok <[email protected]>Signed-off-by Kumar Gala <[email protected]>---
arch/powerpc/sysdev/fsl_msi.c| 9 +++----arch/powerpc/sysdev/fsl_pci.c| 43 =
++++++++++++++++++++++++++++++++++++++++-
Quoted 2 lines
arch/powerpc/sysdev/fsl_pci.h| 1 +3 files changed, 47 insertions(+), 6 deletions(-)
applied to next
- k=