[U-Boot] AT91SAM9260 and Micrel KSZ8041
Hello, I am working with a custom board based on the AT91SAM9260 with a Micrel KSZ8041 physical layer. The ethernet appears to work fine in u-boot, but neither of the lights on the jack are working, however I can tftp files through the ethernet port. My bigger problem is that in Linux I cannot connect to my network, all of the RX packets show are listed as errors. I am trying to rule-out a hardware issue so I wanted to check to see if anyone is working with the Micrel KSZ8041, and whether the lights should be working, and if they had gotten it working under Linux. Also, if anyone knows of a difference between the u-boot ethernet and linux kernel ethernet that may be causing the problem I would appreciate any insight. I have tried the 2.6.24, 2.6.25, and 2.6.27 kernels. Thanks, Kevin ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] AT91SAM9260 and Micrel KSZ8041
I wanted to check to see if anyone is working with the Micrel KSZ8041, and whether the lights should be working, and if they had gotten it working under Linux. Yes, we're currently and succesfully using KSZ8041 together with AT91SAM9260. We have tested it with both u-boot and linux (we're using 2.6.21 kernel) and without big patches. I suggest you to double check your hardware platform (since the KSZ8041 comes in QFN package with termal pad on bottom side). You probably have some unsoldered pin. Regards Gianfranco ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] [UBI] UBI command support
Dear Kyungmin Park, In message [EMAIL PROTECTED] you wrote: ... + printf(Unknown UBI command or invalid number of arguments\n); Print usage message instead. How to display usage? printf (Usage:\n%s\n, cmdtp-usage); Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED] Misquotation is, in fact, the pride and privilege of the learned. A widely-read man never quotes accurately, for the rather obvious reason that he has read too widely. - Hesketh Pearson _Common Misquotations_ introduction ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] ARM926EJ-S: relocate OMAP specific 'cpuinfo.c' into OMAP directory (fixed patch)
OMAP identification is implemented in 'cpuinfo.c' and located in ARM926EJ-S directory. It makes sense to place this file in OMAP specific subdirectory, i.e. cpu/arm926ejs/omap Signed-off-by: Roman Mashak [EMAIL PROTECTED] --- cpu/arm926ejs/Makefile |2 +- cpu/arm926ejs/cpuinfo.c | 242 -- cpu/arm926ejs/omap/Makefile |2 +- cpu/arm926ejs/omap/cpuinfo.c | 242 ++ 4 files changed, 244 insertions(+), 244 deletions(-) diff --git a/cpu/arm926ejs/Makefile b/cpu/arm926ejs/Makefile index 0facce4..d5ac7d3 100644 --- a/cpu/arm926ejs/Makefile +++ b/cpu/arm926ejs/Makefile @@ -26,7 +26,7 @@ include $(TOPDIR)/config.mk LIB= $(obj)lib$(CPU).a START = start.o -COBJS = interrupts.o cpu.o cpuinfo.o +COBJS = interrupts.o cpu.o SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) diff --git a/cpu/arm926ejs/cpuinfo.c b/cpu/arm926ejs/cpuinfo.c deleted file mode 100644 index 35ba7db..000 --- a/cpu/arm926ejs/cpuinfo.c +++ /dev/null @@ -1,242 +0,0 @@ -/* - * OMAP1 CPU identification code - * - * Copyright (C) 2004 Nokia Corporation - * Written by Tony Lindgren [EMAIL PROTECTED] - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#include common.h -#include command.h -#include arm926ejs.h - -#if defined(CONFIG_DISPLAY_CPUINFO) defined(CONFIG_OMAP) - -#define omap_readw(x) *(volatile unsigned short *)(x) -#define omap_readl(x) *(volatile unsigned long *)(x) - -#define OMAP_DIE_ID_0 0xfffe1800 -#define OMAP_DIE_ID_1 0xfffe1804 -#define OMAP_PRODUCTION_ID_0 0xfffe2000 -#define OMAP_PRODUCTION_ID_1 0xfffe2004 -#define OMAP32_ID_00xfffed400 -#define OMAP32_ID_10xfffed404 - -struct omap_id { - u16 jtag_id;/* Used to determine OMAP type */ - u8 die_rev;/* Processor revision */ - u32 omap_id;/* OMAP revision */ - u32 type; /* Cpu id bits [31:08], cpu class bits [07:00] */ -}; - -/* Register values to detect the OMAP version */ -static struct omap_id omap_ids[] = { - { .jtag_id = 0xb574, .die_rev = 0x2, .omap_id = 0x03310315, .type = 0x0310}, - { .jtag_id = 0x355f, .die_rev = 0x0, .omap_id = 0x0332, .type = 0x07300100}, - { .jtag_id = 0xb55f, .die_rev = 0x0, .omap_id = 0x0332, .type = 0x07300300}, - { .jtag_id = 0xb470, .die_rev = 0x0, .omap_id = 0x03310100, .type = 0x1510}, - { .jtag_id = 0xb576, .die_rev = 0x0, .omap_id = 0x0332, .type = 0x1610}, - { .jtag_id = 0xb576, .die_rev = 0x2, .omap_id = 0x03320100, .type = 0x1611}, - { .jtag_id = 0xb576, .die_rev = 0x3, .omap_id = 0x03320100, .type = 0x16100c00}, - { .jtag_id = 0xb576, .die_rev = 0x0, .omap_id = 0x03320200, .type = 0x16100d00}, - { .jtag_id = 0xb613, .die_rev = 0x0, .omap_id = 0x03320300, .type = 0x1610ef00}, - { .jtag_id = 0xb613, .die_rev = 0x0, .omap_id = 0x03320300, .type = 0x1610ef00}, - { .jtag_id = 0xb576, .die_rev = 0x1, .omap_id = 0x03320100, .type = 0x1611}, - { .jtag_id = 0xb58c, .die_rev = 0x2, .omap_id = 0x03320200, .type = 0x16110b00}, - { .jtag_id = 0xb58c, .die_rev = 0x3, .omap_id = 0x03320200, .type = 0x16110c00}, - { .jtag_id = 0xb65f, .die_rev = 0x0, .omap_id = 0x03320400, .type = 0x16212300}, - { .jtag_id = 0xb65f, .die_rev = 0x1, .omap_id = 0x03320400, .type = 0x16212300}, - { .jtag_id = 0xb65f, .die_rev = 0x1, .omap_id = 0x03320500, .type = 0x16212300}, - { .jtag_id = 0xb5f7, .die_rev = 0x0, .omap_id = 0x0333, .type = 0x1710}, - { .jtag_id = 0xb5f7, .die_rev = 0x1, .omap_id = 0x03330100, .type = 0x1710}, - { .jtag_id = 0xb5f7, .die_rev = 0x2, .omap_id = 0x03330100, .type = 0x1710}, -}; - -/* - * Get OMAP type from PROD_ID. - * 1710 has the PROD_ID in bits 15:00, not in 16:01 as documented in TRM. - * 1510 PROD_ID is empty, and 1610 PROD_ID does not make sense. - * Undocumented register in TEST BLOCK is used as fallback; This seems to - * work on 1510, 1610 1710. The official way hopefully will work in future - * processors. - */ -static u16 omap_get_jtag_id(void) -{ - u32 prod_id, omap_id; - - prod_id = omap_readl(OMAP_PRODUCTION_ID_1); - omap_id = omap_readl(OMAP32_ID_1); - - /* Check for unusable OMAP_PRODUCTION_ID_1 on 1611B/5912 and 730 */ - if (((prod_id 20) == 0) || (prod_id == omap_id)) - prod_id = 0; - else - prod_id = 0x; - - if (prod_id) - return prod_id; - - /* Use OMAP32_ID_1 as fallback */ - prod_id = ((omap_id 12) 0x); - - return prod_id; -} - -/* - * Get OMAP revision from DIE_REV. - * Early 1710
[U-Boot] [PATCH] [ARM] Apollon UBI support (take #2)
Now you can use the UBI at apollon board Signed-off-by: Kyungmin Park [EMAIL PROTECTED] --- diff --git a/board/apollon/Makefile b/board/apollon/Makefile index 9bac9a6..4c3e57f 100644 --- a/board/apollon/Makefile +++ b/board/apollon/Makefile @@ -25,9 +25,11 @@ include $(TOPDIR)/config.mk LIB= $(obj)lib$(BOARD).a -COBJS := apollon.o mem.o sys_info.o +COBJS-y:= apollon.o mem.o sys_info.o +COBJS-$(CONFIG_CMD_UBI) += ubi.o SOBJS := lowlevel_init.o +COBJS := $(COBJS-y) SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS)) SOBJS := $(addprefix $(obj),$(SOBJS)) diff --git a/board/apollon/ubi.c b/board/apollon/ubi.c new file mode 100644 index 000..10dd6e7 --- /dev/null +++ b/board/apollon/ubi.c @@ -0,0 +1,48 @@ +/* + * board/apollon/ubi.c + * + * Copyright (C) 2008 Samsung Electronics + * Kyungmin Park [EMAIL PROTECTED] + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include common.h +#include linux/mtd/mtd.h +#include linux/mtd/partitions.h +#include jffs2/load_kernel.h +#include ubi_uboot.h + +int ubi_board_scan(void) +{ + struct mtd_device *dev; + struct part_info *part; + struct mtd_partition mtd_part; + char buffer[32]; + u8 pnum; + int err; + + if (mtdparts_init() != 0) + return 1; + + if (find_dev_and_part(onenand0,4, dev, pnum, part) != 0) + return 1; + + sprintf(buffer, mtd=%d, pnum); + mtd_part.name = buffer; + mtd_part.size = part-size; + mtd_part.offset = part-offset; + add_mtd_partitions(onenand_mtd, mtd_part, 1); + + err = ubi_mtd_param_parse(buffer, NULL); + if (err) + return err; + + err = ubi_init(); + if (err) + return err; + + return 0; +} diff --git a/include/configs/apollon.h b/include/configs/apollon.h index d71ed44..dff47fc 100644 --- a/include/configs/apollon.h +++ b/include/configs/apollon.h @@ -53,6 +53,9 @@ #define CONFIG_SYS_USE_NOR 1 #endif +/* uncommnet if you want to use UBI */ +#define CONFIG_SYS_USE_UBI + #include asm/arch/omap2420.h /* get chip and board defs */ #defineV_SCLK 1200 @@ -73,8 +76,9 @@ * Size of malloc() pool */ #defineCONFIG_ENV_SIZE SZ_128K /* Total Size of Environment Sector */ -#defineCONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + SZ_128K) -#defineCONFIG_SYS_GBL_DATA_SIZE128 /* bytes reserved for initial data */ +#defineCONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + SZ_1M) +/* bytes reserved for initial data */ +#defineCONFIG_SYS_GBL_DATA_SIZE128 /* * Hardware drivers @@ -116,6 +120,13 @@ #defineCONFIG_CMD_DIAG #defineCONFIG_CMD_ONENAND +#ifdef CONFIG_SYS_USE_UBI +#defineCONFIG_CMD_JFFS2 +#defineCONFIG_CMD_UBI +#defineCONFIG_RBTREE +#define CONFIG_MTD_PARTITIONS +#endif + #undef CONFIG_CMD_AUTOSCRIPT #ifndefCONFIG_SYS_USE_NOR @@ -133,24 +144,39 @@ #defineCONFIG_BOOTFILE uImage #defineCONFIG_ETHADDR 00:0E:99:00:24:20 -#ifdef CONFIG_APOLLON_PLUS -# define CONFIG_BOOTARGS root=/dev/nfs rw mem=64M console=ttyS0,115200n8 ip=192.168.116.25:192.168.116.1:192.168.116.1:255.255.255.0:apollon:eth0:off nfsroot=/tftpboot/nfsroot profile=2 +#ifdef CONFIG_APOLLON_PLUS +#define CONFIG_SYS_MEM mem=64M +#else +#define CONFIG_SYS_MEM mem=128 +#endif + +#ifdef CONFIG_SYS_USE_UBI +#define CONFIG_SYS_UBI ubi.mtd=4 #else -# define CONFIG_BOOTARGS root=/dev/nfs rw mem=128M console=ttyS0,115200n8 ip=192.168.116.25:192.168.116.1:192.168.116.1:255.255.255.0:apollon:eth0:off nfsroot=/tftpboot/nfsroot profile=2 +#define CONFIG_SYS_UBI #endif +#define CONFIG_BOOTARGS root=/dev/nfs rw CONFIG_SYS_MEM \ +console=ttyS0,115200n8 \ +ip=192.168.116.25:192.168.116.1:192.168.116.1:255.255.255.0: \ + apollon:eth0:off nfsroot=/tftpboot/nfsroot profile=2 \ + CONFIG_SYS_UBI + #defineCONFIG_EXTRA_ENV_SETTINGS \ Image=tftp 0x80008000 Image; go 0x80008000\0 \ zImage=tftp 0x8018 zImage; go 0x8018\0\ uImage=tftp 0x8018 uImage; bootm 0x8018\0 \ uboot=tftp 0x80008000 u-boot.bin; go 0x80008000\0 \ - xloader=tftp 0x8018 x-load.bin; cp.w 0x8018 0x0400 0x1000; go 0x0400\0\ + xloader=tftp 0x8018 x-load.bin; \ +cp.w 0x8018 0x0400 0x1000; go 0x0400\0 \ syncmode50=mw.w 0x1e442 0xc0c4; mw 0x6800a060 0xe30d1201\0\ syncmode=mw.w 0x1e442 0xe0f4; mw 0x6800a060 0xe30d1201\0 \ norboot=cp32 0x1804 0x80008000 0x20; go 0x80008000\0 \ -
[U-Boot] [PATCH] [UBI] UBI command support (take #2)
It supports basic operation such as create, remove, read, and write. Signed-off-by: Kyungmin Park [EMAIL PROTECTED] --- diff --git a/common/Makefile b/common/Makefile index f00cbd9..b02a541 100644 --- a/common/Makefile +++ b/common/Makefile @@ -139,6 +139,7 @@ COBJS-$(CONFIG_CMD_SETEXPR) += cmd_setexpr.o COBJS-$(CONFIG_CMD_SPI) += cmd_spi.o COBJS-$(CONFIG_CMD_STRINGS) += cmd_strings.o COBJS-$(CONFIG_CMD_TERMINAL) += cmd_terminal.o +COBJS-$(CONFIG_CMD_UBI) += cmd_ubi.o COBJS-$(CONFIG_CMD_UNIVERSE) += cmd_universe.o ifdef CONFIG_CMD_USB COBJS-y += cmd_usb.o diff --git a/common/cmd_ubi.c b/common/cmd_ubi.c new file mode 100644 index 000..657003e --- /dev/null +++ b/common/cmd_ubi.c @@ -0,0 +1,516 @@ +/* + * Unsorted Block Image commands + * + * Copyright (C) 2008 Samsung Electronics + * Kyungmin Park [EMAIL PROTECTED] + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include common.h +#include command.h +#include exports.h + +#include linux/mtd/mtd.h +#include linux/mtd/partitions.h +#include ubi_uboot.h +#include asm/errno.h + +/* Private own data */ +static struct ubi_device *ubi; +static int ubi_initialized; + +static void ubi_dump_vol_info(const struct ubi_volume *vol) +{ + ubi_msg(volume information dump:); + ubi_msg(vol_id %d, vol-vol_id); + ubi_msg(reserved_pebs %d, vol-reserved_pebs); + ubi_msg(alignment %d, vol-alignment); + ubi_msg(data_pad%d, vol-data_pad); + ubi_msg(vol_type%d, vol-vol_type); + ubi_msg(name_len%d, vol-name_len); + ubi_msg(usable_leb_size %d, vol-usable_leb_size); + ubi_msg(used_ebs%d, vol-used_ebs); + ubi_msg(used_bytes %lld, vol-used_bytes); + ubi_msg(last_eb_bytes %d, vol-last_eb_bytes); + ubi_msg(corrupted %d, vol-corrupted); + ubi_msg(upd_marker %d, vol-upd_marker); + + if (vol-name_len = UBI_VOL_NAME_MAX + strnlen(vol-name, vol-name_len + 1) == vol-name_len) { + ubi_msg(name%s, vol-name); + } else { + ubi_msg(the 1st 5 characters of the name: %c%c%c%c%c, + vol-name[0], vol-name[1], vol-name[2], + vol-name[3], vol-name[4]); + } + printf(\n); +} + +static void display_volume_info(struct ubi_device *ubi) +{ + int i; + + for (i = 0; i (ubi-vtbl_slots + 1); i++) { + if (!ubi-volumes[i]) + continue; /* Empty record */ + ubi_dump_vol_info(ubi-volumes[i]); + } +} + +static void display_ubi_info(struct ubi_device *ubi) +{ + ubi_msg(MTD device name:\%s\, ubi-mtd-name); + ubi_msg(MTD device size:%llu MiB, ubi-flash_size 20); + ubi_msg(physical eraseblock size: %d bytes (%d KiB), + ubi-peb_size, ubi-peb_size 10); + ubi_msg(logical eraseblock size:%d bytes, ubi-leb_size); + ubi_msg(number of good PEBs:%d, ubi-good_peb_count); + ubi_msg(number of bad PEBs: %d, ubi-bad_peb_count); + ubi_msg(smallest flash I/O unit:%d, ubi-min_io_size); + ubi_msg(VID header offset: %d (aligned %d), + ubi-vid_hdr_offset, ubi-vid_hdr_aloffset); + ubi_msg(data offset:%d, ubi-leb_start); + ubi_msg(max. allowed volumes: %d, ubi-vtbl_slots); + ubi_msg(wear-leveling threshold:%d, CONFIG_MTD_UBI_WL_THRESHOLD); + ubi_msg(number of internal volumes: %d, UBI_INT_VOL_COUNT); + ubi_msg(number of user volumes: %d, + ubi-vol_count - UBI_INT_VOL_COUNT); + ubi_msg(available PEBs: %d, ubi-avail_pebs); + ubi_msg(total number of reserved PEBs: %d, ubi-rsvd_pebs); + ubi_msg(number of PEBs reserved for bad PEB handling: %d, + ubi-beb_rsvd_pebs); + ubi_msg(max/mean erase counter: %d/%d, ubi-max_ec, ubi-mean_ec); +} + +static int ubi_info(int layout) +{ + if (layout) + display_volume_info(ubi); + else + display_ubi_info(ubi); + + return 0; +} + +static int parse_num(size_t *num, const char *token) +{ + char *endp; + size_t n; + + n = (size_t) ustrtoul(token, endp, 0); + if (*endp) + return -EINVAL; + + *num = n; + return 0; +} + +static int verify_mkvol_req(const struct ubi_device *ubi, + const struct ubi_mkvol_req *req) +{ + int n, err = -EINVAL; + + if (req-bytes 0 || req-alignment 0 || req-vol_type 0 || + req-name_len 0) + goto bad; + + if ((req-vol_id 0 || req-vol_id = ubi-vtbl_slots) + req-vol_id != UBI_VOL_NUM_AUTO) + goto bad; + +
[U-Boot] [PATCH] ppc4xx: New board avnet fx12 minimodule v2
From: schardt [EMAIL PROTECTED] this patch adds support for the avnet fx12 minimodul it needs the ppc4xx: Generic architecture for xilinx ppc405 patch from Ricardo v2 rebased to ppc4xx/master Signed-off-by: schardt [EMAIL PROTECTED] Signed-off-by: Ricardo Ribalda Delgado [EMAIL PROTECTED] --- MAINTAINERS |4 + MAKEALL |1 + Makefile | 18 + board/avnet/fx12mm/.gitignore|1 + board/avnet/fx12mm/Makefile | 27 +++ board/avnet/fx12mm/config.mk | 26 +++ board/avnet/fx12mm/fx12mm.c | 52 + board/avnet/fx12mm/init.S| 32 board/avnet/fx12mm/u-boot.lds| 149 ++ board/avnet/fx12mm/xparameters.h | 51 + include/configs/fx12mm.h | 72 ++ 11 files changed, 433 insertions(+), 0 deletions(-) create mode 100644 board/avnet/fx12mm/.gitignore create mode 100644 board/avnet/fx12mm/Makefile create mode 100644 board/avnet/fx12mm/config.mk create mode 100644 board/avnet/fx12mm/fx12mm.c create mode 100644 board/avnet/fx12mm/init.S create mode 100644 board/avnet/fx12mm/u-boot.lds create mode 100644 board/avnet/fx12mm/xparameters.h create mode 100644 include/configs/fx12mm.h diff --git a/MAINTAINERS b/MAINTAINERS index a5d1038..260c3e6 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -366,6 +366,10 @@ Travis Sawyer ([EMAIL PROTECTED] METROBOXPPC440GX XPEDITE1K PPC440GX +Georg Schardt [EMAIL PROTECTED] + + fx12mm PPC405 + Heiko Schocher [EMAIL PROTECTED] ids8247 MPC8247 diff --git a/MAKEALL b/MAKEALL index aa602b7..1f56ac5 100755 --- a/MAKEALL +++ b/MAKEALL @@ -186,6 +186,7 @@ LIST_4xx= \ ebony \ ERIC\ EXBITGEN\ + fx12mm \ G2000 \ glacier \ haleakala \ diff --git a/Makefile b/Makefile index 66922eb..d6abb4d 100644 --- a/Makefile +++ b/Makefile @@ -1293,6 +1293,24 @@ ERIC_config: unconfig EXBITGEN_config: unconfig @$(MKCONFIG) $(@:_config=) ppc ppc4xx exbitgen +fx12mm_flash_config: unconfig + @mkdir -p $(obj)include $(obj)board/xilinx/ppc405-generic + @mkdir -p $(obj)include $(obj)board/avnet/fx12mm + @echo LDSCRIPT:=$(SRCTREE)/board/xilinx/ppc405-generic/u-boot-rom.lds\ +$(obj)board/avnet/fx12mm/config.tmp + @echo TEXT_BASE := 0xFFCB \ +$(obj)board/avnet/fx12mm/config.tmp + @$(MKCONFIG) fx12mm ppc ppc4xx fx12mm avnet + +fx12mm_config: unconfig + @mkdir -p $(obj)include $(obj)board/xilinx/ppc405-generic + @mkdir -p $(obj)include $(obj)board/avnet/fx12mm + @echo LDSCRIPT:=$(SRCTREE)/board/xilinx/ppc405-generic/u-boot-ram.lds\ +$(obj)board/avnet/fx12mm/config.tmp + @echo TEXT_BASE := 0x0300 \ +$(obj)board/avnet/fx12mm/config.tmp + @$(MKCONFIG) fx12mm ppc ppc4xx fx12mm avnet + G2000_config: unconfig @$(MKCONFIG) $(@:_config=) ppc ppc4xx g2000 diff --git a/board/avnet/fx12mm/.gitignore b/board/avnet/fx12mm/.gitignore new file mode 100644 index 000..b644f59 --- /dev/null +++ b/board/avnet/fx12mm/.gitignore @@ -0,0 +1 @@ +config.tmp diff --git a/board/avnet/fx12mm/Makefile b/board/avnet/fx12mm/Makefile new file mode 100644 index 000..f943781 --- /dev/null +++ b/board/avnet/fx12mm/Makefile @@ -0,0 +1,27 @@ +# +# (C) Copyright 2008 +# Ricardo Ribalda,Universidad Autonoma de Madrid, [EMAIL PROTECTED] +# This work has been supported by: Qtechnology http://qtec.com/ +# +# 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 +# + +COBJS += $(BOARD).o + +include $(SRCTREE)/board/xilinx/ppc405-generic/Makefile diff --git a/board/avnet/fx12mm/config.mk b/board/avnet/fx12mm/config.mk new file mode 100644 index 000..f5a6039 --- /dev/null +++ b/board/avnet/fx12mm/config.mk @@ -0,0 +1,26 @@ +# +# (C) Copyright 2008 +# Ricardo Ribalda-Universidad Autonoma de [EMAIL PROTECTED] +# Work supported by Qtechnology http://www.qtec.com +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is
Re: [U-Boot] [PATCH 3/3] iMX31: Add support to iMX31PDK board boots from NAND Flash
On 15:01 Tue 07 Oct , Alan Carvalho de Assis wrote: From ae5af322e53d00d021f6d4aa39c6916e1d3e12b7 Mon Sep 17 00:00:00 2001 From: Alan Carvalho de Assis [EMAIL PROTECTED] Date: Sun, 5 Oct 2008 20:00:59 -0300 Subject: [PATCH] iMX31: Add support to iMX31PDK board boots from NAND Flash This patch adds support to iMX31PDK board to boot directly from NAND Flash. In order to it works the previous patches (which reduces start.S size and copy NAND code to RAM) need be applied first. Signed-off-by: Alan Carvalho de Assis [EMAIL PROTECTED] --- board/freescale/mx31pdk/lowlevel_init.S | 95 +- board/freescale/mx31pdk/u-boot.lds |3 + include/configs/mx31pdk.h | 16 -- 3 files changed, 105 insertions(+), 9 deletions(-) Please rebase against u-boot-arm/master otherwhise ACK execpt some whitespace see comment below Best Regards, J. diff --git a/board/freescale/mx31pdk/lowlevel_init.S b/board/freescale/mx31pdk/lowlevel_init.S index a94ea7f..71ab612 100644 --- a/board/freescale/mx31pdk/lowlevel_init.S +++ b/board/freescale/mx31pdk/lowlevel_init.S @@ -20,11 +20,98 @@ * MA 02111-1307 USA */ -/* - * This is just to keep the linker happy. - */ +#include asm/arch/mx31-regs.h + +.macro REG reg, val + ldr r2, =\reg + ldr r3, =\val + str r3, [r2] +.endm + +.macro REG8 reg, val + ldr r2, =\reg + ldr r3, =\val + strb r3, [r2] +.endm + +.macro DELAY loops + ldr r2, =\loops +1: + subsr2, r2, #1 + nop + bcs 1b +.endm .globl lowlevel_init lowlevel_init: - mov pc, lr + /* Store return address on the stack since lr is re-used in this file */ + /* and all other registers are re-used as well */ + str lr, [sp] + + /* Also setup the Peripheral Port Remap register inside the core */ + ldr r0, =ARM_PPMRR/* start from AIPS 2GB region */ please use tab + mcr p15, 0, r0, c15, c2, 4 + + REG IPU_CONF, IPU_CONF_DI_EN + REG CCM_CCMR, 0x074B0BF5 + + DELAY 0x4 + + REG CCM_CCMR, 0x074B0BF5 | CCMR_MPE + REG CCM_CCMR, (0x074B0BF5 | CCMR_MPE) ~CCMR_MDS + + /* Set up clock to 532MHz */ + REG CCM_PDR0, 0xFF871D58 + REG CCM_MPCTL, 0x0033280C + REG CCM_SPCTL, PLL_PD(1) | PLL_MFD(4) | PLL_MFI(12) | PLL_MFN(1) + + /* Set up CPLD on CS5 */ + REG CSCR_U(5), 0xD843 + REG CSCR_L(5), 0x22252521 + REG CSCR_A(5), 0x0A00 + + /* Set up MX31 DDR Memory Controller */ + REG 0x43FAC26C, 0 /* SDCLK */ + REG 0x43FAC270, 0 /* CAS */ + REG 0x43FAC274, 0 /* RAS */ + REG 0x43FAC27C, 0x1000 /* CS2 CSD0) */ + REG 0x43FAC284, 0 /* DQM3 */ + REG 0x43FAC288, 0 /* DQM2, DQM1, DQM0, SD31-SD0, A25-A0, MA10 0x288..0x2DC) */ + REG 0x43FAC28C, 0 + REG 0x43FAC290, 0 + REG 0x43FAC294, 0 + REG 0x43FAC298, 0 + REG 0x43FAC29C, 0 + REG 0x43FAC2A0, 0 + REG 0x43FAC2A4, 0 + REG 0x43FAC2A8, 0 + REG 0x43FAC2AC, 0 + REG 0x43FAC2B0, 0 + REG 0x43FAC2B4, 0 + REG 0x43FAC2B8, 0 + REG 0x43FAC2BC, 0 + REG 0x43FAC2C0, 0 + REG 0x43FAC2C4, 0 + REG 0x43FAC2C8, 0 + REG 0x43FAC2CC, 0 + REG 0x43FAC2D0, 0 + REG 0x43FAC2D4, 0 + REG 0x43FAC2D8, 0 + REG 0x43FAC2DC, 0 + REG 0xB8001010, 0x0004 + REG 0xB8001004, 0x006ac73a + REG 0xB8001000, 0x9210 + REG 0x8f00, 0x12344321 + REG 0xB8001000, 0xa210 + REG 0x8000, 0x12344321 + REG 0x8000, 0x12344321 + REG 0xB8001000, 0xb210 + REG80x8033, 0xda + REG80x8100, 0xff + REG 0xB8001000, 0x82226080 + REG 0x8000, 0xDEADBEEF + REG 0xB8001010, 0x000c + + /* Copy from NAND to RAM */ + b nand_copy diff --git a/board/freescale/mx31pdk/u-boot.lds b/board/freescale/mx31pdk/u-boot.lds index 1460adc..8602f3e 100644 --- a/board/freescale/mx31pdk/u-boot.lds +++ b/board/freescale/mx31pdk/u-boot.lds @@ -35,6 +35,9 @@ SECTIONS .text : { cpu/arm1136/start.o (.text) ^^ please use tab + board/freescale/mx31pdk/lowlevel_init.o (.text) ^^ + cpu/arm1136/mx31/nand_copy.o (.text) ^^ + . = 2K; /* lowlevel NAND needs to fit in 2KB of NFC buffer */ ^^ *(.text) ^^ } Best Regards, J. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/3] iMX31: Reducing start.S size to let boot from NAND
On 15:01 Tue 07 Oct , Alan Carvalho de Assis wrote: From eeb4a71a3565098ba43aeb83be163731065a039d Mon Sep 17 00:00:00 2001 From: Alan Carvalho de Assis [EMAIL PROTECTED] Date: Sun, 5 Oct 2008 19:57:22 -0300 Subject: [PATCH] iMX31: Reducing start.S size to let boot from NAND iMX31 NAND Flash Controller has a 2KB RAM buffer, but the current start.S file is too much big to let NAND copy routine to fit in. This patch will reduce the start.S when booting from NAND Flash. Signed-off-by: Alan Carvalho de Assis [EMAIL PROTECTED] --- cpu/arm1136/start.S | 24 ++-- 1 files changed, 22 insertions(+), 2 deletions(-) Please rebase against u-boot-arm/mater and fix whitespace otherwise ACK when this code will be merge could you rebase the other IMX31 patch set too to have it applied Best Regards, J. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] ppc4xx: New board avnet fx12 minimodule v3
From: schardt [EMAIL PROTECTED] this patch adds support for the avnet fx12 minimodul it needs the ppc4xx: Generic architecture for xilinx ppc405 patch from Ricardo v2 rebased to ppc4xx/master v3 files u-boot.lds and init.S removed Signed-off-by: schardt [EMAIL PROTECTED] Signed-off-by: Ricardo Ribalda Delgado [EMAIL PROTECTED] --- MAINTAINERS |4 ++ MAKEALL |1 + Makefile | 18 + board/avnet/fx12mm/.gitignore|1 + board/avnet/fx12mm/Makefile | 27 ++ board/avnet/fx12mm/config.mk | 26 ++ board/avnet/fx12mm/fx12mm.c | 52 +++ board/avnet/fx12mm/xparameters.h | 51 +++ include/configs/fx12mm.h | 72 ++ 9 files changed, 252 insertions(+), 0 deletions(-) create mode 100644 board/avnet/fx12mm/.gitignore create mode 100644 board/avnet/fx12mm/Makefile create mode 100644 board/avnet/fx12mm/config.mk create mode 100644 board/avnet/fx12mm/fx12mm.c create mode 100644 board/avnet/fx12mm/xparameters.h create mode 100644 include/configs/fx12mm.h diff --git a/MAINTAINERS b/MAINTAINERS index a5d1038..260c3e6 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -366,6 +366,10 @@ Travis Sawyer ([EMAIL PROTECTED] METROBOXPPC440GX XPEDITE1K PPC440GX +Georg Schardt [EMAIL PROTECTED] + + fx12mm PPC405 + Heiko Schocher [EMAIL PROTECTED] ids8247 MPC8247 diff --git a/MAKEALL b/MAKEALL index aa602b7..1f56ac5 100755 --- a/MAKEALL +++ b/MAKEALL @@ -186,6 +186,7 @@ LIST_4xx= \ ebony \ ERIC\ EXBITGEN\ + fx12mm \ G2000 \ glacier \ haleakala \ diff --git a/Makefile b/Makefile index 66922eb..d6abb4d 100644 --- a/Makefile +++ b/Makefile @@ -1293,6 +1293,24 @@ ERIC_config: unconfig EXBITGEN_config: unconfig @$(MKCONFIG) $(@:_config=) ppc ppc4xx exbitgen +fx12mm_flash_config: unconfig + @mkdir -p $(obj)include $(obj)board/xilinx/ppc405-generic + @mkdir -p $(obj)include $(obj)board/avnet/fx12mm + @echo LDSCRIPT:=$(SRCTREE)/board/xilinx/ppc405-generic/u-boot-rom.lds\ +$(obj)board/avnet/fx12mm/config.tmp + @echo TEXT_BASE := 0xFFCB \ +$(obj)board/avnet/fx12mm/config.tmp + @$(MKCONFIG) fx12mm ppc ppc4xx fx12mm avnet + +fx12mm_config: unconfig + @mkdir -p $(obj)include $(obj)board/xilinx/ppc405-generic + @mkdir -p $(obj)include $(obj)board/avnet/fx12mm + @echo LDSCRIPT:=$(SRCTREE)/board/xilinx/ppc405-generic/u-boot-ram.lds\ +$(obj)board/avnet/fx12mm/config.tmp + @echo TEXT_BASE := 0x0300 \ +$(obj)board/avnet/fx12mm/config.tmp + @$(MKCONFIG) fx12mm ppc ppc4xx fx12mm avnet + G2000_config: unconfig @$(MKCONFIG) $(@:_config=) ppc ppc4xx g2000 diff --git a/board/avnet/fx12mm/.gitignore b/board/avnet/fx12mm/.gitignore new file mode 100644 index 000..b644f59 --- /dev/null +++ b/board/avnet/fx12mm/.gitignore @@ -0,0 +1 @@ +config.tmp diff --git a/board/avnet/fx12mm/Makefile b/board/avnet/fx12mm/Makefile new file mode 100644 index 000..f943781 --- /dev/null +++ b/board/avnet/fx12mm/Makefile @@ -0,0 +1,27 @@ +# +# (C) Copyright 2008 +# Ricardo Ribalda,Universidad Autonoma de Madrid, [EMAIL PROTECTED] +# This work has been supported by: Qtechnology http://qtec.com/ +# +# 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 +# + +COBJS += $(BOARD).o + +include $(SRCTREE)/board/xilinx/ppc405-generic/Makefile diff --git a/board/avnet/fx12mm/config.mk b/board/avnet/fx12mm/config.mk new file mode 100644 index 000..f5a6039 --- /dev/null +++ b/board/avnet/fx12mm/config.mk @@ -0,0 +1,26 @@ +# +# (C) Copyright 2008 +# Ricardo Ribalda-Universidad Autonoma de [EMAIL PROTECTED] +# Work supported by Qtechnology http://www.qtec.com +# +# 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 +#
Re: [U-Boot] [PATCH] at91: board specific lowlevel_init.S
Dear Mr. Denk, Dear Ilko Iliev, In message [EMAIL PROTECTED] you wrote: Maybe instead of adding mor #ifdef'ery here, we can turn lowlevel_init() into a weak function that can be redefined by board specific code? The lowlevel_init() is an assembler function called from another assembler function and the attribute .weak doesn't work. What do you mean by attribute .weak doesn't work ? There are no assembler file in the U-BOOT tree which use weak functions. Do you know how can I make an assembler function weak? Well, if you don't know, then don't ask me, ask your compiler - he knows how to do this. For example, common/cmd_boot.c has this code snippet right at the beginning: 30 31 /* Allow ports to override the default behavior */ 32 __attribute__((weak)) 33 unsigned long do_go_exec (ulong (*entry)(int, char *[]), int argc, char *argv[]) 34 { 35 return entry (argc, argv); 36 } Compile this with -S option, and you get this: 12 .Ltext0: 13 .align 2 14 .weak do_go_exec 15 .type do_go_exec, @function 16 do_go_exec: 17 .LFB87: 18 .file 1 cmd_boot.c 19 .loc 1 34 0 20 .LVL0: 21 mflr 0 22 .LCFI0: 23 stwu 1,-16(1) ... So to me it seems as if the attribute .weak is supposed to work just fine. What exactly is not working for you? With .weak lowlevel_init the function is marked as weak (I can see this in the ELF file) but it is not overwritten from the another lowlevel_init(). -- Mit freundlichen Grüßen/With best regards, Ilko Iliev Ronetix Development Tools GmbH CPU Modules, JTAG/BDM Emulators and Flash Programmers Waidhausenstrasse 13/5, 1140 Vienna, Austria E-Mail: [EMAIL PROTECTED]; Web: www.ronetix.at ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] bootm: Add subcommands
Kumar Gala wrote: On Oct 21, 2008, at 2:30 PM, Wolfgang Denk wrote: Dear Kumar Gala, In message [EMAIL PROTECTED] you wrote: Add the ability to break the steps of the bootm command into several subcommands: start, loados, ramdisk, fdt, bdt, cmdline, prep, go. This allows us to do things like manipulate device trees before they are passed to a booting kernel or setup memory for a secondary core in multicore situations. Not all OS types support all subcommands (currently only start, loados, ramdisk, fdt, and go are supported). Signed-off-by: Kumar Gala [EMAIL PROTECTED] This looks mostly OK to me, but I haven't actually tested any of this code yet - can you please comment to what extend you tested it? I've tested this on FSL 85xx HW. I'm able to boot using a sequence of bootm subcommands + a few other commands as well as plain old bootm. Ditto for the MPC8360. Best regards, gvb ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] bootm: Add subcommands
Kumar Gala wrote: On Oct 21, 2008, at 2:44 PM, Jerry Van Baren wrote: I've been hacking at cmd_bootm.c and image.c. The direction I'm hacking in is: * Move boot_* stuff from image.c into cmd_bootm.c - Calling out to another file to a function unused in that file? Ugly. * Move the FIT stuff out of image.c into a new file fit_image.c - The resulting files are more cohesive and less BIG. * Move the im* commands out of cmd_bootm.c into a new file cmd_image.c - At one time, I was of the opinion that bootm (loados|ramdisk|fdt) should be ldimage (os|ramdisk|fdt). I'm less sure of myself, but have not totally discarded the opinion. - Looking in cmd_bootm.c for im* commands is rather unintuitive. these all sound like good things. I've posted a clean patchset for Wolfgang to apply to 'master' or 'testing' - k Thanks, that was helpful. I cloned the testing branch and am hacking merrily. gvb ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] ppc4xx: New board avnet fx12 minimodule v2
Georg Schardt wrote: From: schardt [EMAIL PROTECTED] this patch adds support for the avnet fx12 minimodul it needs the ppc4xx: Generic architecture for xilinx ppc405 patch from Ricardo v2 rebased to ppc4xx/master The above two^Wfour lines should go *below* the ---, they are remarks WRT the patch, not really a commit comment for posterity. Ahh, also the line it needs the ppc4xx: Generic architecture for xilinx ppc405 patch from Ricardo should go below the ---. Also, s/minimodul/minimodule/ unless it really *is* spelled w/o the e. While we are critiquing the English, sentences start with capital letters and end with periods, as in This patch adds support for the avnet fx12 minimodule. WRT the subject line, the v2 should go *inside* the [PATCH v2] so it doesn't get included in the git repository comment. Signed-off-by: schardt [EMAIL PROTECTED] Signed-off-by: Ricardo Ribalda Delgado [EMAIL PROTECTED] --- Put your remarks here. MAINTAINERS |4 + MAKEALL |1 + Makefile | 18 + board/avnet/fx12mm/.gitignore|1 + board/avnet/fx12mm/Makefile | 27 +++ board/avnet/fx12mm/config.mk | 26 +++ board/avnet/fx12mm/fx12mm.c | 52 + board/avnet/fx12mm/init.S| 32 board/avnet/fx12mm/u-boot.lds| 149 ++ board/avnet/fx12mm/xparameters.h | 51 + include/configs/fx12mm.h | 72 ++ [snip] The bike shed is blue today. Thanks, gvb ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] fdt_resize(): Expand to next page boundary independent of offset
fdt_resize() adjusted the fdt totalsize so the fdt would end on a page boundary in memory - E.G. the amount of padding depended on the location of the fdt (offset within page). This doesn't work very good with multi file images where the fdt is located after the kernel and hence on a more-or-less random offset within a page. Instead, simply pad fdt to the next page boundary. For the common case of fdt at offset 0 within a page, the same amount of padding as before is added. Signed-off-by: Peter Korsgaard [EMAIL PROTECTED] --- common/fdt_support.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/common/fdt_support.c b/common/fdt_support.c index 8ceeb0f..12aebac 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -579,9 +579,8 @@ int fdt_resize(void *blob) actualsize = fdt_off_dt_strings(blob) + fdt_size_dt_strings(blob); - /* Make it so the fdt ends on a page boundary */ + /* Expand to next page boundary */ actualsize = ALIGN(actualsize, 0x1000); - actualsize = actualsize - ((uint)blob 0xfff); /* Change the fdt header to reflect the correct size */ fdt_set_totalsize(blob, actualsize); -- 1.5.6.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] ppc4xx: New board avnet fx12 minimodule v2
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Jerry, thx for your comments, i will pay attention on the right patch format the next time. It is my first project I send patches to and until now, git is not my best friend. Sorry for my poor english, it is not my native language and i dont know that this is a problem here. Georg Jerry Van Baren schrieb: Georg Schardt wrote: From: schardt [EMAIL PROTECTED] this patch adds support for the avnet fx12 minimodul it needs the ppc4xx: Generic architecture for xilinx ppc405 patch from Ricardo v2 rebased to ppc4xx/master The above two^Wfour lines should go *below* the ---, they are remarks WRT the patch, not really a commit comment for posterity. Ahh, also the line it needs the ppc4xx: Generic architecture for xilinx ppc405 patch from Ricardo should go below the ---. Also, s/minimodul/minimodule/ unless it really *is* spelled w/o the e. While we are critiquing the English, sentences start with capital letters and end with periods, as in This patch adds support for the avnet fx12 minimodule. WRT the subject line, the v2 should go *inside* the [PATCH v2] so it doesn't get included in the git repository comment. Signed-off-by: schardt [EMAIL PROTECTED] Signed-off-by: Ricardo Ribalda Delgado [EMAIL PROTECTED] --- Put your remarks here. MAINTAINERS |4 + MAKEALL |1 + Makefile | 18 + board/avnet/fx12mm/.gitignore|1 + board/avnet/fx12mm/Makefile | 27 +++ board/avnet/fx12mm/config.mk | 26 +++ board/avnet/fx12mm/fx12mm.c | 52 + board/avnet/fx12mm/init.S| 32 board/avnet/fx12mm/u-boot.lds| 149 ++ board/avnet/fx12mm/xparameters.h | 51 + include/configs/fx12mm.h | 72 ++ [snip] The bike shed is blue today. Thanks, gvb -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkj/Hl0ACgkQUicxT/v10ZuYQwCdFQ4wFp4N2lyeTy01PPpEHnjd kGgAniHDR2OxkXkbljMi/EU+5vKvVK9p =n6XX -END PGP SIGNATURE- ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] at91: board specific lowlevel_init.S
On 13:12 Wed 22 Oct , Ilko Iliev wrote: Dear Mr. Denk, Dear Ilko Iliev, In message [EMAIL PROTECTED] you wrote: Maybe instead of adding mor #ifdef'ery here, we can turn lowlevel_init() into a weak function that can be redefined by board specific code? The lowlevel_init() is an assembler function called from another assembler function and the attribute .weak doesn't work. What do you mean by attribute .weak doesn't work ? There are no assembler file in the U-BOOT tree which use weak functions. Do you know how can I make an assembler function weak? Well, if you don't know, then don't ask me, ask your compiler - he knows how to do this. For example, common/cmd_boot.c has this code snippet right at the beginning: 30 31 /* Allow ports to override the default behavior */ 32 __attribute__((weak)) 33 unsigned long do_go_exec (ulong (*entry)(int, char *[]), int argc, char *argv[]) 34 { 35 return entry (argc, argv); 36 } Compile this with -S option, and you get this: 12 .Ltext0: 13 .align 2 14 .weak do_go_exec 15 .type do_go_exec, @function 16 do_go_exec: 17 .LFB87: 18 .file 1 cmd_boot.c 19 .loc 1 34 0 20 .LVL0: 21 mflr 0 22 .LCFI0: 23 stwu 1,-16(1) ... So to me it seems as if the attribute .weak is supposed to work just fine. What exactly is not working for you? With .weak lowlevel_init the function is marked as weak (I can see this in the ELF file) but it is not overwritten from the another lowlevel_init(). try .weak __default_lowlevel_init = lowlevel_init IIRC Best Regards, J. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] [ARM] Move machine specific code to board at s3c64xx
On 14:16 Wed 22 Oct , Kyungmin Park wrote: Move machine specific code to smdk6400. Some board use OneNAND instead of NAND. Signed-off-by: Kyungmin Park [EMAIL PROTECTED] --- diff --git a/board/samsung/smdk6400/lowlevel_init.S b/board/samsung/smdk6400/lowlevel_init.S Guennadi could you test it? Best Regards, J. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] ppc4xx: New board avnet fx12 minimodule v2
Georg Schardt wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Jerry, thx for your comments, i will pay attention on the right patch format the next time. It is my first project I send patches to and until now, git is not my best friend. Oh, but it will be. ;-) Git and open source development is optimized for getting something done and relying on the rest of the world (list) to critique the changes to get things done right. Note that this isn't just mentoring, it goes beyond correcting minor mistakes and becomes that magic known as *collaboration.* In my day job, our change control system is optimized to get things done right: it spends an enormous amount of energy (and money) to prevent anything wrong from being done. While this is intuitive and appeals to the PHBs, the actual effect is that the change management system is optimized to *prevent* change. If nothing changes, nothing will break (worse), therefore it is optimal, assuming the proper definition of optimal. Aaargh! Sorry for my poor english, it is not my native language and i dont know that this is a problem here. To my shame, your English is a far cry better than my German, so you have nothing to apologize for there. Your English isn't a big problem. I mainly threw it in because I was critiquing other stuff. OTOH, if nobody corrects errors (English, comments, content), nobody would learn how to do things better. Georg Best regards, gvb ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] at91: board specific lowlevel_init.S
Jean-Christophe PLAGNIOL-VILLARD wrote: On 13:12 Wed 22 Oct , Ilko Iliev wrote: Dear Mr. Denk, Dear Ilko Iliev, In message [EMAIL PROTECTED] you wrote: Maybe instead of adding mor #ifdef'ery here, we can turn lowlevel_init() into a weak function that can be redefined by board specific code? The lowlevel_init() is an assembler function called from another assembler function and the attribute .weak doesn't work. What do you mean by attribute .weak doesn't work ? There are no assembler file in the U-BOOT tree which use weak functions. Do you know how can I make an assembler function weak? Well, if you don't know, then don't ask me, ask your compiler - he knows how to do this. For example, common/cmd_boot.c has this code snippet right at the beginning: 30 31 /* Allow ports to override the default behavior */ 32 __attribute__((weak)) 33 unsigned long do_go_exec (ulong (*entry)(int, char *[]), int argc, char *argv[]) 34 { 35 return entry (argc, argv); 36 } Compile this with -S option, and you get this: 12 .Ltext0: 13 .align 2 14 .weak do_go_exec 15 .type do_go_exec, @function 16 do_go_exec: 17 .LFB87: 18 .file 1 cmd_boot.c 19 .loc 1 34 0 20 .LVL0: 21 mflr 0 22 .LCFI0: 23 stwu 1,-16(1) ... So to me it seems as if the attribute .weak is supposed to work just fine. What exactly is not working for you? With .weak lowlevel_init the function is marked as weak (I can see this in the ELF file) but it is not overwritten from the another lowlevel_init(). try .weak __default_lowlevel_init = lowlevel_init I tried and the result is: lowlevel_init.S:32: Error: junk at end of line, first unrecognized character is `=' I' using arm-elf-gcc 4.1.1 -- Mit freundlichen Grüßen/With best regards, Ilko Iliev Ronetix Development Tools GmbH CPU Modules, JTAG/BDM Emulators and Flash Programmers Waidhausenstrasse 13/5, 1140 Vienna, Austria E-Mail: [EMAIL PROTECTED]; Web: www.ronetix.at ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] mtd/dataflash.c: fix a problem with the last partition
This patch fix the problem that only the [NB_DATAFLASH_AREA -1] dataflash partition can be defined to use the area to the end of dataflash size. Now it is possible to have only one dataflash partition from 0 to the end of of dataflash size. Signed-off-by: Ilko Iliev [EMAIL PROTECTED] index 201e518..43746e7 100644 --- a/drivers/mtd/dataflash.c +++ b/drivers/mtd/dataflash.c @@ -131,7 +131,7 @@ int AT91F_DataflashInit (void) break; } /* set the last area end to the dataflash size*/ - area_list[NB_DATAFLASH_AREA -1].end = + dataflash_info[i].end_address = (dataflash_info[i].Device.pages_number * dataflash_info[i].Device.pages_size)-1; @@ -146,7 +146,7 @@ int AT91F_DataflashInit (void) if(area_list[part].end == 0x) { dataflash_info[i].Device.area_list[j].end = dataflash_info[i].end_address + - dataflash_info [i].logical_address; + dataflash_info[i].logical_address; last_part = 1; } else { dataflash_info[i].Device.area_list[j].end = -- Mit freundlichen Grüßen/With best regards, Ilko Iliev Ronetix Development Tools GmbH CPU Modules, JTAG/BDM Emulators and Flash Programmers Waidhausenstrasse 13/5, 1140 Vienna, Austria E-Mail: [EMAIL PROTECTED]; Web: www.ronetix.at ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] lcd: print custom strings after the logo
Jean-Christophe PLAGNIOL-VILLARD wrote: On 21:40 Tue 21 Oct , Wolfgang Denk wrote: Dear Stelian Pop, In message [EMAIL PROTECTED] you wrote: +#ifndef CONFIG_LCD_LOGO_TEXT1 +# define CONFIG_LCD_LOGO_TEXT1 (C) 2008 ATMEL Corp +#endif Wouldn't it be better if we move this text into include/configs/at91xxx.h for all the boards ? Yes, please. Anatolij, Jean-Christophe - who of you will be taking care of this? I'm reveiwing at91 now so if Anatolij see no problem I'll take care of this no problem, it is Ok with me. Best regards, Anatolij ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] at91: board specific lowlevel_init.S
Jean-Christophe PLAGNIOL-VILLARD wrote: On 15:07 Wed 22 Oct , Ilko Iliev wrote: Jean-Christophe PLAGNIOL-VILLARD wrote: On 13:12 Wed 22 Oct , Ilko Iliev wrote: Dear Mr. Denk, Dear Ilko Iliev, In message [EMAIL PROTECTED] you wrote: Maybe instead of adding mor #ifdef'ery here, we can turn lowlevel_init() into a weak function that can be redefined by board specific code? The lowlevel_init() is an assembler function called from another assembler function and the attribute .weak doesn't work. What do you mean by attribute .weak doesn't work ? There are no assembler file in the U-BOOT tree which use weak functions. Do you know how can I make an assembler function weak? Well, if you don't know, then don't ask me, ask your compiler - he knows how to do this. For example, common/cmd_boot.c has this code snippet right at the beginning: 30 31 /* Allow ports to override the default behavior */ 32 __attribute__((weak)) 33 unsigned long do_go_exec (ulong (*entry)(int, char *[]), int argc, char *argv[]) 34 { 35 return entry (argc, argv); 36 } Compile this with -S option, and you get this: 12 .Ltext0: 13 .align 2 14 .weak do_go_exec 15 .type do_go_exec, @function 16 do_go_exec: 17 .LFB87: 18 .file 1 cmd_boot.c 19 .loc 1 34 0 20 .LVL0: 21 mflr 0 22 .LCFI0: 23 stwu 1,-16(1) ... So to me it seems as if the attribute .weak is supposed to work just fine. What exactly is not working for you? With .weak lowlevel_init the function is marked as weak (I can see this in the ELF file) but it is not overwritten from the another lowlevel_init(). try I tried and the result is: lowlevel_init.S:32: Error: junk at end of line, first unrecognized character is `=' sorry try this .global __default_lowlevel_init . .weak lowlevel_init .setlowlevel_init,__default_lowlevel_init after in the other asm .global lowlevel_init ... Best Regards, J. Still doesn't work - the lowlevel_init is weak, but not overwritten. It works only if the second (strong) function is in the same archive. Maybe this is a bug of the linker. -- Mit freundlichen Grüßen/With best regards, Ilko Iliev Ronetix Development Tools GmbH CPU Modules, JTAG/BDM Emulators and Flash Programmers Waidhausenstrasse 13/5, 1140 Vienna, Austria E-Mail: [EMAIL PROTECTED]; Web: www.ronetix.at ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2] pci: Allow for PCI addresses to be 64-bit
PCI bus is inherently 64-bit. While not all system require access to the full 64-bit PCI address range some do. This allows those systems to enable the full PCI address width via CONFIG_SYS_PCI_64BIT. Signed-off-by: Kumar Gala [EMAIL PROTECTED] --- Fixed up all the other bits associated with 64-bit PCI support. - k drivers/pci/pci.c | 37 ++ drivers/pci/pci_auto.c | 67 +-- include/pci.h | 40 +--- 3 files changed, 91 insertions(+), 53 deletions(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 41780db..d13a57e 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -218,12 +218,12 @@ pci_dev_t pci_find_device(unsigned int vendor, unsigned int device, int index) * */ -unsigned long pci_hose_phys_to_bus (struct pci_controller *hose, +pci_addr_t pci_hose_phys_to_bus (struct pci_controller *hose, phys_addr_t phys_addr, unsigned long flags) { struct pci_region *res; - unsigned long bus_addr; + pci_addr_t bus_addr; int i; if (!hose) { @@ -252,7 +252,7 @@ Done: } phys_addr_t pci_hose_bus_to_phys(struct pci_controller* hose, -unsigned long bus_addr, +pci_addr_t bus_addr, unsigned long flags) { struct pci_region *res; @@ -288,15 +288,17 @@ Done: int pci_hose_config_device(struct pci_controller *hose, pci_dev_t dev, unsigned long io, - unsigned long mem, + pci_addr_t mem, unsigned long command) { - unsigned int bar_response, bar_size, bar_value, old_command; + unsigned int bar_response, old_command; + pci_addr_t bar_value; + pci_size_t bar_size; unsigned char pin; int bar, found_mem64; - debug (PCI Config: I/O=0x%lx, Memory=0x%lx, Command=0x%lx\n, - io, mem, command); + debug (PCI Config: I/O=0x%lx, Memory=0x%llx, Command=0x%lx\n, + io, (u64)mem, command); pci_hose_write_config_dword (hose, dev, PCI_COMMAND, 0); @@ -319,10 +321,19 @@ int pci_hose_config_device(struct pci_controller *hose, io = io + bar_size; } else { if ((bar_response PCI_BASE_ADDRESS_MEM_TYPE_MASK) == - PCI_BASE_ADDRESS_MEM_TYPE_64) - found_mem64 = 1; + PCI_BASE_ADDRESS_MEM_TYPE_64) { + u32 bar_response_upper; + u64 bar64; + pci_hose_write_config_dword(hose, dev, bar+4, 0x); + pci_hose_read_config_dword(hose, dev, bar+4, bar_response_upper); - bar_size = ~(bar_response PCI_BASE_ADDRESS_MEM_MASK) + 1; + bar64 = ((u64)bar_response_upper 32) | bar_response; + + bar_size = ~(bar64 PCI_BASE_ADDRESS_MEM_MASK) + 1; + found_mem64 = 1; + } else { + bar_size = (u32)(~(bar_response PCI_BASE_ADDRESS_MEM_MASK) + 1); + } /* round up region base address to multiple of size */ mem = ((mem - 1) | (bar_size - 1)) + 1; @@ -332,11 +343,15 @@ int pci_hose_config_device(struct pci_controller *hose, } /* Write it out and update our limit */ - pci_hose_write_config_dword (hose, dev, bar, bar_value); + pci_hose_write_config_dword (hose, dev, bar, (u32)bar_value); if (found_mem64) { bar += 4; +#ifdef CONFIG_SYS_PCI_64BIT + pci_hose_write_config_dword(hose, dev, bar, bar_value32); +#else pci_hose_write_config_dword (hose, dev, bar, 0x); +#endif } } diff --git a/drivers/pci/pci_auto.c b/drivers/pci/pci_auto.c index 3844359..c347e82 100644 --- a/drivers/pci/pci_auto.c +++ b/drivers/pci/pci_auto.c @@ -45,14 +45,14 @@ void pciauto_region_init(struct pci_region* res) res-bus_lower = res-bus_start ? res-bus_start : 0x1000; } -void pciauto_region_align(struct pci_region *res, unsigned long size) +void pciauto_region_align(struct pci_region *res, pci_size_t size) { res-bus_lower = ((res-bus_lower - 1) | (size - 1)) + 1; } -int pciauto_region_allocate(struct pci_region* res, unsigned int size, unsigned int *bar) +int pciauto_region_allocate(struct pci_region* res, pci_size_t size, pci_addr_t *bar) { - unsigned long addr; + pci_addr_t addr; if
Re: [U-Boot] [PATCH 3/3] iMX31: Add support to iMX31PDK board boots from NAND Flash
Hi Jean, On Wed, 2008-10-22 at 11:59 +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: On 15:01 Tue 07 Oct , Alan Carvalho de Assis wrote: From ae5af322e53d00d021f6d4aa39c6916e1d3e12b7 Mon Sep 17 00:00:00 2001 From: Alan Carvalho de Assis [EMAIL PROTECTED] Date: Sun, 5 Oct 2008 20:00:59 -0300 Subject: [PATCH] iMX31: Add support to iMX31PDK board boots from NAND Flash This patch adds support to iMX31PDK board to boot directly from NAND Flash. In order to it works the previous patches (which reduces start.S size and copy NAND code to RAM) need be applied first. Signed-off-by: Alan Carvalho de Assis [EMAIL PROTECTED] --- board/freescale/mx31pdk/lowlevel_init.S | 95 +- board/freescale/mx31pdk/u-boot.lds |3 + include/configs/mx31pdk.h | 16 -- 3 files changed, 105 insertions(+), 9 deletions(-) Please rebase against u-boot-arm/master otherwhise ACK execpt some whitespace see comment below Best Regards, J. diff --git a/board/freescale/mx31pdk/lowlevel_init.S b/board/freescale/mx31pdk/lowlevel_init.S index a94ea7f..71ab612 100644 --- a/board/freescale/mx31pdk/lowlevel_init.S +++ b/board/freescale/mx31pdk/lowlevel_init.S @@ -20,11 +20,98 @@ * MA 02111-1307 USA */ -/* - * This is just to keep the linker happy. - */ +#include asm/arch/mx31-regs.h + +.macro REG reg, val + ldr r2, =\reg + ldr r3, =\val + str r3, [r2] +.endm + +.macro REG8 reg, val + ldr r2, =\reg + ldr r3, =\val + strb r3, [r2] +.endm + +.macro DELAY loops + ldr r2, =\loops +1: + subsr2, r2, #1 + nop + bcs 1b +.endm .globl lowlevel_init lowlevel_init: - mov pc, lr + /* Store return address on the stack since lr is re-used in this file */ + /* and all other registers are re-used as well */ + str lr, [sp] + + /* Also setup the Peripheral Port Remap register inside the core */ + ldr r0, =ARM_PPMRR/* start from AIPS 2GB region */ please use tab + mcr p15, 0, r0, c15, c2, 4 + + REG IPU_CONF, IPU_CONF_DI_EN + REG CCM_CCMR, 0x074B0BF5 + + DELAY 0x4 + + REG CCM_CCMR, 0x074B0BF5 | CCMR_MPE + REG CCM_CCMR, (0x074B0BF5 | CCMR_MPE) ~CCMR_MDS + + /* Set up clock to 532MHz */ + REG CCM_PDR0, 0xFF871D58 + REG CCM_MPCTL, 0x0033280C + REG CCM_SPCTL, PLL_PD(1) | PLL_MFD(4) | PLL_MFI(12) | PLL_MFN(1) + + /* Set up CPLD on CS5 */ + REG CSCR_U(5), 0xD843 + REG CSCR_L(5), 0x22252521 + REG CSCR_A(5), 0x0A00 + + /* Set up MX31 DDR Memory Controller */ + REG 0x43FAC26C, 0 /* SDCLK */ + REG 0x43FAC270, 0 /* CAS */ + REG 0x43FAC274, 0 /* RAS */ + REG 0x43FAC27C, 0x1000 /* CS2 CSD0) */ + REG 0x43FAC284, 0 /* DQM3 */ + REG 0x43FAC288, 0 /* DQM2, DQM1, DQM0, SD31-SD0, A25-A0, MA10 0x288..0x2DC) */ + REG 0x43FAC28C, 0 + REG 0x43FAC290, 0 + REG 0x43FAC294, 0 + REG 0x43FAC298, 0 + REG 0x43FAC29C, 0 + REG 0x43FAC2A0, 0 + REG 0x43FAC2A4, 0 + REG 0x43FAC2A8, 0 + REG 0x43FAC2AC, 0 + REG 0x43FAC2B0, 0 + REG 0x43FAC2B4, 0 + REG 0x43FAC2B8, 0 + REG 0x43FAC2BC, 0 + REG 0x43FAC2C0, 0 + REG 0x43FAC2C4, 0 + REG 0x43FAC2C8, 0 + REG 0x43FAC2CC, 0 + REG 0x43FAC2D0, 0 + REG 0x43FAC2D4, 0 + REG 0x43FAC2D8, 0 + REG 0x43FAC2DC, 0 + REG 0xB8001010, 0x0004 + REG 0xB8001004, 0x006ac73a + REG 0xB8001000, 0x9210 + REG 0x8f00, 0x12344321 + REG 0xB8001000, 0xa210 + REG 0x8000, 0x12344321 + REG 0x8000, 0x12344321 + REG 0xB8001000, 0xb210 + REG80x8033, 0xda + REG80x8100, 0xff + REG 0xB8001000, 0x82226080 + REG 0x8000, 0xDEADBEEF + REG 0xB8001010, 0x000c + + /* Copy from NAND to RAM */ + b nand_copy diff --git a/board/freescale/mx31pdk/u-boot.lds b/board/freescale/mx31pdk/u-boot.lds index 1460adc..8602f3e 100644 --- a/board/freescale/mx31pdk/u-boot.lds +++ b/board/freescale/mx31pdk/u-boot.lds @@ -35,6 +35,9 @@ SECTIONS .text : { cpu/arm1136/start.o (.text) ^^ please use tab + board/freescale/mx31pdk/lowlevel_init.o (.text) ^^ + cpu/arm1136/mx31/nand_copy.o (.text) ^^ + . = 2K; /* lowlevel NAND needs to fit in 2KB of NFC buffer */ ^^ *(.text) ^^ } Best Regards, J. I can't rebase [PATCH 3/3] on u-boot-arm/master because it applies over Magnus Lilja's patch i.MX31: Add basic support for Freescale's i.MX31 PDK board. (968614d8c3f17eb834838de9a390ef4879fb1e77) Can you please pull
Re: [U-Boot] [PATCH] at91: board specific lowlevel_init.S
On 16:01 Wed 22 Oct , Ilko Iliev wrote: Jean-Christophe PLAGNIOL-VILLARD wrote: On 15:07 Wed 22 Oct , Ilko Iliev wrote: Jean-Christophe PLAGNIOL-VILLARD wrote: On 13:12 Wed 22 Oct , Ilko Iliev wrote: Dear Mr. Denk, Dear Ilko Iliev, In message [EMAIL PROTECTED] you wrote: Maybe instead of adding mor #ifdef'ery here, we can turn lowlevel_init() into a weak function that can be redefined by board specific code? The lowlevel_init() is an assembler function called from another assembler function and the attribute .weak doesn't work. What do you mean by attribute .weak doesn't work ? There are no assembler file in the U-BOOT tree which use weak functions. Do you know how can I make an assembler function weak? Well, if you don't know, then don't ask me, ask your compiler - he knows how to do this. For example, common/cmd_boot.c has this code snippet right at the beginning: 30 31 /* Allow ports to override the default behavior */ 32 __attribute__((weak)) 33 unsigned long do_go_exec (ulong (*entry)(int, char *[]), int argc, char *argv[]) 34 { 35 return entry (argc, argv); 36 } Compile this with -S option, and you get this: 12 .Ltext0: 13 .align 2 14 .weak do_go_exec 15 .type do_go_exec, @function 16 do_go_exec: 17 .LFB87: 18 .file 1 cmd_boot.c 19 .loc 1 34 0 20 .LVL0: 21 mflr 0 22 .LCFI0: 23 stwu 1,-16(1) ... So to me it seems as if the attribute .weak is supposed to work just fine. What exactly is not working for you? With .weak lowlevel_init the function is marked as weak (I can see this in the ELF file) but it is not overwritten from the another lowlevel_init(). try I tried and the result is: lowlevel_init.S:32: Error: junk at end of line, first unrecognized character is `=' sorry try this .global __default_lowlevel_init . .weak lowlevel_init .setlowlevel_init,__default_lowlevel_init after in the other asm .global lowlevel_init ... Best Regards, J. Still doesn't work - the lowlevel_init is weak, but not overwritten. It works only if the second (strong) function is in the same archive. Maybe this is a bug of the linker. Do you specify that the 2 is type func Best Regards, J. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] U-Boot 1.3.3 - Error: start address not on sector boundary
I'm running this on a Coldfire (MCF5484) processor for Linux 2.6.25. I've got 64MB of Intel P33 flash. I have two chips that have their chip selects tied together to give me 32 bit read/write. flinfo shows: Bank # 1: CFI conformant FLASH (32 x 16) Size: 64 MB in 259 SectorsEC Intel Extended command set, Manufacturer ID: 0x89, Device ID: 0x22 Erase timeout: 4096 ms, write timeout: 1 ms Buffer write timeout: 2 ms, buffer size: 64 bytes addr_first: 0xfc002000 Sector Start Addresses:0 FC00 RO FC01 RO FC02 RO FC03 RO FC04 RO FC08 RO FC0C RO FC10 RO FC14 RO FC18 RO FC1C RO FC20FC24FC28FC2C FC30FC34FC38FC3CFC40 etc Got CS0 set as: #define CFG_CS0_BASE0xFC00 #define CFG_CS0_MASK(((CFG_BOOTSZ 20) - 1) 0x0001) #define CFG_CS0_CTRL0x2500 This chips first four sectors are 32K (the rest are 128K). The CFG_ENV_SECT_SIZE is set to 0x2000. However if I change it to 32K I get errors. On top of that the sector boundaries look fine in flinfo. I put in some debug to see more about the error and I get: - save Saving Environment to Flash... addr_first: 0xfc002000 info-start[0]: 0xfc00 b_end: 0x Error: start address not on sector boundary Not sure what to do with this. Any help appreciated. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] pci: Allow for PCI addresses to be 64-bit
On Oct 22, 2008, at 9:19 AM, Kumar Gala wrote: PCI bus is inherently 64-bit. While not all system require access to the full 64-bit PCI address range some do. This allows those systems to enable the full PCI address width via CONFIG_SYS_PCI_64BIT. Signed-off-by: Kumar Gala [EMAIL PROTECTED] --- Fixed up all the other bits associated with 64-bit PCI support. guess this is really v3, the next one that fixes some whitespace issues will be v4 - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] at91: board specific lowlevel_init.S
Jean-Christophe PLAGNIOL-VILLARD wrote: On 16:01 Wed 22 Oct , Ilko Iliev wrote: Jean-Christophe PLAGNIOL-VILLARD wrote: On 15:07 Wed 22 Oct , Ilko Iliev wrote: Jean-Christophe PLAGNIOL-VILLARD wrote: On 13:12 Wed 22 Oct , Ilko Iliev wrote: Dear Mr. Denk, Dear Ilko Iliev, In message [EMAIL PROTECTED] you wrote: Maybe instead of adding mor #ifdef'ery here, we can turn lowlevel_init() into a weak function that can be redefined by board specific code? The lowlevel_init() is an assembler function called from another assembler function and the attribute .weak doesn't work. What do you mean by attribute .weak doesn't work ? There are no assembler file in the U-BOOT tree which use weak functions. Do you know how can I make an assembler function weak? Well, if you don't know, then don't ask me, ask your compiler - he knows how to do this. For example, common/cmd_boot.c has this code snippet right at the beginning: 30 31 /* Allow ports to override the default behavior */ 32 __attribute__((weak)) 33 unsigned long do_go_exec (ulong (*entry)(int, char *[]), int argc, char *argv[]) 34 { 35 return entry (argc, argv); 36 } Compile this with -S option, and you get this: 12 .Ltext0: 13 .align 2 14 .weak do_go_exec 15 .type do_go_exec, @function 16 do_go_exec: 17 .LFB87: 18 .file 1 cmd_boot.c 19 .loc 1 34 0 20 .LVL0: 21 mflr 0 22 .LCFI0: 23 stwu 1,-16(1) ... So to me it seems as if the attribute .weak is supposed to work just fine. What exactly is not working for you? With .weak lowlevel_init the function is marked as weak (I can see this in the ELF file) but it is not overwritten from the another lowlevel_init(). try I tried and the result is: lowlevel_init.S:32: Error: junk at end of line, first unrecognized character is `=' sorry try this .global __default_lowlevel_init . .weak lowlevel_init .setlowlevel_init,__default_lowlevel_init after in the other asm .global lowlevel_init ... Best Regards, J. Still doesn't work - the lowlevel_init is weak, but not overwritten. It works only if the second (strong) function is in the same archive. Maybe this is a bug of the linker. Do you specify that the 2 is type func The following variants don't work: Variant A: .globl lowlevel_init .weak lowlevel_init .type lowlevel_init,function lowlevel_init: ... Variant B: .globl __default_lowlevel_init .weaklowlevel_init .setlowlevel_init,__default_lowlevel_init .type __default_lowlevel_init,function lowlevel_init: ... -- Mit freundlichen Grüßen/With best regards, Ilko Iliev Ronetix Development Tools GmbH Waidhausenstrasse 13/5 1140 Vienna, Austria Tel: +43 1 956 3138 Tel: +43 720 500 315 Fax: +43 1 8174 955 3464 E-Mail: [EMAIL PROTECTED] Web: www.ronetix.at VAT: ATU63916016 Ronetix GmbH - 1140 Vienna - Geschäftsführer: Ilko Iliev Registergericht: HG Vienna, FN 304979z ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] pci: Allow for PCI addresses to be 64-bit
On Oct 22, 2008, at 9:19 AM, Kumar Gala wrote: PCI bus is inherently 64-bit. While not all system require access to the full 64-bit PCI address range some do. This allows those systems to enable the full PCI address width via CONFIG_SYS_PCI_64BIT. Signed-off-by: Kumar Gala [EMAIL PROTECTED] --- Fixed up all the other bits associated with 64-bit PCI support. So, this is looking a bit more complete now :) A few minor comments inline. -B - k drivers/pci/pci.c | 37 ++ drivers/pci/pci_auto.c | 67 +-- include/pci.h | 40 +--- 3 files changed, 91 insertions(+), 53 deletions(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 41780db..d13a57e 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c --snip @@ -319,10 +321,19 @@ int pci_hose_config_device(struct pci_controller *hose, io = io + bar_size; } else { if ((bar_response PCI_BASE_ADDRESS_MEM_TYPE_MASK) == - PCI_BASE_ADDRESS_MEM_TYPE_64) - found_mem64 = 1; + PCI_BASE_ADDRESS_MEM_TYPE_64) { + u32 bar_response_upper; + u64 bar64; + pci_hose_write_config_dword(hose, dev, bar+4, 0x); + pci_hose_read_config_dword(hose, dev, bar+4, bar_response_upper); Fix alignment of code. - bar_size = ~(bar_response PCI_BASE_ADDRESS_MEM_MASK) + 1; + bar64 = ((u64)bar_response_upper 32) | bar_response; + + bar_size = ~(bar64 PCI_BASE_ADDRESS_MEM_MASK) + 1; + found_mem64 = 1; + } else { + bar_size = (u32)(~(bar_response PCI_BASE_ADDRESS_MEM_MASK) + 1); + } /* round up region base address to multiple of size */ mem = ((mem - 1) | (bar_size - 1)) + 1; @@ -332,11 +343,15 @@ int pci_hose_config_device(struct pci_controller *hose, } /* Write it out and update our limit */ - pci_hose_write_config_dword (hose, dev, bar, bar_value); + pci_hose_write_config_dword (hose, dev, bar, (u32)bar_value); if (found_mem64) { bar += 4; +#ifdef CONFIG_SYS_PCI_64BIT + pci_hose_write_config_dword(hose, dev, bar, bar_value32); spaces around ? Might want to cast the result to (u32) for consistency. +#else pci_hose_write_config_dword (hose, dev, bar, 0x); +#endif } } diff --git a/drivers/pci/pci_auto.c b/drivers/pci/pci_auto.c index 3844359..c347e82 100644 --- a/drivers/pci/pci_auto.c +++ b/drivers/pci/pci_auto.c @@ -45,14 +45,14 @@ void pciauto_region_init(struct pci_region* res) res-bus_lower = res-bus_start ? res-bus_start : 0x1000; } -void pciauto_region_align(struct pci_region *res, unsigned long size) +void pciauto_region_align(struct pci_region *res, pci_size_t size) { res-bus_lower = ((res-bus_lower - 1) | (size - 1)) + 1; } -int pciauto_region_allocate(struct pci_region* res, unsigned int size, unsigned int *bar) +int pciauto_region_allocate(struct pci_region* res, pci_size_t size, pci_addr_t *bar) { - unsigned long addr; + pci_addr_t addr; if (!res) { DEBUGF(No resource); @@ -68,13 +68,13 @@ int pciauto_region_allocate(struct pci_region* res, unsigned int size, unsigned res-bus_lower = addr + size; - DEBUGF(address=0x%lx bus_lower=%x, addr, res-bus_lower); + DEBUGF(address=0x%llx bus_lower=%llx, (u64)addr, (u64)res- bus_lower); While you're changing this, can we add the 0x to the bus_lower print? *bar = addr; return 0; error: - *bar = 0x; + *bar = (pci_addr_t)-1; return -1; } @@ -88,7 +88,9 @@ void pciauto_setup_device(struct pci_controller *hose, struct pci_region *prefetch, struct pci_region *io) { - unsigned int bar_value, bar_response, bar_size; + unsigned int bar_response; + pci_addr_t bar_value; + pci_size_t bar_size; unsigned int cmdstat = 0; struct pci_region *bar_res; int bar, bar_nr = 0; @@ -114,33 +116,46 @@ void pciauto_setup_device(struct pci_controller *hose, 0x) + 1; bar_res = io; - DEBUGF(PCI Autoconfig: BAR %d, I/O, size=0x%x, , bar_nr, bar_size); + DEBUGF(PCI Autoconfig: BAR %d, I/O, size=0x%llx, , bar_nr, (u64)bar_size); } else {
Re: [U-Boot] Linux does not boot from flash, but will from RAM
Hello Tom Sorry for the late late reply, but you mail was hidden in my inbox. I have been the developer of the avnet v5fx30eval patch for u-boot. I have that board correctly running linux 2.6.27 from the latest paulus git patch. In order to use the ll_temac I have used a modified version of the xilinx driver. On the final design I am running this command to run linux: bootm 0xff20 0xff9a 0xff7eTry placing your data on that areas. If you need more info please ask Best regards BTW: Please add me to the cc next time. On Thu, Oct 9, 2008 at 15:35, Curran, Tom [EMAIL PROTECTED] wrote: I am using u-boot on the Avnet V5FX30T (Xilinx FPGA, PPC440) eval board to boot a Linux 2.6.27-rc4 kernel. I can use u-boot to tftp the kernel, ramdisk, and device tree blob to RAM and boot from there OK. I copied the kernel, ramdisk and blob to flash and verified those elements were programmed in flash correctly with 'iminfo', but when I try to boot from flash the boot process hangs at Loading Ramdisk to 03d59000, end 03ec8f20 ... OK. At this point u-boot will restart (after a WDT-induced reset?) after a few minutes. Interestingly enough, I can boot from flash IF the ramdisk is already in RAM with a bootm $(kernel_flash_addr) $(ramdisk_ram_addr) $(blob_flash_addr). This leads me to believe something is going wrong in the copying of the ramdisk from flash to RAM. Perhaps I am doing something wrong or missed a step somewhere? I have read the FAQ, but have not found anything relevant. Perhaps someone here has had this problem too and can offer a solution? Any help is appreciated. Many thanks in advance! --Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot -- Ricardo Ribalda http://www.eps.uam.es/~rribalda/ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/3] iMX31: Add support to iMX31PDK board boots from NAND Flash
I can't rebase [PATCH 3/3] on u-boot-arm/master because it applies over Magnus Lilja's patch i.MX31: Add basic support for Freescale's i.MX31 PDK board. (968614d8c3f17eb834838de9a390ef4879fb1e77) Can you please pull this patch from u-boot-arm/testing to u-boot-arm/master ? No the patch need to be rebased first. Magnus could you rebase it? It will save me times I've updated the patch and it now almost compiles. There's a problem at the last link stage where gnu-ld complains about multiple __udivsi3 definitions and incompatible EABI formats (see below, modulo gmail wrapping). I can compile the imx31_litekit just fine and that board is very similar to the initial mx31pdk board. Any ideas on what may be causing this? /Magnus UNDEF_SYM=`arm-none-linux-gnueabi-objdump -x board/freescale/mx31pdk/libmx31pdk.a lib_generic/libgeneric.a lib_generic/lzma/liblzma.a board/freescale/common/libfreescale.a cpu/arm1136/libarm1136.a cpu/arm1136/mx31/libmx31.a lib_arm/libarm.a fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a fs/yaffs2/libyaffs2.a net/libnet.a disk/libdisk.a drivers/bios_emulator/libatibiosemu.a drivers/block/libblock.a drivers/dma/libdma.a drivers/hwmon/libhwmon.a drivers/i2c/libi2c.a drivers/input/libinput.a drivers/misc/libmisc.a drivers/mmc/libmmc.a drivers/mtd/libmtd.a drivers/mtd/nand/libnand.a drivers/mtd/nand_legacy/libnand_legacy.a drivers/mtd/onenand/libonenand.a drivers/mtd/spi/libspi_flash.a drivers/net/libnet.a drivers/net/phy/libphy.a drivers/net/sk98lin/libsk98lin.a drivers/pci/libpci.a drivers/pcmcia/libpcmcia.a drivers/spi/libspi.a drivers/rtc/librtc.a drivers/serial/libserial.a drivers/usb/libusb.a drivers/video/libvideo.a common/libcommon.a libfdt/libfdt.a api/libapi.a post/libpost.a | \ sed -n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\ cd /opt/git/u-boot arm-none-linux-gnueabi-ld -Bstatic -T /opt/git/u-boot/board/freescale/mx31pdk/u-boot.lds -Ttext 0x87f0 $UNDEF_SYM cpu/arm1136/start.o \ --start-group lib_generic/libgeneric.a lib_generic/lzma/liblzma.a board/freescale/common/libfreescale.a cpu/arm1136/libarm1136.a cpu/arm1136/mx31/libmx31.a lib_arm/libarm.a fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a fs/yaffs2/libyaffs2.a net/libnet.a disk/libdisk.a drivers/bios_emulator/libatibiosemu.a drivers/block/libblock.a drivers/dma/libdma.a drivers/hwmon/libhwmon.a drivers/i2c/libi2c.a drivers/input/libinput.a drivers/misc/libmisc.a drivers/mmc/libmmc.a drivers/mtd/libmtd.a drivers/mtd/nand/libnand.a drivers/mtd/nand_legacy/libnand_legacy.a drivers/mtd/onenand/libonenand.a drivers/mtd/spi/libspi_flash.a drivers/net/libnet.a drivers/net/phy/libphy.a drivers/net/sk98lin/libsk98lin.a drivers/pci/libpci.a drivers/pcmcia/libpcmcia.a drivers/spi/libspi.a drivers/rtc/librtc.a drivers/serial/libserial.a drivers/usb/libusb.a drivers/video/libvideo.a common/libcommon.a libfdt/libfdt.a api/libapi.a post/libpost.a board/freescale/mx31pdk/libmx31pdk.a --end-group -L /opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/lib/gcc/arm-none-linux-gnueabi/4.1.2 -lgcc \ -Map u-boot.map -o u-boot /opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/lib/gcc/arm-none-linux-gnueabi/4.1.2/libgcc.a(_udivsi3.o): In function `__aeabi_uidiv': /usr/src/redhat/BUILD/cross-mlib/source/gcc-4.1.2/gcc/config/arm/lib1funcs.asm:730: multiple definition of `__udivsi3' lib_arm/libarm.a(_udivsi3.o):/opt/git/u-boot/lib_arm/_udivsi3.S:17: first defined here arm-none-linux-gnueabi-ld: Warning: size of symbol `__udivsi3' changed from 152 in lib_arm/libarm.a(_udivsi3.o) to 496 in /opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/lib/gcc/arm-none-linux-gnueabi/4.1.2/libgcc.a(_udivsi3.o) arm-none-linux-gnueabi-ld: ERROR: Source object /opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/lib/gcc/arm-none-linux-gnueabi/4.1.2/libgcc.a(_udivdi3.o) has EABI version 4, but target u-boot has EABI version 0 arm-none-linux-gnueabi-ld: failed to merge target specific data of file /opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/lib/gcc/arm-none-linux-gnueabi/4.1.2/libgcc.a(_udivdi3.o) arm-none-linux-gnueabi-ld: ERROR: Source object /opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/lib/gcc/arm-none-linux-gnueabi/4.1.2/libgcc.a(_udivsi3.o) has EABI version 4, but target u-boot has EABI version 0 arm-none-linux-gnueabi-ld: failed to merge target specific data of file /opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/lib/gcc/arm-none-linux-gnueabi/4.1.2/libgcc.a(_udivsi3.o) arm-none-linux-gnueabi-ld: ERROR: Source object
Re: [U-Boot] [PATCH 3/3] iMX31: Add support to iMX31PDK board boots from NAND Flash
Dear Magnus, In message [EMAIL PROTECTED] you wrote: I've updated the patch and it now almost compiles. There's a problem at the last link stage where gnu-ld complains about multiple __udivsi3 definitions and incompatible EABI formats (see below, modulo gmail wrapping). Try this patch which I posted today: ARM: Use do_div() instead of division for long long. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED] Madness has no purpose. Or reason. But it may have a goal. -- Spock, The Alternative Factor, stardate 3088.7 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/3] iMX31: Add support to iMX31PDK board boots from NAND Flash
Wolfgang, 2008/10/22 Wolfgang Denk [EMAIL PROTECTED]: Dear Magnus, In message [EMAIL PROTECTED] you wrote: I've updated the patch and it now almost compiles. There's a problem at the last link stage where gnu-ld complains about multiple __udivsi3 definitions and incompatible EABI formats (see below, modulo gmail wrapping). Try this patch which I posted today: ARM: Use do_div() instead of division for long long. That patch doesn't seem to touch any files that are involved in building i.MX31 boards. I might try the equivalent change though. Although it is a bit puzzling that I can build the i.MX31 Litekit board with the same toolchain. /Magnus ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] i2c_reg_read() on 8xx
Wolfgang, Mike Frysinger helped me resolve the problem with i2c_reg_read() on Blackfin, so I'll be posting a new patch soon. However, I noticed that 8xx has a problem, too: uchar i2c_reg_read(uchar i2c_addr, uchar reg) { uchar buf; i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); i2c_read(i2c_addr, reg, 1, buf, 1); return (buf); } Is the call to i2c_init() necessary on 8xx boards? Shouldn't I2C have already been initialized? -- Timur Tabi Linux kernel developer at Freescale ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/3] iMX31: Add support to iMX31PDK board boots from NAND Flash
2008/10/22 Magnus Lilja [EMAIL PROTECTED]: Wolfgang, 2008/10/22 Wolfgang Denk [EMAIL PROTECTED]: Dear Magnus, In message [EMAIL PROTECTED] you wrote: I've updated the patch and it now almost compiles. There's a problem at the last link stage where gnu-ld complains about multiple __udivsi3 definitions and incompatible EABI formats (see below, modulo gmail wrapping). Try this patch which I posted today: ARM: Use do_div() instead of division for long long. That patch doesn't seem to touch any files that are involved in building i.MX31 boards. I might try the equivalent change though. Although it is a bit puzzling that I can build the i.MX31 Litekit board with the same toolchain. Ok, I've found what's triggering this. The PDK board has CONFIG_MX31_CLK32=32768 while Litekit has CONIFG_MX31_CLK32=32000. That difference nowadays causes problems when linking, I suppose that happened after the merging of CONFIG_MX31_TIMER_HIGH_PRECISION. Changing the TICK_TO_TIME macro in arm1176/mx31/interrupts.c to a construction that uses do_div() solves the problem. I don't have the PDK schematics here but since I decided to set CLK32 to 32768 I suppose the board uses that frequency. I haven't tried my new patch on real hardware yet, but I'll do that tomorrow and post a patch (without the do_div() fix though, perhaps someone else can do that?). /Magnus ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Flex-OneNAND driver
On Mon, Sep 22, 2008 at 11:58:51AM +0530, apgmoorthy wrote: Hi All, This patch adds support for Samsung Flex-OneNAND devices. Flex-OneNAND combines SLC and MLC technologies into a single device. SLC area provides increased reliability and speed, suitable for storing code and data, such as bootloader, kernel and root file system. MLC area provides high density and is best used for storing user data. Users can configure the size of SLC and MLC regions through 'onenand setboundary' command. Signed-off-by: Rohit Hagargundgi [EMAIL PROTECTED] Sorry for the late reply... extern struct mtd_info onenand_mtd; extern struct onenand_chip onenand_chip; +loff_t flexonenand_get_addr(int block) Space before function declarations. + for (block = start; block = end; block++) { + if (FLEXONENAND(this)) + instr.addr = flexonenand_get_addr(block); + else + instr.addr = block onenand_chip.erase_shift; + + if (FLEXONENAND(this) (mtd-numeraseregions 1)) { + for (i = 0; i mtd-numeraseregions + mtd-eraseregions[i].offset = instr.addr; i++) Patch is line-wrapped. Can some of this be abstracted through the driver interface, rather than putting a bunch of stuff into what should be a relatively straightforward command-line wrapper? Perhaps the two regions should be exposed as separate devices. -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 01/19] ColdFire: Remove linker file
From: TsiChung Liew [EMAIL PROTECTED] Each different build for M54455EVB and M5235EVB will create a u-boot.lds linker file. It is redundant to keep the u-boot.lds Signed-off-by: TsiChung Liew [EMAIL PROTECTED] --- board/freescale/m5235evb/u-boot.lds | 144 -- board/freescale/m54455evb/u-boot.lds | 143 - 2 files changed, 0 insertions(+), 287 deletions(-) delete mode 100644 board/freescale/m5235evb/u-boot.lds delete mode 100644 board/freescale/m54455evb/u-boot.lds diff --git a/board/freescale/m5235evb/u-boot.lds b/board/freescale/m5235evb/u-boot.lds deleted file mode 100644 index c0611b9..000 --- a/board/freescale/m5235evb/u-boot.lds +++ /dev/null @@ -1,144 +0,0 @@ -/* - * (C) Copyright 2000 - * Wolfgang Denk, DENX Software Engineering, [EMAIL PROTECTED] - * - * 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 - */ - -OUTPUT_ARCH(m68k) -/* Do we need any of these for elf? - __DYNAMIC = 0;*/ -SECTIONS -{ - /* Read-only sections, merged into text segment: */ - . = + SIZEOF_HEADERS; - .interp : { *(.interp) } - .hash : { *(.hash) } - .dynsym: { *(.dynsym)} - .dynstr: { *(.dynstr)} - .rel.text : { *(.rel.text) } - .rela.text : { *(.rela.text) } - .rel.data : { *(.rel.data) } - .rela.data : { *(.rela.data) } - .rel.rodata: { *(.rel.rodata)} - .rela.rodata : { *(.rela.rodata) } - .rel.got : { *(.rel.got) } - .rela.got : { *(.rela.got) } - .rel.ctors : { *(.rel.ctors) } - .rela.ctors: { *(.rela.ctors)} - .rel.dtors : { *(.rel.dtors) } - .rela.dtors: { *(.rela.dtors)} - .rel.bss : { *(.rel.bss) } - .rela.bss : { *(.rela.bss) } - .rel.plt : { *(.rel.plt) } - .rela.plt : { *(.rela.plt) } - .init : { *(.init) } - .plt : { *(.plt) } - .text : - { -/* WARNING - the following is hand-optimized to fit within */ -/* the sector layout of our flash chips! XXX FIXME XXX */ - -cpu/mcf523x/start.o(.text) -cpu/mcf523x/cpu_init.o (.text) -lib_m68k/traps.o (.text) -lib_m68k/interrupts.o (.text) -common/dlmalloc.o (.text) -lib_generic/zlib.o (.text) - -. = DEFINED(env_offset) ? env_offset : .; -common/env_embedded.o (.text) - -*(.text) -*(.fixup) -*(.got1) - } - _etext = .; - PROVIDE (etext = .); - .rodata: - { -*(.rodata) -*(.rodata1) - } - .fini : { *(.fini)} =0 - .ctors : { *(.ctors) } - .dtors : { *(.dtors) } - - /* Read-write section, merged into data segment: */ - . = (. + 0x00FF) 0xFF00; - _erotext = .; - PROVIDE (erotext = .); - - .reloc : - { -__got_start = .; -*(.got) -__got_end = .; -_GOT2_TABLE_ = .; -*(.got2) -_FIXUP_TABLE_ = .; -*(.fixup) - } - __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) 2; - __fixup_entries = (. - _FIXUP_TABLE_)2; - - .data: - { -*(.data) -*(.data1) -*(.sdata) -*(.sdata2) -*(.dynamic) -CONSTRUCTORS - } - _edata = .; - PROVIDE (edata = .); - - . = .; - __u_boot_cmd_start = .; - .u_boot_cmd : { *(.u_boot_cmd) } - __u_boot_cmd_end = .; - - - . = .; - __start___ex_table = .; - __ex_table : { *(__ex_table) } - __stop___ex_table = .; - - . = ALIGN(256); - __init_begin = .; - .text.init : { *(.text.init) } - .data.init : { *(.data.init) } - . = ALIGN(256); - __init_end = .; - - __bss_start = .; - .bss (NOLOAD) : - { - _sbss = .; - *(.sbss) *(.scommon) - *(.dynbss) - *(.bss) - *(COMMON) - . = ALIGN(4); - _ebss = .; - } - _end = . ; - PROVIDE (end = .); -} diff --git a/board/freescale/m54455evb/u-boot.lds b/board/freescale/m54455evb/u-boot.lds deleted file mode 100644 index bcf30c3..000 --- a/board/freescale/m54455evb/u-boot.lds +++ /dev/null @@ -1,143 +0,0 @@ -/* - * (C) Copyright 2000 - * Wolfgang Denk, DENX Software Engineering, [EMAIL PROTECTED] - * - * See file CREDITS for list of people who
[U-Boot] [PATCH 02/19] ColdFire: Modules header files cleanup - 1
From: TsiChung Liew [EMAIL PROTECTED] Consolidate ATA, ePORT and QSPI structures and definitions in immap_5xxx.h to more unify modules header files. Append DSPI support for m547x_8x. Signed-off-by: TsiChung Liew [EMAIL PROTECTED] --- include/asm-m68k/coldfire/ata.h | 79 + include/asm-m68k/coldfire/dspi.h | 15 ++-- include/asm-m68k/coldfire/eport.h | 139 + include/asm-m68k/coldfire/qspi.h | 111 + include/asm-m68k/immap_5227x.h| 11 +--- include/asm-m68k/immap_5235.h | 19 + include/asm-m68k/immap_5249.h |2 + include/asm-m68k/immap_5253.h | 54 +-- include/asm-m68k/immap_5271.h |3 + include/asm-m68k/immap_5272.h | 16 include/asm-m68k/immap_5275.h | 20 +- include/asm-m68k/immap_5282.h |3 + include/asm-m68k/immap_5329.h | 29 +--- include/asm-m68k/immap_5445x.h| 62 + include/asm-m68k/immap_547x_8x.h |2 + include/asm-m68k/m5235.h | 91 include/asm-m68k/m5329.h | 51 -- include/asm-m68k/m5445x.h | 90 18 files changed, 359 insertions(+), 438 deletions(-) create mode 100644 include/asm-m68k/coldfire/ata.h create mode 100644 include/asm-m68k/coldfire/eport.h create mode 100644 include/asm-m68k/coldfire/qspi.h diff --git a/include/asm-m68k/coldfire/ata.h b/include/asm-m68k/coldfire/ata.h new file mode 100644 index 000..3efd03a --- /dev/null +++ b/include/asm-m68k/coldfire/ata.h @@ -0,0 +1,79 @@ +/* + * ATA Internal Memory Map + * + * Copyright (C) 2004-2008 Freescale Semiconductor, Inc. + * TsiChung Liew ([EMAIL PROTECTED]) + * + * 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 __ATA_H__ +#define __ATA_H__ + +/* ATA */ +typedef struct atac { + /* PIO */ + u8 toff;/* 0x00 */ + u8 ton; /* 0x01 */ + u8 t1; /* 0x02 */ + u8 t2w; /* 0x03 */ + u8 t2r; /* 0x04 */ + u8 ta; /* 0x05 */ + u8 trd; /* 0x06 */ + u8 t4; /* 0x07 */ + u8 t9; /* 0x08 */ + + /* DMA */ + u8 tm; /* 0x09 */ + u8 tn; /* 0x0A */ + u8 td; /* 0x0B */ + u8 tk; /* 0x0C */ + u8 tack;/* 0x0D */ + u8 tenv;/* 0x0E */ + u8 trp; /* 0x0F */ + u8 tzah;/* 0x10 */ + u8 tmli;/* 0x11 */ + u8 tdvh;/* 0x12 */ + u8 tdzfs; /* 0x13 */ + u8 tdvs;/* 0x14 */ + u8 tcvh;/* 0x15 */ + u8 tss; /* 0x16 */ + u8 tcyc;/* 0x17 */ + + /* FIFO */ + u32 fifo32; /* 0x18 */ + u16 fifo16; /* 0x1C */ + u8 rsvd0[2]; + u8 ffill; /* 0x20 */ + u8 rsvd1[3]; + + /* ATA */ + u8 cr; /* 0x24 */ + u8 rsvd2[3]; + u8 isr; /* 0x28 */ + u8 rsvd3[3]; + u8 ier; /* 0x2C */ + u8 rsvd4[3]; + u8 icr; /* 0x30 */ + u8 rsvd5[3]; + u8 falarm; /* 0x34 */ + u8 rsvd6[106]; +} atac_t; + +#endif /* __ATA_H__ */ diff --git a/include/asm-m68k/coldfire/dspi.h b/include/asm-m68k/coldfire/dspi.h index 8327e1b..4b7d61e 100644 --- a/include/asm-m68k/coldfire/dspi.h +++ b/include/asm-m68k/coldfire/dspi.h @@ -46,15 +46,14 @@ typedef struct dspi { u32 dirsr; u32 dtfr; u32 drfr; - u32 dtfdr0; - u32 dtfdr1; - u32 dtfdr2; - u32 dtfdr3; +#ifdef CONFIG_MCF547x_8x + u32 dtfdr[4]; u8 resv1[0x30]; - u32 drfdr0; - u32 drfdr1; - u32 drfdr2; - u32 drfdr3; + u32 drfdr[4]; +#else + u32 dtfdr[16]; + u32 drfdr[16]; +#endif } dspi_t; /* Bit definitions and macros for DMCR */ diff --git
[U-Boot] [PATCH 04/19] ColdFire: Modules header files cleanup - 3
From: TsiChung Liew [EMAIL PROTECTED] Consolidate RNG, MDHA and SKHA structures and definitions in immap_5xxx.h and m5xxx.h to more unify modules header files. SSI cleanup. Remove USB Host structure from immap_5329.h Signed-off-by: TsiChung Liew [EMAIL PROTECTED] --- include/asm-m68k/coldfire/mdha.h | 102 include/asm-m68k/coldfire/rng.h | 52 include/asm-m68k/coldfire/skha.h | 121 ++ include/asm-m68k/coldfire/ssi.h | 66 +--- include/asm-m68k/immap_5235.h|3 + include/asm-m68k/immap_5271.h|3 + include/asm-m68k/immap_5275.h|3 + include/asm-m68k/immap_5329.h| 116 +--- include/asm-m68k/immap_5445x.h |8 --- include/asm-m68k/m5445x.h| 18 -- 10 files changed, 316 insertions(+), 176 deletions(-) create mode 100644 include/asm-m68k/coldfire/mdha.h create mode 100644 include/asm-m68k/coldfire/rng.h create mode 100644 include/asm-m68k/coldfire/skha.h diff --git a/include/asm-m68k/coldfire/mdha.h b/include/asm-m68k/coldfire/mdha.h new file mode 100644 index 000..b698136 --- /dev/null +++ b/include/asm-m68k/coldfire/mdha.h @@ -0,0 +1,102 @@ +/* + * Message Digest Hardware Accelerator Memory Map + * + * Copyright (C) 2004-2008 Freescale Semiconductor, Inc. + * TsiChung Liew ([EMAIL PROTECTED]) + * + * 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 __MDHA_H__ +#define __MDHA_H__ + +/* Message Digest Hardware Accelerator */ +typedef struct mdha_ctrl { + u32 mr; /* 0x00 MDHA Mode */ + u32 cr; /* 0x04 Control */ + u32 cmd;/* 0x08 Command */ + u32 sr; /* 0x0C Status */ + u32 isr;/* 0x10 Interrupt Status */ + u32 imr;/* 0x14 Interrupt Mask */ + u32 dsz;/* 0x1C Data Size */ + u32 inp;/* 0x20 Input FIFO */ + u32 res1[3];/* 0x24 - 0x2F */ + u32 mda0; /* 0x30 Message Digest AO */ + u32 mdb0; /* 0x34 Message Digest BO */ + u32 mdc0; /* 0x38 Message Digest CO */ + u32 mdd0; /* 0x3C Message Digest DO */ + u32 mde0; /* 0x40 Message Digest EO */ + u32 mdsz; /* 0x44 Message Data Size */ + u32 res[10];/* 0x48 - 0x6F */ + u32 mda1; /* 0x70 Message Digest A1 */ + u32 mdb1; /* 0x74 Message Digest B1 */ + u32 mdc1; /* 0x78 Message Digest C1 */ + u32 mdd1; /* 0x7C Message Digest D1 */ + u32 mde1; /* 0x80 Message Digest E1 */ +} mdha_t; + +#define MDHA_MR_SSL(0x0400) +#define MDHA_MR_MACFUL (0x0200) +#define MDHA_MR_SWAP (0x0100) +#define MDHA_MR_OPAD (0x0080) +#define MDHA_MR_IPAD (0x0040) +#define MDHA_MR_INIT (0x0020) +#define MDHA_MR_MAC(x) (((x) 0x03) 3) +#define MDHA_MR_MAC_MASK (0xFFE7) +#define MDHA_MR_MAC_EHMAC (0x0010) +#define MDHA_MR_MAC_HMAC (0x0008) +#define MDHA_MR_MAC_NONE (0x) +#define MDHA_MR_PDATA (0x0004) +#define MDHA_MR_ALG(0x0001) + +#define MDHA_CR_DMAL(x)(((x) 0x1F) 16)/* 532x */ +#define MDHA_CR_DMAL_MASK (0xFFE0)/* 532x */ +#define MDHA_CR_END(0x0004)/* 532x */ +#define MDHA_CR_DMA(0x0002)/* 532x */ +#define MDHA_CR_IE (0x0001) + +#define MDHA_CMD_GO(0x0008) +#define MDHA_CMD_CI(0x0004) +#define MDHA_CMD_RI(0x0001) +#define MDHA_CMD_SWR (0x0001) + +#define MDHA_SR_IFL(x) (((x) 0xFF) 16) +#define MDHA_SR_IFL_MASK (0xFF00) +#define MDHA_SR_APD(x) (((x) 0x7) 13) +#define MDHA_SR_APD_MASK (0x1FFF) +#define MDHA_SR_FS(x) (((x) 0x7) 8) +#define MDHA_SR_FS_MASK(0xF8FF) +#define MDHA_SR_GNW(0x0080) +#define
[U-Boot] [PATCH 03/19] ColdFire: Modules header files cleanup - 2
From: TsiChung Liew [EMAIL PROTECTED] Consolidate FlexCan and PWM structures and definitions in immap_5xxx.h and m5xxx.h to more unify modules header files Signed-off-by: TsiChung Liew [EMAIL PROTECTED] --- include/asm-m68k/coldfire/flexcan.h | 219 +++ include/asm-m68k/coldfire/pwm.h | 115 ++ include/asm-m68k/immap_5227x.h |8 ++ include/asm-m68k/immap_5235.h | 24 +--- include/asm-m68k/immap_5253.h | 11 ++- include/asm-m68k/immap_5272.h | 18 +--- include/asm-m68k/immap_5275.h | 18 +--- include/asm-m68k/immap_5282.h |5 + include/asm-m68k/immap_5329.h | 64 +- include/asm-m68k/immap_547x_8x.h|6 + include/asm-m68k/m5235.h| 93 --- include/asm-m68k/m5329.h| 142 -- 12 files changed, 375 insertions(+), 348 deletions(-) create mode 100644 include/asm-m68k/coldfire/flexcan.h create mode 100644 include/asm-m68k/coldfire/pwm.h diff --git a/include/asm-m68k/coldfire/flexcan.h b/include/asm-m68k/coldfire/flexcan.h new file mode 100644 index 000..cafd44f --- /dev/null +++ b/include/asm-m68k/coldfire/flexcan.h @@ -0,0 +1,219 @@ +/* + * Flex CAN Memory Map + * + * Copyright (C) 2004-2007 Freescale Semiconductor, Inc. + * TsiChung Liew ([EMAIL PROTECTED]) + * + * 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 __FLEXCAN_H__ +#define __FLEXCAN_H__ + +/* FlexCan Message Buffer */ +typedef struct can_msgbuf_ctrl { +#ifdef CONFIG_M5282 + u8 tmstamp; /* 0x00 Timestamp */ + u8 ctrl;/* 0x01 Control */ + u16 idh;/* 0x02 ID High */ + u16 idl;/* 0x04 ID High */ + u8 data[8]; /* 0x06 8 Byte Data Field */ + u16 res;/* 0x0E */ +#else + u16 ctrl; /* 0x00 Control/Status */ + u16 tmstamp;/* 0x02 Timestamp */ + u32 id; /* 0x04 Identifier */ + u8 data[8]; /* 0x08 8 Byte Data Field */ +#endif +} can_msg_t; + +#ifdef CONFIG_M5282 +/* MSGBUF CTRL */ +#define CAN_MSGBUF_CTRL_CODE(x)(((x) 0x0F) 4) +#define CAN_MSGBUF_CTRL_CODE_MASK (0x0F) +#define CAN_MSGBUF_CTRL_LEN(x) ((x) 0x0F) +#define CAN_MSGBUF_CTRL_LEN_MASK (0xF0) + +/* MSGBUF ID */ +#define CAN_MSGBUF_IDH_STD(x) (((x) 0x07FF) 5) +#define CAN_MSGBUF_IDH_STD_MASK(0xE003) +#define CAN_MSGBUF_IDH_SRR (0x0010) +#define CAN_MSGBUF_IDH_IDE (0x0080) +#define CAN_MSGBUF_IDH_EXTH(x) ((x) 0x07) +#define CAN_MSGBUF_IDH_EXTH_MASK (0xFFF8) +#define CAN_MSGBUF_IDL_EXTL(x) (((x) 0x7FFF) 1) +#define CAN_MSGBUF_IDL_EXTL_MASK (0xFFFE) +#define CAN_MSGBUF_IDL_RTR (0x0001) +#else +/* MSGBUF CTRL */ +#define CAN_MSGBUF_CTRL_CODE(x)(((x) 0x000F) 8) +#define CAN_MSGBUF_CTRL_CODE_MASK (0xF0FF) +#define CAN_MSGBUF_CTRL_SRR(0x0040) +#define CAN_MSGBUF_CTRL_IDE(0x0020) +#define CAN_MSGBUF_CTRL_RTR(0x0010) +#define CAN_MSGBUF_CTRL_LEN(x) ((x) 0x000F) +#define CAN_MSGBUF_CTRL_LEN_MASK (0xFFF0) + +/* MSGBUF ID */ +#define CAN_MSGBUF_ID_STD(x) (((x) 0x07FF) 18) +#define CAN_MSGBUF_ID_STD_MASK (0xE003) +#define CAN_MSGBUF_ID_EXT(x) ((x) 0x0003) +#define CAN_MSGBUF_ID_EXT_MASK (0xFFFC) +#endif + +/* FlexCan module */ +typedef struct can_ctrl { + u32 mcr;/* 0x00 Module Configuration */ + u32 ctrl; /* 0x04 Control */ + u32 timer; /* 0x08 Free Running Timer */ + u32 res1; /* 0x0C */ + u32 rxgmsk; /* 0x10 Rx Global Mask */ + u32 rx14msk;/* 0x14 RxBuffer 14 Mask */ + u32 rx15msk;/* 0x18 RxBuffer 15 Mask */ +#ifdef CONFIG_M5282 + u32 res2; /* 0x1C */ + u16 errstat;/* 0x20 Error and status */ + u16 imsk; /* 0x22 Interrupt Mask */ + u16 iflag; /* 0x24 Interrupt Flag */ + u16 errcnt;
[U-Boot] [PATCH 05/19] ColdFire: Modules header files cleanup - 4
From: TsiChung Liew [EMAIL PROTECTED] Consolidate interrupt control structures and definitions in immap_5xxx.h and m5xxx.h to more unify module header file - 1 Signed-off-by: TsiChung Liew [EMAIL PROTECTED] --- include/asm-m68k/coldfire/intctrl.h | 246 +++ include/asm-m68k/immap_5227x.h | 90 +- include/asm-m68k/immap_5235.h | 70 +-- include/asm-m68k/immap_5271.h | 32 +- include/asm-m68k/immap_5275.h | 33 +- include/asm-m68k/immap_5282.h | 33 +- include/asm-m68k/immap_5329.h | 77 +--- include/asm-m68k/immap_5445x.h | 90 +- include/asm-m68k/immap_547x_8x.h| 32 +- 9 files changed, 254 insertions(+), 449 deletions(-) create mode 100644 include/asm-m68k/coldfire/intctrl.h diff --git a/include/asm-m68k/coldfire/intctrl.h b/include/asm-m68k/coldfire/intctrl.h new file mode 100644 index 000..ae82b29 --- /dev/null +++ b/include/asm-m68k/coldfire/intctrl.h @@ -0,0 +1,246 @@ +/* + * Interrupt Controller Memory Map + * + * Copyright (C) 2004-2008 Freescale Semiconductor, Inc. + * TsiChung Liew ([EMAIL PROTECTED]) + * + * 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 __INTCTRL_H__ +#define __INTCTRL_H__ + +#if defined(CONFIG_M5235) || defined(CONFIG_M5271) || \ +defined(CONFIG_M5275) || defined(CONFIG_M5282) || \ +defined(CONFIG_M547x) || defined(CONFIG_M548x) +# define CONFIG_SYS_CF_INTC_REG1 +#endif + +typedef struct int0_ctrl { + /* Interrupt Controller 0 */ + u32 iprh0; /* 0x00 Pending High */ + u32 iprl0; /* 0x04 Pending Low */ + u32 imrh0; /* 0x08 Mask High */ + u32 imrl0; /* 0x0C Mask Low */ + u32 frch0; /* 0x10 Force High */ + u32 frcl0; /* 0x14 Force Low */ +#if defined(CONFIG_SYS_CF_INTC_REG1) + u8 irlr;/* 0x18 */ + u8 iacklpr; /* 0x19 */ + u16 res1[19]; /* 0x1a - 0x3c */ +#else + u16 res1; /* 0x18 - 0x19 */ + u16 icfg0; /* 0x1A Configuration */ + u8 simr0; /* 0x1C Set Interrupt Mask */ + u8 cimr0; /* 0x1D Clear Interrupt Mask */ + u8 clmask0; /* 0x1E Current Level Mask */ + u8 slmask; /* 0x1F Saved Level Mask */ + u32 res2[8];/* 0x20 - 0x3F */ +#endif + u8 icr0[64];/* 0x40 - 0x7F Control registers */ + u32 res3[24]; /* 0x80 - 0xDF */ + u8 swiack0; /* 0xE0 Software Interrupt ack */ + u8 res4[3]; /* 0xE1 - 0xE3 */ + u8 L1iack0; /* 0xE4 Level n interrupt ack */ + u8 res5[3]; /* 0xE5 - 0xE7 */ + u8 L2iack0; /* 0xE8 Level n interrupt ack */ + u8 res6[3]; /* 0xE9 - 0xEB */ + u8 L3iack0; /* 0xEC Level n interrupt ack */ + u8 res7[3]; /* 0xED - 0xEF */ + u8 L4iack0; /* 0xF0 Level n interrupt ack */ + u8 res8[3]; /* 0xF1 - 0xF3 */ + u8 L5iack0; /* 0xF4 Level n interrupt ack */ + u8 res9[3]; /* 0xF5 - 0xF7 */ + u8 L6iack0; /* 0xF8 Level n interrupt ack */ + u8 resa[3]; /* 0xF9 - 0xFB */ + u8 L7iack0; /* 0xFC Level n interrupt ack */ + u8 resb[3]; /* 0xFD - 0xFF */ +} int0_t; + +typedef struct int1_ctrl { + /* Interrupt Controller 1 */ + u32 iprh1; /* 0x00 Pending High */ + u32 iprl1; /* 0x04 Pending Low */ + u32 imrh1; /* 0x08 Mask High */ + u32 imrl1; /* 0x0C Mask Low */ + u32 frch1; /* 0x10 Force High */ + u32 frcl1; /* 0x14 Force Low */ +#if defined(CONFIG_SYS_CF_INTC_REG1) + u8 irlr;/* 0x18 */ + u8 iacklpr; /* 0x19 */ + u16 res1[19]; /* 0x1a - 0x3c */ +#else + u16 res1; /* 0x18 */ + u16 icfg1; /* 0x1A Configuration */ + u8 simr1;
[U-Boot] [PATCH 06/19] ColdFire: Modules header files cleanup - 5
From: TsiChung Liew [EMAIL PROTECTED] Consolidate interrupt control structures and definitions in immap_5xxx.h and m5xxx.h to more unify module header file - 2 Signed-off-by: TsiChung Liew [EMAIL PROTECTED] --- include/asm-m68k/m5227x.h | 233 +-- include/asm-m68k/m5235.h| 79 --- include/asm-m68k/m5271.h| 38 +--- include/asm-m68k/m5275.h| 46 - include/asm-m68k/m5329.h| 95 -- include/asm-m68k/m5445x.h | 229 -- include/asm-m68k/m547x_8x.h | 68 - 7 files changed, 2 insertions(+), 786 deletions(-) diff --git a/include/asm-m68k/m5227x.h b/include/asm-m68k/m5227x.h index afd31ba..61bc0ad 100644 --- a/include/asm-m68k/m5227x.h +++ b/include/asm-m68k/m5227x.h @@ -26,9 +26,7 @@ #ifndef __MCF5227X__ #define __MCF5227X__ -/* -* Interrupt Controller (INTC) -*/ +/* Interrupt Controller (INTC) */ #define INT0_LO_RSVD0 (0) #define INT0_LO_EPORT1 (1) #define INT0_LO_EPORT4 (4) @@ -98,235 +96,6 @@ #define INT1_HI_TOUCH_ADC (61) #define INT1_HI_PLL_LOCKS (62) -/* Bit definitions and macros for IPRH */ -#define INTC_IPRH_INT32(0x0001) -#define INTC_IPRH_INT33(0x0002) -#define INTC_IPRH_INT34(0x0004) -#define INTC_IPRH_INT35(0x0008) -#define INTC_IPRH_INT36(0x0010) -#define INTC_IPRH_INT37(0x0020) -#define INTC_IPRH_INT38(0x0040) -#define INTC_IPRH_INT39(0x0080) -#define INTC_IPRH_INT40(0x0100) -#define INTC_IPRH_INT41(0x0200) -#define INTC_IPRH_INT42(0x0400) -#define INTC_IPRH_INT43(0x0800) -#define INTC_IPRH_INT44(0x1000) -#define INTC_IPRH_INT45(0x2000) -#define INTC_IPRH_INT46(0x4000) -#define INTC_IPRH_INT47(0x8000) -#define INTC_IPRH_INT48(0x0001) -#define INTC_IPRH_INT49(0x0002) -#define INTC_IPRH_INT50(0x0004) -#define INTC_IPRH_INT51(0x0008) -#define INTC_IPRH_INT52(0x0010) -#define INTC_IPRH_INT53(0x0020) -#define INTC_IPRH_INT54(0x0040) -#define INTC_IPRH_INT55(0x0080) -#define INTC_IPRH_INT56(0x0100) -#define INTC_IPRH_INT57(0x0200) -#define INTC_IPRH_INT58(0x0400) -#define INTC_IPRH_INT59(0x0800) -#define INTC_IPRH_INT60(0x1000) -#define INTC_IPRH_INT61(0x2000) -#define INTC_IPRH_INT62(0x4000) -#define INTC_IPRH_INT63(0x8000) - -/* Bit definitions and macros for IPRL */ -#define INTC_IPRL_INT0 (0x0001) -#define INTC_IPRL_INT1 (0x0002) -#define INTC_IPRL_INT2 (0x0004) -#define INTC_IPRL_INT3 (0x0008) -#define INTC_IPRL_INT4 (0x0010) -#define INTC_IPRL_INT5 (0x0020) -#define INTC_IPRL_INT6 (0x0040) -#define INTC_IPRL_INT7 (0x0080) -#define INTC_IPRL_INT8 (0x0100) -#define INTC_IPRL_INT9 (0x0200) -#define INTC_IPRL_INT10(0x0400) -#define INTC_IPRL_INT11(0x0800) -#define INTC_IPRL_INT12(0x1000) -#define INTC_IPRL_INT13(0x2000) -#define INTC_IPRL_INT14(0x4000) -#define INTC_IPRL_INT15(0x8000) -#define INTC_IPRL_INT16(0x0001) -#define INTC_IPRL_INT17(0x0002) -#define INTC_IPRL_INT18(0x0004) -#define INTC_IPRL_INT19(0x0008) -#define INTC_IPRL_INT20(0x0010) -#define INTC_IPRL_INT21(0x0020) -#define INTC_IPRL_INT22(0x0040) -#define INTC_IPRL_INT23(0x0080) -#define INTC_IPRL_INT24(0x0100) -#define INTC_IPRL_INT25(0x0200) -#define INTC_IPRL_INT26(0x0400) -#define INTC_IPRL_INT27
[U-Boot] [PATCH 07/19] ColdFire: Modules header files cleanup - 6
From: TsiChung Liew [EMAIL PROTECTED] Consolidate FlexBus structures and definitions in immap_5xxx.h and m5xxx.h to more unify modules header files. Apply changes to mcf52x2's cpu_init.c Signed-off-by: TsiChung Liew [EMAIL PROTECTED] --- cpu/mcf52x2/cpu_init.c | 271 ++ include/asm-m68k/coldfire/flexbus.h | 96 - include/asm-m68k/immap_5235.h | 52 +--- include/asm-m68k/immap_5249.h |2 + include/asm-m68k/immap_5253.h |2 + include/asm-m68k/immap_5271.h |1 + include/asm-m68k/immap_5275.h | 46 +-- include/asm-m68k/immap_5282.h | 52 +--- include/asm-m68k/m5235.h| 40 - include/asm-m68k/m5249.h| 13 -- include/asm-m68k/m5282.h| 23 --- include/asm-m68k/m5329.h| 59 include/configs/EB+MCF-EV123.h | 16 +-- include/configs/M5235EVB.h | 10 +- include/configs/M5249EVB.h | 14 +- include/configs/M5253DEMO.h | 24 +-- include/configs/M5253EVBE.h | 20 +-- include/configs/M5275EVB.h | 14 +- include/configs/M5282EVB.h | 18 +-- include/configs/TASREG.h| 14 +- 20 files changed, 196 insertions(+), 591 deletions(-) diff --git a/cpu/mcf52x2/cpu_init.c b/cpu/mcf52x2/cpu_init.c index 7bb358e..32ad6cd 100644 --- a/cpu/mcf52x2/cpu_init.c +++ b/cpu/mcf52x2/cpu_init.c @@ -36,6 +36,65 @@ #include watchdog.h #include asm/immap.h +#ifndef CONFIG_M5272 +/* Only 5272 Flexbus chipselect is different from the rest */ +void init_fbcs(void) +{ + volatile fbcs_t *fbcs = (fbcs_t *) (MMAP_FBCS); + +#if (defined(CONFIG_SYS_CS0_BASE) defined(CONFIG_SYS_CS0_MASK) \ + defined(CONFIG_SYS_CS0_CTRL)) + fbcs-csar0 = CONFIG_SYS_CS0_BASE; + fbcs-cscr0 = CONFIG_SYS_CS0_CTRL; + fbcs-csmr0 = CONFIG_SYS_CS0_MASK; +#else +#warning Chip Select 0 are not initialized/used +#endif +#if (defined(CONFIG_SYS_CS1_BASE) defined(CONFIG_SYS_CS1_MASK) \ + defined(CONFIG_SYS_CS1_CTRL)) + fbcs-csar1 = CONFIG_SYS_CS1_BASE; + fbcs-cscr1 = CONFIG_SYS_CS1_CTRL; + fbcs-csmr1 = CONFIG_SYS_CS1_MASK; +#endif +#if (defined(CONFIG_SYS_CS2_BASE) defined(CONFIG_SYS_CS2_MASK) \ + defined(CONFIG_SYS_CS2_CTRL)) + fbcs-csar2 = CONFIG_SYS_CS2_BASE; + fbcs-cscr2 = CONFIG_SYS_CS2_CTRL; + fbcs-csmr2 = CONFIG_SYS_CS2_MASK; +#endif +#if (defined(CONFIG_SYS_CS3_BASE) defined(CONFIG_SYS_CS3_MASK) \ + defined(CONFIG_SYS_CS3_CTRL)) + fbcs-csar3 = CONFIG_SYS_CS3_BASE; + fbcs-cscr3 = CONFIG_SYS_CS3_CTRL; + fbcs-csmr3 = CONFIG_SYS_CS3_MASK; +#endif +#if (defined(CONFIG_SYS_CS4_BASE) defined(CONFIG_SYS_CS4_MASK) \ + defined(CONFIG_SYS_CS4_CTRL)) + fbcs-csar4 = CONFIG_SYS_CS4_BASE; + fbcs-cscr4 = CONFIG_SYS_CS4_CTRL; + fbcs-csmr4 = CONFIG_SYS_CS4_MASK; +#endif +#if (defined(CONFIG_SYS_CS5_BASE) defined(CONFIG_SYS_CS5_MASK) \ + defined(CONFIG_SYS_CS5_CTRL)) + fbcs-csar5 = CONFIG_SYS_CS5_BASE; + fbcs-cscr5 = CONFIG_SYS_CS5_CTRL; + fbcs-csmr5 = CONFIG_SYS_CS5_MASK; +#endif +#if (defined(CONFIG_SYS_CS6_BASE) defined(CONFIG_SYS_CS6_MASK) \ + defined(CONFIG_SYS_CS6_CTRL)) + fbcs-csar6 = CONFIG_SYS_CS6_BASE; + fbcs-cscr6 = CONFIG_SYS_CS6_CTRL; + fbcs-csmr6 = CONFIG_SYS_CS6_MASK; +#endif +#if (defined(CONFIG_SYS_CS7_BASE) defined(CONFIG_SYS_CS7_MASK) \ + defined(CONFIG_SYS_CS7_CTRL)) + fbcs-csar7 = CONFIG_SYS_CS7_BASE; + fbcs-cscr7 = CONFIG_SYS_CS7_CTRL; + fbcs-csmr7 = CONFIG_SYS_CS7_MASK; +#endif +} +#endif + #if defined(CONFIG_M5253) /* * Breath some life into the CPU... @@ -66,22 +125,14 @@ void cpu_init_f(void) mbar2_writeByte(MCFSIM_INTBASE, 0x40); /* Base interrupts at 64 */ mbar2_writeByte(MCFSIM_SPURVEC, 0x00); - /*mbar2_writeLong(MCFSIM_IDECONFIG1, 0x0020); */ /* Enable a 1 cycle pre-drive cycle on CS1 */ - - /* -* Setup chip selects... -*/ - - mbar_writeShort(MCFSIM_CSAR1, CONFIG_SYS_CSAR1); - mbar_writeShort(MCFSIM_CSCR1, CONFIG_SYS_CSCR1); - mbar_writeLong(MCFSIM_CSMR1, CONFIG_SYS_CSMR1); + /*mbar2_writeLong(MCFSIM_IDECONFIG1, 0x0020); *//* Enable a 1 cycle pre-drive cycle on CS1 */ - mbar_writeShort(MCFSIM_CSAR0, CONFIG_SYS_CSAR0); - mbar_writeShort(MCFSIM_CSCR0, CONFIG_SYS_CSCR0); - mbar_writeLong(MCFSIM_CSMR0, CONFIG_SYS_CSMR0); + /* FlexBus Chipselect */ + init_fbcs(); #ifdef CONFIG_FSL_I2C - CONFIG_SYS_I2C_PINMUX_REG = CONFIG_SYS_I2C_PINMUX_REG CONFIG_SYS_I2C_PINMUX_CLR; + CONFIG_SYS_I2C_PINMUX_REG = + CONFIG_SYS_I2C_PINMUX_REG CONFIG_SYS_I2C_PINMUX_CLR; CONFIG_SYS_I2C_PINMUX_REG |= CONFIG_SYS_I2C_PINMUX_SET; #ifdef CONFIG_SYS_I2C2_OFFSET CONFIG_SYS_I2C2_PINMUX_REG = CONFIG_SYS_I2C2_PINMUX_CLR; @@ -121,6 +172,9 @@ void cpu_init_f(void)
[U-Boot] [PATCH 08/19] ColdFire: Remove platforms mii.c file - 1
From: TsiChung Liew [EMAIL PROTECTED] Will use mcfmii.c driver in drivers/net rather than keep creating new mii.c for each future platform. Remove EB+MCF-EV123, cobra5272, idmr and M5235EVB's mii.c Signed-off-by: TsiChung Liew [EMAIL PROTECTED] --- board/BuS/EB+MCF-EV123/Makefile |2 +- board/BuS/EB+MCF-EV123/mii.c | 304 board/cobra5272/Makefile |2 +- board/cobra5272/mii.c | 303 board/freescale/m5235evb/Makefile |2 +- board/freescale/m5235evb/mii.c| 307 - board/idmr/Makefile |2 +- board/idmr/mii.c | 303 8 files changed, 4 insertions(+), 1221 deletions(-) delete mode 100644 board/BuS/EB+MCF-EV123/mii.c delete mode 100644 board/cobra5272/mii.c delete mode 100644 board/freescale/m5235evb/mii.c delete mode 100644 board/idmr/mii.c diff --git a/board/BuS/EB+MCF-EV123/Makefile b/board/BuS/EB+MCF-EV123/Makefile index ceeffa7..ed3ac07 100644 --- a/board/BuS/EB+MCF-EV123/Makefile +++ b/board/BuS/EB+MCF-EV123/Makefile @@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk LIB= $(obj)lib$(BOARD).a -COBJS = $(BOARD).o cfm_flash.o flash.o VCxK.o mii.o +COBJS = $(BOARD).o cfm_flash.o flash.o VCxK.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS)) diff --git a/board/BuS/EB+MCF-EV123/mii.c b/board/BuS/EB+MCF-EV123/mii.c deleted file mode 100644 index 7f92514..000 --- a/board/BuS/EB+MCF-EV123/mii.c +++ /dev/null @@ -1,304 +0,0 @@ -/* - * Copyright (C) 2004-2007 Freescale Semiconductor, Inc. - * TsiChung Liew ([EMAIL PROTECTED]) - * - * 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/fec.h -#include asm/immap.h - -#include config.h -#include net.h - -DECLARE_GLOBAL_DATA_PTR; - -#if defined(CONFIG_CMD_NET) defined(CONFIG_NET_MULTI) -#undef MII_DEBUG -#undef ET_DEBUG - -int fecpin_setclear(struct eth_device *dev, int setclear) -{ - if (setclear) { - MCFGPIO_PASPAR |= 0x0F00; - MCFGPIO_PEHLPAR = CONFIG_SYS_PEHLPAR; - } else { - MCFGPIO_PASPAR = 0xF0FF; - MCFGPIO_PEHLPAR = ~CONFIG_SYS_PEHLPAR; - } - return 0; -} - -#if defined(CONFIG_SYS_DISCOVER_PHY) || defined(CONFIG_CMD_MII) -#include miiphy.h - -/* Make MII read/write commands for the FEC. */ -#define mk_mii_read(ADDR, REG) (0x6002 | ((ADDR 23) | (REG 0x1f) 18)) - -#define mk_mii_write(ADDR, REG, VAL) (0x5002 | ((ADDR 23) | (REG 0x1f) 18) | (VAL 0x)) - -/* PHY identification */ -#define PHY_ID_LXT970 0x7810 /* LXT970 */ -#define PHY_ID_LXT971 0x001378e0 /* LXT971 and 972 */ -#define PHY_ID_82555 0x02a80150 /* Intel 82555 */ -#define PHY_ID_QS6612 0x01814400 /* QS6612 */ -#define PHY_ID_AMD79C784 0x00225610 /* AMD 79C784 */ -#define PHY_ID_AMD79C874VC 0x0022561B /* AMD 79C874 */ -#define PHY_ID_LSI802250x0016f870 /* LSI 80225 */ -#define PHY_ID_LSI80225B 0x0016f880 /* LSI 80225/B */ -#define PHY_ID_DP83848VV 0x20005C90 /* National 83848 */ -#define PHY_ID_DP83849 0x20005CA2 /* National 82849 */ - -#define STR_ID_LXT970 LXT970 -#define STR_ID_LXT971 LXT971 -#define STR_ID_82555 Intel82555 -#define STR_ID_QS6612 QS6612 -#define STR_ID_AMD79C784 AMD79C784 -#define STR_ID_AMD79C874VC AMD79C874VC -#define STR_ID_LSI80225LSI80225 -#define STR_ID_LSI80225B LSI80225/B -#define STR_ID_DP83848VV N83848 -#define STR_ID_DP83849 N83849 - -/ - * mii_init -- Initialize the MII for MII command without ethernet - * This function is a subset of eth_init - - */ -void mii_reset(struct fec_info_s *info) -{ - volatile fec_t *fecp = (fec_t *) (info-miibase); - int i; - - fecp-ecr = FEC_ECR_RESET; - for (i = 0; (fecp-ecr FEC_ECR_RESET) (i
[U-Boot] [PATCH 09/19] ColdFire: Remove platforms mii.c file - 2
From: TsiChung Liew [EMAIL PROTECTED] Will use mcfmii.c driver in drivers/net rather than keep creating new mii.c for each future platform. Remove M5271EVB, M5272C3, M5275EVB and M5282EVB's mii.c Signed-off-by: TsiChung Liew [EMAIL PROTECTED] --- board/freescale/m5271evb/Makefile |2 +- board/freescale/m5271evb/mii.c| 303 --- board/freescale/m5272c3/Makefile |2 +- board/freescale/m5272c3/mii.c | 303 --- board/freescale/m5275evb/Makefile |2 +- board/freescale/m5275evb/mii.c| 319 - board/freescale/m5282evb/Makefile |2 +- board/freescale/m5282evb/mii.c| 304 --- 8 files changed, 4 insertions(+), 1233 deletions(-) delete mode 100644 board/freescale/m5271evb/mii.c delete mode 100644 board/freescale/m5272c3/mii.c delete mode 100644 board/freescale/m5275evb/mii.c delete mode 100644 board/freescale/m5282evb/mii.c diff --git a/board/freescale/m5271evb/Makefile b/board/freescale/m5271evb/Makefile index 2ec71ee..424ab1c 100644 --- a/board/freescale/m5271evb/Makefile +++ b/board/freescale/m5271evb/Makefile @@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk LIB= $(obj)lib$(BOARD).a -COBJS = $(BOARD).o mii.o +COBJS = $(BOARD).o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS)) diff --git a/board/freescale/m5271evb/mii.c b/board/freescale/m5271evb/mii.c deleted file mode 100644 index e79fa19..000 --- a/board/freescale/m5271evb/mii.c +++ /dev/null @@ -1,303 +0,0 @@ -/* - * Copyright (C) 2004-2007 Freescale Semiconductor, Inc. - * TsiChung Liew ([EMAIL PROTECTED]) - * - * 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/fec.h -#include asm/immap.h - -#include config.h -#include net.h - -DECLARE_GLOBAL_DATA_PTR; - -#if defined(CONFIG_CMD_NET) defined(CONFIG_NET_MULTI) -#undef MII_DEBUG -#undef ET_DEBUG - -int fecpin_setclear(struct eth_device *dev, int setclear) -{ - if (setclear) { - /* Enable Ethernet pins */ - mbar_writeByte(MCF_GPIO_PAR_FECI2C, CONFIG_SYS_FECI2C); - } else { - } - - return 0; -} - -#if defined(CONFIG_SYS_DISCOVER_PHY) || defined(CONFIG_CMD_MII) -#include miiphy.h - -/* Make MII read/write commands for the FEC. */ -#define mk_mii_read(ADDR, REG) (0x6002 | ((ADDR 23) | (REG 0x1f) 18)) - -#define mk_mii_write(ADDR, REG, VAL) (0x5002 | ((ADDR 23) | (REG 0x1f) 18) | (VAL 0x)) - -/* PHY identification */ -#define PHY_ID_LXT970 0x7810 /* LXT970 */ -#define PHY_ID_LXT971 0x001378e0 /* LXT971 and 972 */ -#define PHY_ID_82555 0x02a80150 /* Intel 82555 */ -#define PHY_ID_QS6612 0x01814400 /* QS6612 */ -#define PHY_ID_AMD79C784 0x00225610 /* AMD 79C784 */ -#define PHY_ID_LSI802250x0016f870 /* LSI 80225 */ -#define PHY_ID_LSI80225B 0x0016f880 /* LSI 80225/B */ -#define PHY_ID_DP83848VV 0x20005C90 /* National 83848 */ -#define PHY_ID_DP83849 0x20005CA2 /* National 82849 */ -#define PHY_ID_KS8721BL0x00221619 /* Micrel KS8721BL/SL */ - -#define STR_ID_LXT970 LXT970 -#define STR_ID_LXT971 LXT971 -#define STR_ID_82555 Intel82555 -#define STR_ID_QS6612 QS6612 -#define STR_ID_AMD79C784 AMD79C784 -#define STR_ID_LSI80225LSI80225 -#define STR_ID_LSI80225B LSI80225/B -#define STR_ID_DP83848VV N83848 -#define STR_ID_DP83849 N83849 -#define STR_ID_KS8721BLKS8721BL - -/ - * mii_init -- Initialize the MII for MII command without ethernet - * This function is a subset of eth_init - - */ -void mii_reset(struct fec_info_s *info) -{ - volatile fec_t *fecp = (fec_t *) (info-miibase); - int i; - - fecp-ecr = FEC_ECR_RESET; - for (i = 0; (fecp-ecr FEC_ECR_RESET) (i FEC_RESET_DELAY); ++i) { - udelay(1); - } - if (i ==
[U-Boot] [PATCH 10/19] ColdFire: Remove platforms mii.c file - 3
From: TsiChung Liew [EMAIL PROTECTED] Will use mcfmii.c driver in drivers/net rather than keep creating new mii.c for each future platform. Remove M5329EVB, M5373EVB, M54451EVB M54455EVB's mii.c Signed-off-by: TsiChung Liew [EMAIL PROTECTED] --- board/freescale/m5329evb/Makefile |2 +- board/freescale/m5329evb/mii.c | 306 -- board/freescale/m5373evb/Makefile |2 +- board/freescale/m5373evb/mii.c | 306 -- board/freescale/m54451evb/Makefile |2 +- board/freescale/m54451evb/mii.c| 303 - board/freescale/m54455evb/Makefile |2 +- board/freescale/m54455evb/mii.c| 324 8 files changed, 4 insertions(+), 1243 deletions(-) delete mode 100644 board/freescale/m5329evb/mii.c delete mode 100644 board/freescale/m5373evb/mii.c delete mode 100644 board/freescale/m54451evb/mii.c delete mode 100644 board/freescale/m54455evb/mii.c diff --git a/board/freescale/m5329evb/Makefile b/board/freescale/m5329evb/Makefile index ab0f11e..07b693c 100644 --- a/board/freescale/m5329evb/Makefile +++ b/board/freescale/m5329evb/Makefile @@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk LIB= $(obj)lib$(BOARD).a -COBJS = $(BOARD).o mii.o nand.o +COBJS = $(BOARD).o nand.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS)) diff --git a/board/freescale/m5329evb/mii.c b/board/freescale/m5329evb/mii.c deleted file mode 100644 index c0f5817..000 --- a/board/freescale/m5329evb/mii.c +++ /dev/null @@ -1,306 +0,0 @@ -/* - * Copyright (C) 2004-2007 Freescale Semiconductor, Inc. - * TsiChung Liew ([EMAIL PROTECTED]) - * - * 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/fec.h -#include asm/immap.h - -#include config.h -#include net.h - -DECLARE_GLOBAL_DATA_PTR; - -#if defined(CONFIG_CMD_NET) defined(CONFIG_NET_MULTI) -#undef MII_DEBUG -#undef ET_DEBUG - -int fecpin_setclear(struct eth_device *dev, int setclear) -{ - volatile gpio_t *gpio = (gpio_t *) MMAP_GPIO; - - if (setclear) { - gpio-par_fec |= GPIO_PAR_FEC_7W_FEC | GPIO_PAR_FEC_MII_FEC; - gpio-par_feci2c |= - GPIO_PAR_FECI2C_MDC_EMDC | GPIO_PAR_FECI2C_MDIO_EMDIO; - } else { - gpio-par_fec = ~(GPIO_PAR_FEC_7W_FEC | GPIO_PAR_FEC_MII_FEC); - gpio-par_feci2c = - ~(GPIO_PAR_FECI2C_MDC_EMDC | GPIO_PAR_FECI2C_MDIO_EMDIO); - } - return 0; -} - -#if defined(CONFIG_SYS_DISCOVER_PHY) || defined(CONFIG_CMD_MII) -#include miiphy.h - -/* Make MII read/write commands for the FEC. */ -#define mk_mii_read(ADDR, REG) (0x6002 | ((ADDR 23) | (REG 0x1f) 18)) - -#define mk_mii_write(ADDR, REG, VAL) (0x5002 | ((ADDR 23) | (REG 0x1f) 18) | (VAL 0x)) - -/* PHY identification */ -#define PHY_ID_LXT970 0x7810 /* LXT970 */ -#define PHY_ID_LXT971 0x001378e0 /* LXT971 and 972 */ -#define PHY_ID_82555 0x02a80150 /* Intel 82555 */ -#define PHY_ID_QS6612 0x01814400 /* QS6612 */ -#define PHY_ID_AMD79C784 0x00225610 /* AMD 79C784 */ -#define PHY_ID_LSI802250x0016f870 /* LSI 80225 */ -#define PHY_ID_LSI80225B 0x0016f880 /* LSI 80225/B */ -#define PHY_ID_DP83848VV 0x20005C90 /* National 83848 */ -#define PHY_ID_DP83849 0x20005CA2 /* National 82849 */ - -#define STR_ID_LXT970 LXT970 -#define STR_ID_LXT971 LXT971 -#define STR_ID_82555 Intel82555 -#define STR_ID_QS6612 QS6612 -#define STR_ID_AMD79C784 AMD79C784 -#define STR_ID_LSI80225LSI80225 -#define STR_ID_LSI80225B LSI80225/B -#define STR_ID_DP83848VV N83848 -#define STR_ID_DP83849 N83849 - -/ - * mii_init -- Initialize the MII for MII command without ethernet - * This function is a subset of eth_init - - */ -void mii_reset(struct fec_info_s *info) -{ - volatile fec_t *fecp =
[U-Boot] [PATCH 12/19] ColdFire: Relocate FEC's GPIO and mii functions protocols
From: TsiChung Liew [EMAIL PROTECTED] Place FEC pin assignments in cpu_init.c from platform's mii.c Signed-off-by: TsiChung Liew [EMAIL PROTECTED] --- cpu/mcf523x/cpu_init.c | 24 +++- cpu/mcf52x2/cpu_init.c | 78 +++ cpu/mcf532x/cpu_init.c | 25 - cpu/mcf5445x/cpu_init.c | 34 - cpu/mcf547x_8x/cpu_init.c | 27 + include/asm-m68k/fec.h | 12 ++ include/asm-m68k/fsl_mcdmafec.h |9 7 files changed, 197 insertions(+), 12 deletions(-) diff --git a/cpu/mcf523x/cpu_init.c b/cpu/mcf523x/cpu_init.c index 6520944..3c04fd4 100644 --- a/cpu/mcf523x/cpu_init.c +++ b/cpu/mcf523x/cpu_init.c @@ -27,9 +27,14 @@ #include common.h #include watchdog.h - #include asm/immap.h +#if defined(CONFIG_CMD_NET) +#include config.h +#include net.h +#include asm/fec.h +#endif + /* * Breath some life into the CPU... * @@ -143,3 +148,20 @@ void uart_port_conf(void) break; } } + +#if defined(CONFIG_CMD_NET) +int fecpin_setclear(struct eth_device *dev, int setclear) +{ + volatile gpio_t *gpio = (gpio_t *) MMAP_GPIO; + + if (setclear) { + gpio-par_feci2c |= + (GPIO_PAR_FECI2C_EMDC_FECEMDC | GPIO_PAR_FECI2C_EMDIO_FECEMDIO); + } else { + gpio-par_feci2c = + ~(GPIO_PAR_FECI2C_EMDC_MASK | GPIO_PAR_FECI2C_EMDIO_MASK); + } + + return 0; +} +#endif diff --git a/cpu/mcf52x2/cpu_init.c b/cpu/mcf52x2/cpu_init.c index 32ad6cd..18308c8 100644 --- a/cpu/mcf52x2/cpu_init.c +++ b/cpu/mcf52x2/cpu_init.c @@ -36,6 +36,12 @@ #include watchdog.h #include asm/immap.h +#if defined(CONFIG_CMD_NET) +#include config.h +#include net.h +#include asm/fec.h +#endif + #ifndef CONFIG_M5272 /* Only 5272 Flexbus chipselect is different from the rest */ void init_fbcs(void) @@ -207,6 +213,19 @@ void uart_port_conf(void) break; } } + +#if defined(CONFIG_CMD_NET) +int fecpin_setclear(struct eth_device *dev, int setclear) +{ + if (setclear) { + /* Enable Ethernet pins */ + mbar_writeByte(MCF_GPIO_PAR_FECI2C, CONFIG_SYS_FECI2C); + } else { + } + + return 0; +} +#endif /* CONFIG_CMD_NET */ #endif #if defined(CONFIG_M5272) @@ -309,6 +328,22 @@ void uart_port_conf(void) break; } } + +#if defined(CONFIG_CMD_NET) +int fecpin_setclear(struct eth_device *dev, int setclear) +{ + volatile gpio_t *gpio = (gpio_t *) MMAP_GPIO; + + if (setclear) { + gpio-gpio_pbcnt |= GPIO_PBCNT_E_MDC | GPIO_PBCNT_E_RXER | + GPIO_PBCNT_E_RXD1 | GPIO_PBCNT_E_RXD2 | + GPIO_PBCNT_E_RXD3 | GPIO_PBCNT_E_TXD1 | + GPIO_PBCNT_E_TXD2 | GPIO_PBCNT_E_TXD3; + } else { + } + return 0; +} +#endif /* CONFIG_CMD_NET */ #endif /* #if defined(CONFIG_M5272) */ #if defined(CONFIG_M5275) @@ -372,6 +407,35 @@ void uart_port_conf(void) break; } } + +#if defined(CONFIG_CMD_NET) +int fecpin_setclear(struct eth_device *dev, int setclear) +{ + struct fec_info_s *info = (struct fec_info_s *) dev-priv; + volatile gpio_t *gpio = (gpio_t *)MMAP_GPIO; + + if (setclear) { + /* Enable Ethernet pins */ + if (info-iobase == CONFIG_SYS_FEC0_IOBASE) { + gpio-par_feci2c |= 0x0F00; + gpio-par_fec0hl |= 0xC0; + } else { + gpio-par_feci2c |= 0x00A0; + gpio-par_fec1hl |= 0xC0; + } + } else { + if (info-iobase == CONFIG_SYS_FEC0_IOBASE) { + gpio-par_feci2c = ~0x0F00; + gpio-par_fec0hl = ~0xC0; + } else { + gpio-par_feci2c = ~0x00A0; + gpio-par_fec1hl = ~0xC0; + } + } + + return 0; +} +#endif /* CONFIG_CMD_NET */ #endif /* #if defined(CONFIG_M5275) */ #if defined(CONFIG_M5282) @@ -469,6 +533,20 @@ void uart_port_conf(void) break; } } + +#if defined(CONFIG_CMD_NET) +int fecpin_setclear(struct eth_device *dev, int setclear) +{ + if (setclear) { + MCFGPIO_PASPAR |= 0x0F00; + MCFGPIO_PEHLPAR = CONFIG_SYS_PEHLPAR; + } else { + MCFGPIO_PASPAR = 0xF0FF; + MCFGPIO_PEHLPAR = ~CONFIG_SYS_PEHLPAR; + } + return 0; +} +#endif /* CONFIG_CMD_NET */ #endif #if defined(CONFIG_M5249) diff --git a/cpu/mcf532x/cpu_init.c b/cpu/mcf532x/cpu_init.c index d348e29..39be11f 100644 --- a/cpu/mcf532x/cpu_init.c +++ b/cpu/mcf532x/cpu_init.c @@ -27,9 +27,14 @@
[U-Boot] [PATCH 13/19] ColdFire: Add mii driver in drivers/net
From: TsiChung Liew [EMAIL PROTECTED] All CF platforms' mii.c are consolidated into one Signed-off-by: TsiChung Liew [EMAIL PROTECTED] --- drivers/net/Makefile |4 +- drivers/net/mcffec.c | 18 +--- drivers/net/mcfmii.c | 321 ++ 3 files changed, 326 insertions(+), 17 deletions(-) create mode 100644 drivers/net/mcfmii.c diff --git a/drivers/net/Makefile b/drivers/net/Makefile index 439c354..7e53136 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -35,13 +35,13 @@ COBJS-$(CONFIG_DRIVER_DM9000) += dm9000x.o COBJS-$(CONFIG_E1000) += e1000.o COBJS-$(CONFIG_EEPRO100) += eepro100.o COBJS-$(CONFIG_ENC28J60) += enc28j60.o -COBJS-$(CONFIG_FSLDMAFEC) += fsl_mcdmafec.o +COBJS-$(CONFIG_FSLDMAFEC) += fsl_mcdmafec.o mcfmii.o COBJS-$(CONFIG_GRETH) += greth.o COBJS-$(CONFIG_INCA_IP_SWITCH) += inca-ip_sw.o COBJS-$(CONFIG_DRIVER_KS8695ETH) += ks8695eth.o COBJS-$(CONFIG_DRIVER_LAN91C96) += lan91c96.o COBJS-$(CONFIG_MACB) += macb.o -COBJS-$(CONFIG_MCFFEC) += mcffec.o +COBJS-$(CONFIG_MCFFEC) += mcffec.o mcfmii.o COBJS-$(CONFIG_MPC5xxx_FEC) += mpc5xxx_fec.o COBJS-$(CONFIG_MPC512x_FEC) += mpc512x_fec.o COBJS-$(CONFIG_NATSEMI) += natsemi.o diff --git a/drivers/net/mcffec.c b/drivers/net/mcffec.c index c00474e..18240a8 100644 --- a/drivers/net/mcffec.c +++ b/drivers/net/mcffec.c @@ -27,14 +27,14 @@ #include common.h #include malloc.h -#include asm/fec.h -#include asm/immap.h - #include command.h #include net.h #include netdev.h #include miiphy.h +#include asm/fec.h +#include asm/immap.h + #undef ET_DEBUG #undef MII_DEBUG @@ -101,18 +101,6 @@ int fec_init(struct eth_device *dev, bd_t * bd); void fec_halt(struct eth_device *dev); void fec_reset(struct eth_device *dev); -extern int fecpin_setclear(struct eth_device *dev, int setclear); - -#ifdef CONFIG_SYS_DISCOVER_PHY -extern void __mii_init(void); -extern uint mii_send(uint mii_cmd); -extern int mii_discover_phy(struct eth_device *dev); -extern int mcffec_miiphy_read(char *devname, unsigned char addr, - unsigned char reg, unsigned short *value); -extern int mcffec_miiphy_write(char *devname, unsigned char addr, - unsigned char reg, unsigned short value); -#endif - void setFecDuplexSpeed(volatile fec_t * fecp, bd_t * bd, int dup_spd) { if ((dup_spd 16) == FULL) { diff --git a/drivers/net/mcfmii.c b/drivers/net/mcfmii.c new file mode 100644 index 000..2b733c6 --- /dev/null +++ b/drivers/net/mcfmii.c @@ -0,0 +1,321 @@ +/* + * Copyright (C) 2004-2008 Freescale Semiconductor, Inc. + * TsiChung Liew ([EMAIL PROTECTED]) + * + * 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 config.h +#include net.h +#include netdev.h + +#ifdef CONFIG_MCF547x_8x +#include asm/fsl_mcdmafec.h +#else +#include asm/fec.h +#endif +#include asm/immap.h + +DECLARE_GLOBAL_DATA_PTR; + +#if defined(CONFIG_CMD_NET) defined(CONFIG_NET_MULTI) +#undef MII_DEBUG +#undef ET_DEBUG + +/*extern int fecpin_setclear(struct eth_device *dev, int setclear);*/ + +#if defined(CONFIG_SYS_DISCOVER_PHY) || defined(CONFIG_CMD_MII) +#include miiphy.h + +/* Make MII read/write commands for the FEC. */ +#define mk_mii_read(ADDR, REG) (0x6002 | ((ADDR 23) | \ +(REG 0x1f) 18)) +#define mk_mii_write(ADDR, REG, VAL) (0x5002 | ((ADDR 23) | \ +(REG 0x1f) 18) | (VAL 0x)) + +#ifndef CONFIG_SYS_UNSPEC_PHYID +# define CONFIG_SYS_UNSPEC_PHYID 0 +#endif +#ifndef CONFIG_SYS_UNSPEC_STRID +# define CONFIG_SYS_UNSPEC_STRID 0 +#endif + +#ifdef CONFIG_MCF547x_8x +typedef struct fec_info_dma FEC_INFO_T; +#define FEC_T fecdma_t +#else +typedef struct fec_info_s FEC_INFO_T; +#define FEC_T fec_t +#endif + +typedef struct phy_info_struct { + u32 phyid; + char *strid; +} phy_info_t; + +phy_info_t phyinfo[] = { + {0x0022561B, AMD79C784VC},/* AMD 79C784VC */ + {0x00406322, BCM5222},/* Broadcom 5222 */ + {0x02a80150, Intel82555}, /* Intel 82555 */ + {0x0016f870, LSI80225}, /* LSI 80225 */ + {0x0016f880,
[U-Boot] [PATCH 14/19] ColdFire: Use CFI driver for M5272C3
From: TsiChung Liew [EMAIL PROTECTED] Signed-off-by: TsiChung Liew [EMAIL PROTECTED] --- board/freescale/m5272c3/Makefile |2 +- board/freescale/m5272c3/flash.c | 378 -- include/configs/M5272C3.h| 14 +- 3 files changed, 11 insertions(+), 383 deletions(-) delete mode 100644 board/freescale/m5272c3/flash.c diff --git a/board/freescale/m5272c3/Makefile b/board/freescale/m5272c3/Makefile index cf07cf4..424ab1c 100644 --- a/board/freescale/m5272c3/Makefile +++ b/board/freescale/m5272c3/Makefile @@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk LIB= $(obj)lib$(BOARD).a -COBJS = $(BOARD).o flash.o +COBJS = $(BOARD).o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS)) diff --git a/board/freescale/m5272c3/flash.c b/board/freescale/m5272c3/flash.c deleted file mode 100644 index 586a2cf..000 --- a/board/freescale/m5272c3/flash.c +++ /dev/null @@ -1,378 +0,0 @@ -/* - * (C) Copyright 2000-2003 - * Wolfgang Denk, DENX Software Engineering, [EMAIL PROTECTED] - * - * 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 - -#define PHYS_FLASH_1 CONFIG_SYS_FLASH_BASE -#define FLASH_BANK_SIZE 0x20 - -flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; - -void flash_print_info (flash_info_t * info) -{ - int i; - - switch (info-flash_id FLASH_VENDMASK) { - case (AMD_MANUFACT FLASH_VENDMASK): - printf (AMD: ); - break; - default: - printf (Unknown Vendor ); - break; - } - - switch (info-flash_id FLASH_TYPEMASK) { - case (AMD_ID_PL160CB FLASH_TYPEMASK): - printf (AM29PL160CB (16Mbit)\n); - break; - default: - printf (Unknown Chip Type\n); - goto Done; - break; - } - - printf ( Size: %ld MB in %d Sectors\n, - info-size 20, info-sector_count); - - printf ( Sector Start Addresses:); - for (i = 0; i info-sector_count; i++) { - if ((i % 5) == 0) { - printf (\n ); - } - printf ( %08lX%s, info-start[i], - info-protect[i] ? (RO) : ); - } - printf (\n); - - Done: - return; -} - - -unsigned long flash_init (void) -{ - int i, j; - ulong size = 0; - - for (i = 0; i CONFIG_SYS_MAX_FLASH_BANKS; i++) { - ulong flashbase = 0; - - flash_info[i].flash_id = - (AMD_MANUFACT FLASH_VENDMASK) | - (AMD_ID_PL160CB FLASH_TYPEMASK); - flash_info[i].size = FLASH_BANK_SIZE; - flash_info[i].sector_count = CONFIG_SYS_MAX_FLASH_SECT; - memset (flash_info[i].protect, 0, CONFIG_SYS_MAX_FLASH_SECT); - if (i == 0) - flashbase = PHYS_FLASH_1; - else - panic (configured to many flash banks!\n); - - for (j = 0; j flash_info[i].sector_count; j++) { - if (j == 0) { - /* 1st is 16 KiB */ - flash_info[i].start[j] = flashbase; - } - if ((j = 1) (j = 2)) { - /* 2nd and 3rd are 8 KiB */ - flash_info[i].start[j] = - flashbase + 0x4000 + 0x2000 * (j - 1); - } - if (j == 3) { - /* 4th is 224 KiB */ - flash_info[i].start[j] = flashbase + 0x8000; - } - if ((j = 4) (j = 10)) { - /* rest is 256 KiB */ - flash_info[i].start[j] = - flashbase + 0x4 + 0x4 * (j - -4); - } - } - size += flash_info[i].size; - } - - flash_protect (FLAG_PROTECT_SET, -
[U-Boot] [PATCH 15/19] ColdFire: Add SBF support for M52277EVB
From: TsiChung Liew [EMAIL PROTECTED] Add serial boot support Signed-off-by: TsiChung Liew [EMAIL PROTECTED] --- Makefile | 22 +++- board/freescale/m52277evb/config.mk |4 +- board/freescale/m52277evb/m52277evb.c | 26 +++- board/freescale/m52277evb/u-boot.lds | 144 -- board/freescale/m52277evb/u-boot.spa | 144 ++ board/freescale/m52277evb/u-boot.stm | 136 + cpu/mcf5227x/Makefile |2 +- cpu/mcf5227x/cpu_init.c | 20 ++- cpu/mcf5227x/dspi.c | 261 + cpu/mcf5227x/speed.c | 30 +++- cpu/mcf5227x/start.S | 245 ++- include/asm-m68k/m5227x.h |4 +- include/configs/M52277EVB.h | 155 +++- 13 files changed, 987 insertions(+), 206 deletions(-) delete mode 100644 board/freescale/m52277evb/u-boot.lds create mode 100644 board/freescale/m52277evb/u-boot.spa create mode 100644 board/freescale/m52277evb/u-boot.stm create mode 100644 cpu/mcf5227x/dspi.c diff --git a/Makefile b/Makefile index fceb8a2..7a35676 100644 --- a/Makefile +++ b/Makefile @@ -1898,7 +1898,27 @@ ZPC1900_config: unconfig ## Coldfire # -M52277EVB_config: unconfig +M52277EVB_config \ +M52277EVB_spansion_config \ +M52277EVB_stmicro_config : unconfig + @case $@ in \ + M52277EVB_config) FLASH=SPANSION;; \ + M52277EVB_spansion_config) FLASH=SPANSION;; \ + M52277EVB_stmicro_config) FLASH=STMICRO;; \ + esac; \ + if [ $${FLASH} = SPANSION ] ; then \ + echo #define CONFIG_SYS_SPANSION_BOOT $(obj)include/config.h ; \ + echo TEXT_BASE = 0x $(obj)board/freescale/m52277evb/config.tmp ; \ + cp $(obj)board/freescale/m52277evb/u-boot.spa $(obj)board/freescale/m52277evb/u-boot.lds ; \ + $(XECHO) ... with SPANSION boot... ; \ + fi; \ + if [ $${FLASH} = STMICRO ] ; then \ + echo #define CONFIG_CF_SBF $(obj)include/config.h ; \ + echo #define CONFIG_SYS_STMICRO_BOOT $(obj)include/config.h ; \ + echo TEXT_BASE = 0x43E0 $(obj)board/freescale/m52277evb/config.tmp ; \ + cp $(obj)board/freescale/m52277evb/u-boot.stm $(obj)board/freescale/m52277evb/u-boot.lds ; \ + $(XECHO) ... with ST Micro boot... ; \ + fi @$(MKCONFIG) -a M52277EVB m68k mcf5227x m52277evb freescale M5235EVB_config \ diff --git a/board/freescale/m52277evb/config.mk b/board/freescale/m52277evb/config.mk index ce014ed..b42fcc9 100644 --- a/board/freescale/m52277evb/config.mk +++ b/board/freescale/m52277evb/config.mk @@ -22,4 +22,6 @@ # MA 02111-1307 USA # -TEXT_BASE = 0 +sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp + +PLATFORM_CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE) diff --git a/board/freescale/m52277evb/m52277evb.c b/board/freescale/m52277evb/m52277evb.c index 838a6de..9109edb 100644 --- a/board/freescale/m52277evb/m52277evb.c +++ b/board/freescale/m52277evb/m52277evb.c @@ -38,8 +38,18 @@ int checkboard(void) phys_size_t initdram(int board_type) { + u32 dramsize; + +#ifdef CONFIG_CF_SBF + /* +* Serial Boot: The dram is already initialized in start.S +* only require to return DRAM size +*/ + dramsize = CONFIG_SYS_SDRAM_SIZE * 0x10; +#else volatile sdramc_t *sdram = (volatile sdramc_t *)(MMAP_SDRAM); - u32 dramsize, i; + volatile gpio_t *gpio = (volatile gpio_t *)(MMAP_GPIO); + u32 i; dramsize = CONFIG_SYS_SDRAM_SIZE * 0x10; @@ -49,6 +59,8 @@ phys_size_t initdram(int board_type) } i--; + gpio-mscr_sdram = CONFIG_SYS_SDRAM_DRV_STRENGTH; + sdram-sdcs0 = (CONFIG_SYS_SDRAM_BASE | i); sdram-sdcfg1 = CONFIG_SYS_SDRAM_CFG1; @@ -56,24 +68,30 @@ phys_size_t initdram(int board_type) /* Issue PALL */ sdram-sdcr = CONFIG_SYS_SDRAM_CTRL | 2; + __asm__(nop); /* Issue LEMR */ - /*sdram-sdmr = CONFIG_SYS_SDRAM_EMOD; */ sdram-sdmr = CONFIG_SYS_SDRAM_MODE; + __asm__(nop); + sdram-sdmr = CONFIG_SYS_SDRAM_EMOD; + __asm__(nop); udelay(1000); /* Issue PALL */ sdram-sdcr = CONFIG_SYS_SDRAM_CTRL | 2; + __asm__(nop); /* Perform two refresh cycles */ sdram-sdcr = CONFIG_SYS_SDRAM_CTRL | 4; + __asm__(nop); sdram-sdcr = CONFIG_SYS_SDRAM_CTRL | 4; + __asm__(nop); - sdram-sdcr = (CONFIG_SYS_SDRAM_CTRL ~0x8000) | 0x1c00; + sdram-sdcr = (CONFIG_SYS_SDRAM_CTRL ~0x8000) | 0x1C00; udelay(100); - +#endif return (dramsize); }; diff --git a/board/freescale/m52277evb/u-boot.lds
[U-Boot] [PATCH 16/19] ColdFire: Add MCF5301x CPU support
From: TsiChung Liew [EMAIL PROTECTED] Signed-off-by: TsiChung Liew [EMAIL PROTECTED] --- cpu/mcf532x/cpu.c | 21 +- cpu/mcf532x/cpu_init.c | 202 cpu/mcf532x/speed.c| 119 cpu/mcf532x/start.S| 11 +++ 4 files changed, 304 insertions(+), 49 deletions(-) diff --git a/cpu/mcf532x/cpu.c b/cpu/mcf532x/cpu.c index fd77939..bcb092d 100644 --- a/cpu/mcf532x/cpu.c +++ b/cpu/mcf532x/cpu.c @@ -3,7 +3,7 @@ * (C) Copyright 2000-2003 * Wolfgang Denk, DENX Software Engineering, [EMAIL PROTECTED] * - * Copyright (C) 2004-2007 Freescale Semiconductor, Inc. + * Copyright (C) 2004-2008 Freescale Semiconductor, Inc. * TsiChung Liew ([EMAIL PROTECTED]) * * See file CREDITS for list of people who contributed to this @@ -56,6 +56,24 @@ int checkcpu(void) msk = (ccm-cir 6); ver = (ccm-cir 0x003f); switch (msk) { +#ifdef CONFIG_MCF5301x + case 0x78: + id = 53010; + break; + case 0x77: + id = 53012; + break; + case 0x76: + id = 53015; + break; + case 0x74: + id = 53011; + break; + case 0x73: + id = 53013; + break; +#endif +#ifdef CONFIG_MCF532x case 0x54: id = 5329; break; @@ -77,6 +95,7 @@ int checkcpu(void) case 0x6B: id = 5372; break; +#endif } if (id) { diff --git a/cpu/mcf532x/cpu_init.c b/cpu/mcf532x/cpu_init.c index 39be11f..687c7e4 100644 --- a/cpu/mcf532x/cpu_init.c +++ b/cpu/mcf532x/cpu_init.c @@ -3,7 +3,7 @@ * (C) Copyright 2000-2003 * Wolfgang Denk, DENX Software Engineering, [EMAIL PROTECTED] * - * (C) Copyright 2007 Freescale Semiconductor, Inc. + * (C) Copyright 2004-2008 Freescale Semiconductor, Inc. * TsiChung Liew ([EMAIL PROTECTED]) * * See file CREDITS for list of people who contributed to this @@ -35,13 +35,180 @@ #include asm/fec.h #endif -/* - * Breath some life into the CPU... - * - * Set up the memory map, - * initialize a bunch of registers, - * initialize the UPM's - */ +#ifdef CONFIG_MCF5301x +void cpu_init_f(void) +{ + volatile scm1_t *scm1 = (scm1_t *) MMAP_SCM1; + volatile scm2_t *scm2 = (scm2_t *) MMAP_SCM2; + volatile gpio_t *gpio = (gpio_t *) MMAP_GPIO; + volatile fbcs_t *fbcs = (fbcs_t *) MMAP_FBCS; + + /* watchdog is enabled by default - disable the watchdog */ +#ifndef CONFIG_WATCHDOG + /*wdog-cr = 0; */ +#endif + + scm1-mpr = 0x; + scm1-pacra = 0; + scm1-pacrb = 0; + scm1-pacrc = 0; + scm1-pacrd = 0; + scm1-pacre = 0; + scm1-pacrf = 0; + scm1-pacrg = 0; + +#if (defined(CONFIG_SYS_CS0_BASE) defined(CONFIG_SYS_CS0_MASK) \ + defined(CONFIG_SYS_CS0_CTRL)) + gpio-par_cs |= GPIO_PAR_CS0_CS0; + fbcs-csar0 = CONFIG_SYS_CS0_BASE; + fbcs-cscr0 = CONFIG_SYS_CS0_CTRL; + fbcs-csmr0 = CONFIG_SYS_CS0_MASK; +#endif + +#if (defined(CONFIG_SYS_CS1_BASE) defined(CONFIG_SYS_CS1_MASK) \ + defined(CONFIG_SYS_CS1_CTRL)) + gpio-par_cs |= GPIO_PAR_CS1_CS1; + fbcs-csar1 = CONFIG_SYS_CS1_BASE; + fbcs-cscr1 = CONFIG_SYS_CS1_CTRL; + fbcs-csmr1 = CONFIG_SYS_CS1_MASK; +#endif + +#if (defined(CONFIG_SYS_CS2_BASE) defined(CONFIG_SYS_CS2_MASK) \ + defined(CONFIG_SYS_CS2_CTRL)) + fbcs-csar2 = CONFIG_SYS_CS2_BASE; + fbcs-cscr2 = CONFIG_SYS_CS2_CTRL; + fbcs-csmr2 = CONFIG_SYS_CS2_MASK; +#endif + +#if (defined(CONFIG_SYS_CS3_BASE) defined(CONFIG_SYS_CS3_MASK) \ + defined(CONFIG_SYS_CS3_CTRL)) + fbcs-csar3 = CONFIG_SYS_CS3_BASE; + fbcs-cscr3 = CONFIG_SYS_CS3_CTRL; + fbcs-csmr3 = CONFIG_SYS_CS3_MASK; +#endif + +#if (defined(CONFIG_SYS_CS4_BASE) defined(CONFIG_SYS_CS4_MASK) \ + defined(CONFIG_SYS_CS4_CTRL)) + gpio-par_cs |= GPIO_PAR_CS4; + fbcs-csar4 = CONFIG_SYS_CS4_BASE; + fbcs-cscr4 = CONFIG_SYS_CS4_CTRL; + fbcs-csmr4 = CONFIG_SYS_CS4_MASK; +#endif + +#if (defined(CONFIG_SYS_CS5_BASE) defined(CONFIG_SYS_CS5_MASK) \ + defined(CONFIG_SYS_CS5_CTRL)) + gpio-par_cs |= GPIO_PAR_CS5; + fbcs-csar5 = CONFIG_SYS_CS5_BASE; + fbcs-cscr5 = CONFIG_SYS_CS5_CTRL; + fbcs-csmr5 = CONFIG_SYS_CS5_MASK; +#endif + +#ifdef CONFIG_FSL_I2C + gpio-par_feci2c = GPIO_PAR_FECI2C_SDA_SDA | GPIO_PAR_FECI2C_SCL_SCL; +#endif + + icache_enable(); +} + +/* initialize higher level parts of CPU like timers */ +int cpu_init_r(void) +{ +#ifdef CONFIG_MCFFEC + volatile ccm_t *ccm = (ccm_t *) MMAP_CCM; +#endif +#ifdef CONFIG_MCFRTC + volatile rtc_t *rtc = (rtc_t *) (CONFIG_SYS_MCFRTC_BASE); + volatile rtcex_t *rtcex = (rtcex_t *) rtc-extended; + + rtcex-gocu = CONFIG_SYS_RTC_CNT; + rtcex-gocl = CONFIG_SYS_RTC_SETUP; + +#endif +#ifdef CONFIG_MCFFEC +
[U-Boot] [PATCH 19/19] ColdFire: Fix compilation error
From: TsiChung Liew [EMAIL PROTECTED] The error was caused by the change for strmhz() in cpu.c. A few of them were one extra close parenthesis. Signed-off-by: TsiChung Liew [EMAIL PROTECTED] --- cpu/mcf5227x/cpu.c | 10 +- cpu/mcf523x/cpu.c |4 ++-- cpu/mcf532x/cpu.c |4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cpu/mcf5227x/cpu.c b/cpu/mcf5227x/cpu.c index 765aec6..d9f5f43 100644 --- a/cpu/mcf5227x/cpu.c +++ b/cpu/mcf5227x/cpu.c @@ -65,12 +65,12 @@ int checkcpu(void) printf(Freescale MCF%d (Mask:%01x Version:%x)\n, id, msk, ver); printf( CPU CLK %s MHz BUS CLK %s MHz FLB CLK %s MHz\n, - strmhz(buf1, gd-cpu_clk)), - strmhz(buf2, gd-bus_clk)), - strmhz(buf3, gd-flb_clk))); + strmhz(buf1, gd-cpu_clk), + strmhz(buf2, gd-bus_clk), + strmhz(buf3, gd-flb_clk)); printf( INP CLK %s MHz VCO CLK %s MHz\n, - strmhz(buf1, gd-inp_clk)), - strmhz(buf2, gd-vco_clk))); + strmhz(buf1, gd-inp_clk), + strmhz(buf2, gd-vco_clk)); } return 0; diff --git a/cpu/mcf523x/cpu.c b/cpu/mcf523x/cpu.c index b9e48aa..a1a5133 100644 --- a/cpu/mcf523x/cpu.c +++ b/cpu/mcf523x/cpu.c @@ -65,8 +65,8 @@ int checkcpu(void) printf(Freescale MCF%d (Mask:%01x Version:%x)\n, id, msk, ver); printf( CPU CLK %s MHz BUS CLK %s MHz\n, - strmhz(buf1, gd-cpu_clk)), - strmhz(buf2, gd-bus_clk))); + strmhz(buf1, gd-cpu_clk), + strmhz(buf2, gd-bus_clk)); } return 0; diff --git a/cpu/mcf532x/cpu.c b/cpu/mcf532x/cpu.c index bcb092d..331cc15 100644 --- a/cpu/mcf532x/cpu.c +++ b/cpu/mcf532x/cpu.c @@ -104,8 +104,8 @@ int checkcpu(void) printf(Freescale MCF%d (Mask:%01x Version:%x)\n, id, msk, ver); printf( CPU CLK %s MHz BUS CLK %s MHz\n, - strmhz(buf1, gd-cpu_clk)), - strmhz(buf2, gd-bus_clk))); + strmhz(buf1, gd-cpu_clk), + strmhz(buf2, gd-bus_clk)); } return 0; -- 1.5.6.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 18/19] ColdFire: Add M53017EVB Platform
From: TsiChung Liew [EMAIL PROTECTED] Signed-off-by: TsiChung Liew [EMAIL PROTECTED] --- MAINTAINERS |1 + MAKEALL |1 + Makefile |3 + board/freescale/m53017evb/Makefile| 44 ++ board/freescale/m53017evb/config.mk | 25 board/freescale/m53017evb/m53017evb.c | 94 + board/freescale/m53017evb/u-boot.lds | 143 +++ doc/README.m53017evb | 181 include/configs/M53017EVB.h | 247 + 9 files changed, 739 insertions(+), 0 deletions(-) create mode 100644 board/freescale/m53017evb/Makefile create mode 100644 board/freescale/m53017evb/config.mk create mode 100644 board/freescale/m53017evb/m53017evb.c create mode 100644 board/freescale/m53017evb/u-boot.lds create mode 100644 doc/README.m53017evb create mode 100644 include/configs/M53017EVB.h diff --git a/MAINTAINERS b/MAINTAINERS index 60cb6a6..8ef6bab 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -717,6 +717,7 @@ TsiChung Liew [EMAIL PROTECTED] M52277EVB mcf5227x M5235EVBmcf52x2 M5253DEMO mcf52x2 + M53017EVB mcf532x M5329EVBmcf532x M5373EVBmcf532x M54455EVB mcf5445x diff --git a/MAKEALL b/MAKEALL index aa602b7..26217fd 100755 --- a/MAKEALL +++ b/MAKEALL @@ -708,6 +708,7 @@ LIST_coldfire= \ M5272C3 \ M5275EVB\ M5282EVB\ + M53017EVB \ M5329AFEE \ M5373EVB\ M54451EVB \ diff --git a/Makefile b/Makefile index 7a35676..3c74fd2 100644 --- a/Makefile +++ b/Makefile @@ -1978,6 +1978,9 @@ M5275EVB_config : unconfig M5282EVB_config : unconfig @$(MKCONFIG) $(@:_config=) m68k mcf52x2 m5282evb freescale +M53017EVB_config : unconfig + @$(MKCONFIG) $(@:_config=) m68k mcf532x m53017evb freescale + M5329AFEE_config \ M5329BFEE_config : unconfig @case $@ in \ diff --git a/board/freescale/m53017evb/Makefile b/board/freescale/m53017evb/Makefile new file mode 100644 index 000..981763d --- /dev/null +++ b/board/freescale/m53017evb/Makefile @@ -0,0 +1,44 @@ +# +# (C) Copyright 2000-2003 +# Wolfgang Denk, DENX Software Engineering, [EMAIL PROTECTED] +# +# 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).a + +COBJS = $(BOARD).o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB):$(obj).depend $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/board/freescale/m53017evb/config.mk b/board/freescale/m53017evb/config.mk new file mode 100644 index 000..ce014ed --- /dev/null +++ b/board/freescale/m53017evb/config.mk @@ -0,0 +1,25 @@ +# +# (C) Copyright 2000-2003 +# Wolfgang Denk, DENX Software Engineering, [EMAIL PROTECTED] +# Coldfire contribution by Bernhard Kuhn [EMAIL PROTECTED] +# +# 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 +# + +TEXT_BASE = 0 diff
Re: [U-Boot] [PATCH] Hardware watchdog support for AT91SAM9260 CPU
On Wed, Oct 22, 2008 at 11:49:44PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: On 02:29 Fri 15 Aug , Sergey Lapin wrote: Dear Jean-Christophe, thanks a lot for your review. Are you from ADI? No, but this file structure is a lot based on blackfin watchdog and I have too little code to make it int full intellectual property, IMHO. + * + * Licensed under the GPL-2 or later. + */ + +#include common.h +#include watchdog.h +#include asm/arch/hardware.h +#include asm/arch/io.h + +#ifdef CONFIG_HW_WATCHDOG no need please remove Ok, +#define AT91_WDT_CR(AT91_WDT+0x00) ^ please add space arround '+' Ok. +#define AT91_WDT_MR(AT91_WDT+0x04) +#define AT91_WDT_SR(AT91_WDT+0x08) + +void hw_watchdog_reset(void) +{ + at91_sys_write(AT91_WDT_CR, 0xa501); please use macro you can import them from Linux Is this kind of watchdog supported in Linux already? When I submitted this file it was not yet. All the best, S. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/3] iMX31: Add support to iMX31PDK board boots from NAND Flash
Magnus, --- On Wed, 10/22/08, Magnus Lilja [EMAIL PROTECTED] wrote: From: Magnus Lilja [EMAIL PROTECTED] Subject: Re: [U-Boot] [PATCH 3/3] iMX31: Add support to iMX31PDK board boots from NAND Flash To: Wolfgang Denk [EMAIL PROTECTED] Cc: u-boot@lists.denx.de, Alan Carvalho de Assis [EMAIL PROTECTED] Date: Wednesday, October 22, 2008, 4:52 PM 2008/10/22 Magnus Lilja [EMAIL PROTECTED]: Wolfgang, 2008/10/22 Wolfgang Denk [EMAIL PROTECTED]: Dear Magnus, In message [EMAIL PROTECTED] you wrote: I've updated the patch and it now almost compiles. There's a problem at the last link stage where gnu-ld complains about multiple __udivsi3 definitions and incompatible EABI formats (see below, modulo gmail wrapping). Try this patch which I posted today: ARM: Use do_div() instead of division for long long. That patch doesn't seem to touch any files that are involved in building i.MX31 boards. I might try the equivalent change though. Although it is a bit puzzling that I can build the i.MX31 Litekit board with the same toolchain. Ok, I've found what's triggering this. The PDK board has CONFIG_MX31_CLK32=32768 while Litekit has CONIFG_MX31_CLK32=32000. That difference nowadays causes problems when linking, I suppose that happened after the merging of CONFIG_MX31_TIMER_HIGH_PRECISION. Changing the TICK_TO_TIME macro in arm1176/mx31/interrupts.c to a construction that uses do_div() solves the problem. I don't have the PDK schematics here but since I decided to set CLK32 to 32768 I suppose the board uses that frequency. Yes, I confirmed with the schematics. There is a 32768kHz crystal connected to the PMIC that drives the MX31 clock. Regards, Fabio Estevam I haven't tried my new patch on real hardware yet, but I'll do that tomorrow and post a patch (without the do_div() fix though, perhaps someone else can do that?). /Magnus ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] [ONENAND] Reduce OneNAND IPL code size
To give more code at lowlevel_init at each boards Signed-off-by: Kyungmin Park [EMAIL PROTECTED] --- diff --git a/cpu/arm1136/start.S b/cpu/arm1136/start.S index e622338..132cc4a 100644 --- a/cpu/arm1136/start.S +++ b/cpu/arm1136/start.S @@ -33,23 +33,7 @@ .globl _start _start: b reset #ifdef CONFIG_ONENAND_IPL - ldr pc, _hang - ldr pc, _hang - ldr pc, _hang - ldr pc, _hang - ldr pc, _hang - ldr pc, _hang - ldr pc, _hang - -_hang: - .word do_hang - .word 0x12345678 - .word 0x12345678 - .word 0x12345678 - .word 0x12345678 - .word 0x12345678 - .word 0x12345678 - .word 0x12345678 /* now 16*4=64 */ + . = _start + 64 /* now 16*4=64 */ #else ldr pc, _undefined_instruction ldr pc, _software_interrupt @@ -362,12 +346,7 @@ cpu_init_crit: /* * exception handlers */ -#ifdef CONFIG_ONENAND_IPL - .align 5 -do_hang: - ldr sp, _TEXT_BASE /* use 32 words about stack */ - bl hang/* hang and never return */ -#else /* !CONFIG_ONENAND IPL */ +#ifndef CONFIG_ONENAND_IPL .align 5 undefined_instruction: get_bad_stack diff --git a/onenand_ipl/onenand_boot.c b/onenand_ipl/onenand_boot.c index aff62d2..2440d8b 100644 --- a/onenand_ipl/onenand_boot.c +++ b/onenand_ipl/onenand_boot.c @@ -39,6 +39,7 @@ int print_info(void) typedef int (init_fnc_t)(void); +#ifdef CONFIG_USE_ONENAND_INIT init_fnc_t *init_sequence[] = { board_init, /* basic board dependent setup */ #ifdef CONFIG_SYS_PRINTF @@ -47,24 +48,23 @@ init_fnc_t *init_sequence[] = { #endif NULL, }; +#endif void start_oneboot(void) { - init_fnc_t **init_fnc_ptr; uchar *buf; +#ifdef CONFIG_USE_ONENAND_INIT + init_fnc_t **init_fnc_ptr; for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) { if ((*init_fnc_ptr)() != 0) hang(); } +#endif buf = (uchar *) CONFIG_SYS_LOAD_ADDR; - if (!onenand_read_block0(buf)) - buf += ONENAND_BLOCK_SIZE; - - if (buf == (uchar *)CONFIG_SYS_LOAD_ADDR) - hang(); + onenand_read_block0(buf); /* go run U-Boot and never return */ printf(Starting OS Bootloader...\n); @@ -73,9 +73,11 @@ void start_oneboot(void) /* should never come here */ } +#ifdef CONFIG_USE_ONENAND_INIT void hang(void) { /* if board_hang() returns, hange here */ printf(X-Loader hangs\n); for (;;); } +#endif diff --git a/onenand_ipl/onenand_ipl.h b/onenand_ipl/onenand_ipl.h index 3387998..438e58c 100644 --- a/onenand_ipl/onenand_ipl.h +++ b/onenand_ipl/onenand_ipl.h @@ -23,7 +23,7 @@ #include linux/mtd/onenand_regs.h -#define ONENAND_BLOCK_SIZE 2048 +#define ONENAND_BLOCK_SIZE 0x2 #ifndef CONFIG_SYS_PRINTF #define printf(format, args...) @@ -39,5 +39,5 @@ #define ONENAND_PAGE_SIZE 2048 -extern int onenand_read_block0(unsigned char *buf); +extern void onenand_read_block0(unsigned char *buf); #endif diff --git a/onenand_ipl/onenand_read.c b/onenand_ipl/onenand_read.c index 6d04943..38703fb 100644 --- a/onenand_ipl/onenand_read.c +++ b/onenand_ipl/onenand_read.c @@ -1,5 +1,5 @@ /* - * (C) Copyright 2005-2008 Samsung Electronis + * (C) Copyright 2005-2008 Samsung Electronics * Kyungmin Park [EMAIL PROTECTED] * * See file CREDITS for list of people who contributed to this @@ -87,14 +87,16 @@ static inline int onenand_read_page(ulong block, ulong page, #define ONENAND_START_PAGE 1 #define ONENAND_PAGES_PER_BLOCK64 +#ifndef CONFIG_ONENAND_END_BLOCK +#define CONFIG_ONENAND_END_BLOCK 1 +#endif /** * onenand_read_block - Read a block data to buf - * @return 0 on success */ -int onenand_read_block0(unsigned char *buf) +void onenand_read_block0(unsigned char *buf) { - int page, offset = 0; + int block, page, offset = 0; int pagesize = ONENAND_PAGE_SIZE; /* MLC OneNAND has 4KiB page size */ @@ -103,12 +105,12 @@ int onenand_read_block0(unsigned char *buf) /* NOTE: you must read page from page 1 of block 0 */ /* read the block page by page*/ - for (page = ONENAND_START_PAGE; - page ONENAND_PAGES_PER_BLOCK; page++) { - - onenand_read_page(0, page, buf + offset, pagesize); - offset += pagesize; + page = ONENAND_START_PAGE; + for (block = 0; block CONFIG_ONENAND_END_BLOCK; block++) { + for (; page ONENAND_PAGES_PER_BLOCK; page++) { + onenand_read_page(block, page, buf + offset, pagesize); + offset += pagesize; + } + page = 0; } - - return 0; }
Re: [U-Boot] Hangs at relocation on 460EX Target
On Wed, Oct 22, 2008 at 07:12:30AM +0200, Stefan Roese wrote: Yes, there have been issues with the old autocalibration code on some boards. That's one reason that AMCC provided a new version just a few weeks ago: Thanks Stefan, I've got the hardware mostly working now. The new calibration code did work once I got past another issue. I'll try to describe it here b/c It *might* be a bug, but I wasn't 100% sure. First, I am using registered ecc dimms which appears to be handled in cpu/ppc4xx/44x_spd_ddr2.c However, what I found by observing the registers with the abatron was that the SDRAM_MCOPT1_RDEN was not set for the registered DIMM. Following the code, it looks like it should have been set if registered was set, but it does not appear that it worked correctly. So of course we were off by 1/2. I forced the bit in the mcopt1 variable and that fixed all the problems. Any thoughts or is there something I can try/contribute? Thanks Ayman ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 01/19] ColdFire: Remove linker file
I'm confused. Are you saying I need to apply these 19 patches to address the problem I'm having? ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Hangs at relocation on 460EX Target
On Thursday 23 October 2008, Ayman M. El-Khashab wrote: On Wed, Oct 22, 2008 at 07:12:30AM +0200, Stefan Roese wrote: Yes, there have been issues with the old autocalibration code on some boards. That's one reason that AMCC provided a new version just a few weeks ago: Thanks Stefan, I've got the hardware mostly working now. Great, congrats. The new calibration code did work once I got past another issue. I'll try to describe it here b/c It *might* be a bug, but I wasn't 100% sure. First, I am using registered ecc dimms which appears to be handled in cpu/ppc4xx/44x_spd_ddr2.c I personally have never used a registered DIMM on the 4xx systems. And I don't know of any systems that do. So it could be that this is still untested and buggy. However, what I found by observing the registers with the abatron was that the SDRAM_MCOPT1_RDEN was not set for the registered DIMM. Following the code, it looks like it should have been set if registered was set, but it does not appear that it worked correctly. So of course we were off by 1/2. I forced the bit in the mcopt1 variable and that fixed all the problems. Good. Any thoughts or is there something I can try/contribute? Best would be if you could provide a proper patch to fix this problem. Please see here: http://www.denx.de/wiki/view/U-Boot/Patches how this is done correctly. Best regards, Stefan = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: [EMAIL PROTECTED] = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot