Hi Hemant,
  i commented the PINMUX0 setting in U-boot, now my kenel can boot.
 but when the pci devices enum i got the debug out like this 
 
PCI: bootcfg = 0x1000e, bootmode = 0xe
PCI: Invoking PCI BIOS...
PCI: Enabling Clock...
PCI: Setting up Host Controller...
PCI: PCIADDSUB[0] @0x1c1a314
PCI: Default PCICSRMIR = 2000000
PCI: New PCICSRMIR = 2000516
PCI: Starting PCI scan...
PCI: Reading config[e] for device 0000:00:00 ...
PCI: AD[1:0]:size = 2:1, Byte enables = 0x4
PCI: Config/IO read done, value = 0
failed.
PCI: Reading config[e] for device 0000:01:00 ...
PCI: AD[1:0]:size = 2:1, Byte enables = 0x4
PCI: CFG/IO not ready.Might need tuning CFG_PCI_READY_WAITCNT value.
PCI: Config/IO read done, value = 0
failed.
PCI: Reading config[e] for device 0000:02:00 ...
PCI: AD[1:0]:size = 2:1, Byte enables = 0x4
PCI: CFG/IO not ready.Might need tuning CFG_PCI_READY_WAITCNT value.
PCI: Config/IO read done, value = 0
failed.

i have a question about get_config_addr
for type 0 the 
addr = (1 << (11 + PCI_SLOT(devfn))) | (PCI_FUNC(devfn) << 8)
| (where & ~3);

but in the pci spec 
the configure addr is
bit [1:0] must to 0
bit [7:2] identify the target dword within the target function 'confingration 
space
bit[10:8]identify the target function number
bit[15:11]identify the target PCI device number
bit[23:16]identify the target PCI bus number
bit[30:24] must to zero
bit[31] must to be one for enable configrue space Mapping

i tried like this 
         address  = 0x80000000;                        /* bits 31     = enable 
*/
         address |= ((bus & 0xFF) << 16); /* bits 23..16 = bus number */
         address |= (PCI_SLOT(devfn)<< 11);   /* bits 15..11 = slot number */
         address |= (PCI_FUNC(devfn)<< 8);   /* bits 10..8  = function num */
         address |= 0 & 0xFC;              /* bits  7..2  = register num */
         address |= 0x00000000;   /* bits  1..0  = type num */ 
but still not founed the pci card.




lingyun
2009-06-22



发件人: Pedanekar, Hemant
发送时间: 2009-06-20 01:40:32
收件人: lingyun
抄送: davinci-linux-open-source
主题: RE: Re: RE: [PATCH 2/2] ARM: DaVinci: DM646x PCIHOST: PCI HostDriver

Ok, that means you are using normal U-Boot (CFG_PCI_BOOT not defined) and that 
may be causing the ‘if’ part being executed even on unmodified board since 
U-Boot sets (forces) PINMUX to EMIFA mode.
 
Can you comment out that (PINMUX0 setting) part in U-Boot and try?
 
Thanks,
Hemant
 



From: lingyun [mailto:[email protected]] 
Sent: Friday, June 19, 2009 12:06 PM
To: Pedanekar, Hemant
Cc: davinci-linux-open-source
Subject: Fw: Re: RE: [PATCH 2/2] ARM: DaVinci: DM646x PCIHOST: PCI Host Driver
 
 Hi Hemant,
 
 i had add a spiflash chip to the EVM use the SPI CS1
 i had modified the UBL to load u-boot image from the SPI flash
 so i can boot the kenel , but i have not modify the CPLD logic.



lingyun
2009-06-19



发件人: Pedanekar, Hemant
发送时间: 2009-06-18 17:36:53
收件人: lingyun
抄送: davinci-linux-open-source
主题: RE: [PATCH 2/2] ARM: DaVinci: DM646x PCIHOST: PCI Host Driver
 
Hi Lingyun,
It is strange that you are hitting that code, because on unmodified EVMs, the 
code inside 'if' block in dm646xevm_pci_setup is not supposed to be executed. 
The reason is, when the (unmodified) EVM is put into PCI slot, the on-board 
logic automatically enables PCI (EMIF disabled).
Can you clarify how are you loading U-Boot and kernel images?
Thanks,
Hemant 
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf
> Of lingyun
> Sent: Thursday, June 18, 2009 2:20 PM
> To: davinci-linux-open-source
> Subject: [PATCH 2/2] ARM: DaVinci: DM646x PCIHOST: PCI Host Driver
> 
> Hi Hemant :
> i tried  to use your patch with 2.6.10 kernel,
> I have a PCI backplane with minimum 2 slots .
> The DM646x EVM (without h/w modification ) is put in one of the slots and
> a 10/100 Mbps Ethernet PCI Adapter was used in other slot.
> 
> when my linux kenerl run to this function
> void dm646xevm_pci_setup(void)
> after  davinci_cfg_reg(DM646X_PCIEN) excuted
> the kernel hang!!
> 
> my bootmod is Nandboot the PCIEN in SW3 is off
> 
> 
> thanks .
> 
>                                                           lingyun
> 
> 
> 
> 
> lingyun
> 2009-06-18
> 
> 
> _______________________________________________
> Davinci-linux-open-source mailing list
> [email protected]
> http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to