summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
* ns16550: replace with binding files from Linux kernelThomas Chou2016-01-25-10/+175
| | | | | | | | | | Replace ns16550.txt with binding files from Linux kernel. As suggested by Stephen Warren, we should keep the directory structure, filenames, and file content identical to the bindings in the Linux kernel. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* OMAP: Define CONFIG_OMAP3_GPIO_6 on omap3_logicAdam Ford2016-01-25-0/+3
| | | | | | | | Since we are manipulating GPIO 189 to determine the board type, we need to enable the GPIO Bank 6. Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* igep00x0: remove #undef CONFIG_BOOTDELAYLadislav Michl2016-01-25-2/+0
| | | | | | | | Do not undefine CONFIG_BOOTDELAY, so board can boot without user intervention. Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Acked-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
* openrisc: Fix build errorsBin Meng2016-01-25-0/+1
| | | | | | | | | | | | | | | With kernel.org toolchain, it reports: CC arch/openrisc/lib/board.o arch/openrisc/lib/board.c:56:2: error: 'console_init_f' undeclared here (not in a function) arch/openrisc/lib/board.c: In function 'board_init': arch/openrisc/lib/board.c:120:2: warning: implicit declaration of function 'console_init_r' make[1]: *** [arch/openrisc/lib/board.o] Error 1 make: *** [arch/openrisc/lib] Error 2 Include console.h will fix this. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
* net: eepro100: Fix build warningsBin Meng2016-01-25-4/+4
| | | | | | | | | | | When building katmai, it reports quite a lot warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] Fix this by casting the dev->iobase with u_long. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* powerpc: tqm834x: Fix build warnings in initdram()Bin Meng2016-01-25-2/+2
| | | | | | | | | | | | | | | | | | With gcc 4.9, it produces the following warnings: CC board/tqc/tqm834x/tqm834x.o board/tqc/tqm834x/tqm834x.c: In function 'initdram': board/tqc/tqm834x/tqm834x.c:325:12: warning: iteration 3u invokes undefined behavior [-Waggressive-loop-optimizations] (((base + size - 1) >> CSBNDS_EA_SHIFT) & ^ board/tqc/tqm834x/tqm834x.c:80:2: note: containing loop for(cs = 0; cs < 4; ++cs) { ^ There is an integer overflow when cs = 3. To fix it, change parameters of set_cs_bounds() to ulong. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
* sh: sh7753evb: Fix build errorBin Meng2016-01-25-0/+4
| | | | | | | | | | | | | | | Currently buildman fails to build sh7753evb and reports the following: board/renesas/sh7753evb/built-in.o: In function 'init_gether_mdio': board/renesas/sh7753evb/sh7753evb.c:94: undefined reference to 'PMB_ADDR_BASE' board/renesas/sh7753evb/sh7753evb.c:94: undefined reference to 'PMB_DATA_BASE' board/renesas/sh7753evb/sh7753evb.c:94: undefined reference to 'mk_pmb_addr_val' board/renesas/sh7753evb/sh7753evb.c:94: undefined reference to 'mk_pmb_data_val' make: *** [u-boot] Error 1 The fix is to wrap any codes that access these macros with CONFIG_SH_32BIT. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
* bug.h: move BUILD_BUG_* defines to include/linux/bug.hMasahiro Yamada2016-01-25-8/+64
| | | | | | | | | | | | | | | | BUILD_BUG_* macros have been defined in several headers. It would be nice to collect them in include/linux/bug.h like Linux. This commit is cherry-picking useful macros from include/linux/bug.h of Linux 4.4. I did not import BUILD_BUG_ON_MSG() because it would not work if it is used with include/common.h in U-Boot. I'd like to postpone it until the root cause (the "error()" macro in include/common.h causes the name conflict with "__attribute__((error()))") is fixed. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* Revert "devicetree: use wildcard to clean arch subdir"Masahiro Yamada2016-01-25-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 67871a595873930a0a536b1685e5caac53766701. Since that commit, out-of-tree cleaning emits lots of warnings. $ make O=foo clean make[1]: Entering directory `/home/masahiro/workspace/u-boot/foo' ../dts/../arch/arm/dts/Makefile:209: warning: overriding commands for target `dtbs' ../dts/../arch/arc/dts/Makefile:15: warning: ignoring old commands for target `dtbs' ../dts/../arch/microblaze/dts/Makefile:13: warning: overriding commands for target `dtbs' ../dts/../arch/arm/dts/Makefile:209: warning: ignoring old commands for target `dtbs' ../dts/../arch/mips/dts/Makefile:14: warning: overriding commands for target `dtbs' ../dts/../arch/microblaze/dts/Makefile:13: warning: ignoring old commands for target `dtbs' ../dts/../arch/nios2/dts/Makefile:13: warning: overriding commands for target `dtbs' ../dts/../arch/mips/dts/Makefile:14: warning: ignoring old commands for target `dtbs' ../dts/../arch/powerpc/dts/Makefile:13: warning: overriding commands for target `dtbs' ../dts/../arch/nios2/dts/Makefile:13: warning: ignoring old commands for target `dtbs' ../dts/../arch/sandbox/dts/Makefile:14: warning: overriding commands for target `dtbs' ../dts/../arch/powerpc/dts/Makefile:13: warning: ignoring old commands for target `dtbs' ../dts/../arch/x86/dts/Makefile:22: warning: overriding commands for target `dtbs' ../dts/../arch/sandbox/dts/Makefile:14: warning: ignoring old commands for target `dtbs' make[1]: Leaving directory `/home/masahiro/workspace/u-boot/foo' Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* net: zynq_gem: Use shared wait_for_bitMateusz Kulikowski2016-01-25-33/+2
| | | | | Use existing library function to poll bit(s). Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
* usb: ehci-mx6: Use shared wait_for_bitMateusz Kulikowski2016-01-25-28/+4
| | | | | | Use existing library function to poll bit(s). Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
* usb: ohci-lpc32xx: Use shared wait_for_bitMateusz Kulikowski2016-01-25-27/+7
| | | | | | | Use existing library function to poll bit(s). Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> Tested-by: Sylvain Lemieux <slemieux@tycoint.com>
* usb: dwc2: Use shared wait_for_bitMateusz Kulikowski2016-01-25-28/+13
| | | | | | Use existing library function to poll bit(s). Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
* lib: Add wait_for_bitMateusz Kulikowski2016-01-25-0/+71
| | | | | | | | Add function to poll register waiting for specific bit(s). Similar functions are implemented in few drivers - they are almost identical and can be generalized. Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* common/console.c: Remove unused inline functionsTom Rini2016-01-25-54/+0
| | | | | | | | clang-3.8 reports that these functions are unused, remove them. As this is the last part of CONFIG_MODEM_SUPPORT_DEBUG, drop that from README. Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com>
* part: Drop duplication declaration of block_dev_desc_tSimon Glass2016-01-25-2/+0
| | | | | | | | | | This is already defined in ide.h, which part.h includes. So we don't need the duplicate typedef. At least with my old blackfin gcc 4.3.5 tool chain, this causes an error. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>
* env_mmc: support overriding mmc dev from board codeClemens Gruber2016-01-25-7/+12
| | | | | | | | | | | | | | | | | | | | | | | This enables boards to choose where to/from the environment should be saved/loaded. They can then for example support using the same device (dynamically) from which the bootloader was launched to load and save env data and do not have to define CONFIG_SYS_MMC_ENV_DEV statically. In my use case, the environment needs to be on the same device I booted from. It can be the eMMC or an optional SD card. I therefore would override mmc_get_env_dev in the board code, read the CPU registers to determine where we booted from and return the corresponding device index. Cc: Tom Rini <trini@konsulko.com> Cc: Stephen Warren <swarren@nvidia.com> Cc: Tim Harvey <tharvey@gateworks.com> Cc: Simon Glass <sjg@chromium.org> Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com> Reviewed-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* serial: Remove serial_putc_raw_devTom Rini2016-01-25-34/+0
| | | | | | | | | clang-3.8 reports that serial_putc_raw_dev in serial_ns16550.c is unused. Further investigation shows that we have 3 places that implement this function and no callers, remove. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* bootm: fix size arg of flush_cache() in bootm_load_os().Purna Chandra Mandal2016-01-25-1/+1
| | | | | | | | | | | | | | Variable _load_end_ points to end address of uncompressed buffer (*not* uncomress_buffer_end / sizeof(ulong)), so multipling uncompressed size with sizeof(ulong) is grossly incorrect in flush_cache(). It might lead to access of address beyond valid memory range and hang the CPU. Tested on MIPS architecture by using compressed(gzip, lzma) and uncompressed uImage. Signed-off-by: Purna Chandra Mandal <purna.mandal@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
* arm, powerpc: Update cc-version tests to check for cc-name as wellTom Rini2016-01-25-2/+4
| | | | | | | | For compatibility clang will report some gcc version. However since we are checking gcc versions in order to then fail to build, we should limit these tests only to when we are using gcc and not clang. Signed-off-by: Tom Rini <trini@konsulko.com>
* kbuild: Add clang detectionTom Rini2016-01-25-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Adapted from: >From 5631d9c429857194bd55d7bcd8fa5bdd1a9899a3 Mon Sep 17 00:00:00 2001 From: Michal Marek <mmarek@suse.com> Date: Wed, 19 Aug 2015 17:36:41 +0200 Subject: [PATCH 1/1] kbuild: Fix clang detection We cannot detect clang before including the arch Makefile, because that can set the default cross compiler. We also cannot detect clang after including the arch Makefile, because powerpc wants to know about clang. Solve this by using an deferred variable. This costs us a few shell invocations, but this is only a constant number. Reported-by: Behan Webster <behanw@converseincode.com> Reported-by: Anton Blanchard <anton@samba.org> Signed-off-by: Michal Marek <mmarek@suse.com> in the Linux kernel. This will allow us to make better decisions about when to run tests later on for gcc features. Signed-off-by: Tom Rini <trini@konsulko.com>
* Remove the cmd_ prefix from command filesSimon Glass2016-01-25-129/+129
| | | | | | | | | | | | Now that they are in their own directory, we can remove this prefix. This makes it easier to find a file since the prefix does not get in the way. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de> Acked-by: Stefan Roese <sr@denx.de> Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
* Move all command code into its own directorySimon Glass2016-01-25-737/+761
| | | | | | | | | | | | | | | | | | | | | | | | | There are a lot of unrelated files in common, including all of the commands. Moving them into their own directory makes them easier to find and is more logical. Some commands include non-command code, such as cmd_scsi.c. This should be sorted out at some point so that the function can be enabled with or without the associated command. Unfortunately, with m68k I get this error: m68k: + M5329AFEE +arch/m68k/cpu/mcf532x/start.o: In function `_start': +arch/m68k/cpu/mcf532x/start.S:159:(.text+0x452): relocation truncated to fit: R_68K_PC16 against symbol `board_init_f' defined in .text.board_init_f section in common/built-in.o I hope someone can shed some light on what this means. I hope it isn't depending on the position of code in the image. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de> Acked-by: Stefan Roese <sr@denx.de> Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
* x86: ivybridge: Use syscon for the GMA deviceSimon Glass2016-01-24-15/+17
| | | | | | | | | Until we have a proper video uclass we can use syscon to handle the GMA device, and avoid the special device tree and PCI searching. Update the code to work this way. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* x86: Set up a shared syscon numbering schemaSimon Glass2016-01-24-4/+16
| | | | | | | | | Each system controller can have a number to identify it. It can then be accessed using syscon_get_by_driver_data(). Put this in a shared header file and update the only current user. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* x86: ivybridge: Drop the SMM-locking codeSimon Glass2016-01-24-57/+0
| | | | | | | | U-Boot does not support SMM yet, so we can drop this code. It is easy to bring back when needed. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* x86: ivybridge: Drop XHCI supportSimon Glass2016-01-24-34/+0
| | | | | | | This is not used on link which is the only ivybridge board. Drop this code. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* x86: ivybridge: Drop special EHCI initSimon Glass2016-01-24-34/+12
| | | | | | | | | | This is not needed. On reset wake-on-disconnect is already set. It may a problem during a soft reset or resume, but for now it does not seem important. Also drop the command register update since PCI auto-config does it for us. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* x86: ivybridge: Sort out the calls to bridge_silicon_revision()Simon Glass2016-01-24-42/+46
| | | | | | | | This function is called all over the place. Convert it use the driver model PCI API, and rationalise the calls. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* x86: ivybridge: Move code from pch.c to bd82x6x.cSimon Glass2016-01-24-145/+129
| | | | | | | This code relates to the PCH, so we should move it into the same file. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* x86: ivybridge: Convert pch.c to use DM PCI APISimon Glass2016-01-24-32/+76
| | | | | | | Convert this file to use the driver model PCI API. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* x86: ivybridge: Convert report_platform to DM PCI APISimon Glass2016-01-24-7/+8
| | | | | | | Convert these functions to use the driver model PCI API. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* x86: ivybridge: Convert SDRAM init to use driver modelSimon Glass2016-01-24-38/+101
| | | | | | | | | SDRAM init needs access to the Northbridge controller and the Intel Management Engine device. Add the latter to the device tree and convert all of this code to driver model. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* x86: chromebook_link: Enable the syscon uclassSimon Glass2016-01-24-0/+2
| | | | | | | | We will use a system controller to model the Intel Management Engine. Enable this for link. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* x86: ivybridge: Convert sdram_initialise() to use DM PCI APISimon Glass2016-01-24-9/+10
| | | | | | | | Convert this function to use the the driver model PCI API. We just need to pass in the northbridge device. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* x86: ivybridge: Convert dram_init() to use DM PCI APISimon Glass2016-01-24-14/+25
| | | | | | | | Convert the top part of the DRAM init to use the driver model PCI API. Further work will complete the transformation. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* x86: ivybridge: Convert enable_usb_bar() to use DM PCI APISimon Glass2016-01-24-17/+17
| | | | | | | | | Convert this function over to use the driver model PCI API. In this case we want to avoid using the real PCI devices since they have not yet been probed. Instead, write directly to their PCI configuration address. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* x86: ivybridge: Use the I2C driver to perform SMbus initSimon Glass2016-01-24-36/+35
| | | | | | | | Move the init code into the I2C driver. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heiko Schocher <hs@denx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* x86: i2c: Add a stub driver for Intel I2C/SMbusSimon Glass2016-01-24-0/+61
| | | | | | | | | | | This is used on most Intel platforms. We don't have a driver for it yet, but add a stub to handle the init. For now this targets ivybridge so we may want to add a device tree binding and generalise it when other platforms are supported. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heiko Schocher <hs@denx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* x86: Enable DM_USB for link and pantherSimon Glass2016-01-24-0/+4
| | | | | | | Move these two boards to use driver model for USB. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* x86: ivybridge: Convert lpc init code to DM PCI APISimon Glass2016-01-24-63/+66
| | | | | | | | Adjust this code to use the driver model PCI API. This is all called through lpc_init_extra(). Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* x86: ivybridge: Drop the special PCI driverSimon Glass2016-01-24-48/+1
| | | | | | | | There is nothing special about the ivybridge pci driver now, so just use the generic one. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* x86: ivybridge: Move LPC init into the LPC probe() methodSimon Glass2016-01-24-14/+9
| | | | | | | | Drop the lpc_init_extra() function and just use the post-relocation LPC probe() instead. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* x86: ivybridge: Move lpc_enable() into gma.cSimon Glass2016-01-24-9/+4
| | | | | | | | This graphics init code is best placed in the gma init code. Move the code and drop the function. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* x86: ivybridge: Use driver model PCI API in sata.cSimon Glass2016-01-24-49/+45
| | | | | | | Adjust the functions in this file to use the driver model PCI API. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* x86: ivybridge: Use the SATA driver to do the initSimon Glass2016-01-24-10/+8
| | | | | | | | Instead of manually initing the device, probe the SATA device and move the init there. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* x86: ivybridge: Drop the unused bd82x6x_init_extra()Simon Glass2016-01-24-18/+0
| | | | | | | This function does nothing now so can be dropped. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* x86: ivybridge: Do the SATA init before relocationSimon Glass2016-01-24-11/+36
| | | | | | | | | The SATA device needs to set itself up so that it appears correctly on the PCI bus. The easiest way to do this is to set it up to probe before relocation. This can do the early setup. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* ahci: Add a disk-controller uclassSimon Glass2016-01-24-0/+25
| | | | | | | | | Add a uclass ID for a disk controller. This can be used by AHCI/SATA or other controller types. There are no operations and no interface so far, but it is possible to probe a SATA device. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* x86: ivybridge: Drop unnecessary northbridge setupSimon Glass2016-01-24-20/+0
| | | | | | | This is done by default with PCI auto-config. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>