Commit Graph

330 Commits

Author SHA1 Message Date
Holger Brunck
74edc607d6 powerpc/82xx: make set/get_pin for km82xx more flexible
The get_pin and set_pin funciton was only used for pins on Port D and
therefore the value was hard coded in the function. Enhance this with a
parameter, that we are able to use this functions for other ports too.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2015-11-18 15:28:52 -05:00
Christoph Dietrich
c1e121e4bd powerpc/83xx: add support for kmtepr2 board
This board is similar to TUXX1, but it has differend FPGAs.

Signed-off-by: Christoph Dietrich <christoph.dietrich@keymile.com>
Signed-off-by: Andreas Huber <andreas.huber@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2015-11-18 15:28:51 -05:00
Tobias Müller
ef3f2f08f7 km/scripts: search for kernel/DTBs at serverip:/PRODUCTNAME via TFTP in develop mode
Search for the kernel and DTBs in a folder named PRODUCTNAME (found in the IVM)
at the TFTP server instead of the u-boot boardname.

Signed-off-by: Tobias Müller <Tobias.Mueller@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
2015-11-18 15:28:51 -05:00
Holger Brunck
91b9db0be5 km/scripts: load fdt_bid_kwkey.dtb when working with tftp
When loading the dtb file via tftp we should load the one which matches
boardId and hwKey and not a common one for the boardname. We have boards
were different hwKeys are used and then we may load an incorrect dtb
file. If no fdt_bid_kwkey.dtb file is not a fallback to boardname.dtb is used.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Tobias Müller <Tobias.Mueller@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
2015-11-18 15:28:50 -05:00
Valentin Longchamp
30f9ad77c4 arm/km_kirkwood: fix the #ifdef for KM_COGE5UN dip switch
There was a small typo for KM_COGE5UN that resulted in the dip switch
not to behave as expected.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2015-11-18 15:28:49 -05:00
Holger Brunck
e23fde7d1f arm/mgcoge3un: check dip_switch at startup
Similar to kmcoge5un we need to check the dip switch at startup
connected to the kirkwood at MPP43. If it's set we need to set the
actual_bank to zero to boot from SW bank zero. Additional to kmcoge5un
we need to check also the pin in misc_init to decide wether we wait for
the ne to start or not. If the dip_switch is set we don't wait and
continue immediately.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2015-11-18 15:28:48 -05:00
Tobias Müller
9ff739e422 arm/km: Fix LED configuration for 88E1118R PHY (PIGGY3)
Configure PHY LED register for Marvell 88E1118R PHY used on PIGGY3 to
match with printed descriptions on PCB

Signed-off-by: Tobias Müller <Tobias.Mueller@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
[trini: Fix typo, CRTL_PAGE -> CTRL_PAGE]
Signed-off-by: Tom Rini <trini@konsulko.com>
2015-11-18 15:28:30 -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
2973b098ba 82xx/km82xx: 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
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
Valentin Longchamp
0fdb6eadff 85xx/kmp204x: 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
Valentin Longchamp
0bb95a68fc kirkwood/km_arm: 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
Valentin Longchamp
16ac90c7ee KM/IVM: split the IVM reading and parsing in 2 parts
This allows to first read the IVM content (earlier in the boot sequence)
and define the ethaddr env variable thanks to the ivm_read_eepromi().
Later, the IVM content can be parsed and used to define some hush
variables, when the hush subsystem is available thanks to
ivm_analyze_eeprom().

To avoid the HW read to happen twice, the buffer passed to
ivm_read_eeprom() has to be reused by ivm_analyze_eeprom (and thus
allocated before calling ivm_read_eeprom()).

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2015-02-16 15:48:34 -05:00
Holger Brunck
ab23b9a024 km/km82xx: remove CONFIG_SYS_RAMBOOT
This define is never set in our setup, so we can remove it safely. The
former code causes cppcheck to complain about:
[board/keymile/km82xx/km82xx.c:311]: (error) Uninitialized variable:
psize

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Wolfgang Denk <wd@denx.de>
Reviewed-by: York Sun <yorksun@freescale.com>
2014-12-05 08:06:10 -08: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
Wolfgang Denk
0060517ae0 cppcheck cleanup: fix nullPointer errors
There are a number of places where U-Boot intentionally and legally
accesses physical address 0x0000, for example when installing
exception vectors on systems where these are located in low memory.

Add "cppcheck-suppress nullPointer" comments to silence cppcheck
where this is intentional and legal.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2014-11-07 16:27:07 -05:00
Stefan Roese
96c5f0816a arm: kirkwood: Change naming of dram functions from km_foo() to mvebu_foo()
Additionally the SDRAM address decoding register address is not hard coded
in the C code any more. A define is introduced for this base address.

This makes is possible to use those gpio functions from other MVEBU SoC's
as well.

Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: Luka Perkov <luka@openwrt.org>
Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
2014-10-23 09:59:21 -04:00
Stefan Roese
d5c5132f87 arm: marvell: Extract kirkwood gpio functions into new common file gpio.c
This makes is possible to use those gpio functions from other MVEBU SoC's as well.

Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: Luka Perkov <luka@openwrt.org>
Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
2014-10-23 09:59:21 -04:00
Stefan Roese
3dc23f7852 arm: marvell: Move arch/kirkwood.h to arch/soc.h
This move makes is possible to use this header not only from kirkwood
platforms but from all Marvell mvebu platforms.

Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: Luka Perkov <luka@openwrt.org>
Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
2014-10-23 09:59:20 -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
47539e2317 kirkwood: kconfig: refactor Kconfig and defconfig
Becuase the board select menu in arch/arm/Kconfig is too big,
move the KirkWood board select menu to kirkwood/Kconfig.

Consolidate also common settings (CONFIG_SYS_CPU="arm926ejs" and
CONFIG_SYS_SOC="kirkwood").

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Prafulla Wadasdkar <prafulla@marvell.com>
Cc: Luka Perkov <luka@openwrt.org>
2014-08-30 21:21:21 -04:00
Valentin Longchamp
f38391793f kmp204x: reset the Zarlink clocking chips at power up only
There is the requirement on the chassis's backplane that when the clocks
have been enabled, they then should not disappear.

