linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Konstantin Boyanov" <kkboyanov@gmail.com>
To: linuxppc-embedded@ozlabs.org
Subject: Re: Reading and writing from/to VME device
Date: Thu, 29 Mar 2007 12:13:55 +0200	[thread overview]
Message-ID: <929bf310703290313o234a47f9gbf9c5083fc23e45e@mail.gmail.com> (raw)
In-Reply-To: <460A3BBC.5060002@in2p3.fr>

[-- Attachment #1: Type: text/plain, Size: 1780 bytes --]

Hi again,

Thank you once again for presenting the VME world to me :)

>Looks like you're reading something.  Address 0x10100000 is larger than
>a 24 bit address.  Perhaps you should be using A32 transfers instead of
>A24?

No, no, I need to do A16 access, thats the only way to read the control
registers. Form here comes also my confusion - I thought that when I'm
reading CS/CSR register I need to do it in CSR address space. So no
algorithms for geographical location of boards are needed in my case I
guess.
Actually the base address of CSR on the board is 0xA000 (10100000 is the
first byte of the address selection in inary, shame on me :( ). But when I
try to configure it with outWinCfgADC.zlatedAddrL = 0xA000, when I run the
programm I get an errno 29 (Invalid argument) from ioctl(). In fact if I set
the xlatedAddrL to some value smaller that 0x10000 I get this error. Here's
my most recent configuration:

    outWinCfgADC.windowNbr           = 0;
    outWinCfgADC.windowEnable      = 1;
    outWinCfgADC.wrPostEnable      = 0;
    outWinCfgADC.userAccessType  = VME_SUPER;
    outWinCfgADC.dataAccessType  = VME_DATA;
    outWinCfgADC.windowSizeL       = 0x10000;
    outWinCfgADC.xferProtocol         = VME_SCT;
    outWinCfgADC.addrSpace           = VME_A16;
    outWinCfgADC.maxDataWidth     = VME_D16;
    outWinCfgADC.xlatedAddrL         = 0x10000000;

I think that 0x10000 for window size is big enough to encompass the whole
A16 addressable space. With the 0x10000000 xlatedAddr I get no errors and
read the desired registers when I increment this address to 0x1000A000. But
nevertheless it seems strange to me that the device does not accept
xlatedAddr lower that 0x10000. Maybe its due to the configuration of the VME
controller?

Best regards,
Konstantin

[-- Attachment #2: Type: text/html, Size: 2241 bytes --]

  reply	other threads:[~2007-03-29 10:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-26 15:14 Reading and writing from/to VME device Konstantin Boyanov
2007-03-26 18:31 ` Martin, Tim
2007-03-27  9:09 ` Didier Kryn
2007-03-27 12:38   ` Didier Kryn
2007-03-27 15:47   ` Konstantin Boyanov
2007-03-27 19:02     ` Martin, Tim
2007-03-28  9:56       ` Didier Kryn
2007-03-29 10:13         ` Konstantin Boyanov [this message]
2007-03-29 19:27           ` Martin, Tim
2007-03-30  9:24           ` Didier Kryn
2007-04-02  9:15             ` Didier Kryn
2007-04-02  9:21               ` Didier Kryn

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=929bf310703290313o234a47f9gbf9c5083fc23e45e@mail.gmail.com \
    --to=kkboyanov@gmail.com \
    --cc=linuxppc-embedded@ozlabs.org \
    /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).