From 67aab8873a8f80693ad1b7a7d7f675fee2dac53a Mon Sep 17 00:00:00 2001 From: jmcmullan Date: Wed, 2 Jan 2013 03:31:51 +0000 Subject: [PATCH] sam440: Use the correct base for PCI Config Space accesses for 440/460 Tested on the sam460. Signed-off-by: Jason S. McMullan git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@46189 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- arch/ppc-sam440/pci/driverclass.c | 4 +++- arch/ppc-sam440/pci/pci.h | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/ppc-sam440/pci/driverclass.c b/arch/ppc-sam440/pci/driverclass.c index 14b6138656..f406b12cb3 100644 --- a/arch/ppc-sam440/pci/driverclass.c +++ b/arch/ppc-sam440/pci/driverclass.c @@ -37,7 +37,7 @@ #define HiddAttrBase (PSD(cl)->hiddAB) #define CFGADD(bus,dev,func,reg) \ - ( 0x00000000 | ((bus)<<16) | \ + ( psd->CfgBase | ((bus)<<16) | \ ((dev)<<11) | ((func)<<8) | ((reg)&~3)) typedef union _pcicfg @@ -143,8 +143,10 @@ static int PCI440_InitClass(LIBBASETYPEPTR LIBBASE) pvr = GetPVR(); if (pvr == PVR_PPC460EX_B) { LIBBASE->psd.IntLine = INTR_UIC0_PCI0_IN; + LIBBASE->psd.CfgBase = 0x00000000; } else { LIBBASE->psd.IntLine = 0xff; + LIBBASE->psd.CfgBase = 0x80000000; } struct pHidd_PCI_AddHardwareDriver msg,*pmsg=&msg; diff --git a/arch/ppc-sam440/pci/pci.h b/arch/ppc-sam440/pci/pci.h index 5585a16107..10a2c1f5ac 100644 --- a/arch/ppc-sam440/pci/pci.h +++ b/arch/ppc-sam440/pci/pci.h @@ -23,6 +23,9 @@ struct pci_staticdata { OOP_Class *driverClass; UBYTE IntLine; + ULONG CfgBase; /* 0x80000000 for 440ex + * 0x00000000 for 460ex + */ }; struct pcibase { -- 2.11.4.GIT