Anton Staaf [Mon, 13 Jun 2011 11:40:40 +0000 (11:40 +0000)]
ext2: Simplify partial sector access logic
Previously reading or writing zero full sectors (reading the end of
one sector and the beginning of the next for example) was special
cased and involved stack allocating a second sector buffer. This
change uses the same code path for this case as well as when there
are a non-zero number of full sectors to access. The result is
easier to read and reduces the maximum stack used.
Signed-off-by: Anton Staaf <robotboy@chromium.org> Cc: Andy Fleming <afleming@freescale.com> Acked-by: Detlev Zundel <dzu@denx.de>
Anton Staaf [Mon, 13 Jun 2011 11:40:39 +0000 (11:40 +0000)]
ext2: Fix checkpatch violations
Fix all checkpatch violations in the low level Ext2 block
device reading code. This is done in preparation for cleaning
up the partial sector access code.
Signed-off-by: Anton Staaf <robotboy@chromium.org> Cc: Andy Fleming <afleming@freescale.com> Acked-by: Detlev Zundel <dzu@denx.de>
Holger Brunck [Sun, 5 Jun 2011 22:22:16 +0000 (22:22 +0000)]
km/common: force set ethaddr after reading IVM
The ethaddr is stored inside the inventory eeprom. During
boottime this value was read out and the ethaddr variable was
set. Previously this was only done if it ethaddr == NULL but
this is wrong for our ARM boards. Because ethaddr is at this
stage never NULL for ARM due to the random calculation of a
MAC address in mvgbe.c.
Signed-off-by: Holger Brunck <holger.brunck@keymile.com> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
The debug environment which is stored in textfiles in the
scripts directory was reworked. Two usecase are now present
which can be executed simply from the default environment:
run develop: this configures the environment to setup the
rootfs via nfs
run ramfs: this configures the environment to setup the
rootfs in ram
Each architecture now has a "arch" variable which is used
to load the architecture specific debug scripts and to set
the rootpath for NFS.
Signed-off-by: Holger Brunck <holger.brunck@keymile.com> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
km/common: rework and simplify default environment
This is the second step to simplify and decrease the default
environment for the keymile boards. The release usecase formaly
used to set the production environment was removed and the default
configuration is now the production environment. So the formar
environment variable "release" which has done a lot of things
in the past, simply erase the current environment and do a reset
which forces u-boot to setup the default environment again.
Signed-off-by: Holger Brunck <holger.brunck@keymile.com> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
Sergei Shtylyov [Fri, 3 Jun 2011 09:37:43 +0000 (09:37 +0000)]
part_dos: fix crash with big sector size
Apple iPod nanos have sector sizes of 2 or 4 KiB, which crashes U-Boot when it
tries to read the MBR into 512-byte buffer situated on stack. Instead use the
variable length arrays to be safe with any large sector size.
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
mpc5200: digsy_mtc: add support for writing 'appreg' value
Up to now only reading 'appreg' value was implemented in the
digsyMTC special 'mtc appreg' command. Extend the command to
support writing appreg value, too.
mpc5200: digsy_mtc: add support for graphic extension board
Add detection and initialisation for graphic extension board
and support splash screen when booting. Enable "bmp" command
in the board configuration and provide "disp" command to
be able to switch the display on/off.
Andreas Pretzsch [Sat, 16 Jul 2011 05:50:59 +0000 (05:50 +0000)]
automatic update from FIT image: add optional address parameter
Current update_tftp() flow:
1.) fetch "updatefile" from defined TFTP server
2.) check if FIT format
3.) flash contained images
Add an address parameter to update_tftp(). If this address is non-zero,
skip the TFTP transfer and use the image at this address.
Also extend update_tftp() to return success/fail.
James Kosin [Thu, 14 Jul 2011 08:15:06 +0000 (08:15 +0000)]
post: fix indendation/brace confusion
The post.c code is missing braces around the pass case, and as a
result, the diagnostic function will post both fail and pass for
a failed test. The reason for this bug is probably the incorrect
indentation used, so when reading the code it seems like there
are proper braces.
Indent the code to the correct depth and put proper braces around
the "else" branch of the "if" statement.
Signed-off-by: James Kosin <jkosin@intcomgrp.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Thu, 30 Jun 2011 16:56:20 +0000 (16:56 +0000)]
fix unconfigured out-of-tree building of tools
Now that the tools target requires the generated version header file, we
need to make sure that the directory it writes to exists. In a configured
tree, this is taken care of for us. But in an unconfigured one, the dir
does not yet exist causing a build error like so:
/bin/sh: line 5: ..../u-boot_build/include/version_autogenerated.h.tmp: No such file or directory
So create the dir for this file before we attempt to generate it.
Mike Frysinger [Fri, 24 Jun 2011 18:37:55 +0000 (18:37 +0000)]
simplify clobber behavior with out-of-tree builds
The targets/prerequisites are the same here; the rules only differ in
the recipes. So move the if logic protection to the recipe part so we
can keep the rest the same.
Mike Frysinger [Tue, 10 May 2011 13:35:40 +0000 (13:35 +0000)]
post: new nor flash test
This adds a simple flash test to automatically verify erasing,
writing, and reading of sectors. The code is based on existing
Blackfin tests but generalized for everyone to use.
Mike Frysinger [Sat, 14 May 2011 06:56:15 +0000 (06:56 +0000)]
serial: implement common uart post test
The current arch/driver specific UART posts basically boil down to setting
the UART to loop back mode, then reading and writing data. If we ignore
the loop back part, the rest can be built upon the existing common serial
API. So let's do just that.
First add a call back for serial drivers to implement loop back control.
Then write a post test that walks all of the serial drivers, puts them
into loop back mode, and verifies that reading/writing at all the diff
baud rates is OK.
If a serial driver doesn't support loop back mode (either it can't or
it hasn't done so yet), then skip it. This should allow for people to
easily migrate to the new post test with existing serial drivers.
I haven't touched the few already existing uart post tests as I don't
the hardware or knowledge of converting them over. So I've marked the
new test as weak which will allow the existing tests to override the
default until they are converted.
Mike Frysinger [Fri, 29 Apr 2011 18:03:31 +0000 (18:03 +0000)]
serial: drop useless ctlr field
The multi serial support has a "ctlr" field which almost no one uses,
but everyone is forced to set to useless strings. So punt it.
Funny enough, the only code that actually reads this field (the mpc8xx
driver) has a typo where it meant to look for the SCC driver. Fix it
while converting the check to use the name field.
Signed-off-by: Mike Frysinger <vapier@gentoo.org> CC: Heiko Schocher <hs@denx.de> CC: Anatolij Gustschin <agust@denx.de> CC: Tom Rix <Tom.Rix@windriver.com> CC: Minkyu Kang <mk7.kang@samsung.com> CC: Craig Nauman <cnauman@diagraph.com> CC: Marek Vasut <marek.vasut@gmail.com> CC: Prafulla Wadaskar <prafulla@marvell.com> CC: Mahavir Jain <mjain@marvell.com>
Mike Frysinger [Fri, 29 Apr 2011 18:03:29 +0000 (18:03 +0000)]
serial: push default_serial_console to drivers
Rather than sticking arch/board/driver specific logic in the common
serial code, push it all out to the respective drivers. The serial
drivers declare these funcs weak so that boards can still override
things with their own definition.
Signed-off-by: Mike Frysinger <vapier@gentoo.org> CC: Heiko Schocher <hs@denx.de> CC: Anatolij Gustschin <agust@denx.de> CC: Tom Rix <Tom.Rix@windriver.com> CC: Minkyu Kang <mk7.kang@samsung.com> CC: Craig Nauman <cnauman@diagraph.com> CC: Prafulla Wadaskar <prafulla@marvell.com> CC: Mahavir Jain <mjain@marvell.com> Tested-by: Minkyu Kang <mk7.kang@samsung.com>
Mike Frysinger [Mon, 25 Apr 2011 08:06:40 +0000 (08:06 +0000)]
disable security warning flags when possible
Some toolchains enable security warning flags by default, but these don't
really make sense in the u-boot world. Such as forcing changes like:
-printf(foo);
+printf("%s", foo);
So disable the flags when the compiler supports them. Linux has already
merged a similar change in their build system.
Mike Frysinger [Fri, 8 Jul 2011 10:44:25 +0000 (10:44 +0000)]
env: allow people to force envcrc building
For people who want to manually extract the embedded environment so that
it can be manually packed into the final u-boot image, add a config opt
to force building of the envcrc tool.
Mike Frysinger [Mon, 25 Apr 2011 06:59:54 +0000 (06:59 +0000)]
sf: sst: support newer standardized flashes
Newer SST flashes have dropped the Auto Address Increment (AAI) word
programming (WP) modes in favor of the standard page programming mode
that most flashes now support. So add a flags field to the different
flashes to support both modes with new and old styles.
Mike Frysinger [Tue, 28 Jun 2011 07:38:10 +0000 (07:38 +0000)]
sf: kill off now-unused local state
Now that the common spi_flash structure tracks all the info that these
drivers need, kill off their local state indirection and use just what
the common code provides.
In some circumstances, reset_timer_masked() was called be timer_init() in
order to perform architecture specific timer initialisation. In such
cases, the required code in reset_timer_masked() has been moved into
timer_init()
* Fix: if using sha1 command watchdog timed out
* change function call sha1_csum(..) to the watchdog-safe variant
sha1_csum_wd(..) to support watchdog reset
It might be desirable to have the ability to flush icache/dcache
within u-boot, this patch gives each arch the ability to provide
a flush_dcache/flush_icache function to let u-boot flush caches
from the prompt
Signed-off-by: Matthew McClintock <msm@freescale.com>
If we don't want to build support for any partition types we can now
add #undef CONFIG_PARTITIONS in a board config file to keep this from
being compiled in. Otherwise boards assume this is compiled in by
default
Signed-off-by: Matthew McClintock <msm@freescale.com>
In miiphy_register() the new device's name was initialised by passing a
string parameter as the format string to sprintf(). As this would cause
problems if it ever contained a '%' symbol, switch to using strncpy()
instead.
Signed-off-by: Laurence Withers <lwithers@guralp.com> Cc: Andy Fleming <afleming@freescale.com>
Kumar Gala [Wed, 6 Jul 2011 15:16:28 +0000 (15:16 +0000)]
powerpc: Fix device tree padding associated with ramdisk
When booting with a ramdisk we bump the amount of memory reserved for
the device tree by FDT_RAMDISK_OVERHEAD. However we did not increase
the actual size in the device tree blob to match.
Its possible on boundary cases that we dont have enough memory according
to the device tree blob and get errors like:
WARNING: could not set linux,initrd-end FDT_ERR_NOSPACE
We can easily fix this by setting the device tree size at the same time
we bump the amount of memory reserved for the device tree.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Gerald Van Baren <vanbaren@cideas.com>
Matthias Weisser [Sun, 22 May 2011 23:03:55 +0000 (23:03 +0000)]
memcpy/memmove: Do not copy to same address
In some cases (e.g. bootm with a elf payload which is already at the right
position) there is a in place copy of data to the same address. Catching this
saves some ms while booting.
Heiko Schocher [Tue, 31 May 2011 20:24:07 +0000 (20:24 +0000)]
post, memory test: add memory_post_test() to include file
This include is needed, if this memory test is used "outside"
from post code, for example booting with nand_spl, and using
this memory test before copying u-boot code to RAM and jumping
to it.
Macpaul Lin [Sun, 24 Apr 2011 22:01:38 +0000 (22:01 +0000)]
andes_spi: add andes_spi interface
andes_spi is an spi interface developed by Andes Tech.
Signed-off-by: Macpaul Lin <macpaul@andestech.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Mike Frysinger <vapier@gentoo.org> Acked-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Thu, 2 Jun 2011 05:19:38 +0000 (05:19 +0000)]
net: designware: fix uninitialized phy_addr usage
When CONFIG_DW_SEARCH_PHY is disabled, the local phy_addr variable
never gets initialized which causes random behavior at runtime and a
gcc warning. So set it by default to the stored phy address.
Signed-off-by: Mike Frysinger <vapier@gentoo.org> Reviewed-by: Vipin Kumar <vipin.kumar@st.com>
Fix commit message. Signed-off-by: Wolfgang Denk <wd@denx.de>
Becky Bruce [Mon, 18 Jul 2011 23:49:16 +0000 (18:49 -0500)]
board/tqm85xx: Create and tear down TLB for get_ram_size()
We need a TLB entry to call get_ram_size(); the common code doesn't create
one until *after* fixed_sdram() has determined the size. So we set up tlbs
for the max possible size and tear them down once we're done with
get_ram_size(); the common 85xx code will then set up a final set of tlb
entries for the *actual* detected size of ddr.
This prevents us from having TLB entries that are larger than DDR sitting
around for very long, which is not a recommended scenario.
Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Becky Bruce [Mon, 18 Jul 2011 23:49:15 +0000 (18:49 -0500)]
powerpc/mpc85xx: Add clear_ddr_tlbs function
This is useful when we just want to wipe out the TLBs. There's currently
a function that resets the ddr tlbs to a different value; it is changed to
utilize this function. The new function can be used in conjunction with
setup_ddr_tlbs() for a board to temporarily map/unmap the DDR address
range as needed.
Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Timur Tabi [Tue, 3 May 2011 18:35:11 +0000 (13:35 -0500)]
fman: insert the Fman firmware into the device tree
The Fman device tree node binding allows for the entire Fman firmware binary
data to be embedded in the device tree. This eliminates the need to have
NOR flash mapped to Linux just so that the Fman driver can see the firmware.
The location of the Fman firmware is taken from the 'fman_ucode' environment
variable.
Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Timur Tabi [Tue, 10 May 2011 20:28:14 +0000 (15:28 -0500)]
powerpc/85xx: add support the ePAPR "phandle" property
The ePAPR specification says that phandle properties should be called
"phandle", and not "linux,phandle". To facilitate the migration from
"linux,phandle" to "phandle", we update fdt_qportal() to use the new
function, fdt_create_phandle(). This function abstracts the creation of
phandle properties.
Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Wolfgang Denk [Tue, 19 Jul 2011 20:27:07 +0000 (22:27 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-mmc
* 'master' of git://git.denx.de/u-boot-mmc:
mmc: rescan fails on empty slot
AT91:mmc:fix multiple read/write error
mmc: Access mode validation for eMMC cards > 2 GiB
mmc: sh_mmcif: add support for Renesas MMCIF
mmc: fix the condition for MMC version 4
MMC: add marvell sdhci driver
MMC: add sdhci generic framework
MMC: add erase function to both mmc and sd
MMC: unify mmc read and write operation
mmc: Tegra2: Enable SD/MMC driver for Seaboard and Harmony
mmc: Tegra2: SD/MMC driver for Seaboard - eMMC on SDMMC4, SDIO on SDMMC3
Wolfgang Denk [Mon, 18 Jul 2011 19:04:56 +0000 (21:04 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-arm
* 'master' of git://git.denx.de/u-boot-arm:
ARM: MX5: Fix broken leftover TO-2 errata workaround
MX31: Cleanup clock function
scb9328: Add ARM relocation support
am3517evm: change console device from ttyS2 to ttyO2
Remove volatile qualifier in get_ram_size() calls
TI: TNETV107X Fix Build Error
ARM: add missing CONFIG_SKIP_LOWLEVEL_INIT for armv7
arm: add CONFIG_MACH_TYPE setting and documentation
arm: add __ilog2 function
Timer: Fix misuse of ARM *timer_masked() functions outside arch/arm
EfikaMX: Enable EXT2 booting
EfikaMX: Add missing CONFIG_SYS_TEXT_BASE
EfikaMX: Use correct imximage.cfg
MX27: Update to autogenerated asm-offsets.h
MX5: Update to autogenerated asm-offsets.h
imx: Add support for zmx25 board
imx: Make imx25 compatible to mxc_gpio driver and fix in tx25
imx: Add auto generation of asm-offsets.h for imx25
imx: Add support for USB EHCI on imx25
imx: Use correct imx25 reset.c
imx: Add get_tbclk() function for imx25
ARM: Update maintainer of board scb9328
mx27: Make the UART port number explicit
build: Add targets for auto gen of asm-offsets.h and use it in imx35
mx31pdk: cosmetic: Fix line over 80 characters
This patch fixes compiler errors due to missing definitions of
CONFIG_SYS_SDRAM_BASE and CONFIG_SYS_INIT_SP_ADDR.
It also does some cleanup: CONFIG_SYS_TEXT_BASE was moved to scb9328.h,
obsolete config.mk was removed. The scb9328 board has 1 DRAM bank, so don't
ask for more banks. CONFIG_NR_DRAM_BANKS will ever be 1.
am3517evm: change console device from ttyS2 to ttyO2
the serial device names have been changed from ttySx to ttyOx, so the
console device name should be also changed to support the latest kernel
versions.
Mingkai Hu [Thu, 7 Jul 2011 04:29:15 +0000 (12:29 +0800)]
powerpc/p2041rdb: Add p2041rdb board support
P2041RDB Specification:
-----------------------
Memory subsystem:
* 4Gbyte unbuffered DDR3 SDRAM SO-DIMM(64bit bus)
* 128 Mbyte NOR flash single-chip memory
* 256 Kbit M24256 I2C EEPROM
* 16 Mbyte SPI memory
* SD connector to interface with the SD memory card
Ethernet:
* dTSEC1: connected to the Vitesse SGMII PHY (VSC8221)
* dTSEC2: connected to the Vitesse SGMII PHY (VSC8221)
* dTSEC3: connected to the Vitesse SGMII PHY (VSC8221)
* dTSEC4: connected to the Vitesse RGMII PHY (VSC8641)
* dTSEC5: connected to the Vitesse RGMII PHY (VSC8641)
PCIe:
* Lanes E, F, G and H of Bank1 are connected to one x4 PCIe SLOT1
* Lanes C and Land D of Bank2 are connected to one x4 PCIe SLOT2
SATA: Lanes C and Land D of Bank2 are connected to two SATA connectors
USB 2.0: connected via a internal UTMI PHY to two TYPE-A interfaces
I2C:
* I2C1: Real time clock, Temperature sensor, Memory module
* I2C2: Vcore Regulator, 256Kbit I2C Bus EEPROM, PCIe slot1/2
UART: supports two UARTs up to 115200 bps for console
Signed-off-by: Mingkai Hu <Mingkai.hu@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Albert ARIBAUD [Sun, 3 Jul 2011 05:55:33 +0000 (05:55 +0000)]
Remove volatile qualifier in get_ram_size() calls
Checkpatch.pl complains about the volatile qualifier in calls to
get_ram_size(). Remove this qualifier in the prototype and in the
calls where it is useless, and leave it only in the function body
where it is needed.
Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
Igor Grinberg [Thu, 14 Jul 2011 05:45:07 +0000 (05:45 +0000)]
arm: add CONFIG_MACH_TYPE setting and documentation
CONFIG_MACH_TYPE is used to set the machine type number in the
common arm code instead of setting it in the board code.
Boards with dynamically discoverable machine types can still set the
machine type number in the board code.
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
David A. Long [Sat, 9 Jul 2011 20:40:19 +0000 (16:40 -0400)]
Add uboot "fdt_high" enviroment variable
Add a new "fdt_high" enviroment variable. This can be used to control (or prevent) the
relocation of the flattened device tree on boot. It can be used to prevent relocation
of the fdt into highmem. The variable behaves similarly to the existing "initrd_high"
variable.
Signed-off-by: David A. Long <dave.long@linaro.org>