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