blob: 72e9743c8f8a634e7f5f99104ed2ee461fa2627d [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Masahiro Yamadabb2ff9d2014-10-03 19:21:06 +09002/*
Masahiro Yamada6f11cde2017-01-15 14:59:05 +09003 * Copyright (C) 2011-2015 Panasonic Corporation
4 * Copyright (C) 2015-2017 Socionext Inc.
Masahiro Yamadabb2ff9d2014-10-03 19:21:06 +09005 */
6
Masahiro Yamada663a23f2015-05-29 17:30:00 +09007#include <linux/io.h>
Masahiro Yamadaefdf3402016-01-09 01:51:13 +09008
9#include "../init.h"
Masahiro Yamadaefdf3402016-01-09 01:51:13 +090010#include "sbc-regs.h"
Masahiro Yamadabb2ff9d2014-10-03 19:21:06 +090011
Masahiro Yamada6f11cde2017-01-15 14:59:05 +090012void uniphier_ld4_sbc_init(void)
Masahiro Yamadabb2ff9d2014-10-03 19:21:06 +090013{
Masahiro Yamada82ca1f12015-01-06 14:20:04 +090014 u32 tmp;
15
Masahiro Yamadaf4716dc2019-07-10 20:07:37 +090016 if (!uniphier_sbc_is_enabled())
17 return;
18
Masahiro Yamada6f11cde2017-01-15 14:59:05 +090019 uniphier_sbc_init_savepin();
20
Masahiro Yamada82ca1f12015-01-06 14:20:04 +090021 /* system bus output enable */
22 tmp = readl(PC0CTRL);
23 tmp &= 0xfffffcff;
24 writel(tmp, PC0CTRL);
Masahiro Yamadabb2ff9d2014-10-03 19:21:06 +090025}