Commit Graph

196 Commits

Author SHA1 Message Date
Simon Glass
f1683aa73c board_f: Rename initdram() to dram_init()
This allows us to use the same DRAM init function on all archs. Add a
dummy function for arc, which does not use DRAM init here.

Signed-off-by: Simon Glass <sjg@chromium.org>
[trini: Dummy function on nios2]
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-04-13 09:40:57 -04:00
Simon Glass
088454cde2 board_f: Drop return value from initdram()
At present we cannot use this function as an init sequence call without a
wrapper, since it returns the RAM size. Adjust it to set the RAM size in
global_data instead, and return 0 on success.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2017-04-05 13:59:20 -04:00
Simon Glass
52c411805c board_f: Drop board_type parameter from initdram()
It looks like only cm5200 and tqm8xx use this feature, so we don't really
need it in generic code. Drop it and have the users access gd->board_type
directly.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2017-04-05 13:58:44 -04:00
Markus Niebel
468fb1e4df arm: imx6: tqma6: add support for TQMa6DL variant
This adds support for TQMa6DL using i.MX6DL and 1GiB DRAM
Since The module will use the same devicetree, we patch
the ram size in ft_board_setup.

Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
2017-03-17 09:27:08 +01:00
Markus Niebel
d4b349e41b arm: imx6: tqma6: use CONFIG_TQM6x for SOM specific settings
We have a Kconfig name for the module types. Let's Use it.
Some feature selections and configurations are based on the
module. Module selection selects the CPU type.

Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
2017-03-17 09:27:08 +01:00
Markus Niebel
4ba811760a mx6: tqma6: clear enet clk sel for mba6
we have external ref clock from phy.

Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
2017-03-17 09:27:08 +01:00
Markus Niebel
d5fa17e6fa imx6: tqma6: adjust ethernet phy reset delay
fix the reset delay which was to short

Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
2017-03-17 09:27:08 +01:00
Markus Niebel
e8548f820e imx6: tqma6: disable spi CS unused in U-Boot
Since the CS are not in use, do not map them. User of starterkit
mainboard is free to use them otherwise. When using these pins later
in the OS for instance as GPIO IRQ pin, they need to be input.

Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
2017-03-17 09:27:08 +01:00
Markus Niebel
03cfff0e48 imx6: tqma6: use lower driver stength for I2C pins
The current driver stength is too high, leading to spec violations
on the falling edge. Fix it with values from HW

Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
2017-03-17 09:27:08 +01:00
Markus Niebel
d7d8e8e413 imx6: tqma6: implement power_init_board
PMIC implements proper I2C bus switching,
implement power_init_board instead handling in
board_late_init.

Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
2017-03-17 09:27:08 +01:00
Simon Glass
0a6eac842e video: Move video_get_info_str() prototype to a header file
This should be defined in a header file so that arguments are checked.
Move it to video.h.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-10-23 18:33:54 -04:00
Masahiro Yamada
1221ce459d treewide: replace #include <asm/errno.h> with <linux/errno.h>
Now, arch/${ARCH}/include/asm/errno.h and include/linux/errno.h have
the same content.  (both just wrap <asm-generic/errno.h>)

Replace all include directives for <asm/errno.h> with <linux/errno.h>.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
[trini: Fixup include/clk.]
Signed-off-by: Tom Rini <trini@konsulko.com>
2016-09-23 17:55:42 -04:00
Vagrant Cascadian
eae4b2b67b Fix spelling of "occurred".
Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2016-05-02 18:37:09 -04:00
Bin Meng
a187559e3d Use correct spelling of "U-Boot"
Correct spelling of "U-Boot" shall be used in all written text
(documentation, comments in source files etc.).

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
2016-02-06 12:00:59 +01:00
Fabio Estevam
755a116e8e tqma6_wru4: Fix the reset delay for the the LAN8720 PHY
According to the LAN8720 datasheet tpurstd (time that reset line should
stay asserted) is 25ms.

So do as suggested by the LAN8720 datasheet.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
2016-02-02 21:20:55 +01:00
Bin Meng
4019e54dc6 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>
2016-01-25 10:40:00 -05:00
Simon Glass
24b852a7a2 Move console definitions into a new console.h file
The console includes a global variable and several functions that are only
used by a small subset of U-Boot files. Before adding more functions, move
the definitions into their own header file.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-11-19 20:27:50 -07:00
Tom Rini
7ff15aca1a powerpc: Finish updating u-boot*lds scripts for newer binutils
In 522b021 we dropped 'PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4)' lines in
the mpc85xx linker scripts as this is not required and breaks newer
binutils.  This commit cleans up the rest of the powerpc linker scripts.

Signed-off-by: Tom Rini <trini@konsulko.com>
2015-11-10 09:20:29 -05:00
Fabio Estevam
36f5a7f64d tqma6_mba6: Fix the error handling in board_eth_init()
We should not return 0 on failure, so return a negative error code
instead.

Also centralize the error path so that is easier to follow.

Cc: Markus Niebel <Markus.Niebel@tq-group.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2015-09-13 11:05:50 +02:00
Peng Fan
f20562e4c4 mx6: remove SYS_SOC from board Kconfig
Remove duplicated SYS_SOC Kconfig entry from board Kconfig,
because we have this entry in arch/arm/cpu/armv7/mx6/Kconfig.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Christian Gmeiner <christian.gmeiner@gmail.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Troy Kisky <troy.kisky@boundarydevices.com>
Cc: Nikita Kiryanov <nikita@compulab.co.il>
Cc: "Eric Bénard" <eric@eukrea.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Tim Harvey <tharvey@gateworks.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Markus Niebel <Markus.Niebel@tq-group.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Acked-by: Stefan Roese <sr@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Acked-by: Markus Niebel <Markus.Niebel@tq-group.com>
Acked-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
2015-09-13 10:37:29 +02:00
Stefan Roese
8b8ca0d7d8 arm: mx6: Remove SPI support from WRU-IV baseboard
This patch removes the SPI support from the WRU-IV baseboard as its
not used at all.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Clemens Gruber <clemens.gruber@pqgruber.com>
Cc: Markus Niebel <Markus.Niebel@tq-group.com>
Cc: Stefano Babic <sbabic@denx.de>
Tested-by: Clemens Gruber <clemens.gruber@pqgruber.com>
Reviewed-by: Jagan Teki <jteki@openedev.com>
2015-09-02 15:26:11 +02:00
Stefan Roese
452308c02b arm: mx6: tqma6: Add WRU-IV baseboard for the TQMa6 SoM
This patch adds support for the "OHB System AG" baseboard
with is equipped with the TQMa6S SoM.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Markus Niebel <Markus.Niebel@tq-group.com>
Cc: Stefano Babic <sbabic@denx.de>
2015-07-26 12:05:22 +02:00
Markus Niebel
fc6e442568 arm: imx6: tqma6: implement KConfig baseboard selection
this finally removes the need for extra settings in
defconfig

Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
2015-06-27 18:01:41 +02:00
Markus Niebel
55c0e49ab3 arm: imx6: tqma6: boot device selection via Kconfig
Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
2015-06-27 17:59:17 +02:00
Markus Niebel
30ed1257db arm: imx6: tqma6: implement IMX_CONFIG with Kconfig
Now that we have the Kconfig based CPU type selection,
use this to fill the IMX_CONFIG automatically

Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
2015-06-27 17:56:18 +02:00
Markus Niebel
51f6c4280f arm: mx6: tqma6: CPU type selection via Kconfig
This is the first patch to remove the
CONFIG_SYS_EXTRA_OPTIONS.

This patch implements CPU type selection from Kconfig.
Further Kconfig stuff is added later.

Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
2015-06-27 17:52:20 +02:00
Stefan Roese
34ee786e5b arm: mx6: tqma6: Update to optionally configure an alternative SPI setup
By making the tqma6_iomuxc_spi() weak, this patch adds the possibility to
add a different function for this SPI configuration. This can be used
by other baseboards, that might have a different SPI setup.

This patch will be used by the upcoming WRU-IV board support which also
uses the TQMa6 SoM.

Signed-off-by: Stefan Roese <sr@denx.de>
2015-05-15 19:20:47 +02:00
Masahiro Yamada
470ee8b125 powerpc: mpc5xxx: remove aev, TB5200 board support
They have not been converted to Generic Board, so should be removed.
(See doc/README.generic-board for details.)

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-03-17 11:00:03 -04:00
Masahiro Yamada
5d2a5ef712 mpc8xx: remove FPS{850, 860}L, NSCU, SM850, TK885D, virtlab2 support
These boards are still non-generic boards.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Wolfgang Denk <wd@denx.de>
2015-01-05 12:08:50 -05:00
Tom Rini
1fc4e6f486 Merge git://git.denx.de/u-boot-fdt 2014-11-26 11:21:14 -05:00
Simon Glass
e895a4b06f fdt: Allow ft_board_setup() to report failure
This function can fail if the device tree runs out of space. Rather than
silently booting with an incomplete device tree, allow the failure to be
detected.

Unfortunately this involves changing a lot of places in the code. I have
not changed behvaiour to return an error where one is not currently
returned, to avoid unexpected breakage.

Eventually it would be nice to allow boards to register functions to be
called to update the device tree. This would avoid all the many functions
to do this. However it's not clear yet if this should be done using driver
model or with a linker list. This work is left for later.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Anatolij Gustschin <agust@denx.de>
2014-11-21 04:43:15 +01:00
Markus Niebel
b6d7810e5c tqma6: use imx_ddr_size
Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
2014-11-20 10:30:21 +01:00
Markus Niebel
fd53ec5baf tqma6: add warning on failed setup_i2c
setup_i2c has a return value. Use it to give feedback
on error.

Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
2014-11-20 10:30:21 +01:00
Markus Niebel
8cc65d383e tqma6: add missing include
Add include needed to have prototype for board_spi_cs_gpio

Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
2014-11-20 10:30:21 +01:00
Tom Rini
625509ab0e Merge branch 'master' of git://www.denx.de/git/u-boot-imx 2014-11-05 12:48:09 -05:00
Markus Niebel
29fd5c289c tqma6: fix typo in header guard define
Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
2014-10-30 10:43:35 +01:00
Markus Niebel
1719d49c34 tqma6: fix sf detection
Commit 155fa9af95 changed the way
to define a GPIO line, which can be used to force CS high
across multiple transactions. In order to fix sf detection
change board code to make use of board_spi_cs_gpio(..).

Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
2014-10-30 10:43:12 +01:00
Georges Savoundararadj
2e07c249a6 kconfig: arm: introduce symbol for ARM CPUs
This commit introduces a Kconfig symbol for each ARM CPU:
CPU_ARM720T, CPU_ARM920T, CPU_ARM926EJS, CPU_ARM946ES, CPU_ARM1136,
CPU_ARM1176, CPU_V7, CPU_PXA, CPU_SA1100.
Also, it adds the CPU feature Kconfig symbol HAS_VBAR which is selected
for CPU_ARM1176 and CPU_V7.

For each target, the corresponding CPU is selected and the definition of
SYS_CPU in the corresponding Kconfig file is removed.

Also, it removes redundant "string" type in some Kconfig files.

Signed-off-by: Georges Savoundararadj <savoundg@gmail.com>
Acked-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-10-29 09:02:09 -04:00
Marek Vasut
f06f9a1fb1 ppc: Zap TQM8272 board
This board is old and is using CONFIG_I2C_X, which is wrong.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tom Rini <trini@ti.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Heiko Schocher <hs@denx.de>
2014-10-27 14:35:56 +01:00
Marek Vasut
ccc1950010 ppc: Zap TQM8260 board
This board is old and is using CONFIG_I2C_X, which is wrong.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tom Rini <trini@ti.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Heiko Schocher <hs@denx.de>
2014-10-27 14:35:56 +01:00
Masahiro Yamada
535aad29f2 MAINTAINERS: comment out blank M: field
Since commit ddaf5c8f30
(patman: RunPipe() should not pipe stdout/stderr unless asked),
Patman spits lots of "Invalid MAINTAINERS address: '-'"
error messages for patches with global changes.
It takes too long for Patman to process them.

Anyway, "M:    -" does not carry any important information.
Rather, it is just like a place holder in case of assigning
a new board maintainer.  Let's comment out.

This commit can be reproduced by the following command:

find . -name MAINTAINERS | xargs sed -i -e '/^M:[[:blank:]]*-$/s/^/#/'

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-09-24 18:30:28 -04:00
Masahiro Yamada
461be2f96e kconfig: remove redundant "string" type in arch and board Kconfigs
Now the types of CONFIG_SYS_{ARCH, CPU, SOC, VENDOR, BOARD, CONFIG_NAME}
are specified in arch/Kconfig.

We can delete the ones in arch and board Kconfig files.

This commit can be easily reproduced by the following command:

find . -name Kconfig -a ! -path ./arch/Kconfig | xargs sed -i -e '
/config[[:space:]]SYS_\(ARCH\|CPU\|SOC\|\VENDOR\|BOARD\|CONFIG_NAME\)/ {
    N
    s/\n[[:space:]]*string//
}
'

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-09-13 16:43:55 -04:00
Masahiro Yamada
a1263632bb mx6: tqma6: get board support back to Kconfig build system
The QS Systems TQMa6 board support was added by commit cb07d74e
and lost by commit e82abaeb.

Commit e82abaeb merged the IMX branch based on pre-Kconfig
and the mainline based on post-Kconfig, simply deleting
the boards.cfg file.  As a result, some boards added just before
the merge were lost.

