Commit Graph

43 Commits

Author SHA1 Message Date
Ashok Reddy Soma
702de89cc6 treewide: mem: Move mtest related defines to Kconfig
Move below defines which are used by mtest utility to Kconfig.
CONFIG_SYS_MEMTEST_START
CONFIG_SYS_MEMTEST_END

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
[trini: Fix kmcoge5ne board, re-run migration as well]
Signed-off-by: Tom Rini <trini@konsulko.com>
2020-05-08 12:02:56 -04:00
Simon Glass
807765b067 common: Move device-tree setup functions to fdt_support.h
These functions relate to setting up the device tree for booting the OS.
The fdt_support.h header file supports similar functions, so move these
there.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-17 13:27:27 -05:00
Holger Brunck
fd7c400962 km/boards: add MAC address offset as argument to ivm_populate_env
For upcoming SECU board we have different MAC address offsets depending
on which functional unit we are running. In this case we need to pass
this value to the ivm_populate_env function instead of using the hard
coded config option there.

Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com>
CC: Stefan Roese <sr@denx.de>
CC: Valentin Longchamp <valentin.longchamp@ch.abb.com>
CC: Marek Vasut <marex@denx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
2020-01-10 10:25:13 -05:00
Holger Brunck
aeda123a20 board/km: remove CONFIG_KM_BOARD_NAME
We can use the existing CONFIG_SYS_CONFIG_NAME define for that and
remove the option. Also fix the boot string for all km83xx boards.

Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
CC: Priyanka Jain <priyanka.jain@nxp.com>
CC: Valentin Longchamp <valentin.longchamp@ch.abb.com>
2019-12-23 14:06:47 +05:30
Simon Glass
5255932f01 common: Move some board functions out of common.h
A number of board function belong in init.h with the others. Move them.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-02 18:25:21 -05:00
Tom Rini
88c7a0a8c2 Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvell
- Various improvements to Keymile boards - mostly DT conversation
  (Pascal & Holger)
- Removal of now unsupported Keymile boards (Pascal & Holger)
- Small MVEBU PCI fix (Marek)
- Turris Omnia defconfig update (Marek)
- Misc Allied Telesis defconfig updates (Chris)
2019-08-12 23:03:44 -04:00
Holger Brunck
7b472733d8 powerpc/km: remove unmaintained target KMVECT1
Signed-off-by: Valentin Longchamp <valentin.longchamp@ch.abb.com>
Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2019-08-12 09:12:38 +02:00
Simon Glass
9fb625ce05 env: Move env_set() to env.h
Move env_set() over to the new header file.

Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
2019-08-11 16:43:41 -04:00
Mario Six
8a81bfd271 mpc83xx: Get rid of CONFIG_SYS_DDR_BASE
CONFIG_SYS_DDR_BASE is specific to mpc83xx an is always set to the same
value as CONFIG_SYS_SDRAM_BASE. Just use CONFIG_SYS_SDRAM_BASE instead.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
2019-05-21 07:52:33 +02:00
Mario Six
009c87a2ab keymile: Make distinct kmeter1, and kmcoge5ne configs
The kmeter1, and kmcoge5ne boards also build from the same config
file with #ifdef logic.

Create a separate include config for each board with the #ifdef logic
resolved as needed.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
2019-05-20 13:50:34 +02:00
Mario Six
61abced70f mpc83xx: Introduce ARCH_MPC836*
Replace CONFIG_MPC836* with proper CONFIG_ARCH_MPC836* Kconfig options.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
2019-05-20 13:50:34 +02:00
Mario Six
4bc97a3b81 mpc83xx: Introduce ARCH_MPC830*
Replace CONFIG_MPC830* with proper CONFIG_ARCH_MPC830* Kconfig options.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
2019-05-20 13:50:34 +02:00
Tom Rini
83d290c56f SPDX: Convert all of our single license tags to Linux Kernel style
When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from.  So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry.  Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents.  There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>
2018-05-07 09:34:12 -04:00
Masahiro Yamada
b08c8c4870 libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h>
Thomas reported U-Boot failed to build host tools if libfdt-devel
package is installed because tools include libfdt headers from
/usr/include/ instead of using internal ones.

This commit moves the header code:
  include/libfdt.h         -> include/linux/libfdt.h
  include/libfdt_env.h     -> include/linux/libfdt_env.h

and replaces include directives:
  #include <libfdt.h>      -> #include <linux/libfdt.h>
  #include <libfdt_env.h>  -> #include <linux/libfdt_env.h>

Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-03-05 10:16:28 -05:00
Simon Glass
382bee57f1 env: Rename setenv() to env_set()
We are now using an env_ prefix for environment functions. Rename setenv()
for consistency. Also add function comments in common.h.

Suggested-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-16 08:22:18 -04:00
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
Valentin Longchamp
89127c5346 km/powerpc: fix ft_board_setup prototype for km82xx & km83xx
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2015-11-18 15:28:58 -05:00
Holger Brunck
fc882a310d km/powerpc: remove unneeded defines
We use CONFIG_OF_LIBFDT and CONFIG_OF_BOARD_SETUP on all our powerpc
targets, so there is no need to check these defines within our C code.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2015-11-18 15:28:54 -05:00
Valentin Longchamp
60c4ae00be KM/IVM: remove ivm_read_eeprom(void)
This is not used anymore since the procedure was split into a simple
read function and a later alaysis.

The ivm_read_eeprom name is now used for the previous
ivm_simple_read_eeprom function.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2015-02-16 15:48:36 -05:00
Valentin Longchamp
f32b3d3fce 83xx/km83xx: read the IVM eeprom earlier
This allows to define the ethaddr env variable according to the the IVM
content by reading the IVM in misc_init_r.

Later, when HUSH is available the content read earlier is analyzed to
populate some non env variables.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2015-02-16 15:48:35 -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
Holger Brunck
a3b88121eb powerpc/83xx: remove staticness for qe_iop_conf_tab
commit a5510058 powerpc/83xx/km: make local functions and structs static

removed the staticness also from this struct. But this struct is needed
in arch/powerpc/cpu/mpc83xx/cpu_init.c and declared as extern.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
2013-10-09 10:07:56 -04:00
Tom Rini
3be2bdf5dc Merge branch 'next' of git://git.denx.de/u-boot-mpc83xx 2013-10-09 10:06:40 -04:00
Tom Rini
c2120fbfbc Merge branch 'master' of git://git.denx.de/u-boot-i2c
The sandburst-specific i2c drivers have been deleted, conflict was just
over the SPDX conversion.

Conflicts:
	board/sandburst/common/ppc440gx_i2c.c
	board/sandburst/common/ppc440gx_i2c.h

Signed-off-by: Tom Rini <trini@ti.com>
2013-07-24 09:50:24 -04:00
Wolfgang Denk
1a4596601f Add GPL-2.0+ SPDX-License-Identifier to source files
Signed-off-by: Wolfgang Denk <wd@denx.de>
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini <trini@ti.com>
2013-07-24 09:44:38 -04:00
Heiko Schocher
00f792e0df i2c, fsl_i2c: switch to new multibus/multiadapter support
- added to fsl_i2c driver new multibus/multiadpater support
- adapted all config files, which uses this driver

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Stephen Warren <swarren@wwwdotorg.org>
2013-07-23 08:34:53 +02:00
Holger Brunck
283857dac7 powerpc/83xx/km: make local functions and structs static
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2013-05-21 18:04:33 -05:00
Holger Brunck
1ca899c75c powerpc/83xx/km: MV88e6122 errata fix for 1.9V
Errata Fix: 1.9V Output from Internal 1.8V Regulator, acc.
MV-S300889-00D.pdf , clause 4.5

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2013-05-21 18:04:33 -05:00
Holger Brunck
411190cb16 powerpc/83xx/km: drop uneeded dtt_bus environment var
There is no need for a environment variable to configure the dtt bus.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
2013-02-15 17:47:21 -06:00
Karlheinz Jerg
5bcd64cf5c powerpc/83xx/km: add MV88E6122 switch support for kmvect1
kmvect1 has a UEC2 connection to the piggy board and a UEC0 connection
to the switch MV88E6122. This switch has a connection to a frontport
ethernet interface. The ethernet port used for network booting is
automatically selected by u-boot. If a Piggy is plugged, the Piggy
port is selected (UEC2, eth1). If the Piggy isn't present, the
Frontport is selected (UEC0, eth0).

The switch reset is connected to a GPIO on the PRIO3 board FPGA (GPIO28)
and released at startup.

Signed-off-by: Karlheinz Jerg <karlheinz.jerg@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
2013-02-15 17:47:20 -06:00
Karlheinz Jerg
1eb95ebe0d km82xx, km83xx: move ethernet_present() from common to cpu specific
For kmvect1 we need a special solution and for km_arm boards we already
have. So move the common code to the architectur specific file.

