From: Magnus Lilja Date: Mon, 5 Jan 2009 16:13:31 +0100 Subject: [U-Boot] [PATCH 1/2] smc911x: split out useful defines/functions into local header In-Reply-To: <1229932567-10682-1-git-send-email-vapier@gentoo.org> References: <1229932567-10682-1-git-send-email-vapier@gentoo.org> Message-ID: <59b21cf20901050713o8538382rd153400d9bc71994@mail.gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi 2008/12/22 Mike Frysinger : > The smc911x driver has a lot of useful defines/functions which can be used > by pieces of code (such as example eeprom programmers). Rather than > forcing each place to duplicate these defines/functions, split them out > of the smdc911x driver into a local header. > > Signed-off-by: Mike Frysinger > CC: Sascha Hauer > CC: Guennadi Liakhovetski > CC: Magnus Lilja > CC: Ben Warren > --- > drivers/net/smc911x.c | 452 +--------------------------------------------- > drivers/net/smc911x.h | 486 > diff --git a/drivers/net/smc911x.h b/drivers/net/smc911x.h > new file mode 100644 > index 0000000..24cbaaa > --- /dev/null > +++ b/drivers/net/smc911x.h > @@ -0,0 +1,486 @@ > +/* > + * SMSC LAN9[12]1[567] Network driver > + * > + * (c) 2007 Pengutronix, Sascha Hauer > + * > + * See file CREDITS for list of people who contributed to this > + * project. > + * > + * This program is free software; you can redistribute it and/or > + * modify it under the terms of the GNU General Public License as > + * published by the Free Software Foundation; either version 2 of > + * the License, or (at your option) any later version. > + * > + * This program is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + * > + * You should have received a copy of the GNU General Public License > + * along with this program; if not, write to the Free Software > + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, > + * MA 02111-1307 USA > + */ > + > +#ifndef _SMC911X_H_ > +#define _SMC911X_H_ > + I had to add an #include when cross-compiling to an ARM target using GCC 4.1.2, otherwise I get compilation error further down in the file (static bool smc911x_detect_chip(void)). Regards, Magnus