Welcome! Log In Create A New Profile

Advanced

problem opening SPI driver on PowerPC 8313

Posted by Yan 
Yan
problem opening SPI driver on PowerPC 8313
September 15, 2009 03:45PM
Hi,

I can't load the spi module using a 2.6.27 kernel on a PowerPc 8313.
When I try "MAKEDEV spi", a few spi devices are created but when I try to open one of them it fails. I get : "can not open device: No such device or address";

I also tried to load spi dynamically.
I did something like this:
insmod spi_mpc83xx.ko
mknod /dev/spi c 153 0
chmod 666 /dev/spi

When I tried to open the SPI dev, I got the same error "can not open device: No such device or address";

Does anyone knows how I can at least debug this ? maybe a way to obtain a little more information on the errors ? the /var/log or dmesg did not help much.

PS> We can open i2c in the same way(ioctl) with no problem.

I appreciate your assistance.

Thanks.

Yan~
try spi0~spin
mknod /dev/spi0 c 153 0
May be you can try adding a child node to your dts. Because as of my knowledge the spidev node will be created dynamically, from the probe function.

Example for adding child node in dts:

spi@7000 {
cell-index = <0>;
compatible = "fsl,spi";
reg = <0x7000 0x1000>;
interrupts = <16 0x8>;
interrupt-parent = <&ipic>;
mode = "cpu";

spidev@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "spidev";
reg = <0>;
linux,modalias = "spidev";
spi-max-frequency = <50000000>;
mode = <0>;
};
};
Author:

Your Email:


Subject:


Spam prevention:
Please, solve the mathematical question and enter the answer in the input field below. This is for blocking bots that try to post this form automatically.
Question: how much is 15 plus 5?
Message: