mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mike Lee <eemike@gmail.com>
To: stephen@streetfiresound.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH/RFC] simple SPI controller on PXA2xx SSP port, refresh
Date: Thu, 3 Nov 2005 17:37:21 +0800	[thread overview]
Message-ID: <1ffb4b070511030137o345049d2o5ed5e020c96e022d@mail.gmail.com> (raw)
In-Reply-To: <1130870131.10324.51.camel@localhost.localdomain>

Hi stephen

On 11/2/05, Stephen Street <stephen@streetfiresound.com> wrote:
> On Sun, 2005-10-30 at 02:25 +0800, Mike Lee wrote:
> > Also, in your pxa_spi driver, you always read before write in the
> > interrupt handler. If rx and tx is pointing to the same buffer,
> > reading data will always overwrite the tx data. why not write before
> > read?
> See above. Must write to read.
I found that i misunderstand your coding. i got your idea.

> I never found any documentation on the net, usually the data-sheet for
> the chip you are talking to specifies the SPI requirements (master,
> slave, clocks, chip selects, etc). Can you send me a link to the chip?
>
It is too bad that no good reference document for development.
I am now using i.MX Soc which is ARM920 core and embedded 2 SPI bus.
You can download the datasheet from freescale web site.

Actually, i am now available to use your loopback driver on my SPI
controller driver. But only limited to PIO mode, and i get stuck on
DMA mode because of trigger problem of SPI module, I am now trying
very hard to solve that.

In my driver, there is a little bug that i could not rmmod the driver.
it will stop at unregistering device. Below is a debug msg dump. it
seem to stop at down_write(&device_subsys.rwsem) in device_del
------------------------------------------------------------
/mnt/tmpfs/tmp # insmod imx_spi.ko
bus platform: add driver imx-spi
CLASS: registering class device: ID = 'spi1'
imx-spi imx-spi.0: registered master spi1
 spi1.1-loopback: setup finish
DEV: registering device: ID = 'spi1.1-loopback'
bus spi: add device spi1.1-loopback
imx-spi imx-spi.0: registered child spi1.1-loopback
bound device 'imx-spi.0' to driver 'imx-spi'
CLASS: registering class device: ID = 'spi2'
imx-spi imx-spi.1: registered master spi2
bound device 'imx-spi.1' to driver 'imx-spi'
/mnt/tmpfs/tmp # rmmod imx_spi.ko
bus platform: remove driver imx-spi
DEV: Unregistering device. ID = 'spi1.1-loopback'

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


Some question on SPI subsystem:
I really get confused on the structure on the whole system. e.g. the
platform_data and controller_data in board_info.  What are thier
purposes?
Also i found that spi_register_board_info is declared as __init, that
mean i can not register board info as a module, is it because there is
no 'real' probe on SPI bus? (this comsume me time to reflash my board
to debug)
I know that SDIO could have a SPI mode. Could SPI subsystem be used to
control SDIO device?

Sorry for my annoying questions.

Thanks for helping
Mike,Lee

  reply	other threads:[~2005-11-03  9:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-25 23:48 stephen
2005-10-27 11:33 ` Mike Lee
2005-10-27 16:41   ` Stephen Street
2005-10-29 18:25     ` Mike Lee
2005-11-01 18:35       ` Stephen Street
2005-11-03  9:37         ` Mike Lee [this message]
2005-11-04 18:11           ` Stephen Street
2005-11-04 20:36             ` Mark Underwood
2005-11-07 20:43               ` Mark Underwood
2005-11-04  0:15 David Brownell
2005-11-04 18:52 ` Stephen Street
2005-11-04 20:16   ` David Brownell
2005-11-04 23:38     ` Stephen Street
2005-11-05  0:54       ` David Brownell
2005-11-05  2:28         ` Stephen Street
2005-11-05 20:58           ` David Brownell

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=1ffb4b070511030137o345049d2o5ed5e020c96e022d@mail.gmail.com \
    --to=eemike@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stephen@streetfiresound.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

all inboxes | Powered by JetHome®