Resetting the Zarlink clocking chips at unit reset violates this
requirement because the backplane clocks are not supplied during the
reset time.

To avoid this side effect, both the Zarlink clocking chips are reset
only at power up.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2014-08-20 10:44:42 -07:00
Tom Rini
dcdb61a084 Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx 2014-08-06 08:38:18 -04:00
Boschung, Rainer
e3917b21c0 kmp204x: prepare to use CPU watchdog
This patch configures the qrio to trigger a core reset on
a CPU reset request.

Signed-off-by: Rainer Boschung <rainer.boschung@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2014-08-01 14:18:59 -07:00
Boschung, Rainer
6caa185abd kmp204x/qrio: support for setting the CPU reset request mode
To acheive this, the qrio_uprstreq() function that sets the UPRSTREQN
flag in the qrio RESCNF reg is added.

Signed-off-by: Rainer Boschung <rainer.boschung@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2014-08-01 14:18:53 -07:00
Boschung, Rainer
a09f470d49 kmp204x: set CPU watchdog reset reason flag
Check the core timer status register (TSR) for watchdog reset,
and and set the QRIO's reset reason flag REASON1[0] accordingly.

This allows the appliction SW to identify the cpu watchdog as a
reset reason, by setting the REASON1[0] flag in the QRIO.

Signed-off-by: Rainer Boschung <rainer.boschung@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2014-08-01 14:18:46 -07:00
Boschung, Rainer
807d93d6de kmp204x/qrio: prepare support for the CPU watchdog reset reason
To achieve this, the qrio_cpuwd_flag() function that sets the CPU watchdog
flag in the REASON1 reg is added.

Signed-off-by: Rainer Boschung <rainer.boschung@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2014-08-01 14:18:40 -07: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
Jeroen Hofstee
2716077cda board:keymile: remove unnecessary double braces
Clang interpretes an if condition like  "if ((a = b) == NULL)
as it tries to assign a value in a statement. Hence if you do
"if ((something)) it warns you that you might be confused.
Hence drop the double braces for plane if statements.

cc: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2014-06-11 16:27:06 -04:00
Simon Glass
eca86fad3d Rename hush to cli_hush
Hush is a command-line interpreter, so rename it to make that clearer.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-05-29 17:45:31 -04:00
Valentin Longchamp
2846c43e2d kmp204x: add workaround for A-004849
This should prevent the problems that the CCF can deadlock with certain
traffic patterns.

This also fixes the workaround for A-006559 that was not correctly
implemented before.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2014-05-13 08:26:55 -07:00
Valentin Longchamp
e20c822d0e kmp204x: update the RCW
Fix the IRQ/GPIO settings: all the muxed GPIO/external IRQs that are
used as internal interrupts are defined as GPIOs to avoid confusion
between the internal/external interrupts.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2014-05-13 08:26:55 -07:00
Valentin Longchamp
af47faf650 kmp204x: complete the reset sequence and PRST configuration
This adds the reset support for the following devices that was until
then not implemented:
- BFTIC4
- QSFPs

This also fixes the configuration of the prst behaviour for the other
resets: Only the u-boot and kernel relevant subsystems are taken out of
reset (pcie, ZL30158, and front eth phy).

Most of the prst config move to misc_init_f(), except for the PCIe
related ones that are in pci_init_board and the bftic and ZL30158 ones
that should be done as soon as possible.

Only the behavior of the Hooper reset is changed according to the
documentation as the application is not able to not configure the switch
when it is not reset.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2014-05-13 08:26:55 -07:00
Valentin Longchamp
18794944c6 kmp204x: selftest/factory test pin support
This patch defines the post_hotkeys_pressed() function that is used for:
- triggering POST memory regions test
- starting the test application through the checktestboot command in
  a script by setting the active bank to testbank

The post_hotkeys_pressed return the state of the SELFTEST pin.

The patch moves from the complete POST-memory test that is too long in
its SLOW version for our production HW test procedure to the much shorter
POST-memory-regions test.

Finally, the unused #defines for the not so relevant mtest command are
removed.

Signed-off-by: Stefan Bigler <stefan.bigler@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2014-05-13 08:26:55 -07:00
Stefan Bigler
4921a149e1 kmp204x: handle dip-switch for factory settings
Add readout of dip-switch to revert to factory settings.
If one or more dip-switch are set, launch bank 0 that contains the
bootloader to do the required action.

Signed-off-by: Stefan Bigler <stefan.bigler@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2014-05-13 08:26:54 -07:00
Stefan Bigler
a53e65d053 kmp204x: Add support for the unit LEDs
The unit LEDs are managed by the QRIO CPLD. This patch adds support for
accessing these LEDs in the QRIO.

The LEDs then are set to a correct boot state:
- UNIT-LED is red
- BOOT-LED is on.

Signed-off-by: Stefan Bigler <stefan.bigler@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2014-05-13 08:26:54 -07:00
Tom Rini
c4d376fd1c Merge branch 'master' of git://git.denx.de/u-boot-arm 2014-02-17 14:22:02 -05:00
Gerlando Falauto
9c134e189a arm/km: introduce kmsugp1 target
KMSUGP1 is from a u-boot perspective (almost) identical to KMNUSA.
The only difference is that the PCIe reset is connected to Kirkwood pin
MPP7_PEX_RST_OUTn, we use a dedicated config flag KM_PCIE_RESET_MPP7.
Such pin should theoretically be handled by the PCIe subsystem
automatically, but this turned out not to be the case.
So simply configure this PIN as a GPIO and issue a pulse manually.

Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>
Cc: Karlheinz Jerg <karlheinz.jerg@keymile.com>
Cc: Valentin Longchamp <valenting.longchamp@keymile.com>
Cc: Holger Brunck <holger.brunck@keymile.com>
Acked-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2014-02-13 17:45:36 +01:00
Gerlando Falauto
b1c2a7ae32 arm/km: define fdt_high env variable and allow backwards compatibility
Add set_fdthigh subcommand to "subbootcmds" (release) so to set "fdt_high"
This is necessary on Kirkwood so that the FDT does not get relocated
above the memory limit that the kernel cannot access
(that is the memory part reserved for the switch).
This was tested on NUSA1, where it is necessary, and on ETER1, where it
doesn't seem to hurt.

