* Can't load module spi_mpc83xx : No such device
@ 2009-02-27 4:56 Dushara Jayasinghe
2009-02-27 12:54 ` Anton Vorontsov
0 siblings, 1 reply; 5+ messages in thread
From: Dushara Jayasinghe @ 2009-02-27 4:56 UTC (permalink / raw)
To: linuxppc-dev@ozlabs.org
Hi all,
I'm using linux version 2.6.29-rc5.
I've compiled the SPI diver (spi_mpc83xx.c) as a module, but it fails the l=
oad with a "No such device" error.
I've managed to track it down to platform_driver_probe() in drivers/base/pl=
atform.c=20
which returns -ENODEV because a device list is empty.
Not sure what I'm doing wrong.=20
Part of my device tree is as follows:
soc8349@e0000000 {
...
spi@7000 {
#address-cells =3D <1>;
#size-cells =3D <0>;
compatible =3D "fsl,spi";
reg =3D <0x7000 0x1000>;
interrupts =3D <0x10 0x8>;
interrupt-parent =3D < &ipic >;
m25p40@2 {
compatible =3D "m25p80";
spi-max-frequency =3D <25000000>;
reg =3D <2>;
};
};
...
};
Thanks
D
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Can't load module spi_mpc83xx : No such device
2009-02-27 4:56 Can't load module spi_mpc83xx : No such device Dushara Jayasinghe
@ 2009-02-27 12:54 ` Anton Vorontsov
2009-02-28 16:07 ` mpc8349e-mitx 2.6.25 serial IRQ assigned wrong Steve DeLaney
2009-03-03 4:11 ` Can't load module spi_mpc83xx : No such device Dushara Jayasinghe
0 siblings, 2 replies; 5+ messages in thread
From: Anton Vorontsov @ 2009-02-27 12:54 UTC (permalink / raw)
To: Dushara Jayasinghe; +Cc: linuxppc-dev@ozlabs.org
On Fri, Feb 27, 2009 at 03:56:41PM +1100, Dushara Jayasinghe wrote:
> Hi all,
>
> I'm using linux version 2.6.29-rc5.
Linus' tree is still lacking few patches for spi_mpc83xx driver, the
patches makes spi_mpc83xx work with the device tree directly.
You should use -mm kernels.
[...]
> Part of my device tree is as follows:
>
> soc8349@e0000000 {
> ...
> spi@7000 {
> #address-cells = <1>;
> #size-cells = <0>;
> compatible = "fsl,spi";
> reg = <0x7000 0x1000>;
> interrupts = <0x10 0x8>;
> interrupt-parent = < &ipic >;
You don't seem to have any chip-selects (i.e. gpios = <>) specified.
If the chip-select is always asserted (i.e. there is only one
device on the SPI bus), then..
>
> m25p40@2 {
> compatible = "m25p80";
> spi-max-frequency = <25000000>;
> reg = <2>;
..there is no point in specifying reg = <> for the device.
Thanks,
--
Anton Vorontsov
email: cbouatmailru@gmail.com
irc://irc.freenode.net/bd2
^ permalink raw reply [flat|nested] 5+ messages in thread
* mpc8349e-mitx 2.6.25 serial IRQ assigned wrong
2009-02-27 12:54 ` Anton Vorontsov
@ 2009-02-28 16:07 ` Steve DeLaney
2009-03-03 4:11 ` Can't load module spi_mpc83xx : No such device Dushara Jayasinghe
1 sibling, 0 replies; 5+ messages in thread
From: Steve DeLaney @ 2009-02-28 16:07 UTC (permalink / raw)
To: linuxppc-dev
Hello all,
We completed a 2.6.25 build for MPC8349E-mITX platform, and u-booting using
the
device tree under ...boot/dts/mpc8349emitx.dts
But the standard platform device IRQs are assigned wrong under
/proc/interrupts:
16 i2c-mpc
17 i2c-mpc
20 serial
According to the device tree, and the processor data sheet, it should be
like this:
9 serial
14 i2c-mpc
15 i2c-mpc
earlier builds (pre-dating device tree) of 2.6.13 and 2.6.16 are OK.
The IRQs are assigned correctly, with serial on 9.
Oddly enough the serial port works OK even though it is assigned to IRQ 20.
We could probably live with it, but this interferes with our application
that uses PCI.
On MPC8349E-mITX, PIC IRQ 20 is intended for PCI INTA that is input
to the MPC8349E processor on IRQ4* signal.
We turned on debug output in irq.c and prom_parse.c
Any idea what might be going wrong? We would appreciate any
suggestions on what to look for.
/steverino2
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: Can't load module spi_mpc83xx : No such device
2009-02-27 12:54 ` Anton Vorontsov
2009-02-28 16:07 ` mpc8349e-mitx 2.6.25 serial IRQ assigned wrong Steve DeLaney
@ 2009-03-03 4:11 ` Dushara Jayasinghe
2009-03-03 12:41 ` Anton Vorontsov
1 sibling, 1 reply; 5+ messages in thread
From: Dushara Jayasinghe @ 2009-03-03 4:11 UTC (permalink / raw)
To: 'avorontsov@ru.mvista.com'; +Cc: linuxppc-dev@ozlabs.org
Hi All,
> Linus' tree is still lacking few patches for spi_mpc83xx driver, the
> patches makes spi_mpc83xx work with the device tree directly.
I modified the spi_mpc83xx to work with the device tree using mpc52xx_psc_s=
pi.c as a guide.=20
However, the device->dev->platform_data member is NULL (I thought the child=
node would provide that).=20
What am I missing?
I'm trying to create the SPI driver as a loadable module which will be used=
by the m25p80 chip driver (drivers/mtd/devices) which also will be a loada=
ble module. Am I on the right track?
> [...]
> > Part of my device tree is as follows:
> >
> > soc8349@e0000000 {
> > ...
> > spi@7000 {
> > #address-cells =3D <1>;
> > #size-cells =3D <0>;
> > compatible =3D "fsl,spi";
> > reg =3D <0x7000 0x1000>;
> > interrupts =3D <0x10 0x8>;
> > interrupt-parent =3D < &ipic >;
>=20
> You don't seem to have any chip-selects (i.e. gpios =3D <>) specified.
Could you elaborate on this point please? I couldn't find any examples of g=
pios defined within SPI nodes.
[...]
> >
> > m25p40@2 {
> > compatible =3D "m25p80";
> > spi-max-frequency =3D <25000000>;
> > reg =3D <2>;
Thanks again.
D
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Can't load module spi_mpc83xx : No such device
2009-03-03 4:11 ` Can't load module spi_mpc83xx : No such device Dushara Jayasinghe
@ 2009-03-03 12:41 ` Anton Vorontsov
0 siblings, 0 replies; 5+ messages in thread
From: Anton Vorontsov @ 2009-03-03 12:41 UTC (permalink / raw)
To: Dushara Jayasinghe; +Cc: linuxppc-dev@ozlabs.org
On Tue, Mar 03, 2009 at 03:11:23PM +1100, Dushara Jayasinghe wrote:
> Hi All,
>
> > Linus' tree is still lacking few patches for spi_mpc83xx driver, the
> > patches makes spi_mpc83xx work with the device tree directly.
>
> I modified the spi_mpc83xx to work with the device tree using
> mpc52xx_psc_spi.c as a guide.
> However, the device->dev->platform_data member is NULL (I thought
> the child node would provide that).
> What am I missing?
As I said, you should use -mm tree
( http://www.kernel.org/patchtypes/mm.html ), particularly these
patches:
http://userweb.kernel.org/~akpm/mmotm/broken-out/spi_mpc83xx-rework-chip-selects-handling.patch
http://userweb.kernel.org/~akpm/mmotm/broken-out/spi_mpc83xx-add-of-platform-driver-bindings.patch
> I'm trying to create the SPI driver as a loadable module which
> will be used by the m25p80 chip driver (drivers/mtd/devices) which
> also will be a loadable module. Am I on the right track?
> > [...]
> > > Part of my device tree is as follows:
> > >
> > > soc8349@e0000000 {
> > > ...
> > > spi@7000 {
> > > #address-cells = <1>;
> > > #size-cells = <0>;
> > > compatible = "fsl,spi";
> > > reg = <0x7000 0x1000>;
> > > interrupts = <0x10 0x8>;
> > > interrupt-parent = < &ipic >;
> >
> > You don't seem to have any chip-selects (i.e. gpios = <>) specified.
>
> Could you elaborate on this point please? I couldn't find any examples of
> gpios defined within SPI nodes.
Here is MMC SPI slot example for MPC8323E-RDB boards:
http://userweb.kernel.org/~akpm/mmotm/broken-out/powerpc-83xx-add-mmc-spi-support-via-the-device-tree-for-mpc8323e-rdb.patch
And documentation for the MMC SPI bindings:
http://userweb.kernel.org/~akpm/mmotm/broken-out/powerpc-add-mmc-spi-slot-bindings.patch
The OF MMC SPI bindings themselves are in the latest Linus' tree
already:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=drivers/mmc/host/of_mmc_spi.c
For m25p80 chip you should do something similar.
Hope this helps,
--
Anton Vorontsov
email: cbouatmailru@gmail.com
irc://irc.freenode.net/bd2
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-03-03 12:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-27 4:56 Can't load module spi_mpc83xx : No such device Dushara Jayasinghe
2009-02-27 12:54 ` Anton Vorontsov
2009-02-28 16:07 ` mpc8349e-mitx 2.6.25 serial IRQ assigned wrong Steve DeLaney
2009-03-03 4:11 ` Can't load module spi_mpc83xx : No such device Dushara Jayasinghe
2009-03-03 12:41 ` Anton Vorontsov
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).