Best location for call to spi_register_board_info () on PPC (MPC5200)
Joakim Tjernlund
joakim.tjernlund at transmode.se
Thu Dec 14 08:08:11 EST 2006
_____
From: linuxppc-embedded-bounces+joakim.tjernlund=lumentis.se at ozlabs.org
[mailto:linuxppc-embedded-bounces+joakim.tjernlund=lumentis.se at ozlabs.org] On Behalf Of Henk Stegeman
Sent: den 13 december 2006 21:59
To: linuxppc-embedded at ozlabs.org
Subject: Best location for call to spi_register_board_info () on PPC (MPC5200)
I'm working on an SPI procol driver on the MPC52XX.
I spend some time in trying to find the best location for calling spi_register_board_info () (which basically registers the
relations between protocol drivers and the SPI chip selects).
I wish to call this function from my copy of the arch/ppc/platforms/Lite5200.c file since these relations are board-specific,
however I found that placing the call in any of these functions (eg. lite5200_setup_arch) results in an -ENOMEM from the
spi_register_board_info () call.
Now I'm calling spi_register_board_info () from the spi controller driver which is soo ugly.
Thanks in advance,
Henk.
Try doing it as an arch_initcall() in Lite5200.c, I do that in my custom board port file
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20061213/a001b5ec/attachment.htm
More information about the Linuxppc-embedded
mailing list