[lkml]   [2005]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH/RFC] simple SPI controller on PXA2xx SSP port, refresh
On Thu, 2005-10-27 at 19:33 +0800, Mike Lee wrote:
> Dear Stepen
> I am now writing another controller driver by david's framework.
> But leak of debuging layer, could your loopback driver serve for this
> purpose and how could i use it?

The file pxa2xx_loopback.c should be controller independent, but it does
require that the hardware (in my case the PXA255 NSSP) support a
loopback mode (i.e. tx connected to rx).

To create a loopback device for driver you should include:

static struct pxa2xx_spi_chip loopback_chip_info = {
.mode = SPI_MODE_3,
.tx_threshold = 12,
.rx_threshold = 4,
.dma_burst_size = 8,
.bits_per_word = 8,
.timeout_microsecs = 64,
.enable_loopback = 1,

static struct spi_board_info streetracer_spi_board_info[] __initdata = {
.modalias = "loopback",
.max_speed_hz = 3686400,
.bus_num = 2,
.chip_select = 3,
.controller_data = &loopback_chip_info,

in your board init code and install the module per your configuration.
Anything written to /dev/slp23 will be echoed back to /dev/slp23 via the
"SPI controller".

Hope this helps!


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-10-27 18:43    [W:0.056 / U:0.572 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site