1*83d290c5STom Rini // SPDX-License-Identifier: GPL-2.0+
2784548efSMasahiro Yamada /*
3784548efSMasahiro Yamada  * Copyright (C) 2014      Panasonic Corporation
4784548efSMasahiro Yamada  * Copyright (C) 2015-2017 Socionext Inc.
5784548efSMasahiro Yamada  *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
6784548efSMasahiro Yamada  */
7784548efSMasahiro Yamada 
8784548efSMasahiro Yamada #include <common.h>
9784548efSMasahiro Yamada #include <spl.h>
10784548efSMasahiro Yamada #include <linux/io.h>
11784548efSMasahiro Yamada #include <linux/kernel.h>
12784548efSMasahiro Yamada 
13784548efSMasahiro Yamada #include "boot-device.h"
14784548efSMasahiro Yamada 
15784548efSMasahiro Yamada const struct uniphier_boot_device uniphier_ld4_boot_device_table[] = {
16784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 8, ECC  8, EraseSize 128KB, Addr 4)"},
17784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 8, ECC  8, EraseSize 128KB, Addr 5)"},
18784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 8, ECC 16, EraseSize 128KB, Addr 5)"},
19784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 8, ECC  8, EraseSize 256KB, Addr 5)"},
20784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 8, ECC 16, EraseSize 256KB, Addr 5)"},
21784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 8, ECC  8, EraseSize 512KB, Addr 5)"},
22784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 8, ECC 16, EraseSize 512KB, Addr 5)"},
23784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 8, ECC 24, EraseSize   1MB, Addr 5)"},
24784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 4, ECC 24, EraseSize   1MB, Addr 5)"},
25784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 1, ECC  8, EraseSize 128KB, Addr 5)"},
26784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 1, ECC 16, EraseSize 128KB, Addr 5)"},
27784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 1, ECC  8, EraseSize 256KB, Addr 5)"},
28784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 1, ECC 16, EraseSize 256KB, Addr 5)"},
29784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 1, ECC  8, EraseSize 512KB, Addr 5)"},
30784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 1, ECC 16, EraseSize 512KB, Addr 5)"},
31784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 1, ECC 24, EraseSize 512KB, Addr 5)"},
32784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 8, ECC  8, ONFI,            Addr 4)"},
33784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 8, ECC  8, ONFI,            Addr 5)"},
34784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 8, ECC 16, ONFI,            Addr 5)"},
35784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 8, ECC 24, ONFI,            Addr 5)"},
36784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 4, ECC 24, ONFI,            Addr 5)"},
37784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 1, ECC  8, ONFI,            Addr 5)"},
38784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 1, ECC 16, ONFI,            Addr 5)"},
39784548efSMasahiro Yamada 	{BOOT_DEVICE_NAND, "NAND (Mirror 1, ECC 24, ONFI,            Addr 5)"},
40784548efSMasahiro Yamada 	{BOOT_DEVICE_MMC1, "eMMC (3.3V)"},
41784548efSMasahiro Yamada 	{BOOT_DEVICE_MMC1, "eMMC (1.8V)"},
42784548efSMasahiro Yamada 	{BOOT_DEVICE_NONE, "Reserved"},
43784548efSMasahiro Yamada 	{BOOT_DEVICE_NONE, "Reserved"},
44784548efSMasahiro Yamada 	{BOOT_DEVICE_NONE, "Reserved"},
45784548efSMasahiro Yamada 	{BOOT_DEVICE_NONE, "Reserved"},
46784548efSMasahiro Yamada 	{BOOT_DEVICE_NONE, "Reserved"},
47784548efSMasahiro Yamada 	{BOOT_DEVICE_NOR,  "NOR  (XECS0)"},
48784548efSMasahiro Yamada };
49784548efSMasahiro Yamada 
50784548efSMasahiro Yamada const unsigned uniphier_ld4_boot_device_count =
51784548efSMasahiro Yamada 				ARRAY_SIZE(uniphier_ld4_boot_device_table);
52