Skip to contentSkip to conversation

Bestcomm tasks and interrupts on MPC5200(B)

DISCUSSION Dave Best 5 participants 7 messages Jan 20, 2009 – Jan 21, 2009 Char and misc drivers

lore
Share & tools
lore

Dave Best

author
#0 lore raw

I'm trying to write a driver which uses the Local Plus Bus on my MPC5200B a= nd therefore have to use BestComm DMA, which requires me to use a Gen_BD ta= sk for data transfer with Local Plus.
I tried to follow the fec driver that is currently used and took a peek at = the mpc52xx-ac97 driver which at least uses the same kind of bus as I.

Initialising the task, resetting and enabling works fine. Even request_irq = reports no error, but when I start a transfer it hangs and if I am lucky, a= n interrupt occurs after quite some time. But it's always the BestComm ethe= rnet rx task which produces an RFIFO interrupt, presumably after the watchd= og catches on.=20
If this happens my interrupt occurs to.

I tried to debug this situation but I am still clueless.
If I use the MPC5200 Interrupt emulation registers to force an interrupt fo= r my interface to occur, nothing happens except that it hangs.

Any hints, tips or help appreciated.

Dave=0A=0A=0A

#1 lore raw
Quoted 3 lines · Dave Best

I'm trying to write a driver which uses the Local Plus Bus on my MPC5200B and therefore have to use BestComm DMA, which requires me to use a Gen_BD task for data transfer with Local Plus. I tried to follow the fec driver that is currently used and took a peek at the mpc52xx-ac97 driver which at least uses the same kind of bus as I.

Find attached a Bestcomm instruction set summary sheet from the Freescale folks. Hope this helps.

-Frank

Quoted 14 lines

Initialising the task, resetting and enabling works fine. Even request_irq reports no error, but when I start a transfer it hangs and if I am lucky, an interrupt occurs after quite some time. But it's always the BestComm ethernet rx task which produces an RFIFO interrupt, presumably after the watchdog catches on. If this happens my interrupt occurs to.

I tried to debug this situation but I am still clueless.
If I use the MPC5200 Interrupt emulation registers to force an interrupt for my interface to occur, nothing happens except that it hangs.

Any hints, tips or help appreciated.

Dave

_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-dev

#2 lore raw
In reply to Dave Best
Quoted 10 lines · Dave Best

I'm trying to write a driver which uses the Local Plus Bus on my MPC5200B and therefore have to use BestComm DMA, which requires me to use a Gen_BD task for data transfer with Local Plus. I tried to follow the fec driver that is currently used and took a peek at the mpc52xx-ac97 driver which at least uses the same kind of bus as I.

Initialising the task, resetting and enabling works fine. Even request_irq reports no error, but when I start a transfer it hangs and if I am lucky, an interrupt occurs after quite some time. But it's always the BestComm ethernet rx task which produces an RFIFO interrupt, presumably after the watchdog catches on. If this happens my interrupt occurs to.

I tried to debug this situation but I am still clueless.
If I use the MPC5200 Interrupt emulation registers to force an interrupt for my interface to occur, nothing happens except that it hangs.

Any hints, tips or help appreciated.

Below is a Disassembler I wrote a couple years ago. Just paste the hex of interest in the array below, re-compile and run.

Cheers,
-Frank

Quoted 9 lines

Dave

_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-dev

/*
* disasm.c - disassembler for MPC5200 Bestcomm DMA Firmware
* copy and paste task code into fw, compile a run
* by Frank bennett, 3/29/2006
*
* Based on Freescale pdf "SmartDMA Hand-Assembly Guides" *
* TODO:

*  o add inc[0:7] array (maybe var) to deternmine proper term condition (upper 3 bits)
*  o need to review sheet 3 of the pdf
*  o simulator would be nice

*
*/
// Task12 (TASK_GEN_TX_BD) : Start of TDT -> 0xf0008528
// linuxppc_2_4_devel/arch/ppc/5xxx_io/bestcomm/code_dma/image_rtos1/"dma_image.reloc.c //
// 31,30,29,28|27,26,25,24|23,22,21,20|19,18,17,16|15,14,13,12|11,10, 9, 8| 7, 6, 5, 4| 3, 2, 1, 0

