blob: 914182d1e8774c560c1233624dc65de7a4852dd8 [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);
Masahiro Yamadad5167d52015-09-22 00:27:40 +090029int ph1_pro5_init(const struct uniphier_board_data *bd);
Masahiro Yamada75f16f82015-09-22 00:27:39 +090030
31#if defined(CONFIG_MICRO_SUPPORT_CARD)
32int ph1_sld3_sbc_init(const struct uniphier_board_data *bd);
33int ph1_ld4_sbc_init(const struct uniphier_board_data *bd);
34int ph1_pro4_sbc_init(const struct uniphier_board_data *bd);
35#else
36static inline int ph1_sld3_sbc_init(const struct uniphier_board_data *bd)
37{
38 return 0;
39}
40
41static inline int ph1_ld4_sbc_init(const struct uniphier_board_data *bd)
42{
43 return 0;
44}
45
46static inline int ph1_pro4_sbc_init(const struct uniphier_board_data *bd)
47{
48 return 0;
49}
50#endif
51
52int ph1_sld3_bcu_init(const struct uniphier_board_data *bd);
53int ph1_ld4_bcu_init(const struct uniphier_board_data *bd);
54
55int memconf_init(const struct uniphier_board_data *bd);
56int ph1_sld3_memconf_init(const struct uniphier_board_data *bd);
57
58int ph1_sld3_pll_init(const struct uniphier_board_data *bd);
59int ph1_ld4_pll_init(const struct uniphier_board_data *bd);
60int ph1_pro4_pll_init(const struct uniphier_board_data *bd);
61int ph1_sld8_pll_init(const struct uniphier_board_data *bd);
62
63int ph1_sld3_enable_dpll_ssc(const struct uniphier_board_data *bd);
64int ph1_ld4_enable_dpll_ssc(const struct uniphier_board_data *bd);
65
66int ph1_ld4_early_clk_init(const struct uniphier_board_data *bd);
Masahiro Yamadad5167d52015-09-22 00:27:40 +090067int ph1_pro5_early_clk_init(const struct uniphier_board_data *bd);
Masahiro Yamada75f16f82015-09-22 00:27:39 +090068
69int ph1_sld3_early_pin_init(const struct uniphier_board_data *bd);
70
71int ph1_ld4_umc_init(const struct uniphier_board_data *bd);
72int ph1_pro4_umc_init(const struct uniphier_board_data *bd);
73int ph1_sld8_umc_init(const struct uniphier_board_data *bd);
74
75void ph1_sld3_pin_init(void);
76void ph1_ld4_pin_init(void);
77void ph1_pro4_pin_init(void);
78void ph1_sld8_pin_init(void);
Masahiro Yamadad5167d52015-09-22 00:27:40 +090079void ph1_pro5_pin_init(void);
Masahiro Yamada75f16f82015-09-22 00:27:39 +090080
81void ph1_ld4_clk_init(void);
82void ph1_pro4_clk_init(void);
Masahiro Yamadad5167d52015-09-22 00:27:40 +090083void ph1_pro5_clk_init(void);
Masahiro Yamada75f16f82015-09-22 00:27:39 +090084
85#define pr_err(fmt, args...) printf(fmt, ##args)
86
87#endif /* __MACH_INIT_H */