public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] Add support for hammerhead AVR32 board
Date: Mon, 17 Mar 2008 11:38:44 +0100	[thread overview]
Message-ID: <20080317103844.GC26371@game.jcrosoft.org> (raw)
In-Reply-To: <47DE488E.2060502@miromico.ch>

On 11:31 Mon 17 Mar     , Alex wrote:
> Hi
> 
> Sorry, as you might have guessed I did not run MAKEALL to check my patch :-(
> Worse, It would have broken existing code... Sorry again.
> 
> I try to avoid such things in future.
> 
> I corrected the patch. I tried to run MAKEALL, but it fails, as I don't have all those cross-compilers
> installed. Am I missing something? Do I need to install them, or what is the correct procedure?
> 
> So instead of MAKEALL I compiled a few targets by hand.
> 
> Alex
> 
> 
> diff -Naur old/u-boot-avr32/board/miromico/hammerhead/eth.c new/u-boot-avr32/board/miromico/hammerhead/eth.c
> --- old/u-boot-avr32/board/miromico/hammerhead/eth.c	1970-01-01 01:00:00.000000000 +0100
> +++ new/u-boot-avr32/board/miromico/hammerhead/eth.c	2008-03-14 16:06:35.000000000 +0100
> @@ -0,0 +1,37 @@
> +/*
> + * Copyright (C) 2008 Miromico AG
> + *
> + * Ethernet initialization for the Miromico Hammerhead AVR32 board
> + *
> + * Mostly copied form Atmel ATNGW100 sources
> + *
> + * 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
Please move this to the Makefile
> +void board_eth_initialize(bd_t *bi)
> +{
> +	macb_eth_initialize(0, (void *)MACB0_BASE, bi->bi_phy_id[0]);
> +}
> +#endif
> diff -Naur old/u-boot-avr32/cpu/at32ap/at32ap700x/gpio.c new/u-boot-avr32/cpu/at32ap/at32ap700x/gpio.c
> --- old/u-boot-avr32/cpu/at32ap/at32ap700x/gpio.c	2008-03-17 10:23:49.000000000 +0100
> +++ new/u-boot-avr32/cpu/at32ap/at32ap700x/gpio.c	2008-03-17 10:10:37.000000000 +0100
> @@ -142,3 +142,14 @@
>   	gpio_select_periph_A(GPIO_PIN_PA15, 0);	/* DATA3 */
>   }
>   #endif
> +
> +#ifdef CONFIG_HAMMERHEAD
> +/*
> + * Hammerhead board uses GCLK3 (Periph A on PB29) as 25MHz clock output
> + * for ethernet PHY.
> + */
> +void gpio_enable_gclk3(void)
> +{
> +  gpio_select_periph_A(GPIO_PIN_PB29, 0); /* GCLK3         */
> +}
> +#endif
I'll prefer a weak function
> diff -Naur old/u-boot-avr32/cpu/at32ap/cpu.c new/u-boot-avr32/cpu/at32ap/cpu.c
> --- old/u-boot-avr32/cpu/at32ap/cpu.c	2008-03-17 10:23:49.000000000 +0100
> +++ new/u-boot-avr32/cpu/at32ap/cpu.c	2008-03-14 15:43:09.000000000 +0100
> @@ -81,6 +81,16 @@
>   #endif
>   }
> 
> +#ifdef CONFIG_HAMMERHEAD
> +static void gclk_init(void)
same I'll prefer a weak function
> +{
> +  /* Hammerhead boards uses GCLK3 as 25MHz output to ethernet PHY */
> +
> +  /* Enable GCLK3 with no input divider, from OSC0 (crystal) */
> +  sm_writel( PM_GCCTRL3, SM_BIT(CEN) );
> +}
> +#endif
> +
Best Regards,
J.

  reply	other threads:[~2008-03-17 10:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-14 15:19 [U-Boot-Users] [PATCH] Add support for hammerhead AVR32 board Alex
2008-03-14 15:54 ` Wolfgang Denk
2008-03-17 10:31   ` Alex
2008-03-17 10:38     ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2008-03-26 13:57     ` Haavard Skinnemoen
2008-03-30 23:41     ` Ben Warren
2008-04-06 23:13       ` Haavard Skinnemoen

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=20080317103844.GC26371@game.jcrosoft.org \
    --to=plagnioj@jcrosoft.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox