A couple of printfs intended for debugging were commented out. debug()ified
them. Move the one about packet RX to a more appropriate location. Previously
it would only trigger once in the case where multiple packets were received
in quick succession. Now it will trigger once for every packet.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
The RX_STATUS register was being cleared after servicing the underlying event.
This is incorrect as if another packet is received after the service routine
(Xgmac_process_rx()) returns, then the frame-received flag for the new packet
will be cleared. U-boot will then completely miss the new packet even though
the hardware has sucessfully received it.
Fixed by clearing the RX_STATUS register immediately after polling.
Reported-by: Jason Wu <huanyu@xilinx.com> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Michal Simek [Wed, 2 Jan 2013 15:20:51 +0000 (16:20 +0100)]
block: systemace: Fix incorrect ace_write for width 16
Current implementation works fine for bus width = 16 bits because we
never get into "if" branch.
If one sets width to 8 bits there will be 2 consequent data accesses
write:
1. Correct data access for 8-bit bus
2. Unconditional (and in this case incorrect) data access as if data bus
is 16-bit wide
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
David Andrey [Sat, 8 Dec 2012 09:18:22 +0000 (10:18 +0100)]
i2c: zynq: check for transfert size
Check that the transfert size in I2C read do not
exceed the hardware capability
Signed-off-by: David Andrey <david.andrey@netmodule.com> Tested-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
John Linn [Wed, 5 Dec 2012 20:17:46 +0000 (12:17 -0800)]
spi: zynq_qspi: Remove command merge feature
The command merge feature has been de-featured such
that the driver should not be using it. It works fine
without it but there may be a minor performance degrade.
The command merge feature was in bit 26 of the linear
configuration register before it was removed. Magic
values are also removed for clarity.
Signed-off-by: John Linn <john.linn@xilinx.com> Acked-by: Michal Simek <michal.simek@xilinx.com>
zynq: Enable HUSH command line interpreter support
Defined CONFIG_SYS_HUSH_PARSER to enable the "hush" shell
as command line interpreter, thus enabling powerful command
line syntax like if...then...else...fi conditionals or
`&&' and '||' constructs.
Defined CONFIG_SYS_PROMPT_HUSH_PS2 to enable the
secondary prompt string, which is printed when the
hush command interpreter needs more input to complete
a command.
Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com> Acked-by: Michal Simek <michal.simek@xilinx.com>
John Linn [Wed, 5 Dec 2012 18:27:04 +0000 (10:27 -0800)]
zynq: remove CONFIG_EXTRA_ENV_SETTINGS from Zed board
They are the same as the settings in zynq_common.h with
respect to QSPI, JTAG, and SD booting. Having them
replicated for the Zed board is a maintenance hassle.
Signed-off-by: John Linn <john.linn@xilinx.com> Acked-by: Michal Simek <michal.simek@xilinx.com>
zynq: Increase ramdisk_size env variables by 1.896MB
Now the ramdisk_size env size is 5.896MB.
This changes is follow-up on updated flash layout in previous patch.
"zynq: Updated flash offsets in Linux autoboot"
(sha1: a5b72ddc1e0e261f5fdda1aeb78f4345c53d352c)
Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com> Acked-by: Michal Simek <michal.simek@xilinx.com>
This changes is follow-up on updated flash layout in previous patch.
"zynq: Updated flash offsets in Linux autoboot"
(sha1: a5b72ddc1e0e261f5fdda1aeb78f4345c53d352c)
Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com> Acked-by: Michal Simek <michal.simek@xilinx.com>
Wendy Liang [Tue, 6 Nov 2012 05:18:57 +0000 (15:18 +1000)]
Do not hang if the kernel image is legacy image
U-boot should not hang because it fails to create FDT nor any of
the following tag is defined:
CONFIG_SETUP_MEMORY_TAGS
CONFIG_CMDLINE_TAG
CONFIG_INITRD_TAG
CONFIG_SERIAL_TAG
CONFIG_REVISION_TAG
Signed-off-by: Wendy Liang <jliang@xilinx.com> Tested-by: Michal Simek <monstr@monstr.eu>
Michal Simek [Fri, 2 Nov 2012 08:33:05 +0000 (09:33 +0100)]
microblaze: Fix reset function
Remove CONFIG_SYS_RESET_ADDRESS macro.
It was there from historical point of view
when soft reset was just jump to u-boot text start
(not used right now).
Michal Simek [Thu, 1 Nov 2012 12:32:37 +0000 (13:32 +0100)]
microblaze: Fix gpio usage
Warning:
microblaze-generic.c: In function 'do_reset':
microblaze-generic.c:38:47: warning: operation on '*-2126118912u' may be undefined [-Wsequence-point]
Michal Simek [Thu, 1 Nov 2012 13:26:49 +0000 (14:26 +0100)]
ll_temac: Fix compilation warning
Remove unused variable and remove volatile from send functions.
Warning:
xilinx_ll_temac.c: In function 'xps_ll_temac_phy_ctrl':
xilinx_ll_temac.c:298:6: warning: unused variable 'i' [-Wunused-variable]
xilinx_ll_temac.c: In function 'xilinx_ll_temac_initialize':
xilinx_ll_temac.c:746:13: warning: assignment from incompatible pointer type [enabled by default]
xilinx_ll_temac.c:749:13: warning: assignment from incompatible pointer type [enabled by default]
John Linn [Tue, 30 Oct 2012 16:20:25 +0000 (09:20 -0700)]
microblaze: Do not use device tree cfg as default
The generic configuration for Microblaze was using device tree
to configure u-boot such that it required a device tree by
the user. This is an experimental feature still and not ready
for production such that it makes it harder for users.
This is not to be confused with the ability to load a device
tree and pass it to Linux as that ability still exists.
Signed-off-by: John Linn <john.linn@xilinx.com> Signed-off-by: Michal Simek <monstr@monstr.eu>
Michal Simek [Wed, 26 Sep 2012 12:42:38 +0000 (14:42 +0200)]
microblaze: Fix compilation warning in ext2_find_next_zero_bit
ext2_find_next_zero_bit must be also static if __swab32 is also static.
Warning:
include/asm/bitops.h:369:22: warning: '__fswab32' is static but
used in inline function 'ext2_find_next_zero_bit'
which is not static [enabled by default]
Albert ARIBAUD [Sun, 7 Oct 2012 09:24:10 +0000 (09:24 +0000)]
arm: armv7: omap3: Fix restore sequence in lowlevel_init
The restore sequence in lowlevel_init was in the wrong order,
causing lr to lose its original value and be set equal to ip
instead. Also, its use of the stack clashes with that of
s_init, so move the s_init call after the restore and turn
it into a tail-optimized branch.
Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net> Tested-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Fix:
yaffs_guts.c: In function 'yaffs_check_chunk_erased':
yaffs_guts.c:324:6: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
yaffs_guts.c: In function 'yaffs_verify_chunk_written':
yaffs_guts.c:352:6: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
yaffs_guts.c: In function 'yaffs_grab_chunk_cache':
yaffs_guts.c:1488:6: warning: variable 'pushout' set but not used
[-Wunused-but-set-variable]
yaffs_guts.c: In function 'yaffs_check_obj_details_loaded':
yaffs_guts.c:3180:6: warning: variable 'alloc_failed' set but not used
[-Wunused-but-set-variable]
yaffs_guts.c:3179:6: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
yaffs_guts.c: In function 'yaffs_update_oh':
yaffs_guts.c:3288:6: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
yaffs_guts.c: In function 'yaffs_get_obj_name':
yaffs_guts.c:4447:7: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
yaffs_summary.c: In function 'yaffs_summary_read':
yaffs_summary.c:194:6: warning: variable 'sum_tags_bytes' set but not
used [-Wunused-but-set-variable]
yaffs_verify.c: In function 'yaffs_verify_file':
yaffs_verify.c:227:6: warning: variable 'actual_depth' set but not used
[-Wunused-but-set-variable]
yaffs_yaffs1.c: In function 'yaffs1_scan':
yaffs_yaffs1.c:26:6: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
yaffs_yaffs2.c: In function 'yaffs2_scan_chunk':
yaffs_yaffs2.c:949:6: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
yaffs_yaffs2.c: In function 'yaffs2_scan_backwards':
yaffs_yaffs2.c:1352:6: warning: variable 'deleted' set but not used
[-Wunused-but-set-variable]
Signed-off-by: Anatolij Gustschin <agust@denx.de> Cc: Charles Manning <cdhmanning@gmail.com> Tested-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
Logically, a disk that contains a raw FAT filesystem does not in fact
have a partition table. However, test_part_dos() was claiming that such
disks did in fact have a DOS-style partition table. This caused
get_device_and_partition() not to return a whole-disk disk_partition_t,
since part_type != PART_TYPE_UNKNOWN.
part_dos.c's print_partition_extended() detected the raw FAT filesystem
condition and printed a fake partition table that encompassed the whole
disk.
However, part_dos.c's get_partition_info_extended() did not return any
valid partitions in this case. This combination caused
get_device_and_partition() not to find any valid partitions, and hence
to return an error.
Fix test_part_dos() not to claim that raw FAT filesystems are DOS
partition tables. In turn, this causes get_device_and_partition() to
return a whole-disk disk_partition_t, and hence the following commands
work:
fatls mmc 0 /
fatls mmc 0:auto /
An alternative would be to modify print_partition_extended() to detect
raw FAT filesystems, just like print_partition_extended() does, and to
return a fake partition in this case. However, this seems logically
incorrect, and also duplicates code, since get_device_and_partition()
falls back to returning a whole-disk partition when there is no partition
table on the device.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Stephen Warren [Fri, 5 Oct 2012 13:17:39 +0000 (13:17 +0000)]
FAT: check for partition 0 not 1 for whole-disk fs
The recent switch to use get_device_and_partition() from do_fat_ls()
broke the ability to access a FAT filesystem directly on a whole device;
FAT only works within a partition on a device.
This change makes e.g. "fatls mmc 0:0" work; explicitly requesting
partition ID 0 is something that get_device_and_partition() fully
supports. However, fat_register_device() expects partition ID 1 to be
used in the full-disk case; partition ID 1 was previously implicitly
specified when the user didn't actually specify a partition ID. Update
fat_register_device() to expect the correct ID.
This change does imply that if a user explicitly executes "fatls mmc 0:1"
then this will fail, and may be a change in behaviour.
Note that this still prevents "fatls mmc 0:auto" from working. The next
patch will fix that.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
arm: rmobile: bugfix: wrong register saving in lowlevel_init
lowlevel_init() of rmobile badly assumed that ip register holds return address.
The commit "63ee53a7 armv7 cpu_init_crit: Simplify code" breaks this assumption.
This patch removes this bad assumption and simplify code.
Luka Perkov [Mon, 14 May 2012 09:29:10 +0000 (09:29 +0000)]
ide: Correct IDE_BUS(dev) macro
The IDE_BUS(dev) macro was previously doing dev >> 1. This however is a
mis-match of the usage in common/cmd_ide.c and would cause boards with
multiple ports / devices to not correctly detect all devices. For more
details please see:
http://lists.denx.de/pipermail/u-boot/2012-April/122525.html
[Tom Rini: Reword commit message only]
Tested-by: Luka Perkov <uboot@lukaperkov.net> Signed-off-by: Simon Baatz <gmbnomis@gmail.com> Signed-off-by: Tom Rini <trini@ti.com>
Use the standard CMD_RET_* constants to clearly report errors from the
pca953x command. In addition, print error messages when I2C communication
fails.
The default configuration for ml507 will generate a hang() in the
Xilinx uartlite driver.
userial_ports[] in drivers/serial/serial_xuartlite.c does not get
initialized properly. CONFIG_SERIAL_BASE is unused.
XILINX_UARTLITE_BASEADDR is used instead.
Albert ARIBAUD [Fri, 5 Oct 2012 16:43:33 +0000 (18:43 +0200)]
arm: armv7: temporarily set -mno-unaligned-access
This patch aims at ensuring that the 2012.10 release works
out-of-the-box on as many targets as possible, by reinstating
commit 5347560f5427bcdd48a563b62180481606ac8044, which adds
option -mno-unaligned-access to armv7 builds.
This patch will be overriden immediately after release of 2012.10.
env default -a -f calls env_check_apply on all existing environment
variables with a NULL value for "newval" as a way of cleaning up.
This causes string manipulation functions to crash on most architectures.
So replace a NULL argument with an empty string.
Joe Hershberger [Thu, 4 Oct 2012 09:54:07 +0000 (09:54 +0000)]
Improve license declaration for cmd_ini.h
Instead of referenceing the source webpage (which can change) include
the license in the source file.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Reported-by: Igor Grinberg <grinberg@compulab.co.il> Cc: Igor Grinberg <grinberg@compulab.co.il> Cc: Tom Rini <trini@ti.com> Cc: Wolfgang Denk <wd@denx.de> Acked-by: Wolfgang Denk <wd@denx.de>
Wolfgang Denk [Wed, 3 Oct 2012 23:36:18 +0000 (23:36 +0000)]
MPC85xx: remove support for TQM85xx boards
Due to grown code sizes the TQM85xx boards don't build any more with
some older tool chains (like ELDK 4.2). As these boards have long
reached EOL it seems a waste of effort trying to fix them. The vendor
has agreed to drop support for them, too. So let's get rid of them.
Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Stefan Roese <sr@denx.de>
cc: Kim Phillips <kim.phillips@freescale.com> Acked-by: Stefan Roese <sr@denx.de>
Michal Simek [Tue, 25 Sep 2012 08:43:12 +0000 (10:43 +0200)]
zynq: Clear reboot status register 0x0F000000 bits
FSBL check the reboot status register 0x0F000000 bits to decide
which the partition it should work on. If the bitstream is presented in
the partition, it programs the bistream.
This commit is a temporary workaround to reload the bitstream after
uboot reset.
Signed-off-by: Jason Wu <jason.wu@petalogix.com> Signed-off-by: Michal Simek <monstr@monstr.eu>
Dinh Nguyen [Thu, 4 Oct 2012 06:46:02 +0000 (06:46 +0000)]
ARM: Add Altera SOCFPGA Cyclone5
Add minimal support for Altera's SOCFPGA Cyclone 5 hardware.
Signed-off-by: Dinh Nguyen <dinguyen@altera.com> Signed-off-by: Chin Liang See <clsee@altera.com> Signed-off-by: Pavel Machek <pavel@denx.de> Reviewed-by: Marek Vasut <marex@denx.de> Acked-by: Tom Trini <trini@ti.com> Cc: Wolfgang Denx <wd@denx.de> Cc: Albert Aribaud <albert.u.boot@aribaud.net> Cc: Stefan Roese <sr@denx.de>
----
v8: Remove no_return attribute for reset_cpu
Without usb-serial cable plugged at this stage, some
garbage is seen in UART RX FIFO, which blocks autoboot
progress. The fix makes sure to empty the RX FIFO,
before we wait for user input to interrupt autoboot.
Michal Simek [Thu, 13 Sep 2012 20:23:35 +0000 (20:23 +0000)]
arm: Support new Xilinx Zynq platform
Add timer driver.
Signed-off-by: Michal Simek <monstr@monstr.eu> CC: Joe Hershberger <joe.hershberger@gmail.com> CC: Marek Vasut <marex@denx.de> Acked-by: Marek Vasut <marex@denx.de>
Michal Simek [Fri, 14 Sep 2012 00:55:24 +0000 (00:55 +0000)]
serial: Add Zynq serial driver
The driver is used on Xilinx Zynq platform.
Signed-off-by: Michal Simek <monstr@monstr.eu> CC: Joe Hershberger <joe.hershberger@gmail.com> CC: Marek Vasut <marex@denx.de> Acked-by: Marek Vasut <marex@denx.de>