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