//  0  0  0  1  0  0| 0  0  0  0  0| 0  0| 0  0| 0| 0  0  0  1  0  0| 1| 1  0  0  0  0  1| 0  0  0
// 0x10001308, /* 000C      DRD1A: var4 = idx1; FN=0 MORE init=0 WS=0 RS=2 */
//  1  0  0| 1  1  0  0  1  0| 0| 0| 1  1  0  0  1  0| 0  0| 0| 0  0  0  0  0  0| 1  1  0| 1  1  0

// 0x99190036, /* 002C LCD: idx2 = idx2; idx2 once var0; idx2 += inc6 */
// 31,30,29,28|27,26,25,24|23,22,21,20|19,18,17,16|15,14,13,12|11,10, 9, 8| 7, 6, 5, 4| 3, 2, 1, 0
// 1 0| 0 1 1 0, 0 1 0 1, 1 0 0, 0 0 1| 1 0| 1 0 0 1 0 0 0 0 1 0 0 0 0
// 0x9950d210

/* Task12(TASK_GEN_TX_BD): Start of TDT -> 0xf0008528 */
unsigned long fw[] = {
0x800220e3, /* 0000 LCD: idx0 = var0, idx1 = var4; idx1 <= var3; idx0 += inc4, idx1 += inc3 */
0x13e01010, /* 0004 DRD1A: var4 = var2; FN=0 MORE init=24 WS=0 RS=0 */
0xb8808264, /* 0008 LCD: idx2 = *idx1, idx3 = var1; idx2 < var9; idx2 += inc4, idx3 += inc4 */

   0x10001308, /* 000C      DRD1A: var4 = idx1; FN=0 MORE init=0 WS=0 RS=2 */
   0x60140002, /* 0010      DRD2A: EU0=0 EU1=0 EU2=0 EU3=2 EXT init=0 WS=2 RS=2 */
   0x0cccfcca, /* 0014      DRD2B1: *idx3 = EU3(); EU3(*idx3,var10)  */
   0xd9190300, /* 0018    LCDEXT: idx2 = idx2; idx2 > var12; idx2 += inc0 */
   0xb8c5e009, /* 001C    LCD: idx3 = *(idx1 + var00000015); ; idx3 += inc1 */
   0x03fec398, /* 0020      DRD1A: *idx0 = *idx3; FN=0 init=24 WS=3 RS=2 */
   0x9919826a, /* 0024    LCD: idx2 = idx2, idx3 = idx3; idx2 > var9; idx2 += inc5, idx3 += inc2 */
   0x0feac398, /* 0028      DRD1A: *idx0 = *idx3; FN=0 TFD INT init=24 WS=1 RS=2 */
   0x99190036, /* 002C    LCD: idx2 = idx2; idx2 once var0; idx2 += inc6 */
   0x60000005, /* 0030      DRD2A: EU0=0 EU1=0 EU2=0 EU3=5 EXT init=0 WS=0 RS=0 */
   0x0c4cf889, /* 0034      DRD2B1: *idx1 = EU3(); EU3(idx2,var9)  */
   0x000001f8, /* 0038    NOP */
   0x9950d210,
	0x2c4cf889,

0
};

union
{
unsigned long i;
struct

