
Hi all,
we have a pci-to-usb controller(32bit,33MHZ,PCI1 controller, IDSEL 18) on pci bus, we disabled PCI and tried to read the configuration data(vendor and device id) of the usb controller by giving following commands. (0xe0000000 is the CCSR base address)
$mw 0xe0008000 0x80009000 $md 0xe0008004
$0xe0008004 : //hangs here
then it is hanging, when we check the pci signals(frame, idsel, irdy, trdy etc) they seem to be proper, even the chip is responding with its vendor and device id(we could see then on the analyzer). what could be the problem.
following is the u-boot log
U-Boot 2013.01-rc1 (Jan 02 2013 - 16:00:15)
CPU: 8555, Version: 1.1, (0x80710011) Core: E500, Version: 2.0, (0x80200020) Clock Configuration: CPU0:528 MHz, CCB:264 MHz, DDR:132 MHz (264 MT/s data rate), LBC:66 MHz CPM: 264 MHz L1: D-cache 32 kB enabled I-cache 32 kB enabled I2C: ready DRAM: Detected UDIMM 9VDDT6472HY-335F2 512 MiB (DDR1, 64-bit, CL=2, ECC off) Flash: ## Unknown flash on Bank 2 - Size = 0x00000000 = 0 MB 128 MiB L2: 256 KB enabled *** Warning - bad CRC, using default environment
EEPROM: Read failed. In: serial Out: serial Err: serial Net: TSEC0 [PRIME], TSEC1 Hit any key to stop autoboot: 10 9 0 => => mw 0xe0008000 0x80009000 => md 0xe0008004 e0008004: //hangs here
Regards, Ashok

Dear "Ashok Kumar Kacham",
In message 0969b5bdd1b15922721db142831c3b02.squirrel@mail.bel.co.in you wrote:
Hi all,
we have a pci-to-usb controller(32bit,33MHZ,PCI1 controller, IDSEL 18) on pci bus, we disabled PCI and tried to read the configuration data(vendor and device id) of the usb controller by giving following commands. (0xe0000000 is the CCSR base address)
$mw 0xe0008000 0x80009000
What exactly is this command supposed to do?
$md 0xe0008004
Which exact devices / registers are supposed to be mapped at 0xe0008000, 0xe0008004, and 0x80009000 ?
=> mw 0xe0008000 0x80009000 => md 0xe0008004 e0008004: //hangs here
Are you 100% sure that reading a probably large number of 32 words starting at address 0xe0008004 should work? Can you provide the register mapping for this address range?
Best regards,
Wolfgang Denk

Dear Wolfgang Denk
Dear "Ashok Kumar Kacham",
In message 0969b5bdd1b15922721db142831c3b02.squirrel@mail.bel.co.in you wrote:
Hi all,
we have a pci-to-usb controller(32bit,33MHZ,PCI1 controller, IDSEL 18) on pci bus, we disabled PCI and tried to read the configuration data(vendor and device id) of the usb controller by giving following commands. (0xe0000000 is the CCSR base address)
$mw 0xe0008000 0x80009000
What exactly is this command supposed to do?
it writes the value 0x80009000 to addr e0008000 (we can also give the count, we tried it also) here e0008000 is the CFG_ADDR of PCI1 controller, where we can write the bus number,device number, function number and config reg number of the pci device we want to read. after writing it, we have to read the CFG_DATA (addr 0xe0008004) register of PCI config space, then the PCI controller will try to read that particular reg number from the PCI device.
$md 0xe0008004
Which exact devices / registers are supposed to be mapped at 0xe0008000, 0xe0008004, and 0x80009000 ?
=> mw 0xe0008000 0x80009000 => md 0xe0008004 e0008004: //hangs here
Are you 100% sure that reading a probably large number of 32 words starting at address 0xe0008004 should work? Can you provide the register mapping for this address range?
same thing is working in one of our MPC8540 based board, where we are able to read the vendor id and device id of the pci device properly.
Best regards,
Wolfgang Denk
-- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de A list is only as strong as its weakest link. -- Don Knuth
Email secured by Check Point
Regards,

On 01/03/2013 07:03:49 AM, Ashok Kumar Kacham wrote:
Dear Wolfgang Denk
Dear "Ashok Kumar Kacham",
In message
0969b5bdd1b15922721db142831c3b02.squirrel@mail.bel.co.in you
wrote:
Hi all,
we have a pci-to-usb controller(32bit,33MHZ,PCI1 controller, IDSEL
on pci bus, we disabled PCI and tried to read the configuration
data(vendor
and device id) of the usb controller by giving following commands. (0xe0000000 is the CCSR base address)
What happens if you don't disable PCI?
same thing is working in one of our MPC8540 based board, where we are able to read the vendor id and device id of the pci device properly.
With PCI disabled?
Are you sure you have the right IDSEL? Do you have PCI errors disabled so that you'll get 0xffffffff rather than a machine check if nothing responds?
Oh, and there's this comment in arch/powerpc/cpu/mpc85xx/pci.c:
#if defined(CONFIG_MPC8555CDS) || defined(CONFIG_MPC8541CDS) /* * This is a SW workaround for an apparent HW problem * in the PCI controller on the MPC85555/41 CDS boards. * The first config cycle must be to a valid, known * device on the PCI bus in order to trick the PCI * controller state machine into a known valid state. * Without this, the first config cycle has the chance * of hanging the controller permanently, just leaving * it in a semi-working state, or leaving it working. * * Pick on the Tundra, Device 17, to get it right. */ { u8 header_type;
pci_hose_read_config_byte(hose, PCI_BDF(0,BRIDGE_ID,0), PCI_HEADER_TYPE, &header_type); } #endif
-Scott
participants (3)
-
Ashok Kumar Kacham
-
Scott Wood
-
Wolfgang Denk