We want the scripts to also work with older versions of u-boot, where:
a) set_fdthigh is not defined (will be default env for newer u-boots)
b) the fdt will not be available

For this reason, we use "set_fdthigh" to tell whether we are running
a newer (FDT-aware) u-boot or not.
So if "set_fdthigh" runs successfully or arch != arm we try loading
the fdt; otherwise we proceed normally.

Notice how, contrary to release mode, set_fdthigh will _not_ be part of
subbootcmds for develop and ramfs, but will be executed as part of
"tftpfdt".

Since this is only needed for kirkwood cards, and it prevents the kernel
from booting on QorIQ (though it seemed to work on ETER1), we change
its definition in the default env for powerpc so that the value is only
set on ARM.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Acked-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2014-02-13 16:18:13 +01:00
Gerlando Falauto
7b2268b88f arm/km: enable FDT for km_kirwkood
This consists of:
a) Defining the addresses, enabling fdtsupport [arm]
b) Defining "cramfsloadfdt"  [arm,powerpc => common]
c) Adding the FDT address to bootm [arm,powerpc => common]
d) Defining "tftpfdt" in ramfs-,develop- [arm,powerpc >= common]

This should work with 3.10 kernels, whether loaded through TFTP
(with rootfs either through NFS or TFTP-ramfs) or from the NAND.

The machid was left unchanged, this should keep compatibility with both
older and newer kernels.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Acked-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2014-02-13 16:17:54 +01:00
Holger Brunck
fa6e0ecb8a arm/km: fix wrong error handling
miiphy_read and miiphy_write are returning 0 on success.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Acked-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2014-02-13 16:17:39 +01:00
Holger Brunck
aef0bdc0c0 arm/km: make local function startup_allowed static
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Acked-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2014-02-13 16:16:35 +01:00
Holger Brunck
bbfd509da6 arm/km: drop unneeded define
CONFIG_BOOTCOUNT_LIMIT is used on all boards from this board series. So
remove this unneeded define.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Acked-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2014-02-13 16:15:32 +01:00
Valentin Longchamp
27c78e06f2 kmp204x: initial support for PCIe FPGA configuration
The PEXHC PCIe configuration mechanism ensures that the FPGA get
configured at power-up. Since all the PCIe devices should be configured
when the kernel start, u-boot has to take care that the FPGA gets
configured also in other reset scenarios, mostly because of possible
configuration change.

The used mechanism is taken from the km_kirkwood design and adapted to
the kmp204x case (slightly different HW and PCIe configuration).

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2014-02-03 08:38:51 -08:00
Valentin Longchamp
1f07a71b96 kmp204x: update I2C field of RCW
On the previous HW revision (now unsupported), there was a need for
external DMA signals and thus the I2C3/4 signals were used
DMA1_DONE/ACK/REQ.

These signals now are configured as GPIO[16:19].

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2014-02-03 08:38:50 -08:00
Valentin Longchamp
fabb9297fa kmp204x: implement workaround for A-006559
According to the errata, some bits of an undocumented register in the
DCSR must be set for every core in order to avoid a possible data or
instruction corruption.

This is required for the 2.0 revision of the P2041 that should be used
as soon as available in our design.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2014-02-03 08:38:50 -08:00
Rainer Boschung
f3e74d0a9f kmp204x: I2C deblocking support
This patch adds support for using some GPIOs that are connected to the
I2C bus to force the bus lines state and perform some bus deblocking
sequences.

The KM common deblocking algorithm from board/keymile/common/common.c is
used. The GPIO lines used for deblocking the I2C bus are some external
GPIOs provided by the QRIO CPLD:
  - SCL = GPIOA_20
  - SDA = GPIOA_21

The QRIO GPIOs act in an open-drain-like manner, for 0 the line is
driven low and for 1 the GPIO is set as input and the line gets
pulled-up.

Signed-off-by: Rainer Boschung <rainer.boschung@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2014-02-03 08:38:50 -08:00
Valentin Longchamp
87ea2c0ff3 kmp204x: introduce QRIO GPIO functions
The QRIO GPIO functions can be of general interest. They are thus added
to a qrio.c and their prototype are available from kmp204x.h. The QRIO
prst function are also included in this file, as well as the functions
required for the I2C deblocking support (open-drain).

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
[York Sun: Remove extra blank line in board/keymile/kmp204x/qrio.c]
Signed-off-by: York Sun <yorksun@freescale.com>
2014-02-03 08:38:49 -08:00
Rainer Boschung
dd21f09669 kmp204x: support for QRIO1 bootcounter
Make use of the QRIO1 32bit register at 0x20 as bootcounter register
Check for BOOTCOUNT_MAGIC pattern when before bootcounter value is read

Signed-off-by: Rainer Boschung <rainer.boschung@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
[York Sun: Minor change to commit message]
Signed-off-by: York Sun <yorksun@freescale.com>
2014-02-03 08:38:49 -08:00
York Sun
5614e71b49 Driver/DDR: Moving Freescale DDR driver to a common driver
Freescale DDR driver has been used for mpc83xx, mpc85xx, mpc86xx SoCs.
The similar DDR controllers will be used for ARM-based SoCs.

Signed-off-by: York Sun <yorksun@freescale.com>
2013-11-25 11:43:43 -08:00
Masahiro Yamada
e5c5301f14 Makefile: make directories by Makefile.build
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2013-11-17 14:11:31 -05:00
Masahiro Yamada
1b2226e0ce Makefile: specifiy an explicite object name rather than $(BOARD).o
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2013-11-17 14:11:30 -05:00
Tom Rini
ae12c751e5 board/keymile/kmp204x/Makefile: Convert to SPDX tag
Signed-off-by: Tom Rini <trini@ti.com>
2013-11-01 11:42:13 -04:00
Tom Rini
8cbbb1098d board: powerpc: convert more makefiles to Kbuild style
Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Kim Phillips <kim.phillips@freescale.com>
Cc: York Sun <yorksun@freescale.com>
Signed-off-by: Tom Rini <trini@ti.com>
2013-11-01 11:42:13 -04:00
Masahiro Yamada
377e1048d3 board: powerpc: convert makefiles to Kbuild style
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Kim Phillips <kim.phillips@freescale.com>
Cc: York Sun <yorksun@freescale.com>
Cc: Stefan Roese <sr@denx.de>
2013-11-01 11:42:12 -04:00
Masahiro Yamada
a79854a90f board: arm: convert makefiles to Kbuild style
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Cc: Andreas Bießmann <andreas.devel@googlemail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Vipin Kumar <vipin.kumar@st.com>
Cc: Tom Warren <twarren@nvidia.com>
Cc: Tom Rini <trini@ti.com>
2013-11-01 11:42:12 -04:00
Valentin Longchamp
877bfe37dc mpc85xx: introduce the kmp204x reference design support
This patch introduces the support for Keymile's kmp204x reference
design. This design is based on Freescale's P2040/P2041 SoC.

The peripherals used by this design are:
- DDR3 RAM with SPD support
- SPI NOR Flash as boot medium
- NAND Flash
- 2 PCIe busses (hosts 1 and 3)
- 3 FMAN Ethernet devices (FMAN1 DTSEC1/2/5)
- 3 Local Bus windows, with one dedicated to the QRIO reset/power mgmt
  FPGA
- 2 HW I2C busses
- last but not least, the mandatory serial port

The board/keymile/kmp204x code is mostly based on Freescale's P2041rdb
support and was changed according to our design (that means essentially
removing what is not present on the designs and a few adaptations).

There is currently only one prototype board that is based on this design
and this patch also introduces it. The board is called kmlion1.

Signed-off-by: Stefan Bigler <stefan.bigler@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>

kmp204x: update the ENV #define

The comments had to be refined as well as the total size

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
[York Sun: fix ddr.c]
Acked-by: York Sun <yorksun@freescale.com>
2013-10-24 09:36:26 -07:00
Valentin Longchamp
99f6249a0e KM: add CONFIG_KM_COMMON_ETH_INIT for km common eth init
This must be defined by a board support file that want to use the
keymile common.c board_eth_init function that requires ethernet_present
to be defined.

Currently all the km architectures use it but the kmp204x architecture
later supported in this series does use another board_eth_init function
and thus does not define it.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2013-10-24 09:35:40 -07:00
Valentin Longchamp
0a4f88b98c KM: define CONFIG_SYS_I2C_INIT_BOARD only for concerned board
This must be defined for all the keymile boards that use the common
i2c_abort function that is used to "reset" the I2C bus. These are
currently km82xx and km_arm boards.

The  km83xx boards use other functions and thus do not need this.

This patch removes the CONFIG_SYS_I2C_INIT_BOARD from keymile-common.h
and defines it for km_arm.h and km82xx.h.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2013-10-24 09:35:33 -07:00
Wolfgang Denk
3765b3e7bd Coding Style cleanup: remove trailing white space
Signed-off-by: Wolfgang Denk <wd@denx.de>
2013-10-14 16:06:53 -04:00
Andreas Huber
d3379e2254 km/scripts: fix ramfs
'actual_bank' is not used anymore, instead boot_bank is used.

Signed-off-by: Andreas Huber <andreas.huber@keymile.com>
2013-10-09 10:07:56 -04: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
f3e9361771 i2c, multibus, keymile: get rid of EEprom_ivm envvariable
as the keymile boards use now the new i2c multibus/multiadapter
framework, remove the EEprom_ivm Environmentvar, as not longer
needed.

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Holger Brunck <holger.brunck@keymile.com>
Tested-By: Holger Brunck <holger.brunck@keymile.com>
2013-07-23 08:34:54 +02: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
Heiko Schocher
ea818dbbcd i2c, soft-i2c: switch to new multibus/multiadapter support
- added to soft_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 05:54:29 +02:00
Holger Brunck
74ae612fd8 arm/km: make local functions static
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
2013-06-10 17:25:41 +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
Anatolij Gustschin
b1e6c4c3d4 Fix references to the documentation files
Many boot image configuration files refer to the
appropriate documentation file, but these references
contain typos in the directory and file name. Fix
them. Also fix reference to doc/README.SPL file.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
Cc: Stefano Babic <sbabic@denx.de>
Acked-by: Stefano Babic <sbabic@denx.de>
2013-05-10 08:16:33 -04:00
Holger Brunck
8327122b0d powerpc/82xx/km: removed unneeded ifdef
All boards from this serie uses i2c. So we can drop these unneeded
defines.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
2013-03-09 16:05:00 +01:00
Holger Brunck
47ce50e8d2 powerpc/82xx/km: make handle_mgcoge3un_reset static
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
2013-03-09 16:04:28 +01: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
Andreas Huber
d42a3b7498 km/scripts: replace hardcoded uImage
Replace uImage with ${uimage}.
If uimage is not set, default it to uImage.

Signed-off-by: Andreas Huber <andreas.huber@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
2013-02-15 17:47:20 -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
Holger Brunck
322bb2056b km/common/ivm: rework piggy mac adress offset generation
For the the kmvect1 board we will also need a functionality to add an
offset to the IVMs MAC address, because these board will have two valid
ethernet ports for debugging purpose. So move the code to an own
function.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
2013-02-15 17:47:19 -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
Holger Brunck
cf976ce478 km/common/ivm: remove CONFIG_SYS_I2C_IVM_BUS related code
This define isn't set within our setup files. So we can safely remove
the affected code.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
2013-02-15 17:47:19 -06:00
Holger Brunck
811c8cad71 km/common/ivm: remove obsolete code
EEprom_ivm_addr isn't set in our environment, so remove the usage of
this.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
2013-02-15 17:47:19 -06:00
Holger Brunck
a5a614c129 km/common: remove unneeded ifdefs for I2C
All boards from this serie use i2c. There is no need to #ifdef the
header.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
2013-02-15 17:47:19 -06:00
Albert ARIBAUD
9d86f0c30b kirkwood: make MPP arrays static const
This saves stack and code memory for local copy, and
consumes initialized data memory. For 22 of the 29
kirkwood-based boards, this results in a global saving
of about 30 bytes. For 7 of them, it results in an
increase of 6 to 14 bytes.

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
2013-01-09 04:12:10 +05:30
Valentin Longchamp
136846d77f arm/km: remove duplicate code
This patch removes 2 small portions of board specific code that are
duplicated with common ARM code and thus unnecessary. These 2 portions
of code concern the mach id that is given by u-boot to the Linux kernel
to identify the system's MACH.

The first one was the possibility to change the MACH thanks to the
'mach_id' enviroment variable. This is possible thanks to the 'machid'
env variable (see arch/arm/lib/bootm.c:boot_jump_linux()).

The seconde one is the setting of the bi_arch_number. This is already
done in arch/arm/lib/board.c:board_init_f() since km_arm.h does #define
CONFIG_MACH_TYPE.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Holger Brunck <holger.brunck@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
Acked-by: Prafulla Wadaskar <Prafulla@marvell.com>
2013-01-09 04:12:10 +05:30
Holger Brunck
37bead1a70 km/common: cosmetic change reported from checkpatch
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
Acked-by: Prafulla Wadaskar <Prafulla@marvell.com>
2013-01-09 04:12:10 +05:30
Holger Brunck
2472216cac arm/km: fix memory settings
On kmcoge5un we faced some serious problems with the memory during
temperature tests. Reason was that we overwrite some registers for
memory settings which have to leave untouched. These where registers
0x20148 , 0x2014c and 0x20154.
So writing these registers is prohibited and this patch removes them
from all km related config files. Even if the problem was only
seen on kmcoge5un.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
2013-01-09 04:12:10 +05:30
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
Valentin Longchamp
52638c4147 arm/km: add mv88e6352 configuration for kmnusa
The kmnusa board uses a mv88e6352 switch that is connected to the main
eth interface of the kirkwood. Therefore the switch must be configured
so that the kirkwood's egiga eth inferface can be used.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Cc: Holger Brunck <holger.brunck@keymile.com>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
Acked-By: Prafulla Wadaskar <prafulla@marvell.com>
2012-10-03 16:43:13 +05:30
Holger Brunck
3a5b9fe649 arm/km: use kw_sdram_size_adjust to adjust SDRAM size
Some boards may differ only in the SDRAM size. This function allows to
fix the size accordingly and we can use the same u-boot binary for both
boards.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
2012-10-03 16:43:13 +05:30
Holger Brunck
fcca7e7acc arm/km: remove unused code
For some reasons we had an own implementaion of dram_init and
dram_init_banksize. This is not needed anymore, use the standard
kirkwood functions instead.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Gerlando Falauto <gerlando.falauto@keymile.com>
Acked-By: Prafulla Wadaskar <prafulla@marvell.com>
2012-09-03 17:38:54 +05:30
Valentin Longchamp
62c9b9603e km/ivm: fix string len check to support 7 char board names
The fanless boards now have a 7-digit (XXXXX-F) board name. This
triggers a border condition when reading this string in the IVM although
this string is smaller than the currenly read string size, but only by 1
character.

This patch corrects this by changing the size check condition for string
length. It is the same change that was done in the platform for this
same bug.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Holger Brunck <holger.brunck@keymile.com>
cc: Stefan Bigler <stefan.bigler@keymile.com>
2012-09-03 17:32:58 +05:30
Stefan Roese
0044c42e94 Consolidate bootcount code into drivers/bootcount
This patch moves all bootcount implementations into a common
directory: drivers/bootcount. The generic bootcount driver
is now usable not only by powerpc platforms, but others as well.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Valentin Longchamp <valentin.longchamp@keymile.com>
Cc: Christian Riesch <christian.riesch@omicron.at>
Cc: Manfred Rudigier <manfred.rudigier@omicron.at>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Reinhard Meyer <reinhard.meyer@emk-elektronik.de>
Tested-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Tested-by: Christian Riesch <christian.riesch@omicron.at>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2012-09-01 14:26:02 +02:00
Gerlando Falauto
3a532346fc powerpc/82xx: add SDRAM detection for km82xx
This patch adds SDRAM detection feature to km82xx boards.
To enable this feature, define CONFIG_SYS_SDRAM_LIST as the initializer
for an array of struct sdram_conf_s.
These structs will expose the bitfields within registers PSDMR and OR1 which
have to be different between configurations; common bitfields will be
defined, as usual, within CONFIG_SYS_PSDMR and CONFIG_SYS_OR1.
If CONFIG_SYS_SDRAM_LIST is not defined, then the usual behavior is retained.

Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>
2012-07-31 22:36:31 +02:00
Holger Brunck
e69e482bbf km/common: remove printfs for i2c deblocking code
This code will also be used before reallocation and during this time we
are not allowed to do these printings.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Acked-by: Prafulla Wadaskar <Prafulla@marvell.com>
Acked-by: Heiko Schocher <hs@denx.de>
2012-07-31 08:04:13 +02:00
Wolfgang Denk
702e6014f1 doc: cleanup - move board READMEs into respective board directories
Also drop a few files referring to no longer / not yet supported
boards.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Kim Phillips <kim.phillips@freescale.com>
Cc: Andy Fleming <afleming@gmail.com>
Cc: Jason Jin <jason.jin@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
Acked-by: Stefano Babic <sbabic@denx.de>
Acked-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
2012-07-29 15:42:02 +02:00
Wolfgang Denk
3fe63839f3 Minor Coding Style cleanup
Signed-off-by: Wolfgang Denk <wd@denx.de>
2012-07-10 09:18:33 +02:00
Holger Brunck
c471d84808 arm/km: remove calls to kw_gpio_* in board_early_init_f
These functions tried to access two static tables before relocation
(board_early_init_f is executed before relocation). But these static
tables lie in the bss section which is not valid before relocation.
These accesses then overwrote some parts of u-boot binary before it was
relocated. For the kmnusa build, this results in a corrupted important
env variable (bootcmd) but it may be that some other parts of the u-boot
binary are corrupted.