   {
       unsigned sb:3;     // [02:00] increment #2
       unsigned sa:3;     // [05:03] increment #1
       unsigned tc:6;     // [11:06] variable to which idx is compared   
       unsigned drtc:1;   //    [12] dr ? *(tc) : (tc)
       unsigned tu:2;     // [14:13] term usage 00-idx_a, 01-idx_b, 10- lit init 11-no cond
       unsigned ib:6;     // [20:15] init_b 
       unsigned drib:1;   //    [21] dr ? *(init_a) : (init_a)
       unsigned p:1;      //    [22] indx plus offset
       unsigned ia:6;     // [28:23] init_a 
       unsigned dria:1;   //    [29] dr ? *(init_a) : (init_a)
       unsigned ext:1;    //    [30] = 2 or 3 for LCD
       unsigned op:1;     //    [31] = 2 or 3 for LCD
   } lcd;
   struct
   {
       unsigned ll:13;    // [12:00] literal init low
       unsigned tu:2;     // [14:13] term usage == 2
       unsigned lh:15;    // [29:15] literal init hi 
       unsigned bas:1;    //    [30] = 2 or 3 for LCD
       unsigned op:1;     //    [31] = 2 or 3 for LCD

} lcdl;

struct

   {
       unsigned fn:3;     // [02:00]
       unsigned src:6;    // [08:03]
       unsigned drs:1;    //    [09] deref src?
       unsigned dst:6;    // [15:10]
       unsigned drd:1;    //    [16] deref dst? scal?
       unsigned ws:2;     // [18:17] 0-32bit, 1-1 byte, 2-16 word, 3-dynamic/reserved??
       unsigned rs:2;     // [20:19] 0-32bit, 1-1 byte, 2-16 word, 3-dynamic/reserved??
       unsigned init:5;   // [25:21]
       unsigned intr:1;   //    [26]
       unsigned tfd:1;    //    [27]
       unsigned more:1;   //    [28]      
       unsigned type:1;   //    [29] 
       unsigned ext:1;    //    [30] 
       unsigned op:1;     //    [31] = 0 for DRD
   } drd1a;
   struct
   {
       unsigned eu3:4;    // [03:00] Execution Unit3 Function number
       unsigned eu2:4;    // [07:04] Execution Unit3 Function number
       unsigned eu1:4;    // [11:08] Execution Unit3 Function number
       unsigned eu0:4;    // [15:12] Execution Unit3 Function number
       unsigned drd:1;    //    [16] deref dst? scal?
       unsigned ws:2;     // [18:17] 0-32bit, 1-1 byte, 2-16 word, 3-dynamic/reserved??
       unsigned rs:2;     // [20:19] 0-32bit, 1-1 byte, 2-16 word, 3-dynamic/reserved??
       unsigned init:5;   // [25:21]
       unsigned int:1;    //    [26]
       unsigned tfd:1;    //    [27]
       unsigned more:1;   //    [28]      
       unsigned type:1;   //    [29] 
       unsigned ext:1;    //    [30] 
       unsigned op:1;     //    [31] = 0 for DRD
   } drd2a;
   struct
   {
       unsigned od1:6;    // [05:00] EU operand 1
       unsigned od0:6;    // [11:06] EU operand 0
       unsigned eu:2;     // [13:12] EU#, only #3 available on MPC5200
       unsigned mems:6;   // [19:14] memory write source
       unsigned drds:1;   //    [20]      
       unsigned rsv2:1;   //    [21]      
       unsigned memd:6;   // [27:22] memory write destination
       unsigned rsv1:1;   //    [28] reserved?
       unsigned type:1;   //    [29] 
       unsigned ext:1;    //    [30] 
       unsigned op:1;     //    [31] = 0 for DRD
   } drd2b1;
   struct
   {
       unsigned odb1:6;   // [05:00] EUb operand 1/3/5/7
       unsigned odb0:6;   // [11:06] EUb operand 0/2/4/6
       unsigned eub:2;    // [13:12] EUb#, only #3 available on MPC5200
       unsigned oda1:6;   // [19:14] EUa operand 1/3/5/7
       unsigned oda0:6;   // [25:20] EUa operand 0/2/4/6
       unsigned eua:2;    // [27:26] EUa#, only #3 available on MPC5200
       unsigned rsv1:1;   //    [28]      
       unsigned type:1;   //    [29] 
       unsigned ext:1;    //    [30] 
       unsigned op:1;     //    [31] = 0 for DRD

} drd2b2;
} x;

