From 383015b2cc509266da01444bb4b117cf2aeb591a Mon Sep 17 00:00:00 2001 From: Daniel Schwierzeck Date: Thu, 3 Feb 2011 14:17:08 +0100 Subject: MIPS: VCT: Fix enabling of unwanted options if networking or USB support are disabled Some VCT boards lacks the support of networking or USB. Additionally that support is disabled in small image configurations. If CONFIG_CMD_NET should not used the CONFIG_CMD_NFS option have to be disabled too. Otherwise the linker fails with unresolved symbols. If CONFIG_VCT_SMALL_IMAGE is set than CONFIG_CMD_NET and CONFIG_CMD_USB are disabled at the end of vct.h. This is not adequate because CONFIG_CMD_USB enables additional options and the linker fails again with unresolved symbols. This patch adds an early check against CONFIG_VCT_SMALL_IMAGE so the additional options are only enabled if they are really needed. Signed-off-by: Daniel Schwierzeck Acked-by: Stefan Roese Signed-off-by: Shinya Kuribayashi diff --git a/include/configs/vct.h b/include/configs/vct.h index 4894969..325ac8c 100644 --- a/include/configs/vct.h +++ b/include/configs/vct.h @@ -109,17 +109,20 @@ /* * Only Premium/Platinum have ethernet support right now */ -#if defined(CONFIG_VCT_PREMIUM) || defined(CONFIG_VCT_PLATINUM) +#if (defined(CONFIG_VCT_PREMIUM) || defined(CONFIG_VCT_PLATINUM)) && \ + !defined(CONFIG_VCT_SMALL_IMAGE) #define CONFIG_CMD_PING #define CONFIG_CMD_SNTP #else #undef CONFIG_CMD_NET +#undef CONFIG_CMD_NFS #endif /* * Only Premium/Platinum have USB-EHCI support right now */ -#if defined(CONFIG_VCT_PREMIUM) || defined(CONFIG_VCT_PLATINUM) +#if (defined(CONFIG_VCT_PREMIUM) || defined(CONFIG_VCT_PLATINUM)) && \ + !defined(CONFIG_VCT_SMALL_IMAGE) #define CONFIG_CMD_USB #define CONFIG_CMD_FAT #endif -- cgit v0.10.2 From ec36d1f422f1a5b06d24db1ca8aedfacf0c8a30f Mon Sep 17 00:00:00 2001 From: Daniel Schwierzeck Date: Thu, 3 Feb 2011 14:17:09 +0100 Subject: MIPS: Purple: Fix multiple definition error on final linking of u-boot binary The linker of recent toolchains complains about multiple definitions on final linking of u-boot binary. This patch removes all redundant object files from u-boot.lds those are already added to .text section by the linker. That patch could not be tested but the resulting u-boot.map still looks good. The start symbol is at 0xB0000000, the environment at 0xB0008000 so u-boot should boot. Signed-off-by: Daniel Schwierzeck Cc: Wolfgang Denk Signed-off-by: Shinya Kuribayashi diff --git a/board/purple/u-boot.lds b/board/purple/u-boot.lds index 542601a..719f268 100644 --- a/board/purple/u-boot.lds +++ b/board/purple/u-boot.lds @@ -36,11 +36,6 @@ SECTIONS { arch/mips/cpu/start.o (.text) board/purple/lowlevel_init.o (.text) - arch/mips/cpu/cache.o (.text) - common/main.o (.text) - common/dlmalloc.o (.text) - common/cmd_boot.o (.text) - lib/zlib.o (.text) . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.ppcenv) -- cgit v0.10.2 From 17a990b55008fd79636e4880d9d10b7172ca87ce Mon Sep 17 00:00:00 2001 From: Daniel Schwierzeck Date: Thu, 3 Feb 2011 14:17:10 +0100 Subject: MIPS: dbau1x00: Remove unused flash driver stub All dbau1x00 boards use the CFI driver so this stub driver is useless and should not be compiled. This patch fixes the error: u-boot-git/board/dbau1x00/flash.c:34: multiple definition of `flash_init' drivers/mtd/libmtd.o:u-boot-git/drivers/mtd/cfi_flash.c:2084: first defined here board/dbau1x00/libdbau1x00.o: In function `write_buff': u-boot-git/board/dbau1x00/flash.c:40: multiple definition of `write_buff' drivers/mtd/libmtd.o:u-boot-git/drivers/mtd/cfi_flash.c:1265: first defined here Signed-off-by: Daniel Schwierzeck Cc: Wolfgang Denk Signed-off-by: Shinya Kuribayashi diff --git a/board/dbau1x00/Makefile b/board/dbau1x00/Makefile index f1594a2..e36a9d2 100644 --- a/board/dbau1x00/Makefile +++ b/board/dbau1x00/Makefile @@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(BOARD).o -COBJS = $(BOARD).o flash.o +COBJS = $(BOARD).o SOBJS = lowlevel_init.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) diff --git a/board/dbau1x00/flash.c b/board/dbau1x00/flash.c deleted file mode 100644 index a2fed1d..0000000 --- a/board/dbau1x00/flash.c +++ /dev/null @@ -1,43 +0,0 @@ -/* - * (C) Copyright 2003 - * Wolfgang Denk, DENX Software Engineering, wd@denx.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 - -flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; /* info for FLASH chips */ - -/*----------------------------------------------------------------------- - * flash_init() - * - * sets up flash_info and returns size of FLASH (bytes) - */ -unsigned long flash_init (void) -{ - printf ("Skipping flash_init\n"); - return (0); -} - -int write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt) -{ - printf ("write_buff not implemented\n"); - return (-1); -} -- cgit v0.10.2 From c6dc8a734d0923e0199a9463d6b7f2241521e208 Mon Sep 17 00:00:00 2001 From: Shinya Kuribayashi Date: Sat, 5 Feb 2011 19:07:00 +0900 Subject: cmd_ide: Fix an unused CONFIG_AU1X00 symbol to work as intended commit 8bde63eb3f79d68f693201528dafc8ae7aa087de ([MIPS] Rename Alchemy processor configs into CONFIG_SOC_*) forgot to pick up this one. Signed-off-by: Shinya Kuribayashi diff --git a/common/cmd_ide.c b/common/cmd_ide.c index df7bdf5..a1f7e57 100644 --- a/common/cmd_ide.c +++ b/common/cmd_ide.c @@ -811,7 +811,8 @@ set_pcmcia_timing (int pmode) /* We only need to swap data if we are running on a big endian cpu. */ /* But Au1x00 cpu:s already swaps data in big endian mode! */ -#if defined(__LITTLE_ENDIAN) || ( defined(CONFIG_AU1X00) && !defined(CONFIG_GTH2) ) +#if defined(__LITTLE_ENDIAN) || \ + (defined(CONFIG_SOC_AU1X00) && !defined(CONFIG_GTH2)) #define input_swap_data(x,y,z) input_data(x,y,z) #else static void -- cgit v0.10.2 From 5efd0da9b6657d07e4ffab5be9d003d1f420b604 Mon Sep 17 00:00:00 2001 From: Shinya Kuribayashi Date: Sat, 5 Feb 2011 17:43:22 +0900 Subject: MIPS: Move Alchemy Au1x00 based boards to boards.cfg CONFIG_GTH2 is already provided by , so we don't generate it using the options fields in boards.cfg. Signed-off-by: Shinya Kuribayashi diff --git a/Makefile b/Makefile index 05b404d..e1f3b7f 100644 --- a/Makefile +++ b/Makefile @@ -1136,45 +1136,6 @@ vct_platinumavc_onenand_small_config: unconfig echo "#define CONFIG_VCT_SMALL_IMAGE" >> $(obj)include/config.h @$(MKCONFIG) -n $@ -a vct mips mips vct micronas -######################################################################### -## MIPS32 AU1X00 -######################################################################### - -dbau1000_config : unconfig - @mkdir -p $(obj)include - @echo "#define CONFIG_DBAU1000 1" >$(obj)include/config.h - @$(MKCONFIG) -a dbau1x00 mips mips dbau1x00 - -dbau1100_config : unconfig - @mkdir -p $(obj)include - @echo "#define CONFIG_DBAU1100 1" >$(obj)include/config.h - @$(MKCONFIG) -a dbau1x00 mips mips dbau1x00 - -dbau1500_config : unconfig - @mkdir -p $(obj)include - @echo "#define CONFIG_DBAU1500 1" >$(obj)include/config.h - @$(MKCONFIG) -a dbau1x00 mips mips dbau1x00 - -dbau1550_config : unconfig - @mkdir -p $(obj)include - @echo "#define CONFIG_DBAU1550 1" >$(obj)include/config.h - @$(MKCONFIG) -a dbau1x00 mips mips dbau1x00 - -dbau1550_el_config : unconfig - @mkdir -p $(obj)include - @echo "#define CONFIG_DBAU1550 1" >$(obj)include/config.h - @$(MKCONFIG) -a dbau1x00 mips mips dbau1x00 - -gth2_config : unconfig - @mkdir -p $(obj)include - @echo "#define CONFIG_GTH2 1" >$(obj)include/config.h - @$(MKCONFIG) -a $@ mips mips gth2 - -pb1000_config : unconfig - @mkdir -p $(obj)include - @echo "#define CONFIG_PB1000 1" >$(obj)include/config.h - @$(MKCONFIG) -a pb1x00 mips mips pb1x00 - qemu_mips_config : unconfig @mkdir -p $(obj)include @echo "#define CONFIG_QEMU_MIPS 1" >$(obj)include/config.h diff --git a/boards.cfg b/boards.cfg index c977528..f1f2506 100644 --- a/boards.cfg +++ b/boards.cfg @@ -213,6 +213,13 @@ M5282EVB m68k mcf52x2 m5282evb freesca M53017EVB m68k mcf52x2 m53017evb freescale EP2500 m68k mcf52x2 ep2500 Mercury microblaze-generic microblaze microblaze microblaze-generic xilinx +dbau1000 mips mips dbau1x00 - - dbau1x00:DBAU1000 +dbau1100 mips mips dbau1x00 - - dbau1x00:DBAU1100 +dbau1500 mips mips dbau1x00 - - dbau1x00:DBAU1500 +dbau1550 mips mips dbau1x00 - - dbau1x00:DBAU1550 +dbau1550_el mips mips dbau1x00 - - dbau1x00:DBAU1550 +gth2 mips mips +pb1000 mips mips pb1x00 - - pb1x00:PB1000 purple mips mips tb0229 mips mips PCI5441 nios2 nios2 pci5441 psyent -- cgit v0.10.2 From 8d573fdcc422e80656b03e31662843b45851076b Mon Sep 17 00:00:00 2001 From: Shinya Kuribayashi Date: Sat, 5 Feb 2011 18:25:44 +0900 Subject: MIPS: Move Qemu MIPS target to boards.cfg CONFIG_QEMU_MIPS is already provided by , so we don't generate it using the options fields in boards.cfg. Signed-off-by: Shinya Kuribayashi diff --git a/Makefile b/Makefile index e1f3b7f..9e6cf25 100644 --- a/Makefile +++ b/Makefile @@ -1136,11 +1136,6 @@ vct_platinumavc_onenand_small_config: unconfig echo "#define CONFIG_VCT_SMALL_IMAGE" >> $(obj)include/config.h @$(MKCONFIG) -n $@ -a vct mips mips vct micronas -qemu_mips_config : unconfig - @mkdir -p $(obj)include - @echo "#define CONFIG_QEMU_MIPS 1" >$(obj)include/config.h - @$(MKCONFIG) -a qemu-mips mips mips qemu-mips - #======================================================================== # Nios #======================================================================== diff --git a/boards.cfg b/boards.cfg index f1f2506..cb67d2a 100644 --- a/boards.cfg +++ b/boards.cfg @@ -221,6 +221,7 @@ dbau1550_el mips mips dbau1x00 - gth2 mips mips pb1000 mips mips pb1x00 - - pb1x00:PB1000 purple mips mips +qemu_mips mips mips qemu-mips - - qemu-mips tb0229 mips mips PCI5441 nios2 nios2 pci5441 psyent PK1C20 nios2 nios2 pk1c20 psyent -- cgit v0.10.2 From 536884f915b1cdac69f0fb434ce3781c2ae31499 Mon Sep 17 00:00:00 2001 From: Shinya Kuribayashi Date: Sat, 5 Feb 2011 18:33:36 +0900 Subject: MIPS: Move Inca-IP targets to boards.cfg At the same time, fix up CPU_CLOCK_RATE to have the CONFIG_ prefix to work with boards.cfg. Signed-off-by: Shinya Kuribayashi diff --git a/Makefile b/Makefile index 9e6cf25..3fe0596 100644 --- a/Makefile +++ b/Makefile @@ -1098,19 +1098,6 @@ smdk6400_config : unconfig ## MIPS32 4Kc ######################################################################### -incaip_100MHz_config \ -incaip_133MHz_config \ -incaip_150MHz_config \ -incaip_config: unconfig - @mkdir -p $(obj)include - @[ -z "$(findstring _100MHz,$@)" ] || \ - echo "#define CPU_CLOCK_RATE 100000000" >>$(obj)include/config.h - @[ -z "$(findstring _133MHz,$@)" ] || \ - echo "#define CPU_CLOCK_RATE 133000000" >>$(obj)include/config.h - @[ -z "$(findstring _150MHz,$@)" ] || \ - echo "#define CPU_CLOCK_RATE 150000000" >>$(obj)include/config.h - @$(MKCONFIG) -n $@ -a incaip mips mips incaip - vct_premium_config \ vct_premium_small_config \ vct_premium_onenand_config \ diff --git a/board/incaip/lowlevel_init.S b/board/incaip/lowlevel_init.S index fe525ec..b765795 100644 --- a/board/incaip/lowlevel_init.S +++ b/board/incaip/lowlevel_init.S @@ -283,7 +283,7 @@ lowlevel_init: /* EBU, CGU and SDRAM Initialization. */ - li a0, CPU_CLOCK_RATE + li a0, CONFIG_CPU_CLOCK_RATE move t0, ra /* We rely on the fact that neither ebu_init() nor cgu_init() nor sdram_init() diff --git a/boards.cfg b/boards.cfg index cb67d2a..d3edc9f 100644 --- a/boards.cfg +++ b/boards.cfg @@ -219,6 +219,10 @@ dbau1500 mips mips dbau1x00 - dbau1550 mips mips dbau1x00 - - dbau1x00:DBAU1550 dbau1550_el mips mips dbau1x00 - - dbau1x00:DBAU1550 gth2 mips mips +incaip mips mips +incaip_100MHz mips mips incaip - - incaip:CPU_CLOCK_RATE=100000000 +incaip_133MHz mips mips incaip - - incaip:CPU_CLOCK_RATE=133000000 +incaip_150MHz mips mips incaip - - incaip:CPU_CLOCK_RATE=150000000 pb1000 mips mips pb1x00 - - pb1x00:PB1000 purple mips mips qemu_mips mips mips qemu-mips - - qemu-mips diff --git a/include/configs/incaip.h b/include/configs/incaip.h index b7ba6f4..f2950e8 100644 --- a/include/configs/incaip.h +++ b/include/configs/incaip.h @@ -31,9 +31,12 @@ #define CONFIG_MIPS32 1 /* MIPS 4Kc CPU core */ #define CONFIG_INCA_IP 1 /* on a INCA-IP Board */ -#ifndef CPU_CLOCK_RATE -/* allowed values: 100000000, 133000000, and 150000000 */ -#define CPU_CLOCK_RATE 150000000 /* default: 150 MHz clock for the MIPS core */ +/* + * Clock for the MIPS core (MHz) + * allowed values: 100000000, 133000000, and 150000000 (default) + */ +#ifndef CONFIG_CPU_CLOCK_RATE +#define CONFIG_CPU_CLOCK_RATE 150000000 #endif #define INFINEON_EBU_BOOTCFG 0x40C4 /* CMULT = 8 */ -- cgit v0.10.2 From 9d3f9118a9b4b54bbea48bac51c0dec7180edec0 Mon Sep 17 00:00:00 2001 From: Shinya Kuribayashi Date: Sat, 5 Feb 2011 19:35:21 +0900 Subject: MIPS: Move VCT boards to boards.cfg Signed-off-by: Shinya Kuribayashi Acked-by: Stefan Roese diff --git a/Makefile b/Makefile index 3fe0596..6133160 100644 --- a/Makefile +++ b/Makefile @@ -1092,38 +1092,6 @@ smdk6400_config : unconfig @echo "CONFIG_NAND_U_BOOT = y" >> $(obj)include/config.mk #======================================================================== -# MIPS -#======================================================================== -######################################################################### -## MIPS32 4Kc -######################################################################### - -vct_premium_config \ -vct_premium_small_config \ -vct_premium_onenand_config \ -vct_premium_onenand_small_config \ -vct_platinum_config \ -vct_platinum_small_config \ -vct_platinum_onenand_config \ -vct_platinum_onenand_small_config \ -vct_platinumavc_config \ -vct_platinumavc_small_config \ -vct_platinumavc_onenand_config \ -vct_platinumavc_onenand_small_config: unconfig - @mkdir -p $(obj)include - @[ -z "$(findstring _premium,$@)" ] || \ - echo "#define CONFIG_VCT_PREMIUM" > $(obj)include/config.h - @[ -z "$(findstring _platinum_,$@)" ] || \ - echo "#define CONFIG_VCT_PLATINUM" > $(obj)include/config.h - @[ -z "$(findstring _platinumavc,$@)" ] || \ - echo "#define CONFIG_VCT_PLATINUMAVC" > $(obj)include/config.h - @[ -z "$(findstring _onenand,$@)" ] || \ - echo "#define CONFIG_VCT_ONENAND" >> $(obj)include/config.h - @[ -z "$(findstring _small,$@)" ] || \ - echo "#define CONFIG_VCT_SMALL_IMAGE" >> $(obj)include/config.h - @$(MKCONFIG) -n $@ -a vct mips mips vct micronas - -#======================================================================== # Nios #======================================================================== diff --git a/boards.cfg b/boards.cfg index d3edc9f..b8369e1 100644 --- a/boards.cfg +++ b/boards.cfg @@ -227,6 +227,18 @@ pb1000 mips mips pb1x00 - purple mips mips qemu_mips mips mips qemu-mips - - qemu-mips tb0229 mips mips +vct_premium mips mips vct micronas - vct:VCT_PREMIUM +vct_premium_small mips mips vct micronas - vct:VCT_PREMIUM,VCT_SMALL_IMAGE +vct_premium_onenand mips mips vct micronas - vct:VCT_PREMIUM,VCT_ONENAND +vct_premium_onenand_small mips mips vct micronas - vct:VCT_PREMIUM,VCT_ONENAND,VCT_SMALL_IMAGE +vct_platinum mips mips vct micronas - vct:VCT_PLATINUM +vct_platinum_small mips mips vct micronas - vct:VCT_PLATINUM,VCT_SMALL_IMAGE +vct_platinum_onenand mips mips vct micronas - vct:VCT_PLATINUM,VCT_ONENAND +vct_platinum_onenand_small mips mips vct micronas - vct:VCT_PLATINUM,VCT_ONENAND,VCT_SMALL_IMAGE +vct_platinumavc mips mips vct micronas - vct:VCT_PLATINUMAVC +vct_platinumavc_small mips mips vct micronas - vct:VCT_PLATINUMAVC,VCT_SMALL_IMAGE +vct_platinumavc_onenand mips mips vct micronas - vct:VCT_PLATINUMAVC,VCT_ONENAND +vct_platinumavc_onenand_small mips mips vct micronas - vct:VCT_PLATINUMAVC,VCT_ONENAND,VCT_SMALL_IMAGE PCI5441 nios2 nios2 pci5441 psyent PK1C20 nios2 nios2 pk1c20 psyent EVB64260 powerpc 74xx_7xx evb64260 - - EVB64260 -- cgit v0.10.2