Ben Warren wrote: > C++ style comments are not allowed. Please fix them all. > > <snip> > Okay. > > The prototype is: > > int board_eth_init(bd_t *); > > You'll need to return 0 if you can't get anything useful from > macb_eth_initialize(); > > <snip> > Okay. > > It's frowned upon to conditionally compile board-specific code in CPU > files. Can this be done in your board code? > I'll give it a go !! > >> diff --git a/cpu/at32ap/at32ap700x/gpio.c b/cpu/at32ap/at32ap700x/gpio.c >> index 56ba2f9..7c6679d 100644 >> --- a/cpu/at32ap/at32ap700x/gpio.c >> +++ b/cpu/at32ap/at32ap700x/gpio.c >> @@ -104,8 +104,10 @@ void gpio_enable_macb0(void) >> gpio_select_periph_A(GPIO_PIN_PC11, 0); /* RXD2 */ >> gpio_select_periph_A(GPIO_PIN_PC12, 0); /* RXD3 */ >> gpio_select_periph_A(GPIO_PIN_PC14, 0); /* RXCK */ >> +#ifndef CONFIG_MIMC200 >> gpio_select_periph_A(GPIO_PIN_PC18, 0); /* SPD */ >> #endif >> +#endif >> } >> >> void gpio_enable_macb1(void) >> @@ -129,8 +131,10 @@ void gpio_enable_macb1(void) >> gpio_select_periph_B(GPIO_PIN_PC29, 0); /* RXD2 */ >> gpio_select_periph_B(GPIO_PIN_PC30, 0); /* RXD3 */ >> gpio_select_periph_B(GPIO_PIN_PC24, 0); /* RXCK */ >> +#ifndef CONFIG_MIMC200 >> gpio_select_periph_B(GPIO_PIN_PD15, 0); /* SPD */ >> #endif >> +#endif >> } >> #endif >> Should I just provide my own *complete* alternatives to these functions ? >> diff --git a/cpu/at32ap/cpu.c b/cpu/at32ap/cpu.c >> index 0ba8361..8985b68 100644 >> --- a/cpu/at32ap/cpu.c >> +++ b/cpu/at32ap/cpu.c >> @@ -56,6 +56,20 @@ int cpu_init(void) >> hsmc3_writel(PULSE0, 0x0b0a0906); >> hsmc3_writel(SETUP0, 0x00010002); >> >> +#ifdef CONFIG_MIMC200 >> + // setup Data Flash chip select (NCS2) >> + hsmc3_writel(MODE2, 0x20121003); >> + hsmc3_writel(CYCLE2, 0x000a0009); >> + hsmc3_writel(PULSE2, 0x0a060806); >> + hsmc3_writel(SETUP2, 0x00030102); >> + >> + // setup FRAM chip select (NCS3) >> + hsmc3_writel(MODE3, 0x10120001); >> + hsmc3_writel(CYCLE3, 0x001e001d); >> + hsmc3_writel(PULSE3, 0x08040704); >> + hsmc3_writel(SETUP3, 0x02050204); >> +#endif >> + >> clk_init(); >> Okay ... this can probably go in my board setup file. >> /* Update the CPU speed according to the PLL configuration */ >> diff --git a/drivers/serial/atmel_usart.c b/drivers/serial/atmel_usart.c >> index f35b997..9e131c0 100644 >> --- a/drivers/serial/atmel_usart.c >> +++ b/drivers/serial/atmel_usart.c >> @@ -21,6 +21,9 @@ >> #include <asm/io.h> >> #include <asm/arch/clk.h> >> #include <asm/arch/memory-map.h> >> +#if defined(CONFIG_MIMC200_DBGLINK) >> +#include <asm/arch/gpio.h> >> +#endif >> >> > This is definitely uncool. Don't pollute common code with your debug stuff. > Right ... this one's got me stumped. This *isn't* debug code.
In standard operation, the standard u-boot comms port will drive (e.g.) a printer, and we don't want any u-boot messages being printed out every time the unit reboots. *But* we do want to be able to use this port for normal u-boot operation when units are returned for calibration / testing / repair / etc, So we have an external link that is meant to disconnect all comms traffic from u-boot. I didn't want to use u-boot's "slient boot" options, since they're hard-coded at compile time. The only place I could think to this was to modify the atmel_usart.c file as above. How else should I do it ? > Looking forward to V3 > Me too !! Mark ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users