This commit adds Kconfig, defconfig, MAINTAINERS for TQMa6 board
to work on the Kconfig infrastructure.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Markus Niebel <Markus.Niebel@tq-group.com>
Cc: Stefano Babic <sbabic@denx.de>
2014-08-31 12:01:04 -04:00
Tom Rini
5a1095a830 Merge branch 'master' of git://www.denx.de/git/u-boot-imx 2014-08-29 11:06:51 -04:00
Heiko Schocher
ff94bc40af mtd, ubi, ubifs: resync with Linux-3.14
resync ubi subsystem with linux:

commit 455c6fdbd219161bd09b1165f11699d6d73de11c
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date:   Sun Mar 30 20:40:15 2014 -0700

    Linux 3.14

A nice side effect of this, is we introduce UBI Fastmap support
to U-Boot.

Signed-off-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Tom Rini <trini@ti.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Sergey Lapin <slapin@ossfans.org>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Joerg Krause <jkrause@posteo.de>
2014-08-25 19:25:55 -04:00
Stefano Babic
e82abaeb7f Merge branch 'master' of git://git.denx.de/u-boot-arm
Conflicts:
	boards.cfg

Signed-off-by: Stefano Babic <sbabic@denx.de>
2014-08-11 10:21:03 +02:00
Fabio Estevam
676ac24e07 pmic: pmic_pfuze100: Use a shorter name for PMIC name
It is redundant to use 'PFUZE100_PMIC' as the PMIC name because we already
know it is a PMIC.

Call it simply 'PFUZE100' instead.

Cc: Tim Harvey <tharvey@gateworks.com>
Cc: Markus Niebel <Markus.Niebel@tq-group.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2014-08-08 10:29:41 +02:00
Masahiro Yamada
93d4334f7f Add board MAINTAINERS files
We have switched to Kconfig and the boards.cfg file is going to
be removed. We have to retrieve the board status and maintainers
information from it.

The MAINTAINERS format as in Linux Kernel would be nice
because we can crib the scripts/get_maintainer.pl script.

After some discussion, we chose to put a MAINTAINERS file under each
board directory, not the top-level one because we want to collect
relevant information for a board into a single place.

TODO:
Modify get_maintainer.pl to scan multiple MAINTAINERS files.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Suggested-by: Tom Rini <trini@ti.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-07-30 08:48:06 -04:00
Masahiro Yamada
dd84058d24 kconfig: add board Kconfig and defconfig files
This commit adds:
 - arch/${ARCH}/Kconfig
    provide a menu to select target boards
 - board/${VENDOR}/${BOARD}/Kconfig or board/${BOARD}/Kconfig
    set CONFIG macros to the appropriate values for each board
 - configs/${TARGET_BOARD}_defconfig
    default setting of each board

(This commit was automatically generated by a conversion script
based on boards.cfg)

In Linux Kernel, defconfig files are located under
arch/${ARCH}/configs/ directory.
It works in Linux Kernel since ARCH is always given from the
command line for cross compile.

But in U-Boot, ARCH is not given from the command line.
Which means we cannot know ARCH until the board configuration is done.
That is why all the "*_defconfig" files should be gathered into a
single directory ./configs/.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-07-30 08:48:01 -04:00
Markus Niebel
cb07d74e2e Add TQ Systems TQMa6 board support
This patch adds the changes to boards.cfg and the board directory
under board/tqc.

TQMa6 is a family of modules based on Freescale i.MX6. It consists of
TQMa6Q (i.MX6 Quad), TQMa6D (i.MX6 Dual) featuring eMMC, and 1 GiB DDR3
TQMa6S (i.MX6 Solo)  featuring eMMC and 512 MiB DDR3

The modules need a baseboard. Initially the MBa6x starterkit mainboard is
supported. To easy support for other mainboards the functionality is splitted
in one file for the module (tqma6.c) and one file for the baseboard (tqma6_
mba6).

The modules can be boot from eMMC (on USDHC3) and SPI flash.

The following features are supported:
- MMC: eMMC on module (on USDHC3) and SD-card (on MBa6x mainboard)
- Ethernet: RGMII using micrel KSZ9031 phy on MBa6x mainboard for TQMa6<x> module.
  The phy needs special configurations for the pad skew registers to adjust for
  the signal routing.
  Also support for standard ethernet commands and uppdate via tftp.
- SPI: ECSPI1 with bootable serial flash on module and two additional
  chip selects on MBa6x
- I2C: This patch adds support for the I2C busses on the TQMa6<x> modules (I2C3)
  and MBa6x baseboards (I2C1). The LM75 temperature sensors on TQMa6<x> and MBa6x
  are also configured.
- USB: high speed host 1 on MBa6x and support for USB storage
- PMIC: support for pfuze 100 on TQMa6<x>

Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
2014-07-23 12:31:42 +02:00