linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Lavocat <nicolas.lavocat@fr.thalesgroup.com>
To: Gabriel Paubert <paubert@iram.es>
Cc: linuxppc-dev <linuxppc-dev@ozlabs.org>
Subject: Re: freeze when reading a PCI bridge register
Date: Wed, 22 Apr 2009 14:28:36 +0200	[thread overview]
Message-ID: <49EF0D74.9000005@fr.thalesgroup.com> (raw)
In-Reply-To: <20090422110327.GA9997@iram.es>

Thank you for your advices! I try it as soon as possible! (the board is=20
not often available...)

Nicolas Lavocat

Gabriel Paubert a =E9crit :
> On Wed, Apr 22, 2009 at 10:04:29AM +0200, Nicolas Lavocat wrote:
>  =20
>> Hi everybody!
>>
>> I' am trying to configure a PCI bridge on a private board, with a =20
>> powerpc . In a first time, I tried to get informations about PCI =20
>> devices, in order to be sure  that  my read  and write methods work ( =
=20
>> using 2 configuration registers, like on an x86 architecture.) . 2 =20
>> configuration registers  are used, for example we  write  an encoded =20
>> address (it is a request to a PCI device) in the first and the answer =
of =20
>> the PCI device can be read in the second register (it is a configurati=
on =20
>> cycle)
>> Firstly, I did it by JTAG: it works. Then, under uboot, it is ok.
>>    =20
>
> JTAG is probably a completely different hardware path, so it
> does not really count. uboot testing is ok.
>  =20
>> For example, the code used under u-boot:
>>
>> volatile u32* addr;
>> u32 vendor_device_ID;
>>
>> puts("PCI1 reading PCI VENDOR and DEVICE ID\n");
>> addr=3DCFG_ADDR_PCI1;
>> *addr=3D0x80007800;
>>
>> addr=3D CFG_DATA_PCI1;
>> vendor_device_ID=3D *addr;
>> printf("PCI1: PCI1_VENDOR_DEVICE_ID=3D %08x  \n" ,vendor_device_ID);
>>    =20
>
> 2 possibilities:
> - your I/O is not marked uncacheable (should be with ioremap)
> - the PPC is reordering and issuing the read before the write,
>   you should use accessors. A simple test is inserting
>   an asm volatile("eieio") before the read.
>
> About your other mails, please avoid HTML mail.
>
> 	Gabriel
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>
>  =20

  reply	other threads:[~2009-04-22 12:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-22  8:04 freeze when reading a PCI bridge register Nicolas Lavocat
2009-04-22  8:30 ` Liu Dave-R63238
2009-04-22  8:31   ` Nicolas Lavocat
2009-04-22  8:33     ` Liu Dave-R63238
2009-04-22  9:10       ` Nicolas Lavocat
2009-04-22  9:21 ` tiejun.chen
2009-04-22  9:26   ` Nicolas Lavocat
2009-04-22  9:45     ` tiejun.chen
2009-04-22 11:03 ` Gabriel Paubert
2009-04-22 12:28   ` Nicolas Lavocat [this message]
2009-04-22 14:56     ` Nicolas Lavocat

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49EF0D74.9000005@fr.thalesgroup.com \
    --to=nicolas.lavocat@fr.thalesgroup.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paubert@iram.es \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).