1*784548efSMasahiro Yamada /*
2*784548efSMasahiro Yamada  * Copyright (C) 2014      Panasonic Corporation
3*784548efSMasahiro Yamada  * Copyright (C) 2015-2017 Socionext Inc.
4*784548efSMasahiro Yamada  *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
5*784548efSMasahiro Yamada  *
6*784548efSMasahiro Yamada  * SPDX-License-Identifier:	GPL-2.0+
7*784548efSMasahiro Yamada  */
8*784548efSMasahiro Yamada 
9*784548efSMasahiro Yamada #include <common.h>
10*784548efSMasahiro Yamada #include <spl.h>
11*784548efSMasahiro Yamada #include <linux/io.h>
12*784548efSMasahiro Yamada #include <linux/kernel.h>
13*784548efSMasahiro Yamada 
14*784548efSMasahiro Yamada #include "boot-device.h"
15*784548efSMasahiro Yamada 
16*784548efSMasahiro Yamada const struct uniphier_boot_device uniphier_ld4_boot_device_table[] = {
17*784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 8, ECC  8, EraseSize 128KB, Addr 4)"},
18*784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 8, ECC  8, EraseSize 128KB, Addr 5)"},
19*784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 8, ECC 16, EraseSize 128KB, Addr 5)"},
20*784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 8, ECC  8, EraseSize 256KB, Addr 5)"},
21*784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 8, ECC 16, EraseSize 256KB, Addr 5)"},
22*784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 8, ECC  8, EraseSize 512KB, Addr 5)"},
23*784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 8, ECC 16, EraseSize 512KB, Addr 5)"},
24*784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 8, ECC 24, EraseSize   1MB, Addr 5)"},
25*784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 4, ECC 24, EraseSize   1MB, Addr 5)"},
26*784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 1, ECC  8, EraseSize 128KB, Addr 5)"},
27*784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 1, ECC 16, EraseSize 128KB, Addr 5)"},
28*784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 1, ECC  8, EraseSize 256KB, Addr 5)"},
29*784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 1, ECC 16, EraseSize 256KB, Addr 5)"},
30*784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 1, ECC  8, EraseSize 512KB, Addr 5)"},
31*784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 1, ECC 16, EraseSize 512KB, Addr 5)"},
32*784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 1, ECC 24, EraseSize 512KB, Addr 5)"},
33*784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 8, ECC  8, ONFI,            Addr 4)"},
34*784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 8, ECC  8, ONFI,            Addr 5)"},
35*784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 8, ECC 16, ONFI,            Addr 5)"},
36*784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 8, ECC 24, ONFI,            Addr 5)"},
37*784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 4, ECC 24, ONFI,            Addr 5)"},
38*784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 1, ECC  8, ONFI,            Addr 5)"},
39*784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 1, ECC 16, ONFI,            Addr 5)"},
40*784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 1, ECC 24, ONFI,            Addr 5)"},
41*784548efSMasahiro Yamada 	{BOOT_DEVICE_MMC1, "eMMC (3.3V)"},
42*784548efSMasahiro Yamada 	{BOOT_DEVICE_MMC1, "eMMC (1.8V)"},
43*784548efSMasahiro Yamada 	{BOOT_DEVICE_NONE, "Reserved"},
44*784548efSMasahiro Yamada 	{BOOT_DEVICE_NONE, "Reserved"},
45*784548efSMasahiro Yamada 	{BOOT_DEVICE_NONE, "Reserved"},
46*784548efSMasahiro Yamada 	{BOOT_DEVICE_NONE, "Reserved"},
47*784548efSMasahiro Yamada 	{BOOT_DEVICE_NONE, "Reserved"},
48*784548efSMasahiro Yamada 	{BOOT_DEVICE_NOR,  "NOR  (XECS0)"},
49*784548efSMasahiro Yamada };
50*784548efSMasahiro Yamada 
51*784548efSMasahiro Yamada const unsigned uniphier_ld4_boot_device_count =
52*784548efSMasahiro Yamada 				ARRAY_SIZE(uniphier_ld4_boot_device_table);
53