This patch solves this problem by moving all the kw_gpio_* calls to
board_init, which should be early enough in the boot sequence. The only
calls that could not be moved is the one for the SOFT (bitbang) I2C, and
they have been replaced by a direct access to the GPIO dataout Control
register to set the two GPIOs as output.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Holger Brunck <holger.brunck@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
2012-07-07 14:07:38 +02:00
Thomas Herzmann
b8cf7cc886 arm/km: add implementation for read_dip_switch
Add a function to read the dip_switch on kmcoge5un. If the
switch is set the actual_bank is set to 0 and this SW is
booted.

Signed-off-by: Thomas Herzmann <thomas.herzmann@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
2012-07-07 14:07:37 +02:00
Valentin Longchamp
dbdee4ca59 arm/km: support the 2 PCIe fpga resets
The PCIe FPGAs now have to support 2 resets: one for the non traffic
affecting part (PCIe) and one for the traffic affecting part.

When the FPGA is not reconfigured, we only reset the PCIe part.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2012-07-07 14:07:37 +02:00
Valentin Longchamp
bcac5b1b2c arm/km: skip FPGA config when already configured
In order to be able to perform board resets without interrupting the
traffic, the configuration of an already properly configured FPGA is
skipped.

This is because some PCIe FPGAs embed some other function that must
continue to work over reset.

It is then the responsibility of the application to trigger a
reconfiguration when needed. This is done by lowering the FPGA_INIT_B
pin for delaying the configuration to u-boot @ next reboot, and then
lower the FPGA_PROGRAM_B signal.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2012-07-07 14:07:37 +02:00
Valentin Longchamp
c1b8514a7a arm/km: redefine piggy 4 reg names to avoid conflicts
Some very similar #defines for reg addresses are used in a later patch
(managed_switch support for km_arm).

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Holger Brunck <holger.brunck@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
2012-07-07 14:07:37 +02:00
Valentin Longchamp
b37f772433 arm/km: enable BOCO2 FPGA download support
This adds a first support of the FPGA download for a PCIe FPGA based
on the BOCO2 CPLD.

This takes place in 3 steps, all done accessing the SPICTRL reg of the
BOCO2:
1) start the FPGA config with an access to the FPGA_PROG bit
2) later in the boot sequence, wait for the FPGA_DONE bit to toggle to 1
   for the end of the FPGA configuration (with a timeout)
3) reset the FPGA
4) finally remove the access to its config EEPROM from the FPGA so that
   the CPU can update the FPGA configuration when the kernel is running

The boards with a PCIe FPGA but without BOCO2 still are supported.

The config option name is CONFIG_KM_FPGA_CONFIG

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Gerlando Falauto <gerlando.falauto@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
2012-07-07 14:07:37 +02:00
Holger Brunck
6ef6486180 arm/km: remove portl2.h and use km_kirkwood instead
The additional headerfile is unneeded here, we can use the generic
km_kirkwood.h instead. And we can use the better config option
KM_PIGGY4_88E6061 for the specific features for boards with this
design in km_arm.c.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Gerlando Falauto <gerlando.falauto@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
2012-07-07 14:07:37 +02:00
Holger Brunck
f945439af9 arm/km: convert mgcoge3un target to km_kirkwood
Use the generic header km_kirkwood.h and get rid of the
board specific header.

changes for v2: rebased because of changes in other patches

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Gerlando Falauto <gerlando.falauto@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
2012-07-07 14:07:37 +02:00
Holger Brunck
d9354530fe arm/km: add kmcoge5un board support
For u-boot this board is similar to mgcoge3un. But some differences
are present. We have a different SDRAM on it and therefore a new
SDRAM config file. Additionaly this board has a direct MAC/MAC
connection from the kirkwood to a marvell simple switch without a
phy inbetween, this needs a new configuration for the mvgbe driver.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Gerlando Falauto <gerlando.falauto@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
2012-07-07 14:07:36 +02:00
Holger Brunck
8170aefc84 arm/km: add kmnusa board support
This board is similar to portl2, but it has the u-boot environment
in a SPI NOR flash and not in an i2c eeprom like portl2 have.

Some other details:
 - IVM EEPROM is at adress: pca9547:70:9
 - PCI is enabled
 - PIGGY4 is connected via MV88E6352 simple switch. There is no phy
   between the simple switch and the kirkwood.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Gerlando Falauto <gerlando.falauto@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
2012-07-07 14:07:36 +02:00
Valentin Longchamp
0c25defccd arm/km: use spi claim bus to switch between SPI and NAND
We overwrite these weak functions from the kirkwood spi code to
use our own method to be able to switch between the SPI NOR and
the NAND flash. This is needed e.g. to update the u-boot. The former
command do_spi_toggle can therefore be removed. And the usage of
this command is removed from the u-boot update command in the
u-boot environment.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
cc: Holger Brunck <holger.brunck@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
2012-07-07 14:07:33 +02:00
Valentin Longchamp
846836386f kirkwood: fix calls to kirkwood_mpp_conf
With the new second save argument introduced by the previous patch, all
the calls to the function had to be fixed.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Holger Brunck <holger.brunck@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
2012-07-07 14:07:31 +02:00
Holger Brunck
e947cbc94e arm/km: fix wrong comment in SDRAM config for mgcoge3un
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Gerlando Falauto <gerlando.falauto@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
2012-07-07 14:07:30 +02:00
Holger Brunck
b732632389 arm/km: use ARRAY_SIZE macro
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Gerlando Falauto <gerlando.falauto@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
2012-07-07 14:07:30 +02:00
Thomas Herzmann
c1b3d84168 km/common: check test_bank and testpin for testboot
If the testpin is asserted, first check if a test_bank
variable is defined before trying to boot this
test_bank.

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:52 -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
Thomas Herzmann
d8f87f6c4b km/common: fixed error in ethaddr (1-byte-shift)
The MAC address begins at offset 1.

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: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
Holger Brunck
6a23f31162 arm/km: checkpatch cleanup
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Cc: Valentin Longchamp <valentin.longchamp@keymile.com>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
Acked-by: Heiko Schocher <hs@denx.de>
2012-02-12 10:11:28 +01:00
Holger Brunck
d26982cbb6 km/common: add toolchain variable
Add a variable "toolchain" and configure the rootpath
for the nfsargs with this variable.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Wolfgang Denk <wd@denx.de>
2011-12-20 23:43:45 +01:00
Wolfgang Denk
1086c5d6f8 Merge branch 'master' of git://git.denx.de/u-boot-mpc83xx
* 'master' of git://git.denx.de/u-boot-mpc83xx:
  powerpc/83xx: fix sdram initialization for keymile boards
  powerpc/mpc83xx: cleanup makefile for mpc83xx
