linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* I can't see the SPI device file in /dev.
@ 2007-08-08  2:01 SangWoo Kang
  2007-08-08 17:15 ` David Brownell
  0 siblings, 1 reply; 5+ messages in thread
From: SangWoo Kang @ 2007-08-08  2:01 UTC (permalink / raw)
  To: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
  Cc: david-b-yBeKhBN/0LDR7s880joybQ

Hi~  
My developing Environment is below. 
Kernel-2.6.22.1
     tar jxvf linux-2.6.22.1.tar.bz2
     cd linux-2.6.22.1
     zcat ../2.6.22-rc1-at91.patch.gz | patch -p1 > patchresult.txt
CPU-AT91SAM9260 
Through the web searching and kernel documentation, I know that use the spidev kernel module. 
And I modify arch/at-91/board_sam9260.c file as like below 
 
static struct spi_board_info ek_spi_devices[] = { 
{ //spi1.0-slot1 
   .modalias = "spidev", 
   .chip_select = 0, 
   .max_speed_hz = 15*1000*1000, 
   .bus_num=1, 
}, 
{ //spi1.1-slot2 
   .modalias = "spidev", 
   .chip_select = 1, 
   .max_speed_hz = 15*1000*1000, 
   .bus_num=1, 
}, 
    ~
} 
 
After compiling the kernel, download kernel img to the target. 
Kernel menu_config.
 
Device Drivers
 SPI support
    [*]SPI support
        [*]Debug support for SPI drivers
     SPI Master Controller Drivers
     [*]Atmel SPI controller
     [ ]Bitbanging SPI master
     SPI Protocol Masters
     [ ]SPI EEPROMs from most vendors
     [*]User mode SPI device driver support
 
I execute the "/sbin/mdev -s" command into the target shell as expecting the /dev/spidev. 
But I can't see the device file for SPI in target /dev folder. And I examin my /sys folder at target. 
Of course, I can find the spi device nodes created from modified board_sam9260.c. 
Hum...I don't know why did not populate the SPI device file in /dev file? 
 
#dmesg | grep spi
atmel_spi atmel_spi.1: Atmel SPI Controller at 0xfffcc000 (irq 13) 
atmel_spi atmel_spi.1: registered master spi1 
spi spi1.0: setup: 14189714 Hz bpw 8 mode 0x0 -> csr0 0a0a0702 
atmel_spi atmel_spi.1: registered child spi1.0 
spi spi1.1: setup: 14189714 Hz bpw 8 mode 0x0 -> csr1 0a0a0702 
atmel_spi atmel_spi.1: registered child spi1.1 
spi spi1.2: setup: 14189714 Hz bpw 8 mode 0x0 -> csr2 0a0a0702 
atmel_spi atmel_spi.1: registered child spi1.2 
spi spi1.3: setup: 14189714 Hz bpw 8 mode 0x0 -> csr3 0a0a0702 
atmel_spi atmel_spi.1: registered child spi1.3 
 
Does root file system (NFS) has the problem ? or Kernel menu configuration ?
Could you teach check point for this problem?
 
This project name - Access control Unit
The system is configured two kind of board.
Main b'd has the AT91SAM9260 which has the Linux OS.
Sub b'd has the Atmega2560 which is developing the AVR32 studio.
One Main b'd is connected 5 Sub b'd by SPI
Sub b'd is connected door lock by wiegend.
Main b'd is connected ACU server by TCP/IP.
 
And SPI Interface is very important!. Other communication interface is done.
Please Help me~. I had reported this problems to atmel and at91 but I did not receive any reply~ 
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: I can't see the SPI device file in /dev.
  2007-08-08  2:01 I can't see the SPI device file in /dev SangWoo Kang
@ 2007-08-08 17:15 ` David Brownell
  0 siblings, 0 replies; 5+ messages in thread
From: David Brownell @ 2007-08-08 17:15 UTC (permalink / raw)
  To: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	wizard.kang-Sze3O3UU22JBDgjK7y7TUQ
  Cc: 강상우

On Tuesday 07 August 2007, SangWoo Kang wrote:
> Hi~  
> My developing Environment is below. 
> Kernel-2.6.22.1
>      tar jxvf linux-2.6.22.1.tar.bz2
>      cd linux-2.6.22.1
>      zcat ../2.6.22-rc1-at91.patch.gz | patch -p1 > patchresult.txt

2.6.22-rc1 is pretty old compared to 2.6.22.1 ... are you sure
all those patches are still relevant, and they applied OK?


> CPU-AT91SAM9260 
> Through the web searching and kernel documentation, I know that use
> the spidev kernel module.  
> And I modify arch/at-91/board_sam9260.c file as like below 
>  
> static struct spi_board_info ek_spi_devices[] = { 
> { //spi1.0-slot1 
>    .modalias = "spidev", 
>    .chip_select = 0, 
>    .max_speed_hz = 15*1000*1000, 
>    .bus_num=1, 
> }, 
> { //spi1.1-slot2 
>    .modalias = "spidev", 
>    .chip_select = 1, 
>    .max_speed_hz = 15*1000*1000, 
>    .bus_num=1, 
> }, 

Those look right.  I'd then expect /dev entries for spidev1.0
and spidev1.1 after "mdev" does its stuff.


>     ~
> } 
>  
> After compiling the kernel, download kernel img to the target. 
> Kernel menu_config.
>  
> Device Drivers
>  SPI support
>     [*]SPI support
>         [*]Debug support for SPI drivers
>      SPI Master Controller Drivers
>      [*]Atmel SPI controller
>      [ ]Bitbanging SPI master
>      SPI Protocol Masters
>      [ ]SPI EEPROMs from most vendors
>      [*]User mode SPI device driver support

Looks right.

  
> I execute the "/sbin/mdev -s" command into the target shell as expecting
> the /dev/spidev.  
> But I can't see the device file for SPI in target /dev folder. And I
> examin my /sys folder at target.  
> Of course, I can find the spi device nodes created from modified board_sam9260.c. 
> Hum...I don't know why did not populate the SPI device file in /dev file? 

I just set up spi0.2 and spi0.3 on one system and it worked fine
(2.6.23-rc2, but that shouldn't matter).

Files in /sys/bus/spi/devices/spi0.2:
lrwxrwxrwx    1 root     root            0 Dec 31  2006 bus -> ../../../../bus/spi
lrwxrwxrwx    1 root     root            0 Dec 31  2006 driver -> ../../../../bus/spi/drivers/spidev
-r--r--r--    1 root     root         4096 Dec 31  2006 modalias
lrwxrwxrwx    1 root     root            0 Dec 31  2006 spidev:spidev0.2 -> ../../../../class/spidev/spidev0.2
lrwxrwxrwx    1 root     root            0 Dec 31  2006 subsystem -> ../../../../bus/spi
-rw-r--r--    1 root     root         4096 Dec 31  2006 uevent

Files in /sys/class/spidev/spidev0.2:
-r--r--r--    1 root     root         4096 Dec 31  2006 dev
lrwxrwxrwx    1 root     root            0 Dec 31  2006 device -> ../../../devices/platform/atmel_spi.0/spi0.2
lrwxrwxrwx    1 root     root            0 Dec 31  2006 subsystem -> ../../../class/spidev
-rw-r--r--    1 root     root         4096 Dec 31  2006 uevent

and "dev" there contains 153:0, which "mdev" used to create
the /dev/spidev0.2 character device node.


> #dmesg | grep spi
> atmel_spi atmel_spi.1: Atmel SPI Controller at 0xfffcc000 (irq 13) 
> atmel_spi atmel_spi.1: registered master spi1 
> spi spi1.0: setup: 14189714 Hz bpw 8 mode 0x0 -> csr0 0a0a0702 
> atmel_spi atmel_spi.1: registered child spi1.0 
> spi spi1.1: setup: 14189714 Hz bpw 8 mode 0x0 -> csr1 0a0a0702 
> atmel_spi atmel_spi.1: registered child spi1.1 
> spi spi1.2: setup: 14189714 Hz bpw 8 mode 0x0 -> csr2 0a0a0702 
> atmel_spi atmel_spi.1: registered child spi1.2 
> spi spi1.3: setup: 14189714 Hz bpw 8 mode 0x0 -> csr3 0a0a0702 
> atmel_spi atmel_spi.1: registered child spi1.3 
>  
> Does root file system (NFS) has the problem ? or Kernel menu configuration ?
> Could you teach check point for this problem?

If your sysfs looks right based on what I showed above, I'd
guess maybe you have an old "mdev" ... or maybe it depends
on the CONFIG_SYSFS_DEPRECATED variable, which I can't yet
disable.


> This project name - Access control Unit
> The system is configured two kind of board.
> Main b'd has the AT91SAM9260 which has the Linux OS.
> Sub b'd has the Atmega2560 which is developing the AVR32 studio.

I don't think AVR8 chips can be SPI slaves at 15 MHz; you
should probably change the max_speed_hz you use to set up
those devices.  As I recall, 4 MHz is as fast as those chips
can talk SPI, iff everything goes well (and IRQs are blocked
during the PIO loops).


> One Main b'd is connected 5 Sub b'd by SPI
> ...

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: I can't see the SPI device file in /dev.
@ 2007-08-08  1:27 강상우
  0 siblings, 0 replies; 5+ messages in thread
From: 강상우 @ 2007-08-08  1:27 UTC (permalink / raw)
  To: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f; +Cc: David Brownell

[-- Attachment #1: Type: text/html, Size: 4159 bytes --]

[-- Attachment #2: Type: text/plain, Size: 315 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

[-- Attachment #3: Type: text/plain, Size: 210 bytes --]

_______________________________________________
spi-devel-general mailing list
spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: I can't see the SPI device file in /dev.
  2007-08-08  0:06 강상우
@ 2007-08-08  0:51 ` David Brownell
  0 siblings, 0 replies; 5+ messages in thread
From: David Brownell @ 2007-08-08  0:51 UTC (permalink / raw)
  To: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
  Cc: 강상우

On Tuesday 07 August 2007, 강상우 wrote:
> <style> BODY { background-color: #ffffff;} BODY, TD, TH {
> color: black; font-family: 굴림; font-size: 12px; } TD {
> border: 0px} P { margin: 0px; } </style><P>Hi~&nbsp;
> <BR>My developing Environment is below. </P>   

I think we saw this the first time.  Could you repost
WITHOUT HTML?  HTML email normally goes straight to
the trash.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

^ permalink raw reply	[flat|nested] 5+ messages in thread

* I can't see the SPI device file in /dev.
@ 2007-08-08  0:06 강상우
  2007-08-08  0:51 ` David Brownell
  0 siblings, 1 reply; 5+ messages in thread
From: 강상우 @ 2007-08-08  0:06 UTC (permalink / raw)
  To: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

[-- Attachment #1: Type: text/html, Size: 4460 bytes --]

[-- Attachment #2: Type: text/plain, Size: 315 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

[-- Attachment #3: Type: text/plain, Size: 210 bytes --]

_______________________________________________
spi-devel-general mailing list
spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-08-08 17:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-08  2:01 I can't see the SPI device file in /dev SangWoo Kang
2007-08-08 17:15 ` David Brownell
  -- strict thread matches above, loose matches on Subject: below --
2007-08-08  1:27 강상우
2007-08-08  0:06 강상우
2007-08-08  0:51 ` David Brownell

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