Re: [U-Boot] [PATCH/RFC] fix several printf() modifiers
Dear Mike Frysinger, On 15.12.2011 06:35, Mike Frysinger wrote: On Wednesday 14 December 2011 05:04:07 Andreas Bießmann wrote: --- a/arch/avr32/cpu/at32ap700x/mmu.c +++ b/arch/avr32/cpu/at32ap700x/mmu.c -printf(VMR table @ 0x%08x\n, vmr_table_addr); +printf(VMR table @ %#lx\n, vmr_table_addr); this isn't the same. probably should be %08lx. You are right, but as you may know the memory map for at32ap7000 has its SDRAM physically at 0x1000. Therefore the result will be the same for 0x%08lx and %#lx (in all currently available boards). But maybe one will locate the vmr_table sometimes in SRAM some day? I will provide v2 which change this back, split off in three patches and add the respective custodian in cc. best regards Andreas Bießmann ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/1] ARMV7: Add support For Logic OMAP35x/DM37x modules
Hi Peter, In addition to Tom's comments, several comments below: On 12/15/11 00:47, Peter Barada wrote: From: Peter Barada pet...@logicpd.com This patch adds basic support for OMAP35x/DM37x SOM LV/Torpedo reference boards. It assumes U-boot is loaded to SDRAM with the help of another small bootloader (x-load) running from SRAM. Signed-off-by: Peter Barada peter.bar...@logicpd.com --- board/logicpd/omap3som/Makefile | 48 +++ board/logicpd/omap3som/config.mk| 33 ++ board/logicpd/omap3som/omap3logic.c | 566 +++ board/logicpd/omap3som/omap3logic.h | 35 +++ boards.cfg |1 + include/configs/omap3_logic.h | 356 ++ 6 files changed, 1039 insertions(+), 0 deletions(-) create mode 100644 board/logicpd/omap3som/Makefile create mode 100644 board/logicpd/omap3som/config.mk create mode 100644 board/logicpd/omap3som/omap3logic.c create mode 100644 board/logicpd/omap3som/omap3logic.h create mode 100644 include/configs/omap3_logic.h diff --git a/board/logicpd/omap3som/Makefile b/board/logicpd/omap3som/Makefile new file mode 100644 index 000..ef0409f --- /dev/null +++ b/board/logicpd/omap3som/Makefile @@ -0,0 +1,48 @@ +# +# (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-y := omap3logic.o + +COBJS:= $(sort $(COBJS-y)) +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 are obsolete in this directory level, please remove. + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend diff --git a/board/logicpd/omap3som/config.mk b/board/logicpd/omap3som/config.mk new file mode 100644 index 000..897b252 --- /dev/null +++ b/board/logicpd/omap3som/config.mk @@ -0,0 +1,33 @@ +# +# (C) Copyright 2006 - 2008 +# Texas Instruments, www.ti.com +# +# EVM uses OMAP3 (ARM-CortexA8) cpu +# see http://www.ti.com/ for more information on Texas Instruments +# +# 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 +# +# Physical Address: +# 8000' (bank0) +# A000/ (bank1) +# Linux-Kernel is expected to be at 8000'8000, entry 8000'8000 +# (mem base + reserved) + +# For use with external or internal boots. +CONFIG_SYS_TEXT_BASE = 0x8040 As Tom already said, this should be in the board config file and this file should be removed completely. diff --git a/board/logicpd/omap3som/omap3logic.c b/board/logicpd/omap3som/omap3logic.c new file mode 100644 index 000..5c6e896 --- /dev/null +++ b/board/logicpd/omap3som/omap3logic.c @@ -0,0 +1,566 @@ +/* + * (C) Copyright 2011 + * Logic Product Development www.logicpd.com + * + * Author : + * Peter Barada peter.bar...@logicpd.com + * + * Derived from Beagle Board and 3430 SDP code by + * Richard Woodruff r-woodru...@ti.com + * Syed Mohammed Khasim kha...@ti.com + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can
[U-Boot] [PATCH v2 0/3] fix several printf() length modifers
From: Andreas Bießmann biessm...@corscience.de Andreas Bießmann (3): cmd_sf.c: fix printf() length modifier fat.c: fix printf() length modifier avr32:mmu.c: fix printf() length modifier arch/avr32/cpu/at32ap700x/mmu.c |2 +- common/cmd_sf.c |4 ++-- fs/fat/fat.c|2 +- 3 files changed, 4 insertions(+), 4 deletions(-) -- 1.7.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 1/3] cmd_sf.c: fix printf() length modifier
From: Andreas Bießmann biessm...@corscience.de size_t is not always 'unsigned int', use corret length modifer. This patch fixes following warning: ---8--- cmd_sf.c: In function 'spi_flash_update_block': cmd_sf.c:130: warning: format '%#x' expects type 'unsigend int', but argument 4 has type 'size_t' cmd_sf.c:135: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'size_t' ---8--- Signed-off-by: Andreas Bießmann biessm...@corscience.de cc: Mike Frysinger vap...@gentoo.org cc: Thomas Chou tho...@wytron.com.tw --- changes since v1: split off into single patches total: 0 errors, 0 warnings, 14 lines checked NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE 0001-cmd_sf.c-fix-printf-length-modifier.patch has no obvious style problems and is ready for submission. common/cmd_sf.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/cmd_sf.c b/common/cmd_sf.c index 7225656..612fd18 100644 --- a/common/cmd_sf.c +++ b/common/cmd_sf.c @@ -127,12 +127,12 @@ static int do_spi_flash_probe(int argc, char * const argv[]) static const char *spi_flash_update_block(struct spi_flash *flash, u32 offset, size_t len, const char *buf, char *cmp_buf, size_t *skipped) { - debug(offset=%#x, sector_size=%#x, len=%#x\n, + debug(offset=%#x, sector_size=%#x, len=%#zx\n, offset, flash-sector_size, len); if (spi_flash_read(flash, offset, len, cmp_buf)) return read; if (memcmp(cmp_buf, buf, len) == 0) { - debug(Skip region %x size %x: no change\n, + debug(Skip region %x size %zx: no change\n, offset, len); *skipped += len; return NULL; -- 1.7.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 2/3] fat.c: fix printf() length modifier
From: Andreas Bießmann biessm...@corscience.de The DIRENTSPERBLOCK utilizes sizeof() which will return a size_t which has no fixed size. Therefor use correct length modifer for printf() statement to prevent compiler warnings. This patch fixes following warning: ---8--- fat.c: In function 'do_fat_read': fat.c:879: warning: format '%d' expects type 'int', but argument 4 has type 'long unsigned int' ---8--- Signed-off-by: Andreas Bießmann biessm...@corscience.de cc: Mike Frysinger vap...@gentoo.org cc: Thomas Chou tho...@wytron.com.tw cc: rjo...@nexus-tech.net cc: khar...@nexus-tech.net --- changes since v1: split off into single patches total: 0 errors, 0 warnings, 8 lines checked NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE 0002-fat.c-fix-printf-length-modifier.patch has no obvious style problems and is ready for submission. fs/fat/fat.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/fat/fat.c b/fs/fat/fat.c index 9a29458..dbb8db9 100644 --- a/fs/fat/fat.c +++ b/fs/fat/fat.c @@ -876,7 +876,7 @@ do_fat_read (const char *filename, void *buffer, unsigned long maxsize, while (1) { int i; - debug(FAT read sect=%d, clust_size=%d, DIRENTSPERBLOCK=%d\n, + debug(FAT read sect=%d, clust_size=%d, DIRENTSPERBLOCK=%zd\n, cursect, mydata-clust_size, DIRENTSPERBLOCK); if (disk_read(cursect, -- 1.7.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 3/3] avr32:mmu.c: fix printf() length modifier
From: Andreas Bießmann biessm...@corscience.de avr32 uses unsigned long addresses, fix the printf() length modifier for that fact. Before this patch following warning occours: ---8--- mmu.c: In function 'mmu_init_r': mmu.c:25: warning: format '%08x' expects type 'unsigned int', but argument 2 has type 'uintptr_t' ---8--- Signed-off-by: Andreas Bießmann biessm...@corscience.de cc: Mike Frysinger vap...@gentoo.org cc: Thomas Chou tho...@wytron.com.tw cc: Reinhard Meyer u-b...@emk-elektronik.de --- changes since v1: split off into single patches total: 0 errors, 0 warnings, 8 lines checked NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE 0003-avr32-mmu.c-fix-printf-length-modifier.patch has no obvious style problems and is ready for submission. arch/avr32/cpu/at32ap700x/mmu.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/avr32/cpu/at32ap700x/mmu.c b/arch/avr32/cpu/at32ap700x/mmu.c index c3a1b93..0e28b21 100644 --- a/arch/avr32/cpu/at32ap700x/mmu.c +++ b/arch/avr32/cpu/at32ap700x/mmu.c @@ -22,7 +22,7 @@ void mmu_init_r(unsigned long dest_addr) */ vmr_table_addr = (uintptr_t)mmu_vmr_table; sysreg_write(PTBR, vmr_table_addr); - printf(VMR table @ 0x%08x\n, vmr_table_addr); + printf(VMR table @ 0x%08lx\n, vmr_table_addr); /* Enable paging */ sysreg_write(MMUCR, SYSREG_BF(DRP, 1) | SYSREG_BF(DLA, 1) -- 1.7.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 4/4] README: add documentation for CONFIG_USB_ULPI*
On 12/14/11 21:26, Simon Glass wrote: Hi Igor, On Tue, Dec 13, 2011 at 9:51 PM, Igor Grinberg grinb...@compulab.co.il wrote: Hi Simon, On 12/14/11 02:28, Simon Glass wrote: Hi Igor, On Mon, Dec 12, 2011 at 2:08 AM, Igor Grinberg grinb...@compulab.co.il wrote: Add documentation for CONFIG_USB_ULPI and CONFIG_USB_ULPI_VIEWPORT configuration options. Signed-off-by: Igor Grinberg grinb...@compulab.co.il --- README |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/README b/README index ff72e47..6fe1e0f 100644 --- a/README +++ b/README @@ -1185,6 +1185,14 @@ The following options need to be configured: for your device - CONFIG_USBD_PRODUCTID 0x +- ULPI Layer Support: + The ULPI (UTMI Low Pin (count) Interface) PHYs are supported via + the generic ULPI layer. The generic layer accesses the ULPI PHY + via the platform viewport, so you need both the genric layer and + the viewport enabled. Currently only Chipidea/ARC based + viewport is supported. Where does it say that only this one is supported in the code? You mean comments or the code? Well the filename seems generic and not specific to that chip. Are viewports something that other chips can support? Let me clarify: 1) It is not the chip it is the controller (IP block) inside the SoC. 2) viewport is just the register name inside the SoC that provides and interface of the controller to access the ULPI PHY. I think every SoC that uses that controller has the viewport setup this way, but I might be wrong (and that's why the viewport is separated from the generic ULPI spec implementation). Regarding the name... yeah it could be renamed, but it follows Linux naming currently and it is the first one submitted, so IMO it can be named that generically. COBJS-$(CONFIG_USB_ULPI) += ulpi.o COBJS-$(CONFIG_USB_ULPI_VIEWPORT) += ulpi-viewport.o It would be good if you could mention the two new CONFIG options in the README. I did, see below... What is specific to that device? The viewport bits? It is not a part of the ULPI spec. Other vendors do not have to comply with those. For example PXA310 has those bits placed and named in some other way... OK I didn't realise that. I think same stand for OMAP, but I'm not sure. OMAP still does arbitrary register writes for accessing ULPI. + To enable the ULPI layer support, define CONFIG_USB_ULPI and + CONFIG_USB_ULPI_VIEWPORT in your board configuration file. Here the configs are documented. I admit, it is not that brilliant documentation... -- Regards, Igor. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 3/3] usb:gadget:s5p Enable the USB Gadget framework at Exynos4210 (C210 Universal)
This commit enables support for USB Gadgets on the Exynos4210 (C210 Universal) reference target. Signed-off-by: Lukasz Majewski l.majew...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com Cc: Minkyu Kang mk7.k...@samsung.com CC: Remy Bohmer li...@bohmer.net --- Changes for v2: - Rename the S5PC210_Universal to Exynos4210 Changes for v3: - status check removed - SAFEOUT1 LDO enabled for USB operation - Reorder of USB LDOs --- /checkpatch.pl - total: 0 errors, 0 warnings, 79 lines checked --- arch/arm/include/asm/arch-exynos/cpu.h |1 + board/samsung/universal_c210/universal.c | 48 ++ include/configs/s5pc210_universal.h |4 ++ include/max8998_pmic.h |1 + 4 files changed, 54 insertions(+), 0 deletions(-) diff --git a/arch/arm/include/asm/arch-exynos/cpu.h b/arch/arm/include/asm/arch-exynos/cpu.h index 4464d27..6d97b99 100644 --- a/arch/arm/include/asm/arch-exynos/cpu.h +++ b/arch/arm/include/asm/arch-exynos/cpu.h @@ -46,6 +46,7 @@ #define EXYNOS4_ADC_BASE 0x1391 #define EXYNOS4_PWMTIMER_BASE 0x139D #define EXYNOS4_MODEM_BASE 0x13A0 +#define EXYNOS4_USBPHY_CONTROL 0x10020704 #ifndef __ASSEMBLY__ #include asm/io.h diff --git a/board/samsung/universal_c210/universal.c b/board/samsung/universal_c210/universal.c index f9b8a76..8393e4f 100644 --- a/board/samsung/universal_c210/universal.c +++ b/board/samsung/universal_c210/universal.c @@ -28,6 +28,9 @@ #include asm/arch/gpio.h #include asm/arch/mmc.h #include pmic.h +#include usb/s3c_udc.h +#include asm/arch/cpu.h +#include max8998_pmic.h DECLARE_GLOBAL_DATA_PTR; @@ -253,3 +256,48 @@ int board_mmc_init(bd_t *bis) } #endif + +#ifdef CONFIG_USB_GADGET +static int s5pc210_phy_control(int on) +{ + int ret; + struct pmic *p = get_pmic(); + + if (pmic_probe(p)) + return -1; + + if (on) { + ret |= pmic_set_output(p, + MAX8998_REG_BUCK_ACTIVE_DISCHARGE3, + MAX8998_SAFEOUT1, LDO_ON); + ret |= pmic_set_output(p, MAX8998_REG_ONOFF1, + MAX8998_LDO3, LDO_ON); + ret |= pmic_set_output(p, MAX8998_REG_ONOFF2, + MAX8998_LDO8, LDO_ON); + + } else { + ret |= pmic_set_output(p, MAX8998_REG_ONOFF2, + MAX8998_LDO8, LDO_OFF); + ret |= pmic_set_output(p, MAX8998_REG_ONOFF1, + MAX8998_LDO3, LDO_OFF); + ret |= pmic_set_output(p, + MAX8998_REG_BUCK_ACTIVE_DISCHARGE3, + MAX8998_SAFEOUT1, LDO_OFF); + } + + if (ret) { + puts(MAX8998 LDO setting error!\n); + return -1; + } + + return 0; +} + +struct s3c_plat_otg_data s5pc210_otg_data = { + .phy_control = s5pc210_phy_control, + .regs_phy = EXYNOS4_USBPHY_BASE, + .regs_otg = EXYNOS4_USBOTG_BASE, + .usb_phy_ctrl = EXYNOS4_USBPHY_CONTROL, + .usb_flags = PHY0_SLEEP, +}; +#endif diff --git a/include/configs/s5pc210_universal.h b/include/configs/s5pc210_universal.h index b36ad3a..be000cb 100644 --- a/include/configs/s5pc210_universal.h +++ b/include/configs/s5pc210_universal.h @@ -262,4 +262,8 @@ #define CONFIG_PMIC_I2C #define CONFIG_PMIC_MAX8998 +#define CONFIG_USB_GADGET +#define CONFIG_USB_GADGET_S3C_UDC_OTG +#define CONFIG_USB_GADGET_DUALSPEED + #endif /* __CONFIG_H */ diff --git a/include/max8998_pmic.h b/include/max8998_pmic.h index bf28820..10c892a 100644 --- a/include/max8998_pmic.h +++ b/include/max8998_pmic.h @@ -76,6 +76,7 @@ enum { #define MAX8998_LDO3 (1 2) #define MAX8998_LDO8 (1 5) +#define MAX8998_SAFEOUT1 (1 4) #define MAX8998_I2C_ADDR(0xCC 1) -- 1.7.2.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V4] nand_spl_simple: store ecc data on the stack
On 15/12/2011 10:03, Simon Schwarz wrote: Hi Stefano, On 12/14/2011 09:49 AM, Stefano Babic wrote: [SNIP] Because I thought that the patch will be merged by Tom, I rebased the patch on u-boot-ti. This is also because there is Ilya's patch: nand_spl_simple: add support for software ECC that modifies the same file. The patch can be applied flawlessy on top of u-boot-ti, I have checked now again. For testing I have then applied your SPL Linux patches, and tried to boot linux, as I know there is a conflict with the ECC area. Tom, it is surely better (I forget to mention) that you merge the patch into u-boot-ti, because you have already merged Ilya's patch. Regards, Stefano hmm. I tried it on u-boot-ti (master and next) and it didn't apply. The problem was with drivers/mtd/nand/nand_spl_simple.c:145. The last commit touching the file was from Anatolij on 3th december. I see, maybe it was not already merged when I tested. I send a rebased patch. 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] [PATCH V5] nand_spl_simple: store ecc data on the stack
Currently nand_spl_simple puts it's temp data at 0x1 offset in SDRAM which is likely to contain already loaded data. The patch saves the oob data and the ecc on the stack replacing the fixed address in RAM. Signed-off-by: Stefano Babic sba...@denx.de CC: Ilya Yanok ya...@emcraft.com CC: Scott Wood scottw...@freescale.com CC: Tom Rini tom.r...@gmail.com CC: Simon Schwarz simonschwarz...@googlemail.com CC: Wolfgang Denk w...@denx.de --- V5: - no changes, rebased on current u-boot-ti V4: - Drop SYS_ from local defines (Wolfgang Denk, Scott Wood) - drop parenthesis around defines (Scott Wood) V3: - use local defines for CONFIG_SYS_NAND_ECCSTEPS and CONFIG_SYS_NAND_ECCTOTAL (Tom Rini) - drop CONFIG_SYS_NAND_ECCSTEPS from board config files V2: - CONFIG_SYS_NAND_ECCTOTAL can always be computed (Ilya Yanok) - drop all CONFIG_SYS_NAND_ECCTOTAL in arm boards using nand_simple.c drivers/mtd/nand/nand_spl_simple.c | 42 --- include/configs/am3517_crane.h |4 --- include/configs/am3517_evm.h |4 --- include/configs/devkit8000.h |5 include/configs/hawkboard.h|5 +--- include/configs/omap3_beagle.h |4 --- include/configs/omap3_evm.h|4 --- include/configs/omap3_evm_quick_nand.h |4 --- 8 files changed, 17 insertions(+), 55 deletions(-) diff --git a/drivers/mtd/nand/nand_spl_simple.c b/drivers/mtd/nand/nand_spl_simple.c index 7eb08a3..4a4d02f 100644 --- a/drivers/mtd/nand/nand_spl_simple.c +++ b/drivers/mtd/nand/nand_spl_simple.c @@ -27,6 +27,11 @@ static int nand_ecc_pos[] = CONFIG_SYS_NAND_ECCPOS; static nand_info_t mtd; static struct nand_chip nand_chip; +#define ECCSTEPS (CONFIG_SYS_NAND_PAGE_SIZE / \ + CONFIG_SYS_NAND_ECCSIZE) +#define ECCTOTAL (ECCSTEPS * CONFIG_SYS_NAND_ECCBYTES) + + #if (CONFIG_SYS_NAND_PAGE_SIZE = 512) /* * NAND command for small page NAND devices (512) @@ -145,29 +150,21 @@ static int nand_is_bad_block(int block) static int nand_read_page(int block, int page, uchar *dst) { struct nand_chip *this = mtd.priv; - u_char *ecc_calc; - u_char *ecc_code; - u_char *oob_data; + u_char ecc_calc[ECCTOTAL]; + u_char ecc_code[ECCTOTAL]; + u_char oob_data[CONFIG_SYS_NAND_OOBSIZE]; int i; int eccsize = CONFIG_SYS_NAND_ECCSIZE; int eccbytes = CONFIG_SYS_NAND_ECCBYTES; - int eccsteps = CONFIG_SYS_NAND_ECCSTEPS; + int eccsteps = ECCSTEPS; uint8_t *p = dst; - /* -* No malloc available for now, just use some temporary locations -* in SDRAM -*/ - ecc_calc = (u_char *)(CONFIG_SYS_SDRAM_BASE + 0x1); - ecc_code = ecc_calc + 0x100; - oob_data = ecc_calc + 0x200; - nand_command(block, page, 0, NAND_CMD_READOOB); this-read_buf(mtd, oob_data, CONFIG_SYS_NAND_OOBSIZE); nand_command(block, page, 0, NAND_CMD_READ0); /* Pick the ECC bytes out of the oob data */ - for (i = 0; i CONFIG_SYS_NAND_ECCTOTAL; i++) + for (i = 0; i ECCTOTAL; i++) ecc_code[i] = oob_data[nand_ecc_pos[i]]; @@ -184,24 +181,17 @@ static int nand_read_page(int block, int page, uchar *dst) static int nand_read_page(int block, int page, void *dst) { struct nand_chip *this = mtd.priv; - u_char *ecc_calc; - u_char *ecc_code; - u_char *oob_data; + u_char ecc_calc[ECCTOTAL]; + u_char ecc_code[ECCTOTAL]; + u_char oob_data[CONFIG_SYS_NAND_OOBSIZE]; int i; int eccsize = CONFIG_SYS_NAND_ECCSIZE; int eccbytes = CONFIG_SYS_NAND_ECCBYTES; - int eccsteps = CONFIG_SYS_NAND_ECCSTEPS; + int eccsteps = ECCSTEPS; uint8_t *p = dst; nand_command(block, page, 0, NAND_CMD_READ0); - /* No malloc available for now, just use some temporary locations -* in SDRAM -*/ - ecc_calc = (u_char *)(CONFIG_SYS_SDRAM_BASE + 0x1); - ecc_code = ecc_calc + 0x100; - oob_data = ecc_calc + 0x200; - for (i = 0; eccsteps; eccsteps--, i += eccbytes, p += eccsize) { if (this-ecc.mode != NAND_ECC_SOFT) this-ecc.hwctl(mtd, NAND_ECC_READ); @@ -211,10 +201,10 @@ static int nand_read_page(int block, int page, void *dst) this-read_buf(mtd, oob_data, CONFIG_SYS_NAND_OOBSIZE); /* Pick the ECC bytes out of the oob data */ - for (i = 0; i CONFIG_SYS_NAND_ECCTOTAL; i++) + for (i = 0; i ECCTOTAL; i++) ecc_code[i] = oob_data[nand_ecc_pos[i]]; - eccsteps = CONFIG_SYS_NAND_ECCSTEPS; + eccsteps = ECCSTEPS; p = dst; for (i = 0 ; eccsteps; eccsteps--, i += eccbytes, p += eccsize) { diff --git a/include/configs/am3517_crane.h b/include/configs/am3517_crane.h index 0a0c261..b0dd2f0 100644 --- a/include/configs/am3517_crane.h +++
[U-Boot] question regarding generic board.c
Hi all, I encountered a compile warning in avr32 which lead me to the fact that every board.c utilizes these three lines: ---8--- #if defined(CONFIG_CMD_NET) s = getenv(bootfile); if (s) copy_filename(BootFile, s, sizeof(BootFile)); #endif ---8--- I know there is currently some effort to move the common stuff out of the respective board.c files and this part would be one of these. But I wonder if this specific part shouldn't move into the network framework. The BootFile is declared in net/ and is only required if some ethernet device is attached. The ethernet stuff will be initialized by eth_initialize(), this could be one place for setting BootFile initial but maybe there are better places. Any comments? best regards Andreas Bießmann ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] OMAP3: Add Corscience Tricorder board
Tricorder is a board which is very similar to the Devkit8000. It is designed as a base platform for further medical devices. www.corscience.de/en/medical-engineering/products/multiparameter/mp10-board.html Signed-off-by: Thomas Weber we...@corscience.de --- MAINTAINERS|1 + board/corscience/tricorder/Makefile| 46 board/corscience/tricorder/tricorder.c | 114 ++ board/corscience/tricorder/tricorder.h | 375 boards.cfg |1 + include/configs/tricorder.h| 325 +++ 6 files changed, 862 insertions(+), 0 deletions(-) create mode 100644 board/corscience/tricorder/Makefile create mode 100644 board/corscience/tricorder/tricorder.c create mode 100644 board/corscience/tricorder/tricorder.h create mode 100644 include/configs/tricorder.h diff --git a/MAINTAINERS b/MAINTAINERS index a56ca10..fd5ea72 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -889,6 +889,7 @@ Stephen Warren swar...@nvidia.com Thomas Weber we...@corscience.de devkit8000 ARM ARMV7 (OMAP3530 SoC) + tricorder ARM ARMV7 (OMAP3503 SoC) Lei Wen lei...@marvell.com diff --git a/board/corscience/tricorder/Makefile b/board/corscience/tricorder/Makefile new file mode 100644 index 000..4e5a677 --- /dev/null +++ b/board/corscience/tricorder/Makefile @@ -0,0 +1,46 @@ +# +# (C) Copyright 2000, 2001, 2002 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de. +# +# (C) Copyright 2011 +# Thomas Weber we...@corscience.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 := tricorder.o + +SRCS := $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) + +$(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/corscience/tricorder/tricorder.c b/board/corscience/tricorder/tricorder.c new file mode 100644 index 000..3426f2e --- /dev/null +++ b/board/corscience/tricorder/tricorder.c @@ -0,0 +1,114 @@ +/* + * (C) Copyright 2004-2008 + * Texas Instruments, www.ti.com + * + * Author : + * Sunil Kumar sunilsain...@gmail.com + * Shashi Ranjan shashiranjanmc...@gmail.com + * + * (C) Copyright 2011 + * Corscience GmbH Co. KG, www.corscience.de + * Thomas Weber we...@corscience.de + * + * Derived from Devkit8000 code by + * Frederik Kriewitz frede...@kriewitz.eu + * + * 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 twl4030.h +#include asm/io.h +#include asm/arch/mmc_host_def.h +#include asm/arch/mux.h +#include asm/arch/sys_proto.h +#include asm/arch/mem.h +#include asm/mach-types.h +#include tricorder.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_TRICORDER; + /* 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) +{ +
[U-Boot] [PATCH] da850evm: Remove CONFIG_SYS_xxCACHE_OFF defines
This patch removes the defines CONFIG_SYS_ICACHE_OFF, CONFIG_SYS_DCACHE_OFF, and CONFIG_SYS_L2CACHE_OFF from the board configuration. These defines are useless since cache is anyway disabled for the entire architecture since commit cba4b1809f043bf85c806e5a4e342f62bd5ded45. Signed-off-by: Christian Riesch christian.rie...@omicron.at Cc: Tom Rini tr...@ti.com --- include/configs/da850evm.h |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h index b30696a..fcbbace 100644 --- a/include/configs/da850evm.h +++ b/include/configs/da850evm.h @@ -44,9 +44,6 @@ #define CONFIG_SYS_HZ 1000 #define CONFIG_SKIP_LOWLEVEL_INIT #define CONFIG_SYS_TEXT_BASE 0xc108 -#define CONFIG_SYS_ICACHE_OFF -#define CONFIG_SYS_DCACHE_OFF -#define CONFIG_SYS_L2CACHE_OFF /* * Memory Info -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] AES128 in U-Boot
Am 15.12.2011 08:30, schrieb Simon Glass: Hi, I am wanting to add an AES encryption library to U-Boot. I suppose it should be written in C, with small compiled code/data size (rather than high performance), GPL and fairly easy to read. Does anyone have any suggestions? Take a look at libtomcrypt - http://libtom.org/?page=featureswhatfile=crypt Matthias ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/6] omap4: usb: Add omap-ehci support
Hi Tom, On Wed, Dec 14, 2011 at 9:30 PM, Tom Rini tom.r...@gmail.com wrote: On Wed, Dec 14, 2011 at 5:09 AM, Govindraj.R govindraj.r...@ti.com wrote: From: Govindraj.R govindraj.r...@ti.com [snip] +/* TLL Register Set */ +#define OMAP_USBTLL_SYSCONFIG_SIDLEMODE (1 3) Globally, please fix all #definetab to #definespace. +#define OMAP_USBTLL_SYSCONFIG_AUTOIDLE (1 0) +#define OMAP_USBTLL_SYSSTATUS_RESETDONE (1 0) Just use '1' not '(1 0)', globally. [snip] +++ b/drivers/usb/host/ehci-omap.c [snip] + reg = ULPI_FUNC_CTRL_RESET + /* FUNCTION_CTRL_SET register */ + | (ULPI_SET(ULPI_FUNC_CTRL) EHCI_INSNREG05_ULPI_REGADD_SHIFT) + /* Write */ + | (2 EHCI_INSNREG05_ULPI_OPSEL_SHIFT) + /* PORTn */ + | ((port + 1) EHCI_INSNREG05_ULPI_PORTSEL_SHIFT) + /* start ULPI access*/ + | (1 EHCI_INSNREG05_ULPI_CONTROL_SHIFT); Can you please re-write this as: /* * What these values are doing... */ reg = A | (B B_SHIFT) | ... [snip] + /* Wait for ULPI access completion */ + while ((readl(ehci-insreg05_utmi_ulpi) + (1 EHCI_INSNREG05_ULPI_CONTROL_SHIFT))) + if (get_timer(init) CONFIG_SYS_HZ) { Perhaps gmail is getting the indentation wrong here but it seems not right and the norm is to not start the newline with '' or '|' or similar. Thanks for the comments will fix and re-post a new version. [snip] + /* + * An undocumented feature in the OMAP3 EHCI controller, + * causes suspended ports to be taken out of suspend when + * the USBCMD.Run/Stop bit is cleared (for example when + * we do ehci_bus_suspend). + * This breaks suspend-resume if the root-hub is allowed + * to suspend. Writing 1 to this undocumented register bit + * disables this feature and restores normal behavior. + */ Thank you for clearly commenting on an undocumented feature! Even 'tho there's changes requested already I've moved this to Remy in patchwork because I want his comments as the USB maintainer as well. Thanks! Yes fine, I will CC him the next version, in case if there are no comments until I post v2. -- Thanks, Govindraj.R ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 6/6] OMAP4: config: Add usb support for panda config.
On Wed, Dec 14, 2011 at 9:54 PM, Tom Rini tom.r...@gmail.com wrote: On Wed, Dec 14, 2011 at 5:21 AM, Govindraj.R govindraj...@gmail.com wrote: From: Govindraj.R govindraj.r...@ti.com Enable usb ehci support and Ethernet support for panda board. Disable dcache as usb uses dma operations and to avoid any resulting cache coherency issue. Signed-off-by: Govindraj.R govindraj.r...@ti.com I'm not thrilled with disabling dcache globally for this. We can just do 'dcache off' and then start doing USB ops, or since this won't get in until 2012.03, can we spend more time making USB cache coherent? --- include/configs/omap4_common.h | 1 + include/configs/omap4_panda.h | 21 + 2 files changed, 22 insertions(+), 0 deletions(-) diff --git a/include/configs/omap4_common.h b/include/configs/omap4_common.h index a989721..43a98f9 100644 --- a/include/configs/omap4_common.h +++ b/include/configs/omap4_common.h @@ -152,6 +152,7 @@ loadaddr=0x8200\0 \ console=ttyO2,115200n8\0 \ usbtty=cdc_acm\0 \ + usbethaddr=00:02:03:04:05:06\0 \ vram=16M\0 \ mmcdev=0\0 \ mmcroot=/dev/mmcblk0p2 rw\0 \ Just like you can't hard-code ethaddr into config files, I'm pretty sure you can't do that for usbethaddr. I think this can be set even in the command line will check the options and do the changes as required. diff --git a/include/configs/omap4_panda.h b/include/configs/omap4_panda.h index e9ef2a3..1475012 100644 --- a/include/configs/omap4_panda.h +++ b/include/configs/omap4_panda.h @@ -33,7 +33,28 @@ */ #define CONFIG_PANDA 1 /* working with Panda */ +#define CONFIG_SYS_DCACHE_OFF 1 + +/* USB UHH support options */ +#define CONFIG_CMD_USB 1 +#define CONFIG_USB_HOST 1 +#define CONFIG_USB_EHCI 1 +#define CONFIG_USB_EHCI_OMAP 1 +#define CONFIG_USB_STORAGE 1 +#define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 3 Just '#define CONFIG_CMD_USB' okay fine. (and if you want to do a separate pre-patch cleaning up the existing config files I'd appreciate it). Sure. +/* USB Networking options */ +#define CONFIG_USB_HOST_ETHER 1 +#define CONFIG_USB_ETHER_SMSC95XX 1 + +#define CONFIG_UBOOT_ENABLE_PADS_ALL 1 + +#define CONFIG_NET_MULTI 1 CONFIG_NET_MULTI went away. my bad I missed that. Will clean up. -- Thanks, Govindraj.R ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 6/6] OMAP4: config: Add usb support for panda config.
On Wed, Dec 14, 2011 at 9:57 PM, Tom Rini tom.r...@gmail.com wrote: On Wed, Dec 14, 2011 at 9:24 AM, Tom Rini tom.r...@gmail.com wrote: On Wed, Dec 14, 2011 at 5:21 AM, Govindraj.R govindraj...@gmail.com wrote: From: Govindraj.R govindraj.r...@ti.com Enable usb ehci support and Ethernet support for panda board. Disable dcache as usb uses dma operations and to avoid any resulting cache coherency issue. Signed-off-by: Govindraj.R govindraj.r...@ti.com I'm not thrilled with disabling dcache globally for this. We can just do 'dcache off' and then start doing USB ops, or since this won't get in until 2012.03, can we spend more time making USB cache coherent? Oh, and I'd really like to see add USB support to panda, enable it in config as one commit. Yes sure. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 6/6] OMAP4: config: Add usb support for panda config.
On Wed, Dec 14, 2011 at 9:54 PM, Tom Rini tom.r...@gmail.com wrote: On Wed, Dec 14, 2011 at 5:21 AM, Govindraj.R govindraj...@gmail.com wrote: From: Govindraj.R govindraj.r...@ti.com Enable usb ehci support and Ethernet support for panda board. Disable dcache as usb uses dma operations and to avoid any resulting cache coherency issue. Yes will check the options. -- Thanks, Govindraj.R ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/3] cmd_sf.c: fix printf() length modifier
Acked-by: Mike Frysinger vap...@gentoo.org if it doesn't get picked up by someone else, i'll push via my sf branch -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/3] fat.c: fix printf() length modifier
Acked-by: Mike Frysinger vap...@gentoo.org -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 3/3] avr32:mmu.c: fix printf() length modifier
Acked-by: Mike Frysinger vap...@gentoo.org -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] FAT: fix some issues in FAT write support code
Writing a file to the FAT partition didn't work while a test using a CF card. The test was done on mpc5200 based board (powerpc). There is a number of problems in FAT write code: Compiler warning: fat_write.c: In function 'file_fat_write': fat_write.c:326: warning: 'counter' may be used uninitialized in this function fat_write.c:326: note: 'counter' was declared here 'l_filename' string is not terminated, so a file name with garbage at the end is used as a file name as shown by debug code. Return value of set_contents() is not checked properly so actually a file won't be written at all (as checked using 'fatls' after a write attempt with 'fatwrite' command). do_fat_write() doesn't return the number of written bytes if no error happened. However the return value of this function is used to show the number of written bytes in do_fat_fswrite(). The patch adds some debug code and fixes above mentioned problems and also fixes a typo in error output. NOTE: after a successful write to the FAT partition (under U-Boot) the partition was checked under Linux using fsck. The partition needed fixing FATs: -bash-3.2# fsck -a /dev/sda1 fsck 1.39 (29-May-2006) dosfsck 2.11, 12 Mar 2005, FAT32, LFN FATs differ but appear to be intact. Using first FAT. Performing changes. Signed-off-by: Anatolij Gustschin ag...@denx.de Cc: Donggeun Kim dg77@samsung.com Cc: Aaron Williams aaron.willi...@cavium.com --- fs/fat/fat_write.c | 19 ++- 1 files changed, 14 insertions(+), 5 deletions(-) diff --git a/fs/fat/fat_write.c b/fs/fat/fat_write.c index 4f1772f..3542b0b 100644 --- a/fs/fat/fat_write.c +++ b/fs/fat/fat_write.c @@ -323,7 +323,7 @@ static void fill_dir_slot(fsdata *mydata, dir_entry **dentptr, const char *l_name) { dir_slot *slotptr = (dir_slot *)get_vfatname_block; - __u8 counter, checksum; + __u8 counter = 0, checksum; int idx = 0, ret; char s_name[16]; @@ -926,6 +926,7 @@ static int do_fat_write(const char *filename, void *buffer, int cursect; int root_cluster, ret = -1, name_len; char l_filename[VFAT_MAXLEN_BYTES]; + int write_size = size; dir_curclust = 0; @@ -985,7 +986,11 @@ static int do_fat_write(const char *filename, void *buffer, dentptr = (dir_entry *) do_fat_read_block; name_len = strlen(filename); + if (name_len = VFAT_MAXLEN_BYTES) + name_len = VFAT_MAXLEN_BYTES - 1; + memcpy(l_filename, filename, name_len); + l_filename[name_len] = 0; /* terminate the string */ downcase(l_filename); startsect = mydata-rootdir_sect; @@ -1012,10 +1017,12 @@ static int do_fat_write(const char *filename, void *buffer, } ret = set_contents(mydata, retdent, buffer, size); - if (ret) { + if (ret 0) { printf(Error: writing contents\n); goto exit; } + write_size = ret; + debug(attempt to write 0x%x bytes\n, write_size); /* Flush fat buffer */ ret = flush_fat_buffer(mydata); @@ -1029,7 +1036,7 @@ static int do_fat_write(const char *filename, void *buffer, get_dentfromdir_block, mydata-clust_size * mydata-sect_size); if (ret) { - printf(Error: wrinting directory entry\n); + printf(Error: writing directory entry\n); goto exit; } } else { @@ -1056,10 +1063,12 @@ static int do_fat_write(const char *filename, void *buffer, start_cluster, size, 0x20); ret = set_contents(mydata, empty_dentptr, buffer, size); - if (ret) { + if (ret 0) { printf(Error: writing contents\n); goto exit; } + write_size = ret; + debug(attempt to write 0x%x bytes\n, write_size); /* Flush fat buffer */ ret = flush_fat_buffer(mydata); @@ -1080,7 +1089,7 @@ static int do_fat_write(const char *filename, void *buffer, exit: free(mydata-fatbuf); - return ret; + return ret 0 ? ret : write_size; } int file_fat_write(const char *filename, void *buffer, unsigned long maxsize) -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH V10 5/7] omap-common/spl: Add linux boot to SPL
On 13/12/2011 11:20, Simon Schwarz wrote: From: Simon Schwarz simonschwarz...@googlemail.com This adds Linux booting to the SPL This depends on CONFIG_MACH_TYPE patch by Igor Grinberg (http://article.gmane.org/gmane.comp.boot-loaders.u-boot/105809) Related CONFIGs: CONFIG_SPL_OS_BOOT Activates/Deactivates the OS booting feature CONFIG_SPL_OS_BOOT_KEY defines the IO-pin number u-boot switch - if pressed u-boot is booted CONFIG_SYS_NAND_SPL_KERNEL_OFFS Offset in NAND of direct boot kernel image to use in SPL CONFIG_SYS_SPL_ARGS_ADDR Address where the kernel boot arguments are expected - this is normaly RAM-begin + 0x100 Signed-off-by: Simon Schwarz simonschwarz...@gmail.com --- Hi Simon and Myself (as I will continue Simon's work), - void spl_nand_load_image(void) { struct image_header *header; @@ -50,7 +49,7 @@ void spl_nand_load_image(void) /*use CONFIG_SYS_TEXT_BASE as temporary storage area */ header = (struct image_header *)(CONFIG_SYS_TEXT_BASE); #ifdef CONFIG_SPL_OS_BOOT - if (!spl_uboot_key()) { + if (!spl_start_uboot()) { /* * load parameter image * load to temp position since nand_spl_load_image reads @@ -74,9 +73,17 @@ void spl_nand_load_image(void) nand_spl_load_image(CONFIG_SYS_NAND_SPL_KERNEL_OFFS, CONFIG_SYS_NAND_PAGE_SIZE, (void *)header); spl_parse_image_header(header); - nand_spl_load_image(CONFIG_SYS_NAND_SPL_KERNEL_OFFS, - spl_image.size, (void *)spl_image.load_addr); - } else + if (header-ih_os == IH_OS_LINUX) { + /* happy - was a linux */ + nand_spl_load_image(CONFIG_SYS_NAND_SPL_KERNEL_OFFS, + spl_image.size, (void *)spl_image.load_addr); From my test I found a bug here. The image is loaded, but because we do not return from function, code goes on and loads u-boot, too. As result, u-boot instead of linux is always started. If I am not overseeing something, I'll fix in next version. + } else { + printf(The Expected Linux image was not + found. Please check your NAND + configuration.\n); + printf(Trying to start u-boot now...\n); + } + } #endif { in fact we have not anymore the else branch, and now u-boot is loaded. 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
[U-Boot] [PATCH 00/18 V2] CHECKPATCH: fpgadata.c cleanup
First of the CHECKPATCH series of patches with per-file checkpatch fixes. This series fixes all files fpgadata.c, which contains PPC FPGA firmwares. There are no functional changes, only CHECKPATCH fixes. Marek Vasut (18): CHECKPATCH: ./board/dave/PPChameleonEVB/fpgadata.c CHECKPATCH: ./board/esd/cpciiser4/fpgadata.c CHECKPATCH: ./board/esd/du405/fpgadata.c CHECKPATCH: ./board/esd/canbt/fpgadata.c CHECKPATCH: ./board/esd/cpci405/fpgadata_cpci4052.c CHECKPATCH: ./board/esd/cpci405/fpgadata_cpci405ab.c CHECKPATCH: ./board/esd/cpci405/fpgadata_cpci405.c CHECKPATCH: ./board/esd/wuh405/fpgadata.c CHECKPATCH: ./board/esd/plu405/fpgadata.c CHECKPATCH: ./board/esd/ar405/fpgadata.c CHECKPATCH: ./board/esd/ar405/fpgadata_xl30.c CHECKPATCH: ./board/esd/dasa_sim/fpgadata.c CHECKPATCH: ./board/esd/ash405/fpgadata.c CHECKPATCH: ./board/esd/voh405/fpgadata.c CHECKPATCH: ./board/esd/apc405/fpgadata.c CHECKPATCH: ./board/esd/tasreg/fpgadata.c CHECKPATCH: ./board/esd/pci405/fpgadata.c CHECKPATCH: ./board/esd/hh405/fpgadata.c board/dave/PPChameleonEVB/fpgadata.c | 3416 +--- board/esd/apc405/fpgadata.c| 6012 board/esd/ar405/fpgadata.c | 8250 +++-- board/esd/ar405/fpgadata_xl30.c| 7308 ++- board/esd/ash405/fpgadata.c| 7475 ++- board/esd/canbt/fpgadata.c | 1211 ++- board/esd/cpci405/fpgadata_cpci405.c | 1025 ++- board/esd/cpci405/fpgadata_cpci4052.c | 2294 +++-- board/esd/cpci405/fpgadata_cpci405ab.c | 3854 +--- board/esd/cpciiser4/fpgadata.c | 6204 +- board/esd/dasa_sim/fpgadata.c | 5855 board/esd/du405/fpgadata.c | 2108 +++-- board/esd/hh405/fpgadata.c | 7551 ++- board/esd/pci405/fpgadata.c| 2238 +++-- board/esd/plu405/fpgadata.c| 3537 +--- board/esd/tasreg/fpgadata.c|15992 +--- board/esd/voh405/fpgadata.c| 6032 board/esd/wuh405/fpgadata.c| 5454 18 files changed, 63874 insertions(+), 31942 deletions(-) V2: Align to 8 bytes per line. Cc: Anatolij Gustschin ag...@denx.de Cc: Stefano Babic sba...@denx.de Anatolij, Stefano, can you skim through these and give me your ACK so I can push them through staging ? Still, there is around three thousand files that don't conform to checkpatch style. -- 1.7.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 00/18 V2] CHECKPATCH: fpgadata.c cleanup
First of the CHECKPATCH series of patches with per-file checkpatch fixes. This series fixes all files fpgadata.c, which contains PPC FPGA firmwares. There are no functional changes, only CHECKPATCH fixes. Marek Vasut (18): CHECKPATCH: ./board/dave/PPChameleonEVB/fpgadata.c CHECKPATCH: ./board/esd/cpciiser4/fpgadata.c CHECKPATCH: ./board/esd/du405/fpgadata.c CHECKPATCH: ./board/esd/canbt/fpgadata.c CHECKPATCH: ./board/esd/cpci405/fpgadata_cpci4052.c CHECKPATCH: ./board/esd/cpci405/fpgadata_cpci405ab.c CHECKPATCH: ./board/esd/cpci405/fpgadata_cpci405.c CHECKPATCH: ./board/esd/wuh405/fpgadata.c CHECKPATCH: ./board/esd/plu405/fpgadata.c CHECKPATCH: ./board/esd/ar405/fpgadata.c CHECKPATCH: ./board/esd/ar405/fpgadata_xl30.c CHECKPATCH: ./board/esd/dasa_sim/fpgadata.c CHECKPATCH: ./board/esd/ash405/fpgadata.c CHECKPATCH: ./board/esd/voh405/fpgadata.c CHECKPATCH: ./board/esd/apc405/fpgadata.c CHECKPATCH: ./board/esd/tasreg/fpgadata.c CHECKPATCH: ./board/esd/pci405/fpgadata.c CHECKPATCH: ./board/esd/hh405/fpgadata.c board/dave/PPChameleonEVB/fpgadata.c | 3416 +--- board/esd/apc405/fpgadata.c| 6012 board/esd/ar405/fpgadata.c | 8250 +++-- board/esd/ar405/fpgadata_xl30.c| 7308 ++- board/esd/ash405/fpgadata.c| 7475 ++- board/esd/canbt/fpgadata.c | 1211 ++- board/esd/cpci405/fpgadata_cpci405.c | 1025 ++- board/esd/cpci405/fpgadata_cpci4052.c | 2294 +++-- board/esd/cpci405/fpgadata_cpci405ab.c | 3854 +--- board/esd/cpciiser4/fpgadata.c | 6204 +- board/esd/dasa_sim/fpgadata.c | 5855 board/esd/du405/fpgadata.c | 2108 +++-- board/esd/hh405/fpgadata.c | 7551 ++- board/esd/pci405/fpgadata.c| 2238 +++-- board/esd/plu405/fpgadata.c| 3537 +--- board/esd/tasreg/fpgadata.c|15992 +--- board/esd/voh405/fpgadata.c| 6032 board/esd/wuh405/fpgadata.c| 5454 18 files changed, 63874 insertions(+), 31942 deletions(-) V2: Align to 8 bytes per line. Cc: Anatolij Gustschin ag...@denx.de Cc: Stefano Babic sba...@denx.de Anatolij, Stefano, can you skim through these and give me your ACK so I can push them through staging ? Still, there is around three thousand files that don't conform to checkpatch style. Stefan, adding you to CC, can you please review this patches ? Thanks! M ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 00/18 V2] CHECKPATCH: fpgadata.c cleanup
Hi Marek, On Thursday 15 December 2011 14:34:08 Marek Vasut wrote: board/dave/PPChameleonEVB/fpgadata.c | 3416 +--- board/esd/apc405/fpgadata.c| 6012 board/esd/ar405/fpgadata.c | 8250 +++-- board/esd/ar405/fpgadata_xl30.c| 7308 ++- board/esd/ash405/fpgadata.c| 7475 ++- board/esd/canbt/fpgadata.c | 1211 ++- board/esd/cpci405/fpgadata_cpci405.c | 1025 ++- board/esd/cpci405/fpgadata_cpci4052.c | 2294 +++-- board/esd/cpci405/fpgadata_cpci405ab.c | 3854 +--- board/esd/cpciiser4/fpgadata.c | 6204 +- board/esd/dasa_sim/fpgadata.c | 5855 board/esd/du405/fpgadata.c | 2108 +++-- board/esd/hh405/fpgadata.c | 7551 ++- board/esd/pci405/fpgadata.c| 2238 +++-- board/esd/plu405/fpgadata.c| 3537 +--- board/esd/tasreg/fpgadata.c|15992 +--- board/esd/voh405/fpgadata.c| 6032 board/esd/wuh405/fpgadata.c| 5454 18 files changed, 63874 insertions(+), 31942 deletions(-) V2: Align to 8 bytes per line. Cc: Anatolij Gustschin ag...@denx.de Cc: Stefano Babic sba...@denx.de Anatolij, Stefano, can you skim through these and give me your ACK so I can push them through staging ? Still, there is around three thousand files that don't conform to checkpatch style. Stefan, adding you to CC, can you please review this patches ? Matthias from esd is responsible for this code now (added to Cc). IIRC, then this code was automatically generated by some tool (FPGA binary data - C code). But still: Acked-by: Stefan Roese s...@denx.de Thanks, Stefan -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: off...@denx.de ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 0/7] CHECKPATCH: Cleanup LCD logo files
This series fixes the logo files by aligning them to 8 bytes per line and fixing subsequent CHECKPATCH issues. Marek Vasut (7): CHECKPATCH: ./board/esd/voh405/logo_640_480_24bpp.c CHECKPATCH: ./board/esd/voh405/logo_320_240_4bpp.c CHECKPATCH: ./board/esd/apc405/logo_640_480_24bpp.c CHECKPATCH: ./board/esd/hh405/logo_640_480_24bpp.c CHECKPATCH: ./board/esd/hh405/logo_320_240_4bpp.c CHECKPATCH: ./board/esd/hh405/logo_1024_768_8bpp.c CHECKPATCH: ./board/esd/hh405/logo_320_240_8bpp.c board/esd/apc405/logo_640_480_24bpp.c | 1694 +++-- board/esd/hh405/logo_1024_768_8bpp.c | 7631 +--- board/esd/hh405/logo_320_240_4bpp.c | 681 ++- board/esd/hh405/logo_320_240_8bpp.c | 1563 +++-- board/esd/hh405/logo_640_480_24bpp.c |12626 ++--- board/esd/voh405/logo_320_240_4bpp.c | 230 +- board/esd/voh405/logo_640_480_24bpp.c | 5165 +- 7 files changed, 19725 insertions(+), 9865 deletions(-) Cc: Stefan Roese s...@denx.de -- 1.7.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/7] CHECKPATCH: ./board/esd/voh405/logo_320_240_4bpp.c
Signed-off-by: Marek Vasut marek.va...@gmail.com Cc: Stefan Roese s...@denx.de --- board/esd/voh405/logo_320_240_4bpp.c | 230 ++--- 1 files changed, 153 insertions(+), 77 deletions(-) diff --git a/board/esd/voh405/logo_320_240_4bpp.c b/board/esd/voh405/logo_320_240_4bpp.c index e9f8cb4..5dfc1f7 100644 --- a/board/esd/voh405/logo_320_240_4bpp.c +++ b/board/esd/voh405/logo_320_240_4bpp.c @@ -1,77 +1,153 @@ - 0x1f,0x8b,0x08,0x08,0x7f,0x95,0xab,0x3f,0x00,0x03,0x50,0x50,0x43,0x5f,0x53,0x74, - 0x61,0x72,0x74,0x6c,0x6f,0x67,0x6f,0x5f,0x31,0x36,0x67,0x2e,0x62,0x6d,0x70,0x00, - 0xed,0x9b,0xcb,0x71,0xe3,0x38,0x10,0x86,0x7b,0xaa,0xe6,0xb6,0x87,0x2e,0x4f,0x08, - 0x3e,0xed,0xdd,0x09,0x6c,0x6d,0xf9,0x3a,0x47,0xa7,0xe0,0x10,0xc6,0x29,0x38,0x82, - 0xad,0x72,0x0a,0x4e,0xc1,0x29,0x38,0x05,0xa7,0xe0,0xea,0x0c,0x30,0x12,0x89,0x06, - 0x1a,0x4f,0x3d,0x2c,0x01,0x9c,0xad,0xff,0xf3,0x48,0xa2,0x44,0x82,0xf8,0xd8,0x20, - 0x5e,0x24,0xe7,0xdf,0x9f,0xbf,0xfe,0xa3,0x85,0x5f,0xbb,0xd7,0xdf,0xbb,0xd7,0x3f, - 0xdf,0x88,0x64,0xf7,0xf9,0x8d,0xbe,0x93,0xf2,0xe3,0xaf,0xf5,0x65,0xb9,0xb9,0xb9, - 0xa1,0xdb,0xdb,0x5b,0xba,0xbb,0xbb,0xa3,0xfb,0xfb,0x7b,0x7a,0x78,0x78,0xa0,0xc7, - 0xc7,0x47,0x7a,0x7a,0x7a,0xa2,0xe7,0xe7,0x67,0x7a,0x79,0x79,0xa1,0xd7,0xd7,0x57, - 0x7a,0x7b,0x7b,0xa3,0xf7,0xf7,0x77,0xfa,0xf8,0xf8,0xa0,0xcf,0xcf,0x4f,0x72,0xce, - 0xed,0x5f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff, - 0x02,0xa1,0x8b,0x03,0x3f,0xf8,0xc1,0x0f,0x7e,0xf0,0xfb,0xb3,0xfd,0xf6,0x59,0xf3, - 0x66,0xfd,0xc2,0xe6,0x7d,0xc5,0x49,0x7e,0xfb,0xcd,0x84,0x59,0xd8,0x1d,0x48,0x30, - 0xc7,0x6f,0xd9,0x88,0x77,0x7f,0x3b,0x41,0xd7,0x0d,0xe1,0x14,0xbf,0x45,0x88,0x97, - 0x7f,0xb2,0x38,0xb4,0x05,0x67,0xf8,0x2d,0x3a,0xb2,0x2a,0x2e,0xff,0xcb,0xb0,0x23, - 0x38,0xc1,0x6f,0xd5,0xf3,0x21,0x5c,0xdf,0xa4,0x99,0x68,0xbc,0x9f,0x04,0xab,0xf5, - 0x4d,0x5c,0x4f,0x70,0xb8,0xdf,0x6a,0xb2,0x48,0xad,0x7e,0xde,0xb2,0x51,0xc2,0xc3, - 0xfd,0x28,0x37,0xf3,0xae,0x8d,0x64,0xa3,0xfd,0x24,0x96,0xa9,0xfa,0xf9,0x00,0xd6, - 0xd3,0x8d,0xf6,0xb3,0xe1,0xd3,0x0f,0x31,0xe6,0x93,0xfd,0xba,0xd9,0x6d,0xc0,0x8f, - 0x4c,0xc0,0x42,0xfc,0x7a,0x01,0x1c,0xeb,0x27,0xb6,0x5e,0xc4,0x4f,0x97,0xfe,0x3c, - 0xcf,0x2f,0x0d,0x5f,0xee,0x57,0x4b,0x39,0xd4,0x2f,0x0b,0x5f,0x5c,0x68,0x17,0xf0, - 0x58,0xbf,0x6a,0xd8,0xba,0x01,0x1c,0xea,0x97,0x15,0x6f,0xe1,0x27,0xae,0x60,0xa4, - 0x5f,0x5e,0xbc,0x66,0xa9,0x59,0xc0,0x43,0xfd,0xea,0x51,0x33,0xab,0xca,0xb4,0x23, - 0xfd,0x7a,0x35,0xbb,0x55,0xc0,0x98,0x5f,0xfe,0x39,0x7e,0xbb,0x21,0x8a,0x0e,0x9d, - 0xd7,0x8d,0x74,0x58,0xef,0xc7,0xf7,0x93,0xdb,0xbf,0x5d,0x56,0x9c,0xf8,0x91,0xce, - 0xdc,0x7c,0xa2,0xc9,0x7e,0xe4,0x0d,0xd4,0x4f,0x38,0x8e,0x9d,0xc3,0x8a,0x89,0x7e, - 0x6c,0xfc,0x74,0xe6,0x46,0xce,0x2c,0xcc,0xf5,0x0b,0x33,0x36,0xeb,0x27,0x9b,0xf2, - 0x5b,0xcf,0x37,0xbd,0x2e,0x54,0xfa,0x51,0x79,0x29,0xa1,0xea,0xb7,0xac,0x89,0x5f, - 0xf9,0xb4,0x23,0xe9,0xc5,0xcf,0x2f,0x48,0x33,0x7e,0x79,0xea,0x4a,0xae,0x9c,0xad, - 0x0a,0x87,0xb4,0x5b,0x32,0x0d,0xbc,0x6d,0xeb,0xcd,0x51,0x1f,0xe5,0x17,0x95,0x8e, - 0xf5,0xe3,0xb0,0xc8,0xd9,0x3a,0xf3,0xfd,0x4b,0x7e,0x49,0xfd,0x50,0xb7,0xa2,0x7e, - 0xb4,0xfc,0xd6,0x5d,0x67,0xc5,0x23,0x45,0x71,0x7d,0xc5,0x8f,0xf4,0x5a,0x41,0x6c, - 0x5f,0xd6,0x98,0x9e,0xe4,0x97,0x9c,0xa0,0x14,0x5b,0xd0,0xa2,0x03,0x3f,0xd9,0x4f, - 0x7c,0x36,0xa1,0x1a,0x84,0x33,0xdd,0x1d,0xac,0x1f,0x1c,0x96,0xfd,0xaf,0xc1,0x4f, - 0x3f,0xc9,0x4e,0xac,0xcf,0xf2,0x2b,0xa7,0xe0,0x47,0x74,0xd5,0xb9,0x9f,0x1e,0x58, - 0x38,0xd4,0xf0,0xdd,0x5c,0x37,0xa9,0xfa,0x1d,0xaa,0xbf,0xe7,0x21,0x66,0x9f,0xb6, - 0x00,0xd4,0x94,0x5d,0x72,0x0c,0x62,0x44,0xe2,0x1a,0x3a,0xe4,0x57,0x36,0x12,0x7d, - 0xf2,0x3a,0x9a,0x16,0xa7,0x3d,0x25,0x4d,0xce,0x13,0xfd,0x58,0x77,0xc3,0x59,0xa6, - 0x72,0x19,0xbf,0xf3,0x09,0x7e,0xf1,0x42,0xb0,0xcd,0x48,0x74,0x13,0x73,0x29,0x67, - 0x82,0x9f,0x5b,0x4b,0xf2,0x9a,0x7e,0xc2,0xbe,0x02,0x53,0xda,0xd8,0x2d,0x27,0x3d, - 0xfb,0x2a,0xb9,0x16,0x97,0x6d,0x63,0x32,0x3f,0x93,0xa7,0x89,0xea,0x25,0xfc,0xa8, - 0xe1,0xb7,0xef,0x34,0xc9,0xfa,0x49,0xdb,0xcf,0x5d,0xd3,0x8f,0xaa,0x7e,0xe2,0xf3, - 0x26,0x13,0xe4,0xc2,0x8f,0xb5,0xa5,0xab,0xfa,0x91,0xc5,0x24,0xcc,0xfc,0xc2,0xfe, - 0x3a,0x7e,0x12,0xfd,0xfc,0x4b,0x7b,0xe4,0xe8,0x47,0xd2,0xf6,0x0b,0xe1,0xba,0xbc, - 0x1f,0x8b,0xcf,0x3a,0xf5,0xd3,0x89,0x47,0xf0,0x93,0x8a,0x9f,0xd3,0x9e,0xb6,0xea, - 0x27,0x97,0xf0,0x93,0xa3,0xfd,0x78,0x96,0x1f,0x3b,0x56,0x3f,0x3d,0x65,0xfd,0x29, - 0x68,0xeb,0x07,0xb9,0x8e,0x9f,0xe3,0x6b,0xfa,0xed,0x0d,0xcf,0xf1,0xe3,0xa8,0xd9, - 0x6c,0xff,0xcc,0x6f,0x76,0xb5,0xf1,0x2b,0x0f,0x21,0xf5,0x5b,0xa2,0x47,0xd5,0xf2, - 0x75,0x2e,0x94,0x6f,0x18,0x14,0xd6,0xfd,0x5c,0xee,0x97,0xe4,0xfc,0x05,0x3f,0x72, - 0x99,0x9f,0x39,0x15,0xad,0x9f,0x56,0x69,0xeb,0xa7,0x3b,0xcf,0xca,0x33,0xef,0x7f, - 0x35,0x9e,0xe7,0xfa,0x91,0xb8,0xd2,0x2f,0x6f,0x5f,0x8e,0xf0,0x2b,0xc6,0x2f,0x72, -
[U-Boot] [PATCH 5/7] CHECKPATCH: ./board/esd/hh405/logo_320_240_4bpp.c
Signed-off-by: Marek Vasut marek.va...@gmail.com Cc: Stefan Roese s...@denx.de --- board/esd/hh405/logo_320_240_4bpp.c | 681 +++ 1 files changed, 454 insertions(+), 227 deletions(-) diff --git a/board/esd/hh405/logo_320_240_4bpp.c b/board/esd/hh405/logo_320_240_4bpp.c index ddf0d0b..52989de 100644 --- a/board/esd/hh405/logo_320_240_4bpp.c +++ b/board/esd/hh405/logo_320_240_4bpp.c @@ -1,227 +1,454 @@ - 0x1f,0x8b,0x08,0x08,0x9c,0x03,0x94,0x3f,0x00,0x03,0x48,0x6f,0x6c,0x7a,0x48,0x65, - 0x72,0x5f,0x4c,0x6f,0x67,0x6f,0x5f,0x33,0x32,0x30,0x78,0x32,0x34,0x30,0x5f,0x6d, - 0x69,0x74,0x74,0x65,0x5f,0x31,0x36,0x67,0x2e,0x62,0x6d,0x70,0x00,0xed,0x9c,0xfd, - 0x6b,0x1b,0x47,0x1a,0xc7,0x9f,0xae,0xa2,0xe8,0x8c,0x4b,0x42,0xff,0x03,0xb1,0x26, - 0x2f,0x26,0xa5,0x67,0x2c,0x52,0xd7,0xf8,0xb8,0x1e,0xb1,0xfb,0x62,0xc2,0x81,0xa9, - 0xa3,0xe6,0x42,0x43,0x02,0x21,0xf1,0x35,0x57,0x38,0x4c,0x8a,0xbd,0x71,0x1d,0xe2, - 0xa3,0x70,0x89,0x4c,0x8f,0x62,0xdc,0x4b,0xed,0x8d,0x84,0xfd,0xd3,0x71,0x77,0x0e, - 0x94,0x90,0x50,0x7c,0x3a,0x09,0x29,0xb4,0xe4,0x87,0x9c,0x85,0xfc,0x17,0x14,0x42, - 0x8a,0x31,0xc5,0x62,0xd7,0xb4,0x04,0x63,0x24,0x76,0xee,0x79,0x66,0x66,0x57,0x2b, - 0xeb,0xd5,0x24,0x75,0x0b,0x9d,0x2f,0x28,0xfb,0x36,0x3b,0xf3,0xd9,0x67,0xe6,0x79, - 0x66,0x76,0x66,0x9d,0x13,0xbf,0x1f,0xff,0x1c,0xb8,0xc6,0xf1,0x77,0x14,0x7f,0xbf, - 0x7b,0x01,0x60,0x13,0xb7,0x2f,0xc0,0x3e,0x70,0x15,0x6b,0x17,0x3f,0xbf,0x5e,0x7a, - 0xe9,0x25,0xd0,0x75,0x1d,0x22,0x91,0x08,0x0c,0x0c,0x0c,0x40,0x34,0x1a,0x85,0x91, - 0x91,0x11,0x30,0x0c,0x03,0x62,0xb1,0x18,0x98,0xa6,0x09,0x4b,0x4b,0x4b,0x90,0x4a, - 0xa5,0x20,0x97,0xcb,0xc1,0x37,0xdf,0x7c,0x03,0x96,0x65,0x01,0x63,0x8c,0x7e,0x4a, - 0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a, - 0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a, - 0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0xbf,0x6c,0x95,0x72, - 0xf9,0x9f,0x1a,0xa1,0xa1,0xbe,0x87,0xd0,0x4f,0x8d,0xd0,0x50,0x9b,0x8a,0xef,0x99, - 0xa4,0xf8,0xb8,0x9c,0xdd,0xdf,0xe1,0xd8,0xb4,0x21,0x3e,0xb1,0x87,0xb2,0xaa,0x53, - 0xd9,0x55,0xa7,0x76,0xc8,0xb2,0x5b,0x48,0xe9,0xd8,0x56,0xd3,0x8c,0x2a,0xf5,0x34, - 0x0c,0x10,0xc8,0x72,0xbe,0xfb,0x00,0xbf,0xa1,0x3c,0x70,0x0b,0x93,0xec,0x07,0x9d, - 0x6b,0x75,0x5b,0x3f,0xc6,0x9c,0xaf,0x00,0x12,0xf7,0xf4,0x29,0xa7,0x5b,0xb7,0xd9, - 0x6c,0x47,0x96,0x6d,0x77,0x77,0x32,0xf6,0xad,0x7e,0x8e,0x15,0xaf,0x80,0xb6,0x3a, - 0x7b,0x88,0x3d,0x04,0x71,0xf3,0xc6,0x10,0x40,0x90,0xe9,0x3a,0xe6,0xf8,0x8e,0x3e, - 0xc5,0x66,0x71,0xe7,0x89,0xfe,0x3a,0x63,0x9f,0xe9,0xbf,0xc6,0x47,0xc0,0x8b,0x81, - 0x38,0x2b,0xe9,0x47,0xb0,0x14,0xbd,0xa3,0x25,0x52,0xfa,0x93,0x1d,0x02,0xdc,0x84, - 0x20,0xee,0x68,0x98,0xef,0x53,0xfe,0x67,0x3a,0x18,0x70,0xb8,0xec,0x2d,0x68,0x67, - 0x5b,0xf4,0x10,0x33,0x30,0xe5,0xe0,0x31,0x9b,0xd1,0x16,0xd9,0x76,0xb8,0x8d,0xb1, - 0x27,0x70,0x0e,0x7f,0x00,0x47,0x46,0x83,0xec,0x01,0xdd,0x7c,0x9d,0xb1,0x2e,0x20, - 0x3e,0x00,0xcc,0x67,0x08,0xce,0xb3,0x19,0x58,0xc4,0x9c,0x11,0x6d,0x16,0x0e,0x32, - 0xe7,0x0a,0x2f,0x8b,0x95,0x20,0x68,0x33,0x07,0xb4,0x16,0xf9,0x0e,0x75,0x03,0x1c, - 0x20,0x4e,0x2d,0x1a,0xc6,0xbc,0xb1,0x88,0x4e,0x73,0x8c,0xf3,0x91,0xfd,0xec,0x6d, - 0xe4,0xdb,0x84,0x80,0x89,0x25,0x2f,0x56,0xf1,0x39,0x43,0xd0,0x33,0x07,0xd8,0x34, - 0x1e,0xf7,0x24,0x47,0xf1,0x66,0x7c,0xb6,0xd0,0x87,0x15,0x7c,0x59,0xf6,0xd8,0xe5, - 0x2b,0x02,0x4c,0xcc,0x0d,0x69,0xc4,0xc7,0x5a,0xe7,0xeb,0x4d,0x27,0xc3,0xf0,0x22, - 0xf1,0xf5,0x59,0x33,0xa0,0x61,0x2e,0x58,0x7e,0x61,0x88,0xfd,0x80,0xb9,0x99,0xa6, - 0xc9,0xf9,0x1e,0x40,0x1f,0xbb,0x5f,0x93,0xaf,0x0b,0x32,0xf8,0x0b,0xb1,0xb5,0x3c, - 0xde,0xa0,0xb1,0xaf,0x20,0x30,0x55,0x34,0xed,0xda,0x7c,0x6b,0x64,0xb7,0xf5,0x8e, - 0xdd,0xf1,0x15,0x31,0xd5,0xd7,0x10,0xb2,0x91,0x8f,0x8a,0x00,0xcc,0xa5,0x1d,0xef, - 0x2e,0xb0,0x62,0x17,0xbc,0x4c,0x09,0x88,0xef,0x2e,0x16,0x83,0x6c,0x8b,0xac,0x8a, - 0x2f,0x0c,0x96,0xbd,0x4e,0xae,0x45,0x09,0xc1,0x19,0xc5,0x27,0x45,0x27,0xa8,0xcd, - 0x77,0x17,0xae,0x3b,0xcc,0xd9,0xd8,0x1d,0x9f,0x40,0x08,0xac,0x6e,0xe2,0xd3,0xb3, - 0x52,0x17,0xac,0x8e,0x52,0x76,0xa4,0xef,0x09,0x46,0xf0,0x3d,0x80,0x29,0xaa,0xf7, - 0x6c,0x2d,0xfb,0x61,0x53,0xea,0xe2,0xa1,0x89,0x1e,0x2e,0x8c,0x4c,0xa8,0x1d,0x7c, - 0x07,0x05,0xdf,0x90,0xfc,0xfb,0xb1,0x12,0x85,0xb2,0xdd,0xf0,0x6d,0x71,0xbe,0x00, - 0xde,0x34,0x04,0xd9,0x51,0x78,0xdd,0xe2,0x61,0x60,0x9b,0x0c,0x26,0xf8,0x1e,0x63, - 0xfd,0x62,0xf6,0xd5,0x7c,0x74,0x12,0xc9,0x89,0xaf,0x70,0x17,0x9f,0x10,0xe8,0x41, - 0xea,0xf0,0x61,0x85,0x60,0xbe,0x8e,0x6d,0xef,0x9a,0x0f,0x5b,0xb6,0x2d,0xe2,0x33, - 0xfa,0xdb,0x90,0xf0,0xdb,0x73,0x0c,0x63,0x86,0x26,0xf9,0xc8,0x7f,0x23,0xc0,0xf9, - 0x58,0x25,0xdf,0x63,0x74,0xab,0x48,0x18,0xeb,0xf7,0x1d,0xbc,0xe7,0x98,0x00,0xab, - 0xe2,0x13,0xf5,0xbb,0x1d,0x16,0x39,0x4f,0xb9,0xf5,0xdb,0x2a,0xde,0x32,0x70,0x17, - 0xad,0xe2,0x73,0x78,0x31,0xc4,0xe7,0xdc,0xe5,0xe7,0x6a,0xd8,0xaf,0xc8,0x93,0x87, -
Re: [U-Boot] [PATCH 00/18 V2] CHECKPATCH: fpgadata.c cleanup
Hi Marek, On Thursday 15 December 2011 14:34:08 Marek Vasut wrote: board/dave/PPChameleonEVB/fpgadata.c | 3416 +--- board/esd/apc405/fpgadata.c| 6012 board/esd/ar405/fpgadata.c | 8250 +++-- board/esd/ar405/fpgadata_xl30.c| 7308 ++- board/esd/ash405/fpgadata.c| 7475 ++- board/esd/canbt/fpgadata.c | 1211 ++- board/esd/cpci405/fpgadata_cpci405.c | 1025 ++- board/esd/cpci405/fpgadata_cpci4052.c | 2294 +++-- board/esd/cpci405/fpgadata_cpci405ab.c | 3854 +--- board/esd/cpciiser4/fpgadata.c | 6204 +- board/esd/dasa_sim/fpgadata.c | 5855 board/esd/du405/fpgadata.c | 2108 +++-- board/esd/hh405/fpgadata.c | 7551 ++- board/esd/pci405/fpgadata.c| 2238 +++-- board/esd/plu405/fpgadata.c| 3537 +--- board/esd/tasreg/fpgadata.c|15992 +--- board/esd/voh405/fpgadata.c | 6032 board/esd/wuh405/fpgadata.c| 5454 18 files changed, 63874 insertions(+), 31942 deletions(-) V2: Align to 8 bytes per line. Cc: Anatolij Gustschin ag...@denx.de Cc: Stefano Babic sba...@denx.de Anatolij, Stefano, can you skim through these and give me your ACK so I can push them through staging ? Still, there is around three thousand files that don't conform to checkpatch style. Stefan, adding you to CC, can you please review this patches ? Matthias from esd is responsible for this code now (added to Cc). IIRC, then this code was automatically generated by some tool (FPGA binary data - C code). But still: Acked-by: Stefan Roese s...@denx.de Thanks for adding him. Also, I submitted further set of realignment patches. Who will merge this, shall I do and push or will you do it ? Thanks! M ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 00/18 V2] CHECKPATCH: fpgadata.c cleanup
Hi Marek, On Thu, 15 Dec 2011 14:26:41 +0100 Marek Vasut marek.va...@gmail.com wrote: ... 18 files changed, 63874 insertions(+), 31942 deletions(-) V2: Align to 8 bytes per line. Cc: Anatolij Gustschin ag...@denx.de Cc: Stefano Babic sba...@denx.de Anatolij, Stefano, can you skim through these and give me your ACK so I can push them through staging ? Still, there is around three thousand files that don't conform to checkpatch style. I'll look at these patches. Yes, some video drivers files are on my checkpatch cleanup TODO list. Thanks, Anatolij ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 00/18 V2] CHECKPATCH: fpgadata.c cleanup
On Thursday 15 December 2011 14:50:16 Marek Vasut wrote: Matthias from esd is responsible for this code now (added to Cc). IIRC, then this code was automatically generated by some tool (FPGA binary data - C code). But still: Acked-by: Stefan Roese s...@denx.de Thanks for adding him. Also, I submitted further set of realignment patches. Yes, saw them: Acked-by: Stefan Roese s...@denx.de Who will merge this, shall I do and push or will you do it ? Please go ahead and merge yourself. Thanks, Stefan -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: off...@denx.de ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 00/18 V2] CHECKPATCH: fpgadata.c cleanup
Hi Marek, On Thu, 15 Dec 2011 14:26:41 +0100 Marek Vasut marek.va...@gmail.com wrote: ... 18 files changed, 63874 insertions(+), 31942 deletions(-) V2: Align to 8 bytes per line. Cc: Anatolij Gustschin ag...@denx.de Cc: Stefano Babic sba...@denx.de Anatolij, Stefano, can you skim through these and give me your ACK so I can push them through staging ? Still, there is around three thousand files that don't conform to checkpatch style. I'll look at these patches. Yes, some video drivers files are on my checkpatch cleanup TODO list. Well I can share the complete list of files that fail checkpatch. I ran checkpatch -f on the whole tree (.c and .h files) a few days ago :-) It ran for 5+ hours ;-) M ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 00/18 V2] CHECKPATCH: fpgadata.c cleanup
Dear Stefan Roese, In message 201112151502.30771...@denx.de you wrote: Who will merge this, shall I do and push or will you do it ? Please go ahead and merge yourself. No. I want to maintain a 4 eye principle for all patches. Custodians can push any patches _but_their_own_ to u-boot-staging. 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 Reader, suppose you were an idiot. And suppose you were a member of Congress. But I repeat myself. - Mark Twain ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 0/2] *** Add ext4 filesystem support in uboot ***
Dear uma.shan...@samsung.com, In message 1323970732-23803-2-git-send-email-uma.shan...@samsung.com you wrote: From: Uma Shankar uma.shan...@samsung.com *** This patch series adds support for ext4 ls,load and write features in uboot Journaling is supported for write feature. To Enable EXT4 commands, modify the board specific config file with #define CONFIG_CMD_EXT2 1 #define CONFIG_CMD_EXT4 1 No. This selects a feature only, so a plain #define without any value should be used. Steps to test: 1. After applying the patch, ext4 specific commands can be seen in the boot loader prompt using UBOOT #help ext4load- load binary file from a Ext4 file system ext4ls - list files in a directory (default /) ext4write- create a file in ext4 formatted partition Could you please add these explanations as doc/README.ext4 so they don't get lost? 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 No one may kill a man. Not for any purpose. It cannot be condoned. -- Kirk, Spock's Brain, stardate 5431.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] arm, davinci: Fix build warnings for cam_enc_4xx
On Wed, Dec 14, 2011 at 11:22 PM, Heiko Schocher h...@denx.de wrote: Hello Christian, Christian Riesch wrote: This patch fixes a build warning for the cam_enc_4xx board introduced by commit d6ec0c0dfc70447cf615ae80a952da81f73f16b4: spl.c:35:13: warning: 'gdata' defined but not used spl.c:36:13: warning: 'bdata' defined but not used Signed-off-by: Christian Riesch christian.rie...@omicron.at Cc: Tom Rini tr...@ti.com Cc: Heiko Schocher h...@denx.de --- Hi, this patch applies on top of the ti/next branch. Thanks, Christian Tested on the cam_enc_4x board, thanks! Also too late, but: Acked-by: Heiko Schocher h...@denx.de Tested-by: Heiko Schocher h...@denx.de @Tom: Could you please wait 1-2 days before applying patches, so people could test them ;-) Thanks As a general rule, yes, I am trying to make sure I do. But for things like warning fixes or things I can verify by inspection, I might pick them up quicker :) -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] overo: add SPL support
On Wednesday, December 14, 2011 06:24:13 PM Steve Sakoman wrote: I think you will also need to update the get_board_revision function to ensure that SPL works with very early Overo revisions. Note this excerpt from the X-loader get_board_revision funtion: /* board revisions = R2410 connect 4030 irq_1 to gpio112 */ /* these boards should return a revision number of 0 */ /* the code below forces a 4030 RTC irq to ensure that gpio112 is low */ #ifdef CONFIG_DRIVER_OMAP34XX_I2C i2c_init(CFG_I2C_SPEED, CFG_I2C_SLAVE); data = 0x01; i2c_write(0x4B, 0x29, 1, data, 1); data = 0x0c; i2c_write(0x4B, 0x2b, 1, data, 1); i2c_read(0x4B, 0x2a, 1, data, 1); #endif Yup, ugly, but this is the only way to detect revision properly on those boards. I tried the following (as you can see I already commented out the i2c-read-write for test): int get_board_revision(void) { #ifdef CONFIG_DRIVER_OMAP34XX_I2C i2c_set_bus_num(TWL4030_I2C_BUS); /*data = 0x01; i2c_write(0x4B, 0x29, 1, data, 1); data = 0x0c; i2c_write(0x4B, 0x2b, 1, data, 1); i2c_read(0x4B, 0x2a, 1, data, 1);*/ #endif } SPL Boot process hangs on i2c_set_bus_num ( tested by removing i2c_set_bus_num - proper operation ) with console freeze: | U-Boot SPL 2011.12-rc1-4-g06e42c6-dirty (Dec 15 2011 - 14:03:34) | Texas Instruments Revision detection unimplemented The call stack for get_board_revision() is for SPL s_init() mem_init() do_sdrc_init(..) get_board_mem_timings(..) get_board_revision(..) It seems that the call to i2c_set_bus_num comes too early. Before I dive into x- loader analysis: Has anybody an idea what goes wrong? Andreas ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] omap4_panda: Initialize the USB phy
ping? Tom, Aneesh, what do you think of this version? Chris Lalancette On Tue, Dec 13, 2011 at 2:41 PM, clalance...@gmail.com wrote: From: Chris Lalancette clalance...@gmail.com During misc_init_r, make sure to setup the clocks properly for the USB hub on the pandaboard. With this in place, the USB hub and the ethernet works on the pandaboard. Signed-off-by: Chris Lalancette clalance...@gmail.com --- v2: Incorporate changes from Aneesh (ane...@ti.com) to support USB PHY from sys_clk and PER dpll. Also use symbolic constants instead of magic values. arch/arm/include/asm/arch-omap4/clocks.h | 63 ++ board/ti/panda/panda.c | 59 2 files changed, 122 insertions(+), 0 deletions(-) ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] omap4_panda: Initialize the USB phy
On Thu, Dec 15, 2011 at 7:37 AM, Chris Lalancette clalance...@gmail.com wrote: ping? Tom, Aneesh, what do you think of this version? Just trying to make sure folks have a chance to review and comment, sorry, looks good from my PoV. Chris Lalancette On Tue, Dec 13, 2011 at 2:41 PM, clalance...@gmail.com wrote: From: Chris Lalancette clalance...@gmail.com During misc_init_r, make sure to setup the clocks properly for the USB hub on the pandaboard. With this in place, the USB hub and the ethernet works on the pandaboard. Signed-off-by: Chris Lalancette clalance...@gmail.com --- v2: Incorporate changes from Aneesh (ane...@ti.com) to support USB PHY from sys_clk and PER dpll. Also use symbolic constants instead of magic values. arch/arm/include/asm/arch-omap4/clocks.h | 63 ++ board/ti/panda/panda.c | 59 2 files changed, 122 insertions(+), 0 deletions(-) -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] da850_am18xxevm: Add CONFIG_SPI_FLASH_STMICRO to the board config
On 12/15/2011 12:31 AM, Christian Riesch wrote: The board config for the da850_am18xxevm board is missing the CONFIG_SPI_FLASH_STMICRO option and therefore the SPI flash on the AM1808 experimenter's kit could not be detected. Signed-off-by: Christian Riesch christian.rie...@omicron.at Cc: Tom Rini tr...@ti.com --- include/configs/da850_am18xxevm.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/configs/da850_am18xxevm.h b/include/configs/da850_am18xxevm.h index 04961c6..354f045 100644 --- a/include/configs/da850_am18xxevm.h +++ b/include/configs/da850_am18xxevm.h @@ -146,6 +146,7 @@ #define CONFIG_SPI #define CONFIG_SPI_FLASH +#define CONFIG_SPI_FLASH_STMICRO #define CONFIG_SPI_FLASH_WINBOND #define CONFIG_DAVINCI_SPI #define CONFIG_SYS_SPI_BASE DAVINCI_SPI1_BASE After some internal digging to confirm, da850_am18xxevm.h should go away and we should do da850_am18xxevm as just a boards.cfg option that uses the da850evm.h file and sets CONFIG_DA850_AM18X_EVM. Would you mind doing the respin? Thanks! -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] omap4_panda: Initialize the USB phy
On Wednesday 14 December 2011 01:11 AM, clalance...@gmail.com wrote: From: Chris Lalancetteclalance...@gmail.com During misc_init_r, make sure to setup the clocks properly for the USB hub on the pandaboard. With this in place, the USB hub and the ethernet works on the pandaboard. Signed-off-by: Chris Lalancetteclalance...@gmail.com --- v2: Incorporate changes from Aneesh (ane...@ti.com) to support USB PHY from sys_clk and PER dpll. Also use symbolic constants instead of magic values. Looks good to me. Thanks a lot for incorporating the suggested changes. FWIW, Acked-by: Aneesh V ane...@ti.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 00/18 V2] CHECKPATCH: fpgadata.c cleanup
Hi Marek, On Thu, 15 Dec 2011 14:26:41 +0100 Marek Vasut marek.va...@gmail.com wrote: ... 18 files changed, 63874 insertions(+), 31942 deletions(-) V2: Align to 8 bytes per line. Cc: Anatolij Gustschin ag...@denx.de Cc: Stefano Babic sba...@denx.de Anatolij, Stefano, can you skim through these and give me your ACK so I can push them through staging ? Still, there is around three thousand files that don't conform to checkpatch style. I'll look at these patches. Yes, some video drivers files are on my checkpatch cleanup TODO list. Well I can share the complete list of files that fail checkpatch. I ran checkpatch -f on the whole tree (.c and .h files) a few days ago :-) It ran for 5+ hours ;-) http://marex.hackndev.com/fail-list.txt This is after applying these two patchsets (logo and fpga) and partly cleaning up board/esd/) btw. let's queue these (both logo and fpga) patches for -next please. They are not urgent and I'd like to see my stats for this release not tainted by this patchbomb. Also, I'll share the partial cleanup of ESD boards if Matthias/Stefan is interested. I checked how arch/arm is also broken and me being mostly ARM guy, I'd like to continue cleaning up there. Thanks M ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Transferring images quickly with no Ethernet
I have an embedded system with an OMAP3 that does not have an Ethernet support. The only means of I/O to the process it is serial and USB slave. Loading binary data over the serial line is just too slow; is there any way to the USB slave to perform bulk transfers to speed my development process up? It does not look the U-Boot supports USB Ethernet gadget which is what I am using in Linux. Try serial gadget (or simple bulk ep streaming ...). If it's not there, it should be very easy to add. M ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Transferring images quickly with no Ethernet
On Wed, Dec 14, 2011 at 4:15 PM, Rishi Dhupar ris...@gmail.com wrote: I have an embedded system with an OMAP3 that does not have an Ethernet support. The only means of I/O to the process it is serial and USB slave. Loading binary data over the serial line is just too slow; is there any way to the USB slave to perform bulk transfers to speed my development process up? It does not look the U-Boot supports USB Ethernet gadget which is what I am using in Linux. Search the list archives for dfu and/or fastboot patch submissions. Nothing has made it upstream yet but you may find something good enough for your purposes. --john ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 0/1]: USB: Fix ARM CONFIG_USB_TTY boards
Hey all, As has been reported in a few threads now, and thanks to Aneesh V's analysis we know why Pandaboard/Beagleboard (and probably a number of other ARM boards) currently hang on boot. The following patch is based on Stefan's list of possible solutions to the problem he first encountered on OpenRISC which lead to the first patch. This has been tested on Panda and Beagle and OpenRISC and I think we must have this for v2011.12 release. Thanks all! Changes since v1: - Switch to (get|put)_unaligned instead of _le16 (Stefan) -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 1/1] USB: Use (get|put)_unaligned for accessing wMaxPacketSize
In 9792987721c7980453fe6447c3fa6593b44f8458 Stefan describes a usecase where the previous behavior of leaving wMaxPacketSize be unaligned caused fatal problems. The initial fix for this problem was incomplete however as it showed another cases of non-aligned access that previously worked implicitly. This switches to making sure that all access of wMaxPacketSize are done via (get|put)_unaligned. In order to maintain a level of readability to the code in some cases we now use a variable for the value of wMaxPacketSize and in others, a macro. Cc: Minkyu Kang mk7.k...@samsung.com Cc: Remy Bohmer li...@bohmer.net OpenRISC: Tested-by: Stefan Kristiansson stefan.kristians...@saunalahti.fi Beagleboard xM, Pandaboard run-tested, s5p_goni build-tested. Signed-off-by: Tom Rini tr...@ti.com --- common/cmd_usb.c |3 ++- common/usb.c | 27 +++ drivers/serial/usbtty.c | 10 ++ drivers/usb/gadget/epautoconf.c |8 +--- drivers/usb/gadget/s3c_udc_otg.c | 10 ++ include/usbdescriptors.h |2 +- 6 files changed, 39 insertions(+), 21 deletions(-) diff --git a/common/cmd_usb.c b/common/cmd_usb.c index d4ec2a2..320667f 100644 --- a/common/cmd_usb.c +++ b/common/cmd_usb.c @@ -28,6 +28,7 @@ #include common.h #include command.h #include asm/byteorder.h +#include asm/unaligned.h #include part.h #include usb.h @@ -240,7 +241,7 @@ void usb_display_ep_desc(struct usb_endpoint_descriptor *epdesc) printf(Interrupt); break; } - printf( MaxPacket %d, epdesc-wMaxPacketSize); + printf( MaxPacket %d, get_unaligned(epdesc-wMaxPacketSize)); if ((epdesc-bmAttributes 0x03) == 0x3) printf( Interval %dms, epdesc-bInterval); printf(\n); diff --git a/common/usb.c b/common/usb.c index 4418c70..63a11c8 100644 --- a/common/usb.c +++ b/common/usb.c @@ -49,6 +49,7 @@ #include asm/processor.h #include linux/ctype.h #include asm/byteorder.h +#include asm/unaligned.h #include usb.h #ifdef CONFIG_4xx @@ -279,30 +280,32 @@ usb_set_maxpacket_ep(struct usb_device *dev, int if_idx, int ep_idx) { int b; struct usb_endpoint_descriptor *ep; + u16 ep_wMaxPacketSize; ep = dev-config.if_desc[if_idx].ep_desc[ep_idx]; b = ep-bEndpointAddress USB_ENDPOINT_NUMBER_MASK; + ep_wMaxPacketSize = get_unaligned(ep-wMaxPacketSize); if ((ep-bmAttributes USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_CONTROL) { /* Control = bidirectional */ - dev-epmaxpacketout[b] = ep-wMaxPacketSize; - dev-epmaxpacketin[b] = ep-wMaxPacketSize; + dev-epmaxpacketout[b] = ep_wMaxPacketSize; + dev-epmaxpacketin[b] = ep_wMaxPacketSize; USB_PRINTF(##Control EP epmaxpacketout/in[%d] = %d\n, b, dev-epmaxpacketin[b]); } else { if ((ep-bEndpointAddress 0x80) == 0) { /* OUT Endpoint */ - if (ep-wMaxPacketSize dev-epmaxpacketout[b]) { - dev-epmaxpacketout[b] = ep-wMaxPacketSize; + if (ep_wMaxPacketSize dev-epmaxpacketout[b]) { + dev-epmaxpacketout[b] = ep_wMaxPacketSize; USB_PRINTF(##EP epmaxpacketout[%d] = %d\n, b, dev-epmaxpacketout[b]); } } else { /* IN Endpoint */ - if (ep-wMaxPacketSize dev-epmaxpacketin[b]) { - dev-epmaxpacketin[b] = ep-wMaxPacketSize; + if (ep_wMaxPacketSize dev-epmaxpacketin[b]) { + dev-epmaxpacketin[b] = ep_wMaxPacketSize; USB_PRINTF(##EP epmaxpacketin[%d] = %d\n, b, dev-epmaxpacketin[b]); } @@ -333,6 +336,7 @@ int usb_parse_config(struct usb_device *dev, unsigned char *buffer, int cfgno) struct usb_descriptor_header *head; int index, ifno, epno, curr_if_num; int i; + u16 ep_wMaxPacketSize; ifno = -1; epno = -1; @@ -378,8 +382,15 @@ int usb_parse_config(struct usb_device *dev, unsigned char *buffer, int cfgno) dev-config.if_desc[ifno].no_of_ep++; memcpy(dev-config.if_desc[ifno].ep_desc[epno], buffer[index], buffer[index]); - le16_to_cpus((dev-config.if_desc[ifno].ep_desc[epno].\ - wMaxPacketSize)); + ep_wMaxPacketSize = get_unaligned(dev-config.\ + if_desc[ifno].\ +
Re: [U-Boot] [PATCH 00/18 V2] CHECKPATCH: fpgadata.c cleanup
Hi Marek, thanks for that work. The patches against the esd files are Acked-by: Matthias Fuchs matthias.fu...@esd.eu Matthias On 15.12.2011 14:26, Marek Vasut wrote: First of the CHECKPATCH series of patches with per-file checkpatch fixes. This series fixes all files fpgadata.c, which contains PPC FPGA firmwares. There are no functional changes, only CHECKPATCH fixes. Marek Vasut (18): CHECKPATCH: ./board/dave/PPChameleonEVB/fpgadata.c CHECKPATCH: ./board/esd/cpciiser4/fpgadata.c CHECKPATCH: ./board/esd/du405/fpgadata.c CHECKPATCH: ./board/esd/canbt/fpgadata.c CHECKPATCH: ./board/esd/cpci405/fpgadata_cpci4052.c CHECKPATCH: ./board/esd/cpci405/fpgadata_cpci405ab.c CHECKPATCH: ./board/esd/cpci405/fpgadata_cpci405.c CHECKPATCH: ./board/esd/wuh405/fpgadata.c CHECKPATCH: ./board/esd/plu405/fpgadata.c CHECKPATCH: ./board/esd/ar405/fpgadata.c CHECKPATCH: ./board/esd/ar405/fpgadata_xl30.c CHECKPATCH: ./board/esd/dasa_sim/fpgadata.c CHECKPATCH: ./board/esd/ash405/fpgadata.c CHECKPATCH: ./board/esd/voh405/fpgadata.c CHECKPATCH: ./board/esd/apc405/fpgadata.c CHECKPATCH: ./board/esd/tasreg/fpgadata.c CHECKPATCH: ./board/esd/pci405/fpgadata.c CHECKPATCH: ./board/esd/hh405/fpgadata.c board/dave/PPChameleonEVB/fpgadata.c | 3416 +--- board/esd/apc405/fpgadata.c| 6012 board/esd/ar405/fpgadata.c | 8250 +++-- board/esd/ar405/fpgadata_xl30.c| 7308 ++- board/esd/ash405/fpgadata.c| 7475 ++- board/esd/canbt/fpgadata.c | 1211 ++- board/esd/cpci405/fpgadata_cpci405.c | 1025 ++- board/esd/cpci405/fpgadata_cpci4052.c | 2294 +++-- board/esd/cpci405/fpgadata_cpci405ab.c | 3854 +--- board/esd/cpciiser4/fpgadata.c | 6204 +- board/esd/dasa_sim/fpgadata.c | 5855 board/esd/du405/fpgadata.c | 2108 +++-- board/esd/hh405/fpgadata.c | 7551 ++- board/esd/pci405/fpgadata.c| 2238 +++-- board/esd/plu405/fpgadata.c| 3537 +--- board/esd/tasreg/fpgadata.c|15992 +--- board/esd/voh405/fpgadata.c| 6032 board/esd/wuh405/fpgadata.c| 5454 18 files changed, 63874 insertions(+), 31942 deletions(-) V2: Align to 8 bytes per line. Cc: Anatolij Gustschin ag...@denx.de Cc: Stefano Babic sba...@denx.de Anatolij, Stefano, can you skim through these and give me your ACK so I can push them through staging ? Still, there is around three thousand files that don't conform to checkpatch style. -- Dipl.-Ing. Matthias Fuchs Head of System Design esd electronic system design gmbh Vahrenwalder Str. 207 - 30165 Hannover - GERMANY Phone: +49-511-37298-0 - Fax: +49-511-37298-68 Please visit our homepage http://www.esd.eu Quality Products - Made in Germany Besuchen Sie uns auf der embedded world 2012 in Halle 4, Stand 129 vom 28. Februar - 01. März 2012 in Nürnberg! Geschäftsführer: Klaus Detering Amtsgericht Hannover HRB 51373 - VAT-ID DE 115672832 - ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] sandbox: Add tap based networking
Hi Mike, On Tue, Dec 13, 2011 at 7:35 PM, Mike Frysinger vap...@gentoo.org wrote: On Tuesday 13 December 2011 18:54:59 Simon Glass wrote: On Sun, Dec 4, 2011 at 9:57 AM, Matthias Weisser wrote: --- a/arch/sandbox/cpu/os.c +++ b/arch/sandbox/cpu/os.c @@ -19,6 +19,7 @@ * MA 02111-1307 USA */ +#include config.h #include fcntl.h #include stdlib.h #include termios.h @@ -30,6 +31,19 @@ #include sys/mman.h #include linux/types.h +#ifdef CONFIG_NET_TAP I don't think we need this #ifdef i think it's fine. the current code isn't too tied to Linux, but adding NET_TAP unconditionally would make it completely Linux specific ... -mike OK that's fine. Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 00/18 V2] CHECKPATCH: fpgadata.c cleanup
Hi Marek, On 15.12.2011 16:17, Marek Vasut wrote: Hi Marek, On Thu, 15 Dec 2011 14:26:41 +0100 Marek Vasut marek.va...@gmail.com wrote: ... 18 files changed, 63874 insertions(+), 31942 deletions(-) V2: Align to 8 bytes per line. Cc: Anatolij Gustschin ag...@denx.de Cc: Stefano Babic sba...@denx.de Anatolij, Stefano, can you skim through these and give me your ACK so I can push them through staging ? Still, there is around three thousand files that don't conform to checkpatch style. I'll look at these patches. Yes, some video drivers files are on my checkpatch cleanup TODO list. Well I can share the complete list of files that fail checkpatch. I ran checkpatch -f on the whole tree (.c and .h files) a few days ago :-) It ran for 5+ hours ;-) http://marex.hackndev.com/fail-list.txt This is after applying these two patchsets (logo and fpga) and partly cleaning up board/esd/) btw. let's queue these (both logo and fpga) patches for -next please. They are not urgent and I'd like to see my stats for this release not tainted by this patchbomb. Also, I'll share the partial cleanup of ESD boards if Matthias/Stefan is interested. I checked how arch/arm is also broken and me being mostly ARM guy, I'd like to continue cleaning up there. I would do that clean up by myself for the esd files. As long as we do not have a strict timeline for this, I will see if I could start with that in January. I will also check if we could get rid of some boards that are not active anymore. Matthias ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 00/18 V2] CHECKPATCH: fpgadata.c cleanup
On Thursday 15 December 2011 16:17:06 Marek Vasut wrote: Well I can share the complete list of files that fail checkpatch. I ran checkpatch -f on the whole tree (.c and .h files) a few days ago :-) It ran for 5+ hours ;-) http://marex.hackndev.com/fail-list.txt This is after applying these two patchsets (logo and fpga) and partly cleaning up board/esd/) btw. let's queue these (both logo and fpga) patches for -next please. They are not urgent and I'd like to see my stats for this release not tainted by this patchbomb. Okay. If nobody objects I'll queue these patches up in u-boot-ppc4xx/next in the next few days. Thanks, Stefan -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: 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] omap4_panda: Initialize the USB phy
On Thu, Dec 15, 2011 at 10:08 AM, Aneesh V ane...@ti.com wrote: On Wednesday 14 December 2011 01:11 AM, clalance...@gmail.com wrote: From: Chris Lalancetteclalance...@gmail.com During misc_init_r, make sure to setup the clocks properly for the USB hub on the pandaboard. With this in place, the USB hub and the ethernet works on the pandaboard. Signed-off-by: Chris Lalancetteclalance...@gmail.com --- v2: Incorporate changes from Aneesh (ane...@ti.com) to support USB PHY from sys_clk and PER dpll. Also use symbolic constants instead of magic values. Looks good to me. Thanks a lot for incorporating the suggested changes. FWIW, Acked-by: Aneesh V ane...@ti.com Thanks Tom, Aneesh. Tom, I presume you will pick it up through your tree? Chris Lalancette ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] da850_am18xxevm: Add CONFIG_SPI_FLASH_STMICRO to the board config
Hi Tom, On Thu, Dec 15, 2011 at 3:45 PM, Tom Rini tr...@ti.com wrote: On 12/15/2011 12:31 AM, Christian Riesch wrote: The board config for the da850_am18xxevm board is missing the CONFIG_SPI_FLASH_STMICRO option and therefore the SPI flash on the AM1808 experimenter's kit could not be detected. [...] After some internal digging to confirm, da850_am18xxevm.h should go away and we should do da850_am18xxevm as just a boards.cfg option that uses the da850evm.h file and sets CONFIG_DA850_AM18X_EVM. Would you mind doing the respin? Thanks! Ok, I will submit a patch. Christian ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] arm, davinci: Use a common configuration file for da850evm and da850_am18xxevm
In commit 06194b6b65f701a9d6ef2d9b4123c4afe57d8783 a separate header file was introduced for the AM1808 EVM, include/configs/da850_am18xxevm.h. Before this commit, the da850evm.h configuration file was used for both the AM1808 and the OMAP-L138 EVMs. The only substantial difference between the da850evm and the da850_am18xxevm configuration is a single bit in the hardware revision that is passed to the Linux kernel. This patch removes include/configs/da850_am18xxevm.h. Instead the include/configs/da850evm.h configuration is used for AM18xx EVMs and CONFIG_DA850_AM18X_EVM is defined in boards.cfg. Signed-off-by: Christian Riesch christian.rie...@omicron.at Cc: Tom Rini tr...@ti.com --- boards.cfg|2 +- include/configs/da850_am18xxevm.h | 246 - 2 files changed, 1 insertions(+), 247 deletions(-) delete mode 100644 include/configs/da850_am18xxevm.h diff --git a/boards.cfg b/boards.cfg index 95d2d39..30199db 100644 --- a/boards.cfg +++ b/boards.cfg @@ -120,7 +120,7 @@ pm9263 arm arm926ejs pm9263 ronetix pm9g45 arm arm926ejs pm9g45 ronetixat91pm9g45:AT91SAM9G45 cam_enc_4xx arm arm926ejs cam_enc_4xx ait davinci cam_enc_4xx da830evm arm arm926ejs da8xxevm davincidavinci -da850_am18xxevm arm arm926ejs da8xxevm davincidavinci +da850_am18xxevm arm arm926ejs da8xxevm davincidavinci da850evm:DA850_AM18X_EVM da850evm arm arm926ejs da8xxevm davincidavinci davinci_dm355evm arm arm926ejs dm355evm davincidavinci davinci_dm355leopard arm arm926ejs dm355leopard davincidavinci diff --git a/include/configs/da850_am18xxevm.h b/include/configs/da850_am18xxevm.h deleted file mode 100644 index 9b7bf1e..000 --- a/include/configs/da850_am18xxevm.h +++ /dev/null @@ -1,246 +0,0 @@ -/* - * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ - * - * Based on davinci_dvevm.h. Original Copyrights follow: - * - * Copyright (C) 2007 Sergey Kubushyn k...@koi8.net - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#ifndef __CONFIG_H -#define __CONFIG_H - -/* - * Board - */ -#define CONFIG_DRIVER_TI_EMAC -#define CONFIG_USE_SPIFLASH - - -/* - * SoC Configuration - */ -#define CONFIG_MACH_DAVINCI_DA850_EVM -#define CONFIG_ARM926EJS /* arm926ejs CPU core */ -#define CONFIG_SOC_DA8XX /* TI DA8xx SoC */ -#define CONFIG_SOC_DA850 /* TI DA850 SoC */ -#define CONFIG_SYS_CLK_FREQclk_get(DAVINCI_ARM_CLKID) -#define CONFIG_SYS_OSCIN_FREQ 2400 -#define CONFIG_SYS_TIMERBASE DAVINCI_TIMER0_BASE -#define CONFIG_SYS_HZ_CLOCKclk_get(DAVINCI_AUXCLK_CLKID) -#define CONFIG_SYS_HZ 1000 -#define CONFIG_SKIP_LOWLEVEL_INIT -#define CONFIG_SYS_TEXT_BASE 0xc108 -#define CONFIG_DA850_AM18X_EVM -/* - * Memory Info - */ -#define CONFIG_SYS_MALLOC_LEN (0x1 + 1*1024*1024) /* malloc() len */ -#define PHYS_SDRAM_1 DAVINCI_DDR_EMIF_DATA_BASE /* DDR Start */ -#define PHYS_SDRAM_1_SIZE (64 20) /* SDRAM size 64MB */ -#define CONFIG_MAX_RAM_BANK_SIZE (512 20) /* max size from SPRS586*/ - -/* memtest start addr */ -#define CONFIG_SYS_MEMTEST_START (PHYS_SDRAM_1 + 0x200) - -/* memtest will be run on 16MB */ -#define CONFIG_SYS_MEMTEST_END (PHYS_SDRAM_1 + 0x200 + 16*1024*1024) - -#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */ -#define CONFIG_STACKSIZE (256*1024) /* regular stack */ - -/* - * Serial Driver info - */ -#define CONFIG_SYS_NS16550 -#define CONFIG_SYS_NS16550_SERIAL -#define CONFIG_SYS_NS16550_REG_SIZE-4 /* NS16550 register size */ -#define CONFIG_SYS_NS16550_COM1DAVINCI_UART2_BASE /* Base address of UART2 */ -#define CONFIG_SYS_NS16550_CLK clk_get(DAVINCI_UART2_CLKID) -#define CONFIG_CONS_INDEX 1 /* use UART0 for console */ -#define CONFIG_BAUDRATE115200 /*
Re: [U-Boot] [PATCH] OMAP3: Add Corscience Tricorder board
On Thu, Dec 15, 2011 at 3:16 AM, Thomas Weber we...@corscience.de wrote: Tricorder is a board which is very similar to the Devkit8000. It is designed as a base platform for further medical devices. www.corscience.de/en/medical-engineering/products/multiparameter/mp10-board.html [snip] +#if defined(CONFIG_GENERIC_MMC) !(defined(CONFIG_SPL_BUILD)) +int board_mmc_init(bd_t *bis) +{ + omap_mmc_init(0); + return 0; +} +#endif Just return omap_mmc_init(0) :) [snip] +++ b/include/configs/tricorder.h [snip] +/* DDR - I use Micron DDR */ +#define CONFIG_OMAP3_MICRON_DDR Unused [snip] +/* TWL4030 */ +#define CONFIG_TWL4030_POWER 1 +#define CONFIG_TWL4030_LED 1 Do these need the '1' ? +/* Board NAND Info */ +#define CONFIG_SYS_NO_FLASH /* no NOR flash */ +#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */ +#define MTDIDS_DEFAULT nand0=nand +#define MTDPARTS_DEFAULT mtdparts=nand: \ + 512k(u-boot-spl), \ + 1920k(u-boot), \ + 128k(u-boot-env), \ + 4m(kernel), \ + -(fs) Curious, medical device but not using redundant env? Or something special hidden in those extra-large sizes? [snip] + nandargs= \ + run commonargs; \ + setenv bootargs ${bootargs} \ + omapfb.mode=lcd:${lcdmode} \ + omapdss.def_disp=${defaultdisplay} \ + root=/dev/mtdblock4 \ + rootfstype=ubifs \ + ${kernelopts}\0 \ Curious, this works too? I'm used to the 'root=ubi0:rootfs rootwait' or so syntax [snip] +#define CONFIG_SYS_MAXARGS 128 /* max number of command args */ What? I swear this is just for args passed to u-boot commands and unrelated to args passed to the kernel via bootargs= so 16 or so is a nice sane default. [snip] +#define CONFIG_SYS_NAND_BAD_BLOCK_POS 0 NAND_LARGE_BADBLOCK_POS please. -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 3/3] mx28evk: Add initial support for MX28EVK board
On 15/12/2011 17:21, Fabio Estevam wrote: Add initial support for Freescale MX28EVK board. Tested boot via SD card and by loading a kernel via TFTP through the FEC interface. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- - For correct operation of saving environment variables into the SD card, the following patch is needed: http://lists.denx.de/pipermail/u-boot/2011-November/111448.html Changes since v1: - Read the MAC from fuses - Use tabs instead of space in u-boot.bd - Use puts instead of print - Factor out mac reading function - Factor out ddr size calculation function - Use GENERATED_GBL_DATA_SIZE - Protect CONFIG_ENV_IS_IN_MMC MAINTAINERS|1 + arch/arm/cpu/arm926ejs/mx28/mx28.c | 56 + arch/arm/include/asm/arch-mx28/sys_proto.h |3 + board/denx/m28evk/m28evk.c | 56 - board/freescale/common/sdhc_boot.c |2 + board/freescale/mx28evk/Makefile | 49 board/freescale/mx28evk/iomux.c| 138 ++ board/freescale/mx28evk/mx28evk.c | 164 ++ board/freescale/mx28evk/u-boot.bd | 14 +++ boards.cfg |1 + include/configs/mx28evk.h | 172 11 files changed, 600 insertions(+), 56 deletions(-) create mode 100644 board/freescale/mx28evk/Makefile create mode 100644 board/freescale/mx28evk/iomux.c create mode 100644 board/freescale/mx28evk/mx28evk.c create mode 100644 board/freescale/mx28evk/u-boot.bd create mode 100644 include/configs/mx28evk.h diff --git a/MAINTAINERS b/MAINTAINERS index a56ca10..72e1089 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -639,6 +639,7 @@ Kristoffer Ericson kristoffer.eric...@gmail.com Fabio Estevam fabio.este...@freescale.com mx25pdk i.MX25 + mx28evk i.MX28 mx31pdk i.MX31 mx53ard i.MX53 mx53smd i.MX53 diff --git a/arch/arm/cpu/arm926ejs/mx28/mx28.c b/arch/arm/cpu/arm926ejs/mx28/mx28.c index 088c019..e15b158 100644 --- a/arch/arm/cpu/arm926ejs/mx28/mx28.c +++ b/arch/arm/cpu/arm926ejs/mx28/mx28.c @@ -214,6 +214,62 @@ int cpu_eth_init(bd_t *bis) } #endif +#ifdef CONFIG_MX28_FEC_MAC_IN_OCOTP + +#define MXS_OCOTP_MAX_TIMEOUT 100 +void imx_get_mac_from_fuse(char *mac) +{ + struct mx28_ocotp_regs *ocotp_regs = + (struct mx28_ocotp_regs *)MXS_OCOTP_BASE; + uint32_t data; Wait...this patch conflict with your first patch of your patchset, where you have already move this code in a common place. Anything wrong with your patchset ? 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 3/3] mx28evk: Add initial support for MX28EVK board
On Thu, Dec 15, 2011 at 2:42 PM, Stefano Babic sba...@denx.de wrote: Wait...this patch conflict with your first patch of your patchset, where you have already move this code in a common place. Anything wrong with your patchset ? Sorry about that. I sent a fixed v3 version. Thanks, Fabio Estevam ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 2/3] mx28: Let dram_init be common for mx28
Let dram_init function be a common function, so that other mx28 boards can reuse it. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- arch/arm/cpu/arm926ejs/mx28/mx28.c | 21 + arch/arm/include/asm/arch-mx28/sys_proto.h |1 + board/denx/m28evk/m28evk.c | 21 - 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/mx28/mx28.c b/arch/arm/cpu/arm926ejs/mx28/mx28.c index 785978f..ec8eaf9 100644 --- a/arch/arm/cpu/arm926ejs/mx28/mx28.c +++ b/arch/arm/cpu/arm926ejs/mx28/mx28.c @@ -249,6 +249,27 @@ void imx_get_mac_from_fuse(char *mac) } #endif +#defineHW_DIGCTRL_SCRATCH0 0x8001c280 +#defineHW_DIGCTRL_SCRATCH1 0x8001c290 +int dram_init(void) +{ + uint32_t sz[2]; + + sz[0] = readl(HW_DIGCTRL_SCRATCH0); + sz[1] = readl(HW_DIGCTRL_SCRATCH1); + + if (sz[0] != sz[1]) { + puts(MX28:\n + Error, the RAM size in HW_DIGCTRL_SCRATCH0 and\n + HW_DIGCTRL_SCRATCH1 is not the same. Please\n + verify these two registers contain valid RAM size!\n); + hang(); + } + + gd-ram_size = sz[0]; + return 0; +} + U_BOOT_CMD( clocks, CONFIG_SYS_MAXARGS, 1, do_mx28_showclocks, display clocks, diff --git a/arch/arm/include/asm/arch-mx28/sys_proto.h b/arch/arm/include/asm/arch-mx28/sys_proto.h index cf5ab16..745b84d 100644 --- a/arch/arm/include/asm/arch-mx28/sys_proto.h +++ b/arch/arm/include/asm/arch-mx28/sys_proto.h @@ -36,5 +36,6 @@ void mx28_common_spl_init(const iomux_cfg_t *iomux_setup, #endif void imx_get_mac_from_fuse(char *mac); +int dram_init(void); #endif /* __MX28_H__ */ diff --git a/board/denx/m28evk/m28evk.c b/board/denx/m28evk/m28evk.c index 005446a..d6a2a50 100644 --- a/board/denx/m28evk/m28evk.c +++ b/board/denx/m28evk/m28evk.c @@ -70,27 +70,6 @@ int board_init(void) return 0; } -#defineHW_DIGCTRL_SCRATCH0 0x8001c280 -#defineHW_DIGCTRL_SCRATCH1 0x8001c290 -int dram_init(void) -{ - uint32_t sz[2]; - - sz[0] = readl(HW_DIGCTRL_SCRATCH0); - sz[1] = readl(HW_DIGCTRL_SCRATCH1); - - if (sz[0] != sz[1]) { - printf(MX28:\n - Error, the RAM size in HW_DIGCTRL_SCRATCH0 and\n - HW_DIGCTRL_SCRATCH1 is not the same. Please\n - verify these two registers contain valid RAM size!\n); - hang(); - } - - gd-ram_size = sz[0]; - return 0; -} - #ifdef CONFIG_CMD_MMC static int m28_mmc_wp(int id) { -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 1/3] mx28: Let imx_get_mac_from_fuse be common for mx28
Let imx_get_mac_from_fuse function be a common function, so that other mx28 boards can reuse it. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- arch/arm/cpu/arm926ejs/mx28/mx28.c | 35 arch/arm/include/asm/arch-mx28/sys_proto.h |2 + board/denx/m28evk/m28evk.c | 35 3 files changed, 37 insertions(+), 35 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/mx28/mx28.c b/arch/arm/cpu/arm926ejs/mx28/mx28.c index 088c019..785978f 100644 --- a/arch/arm/cpu/arm926ejs/mx28/mx28.c +++ b/arch/arm/cpu/arm926ejs/mx28/mx28.c @@ -214,6 +214,41 @@ int cpu_eth_init(bd_t *bis) } #endif +#ifdef CONFIG_MX28_FEC_MAC_IN_OCOTP + +#defineMXS_OCOTP_MAX_TIMEOUT 100 +void imx_get_mac_from_fuse(char *mac) +{ + struct mx28_ocotp_regs *ocotp_regs = + (struct mx28_ocotp_regs *)MXS_OCOTP_BASE; + uint32_t data; + + memset(mac, 0, 6); + + writel(OCOTP_CTRL_RD_BANK_OPEN, ocotp_regs-hw_ocotp_ctrl_set); + + if (mx28_wait_mask_clr(ocotp_regs-hw_ocotp_ctrl_reg, OCOTP_CTRL_BUSY, + MXS_OCOTP_MAX_TIMEOUT)) { + puts(MXS FEC: Can't get MAC from OCOTP\n); + return; + } + + data = readl(ocotp_regs-hw_ocotp_cust0); + + mac[0] = 0x00; + mac[1] = 0x04; + mac[2] = (data 24) 0xff; + mac[3] = (data 16) 0xff; + mac[4] = (data 8) 0xff; + mac[5] = data 0xff; +} +#else +void imx_get_mac_from_fuse(char *mac) +{ + memset(mac, 0, 6); +} +#endif + U_BOOT_CMD( clocks, CONFIG_SYS_MAXARGS, 1, do_mx28_showclocks, display clocks, diff --git a/arch/arm/include/asm/arch-mx28/sys_proto.h b/arch/arm/include/asm/arch-mx28/sys_proto.h index be1f7db..cf5ab16 100644 --- a/arch/arm/include/asm/arch-mx28/sys_proto.h +++ b/arch/arm/include/asm/arch-mx28/sys_proto.h @@ -35,4 +35,6 @@ void mx28_common_spl_init(const iomux_cfg_t *iomux_setup, const unsigned int iomux_size); #endif +void imx_get_mac_from_fuse(char *mac); + #endif /* __MX28_H__ */ diff --git a/board/denx/m28evk/m28evk.c b/board/denx/m28evk/m28evk.c index fcee046..005446a 100644 --- a/board/denx/m28evk/m28evk.c +++ b/board/denx/m28evk/m28evk.c @@ -178,39 +178,4 @@ int board_eth_init(bd_t *bis) return ret; } -#ifdef CONFIG_M28_FEC_MAC_IN_OCOTP - -#defineMXS_OCOTP_MAX_TIMEOUT 100 -void imx_get_mac_from_fuse(char *mac) -{ - struct mx28_ocotp_regs *ocotp_regs = - (struct mx28_ocotp_regs *)MXS_OCOTP_BASE; - uint32_t data; - - memset(mac, 0, 6); - - writel(OCOTP_CTRL_RD_BANK_OPEN, ocotp_regs-hw_ocotp_ctrl_set); - - if (mx28_wait_mask_clr(ocotp_regs-hw_ocotp_ctrl_reg, OCOTP_CTRL_BUSY, - MXS_OCOTP_MAX_TIMEOUT)) { - printf(MXS FEC: Can't get MAC from OCOTP\n); - return; - } - - data = readl(ocotp_regs-hw_ocotp_cust0); - - mac[0] = 0x00; - mac[1] = 0x04; - mac[2] = (data 24) 0xff; - mac[3] = (data 16) 0xff; - mac[4] = (data 8) 0xff; - mac[5] = data 0xff; -} -#else -void imx_get_mac_from_fuse(char *mac) -{ - memset(mac, 0, 6); -} -#endif - #endif -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 3/3] mx28evk: Add initial support for MX28EVK board
Add initial support for Freescale MX28EVK board. Tested boot via SD card and by loading a kernel via TFTP through the FEC interface. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- - For correct operation of saving environment variables into the SD card, the following patch is needed: http://lists.denx.de/pipermail/u-boot/2011-November/111448.html Changes since v1: - Read the MAC from fuses - Use tabs instead of space in u-boot.bd - Use puts instead of print - Factor out mac reading function - Factor out ddr size calculation function - Use GENERATED_GBL_DATA_SIZE - Protect CONFIG_ENV_IS_IN_MMC MAINTAINERS|1 + arch/arm/cpu/arm926ejs/mx28/mx28.c | 56 + arch/arm/include/asm/arch-mx28/sys_proto.h |3 + board/denx/m28evk/m28evk.c | 56 - board/freescale/common/sdhc_boot.c |2 + board/freescale/mx28evk/Makefile | 49 board/freescale/mx28evk/iomux.c| 138 ++ board/freescale/mx28evk/mx28evk.c | 164 ++ board/freescale/mx28evk/u-boot.bd | 14 +++ boards.cfg |1 + include/configs/mx28evk.h | 172 11 files changed, 600 insertions(+), 56 deletions(-) create mode 100644 board/freescale/mx28evk/Makefile create mode 100644 board/freescale/mx28evk/iomux.c create mode 100644 board/freescale/mx28evk/mx28evk.c create mode 100644 board/freescale/mx28evk/u-boot.bd create mode 100644 include/configs/mx28evk.h diff --git a/MAINTAINERS b/MAINTAINERS index a56ca10..72e1089 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -639,6 +639,7 @@ Kristoffer Ericson kristoffer.eric...@gmail.com Fabio Estevam fabio.este...@freescale.com mx25pdk i.MX25 + mx28evk i.MX28 mx31pdk i.MX31 mx53ard i.MX53 mx53smd i.MX53 diff --git a/arch/arm/cpu/arm926ejs/mx28/mx28.c b/arch/arm/cpu/arm926ejs/mx28/mx28.c index 088c019..e15b158 100644 --- a/arch/arm/cpu/arm926ejs/mx28/mx28.c +++ b/arch/arm/cpu/arm926ejs/mx28/mx28.c @@ -214,6 +214,62 @@ int cpu_eth_init(bd_t *bis) } #endif +#ifdef CONFIG_MX28_FEC_MAC_IN_OCOTP + +#defineMXS_OCOTP_MAX_TIMEOUT 100 +void imx_get_mac_from_fuse(char *mac) +{ + struct mx28_ocotp_regs *ocotp_regs = + (struct mx28_ocotp_regs *)MXS_OCOTP_BASE; + uint32_t data; + + memset(mac, 0, 6); + + writel(OCOTP_CTRL_RD_BANK_OPEN, ocotp_regs-hw_ocotp_ctrl_set); + + if (mx28_wait_mask_clr(ocotp_regs-hw_ocotp_ctrl_reg, OCOTP_CTRL_BUSY, + MXS_OCOTP_MAX_TIMEOUT)) { + puts(MXS FEC: Can't get MAC from OCOTP\n); + return; + } + + data = readl(ocotp_regs-hw_ocotp_cust0); + + mac[0] = 0x00; + mac[1] = 0x04; + mac[2] = (data 24) 0xff; + mac[3] = (data 16) 0xff; + mac[4] = (data 8) 0xff; + mac[5] = data 0xff; +} +#else +void imx_get_mac_from_fuse(char *mac) +{ + memset(mac, 0, 6); +} +#endif + +#defineHW_DIGCTRL_SCRATCH0 0x8001c280 +#defineHW_DIGCTRL_SCRATCH1 0x8001c290 +int dram_init(void) +{ + uint32_t sz[2]; + + sz[0] = readl(HW_DIGCTRL_SCRATCH0); + sz[1] = readl(HW_DIGCTRL_SCRATCH1); + + if (sz[0] != sz[1]) { + puts(MX28:\n + Error, the RAM size in HW_DIGCTRL_SCRATCH0 and\n + HW_DIGCTRL_SCRATCH1 is not the same. Please\n + verify these two registers contain valid RAM size!\n); + hang(); + } + + gd-ram_size = sz[0]; + return 0; +} + U_BOOT_CMD( clocks, CONFIG_SYS_MAXARGS, 1, do_mx28_showclocks, display clocks, diff --git a/arch/arm/include/asm/arch-mx28/sys_proto.h b/arch/arm/include/asm/arch-mx28/sys_proto.h index be1f7db..745b84d 100644 --- a/arch/arm/include/asm/arch-mx28/sys_proto.h +++ b/arch/arm/include/asm/arch-mx28/sys_proto.h @@ -35,4 +35,7 @@ void mx28_common_spl_init(const iomux_cfg_t *iomux_setup, const unsigned int iomux_size); #endif +void imx_get_mac_from_fuse(char *mac); +int dram_init(void); + #endif /* __MX28_H__ */ diff --git a/board/denx/m28evk/m28evk.c b/board/denx/m28evk/m28evk.c index fcee046..d6a2a50 100644 --- a/board/denx/m28evk/m28evk.c +++ b/board/denx/m28evk/m28evk.c @@ -70,27 +70,6 @@ int board_init(void) return 0; } -#defineHW_DIGCTRL_SCRATCH0 0x8001c280 -#defineHW_DIGCTRL_SCRATCH1 0x8001c290 -int dram_init(void) -{ - uint32_t sz[2]; - - sz[0] = readl(HW_DIGCTRL_SCRATCH0); - sz[1] = readl(HW_DIGCTRL_SCRATCH1); - - if (sz[0] != sz[1]) { - printf(MX28:\n - Error, the RAM size in HW_DIGCTRL_SCRATCH0 and\n - HW_DIGCTRL_SCRATCH1 is not the same.
[U-Boot] [PATCH v3 2/3] mx28: Let dram_init be common for mx28
Let dram_init function be a common function, so that other mx28 boards can reuse it. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- arch/arm/cpu/arm926ejs/mx28/mx28.c | 21 + arch/arm/include/asm/arch-mx28/sys_proto.h |1 + board/denx/m28evk/m28evk.c | 21 - 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/mx28/mx28.c b/arch/arm/cpu/arm926ejs/mx28/mx28.c index 785978f..ec8eaf9 100644 --- a/arch/arm/cpu/arm926ejs/mx28/mx28.c +++ b/arch/arm/cpu/arm926ejs/mx28/mx28.c @@ -249,6 +249,27 @@ void imx_get_mac_from_fuse(char *mac) } #endif +#defineHW_DIGCTRL_SCRATCH0 0x8001c280 +#defineHW_DIGCTRL_SCRATCH1 0x8001c290 +int dram_init(void) +{ + uint32_t sz[2]; + + sz[0] = readl(HW_DIGCTRL_SCRATCH0); + sz[1] = readl(HW_DIGCTRL_SCRATCH1); + + if (sz[0] != sz[1]) { + puts(MX28:\n + Error, the RAM size in HW_DIGCTRL_SCRATCH0 and\n + HW_DIGCTRL_SCRATCH1 is not the same. Please\n + verify these two registers contain valid RAM size!\n); + hang(); + } + + gd-ram_size = sz[0]; + return 0; +} + U_BOOT_CMD( clocks, CONFIG_SYS_MAXARGS, 1, do_mx28_showclocks, display clocks, diff --git a/arch/arm/include/asm/arch-mx28/sys_proto.h b/arch/arm/include/asm/arch-mx28/sys_proto.h index cf5ab16..745b84d 100644 --- a/arch/arm/include/asm/arch-mx28/sys_proto.h +++ b/arch/arm/include/asm/arch-mx28/sys_proto.h @@ -36,5 +36,6 @@ void mx28_common_spl_init(const iomux_cfg_t *iomux_setup, #endif void imx_get_mac_from_fuse(char *mac); +int dram_init(void); #endif /* __MX28_H__ */ diff --git a/board/denx/m28evk/m28evk.c b/board/denx/m28evk/m28evk.c index 005446a..d6a2a50 100644 --- a/board/denx/m28evk/m28evk.c +++ b/board/denx/m28evk/m28evk.c @@ -70,27 +70,6 @@ int board_init(void) return 0; } -#defineHW_DIGCTRL_SCRATCH0 0x8001c280 -#defineHW_DIGCTRL_SCRATCH1 0x8001c290 -int dram_init(void) -{ - uint32_t sz[2]; - - sz[0] = readl(HW_DIGCTRL_SCRATCH0); - sz[1] = readl(HW_DIGCTRL_SCRATCH1); - - if (sz[0] != sz[1]) { - printf(MX28:\n - Error, the RAM size in HW_DIGCTRL_SCRATCH0 and\n - HW_DIGCTRL_SCRATCH1 is not the same. Please\n - verify these two registers contain valid RAM size!\n); - hang(); - } - - gd-ram_size = sz[0]; - return 0; -} - #ifdef CONFIG_CMD_MMC static int m28_mmc_wp(int id) { -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 3/3] mx28evk: Add initial support for MX28EVK board
Add initial support for Freescale MX28EVK board. Tested boot via SD card and by loading a kernel via TFTP through the FEC interface. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- - For correct operation of saving environment variables into the SD card, the following patch is needed: http://lists.denx.de/pipermail/u-boot/2011-November/111448.html Changes since v2: - Generate the patch again due to error in applying unrelated changes Changes since v1: - Read the MAC from fuses - Use tabs instead of space in u-boot.bd - Use puts instead of print - Factor out mac reading function - Factor out ddr size calculation function - Use GENERATED_GBL_DATA_SIZE - Protect CONFIG_ENV_IS_IN_MMC MAINTAINERS |1 + board/freescale/mx28evk/Makefile | 49 +++ board/freescale/mx28evk/iomux.c | 138 + board/freescale/mx28evk/mx28evk.c | 164 +++ board/freescale/mx28evk/u-boot.bd | 14 +++ boards.cfg|1 + include/configs/mx28evk.h | 172 + 7 files changed, 539 insertions(+), 0 deletions(-) create mode 100644 board/freescale/mx28evk/Makefile create mode 100644 board/freescale/mx28evk/iomux.c create mode 100644 board/freescale/mx28evk/mx28evk.c create mode 100644 board/freescale/mx28evk/u-boot.bd create mode 100644 include/configs/mx28evk.h diff --git a/MAINTAINERS b/MAINTAINERS index a56ca10..72e1089 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -639,6 +639,7 @@ Kristoffer Ericson kristoffer.eric...@gmail.com Fabio Estevam fabio.este...@freescale.com mx25pdk i.MX25 + mx28evk i.MX28 mx31pdk i.MX31 mx53ard i.MX53 mx53smd i.MX53 diff --git a/board/freescale/mx28evk/Makefile b/board/freescale/mx28evk/Makefile new file mode 100644 index 000..7459107 --- /dev/null +++ b/board/freescale/mx28evk/Makefile @@ -0,0 +1,49 @@ +# +# (C) Copyright 2000-2006 +# 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 + +ifndef CONFIG_SPL_BUILD +COBJS := mx28evk.o +else +COBJS := iomux.o +endif + +SRCS := $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) + +$(LIB):$(obj).depend $(OBJS) + $(call cmd_link_o_target, $(OBJS)) + +all: $(ALL) + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/board/freescale/mx28evk/iomux.c b/board/freescale/mx28evk/iomux.c new file mode 100644 index 000..904e3f3 --- /dev/null +++ b/board/freescale/mx28evk/iomux.c @@ -0,0 +1,138 @@ +/* + * Freescale MX28EVK IOMUX setup + * + * Copyright (C) 2011 Marek Vasut marek.va...@gmail.com + * on behalf of DENX Software Engineering GmbH + * + * 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. + */ + +#include common.h +#include config.h +#include asm/io.h +#include asm/arch/iomux-mx28.h +#include asm/arch/imx-regs.h +#include asm/arch/sys_proto.h + +#defineMUX_CONFIG_SSP0 (MXS_PAD_3V3 | MXS_PAD_8MA | MXS_PAD_PULLUP) +#defineMUX_CONFIG_ENET (MXS_PAD_3V3 | MXS_PAD_8MA | MXS_PAD_PULLUP) +#defineMUX_CONFIG_EMI (MXS_PAD_3V3 | MXS_PAD_12MA | MXS_PAD_NOPULL) + +const iomux_cfg_t iomux_setup[] = { + /* DUART */ + MX28_PAD_PWM0__DUART_RX, + MX28_PAD_PWM1__DUART_TX, + + /* MMC0 */ + MX28_PAD_SSP0_DATA0__SSP0_D0 | MUX_CONFIG_SSP0, +
[U-Boot] [PATCH] fsl_lbc: add printout of LCRR and LBCR to local bus regs
It can be handy to have these in the output when trying to debug odd behaviour. Signed-off-by: Paul Gortmaker paul.gortma...@windriver.com diff --git a/arch/powerpc/cpu/mpc8xxx/fsl_lbc.c b/arch/powerpc/cpu/mpc8xxx/fsl_lbc.c index 587576b..023ac9a 100644 --- a/arch/powerpc/cpu/mpc8xxx/fsl_lbc.c +++ b/arch/powerpc/cpu/mpc8xxx/fsl_lbc.c @@ -28,6 +28,8 @@ void print_lbc_regs(void) printf(BR%d\t0x%08X\tOR%d\t0x%08X\n, i, get_lbc_br(i), i, get_lbc_or(i)); } + printf(LBCR\t0x%08X\tLCRR\t0x%08X\n, + get_lbc_lbcr(), get_lbc_lcrr()); } void init_early_memctl_regs(void) diff --git a/arch/powerpc/include/asm/fsl_lbc.h b/arch/powerpc/include/asm/fsl_lbc.h index bf572b7..2a23d84 100644 --- a/arch/powerpc/include/asm/fsl_lbc.h +++ b/arch/powerpc/include/asm/fsl_lbc.h @@ -475,6 +475,8 @@ extern void init_early_memctl_regs(void); extern void upmconfig(uint upm, uint *table, uint size); #define LBC_BASE_ADDR ((fsl_lbc_t *)CONFIG_SYS_LBC_ADDR) +#define get_lbc_lcrr() (in_be32((LBC_BASE_ADDR)-lcrr)) +#define get_lbc_lbcr() (in_be32((LBC_BASE_ADDR)-lbcr)) #define get_lbc_br(i) (in_be32((LBC_BASE_ADDR)-bank[i].br)) #define get_lbc_or(i) (in_be32((LBC_BASE_ADDR)-bank[i].or)) #define set_lbc_br(i, v) (out_be32((LBC_BASE_ADDR)-bank[i].br, v)) -- 1.7.4.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] omap4_panda: Initialize the USB phy
On Thu, Dec 15, 2011 at 9:16 AM, Chris Lalancette clalance...@gmail.com wrote: On Thu, Dec 15, 2011 at 10:08 AM, Aneesh V ane...@ti.com wrote: On Wednesday 14 December 2011 01:11 AM, clalance...@gmail.com wrote: From: Chris Lalancetteclalance...@gmail.com During misc_init_r, make sure to setup the clocks properly for the USB hub on the pandaboard. With this in place, the USB hub and the ethernet works on the pandaboard. Signed-off-by: Chris Lalancetteclalance...@gmail.com --- v2: Incorporate changes from Aneesh (ane...@ti.com) to support USB PHY from sys_clk and PER dpll. Also use symbolic constants instead of magic values. Looks good to me. Thanks a lot for incorporating the suggested changes. FWIW, Acked-by: Aneesh V ane...@ti.com Thanks Tom, Aneesh. Tom, I presume you will pick it up through your tree? Correct, thanks. -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 1/3] mx28: Let imx_get_mac_from_fuse be common for mx28
Let imx_get_mac_from_fuse function be a common function, so that other mx28 boards can reuse it. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- arch/arm/cpu/arm926ejs/mx28/mx28.c | 35 arch/arm/include/asm/arch-mx28/sys_proto.h |2 + board/denx/m28evk/m28evk.c | 35 3 files changed, 37 insertions(+), 35 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/mx28/mx28.c b/arch/arm/cpu/arm926ejs/mx28/mx28.c index 088c019..785978f 100644 --- a/arch/arm/cpu/arm926ejs/mx28/mx28.c +++ b/arch/arm/cpu/arm926ejs/mx28/mx28.c @@ -214,6 +214,41 @@ int cpu_eth_init(bd_t *bis) } #endif +#ifdef CONFIG_MX28_FEC_MAC_IN_OCOTP + +#defineMXS_OCOTP_MAX_TIMEOUT 100 +void imx_get_mac_from_fuse(char *mac) +{ + struct mx28_ocotp_regs *ocotp_regs = + (struct mx28_ocotp_regs *)MXS_OCOTP_BASE; + uint32_t data; + + memset(mac, 0, 6); + + writel(OCOTP_CTRL_RD_BANK_OPEN, ocotp_regs-hw_ocotp_ctrl_set); + + if (mx28_wait_mask_clr(ocotp_regs-hw_ocotp_ctrl_reg, OCOTP_CTRL_BUSY, + MXS_OCOTP_MAX_TIMEOUT)) { + puts(MXS FEC: Can't get MAC from OCOTP\n); + return; + } + + data = readl(ocotp_regs-hw_ocotp_cust0); + + mac[0] = 0x00; + mac[1] = 0x04; + mac[2] = (data 24) 0xff; + mac[3] = (data 16) 0xff; + mac[4] = (data 8) 0xff; + mac[5] = data 0xff; +} +#else +void imx_get_mac_from_fuse(char *mac) +{ + memset(mac, 0, 6); +} +#endif + U_BOOT_CMD( clocks, CONFIG_SYS_MAXARGS, 1, do_mx28_showclocks, display clocks, diff --git a/arch/arm/include/asm/arch-mx28/sys_proto.h b/arch/arm/include/asm/arch-mx28/sys_proto.h index be1f7db..cf5ab16 100644 --- a/arch/arm/include/asm/arch-mx28/sys_proto.h +++ b/arch/arm/include/asm/arch-mx28/sys_proto.h @@ -35,4 +35,6 @@ void mx28_common_spl_init(const iomux_cfg_t *iomux_setup, const unsigned int iomux_size); #endif +void imx_get_mac_from_fuse(char *mac); + #endif /* __MX28_H__ */ diff --git a/board/denx/m28evk/m28evk.c b/board/denx/m28evk/m28evk.c index fcee046..005446a 100644 --- a/board/denx/m28evk/m28evk.c +++ b/board/denx/m28evk/m28evk.c @@ -178,39 +178,4 @@ int board_eth_init(bd_t *bis) return ret; } -#ifdef CONFIG_M28_FEC_MAC_IN_OCOTP - -#defineMXS_OCOTP_MAX_TIMEOUT 100 -void imx_get_mac_from_fuse(char *mac) -{ - struct mx28_ocotp_regs *ocotp_regs = - (struct mx28_ocotp_regs *)MXS_OCOTP_BASE; - uint32_t data; - - memset(mac, 0, 6); - - writel(OCOTP_CTRL_RD_BANK_OPEN, ocotp_regs-hw_ocotp_ctrl_set); - - if (mx28_wait_mask_clr(ocotp_regs-hw_ocotp_ctrl_reg, OCOTP_CTRL_BUSY, - MXS_OCOTP_MAX_TIMEOUT)) { - printf(MXS FEC: Can't get MAC from OCOTP\n); - return; - } - - data = readl(ocotp_regs-hw_ocotp_cust0); - - mac[0] = 0x00; - mac[1] = 0x04; - mac[2] = (data 24) 0xff; - mac[3] = (data 16) 0xff; - mac[4] = (data 8) 0xff; - mac[5] = data 0xff; -} -#else -void imx_get_mac_from_fuse(char *mac) -{ - memset(mac, 0, 6); -} -#endif - #endif -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 00/18 V2] CHECKPATCH: fpgadata.c cleanup
On Thu, 15 Dec 2011 14:26:41 +0100 Marek Vasut marek.va...@gmail.com wrote: First of the CHECKPATCH series of patches with per-file checkpatch fixes. This series fixes all files fpgadata.c, which contains PPC FPGA firmwares. There are no functional changes, only CHECKPATCH fixes. Marek Vasut (18): CHECKPATCH: ./board/dave/PPChameleonEVB/fpgadata.c CHECKPATCH: ./board/esd/cpciiser4/fpgadata.c CHECKPATCH: ./board/esd/du405/fpgadata.c CHECKPATCH: ./board/esd/canbt/fpgadata.c CHECKPATCH: ./board/esd/cpci405/fpgadata_cpci4052.c CHECKPATCH: ./board/esd/cpci405/fpgadata_cpci405ab.c CHECKPATCH: ./board/esd/cpci405/fpgadata_cpci405.c CHECKPATCH: ./board/esd/wuh405/fpgadata.c CHECKPATCH: ./board/esd/plu405/fpgadata.c CHECKPATCH: ./board/esd/ar405/fpgadata.c CHECKPATCH: ./board/esd/ar405/fpgadata_xl30.c CHECKPATCH: ./board/esd/dasa_sim/fpgadata.c CHECKPATCH: ./board/esd/ash405/fpgadata.c CHECKPATCH: ./board/esd/voh405/fpgadata.c CHECKPATCH: ./board/esd/apc405/fpgadata.c CHECKPATCH: ./board/esd/tasreg/fpgadata.c CHECKPATCH: ./board/esd/pci405/fpgadata.c CHECKPATCH: ./board/esd/hh405/fpgadata.c board/dave/PPChameleonEVB/fpgadata.c | 3416 +--- board/esd/apc405/fpgadata.c| 6012 board/esd/ar405/fpgadata.c | 8250 +++-- board/esd/ar405/fpgadata_xl30.c| 7308 ++- board/esd/ash405/fpgadata.c| 7475 ++- board/esd/canbt/fpgadata.c | 1211 ++- board/esd/cpci405/fpgadata_cpci405.c | 1025 ++- board/esd/cpci405/fpgadata_cpci4052.c | 2294 +++-- board/esd/cpci405/fpgadata_cpci405ab.c | 3854 +--- board/esd/cpciiser4/fpgadata.c | 6204 +- board/esd/dasa_sim/fpgadata.c | 5855 board/esd/du405/fpgadata.c | 2108 +++-- board/esd/hh405/fpgadata.c | 7551 ++- board/esd/pci405/fpgadata.c| 2238 +++-- board/esd/plu405/fpgadata.c| 3537 +--- board/esd/tasreg/fpgadata.c|15992 +--- board/esd/voh405/fpgadata.c| 6032 board/esd/wuh405/fpgadata.c| 5454 18 files changed, 63874 insertions(+), 31942 deletions(-) V2: Align to 8 bytes per line. Cc: Anatolij Gustschin ag...@denx.de Cc: Stefano Babic sba...@denx.de Anatolij, Stefano, can you skim through these and give me your ACK so I can push them through staging ? Still, there is around three thousand files that don't conform to checkpatch style. For all 18 patches: Acked-by: Anatolij Gustschin ag...@denx.de Thanks, Anatolij ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2] ARMV7: Add support For Logic OMAP35x/DM37x modules
This patch adds basic support for OMAP35x/DM37x SOM LV/Torpedo reference boards. It assumes U-boot is loaded to SDRAM with the help of another small bootloader (x-load) running from SRAM. Signed-off-by: Peter Barada peter.bar...@logicpd.com Cc: Tom Rini tom.r...@gmail.com Cc: Igor Grinberg grinb...@compulab.co.il --- Changes for V2: Rework logic_identify() into identify_board() - can't use checkboard() since its enabled by CONFIG_DISPLAY_BOARDINFO Properly indent comments in set_muxconf_regs() Move setup_net_chip() call from misc_init_r to board_eth_init() Remove triple empty line spacing Pass gpio_request(189) non-empty description Remove board/logicpd/omap3som/config.mk Remove clean/distclean from board/logicpd/omap3som/Makefile Modify board_mmc_init() to be one line function Modify include/configs/omap3_logic.h to use on/off #defines board/logicpd/omap3som/Makefile | 42 +++ board/logicpd/omap3som/omap3logic.c | 582 +++ board/logicpd/omap3som/omap3logic.h | 35 ++ boards.cfg |1 + include/configs/omap3_logic.h | 359 + 5 files changed, 1019 insertions(+), 0 deletions(-) create mode 100644 board/logicpd/omap3som/Makefile create mode 100644 board/logicpd/omap3som/omap3logic.c create mode 100644 board/logicpd/omap3som/omap3logic.h create mode 100644 include/configs/omap3_logic.h diff --git a/board/logicpd/omap3som/Makefile b/board/logicpd/omap3som/Makefile new file mode 100644 index 000..75e237b --- /dev/null +++ b/board/logicpd/omap3som/Makefile @@ -0,0 +1,42 @@ +# +# (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-y:= omap3logic.o + +COBJS := $(sort $(COBJS-y)) +SRCS := $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) + +$(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/logicpd/omap3som/omap3logic.c b/board/logicpd/omap3som/omap3logic.c new file mode 100644 index 000..0411adb --- /dev/null +++ b/board/logicpd/omap3som/omap3logic.c @@ -0,0 +1,582 @@ +/* + * (C) Copyright 2011 + * Logic Product Development www.logicpd.com + * + * Author : + * Peter Barada peter.bar...@logicpd.com + * + * Derived from Beagle Board and 3430 SDP code by + * Richard Woodruff r-woodru...@ti.com + * Syed Mohammed Khasim kha...@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 flash.h +#include nand.h +#include i2c.h +#include twl4030.h +#include asm/io.h +#include asm/arch/mmc_host_def.h +#include asm/arch/mux.h +#include asm/arch/mem.h +#include asm/arch/sys_proto.h +#include asm/gpio.h +#include asm/mach-types.h +#include omap3logic.h + +DECLARE_GLOBAL_DATA_PTR; + +/* Mux hsusb0_data5 as gpio_189 */ +#define MUX_LOGIC_HSUSB0_DATA5_GPIO_MUX() \ + MUX_VAL(CP(HSUSB0_DATA5), (IEN | PTD | DIS | M4)) + +/* Mux hsusb0_data5 as hasusb0_data5 */ +#define MUX_LOGIC_HSUSB0_DATA5_DATA5() \ + MUX_VAL(CP(HSUSB0_DATA5), (IEN | PTD | DIS | M0)) + +/* two
Re: [U-Boot] [PATCH v2 1/3] mx28: Let imx_get_mac_from_fuse be common for mx28
Let imx_get_mac_from_fuse function be a common function, so that other mx28 boards can reuse it. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- arch/arm/cpu/arm926ejs/mx28/mx28.c | 35 arch/arm/include/asm/arch-mx28/sys_proto.h | 2 + board/denx/m28evk/m28evk.c | 35 3 files changed, 37 insertions(+), 35 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/mx28/mx28.c b/arch/arm/cpu/arm926ejs/mx28/mx28.c index 088c019..785978f 100644 --- a/arch/arm/cpu/arm926ejs/mx28/mx28.c +++ b/arch/arm/cpu/arm926ejs/mx28/mx28.c @@ -214,6 +214,41 @@ int cpu_eth_init(bd_t *bis) } #endif +#ifdef CONFIG_MX28_FEC_MAC_IN_OCOTP + +#define MXS_OCOTP_MAX_TIMEOUT 100 +void imx_get_mac_from_fuse(char *mac) +{ + struct mx28_ocotp_regs *ocotp_regs = + (struct mx28_ocotp_regs *)MXS_OCOTP_BASE; + uint32_t data; + + memset(mac, 0, 6); + + writel(OCOTP_CTRL_RD_BANK_OPEN, ocotp_regs-hw_ocotp_ctrl_set); + + if (mx28_wait_mask_clr(ocotp_regs-hw_ocotp_ctrl_reg, OCOTP_CTRL_BUSY, + MXS_OCOTP_MAX_TIMEOUT)) { + puts(MXS FEC: Can't get MAC from OCOTP\n); + return; + } + + data = readl(ocotp_regs-hw_ocotp_cust0); + + mac[0] = 0x00; + mac[1] = 0x04; Be careful here. 0x00 0x04 prefix might not be correct for all cases! + mac[2] = (data 24) 0xff; + mac[3] = (data 16) 0xff; + mac[4] = (data 8) 0xff; + mac[5] = data 0xff; +} +#else +void imx_get_mac_from_fuse(char *mac) +{ + memset(mac, 0, 6); +} +#endif + U_BOOT_CMD( clocks, CONFIG_SYS_MAXARGS, 1, do_mx28_showclocks, display clocks, diff --git a/arch/arm/include/asm/arch-mx28/sys_proto.h b/arch/arm/include/asm/arch-mx28/sys_proto.h index be1f7db..cf5ab16 100644 --- a/arch/arm/include/asm/arch-mx28/sys_proto.h +++ b/arch/arm/include/asm/arch-mx28/sys_proto.h @@ -35,4 +35,6 @@ void mx28_common_spl_init(const iomux_cfg_t *iomux_setup, const unsigned int iomux_size); #endif +void imx_get_mac_from_fuse(char *mac); + #endif /* __MX28_H__ */ diff --git a/board/denx/m28evk/m28evk.c b/board/denx/m28evk/m28evk.c index fcee046..005446a 100644 --- a/board/denx/m28evk/m28evk.c +++ b/board/denx/m28evk/m28evk.c @@ -178,39 +178,4 @@ int board_eth_init(bd_t *bis) return ret; } -#ifdef CONFIG_M28_FEC_MAC_IN_OCOTP - -#define MXS_OCOTP_MAX_TIMEOUT 100 -void imx_get_mac_from_fuse(char *mac) -{ - struct mx28_ocotp_regs *ocotp_regs = - (struct mx28_ocotp_regs *)MXS_OCOTP_BASE; - uint32_t data; - - memset(mac, 0, 6); - - writel(OCOTP_CTRL_RD_BANK_OPEN, ocotp_regs-hw_ocotp_ctrl_set); - - if (mx28_wait_mask_clr(ocotp_regs-hw_ocotp_ctrl_reg, OCOTP_CTRL_BUSY, - MXS_OCOTP_MAX_TIMEOUT)) { - printf(MXS FEC: Can't get MAC from OCOTP\n); - return; - } - - data = readl(ocotp_regs-hw_ocotp_cust0); - - mac[0] = 0x00; - mac[1] = 0x04; - mac[2] = (data 24) 0xff; - mac[3] = (data 16) 0xff; - mac[4] = (data 8) 0xff; - mac[5] = data 0xff; -} -#else -void imx_get_mac_from_fuse(char *mac) -{ - memset(mac, 0, 6); -} -#endif - #endif Otherwise, sure, it seems OK. M ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/3] mx28: Let dram_init be common for mx28
Let dram_init function be a common function, so that other mx28 boards can reuse it. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- arch/arm/cpu/arm926ejs/mx28/mx28.c | 21 + arch/arm/include/asm/arch-mx28/sys_proto.h |1 + board/denx/m28evk/m28evk.c | 21 - 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/mx28/mx28.c b/arch/arm/cpu/arm926ejs/mx28/mx28.c index 785978f..ec8eaf9 100644 --- a/arch/arm/cpu/arm926ejs/mx28/mx28.c +++ b/arch/arm/cpu/arm926ejs/mx28/mx28.c @@ -249,6 +249,27 @@ void imx_get_mac_from_fuse(char *mac) } #endif +#define HW_DIGCTRL_SCRATCH0 0x8001c280 +#define HW_DIGCTRL_SCRATCH1 0x8001c290 +int dram_init(void) +{ + uint32_t sz[2]; + + sz[0] = readl(HW_DIGCTRL_SCRATCH0); + sz[1] = readl(HW_DIGCTRL_SCRATCH1); + + if (sz[0] != sz[1]) { + puts(MX28:\n + Error, the RAM size in HW_DIGCTRL_SCRATCH0 and\n + HW_DIGCTRL_SCRATCH1 is not the same. Please\n + verify these two registers contain valid RAM size!\n); + hang(); + } + + gd-ram_size = sz[0]; + return 0; +} + U_BOOT_CMD( clocks, CONFIG_SYS_MAXARGS, 1, do_mx28_showclocks, display clocks, diff --git a/arch/arm/include/asm/arch-mx28/sys_proto.h b/arch/arm/include/asm/arch-mx28/sys_proto.h index cf5ab16..745b84d 100644 --- a/arch/arm/include/asm/arch-mx28/sys_proto.h +++ b/arch/arm/include/asm/arch-mx28/sys_proto.h @@ -36,5 +36,6 @@ void mx28_common_spl_init(const iomux_cfg_t *iomux_setup, #endif void imx_get_mac_from_fuse(char *mac); +int dram_init(void); Rename it to mx28_dram_init() or something please. #endif /* __MX28_H__ */ diff --git a/board/denx/m28evk/m28evk.c b/board/denx/m28evk/m28evk.c index 005446a..d6a2a50 100644 --- a/board/denx/m28evk/m28evk.c +++ b/board/denx/m28evk/m28evk.c @@ -70,27 +70,6 @@ int board_init(void) return 0; } -#define HW_DIGCTRL_SCRATCH0 0x8001c280 -#define HW_DIGCTRL_SCRATCH1 0x8001c290 -int dram_init(void) -{ - uint32_t sz[2]; - - sz[0] = readl(HW_DIGCTRL_SCRATCH0); - sz[1] = readl(HW_DIGCTRL_SCRATCH1); - - if (sz[0] != sz[1]) { - printf(MX28:\n - Error, the RAM size in HW_DIGCTRL_SCRATCH0 and\n - HW_DIGCTRL_SCRATCH1 is not the same. Please\n - verify these two registers contain valid RAM size!\n); - hang(); - } - - gd-ram_size = sz[0]; - return 0; -} - #ifdef CONFIG_CMD_MMC static int m28_mmc_wp(int id) { M ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 1/3] mx28: Let imx_get_mac_from_fuse be common for mx28
Let imx_get_mac_from_fuse function be a common function, so that other mx28 boards can reuse it. Please add summaries (what does v2 v3 etc. change ...) so we don't have to review this again and again. M ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 3/3] mx28evk: Add initial support for MX28EVK board
Add initial support for Freescale MX28EVK board. Tested boot via SD card and by loading a kernel via TFTP through the FEC interface. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- 1) Do you use the DRAM init data used by DENX boards ? diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h new file mode 100644 index 000..40b64bf --- /dev/null +++ b/include/configs/mx28evk.h @@ -0,0 +1,172 @@ +/* + * Copyright (C) 2011 Marek Vasut marek.va...@gmail.com + * on behalf of DENX Software Engineering GmbH Please recheck these ;-) + * + * 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. + */ +#ifndef __CONFIG_H +#define __CONFIG_H + +#include asm/arch/regs-base.h + +/* + * SoC configurations + */ +#define CONFIG_MX28 /* i.MX28 SoC */ +#define CONFIG_MXS_GPIO /* GPIO control */ +#define CONFIG_SYS_HZ 1000/* Ticks per second */ + +#define CONFIG_MACH_TYPE MACH_TYPE_MX28EVK + +#define CONFIG_SYS_NO_FLASH +#define CONFIG_SYS_ICACHE_OFF +#define CONFIG_SYS_DCACHE_OFF +#define CONFIG_BOARD_EARLY_INIT_F +#define CONFIG_ARCH_CPU_INIT +#define CONFIG_ARCH_MISC_INIT + +/* + * SPL + */ +#define CONFIG_SPL +#define CONFIG_SPL_NO_CPU_SUPPORT_CODE +#define CONFIG_SPL_START_S_PATH arch/arm/cpu/arm926ejs/mx28 +#define CONFIG_SPL_LDSCRIPT arch/arm/cpu/arm926ejs/mx28/u-boot-spl.lds +#define CONFIG_SPL_LIBCOMMON_SUPPORT +#define CONFIG_SPL_LIBGENERIC_SUPPORT + +/* + * U-Boot Commands + */ +#include config_cmd_default.h +#define CONFIG_DISPLAY_CPUINFO +#define CONFIG_DOS_PARTITION +#define CONFIG_CMD_FAT + +#define CONFIG_CMD_CACHE +#define CONFIG_CMD_DHCP +#define CONFIG_CMD_GPIO +#define CONFIG_CMD_MII +#define CONFIG_CMD_MMC +#define CONFIG_CMD_NET +#define CONFIG_CMD_NFS +#define CONFIG_CMD_PING + +/* + * Memory configurations + */ +#define CONFIG_NR_DRAM_BANKS1 /* 1 bank of DRAM */ +#define PHYS_SDRAM_10x4000 /* Base address */ +#define PHYS_SDRAM_1_SIZE 0x4000 /* Max 1 GB RAM */ +#define CONFIG_STACKSIZE(128 * 1024)/* 128 KB stack */ +#define CONFIG_SYS_MALLOC_LEN 0x0040 /* 4 MB for malloc */ +#define CONFIG_SYS_MEMTEST_START0x4000 /* Memtest start adr */ +#define CONFIG_SYS_MEMTEST_END 0x4040 /* 4 MB RAM test */ +#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 +/* Point initial SP in SRAM so SPL can use it too. */ + +#define CONFIG_SYS_INIT_RAM_ADDR 0x2000 +#define CONFIG_SYS_INIT_RAM_SIZE (128 * 1024) + +#define CONFIG_SYS_INIT_SP_OFFSET \ + (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) +#define CONFIG_SYS_INIT_SP_ADDR \ + (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) + +/* + * We need to sacrifice first 4 bytes of RAM here to avoid triggering some + * strange BUG in ROM corrupting first 4 bytes of RAM when loading U-Boot + * binary. In case there was more of this mess, 0x100 bytes are skipped. + */ +#define CONFIG_SYS_TEXT_BASE0x4100 + +#define CONFIG_ENV_OVERWRITE +/* + * U-Boot general configurations + */ +#define CONFIG_SYS_LONGHELP +#define CONFIG_SYS_PROMPT MX28EVK U-Boot +#define CONFIG_SYS_CBSIZE 1024/* Console I/O buffer size */ +#define CONFIG_SYS_PBSIZE \ + (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) + /* Print buffer size */ +#define CONFIG_SYS_MAXARGS 32 /* Max number of command args */ +#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE + /* Boot argument buffer size */ +#define CONFIG_VERSION_VARIABLE /* U-BOOT version */ +#define CONFIG_AUTO_COMPLETE/* Command auto complete */ +#define CONFIG_CMDLINE_EDITING /* Command history etc */ +#define CONFIG_SYS_HUSH_PARSER +#define CONFIG_SYS_PROMPT_HUSH_PS2 + +/* + * Serial Driver + */ +#define CONFIG_PL011_SERIAL +#define CONFIG_PL011_CLOCK 2400 +#define CONFIG_PL01x_PORTS { (void *)MXS_UARTDBG_BASE }
Re: [U-Boot] [PATCH 5/5 v2] mtd/nand: workaround for Freescale FCM to support 4k pagesize Nand chip
On 12/15/2011 04:53 AM, Liu Shengzhou-B36685 wrote: -Original Message- From: Wood Scott-B07421 Sent: Tuesday, December 13, 2011 4:14 AM To: Liu Shengzhou-B36685 Cc: u-boot@lists.denx.de; Gala Kumar-B11780; Liu Shuo-B35362 Subject: Re: [PATCH 5/5 v2] mtd/nand: workaround for Freescale FCM to support 4k pagesize Nand chip + nand-ecc.layout = (priv-fmr FMR_ECCM) ? +fsl_elbc_oob_lp_eccm1 : fsl_elbc_oob_lp_eccm0; + nand-badblock_pattern = largepage_memorybased; Those oob layouts won't be quite right for larger page sizes. -Scott [Shengzhou] It's the same with what Linux does. What's the right? I think we need to explicitly define 4096 and 8192 variants, with the extra eccpos/oobfree. Or generate them programatically. -Scott [Shengzhou] You mean we should define something like below? static struct nand_ecclayout fsl_elbc_oob_lp_4k_eccm0 = { .eccbytes = 24, .eccpos = {6, 7, 8, 22, 23, 24, 38, 39, 40, 54, 55, 56, 70, 71, 72, 86, 87, 88, 102, 103, 104, 118, 119, 120}, .oobfree = { {1, 5}, {9, 13}, {25, 13}, {41, 13}, {57, 7},.. }, }; static struct nand_ecclayout fsl_elbc_oob_lp_8k_eccm0 = {}; Yes. eLBC RM says: ECC is checked/calculated over 512-Byte blocks. A 24-bit ECC is assigned to spare region bytes at offsets (N × 16) + 6 through (N × 16) + 8 for spare region N, N = 0–3. (for ECCM=0 case) Here RM just says N is 0–3, but it should be 0-7 for 4096 case, Well, yes, this is a hack to do things that the hardware doesn't officially support. hardware ECC doesn't generate ECC in position of N=4,5,6,7. It will. It just thinks that N=0,1,2,3. fsl_elbc_oob_lp_eccm0 and fsl_elbc_oob_lp_eccm1 are controller-associated, not device-associated, Then why do we have separate small and large page versions? I think we don't need define 4096 and 8192 variants, it's emulating 4096/8192 case by the existing 2K layout of fsl_elbc_oob_lp_eccm0 and fsl_elbc_oob_lp_eccm1. Please correct me if any wrong understanding. It's supporting 4096/8192 by repeating the 2048 layout multiple times. This repetition is not captured by the existing nand_ecclayout. -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 1/3] mx28: Let imx_get_mac_from_fuse be common for mx28
On 15/12/2011 17:34, Fabio Estevam wrote: Let imx_get_mac_from_fuse function be a common function, so that other mx28 boards can reuse it. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- Hi Fabio, + if (mx28_wait_mask_clr(ocotp_regs-hw_ocotp_ctrl_reg, OCOTP_CTRL_BUSY, + MXS_OCOTP_MAX_TIMEOUT)) { + puts(MXS FEC: Can't get MAC from OCOTP\n); + return; + } + + data = readl(ocotp_regs-hw_ocotp_cust0); + + mac[0] = 0x00; + mac[1] = 0x04; Maybe it is worth to add a comment to explain that the magic numbers 0x00 - 0x04 are the Freescale's vendor prefix. 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 00/18 V2] CHECKPATCH: fpgadata.c cleanup
Hi Marek, On 15.12.2011 16:17, Marek Vasut wrote: Hi Marek, On Thu, 15 Dec 2011 14:26:41 +0100 Marek Vasut marek.va...@gmail.com wrote: ... 18 files changed, 63874 insertions(+), 31942 deletions(-) V2: Align to 8 bytes per line. Cc: Anatolij Gustschin ag...@denx.de Cc: Stefano Babic sba...@denx.de Anatolij, Stefano, can you skim through these and give me your ACK so I can push them through staging ? Still, there is around three thousand files that don't conform to checkpatch style. I'll look at these patches. Yes, some video drivers files are on my checkpatch cleanup TODO list. Well I can share the complete list of files that fail checkpatch. I ran checkpatch -f on the whole tree (.c and .h files) a few days ago :-) It ran for 5+ hours ;-) http://marex.hackndev.com/fail-list.txt This is after applying these two patchsets (logo and fpga) and partly cleaning up board/esd/) btw. let's queue these (both logo and fpga) patches for -next please. They are not urgent and I'd like to see my stats for this release not tainted by this patchbomb. Also, I'll share the partial cleanup of ESD boards if Matthias/Stefan is interested. I checked how arch/arm is also broken and me being mostly ARM guy, I'd like to continue cleaning up there. I would do that clean up by myself for the esd files. As long as we do not have a strict timeline for this, I will see if I could start with that in January. I will also check if we could get rid of some boards that are not active anymore. Hi Matthias, ping me when you're ready to start working on it. I might be done by that time even ... I just wrote a script to cleanup basic problems :-) M ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 00/18 V2] CHECKPATCH: fpgadata.c cleanup
On Thursday 15 December 2011 16:17:06 Marek Vasut wrote: Well I can share the complete list of files that fail checkpatch. I ran checkpatch -f on the whole tree (.c and .h files) a few days ago :-) It ran for 5+ hours ;-) http://marex.hackndev.com/fail-list.txt This is after applying these two patchsets (logo and fpga) and partly cleaning up board/esd/) btw. let's queue these (both logo and fpga) patches for -next please. They are not urgent and I'd like to see my stats for this release not tainted by this patchbomb. Okay. If nobody objects I'll queue these patches up in u-boot-ppc4xx/next in the next few days. Thanks! M ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC] Add 'led' command
I hope I'm not too far off from understanding the comments made at the end of this thread... On Wed, Dec 14, 2011 at 4:31 PM, Simon Glass s...@chromium.org wrote: Hi, On Wed, Dec 14, 2011 at 11:38 AM, Ulf Samuelsson ulf_samuels...@telia.com wrote: On 2011-12-14 20:11, Simon Glass wrote: Hi, On Tue, Dec 13, 2011 at 3:55 PM, Ulf Samuelsson ulf_samuels...@telia.com wrote: On 2010-11-05 13:21, Wolfgang Denk wrote: Dear Jason Kridner, In message1288936236-30603-1-git-send-email-jkrid...@beagleboard.org you wrote: It is desired to have the led command on the BeagleBoard to allow for some interaction in the scripts. This patch allows any board implementing the coloured LED API to control the LEDs from the console. led [green | yellow | red | all ] [ on | off ] or led [ 1 | 2 | 3 | all ] [ on | off ] Adds configuration item CONFIG_CMD_LED enabling the command. Partially based on patch from Ulf Samuelsson: http://www.mail-archive.com/u-boot@lists.denx.de/msg09593.html. Signed-off-by: Jason Kridnerjkrid...@beagleboard.org --- common/Makefile | 1 + common/cmd_led.c | 207 ++ 2 files changed, 208 insertions(+), 0 deletions(-) create mode 100644 common/cmd_led.c I understand the requirement, but I think it is more than time to come up with a common solution here instead of adding more and more copies of very similar code. We already have: arch/arm/cpu/arm920t/ep93xx/led.c The file below is mapping the led commands I.E: red_led_on to at91 I/O calls like at91_set_gpio_value. A merge, means that a common way of setting GPIO must be available arch/arm/cpu/arm926ejs/at91/led.c The only thing the files below do are to initialize the pins for the LED. While the actual pins are hidden in the configs, you have a variation of which LEDs are available. Also you need to enable different clocks. It is really an extension of the board init file. Maybe they should be merged with the board file instead. I personally don't see a problem with keeping the separate file. There is no commonality between these files and the led.c in arch/arm/cpu/arm926ejs/at91/led.c board/atmel/at91cap9adk/led.c board/atmel/at91rm9200dk/led.c board/atmel/at91rm9200ek/led.c board/atmel/at91sam9260ek/led.c board/atmel/at91sam9261ek/led.c board/atmel/at91sam9263ek/led.c board/atmel/at91sam9m10g45ek/led.c board/atmel/at91sam9rlek/led.c board/ronetix/pm9261/led.c board/ronetix/pm9263/led.c board/eukrea/cpu9260/led.c board/logicpd/zoom2/led.c board/ns9750dev/led.c board/psyent/pk1c20/led.c Please, let's unify these. Best regards, Wolfgang Denk The proposed patch is adding a command, and which uses the coloured LED interface and there is no commonality between this code and the code in the board and cpu directories. IMO this LED interface is not very nice. Is there a reason there is not just one function? Perhaps like: enum led_colour { LED_GREEN, LED_YELLOW, LED_RED, LED_BLUE, }; void led_init(void); /** * Set the state of a coloured LED * * @param led LED to adjust * @param on 1 to turn it on, 0 to turn it off */ void led_set_state(enum led_colour led, int on); The concept of selecting an LED by color seems broken to me. Boards may have many LEDs of the same color. There is value in having additional meta-data regarding an LED, such as its color, location, silk-screen text or anticipated use. It seems to me all of that should be ancillary to the index of the LED. The information to control the LED, such as the GPIO pin or associated register, could further be stored in the data structure associated with an LED index. The only reason I implemented a function with the existing API was that the API was established across several platforms. Trying to find time to dedicate to cleaning up those several implementations without having any of the hardware (meaning lots of communications to other folks rather than just making the code work) is difficult, but I'm happy to contribute code fragments/patches if there is interest. My approach would be to provide an array of structures to the command that is initialized by the board file that contains the meta data for the LED and pointers to the functions that perform the required manipulation. Default functions would be the platform GPIO functions. The array would also have the required arguments for those manipulation functions, ie. the pin numbers to pass to the GPIO functions. The base definition is the easy part. The hard part is following up with all of the platforms and still making sure that the super-simple assembly functions can work efficiently. instead of: extern void coloured_LED_init (void); extern void red_LED_on(void); extern void red_LED_off(void); extern void
Re: [U-Boot] [PATCH v2] ARMV7: Add support For Logic OMAP35x/DM37x modules
On Thu, Dec 15, 2011 at 10:15 AM, Peter Barada peter.bar...@logicpd.com wrote: This patch adds basic support for OMAP35x/DM37x SOM LV/Torpedo reference boards. It assumes U-boot is loaded to SDRAM with the help of another small bootloader (x-load) running from SRAM. #if 0'd code isn't allowed for merging so I assume this is an RFC :) + /* Let it soak for a bit */ + for (i = 0; i 0x100; ++i) + asm(nop); Can we just use a sdelay(...) here? And in the whole function you haven't addressed Igor's comment (unless it's incoming and I just haven't gotten the email yet) about this just being checkboard(). +/* GPMC CS1 settings for Logic SOM LV/Torpedo LAN92xx Ethernet chip */ +#define LOGIC_NET_GPMC_CONFIG1 0x1000 +#define LOGIC_NET_GPMC_CONFIG2 0x00080801 +#define LOGIC_NET_GPMC_CONFIG3 0x +#define LOGIC_NET_GPMC_CONFIG4 0x08010801 +#define LOGIC_NET_GPMC_CONFIG5 0x00080a0a +#define LOGIC_NET_GPMC_CONFIG6 0x03000280 +#define LOGIC_NET_GPMC_CONFIG7 0x0848 + +/* + * Routine: setup_net_chip + * Description: Setting up the configuration GPMC registers specific to the + * Ethernet hardware. + */ +static void setup_net_chip(void) +{ + struct ctrl *ctrl_base = (struct ctrl *)OMAP34XX_CTRL_BASE; + + /* Configure GPMC registers */ + writel(LOGIC_NET_GPMC_CONFIG1, gpmc_cfg-cs[1].config1); + writel(LOGIC_NET_GPMC_CONFIG2, gpmc_cfg-cs[1].config2); + writel(LOGIC_NET_GPMC_CONFIG3, gpmc_cfg-cs[1].config3); + writel(LOGIC_NET_GPMC_CONFIG4, gpmc_cfg-cs[1].config4); + writel(LOGIC_NET_GPMC_CONFIG5, gpmc_cfg-cs[1].config5); + writel(LOGIC_NET_GPMC_CONFIG6, gpmc_cfg-cs[1].config6); + writel(LOGIC_NET_GPMC_CONFIG7, gpmc_cfg-cs[1].config7); + + /* Enable off mode for NWE in PADCONF_GPMC_NWE register */ + writew(readw(ctrl_base-gpmc_nwe) | 0x0E00, ctrl_base-gpmc_nwe); + /* Enable off mode for NOE in PADCONF_GPMC_NADV_ALE register */ + writew(readw(ctrl_base-gpmc_noe) | 0x0E00, ctrl_base-gpmc_noe); + /* Enable off mode for ALE in PADCONF_GPMC_NADV_ALE register */ + writew(readw(ctrl_base-gpmc_nadv_ale) | 0x0E00, + ctrl_base-gpmc_nadv_ale); + +} Or this just being an enable_gpmc_cs_config call. +int misc_init_r(void) +{ + + dieid_num_r(); + + return 0; +} Extra whitespace. I think checkpatch.pl will catch this so please run your patch through checkpatch.pl, roughly like this: $ git format-patch -1 $ ./tools/checkpatch.pl 0001-whatever-its-called.patch [snip] +#define CONFIG_L2_OFF /* Keep L2 Cache Disabled */ Why do we want to do this? [snip] +#define CONFIG_SYS_MAXARGS 64 /* max number of command args */ This is very very large and probably doesn't need to be. This is the number of arguments to the u-boot commands, not to the linux kernel. Thanks. -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] overo: add SPL support
On Thu, Dec 15, 2011 at 7:34 AM, Andreas Müller schnitzelt...@gmx.de wrote: On Wednesday, December 14, 2011 06:24:13 PM Steve Sakoman wrote: I think you will also need to update the get_board_revision function to ensure that SPL works with very early Overo revisions. Note this excerpt from the X-loader get_board_revision funtion: /* board revisions = R2410 connect 4030 irq_1 to gpio112 */ /* these boards should return a revision number of 0 */ /* the code below forces a 4030 RTC irq to ensure that gpio112 is low */ #ifdef CONFIG_DRIVER_OMAP34XX_I2C i2c_init(CFG_I2C_SPEED, CFG_I2C_SLAVE); data = 0x01; i2c_write(0x4B, 0x29, 1, data, 1); data = 0x0c; i2c_write(0x4B, 0x2b, 1, data, 1); i2c_read(0x4B, 0x2a, 1, data, 1); #endif Yup, ugly, but this is the only way to detect revision properly on those boards. I tried the following (as you can see I already commented out the i2c-read-write for test): int get_board_revision(void) { #ifdef CONFIG_DRIVER_OMAP34XX_I2C i2c_set_bus_num(TWL4030_I2C_BUS); /*data = 0x01; i2c_write(0x4B, 0x29, 1, data, 1); data = 0x0c; i2c_write(0x4B, 0x2b, 1, data, 1); i2c_read(0x4B, 0x2a, 1, data, 1);*/ #endif } SPL Boot process hangs on i2c_set_bus_num ( tested by removing i2c_set_bus_num - proper operation ) with console freeze: | U-Boot SPL 2011.12-rc1-4-g06e42c6-dirty (Dec 15 2011 - 14:03:34) | Texas Instruments Revision detection unimplemented The call stack for get_board_revision() is for SPL s_init() mem_init() do_sdrc_init(..) get_board_mem_timings(..) get_board_revision(..) It seems that the call to i2c_set_bus_num comes too early. Before I dive into x- loader analysis: Has anybody an idea what goes wrong? Without digging too hard into overo stuff, we've only called i2c_init() on the main bus and the x-load snippet is on the slave bus. -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH/RFC] fix several printf() modifiers
On Thursday 15 December 2011 03:30:37 Andreas Bießmann wrote: On 15.12.2011 06:35, Mike Frysinger wrote: On Wednesday 14 December 2011 05:04:07 Andreas Bießmann wrote: --- a/arch/avr32/cpu/at32ap700x/mmu.c +++ b/arch/avr32/cpu/at32ap700x/mmu.c - printf(VMR table @ 0x%08x\n, vmr_table_addr); + printf(VMR table @ %#lx\n, vmr_table_addr); this isn't the same. probably should be %08lx. You are right, but as you may know the memory map for at32ap7000 has its SDRAM physically at 0x1000. Therefore the result will be the same for 0x%08lx and %#lx (in all currently available boards). i don't know anything about AVR32 ;) But maybe one will locate the vmr_table sometimes in SRAM some day? seems safer, although probably unlikely as i think the AVR32 is pretty much dead nowadays ? -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 00/18 V2] CHECKPATCH: fpgadata.c cleanup
On Thursday 15 December 2011 08:26:41 Marek Vasut wrote: First of the CHECKPATCH series of patches with per-file checkpatch fixes. This series fixes all files fpgadata.c, which contains PPC FPGA firmwares. There are no functional changes, only CHECKPATCH fixes. i don't really see any point in touching the fpgadata.c files. they're clearly generated files and not meant to be read at all let alone modified after the fact ... of course, i'd wonder what created these in the first place, and apply any style tastes to that tool and then regenerate the result ... -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 0/7] CHECKPATCH: Cleanup LCD logo files
On Thursday 15 December 2011 08:45:48 Marek Vasut wrote: This series fixes the logo files by aligning them to 8 bytes per line and fixing subsequent CHECKPATCH issues. same comment as fpgadata.c ... would make more sense to find/update the tool creating these files rather than hand modifying things that are clearly generated output and would get blown away by subsequent updates to the source material (i.e. image). -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] AES128 in U-Boot
On Thursday 15 December 2011 02:30:40 Simon Glass wrote: I am wanting to add an AES encryption library to U-Boot. I suppose it should be written in C, with small compiled code/data size (rather than high performance), GPL and fairly easy to read. just has to be GPL compatible as Matthias already said, libtomcrypt would probably be a good starting point. after that, it'd be see if the BSD's have done anything. -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] about flashing the u-boot
On 12/14/2011 09:01 PM, Aggrwal Poonam-B10812 wrote: -Original Message- From: u-boot-boun...@lists.denx.de [mailto:u-boot-boun...@lists.denx.de] On Behalf Of Érico Porto Sent: Thursday, December 15, 2011 8:14 AM To: u-boot@lists.denx.de Subject: Re: [U-Boot] about flashing the u-boot Got a USB TAP, but unfortunately it is supposed to be used with Code Warrior. Any software that allows me to use it to flash a ppc? Érico V. Porto On Wed, Dec 14, 2011 at 2:10 PM, Érico Porto ericoporto2...@gmail.comwrote: Hello! Is it possible to flash a ppc board, that already has an older u-boot version, without using a jtag interface? I mean, I know I can write the filesystem using tftpboot, is it possible to also use it to write over u-boot? If no, is there any alternative to use jtag? You can use tftp to reflash the bootloader onto the ppc board. Just be aware that if the new image doesn't work, you'll need jtag (or an alternative boot source such as NAND) to recover. -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] net/fm: check the old and new Fman microcode locations in NOR flash
On Dec 14, 2011, at 4:34 PM, Timur Tabi wrote: On some Freescale reference boards for SOCs with Fman devices, the Fman microcode is located at address 0xEF00 in NOR flash. Unfortunately, this address is in the middle of nowhere and makes it difficult to partition flash space for other images. So we change the expected address to 0xEFF4, which is the flash sector adjacent to the environment. To support older boards, we use macro CONFIG_SYS_QE_FMAN_FW_ADDR_OLD to look for the microcode in the old location if it cannot be found in the new one. The code which uploads the microcode checks the new default location, and if the microcode is not found, then it checks the old location. This allows newer U-Boots to work on older boards. However, during boot, the error messages are a bit confusing: Net: Fman1: Data at eff4 is not a firmware Fman1: Uploading microcode version 101.8.0 Fman2: Data at eff4 is not a firmware Fman2: Uploading microcode version 101.8.0 Signed-off-by: Timur Tabi ti...@freescale.com --- drivers/net/fm/fm.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) I see no reason for this patch, if you're flashing a new u-boot flash the microcode to the new address as well. Don't we already have a warning if we don't find the ucode at the expected address. - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] net/fm: check the old and new Fman microcode locations in NOR flash
Kumar Gala wrote: I see no reason for this patch, if you're flashing a new u-boot flash the microcode to the new address as well. This is useful for people who have not moved the microcode. Are we going to ensure that everyone who updates U-Boot will also move their microcode to the new location? We can always revert this patch after everyone has migrated, if that's really necessary. You know as well as I do that if don't provide backwards compatibility, someone is going to break and won't know why. Don't we already have a warning if we don't find the ucode at the expected address. No. The warning just says that microcode is invalid, not that that it's at the wrong address. -- Timur Tabi Linux kernel developer at Freescale ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] net/fm: check the old and new Fman microcode locations in NOR flash
On Dec 15, 2011, at 2:09 PM, Timur Tabi wrote: Kumar Gala wrote: I see no reason for this patch, if you're flashing a new u-boot flash the microcode to the new address as well. This is useful for people who have not moved the microcode. Are we going to ensure that everyone who updates U-Boot will also move their microcode to the new location? We can always revert this patch after everyone has migrated, if that's really necessary. You know as well as I do that if don't provide backwards compatibility, someone is going to break and won't know why. Sure, but they'll get the message about invalid ucode. It will be easy to debug. At some point they're going to have to flash ucode to the new address. I see no reason to delay that. Don't we already have a warning if we don't find the ucode at the expected address. No. The warning just says that microcode is invalid, not that that it's at the wrong address. Invalid is sufficient to say you need to check the ucode at the address its being attempted to be loaded from. - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] AT91: pio: Add PIO3 features
Hi, 2011/11/16 Hong Xu hong...@atmel.com: This patch adds the support for new PIO controller introduced by some AT91 SoCs. New features include * More peripheral multiplexing * Pull-down, Schmitt trigger, Debouncer * More irq trigger mode (may be not interesting in U-Boot) Signed-off-by: Hong Xu hong...@atmel.com Maybe this helps getting this patch rolling again: Acked-by: Remy Bohmer li...@bohmer.net Kind regards, Remy ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 1/3] mx28: Let imx_get_mac_from_fuse be common for mx28
Let imx_get_mac_from_fuse function be a common function, so that other mx28 boards can reuse it. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- Change since v3: - Add a note about the first two MAC addresses being from Freescale vendor. arch/arm/cpu/arm926ejs/mx28/mx28.c | 41 arch/arm/include/asm/arch-mx28/sys_proto.h |2 + board/denx/m28evk/m28evk.c | 35 --- 3 files changed, 43 insertions(+), 35 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/mx28/mx28.c b/arch/arm/cpu/arm926ejs/mx28/mx28.c index 088c019..d82bb01 100644 --- a/arch/arm/cpu/arm926ejs/mx28/mx28.c +++ b/arch/arm/cpu/arm926ejs/mx28/mx28.c @@ -214,6 +214,47 @@ int cpu_eth_init(bd_t *bis) } #endif +#ifdef CONFIG_MX28_FEC_MAC_IN_OCOTP + +#defineMXS_OCOTP_MAX_TIMEOUT 100 +void imx_get_mac_from_fuse(char *mac) +{ + struct mx28_ocotp_regs *ocotp_regs = + (struct mx28_ocotp_regs *)MXS_OCOTP_BASE; + uint32_t data; + + memset(mac, 0, 6); + + writel(OCOTP_CTRL_RD_BANK_OPEN, ocotp_regs-hw_ocotp_ctrl_set); + + if (mx28_wait_mask_clr(ocotp_regs-hw_ocotp_ctrl_reg, OCOTP_CTRL_BUSY, + MXS_OCOTP_MAX_TIMEOUT)) { + puts(MXS FEC: Can't get MAC from OCOTP\n); + return; + } + + data = readl(ocotp_regs-hw_ocotp_cust0); + + mac[0] = 0x00; + mac[1] = 0x04; + /* +* Note: +* +* These first two bytes are Freescale's vendor MAC prefix. +* +*/ + mac[2] = (data 24) 0xff; + mac[3] = (data 16) 0xff; + mac[4] = (data 8) 0xff; + mac[5] = data 0xff; +} +#else +void imx_get_mac_from_fuse(char *mac) +{ + memset(mac, 0, 6); +} +#endif + U_BOOT_CMD( clocks, CONFIG_SYS_MAXARGS, 1, do_mx28_showclocks, display clocks, diff --git a/arch/arm/include/asm/arch-mx28/sys_proto.h b/arch/arm/include/asm/arch-mx28/sys_proto.h index be1f7db..cf5ab16 100644 --- a/arch/arm/include/asm/arch-mx28/sys_proto.h +++ b/arch/arm/include/asm/arch-mx28/sys_proto.h @@ -35,4 +35,6 @@ void mx28_common_spl_init(const iomux_cfg_t *iomux_setup, const unsigned int iomux_size); #endif +void imx_get_mac_from_fuse(char *mac); + #endif /* __MX28_H__ */ diff --git a/board/denx/m28evk/m28evk.c b/board/denx/m28evk/m28evk.c index fcee046..005446a 100644 --- a/board/denx/m28evk/m28evk.c +++ b/board/denx/m28evk/m28evk.c @@ -178,39 +178,4 @@ int board_eth_init(bd_t *bis) return ret; } -#ifdef CONFIG_M28_FEC_MAC_IN_OCOTP - -#defineMXS_OCOTP_MAX_TIMEOUT 100 -void imx_get_mac_from_fuse(char *mac) -{ - struct mx28_ocotp_regs *ocotp_regs = - (struct mx28_ocotp_regs *)MXS_OCOTP_BASE; - uint32_t data; - - memset(mac, 0, 6); - - writel(OCOTP_CTRL_RD_BANK_OPEN, ocotp_regs-hw_ocotp_ctrl_set); - - if (mx28_wait_mask_clr(ocotp_regs-hw_ocotp_ctrl_reg, OCOTP_CTRL_BUSY, - MXS_OCOTP_MAX_TIMEOUT)) { - printf(MXS FEC: Can't get MAC from OCOTP\n); - return; - } - - data = readl(ocotp_regs-hw_ocotp_cust0); - - mac[0] = 0x00; - mac[1] = 0x04; - mac[2] = (data 24) 0xff; - mac[3] = (data 16) 0xff; - mac[4] = (data 8) 0xff; - mac[5] = data 0xff; -} -#else -void imx_get_mac_from_fuse(char *mac) -{ - memset(mac, 0, 6); -} -#endif - #endif -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 2/3] mx28: Let dram_init be common for mx28
Let dram_init function be a common function, so that other mx28 boards can reuse it. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- Changes since v3: - Rename dram_init to mx28_dram_init arch/arm/cpu/arm926ejs/mx28/mx28.c | 21 + arch/arm/include/asm/arch-mx28/sys_proto.h |1 + board/denx/m28evk/m28evk.c | 21 - 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/mx28/mx28.c b/arch/arm/cpu/arm926ejs/mx28/mx28.c index d82bb01..76b2876 100644 --- a/arch/arm/cpu/arm926ejs/mx28/mx28.c +++ b/arch/arm/cpu/arm926ejs/mx28/mx28.c @@ -255,6 +255,27 @@ void imx_get_mac_from_fuse(char *mac) } #endif +#defineHW_DIGCTRL_SCRATCH0 0x8001c280 +#defineHW_DIGCTRL_SCRATCH1 0x8001c290 +int mx28_dram_init(void) +{ + uint32_t sz[2]; + + sz[0] = readl(HW_DIGCTRL_SCRATCH0); + sz[1] = readl(HW_DIGCTRL_SCRATCH1); + + if (sz[0] != sz[1]) { + puts(MX28:\n + Error, the RAM size in HW_DIGCTRL_SCRATCH0 and\n + HW_DIGCTRL_SCRATCH1 is not the same. Please\n + verify these two registers contain valid RAM size\n); + hang(); + } + + gd-ram_size = sz[0]; + return 0; +} + U_BOOT_CMD( clocks, CONFIG_SYS_MAXARGS, 1, do_mx28_showclocks, display clocks, diff --git a/arch/arm/include/asm/arch-mx28/sys_proto.h b/arch/arm/include/asm/arch-mx28/sys_proto.h index cf5ab16..411173e 100644 --- a/arch/arm/include/asm/arch-mx28/sys_proto.h +++ b/arch/arm/include/asm/arch-mx28/sys_proto.h @@ -36,5 +36,6 @@ void mx28_common_spl_init(const iomux_cfg_t *iomux_setup, #endif void imx_get_mac_from_fuse(char *mac); +int mx28_dram_init(void); #endif /* __MX28_H__ */ diff --git a/board/denx/m28evk/m28evk.c b/board/denx/m28evk/m28evk.c index 005446a..d6a2a50 100644 --- a/board/denx/m28evk/m28evk.c +++ b/board/denx/m28evk/m28evk.c @@ -70,27 +70,6 @@ int board_init(void) return 0; } -#defineHW_DIGCTRL_SCRATCH0 0x8001c280 -#defineHW_DIGCTRL_SCRATCH1 0x8001c290 -int dram_init(void) -{ - uint32_t sz[2]; - - sz[0] = readl(HW_DIGCTRL_SCRATCH0); - sz[1] = readl(HW_DIGCTRL_SCRATCH1); - - if (sz[0] != sz[1]) { - printf(MX28:\n - Error, the RAM size in HW_DIGCTRL_SCRATCH0 and\n - HW_DIGCTRL_SCRATCH1 is not the same. Please\n - verify these two registers contain valid RAM size!\n); - hang(); - } - - gd-ram_size = sz[0]; - return 0; -} - #ifdef CONFIG_CMD_MMC static int m28_mmc_wp(int id) { -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 3/3] mx28evk: Add initial support for MX28EVK board
Add initial support for Freescale MX28EVK board. Tested boot via SD card and by loading a kernel via TFTP through the FEC interface. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- - For correct operation of saving environment variables into the SD card, the following patch is needed: http://lists.denx.de/pipermail/u-boot/2011-November/111448.html Changes since v3: - Fix Copyright in mx28evk.h - Call mx28_dram_init from dram_init Changes since v2: - Generate the patch again due to error in applying unrelated changes Changes since v1: - Read the MAC from fuses - Use tabs instead of space in u-boot.bd - Use puts instead of print - Factor out mac reading function - Factor out ddr size calculation function - Use GENERATED_GBL_DATA_SIZE - Protect CONFIG_ENV_IS_IN_MMC MAINTAINERS |1 + board/freescale/mx28evk/Makefile | 49 ++ board/freescale/mx28evk/iomux.c | 138 + board/freescale/mx28evk/mx28evk.c | 170 +++ board/freescale/mx28evk/u-boot.bd | 14 +++ boards.cfg|1 + include/configs/mx28evk.h | 176 + 7 files changed, 549 insertions(+), 0 deletions(-) create mode 100644 board/freescale/mx28evk/Makefile create mode 100644 board/freescale/mx28evk/iomux.c create mode 100644 board/freescale/mx28evk/mx28evk.c create mode 100644 board/freescale/mx28evk/u-boot.bd create mode 100644 include/configs/mx28evk.h diff --git a/MAINTAINERS b/MAINTAINERS index a56ca10..72e1089 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -639,6 +639,7 @@ Kristoffer Ericson kristoffer.eric...@gmail.com Fabio Estevam fabio.este...@freescale.com mx25pdk i.MX25 + mx28evk i.MX28 mx31pdk i.MX31 mx53ard i.MX53 mx53smd i.MX53 diff --git a/board/freescale/mx28evk/Makefile b/board/freescale/mx28evk/Makefile new file mode 100644 index 000..7459107 --- /dev/null +++ b/board/freescale/mx28evk/Makefile @@ -0,0 +1,49 @@ +# +# (C) Copyright 2000-2006 +# 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 + +ifndef CONFIG_SPL_BUILD +COBJS := mx28evk.o +else +COBJS := iomux.o +endif + +SRCS := $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) + +$(LIB):$(obj).depend $(OBJS) + $(call cmd_link_o_target, $(OBJS)) + +all: $(ALL) + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/board/freescale/mx28evk/iomux.c b/board/freescale/mx28evk/iomux.c new file mode 100644 index 000..904e3f3 --- /dev/null +++ b/board/freescale/mx28evk/iomux.c @@ -0,0 +1,138 @@ +/* + * Freescale MX28EVK IOMUX setup + * + * Copyright (C) 2011 Marek Vasut marek.va...@gmail.com + * on behalf of DENX Software Engineering GmbH + * + * 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. + */ + +#include common.h +#include config.h +#include asm/io.h +#include asm/arch/iomux-mx28.h +#include asm/arch/imx-regs.h +#include asm/arch/sys_proto.h + +#defineMUX_CONFIG_SSP0 (MXS_PAD_3V3 | MXS_PAD_8MA | MXS_PAD_PULLUP) +#defineMUX_CONFIG_ENET (MXS_PAD_3V3 | MXS_PAD_8MA | MXS_PAD_PULLUP) +#defineMUX_CONFIG_EMI (MXS_PAD_3V3 | MXS_PAD_12MA | MXS_PAD_NOPULL) + +const iomux_cfg_t iomux_setup[] = { + /* DUART */ + MX28_PAD_PWM0__DUART_RX, + MX28_PAD_PWM1__DUART_TX, + + /* MMC0 */
Re: [U-Boot] [PATCH v3 3/3] mx28evk: Add initial support for MX28EVK board
On Thu, Dec 15, 2011 at 3:25 PM, Marek Vasut marek.va...@gmail.com wrote: 1) Do you use the DRAM init data used by DENX boards ? Yes, same DDR settings. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3 1/2] net: add Calxeda xgmac driver
From: Rob Herring rob.herr...@calxeda.com This adds ethernet driver for Calxeda xgmac found on Highbank SOC. Signed-off-by: Rob Herring rob.herr...@calxeda.com --- v3: - whitespace fixes - move reset to .init function - fix calxedaxgmac_initialize return values - fix 2 build warnings v2: -Convert register base plus offset to struct -drop ethaddr env setting -drop valid mac address check README |3 + drivers/net/Makefile |1 + drivers/net/calxedaxgmac.c | 553 include/netdev.h |1 + 4 files changed, 558 insertions(+), 0 deletions(-) create mode 100644 drivers/net/calxedaxgmac.c diff --git a/README b/README index ff72e47..8434ebb 100644 --- a/README +++ b/README @@ -1020,6 +1020,9 @@ The following options need to be configured: If this defined, the driver is quiet. The driver doen't show link status messages. + CONFIG_CALXEDA_XGMAC + Support for the Calxeda XGMAC device + CONFIG_DRIVER_LAN91C96 Support for SMSC's LAN91C96 chips. diff --git a/drivers/net/Makefile b/drivers/net/Makefile index d3df82e..f4f7ea3 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -31,6 +31,7 @@ COBJS-$(CONFIG_ARMADA100_FEC) += armada100_fec.o COBJS-$(CONFIG_DRIVER_AT91EMAC) += at91_emac.o COBJS-$(CONFIG_DRIVER_AX88180) += ax88180.o COBJS-$(CONFIG_BFIN_MAC) += bfin_mac.o +COBJS-$(CONFIG_CALXEDA_XGMAC) += calxedaxgmac.o COBJS-$(CONFIG_CS8900) += cs8900.o COBJS-$(CONFIG_TULIP) += dc2114x.o COBJS-$(CONFIG_DESIGNWARE_ETH) += designware.o diff --git a/drivers/net/calxedaxgmac.c b/drivers/net/calxedaxgmac.c new file mode 100644 index 000..a2a20fd --- /dev/null +++ b/drivers/net/calxedaxgmac.c @@ -0,0 +1,553 @@ +/* + * Copyright 2010-2011 Calxeda, Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope 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, see http://www.gnu.org/licenses/. + */ +#include common.h +#include malloc.h +#include linux/err.h +#include asm/io.h + +#define TX_NUM_DESC1 +#define RX_NUM_DESC32 + +#define MAC_TIMEOUT(5*CONFIG_SYS_HZ) + +#define ETH_BUF_SZ 2048 +#define TX_BUF_SZ (ETH_BUF_SZ * TX_NUM_DESC) +#define RX_BUF_SZ (ETH_BUF_SZ * RX_NUM_DESC) + +#define RXSTART0x0002 +#define TXSTART0x2000 + +#define RXENABLE 0x0004 +#define TXENABLE 0x0008 + +#define XGMAC_CONTROL_SPD 0x4000 +#define XGMAC_CONTROL_SPD_MASK 0x6000 +#define XGMAC_CONTROL_SARC 0x1000 +#define XGMAC_CONTROL_SARK_MASK0x1800 +#define XGMAC_CONTROL_CAR 0x0400 +#define XGMAC_CONTROL_CAR_MASK 0x0600 +#define XGMAC_CONTROL_CAR_SHIFT25 +#define XGMAC_CONTROL_DP 0x0100 +#define XGMAC_CONTROL_WD 0x0080 +#define XGMAC_CONTROL_JD 0x0040 +#define XGMAC_CONTROL_JE 0x0010 +#define XGMAC_CONTROL_LM 0x1000 +#define XGMAC_CONTROL_IPC 0x0400 +#define XGMAC_CONTROL_ACS 0x0080 +#define XGMAC_CONTROL_DDIC 0x0010 +#define XGMAC_CONTROL_TE 0x0008 +#define XGMAC_CONTROL_RE 0x0004 + +#define XGMAC_DMA_BUSMODE_RESET0x0001 +#define XGMAC_DMA_BUSMODE_DSL 0x0004 +#define XGMAC_DMA_BUSMODE_DSL_MASK 0x007c +#define XGMAC_DMA_BUSMODE_DSL_SHIFT2 +#define XGMAC_DMA_BUSMODE_ATDS 0x0080 +#define XGMAC_DMA_BUSMODE_PBL_MASK 0x3f00 +#define XGMAC_DMA_BUSMODE_PBL_SHIFT8 +#define XGMAC_DMA_BUSMODE_FB 0x0001 +#define XGMAC_DMA_BUSMODE_USP 0x0080 +#define XGMAC_DMA_BUSMODE_8PBL 0x0100 +#define XGMAC_DMA_BUSMODE_AAL 0x0200 + +#define XGMAC_DMA_AXIMODE_ENLPI0x8000 +#define XGMAC_DMA_AXIMODE_MGK 0x4000 +#define XGMAC_DMA_AXIMODE_WROSR0x0010 +#define XGMAC_DMA_AXIMODE_WROSR_MASK 0x00F0 +#define XGMAC_DMA_AXIMODE_WROSR_SHIFT 20 +#define XGMAC_DMA_AXIMODE_RDOSR0x0001 +#define XGMAC_DMA_AXIMODE_RDOSR_MASK 0x000F +#define
[U-Boot] [PATCH v3 2/2] ARM: highbank: enable networking and pxe
From: Rob Herring rob.herr...@calxeda.com This enables the XGMAC ethernet driver and networking related config options. Signed-off-by: Jason Hobbs jason.ho...@calxeda.com Signed-off-by: Rob Herring rob.herr...@calxeda.com --- v3: - make board_eth_init return number of devices initialized v2: -drop CONFIG_NET_MULTI -drop leftover 'verify' env setting board/highbank/highbank.c | 12 include/configs/highbank.h | 18 -- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/board/highbank/highbank.c b/board/highbank/highbank.c index 8db8a2b..b0aa182 100644 --- a/board/highbank/highbank.c +++ b/board/highbank/highbank.c @@ -33,6 +33,18 @@ int board_init(void) return 0; } +/* We know all the init functions have been run now */ +int board_eth_init(bd_t *bis) +{ + int rc = 0; + +#ifdef CONFIG_CALXEDA_XGMAC + rc += calxedaxgmac_initialize(0, 0xfff5); + rc += calxedaxgmac_initialize(1, 0xfff51000); +#endif + return rc; +} + int misc_init_r(void) { ahci_init(0xffe08000); diff --git a/include/configs/highbank.h b/include/configs/highbank.h index 9c85788..5604733 100644 --- a/include/configs/highbank.h +++ b/include/configs/highbank.h @@ -51,19 +51,27 @@ #define CONFIG_DOS_PARTITION +#define CONFIG_CALXEDA_XGMAC + +/* PXE support */ +#define CONFIG_BOOTP_PXE +#define CONFIG_BOOTP_PXE_CLIENTARCH0x100 +#define CONFIG_BOOTP_VCI_STRINGU-boot.armv7.highbank + /* * Command line configuration. */ #include config_cmd_default.h -#undef CONFIG_CMD_NET -#undef CONFIG_CMD_NFS #define CONFIG_CMD_BDI +#define CONFIG_CMD_DHCP #define CONFIG_CMD_ELF #define CONFIG_CMD_MEMORY #define CONFIG_CMD_LOADS #define CONFIG_CMD_SCSI #define CONFIG_CMD_EXT2 +#define CONFIG_CMD_PXE +#define CONFIG_MENU #define CONFIG_BOOTDELAY 2 /* @@ -82,6 +90,12 @@ #define CONFIG_SYS_LOAD_ADDR 0x80 +#define CONFIG_EXTRA_ENV_SETTINGS \ + fdtaddr_r=0x60\0 \ + pxefile_addr_r=0x70\0 \ + kernel_addr_r=0x80\0 \ + ramdisk_addr_r=0x0100\0 \ + /*--- * Stack sizes * -- 1.7.5.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] USB: move keyboard polling from EHCI driver into kbd driver
From: Allen Martin amar...@nvidia.com This removes dependency on global variable new from EHCI driver with CONFIG_SYS_USB_EVENT_POLL turned on and gets USB keyboard working with EHCI driver again. Signed-off-by: Allen Martin amar...@nvidia.com --- common/usb_kbd.c| 18 +- drivers/usb/host/ehci-hcd.c | 30 -- 2 files changed, 17 insertions(+), 31 deletions(-) diff --git a/common/usb_kbd.c b/common/usb_kbd.c index 75107c9..e94bb7e 100644 --- a/common/usb_kbd.c +++ b/common/usb_kbd.c @@ -313,7 +313,23 @@ static int usb_kbd_irq(struct usb_device *dev) static inline void usb_kbd_poll_for_event(struct usb_device *dev) { #ifdefined(CONFIG_SYS_USB_EVENT_POLL) - usb_event_poll(); + struct usb_interface *iface; + struct usb_endpoint_descriptor *ep; + struct usb_kbd_pdata *data; + int pipe; + int maxp; + + /* Get the pointer to USB Keyboard device pointer */ + data = dev-privptr; + iface = dev-config.if_desc[0]; + ep = iface-ep_desc[0]; + pipe = usb_rcvintpipe(dev, ep-bEndpointAddress); + + /* Submit a interrupt transfer request */ + maxp = usb_maxpacket(dev, pipe); + usb_submit_int_msg(dev, pipe, data-new[0], + maxp 8 ? 8 : maxp, ep-bInterval); + usb_kbd_irq_worker(dev); #elif defined(CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP) struct usb_interface *iface; diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index db10316..94a5eed 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -26,10 +26,6 @@ #include asm/io.h #include malloc.h #include watchdog.h -#ifdef CONFIG_USB_KEYBOARD -#include stdio_dev.h -extern unsigned char new[]; -#endif #include ehci.h @@ -946,29 +942,3 @@ submit_int_msg(struct usb_device *dev, unsigned long pipe, void *buffer, return ehci_submit_async(dev, pipe, buffer, length, NULL); } -#ifdef CONFIG_SYS_USB_EVENT_POLL -/* - * This function polls for USB keyboard data. - */ -void usb_event_poll() -{ - struct stdio_dev *dev; - struct usb_device *usb_kbd_dev; - struct usb_interface *iface; - struct usb_endpoint_descriptor *ep; - int pipe; - int maxp; - - /* Get the pointer to USB Keyboard device pointer */ - dev = stdio_get_by_name(usbkbd); - usb_kbd_dev = (struct usb_device *)dev-priv; - iface = usb_kbd_dev-config.if_desc[0]; - ep = iface-ep_desc[0]; - pipe = usb_rcvintpipe(usb_kbd_dev, ep-bEndpointAddress); - - /* Submit a interrupt transfer request */ - maxp = usb_maxpacket(usb_kbd_dev, pipe); - usb_submit_int_msg(usb_kbd_dev, pipe, new[0], - maxp 8 ? 8 : maxp, ep-bInterval); -} -#endif /* CONFIG_SYS_USB_EVENT_POLL */ -- 1.7.5.4 --- This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. --- ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v5 1/3] mx28: Let imx_get_mac_from_fuse be common for mx28
Let imx_get_mac_from_fuse function be a common function, so that other mx28 boards can reuse it. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- Changes since v4: - No changes Change since v3: - Add a note about the first two MAC addresses being from Freescale vendor. arch/arm/cpu/arm926ejs/mx28/mx28.c | 41 arch/arm/include/asm/arch-mx28/sys_proto.h |2 + board/denx/m28evk/m28evk.c | 35 --- 3 files changed, 43 insertions(+), 35 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/mx28/mx28.c b/arch/arm/cpu/arm926ejs/mx28/mx28.c index 088c019..d82bb01 100644 --- a/arch/arm/cpu/arm926ejs/mx28/mx28.c +++ b/arch/arm/cpu/arm926ejs/mx28/mx28.c @@ -214,6 +214,47 @@ int cpu_eth_init(bd_t *bis) } #endif +#ifdef CONFIG_MX28_FEC_MAC_IN_OCOTP + +#defineMXS_OCOTP_MAX_TIMEOUT 100 +void imx_get_mac_from_fuse(char *mac) +{ + struct mx28_ocotp_regs *ocotp_regs = + (struct mx28_ocotp_regs *)MXS_OCOTP_BASE; + uint32_t data; + + memset(mac, 0, 6); + + writel(OCOTP_CTRL_RD_BANK_OPEN, ocotp_regs-hw_ocotp_ctrl_set); + + if (mx28_wait_mask_clr(ocotp_regs-hw_ocotp_ctrl_reg, OCOTP_CTRL_BUSY, + MXS_OCOTP_MAX_TIMEOUT)) { + puts(MXS FEC: Can't get MAC from OCOTP\n); + return; + } + + data = readl(ocotp_regs-hw_ocotp_cust0); + + mac[0] = 0x00; + mac[1] = 0x04; + /* +* Note: +* +* These first two bytes are Freescale's vendor MAC prefix. +* +*/ + mac[2] = (data 24) 0xff; + mac[3] = (data 16) 0xff; + mac[4] = (data 8) 0xff; + mac[5] = data 0xff; +} +#else +void imx_get_mac_from_fuse(char *mac) +{ + memset(mac, 0, 6); +} +#endif + U_BOOT_CMD( clocks, CONFIG_SYS_MAXARGS, 1, do_mx28_showclocks, display clocks, diff --git a/arch/arm/include/asm/arch-mx28/sys_proto.h b/arch/arm/include/asm/arch-mx28/sys_proto.h index be1f7db..cf5ab16 100644 --- a/arch/arm/include/asm/arch-mx28/sys_proto.h +++ b/arch/arm/include/asm/arch-mx28/sys_proto.h @@ -35,4 +35,6 @@ void mx28_common_spl_init(const iomux_cfg_t *iomux_setup, const unsigned int iomux_size); #endif +void imx_get_mac_from_fuse(char *mac); + #endif /* __MX28_H__ */ diff --git a/board/denx/m28evk/m28evk.c b/board/denx/m28evk/m28evk.c index fcee046..005446a 100644 --- a/board/denx/m28evk/m28evk.c +++ b/board/denx/m28evk/m28evk.c @@ -178,39 +178,4 @@ int board_eth_init(bd_t *bis) return ret; } -#ifdef CONFIG_M28_FEC_MAC_IN_OCOTP - -#defineMXS_OCOTP_MAX_TIMEOUT 100 -void imx_get_mac_from_fuse(char *mac) -{ - struct mx28_ocotp_regs *ocotp_regs = - (struct mx28_ocotp_regs *)MXS_OCOTP_BASE; - uint32_t data; - - memset(mac, 0, 6); - - writel(OCOTP_CTRL_RD_BANK_OPEN, ocotp_regs-hw_ocotp_ctrl_set); - - if (mx28_wait_mask_clr(ocotp_regs-hw_ocotp_ctrl_reg, OCOTP_CTRL_BUSY, - MXS_OCOTP_MAX_TIMEOUT)) { - printf(MXS FEC: Can't get MAC from OCOTP\n); - return; - } - - data = readl(ocotp_regs-hw_ocotp_cust0); - - mac[0] = 0x00; - mac[1] = 0x04; - mac[2] = (data 24) 0xff; - mac[3] = (data 16) 0xff; - mac[4] = (data 8) 0xff; - mac[5] = data 0xff; -} -#else -void imx_get_mac_from_fuse(char *mac) -{ - memset(mac, 0, 6); -} -#endif - #endif -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v5 2/3] mx28: Let dram_init be common for mx28
Let dram_init function be a common function, so that other mx28 boards can reuse it. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- Changes since v4: - Call mx28_dram_init from m28evk.c Changes since v3: - Rename dram_init to mx28_dram_init arch/arm/cpu/arm926ejs/mx28/mx28.c | 21 + arch/arm/include/asm/arch-mx28/sys_proto.h |1 + board/denx/m28evk/m28evk.c | 25 + 3 files changed, 27 insertions(+), 20 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/mx28/mx28.c b/arch/arm/cpu/arm926ejs/mx28/mx28.c index 40ffe4c..ade3df5 100644 --- a/arch/arm/cpu/arm926ejs/mx28/mx28.c +++ b/arch/arm/cpu/arm926ejs/mx28/mx28.c @@ -255,6 +255,27 @@ void imx_get_mac_from_fuse(char *mac) } #endif +#defineHW_DIGCTRL_SCRATCH0 0x8001c280 +#defineHW_DIGCTRL_SCRATCH1 0x8001c290 +int mx28_dram_init(void) +{ + uint32_t sz[2]; + + sz[0] = readl(HW_DIGCTRL_SCRATCH0); + sz[1] = readl(HW_DIGCTRL_SCRATCH1); + + if (sz[0] != sz[1]) { + puts(MX28:\n + Error, the RAM size in HW_DIGCTRL_SCRATCH0 and\n + HW_DIGCTRL_SCRATCH1 is not the same. Please\n + verify these two registers contain valid RAM size\n); + hang(); + } + + gd-ram_size = sz[0]; + return 0; +} + U_BOOT_CMD( clocks, CONFIG_SYS_MAXARGS, 1, do_mx28_showclocks, display clocks, diff --git a/arch/arm/include/asm/arch-mx28/sys_proto.h b/arch/arm/include/asm/arch-mx28/sys_proto.h index cf5ab16..411173e 100644 --- a/arch/arm/include/asm/arch-mx28/sys_proto.h +++ b/arch/arm/include/asm/arch-mx28/sys_proto.h @@ -36,5 +36,6 @@ void mx28_common_spl_init(const iomux_cfg_t *iomux_setup, #endif void imx_get_mac_from_fuse(char *mac); +int mx28_dram_init(void); #endif /* __MX28_H__ */ diff --git a/board/denx/m28evk/m28evk.c b/board/denx/m28evk/m28evk.c index 005446a..3225543 100644 --- a/board/denx/m28evk/m28evk.c +++ b/board/denx/m28evk/m28evk.c @@ -62,32 +62,17 @@ int board_early_init_f(void) return 0; } -int board_init(void) +int dram_init(void) { - /* Adress of boot parameters */ - gd-bd-bi_boot_params = PHYS_SDRAM_1 + 0x100; - + mx28_dram_init(); return 0; } -#defineHW_DIGCTRL_SCRATCH0 0x8001c280 -#defineHW_DIGCTRL_SCRATCH1 0x8001c290 -int dram_init(void) +int board_init(void) { - uint32_t sz[2]; - - sz[0] = readl(HW_DIGCTRL_SCRATCH0); - sz[1] = readl(HW_DIGCTRL_SCRATCH1); - - if (sz[0] != sz[1]) { - printf(MX28:\n - Error, the RAM size in HW_DIGCTRL_SCRATCH0 and\n - HW_DIGCTRL_SCRATCH1 is not the same. Please\n - verify these two registers contain valid RAM size!\n); - hang(); - } + /* Adress of boot parameters */ + gd-bd-bi_boot_params = PHYS_SDRAM_1 + 0x100; - gd-ram_size = sz[0]; return 0; } -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v5 3/3] mx28evk: Add initial support for MX28EVK board
Add initial support for Freescale MX28EVK board. Tested boot via SD card and by loading a kernel via TFTP through the FEC interface. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- - For correct operation of saving environment variables into the SD card, the following patch is needed: http://lists.denx.de/pipermail/u-boot/2011-November/111448.html Changes since v4: - No changes Changes since v3: - Fix Copyright in mx28evk.h - Call mx28_dram_init from dram_init Changes since v2: - Generate the patch again due to error in applying unrelated changes Changes since v1: - Read the MAC from fuses - Use tabs instead of space in u-boot.bd - Use puts instead of print - Factor out mac reading function - Factor out ddr size calculation function - Use GENERATED_GBL_DATA_SIZE - Protect CONFIG_ENV_IS_IN_MMC MAINTAINERS |1 + board/freescale/mx28evk/Makefile | 49 ++ board/freescale/mx28evk/iomux.c | 138 + board/freescale/mx28evk/mx28evk.c | 170 +++ board/freescale/mx28evk/u-boot.bd | 14 +++ boards.cfg|1 + include/configs/mx28evk.h | 176 + 7 files changed, 549 insertions(+), 0 deletions(-) create mode 100644 board/freescale/mx28evk/Makefile create mode 100644 board/freescale/mx28evk/iomux.c create mode 100644 board/freescale/mx28evk/mx28evk.c create mode 100644 board/freescale/mx28evk/u-boot.bd create mode 100644 include/configs/mx28evk.h diff --git a/MAINTAINERS b/MAINTAINERS index a56ca10..72e1089 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -639,6 +639,7 @@ Kristoffer Ericson kristoffer.eric...@gmail.com Fabio Estevam fabio.este...@freescale.com mx25pdk i.MX25 + mx28evk i.MX28 mx31pdk i.MX31 mx53ard i.MX53 mx53smd i.MX53 diff --git a/board/freescale/mx28evk/Makefile b/board/freescale/mx28evk/Makefile new file mode 100644 index 000..7459107 --- /dev/null +++ b/board/freescale/mx28evk/Makefile @@ -0,0 +1,49 @@ +# +# (C) Copyright 2000-2006 +# 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 + +ifndef CONFIG_SPL_BUILD +COBJS := mx28evk.o +else +COBJS := iomux.o +endif + +SRCS := $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) + +$(LIB):$(obj).depend $(OBJS) + $(call cmd_link_o_target, $(OBJS)) + +all: $(ALL) + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/board/freescale/mx28evk/iomux.c b/board/freescale/mx28evk/iomux.c new file mode 100644 index 000..904e3f3 --- /dev/null +++ b/board/freescale/mx28evk/iomux.c @@ -0,0 +1,138 @@ +/* + * Freescale MX28EVK IOMUX setup + * + * Copyright (C) 2011 Marek Vasut marek.va...@gmail.com + * on behalf of DENX Software Engineering GmbH + * + * 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. + */ + +#include common.h +#include config.h +#include asm/io.h +#include asm/arch/iomux-mx28.h +#include asm/arch/imx-regs.h +#include asm/arch/sys_proto.h + +#defineMUX_CONFIG_SSP0 (MXS_PAD_3V3 | MXS_PAD_8MA | MXS_PAD_PULLUP) +#defineMUX_CONFIG_ENET (MXS_PAD_3V3 | MXS_PAD_8MA | MXS_PAD_PULLUP) +#defineMUX_CONFIG_EMI (MXS_PAD_3V3 | MXS_PAD_12MA | MXS_PAD_NOPULL) + +const iomux_cfg_t iomux_setup[] = { + /* DUART */ + MX28_PAD_PWM0__DUART_RX, +
Re: [U-Boot] [PATCH V5] nand_spl_simple: store ecc data on the stack
On 12/15/2011 03:55 AM, Stefano Babic wrote: Currently nand_spl_simple puts it's temp data at 0x1 offset in SDRAM which is likely to contain already loaded data. The patch saves the oob data and the ecc on the stack replacing the fixed address in RAM. Signed-off-by: Stefano Babic sba...@denx.de CC: Ilya Yanok ya...@emcraft.com CC: Scott Wood scottw...@freescale.com CC: Tom Rini tom.r...@gmail.com CC: Simon Schwarz simonschwarz...@googlemail.com CC: Wolfgang Denk w...@denx.de --- Acked-by: Scott Wood scottw...@freescale.com -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] ext4fs write support
On Thu, 15 Dec 2011 23:09:53 +0530 uma.shan...@samsung.com wrote: fs/ext4/crc16.c| 62 +++ fs/ext4/crc16.h| 16 + there are already three crc16 implementations in u-boot according to my count. Please let's not add a fourth - hopefully the only thing wrong with using lib/crc16.c was that you weren't aware it existed. + /*get the filename */ + /*get the address in hexadecimal format (string to int) */ + /*get the filesize in base 10 format */ + /*set the device as block device */ + /*register the device and partition */ + /*get the partition information */ + /*mount the filesystem */ + /*start write */ space after the /* + if (status) + *ptr = *ptr ~(operand); + return; + } + return crc; insert blank line before return statements +static int check_void_in_dentry(struct ext2_dirent *dir, char *filename) + dentry_length = sizeof(struct ext2_dirent) + + dir-namelen + padding_factor; alignment + sizeof_void_space = dir-direntlen - dentry_length; + if (sizeof_void_space == 0) { + return 0; + } else { + padding_factor = 0; if (sizeof_void_space == 0) return 0; padding_factor = 0; ... + new_entry_byte_reqd = strlen(filename) + + sizeof(struct ext2_dirent) + padding_factor; alignment + if (sizeof_void_space = new_entry_byte_reqd) { + dir-direntlen = dentry_length; + return sizeof_void_space; + } else + return 0; if (sizeof_void_space = new_entry_byte_reqd) { dir-direntlen = dentry_length; return sizeof_void_space; } return 0; + /*##START: Update the root directory entry block of root inode ### */ + /*since we are populating this file under root + *directory take the root inode and its first block + *currently we are looking only in first block of root + *inode*/ /* * multi-line comments * are formatted * like this */ + zero_buffer = xzalloc(fs-blksz); + if (!zero_buffer) + return; + root_first_block_buffer = (char *)xzalloc(fs-blksz); + if (!root_first_block_buffer) + return; first time reviewing fs code, can this fn be modified to return an error code? If not, at least print something. +RESTART: labels in lowercase + status = ext2fs_devread(first_block_no_of_root + * fs-sect_perblk, operator at end of prior line + 0, fs-blksz, root_first_block_buffer); + if (status == 0) + goto fail; + else { + if (log_journal(root_first_block_buffer, if (...) goto fail; if (log_journal(... this will save horizontal space for some tightly right-justified code under it. + last_entry_dirlen = dir-namelen + + sizeof(struct ext2_dirent) + padding_factor; alignment + if ((fs-blksz - totalbytes - last_entry_dirlen) + new_entry_byte_reqd) { operator on prior line + printf(1st Block Full: + allocating new block\n); here, + if (direct_blk_idx == + INDIRECT_BLOCKS - 1) { + printf(Directory capacity + exceeds the limit\n); here, + goto fail; + } + g_parent_inode-b.blocks.dir_blocks + [direct_blk_idx] = get_new_blk_no(); + if (g_parent_inode-b.blocks.dir_blocks + [direct_blk_idx] == -1) { + printf(no block + left to assign\n); and here, this prevents users trying to grep for this error text - I believe it's allowed to exceed 80 columns in this case. + /*END: Update the root directory entry block of root inode */ is some tool you're using supposed to correlate this with the above?: /*##START: Update the root directory entry block of root inode ### */ If so, we (or certainly I) don't use it, and therefore don't care for it - please remove it, and any other instances. + /*get the first block of root */ + /*read the block no allocated to a file */ fix comment format + status = ext2fs_devread(blknr * fs-sect_perblk, + 0, fs-blksz, (char *)block_buffer); + if (status == 0) + goto fail; + else { again, rm the else to
Re: [U-Boot] about flashing the u-boot
I use a board created by some guys in the company where I`m a internet. It uses the u-boot-1.1.6-mpc832x_rdb.spec file on ltib to build it. And I do have the memory map for it - where in flash goes what.. I thought some memory manipulation commands on boot could help me to do a write over, but wasn`t able to find out how. Meanwhile, I got usb tap and code warrior borrowed from one guy there just to do this, but I really wish to not need to use this... On 12/15/11, Scott Wood scottw...@freescale.com wrote: On 12/14/2011 09:01 PM, Aggrwal Poonam-B10812 wrote: -Original Message- From: u-boot-boun...@lists.denx.de [mailto:u-boot-boun...@lists.denx.de] On Behalf Of Érico Porto Sent: Thursday, December 15, 2011 8:14 AM To: u-boot@lists.denx.de Subject: Re: [U-Boot] about flashing the u-boot Got a USB TAP, but unfortunately it is supposed to be used with Code Warrior. Any software that allows me to use it to flash a ppc? Érico V. Porto On Wed, Dec 14, 2011 at 2:10 PM, Érico Porto ericoporto2...@gmail.comwrote: Hello! Is it possible to flash a ppc board, that already has an older u-boot version, without using a jtag interface? I mean, I know I can write the filesystem using tftpboot, is it possible to also use it to write over u-boot? If no, is there any alternative to use jtag? You can use tftp to reflash the bootloader onto the ppc board. Just be aware that if the new image doesn't work, you'll need jtag (or an alternative boot source such as NAND) to recover. -Scott -- Érico V. Porto ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] about flashing the u-boot
On 12/15/2011 04:29 PM, Érico Porto wrote: I use a board created by some guys in the company where I`m a internet. It uses the u-boot-1.1.6-mpc832x_rdb.spec file on ltib to build it. And I do have the memory map for it - where in flash goes what.. I recommend just using the current mainline U-Boot from denx.de. I thought some memory manipulation commands on boot could help me to do a write over, but wasn`t able to find out how. Meanwhile, I got usb tap and code warrior borrowed from one guy there just to do this, but I really wish to not need to use this... The benefit to using the usb tap the first time is that if you get it to work once, know you can get it to work again if you need to recover. -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot