MPC52xx and SPI (native one, NOT psc)

4 messages, 3 authors, 2008-05-05 · open the first message on its own page

MPC52xx and SPI (native one, NOT psc)

From: Fabrizio Garetto <hidden>
Date: 2008-05-05 08:00:53

Hello to everyone,
I was trying to enable the SPI of a lite5200 board. I've seen that
there's something related to this in
arch/powerpc/boot/dts/lite5200b.dts
spi@f00 {
		device_type = "spi";
		compatible = "mpc5200b-spi\0mpc5200-spi";
		reg = <f00 20>;
		interrupts = <2 d 0 2 e 0>;
		interrupt-parent = <&mpc5200_pic>;
	};
but I'm not able to find where to enable it in menuconfig. Under
device drivers -> Spi support there only the PSC SPI.
Where am I wrong?

Thanks in advance,
Fabrizio Garetto

Re: MPC52xx and SPI (native one, NOT psc)

From: Grant Likely <hidden>
Date: 2008-05-05 13:55:42

On Mon, May 5, 2008 at 2:00 AM, Fabrizio Garetto
[off-list ref] wrote:
Hello to everyone,
 I was trying to enable the SPI of a lite5200 board. I've seen that
 there's something related to this in
 arch/powerpc/boot/dts/lite5200b.dts

 >spi@f00 {
 >                       device_type = "spi";
 >                       compatible = "mpc5200b-spi\0mpc5200-spi";
 >                       reg = <f00 20>;
 >                       interrupts = <2 d 0 2 e 0>;
 >                       interrupt-parent = <&mpc5200_pic>;
 >               };
 >

 but I'm not able to find where to enable it in menuconfig. Under
 device drivers -> Spi support there only the PSC SPI.
 Where am I wrong?
The device tree describes the hardware; even if there isn't a driver
for it.  The non-PSC SPI does not have a driver right now.

I'm actually working on a driver for it *right now*.  Are you able to
help with testing?

Cheers,
g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

Re: MPC52xx and SPI (native one, NOT psc)

From: Jon Smirl <hidden>
Date: 2008-05-05 14:03:26

On 5/5/08, Grant Likely [off-list ref] wrote:
On Mon, May 5, 2008 at 2:00 AM, Fabrizio Garetto
 [off-list ref] wrote:
 > Hello to everyone,
 >  I was trying to enable the SPI of a lite5200 board. I've seen that
 >  there's something related to this in
 >  arch/powerpc/boot/dts/lite5200b.dts
 >
 >  >spi@f00 {
 >  >                       device_type = "spi";
 >  >                       compatible = "mpc5200b-spi\0mpc5200-spi";
 >  >                       reg = <f00 20>;
 >  >                       interrupts = <2 d 0 2 e 0>;
 >  >                       interrupt-parent = <&mpc5200_pic>;
 >  >               };
 >  >
 >
 >  but I'm not able to find where to enable it in menuconfig. Under
 >  device drivers -> Spi support there only the PSC SPI.
 >  Where am I wrong?


The device tree describes the hardware; even if there isn't a driver
 for it.  The non-PSC SPI does not have a driver right now.

 I'm actually working on a driver for it *right now*.  Are you able to
 help with testing?
Have you tired using an SD card with your new driver?
 Cheers,
 g.


 --
 Grant Likely, B.Sc., P.Eng.
 Secret Lab Technologies Ltd.

_______________________________________________
 Linuxppc-dev mailing list
 Linuxppc-dev@ozlabs.org
 https://ozlabs.org/mailman/listinfo/linuxppc-dev

-- 
Jon Smirl
jonsmirl@gmail.com

Re: MPC52xx and SPI (native one, NOT psc)

From: Fabrizio Garetto <hidden>
Date: 2008-05-05 15:29:26

Yes, please, I'll appreciate very much.

Currently I'm working of 2.6.22 kernel version, but I can test it on
the 2.6.24 as well.
I've found also this patch that should enable the native spi on my mpc52xx
http://cba.si/slefika/kernel/patches/mpc5200-spi.patch

but I've various problems: first of all, if I select to enable that
SPI using menuconfig, the relative CONFIG_SPI_MPC5200=y is saved in
the .config file, but when I start the compilation that setting
disappears and the file is skipped.

Forcing CONFIG_SPI_MPC5200=y by hand I got the following errors:
In file included from include/linux/of_device.h:6,
                 from include/linux/of_platform.h:18,
                 from arch/ppc/include/asm/of_platform.h:15,
                 from drivers/spi/mpc5200_spi.c:24:
include/linux/of.h:39: error: expected identifier or '(' before 'void'
include/linux/of.h:39: error: expected ')' before numeric constant
include/linux/of.h:45: error: expected ')' before 'handle'
include/linux/of.h:54: error: expected identifier or '(' before 'void'
include/linux/of.h:54: error: expected ')' before numeric constant
In file included from drivers/spi/mpc5200_spi.c:24:
arch/ppc/include/asm/of_platform.h:32: error: expected ')' before 'ph'
drivers/spi/mpc5200_spi.c: In function 'mpc5200_spi_txrx':
drivers/spi/mpc5200_spi.c:215: error: implicit declaration of function 'udelay'
drivers/spi/mpc5200_spi.c: In function 'mpc5200_spi_probe':
drivers/spi/mpc5200_spi.c:251: error: implicit declaration of function
'of_address_to_resource'
drivers/spi/mpc5200_spi.c:256: error: implicit declaration of function
'irq_of_parse_and_map'
drivers/spi/mpc5200_spi.c:281: error: implicit declaration of function
'mpc52xx_find_ipb_freq'
make[2]: *** [drivers/spi/mpc5200_spi.o] Error 1
make[1]: *** [drivers/spi] Error 2
make: *** [drivers] Error 2

Regards,
F. Garetto

1 more lines

On Mon, May 5, 2008 at 2:00 AM, Fabrizio Garetto
 [off-list ref] wrote:
 > Hello to everyone,
 >  I was trying to enable the SPI of a lite5200 board. I've seen that
 >  there's something related to this in
 >  arch/powerpc/boot/dts/lite5200b.dts
 >
 >  >spi@f00 {
 >  >                       device_type = "spi";
 >  >                       compatible = "mpc5200b-spi\0mpc5200-spi";
 >  >                       reg = <f00 20>;
 >  >                       interrupts = <2 d 0 2 e 0>;
 >  >                       interrupt-parent = <&mpc5200_pic>;
 >  >               };
 >  >
 >
 >  but I'm not able to find where to enable it in menuconfig. Under
 >  device drivers -> Spi support there only the PSC SPI.
 >  Where am I wrong?

 The device tree describes the hardware; even if there isn't a driver
 for it.  The non-PSC SPI does not have a driver right now.

 I'm actually working on a driver for it *right now*.  Are you able to
 help with testing?

 Cheers,
 g.

 --
 Grant Likely, B.Sc., P.Eng.
 Secret Lab Technologies Ltd.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help