From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from tmnt04.transmode.se (147.175.241.83.in-addr.dgcsystems.net [83.241.175.147]) by ozlabs.org (Postfix) with ESMTP id D27EA67F3E for ; Thu, 14 Dec 2006 08:20:29 +1100 (EST) From: "Joakim Tjernlund" To: "'Henk Stegeman'" , Subject: RE: Best location for call to spi_register_board_info () on PPC (MPC5200) Date: Wed, 13 Dec 2006 22:08:11 +0100 Message-ID: <035101c71efa$cdf4d3a0$020120ac@Jocke> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0352_01C71F03.2FB93BA0" In-Reply-To: List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , This is a multi-part message in MIME format. ------=_NextPart_000_0352_01C71F03.2FB93BA0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit _____ From: linuxppc-embedded-bounces+joakim.tjernlund=lumentis.se@ozlabs.org [mailto:linuxppc-embedded-bounces+joakim.tjernlund=lumentis.se@ozlabs.org] On Behalf Of Henk Stegeman Sent: den 13 december 2006 21:59 To: linuxppc-embedded@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 ------=_NextPart_000_0352_01C71F03.2FB93BA0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
 


From:=20 linuxppc-embedded-bounces+joakim.tjernlund=3Dlumentis.se@ozlabs.org=20 = [mailto:linuxppc-embedded-bounces+joakim.tjernlund=3Dlumentis.se@ozlabs.o= rg]=20 On Behalf Of Henk Stegeman
Sent: den 13 december 2006 = 21:59
To: linuxppc-embedded@ozlabs.org
Subject: = Best=20 location for call to spi_register_board_info () on PPC=20 (MPC5200)

I'm working on an SPI procol driver on the MPC52XX.
I spend = some time=20 in trying to find the best location for calling = spi_register_board_info ()=20 (which basically registers the relations between protocol drivers and = the SPI=20 chip selects).

I wish to call this function from my copy of = the=20 arch/ppc/platforms/Lite5200.c file  since these relations are=20 board-specific, however I found that placing the call in any of these=20 functions (eg. lite5200_setup_arch) results in an -ENOMEM from the=20 spi_register_board_info () call.

Now I'm calling=20 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=20 custom board port file
------=_NextPart_000_0352_01C71F03.2FB93BA0--