Commit Graph

10712 Commits

Author SHA1 Message Date
Peng Fan
aab203eb2e gpio: 74x164: make oe-pins optional
Make oe-pins optional because some boards have fixed it to enable.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Stefano Babic <sbabic@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-18 11:24:34 +02:00
Peng Fan
41eb8ff5ea spi: kconfig: add soft spi Kconfig entry
Add the Kconfig entry for SOFT_SPI which uses gpio to simulate the
SPI signals. We use it for accessing 74x164 on some i.MX boards.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Jagan Teki <jagan@openedev.com>
Cc: Stefano Babic <sbabic@denx.de>
2017-05-18 11:24:34 +02:00
Peng Fan
80512547ba thermal: imx: fix calculation
Fix calculation. do_div can not handle negative values.
Use div_s64_rem to handle the calculation.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
2017-05-18 11:23:31 +02:00
Peng Fan
4fac417168 imx: thermal: update imx6 thermal driver according new equation
>From IC guys:
"
After a thorough accuracy study of the Temp sense circuit,
we found that with our current equation, an average part can
read 7 degrees lower than a known forced temperature.
We also found out that the standard variance was around 2C;
which is the tightest distribution that we could create.
We need to change the temp sense equation to center the average
part around the target temperature.
"

New equation:
Tmeas = (Nmeas - n1) / slope + t1 + offset
n1= fused room count
t1= 25
offset=3.580661
slope= 0.4148468 – 0.0015423*n1

According the new equation, update the thermal driver.
c1 and c2 changed to u64 type and update comments.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
2017-05-18 11:23:31 +02:00
Andy Duan
979a58936b net: fec_mxc: specify the registered eth index by dev_id
Specify the registered eth index by dev_id.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
2017-05-18 11:23:31 +02:00
Andy Duan
f01e4e1e14 net: fec_mxc: avoid transfer dev_id -1 to get mac address from fuse
Avoid transfer parameter dev_id value with "-1" to .fec_get_hwaddr(),
it should transfer fec->dev_id to get mac address from fuse.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Stefano Babic <sbabic@denx.de>
2017-05-18 11:23:31 +02:00
Peng Fan
27255fe821 net: fec: do not access reserved register for i.MX6ULL
The MIB RAM and FIFO receive start register does not exist on
i.MX6ULL. Accessing these register will cause enet not work well or
cause system report fault.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
2017-05-18 11:23:31 +02:00
Bin Meng
770ee01742 x86: ich6_gpio: Add use-lvl-write-cache for I/O access mode
Add a device-tree property use-lvl-write-cache that will cause
writes to lvl to be cached instead of read from lvl before each
write. This is required on some platforms that have the register
implemented as dual read/write (such as Baytrail).

Prior to this fix the blue USB port on the Minnowboard Max was
unusable since USB_HOST_EN0 was set high then immediately set
low when USB_HOST_EN1 was written.

This also resolves the 'gpio clear | set' command warning like:
  "Warning: value of pin is still 0"

Signed-off-by: George McCollister <george.mccollister@gmail.com>
<rebased on latest origin/master, fixed all baytrail boards>
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-17 17:13:06 +08:00
Stefan Roese
4759dffe23 spi: ich: Configure SPI BIOS parameters for Linux upon U-Boot exit
This patch adds a remove function to the Intel ICH SPI driver, that will
be called upon U-Boot exit, directly before the OS (Linux) is started.
This function takes care of configuring the BIOS registers in the SPI
controller (similar to what a "standard" BIOS or coreboot does), so that
the Linux MTD device driver is able to correctly read/write to the SPI
NOR chip. Without this, the chip is not detected at all.

Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Jagan Teki <jteki@openedev.com>
2017-05-17 17:13:06 +08:00
Stefan Roese
426f99fa98 dm: core: Add DM_FLAG_OS_PREPARE flag
This new flag can be added to DM device drivers, which need to do some
final configuration before U-Boot exits and the OS (e.g. Linux) is
started. The remove functions of those drivers will get called at
this stage to do these last-stage configuration steps.

Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
2017-05-17 17:13:06 +08:00
Stefan Roese
e98856fcff serial: serial-uclass: Use force parameter in stdio_deregister_dev()
On my x86 platform I've noticed, that calling dm_uninit() or the new
function dm_remove_devices_flags() does not remove the desired device at
all. Debugging showed, that the serial uclass returns -EPERM in
serial_pre_remove(). This patch sets the force parameter when calling
stdio_deregister_dev() resulting in a removal of the device.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-17 17:13:06 +08:00
Simon Glass
ddb3ac3c71 x86: Convert MMC to driver model
Convert the pci_mmc driver over to driver model and migrate all x86 boards
that use it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
2017-05-17 17:13:06 +08:00
Bin Meng
68769ebcbc x86: pci: Allow conditionally run VGA rom in S3
Introduce a new CONFIG_S3_VGA_ROM_RUN option so that U-Boot can
bypass executing VGA roms in S3.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Stefan Roese <sr@denx.de>
2017-05-17 17:11:46 +08:00
Tom Rini
4125bbcef6 Merge branch 'master' of git://git.denx.de/u-boot-mmc
- Add #undef CONFIG_DM_MMC_OPS to omap3_logic in the SPL build case, to
  match other TI platforms in the same situation.

