]>
Commit | Line | Data |
---|---|---|
323d1f9d MY |
1 | /* |
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 | ||
4021b438 MY |
10 | #include <linux/types.h> |
11 | ||
46abfcc9 MY |
12 | #define UNIPHIER_MAX_NR_DRAM_CH 3 |
13 | ||
14 | struct uniphier_dram_ch { | |
15 | unsigned long base; | |
16 | unsigned long size; | |
17 | unsigned int width; | |
18 | }; | |
19 | ||
323d1f9d | 20 | struct uniphier_board_data { |
46abfcc9 MY |
21 | unsigned int dram_freq; |
22 | unsigned int dram_nr_ch; | |
4021b438 | 23 | bool dram_ddr3plus; |
46abfcc9 | 24 | struct uniphier_dram_ch dram_ch[UNIPHIER_MAX_NR_DRAM_CH]; |
323d1f9d MY |
25 | }; |
26 | ||
6ba60faf | 27 | const struct uniphier_board_data *uniphier_get_board_param(void); |
323d1f9d MY |
28 | |
29 | int ph1_sld3_init(const struct uniphier_board_data *bd); | |
30 | int ph1_ld4_init(const struct uniphier_board_data *bd); | |
31 | int ph1_pro4_init(const struct uniphier_board_data *bd); | |
32 | int ph1_sld8_init(const struct uniphier_board_data *bd); | |
28f40d4a | 33 | int ph1_pro5_init(const struct uniphier_board_data *bd); |
019df879 | 34 | int proxstream2_init(const struct uniphier_board_data *bd); |
323d1f9d MY |
35 | |
36 | #if defined(CONFIG_MICRO_SUPPORT_CARD) | |
37 | int ph1_sld3_sbc_init(const struct uniphier_board_data *bd); | |
38 | int ph1_ld4_sbc_init(const struct uniphier_board_data *bd); | |
39 | int ph1_pro4_sbc_init(const struct uniphier_board_data *bd); | |
019df879 | 40 | int proxstream2_sbc_init(const struct uniphier_board_data *bd); |
323d1f9d MY |
41 | #else |
42 | static inline int ph1_sld3_sbc_init(const struct uniphier_board_data *bd) | |
43 | { | |
44 | return 0; | |
45 | } | |
46 | ||
47 | static inline int ph1_ld4_sbc_init(const struct uniphier_board_data *bd) | |
48 | { | |
49 | return 0; | |
50 | } | |
51 | ||
52 | static inline int ph1_pro4_sbc_init(const struct uniphier_board_data *bd) | |
53 | { | |
54 | return 0; | |
55 | } | |
019df879 MY |
56 | |
57 | static inline int proxstream2_sbc_init(const struct uniphier_board_data *bd) | |
58 | { | |
59 | return 0; | |
60 | } | |
323d1f9d MY |
61 | #endif |
62 | ||
63 | int ph1_sld3_bcu_init(const struct uniphier_board_data *bd); | |
64 | int ph1_ld4_bcu_init(const struct uniphier_board_data *bd); | |
65 | ||
66 | int memconf_init(const struct uniphier_board_data *bd); | |
67 | int ph1_sld3_memconf_init(const struct uniphier_board_data *bd); | |
019df879 | 68 | int proxstream2_memconf_init(const struct uniphier_board_data *bd); |
323d1f9d MY |
69 | |
70 | int ph1_sld3_pll_init(const struct uniphier_board_data *bd); | |
71 | int ph1_ld4_pll_init(const struct uniphier_board_data *bd); | |
72 | int ph1_pro4_pll_init(const struct uniphier_board_data *bd); | |
73 | int ph1_sld8_pll_init(const struct uniphier_board_data *bd); | |
74 | ||
75 | int ph1_sld3_enable_dpll_ssc(const struct uniphier_board_data *bd); | |
76 | int ph1_ld4_enable_dpll_ssc(const struct uniphier_board_data *bd); | |
77 | ||
78 | int ph1_ld4_early_clk_init(const struct uniphier_board_data *bd); | |
28f40d4a | 79 | int ph1_pro5_early_clk_init(const struct uniphier_board_data *bd); |
019df879 | 80 | int proxstream2_early_clk_init(const struct uniphier_board_data *bd); |
323d1f9d MY |
81 | |
82 | int ph1_sld3_early_pin_init(const struct uniphier_board_data *bd); | |
83 | ||
84 | int ph1_ld4_umc_init(const struct uniphier_board_data *bd); | |
85 | int ph1_pro4_umc_init(const struct uniphier_board_data *bd); | |
86 | int ph1_sld8_umc_init(const struct uniphier_board_data *bd); | |
15607d0d | 87 | int proxstream2_umc_init(const struct uniphier_board_data *bd); |
323d1f9d MY |
88 | |
89 | void ph1_sld3_pin_init(void); | |
90 | void ph1_ld4_pin_init(void); | |
91 | void ph1_pro4_pin_init(void); | |
92 | void ph1_sld8_pin_init(void); | |
28f40d4a | 93 | void ph1_pro5_pin_init(void); |
019df879 MY |
94 | void proxstream2_pin_init(void); |
95 | void ph1_ld6b_pin_init(void); | |
323d1f9d MY |
96 | |
97 | void ph1_ld4_clk_init(void); | |
98 | void ph1_pro4_clk_init(void); | |
28f40d4a | 99 | void ph1_pro5_clk_init(void); |
019df879 | 100 | void proxstream2_clk_init(void); |
323d1f9d MY |
101 | |
102 | #define pr_err(fmt, args...) printf(fmt, ##args) | |
103 | ||
104 | #endif /* __MACH_INIT_H */ |