linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* MPC52xx and SPI (native one, NOT psc)
@ 2008-05-05  8:00 Fabrizio Garetto
  2008-05-05 13:55 ` Grant Likely
  0 siblings, 1 reply; 4+ messages in thread
From: Fabrizio Garetto @ 2008-05-05  8:00 UTC (permalink / raw)
  To: linuxppc-dev

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

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

* Re: MPC52xx and SPI (native one, NOT psc)
  2008-05-05  8:00 MPC52xx and SPI (native one, NOT psc) Fabrizio Garetto
@ 2008-05-05 13:55 ` Grant Likely
  2008-05-05 14:03   ` Jon Smirl
  2008-05-05 15:29   ` Fabrizio Garetto
  0 siblings, 2 replies; 4+ messages in thread
From: Grant Likely @ 2008-05-05 13:55 UTC (permalink / raw)
  To: Fabrizio Garetto; +Cc: linuxppc-dev

On Mon, May 5, 2008 at 2:00 AM, Fabrizio Garetto
<fabrizio.garetto@gmail.com> 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.

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

* Re: MPC52xx and SPI (native one, NOT psc)
  2008-05-05 13:55 ` Grant Likely
@ 2008-05-05 14:03   ` Jon Smirl
  2008-05-05 15:29   ` Fabrizio Garetto
  1 sibling, 0 replies; 4+ messages in thread
From: Jon Smirl @ 2008-05-05 14:03 UTC (permalink / raw)
  To: Grant Likely; +Cc: linuxppc-dev, Fabrizio Garetto

On 5/5/08, Grant Likely <grant.likely@secretlab.ca> wrote:
> On Mon, May 5, 2008 at 2:00 AM, Fabrizio Garetto
>  <fabrizio.garetto@gmail.com> 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

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

* Re: MPC52xx and SPI (native one, NOT psc)
  2008-05-05 13:55 ` Grant Likely
  2008-05-05 14:03   ` Jon Smirl
@ 2008-05-05 15:29   ` Fabrizio Garetto
  1 sibling, 0 replies; 4+ messages in thread
From: Fabrizio Garetto @ 2008-05-05 15:29 UTC (permalink / raw)
  To: Grant Likely; +Cc: linuxppc-dev

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

On Mon, May 5, 2008 at 3:55 PM, Grant Likely <grant.likely@secretlab.ca> wrote:
>
> On Mon, May 5, 2008 at 2:00 AM, Fabrizio Garetto
>  <fabrizio.garetto@gmail.com> 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.
>

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

end of thread, other threads:[~2008-05-05 15:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-05  8:00 MPC52xx and SPI (native one, NOT psc) Fabrizio Garetto
2008-05-05 13:55 ` Grant Likely
2008-05-05 14:03   ` Jon Smirl
2008-05-05 15:29   ` Fabrizio Garetto

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