All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-core] PPC405: DMA-Problem with OCM (interrupt-example)
@ 2007-01-17 22:33 Niklaus Giger
  2007-01-18  0:26 ` Jan Kiszka
  2007-01-18  8:31 ` Wolfgang Grandegger
  0 siblings, 2 replies; 8+ messages in thread
From: Niklaus Giger @ 2007-01-17 22:33 UTC (permalink / raw)
  To: xenomai

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

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.
(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/ ??)

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

Best regards
-- 
Niklaus Giger

[-- Attachment #2: Makefile.zip --]
[-- Type: application/x-zip, Size: 799 bytes --]

PK\x03\x04\x14\0\0\0\b\0!º16&\x01&p¤\x02\0\0Ô\x04\0\0\b\0\0\0Makefile}Sao›0\x10ý\ÿŠ[šJ!
°nÕ¤Qñ\x12Úe!¡‚T«4Mˆ€)^ŒM1l©¦ý÷Ù„,‰¦\x0e	°ÏwïÞÝ=ŸŸ«\aÜ`y;»{\bÕ,XBg;Ge›­¨MQ§æº%4Ó‹´}¯¿3>\x18—\x1fK4õ¢Õt\x16ÚfÁKlÊ3³æ¼É…ÉȆ&­ˆwžh\x1e…î\x11\x14%¬Ý\x1eP\x13ºŸ,»ªRä†A\x14Ån°¸Ÿù^gН¶[\x1dÝ;+é±KëÆÄ4Û˜WñÛ\x0erM˜Õ-(O\x13zØv\vùA\vË\x1eŽD)…êg¦!¤
ö‰h€çT\x15%iÒ\x10Î\x044\x1cÖ\x18ºRÑ£·\fd\_£ÖAn1ãeB:€%o°¥"ø\x0f\×$ÃÐ\x14\x18\x04Nê´€*i
ÈyÝÙT”žr–“'\x10iMªf\x02­À0(“\r\x06•g×}Û0Œ\x01:¥Wò¬¥ø”Ù"˜>ø^\x046de¢\x1a\x14\x13ÖÄ;Oô\x1fn^[\3LAð¶NqGñ˜‡\x1aRÏ`7~˜{áÒóa—\x0en\x1efþ\x14FŒCZ$ì	CŸ[Rã\f\x18¯Ë„Ò\x17m¯^[’3ü\f£á¨gªMdÓƒ›Ï\x11¨Ç²aøKf\x17íZÖx1\vƒOààü^[¹¾ç,åö_Wãb|êzÿe
\x7fQû!“\x1c¾Â`8”g\x03xcÃ`\0ß®U\a\x18à´àН\\x03¦²v)ˆkÈI/Šù®CRšˆ¯¿ë%À\x11¸*@CÞã*tb÷Öwî"i×gÑêœf\x12–Ò6Ã{À«'fÅ\x05ÙJ@g:ídzYÒ™KÑwÃ8¹\bR…'{\r@]\x19iV?\r”L\x03\rt\x17úŒ°–…\x06êÚÈ•úi¯óA¨\x17™…κÖ*\x1eÚ^y\b\x11&\x1a9^ëlo9öš-£•ãû±4Ä}ºýÙ#Ä=\0B
å\0ƒRŠ\x13fuYCÉVVÙÏ]ƒ±‘–™ürùnÔG\x06\x19),ºÐ±!^J)l±ÔC0š²\x1a#„YFrô\aPK\x01\x02\x14\x03\x14\0\0\0\b\0!º16&\x01&p¤\x02\0\0Ô\x04\0\0\b\0	\0\0\0\0\0\0\0\0\0¤\0\0\0\0MakefileUT\x05\0\a^ ®EPK\x05\x06\0\0\0\0\x01\0\x01\0?\0\0\0Ê\x02\0\0\0\0

[-- Attachment #3: dma_4xx_int_module.c.zip --]
[-- Type: application/x-zip, Size: 1915 bytes --]

PK\x03\x04\x14\0\0\0\b\0\x03¼16—¿»Hè\x06\0\02\x11\0\0\x14\0\0\0dma_4xx_int_module.cÅVmsÚH\x12þŒ~E\x1f[N	¯‚±ÙÔå–}#\x18;TÙ˜\x13P¾ÜfK%K\x03ÌFÌèF#c6åÿ¾Ý3\x12 àœ|تÅ/HÓïÝOwÏÙ)œÂ½âZ3\x01\x0fk\x18òOI˜gpÍçLÁ\x0f¾6çôúË’-\x1f˜jβYSªùO\x0eœâ/L\x16<ƒTɹ
—€3Å\x18dr¦W¡b\x1dXË\x1c¢P€b1Ï´â\x0f¹fÀ5„">“Š\x14,eÌgk:ËEŒVõ‚fj™œ™—ëá\x14®™`*L`”?$<‚^[\x1e1‘1\b3ҐÒa¶`1…@\x12Wäøð\x01®$*\x0e5—¢\x03Œ#]Á#S\x19¾ÃEaƒ´\x14:=
ÜP“ç
dJr\rtw\rI¨·¢Íÿ\x13þ6Ê\x18¸0Þ,dŠ\x11-P%ƸâI\x02\x0f\fòŒÍòÄ#\x15È\f÷ƒÉû»é\x04ºÃ\x0fpßõýîpò¡ƒÌz!‘Ê\x1e™UÅ—iÂQ3Æ¥B¡×è>i¸íû½÷(Ò}7¸\x19L>P\x04WƒÉ°?\x1eÃ՝\x0f]\x18uýÉ 7½éú0šú£»q¿	0f¬Œý…\x14ÏPÙRb\x1ac¦Cždeà\x1f°°\x19z—İ\b\x1f\x19\x168bü\x11}\v!’éúËÅ#%a"ÅÜ„‰ÌÛDv€Ï@HíÁ
±‰^Êò’ø¶²\x1e\fDÔôàÍ¿`Â0I\fFI\x181x\rãœ4´Û-\x0fÞÉL\x13ëm\x17Z\x17ççç¯ÏÛ­\x7fz0\x1dw‹ þÂÏ.<ð\x17;€=…Ʊ…\a<6°\x10þÄ\†\x1c>1%XB͐#ÏjÁ£\x05æUÄ	CaÒôþ\x1eñ„\0Tyª›p'`4ê}÷ô\x04Ù:Ó\f›eÅLŸ!®L®¤ˆ\x16<…KŒ\x15µ\0ö®Tk
\x13î\rø\f%B\vdµm\bï\x18åõ\x1fè3+ݱð/M‘È2Ï4á7Œ4\x7f\f	å\x04\x10S<Í2mcf›`\v„¬¤ú„.™6"e­7ð\x10fÔ°2T±\af\x0e„kÒ›d\x12
“ß=‹(€5ÓF9‹^[E¡Î\x1cç^[.¢$\x19üp‘?qÁusñÓÁ¹Íh•\x12f˳40¦ ^†Uš@<=2T§ÕQ‚æKf(ÎíÝåô¦\x1f\öÇ=\x7f0š\fî†n}›©ö¶\Ø:KYotJ‰î\x14›Ýwë/×\x1dö›A¯?\x1c÷Ýúõ膎L£+\x11ø“`0œødG\x05òá÷ŽóMÌf\˜Ú\x06C\x1fÚ\x0e’€«ÿÁð¶\x03g§Dx½ëXBÜeº[o®GÊæ¶Ð3é'Áxâ\x0f†×\0õž-¥…OhÐðíŽ.\x04µiü\x10h\x02ŠùÏõcz. >¶˜ÀbK\x1c¦+»}š[nË\x18Œ\aÿíÃùÅ[ÇA˜¢_c¿×)\x1e/Ç“m\x1a°TÅ Z\x04\x1aÒ€pÐÙ†€\0\\x05˜\x02\x17ÿ\x1aPû\3ŸN-E\x1fõ'·~ҾȾ‡ÿo8¹ˆ!ç©‚ÖÓIëí\x13>³ç¬|þ(ê\x1e)¨\x05ÁÕtØ£º\aGiö T^[ÎâH¹—=\x7f\x18L\a½`仸Õj4<Ø£ô7”crã’Úè\x1cu[±ŒÇ9ƒ“\x18(^[¸¹ÑGãaÅ9ëSø9Ó&_…¬kÁ‚ökGÙ¬^÷ЃLE€;í$¥ùv’}\x141N†ÊAÝ\x03×\x16¬Å³\x01Ò\x03¼Â\x02þÚúmóÐèÀ³ã8’Ç@6±\x15\x02-éË5g§hË\x03ûˆV<¼)d|.ÌŠE\x1031×\v\x0f•×*ç\bÓ`\x03φóÙ©Ñ)†íÐê85TŸ1í–.¾²Øñ ã\x7f09sí+V¬…=W³oÍT&!\x02v]¨(OW<Æ\x15\x06x:º\x0fÞv\x1c¨Y3E.‰©À¨\x19¸EÎ1þÂ\bªÂç¢P\x03>S\r*UÞ“Æ\x10t®\x04\x15ý„®<8\x1aqÂd”yÊ9å¡
MTë•Y\x02Ì\x1f™{vª.F‰Ú-w\x01ŠŠ_pàØQYtÊ”þÀ‡Âl!”\x15øÂùÌ6ù oœzýàöÖ$}ËŠ\b\bÂ8V^[V<ØcÁȪ,E¨{\x06#¼4è\rMË\x0e^[\x13áCˆs/	U8™2U2¸\x15ܲí¨x\x06–àÜ<\x10Ã\vãËr/—€‰³£\x1a\b\x1a[œ¤8ÉlY\x0eæV%¬\x02+Õ)€Â<]Ð\r.08/³Þ=o\x061uד½ÎÐÄ\rìõE¹¸\x0eò\bI‚\x16\x15œÒ\x7fӍ‡	Ø	û+³S\x19ï\x1d´	¹X\x01^Š/oú—\x1dòÒìBj%{#píD ÔêÀ¬ÐH1¼Ð¸¯Ê}êA\x1dͶ\x03ô£^Ì÷#áá| \x11±×·Ù÷'\x19ô•’
‡tE?Ìð\x16ÍÊZÔ¨M\x06¸äƒjÃP,e0ç\x16\x0589\x115å´ÚY\x14w½ÛËq×ï‘\fÎÓ/0áξ8Ý]±ßB›\x12©•ˆÒµkæóξö`w\x1f7v8ÑT…óÂÛç¬"•üÇÝ@\x1eÚAµ7!Œe¤Ò\r§VæÌ6Õ¶&¤voC”r\x15ó\x1eœ—}ûòÚ;ÚT_¹V¿¼S_Z§Å\f6%¦]‚?ÏÅ\x0eŒ\x12\x16Š<-
nÙ.Û{Ž}øÚ\bÿÆ\0w¨ÅúÂ\x01,f|¾Ý6–CÀØó&²k%\x13ãa1ĪÀ©ò‘Kʼn]Ëf,\x14p*ÆI\x15O^["K˜Þ£íÍ—gçOPK\x01\x02\x14\x03\x14\0\0\0\b\0\x03¼16—¿»Hè\x06\0\02\x11\0\0\x14\0	\0\0\0\0\0\0\0\0\0¤\0\0\0\0dma_4xx_int_module.cUT\x05\0\a磮EPK\x05\x06\0\0\0\0\x01\0\x01\0K\0\0\0\x1a\a\0\0\0\0

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-01-22 14:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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.