[U-Boot] [PATCH] tegra2: mmc: Enable card-detect for all interfaces.
This commit drops the interface check for card-detection and leaves it up to the board whether or not a card-detect GPIO is connected. Also, the version field of struct mmc is only valid after the slot has been probed successfully, so depending on that information sort of defeats the purpose of card-detection. Signed-off-by: Thierry Reding thierry.red...@avionic-design.de --- drivers/mmc/tegra2_mmc.c | 12 1 files changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/mmc/tegra2_mmc.c b/drivers/mmc/tegra2_mmc.c index 035a868..fe562ed 100644 --- a/drivers/mmc/tegra2_mmc.c +++ b/drivers/mmc/tegra2_mmc.c @@ -543,14 +543,10 @@ int board_mmc_getcd(u8 *cd, struct mmc *mmc) debug(board_mmc_getcd called\n); - *cd = 1; /* Assume card is inserted, or eMMC */ - - if (IS_SD(mmc)) { - if (host-cd_gpio = 0) { - if (gpio_get_value(host-cd_gpio)) - *cd = 0; - } - } + if (host-cd_gpio = 0) + *cd = !gpio_get_value(host-cd_gpio); + else + *cd = 1; return 0; } -- 1.7.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 0/4] arm, omap3: Add support for TechNexion modules
All, these patches add support for TechNexion TAM3517, TAO3530 and TDM3730 SoMs. regards, //Tapani ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/4] arm, omap3: Add support for TechNexion modules
Move duplicate Sitara MUX definitions to arch-omap3/mux.h Signed-off-by: Tapani Utriainen tap...@technexion.com CC: Sandeep Paulraj s-paul...@ti.com --- arch/arm/include/asm/arch-omap3/mux.h | 51 ++ board/logicpd/am3517evm/am3517evm.h | 40 -- board/ti/am3517crane/am3517crane.h| 39 -- 3 files changed, 51 insertions(+), 79 deletions(-) diff --git a/arch/arm/include/asm/arch-omap3/mux.h b/arch/arm/include/asm/arch-omap3/mux.h index 0c01c73..d796d6c 100644 --- a/arch/arm/include/asm/arch-omap3/mux.h +++ b/arch/arm/include/asm/arch-omap3/mux.h @@ -404,6 +404,57 @@ #define CONTROL_PADCONF_SDRC_CKE0 0x0262 #define CONTROL_PADCONF_SDRC_CKE1 0x0264 + +/** + AM35xx specific definitions + + The AM3517 and the AM3508 are formally branded + as Sitara processors, but in practice they are + compatible with OMAP3 and are treated as OMAP3 + by software like u-boot and the Linux kernel. + +***/ + +#define CONTROL_PADCONF_SYS_NRESWARM 0x0A08 +/* CCDC */ +#define CONTROL_PADCONF_CCDC_PCLK 0x01E4 +#define CONTROL_PADCONF_CCDC_FIELD 0x01E6 +#define CONTROL_PADCONF_CCDC_HD0x01E8 +#define CONTROL_PADCONF_CCDC_VD0x01EA +#define CONTROL_PADCONF_CCDC_WEN 0x01EC +#define CONTROL_PADCONF_CCDC_DATA0 0x01EE +#define CONTROL_PADCONF_CCDC_DATA1 0x01F0 +#define CONTROL_PADCONF_CCDC_DATA2 0x01F2 +#define CONTROL_PADCONF_CCDC_DATA3 0x01F4 +#define CONTROL_PADCONF_CCDC_DATA4 0x01F6 +#define CONTROL_PADCONF_CCDC_DATA5 0x01F8 +#define CONTROL_PADCONF_CCDC_DATA6 0x01FA +#define CONTROL_PADCONF_CCDC_DATA7 0x01FC +/* RMII */ +#define CONTROL_PADCONF_RMII_MDIO_DATA 0x01FE +#define CONTROL_PADCONF_RMII_MDIO_CLK 0x0200 +#define CONTROL_PADCONF_RMII_RXD0 0x0202 +#define CONTROL_PADCONF_RMII_RXD1 0x0204 +#define CONTROL_PADCONF_RMII_CRS_DV0x0206 +#define CONTROL_PADCONF_RMII_RXER 0x0208 +#define CONTROL_PADCONF_RMII_TXD0 0x020A +#define CONTROL_PADCONF_RMII_TXD1 0x020C +#define CONTROL_PADCONF_RMII_TXEN 0x020E +#define CONTROL_PADCONF_RMII_50MHZ_CLK 0x0210 +#define CONTROL_PADCONF_USB0_DRVBUS0x0212 +/* CAN */ +#define CONTROL_PADCONF_HECC1_TXD 0x0214 +#define CONTROL_PADCONF_HECC1_RXD 0x0216 + +#define CONTROL_PADCONF_SYS_BOOT7 0x0218 +#define CONTROL_PADCONF_SDRC_DQS0N 0x021A +#define CONTROL_PADCONF_SDRC_DQS1N 0x021C +#define CONTROL_PADCONF_SDRC_DQS2N 0x021E +#define CONTROL_PADCONF_SDRC_DQS3N 0x0220 +#define CONTROL_PADCONF_STRBEN_DLY00x0222 +#define CONTROL_PADCONF_STRBEN_DLY10x0224 +#define CONTROL_PADCONF_SYS_BOOT8 0x0226 + #define MUX_VAL(OFFSET,VALUE)\ writew((VALUE), OMAP34XX_CTRL_BASE + (OFFSET)); diff --git a/board/logicpd/am3517evm/am3517evm.h b/board/logicpd/am3517evm/am3517evm.h index 3d74ef1..68d746c 100644 --- a/board/logicpd/am3517evm/am3517evm.h +++ b/board/logicpd/am3517evm/am3517evm.h @@ -31,46 +31,6 @@ const omap3_sysinfo sysinfo = { AM3517EVM Board, NAND, }; -/* AM3517 specific mux configuration */ -#define CONTROL_PADCONF_SYS_NRESWARM 0x0A08 -/* CCDC */ -#define CONTROL_PADCONF_CCDC_PCLK 0x01E4 -#define CONTROL_PADCONF_CCDC_FIELD 0x01E6 -#define CONTROL_PADCONF_CCDC_HD0x01E8 -#define CONTROL_PADCONF_CCDC_VD0x01EA -#define CONTROL_PADCONF_CCDC_WEN 0x01EC -#define CONTROL_PADCONF_CCDC_DATA0 0x01EE -#define CONTROL_PADCONF_CCDC_DATA1 0x01F0 -#define CONTROL_PADCONF_CCDC_DATA2 0x01F2 -#define CONTROL_PADCONF_CCDC_DATA3 0x01F4 -#define CONTROL_PADCONF_CCDC_DATA4 0x01F6 -#define CONTROL_PADCONF_CCDC_DATA5 0x01F8 -#define CONTROL_PADCONF_CCDC_DATA6 0x01FA -#define CONTROL_PADCONF_CCDC_DATA7 0x01FC -/* RMII */ -#define CONTROL_PADCONF_RMII_MDIO_DATA 0x01FE -#define CONTROL_PADCONF_RMII_MDIO_CLK 0x0200 -#define CONTROL_PADCONF_RMII_RXD0 0x0202 -#define CONTROL_PADCONF_RMII_RXD1 0x0204 -#define CONTROL_PADCONF_RMII_CRS_DV0x0206 -#define CONTROL_PADCONF_RMII_RXER 0x0208 -#define CONTROL_PADCONF_RMII_TXD0 0x020A -#define CONTROL_PADCONF_RMII_TXD1 0x020C -#define CONTROL_PADCONF_RMII_TXEN 0x020E -#define CONTROL_PADCONF_RMII_50MHZ_CLK 0x0210 -#define CONTROL_PADCONF_USB0_DRVBUS0x0212 -/* CAN */ -#define CONTROL_PADCONF_HECC1_TXD 0x0214 -#define CONTROL_PADCONF_HECC1_RXD 0x0216 - -#define CONTROL_PADCONF_SYS_BOOT7 0x0218 -#define CONTROL_PADCONF_SDRC_DQS0N 0x021A -#define CONTROL_PADCONF_SDRC_DQS1N 0x021C -#define CONTROL_PADCONF_SDRC_DQS2N 0x021E -#define CONTROL_PADCONF_SDRC_DQS3N 0x0220 -#define CONTROL_PADCONF_STRBEN_DLY00x0222 -#define CONTROL_PADCONF_STRBEN_DLY10x0224 -#define CONTROL_PADCONF_SYS_BOOT8 0x0226 /* * IEN - Input Enable diff --git a/board/ti/am3517crane/am3517crane.h
[U-Boot] [PATCH 3/4] arm, omap3: Add support for TechNexion modules
Add support for TechNexion TAO3530 SoM Signed-off-by: Tapani Utriainen tap...@technexion.com CC: Sandeep Paulraj s-paul...@ti.com --- arch/arm/include/asm/mach-types.h |1 board/technexion/tao3530/Makefile | 43 board/technexion/tao3530/tao3530.c | 207 board/technexion/tao3530/tao3530.h | 382 + boards.cfg |1 include/configs/tao3530.h | 362 +++ 6 files changed, 996 insertions(+) diff --git a/arch/arm/include/asm/mach-types.h b/arch/arm/include/asm/mach-types.h index 685b46f..d900d94 100644 --- a/arch/arm/include/asm/mach-types.h +++ b/arch/arm/include/asm/mach-types.h @@ -472,6 +472,7 @@ extern unsigned int __machine_arch_type; #define MACH_TYPE_EUKREA_CPUIMX35SD2821 #define MACH_TYPE_EUKREA_CPUIMX51SD2822 #define MACH_TYPE_EUKREA_CPUIMX51 2823 +#define MACH_TYPE_OMAP3_TAO35302836 #define MACH_TYPE_SMDKC210 2838 #define MACH_TYPE_OMAP3_BRAILLO2839 #define MACH_TYPE_SPYPLUG 2840 diff --git a/board/technexion/tao3530/Makefile b/board/technexion/tao3530/Makefile new file mode 100644 index 000..59c7d4f --- /dev/null +++ b/board/technexion/tao3530/Makefile @@ -0,0 +1,43 @@ +# +# 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 := tao3530.o + +SRCS := $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) + +$(LIB):$(obj).depend $(OBJS) + $(call cmd_link_o_target, $(OBJS)) + +clean: + rm -f $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak $(obj).depend + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/board/technexion/tao3530/tao3530.c b/board/technexion/tao3530/tao3530.c new file mode 100644 index 000..b8a4ac8 --- /dev/null +++ b/board/technexion/tao3530/tao3530.c @@ -0,0 +1,207 @@ +/* + * Maintainer : + * Tapani Utriainen linux...@technexion.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 netdev.h +#include twl4030.h +#include asm/io.h +#include asm/arch/mmc_host_def.h +#include asm/arch/mem.h +#include asm/arch/mux.h +#include asm/arch/sys_proto.h +#include asm/arch/gpio.h +#include asm/gpio.h +#include asm/mach-types.h +#include tao3530.h + +DECLARE_GLOBAL_DATA_PTR; + +int tao3530_revision(void) +{ + int ret = 0; + + /* char *label argument is unused in gpio_request() */ + ret = gpio_request(65, ); + if (ret) { + printf(Error? GPIO 65 not available\n); + goto out; + } + MUX_VAL(CP(GPMC_WAIT3), (IEN | PTU | EN | M4)); + + ret = gpio_request(1, ); + if (ret) { + printf(Error? GPIO 1 not available\n); + goto out2; + } + MUX_VAL(CP(SYS_CLKREQ), (IEN | PTU | EN | M4)); + + ret = gpio_direction_input(65); + if (ret) { + printf(Error? GPIO 65 not available for input\n); + goto out3; + } + + ret = gpio_direction_input(1); + if (ret) { + printf(Error? GPIO 1 not available for input\n); + goto out3; + } + + ret = gpio_get_value(65) 1 | gpio_get_value(1); + +out3: + MUX_VAL(CP(SYS_CLKREQ), (IEN | PTU | EN | M0)); +
[U-Boot] [PATCH 4/4] arm, omap3: Add support for TechNexion modules
Add support for TechNexion TDM3730 SoM Signed-off-by: Tapani Utriainen tap...@technexion.com CC: Sandeep Paulraj s-paul...@ti.com --- board/technexion/tdm3730/Makefile | 49 board/technexion/tdm3730/tdm3730.c | 173 board/technexion/tdm3730/tdm3730.h | 383 + boards.cfg |1 include/configs/tdm3730.h | 360 ++ 5 files changed, 966 insertions(+) diff --git a/board/technexion/tdm3730/Makefile b/board/technexion/tdm3730/Makefile new file mode 100644 index 000..e796330 --- /dev/null +++ b/board/technexion/tdm3730/Makefile @@ -0,0 +1,49 @@ +# +# (C) Copyright 2000, 2001, 2002 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de. +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# + +include $(TOPDIR)/config.mk + +LIB= $(obj)lib$(BOARD).o + +COBJS := tdm3730.o + +SRCS := $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) + +$(LIB):$(obj).depend $(OBJS) + $(call cmd_link_o_target, $(OBJS)) + +clean: + rm -f $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak $(obj).depend + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/board/technexion/tdm3730/tdm3730.c b/board/technexion/tdm3730/tdm3730.c new file mode 100644 index 000..48c41ca --- /dev/null +++ b/board/technexion/tdm3730/tdm3730.c @@ -0,0 +1,173 @@ +/* + * TechNexion, www.technexion.com + * + * Maintainer : + * Tapani Utriainen linux...@technexion.com + * + * Derived from Beagle Board, 3430 SDP, Overo, and OMAP3EVM code by + * Richard Woodruff r-woodru...@ti.com + * Syed Mohammed Khasim kha...@ti.com + * Sunil Kumar sunilsain...@gmail.com + * Shashi Ranjan shashiranjanmc...@gmail.com + * Steve Sakoman st...@sakoman.com + * + * (C) Copyright 2004-2008 + * Texas Instruments, www.ti.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 netdev.h +#include malloc.h +#include twl4030.h +#include fat.h +#include mmc.h +#include asm/io.h +#include asm/arch/dss.h +#include asm/arch/mmc_host_def.h +#include asm/arch/mem.h +#include asm/arch/mux.h +#include asm/arch/sys_proto.h +#include asm/arch/gpio.h +#include asm/mach-types.h +#include tdm3730.h + +DECLARE_GLOBAL_DATA_PTR; + +/* + * Routine: board_init + * Description: Early hardware init. + */ +int board_init(void) +{ + gpmc_init(); /* in SRAM or SDRAM, finish GPMC */ + /* board id for Linux */ + gd-bd-bi_arch_number = MACH_TYPE_OMAP3_TDM3730; + /* boot param addr */ + gd-bd-bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100); + + return 0; +} + +/* + * Routine: misc_init_r + * Description: Configure board specific parts + */ +int misc_init_r(void) +{ + /* +* We've 6 sets of GPIO groups: OMAP34XX_GPIO1_BASE,OMAP34XX_GPIO2_BASE, +* OMAP34XX_GPIO3_BASE, ... , OMAP34XX_GPIO6_BASE +* Each of them has 32 GPIOS, hence, the GPIO_50 will be the GPIO18 of +* OMAP34XX_GPIO2_BASE. +* + */ + struct gpio *gpio1_base = (struct gpio *)OMAP34XX_GPIO1_BASE; + struct gpio *gpio5_base = (struct gpio *)OMAP34XX_GPIO5_BASE; + struct gpio *gpio6_base = (struct gpio *)OMAP34XX_GPIO6_BASE; + +
Re: [U-Boot] [PATCH 1/4] arm, omap3: Add support for TechNexion modules
Dear Tapani Utriainen, In message 2021164002.2e3a6212@myhost you wrote: Move duplicate Sitara MUX definitions to arch-omap3/mux.h Thanks. Signed-off-by: Tapani Utriainen tap...@technexion.com CC: Sandeep Paulraj s-paul...@ti.com --- arch/arm/include/asm/arch-omap3/mux.h | 51 ++ board/logicpd/am3517evm/am3517evm.h | 40 -- board/ti/am3517crane/am3517crane.h| 39 -- 3 files changed, 51 insertions(+), 79 deletions(-) diff --git a/arch/arm/include/asm/arch-omap3/mux.h b/arch/arm/include/asm/arch-omap3/mux.h index 0c01c73..d796d6c 100644 --- a/arch/arm/include/asm/arch-omap3/mux.h +++ b/arch/arm/include/asm/arch-omap3/mux.h @@ -404,6 +404,57 @@ #define CONTROL_PADCONF_SDRC_CKE00x0262 #define CONTROL_PADCONF_SDRC_CKE10x0264 +/** + AM35xx specific definitions + + The AM3517 and the AM3508 are formally branded + as Sitara processors, but in practice they are + compatible with OMAP3 and are treated as OMAP3 + by software like u-boot and the Linux kernel. + +***/ Incorrect multiline comment style. Please fix. 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 Oblivion together does not frighten me, beloved. -- Thalassa (in Anne Mulhall's body), Return to Tomorrow, stardate 4770.3. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/4] arm, omap3: Add support for TechNexion modules
Dear Tapani Utriainen, In message 2021164002.2e3a6212@myhost you wrote: Move duplicate Sitara MUX definitions to arch-omap3/mux.h Also, please chose a better Subject. This modification may be a preparation for your other patches, but it is actually in no way related to TechNexion modules. Thanks. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Do not simplify the design of a program if a way can be found to make it complex and wonderful. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/4] arm, omap3: Add support for TechNexion modules
On 21/11/2011 09:40, Tapani Utriainen wrote: Move duplicate Sitara MUX definitions to arch-omap3/mux.h Signed-off-by: Tapani Utriainen tap...@technexion.com CC: Sandeep Paulraj s-paul...@ti.com --- arch/arm/include/asm/arch-omap3/mux.h | 51 ++ board/logicpd/am3517evm/am3517evm.h | 40 -- board/ti/am3517crane/am3517crane.h| 39 -- 3 files changed, 51 insertions(+), 79 deletions(-) Thanks, but diff --git a/arch/arm/include/asm/arch-omap3/mux.h b/arch/arm/include/asm/arch-omap3/mux.h index 0c01c73..d796d6c 100644 --- a/arch/arm/include/asm/arch-omap3/mux.h +++ b/arch/arm/include/asm/arch-omap3/mux.h ...these changes were already submitted by a previous patch by Ilya Yanok (AM3517: move AM3517 specific mux defines to generic header) Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: off...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/4] arm, omap3: Add support for TechNexion modules
Hi Tapani, I think, most of the comments below apply to all the patches in the series. Seems, like subject should be: arm: omap3: On 11/21/11 10:44, Tapani Utriainen wrote: Add support for TechNexion TAM3517 SoM This is a very short commit message. Signed-off-by: Tapani Utriainen tap...@technexion.com CC: Sandeep Paulraj s-paul...@ti.com --- arch/arm/include/asm/mach-types.h |1 board/technexion/tam3517/Makefile | 49 board/technexion/tam3517/tam3517.c | 150 board/technexion/tam3517/tam3517.h | 388 + boards.cfg |1 include/configs/tam3517.h | 427 + MAINTAINERS file should be updated. 6 files changed, 1016 insertions(+) diff --git a/arch/arm/include/asm/mach-types.h b/arch/arm/include/asm/mach-types.h index 2d5c3bc..685b46f 100644 --- a/arch/arm/include/asm/mach-types.h +++ b/arch/arm/include/asm/mach-types.h @@ -467,6 +467,7 @@ extern unsigned int __machine_arch_type; #define MACH_TYPE_OMAP4_PANDA 2791 #define MACH_TYPE_TI8168EVM2800 #define MACH_TYPE_TETON_BGA2816 +#define MACH_TYPE_TAM3517 2818 #define MACH_TYPE_EUKREA_CPUIMX25SD2820 #define MACH_TYPE_EUKREA_CPUIMX35SD2821 #define MACH_TYPE_EUKREA_CPUIMX51SD2822 This is wrong! If your machine type is missing from the mach-types file, then use your board configuration file to define the machine type. diff --git a/board/technexion/tam3517/Makefile b/board/technexion/tam3517/Makefile new file mode 100644 index 000..2c10f4b --- /dev/null +++ b/board/technexion/tam3517/Makefile @@ -0,0 +1,49 @@ +# +# (C) Copyright 2000, 2001, 2002 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de. +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# + +include $(TOPDIR)/config.mk + +LIB = $(obj)lib$(BOARD).o + +COBJS:= $(BOARD).o + +SRCS := $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) + +$(LIB): $(obj).depend $(OBJS) + $(call cmd_link_o_target, $(OBJS)) + +clean: + rm -f $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak $(obj).depend clean and distclean targets have no use, please, remove. + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/board/technexion/tam3517/tam3517.c b/board/technexion/tam3517/tam3517.c new file mode 100644 index 000..45a066a --- /dev/null +++ b/board/technexion/tam3517/tam3517.c @@ -0,0 +1,150 @@ +/* + * Maintainer: TechNexion Linux FAE Group linux...@technexion.com + * + * This file provides support for TechNexion TAM3517 SoM + * It has been tested using a Twister baseboard. + * + * 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. Postal address is subject to change. Will you be around when it will change next time? Is this a correct address at all? Probably, the best would be to remove the sentence with the address. + */ + +#include common.h +#include netdev.h +#include nand.h +#include asm/io.h +#include asm/arch/mmc_host_def.h +#include asm/arch/mem.h +#include asm/arch/mux.h +#include asm/arch/sys_proto.h +#include asm/arch/gpio.h +#include asm/arch/omap_gpmc.h +#include i2c.h +#include asm/mach-types.h +#include tam3517.h + +#define AM3517_IP_SW_RESET 0x48002598
Re: [U-Boot] [PATCH 1/4] arm, omap3: Add support for TechNexion modules
Hi Wolfgang, Tapani, On 11/21/11 11:07, Wolfgang Denk wrote: Dear Tapani Utriainen, In message 2021164002.2e3a6212@myhost you wrote: Move duplicate Sitara MUX definitions to arch-omap3/mux.h Thanks. This has been already done by Ilya and waits for someone to merge, check here: http://patchwork.ozlabs.org/patch/125030/ Signed-off-by: Tapani Utriainen tap...@technexion.com CC: Sandeep Paulraj s-paul...@ti.com --- arch/arm/include/asm/arch-omap3/mux.h | 51 ++ board/logicpd/am3517evm/am3517evm.h | 40 -- board/ti/am3517crane/am3517crane.h| 39 -- 3 files changed, 51 insertions(+), 79 deletions(-) diff --git a/arch/arm/include/asm/arch-omap3/mux.h b/arch/arm/include/asm/arch-omap3/mux.h index 0c01c73..d796d6c 100644 --- a/arch/arm/include/asm/arch-omap3/mux.h +++ b/arch/arm/include/asm/arch-omap3/mux.h @@ -404,6 +404,57 @@ #define CONTROL_PADCONF_SDRC_CKE0 0x0262 #define CONTROL_PADCONF_SDRC_CKE1 0x0264 +/** + AM35xx specific definitions + + The AM3517 and the AM3508 are formally branded + as Sitara processors, but in practice they are + compatible with OMAP3 and are treated as OMAP3 + by software like u-boot and the Linux kernel. + +***/ Incorrect multiline comment style. Please fix. Best regards, Wolfgang Denk -- Regards, Igor. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/4] arm, omap3: Add support for TechNexion modules
Dear Tapani Utriainen, In message 2021164401.5b816ce0@myhost you wrote: Add support for TechNexion TAM3517 SoM Signed-off-by: Tapani Utriainen tap...@technexion.com CC: Sandeep Paulraj s-paul...@ti.com --- arch/arm/include/asm/mach-types.h |1 board/technexion/tam3517/Makefile | 49 board/technexion/tam3517/tam3517.c | 150 board/technexion/tam3517/tam3517.h | 388 + boards.cfg |1 include/configs/tam3517.h | 427 + 6 files changed, 1016 insertions(+) ... +#if defined(CONFIG_DRIVER_TI_EMAC) + /* allow the PHY to stabilize and settle down */ + do { + udelay(1000); + ctr++; + } while (ctr 300); It is not a good idea to delay each and every boot process by 300 milliseconds even if nobody is trying to use the network interface at all. Please move this into the network init parts. + reset = readl(AM3517_IP_SW_RESET); + reset = (~CPGMACSS_SW_RST); + writel(reset, AM3517_IP_SW_RESET); Please use clrbits*() instead. +int board_eth_init(bd_t *bis) +{ + int n_eth = 0; + +#if defined(CONFIG_DRIVER_TI_EMAC) + davinci_emac_initialize(); + n_eth++; +#endif + + +#if defined(CONFIG_SMC911X) + /* init cs for extern lan */ + writel(NET_GPMC_CONFIG1, gpmc_cfg-cs[5].config1); + writel(NET_GPMC_CONFIG2, gpmc_cfg-cs[5].config2); + writel(NET_GPMC_CONFIG3, gpmc_cfg-cs[5].config3); + writel(NET_GPMC_CONFIG4, gpmc_cfg-cs[5].config4); + writel(NET_GPMC_CONFIG5, gpmc_cfg-cs[5].config5); + writel(NET_GPMC_CONFIG6, gpmc_cfg-cs[5].config6); + writel(NET_GPMC_CONFIG7, gpmc_cfg-cs[5].config7); + + if (smc911x_initialize(0, CONFIG_SMC911X_BASE) = 0) + n_eth--; So eventually n_eth will become negative? +#endif + return 0; I guess this should be return n_eth ?? Did you code pass a compile test without warnings? I seriously doubt that. Please fix globally. +const omap3_sysinfo sysinfo = { + DDR_DISCRETE, + TAM3517 Twister Board, + NAND, +}; This may or may not be correct. Please keep in mind that the TAM3517 is a SoM, which may be used on a variety of carrier boards. The TAM3517 Twister Board information is only correct for use on the Twister board, but wrong for all other uses. +#define CONFIG_SYS_NAND_ADDR NAND_BASE /* physical address */ + /* to access nand */ +#define CONFIG_SYS_NAND_BASE NAND_BASE /* physical address */ Do we need both? +/* + For LG 4.3 panel use + panel-generic.disp_timings=8000,480/8/4/41,272/4/2/10,24\0 \ +*/ Incorrect multiline comment. Please fix globally. +#define CONFIG_AUTO_COMPLETE +#define CONFIG_AUTOCOMPLETE Why are you defining bogus vaiables like CONFIG_AUTOCOMPLETE? This is not used anywhere in the code. Please check and clean up globally. +#define V_PROMPT TAM3517 # What is this good for? Please omit adding unneeded #defines. +#define CONFIG_SYS_LONGHELP /* undef to save memory */ +#define CONFIG_SYS_HUSH_PARSER /* use hush command parser */ +#define CONFIG_SYS_PROMPT_HUSH_PS2 +#define CONFIG_SYS_PROMPTV_PROMPT Just insert the value here. +#define CONFIG_SYS_CBSIZE2048/* Console I/O Buffer Size */ +#define CONFIG_CMD_RUN It might make sense to combin all CONFIG_CMD definitions in one place. Also, it makes little sense to add definitions here that are on by default anyway. Plerase clkean up. + +#define CONFIG_SYS_FLASH_BASEboot_flash_base Is there a version oif TAM3517 modules with NOR flash? Or what is this needed/used for? +/* Monitor at start of flash */ +#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE ??? +/*--- + * CFI FLASH driver setup + */ +/* timeout values are in ticks */ +#define CONFIG_SYS_FLASH_ERASE_TOUT (100 * CONFIG_SYS_HZ) +#define CONFIG_SYS_FLASH_WRITE_TOUT (100 * CONFIG_SYS_HZ) I don't think you have NOR flash on the modules, or do you? +/* Flash banks JFFS2 should use */ +#define CONFIG_SYS_MAX_MTD_BANKS (CONFIG_SYS_MAX_FLASH_BANKS + \ + CONFIG_SYS_MAX_NAND_DEVICE) Has this been tested? +#if defined(CONFIG_CMD_NET) +/* Disable u-boot support for EMAC LAN, due compile problems + Linux kernel support is enough to enable the interface Please fix the compile problems instead. +#define CONFIG_DRIVER_TI_EMAC +#define CONFIG_DRIVER_TI_EMAC_USE_RMII +#define CONFIG_EMAC_MDIO_PHY_NUM 0 +#define CONFIG_ARM926EJS 1 CONFIG_ARM926EJS? for an OMAP3 processor? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich,
Re: [U-Boot] [PATCH 3/4] arm, omap3: Add support for TechNexion modules
Dear Tapani Utriainen, In message 2021164800.23d1025f@myhost you wrote: Add support for TechNexion TAO3530 SoM Same comments as for previous module. Also again: please chose a beter Subject: line. ... + /* Set memory size environment variable, depending on revision */ + switch (tao3530_revision()) { + case 0x2: /* Rev C1 -- 256MB */ + setenv(mem_size, mem=256M); + break; + default: + printf(Warning: Unknown TAO3530 rev, setting mem=128M\n); + case 0x3: /* Rev A2/B2 -- 128MB */ + setenv(mem_size, mem=128M); break; + break; Please don't hard-wire memory sizes. Use get_ram_size() to auto-detect the actual size on the module. ... + /* Make GPIO 142 as output pin */ + writel(readl(gpio5_base-oe) ~(GPIO14), gpio5_base-oe); + + /* Now send a pulse on the GPIO pin */ Please add comments why actions like these are needed / what they are good for. 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 HANDLE WITH EXTREME CARE: This Product Contains Minute Electrically Charged Particles Moving at Velocities in Excess of Five Hundred Million Miles Per Hour. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 4/4] arm, omap3: Add support for TechNexion modules
Dear Tapani Utriainen, In message 2021165205.4624b13b@myhost you wrote: Add support for TechNexion TDM3730 SoM Please use a better Subject: and add a bit more of information to the commit message itself. Signed-off-by: Tapani Utriainen tap...@technexion.com CC: Sandeep Paulraj s-paul...@ti.com --- board/technexion/tdm3730/Makefile | 49 board/technexion/tdm3730/tdm3730.c | 173 board/technexion/tdm3730/tdm3730.h | 383 + boards.cfg |1 include/configs/tdm3730.h | 360 ++ 5 files changed, 966 insertions(+) Same comments as before, entry to MAINTAINERS missing, etc, etc, --- /dev/null +++ b/board/technexion/tdm3730/tdm3730.c @@ -0,0 +1,173 @@ +/* + * TechNexion, www.technexion.com + * + * Maintainer : + * Tapani Utriainen linux...@technexion.com This belongs into the MAINTAINERS file. ... +#define CONFIG_EXTRA_ENV_SETTINGS \ It appears the environment settings on these boards are pretty much similar (which certainly makes sense). Please consider factoring out these common parts into a separate header file instead of repeating them all over. +#define CONFIG_SYS_INIT_RAM_ADDR 0x4020f800 +#define CONFIG_SYS_INIT_RAM_SIZE 0x800 Has this been tested? 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 Time is an illusion perpetrated by the manufacturers of space. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/4] arm, omap3: Add support for TechNexion modules
On 21/11/2011 09:44, Tapani Utriainen wrote: Add support for TechNexion TAM3517 SoM Signed-off-by: Tapani Utriainen tap...@technexion.com CC: Sandeep Paulraj s-paul...@ti.com Hi Tapani, --- arch/arm/include/asm/mach-types.h |1 board/technexion/tam3517/Makefile | 49 board/technexion/tam3517/tam3517.c | 150 board/technexion/tam3517/tam3517.h | 388 + boards.cfg |1 include/configs/tam3517.h | 427 + 6 files changed, 1016 insertions(+) I am also porting a TAM3517 based custom board to U-Boot mainline. Maybe we can share some experiences ;-) diff --git a/arch/arm/include/asm/mach-types.h b/arch/arm/include/asm/mach-types.h index 2d5c3bc..685b46f 100644 --- a/arch/arm/include/asm/mach-types.h +++ b/arch/arm/include/asm/mach-types.h @@ -467,6 +467,7 @@ extern unsigned int __machine_arch_type; #define MACH_TYPE_OMAP4_PANDA 2791 #define MACH_TYPE_TI8168EVM2800 #define MACH_TYPE_TETON_BGA2816 +#define MACH_TYPE_TAM3517 2818 This is wrong. The mach-types.h is taken from Linux and the rule is to always be in sync with tthe kernel. If the MACH-TYPE is not set, it must be set in the board configuration file. diff --git a/board/technexion/tam3517/tam3517.c b/board/technexion/tam3517/tam3517.c new file mode 100644 As I said, I am also porting a similar board and I am facing the problem to support multiple board using the same module (TAM3517). My idea was to have a common include/configs/tam3517.h file, that is included by all boards using the module, such as the twister and a custom boards. This allows to factorize most of common setup. Then we could have a board/technexion/twister board in parallel with other boards using only the module. What do you think about ? +#include asm/mach-types.h We do not need mach-types.h +#include tam3517.h + +#define AM3517_IP_SW_RESET 0x48002598 +#define CPGMACSS_SW_RST (1 1) These are obsolete, too. It is (or it will be soon) common code. See previous patches for AM 3517 (mcx board). + +/* + * Routine: board_init + * Description: Early hardware init. + */ +int board_init(void) +{ + DECLARE_GLOBAL_DATA_PTR; + + gpmc_init(); /* in SRAM or SDRAM, finish GPMC */ + /* board id for Linux */ + gd-bd-bi_arch_number = MACH_TYPE_TAM3517; This should be removed, it is part of generic arm library. +#if defined(CONFIG_XR16L2751) If I have understood the schematics, the twister board (because this code corresponds to this board) has always a XR16L2751 UART. Should we not drop the #ifdef ? +/* + * Routine: misc_init_r + */ +int misc_init_r(void) +{ + int ctr = 0; + + i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); +#ifdef CONFIG_BOOT_FROM_MMC + omap_set_gpio_direction(TAM3517_SW3_PIN8, 1); This is obsolete - use the standard GPIO framework. +#if defined(CONFIG_DRIVER_TI_EMAC) + /* allow the PHY to stabilize and settle down */ + do { + udelay(1000); + ctr++; + } while (ctr 300); + + /*ensure that the module is out of reset*/ + reset = readl(AM3517_IP_SW_RESET); + reset = (~CPGMACSS_SW_RST); + writel(reset, AM3517_IP_SW_RESET); +#endif Drop this part - it is in EMAC initialization, not needed in board code. + if (smc911x_initialize(0, CONFIG_SMC911X_BASE) = 0) + n_eth--; Why do we need to count the interfaces ? This is already done by the network subsystem. diff --git a/board/technexion/tam3517/tam3517.h b/board/technexion/tam3517/tam3517.h new file mode 10064 + /* ETK (ES2 onwards) */\ + MUX_VAL(CP(ETK_CLK_ES2),(IDIS | PTU | EN | M0)) \ + MUX_VAL(CP(ETK_CTL_ES2),(IDIS | PTD | DIS | M0)) \ + MUX_VAL(CP(ETK_D0_ES2), (IEN | PTD | DIS | M0)) \ + MUX_VAL(CP(ETK_D1_ES2), (IEN | PTD | DIS | M0)) \ + MUX_VAL(CP(ETK_D2_ES2), (IEN | PTD | EN | M0)) \ ..but the pins for ETK are used as USB for EHCI-OMAP, are'nt they ? This setup seems to me wrong. diff --git a/include/configs/tam3517.h b/include/configs/tam3517.h See my previous comment regarding a common configuration file for the module and a specific file for the boards. +/* + * High Level Configuration Options + */ +#define CONFIG_ARMV7 1 /* This is an ARM V7 CPU core */ 1 is not needed, this must fixed globally. + +#define CONFIG_CMDLINE_TAG 1 /* enable passing of ATAGs */ +#define CONFIG_SETUP_MEMORY_TAGS 1 +#define CONFIG_INITRD_TAG1 +#define CONFIG_REVISION_TAG 1 Ditto. +#if CONFIG_DRAM_BUS_WIDTH == 16 +#define _CONFIG_DRAM_BUS_WIDTH 16 +#else +#ifndef CONFIG_DRAM_BUS_WIDTH +#define CONFIG_DRAM_BUS_WIDTH32 +#endif +#define _CONFIG_DRAM_BUS_WIDTH 32 +#endif I have not used
Re: [U-Boot] Micron JS28F128J3F75 Uboot setenv problem
Hi, Am 18.11.2011 19:10, schrieb Holger Brunck: Hi, On 18/11/11 14:57, Spranger, Jörg wrote: we have a small AT91RM9200 based board, running Linux on it and it worked fine. Now we face 2 major changes: 1. The strataflash JS28F128j3d75 shifted to JS28F128j3f75 2. The uboot is updated from 2009.01 to 2010.09 Now when I have a new board flashing the bootloader and make a reboot, I get the warning *** Warning - bad CRC, using default environment That is ok, because in the flash on that place are only s when the flash is erased. Normaly I get rid of it, when I make a setenv. This works with the old u-boot with both types of flash. When I take the new uboot it only works with the old flash. The curious thing is that taking the new uboot and the new flash the setenv writes the variables into the flash at the right place BUT after a reboot I get the same warning. Looking at the flash with md, I can see the hole environment variables In place. Also the CRC is the same as when I do it with the old flash. It seems that there is something different when reading from the device, maybe an initilisation? This is the point where I have to ask the community where to look next. we had similar problems with a Intel Strata 28F320 when updating from a v2009.08 u-boot to a recent version. We had to revert one commit (and still do in our local tree). See discussion: http://lists.denx.de/pipermail/u-boot/2011-March/088382.html Best regards Holger . thank you for responding, yes it seems like a bug in the chip. I took a look into the documentation from micron an I found a hint that using the wrong command will put the chip in F revission to the Read Status Register mode instaed of Array read mode in the D revission. But now where can I look to find the command sequence used by the driver? Where can I find the initialisation sequence for the uboot flash driver? best regards Joerg ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/4] arm, omap3: Add support for TechNexion modules
On 21/11/2011 09:48, Tapani Utriainen wrote: Add support for TechNexion TAO3530 SoM Signed-off-by: Tapani Utriainen tap...@technexion.com CC: Sandeep Paulraj s-paul...@ti.com --- Hi Tapani, arch/arm/include/asm/mach-types.h |1 board/technexion/tao3530/Makefile | 43 board/technexion/tao3530/tao3530.c | 207 board/technexion/tao3530/tao3530.h | 382 + boards.cfg |1 include/configs/tao3530.h | 362 +++ 6 files changed, 996 insertions(+) Most my comments from TAM3517 are still valid for this module. I post here only new comments ;-) I think you have already got the comment, but you should better explain in the commit message what the patch does. This patch is different from the TAM3517 patch, but both share the same commit message. diff --git a/board/technexion/tao3530/Makefile b/board/technexion/tao3530/Makefile new file mode 100644 index 000..59c7d4f --- /dev/null +++ b/board/technexion/tao3530/Makefile @@ -0,0 +1,43 @@ +# +# 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. Author, Copyright ? diff --git a/board/technexion/tao3530/tao3530.c b/board/technexion/tao3530/tao3530.c new file mode 100644 index 000..b8a4ac8 --- /dev/null +++ b/board/technexion/tao3530/tao3530.c @@ -0,0 +1,207 @@ +/* + * Maintainer : + * Tapani Utriainen linux...@technexion.com + * The correct and used way is to set author and copyright in the header file, and put the maintainer name in the MAINTAINER file. +/* + * Routine: misc_init_r + * Description: Configure board specific parts + */ +int misc_init_r(void) +{ + struct gpio *gpio5_base = (struct gpio *)OMAP34XX_GPIO5_BASE; + struct gpio *gpio6_base = (struct gpio *)OMAP34XX_GPIO6_BASE; + + twl4030_power_init(); + twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON); + + + /* Configure GPIOs to output */ + /* GPIO23 */ + writel(~(GPIO10 | GPIO8 | GPIO2 | GPIO1), gpio6_base-oe); + writel(~(GPIO31 | GPIO30 | GPIO22 | GPIO21 | + GPIO15 | GPIO14 | GPIO13 | GPIO12), gpio5_base-oe); You have already used the GPIO framework - why do you write directly the registers ? This should be fixed globally. + + /* Set GPIOs */ + writel(GPIO10 | GPIO8 | GPIO2 | GPIO1, + gpio6_base-setdataout); + writel(GPIO31 | GPIO30 | GPIO29 | GPIO28 | GPIO22 | GPIO21 | + GPIO15 | GPIO14 | GPIO13 | GPIO12, gpio5_base-setdataout); + +#if defined(CONFIG_CMD_NET) + setup_net_chip(); +#endif + dieid_num_r(); + + /* Set memory size environment variable, depending on revision */ + switch (tao3530_revision()) { + case 0x2: /* Rev C1 -- 256MB */ + setenv(mem_size, mem=256M); mmmhh...memory is computed with get_ram_size(), not on the revision number. best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: off...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] net: Armada100: Fix compilation warnings
-Original Message- From: Anatolij Gustschin [mailto:ag...@denx.de] Sent: Sunday, November 20, 2011 3:39 AM To: Prafulla Wadaskar Cc: Ajay Bhargav; u-boot@lists.denx.de Subject: Re: [U-Boot] [PATCH] net: Armada100: Fix compilation warnings Hi Praffula, On Mon, 31 Oct 2011 16:49:37 +0530 Ajay Bhargav ajay.bhar...@einfochips.com wrote: This patch fix compilation warnings for Armada100 FEC driver Ref: warning: dereferencing type-punned pointer will break strict-aliasing rules Signed-off-by: Ajay Bhargav ajay.bhar...@einfochips.com --- drivers/net/armada100_fec.c | 14 ++ 1 files changed, 10 insertions(+), 4 deletions(-) Acked-by: Anatolij Gustschin ag...@denx.de Could you apply this patch and send a pull request? Applied to u-boot-marvell.git master branch Regards.. Prafulla . . ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/3] ARM: add support for LaCie 2Big Network v2
-Original Message- From: Simon Guinot [mailto:si...@sequanux.org] Sent: Wednesday, November 09, 2011 10:32 PM To: Prafulla Wadaskar Cc: u-boot@lists.denx.de; Albert ARIBAUD; Simon Guinot Subject: [PATCH v2 2/3] ARM: add support for LaCie 2Big Network v2 From: Simon Guinot simon.gui...@sequanux.org This patch adds support for the LaCie 2Big Network v2 board, based on the Marvell Kirkwood 6281 SoC. Additional information is available at: http://lacie-nas.org/doku.php?id=2big_network_v2 Signed-off-by: Simon Guinot simon.gui...@sequanux.org --- No changes in v2. MAINTAINERS |1 + board/LaCie/net2big_v2/Makefile | 49 + board/LaCie/net2big_v2/kwbimage.cfg | 162 ++ board/LaCie/net2big_v2/net2big_v2.c | 188 +++ board/LaCie/net2big_v2/net2big_v2.h | 43 boards.cfg |1 + include/configs/net2big_v2.h| 161 ++ 7 files changed, 605 insertions(+), 0 deletions(-) create mode 100644 board/LaCie/net2big_v2/Makefile create mode 100644 board/LaCie/net2big_v2/kwbimage.cfg create mode 100644 board/LaCie/net2big_v2/net2big_v2.c create mode 100644 board/LaCie/net2big_v2/net2big_v2.h create mode 100644 include/configs/net2big_v2.h Applied to u-boot-marvell.git master branch Regards.. Prafulla . . . ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Efika: Configure additional regulators for HDMI output
On 21/11/2011 07:16, Marek Vasut wrote: 2011/11/20 Marek Vasut marek.va...@gmail.com HDMI output doesn't work with current u-boot-imx tree (no LCD output after 'setenv stdout lcd'), but works with current u-boot-marex/efikasb tree. Ok, so are you debugging it or not ? No, I thought that if it works with u-boot-marex/efikasb, it's only a question of getting some more patches into u-boot-imx. Ah ok, nevermind, it seems it can't work yet -- I'll have to recheck. Ok - then I'll drop the patch from u-boot-imx, because it is not working (or it is not enough) Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: off...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/3] mvsata: fix ide_preinit for missing disks
-Original Message- From: Simon Guinot [mailto:si...@sequanux.org] Sent: Wednesday, November 09, 2011 10:32 PM To: Prafulla Wadaskar Cc: u-boot@lists.denx.de; Albert ARIBAUD; Simon Guinot Subject: [PATCH v2 1/3] mvsata: fix ide_preinit for missing disks From: Simon Guinot simon.gui...@sequanux.org Consider that ide_preinit() succeed if at least one port is successfully initialized. This allows to iniatialize IDE support on a board with two SATA ports but a single hard disk available. Signed-off-by: Simon Guinot simon.gui...@sequanux.org --- Changes in v2: - Use MVSATA_xxx defines for exit codes. drivers/block/mvsata_ide.c | 14 -- 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/block/mvsata_ide.c b/drivers/block/mvsata_ide.c index 1be395f..a88d0f7 100644 --- a/drivers/block/mvsata_ide.c +++ b/drivers/block/mvsata_ide.c @@ -150,23 +150,25 @@ static int mvsata_ide_initialize_port(struct mvsata_port_registers *port) int ide_preinit(void) { + int ret = MVSATA_STATUS_TIMEOUT; int status; + /* Enable ATA port 0 (could be SATA port 0 or 1) if declared */ #if defined(CONFIG_SYS_ATA_IDE0_OFFSET) status = mvsata_ide_initialize_port( (struct mvsata_port_registers *) (CONFIG_SYS_ATA_BASE_ADDR + CONFIG_SYS_ATA_IDE0_OFFSET)); - if (status) - return status; + if (status == MVSATA_STATUS_OK) + ret = MVSATA_STATUS_OK; #endif /* Enable ATA port 1 (could be SATA port 0 or 1) if declared */ #if defined(CONFIG_SYS_ATA_IDE1_OFFSET) status = mvsata_ide_initialize_port( (struct mvsata_port_registers *) (CONFIG_SYS_ATA_BASE_ADDR + CONFIG_SYS_ATA_IDE1_OFFSET)); - if (status) - return status; + if (status == MVSATA_STATUS_OK) + ret = MVSATA_STATUS_OK; #endif - /* return success if all ports initializations succeeded */ - return MVSATA_STATUS_OK; + /* Return success if at least one port initialization succeeded */ + return ret; } Applied to u-boot-marvell.git master branch Regards.. Prafulla . . -- 1.7.5.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] netspace_v2: Read Ethernet MAC address from EEPROM
-Original Message- From: Simon Guinot [mailto:si...@sequanux.org] Sent: Wednesday, November 16, 2011 4:02 PM To: Prafulla Wadaskar Cc: u-boot@lists.denx.de Subject: Re: [U-Boot] [PATCH v2] netspace_v2: Read Ethernet MAC address from EEPROM Hi Prafulla, On Tue, Nov 08, 2011 at 10:31:14PM +0100, Simon Guinot wrote: From: Simon Guinot simon.gui...@sequanux.org Signed-off-by: Simon Guinot simon.gui...@sequanux.org --- Changes in v2: - fix asm-offsets.s removal - make MAC address setup conditional to CONFIG_SYS_I2C_EEPROM_ADDR board/LaCie/netspace_v2/netspace_v2.c | 43 + include/configs/netspace_v2.h |1 + 2 files changed, 44 insertions(+), 0 deletions(-) Do you want me for some other modifications on this patch ? Regards, Simon diff --git a/board/LaCie/netspace_v2/netspace_v2.c b/board/LaCie/netspace_v2/netspace_v2.c index 7c4b15e..6938a43 100644 --- a/board/LaCie/netspace_v2/netspace_v2.c +++ b/board/LaCie/netspace_v2/netspace_v2.c @@ -24,6 +24,7 @@ #include miiphy.h #include netdev.h #include command.h +#include i2c.h #include asm/arch/cpu.h #include asm/arch/kirkwood.h #include asm/arch/mpp.h @@ -89,6 +90,48 @@ int board_init(void) return 0; } +int misc_init_r(void) +{ +#if defined(CONFIG_CMD_I2C) defined(CONFIG_SYS_I2C_EEPROM_ADDR) + if (!getenv(ethaddr)) { + ushort version; + uchar mac[6]; + int ret; + + /* I2C-0 for on-board EEPROM */ + i2c_set_bus_num(0); + + /* Check layout version for EEPROM data */ + ret = i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, 0, + CONFIG_SYS_I2C_EEPROM_ADDR_LEN, + (uchar *) version, 2); + if (ret != 0) { + printf(Error: failed to read I2C EEPROM @%02x\n, + CONFIG_SYS_I2C_EEPROM_ADDR); + return ret; + } + version = be16_to_cpu(version); + if (version 1 || version 3) { + printf(Error: unknown version %d for EEPROM data\n, + version); + return -1; + } + + /* Read Ethernet MAC address from EEPROM */ + ret = i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, 2, + CONFIG_SYS_I2C_EEPROM_ADDR_LEN, mac, 6); + if (ret != 0) { + printf(Error: failed to read I2C EEPROM @%02x\n, + CONFIG_SYS_I2C_EEPROM_ADDR); + return ret; + } + eth_setenv_enetaddr(ethaddr, mac); + } +#endif /* CONFIG_CMD_I2C CONFIG_SYS_I2C_EEPROM_ADDR */ + + return 0; +} + void mv_phy_88e1116_init(char *name) { u16 reg; diff --git a/include/configs/netspace_v2.h b/include/configs/netspace_v2.h index bb27ed7..1ddf4b4 100644 --- a/include/configs/netspace_v2.h +++ b/include/configs/netspace_v2.h @@ -87,6 +87,7 @@ * Ethernet Driver configuration */ #ifdef CONFIG_CMD_NET +#define CONFIG_MISC_INIT_R /* Call misc_init_r() to initialize MAC address */ #define CONFIG_MVGBE_PORTS {1, 0} /* enable port 0 only */ #define CONFIG_NETCONSOLE #endif -- 1.7.5.1 Applied to u-boot-marvell.git master branch Regards.. Prafulla . . . ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 3/3] ARM: remove duplicated code for LaCie boards
-Original Message- From: Simon Guinot [mailto:si...@sequanux.org] Sent: Wednesday, November 09, 2011 10:32 PM To: Prafulla Wadaskar Cc: u-boot@lists.denx.de; Albert ARIBAUD; Simon Guinot Subject: [PATCH v2 3/3] ARM: remove duplicated code for LaCie boards From: Simon Guinot simon.gui...@sequanux.org This patch groups together all the common functions for LaCie boards: Ethernet PHY and MAC address initializations. Moreover the configurations for LaCie Kirkwood boards are merged into a single file: include/configs/lacie_kw.h Signed-off-by: Simon Guinot simon.gui...@sequanux.org --- Patch added in v2. board/LaCie/common/common.c | 87 +++ board/LaCie/common/common.h | 20 board/LaCie/edminiv2/Makefile |5 +- board/LaCie/edminiv2/edminiv2.c | 30 +- board/LaCie/edminiv2/edminiv2.h | 41 --- board/LaCie/net2big_v2/Makefile |5 +- board/LaCie/net2big_v2/net2big_v2.c | 86 ++- board/LaCie/net2big_v2/net2big_v2.h |8 -- board/LaCie/netspace_v2/Makefile |5 +- board/LaCie/netspace_v2/netspace_v2.c | 84 ++- board/LaCie/netspace_v2/netspace_v2.h |8 -- boards.cfg|8 +- include/configs/lacie_kw.h| 193 + include/configs/net2big_v2.h | 161 - -- include/configs/netspace_v2.h | 179 - - 15 files changed, 340 insertions(+), 580 deletions(-) Good savings.. Applied to u-boot-marvell.git master branch Regards.. Prafulla . . . ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/2] smsc95xx: Debug message cleanup
Hi Simon, On 11/16/2011 12:22 AM, Simon Glass wrote: On Tue, Nov 15, 2011 at 1:19 AM, Wolfgang Grandegger w...@denx.de wrote: Cc: Simon Glass s...@chromium.org Cc: Mike Frysinger vap...@gentoo.org Signed-off-by: Wolfgang Grandegger w...@denx.de --- drivers/usb/eth/smsc95xx.c | 10 +++--- 1 files changed, 3 insertions(+), 7 deletions(-) Acked-by: Simon Glass s...@chromium.org Thanks. Who will take care of these patches? Do you know? Wolfgang. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Pull request for u-boot-marvell.git
Dear Albert Kindly pull The following changes since commit d3089594c2483ae8cc8932f25812a4dcf19712af: Sanjeev Premi (1): omap3evm: Add support for EFI partitions are available in the git repository at: u-boot-marvell.git master branch. Ajay Bhargav (1): net: Armada100: Fix compilation warnings Simon Guinot (4): netspace_v2: Read Ethernet MAC address from EEPROM mvsata: fix ide_preinit for missing disks ARM: add support for LaCie 2Big Network v2 ARM: remove duplicated code for LaCie boards MAINTAINERS|1 + board/LaCie/common/common.c| 87 +++ board/LaCie/common/common.h| 20 +++ board/LaCie/edminiv2/Makefile |5 +- board/LaCie/edminiv2/edminiv2.c| 30 + board/LaCie/net2big_v2/Makefile| 52 +++ board/LaCie/net2big_v2/kwbimage.cfg| 162 board/LaCie/net2big_v2/net2big_v2.c| 126 +++ .../edminiv2.h = net2big_v2/net2big_v2.h} | 32 ++--- board/LaCie/netspace_v2/Makefile |5 +- board/LaCie/netspace_v2/netspace_v2.c | 51 ++- board/LaCie/netspace_v2/netspace_v2.h |8 - boards.cfg |7 +- drivers/block/mvsata_ide.c | 14 +- drivers/net/armada100_fec.c| 14 ++- include/configs/{netspace_v2.h = lacie_kw.h} | 29 +++- 16 files changed, 530 insertions(+), 113 deletions(-) create mode 100644 board/LaCie/common/common.c create mode 100644 board/LaCie/common/common.h create mode 100644 board/LaCie/net2big_v2/Makefile create mode 100644 board/LaCie/net2big_v2/kwbimage.cfg create mode 100644 board/LaCie/net2big_v2/net2big_v2.c rename board/LaCie/{edminiv2/edminiv2.h = net2big_v2/net2big_v2.h} (50%) rename include/configs/{netspace_v2.h = lacie_kw.h} (88% Regards.. Prafulla . . . ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Efika: Configure additional regulators for HDMI output
On 21/11/2011 07:16, Marek Vasut wrote: 2011/11/20 Marek Vasut marek.va...@gmail.com HDMI output doesn't work with current u-boot-imx tree (no LCD output after 'setenv stdout lcd'), but works with current u-boot-marex/efikasb tree. Ok, so are you debugging it or not ? No, I thought that if it works with u-boot-marex/efikasb, it's only a question of getting some more patches into u-boot-imx. Ah ok, nevermind, it seems it can't work yet -- I'll have to recheck. Ok - then I'll drop the patch from u-boot-imx, because it is not working (or it is not enough) No, you don't understand. This patch is important, leave it there! The code which registers the ipuv3 is still missing, that's the point. M ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] mx5: Correct a warning in clock.c
On 20/11/2011 06:43, Simon Glass wrote: OK, I have no problem with it, but this problem may not show up for people using vanilla MAKEALL, hence Stefano's email. Right - I was asking myself why I could not see the warning, now it is clear to me. Acked-by: Stefano Babic sba...@denx.de Tested on mx51evk. Tested-By: Stefano Babic sba...@denx.de Best regards, Stefano -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: off...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/2] smsc95xx: Debug message cleanup
On 21/11/2011 11:49, Wolfgang Grandegger wrote: Hi Simon, On 11/16/2011 12:22 AM, Simon Glass wrote: On Tue, Nov 15, 2011 at 1:19 AM, Wolfgang Grandegger w...@denx.de wrote: Cc: Simon Glass s...@chromium.org Cc: Mike Frysinger vap...@gentoo.org Signed-off-by: Wolfgang Grandegger w...@denx.de --- drivers/usb/eth/smsc95xx.c | 10 +++--- 1 files changed, 3 insertions(+), 7 deletions(-) Acked-by: Simon Glass s...@chromium.org Thanks. Who will take care of these patches? Do you know? Wolfgang. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot Hi Wolfgang, I have already merged your patches into u-boot-staging, sba...@denx.de branch, and sent a pull request to Wolfgang (Denk). Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: off...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Efika: Configure additional regulators for HDMI output
On 21/11/2011 12:03, Marek Vasut wrote: Ok - then I'll drop the patch from u-boot-imx, because it is not working (or it is not enough) No, you don't understand. This patch is important, leave it there! Ok, the patch does not hurt at all The code which registers the ipuv3 is still missing, that's the point. ...no surprise it does not work... Stefano -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: off...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] GREETING IN CHRIST JESUS DEAR KINDLY VIEW THE ATTACHED FILE AND GO THROUGH IT VERY URGENTLY
___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] arm, post: add missing post_time_ms for arm
Hi Heiko, On 09/15/2011 07:34 AM, Heiko Schocher wrote: Signed-off-by: Heiko Schocher h...@denx.de Cc: Albert ARIBAUD albert.u.b...@aribaud.net --- post/post.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/post/post.c b/post/post.c index 6c59f91..0bfca75 100644 --- a/post/post.c +++ b/post/post.c @@ -488,7 +488,7 @@ void post_reloc(void) */ unsigned long post_time_ms(unsigned long base) { -#ifdef CONFIG_PPC +#if defined(CONFIG_PPC) || defined(CONFIG_ARM) return (unsigned long)(get_ticks() / (get_tbclk() / CONFIG_SYS_HZ)) - base; #else this commit breaks post test support for our keymile arm boards: make km_kirkwood [...] post/libpost.o: In function `post_time_ms': /daten/ws_root/hbu/u-boot-km.git/post/post.c:504: undefined reference to `get_ticks' /daten/ws_root/hbu/u-boot-km.git/post/post.c:504: undefined reference to `get_tbclk' So it seems that the kirkwood code has no implementation for these functions. Any idea how to fix this? Best regards Holger ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V2 1/6] i.mx: introduce the armv7/imx-common folder
On 18/11/2011 08:11, Jason Liu wrote: In order to support the coming MX6 platform and to reducde the duplicated code, we had better move some common files or functions to the imx-common folder for sharing. This patch does the following: - move speed.c file from armv7/mx5/speed.c to armv7/imx-common/speed.c - move armv7/mx5/timer.c to armv7/imx-common/timer.c, no any new feature added but just fix the checkpatch errors in the old file and remove the CONFIG_SYS_MX5_CLK32 reference in the file - create one new file cpu.c file to store the common function with i.mx5/6 Signed-off-by: Jason Liu jason@linaro.org Cc:Stefano Babic sba...@denx.de Acked-by: Stefano Babic sba...@denx.de Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: off...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/2] efikamx: Configure the pins as GPIOs prior to using gpio_get_value.
Configure the pins as GPIOs prior to using gpio_get_value Cc: Marek Vasut marek.va...@gmail.com Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- board/efikamx/efikamx.c | 13 + 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/board/efikamx/efikamx.c b/board/efikamx/efikamx.c index 3d2cc1a..b911891 100644 --- a/board/efikamx/efikamx.c +++ b/board/efikamx/efikamx.c @@ -308,10 +308,14 @@ struct fsl_esdhc_cfg esdhc_cfg[2] = { static inline uint32_t efika_mmc_cd(void) { - if (machine_is_efikamx()) + if (machine_is_efikamx()) { + mxc_request_iomux(MX51_PIN_GPIO1_0, IOMUX_CONFIG_ALT1); return MX51_PIN_GPIO1_0; - else + + } else { + mxc_request_iomux(MX51_PIN_EIM_CS2, IOMUX_CONFIG_ALT1); return MX51_PIN_EIM_CS2; + } } int board_mmc_getcd(u8 *absent, struct mmc *mmc) @@ -321,9 +325,10 @@ int board_mmc_getcd(u8 *absent, struct mmc *mmc) if (cfg-esdhc_base == MMC_SDHC1_BASE_ADDR) *absent = gpio_get_value(IOMUX_TO_GPIO(cd)); - else + else { + mxc_request_iomux(MX51_PIN_GPIO1_8, IOMUX_CONFIG_ALT0); *absent = gpio_get_value(IOMUX_TO_GPIO(MX51_PIN_GPIO1_8)); - + } return 0; } -- 1.6.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/2] vision2: Configure the pins as GPIOs prior to using gpio_get_value.
Configure the pin as GPIO prior to using gpio_get_value Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- board/ttcontrol/vision2/vision2.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/board/ttcontrol/vision2/vision2.c b/board/ttcontrol/vision2/vision2.c index f556d30..e0fa39d 100644 --- a/board/ttcontrol/vision2/vision2.c +++ b/board/ttcontrol/vision2/vision2.c @@ -529,8 +529,11 @@ int get_mmc_getcd(u8 *cd, struct mmc *mmc) { struct fsl_esdhc_cfg *cfg = (struct fsl_esdhc_cfg *)mmc-priv; - if (cfg-esdhc_base == MMC_SDHC1_BASE_ADDR) + if (cfg-esdhc_base == MMC_SDHC1_BASE_ADDR) { + mxc_request_iomux(MX51_PIN_GPIO1_0, IOMUX_CONFIG_ALT1); *cd = gpio_get_value(0); + } + else *cd = 0; -- 1.6.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/2] image: add support for Android's boot image format
This patch adds support for the Android boot-image format. The header file is from the Android project and got slightly alterted so the struct + its defines are not generic but have something like a namespace. The header file is from bootloader/legacy/include/boot/bootimg.h. The header parsing has been written from scratch and I looked at bootloader/legacy/usbloader/usbloader.c for some details. The image contains the physical address (load address) of the kernel and ramdisk. This address is considered only for the kernel image. The second image is currently ignored. I haven't found anything that is creating this. Cc: Wolfgang Denk w...@denx.de Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- common/cmd_bootm.c | 87 +- common/image.c | 17 + include/android_image.h | 89 +++ include/image.h |4 ++ 4 files changed, 196 insertions(+), 1 deletions(-) create mode 100644 include/android_image.h diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index d301332..3a4efe4 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -36,6 +36,7 @@ #include lmb.h #include linux/ctype.h #include asm/byteorder.h +#include android_image.h #if defined(CONFIG_CMD_USB) #include usb.h @@ -188,10 +189,33 @@ static void bootm_start_lmb(void) #endif } +#ifdef CONFIG_ANDROID_BOOT_IMAGE +static u32 android_img_get_end(struct andr_img_hdr *hdr) +{ + u32 size = 0; + /* +* The header takes a full page, the remaining components are aligned +* on page boundary +*/ + size += hdr-page_size; + size += ALIGN(hdr-kernel_size, hdr-page_size); + size += ALIGN(hdr-ramdisk_size, hdr-page_size); + size += ALIGN(hdr-second_size, hdr-page_size); + + return size; +} + +static u32 android_img_get_kload(struct andr_img_hdr *hdr) +{ + return hdr-kernel_addr; +} +#endif + static int bootm_start(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { void*os_hdr; int ret; + int img_type; memset((void *)images, 0, sizeof(images)); images.verify = getenv_yesno(verify); @@ -207,7 +231,8 @@ static int bootm_start(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[] } /* get image parameters */ - switch (genimg_get_format(os_hdr)) { + img_type = genimg_get_format(os_hdr); + switch (img_type) { case IMAGE_FORMAT_LEGACY: images.os.type = image_get_type(os_hdr); images.os.comp = image_get_comp(os_hdr); @@ -249,6 +274,16 @@ static int bootm_start(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[] } break; #endif +#ifdef CONFIG_ANDROID_BOOT_IMAGE + case IMAGE_FORMAT_ANDROID: + images.os.type = IH_TYPE_KERNEL; + images.os.comp = IH_COMP_NONE; + images.os.os = IH_OS_LINUX; + + images.os.end = android_img_get_end(os_hdr); + images.os.load = android_img_get_kload(os_hdr); + break; +#endif default: puts(ERROR: unknown image format type!\n); return 1; @@ -266,6 +301,10 @@ static int bootm_start(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[] return 1; } #endif +#ifdef CONFIG_ANDROID_BOOT_IMAGE + } else if (img_type == IMAGE_FORMAT_ANDROID) { + images.ep = images.os.load; +#endif } else { puts(Could not find kernel entry point!\n); return 1; @@ -806,6 +845,36 @@ static int fit_check_kernel(const void *fit, int os_noffset, int verify) } #endif /* CONFIG_FIT */ +#ifdef CONFIG_ANDROID_BOOT_IMAGE +static char andr_tmp_str[ANDR_BOOT_ARGS_SIZE + 1]; +static int android_image_get_kernel(struct andr_img_hdr *hdr, int verify) +{ + /* +* Not all Android tools use the id field for signing the image with +* sha1 (or anything) so we don't check it. It is not obvious that the +* string is null terminated so we take care of this. +*/ + strncpy(andr_tmp_str, hdr-name, ANDR_BOOT_NAME_SIZE); + andr_tmp_str[ANDR_BOOT_NAME_SIZE] = '\0'; + if (strlen(andr_tmp_str)) + printf(Android's image name: %s\n, andr_tmp_str); + + printf(Kernel load addr 0x%08x size %u KiB\n, + hdr-kernel_addr, DIV_ROUND_UP(hdr-kernel_size, 1024)); + strncpy(andr_tmp_str, hdr-cmdline, ANDR_BOOT_ARGS_SIZE); + andr_tmp_str[ANDR_BOOT_ARGS_SIZE] = '\0'; + if (strlen(andr_tmp_str)) { + printf(Kernel command line: %s\n, andr_tmp_str); + setenv(bootargs, andr_tmp_str); + } + if (hdr-ramdisk_size) + printf(RAM disk load addr 0x%08x size %u KiB\n, +
[U-Boot] [PATCH 2/2] usb/gadget: add the fastboot gadget
This patch contains an implementation of the fastboot protocol on the device side and a little of documentation. The gadget expects the new-style gadget framework. The gadget implements the getvar, reboot, download and reboot commands. What is missing is the flash handling i.e. writting the image to media. Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- common/Makefile |2 + common/cmd_fastboot.c| 28 ++ doc/README.android-fastboot | 86 ++ doc/README.android-fastboot-protocol | 170 ++ drivers/usb/gadget/Makefile |5 + drivers/usb/gadget/f_fastboot.c | 559 ++ drivers/usb/gadget/g_fastboot.h | 20 ++ drivers/usb/gadget/u_fastboot.c | 308 +++ include/usb/fastboot.h | 100 ++ 9 files changed, 1278 insertions(+), 0 deletions(-) create mode 100644 common/cmd_fastboot.c create mode 100644 doc/README.android-fastboot create mode 100644 doc/README.android-fastboot-protocol create mode 100644 drivers/usb/gadget/f_fastboot.c create mode 100644 drivers/usb/gadget/g_fastboot.h create mode 100644 drivers/usb/gadget/u_fastboot.c create mode 100644 include/usb/fastboot.h diff --git a/common/Makefile b/common/Makefile index 1b672ad..9d6659e 100644 --- a/common/Makefile +++ b/common/Makefile @@ -162,6 +162,8 @@ COBJS-y += cmd_usb.o COBJS-y += usb.o COBJS-$(CONFIG_USB_STORAGE) += usb_storage.o endif +COBJS-$(CONFIG_CMD_FASTBOOT) += cmd_fastboot.o + COBJS-$(CONFIG_CMD_XIMG) += cmd_ximg.o COBJS-$(CONFIG_YAFFS2) += cmd_yaffs2.o diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c new file mode 100644 index 000..9a656dd --- /dev/null +++ b/common/cmd_fastboot.c @@ -0,0 +1,28 @@ +#include common.h +#include command.h +#include usb/fastboot.h + +static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) +{ + int ret = 1; + + if (!fastboot_init()) { + printf(Fastboot entered...\n); + + ret = 0; + + while (1) { + if (fastboot_poll()) + break; + } + } + + fastboot_shutdown(); + return ret; +} + +U_BOOT_CMD( + fastboot, 1, 1, do_fastboot, + fastboot- use USB Fastboot protocol\n, + +); diff --git a/doc/README.android-fastboot b/doc/README.android-fastboot new file mode 100644 index 000..4b2a9aa --- /dev/null +++ b/doc/README.android-fastboot @@ -0,0 +1,86 @@ +Android Fastboot + + +Overview + +The protocol that is used over USB is described in +README.android-fastboot-protocol in same folder. + +The current implementation does not yet support the flash and erase +commands. + +Client installation +=== +The counterpart to this gadget is the fastboot client which can +be found in Android's platform/system/core repository in the fastboot +folder. It runs on Windows, Linux and even OSx. Linux user are lucky since +they only need libusb. +Windows users need to bring some time until they have Android SDK (currently +http://dl.google.com/android/installer_r12-windows.exe) installed. You +need to install ADB package which contains the required glue libraries for +accessing USB. Also you need Google USB driver package and SDK platform +tools. Once installed the usb driver is placed in your SDK folder under +extras\google\usb_driver. The android_winusb.inf needs a line like + + %SingleBootLoaderInterface% = USB_Install, USB\VID_0451PID_D022 + +either in the [Google.NTx86] section for 32bit Windows or [Google.NTamd64] +for 64bit Windows. VID and PID should match whatever the fastboot is +advertising. + +Board specific +== +The gadget calls at probe time the function fastboot_board_init() which +should be provided by the board to setup its specific configuration. +It is possible here to overwrite specific strings like Vendor or Serial +number. Strings which are not specified here will return a default value. +This init function must also provide a memory area for the +transfer_buffer and its size. This buffer should be large enough to hold +whatever the download commands is willing to send or it will fail. This +can be a kernel image for booting which could be around two MiB or a flash +partition which could be slightly larger :) + +In Action += +Enter into fastboot by executing the fastboot command in u-boot and you +should see: +|Fastboot entered... + +The gadget terminates once the is unplugged. On the client side you can +fetch the product name for instance: +|fastboot getvar product +|product: Default Product +|finished. total time: 0.016s + +or initiate a reboot: +|fastboot reboot + +and once the client comes back, the board should reset. + +You can also specify a kernel image to boot. You have to either specify +the an image in Android format _or_ pass a binary kernel and
Re: [U-Boot] [PATCH] arm, post: add missing post_time_ms for arm
Hello Holger, added Prafulla Wadaskar to cc ... Holger Brunck wrote: Hi Heiko, On 09/15/2011 07:34 AM, Heiko Schocher wrote: Signed-off-by: Heiko Schocher h...@denx.de Cc: Albert ARIBAUD albert.u.b...@aribaud.net --- post/post.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/post/post.c b/post/post.c index 6c59f91..0bfca75 100644 --- a/post/post.c +++ b/post/post.c @@ -488,7 +488,7 @@ void post_reloc(void) */ unsigned long post_time_ms(unsigned long base) { -#ifdef CONFIG_PPC +#if defined(CONFIG_PPC) || defined(CONFIG_ARM) return (unsigned long)(get_ticks() / (get_tbclk() / CONFIG_SYS_HZ)) - base; #else this commit breaks post test support for our keymile arm boards: :-( I am sure I tried a MAKEALL arm ... Hmm.. how did the post support worked for you before this patch? You should have seen this warning message: #warning Not implemented yet or? make km_kirkwood [...] post/libpost.o: In function `post_time_ms': /daten/ws_root/hbu/u-boot-km.git/post/post.c:504: undefined reference to `get_ticks' /daten/ws_root/hbu/u-boot-km.git/post/post.c:504: undefined reference to `get_tbclk' So it seems that the kirkwood code has no implementation for these functions. Any idea how to fix this? We must implement it ... Prafulla, can you comment this? 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
[U-Boot] OpenNand Support?
Hello All, We are using MT29F32G08CBABAWP on our board. I would like to know whether the OpenNand interface is already supported in U-Boot? Also, could you please let me know where I can find more information to write OpenNand Interface driver for U-Boot? Thanks and Regards, Mahavir ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 10/14] OMAP3 SPL: Add identify_nand_chip function
On Mon, Nov 21, 2011 at 12:04 AM, Igor Grinberg grinb...@compulab.co.il wrote: On 11/20/11 16:26, Tom Rini wrote: On Sun, Nov 20, 2011 at 12:36 AM, Igor Grinberg grinb...@compulab.co.il wrote: Hi Tom, On 11/19/11 00:48, Tom Rini wrote: A number of boards are populated with a PoP chip for both DDR and NAND memory. Other boards may simply use this as an easy way to identify board revs. So we provide a function that can be called early to reset the NAND chip and return the result of NAND_CMD_READID. All of this code is put into spl_id_nand.c and controlled via CONFIG_SPL_OMAP3_ID_NAND. Signed-off-by: Tom Rini tr...@ti.com --- arch/arm/cpu/armv7/omap3/Makefile | 3 + arch/arm/cpu/armv7/omap3/spl_id_nand.c | 87 +++ arch/arm/include/asm/arch-omap3/sys_proto.h | 1 + 3 files changed, 91 insertions(+), 0 deletions(-) create mode 100644 arch/arm/cpu/armv7/omap3/spl_id_nand.c diff --git a/arch/arm/cpu/armv7/omap3/Makefile b/arch/arm/cpu/armv7/omap3/Makefile index 8e85891..4b38e45 100644 --- a/arch/arm/cpu/armv7/omap3/Makefile +++ b/arch/arm/cpu/armv7/omap3/Makefile @@ -31,6 +31,9 @@ COBJS += board.o COBJS += clock.o COBJS += mem.o COBJS += sys_info.o +ifdef CONFIG_SPL_BUILD +COBJS-$(CONFIG_SPL_OMAP3_ID_NAND) += spl_id_nand.o +endif You haven't responded to my question on the above stuff. Otherwise all the series look good to me. Missed that, sorry! Original version available at: http://www.mail-archive.com/u-boot@lists.denx.de/msg68828.html Here is the relevant part: diff --git a/arch/arm/cpu/armv7/omap3/Makefile b/arch/arm/cpu/armv7/omap3/Makefile index 8e85891..772f3d4 100644 --- a/arch/arm/cpu/armv7/omap3/Makefile +++ b/arch/arm/cpu/armv7/omap3/Makefile @@ -31,6 +31,9 @@ COBJS += board.o COBJS += clock.o COBJS += mem.o COBJS += sys_info.o +ifdef CONFIG_SPL_BUILD +COBJS-$(CONFIG_SPL_OMAP3_POP_PROBE) += spl_pop_probe.o +endif Can't CONFIG_SPL_OMAP3_..._PROBE symbol default to no and depend on CONFIG_SPL_BUILD, so you don't need to enclose it in #ifdef? But then it would build for both SPL and non-SPL cases. No, it should not. What do you think of the following: In the Makefile have only: COBJS-$(CONFIG_SPL_OMAP3_POP_PROBE) += spl_pop_probe.o Then in the spl_pop_probe.c have this type of check: #ifndef CONFIG_SPL_BUILD # error CONFIG_SPL_OMAP3_POP_PROBE requires CONFIG_SPL_BUILD #endif This way, you require the CONFIG_SPL_OMAP3_POP_PROBE symbol be a part of the CONFIG_SPL_BUILD symbols group. Well, if we always link this, but then #error, U-Boot won't build :) No you do not always link this... please, read more carefully... Only when CONFIG_SPL_OMAP3_POP_PROBE symbol is defined, the file will be compiled, but if CONFIG_SPL_OMAP3_POP_PROBE defined without CONFIG_SPL_BUILD being defined, then it will emit an error. So make the config file do: #ifdef CONFIG_SPL_BUILD #define CONFIG_SPL_OMAP3_POP_PROBE #endif ? That's now how the rest of the SPL code works. -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] efikamx: Configure the pins as GPIOs prior to using gpio_get_value.
Configure the pins as GPIOs prior to using gpio_get_value Cc: Marek Vasut marek.va...@gmail.com Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- board/efikamx/efikamx.c | 13 + 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/board/efikamx/efikamx.c b/board/efikamx/efikamx.c index 3d2cc1a..b911891 100644 --- a/board/efikamx/efikamx.c +++ b/board/efikamx/efikamx.c @@ -308,10 +308,14 @@ struct fsl_esdhc_cfg esdhc_cfg[2] = { static inline uint32_t efika_mmc_cd(void) { - if (machine_is_efikamx()) + if (machine_is_efikamx()) { + mxc_request_iomux(MX51_PIN_GPIO1_0, IOMUX_CONFIG_ALT1); return MX51_PIN_GPIO1_0; - else + + } else { + mxc_request_iomux(MX51_PIN_EIM_CS2, IOMUX_CONFIG_ALT1); return MX51_PIN_EIM_CS2; + } } int board_mmc_getcd(u8 *absent, struct mmc *mmc) @@ -321,9 +325,10 @@ int board_mmc_getcd(u8 *absent, struct mmc *mmc) if (cfg-esdhc_base == MMC_SDHC1_BASE_ADDR) *absent = gpio_get_value(IOMUX_TO_GPIO(cd)); - else + else { + mxc_request_iomux(MX51_PIN_GPIO1_8, IOMUX_CONFIG_ALT0); *absent = gpio_get_value(IOMUX_TO_GPIO(MX51_PIN_GPIO1_8)); - + } return 0; } NAK. There should be some common function for setting up iomux of those pins. You souldn't set it in repeatedly called functions. M ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] arm, post: add missing post_time_ms for arm
Hi Heiko, On 11/21/2011 03:09 PM, Heiko Schocher wrote: Holger Brunck wrote: On 09/15/2011 07:34 AM, Heiko Schocher wrote: Signed-off-by: Heiko Schocher h...@denx.de Cc: Albert ARIBAUD albert.u.b...@aribaud.net --- post/post.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/post/post.c b/post/post.c index 6c59f91..0bfca75 100644 --- a/post/post.c +++ b/post/post.c @@ -488,7 +488,7 @@ void post_reloc(void) */ unsigned long post_time_ms(unsigned long base) { -#ifdef CONFIG_PPC +#if defined(CONFIG_PPC) || defined(CONFIG_ARM) return (unsigned long)(get_ticks() / (get_tbclk() / CONFIG_SYS_HZ)) - base; #else this commit breaks post test support for our keymile arm boards: :-( I am sure I tried a MAKEALL arm ... Hmm.. how did the post support I guess that our post support wasn't mainlined at the time you test the patch. worked for you before this patch? You should have seen this warning message: #warning Not implemented yet or? Yes we got these warning in the past but this wasn't a problem for us, because we don't use these timer informations in our framework. make km_kirkwood [...] post/libpost.o: In function `post_time_ms': /daten/ws_root/hbu/u-boot-km.git/post/post.c:504: undefined reference to `get_ticks' /daten/ws_root/hbu/u-boot-km.git/post/post.c:504: undefined reference to `get_tbclk' So it seems that the kirkwood code has no implementation for these functions. Any idea how to fix this? We must implement it ... Prafulla, can you comment this? Or in the first step just add !(CONFIG_MACH_KIRKWOOD) or similar to the #ifdef until it is supported in the generic kirkwood code. regards Holger ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 10/14] OMAP3 SPL: Add identify_nand_chip function
On 11/21/11 16:12, Tom Rini wrote: On Mon, Nov 21, 2011 at 12:04 AM, Igor Grinberg grinb...@compulab.co.il wrote: On 11/20/11 16:26, Tom Rini wrote: On Sun, Nov 20, 2011 at 12:36 AM, Igor Grinberg grinb...@compulab.co.il wrote: Hi Tom, On 11/19/11 00:48, Tom Rini wrote: A number of boards are populated with a PoP chip for both DDR and NAND memory. Other boards may simply use this as an easy way to identify board revs. So we provide a function that can be called early to reset the NAND chip and return the result of NAND_CMD_READID. All of this code is put into spl_id_nand.c and controlled via CONFIG_SPL_OMAP3_ID_NAND. Signed-off-by: Tom Rini tr...@ti.com --- arch/arm/cpu/armv7/omap3/Makefile |3 + arch/arm/cpu/armv7/omap3/spl_id_nand.c | 87 +++ arch/arm/include/asm/arch-omap3/sys_proto.h |1 + 3 files changed, 91 insertions(+), 0 deletions(-) create mode 100644 arch/arm/cpu/armv7/omap3/spl_id_nand.c diff --git a/arch/arm/cpu/armv7/omap3/Makefile b/arch/arm/cpu/armv7/omap3/Makefile index 8e85891..4b38e45 100644 --- a/arch/arm/cpu/armv7/omap3/Makefile +++ b/arch/arm/cpu/armv7/omap3/Makefile @@ -31,6 +31,9 @@ COBJS += board.o COBJS+= clock.o COBJS+= mem.o COBJS+= sys_info.o +ifdef CONFIG_SPL_BUILD +COBJS-$(CONFIG_SPL_OMAP3_ID_NAND)+= spl_id_nand.o +endif You haven't responded to my question on the above stuff. Otherwise all the series look good to me. Missed that, sorry! Original version available at: http://www.mail-archive.com/u-boot@lists.denx.de/msg68828.html Here is the relevant part: diff --git a/arch/arm/cpu/armv7/omap3/Makefile b/arch/arm/cpu/armv7/omap3/Makefile index 8e85891..772f3d4 100644 --- a/arch/arm/cpu/armv7/omap3/Makefile +++ b/arch/arm/cpu/armv7/omap3/Makefile @@ -31,6 +31,9 @@ COBJS += board.o COBJS += clock.o COBJS += mem.o COBJS += sys_info.o +ifdef CONFIG_SPL_BUILD +COBJS-$(CONFIG_SPL_OMAP3_POP_PROBE)+= spl_pop_probe.o +endif Can't CONFIG_SPL_OMAP3_..._PROBE symbol default to no and depend on CONFIG_SPL_BUILD, so you don't need to enclose it in #ifdef? But then it would build for both SPL and non-SPL cases. No, it should not. What do you think of the following: In the Makefile have only: COBJS-$(CONFIG_SPL_OMAP3_POP_PROBE) += spl_pop_probe.o Then in the spl_pop_probe.c have this type of check: #ifndef CONFIG_SPL_BUILD # error CONFIG_SPL_OMAP3_POP_PROBE requires CONFIG_SPL_BUILD #endif This way, you require the CONFIG_SPL_OMAP3_POP_PROBE symbol be a part of the CONFIG_SPL_BUILD symbols group. Well, if we always link this, but then #error, U-Boot won't build :) No you do not always link this... please, read more carefully... Only when CONFIG_SPL_OMAP3_POP_PROBE symbol is defined, the file will be compiled, but if CONFIG_SPL_OMAP3_POP_PROBE defined without CONFIG_SPL_BUILD being defined, then it will emit an error. So make the config file do: #ifdef CONFIG_SPL_BUILD #define CONFIG_SPL_OMAP3_POP_PROBE #endif ? That's now how the rest of the SPL code works. Well, yes I think it makes sense for all SPL related config options to do something like: #ifdef CONFIG_SPL_BUILD #define CONFIG_SPL_OMAP3_POP_PROBE #define CONFIG_SPL_... #define CONFIG_SPL_... #endif And the error message, I have proposed above, will prevent people from doing stupid things, like defining CONFIG_SPL_OMAP3_POP_PROBE without the CONFIG_SPL_BUILD. At least for now, until we have Kbuild with dependencies and stuff... -- Regards, Igor. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V2 2/6] i.mx: add the initial support for freescale i.MX6Q processor
On 18/11/2011 08:11, Jason Liu wrote: i.MX6Q is freescale quad core processors with ARM cortex_a9 complex. This patch is to add the initial support for this processor. Signed-off-by: Jason Liu jason@linaro.org Cc:Stefano Babic sba...@denx.de --- v2:put aips init to c code as Marek suggest remove the parenthesis such as (2) remork get_usdhcx_clk() to get_usdhc_clk(port) remove the iomux base init and assign it staticly correct the chip rev print-message(rev1.0) --- Hi Jason, please understand I cannot go deep into the review due to not yet published user manual - my comments are more related to how your code can be integrated in current IMX code. +#include common.h +#include asm/io.h +#include asm/errno.h +#include asm/arch/imx-regs.h +#include asm/arch/ccm_regs.h +#include asm/arch/clock.h + +enum pll_clocks { + PLL_SYS,/* System PLL */ + PLL_BUS,/* System Bus PLL*/ + PLL_USBOTG, /* OTG USB PLL */ + PLL_ENET, /* ENET PLL */ +}; + +struct imx_ccm_reg *imx_ccm = (struct imx_ccm_reg *)CCM_BASE_ADDR; Is it ok to initialize it here ? How does it work before and after relocation ? + + return PLL3_80M / (uart_podf + 1); +} + + One newline too much + if (cbcdr MXC_CCM_CBCDR_AXI_SEL) { + if (cbcdr MXC_CCM_CBCDR_AXI_ALT_SEL) + root_freq = PLL2_PFD2_FREQ; + else + root_freq = PLL3_PFD1_FREQ;; ^---one is enough Drop the redundant semicolon. +static u32 get_mmdc_ch0_clk(void) +{ + u32 cbcdr = __raw_readl(imx_ccm-cbcdr); + u32 mmdc_ch0_podf = (cbcdr MXC_CCM_CBCDR_MMDC_CH0_PODF_MASK) + MXC_CCM_CBCDR_MMDC_CH0_PODF_OFFSET; + + return get_periph_clk() / (mmdc_ch0_podf + 1); +} add a newline here +u32 imx_get_uartclk(void) +{ + return get_uart_clk(); +} This is ok - but I think we should switch to mxc_get_clock(MXC_UART_CLK) in serial_mxc.c. However, this should be done in another patch. + + printf(\n); + printf(IPG %8d kHz\n, mxc_get_clock(MXC_IPG_CLK) / 1000); + printf(UART%8d kHz\n, mxc_get_clock(MXC_UART_CLK) / 1000); + printf(CSPI%8d kHz\n, mxc_get_clock(MXC_CSPI_CLK) / 1000); + printf(AHB %8d kHz\n, mxc_get_clock(MXC_AHB_CLK) / 1000); + printf(AXI %8d kHz\n, mxc_get_clock(MXC_AXI_CLK) / 1000); + printf(DDR %8d kHz\n, mxc_get_clock(MXC_DDR_CLK) / 1000); + printf(USDHC1 %8d kHz\n, mxc_get_clock(MXC_ESDHC_CLK) / 1000); + printf(USDHC2 %8d kHz\n, mxc_get_clock(MXC_ESDHC2_CLK) / 1000); + printf(USDHC3 %8d kHz\n, mxc_get_clock(MXC_ESDHC3_CLK) / 1000); + printf(USDHC4 %8d kHz\n, mxc_get_clock(MXC_ESDHC4_CLK) / 1000); + printf(EMI SLOW%8d kHz\n, mxc_get_clock(MXC_EMI_SLOW_CLK) / 1000); + printf(IPG PERCLK %8d kHz\n, mxc_get_clock(MXC_IPG_PERCLK) / 1000); Not yet checked, but it seems to me that some lines are too long, are'nt they ? diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c new file mode 100644 index 000..dbf8b93 --- /dev/null +++ b/arch/arm/cpu/armv7/mx6/soc.c @@ -0,0 +1,93 @@ +/* + * (C) Copyright 2007 + * Sascha Hauer, Pengutronix + * + * (C) Copyright 2009 Freescale Semiconductor, Inc. + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You 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/errno.h +#include asm/io.h +#include asm/arch/imx-regs.h +#include asm/arch/clock.h +#include asm/arch/sys_proto.h + +u32 get_cpu_rev(void) +{ + int system_rev = 0x61000 | CHIP_REV_1_0; + + return system_rev; +} +#ifdef CONFIG_ARCH_CPU_INIT +void init_aips(void) +{ + u32 reg = AIPS1_ON_BASE_ADDR; I know that in manual (MX51, at least) this range is called AIPS1_ON_PLATFORM, but we used the name AIPS1_BASE_ADDR for MX51 and MX53. Could we stick with the same name ? It is easier for everybody starting with IMX if the registers with the same meaning. + + /* + * Set all MPROTx to be non-bufferable, trusted for R/W, +
Re: [U-Boot] [PATCH 2/2] usb/gadget: add the fastboot gadget
Hello. On Mon, 2011-11-21 at 15:09, Sebastian Andrzej Siewior wrote: This patch contains an implementation of the fastboot protocol on the device side and a little of documentation. The gadget expects the new-style gadget framework. Which what hardware do you test this? So far I have only seen patches (not applied yet) for the Samsung UDC controller that are providing the usb_gadget_register_driver() functions. Consumer is only ether.c so far. Any other hardware platforms that support the new style gadget framework yet? Do'n get me wrong, I like it and would like to see more drivers moving to it but I wonder what support on a hardware driver level we have for it yet. The gadget implements the getvar, reboot, download and reboot commands. What is missing is the flash handling i.e. writting the image to media. You may have seen the DFU patches on this list recently. There is also a split between the DFU protocol and the flashing backend. Would it make sense to see if fastboot and DFU could use the same flashing backend and platform specific bits? regards Stefan Schmidt ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V2 4/6] i.mx: serial_mxc: add the i.mx6q support
On 18/11/2011 08:11, Jason Liu wrote: Signed-off-by: Jason Liu jason@linaro.org Cc: Stefano Babic sba...@denx.de --- v2: Cc Stefano --- drivers/serial/serial_mxc.c | 10 +++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/serial/serial_mxc.c b/drivers/serial/serial_mxc.c index dcb4bd1..7d0f288 100644 --- a/drivers/serial/serial_mxc.c +++ b/drivers/serial/serial_mxc.c @@ -47,14 +47,18 @@ #elif defined(CONFIG_SYS_MX27_UART6) #define UART_PHYS 0x1001c000 #elif defined(CONFIG_SYS_MX35_UART1) || defined(CONFIG_SYS_MX51_UART1) || \ - defined(CONFIG_SYS_MX53_UART1) + defined(CONFIG_SYS_MX53_UART1) || defined(CONFIG_MX6Q_UART1) #define UART_PHYS UART1_BASE_ADDR #elif defined(CONFIG_SYS_MX35_UART2) || defined(CONFIG_SYS_MX51_UART2) || \ - defined(CONFIG_SYS_MX53_UART2) + defined(CONFIG_SYS_MX53_UART2) || defined(CONFIG_MX6Q_UART2) #define UART_PHYS UART2_BASE_ADDR #elif defined(CONFIG_SYS_MX35_UART3) || defined(CONFIG_SYS_MX51_UART3) || \ - defined(CONFIG_SYS_MX53_UART3) + defined(CONFIG_SYS_MX53_UART3) || defined(CONFIG_MX6Q_UART3) #define UART_PHYS UART3_BASE_ADDR +#elif defined(CONFIG_MX6Q_UART4) +#define UART_PHYS UART4_BASE_ADDR +#elif defined(CONFIG_MX6Q_UART5) +#define UART_PHYS UART5_BASE_ADDR #else #error define CONFIG_SYS_MXxx_UARTx to use the MXC UART driver #endif This is not a comment of your patch, but I cannot avoid to note how much crap in this file. And we have not yet added all possible values for each SOC, only the values necessary to build the actual boards. The worst thing is that we do not need all this stuff. We set a lot of #ifdef only to set the UART base address, and we really ignore (because unneeded) the CONFIG_SYS_*_UART_*. It should be really better to define the base address in the board configuration file, as we already do for other drivers (USB with ehci base address, SD,..). Maybe with a MXC_UART_BASE_ADDRESS, and we can get rid of all this bad stuff. I will prepare a patch... Best regards, Stefano Babic -- = DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: off...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 10/14] OMAP3 SPL: Add identify_nand_chip function
On 11/21/2011 07:41 AM, Igor Grinberg wrote: On 11/21/11 16:12, Tom Rini wrote: On Mon, Nov 21, 2011 at 12:04 AM, Igor Grinberg grinb...@compulab.co.il wrote: On 11/20/11 16:26, Tom Rini wrote: On Sun, Nov 20, 2011 at 12:36 AM, Igor Grinberg grinb...@compulab.co.il wrote: Hi Tom, On 11/19/11 00:48, Tom Rini wrote: A number of boards are populated with a PoP chip for both DDR and NAND memory. Other boards may simply use this as an easy way to identify board revs. So we provide a function that can be called early to reset the NAND chip and return the result of NAND_CMD_READID. All of this code is put into spl_id_nand.c and controlled via CONFIG_SPL_OMAP3_ID_NAND. Signed-off-by: Tom Rini tr...@ti.com --- arch/arm/cpu/armv7/omap3/Makefile |3 + arch/arm/cpu/armv7/omap3/spl_id_nand.c | 87 +++ arch/arm/include/asm/arch-omap3/sys_proto.h |1 + 3 files changed, 91 insertions(+), 0 deletions(-) create mode 100644 arch/arm/cpu/armv7/omap3/spl_id_nand.c diff --git a/arch/arm/cpu/armv7/omap3/Makefile b/arch/arm/cpu/armv7/omap3/Makefile index 8e85891..4b38e45 100644 --- a/arch/arm/cpu/armv7/omap3/Makefile +++ b/arch/arm/cpu/armv7/omap3/Makefile @@ -31,6 +31,9 @@ COBJS += board.o COBJS+= clock.o COBJS+= mem.o COBJS+= sys_info.o +ifdef CONFIG_SPL_BUILD +COBJS-$(CONFIG_SPL_OMAP3_ID_NAND)+= spl_id_nand.o +endif You haven't responded to my question on the above stuff. Otherwise all the series look good to me. Missed that, sorry! Original version available at: http://www.mail-archive.com/u-boot@lists.denx.de/msg68828.html Here is the relevant part: diff --git a/arch/arm/cpu/armv7/omap3/Makefile b/arch/arm/cpu/armv7/omap3/Makefile index 8e85891..772f3d4 100644 --- a/arch/arm/cpu/armv7/omap3/Makefile +++ b/arch/arm/cpu/armv7/omap3/Makefile @@ -31,6 +31,9 @@ COBJS += board.o COBJS += clock.o COBJS += mem.o COBJS += sys_info.o +ifdef CONFIG_SPL_BUILD +COBJS-$(CONFIG_SPL_OMAP3_POP_PROBE)+= spl_pop_probe.o +endif Can't CONFIG_SPL_OMAP3_..._PROBE symbol default to no and depend on CONFIG_SPL_BUILD, so you don't need to enclose it in #ifdef? But then it would build for both SPL and non-SPL cases. No, it should not. What do you think of the following: In the Makefile have only: COBJS-$(CONFIG_SPL_OMAP3_POP_PROBE) += spl_pop_probe.o Then in the spl_pop_probe.c have this type of check: #ifndef CONFIG_SPL_BUILD # error CONFIG_SPL_OMAP3_POP_PROBE requires CONFIG_SPL_BUILD #endif This way, you require the CONFIG_SPL_OMAP3_POP_PROBE symbol be a part of the CONFIG_SPL_BUILD symbols group. Well, if we always link this, but then #error, U-Boot won't build :) No you do not always link this... please, read more carefully... Only when CONFIG_SPL_OMAP3_POP_PROBE symbol is defined, the file will be compiled, but if CONFIG_SPL_OMAP3_POP_PROBE defined without CONFIG_SPL_BUILD being defined, then it will emit an error. So make the config file do: #ifdef CONFIG_SPL_BUILD #define CONFIG_SPL_OMAP3_POP_PROBE #endif ? That's now how the rest of the SPL code works. Well, yes I think it makes sense for all SPL related config options to do something like: #ifdef CONFIG_SPL_BUILD #define CONFIG_SPL_OMAP3_POP_PROBE #define CONFIG_SPL_... #define CONFIG_SPL_... #endif And the error message, I have proposed above, will prevent people from doing stupid things, like defining CONFIG_SPL_OMAP3_POP_PROBE without the CONFIG_SPL_BUILD. At least for now, until we have Kbuild with dependencies and stuff... Well, I guess the point I'd try and make is that it's not how SPL is done today. Really following the existing format would be (in the Makefile): ifdef CONFIG_SPL_BUILD ifdef CONFIG_SPL_OMAP3_ID_NAND COBJS-y += spl_id_nand.o endif endif I can see the point you're making but I'm asking if we need to change everyone around to your suggested way of building before we can merge these changes in? Thanks! -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] vision2: Fix checkpatch warning
Fix the following checkpatch warning: WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- board/ttcontrol/vision2/vision2.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/board/ttcontrol/vision2/vision2.c b/board/ttcontrol/vision2/vision2.c index f556d30..282de95 100644 --- a/board/ttcontrol/vision2/vision2.c +++ b/board/ttcontrol/vision2/vision2.c @@ -428,9 +428,8 @@ static void setup_gpios(void) gpio_direction_output(4, 1); gpio_direction_output(7, 0); - for (i = 65; i 71; i++) { + for (i = 65; i 71; i++) gpio_direction_output(i, 0); - } gpio_direction_output(94, 0); -- 1.6.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Pull request for u-boot-marvell.git
Hi Prafulla, Le 21/11/2011 11:39, Prafulla Wadaskar a écrit : Dear Albert Kindly pull The following changes since commit d3089594c2483ae8cc8932f25812a4dcf19712af: Sanjeev Premi (1): omap3evm: Add support for EFI partitions are available in the git repository at: u-boot-marvell.git master branch. Ajay Bhargav (1): net: Armada100: Fix compilation warnings Simon Guinot (4): netspace_v2: Read Ethernet MAC address from EEPROM mvsata: fix ide_preinit for missing disks ARM: add support for LaCie 2Big Network v2 ARM: remove duplicated code for LaCie boards Applied to u-boot-arm/master, thanks! Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC PATCH v2 09/12] arm, davinci: Add SPL support for DA850 SoCs
This code adds an SPL for booting from SPI flash on DA850 SoCs. Signed-off-by: Christian Riesch christian.rie...@omicron.at Cc: Heiko Schocher h...@denx.de Cc: Sandeep Paulraj s-paul...@ti.com --- arch/arm/cpu/arm926ejs/davinci/Makefile |3 +- arch/arm/cpu/arm926ejs/davinci/spl.c| 34 ++- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/davinci/Makefile b/arch/arm/cpu/arm926ejs/davinci/Makefile index 2105ec5..99df0df 100644 --- a/arch/arm/cpu/arm926ejs/davinci/Makefile +++ b/arch/arm/cpu/arm926ejs/davinci/Makefile @@ -37,7 +37,8 @@ COBJS-$(CONFIG_DRIVER_TI_EMAC)+= lxt972.o dp83848.o et1011c.o ksz8873.o ifdef CONFIG_SPL_BUILD COBJS-y+= spl.o -COBJS-y+= dm365_lowlevel.o +COBJS-$(CONFIG_SOC_DM365) += dm365_lowlevel.o +COBJS-$(CONFIG_SOC_DA8XX) += da850_lowlevel.o endif SOBJS = reset.o diff --git a/arch/arm/cpu/arm926ejs/davinci/spl.c b/arch/arm/cpu/arm926ejs/davinci/spl.c index d9b9398..20f798e 100644 --- a/arch/arm/cpu/arm926ejs/davinci/spl.c +++ b/arch/arm/cpu/arm926ejs/davinci/spl.c @@ -26,6 +26,16 @@ #include nand.h #include asm/arch/dm365_lowlevel.h #include ns16550.h +#include malloc.h +#include spi_flash.h + +DECLARE_GLOBAL_DATA_PTR; + +/* Define global data structure pointer to it*/ +static gd_t gdata __attribute__ ((section(.data))); +static bd_t bdata __attribute__ ((section(.data))); + +#ifndef CONFIG_SPL_LIBCOMMON_SUPPORT void puts(const char *str) { @@ -41,6 +51,8 @@ void putc(char c) NS16550_putc((NS16550_t)(CONFIG_SYS_NS16550_COM1), c); } +#endif /* CONFIG_SPL_LIBCOMMON_SUPPORT */ + inline void hang(void) { puts(### ERROR ### Please RESET the board ###\n); @@ -50,14 +62,34 @@ inline void hang(void) 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_SOC_DM365 nand_init(); puts(Nand boot...\n); nand_boot(); +#endif +#ifdef CONFIG_SOC_DA8XX + 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 } -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC PATCH v2 02/12] arm, hawkboard: Remove obsolete struct pinmux_config i2c_pins
The configuration in struct pinmux_config i2c_pins does not configure the pins for i2c but for uart. Since this function is already configured by struct pinmux_config uart2_pins the i2c_pins struct is obsolete. Signed-off-by: Christian Riesch christian.rie...@omicron.at Cc: Heiko Schocher h...@denx.de Cc: Syed Mohammed Khasim sm.kha...@gmail.com Cc: Sughosh Ganu urwithsugh...@gmail.com Cc: Sandeep Paulraj s-paul...@ti.com --- board/davinci/da8xxevm/hawkboard_nand_spl.c |6 -- 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/board/davinci/da8xxevm/hawkboard_nand_spl.c b/board/davinci/da8xxevm/hawkboard_nand_spl.c index 0fdccac..fd130fa 100644 --- a/board/davinci/da8xxevm/hawkboard_nand_spl.c +++ b/board/davinci/da8xxevm/hawkboard_nand_spl.c @@ -71,15 +71,9 @@ static const struct pinmux_config uart2_pins[] = { { pinmux(4), 2, 5 } }; -static const struct pinmux_config i2c_pins[] = { - { pinmux(4), 2, 4 }, - { pinmux(4), 2, 5 } -}; - static const struct pinmux_resource pinmuxes[] = { PINMUX_ITEM(mii_pins), PINMUX_ITEM(mdio_pins), - PINMUX_ITEM(i2c_pins), PINMUX_ITEM(nand_pins), PINMUX_ITEM(uart2_pins), }; -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC PATCH v2 08/12] sf: Add spi_boot() to allow booting from SPI flash in an SPL
Signed-off-by: Christian Riesch christian.rie...@omicron.at Cc: Heiko Schocher h...@denx.de --- doc/README.SPL |1 + drivers/mtd/spi/Makefile |6 drivers/mtd/spi/spi_spl_load.c | 60 include/spi_flash.h|2 + lib/Makefile |2 + 5 files changed, 71 insertions(+), 0 deletions(-) create mode 100644 drivers/mtd/spi/spi_spl_load.c diff --git a/doc/README.SPL b/doc/README.SPL index 89d24a7..f01a8bd 100644 --- a/doc/README.SPL +++ b/doc/README.SPL @@ -65,3 +65,4 @@ CONFIG_SPL_NAND_SUPPORT (drivers/mtd/nand/libnand.o) CONFIG_SPL_DMA_SUPPORT (drivers/dma/libdma.o) CONFIG_SPL_POST_MEM_SUPPORT (post/drivers/memory.o) CONFIG_SPL_NAND_LOAD (drivers/mtd/nand/nand_spl_load.o) +CONFIG_SPL_SPI_LOAD (drivers/mtd/spi/spi_spl_load.o) diff --git a/drivers/mtd/spi/Makefile b/drivers/mtd/spi/Makefile index 57112af..071e2b6 100644 --- a/drivers/mtd/spi/Makefile +++ b/drivers/mtd/spi/Makefile @@ -25,6 +25,12 @@ include $(TOPDIR)/config.mk LIB:= $(obj)libspi_flash.o +ifdef CONFIG_SPL_BUILD +ifdef CONFIG_SPL_SPI_LOAD +COBJS-y += spi_spl_load.o +endif +endif + COBJS-$(CONFIG_SPI_FLASH) += spi_flash.o COBJS-$(CONFIG_SPI_FLASH_ATMEL)+= atmel.o COBJS-$(CONFIG_SPI_FLASH_EON) += eon.o diff --git a/drivers/mtd/spi/spi_spl_load.c b/drivers/mtd/spi/spi_spl_load.c new file mode 100644 index 000..d434457 --- /dev/null +++ b/drivers/mtd/spi/spi_spl_load.c @@ -0,0 +1,60 @@ +/* + * Copyright (C) 2011 OMICRON electronics GmbH + * + * based on drivers/mtd/nand/nand_spl_load.c + * + * Copyright (C) 2011 + * Heiko Schocher, DENX Software Engineering, h...@denx.de. + * + * 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 spi_flash.h + +/* + * The main entry for SPI booting. It's necessary that SDRAM is already + * configured and available since this code loads the main U-Boot image + * from SPI into SDRAM and starts it from there. + */ +void spi_boot(void) +{ + struct spi_flash *flash; + __attribute__((noreturn)) void (*uboot)(void); + + /* +* Load U-Boot image from SPI flash into RAM +*/ + + puts(Probing SPI flash...\n); + flash = spi_flash_probe(0, 0, CONFIG_SF_DEFAULT_SPEED, SPI_MODE_3); + if (!flash) { + puts(failed.\n); + hang(); + } + + puts(Load image from SPI flash\n); + spi_flash_read(flash, CONFIG_SYS_SPI_U_BOOT_OFFS, + CONFIG_SYS_SPI_U_BOOT_SIZE, + (void *) CONFIG_SYS_TEXT_BASE); + puts(Loading finished, starting u-boot...\n); + + /* +* Jump to U-Boot image +*/ + uboot = (void *) CONFIG_SYS_TEXT_BASE; + (*uboot)(); +} diff --git a/include/spi_flash.h b/include/spi_flash.h index 2671ab5..e22e294 100644 --- a/include/spi_flash.h +++ b/include/spi_flash.h @@ -68,4 +68,6 @@ static inline int spi_flash_erase(struct spi_flash *flash, u32 offset, return flash-erase(flash, offset, len); } +__attribute__((noreturn)) void spi_boot(void); + #endif /* _SPI_FLASH_H_ */ diff --git a/lib/Makefile b/lib/Makefile index 54708c2..35ba7ff 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -50,6 +50,8 @@ COBJS-$(CONFIG_SHA1) += sha1.o COBJS-$(CONFIG_SHA256) += sha256.o COBJS-y+= strmhz.o COBJS-$(CONFIG_RBTREE) += rbtree.o +else +COBJS-$(CONFIG_SPL_SPI_FLASH_SUPPORT) += display_options.o endif COBJS-y += ctype.o -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC PATCH v2 00/12] *** SUBJECT HERE ***
*** BLURB HERE *** Christian Riesch (12): arm, davinci: Move pinmux functions from board to arch tree arm, hawkboard: Remove obsolete struct pinmux_config i2c_pins arm, da850: Move the definitions of pinmux configurations to the arch tree arm, da830: Move the definitions of pinmux configurations to the arch tree arm, davinci: Remove duplication of pinmux configuration code arm, davinci: Fix clear bss loop for zero length bss arm: printf() is not available in some SPL configurations sf: Add spi_boot() to allow booting from SPI flash in an SPL arm, davinci: Add SPL support for DA850 SoCs arm, da850evm: Add an SPL for SPI boot mkimage: Fix variable length header support arm, davinci: Add support for generating AIS images to the Makefile .gitignore |1 + Makefile | 10 ++ arch/arm/cpu/arm926ejs/davinci/Makefile|5 +- arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c| 36 + .../arm/cpu/arm926ejs/davinci/pinmux.c |0 arch/arm/cpu/arm926ejs/davinci/spl.c | 34 +- arch/arm/cpu/arm926ejs/start.S |8 +- arch/arm/include/asm/arch-davinci/da830_pinmux.h | 131 + arch/arm/include/asm/arch-davinci/da850_pinmux.h | 152 arch/arm/include/asm/arch-davinci/hardware.h |2 + arch/arm/lib/eabi_compat.c |3 + board/davinci/common/Makefile |2 +- board/davinci/da8xxevm/config.mk |5 + board/davinci/da8xxevm/da830evm.c | 116 +-- board/davinci/da8xxevm/da850evm.c | 141 ++ board/davinci/da8xxevm/hawkboard_nand_spl.c| 51 +--- board/davinci/da8xxevm/u-boot-spl.lds | 73 ++ board/davinci/ea20/ea20.c |2 - doc/README.SPL |1 + drivers/mtd/spi/Makefile |6 + drivers/mtd/spi/spi_spl_load.c | 60 include/configs/da850evm.h | 53 +++- include/spi_flash.h|2 + lib/Makefile |2 + nand_spl/board/davinci/da8xxevm/Makefile |6 +- tools/mkimage.c| 97 +++-- 26 files changed, 622 insertions(+), 377 deletions(-) rename board/davinci/common/davinci_pinmux.c = arch/arm/cpu/arm926ejs/davinci/pinmux.c (100%) create mode 100644 arch/arm/include/asm/arch-davinci/da830_pinmux.h create mode 100644 arch/arm/include/asm/arch-davinci/da850_pinmux.h create mode 100644 board/davinci/da8xxevm/config.mk create mode 100644 board/davinci/da8xxevm/u-boot-spl.lds create mode 100644 drivers/mtd/spi/spi_spl_load.c ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC PATCH v2 05/12] arm, davinci: Remove duplication of pinmux configuration code
This patch replaces the pinmux configuration code in arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c by the code from arch/arm/cpu/arm926ejs/davinci/pinmux.c. Signed-off-by: Christian Riesch christian.rie...@omicron.at Cc: Sandeep Paulraj s-paul...@ti.com Cc: Sudhakar Rajashekhara sudhakar@ti.com Cc: Heiko Schocher h...@denx.de --- arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c | 36 +- board/davinci/da8xxevm/da850evm.c |4 ++- 2 files changed, 11 insertions(+), 29 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c b/arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c index c7ec70f..a532f8a 100644 --- a/arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c +++ b/arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c @@ -27,6 +27,7 @@ #include post.h #include asm/arch/da850_lowlevel.h #include asm/arch/hardware.h +#include asm/arch/davinci_misc.h #include asm/arch/ddr2_defs.h #include asm/arch/emif_defs.h #include asm/arch/pll_defs.h @@ -235,19 +236,16 @@ int da850_ddr_setup(void) return 0; } -void da850_pinmux_ctl(unsigned long offset, unsigned long mask, - unsigned long value) -{ - clrbits_le32(davinci_syscfg_regs-pinmux[offset], mask); - setbits_le32(davinci_syscfg_regs-pinmux[offset], (mask value)); -} - __attribute__((weak)) 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 */ @@ -257,27 +255,9 @@ int arch_cpu_init(void) dv_maskbits(davinci_syscfg_regs-suspsrc, CONFIG_SYS_DA850_SYSCFG_SUSPSRC); - /* Setup Pinmux */ - da850_pinmux_ctl(0, 0x, CONFIG_SYS_DA850_PINMUX0); - da850_pinmux_ctl(1, 0x, CONFIG_SYS_DA850_PINMUX1); - da850_pinmux_ctl(2, 0x, CONFIG_SYS_DA850_PINMUX2); - da850_pinmux_ctl(3, 0x, CONFIG_SYS_DA850_PINMUX3); - da850_pinmux_ctl(4, 0x, CONFIG_SYS_DA850_PINMUX4); - da850_pinmux_ctl(5, 0x, CONFIG_SYS_DA850_PINMUX5); - da850_pinmux_ctl(6, 0x, CONFIG_SYS_DA850_PINMUX6); - da850_pinmux_ctl(7, 0x, CONFIG_SYS_DA850_PINMUX7); - da850_pinmux_ctl(8, 0x, CONFIG_SYS_DA850_PINMUX8); - da850_pinmux_ctl(9, 0x, CONFIG_SYS_DA850_PINMUX9); - da850_pinmux_ctl(10, 0x, CONFIG_SYS_DA850_PINMUX10); - da850_pinmux_ctl(11, 0x, CONFIG_SYS_DA850_PINMUX11); - da850_pinmux_ctl(12, 0x, CONFIG_SYS_DA850_PINMUX12); - da850_pinmux_ctl(13, 0x, CONFIG_SYS_DA850_PINMUX13); - da850_pinmux_ctl(14, 0x, CONFIG_SYS_DA850_PINMUX14); - da850_pinmux_ctl(15, 0x, CONFIG_SYS_DA850_PINMUX15); - da850_pinmux_ctl(16, 0x, CONFIG_SYS_DA850_PINMUX16); - da850_pinmux_ctl(17, 0x, CONFIG_SYS_DA850_PINMUX17); - da850_pinmux_ctl(18, 0x, CONFIG_SYS_DA850_PINMUX18); - da850_pinmux_ctl(19, 0x, CONFIG_SYS_DA850_PINMUX19); + /* configure pinmux settings */ + if (davinci_configure_pin_mux_items(pinmuxes, pinmuxes_size)) + return 1; /* PLL setup */ da850_pll_init(davinci_pllc0_regs, CONFIG_SYS_DA850_PLL0_PLLM); diff --git a/board/davinci/da8xxevm/da850evm.c b/board/davinci/da8xxevm/da850evm.c index 7bc16e7..bcea7b9 100644 --- a/board/davinci/da8xxevm/da850evm.c +++ b/board/davinci/da8xxevm/da850evm.c @@ -108,7 +108,7 @@ const struct pinmux_config gpio_pins[] = { #endif }; -static const struct pinmux_resource pinmuxes[] = { +const struct pinmux_resource pinmuxes[] = { #ifdef CONFIG_SPI_FLASH PINMUX_ITEM(spi1_pins), #endif @@ -122,6 +122,8 @@ static const struct pinmux_resource pinmuxes[] = { PINMUX_ITEM(gpio_pins), }; +const int pinmuxes_size = ARRAY_SIZE(pinmuxes); + static const struct lpsc_resource lpsc[] = { { DAVINCI_LPSC_AEMIF }, /* NAND, NOR */ { DAVINCI_LPSC_SPI1 }, /* Serial Flash */ -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC PATCH v2 11/12] mkimage: Fix variable length header support
Support for variable length images like AIS image was introduced in commit f0662105b674a3874227316abf8536bebc9b5995. A parameter -s was also introduced to prohibit copying of the image file automatically in the main program. However, this parameter was implemented incorrectly and the image file was copied nevertheless. Signed-off-by: Christian Riesch christian.rie...@omicron.at Cc: Stefano Babic sba...@denx.de Cc: Heiko Schocher h...@denx.de --- tools/mkimage.c | 97 --- 1 files changed, 49 insertions(+), 48 deletions(-) diff --git a/tools/mkimage.c b/tools/mkimage.c index 36e28ec..eeb1b10 100644 --- a/tools/mkimage.c +++ b/tools/mkimage.c @@ -383,65 +383,66 @@ NXTARG: ; exit (EXIT_FAILURE); } - if (!params.skipcpy - (params.type == IH_TYPE_MULTI || - params.type == IH_TYPE_SCRIPT)) { - char *file = params.datafile; - uint32_t size; - - for (;;) { - char *sep = NULL; - - if (file) { - if ((sep = strchr(file, ':')) != NULL) { - *sep = '\0'; + if (!params.skipcpy) { + if (params.type == IH_TYPE_MULTI || + params.type == IH_TYPE_SCRIPT) { + char *file = params.datafile; + uint32_t size; + + for (;;) { + char *sep = NULL; + + if (file) { + if ((sep = strchr(file, ':')) != NULL) { + *sep = '\0'; + } + + if (stat (file, sbuf) 0) { + fprintf (stderr, %s: Can't stat %s: %s\n, +params.cmdname, file, strerror(errno)); + exit (EXIT_FAILURE); + } + size = cpu_to_uimage (sbuf.st_size); + } else { + size = 0; } - if (stat (file, sbuf) 0) { - fprintf (stderr, %s: Can't stat %s: %s\n, - params.cmdname, file, strerror(errno)); + if (write(ifd, (char *)size, sizeof(size)) != sizeof(size)) { + fprintf (stderr, %s: Write error on %s: %s\n, +params.cmdname, params.imagefile, +strerror(errno)); exit (EXIT_FAILURE); } - size = cpu_to_uimage (sbuf.st_size); - } else { - size = 0; - } - if (write(ifd, (char *)size, sizeof(size)) != sizeof(size)) { - fprintf (stderr, %s: Write error on %s: %s\n, - params.cmdname, params.imagefile, - strerror(errno)); - exit (EXIT_FAILURE); - } + if (!file) { + break; + } - if (!file) { - break; + if (sep) { + *sep = ':'; + file = sep + 1; + } else { + file = NULL; + } } - if (sep) { - *sep = ':'; - file = sep + 1; - } else { - file = NULL; - } - } + file = params.datafile; - file = params.datafile; - - for (;;) { - char *sep = strchr(file, ':'); - if (sep) { - *sep = '\0'; - copy_file (ifd, file, 1); - *sep++ = ':'; - file = sep; - } else { - copy_file (ifd, file, 0); - break; + for (;;) { + char *sep = strchr(file, ':'); + if
[U-Boot] [RFC PATCH v2 10/12] arm, da850evm: Add an SPL for SPI boot
Signed-off-by: Christian Riesch christian.rie...@omicron.at Cc: Heiko Schocher h...@denx.de Cc: Sandeep Paulraj s-paul...@ti.com Cc: Sudhakar Rajashekhara sudhakar@ti.com --- board/davinci/da8xxevm/u-boot-spl.lds | 73 + include/configs/da850evm.h| 53 +++- 2 files changed, 125 insertions(+), 1 deletions(-) create mode 100644 board/davinci/da8xxevm/u-boot-spl.lds diff --git a/board/davinci/da8xxevm/u-boot-spl.lds b/board/davinci/da8xxevm/u-boot-spl.lds new file mode 100644 index 000..6f6e065 --- /dev/null +++ b/board/davinci/da8xxevm/u-boot-spl.lds @@ -0,0 +1,73 @@ +/* + * (C) Copyright 2002 + * Gary Jennejohn, DENX Software Engineering, ga...@denx.de + * + * (C) Copyright 2008 + * Guennadi Liakhovetki, DENX Software Engineering, l...@denx.de + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +MEMORY { .sram : ORIGIN = CONFIG_SPL_TEXT_BASE,\ + LENGTH = CONFIG_SPL_MAX_SIZE } + +OUTPUT_FORMAT(elf32-littlearm, elf32-littlearm, elf32-littlearm) +OUTPUT_ARCH(arm) +ENTRY(_start) +SECTIONS +{ + . = 0x; + + . = ALIGN(4); + .text : + { + __start = .; + arch/arm/cpu/arm926ejs/start.o(.text) + *(.text*) + } .sram + + . = ALIGN(4); + .rodata : { *(SORT_BY_ALIGNMENT(.rodata*)) } .sram + + . = ALIGN(4); + .data : { *(SORT_BY_ALIGNMENT(.data*)) } .sram + . = ALIGN(4); + .rel.dyn : { + __rel_dyn_start = .; + *(.rel*) + __rel_dyn_end = .; + } .sram + + .dynsym : { + __dynsym_start = .; + *(.dynsym) + } .sram + + .bss : + { + . = ALIGN(4); + __bss_start = .; + *(.bss*) + . = ALIGN(4); + __bss_end__ = .; + } .sram + + __image_copy_end = .; + _end = .; +} diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h index 4c14370..517e2ef 100644 --- a/include/configs/da850evm.h +++ b/include/configs/da850evm.h @@ -29,7 +29,6 @@ #define CONFIG_DRIVER_TI_EMAC #define CONFIG_USE_SPIFLASH - /* * SoC Configuration */ @@ -64,6 +63,41 @@ #define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */ #define CONFIG_STACKSIZE (256*1024) /* regular stack */ +#define CONFIG_SYS_DA850_SYSCFG_SUSPSRC ((1 27) | (1 22) | (1 20) | \ +(1 5) | (1 16)) + +/* + * PLL configuration + */ +#define CONFIG_SYS_DV_CLKMODE 0 +#define CONFIG_SYS_DA850_PLL0_POSTDIV 1 +#define CONFIG_SYS_DA850_PLL0_PLLDIV1 0x8000 +#define CONFIG_SYS_DA850_PLL0_PLLDIV2 0x8001 +#define CONFIG_SYS_DA850_PLL0_PLLDIV3 0x8002 +#define CONFIG_SYS_DA850_PLL0_PLLDIV4 0x8003 +#define CONFIG_SYS_DA850_PLL0_PLLDIV5 0x8002 +#define CONFIG_SYS_DA850_PLL0_PLLDIV6 CONFIG_SYS_DA850_PLL0_PLLDIV1 +#define CONFIG_SYS_DA850_PLL0_PLLDIV7 0x8005 + +#define CONFIG_SYS_DA850_PLL1_POSTDIV 1 +#define CONFIG_SYS_DA850_PLL1_PLLDIV1 0x8000 +#define CONFIG_SYS_DA850_PLL1_PLLDIV2 0x8001 +#define CONFIG_SYS_DA850_PLL1_PLLDIV3 0x8002 + +#define CONFIG_SYS_DA850_PLL0_PLLM 24 +#define CONFIG_SYS_DA850_PLL1_PLLM 21 + +/* + * DDR2 memory configuration + */ +#define CONFIG_SYS_DA850_DDR2_DDRPHYCR 0x00C4 +#define CONFIG_SYS_DA850_DDR2_SDBCR0x0A034622 +#define CONFIG_SYS_DA850_DDR2_SDBCR2 0x +#define CONFIG_SYS_DA850_DDR2_SDTIMR 0x184929C8 +#define CONFIG_SYS_DA850_DDR2_SDTIMR2 0xB80FC700 +#define CONFIG_SYS_DA850_DDR2_SDRCR0x0406 +#define CONFIG_SYS_DA850_DDR2_PBBPR0x30 + /* * Serial Driver info */ @@ -75,6 +109,7 @@ #define CONFIG_CONS_INDEX 1 /* use UART0 for console */ #define CONFIG_BAUDRATE115200 /* Default baud rate */ #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } +#define CONFIG_SYS_DA850_LPSC_UART DAVINCI_LPSC_UART2 #define CONFIG_SPI #define CONFIG_SPI_FLASH @@ -241,8 +276,24 @@ #undef CONFIG_CMD_ENV #endif +/* defines for SPL */ +#define CONFIG_SPL +#define CONFIG_SPL_SPI_SUPPORT +#define CONFIG_SPL_SPI_FLASH_SUPPORT +#define
[U-Boot] [RFC PATCH v2 03/12] arm, da850: Move the definitions of pinmux configurations to the arch tree
The boards in board/davinci/da8xxevm/ define pinmux_config[] vectors that contain pinmux configurations for emac, uarts, memory controllers... This patch moves common configurations to a header file in the arch tree for the da850evm and the hawkboard. Signed-off-by: Christian Riesch christian.rie...@omicron.at Cc: Sandeep Paulraj s-paul...@ti.com Cc: Heiko Schocher h...@denx.de Cc: Sudhakar Rajashekhara sudhakar@ti.com Cc: Syed Mohammed Khasim sm.kha...@gmail.com Cc: Sughosh Ganu urwithsugh...@gmail.com --- arch/arm/include/asm/arch-davinci/da850_pinmux.h | 152 ++ board/davinci/da8xxevm/da850evm.c| 135 ++-- board/davinci/da8xxevm/hawkboard_nand_spl.c | 43 +-- 3 files changed, 165 insertions(+), 165 deletions(-) create mode 100644 arch/arm/include/asm/arch-davinci/da850_pinmux.h diff --git a/arch/arm/include/asm/arch-davinci/da850_pinmux.h b/arch/arm/include/asm/arch-davinci/da850_pinmux.h new file mode 100644 index 000..53df3f7 --- /dev/null +++ b/arch/arm/include/asm/arch-davinci/da850_pinmux.h @@ -0,0 +1,152 @@ +/* + * Pinmux configurations for the DA850 SoCs + * + * Copyright (C) 2011 OMICRON electronics GmbH + * + * 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. + */ + +#ifndef __ASM_ARCH_DA850_PINMUX_H +#define __ASM_ARCH_DA850_PINMUX_H + +#include asm/arch/hardware.h +#include asm/arch/davinci_misc.h + +/* SPI pin muxer settings */ +const struct pinmux_config spi1_pins[] = { + { pinmux(5), 1, 1 }, + { pinmux(5), 1, 2 }, + { pinmux(5), 1, 4 }, + { pinmux(5), 1, 5 } +}; + +/* UART pin muxer settings */ +const struct pinmux_config uart2_pins[] = { + { pinmux(0), 4, 6 }, + { pinmux(0), 4, 7 }, + { pinmux(4), 2, 4 }, + { pinmux(4), 2, 5 } +}; + +/* EMAC pin muxer settings*/ +const struct pinmux_config emac_pins[] = { +#ifdef CONFIG_DRIVER_TI_EMAC_USE_RMII + { pinmux(14), 8, 2 }, + { pinmux(14), 8, 3 }, + { pinmux(14), 8, 4 }, + { pinmux(14), 8, 5 }, + { pinmux(14), 8, 6 }, + { pinmux(14), 8, 7 }, + { pinmux(15), 8, 1 }, +#else /* ! CONFIG_DRIVER_TI_EMAC_USE_RMII */ + { pinmux(2), 8, 1 }, + { pinmux(2), 8, 2 }, + { pinmux(2), 8, 3 }, + { pinmux(2), 8, 4 }, + { pinmux(2), 8, 5 }, + { pinmux(2), 8, 6 }, + { pinmux(2), 8, 7 }, + { pinmux(3), 8, 0 }, + { pinmux(3), 8, 1 }, + { pinmux(3), 8, 2 }, + { pinmux(3), 8, 3 }, + { pinmux(3), 8, 4 }, + { pinmux(3), 8, 5 }, + { pinmux(3), 8, 6 }, + { pinmux(3), 8, 7 }, +#endif /* CONFIG_DRIVER_TI_EMAC_USE_RMII */ + { pinmux(4), 8, 0 }, + { pinmux(4), 8, 1 } +}; + +/* I2C pin muxer settings */ +const struct pinmux_config i2c0_pins[] = { + { pinmux(4), 2, 2 }, + { pinmux(4), 2, 3 } +}; + +const struct pinmux_config i2c1_pins[] = { + { pinmux(4), 4, 4 }, + { pinmux(4), 4, 5 } +}; + +/* NAND pin muxer settings */ +const struct pinmux_config nand_pins[] = { + { pinmux(7), 1, 1 }, + { pinmux(7), 1, 2 }, + { pinmux(7), 1, 4 }, + { pinmux(7), 1, 5 }, + { pinmux(9), 1, 0 }, + { pinmux(9), 1, 1 }, + { pinmux(9), 1, 2 }, + { pinmux(9), 1, 3 }, + { pinmux(9), 1, 4 }, + { pinmux(9), 1, 5 }, + { pinmux(9), 1, 6 }, + { pinmux(9), 1, 7 }, + { pinmux(12), 1, 5 }, + { pinmux(12), 1, 6 } +}; + +/* NOR pin muxer settings */ +const struct pinmux_config nor_pins[] = { + { pinmux(5), 1, 6 }, + { pinmux(6), 1, 6 }, + { pinmux(7), 1, 0 }, + { pinmux(7), 1, 4 }, + { pinmux(7), 1, 5 }, + { pinmux(8), 1, 0 }, + { pinmux(8), 1, 1 }, + { pinmux(8), 1, 2 }, + { pinmux(8), 1, 3 }, + { pinmux(8), 1, 4 }, + { pinmux(8), 1, 5 }, + { pinmux(8), 1, 6 }, + { pinmux(8), 1, 7 }, + { pinmux(9), 1, 0 }, + { pinmux(9), 1, 1 }, + { pinmux(9), 1, 2 }, + { pinmux(9), 1, 3 }, + { pinmux(9), 1, 4 }, + { pinmux(9), 1, 5 }, + { pinmux(9), 1, 6 }, + { pinmux(9), 1, 7 }, + { pinmux(10), 1, 0 }, + { pinmux(10), 1, 1 }, + { pinmux(10), 1, 2 }, + { pinmux(10), 1, 3 }, + { pinmux(10), 1, 4 }, + { pinmux(10), 1, 5 }, + { pinmux(10), 1, 6 },
[U-Boot] [RFC PATCH v2 07/12] arm: printf() is not available in some SPL configurations
This patch avoids build breakage for SPLs that do not support printf. Signed-off-by: Christian Riesch christian.rie...@omicron.at Cc: Wolfgang Denk w...@denx.de Cc: Tom Rini tom.r...@gmail.com --- arch/arm/lib/eabi_compat.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/arm/lib/eabi_compat.c b/arch/arm/lib/eabi_compat.c index eb3e26d..748c808 100644 --- a/arch/arm/lib/eabi_compat.c +++ b/arch/arm/lib/eabi_compat.c @@ -13,10 +13,13 @@ int raise (int signum) { +#if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT) printf(raise: Signal # %d caught\n, signum); +#endif return 0; } + /* Dummy function to avoid linker complaints */ void __aeabi_unwind_cpp_pr0(void) { -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC PATCH v2 06/12] arm, davinci: Fix clear bss loop for zero length bss
This patch fixes the clear bss loop for bss sections that have zero length, i.e., where __bss_start == __bss_end__. Signed-off-by: Christian Riesch christian.rie...@omicron.at Cc: Albert Aribaud albert.u.b...@aribaud.net Cc: Heiko Schocher h...@denx.de --- arch/arm/cpu/arm926ejs/start.S |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/start.S b/arch/arm/cpu/arm926ejs/start.S index 8b5355b..772793c 100644 --- a/arch/arm/cpu/arm926ejs/start.S +++ b/arch/arm/cpu/arm926ejs/start.S @@ -299,10 +299,12 @@ clear_bss: #endif mov r2, #0x /* clear*/ -clbss_l:strr2, [r0]/* clear loop...*/ +clbss_l:cmpr0, r1 /* clear loop...*/ + beq clbss_e + str r2, [r0] add r0, r0, #4 - cmp r0, r1 - bne clbss_l + b clbss_l +clbss_e: #ifndef CONFIG_SPL_BUILD bl coloured_LED_init -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC PATCH v2 04/12] arm, da830: Move the definitions of pinmux configurations to the arch tree
The boards in board/davinci/da8xxevm/ define pinmux_config[] vectors that contain pinmux configurations for emac, uarts, memory controllers... This patch moves the pinmux configurations to a header file in the arch tree for the da830evm. Signed-off-by: Christian Riesch christian.rie...@omicron.at Cc: Sandeep Paulraj s-paul...@ti.com Cc: Heiko Schocher h...@denx.de Cc: Nick Thompson nick.thomp...@gefanuc.com --- arch/arm/include/asm/arch-davinci/da830_pinmux.h | 131 ++ board/davinci/da8xxevm/da830evm.c| 114 +-- 2 files changed, 135 insertions(+), 110 deletions(-) create mode 100644 arch/arm/include/asm/arch-davinci/da830_pinmux.h diff --git a/arch/arm/include/asm/arch-davinci/da830_pinmux.h b/arch/arm/include/asm/arch-davinci/da830_pinmux.h new file mode 100644 index 000..2900b6c --- /dev/null +++ b/arch/arm/include/asm/arch-davinci/da830_pinmux.h @@ -0,0 +1,131 @@ +/* + * Pinmux configurations for the DA830 SoCs + * + * Copyright (C) 2011 OMICRON electronics GmbH + * + * 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. + */ + +#ifndef __ASM_ARCH_DA830_PINMUX_H +#define __ASM_ARCH_DA830_PINMUX_H + +#include asm/arch/hardware.h +#include asm/arch/davinci_misc.h + +/* SPI pin muxer settings */ +const struct pinmux_config spi0_pins[] = { + { pinmux(7), 1, 3 }, + { pinmux(7), 1, 4 }, + { pinmux(7), 1, 5 }, + { pinmux(7), 1, 6 }, + { pinmux(7), 1, 7 } +}; + +/* EMIF-A bus pins for 8-bit NAND support on CS3 */ +const struct pinmux_config emifa_nand_8bit_cs3_pins[] = { + { pinmux(13), 1, 6 }, + { pinmux(13), 1, 7 }, + { pinmux(14), 1, 0 }, + { pinmux(14), 1, 1 }, + { pinmux(14), 1, 2 }, + { pinmux(14), 1, 3 }, + { pinmux(14), 1, 4 }, + { pinmux(14), 1, 5 }, + { pinmux(15), 1, 7 }, + { pinmux(16), 1, 0 }, + { pinmux(18), 1, 1 }, + { pinmux(18), 1, 4 }, + { pinmux(18), 1, 5 }, +}; + +/* EMAC PHY interface pins */ +const struct pinmux_config emac_pins[] = { + { pinmux(9), 0, 5 }, + { pinmux(10), 2, 1 }, + { pinmux(10), 2, 2 }, + { pinmux(10), 2, 3 }, + { pinmux(10), 2, 4 }, + { pinmux(10), 2, 5 }, + { pinmux(10), 2, 6 }, + { pinmux(10), 2, 7 }, + { pinmux(11), 2, 0 }, + { pinmux(11), 2, 1 }, +}; + +/* UART pin muxer settings */ +const struct pinmux_config uart2_pins[] = { + { pinmux(8), 2, 7 }, + { pinmux(9), 2, 0 } +}; + +/* I2C pin muxer settings */ +const struct pinmux_config i2c0_pins[] = { + { pinmux(8), 2, 3 }, + { pinmux(8), 2, 4 } +}; + +/* NAND pin muxer settings */ +const struct pinmux_config aemif_pins[] = { + { pinmux(13), 1, 6 }, + { pinmux(13), 1, 7 }, + { pinmux(14), 1, 0 }, + { pinmux(14), 1, 1 }, + { pinmux(14), 1, 2 }, + { pinmux(14), 1, 3 }, + { pinmux(14), 1, 4 }, + { pinmux(14), 1, 5 }, + { pinmux(14), 1, 6 }, + { pinmux(14), 1, 7 }, + { pinmux(15), 1, 0 }, + { pinmux(15), 1, 1 }, + { pinmux(15), 1, 2 }, + { pinmux(15), 1, 3 }, + { pinmux(15), 1, 4 }, + { pinmux(15), 1, 5 }, + { pinmux(15), 1, 6 }, + { pinmux(15), 1, 7 }, + { pinmux(16), 1, 0 }, + { pinmux(16), 1, 1 }, + { pinmux(16), 1, 2 }, + { pinmux(16), 1, 3 }, + { pinmux(16), 1, 4 }, + { pinmux(16), 1, 5 }, + { pinmux(16), 1, 6 }, + { pinmux(16), 1, 7 }, + { pinmux(17), 1, 0 }, + { pinmux(17), 1, 1 }, + { pinmux(17), 1, 2 }, + { pinmux(17), 1, 3 }, + { pinmux(17), 1, 4 }, + { pinmux(17), 1, 5 }, + { pinmux(17), 1, 6 }, + { pinmux(17), 1, 7 }, + { pinmux(18), 1, 0 }, + { pinmux(18), 1, 1 }, + { pinmux(18), 1, 2 }, + { pinmux(18), 1, 3 }, + { pinmux(18), 1, 4 }, + { pinmux(18), 1, 5 }, + { pinmux(18), 1, 6 }, + { pinmux(18), 1, 7 }, + { pinmux(10), 1, 0 } +}; + +/* USB0_DRVVBUS pin muxer settings */ +const struct pinmux_config usb_pins[] = { + { pinmux(9), 1, 1 } +}; + +#endif diff --git a/board/davinci/da8xxevm/da830evm.c b/board/davinci/da8xxevm/da830evm.c index c45c94b..07789f6 100644 --- a/board/davinci/da8xxevm/da830evm.c +++ b/board/davinci/da8xxevm/da830evm.c @@ -39,6 +39,7 @@
[U-Boot] [RFC PATCH v2 01/12] arm, davinci: Move pinmux functions from board to arch tree
Signed-off-by: Christian Riesch christian.rie...@omicron.at Cc: Sandeep Paulraj s-paul...@ti.com Cc: Heiko Schocher h...@denx.de Cc: Sudhakar Rajashekhara sudhakar@ti.com Cc: Syed Mohammed Khasim sm.kha...@gmail.com Cc: Sughosh Ganu urwithsugh...@gmail.com Cc: Nick Thompson nick.thomp...@gefanuc.com Cc: Stefano Babic sba...@denx.de --- arch/arm/cpu/arm926ejs/davinci/Makefile|2 +- .../arm/cpu/arm926ejs/davinci/pinmux.c |0 arch/arm/include/asm/arch-davinci/hardware.h |2 ++ board/davinci/common/Makefile |2 +- board/davinci/da8xxevm/da830evm.c |2 -- board/davinci/da8xxevm/da850evm.c |2 -- board/davinci/da8xxevm/hawkboard_nand_spl.c|2 -- board/davinci/ea20/ea20.c |2 -- nand_spl/board/davinci/da8xxevm/Makefile |6 +++--- 9 files changed, 7 insertions(+), 13 deletions(-) rename board/davinci/common/davinci_pinmux.c = arch/arm/cpu/arm926ejs/davinci/pinmux.c (100%) diff --git a/arch/arm/cpu/arm926ejs/davinci/Makefile b/arch/arm/cpu/arm926ejs/davinci/Makefile index aeb058a..2105ec5 100644 --- a/arch/arm/cpu/arm926ejs/davinci/Makefile +++ b/arch/arm/cpu/arm926ejs/davinci/Makefile @@ -27,7 +27,7 @@ include $(TOPDIR)/config.mk LIB= $(obj)lib$(SOC).o -COBJS-y+= cpu.o timer.o psc.o +COBJS-y+= cpu.o timer.o psc.o pinmux.o COBJS-$(CONFIG_DA850_LOWLEVEL) += da850_lowlevel.o COBJS-$(CONFIG_SOC_DM355) += dm355.o COBJS-$(CONFIG_SOC_DM365) += dm365.o diff --git a/board/davinci/common/davinci_pinmux.c b/arch/arm/cpu/arm926ejs/davinci/pinmux.c similarity index 100% rename from board/davinci/common/davinci_pinmux.c rename to arch/arm/cpu/arm926ejs/davinci/pinmux.c diff --git a/arch/arm/include/asm/arch-davinci/hardware.h b/arch/arm/include/asm/arch-davinci/hardware.h index 3e9a3b6..06819a6 100644 --- a/arch/arm/include/asm/arch-davinci/hardware.h +++ b/arch/arm/include/asm/arch-davinci/hardware.h @@ -480,6 +480,8 @@ struct davinci_syscfg_regs { #define davinci_syscfg_regs \ ((struct davinci_syscfg_regs *)DAVINCI_BOOTCFG_BASE) +#define pinmux(x) (davinci_syscfg_regs-pinmux[x]) + /* Emulation suspend bits */ #define DAVINCI_SYSCFG_SUSPSRC_EMAC(1 5) #define DAVINCI_SYSCFG_SUSPSRC_I2C (1 16) diff --git a/board/davinci/common/Makefile b/board/davinci/common/Makefile index 9d7b164..bc99da3 100644 --- a/board/davinci/common/Makefile +++ b/board/davinci/common/Makefile @@ -29,7 +29,7 @@ endif LIB= $(obj)lib$(VENDOR).o -COBJS := misc.o davinci_pinmux.o +COBJS := misc.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS)) diff --git a/board/davinci/da8xxevm/da830evm.c b/board/davinci/da8xxevm/da830evm.c index 2021e73..c45c94b 100644 --- a/board/davinci/da8xxevm/da830evm.c +++ b/board/davinci/da8xxevm/da830evm.c @@ -46,8 +46,6 @@ DECLARE_GLOBAL_DATA_PTR; -#define pinmux(x) (davinci_syscfg_regs-pinmux[x]) - /* SPI0 pin muxer settings */ static const struct pinmux_config spi0_pins[] = { { pinmux(7), 1, 3 }, diff --git a/board/davinci/da8xxevm/da850evm.c b/board/davinci/da8xxevm/da850evm.c index e0a3bbe..844e585 100644 --- a/board/davinci/da8xxevm/da850evm.c +++ b/board/davinci/da8xxevm/da850evm.c @@ -34,8 +34,6 @@ DECLARE_GLOBAL_DATA_PTR; -#define pinmux(x) (davinci_syscfg_regs-pinmux[x]) - /* SPI0 pin muxer settings */ static const struct pinmux_config spi1_pins[] = { { pinmux(5), 1, 1 }, diff --git a/board/davinci/da8xxevm/hawkboard_nand_spl.c b/board/davinci/da8xxevm/hawkboard_nand_spl.c index 32b17ce..0fdccac 100644 --- a/board/davinci/da8xxevm/hawkboard_nand_spl.c +++ b/board/davinci/da8xxevm/hawkboard_nand_spl.c @@ -32,8 +32,6 @@ DECLARE_GLOBAL_DATA_PTR; -#define pinmux(x) (davinci_syscfg_regs-pinmux[x]) - static const struct pinmux_config mii_pins[] = { { pinmux(2), 8, 1 }, { pinmux(2), 8, 2 }, diff --git a/board/davinci/ea20/ea20.c b/board/davinci/ea20/ea20.c index 720a360..9b6c4c0 100644 --- a/board/davinci/ea20/ea20.c +++ b/board/davinci/ea20/ea20.c @@ -40,8 +40,6 @@ DECLARE_GLOBAL_DATA_PTR; -#define pinmux(x) (davinci_syscfg_regs-pinmux[x]) - static const struct da8xx_panel lcd_panel = { /* Casio COM57H531x */ .name = Casio_COM57H531x, diff --git a/nand_spl/board/davinci/da8xxevm/Makefile b/nand_spl/board/davinci/da8xxevm/Makefile index accf716..7b06cd2 100644 --- a/nand_spl/board/davinci/da8xxevm/Makefile +++ b/nand_spl/board/davinci/da8xxevm/Makefile @@ -42,7 +42,7 @@ SOBJS = _divsi3.o \ COBJS = cpu.o \ davinci_nand.o \ - davinci_pinmux.o \ + pinmux.o \ div0.o \ hawkboard_nand_spl.o \ memsize.o \ @@ -78,9 +78,9 @@ $(nandobj)u-boot.lds: $(LDSCRIPT) # create symbolic links for common files # from board directory
[U-Boot] [RFC PATCH v2 12/12] arm, davinci: Add support for generating AIS images to the Makefile
Signed-off-by: Christian Riesch christian.rie...@omicron.at Cc: Stefano Babic sba...@denx.de Cc: Heiko Schocher h...@denx.de --- .gitignore |1 + Makefile | 10 ++ board/davinci/da8xxevm/config.mk |5 + 3 files changed, 16 insertions(+), 0 deletions(-) create mode 100644 board/davinci/da8xxevm/config.mk diff --git a/.gitignore b/.gitignore index ff4bae0..e4e95e2 100644 --- a/.gitignore +++ b/.gitignore @@ -35,6 +35,7 @@ /u-boot.dis /u-boot.lds /u-boot.ubl +/u-boot.ais /u-boot.dtb /u-boot.sb diff --git a/Makefile b/Makefile index fb658f4..94c5fbb 100644 --- a/Makefile +++ b/Makefile @@ -417,6 +417,15 @@ $(obj)u-boot.ubl: $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin rm $(obj)u-boot-ubl.bin rm $(obj)spl/u-boot-spl-pad.bin +$(obj)u-boot.ais: $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin + $(obj)tools/mkimage -s -n /dev/null -T aisimage \ + -e $(CONFIG_SPL_TEXT_BASE) -d $(obj)spl/u-boot-spl.bin \ + $(obj)spl/u-boot-spl.ais + $(OBJCOPY) ${OBJCFLAGS} -I binary --pad-to=$(PAD_TO) -O binary $(obj)spl/u-boot-spl.ais $(obj)spl/u-boot-spl-pad.ais + cat $(obj)spl/u-boot-spl-pad.ais $(obj)u-boot.bin $(obj)u-boot.ais + rm $(obj)spl/u-boot-spl.ais + rm $(obj)spl/u-boot-spl-pad.ais + $(obj)u-boot.sb: $(obj)u-boot.bin $(obj)spl/u-boot-spl.bin elftosb -zdf imx28 -c $(TOPDIR)/board/$(BOARDDIR)/u-boot.bd \ -o $(obj)u-boot.sb @@ -788,6 +797,7 @@ clobber:clean @rm -f $(obj)u-boot.kwb @rm -f $(obj)u-boot.imx @rm -f $(obj)u-boot.ubl + @rm -f $(obj)u-boot.ais @rm -f $(obj)u-boot.dtb @rm -f $(obj)u-boot.sb @rm -f $(obj)tools/{env/crc32.c,inca-swap-bytes} diff --git a/board/davinci/da8xxevm/config.mk b/board/davinci/da8xxevm/config.mk new file mode 100644 index 000..05cf77f --- /dev/null +++ b/board/davinci/da8xxevm/config.mk @@ -0,0 +1,5 @@ +# required for SPI flash SPL +# + +PAD_TO := 32768 + -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/9] ARM: cerf250: re-add MACH_TYPE_PXA_CERF
Hi Marek, I see delivery failure to the address, this board is dead. Time for a good-bye patch? Yes, let us drop the board. If someone wants to resurrect it, they can step forward any time. Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 0/9] Fix build issues for some ARM boards
Hi Anatolij, Le 19/11/2011 12:59, Anatolij Gustschin a écrit : Build breakage still pollutes the MAKEALL log. Fix build problems for some ARM based boards. The patches can be pulled from git://git.denx.de/u-boot-video.git arm-fixes I also fixed davinci_schmoogie and davinci_sonata, but there are already patches for these on the patchwork [1], [2], so I do not include them to this patch series. [1] http://patchwork.ozlabs.org/patch/126534/ [2] http://patchwork.ozlabs.org/patch/126535/ Anatolij Gustschin (9): ARM: a320evb: re-add MACH_TYPE_FARADAY ARM: cerf250: re-add MACH_TYPE_PXA_CERF ARM: cradle: re-add MACH_TYPE_HHP_CRADLE ARM: pleb2: re-add MACH_TYPE_PLEB2 ARM: sbc35_a9g20: re-add MACH_TYPE_SBC35_A9G20 ARM: tny_a9260: re-add MACH_TYPE_TNY_A9G20 and MACH_TYPE_TNY_A9260 ARM: xm250: re-add MACH_TYPE_XM250 ARM: cerf250: fix GCC 4.6 warings ARM: xm250: Fix GCC 4.6 warnings Can you Cc: the respective board maintainers? Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH 3/3] tegra2: Add support for Paz00 (Toshiba AC100)
On 11/20/2011 10:39 AM, Marc Dietrich wrote: On Sunday 20 November 2011 13:10:08 Thierry Reding wrote: * Stephen Warren wrote: The Toshiba AC100 (code-name Paz00m a/k/a Dynabook AZ) is an netbook derived from the NVIDIA Tegra Harmony reference board. It ships with Ubuntu, but is often repurposed to run Linux. This patch adds just enough support to get a U-Boot serial console, and the ability access built-in eMMC and the external SD slot. ... +#define TEGRA2_SYSMEM mem=384M@0M nvmem=128M@384M Can we get rid of this? I think I remember some discussion about the same topic going on the linux-tegra/devicetree mailing lists, where it was decided that /mem-reserve/ entries should be dropped until some driver in the mainline kernel was actually going to use this memory. Perhaps U-Boot should take the same approach. I also vote for this. Additionally, most users prefer mem=448M here. The device was original ships with 448 MB user memory, which was later reduced to 384 MB, maybe because of flash player requirements. I'm also not sure if nvmem is needed at all (maybe for android original kernel only) Sounds like a plan. I've done this, and also moved the files to board/compal/paz00 as suggested elsewhere. +#define V_PROMPT Tegra2 (Paz00) # +#define CONFIG_TEGRA2_BOARD_STRING NVIDIA Paz00 + +/* Board-specific serial config */ +#define CONFIG_SERIAL_MULTI +#define CONFIG_TEGRA2_ENABLE_UARTA +#define CONFIG_SYS_NS16550_COM1NV_PA_APB_UARTA_BASE + +#define CONFIG_MACH_TYPE MACH_TYPE_PAZ00 +/* + * The following should be 512MB, but I don't know how to set that value + * It doesn't matter, since this isn't really used any more + */ +#define CONFIG_SYS_BOARD_ODMDATA 0x200d8011 /* lp1, 1GB */ I don't know what is the effect of this paramter, but paz00 has 512 MB. The original valu was 0x8000c0085, AFAIK, which leaves most stuff on the default value. OK, I've switched to that value (where did you extract it from, BTW), and after fixing a bug in arch/arm/cpu/armv7/tegra2/board.c:query_sdram_size() (default==512M, not 1G), it all works. -- nvpublic ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] tegra2: mmc: Enable card-detect for all interfaces.
On 11/21/2011 01:35 AM, Thierry Reding wrote: This commit drops the interface check for card-detection and leaves it up to the board whether or not a card-detect GPIO is connected. Also, the version field of struct mmc is only valid after the slot has been probed successfully, so depending on that information sort of defeats the purpose of card-detection. Signed-off-by: Thierry Reding thierry.red...@avionic-design.de Acked-by: Stephen Warren swar...@nvidia.com BTW, in your earlier patch where you added a call to board_mmc_getcd() to mmc_init(), do you also need to modify drivers/mmc/fsl_esdhc.c's esdhc_init(), since the cd function has already been called? BTW, you need to CC the MMC maintainers on these patches, or they probably won't see them and they won't get applied. See http://www.denx.de/wiki/U-Boot/Custodians. -- nvpublic ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH v2 07/12] arm: printf() is not available in some SPL configurations
On Mon, Nov 21, 2011 at 9:33 AM, Christian Riesch christian.rie...@omicron.at wrote: This patch avoids build breakage for SPLs that do not support printf. Signed-off-by: Christian Riesch christian.rie...@omicron.at Cc: Wolfgang Denk w...@denx.de Cc: Tom Rini tom.r...@gmail.com --- arch/arm/lib/eabi_compat.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/arm/lib/eabi_compat.c b/arch/arm/lib/eabi_compat.c index eb3e26d..748c808 100644 --- a/arch/arm/lib/eabi_compat.c +++ b/arch/arm/lib/eabi_compat.c @@ -13,10 +13,13 @@ int raise (int signum) { +#if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT) printf(raise: Signal # %d caught\n, signum); +#endif return 0; } + /* Dummy function to avoid linker complaints */ void __aeabi_unwind_cpp_pr0(void) { No extra white space adding please :) Otherwise Acked-by: Tom Rini tr...@ti.com -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] worth submitting a patch to fix u-boot for lite 5200b?
On Sun, Nov 20, 2011 at 12:34 PM, Robert P. J. Day rpj...@crashcourse.ca wrote: from back in april, karim yaghmour pointed out a problem related to older lite5200 boards, and suggested a fix: http://old.nabble.com/-U-Boot---PATCH--Env.-vars-fix-for-lite5200-td31013626.html i checked my git clone of u-boot and it seems that the file include/configs/IceCube.h still contains the original code: #if defined(CONFIG_SYS_LOWBOOT16) #define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x0004) #endif #endif /* CONFIG_SYS_LOWBOOT */ #endif /* CONFIG_LITE5200B */ would it be proper to submit a patch to change 0x0004 to 0x0005? i admit i don't know enough about what else might be affected or what else might also need to change, i know only that that change is necessary for u-boot to run properly on that type of board. thoughts? is that an appropriate standalone patch? Well, a patch that addresses Wolfgang's comments and is git am'able would be a step in the right direction. -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] microblaze: usable uart16550 for big endian systems
Am Montag, den 21.11.2011, 08:21 +0100 schrieb Michal Simek: Hi Stephan, Stephan Linz wrote: As a result of the commit 6833260 the uart16550 driver is broken for Microblaze big endian systems, because of the missing 3 byte offset. Other than as described, the U-Boot BSP does not treat properly the 3 byte offset. However, with the new 32 bit access to ns16550 registers we can enable correct register access for Microblaze big and little endian systems in the same manner. The reason why I have applied that patch is that baseaddress generation was moved to u-boot BSP out of u-boot configs. Here is example how addresses are generated. BE system: #define XILINX_UART16550 #define XILINX_UART16550_BASEADDR 0x83e3 Hi Michal, Who is generating this entry (especially incl. this offset)? Was it the MDL environment from PetaLinux? If so, which version? I use my own MDL environment from TPOS, and the generator for xparameters.h does not add this offset, see proc put_uart16550_cfg(): https://gitorious.org/mbref/mbref/blobs/master/edk-repository/ThirdParty/lib/tpos_misclib.tcl#line1384 And seriously we never need this offset. With a sane endianess handling in software we will access the right bytes in uart16550. The Xilinx FPGA synthesis produce results that are good enough for us. All NS16550 8 bit registers alligned on 32 bit memory access: 0x00rr on BE and 0xrr00 in LE. The BSP generator (Xilinx MDL part) may never knows specifics about software or unclean code. Moreover we have to change the code ;-) Till now we have set CONFIG_SYS_NS16550_REG_SIZE to -4 and a offset of 3 to the NS16550 base address for Microblaze BE systems. As I can see in ns16550.h that was completely wrong, or not? See: #if !defined(CONFIG_SYS_NS16550_REG_SIZE) #error Please define NS16550 registers size. #elif (CONFIG_SYS_NS16550_REG_SIZE 0) #define UART_REG(x) \ unsigned char prepad_##x[CONFIG_SYS_NS16550_REG_SIZE - 1];\ unsigned char x; #elif (CONFIG_SYS_NS16550_REG_SIZE 0) #define UART_REG(x) \ unsigned char x;\ unsigned char postpad_##x[-CONFIG_SYS_NS16550_REG_SIZE - 1]; #endif struct NS16550 { UART_REG(rbr); /* 0 */ UART_REG(ier); /* 1 */ ... and so on. For BE systems we should use CONFIG_SYS_NS16550_REG_SIZE set to 4 -- have a 3 byte gap on NS16550 base address and then point to the right byte on offset 3, or not? On LE systems we need to set -4 for *_REG_SIZE -- have a 3 byte gap after and betweeen each 8 bit registers. Anyway you solution looks interesting and I will test it. However since commit 79df120 we can use direct 32 bit access to 8 bit NS16550 registers without gap generation in ns16550.h ... we need sane in_*/out_* implementation. -- Best regards, Stephan Linz __ MB-Ref: http://www.li-pro.de/xilinx_mb:mbref:start OpenDCC: http://www.li-pro.net/opendcc.phtml PC/M: http://www.li-pro.net/pcm.phtml Sourceforge: http://sourceforge.net/users/slz Gitorious: https://gitorious.org/~slz ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 0/4] arm, omap3: Add support for TechNexion modules
On Mon, Nov 21, 2011 at 1:37 AM, Tapani Utriainen tap...@technexion.com wrote: All, these patches add support for TechNexion TAM3517, TAO3530 and TDM3730 SoMs. One more global comment. It looks like you're using x-loader or similar for these boards for the pre-U-boot stage. With u-boot master it should be a fairly mechanical change to have SPL work in these cases instead. -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] support for the coldfire M5234BCC
I am running the very latest mainstream Linux kernel on the Freescale M5234BCC. The kernel boots file (if I hack the root device in drivers/mtd/maps/uclinux.c). However, I am getting really tired of the dBUG thing. It only can fetch an image via TFTP if I force the host NIC into 10 megabit mode. I would really like to use a real bootloader, able to sent the kernel command line, and working at 100 mbit Ethernet. It looks like u-boot does not directly support this CPU. Google found one old message (on some other list) that someone had installed u-boot on this board. Did u-boot support this board in some past version? Does anyone know how to get this working? Thanks, Richard ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] OpenNand Support?
On 11/21/2011 08:10 AM, Mahavir Prasad wrote: Hello All, We are using MT29F32G08CBABAWP on our board. I would like to know whether the OpenNand interface is already supported in U-Boot? Also, could you please let me know where I can find more information to write OpenNand Interface driver for U-Boot? ONFI should be properly supported once we sync up with Linux's NAND code. There was a patchset to do this posted recently by Christian Hitz, though there are some minor things that need addressing before the patchset can be applied. -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/9] ARM: a320evb: re-add MACH_TYPE_FARADAY
Dear Po-Yu Chuang, On Sat, 19 Nov 2011 12:59:08 +0100 Anatolij Gustschin ag...@denx.de wrote: MACH_TYPE_FARADAY was removed from mach-types.h. Add it to the board config file. Could you please look at this patch and send your Acked-by if the patch is okay. Thanks, Anatolij Signed-off-by: Anatolij Gustschin ag...@denx.de --- board/faraday/a320evb/a320evb.c |1 - include/configs/a320evb.h |3 +++ 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/board/faraday/a320evb/a320evb.c b/board/faraday/a320evb/a320evb.c index 2578be4..dfd186b 100644 --- a/board/faraday/a320evb/a320evb.c +++ b/board/faraday/a320evb/a320evb.c @@ -31,7 +31,6 @@ DECLARE_GLOBAL_DATA_PTR; int board_init(void) { - gd-bd-bi_arch_number = MACH_TYPE_FARADAY; gd-bd-bi_boot_params = PHYS_SDRAM_1 + 0x100; ftsmc020_init();/* initialize Flash */ diff --git a/include/configs/a320evb.h b/include/configs/a320evb.h index 45a7c53..2904e2e 100644 --- a/include/configs/a320evb.h +++ b/include/configs/a320evb.h @@ -37,6 +37,9 @@ #undef CONFIG_SKIP_LOWLEVEL_INIT +#define MACH_TYPE_FARADAY758 +#define CONFIG_MACH_TYPE MACH_TYPE_FARADAY + /* * Power Management Unit */ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] efikamx: Configure the pins as GPIOs prior to using gpio_get_value.
On Monday 21 November 2011 09:20:49 Marek Vasut wrote: Configure the pins as GPIOs prior to using gpio_get_value + else { + mxc_request_iomux(MX51_PIN_GPIO1_8, IOMUX_CONFIG_ALT0); *absent = gpio_get_value(IOMUX_TO_GPIO(MX51_PIN_GPIO1_8)); - + } return 0; } NAK. There should be some common function for setting up iomux of those pins. You souldn't set it in repeatedly called functions. that's what gpio_request() is for -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] PXA: Drop CERF250 board
On Monday 21 November 2011 01:09:22 Marek Vasut wrote: On Sunday 20 November 2011 03:41:49 Marek Vasut wrote: no changelog as to why it's being dropped ? Nope. It's unmaintained ... let's see if the author will speak to us or not. does it fail to build ? is it missing some critical update ? a board that builds fine and probably works generally isn't considered from removal just because no commits have been made to it in a long time It doesn't build, exactly. you should put that into the changelog ;) -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 5/9] ARM: sbc35_a9g20: re-add MACH_TYPE_SBC35_A9G20
Dear Albin Tonnerre, On Sat, 19 Nov 2011 12:59:12 +0100 Anatolij Gustschin ag...@denx.de wrote: MACH_TYPE_SBC35_A9G20 was removed from mach-types.h. Add it to the board config file. Could you please look at this patch and send your Acked-by if the patch is okay? Thanks, Anatolij Signed-off-by: Anatolij Gustschin ag...@denx.de --- board/calao/sbc35_a9g20/sbc35_a9g20.c |1 - include/configs/sbc35_a9g20.h |3 +++ 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/board/calao/sbc35_a9g20/sbc35_a9g20.c b/board/calao/sbc35_a9g20/sbc35_a9g20.c index 5f448d9..446afb2 100644 --- a/board/calao/sbc35_a9g20/sbc35_a9g20.c +++ b/board/calao/sbc35_a9g20/sbc35_a9g20.c @@ -152,7 +152,6 @@ int board_init(void) /* Enable Ctrlc */ console_init_f(); - gd-bd-bi_arch_number = MACH_TYPE_SBC35_A9G20; /* adress of boot parameters */ gd-bd-bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; diff --git a/include/configs/sbc35_a9g20.h b/include/configs/sbc35_a9g20.h index 1e355a8..cdf8659 100644 --- a/include/configs/sbc35_a9g20.h +++ b/include/configs/sbc35_a9g20.h @@ -36,6 +36,9 @@ #define CONFIG_ENV_IS_IN_EEPROM #endif +#define MACH_TYPE_SBC35_A9G201848 +#define CONFIG_MACH_TYPE MACH_TYPE_SBC35_A9G20 + /* ARM asynchronous clock */ #define CONFIG_SYS_AT91_SLOW_CLOCK 32768 /* slow clock xtal */ #define CONFIG_SYS_AT91_MAIN_CLOCK 1200/* 12.000 MHz crystal */ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Allow for parallel builds and saved output
+ ${MAKE} clean + find ${output_dir} -type f -name '*.depend' | xargs rm why not use distclean and avoid the `find` ? otherwise, this find should be: find ${output_dir} -type f -name '*.depend' -exec rm -f {} + distclean removes the u-boot executables. I thought it would be useful to keep them around so one could theoretically test all of the systems one built. I run make clean (which doesn't delete the results) and delete the .depend files because otherwise one can very quickly fill up a disk with ./MAKEALL powerpc ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 6/9] ARM: tny_a9260: re-add MACH_TYPE_TNY_A9G20 and MACH_TYPE_TNY_A9260
Dear Albin Tonnerre, On Sat, 19 Nov 2011 12:59:13 +0100 Anatolij Gustschin ag...@denx.de wrote: MACH_TYPE_TNY_A9G20 and MACH_TYPE_TNY_A9260 were removed from mach-types.h. Add them to the board config file. Could you please look at this patch and send your Acked-by if the patch is okay? Thanks, Anatolij Signed-off-by: Anatolij Gustschin ag...@denx.de --- board/calao/tny_a9260/tny_a9260.c |5 - include/configs/tny_a9260.h |4 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/board/calao/tny_a9260/tny_a9260.c b/board/calao/tny_a9260/tny_a9260.c index ab51a33..a472b91 100644 --- a/board/calao/tny_a9260/tny_a9260.c +++ b/board/calao/tny_a9260/tny_a9260.c @@ -86,11 +86,6 @@ int board_init(void) /* Enable Ctrlc */ console_init_f(); -#if defined(CONFIG_TNY_A9260) - gd-bd-bi_arch_number = MACH_TYPE_TNY_A9260; -#elif defined(CONFIG_TNY_A9G20) - gd-bd-bi_arch_number = MACH_TYPE_TNY_A9G20; -#endif /* adress of boot parameters */ gd-bd-bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; diff --git a/include/configs/tny_a9260.h b/include/configs/tny_a9260.h index 986aeba..c632de6 100644 --- a/include/configs/tny_a9260.h +++ b/include/configs/tny_a9260.h @@ -45,8 +45,12 @@ /* Define actual evaluation board type from used processor type */ #ifdef CONFIG_AT91SAM9G20 # define CONFIG_TNY_A9G20 +# define MACH_TYPE_TNY_A9G20 2059 +# define CONFIG_MACH_TYPEMACH_TYPE_TNY_A9G20 #else # define CONFIG_TNY_A9260 +# define MACH_TYPE_TNY_A9260 2058 +# define CONFIG_MACH_TYPEMACH_TYPE_TNY_A9260 #endif /* ARM asynchronous clock */ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 1/3] mpc85xx: support board-specific reset function
This is useful for boards which cannot be reset in the usual way for the 85xx CPU. An example is a board which can only be reset by a hardware watchdog. Signed-off-by: Ira W. Snyder i...@ovro.caltech.edu --- Unchanged from v1. arch/powerpc/cpu/mpc85xx/cpu.c | 17 - 1 files changed, 16 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c index 49c0551..c1815e8 100644 --- a/arch/powerpc/cpu/mpc85xx/cpu.c +++ b/arch/powerpc/cpu/mpc85xx/cpu.c @@ -42,6 +42,16 @@ DECLARE_GLOBAL_DATA_PTR; +/* + * Default board reset function + */ +static void +__board_reset(void) +{ + /* Do nothing */ +} +void board_reset(void) __attribute__((weak, alias(__board_reset))); + int checkcpu (void) { sys_info_t sysinfo; @@ -215,7 +225,12 @@ int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) mtspr(DBCR0,val); #else volatile ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR); - out_be32(gur-rstcr, 0x2); /* HRESET_REQ */ + + /* Attempt board-specific reset */ + board_reset(); + + /* Next try asserting HRESET_REQ */ + out_be32(gur-rstcr, 0x2); udelay(100); #endif -- 1.7.3.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 0/3] mpc85xx: support for Freescale COM Express P2020
This is a cleaned up version of the U-Boot port provided with the BSP for the Freescale COM Express P2020 evaluation kit. This board is booted from SD card or SPI flash by using the Freescale On-Chip ROM to load U-Boot into L2 SRAM. U-Boot configures and initializes the DDR SDRAM using the SPD on the module. The SPD on the 2GB DDR3 DIMM shipped with this evaluation kit has an invalid value (0x08) in the module_type field (eeprom address 0x03). Therefore, a workaround patch was added to the SPD decoder to assume an unregistered DIMM in this case. Other suggestions are welcome. Changes v3 - v4: - address review comments - boot via L2 SRAM (just like P2020DS) - use SPD EEPROM to configure DDR SDRAM Changes v2 - v3: - re-enable CCSR relocation Changes v1 - v2: - fix checkpatch warnings - remove references to NAND (this board lacks NAND) - disable CCSR relocation Ira W. Snyder (3): mpc85xx: support board-specific reset function mpc8xxx: assume unregistered DIMM for invalid SPD module_type mpc85xx: support for Freescale COM Express P2020 MAINTAINERS |4 + arch/powerpc/cpu/mpc85xx/cpu.c | 17 +- arch/powerpc/cpu/mpc8xxx/ddr/ddr3_dimm_params.c |7 +- arch/powerpc/include/asm/immap_85xx.h |1 + board/freescale/p2020come/Makefile | 46 ++ board/freescale/p2020come/ddr.c | 45 ++ board/freescale/p2020come/law.c | 39 ++ board/freescale/p2020come/p2020come.c | 287 +++ board/freescale/p2020come/tlb.c | 99 boards.cfg |2 + include/configs/P2020COME.h | 576 +++ 11 files changed, 1118 insertions(+), 5 deletions(-) create mode 100644 board/freescale/p2020come/Makefile create mode 100644 board/freescale/p2020come/ddr.c create mode 100644 board/freescale/p2020come/law.c create mode 100644 board/freescale/p2020come/p2020come.c create mode 100644 board/freescale/p2020come/tlb.c create mode 100644 include/configs/P2020COME.h -- 1.7.3.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 2/3] mpc8xxx: assume unregistered DIMM for invalid SPD module_type
The generic Freescale DDR SDRAM SPD parsing code fails when the SPD's module_type field has an unknown value. In this case, we should assume that the memory module is an unregistered DIMM (the usual case). The DDR3 DIMM shipped with the Freescale COM Express P2020 Evaluation Kit has the module_type field set to 0x08. This is an unknown value in all documentation I can find online. Signed-off-by: Ira W. Snyder i...@ovro.caltech.edu Cc: York Sun york...@freescale.com --- New in v4. Suggestions for other ways to solve this are welcome. arch/powerpc/cpu/mpc8xxx/ddr/ddr3_dimm_params.c |7 +++ 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/cpu/mpc8xxx/ddr/ddr3_dimm_params.c b/arch/powerpc/cpu/mpc8xxx/ddr/ddr3_dimm_params.c index ffb503a..b2c0899 100644 --- a/arch/powerpc/cpu/mpc8xxx/ddr/ddr3_dimm_params.c +++ b/arch/powerpc/cpu/mpc8xxx/ddr/ddr3_dimm_params.c @@ -144,6 +144,9 @@ ddr_compute_dimm_parameters(const ddr3_spd_eeprom_t *spd, } break; + default: + printf(unknown module_type 0x%02X\n, spd-module_type); + /* assume normal unbuffered DIMM (fallthrough) */ case DDR3_SPD_MODULETYPE_UDIMM: case DDR3_SPD_MODULETYPE_SO_DIMM: case DDR3_SPD_MODULETYPE_MICRO_DIMM: @@ -152,10 +155,6 @@ ddr_compute_dimm_parameters(const ddr3_spd_eeprom_t *spd, if (spd-mod_section.unbuffered.addr_mapping 0x1) pdimm-mirrored_dimm = 1; break; - - default: - printf(unknown module_type 0x%02X\n, spd-module_type); - return 1; } /* SDRAM device parameters */ -- 1.7.3.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 3/3] mpc85xx: support for Freescale COM Express P2020
This adds support for the Freescale COM Express P2020 board. This board is similar to the P1_P2_RDB, but has some extra (as well as missing) peripherals. Unlike all other mpc85xx boards, it uses a watchdog timeout to reset. Using the HRESET_REQ register does not work. This board has no NOR flash, and can only be booted via SD or SPI. This procedure is documented in Freescale Document Number AN3659 Booting from On-Chip ROM (eSDHC or eSPI). Some alternative documentation is provided in Freescale Document Number P2020RM P2020 QorIQ Integrated Processor Reference Manual (section 4.5). Signed-off-by: Ira W. Snyder i...@ovro.caltech.edu --- Changes v3 - v4: - address review comments (magic numbers, etc.) - boot via L2 SRAM - use SPD EEPROM to initialize DDR SDRAM Changes v2 - v3: - re-enable CCSR relocation Changes v1 - v2: - fix checkpatch warnings - remove all references to NAND - update to top of tree U-Boot - remove CCSR relocation MAINTAINERS |4 + arch/powerpc/include/asm/immap_85xx.h |1 + board/freescale/p2020come/Makefile| 46 +++ board/freescale/p2020come/ddr.c | 45 +++ board/freescale/p2020come/law.c | 39 +++ board/freescale/p2020come/p2020come.c | 287 board/freescale/p2020come/tlb.c | 99 ++ boards.cfg|2 + include/configs/P2020COME.h | 576 + 9 files changed, 1099 insertions(+), 0 deletions(-) create mode 100644 board/freescale/p2020come/Makefile create mode 100644 board/freescale/p2020come/ddr.c create mode 100644 board/freescale/p2020come/law.c create mode 100644 board/freescale/p2020come/p2020come.c create mode 100644 board/freescale/p2020come/tlb.c create mode 100644 include/configs/P2020COME.h diff --git a/MAINTAINERS b/MAINTAINERS index f6f6b72..6ac8177 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -450,6 +450,10 @@ Jon Smirl jonsm...@gmail.com pcm030 MPC5200 +Ira W. Snyder i...@ovro.caltech.edu + + P2020COME P2020 + Timur Tabi ti...@freescale.com MPC8349E-mITX MPC8349 diff --git a/arch/powerpc/include/asm/immap_85xx.h b/arch/powerpc/include/asm/immap_85xx.h index 99fe97d..9b08cb8 100644 --- a/arch/powerpc/include/asm/immap_85xx.h +++ b/arch/powerpc/include/asm/immap_85xx.h @@ -2420,6 +2420,7 @@ struct ccsr_rman { #define CONFIG_SYS_MPC85xx_L2_OFFSET 0x2 #define CONFIG_SYS_MPC85xx_DMA_OFFSET 0x21000 #define CONFIG_SYS_MPC85xx_USB_OFFSET 0x22000 +#define CONFIG_SYS_MPC85xx_USB2_OFFSET 0x23000 #ifdef CONFIG_TSECV2 #define CONFIG_SYS_TSEC1_OFFSET0xB #else diff --git a/board/freescale/p2020come/Makefile b/board/freescale/p2020come/Makefile new file mode 100644 index 000..ba87904 --- /dev/null +++ b/board/freescale/p2020come/Makefile @@ -0,0 +1,46 @@ +# +# Copyright 2009 Freescale Semiconductor, Inc. +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# + +include $(TOPDIR)/config.mk + +LIB= $(obj)lib$(BOARD).o + +COBJS-y+= $(BOARD).o +COBJS-y+= ddr.o +COBJS-y+= law.o +COBJS-y+= tlb.o + +SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS-y)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(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/freescale/p2020come/ddr.c b/board/freescale/p2020come/ddr.c new file mode 100644 index 000..85f84c6 --- /dev/null +++ b/board/freescale/p2020come/ddr.c @@ -0,0 +1,45 @@ +/* + * Copyright 2009, 2011 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
Re: [U-Boot] [PATCH] Allow for parallel builds and saved output
On Monday 21 November 2011 00:15:21 Simon Glass wrote: On Sun, Nov 20, 2011 at 1:23 PM, Mike Frysinger wrote: On Thursday 03 November 2011 03:28:29 Andy Fleming wrote: + # Limit number of parallel builds + if [ ${CURRENT_COUNT} -gt ${BUILD_NBUILDS} ] ; then + CURRENT_COUNT=0; + wait; fi you don't need those semicolons. also, this is not as good as it should be: if you're running 10 jobs in parallel, you fork 10, and then you wait for all of them to finish before forking another set of 10. what you could do is something like: JOB_IDX=0 JOB_IDX_FIRST=0 BUILD_NBUILDS=1 ... foreach target ... ; do build_target pids[$(( JOB_IDX++ ))]=$! if [ $(( JOB_IDX - JOB_IDX_FIRST )) -ge ${BUILD_NBUILDS} ] ; then wait ${pids[$(( JOB_IDX_FIRST++ ))]} fi done wait this isn't perfect as it assumes the first job launched will always finish first, but it's a lot closer than the current code. Since all the jobs are launched at the same time this is not really a valid assumption is it? IMO on this point it's good enough as it is for now... my point was, it's about as valid as you can get in bash. you can't do non- blocking wait's in bash, nor can you wait on a list of pids and have it return only one at a time. the launching-jobs-at-the-same-time isn't really the worse part: builds can vary greatly in terms of how much code they actually compile. some boards are very small while others are quite fat. so your choices are: - make a general good enough assumption (which i did here) - have the main thread manually poll every child through some IPC mech such as looking for files the children touch when they're done, and *then* do the wait explicitly on that child the problem with the latter is that the code tends to get much more complicated, and the main thread ends up doing quite a bit of busy work which kills CPU cycles. my original assumption ends up keeping the CPU's fairly loaded i think, and is fairly simplistic code. -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] Allow for parallel builds and saved output
On Monday 21 November 2011 01:28:50 Andy Fleming wrote: On Sun, Nov 20, 2011 at 11:15 PM, Simon Glass wrote: On Sun, Nov 20, 2011 at 1:23 PM, Mike Frysinger wrote: On Thursday 03 November 2011 03:28:29 Andy Fleming wrote: you don't need those semicolons. also, this is not as good as it should be: if you're running 10 jobs in parallel, you fork 10, and then you wait for all of them to finish before forking another set of 10. what you could do is something like: JOB_IDX=0 JOB_IDX_FIRST=0 BUILD_NBUILDS=1 ... foreach target ... ; do build_target pids[$(( JOB_IDX++ ))]=$! if [ $(( JOB_IDX - JOB_IDX_FIRST )) -ge ${BUILD_NBUILDS} ] ; then wait ${pids[$(( JOB_IDX_FIRST++ ))]} fi done wait this isn't perfect as it assumes the first job launched will always finish first, but it's a lot closer than the current code. Since all the jobs are launched at the same time this is not really a valid assumption is it? IMO on this point it's good enough as it is for now... Mike's idea led me to a slightly crazier one that (I think) works. Basically, I have each build_targets invocation create a file named LOG/build_N when it is done, where N is the value of TOTAL_CNT when it is invoked. Then I keep track of the oldest uncompleted build #. When we hit our build limit, the script scans for LOG/build_N, for N from oldest to TOTAL_CNT, and updates the count of outstanding builds, as appropriate (and moves the index of the oldest). If the scanning completes without freeing up room for another build, it waits for a second, and then re-scans. sounds like it would work, but i'd want to see how much code it takes to actually implement this I tried this on my 24-core system with BUILD_NBUILDS set to 8 and BUILD_NCPUS set to 4, and pegged the system at ~24-30 the whole time. I will note that it only shaved about a minute off the 15 minutes it took to build all 85xx. compare to what ? your original patch, or my tweaked version ? -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] Allow for parallel builds and saved output
On Mon, Nov 21, 2011 at 1:01 PM, Mike Frysinger vap...@gentoo.org wrote: On Monday 21 November 2011 01:28:50 Andy Fleming wrote: On Sun, Nov 20, 2011 at 11:15 PM, Simon Glass wrote: On Sun, Nov 20, 2011 at 1:23 PM, Mike Frysinger wrote: On Thursday 03 November 2011 03:28:29 Andy Fleming wrote: you don't need those semicolons. also, this is not as good as it should be: if you're running 10 jobs in parallel, you fork 10, and then you wait for all of them to finish before forking another set of 10. what you could do is something like: JOB_IDX=0 JOB_IDX_FIRST=0 BUILD_NBUILDS=1 ... foreach target ... ; do build_target pids[$(( JOB_IDX++ ))]=$! if [ $(( JOB_IDX - JOB_IDX_FIRST )) -ge ${BUILD_NBUILDS} ] ; then wait ${pids[$(( JOB_IDX_FIRST++ ))]} fi done wait this isn't perfect as it assumes the first job launched will always finish first, but it's a lot closer than the current code. Since all the jobs are launched at the same time this is not really a valid assumption is it? IMO on this point it's good enough as it is for now... Mike's idea led me to a slightly crazier one that (I think) works. Basically, I have each build_targets invocation create a file named LOG/build_N when it is done, where N is the value of TOTAL_CNT when it is invoked. Then I keep track of the oldest uncompleted build #. When we hit our build limit, the script scans for LOG/build_N, for N from oldest to TOTAL_CNT, and updates the count of outstanding builds, as appropriate (and moves the index of the oldest). If the scanning completes without freeing up room for another build, it waits for a second, and then re-scans. sounds like it would work, but i'd want to see how much code it takes to actually implement this I tried this on my 24-core system with BUILD_NBUILDS set to 8 and BUILD_NCPUS set to 4, and pegged the system at ~24-30 the whole time. I will note that it only shaved about a minute off the 15 minutes it took to build all 85xx. compare to what ? your original patch, or my tweaked version ? Compared to my original. However, I think that may be due to my configuration. 8 builds with -j4 makes was 14, but 16 builds with -j2 resulted in just over 10 minutes. I'm doing more testing. Andy ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH v2 08/12] sf: Add spi_boot() to allow booting from SPI flash in an SPL
On Monday 21 November 2011 11:33:43 Christian Riesch wrote: --- a/drivers/mtd/spi/Makefile +++ b/drivers/mtd/spi/Makefile +ifdef CONFIG_SPL_BUILD +ifdef CONFIG_SPL_SPI_LOAD +COBJS-y += spi_spl_load.o +endif +endif if it's SPL only, then it should probably be in the spl/ tree somewhere ? --- /dev/null +++ b/drivers/mtd/spi/spi_spl_load.c + puts(Probing SPI flash...\n); useless noise ? + flash = spi_flash_probe(0, 0, CONFIG_SF_DEFAULT_SPEED, SPI_MODE_3); hardcoding bus/cs 0:0 doesn't make much sense. push them it into the arguments to the func, or add dedicated SPL defines for them which default to 0:0. --- a/include/spi_flash.h +++ b/include/spi_flash.h +__attribute__((noreturn)) void spi_boot(void); void spi_boot(void) __noreturn; --- a/lib/Makefile +++ b/lib/Makefile COBJS-$(CONFIG_SHA256) += sha256.o COBJS-y += strmhz.o COBJS-$(CONFIG_RBTREE) += rbtree.o +else +COBJS-$(CONFIG_SPL_SPI_FLASH_SUPPORT) += display_options.o endif unrelated change ? -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 v2 12/12] arm, davinci: Add support for generating AIS images to the Makefile
On Monday 21 November 2011 11:33:47 Christian Riesch wrote: --- a/Makefile +++ b/Makefile +$(obj)u-boot.ais: $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin + $(obj)tools/mkimage -s -n /dev/null -T aisimage \ + -e $(CONFIG_SPL_TEXT_BASE) -d $(obj)spl/u-boot-spl.bin \ + $(obj)spl/u-boot-spl.ais + $(OBJCOPY) ${OBJCFLAGS} -I binary --pad-to=$(PAD_TO) -O binary $(obj)spl/u-boot-spl.ais $(obj)spl/u-boot-spl-pad.ais + cat $(obj)spl/u-boot-spl-pad.ais $(obj)u-boot.bin $(obj)u-boot.ais + rm $(obj)spl/u-boot-spl.ais + rm $(obj)spl/u-boot-spl-pad.ais + can't this live in arch/arm/.../config.mk somewhere ? --- /dev/null +++ b/board/davinci/da8xxevm/config.mk +# required for SPI flash SPL +# + +PAD_TO := 32768 PAD_TO is way too generic a name. this should also be a CONFIG_XXX define in the board config header rather than using config.mk. -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 v4 2/3] mpc8xxx: assume unregistered DIMM for invalid SPD module_type
From: Ira W. Snyder [i...@ovro.caltech.edu] Sent: Monday, November 21, 2011 10:59 AM To: u-boot@lists.denx.de Cc: sun york-R58495 Subject: [PATCH v4 2/3] mpc8xxx: assume unregistered DIMM for invalid SPD module_type The generic Freescale DDR SDRAM SPD parsing code fails when the SPD's module_type field has an unknown value. In this case, we should assume that the memory module is an unregistered DIMM (the usual case). The DDR3 DIMM shipped with the Freescale COM Express P2020 Evaluation Kit has the module_type field set to 0x08. This is an unknown value in all documentation I can find online. Signed-off-by: Ira W. Snyder i...@ovro.caltech.edu Cc: York Sun york...@freescale.com --- Isn't 0x08 72b-SO-UDIMM? York ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Allow for parallel builds and saved output
On Monday 21 November 2011 13:56:16 Andy Fleming wrote: + ${MAKE} clean + find ${output_dir} -type f -name '*.depend' | xargs rm why not use distclean and avoid the `find` ? otherwise, this find should be: find ${output_dir} -type f -name '*.depend' -exec rm -f {} + distclean removes the u-boot executables. I thought it would be useful to keep them around so one could theoretically test all of the systems one built. I run make clean (which doesn't delete the results) and delete the .depend files because otherwise one can very quickly fill up a disk with ./MAKEALL powerpc perhaps add a new clean target that does this (mostlyclean) ? what you want sounds generally useful to me ... -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 v2 08/12] sf: Add spi_boot() to allow booting from SPI flash in an SPL
On 11/21/2011 01:07 PM, Mike Frysinger wrote: On Monday 21 November 2011 11:33:43 Christian Riesch wrote: --- a/drivers/mtd/spi/Makefile +++ b/drivers/mtd/spi/Makefile +ifdef CONFIG_SPL_BUILD +ifdef CONFIG_SPL_SPI_LOAD +COBJS-y += spi_spl_load.o +endif +endif if it's SPL only, then it should probably be in the spl/ tree somewhere ? That's not how the NAND stuff got done -- we should be consistent here. I think it's nice to keep all drivers, SPL or not, for a given type of hardware in one place. -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] OpenNand Support?
Hello Scott, ONFI should be properly supported once we sync up with Linux's NAND code. Thanks for the reply. Is the item in priority for U-Boot maintainers? Can I expect it to be integrated with the main tree sometime in near future? Or should I start with the ONFI patches? Thanks and Regards, Mahavir On Tue, Nov 22, 2011 at 12:09 AM, Scott Wood scottw...@freescale.comwrote: On 11/21/2011 08:10 AM, Mahavir Prasad wrote: Hello All, We are using MT29F32G08CBABAWP on our board. I would like to know whether the OpenNand interface is already supported in U-Boot? Also, could you please let me know where I can find more information to write OpenNand Interface driver for U-Boot? ONFI should be properly supported once we sync up with Linux's NAND code. There was a patchset to do this posted recently by Christian Hitz, though there are some minor things that need addressing before the patchset can be applied. -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 0/9] Fix build issues for some ARM boards
Hi Albert, On Mon, 21 Nov 2011 17:45:51 +0100 Albert ARIBAUD albert.u.b...@aribaud.net wrote: ... ARM: a320evb: re-add MACH_TYPE_FARADAY ARM: cerf250: re-add MACH_TYPE_PXA_CERF ARM: cradle: re-add MACH_TYPE_HHP_CRADLE ARM: pleb2: re-add MACH_TYPE_PLEB2 ARM: sbc35_a9g20: re-add MACH_TYPE_SBC35_A9G20 ARM: tny_a9260: re-add MACH_TYPE_TNY_A9G20 and MACH_TYPE_TNY_A9260 ARM: xm250: re-add MACH_TYPE_XM250 ARM: cerf250: fix GCC 4.6 warings ARM: xm250: Fix GCC 4.6 warnings Can you Cc: the respective board maintainers? There is no maintainer for cerf250, cradle, pleb2 and xm250. The address ratb...@faraday-tech.com of the a320evb board maintainer doesn't exist. I've send an email to sbc35_a9g20 and tny_a9260 maintainer and asked for review. Thanks, Anatolij ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] OpenNand Support?
On 11/21/2011 01:16 PM, Mahavir Prasad wrote: Hello Scott, ONFI should be properly supported once we sync up with Linux's NAND code. Thanks for the reply. Is the item in priority for U-Boot maintainers? Can I expect it to be integrated with the main tree sometime in near future? Or should I start with the ONFI patches? I hope that Christian -- or someone else, maybe you? :-) -- will respin the patchset based on the feedback given. If not, I may do so eventually, but I do have other tasks not related to U-Boot that are demanding my time at the moment. -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] efikamx: Configure the pins as GPIOs prior to using gpio_get_value.
On Monday 21 November 2011 09:20:49 Marek Vasut wrote: Configure the pins as GPIOs prior to using gpio_get_value + else { + mxc_request_iomux(MX51_PIN_GPIO1_8, IOMUX_CONFIG_ALT0); *absent = gpio_get_value(IOMUX_TO_GPIO(MX51_PIN_GPIO1_8)); - + } return 0; } NAK. There should be some common function for setting up iomux of those pins. You souldn't set it in repeatedly called functions. that's what gpio_request() is for I mean in efika.c ... there should be a common place for these iomux configurations being done. This is unrelated to gpio ... -mike ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 2/3] mpc8xxx: assume unregistered DIMM for invalid SPD module_type
On Mon, Nov 21, 2011 at 07:11:14PM +, sun york-R58495 wrote: From: Ira W. Snyder [i...@ovro.caltech.edu] Sent: Monday, November 21, 2011 10:59 AM To: u-boot@lists.denx.de Cc: sun york-R58495 Subject: [PATCH v4 2/3] mpc8xxx: assume unregistered DIMM for invalid SPD module_type The generic Freescale DDR SDRAM SPD parsing code fails when the SPD's module_type field has an unknown value. In this case, we should assume that the memory module is an unregistered DIMM (the usual case). The DDR3 DIMM shipped with the Freescale COM Express P2020 Evaluation Kit has the module_type field set to 0x08. This is an unknown value in all documentation I can find online. Signed-off-by: Ira W. Snyder i...@ovro.caltech.edu Cc: York Sun york...@freescale.com --- Isn't 0x08 72b-SO-UDIMM? I found this document, which specifies 7 modes not listed in U-Boot's include/ddr_spd.h. http://www.jedec.org/standards-documents/docs/spd-4010211 I'll try to add support for all of the other types defined as I add support for the module type that I have. Thanks, Ira ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] worth submitting a patch to fix u-boot for lite 5200b?
On Mon, 21 Nov 2011, Tom Rini wrote: On Sun, Nov 20, 2011 at 12:34 PM, Robert P. J. Day rpj...@crashcourse.ca wrote: from back in april, karim yaghmour pointed out a problem related to older lite5200 boards, and suggested a fix: http://old.nabble.com/-U-Boot---PATCH--Env.-vars-fix-for-lite5200-td31013626.html i checked my git clone of u-boot and it seems that the file include/configs/IceCube.h still contains the original code: #if defined(CONFIG_SYS_LOWBOOT16) #define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x0004) #endif #endif /* CONFIG_SYS_LOWBOOT */ #endif /* CONFIG_LITE5200B */ would it be proper to submit a patch to change 0x0004 to 0x0005? i admit i don't know enough about what else might be affected or what else might also need to change, i know only that that change is necessary for u-boot to run properly on that type of board. thoughts? is that an appropriate standalone patch? Well, a patch that addresses Wolfgang's comments and is git am'able would be a step in the right direction. i don't know enough about what's going on underneath to know if that single-line patch is standalone, whether it would make logical sense to group it with any other changes, or even if it's sufficiently specialized that it should be user-selectable thru a config option. i do know that that change is sufficient for the boards we're using. if that's sufficient to justify a patch, i can submit that to the list. otherwise, i'm definitely going to need some guidance from a powerpc expert. rday -- Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] OpenNand Support?
Hello Scott, I will start looking into the patch set. If I am successful with it then I will definitely want to contribute it back. Thanks and Regards, Mahavir On Tue, Nov 22, 2011 at 12:56 AM, Scott Wood scottw...@freescale.comwrote: On 11/21/2011 01:16 PM, Mahavir Prasad wrote: Hello Scott, ONFI should be properly supported once we sync up with Linux's NAND code. Thanks for the reply. Is the item in priority for U-Boot maintainers? Can I expect it to be integrated with the main tree sometime in near future? Or should I start with the ONFI patches? I hope that Christian -- or someone else, maybe you? :-) -- will respin the patchset based on the feedback given. If not, I may do so eventually, but I do have other tasks not related to U-Boot that are demanding my time at the moment. -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Allow for parallel builds and saved output
On Monday 21 November 2011 14:29:35 Simon Glass wrote: - write it in Python :-) yeah, i'm not interested in doing that. imo, these build scripts should remain in shell land. i don't even like things being moved to perl. -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 1/2] efikamx: Configure the pins as GPIOs prior to using gpio_get_value.
On Monday 21 November 2011 14:29:50 Marek Vasut wrote: On Monday 21 November 2011 09:20:49 Marek Vasut wrote: Configure the pins as GPIOs prior to using gpio_get_value + else { + mxc_request_iomux(MX51_PIN_GPIO1_8, IOMUX_CONFIG_ALT0); *absent = gpio_get_value(IOMUX_TO_GPIO(MX51_PIN_GPIO1_8)); - + } NAK. There should be some common function for setting up iomux of those pins. You souldn't set it in repeatedly called functions. that's what gpio_request() is for I mean in efika.c ... there should be a common place for these iomux configurations being done. This is unrelated to gpio ... not really ... imo, if someone does gpio_request(PIN), the gpio core should take care of putting it into GPIO mode. people shouldn't have to pinmux_request(PIN, GPIO_MODE) before doing gpio_request(PIN). -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 1/2] image: add support for Android's boot image format
Dear Sebastian Andrzej Siewior, In message 1321884575-2993-2-git-send-email-bige...@linutronix.de you wrote: This patch adds support for the Android boot-image format. The header file is from the Android project and got slightly alterted so the struct + its defines are not generic but have something like a namespace. The header file is from bootloader/legacy/include/boot/bootimg.h. The header parsing has been written from scratch and I looked at bootloader/legacy/usbloader/usbloader.c for some details. The image contains the physical address (load address) of the kernel and ramdisk. This address is considered only for the kernel image. The second image is currently ignored. I haven't found anything that is creating this. Please provide _exact_ reference where this code has been copied from, see bullet 4 etc. at http://www.denx.de/wiki/view/U-Boot/Patches#Attributing_Code_Copyrights_Sign Also please provide exact information about the applicable licenses for this copied code. ... /* get image parameters */ - switch (genimg_get_format(os_hdr)) { + img_type = genimg_get_format(os_hdr); + switch (img_type) { ... +#ifdef CONFIG_ANDROID_BOOT_IMAGE + } else if (img_type == IMAGE_FORMAT_ANDROID) { + images.ep = images.os.load; +#endif Why don't you handle the Andoid image case inside the switch() ? +#ifdef CONFIG_ANDROID_BOOT_IMAGE +static char andr_tmp_str[ANDR_BOOT_ARGS_SIZE + 1]; +static int android_image_get_kernel(struct andr_img_hdr *hdr, int verify) +{ + /* + * Not all Android tools use the id field for signing the image with + * sha1 (or anything) so we don't check it. It is not obvious that the + * string is null terminated so we take care of this. + */ + strncpy(andr_tmp_str, hdr-name, ANDR_BOOT_NAME_SIZE); + andr_tmp_str[ANDR_BOOT_NAME_SIZE] = '\0'; + if (strlen(andr_tmp_str)) + printf(Android's image name: %s\n, andr_tmp_str); + + printf(Kernel load addr 0x%08x size %u KiB\n, + hdr-kernel_addr, DIV_ROUND_UP(hdr-kernel_size, 1024)); + strncpy(andr_tmp_str, hdr-cmdline, ANDR_BOOT_ARGS_SIZE); + andr_tmp_str[ANDR_BOOT_ARGS_SIZE] = '\0'; + if (strlen(andr_tmp_str)) { + printf(Kernel command line: %s\n, andr_tmp_str); + setenv(bootargs, andr_tmp_str); + } + if (hdr-ramdisk_size) + printf(RAM disk load addr 0x%08x size %u KiB\n, + hdr-ramdisk_addr, + DIV_ROUND_UP(hdr-ramdisk_size, 1024)); + return 0; +} +#endif This and similar Android image related code shoudl eventually go into a separate file, exposing only a few functions. +#ifdef CONFIG_ANDROID_BOOT_IMAGE + if (format == IMAGE_FORMAT_INVALID) { + const struct andr_img_hdr *ahdr = img_addr; + if (!memcmp(ANDR_BOOT_MAGIC, ahdr-magic, ANDR_BOOT_MAGIC_SIZE)) + format = IMAGE_FORMAT_ANDROID; + } +#endif This is all we have for testing for a valid image? index 000..b231b66 --- /dev/null +++ b/include/android_image.h @@ -0,0 +1,89 @@ +/* + * This is from the Android Project, + * bootloader/legacy/include/boot/bootimg.h + * + * Copyright (C) 2008 The Android Open Source Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in + *the documentation and/or other materials provided with the + *distribution. Sorry, but this is not GPL compatible. 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] Allow for parallel builds and saved output
Hi Mike, On Mon, Nov 21, 2011 at 12:13 PM, Mike Frysinger vap...@gentoo.org wrote: On Monday 21 November 2011 14:29:35 Simon Glass wrote: - write it in Python :-) yeah, i'm not interested in doing that. imo, these build scripts should remain in shell land. i don't even like things being moved to perl. -mike That's fine with me, iwc I think Andy's solution is about as far as we want to go in bash-land. Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v6 0/4] Buffer overruns in printf
Hi, On Wed, Nov 2, 2011 at 12:52 PM, Simon Glass s...@chromium.org wrote: The printf family of functions in U-Boot cannot deal with a situation where the caller provides a buffer which turns out to be too small for the format string. This can result in buffer overflows, stack overflows and other bad behavior. Does any maintainer want to pick up this series? It passes the MAKEALL test for me. Regards, Simon This patch series tidies this up in the common vsprintf.c code. You can find a discussion of the Linux / U-Boot licensing issues here: http://patchwork.ozlabs.org/patch/116161/ Code Size Impact (From Simon Glass s...@chromium.org) With my ARMv7 compiler (gcc-4.4.3_cos_gg_53174) the code size increase is 312 bytes, about 10% increase to code size vsprintf.o. With the CONFIG_SYS_VSNPRINT option undefined, the code size impact is 4 bytes. Changes in v2: - Use sizeof(printbuffer) instead of CONFIG_SYS_PBSIZE - Drop patch which changes network code to use snprintf() Changes in v3: - Move prototypes from common.h to vsprintf.h - Add CONFIG_SYS_VSNPRINT option to enable vsnprintf() functions - Update README with CONFIG_SYS_VSNPRINT docs - Use ADDCH macro to support checking/not checking end pointer - Move function documentation into header file Changes in v4: - Add these changes in unless CONFIG_NO_SYS_VSNPRINT is defined - Reduce code size overhead if disabled to only 4 bytes on ARM - Remove the ugly #ifdef patch from series since it only saves 4 bytes Changes in v5: - Define INT_MAX locally within vsprintf.c - Drop limits.h as it is used in only two places in U-Boot Changes in v6: - Change the config option to CONFIG_SYS_VSNPRINTF - Make the default be to NOT include safe printf functions Simon Glass (2): Move vsprintf functions into their own header vsprintf: Move function documentation into header file Sonny Rao (2): Add safe vsnprintf and snprintf library functions Make printf and vprintf safe from buffer overruns README | 9 ++ common/console.c | 10 +- include/common.h | 11 +-- include/vsprintf.h | 181 +++ lib/vsprintf.c | 237 --- 5 files changed, 345 insertions(+), 103 deletions(-) create mode 100644 include/vsprintf.h -- 1.7.3.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot