How to clear BCH_CTRL_COMPLETE_IRQ bit

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to clear BCH_CTRL_COMPLETE_IRQ bit

485 Views
x10
Contributor V

Hi,

I got confused with how to clear BCH_CTRL_COMPLETE_IRQ bit. In iMX28 RM it said:"

This bit indicates the state of the external interrupt line. Write a one to the SCT clear address to clear

the interrupt status bit." But no SCT registers in BCH module!

In linux platform, the driver clears the bit with following code:

/* Clears a BCH interrupt. */

void gpmi_clear_bch(struct gpmi_nand_data *this)

{

  struct resources *r = &this->resources;

  writel(BM_BCH_CTRL_COMPLETE_IRQ, r->bch_regs + HW_BCH_CTRL_CLR);

}

In CE platform (MX28_FSL_V3), the driver clears the bith with following macro:

    // Clear the ECC Complete IRQ.

    BW_BCH_CTRL_COMPLETE_IRQ(0);

Which one is right?

BR

Cheng Shi

Emtronix

Labels (1)
0 Kudos
1 Reply

356 Views
igorpadykov
NXP Employee
NXP Employee

Hi Cheng

"SCT" means SET,CLEAR,TOGGLE macros as defined in Chapter 39

Register Macro Usage i.MX28 RM. For its addresses one can look at headers in

i.MX28 OBDS..src/include/mx28/mx28.h

Lab and Test Software (1)

On-Board Diagnostic Suit for the i.MX28

http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/i.mx-applications-process...

or at similar i.MX23 BCH module description in sect.15.6.1 "Hardware BCH ECC Accelerator

Control Register Description" i.MX23 Reference Manual

http://www.freescale.com/files/dsp/doc/ref_manual/IMX23RM.pdf

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos