Subject: RE: Best location for call to spi_register_board_info () on PPC (MPC5200)

From: "Joakim Tjernlund" <[email-masked]>
Date: Wed, 13 Dec 2006 22:08:11 +0100

_____  

From: linuxppc-embedded-bounces+joakim.tjernlund=[email-masked]
[mailto:linuxppc-embedded-bounces+joakim.tjernlund=[email-masked]] On Behalf Of Henk Stegeman
Sent: den 13 december 2006 21:59
To: [email-masked]
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