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 10 struct 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 23 const struct uniphier_board_data *uniphier_get_board_param(void); 24 25 int ph1_sld3_init(const struct uniphier_board_data *bd); 26 int ph1_ld4_init(const struct uniphier_board_data *bd); 27 int ph1_pro4_init(const struct uniphier_board_data *bd); 28 int ph1_sld8_init(const struct uniphier_board_data *bd); 29 int ph1_pro5_init(const struct uniphier_board_data *bd); 30 int proxstream2_init(const struct uniphier_board_data *bd); 31 32 #if defined(CONFIG_MICRO_SUPPORT_CARD) 33 int ph1_sld3_sbc_init(const struct uniphier_board_data *bd); 34 int ph1_ld4_sbc_init(const struct uniphier_board_data *bd); 35 int ph1_pro4_sbc_init(const struct uniphier_board_data *bd); 36 int proxstream2_sbc_init(const struct uniphier_board_data *bd); 37 #else 38 static inline int ph1_sld3_sbc_init(const struct uniphier_board_data *bd) 39 { 40 return 0; 41 } 42 43 static inline int ph1_ld4_sbc_init(const struct uniphier_board_data *bd) 44 { 45 return 0; 46 } 47 48 static inline int ph1_pro4_sbc_init(const struct uniphier_board_data *bd) 49 { 50 return 0; 51 } 52 53 static inline int proxstream2_sbc_init(const struct uniphier_board_data *bd) 54 { 55 return 0; 56 } 57 #endif 58 59 int ph1_sld3_bcu_init(const struct uniphier_board_data *bd); 60 int ph1_ld4_bcu_init(const struct uniphier_board_data *bd); 61 62 int memconf_init(const struct uniphier_board_data *bd); 63 int ph1_sld3_memconf_init(const struct uniphier_board_data *bd); 64 int proxstream2_memconf_init(const struct uniphier_board_data *bd); 65 66 int ph1_sld3_pll_init(const struct uniphier_board_data *bd); 67 int ph1_ld4_pll_init(const struct uniphier_board_data *bd); 68 int ph1_pro4_pll_init(const struct uniphier_board_data *bd); 69 int ph1_sld8_pll_init(const struct uniphier_board_data *bd); 70 71 int ph1_sld3_enable_dpll_ssc(const struct uniphier_board_data *bd); 72 int ph1_ld4_enable_dpll_ssc(const struct uniphier_board_data *bd); 73 74 int ph1_ld4_early_clk_init(const struct uniphier_board_data *bd); 75 int ph1_pro5_early_clk_init(const struct uniphier_board_data *bd); 76 int proxstream2_early_clk_init(const struct uniphier_board_data *bd); 77 78 int ph1_sld3_early_pin_init(const struct uniphier_board_data *bd); 79 80 int ph1_ld4_umc_init(const struct uniphier_board_data *bd); 81 int ph1_pro4_umc_init(const struct uniphier_board_data *bd); 82 int ph1_sld8_umc_init(const struct uniphier_board_data *bd); 83 int proxstream2_umc_init(const struct uniphier_board_data *bd); 84 85 void ph1_sld3_pin_init(void); 86 void ph1_ld4_pin_init(void); 87 void ph1_pro4_pin_init(void); 88 void ph1_sld8_pin_init(void); 89 void ph1_pro5_pin_init(void); 90 void proxstream2_pin_init(void); 91 void ph1_ld6b_pin_init(void); 92 93 void ph1_ld4_clk_init(void); 94 void ph1_pro4_clk_init(void); 95 void ph1_pro5_clk_init(void); 96 void proxstream2_clk_init(void); 97 98 #define pr_err(fmt, args...) printf(fmt, ##args) 99 100 #endif /* __MACH_INIT_H */ 101