2011-11-25 00:18:02 +00:00
|
|
|
/*
|
|
|
|
* (C) Copyright 2009
|
|
|
|
* Stefano Babic, DENX Software Engineering, sbabic@denx.de.
|
|
|
|
*
|
2013-07-08 07:37:19 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0+
|
2011-11-25 00:18:02 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _SYS_PROTO_H_
|
|
|
|
#define _SYS_PROTO_H_
|
|
|
|
|
2013-04-09 21:06:08 +00:00
|
|
|
#include <asm/imx-common/regs-common.h>
|
2014-01-26 17:06:40 +00:00
|
|
|
#include "../arch-imx/cpu.h"
|
2011-11-25 00:18:02 +00:00
|
|
|
|
2012-10-23 10:57:46 +00:00
|
|
|
#define is_soc_rev(rev) ((get_cpu_rev() & 0xFF) - rev)
|
2011-11-25 00:18:02 +00:00
|
|
|
u32 get_cpu_rev(void);
|
2013-08-29 17:57:10 +00:00
|
|
|
|
|
|
|
/* returns MXC_CPU_ value */
|
|
|
|
#define cpu_type(rev) (((rev) >> 12)&0xff)
|
|
|
|
|
|
|
|
/* use with MXC_CPU_ constants */
|
|
|
|
#define is_cpu_type(cpu) (cpu_type(get_cpu_rev()) == cpu)
|
|
|
|
|
2012-10-23 10:57:46 +00:00
|
|
|
const char *get_imx_type(u32 imxtype);
|
2012-10-23 10:57:48 +00:00
|
|
|
unsigned imx_ddr_size(void);
|
2011-11-25 00:18:02 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Initializes on-chip ethernet controllers.
|
|
|
|
* to override, implement board_eth_init()
|
|
|
|
*/
|
|
|
|
|
|
|
|
int fecmxc_initialize(bd_t *bis);
|
2012-04-29 08:11:13 +00:00
|
|
|
u32 get_ahb_clk(void);
|
|
|
|
u32 get_periph_clk(void);
|
2013-04-09 21:06:08 +00:00
|
|
|
|
|
|
|
int mxs_reset_block(struct mxs_register_32 *reg);
|
|
|
|
int mxs_wait_mask_set(struct mxs_register_32 *reg,
|
|
|
|
uint32_t mask,
|
|
|
|
unsigned int timeout);
|
|
|
|
int mxs_wait_mask_clr(struct mxs_register_32 *reg,
|
|
|
|
uint32_t mask,
|
|
|
|
unsigned int timeout);
|
2011-11-25 00:18:02 +00:00
|
|
|
#endif
|