// Condition codes (first 4 bits of the increments)
// >= c
// > 4
// once 0

// !=   6
// <=   a
// <    2

char *ft[] = {
"ld_acc", "unld_acc", "and", "or", "xor" "andn", "not", "add", "sub", "lsh", "rsh", "crc8", "crc16", "crc32",

	"endian32", "endian16"
};

char s[8];
indvar (int i)
{
switch ((i & 0x3f) >> 4)
{
case 0:

       sprintf (s, "var%d", i & 0x1f); // varN
       break;
   case 1:
       sprintf (s, "inc%d", i & 0x07); // incN
       break;
   case 2:    			                // extraN
   case 3:
       sprintf (s, "idx%d", i & 0x0f); // idxN
       break;

}
}

#define L2 LLev*2
main ()
{
int i, j, LLev = 0, drdt, ex = 0, ml;
char in[12];

   for (i = 0; fw[i]; i++)
   {
       x.i = fw[i];
       if (x.i == 0x1f8)
           printf ("0x%08x, // NOP\n", x.i);
       else if (x.lcd.op)      	// LCD
       {
           if (LLev == 0)
               strcpy (in, "");
           else
               strcpy (in, "  ");
           if (x.lcd.ext)			// LCDEXT
           {
               indvar (x.lcd.tc);
               printf
                   ("0x%08x, // %sLCDEXT: idx%d=idx%d; idx%d >%s%s ; idx%d += inc%d\n",
                    x.i, in, L2, L2, L2, x.lcd.drtc ? "*" : " ", s, L2,
                    x.lcd.sb);
           } else if (x.lcd.tu == 2)	 // LCDLIT
           {
               printf ("0x%08x, // %sLCDLIT: idx%d = 0x%07x ??\n",
                       x.i, in, L2, (x.lcdl.lh << 13) | x.lcdl.ll);
           } else                	// LCD
           {
               printf ("0x%08x, // %sLCD: ", x.i, in);
               if (x.lcd.p)    // indexed p-plus
               {
                   indvar (x.lcd.ia);
                   printf ("idx%d = %s(%s + ", L2 + 1, x.lcd.dria ? "*" : " ", s);
                   indvar (x.lcd.ib);
                   printf ("%s%s); ; ", x.lcd.drib ? "*" : " ", s);
               } else
               {
                   indvar (x.lcd.ia);
                   printf ("idx%d=%s%s, ", L2, x.lcd.dria ? "*" : " ", s);
                   indvar (x.lcd.ib);
                   printf ("idx%d=%s%s, ", L2 + 1, x.lcd.drib ? "*" : " ", s);
               }
               if (x.lcd.tu < 2)
               {
                   indvar (x.lcd.tc);
                   printf ("idx%d <=%s%s, ", (x.lcd.tu == 0) ? L2 : L2 + 1,
                           x.lcd.drtc ? "*" : " ", s);
               }
               if (x.lcd.tu != 3)
                   printf ("idx%d += inc%01x, ", L2, x.lcd.sa);
               printf ("idx%d += inc%01x\n", L2 + 1, x.lcd.sb);
               ex = 0;
           }
       }
       else
       {
           // DRD
           if (LLev == 0)
               strcpy (in, "  ");
           else
               strcpy (in, "    ");
           drdt = (ex << 2) | (x.drd1a.ext << 1) | x.drd1a.type;
           switch (drdt)
           {
           case 0:            // DRD1A
               printf ("0x%08x, // %sDRD1A: ", x.i, in);
               indvar (x.drd1a.dst);
               printf ("%s%s =", x.drd1a.drd ? "*" : " ", s);
               indvar (x.drd1a.src);
               printf ("%s%s; ", x.drd1a.drs ? "*" : " ", s);
               printf ("FN=%d (%s) ", x.drd1a.fn, ft[x.drd1a.fn]);
               if (x.drd1a.more)
                   printf ("MORE ");
               if (x.drd1a.tfd)
                   printf ("TFD ");
               if (x.drd1a.intr)
                   printf ("INT ");
               printf ("init=%d ", x.drd1a.init);
               printf ("WS=%d RS=%d \n", x.drd1a.ws, x.drd1a.rs);
               break;
           case 3:            // DRD2A
               ex = x.drd2a.ext;
               printf ("0x%08x, // %sDRD2A: ", x.i, in);
               printf ("EU0=0 EU1=0 EU2=0 EU3=%d (%s) EXT init=%d ",
                       x.drd2a.eu3, ft[x.drd2a.eu3], x.drd2a.init);
               printf ("WS=%d RS=%d \n", x.drd2a.ws, x.drd2a.rs);
               break;
           case 4:            // DRD2B1
               printf ("0x%08x, // %sDRD2B1: ", x.i, in);
               indvar (x.drd2b1.memd);   // mems ??
               printf ("*%s=EU%d(); ", s, x.drd2b1.eu);
               indvar (x.drd2b1.od0); printf ("EU%d(%s, ", x.drd2b1.eu, s);
               indvar (x.drd2b1.od1); printf ("%s) \n", s);
               break;
           case 5:            // DRD2B2
           case 7:            // DRD2B2?
               printf ("0x%08x, // %sDRD2B2: ", x.i, in);
               indvar (x.drd2b2.oda0); printf ("EU%d(%s, ", x.drd2b2.eub, s);
               indvar (x.drd2b2.oda1); printf ("%s) , ", s);
               indvar (x.drd2b2.odb0); printf ("EU%d(%s, ", x.drd2b2.eua, s);
               indvar (x.drd2b2.odb1); printf ("%s) ??\n", s);
				break;
           case 1:
           case 2:
           case 6:
               printf ("fix_me\n");
               ex = x.drd1a.ext;
               break;
           }
           LLev |= 1;
       }

}
}

