Example #1
0
static inline int DoC_WaitReady(void __iomem * docptr)
{
	/* This is inline, to optimise the common case, where it's ready instantly */
	int ret = 0;

	/* read form NOP register should be issued prior to the read from CDSNControl
	   see Software Requirement 11.4 item 2. */
	DoC_Delay(docptr, 4);

	if ((ReadDOC(docptr, Mplus_FlashControl) & CDSN_CTRL_FR_B_MASK) != CDSN_CTRL_FR_B_MASK)
		/* Call the out-of-line routine to wait */
		ret = _DoC_WaitReady(docptr);

	return ret;
}
Example #2
0
static inline int DoC_WaitReady(struct doc_priv *doc)
{
    unsigned long docptr = doc->virtadr;
    int ret = 0;

    DoC_Delay(doc, 4);

    if (!(ReadDOC(docptr, CDSNControl) & CDSN_CTRL_FR_B))
        /* Call the out-of-line routine to wait */
        ret = _DoC_WaitReady(doc);

    DoC_Delay(doc, 2);
    if(debug) printk("DoC_WaitReady OK\n");
    return ret;
}
Example #3
0
static inline int DoC_WaitReady(void __iomem * docptr)
{
	
	int ret = 0;

	
	DoC_Delay(docptr, 4);

	if (!(ReadDOC(docptr, CDSNControl) & CDSN_CTRL_FR_B))
		
		ret = _DoC_WaitReady(docptr);

	
	DoC_Delay(docptr, 2);

	return ret;
}
Example #4
0
static inline int DoC_WaitReady(unsigned long docptr)
{
	/* This is inline, to optimise the common case, where it's ready instantly */
	int ret = 0;

	/* 4 read form NOP register should be issued in prior to the read from CDSNControl
	   see Software Requirement 11.4 item 2. */
	DoC_Delay(docptr, 4);

	if (!(ReadDOC(docptr, CDSNControl) & CDSN_CTRL_FR_B))
		/* Call the out-of-line routine to wait */
		ret = _DoC_WaitReady(docptr);

	/* issue 2 read from NOP register after reading from CDSNControl register
	   see Software Requirement 11.4 item 2. */
	DoC_Delay(docptr, 2);

	return ret;
}