Commit Graph

9 Commits

Author SHA1 Message Date
Masahiro Yamada
35adfc4d25 ARM: UniPhier: move SPL init functions to spl_board_init()
Now init functions called from board_postclk_init() and dram_init()
are only necessary for SPL.
Move them to spl_board_init() for clean-up.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2015-02-07 00:15:03 +09:00
Masahiro Yamada
84ccd791af ARM: UniPhier: move pin_init() to board_early_init_f()
Currently, I/O pin settings are not necessary for SPL.
The board_early_init_f() seems a suitable place to call pin_init().

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2015-02-07 00:15:02 +09:00
Masahiro Yamada
75bc8e85b5 ARM: UniPhier: add environment variable to update images in NAND
To boot UniPhier boards with the NAND boot mode, two images
(u-boot-spl.bin and u-boot-dtb.img) must be written at the correct
offset addresses.

TFTP downloading is useful to update such images in the NAND device.
We generally do:

  => nand erase 0 0x100000
  => tftpboot u-boot-spl.bin
  => nand write $loadaddr 0 0x10000
  => tftpboot u-boot-dtb.img
  => nand write $loadaddr 0x10000 0xf0000

It is a tedious and error-prone operation.

This commit provides the shorthand:

  => run nandupdate

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2015-02-07 00:11:12 +09:00
Masahiro Yamada
0e063dff5c ARM: UniPhier: use "&&" instead of "; " in commands
Run the next command only when the previous one succeeded.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2015-02-07 00:11:03 +09:00
Masahiro Yamada
233e42a985 ARM: UniPhier: enable CONFIG_I2C_EEPROM
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-01-29 17:09:49 -07:00
Masahiro Yamada
d8bec60c1b ARM: UniPhier: enable CONFIG_CMD_DM
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-12-18 23:34:30 +09:00
Masahiro Yamada
7e421d640b ARM: UniPhier: use DRAM area for init stack of normal image
The normal image is working on DRAM.  It is better to use DRAM also
for init stack than L2 cache.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-12-18 23:34:25 +09:00
Masahiro Yamada
7a3620b246 ARM: UniPhier: detect the number of flash banks at run-time
Some UniPhier boards are equipped with an expansion slot that
some optional SRAM/NOR-flash cards can be attached to.  So, run-time
detection of the number of flash banks would be more user-friendly.

Until this commit, UniPhier boards have achieved this by (ab)using
board_flash_wp_on() because the boot failed if flash_size got zero.
Fortunately, this problem was solved by commit 70879a9256 (flash:
do not fail even if flash_size is zero).

Now it is possible to throw away such a tricky workaround.  This
commit also enables CONFIG_SYS_MAX_FLASH_BANKS_DETECT for further
refactoring.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-12-09 00:08:33 +09:00
Masahiro Yamada
f5d0b9b2c3 ARM: UniPhier: merge UniPhier config headers into a single file
Some configurations have been moved to Kconfig and the difference
among the config headers of UniPhier SoC variants is getting smaller
and smaller.  Now is a good time to merge them into a single file.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-12-08 01:25:44 +09:00