1
0
Fork 0
Commit Graph

33957 Commits (7fe0933c5898e5cce70407184fd458cf3ad9ee32)

Author SHA1 Message Date
Simon Glass 7fe0933c58 video: Drop unused console functions
CONFIG_CONSOLE_CURSOR, CONFIG_SYS_CONSOLE_BLINK_COUNT and
CONFIG_CONSOLE_TIME are not used by any board. The implementation is not
great and stands in the way of a refactor of i8042. Drop these for now.
They can be re-introduced quite easily later, perhaps with driver-model
real-time-clock (RTC) support.

When reintroducing, it might be useful to make a few changes:
- Blink time would be more useful than blink count
- The confusing #ifdefs should be avoided
- The time functions should support driver model
- It would be best keyed off console_tstc() or some similar idle loop
    rather than a particular input driver (i8042 in this case)

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2015-11-19 20:13:40 -07:00
Simon Glass 1fa4bfde18 dm: cros_ec: Convert cros_ec keyboard driver to driver model
Adjust the cros_ec keyboard driver to support driver model. Make this the
default for all Exynos boards so that those that use a keyboard will build
correctly with this driver.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-11-19 20:13:40 -07:00
Simon Glass f77f5e9be7 dm: tegra: Convert keyboard driver to driver model
Adjust the tegra keyboard driver to support driver model, using the new
uclass. Make this the default for all Tegra boards so that those that use
a keyboard will build correctly with this driver.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-11-19 20:13:40 -07:00
Simon Glass b206cd7372 dm: stdio: Plumb in the new keyboard uclass
When driver model is used for keyboards we must scan the available keyboards
and register them with stdio. Add code to do this.

At some point (once LCD/video is converted) we should be able to convert
stdio to driver model and avoid these dual data structures.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2015-11-19 20:13:40 -07:00
Simon Glass 745009c4d0 cros_ec: Use udevice instead of cros_ec_dev for keyboard functions
In preparation for converting the cros_ec keyboard driver to driver model,
adjust the cros_ec functions it will use to use a normal struct udevice.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-11-19 20:13:40 -07:00
Simon Glass 66877b0f5f input: Add the keycode translation tables separately
Require the caller to add the keycode translation tables separately so that
it can select which ones to use. In a later patch we will add the option to
add German tables.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2015-11-19 20:13:40 -07:00
Simon Glass 92778b2784 input: Return -ENOSPC when there is not space
Return a useful error instead of -1 when something goes wrong.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2015-11-19 20:13:40 -07:00
Simon Glass c9cac4cdce input: Add a device pointer to the input config
The read_keys() method in input is passed a struct input_config. Add a
device pointer there so that we can find out the device that is referred
to with driver model.

Once all drivers are converted we can update the input structure to use
driver model instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2015-11-19 20:13:40 -07:00
Simon Glass e84421d8f3 dm: input: Create a keyboard uclass
Add a uclass for keyboard input, mirroring the existing stdio methods.
This is enabled by a new CONFIG_DM_KEYBOARD option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2015-11-19 20:13:39 -07:00
Simon Glass 34ab37eef5 dm: usb: Add support for USB keyboards with driver model
Switch USB keyboards over to use driver model instead of scanning with the
horrible usb_get_dev_index() function. This involves creating a new uclass
for keyboards, although so far there is no API.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-11-19 20:13:39 -07:00
Ariel D'Alessandro 2b24e09c66 rockchip: Turn on CONFIG_DEBUG_UART_NS16550 in defconfigs
No UART driver was specified in defconfig, thus
DEBUG_UART_ALTERA_JTAGUART was incorrectly selected by default since
commit 220e8021af added a new Altera UART
driver.

