cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Visitor
Visitor
2,719 Views
Registered: ‎09-18-2009

Linux I2C stuck in XAssert

Using ppc440 xilinx ml507.

I am running into a problem during accessing an I2C device. It does not happen very frequently, but when it does, the code goes into an endless loop in the following function:

../drivers/xilinx_common/xbasic_types.c at line 104 function name:

void XAssert(char *File, int Line)

{

/* if the callback has been set then invoke it */

if (XAssertCallbackRoutine != NULL) {

(*XAssertCallbackRoutine) (File, Line);

}

/* if specified, wait indefinitely such that the assert will show up

* in testing

*/

while (XWaitInAssert) {

}

}

XWaitInAssert was previously define as TRUE in this same file.

I would like to know what are the condition that takes the code to this point, I am having hard time following the code to understand how and why it gets to this point. Even if it is due to an hardware problem, can you point out to me where is the code that tells to go to this endless loop.

Thanks

0 Kudos
Reply
1 Reply
Adventurer
Adventurer
2,643 Views
Registered: ‎10-28-2007

In most of the xilinx supplied drivers each function (e.g. Open, close, poll, reset) checks the validity of device specific data structures (base address, configuration etc.) before executing the core function code.  Often it will do these checks with an XAssert().

 

You could add a printk that makes use of the char * and int arguments to tell you where the XAssert was called from.

 

Joshua

0 Kudos
Reply