linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* UTU2440 based on s3C2440
@ 2010-05-28 11:56 v
  0 siblings, 0 replies; only message in thread
From: v @ 2010-05-28 11:56 UTC (permalink / raw)
  To: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Hello,

I'm using a UTU2440 dev kit (http://youtiyou.com/SamsungS3C2440EK.aspx) 
based on a s3c2440.
I try to enable spidev device on the board.

I add the following lines for use spi on the platform is the kernel in 
the file:
arch/arm/mach-s3c2440/mach-utu2440.c:

/* SPI driver info */
static struct spi_board_info __initdata_refok utu2440_spi_board_info[] = {
//SPI Port 0
     {
       .modalias    = "spidev",
       .max_speed_hz    = 25000000, //25 MHz
       .bus_num    = 0,
       .chip_select    = 0,
       .mode     = SPI_MODE_3,
     },
}

static void utu2440_spi0_cs(struct s3c2410_spi_info *spi, int cs, int pol)
{
     s3c2410_gpio_setpin(S3C2410_GPG2, pol);
}

static struct s3c2410_spi_info utu2440_spi0_platdata = {
     //.pin_cs = S3C2410_GPG2,
     .board_size = ARRAY_SIZE(utu2440_spi_board_info),
     .board_info = utu2440_spi_board_info,
     .set_cs = utu2440_spi0_cs,
};

I activate the SPI_DEV in the kernel with the following lines in .config 
kernel configuration:

#
# SPI support
#
CONFIG_SPI=y
CONFIG_SPI_MASTER=y

#
# SPI Master Controller Drivers
#
CONFIG_SPI_BITBANG=y
CONFIG_SPI_S3C24XX=y
# CONFIG_SPI_S3C24XX_GPIO is not set

#
# SPI Protocol Masters
#
# CONFIG_SPI_AT25 is not set
CONFIG_SPI_SPIDEV=y

Unfortunately it didn't work, during the boot i have the following error:
s3c2410-spi s3c2410-spi.0: Failed to register SPI master
s3c2410-spi: probe of s3c2410-spi.0 failed with error -22

Is somebody can help me to complete the code ?

Best regards

Vincent

PS: sorry for my poor english








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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-05-28 11:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-28 11:56 UTU2440 based on s3C2440 v

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).