platform/kernel/u-boot.git
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-usb
Tom Rini [Mon, 25 Jan 2016 22:23:19 +0000 (17:23 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-usb

8 years agoMerge branch 'master' of git://git.denx.de/u-boot-mpc85xx
Tom Rini [Mon, 25 Jan 2016 21:45:00 +0000 (16:45 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx

8 years agousb: kbd: Prevent out of bound access
Marek Vasut [Mon, 25 Jan 2016 21:00:44 +0000 (22:00 +0100)]
usb: kbd: Prevent out of bound access

Scan code 0x39 is CapsLock, which is not a printable character and thus
is not covered by either usb_kbd_numkey_shifted[] or usb_kbd_numkey[].
Fix the scan code check to avoid looking it up in either of the arrays.

Signed-off-by: Marek Vasut <marex@denx.de>
8 years agousb: add clock support for generic EHCI
Masahiro Yamada [Mon, 25 Jan 2016 06:00:36 +0000 (15:00 +0900)]
usb: add clock support for generic EHCI

This driver is designed in a generic manner, so clocks should be
handled genericly as well.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
8 years agopowerpc/board/t4240rdb: Enable VID support
Ying Zhang [Fri, 22 Jan 2016 04:15:13 +0000 (12:15 +0800)]
powerpc/board/t4240rdb: Enable VID support

The fuse status register provides the values from on-chip
voltage ID efuses programmed at the factory. These values
define the voltage requirements for the chip. u-boot reads
FUSESR and translates the values into the appropriate
commands to set the voltage output value of an external
voltage regulator.

Signed-off-by: Ying Zhang <b40530@freescale.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoboard/freescale/common: Check IR chip mode for VID support
Ying Zhang [Fri, 22 Jan 2016 04:15:12 +0000 (12:15 +0800)]
board/freescale/common: Check IR chip mode for VID support

IR chip on all the boards are required to be used in Intel mode
to support VID. VDD will not be adjusted if IR chip is used in
other modes.

Signed-off-by: Ying Zhang <b40530@freescale.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agoarch/powperpc: Fix start_align due to use of __ffs64() instead ffs64()
Ashish kumar [Fri, 22 Jan 2016 10:20:10 +0000 (15:50 +0530)]
arch/powperpc: Fix start_align due to use of __ffs64() instead ffs64()

Incorrect DDR law was created in case of B4860qds after commit
2d2f490d. Return value of ffs64() differs from __ffs64(), eg.
    ffs64(0x80000000) = 0x20
    __ffs64(0x80000000) = 0x1f
As a result of this change, callers need to adjust the expected
return value by removing -1.

Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agopowerpc: mpc85xx: Move set_liodns, setup_portals to common boot seq
Prabhakar Kushwaha [Fri, 22 Jan 2016 09:04:44 +0000 (14:34 +0530)]
powerpc: mpc85xx: Move set_liodns, setup_portals to common boot seq

Users migrating Freescale's PowerPC SoC U-Boot code to their custom
board, often overlook the need to execute set_liodns() and
setup_portals() being called by platform files.

So Move set_liodns() and setup_portals() to common u-boot boot
sequence

Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
8 years agocheckpatch: ignore request to use ether_addr_copy()
Stephen Warren [Fri, 13 Nov 2015 16:03:00 +0000 (09:03 -0700)]
checkpatch: ignore request to use ether_addr_copy()

The Linux kernel, from which checkpatch originates, contains function
ether_addr_copy() to copy Ethernet MAC addresses, and checkpatch warns
that it should be used in preference to memcpy() where appropriate.
U-Boot doesn't contain ether_addr_copy(), so tell checkpatch not to issue
this warning.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Tested-by: Anand Moon <linux.amoon@gmail.com>
Reviewed-by: Anand Moon <linux.amoon@gmail.com>
8 years agoMerge branch 'master' of git://git.denx.de/u-boot-imx
Tom Rini [Mon, 25 Jan 2016 15:40:38 +0000 (10:40 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-imx

8 years agons16550: zap the rockchip serial compatible string
Thomas Chou [Mon, 14 Dec 2015 12:45:09 +0000 (20:45 +0800)]
ns16550: zap the rockchip serial compatible string

Zap the rockchip serial compatible string, because rockchip
serial has "snps,dw-apb-uart" compatible string in the dts.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Simon Glass <sjg@chromium.org>
8 years agons16550: replace with binding files from Linux kernel
Thomas Chou [Mon, 14 Dec 2015 12:45:08 +0000 (20:45 +0800)]
ns16550: replace with binding files from Linux kernel

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>
8 years agoOMAP: Define CONFIG_OMAP3_GPIO_6 on omap3_logic
Adam Ford [Fri, 22 Jan 2016 10:40:58 +0000 (04:40 -0600)]
OMAP: Define CONFIG_OMAP3_GPIO_6 on omap3_logic

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>
8 years agoigep00x0: remove #undef CONFIG_BOOTDELAY
Ladislav Michl [Thu, 21 Jan 2016 10:35:58 +0000 (11:35 +0100)]
igep00x0: remove #undef CONFIG_BOOTDELAY

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>
8 years agoopenrisc: Fix build errors
Bin Meng [Mon, 25 Jan 2016 09:53:13 +0000 (01:53 -0800)]
openrisc: Fix build errors

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>
8 years agonet: eepro100: Fix build warnings
Bin Meng [Mon, 25 Jan 2016 09:26:26 +0000 (01:26 -0800)]
net: eepro100: Fix build warnings

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>
8 years agopowerpc: tqm834x: Fix build warnings in initdram()
Bin Meng [Mon, 25 Jan 2016 08:29:55 +0000 (00:29 -0800)]
powerpc: tqm834x: Fix build warnings in initdram()

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>
8 years agosh: sh7753evb: Fix build error
Bin Meng [Mon, 25 Jan 2016 05:45:46 +0000 (21:45 -0800)]
sh: sh7753evb: Fix build error

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>
8 years agobug.h: move BUILD_BUG_* defines to include/linux/bug.h
Masahiro Yamada [Sun, 24 Jan 2016 14:27:48 +0000 (23:27 +0900)]
bug.h: move BUILD_BUG_* defines to include/linux/bug.h

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>
8 years agoRevert "devicetree: use wildcard to clean arch subdir"
Masahiro Yamada [Sat, 23 Jan 2016 18:50:02 +0000 (03:50 +0900)]
Revert "devicetree: use wildcard to clean arch subdir"

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>
8 years agonet: zynq_gem: Use shared wait_for_bit
Mateusz Kulikowski [Sat, 23 Jan 2016 10:54:33 +0000 (11:54 +0100)]
net: zynq_gem: Use shared wait_for_bit

Use existing library function to poll bit(s).
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
8 years agousb: ehci-mx6: Use shared wait_for_bit
Mateusz Kulikowski [Sat, 23 Jan 2016 10:54:32 +0000 (11:54 +0100)]
usb: ehci-mx6: Use shared wait_for_bit

Use existing library function to poll bit(s).

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
8 years agousb: ohci-lpc32xx: Use shared wait_for_bit
Mateusz Kulikowski [Sat, 23 Jan 2016 10:54:31 +0000 (11:54 +0100)]
usb: ohci-lpc32xx: Use shared wait_for_bit

Use existing library function to poll bit(s).

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Tested-by: Sylvain Lemieux <slemieux@tycoint.com>
8 years agousb: dwc2: Use shared wait_for_bit
Mateusz Kulikowski [Sat, 23 Jan 2016 10:54:30 +0000 (11:54 +0100)]
usb: dwc2: Use shared wait_for_bit

Use existing library function to poll bit(s).

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
8 years agolib: Add wait_for_bit
Mateusz Kulikowski [Sat, 23 Jan 2016 10:54:29 +0000 (11:54 +0100)]
lib: Add wait_for_bit

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>
8 years agocommon/console.c: Remove unused inline functions
Tom Rini [Thu, 21 Jan 2016 14:10:26 +0000 (09:10 -0500)]
common/console.c: Remove unused inline functions

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>
8 years agopart: Drop duplication declaration of block_dev_desc_t
Simon Glass [Thu, 21 Jan 2016 03:12:07 +0000 (20:12 -0700)]
part: Drop duplication declaration of block_dev_desc_t

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>
8 years agoenv_mmc: support overriding mmc dev from board code
Clemens Gruber [Wed, 20 Jan 2016 14:43:37 +0000 (15:43 +0100)]
env_mmc: support overriding mmc dev from board code

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>
8 years agoserial: Remove serial_putc_raw_dev
Tom Rini [Wed, 20 Jan 2016 12:23:05 +0000 (07:23 -0500)]
serial: Remove serial_putc_raw_dev

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>
8 years agobootm: fix size arg of flush_cache() in bootm_load_os().
Purna Chandra Mandal [Wed, 20 Jan 2016 08:37:39 +0000 (14:07 +0530)]
bootm: fix size arg of flush_cache() in bootm_load_os().

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>
8 years agoarm, powerpc: Update cc-version tests to check for cc-name as well
Tom Rini [Wed, 20 Jan 2016 01:39:02 +0000 (20:39 -0500)]
arm, powerpc: Update cc-version tests to check for cc-name as well

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>
8 years agokbuild: Add clang detection
Tom Rini [Wed, 20 Jan 2016 01:39:01 +0000 (20:39 -0500)]
kbuild: Add clang detection

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>
8 years agoRemove the cmd_ prefix from command files
Simon Glass [Mon, 18 Jan 2016 03:53:52 +0000 (20:53 -0700)]
Remove the cmd_ prefix from command files

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>
8 years agoMove all command code into its own directory
Simon Glass [Mon, 18 Jan 2016 03:53:51 +0000 (20:53 -0700)]
Move all command code into its own directory

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>
8 years agoimx: spl: enable CONFIG_SPL_WATCHDOG_SUPPORT
Peng Fan [Mon, 4 Jan 2016 12:27:27 +0000 (20:27 +0800)]
imx: spl: enable CONFIG_SPL_WATCHDOG_SUPPORT

This commit 4bdcbe60a142b08eefccb0e326a37ba81d3389e8 removes reset_cpu
which breaks SPL build when DEBUG macro defined.

"
arch/arm/lib/built-in.o: In function `do_reset':
~/uboot/arch/arm/lib/reset.c:45: undefined reference to `reset_cpu'
scripts/Makefile.spl:244: recipe for target 'spl/u-boot-spl' failed
"
Enable CONFIG_SPL_WATCHDOG_SUPPORT to fix this issue.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Tim Harvey <tharvey@gateworks.com>
Acked-by: Eric Nelson <eric@nelint.com>
8 years agoimx: mx7: default enable MDIO open drain
Peng Fan [Mon, 4 Jan 2016 05:16:41 +0000 (13:16 +0800)]
imx: mx7: default enable MDIO open drain

The management data input/output (MDIO) requires open-drain,
i.MX7D TO1.0 ENET MDIO pin has no open drain, but TO1.1 supports
this feature. So to TO1.1, need to enable open drain by setting
bits GPR0[8:7] for TO1.1.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
8 years agoimx: mx6ul/sx: fix mmdc_ch0 clk calculation
Peng Fan [Wed, 6 Jan 2016 03:06:31 +0000 (11:06 +0800)]
imx: mx6ul/sx: fix mmdc_ch0 clk calculation

Check "Figure 19-5. BUS clock generation" of i.MX 6SoloX Applications
Processor Reference Manual and "Figure 18-5. BUS clock generation" of
i.MX 6UltraLite Applications Processor Reference Manual. If mmdc clk
sources from pll4_main_clk(pll_audio), the calculation is wrong.

Fix mmdc_ch0 clk calculation. Also add PLL_AUDIO/VIDEO support
for decode_pll.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
8 years agoimx: mx6: add more entry for mxc_ccm_reg
Peng Fan [Wed, 6 Jan 2016 03:06:30 +0000 (11:06 +0800)]
imx: mx6: add more entry for mxc_ccm_reg

Add more entries for structure mxc_ccm_reg.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Eric Nelson <eric@nelint.com>
Cc: Stefano Babic <sbabic@denx.de>
8 years agoimx: mx7dsabresd: support nand
Peng Fan [Tue, 22 Dec 2015 09:04:24 +0000 (17:04 +0800)]
imx: mx7dsabresd: support nand

Add pinmux settings.
Add related macro definitions.
Nand pin conflicts with emmc, so if want to enable nand, need to do
hardware rework. After hardware rework, define CONFIG_NAND_MXS in
board header file.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
8 years agoimx: nand: update GPMI NAND driver to support MX7
Peng Fan [Tue, 22 Dec 2015 09:04:23 +0000 (17:04 +0800)]
imx: nand: update GPMI NAND driver to support MX7

Update GPMI NAND driver and BCH head file to support i.MX7

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
8 years agoimx: apbh_dma: Update APBH-DMA for MX7D
Peng Fan [Tue, 22 Dec 2015 09:04:22 +0000 (17:04 +0800)]
imx: apbh_dma: Update APBH-DMA for MX7D

Update APBH-DMA driver and head files to support i.MX7D

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
8 years agoimx: mx6ulevk: add CONFIG_SPI_FLASH_STMICRO
Peng Fan [Tue, 19 Jan 2016 07:13:52 +0000 (15:13 +0800)]
imx: mx6ulevk: add CONFIG_SPI_FLASH_STMICRO

Add CONFIG_SPI_FLASH_STMICRO to let qspi driver can detect the
qspi chips.
"
=> sf probe
SF: Detected N25Q256 with page size 256 Bytes, erase size 64 KiB, total 32 MiB
"

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Jagan Teki <jteki@openedev.com>
Cc: Stefano Babic <sbabic@denx.de>
Reviewed-by: Stefano Babic <sbabic@denx.de>
8 years agomx25pdk: Remove lowlevel_init.S file
Fabio Estevam [Mon, 11 Jan 2016 20:09:15 +0000 (18:09 -0200)]
mx25pdk: Remove lowlevel_init.S file

As the lowlevel_init function is empty we should better
remove this assembly file entirely and use a dummy C
function instead.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
8 years agoimx: mx6/7 enlarge CONFIG_SYS_BOOTM_LEN to 16M
Peng Fan [Mon, 4 Jan 2016 07:27:22 +0000 (15:27 +0800)]
imx: mx6/7 enlarge CONFIG_SYS_BOOTM_LEN to 16M

Support uncompressing zImage which is larger than 8M.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Peter Robinson <pbrobinson@gmail.com>
Cc: Volodymyr Riazantsev <volodymyr.riazantsev@globallogic.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Adrian Alonso <aalonso@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
8 years agoimx: mx6ulevk: change mtest memory size to 128M
Peng Fan [Tue, 5 Jan 2016 06:03:36 +0000 (14:03 +0800)]
imx: mx6ulevk: change mtest memory size to 128M

To i.MX6UL 14x14 EVK, system memory is 512M; to i.MX6UL 9x9 EVK,
system memory is 256M. If setting mtest size to 256M, mtest will
crash uboot for i.MX6UL 9x9 evk. So change mtest size to 128M.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
8 years agox86: ivybridge: Use syscon for the GMA device
Simon Glass [Sun, 17 Jan 2016 23:11:59 +0000 (16:11 -0700)]
x86: ivybridge: Use syscon for the GMA device

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>
8 years agox86: Set up a shared syscon numbering schema
Simon Glass [Sun, 17 Jan 2016 23:11:58 +0000 (16:11 -0700)]
x86: Set up a shared syscon numbering schema

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>
8 years agox86: ivybridge: Drop the SMM-locking code
Simon Glass [Sun, 17 Jan 2016 23:11:57 +0000 (16:11 -0700)]
x86: ivybridge: Drop the SMM-locking code

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>
8 years agox86: ivybridge: Drop XHCI support
Simon Glass [Sun, 17 Jan 2016 23:11:56 +0000 (16:11 -0700)]
x86: ivybridge: Drop XHCI support

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>
8 years agox86: ivybridge: Drop special EHCI init
Simon Glass [Sun, 17 Jan 2016 23:11:55 +0000 (16:11 -0700)]
x86: ivybridge: Drop special EHCI init

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>
8 years agox86: ivybridge: Sort out the calls to bridge_silicon_revision()
Simon Glass [Sun, 17 Jan 2016 23:11:54 +0000 (16:11 -0700)]
x86: ivybridge: Sort out the calls to bridge_silicon_revision()

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>
8 years agox86: ivybridge: Move code from pch.c to bd82x6x.c
Simon Glass [Sun, 17 Jan 2016 23:11:53 +0000 (16:11 -0700)]
x86: ivybridge: Move code from pch.c to bd82x6x.c

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>
8 years agox86: ivybridge: Convert pch.c to use DM PCI API
Simon Glass [Sun, 17 Jan 2016 23:11:52 +0000 (16:11 -0700)]
x86: ivybridge: Convert pch.c to use DM PCI API

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>
8 years agox86: ivybridge: Convert report_platform to DM PCI API
Simon Glass [Sun, 17 Jan 2016 23:11:51 +0000 (16:11 -0700)]
x86: ivybridge: Convert report_platform to DM PCI API

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>
8 years agox86: ivybridge: Convert SDRAM init to use driver model
Simon Glass [Sun, 17 Jan 2016 23:11:50 +0000 (16:11 -0700)]
x86: ivybridge: Convert SDRAM init to use driver model

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>
8 years agox86: chromebook_link: Enable the syscon uclass
Simon Glass [Sun, 17 Jan 2016 23:11:49 +0000 (16:11 -0700)]
x86: chromebook_link: Enable the syscon uclass

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>
8 years agox86: ivybridge: Convert sdram_initialise() to use DM PCI API
Simon Glass [Sun, 17 Jan 2016 23:11:48 +0000 (16:11 -0700)]
x86: ivybridge: Convert sdram_initialise() to use DM PCI API

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>
8 years agox86: ivybridge: Convert dram_init() to use DM PCI API
Simon Glass [Sun, 17 Jan 2016 23:11:47 +0000 (16:11 -0700)]
x86: ivybridge: Convert dram_init() to use DM PCI API

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>
8 years agox86: ivybridge: Convert enable_usb_bar() to use DM PCI API
Simon Glass [Sun, 17 Jan 2016 23:11:46 +0000 (16:11 -0700)]
x86: ivybridge: Convert enable_usb_bar() to use DM PCI API

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>
8 years agox86: ivybridge: Use the I2C driver to perform SMbus init
Simon Glass [Sun, 17 Jan 2016 23:11:45 +0000 (16:11 -0700)]
x86: ivybridge: Use the I2C driver to perform SMbus init

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>
8 years agox86: i2c: Add a stub driver for Intel I2C/SMbus
Simon Glass [Sun, 17 Jan 2016 23:11:44 +0000 (16:11 -0700)]
x86: i2c: Add a stub driver for Intel I2C/SMbus

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>
8 years agox86: Enable DM_USB for link and panther
Simon Glass [Sun, 17 Jan 2016 23:11:43 +0000 (16:11 -0700)]
x86: Enable DM_USB for link and panther

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>
8 years agox86: ivybridge: Convert lpc init code to DM PCI API
Simon Glass [Sun, 17 Jan 2016 23:11:42 +0000 (16:11 -0700)]
x86: ivybridge: Convert lpc init code to DM PCI API

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>
8 years agox86: ivybridge: Drop the special PCI driver
Simon Glass [Sun, 17 Jan 2016 23:11:41 +0000 (16:11 -0700)]
x86: ivybridge: Drop the special PCI driver

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>
8 years agox86: ivybridge: Move LPC init into the LPC probe() method
Simon Glass [Sun, 17 Jan 2016 23:11:40 +0000 (16:11 -0700)]
x86: ivybridge: Move LPC init into the LPC probe() method

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>
8 years agox86: ivybridge: Move lpc_enable() into gma.c
Simon Glass [Sun, 17 Jan 2016 23:11:39 +0000 (16:11 -0700)]
x86: ivybridge: Move lpc_enable() into gma.c

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>
8 years agox86: ivybridge: Use driver model PCI API in sata.c
Simon Glass [Sun, 17 Jan 2016 23:11:38 +0000 (16:11 -0700)]
x86: ivybridge: Use driver model PCI API in sata.c

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>
8 years agox86: ivybridge: Use the SATA driver to do the init
Simon Glass [Sun, 17 Jan 2016 23:11:37 +0000 (16:11 -0700)]
x86: ivybridge: Use the SATA driver to do the init

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>
8 years agox86: ivybridge: Drop the unused bd82x6x_init_extra()
Simon Glass [Sun, 17 Jan 2016 23:11:36 +0000 (16:11 -0700)]
x86: ivybridge: Drop the unused bd82x6x_init_extra()

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>
8 years agox86: ivybridge: Do the SATA init before relocation
Simon Glass [Sun, 17 Jan 2016 23:11:35 +0000 (16:11 -0700)]
x86: ivybridge: Do the SATA init before relocation

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>
8 years agoahci: Add a disk-controller uclass
Simon Glass [Sun, 17 Jan 2016 23:11:34 +0000 (16:11 -0700)]
ahci: Add a disk-controller uclass

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>
8 years agox86: ivybridge: Drop unnecessary northbridge setup
Simon Glass [Sun, 17 Jan 2016 23:11:33 +0000 (16:11 -0700)]
x86: ivybridge: Drop unnecessary northbridge setup

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>
8 years agox86: ivybridge: Use driver model PCI API in bd82x6x.c
Simon Glass [Sun, 17 Jan 2016 23:11:32 +0000 (16:11 -0700)]
x86: ivybridge: Use driver model PCI API in bd82x6x.c

Adjust most of the remaining functions in this file to use the driver model
PCI API. The one remaining function is bridge_silicon_revision() which will
need a little more work.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: ivybridge: Move northbridge and PCH init into drivers
Simon Glass [Sun, 17 Jan 2016 23:11:31 +0000 (16:11 -0700)]
x86: ivybridge: Move northbridge and PCH init into drivers

Instead of calling the northbridge and PCH init from bd82x6x_init_extra()
when the PCI bus is probed, call it from the respective drivers. Also drop
the Northbridge init as it has no effect. The registers it touches appear to
be read-only.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: Bring up northbridge, pch and lpc after the CPUs
Simon Glass [Sun, 17 Jan 2016 23:11:30 +0000 (16:11 -0700)]
x86: Bring up northbridge, pch and lpc after the CPUs

These devices currently need to be inited early in boot. Once we have the
init in the right places (with each device doing its own init and no
problems with ordering) we should be able to remove this. For now it is
needed to keep things working.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: Don't show an error when the MRC cache is up to date
Simon Glass [Sun, 17 Jan 2016 23:11:29 +0000 (16:11 -0700)]
x86: Don't show an error when the MRC cache is up to date

When the final MRC cache record is the same as the one we want to write, we
skip writing since there is no point. This is normal behaviour.

Avoiding printing an error when this happens.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: Make x86_init_cpus() static
Simon Glass [Sun, 17 Jan 2016 23:11:28 +0000 (16:11 -0700)]
x86: Make x86_init_cpus() static

There are no other implementations of this function, and boards that need it
can implement a CPU driver.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: ivybridge: Move early init code into northbridge.c
Simon Glass [Sun, 17 Jan 2016 23:11:27 +0000 (16:11 -0700)]
x86: ivybridge: Move early init code into northbridge.c

This code is now part of the northbridge driver, so move it into the same
place.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: ivybridge: Drop the dead MTRR code
Simon Glass [Sun, 17 Jan 2016 23:11:26 +0000 (16:11 -0700)]
x86: ivybridge: Drop the dead MTRR code

This is not used and MTRRs are set up elsewhere now. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: ivybridge: Set up the thermal target correctly
Simon Glass [Sun, 17 Jan 2016 23:11:25 +0000 (16:11 -0700)]
x86: ivybridge: Set up the thermal target correctly

This uses a non-existent node at present. It should use the first CPU node.
The referenced property does not exist (the correct value is the default of
0), but this allows the follow-on init to complete.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: ivybridge: Move CPU init code into the driver
Simon Glass [Sun, 17 Jan 2016 23:11:24 +0000 (16:11 -0700)]
x86: ivybridge: Move CPU init code into the driver

Use the CPU driver's probe() method to perform the CPU init. This will happen
automatically when the first CPU is probed.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: ivybridge: Use common CPU init code
Simon Glass [Sun, 17 Jan 2016 23:11:23 +0000 (16:11 -0700)]
x86: ivybridge: Use common CPU init code

The existing ivybridge code predates the normal multi-core CPU init, and
it is not used. Remove it and add CPU nodes to the device tree so that all
four CPUs are set up. Also enable the 'cpu' command.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: ivybridge: Move GPIO init to the LPC init() method
Simon Glass [Sun, 17 Jan 2016 23:11:22 +0000 (16:11 -0700)]
x86: ivybridge: Move GPIO init to the LPC init() method

This init can happen in the driver also. Move it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: ivybridge: Move sandybridge init to the lpc probe() method
Simon Glass [Sun, 17 Jan 2016 23:11:21 +0000 (16:11 -0700)]
x86: ivybridge: Move sandybridge init to the lpc probe() method

The watchdog can be reset later when probing the LPC after relocation.
Move it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: ivybridge: Move graphics init much later
Simon Glass [Sun, 17 Jan 2016 23:11:20 +0000 (16:11 -0700)]
x86: ivybridge: Move graphics init much later

We don't need to init the graphics controller so early. Move it alongside
the other graphics setup, just before we run the ROM.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: ivybridge: Probe the LPC in CPU init
Simon Glass [Sun, 17 Jan 2016 23:11:19 +0000 (16:11 -0700)]
x86: ivybridge: Probe the LPC in CPU init

We can drop the explicit probe of the PCH since the LPC is a child device
and this will happen automatically.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: ivybridge: Rename lpc_init() to lpc_init_extra()
Simon Glass [Sun, 17 Jan 2016 23:11:18 +0000 (16:11 -0700)]
x86: ivybridge: Rename lpc_init() to lpc_init_extra()

In preparation for adding an init() method to the LPC uclass, rename this
existing function so that it will not conflict.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: ivybridge: Move LPC and PCH init into northbridge probe()
Simon Glass [Sun, 17 Jan 2016 23:11:17 +0000 (16:11 -0700)]
x86: ivybridge: Move LPC and PCH init into northbridge probe()

Move more code into the northbridge probe() function.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: ivybridge: Move northbridge init into the probe() method
Simon Glass [Sun, 17 Jan 2016 23:11:16 +0000 (16:11 -0700)]
x86: ivybridge: Move northbridge init into the probe() method

Now that we have a proper driver for the nortbridge, set it up in by probing
it, and move the early init code into the probe() method.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: ivybridge: Add a driver for the bd82x6x northbridge
Simon Glass [Sun, 17 Jan 2016 23:11:15 +0000 (16:11 -0700)]
x86: ivybridge: Add a driver for the bd82x6x northbridge

Add a driver with an empty probe function where we can move init code in
follow-on patches.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agodm: x86: Add a northbridge uclass
Simon Glass [Sun, 17 Jan 2016 23:11:14 +0000 (16:11 -0700)]
dm: x86: Add a northbridge uclass

Add a uclass for the northbridge / SDRAM controller found on some older
Intel chipsets.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: ivybridge: Rename bd82x6x_init()
Simon Glass [Sun, 17 Jan 2016 23:11:13 +0000 (16:11 -0700)]
x86: ivybridge: Rename bd82x6x_init()

Rename the existing bd82x6x_init() to bd82x6x_init_extra(). We will remove
this in a later patch.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: ivybridge: Move more init to the probe() function
Simon Glass [Sun, 17 Jan 2016 23:11:12 +0000 (16:11 -0700)]
x86: ivybridge: Move more init to the probe() function

Move SPI and port80 init to lpc_early_init(), called from the LPC's probe()
method.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: ivybridge: Move lpc_early_init() to probe()
Simon Glass [Sun, 17 Jan 2016 23:11:11 +0000 (16:11 -0700)]
x86: ivybridge: Move lpc_early_init() to probe()

Move this code to the LPC's probe() method so that it will happen
automatically when the LPC is probed before relocation.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agox86: ivybridge: Set up the LPC device using driver model
Simon Glass [Sun, 17 Jan 2016 23:11:10 +0000 (16:11 -0700)]
x86: ivybridge: Set up the LPC device using driver model

Find the LPC device in arch_cpu_init_dm() as a first step to converting
this code to use driver model. Probing the LPC will probe its parent (the
PCH) automatically, so make sure that probing the PCH does nothing before
relocation.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agodm: pci: Convert bios_emu to use the driver model PCI API
Simon Glass [Sun, 17 Jan 2016 23:11:09 +0000 (16:11 -0700)]
dm: pci: Convert bios_emu to use the driver model PCI API

At present this BIOS emulator uses a bus/device/function number. Change
it to use a device if CONFIG_DM_PCI is enabled.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agodm: syscon: Allow finding devices by driver data
Simon Glass [Sun, 17 Jan 2016 23:11:08 +0000 (16:11 -0700)]
dm: syscon: Allow finding devices by driver data

We have a way to find a regmap by its syscon driver data value. Add the same
for syscon itself.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agodm: usb: Add a compatible string for PCI EHCI controller
Simon Glass [Sun, 17 Jan 2016 23:11:07 +0000 (16:11 -0700)]
dm: usb: Add a compatible string for PCI EHCI controller

Add a compatible string to allow this to be specified in the device tree
if needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Marek Vasut <marex@denx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agodm: core: Display the error number when driver binding fails
Simon Glass [Sun, 17 Jan 2016 23:11:06 +0000 (16:11 -0700)]
dm: core: Display the error number when driver binding fails

This is often -96 (-EPFNOSUPPORT) which indicates that the uclass is not
compiled in. Display the error number to make this easier to spot.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
8 years agodm: x86: Drop the weak cpu_irq_init() function
Simon Glass [Wed, 20 Jan 2016 04:32:32 +0000 (21:32 -0700)]
dm: x86: Drop the weak cpu_irq_init() function

There are no callers now. Platforms which need to set up interrupts their
own way can implement an interrupt driver. Drop this function.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>