From patchwork Mon Feb 7 12:03:13 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Maik_H=C3=A4nig?= X-Patchwork-Id: 82102 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 98646B711B for ; Mon, 7 Feb 2011 23:03:59 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8FDBC281BC; Mon, 7 Feb 2011 13:03:54 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jcxJAvGzLHUu; Mon, 7 Feb 2011 13:03:54 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AA6E4281B0; Mon, 7 Feb 2011 13:03:51 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1D545281B0 for ; Mon, 7 Feb 2011 13:03:48 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id heR1T95PVXJl for ; Mon, 7 Feb 2011 13:03:43 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from jessica.hrz.tu-chemnitz.de (jessica.hrz.tu-chemnitz.de [134.109.132.47]) by theia.denx.de (Postfix) with ESMTPS id 14ADF281AE for ; Mon, 7 Feb 2011 13:03:40 +0100 (CET) Received: from p5df28a9a.dip0.t-ipconnect.de ([93.242.138.154] helo=[192.168.23.12]) by jessica.hrz.tu-chemnitz.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.74) (envelope-from ) id 1PmPof-0002Re-Us; Mon, 07 Feb 2011 13:03:40 +0100 Message-ID: <4D4FDF81.1070707@hrz.tu-chemnitz.de> Date: Mon, 07 Feb 2011 13:03:13 +0100 From: =?ISO-8859-1?Q?Maik_H=E4nig?= User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7 MIME-Version: 1.0 To: Wolfgang Denk References: <1296788903-7604-1-git-send-email-leiwen@marvell.com> <20110204211837.542E4108BCC7@gemini.denx.de> <20110205083050.89C7B1B921A3@gemini.denx.de> <20110206160844.AB4CBEC91BD@gemini.denx.de> <20110207065824.B7D7BEC91C8@gemini.denx.de> <20110207085904.9B55AEC91C8@gemini.denx.de> <4D4FBEAD.1030703@hrz.tu-chemnitz.de> <20110207101742.64D3BEC91C8@gemini.denx.de> <4D4FC86C.2080003@hrz.tu-chemnitz.de> <20110207114140.3CB85EC91C8@gemini.denx.de> In-Reply-To: <20110207114140.3CB85EC91C8@gemini.denx.de> X-Scan-Signature: d01c2a1cf1a9b0c29cd65956b7246649 Cc: u-boot@lists.denx.de Subject: Re: [U-Boot] Compiler Question X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Dear Wolfgang Denk, I tried the uboot version 2010.12 also with the eldk but I didn't get it running. Here is my patch. It seems there is a problem in the lolevel_init. But I didn't flound it. At the moment I have no debugger. So I have two problems the version 2010.12 didn't work with eldk and the version 2010.09 works with eldk but not with gcc 4.5.2. How can I found these problems? Best regards / Mit freundlichen Grüßen Maik Hänig Am 07.02.2011 12:41, schrieb Wolfgang Denk: > Dear =?ISO-8859-1?Q?Maik_H=E4nig?=, > > In message<4D4FC86C.2080003@hrz.tu-chemnitz.de> you wrote: >> >> should I better use gcc 4.4? > > No, you should go forward, i. e. rather use current U-Boot code that > is supposed to fix these problems (at last the most obvious ones - and > if there are any left, you'd help to detec and eventually fix these, > too). > >> And yes I'm working on ARM. > > Thought so from the symptoms you reported... > > Best regards, > > Wolfgang Denk > diff -Naur u-boot-2010.12_org/arch/arm/cpu/arm920t/at91/lowlevel_init.S u-boot-2010.12_patch/arch/arm/cpu/arm920t/at91/lowlevel_init.S --- u-boot-2010.12_org/arch/arm/cpu/arm920t/at91/lowlevel_init.S 2010-12-22 20:22:14.000000000 +0100 +++ u-boot-2010.12_patch/arch/arm/cpu/arm920t/at91/lowlevel_init.S 2011-01-20 11:44:21.384576087 +0100 @@ -65,7 +65,7 @@ ldr r0, =SMRDATA ldr r1, _MTEXT_BASE sub r0, r0, r1 - add r2, r0, #80 + add r2, r0, #(SMRDATA1-SMRDATA) pllloop: /* the address */ ldr r1, [r0], #4 @@ -83,7 +83,7 @@ ldr r0, =SMRDATA1 ldr r1, _MTEXT_BASE sub r0, r0, r1 - add r2, r0, #176 + add r2, r0, #(SMRDATA2-SMRDATA1) sdinit: /* the address */ ldr r1, [r0], #4 @@ -108,6 +108,10 @@ .word CONFIG_SYS_EBI_CFGR_VAL .word AT91_ASM_MC_SMC_CSR0 .word CONFIG_SYS_SMC_CSR0_VAL +#ifdef CONFIG_SYS_SMC_CSR2_VAL + .word AT91_ASM_MC_SMC_CSR2 + .word CONFIG_SYS_SMC_CSR2_VAL +#endif .word AT91_ASM_PMC_PLLAR .word CONFIG_SYS_PLLAR_VAL .word AT91_ASM_PMC_PLLBR @@ -161,4 +165,5 @@ .word CONFIG_SYS_SDRAM .word CONFIG_SYS_SDRAM_VAL /* SMRDATA1 is 176 bytes long */ +SMRDATA2: #endif /* CONFIG_SKIP_LOWLEVEL_INIT */ diff -Naur u-boot-2010.12_org/arch/arm/cpu/arm920t/start.S u-boot-2010.12_patch/arch/arm/cpu/arm920t/start.S --- u-boot-2010.12_org/arch/arm/cpu/arm920t/start.S 2010-12-22 20:22:14.000000000 +0100 +++ u-boot-2010.12_patch/arch/arm/cpu/arm920t/start.S 2011-01-20 12:22:11.732575245 +0100 @@ -122,7 +122,7 @@ bl coloured_LED_init bl red_LED_on -#if defined(CONFIG_AT91RM9200DK) || defined(CONFIG_AT91RM9200EK) +#if defined(CONFIG_AT91RM9200DK) || defined(CONFIG_AT91RM9200EK) || defined(CONFIG_KACOM) /* * relocate exception table */ @@ -190,6 +190,14 @@ /*------------------------------------------------------------------------------*/ +/* ldr r0, =0x00000001 + ldr r1, =0xfffffA00 + str r0, [r1] + ldr r1, =0xfffffA10 + str r0, [r1] + ldr r1, =0xfffffA34 + str r0, [r1]*/ + /* * void relocate_code (addr_sp, gd, addr_moni) * diff -Naur u-boot-2010.12_org/arch/arm/include/asm/arch-at91/at91_mc.h u-boot-2010.12_patch/arch/arm/include/asm/arch-at91/at91_mc.h --- u-boot-2010.12_org/arch/arm/include/asm/arch-at91/at91_mc.h 2010-12-22 20:22:14.000000000 +0100 +++ u-boot-2010.12_patch/arch/arm/include/asm/arch-at91/at91_mc.h 2011-01-20 08:39:22.604076221 +0100 @@ -26,6 +26,7 @@ #define AT91_ASM_MC_EBI_CSA (AT91_MC_BASE + 0x60) #define AT91_ASM_MC_EBI_CFG (AT91_MC_BASE + 0x64) #define AT91_ASM_MC_SMC_CSR0 (AT91_MC_BASE + 0x70) +#define AT91_ASM_MC_SMC_CSR2 (AT91_MC_BASE + 0x78) #define AT91_ASM_MC_SDRAMC_MR (AT91_MC_BASE + 0x90) #define AT91_ASM_MC_SDRAMC_TR (AT91_MC_BASE + 0x94) #define AT91_ASM_MC_SDRAMC_CR (AT91_MC_BASE + 0x98) diff -Naur u-boot-2010.12_org/arch/arm/lib/board.c u-boot-2010.12_patch/arch/arm/lib/board.c --- u-boot-2010.12_org/arch/arm/lib/board.c 2010-12-22 20:22:14.000000000 +0100 +++ u-boot-2010.12_patch/arch/arm/lib/board.c 2011-01-21 09:22:43.892261716 +0100 @@ -50,6 +50,10 @@ #include #include +#include +#include +#include + #ifdef CONFIG_BITBANGMII #include #endif @@ -236,6 +240,18 @@ void dram_init_banksize(void) __attribute__((weak, alias("__dram_init_banksize"))); + +int my_led_off() +{ + at91_pio_t *pio = (at91_pio_t *)AT91_PIO_BASE; + + writel(0x00000001, &pio->piod.per); + writel(0x00000001, &pio->piod.oer); + writel(0x00000001, &pio->piod.codr); + + return 0; +} + init_fnc_t *init_sequence[] = { #if defined(CONFIG_ARCH_CPU_INIT) arch_cpu_init, /* basic arch cpu dependent setup */ @@ -284,8 +300,12 @@ gd->mon_len = _bss_end_ofs; + //my_led_off(); + for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) { + //if (timer_init == *init_fnc_ptr) my_led_off(); if ((*init_fnc_ptr)() != 0) { + my_led_off(); hang (); } } diff -Naur u-boot-2010.12_org/board/kacom/kacom.c u-boot-2010.12_patch/board/kacom/kacom.c --- u-boot-2010.12_org/board/kacom/kacom.c 1970-01-01 01:00:00.000000000 +0100 +++ u-boot-2010.12_patch/board/kacom/kacom.c 2011-01-20 17:00:46.212074814 +0100 @@ -0,0 +1,81 @@ +/* + * (C) Copyright 2011 + * Kathrein Sachsen GmbH + * Maik Hänig + * + * (C) Copyright 2009 + * Kathrein Antennen Electronic + * Christian Eggers + * + * (C) Copyright 2002 + * Sysgo Real-Time Solutions, GmbH + * Marius Groeger + * + * 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 +#include +#include +//#include +//#include +//#include + +DECLARE_GLOBAL_DATA_PTR; + +/* ------------------------------------------------------------------------- */ +int board_init (void) +{ + //at91_pio_t *pio = (at91_pio_t *)AT91_PIO_BASE; + + /* + * Correct IRDA resistor problem + * Set PA23_TXD in Output + */ + //writel(AT91_PMX_AA_TXD2, &pio->pioa.oer); + + /* Enable Ctrlc */ + console_init_f (); + + /* memory and cpu-speed are setup before relocation */ + /* so we do _nothing_ here */ + + /* arch number of KACOM-Board */ + gd->bd->bi_arch_number = MACH_TYPE_KACOM; + /* adress of boot parameters */ + gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; + + return 0; +} + +int dram_init (void) +{ + /* dram_init must store complete ramsize in gd->ram_size */ + gd->ram_size = get_ram_size((volatile long *)CONFIG_SYS_SDRAM_BASE, + CONFIG_SYS_SDRAM_SIZE); + return 0; +} + +#ifdef CONFIG_DRIVER_AT91EMAC +int board_eth_init(bd_t *bis) +{ + return at91emac_register(bis, (u32) AT91_EMAC_BASE); +} +#endif + diff -Naur u-boot-2010.12_org/board/kacom/Makefile u-boot-2010.12_patch/board/kacom/Makefile --- u-boot-2010.12_org/board/kacom/Makefile 1970-01-01 01:00:00.000000000 +0100 +++ u-boot-2010.12_patch/board/kacom/Makefile 2011-01-19 13:30:28.495194586 +0100 @@ -0,0 +1,50 @@ +# +# (C) Copyright 2011 +# Maik Hänig, Kathrein Sachsen GmbH, m.haenig@kathrein-sachsen.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 +# + +include $(TOPDIR)/config.mk + +LIB = $(obj)lib$(BOARD).o + +COBJS-y += $(BOARD).o + +SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS-y)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB): $(obj).depend $(OBJS) $(SOBJS) + $(call cmd_link_o_target, $(OBJS) $(SOBJS)) + +clean: + rm -f $(SOBJS) $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak $(obj).depend + +######################################################################### + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +######################################################################### diff -Naur u-boot-2010.12_org/boards.cfg u-boot-2010.12_patch/boards.cfg --- u-boot-2010.12_org/boards.cfg 2010-12-22 20:22:14.000000000 +0100 +++ u-boot-2010.12_patch/boards.cfg 2011-01-19 13:40:04.731691404 +0100 @@ -53,6 +53,7 @@ eb_cpux9k2 arm arm920t - BuS at91 cmc_pu2 arm arm920t - - at91rm9200 csb637 arm arm920t - - at91rm9200 +kacom arm arm920t kacom - at91 kacom kb9202 arm arm920t - - at91rm9200 m501sk arm arm920t - - at91rm9200 mp2usb arm arm920t - - at91rm9200 diff -Naur u-boot-2010.12_org/include/configs/kacom.h u-boot-2010.12_patch/include/configs/kacom.h --- u-boot-2010.12_org/include/configs/kacom.h 1970-01-01 01:00:00.000000000 +0100 +++ u-boot-2010.12_patch/include/configs/kacom.h 2011-01-20 18:02:05.000076370 +0100 @@ -0,0 +1,272 @@ +/* + * Copyright (C) 2011 Maik Hänig + * + * based on previous work by + * + * Andreas Bießmann + * Ulf Samuelsson + * Rick Bronson + * + * Configuration settings for the AT91RM9200EK board. + * + * 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 __KACOM_CONFIG_H +#define __KACOM_CONFIG_H + +#include + +#define CONFIG_SYS_TEXT_BASE 0x23f00000 + +/* + * AT91C_XTAL_CLOCK is the frequency of external xtal in hertz + * AT91C_MAIN_CLOCK is the frequency of PLLA output + * AT91C_MASTER_CLOCK is the peripherial clock + * CONFIG_SYS_HZ_CLOCK is the value for CCR in tc0 (divider 2 is implicitely + * set in arch/arm/cpu/arm920t/at91/timer.c) + * CONFIG_SYS_HZ is the tick rate for timer tc0 + */ +#define AT91C_XTAL_CLOCK 18432000 +#define AT91C_MAIN_CLOCK ((AT91C_XTAL_CLOCK / 4) * 39) +#define AT91C_MASTER_CLOCK (AT91C_MAIN_CLOCK / 3 ) +#define CONFIG_SYS_HZ_CLOCK (AT91C_MASTER_CLOCK / 2) +#define CONFIG_SYS_HZ 1000 + +/* CPU configuration */ +#define CONFIG_ARM920T +#define USE_920T_MMU +#define CONFIG_AT91RM9200 +#define CONFIG_KACOM +#define CONFIG_CPUAT91 +#define CONFIG_AT91FAMILY + +#define CONFIG_CMDLINE_TAG +#define CONFIG_SETUP_MEMORY_TAGS +#define CONFIG_INITRD_TAG + +/* + * Memory Configuration + */ +#define CONFIG_NR_DRAM_BANKS 1 +#define CONFIG_SYS_SDRAM_BASE 0x20000000 +#define CONFIG_SYS_SDRAM_SIZE SZ_64M + +#define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE +#define CONFIG_SYS_MEMTEST_END \ + (CONFIG_SYS_MEMTEST_START + CONFIG_SYS_SDRAM_SIZE - SZ_256K) + +/* + * LowLevel Init + */ +#define CONFIG_SYS_USE_MAIN_OSCILLATOR 1 +/* flash */ +#define CONFIG_SYS_EBI_CFGR_VAL 0x00000000 +#define CONFIG_SYS_SMC_CSR0_VAL 0x00003384 /* 16bit, 3 TDF, 4(5) WS (Intel Flash) */ +#define CONFIG_SYS_SMC_CSR2_VAL 0x00003384 /* 16bit, 3 TDF, 4(5) WS (Intel Flash) */ + +/* clocks */ +#define CONFIG_SYS_PLLAR_VAL 0x20263E04 /* 179.712000 MHz for PCK */ +#define CONFIG_SYS_PLLBR_VAL 0x1048be0e /* (18.432 / 14 * 73) /2 = 47.9714 */ +#define CONFIG_SYS_MCKR_VAL 0x00000202 /* PCK/3 = MCK Master Clock = 59.904000MHz from PLLA */ + +/* sdram */ +#define CONFIG_SYS_PIOC_ASR_VAL 0xFFFF0000 /* Configure PIOC as peripheral (D16/D31) */ +#define CONFIG_SYS_PIOC_BSR_VAL 0x00000000 +#define CONFIG_SYS_PIOC_PDR_VAL 0xFFFF0000 +#define CONFIG_SYS_EBI_CSA_VAL 0x00000002 /* CS1=SDRAM */ +#define CONFIG_SYS_SDRC_CR_VAL 0x21912159 /* set up the SDRAM (colbits=9, rowbits=13, banks=4, cas=2, \ + tWR=2(1CLK+7.5ns), tRC=4(60ns), tRP=2(20ns), \ + tRCD=2(20ns), tRAS=3(44ns), tXSR=4(75ns)) */ +#define CONFIG_SYS_SDRAM CONFIG_SYS_SDRAM_BASE /* address of the SDRAM */ +#define CONFIG_SYS_SDRAM1 (CONFIG_SYS_SDRAM_BASE+0x80) +#define CONFIG_SYS_SDRAM_VAL 0x00000000 /* value written to SDRAM */ +#define CONFIG_SYS_SDRC_MR_VAL 0x00000002 /* Precharge All */ +#define CONFIG_SYS_SDRC_MR_VAL1 0x00000004 /* refresh */ +#define CONFIG_SYS_SDRC_MR_VAL2 0x00000003 /* Load Mode Register */ +#define CONFIG_SYS_SDRC_MR_VAL3 0x00000000 /* Normal Mode */ +#define CONFIG_SYS_SDRC_TR_VAL 0x000001D4 /* Write refresh rate (7.81us) */ + +/* + * Hardware drivers + */ + +/* define one of these to choose the DBGU, USART0 or USART1 as console */ +#define CONFIG_AT91RM9200_USART +#define CONFIG_DBGU +//#define CONFIG_USART0 + +#define CONFIG_SYS_BAUDRATE_TABLE {115200 , 19200, 38400, 57600, 9600 } +#define CONFIG_BAUDRATE 115200 + +#undef CONFIG_HWFLOW /* don't include RTS/CTS flow control support */ +#undef CONFIG_MODEM_SUPPORT /* disable modem initialization stuff */ + +/* + * Command line configuration. + */ +#define CONFIG_CMD_BOOTD /* bootd */ +#define CONFIG_CMD_CONSOLE /* coninfo */ +#define CONFIG_CMD_DHCP /* DHCP Support */ +#define CONFIG_CMD_ECHO /* echo arguments */ +#define CONFIG_CMD_EDITENV /* editenv */ +#define CONFIG_CMD_ITEST /* Integer (and string) test */ +#define CONFIG_CMD_FAT /* FAT support */ +#define CONFIG_CMD_FLASH /* flinfo, erase, protect */ +#define CONFIG_CMD_IMLS /* List all found images */ +#define CONFIG_CMD_MEMORY /* md mm nm mw cp cmp crc base loop mtest */ +#define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */ +#define CONFIG_CMD_RUN /* run command in env variable */ +#define CONFIG_CMD_SAVEENV /* saveenv */ +#define CONFIG_CMD_SETGETDCR /* DCR support on 4xx */ +#define CONFIG_CMD_SOURCE /* "source" command support */ +#define CONFIG_CMD_USB /* USB Support */ + +/* I2C settings */ +//#define CONFIG_HARD_I2C +//#define CONFIG_SYS_I2C_SPEED 400000 +//#define CONFIG_SYS_I2C_SLAVE 0 + +/* + * Network Driver Setting + */ +#define CONFIG_NET_MULTI +#define CONFIG_DRIVER_AT91EMAC +#define CONFIG_SYS_RX_ETH_BUFFER 16 +#define CONFIG_RMII +#define CONFIG_MII + +//#define CONFIG_DRIVER_ETHER +#define CONFIG_NET_RETRY_COUNT 20 +//#undef CONFIG_AT91C_USE_RMII + +/* Settings for CFI driver */ +#define PHYS_FLASH_SECT_SIZE 0x20000 /* 128kB sectors, required for env-size */ +#define CONFIG_FLASH_CFI_DRIVER 1 /* use common cfi driver */ +#define CONFIG_SYS_FLASH_CFI 1 /* additional fields for CFI in struct flash_info_t */ +#define CONFIG_SYS_FLASH_BASE 0x10000000 +#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE 1 /* use buffered writes (20x faster) */ +#define CONFIG_SYS_FLASH_PROTECTION +#define CONFIG_SYS_MAX_FLASH_BANKS 2 /* max # of memory banks */ +#define CONFIG_SYS_MAX_FLASH_SECT 128 /* max # of sectors on one chip */ +#define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE, 0x30000000 } + +/* + * USB Config + */ +#define CONFIG_USB_ATMEL 1 +#define CONFIG_USB_OHCI_NEW 1 +//#define CONFIG_USB_KEYBOARD 1 +#define CONFIG_USB_STORAGE 1 +#define CONFIG_DOS_PARTITION 1 +#define CONFIG_SYS_USB_OHCI_CPU_INIT 1 +#define CONFIG_SYS_USB_OHCI_REGS_BASE AT91_USB_HOST_BASE +#define CONFIG_SYS_USB_OHCI_SLOT_NAME "at91rm9200" +#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 15 + +/*#define LITTLEENDIAN +#define CONFIG_USB_STORAGE 1 +#define CONFIG_DOS_PARTITION 1 +#define CONFIG_AT91C_PQFP_UHPBUG 1 + +#define CONFIG_USB_OHCI_NEW 1 +#undef CONFIG_SYS_USB_OHCI_BOARD_INIT +#define CONFIG_SYS_USB_OHCI_CPU_INIT 1 +#define CONFIG_SYS_USB_OHCI_REGS_BASE AT91_USB_HOST_BASE +#define CONFIG_SYS_USB_OHCI_SLOT_NAME "at91rm9200" +#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 15 +*/ + +#define CONFIG_ENV_IS_IN_FLASH 1 +#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 2*PHYS_FLASH_SECT_SIZE) /* 1st and 2nd sector for code, 3nd sector for env */ +#define CONFIG_ENV_SECT_SIZE PHYS_FLASH_SECT_SIZE +#define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE /* use the whole sector (waste of some RAM) */ +#define CONFIG_SYS_ENV_SIZE CONFIG_ENV_SECT_SIZE /* for start.S */ +#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + PHYS_FLASH_SECT_SIZE) +#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE + +/* + * Boot option + */ +#define CONFIG_BOOTDELAY 1 +#define CONFIG_ZERO_BOOTDELAY_CHECK + +/* default load address */ +#define CONFIG_SYS_LOAD_ADDR 0x21000000 /* default load address */ +/* #define CONFIG_ENV_OVERWRITE 1 */ + +/* + * Shell Settings + */ +#undef CONFIG_SYS_LONGHELP +#define CONFIG_AUTO_COMPLETE + +#define CONFIG_SYS_PROMPT "KACOM> " /* Monitor Command Prompt */ +#define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */ +#define CONFIG_SYS_MAXARGS 32 /* max number of command args */ +#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ + +#define CONFIG_EXTRA_ENV_SETTINGS \ + "loadusb=usb start;fatload usb 0 0x20000000 rfid/uImage;setenv uimage_size $(filesize);fatload usb 0 0x21000000 rfid/rootfs.sqsh;setenv rootfs_size $(filesize);fatload usb 0 0x22000000 rfid/cfgfs.jffs2;setenv cfgfs_size $(filesize)\0" \ + "loadtftp=tftp 0x20000000 uImage;setenv uimage_size $(filesize);tftp 0x21000000 rootfs.sqsh;setenv rootfs_size $(filesize); tftp 0x22000000 cfgfs.jffs2;setenv cfgfs_size $(filesize)\0" \ + "flash1=protect off 0x10060000 0x10ffffff;erase 0x10060000 0x10ffffff;cp.b 0x20000000 0x10060000 $(uimage_size);cp.b 0x21000000 0x10200000 $(rootfs_size);cp.b 0x22000000 0x10900000 $(cfgfs_size);cmp.b 0x20000000 0x10060000 $(uimage_size);cmp.b 0x21000000 0x10200000 $(rootfs_size);cmp.b 0x22000000 0x10900000 $(cfgfs_size);\0" \ + "bootcmd1=setenv bootargs root=/dev/mtdblock5 rootfstype=squashfs ETHADDR=$(ethaddr) RUNNING=$(runningimage) CFGFS=mtdblock6;bootm 0x10060000\0" \ + "flash2=protect off 0x30060000 0x30ffffff;erase 0x30060000 0x30ffffff;cp.b 0x20000000 0x30060000 $(uimage_size);cp.b 0x21000000 0x30200000 $(rootfs_size);cp.b 0x22000000 0x30900000 $(cfgfs_size);cmp.b 0x20000000 0x30060000 $(uimage_size);cmp.b 0x21000000 0x30200000 $(rootfs_size);cmp.b 0x22000000 0x30900000 $(cfgfs_size);\0" \ + "bootcmd2=setenv bootargs root=/dev/mtdblock9 rootfstype=squashfs ETHADDR=$(ethaddr) RUNNING=$(runningimage) CFGFS=mtdblock10;bootm 0x30060000\0" \ + "image=1\0" \ + "bootcmd=setenv runningimage $(image);run bootcmd$(image)\0" + + +#ifndef __ASSEMBLY__ +/*----------------------------------------------------------------------- + * Board specific extension for bd_info + * + * This structure is embedded in the global bd_info (bd_t) structure + * and can be used by the board specific code (eg board/...) + */ + +struct bd_info_ext { + /* helper variable for board environment handling + * + * env_crc_valid == 0 => uninitialised + * env_crc_valid > 0 => environment crc in flash is valid + * env_crc_valid < 0 => environment crc in flash is invalid + */ + int env_crc_valid; +}; +#endif + +/* + * Size of malloc() pool + */ +#define CONFIG_SYS_MALLOC_LEN (CONFIG_SYS_ENV_SIZE + 256 * 1024) +#define CONFIG_SYS_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */ + +#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + SZ_4K \ + - GENERATED_GBL_DATA_SIZE) + +#define CONFIG_STACKSIZE SZ_32K /* regular stack */ +#define CONFIG_STACKSIZE_IRQ SZ_4K /* Unsure if to big or to small*/ +#define CONFIG_STACKSIZE_FIQ SZ_4K /* Unsure if to big or to small*/ + +#ifdef CONFIG_USE_IRQ +#error CONFIG_USE_IRQ not supported +#endif + +#endif diff -Naur u-boot-2010.12_org/MAKEALL u-boot-2010.12_patch/MAKEALL --- u-boot-2010.12_org/MAKEALL 2010-12-22 20:22:14.000000000 +0100 +++ u-boot-2010.12_patch/MAKEALL 2011-01-17 13:53:34.249888034 +0100 @@ -346,6 +346,7 @@ guruplug \ imx27lite \ jadecpu \ + kacom \ lpd7a400 \ magnesium \ mv88f6281gtw_ge \