From: Christian Lamparter <chunkeey@googlemail.com>
To: Alex Mihaylov <minimumlaw@gmail.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: p54spi (STLC4560) with Marvel XScale CPU (kernel 2.6.25.4)
Date: Wed, 22 Sep 2010 14:24:39 +0200 [thread overview]
Message-ID: <201009221424.39949.chunkeey@googlemail.com> (raw)
In-Reply-To: <AANLkTim3YQ4vNyM_OA4qc+mjGJiwYoHrLB=x1sp+R8vP@mail.gmail.com>
On Wednesday 22 September 2010 14:01:46 Alex Mihaylov wrote:
> 2010/9/22 Christian Lamparter <chunkeey@googlemail.com>:
> > their GPL driver looks funny. (Max, it's really worth a look)
> > anyway found this:
> > /*
> > Sequence taken from STLC4560 DataSheet
> > This sequence can be run with the maximum SPI clock frequency (that is, 48 MHz).
> > 1. Power up.
> > 2. Wait 240 ms.
> > 3. Halt processor (EHostDeviceCntrl2 = KSetHostOverride | KSetHostCPUEn=0).
> > 4. Wait 1 us.
> > 5. Enable DMA TX (EHostDmaTxCntrl, KDmaTxCntrlEnable).
> > 6. Write DMA TX length (EHostDmaTxLength).
> > 7. Write DMA TX base (EHostDmaTxBase1).
> > 8. Wait 1 ìs.
> > 9. Write firmware image (EHostDmaData).
> > 10. RAM reset (EHostDeviceCntrl2 = KSetHostOverride | KSetHostReset | KSetRamBoot).
> > 11. Wait 40 ms.
> > 12. RAM boot (EHostDeviceCntrl2 = KSetHostOverride | KSetRamBoot),
> > 13. Enable host interrupts (EHostIntEnable1 = KIrqReady | KIrqWrReady | KHwUpdate | KSwUpdate).
> > 14. Wait for the READY interrupt (100 ms timeout).
> > 15. Acknowledge the READY interrupt.
> > 16. Issue the SLEEP interrupt.
> > */
> >
> > maybe it helps
>
> Yes. I see this code. But in p54spi.c I found sequence from 1 to 13.
> Sagrad make this steps with disabler interrupt from card (poll chip
> register). But p54spi wait hardware READY IRQ from chip in 14 (and in
> IRQ routine send acknowledge from 15).
why polling? They even say "14. Wait for the READY interrupt".
Have you checked if the module parameters for power + irq are correct?
static int p54spi_gpio_power = 97;
MODULE_PARM_DESC(p54spi_gpio_power, "gpio number for power line");
static int p54spi_gpio_irq = 87;
MODULE_PARM_DESC(p54spi_gpio_irq, "gpio number for irq line");
Also, on power_on the driver currently waits just 10 and not 240 ms,
maybe this could just be the problem...
next prev parent reply other threads:[~2010-09-22 12:24 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-22 9:44 p54spi (STLC4560) with Marvel XScale CPU (kernel 2.6.25.4) Alex Mihaylov
2010-09-22 10:38 ` Max Filippov
2010-09-22 11:25 ` Alex Mihaylov
2010-09-22 11:36 ` Christian Lamparter
2010-09-22 12:01 ` Alex Mihaylov
2010-09-22 12:24 ` Christian Lamparter [this message]
2010-09-22 12:33 ` Alex Mihaylov
2010-09-22 12:58 ` Christian Lamparter
2010-09-22 13:41 ` Max Filippov
2010-09-22 13:48 ` Christian Lamparter
2010-09-22 14:57 ` Max Filippov
[not found] ` <AANLkTinaaAp8XXbqEmA-BCEbSQ8oMV5M-BNSs2iKmyNk@mail.gmail.com>
2010-09-22 16:10 ` Alex Mihaylov
2010-09-22 16:43 ` Max Filippov
2010-09-22 17:33 ` Alex Mihaylov
2010-09-22 19:59 ` Max Filippov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201009221424.39949.chunkeey@googlemail.com \
--to=chunkeey@googlemail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=minimumlaw@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).