Signed-off-by: Ariel D'Alessandro <ariel@vanguardiasur.com.ar>
Acked-by: Simon Glass <sjg@chromium.org>
2015-11-19 17:06:25 -05:00
Tom Rini 9ef671c9d4 Merge branch 'master' of git://git.denx.de/u-boot-spi 2015-11-19 13:27:26 -05:00
Tom Rini aa7077fcee Merge branch 'zynq' of git://www.denx.de/git/u-boot-microblaze 2015-11-19 11:25:36 -05:00
Tom Rini 4c60850792 Merge branch 'master' of git://www.denx.de/git/u-boot-microblaze 2015-11-19 09:06:44 -05:00
Michal Simek bdaeb8f23c common: mii: Do not allow to exceed max phy limit
Phy can have addresses 0-31. Check this boundary to ensure that user
can't call commands on phy address 32 and more.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2015-11-19 14:03:05 +01:00
Michal Simek f3bd72801a zynq: sdhci: Define max clock by macro
zc1571 with silicon can operate on 200MHz maximum frequency. Setup this
frequency by default and fix setting for ep108.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-11-19 14:03:05 +01:00
Michal Simek 6777f38630 net: zynq: Fix MDC setting for zynq
Based on spec:
"MDC must not exceed 2.5 MHz (MDC is only active during MDIO read and
write operations)"
Zynq is running on 111MHz. Current setting is 32 which is 111/32=3.47
which is above of 2.5MHz.
Using 48 divider will give us correct setting according spec
(111/48=2.31).

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2015-11-19 14:03:05 +01:00
Michal Simek 2889659a55 net: zynq: Remove unused MDCCLKDIV2 macro
Driver cleanup.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2015-11-19 14:03:05 +01:00
Michal Simek 242b15476c net: zynq: Fix mdc clock division setting for 100Mbit/s
Using set and clear macro is incorrect because it is not overwritting
origin mdc clock division setup.
For example origin setup is 8(0b001) and new setup is 64(0b100) which
means 0b101 is setup which is 96 divider.
Using writel to rewrite all setting like for 1000Mbit/s case.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2015-11-19 14:03:05 +01:00
Michal Simek e4d2318adb net: zynq: Wait till packet is sent
Wait till BD is processed to ensure that packet was sent successfully.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-11-19 14:03:05 +01:00
Edgar E. Iglesias 603ff0081a net: zynq: Disable secondary queues
Zynq has no priority queues.
ZynqMP has one priority queue and this change is required
to get ethernet working.
This patch was not needed on ep108 for uknown reason even
it should be used.
Tested on Zynq and ZynqMP.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-11-19 14:03:01 +01:00
Michal Simek 23a598f719 net: zynq: Add dummy packet to fix packet duplication issue
Target is duplicating packets. IP prefetches another BD and process it
when the first one is sent. Adding one dummy BD to the chain fix the
problem with packet duplication.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2015-11-19 13:50:09 +01:00
Michal Simek 081dc2fa78 net: zynq: Do not report TX underrun
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2015-11-19 13:50:09 +01:00
Michal Simek 45c0774151 net: zynq: Setup BD when structures are filled
Fix incorrect sequence in BD handling.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2015-11-19 13:50:09 +01:00
Michal Simek ff4758789e net: zynq: Allocate BD_SPACE in connection to RX_BUF
BD_SEPRN_SPACE should not have hard coded value and it will be
calculated based on the number of buffer descriptors that we
would like to use.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2015-11-19 13:50:09 +01:00
Michal Simek 2588f2ddfd dm: sf: Add support for all targets which requires MANUAL_RELOC
It is follow up patch based on
"dm: Add support for all targets which requires MANUAL_RELOC"
(sha1: 484fdf5ba0)
to update function pointers for DM.

Using post_bind is not ideal but it is one on current option what can be
used. Variable reloc_done has to be used do not call relocation after
every bind. Maybe new core functions should be introduced for this case.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-11-19 13:10:32 +01:00
Michal Simek 31e1029a8e dm: core: Add missing entries for manual relocation
Patches:
"dm: core: Add a post_bind method for parents"
(sha1: 0118ce7957)
"dm: core: Add a uclass pre_probe() method for devices"
(sha1: 02c07b3741)
"dm: core: Allow the uclass to set up a device's child after binding"
(sha1: 081f2fcbd9)
"dm: core: Allow uclass to set up a device's child before it is probed"
(sha1: 83c7e434c9)

Adds new entries to struct driver and struct uclass_driver without
extending code for manual relocation. This patch fixes it for all
architectures which requires MANUAL_RELOC.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-11-19 13:10:16 +01:00
Michal Simek 281f1566b8 dm: spi: Add support for all targets which requires MANUAL_RELOC
It is follow up patch based on
"dm: Add support for all targets which requires MANUAL_RELOC"
(sha1: 484fdf5ba0)
to update function pointers for DM.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-11-19 13:10:16 +01:00
Nathan Rossi e0f21e1cbc microblaze: Fix C99/gnu99 compatiblity for inline functions
'extern inline' is not portable across various C standards. To ensure
compatiblity with various standards/compilers change the functions to
static inline. This is a portable construct and serves as a comparable
definition to 'extern inline' from the gnu90 standard.