#3 lore raw
In reply to Dave Best
Quoted 5 lines · Dave Best

I'm trying to write a driver which uses the Local Plus Bus on my MPC5200B and therefore have to use BestComm DMA, which requires me to use a Gen_BD task for data transfer with Local Plus. I tried to follow the fec driver that is currently used and took a peek at the mpc52xx-ac97 driver which at least uses the same kind of bus as I.

Initialising the task, resetting and enabling works fine. Even request_irq reports no error, but when I start a transfer it hangs and if I am lucky, an interrupt occurs after quite some time. But it's always the BestComm ethernet rx task which produces an RFIFO interrupt, presumably after the watchdog catches on. If this happens my interrupt occurs to.

Are you using the LocalPlus fifo device for the transfer (you need to if you aren't)?

I've attached a test driver that demonstrates how to do FIFO only and FIFO+DMA transfers over the localplus bus.

g.

Signature · 2 lines
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

From 23ca0c4b1fa01ace41720aaa0fb32bd4351d0afc Mon Sep 17 00:00:00 2001
From: Grant Likely <[email protected]>
Date: Mon, 5 Jan 2009 00:53:51 -0700
Subject: [PATCH] Add Bestcomm/localplus test utility

---
 drivers/misc/Kconfig                  |    4 +
 drivers/misc/Makefile                 |    1 +
 drivers/misc/mpc5200-localplus-test.c |  937 +++++++++++++++++++++++++++++++++
 3 files changed, 942 insertions(+), 0 deletions(-)
 create mode 100644 drivers/misc/mpc5200-localplus-test.c
drivers/misc/Kconfig +4 -0
index fee7304..edcab03 100644
@@ -13,6 +13,10 @@ menuconfig MISC_DEVICES
 
 if MISC_DEVICES
 
+config MPC5200_LOCALPLUS_PERF_TEST
+	tristate "MPC5200 LocalPlus Bus performance test module"
+	select PPC_BESTCOMM_GEN_BD
+
 config ATMEL_PWM
 	tristate "Atmel AT32/AT91 PWM support"
 	depends on AVR32 || ARCH_AT91SAM9263 || ARCH_AT91SAM9RL || ARCH_AT91CAP9
drivers/misc/Makefile +1 -0
index 817f7f5..19a3d92 100644
@@ -33,3 +33,4 @@ obj-$(CONFIG_SGI_XP)		+= sgi-xp/
 obj-$(CONFIG_SGI_GRU)		+= sgi-gru/
 obj-$(CONFIG_HP_ILO)		+= hpilo.o
 obj-$(CONFIG_C2PORT)		+= c2port/
+obj-$(CONFIG_MPC5200_LOCALPLUS_PERF_TEST) += mpc5200-localplus-test.o
drivers/misc/mpc5200-localplus-test.c new file +937 -0

937 lines not on this page · raw message

Signature · 1 line
1.5.6.3
author
#4 lore raw

Thanks for the driver.=20
I am looking into this.

I still have some trouble to compile and use the driver:
- I currently use the 2.6.23.1 kernel source which was provide along with = the pcm030 board by Phytec. And i guess your driver was compile along with = a newer driver as i can't find the "strict_strtoul" and "strict_strtol" fun= ctions in my kernel but i copied their source into my code. The same with "= of_find_matching_node" which i tried to exchange with "of_find_compatible_n= ode" but somehow my devicetree does not include the neccesay compatible typ= es. Here I tried "of_find_node_by_type" with "soc" and it seemed to work. The biggest problem seems to be "irq_create_of_mapping" for the localplus i= sr. It's giving me a kernel OOPS by trying to access data from 0x00000010.

If you could point out if I have to use a newer Kernel, and which, to solve=
these problems or how i can code around these with my current kernel sourc=
e.

Anyway, I looked over your code and only found that you first create an int= errupt routine for the localplus in general before creating the bestcomm ta= sk.
As far as I thought it was enough to create the bestcomm task and enable it= . And it was upon Bestcomm to watch over its tasks and to look for interrup= t sources according to their initiators/requestors to trigger their ISR.

In your example the local plus fifo would trigger its ISR when its done tra= nsfering the blocksize and reset the status bits and start over. The task w= ould run its ISR when its buffer is filled to create a new one.

If thats the way to go, i will try it out.

Thanks
Dave

--- Grant Likely <[email protected]> schrieb am Di, 20.1.2009:

Quoted 39 lines

Von: Grant Likely <[email protected]>
Betreff: Re: Bestcomm tasks and interrupts on MPC5200(B)
An: [email protected]
CC: [email protected]
Datum: Dienstag, 20. Januar 2009, 17:04

Quoted 1 line · Dave Best

I'm trying to write a driver which uses the Local

Plus Bus on my MPC5200B and therefore have to use BestComm DMA, which requires me to use a Gen_BD task for data transfer with Local Plus.

Quoted 1 line

I tried to follow the fec driver that is currently

used and took a peek at the mpc52xx-ac97 driver which at least uses the same kind of bus as I.

Quoted 2 lines

Initialising the task, resetting and enabling works

fine. Even request_irq reports no error, but when I start a transfer it hangs and if I am lucky, an interrupt occurs after quite some time. But it's always the BestComm ethernet rx task which produces an RFIFO interrupt, presumably after the watchdog catches on.

Quoted 1 line

If this happens my interrupt occurs to.

=20
Are you using the LocalPlus fifo device for the transfer (you need to
if you aren't)?
=20
I've attached a test driver that demonstrates how to do FIFO only and
FIFO+DMA transfers over the localplus bus.
=20
g.
=20
=20
=20
=20
--=20
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.=0A=0A=0A

#5 lore raw
Quoted 5 lines · Dave Best

Thanks for the driver.
I am looking into this.

I still have some trouble to compile and use the driver:
- I currently use the 2.6.23.1 kernel source which was provide along with=

the pcm030 board by Phytec. And i guess your driver was compile along wit=
h a newer driver as i can't find the "strict_strtoul" and "strict_strtol" f= unctions in my kernel but i copied their source into my code. The same with=
"of_find_matching_node" which i tried to exchange with "of_find_compatible=
_node" but somehow my devicetree does not include the neccesay compatible t= ypes. Here I tried "of_find_node_by_type" with "soc" and it seemed to work.

Quoted 1 line

The biggest problem seems to be "irq_create_of_mapping" for the localplus=

isr. It's giving me a kernel OOPS by trying to access data from 0x00000010=
.

Quoted 2 lines

If you could point out if I have to use a newer Kernel, and which, to sol=

ve these problems or how i can code around these with my current kernel sou= rce.

Current git kernel runs fine on the phytec board without patches.

Pengutronix makes the kernels for the phytec pcm030 boards. Their 2.6.23 kernel has probably been patched for real time support. If you don't need real time there's no real downside to using current git. Sascha may have some other patches that I'm unaware of.

Quoted 3 lines

Anyway, I looked over your code and only found that you first create an i=

nterrupt routine for the localplus in general before creating the bestcomm = task.

Quoted 1 line

As far as I thought it was enough to create the bestcomm task and enable =

it. And it was upon Bestcomm to watch over its tasks and to look for interr= upt sources according to their initiators/requestors to trigger their ISR.

Quoted 2 lines

In your example the local plus fifo would trigger its ISR when its done t=

ransfering the blocksize and reset the status bits and start over. The task=
would run its ISR when its buffer is filled to create a new one.

Quoted 50 lines

If thats the way to go, i will try it out.

Thanks
Dave

--- Grant Likely <[email protected]> schrieb am Di, 20.1.2009:

Quoted 31 lines

Von: Grant Likely <[email protected]>
Betreff: Re: Bestcomm tasks and interrupts on MPC5200(B)
An: [email protected]
CC: [email protected]
Datum: Dienstag, 20. Januar 2009, 17:04

Quoted 1 line · Dave Best

I'm trying to write a driver which uses the Local

Plus Bus on my MPC5200B and therefore have to use BestComm DMA, which requires me to use a Gen_BD task for data transfer with Local Plus.

Quoted 1 line

I tried to follow the fec driver that is currently

used and took a peek at the mpc52xx-ac97 driver which at least uses the same kind of bus as I.

Quoted 2 lines

Initialising the task, resetting and enabling works

fine. Even request_irq reports no error, but when I start a transfer it hangs and if I am lucky, an interrupt occurs after quite some time. But it's always the BestComm ethernet rx task which produces an RFIFO interrupt, presumably after the watchdog catches on.

Quoted 1 line

If this happens my interrupt occurs to.

Are you using the LocalPlus fifo device for the transfer (you need to
if you aren't)?

I've attached a test driver that demonstrates how to do FIFO only and
FIFO+DMA transfers over the localplus bus.

Quoted 8 lines

g.

--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

Quoted 5 lines

_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-dev

--=20
Jon Smirl
[email protected]

#6 lore raw

Hello,

Quoted 4 lines

Pengutronix makes the kernels for the phytec pcm030 boards. Their 2.6.23 kernel has probably been patched for real time support. If you don't need real time there's no real downside to using current git. Sascha may have some other patches that I'm unaware of.

We are currently working on a new release for both, the pcm030 and pcm032 having 2.6.28 for non-RT and 2.6.26 for RT.

Kind regards,

Wolfram

Signature · 2 lines
  Dipl.-Ing. Wolfram Sang | http://www.pengutronix.de
 Pengutronix - Linux Solutions for Science and Industry