From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Schocher Date: Thu, 13 Nov 2008 08:43:17 +0100 Subject: [U-Boot] [PATCH 4/5] powerpc: keymile: Add a check for the PIGGY debug board In-Reply-To: <491B15DF.1070805@gmail.com> References: <491A98A0.6070107@denx.de> <491B15DF.1070805@gmail.com> Message-ID: <491BDA95.2060306@invitel.hu> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Ben Ben Warren wrote: > Heiko Schocher wrote: > >> Check the presence of the PIGGY on the keymile boards mgcoge, >> mgsuvd and kmeter1. If the PIGGY is not present, dont register >> this Ethernet device. >> >> Signed-off-by: Heiko Schocher >> --- >> > This looks like useful stuff to have, but I'd prefer that you put the > check logic in board_eth_init() rather than adding to the individual > device drivers. I know the 8260 SCC driver is the older style, which > precludes the use of board_eth_init, but I'll convert it if you're able > to test. > Yes, I could test such a change for you, but hmm... I am not sure, if board_eth_init () is the right place for my purpose. I need for every Ethernet device a selection, if this device is present or not. Correct me if I am wrong, but it looks like board_eth_init () is not made for this purpose. (Ok, I can do a specific device init in board_eth_init (), but then we must do something, that prevents that the device is again initialized in eth_initialize () ... Hmm... while writing this it comes a idea in my mind: we could move all the *_initialize functions in eth_initialize () in a seperate function, say eth_hardware_init() and maybe making this function "weak", so a board writer can write his own eth_hardware_init() ... in such a function, I could check which device is present, and only initialize the present devices ... what do you think? bye Heiko