From: Tom <tom.spi.devel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: Moorestown SPI
Date: Thu, 9 Jun 2011 11:46:08 +0530 [thread overview]
Message-ID: <BANLkTi=opnmBxKYbXyGMD72qWF5wtqNeeA@mail.gmail.com> (raw)
In-Reply-To: <BANLkTikaHBL_+_vCc=ow2E9QzWK-58Pq0Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Hi Everyone,
Has anybody noticed such issues?
Or is there something wrong with my protocol driver...
any pointers will be really helpful.
Regards,
Tom
On Fri, May 27, 2011 at 8:22 PM, Tom <tom.spi.devel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> The MRST dw_spi in Transmit & receive mode running on kernel 2.6.35,
> stepping A3, is unable to receive data properly.
> The slave is sending the data as expected, but the spi controller is not
> reading it properly.
>
> If i insert the messages or the delay equivalent as shown below it works.
> Any clue ?
>
> static int u8_writer(struct dw_spi *dws)
> {
> if (!(dw_readw(dws, sr) & SR_TF_NOT_FULL)
> || (dws->tx == dws->tx_end))
> return 0;
>
> dw_writew(dws, dr, *(u8 *)(dws->tx));
> // printk("dw write %x ",*(u8 *)(dws->tx));
> udelay(50);
> ++dws->tx;
>
> wait_till_not_busy(dws);
> return 1;
> }
>
> static int u8_reader(struct dw_spi *dws)
> {//printk("dw spi %s ",__func__);
> while ((dw_readw(dws, sr) & SR_RF_NOT_EMPT)
> && (dws->rx < dws->rx_end)) {
> *(u8 *)(dws->rx) = dw_readw(dws, dr);
> // printk("dw read %x ",*(u8 *)(dws->rx));
> udelay(50);
> ++dws->rx;
> }
>
> wait_till_not_busy(dws);
> return dws->rx == dws->rx_end;
> }
>
------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
prev parent reply other threads:[~2011-06-09 6:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-27 14:52 Moorestown SPI Tom
[not found] ` <BANLkTikaHBL_+_vCc=ow2E9QzWK-58Pq0Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-06-09 6:16 ` Tom [this message]
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='BANLkTi=opnmBxKYbXyGMD72qWF5wtqNeeA@mail.gmail.com' \
--to=tom.spi.devel-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
/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).