All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfgang Grandegger <wg@domain.hid>
To: niklaus.giger@domain.hid
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-core] PPC405: DMA-Problem with OCM (interrupt-example)
Date: Thu, 18 Jan 2007 09:31:42 +0100	[thread overview]
Message-ID: <45AF306E.4070606@domain.hid> (raw)
In-Reply-To: <200701172333.25574.niklaus.giger@domain.hid>

Niklaus Giger wrote:
> Hi
> 
> I tried to simply an example program how to use interrupts
> with Xenomai (see attached Makefile & dma_4xx_int_module.c).
> 
> The interrupt part of the example works, but the DMA transfer (memory to
> memory) using the OnChipMemory fails. I think I must somewhere specify that 
> the src/dst adressed should not be cached, but I do not know how to do it.

consistant_alloc() should help. It's used in the kernel in various 
places, e.g. in "drivers/net/ibm_emac".

> (I tried to use virt_to_phys and virt_to_bus but failed miserably.)
> The OCM is initialised in my board specific __init by calling:
>>         io_block_mapping(mfdcr(DCRN_OCMDSARC), mfdcr(DCRN_OCMDSARC),
>> 4*1024, _PAGE_IO);
> 
> A simple insmod/rmmod cycle gives me the following output:
> 
>>                      init_module: SRC f4000000 DST f4000103
>>                      init_module: residue 111 status 0xa00f100
>>              xenomai_irq_handler: IRQ  8 uipr 0xffffff87 uier 0x003f0000
>> uisr 0xc0809807 xenomai_irq_handler: residue 0 status 0x1a00f000
>> src at f4000000 is Could we use a DMA + interrupt to copy a string?
>> dst at f4000103 is Should be overwritten.
>>                   cleanup_module: dma_ch.control 0x0 0
>>                   cleanup_module: IRQ  8 uipr 0xffffff87 uier 0x003f0000
>> uisr 0xc0009807 cleanup_module: residue 0 status 0x1a00f000
>> src at f4000000 is Could we use a DMA + interrupt to copy a string?
>> dst at f4000103 is Should be overwritten.
> 
> Does anybody have a clue?
> 
> If this question is off topic, which mailing list would you reccomend?
> (http://ozlabs.org/pipermail/linuxppc-embedded/ ??)

linuxppc-embedded is OK.

> Is the example code otherwise good enough to be accepted as an example how to 
> attach a interrupt?

Wolfgang.


  parent reply	other threads:[~2007-01-18  8:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-17 22:33 [Xenomai-core] PPC405: DMA-Problem with OCM (interrupt-example) Niklaus Giger
2007-01-18  0:26 ` Jan Kiszka
2007-01-18  8:31 ` Wolfgang Grandegger [this message]
2007-01-19 23:06   ` [Xenomai-core] PPC405: DMA-problem solved! Niklaus Giger
2007-01-20  8:04     ` Jan Kiszka
2007-01-21 21:37       ` Wolfgang Grandegger
2007-01-22 14:06         ` Jan Kiszka
2007-01-22  7:22       ` Niklaus Giger

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=45AF306E.4070606@domain.hid \
    --to=wg@domain.hid \
    --cc=niklaus.giger@domain.hid \
    --cc=xenomai@xenomai.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.