summaryrefslogtreecommitdiff
path: root/arch/arm/mach-uniphier/sbc/sbc-ld11.c
blob: a0162e1cc852fc08738be94e1afe275ff1c1ea11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: GPL-2.0+
/*
 * Copyright (C) 2016-2017 Socionext Inc.
 */

#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");
}