Search Linux Wireless

Re: p54spi (STLC4560) with Marvel XScale CPU (kernel 2.6.25.4)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2010/9/22 Christian Lamparter <chunkeey@xxxxxxxxxxxxxx>:
> why polling? They even say "14. Wait for the READY interrupt".

This code from Sagrad:

        SPI_IRQ(DISABLE);

        // Turn the device Off and then On again.
        SPIDRV_Pwr(FALSE);
        SPIDRV_Pwr(TRUE);

        // 1. Power up
        // 2. Wait 240 ms.
        Delay(480);

[skiped]

       // 14. Wait for the READY interrupt (100 ms timeout).
        // Loop while waiting for SPI device to respond with
interrupt, max timeout is WIFI_BOOT_TIMEOUT
        for ( i = 0 ; i < WIFI_BOOT_TIMEOUT ; i++)
        {
                TempReg = SPIDRVReadReg32(SPI_ADRS_HOST_INTERRUPTS);
                if( TempReg && SPI_HOST_INT_READY)
                {
                        // 15. Acknowledge the READY interrupt.
                        SPIDRVWriteReg32(SPI_ADRS_HOST_INT_ACK,
SPI_HOST_INT_READY);
                        // 16. Issue the SLEEP interrupt.
                        SPIDRVWriteReg32(SPI_ADRS_ARM_INTERRUPTS,
SPI_ARM_INT_SLEEP);
                        break;
                }

                Delay(1);
        }

        SPI_IRQ(ENABLE);

        if (i == WIFI_BOOT_TIMEOUT)
        {
                ret = FALSE;
        }
        else
        {
                ret = TRUE;
                SET_WIFI_ACTIVE();
        }

SPIDRVReadReg32(SPI_ADRS_HOST_INTERRUPTS) - poll SPI register. IRQ
from STLC chip disabled.

> Have you checked if the module parameters for power + irq are correct?

Yes. I check this in code and on osciloscope.

> Also, on power_on the driver currently waits just 10 and not 240 ms,
> maybe this could just be the problem...

OK. I try change this.

-- 
Sincerely,
Alex A. Mihaylov
AKA MinimumLaw
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux