2009-07-20 02:40:01 +00:00
|
|
|
/*
|
2010-06-08 20:07:46 +00:00
|
|
|
* (C) Copyright 2010
|
|
|
|
* Texas Instruments, <www.ti.com>
|
2009-07-20 02:40:01 +00:00
|
|
|
*
|
2013-07-08 07:37:19 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0+
|
2009-07-20 02:40:01 +00:00
|
|
|
*/
|
|
|
|
|
2010-06-08 20:07:46 +00:00
|
|
|
#ifndef _SYS_PROTO_H_
|
|
|
|
#define _SYS_PROTO_H_
|
|
|
|
|
2011-11-15 14:49:55 +00:00
|
|
|
#include <asm/arch/omap.h>
|
2013-05-30 02:54:32 +00:00
|
|
|
#include <asm/arch/clock.h>
|
2010-06-08 20:07:46 +00:00
|
|
|
#include <asm/io.h>
|
2011-07-21 13:09:59 +00:00
|
|
|
#include <asm/omap_common.h>
|
2013-11-22 11:23:29 +00:00
|
|
|
#include <linux/mtd/omap_gpmc.h>
|
2011-07-21 13:10:01 +00:00
|
|
|
#include <asm/arch/mux_omap4.h>
|
2014-05-16 17:02:24 +00:00
|
|
|
#include <asm/ti-common/sys_proto.h>
|
2010-06-08 20:07:46 +00:00
|
|
|
|
2013-04-24 00:41:24 +00:00
|
|
|
DECLARE_GLOBAL_DATA_PTR;
|
|
|
|
|
2016-02-27 18:18:53 +00:00
|
|
|
#ifdef CONFIG_SYS_EMIF_PRECALCULATED_TIMING_REGS
|
2013-11-27 15:46:21 +00:00
|
|
|
extern const struct emif_regs emif_regs_elpida_200_mhz_2cs;
|
|
|
|
extern const struct emif_regs emif_regs_elpida_380_mhz_1cs;
|
|
|
|
extern const struct emif_regs emif_regs_elpida_400_mhz_1cs;
|
|
|
|
extern const struct emif_regs emif_regs_elpida_400_mhz_2cs;
|
2014-12-18 21:28:35 +00:00
|
|
|
extern const struct dmm_lisa_map_regs lisa_map_2G_x_1_x_2;
|
|
|
|
extern const struct dmm_lisa_map_regs lisa_map_2G_x_2_x_2;
|
|
|
|
extern const struct dmm_lisa_map_regs ma_lisa_map_2G_x_2_x_2;
|
2016-02-27 18:18:53 +00:00
|
|
|
#else
|
|
|
|
extern const struct lpddr2_device_details elpida_2G_S4_details;
|
|
|
|
extern const struct lpddr2_device_details elpida_4G_S4_details;
|
|
|
|
#endif
|
2016-02-27 18:18:54 +00:00
|
|
|
|
2016-02-27 18:18:55 +00:00
|
|
|
#ifdef CONFIG_SYS_DEFAULT_LPDDR2_TIMINGS
|
|
|
|
extern const struct lpddr2_device_timings jedec_default_timings;
|
|
|
|
#else
|
2016-02-27 18:18:54 +00:00
|
|
|
extern const struct lpddr2_device_timings elpida_2G_S4_timings;
|
|
|
|
#endif
|
|
|
|
|
2010-06-08 20:07:46 +00:00
|
|
|
struct omap_sysinfo {
|
|
|
|
char *board_string;
|
|
|
|
};
|
2011-07-21 13:09:59 +00:00
|
|
|
extern const struct omap_sysinfo sysinfo;
|
2010-06-08 20:07:46 +00:00
|
|
|
|
2010-07-15 20:19:16 +00:00
|
|
|
void gpmc_init(void);
|
2010-06-08 20:07:46 +00:00
|
|
|
void watchdog_init(void);
|
|
|
|
u32 get_device_type(void);
|
2011-07-21 13:10:01 +00:00
|
|
|
void do_set_mux(u32 base, struct pad_conf_entry const *array, int size);
|
2016-02-27 18:18:56 +00:00
|
|
|
void set_muxconf_regs(void);
|
2010-08-04 16:39:40 +00:00
|
|
|
u32 wait_on_value(u32, u32, void *, u32);
|
|
|
|
void sdelay(unsigned long);
|
2016-02-24 18:30:52 +00:00
|
|
|
void setup_early_clocks(void);
|
2011-07-21 13:10:07 +00:00
|
|
|
void prcm_init(void);
|
2016-02-24 18:30:57 +00:00
|
|
|
void do_board_detect(void);
|
2013-02-04 04:22:00 +00:00
|
|
|
void bypass_dpll(u32 const base);
|
2011-07-21 13:10:07 +00:00
|
|
|
void freq_update_core(void);
|
|
|
|
u32 get_sys_clk_freq(void);
|
|
|
|
u32 omap4_ddr_clk(void);
|
2011-07-21 13:10:12 +00:00
|
|
|
void cancel_out(u32 *num, u32 *den, u32 den_limit);
|
2011-07-21 13:10:09 +00:00
|
|
|
void sdram_init(void);
|
2011-11-15 14:49:55 +00:00
|
|
|
u32 omap_sdram_size(void);
|
|
|
|
u32 cortex_rev(void);
|
2013-05-31 16:31:59 +00:00
|
|
|
void save_omap_boot_params(void);
|
2011-11-15 14:49:55 +00:00
|
|
|
void init_omap_revision(void);
|
|
|
|
void do_io_settings(void);
|
2013-05-30 02:54:33 +00:00
|
|
|
void sri2c_init(void);
|
2012-03-01 14:17:37 +00:00
|
|
|
int omap_vc_bypass_send_value(u8 sa, u8 reg_addr, u8 reg_data);
|
2012-05-29 19:26:41 +00:00
|
|
|
u32 warm_reset(void);
|
2012-05-29 19:26:43 +00:00
|
|
|
void force_emif_self_refresh(void);
|
2013-04-17 20:49:40 +00:00
|
|
|
void setup_warmreset_time(void);
|
2015-03-09 22:12:03 +00:00
|
|
|
|
|
|
|
#define OMAP4_SERVICE_PL310_CONTROL_REG_SET 0x102
|
|
|
|
|
2010-06-08 20:07:46 +00:00
|
|
|
#endif
|