[U-Boot] [PATCH 1/2] smc911x: split out useful defines/functions into local header

Magnus Lilja lilja.magnus at gmail.com
Mon Jan 5 16:13:31 CET 2009


Hi

2008/12/22 Mike Frysinger <vapier at gentoo.org>:
> 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 <vapier at gentoo.org>
> CC: Sascha Hauer <s.hauer at pengutronix.de>
> CC: Guennadi Liakhovetski <lg at denx.de>
> CC: Magnus Lilja <lilja.magnus at gmail.com>
> CC: Ben Warren <biggerbadderben at gmail.com>
> ---
>  drivers/net/smc911x.c |  452 +---------------------------------------------
>  drivers/net/smc911x.h |  486

<snip>

> 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 <s.hauer at pengutronix.de>
> + *
> + * 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 <stdbool.h> 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


More information about the U-Boot mailing list