obj-y += reset.o
endif
-obj-$(CONFIG_MICRO_SUPPORT_CARD) += sbc/ micro-support-card.o
+obj-$(CONFIG_MICRO_SUPPORT_CARD) += micro-support-card.o
obj-y += pinctrl-glue.o
obj-$(CONFIG_MMC) += mmc-first-dev.o
obj-y += fdt-fixup.o
endif
+obj-y += sbc/
obj-y += soc-info.o
obj-y += boot-device/
obj-y += clk/
# SPDX-License-Identifier: GPL-2.0+
+obj- += dummy.o
+
+ifndef CONFIG_SPL_BUILD
obj-y += sbc.o
obj-$(CONFIG_ARCH_UNIPHIER_LD4) += sbc-ld4.o
obj-$(CONFIG_ARCH_UNIPHIER_LD11) += sbc-ld11.o
obj-$(CONFIG_ARCH_UNIPHIER_LD20) += sbc-ld11.o
obj-$(CONFIG_ARCH_UNIPHIER_PXS3) += sbc-pxs2.o
+endif
void uniphier_ld11_sbc_init(void)
{
+ if (!uniphier_sbc_is_enabled())
+ return;
+
uniphier_sbc_init_savepin();
/* necessary for ROM boot ?? */
{
u32 tmp;
+ if (!uniphier_sbc_is_enabled())
+ return;
+
uniphier_sbc_init_savepin();
/* system bus output enable */
void uniphier_pxs2_sbc_init(void)
{
+ if (!uniphier_sbc_is_enabled())
+ return;
+
uniphier_sbc_init_savepin();
/* necessary for ROM boot ?? */
}
#endif
+int uniphier_sbc_is_enabled(void);
+
#endif /* ARCH_SBC_REGS_H */
* Author: Masahiro Yamada <yamada.masahiro@socionext.com>
*/
+#include <common.h>
#include <linux/io.h>
+#include <asm/global_data.h>
#include "../init.h"
#include "sbc-regs.h"
#define SBCTRL2_SAVEPIN_MEM_VALUE 0x34000009
#define SBCTRL4_SAVEPIN_MEM_VALUE 0x02110210
+int uniphier_sbc_is_enabled(void)
+{
+ DECLARE_GLOBAL_DATA_PTR;
+ const void *fdt = gd->fdt_blob;
+ int offset;
+
+ offset = fdt_node_offset_by_compatible(fdt, 0,
+ "socionext,uniphier-system-bus");
+ if (offset < 0)
+ return 0;
+
+ return fdtdec_get_is_enabled(fdt, offset);
+}
+
static void __uniphier_sbc_init(int savepin)
{
/*