Signed-off-by: Tom Rini <trini@konsulko.com>
2017-05-16 08:10:50 -04:00
Tom Rini
d09ec7f816 Merge branch 'master' of git://git.denx.de/u-boot-video 2017-05-15 20:16:02 -04:00
Wenyou Yang
b3125088a3 mmc: atmel_sdhci: Enable the quirk SDHCI_QUIRK_WAIT_SEND_CMD
To fix the timeout of sending the write command, enable the quirk
SDHCI_QUIRK_WAIT_SEND_CMD.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-16 06:29:28 +09:00
Jernej Skrabec
c10806267d sunxi: video: Split out TVE code
Newer SoCs use same TV encoder unit. Split it out so it can be reused
with new DM video driver.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-15 21:22:24 +02:00
Philipp Tomsich
10ba6b3339 video: bmp: rename CONFIG_BMP_24BMP to CONFIG_BMP_24BPP
Due to a typo, the 24 bit-per-pixel configuration ends in 24BMP
instead of 24BPP. This change renames it throughout the source tree
for consistency and to make moving these options into Kconfig easier
and less error-prone.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
2017-05-15 20:55:13 +02:00
Philipp Tomsich
8517f64fe6 rockchip: video: introduce VIDEO_DW_HDMI and select for Rockchip HDMI
Instead of having drivers/video/rockchip/Kconfig point outside of its
hierarchy for dw_hdmi.o, we should use a configuration-option to
include the Designware HDMI support.

This change introduces a new config option (not to be selected via
menuconfig, but to be selected from a dependent video driver's
configuration option) that enables dw_hdmi.o and selects it whenever
the HDMI support for Rockchip SoCs is selected.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-15 20:42:56 +02:00
Jernej Skrabec
4f4e1b6365 video: dw_hdmi: Select HDMI mode only if monitor supports it
Some DVI monitors don't work in HDMI mode. Set it only if edid data
explicitly states that it is supported.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-15 20:38:24 +02:00
Tom Rini
cb33bda44f Merge branch 'master' of git://git.denx.de/u-boot-i2c 2017-05-15 13:01:26 -04:00
Adam Ford
df7fafd13f power: twl4030: Add imply CMD_POWEROFF when TWL4030 is enabled
Now that CMD_POWEROFF can turn off the twl4030, let's imply that
just incase someone wants to disable it.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2017-05-15 13:00:27 -04:00
Tom Rini
1d1ab61c32 Kconfig: OMAP: USB: Migrate CONFIG_USB_EHCI_OMAP to Kconfig
Follow the exiting logic for the i.MX options when migrating this
option.

Cc: Marek Vasut <marex@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Marek Vasut <marex@denx.de>
2017-05-15 13:00:26 -04:00
Tom Rini
80f1f3204a Kconfig: USB: Migrate existing USB_EHCI_xxx options
The following options are migrated over fully now:
- USB_EHCI_ATMEL
- USB_EHCI_MARVELL
- USB_EHCI_MX6
- USB_EHCI_MX7
- USB_EHCI_MSM
- USB_EHCI_ZYNQ
- USB_EHCI_GENERIC

This also requires fixing the depends on USB_EHCI_MARVELL as it's used
by Orion5X and Kirkwood as well.

Cc: Marek Vasut <marex@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Marek Vasut <marex@denx.de>
2017-05-15 13:00:26 -04:00
Tom Rini
64d6ac5bc4 Kconfig: USB: Migrate CONFIG_USB_EHCI_HCD users to Kconfig
Migrate the rest of the users of CONFIG_USB_EHCI_HCD over to Kconfig.
For a few SoCs, imply or default y this if USB is enabled.  In some
cases we had not already migrated to CONFIG_USB so do that as well.

Cc: Marek Vasut <marex@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Marek Vasut <marex@denx.de>
2017-05-15 13:00:21 -04:00
Tom Rini
8850c5d57c Kconfig: USB: Migrate CONFIG_USB_EHCI to CONFIG_USB_EHCI_HCD
In order to be able to migrate the various SoC EHCI CONFIG options we
first need to finish the switch from CONFIG_USB_EHCI to
CONFIG_USB_EHCI_HCD.

