Stefan Roese [Thu, 6 Dec 2012 14:44:12 +0000 (15:44 +0100)]
cfi_flash: Report Advanced Sector Protection (PPB) with flinfo cmd
Report the usage of the Advanced Sector Protection (PPB) to the user
upon 'flinfo' command. E.g:
Bank # 1: CFI conformant flash (16 x 16) Size: 64 MB in 512 Sectors
AMD Standard command set, Manufacturer ID: 0x01, Device ID: 0x227E2301
Advanced Sector Protection (PPB) enabled
Erase timeout: 16384 ms, write timeout: 2 ms
Buffer write timeout: 5 ms, buffer size: 32 bytes
Sector Start Addresses:
FC000000 E
FC020000 E RO
FC040000 E
FC060000 E
FC080000 E
...
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Holger Brunck <holger.brunck@keymile.com>
Tested-by: Holger Brunck <holger.brunck@keymile.com>
Stefan Roese [Thu, 6 Dec 2012 14:44:11 +0000 (15:44 +0100)]
cfi_flash: Enable PPB protection for all AMD cmdset flash chips
Not only Spansion supports the Persistent Protection Bits (PPB) locking.
Other devices like the Micron JS28F512M29EWx also support this type
of locking/unlocking. Detection of support is done in the same way as
done for the Spansion chips - via the 0x49 CFI word.
This patch enables this PPB protection mechanism for all AMD type
(AMD commandset) chips.
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Holger Brunck <holger.brunck@keymile.com>
Tested-by: Holger Brunck <holger.brunck@keymile.com>
Stefan Roese [Thu, 6 Dec 2012 14:44:10 +0000 (15:44 +0100)]
cfi_flash: Read PPB sector protection from device for AMD/Spansion chips
Patch
66863b05 [cfi_flash: add support for Spansion flash PPB sector
protection] introduced the PPB (Persistent Protection Bit) locking for
Spansion chips. But right now the sector protection status (locked vs
unlocked) is set to unlocked for all sectors upon bootup. The real
sector protection status is ignored.
This patch now reads the current sector protection status and uses
it for these AMD/Spansion flash chips.
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Holger Brunck <holger.brunck@keymile.com>
Tested-by: Holger Brunck <holger.brunck@keymile.com>
Stefan Roese [Thu, 6 Dec 2012 14:44:09 +0000 (15:44 +0100)]
cfi_flash: Add manufact_match helper function
Consolidate manufacturer matching into the function manufact_match()
and use it.
Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: Holger Brunck <holger.brunck@keymile.com>
Angelo Dureghello [Sat, 1 Dec 2012 00:14:18 +0000 (01:14 +0100)]
mtd/cfi: add support for SST 4KB sector granularity
Add support for SST 4KB sector granularity.
Many recent SST flashes, i.e. SST39VF3201B and similar of this family
are declared CFI-conformant from SST. They support CFI query, but implement
2 different sector sizes in the same memory: a 64KB sector (they call it
"block", std AMD erase cmd=0x30), and a 4KB sector (they call it "sector",
erase cmd=0x50). Also, CFI query on these chips, reading from address 0x2dh
of cfi query struct, detects a number of secotrs for the 4KB granularity
(flinfo shows it).
For all other aspects, they are CFI compliant, so, as Linux do, i think
it's a good idea to handle these chips in the CFI driver, with a fixup
to allow 4KB granularity, as should be expected, instead of 64KB.
Signed-off-by: Angelo Dureghello <sysamfw@gmail.com>
Signed-off-by: Stefan Rose <sr@denx.de>
Tom Rini [Wed, 9 Jan 2013 15:13:22 +0000 (08:13 -0700)]
Merge branch 'master' of git://git.denx.de/u-boot-arm
Albert ARIBAUD [Tue, 8 Jan 2013 22:57:20 +0000 (23:57 +0100)]
Fix SPL build for non-ARM targets
Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
Tom Rini [Tue, 8 Jan 2013 15:28:27 +0000 (08:28 -0700)]
Merge branch 'master' of git://git.denx.de/u-boot-arm
Albert ARIBAUD [Tue, 8 Jan 2013 10:18:03 +0000 (10:18 +0000)]
arm: remove useless code in start.S files
Remove code such as unneeded includes or labels.
These removals have no functional effect.
Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
Albert ARIBAUD [Tue, 8 Jan 2013 10:18:02 +0000 (10:18 +0000)]
arm: move C runtime setup code in crt0.S
Move all the C runtime setup code from every start.S
in arch/arm into arch/arm/lib/crt0.S. This covers
the code sequence from setting up the initial stack
to calling into board_init_r().
Also, rewrite the C runtime setup and make functions
board_init_*() and relocate_code() behave according to
normal C semantics (no jumping across the C stack any
more, etc).
Some SPL targets had to be touched because they use
start.S explicitly or for some reason; the relevant
maintainers and custodians are cc:ed.
Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
Albert ARIBAUD [Tue, 8 Jan 2013 13:59:37 +0000 (14:59 +0100)]
Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'
Albert ARIBAUD [Tue, 8 Jan 2013 12:15:45 +0000 (13:15 +0100)]
Merge branch 'u-boot-ti/master' into 'u-boot-arm/master'
This required manual merging drivers/mtd/nand/Makefile
and adding am335x_evm support for CONFIG_SPL_NAND_DRIVERS
Fabio Estevam [Thu, 3 Jan 2013 08:24:33 +0000 (08:24 +0000)]
tools: imximage: Load a size that is multiple of 512
In order to mx53 ROM to properly load the U-boot image, its header size should
be multiple of 512 bytes.
This issue was observed with gcc 4.6.2/4.7.3, which caused data aborts:
U-Boot
2013.01-rc2-00172-gf8cfcf1-dirty (Dec 26 2012 - 13:13:28)
Board: MX53 LOCO
I2C: ready
DRAM: 1 GiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1
In: serial
Out: serial
Err: serial
CPU: Freescale i.MX53 family rev2.1 at 1000 MHz
Reset cause: WDOG
Net: FEC
Warning: FEC using MAC address from net device
Hit any key to stop autoboot: 0
data abort
MAYBE you should read doc/README.arm-unaligned-accesses
pc : [<
aff72220>] lr : [<
aff721fc>]
sp :
af565e20 ip :
af566918 fp :
00000000
r10:
00000003 r9 :
affabb5b r8 :
af565f58
r7 :
00000000 r6 :
36747fff r5 :
af5668e8 r4 :
36747fff
r3 :
af5668ec r2 :
af5668eb r1 :
00000000 r0 :
af5668e8
Flags: NzcV IRQs off FIQs off Mode SVC_32
Resetting CPU ...
resetting ...
,and this patch fixes it.
Also, even though the ROUND macro is already defined in common.h,
the reason for redefining it in image.h is explained by Stefano Babic:
"I will remark a previous comment - even if including common.h seems a
good idea to avoid duplications, it makes tools like mkimage to depend
on the selected board, because <board>_config must run. Even if this is
not a problem for us u-boot developers, it becomes an issue when these
tools are included in distros (like u-boot-tools in Ubuntu) and cannot
be packaged."
Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Fabio Estevam [Fri, 28 Dec 2012 04:05:29 +0000 (04:05 +0000)]
mx53loco: Improve error handling on power_init()
Make the error handling more robust.
Check if each one of the PMIC writes fail and if they do, just return
immediately.
Also, print the cause for the failures.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Fabio Estevam [Fri, 28 Dec 2012 04:05:28 +0000 (04:05 +0000)]
mx53loco: Remove unneeded 'retval' variable
commit
c73368150 (pmic: Extend PMIC framework to support multiple instances
of PMIC devices) introduced an extra 'retval' variable, but this is not
necessary since we have already the variable 'ret' in place.
So use 'ret' to store the return values from the pmic related calls and remove
'retval'.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Fabio Estevam [Thu, 27 Dec 2012 05:46:33 +0000 (05:46 +0000)]
mx51evk: Remove unneeded comment
Looks like the original comment came from a copy and paste from mx31ads.h.
It does not have a context on mx51evk anymore, so delete it.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Shawn Guo [Sun, 30 Dec 2012 14:15:00 +0000 (14:15 +0000)]
mx6qsabresd: use on-board eMMC to store environment
It makes more sense to use on-board eMMC to store environments. The
boot partition 1 is selected by default.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Shawn Guo [Sun, 30 Dec 2012 14:14:59 +0000 (14:14 +0000)]
mx6qsabresd: add usdhc2 and usdhc4 support
The on-board number of available usdhc devices is something board
specific. The patch moves CONFIG_SYS_FSL_USDHC_NUM out of
mx6qsabre_common.h and adds usdhc2 and usdhc4 support for mx6qsabresd
board.
To keep the default mmc device for environment same as before (usdhc3),
it moves CONFIG_SYS_MMC_ENV_DEV out of mx6qsabre_common.h and changes
it to 1 for mx6qsabresd.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Shawn Guo [Sun, 30 Dec 2012 14:14:58 +0000 (14:14 +0000)]
fsl_esdhc: add MMC_MODE_HC host_caps
All esdhc variants we know should support high capacity MMC cards,
so let's add MMC_MODE_HC host_caps unconditionally to support those
MMC cards (capacity > 2 GB).
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Ashok [Wed, 7 Nov 2012 07:37:15 +0000 (07:37 +0000)]
mx35pdk:Use IMX_GPIO_NR macro
Use IMX_GPO_NR macro
Signed-off-by: Ashok Kumar Reddy <ashokkourla2000@gmail.com>
Acked-by: Stefano Babic <sbabic@denx.de>
Marek Vasut [Tue, 25 Dec 2012 15:08:40 +0000 (15:08 +0000)]
mxs: Add NAND fdt and ramdisk partition to m28evk
Adjust the NAND partitioning layout so that there is a separate partition
for the ramdisk and fdt blob on the NAND.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Fabio Estevam [Wed, 26 Dec 2012 05:50:20 +0000 (05:50 +0000)]
mx53loco: Call PMIC related functions from board_late_init()
Since commit
c733681 (pmic: Extend PMIC framework to support multiple instances
of PMIC devices) mx53loco fails to allocate the memory for PMIC:
U-Boot 2013.01-rc2-dirty (Dec 20 2012 - 15:55:01)
Board: MX53 LOCO
I2C: ready
DRAM: 1 GiB
pmic_alloc: No available memory for allocation!
pmic_init: POWER allocation error!
CPU: Freescale i.MX53 family rev2.0 at 800 MHz
Reset cause: POR
MMC: FSL_SDHC: 0, FSL_SDHC: 1
Calling the PMIC related functions at a later stage, ie, from board_late_init()
fixes the issue.
Reported-by: Robert Nelson <robertcnelson@gmail.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Tested-by: Stefano Babic <sbabic@denx.de>
Stefan Reinauer [Fri, 14 Dec 2012 13:05:18 +0000 (13:05 +0000)]
x86: Add coreboot version to u-boot's version command
Since U-Boot runs from coreboot on x86, the Coreboot version is an
important part of the boot state. This version information is
available in the coreboot tables, so print it when the 'version'
command is used.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 14 Dec 2012 13:05:17 +0000 (13:05 +0000)]
x86: coreboot: Enable io command
Enable the io command for x86 on coreboot.
Signed-off-by: Simon Glass <sjg@chromium.org>
Otavio Salvador [Fri, 21 Dec 2012 06:59:07 +0000 (06:59 +0000)]
mx6qsabre_common: Change default loadaddr to 0x12000000
This allow use of mainline and Freescale BSP Linux kernel with same
environment.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Otavio Salvador [Fri, 21 Dec 2012 06:59:06 +0000 (06:59 +0000)]
mx6qsabrelite: Change default loadaddr to 0x12000000
This allow use of mainline and Freescale BSP Linux kernel with same
environment.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Otavio Salvador [Fri, 21 Dec 2012 06:59:05 +0000 (06:59 +0000)]
mx53loco: Change default loadaddr to 0x72000000
This allow use of mainline and Freescale BSP Linux kernel with same
environment.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Otavio Salvador [Fri, 21 Dec 2012 06:59:04 +0000 (06:59 +0000)]
mx53loco: We shouldn't hardcode a rootfs filesystem type
For a generic environment, we shouldn't have a fixed rootfs filesystem
so we drop it from env.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Fabio Estevam [Tue, 25 Dec 2012 10:20:39 +0000 (10:20 +0000)]
mx35pdk: Allow booting of a device tree kernel
Select CONFIG_OF_LIBFDT, so that a dt kernel can be launched.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Scott Wood [Thu, 20 Dec 2012 11:51:05 +0000 (11:51 +0000)]
env: don't generate callback list entries for SPL
SPL doesn't write to the environment. These list entries prevent the
functions from being garbage-collected, even though nothing will look at
the list. This caused several SPL builds (e.g. P2020RDB-PC_NAND) to
break due to size limitations and/or unresolved symbols.
A static inline function is used to provide a context in which we
can consume the callback, and thus avoid unused function warnings.
Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: Joe Hershberger <joe.hershberger@gmail.com>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
Tom Rini [Sat, 22 Dec 2012 12:55:19 +0000 (05:55 -0700)]
Merge branch 'master' of git://git.denx.de/u-boot-arm
Albert ARIBAUD [Sat, 22 Dec 2012 10:59:14 +0000 (11:59 +0100)]
Merge samsung, imx, tegra into u-boot-arm/master
This commit merges branches from samsung, imx and tegra
meant to fix merge issues between u-boot/master and
u-boot-arm/master, as well as a few manual merge fixes.
Tom Rini [Fri, 21 Dec 2012 23:19:29 +0000 (16:19 -0700)]
Merge branch 'master' of git://git.denx.de/u-boot-usb
Prabhakar Kushwaha [Wed, 7 Nov 2012 21:52:27 +0000 (21:52 +0000)]
driver/mtd/IFC:Wait tWB time, poll R/B before command execution
IFC_FIR_OP_CMD0 issues command for execution without checking flash
readiness. It may cause problem if flash is not ready. Instead use
IFC_FIR_OP_CW0 which Wait for tWB time and poll R/B to return high or
time-out, before issuing command.
NAND_CMD_READID command implemention does not fulfill above requirement. So
update its programming.
Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Signed-off-by: Hemant Nautiyal <hemant.nautiyal@freescale.com>
Tom Rini [Thu, 20 Dec 2012 17:53:20 +0000 (10:53 -0700)]
Merge branch 'master' of git://git.denx.de/u-boot-sh
Nikita Kiryanov [Mon, 3 Dec 2012 14:17:58 +0000 (16:17 +0200)]
cm_t35: use new low level interface for usb ehci
Update usb host support to use new version of omap_ehci_hcd_init.
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Nikita Kiryanov [Sun, 2 Dec 2012 11:59:19 +0000 (13:59 +0200)]
cm-t35: add USB host support
Add support for USB host ports on cm-t3530 and cm-t3730.
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Nikita Kiryanov [Sun, 2 Dec 2012 11:59:18 +0000 (13:59 +0200)]
twl4030: add gpio register offsets
Add gpio register offsets for twl4030.
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Tom Rini [Thu, 20 Dec 2012 14:30:27 +0000 (07:30 -0700)]
Revert "fw_env: fix building w/out a config.h"
I had missed Joe's NAK on this patch, so...
This reverts commit
92ace272d06cec1d7f1533bb9edf914fb5845fba.
Signed-off-by: Tom Rini <trini@ti.com>
Yoshihiro Shimoda [Sun, 4 Nov 2012 15:54:20 +0000 (15:54 +0000)]
serial_sh: Add support Renesas SH7752
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Yoshihiro Shimoda [Sun, 4 Nov 2012 15:53:22 +0000 (15:53 +0000)]
sh: add support for sh7752evb board
The R0P7752C00000RZ board has SH7752, 512MB DDR3-SDRAM, SPI ROM,
Gigabit Ethernet, and eMMC.
This patch supports the following functions:
- 512MB DDR3-SDRAM, SCIF4, SPI ROM, Gigabit Ethernet, eMMC
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Jens Scharsig (BuS Elektronik) [Tue, 20 Nov 2012 02:06:25 +0000 (02:06 +0000)]
coldfire: eb_cpu5282: fix: boot from internal flash
* By a sequence of unfavorable conditions in the config header file, the eb_cpu5282
booting from internal stopped after relocation. Blame it is a faulty value of
CONFIG_SYS_MONITOR_BASE. This patch fix this by replace the wrong condition in
config header with option in board.cfg
Signed-off-by: Jens Scharsig (BuS Elektronik) <esw@bus-elektronik.de>
Mike Frysinger [Sat, 10 Nov 2012 19:47:47 +0000 (19:47 +0000)]
fw_env: fix building w/out a config.h
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Mike Frysinger [Sat, 10 Nov 2012 19:47:46 +0000 (19:47 +0000)]
fw_env: fix incorrect usage of open(O_CREAT)
When using open(), the O_CREAT flag must be given a mode, otherwise it
uses random garbage from the stack. Also, it can fail to build:
In file included from /usr/include/fcntl.h:290:0,
from fw_env_main.c:42:
In function 'open',
inlined from 'main' at fw_env_main.c:97:9:
/usr/include/bits/fcntl2.h:50:24: error: call to '__open_missing_mode' declared
with attribute error: open with O_CREAT in second argument needs 3 arguments
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Mike Frysinger [Sat, 10 Nov 2012 19:47:45 +0000 (19:47 +0000)]
fw_env: fix type of len
This variable is assigned by a size_t, and is printed that way, but is
incorrectly declared as an int. Which means we get warnings:
fw_env.c: In function 'fw_setenv':
fw_env.c:409:5: warning: format '%zu' expects argument of type 'size_t',
but argument 3 has type 'int' [-Wformat]
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Joe Hershberger [Thu, 1 Nov 2012 16:21:14 +0000 (16:21 +0000)]
Add a simple load option to setexpr
Make setexpr accept a 2 parameter variant that will simply load a value
into a variable. This is useful for loading a value from memory.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Simon Glass [Mon, 8 Oct 2012 13:16:02 +0000 (13:16 +0000)]
spi: Add SPI flash test
It is useful to have a basic SPI flash test, which tests that the SPI chip,
the SPI bus and the driver are behaving.
This test erases part of the flash, writes data and reads it back as a
sanity check that all is well.
Use CONFIG_SF_TEST to enable it.
Signed-off-by: Simon Glass <sjg@chromium.org>
James Miller [Fri, 28 Sep 2012 14:28:00 +0000 (14:28 +0000)]
spi: Add progress percentage and write speed to `sf update`
Output a progress update only at most 10 times per second, to avoid
saturating (and waiting on) the console. Make the summary line
to fit on a single line. Make sure that cursor sits at the end of
each update line instead of the beginning.
Sample output:
SF: Detected W25Q32 with page size 4 KiB, total 4 MiB
Update SPI
1331200 bytes written,
2863104 bytes skipped in 21.912s, speed 199728 B/s
time: 21.919 seconds, 21919 ticks
Skipping verify
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: James Miller <jamesmiller@chromium.org>
Signed-off-by: Taylor Hutt <thutt@chromium.org>
[trini: Drop 'const' from bytes_per_second()]
Signed-off-by: Tom Rini <trini@ti.com>
Allen Martin [Wed, 19 Dec 2012 21:02:36 +0000 (13:02 -0800)]
Merge remote-tracking branch 'u-boot/master' into u-boot-arm-merged
Conflicts:
README
arch/arm/cpu/armv7/exynos/clock.c
board/samsung/universal_c210/universal.c
drivers/misc/Makefile
drivers/power/power_fsl.c
include/configs/mx35pdk.h
include/configs/mx53loco.h
include/configs/seaboard.h
Tom Rini [Tue, 18 Dec 2012 01:39:50 +0000 (18:39 -0700)]
Merge branch 'master' of git://git.denx.de/u-boot-net
Tom Rini [Tue, 18 Dec 2012 01:39:45 +0000 (18:39 -0700)]
Merge branch 'master' of git://git.denx.de/u-boot-nand-flash
Pantelis Antoniou [Fri, 30 Nov 2012 08:01:06 +0000 (08:01 +0000)]
g_dnl: Properly terminate string list.
Well, not terminating the list causes very interesting crashes.
As in changing the vendor & product ID crashes. Fun.
Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
Pantelis Antoniou [Fri, 30 Nov 2012 08:01:05 +0000 (08:01 +0000)]
g_dnl: Issue connect/disconnect as appropriate
Call usb_gadget_connect/usb_gadget_disconnect in g_dnl_bind/g_dnl_unbind.
Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
Vincent Palatin [Thu, 13 Dec 2012 01:55:29 +0000 (17:55 -0800)]
usb: properly detect empty mass storage media reader
When a USB card reader is empty, it will return "Not Ready - medium not
present" as Key Code Qualifier. In that situation, it's useless waiting
for the full timeout since the result won't change until the user
inserts a card.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
Milind Choudhary [Thu, 13 Dec 2012 01:55:28 +0000 (17:55 -0800)]
usb: Clean up newly allocated device nodes in case of configuration failure
If probe of a newly connected device fails for some reason, clean up
the allocated entry in usb_dev array.
Signed-off-by: Milind Choudhary <milindc@codeaurora.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
Vipin Kumar [Thu, 13 Dec 2012 10:55:53 +0000 (16:25 +0530)]
usbh/ehci: Increase timeout for enumeration
The current logic reads the port status just once after usb_hub_power_on and
expects the portstatus and portchange to report the connection status
immediately and correctly.
Few pen drives are not able to report both of them immediately ie. those pens
report the connection change but not the connected state after the first read.
This opportunity once lost is gone for ever because the u-boot, unlike linux or
any other OS, works in polling mode.
This patch modifies the logic to read the port status continuously until the
portstatus and portchange both report a connection change as well as a connected
state or no connection change and no connection. This logic is placed in a
timeout of 10 sec. At the end of it, the pen drive would have either reported a
ONE or a ZERO in bit 1 of portstatus as well as portchange.
It enhances the set of pen drives which can eventually be detected by u-boot
Note: This 10 second timeout is based purely on several experiments done with
the broken pen drives
Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Richard Genoud [Thu, 29 Nov 2012 23:18:31 +0000 (23:18 +0000)]
usb documentation: fix typo
Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Lukasz Dalek [Thu, 29 Nov 2012 14:55:16 +0000 (15:55 +0100)]
h2200: Add USB CDC ethernet support
Add support for ethernet over USB which can be used for e.g. booting
process. It works with tftp and dhcp clients code.
Signed-off-by: Lukasz Dalek <luk0104@gmail.com>
Lukasz Dalek [Thu, 29 Nov 2012 12:59:23 +0000 (13:59 +0100)]
pxa25x_udc: Remove usbdescriptors.h
usbdescriptors.h conflicts with linux/usb/ch9.h.
Remove it.
Signed-off-by: Lukasz Dalek <luk0104@gmail.com>
Yoshihiro Shimoda [Sun, 4 Nov 2012 15:54:30 +0000 (15:54 +0000)]
net: sh_eth: add support for SH7752
SH7752 has two fast ethernet controllers and two gigabit ethernet
controllers. It is similar to SH7757.
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Acked-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Joe Hershberger [Mon, 5 Nov 2012 06:13:45 +0000 (06:13 +0000)]
net: Fix endianness bug in link-local
The ip is stored in network order, so we can't test it in host order.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Kim Phillips <kim.phillips@freescale.com>
Simon Glass [Thu, 11 Oct 2012 13:57:36 +0000 (13:57 +0000)]
net: Add tftp speed indication
This prints a tftp speed indication after the download completes. This
is the 3.6 MiB/s indicator below.
Tegra2 (SeaBoard) # tftp ...
Using asx0 device
TFTP from server 172.22.72.144; our IP address is 172.22.73.81
Filename '/tftpboot/uImage-user-seaboard-1'.
Load address: 0x408000
Loading: #################################################
3.6 MiB/s
done
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
trem [Sat, 6 Oct 2012 04:25:56 +0000 (04:25 +0000)]
powerpc: remove not used CONFIG_SYS_TFTP_LOADADDR
CONFIG_SYS_TFTP_LOADADDR is defined on severals boards,
but it's never used. So we can safely removed it.
Signed-off-by: Philippe Reynes <tremyfr@yahoo.fr>
Michal Simek [Tue, 7 Aug 2012 02:23:07 +0000 (02:23 +0000)]
phy: Add support for Marvell 88E1118R
Marvell 88E1118R has different uid then
88E1118.
Signed-off-by: Michal Simek <monstr@monstr.eu>
CC: Andy Fleming <afleming@freescale.com>
CC: Zang Roy-R61911 <tie-fei.zang@freescale.com>
CC: Kumar Gala <galak@kernel.crashing.org>
Ruchika Gupta [Thu, 19 Apr 2012 02:27:11 +0000 (02:27 +0000)]
e1000e : Correct Rx Threshold granularity
In e1000e driver, Rx descriptor queue is used such that hardware can add only
one descriptor at a time. So the WTHRESH granularity in RXDCTL should be set
to single descriptor. This would ensure that every time controller fills a Rx
descriptor, it is flushed to host memory. Earlier this granularity was in
cache line units i.e 2 descriptors. This leads to controller always waiting
for 2 descriptors before flushing them out. But since not more than one Rx BD
is actually available , the accumulation condition never gets hit.
Signed-off-by: Ruchika Gupta <ruchika.gupta@freescale.com>
Signed-off-by: Vakul Garg <vakul@freescale.com>
Acked-by: Roy Zang <tie-fei.zang@freescale.com>
Eric Benard [Tue, 11 Dec 2012 11:36:21 +0000 (11:36 +0000)]
m28evk/mx28evk: fix nand_update_full
- since commit
418396e212b59bf907dbccad997ff50f7eb61b16 nand write.raw
can take the number of page to be written as an argument. nand_update_full
is passing the size (in bytes) to nand write.raw. This value was previously
ignored but now breaks the write.
- this patch updates the default environment of these boards to provide a
pagecount instead of a size to nand write.raw.
- tested on a mx28evk with a 4k page NAND and on a custom board with a
2k page NAND.
Signed-off-by: Eric BĂ©nard <eric@eukrea.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
Scott Wood [Fri, 14 Dec 2012 22:03:55 +0000 (16:03 -0600)]
Merge remote-tracking branch 'origin/master'
Tom Rini [Fri, 14 Dec 2012 21:43:22 +0000 (14:43 -0700)]
Prepare v2013.01-rc2
Signed-off-by: Tom Rini <trini@ti.com>
Tom Rini [Thu, 13 Dec 2012 20:58:27 +0000 (13:58 -0700)]
omap3_evm: Let CONFIG_EFI_PARTITION be set for SPL
The #ifdef here is not enough to stop part_efi.c from being built, only
being unused. And with recent changes this now leads to warnings. The
easiest solution here is to just let the garbage collection at link time
do its job.
Signed-off-by: Tom Rini <trini@ti.com>
Joe Hershberger [Wed, 12 Dec 2012 04:16:37 +0000 (22:16 -0600)]
env: Handle write-once ethaddr and serial# generically
Use the variable access flags to implement the protection for ethaddr
and serial# instead of hard-coding them.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Joe Hershberger [Wed, 12 Dec 2012 04:16:36 +0000 (22:16 -0600)]
env: Implement the env delete command
Implement a way to delete more than one variable at a time.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Joe Hershberger [Wed, 12 Dec 2012 04:16:35 +0000 (22:16 -0600)]
env: Add setenv force support
Now that we have support for permissions, add a way to override them.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Joe Hershberger [Wed, 12 Dec 2012 04:16:34 +0000 (22:16 -0600)]
env: Add support for access control to .flags
Add support for read-only, write-once, and change-default.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Joe Hershberger [Wed, 12 Dec 2012 04:16:33 +0000 (22:16 -0600)]
env: Add a command to display details about env flags
Similar to the env callback command, this will show details about the
options available, the static list, and the currently active variables.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Joe Hershberger [Wed, 12 Dec 2012 04:16:32 +0000 (22:16 -0600)]
tools/env: Add environment variable flags support
Currently just validates variable types as decimal, hexidecimal,
boolean, ip address, and mac address. Call
env_acl_validate_setenv_params() from setenv() in fw_env.c.
If the entry is not found in the env .flags, then look in the static
one. This allows the env to override the static definitions, but prevents
the need to have every definition in the environment distracting you.
Need to build in _ctype for isdigit for Linux.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Joe Hershberger [Wed, 12 Dec 2012 04:16:31 +0000 (22:16 -0600)]
env: Add environment variable flags
Currently just validates variable types as decimal, hexidecimal,
boolean, ip address, and mac address.
If the entry is not found in the env ".flags", then look in the static
one. This allows the env to override the static definitions, but prevents
the need to have every definition in the environment distracting you.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Joe Hershberger [Wed, 12 Dec 2012 04:16:30 +0000 (22:16 -0600)]
env: Add a silent env handler
The silent variable now updates the global data flag anytime it is
changed as well as after the env relocation (in case its value is
different from the default env in such cases as NAND env)
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Joe Hershberger [Wed, 12 Dec 2012 04:16:29 +0000 (22:16 -0600)]
env: Add a console env handler
Remove the hard-coded console handler and use a callback instead
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Joe Hershberger [Wed, 12 Dec 2012 04:16:28 +0000 (22:16 -0600)]
env: Add a loadaddr env handler
Remove the hard-coded loadaddr handler and use a callback instead
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Joe Hershberger [Wed, 12 Dec 2012 04:16:27 +0000 (22:16 -0600)]
env: Add a baudrate env handler
Remove the hard-coded baudrate handler and use a callback instead
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Joe Hershberger [Wed, 12 Dec 2012 04:16:26 +0000 (22:16 -0600)]
env: Add a bootfile env handler
Remove the hard-coded bootfile handler and use a callback instead
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Joe Hershberger [Wed, 12 Dec 2012 04:16:25 +0000 (22:16 -0600)]
env: Add a command to view callbacks
The callbacks can be bound, but are otherwise invisible. Add a command
to show what callbacks are available.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
!!! fix callback command
Joe Hershberger [Wed, 12 Dec 2012 04:16:24 +0000 (22:16 -0600)]
env: Add support for callbacks to environment vars
Add support for per-variable callbacks to the "hashtable" functions.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
!!!fix comment in callback
Joe Hershberger [Wed, 12 Dec 2012 04:16:23 +0000 (22:16 -0600)]
env: Hide '.' variables in env print by default
When printing all variables with env print, don't print variables that
begin with '.'. If env print is called with a '-a' switch, then
include variables that begin with '.' (just like the ls command).
Variables printed explicitly will be printed even without the -a.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Joe Hershberger [Wed, 12 Dec 2012 04:16:22 +0000 (22:16 -0600)]
env: Use getenv_yesno() more generally
Move the getenv_yesno() to env_common.c and change most checks for
'y' or 'n' to use this helper.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Joe Hershberger [Wed, 12 Dec 2012 04:16:21 +0000 (22:16 -0600)]
env: Refactor apply into change_ok
Move the read of the old value to inside the check function. In some
cases it can be avoided all together and at the least the code is only
called from one place.
Also name the function and the callback to more clearly describe what
it does.
Pass the ENTRY instead of just the name for direct access to the whole
data structure.
Pass an enum to the callback that specifies the operation being approved.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Joe Hershberger [Wed, 12 Dec 2012 04:16:20 +0000 (22:16 -0600)]
env: Consolidate common code in hsearch_r()
The same chunk of code was replicated in two places and the following
changes will make that chunk grow a bit, so combine into a static func.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Joe Hershberger [Wed, 12 Dec 2012 04:16:19 +0000 (22:16 -0600)]
env: Refactor do_apply to a flag
Use a flag in hsearch_r for insert mode passed from import to allow the
behavior be different based on use.
Now that "do_check" is called for all imports, ensure console init is
complete before updating the console on relocation import
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Joe Hershberger [Wed, 12 Dec 2012 04:16:18 +0000 (22:16 -0600)]
Make linux kernel string funcs available to tools
isspace() and strim() are not in the typical user-mode string.h, so
put them in a separate compilation unit so that they can be built into
tools that need them independent of the other common string functions.
This allows code shared by u-boot and the linux user-mode tools to link.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Lukasz Majewski [Tue, 11 Dec 2012 10:09:48 +0000 (11:09 +0100)]
gpt: Enable support for GPT partition table restoration at Samsung's Trats
Enable support for GPT partition table restoration at Samsung's Trats
development board.
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Minkyu Kang <mk7.kang@samsung.com>
Piotr Wilczek [Tue, 11 Dec 2012 10:09:47 +0000 (11:09 +0100)]
gpt: Support for new "gpt" command
New command - "gpt" is supported. It restores the GPT partition table.
It looks into the given environment variable for partitions definition.
It can be enabled at target configuration file with CONFIG_CMD_GPT.
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Lukasz Majewski [Tue, 11 Dec 2012 10:09:46 +0000 (11:09 +0100)]
gpt: Support for GPT (GUID Partition Table) restoration
The restoration of GPT table (both primary and secondary) is now possible.
Function 'gpt_restore' presents example of partition restoration process.
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Chang Hyun Park [Tue, 11 Dec 2012 10:09:45 +0000 (11:09 +0100)]
gpt: The leXX_to_int() calls replaced with ones defined at <compiler.h>
Custom definitions of le_XX_to_int functions have been replaced with
standard ones, defined at <compiler.h>
Replacement of several GPT related structures members with ones
indicating its endianness and proper size.
Signed-off-by: Chang Hyun Park <heartinpiece@outlook.com>
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Lukasz Majewski [Tue, 11 Dec 2012 10:09:44 +0000 (11:09 +0100)]
gpt:doc: GPT (GUID Partition Table) documentation
Documentation of the GPT format.
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Lukasz Majewski [Tue, 11 Dec 2012 10:09:43 +0000 (11:09 +0100)]
part:efi: Move part_efi.h file to ./include
This move is necessary to export gpt header and GPT partition entries to be
used with other commands or subsystems.
Additionally the part_efi.h file has been cleaned-up to supress checkpatch's
warnings.
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Lukasz Majewski [Tue, 11 Dec 2012 10:09:42 +0000 (11:09 +0100)]
vsprintf:fix: Change type returned by ustrtoul
The ustrtoul shall convert string defined size (e.g. 1GiB) to unsigned
long type (as its name implies).
Up till now it had returned int, which might cause problems with large
numbers (GiB range), when interpreted as U2 signed numbers.
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Fabio Estevam [Tue, 11 Dec 2012 11:48:46 +0000 (11:48 +0000)]
mx25pdk: Allow booting a device tree kernel
Select CONFIG_OF_LIBFDT so that a device tree kernel can be launched.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Fabio Estevam [Tue, 11 Dec 2012 06:36:58 +0000 (06:36 +0000)]
mx53loco: Fix PMIC name
commit
c73368150 (pmic: Extend PMIC framework to support multiple instances
of PMIC devices) has incorrectly passed the PMIC name under the FSL PMIC case.
Fix that by passing "FSL_PMIC" as the parameter of pmic_get.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Tom Rini [Wed, 12 Dec 2012 13:51:02 +0000 (06:51 -0700)]
Merge branch 'master' of git://git.denx.de/u-boot-mips
Joe Hershberger [Tue, 11 Dec 2012 17:52:50 +0000 (17:52 +0000)]
mips: serial: Fix busted manual relocation
serial_initialize() must be called after relocation to adjust the
pointers to putc(), getc(), etc. This is busted ever since the
serial driver-model-ification series.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>