Signed-off-by: Karlheinz Jerg <karlheinz.jerg@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
2013-02-15 17:47:19 -06:00
Gerlando Falauto
6967840b83 km83xx: add common support for km8309 boards
Add support for Keymile boards based on mpc8309
(it would be only kmvect1 for now)

Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>
[#elseif -> #if to allow kmcoge5ne and kmeter1 to build successfully]
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2012-10-23 15:23:26 -05:00
Thomas Herzmann
13fff22291 powerpc/83xx/km: readout dip_switch on kmcoge5ne
On kmcoge5ne we have a dip switch present. If this switch
was switched on the actual_bank is set to 0 and this SW
will be booted.

Signed-off-by: Thomas Herzmann <thomas.herzmann@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2012-06-15 17:12:51 -05:00
Thomas Herzmann
95209b6684 powerpc/83xx: configure CONFIG_POST for kmcoge5ne
kmcoge5ne starts the post tests if the testpin on
the board was enabled. Currently it does simply a memory
test.

Signed-off-by: Thomas Herzmann <thomas.herzmann@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2012-06-15 17:12:51 -05:00
Stefan Bigler
5758dd7633 powerpc/83xx/km: added missing enable of application buffer
Enabled application buffers in uboot to allow application chipselect
access in uboot.

Signed-off-by: Stefan Bigler <stefan.bigler@keymile.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2012-06-15 17:12:40 -05:00
Holger Brunck
0f2b721c80 powerpc/83xx: add kmcoge5ne board support
This board is a MPC8360 board. Two flashes are present
a NOR flash were u-boot and the u-boot environment is stored
and a NAND flash for the application code. This board has 512MB
SDRAM.

Additionaly we introduce a common km8360.h file and convert kmeter1 to
use this.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Christian Herzig <christian.herzig@keymile.com>
cc: Kim Phillips <kim.phillips@freescale.com>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Gerlando Falauto <gerlando.falauto@keymile.com>
cc: Heiko Schocher <hs@denx.de>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2012-06-15 17:12:40 -05:00
Christian Herzig
43afc17f0c powerpc83xx/km: lock the window size to 2GiB befor fixing sdram size
If the ram size isn't locked to 2GiB, the get_ram_size() may hang up.

Signed-off-by: Christian Herzig <christian.herzig@keymile.com>
cc: Kim Phillips <kim.phillips@freescale.com>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Gerlando Falauto <gerlando.falauto@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2012-06-15 16:42:32 -05:00
Andreas Huber
55449a0dda powerpc/83xx: fix sdram initialization for keymile boards
commit b11f53f3 (keymile: Fix Coding style issues for keymile boards)
introduces a bug according the SDRAM initialization for all
km83xx boards.

im->ddr.sdram_cfg |= SDRAM_CFG_MEM_EN;
was replaced with
out_be32(&im->ddr.sdram_cfg, SDRAM_CFG_MEM_EN);
and this is wrong, because this overwrites the intial value
CONFIG_SYS_DDR_SDRAM_CFG.

Signed-off-by: Andreas Huber <andreas.huber@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Acked-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2011-11-11 16:41:04 -06:00
Heiko Schocher
f1fef1d8a1 keymile, common: add setting of some environment variables
This patch adds last_stage_init to all keymile boards. And
in the last stage init some environment variables for u-boot
were set. Currently these are pnvramaddr, pram and var address.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Wolfgang Denk <wd@denx.de>
cc: Kim Phillips <kim.phillips@freescale.com>
2011-04-30 00:45:22 +02:00
Heiko Schocher
8ed74341ba ppc, 8321: cleanup tuxa1, tuda1 and suvd3 support
For the kmsupx5 a new header file was introduced km8321-common.h.
Now the common stuff from tuxa1, tuda1 and suvd3 was removed and
the new header file included.

The defines CONFIG_SYS_PIGGY_BASE and CONFIG_SYS_PIGGY_SIZE are
confusing. Because they actually describe the KMBEC FPGA values.
The KMBEC FPGA can be PRIO on kmeter1 or upio on mgcoge. Therefore
all the defines were renamed.

remove unneeded variable CONFIG_KM_DEF_NETDEV, as it is
already declared in keymile-common.h

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
cc: Kim Phillips <kim.phillips@freescale.com>
cc: Wolfgang Denk <wd@denx.de>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
2011-04-30 00:45:07 +02:00
Heiko Schocher
62ddcf05e7 mpc832x: add support for the mpc8321 based suvd3 board
- serial console on UART1
- Ethernet RMII over UCC4
- PHY SMSC LAN8700
- 64MB Flash
- 128 MB DDR2 RAM
- I2C
- bootcount

This board is similiar to the kmeter1 (8360) board,
so common config options are extracted into the
include/configs/km83xx-common.h file.

Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
cc: Kim Phillips <kim.phillips@freescale.com>
cc: Holger Brunck <holger.brunck@keymile.com>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
2011-04-30 00:44:29 +02:00