2011-12-07 23:01:26 +01:00
Kim Phillips
67eee06cf1 mpc83xx: km83xx_i2c - fix gcc 4.6 compiler warning
Configuring for kmeter1 board...
km83xx_i2c.c: In function 'i2c_make_abort':
km83xx_i2c.c:44:8: warning: variable 'dummy' set but not used [-Wunused-but-set-variable]

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Acked-by: Heiko Schocher <hs@denx.de>
2011-11-16 21:41:58 +01: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
Wolfgang Denk
5721385b18 Merge branch 'master' of git://git.denx.de/u-boot-mpc83xx
* 'master' of git://git.denx.de/u-boot-mpc83xx:
  powerpc/mpc83xx: Add 33.33MHz support for mpc8360emds
  powerpc/mpc83xx: Add 512MB DDR support for mpc8360emds
  mpc83xx: Rename CONFIG_SYS_DDR_CONFIG and cleanup DDR csbnds code
  mpc83xx: Cleanup usage of LBC constants
  mpc83xx: Cleanup usage of DDR constants
  mpc83xx: Cleanup usage of BAT constants
  mpc83xx: cosmetic: vme8349.h checkpatch compliance
  mpc83xx: cosmetic: ve8313.h checkpatch compliance
  mpc83xx: cosmetic: sbc8349.h checkpatch compliance
  mpc83xx: cosmetic: mpc8308_p1m.h checkpatch compliance
  mpc83xx: cosmetic: kmeter1.h checkpatch compliance
  mpc83xx: cosmetic: TQM834x.h checkpatch compliance
  mpc83xx: cosmetic: SIMPC8313.h checkpatch compliance
  mpc83xx: cosmetic: MVBLM7.h checkpatch compliance
  mpc83xx: cosmetic: MPC837XERDB.h checkpatch compliance
  mpc83xx: cosmetic: MPC837XEMDS.h checkpatch compliance
  mpc83xx: cosmetic: MPC8360ERDK.h checkpatch compliance
  mpc83xx: cosmetic: MPC8360EMDS.h checkpatch compliance
  mpc83xx: cosmetic: MPC8349ITX.h checkpatch compliance
  mpc83xx: cosmetic: MPC8349EMDS.h checkpatch compliance
  mpc83xx: cosmetic: MPC832XEMDS.h checkpatch compliance
  mpc83xx: cosmetic: MPC8323ERDB.h checkpatch compliance
  mpc83xx: cosmetic: MPC8315ERDB.h checkpatch compliance
  mpc83xx: cosmetic: MPC8313ERDB.h checkpatch compliance
  mpc83xx: cosmetic: MPC8308RDB.h checkpatch compliance
  mpc83xx: cosmetic: MERGERBOX.h checkpatch compliance
  mpc83xx: Fix ipic structure definition
  powerpc, mpc83xx: add DDR SDRAM Timing Configuration 3 definitions
  cosmetic, powerpc, mpc83xx: checkpatch cleanup
  powerpc/83xx: move km 83xx specific i2c code to km83xx_i2c
  mpc83xx: fix global timer structure definition
2011-11-08 07:44:52 +01:00
Holger Brunck
e792affe21 powerpc/83xx: move km 83xx specific i2c code to km83xx_i2c
The common code should be valid for more than one architecture.
Therefore this code was reorganized and moved to the new
file km83xx_i2c.c

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2011-11-03 18:27:51 -05:00
Holger Brunck
37605c466d arm/km: adapt bootcounter evaluation
The bootcounter (stored in the RAM) is not enough protected with the 4 Bytes
BOOTCOUNT_MAGIC against bit errors due to short power loss or holding a system
in RESET. It has been seen, that the bootcounter value has been changed due to
a bit flip on a system holding in RESET, but the BOOTCOUNT_MAGIC was still valid.

A bit pattern with 4000 bytes (after BOOTCOUNT_MAGIC) has been implemented,
which should be enough to detect a bit error.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
2011-11-03 22:56:23 +01:00
Holger Brunck
f0d6425790 arm/km: trigger reconfiguration for the Xilinx FPGA
The Xilinx FPGA must be reconfigured each time the unit
reboots. The FPGA is connected to the GPIO pin 39 from kirkwood.
This patch triggers this pin for km_kirkwood_pci targets.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
2011-11-03 22:56:23 +01:00
Valentin Longchamp
8620ca2a1f ARM: Reintroduce MACH_TYPE_KM_KIRKWOOD for keymile ARM boards
We got dropped from Linux mach-types.h because of a lack of mainline
support and this is needed since the last Linux/u-boot mach-types
synchro.

This patch also defines CONFIG_MACH_TYPE for all keymile boards, as
this is a mandatory CONFIG for ARM boards now. The initialization
of gd->bd->bi_arch_number is removed form km_arm.c, our board file.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
2011-11-03 22:56:22 +01:00
Holger Brunck
6264800e61 arm/km/mgcoge3un: enhance "waitforne" feature
The mgcoge3un waits to be released from mgcoge3ne at startup.
This patch enhances this feature with the possibility to interrupt
this wait if a key is pressed.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
2011-11-03 22:56:22 +01:00
Lei Wen
a7efd719f4 ARM: kirkwood: reduce dependence of including platform file
For files like the drivers/serial/serial.c, it must include the
platform file, as the CONFIG_SYS_NS16550_COM1 must reference to the
definition in the platform definition files.

Include the platform definition file in the config file, so that it
would decouple the dependence for the driver files.