Cc: Marek Vasut <marex@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Marek Vasut <marex@denx.de>
2017-05-15 10:40:05 -04:00
Tom Rini
897f706200 watchdog: Migrate OMAP_WATCHDOG to Kconfig
Move this entry to Kconfig.  As it is a hardware watchdog, select
HW_WATCHDOG.  While we could default to enabling this for all platforms,
it is currently only enabled by default on AM33XX, so keep that logic
today.

Cc: Roger Meier <r.meier@siemens.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-05-15 10:40:02 -04:00
Tom Rini
25eaa28801 omap: spi: Drop CONFIG_OMAP3_SPI_D0_D1_SWAPPED support
This particular quirk is not enabled in any config files today.  It does
however exist and is handled correctly in device trees and via
CONFIG_DM_SPI.  So we drop the symbol now and add a comment to indicate
that any (new) boards that require this quirk need to enable DM_SPI
instead.

Signed-off-by: Tom Rini <trini@konsulko.com>
2017-05-15 10:40:01 -04:00
Tom Rini
29cb2b3b90 gpio: Move OMAP_GPIO to Kconfig
This driver is used often enough such that we want to have this enabled
by default on any ARCH_OMAP2PLUS board, and this only compiles on
ARCH_OMAP2PLUS due to required defines, so mark that as the depends.

Signed-off-by: Tom Rini <trini@konsulko.com>
2017-05-15 10:40:00 -04:00
Tom Rini
77777f769f omap4: Drop redundant CONFIG_OMAP4430 symbol
While there are a few different OMAP4 SoCs, today we always set
CONFIG_OMAP4430 and CONFIG_OMAP44XX.  Convert the few test of
CONFIG_OMAP4430 to CONFIG_OMAP44XX.

Cc: Marek Vasut <marex@denx.de>
Cc: Paul Kocialkowski <contact@paulk.fr>
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-05-15 10:39:59 -04:00
Tom Rini
864896be3b omap3: Drop CONFIG_OMAP3_EVM, switch to CONFIG_TARGET_OMAP3_EVM when needed
We make use of CONFIG_OMAP3_EVM today to know when to do a specific
tweak in MUSB.  This can be tested on via CONFIG_TARGET_OMAP3_EVM
instead, so switch there so we can drop the now unused symbol
CONFIG_OMAP3_EVM.  In investigating what to do about the symbol usage we
see that the cairo board defines the same function, but never called it
(as it does not define CONFIG_OMAP3_EVM) and was just returning anyhow,
so drop that function from that board.

Cc: "Albert ARIBAUD (3ADEV)" <albert.aribaud@3adev.fr>
Cc: Marek Vasut <marex@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-05-15 10:39:58 -04:00
Tom Rini
89024ddc9e TI: Drop 'CONFIG_OMAP'
In the two cases in the code where we use CONFIG_OMAP as a useful test
currently we can make use of CONFIG_ARCH_OMAP2PLUS instead.  With that
changed we can drop all defines of CONFIG_OMAP.  While in here,
CONFIG_OMAP3430 is only defined and then never used, so drop.

Signed-off-by: Tom Rini <trini@konsulko.com>
2017-05-15 10:39:56 -04:00
Tom Rini
8f339d2346 omap24xx_i2c.c: Drop references to CONFIG_OMAP243X
We have nothing defining CONFIG_OMAP243X since we dropped the omap243x
platforms, drop these tests.

Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Heiko Schocher <hs@denx.de>
2017-05-15 10:39:55 -04:00
Masahiro Yamada
792f0054a4 mmc: descend into drivers/mmc only when CONFIG_MMC is enabled
This simplifies makefiles.  Also, arrange the order of objects in
drivers/mmc/Makefile so that the framework objects are listed before
drivers.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-05-15 18:28:23 +09:00
Masahiro Yamada
4aa2ba3a34 mmc: replace CONFIG_GENERIC_MMC with CONFIG_MMC
Now CONFIG_GENERIC_MMC and CONFIG_MMC match for all defconfig.
We do not need two options for the same feature.  Deprecate the
former.

This commit was generated with the sed script 's/GENERIC_MMC/MMC/'
and manual fixup of drivers/mmc/Kconfig.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-05-15 18:28:23 +09:00
Masahiro Yamada
0cacd6b755 mmc: sdhci-cadence: import updates from Linux 4.12
This driver is a counterpart of drivers/mmc/host/sdhci-cadence.c
from Linux.  Some updates for v4.12-rc1 can be imported to U-Boot.

 - Fix value of SDHCI_CDNS_HRS04_RDATA_SHIFT
 - Add polling for ACK bit to be sure that data are written to
   the PHY register
 - Retrieve PHY values from DT properties instead of fixed data

