[U-Boot] USB support in U-boot for MX23EVK board
Hi, I'm struggling to find USB support in U-Boot for MX23EVK board. I'm building u-boot source using LTIB(L2.6.31_10.05.02_ER_source.tar downloaded from internet). I'm able to find USB driver(i.e., ehci-hcd.c file) in U-Boot source 2009.08. But usb_init function call is not made in board_init function in the corresponding board specific file (evk23_evk.c). Could you help me finding what could be done for enabling USB support in u-boot to support for ARM based mx23evk board. Thanks and Regards, Shilpa DISCLAIMER: This email may contain confidential information and is intended only for the use of the specific individual(s) to which it is addressed. If you are not the intended recipient of this email, you are hereby notified that any unauthorized use, dissemination or copying of this email or the information contained in it or attached to it is strictly prohibited. If you received this message in error, please immediately notify the sender at Infotech or mail.ad...@infotech-enterprises.com and delete the original message. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 1/2] usb/ehci: Add USB support for the MX6Q
Atleast could that driver be enabled by any means? Please let me know if any such procedure is der to enable the driver. I'm very much confused as to start with it. Thanks and Regards, Shilpa From: u-boot-boun...@lists.denx.de [u-boot-boun...@lists.denx.de] on behalf of Marek Vasut [marek.va...@gmail.com] Sent: 12 February, 2012 2:16 PM To: Dirk Behme Cc: Fabio Estevam; u-boot@lists.denx.de; Wolfgang Grandegger Subject: Re: [U-Boot] [PATCH v2 1/2] usb/ehci: Add USB support for the MX6Q On 11.02.2012 19:46, Fabio Estevam wrote: On Sat, Feb 11, 2012 at 5:12 AM, Marek Vasutmarek.va...@gmail.com wrote: btw Fabio, do we support mx6q USB host in mainline Linux ? Not yet, Marek. Linaro has it working with http://git.linaro.org/gitweb?p=bsp/freescale/linux-linaro.git;a=commit;h=de 941f9ac0b59c34053618e90e3c1f1d8b5a2d22 http://git.linaro.org/gitweb?p=bsp/freescale/linux-linaro.git;a=commit;h=40 26cfa27332f2e53cfbf72cc98cf4db8c2f2127 It shouldn't be that hard to apply these to plain mainline Linux (?). Do you believe this will be accepted into mainline Linux if basically the same stuff, except for mx28 did NOT get accepted? The shape of the code was almost identical, maybe better. Actually, even the file names are the same here and in the old FSL BSP for mx28. M ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot DISCLAIMER: This email may contain confidential information and is intended only for the use of the specific individual(s) to which it is addressed. If you are not the intended recipient of this email, you are hereby notified that any unauthorized use, dissemination or copying of this email or the information contained in it or attached to it is strictly prohibited. If you received this message in error, please immediately notify the sender at Infotech or mail.ad...@infotech-enterprises.com and delete the original message. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2] fix CFI flash driver for 8-bit bus support
I'm not the author of version v1 of this patch but I need it to add support for a new board. You can see patch v1 discussion here: http://lists.denx.de/pipermail/u-boot/2011-April/089606.html Changes from v1: * fix whitespaces * remove udelay(1); calls because they have been merged in a90b9575f3ff71de58672295504e9ebaa8f051b4 * remove reset call in flash_erase() Originally it was signed of by Aaron. Signed-off-by: Aaron Williams aaron.willi...@caviumnetworks.com Tested-by: Luka Perkov ub...@lukaperkov.net --- diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c index 722c3fc..55d866e 100644 --- a/drivers/mtd/cfi_flash.c +++ b/drivers/mtd/cfi_flash.c @@ -11,6 +11,9 @@ * Copyright (C) 2006 * Tolunay Orkun listmem...@orkun.us * + * Copyright (C) 2011 Cavium Networks, Inc. + * Aaron Williams aaron.willi...@caviumnetworks.com + * * See file CREDITS for list of people who contributed to this * project. * @@ -210,9 +213,11 @@ unsigned long flash_sector_size(flash_info_t *info, flash_sect_t sect) static inline void * flash_map (flash_info_t * info, flash_sect_t sect, uint offset) { - unsigned int byte_offset = offset * info-portwidth; + unsigned int byte_offset = offset * info-portwidth / info-chipwidth; + unsigned int addr = (info-start[sect] + byte_offset); + unsigned int mask = 0x (info-portwidth - 1); - return (void *)(info-start[sect] + byte_offset); + return (void *)(addr mask); } static inline void flash_unmap(flash_info_t *info, flash_sect_t sect, @@ -398,6 +403,8 @@ void flash_write_cmd (flash_info_t * info, flash_sect_t sect, #endif flash_write64(cword.ll, addr); break; + default: + debug (fwc: Unknown port width %d\n, info-portwidth); } /* Ensure all the instructions are fully finished */ @@ -585,7 +592,6 @@ static int flash_status_check (flash_info_t * info, flash_sect_t sector, prompt, info-start[sector], flash_read_long (info, sector, 0)); flash_write_cmd (info, sector, 0, info-cmd_reset); - udelay(1); return ERR_TIMOUT; } udelay (1); /* also triggers watchdog */ @@ -753,12 +759,8 @@ static void flash_add_byte (flash_info_t * info, cfiword_t * cword, uchar c) static flash_sect_t find_sector (flash_info_t * info, ulong addr) { static flash_sect_t saved_sector = 0; /* previously found sector */ - static flash_info_t *saved_info = 0; /* previously used flash bank */ flash_sect_t sector = saved_sector; - if ((info != saved_info) || (sector = info-sector_count)) - sector = 0; - while ((info-start[sector] addr) (sector info-sector_count - 1)) sector++; @@ -770,7 +772,6 @@ static flash_sect_t find_sector (flash_info_t * info, ulong addr) sector--; saved_sector = sector; - saved_info = info; return sector; } @@ -834,12 +835,15 @@ static int flash_write_cfiword (flash_info_t * info, ulong dest, switch (info-portwidth) { case FLASH_CFI_8BIT: + debug(%s: 8-bit 0x%02x\n, __func__, cword.c); flash_write8(cword.c, dstaddr); break; case FLASH_CFI_16BIT: + debug(%s: 16-bit 0x%04x\n, __func__, cword.w); flash_write16(cword.w, dstaddr); break; case FLASH_CFI_32BIT: + debug(%s: 32-bit 0x%08lx\n, __func__, cword.l); flash_write32(cword.l, dstaddr); break; case FLASH_CFI_64BIT: @@ -1053,6 +1057,8 @@ int flash_erase (flash_info_t * info, int s_first, int s_last) flash_sect_t sect; int st; + debug(%s: erasing sectors %d to %d\n, __func__, s_first, s_last); + if (info-flash_id != FLASH_MAN_CFI) { puts (Can't erase unknown flash type - aborted\n); return 1; @@ -1130,6 +1136,8 @@ int flash_erase (flash_info_t * info, int s_first, int s_last) rcode = 1; else if (flash_verbose) putc ('.'); + } else { + debug(\nSector %d is protected.\n, sect); } } @@ -1586,8 +1594,7 @@ static void cmdset_amd_read_jedec_ids(flash_info_t *info) flash_unlock_seq(info, 0); flash_write_cmd(info, 0, info-addr_unlock1, FLASH_CMD_READ_ID); udelay(1000); /* some flash are slow to respond */ - - manuId = flash_read_uchar (info, FLASH_OFFSET_MANUFACTURER_ID); + manuId = flash_read_uchar(info, FLASH_OFFSET_MANUFACTURER_ID); /* JEDEC JEP106Z specifies ID codes up to bank 7 */ while (manuId == FLASH_CONTINUATION_CODE bankId 0x800) {
Re: [U-Boot] [GIT PULL] Pull request: u-boot-imx
Hi Stefano, Le 12/02/2012 17:06, Stefano Babic a écrit : Hi Albert, please pull from u-boot-imx. The following changes since commit 9a3aae22edf1eda6326cc51c28631ca5c23b7706: arm, davinci: Add support for the Calimain board from OMICRON electronics (2012-02-12 10:11:33 +0100) are available in the git repository at: git://www.denx.de/git/u-boot-imx.git master Eric Nelson (6): mx6q: define GPIO macros for translating between ordinals and port:index mxc_spi: move machine specifics into CPU headers mx6q: Add support for ECSPI through mxc_spi driver mx6q: mx6qsabrelite: Add ECSPI support to the Sabrelite platform mx6q: mx6qsabrelite: Provide default serial flash bus and chip-select mx6q: mx6qsabrelite: Conditionally define macros for environment in serial flash Fabio Estevam (7): mx53loco: Use gpio_direction_input prior to gpio_get_value mx53ard: Use gpio_direction_input prior to gpio_get_value mx53evk: Use gpio_direction_input prior to gpio_get_value mx53smd: Use gpio_direction_input prior to gpio_get_value mx51evk: Use gpio_direction_input prior to gpio_get_value mx35: generic: Let get_reset_cause be defined only when CONFIG_DISPLAY_CPUINFO is selected mx35pdk: Remove duplicate CPU revision and reset cause information Marek Vasut (2): i.MX28: Fix VDDIO and VDDA setup MX28: Fix get_timer() / get_tbclk() issue Matthias Fuchs (4): mx28evk: add RTC support mx28evk: add USB support mx28evk: add SPI support mx28: fix SPL code to make USB booting work Shawn Guo (1): common/image.c: align usage of fdt_high with initrd_high Stefano Babic (4): MX35: add missing get_ticks() and get_tbclk() MX31: add missing get_tbclk() MX5/MX6: add missing get_ticks() and get_tbclk() MX27: add missing get_tbclk() README|8 ++ arch/arm/cpu/arm1136/mx31/timer.c |9 ++ arch/arm/cpu/arm1136/mx35/generic.c |2 +- arch/arm/cpu/arm1136/mx35/timer.c | 103 +++- arch/arm/cpu/arm926ejs/mx27/timer.c |5 + arch/arm/cpu/arm926ejs/mx28/spl_power_init.c | 16 +++- arch/arm/cpu/arm926ejs/mx28/start.S | 21 +- arch/arm/cpu/arm926ejs/mx28/timer.c | 19 - arch/arm/cpu/armv7/imx-common/timer.c | 75 ++- arch/arm/include/asm/arch-mx31/imx-regs.h | 27 +++ arch/arm/include/asm/arch-mx35/imx-regs.h | 25 ++ arch/arm/include/asm/arch-mx5/imx-regs.h | 30 +++ arch/arm/include/asm/arch-mx6/imx-regs.h | 48 board/freescale/mx28evk/iomux.c |8 ++ board/freescale/mx28evk/mx28evk.c |7 ++ board/freescale/mx35pdk/mx35pdk.c | 27 +-- board/freescale/mx51evk/mx51evk.c |2 + board/freescale/mx53ard/mx53ard.c |2 + board/freescale/mx53evk/mx53evk.c |2 + board/freescale/mx53loco/mx53loco.c |2 + board/freescale/mx53smd/mx53smd.c |1 + board/freescale/mx6qsabrelite/imximage.cfg|2 +- board/freescale/mx6qsabrelite/mx6qsabrelite.c | 25 ++ common/image.c| 12 +-- drivers/spi/mxc_spi.c | 93 ++- include/configs/mx28evk.h | 64 +++- include/configs/mx6qsabrelite.h | 29 ++- 27 files changed, 472 insertions(+), 192 deletions(-) Best regards, Stefano Applied to u-boot-arm/master, thanks! (that's not on u-boot/master yet though, as my pull request was sent out before this one) Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] PXA: Remove PXA PCMCIA support
Say good bye to some ancient, very broken and unused code. Signed-off-by: Marek Vasut marek.va...@gmail.com --- doc/README.PXA_CF | 56 -- drivers/pcmcia/Makefile |1 - drivers/pcmcia/pxa_pcmcia.c | 93 --- include/pcmcia.h|3 +- 4 files changed, 1 insertions(+), 152 deletions(-) delete mode 100644 doc/README.PXA_CF delete mode 100644 drivers/pcmcia/pxa_pcmcia.c diff --git a/doc/README.PXA_CF b/doc/README.PXA_CF deleted file mode 100644 index 1d76b32..000 --- a/doc/README.PXA_CF +++ /dev/null @@ -1,56 +0,0 @@ - -These are brief instructions on how to add support for CF adapters to -custom designed PXA boards. You need to set the parameters in the -config file. This should work for most implementations especially if you -follow the connections of the standard lubbock. Anyway just the block -marked memory configuration should be touched since the other parameters -are imposed by the PXA architecture. - -EDIT 2010-07-01: in common/cmd_ide.c, having CONFIG_PXA_PCMCIA defined -would cause looping on inw()/outw() rather than using insw()/outsw(), -thus making sure IDE / ATA bytes are properly swapped. This behaviour -is now controlled by CONFIG_IDE_SWAP_IO, therefore PXA boards with -PCMCIA should #define CONFIG_IDE_SWAP_IO. - -#define CONFIG_IDE_SWAP_IO - -#define CONFIG_PXA_PCMCIA 1 -#define CONFIG_PXA_IDE 1 - -#define CONFIG_PCMCIA_SLOT_A 1 -/* just to keep build system happy */ - -#define CONFIG_SYS_PCMCIA_MEM_ADDR 0x2800 -#define CONFIG_SYS_PCMCIA_MEM_SIZE 0x1000 - -#define CONFIG_SYS_MECR_VAL0x -#define CONFIG_SYS_MCMEM0_VAL 0x4204 -#define CONFIG_SYS_MCMEM1_VAL 0x -#define CONFIG_SYS_MCATT0_VAL 0x00010504 -#define CONFIG_SYS_MCATT1_VAL 0x -#define CONFIG_SYS_MCIO0_VAL 0x8407 -#define CONFIG_SYS_MCIO1_VAL 0x -/* memory configuration */ - -#define CONFIG_SYS_IDE_MAXBUS 1 -/* max. 1 IDE bus */ -#define CONFIG_SYS_IDE_MAXDEVICE 1 -/* max. 1 drive per IDE bus*/ - -#define CONFIG_SYS_ATA_IDE0_OFFSET 0x - -#define CONFIG_SYS_ATA_BASE_ADDR 0x2000 - -/* Offset for data I/O */ -#define CONFIG_SYS_ATA_DATA_OFFSET 0x1f0 - -/* Offset for normal register accesses */ -#define CONFIG_SYS_ATA_REG_OFFSET 0x1f0 - -/* Offset for alternate registers */ -#define CONFIG_SYS_ATA_ALT_OFFSET 0x3f0 - - -Another important point is that maybe you have to power the pcmcia -subsystem. This is very board specific, for an example on how to -do it please search for CONFIG_EXADRON1 in cmd_pcmcia.c diff --git a/drivers/pcmcia/Makefile b/drivers/pcmcia/Makefile index 0349508..aa477d4 100644 --- a/drivers/pcmcia/Makefile +++ b/drivers/pcmcia/Makefile @@ -27,7 +27,6 @@ LIB := $(obj)libpcmcia.o COBJS-$(CONFIG_I82365) += i82365.o COBJS-$(CONFIG_8xx) += mpc8xx_pcmcia.o -COBJS-$(CONFIG_PXA_PCMCIA) += pxa_pcmcia.o COBJS-y += rpx_pcmcia.o COBJS-$(CONFIG_IDE_TI_CARDBUS) += ti_pci1410a.o COBJS-y += tqm8xx_pcmcia.o diff --git a/drivers/pcmcia/pxa_pcmcia.c b/drivers/pcmcia/pxa_pcmcia.c deleted file mode 100644 index d06ab74..000 --- a/drivers/pcmcia/pxa_pcmcia.c +++ /dev/null @@ -1,93 +0,0 @@ -#include common.h -#include config.h - -#include pcmcia.h -#include asm/arch/pxa-regs.h -#include asm/io.h - -static inline void msWait(unsigned msVal) -{ - udelay(msVal*1000); -} - -int pcmcia_on (void) -{ - unsigned int reg_arr[] = { - 0x4828, CONFIG_SYS_MCMEM0_VAL, - 0x482c, CONFIG_SYS_MCMEM1_VAL, - 0x4830, CONFIG_SYS_MCATT0_VAL, - 0x4834, CONFIG_SYS_MCATT1_VAL, - 0x4838, CONFIG_SYS_MCIO0_VAL, - 0x483c, CONFIG_SYS_MCIO1_VAL, - - 0, 0 - }; - int i, rc; - -#ifdef CONFIG_EXADRON1 - int cardDetect; - volatile unsigned int *v_pBCRReg = - (volatile unsigned int *) 0x0800; -#endif - - debug (%s\n, __FUNCTION__); - - i = 0; - while (reg_arr[i]) { - (*(volatile unsigned int *) reg_arr[i]) |= reg_arr[i + 1]; - i += 2; - } - udelay (1000); - - debug (%s: programmed mem controller \n, __FUNCTION__); - -#ifdef CONFIG_EXADRON1 - -/*define useful BCR masks */ -#define BCR_CF_INIT_VAL0x7230 -#define BCR_CF_PWRON_BUSOFF_RESETOFF_VAL0x7231 -#define BCR_CF_PWRON_BUSOFF_RESETON_VAL 0x7233 -#define BCR_CF_PWRON_BUSON_RESETON_VAL 0x7213 -#define BCR_CF_PWRON_BUSON_RESETOFF_VAL 0x7211 - - /* we see from the GPIO bit if the card is present */ - cardDetect = !(GPLR0 GPIO_bit (14)); - - if (cardDetect) { - printf (No PCMCIA card found!\n); - } - - /* reset the card via the BCR line */ - *v_pBCRReg =
[U-Boot] SRIO patches
I'm afraid I deleted the SRIO patch emails before I knew I needed to keep them, so I'm just going to summarize my comments in this email. 1) I'm not convinced we need a MASTER build target. Isn't it possible to just add support for serving as an SRIO master, and to enable support from the command line, or via environment variable? 2) There are a number of constants being defined that seem very much like system options (ie something that will vary with different chips): +#define SRIO_PORT_MAX_NUM 2 /* SRIO port max number */ +#define SRIO_OB_WIN_NUM9 /* SRIO outbound window number */ +#define SRIO_IB_WIN_NUM5 /* SRIO inbound window number */ +#define SRIO_MSG_UNIT_NUM 2 /* SRIO message unit number */ Maybe these should be config options? Andy ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] powerpc/usb: fix bug of CPU halt when missing USB PHY clock
You moved the USB_EN setting: + /* Enable interface. */ + setbits_be32(ehci-control, USB_EN); + [...] - /* Enable interface. */ - setbits_be32(ehci-control, USB_EN); - Should we clear this bit if we don't find a valid clock? The patch description didn't say why you moved this write. Andy ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] nand: current mainline show new startup output
Hello Christian, Scott, current mainline code of U-Boot: commit 9a3aae22edf1eda6326cc51c28631ca5c23b7706 Author: Christian Riesch christian.rie...@omicron.at Date: Thu Feb 2 00:44:42 2012 + arm, davinci: Add support for the Calimain board from OMICRON electronics This patch adds support for the Calimain board from OMICRON electronics GmbH. The board features a Texas Instruments AM1808 SoC, 128 MB DDR2 memory, and 64 MB NOR flash memory connected to CS2 and CS3. Signed-off-by: Christian Riesch christian.rie...@omicron.at shows now on startup the following printfs on the enbw_cmc board: U-Boot 2011.12-00331-ga400f85 (Feb 13 2012 - 08:49:17) I2C: ready [...] NAND: Bad block table found at page 65472, version 0x01 Bad block table found at page 65408, version 0x01 nand_read_bbt: Bad block at 0x0298 nand_read_bbt: Bad block at 0x0324 128 MiB MMC: davinci: 0 Found with git bisect the reason: [hs@pollux u-boot]$ git bisect good 2a8e0fc8b3dc31a3c571e439fbf04b882c8986be is the first bad commit commit 2a8e0fc8b3dc31a3c571e439fbf04b882c8986be Author: Christian Hitz christian.h...@aizo.com Date: Wed Oct 12 09:32:02 2011 +0200 nand: Merge changes from Linux nand driver [backport from linux commit 02f8c6aee8df3cdc935e9bdd4f2d020306035dbe] This patch synchronizes the nand driver with the Linux 3.0 state. Signed-off-by: Christian Hitz christian.h...@aizo.com Cc: Scott Wood scottw...@freescale.com [scottw...@freescale.com: minor fixes] Signed-off-by: Scott Wood scottw...@freescale.com :04 04 5ab34f43b64379528b9ef2652c8481fdab1a927a b453a49035e179dfb5f31c3164a1b7d3d62d66d6 M drivers :04 04 b59a7f3136da038b4b49c48cd0958e140a09ed66 a8fd298715a562fda0a350e6f732c1072ca7d410 M include [hs@pollux u-boot]$ Looking in this patch, it seems to me, this is the reason: diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 758b53f..ed2640c 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c [...] @@ -2992,9 +3145,10 @@ int nand_scan_tail(struct mtd_info *mtd) /* Check, if we should skip the bad block table scan */ if (chip-options NAND_SKIP_BBTSCAN) - chip-options |= NAND_BBT_SCANNED; + return 0; - return 0; + /* Build bad block table */ + return chip-scan_bbt(mtd); } /** ... This printfs in the startoutput are suboptimal ... maybe we apply the following patch: diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c index 2b730e0..bf12df8 100644 --- a/drivers/mtd/nand/nand_bbt.c +++ b/drivers/mtd/nand/nand_bbt.c @@ -259,10 +259,10 @@ static int read_bbt(struct mtd_info *mtd, uint8_t *buf, int page, int num, mtd-ecc_stats.bbtblocks++; continue; } - /* Leave it for now, if its matured we can move this -* message to MTD_DEBUG_LEVEL0 */ - printk(KERN_DEBUG nand_read_bbt: Bad block at 0x%012llx\n, - (loff_t)((offs 2) + (act 1)) this-bbt_erase_shift); + MTDDEBUG(MTD_DEBUG_LEVEL0, nand_read_bbt: \ + Bad block at 0x%012llx\n, + (loff_t)((offs 2) + (act 1)) +this-bbt_erase_shift); /* Factory marked bad or worn out ? */ if (tmp == 0) this-bbt[offs + (act 3)] |= 0x3 (act 0x06); @@ -651,8 +651,9 @@ static int search_bbt(struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_descr if (td-pages[i] == -1) printk(KERN_WARNING Bad block table not found for chip %d\n, i); else - printk(KERN_DEBUG Bad block table found at page %d, version 0x%02X\n, td-pages[i], - td-version[i]); + MTDDEBUG(MTD_DEBUG_LEVEL0, Bad block table found \ + at page %d, version 0x%02X\n, td-pages[i], + td-version[i]); } return 0; } If this patch is OK, I can send it ... bye, Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] OMAP USB, beagle-xm fail
Hello, the recent OMAP USB changes (43b62393da6dfdd7f503d1b37344463a05ea47b5, 29321c0518d99494ab2a250e5b4f75b3add83b11) fail on beagleboard-xm rev. C, see below regards, p. U-Boot SPL 2011.12-00326-gdda8078 (Feb 13 2012 - 09:15:55) Texas Instruments Revision detection unimplemented OMAP SD/MMC: 0 timed out in wait_for_status_mask: I2C_STAT=1010 timed out in wait_for_status_mask: I2C_STAT=1010 reading u-boot.img reading u-boot.img U-Boot 2011.12-00326-gdda8078 (Feb 13 2012 - 09:15:55) OMAP36XX/37XX-GP ES1.2, CPU-OPP2, L3-165MHz, Max CPU Clock 1 Ghz OMAP3 Beagle board + LPDDR/NAND I2C: ready DRAM: 512 MiB NAND: 0 MiB MMC: OMAP SD/MMC: 0 *** Warning - readenv() failed, using default environment timed out in wait_for_status_mask: I2C_STAT=1410 timed out in wait_for_status_mask: I2C_STAT=1410 timed out in wait_for_status_mask: I2C_STAT=1410 timed out in wait_for_status_mask: I2C_STAT=1410 timed out in wait_for_status_mask: I2C_STAT=1410 timed out in wait_for_status_mask: I2C_STAT=1410 timed out in wait_for_status_mask: I2C_STAT=1410 timed out in wait_for_status_mask: I2C_STAT=1410 timed out in wait_for_status_mask: I2C_STAT=1410 timed out in wait_for_status_mask: I2C_STAT=1410 timed out in wait_for_status_mask: I2C_STAT=1410 timed out in wait_for_status_mask: I2C_STAT=1410 TWL4030:USB:Write[0xfd] Error 1 timed out in wait_for_status_mask: I2C_STAT=1410 TWL4030:USB:Write[0xfe] Error 1 timed out in wait_for_status_mask: I2C_STAT=1410 TWL4030:USB:Write[0xfe] Error 1 -- Peter Meerwald +43-664-218 (mobile) ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] USB support in U-boot for MX23EVK board
Dear Shilpa Budhihal, In message fa04b2a1cd90bb43b811f51230ec7fcc02c25...@infhydex10mb3.corp.infotech-enterprises.com you wrote: I'm struggling to find USB support in U-Boot for MX23EVK board. I'm building u-boot source using LTIB(L2.6.31_10.05.02_ER_source.tar downloaded from internet). I'm able to find USB driver(i.e., Sorry, but LTIB is a Freescale provided out-of-tree port. We can only support mainline U-Boot here. Please contact Freescale support for problems with the Freescale code. ehci-hcd.c file) in U-Boot source 2009.08. But usb_init function call is not made in board_init function in the corresponding board specific file (evk23_evk.c). Could you help me finding what could be done for enabling USB support in u-boot to support for ARM based mx23evk board. So far, Freescale did not bother to push their i.MX23 support upstream (and nobody else did this either). So we cannot help you. Please contact Freescale support with questions to Freescale's LTIB code. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de The White Rabbit put on his spectacles. Where shall I begin, please your Majesty ? he asked. Begin at the beginning,, the King said, very gravely, and go on till you come to the end: then stop.-- Lewis Carroll ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [v2 1/4] USB: Armada100: Add UTMI PHY interface driver
This patch adds USB host controller's UTMI PHY interface driver for Armada100 SOCs. Signed-off-by: Ajay Bhargav ajay.bhar...@einfochips.com --- Changes for v2: - Fix: enable only required clock in MPMU arch/arm/include/asm/arch-armada100/armada100.h |8 ++ drivers/usb/host/utmi-armada100.c | 87 +++ drivers/usb/host/utmi-armada100.h | 79 3 files changed, 174 insertions(+), 0 deletions(-) create mode 100644 drivers/usb/host/utmi-armada100.c create mode 100644 drivers/usb/host/utmi-armada100.h diff --git a/arch/arm/include/asm/arch-armada100/armada100.h b/arch/arm/include/asm/arch-armada100/armada100.h index 0ed3a8e..70fba27 100644 --- a/arch/arm/include/asm/arch-armada100/armada100.h +++ b/arch/arm/include/asm/arch-armada100/armada100.h @@ -43,6 +43,14 @@ #define SSP2_APBCLK0x01 #define SSP2_FNCLK 0x02 +/* USB Clock/reset control bits */ +#define USB_SPH_AXICLK_EN 0x10 +#define USB_SPH_AXI_RST0x02 + +/* MPMU Clocks */ +#define APB2_26M_EN(1 20) +#define AP_26M (1 4) + /* Register Base Addresses */ #define ARMD1_DRAM_BASE0xB000 #define ARMD1_FEC_BASE 0xC080 diff --git a/drivers/usb/host/utmi-armada100.c b/drivers/usb/host/utmi-armada100.c new file mode 100644 index 000..1a4d3f2 --- /dev/null +++ b/drivers/usb/host/utmi-armada100.c @@ -0,0 +1,87 @@ +/* + * (C) Copyright 2012 + * eInfochips Ltd. www.einfochips.com + * Written-by: Ajay Bhargav ajay.bhar...@einfochips.com + * + * (C) Copyright 2009 + * Marvell Semiconductor www.marvell.com + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301 USA + */ + +#include common.h +#include asm/io.h +#include usb.h +#include asm/arch/cpu.h +#include asm/arch/armada100.h +#include utmi-armada100.h + +static void utmi_phy_init(void) +{ + struct armd1usb_phy_reg *phy_regs = + (struct armd1usb_phy_reg *)UTMI_PHY_BASE; + + setbits_le32(phy_regs-utmi_ctrl, INPKT_DELAY_SOF | PLL_PWR_UP); + udelay(1000); + setbits_le32(phy_regs-utmi_ctrl, PHY_PWR_UP); + + clrbits_le32(phy_regs-utmi_pll, PLL_FBDIV_MASK | PLL_REFDIV_MASK); + setbits_le32(phy_regs-utmi_pll, N_DIVIDER PLL_FBDIV | M_DIVIDER); + + setbits_le32(phy_regs-utmi_tx, PHSEL_VAL CK60_PHSEL); + + /* Calibrate pll */ + while ((readl(phy_regs-utmi_pll) PLL_READY) == 0) + ; + + udelay(200); + setbits_le32(phy_regs-utmi_pll, VCOCAL_START); + udelay(400); + clrbits_le32(phy_regs-utmi_pll, VCOCAL_START); + + udelay(200); + setbits_le32(phy_regs-utmi_tx, RCAL_START); + udelay(400); + clrbits_le32(phy_regs-utmi_tx, RCAL_START); + + while ((readl(phy_regs-utmi_pll) PLL_READY) == 0) + ; +} + +/* + * Initialize USB host controller's UTMI Physical interface + */ +void utmi_init(void) +{ + struct armd1mpmu_registers *mpmu_regs = + (struct armd1mpmu_registers *)ARMD1_MPMU_BASE; + + struct armd1apmu_registers *apmu_regs = + (struct armd1apmu_registers *)ARMD1_APMU_BASE; + + /* Turn on 26Mhz ref clock for UTMI PLL */ + setbits_le32(mpmu_regs-acgr, APB2_26M_EN | AP_26M); + + /* USB Clock reset */ + writel(USB_SPH_AXICLK_EN, apmu_regs-usbcrc); + writel(USB_SPH_AXICLK_EN | USB_SPH_AXI_RST, apmu_regs-usbcrc); + + /* Initialize UTMI transceiver */ + utmi_phy_init(); +} diff --git a/drivers/usb/host/utmi-armada100.h b/drivers/usb/host/utmi-armada100.h new file mode 100644 index 000..dd0ccdb --- /dev/null +++ b/drivers/usb/host/utmi-armada100.h @@ -0,0 +1,79 @@ +/* + * (C) Copyright 2012 + * eInfochips Ltd. www.einfochips.com + * Written-by: Ajay Bhargav ajay.bhar...@einfochips.com + * + * (C) Copyright 2009 + * Marvell Semiconductor www.marvell.com + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your
[U-Boot] [v2 3/4] Armada100: gplugD: Add USB command support
This patch adds support for USB commands and USB storage device for Marvell gplugD Signed-off-by: Ajay Bhargav ajay.bhar...@einfochips.com --- Changes for v2: - removed unwanted ifdef - fat and ext2 command support moved to new patch include/configs/gplugd.h | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/include/configs/gplugd.h b/include/configs/gplugd.h index 9813309..061ebe6 100644 --- a/include/configs/gplugd.h +++ b/include/configs/gplugd.h @@ -72,6 +72,7 @@ #define CONFIG_CMD_I2C #define CONFIG_CMD_AUTOSCRIPT #undef CONFIG_CMD_FPGA +#define CONFIG_CMD_USB /* Disable DCACHE */ #define CONFIG_SYS_DCACHE_OFF @@ -134,4 +135,15 @@ #define CONFIG_CMD_EDITENV #define CONFIG_CMD_SAVEENV +#ifdef CONFIG_CMD_USB +#define CONFIG_USB_EHCI +#define CONFIG_USB_EHCI_ARMADA100 +#define CONFIG_EHCI_IS_TDI +#define CONFIG_USB_STORAGE +#endif /* CONFIG_CMD_USB */ + +#define CONFIG_DOS_PARTITION +#define CONFIG_ISO_PARTITION +#define CONFIG_SUPPORT_VFAT + #endif /* __CONFIG_GPLUGD_H */ -- 1.7.7.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [v2 4/4] Armada100: gplugD: Add FAT EXT2 command support
This patch adds FAT and ext2 command support for marvell gplugD Signed-off-by: Ajay Bhargav ajay.bhar...@einfochips.com --- Changes for v2: - added this new patch for command support include/configs/gplugd.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/configs/gplugd.h b/include/configs/gplugd.h index 061ebe6..462cc7e 100644 --- a/include/configs/gplugd.h +++ b/include/configs/gplugd.h @@ -73,6 +73,8 @@ #define CONFIG_CMD_AUTOSCRIPT #undef CONFIG_CMD_FPGA #define CONFIG_CMD_USB +#define CONFIG_CMD_EXT2 +#define CONFIG_CMD_FAT /* Disable DCACHE */ #define CONFIG_SYS_DCACHE_OFF -- 1.7.7.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [v2 2/4] USB: Armada100: ECHI Driver for Armada100 SOCs
This patch adds support for USB EHCI driver for Armada100 SOCs. Signed-off-by: Ajay Bhargav ajay.bhar...@einfochips.com --- Changes for v2: - Fix typo for SOC name - change printf to debug arch/arm/include/asm/arch-armada100/armada100.h |1 + drivers/usb/host/Makefile |1 + drivers/usb/host/ehci-armada100.c | 62 +++ 3 files changed, 64 insertions(+), 0 deletions(-) create mode 100644 drivers/usb/host/ehci-armada100.c diff --git a/arch/arm/include/asm/arch-armada100/armada100.h b/arch/arm/include/asm/arch-armada100/armada100.h index 70fba27..614de55 100644 --- a/arch/arm/include/asm/arch-armada100/armada100.h +++ b/arch/arm/include/asm/arch-armada100/armada100.h @@ -68,6 +68,7 @@ #define ARMD1_SSP5_BASE0xD4021000 #define ARMD1_UART3_BASE 0xD4026000 #define ARMD1_MPMU_BASE0xD405 +#define ARMD1_USB_HOST_BASE0xD4209000 #define ARMD1_APMU_BASE0xD4282800 #define ARMD1_CPU_BASE 0xD4282C00 diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile index 7c4df53..5fdc97b 100644 --- a/drivers/usb/host/Makefile +++ b/drivers/usb/host/Makefile @@ -35,6 +35,7 @@ COBJS-$(CONFIG_USB_SL811HS) += sl811-hcd.o # echi COBJS-$(CONFIG_USB_EHCI) += ehci-hcd.o +COBJS-$(CONFIG_USB_EHCI_ARMADA100) += ehci-armada100.o utmi-armada100.o ifdef CONFIG_MPC512X COBJS-$(CONFIG_USB_EHCI_FSL) += ehci-mpc512x.o else diff --git a/drivers/usb/host/ehci-armada100.c b/drivers/usb/host/ehci-armada100.c new file mode 100644 index 000..cfe159d --- /dev/null +++ b/drivers/usb/host/ehci-armada100.c @@ -0,0 +1,62 @@ +/* + * (C) Copyright 2012 + * eInfochips Ltd. www.einfochips.com + * Written-by: Ajay Bhargav ajay.bhar...@einfochips.com + * + * This driver is based on Kirkwood echi driver + * (C) Copyright 2009 + * Marvell Semiconductor www.marvell.com + * Written-by: Prafulla Wadaskar prafu...@marvell.com + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301 USA + */ + +#include common.h +#include asm/io.h +#include usb.h +#include ehci.h +#include ehci-core.h +#include asm/arch/cpu.h +#include asm/arch/armada100.h +#include utmi-armada100.h + +/* + * EHCI host controller init + */ +int ehci_hcd_init(void) +{ + utmi_init(); + hccr = (struct ehci_hccr *)(ARMD1_USB_HOST_BASE + 0x100); + hcor = (struct ehci_hcor *)((uint32_t) hccr + + HC_LENGTH(ehci_readl(hccr-cr_capbase))); + + debug(armada100-ehci: init hccr %x and hcor %x hc_length %d\n, + (uint32_t)hccr, (uint32_t)hcor, + (uint32_t)HC_LENGTH(ehci_readl(hccr-cr_capbase))); + + return 0; +} + +/* + * EHCI host controller stop + */ +int ehci_hcd_stop(void) +{ + return 0; +} -- 1.7.7.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] OMAP USB, beagle-xm fail
Hi Peter, On Mon, Feb 13, 2012 at 1:52 PM, Peter Meerwald pme...@pmeerw.net wrote: Hello, the recent OMAP USB changes (43b62393da6dfdd7f503d1b37344463a05ea47b5, 29321c0518d99494ab2a250e5b4f75b3add83b11) fail on beagleboard-xm rev. C, see below The errors have nothing to do with ehci patch merges, (I had tested it on beagle rev c board before posting it out) Looking into it closely the below two patches are causing this issue: [...] commit 498cbdfe62a8330f6c89765bdd15e60328a26511 Author: Patil, Rachna rac...@ti.com Date: Sun Jan 22 23:46:23 2012 + ARM: AM33XX: Add AM33XX I2C driver support commit 2faa76196af4b3e93bcb9e38ed9090cbd3b06db3 Author: Patil, Rachna rac...@ti.com Date: Sun Jan 22 23:44:12 2012 + ARM: I2C: I2C Multi byte address support [...] Reverting these two patches I don't see these errors on my beagle rev c board logs as in here [1] btw, usb error printed is a musb error not the ehci host error. -- Thanks, Govindraj.R [1]: U-Boot SPL 2011.12-00325-g146ff78 (Feb 13 2012 - 14:18:55) Texas Instruments Revision detection unimplemented OMAP SD/MMC: 0 timed out in wait_for_bb: I2C_STAT=1000 reading u-boot.img reading u-boot.img U-Boot 2011.12-00325-g146ff78 (Feb 13 2012 - 14:18:55) OMAP3630/3730-GP ES1.2, CPU-OPP2, L3-165MHz, Max CPU Clock 1 Ghz OMAP3 Beagle board + LPDDR/NAND I2C: ready DRAM: 512 MiB NAND: 0 MiB MMC: OMAP SD/MMC: 0 *** Warning - readenv() failed, using default environment In:serial Out: serial Err: serial Beagle xM Rev C No EEPROM on expansion board Die ID #79e200229ff80163810c0d021023 Net: Net Initialization Skipped No ethernet found. Hit any key to stop autoboot: 0 OMAP3 beagleboard.org # OMAP3 beagleboard.org # setenv usbethaddr 0:0:1:2:3:4;usb start; (Re)start USB... USB: Register 1313 NbrPorts 3 USB EHCI 1.00 scanning bus for devices... 3 USB Device(s) found scanning bus for storage devices... 0 Storage Device(s) found scanning bus for ethernet devices... 1 Ethernet Device(s) found OMAP3 beagleboard.org # regards, p. U-Boot SPL 2011.12-00326-gdda8078 (Feb 13 2012 - 09:15:55) Texas Instruments Revision detection unimplemented OMAP SD/MMC: 0 timed out in wait_for_status_mask: I2C_STAT=1010 timed out in wait_for_status_mask: I2C_STAT=1010 reading u-boot.img reading u-boot.img U-Boot 2011.12-00326-gdda8078 (Feb 13 2012 - 09:15:55) OMAP36XX/37XX-GP ES1.2, CPU-OPP2, L3-165MHz, Max CPU Clock 1 Ghz OMAP3 Beagle board + LPDDR/NAND I2C: ready DRAM: 512 MiB NAND: 0 MiB MMC: OMAP SD/MMC: 0 *** Warning - readenv() failed, using default environment timed out in wait_for_status_mask: I2C_STAT=1410 timed out in wait_for_status_mask: I2C_STAT=1410 timed out in wait_for_status_mask: I2C_STAT=1410 timed out in wait_for_status_mask: I2C_STAT=1410 timed out in wait_for_status_mask: I2C_STAT=1410 timed out in wait_for_status_mask: I2C_STAT=1410 timed out in wait_for_status_mask: I2C_STAT=1410 timed out in wait_for_status_mask: I2C_STAT=1410 timed out in wait_for_status_mask: I2C_STAT=1410 timed out in wait_for_status_mask: I2C_STAT=1410 timed out in wait_for_status_mask: I2C_STAT=1410 timed out in wait_for_status_mask: I2C_STAT=1410 TWL4030:USB:Write[0xfd] Error 1 timed out in wait_for_status_mask: I2C_STAT=1410 TWL4030:USB:Write[0xfe] Error 1 timed out in wait_for_status_mask: I2C_STAT=1410 TWL4030:USB:Write[0xfe] Error 1 -- Peter Meerwald +43-664-218 (mobile) ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] Tricorder: Fix boot after making software ecc configurable
The tricorder stops booting with the following message: U-Boot 2011.12-00325-ga661206 (Feb 13 2012 - 09:29:50) OMAP3503-GP ES3.1, CPU-OPP2, L3-165MHz, Max CPU Clock 600 mHz OMAP3 Tricorder + LPDDR/NAND I2C: ready DRAM: 128 MiB NAND: CONFIG_MTD_ECC_SOFT not enabled 0 MiB MMC: OMAP SD/MMC: 0 Adding CONFIG_MTD_ECC_SOFT to config file fixes this problem. Signed-off-by: Thomas Weber we...@corscience.de --- include/configs/tricorder.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/configs/tricorder.h b/include/configs/tricorder.h index f87696b..0e8003f 100644 --- a/include/configs/tricorder.h +++ b/include/configs/tricorder.h @@ -110,6 +110,7 @@ /* Board NAND Info */ #define CONFIG_SYS_NO_FLASH/* no NOR flash */ #define CONFIG_MTD_DEVICE /* needed for mtdparts commands */ +#define CONFIG_MTD_ECC_SOFT #define MTDIDS_DEFAULT nand0=nand #define MTDPARTS_DEFAULT mtdparts=nand: \ 512k(u-boot-spl), \ -- 1.7.8.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] powerpc/usb: fix bug of CPU halt when missing USB PHY clock
-Original Message- From: Andy Fleming [mailto:aflem...@gmail.com] Sent: Monday, February 13, 2012 4:14 PM To: Liu Shengzhou-B36685; U-Boot list Subject: Re: powerpc/usb: fix bug of CPU halt when missing USB PHY clock You moved the USB_EN setting: + /* Enable interface. */ + setbits_be32(ehci-control, USB_EN); + [...] - /* Enable interface. */ - setbits_be32(ehci-control, USB_EN); - Should we clear this bit if we don't find a valid clock? The patch description didn't say why you moved this write. Andy To read ehci-control[PHY_CLK_VALID], we have to first enable it, or it will hang when reading control[PHY_CLK_VALID]. -Shengzhou ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [v2 1/4] USB: Armada100: Add UTMI PHY interface driver
This patch adds USB host controller's UTMI PHY interface driver for Armada100 SOCs. Signed-off-by: Ajay Bhargav ajay.bhar...@einfochips.com --- Changes for v2: - Fix: enable only required clock in MPMU arch/arm/include/asm/arch-armada100/armada100.h |8 ++ drivers/usb/host/utmi-armada100.c | 87 +++ drivers/usb/host/utmi-armada100.h | 79 3 files changed, 174 insertions(+), 0 deletions(-) create mode 100644 drivers/usb/host/utmi-armada100.c create mode 100644 drivers/usb/host/utmi-armada100.h diff --git a/arch/arm/include/asm/arch-armada100/armada100.h b/arch/arm/include/asm/arch-armada100/armada100.h index 0ed3a8e..70fba27 100644 --- a/arch/arm/include/asm/arch-armada100/armada100.h +++ b/arch/arm/include/asm/arch-armada100/armada100.h @@ -43,6 +43,14 @@ #define SSP2_APBCLK 0x01 #define SSP2_FNCLK 0x02 +/* USB Clock/reset control bits */ +#define USB_SPH_AXICLK_EN0x10 +#define USB_SPH_AXI_RST 0x02 + +/* MPMU Clocks */ +#define APB2_26M_EN (1 20) +#define AP_26M (1 4) + /* Register Base Addresses */ #define ARMD1_DRAM_BASE 0xB000 #define ARMD1_FEC_BASE 0xC080 diff --git a/drivers/usb/host/utmi-armada100.c b/drivers/usb/host/utmi-armada100.c new file mode 100644 index 000..1a4d3f2 --- /dev/null +++ b/drivers/usb/host/utmi-armada100.c @@ -0,0 +1,87 @@ +/* + * (C) Copyright 2012 + * eInfochips Ltd. www.einfochips.com + * Written-by: Ajay Bhargav ajay.bhar...@einfochips.com + * + * (C) Copyright 2009 + * Marvell Semiconductor www.marvell.com + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301 USA + */ + +#include common.h +#include asm/io.h +#include usb.h +#include asm/arch/cpu.h +#include asm/arch/armada100.h +#include utmi-armada100.h + +static void utmi_phy_init(void) +{ + struct armd1usb_phy_reg *phy_regs = + (struct armd1usb_phy_reg *)UTMI_PHY_BASE; + + setbits_le32(phy_regs-utmi_ctrl, INPKT_DELAY_SOF | PLL_PWR_UP); + udelay(1000); + setbits_le32(phy_regs-utmi_ctrl, PHY_PWR_UP); + + clrbits_le32(phy_regs-utmi_pll, PLL_FBDIV_MASK | PLL_REFDIV_MASK); + setbits_le32(phy_regs-utmi_pll, N_DIVIDER PLL_FBDIV | M_DIVIDER); + + setbits_le32(phy_regs-utmi_tx, PHSEL_VAL CK60_PHSEL); + + /* Calibrate pll */ + while ((readl(phy_regs-utmi_pll) PLL_READY) == 0) + ; No endless loops please. + + udelay(200); + setbits_le32(phy_regs-utmi_pll, VCOCAL_START); + udelay(400); + clrbits_le32(phy_regs-utmi_pll, VCOCAL_START); + + udelay(200); + setbits_le32(phy_regs-utmi_tx, RCAL_START); + udelay(400); + clrbits_le32(phy_regs-utmi_tx, RCAL_START); + + while ((readl(phy_regs-utmi_pll) PLL_READY) == 0) + ; +} DTTO M ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [v2 2/4] USB: Armada100: ECHI Driver for Armada100 SOCs
This patch adds support for USB EHCI driver for Armada100 SOCs. Fix the subject, you have ECHI written there ;-) Signed-off-by: Ajay Bhargav ajay.bhar...@einfochips.com --- Changes for v2: - Fix typo for SOC name - change printf to debug arch/arm/include/asm/arch-armada100/armada100.h |1 + drivers/usb/host/Makefile |1 + drivers/usb/host/ehci-armada100.c | 62 +++ 3 files changed, 64 insertions(+), 0 deletions(-) create mode 100644 drivers/usb/host/ehci-armada100.c diff --git a/arch/arm/include/asm/arch-armada100/armada100.h b/arch/arm/include/asm/arch-armada100/armada100.h index 70fba27..614de55 100644 --- a/arch/arm/include/asm/arch-armada100/armada100.h +++ b/arch/arm/include/asm/arch-armada100/armada100.h @@ -68,6 +68,7 @@ #define ARMD1_SSP5_BASE 0xD4021000 #define ARMD1_UART3_BASE 0xD4026000 #define ARMD1_MPMU_BASE 0xD405 +#define ARMD1_USB_HOST_BASE 0xD4209000 #define ARMD1_APMU_BASE 0xD4282800 #define ARMD1_CPU_BASE 0xD4282C00 diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile index 7c4df53..5fdc97b 100644 --- a/drivers/usb/host/Makefile +++ b/drivers/usb/host/Makefile @@ -35,6 +35,7 @@ COBJS-$(CONFIG_USB_SL811HS) += sl811-hcd.o # echi COBJS-$(CONFIG_USB_EHCI) += ehci-hcd.o +COBJS-$(CONFIG_USB_EHCI_ARMADA100) += ehci-armada100.o utmi-armada100.o ifdef CONFIG_MPC512X COBJS-$(CONFIG_USB_EHCI_FSL) += ehci-mpc512x.o else diff --git a/drivers/usb/host/ehci-armada100.c b/drivers/usb/host/ehci-armada100.c new file mode 100644 index 000..cfe159d --- /dev/null +++ b/drivers/usb/host/ehci-armada100.c @@ -0,0 +1,62 @@ +/* + * (C) Copyright 2012 + * eInfochips Ltd. www.einfochips.com + * Written-by: Ajay Bhargav ajay.bhar...@einfochips.com + * + * This driver is based on Kirkwood echi driver + * (C) Copyright 2009 + * Marvell Semiconductor www.marvell.com + * Written-by: Prafulla Wadaskar prafu...@marvell.com + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301 USA + */ + +#include common.h +#include asm/io.h +#include usb.h +#include ehci.h +#include ehci-core.h +#include asm/arch/cpu.h +#include asm/arch/armada100.h +#include utmi-armada100.h Where does this include come from? Maybe this should be part of the platform includes in asm/arch/... and accessed as such too? M + +/* + * EHCI host controller init + */ +int ehci_hcd_init(void) +{ + utmi_init(); + hccr = (struct ehci_hccr *)(ARMD1_USB_HOST_BASE + 0x100); + hcor = (struct ehci_hcor *)((uint32_t) hccr + + HC_LENGTH(ehci_readl(hccr-cr_capbase))); + + debug(armada100-ehci: init hccr %x and hcor %x hc_length %d\n, + (uint32_t)hccr, (uint32_t)hcor, + (uint32_t)HC_LENGTH(ehci_readl(hccr-cr_capbase))); + + return 0; +} + +/* + * EHCI host controller stop + */ +int ehci_hcd_stop(void) +{ + return 0; +} ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [v2 3/4] Armada100: gplugD: Add USB command support
This patch adds support for USB commands and USB storage device for Marvell gplugD Signed-off-by: Ajay Bhargav ajay.bhar...@einfochips.com --- Changes for v2: - removed unwanted ifdef - fat and ext2 command support moved to new patch include/configs/gplugd.h | 12 1 files changed, 12 insertions(+), 0 deletions(-) Acked-by: Marek Vasut ma...@denx.de diff --git a/include/configs/gplugd.h b/include/configs/gplugd.h index 9813309..061ebe6 100644 --- a/include/configs/gplugd.h +++ b/include/configs/gplugd.h @@ -72,6 +72,7 @@ #define CONFIG_CMD_I2C #define CONFIG_CMD_AUTOSCRIPT #undef CONFIG_CMD_FPGA +#define CONFIG_CMD_USB /* Disable DCACHE */ #define CONFIG_SYS_DCACHE_OFF @@ -134,4 +135,15 @@ #define CONFIG_CMD_EDITENV #define CONFIG_CMD_SAVEENV +#ifdef CONFIG_CMD_USB +#define CONFIG_USB_EHCI +#define CONFIG_USB_EHCI_ARMADA100 +#define CONFIG_EHCI_IS_TDI +#define CONFIG_USB_STORAGE +#endif /* CONFIG_CMD_USB */ + +#define CONFIG_DOS_PARTITION +#define CONFIG_ISO_PARTITION +#define CONFIG_SUPPORT_VFAT + #endif /* __CONFIG_GPLUGD_H */ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [v2 4/4] Armada100: gplugD: Add FAT EXT2 command support
This patch adds FAT and ext2 command support for marvell gplugD Signed-off-by: Ajay Bhargav ajay.bhar...@einfochips.com --- Changes for v2: - added this new patch for command support include/configs/gplugd.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/configs/gplugd.h b/include/configs/gplugd.h index 061ebe6..462cc7e 100644 --- a/include/configs/gplugd.h +++ b/include/configs/gplugd.h @@ -73,6 +73,8 @@ #define CONFIG_CMD_AUTOSCRIPT #undef CONFIG_CMD_FPGA #define CONFIG_CMD_USB +#define CONFIG_CMD_EXT2 +#define CONFIG_CMD_FAT /* Disable DCACHE */ #define CONFIG_SYS_DCACHE_OFF Just squash it with the previous patch, it's related to it anyway ;-) ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Luna Pier u-boot addition
Hello to u-boot community, My name is Zoran Stojsavljevic, and I work for Intel GmbH, IMU office here in Munich. Let me introduce the problem, some USA team are facing with Luna Pier platform (Valleyview Atom D525 + ICH8 IOCH). One of the Intel customers is running Wind River Linux (WR 4.3.0.0 which is somehow already outdated kernel 2.6.34.10, by Linux Community wise). Good thing about 2.6.34.10 that it is stable and well supported. As BSP vehicle to boot to Linux Intel is using BLDK1, form of BIOS, which is fully equipped with MRC (Memory Reference Model), then with UEFI phase, DXI phase, and OS boot preload phase (to make it much simpler). ;) The customer is asking for u-boot, to be consistent with Linux environment. Now, I somehow know a bit the u-boot environment (worked with Denx in 2003 and also for x-loader and u-boot on Android based 2.6.35.7 kernel, introduced by TI in 2010/11). I have dilemma how to do architecting on u-boot for Luna Pier platform, so here is what I am facing, options (IMHO): [1] BLDK1 is a Boeing 747, fully equipped, while u-boot is Cessna. BLDK1 performs fully platform initialization and testing, while u-boot initializes only minimum HW to make Linux run. In this respect, anybody who will write code for u-boot for Luna Pier does not need all BLDK1, just very tiny portion of it. The minimum HW initialization (ICH driver and standard u-boot additions to should be enough), added as source code (I assume u-boot belongs to GPL licenses); [2] It could be done in different fashion: to encapsulate whole BLDK1 under u-boot, but I am not certain how the architecture of this will look like. The idea is to hide bldk1.exe under some APIs (yes, the binary code, since I am 100% certain Intel will NOT allow BLDK1 source code to be released in Public). In other words, it is as you will mask Formula 1 engine under the hood of VW Beetle. :) I am seeking advice. Any another proposal for the given architecture, and/or Pros and Cons for [1] and [2]? Looking forward to hear any viable advise, proposal, or elaboration how to architect [2], if the conditions outlined By me are acceptable? Thank you, Zoran Stojsavljevic, Intel GmbH -- Intel GmbH Dornacher Strasse 1 85622 Feldkirchen/Muenchen, Deutschland Sitz der Gesellschaft: Feldkirchen bei Muenchen Geschaeftsfuehrer: Douglas Lusk, Peter Gleissner, Hannes Schwaderer Registergericht: Muenchen HRB 47456 Ust.-IdNr./VAT Registration No.: DE129385895 Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [v2 4/4] Armada100: gplugD: Add FAT EXT2 command support
-Original Message- From: Marek Vasut [mailto:ma...@denx.de] Sent: 13 February 2012 14:35 To: Ajay Bhargav Cc: li...@bohmer.net; Prafulla Wadaskar; u-boot@lists.denx.de Subject: Re: [v2 4/4] Armada100: gplugD: Add FAT EXT2 command support This patch adds FAT and ext2 command support for marvell gplugD Signed-off-by: Ajay Bhargav ajay.bhar...@einfochips.com --- Changes for v2: - added this new patch for command support include/configs/gplugd.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/configs/gplugd.h b/include/configs/gplugd.h index 061ebe6..462cc7e 100644 --- a/include/configs/gplugd.h +++ b/include/configs/gplugd.h @@ -73,6 +73,8 @@ #define CONFIG_CMD_AUTOSCRIPT #undef CONFIG_CMD_FPGA #define CONFIG_CMD_USB +#define CONFIG_CMD_EXT2 +#define CONFIG_CMD_FAT /* Disable DCACHE */ #define CONFIG_SYS_DCACHE_OFF Just squash it with the previous patch, it's related to it anyway ;- Or you may exclude this patch from this series and post it as a standalone patch (in fact it is). Regards.. Prafulla . . . ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] Tricorder: Store ecc data on stack
This patch removes ONFIG_SYS_NAND_ECCSTEPS and CONFIG_SYS_NAND_ECCTOTAL from tricorder config. The ecc data are stored on stack after: commit 25efd99dbb1352314c9eacdfae42064c2ca15499 nand_spl: store ecc data on the stack Signed-off-by: Thomas Weber we...@corscience.de --- include/configs/tricorder.h |5 - 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/include/configs/tricorder.h b/include/configs/tricorder.h index 0e8003f..a2bff2b 100644 --- a/include/configs/tricorder.h +++ b/include/configs/tricorder.h @@ -305,11 +305,6 @@ #define CONFIG_SYS_NAND_ECCSIZE512 #define CONFIG_SYS_NAND_ECCBYTES 3 -#define CONFIG_SYS_NAND_ECCSTEPS (CONFIG_SYS_NAND_PAGE_SIZE / \ - CONFIG_SYS_NAND_ECCSIZE) -#define CONFIG_SYS_NAND_ECCTOTAL (CONFIG_SYS_NAND_ECCBYTES * \ - CONFIG_SYS_NAND_ECCSTEPS) - #define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE #define CONFIG_SYS_NAND_U_BOOT_OFFS0x8 -- 1.7.8.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [v2 1/4] USB: Armada100: Add UTMI PHY interface driver
On Monday 13 February 2012 02:32 PM, Marek Vasut wrote: + /* Calibrate pll */ + while ((readl(phy_regs-utmi_pll) PLL_READY) == 0) + ; No endless loops please. missed it somehow... :) will fix Regards, Ajay Bhargav ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [v2 2/4] USB: Armada100: ECHI Driver for Armada100 SOCs
On Monday 13 February 2012 02:33 PM, Marek Vasut wrote: This patch adds support for USB EHCI driver for Armada100 SOCs. Fix the subject, you have ECHI written there ;-) what a blunder :) [...snip...] +#includecommon.h +#includeasm/io.h +#includeusb.h +#include ehci.h +#include ehci-core.h +#includeasm/arch/cpu.h +#includeasm/arch/armada100.h +#include utmi-armada100.h Where does this include come from? Maybe this should be part of the platform includes in asm/arch/... and accessed as such too? M Utmi might not be required outside usb.. so its always a part of USB. Do i really need to keep it out? Regards, Ajay Bhargav ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [v2 4/4] Armada100: gplugD: Add FAT EXT2 command support
On Monday 13 February 2012 02:59 PM, Prafulla Wadaskar wrote: -Original Message- From: Marek Vasut [mailto:ma...@denx.de] Sent: 13 February 2012 14:35 To: Ajay Bhargav Cc: li...@bohmer.net; Prafulla Wadaskar; u-boot@lists.denx.de Subject: Re: [v2 4/4] Armada100: gplugD: Add FAT EXT2 command support This patch adds FAT and ext2 command support for marvell gplugD Signed-off-by: Ajay Bhargavajay.bhar...@einfochips.com --- Changes for v2: - added this new patch for command support include/configs/gplugd.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/configs/gplugd.h b/include/configs/gplugd.h index 061ebe6..462cc7e 100644 --- a/include/configs/gplugd.h +++ b/include/configs/gplugd.h @@ -73,6 +73,8 @@ #define CONFIG_CMD_AUTOSCRIPT #undef CONFIG_CMD_FPGA #define CONFIG_CMD_USB +#define CONFIG_CMD_EXT2 +#define CONFIG_CMD_FAT /* Disable DCACHE */ #define CONFIG_SYS_DCACHE_OFF Just squash it with the previous patch, it's related to it anyway ;- Or you may exclude this patch from this series and post it as a standalone patch (in fact it is). Regards.. Prafulla . . . I better send a new one :) out of this patch series. Regards, Ajay Bhargav ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] fix CFI flash driver for 8-bit bus support
Dear Luka Perkov, In message 20120213013045.ga25...@w500.lan you wrote: I'm not the author of version v1 of this patch but I need it to add support for a new board. You can see patch v1 discussion here: http://lists.denx.de/pipermail/u-boot/2011-April/089606.html Changes from v1: * fix whitespaces * remove udelay(1); calls because they have been merged in a90b9575f3ff71de58672295504e9ebaa8f051b4 * remove reset call in flash_erase() Originally it was signed of by Aaron. Patch change log and your comments do not belong into the commit message; these should co into the comment section (below the --- line). Instead, please add a description of the exact problem you are trying to fix. index 722c3fc..55d866e 100644 --- a/drivers/mtd/cfi_flash.c +++ b/drivers/mtd/cfi_flash.c @@ -11,6 +11,9 @@ * Copyright (C) 2006 * Tolunay Orkun listmem...@orkun.us * + * Copyright (C) 2011 Cavium Networks, Inc. + * Aaron Williams aaron.willi...@caviumnetworks.com We don't add (C) entries for minor patches - your credits are sufficiently recorded in the git commit log. static inline void flash_unmap(flash_info_t *info, flash_sect_t sect, @@ -398,6 +403,8 @@ void flash_write_cmd (flash_info_t * info, flash_sect_t sect, #endif flash_write64(cword.ll, addr); break; + default: + debug (fwc: Unknown port width %d\n, info-portwidth); This makes little sense. If this is a possible error, it should be a printf(). But is it? /* Ensure all the instructions are fully finished */ @@ -585,7 +592,6 @@ static int flash_status_check (flash_info_t * info, flash_sect_t sector, prompt, info-start[sector], flash_read_long (info, sector, 0)); flash_write_cmd (info, sector, 0, info-cmd_reset); - udelay(1); This is an unrelated change. It has no place in this patch. Please submit separately, with respective comments for why uyou are doing this, if you really want to change this. static flash_sect_t find_sector (flash_info_t * info, ulong addr) { static flash_sect_t saved_sector = 0; /* previously found sector */ - static flash_info_t *saved_info = 0; /* previously used flash bank */ flash_sect_t sector = saved_sector; - if ((info != saved_info) || (sector = info-sector_count)) - sector = 0; I think this is bogus. Please clean up your patch! saved_sector = sector; - saved_info = info; Ditto. @@ -1586,8 +1594,7 @@ static void cmdset_amd_read_jedec_ids(flash_info_t *info) flash_unlock_seq(info, 0); flash_write_cmd(info, 0, info-addr_unlock1, FLASH_CMD_READ_ID); udelay(1000); /* some flash are slow to respond */ - - manuId = flash_read_uchar (info, FLASH_OFFSET_MANUFACTURER_ID); + manuId = flash_read_uchar(info, FLASH_OFFSET_MANUFACTURER_ID); Coding style cleanups should go in a separate patch. In any case, keep the blank line. /* JEDEC JEP106Z specifies ID codes up to bank 7 */ while (manuId == FLASH_CONTINUATION_CODE bankId 0x800) { bankId += 0x100; @@ -1741,7 +1748,7 @@ static void flash_read_cfi (flash_info_t *info, void *buf, unsigned int i; for (i = 0; i len; i++) - p[i] = flash_read_uchar(info, start + i); + p[i] = flash_read_uchar(info, start + (i * 2)); On which systems / in which configurations has this code been tested? void __flash_cmd_reset(flash_info_t *info) @@ -1762,21 +1769,38 @@ static int __flash_detect_cfi (flash_info_t * info, struct cfi_qry *qry) { int cfi_offset; - /* Issue FLASH reset command */ - flash_cmd_reset(info); really? for (cfi_offset=0; cfi_offset sizeof(flash_offset_cfi) / sizeof(uint); cfi_offset++) { + /* Issue FLASH reset command */ + flash_cmd_reset(info); really?? if (flash_isequal (info, 0, FLASH_OFFSET_CFI_RESP, 'Q') - flash_isequal (info, 0, FLASH_OFFSET_CFI_RESP + 1, 'R') - flash_isequal (info, 0, FLASH_OFFSET_CFI_RESP + 2, 'Y')) { + flash_isequal (info, 0, FLASH_OFFSET_CFI_RESP + 2, 'R') + flash_isequal (info, 0, FLASH_OFFSET_CFI_RESP + 4, 'Y')) { flash_read_cfi(info, qry, FLASH_OFFSET_CFI_RESP, sizeof(struct cfi_qry)); Where has this been tested? + /* Some flash chips can support multiple bus widths. + * In this case, override the interface width and + * limit it to the port width. + */ Incorrect multiline comment style. + if ((info-interface == FLASH_CFI_X8X16) + (info-portwidth == FLASH_CFI_8BIT)) { +
Re: [U-Boot] OMAP USB, beagle-xm fail
Hello Govindraj, Looking into it closely the below two patches are causing this issue: commit 498cbdfe62a8330f6c89765bdd15e60328a26511 commit 2faa76196af4b3e93bcb9e38ed9090cbd3b06db3 Reverting these two patches I don't see these errors on my beagle rev c board logs as in here [1] correct, thank you for pointing this out! works again without those two i2c-related patches btw, usb error printed is a musb error not the ehci host error. I missed that thanks, regards, p. -- Peter Meerwald +43-664-218 (mobile) ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] OMAP USB, beagle-xm fail
Hi Govindraj, On Mon, Feb 13, 2012 at 14:29:56, Govindraj wrote: Hi Peter, On Mon, Feb 13, 2012 at 1:52 PM, Peter Meerwald pme...@pmeerw.net wrote: Hello, the recent OMAP USB changes (43b62393da6dfdd7f503d1b37344463a05ea47b5, 29321c0518d99494ab2a250e5b4f75b3add83b11) fail on beagleboard-xm rev. C, see below The errors have nothing to do with ehci patch merges, (I had tested it on beagle rev c board before posting it out) Looking into it closely the below two patches are causing this issue: [...] commit 498cbdfe62a8330f6c89765bdd15e60328a26511 Author: Patil, Rachna rac...@ti.com Date: Sun Jan 22 23:46:23 2012 + ARM: AM33XX: Add AM33XX I2C driver support commit 2faa76196af4b3e93bcb9e38ed9090cbd3b06db3 Author: Patil, Rachna rac...@ti.com Date: Sun Jan 22 23:44:12 2012 + ARM: I2C: I2C Multi byte address support [...] Reverting these two patches I don't see these errors on my beagle rev c board logs as in here [1] I have tested these patches on AM335x EVM, AM335x Beaglebone and OMAP35xx. I did not face any issues w.r.t these EVM's. I tried i2c probe, read/write and all of it worked as expected. Also from the logs in [1] I still see an I2C error wait_for_bb: I2C_STAT=1000, which is bus busy indication. Regards, Rachna. btw, usb error printed is a musb error not the ehci host error. -- Thanks, Govindraj.R [1]: U-Boot SPL 2011.12-00325-g146ff78 (Feb 13 2012 - 14:18:55) Texas Instruments Revision detection unimplemented OMAP SD/MMC: 0 timed out in wait_for_bb: I2C_STAT=1000 reading u-boot.img reading u-boot.img U-Boot 2011.12-00325-g146ff78 (Feb 13 2012 - 14:18:55) OMAP3630/3730-GP ES1.2, CPU-OPP2, L3-165MHz, Max CPU Clock 1 Ghz OMAP3 Beagle board + LPDDR/NAND I2C: ready DRAM: 512 MiB NAND: 0 MiB MMC: OMAP SD/MMC: 0 *** Warning - readenv() failed, using default environment In:serial Out: serial Err: serial Beagle xM Rev C No EEPROM on expansion board Die ID #79e200229ff80163810c0d021023 Net: Net Initialization Skipped No ethernet found. Hit any key to stop autoboot: 0 OMAP3 beagleboard.org # OMAP3 beagleboard.org # setenv usbethaddr 0:0:1:2:3:4;usb start; (Re)start USB... USB: Register 1313 NbrPorts 3 USB EHCI 1.00 scanning bus for devices... 3 USB Device(s) found scanning bus for storage devices... 0 Storage Device(s) found scanning bus for ethernet devices... 1 Ethernet Device(s) found OMAP3 beagleboard.org # regards, p. U-Boot SPL 2011.12-00326-gdda8078 (Feb 13 2012 - 09:15:55) Texas Instruments Revision detection unimplemented OMAP SD/MMC: 0 timed out in wait_for_status_mask: I2C_STAT=1010 timed out in wait_for_status_mask: I2C_STAT=1010 reading u-boot.img reading u-boot.img U-Boot 2011.12-00326-gdda8078 (Feb 13 2012 - 09:15:55) OMAP36XX/37XX-GP ES1.2, CPU-OPP2, L3-165MHz, Max CPU Clock 1 Ghz OMAP3 Beagle board + LPDDR/NAND I2C: ready DRAM: 512 MiB NAND: 0 MiB MMC: OMAP SD/MMC: 0 *** Warning - readenv() failed, using default environment timed out in wait_for_status_mask: I2C_STAT=1410 timed out in wait_for_status_mask: I2C_STAT=1410 timed out in wait_for_status_mask: I2C_STAT=1410 timed out in wait_for_status_mask: I2C_STAT=1410 timed out in wait_for_status_mask: I2C_STAT=1410 timed out in wait_for_status_mask: I2C_STAT=1410 timed out in wait_for_status_mask: I2C_STAT=1410 timed out in wait_for_status_mask: I2C_STAT=1410 timed out in wait_for_status_mask: I2C_STAT=1410 timed out in wait_for_status_mask: I2C_STAT=1410 timed out in wait_for_status_mask: I2C_STAT=1410 timed out in wait_for_status_mask: I2C_STAT=1410 TWL4030:USB:Write[0xfd] Error 1 timed out in wait_for_status_mask: I2C_STAT=1410 TWL4030:USB:Write[0xfe] Error 1 timed out in wait_for_status_mask: I2C_STAT=1410 TWL4030:USB:Write[0xfe] Error 1 -- Peter Meerwald +43-664-218 (mobile) ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Password protection of U-Boot command line
Hi Wolfgang, On 02/13/2012 06:31 PM, Wolfgang Denk wrote: So basically you are suggesting to completely remove shell access in U-Boot which is one thing that make U-Boot so attractive. Not remove it, but don't give the user an interactive shell when he is running in production mode. You can then still use it in scripts, or when you switch to test mode (which should be doen through a jumper or hardware dongle or similar, as discussed previously). Ah, so there will still be a 'gate' beyond which access must be validated. You are suggesting a hardware check of a GPIO pin or, if the hardware does not provide for that, maybe a serial or USB dongle... That is no less complex (and in the USB case actually much more complex) than what I was suggesting - In the dongle case you need to read and validate the dongle then flag to U-Boot that it is OK to enter command line GPIO case is the same, you need to read the GPIO pin and if not set, skip entering command line Again, my suggestion was, prior to entering command line, require a password to be entered - If the hash of the password matches a given environment variable, do exactly what the GPIO or dongle read returned true - enter unrestricted command line We have only checksumming. We do not have any kind of key management whatever. Why do we need key management - We aren't doing any decrypting (I'm not suggesting 'Secure Boot' here). All we are doing is comparing two passwords which we can use secure hashing functions like SHA or MD5 for password = key. How are going to manage these? I've said before, a hash of the password as an environment variable You don't have to open access to such things that need to be protected. It is way easier not to provide such access at all then to try and protect it with a password. Again, you are suggesting removing functionality that attract people to U-Boot You don't understand. Adding security _always_ means removing certain convenient features. Having a powerful, flexible tool that allows the user to do about everything and defining a secure environment where a specific user has only a well-defined set of capabilities are mutually exclusive by definition. Well that (level based access to individual commands) was only a wild speculation on the future. My initial thought was just a simple gate prior to U-Boot getting to command line - Basically just a password hash validation in place of the existing 'abort auto-boot string' compare which is easily circumvented by obtaining the source code If you buy a CoTS OS for your embedded system, it may not come with a command line, let alone the tools already provided in U-Boot. So you then have the additional development cost of implementing all those features - Use Linux, then. fine if your firmware is open source (you can just use the U-Boot code) but if those features need to be integrated into the CoTS source code, you have to go it alone (most PLC/RTU CoTS OSs are just a library that you link in your code to produce a single, monotomic binary so using GPL code is out of the question in those cases) Ah! So your problem is that you want to do inappropriate things because your crappy, proprietary RTOS prevents you from doing the rights things. No, not me - I'm not in that game. I'm just playing devils advocate because I know how these things work in the real world - GNU/Linux uptake is pitifully low :( I'm sorry, but I don't commiserate with you about that. Understood :) And if the OS you used does not have a command line, you have to implement that on top - Often a non-trivial endeavour It would be a totally wrong conclusion, though, to try to turn the boot loader in a wannabe OS just because it is more useful and capable than your RTOS. There is no 'wannabe OS' about it - It is a simple 'enter a string-hash-compare' if equal, drop to command line, if not, loop back If your RTOS does not stand to your requirements, then fix the cause of the problem, i. e. use a more capable OS. Better that the security be developed, analysed and maintained by a large group of open eyes than trusting your dev group of maybe two or three people get it right... Agreed. Which is excatly why I prefer Free Software whenever it comes to security, crypto-technology etc. 100% Agree Regards, Graeme ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] mx6: consolidating and extending anadig/analog/anatop register defs
Hello, for the USB support on MX6Q, I'm trying to consolidate and extend the register definitions for the ANADIG registers. Unfortunately, three different names are used for the same registers: ANADIG, analog and ANATOP. Any idea what the names do stand for and what would be the most appropriate one. Apart from that, we should have a separate structure and header file for these registers. Currently, they are added to the CCM regs. Wolfgang. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] sh: Fix sh7264 clock speed and related serial setting
The generalised calculation of the serial bit rate reg also applies to sh7264, it was just the clock speed that was set incorrectly. Signed-off-by: Phil Edworthy phil.edwor...@renesas.com --- drivers/serial/serial_sh.h |2 -- include/configs/rsk7264.h |2 +- 2 files changed, 1 insertions(+), 3 deletions(-) diff --git a/drivers/serial/serial_sh.h b/drivers/serial/serial_sh.h index 4e16e48..0b3e779 100644 --- a/drivers/serial/serial_sh.h +++ b/drivers/serial/serial_sh.h @@ -686,8 +686,6 @@ static inline int scbrr_calc(struct uart_port port, int bps, int clk) #define SCBRR_VALUE(bps, clk) scbrr_calc(sh_sci, bps, clk) #elif defined(__H8300H__) || defined(__H8300S__) #define SCBRR_VALUE(bps, clk) (((clk*1000/32)/bps)-1) -#elif defined(CONFIG_CPU_SH7264) -#define SCBRR_VALUE(bps, clk) ((clk+16*bps)/(32*bps)) #else /* Generic SH */ #define SCBRR_VALUE(bps, clk) ((clk+16*bps)/(32*bps)-1) #endif diff --git a/include/configs/rsk7264.h b/include/configs/rsk7264.h index c1ffc34..af9524e 100644 --- a/include/configs/rsk7264.h +++ b/include/configs/rsk7264.h @@ -65,7 +65,7 @@ #define CONFIG_ENV_SIZECONFIG_ENV_SECT_SIZE /* Board Clock */ -#define CONFIG_SYS_CLK_FREQ +#define CONFIG_SYS_CLK_FREQ3600 #define CMT_CLK_DIVIDER32 /* 8 (default), 32, 128 or 512 */ #define CONFIG_SYS_HZ (CONFIG_SYS_CLK_FREQ / CMT_CLK_DIVIDER) -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] mx6: consolidating and extending anadig/analog/anatop register defs
Hello, for the USB support on MX6Q, I'm trying to consolidate and extend the register definitions for the ANADIG registers. Unfortunately, three different names are used for the same registers: ANADIG, analog and ANATOP. Any idea what the names do stand for and what would be the most appropriate one. Apart from that, we should have a separate structure and header file for these registers. Currently, they are added to the CCM regs. DIGCTL? ;-) That's how they call those on MX28 I believe. M ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] USB support in U-boot for MX23EVK board
Hi, I'm struggling to find USB support in U-Boot for MX23EVK board. I'm building u-boot source using LTIB(L2.6.31_10.05.02_ER_source.tar downloaded from internet). Please use ELDK, 5.1 is preffered as that's the latest version. LTIB is ancient crap. I'm able to find USB driver(i.e., ehci-hcd.c file) in U-Boot source 2009.08. Oh come on ... git clone git://git.denx.de/u-boot-imx.git But usb_init function call is not made in board_init function in the corresponding board specific file (evk23_evk.c). Could you help me finding what could be done for enabling USB support in u-boot to support for ARM based mx23evk board. Yes, use the above, for the reference, you can use board/denx/m28evk M Thanks and Regards, Shilpa DISCLAIMER: This email may contain confidential information and is intended only for the use of the specific individual(s) to which it is addressed. If you are not the intended recipient of this email, you are hereby notified that any unauthorized use, dissemination or copying of this email or the information contained in it or attached to it is strictly prohibited. If you received this message in error, please immediately notify the sender at Infotech or mail.ad...@infotech-enterprises.com and delete the original message. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] Tricorder: Switch env to generic mmc driver
Because the tricorder uses the CONFIG_OMAP_HSMMC the initialization command is mmc rescan and not mmc init. Signed-off-by: Thomas Weber we...@corscience.de --- include/configs/tricorder.h |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/configs/tricorder.h b/include/configs/tricorder.h index a2bff2b..1ef0d43 100644 --- a/include/configs/tricorder.h +++ b/include/configs/tricorder.h @@ -161,6 +161,7 @@ #define CONFIG_EXTRA_ENV_SETTINGS \ loadaddr=0x8200\0 \ console=ttyO2,115200n8\0 \ + mmcdev=0\0 vram=12M\0 \ lcdmode=800x600\0 \ defaultdisplay=lcd\0 \ @@ -183,10 +184,10 @@ root=ubi0:rootfs \ rootfstype=ubifs \ ${kernelopts}\0 \ - loadbootscript=fatload mmc 0 ${loadaddr} boot.scr\0 \ + loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0 \ bootscript=echo Running bootscript from mmc ...; \ source ${loadaddr}\0 \ - loaduimage=fatload mmc 0 ${loadaddr} uImage\0 \ + loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0 \ eraseenv=nand unlock 0x26 0x2; nand erase 0x26 0x2\0 \ mmcboot=echo Booting from mmc ...; \ run mmcargs; \ @@ -195,7 +196,7 @@ run nandargs; \ nand read ${loadaddr} 28 40; \ bootm ${loadaddr}\0 \ - autoboot=if mmc init 0; then \ + autoboot=if mmc rescan ${mmcdev}; then \ if run loadbootscript; then \ run bootscript; \ else \ -- 1.7.8.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [v3 1/3] USB: Armada100: Add UTMI PHY interface driver
This patch adds USB host controller's UTMI PHY interface driver for Armada100 SOCs. Signed-off-by: Ajay Bhargav ajay.bhar...@einfochips.com --- Changes for v2: - Fix: enable only required clock in MPMU Changes for v3: - Added timeout on while loops - moved utmi-armada100.h to arch include folder arch/arm/include/asm/arch-armada100/armada100.h|8 ++ .../include/asm/arch-armada100/utmi-armada100.h| 79 drivers/usb/host/utmi-armada100.c | 96 3 files changed, 183 insertions(+), 0 deletions(-) create mode 100644 arch/arm/include/asm/arch-armada100/utmi-armada100.h create mode 100644 drivers/usb/host/utmi-armada100.c diff --git a/arch/arm/include/asm/arch-armada100/armada100.h b/arch/arm/include/asm/arch-armada100/armada100.h index 0ed3a8e..70fba27 100644 --- a/arch/arm/include/asm/arch-armada100/armada100.h +++ b/arch/arm/include/asm/arch-armada100/armada100.h @@ -43,6 +43,14 @@ #define SSP2_APBCLK0x01 #define SSP2_FNCLK 0x02 +/* USB Clock/reset control bits */ +#define USB_SPH_AXICLK_EN 0x10 +#define USB_SPH_AXI_RST0x02 + +/* MPMU Clocks */ +#define APB2_26M_EN(1 20) +#define AP_26M (1 4) + /* Register Base Addresses */ #define ARMD1_DRAM_BASE0xB000 #define ARMD1_FEC_BASE 0xC080 diff --git a/arch/arm/include/asm/arch-armada100/utmi-armada100.h b/arch/arm/include/asm/arch-armada100/utmi-armada100.h new file mode 100644 index 000..dd0ccdb --- /dev/null +++ b/arch/arm/include/asm/arch-armada100/utmi-armada100.h @@ -0,0 +1,79 @@ +/* + * (C) Copyright 2012 + * eInfochips Ltd. www.einfochips.com + * Written-by: Ajay Bhargav ajay.bhar...@einfochips.com + * + * (C) Copyright 2009 + * Marvell Semiconductor www.marvell.com + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301 USA + */ + +#ifndef __UTMI_ARMADA100__ +#define __UTMI_ARMADA100__ + +#define UTMI_PHY_BASE 0xD4206000 + +/* utmi_ctrl - bits */ +#define INPKT_DELAY_SOF(1 28) +#define PLL_PWR_UP 2 +#define PHY_PWR_UP 1 + +/* utmi_pll - bits */ +#define PLL_FBDIV_MASK 0x0FF0 +#define PLL_FBDIV 4 +#define PLL_REFDIV_MASK0x000F +#define PLL_REFDIV 0 +#define PLL_READY 0x80 +#define VCOCAL_START (1 21) + +#define N_DIVIDER 0xEE +#define M_DIVIDER 0x0B + +/* utmi_tx - bits */ +#define CK60_PHSEL 17 +#define PHSEL_VAL 0x4 +#define RCAL_START (1 12) + +/* + * USB PHY registers + * Refer Datasheet Appendix A.21 + */ +struct armd1usb_phy_reg { + u32 utmi_rev; /* USB PHY Revision */ + u32 utmi_ctrl; /* USB PHY Control register */ + u32 utmi_pll; /* PLL register */ + u32 utmi_tx;/* Tx register */ + u32 utmi_rx;/* Rx register */ + u32 utmi_ivref; /* IVREF register */ + u32 utmi_tst_g0;/* Test group 0 register */ + u32 utmi_tst_g1;/* Test group 1 register */ + u32 utmi_tst_g2;/* Test group 2 register */ + u32 utmi_tst_g3;/* Test group 3 register */ + u32 utmi_tst_g4;/* Test group 4 register */ + u32 utmi_tst_g5;/* Test group 5 register */ + u32 utmi_reserve; /* Reserve Register */ + u32 utmi_usb_int; /* USB interuppt register */ + u32 utmi_dbg_ctl; /* Debug control register */ + u32 utmi_otg_addon; /* OTG addon register */ +}; + +int utmi_init(void); + +#endif /* __UTMI_ARMADA100__ */ diff --git a/drivers/usb/host/utmi-armada100.c b/drivers/usb/host/utmi-armada100.c new file mode 100644 index 000..124fa8f --- /dev/null +++ b/drivers/usb/host/utmi-armada100.c @@ -0,0 +1,96 @@ +/* + * (C) Copyright 2012 + * eInfochips Ltd. www.einfochips.com + * Written-by: Ajay Bhargav ajay.bhar...@einfochips.com + * + * (C) Copyright 2009 + * Marvell Semiconductor www.marvell.com + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the
[U-Boot] [v3 2/3] USB: Armada100: EHCI Driver for Armada100 SOCs
This patch adds support for USB EHCI driver for Armada100 SOCs. Signed-off-by: Ajay Bhargav ajay.bhar...@einfochips.com --- Changes for v2: - Fix typo for SOC name - change printf to debug Changes for v3: - Fix type in patch subject - header file include updated arch/arm/include/asm/arch-armada100/armada100.h |1 + drivers/usb/host/Makefile |1 + drivers/usb/host/ehci-armada100.c | 64 +++ 3 files changed, 66 insertions(+), 0 deletions(-) create mode 100644 drivers/usb/host/ehci-armada100.c diff --git a/arch/arm/include/asm/arch-armada100/armada100.h b/arch/arm/include/asm/arch-armada100/armada100.h index 70fba27..614de55 100644 --- a/arch/arm/include/asm/arch-armada100/armada100.h +++ b/arch/arm/include/asm/arch-armada100/armada100.h @@ -68,6 +68,7 @@ #define ARMD1_SSP5_BASE0xD4021000 #define ARMD1_UART3_BASE 0xD4026000 #define ARMD1_MPMU_BASE0xD405 +#define ARMD1_USB_HOST_BASE0xD4209000 #define ARMD1_APMU_BASE0xD4282800 #define ARMD1_CPU_BASE 0xD4282C00 diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile index 7c4df53..5fdc97b 100644 --- a/drivers/usb/host/Makefile +++ b/drivers/usb/host/Makefile @@ -35,6 +35,7 @@ COBJS-$(CONFIG_USB_SL811HS) += sl811-hcd.o # echi COBJS-$(CONFIG_USB_EHCI) += ehci-hcd.o +COBJS-$(CONFIG_USB_EHCI_ARMADA100) += ehci-armada100.o utmi-armada100.o ifdef CONFIG_MPC512X COBJS-$(CONFIG_USB_EHCI_FSL) += ehci-mpc512x.o else diff --git a/drivers/usb/host/ehci-armada100.c b/drivers/usb/host/ehci-armada100.c new file mode 100644 index 000..f3d8aef --- /dev/null +++ b/drivers/usb/host/ehci-armada100.c @@ -0,0 +1,64 @@ +/* + * (C) Copyright 2012 + * eInfochips Ltd. www.einfochips.com + * Written-by: Ajay Bhargav ajay.bhar...@einfochips.com + * + * This driver is based on Kirkwood echi driver + * (C) Copyright 2009 + * Marvell Semiconductor www.marvell.com + * Written-by: Prafulla Wadaskar prafu...@marvell.com + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301 USA + */ + +#include common.h +#include asm/io.h +#include usb.h +#include ehci.h +#include ehci-core.h +#include asm/arch/cpu.h +#include asm/arch/armada100.h +#include asm/arch/utmi-armada100.h + +/* + * EHCI host controller init + */ +int ehci_hcd_init(void) +{ + if (utmi_init() 0) + return -1; + + hccr = (struct ehci_hccr *)(ARMD1_USB_HOST_BASE + 0x100); + hcor = (struct ehci_hcor *)((uint32_t) hccr + + HC_LENGTH(ehci_readl(hccr-cr_capbase))); + + debug(armada100-ehci: init hccr %x and hcor %x hc_length %d\n, + (uint32_t)hccr, (uint32_t)hcor, + (uint32_t)HC_LENGTH(ehci_readl(hccr-cr_capbase))); + + return 0; +} + +/* + * EHCI host controller stop + */ +int ehci_hcd_stop(void) +{ + return 0; +} -- 1.7.7.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [v3 3/3] Armada100: gplugD: Add USB command support
This patch adds support for USB commands and USB storage device for Marvell gplugD Signed-off-by: Ajay Bhargav ajay.bhar...@einfochips.com --- Changes for v2: - removed unwanted ifdef - fat and ext2 command support moved to new patch Changes for v3: - Not changed include/configs/gplugd.h | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/include/configs/gplugd.h b/include/configs/gplugd.h index 9813309..061ebe6 100644 --- a/include/configs/gplugd.h +++ b/include/configs/gplugd.h @@ -72,6 +72,7 @@ #define CONFIG_CMD_I2C #define CONFIG_CMD_AUTOSCRIPT #undef CONFIG_CMD_FPGA +#define CONFIG_CMD_USB /* Disable DCACHE */ #define CONFIG_SYS_DCACHE_OFF @@ -134,4 +135,15 @@ #define CONFIG_CMD_EDITENV #define CONFIG_CMD_SAVEENV +#ifdef CONFIG_CMD_USB +#define CONFIG_USB_EHCI +#define CONFIG_USB_EHCI_ARMADA100 +#define CONFIG_EHCI_IS_TDI +#define CONFIG_USB_STORAGE +#endif /* CONFIG_CMD_USB */ + +#define CONFIG_DOS_PARTITION +#define CONFIG_ISO_PARTITION +#define CONFIG_SUPPORT_VFAT + #endif /* __CONFIG_GPLUGD_H */ -- 1.7.7.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] Armada100: gplugD: Add FAT EXT2 command support
This patch adds FAT and ext2 command support for marvell gplugD Signed-off-by: Ajay Bhargav ajay.bhar...@einfochips.com --- include/configs/gplugd.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/configs/gplugd.h b/include/configs/gplugd.h index 061ebe6..462cc7e 100644 --- a/include/configs/gplugd.h +++ b/include/configs/gplugd.h @@ -73,6 +73,8 @@ #define CONFIG_CMD_AUTOSCRIPT #undef CONFIG_CMD_FPGA #define CONFIG_CMD_USB +#define CONFIG_CMD_EXT2 +#define CONFIG_CMD_FAT /* Disable DCACHE */ #define CONFIG_SYS_DCACHE_OFF -- 1.7.7.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Password protection of U-Boot command line
Dear Graeme, In message 4f38f91d.6070...@gmail.com you wrote: Not remove it, but don't give the user an interactive shell when he is running in production mode. You can then still use it in scripts, or when you switch to test mode (which should be doen through a jumper or hardware dongle or similar, as discussed previously). Ah, so there will still be a 'gate' beyond which access must be validated. You are suggesting a hardware check of a GPIO pin or, if the hardware does not provide for that, maybe a serial or USB dongle... USB dongle is definitely on the far end, but why not - if you have such a sort of S M preferences ;-) Normally a jumper or DIP switch would be used - which is trivial to implement. GPIO case is the same, you need to read the GPIO pin and if not set, skip entering command line Which is trivial. Just implement the test in misc_init_r(), and use this to set bootdelay to 0 or -1 or similar. Again, my suggestion was, prior to entering command line, require a password to be entered - If the hash of the password matches a given environment variable, do exactly what the GPIO or dongle read returned true - enter unrestricted command line I understand your proposal, and actually we already have that! See the documentation in doc/README.autoboot But you were talking about security - guess how many of such systems will all run with the very same password? And guess how long it will take until it is publicly known? Even if you extend this feature to store only a hash of the password, and compare the hashes, the fundamental problem will remain: How can you precent that the passwords get faster pblicly known than you can change them? What do you do in case the user forgets the password? Will he have to return his box for repair or even replacement? Of will there be some additional master password which is only known to your field circus engineers (and after a few days to all hackers in the whole world)? password = key. How are going to manage these? I've said before, a hash of the password as an environment variable This does not answer how you intend to handle the obvious problems - see above. Well that (level based access to individual commands) was only a wild speculation on the future. My initial thought was just a simple gate prior to U-Boot getting to command line - Basically just a password hash validation in place of the existing 'abort auto-boot string' compare which is easily circumvented by obtaining the source code You trade one problem for another. Guess how many users will call service because they have forgotten their password settings? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de The glory of creation is in its infinite diversity. And in the way our differences combine to create meaning and beauty. -- Dr. Miranda Jones and Spock, Is There in Truth No Beauty?, stardate 5630.8 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] USB support in U-boot for MX23EVK board
Dear Marek Vasut, In message 201202131335.42773.marek.va...@gmail.com you wrote: But usb_init function call is not made in board_init function in the corresponding board specific file (evk23_evk.c). Could you help me finding what could be done for enabling USB support in u-boot to support for ARM based mx23evk board. Yes, use the above, for the reference, you can use board/denx/m28evk ...but only as a starting point for a new port. i.MX23 is similar to i.MX28 in many areas, but sufficiently different to cause enough problems to a newbie. 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 One possible reason that things aren't going according to plan is that there never was a plan in the first place. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] imximage: Create i.MX6 NOR flash images (was: [PATCH v5 1/1] imximage: Add MX53 boot image support)
Hi Jason, On 19.01.2011 20:40, Jason Liu wrote: This patch add the MX53 boot image support. This patch has been tested on Freescale MX53EVK board and MX51EVK board. Signed-off-by: Jason Liu r64...@freescale.com ... diff --git a/tools/imximage.c b/tools/imximage.c index 39f89c2..8e81bdb 100644 --- a/tools/imximage.c +++ b/tools/imximage.c ... +static void set_imx_hdr_v2(struct imx_header *imxhdr, uint32_t dcd_len, + struct stat *sbuf, + struct mkimage_params *params) +{ ... + /* Set default offset */ + imxhdr-flash_offset = FLASH_OFFSET_STANDARD; I have some doubts that this hard coding (over writing) of imxhdr-flash_offset is correct here. For booting from i.MX6 parallel NOR or NAND, flash_offset is != 0x400 (FLASH_OFFSET_STANDARD). In parse_cfg_cmd() we read the correct flash offset valid for the selected boot device from the configuration: case CMD_BOOT_FROM: imxhdr-flash_offset = get_table_entry_id(imximage_bootops, imximage boot option, token); But this correct flash offset is afterwards overwritten by imxhdr-flash_offset = FLASH_OFFSET_STANDARD; as mentioned above, which I think is wrong. It doesn't matter for all devices which use FLASH_OFFSET_STANDARD (e.g. SD/SPI NOR etc), but it doesn't seem to work for parallel NOR and NAND. What do you think? I will need some time to verify this with a != 0x400 boot device, but as soon as I have this working I will send a patch for the imximage tool. Best regards Dirk Btw.: I'm not sure if the same statement for the v1 header set_imx_hdr_v1() is wrong, too, though? ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] OMAP USB, beagle-xm fail
On Mon, Feb 13, 2012 at 4:46 AM, Patil, Rachna rac...@ti.com wrote: Hi Govindraj, On Mon, Feb 13, 2012 at 14:29:56, Govindraj wrote: Hi Peter, On Mon, Feb 13, 2012 at 1:52 PM, Peter Meerwald pme...@pmeerw.net wrote: Hello, the recent OMAP USB changes (43b62393da6dfdd7f503d1b37344463a05ea47b5, 29321c0518d99494ab2a250e5b4f75b3add83b11) fail on beagleboard-xm rev. C, see below The errors have nothing to do with ehci patch merges, (I had tested it on beagle rev c board before posting it out) Looking into it closely the below two patches are causing this issue: [...] commit 498cbdfe62a8330f6c89765bdd15e60328a26511 Author: Patil, Rachna rac...@ti.com Date: Sun Jan 22 23:46:23 2012 + ARM: AM33XX: Add AM33XX I2C driver support commit 2faa76196af4b3e93bcb9e38ed9090cbd3b06db3 Author: Patil, Rachna rac...@ti.com Date: Sun Jan 22 23:44:12 2012 + ARM: I2C: I2C Multi byte address support [...] Reverting these two patches I don't see these errors on my beagle rev c board logs as in here [1] I have tested these patches on AM335x EVM, AM335x Beaglebone and OMAP35xx. I did not face any issues w.r.t these EVM's. I tried i2c probe, read/write and all of it worked as expected. Also from the logs in [1] I still see an I2C error wait_for_bb: I2C_STAT=1000, which is bus busy indication. To be clear, I assume you're looking for one of the omap37xx platforms to see why the busy changes have broken it. Thanks. -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] am33xx: ddr_defs.h: Change DDR timings
From: Chase Maupin chase.mau...@ti.com * For cold silicon the DDR timings need to be relaxed in order for the device to boot with DDR at 266MHz * Fix proposed by James Doublesin Signed-off-by: Chase Maupin chase.mau...@ti.com --- arch/arm/include/asm/arch-am33xx/ddr_defs.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/arm/include/asm/arch-am33xx/ddr_defs.h b/arch/arm/include/asm/arch-am33xx/ddr_defs.h index ba6b59b..388336f 100644 --- a/arch/arm/include/asm/arch-am33xx/ddr_defs.h +++ b/arch/arm/include/asm/arch-am33xx/ddr_defs.h @@ -36,7 +36,7 @@ #define CMD_FORCE 0x00 #define CMD_DELAY 0x00 -#define EMIF_READ_LATENCY 0x04 +#define EMIF_READ_LATENCY 0x05 #define EMIF_TIM1 0x0666B3D6 #define EMIF_TIM2 0x143731DA #define EMIF_TIM3 0x0347 -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 0/1] am335x_evm: Change MAINTAINERS
Hey all, Chandan has left TI (and didn't leave a new address) so I'm going to take over as maintainer of the board. Thanks! -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] am335x_evm: Change MAINTAINERS entry
Signed-off-by: Tom Rini tr...@ti.com --- MAINTAINERS |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 0a3b39d..c5db24f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -757,10 +757,6 @@ Nagendra T S nagen...@mistralsolutions.com am3517_craneARM ARMV7 (AM35x SoC) -Chandan Nath chandan.n...@ti.com - - am335x_evm ARM ARMV7 (AM33xx Soc) - Kyungmin Park kyungmin.p...@samsung.com apollon ARM1136EJS @@ -798,6 +794,7 @@ Thierry Reding thierry.red...@avionic-design.de Tom Rini tr...@ti.com + am335x_evm ARM ARMV7 (AM33xx Soc) omap3_evm ARM ARMV7 (OMAP3xx SoC) Tom Rix tom@windriver.com -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] omap3_beagle: Change MAINTAINERS entry
Cc: Dirk Behme dirk.be...@gmail.com Signed-off-by: Tom Rini tr...@ti.com --- MAINTAINERS |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index c5db24f..d7875f5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -593,10 +593,6 @@ Enric Balletbo i Serra eballe...@iseebcn.com igep0020ARM ARMV7 (OMAP3xx SoC) igep0030ARM ARMV7 (OMAP3xx SoC) -Dirk Behme dirk.be...@gmail.com - - omap3_beagleARM ARMV7 (OMAP3530 SoC) - Eric Benard e...@eukrea.com cpuat91 ARM920T @@ -795,6 +791,7 @@ Thierry Reding thierry.red...@avionic-design.de Tom Rini tr...@ti.com am335x_evm ARM ARMV7 (AM33xx Soc) + omap3_beagleARM ARMV7 (OMAP3xx SoC) omap3_evm ARM ARMV7 (OMAP3xx SoC) Tom Rix tom@windriver.com -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Tricorder: Store ecc data on stack
On Mon, Feb 13, 2012 at 2:35 AM, Thomas Weber we...@corscience.de wrote: This patch removes ONFIG_SYS_NAND_ECCSTEPS and CONFIG_SYS_NAND_ECCTOTAL from tricorder config. The ecc data are stored on stack after: commit 25efd99dbb1352314c9eacdfae42064c2ca15499 nand_spl: store ecc data on the stack Can you go and delete all of these unused defines now? Thanks! -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] omap3_beagle: Change MAINTAINERS entry
On 13.02.2012 17:19, Tom Rini wrote: Cc: Dirk Behmedirk.be...@gmail.com Signed-off-by: Tom Rinitr...@ti.com Acked-by: Dirk Behmedirk.be...@gmail.com Thanks Dirk --- MAINTAINERS |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index c5db24f..d7875f5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -593,10 +593,6 @@ Enric Balletbo i Serraeballe...@iseebcn.com igep0020ARM ARMV7 (OMAP3xx SoC) igep0030ARM ARMV7 (OMAP3xx SoC) -Dirk Behmedirk.be...@gmail.com - - omap3_beagleARM ARMV7 (OMAP3530 SoC) - Eric Benarde...@eukrea.com cpuat91 ARM920T @@ -795,6 +791,7 @@ Thierry Redingthierry.red...@avionic-design.de Tom Rinitr...@ti.com am335x_evm ARM ARMV7 (AM33xx Soc) + omap3_beagleARM ARMV7 (OMAP3xx SoC) omap3_evm ARM ARMV7 (OMAP3xx SoC) Tom Rixtom@windriver.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] nand: current mainline show new startup output
On 02/13/2012 02:18 AM, Heiko Schocher wrote: Hello Christian, Scott, current mainline code of U-Boot: commit 9a3aae22edf1eda6326cc51c28631ca5c23b7706 Author: Christian Riesch christian.rie...@omicron.at Date: Thu Feb 2 00:44:42 2012 + arm, davinci: Add support for the Calimain board from OMICRON electronics This patch adds support for the Calimain board from OMICRON electronics GmbH. The board features a Texas Instruments AM1808 SoC, 128 MB DDR2 memory, and 64 MB NOR flash memory connected to CS2 and CS3. Signed-off-by: Christian Riesch christian.rie...@omicron.at shows now on startup the following printfs on the enbw_cmc board: U-Boot 2011.12-00331-ga400f85 (Feb 13 2012 - 08:49:17) I2C: ready [...] NAND: Bad block table found at page 65472, version 0x01 Bad block table found at page 65408, version 0x01 nand_read_bbt: Bad block at 0x0298 nand_read_bbt: Bad block at 0x0324 128 MiB MMC: davinci: 0 Found with git bisect the reason: [hs@pollux u-boot]$ git bisect good 2a8e0fc8b3dc31a3c571e439fbf04b882c8986be is the first bad commit commit 2a8e0fc8b3dc31a3c571e439fbf04b882c8986be Author: Christian Hitz christian.h...@aizo.com Date: Wed Oct 12 09:32:02 2011 +0200 nand: Merge changes from Linux nand driver [backport from linux commit 02f8c6aee8df3cdc935e9bdd4f2d020306035dbe] This patch synchronizes the nand driver with the Linux 3.0 state. Signed-off-by: Christian Hitz christian.h...@aizo.com Cc: Scott Wood scottw...@freescale.com [scottw...@freescale.com: minor fixes] Signed-off-by: Scott Wood scottw...@freescale.com :04 04 5ab34f43b64379528b9ef2652c8481fdab1a927a b453a49035e179dfb5f31c3164a1b7d3d62d66d6 M drivers :04 04 b59a7f3136da038b4b49c48cd0958e140a09ed66 a8fd298715a562fda0a350e6f732c1072ca7d410 M include [hs@pollux u-boot]$ Looking in this patch, it seems to me, this is the reason: diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 758b53f..ed2640c 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c [...] @@ -2992,9 +3145,10 @@ int nand_scan_tail(struct mtd_info *mtd) /* Check, if we should skip the bad block table scan */ if (chip-options NAND_SKIP_BBTSCAN) - chip-options |= NAND_BBT_SCANNED; + return 0; - return 0; + /* Build bad block table */ + return chip-scan_bbt(mtd); } /** ... This printfs in the startoutput are suboptimal ... maybe we apply the following patch: The problem isn't (just) the prints, which have always been there, but when we do the scanning. I suspect this patch accidentally reversed a U-Boot local change to defer bad block scanning to first use. -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2] EXYNOS: SMDK5250: Support all 4 UARTs
This properly configures the mux to enable all UARTs. This also fixes things so that we don't configure balls XUCTSN_1 and XURTSN_1 as UART1 configuration (RTS/CTS), since they aren't connected. Signed-off-by: Doug Anderson diand...@chromium.org --- Changes in v2: - Removed #ifdefs and tested SERIAL_MULTI by setting stdin/out/err to s5pserN and validating that serial moved. board/samsung/smdk5250/smdk5250.c | 44 +++- 1 files changed, 42 insertions(+), 2 deletions(-) diff --git a/board/samsung/smdk5250/smdk5250.c b/board/samsung/smdk5250/smdk5250.c index 928c08f..32786e2 100644 --- a/board/samsung/smdk5250/smdk5250.c +++ b/board/samsung/smdk5250/smdk5250.c @@ -224,11 +224,51 @@ static void board_uart_init(void) (struct exynos5_gpio_part1 *) samsung_get_base_gpio_part1(); int i; - /* UART1 GPIOs (part1) : GPA0CON[7:4] 0x */ - for (i = 4; i 8; i++) { + /* +* UART0 GPIOs : GPA0CON[3:0] 0x +* Must set CFG17 switches to select UART0 to use. +*/ + for (i = 0; i = 3; i++) { s5p_gpio_set_pull(gpio1-a0, i, GPIO_PULL_NONE); s5p_gpio_cfg_pin(gpio1-a0, i, GPIO_FUNC(0x2)); } + + /* +* UART1 GPIOs : GPA0CON[5:4] 0x22 +* Must set CFG17 switches to select UART1 to use. +* +* This only sets RXD/TXD, as RTS/CTS need a resistor soldered down +* in order to use them (so that those pins can be used for I2C). +*/ + for (i = 4; i = 5; i++) { + s5p_gpio_set_pull(gpio1-a0, i, GPIO_PULL_NONE); + s5p_gpio_cfg_pin(gpio1-a0, i, GPIO_FUNC(0x2)); + } + + /* +* UART2 GPIOs : GPA1CON[1:0] 0x22 +* Must set CFG17 switches to select UART2 to use. +* +* This only sets RXD/TXD, as RTS/CTS need a resistor soldered down +* in order to use them (so that those pins can be used for I2C). +*/ + for (i = 0; i = 1; i++) { + s5p_gpio_set_pull(gpio1-a1, i, GPIO_PULL_NONE); + s5p_gpio_cfg_pin(gpio1-a1, i, GPIO_FUNC(0x2)); + } + + /* +* UART3 GPIOs : GPA1CON[5:4] 0x22 +* Must set CFG16 switches to select UART3 to use. +*/ + for (i = 4; i = 5; i++) { + s5p_gpio_set_pull(gpio1-a1, i, GPIO_PULL_NONE); + s5p_gpio_cfg_pin(gpio1-a1, i, GPIO_FUNC(0x2)); + } + + /* +* There's no mux for UART4--it's internal only +*/ } #ifdef CONFIG_BOARD_EARLY_INIT_F -- 1.7.7.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] OMAP3: Remove unused CONFIG_SYS_NAND_ECCSTEPS/TOTAL
Signed-off-by: Thomas Weber we...@corscience.de --- include/configs/mcx.h |5 - include/configs/omap3_overo.h |4 include/configs/tricorder.h |5 - 3 files changed, 0 insertions(+), 14 deletions(-) diff --git a/include/configs/mcx.h b/include/configs/mcx.h index 0940e86..f3d26ea 100644 --- a/include/configs/mcx.h +++ b/include/configs/mcx.h @@ -351,11 +351,6 @@ #define CONFIG_SYS_NAND_ECCSIZE256 #define CONFIG_SYS_NAND_ECCBYTES 3 -#define CONFIG_SYS_NAND_ECCSTEPS (CONFIG_SYS_NAND_PAGE_SIZE / \ - CONFIG_SYS_NAND_ECCSIZE) -#define CONFIG_SYS_NAND_ECCTOTAL (CONFIG_SYS_NAND_ECCBYTES * \ - CONFIG_SYS_NAND_ECCSTEPS) - #define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE #define CONFIG_SYS_NAND_U_BOOT_OFFS0x8 diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h index bfd4570..64adc74 100644 --- a/include/configs/omap3_overo.h +++ b/include/configs/omap3_overo.h @@ -339,10 +339,6 @@ 10, 11, 12, 13} #define CONFIG_SYS_NAND_ECCSIZE512 #define CONFIG_SYS_NAND_ECCBYTES 3 -#define CONFIG_SYS_NAND_ECCSTEPS (CONFIG_SYS_NAND_PAGE_SIZE / \ - CONFIG_SYS_NAND_ECCSIZE) -#define CONFIG_SYS_NAND_ECCTOTAL (CONFIG_SYS_NAND_ECCBYTES * \ - CONFIG_SYS_NAND_ECCSTEPS) #define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE #define CONFIG_SYS_NAND_U_BOOT_OFFS0x8 diff --git a/include/configs/tricorder.h b/include/configs/tricorder.h index f87696b..f05b6ec 100644 --- a/include/configs/tricorder.h +++ b/include/configs/tricorder.h @@ -304,11 +304,6 @@ #define CONFIG_SYS_NAND_ECCSIZE512 #define CONFIG_SYS_NAND_ECCBYTES 3 -#define CONFIG_SYS_NAND_ECCSTEPS (CONFIG_SYS_NAND_PAGE_SIZE / \ - CONFIG_SYS_NAND_ECCSIZE) -#define CONFIG_SYS_NAND_ECCTOTAL (CONFIG_SYS_NAND_ECCBYTES * \ - CONFIG_SYS_NAND_ECCSTEPS) - #define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE #define CONFIG_SYS_NAND_U_BOOT_OFFS0x8 -- 1.7.9 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 26/28] net: Add link-local addressing support
Hi Mike, On Fri, Feb 3, 2012 at 6:42 AM, Mike Frysinger vap...@gentoo.org wrote: On Thursday 19 January 2012 19:53:29 Joe Hershberger wrote: + NetOurGatewayIP = 0; + ip_to_string(NetOurGatewayIP, tmp); + setenv(gatewayip, tmp); + + ip_to_string(NetOurSubnetMask, tmp); + setenv(netmask, tmp); + + ip_to_string(NetOurIP, tmp); + setenv(ipaddr, tmp); i feel like we should add a helper to do this setenv_ip(ipaddr, NetOurIP); I think that's a good idea, but I don't think it should be part of this patch series. It would probably be clearer to do that independently later. --- a/net/Makefile +++ b/net/Makefile -COBJS := $(COBJS-y) +COBJS := $(sort $(COBJS-y)) why ? Sort is needed because there are 2 different config options that could add the net_rand source file and sort will eliminate duplicates. -Joe ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] USB support in U-boot for MX23EVK board
Dear Marek Vasut, In message 201202131335.42773.marek.va...@gmail.com you wrote: But usb_init function call is not made in board_init function in the corresponding board specific file (evk23_evk.c). Could you help me finding what could be done for enabling USB support in u-boot to support for ARM based mx23evk board. Yes, use the above, for the reference, you can use board/denx/m28evk ...but only as a starting point for a new port. i.MX23 is similar to i.MX28 in many areas, but sufficiently different to cause enough problems to a newbie. You're definitelly right, but such a newbie has an U-Boot mailing list where he can ask if he's not sure how to go about various things. :) Cheers! M ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] M29W256GL + WEIM in uboot
Hello, Im new to all of this, but I 've been reading most of the post related to the M29w256 numonyx and the u-boot documentation without any success :( Im booting from MMC card and I want to parallel nor to be probed by cfi, but I have not succeeded since the uboot code freezes when at the beginning of the first flash_cmd_write in cfi_flash.c /* Issue FLASH reset command */ flash_cmd_reset(info); The CS0_BASE_ADDR has an start address matching #define WEIM_ARB_BASE_ADDR 0x0800 , however the range of the WEIM interface register settings are between 021B_8000 -- 021B_8098. Many board files has the WEIM CS0 as the start of the registers and I think this is why the NOR configuration is a matter of config settings like the ones below. #define CONFIG_SYS_FLASH_BASE CS0_BASE_ADDR #define CONFIG_SYS_MAX_FLASH_BANKS 1 #define CONFIG_SYS_MAX_FLASH_SECT 256 #define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT #define CONFIG_SYS_FLASH_CFI_AMD_RESET 1 /* Monitor at beginning of flash */ #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE #define CONFIG_SYS_MONITOR_LEN 0x4 /* Reserve 256KiB */ #define CONFIG_ENV_SECT_SIZE 0x2 #define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE #define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x4) /* Address and size of Redundant Environment Sector */ #define CONFIG_ENV_OFFSET_REDUND(CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE) #define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE If you could give me some help so that at least I could send write commands to the chip without hang pls... Regards, Francisco ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] M29W256GL + WEIM in uboot
Hello, Im new to all of this, but I 've been reading most of the post related to the M29w256 numonyx and the u-boot documentation without any success :( Im booting from MMC card and I want to parallel nor to be probed by cfi, but I have not succeeded since the uboot code freezes when at the beginning of the first flash_cmd_write in cfi_flash.c /* Issue FLASH reset command */ flash_cmd_reset(info); The CS0_BASE_ADDR has an start address matching #define WEIM_ARB_BASE_ADDR 0x0800 , however the range of the WEIM interface register settings are between 021B_8000 -- 021B_8098. Many board files has the WEIM CS0 as the start of the registers and I think this is why the NOR configuration is a matter of config settings like the ones below. #define CONFIG_SYS_FLASH_BASE CS0_BASE_ADDR #define CONFIG_SYS_MAX_FLASH_BANKS 1 #define CONFIG_SYS_MAX_FLASH_SECT 256 #define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT #define CONFIG_SYS_FLASH_CFI_AMD_RESET 1 /* Monitor at beginning of flash */ #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE #define CONFIG_SYS_MONITOR_LEN 0x4 /* Reserve 256KiB */ #define CONFIG_ENV_SECT_SIZE 0x2 #define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE #define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x4) /* Address and size of Redundant Environment Sector */ #define CONFIG_ENV_OFFSET_REDUND(CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE) #define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE If you could give me some help so that at least I could send write commands to the chip without hang pls... You're pointing CFI to configuration registers, you need to point it to where the NOR flash is MMAPed. If it's not MMAPed, this isn't your driver. M ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] M29W256GL + WEIM in uboot
Marek, Could you please go slower on this. Please point me what do I have to read because Im not getting the meaning of MMAPED in uboot and how to related this to my NOR flash. Can you please at least obey basic rules of using a mailing list ? DO NOT TOP-POST DO NOT DROP IT FROM CC MMAPed == memory mapped. M Regards, Francisco. On Mon, Feb 13, 2012 at 2:52 PM, Marek Vasut marek.va...@gmail.com wrote: Hello, Im new to all of this, but I 've been reading most of the post related to the M29w256 numonyx and the u-boot documentation without any success :( Im booting from MMC card and I want to parallel nor to be probed by cfi, but I have not succeeded since the uboot code freezes when at the beginning of the Marekfirst flash_cmd_write in cfi_flash.c /* Issue FLASH reset command */ flash_cmd_reset(info); The CS0_BASE_ADDR has an start address matching #define WEIM_ARB_BASE_ADDR 0x0800 , however the range of the WEIM interface register settings are between 021B_8000 -- 021B_8098. Many board files has the WEIM CS0 as the start of the registers and I think this is why the NOR configuration is a matter of config settings like the ones below. #define CONFIG_SYS_FLASH_BASE CS0_BASE_ADDR #define CONFIG_SYS_MAX_FLASH_BANKS 1 #define CONFIG_SYS_MAX_FLASH_SECT 256 #define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT #define CONFIG_SYS_FLASH_CFI_AMD_RESET 1 /* Monitor at beginning of flash */ #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE #define CONFIG_SYS_MONITOR_LEN 0x4 /* Reserve 256KiB */ #define CONFIG_ENV_SECT_SIZE 0x2 #define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE #define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x4) /* Address and size of Redundant Environment Sector */ #define CONFIG_ENV_OFFSET_REDUND(CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE) #define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE If you could give me some help so that at least I could send write commands to the chip without hang pls... You're pointing CFI to configuration registers, you need to point it to where the NOR flash is MMAPed. If it's not MMAPed, this isn't your driver. M ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] M29W256GL + WEIM in uboot
On Mon, Feb 13, 2012 at 6:30 PM, Francisco Muñoz francisco.miss...@gmail.com wrote: Hello, Im new to all of this, but I 've been reading most of the post related to the M29w256 numonyx and the u-boot documentation without any success :( Which SoC are you using and which board? ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] M29W256GL + WEIM in uboot
On Mon, Feb 13, 2012 at 3:33 PM, Fabio Estevam feste...@gmail.com wrote: On Mon, Feb 13, 2012 at 6:30 PM, Francisco Muñoz francisco.miss...@gmail.com wrote: Hello, Im new to all of this, but I 've been reading most of the post related to the M29w256 numonyx and the u-boot documentation without any success :( Which SoC are you using and which board? Hey Fabio its me Francisco. Im with the im6X ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Tricorder: Fix boot after making software ecc configurable
On 02/13/2012 02:56 AM, Thomas Weber wrote: The tricorder stops booting with the following message: U-Boot 2011.12-00325-ga661206 (Feb 13 2012 - 09:29:50) OMAP3503-GP ES3.1, CPU-OPP2, L3-165MHz, Max CPU Clock 600 mHz OMAP3 Tricorder + LPDDR/NAND I2C: ready DRAM: 128 MiB NAND: CONFIG_MTD_ECC_SOFT not enabled 0 MiB MMC: OMAP SD/MMC: 0 Adding CONFIG_MTD_ECC_SOFT to config file fixes this problem. Signed-off-by: Thomas Weber we...@corscience.de --- include/configs/tricorder.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) Sorry about that -- I meant to exclude nand: make 1-bit software ECC configurable from the patchset I applied, due to the potential for this sort of breakage. We should revert that patch until the issues raised here are resolved: http://patchwork.ozlabs.org/patch/119149/ -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] Revert nand: make 1-bit software ECC configurable
This reverts commit 4fee6c2f295f932b8febdc7ce8731ba045695fa5. It breaks boards that currently rely on soft-ecc, as pointed out here: http://patchwork.ozlabs.org/patch/140872/ The reverted patch should be resubmitted with documentation, and with the CONFIG_MTD_ECC_SOFT selected from every board that needs it. We could start by looking at what NAND driver the board selects, and whether that driver ever asks for soft ECC. Signed-off-by: Scott Wood scottw...@freescale.com --- drivers/mtd/nand/Makefile|2 +- drivers/mtd/nand/nand_base.c |4 include/linux/mtd/nand_ecc.h | 25 - 3 files changed, 1 insertions(+), 30 deletions(-) diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile index 998fc73..1d1b628 100644 --- a/drivers/mtd/nand/Makefile +++ b/drivers/mtd/nand/Makefile @@ -39,7 +39,7 @@ COBJS-y += nand_bbt.o COBJS-y += nand_ids.o COBJS-y += nand_util.o endif -COBJS-$(CONFIG_MTD_ECC_SOFT) += nand_ecc.o +COBJS-y += nand_ecc.o COBJS-y += nand_base.o COBJS-$(CONFIG_NAND_ECC_BCH) += nand_bch.o diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 12b960f..8ab8303 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -3028,10 +3028,6 @@ int nand_scan_tail(struct mtd_info *mtd) chip-ecc.mode = NAND_ECC_SOFT; case NAND_ECC_SOFT: - if (!mtd_nand_has_ecc_soft()) { - printk(KERN_WARNING CONFIG_MTD_ECC_SOFT not enabled\n); - return -EINVAL; - } chip-ecc.calculate = nand_calculate_ecc; chip-ecc.correct = nand_correct_data; chip-ecc.read_page = nand_read_page_swecc; diff --git a/include/linux/mtd/nand_ecc.h b/include/linux/mtd/nand_ecc.h index 9715a53..090da50 100644 --- a/include/linux/mtd/nand_ecc.h +++ b/include/linux/mtd/nand_ecc.h @@ -15,10 +15,6 @@ struct mtd_info; -#if defined(CONFIG_MTD_ECC_SOFT) - -static inline int mtd_nand_has_ecc_soft(void) { return 1; } - /* * Calculate 3 byte ECC code for 256 byte block */ @@ -29,25 +25,4 @@ int nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat, u_char *ecc_code */ int nand_correct_data(struct mtd_info *mtd, u_char *dat, u_char *read_ecc, u_char *calc_ecc); -#else - -static inline int mtd_nand_has_ecc_soft(void) { return 0; } - -static inline int -nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat, u_char *ecc_code) -{ - return -1; -} - -static inline int -nand_correct_data(struct mtd_info *mtd, - u_char *dat, - u_char *read_ecc, - u_char *calc_ecc) -{ - return -1; -} - -#endif - #endif /* __MTD_NAND_ECC_H__ */ -- 1.7.7.rc3.4.g8d714 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Pull request u-boot-blackfin.git (master branch)
Dear Mike Frysinger, In message 1329078374-32177-1-git-send-email-vap...@gentoo.org you wrote: The following changes since commit 9cbfee6dc200cc746394c7efc10253a24f3ce108: fw_env.h: fix comment (2012-02-11 22:18:38 +0100) are available in the git repository at: git://www.denx.de/git/u-boot-blackfin.git master Dimitar Penev (2): Blackfin: pr1: new board port Blackfin: br4: new board port Macpaul Lin (1): linkage.h: move from blackfin to common includes Mike Frysinger (5): Blackfin: bf537-stamp: drop board reset workaround post: add blackfin to the post_time_ms list Blackfin: add in/out le32 variants Blackfin: bfin_nand: mark local func static Blackfin: pata_bfin: fix printf warning MAINTAINERS|5 + arch/blackfin/cpu/cache.S |2 +- arch/blackfin/include/asm/blackfin_local.h |2 +- arch/blackfin/include/asm/cache.h |2 +- arch/blackfin/include/asm/io.h |2 + arch/blackfin/include/asm/linkage.h| 50 +- arch/blackfin/lib/__kgdb.S |2 +- arch/blackfin/lib/outs.S |2 +- board/bf537-stamp/bf537-stamp.c|7 -- board/br4/Makefile | 50 + board/br4/br4.c| 30 ++ board/br4/config.mk| 30 ++ board/pr1/Makefile | 50 + board/pr1/config.mk| 30 ++ board/pr1/pr1.c| 30 ++ boards.cfg |2 + drivers/block/pata_bfin.c |2 +- drivers/mtd/nand/bfin_nand.c |2 +- include/configs/br4.h | 157 include/configs/pr1.h | 157 include/linux/linkage.h| 76 + post/post.c|3 +- 22 files changed, 630 insertions(+), 63 deletions(-) create mode 100644 board/br4/Makefile create mode 100644 board/br4/br4.c create mode 100644 board/br4/config.mk create mode 100644 board/pr1/Makefile create mode 100644 board/pr1/config.mk create mode 100644 board/pr1/pr1.c create mode 100644 include/configs/br4.h create mode 100644 include/configs/pr1.h create mode 100644 include/linux/linkage.h Applied, thanks. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de In the pitiful, multipage, connection-boxed form to which the flow- chart has today been elaborated, it has proved to be useless as a design tool -- programmers draw flowcharts after, not before, writing the programs they describe.- Fred Brooks, Jr. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Tricorder: Fix boot after making software ecc configurable
On Mon, Feb 13, 2012 at 2:44 PM, Scott Wood scottw...@freescale.com wrote: On 02/13/2012 02:56 AM, Thomas Weber wrote: The tricorder stops booting with the following message: U-Boot 2011.12-00325-ga661206 (Feb 13 2012 - 09:29:50) OMAP3503-GP ES3.1, CPU-OPP2, L3-165MHz, Max CPU Clock 600 mHz OMAP3 Tricorder + LPDDR/NAND I2C: ready DRAM: 128 MiB NAND: CONFIG_MTD_ECC_SOFT not enabled 0 MiB MMC: OMAP SD/MMC: 0 Adding CONFIG_MTD_ECC_SOFT to config file fixes this problem. Signed-off-by: Thomas Weber we...@corscience.de --- include/configs/tricorder.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) Sorry about that -- I meant to exclude nand: make 1-bit software ECC configurable from the patchset I applied, due to the potential for this sort of breakage. We should revert that patch until the issues raised here are resolved: http://patchwork.ozlabs.org/patch/119149/ I had / have plan to take the tricorder patch tomorrow, unless you really want to push a revert from your tree instead. Either way is fine with me. -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Pull request u-boot-blackfin.git (sf branch)
Dear Mike Frysinger, In message 1329078559-32668-1-git-send-email-vap...@gentoo.org you wrote: The following changes since commit 9cbfee6dc200cc746394c7efc10253a24f3ce108: fw_env.h: fix comment (2012-02-11 22:18:38 +0100) are available in the git repository at: git://www.denx.de/git/u-boot-blackfin.git sf Eric Nelson (2): sf command: allow default bus and chip selects README: Add description of SPI Flash (SF) command configuration Mike Frysinger (2): sf: eeprom_m95xxx: fix up style sf: eeprom_m95xxx: set a sane default timeout README | 20 common/cmd_sf.c | 37 + drivers/mtd/spi/eeprom_m95xxx.c | 28 3 files changed, 57 insertions(+), 28 deletions(-) Applied, thanks. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de There is nothing new under the sun, but there are lots of old things we don't know yet. - Ambrose Bierce ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/6] arm: Check for -fstack-usage support
Dear Tom Rini, In message 1328741900-18174-3-git-send-email-tr...@ti.com you wrote: Signed-off-by: Tom Rini tr...@ti.com --- arch/arm/config.mk |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) This should not be ARM specific. 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 Clothes make the man. Naked people have little or no influence on society. - Mark Twain ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] M29W256GL + WEIM in uboot
On Mon, Feb 13, 2012 at 7:39 PM, Francisco Muñoz francisco.miss...@gmail.com wrote: Im with the im6X Take a look for mx31ads.c as an example. You need to setup the chip select like in mxc_setup_weimcs() function. BTW, I don't see any current mx6 board with NOR in mainline U-boot. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 1/6] .gitignore: Add .su files
The '-fstack-usage' option to gcc will generate .su files, ignore them. Acked-by: Mike Frysinger vap...@gentoo.org Signed-off-by: Tom Rini tr...@ti.com --- .gitignore |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/.gitignore b/.gitignore index e4e95e2..0f32fd8 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ *.orig *.a *.o +*.su *~ *.swp *.patch -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 0/6] SPL-related documentation / checking
Hey all, The following series (v2) is an attempt to make it easier for developers and users to use SPL. At the end of the series, we have filled in some missing CONFIG options for SPL, explained how the sequence works on OMAP3 and similar platforms and added an explanation on how to check stack usage with a combination of recent gcc (for -fstack-usage) and GNU cflow. Changes for v2: - Move -fstack-usage to top-level config.mk (per Wolfgang) - Wording fixes in doc/SPL/README.omap3 (per Peter Meerwald) -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 2/6] config.mk: Make cc-option create a file under include/generated
Testing for -fstack-usage requires the creation of an output file, which isnt possible with /dev/null. Signed-off-by: Tom Rini tr...@ti.com --- config.mk | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config.mk b/config.mk index ddaa477..519bc1b 100644 --- a/config.mk +++ b/config.mk @@ -108,14 +108,14 @@ HOSTCFLAGS+= -pedantic # only supported compiler options are used # CC_OPTIONS_CACHE_FILE := $(OBJTREE)/include/generated/cc_options.mk - -$(if $(wildcard $(CC_OPTIONS_CACHE_FILE)),,\ - $(shell mkdir -p $(dir $(CC_OPTIONS_CACHE_FILE +CC_TEST_FILE := $(OBJTREE)/include/generated/cc_test_file.c -include $(CC_OPTIONS_CACHE_FILE) -cc-option-sys = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \ -/dev/null 21; then \ +cc-option-sys = $(shell mkdir -p $(dir $(CC_TEST_FILE)); \ + touch $(CC_TEST_FILE); \ + if $(CC) $(CFLAGS) $(1) -S -o $(CC_TEST_FILE) \ + -xc $(CC_TEST_FILE) /dev/null 21; then \ echo 'CC_OPTIONS += $(strip $1)' $(CC_OPTIONS_CACHE_FILE); \ echo $(1); fi) -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 4/6] spl.c: Use __noreturn decorator
Signed-off-by: Tom Rini tr...@ti.com --- arch/arm/cpu/armv7/omap-common/spl.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/arm/cpu/armv7/omap-common/spl.c b/arch/arm/cpu/armv7/omap-common/spl.c index 9c1f7e3..3a2d957 100644 --- a/arch/arm/cpu/armv7/omap-common/spl.c +++ b/arch/arm/cpu/armv7/omap-common/spl.c @@ -92,9 +92,9 @@ void spl_parse_image_header(const struct image_header *header) } } -static void jump_to_image_no_args(void) +static void __noreturn jump_to_image_no_args(void) { - typedef void (*image_entry_noargs_t)(u32 *)__attribute__ ((noreturn)); + typedef void __noreturn (*image_entry_noargs_t)(u32 *); image_entry_noargs_t image_entry = (image_entry_noargs_t) spl_image.entry_point; @@ -107,7 +107,6 @@ static void jump_to_image_no_args(void) image_entry((u32 *)boot_params_ptr_addr); } -void jump_to_image_no_args(void) __attribute__ ((noreturn)); void board_init_r(gd_t *id, ulong dummy) { u32 boot_device; -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 3/6] config.mk: Check for -fstack-usage support
Signed-off-by: Tom Rini tr...@ti.com --- Changes for v2: - Move check from arch/arm/config.mk to config.mk, reword summary Signed-off-by: Tom Rini tr...@ti.com --- config.mk |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/config.mk b/config.mk index 519bc1b..91c9e42 100644 --- a/config.mk +++ b/config.mk @@ -233,6 +233,10 @@ CFLAGS_WARN := $(call cc-option,-Wno-format-nonliteral) \ $(call cc-option,-Wno-format-security) CFLAGS += $(CFLAGS_WARN) +# Report stack usage if supported +CFLAGS_STACK := $(call cc-option,-fstack-usage,) +CFLAGS += $(CFLAGS_STACK) + # $(CPPFLAGS) sets -g, which causes gcc to pass a suitable -gformat # option to the assembler. AFLAGS_DEBUG := -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 5/6] README: Add more SPL config options
Signed-off-by: Tom Rini tr...@ti.com --- README | 22 -- 1 files changed, 20 insertions(+), 2 deletions(-) diff --git a/README b/README index b6c9d0b..2737966 100644 --- a/README +++ b/README @@ -2436,11 +2436,29 @@ FIT uImage format: CONFIG_SPL Enable building of SPL globally. + CONFIG_SPL_LDSCRIPT + LDSCRIPT for linking the SPL binary. + + CONFIG_SPL_MAX_SIZE + Maximum binary size (text, data and rodata) of the SPL binary. + CONFIG_SPL_TEXT_BASE TEXT_BASE for linking the SPL binary. - CONFIG_SPL_LDSCRIPT - LDSCRIPT for linking the SPL binary. + CONFIG_SPL_BSS_START_ADDR + Link address for the BSS within the SPL binary. + + CONFIG_SPL_BSS_MAX_SIZE + Maximum binary size of the BSS section of the SPL binary. + + CONFIG_SPL_STACK + Adress of the start of the stack SPL will use + + CONFIG_SYS_SPL_MALLOC_START + Starting address of the malloc pool used in SPL. + + CONFIG_SYS_SPL_MALLOC_SIZE + The size of the malloc pool used in SPL. CONFIG_SPL_LIBCOMMON_SUPPORT Support for common/libcommon.o in SPL binary -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2 6/6] SPL: Add README.omap3
This document describes the SPL process for OMAP3 (and related) boards as well as a partial memory map and how to verify certain aspects outside of running on the target. Signed-off-by: Tom Rini tr...@ti.com --- Changes for v2: - Wording changes from Peter Meerwald --- doc/SPL/README.omap3 | 72 ++ 1 files changed, 72 insertions(+), 0 deletions(-) create mode 100644 doc/SPL/README.omap3 diff --git a/doc/SPL/README.omap3 b/doc/SPL/README.omap3 new file mode 100644 index 000..1f30994 --- /dev/null +++ b/doc/SPL/README.omap3 @@ -0,0 +1,72 @@ +Overview of SPL on OMAP3 devices + + +Introduction + + +This document provides an overview of how SPL functions on OMAP3 (and related +such as am35x and am37x) processors. + +Methodology +--- + +On these platforms the ROM supports trying a sequence of boot devices. Once +one has been used successfully to load SPL this information is stored in memory +and the location stored in a register. We will read this to determine where to +read U-Boot from in turn. + +Memory Map +-- + +This is an example of a typical setup. See top-level README for documentation +of which CONFIG variables control these values. For a given board and the +amount of DRAM available to it different values may need to be used. +Note that the size of the SPL text rodata and data is enforced with a CONFIG +option and growing over that size results in a link error. The SPL stack +starts at the top of SRAM (which is configurable) and grows downward. The +space between the top of SRAM and the enforced upper bound on the size of the +SPL text, data and rodata is considered the safe stack area. Details on +confirming this behavior are shown below. + +A portion of the system memory map looks as follows: +SRAM: 0x4020 - 0x4020 +DDR1: 0x8000 - 0xBFFF + +Option 1 (SPL only): +0x40200800 - 0x4020BBFF: Area for SPL text, data and rodata +0x4020BC00 - 0x4020FFFC: Area for the SPL stack. +0x8000 - 0x8007: Area for the SPL BSS. +0x8010: CONFIG_SYS_TEXT_BASE of U-Boot +0x80208000 - 0x80307FFF: malloc() pool available to SPL. + +Option 2 (SPL or X-Loader): +0x40200800 - 0x4020BBFF: Area for SPL text, data and rodata +0x4020BC00 - 0x4020FFFC: Area for the SPL stack. +0x80008000: CONFIG_SYS_TEXT_BASE of U-Boot +0x8700 - 0x8707: Area for the SPL BSS. +0x8708 - 0x870F: malloc() pool available to SPL. + +For the areas that reside within DDR1 they must not be used prior to s_init() +completing. Note that CONFIG_SYS_TEXT_BASE must be clear of the areas that SPL +uses while running. This is why we have two versions of the memory map that +only vary in where the BSS and malloc pool reside. + +Estimating stack usage +-- + +With gcc 4.6 (and later) and the use of GNU cflow it is possible to estimate stack usage at various points in run sequence of SPL. The -fstack-usage option to gcc will produce '.su' files (such as arch/arm/cpu/armv7/syslib.su) that will give stack usage information and cflow can construct program flow. + +Must have gcc 4.6 or later, which supports -fstack-usage + +1) Build normally +2) Perform the following shell command to generate a list of C files used in +SPL: +$ for F in `cd spl; find -name *.su`; do \ + echo $F | sed -e 's/.su$/.c/'; done used-spl.list +3) Execute cflow: +$ cflow --main=board_init_r `cat used-spl.list` 21 | $PAGER + +cflow will spit out a number of warnings as it does not parse +the config files and picks functions based on #ifdef. Parsing the '.i' +files instead introduces another set of headaches. These warnings are +not usually important to understanding the flow, however. -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Tricorder: Fix boot after making software ecc configurable
On 02/13/2012 04:14 PM, Tom Rini wrote: On Mon, Feb 13, 2012 at 2:44 PM, Scott Wood scottw...@freescale.com wrote: On 02/13/2012 02:56 AM, Thomas Weber wrote: The tricorder stops booting with the following message: U-Boot 2011.12-00325-ga661206 (Feb 13 2012 - 09:29:50) OMAP3503-GP ES3.1, CPU-OPP2, L3-165MHz, Max CPU Clock 600 mHz OMAP3 Tricorder + LPDDR/NAND I2C: ready DRAM: 128 MiB NAND: CONFIG_MTD_ECC_SOFT not enabled 0 MiB MMC: OMAP SD/MMC: 0 Adding CONFIG_MTD_ECC_SOFT to config file fixes this problem. Signed-off-by: Thomas Weber we...@corscience.de --- include/configs/tricorder.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) Sorry about that -- I meant to exclude nand: make 1-bit software ECC configurable from the patchset I applied, due to the potential for this sort of breakage. We should revert that patch until the issues raised here are resolved: http://patchwork.ozlabs.org/patch/119149/ I had / have plan to take the tricorder patch tomorrow, unless you really want to push a revert from your tree instead. Either way is fine with me. This affects more than just tricorder -- any board that depends on soft ECC will be broken, since none of them define this symbol. I thought I had left this patch out, but apparently didn't. -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] M29W256GL + WEIM in uboot
On Mon, Feb 13, 2012 at 4:59 PM, Fabio Estevam feste...@gmail.com wrote: On Mon, Feb 13, 2012 at 7:39 PM, Francisco Muñoz francisco.miss...@gmail.com wrote: Im with the im6X Take a look for mx31ads.c as an example. You need to setup the chip select like in mxc_setup_weimcs() function. BTW, I don't see any current mx6 board with NOR in mainline U-boot. I already did the reset with this lines in the board/freescale/mx6q_boardsabreauto.c board_init() writel(0x00020001,WEIM_BASE_ADDR); writel(0x1C022000,WEIM_BASE_ADDR + 0x8); writel(0x0804a240,WEIM_BASE_ADDR + 0x10); However, the uboot code hangs when i runt on the board */ 1896 ulong flash_get_size (phys_addr_t base, int banknum) 1897 { 1898 flash_info_t *info = flash_info[banknum]; 1899 int i, j; 1900 flash_sect_t sect_cnt; 1901 phys_addr_t sector; 1902 unsigned long tmp; 1903 int size_ratio; 1904 uchar num_erase_regions; 1905 int erase_region_size; 1906 int erase_region_count; 1907 struct cfi_qry qry; 1908 unsigned long max_size; 1909 1910 memset(qry, 0, sizeof(qry)); 1911 1912 info-ext_addr = 0; 1913 info-cfi_version = 0; 1914 #ifdef CONFIG_SYS_FLASH_PROTECTION 1915 info-legacy_unlock = 0; 1916 #endif 1917 1918 info-start[0] = (ulong)map_physmem(base, info-portwidth, MAP_NOCACHE); 1919 printf(Estamos ok con el pointer malo %u \n,info-portwidth); 1920 if (flash_detect_cfi (info, qry)) It hangs in the reset commands cfi_flash.c Regards, Francisco ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH v2 13/15] bootstage: Add microsecond boot time measurement
Hi Mike, On Sat, Jan 14, 2012 at 5:27 PM, Simon Glass s...@chromium.org wrote: Hi Mike, On Sat, Jan 14, 2012 at 5:22 PM, Mike Frysinger vap...@gentoo.org wrote: On Saturday 14 January 2012 20:16:35 Simon Glass wrote: On Sat, Jan 14, 2012 at 5:09 PM, Mike Frysinger wrote: On Thursday 12 January 2012 00:41:24 Simon Glass wrote: Still don't quite get it though. For example, the beagle board defines show_boot_progress() but does not define CONFIG_SHOW_BOOT_PROGRESS, so wouldn't that break that board? that sounds like an odd-man-out that needs fixing rather than allowing to live Fair enough. although I suspect there will be many. If I could actually get a MAKEALL to run without producing 100s of broken boards then it would be easier to do this sort of thing. At the moment it's like looking for a needle in a haystack. My warnings series aimed to improve things slightly, but I don't think others have these problems. that's fair. if it's a small # of boards, i'd prefer to migrate them. if it's a lot more, we can punt for now (add to the TODO?) and add comments to the code why we have these checks. OK, I don't know the answer to that but will try it out, and adjust that patch as needed. I have got back to this now - it seem that I can rely on the existing weak function, so I will do so. I only want to update two of the patches, so will just send those ones. The rest should be fine as is. Regards, SImon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] M29W256GL + WEIM in uboot
On Mon, Feb 13, 2012 at 9:25 PM, Francisco Muñoz francisco.miss...@gmail.com wrote: I already did the reset with this lines in the board/freescale/mx6q_boardsabreauto.c board_init() Hmm...this board is not in mainline U-boot, so this is not the correct place to ask for assistance. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v4 13/15] bootstage: Implement core microsecond boot time measurement
This defines the basics of a new boot time measurement feature. This allows logging of very accurate time measurements as the boot proceeds, by using an available microsecond counter. To enable the feature, define CONFIG_BOOTSTAGE in your board config file. Also available is CONFIG_BOOTSTAGE_REPORT which will cause a report to be printed just before handing off to the OS. Most IDs are not named at this stage. For that I would first like to renumber them all. Timer summary in microseconds: MarkElapsed Stage 0 0 reset 205,000205,000 board_init_f 6,053,000 5,848,000 bootm_start 6,053,000 0 id=1 6,058,000 5,000 id=101 6,058,000 0 id=100 6,061,000 3,000 id=103 6,064,000 3,000 id=104 6,093,000 29,000 id=107 6,093,000 0 id=106 6,093,000 0 id=105 6,093,000 0 id=108 7,089,000996,000 id=7 7,089,000 0 id=15 7,089,000 0 id=8 7,097,000 8,000 start_kernel Signed-off-by: Simon Glass s...@chromium.org --- Changes in v3: - Fix code style in bootstage_mark_name() - Make main bootstage commit title more explicit Changes in v4: - Print times in unsigned format, and increase range - Remove guards around calls to show_boot_progress() - Sort by unsigned value to account for large time values README | 25 common/Makefile |1 + common/bootstage.c | 158 +++ include/bootstage.h | 43 ++ 4 files changed, 227 insertions(+), 0 deletions(-) create mode 100644 common/bootstage.c diff --git a/README b/README index b6c9d0b..4c21924 100644 --- a/README +++ b/README @@ -2241,6 +2241,31 @@ The following options need to be configured: example, some LED's) on your board. At the moment, the following checkpoints are implemented: +- Detailed boot stage timing + CONFIG_BOOTSTAGE + Define this option to get detailed timing of each stage + of the boot process. + + CONFIG_BOOTSTAGE_USER_COUNT + This is the number of available user bootstage records. + Each time you call bootstage_mark(BOOTSTAGE_ID_ALLOC, ...) + a new ID will be allocated from this stash. If you exceed + the limit, recording will stop. + + CONFIG_BOOTSTAGE_REPORT + Define this to print a report before boot, similar to this: + + Timer summary in microseconds: + MarkElapsed Stage + 0 0 reset + 3,575,678 3,575,678 board_init_f start + 3,575,695 17 arch_cpu_init A9 + 3,575,777 82 arch_cpu_init done + 3,659,598 83,821 board_init_r start + 3,910,375250,777 main_loop +29,916,167 26,005,792 bootm_start +30,361,327445,160 start_kernel + Legacy uImage format: Arg Where When diff --git a/common/Makefile b/common/Makefile index 2d9ae8c..038baf0 100644 --- a/common/Makefile +++ b/common/Makefile @@ -172,6 +172,7 @@ SPD := y endif COBJS-$(SPD) += ddr_spd.o COBJS-$(CONFIG_HWCONFIG) += hwconfig.o +COBJS-$(CONFIG_BOOTSTAGE) += bootstage.o COBJS-$(CONFIG_CONSOLE_MUX) += iomux.o COBJS-y += flash.o COBJS-$(CONFIG_CMD_KGDB) += kgdb.o kgdb_stubs.o diff --git a/common/bootstage.c b/common/bootstage.c new file mode 100644 index 000..d2bbe63 --- /dev/null +++ b/common/bootstage.c @@ -0,0 +1,158 @@ +/* + * Copyright (c) 2011, Google Inc. All rights reserved. + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + + +/* + * This module records the progress of boot and arbitrary commands, and + * permits accurate timestamping of each. + * + * TBD: Pass timings to kernel in the FDT + */ + +#include common.h +#include libfdt.h + +DECLARE_GLOBAL_DATA_PTR; + +enum bootstage_flags { + BOOTSTAGEF_ERROR= 1 0, /* Error record */ + BOOTSTAGEF_ALLOC= 1 1, /* Allocate an id */ +}; + +struct bootstage_record { + ulong time_us; +
[U-Boot] [PATCH v4 12/15] bootstage: Replace show_boot_progress/error() with bootstage_...()
These calls should not be made directly any more, since bootstage will call the show_boot_...() functions as needed. Signed-off-by: Simon Glass s...@chromium.org --- Changes in v4: - Adjust bootstage.h header to fix build warnings (bisect problem) arch/arm/lib/bootm.c |2 +- arch/avr32/lib/bootm.c |2 +- arch/m68k/lib/bootm.c |2 +- arch/microblaze/lib/bootm.c|2 +- arch/mips/lib/bootm.c |2 +- arch/mips/lib/bootm_qemu_mips.c|2 +- arch/nds32/lib/bootm.c |2 +- arch/powerpc/lib/board.c |2 +- arch/powerpc/lib/bootm.c |2 +- arch/sparc/lib/board.c |2 +- arch/x86/lib/board.c | 19 +++ board/hermes/hermes.c |2 +- board/matrix_vision/common/mv_common.c |2 +- board/scb9328/scb9328.c|6 -- common/cmd_bootm.c | 92 common/cmd_ide.c | 46 common/cmd_nand.c | 34 ++-- common/cmd_net.c | 16 +++--- common/env_common.c|2 +- common/image.c | 52 +- include/bootstage.h| 30 ++- net/eth.c |6 +- post/post.c|4 +- 23 files changed, 175 insertions(+), 156 deletions(-) diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index 249ac1b..f114cd6 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -113,7 +113,7 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) printf (Using machid 0x%x from environment\n, machid); } - show_boot_progress(BOOTSTAGE_ID_RUN_OS); + bootstage_mark(BOOTSTAGE_ID_RUN_OS); #ifdef CONFIG_OF_LIBFDT if (images-ft_len) diff --git a/arch/avr32/lib/bootm.c b/arch/avr32/lib/bootm.c index f180737..74ebeca 100644 --- a/arch/avr32/lib/bootm.c +++ b/arch/avr32/lib/bootm.c @@ -192,7 +192,7 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima theKernel = (void *)images-ep; - show_boot_progress(BOOTSTAGE_ID_RUN_OS); + bootstage_mark(BOOTSTAGE_ID_RUN_OS); params = params_start = (struct tag *)gd-bd-bi_boot_params; params = setup_start_tag(params); diff --git a/arch/m68k/lib/bootm.c b/arch/m68k/lib/bootm.c index 233782b..d506d0c 100644 --- a/arch/m68k/lib/bootm.c +++ b/arch/m68k/lib/bootm.c @@ -104,7 +104,7 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima debug(## Transferring control to Linux (at address %08lx) ...\n, (ulong) kernel); - show_boot_progress(BOOTSTAGE_ID_RUN_OS); + bootstage_mark(BOOTSTAGE_ID_RUN_OS); /* * Linux Kernel Parameters (passing board info data): diff --git a/arch/microblaze/lib/bootm.c b/arch/microblaze/lib/bootm.c index 24b9e09..95cee50 100644 --- a/arch/microblaze/lib/bootm.c +++ b/arch/microblaze/lib/bootm.c @@ -59,7 +59,7 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima if (ret) return 1; - show_boot_progress(BOOTSTAGE_ID_RUN_OS); + bootstage_mark(BOOTSTAGE_ID_RUN_OS); if (!of_flat_tree argc 3) of_flat_tree = (char *)simple_strtoul(argv[3], NULL, 16); diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c index 5b7e74f..9930abf 100644 --- a/arch/mips/lib/bootm.c +++ b/arch/mips/lib/bootm.c @@ -56,7 +56,7 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima /* find kernel entry point */ theKernel = (void (*)(int, char **, char **, int *))images-ep; - show_boot_progress(BOOTSTAGE_ID_RUN_OS); + bootstage_mark(BOOTSTAGE_ID_RUN_OS); #ifdef DEBUG printf (## Transferring control to Linux (at address %08lx) ...\n, diff --git a/arch/mips/lib/bootm_qemu_mips.c b/arch/mips/lib/bootm_qemu_mips.c index 47f5310..bb6442a 100644 --- a/arch/mips/lib/bootm_qemu_mips.c +++ b/arch/mips/lib/bootm_qemu_mips.c @@ -39,7 +39,7 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima /* find kernel entry point */ theKernel = (void (*)(int, char **, char **, int *))images-ep; - show_boot_progress(BOOTSTAGE_ID_RUN_OS); + bootstage_mark(BOOTSTAGE_ID_RUN_OS); debug (## Transferring control to Linux (at address %08lx) ...\n, (ulong) theKernel); diff --git a/arch/nds32/lib/bootm.c b/arch/nds32/lib/bootm.c index 5ae90fb..03f58bf 100644 --- a/arch/nds32/lib/bootm.c +++ b/arch/nds32/lib/bootm.c @@ -69,7 +69,7 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) printf(Using machid 0x%x from
[U-Boot] [PATCH v4 15/15] bootstage: arm: Add bootstage calls in board and bootm
Add calls to bootstage before and after relocation, and just before jumping to the OS. The idea here is you can call bootstage_report() to get a report. Additionally, if you define CONFIG_BOOTSTAGE_REPORT then a report is printed automatically by U-Boot just before jumping to the kernel. Signed-off-by: Simon Glass s...@chromium.org --- Changes in v2: - Unify show_boot_progress() into this series Changes in v3: - Update commit message to clarify the purpose of CONFIG_BOOTSTAGE_REPORT Changes in v4: - Fix up ARM bootstage calls to use correct names arch/arm/lib/board.c |3 +++ arch/arm/lib/bootm.c |4 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c index 500e216..b9b35de 100644 --- a/arch/arm/lib/board.c +++ b/arch/arm/lib/board.c @@ -266,6 +266,8 @@ void board_init_f(ulong bootflag) ulong reg; #endif + bootstage_mark_name(BOOTSTAGE_ID_START_UBOOT_F, board_init_f); + /* Pointer is writable since we allocated a register for it */ gd = (gd_t *) ((CONFIG_SYS_INIT_SP_ADDR) ~0x07); /* compiler optimization barrier needed for GCC = 3.4 */ @@ -455,6 +457,7 @@ void board_init_r(gd_t *id, ulong dest_addr) gd = id; gd-flags |= GD_FLG_RELOC; /* tell others: relocation done */ + bootstage_mark_name(BOOTSTAGE_ID_START_UBOOT_R, board_init_r); monitor_flash_len = _end_ofs; diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index f114cd6..2961ab2 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -83,6 +83,10 @@ void arch_lmb_reserve(struct lmb *lmb) static void announce_and_cleanup(void) { printf(\nStarting kernel ...\n\n); + bootstage_mark_name(BOOTSTAGE_ID_BOOTM_HANDOFF, start_kernel); +#ifdef CONFIG_BOOTSTAGE_REPORT + bootstage_report(); +#endif #ifdef CONFIG_USB_DEVICE { -- 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 07/28] net: Move PING out of net.c
Hi Mike, On Fri, Feb 3, 2012 at 6:07 AM, Mike Frysinger vap...@gentoo.org wrote: hmm, thinking a bit more, i wonder if it makes more sense to split all of icmp out of net.c This would also be fine. Are you thinking that icmp would include all of icmp or would we still have ping separate? Does this need to be done now? It would be quite a bit of churn to move ping changes to a different file first since the changes after the move would have to be manually recreated. Thanks, -Joe ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] to correct Issue with PowerPc implementation of resetting the watchdog in the decrementer exception handler
Wolfgang, Sorry about not being clear in my earlier message. Let me attempt to point out why I think the current code is incorrect. From a systems point of view watchdog is used to protect against a system becoming hung by bad code or corrupted memory or files. By automatically feeding them the code has circumvented this important feature. So some examples of where I would expect the watchdog to recover from but with the current code it will not. If u-boot loads a corrupted OS image, when the code starts but before it gets to the point that it has replaced u-boots exception handler it falls into an infinite loop it will hang and the uboot exception handler will continue to keep the system running. Another example and how we actually discovered this bug due to a leak in a network driver that after many loops would run u-boot out of memory. Once this occurs the hush parser drops into a for ;; loop again this is not recovered by the watchdog. So while I understand that some users may want to have the cpu automatically reset the watchdog, We don't. I believe that setting the default value of CONFIG_SYS_WATCHDOG_FREQ if it was not defined is a serious bug. The feature should not be enabled if I did not define this variable. I have attached what we believe is a patch to address our concerns and still allow this to be set by a target that wishes to do so. Comments are appreciated. --eric - Eric Olsen Staff Software Engineer Google, Inc. 650-253-2767 On Mon, Feb 13, 2012 at 12:36 PM, Wolfgang Denk w...@denx.de wrote: Dear Eric, In message CAOzkcmEydTOcGQ7= ll9nhkyuutjjbe73dyceosffphtrgu7...@mail.gmail.com you wrote: Today we discovered an issue with the implementation of watchdog on the PowerPc. In the file arch/powerpc/lib/interrupt.c, the code currently automatically feeds the watchdog via the timer interrupt handler if either CONFIG_WATCHDOG or CONFIG_HW_WATCHDOG are defined. I am not exactly sure when this got added or why, but I'd guess that for most systems this is not a good feature. For us it is exactly the opposite of what we want. Would either of you object to a patch that uses a different config flag to enable this. You don't mention it, but I assume you are referring to U-Boot code here. Please always poost U-Boot related questions to the U-Boot mailing list only (unless you are asking for commercial support from DENX). I do not exactly understand why you think the current implementation is not OK as it - my guess is that your expectations are higher than what U-Boot offers. U-Boot is a boot loader, not an OS, and we use a lot of simplistic concepts - trading complexity and features which you can expect from a full-flavored OS for small code size and simple, easily maintainable code. U-Boot is capable to triggering a hardware watchdog (which is nevessary, as there are systems where this cannot be switched off or suspended), but we make no attempts to implement watchdog monitoring of the U-Boot code itself. If U-Boot should hang or crash, this is not expected to be detected or recovered by the watchdog. As such, the existing code does what it is supposed to do. Patches to add additional, new features to U-Boot (like full watchdog monitoring) are of course welcome. Please post these on the mailing list, then. 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 Is a computer language with goto's totally Wirth-less? patch Description: Binary data ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] fix CFI flash driver for 8-bit bus support
Hi Wolfgang, thank you for your pointers. Like I have said I'm not the one that submited v1 and in v2 I only changed what was pointed after v1. On Mon, Feb 13, 2012 at 11:32:30AM +0100, Wolfgang Denk wrote: - udelay(1); This is an unrelated change. It has no place in this patch. Yes, you are right. I'll leave this alone for now. Please submit separately, with respective comments for why uyou are doing this, if you really want to change this. static flash_sect_t find_sector (flash_info_t * info, ulong addr) { static flash_sect_t saved_sector = 0; /* previously found sector */ - static flash_info_t *saved_info = 0; /* previously used flash bank */ flash_sect_t sector = saved_sector; - if ((info != saved_info) || (sector = info-sector_count)) - sector = 0; I think this is bogus. Please clean up your patch! Yes, this probably is not needed. - p[i] = flash_read_uchar(info, start + i); + p[i] = flash_read_uchar(info, start + (i * 2)); On which systems / in which configurations has this code been tested? Answer at the end of this mail. - /* Issue FLASH reset command */ - flash_cmd_reset(info); really? for (cfi_offset=0; cfi_offset sizeof(flash_offset_cfi) / sizeof(uint); cfi_offset++) { + /* Issue FLASH reset command */ + flash_cmd_reset(info); really?? Nobody commented this in v1. I'll test without this change. if (flash_isequal (info, 0, FLASH_OFFSET_CFI_RESP, 'Q') -flash_isequal (info, 0, FLASH_OFFSET_CFI_RESP + 1, 'R') -flash_isequal (info, 0, FLASH_OFFSET_CFI_RESP + 2, 'Y')) { +flash_isequal (info, 0, FLASH_OFFSET_CFI_RESP + 2, 'R') +flash_isequal (info, 0, FLASH_OFFSET_CFI_RESP + 4, 'Y')) { flash_read_cfi(info, qry, FLASH_OFFSET_CFI_RESP, sizeof(struct cfi_qry)); ... Which configurations have been actually tested? DLink DNS323, board that I'm working on (orion5x, arm926ejs). Also it was tested in v1: http://lists.denx.de/pipermail/u-boot/2011-April/089611.html I will test this also on a MIPS board that I have in the next few days. I did not have time to do it today. I'll resend v3 after more testing and code reading. Regards, Luka ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] mx6: consolidating and extending anadig/analog/anatop register defs
Hi, Wolfgang, -Original Message- From: u-boot-boun...@lists.denx.de [mailto:u-boot-boun...@lists.denx.de] On Behalf Of Wolfgang Grandegger Sent: Monday, February 13, 2012 8:08 PM To: U-Boot Subject: [U-Boot] mx6: consolidating and extending anadig/analog/anatop register defs Hello, for the USB support on MX6Q, I'm trying to consolidate and extend the register definitions for the ANADIG registers. Unfortunately, three different names are used for the same registers: ANADIG, analog and ANATOP. Any idea what the names do stand for and what would be the most appropriate one. Apart from that, we should have a separate structure and header file for these registers. Currently, they are added to the CCM regs. The register definition in the CCM according to the RM as followings: Addresses: CCM_analog_PLL_SYS is 0h base + 0h offset = _h CCM_analog_PLL_SYS_SET is 0h base + 4h offset = _0004h CCM_analog_PLL_SYS_CLR is 0h base + 8h offset = _0008h CCM_analog_PLL_SYS_TOG is 0h base + Ch offset = _000Ch Thus, I put the register definition into the CCM parts. Wolfgang. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] USB: Staticize internal functions
Signed-off-by: Marek Vasut marek.va...@gmail.com Cc: Remy Bohmer r...@bohmer.net --- common/usb.c | 45 +++-- 1 files changed, 23 insertions(+), 22 deletions(-) diff --git a/common/usb.c b/common/usb.c index 63a11c8..de31212 100644 --- a/common/usb.c +++ b/common/usb.c @@ -80,10 +80,10 @@ char usb_started; /* flag for the started/stopped USB status */ /** * some forward declerations... */ -void usb_scan_devices(void); +static void usb_scan_devices(void); -int usb_hub_probe(struct usb_device *dev, int ifnum); -void usb_hub_reset(void); +static int usb_hub_probe(struct usb_device *dev, int ifnum); +static void usb_hub_reset(void); static int hub_port_reset(struct usb_device *dev, int port, unsigned short *portstat); @@ -316,7 +316,7 @@ usb_set_maxpacket_ep(struct usb_device *dev, int if_idx, int ep_idx) /* * set the max packed value of all endpoints in the given configuration */ -int usb_set_maxpacket(struct usb_device *dev) +static int usb_set_maxpacket(struct usb_device *dev) { int i, ii; @@ -331,7 +331,8 @@ int usb_set_maxpacket(struct usb_device *dev) * Parse the config, located in buffer, and fills the dev-config structure. * Note that all little/big endian swapping are done automatically. */ -int usb_parse_config(struct usb_device *dev, unsigned char *buffer, int cfgno) +static 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; @@ -450,7 +451,7 @@ int usb_clear_halt(struct usb_device *dev, int pipe) /** * get_descriptor type */ -int usb_get_descriptor(struct usb_device *dev, unsigned char type, +static int usb_get_descriptor(struct usb_device *dev, unsigned char type, unsigned char index, void *buf, int size) { int res; @@ -500,7 +501,7 @@ int usb_get_configuration_no(struct usb_device *dev, * set address of a device to the value in dev-devnum. * This can only be done by addressing the device via the default address (0) */ -int usb_set_address(struct usb_device *dev) +static int usb_set_address(struct usb_device *dev) { int res; @@ -553,7 +554,7 @@ int usb_set_interface(struct usb_device *dev, int interface, int alternate) / * set configuration number to configuration */ -int usb_set_configuration(struct usb_device *dev, int configuration) +static int usb_set_configuration(struct usb_device *dev, int configuration) { int res; USB_PRINTF(set configuration %d\n, configuration); @@ -616,7 +617,7 @@ int usb_get_class_descriptor(struct usb_device *dev, int ifnum, / * get string index in buffer */ -int usb_get_string(struct usb_device *dev, unsigned short langid, +static int usb_get_string(struct usb_device *dev, unsigned short langid, unsigned char index, void *buf, int size) { int i; @@ -764,7 +765,7 @@ struct usb_device *usb_get_dev_index(int index) /* returns a pointer of a new device structure or NULL, if * no device struct is available */ -struct usb_device *usb_alloc_new_device(void) +static struct usb_device *usb_alloc_new_device(void) { int i; USB_PRINTF(New Device %d\n, dev_index); @@ -790,7 +791,7 @@ struct usb_device *usb_alloc_new_device(void) * * Returns 0 for success, != 0 for error. */ -int usb_new_device(struct usb_device *dev) +static int usb_new_device(struct usb_device *dev) { int addr, err; int tmp; @@ -954,7 +955,7 @@ int usb_new_device(struct usb_device *dev) } /* build device Tree */ -void usb_scan_devices(void) +static void usb_scan_devices(void) { int i; struct usb_device *dev; @@ -988,42 +989,42 @@ static struct usb_hub_device hub_dev[USB_MAX_HUB]; static int usb_hub_index; -int usb_get_hub_descriptor(struct usb_device *dev, void *data, int size) +static int usb_get_hub_descriptor(struct usb_device *dev, void *data, int size) { return usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), USB_REQ_GET_DESCRIPTOR, USB_DIR_IN | USB_RT_HUB, USB_DT_HUB 8, 0, data, size, USB_CNTL_TIMEOUT); } -int usb_clear_hub_feature(struct usb_device *dev, int feature) +static int usb_clear_hub_feature(struct usb_device *dev, int feature) { return usb_control_msg(dev, usb_sndctrlpipe(dev, 0), USB_REQ_CLEAR_FEATURE, USB_RT_HUB, feature, 0, NULL, 0, USB_CNTL_TIMEOUT); } -int usb_clear_port_feature(struct usb_device *dev, int port, int feature) +static int usb_clear_port_feature(struct usb_device *dev,
[U-Boot] [PATCH 0/4] USB cleanup
This series introduces various cleanups in order to better split the USB subsystem components. Marek Vasut (4): USB: Staticize internal functions USB: Separate out USB hub driver USB: Make struct devrequest setup_packet local USB: Staticize usb_storage.c common/Makefile |2 +- common/usb.c | 448 ++- common/usb_hub.c | 483 ++ common/usb_storage.c | 39 ++-- include/usb.h|8 + 5 files changed, 522 insertions(+), 458 deletions(-) create mode 100644 common/usb_hub.c -- 1.7.8.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 3/4] USB: Make struct devrequest setup_packet local
Signed-off-by: Marek Vasut marek.va...@gmail.com Cc: Remy Bohmer li...@bohmer.net --- common/usb.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/common/usb.c b/common/usb.c index 81dcbe2..3c9ede4 100644 --- a/common/usb.c +++ b/common/usb.c @@ -73,7 +73,6 @@ static struct usb_device usb_dev[USB_MAX_DEVICE]; static int dev_index; static int running; static int asynch_allowed; -static struct devrequest setup_packet; char usb_started; /* flag for the started/stopped USB status */ @@ -180,6 +179,8 @@ int usb_control_msg(struct usb_device *dev, unsigned int pipe, unsigned short value, unsigned short index, void *data, unsigned short size, int timeout) { + struct devrequest setup_packet; + if ((timeout == 0) (!asynch_allowed)) { /* request for a asynch control pipe is not allowed */ return -1; -- 1.7.8.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/4] USB: Staticize internal functions
Signed-off-by: Marek Vasut marek.va...@gmail.com Cc: Remy Bohmer li...@bohmer.net --- common/usb.c | 45 +++-- 1 files changed, 23 insertions(+), 22 deletions(-) diff --git a/common/usb.c b/common/usb.c index 63a11c8..de31212 100644 --- a/common/usb.c +++ b/common/usb.c @@ -80,10 +80,10 @@ char usb_started; /* flag for the started/stopped USB status */ /** * some forward declerations... */ -void usb_scan_devices(void); +static void usb_scan_devices(void); -int usb_hub_probe(struct usb_device *dev, int ifnum); -void usb_hub_reset(void); +static int usb_hub_probe(struct usb_device *dev, int ifnum); +static void usb_hub_reset(void); static int hub_port_reset(struct usb_device *dev, int port, unsigned short *portstat); @@ -316,7 +316,7 @@ usb_set_maxpacket_ep(struct usb_device *dev, int if_idx, int ep_idx) /* * set the max packed value of all endpoints in the given configuration */ -int usb_set_maxpacket(struct usb_device *dev) +static int usb_set_maxpacket(struct usb_device *dev) { int i, ii; @@ -331,7 +331,8 @@ int usb_set_maxpacket(struct usb_device *dev) * Parse the config, located in buffer, and fills the dev-config structure. * Note that all little/big endian swapping are done automatically. */ -int usb_parse_config(struct usb_device *dev, unsigned char *buffer, int cfgno) +static 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; @@ -450,7 +451,7 @@ int usb_clear_halt(struct usb_device *dev, int pipe) /** * get_descriptor type */ -int usb_get_descriptor(struct usb_device *dev, unsigned char type, +static int usb_get_descriptor(struct usb_device *dev, unsigned char type, unsigned char index, void *buf, int size) { int res; @@ -500,7 +501,7 @@ int usb_get_configuration_no(struct usb_device *dev, * set address of a device to the value in dev-devnum. * This can only be done by addressing the device via the default address (0) */ -int usb_set_address(struct usb_device *dev) +static int usb_set_address(struct usb_device *dev) { int res; @@ -553,7 +554,7 @@ int usb_set_interface(struct usb_device *dev, int interface, int alternate) / * set configuration number to configuration */ -int usb_set_configuration(struct usb_device *dev, int configuration) +static int usb_set_configuration(struct usb_device *dev, int configuration) { int res; USB_PRINTF(set configuration %d\n, configuration); @@ -616,7 +617,7 @@ int usb_get_class_descriptor(struct usb_device *dev, int ifnum, / * get string index in buffer */ -int usb_get_string(struct usb_device *dev, unsigned short langid, +static int usb_get_string(struct usb_device *dev, unsigned short langid, unsigned char index, void *buf, int size) { int i; @@ -764,7 +765,7 @@ struct usb_device *usb_get_dev_index(int index) /* returns a pointer of a new device structure or NULL, if * no device struct is available */ -struct usb_device *usb_alloc_new_device(void) +static struct usb_device *usb_alloc_new_device(void) { int i; USB_PRINTF(New Device %d\n, dev_index); @@ -790,7 +791,7 @@ struct usb_device *usb_alloc_new_device(void) * * Returns 0 for success, != 0 for error. */ -int usb_new_device(struct usb_device *dev) +static int usb_new_device(struct usb_device *dev) { int addr, err; int tmp; @@ -954,7 +955,7 @@ int usb_new_device(struct usb_device *dev) } /* build device Tree */ -void usb_scan_devices(void) +static void usb_scan_devices(void) { int i; struct usb_device *dev; @@ -988,42 +989,42 @@ static struct usb_hub_device hub_dev[USB_MAX_HUB]; static int usb_hub_index; -int usb_get_hub_descriptor(struct usb_device *dev, void *data, int size) +static int usb_get_hub_descriptor(struct usb_device *dev, void *data, int size) { return usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), USB_REQ_GET_DESCRIPTOR, USB_DIR_IN | USB_RT_HUB, USB_DT_HUB 8, 0, data, size, USB_CNTL_TIMEOUT); } -int usb_clear_hub_feature(struct usb_device *dev, int feature) +static int usb_clear_hub_feature(struct usb_device *dev, int feature) { return usb_control_msg(dev, usb_sndctrlpipe(dev, 0), USB_REQ_CLEAR_FEATURE, USB_RT_HUB, feature, 0, NULL, 0, USB_CNTL_TIMEOUT); } -int usb_clear_port_feature(struct usb_device *dev, int port, int feature) +static int usb_clear_port_feature(struct usb_device *dev,
[U-Boot] [PATCH 4/4] USB: Staticize usb_storage.c
Also, make usb_stor_buf local. Signed-off-by: Marek Vasut marek.va...@gmail.com Cc: Remy Bohmer li...@bohmer.net --- common/usb_storage.c | 39 +++ 1 files changed, 19 insertions(+), 20 deletions(-) diff --git a/common/usb_storage.c b/common/usb_storage.c index de84c8d..1446fb0 100644 --- a/common/usb_storage.c +++ b/common/usb_storage.c @@ -79,7 +79,6 @@ static const unsigned char us_direction[256/8] = { }; #define US_DIRECTION(x) ((us_direction[x3] (x 7)) 1) -static unsigned char usb_stor_buf[512]; static ccb usb_ccb; /* @@ -164,15 +163,14 @@ static struct us_data usb_stor[USB_MAX_STOR_DEV]; #define USB_STOR_TRANSPORT_FAILED -1 #define USB_STOR_TRANSPORT_ERROR -2 -int usb_stor_get_info(struct usb_device *dev, struct us_data *us, +static int usb_stor_get_info(struct usb_device *dev, struct us_data *us, block_dev_desc_t *dev_desc); -int usb_storage_probe(struct usb_device *dev, unsigned int ifnum, +static int usb_storage_probe(struct usb_device *dev, unsigned int ifnum, struct us_data *ss); -unsigned long usb_stor_read(int device, unsigned long blknr, +static unsigned long usb_stor_read(int device, unsigned long blknr, unsigned long blkcnt, void *buffer); -unsigned long usb_stor_write(int device, unsigned long blknr, +static unsigned long usb_stor_write(int device, unsigned long blknr, unsigned long blkcnt, const void *buffer); -struct usb_device * usb_get_dev_index(int index); void uhci_show_temp_int_td(void); #ifdef CONFIG_PARTITIONS @@ -182,7 +180,7 @@ block_dev_desc_t *usb_stor_get_dev(int index) } #endif -void usb_show_progress(void) +static void usb_show_progress(void) { debug(.); } @@ -233,9 +231,6 @@ int usb_stor_scan(int mode) unsigned char i; struct usb_device *dev; - /* GJ */ - memset(usb_stor_buf, 0, sizeof(usb_stor_buf)); - if (mode == 1) printf( scanning bus for storage devices... ); @@ -493,7 +488,7 @@ static int usb_stor_CB_reset(struct us_data *us) * Set up the command for a BBB device. Note that the actual SCSI * command is copied into cbw.CBWCDB. */ -int usb_stor_BBB_comdat(ccb *srb, struct us_data *us) +static int usb_stor_BBB_comdat(ccb *srb, struct us_data *us) { int result; int actlen; @@ -541,7 +536,7 @@ int usb_stor_BBB_comdat(ccb *srb, struct us_data *us) /* FIXME: we also need a CBI_command which sets up the completion * interrupt, and waits for it */ -int usb_stor_CB_comdat(ccb *srb, struct us_data *us) +static int usb_stor_CB_comdat(ccb *srb, struct us_data *us) { int result = 0; int dir_in, retry; @@ -610,7 +605,7 @@ int usb_stor_CB_comdat(ccb *srb, struct us_data *us) } -int usb_stor_CBI_get_status(ccb *srb, struct us_data *us) +static int usb_stor_CBI_get_status(ccb *srb, struct us_data *us) { int timeout; @@ -658,7 +653,7 @@ int usb_stor_CBI_get_status(ccb *srb, struct us_data *us) #define USB_TRANSPORT_NOT_READY_RETRY 10 /* clear a stall on an endpoint - special for BBB devices */ -int usb_stor_BBB_clear_endpt_stall(struct us_data *us, __u8 endpt) +static int usb_stor_BBB_clear_endpt_stall(struct us_data *us, __u8 endpt) { int result; @@ -669,7 +664,7 @@ int usb_stor_BBB_clear_endpt_stall(struct us_data *us, __u8 endpt) return result; } -int usb_stor_BBB_transport(ccb *srb, struct us_data *us) +static int usb_stor_BBB_transport(ccb *srb, struct us_data *us) { int result, retry; int dir_in; @@ -790,7 +785,7 @@ again: return result; } -int usb_stor_CB_transport(ccb *srb, struct us_data *us) +static int usb_stor_CB_transport(ccb *srb, struct us_data *us) { int result, status; ccb *psrb; @@ -1042,7 +1037,7 @@ static void usb_bin_fixup(struct usb_device_descriptor descriptor, } #endif /* CONFIG_USB_BIN_FIXUP */ -unsigned long usb_stor_read(int device, unsigned long blknr, +static unsigned long usb_stor_read(int device, unsigned long blknr, unsigned long blkcnt, void *buffer) { unsigned long start, blks, buf_addr; @@ -1118,7 +1113,7 @@ retry_it: return blkcnt; } -unsigned long usb_stor_write(int device, unsigned long blknr, +static unsigned long usb_stor_write(int device, unsigned long blknr, unsigned long blkcnt, const void *buffer) { unsigned long start, blks, buf_addr; @@ -1199,7 +1194,7 @@ retry_it: } /* Probe to see if a new device is actually a Storage device */ -int usb_storage_probe(struct usb_device *dev, unsigned int ifnum, +static int usb_storage_probe(struct usb_device *dev, unsigned int ifnum, struct us_data *ss) { struct usb_interface *iface; @@ -1339,13 +1334,17 @@ int usb_storage_probe(struct usb_device *dev, unsigned int ifnum, return 1; } -int
[U-Boot] [PATCH 2/4] USB: Separate out USB hub driver
Signed-off-by: Marek Vasut marek.va...@gmail.com Cc: Remy Bohmer li...@bohmer.net --- common/Makefile |2 +- common/usb.c | 432 + common/usb_hub.c | 483 ++ include/usb.h|8 + 4 files changed, 494 insertions(+), 431 deletions(-) create mode 100644 common/usb_hub.c diff --git a/common/Makefile b/common/Makefile index 2d9ae8c..2a31c62 100644 --- a/common/Makefile +++ b/common/Makefile @@ -157,7 +157,7 @@ COBJS-$(CONFIG_CMD_UNIVERSE) += cmd_universe.o COBJS-$(CONFIG_CMD_UNZIP) += cmd_unzip.o ifdef CONFIG_CMD_USB COBJS-y += cmd_usb.o -COBJS-y += usb.o +COBJS-y += usb.o usb_hub.o COBJS-$(CONFIG_USB_STORAGE) += usb_storage.o endif COBJS-$(CONFIG_CMD_XIMG) += cmd_ximg.o diff --git a/common/usb.c b/common/usb.c index de31212..81dcbe2 100644 --- a/common/usb.c +++ b/common/usb.c @@ -82,11 +82,6 @@ char usb_started; /* flag for the started/stopped USB status */ */ static void usb_scan_devices(void); -static int usb_hub_probe(struct usb_device *dev, int ifnum); -static void usb_hub_reset(void); -static int hub_port_reset(struct usb_device *dev, int port, - unsigned short *portstat); - /*** * wait_ms */ @@ -765,7 +760,7 @@ struct usb_device *usb_get_dev_index(int index) /* returns a pointer of a new device structure or NULL, if * no device struct is available */ -static struct usb_device *usb_alloc_new_device(void) +struct usb_device *usb_alloc_new_device(void) { int i; USB_PRINTF(New Device %d\n, dev_index); @@ -791,7 +786,7 @@ static struct usb_device *usb_alloc_new_device(void) * * Returns 0 for success, != 0 for error. */ -static int usb_new_device(struct usb_device *dev) +int usb_new_device(struct usb_device *dev) { int addr, err; int tmp; @@ -979,427 +974,4 @@ static void usb_scan_devices(void) USB_PRINTF(scan end\n); } - -/ - * HUB Driver - * Probes device for being a hub and configurate it - */ - -static struct usb_hub_device hub_dev[USB_MAX_HUB]; -static int usb_hub_index; - - -static int usb_get_hub_descriptor(struct usb_device *dev, void *data, int size) -{ - return usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), - USB_REQ_GET_DESCRIPTOR, USB_DIR_IN | USB_RT_HUB, - USB_DT_HUB 8, 0, data, size, USB_CNTL_TIMEOUT); -} - -static int usb_clear_hub_feature(struct usb_device *dev, int feature) -{ - return usb_control_msg(dev, usb_sndctrlpipe(dev, 0), - USB_REQ_CLEAR_FEATURE, USB_RT_HUB, feature, - 0, NULL, 0, USB_CNTL_TIMEOUT); -} - -static int usb_clear_port_feature(struct usb_device *dev, int port, int feature) -{ - return usb_control_msg(dev, usb_sndctrlpipe(dev, 0), - USB_REQ_CLEAR_FEATURE, USB_RT_PORT, feature, - port, NULL, 0, USB_CNTL_TIMEOUT); -} - -static int usb_set_port_feature(struct usb_device *dev, int port, int feature) -{ - return usb_control_msg(dev, usb_sndctrlpipe(dev, 0), - USB_REQ_SET_FEATURE, USB_RT_PORT, feature, - port, NULL, 0, USB_CNTL_TIMEOUT); -} - -static int usb_get_hub_status(struct usb_device *dev, void *data) -{ - return usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), - USB_REQ_GET_STATUS, USB_DIR_IN | USB_RT_HUB, 0, 0, - data, sizeof(struct usb_hub_status), USB_CNTL_TIMEOUT); -} - -static int usb_get_port_status(struct usb_device *dev, int port, void *data) -{ - return usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), - USB_REQ_GET_STATUS, USB_DIR_IN | USB_RT_PORT, 0, port, - data, sizeof(struct usb_hub_status), USB_CNTL_TIMEOUT); -} - - -static void usb_hub_power_on(struct usb_hub_device *hub) -{ - int i; - struct usb_device *dev; - - dev = hub-pusb_dev; - /* Enable power to the ports */ - USB_HUB_PRINTF(enabling power on all ports\n); - for (i = 0; i dev-maxchild; i++) { - usb_set_port_feature(dev, i + 1, USB_PORT_FEAT_POWER); - USB_HUB_PRINTF(port %d returns %lX\n, i + 1, dev-status); - wait_ms(hub-desc.bPwrOn2PwrGood * 2); - } -} - -static void usb_hub_reset(void) -{ - usb_hub_index = 0; -} - -static struct usb_hub_device *usb_hub_allocate(void) -{ - if (usb_hub_index USB_MAX_HUB) - return hub_dev[usb_hub_index++]; - - printf(ERROR: USB_MAX_HUB (%d) reached\n, USB_MAX_HUB); - return NULL; -} - -#define MAX_TRIES 5 - -static inline char *portspeed(int portstatus) -{ - if (portstatus (1 USB_PORT_FEAT_HIGHSPEED)) - return 480 Mb/s; - else if (portstatus
Re: [U-Boot] [PATCH 1/4] USB: Staticize internal functions
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 2/4] USB: Separate out USB hub driver
i don't really see the point, but looks simple enough 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 3/4] USB: Make struct devrequest setup_packet local
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 4/4] USB: Staticize usb_storage.c
On Monday 13 February 2012 23:58:19 Marek Vasut wrote: Also, make usb_stor_buf local. probably should get split out into its own patch --- a/common/usb_storage.c +++ b/common/usb_storage.c int usb_stor_scan(int mode) ... unsigned char i; struct usb_device *dev; - /* GJ */ - memset(usb_stor_buf, 0, sizeof(usb_stor_buf)); - if (mode == 1) printf( scanning bus for storage devices... ); ... -int usb_stor_get_info(struct usb_device *dev, struct us_data *ss, +static int usb_stor_get_info(struct usb_device *dev, struct us_data *ss, block_dev_desc_t *dev_desc) { unsigned char perq, modi; unsigned long cap[2]; unsigned long *capacity, *blksz; ccb *pccb = usb_ccb; + unsigned char usb_stor_buf[512]; + + /* GJ */ + memset(usb_stor_buf, 0, sizeof(usb_stor_buf)); before, the code would do: usb_stor_scan() { memset(usb_stor_buf) for (...) { usb_stor_get_info() { ... use usb_stor_buf ... } } } now the new code calls memset multiple times. in a cursory reading of the code, i'd say just drop the memset altogether. the get_info func will return if the usb_inquiry call failed and the buffer contents don't matter. if usb_query worked, then the buffer should contain valid data and the memset was pointless. looking a bit more, i think 512 is too big. it makes sense when it's a global dumping ground that random parts of the code would use. but this buffer is only used with usb_inquiry (which in reality is the SCSI INQUIRY command), and that should require just 36 bytes. so my suggestion would be: - drop usb_stor_buf changes from this patch and make a dedicated one - drop the useless GJ comment - drop the useless memset - shrink the buffer to 36 bytes -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/6] config.mk: Check for -fstack-usage support
On Monday 13 February 2012 18:02:03 Tom Rini wrote: --- a/config.mk +++ b/config.mk +# Report stack usage if supported +CFLAGS_STACK := $(call cc-option,-fstack-usage,) not that it really matters, but you don't need the 2nd comma 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 4/6] spl.c: Use __noreturn decorator
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 5/6] README: Add more SPL config options
pedantically, might be better summary: README: document more SPL config options -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/6] config.mk: Make cc-option create a file under include/generated
On Monday 13 February 2012 18:02:02 Tom Rini wrote: isnt possible with /dev/null. isn't --- a/config.mk +++ b/config.mk -cc-option-sys = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \ - /dev/null 21; then \ +cc-option-sys = $(shell mkdir -p $(dir $(CC_TEST_FILE)); \ + touch $(CC_TEST_FILE); \ + if $(CC) $(CFLAGS) $(1) -S -o $(CC_TEST_FILE) \ + -xc $(CC_TEST_FILE) /dev/null 21; then \ why do you need to touch the file first ? why do you source this test file instead of continuing to source /dev/null ? don't you run into problems if you use cc-option-sys more than once and a previous run wrote something to that file ? then cc-option-sys could fail on later runs ... seems like you should drop the `touch` and keep the -xc /dev/null and only change the -o to $(CC_TEST_FILE) ... -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] Remove execute permissions from source files
be nice if we could define git hooks to reject this stuff outright ... 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