Re: [U-Boot] [PATCH 1/2] net: sh_eth: add cache handling
Dear Wolfgang Denk, 2011/01/18 18:32, Wolfgang Denk wrote: Dear Yoshihiro Shimoda, In message 4d33c0da.4000...@renesas.com you wrote: --- a/drivers/net/sh_eth.c +++ b/drivers/net/sh_eth.c @@ -36,6 +36,12 @@ #ifndef CONFIG_SH_ETHER_PHY_ADDR # error Please define CONFIG_SH_ETHER_PHY_ADDR #endif +#ifdef CONFIG_SH_ETHER_CACHE_WRITEBACK +#define flush_cache_wback(addr, len)\ +dcache_wback_range((u32)addr, (u32)(addr + len - 1)) +#else +#define flush_cache_wback(...) +#endif New config options must be documented in the README. I will document about this option in the README. The README isn't written about the driver now, so I will document about this driver first. Best regards, Yoshihiro Shimoda ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V4 1/5] mv: seperate kirkwood and armada from common setting
Hi Wolfgang, On Wed, Jan 19, 2011 at 5:48 AM, Wolfgang Denk w...@denx.de wrote: Dear Lei Wen, In message 1294754710-7834-2-git-send-email-lei...@marvell.com you wrote: Since there are lots of difference between kirkwood and armada series, it is better to seperate them but still keep the most common file shared by all marvell platform in the mv-common configure file. This patch move the kirkwood only driver definitoin in mv-common to the soc_name/config.h. This patch is tested with compilation for armada100 and guruplug. Signed-off-by: Lei Wen lei...@marvell.com ... +#ifdef CONFIG_SYS_MVFS Is this a new CONFIG_SYS_* ? Please document it (in the README). Same for all other new CONFIG_* or CONFIG_SYS_*, please. I would post another patch set to fix the issues you mentioned... Best regards, Lei ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 7/7] Add support for Freescale's mx35pdk board.
Dear Stefano Babic, In message 1295012124-15551-7-git-send-email-sba...@denx.de you wrote: The patch adds suupport for the Freescale's mx35pdk board (known as well as mx35_3stack). The board boots from the NOR flash. Following devices are supported: - two ethernet devices (FEC and SMC911x on debug board) - I2C - PMIC (MC13892) via I2C interface - UART - NOR flash (64MB) - NAND flash (2GB) - basic access to mc9sdz60 registers via I2C interface Signed-off-by: Stefano Babic sba...@denx.de ... diff --git a/MAINTAINERS b/MAINTAINERS index d7cd09c..3abb4cb 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -554,6 +554,7 @@ Stefano Babic sba...@denx.de ea20davinci polaris xscale trizepsiv xscale + mx35pdk i.MX35 mx51evk i.MX51 vision2 i.MX51 Please sort list. diff --git a/MAKEALL b/MAKEALL index a732e6a..31dbfe1 100755 --- a/MAKEALL +++ b/MAKEALL @@ -409,6 +409,7 @@ LIST_ARM11= \ mx31ads \ mx31pdk \ mx31pdk_nand\ + mx35pdk \ qong\ smdk6400\ tnetv107x_evm \ NAK. We don't add boards to MAKEALL any more. They get auto-selcted from their entry in boards.cfg. -#define ARM_MMU_FIRST_LEVEL_DESCRIPTOR_ADDRESS(ttb_base, table_index) \ - (unsigned long *)((unsigned long)(ttb_base) + ((table_index) 2)) - -#define ARM_FIRST_LEVEL_PAGE_TABLE_SIZE 0x4000 - -#define ARM_MMU_SECTION(ttb_base, actual_base, virtual_base, \ - cacheable, bufferable, perm)\ - { \ - register union ARM_MMU_FIRST_LEVEL_DESCRIPTOR desc; \ - desc.word = 0; \ - desc.section.id = ARM_MMU_FIRST_LEVEL_SECTION_ID; \ - desc.section.domain = 0;\ - desc.section.c = (cacheable); \ - desc.section.b = (bufferable); \ - desc.section.ap = (perm); \ - desc.section.base_address = (actual_base); \ - *ARM_MMU_FIRST_LEVEL_DESCRIPTOR_ADDRESS(ttb_base, (virtual_base)) \ - = desc.word;\ - } - -#define X_ARM_MMU_SECTION(abase, vbase, size, cache, buff, access) \ - { \ - int i; int j = abase; int k = vbase;\ - for (i = size; i 0 ; i--, j++, k++) \ - ARM_MMU_SECTION(ttb_base, j, k, cache, buff, access); \ - } Here and everywhere else: Macros with multiple statements should be enclosed in a do - while block. diff --git a/board/freescale/mx35pdk/config.mk b/board/freescale/mx35pdk/config.mk new file mode 100644 index 000..3db1c85 --- /dev/null +++ b/board/freescale/mx35pdk/config.mk ... +CONFIG_SYS_TEXT_BASE = 0xA000 NAK. Please move CONFIG_SYS_TEXT_BASE into board config file and ditch config.mk +/* To support 133MHz DDR */ +.macro init_drive_strength +/* + mov r0, #0x2 + ldr r1, =IOMUXC_BASE_ADDR + add r1, r1, #0x368 +add r2, r1, #0x4C8 - 0x368 +1: str r0, [r1], #4 + cmp r1, r2 +ble 1b +*/ +.endm /* init_drive_strength */ Please remove dead code - please fix globally. Please use TAB for indentation - please fix globally. +int checkboard(void) +{ + u32 system_rev = get_cpu_rev(); + u32 board_rev = 0; + struct ccm_regs *ccm = + (struct ccm_regs *)IMX_CCM_BASE; + + puts(Board: MX35 3STACK ); Is this the correct board name? + board_rev = board_detect(); + + /* Print board revision */ + if (board_rev) + puts(2.0); + else + puts(1.0); Maybe board_detect() could return the board revision sirectly, so you can use a single printf for all this, like: printf(Board: mx35pdk %d.0, board_detect()); ? + /* Print CPU revision */ + puts( i.MX35 ); + if (system_rev CHIP_REV_2_0) + puts(2.0 [); + else + puts(1.0 [); Eventually something similar could / should be done here? --- /dev/null +++ b/doc/README.mx35pdk ... ... +NAND partitions can be recognized enabling in kernel CONFIG_MTD_REDBOOT_PARTS. +For this board, CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK should be set to 2. + +However, the setup in redboot is not correct and does not use the whole flash. + +Better solution is to use the kernel parameter mtdparts. Here the resulting script to be defined in RedBoot with fconfig: Lines too long. Please fix globally (at least in text). --- /dev/null +++
[U-Boot] [PATCH V5 0/5] Add Pantheon soc and dkb board support
This patch set add the Pantheon soc and dkb board support. V2: This patch seris update the seperate mv_common part as suggested. V3: Fix config.h include place and copyright claim year. V4: Add change log to each patch. V5: Add doc in Readme for new CONFIG_SYS_MVFS. code style fix. Lei Wen (5): mv: seperate kirkwood and armada from common setting ARM: Add Support for Marvell Pantheon Familiy SoCs serial: add pantheon soc support mvmfp: add MFP configuration support for PANTHEON Pantheon: Add Board Support for Marvell dkb board MAINTAINERS |4 + README|5 + arch/arm/cpu/arm926ejs/pantheon/Makefile | 46 ++ arch/arm/cpu/arm926ejs/pantheon/cpu.c | 78 + arch/arm/cpu/arm926ejs/pantheon/dram.c| 132 arch/arm/cpu/arm926ejs/pantheon/timer.c | 207 + arch/arm/include/asm/arch-armada100/config.h | 50 ++ arch/arm/include/asm/arch-kirkwood/config.h | 145 + arch/arm/include/asm/arch-pantheon/config.h | 44 ++ arch/arm/include/asm/arch-pantheon/cpu.h | 79 ++ arch/arm/include/asm/arch-pantheon/mfp.h | 41 + arch/arm/include/asm/arch-pantheon/pantheon.h | 54 +++ board/Marvell/dkb/Makefile| 51 ++ board/Marvell/dkb/dkb.c | 53 +++ boards.cfg|1 + drivers/gpio/mvmfp.c |2 + drivers/serial/serial.c |2 + include/configs/aspenite.h|1 + include/configs/dkb.h | 62 include/configs/mv-common.h | 147 +++--- 20 files changed, 1078 insertions(+), 126 deletions(-) create mode 100644 arch/arm/cpu/arm926ejs/pantheon/Makefile create mode 100644 arch/arm/cpu/arm926ejs/pantheon/cpu.c create mode 100644 arch/arm/cpu/arm926ejs/pantheon/dram.c create mode 100644 arch/arm/cpu/arm926ejs/pantheon/timer.c create mode 100644 arch/arm/include/asm/arch-armada100/config.h create mode 100644 arch/arm/include/asm/arch-kirkwood/config.h create mode 100644 arch/arm/include/asm/arch-pantheon/config.h create mode 100644 arch/arm/include/asm/arch-pantheon/cpu.h create mode 100644 arch/arm/include/asm/arch-pantheon/mfp.h create mode 100644 arch/arm/include/asm/arch-pantheon/pantheon.h create mode 100644 board/Marvell/dkb/Makefile create mode 100644 board/Marvell/dkb/dkb.c create mode 100644 include/configs/dkb.h ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH V5 1/5] mv: seperate kirkwood and armada from common setting
Since there are lots of difference between kirkwood and armada series, it is better to seperate them but still keep the most common file shared by all marvell platform in the mv-common configure file. This patch move the kirkwood only driver definitoin in mv-common to the soc_name/config.h. This patch is tested with compilation for armada100 and guruplug. Signed-off-by: Lei Wen lei...@marvell.com --- V2: This patch seris update the seperate mv_common part as suggested. V3: Fix config.h include place and copyright claim year. V4: Add change log to each patch. V5: Add CONFIG_SYS_MVFS doc in README. README |5 + arch/arm/include/asm/arch-armada100/config.h | 50 + arch/arm/include/asm/arch-kirkwood/config.h | 145 + include/configs/aspenite.h |1 + include/configs/mv-common.h | 147 -- 5 files changed, 222 insertions(+), 126 deletions(-) create mode 100644 arch/arm/include/asm/arch-armada100/config.h create mode 100644 arch/arm/include/asm/arch-kirkwood/config.h diff --git a/README b/README index 68f5fb0..7bfd7ef 100644 --- a/README +++ b/README @@ -319,6 +319,11 @@ The following options need to be configured: CONFIG_SYS_PQ2FADS - PQ2FADS-ZU or PQ2FADS-VR CONFIG_SYS_8272ADS - MPC8272ADS +- Marvell Family Member + CONFIG_SYS_MVFS - define it if you want to enable + multiply fs option at one time + for marvell soc family + - MPC824X Family Member (if CONFIG_MPC824X is defined) Define exactly one of CONFIG_MPC8240, CONFIG_MPC8245 diff --git a/arch/arm/include/asm/arch-armada100/config.h b/arch/arm/include/asm/arch-armada100/config.h new file mode 100644 index 000..9995b1a --- /dev/null +++ b/arch/arm/include/asm/arch-armada100/config.h @@ -0,0 +1,50 @@ +/* + * (C) Copyright 2010 + * Marvell Semiconductor www.marvell.com + * Written-by: Lei Wen lei...@marvell.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., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301 USA + */ + +/* + * This file should be included in board config header file. + * + * It supports common definitions for Armada100 platform + */ + +#ifndef _ARMD1_CONFIG_H +#define _ARMD1_CONFIG_H + +#define CONFIG_ARM926EJS 1 /* Basic Architecture */ + +#define CONFIG_SYS_TCLK(14745600) /* NS16550 clk config */ +#define CONFIG_SYS_HZ_CLOCK(325) /* Timer Freq. 3.25MHZ */ +#define CONFIG_MARVELL_MFP /* Enable mvmfp driver */ +#define MV_MFPR_BASE ARMD1_MFPR_BASE +#define MV_UART_CONSOLE_BASE ARMD1_UART1_BASE +#define CONFIG_SYS_NS16550_IER (1 6)/* Bit 6 in UART_IER register + represents UART Unit Enable */ +/* + * There is no internal RAM in ARMADA100, using DRAM + * TBD: dcache to be used for this + */ +#define CONFIG_SYS_INIT_SP_ADDR(CONFIG_SYS_TEXT_BASE - 0x0020) +#define CONFIG_NR_DRAM_BANKS_MAX 2 + +#endif /* _ARMD1_CONFIG_H */ diff --git a/arch/arm/include/asm/arch-kirkwood/config.h b/arch/arm/include/asm/arch-kirkwood/config.h new file mode 100644 index 000..7c6d63b --- /dev/null +++ b/arch/arm/include/asm/arch-kirkwood/config.h @@ -0,0 +1,145 @@ +/* + * (C) Copyright 2010 + * Marvell Semiconductor www.marvell.com + * Written-by: Lei Wen lei...@marvell.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
Re: [U-Boot] [PATCH] sh: add support for sh7757lcr board
Dear Wolfgang Denk, 2011/01/18 18:36, Wolfgang Denk wrote: Dear Yoshihiro Shimoda, In message 4d3547b8.6020...@renesas.com you wrote: Is this nesseary? The #sinclude is not nessesary. I will remove it. However the LDSCRIPT is necessary on this board because the LSI needs the top of address when booting. Please ditch the whole config.mk file and define LDSCRIPT in your board config file. Oh, I didn't know the CONFIG_SYS_LDSCRIPT option. I will ditch and modify the board config file. Best regards, Yoshihiro Shimoda ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/5] ARM: Add Support for Marvell Pantheon Familiy SoCs
Pantheon Family processors are highly integrated SoCs based on Sheeva_88SV331x-v5 PJ1 cpu core. Ref: http://www.marvell.com/products/processors/communications/marvell_pantheon_910_920_pb.pdf SoC versions Supported: 1) PANTHEON920 (TD) 2) PANTHEON910 (TTC) Signed-off-by: Lei Wen lei...@marvell.com --- V2: V3: Fix copyright claim year. V4: Add change log to each patch. V5: coding style fix. arch/arm/cpu/arm926ejs/pantheon/Makefile | 46 ++ arch/arm/cpu/arm926ejs/pantheon/cpu.c | 78 + arch/arm/cpu/arm926ejs/pantheon/dram.c| 132 arch/arm/cpu/arm926ejs/pantheon/timer.c | 207 + arch/arm/include/asm/arch-pantheon/config.h | 44 ++ arch/arm/include/asm/arch-pantheon/cpu.h | 79 ++ arch/arm/include/asm/arch-pantheon/pantheon.h | 54 +++ 7 files changed, 640 insertions(+), 0 deletions(-) create mode 100644 arch/arm/cpu/arm926ejs/pantheon/Makefile create mode 100644 arch/arm/cpu/arm926ejs/pantheon/cpu.c create mode 100644 arch/arm/cpu/arm926ejs/pantheon/dram.c create mode 100644 arch/arm/cpu/arm926ejs/pantheon/timer.c create mode 100644 arch/arm/include/asm/arch-pantheon/config.h create mode 100644 arch/arm/include/asm/arch-pantheon/cpu.h create mode 100644 arch/arm/include/asm/arch-pantheon/pantheon.h diff --git a/arch/arm/cpu/arm926ejs/pantheon/Makefile b/arch/arm/cpu/arm926ejs/pantheon/Makefile new file mode 100644 index 000..73644c7 --- /dev/null +++ b/arch/arm/cpu/arm926ejs/pantheon/Makefile @@ -0,0 +1,46 @@ +# +# (C) Copyright 2010 +# Marvell Semiconductor www.marvell.com +# Written-by: Lei Wen lei...@marvell.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., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301 USA +# + +include $(TOPDIR)/config.mk + +LIB= $(obj)lib$(SOC).o + +COBJS-y= cpu.o timer.o dram.o + +SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) +OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS-y)) + +all: $(obj).depend $(LIB) + +$(LIB):$(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/arch/arm/cpu/arm926ejs/pantheon/cpu.c b/arch/arm/cpu/arm926ejs/pantheon/cpu.c new file mode 100644 index 000..fd006af --- /dev/null +++ b/arch/arm/cpu/arm926ejs/pantheon/cpu.c @@ -0,0 +1,78 @@ +/* + * (C) Copyright 2010 + * Marvell Semiconductor www.marvell.com + * Written-by: Lei Wen lei...@marvell.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., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301 USA + */ + +#include common.h +#include asm/arch/pantheon.h +#include asm/io.h + +#define UARTCLK14745KHZ(APBC_APBCLK | APBC_FNCLK | APBC_FNCLKSEL(1)) +#define SET_MRVL_ID(18) +#define L2C_RAM_SEL(14) + +int arch_cpu_init(void) +{ + u32 val; + struct panthcpu_registers *cpuregs = + (struct panthcpu_registers*) PANTHEON_CPU_BASE; + + struct panthapb_registers *apbclkres = + (struct panthapb_registers*) PANTHEON_APBC_BASE; + + struct panthmpmu_registers *mpmu = + (struct panthmpmu_registers*) PANTHEON_MPMU_BASE; + + /* set SEL_MRVL_ID bit in PANTHEON_CPU_CONF register */ + val = readl(cpuregs-cpu_conf); + val = val | SET_MRVL_ID; + writel(val, cpuregs-cpu_conf); + + /* Turn on clock gating (PMUM_CCGR) */ +
[U-Boot] [PATCH 3/5] serial: add pantheon soc support
Signed-off-by: Lei Wen lei...@marvell.com --- V2: V3: Fix copyright claim year. V4: Add change log to each patch. V5: drivers/serial/serial.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c index cd3439e..4032dfd 100644 --- a/drivers/serial/serial.c +++ b/drivers/serial/serial.c @@ -33,6 +33,8 @@ #include asm/arch/orion5x.h #elif defined(CONFIG_ARMADA100) #include asm/arch/armada100.h +#elif defined(CONFIG_PANTHEON) +#include asm/arch/pantheon.h #endif #if defined (CONFIG_SERIAL_MULTI) -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 4/5] mvmfp: add MFP configuration support for PANTHEON
This patch adds the support MFP support for Marvell PANTHEON SoCs Signed-off-by: Lei Wen lei...@marvell.com --- V2: V3: Fix copyright claim year. V4: Add change log to each patch. V5: coding style fix. arch/arm/include/asm/arch-pantheon/mfp.h | 41 ++ drivers/gpio/mvmfp.c |2 + 2 files changed, 43 insertions(+), 0 deletions(-) create mode 100644 arch/arm/include/asm/arch-pantheon/mfp.h diff --git a/arch/arm/include/asm/arch-pantheon/mfp.h b/arch/arm/include/asm/arch-pantheon/mfp.h new file mode 100644 index 000..ce3aca1 --- /dev/null +++ b/arch/arm/include/asm/arch-pantheon/mfp.h @@ -0,0 +1,41 @@ +/* + * Based on arch/arm/include/asm/arch-armada100/mfp.h + * (C) Copyright 2010 + * Marvell Semiconductor www.marvell.com + * Written-by: Lei Wen lei...@marvell.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., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301 USA + */ + +#ifndef __PANTHEON_MFP_H +#define __PANTHEON_MFP_H + +/* + * Frequently used MFP Configuration macros for all PANTHEON family of SoCs + * + * offset, pull,pF, drv,dF, edge,eF ,afn,aF + */ +/* UART2 */ +#define MFP47_UART2_RXDMFP_REG(0x198) | MFP_AF6 | MFP_DRIVE_MEDIUM +#define MFP48_UART2_TXDMFP_REG(0x19c) | MFP_AF6 | MFP_DRIVE_MEDIUM + +/* More macros can be defined here... */ + +#define MFP_PIN_MAX117 +#endif diff --git a/drivers/gpio/mvmfp.c b/drivers/gpio/mvmfp.c index 5646ed4..e7830c6 100644 --- a/drivers/gpio/mvmfp.c +++ b/drivers/gpio/mvmfp.c @@ -28,6 +28,8 @@ #include asm/arch/mfp.h #ifdef CONFIG_ARMADA100 #include asm/arch/armada100.h +#elif defined(CONFIG_PANTHEON) +#include asm/arch/pantheon.h #else #error Unsupported SoC... #endif -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 5/5] Pantheon: Add Board Support for Marvell dkb board
DKB is a Development Board for PANTHEON TD/TTC(pxa920/pxa910) with * Processor upto 806Mhz * LPDDR1/2 * x8/x16 SLC/MLC NAND * Footprints for eMMC MMC x8 card With Peripherals: * Parallel LCD I/F * Audio codecs (88PM8607) * MIPI CSI-2 camera * Marvell 88W8787 802.11n/BT module * Marvell 2G/3G RF * Dual analog mics speakers, headset jack, LED, ambient * USB2.0 HS host, OTG (mini AB) * GPIO, GPIO expander with DIP switches for easier selection * UART serial over USB, CIR This patch adds basic board support with DRAM and UART functionality Signed-off-by: Lei Wen lei...@marvell.com --- V2: V3: Fix copyright claim year. V4: Add change log to each patch. V5: Remove additional CONFIG_SYS_NS16550_COM1 definition in dkb.h MAINTAINERS|4 +++ board/Marvell/dkb/Makefile | 51 board/Marvell/dkb/dkb.c| 53 + boards.cfg |1 + include/configs/dkb.h | 62 5 files changed, 171 insertions(+), 0 deletions(-) create mode 100644 board/Marvell/dkb/Makefile create mode 100644 board/Marvell/dkb/dkb.c create mode 100644 include/configs/dkb.h diff --git a/MAINTAINERS b/MAINTAINERS index 96fad4b..0a37a01 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -839,6 +839,10 @@ Prafulla Wadaskar prafu...@marvell.com rd6281a ARM926EJS (Kirkwood SoC) sheevaplug ARM926EJS (Kirkwood SoC) +Lei Wen lei...@marvell.com + + dkb ARM926EJS (PANTHEON 88AP920 SOC) + Matthias Weisser weiss...@arcor.de jadecpu ARM926EJS (MB86R01 SoC) diff --git a/board/Marvell/dkb/Makefile b/board/Marvell/dkb/Makefile new file mode 100644 index 000..8835f8e --- /dev/null +++ b/board/Marvell/dkb/Makefile @@ -0,0 +1,51 @@ +# +# (C) Copyright 2010 +# Marvell Semiconductor www.marvell.com +# Written-by: Lei Wen lei...@marvell.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., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301 USA +# + +include $(TOPDIR)/config.mk + +LIB = $(obj)lib$(BOARD).o + +COBJS := dkb.o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB):$(obj).depend $(OBJS) $(SOBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) + +clean: + rm -f $(SOBJS) $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak .depend + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/board/Marvell/dkb/dkb.c b/board/Marvell/dkb/dkb.c new file mode 100644 index 000..1dd199b --- /dev/null +++ b/board/Marvell/dkb/dkb.c @@ -0,0 +1,53 @@ +/* + * (C) Copyright 2010 + * Marvell Semiconductor www.marvell.com + * Written-by: Lei Wen lei...@marvell.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., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301 USA + */ + +#include common.h +#include mvmfp.h +#include asm/arch/mfp.h + +DECLARE_GLOBAL_DATA_PTR; + +int board_early_init_f(void) +{ + u32 mfp_cfg[] = { + /* Enable Console on UART2 */ + MFP47_UART2_RXD, + MFP48_UART2_TXD, + + MFP_EOC /*End of configureation*/ + }; + /* configure MFP's */ + mfp_config(mfp_cfg); + + return 0; +} + +int board_init(void) +{ + /* arch number of Board */ +
Re: [U-Boot] [PATCH 1/2] powerpc/85xx: Add Support for Freescale P1010 Processor
Dear Kumar Gala, In message 1295023271-11897-1-git-send-email-ga...@kernel.crashing.org you wrote: From: Poonam Aggrwal poonam.aggr...@freescale.com Key Features include of the P1010: * e500v2 core frequency operation of 500 to 800 MHz * Power consumption less than 5.0 W at 800 MHz core speed * Dual SATA 3 Gbps controllers with integrated PHY * Dual PCI Express controllers * Three 10/100/1000 Mbps enhanced triple-speed Ethernet controllers (eTSECs) * TCP/IP acceleration and classification capabilities * IEEE 1588 support * Lossless flow control * RGMII, SGMII * DDR3 with support for a 32-bit data interface (40 bits including ECC), up to 800 MHz data rate 32/16-bit DDR3 memory controller * Dedicated security engine featuring trusted boot * TDM interface * Dual controller area networks (FlexCAN) controller * SD/MMC card controller supporting booting from Flash cards * USB 2.0 host and device controller with an on-chip, high-speed PHY * Integrated Flash controller (IFC) * Power Management Controller (PMC) * Four-channel, general-purpose DMA controller * I2C controller * Serial peripheral interface (SPI) controller with master and slave support * System timers including a periodic interrupt timer, real-time clock, software watchdog timer, and four general-purpose timers * Dual DUARTs Signed-off-by: Poonam Aggrwal poonam.aggr...@freescale.com Signed-off-by: Dipen Dudhat dipen.dud...@freescale.com Signed-off-by: Kumar Gala ga...@kernel.crashing.org ... --- a/arch/powerpc/include/asm/config.h +++ b/arch/powerpc/include/asm/config.h @@ -69,14 +69,16 @@ /* Enable TSEC2.0 for the platforms that have it if we are using TSEC */ #if defined(CONFIG_TSEC_ENET) \ -(defined(CONFIG_P1020) || defined(CONFIG_P1011)) +(defined(CONFIG_P1010) || \ + defined(CONFIG_P1020) || defined(CONFIG_P1011)) Please keep list sorted. 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: w...@denx.de Nobody goes to that restaurant anymore. It's too crowded. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] powerpc/85xx: Add Support for Freescale P1014 Processor
Dear Kumar Gala, In message 1295023271-11897-2-git-send-email-ga...@kernel.crashing.org you wrote: From: Poonam Aggrwal poonam.aggr...@freescale.com The P1014 is similar to the P1010 processor with the following differences: - 16bit DDR with ECC. (P1010 has 32bit DDR w/o ECC) - no eCAN interface. (P1010 has 2 eCAN interfaces) - Two SGMII interface (P1010 has 3 SGMII) - No secure boot ... --- a/arch/powerpc/include/asm/config.h +++ b/arch/powerpc/include/asm/config.h @@ -69,7 +69,7 @@ /* Enable TSEC2.0 for the platforms that have it if we are using TSEC */ #if defined(CONFIG_TSEC_ENET) \ -(defined(CONFIG_P1010) || \ +(defined(CONFIG_P1010) || defined(CONFIG_P1014) || \ defined(CONFIG_P1020) || defined(CONFIG_P1011)) Please sort list. diff --git a/drivers/misc/fsl_law.c b/drivers/misc/fsl_law.c index 931cc71..d2b0cde 100644 --- a/drivers/misc/fsl_law.c +++ b/drivers/misc/fsl_law.c @@ -38,7 +38,7 @@ DECLARE_GLOBAL_DATA_PTR; defined(CONFIG_MPC8641) || defined(CONFIG_MPC8610) #define FSL_HW_NUM_LAWS 10 #elif defined(CONFIG_MPC8536) || defined(CONFIG_MPC8572) || \ - defined(CONFIG_P1010) || \ + defined(CONFIG_P1010) || defined(CONFIG_P1014) || \ defined(CONFIG_P1011) || defined(CONFIG_P1020) || \ defined(CONFIG_P1012) || defined(CONFIG_P1021) || \ defined(CONFIG_P1013) || defined(CONFIG_P1022) || \ Ditto. 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: w...@denx.de Horses just naturally have mohawk haircuts. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] sh: add support for sh7757lcr board
Dear Yoshihiro Shimoda, In message 4d33c15c.9030...@renesas.com you wrote: The R0P7757LC0030RL board has SH7757, 256MB DDR3-SDRAM, SPI ROM, Ethernet, and more. This patch supports the following functions: - 256MB DDR3-SDRAM - SPI ROM - Ethernet Signed-off-by: Yoshihiro Shimoda yoshihiro.shimoda...@renesas.com --- arch/sh/include/asm/cpu_sh4.h |2 + arch/sh/include/asm/cpu_sh7757.h| 263 +++ board/renesas/sh7757lcr/Makefile| 42 +++ board/renesas/sh7757lcr/config.mk | 28 ++ board/renesas/sh7757lcr/lowlevel_init.S | 558 +++ board/renesas/sh7757lcr/sh7757lcr.c | 436 board/renesas/sh7757lcr/spi-boot.c | 111 ++ board/renesas/sh7757lcr/u-boot.lds | 101 ++ boards.cfg |1 + doc/README.sh7757lcr| 64 include/configs/sh7757lcr.h | 143 11 files changed, 1749 insertions(+), 0 deletions(-) create mode 100644 arch/sh/include/asm/cpu_sh7757.h create mode 100644 board/renesas/sh7757lcr/Makefile create mode 100644 board/renesas/sh7757lcr/config.mk create mode 100644 board/renesas/sh7757lcr/lowlevel_init.S create mode 100644 board/renesas/sh7757lcr/sh7757lcr.c create mode 100644 board/renesas/sh7757lcr/spi-boot.c create mode 100644 board/renesas/sh7757lcr/u-boot.lds create mode 100644 doc/README.sh7757lcr create mode 100644 include/configs/sh7757lcr.h Entry to MAINTAINERS missing. ... +/* TMU0 */ +#define TSTR 0xFE430004 +#define TOCR 0xFE43 +#define TSTR00xFE430004 +#define TCOR00xFE430008 +#define TCNT00xFE43000C +#define TCR0 0xFE430010 +#define TCOR10xFE430014 +#define TCNT10xFE430018 +#define TCR1 0xFE43001C +#define TCOR20xFE430020 +#define TCNT20xFE430024 +#define TCR2 0xFE430028 +#define TCPR20xFE43002C Please use C structs to describe hardware registers. ... +/* DDR3IF */ +#define DDR3IF_BASE 0xfe80 +#define DBSTATE0 (DDR3IF_BASE + 0x0008) +#define DBSTATE1 (DDR3IF_BASE + 0x000c) +#define DBACEN (DDR3IF_BASE + 0x0010) +#define DBRFEN (DDR3IF_BASE + 0x0014) +#define DBCMD(DDR3IF_BASE + 0x0018) +#define DBWAIT (DDR3IF_BASE + 0x001c) +#define DBKIND (DDR3IF_BASE + 0x0020) +#define DBCONF (DDR3IF_BASE + 0x0024) +#define DBTR0(DDR3IF_BASE + 0x0040) +#define DBTR1(DDR3IF_BASE + 0x0044) +#define DBTR2(DDR3IF_BASE + 0x0048) +#define DBTR3(DDR3IF_BASE + 0x0050) +#define DBTR4(DDR3IF_BASE + 0x0054) +#define DBTR5(DDR3IF_BASE + 0x0058) +#define DBTR6(DDR3IF_BASE + 0x005c) +#define DBTR7(DDR3IF_BASE + 0x0060) +#define DBTR8(DDR3IF_BASE + 0x0064) +#define DBTR9(DDR3IF_BASE + 0x0068) +#define DBTR10 (DDR3IF_BASE + 0x006c) +#define DBTR11 (DDR3IF_BASE + 0x0070) +#define DBTR12 (DDR3IF_BASE + 0x0074) +#define DBTR13 (DDR3IF_BASE + 0x0078) +#define DBTR14 (DDR3IF_BASE + 0x007c) +#define DBTR15 (DDR3IF_BASE + 0x0080) +#define DBTR16 (DDR3IF_BASE + 0x0084) +#define DBTR17 (DDR3IF_BASE + 0x0088) +#define DBTR18 (DDR3IF_BASE + 0x008c) +#define DBTR19 (DDR3IF_BASE + 0x0090) +#define DBADJ0 (DDR3IF_BASE + 0x00c0) +#define DBADJ1 (DDR3IF_BASE + 0x00c4) +#define DBADJ2 (DDR3IF_BASE + 0x00c8) +#define DBADJ3 (DDR3IF_BASE + 0x00cc) +#define DBRFCNF0 (DDR3IF_BASE + 0x00e0) +#define DBRFCNF1 (DDR3IF_BASE + 0x00e4) +#define DBRFCNF2 (DDR3IF_BASE + 0x00e8) +#define DBCALCNF (DDR3IF_BASE + 0x00f4) +#define DBRNK0 (DDR3IF_BASE + 0x0100) +#define DBPDCNT0 (DDR3IF_BASE + 0x0200) +#define DBPDCNT1 (DDR3IF_BASE + 0x0204) +#define DBPDCNT2 (DDR3IF_BASE + 0x0208) +#define DBPDCNT3 (DDR3IF_BASE + 0x020c) +#define DBPDLCK (DDR3IF_BASE + 0x0280) +#define DBPDRGA (DDR3IF_BASE + 0x0290) +#define DBPDRGD (DDR3IF_BASE + 0x02a0) +#define DBBS0CNT0(DDR3IF_BASE + 0x0300) +#define DBBS0CNT1(DDR3IF_BASE + 0x0304) We don't allow base address + offset notation to access hardware registers. Please use C structs instead. Please fix globally. Thanks. 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: w...@denx.de
Re: [U-Boot] [PATCH] sh: Fix MigoR of boards.cfg
Dear Nobuhiro Iwamatsu, In message 1295269288-12468-1-git-send-email-iwama...@nigauri.org you wrote: There is not break character between board name and CPU. Signed-off-by: Nobuhiro Iwamatsu iwama...@nigauri.org --- boards.cfg |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Applied, thanks. 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: w...@denx.de Prediction is very difficult, especially of the future. - Niels Bohr ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Hash problem...
Dear Peter Barada, In message 4d34c85e.4030...@logicpd.com you wrote: After spending an entire day digging into the hash using GDB/BDI on my ARM board, I've findally figured out that the hash key of ramdiskimage and preboot are the same modulus 347, and this is problematic because on the initial hash import, preboot is placed into the hash first (at idx 190 since the table is sorted), and then ramdiskimage collides with preboot causing the 2nd probe (at idx 191) to occur which works fine. Unfortunately as part of the housecleaning, preboot is deleted and the environemnt saved. The delete of preboot removes entry at idx 190 and the next lookup of ramdiskimage sees that idx 190 is empty and believes that the ramdiskimage is not in the table ionstead of rehashing to find it at idx 191. Thanks for debugging this. The hash delete code is in error; instead of just removing the deleted key, it should instead allocate a new hashtable, hash all the keys into the new table except for the deleted key and then reclaim the old table (and deleted key). Can you please come up with a patch? 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: w...@denx.de Wagner's music is better than it sounds. - Mark Twain ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Pull request 85xx
Dear Kumar Gala, In message Pine.LNX.4.64.1101172245100.2066@localhost.localdomain you wrote: The following changes since commit e1ccf97c5d7651664d37c0c5aa243874b8851b2d: Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx (2011-01-17 20:31:46 +0100) are available in the git repository at: git://git.denx.de/u-boot-mpc85xx master Haiying Wang (1): 8xxx/ddr: add support to only compute the ddr sdram size Kumar Gala (4): powerpc/85xx: Move RESET_VECTOR_ADDRESS into config.h powerpc/p3041: Add various p3041 specific information powerpc/p5020: Add various p5020 specific information powerpc/p2040: Add various p2040 specific information Poonam Aggrwal (2): powerpc/85xx: Add Support for Freescale P1010 Processor powerpc/85xx: Add Support for Freescale P1014 Processor Prabhakar (1): Fix wrong CONFIG_SYS_MPC85xx_SERDES1_ADDR Not pulled, as I've asked for changes to the P1010 and P1014 patches. 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: w...@denx.de I can't say I've ever been lost, but I was bewildered once for three days. - Daniel Boone (Attributed) ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Fix defines needed to enable command sha1sum
Dear Alexander Holler, In message 1295340488-10494-1-git-send-email-hol...@ahsoftware.de you wrote: Documented is CONFIG_CMD_SHA1, through confusion in the source CONFIG_CMD_SHA1 and CONFIG_CMD_SHA1SUM has to be used to enable sha1sum. Fix both, the documentation and the source, so that only CONFIG_CMD_SHA1SUM is needed to enable the command sha1sum. Signed-off-by: Alexander Holler hol...@ahsoftware.de --- README |2 +- common/cmd_mem.c |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) Applied, thanks. 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: w...@denx.de News is what a chap who doesn't care much about anything wants to read. And it's only news until he's read it. After that it's dead. - Evelyn Waugh _Scoop_ (1938) bk. 1, ch. 5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Do not copy elf section to same adress
Dear Matthias Weisser, In message 1295367283-4696-1-git-send-email-weiss...@arcor.de you wrote: When an elf section is already at the right position (e.g. after image decompression by bootm) there is no need to copy it. Signed-off-by: Matthias Weisser weiss...@arcor.de --- common/cmd_elf.c |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/common/cmd_elf.c b/common/cmd_elf.c index bf32612..aec4579 100644 --- a/common/cmd_elf.c +++ b/common/cmd_elf.c @@ -342,9 +342,10 @@ static unsigned long load_elf_image_shdr(unsigned long addr) memset ((void *)shdr-sh_addr, 0, shdr-sh_size); } else { image = (unsigned char *) addr + shdr-sh_offset; - memcpy ((void *) shdr-sh_addr, - (const void *) image, - shdr-sh_size); + if ((void *) shdr-sh_addr != (void *) image) + memcpy((void *) shdr-sh_addr, + (const void *) image, + shdr-sh_size); Braces required for multi-line statement. 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: w...@denx.de Egotist: A person of low taste, more interested in himself than in me. - Ambrose Bierce ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 1/1] imximage: Add MX53 boot image support
Dear Jason Liu, In message 1295382963-32356-1-git-send-email-r64...@freescale.com you wrote: This patch add the MX53 boot image support. This patch has been tested on Freescale MX53EVK board and MX51EVK board. Signed-off-by: Jason Liu r64...@freescale.com --- Changes for v2: - Address the following comments from Stefano, - Get rid of #ifdef in the imximage.h and .c file and use the runtime check for imximage version - Document the IMXIMAGE_VERSION definiton in doc/README.imximage - Move mx53evk/config.mk and mx53evk/imximage.cfg to MX53EVK board support patch. Changes for v3: - Address the following comments from Stefano, - Not change the mx51evk file. The code should take VERSION=1 as default, and we do not need to change the actual boards. - add a note in the documentation and raise an error in code if the VERSION command is read after any other suitable commands. - Change command IMXIMAGE_VERSION simply to IMAGE_VERSION - Need recognize the version directly from its structure and not storing the version into the header when do header verify and print. - Use function pointer to simpliy the code when the version of header is recognized Changes for v4: - Address the following comments from Wolfgang, - Keep the imximage_cmds table sorted, - Add braces for (expx) (expy) gloably, really? see below. - Return failure to upper call if met errors for function - Add comments for function set_dcd_rst_v1 alike, - Re-orgnize code to avoid deep nesting, --- ... + if ((fhdr_v1-app_code_barker == APP_CODE_BARKER) + (hdr_v1-dcd_table.preamble.barker == DCD_BARKER)) + + return IMXIMAGE_V1; + + /* Try to detect V2 */ + if ((fhdr_v2-header.tag == IVT_HEADER_TAG) + (hdr_v2-dcd_table.header.tag == DCD_HEADER_TAG)) + + return IMXIMAGE_V2; These two need braces. 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: w...@denx.de Administration: An ingenious abstraction in politics, designed to receive the kicks and cuffs due to the premier or president. - Ambrose Bierce ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] usage of DMA
Hi Marcel, Marcel wrote: Could you enable debug output for ether.c and for your UDC driver and show the results? I enabled a lot of extra debugging messages so this is not very short. The output attached below is including start of macb but USB device behave the same when I don't enable that. [...] USB network up! ep3 status = 1040c40 rx_submit size 1 = 1570 size 2 = 2081 size 3 = 2048 ep2: queue req 77fec8f0, len 2048 udc: invalid request NO REQUEST BUF Received ETH pack : 00 00 00 00 00 00 00 00 ERROR: rx submit -- -22 at ether.c:1289/rx_submit() ### main_loop entered: bootdelay=3 ### main_loop: bootcmd=mtdparts default; nand read 0x7100 nand0,0; bootm 0x7100 Hit any key to stop autoboot: 0 Sam9g45 First, I don't completely understand how do you use the gadget driver. You do not run any commands from u-boot prompt and your bootcmd does not have any network actions. Why your usb gadget driver becomes started? Second, could you add the following debug printout into rx_submit and check that NetRxPackets is really initialized? @@ -1261,6 +1261,8 @@ static int rx_submit(struct eth_dev *dev req-length = size; req-complete = rx_complete; + printf(NetRxPackets[0] = %p !!!\n, NetRxPackets[0]); + retval = usb_ep_queue(dev-out_ep, req, gfp_flags); if (retval) --- Since NetRxPackets is defined as an array of pointers, it needs to be initialized. And NetLoop does this: volatile uchar *NetRxPackets[PKTBUFSRX]; ... int NetLoop(proto_t protocol) { bd_t *bd = gd-bd; ... if (!NetTxPacket) { int i; /* * Setup packet buffers, aligned correctly. */ NetTxPacket = PktBuf[0] + (PKTALIGN - 1); NetTxPacket -= (ulong)NetTxPacket % PKTALIGN; for (i = 0; i PKTBUFSRX; i++) { NetRxPackets[i] = NetTxPacket + (i+1)*PKTSIZE_ALIGN; } } ... So I fear that your gadget is started manually. You should not do that! The only thing that you can do with your udc driver during the board initialization is the following: static struct usba_platform_data usba_pdata = { ... }; int board_eth_init(bd_t *bis) { int rc = 0; #if defined(CONFIG_USB_ETHER) defined(CONFIG_USB_GADGET_ATMEL_USBA) rc = usba_udc_probe(usba_pdata); if (!rc) rc = usb_eth_initialize(bis); #endif return rc; } If you want to autoboot from tftp you should specify bootcmd environment variable to something like tftp uImage; bootm. And always use usb gadget only with network commands like tftp, dhcp, ping, etc. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] powerpc/85xx: Add Support for Freescale P1014 Processor
Please sort list. diff --git a/drivers/misc/fsl_law.c b/drivers/misc/fsl_law.c index 931cc71..d2b0cde 100644 --- a/drivers/misc/fsl_law.c +++ b/drivers/misc/fsl_law.c @@ -38,7 +38,7 @@ DECLARE_GLOBAL_DATA_PTR; defined(CONFIG_MPC8641) || defined(CONFIG_MPC8610) #define FSL_HW_NUM_LAWS 10 #elif defined(CONFIG_MPC8536) || defined(CONFIG_MPC8572) || \ - defined(CONFIG_P1010) || \ + defined(CONFIG_P1010) || defined(CONFIG_P1014) || \ defined(CONFIG_P1011) || defined(CONFIG_P1020) || \ defined(CONFIG_P1012) || defined(CONFIG_P1021) || \ defined(CONFIG_P1013) || defined(CONFIG_P1022) || \ Ditto. The sorting of this list has always been non-alphabetical as we kept single dual core defines together. I'd rather leave this as is and clean up all of them in one swoop. I'll post the cleanup patch shortly. - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/3] MC13892: Add SWx buck switchers definitions
On 01/18/2011 08:30 PM, Marek Vasut wrote: Define voltages configurable on SWx buck switchers. Signed-off-by: Marek Vasut marek.va...@gmail.com --- include/mc13892.h | 35 +++ 1 files changed, 35 insertions(+), 0 deletions(-) Acked-by: Stefano Babic sba...@denx.de Best regards, Stefano Babic -- = 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: off...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Diferences about CONFIG_SYS_LOAD_ADDR and CONFIG_LOAD_ADDR
H All, why this double definitions? Aren't they the same thing? Thanks -- Ing. Fabio Giovagnini Aurion s.r.l. P.I e C.F. 00885711200 skype: aurion.giovagnini Tel. +39.051.594.78.24 Fax. +39.051.082.14.49 Cell. +39.335.83.50.919 www.aurion-tech.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/3] MX51EVK: Use SWx macros in PMIC init
On 01/18/2011 08:30 PM, Marek Vasut wrote: Signed-off-by: Marek Vasut marek.va...@gmail.com --- board/freescale/mx51evk/mx51evk.c |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/board/freescale/mx51evk/mx51evk.c b/board/freescale/mx51evk/mx51evk.c index 2160d5a..bcf1934 100644 --- a/board/freescale/mx51evk/mx51evk.c +++ b/board/freescale/mx51evk/mx51evk.c Acked-by: Stefano babic sba...@denx.de Thanks to fix this board, too. Best regards, Stefano Babic -- = 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: off...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] powerpc/8xxx: Introduce 85xx, 86xx, QorIQ config headers
Add new headers that capture common defines for a given SoC/processor rather than duplicating that information in board config.h and random other places. Eventually this should be handled by Kconfig defconfigs Signed-off-by: Kumar Gala ga...@kernel.crashing.org --- * I know its late for such a patch, but I think it best to introduce right after the merge window closes so that patches for the next release deal with it and I didn't require everyone else to deal with for this merge window Also I think its a beneficial cleanup to address several long standing code duplication problems. arch/powerpc/include/asm/config.h | 41 ++- arch/powerpc/include/asm/config_mpc85xx.h | 187 + arch/powerpc/include/asm/config_mpc86xx.h | 38 ++ drivers/misc/fsl_law.c| 22 + include/configs/P4080DS.h | 16 --- 5 files changed, 236 insertions(+), 68 deletions(-) create mode 100644 arch/powerpc/include/asm/config_mpc85xx.h create mode 100644 arch/powerpc/include/asm/config_mpc86xx.h diff --git a/arch/powerpc/include/asm/config.h b/arch/powerpc/include/asm/config.h index 1b9c47b..2b6b233 100644 --- a/arch/powerpc/include/asm/config.h +++ b/arch/powerpc/include/asm/config.h @@ -21,6 +21,14 @@ #ifndef _ASM_CONFIG_H_ #define _ASM_CONFIG_H_ +#ifdef CONFIG_MPC85xx +#include asm/config_mpc85xx.h +#endif + +#ifdef CONFIG_MPC86xx +#include asm/config_mpc86xx.h +#endif + #define CONFIG_LMB #define CONFIG_SYS_BOOT_RAMDISK_HIGH #define CONFIG_SYS_BOOT_GET_CMDLINE @@ -43,19 +51,7 @@ #endif #endif -#if defined(CONFIG_MPC8572) || defined(CONFIG_P1020) || \ - defined(CONFIG_P1021) || defined(CONFIG_P1022) || \ - defined(CONFIG_P2020) || defined(CONFIG_MPC8641) -#define CONFIG_MAX_CPUS2 -#elif defined(CONFIG_PPC_P2040) -#define CONFIG_MAX_CPUS4 -#elif defined(CONFIG_PPC_P3041) -#define CONFIG_MAX_CPUS4 -#elif defined(CONFIG_PPC_P4080) -#define CONFIG_MAX_CPUS8 -#elif defined(CONFIG_PPC_P5020) -#define CONFIG_MAX_CPUS2 -#else +#ifndef CONFIG_MAX_CPUS #define CONFIG_MAX_CPUS1 #endif @@ -69,30 +65,13 @@ #endif #endif -/* Enable TSEC2.0 for the platforms that have it if we are using TSEC */ -#if defined(CONFIG_TSEC_ENET) \ -(defined(CONFIG_P1010) || defined(CONFIG_P1014) || \ - defined(CONFIG_P1020) || defined(CONFIG_P1011)) -#define CONFIG_TSECV2 -#endif - /* * SEC (crypto unit) major compatible version determination */ -#if defined(CONFIG_FSL_CORENET) || \ -defined(CONFIG_P1010) || defined(CONFIG_P1014) -#define CONFIG_SYS_FSL_SEC_COMPAT 4 -#elif defined(CONFIG_MPC85xx) || defined(CONFIG_MPC83xx) +#if defined(CONFIG_MPC83xx) #define CONFIG_SYS_FSL_SEC_COMPAT 2 #endif -/* Number of TLB CAM entries we have on FSL Book-E chips */ -#if defined(CONFIG_E500MC) -#define CONFIG_SYS_NUM_TLBCAMS 64 -#elif defined(CONFIG_E500) -#define CONFIG_SYS_NUM_TLBCAMS 16 -#endif - /* Since so many PPC SOCs have a semi-common LBC, define this here */ #if defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx) || \ defined(CONFIG_MPC83xx) diff --git a/arch/powerpc/include/asm/config_mpc85xx.h b/arch/powerpc/include/asm/config_mpc85xx.h new file mode 100644 index 000..8ba6c7e --- /dev/null +++ b/arch/powerpc/include/asm/config_mpc85xx.h @@ -0,0 +1,187 @@ +/* + * Copyright 2011 Freescale Semiconductor, Inc. + * + * 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 _ASM_MPC85xx_CONFIG_H_ +#define _ASM_MPC85xx_CONFIG_H_ + +/* SoC specific defines for Freescale MPC85xx (PQ3) and QorIQ processors */ + +/* Number of TLB CAM entries we have on FSL Book-E chips */ +#if defined(CONFIG_E500MC) +#define CONFIG_SYS_NUM_TLBCAMS 64 +#elif defined(CONFIG_E500) +#define CONFIG_SYS_NUM_TLBCAMS 16 +#endif + +#if defined(CONFIG_MPC8536) +#define CONFIG_MAX_CPUS1 +#define CONFIG_SYS_FSL_NUM_LAWS12 +#define CONFIG_SYS_FSL_SEC_COMPAT 2 + +#elif defined(CONFIG_MPC8540) +#define CONFIG_MAX_CPUS1 +#define CONFIG_SYS_FSL_NUM_LAWS8 + +#elif defined(CONFIG_MPC8541) +#define CONFIG_MAX_CPUS1 +#define
Re: [U-Boot] [PATCH] powerpc/8xxx: Introduce 85xx, 86xx, QorIQ config headers
Wolfgang, Please take a look. I'd like to see this go in for v2011.03 to clean up the both the order issue, but also establish a cleaner means to handle SoC specific defines for 85xx/86xx/QorIQ going forward. (will be helpful for things like SoC specific errata not having to get put into every board config.h, as well as remove duplication in those files -- which can wait for post v2011.03). - k On Jan 19, 2011, at 3:27 AM, Kumar Gala wrote: Add new headers that capture common defines for a given SoC/processor rather than duplicating that information in board config.h and random other places. Eventually this should be handled by Kconfig defconfigs Signed-off-by: Kumar Gala ga...@kernel.crashing.org --- * I know its late for such a patch, but I think it best to introduce right after the merge window closes so that patches for the next release deal with it and I didn't require everyone else to deal with for this merge window Also I think its a beneficial cleanup to address several long standing code duplication problems. arch/powerpc/include/asm/config.h | 41 ++- arch/powerpc/include/asm/config_mpc85xx.h | 187 + arch/powerpc/include/asm/config_mpc86xx.h | 38 ++ drivers/misc/fsl_law.c| 22 + include/configs/P4080DS.h | 16 --- 5 files changed, 236 insertions(+), 68 deletions(-) create mode 100644 arch/powerpc/include/asm/config_mpc85xx.h create mode 100644 arch/powerpc/include/asm/config_mpc86xx.h diff --git a/arch/powerpc/include/asm/config.h b/arch/powerpc/include/asm/config.h index 1b9c47b..2b6b233 100644 --- a/arch/powerpc/include/asm/config.h +++ b/arch/powerpc/include/asm/config.h @@ -21,6 +21,14 @@ #ifndef _ASM_CONFIG_H_ #define _ASM_CONFIG_H_ +#ifdef CONFIG_MPC85xx +#include asm/config_mpc85xx.h +#endif + +#ifdef CONFIG_MPC86xx +#include asm/config_mpc86xx.h +#endif + #define CONFIG_LMB #define CONFIG_SYS_BOOT_RAMDISK_HIGH #define CONFIG_SYS_BOOT_GET_CMDLINE @@ -43,19 +51,7 @@ #endif #endif -#if defined(CONFIG_MPC8572) || defined(CONFIG_P1020) || \ - defined(CONFIG_P1021) || defined(CONFIG_P1022) || \ - defined(CONFIG_P2020) || defined(CONFIG_MPC8641) -#define CONFIG_MAX_CPUS 2 -#elif defined(CONFIG_PPC_P2040) -#define CONFIG_MAX_CPUS 4 -#elif defined(CONFIG_PPC_P3041) -#define CONFIG_MAX_CPUS 4 -#elif defined(CONFIG_PPC_P4080) -#define CONFIG_MAX_CPUS 8 -#elif defined(CONFIG_PPC_P5020) -#define CONFIG_MAX_CPUS 2 -#else +#ifndef CONFIG_MAX_CPUS #define CONFIG_MAX_CPUS 1 #endif @@ -69,30 +65,13 @@ #endif #endif -/* Enable TSEC2.0 for the platforms that have it if we are using TSEC */ -#if defined(CONFIG_TSEC_ENET) \ -(defined(CONFIG_P1010) || defined(CONFIG_P1014) || \ - defined(CONFIG_P1020) || defined(CONFIG_P1011)) -#define CONFIG_TSECV2 -#endif - /* * SEC (crypto unit) major compatible version determination */ -#if defined(CONFIG_FSL_CORENET) || \ -defined(CONFIG_P1010) || defined(CONFIG_P1014) -#define CONFIG_SYS_FSL_SEC_COMPAT4 -#elif defined(CONFIG_MPC85xx) || defined(CONFIG_MPC83xx) +#if defined(CONFIG_MPC83xx) #define CONFIG_SYS_FSL_SEC_COMPAT 2 #endif -/* Number of TLB CAM entries we have on FSL Book-E chips */ -#if defined(CONFIG_E500MC) -#define CONFIG_SYS_NUM_TLBCAMS 64 -#elif defined(CONFIG_E500) -#define CONFIG_SYS_NUM_TLBCAMS 16 -#endif - /* Since so many PPC SOCs have a semi-common LBC, define this here */ #if defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx) || \ defined(CONFIG_MPC83xx) diff --git a/arch/powerpc/include/asm/config_mpc85xx.h b/arch/powerpc/include/asm/config_mpc85xx.h new file mode 100644 index 000..8ba6c7e --- /dev/null +++ b/arch/powerpc/include/asm/config_mpc85xx.h @@ -0,0 +1,187 @@ +/* + * Copyright 2011 Freescale Semiconductor, Inc. + * + * 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 _ASM_MPC85xx_CONFIG_H_ +#define _ASM_MPC85xx_CONFIG_H_ + +/* SoC specific defines for Freescale MPC85xx (PQ3) and QorIQ processors */ + +/* Number of TLB CAM entries we have on FSL Book-E chips */ +#if
[U-Boot] [PATCH] UEC: Fix compiler warnings introduced by linux/mii.h change
Patch 8ef583a0 [miiphy: convert to linux/mii.h] introduced the following compiler warnings in the uec ethernet driver: In file included from /local/home/galak/git/u-boot-85xx/include/miiphy.h:37:0, from uec.c:32: /local/home/galak/git/u-boot-85xx/include/linux/mii.h:133:0: warning: LPA_1000FULL redefined uec_phy.h:34:0: note: this is the location of the previous definition /local/home/galak/git/u-boot-85xx/include/linux/mii.h:134:0: warning: LPA_1000HALF redefined uec_phy.h:35:0: note: this is the location of the previous definition In file included from /local/home/galak/git/u-boot-85xx/include/miiphy.h:37:0, from uec_phy.c:27: /local/home/galak/git/u-boot-85xx/include/linux/mii.h:133:0: warning: LPA_1000FULL redefined uec_phy.h:34:0: note: this is the location of the previous definition /local/home/galak/git/u-boot-85xx/include/linux/mii.h:134:0: warning: LPA_1000HALF redefined uec_phy.h:35:0: note: this is the location of the previous definition Fix them be removing the duplication in the uec code and utlizing the linux/mii.h version instead. Signed-off-by: Kumar Gala ga...@kernel.crashing.org --- drivers/qe/uec_phy.c | 16 drivers/qe/uec_phy.h | 12 +--- 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/drivers/qe/uec_phy.c b/drivers/qe/uec_phy.c index 465a497..55c2622 100644 --- a/drivers/qe/uec_phy.c +++ b/drivers/qe/uec_phy.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005,2010 Freescale Semiconductor, Inc. + * Copyright (C) 2005,2010-2011 Freescale Semiconductor, Inc. * * Author: Shlomi Gridish * @@ -313,14 +313,14 @@ static int gbit_config_aneg (struct uec_mii_info *mii_info) config_genmii_advert (mii_info); advertise = mii_info-advertising; - adv = phy_read (mii_info, MII_1000BASETCONTROL); - adv = ~(MII_1000BASETCONTROL_FULLDUPLEXCAP | -MII_1000BASETCONTROL_HALFDUPLEXCAP); + adv = phy_read (mii_info, MII_CTRL1000); + adv = ~(ADVERTISE_1000FULL | +ADVERTISE_1000HALF); if (advertise SUPPORTED_1000baseT_Half) - adv |= MII_1000BASETCONTROL_HALFDUPLEXCAP; + adv |= ADVERTISE_1000HALF; if (advertise SUPPORTED_1000baseT_Full) - adv |= MII_1000BASETCONTROL_FULLDUPLEXCAP; - phy_write (mii_info, MII_1000BASETCONTROL, adv); + adv |= ADVERTISE_1000FULL; + phy_write (mii_info, MII_CTRL1000, adv); /* Start/Restart aneg */ genmii_restart_aneg (mii_info); @@ -420,7 +420,7 @@ static int genmii_read_status (struct uec_mii_info *mii_info) return err; if (mii_info-autoneg) { - status = phy_read(mii_info, MII_1000BASETSTATUS); + status = phy_read(mii_info, MII_STAT1000); if (status (LPA_1000FULL | LPA_1000HALF)) { mii_info-speed = SPEED_1000; diff --git a/drivers/qe/uec_phy.h b/drivers/qe/uec_phy.h index 929d9bd..f924b2a 100644 --- a/drivers/qe/uec_phy.h +++ b/drivers/qe/uec_phy.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005 Freescale Semiconductor, Inc. + * Copyright (C) 2005, 2011 Freescale Semiconductor, Inc. * * Author: Shlomi Gridish grid...@freescale.com * @@ -24,16 +24,6 @@ #define UGETH_AN_TIMEOUT 2000 -/* 1000BT control (Marvell BCM54xx at least) */ -#define MII_1000BASETCONTROL 0x09 -#define MII_1000BASETCONTROL_FULLDUPLEXCAP0x0200 -#define MII_1000BASETCONTROL_HALFDUPLEXCAP0x0100 - -/* 1000BT status */ -#define MII_1000BASETSTATUS0x0a -#define LPA_1000FULL 0x0400 -#define LPA_1000HALF 0x0200 - /* Cicada Extended Control Register 1 */ #define MII_CIS8201_EXT_CON1 0x17 #define MII_CIS8201_EXTCON1_INIT0x -- 1.6.0.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/7] Add support for MX35 processor
On 01/19/2011 08:35 AM, Wolfgang Denk wrote: Dear Stefano Babic, +if (!reg) { +reg = __REG(ROMPATCH_REV); __REG()? It should not be.. NAK. Please use I/O accessors. Please fix globally. I supposed to have already replaced all of them, but I have missed some of them. +void imx_get_mac_from_fuse(unsigned char *mac) +{ +int i; + +for (i = 0; i 6; i++) +mac[i] = 0; memset(mac, 0, 6); ? I think your question mark is related to the fact that it is not so clear why I set the mac address to all zero. At first glance, it makes no sense. However, the reason is that the i.MX35 does not have a MAC address stored in its internal fuses as other i.MX processors (i.MX27/i.MX25/i.MX51), but I want to expose the same interface for all i.MX processors. In this way, I can avoid nasty #ifdef in code. As I can see in u-boot code, the exception now in code is the i.MX31, that was the first i.MX processor added to mainline. It has still a lot of own functions (I mean, something like mx31_*, such as mx31_gpio. mx31_iomux, and so on). What do these ! markers mean? They have no useful meaning and I must drop them. +/* + * This function is used to configure a pin through the IOMUX module. + * FIXED ME: for backward compatible. Will be static function! + * @param pin a pin number as defined in \b #iomux_pin_name_t + * @param cfg an output function as defined in \b #iomux_pin_cfg_t + * + * @return 0 if successful; Non-zero otherwise When does the otherwise happen? + */ +static int iomux_config_mux(iomux_pin_name_t pin, iomux_pin_cfg_t cfg) +{ +u32 mux_reg = PIN_TO_IOMUX_MUX(pin); + +if (mux_reg != NON_MUX_I) { +mux_reg += IOMUXGPR; +__REG(mux_reg) = cfg; +} + +return 0; +} Should we make this function return void ? iomux_config_mux is already void for mx5 processors. Of course, it must return void for MX35, too. And mxc_request_mux as well. I will check all these functions to remove inconsistencies. +/* delay x useconds AND perserve advance timstamp value */ +/* GPTCNT is now supposed to tick 1 by 1 us. */ s/perserve/preserve/ ? Incorrect multiline comment style. Thanks, I will fix it. diff --git a/arch/arm/include/asm/arch-mx35/imx-regs.h b/arch/arm/include/asm/arch-mx35/imx-regs.h new file mode 100644 index 000..f382960 --- /dev/null +++ b/arch/arm/include/asm/arch-mx35/imx-regs.h ... +#define __REG(x) (*((volatile u32 *)(x))) +#define __REG16(x) (*((volatile u16 *)(x))) +#define __REG8(x)(*((volatile u8 *)(x))) NAK!! Please use I/O accessors. Please fix globally. Of course - I will fix it. +/* CCM */ +#define CLKCTL_CCMR 0x00 +#define CLKCTL_PDR0 0x04 +#define CLKCTL_PDR1 0x08 +#define CLKCTL_PDR2 0x0C +#define CLKCTL_PDR3 0x10 +#define CLKCTL_PDR4 0x14 +#define CLKCTL_RCSR 0x18 +#define CLKCTL_MPCTL0x1C +#define CLKCTL_PPCTL0x20 +#define CLKCTL_ACMR 0x24 +#define CLKCTL_COSR 0x28 +#define CLKCTL_CGR0 0x2C +#define CLKCTL_CGR1 0x30 +#define CLKCTL_CGR2 0x34 +#define CLKCTL_CGR3 0x38 NAK!! Please use C struct. Please fix globally. No, this not. I have already set a structure for the Clock Module, that it is used in most part of code (ccm_regs). However, these offsets are used in the assembly file (lowlevel_init.S), and I cannot use the structure. It seems to me the only structure needed, and it seems to me not necessary to add an asm-offsets.h only for it. For this reason. I let it in imx-regs.h +extern unsigned int get_board_rev(void); +extern int is_soc_rev(int rev); +extern int sdhc_init(void); + +#define fixup_before_linux \ +{ \ +volatile unsigned long *l2cc_ctl = (unsigned long *)0x3100;\ 0x3100 ? Don't we have a #define for it? I have already removed the usage of this macro, I forget to drop its define. Thanks, I will remove it. Please fix these license headers - all of these. They say where you can _get_ License Version 2 or later, but they don't say which version actually applies. Please make clear that License v2+ applies. I will check this issue globally. Best regards, Stefano Babic -- = 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: off...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/7] mxc_i2c: Add support for the i.MX35 processor
On 01/19/2011 08:37 AM, Wolfgang Denk wrote: Dear Stefano Babic, In message 1295012124-15551-3-git-send-email-sba...@denx.de you wrote: Signed-off-by: Stefano Babic sba...@denx.de Add a Cc: Heiko Schocher h...@denx.de here so the responsible custodian is on Cc: -#error define CONFIG_SYS_I2C_MX31_PORTx to use the mx31 I2C driver +#error define CONFIG_SYS_I2C_MXXX_PORTx to use the mx I2C driver Please make this CONFIG_SYS_I2C_MXxx_PORTx or similar; text containing XXX triggers some spam filters. Yes, really! I admit I never thought to this kind of problem. Of course, I will change the name ! Best regards, Stefano Babic -- = 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: off...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6] mpq101: initial support for Mercury Computer Systems MPQ101 board
+/* + * For booting Linux, the board info and command line data + * have to be in the first 16 MB of memory, since this is + * the maximum mapped by the Linux kernel during initialization. + */ +#define CONFIG_SYS_BOOTMAPSZ (16 20) /* Initial Memory map for Linux*/ + You might also want to set: #define CONFIG_SYS_BOOTM_LEN (16 20) /* Increase max gunzip size */ to match BOOTMAPSZ. Sorry, I keep nit picking ;) Can you, please, assure me, that when this particular line is corrected the patch will be accepted? If not, what possible additional problems do you see there? ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 7/7] Add support for Freescale's mx35pdk board.
On 01/19/2011 09:06 AM, Wolfgang Denk wrote: diff --git a/MAINTAINERS b/MAINTAINERS index d7cd09c..3abb4cb 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -554,6 +554,7 @@ Stefano Babic sba...@denx.de ea20davinci polaris xscale trizepsiv xscale +mx35pdk i.MX35 mx51evk i.MX51 vision2 i.MX51 Please sort list. Agree. diff --git a/MAKEALL b/MAKEALL index a732e6a..31dbfe1 100755 --- a/MAKEALL +++ b/MAKEALL @@ -409,6 +409,7 @@ LIST_ARM11= \ mx31ads \ mx31pdk \ mx31pdk_nand\ +mx35pdk \ qong\ smdk6400\ tnetv107x_evm \ NAK. We don't add boards to MAKEALL any more. They get auto-selcted from their entry in boards.cfg. I missed the point, I wil lfix it. -#define X_ARM_MMU_SECTION(abase, vbase, size, cache, buff, access) \ -{ \ -int i; int j = abase; int k = vbase;\ -for (i = size; i 0 ; i--, j++, k++) \ -ARM_MMU_SECTION(ttb_base, j, k, cache, buff, access); \ -} Here and everywhere else: Macros with multiple statements should be enclosed in a do - while block. The patch removes for mistake this file, that does not really exist in u-boot. I have aklready fixed it. +CONFIG_SYS_TEXT_BASE = 0xA000 NAK. Please move CONFIG_SYS_TEXT_BASE into board config file and ditch config.mk Thanks, I have understood now how it works. +int checkboard(void) +{ +u32 system_rev = get_cpu_rev(); +u32 board_rev = 0; +struct ccm_regs *ccm = +(struct ccm_regs *)IMX_CCM_BASE; + +puts(Board: MX35 3STACK ); Is this the correct board name? I will change it as MX35PDK +board_rev = board_detect(); + +/* Print board revision */ +if (board_rev) +puts(2.0); +else +puts(1.0); Maybe board_detect() could return the board revision sirectly, so you can use a single printf for all this, like: printf(Board: mx35pdk %d.0, board_detect()); ? +/* Print CPU revision */ +puts( i.MX35 ); +if (system_rev CHIP_REV_2_0) +puts(2.0 [); +else +puts(1.0 [); Eventually something similar could / should be done here? Yes, this should be (get_cpu_rev() CHIP_REV_2_0) ... +NAND partitions can be recognized enabling in kernel CONFIG_MTD_REDBOOT_PARTS. +For this board, CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK should be set to 2. + +However, the setup in redboot is not correct and does not use the whole flash. + +Better solution is to use the kernel parameter mtdparts. Here the resulting script to be defined in RedBoot with fconfig: Lines too long. Please fix globally (at least in text). Ok ... +#define CONFIG_EXTRA_ENV_SETTINGS \ ... +uboot=u-boot.bin\0\ +kernel_addr_r=0x8080\0\ +kernel=uImage\0 \ Default locations are boardname/u-boot.bin resp. boardname/uImage. +prg_uboot=tftpboot ${loadaddr} ${uboot}; \ +protect off ${uboot_addr} 0xa003; \ +erase ${uboot_addr} 0xa003; \ +cp.b ${loadaddr} ${uboot_addr} ${filesize}; \ +setenv filesize;saveenv\0 We usually split this into load and update steps, so you don;t automatically erase your flash even when the download failed. I will change it. Best regards, Stefano Babic -- = 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: off...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 6/7] mxc_spi: add support for i.MX35 processor
On 01/19/2011 08:48 AM, Wolfgang Denk wrote: Dear Stefano Babic, In message 1295012124-15551-6-git-send-email-sba...@denx.de you wrote: Signed-off-by: Stefano Babic sba...@denx.de --- drivers/spi/mxc_spi.c | 96 + 1 files changed, 73 insertions(+), 23 deletions(-) diff --git a/drivers/spi/mxc_spi.c b/drivers/spi/mxc_spi.c index d558137..b353c83 100644 --- a/drivers/spi/mxc_spi.c +++ b/drivers/spi/mxc_spi.c @@ -70,6 +70,8 @@ static unsigned long spi_bases[] = { 0x53f84000, }; +#define spi_cfg spi_cfg_mx3 ... +#define spi_cfg spi_cfg_mx51 Hm... this repeats below, but in the end both spi_cfg_mx3() and spi_cfg_mx51() are just static functions within the same source file, with #ifdef's around them so only one can ever be enabled at a time. You are right, there is already an #ifdef. I think I had in mind to remove the #ifdef surrounding the functions, but I give up because I have added unneeded code (mx51 code for mx3 and viceversa). I will fix it. I suggest you omit all these #define spi_cfg lines and rename both versions of these functions into spi_cfg_mx(). +#define MXC_CSPIRXDATA 0x00 +#define MXC_CSPITXDATA 0x04 +#define MXC_CSPICTRL0x08 +#define MXC_CSPIINT 0x0C +#define MXC_CSPIDMA 0x10 +#define MXC_CSPISTAT0x14 +#define MXC_CSPIPERIOD 0x18 +#define MXC_CSPITEST0x1C As mentioned before: please use a C struct. This is another issue. I agree that is ugly code, but it comes from the originally written driver for the i.MX31. This issue should be fixed, but in a separate patch, and for all supported processors (MX.31/MX.25/MX.51/MX.35). There are at the moment two other patches by Anatolji regarding this driver. I have already rebased one of them and post to the ML, but I admit that, as they are not in the same patchset, it is quite difficult to have an overview of the changes. My proposal is that I will add these other two patches to my patchset to simplify review. Best regards,. Stefano Babic -- = 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: off...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] mkimage -a address1 -e address2 ; could address1 and address2 be the same?
Thanks -- Ing. Fabio Giovagnini Aurion s.r.l. P.I e C.F. 00885711200 skype: aurion.giovagnini Tel. +39.051.594.78.24 Fax. +39.051.082.14.49 Cell. +39.335.83.50.919 www.aurion-tech.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/3] MX51EVK: Use SWx macros in PMIC init
Hello. On 18-01-2011 22:30, Marek Vasut wrote: Signed-off-by: Marek Vasutmarek.va...@gmail.com diff --git a/board/freescale/mx51evk/mx51evk.c b/board/freescale/mx51evk/mx51evk.c index 2160d5a..bcf1934 100644 --- a/board/freescale/mx51evk/mx51evk.c +++ b/board/freescale/mx51evk/mx51evk.c @@ -198,17 +198,18 @@ static void power_init(void) /* Set core voltage to 1.1V */ val = pmic_reg_read(REG_SW_0); - val = (val (~0x1F)) | 0x14; + val = (val (~SWx_VOLT_MASK)) | SWx_1_100V; pmic_reg_write(REG_SW_0, val); /* Setup VCC (SW2) to 1.25 */ val = pmic_reg_read(REG_SW_1); - val = (val (~0x1F)) | 0x1A; + val = (val (~SWx_VOLT_MASK)) | SWx_1_250V; + pmic_reg_write(REG_SW_1, val); /* Setup 1V2_DIG1 (SW3) to 1.25 */ val = pmic_reg_read(REG_SW_2); - val = (val (~0x1F)) | 0x1A; + val = (val (~SWx_VOLT_MASK)) | SWx_1_250V; Could drop the useless parens around ~x, while at it... WBR, Sergei ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH V2] Do not copy elf section to same adress
When an elf section is already at the right position (e.g. after image decompression by bootm) there is no need to copy it. This saves some ms when bootig an elf image. Changes since V1 - Fixed style issues Signed-off-by: Matthias Weisser weiss...@arcor.de --- common/cmd_elf.c |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/common/cmd_elf.c b/common/cmd_elf.c index bf32612..3537769 100644 --- a/common/cmd_elf.c +++ b/common/cmd_elf.c @@ -342,9 +342,11 @@ static unsigned long load_elf_image_shdr(unsigned long addr) memset ((void *)shdr-sh_addr, 0, shdr-sh_size); } else { image = (unsigned char *) addr + shdr-sh_offset; - memcpy ((void *) shdr-sh_addr, - (const void *) image, - shdr-sh_size); + if ((void *) shdr-sh_addr != (void *) image) { + memcpy((void *) shdr-sh_addr, + (const void *) image, + shdr-sh_size); + } } flush_cache (shdr-sh_addr, shdr-sh_size); } -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/3 RESEND] MX51EVK: Use SWx macros in PMIC init
On 19-01-2011 2:19, Marek Vasut wrote: Signed-off-by: Marek Vasutmarek.va...@gmail.com [...] diff --git a/board/freescale/mx51evk/mx51evk.c b/board/freescale/mx51evk/mx51evk.c index 2160d5a..bcf1934 100644 --- a/board/freescale/mx51evk/mx51evk.c +++ b/board/freescale/mx51evk/mx51evk.c @@ -198,17 +198,18 @@ static void power_init(void) /* Set core voltage to 1.1V */ val = pmic_reg_read(REG_SW_0); - val = (val (~0x1F)) | 0x14; + val = (val (~SWx_VOLT_MASK)) | SWx_1_100V; pmic_reg_write(REG_SW_0, val); /* Setup VCC (SW2) to 1.25 */ val = pmic_reg_read(REG_SW_1); - val = (val (~0x1F)) | 0x1A; + val = (val (~SWx_VOLT_MASK)) | SWx_1_250V; + Stray newline? WBR, Sergei ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Diferences about CONFIG_SYS_LOAD_ADDR and CONFIG_LOAD_ADDR
Dear Fabio Giovagnini, In message 201101191011.23174.fabio.giovagn...@aurion-tech.com you wrote: why this double definitions? Historical reasons. Aren't they the same thing? Yes, they are. Cleanup patches are welcome. 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: w...@denx.de Calm down, it's *__only* ones and zeroes. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/7] Add support for MX35 processor
Dear Stefano Babic, In message 4d36b2af.9000...@denx.de you wrote: +void imx_get_mac_from_fuse(unsigned char *mac) +{ + int i; + + for (i = 0; i 6; i++) + mac[i] = 0; memset(mac, 0, 6); ? I think your question mark is related to the fact that it is not so clear why I set the mac address to all zero. At first glance, it makes no sense. No, I wonder why code a loop when a simple memset() does the same. What do these ! markers mean? They have no useful meaning and I must drop them. There are other such cryptic markers - eventually from some doc generating tool. +/* CCM */ +#define CLKCTL_CCMR 0x00 +#define CLKCTL_PDR0 0x04 +#define CLKCTL_PDR1 0x08 +#define CLKCTL_PDR2 0x0C +#define CLKCTL_PDR3 0x10 +#define CLKCTL_PDR4 0x14 +#define CLKCTL_RCSR 0x18 +#define CLKCTL_MPCTL 0x1C +#define CLKCTL_PPCTL 0x20 +#define CLKCTL_ACMR 0x24 +#define CLKCTL_COSR 0x28 +#define CLKCTL_CGR0 0x2C +#define CLKCTL_CGR1 0x30 +#define CLKCTL_CGR2 0x34 +#define CLKCTL_CGR3 0x38 NAK!! Please use C struct. Please fix globally. No, this not. I have already set a structure for the Clock Module, that If you already have a struct, then drop these duplication. it is used in most part of code (ccm_regs). However, these offsets are used in the assembly file (lowlevel_init.S), and I cannot use the structure. It seems to me the only structure needed, and it seems to me not necessary to add an asm-offsets.h only for it. For this reason. I let it in imx-regs.h Such duplication of information is just a source of errors. And asm-offsets.h has been provided exactly for the purpose to avoid such #defines. Please use it. 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: w...@denx.de Those who hate and fight must stop themselves -- otherwise it is not stopped. -- Spock, Day of the Dove, stardate unknown ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 6/7] mxc_spi: add support for i.MX35 processor
Dear Stefano Babic, In message 4d36b845.1000...@denx.de you wrote: ... There are at the moment two other patches by Anatolji regarding this driver. I have already rebased one of them and post to the ML, but I admit that, as they are not in the same patchset, it is quite difficult to have an overview of the changes. My proposal is that I will add these other two patches to my patchset to simplify review. That's fine with me, then. 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: w...@denx.de How many QA engineers does it take to screw in a lightbulb? 3: 1 to screw it in and 2 to say I told you so when it doesn't work. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] mkimage -a address1 -e address2 ; could address1 and address2 be the same?
Dear Fabio Giovagnini, In message 201101191135.58566.fabio.giovagn...@aurion-tech.com you wrote: Thanks Depending on the actual system behaviour this may or may not be ok. For example, nearly all PowerArchitecture systems use address1=0 and address2=0. 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: w...@denx.de Was heißt Windows auf Indianisch? - Weißer Mann, der auf Sanduhr wartet! ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] sh: add support for sh7757lcr board
Dear Wolfgang Denk, Thank you for your review. 2011/01/19 17:28, Wolfgang Denk wrote: arch/sh/include/asm/cpu_sh4.h |2 + arch/sh/include/asm/cpu_sh7757.h| 263 +++ board/renesas/sh7757lcr/Makefile| 42 +++ board/renesas/sh7757lcr/config.mk | 28 ++ board/renesas/sh7757lcr/lowlevel_init.S | 558 +++ board/renesas/sh7757lcr/sh7757lcr.c | 436 board/renesas/sh7757lcr/spi-boot.c | 111 ++ board/renesas/sh7757lcr/u-boot.lds | 101 ++ boards.cfg |1 + doc/README.sh7757lcr| 64 include/configs/sh7757lcr.h | 143 11 files changed, 1749 insertions(+), 0 deletions(-) create mode 100644 arch/sh/include/asm/cpu_sh7757.h create mode 100644 board/renesas/sh7757lcr/Makefile create mode 100644 board/renesas/sh7757lcr/config.mk create mode 100644 board/renesas/sh7757lcr/lowlevel_init.S create mode 100644 board/renesas/sh7757lcr/sh7757lcr.c create mode 100644 board/renesas/sh7757lcr/spi-boot.c create mode 100644 board/renesas/sh7757lcr/u-boot.lds create mode 100644 doc/README.sh7757lcr create mode 100644 include/configs/sh7757lcr.h Entry to MAINTAINERS missing. Sorry, I will modify the MAINTAINERS. ... +/* TMU0 */ +#define TSTR0xFE430004 +#define TOCR0xFE43 +#define TSTR0 0xFE430004 +#define TCOR0 0xFE430008 +#define TCNT0 0xFE43000C +#define TCR00xFE430010 +#define TCOR1 0xFE430014 +#define TCNT1 0xFE430018 +#define TCR10xFE43001C +#define TCOR2 0xFE430020 +#define TCNT2 0xFE430024 +#define TCR20xFE430028 +#define TCPR2 0xFE43002C Please use C structs to describe hardware registers. The current code in arch/lib/sh/time.c doesn't use C structs. Should I also modify the code? ... +/* DDR3IF */ +#define DDR3IF_BASE 0xfe80 +#define DBSTATE0(DDR3IF_BASE + 0x0008) +#define DBSTATE1(DDR3IF_BASE + 0x000c) +#define DBACEN (DDR3IF_BASE + 0x0010) +#define DBRFEN (DDR3IF_BASE + 0x0014) +#define DBCMD (DDR3IF_BASE + 0x0018) +#define DBWAIT (DDR3IF_BASE + 0x001c) +#define DBKIND (DDR3IF_BASE + 0x0020) +#define DBCONF (DDR3IF_BASE + 0x0024) +#define DBTR0 (DDR3IF_BASE + 0x0040) +#define DBTR1 (DDR3IF_BASE + 0x0044) +#define DBTR2 (DDR3IF_BASE + 0x0048) +#define DBTR3 (DDR3IF_BASE + 0x0050) +#define DBTR4 (DDR3IF_BASE + 0x0054) +#define DBTR5 (DDR3IF_BASE + 0x0058) +#define DBTR6 (DDR3IF_BASE + 0x005c) +#define DBTR7 (DDR3IF_BASE + 0x0060) +#define DBTR8 (DDR3IF_BASE + 0x0064) +#define DBTR9 (DDR3IF_BASE + 0x0068) +#define DBTR10 (DDR3IF_BASE + 0x006c) +#define DBTR11 (DDR3IF_BASE + 0x0070) +#define DBTR12 (DDR3IF_BASE + 0x0074) +#define DBTR13 (DDR3IF_BASE + 0x0078) +#define DBTR14 (DDR3IF_BASE + 0x007c) +#define DBTR15 (DDR3IF_BASE + 0x0080) +#define DBTR16 (DDR3IF_BASE + 0x0084) +#define DBTR17 (DDR3IF_BASE + 0x0088) +#define DBTR18 (DDR3IF_BASE + 0x008c) +#define DBTR19 (DDR3IF_BASE + 0x0090) +#define DBADJ0 (DDR3IF_BASE + 0x00c0) +#define DBADJ1 (DDR3IF_BASE + 0x00c4) +#define DBADJ2 (DDR3IF_BASE + 0x00c8) +#define DBADJ3 (DDR3IF_BASE + 0x00cc) +#define DBRFCNF0(DDR3IF_BASE + 0x00e0) +#define DBRFCNF1(DDR3IF_BASE + 0x00e4) +#define DBRFCNF2(DDR3IF_BASE + 0x00e8) +#define DBCALCNF(DDR3IF_BASE + 0x00f4) +#define DBRNK0 (DDR3IF_BASE + 0x0100) +#define DBPDCNT0(DDR3IF_BASE + 0x0200) +#define DBPDCNT1(DDR3IF_BASE + 0x0204) +#define DBPDCNT2(DDR3IF_BASE + 0x0208) +#define DBPDCNT3(DDR3IF_BASE + 0x020c) +#define DBPDLCK (DDR3IF_BASE + 0x0280) +#define DBPDRGA (DDR3IF_BASE + 0x0290) +#define DBPDRGD (DDR3IF_BASE + 0x02a0) +#define DBBS0CNT0 (DDR3IF_BASE + 0x0300) +#define DBBS0CNT1 (DDR3IF_BASE + 0x0304) We don't allow base address + offset notation to access hardware registers. Please use C structs instead. They are used in assembler code (lowlevel_init.S). Do we use C structs in assembler code using GCC? At the moment, I don't know about it. So I will study GCC... Best regards, Yoshihiro Shimoda ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH V4] mpc83xx:fix pcie configuration space read/write
This patch fix a problem for the pcie enumeration when the mpc83xx pcie controller is connected with switch or we use both of the two pcie controller. Signed-off-by: Leo Liu liucai@gmail.com --- Changes for V2: - Avoid line wrap in the patch Changes for V3 - Add space between ) and { Changes for V4 - Add and use priv_data pointer in pci_controller to save the mpc83xx pcie private data arch/powerpc/cpu/mpc83xx/pcie.c | 20 +++- include/pci.h |2 ++ 2 files changed, 21 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/cpu/mpc83xx/pcie.c b/arch/powerpc/cpu/mpc83xx/pcie.c index 46a706d..ee94a8b 100644 --- a/arch/powerpc/cpu/mpc83xx/pcie.c +++ b/arch/powerpc/cpu/mpc83xx/pcie.c @@ -30,6 +30,21 @@ DECLARE_GLOBAL_DATA_PTR; #define PCIE_MAX_BUSES 2 +/*private structure for mpc83xx pcie hose*/ +static struct mpc83xx_pcie_priv { + u8 index; +} pcie_priv[PCIE_MAX_BUSES] = { + { + /*pcie controller 1*/ + .index = 0, + }, + { + /*pcie controller 2*/ + .index = 1, + }, +}; + + static struct { u32 base; u32 size; @@ -52,7 +67,8 @@ static int mpc83xx_pcie_remap_cfg(struct pci_controller *hose, pci_dev_t dev) { int bus = PCI_BUS(dev) - hose-first_busno; immap_t *immr = (immap_t *)CONFIG_SYS_IMMR; - pex83xx_t *pex = immr-pciexp[bus]; + struct mpc83xx_pcie_priv *pcie_priv = hose-priv_data; + pex83xx_t *pex = immr-pciexp[pcie_priv-index]; struct pex_outbound_window *out_win = pex-bridge.pex_outbound_win[0]; u8 devfn = PCI_DEV(dev) 3 | PCI_FUNC(dev); u32 dev_base = bus 24 | devfn 16; @@ -142,6 +158,8 @@ static void mpc83xx_pcie_register_hose(int bus, struct pci_region *reg, hose-cfg_addr = (unsigned int *)mpc83xx_pcie_cfg_space[bus].base; + hose-priv_data = pcie_priv[bus]; + pci_set_ops(hose, pcie_read_config_byte, pcie_read_config_word, diff --git a/include/pci.h b/include/pci.h index c456006..8b3bdbb 100644 --- a/include/pci.h +++ b/include/pci.h @@ -420,6 +420,8 @@ struct pci_controller { /* Used by ppc405 autoconfig*/ struct pci_region *pci_fb; int current_busno; + + void *priv_data; }; extern __inline__ void pci_set_ops(struct pci_controller *hose, -- 1.7.3.1.msysgit.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V4] mpc83xx:fix pcie configuration space read/write
2011/1/19 Leo Liu liucai@gmail.com: This patch fix a problem for the pcie enumeration when the mpc83xx pcie controller is connected with switch or we use both of the two pcie controller. Signed-off-by: Baidu Boy liucai@gmail.com --- Ignore this one, the name is not changed ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/7] Add support for MX35 processor
On 01/19/2011 12:37 PM, Wolfgang Denk wrote: No, I wonder why code a loop when a simple memset() does the same. Ok, I get the point - you are right, I will replace the code with memset. What do these ! markers mean? They have no useful meaning and I must drop them. There are other such cryptic markers - eventually from some doc generating tool. I will check in all patches, and I will remove them. Such duplication of information is just a source of errors. And asm-offsets.h has been provided exactly for the purpose to avoid such #defines. Please use it. Ok, understood. I will move these defines in asm-offsets.h Best regards, Stefano Babic -- = 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: off...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] bug report: the 8378 can not boot up when we enable the debug log
I test the mpc8378 board when I enable the DEBUG macro in common.h file Log is below: -- U-Boot 2010.12 (Jan 15 2011 - 11:40:03) MPC83XX Reset Status: Software Hard, External/Internal Soft, External/Internal Hard CPU: e300c4, MPC8378E, Rev: 2.1 at 297 MHz, CSB: 198 MHz Board: Freescale MPC837xEMDS I2C: Requested speed:40, i2c_clk:6600 FDR:0x24, div:320, ga:0x4, gb:0x1, a:10, b:32, speed:206250 Tr = 348 ns FDR:0x21, div:192, ga:0x5, gb:0x0, a:12, b:16, speed:343750 Tr = 106 ns divider:165, est_div:192, DFSR:3 FDR:0x21, speed:343750 Requested speed:40, i2c_clk:19800 FDR:0x28, div:640, ga:0x4, gb:0x2, a:10, b:64, speed:309375 Tr = 186 ns FDR:0x27, div:512, ga:0x7, gb:0x1, a:16, b:32, speed:386718 Tr = 25 ns divider:495, est_div:512, DFSR:9 FDR:0x27, speed:386718 ready DRAM: 512 MiB (DDR2, 64-bit, ECC off, 198 MHz) Top of RAM usable for U-Boot at: 2000 Reserving 545k for U-Boot at: 1ff77000 Reserving 520k for malloc() at: 1fef5000 Reserving 68 Bytes for Board Info at: 1fef4fbc Reserving 152 Bytes for Global Data at: 1fef4f24 Stack Pointer at: 1fef4f08 New Stack Pointer is: 1fef4f08 Now running in RAM - U-Boot at: 1ff77000 i2c_wait: No RXACK i2c_wait: No RXACK i2c_wait: No RXACK i2c_wait: No RXACK i2c_wait: No RXACK i2c_wait: No RXACK i2c_wait: No RXACK i2c_wait: No RXACK i2c_wait: No RXACK i2c_wait: No RXACK i2c_wait: No RXACK i2c_wait: No RXACK PCI 32bit bus on PMC1 PMC2 PMC3 FLASH: flash detect cfi fwc addr fe00 cmd f0 f0 8bit x 8 bit fwc addr fe00 cmd ff ff 8bit x 8 bit fwc addr fe55 cmd 98 98 8bit x 8 bit is= cmd 51(Q) addr fe10 is= 0 51 fwc addr fe000555 cmd 98 98 8bit x 8 bit is= cmd 51(Q) addr fe10 is= 0 51 fwc addr fe00 cmd f0 f0f0 16bit x 8 bit fwc addr fe00 cmd ff 16bit x 8 bit fwc addr feaa cmd 98 9898 16bit x 8 bit is= cmd 51(Q) addr fe20 is= 0051 5151 fwc addr fe000aaa cmd 98 9898 16bit x 8 bit is= cmd 51(Q) addr fe20 is= 0051 5151 fwc addr fe00 cmd f0 00f0 16bit x 16 bit fwc addr fe00 cmd ff 00ff 16bit x 16 bit fwc addr feaa cmd 98 0098 16bit x 16 bit is= cmd 51(Q) addr fe20 is= 0051 0051 is= cmd 52(R) addr fe22 is= 0052 0052 is= cmd 59(Y) addr fe24 is= 0059 0059 device interface is 2 found port 2 chip 2 port 16 bits chip 16 bits 00 : 51 52 59 02 00 40 00 00 00 00 00 27 36 00 00 07 QRY..@.'6... 10 : 07 0a 00 03 05 04 00 18 02 00 05 00 01 7f 00 00 20 : 02 00 00 00 00 00 00 00 00 00 00 00 00 fb ce 28 ...( fwc addr fe00 cmd f0 00f0 16bit x 16 bit fwc addr fe000aaa cmd aa 00aa 16bit x 16 bit fwc addr fe000554 cmd 55 0055 16bit x 16 bit fwc addr fe000aaa cmd 90 0090 16bit x 16 bit fwc addr fe00 cmd f0 00f0 16bit x 16 bit fwc addr feaa cmd 98 0098 16bit x 16 bit manufacturer is 2 manufacturer id is 0x1 device id is 0x227e device id2 is 0x0 cfi version is 0x3133 size_ratio 1 port 16 bits chip 16 bits found 1 erase regions erase region 0: 0x027f erase_region_count = 128 erase_region_size = 131072 fwc addr fe00 cmd f0 00f0 16bit x 16 bit flash_protect ON: from 0xFE00 to 0xFE051FFF flash_is_busy: 0 protect on 0 flash_is_busy: 0 protect on 1 flash_is_busy: 0 protect on 2 flash_protect ON: from 0xFE06 to 0xFE07 flash_is_busy: 0 protect on 3 16 MiB NAND: No NAND device found!!! 0 MiB MMC: * Warning - bad CRC, using default environment Destroy Hash Table: 1ffca978 table = (null) Create Hash Table: N=172 INSERT: table 1ffca978, filled 1/173 rv 1fef57b8 == name=bootcmd value=setenv bootargs root=/dev/nfs rw nfsroot=$serverip:$rootpath ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off console=$consoledev,$baudrate $othbootargs;tftp $loadaddr $bootfile;tftp $fdtaddr $fdtfile;bootm $loadaddr - $fdtaddr Bad trap at PC: 10820010, SR: 1000, vector=200 NIP: 10820010 XER: LR: 10480030 REGS: 0001 TRAP: 200 DAR: 08000200 MSR: 1000 EE: 0 PR: 0 FP: 0 ME: 1 IR/DR: 00 GPR00: 00990080 0100 00800040 0100 0082 04000800 20080010 1000 GPR08: 0080 02001100 30E0 4000 004A 8200 2102 GPR16: 00010020 2A00 300C 08000200 002B 1000 00100070 3B005000 GPR24: 0001 0100 2052 4100 001A 4100 0100 4900 Call backtrace: 6000 Exception in kernel pc 10820010 signal 0 Resetting the board. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH V2 1/2] Don't add symlink in srctree when using an objtree
When building with srctree != objtree, the build creates arch/soc/cpu specific symlinks in the source tree. This means that the same source tree can't be used for multiple builds at the same time. Also, these symlinks in the source tree are only cleaned up if one passes the same O= to distclean. When srctree != objtree, mkconfig creates an $objtree/include2 directory in the objtree to host the asm - arch/$arch/include/asm symlink so that #include asm can be used. But it also creates another identical symlink in $objtree/include. Then, mkconfig creates two symlinks: $objtree/include/asm/arch - arch/$arch/include/asm/arch-$cpu (or $soc) $objtree/include/asm/proc - arch/$arch/include/asm/proc-armv (on arm) but because $objtree/include/asm points at $srctree already, the two symlinks are created under $srctree. To fix this, create a real $objtree/include/asm directory, instead of a symlink. Update cleanup code accordingly. Signed-off-by: Loïc Minier loic.min...@linaro.org --- Makefile |2 +- mkconfig |3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 9055028..7c02096 100644 --- a/Makefile +++ b/Makefile @@ -1243,7 +1243,7 @@ clobber: clean @rm -f $(obj)u-boot.imx @rm -f $(obj)tools/{env/crc32.c,inca-swap-bytes} @rm -f $(obj)arch/powerpc/cpu/mpc824x/bedbug_603e.c - @rm -f $(obj)include/asm/proc $(obj)include/asm/arch $(obj)include/asm + @rm -fr $(obj)include/asm/proc $(obj)include/asm/arch $(obj)include/asm @rm -fr $(obj)include/generated @[ ! -d $(obj)nand_spl ] || find $(obj)nand_spl -name * -type l -print | xargs rm -f @[ ! -d $(obj)onenand_ipl ] || find $(obj)onenand_ipl -name * -type l -print | xargs rm -f diff --git a/mkconfig b/mkconfig index db69336..6ff533f 100755 --- a/mkconfig +++ b/mkconfig @@ -98,8 +98,7 @@ if [ $SRCTREE != $OBJTREE ] ; then ln -s ${SRCTREE}/arch/${arch}/include/asm asm LNPREFIX=${SRCTREE}/arch/${arch}/include/asm/ cd ../include - rm -f asm - ln -s ${SRCTREE}/arch/${arch}/include/asm asm + mkdir -p asm else cd ./include rm -f asm -- 1.7.2.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH V2 2/2] Cleanup .boards.depend when using an objtree
.boards.depend was created in the source tree even when calling make with O=objtree, and distclean O=objtree wouldn't clean it. Create .boards.depend in objtree instead as to clean it up properly. --- Makefile |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Makefile b/Makefile index 7c02096..e819e56 100644 --- a/Makefile +++ b/Makefile @@ -526,7 +526,7 @@ unconfig: @$(MKCONFIG) -A $(@:_config=) sinclude .boards.depend -.boards.depend:boards.cfg +$(obj).boards.depend: boards.cfg awk '(NF $$1 !~ /^#/) { print $$1 : $$1 _config; $$(MAKE) }' $ $@ # -- 1.7.2.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2] ppc4xx: Add DLVision-10G board support
Board support for the Guntermann Drunck DLVision-10G. Adds support for multiple FPGAs per board for gdsys 405ep architecture. Adds support for dual link osd hardware for gdsys 405ep. Signed-off-by: Dirk Eibach eib...@gdsys.de --- Replaces - 0001-ppc4xx-Add-DLVision-10G-board-support.patch - 0002-ppc4xx-Support-multiple-FPGAs.patch - 0003-ppc4xx-Support-dual-link-OSD.patch Changes for v2: - define EBC register values through appropriate macros - fix condition for extension of struct global_data Conversion to struct based register access will follow in a sperate patch. MAINTAINERS|1 + arch/powerpc/include/asm/global_data.h |3 + board/gdsys/405ep/405ep.c | 64 ++-- board/gdsys/405ep/Makefile |1 + board/gdsys/405ep/dlvision-10g.c | 243 + board/gdsys/405ep/io.c |8 +- board/gdsys/405ep/iocon.c | 14 +- board/gdsys/common/Makefile|1 + board/gdsys/common/fpga.h | 16 ++- board/gdsys/common/osd.c | 303 board/gdsys/common/osd.h |2 +- boards.cfg |1 + include/configs/dlvision-10g.h | 261 +++ include/configs/io.h |7 +- include/configs/iocon.h| 27 +++- 15 files changed, 846 insertions(+), 106 deletions(-) create mode 100644 board/gdsys/405ep/dlvision-10g.c create mode 100644 include/configs/dlvision-10g.h diff --git a/MAINTAINERS b/MAINTAINERS index 0590ad9..ea882c8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -142,6 +142,7 @@ Dirk Eibach eib...@gdsys.de devconcenterPPC460EX dlvisionPPC405EP + dlvision-10gPPC405EP gdppc440etx PPC440EP/GR intip PPC460EX io PPC405EP diff --git a/arch/powerpc/include/asm/global_data.h b/arch/powerpc/include/asm/global_data.h index 2e218de..fb7da21 100644 --- a/arch/powerpc/include/asm/global_data.h +++ b/arch/powerpc/include/asm/global_data.h @@ -172,6 +172,9 @@ typedef struct global_data { #if defined(CONFIG_LWMON) || defined(CONFIG_LWMON5) unsigned long kbd_status; #endif +#ifdef CONFIG_405EP + unsigned fpga_state[CONFIG_SYS_FPGA_COUNT]; +#endif #if defined(CONFIG_WD_MAX_RATE) unsigned long long wdt_last;/* trace watch-dog triggering rate */ #endif diff --git a/board/gdsys/405ep/405ep.c b/board/gdsys/405ep/405ep.c index d3bd233..84ea573 100644 --- a/board/gdsys/405ep/405ep.c +++ b/board/gdsys/405ep/405ep.c @@ -26,6 +26,7 @@ #include asm/processor.h #include asm/io.h #include asm/ppc4xx-gpio.h +#include asm/global_data.h #include ../common/fpga.h @@ -36,8 +37,29 @@ #define REFLECTION_TESTPATTERN 0xdede #define REFLECTION_TESTPATTERN_INV (~REFLECTION_TESTPATTERN 0x) +DECLARE_GLOBAL_DATA_PTR; + +int get_fpga_state(unsigned dev) +{ + return gd-fpga_state[dev]; +} + +void print_fpga_state(unsigned dev) +{ + if (gd-fpga_state[dev] FPGA_STATE_DONE_FAILED) + puts( Waiting for FPGA-DONE timed out.\n); + if (gd-fpga_state[dev] FPGA_STATE_REFLECTION_FAILED) + puts( FPGA reflection test failed.\n); +} + int board_early_init_f(void) { + unsigned k; + unsigned ctr; + + for (k = 0; k CONFIG_SYS_FPGA_COUNT; ++k) + gd-fpga_state[k] = 0; + mtdcr(UIC0SR, 0x); /* clear all ints */ mtdcr(UIC0ER, 0x); /* disable all ints */ mtdcr(UIC0CR, 0x); /* set all to be non-critical */ @@ -66,10 +88,18 @@ int board_early_init_f(void) /* * wait for fpga-done -* fail ungraceful if fpga is not configuring properly */ - while (!(in_le16((void *)LATCH2_BASE) 0x0010)) - ; + for (k = 0; k CONFIG_SYS_FPGA_COUNT; ++k) { + ctr = 0; + while (!(in_le16((void *)LATCH2_BASE) +CONFIG_SYS_FPGA_DONE(k))) { + udelay(10); + if (ctr++ 5) { + gd-fpga_state[k] |= FPGA_STATE_DONE_FAILED; + break; + } + } + } /* * setup io-latches for boot (stop reset) @@ -78,15 +108,25 @@ int board_early_init_f(void) out_le16((void *)LATCH0_BASE, CONFIG_SYS_LATCH0_BOOT); out_le16((void *)LATCH1_BASE, CONFIG_SYS_LATCH1_BOOT); - /* -* wait for fpga out of reset -* fail ungraceful if fpga is not working properly -*/ - while (1) { - fpga_set_reg(CONFIG_SYS_FPGA_RFL_LOW, REFLECTION_TESTPATTERN); - if (fpga_get_reg(CONFIG_SYS_FPGA_RFL_HIGH) == - REFLECTION_TESTPATTERN_INV) -
[U-Boot] [PATCH v3] ppc4xx: Add DLVision-10G board support
Board support for the Guntermann Drunck DLVision-10G. Adds support for multiple FPGAs per board for gdsys 405ep architecture. Adds support for dual link osd hardware for gdsys 405ep. Signed-off-by: Dirk Eibach eib...@gdsys.de --- Replaces - 0001-ppc4xx-Add-DLVision-10G-board-support.patch - 0002-ppc4xx-Support-multiple-FPGAs.patch - 0003-ppc4xx-Support-dual-link-OSD.patch Changes for v2: - define EBC register values through appropriate macros - fix condition for extension of struct global_data Changes for v3: - added missing commits from v2 Conversion to struct based register access will follow in a sperate patch. MAINTAINERS|1 + arch/powerpc/include/asm/global_data.h |3 + board/gdsys/405ep/405ep.c | 64 +-- board/gdsys/405ep/Makefile |1 + board/gdsys/405ep/dlvision-10g.c | 243 board/gdsys/405ep/io.c |8 +- board/gdsys/405ep/iocon.c | 14 +- board/gdsys/common/Makefile|1 + board/gdsys/common/fpga.h | 16 ++- board/gdsys/common/osd.c | 303 +++ board/gdsys/common/osd.h |2 +- boards.cfg |1 + include/configs/dlvision-10g.h | 322 include/configs/io.h |7 +- include/configs/iocon.h| 27 +++- 15 files changed, 907 insertions(+), 106 deletions(-) create mode 100644 board/gdsys/405ep/dlvision-10g.c create mode 100644 include/configs/dlvision-10g.h diff --git a/MAINTAINERS b/MAINTAINERS index 0590ad9..ea882c8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -142,6 +142,7 @@ Dirk Eibach eib...@gdsys.de devconcenterPPC460EX dlvisionPPC405EP + dlvision-10gPPC405EP gdppc440etx PPC440EP/GR intip PPC460EX io PPC405EP diff --git a/arch/powerpc/include/asm/global_data.h b/arch/powerpc/include/asm/global_data.h index 2e218de..a33ca2f 100644 --- a/arch/powerpc/include/asm/global_data.h +++ b/arch/powerpc/include/asm/global_data.h @@ -172,6 +172,9 @@ typedef struct global_data { #if defined(CONFIG_LWMON) || defined(CONFIG_LWMON5) unsigned long kbd_status; #endif +#ifdef CONFIG_SYS_FPGA_COUNT + unsigned fpga_state[CONFIG_SYS_FPGA_COUNT]; +#endif #if defined(CONFIG_WD_MAX_RATE) unsigned long long wdt_last;/* trace watch-dog triggering rate */ #endif diff --git a/board/gdsys/405ep/405ep.c b/board/gdsys/405ep/405ep.c index d3bd233..84ea573 100644 --- a/board/gdsys/405ep/405ep.c +++ b/board/gdsys/405ep/405ep.c @@ -26,6 +26,7 @@ #include asm/processor.h #include asm/io.h #include asm/ppc4xx-gpio.h +#include asm/global_data.h #include ../common/fpga.h @@ -36,8 +37,29 @@ #define REFLECTION_TESTPATTERN 0xdede #define REFLECTION_TESTPATTERN_INV (~REFLECTION_TESTPATTERN 0x) +DECLARE_GLOBAL_DATA_PTR; + +int get_fpga_state(unsigned dev) +{ + return gd-fpga_state[dev]; +} + +void print_fpga_state(unsigned dev) +{ + if (gd-fpga_state[dev] FPGA_STATE_DONE_FAILED) + puts( Waiting for FPGA-DONE timed out.\n); + if (gd-fpga_state[dev] FPGA_STATE_REFLECTION_FAILED) + puts( FPGA reflection test failed.\n); +} + int board_early_init_f(void) { + unsigned k; + unsigned ctr; + + for (k = 0; k CONFIG_SYS_FPGA_COUNT; ++k) + gd-fpga_state[k] = 0; + mtdcr(UIC0SR, 0x); /* clear all ints */ mtdcr(UIC0ER, 0x); /* disable all ints */ mtdcr(UIC0CR, 0x); /* set all to be non-critical */ @@ -66,10 +88,18 @@ int board_early_init_f(void) /* * wait for fpga-done -* fail ungraceful if fpga is not configuring properly */ - while (!(in_le16((void *)LATCH2_BASE) 0x0010)) - ; + for (k = 0; k CONFIG_SYS_FPGA_COUNT; ++k) { + ctr = 0; + while (!(in_le16((void *)LATCH2_BASE) +CONFIG_SYS_FPGA_DONE(k))) { + udelay(10); + if (ctr++ 5) { + gd-fpga_state[k] |= FPGA_STATE_DONE_FAILED; + break; + } + } + } /* * setup io-latches for boot (stop reset) @@ -78,15 +108,25 @@ int board_early_init_f(void) out_le16((void *)LATCH0_BASE, CONFIG_SYS_LATCH0_BOOT); out_le16((void *)LATCH1_BASE, CONFIG_SYS_LATCH1_BOOT); - /* -* wait for fpga out of reset -* fail ungraceful if fpga is not working properly -*/ - while (1) { - fpga_set_reg(CONFIG_SYS_FPGA_RFL_LOW, REFLECTION_TESTPATTERN); - if (fpga_get_reg(CONFIG_SYS_FPGA_RFL_HIGH) == -
Re: [U-Boot] [PATCH v3] ppc4xx: Add DLVision-10G board support
Dear Dirk Eibach, In message 1295440671-20653-1-git-send-email-eib...@gdsys.de you wrote: Board support for the Guntermann Drunck DLVision-10G. Adds support for multiple FPGAs per board for gdsys 405ep architecture. Adds support for dual link osd hardware for gdsys 405ep. Signed-off-by: Dirk Eibach eib...@gdsys.de --- Replaces - 0001-ppc4xx-Add-DLVision-10G-board-support.patch - 0002-ppc4xx-Support-multiple-FPGAs.patch - 0003-ppc4xx-Support-dual-link-OSD.patch Changes for v2: - define EBC register values through appropriate macros - fix condition for extension of struct global_data Changes for v3: - added missing commits from v2 Conversion to struct based register access will follow in a sperate patch. What does that mean? We need a single patch that includes everything at once. 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: w...@denx.de Winners never talk about glorious victories. That's because they're the ones who see what the battlefield looks like afterwards. It's only the losers who have glorious victories. - Terry Pratchett, _Small Gods_ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [V2 patch 3/4] SMDK6400: Fix build error for nand_spl support
On 01/19/2011 05:56 AM, Wolfgang Denk wrote: Dear seedshope, In message1294757545-4771-4-git-send-email-bocui...@gmail.com you wrote: Add some relocation symbols to u-boot.lds and disable LED functions in start.s to support nand_spl. Signed-off-by: seedshopebocui...@gmail.com Please re-split yourpatches. The changes to board/samsung/smdk6400/u-boot.lds and board/samsung/smdk6400/u-boot-nand.lds should probably go into a single commit. Also please chose a more descriptive Subject / commit message. oK, Now, I wait to resolve a issue for RR4. In RR3 patch2, I fine the cmd_link_o_target command will link for cpu_init.o. So Delay some time. Thanks, hongbo Best regards, Wolfgang Denk ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 1/1] imximage: Add MX53 boot image support
Hi, Wolfgang, 2011/1/19 Wolfgang Denk w...@denx.de: Dear Jason Liu, In message 1295382963-32356-1-git-send-email-r64...@freescale.com you wrote: This patch add the MX53 boot image support. This patch has been tested on Freescale MX53EVK board and MX51EVK board. Signed-off-by: Jason Liu r64...@freescale.com --- Changes for v2: - Address the following comments from Stefano, - Get rid of #ifdef in the imximage.h and .c file and use the runtime check for imximage version - Document the IMXIMAGE_VERSION definiton in doc/README.imximage - Move mx53evk/config.mk and mx53evk/imximage.cfg to MX53EVK board support patch. Changes for v3: - Address the following comments from Stefano, - Not change the mx51evk file. The code should take VERSION=1 as default, and we do not need to change the actual boards. - add a note in the documentation and raise an error in code if the VERSION command is read after any other suitable commands. - Change command IMXIMAGE_VERSION simply to IMAGE_VERSION - Need recognize the version directly from its structure and not storing the version into the header when do header verify and print. - Use function pointer to simpliy the code when the version of header is recognized Changes for v4: - Address the following comments from Wolfgang, - Keep the imximage_cmds table sorted, - Add braces for (expx) (expy) gloably, really? see below. - Return failure to upper call if met errors for function - Add comments for function set_dcd_rst_v1 alike, - Re-orgnize code to avoid deep nesting, --- ... + if ((fhdr_v1-app_code_barker == APP_CODE_BARKER) + (hdr_v1-dcd_table.preamble.barker == DCD_BARKER)) + + return IMXIMAGE_V1; + + /* Try to detect V2 */ + if ((fhdr_v2-header.tag == IVT_HEADER_TAG) + (hdr_v2-dcd_table.header.tag == DCD_HEADER_TAG)) + + return IMXIMAGE_V2; These two need braces. Could you please state clear where it need brace? Thanks, 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: w...@denx.de Administration: An ingenious abstraction in politics, designed to receive the kicks and cuffs due to the premier or president. - Ambrose Bierce ___ 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
Re: [U-Boot] [PATCH 2/3 RESEND] MX51EVK: Use SWx macros in PMIC init
On Wednesday 19 January 2011 12:15:33 Sergei Shtylyov wrote: On 19-01-2011 2:19, Marek Vasut wrote: Signed-off-by: Marek Vasutmarek.va...@gmail.com [...] diff --git a/board/freescale/mx51evk/mx51evk.c b/board/freescale/mx51evk/mx51evk.c index 2160d5a..bcf1934 100644 --- a/board/freescale/mx51evk/mx51evk.c +++ b/board/freescale/mx51evk/mx51evk.c @@ -198,17 +198,18 @@ static void power_init(void) /* Set core voltage to 1.1V */ val = pmic_reg_read(REG_SW_0); - val = (val (~0x1F)) | 0x14; + val = (val (~SWx_VOLT_MASK)) | SWx_1_100V; pmic_reg_write(REG_SW_0, val); /* Setup VCC (SW2) to 1.25 */ val = pmic_reg_read(REG_SW_1); - val = (val (~0x1F)) | 0x1A; + val = (val (~SWx_VOLT_MASK)) | SWx_1_250V; + Stray newline? Nice catch, thanks WBR, Sergei ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [v3 patch 2/4] SMDK6400: Fix some label undefined in build error
On 01/15/2011 02:15 AM, Albert ARIBAUD wrote: Le 14/01/2011 17:56, seedshope a écrit : On 01/15/2011 12:39 AM, Albert ARIBAUD wrote: Hi seedshope, Le 14/01/2011 16:45, seedshope a écrit : On 01/14/2011 02:07 AM, Albert ARIBAUD wrote: Le 13/01/2011 14:36, seedshope a écrit : Modify Makefile for cpu_init.c and Start.s use some label,this defined u-boot.lds of arch/arm/cpu/arm1176. But SMDK6400 use the link script board/samsung/smdk6400/u-boot-nand.lds. So add some label form u-boot.lds to u-boot-nand.lds Signed-off-by: seedshopebocui...@gmail.com diff --git a/arch/arm/cpu/arm1176/s3c64xx/Makefile b/arch/arm/cpu/arm1176/s3c64xx/Makefile index 0785b19..f4b9574 100644 --- a/arch/arm/cpu/arm1176/s3c64xx/Makefile +++ b/arch/arm/cpu/arm1176/s3c64xx/Makefile @@ -30,12 +30,15 @@ LIB = $(obj)lib$(SOC).o SOBJS = reset.o -COBJS-$(CONFIG_S3C6400) += cpu_init.o speed.o +COBJS-$(CONFIG_S3C6400) += speed.o COBJS-y += timer.o +CPUINIT = cpu_init.o + OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS-y)) +CPUINIT := $(addprefix $(obj),$(CPUINIT)) -all: $(obj).depend $(START) $(LIB) +all: $(obj).depend $(START) $(LIB) $(CPUINIT) $(LIB): $(OBJS) $(call cmd_link_o_target, $(OBJS)) Not sure I get what's the problem and how exactly this changes solves it. Can you detail this particular issue? The issue is mem_ctrl_asm_init redefine in arch/arm/cpu/arm1176/s3c64xx/cpu_init.s. From what follows it seems the problem is rather cpu_init.o being linked in twice. Correct? maybe At first, the link script file include cpu_init.s in board/samsung/smd6400/u-boot-nand.s, If I separate the cpu_init.o from COBJS-$(CONFIG_S3C6400), I guess cmd_link_o_target will deal with cpu_init.o. So the link script will double link the cpu_init file. Then you should fix the double linking by i) determining why the double linking happens and ii) properly linking once only. Hi Alvert ARIBAUD, I see the code for smdk6400. I found this code is very old. Before It can not add cmd_link_o_target in Makefile(arch/arm/cpu/arm1176/s3c64xx/Makefile), The file will only to compile. So the link script is ok. But, Now, It is not. As far as I know, The linker script can do to link the first specified file for user. Since I do not full understand the cmd_link_o_target mechanism. So I only guess the command do some link work. Maybe I am correct. I don't want to accept this change on the off chance that it might be correct; before your next patch submission, please try building your code without this specific patch and positively find why the build fails. Hi Amicalement I trace the issue, I find cmd_link_o_target will link the cpu_init.o file. If I add the file to u-boot-nand.lds file, The file will be link twice. Now, It is good method to delete the file in u-boot-nand.s. Why? Before I think Nand Booting for the 4kb, If you don't link the file to the first 4kB, the system will be generate error. Because the mem initialization function will can't find. But , Now , The nand booting will be generate in nand_spl, the generate u-boot img is limit for 4KB, So this is ok. Do you think about? Thanks, seedshope Amicalement, ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/3 v3] iMX5: EfikaMX: Preliminary board support
On Wednesday 19 January 2011 09:49:41 Wolfgang Denk wrote: Dear Marek Vasut, In message 1295379040-11563-3-git-send-email-marek.va...@gmail.com you wrote: Supported: MMC IDE PMIC SPI flash LEDs ... +/*** *** + * Compile-time error checking + **/ Incorrect multiline comment style. I really do not understand why you submit this again, after we discussed this in lenght both by e-main and on IRC. Please fix it globally, the code will not go in as is. Mistake, sorry ... I have it fixed in my tree, just checked. +/*** *** + * Board identification + **/ +static u32 board_rev; Be careful!! This way board_rev will be located in bss, and BSS data MUST NOT be accessed before relocation, but it appears you to this. This must be fixed. Dang, good catch, thanks. +int board_init(void) +{ + gd-bd-bi_arch_number = MACH_TYPE_MX51_LANGE51; + gd-bd-bi_boot_params = PHYS_SDRAM_1 + 0x100; Is this the correct MACH_TYPE for the EfikaMX board? Apparently it is, they renamed the thing. Lange is probably a codename. +/* + * Bootloader Components Configuration + */ +#define CONFIG_CMD_SPI +#define CONFIG_CMD_SF +#define CONFIG_CMD_MMC +#defineCONFIG_CMD_FAT +#defineCONFIG_CMD_IDE +#undef CONFIG_CMD_IMLS PLease be consistent - either always use space after #define (recommended), or always use TAB, but do not mix both styles. +/* + * ATAG setup + */ +#define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */ +#define CONFIG_REVISION_TAG1 +#define CONFIG_SETUP_MEMORY_TAGS 1 +#define CONFIG_INITRD_TAG 1 Please omit all these '1'. Please fix globally... +#define CONFIG_HARD_SPI1 +#define CONFIG_MXC_SPI 1 ... i.e. here and in similar places, too. Fixed in v4, thanks for the review Best regards, Wolfgang Denk ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/3 RESEND] MC13892: Add SWx buck switchers definitions
Define voltages configurable on SWx buck switchers. Signed-off-by: Marek Vasut marek.va...@gmail.com Acked-by: Stefano Babic sba...@denx.de --- include/mc13892.h | 39 +++ 1 files changed, 39 insertions(+), 0 deletions(-) diff --git a/include/mc13892.h b/include/mc13892.h index 61c3e6e..a1078a5 100644 --- a/include/mc13892.h +++ b/include/mc13892.h @@ -160,4 +160,43 @@ /* Reg Power Control 2*/ #define WDIRESET (1 12) +/* Buck Switchers (SW1,2,3,4) Output Voltage */ +/* + * NOTE: These values are for SWxHI = 0, + * SWxHI = 1 adds 0.5V to the desired voltage + */ +#define SWx_0_600V 0 +#define SWx_0_625V 1 +#define SWx_0_650V 2 +#define SWx_0_675V 3 +#define SWx_0_700V 4 +#define SWx_0_725V 5 +#define SWx_0_750V 6 +#define SWx_0_775V 7 +#define SWx_0_800V 8 +#define SWx_0_825V 9 +#define SWx_0_850V 10 +#define SWx_0_875V 11 +#define SWx_0_900V 12 +#define SWx_0_925V 13 +#define SWx_0_950V 14 +#define SWx_0_975V 15 +#define SWx_1_000V 16 +#define SWx_1_025V 17 +#define SWx_1_050V 18 +#define SWx_1_075V 19 +#define SWx_1_100V 20 +#define SWx_1_125V 21 +#define SWx_1_150V 22 +#define SWx_1_175V 23 +#define SWx_1_200V 24 +#define SWx_1_225V 25 +#define SWx_1_250V 26 +#define SWx_1_275V 27 +#define SWx_1_300V 28 +#define SWx_1_325V 29 +#define SWx_1_350V 30 +#define SWx_1_375V 31 +#define SWx_VOLT_MASK 0x1F + #endif -- 1.7.2.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/3 v2] MX51EVK: Use SWx macros in PMIC init
Signed-off-by: Marek Vasut marek.va...@gmail.com --- v2: Remove stray newline and useless parens board/freescale/mx51evk/mx51evk.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/board/freescale/mx51evk/mx51evk.c b/board/freescale/mx51evk/mx51evk.c index 2160d5a..726ce18 100644 --- a/board/freescale/mx51evk/mx51evk.c +++ b/board/freescale/mx51evk/mx51evk.c @@ -198,17 +198,17 @@ static void power_init(void) /* Set core voltage to 1.1V */ val = pmic_reg_read(REG_SW_0); - val = (val (~0x1F)) | 0x14; + val = (val ~SWx_VOLT_MASK) | SWx_1_100V; pmic_reg_write(REG_SW_0, val); /* Setup VCC (SW2) to 1.25 */ val = pmic_reg_read(REG_SW_1); - val = (val (~0x1F)) | 0x1A; + val = (val ~SWx_VOLT_MASK) | SWx_1_250V; pmic_reg_write(REG_SW_1, val); /* Setup 1V2_DIG1 (SW3) to 1.25 */ val = pmic_reg_read(REG_SW_2); - val = (val (~0x1F)) | 0x1A; + val = (val ~SWx_VOLT_MASK) | SWx_1_250V; pmic_reg_write(REG_SW_2, val); udelay(50); -- 1.7.2.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/3 v4] iMX5: EfikaMX: Preliminary board support
Supported: MMC IDE PMIC SPI flash LEDs I can boot the kernel supplied by freescale/genesi with this from MMC card and/or PATA disk. Signed-off-by: Marek Vasut marek.va...@gmail.com --- v4: Fixed coding style as proposed by Wolfgang (multiline comments, #defines) MAINTAINERS|1 + board/efikamx/Makefile | 52 board/efikamx/config.mk| 25 ++ board/efikamx/efikamx.c| 690 board/efikamx/imximage.cfg | 122 boards.cfg |1 + include/configs/efikamx.h | 232 +++ 7 files changed, 1123 insertions(+), 0 deletions(-) create mode 100644 board/efikamx/Makefile create mode 100644 board/efikamx/config.mk create mode 100644 board/efikamx/efikamx.c create mode 100644 board/efikamx/imximage.cfg create mode 100644 include/configs/efikamx.h diff --git a/MAINTAINERS b/MAINTAINERS index a799037..8f1b1b6 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -823,6 +823,7 @@ Marek Vasut marek.va...@gmail.com palmtc xscale vpac270 xscale zipitz2 xscale + efikamx i.MX51 Hugo Villeneuve hugo.villene...@lyrtech.com diff --git a/board/efikamx/Makefile b/board/efikamx/Makefile new file mode 100644 index 000..ee4a16e --- /dev/null +++ b/board/efikamx/Makefile @@ -0,0 +1,52 @@ +# +# Copyright (C) 2010, Marek Vasut marek.va...@gmail.com +# +# BASED ON: imx51evk +# +# Copyright (C) 2007, Guennadi Liakhovetski l...@denx.de +# +# (C) Copyright 2009 Freescale Semiconductor, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# + +include $(TOPDIR)/config.mk + +LIB= $(obj)lib$(BOARD).o + +COBJS := efikamx.o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB):$(obj).depend $(OBJS) $(SOBJS) + $(call cmd_link_o_target, $(OBJS) $(SOBJS)) + +clean: + rm -f $(SOBJS) $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak .depend + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/board/efikamx/config.mk b/board/efikamx/config.mk new file mode 100644 index 000..6e90671 --- /dev/null +++ b/board/efikamx/config.mk @@ -0,0 +1,25 @@ +# +# Copyright 2009 Freescale Semiconductor, Inc. All Rights Reserved. +# +# 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 +# + +CONFIG_SYS_TEXT_BASE = 0x9780 +IMX_CONFIG = $(SRCTREE)/board/$(BOARDDIR)/imximage.cfg +ALL += $(obj)u-boot.imx diff --git a/board/efikamx/efikamx.c b/board/efikamx/efikamx.c new file mode 100644 index 000..583db65 --- /dev/null +++ b/board/efikamx/efikamx.c @@ -0,0 +1,690 @@ +/* + * Copyright (C) 2010 Marek Vasut marek.va...@gmail.com + * + * (C) Copyright 2009 Freescale Semiconductor, Inc. + * + * 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
Re: [U-Boot] environmental baudrate not used at boot up
On Wed, Jan 19, 2011 at 07:59:10AM +0100, Wolfgang Denk wrote: Based on empirical testing, I've discovered that re-running init_baudrate() after env_relocate() fixes everything. The serial console uses the baud rate stored in the baudrate variable now, and some ordering of display outputs needs to be tweaked so that gibberish isn't output in the interim. You have diagnosed where the problem is, but you come to the wrong conclusions and instead of fixing the problem you paint over it. Obviously getenv_r(baudrate) is not returning the right value for you. You should first check, what exactly it returns. Then you should check why it is not reading the correct data, as it is supposed to do. Then you should fix _that_ problem. Thanks for the feedback. I hope that someone else can continue this work now that I've identified the problem and have developed a solution that works for my needs with no obvious side-effects. Given that this is such base functionality, I'm surprised that no one else has mentioned anything up to this point; I guess no one else attempts to change the baud rate for subsequent reboots? (Rhetorical, no need to answer.) All the best with the upcoming release, Chris ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC PATCH] Speed up kernel decompression
This patch is not intended to go into mainline! It is just a RFC. Situation: Booting a LZO compressed legacy image containing an ELF (so, no linux) from flash takes about 1.6 seconds after issuing the bootm command to jumping to the elfs entry point when the patch regarding section copying I send earlier is applied. I felt that this could be optimized a bit. Approach: As the image is read twice from flash (CRC checking and decompressing) I tried to get it reduced to only reading the image once from flash. Please see the patch. Results: Copy from flash CRCing LZO Decompression | Total HEAD - 254ms 1600ms | 1854ms hacked 226ms 100ms 880ms | 1206ms 600ms are about 15% of the total boot time in our system. Problems: You need a quite big malloc pool. I found no easy way to free the allocated image memory after decompression. Signed-off-by: Matthias Weisser weiss...@arcor.de --- common/cmd_bootm.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index 18019d6..0684bc0 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -722,6 +722,7 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) static image_header_t *image_get_kernel (ulong img_addr, int verify) { image_header_t *hdr = (image_header_t *)img_addr; + void *img_copy_ram; if (!image_check_magic(hdr)) { puts (Bad Magic Number\n); @@ -739,6 +740,12 @@ static image_header_t *image_get_kernel (ulong img_addr, int verify) show_boot_progress (3); image_print_contents (hdr); + img_copy_ram = malloc(image_get_image_size(hdr)); + if (img_copy_ram != NULL) { + memcpy(img_copy_ram, hdr, image_get_image_size(hdr)); + hdr = img_copy_ram; + } + if (verify) { puts ( Verifying Checksum ... ); if (!image_check_dcrc (hdr)) { -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] environmental baudrate not used at boot up
Dear chr...@cyberswitching.com, In message 20110119144640.GA8828@cslinux-build01.cyberswitching.local you wrote: Thanks for the feedback. I hope that someone else can continue this work now that I've identified the problem and have developed a solution that works for my needs with no obvious side-effects. Who said there are no side-effects? Just try setting a different baud rate, save it, and reboot. Given that this is such base functionality, I'm surprised that no one else has mentioned anything up to this point; I guess no one else attempts to change the baud rate for subsequent reboots? (Rhetorical, no need to answer.) You are probably right - few people test such changes. 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: w...@denx.de We don't care. We don't have to. We're the Phone Company. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 1/1] imximage: Add MX53 boot image support
Hi, Wolfgang, 2011/1/19 Jason Liu liu.h.ja...@gmail.com: Hi, Wolfgang, 2011/1/19 Wolfgang Denk w...@denx.de: Dear Jason Liu, In message 1295382963-32356-1-git-send-email-r64...@freescale.com you wrote: This patch add the MX53 boot image support. This patch has been tested on Freescale MX53EVK board and MX51EVK board. Signed-off-by: Jason Liu r64...@freescale.com [snip] - Return failure to upper call if met errors for function - Add comments for function set_dcd_rst_v1 alike, - Re-orgnize code to avoid deep nesting, --- ... + if ((fhdr_v1-app_code_barker == APP_CODE_BARKER) + (hdr_v1-dcd_table.preamble.barker == DCD_BARKER)) + + return IMXIMAGE_V1; + + /* Try to detect V2 */ + if ((fhdr_v2-header.tag == IVT_HEADER_TAG) + (hdr_v2-dcd_table.header.tag == DCD_HEADER_TAG)) + + return IMXIMAGE_V2; These two need braces. Could you please state clear where it need brace? Thanks, Do you mean the I need add the braces as the following? if ((fhdr_v1-app_code_barker == APP_CODE_BARKER) (hdr_v1-dcd_table.preamble.barker == DCD_BARKER)) { return IMXIMAGE_V1; } 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: w...@denx.de Administration: An ingenious abstraction in politics, designed to receive the kicks and cuffs due to the premier or president. - Ambrose Bierce ___ 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
Re: [U-Boot] usb cdc mode flow
Hi Marcel, 2011/1/15 Marcel korg...@home.nl: Hi, Is there someone on the list who has a USB trace of a working CDC implementation ? What I want to know is what happens after all descriptors are received by the host. The last descriptor I receive is a string descriptor saying Ethernet data. I'm busy implementing the USB device controller for the SAM9G45 and got quite In the U-boot-usb tree there is a branch (cdc-at91 branch) that has a working implementation for a SAM9261 core. Maybe this gives you a starting point... Kind regards, Remy ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [Patch] Fix hash table deletion to prevent lost entries
The hash delete code is in error; instead of just removing the deleted key, it should instead allocate a new hashtable, hash all the keys into the new table except for the deleted key and then reclaim the old table (and deleted key). Can you please come up with a patch? Hashtable delete is broken since freeing entry could break collision chain for other entries. Instead free key/data pair and mark entry as deleted (via negative used value) and then skip deleted entries while probing. Break up hsearch_r into separate henter_r/hfind_r functions for readability. Recycle first deleted entry in probe chain when adding entry to table. Factor primary/secondary hash calculations into functions and use in henter_r/hfind_r/hdelete_r. --- include/search.h | 16 ++- lib/hashtable.c | 382 - 2 files changed, 241 insertions(+), 157 deletions(-) diff --git a/include/search.h b/include/search.h index a7c1293..4466731 100644 --- a/include/search.h +++ b/include/search.h @@ -66,12 +66,16 @@ extern int hcreate_r(size_t __nel, struct hsearch_data *__htab); extern void hdestroy_r(struct hsearch_data *__htab); /* - * Search for entry matching ITEM.key in internal hash table. If - * ACTION is `FIND' return found entry or signal error by returning - * NULL. If ACTION is `ENTER' replace existing data (if any) with - * ITEM.data. - * */ -extern int hsearch_r(ENTRY __item, ACTION __action, ENTRY ** __retval, + * Search for entry matching ITEM.key in internal hash table. Return + * found entry or signal error by returning NULL. + */ +extern int hfind_r(ENTRY __item, ENTRY ** __retval, + struct hsearch_data *__htab); +/* + * Add entry matching ITEM.key in internal hash table. Replace + * existing data (if any) with ITEM.data. + */ +extern int henter_r(ENTRY __item, ENTRY ** __retval, struct hsearch_data *__htab); /* diff --git a/lib/hashtable.c b/lib/hashtable.c index 9f069c0..7b5153a 100644 --- a/lib/hashtable.c +++ b/lib/hashtable.c @@ -65,7 +65,7 @@ * which describes the current status. */ typedef struct _ENTRY { -unsigned int used; +int used; ENTRY entry; } _ENTRY; @@ -152,7 +152,7 @@ void hdestroy_r(struct hsearch_data *htab) /* free used memory */ for (i = 1; i = htab-size; ++i) { -if (htab-table[i].used) { +if (htab-table[i].used 0) { ENTRY *ep = htab-table[i].entry; free(ep-key); @@ -165,77 +165,20 @@ void hdestroy_r(struct hsearch_data *htab) htab-table = NULL; } -/* - * hsearch() - */ - -/* - * This is the search function. It uses double hashing with open addressing. - * The argument item.key has to be a pointer to an zero terminated, most - * probably strings of chars. The function for generating a number of the - * strings is simple but fast. It can be replaced by a more complex function - * like ajw (see [Aho,Sethi,Ullman]) if the needs are shown. - * - * We use an trick to speed up the lookup. The table is created by hcreate - * with one more element available. This enables us to use the index zero - * special. This index will never be used because we store the first hash - * index in the field used where zero means not used. Every other value - * means used. The used field can be used as a first fast comparison for - * equality of the stored and the parameter value. This helps to prevent - * unnecessary expensive calls of strcmp. - * - * This implementation differs from the standard library version of - * this function in a number of ways: - * - * - While the standard version does not make any assumptions about - * the type of the stored data objects at all, this implementation - * works with NUL terminated strings only. - * - Instead of storing just pointers to the original objects, we - * create local copies so the caller does not need to care about the - * data any more. - * - The standard implementation does not provide a way to update an - * existing entry. This version will create a new entry or update an - * existing one when both action == ENTER and item.data != NULL. - * - Instead of returning 1 on success, we return the index into the - * internal hash table, which is also guaranteed to be positive. - * This allows us direct access to the found hash table slot for - * example for functions like hdelete(). - */ - -int hmatch_r(const char *match, int last_idx, ENTRY ** retval, - struct hsearch_data *htab) -{ -unsigned int idx; -size_t key_len = strlen(match); - -for (idx = last_idx + 1; idx htab-size; ++idx) { -if (!htab-table[idx].used) -continue; -if (!strncmp(match, htab-table[idx].entry.key, key_len)) { -*retval = htab-table[idx].entry; -return idx; -} -} - -__set_errno(ESRCH); -*retval = NULL; -return 0; -} -int hsearch_r(ENTRY item, ACTION action, ENTRY ** retval, - struct
[U-Boot] Pull request: u-boot-usb
The following changes since commit 3f1266d6d5bf14ea7248544db8406d308c6bfa7c: Escape minus signs in manpage (2011-01-19 00:07:51 +0100) are available in the git repository at: git://git.denx.de/u-boot-usb.git master Lei Wen (1): usb_ether: register usb ethernet gadget at each eth init Vitaly Kuzmichev (2): USB-CDC: Do not rename netdev after its registration USB-CDC: Move MAC addresses setting into usb_eth_init drivers/usb/gadget/ether.c | 79 1 files changed, 36 insertions(+), 43 deletions(-) ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 1/1] imximage: Add MX53 boot image support
Dear Jason Liu, In message AANLkTinx920ets6A-F5R-+RiJ06OQLx=5zujbj9lk...@mail.gmail.com you wrote: Do you mean the I need add the braces as the following? if ((fhdr_v1-app_code_barker == APP_CODE_BARKER) (hdr_v1-dcd_table.preamble.barker == DCD_BARKER)) { return IMXIMAGE_V1; } Right. And especially with the blank lines you had before. 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: w...@denx.de Winners never talk about glorious victories. That's because they're the ones who see what the battlefield looks like afterwards. It's only the losers who have glorious victories. - Terry Pratchett, _Small Gods_ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 1/1] imximage: Add MX53 boot image support
Hi, Wolfgang, 2011/1/20 Wolfgang Denk w...@denx.de: Dear Jason Liu, In message AANLkTinx920ets6A-F5R-+RiJ06OQLx=5zujbj9lk...@mail.gmail.com you wrote: Do you mean the I need add the braces as the following? if ((fhdr_v1-app_code_barker == APP_CODE_BARKER) (hdr_v1-dcd_table.preamble.barker == DCD_BARKER)) { return IMXIMAGE_V1; } Right. And especially with the blank lines you had before. Yes, but can we just change to the following since it just one statement, if ((fhdr_v1-app_code_barker == APP_CODE_BARKER) (hdr_v1-dcd_table.preamble.barker == DCD_BARKER)) return IMXIMAGE_V1; Some checkpatch will give a warning, say, no need to add braces for only one statement, something like that. 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: w...@denx.de Winners never talk about glorious victories. That's because they're the ones who see what the battlefield looks like afterwards. It's only the losers who have glorious victories. - Terry Pratchett, _Small Gods_ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v5 1/1] imximage: Add MX53 boot image support
This patch add the MX53 boot image support. This patch has been tested on Freescale MX53EVK board and MX51EVK board. Signed-off-by: Jason Liu r64...@freescale.com --- Changes for v2: - Address the following comments from Stefano, - Get rid of #ifdef in the imximage.h and .c file and use the runtime check for imximage version - Document the IMXIMAGE_VERSION definiton in doc/README.imximage - Move mx53evk/config.mk and mx53evk/imximage.cfg to MX53EVK board support patch. Changes for v3: - Address the following comments from Stefano, - Not change the mx51evk file. The code should take VERSION=1 as default, and we do not need to change the actual boards. - add a note in the documentation and raise an error in code if the VERSION command is read after any other suitable commands. - Change command IMXIMAGE_VERSION simply to IMAGE_VERSION - Need recognize the version directly from its structure and not storing the version into the header when do header verify and print. - Use function pointer to simpliy the code when the version of header is recognized Changes for v4: - Address the following comments from Wolfgang, - Keep the imximage_cmds table sorted, - Add braces for (expx) (expy) gloably, - Return failure to upper call if met errors for function - Add comments for function set_dcd_rst_v1 alike, - Re-orgnize code to avoid deep nesting, Changes for v5: - Remove the blank line before the only one line statement and not using braces for the one line statment for the sake of the same coding style of this file. For example, if (!exp) return ret; --- doc/README.imximage | 12 +- tools/imximage.c| 525 +-- tools/imximage.h| 110 +-- 3 files changed, 487 insertions(+), 160 deletions(-) diff --git a/doc/README.imximage b/doc/README.imximage index 3378f7e..c74239d 100644 --- a/doc/README.imximage +++ b/doc/README.imximage @@ -57,6 +57,13 @@ Configuration command line syntax: 2. Following are the valid command strings and associated data strings:- Command string data string -- --- + IMXIMAGE_VERSION1/2 + 1 is for mx25/mx35/mx51 compatible, + 2 is for mx53 compatible, + others is invalid and error is generated. + This command need appear the fist before + other valid commands in configuration file. + BOOT_FROM nand/spi/sd/onenand Example: BOOT_FROM spi @@ -69,8 +76,9 @@ Configuration command line syntax: Example (write to IOMUXC): DATA 4 0x73FA88a0 0x200 -The processor support up to 60 register programming commands. An error -is generated if more commands are found in the configuration file. +The processor support up to 60 register programming commands for IMXIMAGE_VERSION 1 +and 121 register programming commands for IMXIMAGE_VERSION 2. +An error is generated if more commands are found in the configuration file. 3. All commands are optional to program. diff --git a/tools/imximage.c b/tools/imximage.c index 39f89c2..8e81bdb 100644 --- a/tools/imximage.c +++ b/tools/imximage.c @@ -36,9 +36,10 @@ * Supported commands for configuration file */ static table_entry_t imximage_cmds[] = { - {CMD_BOOT_FROM, BOOT_FROM,boot command, }, - {CMD_DATA, DATA, Reg Write Data, }, - {-1,, , }, + {CMD_BOOT_FROM, BOOT_FROM,boot command, }, + {CMD_DATA, DATA, Reg Write Data, }, + {CMD_IMAGE_VERSION, IMAGE_VERSION,image version, }, + {-1,, , }, }; /* @@ -53,8 +54,21 @@ static table_entry_t imximage_bootops[] = { {-1,, Invalid, }, }; +/* + * IMXIMAGE version definition for i.MX chips + */ +static table_entry_t imximage_versions[] = { + {IMXIMAGE_V1, , (i.MX25/35/51 compatible), }, + {IMXIMAGE_V2, , (i.MX53 compatible), }, + {-1,, (Invalid), }, +}; static struct imx_header imximage_header; +static uint32_t imximage_version; + +static set_dcd_val_t set_dcd_val; +static set_dcd_rst_t set_dcd_rst; +static set_imx_hdr_t set_imx_hdr; static uint32_t get_cfg_value(char *token, char *name, int linenr) { @@ -71,67 +85,353 @@ static uint32_t get_cfg_value(char *token, char *name, int linenr) return value; } -static int imximage_check_image_types(uint8_t type) +static uint32_t detect_imximage_version(struct imx_header *imx_hdr) { - if (type == IH_TYPE_IMXIMAGE) -
Re: [U-Boot] environmental baudrate not used at boot up
Dear Wolfgang Denk, Dear chr...@cyberswitching.com, In message20110119144640.GA8828@cslinux-build01.cyberswitching.local you wrote: Thanks for the feedback. I hope that someone else can continue this work now that I've identified the problem and have developed a solution that works for my needs with no obvious side-effects. Who said there are no side-effects? Just try setting a different baud rate, save it, and reboot. Given that this is such base functionality, I'm surprised that no one else has mentioned anything up to this point; I guess no one else attempts to change the baud rate for subsequent reboots? (Rhetorical, no need to answer.) You are probably right - few people test such changes. I just want to point out that this works fine on our AT91SAM9260/9XE, however the environment is read from I2C EEPROM. Not sure where his ENV is coming from, whether it is read before use, or if there is static data involved before relocation... Best Regards, Reinhard ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] environmental baudrate not used at boot up
On Wed, Jan 19, 2011 at 08:49:12PM +0100, Reinhard Meyer wrote: I just want to point out that this works fine on our AT91SAM9260/9XE, however the environment is read from I2C EEPROM. Not sure where his ENV is coming from, whether it is read before use, or if there is static data involved before relocation... ENV is coming from nandflash. Config is based on at91sam9263ek_nandflash_config. Chris ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] environmental baudrate not used at boot up
On Tue, 18 Jan 2011 21:34:45 -0800 chr...@cyberswitching.com wrote: On Sun, Jan 16, 2011 at 06:01:22AM -0800, chr...@cyberswitching.com wrote: ... Any advice on where to take it from here? Hi everyone, I investigated this a little further, and I'm wondering if the problem is related to the initialization ordering in lib_arm/board.c. Here's the sequence: start_armboot(): 1. init_baudrate() - getenv_r() - serial_setbrg() 2. env_relocate() Note that init_baudrate() calls getenv_r(baudrate) and passes either the result (on success) or CONFIG_BAUDRATE (on error) to serial_setbrg(). Only after this does the environment get relocated using env_relocate(). The full NAND code only works after relocation. So you cannot read out the NAND environment, in the normal way, before serial init -- you get the default environment instead. If you are booting from NAND, I suggest using CONFIG_NAND_ENV_DST to have the NAND SPL load the environment at the same time as it loads U-Boot. If you're using some preloader other than U-Boot's NAND SPL, you'll need to see if it supports something similar. -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] P2020 L2 cache as SRAM
On Wed, 19 Jan 2011 08:50:52 +0100 Fabian Cenedese cened...@indel.ch wrote: At 09:07 17.01.2011 +0100, Fabian Cenedese wrote: Hi We're trying to configure the PPC P2020 cpu to use the L2 cache as SRAM so we can load the U-Boot code in there. However we stumble into problems. Sometimes the cpu goes on trap when trying to access this area. Sometimes there's no trap but we seem to access a different area. That's probably a problem with setting up a TLB/LAW. Has anybody already done this and could share some code with us? I've seen that there's a mpc85xx branch with quite some work going on. Where should we base our work on? Should we use the master or is it better to use this branch? I'm used to svn, not git, so there may be other options I don't know about yet. I know you're busy with patches and releasing, I just wanted to ask again if anybody has already done this. Yes, it's been done. P1_P2_RDB does this when configured for NAND boot. Look for CONFIG_SYS_INIT_L2_ADDR. -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Confirmar
Usted tiene una transferencia de dinero de $85.000 .Por favor confirmar la recepción con su nombre y su país. Enviar por correo electrónico: wude...@w.cn ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [Patch] Fix hash table deletion to prevent lost entries
Dear Peter Barada, In message 4d371208.3090...@logicpd.com you wrote: The hash delete code is in error; instead of just removing the deleted key, it should instead allocate a new hashtable, hash all the keys into the new table except for the deleted key and then reclaim the old table (and deleted key). Can you please come up with a patch? Hashtable delete is broken since freeing entry could break collision chain for other entries. Instead free key/data pair and mark entry as deleted (via negative used value) and then skip deleted entries while probing. Break up hsearch_r into separate henter_r/hfind_r functions for readability. Recycle first deleted entry in probe chain when adding entry to table. Factor primary/secondary hash calculations into functions and use in henter_r/hfind_r/hdelete_r. --- include/search.h | 16 ++- lib/hashtable.c | 382 - 2 files changed, 241 insertions(+), 157 deletions(-) diff --git a/include/search.h b/include/search.h index a7c1293..4466731 100644 --- a/include/search.h +++ b/include/search.h @@ -66,12 +66,16 @@ extern int hcreate_r(size_t __nel, struct hsearch_data *__htab); extern void hdestroy_r(struct hsearch_data *__htab); /* - * Search for entry matching ITEM.key in internal hash table. If - * ACTION is `FIND' return found entry or signal error by returning - * NULL. If ACTION is `ENTER' replace existing data (if any) with - * ITEM.data. - * */ -extern int hsearch_r(ENTRY __item, ACTION __action, ENTRY ** __retval, + * Search for entry matching ITEM.key in internal hash table. Return + * found entry or signal error by returning NULL. + */ +extern int hfind_r(ENTRY __item, ENTRY ** __retval, + struct hsearch_data *__htab); +/* + * Add entry matching ITEM.key in internal hash table. Replace + * existing data (if any) with ITEM.data. + */ +extern int henter_r(ENTRY __item, ENTRY ** __retval, struct hsearch_data *__htab); /* diff --git a/lib/hashtable.c b/lib/hashtable.c index 9f069c0..7b5153a 100644 --- a/lib/hashtable.c +++ b/lib/hashtable.c @@ -65,7 +65,7 @@ * which describes the current status. */ typedef struct _ENTRY { -unsigned int used; +int used; ENTRY entry; } _ENTRY; @@ -152,7 +152,7 @@ void hdestroy_r(struct hsearch_data *htab) /* free used memory */ for (i = 1; i = htab-size; ++i) { -if (htab-table[i].used) { +if (htab-table[i].used 0) { ENTRY *ep = htab-table[i].entry; free(ep-key); @@ -165,77 +165,20 @@ void hdestroy_r(struct hsearch_data *htab) htab-table = NULL; } -/* - * hsearch() - */ - -/* - * This is the search function. It uses double hashing with open addressing. - * The argument item.key has to be a pointer to an zero terminated, most - * probably strings of chars. The function for generating a number of the - * strings is simple but fast. It can be replaced by a more complex function Your patch is line-wrapped and does not apply. Also, insteadof imlementing just the discussed fix, it appears to me a major rewrite - you thow away lots of (useful, in my opinion) comments, debug code, etc., and even replace major parts of the code. In the result, the code looks pretty much different from the standard C library function it was derived from. I don't think all this was needed only to fix the observed problem? What is your rationale for all these changes? 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: w...@denx.de As far as the laws of mathematics refer to reality, they are not cer- tain, and as far as they are certain, they do not refer to reality. -- Albert Einstein ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] usb cdc mode flow
Hi Remy, 2011/1/15 Marcel korg...@home.nl: Hi, Is there someone on the list who has a USB trace of a working CDC implementation ? What I want to know is what happens after all descriptors are received by the host. The last descriptor I receive is a string descriptor saying Ethernet data. I'm busy implementing the USB device controller for the SAM9G45 and got quite In the U-boot-usb tree there is a branch (cdc-at91 branch) that has a working implementation for a SAM9261 core. Maybe this gives you a starting point... This has been my starting point for a couple of weeks and it did help quite a lot already. It's the main reason I checked out this branch. Unfortunately I'm stuck with a tiny issue and was wondering if someone has a USB trace of this SAM9261 implementation or just let me know if everything works well with this board and current git status. I usually assume code in git is working code, but since I can't find a difference between my code and the at91_udc.c code at the point where I'm stuck I very much wonder. Best regards, Marcel ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Pull request: u-boot-usb
Dear Remy Bohmer, In message AANLkTi=xpppa51rausqjuch7sfr0agv-qouzmpa3d...@mail.gmail.com you wrote: The following changes since commit 3f1266d6d5bf14ea7248544db8406d308c6bfa7c: Escape minus signs in manpage (2011-01-19 00:07:51 +0100) are available in the git repository at: git://git.denx.de/u-boot-usb.git master Lei Wen (1): usb_ether: register usb ethernet gadget at each eth init Vitaly Kuzmichev (2): USB-CDC: Do not rename netdev after its registration USB-CDC: Move MAC addresses setting into usb_eth_init drivers/usb/gadget/ether.c | 79 1 files changed, 36 insertions(+), 43 deletions(-) Applied, thanks. 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: w...@denx.de I'd like to meet the man who invented sex and see what he's working on now. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 0/4 V2] Add basic NVIDIA Tegra2 SoC support
Wolfgang, On Mon, Jan 17, 2011 at 4:27 PM, Wolfgang Denk w...@denx.de wrote: Dear Tom Warren, In message AANLkTi=f-14jnam_dy5c1sgtt0nmqm-pnok6gdg4d...@mail.gmail.com you wrote: 1) IO access functions - I pre-reviewed my patch series with Wolfgang (to hopefully catch any blatant errors and smooth the process) and he indicated that C structs and I/O accessor funcs or macros were preferred to my base+offset original code. I don't think I said preferred. I apologize if I really should have been unclear. Fact is, the use of I/O accessors is mandatory for any new code going in. Sorry, I misunderstood what really constituted I/O accessors. Fixed in V3 (coming soon). Since the ARM is 32-bit, and all of our registers are I/O mapped, it made sense just to cast the necessary HW mem-mapped regs as volatile structs and access the members directly. Works well, is easy to read understand, etc. Let me know (with examples, if possible) how I can make it better. It does NOT make sense. Please read the linux/Documentation/volatile-considered-harmful.txt document, and see recent dicussion in the ARM: Avoid compiler optimization for usages of readb, writeb and friends. thread about what happens when you use just volatile pointers. 2) Compiling out support for UARTA or UARTD - didn't seem necessary - size isn't an issue at this point with Tegra2 U-Boot, Maybe you don't care, but we do. Please see http://www.denx.de/wiki/U-Boot/DesignPrinciples, item 5 Done in V3 patch. I was going to respond to your review w/a direct, inline reply, but I thought it better to get the V2 patch out there before the weekend (we're off for MLK, as well). I'm under some pressure to get a baseline Tegra2 patchset in before the merge window closes. I'll be sure to respond to each issue directly on the list in the future, though. Please also make sure to maintain a changelog of in each of your patches (see second bullet in http://www.denx.de/wiki/view/U-Boot/Patches#Sending_updated_patch_versions). OK. I added a V2/V3 changelog to each patch. Hope I got it right. New patchset incoming. Best regards, Wolfgang Denk Thanks for your patience, Tom -- 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: w...@denx.de IMPORTANT NOTICE TO PURCHASERS: The Entire Physical Universe, Inclu- ding This Product, May One Day Collapse Back into an Infinitesimally Small Space. Should Another Universe Subsequently Re-emerge, the Existence of This Product in That Universe Cannot Be Guaranteed. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 0/4] Add basic NVIDIA Tegra2 SoC support
This series of patches adds preliminary/baseline support for NVIDIA's Tegra2 SoC. Basic CPU (AVP), RAM and UART init are covered so that the system (Harmony or Seaboard) can boot to the U-Boot serial cmd prompt. Further support (for Cortex-A9 CPU(s), USB, SD/MMC, etc.) to follow. Changes for V2: - Coding style cleanup - Remove mach-types.h change; wait for ARM kernel sync-up - Move serial driver changes to separate patch - Use board/nvidia/ instead of /board/tegra - Remove TRUE/FALSE defines - Use standard NS16550 register/bit defines in UART init - Change nv-common.h config file to tegra2-common.h Changes for V3: - Use I/O accessors for Tegra2 HW MMIO register access - Allow conditional compile of UARTA/UARTD code to save space Tom Warren (4): arm: Tegra2: Add basic NVIDIA Tegra2 SoC support serial: Add Tegra2 serial port support arm: Tegra2: Add support for NVIDIA Harmony board arm: Tegra2: Add support for NVIDIA Seaboard board MAINTAINERS |5 + arch/arm/cpu/armv7/tegra2/Makefile | 48 + arch/arm/cpu/armv7/tegra2/board.c| 91 ++ arch/arm/cpu/armv7/tegra2/config.mk | 28 +++ arch/arm/cpu/armv7/tegra2/lowlevel_init.S| 66 +++ arch/arm/cpu/armv7/tegra2/sys_info.c | 35 arch/arm/cpu/armv7/tegra2/timer.c| 122 + arch/arm/include/asm/arch-tegra2/clk_rst.h | 155 arch/arm/include/asm/arch-tegra2/pinmux.h| 52 ++ arch/arm/include/asm/arch-tegra2/pmc.h | 125 + arch/arm/include/asm/arch-tegra2/sys_proto.h | 33 arch/arm/include/asm/arch-tegra2/tegra2.h| 49 + arch/arm/include/asm/arch-tegra2/uart.h | 45 + board/nvidia/common/board.c | 249 ++ board/nvidia/common/board.h | 57 ++ board/nvidia/harmony/Makefile| 50 + board/nvidia/seaboard/Makefile | 50 + boards.cfg |2 + common/serial.c |3 +- include/configs/harmony.h| 48 + include/configs/seaboard.h | 44 + include/configs/tegra2-common.h | 160 + include/serial.h |3 +- 23 files changed, 1518 insertions(+), 2 deletions(-) create mode 100644 arch/arm/cpu/armv7/tegra2/Makefile create mode 100644 arch/arm/cpu/armv7/tegra2/board.c create mode 100644 arch/arm/cpu/armv7/tegra2/config.mk create mode 100644 arch/arm/cpu/armv7/tegra2/lowlevel_init.S create mode 100644 arch/arm/cpu/armv7/tegra2/sys_info.c create mode 100644 arch/arm/cpu/armv7/tegra2/timer.c create mode 100644 arch/arm/include/asm/arch-tegra2/clk_rst.h create mode 100644 arch/arm/include/asm/arch-tegra2/pinmux.h create mode 100644 arch/arm/include/asm/arch-tegra2/pmc.h create mode 100644 arch/arm/include/asm/arch-tegra2/sys_proto.h create mode 100644 arch/arm/include/asm/arch-tegra2/tegra2.h create mode 100644 arch/arm/include/asm/arch-tegra2/uart.h create mode 100644 board/nvidia/common/board.c create mode 100644 board/nvidia/common/board.h create mode 100644 board/nvidia/harmony/Makefile create mode 100644 board/nvidia/seaboard/Makefile create mode 100644 include/configs/harmony.h create mode 100644 include/configs/seaboard.h create mode 100644 include/configs/tegra2-common.h -- 1.7.3.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 2/4] serial: Add Tegra2 serial port support
Signed-off-by: Tom Warren twar...@nvidia.com --- Changes for V2: - Move serial driver changes to separate patch common/serial.c |3 ++- include/serial.h |3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/common/serial.c b/common/serial.c index 051ae4e..8ebf9a5 100644 --- a/common/serial.c +++ b/common/serial.c @@ -41,7 +41,8 @@ struct serial_device *__default_serial_console (void) #elif defined(CONFIG_4xx) \ || defined(CONFIG_MB86R0x) || defined(CONFIG_MPC5xxx) \ || defined(CONFIG_MPC83xx) || defined(CONFIG_MPC85xx) \ - || defined(CONFIG_MPC86xx) || defined(CONFIG_SYS_SC520) + || defined(CONFIG_MPC86xx) || defined(CONFIG_SYS_SC520) \ + || defined(CONFIG_TEGRA2) #if defined(CONFIG_CONS_INDEX) defined(CONFIG_SYS_NS16550_SERIAL) #if (CONFIG_CONS_INDEX==1) return eserial1_device; diff --git a/include/serial.h b/include/serial.h index 15ab73c..f21d961 100644 --- a/include/serial.h +++ b/include/serial.h @@ -27,7 +27,8 @@ extern struct serial_device * default_serial_console (void); defined(CONFIG_405EP) || defined(CONFIG_405EZ) || defined(CONFIG_405EX) || \ defined(CONFIG_MB86R0x) || defined(CONFIG_MPC5xxx) || \ defined(CONFIG_MPC83xx) || defined(CONFIG_MPC85xx) || \ -defined(CONFIG_MPC86xx) || defined(CONFIG_SYS_SC520) +defined(CONFIG_MPC86xx) || defined(CONFIG_SYS_SC520) || \ +defined(CONFIG_TEGRA2) extern struct serial_device serial0_device; extern struct serial_device serial1_device; #if defined(CONFIG_SYS_NS16550_SERIAL) -- 1.7.3.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 1/4] arm: Tegra2: Add basic NVIDIA Tegra2 SoC support
Signed-off-by: Tom Warren twar...@nvidia.com --- Changes for V2: - Coding style cleanup - Move serial driver changes to separate patch - Use board/nvidia/ instead of /board/tegra - Remove TRUE/FALSE defines - Use standard NS16550 register/bit defines in UART init Changes for V3: - Use I/O accessors for Tegra2 HW MMIO register access - Allow conditional compile of UARTA/UARTD code to save space arch/arm/cpu/armv7/tegra2/Makefile | 48 + arch/arm/cpu/armv7/tegra2/board.c| 91 ++ arch/arm/cpu/armv7/tegra2/config.mk | 28 +++ arch/arm/cpu/armv7/tegra2/lowlevel_init.S| 66 +++ arch/arm/cpu/armv7/tegra2/sys_info.c | 35 arch/arm/cpu/armv7/tegra2/timer.c| 122 + arch/arm/include/asm/arch-tegra2/clk_rst.h | 155 arch/arm/include/asm/arch-tegra2/pinmux.h| 52 ++ arch/arm/include/asm/arch-tegra2/pmc.h | 125 + arch/arm/include/asm/arch-tegra2/sys_proto.h | 33 arch/arm/include/asm/arch-tegra2/tegra2.h| 49 + arch/arm/include/asm/arch-tegra2/uart.h | 45 + board/nvidia/common/board.c | 249 ++ board/nvidia/common/board.h | 57 ++ 14 files changed, 1155 insertions(+), 0 deletions(-) create mode 100644 arch/arm/cpu/armv7/tegra2/Makefile create mode 100644 arch/arm/cpu/armv7/tegra2/board.c create mode 100644 arch/arm/cpu/armv7/tegra2/config.mk create mode 100644 arch/arm/cpu/armv7/tegra2/lowlevel_init.S create mode 100644 arch/arm/cpu/armv7/tegra2/sys_info.c create mode 100644 arch/arm/cpu/armv7/tegra2/timer.c create mode 100644 arch/arm/include/asm/arch-tegra2/clk_rst.h create mode 100644 arch/arm/include/asm/arch-tegra2/pinmux.h create mode 100644 arch/arm/include/asm/arch-tegra2/pmc.h create mode 100644 arch/arm/include/asm/arch-tegra2/sys_proto.h create mode 100644 arch/arm/include/asm/arch-tegra2/tegra2.h create mode 100644 arch/arm/include/asm/arch-tegra2/uart.h create mode 100644 board/nvidia/common/board.c create mode 100644 board/nvidia/common/board.h diff --git a/arch/arm/cpu/armv7/tegra2/Makefile b/arch/arm/cpu/armv7/tegra2/Makefile new file mode 100644 index 000..75fba0b --- /dev/null +++ b/arch/arm/cpu/armv7/tegra2/Makefile @@ -0,0 +1,48 @@ +# +# (C) Copyright 2010,2011 Nvidia Corporation. +# +# (C) Copyright 2000-2003 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de. +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# + +include $(TOPDIR)/config.mk + +LIB= $(obj)lib$(SOC).o + +SOBJS := lowlevel_init.o +COBJS := sys_info.o board.o timer.o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) + +all:$(obj).depend $(LIB) + +$(LIB):$(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/arch/arm/cpu/armv7/tegra2/board.c b/arch/arm/cpu/armv7/tegra2/board.c new file mode 100644 index 000..1e92d98 --- /dev/null +++ b/arch/arm/cpu/armv7/tegra2/board.c @@ -0,0 +1,91 @@ +/* + * (C) Copyright 2010,2011 + * NVIDIA Corporation www.nvidia.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 + */ + +#include
[U-Boot] [PATCH v3 4/4] arm: Tegra2: Add support for NVIDIA Seaboard board
Signed-off-by: Tom Warren twar...@nvidia.com --- Changes for V2: - Remove mach-types.h change; wait for ARM kernel sync-up - Use board/nvidia/ instead of /board/tegra MAINTAINERS|1 + board/nvidia/seaboard/Makefile | 50 boards.cfg |1 + include/configs/seaboard.h | 44 +++ 4 files changed, 96 insertions(+), 0 deletions(-) create mode 100644 board/nvidia/seaboard/Makefile create mode 100644 include/configs/seaboard.h diff --git a/MAINTAINERS b/MAINTAINERS index b5cff19..f4795d3 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -844,6 +844,7 @@ Prafulla Wadaskar prafu...@marvell.com Tom Warren twar...@nvidia.com harmony Tegra2 (ARM7 A9 Dual Core) + seaboardTegra2 (ARM7 A9 Dual Core) Matthias Weisser weiss...@arcor.de diff --git a/board/nvidia/seaboard/Makefile b/board/nvidia/seaboard/Makefile new file mode 100644 index 000..3a146cb --- /dev/null +++ b/board/nvidia/seaboard/Makefile @@ -0,0 +1,50 @@ +# +# (C) Copyright 2010,2011 +# NVIDIA Corporation www.nvidia.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 +# + +include $(TOPDIR)/config.mk + +LIB= $(obj)lib$(BOARD).o + +COBJS += ../common/board.o + +SRCS := $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) + +$(LIB):$(obj).depend $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) + +clean: + rm -f $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak $(obj).depend + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/boards.cfg b/boards.cfg index ee7c4b7..3c4c249 100644 --- a/boards.cfg +++ b/boards.cfg @@ -123,6 +123,7 @@ omap4_sdp4430arm armv7 sdp4430 ti s5p_goni arm armv7 goni samsungs5pc1xx smdkc100 arm armv7 smdkc100 samsungs5pc1xx harmony arm armv7 harmony nvidia tegra2 +seaboard arm armv7 seaboard nvidia tegra2 actux1 arm ixp actux2 arm ixp actux3 arm ixp diff --git a/include/configs/seaboard.h b/include/configs/seaboard.h new file mode 100644 index 000..98d82d6 --- /dev/null +++ b/include/configs/seaboard.h @@ -0,0 +1,44 @@ +/* + * (C) Copyright 2010,2011 + * NVIDIA Corporation www.nvidia.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 + */ + +#ifndef __CONFIG_H +#define __CONFIG_H + +#include asm/sizes.h +#include tegra2-common.h + +/* High-level configuration options */ +#define TEGRA2_SYSMEM mem=384M@0M nvmem=128M@384M mem=512M@512M +#define V_PROMPT Tegra2 (SeaBoard) # +#define CONFIG_TEGRA2_BOARD_STRING NVIDIA Seaboard + +/* Board-specific serial config */ +#define CONFIG_SERIAL_MULTI +#define CONFIG_TEGRA2_ENABLE_UARTA 0 +#define CONFIG_TEGRA2_ENABLE_UARTD 1 +#define CONFIG_SYS_NS16550_COM1NV_PA_APB_UARTD_BASE + +#define CONFIG_MACH_TYPE MACH_TYPE_TEGRA_SEABOARD +#define CONFIG_SYS_BOARD_ODMDATA
[U-Boot] [PATCH v3 3/4] arm: Tegra2: Add support for NVIDIA Harmony board
Signed-off-by: Tom Warren twar...@nvidia.com --- Changes for V2: - Use board/nvidia/ instead of /board/tegra - Change nv-common.h config file to tegra2-common.h MAINTAINERS |4 + board/nvidia/harmony/Makefile | 50 boards.cfg |1 + include/configs/harmony.h | 48 include/configs/tegra2-common.h | 160 +++ 5 files changed, 263 insertions(+), 0 deletions(-) create mode 100644 board/nvidia/harmony/Makefile create mode 100644 include/configs/harmony.h create mode 100644 include/configs/tegra2-common.h diff --git a/MAINTAINERS b/MAINTAINERS index ba83f71..b5cff19 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -841,6 +841,10 @@ Prafulla Wadaskar prafu...@marvell.com rd6281a ARM926EJS (Kirkwood SoC) sheevaplug ARM926EJS (Kirkwood SoC) +Tom Warren twar...@nvidia.com + + harmony Tegra2 (ARM7 A9 Dual Core) + Matthias Weisser weiss...@arcor.de jadecpu ARM926EJS (MB86R01 SoC) diff --git a/board/nvidia/harmony/Makefile b/board/nvidia/harmony/Makefile new file mode 100644 index 000..3a146cb --- /dev/null +++ b/board/nvidia/harmony/Makefile @@ -0,0 +1,50 @@ +# +# (C) Copyright 2010,2011 +# NVIDIA Corporation www.nvidia.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 +# + +include $(TOPDIR)/config.mk + +LIB= $(obj)lib$(BOARD).o + +COBJS += ../common/board.o + +SRCS := $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) + +$(LIB):$(obj).depend $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) + +clean: + rm -f $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak $(obj).depend + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/boards.cfg b/boards.cfg index 94b8745..ee7c4b7 100644 --- a/boards.cfg +++ b/boards.cfg @@ -122,6 +122,7 @@ omap4_panda arm armv7 panda ti omap4_sdp4430arm armv7 sdp4430 ti omap4 s5p_goni arm armv7 goni samsungs5pc1xx smdkc100 arm armv7 smdkc100 samsungs5pc1xx +harmony arm armv7 harmony nvidia tegra2 actux1 arm ixp actux2 arm ixp actux3 arm ixp diff --git a/include/configs/harmony.h b/include/configs/harmony.h new file mode 100644 index 000..7d8f27a --- /dev/null +++ b/include/configs/harmony.h @@ -0,0 +1,48 @@ +/* + * (C) Copyright 2010,2011 + * NVIDIA Corporation www.nvidia.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 + */ + +#ifndef __CONFIG_H +#define __CONFIG_H + +#include asm/sizes.h +#include tegra2-common.h + +/* High-level configuration options */ +#define TEGRA2_SYSMEM mem=384M@0M nvmem=128M@384M mem=512M@512M +#define V_PROMPT Tegra2 (Harmony) # +#define CONFIG_TEGRA2_BOARD_STRING NVIDIA Harmony + +/* Board-specific serial config */ +#define CONFIG_SERIAL_MULTI +#define CONFIG_TEGRA2_ENABLE_UARTD 1 +#define CONFIG_TEGRA2_ENABLE_UARTA 0 +
Re: [U-Boot] usage of DMA
Hi Vitaly, Thanks so much for your reply. I got a little further now. Marcel wrote: Could you enable debug output for ether.c and for your UDC driver and show the results? I enabled a lot of extra debugging messages so this is not very short. The output attached below is including start of macb but USB device behave the same when I don't enable that. [...] USB network up! ep3 status = 1040c40 rx_submit size 1 = 1570 size 2 = 2081 size 3 = 2048 ep2: queue req 77fec8f0, len 2048 udc: invalid request NO REQUEST BUF Received ETH pack : 00 00 00 00 00 00 00 00 ERROR: rx submit -- -22 at ether.c:1289/rx_submit() ### main_loop entered: bootdelay=3 ### main_loop: bootcmd=mtdparts default; nand read 0x7100 nand0,0; bootm 0x7100 Hit any key to stop autoboot: 0 Sam9g45 First, I don't completely understand how do you use the gadget driver. You do not run any commands from u-boot prompt and your bootcmd does not have any network actions. Why your usb gadget driver becomes started? A good question. I enable it in board_eth_init as you mention below. Second, could you add the following debug printout into rx_submit and check that NetRxPackets is really initialized? @@ -1261,6 +1261,8 @@ static int rx_submit(struct eth_dev *dev req-length = size; req-complete = rx_complete; + printf(NetRxPackets[0] = %p !!!\n, NetRxPackets[0]); + retval = usb_ep_queue(dev-out_ep, req, gfp_flags); if (retval) --- It printed : NetRxPackets[0] = (null) !!! Since NetRxPackets is defined as an array of pointers, it needs to be initialized. And NetLoop does this: So far I figured as well, just not why this didn't happen. So I fear that your gadget is started manually. You should not do that! I fear you where right about that. I don't know for sure what triggered it but after I disabled CONFIG_MACB in my config things looked a whole lot different ! The only thing that you can do with your udc driver during the board initialization is the following: static struct usba_platform_data usba_pdata = { ... }; int board_eth_init(bd_t *bis) { int rc = 0; #if defined(CONFIG_USB_ETHER) defined(CONFIG_USB_GADGET_ATMEL_USBA) rc = usba_udc_probe(usba_pdata); if (!rc) rc = usb_eth_initialize(bis); #endif return rc; } This is what I did. If you want to autoboot from tftp you should specify bootcmd environment variable to something like tftp uImage; bootm. And always use usb gadget only with network commands like tftp, dhcp, ping, etc. I'm quite sure the initialisation was the issue, causing the buffers to be fine. I still wonder how it exactly works, but since it's alive now, I can continue to find out what really happens. I do wonder about whether I can use both normal ethernet and USB-gadget (cdc) at the same time, other whether it's restricted to using only one. Thanks so much for your reply. I'm sure I could have stared at this for another couple of days and be looking in the wrong places over and over again. Best regards, Marcel ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] powerpc/8xxx: Introduce 85xx, 86xx, QorIQ config headers
Dear Kumar Gala, In message 1295429250-25788-1-git-send-email-ga...@kernel.crashing.org you wrote: Add new headers that capture common defines for a given SoC/processor rather than duplicating that information in board config.h and random other places. Eventually this should be handled by Kconfig defconfigs Signed-off-by: Kumar Gala ga...@kernel.crashing.org --- * I know its late for such a patch, but I think it best to introduce right after the merge window closes so that patches for the next release deal with it and I didn't require everyone else to deal with for this merge window Also I think its a beneficial cleanup to address several long standing code duplication problems. arch/powerpc/include/asm/config.h | 41 ++- arch/powerpc/include/asm/config_mpc85xx.h | 187 + arch/powerpc/include/asm/config_mpc86xx.h | 38 ++ drivers/misc/fsl_law.c| 22 + include/configs/P4080DS.h | 16 --- 5 files changed, 236 insertions(+), 68 deletions(-) create mode 100644 arch/powerpc/include/asm/config_mpc85xx.h create mode 100644 arch/powerpc/include/asm/config_mpc86xx.h Acked-by: Wolfgang Denk w...@denx.de 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: w...@denx.de It's a small world, but I wouldn't want to paint it. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] powerpc/8xxx: Introduce 85xx, 86xx, QorIQ config headers
On Jan 19, 2011, at 3:40 PM, Wolfgang Denk wrote: Dear Kumar Gala, In message 1295429250-25788-1-git-send-email-ga...@kernel.crashing.org you wrote: Add new headers that capture common defines for a given SoC/processor rather than duplicating that information in board config.h and random other places. Eventually this should be handled by Kconfig defconfigs Signed-off-by: Kumar Gala ga...@kernel.crashing.org --- * I know its late for such a patch, but I think it best to introduce right after the merge window closes so that patches for the next release deal with it and I didn't require everyone else to deal with for this merge window Also I think its a beneficial cleanup to address several long standing code duplication problems. arch/powerpc/include/asm/config.h | 41 ++- arch/powerpc/include/asm/config_mpc85xx.h | 187 + arch/powerpc/include/asm/config_mpc86xx.h | 38 ++ drivers/misc/fsl_law.c| 22 + include/configs/P4080DS.h | 16 --- 5 files changed, 236 insertions(+), 68 deletions(-) create mode 100644 arch/powerpc/include/asm/config_mpc85xx.h create mode 100644 arch/powerpc/include/asm/config_mpc86xx.h Acked-by: Wolfgang Denk w...@denx.de applied to 85xx - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] usage of DMA
Hi Vitaly, If you want to autoboot from tftp you should specify bootcmd environment variable to something like tftp uImage; bootm. And always use usb gadget only with network commands like tftp, dhcp, ping, etc. Currently it boots to the prompt. Than when I specify things like the above it starts to register the gadget driver. Is that the way it's supposed to work ? I wonder about how to deal with this from the host side as it must also set up the usb0 network interface but can do that only after the gadget driver is fully loaded. Sorry for my little knowledge on the cdc stuff. My knowledge on USB is far better than ethernet. I'm basically just using ether.c because it's available already and sounded like a good idea to start with instead of writing a new driver or implement another one. Eventually I plan to include DFU or something else though. best regards, Marcel ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 1/4] arm: Tegra2: Add basic NVIDIA Tegra2 SoC support
Hi Tom, Some last minutes nits: It looks like some of the new functions can be declared statically. It'd be nice to do so where possible. snip --- /dev/null +++ b/arch/arm/cpu/armv7/tegra2/lowlevel_init.S @@ -0,0 +1,66 @@ +/* + * Board specific setup info This is CPU-specific code, correct? + * + * (C) Copyright 2010,2011 + * NVIDIA Corporation www.nvidia.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 + */ + +#include config.h +#include version.h + +_TEXT_BASE: + .word CONFIG_SYS_TEXT_BASE@ sdram load addr from config file + +.global invalidate_dcache +invalidate_dcache: + mov pc, lr + + + .align 5 +.global reset_cpu +reset_cpu: + ldr r1, rstctl @ get addr for global reset + @ reg + ldr r3, [r1] + orr r3, r3, #0x10 + str r3, [r1]@ force reset + mov r0, r0 +_loop_forever: + b _loop_forever +rstctl: + .word PRM_RSTCTRL + +.globl lowlevel_init +lowlevel_init: + ldr sp, SRAM_STACK + str ip, [sp] + mov ip, lr + bl s_init @ go setup pll, mux memory + ldr ip, [sp] + mov lr, ip + + mov pc, lr @ back to arch calling code + + @ the literal pools origin + .ltorg + +SRAM_STACK: + .word LOW_LEVEL_SRAM_STACK diff --git a/arch/arm/cpu/armv7/tegra2/sys_info.c b/arch/arm/cpu/armv7/tegra2/sys_info.c new file mode 100644 index 000..6d11dc1 --- /dev/null +++ b/arch/arm/cpu/armv7/tegra2/sys_info.c @@ -0,0 +1,35 @@ +/* + * (C) Copyright 2010,2011 + * NVIDIA Corporation www.nvidia.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 + */ + +#include common.h + +#ifdef CONFIG_DISPLAY_CPUINFO +/* Print CPU information */ +int print_cpuinfo(void) +{ + puts(TEGRA2\n); + + /* TBD: Add printf of major/minor rev info, stepping, etc. */ + return 0; +} +#endif /* CONFIG_DISPLAY_CPUINFO */ diff --git a/arch/arm/cpu/armv7/tegra2/timer.c b/arch/arm/cpu/armv7/tegra2/timer.c new file mode 100644 index 000..858af0f --- /dev/null +++ b/arch/arm/cpu/armv7/tegra2/timer.c @@ -0,0 +1,122 @@ +/* + * (C) Copyright 2010,2011 + * NVIDIA Corporation www.nvidia.com + * + * (C) Copyright 2008 + * Texas Instruments + * + * Richard Woodruff r-woodru...@ti.com + * Syed Moahmmed Khasim kha...@ti.com + * + * (C) Copyright 2002 + * Sysgo Real-Time Solutions, GmbH www.elinos.com + * Marius Groeger mgroe...@sysgo.de + * Alex Zuepke a...@sysgo.de + * + * (C) Copyright 2002 + * Gary Jennejohn, DENX Software Engineering, ga...@denx.de + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along
Re: [U-Boot] [PATCH v3 1/4] arm: Tegra2: Add basic NVIDIA Tegra2 SoC support
On Thu, Jan 20, 2011 at 8:19 AM, Tom Warren twarren.nvi...@gmail.com wrote: + +/* + * Routine: uart_clock_init + * Description: init the PLL and clock for the UART in uart_num + */ +void uart_clock_init(int uart_num) +{ + clk_rst_ctlr *const clkrst = (clk_rst_ctlr *)NV_PA_CLK_RST_BASE; + static int pllp_init_done; + u32 reg; + + if (!pllp_init_done) { + + /* Override pllp setup for 216MHz operation. */ + reg = (PLL_BYPASS | PLL_BASE_OVRRIDE | PLL_DIVP); + reg |= (((NVRM_PLLP_FIXED_FREQ_KHZ/500) 8) | PLL_DIVM); + writel(reg, clkrst-crc_pllp_base); + + reg |= PLL_ENABLE; + writel(reg, clkrst-crc_pllp_base); Is this correct? Should it not be writel(reg, clkrst-crc_pllp_base); Similarly for other readl()'s and writel()'s Regards, Graeme ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] NAND: Fix saving of redundand environment
When redundand environments are used the serial needs to get increased, otherwise the old one will still be used. Signed-off-by: Alexander Holler hol...@ahsoftware.de --- common/env_nand.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/common/env_nand.c b/common/env_nand.c index 2682f07..a4480cb 100644 --- a/common/env_nand.c +++ b/common/env_nand.c @@ -205,7 +205,7 @@ int saveenv(void) return 1; } env_new.crc = crc32(0, env_new.data, ENV_SIZE); - env_new.flags = ACTIVE_FLAG; + ++env_new.flags; /* increase the serial */ if(gd-env_valid == 1) { puts(Erasing redundant NAND...\n); -- 1.7.3.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] IMX51 EVK Splash Screen
Hi folks - I had posted last week. I was able to get basic Splash Screen going on EVK, through using patches I found from googling around. At the end of this email, the patch set that shows the differences from the U-Boot I pulled on 12/24/2010. I am not sure I have the right patch set, but in this case, what I have does seem to work; U-Boot does output to LCD display on the second Display Interface. Through some of the archives, this one specifically: http://www.mail-archive.com/u-boot@lists.denx.de/msg41664.html There seems to have been a discussion on lcd_setmem(). Has this been resolved, and I missed it? You'll see from patch set that I just put a very large buffer in place (hard coded hack). U-Boot hung on boot before I put this in, and based on what I see on mailing list, this seems to be an issue of not having the display information available early on in boot. At any rate, I got it to boot, and see that the LCD shows display on startup. Yet, I lose the console on this; the serial port is read, but the output goes to LCD. I have still not displayed a bit map image, but with IPU working, not horribly concerned. In an ideal world, what I would like is to not loose the console. I want stdin/stdout to remain on serial port, while I toss a bit map out on LCD. Any comments on how to do this? End game is that I toss a splash screen up on LCD on EVK, while having U-Boot information still on the console. So, a couple of things: 1. Do I have correct patch work for this version of U-Boot, or is there a newer version of U-Boot to pull? I pulled both mainline and IMX tree yesterday, don't see the MX51 EVK in them. 2. How to configure so that I get console while LCD is available for display. 3. What is current status on lcd_setmem() thing. If this patch set that I have is workable, then I am going to move forward to put in support for DVI interface on EVK, and figure out how to use U-Boot Environment Variables to specify which DIU to use. I might have missed a few things along the way folks; I am not the sharpest tool in the shed. Please let me know if I missed patch sets on lcd_setmem(), and help me understand how to make sure console works with Splash Screen. Thanks, tom Index: include/configs/mx51evk.h === --- include/configs/mx51evk.h (revision 173) +++ include/configs/mx51evk.h (working copy) @@ -190,6 +190,15 @@ #define CONFIG_SYS_DDR_CLKSEL 0 #define CONFIG_SYS_CLKTL_CBCDR 0x59E35100 +/* + * Framebuffer and LCD + */ +#define CONFIG_LCD +#define CONFIG_VIDEO_MX5 +#define LCD_BPPLCD_COLOR16 +#define CONFIG_CMD_BMP +#define CONFIG_BMP_16BPP + /*--- * FLASH and environment organization */ Index: board/freescale/mx51evk/mx51evk.c === --- board/freescale/mx51evk/mx51evk.c (revision 170) +++ board/freescale/mx51evk/mx51evk.c (working copy) @@ -34,10 +34,38 @@ #include fsl_pmic.h #include mc13892.h +#ifdef CONFIG_LCD +#include linux/fb.h +#include lcd.h +#endif + DECLARE_GLOBAL_DATA_PTR; static u32 system_rev; +extern int mx51_fb_init(struct fb_videomode *mode, u32 ipu_di, u32 pix_fmt); +#ifdef CONFIG_LCD +static struct fb_videomode claa_wvga = { + CLAA07LC0ACW, + 57, /* Refresh */ + 800,/* xres */ + 480,/* yres */ + 37037, /* pixclock = 27Mhz */ + 40, /* left margin */ + 60, /* right margin */ + 10, /* upper margin */ + 10, /* lower margin */ + 20, /* hsync-len */ + 10, /* vsync-len */ + 0, /* sync */ + FB_VMODE_NONINTERLACED, /* vmode */ + 0, /* flag */ +}; + +static int wvga_ipu_di = 1; +static int wvga_bppix = 16; +#endif + #ifdef CONFIG_FSL_ESDHC struct fsl_esdhc_cfg esdhc_cfg[2] = { {MMC_SDHC1_BASE_ADDR, 1}, @@ -148,6 +176,41 @@ mxc_iomux_set_pad(MX51_PIN_NANDF_D11, 0x2180); } +#ifdef CONFIG_LCD +void setup_iomux_ipu(void) +{ + puts( setup_iopmux_ipu(): invoked\n ); + /* DISP2_DAT [0:15] are configured by default */ + mxc_request_iomux(MX51_PIN_DI1_D1_CS, IOMUX_CONFIG_ALT4); + mxc_iomux_set_pad(MX51_PIN_DI1_D1_CS, + PAD_CTL_PKE_ENABLE | PAD_CTL_DRV_HIGH | PAD_CTL_SRE_FAST); + mxc_request_iomux(MUX_IN_GPIO3_IPP_IND_G_IN_4_SELECT_INPUT, + INPUT_CTL_PATH1); + + /* DISP2_DRDY pin */ + mxc_request_iomux(MX51_PIN_DI_GP4, IOMUX_CONFIG_ALT4); + mxc_iomux_set_pad(MX51_PIN_DI_GP4, PAD_CTL_PKE_ENABLE | + PAD_CTL_PUE_KEEPER | PAD_CTL_DRV_LOW); + + puts( setup_iopmux_ipu(): done\n ); +} + +#endif + +#ifdef CONFIG_LCD +void lcd_enable(void) +{ + int ret; +puts( lcd_enable(): invoked\n ); + + ret = mx51_fb_init(claa_wvga, wvga_ipu_di, wvga_bppix); + if (ret) { + puts(LCD cannot be
Re: [U-Boot] [PATCH v3] powerpc/8xxx: Add new hwconfig APIs to address early parsing used by DDR init
On Jan 19, 2011, at 2:53 AM, Wolfgang Denk wrote: Dear Kumar Gala, In message 1295391047-10952-1-git-send-email-ga...@kernel.crashing.org you wrote: There are several users of the hwconfig APIs (8xxx DDR) before we have the environment properly setup. This causes issues because of the numerous ways the environment might be accessed because of the non-volatile memory it might be stored in. Additionally the access might be so early that memory isn't even properly setup for us. Towards resolving these issues we provide versions of all the hwconfig APIs that can be passed in a buffer to parse and leave it to the caller to determine how to allocate and populate the buffer. We use the _f naming convention for these new APIs even though they are perfectly useable after relocation and the environment being ready. We also now warn if the non-f APIs are called before the environment is ready to allow users to address the issues. Finally, we convert the 8xxx DDR code to utilize the new APIs to hopefully address the issue once and for all. We have the 8xxx DDR code create a buffer on the stack and populate it via getenv_f(). Signed-off-by: Kumar Gala ga...@kernel.crashing.org --- * Reworked __hwconfig to not require an additional local var per WD's comments arch/powerpc/cpu/mpc8xxx/ddr/options.c | 78 ++--- common/hwconfig.c | 86 --- include/hwconfig.h | 68 +++-- 3 files changed, 154 insertions(+), 78 deletions(-) Acked-by: Wolfgang Denk w...@denx.de Please pull through 8xxx repo. Best regards, Wolfgang Denk applied to 85xx - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [Patch v3 1/7] mpc8xxx: Display RDIMM if detected
On Jan 10, 2011, at 4:02 PM, York Sun wrote: Print a message when a RDIMM is detected. Signed-off-by: York Sun york...@freescale.com --- .../cpu/mpc8xxx/ddr/lc_common_dimm_params.c| 18 +++--- 1 files changed, 7 insertions(+), 11 deletions(-) applied to 85xx - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [Patch v3 2/7] mpc8xxx: Enable ECC on/off control in hwconfig
On Jan 10, 2011, at 4:02 PM, York Sun wrote: Add fsl_ddr:ecc=on in hwconfig. If ECC is enabled in board configuration file, ECC can be turned on/off by this switch. If this switch is omitted, it is ON by default. Updated hwconfig calls to use local buffer. Syntax is hwconfig=fsl_ddr:ecc=on Signed-off-by: York Sun york...@freescale.com --- arch/powerpc/cpu/mpc8xxx/ddr/options.c |9 ++--- doc/README.fsl-ddr |7 +++ 2 files changed, 13 insertions(+), 3 deletions(-) applied to 85xx - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [Patch v3 3/7] corenet_ds: Enable ECC for corenet_ds
On Jan 10, 2011, at 4:02 PM, York Sun wrote: ECC can be turned on/off by hwconfig without recompiling. So enable it by default. Signed-off-by: York Sun york...@freescale.com --- include/configs/corenet_ds.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) applied to 85xx - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [Patch v3 4/7] mpc85xx: Adding more registers and options
On Jan 10, 2011, at 4:02 PM, York Sun wrote: This patch exposes more registers which can be used by the DDR drivers or interactive debugging. U-boot doesn't use all the registers in DDRC. When advanced tuning is required, writing to those registers is needed. Add writing to cdr1, cdr2, err_disable, err_int_en and debug registers Add options to override rcw, address parity to RDIMMs. Use array for debug registers. Signed-off-by: York Sun york...@freescale.com --- arch/powerpc/cpu/mpc85xx/ddr-gen3.c | 10 -- arch/powerpc/include/asm/fsl_ddr_sdram.h | 12 arch/powerpc/include/asm/immap_85xx.h| 21 ++--- board/tqc/tqm85xx/sdram.c|8 4 files changed, 26 insertions(+), 25 deletions(-) applied to 85xx - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [Patch v3 5/7] mpc85xx: Enable unique mode registers and dynamic ODT for DDR3
On Jan 10, 2011, at 4:03 PM, York Sun wrote: Added fsl_ddr_get_version() function to for DDR3 to poll DDRC IP version (major, minor, errata) to determine if unique mode registers are available. If true, always use unique mode registers. Dynamic ODT is enabled if needed. The table is documented in doc/README.fsl-ddr. This function may also need to be extend for future other platforms if such a feature exists. Enable address parity and RCW by default for RDIMMs. Change default output driver impedance from 34 ohm to 40ohm. Make it 34ohm for quad-rank RDIMMs. Use a formula to calculate rodt_on for timing_cfg_5. Signed-off-by: York Sun york...@freescale.com --- arch/powerpc/cpu/mpc85xx/ddr-gen3.c |6 + arch/powerpc/cpu/mpc8xxx/ddr/ctrl_regs.c | 250 - arch/powerpc/cpu/mpc8xxx/ddr/options.c | 308 +- arch/powerpc/include/asm/fsl_ddr_sdram.h | 18 ++ doc/README.fsl-ddr | 67 +++- 5 files changed, 595 insertions(+), 54 deletions(-) applied to 85xx - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [Patch v3 6/7] mpc85xx: Implement workaround for erratum DDR-A003
On Jan 10, 2011, at 4:03 PM, York Sun wrote: Erratum DDR-A003 requires workaround to correctly set RCW10 for registered DIMM. Also adding polling after enabling DDR controller to ensure completion. Signed-off-by: York Sun york...@freescale.com --- arch/powerpc/cpu/mpc85xx/cmd_errata.c|4 ++ arch/powerpc/cpu/mpc85xx/ddr-gen3.c | 81 +- arch/powerpc/include/asm/fsl_ddr_sdram.h | 19 +++ include/configs/P4080DS.h|1 + 4 files changed, 104 insertions(+), 1 deletions(-) applied to 85xx [with minor updates for other patches to move #define of ERRATA into config_mpc85xx.h] - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [Patch v3 7/7] corenet_ds: Extend board specific parameters
On Jan 10, 2011, at 4:03 PM, York Sun wrote: Extend board specific parameters to include cpo, write leveling override Extend write leveling sample to 0xf Adding rcw overrid for quad-rank RDIMMs Signed-off-by: York Sun york...@freescale.com --- arch/powerpc/include/asm/fsl_ddr_sdram.h |3 + board/freescale/corenet_ds/ddr.c | 159 +++--- 2 files changed, 84 insertions(+), 78 deletions(-) applied to 85xx - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] corenet_ds: Update to use new hwconfig APIs
On Jan 12, 2011, at 10:20 AM, York Sun wrote: Hwconfig is called before relocating. Use the new hwconfig APIs. Signed-off-by: York Sun york...@freescale.com --- arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c | 15 +-- 1 files changed, 13 insertions(+), 2 deletions(-) applied to 85xx - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH ] powerpc/85xx: Protect all LBC code with CONFIG_FSL_LBC
On Jan 19, 2011, at 1:39 AM, Dipen Dudhat wrote: Future SoC (like the P1010) replace the LBC controller with the new IFC (Integrated Flash Controller) so ensure we properly protect code that is related to the LBC. Signed-off-by: Dipen Dudhat dipen.dud...@freescale.com Acked-by: Kumar Gala ga...@kernel.crashing.org --- arch/powerpc/cpu/mpc85xx/cpu.c |9 - arch/powerpc/cpu/mpc85xx/speed.c |6 +- 2 files changed, 13 insertions(+), 2 deletions(-) applied to 85xx - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot