mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-08-31 06:18:51 +09:00
![Masahiro Yamada](/assets/img/avatar_default.png)
If CONFIG_MICRO_SUPPORT_CARD is enabled, U-Boot initialize SBC (System Bus Controller), which may not be really necessary. Check the "socionext,uniphier-system-bus" node in DT run-time. If and only if it is found and its "status" property is okay, initialize the SBC block. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
28 lines
525 B
C
28 lines
525 B
C
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* Copyright (C) 2016-2017 Socionext Inc.
|
|
*/
|
|
|
|
#include <common.h>
|
|
#include <spl.h>
|
|
#include <linux/io.h>
|
|
|
|
#include "../init.h"
|
|
#include "sbc-regs.h"
|
|
|
|
void uniphier_ld11_sbc_init(void)
|
|
{
|
|
if (!uniphier_sbc_is_enabled())
|
|
return;
|
|
|
|
uniphier_sbc_init_savepin();
|
|
|
|
/* necessary for ROM boot ?? */
|
|
/* system bus output enable */
|
|
writel(0x17, PC0CTRL);
|
|
|
|
/* pins for NAND and System Bus are multiplexed */
|
|
if (spl_boot_device() != BOOT_DEVICE_NAND)
|
|
uniphier_pin_init("system-bus");
|
|
}
|