| 758b3997 | 13-Oct-2010 |
John Rigby <john.rigby@linaro.org> |
common/image.c fix length calculation in boot_relocate_fdt
boot_relocate_fdt is called on platforms with CONFIG_SYS_BOOTMAPSZ defined to relocate the device tree blob to be inside the boot map area
common/image.c fix length calculation in boot_relocate_fdt
boot_relocate_fdt is called on platforms with CONFIG_SYS_BOOTMAPSZ defined to relocate the device tree blob to be inside the boot map area between bootmap_base and bootmap_base+CONFIG_SYS_BOOTMAPSZ.
For the case where the blob needs to be relocated, space is allocated inside the bootmap by calling lmb_alloc_base with size passed in plus some padding:
of_len = *of_size + CONFIG_SYS_FDT_PAD;
For the case where the blob is already inside the bounds of the boot map area, lmb_reserve is called to reserve the the space where the blob is already residing. The calculation for this case is currently:
of_len = (CONFIG_SYS_BOOTMAPSZ + bootmap_base) - (ulong)fdt_blob;
This is wrong because it reserves all the space in the boot map area from the blob to the end ignoring completely the actual size. The worst case is where the blob is at the beginning and the entire boot map area get reserved. Fix this by changing the length calculation to this:
of_len = *of_size + CONFIG_SYS_FDT_PAD;
This bug has likely never manifested itself because bootm has never been called with the fdt blob already in the bootmap area. In my testing on an OMAP3 beagle board I initially worked around the bug by simply moving the initial location of the fdt blob. I have tested with the new calculation with the fdt blob both inside and outside the boot map area.
Signed-off-by: John Rigby <john.rigby@linaro.org>
show more ...
|
| 16e00992 | 13-Oct-2010 |
Scott Wood <scottwood@freescale.com> |
Fix warning in nand unlock command
Commit ea533c260a801c4e51f92f75165cebe6d7b01e35 changed arg_off_size to take a pointer to a device index, rather than to the device itself. When updating callers,
Fix warning in nand unlock command
Commit ea533c260a801c4e51f92f75165cebe6d7b01e35 changed arg_off_size to take a pointer to a device index, rather than to the device itself. When updating callers, the nand unlock code was missed.
Signed-off-by: Scott Wood <scottwood@freescale.com>
show more ...
|
| cb2707af | 13-Oct-2010 |
Matthew McClintock <msm@freescale.com> |
common/fdt_support.c: fix compile error
Fix build error introduced in beca5a5f5bf0d88125580e5e9c1730469cd50ab8
common/libcommon.a(fdt_support.o): In function `fdt_add_edid': /local/hudson/jobs/mirr
common/fdt_support.c: fix compile error
Fix build error introduced in beca5a5f5bf0d88125580e5e9c1730469cd50ab8
common/libcommon.a(fdt_support.o): In function `fdt_add_edid': /local/hudson/jobs/mirrors-u-boot.git/workspace/common/fdt_support.c:1205: undefined reference to `fdt_increase_size' make: *** [u-boot] Error 1
Signed-off-by: Matthew McClintock <msm@freescale.com> Signed-off-by: Anatolij Gustschin <agust@denx.de>
show more ...
|
| 99e9ed1f | 05-Oct-2010 |
Ludovic Courtès <ludo@gnu.org> |
usb: Add support for multiple-LUN mass storage devices
This patch changes `usb_stor_scan' to scan all the LUNs of each mass storage device. It also fixes the various commands to correctly set the L
usb: Add support for multiple-LUN mass storage devices
This patch changes `usb_stor_scan' to scan all the LUNs of each mass storage device. It also fixes the various commands to correctly set the LUN field.
Notably, it allows each LUN of GuruPlug's microSD card reader to be accessed.
Signed-off-by: Ludovic Courtès <ludo@gnu.org> Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
show more ...
|
| eaadb44e | 13-Sep-2010 |
Stefan Roese <sr@denx.de> |
cp/cmp: Add WATCHDOG_RESET in copy and compare loop
On some boards with a very short watchdog timeout, the "cp" and "cmp" commands may reset the board. This patch adds some watchdog resets inside th
cp/cmp: Add WATCHDOG_RESET in copy and compare loop
On some boards with a very short watchdog timeout, the "cp" and "cmp" commands may reset the board. This patch adds some watchdog resets inside the loops. Otherwise for example the lwmon5 board will reset while doing something like this:
=> cp.b fc000000 1000000 100000
Signed-off-by: Stefan Roese <sr@denx.de>
show more ...
|
| d259079d | 10-Oct-2010 |
Lei Wen <leiwen@marvell.com> |
env: don't set to default env twice when use CONFIG_ENV_IS_NOWHERE
When use the CONFIG_ENV_IS_NOWHERE, I met such issue:
DRAM: 256 MiB Using default environment
*** Warning - bad CRC, using de
env: don't set to default env twice when use CONFIG_ENV_IS_NOWHERE
When use the CONFIG_ENV_IS_NOWHERE, I met such issue:
DRAM: 256 MiB Using default environment
*** Warning - bad CRC, using default environment
Signed-off-by: Lei Wen <leiwen@marvell.com>
show more ...
|
| beca5a5f | 18-Aug-2010 |
Anatolij Gustschin <agust@denx.de> |
fdt_support: support adding EDID property to FDT display nodes
Boards can pass display timing info for drivers using EDID block. Provide common function to add board specific EDID data to the device
fdt_support: support adding EDID property to FDT display nodes
Boards can pass display timing info for drivers using EDID block. Provide common function to add board specific EDID data to the device tree. Subsequent patch makes use of this functionality.
Detailed timing descriptor data from EDID is used for programming the display controller. This is currently implemented on the Linux side by the fsl-diu-fb frame buffer driver and it is documented there in Documentation/powerpc/dts-bindings/fsl/diu.txt.
Signed-off-by: Anatolij Gustschin <agust@denx.de> Acked-by: Detlev Zundel <dzu@denx.de> Cc: Gerald Van Baren <vanbaren@cideas.com>
show more ...
|
| 36650ca9 | 09-Sep-2010 |
Scott Wood <scottwood@freescale.com> |
Followup fixes on the mtdparts spread patchset
Consolidate some code in mtd_get_len_incl_bad(), and fix a condition where a valid partition could be reported as truncated if it has a good block at t
Followup fixes on the mtdparts spread patchset
Consolidate some code in mtd_get_len_incl_bad(), and fix a condition where a valid partition could be reported as truncated if it has a good block at the end of the device (unlikely, since the BBT is usually there).
Fix mid-block declarations in net_part_size().
Signed-off-by: Scott Wood <scottwood@freescale.com> Reviewed-by: Ben Gardiner <bengardiner@nanometrics.ca>
show more ...
|
| 59a50d2d | 31-Aug-2010 |
Ben Gardiner <bengardiner@nanometrics.ca> |
mtdparts: new add.spread: add part skipping bad blocks
This patch adds a new 'mtdparts add' variant: add.spread. This command variant adds a new partition to the mtdparts variable but also increases
mtdparts: new add.spread: add part skipping bad blocks
This patch adds a new 'mtdparts add' variant: add.spread. This command variant adds a new partition to the mtdparts variable but also increases the partitions size by skipping bad blocks and aggregating any additional bad blocks found at the end of the partition.
Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca> CC: Wolfgang Denk <wd@denx.de> CC: Scott Wood <scottwood@freescale.com>
show more ...
|
| ca75b20e | 31-Aug-2010 |
Ben Gardiner <bengardiner@nanometrics.ca> |
mtdparts: add new sub-command "spread"
This patch introduces the 'spread' sub-command of the mtdparts command. This command will modify the existing mtdparts variable by increasing the size of the p
mtdparts: add new sub-command "spread"
This patch introduces the 'spread' sub-command of the mtdparts command. This command will modify the existing mtdparts variable by increasing the size of the partitions such that 1) each partition's net size is at least as large as the size specified in the mtdparts variable and 2) each partition starts on a good block.
The new subcommand is implemented by iterating over the mtd device partitions and collecting a bad blocks count in each -- including any trailing bad blocks -- and then modifying that partitions's part_info structure and checking if the modification affects the next partition.
This patch is based on a port of the 'dynnamic partitions' feature by Harald Welte <laforge@gnumonks.org>; ported from commit e05835df019027391f58f9d8ce5e1257d6924798 of git://git.openmoko.org/u-boot.git. Whereas Harald's feature used a compile-time array to specify partitions, the feature introduced by this patch uses the mtdparts environment variable.
Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca> Signed-off-by: Harald Welte <laforge@gnumonks.org> CC: Wolfgang Denk <wd@denx.de> CC: Scott Wood <scottwood@freescale.com>
show more ...
|
| 8c5659a6 | 25-Aug-2010 |
Scott Wood <scottwood@freescale.com> |
nand commands: make only "dump" repeatable.
The dump command is made to increment its address on repeat, as md does. Other commands do not make sense to issue repeatedly, and can be irritating when
nand commands: make only "dump" repeatable.
The dump command is made to increment its address on repeat, as md does. Other commands do not make sense to issue repeatedly, and can be irritating when it happens accidentally, so don't.
Signed-off-by: Scott Wood <scottwood@freescale.com> Tested-by: Ben Gardiner <bengardiner@nanometrics.ca>
show more ...
|
| 30486322 | 25-Aug-2010 |
Scott Wood <scottwood@freescale.com> |
nand erase: .spread, .part, .chip subcommands
A while back, in http://lists.denx.de/pipermail/u-boot/2009-June/054428.html, Michele De Candia posted a patch to not count bad blocks toward the reques
nand erase: .spread, .part, .chip subcommands
A while back, in http://lists.denx.de/pipermail/u-boot/2009-June/054428.html, Michele De Candia posted a patch to not count bad blocks toward the requested size to be erased. This is desireable when you're passing in something like $filesize, but not when you're trying to erase a partition.
Thus, a .spread subcommand (named for consistency with http://lists.denx.de/pipermail/u-boot/2010-August/075163.html) is introduced to make explicit the user's desire to erase for a given amount of data, rather than to erase a specific region of the chip.
While passing $filesize to "nand erase" is useful, accidentally passing something like $fliesize currently produces quite unpleasant results, as the variable evaluates to nothing and U-Boot assumes that you want to erase the entire rest of the chip/partition. To improve the safety of the erase command, require the user to make explicit their intentions by using a .part or .chip subcommand. This is an incompatible user interface change, but keeping compatibility would eliminate the safety gain, and IMHO it's worth it.
While touching nand_erase_opts(), make it accept 64-bit offsets and sizes, fix the percentage display when erase length is rounded up, eliminate an inconsistent warning about rounding up the erase length which only happened when the length was less than one block (rounding up for $filesize is normal operation), and add a diagnostic if there's an attempt to erase beginning at a non-block boundary.
Signed-off-by: Scott Wood <scottwood@freescale.com> Tested-by: Ben Gardiner <bengardiner@nanometrics.ca>
show more ...
|
| ea533c26 | 02-Aug-2010 |
Scott Wood <scottwood@freescale.com> |
cmd_nand: some infrastructure fixes and refactoring
- If the current device is overridden by a named partition, - update the caller's pointer/index, rather than copy over the nand_info struct,
cmd_nand: some infrastructure fixes and refactoring
- If the current device is overridden by a named partition, - update the caller's pointer/index, rather than copy over the nand_info struct, and - be sure to call board_nand_select_device even when the device is overridden by a named partition. - Support 64-bit offsets/sizes in a few more places. - Refactor arg_off_size for added readability and flexibility, and some added checks such as partition size. - Remove redundant check for bad subcommands -- if there's no match it'll print usage when it gets to the end anyway.
Signed-off-by: Scott Wood <scottwood@freescale.com> Tested-by: Ben Gardiner <bengardiner@nanometrics.ca>
show more ...
|