Additionally remove the function prototypes as they are not required due
to the functions being declared static and functions are correctly
ordered based on dependence.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Tom Rini <trini@konsulko.com>
Acked-by: Mans Rullgard <mans@mansr.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-11-19 13:09:41 +01:00
Nathan Rossi 7cb73730c8 microblaze: Fix style issues in header files
Fix various style issues in MicroBlaze header files. Specifically fixing
style voilations including '__inline__', 'foo * bar' and 'void foo ('.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Tom Rini <trini@konsulko.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-11-19 13:09:41 +01:00
Michal Simek 0ebf40417d net: zynq: Fix clearing statistic
Previous loop was completely bogus. Iterration should go just over
statistic counters.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2015-11-19 13:09:21 +01:00
Michal Simek 97a51a0363 net: zynq: Extend register description with offsets
Extend comments with register offset to help with debuggging.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2015-11-19 13:09:21 +01:00
Michal Simek 16ce6de87e net: zynq: Add support for different PHY interface types
MII is setup by default for all cases. The most of boards are using
RGMII but PHY drivers are not doing any specific setting that's why MII
setting was working fine. With TI DP83867 is necessary to setup
paramaters based on interface type.

Use one setting per board for it which is something what will be removed
when driver is moved to DM.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2015-11-19 13:09:21 +01:00
Michal Simek 198e9a4fe9 net: zynq: Add debug message to phyread/phywrite
Add debug messages to phyread/write to help with PHY debug.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2015-11-19 13:09:21 +01:00
Nathan Rossi 08598d6ee9 ARM: zynq: Add target for building bootable SPL image for Zynq
Add a build target to generate 'boot.bin' which includes SPL. This is
used by the platforms BootROM to load SPL directly.

This change also conditionally changes what the 'boot.bin' target
generates depending on the SoC. Leaving the behaviour unchanged for the
AT91 targets.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Andreas Bießmann <andreas.devel@googlemail.com>
Cc: Heiko Schocher <hs@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
2015-11-19 13:09:21 +01:00
Nathan Rossi 66eef1e780 tools: zynqimage: Add Xilinx Zynq boot header generation to mkimage
As with other platforms vendors love to create their own boot header
formats. Xilinx is no different and for the Zynq platform/SoC there
exists the "boot.bin" which is read by the platforms bootrom. This
format is described to a useful extent within the Xilinx Zynq TRM.

This implementation adds support for the 'zynqimage' to mkimage. The
implementation only considers the most common boot header which is
un-encrypted and packed directly after the boot header itself (no
XIP, etc.). However this implementation does take into consideration the
other fields of the header for image dumping use cases (vector table and
register initialization).

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-11-19 13:09:21 +01:00
Michal Simek bf146325a3 ARM64: zynqmp: Enable TI phy by default
Enable TI phy for Xilinx ZynqMP platform.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-11-19 13:09:21 +01:00
Edgar E. Iglesias 721aed7912 net: phy: Add support for Texas Instruments DP83867
Code is taken from Linux kernel driver (v4.2).

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2015-11-19 13:09:21 +01:00
Michal Simek 8741c490f9 ARM: zynq: Choose boot image based on OF_SEPARATE macro
OF_CONTROL is enabled by default for all Zynq boards.
The difference between two boot images is done by OF_SEPARATE
or OF_EMBED macros.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2015-11-19 12:57:48 +01:00
Michal Simek a7bcd4c32a zynqmp: mp: Add support for booting R5 from any address
Put jump trampoline to TCM at 0 and setup R5 reset address to 0.
Jump trampoline ensures that jump to the right location.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2015-11-19 10:42:45 +01:00
Kevin Smith a7c06cd3a6 env_ubi.c: Correct pointer error in env load
The variable "buf" in this function is a char array, and the
function ubi_volume_read is expecting a char *.  In the call, the
address of the pointer is being taken, incorrectly passing a
char **.  The compiler warning was being silenced by the cast.
Remove the address operator and the cast.