Signed-off-by: Lei Wen <leiwen@marvell.com>
2011-10-27 21:56:33 +02:00
Wolfgang Denk
d47031e687 Revert "km_arm: enable POST for these boards"
This reverts commit a2da616311.
THis was applied by accident - a more recent version of this change
was already present, see commit
9400f8f   2011-10-05 22:03:11 +0200   km_arm: enable POST for these boards

Signed-off-by: Wolfgang Denk <wd@denx.de>
2011-10-24 21:14:42 +02:00
Holger Brunck
370853aedf km/common: remove obsolete header file
This header is unneeded due to code which was removed in the
past.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Wolfgang Denk <wd@denx.de>
2011-10-22 00:29:30 +02:00
Andreas Huber
2a7714ce64 km/common: fix ramfs development target
Calucations of PRAM needs to take into account the 'rootfssize'.
Memory available to the linux kernel 'mem=' is in all cases set to the total
memory size minus the pram size.

Signed-off-by: Andreas Huber <andreas.huber@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Wolfgang Denk <wd@denx.de>
2011-10-22 00:29:09 +02:00
Holger Brunck
0eb0e59ed3 km/common: force set ethaddr only for KM kirkwood boards
This prevents u-boot to print out "Can't overwrite "ethaddr""
each time a powerpc board starts.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Wolfgang Denk <wd@denx.de>
2011-10-22 00:28:36 +02:00
Valentin Longchamp
a2da616311 km_arm: enable POST for these boards
The current km_arm boards have a Power-On test jumper. When this
jumper is set, this triggers some Power-On tests on the board.

This patch enables the support of this jumper for starting the
memory_regions test when the jumper is set.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
2011-10-22 00:14:35 +02:00
Mike Frysinger
464c79207c punt unused clean/distclean targets
The top level Makefile does not do any recursion into subdirs when
cleaning, so these clean/distclean targets in random arch/board dirs
never get used.  Punt them all.

MAKEALL didn't report any errors related to this that I could see.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-10-15 22:20:36 +02:00
Valentin Longchamp
9400f8fa7c km_arm: enable POST for these boards
The current km_arm boards have a Power-On test jumper. When this
jumper is set, this triggers some Power-On tests on the board.

This patch enables the support of this jumper for starting the
memory_regions test when the jumper is set.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
2011-10-05 22:03:11 +02:00
Holger Brunck
6478021f12 km/common: fix bug in IVM mac address access
The MAC address stored in the inventory eeprom begins at offset 1.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Wolfgang Denk <wd@denx.de>
2011-09-21 23:38:41 +02:00
Stefan Bigler
c7506c2b03 km/common: i2c deblock: enabled print of i2c deblock status
Enable printout of i2c deblocking status if chips were in block
state or deblocking failed.

Signed-off-by: Stefan Bigler <stefan.bigler@keymile.com>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
2011-07-28 15:40:48 +02:00
Holger Brunck
9485e779a3 km/common: add printings to boardid commands
Be verbose if do_setboardid was called and print
correct names of variables in do_checkboardidhwk.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
2011-07-28 15:39:18 +02:00
Holger Brunck
1adfd9dd3f powerpc/km82xx: remove 82xx specific functions from common.c
Common code should be valid for more than one architecture,
therefore the km82xx specific code was removed from common.c.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
2011-07-27 23:44:35 +02:00
Holger Brunck
fc9a7441d9 km/common: remove fdt_(gs)et_node_and_value
This code is unused and therefore dead code.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
2011-07-27 23:44:30 +02:00
Holger Brunck
4f745bf4c8 km/common: move ivm functions from to ivm.c
The file common.c grows in the past. So move the IVM specific
code into an ivm.c file.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
2011-07-27 23:44:20 +02:00
Holger Brunck
ba8be32a8f km/common: remove saveenv from do_checkboardidhwkey
This is unneeded here because we save the environment when
the board boots the first time. At this time we have set
the values already.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
2011-07-27 23:44:15 +02:00
Holger Brunck
e819582571 km/common: force set ethaddr after reading IVM
The ethaddr is stored inside the inventory eeprom. During
boottime this value was read out and the ethaddr variable was
set. Previously this was only done if it ethaddr == NULL but
this is wrong for our ARM boards. Because ethaddr is at this
stage never NULL for ARM due to the random calculation of a
MAC address in mvgbe.c.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
2011-07-27 23:44:11 +02:00
Holger Brunck
c98d3b4f48 km/common: remove obsolete defines and header
These defines and the header keymile_hdlc_enet.h are obsolete
due to the removed hdlc code.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
2011-07-27 23:44:07 +02:00
Holger Brunck
b648bfc212 km/common: simplify debug environment
The debug environment which is stored in textfiles in the
scripts directory was reworked. Two usecase are now present
which can be executed simply from the default environment:
run develop: this configures the environment to setup the
             rootfs via nfs
run ramfs: this configures the environment to setup the
           rootfs in ram

Each architecture now has a "arch" variable which is used
to load the architecture specific debug scripts and to set
the rootpath for NFS.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
2011-07-27 23:43:33 +02:00
Albert ARIBAUD
a55d23ccf6 Remove volatile qualifier in get_ram_size() calls
Checkpatch.pl complains about the volatile qualifier in calls to
get_ram_size(). Remove this qualifier in the prototype and in the
calls where it is useless, and leave it only in the function body
where it is needed.

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
2011-07-17 17:11:53 +02:00
Valentin Longchamp
01fa4e8cde arm/km: add support for portl2 board
This adds support for the keymile Kirkwood BEC portl2 board. This board
relies on the km_arm (km_kirkwood) BEC.

The egiga driver is configured for a 100M full-duplex, A/N off connnection
to the backplane. This board has always ethernet present, because it is
connected to the marvell switch similar to mgcoge3un. The reset_phy
functionality is also the same to mgcoge3un.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
cc: Heiko Schocher <hs@denx.de>
2011-07-04 10:55:28 +02:00
Valentin Longchamp
8f2827fc43 arm/km: ethernet support for mgcoge3un
The phy is also configured with "RGMII clock transitions when data
stable" and "Class A driver for the direct backplane connection".

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
cc: Heiko Schocher <hs@denx.de>
2011-07-04 10:55:28 +02:00