Re: [U-Boot] [PATCH 2/2] Changes to move hawkboard to the new infrastructure.
Hi Sughosh and Tom, On Tuesday, January 10, 2012, Sughosh Ganu urwithsugh...@gmail.com wrote: On Mon Jan 09, 2012 at 04:30:56PM -0700, Tom Rini wrote: On 01/09/2012 11:28 AM, Sughosh Ganu wrote: snip --- a/arch/arm/cpu/arm926ejs/davinci/Makefile +++ b/arch/arm/cpu/arm926ejs/davinci/Makefile @@ -38,8 +38,11 @@ COBJS-$(CONFIG_DRIVER_TI_EMAC) += lxt972.o dp83848.o et1011c.o ksz8873.o ifdef CONFIG_SPL_BUILD COBJS-y+= spl.o -COBJS-$(CONFIG_SOC_DM365) += dm365_lowlevel.o -COBJS-$(CONFIG_SOC_DA8XX) += da850_lowlevel.o +COBJS-$(CONFIG_DM365_SPL) += dm365_lowlevel.o +COBJS-$(CONFIG_DM365_SPL) += dm365_spl.o +COBJS-$(CONFIG_DA850EVM_SPL) += da850_lowlevel.o +COBJS-$(CONFIG_DA850EVM_SPL) += da850_spl.o +COBJS-$(CONFIG_HAWKBOARD_SPL) += hawkboard_nand_spl.o endif CONFIG_SPL_BUILD means we'll only do this on the SPL build, not the normal build, and we already have symbols for the board and the SoC so we shouldn't need any new CONFIG symbols here, I'm pretty sure. The problem here is that both da850evm and hawkboard define the CONFIG_SOC_DA850, and CONFIG_SOC_DA8XX, as the hawkboard shares code like pinmux with the da850. I see a CONFIG_MACH_DAVINCI_* like define in da850evm.h and hawkboard.h. Should i add a similar define for cam_enc_4xx, and use these instead. Actually the problem is that now we have a board specific file (hawkboard_nand_spl.c) in the arch tree. Hawkboard has a DA850 SoC so if we have a da850_spl.c hawkboard should either use it as well, or we make the *spl.c files board specific and put them into the board tree. board_init_f() in hawkboard_nand_spl.c is pretty much the same as in da850_spl.c (ok, we don't do PLL and DDR configuration, but we could add an #ifdef to da850_lowlevel.c so that DDR and PLL configuration is only done if the required #defines are present, like it is currently done for CONFIG_SYS_DA850_CS2CFG). And board_init_r() in hawkboard_nand_spl.c is exactly the same as in dm365_spl.c. Therefore I think we could have only a single spl.c that can be used for all davinci SoCs and boards until we have an even more generic solution (see [1]). Then, spl.c would look like this: [,,,] void board_init_f(ulong dummy) { #ifdef CONFIG_SOC_DM365 dm36x_lowlevel_init(0); #endif #ifdef CONFIG_SOC_DA8XX arch_cpu_init(); #endif relocate_code(CONFIG_SPL_STACK, NULL, CONFIG_SPL_TEXT_BASE); } void board_init_r(gd_t *id, ulong dummy) { #ifdef CONFIG_SPL_NAND_LOAD nand_init(); puts(Nand boot...\n); nand_boot(); #endif #ifdef CONFIG_SPL_SPI_LOAD mem_malloc_init(CONFIG_SYS_TEXT_BASE - CONFIG_SYS_MALLOC_LEN, CONFIG_SYS_MALLOC_LEN); gd = gdata; gd-bd = bdata; gd-flags |= GD_FLG_RELOC; gd-baudrate = CONFIG_BAUDRATE; serial_init(); /* serial communications setup */ gd-have_console = 1; puts(SPI boot...\n); spi_boot(); #endif } [...] Would this work for hawkboard? Regards, Christian [1] http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/118233/focus=118721 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] da850evm: drop NET_MULTI reference
Hi, On Tue, Jan 10, 2012 at 8:13 AM, Prabhakar Lad prabhakar.cse...@gmail.com wrote: remove obsolete macro CONFIG_NET_MULTI, Now that none of the core checks CONFIG_NET_MULTI, there's not much point in boards defining it. Signed-off-by: Prabhakar Lad prabhakar.cse...@gmail.com Cc: Mike Frysinger vap...@gentoo.org Cc: Tom Rini tr...@ti.com --- include/configs/da850_am18xxevm.h | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) include/configs/da850_am18xxevm.h has already been deleted in commit dbd8d4562847e227367ba2e82fc860ff851b57c7 in ti/master, see [1]. Regards, Christian [1] http://git.denx.de/?p=u-boot/u-boot-ti.git;a=commit;h=dbd8d4562847e227367ba2e82fc860ff851b57c7 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] Changes to move hawkboard to the new infrastructure.
hi Christian, On Tue Jan 10, 2012 at 09:15:14AM +0100, Christian Riesch wrote: Hi Sughosh and Tom, On Tuesday, January 10, 2012, Sughosh Ganu urwithsugh...@gmail.com wrote: On Mon Jan 09, 2012 at 04:30:56PM -0700, Tom Rini wrote: On 01/09/2012 11:28 AM, Sughosh Ganu wrote: snip --- a/arch/arm/cpu/arm926ejs/davinci/Makefile +++ b/arch/arm/cpu/arm926ejs/davinci/Makefile @@ -38,8 +38,11 @@ COBJS-$(CONFIG_DRIVER_TI_EMAC) += lxt972.o dp83848.o et1011c.o ksz8873.o ifdef CONFIG_SPL_BUILD COBJS-y+= spl.o -COBJS-$(CONFIG_SOC_DM365) += dm365_lowlevel.o -COBJS-$(CONFIG_SOC_DA8XX) += da850_lowlevel.o +COBJS-$(CONFIG_DM365_SPL) += dm365_lowlevel.o +COBJS-$(CONFIG_DM365_SPL) += dm365_spl.o +COBJS-$(CONFIG_DA850EVM_SPL) += da850_lowlevel.o +COBJS-$(CONFIG_DA850EVM_SPL) += da850_spl.o +COBJS-$(CONFIG_HAWKBOARD_SPL) += hawkboard_nand_spl.o endif CONFIG_SPL_BUILD means we'll only do this on the SPL build, not the normal build, and we already have symbols for the board and the SoC so we shouldn't need any new CONFIG symbols here, I'm pretty sure. The problem here is that both da850evm and hawkboard define the CONFIG_SOC_DA850, and CONFIG_SOC_DA8XX, as the hawkboard shares code like pinmux with the da850. I see a CONFIG_MACH_DAVINCI_* like define in da850evm.h and hawkboard.h. Should i add a similar define for cam_enc_4xx, and use these instead. Actually the problem is that now we have a board specific file (hawkboard_nand_spl.c) in the arch tree. Hawkboard has a DA850 SoC so if we have a da850_spl.c hawkboard should either use it as well, or we make the *spl.c files board specific and put them into the board tree. I'd vote for moving the *spl.c files to their corresponding board directories -- infact hawkboard_nand_spl.c was earlier under it's board directory. This i think keeps the implementation clean, avoids the risk of breakage, and also makes it simpler for any newer board in the same soc family migrating to spl, which i think might increase the ifdeffery. Maybe Tom and Heiko can comment on how it can be done, and i'll take the route of the majority :). -sughosh ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] da850evm: drop NET_MULTI reference
Christian, Oops my Bad , didn't notice it. Regards, --Prabhakar Lad On Tue, Jan 10, 2012 at 2:09 PM, Christian Riesch christian.rie...@omicron.at wrote: Hi, On Tue, Jan 10, 2012 at 8:13 AM, Prabhakar Lad prabhakar.cse...@gmail.com wrote: remove obsolete macro CONFIG_NET_MULTI, Now that none of the core checks CONFIG_NET_MULTI, there's not much point in boards defining it. Signed-off-by: Prabhakar Lad prabhakar.cse...@gmail.com Cc: Mike Frysinger vap...@gentoo.org Cc: Tom Rini tr...@ti.com --- include/configs/da850_am18xxevm.h |1 - 1 files changed, 0 insertions(+), 1 deletions(-) include/configs/da850_am18xxevm.h has already been deleted in commit dbd8d4562847e227367ba2e82fc860ff851b57c7 in ti/master, see [1]. Regards, Christian [1] http://git.denx.de/?p=u-boot/u-boot-ti.git;a=commit;h=dbd8d4562847e227367ba2e82fc860ff851b57c7 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 0/3] ARMV7: Exynos4: Add support for TRATS board
This patch series support for Samsung TRATS board, and add the headers of watchdog and power. I missed logs of v2 on this thread, so I'm going to add this: http://lists.denx.de/pipermail/u-boot/2012-January/114857.html Also, this patch is tested on Samsung TRATS board. Thank you. Best Regards, Heungjun Kim Changes for v2: - sort the list of the name in MAINTAINERS - modify to GPLv2+ - change assem code in lowlevel_init.S to C code in lowlevel_util.c - do not defile values for variables if the variable is feature - remove miscellaneouses Changes for v3: - implement lowlevel_init.S by C - remove lowlevel_init.S, the functions is inserted into trats.c - add watchdog.h for Exynos4 - add power.h amd modify cpu.h for Exynos4 HeungJun, Kim (3): ARMV7: Exynos4: Add watchdog.h for Exynos4 ARMV7: Exynos4: Add supoort power for Exynos4 ARMV7: Exynos4: Add support for TRATS board MAINTAINERS |4 + arch/arm/include/asm/arch-exynos/cpu.h |1 + arch/arm/include/asm/arch-exynos/power.h| 230 arch/arm/include/asm/arch-exynos/watchdog.h | 53 ++ board/samsung/trats/Makefile| 43 ++ board/samsung/trats/trats.c | 349 board/samsung/trats/trats_setup.h | 814 +++ boards.cfg |1 + include/configs/trats.h | 216 +++ 9 files changed, 1711 insertions(+), 0 deletions(-) create mode 100644 arch/arm/include/asm/arch-exynos/power.h create mode 100644 arch/arm/include/asm/arch-exynos/watchdog.h create mode 100644 board/samsung/trats/Makefile create mode 100644 board/samsung/trats/trats.c create mode 100644 board/samsung/trats/trats_setup.h create mode 100644 include/configs/trats.h -- 1.7.4.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 1/3] ARMV7: Exynos4: Add watchdog.h for Exynos4
This patch add watchdog.h for Exynos4 Signed-off-by: HeungJun, Kim riverful@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- arch/arm/include/asm/arch-exynos/watchdog.h | 53 +++ 1 files changed, 53 insertions(+), 0 deletions(-) create mode 100644 arch/arm/include/asm/arch-exynos/watchdog.h diff --git a/arch/arm/include/asm/arch-exynos/watchdog.h b/arch/arm/include/asm/arch-exynos/watchdog.h new file mode 100644 index 000..3015875 --- /dev/null +++ b/arch/arm/include/asm/arch-exynos/watchdog.h @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2011 Samsung Electronics + * Heungjun Kim riverful@samsung.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 __ASM_ARM_ARCH_WATCHDOG_H_ +#define __ASM_ARM_ARCH_WATCHDOG_H_ + +#define WTCON_RESET_OFFSET 0 +#define WTCON_INTEN_OFFSET 2 +#define WTCON_CLKSEL_OFFSET3 +#define WTCON_EN_OFFSET5 +#define WTCON_PRE_OFFSET 8 + +#define WTCON_CLK_16 0x0 +#define WTCON_CLK_32 0x1 +#define WTCON_CLK_64 0x2 +#define WTCON_CLK_128 0x3 + +#define WTCON_CLK(x) ((x 0x3) WTCON_CLKSEL_OFFSET) +#define WTCON_PRESCALER(x) ((x) WTCON_PRE_OFFSET) +#define WTCON_EN (0x1 WTCON_EN_OFFSET) +#define WTCON_RESET(0x1 WTCON_RESET_OFFSET) +#define WTCON_INT (0x1 WTCON_INTEN_OFFSET) + +#ifndef __ASSEMBLY__ +struct exynos4_watchdog { + unsigned int wtcon; + unsigned int wtdat; + unsigned int wtcnt; + unsigned int wtclrint; +}; +#endif /* __ASSEMBLY__ */ + +#endif -- 1.7.4.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 2/3] ARMV7: Exynos4: Add supoort power for Exynos4
This patch adds power.h and SAMSUNG_BASE() macro for using Exynos4 power. Signed-off-by: HeungJun, Kim riverful@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- arch/arm/include/asm/arch-exynos/cpu.h |1 + arch/arm/include/asm/arch-exynos/power.h | 230 ++ 2 files changed, 231 insertions(+), 0 deletions(-) create mode 100644 arch/arm/include/asm/arch-exynos/power.h diff --git a/arch/arm/include/asm/arch-exynos/cpu.h b/arch/arm/include/asm/arch-exynos/cpu.h index 6d97b99..3496616 100644 --- a/arch/arm/include/asm/arch-exynos/cpu.h +++ b/arch/arm/include/asm/arch-exynos/cpu.h @@ -109,6 +109,7 @@ SAMSUNG_BASE(uart, UART_BASE) SAMSUNG_BASE(usb_phy, USBPHY_BASE) SAMSUNG_BASE(usb_otg, USBOTG_BASE) SAMSUNG_BASE(watchdog, WATCHDOG_BASE) +SAMSUNG_BASE(power, POWER_BASE) #endif #endif /* _EXYNOS4_CPU_H */ diff --git a/arch/arm/include/asm/arch-exynos/power.h b/arch/arm/include/asm/arch-exynos/power.h new file mode 100644 index 000..fb442f7 --- /dev/null +++ b/arch/arm/include/asm/arch-exynos/power.h @@ -0,0 +1,230 @@ +/* + * Copyright (C) 2011 Samsung Electronics + * Heungjun Kim riverful@samsung.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 __ASM_ARM_ARCH_POWER_H_ +#define __ASM_ARM_ARCH_POWER_H_ + +#ifndef __ASSEMBLY__ +struct exynos4_power { + unsigned intom_stat; + unsigned char res1[0x8]; + unsigned intrtc_clko_sel; + unsigned intgnss_rtc_out_ctrl; + unsigned char res2[0x1ec]; + unsigned intsystem_power_down_ctrl; + unsigned char res3[0x1]; + unsigned intsystem_power_down_option; + unsigned char res4[0x1f4]; + unsigned intswreset; + unsigned intrst_stat; + unsigned char res5[0x1f8]; + unsigned intwakeup_stat; + unsigned inteint_wakeup_mask; + unsigned intwakeup_mask; + unsigned char res6[0xf4]; + unsigned inthdmi_phy_control; + unsigned intusbdevice_phy_control; + unsigned intusbhost_phy_control; + unsigned intdac_phy_control; + unsigned intmipi_phy0_control; + unsigned intmipi_phy1_control; + unsigned intadc_phy_control; + unsigned intpcie_phy_control; + unsigned intsata_phy_control; + unsigned char res7[0xdc]; + unsigned intinform0; + unsigned intinform1; + unsigned intinform2; + unsigned intinform3; + unsigned intinform4; + unsigned intinform5; + unsigned intinform6; + unsigned intinform7; + unsigned char res8[0x1e0]; + unsigned intpmu_debug; + unsigned char res9[0x5fc]; + unsigned intarm_core0_sys_pwr_reg; + unsigned char res10[0xc]; + unsigned intarm_core1_sys_pwr_reg; + unsigned char res11[0x6c]; + unsigned intarm_common_sys_pwr_reg; + unsigned char res12[0x3c]; + unsigned intarm_cpu_l2_0_sys_pwr_reg; + unsigned intarm_cpu_l2_1_sys_pwr_reg; + unsigned char res13[0x38]; + unsigned intcmu_aclkstop_sys_pwr_reg; + unsigned intcmu_sclkstop_sys_pwr_reg; + unsigned char res14[0x4]; + unsigned intcmu_reset_sys_pwr_reg; + unsigned char res15[0x10]; + unsigned intapll_sysclk_sys_pwr_reg; + unsigned intmpll_sysclk_sys_pwr_reg; + unsigned intvpll_sysclk_sys_pwr_reg; + unsigned intepll_sysclk_sys_pwr_reg; + unsigned char res16[0x8]; + unsigned intcmu_clkstop_gps_alive_sys_pwr_reg; + unsigned intcmu_reset_gps_alive_sys_pwr_reg; + unsigned intcmu_clkstop_cam_sys_pwr_reg; + unsigned intcmu_clkstop_tv_sys_pwr_reg; + unsigned intcmu_clkstop_mfc_sys_pwr_reg; + unsigned intcmu_clkstop_g3d_sys_pwr_reg; + unsigned intcmu_clkstop_lcd0_sys_pwr_reg; + unsigned intcmu_clkstop_lcd1_sys_pwr_reg; + unsigned intcmu_clkstop_maudio_sys_pwr_reg; + unsigned intcmu_clkstop_gps_sys_pwr_reg; + unsigned intcmu_reset_cam_sys_pwr_reg; + unsigned int
[U-Boot] [PATCH v3 3/3] ARMV7: Exynos4: Add support for TRATS board
This patch adds support for Samsung TRATS board Signed-off-by: HeungJun, Kim riverful@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- MAINTAINERS |4 + board/samsung/trats/Makefile | 43 ++ board/samsung/trats/trats.c | 349 board/samsung/trats/trats_setup.h | 814 + boards.cfg|1 + include/configs/trats.h | 216 ++ 6 files changed, 1427 insertions(+), 0 deletions(-) create mode 100644 board/samsung/trats/Makefile create mode 100644 board/samsung/trats/trats.c create mode 100644 board/samsung/trats/trats_setup.h create mode 100644 include/configs/trats.h diff --git a/MAINTAINERS b/MAINTAINERS index 4bf12b5..60314a6 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -706,6 +706,10 @@ Chander Kashyap k.chan...@samsung.com origen ARM ARMV7 (EXYNOS4210 SoC) SMDKV310ARM ARMV7 (EXYNOS4210 SoC) +Heungjun Kim riverful@samsung.com + + trats ARM ARMV7 (EXYNOS4210 SoC) + Torsten Koschorrek koschor...@synertronixx.de scb9328 ARM920T (i.MXL) diff --git a/board/samsung/trats/Makefile b/board/samsung/trats/Makefile new file mode 100644 index 000..d21883f --- /dev/null +++ b/board/samsung/trats/Makefile @@ -0,0 +1,43 @@ +# +# Copyright (C) 2011 Samsung Electronics +# Heungjun Kim riverful@samsung.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-y+= trats.o + +SRCS:= $(COBJS-y:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS-y)) + +$(LIB):$(obj).depend $(OBJS) + $(call cmd_link_o_target, $(OBJS)) + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c new file mode 100644 index 000..9070df5 --- /dev/null +++ b/board/samsung/trats/trats.c @@ -0,0 +1,349 @@ +/* + * Copyright (C) 2011 Samsung Electronics + * Heungjun Kim riverful@samsung.com + * Kyungmin Park kyungmin.p...@samsung.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 +#include asm/io.h +#include asm/arch/gpio.h +#include asm/arch/mmc.h +#include asm/arch/clock.h +#include asm/arch/watchdog.h +#include asm/arch/gpio.h +#include asm/arch/power.h +#include pmic.h +#include usb/s3c_udc.h +#include asm/arch/cpu.h +#include max8998_pmic.h + +#include trats_setup.h + +DECLARE_GLOBAL_DATA_PTR; + +unsigned int board_rev; + +#ifdef CONFIG_REVISION_TAG +u32 get_board_rev(void) +{ + return board_rev; +} +#endif + +static void check_hw_revision(void); +static void pmic_reset(void); + +int board_init(void) +{ + gd-bd-bi_boot_params = PHYS_SDRAM_1 + 0x100; + + check_hw_revision(); + printf(HW Revision:\t0x%x\n, board_rev); + +#if defined(CONFIG_PMIC) + pmic_init(); + pmic_reset(); +#endif + + return 0; +} + +int dram_init(void) +{ + gd-ram_size = get_ram_size((long *)PHYS_SDRAM_1, PHYS_SDRAM_1_SIZE) + + get_ram_size((long *)PHYS_SDRAM_2, PHYS_SDRAM_2_SIZE); + + return 0; +} + +void dram_init_banksize(void) +{ + gd-bd-bi_dram[0].start = PHYS_SDRAM_1; +
Re: [U-Boot] add nand spl boot for qi_lb60 board
On 01/07/2012 03:05 AM, Scott Wood wrote: forget add CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST to board configure head file. That still doesn't explain how a few duplicate externs changed the resulting binary... yes. strange. have no idea about this. when I have time I will compare the binary more. try to understand this. xiangfu ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 0/4] Add SMDK5250 board support
Hi Chander Kashyap, I'm going to share the status of size. The case of assemble code: textdata bss dec hex filename 1929 20 121961 7a9 board/samsung/trats/libtrats.o 912 0 0 912 390 board/samsung/trats/lowlevel_init.o 1017 20 121049 419 board/samsung/trats/trats.o The case of C code: textdata bss dec hex filename 1845 20 41869 74d board/samsung/trats/libtrats.o 1845 20 41869 74d board/samsung/trats/trats.o Although the pre-version patch has been optimized to current version, and so it might be the factor, but the size is decreased. Thank you. Regards, Heungjun Kim -Original Message- From: linaro-dev-boun...@lists.linaro.org [mailto:linaro-dev- boun...@lists.linaro.org] On Behalf Of Chander Kashyap Sent: Tuesday, January 10, 2012 12:58 PM To: Simon Glass Cc: linaro-...@lists.linaro.org; bj...@samsung.com; patc...@linaro.org; mk7.k...@samsung.com; u-boot@lists.denx.de; sams...@lists.linaro.org Subject: Re: [U-Boot] [PATCH v2 0/4] Add SMDK5250 board support Dear Simon, On 9 January 2012 23:25, Simon Glass s...@chromium.org wrote: Hi Chander, On Sun, Jan 8, 2012 at 10:40 PM, Chander Kashyap chander.kash...@linaro.org wrote: This patchset add support for Samsung's SMDK5250 board based on EXYNOS5250 based SoC. It also adds support for MMC SPL booting. The porting is done by Samsung engineers at HQ in System LSI Team. I am contributing in upstreaming the code for the board. Based upon discussions following patches are dropped in this version: Exynos: Add CONFIG_EXYNOS4 Macro to EXYNOS4 based boards Exynos: Clock.c: Replace exynos4 prefix with exynos SMDK5250: enable device tree support is squashed with EXYNOS: Add SMDK5250 board support Chander Kashyap (4): Exynos: Clock.c: Use CONFIG_SYS_CLK_FREQ macro ARM: EXYNOS: Add support for Exynos5 based SoCs EXYNOS: Add SMDK5250 board support EXYNOS: SMDK5250: Add MMC SPL support MAINTAINERS | 1 + arch/arm/cpu/armv7/exynos/clock.c | 215 +- arch/arm/include/asm/arch-exynos/clock.h | 326 ++ arch/arm/include/asm/arch-exynos/cpu.h | 53 ++- arch/arm/include/asm/arch-exynos/gpio.h | 32 ++ board/samsung/smdk5250/Makefile | 64 +++ board/samsung/smdk5250/lowlevel_init.S | 528 ++ board/samsung/smdk5250/mem_setup.S | 600 + Are you planning to reimplement most of these two files in C as per Wolfgang's comments on the TRATS board, or is that a separate issue? Not as of now. We have 14K for spl. Using C style it might not fit into that. Regards, Simon board/samsung/smdk5250/mmc_boot.c | 58 +++ board/samsung/smdk5250/smdk5250.c | 125 + board/samsung/smdk5250/smdk5250_setup.h | 589 board/samsung/smdk5250/tools/mkexynos_image.c | 117 + boards.cfg | 1 + include/configs/s5pc210_universal.h | 1 + include/configs/smdk5250.h | 188 15 files changed, 2878 insertions(+), 20 deletions(-) create mode 100644 board/samsung/smdk5250/Makefile create mode 100644 board/samsung/smdk5250/lowlevel_init.S create mode 100644 board/samsung/smdk5250/mem_setup.S create mode 100644 board/samsung/smdk5250/mmc_boot.c create mode 100644 board/samsung/smdk5250/smdk5250.c create mode 100644 board/samsung/smdk5250/smdk5250_setup.h create mode 100644 board/samsung/smdk5250/tools/mkexynos_image.c create mode 100644 include/configs/smdk5250.h -- 1.7.5.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot -- with warm regards, Chander Kashyap ___ linaro-dev mailing list linaro-...@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] Changes to move hawkboard to the new infrastructure.
Hello Sughosh, Christian, Tom, Sughosh Ganu wrote: hi Christian, On Tue Jan 10, 2012 at 09:15:14AM +0100, Christian Riesch wrote: Hi Sughosh and Tom, On Tuesday, January 10, 2012, Sughosh Ganu urwithsugh...@gmail.com wrote: On Mon Jan 09, 2012 at 04:30:56PM -0700, Tom Rini wrote: On 01/09/2012 11:28 AM, Sughosh Ganu wrote: snip --- a/arch/arm/cpu/arm926ejs/davinci/Makefile +++ b/arch/arm/cpu/arm926ejs/davinci/Makefile @@ -38,8 +38,11 @@ COBJS-$(CONFIG_DRIVER_TI_EMAC) += lxt972.o dp83848.o et1011c.o ksz8873.o ifdef CONFIG_SPL_BUILD COBJS-y+= spl.o -COBJS-$(CONFIG_SOC_DM365) += dm365_lowlevel.o -COBJS-$(CONFIG_SOC_DA8XX) += da850_lowlevel.o +COBJS-$(CONFIG_DM365_SPL) += dm365_lowlevel.o +COBJS-$(CONFIG_DM365_SPL) += dm365_spl.o +COBJS-$(CONFIG_DA850EVM_SPL) += da850_lowlevel.o +COBJS-$(CONFIG_DA850EVM_SPL) += da850_spl.o +COBJS-$(CONFIG_HAWKBOARD_SPL) += hawkboard_nand_spl.o endif CONFIG_SPL_BUILD means we'll only do this on the SPL build, not the normal build, and we already have symbols for the board and the SoC so we shouldn't need any new CONFIG symbols here, I'm pretty sure. The problem here is that both da850evm and hawkboard define the CONFIG_SOC_DA850, and CONFIG_SOC_DA8XX, as the hawkboard shares code like pinmux with the da850. I see a CONFIG_MACH_DAVINCI_* like define in da850evm.h and hawkboard.h. Should i add a similar define for cam_enc_4xx, and use these instead. Actually the problem is that now we have a board specific file (hawkboard_nand_spl.c) in the arch tree. Hawkboard has a DA850 SoC so if we have a da850_spl.c hawkboard should either use it as well, or we make the *spl.c files board specific and put them into the board tree. I'd vote for moving the *spl.c files to their corresponding board directories -- infact hawkboard_nand_spl.c was earlier under it's board directory. This i think keeps the implementation clean, avoids the risk of breakage, and also makes it simpler for any newer board in the same soc family migrating to spl, which i think might increase the ifdeffery. Hmm.. I vote against creating board specific files. I am here in line with Christians proposal, posted here: http://lists.denx.de/pipermail/u-boot/2012-January/115166.html Did this work for the hawkboard? If you do not need some inits, maybe we add here defines or better make this functions weak, and you can write board specific functions for this parts. The code in board_init_r() is only a selection from where to load u-boot, which I think in the long term could be made more common for other SoCs too ... so I want to prevent to split this in board specific files. bye, Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 1/7] drivers/i2c/omap24xx_i2c.c: replace printf with one argument by puts
Hello Andreas, Andreas Müller wrote: Signed-off-by: Andreas Müller schnitzelt...@gmx.de --- drivers/i2c/omap24xx_i2c.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) Acked-by: Heiko Schocher h...@denx.de bye, Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 4/7] drivers/i2c/omap24xx_i2c.c: move all local variables to SRAM
Hello Andreas, Andreas Müller wrote: At old overo boards TWL4030 RTC irq is connected to gpio112. Unfortunately this pin is also used for revision detection. Therefore we need to send shut-up to TWL4030 to avoid reading wrong revision. In SPL this must be done before SDRAM is set up because the type of SDRAM is revision dependent. By this patch it is ensured that all variables used by omap24xx_i2c.c are located in SRAM. Signed-off-by: Andreas Müller schnitzelt...@gmx.de --- drivers/i2c/omap24xx_i2c.c | 13 + 1 files changed, 9 insertions(+), 4 deletions(-) Acked-by: Heiko Schocher h...@denx.de Thanks! bye, Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] Changes to move hawkboard to the new infrastructure.
hi Heiko, On Tue Jan 10, 2012 at 10:42:08AM +0100, Heiko Schocher wrote: Hello Sughosh, Christian, Tom, Sughosh Ganu wrote: I see a CONFIG_MACH_DAVINCI_* like define in da850evm.h and hawkboard.h. Should i add a similar define for cam_enc_4xx, and use these instead. Actually the problem is that now we have a board specific file (hawkboard_nand_spl.c) in the arch tree. Hawkboard has a DA850 SoC so if we have a da850_spl.c hawkboard should either use it as well, or we make the *spl.c files board specific and put them into the board tree. I'd vote for moving the *spl.c files to their corresponding board directories -- infact hawkboard_nand_spl.c was earlier under it's board directory. This i think keeps the implementation clean, avoids the risk of breakage, and also makes it simpler for any newer board in the same soc family migrating to spl, which i think might increase the ifdeffery. Hmm.. I vote against creating board specific files. I am here in line with Christians proposal, posted here: http://lists.denx.de/pipermail/u-boot/2012-January/115166.html Did this work for the hawkboard? If you do not need some inits, maybe we add here defines or better make this functions weak, and you can write board specific functions for this parts. The code in board_init_r() is only a selection from where to load u-boot, which I think in the long term could be made more common for other SoCs too ... so I want to prevent to split this in board specific files. I should be able to test these changes in the evening. Will send a modified patch after testing. -sughosh ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] imx: mx6q: add aipstz init for off platform periph
Init peripheral access control register of AIPSTZ OPACRx: Buffer Writes(BW): 0 - not bufferable, Supervisor Protect(SP): 0 - not require supervisor privilege level for accesses. Write Protect(WP): 0 - allows write accesses. Trusted Protect(TP):0 - allows unstrusted master Signed-off-by: Jason Liu jason@linaro.org Cc: Stefano Babic sba...@denx.de --- arch/arm/cpu/armv7/mx6/soc.c | 29 +++-- arch/arm/include/asm/arch-mx6/imx-regs.h | 11 +++ 2 files changed, 34 insertions(+), 6 deletions(-) diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c index bd59cf5..bec53cd 100644 --- a/arch/arm/cpu/armv7/mx6/soc.c +++ b/arch/arm/cpu/armv7/mx6/soc.c @@ -40,18 +40,35 @@ u32 get_cpu_rev(void) #ifdef CONFIG_ARCH_CPU_INIT void init_aips(void) { - u32 reg = AIPS1_BASE_ADDR; + struct aipstz_regs *aips1, *aips2; + + aips1 = (struct aipstz_regs *)AIPS1_BASE_ADDR; + aips2 = (struct aipstz_regs *)AIPS2_BASE_ADDR; /* * Set all MPROTx to be non-bufferable, trusted for R/W, * not forced to user-mode. */ - writel(0x, reg + 0x00); - writel(0x, reg + 0x04); + writel(0x, aips1-mprot0); + writel(0x, aips1-mprot1); + writel(0x, aips2-mprot0); + writel(0x, aips2-mprot1); - reg = AIPS2_BASE_ADDR; - writel(0x, reg + 0x00); - writel(0x, reg + 0x04); + /* +* Set all OPACRx to be non-bufferable, not require +* supervisor privilege level for access,allow for +* write access and untrusted master access. +*/ + writel(0x, aips1-opacr0); + writel(0x, aips1-opacr1); + writel(0x, aips1-opacr2); + writel(0x, aips1-opacr3); + writel(0x, aips1-opacr4); + writel(0x, aips2-opacr0); + writel(0x, aips2-opacr1); + writel(0x, aips2-opacr2); + writel(0x, aips2-opacr3); + writel(0x, aips2-opacr4); } int arch_cpu_init(void) diff --git a/arch/arm/include/asm/arch-mx6/imx-regs.h b/arch/arm/include/asm/arch-mx6/imx-regs.h index 5fe9748..7650cb9 100644 --- a/arch/arm/include/asm/arch-mx6/imx-regs.h +++ b/arch/arm/include/asm/arch-mx6/imx-regs.h @@ -232,5 +232,16 @@ struct fuse_bank4_regs { u32 rsvd3[0x13]; }; +struct aipstz_regs { + u32 mprot0; + u32 mprot1; + u32 rsvd[0xe]; + u32 opacr0; + u32 opacr1; + u32 opacr2; + u32 opacr3; + u32 opacr4; +}; + #endif /* __ASSEMBLER__*/ #endif /* __ASM_ARCH_MX6_IMX_REGS_H__ */ -- 1.7.4.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] eth: remove usb-ethernet devices before re-enumerating them
On 01/09/2012 10:08 PM, Vincent Palatin wrote: On Mon, Jan 9, 2012 at 12:57, Marek Vasut marek.va...@gmail.com wrote: Fix the crash when running several times usb_init() with a USB ethernet device plugged. Signed-off-by: Vincent Palatin vpala...@chromium.org Tested-by: Wolfgang Grandegger w...@denx.de --- drivers/usb/eth/usb_ether.c |7 +-- include/net.h |1 + net/eth.c | 29 + 3 files changed, 35 insertions(+), 2 deletions(-) diff --git a/drivers/usb/eth/usb_ether.c b/drivers/usb/eth/usb_ether.c index 6565ea5..73a0790 100644 --- a/drivers/usb/eth/usb_ether.c +++ b/drivers/usb/eth/usb_ether.c @@ -127,8 +127,11 @@ int usb_host_eth_scan(int mode) old_async = usb_disable_asynch(1); /* asynch transfer not allowed */ - for (i = 0; i USB_MAX_ETH_DEV; i++) - memset(usb_eth[i], 0, sizeof(usb_eth[i])); + /* unregister a previously detected device */ + for (i = 0; i usb_max_eth_dev; i++) + eth_unregister(usb_eth[i].eth_dev); + + memset(usb_eth, 0, sizeof(usb_eth)); for (i = 0; prob_dev[i].probe; i++) { if (prob_dev[i].before_probe) diff --git a/include/net.h b/include/net.h index e4d42c2..1707a7f 100644 --- a/include/net.h +++ b/include/net.h @@ -96,6 +96,7 @@ struct eth_device { extern int eth_initialize(bd_t *bis);/* Initialize network subsystem */ extern int eth_register(struct eth_device* dev);/* Register network device */ +extern int eth_unregister(struct eth_device *dev);/* Remove network device */ extern void eth_try_another(int first_restart); /* Change the device */ extern void eth_set_current(void); /* set nterface to ethcur var */ extern struct eth_device *eth_get_dev(void); /* get the current device MAC */ diff --git a/net/eth.c b/net/eth.c index b4b9b43..3fb5fb6 100644 --- a/net/eth.c +++ b/net/eth.c @@ -224,6 +224,35 @@ int eth_register(struct eth_device *dev) return 0; } +int eth_unregister(struct eth_device *dev) +{ + struct eth_device *cur; + + /* No device */ + if (!eth_devices) + return -1; + + for (cur = eth_devices; cur-next != eth_devices cur-next != dev; + cur = cur-next) + ; + + /* Device not found */ + if (cur-next != dev) + return -1; + + cur-next = dev-next; + + if (eth_devices == dev) + eth_devices = dev-next == eth_devices ? NULL : dev-next; + + if (eth_current == dev) { + eth_current = eth_devices; + eth_current_changed(); + } + + return 0; +} + int eth_initialize(bd_t *bis) { int num_devices = 0; Looks sane. On what hardware did this happen (just for the record)? I got it on x86 and ARM (tegra2) platforms (both with an EHCI controller). I did most of my testing with ASIX-based USB-ethernet dongle, but the issue seems pretty generic. It happens with *any* hardware calling eth_register() more than once because struct eth_device *dev* is memset 0 before calling eth_register() resulting in an endless loop when scanning the devices. Yes, I'll try to remember to test this in the evening. M Viele Grüße, Wolfgang ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] M28EVK: Fix build if CONFIG_CMD_NAND not selected
Signed-off-by: Marek Vasut marek.va...@gmail.com Cc: Wolfgang Denk w...@denx.de Cc: Stefano Babic sba...@denx.de --- include/configs/m28evk.h |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/include/configs/m28evk.h b/include/configs/m28evk.h index 39c841f..dcea878 100644 --- a/include/configs/m28evk.h +++ b/include/configs/m28evk.h @@ -140,6 +140,7 @@ /* * NAND */ +#define CONFIG_ENV_SIZE (16 * 1024) #ifdef CONFIG_CMD_NAND #define CONFIG_NAND_MXS #define CONFIG_APBH_DMA @@ -150,7 +151,6 @@ /* Environment is in NAND */ #define CONFIG_ENV_IS_IN_NAND -#define CONFIG_ENV_SIZE (16 * 1024) #define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE #define CONFIG_ENV_SECT_SIZE(128 * 1024) #define CONFIG_ENV_RANGE(512 * 1024) @@ -173,6 +173,8 @@ 512k(redundant-environment), \ 4m(kernel), \ -(filesystem) +#else +#define CONFIG_ENV_IS_NOWHERE #endif /* BUMP ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] M28EVK: Fix build if CONFIG_CMD_NAND not selected
Hi Marek, On Sun, Jan 1, 2012 at 2:28 AM, Marek Vasut marek.va...@gmail.com wrote: Signed-off-by: Marek Vasut marek.va...@gmail.com Cc: Wolfgang Denk w...@denx.de Cc: Stefano Babic sba...@denx.de --- include/configs/m28evk.h | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/include/configs/m28evk.h b/include/configs/m28evk.h index 39c841f..dcea878 100644 --- a/include/configs/m28evk.h +++ b/include/configs/m28evk.h @@ -140,6 +140,7 @@ /* * NAND */ +#define CONFIG_ENV_SIZE (16 * 1024) #ifdef CONFIG_CMD_NAND #define CONFIG_NAND_MXS #define CONFIG_APBH_DMA @@ -150,7 +151,6 @@ /* Environment is in NAND */ #define CONFIG_ENV_IS_IN_NAND -#define CONFIG_ENV_SIZE (16 * 1024) #define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE #define CONFIG_ENV_SECT_SIZE (128 * 1024) #define CONFIG_ENV_RANGE (512 * 1024) @@ -173,6 +173,8 @@ 512k(redundant-environment), \ 4m(kernel), \ -(filesystem) +#else +#define CONFIG_ENV_IS_NOWHERE Couldn't you use CONFIG_ENV_IS_IN_MMC instead of CONFIG_ENV_IS_NOWHERE here? Regards, Fabio Estevam ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] M28EVK: Fix build if CONFIG_CMD_NAND not selected
Hi Marek, On Sun, Jan 1, 2012 at 2:28 AM, Marek Vasut marek.va...@gmail.com wrote: Signed-off-by: Marek Vasut marek.va...@gmail.com Cc: Wolfgang Denk w...@denx.de Cc: Stefano Babic sba...@denx.de --- include/configs/m28evk.h |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/include/configs/m28evk.h b/include/configs/m28evk.h index 39c841f..dcea878 100644 --- a/include/configs/m28evk.h +++ b/include/configs/m28evk.h @@ -140,6 +140,7 @@ /* * NAND */ +#defineCONFIG_ENV_SIZE (16 * 1024) #ifdef CONFIG_CMD_NAND #defineCONFIG_NAND_MXS #define CONFIG_APBH_DMA @@ -150,7 +151,6 @@ /* Environment is in NAND */ #defineCONFIG_ENV_IS_IN_NAND -#defineCONFIG_ENV_SIZE (16 * 1024) #defineCONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE #defineCONFIG_ENV_SECT_SIZE(128 * 1024) #defineCONFIG_ENV_RANGE(512 * 1024) @@ -173,6 +173,8 @@ 512k(redundant-environment), \ 4m(kernel), \ -(filesystem) +#else +#defineCONFIG_ENV_IS_NOWHERE Couldn't you use CONFIG_ENV_IS_IN_MMC instead of CONFIG_ENV_IS_NOWHERE here? We decided to not have env elsewhere until env-in-multiple-locations patch is in place. M Regards, Fabio Estevam ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 0/4] Add SMDK5250 board support
Hi Kyungmin Park, On 10 January 2012 10:42, Kyungmin Park kmp...@infradead.org wrote: On 1/10/12, Chander Kashyap chander.kash...@linaro.org wrote: Dear Simon, On 9 January 2012 23:25, Simon Glass s...@chromium.org wrote: Hi Chander, On Sun, Jan 8, 2012 at 10:40 PM, Chander Kashyap chander.kash...@linaro.org wrote: This patchset add support for Samsung's SMDK5250 board based on EXYNOS5250 based SoC. It also adds support for MMC SPL booting. The porting is done by Samsung engineers at HQ in System LSI Team. I am contributing in upstreaming the code for the board. Based upon discussions following patches are dropped in this version: Exynos: Add CONFIG_EXYNOS4 Macro to EXYNOS4 based boards Exynos: Clock.c: Replace exynos4 prefix with exynos SMDK5250: enable device tree support is squashed with EXYNOS: Add SMDK5250 board support Chander Kashyap (4): Exynos: Clock.c: Use CONFIG_SYS_CLK_FREQ macro ARM: EXYNOS: Add support for Exynos5 based SoCs EXYNOS: Add SMDK5250 board support EXYNOS: SMDK5250: Add MMC SPL support MAINTAINERS | 1 + arch/arm/cpu/armv7/exynos/clock.c | 215 +- arch/arm/include/asm/arch-exynos/clock.h | 326 ++ arch/arm/include/asm/arch-exynos/cpu.h | 53 ++- arch/arm/include/asm/arch-exynos/gpio.h | 32 ++ board/samsung/smdk5250/Makefile | 64 +++ board/samsung/smdk5250/lowlevel_init.S | 528 ++ board/samsung/smdk5250/mem_setup.S | 600 + Are you planning to reimplement most of these two files in C as per Wolfgang's comments on the TRATS board, or is that a separate issue? Not as of now. We have 14K for spl. Using C style it might not fit into that. In case of trats implemented by C. it's not big. and I think it can fit SPL size limitation. Yes true. I assumed wrongly. Thank you, Kyungmin Park Regards, Simon board/samsung/smdk5250/mmc_boot.c | 58 +++ board/samsung/smdk5250/smdk5250.c | 125 + board/samsung/smdk5250/smdk5250_setup.h | 589 board/samsung/smdk5250/tools/mkexynos_image.c | 117 + boards.cfg | 1 + include/configs/s5pc210_universal.h | 1 + include/configs/smdk5250.h | 188 15 files changed, 2878 insertions(+), 20 deletions(-) create mode 100644 board/samsung/smdk5250/Makefile create mode 100644 board/samsung/smdk5250/lowlevel_init.S create mode 100644 board/samsung/smdk5250/mem_setup.S create mode 100644 board/samsung/smdk5250/mmc_boot.c create mode 100644 board/samsung/smdk5250/smdk5250.c create mode 100644 board/samsung/smdk5250/smdk5250_setup.h create mode 100644 board/samsung/smdk5250/tools/mkexynos_image.c create mode 100644 include/configs/smdk5250.h -- 1.7.5.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot -- with warm regards, Chander Kashyap ___ linaro-dev mailing list linaro-...@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev -- with warm regards, Chander Kashyap ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 0/4] Add SMDK5250 board support
Dear Wolfgang Denk, On 10 January 2012 11:05, Wolfgang Denk w...@denx.de wrote: Dear Chander Kashyap, In message CANuQgHEWBf3ssfoLN6AqAU=kgstvegttakuntvnimu0jnua...@mail.gmail.com you wrote: Are you planning to reimplement most of these two files in C as per Wolfgang's comments on the TRATS board, or is that a separate issue? Not as of now. We have 14K for spl. Using C style it might not fit into that. What makes you think that C coude would be that much larger? Made wrong assumption. It will fit into spl size restrictions. 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 The human race is a race of cowards; and I am not only marching in that procession but carrying a banner. - Mark Twain -- with warm regards, Chander Kashyap ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 0/4] Add SMDK5250 board support
Hi HeungJun, On 10 January 2012 14:50, HeungJun, Kim riverful@samsung.com wrote: Hi Chander Kashyap, I'm going to share the status of size. The case of assemble code: text data bss dec hex filename 1929 20 12 1961 7a9 board/samsung/trats/libtrats.o 912 0 0 912 390 board/samsung/trats/lowlevel_init.o 1017 20 12 1049 419 board/samsung/trats/trats.o The case of C code: text data bss dec hex filename 1845 20 4 1869 74d board/samsung/trats/libtrats.o 1845 20 4 1869 74d board/samsung/trats/trats.o Although the pre-version patch has been optimized to current version, and so it might be the factor, but the size is decreased. Thanks for sharing the statistics. Thank you. Regards, Heungjun Kim -Original Message- From: linaro-dev-boun...@lists.linaro.org [mailto:linaro-dev- boun...@lists.linaro.org] On Behalf Of Chander Kashyap Sent: Tuesday, January 10, 2012 12:58 PM To: Simon Glass Cc: linaro-...@lists.linaro.org; bj...@samsung.com; patc...@linaro.org; mk7.k...@samsung.com; u-boot@lists.denx.de; sams...@lists.linaro.org Subject: Re: [U-Boot] [PATCH v2 0/4] Add SMDK5250 board support Dear Simon, On 9 January 2012 23:25, Simon Glass s...@chromium.org wrote: Hi Chander, On Sun, Jan 8, 2012 at 10:40 PM, Chander Kashyap chander.kash...@linaro.org wrote: This patchset add support for Samsung's SMDK5250 board based on EXYNOS5250 based SoC. It also adds support for MMC SPL booting. The porting is done by Samsung engineers at HQ in System LSI Team. I am contributing in upstreaming the code for the board. Based upon discussions following patches are dropped in this version: Exynos: Add CONFIG_EXYNOS4 Macro to EXYNOS4 based boards Exynos: Clock.c: Replace exynos4 prefix with exynos SMDK5250: enable device tree support is squashed with EXYNOS: Add SMDK5250 board support Chander Kashyap (4): Exynos: Clock.c: Use CONFIG_SYS_CLK_FREQ macro ARM: EXYNOS: Add support for Exynos5 based SoCs EXYNOS: Add SMDK5250 board support EXYNOS: SMDK5250: Add MMC SPL support MAINTAINERS | 1 + arch/arm/cpu/armv7/exynos/clock.c | 215 +- arch/arm/include/asm/arch-exynos/clock.h | 326 ++ arch/arm/include/asm/arch-exynos/cpu.h | 53 ++- arch/arm/include/asm/arch-exynos/gpio.h | 32 ++ board/samsung/smdk5250/Makefile | 64 +++ board/samsung/smdk5250/lowlevel_init.S | 528 ++ board/samsung/smdk5250/mem_setup.S | 600 + Are you planning to reimplement most of these two files in C as per Wolfgang's comments on the TRATS board, or is that a separate issue? Not as of now. We have 14K for spl. Using C style it might not fit into that. Regards, Simon board/samsung/smdk5250/mmc_boot.c | 58 +++ board/samsung/smdk5250/smdk5250.c | 125 + board/samsung/smdk5250/smdk5250_setup.h | 589 board/samsung/smdk5250/tools/mkexynos_image.c | 117 + boards.cfg | 1 + include/configs/s5pc210_universal.h | 1 + include/configs/smdk5250.h | 188 15 files changed, 2878 insertions(+), 20 deletions(-) create mode 100644 board/samsung/smdk5250/Makefile create mode 100644 board/samsung/smdk5250/lowlevel_init.S create mode 100644 board/samsung/smdk5250/mem_setup.S create mode 100644 board/samsung/smdk5250/mmc_boot.c create mode 100644 board/samsung/smdk5250/smdk5250.c create mode 100644 board/samsung/smdk5250/smdk5250_setup.h create mode 100644 board/samsung/smdk5250/tools/mkexynos_image.c create mode 100644 include/configs/smdk5250.h -- 1.7.5.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot -- with warm regards, Chander Kashyap ___ linaro-dev mailing list linaro-...@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev -- with warm regards, Chander Kashyap ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/8] powerpc/env: Correct the compilation errors when defined CONFIG_ENV_IS_NOWHERE
When defined CONFIG_ENV_IS_NOWHERE, there will be some compilation errors: ./common/env_nowhere.o: In function `env_relocate_spec': ./common/env_nowhere.c:38: multiple definition of `env_relocate_spec' ./common/env_flash.o: ./common/env_flash.c:326: first defined here ./common/env_nowhere.o: In function `env_get_char_spec': ./common/env_nowhere.c:42: multiple definition of `env_get_char_spec' ./common/env_flash.o:./common/env_flash.c:78: first defined here ./common/env_nowhere.o: In function `env_init': ./common/env_nowhere.c:51: multiple definition of `env_init' ./common/env_flash.o:./common/env_flash.c:237: first defined here make[1]: *** [./common/libcommon.o] Error 1 make[1]: Leaving directory `./common' make: *** [./common/libcommon.o] Error 2 There will be a confict if defined CONFIG_ENV_IS_NOWHERE and CONFIG_ENV_IS_IN_FLASH. Signed-off-by: Liu Gang gang@freescale.com --- include/configs/corenet_ds.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/configs/corenet_ds.h b/include/configs/corenet_ds.h index 7925b95..e38f69d 100644 --- a/include/configs/corenet_ds.h +++ b/include/configs/corenet_ds.h @@ -96,6 +96,8 @@ #define CONFIG_ENV_IS_IN_NAND #define CONFIG_ENV_SIZECONFIG_SYS_NAND_BLOCK_SIZE #define CONFIG_ENV_OFFSET (5 * CONFIG_SYS_NAND_BLOCK_SIZE) +#elif defined(CONFIG_ENV_IS_NOWHERE) +#define CONFIG_ENV_SIZE0x2000 #else #define CONFIG_ENV_IS_IN_FLASH #define CONFIG_ENV_ADDR(CONFIG_SYS_MONITOR_BASE - CONFIG_ENV_SECT_SIZE) -- 1.7.3.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 6/8] powerpc/boot: Slave uploads ucode when boot from SRIO
When boot from SRIO, slave's ucode can be stored in master's memory space, then slave can fetch the ucode image through SRIO interface. Master needs to: 1. Put the slave's ucode image into it's own memory space. 2. Set an inbound SRIO window covered slave's ucode stored in master's memory space. Slave needs to: 1. Set a specific TLB entry in order to fetch ucode from master. 2. Set a LAW entry with the TargetID SRIO1 or SRIO2 for ucode. Signed-off-by: Liu Gang gang@freescale.com Signed-off-by: Shaohui Xie shaohui@freescale.com --- arch/powerpc/cpu/mpc8xxx/srio.c| 14 ++ board/freescale/common/p_corenet/law.c |4 board/freescale/common/p_corenet/tlb.c | 10 ++ include/configs/corenet_ds.h | 17 - 4 files changed, 44 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/cpu/mpc8xxx/srio.c b/arch/powerpc/cpu/mpc8xxx/srio.c index e8ce3a3..740d28a 100644 --- a/arch/powerpc/cpu/mpc8xxx/srio.c +++ b/arch/powerpc/cpu/mpc8xxx/srio.c @@ -124,5 +124,19 @@ void srio_boot_master(void) out_be32((u32)srio-riwar2 + CONFIG_SRIOBOOT_MASTER_PORT * 0x200, 0x80f55000 | atmu_size_mask(CONFIG_SRIOBOOT_SLAVE_IMAGE_SIZE)); + + /* configure inbound window for slave's ucode */ + printf(SRIOBOOT - MASTER: Inbound window for slave's ucode; + Local = 0x%llx, Srio = 0x%llx, Size = 0x%x\n, + (u64)CONFIG_SRIOBOOT_SLAVE_UCODE_LAW_PHYS, + (u64)CONFIG_SRIOBOOT_SLAVE_UCODE_SRIO_PHYS, + CONFIG_SRIOBOOT_SLAVE_UCODE_SIZE); + out_be32((u32)srio-riwtar3 + CONFIG_SRIOBOOT_MASTER_PORT * 0x200, + CONFIG_SRIOBOOT_SLAVE_UCODE_LAW_PHYS 12); + out_be32((u32)srio-riwbar3 + CONFIG_SRIOBOOT_MASTER_PORT * 0x200, + CONFIG_SRIOBOOT_SLAVE_UCODE_SRIO_PHYS 12); + out_be32((u32)srio-riwar3 + CONFIG_SRIOBOOT_MASTER_PORT * 0x200, + 0x80f55000 + | atmu_size_mask(CONFIG_SRIOBOOT_SLAVE_UCODE_SIZE)); } #endif diff --git a/board/freescale/common/p_corenet/law.c b/board/freescale/common/p_corenet/law.c index 1fbab4d..c4566dd 100644 --- a/board/freescale/common/p_corenet/law.c +++ b/board/freescale/common/p_corenet/law.c @@ -52,9 +52,13 @@ struct law_entry law_table[] = { #if defined(CONFIG_SRIOBOOT_SLAVE_PORT0) SET_LAW(CONFIG_SYS_SRIOBOOT_SLAVE_ADDR_PHYS, LAW_SIZE_1M, LAW_TRGT_IF_RIO_1), + SET_LAW(CONFIG_SYS_SRIOBOOT_UCODE_ENV_ADDR_PHYS, + LAW_SIZE_1M, LAW_TRGT_IF_RIO_1), #elif defined(CONFIG_SRIOBOOT_SLAVE_PORT1) SET_LAW(CONFIG_SYS_SRIOBOOT_SLAVE_ADDR_PHYS, LAW_SIZE_1M, LAW_TRGT_IF_RIO_2), + SET_LAW(CONFIG_SYS_SRIOBOOT_UCODE_ENV_ADDR_PHYS, + LAW_SIZE_1M, LAW_TRGT_IF_RIO_2), #endif #endif }; diff --git a/board/freescale/common/p_corenet/tlb.c b/board/freescale/common/p_corenet/tlb.c index cb4339f..70779f1 100644 --- a/board/freescale/common/p_corenet/tlb.c +++ b/board/freescale/common/p_corenet/tlb.c @@ -147,6 +147,16 @@ struct fsl_e_tlb_entry tlb_table[] = { MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, 0, 16, BOOKE_PAGESZ_1M, 1), #endif +#ifdef CONFIG_SRIOBOOT_SLAVE + /* +* *I*G - SRIOBOOT-SLAVE. 1M space from 0xffe0 for fetching ucode +* and ENV from master +*/ + SET_TLB_ENTRY(1, CONFIG_SYS_SRIOBOOT_UCODE_ENV_ADDR, + CONFIG_SYS_SRIOBOOT_UCODE_ENV_ADDR_PHYS, + MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, + 0, 17, BOOKE_PAGESZ_1M, 1), +#endif }; int num_tlb_entries = ARRAY_SIZE(tlb_table); diff --git a/include/configs/corenet_ds.h b/include/configs/corenet_ds.h index e4f562c..3b2ff15 100644 --- a/include/configs/corenet_ds.h +++ b/include/configs/corenet_ds.h @@ -398,6 +398,13 @@ #define CONFIG_SRIOBOOT_SLAVE_IMAGE_SIZE 0x8 /* 512K */ #define CONFIG_SRIOBOOT_SLAVE_IMAGE_LAW_PHYS2 0xfef08ull #define CONFIG_SRIOBOOT_SLAVE_IMAGE_SRIO_PHYS2 0x3fff8ull +/* + *for slave UCODE instored in master memory space, + *PHYS must be aligned based on the SIZE + */ +#define CONFIG_SRIOBOOT_SLAVE_UCODE_LAW_PHYS 0xfef02ull +#define CONFIG_SRIOBOOT_SLAVE_UCODE_SRIO_PHYS 0x3ffe0ull +#define CONFIG_SRIOBOOT_SLAVE_UCODE_SIZE 0x1 /* 64K */ #endif /* @@ -407,6 +414,9 @@ /* slave port for srioboot*/ #define CONFIG_SRIOBOOT_SLAVE_PORT0 /* #define CONFIG_SRIOBOOT_SLAVE_PORT1 */ +#define CONFIG_SYS_SRIOBOOT_UCODE_ENV_ADDR 0xFFE0 +#define CONFIG_SYS_SRIOBOOT_UCODE_ENV_ADDR_PHYS \ + (0x3ull | CONFIG_SYS_SRIOBOOT_UCODE_ENV_ADDR) #endif /* @@ -530,8 +540,13 @@ #define CONFIG_SYS_QE_FMAN_FW_IN_NAND #define CONFIG_SYS_QE_FMAN_FW_ADDR (6 *
[U-Boot] [PATCH 3/8] powerpc/boot: Document for the boot from SRIO
This document describes the implementation of the boot from SRIO, includes the introduction of envionment, an example based on P4080DS platform, an example of the slave's RCW, and the description about how to use this feature. Signed-off-by: Liu Gang gang@freescale.com --- doc/README.srio-boot-mpc85xx | 103 ++ 1 files changed, 103 insertions(+), 0 deletions(-) create mode 100644 doc/README.srio-boot-mpc85xx diff --git a/doc/README.srio-boot-mpc85xx b/doc/README.srio-boot-mpc85xx new file mode 100644 index 000..1c6b0c9 --- /dev/null +++ b/doc/README.srio-boot-mpc85xx @@ -0,0 +1,103 @@ +-- +SRIO Boot on MPC85xx Platforms +-- + +For some PowerPC processors with SRIO interface, boot location can be configured +to SRIO by RCW. The processor booting from SRIO can do without flash for u-boot +image, ucode and ENV. All the images can be fetched from another processor's +memory space by SRIO link connected between them. + +This document describes the processes based on an example implemented on P4080DS +platforms and a RCW example with boot from SRIO configuration. + +Environment of the SRIO boot: + a) Master and slave can be SOCs in one board or SOCs in separate boards. + b) They are connected with SRIO links, whether 1x or 4x, and directly or + through switch system. + c) Only Master has NorFlash for booting, and all the Master's and Slave's + U-Boot images, UCodes will be stored in this flash. + d) Slave has its own EEPROM for RCW and PBI. + e) Slave's RCW should configure the SerDes for SRIO boot port, set the boot + location to SRIO, and holdoff all the cores if needed. + + ----- --- + | | | | | | + | | | | | | + | NorFlash|-| Master |SRIO | Slave |[EEPROM] + | | | |===| | + | | | | | | + ----- --- + +The example based on P4080DS platform: + Two P4080DS platforms can be used to implement the boot from SRIO. Their SRIO + ports 0 will be connected directly and will be used for the boot from SRIO. + + 1. Slave's RCW example for boot from SRIO port 0 and core 0 not in holdoff. + : aa55 aa55 010e 0100 0c58 + 0010: 1818 1818 7440 4000 2000 + 0020: f400 0100 + 0030: 0083 + 0040: 0813 8040 698b 93fe + + 2. Slave's RCW example for boot from SRIO port 0 and all cores in holdoff. + : aa55 aa55 010e 0100 0c58 + 0010: 1818 1818 7440 4000 2000 + 0020: f440 0100 + 0030: 0083 + 0040: 0813 8040 063c 778f + + 3. Sequence in Step by Step. + a) Update RCW for slave with boot from SRIO port 0 configuration. + b) Program slave's U-Boot image, UCode, and ENV parameters into master's + NorFlash. + c) Start up master and it will boot up normally from its NorFlash. + Then, it will finish necessary configurations for slave's boot from + SRIO port 0. + d) Master will set inbound SRIO windows covered slave's U-Boot image stored + in master's NorFlash. + e) Master will set an inbound SRIO window covered slave's UCode stored in + master's NorFlash. + f) Master will set an inbound SRIO window covered slave's ENV stored in + master's NorFlash. + g) If need to release slave's core, master will set outbound SRIO windows + in order to configure slave's registers for the core's releasing. + h) If all cores of slave in holdoff, slave should be powered on before all + the above master's steps, and wait to be released by master. If not all + cores in holdoff, that means core 0 will start up normally, slave should + be powered on after all the above master's steps. In the startup phase + of the slave from SRIO, it will finish some necessary configurations. + i) Slave will set a specific TLB entry for the boot process. + j) Slave will set a LAW entry with the TargetID SRIO port 0 for the boot. + k) Slave will set a specific TLB entry in order to fetch
[U-Boot] [PATCH 4/8] powerpc/boot: Master module for boot from SRIO
For the powerpc processors with SRIO interface, boot location can be configured from SRIO1 or SRIO2 by RCW. The processor booting from SRIO can do without flash for u-boot image. The image can be fetched from another processor's memory space by SRIO link connected between them. The processor boots from SRIO is slave, the processor boots from normal flash memory space and can help slave to boot from its memory space is master. They are different environments and requirements: master: 1. Nor flash for its own u-boot image, ucode and ENV space. 2. Slave's u-boot image in master Nor flash. 3. Normally boot from local Nor flash. 4. Configure SRIO switch system if needed. slave: 1. Just has EEPROM for RCW. No flash for u-boot image, ucode and ENV. 2. Boot location should be set to SRIO1 or SRIO2 by RCW. 3. RCW should configure the SerDes, SRIO interfaces correctly. 4. Slave must be powered on after master's boot. For the master module, need to finish these processes: 1. Initialize the SRIO port and address space. 2. Set inbound SRIO windows covered slave's u-boot image stored in master's Nor flash. 3. Master's u-boot image should be generated specifically by make _SRIOBOOT_MASTER_config 4. Master must boot first, and then slave can be powered on. Signed-off-by: Liu Gang gang@freescale.com Signed-off-by: Shaohui Xie shaohui@freescale.com --- arch/powerpc/cpu/mpc85xx/cpu_init.c |6 ++- arch/powerpc/cpu/mpc8xxx/srio.c | 42 ++ arch/powerpc/include/asm/fsl_srio.h | 61 + arch/powerpc/include/asm/immap_85xx.h |3 ++ boards.cfg|3 ++ include/configs/corenet_ds.h | 18 ++ 6 files changed, 131 insertions(+), 2 deletions(-) create mode 100644 arch/powerpc/include/asm/fsl_srio.h diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init.c b/arch/powerpc/cpu/mpc85xx/cpu_init.c index 9141ba4..42d6475 100644 --- a/arch/powerpc/cpu/mpc85xx/cpu_init.c +++ b/arch/powerpc/cpu/mpc85xx/cpu_init.c @@ -37,6 +37,7 @@ #include asm/mmu.h #include asm/fsl_law.h #include asm/fsl_serdes.h +#include asm/fsl_srio.h #include linux/compiler.h #include mp.h #ifdef CONFIG_SYS_QE_FMAN_FW_IN_NAND @@ -48,8 +49,6 @@ DECLARE_GLOBAL_DATA_PTR; -extern void srio_init(void); - #ifdef CONFIG_QE extern qe_iop_conf_t qe_iop_conf_tab[]; extern void qe_config_iopin(u8 port, u8 pin, int dir, @@ -443,6 +442,9 @@ skip_l2: #ifdef CONFIG_SYS_SRIO srio_init(); +#ifdef CONFIG_SRIOBOOT_MASTER + srio_boot_master(); +#endif #endif #if defined(CONFIG_MP) diff --git a/arch/powerpc/cpu/mpc8xxx/srio.c b/arch/powerpc/cpu/mpc8xxx/srio.c index e46d328..e8ce3a3 100644 --- a/arch/powerpc/cpu/mpc8xxx/srio.c +++ b/arch/powerpc/cpu/mpc8xxx/srio.c @@ -21,6 +21,7 @@ #include config.h #include asm/fsl_law.h #include asm/fsl_serdes.h +#include asm/fsl_srio.h #if defined(CONFIG_FSL_CORENET) #define _DEVDISR_SRIO1 FSL_CORENET_DEVDISR_SRIO1 @@ -84,3 +85,44 @@ void srio_init(void) setbits_be32(gur-devdisr, _DEVDISR_RMU); } } + +#ifdef CONFIG_SRIOBOOT_MASTER +void srio_boot_master(void) +{ + ccsr_rio_t *srio = (void *)CONFIG_SYS_FSL_SRIO_ADDR; + + /* set port accept-all */ + out_be32((u32)srio-ptaacr + CONFIG_SRIOBOOT_MASTER_PORT * 0x80, + 0x1001); + + printf(SRIOBOOT - MASTER: Master port [ %d ] for srio boot.\n, + CONFIG_SRIOBOOT_MASTER_PORT); + /* configure inbound window1 for slave's u-boot image */ + printf(SRIOBOOT - MASTER: Inbound window1 for slave's image; + Local = 0x%llx, Srio = 0x%llx, Size = 0x%x\n, + (u64)CONFIG_SRIOBOOT_SLAVE_IMAGE_LAW_PHYS1, + (u64)CONFIG_SRIOBOOT_SLAVE_IMAGE_SRIO_PHYS1, + CONFIG_SRIOBOOT_SLAVE_IMAGE_SIZE); + out_be32((u32)srio-riwtar1 + CONFIG_SRIOBOOT_MASTER_PORT * 0x200, + CONFIG_SRIOBOOT_SLAVE_IMAGE_LAW_PHYS1 12); + out_be32((u32)srio-riwbar1 + CONFIG_SRIOBOOT_MASTER_PORT * 0x200, + CONFIG_SRIOBOOT_SLAVE_IMAGE_SRIO_PHYS1 12); + out_be32((u32)srio-riwar1 + CONFIG_SRIOBOOT_MASTER_PORT * 0x200, + 0x80f55000 + | atmu_size_mask(CONFIG_SRIOBOOT_SLAVE_IMAGE_SIZE)); + + /* configure inbound window2 for slave's u-boot image */ + printf(SRIOBOOT - MASTER: Inbound window2 for slave's image; + Local = 0x%llx, Srio = 0x%llx, Size = 0x%x\n, + (u64)CONFIG_SRIOBOOT_SLAVE_IMAGE_LAW_PHYS2, + (u64)CONFIG_SRIOBOOT_SLAVE_IMAGE_SRIO_PHYS2, + CONFIG_SRIOBOOT_SLAVE_IMAGE_SIZE); + out_be32((u32)srio-riwtar2 + CONFIG_SRIOBOOT_MASTER_PORT * 0x200, +
[U-Boot] [PATCH 1/8] powerpc/srio: Correct the register defined errors in the struct ccsr_rio_t
Many registers were not defined in the struct ccsr_rio_t in the file arch/powerpc/include/asm/immap_85xx.h. For example it lacks registers from offset 0xc0600 to 0xd0160. Accordingly, some register's offset need to be modified in the struct. In addition, add the register's offset in the comments. Signed-off-by: Liu Gang gang@freescale.com --- arch/powerpc/include/asm/immap_85xx.h | 338 - 1 files changed, 202 insertions(+), 136 deletions(-) diff --git a/arch/powerpc/include/asm/immap_85xx.h b/arch/powerpc/include/asm/immap_85xx.h index 92da130..623be17 100644 --- a/arch/powerpc/include/asm/immap_85xx.h +++ b/arch/powerpc/include/asm/immap_85xx.h @@ -1355,168 +1355,234 @@ typedef struct ccsr_cpm { /* RapidIO Registers */ typedef struct ccsr_rio { - u32 didcar; /* Device Identity Capability */ - u32 dicar; /* Device Information Capability */ - u32 aidcar; /* Assembly Identity Capability */ - u32 aicar; /* Assembly Information Capability */ - u32 pefcar; /* Processing Element Features Capability */ - u32 spicar; /* Switch Port Information Capability */ - u32 socar; /* Source Operations Capability */ - u32 docar; /* Destination Operations Capability */ + u32 didcar; /* 0xc - Device Identity CAR */ + u32 dicar; /* 0xc0004 - Device Information CAR */ + u32 aidcar; /* 0xc0008 - Assembly Identity CAR */ + u32 aicar; /* 0xc000c - Assembly Information CAR */ + u32 pefcar; /* 0xc0010 - Processing Element Features CAR */ + u32 spicar; /* 0xc0014 - Switch Port Information CAR */ + u32 socar; /* 0xc0018 - Source Operations CAR */ + u32 docar; /* 0xc001c - Destination Operations CAR */ u8 res1[32]; - u32 msr;/* Mailbox Cmd And Status */ - u32 pwdcsr; /* Port-Write Doorbell Cmd And Status */ + u32 mcsr; /* 0xc0040 - Mailbox CSR */ + u32 pwdcsr; /* 0xc0044 - Port-Write and Doorbell CSR */ u8 res2[4]; - u32 pellccsr; /* Processing Element Logic Layer CCSR */ + u32 pellccsr; /* 0xc004c - Processing Element Logic Layer CCSR */ u8 res3[12]; - u32 lcsbacsr; /* Local Cfg Space Base Addr Cmd Status */ - u32 bdidcsr;/* Base Device ID Cmd Status */ + u32 lcsbacsr; /* 0xc005c - Local Configuration Space BACSR */ + u32 bdidcsr; /* 0xc0060 - Base Device ID CSR */ u8 res4[4]; - u32 hbdidlcsr; /* Host Base Device ID Lock Cmd Status */ - u32 ctcsr; /* Component Tag Cmd Status */ + u32 hbdidlcsr; /* 0xc0068 - Host Base Device ID Lock CSR */ + u32 ctcsr; /* 0xc006c - Component Tag CSR */ u8 res5[144]; - u32 pmbh0csr; /* Port Maint. Block Hdr 0 Cmd Status */ + u32 pmbh0csr; /* 0xc0100 - Port Maintenance Block Header 0 CSR */ u8 res6[28]; - u32 pltoccsr; /* Port Link Time-out Ctrl Cmd Status */ - u32 prtoccsr; /* Port Response Time-out Ctrl Cmd Status */ + u32 pltoccsr; /* 0xc0120 - Port Link Time-out CCSR */ + u32 prtoccsr; /* 0xc0124 - Port Response Time-out CCSR */ u8 res7[20]; - u32 pgccsr; /* Port General Cmd Status */ - u32 plmreqcsr; /* Port Link Maint. Request Cmd Status */ - u32 plmrespcsr; /* Port Link Maint. Response Cmd Status */ - u32 plascsr;/* Port Local Ackid Status Cmd Status */ + u32 pgccsr; /* 0xc013c - Port General CSR */ + u32 plmreqcsr; /* 0xc0140 - Port Link Maintenance Request CSR */ + u32 plmrespcsr; /* 0xc0144 - Port Link Maintenance Response CSR */ + u32 plascsr; /* 0xc0148 - Port Local Ackid Status CSR */ u8 res8[12]; - u32 pescsr; /* Port Error Status Cmd Status */ - u32 pccsr; /* Port Control Cmd Status */ - u8 res9[65184]; - u32 cr; /* Port Control Cmd Status */ - u8 res10[12]; - u32 pcr;/* Port Configuration */ - u32 peir; /* Port Error Injection */ - u8 res11[3048]; - u32 rowtar0;/* RIO Outbound Window Translation Addr 0 */ - u8 res12[12]; - u32 rowar0; /* RIO Outbound Attrs 0 */ + u32 pescsr; /* 0xc0158 - Port Error and Status CSR */ + u32 pccsr; /* 0xc015c - Port Control CSR */ + u8 res9[1184]; + u32 erbh; /* 0xc0600 - Error Reporting Block Header Register */ + u8 res10[4]; + u32 ltledcsr; /* 0xc0608 - Logical/Transport layer error DCSR */ + u32 ltleecsr; /* 0xc060c -
[U-Boot] [PATCH 5/8] powerpc/boot: Slave module for boot from SRIO
For the powerpc processors with SRIO interface, boot location can be configured from SRIO1 or SRIO2 by RCW. The processor booting from SRIO can do without flash for u-boot image. The image can be fetched from another processor's memory space by SRIO link connected between them. The processor boots from SRIO is slave, the processor boots from normal flash memory space and can help slave to boot from its memory space is master. They are different environments and requirements: master: 1. Nor flash for its own u-boot image, ucode and ENV space. 2. Slave's u-boot image in master Nor flash. 3. Normally boot from local Nor flash. 4. Configure SRIO switch system if needed. slave: 1. Just has EEPROM for RCW. No flash for u-boot image, ucode and ENV. 2. Boot location should be set to SRIO1 or SRIO2 by RCW. 3. RCW should configure the SerDes, SRIO interfaces correctly. 4. Slave must be powered on after master's boot. For the slave module, need to finish these processes: 1. Set the boot location to SRIO1 or SRIO2 by RCW. 2. Set a specific TLB entry for the boot process. 3. Set a LAW entry with the TargetID SRIO1 or SRIO2 for the boot. 4. Slave's u-boot image should be generated specifically by make _SRIOBOOT_SLAVE_config. This will set SYS_TEXT_BASE=0xFFF8 and other configurations. Signed-off-by: Liu Gang gang@freescale.com Signed-off-by: Shaohui Xie shaohui@freescale.com --- board/freescale/common/p_corenet/law.c |9 + board/freescale/common/p_corenet/tlb.c |9 + boards.cfg |3 +++ drivers/net/fm/fm.c|2 ++ include/configs/corenet_ds.h | 21 + 5 files changed, 44 insertions(+), 0 deletions(-) diff --git a/board/freescale/common/p_corenet/law.c b/board/freescale/common/p_corenet/law.c index 09ef561..1fbab4d 100644 --- a/board/freescale/common/p_corenet/law.c +++ b/board/freescale/common/p_corenet/law.c @@ -48,6 +48,15 @@ struct law_entry law_table[] = { #ifdef CONFIG_SYS_NAND_BASE_PHYS SET_LAW(CONFIG_SYS_NAND_BASE_PHYS, LAW_SIZE_1M, LAW_TRGT_IF_LBC), #endif +#ifdef CONFIG_SRIOBOOT_SLAVE +#if defined(CONFIG_SRIOBOOT_SLAVE_PORT0) + SET_LAW(CONFIG_SYS_SRIOBOOT_SLAVE_ADDR_PHYS, + LAW_SIZE_1M, LAW_TRGT_IF_RIO_1), +#elif defined(CONFIG_SRIOBOOT_SLAVE_PORT1) + SET_LAW(CONFIG_SYS_SRIOBOOT_SLAVE_ADDR_PHYS, + LAW_SIZE_1M, LAW_TRGT_IF_RIO_2), +#endif +#endif }; int num_law_entries = ARRAY_SIZE(law_table); diff --git a/board/freescale/common/p_corenet/tlb.c b/board/freescale/common/p_corenet/tlb.c index 6a0026a..cb4339f 100644 --- a/board/freescale/common/p_corenet/tlb.c +++ b/board/freescale/common/p_corenet/tlb.c @@ -66,6 +66,15 @@ struct fsl_e_tlb_entry tlb_table[] = { SET_TLB_ENTRY(1, CONFIG_SYS_INIT_L3_ADDR, CONFIG_SYS_INIT_L3_ADDR, MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, 0, 0, BOOKE_PAGESZ_1M, 1), +#elif defined(CONFIG_SRIOBOOT_SLAVE) + /* +* *I*G - SRIOBOOT-SLAVE. When slave boot, the address of the +* space is at 0xfff0, it covered the 0xf000. +*/ + SET_TLB_ENTRY(1, CONFIG_SYS_SRIOBOOT_SLAVE_ADDR, + CONFIG_SYS_SRIOBOOT_SLAVE_ADDR_PHYS, + MAS3_SX|MAS3_SW|MAS3_SR, MAS2_W|MAS2_G, + 0, 0, BOOKE_PAGESZ_1M, 1), #else SET_TLB_ENTRY(1, 0xf000, 0xf000, MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, diff --git a/boards.cfg b/boards.cfg index 27f3900..0ea8988 100644 --- a/boards.cfg +++ b/boards.cfg @@ -735,6 +735,7 @@ P3041DS_SDCARD powerpc mpc85xx corenet_ds freescale P3041DS_SECURE_BOOT powerpc mpc85xx corenet_ds freescale - P3041DS:SECURE_BOOT P3041DS_SPIFLASHpowerpc mpc85xx corenet_ds freescale - P3041DS:RAMBOOT_PBL,SPIFLASH,SYS_TEXT_BASE=0xFFF8 P3041DS_SRIOBOOT_MASTER powerpc mpc85xx corenet_ds freescale - P3041DS:SRIOBOOT_MASTER +P3041DS_SRIOBOOT_SLAVE powerpc mpc85xx corenet_ds freescale - P3041DS:SRIOBOOT_SLAVE,SYS_TEXT_BASE=0xFFF8 P3060QDSpowerpc mpc85xx p3060qds freescale P3060QDS_NAND powerpc mpc85xx p3060qds freescale - P3060QDS:RAMBOOT_PBL,NAND,SYS_TEXT_BASE=0xFFF8 P3060QDS_SECURE_BOOT powerpc mpc85xx p3060qds freescale - P3060QDS:SECURE_BOOT @@ -743,12 +744,14 @@ P4080DS_SDCARD powerpc mpc85xx corenet_ds freescale P4080DS_SECURE_BOOT powerpc mpc85xx corenet_ds freescale
[U-Boot] [PATCH 7/8] powerpc/boot: Slave reads ENV from master when boot from SRIO
When boot from SRIO, slave's ENV can be stored in master's memory space, then slave can fetch the ENV through SRIO interface. NOTE: Because the slave can not erase, write master's Norflash by SRIO interface, so it can not modify the ENV parameters stored in master's Norflash using saveenv or other commands. Master needs to: 1. Put the slave's ENV into it's own memory space. 2. Set an inbound SRIO window covered slave's ENV stored in master's memory space. Slave needs to: 1. Set a specific TLB entry in order to fetch ucode and ENV from master. 2. Set a LAW entry with the TargetID SRIO1 or SRIO2 for ucode and ENV. Signed-off-by: Liu Gang gang@freescale.com Signed-off-by: Shaohui Xie shaohui@freescale.com --- arch/powerpc/cpu/mpc8xxx/srio.c | 14 +++ common/Makefile |1 + common/cmd_nvedit.c |3 +- common/env_remote.c | 78 +++ include/configs/corenet_ds.h| 14 +++ 5 files changed, 109 insertions(+), 1 deletions(-) create mode 100644 common/env_remote.c diff --git a/arch/powerpc/cpu/mpc8xxx/srio.c b/arch/powerpc/cpu/mpc8xxx/srio.c index 740d28a..c899480 100644 --- a/arch/powerpc/cpu/mpc8xxx/srio.c +++ b/arch/powerpc/cpu/mpc8xxx/srio.c @@ -138,5 +138,19 @@ void srio_boot_master(void) out_be32((u32)srio-riwar3 + CONFIG_SRIOBOOT_MASTER_PORT * 0x200, 0x80f55000 | atmu_size_mask(CONFIG_SRIOBOOT_SLAVE_UCODE_SIZE)); + + /* configure inbound window for slave's ENV */ + printf(SRIOBOOT - MASTER: Inbound window for slave's ENV; + Local = 0x%llx, Siro = 0x%llx, Size = 0x%x\n, + CONFIG_SRIOBOOT_SLAVE_ENV_LAW_PHYS, + CONFIG_SRIOBOOT_SLAVE_ENV_SRIO_PHYS, + CONFIG_SRIOBOOT_SLAVE_ENV_SIZE); + out_be32((u32)srio-riwtar4 + CONFIG_SRIOBOOT_MASTER_PORT * 0x200, + CONFIG_SRIOBOOT_SLAVE_ENV_LAW_PHYS 12); + out_be32((u32)srio-riwbar4 + CONFIG_SRIOBOOT_MASTER_PORT * 0x200, + CONFIG_SRIOBOOT_SLAVE_ENV_SRIO_PHYS 12); + out_be32((u32)srio-riwar4 + CONFIG_SRIOBOOT_MASTER_PORT * 0x200, + 0x80f55000 + | atmu_size_mask(CONFIG_SRIOBOOT_SLAVE_ENV_SIZE)); } #endif diff --git a/common/Makefile b/common/Makefile index 1b672ad..5c99450 100644 --- a/common/Makefile +++ b/common/Makefile @@ -61,6 +61,7 @@ COBJS-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o COBJS-$(CONFIG_ENV_IS_IN_NVRAM) += env_nvram.o COBJS-$(CONFIG_ENV_IS_IN_ONENAND) += env_onenand.o COBJS-$(CONFIG_ENV_IS_IN_SPI_FLASH) += env_sf.o +COBJS-$(CONFIG_ENV_IS_IN_REMOTE) += env_remote.o COBJS-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o # command diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c index 5995354..d8372fd 100644 --- a/common/cmd_nvedit.c +++ b/common/cmd_nvedit.c @@ -65,9 +65,10 @@ DECLARE_GLOBAL_DATA_PTR; !defined(CONFIG_ENV_IS_IN_NVRAM) \ !defined(CONFIG_ENV_IS_IN_ONENAND) \ !defined(CONFIG_ENV_IS_IN_SPI_FLASH) \ + !defined(CONFIG_ENV_IS_IN_REMOTE)\ !defined(CONFIG_ENV_IS_NOWHERE) # error Define one of CONFIG_ENV_IS_IN_{EEPROM|FLASH|DATAFLASH|ONENAND|\ -SPI_FLASH|MG_DISK|NVRAM|MMC} or CONFIG_ENV_IS_NOWHERE +SPI_FLASH|MG_DISK|NVRAM|MMC|REMOTE} or CONFIG_ENV_IS_NOWHERE #endif #define XMK_STR(x) #x diff --git a/common/env_remote.c b/common/env_remote.c new file mode 100644 index 000..4c6b781 --- /dev/null +++ b/common/env_remote.c @@ -0,0 +1,78 @@ +/* + * (C) Copyright 2011-2012 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 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 + */ + +/* #define DEBUG */ + +#include common.h +#include command.h +#include environment.h +#include linux/stddef.h + +char *env_name_spec = Remote; + +#ifdef ENV_IS_EMBEDDED +env_t *env_ptr = environment; +#else /* ! ENV_IS_EMBEDDED */ +env_t *env_ptr = (env_t *)CONFIG_ENV_ADDR; +#endif /* ENV_IS_EMBEDDED */ + +DECLARE_GLOBAL_DATA_PTR; + +#if !defined(CONFIG_ENV_OFFSET) +#define CONFIG_ENV_OFFSET 0 +#endif + +uchar env_get_char_spec(int index) +{
[U-Boot] [PATCH 8/8] powerpc/boot: Slave core in holdoff when boot from SRIO
When boot from SRIO, slave's core can be in holdoff after powered on for some specific requirements. Master can release the slave's core at the right time by SRIO interface. Master needs to: 1. Set outbound SRIO windows in order to configure slave's registers for the core's releasing. 2. Check the SRIO port status when release slave core, if no errors, will implement the process of the slave core's releasing. Slave needs to: 1. Set all the cores in holdoff by RCW. 2. Be powered on before master's boot. Signed-off-by: Liu Gang gang@freescale.com Signed-off-by: Shaohui Xie shaohui@freescale.com --- arch/powerpc/cpu/mpc85xx/cpu_init.c |3 + arch/powerpc/cpu/mpc8xxx/srio.c | 114 +++ arch/powerpc/include/asm/fsl_srio.h |3 + include/configs/corenet_ds.h|4 + 4 files changed, 124 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init.c b/arch/powerpc/cpu/mpc85xx/cpu_init.c index 42d6475..9284e443 100644 --- a/arch/powerpc/cpu/mpc85xx/cpu_init.c +++ b/arch/powerpc/cpu/mpc85xx/cpu_init.c @@ -444,6 +444,9 @@ skip_l2: srio_init(); #ifdef CONFIG_SRIOBOOT_MASTER srio_boot_master(); +#ifdef CONFIG_SRIOBOOT_SLAVE_HOLDOFF + srio_boot_master_release_slave(); +#endif #endif #endif diff --git a/arch/powerpc/cpu/mpc8xxx/srio.c b/arch/powerpc/cpu/mpc8xxx/srio.c index c899480..66ecf0b 100644 --- a/arch/powerpc/cpu/mpc8xxx/srio.c +++ b/arch/powerpc/cpu/mpc8xxx/srio.c @@ -23,6 +23,11 @@ #include asm/fsl_serdes.h #include asm/fsl_srio.h +#define RIO_LCSBA1CSR_OFFSET 0x5c +#define RIO_MAINT_WIN_SIZE 0x100 /* 16M */ +#define RIO_RW_WIN_SIZE 0x10 /* 1M */ +#define RIO_LCSBA1CSR 0x6000 + #if defined(CONFIG_FSL_CORENET) #define _DEVDISR_SRIO1 FSL_CORENET_DEVDISR_SRIO1 #define _DEVDISR_SRIO2 FSL_CORENET_DEVDISR_SRIO2 @@ -153,4 +158,113 @@ void srio_boot_master(void) 0x80f55000 | atmu_size_mask(CONFIG_SRIOBOOT_SLAVE_ENV_SIZE)); } + +#ifdef CONFIG_SRIOBOOT_SLAVE_HOLDOFF +void srio_boot_master_release_slave(void) +{ + ccsr_rio_t *srio = (void *)CONFIG_SYS_FSL_SRIO_ADDR; + u32 escsr; + + printf(SRIOBOOT - MASTER: + Check the port status and release slave core ...\n); + + escsr = in_be32((u32)srio-pescsr + + CONFIG_SRIOBOOT_MASTER_PORT * 0x20); + if (escsr 0x2) { + if (escsr 0x10100) { + printf(SRIOBOOT - MASTER: Port [ %d ] is error.\n, + CONFIG_SRIOBOOT_MASTER_PORT); + } else { + printf(SRIOBOOT - MASTER: + Port [ %d ] is ready, now release slave's core ...\n, + CONFIG_SRIOBOOT_MASTER_PORT); + /* +* configure outbound window +* with maintenance attribute to set slave's LCSBA1CSR +*/ + out_be32((u32)srio-rowtar1 + + CONFIG_SRIOBOOT_MASTER_PORT * 0x200, 0); + out_be32((u32)srio-rowtear1 + + CONFIG_SRIOBOOT_MASTER_PORT * 0x200, 0); + if (CONFIG_SRIOBOOT_MASTER_PORT) + out_be32((u32)srio-rowbar1 + + CONFIG_SRIOBOOT_MASTER_PORT * 0x200, + CONFIG_SYS_SRIO2_MEM_PHYS 12); + else + out_be32((u32)srio-rowbar1 + + CONFIG_SRIOBOOT_MASTER_PORT * 0x200, + CONFIG_SYS_SRIO1_MEM_PHYS 12); + out_be32((u32)srio-rowar1 + + CONFIG_SRIOBOOT_MASTER_PORT * 0x200, + 0x80077000 + | atmu_size_mask(RIO_MAINT_WIN_SIZE)); + + /* +* configure outbound window +* with R/W attribute to set slave's BRR +*/ + out_be32((u32)srio-rowtar2 + + CONFIG_SRIOBOOT_MASTER_PORT * 0x200, + RIO_LCSBA1CSR 9); + out_be32((u32)srio-rowtear2 + + CONFIG_SRIOBOOT_MASTER_PORT * 0x200, 0); + if (CONFIG_SRIOBOOT_MASTER_PORT) + out_be32((u32)srio-rowbar2 + + CONFIG_SRIOBOOT_MASTER_PORT * 0x200, + (CONFIG_SYS_SRIO2_MEM_PHYS + + RIO_MAINT_WIN_SIZE) 12); + else +
[U-Boot] [PATCH] arm, davinci: Add support for the Calimain board from OMICRON electronics
This patch adds support for the Calimain board from OMICRON electronics GmbH. The board features a Texas Instruments AM1808 SoC, 128 MB DDR2 memory, and 64 MB NOR flash memory connected to CS2 and CS3. Signed-off-by: Christian Riesch christian.rie...@omicron.at --- MAINTAINERS |5 + board/omicron/calimain/Makefile | 45 + board/omicron/calimain/calimain.c | 201 boards.cfg|1 + include/configs/calimain.h| 364 + 5 files changed, 616 insertions(+), 0 deletions(-) create mode 100644 board/omicron/calimain/Makefile create mode 100644 board/omicron/calimain/calimain.c create mode 100644 include/configs/calimain.h diff --git a/MAINTAINERS b/MAINTAINERS index c79283f..25d7a95 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -792,6 +792,11 @@ Thierry Reding thierry.red...@avionic-design.de plutux Tegra2 (ARM7 A9 Dual Core) medcom Tegra2 (ARM7 A9 Dual Core) +Christian Riesch christian.rie...@omicron.at +Manfred Rudigier manfred.rudig...@omicron.at + + calimainARM926EJS (AM1808 SoC) + Tom Rini tr...@ti.com omap3_evm ARM ARMV7 (OMAP3xx SoC) diff --git a/board/omicron/calimain/Makefile b/board/omicron/calimain/Makefile new file mode 100644 index 000..cd1f0d4 --- /dev/null +++ b/board/omicron/calimain/Makefile @@ -0,0 +1,45 @@ +# +# (C) Copyright 2000, 2001, 2002 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de. +# +# Copyright (C) 2007 Sergey Kubushyn k...@koi8.net +# +# 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 := $(BOARD).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)) + +# +# This is for $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/board/omicron/calimain/calimain.c b/board/omicron/calimain/calimain.c new file mode 100644 index 000..b2f2d96 --- /dev/null +++ b/board/omicron/calimain/calimain.c @@ -0,0 +1,201 @@ +/* + * Copyright (C) 2011 OMICRON electronics GmbH + * + * Based on da850evm.c. Original Copyrights follow: + * + * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/ + * Copyright (C) 2009 Nick Thompson, GE Fanuc, Ltd. nick.thomp...@gefanuc.com + * Copyright (C) 2007 Sergey Kubushyn k...@koi8.net + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include common.h +#include i2c.h +#include net.h +#include netdev.h +#include watchdog.h +#include asm/io.h +#include asm/arch/hardware.h +#include asm/arch/gpio.h +#include asm/arch/emif_defs.h +#include asm/arch/emac_defs.h +#include asm/arch/pinmux_defs.h +#include asm/arch/davinci_misc.h +#include asm/arch/timer_defs.h + +DECLARE_GLOBAL_DATA_PTR; + +#define CALIMAIN_HWVERSION_MASK0x7f00 +#define CALIMAIN_HWVERSION_SHIFT 24 + +/* Hardware version pinmux settings */ +const struct pinmux_config hwversion_pins[] = { + { pinmux(16), 8, 2 }, /* GP7[15] */ + { pinmux(16), 8, 3 }, /* GP7[14] */ + { pinmux(16), 8, 4 }, /* GP7[13] */ + { pinmux(16), 8, 5 }, /* GP7[12] */ + { pinmux(16), 8, 6 }, /* GP7[11] */ + { pinmux(16), 8, 7 }, /* GP7[10] */ + {
Re: [U-Boot] [PATCH 13/15] New board support: Nokia RX-51 aka N900
On Tuesday 03 January 2012 09:05:17 Tom Rini wrote: On Sun, Dec 18, 2011 at 2:34 PM, Pali Rohár pali.ro...@gmail.com wrote: This board definition results in a u-boot.bin which can be chainloaded from NOLO in qemu or on a real N900. It does very little hardware config because NOLO has already configured the board. Only needed is enabling internal eMMC memory via twl4030 regulator which is not enabled by NOLO. [snip] +/* + * Routine: save_boot_params (called after reset from start.S) + * Description: Save atag address and attached kernel address. + * Move u-boot to address CONFIG_SYS_TEXT_BASE + */ +asm( +startaddr:\n /* address where should be u-boot after relocation */ Please put this into its own .S file so it's more readable, thanks. Ok. I will put it into board/nokia/rx51/rx51.S [snip] +/* + * High Level Configuration Options + */ + +#define CONFIG_ARMV7 /* This is an ARM V7 CPU core */ This isn't used. +#define CONFIG_L2_OFF /* kernel won't boot if l2 enabled */ This isn't correct for disabling L2 now and doesn't do anything. So L2 is probably enabled :) and #define CONFIG_SYS_L2CACHE_OFF is correct? [snip] +/* DDR - I use Micron DDR */ +#define CONFIG_OMAP3_MICRON_DDR No you don't :) This can go away. ok, deleted. [snip] +#ifdef CONFIG_USE_IRQ +#define CONFIG_STACKSIZE_IRQ (4 10) /* IRQ stack 4 KiB */ +#define CONFIG_STACKSIZE_FIQ (4 10) /* FIQ stack 4 KiB */ +#endif We just removed all of these from other config files. deleted too. +/*--- + * Physical Memory Map + */ +#define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */ +#define PHYS_SDRAM_1 OMAP34XX_SDRC_CS0 +#define PHYS_SDRAM_2 OMAP34XX_SDRC_CS1 + +/* SDRAM Bank Allocation method */ +#define SDRC_R_B_C 1 And I'm not sure if any of these are really needed now. When I deleted this code, I cannot compile U-Boot. Here is error message: include/asm/u-boot.h:48:17: error: ‘CONFIG_NR_DRAM_BANKS’ undeclared here (not in a function) So this code is needed. Thanks. -- Pali Rohár pali.ro...@gmail.com signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 13/15] New board support: Nokia RX-51 aka N900
On Tue, Jan 10, 2012 at 6:14 AM, Pali Rohár pali.ro...@gmail.com wrote: On Tuesday 03 January 2012 09:05:17 Tom Rini wrote: On Sun, Dec 18, 2011 at 2:34 PM, Pali Rohár pali.ro...@gmail.com wrote: This board definition results in a u-boot.bin which can be chainloaded from NOLO in qemu or on a real N900. It does very little hardware config because NOLO has already configured the board. Only needed is enabling internal eMMC memory via twl4030 regulator which is not enabled by NOLO. [snip] [snip] +/* + * High Level Configuration Options + */ + +#define CONFIG_ARMV7 /* This is an ARM V7 CPU core */ This isn't used. +#define CONFIG_L2_OFF /* kernel won't boot if l2 enabled */ This isn't correct for disabling L2 now and doesn't do anything. So L2 is probably enabled :) and #define CONFIG_SYS_L2CACHE_OFF is correct? Yes. [snip] +/*--- + * Physical Memory Map + */ +#define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */ +#define PHYS_SDRAM_1 OMAP34XX_SDRC_CS0 +#define PHYS_SDRAM_2 OMAP34XX_SDRC_CS1 + +/* SDRAM Bank Allocation method */ +#define SDRC_R_B_C 1 And I'm not sure if any of these are really needed now. When I deleted this code, I cannot compile U-Boot. Here is error message: include/asm/u-boot.h:48:17: error: ‘CONFIG_NR_DRAM_BANKS’ undeclared here (not in a function) I just meant the SDRC_R_B_C part, sorry. -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3] add nand spl boot for qi_lb60 board
Signed-off-by: Xiangfu Liu xian...@openmobilefree.net --- Changes for v2: -Add CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST -Cleanup jz4740_nand.c a little Changes for v3: -Remove CONFIG_NAND_SPL_TEXT_BASE, fix the wrong TEXT base under SPL u-boot.lds -Remove overcomplicated 'dd', pad to 32KB SPL instead of 256. comments added in Makefile -Cleanup the qi_lb60.h arch/mips/cpu/xburst/cpu.c |4 + arch/mips/cpu/xburst/start_spl.S | 65 + drivers/mtd/nand/jz4740_nand.c | 40 - include/configs/qi_lb60.h| 166 -- nand_spl/board/qi/qi_lb60/Makefile | 124 + nand_spl/board/qi/qi_lb60/nand_spl.c | 37 nand_spl/board/qi/qi_lb60/u-boot.lds | 62 + 7 files changed, 407 insertions(+), 91 deletions(-) create mode 100644 arch/mips/cpu/xburst/start_spl.S create mode 100644 nand_spl/board/qi/qi_lb60/Makefile create mode 100644 nand_spl/board/qi/qi_lb60/nand_spl.c create mode 100644 nand_spl/board/qi/qi_lb60/u-boot.lds diff --git a/arch/mips/cpu/xburst/cpu.c b/arch/mips/cpu/xburst/cpu.c index e976341..afd166c 100644 --- a/arch/mips/cpu/xburst/cpu.c +++ b/arch/mips/cpu/xburst/cpu.c @@ -42,6 +42,8 @@ : \ : i (op), R (*(unsigned char *)(addr))) +#ifndef CONFIG_NAND_SPL + void __attribute__((weak)) _machine_restart(void) { struct jz4740_wdt *wdt = (struct jz4740_wdt *)JZ4740_WDT_BASE; @@ -109,6 +111,8 @@ void invalidate_dcache_range(ulong start_addr, ulong stop) cache_op(Hit_Invalidate_D, addr); } +#endif + void flush_icache_all(void) { u32 addr, t = 0; diff --git a/arch/mips/cpu/xburst/start_spl.S b/arch/mips/cpu/xburst/start_spl.S new file mode 100644 index 000..f137ccd --- /dev/null +++ b/arch/mips/cpu/xburst/start_spl.S @@ -0,0 +1,65 @@ +/* + * Startup Code for MIPS32 XBURST CPU-core + * + * Copyright (c) 2010 Xiangfu Liu xian...@sharism.cc + * + * 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 3 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 +#include asm/regdef.h +#include asm/mipsregs.h +#include asm/addrspace.h +#include asm/cacheops.h + +#include asm/jz4740.h + + .set noreorder + + .globl _start + .text +_start: + .word JZ4740_NANDBOOT_CFG /* fetched during NAND Boot */ +reset: + /* +* STATUS register +* CU0=UM=EXL=IE=0, BEV=ERL=1, IP2~7=1 +*/ + li t0, 0x0040FC04 + mtc0t0, CP0_STATUS + /* +* CAUSE register +* IV=1, use the specical interrupt vector (0x200) +*/ + li t1, 0x0080 + mtc0t1, CP0_CAUSE + + bal 1f +nop + .word _GLOBAL_OFFSET_TABLE_ +1: + movegp, ra + lw t1, 0(ra) + movegp, t1 + + la sp, 0x80004000 + la t9, nand_spl_boot + j t9 +nop diff --git a/drivers/mtd/nand/jz4740_nand.c b/drivers/mtd/nand/jz4740_nand.c index 3ec34f3..7ef07a5 100644 --- a/drivers/mtd/nand/jz4740_nand.c +++ b/drivers/mtd/nand/jz4740_nand.c @@ -15,6 +15,10 @@ #include asm/io.h #include asm/jz4740.h +#ifdef CONFIG_NAND_SPL + #define printf(arg...) do {} while (0) +#endif + #define JZ_NAND_DATA_ADDR ((void __iomem *)0xB800) #define JZ_NAND_CMD_ADDR (JZ_NAND_DATA_ADDR + 0x8000) #define JZ_NAND_ADDR_ADDR (JZ_NAND_DATA_ADDR + 0x1) @@ -176,7 +180,7 @@ static int jz_nand_rs_correct_data(struct mtd_info *mtd, u_char *dat, for (k = 0; k 9; k++) writeb(read_ecc[k], emc-nfpar[k]); } - /* Set PRDY */ + writel(readl(emc-nfecr) | EMC_NFECR_PRDY, emc-nfecr); /* Wait for completion */ @@ -184,7 +188,7 @@ static int jz_nand_rs_correct_data(struct mtd_info *mtd, u_char *dat, status = readl(emc-nfints); } while (!(status EMC_NFINTS_DECF)); - /* disable ecc */ + /* Disable ECC */ writel(readl(emc-nfecr) ~EMC_NFECR_ECCE, emc-nfecr); /* Check decoding */ @@ -192,7 +196,7 @@ static int jz_nand_rs_correct_data(struct mtd_info *mtd, u_char *dat, return 0; if (status
Re: [U-Boot] [PATCH v2] add nand spl boot for qi_lb60 board
Hi Scott thanks for your comments. PATCH v3 have sent out for you to review. On 01/07/2012 06:36 AM, Scott Wood wrote: We are transitioning from nand_spl/ to spl/. Please try to work within the new infrastructure. You may run into problems with size in spl/, due to gc-sections not removing strings on components you don't need -- I plan to fix those issues (for NAND), hopefully this merge window, by requiring all files to be explicitly asked for. Feel free to fix them first if you'd like. :-) I'd like to move the new spl/. I have one question about the new spl/ I didn't see the new spl/ link to nand_spl/nand_boot.c. so how the new spl/ using nand_boot()? can we add a new define 'CONFIG_SPL_START_S_NAME', since qi_lb60 using start_spl.S for SPL, not start.S. I think better I make the nand_spl/ working. then move to the new spl/ :) +include $(TOPDIR)/config.mk + +LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds +LDFLAGS= -Bstatic -T $(LDSCRIPT) -Ttext $(CONFIG_NAND_SPL_TEXT_BASE) +AFLAGS += -DCONFIG_NAND_SPL +CFLAGS += -DCONFIG_NAND_SPL -O2 Why -O2 and not the -Os that you should already be inheriting from config.mk? when I remove the -O2. it give me error: jz4740.c:(.text.sdram_init+0x14): undefined reference to `memcpy' so I keep the -O2 there. please anyone give me some advice on how to fix this. that will be great. thanks again xiangfu ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/4] ehci-omap: Clean up added ehci-omap.c
From: Govindraj.R govindraj.r...@ti.com Clean up added ehci-omap.c and make it generic for re-use across soc having same ehci ip block. Also pass the modes to be configured and configure the ports accordingly. All usb layers are not cache aligned till then keep cache off for usb ops as ehci will use internally dma for all usb ops. * Add a generic common header ehci-omap.h having common ip block data and reg shifts. * Rename and modify ehci-omap3 to ehci.h retain only conflicting sysc reg shifts remove others and move to common header file. Don't reimplement the ulpi stuff ... there's already some ulpi stuff in uboot that needs fixing, so fix it and use it. Signed-off-by: Govindraj.R govindraj.r...@ti.com --- arch/arm/include/asm/arch-omap3/ehci.h | 55 ++ arch/arm/include/asm/arch-omap3/ehci_omap3.h | 58 --- arch/arm/include/asm/arch-omap4/ehci.h | 49 ++ arch/arm/include/asm/ehci-omap.h | 147 + drivers/usb/host/ehci-omap.c | 228 +++--- 5 files changed, 423 insertions(+), 114 deletions(-) create mode 100644 arch/arm/include/asm/arch-omap3/ehci.h delete mode 100644 arch/arm/include/asm/arch-omap3/ehci_omap3.h create mode 100644 arch/arm/include/asm/arch-omap4/ehci.h create mode 100644 arch/arm/include/asm/ehci-omap.h diff --git a/arch/arm/include/asm/arch-omap3/ehci.h b/arch/arm/include/asm/arch-omap3/ehci.h new file mode 100644 index 000..d622363 --- /dev/null +++ b/arch/arm/include/asm/arch-omap3/ehci.h @@ -0,0 +1,55 @@ +/* + * (C) Copyright 2011 + * Alexander Holler hol...@ahsoftware.de + * + * Based on drivers/usb/host/ehci-omap.c from Linux 2.6.37 + * + * See there for additional Copyrights. + * + * 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 _EHCI_H_ +#define _EHCI_H_ + +/* USB/EHCI registers */ +#define OMAP_USBTLL_BASE 0x48062000UL +#define OMAP_UHH_BASE0x48064000UL +#define OMAP_EHCI_BASE 0x48064800UL + +/* TLL Register Set */ +#define OMAP_USBTLL_SYSCONFIG_SOFTRESET (1 1) +#define OMAP_USBTLL_SYSCONFIG_ENAWAKEUP (1 2) +#define OMAP_USBTLL_SYSCONFIG_SIDLEMODE (1 3) +#define OMAP_USBTLL_SYSCONFIG_CACTIVITY (1 8) +#define OMAP_USBTLL_SYSSTATUS_RESETDONE 1 + +/* UHH Register Set */ +#define OMAP_UHH_SYSCONFIG_SOFTRESET (1 1) +#define OMAP_UHH_SYSCONFIG_CACTIVITY (1 8) +#define OMAP_UHH_SYSCONFIG_SIDLEMODE (1 3) +#define OMAP_UHH_SYSCONFIG_ENAWAKEUP (1 2) +#define OMAP_UHH_SYSCONFIG_MIDLEMODE (1 12) +#define OMAP_UHH_SYSSTATUS_EHCI_RESETDONE(1 2) + +#define OMAP_UHH_SYSCONFIG_VAL (OMAP_UHH_SYSCONFIG_CACTIVITY | \ + OMAP_UHH_SYSCONFIG_SIDLEMODE | \ + OMAP_UHH_SYSCONFIG_ENAWAKEUP | \ + OMAP_UHH_SYSCONFIG_MIDLEMODE) + +#endif /* _EHCI_H_ */ diff --git a/arch/arm/include/asm/arch-omap3/ehci_omap3.h b/arch/arm/include/asm/arch-omap3/ehci_omap3.h deleted file mode 100644 index cd01f50..000 --- a/arch/arm/include/asm/arch-omap3/ehci_omap3.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * (C) Copyright 2011 - * Alexander Holler hol...@ahsoftware.de - * - * Based on drivers/usb/host/ehci-omap.c from Linux 2.6.37 - * - * See there for additional Copyrights. - * - * 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 - *
Re: [U-Boot] [PATCH 2/8] powerpc/env: Correct the compilation errors when defined CONFIG_ENV_IS_NOWHERE
On Tue, Jan 10, 2012 at 5:42 AM, Liu Gang gang@freescale.com wrote: There will be a confict if defined CONFIG_ENV_IS_NOWHERE and CONFIG_ENV_IS_IN_FLASH. This doesn't make any sense. How can the environment be nowhere *and* also in flash, at the same time? -- Timur Tabi Linux kernel developer at Freescale ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 5/8] powerpc/boot: Slave module for boot from SRIO
On Tue, Jan 10, 2012 at 5:42 AM, Liu Gang gang@freescale.com wrote: +#define CONFIG_SYS_QE_FMAN_FW_IN_REMOTE +#define CONFIG_SYS_QE_FMAN_FW_ADDR 0 Where is CONFIG_SYS_QE_FMAN_FW_IN_REMOTE documented? And where is the code that uses it? -- Timur Tabi Linux kernel developer at Freescale ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 6/8] powerpc/boot: Slave uploads ucode when boot from SRIO
On Tue, Jan 10, 2012 at 5:42 AM, Liu Gang gang@freescale.com wrote: When boot from SRIO, slave's ucode can be stored in master's memory space, then slave can fetch the ucode image through SRIO interface. What kind of ucode is this? Fman or QE? + + /* configure inbound window for slave's ucode */ + printf(SRIOBOOT - MASTER: Inbound window for slave's ucode; + Local = 0x%llx, Srio = 0x%llx, Size = 0x%x\n, + (u64)CONFIG_SRIOBOOT_SLAVE_UCODE_LAW_PHYS, + (u64)CONFIG_SRIOBOOT_SLAVE_UCODE_SRIO_PHYS, + CONFIG_SRIOBOOT_SLAVE_UCODE_SIZE); + out_be32((u32)srio-riwtar3 + CONFIG_SRIOBOOT_MASTER_PORT * 0x200, These should be (void *) instead of (u32). -- Timur Tabi Linux kernel developer at Freescale ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] sdhc_boot: Introduce CONFIG_FSL_FIXED_MMC_LOCATION option
Andy, Any comment about this patch? Without this patch we get corrupted SD cards after trying to store env vars on several i.MX boards. Regards, Fabio Estevam On Thu, Dec 29, 2011 at 9:54 AM, Fabio Estevam feste...@gmail.com wrote: Kumar/Andy, On Thu, Dec 29, 2011 at 7:47 AM, Stefano Babic sba...@denx.de wrote: On 20/12/2011 17:33, Fabio Estevam wrote: Since commit 97039ab98 (env_mmc: Allow board code to override the environment address) mmc_get_env_addr is a weak-aliased function in common/env_mmc.c The mmc_get_env_addr implementation that exists at board/freescale/common/sdhc_boot.c is meant to be used only for PowerPC boards, but currently it is being used for all platforms that have CONFIG_ENV_IS_IN_MMC defined. Introduce CONFIG_FSL_FIXED_MMC_LOCATION so that the boards that need to use the mmc_get_env_addr version from board/freescale/common/sdhc_boot.c could activate this config option on their board file. This fixes the retrieval of CONFIG_ENV_OFFSET on non-PowerPC boards. Signed-off-by: Fabio Estevam fabio.este...@freescale.com Acked-by: Stefano Babic sba...@denx.de Are you guys OK with this? Regards, Fabio Estevam ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 07/14] tegra: Add PMU to manage power supplies
On 12/26/2011 12:33 PM, Simon Glass wrote: From: Jimmy Zhang jimmzh...@nvidia.com Power supplies must be adjusted in line with clock frequency. This code provides a simple routine to set the voltage to allow operation at maximum frequency. Signed-off-by: Simon Glass s...@chromium.org --- arch/arm/cpu/armv7/tegra2/Makefile |1 + arch/arm/cpu/armv7/tegra2/pmu.c| 355 arch/arm/include/asm/arch-tegra2/pmu.h | 63 ++ 3 files changed, 419 insertions(+), 0 deletions(-) create mode 100644 arch/arm/cpu/armv7/tegra2/pmu.c create mode 100644 arch/arm/include/asm/arch-tegra2/pmu.h This driver appears to be for an I2C-based device, so I assume it'd for a particular PMIC not Tegra's PMC HW module. I imagine this is a driver for the TI TPS6586X, right? As such, naming this pmu and putting it into the Tegra directory doesn't make sense. There should be a generic TPS6586X driver, and possibly a separate file and patch to implement the use of that chip in conjunction with Tegra. -- nvpublic ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 08/14] tegra: Set up PMU for Nvidia boards
On 12/26/2011 12:33 PM, Simon Glass wrote: Adjust PMU to permit maximum frequency operation. ... diff --git a/board/nvidia/common/board.c b/board/nvidia/common/board.c ... +#ifdef CONFIG_TEGRA2_I2C + i2c_init_board(); + +#ifdef CONFIG_TEGRA_PMU + pmu_set_nominal(); +#endif +#endif + return 0; } I think there's some patch confusion here; weren't the outer ifdef and call to i2c_init_board() added in the I2C patch series too? -- nvpublic ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 5/9] sandbox: sort header files in os.c
On Monday 09 January 2012 17:25:15 Simon Glass wrote: --- a/arch/sandbox/cpu/os.c +++ b/arch/sandbox/cpu/os.c +#include errno.h #include fcntl.h +#include os.h #include stdlib.h #include termios.h -#include unistd.h #include time.h -#include errno.h -#include sys/types.h -#include sys/stat.h +#include unistd.h #include sys/mman.h +#include sys/stat.h +#include sys/types.h #include linux/types.h -#include os.h this is a u-boot header, so it should be last :) the rest look good now -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] add nand spl boot for qi_lb60 board
On 01/10/2012 09:13 AM, Xiangfu Liu wrote: Hi Scott thanks for your comments. PATCH v3 have sent out for you to review. On 01/07/2012 06:36 AM, Scott Wood wrote: We are transitioning from nand_spl/ to spl/. Please try to work within the new infrastructure. You may run into problems with size in spl/, due to gc-sections not removing strings on components you don't need -- I plan to fix those issues (for NAND), hopefully this merge window, by requiring all files to be explicitly asked for. Feel free to fix them first if you'd like. :-) I'd like to move the new spl/. I have one question about the new spl/ I didn't see the new spl/ link to nand_spl/nand_boot.c. so how the new spl/ using nand_boot()? It's been moved to drivers/mtd/nand/nand_spl_simple.c and drivers/mtd/nand/nand_spl_load.c. can we add a new define 'CONFIG_SPL_START_S_NAME', since qi_lb60 using start_spl.S for SPL, not start.S. Heh, that didn't take long: http://permalink.gmane.org/gmane.comp.boot-loaders.u-boot/108574 Or, could we just leave start.o up to the arch Makefile, and just make sure the arch library is linked in first? I think better I make the nand_spl/ working. then move to the new spl/ :) +include $(TOPDIR)/config.mk + +LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds +LDFLAGS= -Bstatic -T $(LDSCRIPT) -Ttext $(CONFIG_NAND_SPL_TEXT_BASE) +AFLAGS+= -DCONFIG_NAND_SPL +CFLAGS+= -DCONFIG_NAND_SPL -O2 Why -O2 and not the -Os that you should already be inheriting from config.mk? when I remove the -O2. it give me error: jz4740.c:(.text.sdram_init+0x14): undefined reference to `memcpy' so I keep the -O2 there. please anyone give me some advice on how to fix this. that will be great. GCC requires memcpy even in freestanding environments. Can you fit a minimal memcpy in, such as what's currently bcopy in lib/string.c? -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] da850evm: drop NET_MULTI reference
Acked-by: Mike Frysinger vap...@gentoo.org -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/2 V2] arm926: Flush the data cache before disabling it.
The current implementation invalidates the cache instead of flushing it. This causes problems on platforms where the spl/u-boot is already loaded to the RAM, with caches enabled by a first stage bootloader. The V bit of the cp15's control register c1 is set to the value of VINITHI on reset. Do not clear this bit by default, as there are SOC's with no valid memory region at 0x0. Signed-off-by: Sughosh Ganu urwithsugh...@gmail.com Cc: Albert Aribaud albert.u.b...@aribaud.net --- Changes since V1 * Added arm926 keyword to the subject line * Removed the superfluous setting of r0. * Fixed the comment to reflect the fact that V is not being cleared arch/arm/cpu/arm926ejs/start.S |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/start.S b/arch/arm/cpu/arm926ejs/start.S index 6a09c02..6e261c2 100644 --- a/arch/arm/cpu/arm926ejs/start.S +++ b/arch/arm/cpu/arm926ejs/start.S @@ -355,17 +355,20 @@ _dynsym_start_ofs: */ cpu_init_crit: /* -* flush v4 I/D caches +* flush D cache before disabling it */ mov r0, #0 - mcr p15, 0, r0, c7, c7, 0 /* flush v3/v4 cache */ +flush_dcache: + mrc p15, 0, r15, c7, c10, 3 + bne flush_dcache + mcr p15, 0, r0, c8, c7, 0 /* flush v4 TLB */ /* * disable MMU stuff and caches */ mrc p15, 0, r0, c1, c0, 0 - bic r0, r0, #0x2300 /* clear bits 13, 9:8 (--V- --RS) */ + bic r0, r0, #0x0300 /* clear bits 9:8 ( --RS) */ bic r0, r0, #0x0087 /* clear bits 7, 2:0 (B--- -CAM) */ orr r0, r0, #0x0002 /* set bit 2 (A) Align */ orr r0, r0, #0x1000 /* set bit 12 (I) I-Cache */ -- 1.7.5.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/2 V2] Changes to move hawkboard to the new spl infrastructure.
This patch moves hawkboard to the new spl infrastructure from the older nand_spl one. Removed the hawkboard_nand_config build option -- The spl code now gets compiled with hawkboard_config, after building the main u-boot image, using the CONFIG_SPL_TEXT_BASE. Modified the README.hawkboard to reflect the same. Signed-off-by: Sughosh Ganu urwithsugh...@gmail.com Cc: Heiko Schocher h...@denx.de Cc: Christian Riesch christian.rie...@omicron.at Cc: Sudhakar Rajashekhara sudhakar@ti.com Cc: Tom Rini tr...@ti.com --- Changes since V1 * Use a common file instead of board specific files for spl, based on review comments from Christian and Heiko. arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c| 14 +- arch/arm/cpu/arm926ejs/davinci/spl.c |4 +- arch/arm/include/asm/arch-davinci/da850_lowlevel.h |9 + board/davinci/da8xxevm/hawkboard.c | 23 +++ board/davinci/da8xxevm/hawkboard_nand_spl.c| 115 --- .../{u-boot-spl.lds = u-boot-spl-da850evm.lds}|0 .../davinci/da8xxevm/u-boot-spl-hawk.lds | 22 ++- boards.cfg |1 - doc/README.hawkboard | 43 +++--- include/configs/cam_enc_4xx.h |1 + include/configs/da850evm.h |3 +- include/configs/hawkboard.h| 24 +++- nand_spl/board/davinci/da8xxevm/Makefile | 155 13 files changed, 100 insertions(+), 314 deletions(-) delete mode 100644 board/davinci/da8xxevm/hawkboard_nand_spl.c rename board/davinci/da8xxevm/{u-boot-spl.lds = u-boot-spl-da850evm.lds} (100%) rename nand_spl/board/davinci/da8xxevm/u-boot.lds = board/davinci/da8xxevm/u-boot-spl-hawk.lds (86%) delete mode 100644 nand_spl/board/davinci/da8xxevm/Makefile diff --git a/arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c b/arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c index a532f8a..a4778b8 100644 --- a/arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c +++ b/arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c @@ -32,6 +32,7 @@ #include asm/arch/emif_defs.h #include asm/arch/pll_defs.h +#if !defined(CONFIG_MACH_DAVINCI_HAWK) void da850_waitloop(unsigned long loopcnt) { unsigned long i; @@ -235,6 +236,7 @@ int da850_ddr_setup(void) return 0; } +#endif /* CONFIG_MACH_DAVINCI_HAWK */ __attribute__((weak)) void board_gpio_init(void) @@ -242,10 +244,6 @@ void board_gpio_init(void) return; } -/* pinmux_resource[] vector is defined in the board specific file */ -extern const struct pinmux_resource pinmuxes[]; -extern const int pinmuxes_size; - int arch_cpu_init(void) { /* Unlock kick registers */ @@ -259,6 +257,7 @@ int arch_cpu_init(void) if (davinci_configure_pin_mux_items(pinmuxes, pinmuxes_size)) return 1; +#if defined(CONFIG_MACH_DAVINCI_DA850_EVM) /* PLL setup */ da850_pll_init(davinci_pllc0_regs, CONFIG_SYS_DA850_PLL0_PLLM); da850_pll_init(davinci_pllc1_regs, CONFIG_SYS_DA850_PLL1_PLLM); @@ -275,6 +274,12 @@ int arch_cpu_init(void) #endif lpsc_on(CONFIG_SYS_DA850_LPSC_UART); + + da850_ddr_setup(); +#elif defined(CONFIG_MACH_DAVINCI_HAWK) + da8xx_configure_lpsc_items(lpsc, lpsc_size); +#endif + NS16550_init((NS16550_t)(CONFIG_SYS_NS16550_COM1), CONFIG_SYS_NS16550_CLK / 16 / CONFIG_BAUDRATE); @@ -286,6 +291,5 @@ int arch_cpu_init(void) DAVINCI_UART_PWREMU_MGMT_UTRST), davinci_uart2_ctrl_regs-pwremu_mgmt); - da850_ddr_setup(); return 0; } diff --git a/arch/arm/cpu/arm926ejs/davinci/spl.c b/arch/arm/cpu/arm926ejs/davinci/spl.c index f475f9b..74632e5 100644 --- a/arch/arm/cpu/arm926ejs/davinci/spl.c +++ b/arch/arm/cpu/arm926ejs/davinci/spl.c @@ -74,12 +74,12 @@ void board_init_f(ulong dummy) void board_init_r(gd_t *id, ulong dummy) { -#ifdef CONFIG_SOC_DM365 +#ifdef CONFIG_SPL_NAND_LOAD nand_init(); puts(Nand boot...\n); nand_boot(); #endif -#ifdef CONFIG_SOC_DA8XX +#ifdef CONFIG_SPL_SPI_LOAD mem_malloc_init(CONFIG_SYS_TEXT_BASE - CONFIG_SYS_MALLOC_LEN, CONFIG_SYS_MALLOC_LEN); diff --git a/arch/arm/include/asm/arch-davinci/da850_lowlevel.h b/arch/arm/include/asm/arch-davinci/da850_lowlevel.h index e489c47..11ed91d 100644 --- a/arch/arm/include/asm/arch-davinci/da850_lowlevel.h +++ b/arch/arm/include/asm/arch-davinci/da850_lowlevel.h @@ -24,6 +24,15 @@ #ifndef __DA850_LOWLEVEL_H #define __DA850_LOWLEVEL_H +#include asm/arch/pinmux_defs.h + +/* pinmux_resource[] vector is defined in the board specific file */ +extern const struct pinmux_resource pinmuxes[]; +extern const int pinmuxes_size; + +extern const struct lpsc_resource lpsc[]; +extern const int lpsc_size; + /* NOR Boot Configuration Word Field Descriptions */ #define DA850_NORBOOT_COPY_XK(X) ((X - 1) 8) #define
Re: [U-Boot] [PATCH] NAND: Allow nand_ids and nand_bbt to be compiled in SPL
On Monday 09 January 2012 16:27:44 Scott Wood wrote: On 01/09/2012 03:21 PM, Mike Frysinger wrote: On Monday 09 January 2012 14:41:07 Scott Wood wrote: Unless/until the toolchain can properly GC anonymous strings, I think finer-grained conditional compilation is the way to go. i think we should use GC when it works (we've found 1 case so far where it doesn't), and add fine grained compilation when it doesn't (with a note with expected working versions). Anonymous strings are hardly a rare occurance. it isn't all anonymous strings. there's something more going on here that is tickling the bug. -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] NAND: Allow nand_ids and nand_bbt to be compiled in SPL
On Monday 09 January 2012 16:25:41 Tom Rini wrote: On Mon, Jan 9, 2012 at 2:23 PM, Tom Rini tom.r...@gmail.com wrote: On Mon, Jan 9, 2012 at 2:21 PM, Mike Frysinger vap...@gentoo.org wrote: On Monday 09 January 2012 14:41:07 Scott Wood wrote: Unless/until the toolchain can properly GC anonymous strings, I think finer-grained conditional compilation is the way to go. i think we should use GC when it works (we've found 1 case so far where it doesn't), and add fine grained compilation when it doesn't (with a note with expected working versions). i think this is a bug in the linker and have been trying to make a reduced test case that i can post to the GNU binutils peeps. We've found two cases, at least. Functions aren't being dropped out either. To be clear, https://github.com/trini/u-boot/commit/3a7c313125eff000ac73e38d220e5f9615c 1abbe shows switching everything to the normal nand codebase, but with a gain of only 170 bytes. The reason it's such an otherwise small delta is that I added some #ifndef CONFIG_SPL_BUILD to drop out unused code that the linker should have been dropping for us, but wasn't. how exactly do i reproduce the issue ? what do i `make xxx` ? -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 09/14] tegra: Add warmboot implementation
On 12/26/2011 12:33 PM, Simon Glass wrote: From: Yen Lin ye...@nvidia.com Add code to set up the warm boot area in the Tegra CPU ready for a resume after suspend. Signed-off-by: Simon Glass s...@chromium.org How come Yen's S-o-b line is missing here? As a general comment on this patch, it contains a lot of structure definitions and defines that should really be part of the clock module's headers and similar; why not just included the clock headers and place all the definitions in those headers if they aren't already there? There's also some amount of code duplication; e.g. wasn't get_major_version() part of another patch you recently posted that implements APIs to return SKU IDs etc? If not, it seems like it belongs there. Only warmboot_avp.c appears to run on the AVP, so I don't think needing ARMv4 compile flags is an argument for not putting this code in a more logical place. diff --git a/arch/arm/cpu/armv7/tegra2/Makefile b/arch/arm/cpu/armv7/tegra2/Makefile ... -SOBJS := lowlevel_init.o +SOBJS-y:= lowlevel_init.o ... +SOBJS := $(SOBJS-y) That's really a separate patch, but I guess it's fine. diff --git a/arch/arm/cpu/armv7/tegra2/warmboot.c b/arch/arm/cpu/armv7/tegra2/warmboot.c ... +#define BCT_OFFSET 0x100 /* BCT starts at 0x100 */ +#define BCT_SDRAM_PARAMS_OFFSET(BCT_OFFSET + 0x88) +#define SDRAM_PARAMS_BASE (AP20_BASE_PA_SRAM + BCT_SDRAM_PARAMS_OFFSET) BCT_OFFSET is where the BCT is stored within some warmboot-specific memory location. I think the comment should be explicit about this, because IIRC the BCT starts at offset 0 within the (cold) boot flash memory, so the comment is confusing until you trace through the code and find what SDRAM_PARAMS_BASE is used for. +/* + * NOTE: If more than one of the following is enabled, only one of them will + * actually be used. RANDOM takes precedence over PATTERN and ZERO, and + * PATTERN takes precedence overy ZERO. + * + * RANDOM_AES_BLOCK_IS_PATTERN is to define a 32-bit PATTERN. + */ +#define RANDOM_AES_BLOCK_IS_RANDOM /* to randomize the header */ +#undef RANDOM_AES_BLOCK_IS_PATTERN /* to patternize the header */ +#undef RANDOM_AES_BLOCK_IS_ZERO/* to clear the header */ Why not just used ifdefs to make sure that only (and exactly) one of these is defined? +/* Currently, this routine returns a 32-bit all 0 seed. */ +static u32 query_random_seed(void) +{ + return 0; +} So the random option isn't really implemented at all. Perhaps just remove it completely; if someone wants it, they have to implement this function for it to be useful anyway, so adding the call to the function at the same time seems reasonable enough? If not, at least make this print something at run-time so it's obvious it isn't really working. +int warmboot_prepare_code(u32 seg_address, u32 seg_length) ... + /* +* The region specified by seg_address must not be in IRAM and must be +* nonzero in length. +*/ + if ((seg_length == 0) || (seg_address == 0) || + (seg_address = AP20_BASE_PA_SRAM)) { + err = -EFAULT; + goto fail; + } The IRAM check only validates that the address isn't at, within, or after the IRAM location, which doesn't exactly match the comment. If the restriction is within IRAM, the end address needs to be checked too. Isn't the real restriction that the address needs to be within SDRAM though? If so, it seems better to check that directly. ... + /* Populate the random_aes_block as requested. */ + { + u32 *aes_block = (u32 *)(dst_header-random_aes_block); + u32 *end = (u32 *)(((u32)aes_block) + + sizeof(dst_header-random_aes_block)); + + do { +#if defined(RANDOM_AES_BLOCK_IS_RANDOM) + *aes_block++ = query_random_seed(); +#elif defined(RANDOM_AES_BLOCK_IS_PATTERN) + *aes_block++ = RANDOM_AES_BLOCK_IS_PATTERN; +#elif defined(RANDOM_AES_BLOCK_IS_ZERO) + *aes_block++ = 0; +#else + printf(None of RANDOM_AES_BLOCK_IS_XXX is defined; ); + printf(Default to pattern 0.\n); + *aes_block++ = 0; +#endif Why not issue a compile error so the person who configured U-Boot is immediately aware of the problem, instead of delaying the issue to run-time? + } while (aes_block end); + } diff --git a/arch/arm/cpu/armv7/tegra2/warmboot_avp.c b/arch/arm/cpu/armv7/tegra2/warmboot_avp.c ... +void wb_start(void) +{ + struct pmux_tri_ctlr *pmt = (struct pmux_tri_ctlr *)NV_PA_APB_MISC_BASE; + struct pmc_ctlr *pmc = (struct pmc_ctlr *)TEGRA2_PMC_BASE; + struct flow_ctlr *flow = (struct flow_ctlr *)NV_PA_FLOW_BASE; + struct clk_rst_ctlr *clkrst = + (struct
Re: [U-Boot] [PATCH] NAND: Allow nand_ids and nand_bbt to be compiled in SPL
On Tue, Jan 10, 2012 at 11:25 AM, Mike Frysinger vap...@gentoo.org wrote: On Monday 09 January 2012 16:25:41 Tom Rini wrote: On Mon, Jan 9, 2012 at 2:23 PM, Tom Rini tom.r...@gmail.com wrote: On Mon, Jan 9, 2012 at 2:21 PM, Mike Frysinger vap...@gentoo.org wrote: On Monday 09 January 2012 14:41:07 Scott Wood wrote: Unless/until the toolchain can properly GC anonymous strings, I think finer-grained conditional compilation is the way to go. i think we should use GC when it works (we've found 1 case so far where it doesn't), and add fine grained compilation when it doesn't (with a note with expected working versions). i think this is a bug in the linker and have been trying to make a reduced test case that i can post to the GNU binutils peeps. We've found two cases, at least. Functions aren't being dropped out either. To be clear, https://github.com/trini/u-boot/commit/3a7c313125eff000ac73e38d220e5f9615c 1abbe shows switching everything to the normal nand codebase, but with a gain of only 170 bytes. The reason it's such an otherwise small delta is that I added some #ifndef CONFIG_SPL_BUILD to drop out unused code that the linker should have been dropping for us, but wasn't. how exactly do i reproduce the issue ? what do i `make xxx` ? On that tree, build for devkit8000. -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 12/14] tegra: Set vdd_core and vdd_cpu to high
On 12/26/2011 12:33 PM, Simon Glass wrote: From: Jimmy Zhang jimmzh...@nvidia.com At cold boot, the default voltage supplied by pmu is not high enough to support emc to run at its highest clock frequency. The code added here is to update the default vdd_core and vdd_cpu to higher values. (Sorry if I have mangled this comment) ?? Remove that last line? I thought this issue only affected the T25 SKU when coupled with a particular voltage regulator that wasn't reprogrammed to explicitly support T25. Hence, shouldn't this code only be enabled for specific boards? diff --git a/board/nvidia/common/board.c b/board/nvidia/common/board.c ... /* + * Routine: power_det_init + * Description: turn off power detects + */ +static void power_det_init(void) +{ +#if defined(CONFIG_TEGRA2) + struct pmc_ctlr *const pmc = (struct pmc_ctlr *)TEGRA2_PMC_BASE; + + /* turn off power detects */ + writel(0, pmc-pmc_pwr_det_latch); + writel(0, pmc-pmc_pwr_det); +#endif +} I can't tell how that code relates to the commit description. -- nvpublic ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 13/14] tegra: Add EMC settings for Seaboard, Harmony
On 12/26/2011 12:33 PM, Simon Glass wrote: From: Jimmy Zhang jimmzh...@nvidia.com Set Seaboard and Harmony to optimal memory settings based on the SOC in use (T20 or T25). Signed-off-by: Simon Glass s...@chromium.org diff --git a/board/nvidia/common/emc.c b/board/nvidia/common/emc.c ... +static const struct tegra_emc_table seaboard_emc_tables_hynix_333Mhz[] = { ... +static const struct tegra_emc_table seaboard_emc_tables_hynix_380Mhz[] = { ... +void seaboard_emc_init(void) ... +static struct emc_init board_table[] = { + { + .id = MACH_TYPE_HARMONY, + .init = NULL, + }, + { + .id = MACH_TYPE_SEABOARD, + .init = seaboard_emc_init, + }, +}; Why not just put the Seaboard-specific code into Seaboard's board directory instead of a common location? Then you wouldn't need this table at all, and boards other than Seaboard wouldn't be required to carry the Seaboard EMC tables. There don't appear to be any tables for Harmony, which is inconsistent with the commit description. +int board_emc_init(void) +{ + int i; + DECLARE_GLOBAL_DATA_PTR; + +#ifdef CONFIG_TEGRA_PMU + /* if voltage has not been set properly, return */ + if (!pmu_is_voltage_nominal()) + return -1; +#endif Why/when would the PMU voltage not be nominal? Can't we error out the compile if the options that cause the PMU voltage to be initialized to nominal are not set, instead of detecting this at runtime? Finally, I don't think there are EMC tables here for all the EMC frequencies that we have BCTs for. Perhaps that's not an issue, and perhaps I should ignore the other BCTs (e.g. 400MHZ EMC) since nobody actually uses them? -- nvpublic ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/3] m28evk: Remove CONFIG_NET_MULTI option
CONFIG_NET_MULTI is not used anymore, so remove it from board file. Cc: Marek Vasut marek.va...@gmail.com Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- include/configs/m28evk.h |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/include/configs/m28evk.h b/include/configs/m28evk.h index 39c841f..51eb1c1 100644 --- a/include/configs/m28evk.h +++ b/include/configs/m28evk.h @@ -179,7 +179,6 @@ * Ethernet on SOC (FEC) */ #ifdef CONFIG_CMD_NET -#defineCONFIG_NET_MULTI #defineCONFIG_ETHPRIME FEC0 #defineCONFIG_FEC_MXC #defineCONFIG_FEC_MXC_MULTI -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/3] efika0: Remove CONFIG_NET_MULTI option
CONFIG_NET_MULTI is not used anymore, so remove it from board file. Cc: Marek Vasut marek.va...@gmail.com Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- include/configs/efikamx.h |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/include/configs/efikamx.h b/include/configs/efikamx.h index 522487b..e2f0f74 100644 --- a/include/configs/efikamx.h +++ b/include/configs/efikamx.h @@ -206,7 +206,6 @@ /* USB NET */ #ifdef CONFIG_CMD_NET #defineCONFIG_USB_ETHER_ASIX -#defineCONFIG_NET_MULTI #defineCONFIG_CMD_PING #defineCONFIG_CMD_DHCP #endif -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/3] flea3: Remove CONFIG_NET_MULTI option
CONFIG_NET_MULTI is not used anymore, so remove it from board file. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- include/configs/flea3.h |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/include/configs/flea3.h b/include/configs/flea3.h index aac3930..649e272 100644 --- a/include/configs/flea3.h +++ b/include/configs/flea3.h @@ -113,7 +113,6 @@ /* * Ethernet on SOC (FEC) */ -#define CONFIG_NET_MULTI #define CONFIG_FEC_MXC #define IMX_FEC_BASE FEC_BASE_ADDR #define CONFIG_PHYLIB -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 2/3] efika: Remove CONFIG_NET_MULTI option
CONFIG_NET_MULTI is not used anymore, so remove it from board file. Cc: Marek Vasut marek.va...@gmail.com Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- Changes since v1: - Fix typo in board name include/configs/efikamx.h |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/include/configs/efikamx.h b/include/configs/efikamx.h index 522487b..e2f0f74 100644 --- a/include/configs/efikamx.h +++ b/include/configs/efikamx.h @@ -206,7 +206,6 @@ /* USB NET */ #ifdef CONFIG_CMD_NET #defineCONFIG_USB_ETHER_ASIX -#defineCONFIG_NET_MULTI #defineCONFIG_CMD_PING #defineCONFIG_CMD_DHCP #endif -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/2] bootm: Move silencing of linux console to deprecated config option.
If you would like the old behavior of having bootm modify the bootargs to silence the linux console when CONFIG_SILENT_CONSOLE is defined, you now need to define the config CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE. A previous change already added this new config to all known users of CONFIG_SILENT_CONSOLE. Signed-off-by: Doug Anderson diand...@chromium.org --- README |5 ++--- common/cmd_bootm.c | 10 +- doc/README.silent | 13 ++--- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/README b/README index 7916777..9843dd1 100644 --- a/README +++ b/README @@ -606,9 +606,8 @@ The following options need to be configured: environment 'console=serial'. When CONFIG_SILENT_CONSOLE is defined, all console - messages (by U-Boot and Linux!) can be silenced with - the silent environment variable. See - doc/README.silent for more information. + messages can be silenced with the silent environment + variable. See doc/README.silent for more information. - Console Baudrate: CONFIG_BAUDRATE - in bps diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index d5745b1..8d1899e 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -83,8 +83,8 @@ extern flash_info_t flash_info[]; /* info for FLASH chips */ static int do_imls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); #endif -#ifdef CONFIG_SILENT_CONSOLE -static void fixup_silent_linux(void); +#ifdef CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE +static void fixup_silent_linux(void) __attribute__ ((deprecated)); #endif static image_header_t *image_get_kernel(ulong img_addr, int verify); @@ -673,7 +673,7 @@ int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) show_boot_progress(8); -#ifdef CONFIG_SILENT_CONSOLE +#ifdef CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE if (images.os.os == IH_OS_LINUX) fixup_silent_linux(); #endif @@ -1228,7 +1228,7 @@ U_BOOT_CMD( /***/ /* helper routines */ /***/ -#ifdef CONFIG_SILENT_CONSOLE +#ifdef CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE static void fixup_silent_linux(void) { char buf[256], *start, *end; @@ -1259,7 +1259,7 @@ static void fixup_silent_linux(void) setenv(bootargs, buf); debug(after silent fix-up: %s\n, buf); } -#endif /* CONFIG_SILENT_CONSOLE */ +#endif /* CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE */ /***/ diff --git a/doc/README.silent b/doc/README.silent index a26e3df..8b4f892 100644 --- a/doc/README.silent +++ b/doc/README.silent @@ -15,6 +15,13 @@ The following actions are taken if silent is set at boot time: suppressed automatically. Make sure to enable nulldev by #defining CONFIG_SYS_DEVICE_NULLDEV in your board config file. - - When booting a linux kernel, the bootargs are fixed up so that - the argument console= will be in the command line, no matter how - it was set in bootargs before. + +The config option CONFIG_SILENT_CONSOLE previously also caused u-boot +to silence the Linux console (also based on the silent environment +variable) by modifying the bootargs so that the argument console= +would be in the command line no matter how it was set in bootargs +before. That behavior is now relegated to the config option +CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE with the warning that using +the option opens you up to a buffer overrun if your linux bootargs +can be 256 bytes. A non-deprecated solution is to use scripts to +dynamically construct your console= argument. -- 1.7.3.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 0/2] Deprecate Linux bootargs munging with CONFIG_SILENT_CONSOLE.
As discussed previously on the U-Boot mailing list (see comments on Fix fixup_silent_linux() buffer overrun patchset), relying on bootm to mangle the Linux bootargs is not a suggested way to go. We now officially deprecate it and provide a way to avoid it (but still get the other CONFIG_SILENT_CONSOLE behavior). Doug Anderson (2): config: Add CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE bootm: Move silencing of linux console to deprecated config option. README |5 ++--- common/cmd_bootm.c | 10 +- doc/README.silent | 13 ++--- include/configs/KUP4K.h|3 +++ include/configs/KUP4X.h|3 +++ include/configs/QS823.h|1 + include/configs/QS850.h|1 + include/configs/QS860T.h |1 + include/configs/TQM5200.h |3 +++ include/configs/a4m072.h |3 +++ include/configs/bfin_adi_common.h |3 +++ include/configs/cm5200.h |3 +++ include/configs/cpu9260.h |3 +++ include/configs/cpuat91.h |3 +++ include/configs/mcc200.h |3 +++ include/configs/mimc200.h |3 +++ include/configs/omap3_evm_quick_mmc.h |3 +++ include/configs/omap3_evm_quick_nand.h |3 +++ include/configs/pdm360ng.h |3 +++ include/configs/sc3.h |3 +++ 20 files changed, 62 insertions(+), 11 deletions(-) -- 1.7.3.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/2] config: Add CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE
I have set this config option based on the existing usage of CONFIG_SILENT_CONSOLE. This is to support a future change deprecating the silencing of the linux console in bootm by having bootm modify the linux command-line arguments. Signed-off-by: Doug Anderson diand...@chromium.org --- include/configs/KUP4K.h|3 +++ include/configs/KUP4X.h|3 +++ include/configs/QS823.h|1 + include/configs/QS850.h|1 + include/configs/QS860T.h |1 + include/configs/TQM5200.h |3 +++ include/configs/a4m072.h |3 +++ include/configs/bfin_adi_common.h |3 +++ include/configs/cm5200.h |3 +++ include/configs/cpu9260.h |3 +++ include/configs/cpuat91.h |3 +++ include/configs/mcc200.h |3 +++ include/configs/mimc200.h |3 +++ include/configs/omap3_evm_quick_mmc.h |3 +++ include/configs/omap3_evm_quick_nand.h |3 +++ include/configs/pdm360ng.h |3 +++ include/configs/sc3.h |3 +++ 17 files changed, 45 insertions(+), 0 deletions(-) diff --git a/include/configs/KUP4K.h b/include/configs/KUP4K.h index c0035e6..7f55748 100644 --- a/include/configs/KUP4K.h +++ b/include/configs/KUP4K.h @@ -502,6 +502,9 @@ #define CONFIG_SYS_DEVICE_NULLDEV 1 /* enble null device */ #define CONFIG_VERSION_VARIABLE1 +/* Added based on usage of CONFIG_SILENT_CONSOLE; please remove when possible */ +#define CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE 1 + /* pass open firmware flat tree */ #define CONFIG_OF_LIBFDT 1 #define CONFIG_OF_BOARD_SETUP 1 diff --git a/include/configs/KUP4X.h b/include/configs/KUP4X.h index 5084ccc..07233fa 100644 --- a/include/configs/KUP4X.h +++ b/include/configs/KUP4X.h @@ -452,6 +452,9 @@ #define CONFIG_AUTOBOOT_STOP_STR . /* easy to stop for now */ #define CONFIG_SILENT_CONSOLE 1 +/* Added based on usage of CONFIG_SILENT_CONSOLE; please remove when possible */ +#define CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE 1 + #define CONFIG_USB_STORAGE 1 #define CONFIG_USB_SL811HS 1 diff --git a/include/configs/QS823.h b/include/configs/QS823.h index 36efbf2..84aea2a 100644 --- a/include/configs/QS823.h +++ b/include/configs/QS823.h @@ -37,6 +37,7 @@ /* various debug settings */ #undef CONFIG_SYS_DEVICE_NULLDEV /* null device */ #undef CONFIG_SILENT_CONSOLE /* silent console */ +#undef CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE #undef CONFIG_SYS_CONSOLE_INFO_QUIET /* silent console ? */ #undef DEBUG_FLASH /* debug flash code */ #undef FLASH_DEBUG /* debug fash code */ diff --git a/include/configs/QS850.h b/include/configs/QS850.h index 5c6ed07..15e6adb 100644 --- a/include/configs/QS850.h +++ b/include/configs/QS850.h @@ -37,6 +37,7 @@ /* various debug settings */ #undef CONFIG_SYS_DEVICE_NULLDEV /* null device */ #undef CONFIG_SILENT_CONSOLE /* silent console */ +#undef CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE #undef CONFIG_SYS_CONSOLE_INFO_QUIET /* silent console ? */ #undef DEBUG_FLASH /* debug flash code */ #undef FLASH_DEBUG /* debug fash code */ diff --git a/include/configs/QS860T.h b/include/configs/QS860T.h index b0bee82..99ac280 100644 --- a/include/configs/QS860T.h +++ b/include/configs/QS860T.h @@ -37,6 +37,7 @@ /* various debug settings */ #undef CONFIG_SYS_DEVICE_NULLDEV /* null device */ #undef CONFIG_SILENT_CONSOLE /* silent console */ +#undef CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE #undef CONFIG_SYS_CONSOLE_INFO_QUIET /* silent console ? */ #undef DEBUG_FLASH /* debug flash code */ #undef FLASH_DEBUG /* debug fash code */ diff --git a/include/configs/TQM5200.h b/include/configs/TQM5200.h index 6ea3faa..9415f29 100644 --- a/include/configs/TQM5200.h +++ b/include/configs/TQM5200.h @@ -71,6 +71,9 @@ #define CONFIG_SILENT_CONSOLE 1 /* enable silent startup */ #define CONFIG_BOARD_EARLY_INIT_F 1 /* used to detect S1 switch position */ #define CONFIG_USB_BIN_FIXUP 1 /* for a buggy USB device */ + +/* Added based on usage of CONFIG_SILENT_CONSOLE; please remove when possible */ +#define CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE 1 #if 0 #define FO300_SILENT_CONSOLE_WHEN_S1_CLOSED1 /* silent console on PSC1 when S1 */ /* switch is closed */ diff --git a/include/configs/a4m072.h b/include/configs/a4m072.h index 1c13904..bbd34d4 100644 --- a/include/configs/a4m072.h +++ b/include/configs/a4m072.h @@ -55,6 +55,9 @@ #define CONFIG_SILENT_CONSOLE #define CONFIG_SYS_DEVICE_NULLDEV 1 /* include nulldev device */ +/* Added
Re: [U-Boot] [PATCH 1/2] config: Add CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE
Dear Doug Anderson, In message 1326223018-12441-2-git-send-email-diand...@chromium.org you wrote: I have set this config option based on the existing usage of CONFIG_SILENT_CONSOLE. This is to support a future change deprecating the silencing of the linux console in bootm by having bootm modify the linux command-line arguments. ... +/* Added based on usage of CONFIG_SILENT_CONSOLE; please remove when possible */ +#define CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE 1 This selects a feature only, so please define without value. Please fix globally. 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 All I ask is a chance to prove that money can't make me happy. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] config: Add CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE
Dear Doug Anderson, In message 1326223018-12441-2-git-send-email-diand...@chromium.org you wrote: I have set this config option based on the existing usage of CONFIG_SILENT_CONSOLE. This is to support a future change deprecating the silencing of the linux console in bootm by having bootm modify the linux command-line arguments. ... --- a/include/configs/KUP4K.h +++ b/include/configs/KUP4K.h @@ -502,6 +502,9 @@ #define CONFIG_SYS_DEVICE_NULLDEV1 /* enble null device */ #define CONFIG_VERSION_VARIABLE 1 +/* Added based on usage of CONFIG_SILENT_CONSOLE; please remove when possible */ +#define CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE 1 And can you please place this new #define not somewhere in the middle of the file, but instead very close (immendiately preceeding or following lines) to the CONFIG_SILENT_CONSOLE definition. Hm...actually - why do we need both now? This is ugly and makes little sense to me. 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 Where humor is concerned there are no standards -- no one can say what is good or bad, although you can be sure that everyone will. - John Kenneth Galbraith ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] arm, davinci: Add support for the Calimain board from OMICRON electronics
On Tue, Jan 10, 2012 at 5:56 AM, Christian Riesch christian.rie...@omicron.at wrote: This patch adds support for the Calimain board from OMICRON electronics GmbH. The board features a Texas Instruments AM1808 SoC, 128 MB DDR2 memory, and 64 MB NOR flash memory connected to CS2 and CS3. Signed-off-by: Christian Riesch christian.rie...@omicron.at [snip] +#define CONFIG_NET_MULTI No longer used. Since there's one no longer used CONFIG variable can you please audit for others and then v2? Otherwise looks fine to me. Thanks. -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] bootm: Move silencing of linux console to deprecated config option.
Dear Doug Anderson, In message 1326223018-12441-3-git-send-email-diand...@chromium.org you wrote: If you would like the old behavior of having bootm modify the bootargs to silence the linux console when CONFIG_SILENT_CONSOLE is defined, you now need to define the config CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE. A previous change already added this new config to all known users of CONFIG_SILENT_CONSOLE. ... When CONFIG_SILENT_CONSOLE is defined, all console - messages (by U-Boot and Linux!) can be silenced with - the silent environment variable. See - doc/README.silent for more information. + messages can be silenced with the silent environment + variable. See doc/README.silent for more information. The silent environment variable changes only the U-Boot behaviour. How do you silence Linux when you do not change the boot arguments? 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 The connection between the language in which we think/program and the problems and solutions we can imagine is very close. For this reason restricting language features with the intent of eliminating pro- grammer errors is at best dangerous. - Bjarne Stroustrup in The C++ Programming Language ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/3] efika: Remove CONFIG_NET_MULTI option
CONFIG_NET_MULTI is not used anymore, so remove it from board file. Cc: Marek Vasut marek.va...@gmail.com Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- Changes since v1: - Fix typo in board name include/configs/efikamx.h |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/include/configs/efikamx.h b/include/configs/efikamx.h index 522487b..e2f0f74 100644 --- a/include/configs/efikamx.h +++ b/include/configs/efikamx.h @@ -206,7 +206,6 @@ /* USB NET */ #ifdef CONFIG_CMD_NET #define CONFIG_USB_ETHER_ASIX -#define CONFIG_NET_MULTI #define CONFIG_CMD_PING #define CONFIG_CMD_DHCP #endif Acked-by: Marek Vasut marek.va...@gmail.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/3] m28evk: Remove CONFIG_NET_MULTI option
CONFIG_NET_MULTI is not used anymore, so remove it from board file. Cc: Marek Vasut marek.va...@gmail.com Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- include/configs/m28evk.h |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/include/configs/m28evk.h b/include/configs/m28evk.h index 39c841f..51eb1c1 100644 --- a/include/configs/m28evk.h +++ b/include/configs/m28evk.h @@ -179,7 +179,6 @@ * Ethernet on SOC (FEC) */ #ifdef CONFIG_CMD_NET -#define CONFIG_NET_MULTI #define CONFIG_ETHPRIME FEC0 #define CONFIG_FEC_MXC #define CONFIG_FEC_MXC_MULTI Acked-by: Marek Vasut marek.va...@gmail.com Though you should drop it from all other board files (hint: git grep CONFIG_NET_MULTI) ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/3] m28evk: Remove CONFIG_NET_MULTI option
On Tue, Jan 10, 2012 at 5:57 PM, Marek Vasut marek.va...@gmail.com wrote: Acked-by: Marek Vasut marek.va...@gmail.com Though you should drop it from all other board files (hint: git grep CONFIG_NET_MULTI) Ok, will submit a patch for removing it from other board files. Regards, Fabio Estevam ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2 V2] arm926: Flush the data cache before disabling it.
The current implementation invalidates the cache instead of flushing it. This causes problems on platforms where the spl/u-boot is already loaded to the RAM, with caches enabled by a first stage bootloader. What platforms are affected? M The V bit of the cp15's control register c1 is set to the value of VINITHI on reset. Do not clear this bit by default, as there are SOC's with no valid memory region at 0x0. Signed-off-by: Sughosh Ganu urwithsugh...@gmail.com Cc: Albert Aribaud albert.u.b...@aribaud.net --- Changes since V1 * Added arm926 keyword to the subject line * Removed the superfluous setting of r0. * Fixed the comment to reflect the fact that V is not being cleared arch/arm/cpu/arm926ejs/start.S |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/start.S b/arch/arm/cpu/arm926ejs/start.S index 6a09c02..6e261c2 100644 --- a/arch/arm/cpu/arm926ejs/start.S +++ b/arch/arm/cpu/arm926ejs/start.S @@ -355,17 +355,20 @@ _dynsym_start_ofs: */ cpu_init_crit: /* - * flush v4 I/D caches + * flush D cache before disabling it */ mov r0, #0 - mcr p15, 0, r0, c7, c7, 0 /* flush v3/v4 cache */ +flush_dcache: + mrc p15, 0, r15, c7, c10, 3 + bne flush_dcache + mcr p15, 0, r0, c8, c7, 0 /* flush v4 TLB */ /* * disable MMU stuff and caches */ mrc p15, 0, r0, c1, c0, 0 - bic r0, r0, #0x2300 /* clear bits 13, 9:8 (--V- --RS) */ + bic r0, r0, #0x0300 /* clear bits 9:8 ( --RS) */ bic r0, r0, #0x0087 /* clear bits 7, 2:0 (B--- -CAM) */ orr r0, r0, #0x0002 /* set bit 2 (A) Align */ orr r0, r0, #0x1000 /* set bit 12 (I) I-Cache */ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] bootm: Move silencing of linux console to deprecated config option.
On Tuesday 10 January 2012 14:16:58 Doug Anderson wrote: --- a/README +++ b/README @@ -606,9 +606,8 @@ The following options need to be configured: environment 'console=serial'. When CONFIG_SILENT_CONSOLE is defined, all console - messages (by U-Boot and Linux!) can be silenced with - the silent environment variable. See - doc/README.silent for more information. + messages can be silenced with the silent environment + variable. See doc/README.silent for more information. this now becomes vague for anyone who is used to the old behavior/description. i'd have the new wording say U-Boot messages rather than messages, and then add a tip that people have to manually add console= themselves to the kernel's bootargs in order for messages there to be silenced. -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 0/2] Deprecate Linux bootargs munging with CONFIG_SILENT_CONSOLE.
On Tuesday 10 January 2012 14:16:56 Doug Anderson wrote: As discussed previously on the U-Boot mailing list (see comments on Fix fixup_silent_linux() buffer overrun patchset), relying on bootm to mangle the Linux bootargs is not a suggested way to go. We now officially deprecate it and provide a way to avoid it (but still get the other CONFIG_SILENT_CONSOLE behavior). personally i found the current behavior useful, but the code to implement it is crappy. oh well. -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH 1/2] fdt: Add fdtdec_find_aliases() to deal with alias nodes
On 12/26/2011 03:31 PM, Simon Glass wrote: Stephen Warren pointed out that we should use nodes whether or not they have an alias in the /aliases section. The aliases section specifies the order so far as it can, but is not essential. Operating without alisses is useful when the enumerated order of nodes does not matter (admittedly rare in U-Boot). ... +/** + * Find the nodes for a peripheral and return a list of them in the correct + * order. This is used to enumerate all the peripherals of a certain type. + * + * To use this, optionally set up a /aliases node with alias properties for + * a peripheral. For example, for usb you could have: + * + * aliases { + * usb0 = /ehci@c5008000; + * usb1 = /ehci@c500; + * }; + * + * Pass usb as the name to this function and will return a list of two + * nodes offsets: /ehci@c5008000 and ehci@c500. + * + * All nodes returned will match the compatible ID, as it is assumed that + * all peripherals use the same driver. + * + * If no alias node is found, then the node list will be returned in the + * order found in the fdt. If the aliases mention a node which doesn't + * exist, then this will be ignored. If nodes are found with no aliases, + * they will be added in any order. + * + * The array returned will not have any gaps. You can't make that guarantee without incorrectly parsing the device tree; I don't believe there's any restriction on the IDs in the aliases being contiguous. Maybe in practice this restriction will be fine, but it doesn't seem like a great idea. + * If there is a gap in the aliases, then this function will only return up + * to the number of nodes it found until the gap. It will also print a warning + * in this case. As an example, say you define aliases for usb2 and usb3, and + * have 3 nodes. Then in this case the node without an alias will become usb0 + * and the aliases will be use for usb2 and usb3. But since there is no + * usb1, this function will only list one node (usb0), and will print a + * warning. + * + * This function does not check node properties - so it is possible that the + * node is marked disabled (status = disabled). The caller is expected to + * deal with this. + * TBD: It might be nicer to handle this here since we don't want a + * discontiguous list to result in the caller. Yes, I think handling disabled is a requirement; Tegra has quite a few instances of each HW module, and in many cases, not all of them are used by a given board design, so they're marked disabled. I don't think this has any impact on handling discontiguous device IDs; I think we need that anyway. The itself array could always be contiguous if each entry were a pair (id, node) instead of the ID being implied by the array index. + * + * Note: the algorithm used is O(maxcount). + * + * @param blob FDT blob to use + * @param name Root name of alias to search for + * @param id Compatible ID to look for That's a little restrictive. Many drivers will handle multiple compatible values, e.g. N manufactures each making identical chips but giving each its own marketing name. These need different compatible flags in case some bug WAR needs to differentiate between them. Equally, Tegra30's say I2C controllers will be compatible with both nvidia,tegra30-i2c and nvidia,tegra20-i2c. While missing out the Tegra20 compatible value would probably technically be a bug in the device tree, it does seem reasonable to expect the driver to still match on the Tegra30 compatible value. + * @param node Place to put list of found nodes + * @param maxcount Maximum number of nodes to find It'd be nice not to have maxcount; it seems slightly restrictive for a helper function. I suppose that most drivers can supply a reasonable value for this since there's a certain max number of devices possible given extant HW designs, but when you start talking about e.g. a driver for an I2C bus multiplexer, where there's one instance per chip on a board, the number begins to get a bit arbitrary. + * @return number of nodes found on success, FTD_ERR_... on error + */ +int fdtdec_find_aliases(const void *blob, const char *name, + enum fdt_compat_id id, int *node_list, int maxcount); Overall, I was expecting something more like: Enumeration: * Enumerate device tree solely based on compatible values After enumeration is complete: * Walk aliases node, and for each entry assign that ID value to the appropriate device. * Walk all devices, and assign a free ID to each device that doesn't already have one. Still, I suppose in practice this current code will probably achieve equivalent results, and it doesn't have any impact of the device tree syntax/content (unless people change the way they write .dts files to WAR the issues above instead of enhancing the code), so can easily be enhanced to address the issues above as needed. So, I guess
Re: [U-Boot] [PATCH 1/2] config: Add CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE
Dear Wolfgang, On Tue, Jan 10, 2012 at 11:46 AM, Wolfgang Denk w...@denx.de wrote: Hm...actually - why do we need both now? This is ugly and makes little sense to me. Having both CONFIG_SILENT_CONSOLE and CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE separate allows us to continue to use CONFIG_SILENT_CONSOLE and then undefine the CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE setting from boards one by one as people either decide that they don't need it or come up with other options. Being able to undefine CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE allows you to avoid the 256-byte buffer overrun while still using the rest of the CONFIG_SILENT_CONSOLE feature. At the moment, I haven't sent up any patches that have CONFIG_SILENT_CONSOLE defined but _not_ CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE, since the config file I'm currently working with hadn't made it all the way upstream yet. I will resubmit the series with your other suggestions. Thanks! ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 0/2] Deprecate Linux bootargs munging with CONFIG_SILENT_CONSOLE.
On Tue, Jan 10, 2012 at 12:18 PM, Mike Frysinger vap...@gentoo.org wrote: personally i found the current behavior useful, but the code to implement it is crappy. oh well. Agreed. However, in the previous thread Wolfgang was of the view that the behavior of silencing linux is best achieved with scripts. I'm OK with that approach which is why I've submitted the current patch. I believe that you can do a script something like this (where normal_bootargs is the old bootargs without the console= part, console_args is the non-silent console settings, and old_bootcmd is the old bootcmd): setenv generate_bootargs 'if test -n $silent; then \ setenv bootargs $normal_bootargs console=; \ else \ setenv bootargs $normal_bootargs $console_args; fi' setenv bootcmd 'run generate_bootargs; run old_bootcmd' Hopefully this works for you. I'll add it to the documentation, too. -Doug ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH 1/2] fdt: Add fdtdec_find_aliases() to deal with alias nodes
Hi Stephen, On Tue, Jan 10, 2012 at 12:27 PM, Stephen Warren swar...@nvidia.com wrote: On 12/26/2011 03:31 PM, Simon Glass wrote: Stephen Warren pointed out that we should use nodes whether or not they have an alias in the /aliases section. The aliases section specifies the order so far as it can, but is not essential. Operating without alisses is useful when the enumerated order of nodes does not matter (admittedly rare in U-Boot). ... +/** + * Find the nodes for a peripheral and return a list of them in the correct + * order. This is used to enumerate all the peripherals of a certain type. + * + * To use this, optionally set up a /aliases node with alias properties for + * a peripheral. For example, for usb you could have: + * + * aliases { + * usb0 = /ehci@c5008000; + * usb1 = /ehci@c500; + * }; + * + * Pass usb as the name to this function and will return a list of two + * nodes offsets: /ehci@c5008000 and ehci@c500. + * + * All nodes returned will match the compatible ID, as it is assumed that + * all peripherals use the same driver. + * + * If no alias node is found, then the node list will be returned in the + * order found in the fdt. If the aliases mention a node which doesn't + * exist, then this will be ignored. If nodes are found with no aliases, + * they will be added in any order. + * + * The array returned will not have any gaps. Thanks for the detailed comments - much appreciated. You can't make that guarantee without incorrectly parsing the device tree; I don't believe there's any restriction on the IDs in the aliases being contiguous. Maybe in practice this restriction will be fine, but it doesn't seem like a great idea. Well actually I was thinking from a U-Boot POV since if someone uses a device that doesn't exist U-Boot may just crash or hang. So having such a hole would normally be a bug. But since there is no restriction in the fdt format, and since I suppose we have to assume the user knows what he is doing, I will remove this restriction. + * If there is a gap in the aliases, then this function will only return up + * to the number of nodes it found until the gap. It will also print a warning + * in this case. As an example, say you define aliases for usb2 and usb3, and + * have 3 nodes. Then in this case the node without an alias will become usb0 + * and the aliases will be use for usb2 and usb3. But since there is no + * usb1, this function will only list one node (usb0), and will print a + * warning. + * + * This function does not check node properties - so it is possible that the + * node is marked disabled (status = disabled). The caller is expected to + * deal with this. + * TBD: It might be nicer to handle this here since we don't want a + * discontiguous list to result in the caller. Yes, I think handling disabled is a requirement; Tegra has quite a few instances of each HW module, and in many cases, not all of them are used by a given board design, so they're marked disabled. I don't think this has any impact on handling discontiguous device IDs; I think we need that anyway. Yes ok. In that case I will make the code check for status = disabled at the same time. It is convenient. The itself array could always be contiguous if each entry were a pair (id, node) instead of the ID being implied by the array index. Slightly easier to do it this way I think. Not completely sure yet. + * + * Note: the algorithm used is O(maxcount). + * + * @param blob FDT blob to use + * @param name Root name of alias to search for + * @param id Compatible ID to look for That's a little restrictive. Many drivers will handle multiple compatible values, e.g. N manufactures each making identical chips but giving each its own marketing name. These need different compatible flags in case some bug WAR needs to differentiate between them. Equally, Tegra30's say I2C controllers will be compatible with both nvidia,tegra30-i2c and nvidia,tegra20-i2c. While missing out the Tegra20 compatible value would probably technically be a bug in the device tree, it does seem reasonable to expect the driver to still match on the Tegra30 compatible value. I think you are asking then for a list of IDs to match on. Is that right? How about I rename this function to fdtdec_find_aliases_for_id() and we then can create a fdtdec_find_aliases() function later when needed for T30? That way callers don't need to allocate and pass an array of IDs yet? + * @param node Place to put list of found nodes + * @param maxcount Maximum number of nodes to find It'd be nice not to have maxcount; it seems slightly restrictive for a helper function. I suppose that most drivers can supply a reasonable value for this since there's a certain max number of devices possible given extant HW designs, but when you start talking about e.g. a driver for an I2C bus
Re: [U-Boot] [PATCH 0/2] Deprecate Linux bootargs munging with CONFIG_SILENT_CONSOLE.
On Tuesday 10 January 2012 16:04:27 Doug Anderson wrote: I believe that you can do a script something like this (where normal_bootargs is the old bootargs without the console= part, console_args is the non-silent console settings, and old_bootcmd is the old bootcmd): it's not exactly the same behavior, but should be sufficient for everyone's needs Hopefully this works for you. I'll add it to the documentation, too. that'd be good -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 0/2] Deprecate Linux bootargs munging with CONFIG_SILENT_CONSOLE.
As discussed previously on the U-Boot mailing list (see comments on Fix fixup_silent_linux() buffer overrun patchset), relying on bootm to mangle the Linux bootargs is not a suggested way to go. We now officially deprecate it and provide a way to avoid it (but still get the other CONFIG_SILENT_CONSOLE behavior). Changes in v2: - Define without a value, since this selects a feature only. - Moved define of CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE to always be right next to the define of CONFIG_SILENT_CONSOLE - Better description of CONFIG_SILENT_CONSOLE in README - Example of how to use a script to silence Linux console in a non- deprecated way in doc/README.silent Doug Anderson (2): config: Add CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE bootm: Move silencing of linux console to deprecated config option. README | 10 ++ common/cmd_bootm.c | 10 +- doc/README.silent | 27 +++ include/configs/KUP4K.h|1 + include/configs/KUP4X.h|1 + include/configs/QS823.h|1 + include/configs/QS850.h|1 + include/configs/QS860T.h |1 + include/configs/TQM5200.h |1 + include/configs/a4m072.h |1 + include/configs/bfin_adi_common.h |1 + include/configs/cm5200.h |1 + include/configs/cpu9260.h |1 + include/configs/cpuat91.h |1 + include/configs/mcc200.h |1 + include/configs/mimc200.h |1 + include/configs/omap3_evm_quick_mmc.h |1 + include/configs/omap3_evm_quick_nand.h |1 + include/configs/pdm360ng.h |1 + include/configs/sc3.h |1 + 20 files changed, 51 insertions(+), 13 deletions(-) -- 1.7.3.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH 1/2] fdt: Add fdtdec_find_aliases() to deal with alias nodes
On 01/10/2012 02:22 PM, Simon Glass wrote: Hi Stephen, On Tue, Jan 10, 2012 at 12:27 PM, Stephen Warren swar...@nvidia.com wrote: On 12/26/2011 03:31 PM, Simon Glass wrote: Stephen Warren pointed out that we should use nodes whether or not they have an alias in the /aliases section. The aliases section specifies the order so far as it can, but is not essential. Operating without alisses is useful when the enumerated order of nodes does not matter (admittedly rare in U-Boot). ... +/** + * Find the nodes for a peripheral and return a list of them in the correct + * order. This is used to enumerate all the peripherals of a certain type. + * + * To use this, optionally set up a /aliases node with alias properties for + * a peripheral. For example, for usb you could have: + * + * aliases { + * usb0 = /ehci@c5008000; + * usb1 = /ehci@c500; + * }; + * + * Pass usb as the name to this function and will return a list of two + * nodes offsets: /ehci@c5008000 and ehci@c500. + * + * All nodes returned will match the compatible ID, as it is assumed that + * all peripherals use the same driver. + * + * If no alias node is found, then the node list will be returned in the + * order found in the fdt. If the aliases mention a node which doesn't + * exist, then this will be ignored. If nodes are found with no aliases, + * they will be added in any order. + * + * The array returned will not have any gaps. Thanks for the detailed comments - much appreciated. You can't make that guarantee without incorrectly parsing the device tree; I don't believe there's any restriction on the IDs in the aliases being contiguous. Maybe in practice this restriction will be fine, but it doesn't seem like a great idea. Well actually I was thinking from a U-Boot POV since if someone uses a device that doesn't exist U-Boot may just crash or hang. So having such a hole would normally be a bug. But since there is no restriction in the fdt format, and since I suppose we have to assume the user knows what he is doing, I will remove this restriction. Great! + * If there is a gap in the aliases, then this function will only return up + * to the number of nodes it found until the gap. It will also print a warning + * in this case. As an example, say you define aliases for usb2 and usb3, and + * have 3 nodes. Then in this case the node without an alias will become usb0 + * and the aliases will be use for usb2 and usb3. But since there is no + * usb1, this function will only list one node (usb0), and will print a + * warning. + * + * This function does not check node properties - so it is possible that the + * node is marked disabled (status = disabled). The caller is expected to + * deal with this. + * TBD: It might be nicer to handle this here since we don't want a + * discontiguous list to result in the caller. Yes, I think handling disabled is a requirement; Tegra has quite a few instances of each HW module, and in many cases, not all of them are used by a given board design, so they're marked disabled. I don't think this has any impact on handling discontiguous device IDs; I think we need that anyway. Yes ok. In that case I will make the code check for status = disabled at the same time. It is convenient. Thanks. The itself array could always be contiguous if each entry were a pair (id, node) instead of the ID being implied by the array index. Slightly easier to do it this way I think. Not completely sure yet. + * + * Note: the algorithm used is O(maxcount). + * + * @param blob FDT blob to use + * @param name Root name of alias to search for + * @param id Compatible ID to look for That's a little restrictive. Many drivers will handle multiple compatible values, e.g. N manufactures each making identical chips but giving each its own marketing name. These need different compatible flags in case some bug WAR needs to differentiate between them. Equally, Tegra30's say I2C controllers will be compatible with both nvidia,tegra30-i2c and nvidia,tegra20-i2c. While missing out the Tegra20 compatible value would probably technically be a bug in the device tree, it does seem reasonable to expect the driver to still match on the Tegra30 compatible value. I think you are asking then for a list of IDs to match on. Is that right? How about I rename this function to fdtdec_find_aliases_for_id() and we then can create a fdtdec_find_aliases() function later when needed for T30? That way callers don't need to allocate and pass an array of IDs yet? OK, that'll work. + * @param node Place to put list of found nodes + * @param maxcount Maximum number of nodes to find It'd be nice not to have maxcount; it seems slightly restrictive for a helper function. I suppose that most drivers can supply a reasonable value for this since there's a certain max number of devices
[U-Boot] [PATCH v2 1/2] config: Add CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE
I have set this config option based on the existing usage of CONFIG_SILENT_CONSOLE. This is to support a future change deprecating the silencing of the linux console in bootm by having bootm modify the linux command-line arguments. Signed-off-by: Doug Anderson diand...@chromium.org --- Changes in v2: - Define without a value, since this selects a feature only. - Moved define of CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE to always be right next to the define of CONFIG_SILENT_CONSOLE include/configs/KUP4K.h|1 + include/configs/KUP4X.h|1 + include/configs/QS823.h|1 + include/configs/QS850.h|1 + include/configs/QS860T.h |1 + include/configs/TQM5200.h |1 + include/configs/a4m072.h |1 + include/configs/bfin_adi_common.h |1 + include/configs/cm5200.h |1 + include/configs/cpu9260.h |1 + include/configs/cpuat91.h |1 + include/configs/mcc200.h |1 + include/configs/mimc200.h |1 + include/configs/omap3_evm_quick_mmc.h |1 + include/configs/omap3_evm_quick_nand.h |1 + include/configs/pdm360ng.h |1 + include/configs/sc3.h |1 + 17 files changed, 17 insertions(+), 0 deletions(-) diff --git a/include/configs/KUP4K.h b/include/configs/KUP4K.h index c0035e6..3cbe199 100644 --- a/include/configs/KUP4K.h +++ b/include/configs/KUP4K.h @@ -499,6 +499,7 @@ #define CONFIG_AUTOBOOT_KEYED /* use key strings to stop autoboot */ #define CONFIG_AUTOBOOT_STOP_STR . #define CONFIG_SILENT_CONSOLE 1 +#define CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE #define CONFIG_SYS_DEVICE_NULLDEV 1 /* enble null device */ #define CONFIG_VERSION_VARIABLE1 diff --git a/include/configs/KUP4X.h b/include/configs/KUP4X.h index 5084ccc..c092a90 100644 --- a/include/configs/KUP4X.h +++ b/include/configs/KUP4X.h @@ -451,6 +451,7 @@ #define CONFIG_AUTOBOOT_STOP_STR . /* easy to stop for now */ #define CONFIG_SILENT_CONSOLE 1 +#define CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE #define CONFIG_USB_STORAGE 1 #define CONFIG_USB_SL811HS 1 diff --git a/include/configs/QS823.h b/include/configs/QS823.h index 36efbf2..84aea2a 100644 --- a/include/configs/QS823.h +++ b/include/configs/QS823.h @@ -37,6 +37,7 @@ /* various debug settings */ #undef CONFIG_SYS_DEVICE_NULLDEV /* null device */ #undef CONFIG_SILENT_CONSOLE /* silent console */ +#undef CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE #undef CONFIG_SYS_CONSOLE_INFO_QUIET /* silent console ? */ #undef DEBUG_FLASH /* debug flash code */ #undef FLASH_DEBUG /* debug fash code */ diff --git a/include/configs/QS850.h b/include/configs/QS850.h index 5c6ed07..15e6adb 100644 --- a/include/configs/QS850.h +++ b/include/configs/QS850.h @@ -37,6 +37,7 @@ /* various debug settings */ #undef CONFIG_SYS_DEVICE_NULLDEV /* null device */ #undef CONFIG_SILENT_CONSOLE /* silent console */ +#undef CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE #undef CONFIG_SYS_CONSOLE_INFO_QUIET /* silent console ? */ #undef DEBUG_FLASH /* debug flash code */ #undef FLASH_DEBUG /* debug fash code */ diff --git a/include/configs/QS860T.h b/include/configs/QS860T.h index b0bee82..99ac280 100644 --- a/include/configs/QS860T.h +++ b/include/configs/QS860T.h @@ -37,6 +37,7 @@ /* various debug settings */ #undef CONFIG_SYS_DEVICE_NULLDEV /* null device */ #undef CONFIG_SILENT_CONSOLE /* silent console */ +#undef CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE #undef CONFIG_SYS_CONSOLE_INFO_QUIET /* silent console ? */ #undef DEBUG_FLASH /* debug flash code */ #undef FLASH_DEBUG /* debug fash code */ diff --git a/include/configs/TQM5200.h b/include/configs/TQM5200.h index 6ea3faa..c9860fa 100644 --- a/include/configs/TQM5200.h +++ b/include/configs/TQM5200.h @@ -69,6 +69,7 @@ #ifdef CONFIG_FO300 #define CONFIG_SYS_DEVICE_NULLDEV 1 /* enable null device */ #define CONFIG_SILENT_CONSOLE 1 /* enable silent startup */ +#define CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE #define CONFIG_BOARD_EARLY_INIT_F 1 /* used to detect S1 switch position */ #define CONFIG_USB_BIN_FIXUP 1 /* for a buggy USB device */ #if 0 diff --git a/include/configs/a4m072.h b/include/configs/a4m072.h index 1c13904..ebb1a32 100644 --- a/include/configs/a4m072.h +++ b/include/configs/a4m072.h @@ -53,6 +53,7 @@ #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200, 230400 } /* define to enable silent console */ #define CONFIG_SILENT_CONSOLE +#define CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE #define
Re: [U-Boot] [PATCH v2 2/2] bootm: Move silencing of linux console to deprecated config option.
On Tuesday 10 January 2012 16:36:20 Doug Anderson wrote: --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c +static void fixup_silent_linux(void) __attribute__ ((deprecated)); __deprecated (from linux/compiler.h) --- a/doc/README.silent +++ b/doc/README.silent +CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE with the warning that using s/warning/caveat/ +the option opens you up to a buffer overrun if your linux bootargs +can be 256 bytes. s/can be/are/ +also silence the Linux console, a script like this may help you (where the pedant in me says: s/may/might/ -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] tegra: mmc: Support operation with dcache enabled
On 01/09/2012 04:20 PM, Simon Glass wrote: When the data cache is enabled we must flush on write and invalidate on read. We also check that buffers are aligned to data cache lines boundaries. With recent work in U-Boot this should generally be the case but the warnings will catch problems. Signed-off-by: Simon Glass s...@chromium.org Seems reasonable to me. Acked-by: Stephen Warren swar...@nvidia.com -- nvpublic ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/2] config: Add CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE
On Tuesday 10 January 2012 16:36:19 Doug Anderson wrote: include/configs/bfin_adi_common.h |1 + don't bother. we didn't enable silent=1 by default in any of the Blackfin boards. just made the functionality available to people if they wanted to test things out with it when prototyping on dev boards. -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] tegra2: Enable data cache
On 01/09/2012 04:22 PM, Simon Glass wrote: This enables the data cache on Tegra2 boards. As discussed on the list, this is better off in the Tegra2 cpu code than in a particular vendor directory. We should be safe turning on the cache for all Tegra2 boards. Signed-off-by: Simon Glass s...@chromium.org --- Changes in v2: - Enable caches for all Tegra2 boards instead of just Nvidia ones Changes in v3: - Rebase against master Acked-by: Stephen Warren swar...@nvidia.com -- nvpublic ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 2/2] bootm: Move silencing of linux console to deprecated config option.
If you would like the old behavior of having bootm modify the bootargs to silence the linux console when CONFIG_SILENT_CONSOLE is defined, you now need to define the config CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE. A previous change already added this new config to all known users of CONFIG_SILENT_CONSOLE. Signed-off-by: Doug Anderson diand...@chromium.org --- Changes in v2: - Better description of CONFIG_SILENT_CONSOLE in README - Example of how to use a script to silence Linux console in a non- deprecated way in doc/README.silent README | 10 ++ common/cmd_bootm.c | 10 +- doc/README.silent | 27 +++ 3 files changed, 34 insertions(+), 13 deletions(-) diff --git a/README b/README index 7916777..5ba8482 100644 --- a/README +++ b/README @@ -605,10 +605,12 @@ The following options need to be configured: default i/o. Serial console can be forced with environment 'console=serial'. - When CONFIG_SILENT_CONSOLE is defined, all console - messages (by U-Boot and Linux!) can be silenced with - the silent environment variable. See - doc/README.silent for more information. + When CONFIG_SILENT_CONSOLE is defined, all U-Boot console + messages can be silenced with the silent environment + variable. Linux console messages will not be silenced + based on the silent environment variable unless + CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE is defined. + See doc/README.silent for more information. - Console Baudrate: CONFIG_BAUDRATE - in bps diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index d5745b1..8d1899e 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -83,8 +83,8 @@ extern flash_info_t flash_info[]; /* info for FLASH chips */ static int do_imls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); #endif -#ifdef CONFIG_SILENT_CONSOLE -static void fixup_silent_linux(void); +#ifdef CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE +static void fixup_silent_linux(void) __attribute__ ((deprecated)); #endif static image_header_t *image_get_kernel(ulong img_addr, int verify); @@ -673,7 +673,7 @@ int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) show_boot_progress(8); -#ifdef CONFIG_SILENT_CONSOLE +#ifdef CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE if (images.os.os == IH_OS_LINUX) fixup_silent_linux(); #endif @@ -1228,7 +1228,7 @@ U_BOOT_CMD( /***/ /* helper routines */ /***/ -#ifdef CONFIG_SILENT_CONSOLE +#ifdef CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE static void fixup_silent_linux(void) { char buf[256], *start, *end; @@ -1259,7 +1259,7 @@ static void fixup_silent_linux(void) setenv(bootargs, buf); debug(after silent fix-up: %s\n, buf); } -#endif /* CONFIG_SILENT_CONSOLE */ +#endif /* CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE */ /***/ diff --git a/doc/README.silent b/doc/README.silent index a26e3df..a4b8a97 100644 --- a/doc/README.silent +++ b/doc/README.silent @@ -1,5 +1,5 @@ The config option CONFIG_SILENT_CONSOLE can be used to quiet messages -on the console. If the option has been enabled, the output can be +on the U-Boot console. If the option has been enabled, the output can be silenced by setting the environment variable silent. The variable is latched into the global data at an early stage in the boot process so deleting it with setenv will not take effect until the system is @@ -15,6 +15,25 @@ The following actions are taken if silent is set at boot time: suppressed automatically. Make sure to enable nulldev by #defining CONFIG_SYS_DEVICE_NULLDEV in your board config file. - - When booting a linux kernel, the bootargs are fixed up so that - the argument console= will be in the command line, no matter how - it was set in bootargs before. + +The config option CONFIG_SILENT_CONSOLE previously also caused u-boot +to silence the Linux console (also based on the silent environment +variable) by modifying the bootargs so that the argument console= +would be in the command line no matter how it was set in bootargs +before. That behavior is now relegated to the config option +CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE with the warning that using +the option opens you up to a buffer overrun if your linux bootargs +can be 256 bytes. + +If you were relying on the old behavior of CONFIG_SILENT_CONSOLE to +also silence the Linux console, a script like this may help you (where +normal_bootargs is the old bootargs without the console= part, +console_args is the non-silent console settings, and old_bootcmd is +the old bootcmd): + + setenv generate_bootargs 'if test -n
Re: [U-Boot] [PATCH 0/2] Deprecate Linux bootargs munging with CONFIG_SILENT_CONSOLE.
Dear Doug Anderson, In message CAD=FV=Wr9JNLOP_0=kugv-ao1qf6zxf4xxox3azyh3-ns3v...@mail.gmail.com you wrote: personally i found the current behavior useful, but the code to implement it is crappy. oh well. Agreed. However, in the previous thread Wolfgang was of the view that the behavior of silencing linux is best achieved with scripts. I'm OK with that approach which is why I've submitted the current patch. I believe that you can do a script something like this (where normal_bootargs is the old bootargs without the console= part, console_args is the non-silent console settings, and old_bootcmd is the old bootcmd): setenv generate_bootargs 'if test -n $silent; then \ setenv bootargs $normal_bootargs console=; \ else \ setenv bootargs $normal_bootargs $console_args; fi' setenv bootcmd 'run generate_bootargs; run old_bootcmd' Hopefully this works for you. I'll add it to the documentation, too. In which way would this approach avoid the problem (potential overflow of cmdline max size) that you are trying to fix with your patch? If the existing code overflows the environment, this macro will doe the same. So you actually do not fix any problem, but you remove existing functionality that has been used in a number of projects, so you actually break a number of boards. Hm... why should we apply this patch, 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 What about WRITING it first and rationalizing it afterwords? :-) - Larry Wall in 8...@jpl-devvax.jpl.nasa.gov ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 0/2] Deprecate Linux bootargs munging with CONFIG_SILENT_CONSOLE.
Dear Wolfgang Denk, On Tue, Jan 10, 2012 at 2:16 PM, Wolfgang Denk w...@denx.de wrote: In which way would this approach avoid the problem (potential overflow of cmdline max size) that you are trying to fix with your patch? The overflow will be avoided on any boards that don't define CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE. As of the third version of this patch (will be sent shortly), the Blackfin board will be fixed so that the overflow can't happen on that board. So you actually do not fix any problem, but you remove existing functionality that has been used in a number of projects, so you actually break a number of boards. With the third version of this patch the Blackfin board is one example of a board that is fixed. On all other boards, no functionality is lost and no bugs are fixed. Previously I had submitted a patch to fix the overflow itself, which you NAKed (saying that fixup_silent_linux() was deprecated and shouldn't get any bugfixes). I am happy to dig that up and re-post it if you'd prefer. Either option is fine with me. My problem is that I have a board that would like to use CONFIG_SILENT_CONSOLE (to silence the U-Boot console) and have a Linux command line that is 256 characters. I either need the overflow fixed (my previous patch) or some way to avoid it (this patch). Thanks much! -Doug ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 0/3] Deprecate Linux bootargs munging with CONFIG_SILENT_CONSOLE.
As discussed previously on the U-Boot mailing list (see comments on Fix fixup_silent_linux() buffer overrun patchset), relying on bootm to mangle the Linux bootargs is not a suggested way to go. We now officially deprecate it and provide a way to avoid it (but still get the other CONFIG_SILENT_CONSOLE behavior). Changes in v2: - Define without a value, since this selects a feature only. - Moved define of CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE to always be right next to the define of CONFIG_SILENT_CONSOLE - Better description of CONFIG_SILENT_CONSOLE in README - Example of how to use a script to silence Linux console in a non- deprecated way in doc/README.silent Changes in v3: - Use __deprecated #define instead of direct gcc attribute - Minor wording updates in doc/README.silent - Added part 3 of the patch to turn off the deprecated config option for Blackfin, where it was confirmed that it's not needed. Doug Anderson (3): config: Add CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE bootm: Move silencing of linux console to deprecated config option. config: Remove Blackfin CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE README | 10 ++ common/cmd_bootm.c | 10 +- doc/README.silent | 27 +++ include/configs/KUP4K.h|1 + include/configs/KUP4X.h|1 + include/configs/QS823.h|1 + include/configs/QS850.h|1 + include/configs/QS860T.h |1 + include/configs/TQM5200.h |1 + include/configs/a4m072.h |1 + include/configs/cm5200.h |1 + include/configs/cpu9260.h |1 + include/configs/cpuat91.h |1 + include/configs/mcc200.h |1 + include/configs/mimc200.h |1 + include/configs/omap3_evm_quick_mmc.h |1 + include/configs/omap3_evm_quick_nand.h |1 + include/configs/pdm360ng.h |1 + include/configs/sc3.h |1 + 19 files changed, 50 insertions(+), 13 deletions(-) -- 1.7.3.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 1/3] config: Add CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE
I have set this config option based on the existing usage of CONFIG_SILENT_CONSOLE. This is to support a future change deprecating the silencing of the linux console in bootm by having bootm modify the linux command-line arguments. Signed-off-by: Doug Anderson diand...@chromium.org --- Changes in v2: - Define without a value, since this selects a feature only. - Moved define of CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE to always be right next to the define of CONFIG_SILENT_CONSOLE include/configs/KUP4K.h|1 + include/configs/KUP4X.h|1 + include/configs/QS823.h|1 + include/configs/QS850.h|1 + include/configs/QS860T.h |1 + include/configs/TQM5200.h |1 + include/configs/a4m072.h |1 + include/configs/bfin_adi_common.h |1 + include/configs/cm5200.h |1 + include/configs/cpu9260.h |1 + include/configs/cpuat91.h |1 + include/configs/mcc200.h |1 + include/configs/mimc200.h |1 + include/configs/omap3_evm_quick_mmc.h |1 + include/configs/omap3_evm_quick_nand.h |1 + include/configs/pdm360ng.h |1 + include/configs/sc3.h |1 + 17 files changed, 17 insertions(+), 0 deletions(-) diff --git a/include/configs/KUP4K.h b/include/configs/KUP4K.h index c0035e6..3cbe199 100644 --- a/include/configs/KUP4K.h +++ b/include/configs/KUP4K.h @@ -499,6 +499,7 @@ #define CONFIG_AUTOBOOT_KEYED /* use key strings to stop autoboot */ #define CONFIG_AUTOBOOT_STOP_STR . #define CONFIG_SILENT_CONSOLE 1 +#define CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE #define CONFIG_SYS_DEVICE_NULLDEV 1 /* enble null device */ #define CONFIG_VERSION_VARIABLE1 diff --git a/include/configs/KUP4X.h b/include/configs/KUP4X.h index 5084ccc..c092a90 100644 --- a/include/configs/KUP4X.h +++ b/include/configs/KUP4X.h @@ -451,6 +451,7 @@ #define CONFIG_AUTOBOOT_STOP_STR . /* easy to stop for now */ #define CONFIG_SILENT_CONSOLE 1 +#define CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE #define CONFIG_USB_STORAGE 1 #define CONFIG_USB_SL811HS 1 diff --git a/include/configs/QS823.h b/include/configs/QS823.h index 36efbf2..84aea2a 100644 --- a/include/configs/QS823.h +++ b/include/configs/QS823.h @@ -37,6 +37,7 @@ /* various debug settings */ #undef CONFIG_SYS_DEVICE_NULLDEV /* null device */ #undef CONFIG_SILENT_CONSOLE /* silent console */ +#undef CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE #undef CONFIG_SYS_CONSOLE_INFO_QUIET /* silent console ? */ #undef DEBUG_FLASH /* debug flash code */ #undef FLASH_DEBUG /* debug fash code */ diff --git a/include/configs/QS850.h b/include/configs/QS850.h index 5c6ed07..15e6adb 100644 --- a/include/configs/QS850.h +++ b/include/configs/QS850.h @@ -37,6 +37,7 @@ /* various debug settings */ #undef CONFIG_SYS_DEVICE_NULLDEV /* null device */ #undef CONFIG_SILENT_CONSOLE /* silent console */ +#undef CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE #undef CONFIG_SYS_CONSOLE_INFO_QUIET /* silent console ? */ #undef DEBUG_FLASH /* debug flash code */ #undef FLASH_DEBUG /* debug fash code */ diff --git a/include/configs/QS860T.h b/include/configs/QS860T.h index b0bee82..99ac280 100644 --- a/include/configs/QS860T.h +++ b/include/configs/QS860T.h @@ -37,6 +37,7 @@ /* various debug settings */ #undef CONFIG_SYS_DEVICE_NULLDEV /* null device */ #undef CONFIG_SILENT_CONSOLE /* silent console */ +#undef CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE #undef CONFIG_SYS_CONSOLE_INFO_QUIET /* silent console ? */ #undef DEBUG_FLASH /* debug flash code */ #undef FLASH_DEBUG /* debug fash code */ diff --git a/include/configs/TQM5200.h b/include/configs/TQM5200.h index 6ea3faa..c9860fa 100644 --- a/include/configs/TQM5200.h +++ b/include/configs/TQM5200.h @@ -69,6 +69,7 @@ #ifdef CONFIG_FO300 #define CONFIG_SYS_DEVICE_NULLDEV 1 /* enable null device */ #define CONFIG_SILENT_CONSOLE 1 /* enable silent startup */ +#define CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE #define CONFIG_BOARD_EARLY_INIT_F 1 /* used to detect S1 switch position */ #define CONFIG_USB_BIN_FIXUP 1 /* for a buggy USB device */ #if 0 diff --git a/include/configs/a4m072.h b/include/configs/a4m072.h index 1c13904..ebb1a32 100644 --- a/include/configs/a4m072.h +++ b/include/configs/a4m072.h @@ -53,6 +53,7 @@ #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200, 230400 } /* define to enable silent console */ #define CONFIG_SILENT_CONSOLE +#define CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE #define
[U-Boot] [PATCH v3 3/3] config: Remove Blackfin CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE
As Mike Frysinger writes: We didn't enable silent=1 by default in any of the Blackfin boards Just made the functionality available to people if they wanted to test things out with it when prototyping on dev boards. Signed-off-by: Doug Anderson diand...@chromium.org --- Changes in v3: - Added part 3 of the patch to turn off the deprecated config option for Blackfin, where it was confirmed that it's not needed. include/configs/bfin_adi_common.h |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/include/configs/bfin_adi_common.h b/include/configs/bfin_adi_common.h index 4729e7b..3fbf5c6 100644 --- a/include/configs/bfin_adi_common.h +++ b/include/configs/bfin_adi_common.h @@ -108,7 +108,6 @@ #define CONFIG_LOADS_ECHO 1 #define CONFIG_JTAG_CONSOLE #define CONFIG_SILENT_CONSOLE -#define CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE #ifndef CONFIG_BAUDRATE # define CONFIG_BAUDRATE 57600 #endif -- 1.7.3.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] bootm: Avoid 256-byte overflow in fixup_silent_linux()
Dear Doug Anderson, In message 1319133298-30249-1-git-send-email-diand...@chromium.org you wrote: This makes fixup_silent_linux() use malloc() to allocate its working space, meaning that our maximum kernel command line should only be limited by malloc(). Previously it was silently overflowing the stack. ... static void fixup_silent_linux(void) { - char buf[256], *start, *end; Are you sure that the kernel's buffer is long enough? For example on PowerPC, there is a current hard limit on 512 characters: arch/powerpc/boot/ops.h:#define COMMAND_LINE_SIZE 512 arch/powerpc/kernel/setup-common.c:char cmd_line[COMMAND_LINE_SIZE]; On SPARC, we have 256 bytes hard limit, see arch/sparc/prom/bootstr_64.c: #define BARG_LEN 256 ... prom_getstring(prom_chosen_node, bootargs, bootstr_info.bootstr_buf, BARG_LEN); And so on for other architectures, for example: arch/score/include/asm/setup.h:#define COMMAND_LINE_SIZE256 arch/m68k/include/asm/setup.h:#define COMMAND_LINE_SIZE 256 arch/avr32/include/asm/setup.h:#define COMMAND_LINE_SIZE 256 arch/microblaze/include/asm/setup.h:#define COMMAND_LINE_SIZE 256 arch/mn10300/include/asm/param.h:#define COMMAND_LINE_SIZE 256 arch/sparc/include/asm/setup.h:# define COMMAND_LINE_SIZE 256 arch/cris/include/asm/setup.h:#define COMMAND_LINE_SIZE 256 arch/xtensa/include/asm/setup.h:#define COMMAND_LINE_SIZE 256 arch/alpha/include/asm/setup.h:#define COMMAND_LINE_SIZE256 I think your patch is likely to break all these architectures? 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 The good Christian should beware of mathematicians and all those who make empty prophecies. The danger already exists that mathematicians have made a covenant with the devil to darken the spirit and confine man in the bonds of Hell. - Saint Augustine ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 0/2] Deprecate Linux bootargs munging with CONFIG_SILENT_CONSOLE.
Dear Doug Anderson, In message 1326231380-30128-1-git-send-email-diand...@chromium.org you wrote: As discussed previously on the U-Boot mailing list (see comments on Fix fixup_silent_linux() buffer overrun patchset), relying on Please provide a link. bootm to mangle the Linux bootargs is not a suggested way to go. So what is a suggested way to go to silence the Linux kenrel messages? We now officially deprecate it and provide a way to avoid it (but still get the other CONFIG_SILENT_CONSOLE behavior). You are removing functionality that is in active use by a number of boards, without providing any replacement, i. e. you are breaking a number of boards. Do you think this is a good idea? 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 Any technology distinguishable from magic is insufficiently advanced. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 2/3] bootm: Move silencing of linux console to deprecated config option.
If you would like the old behavior of having bootm modify the bootargs to silence the linux console when CONFIG_SILENT_CONSOLE is defined, you now need to define the config CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE. A previous change already added this new config to all known users of CONFIG_SILENT_CONSOLE. Signed-off-by: Doug Anderson diand...@chromium.org --- Changes in v2: - Better description of CONFIG_SILENT_CONSOLE in README - Example of how to use a script to silence Linux console in a non- deprecated way in doc/README.silent Changes in v3: - Use __deprecated #define instead of direct gcc attribute - Minor wording updates in doc/README.silent README | 10 ++ common/cmd_bootm.c | 10 +- doc/README.silent | 27 +++ 3 files changed, 34 insertions(+), 13 deletions(-) diff --git a/README b/README index 7916777..5ba8482 100644 --- a/README +++ b/README @@ -605,10 +605,12 @@ The following options need to be configured: default i/o. Serial console can be forced with environment 'console=serial'. - When CONFIG_SILENT_CONSOLE is defined, all console - messages (by U-Boot and Linux!) can be silenced with - the silent environment variable. See - doc/README.silent for more information. + When CONFIG_SILENT_CONSOLE is defined, all U-Boot console + messages can be silenced with the silent environment + variable. Linux console messages will not be silenced + based on the silent environment variable unless + CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE is defined. + See doc/README.silent for more information. - Console Baudrate: CONFIG_BAUDRATE - in bps diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index d5745b1..775a7dc 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -83,8 +83,8 @@ extern flash_info_t flash_info[]; /* info for FLASH chips */ static int do_imls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); #endif -#ifdef CONFIG_SILENT_CONSOLE -static void fixup_silent_linux(void); +#ifdef CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE +static void fixup_silent_linux(void) __deprecated; #endif static image_header_t *image_get_kernel(ulong img_addr, int verify); @@ -673,7 +673,7 @@ int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) show_boot_progress(8); -#ifdef CONFIG_SILENT_CONSOLE +#ifdef CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE if (images.os.os == IH_OS_LINUX) fixup_silent_linux(); #endif @@ -1228,7 +1228,7 @@ U_BOOT_CMD( /***/ /* helper routines */ /***/ -#ifdef CONFIG_SILENT_CONSOLE +#ifdef CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE static void fixup_silent_linux(void) { char buf[256], *start, *end; @@ -1259,7 +1259,7 @@ static void fixup_silent_linux(void) setenv(bootargs, buf); debug(after silent fix-up: %s\n, buf); } -#endif /* CONFIG_SILENT_CONSOLE */ +#endif /* CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE */ /***/ diff --git a/doc/README.silent b/doc/README.silent index a26e3df..32739ed 100644 --- a/doc/README.silent +++ b/doc/README.silent @@ -1,5 +1,5 @@ The config option CONFIG_SILENT_CONSOLE can be used to quiet messages -on the console. If the option has been enabled, the output can be +on the U-Boot console. If the option has been enabled, the output can be silenced by setting the environment variable silent. The variable is latched into the global data at an early stage in the boot process so deleting it with setenv will not take effect until the system is @@ -15,6 +15,25 @@ The following actions are taken if silent is set at boot time: suppressed automatically. Make sure to enable nulldev by #defining CONFIG_SYS_DEVICE_NULLDEV in your board config file. - - When booting a linux kernel, the bootargs are fixed up so that - the argument console= will be in the command line, no matter how - it was set in bootargs before. + +The config option CONFIG_SILENT_CONSOLE previously also caused u-boot +to silence the Linux console (also based on the silent environment +variable) by modifying the bootargs so that the argument console= +would be in the command line no matter how it was set in bootargs +before. That behavior is now relegated to the config option +CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE with the caveat that using +the option opens you up to a buffer overrun if your linux bootargs +are 256 bytes. + +If you were relying on the old behavior of CONFIG_SILENT_CONSOLE to +also silence the Linux console, a script like this might help you (where +normal_bootargs is the old bootargs without the console= part, +console_args is the non-silent
Re: [U-Boot] [PATCH v2 2/2] bootm: Move silencing of linux console to deprecated config option.
Dear Doug Anderson, In message 1326231380-30128-3-git-send-email-diand...@chromium.org you wrote: If you would like the old behavior of having bootm modify the bootargs to silence the linux console when CONFIG_SILENT_CONSOLE is defined, you now need to define the config CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE. A previous change already added this new config to all known users of CONFIG_SILENT_CONSOLE. This is ugly and does no good. You know that this feature is used by many boards, and unless you can provide a clean solution for these, you cannot declare the existing one as deprecated. 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 Just because your doctor has a name for your condition doesn't mean he knows what it is. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/2] config: Add CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE
Dear Doug Anderson, In message 1326231380-30128-2-git-send-email-diand...@chromium.org you wrote: I have set this config option based on the existing usage of CONFIG_SILENT_CONSOLE. This is to support a future change deprecating the silencing of the linux console in bootm by having bootm modify the linux command-line arguments. I think I'm not going to accept this other patch, so this one will follow it's fate. If I should reconsider, both patches should be squashed. 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 Making files is easy under the UNIX operating system. Therefore, users tend to create numerous files using large amounts of file space. It has been said that the only standard thing about all UNIX systems is the message-of-the-day telling users to clean up their files.-- System V.2 administrator's guide ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 0/2] Deprecate Linux bootargs munging with CONFIG_SILENT_CONSOLE.
Dear Wolfgang Denk On Tue, Jan 10, 2012 at 2:30 PM, Wolfgang Denk w...@denx.de wrote: As discussed previously on the U-Boot mailing list (see comments on Fix fixup_silent_linux() buffer overrun patchset), relying on Please provide a link. Sure! This is the message I'm referring to: http://lists.denx.de/pipermail/u-boot/2011-October/106255.html. I know it was a long time ago--I got a bit sidetracked for a while. Specifically, I offered to provide a very simple version of fixup_silent_linux() that just fixed the buffer overrun and you said Please consider it NAKed. bootm to mangle the Linux bootargs is not a suggested way to go. So what is a suggested way to go to silence the Linux kenrel messages? Please see doc/README.silent in part 1 of this patchset for a sample script. You are removing functionality that is in active use by a number of boards, without providing any replacement, i. e. you are breaking a number of boards. Do you think this is a good idea? This change doesn't remove any functionality but instead deprecates it and provides a path for boards to move forward to a non-deprecated solution. The non-deprecated solution is documented in doc/README.silent. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 0/2] Deprecate Linux bootargs munging with CONFIG_SILENT_CONSOLE.
Dear Doug Anderson, In message CAD=FV=vx-bepx2idra1t1sbt2h6n9vyaytb1hytnjjtna_z...@mail.gmail.com you wrote: Dear Wolfgang Denk, On Tue, Jan 10, 2012 at 2:16 PM, Wolfgang Denk w...@denx.de wrote: In which way would this approach avoid the problem (potential overflow of cmdline max size) that you are trying to fix with your patch? The overflow will be avoided on any boards that don't define CONFIG_DEPRECATED_SILENT_LINUX_CONSOLE. As of the third version of this patch (will be sent shortly), the Blackfin board will be fixed so that the overflow can't happen on that board. You misunderstand. I agree that the code should be fixed to not write out of the bouds of the array. But simply increasing the buffer size here in U-Boot only means that you will have an overflow or at least a truncation on many Linux systems. So you actually do not fix any problem, but you remove existing functionality that has been used in a number of projects, so you actually break a number of boards. With the third version of this patch the Blackfin board is one example of a board that is fixed. On all other boards, no functionality is lost and no bugs are fixed. If we don't change functionality and don;t fix any bugs then we can simply omit this change? Previously I had submitted a patch to fix the overflow itself, which you NAKed (saying that fixup_silent_linux() was deprecated and shouldn't get any bugfixes). I am happy to dig that up and re-post it if you'd prefer. Either option is fine with me. I agree with Mike that the existing code is anything but perfect, but removing useful functionality without providing something that is at least as good makes no sense to me. With your patches we get more and uglier code and win nothing. My problem is that I have a board that would like to use CONFIG_SILENT_CONSOLE (to silence the U-Boot console) and have a Linux command line that is 256 characters. I either need the overflow fixed (my previous patch) or some way to avoid it (this patch). Use a shorter command line? ;-) See my previous message - the command line size is hardwired to 256 bytes for a number of architectures. You break these. 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 Even if you aren't in doubt, consider the mental welfare of the per- son who has to maintain the code after you, and who will probably put parens in the wrong place. - Larry Wall in the perl man page ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 0/2] Deprecate Linux bootargs munging with CONFIG_SILENT_CONSOLE.
Dear Doug Anderson, In message CAD=FV=w+gerkz2lceuoyrswgvfg2qx9esh3rjjvj7kq6tjd...@mail.gmail.com you wrote: Please provide a link. Sure! This is the message I'm referring to: http://lists.denx.de/pipermail/u-boot/2011-October/106255.html. I You should do so in the commit mesage (but judging from my current state of mind you can save the efforts for a v4). know it was a long time ago--I got a bit sidetracked for a while. Specifically, I offered to provide a very simple version of fixup_silent_linux() that just fixed the buffer overrun and you said Please consider it NAKed. I just replied to one of your earlier patches that did not fix the overflow, but just shifted it to happen later, in Linux. bootm to mangle the Linux bootargs is not a suggested way to go. So what is a suggested way to go to silence the Linux kenrel messages? Please see doc/README.silent in part 1 of this patchset for a sample script. But this does the very same, just in a different way (requiring more code). And it does not prevent the overflow at all. This change doesn't remove any functionality but instead deprecates it and provides a path for boards to move forward to a non-deprecated solution. The non-deprecated solution is documented in doc/README.silent. Your suggestion does not solve anything. 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 The shortest unit of time in the multiverse is the News York Second, defined as the period of time between the traffic lights turning green and the cab behind you honking. - Terry Pratchett, _Lords and Ladies_ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] bootm: Avoid 256-byte overflow in fixup_silent_linux()
Dear Wolfgang Denk, On Tue, Jan 10, 2012 at 2:28 PM, Wolfgang Denk w...@denx.de wrote: This makes fixup_silent_linux() use malloc() to allocate its working space, meaning that our maximum kernel command line should only be limited by malloc(). Previously it was silently overflowing the stack. ... static void fixup_silent_linux(void) { - char buf[256], *start, *end; Are you sure that the kernel's buffer is long enough? The kernel's buffer might be big enough, depending on the architecture. For ARM (which is what I'm on), I see that the command line is 1024 bytes. Here's where I'm looking: http://git.kernel.org/?p=linux/kernel/git/next/linux-next.git;a=blob;f=arch/arm/include/asm/setup.h;h=23ebc0c82a3975ae5c455dd39598e93ab33922e7;hb=refs/heads/master#l19 I think your patch is likely to break all these architectures? I'm not sure how my patch would break these architectures. My patch removes a buffer overrun--it doesn't actually increase any particular board's command line length. I need this because my board uses a command line that is ~300 bytes--under the kernel limit but currently over u-boot's. I agree completely that this patch doesn't remove all limits on Linux command line length. However, it does allow you to use the full Linux command line length on kernels that have a #define with something greater than 256. In addition, a buffer overrun is a particularly gnarly failure case (opens you up to all sorts of security attacks if someone can figure out how to manipulate the command line), so is generally good to fix. If you'd rather, I'd be happy to rework the patch to change the hardcoded 256 to a CONFIG_COMMAND_LINE_SIZE, then add overflow checking to the function. That would allow my use case and also prevent future buffer overruns. -Doug ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 0/2] Deprecate Linux bootargs munging with CONFIG_SILENT_CONSOLE.
Dear Wolfgang Denk, On Tue, Jan 10, 2012 at 2:48 PM, Wolfgang Denk w...@denx.de wrote: You should do so in the commit mesage (but judging from my current state of mind you can save the efforts for a v4). Got it. If we end up with a v4, I'll add it. I just replied to one of your earlier patches that did not fix the overflow, but just shifted it to happen later, in Linux. I just responded to that one. ...but to reiterate here: I'm happy to add a CONFIG option to u-boot to allow setting the command line length (so I can use the 1024 bytes I have available to me in ARM) and also to avoid the buffer overrun. If this is the approach you'd like me to go, I'm happy to do it. But this does the very same, just in a different way (requiring more code). And it does not prevent the overflow at all. Sorry, I must have misunderstood your earlier suggestions back in October. My apologies there. :( ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V4] nand_spl_simple: store ecc data on the stack
On 12/13/2011 01:33 PM, Stefano Babic wrote: Currently nand_spl_simple puts it's temp data at 0x1 offset in SDRAM which is likely to contain already loaded data. The patch saves the oob data and the ecc on the stack replacing the fixed address in RAM. Signed-off-by: Stefano Babic sba...@denx.de CC: Ilya Yanok ya...@emcraft.com CC: Scott Wood scottw...@freescale.com CC: Tom Rini tom.r...@gmail.com CC: Simon Schwarz simonschwarz...@googlemail.com CC: Wolfgang Denk w...@denx.de --- V4: - Drop SYS_ from local defines (Wolfgang Denk, Scott Wood) - drop parenthesis around defines (Scott Wood) V3: - use local defines for CONFIG_SYS_NAND_ECCSTEPS and CONFIG_SYS_NAND_ECCTOTAL (Tom Rini) - drop CONFIG_SYS_NAND_ECCSTEPS from board config files V2: - CONFIG_SYS_NAND_ECCTOTAL can always be computed (Ilya Yanok) - drop all CONFIG_SYS_NAND_ECCTOTAL in arm boards using nand_simple.c drivers/mtd/nand/nand_spl_simple.c | 42 --- include/configs/am3517_crane.h |4 --- include/configs/am3517_evm.h |4 --- include/configs/devkit8000.h |5 include/configs/hawkboard.h|5 +--- include/configs/omap3_beagle.h |4 --- include/configs/omap3_evm.h|4 --- include/configs/omap3_evm_quick_nand.h |4 --- 8 files changed, 17 insertions(+), 55 deletions(-) After this patch a hawkboard_nand build gives this: Configuring for hawkboard_nand - Board: hawkboard, Options: NAND_U_BOOT /tmp/u-boot-arm/nand_spl/board/davinci/da8xxevm/nand_boot.c: In function 'nand_read_page': /tmp/u-boot-arm/nand_spl/board/davinci/da8xxevm/nand_boot.c:148:17: error: 'CONFIG_SYS_NAND_ECCSTEPS' undeclared (first use in this function) /tmp/u-boot-arm/nand_spl/board/davinci/da8xxevm/nand_boot.c:148:17: note: each undeclared identifier is reported only once for each function it appears in /tmp/u-boot-arm/nand_spl/board/davinci/da8xxevm/nand_boot.c:164:18: error: 'CONFIG_SYS_NAND_ECCTOTAL' undeclared (first use in this function) make[1]: *** [/tmp/u-boot-arm/nand_spl/board/davinci/da8xxevm/nand_boot.o] Error 1 make: *** [nand_spl] Error 2 make: *** Waiting for unfinished jobs Should I drop hawkboard from this patch, or add the change to nand_spl/nand_boot.c? Is a hawkboard conversion to the new SPL pending in some other tree? -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] cmd_source: introduce run_script()
Move actual script execution into a new function run_script(), which then can be called from other modules. Signed-off-by: Michael Walle mich...@walle.cc Cc: Wolfgang Denk w...@denx.de --- common/cmd_source.c | 71 -- include/common.h|1 + 2 files changed, 41 insertions(+), 31 deletions(-) diff --git a/common/cmd_source.c b/common/cmd_source.c index 16a627a..4b2740b 100644 --- a/common/cmd_source.c +++ b/common/cmd_source.c @@ -43,6 +43,45 @@ #include hush.h #endif +/* + * Run a series of commands, separated by '\n'. + * Beware, the contents of script may be modified while it is parsed. + */ +int run_script(char *script) +{ +#ifndef CONFIG_SYS_HUSH_PARSER /*?? */ + int rcode; + char *line = script; + char *next = script; + + /* +* break into individual lines and execute each line; +* terminate on error. +*/ + while (*next) { + if (*next == '\n') { + *next = '\0'; + /* run only non-empty commands */ + if (*line) { + debug(** exec: \%s\\n, line); + if (run_command(line, 0) 0) { + rcode = 1; + break; + } + } + line = next + 1; + } + ++next; + } + + if (rcode == 0 *line) + rcode = (run_command(line, 0) = 0); + return rcode; +#else + return parse_string_outer(script, FLAG_PARSE_SEMICOLON); +#endif +} + int source (ulong addr, const char *fit_uname) { @@ -160,38 +199,8 @@ source (ulong addr, const char *fit_uname) memmove (cmd, (char *)data, len); *(cmd + len) = 0; -#ifdef CONFIG_SYS_HUSH_PARSER /*?? */ - rcode = parse_string_outer (cmd, FLAG_PARSE_SEMICOLON); -#else - { - char *line = cmd; - char *next = cmd; + rcode = run_script(cmd); - /* -* break into individual lines, -* and execute each line; -* terminate on error. -*/ - while (*next) { - if (*next == '\n') { - *next = '\0'; - /* run only non-empty commands */ - if (*line) { - debug (** exec: \%s\\n, - line); - if (run_command (line, 0) 0) { - rcode = 1; - break; - } - } - line = next + 1; - } - ++next; - } - if (rcode == 0 *line) - rcode = (run_command(line, 0) = 0); - } -#endif free (cmd); return rcode; } diff --git a/include/common.h b/include/common.h index 3df1def..dcfbed6 100644 --- a/include/common.h +++ b/include/common.h @@ -296,6 +296,7 @@ void board_pre_console_putc(int ch); void flash_perror (int); /* common/cmd_source.c */ +intrun_script(char *script); intsource (ulong addr, const char *fit_uname); extern ulong load_addr;/* Default Load Address */ -- 1.7.2.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot