blob: 228cbb1a195f4e79b75f95f1c7c9c330c3861069 [file] [log] [blame]
Masahiro Yamada75f16f82015-09-22 00:27:39 +09001/*
2 * Copyright (C) 2015 Masahiro Yamada <yamada.masahiro@socionext.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7#ifndef __MACH_INIT_H
8#define __MACH_INIT_H
9
10struct uniphier_board_data {
11 unsigned long dram_ch0_base;
12 unsigned long dram_ch0_size;
13 unsigned long dram_ch0_width;
14 unsigned long dram_ch1_base;
15 unsigned long dram_ch1_size;
16 unsigned long dram_ch1_width;
17 unsigned long dram_ch2_base;
18 unsigned long dram_ch2_size;
19 unsigned long dram_ch2_width;
20 unsigned int dram_freq;
21};
22
23const struct uniphier_board_data *uniphier_get_board_param(const void *fdt);
24
25int ph1_sld3_init(const struct uniphier_board_data *bd);
26int ph1_ld4_init(const struct uniphier_board_data *bd);
27int ph1_pro4_init(const struct uniphier_board_data *bd);
28int ph1_sld8_init(const struct uniphier_board_data *bd);
29
30#if defined(CONFIG_MICRO_SUPPORT_CARD)
31int ph1_sld3_sbc_init(const struct uniphier_board_data *bd);
32int ph1_ld4_sbc_init(const struct uniphier_board_data *bd);
33int ph1_pro4_sbc_init(const struct uniphier_board_data *bd);
34#else
35static inline int ph1_sld3_sbc_init(const struct uniphier_board_data *bd)
36{
37 return 0;
38}
39
40static inline int ph1_ld4_sbc_init(const struct uniphier_board_data *bd)
41{
42 return 0;
43}
44
45static inline int ph1_pro4_sbc_init(const struct uniphier_board_data *bd)
46{
47 return 0;
48}
49#endif
50
51int ph1_sld3_bcu_init(const struct uniphier_board_data *bd);
52int ph1_ld4_bcu_init(const struct uniphier_board_data *bd);
53
54int memconf_init(const struct uniphier_board_data *bd);
55int ph1_sld3_memconf_init(const struct uniphier_board_data *bd);
56
57int ph1_sld3_pll_init(const struct uniphier_board_data *bd);
58int ph1_ld4_pll_init(const struct uniphier_board_data *bd);
59int ph1_pro4_pll_init(const struct uniphier_board_data *bd);
60int ph1_sld8_pll_init(const struct uniphier_board_data *bd);
61
62int ph1_sld3_enable_dpll_ssc(const struct uniphier_board_data *bd);
63int ph1_ld4_enable_dpll_ssc(const struct uniphier_board_data *bd);
64
65int ph1_ld4_early_clk_init(const struct uniphier_board_data *bd);
66
67int ph1_sld3_early_pin_init(const struct uniphier_board_data *bd);
68
69int ph1_ld4_umc_init(const struct uniphier_board_data *bd);
70int ph1_pro4_umc_init(const struct uniphier_board_data *bd);
71int ph1_sld8_umc_init(const struct uniphier_board_data *bd);
72
73void ph1_sld3_pin_init(void);
74void ph1_ld4_pin_init(void);
75void ph1_pro4_pin_init(void);
76void ph1_sld8_pin_init(void);
77
78void ph1_ld4_clk_init(void);
79void ph1_pro4_clk_init(void);
80
81#define pr_err(fmt, args...) printf(fmt, ##args)
82
83#endif /* __MACH_INIT_H */