u-boot/arch/arm/mach-uniphier
Masahiro Yamada 36223f5de8 ARM: uniphier: add work-around to support Micro Support Card v3.6.10
Due to some hardware guy's awful work, this version is not compatible
with v3.6: the logic of BIT(0) of the reset logic is inverted! (and
v3.6.10 is horribly wrong in multiple ways), but this is what we have
to solve now.

The v3.6 expects 0x0000 set to the register for reset de-assertion,
while v3.6 does 0x0001.

This commit (ab)uses another bug of v3.6.10 to work around the issue.
The UniPhier System Bus is a 16-bit bus, which this support card is
connected to.  A 32-bit write to the bus (writel() function call) is
divided into two 16-bit write transactions, with LSB the first.  What
is amazing for v3.6.10 is that access to address 4N + 2 goes to 4N
(Jesus Christ!).

For clarification, things are like this:

    writel(0x00010000, MICRO_SUPPORT_CARD_RESET);

is done with two bus transactions as follows

    [1] write 0x0000 to address MICRO_SUPPORT_CARD
    [2] write 0x0001 to address MICRO_SUPPORT_CARD + 2

For v3.6, [1] is written to the register and [2] is correctly ignored
because there is nothing at the address MICRO_SUPPORT_CARD + 2.  This
is what we expect.

For v3.6.10, [1] is written to the reset register and then [2] is
over-written to the same register due to the bus access bug.

For the latter, it produces a glitch signal to the BIT[0], so the
device state is lost due to the reset pulse.  This solution only
works for the start-up code.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-03-24 01:45:19 +09:00
..
arm32 ARM: uniphier: drop PH1- prefix from CONFIG options and file names 2016-03-24 01:42:13 +09:00
bcu ARM: uniphier: drop PH1- prefix from CONFIG options and file names 2016-03-24 01:42:13 +09:00
boot-mode ARM: uniphier: drop PH1- prefix from CONFIG options and file names 2016-03-24 01:42:13 +09:00
clk ARM: uniphier: drop PH1- prefix from CONFIG options and file names 2016-03-24 01:42:13 +09:00
dram ARM: uniphier: drop ifdef in ddrphy-regs.h 2016-03-24 01:45:19 +09:00
early-clk ARM: uniphier: drop PH1- prefix from CONFIG options and file names 2016-03-24 01:42:13 +09:00
early-pinctrl ARM: uniphier: drop PH1- prefix from CONFIG options and file names 2016-03-24 01:42:13 +09:00
init ARM: uniphier: refactor SBC init code 2016-03-24 01:45:18 +09:00
memconf ARM: uniphier: drop PH1- prefix from CONFIG options and file names 2016-03-24 01:42:13 +09:00
pinctrl ARM: uniphier: drop PH1- prefix from CONFIG options and file names 2016-03-24 01:42:13 +09:00
pll ARM: uniphier: drop PH1- prefix from CONFIG options and file names 2016-03-24 01:42:13 +09:00
sbc ARM: uniphier: refactor SBC init code 2016-03-24 01:45:18 +09:00
board_common.c ARM: uniphier: move headers out of include/mach directory 2016-01-13 01:54:53 +09:00
board_early_init_f.c ARM: uniphier: drop PH1- prefix from CONFIG options and file names 2016-03-24 01:42:13 +09:00
board_early_init_r.c ARM: uniphier: move headers out of include/mach directory 2016-01-13 01:54:53 +09:00
board_late_init.c ARM: uniphier: add support for PH1-Pro4 Ace and Sanji boards 2016-02-14 17:07:46 +09:00
boards.c ARM: uniphier: drop PH1- prefix from CONFIG options and file names 2016-03-24 01:42:13 +09:00
cpu_info.c ARM: uniphier: rename PH1-LD10/PH1-sLD11 to PH1-LD20/PH1-LD11 2016-02-29 03:50:16 +09:00
dram_init.c ARM: uniphier: fix warnings reported by aarch64 compiler 2016-03-01 00:33:29 +09:00
init.h ARM: uniphier: refactor SBC init code 2016-03-24 01:45:18 +09:00
Kconfig ARM: uniphier: drop PH1- prefix from CONFIG options and file names 2016-03-24 01:42:13 +09:00
Makefile ARM: uniphier: prepare directory structure for ARMv8 SoC support 2016-03-01 00:33:24 +09:00
micro-support-card.c ARM: uniphier: add work-around to support Micro Support Card v3.6.10 2016-03-24 01:45:19 +09:00
micro-support-card.h ARM: uniphier: move headers out of include/mach directory 2016-01-13 01:54:53 +09:00
print_misc_info.c ARM: uniphier: move headers out of include/mach directory 2016-01-13 01:54:53 +09:00
reset.c ARM: uniphier: move headers out of include/mach directory 2016-01-13 01:54:53 +09:00
sc-regs.h ARM: uniphier: drop PH1- prefix from CONFIG options and file names 2016-03-24 01:42:13 +09:00
sg-regs.h ARM: uniphier: fix warnings reported by aarch64 compiler 2016-03-01 00:33:29 +09:00
soc_info.c ARM: uniphier: drop PH1- prefix from CONFIG options and file names 2016-03-24 01:42:13 +09:00
soc-info.h ARM: uniphier: drop PH1- prefix from CONFIG options and file names 2016-03-24 01:42:13 +09:00