Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Chandan Nath | 98b036e | 2011-10-14 02:58:24 +0000 | [diff] [blame] | 2 | /* |
| 3 | * sys_proto.h |
| 4 | * |
| 5 | * System information header |
| 6 | * |
| 7 | * Copyright (C) 2011, Texas Instruments, Incorporated - http://www.ti.com/ |
Chandan Nath | 98b036e | 2011-10-14 02:58:24 +0000 | [diff] [blame] | 8 | */ |
| 9 | |
| 10 | #ifndef _SYS_PROTO_H_ |
| 11 | #define _SYS_PROTO_H_ |
pekon gupta | 5bbb099 | 2013-11-22 16:53:29 +0530 | [diff] [blame] | 12 | #include <linux/mtd/omap_gpmc.h> |
Tom Rini | 5243707 | 2013-08-30 16:28:46 -0400 | [diff] [blame] | 13 | #include <asm/arch/cpu.h> |
Chandan Nath | 98b036e | 2011-10-14 02:58:24 +0000 | [diff] [blame] | 14 | |
Chandan Nath | 98b036e | 2011-10-14 02:58:24 +0000 | [diff] [blame] | 15 | u32 get_cpu_rev(void); |
| 16 | u32 get_sysboot_value(void); |
| 17 | |
Satyanarayana, Sandhya | 1178475 | 2012-08-09 18:29:57 +0000 | [diff] [blame] | 18 | extern struct ctrl_stat *cstat; |
Chandan Nath | 98b036e | 2011-10-14 02:58:24 +0000 | [diff] [blame] | 19 | u32 get_device_type(void); |
Tom Rini | 51df26c | 2013-05-31 12:31:59 -0400 | [diff] [blame] | 20 | void save_omap_boot_params(void); |
Lokesh Vutla | d33266b | 2016-10-14 10:35:24 +0530 | [diff] [blame] | 21 | void setup_early_clocks(void); |
Chandan Nath | 77a73fe | 2012-01-09 20:38:59 +0000 | [diff] [blame] | 22 | void setup_clocks_for_console(void); |
Heiko Schocher | 0ef0817 | 2013-06-04 11:01:06 +0200 | [diff] [blame] | 23 | void mpu_pll_config_val(int mpull_m); |
Tom Rini | 034aba7 | 2012-07-03 09:20:06 -0700 | [diff] [blame] | 24 | void ddr_pll_config(unsigned int ddrpll_M); |
Tom Rini | 7a24772 | 2012-07-31 10:50:01 -0700 | [diff] [blame] | 25 | |
Ilya Yanok | 2ebbb86 | 2012-11-06 13:06:30 +0000 | [diff] [blame] | 26 | void sdelay(unsigned long); |
Tom Rini | 8eb48ff | 2013-03-14 11:15:25 +0000 | [diff] [blame] | 27 | |
Ilya Yanok | 2ebbb86 | 2012-11-06 13:06:30 +0000 | [diff] [blame] | 28 | void gpmc_init(void); |
Ladislav Michl | d5b1c27 | 2016-07-12 20:28:16 +0200 | [diff] [blame] | 29 | void enable_gpmc_cs_config(const u32 *gpmc_config, const struct gpmc_cs *cs, u32 base, |
Mark Jackson | 7808e1e | 2013-02-18 01:26:29 +0000 | [diff] [blame] | 30 | u32 size); |
Ladislav Michl | d3bc985 | 2017-03-06 13:54:30 +0100 | [diff] [blame] | 31 | int omap_nand_switch_ecc(uint32_t, uint32_t); |
Heiko Schocher | 8aa1da9 | 2013-06-05 07:47:56 +0200 | [diff] [blame] | 32 | |
Heiko Schocher | b21f2ac | 2013-07-30 10:48:54 +0530 | [diff] [blame] | 33 | void set_uart_mux_conf(void); |
| 34 | void set_mux_conf_regs(void); |
| 35 | void sdram_init(void); |
Lokesh Vutla | 89a83bf | 2013-07-30 10:48:52 +0530 | [diff] [blame] | 36 | u32 wait_on_value(u32, u32, void *, u32); |
Heiko Schocher | b21f2ac | 2013-07-30 10:48:54 +0530 | [diff] [blame] | 37 | #ifdef CONFIG_NOR_BOOT |
| 38 | void enable_norboot_pin_mux(void); |
| 39 | #endif |
Tom Rini | ac8fdf9 | 2013-08-30 16:28:44 -0400 | [diff] [blame] | 40 | void am33xx_spl_board_init(void); |
Tom Rini | 5243707 | 2013-08-30 16:28:46 -0400 | [diff] [blame] | 41 | int am335x_get_efuse_mpu_max_freq(struct ctrl_dev *cdev); |
Felix Brack | 17705ac | 2017-10-11 18:42:23 +0200 | [diff] [blame] | 42 | int am335x_get_mpu_vdd(int sil_rev, int frequency); |
Tom Rini | 5243707 | 2013-08-30 16:28:46 -0400 | [diff] [blame] | 43 | int am335x_get_tps65910_mpu_vdd(int sil_rev, int frequency); |
Chandan Nath | 98b036e | 2011-10-14 02:58:24 +0000 | [diff] [blame] | 44 | #endif |
Kishon Vijay Abraham I | 3dacf66 | 2015-08-19 16:16:26 +0530 | [diff] [blame] | 45 | |
| 46 | void enable_usb_clocks(int index); |
| 47 | void disable_usb_clocks(int index); |
Lokesh Vutla | 93e0f5b | 2016-10-14 10:35:25 +0530 | [diff] [blame] | 48 | void do_board_detect(void); |
Lokesh Vutla | 6302e53 | 2017-05-05 12:59:10 +0530 | [diff] [blame] | 49 | u32 get_sys_clk_index(void); |