From: Ben Warren <biggerbadderben@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] Add support for new AVR32 board
Date: Mon, 10 Mar 2008 10:17:26 -0400 [thread overview]
Message-ID: <47D542F6.9060006@gmail.com> (raw)
In-Reply-To: <47D52E72.5000201@miromico.ch>
Hi Alex,
Alex wrote:
>> It is again. I suggest that you first send this message to yourself, until you
>> figured out how to do it correctly. And if you are working with git, I
>> strongly encourage you to use git-send-email to send patches.
>>
>
> Now tested as you suggested:
>
>
> diff -Nur old/u-boot-1.3.0/board/miromico/hammerhead/config.mk
> new/u-boot-1.3.0/board/miromico/hammerhead/config.mk
> --- old/u-boot-1.3.0/board/miromico/hammerhead/config.mk 1970-01-01
> 01:00:00.000000000 +0100
> +++ new/u-boot-1.3.0/board/miromico/hammerhead/config.mk 2008-03-10
> 11:18:50.000000000 +0100
> @@ -0,0 +1,3 @@
> +TEXT_BASE = 0x00000000
> +PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
> +PLATFORM_LDFLAGS += --gc-sections
> diff -Nur old/u-boot-1.3.0/board/miromico/hammerhead/eth.c
> new/u-boot-1.3.0/board/miromico/hammerhead/eth.c
> --- old/u-boot-1.3.0/board/miromico/hammerhead/eth.c 1970-01-01
> 01:00:00.000000000 +0100
> +++ new/u-boot-1.3.0/board/miromico/hammerhead/eth.c 2008-03-10
> 11:18:50.000000000 +0100
> @@ -0,0 +1,35 @@
> +/*
> + * Copyright (C) 2008 Miromico AG
> + *
> + * Ethernet initialization for the AVR32 on Hammerhead
> + *
> + * 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
> + */
> +#include <common.h>
> +
> +#include <asm/arch/memory-map.h>
> +
> +extern int macb_eth_initialize(int id, void *regs, unsigned int phy_addr);
> +
> +#ifdef CONFIG_CMD_NET
> +void hammerhead_eth_initialize(bd_t *bi)
> +{
> + macb_eth_initialize(0, (void *)MACB0_BASE, bi->bi_phy_id[0]);
> +}
> +#endif
>
Would you mind changing this name to board_eth_initialize(bd_t *bi)?
I'm working on a rework of the net library and making this name change
now will avoid doing it later. I think you'll be able to figure out
where this is going...
<snip>
> diff -Nur old/u-boot-1.3.0/net/eth.c new/u-boot-1.3.0/net/eth.c
> --- old/u-boot-1.3.0/net/eth.c 2008-03-06 07:56:04.000000000 +0100
> +++ new/u-boot-1.3.0/net/eth.c 2008-03-10 11:18:50.000000000 +0100
> @@ -61,6 +61,7 @@
> extern int bfin_EMAC_initialize(bd_t *);
> extern int atstk1000_eth_initialize(bd_t *);
> extern int atngw100_eth_initialize(bd_t *);
> +extern int hammerhead_eth_initialize(bd_t *);
>
Change this to board_eth_initialize() and you can be the first soldier
in the revolution!
> extern int mcffec_initialize(bd_t*);
>
> static struct eth_device *eth_devices, *eth_current;
> @@ -258,6 +259,9 @@
> #if defined(CONFIG_ATNGW100)
> atngw100_eth_initialize(bis);
> #endif
> +#if defined(CONFIG_HAMMERHEAD)
> + hammerhead_eth_initialize(bis);
> +#endif
> #if defined(CONFIG_MCFFEC)
> mcffec_initialize(bis);
> #endif
> @@ -522,6 +526,7 @@
> extern int mcf52x2_miiphy_initialize(bd_t *bis);
> extern int ns7520_miiphy_initialize(bd_t *bis);
> extern int dm644x_eth_miiphy_initialize(bd_t *bis);
> +extern int hammerhead_eth_initialize(bd_t *);
>
This isn't needed twice (They're probably #ifdef'd, but you don't need
to #ifdef extern'd prototypes)
>
> int eth_initialize(bd_t *bis)
> @@ -546,6 +551,9 @@
> #if defined(CONFIG_DRIVER_TI_EMAC)
> dm644x_eth_miiphy_initialize(bis);
> #endif
> +#if defined(CONFIG_HAMMERHEAD)
> + hammerhead_eth_initialize(bis);
> +#endif
> return 0;
> }
> #endif
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> U-Boot-Users mailing list
> U-Boot-Users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/u-boot-users
>
>
regards,
Ben
next prev parent reply other threads:[~2008-03-10 14:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-10 10:35 [U-Boot-Users] [PATCH] Add support for new AVR32 board Alex
2008-03-10 11:16 ` Stefan Roese
2008-03-10 12:11 ` Alex Raimondi
2008-03-10 12:27 ` Stefan Roese
2008-03-10 12:49 ` Alex
2008-03-10 14:17 ` Ben Warren [this message]
2008-03-21 17:30 ` Andy Fleming
2008-03-26 9:28 ` Haavard Skinnemoen
2008-03-10 15:40 ` Wolfgang Denk
2008-03-25 22:20 ` Wolfgang Denk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47D542F6.9060006@gmail.com \
--to=biggerbadderben@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.