Signed-off-by: Kevin Smith <kevin.smith@elecsyscorp.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Tom Rini <trini@konsulko.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
2015-11-19 07:32:49 +01:00
Stephen Warren 736d1746fb itest: add missing break statements to evalexp()
The commit mentioned below replaced return statements inside a switch so
that other code could be called after the switch. However, it didn't add
any break statements, causing the cases to run together. Fix this.

Reported-by: Coverity (CID 132282, 132283)
Fixes: 7861204c9a ("itest: make memory access work under sandbox")
Signed-off-by: Stephen Warren <swarren@nvidia.com>
2015-11-18 15:29:00 -05:00
Stephen Warren 34a60d9bc8 test: fat: add error-checking to non-contig test
Check the result code of all command that are executed. Without this,
if the fallocate invocation fails (this feature is not supported on ext3
filesystems for example) then a zero-length output file will be created,
and subsequent the mkfs and mount invocations will fail, which will cause
the subsequent dd invocation to attempt to fill up the host's entire free
disk space. That's not a nice user experience!

Related, if fallocate does fail, try to create the test disk image using
dd instead. That should work everywhere.

Fixes: 4a28274227 ("test: fat: add test of non-contiguous file reads")
Signed-off-by: Stephen Warren <swarren@nvidia.com>
2015-11-18 15:28:59 -05:00
Stephen Warren 60f989a939 Fix sandbox build on Ubuntu 10.04
gcc 4.4.3 (which is the default native compiler on x86-64 Ubuntu 10.04)
doesn't seem to like initializers for sub-fields of anonymous unions.
Solve this by replacing the initialization with an assignment. This
fixes:

lib/lz4_wrapper.c: In function ‘ulz4fn’:
lib/lz4_wrapper.c:97: error: unknown field ‘raw’ specified in initializer

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-11-18 15:28:59 -05:00
Valentin Longchamp 89127c5346 km/powerpc: fix ft_board_setup prototype for km82xx & km83xx
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2015-11-18 15:28:58 -05:00
Valentin Longchamp 5411988242 powerpc/83xx: add support for kmtegr1 board
This board uses the same CPU (8309) as VECT1. The memory however is
different since it has NAND Flash, the NOR Flash partitioning is
different and of course the FPGAs as well.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Signed-off-by: Christoph Dietrich <christoph.dietrich@keymile.com>
2015-11-18 15:28:58 -05:00
Valentin Longchamp 38467df5d6 km8309: change the default QE_FW address
It should be after the u-boot reserved sectors and before the env
sectors, since the solution used for kmvect1 (tell the linker to put the
firmware into the u-boot produced binary, at the end of the area) should
be the exception.

The #define is only "conditional" so that we can still support kmvect1.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2015-11-18 15:28:57 -05:00
Valentin Longchamp 68005ea655 km83xx: use CONFIG_ENV_ADDR for the newenv env command
The hardcoded value are bad, since the address could change between
different boards.

Furthermore, the relevant #defines are set only if #undefined here, so
that they can be changed by some boards if required.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2015-11-18 15:28:57 -05:00
Bagavathiannan Palanisamy cd7255fdc2 board/keymile/km82xx: setting dip_switch 3 and 4 will run bootloader
Setting dip_switch 3 and 4 also will run bootloader in COGE3 and COGE6
It is required remove local mgmt IP address, when DIP Switch PIN3 is
enabled. DIP Switch 4 also enabled to avoid u-boot update in future
for DIP switch enhancements.

Signed-off-by: Bagavathiannan Palanisamy <Bagavathiannan.Palanisamy@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2015-11-18 15:28:56 -05:00
Valentin Longchamp 22554ba1c9 powerpc/km8360: fix the ODT parameters for CS0
The ODT parameters for km8360 set the ODT_WR_ACS bit in u-boot KM-2011.09
that is used in the release bootpackage for kmcoge5ne. During the
transition from the kmeter1 to km8360 this was changed to
ODT_RD_ONLY_CURRENT, which is uncorrect and causes faulty RAM accesses at
low temperatures.

This is now changed to ODT_WR_ONLY_CURRENT which is the equivalent of
ODT_WR_ACS.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2015-11-18 15:28:56 -05:00