diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2009-10-22 14:21:28 +0200 |
---|---|---|
committer | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2009-10-22 14:21:28 +0200 |
commit | 37e96f83bca38c26179b38d0130b0462ae09bb50 (patch) | |
tree | 92de76f99e9358996c452256a53fdafb412a748e /arch/blackfin/include/asm/blackfin.h | |
parent | f6a579da9c6c3e2d776f9251bcc727f6e17c0a11 (diff) | |
download | barebox-37e96f83bca38c26179b38d0130b0462ae09bb50.tar.gz barebox-37e96f83bca38c26179b38d0130b0462ae09bb50.tar.xz |
[BLACKFIN] move include/asm-blackfin to arch/blackfin/include/asm
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'arch/blackfin/include/asm/blackfin.h')
-rw-r--r-- | arch/blackfin/include/asm/blackfin.h | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/arch/blackfin/include/asm/blackfin.h b/arch/blackfin/include/asm/blackfin.h new file mode 100644 index 0000000000..f2d1e65be7 --- /dev/null +++ b/arch/blackfin/include/asm/blackfin.h @@ -0,0 +1,78 @@ +/* + * U-boot - blackfin.h + * + * Copyright (c) 2005 blackfin.uclinux.org + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#ifndef _BLACKFIN_H_ +#define _BLACKFIN_H_ + +#define lo(con32) ((con32) & 0xFFFF) +#define hi(con32) (((con32) >> 16) & 0xFFFF) + +#ifdef CONFIG_BF561 + +#include <asm/cpu/defBF561.h> +#include <asm/cpu/defBF561_extn.h> +#ifndef __ASSEMBLY__ +#include <asm/cpu/cdef_LPBlackfin.h> +#include <asm/cpu/cdefBF561.h> +#endif + +#endif + +#ifndef __ASSEMBLY__ +/* Get the System clock */ +ulong get_sclk(void); +#endif + +#if ( CONFIG_CLKIN_HALF == 0 ) +#define CONFIG_VCO_HZ ( CONFIG_CLKIN_HZ * CONFIG_VCO_MULT ) +#else +#define CONFIG_VCO_HZ (( CONFIG_CLKIN_HZ * CONFIG_VCO_MULT ) / 2 ) +#endif + +#if (CONFIG_PLL_BYPASS == 0) +#define CONFIG_CCLK_HZ ( CONFIG_VCO_HZ / CONFIG_CCLK_DIV ) +#define CONFIG_SCLK_HZ ( CONFIG_VCO_HZ / CONFIG_SCLK_DIV ) +#else +#define CONFIG_CCLK_HZ CONFIG_CLKIN_HZ +#define CONFIG_SCLK_HZ CONFIG_CLKIN_HZ +#endif + +#if (CONFIG_CCLK_DIV == 1) +#define CONFIG_CCLK_ACT_DIV CCLK_DIV1 +#endif +#if (CONFIG_CCLK_DIV == 2) +#define CONFIG_CCLK_ACT_DIV CCLK_DIV2 +#endif +#if (CONFIG_CCLK_DIV == 4) +#define CONFIG_CCLK_ACT_DIV CCLK_DIV4 +#endif +#if (CONFIG_CCLK_DIV == 8) +#define CONFIG_CCLK_ACT_DIV CCLK_DIV8 +#endif +#ifndef CONFIG_CCLK_ACT_DIV +#define CONFIG_CCLK_ACT_DIV CONFIG_CCLK_DIV_not_defined_properly +#endif + +#endif + |