The following is the list of upstream commits:

 - Linux commit 4e03f628b464e0580abadf5161eaa38c61d20943
   mmc: sdhci-cadence: fix bit shift of read data from PHY port

 - Linux commit a0f8243229ed071c8da0ea7cedc1b7bf1b1515da
   mmc: sdhci-cadence: Fix writing PHY delay

 - Linux commit a89c472d8b55c5afc4c79e6e3d1338730034eb01
   mmc: sdhci-cadence: Update PHY delay configuration

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-05-15 18:28:22 +09:00
Wenyou Yang
0e0dcc1916 mmc: sdhci: Fix maximum clock for programmable clock mode
In the programmable clock mode, the SDCLK frequency is incorrectly
assigned when the maximum clock has been assigned during probe,
this causes the SDHCI not work well.

In the programmable clock mode, when calculating the SDCLK Frequency
Select, when the maximum clock has been assigned, it is the actual
value, should not be multiplied by host->clk_mul. Otherwise, the
maximum clock is multiplied host->clk_mul by the base clock achieved
from the BASECLKF field of the Capabilities 0 Register.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
2017-05-15 18:28:22 +09:00
Jean-Jacques Hiblot
b5511d6cb8 drivers: omap_hsmmc: move to DM_MMC_OPS
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-15 18:28:21 +09:00
Simon Glass
b0103f33b4 i2c: Drop CONFIG_SYS_I2C_BOARD_LATE_INIT
This option is not used by any boards. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2017-05-15 06:18:51 +02:00
Simon Glass
754093eb40 i2c: mxc_i2c: Drop use of CONFIG_I2C_HARD
Drop use of this long-deprecated option.

Signed-off-by: Simon Glass <sjg@chromium.org>
2017-05-15 06:18:10 +02:00
Tom Rini
22f3368e71 Merge branch 'master' of git://git.denx.de/u-boot-mips 2017-05-13 16:45:35 -04:00
Tom Rini
758979101d gpio-uclass.c: Fix comparison of unsigned expression warning
We declare that gpio_base (which is the base for counting gpios, not an
address) is unsigned.  Therefore the comparison with >= 0 is always
true.  As the desire is to allow for this base number to be 0, we can
just drop this check.  Reported by clang-3.8.

Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-12 08:37:39 -04:00
Tom Rini
65a4771085 net: uli526x: Fix unknown storage size error
The variable netdev_ethtool_ops is not referenced, drop it.  However
with gcc-6 or later we fail to even compile as we do not have the
required struct definition in U-Boot.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-05-12 08:37:32 -04:00
Tom Rini
4201223de8 net: phy: mv88e61xx: Fix uninitialized variable warning
The variable 'res' may be unused uninitialized if our call to
mv88e61xx_port_read (register read) fails and we goto the error
handling section.  In this case we set 'res' to -EIO to indicate why we
failed.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Chris Packham <judge.packham@gmail.com>
Cc: Kevin Smith <kevin.smith@elecsyscorp.com>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-05-12 08:37:30 -04:00
Tom Rini
63c6f1ce3c net: eepro100: Fix unused variable warning
The variable i82557_config_cmd is never referenced, drop.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-05-12 08:37:30 -04:00
Tom Rini
9338d8e76b video: ld9040: Fix unused variable warnings
The variables SEQ_SWRESET, SEQ_ELVSS_ON, SEQ_TEMP_SWIRE, SEQ_APON and
SEQ_SLPIN are unreferenced, drop.

Cc: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-05-12 08:37:29 -04:00
xypron.glpk@gmx.de
c42640c748 pci: avoid memory leak
strdup uses malloc to allocate memory for str.
If we cannot bind to the generic driver we should release
the memory.

The problem was indicated by clang scan-build.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-05-12 08:37:18 -04:00
B, Ravi
66928afb6b common: dfu: ignore reset for spl-dfu
The SPL-DFU feature enable to load and
execute u-boot from RAM over usb from
PC using dfu-util.
Hence dfu-reset should not be issued
when dfu-util -R switch is issued.

Signed-off-by: Ravi Babu <ravibabu@ti.com>
2017-05-12 08:37:09 -04:00
Álvaro Fernández Rojas
b493a3564f dm: ram: remove unneeded brcm,bcm63268-mc id
brcm,bcm63268.dtsi uses brcm,bcm6328-mc instead of brcm,bcm63268-mc

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2017-05-12 13:20:03 +02:00
Lokesh Vutla
cbcb170164 dm: mmc: omap_hsmmc: Add pre-reloc flag to the driver
For platforms that don't use device tree in SPL the only
way to mark this driver as 'required by relocation' is
with the DM_FLAG_PRE_RELOC flag. Add this to ensure that
the driver is bound.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2017-05-11 22:21:28 -04:00