]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - arch/blackfin/include/asm/blackfin_local.h
Merge branch 'master' of git://git.denx.de/u-boot-arm
[karo-tx-uboot.git] / arch / blackfin / include / asm / blackfin_local.h
index 27034d3d06bd935518771df2a494fd916a60b92c..4d6eeab0ec126f576a00317b554b60d35ca111b2 100644 (file)
@@ -3,23 +3,7 @@
  *
  * Copyright (c) 2005-2007 Analog Devices Inc.
  *
- * 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., 51 Franklin St, Fifth Floor, Boston,
- * MA 02110-1301 USA
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #ifndef __BLACKFIN_LOCAL_H__
@@ -48,7 +32,8 @@
 #define L1_CACHE_SHIFT 5
 #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
 
-#include <asm/linkage.h>
+#include <linux/linkage.h>
+#include <asm/cache.h>
 
 #ifndef __ASSEMBLY__
 # ifdef SHARED_RESOURCES
 extern u_long get_vco(void);
 extern u_long get_cclk(void);
 extern u_long get_sclk(void);
+extern u_long get_sclk0(void);
+extern u_long get_sclk1(void);
+extern u_long get_dclk(void);
 
 # define bfin_revid() (bfin_read_CHIPID() >> 28)
 
-extern bool bfin_os_log_check(void);
+extern int bfin_os_log_check(void);
 extern void bfin_os_log_dump(void);
 
 extern void blackfin_icache_flush_range(const void *, const void *);
@@ -93,6 +81,8 @@ extern void blackfin_dcache_flush_invalidate_range(const void *, const void *);
 # define NOP_PAD_ANOMALY_05000198
 #endif
 
+#define BFIN_BUG() while (1) asm volatile("emuexcpt;");
+
 #define _bfin_readX(addr, size, asm_size, asm_ext) ({ \
        u32 __v; \
        __asm__ __volatile__( \
@@ -123,7 +113,7 @@ extern void blackfin_dcache_flush_invalidate_range(const void *, const void *);
        sizeof(*(addr)) == 1 ? bfin_read8(addr)  : \
        sizeof(*(addr)) == 2 ? bfin_read16(addr) : \
        sizeof(*(addr)) == 4 ? bfin_read32(addr) : \
-       ({ BUG(); 0; }); \
+       ({ BFIN_BUG(); 0; }); \
 })
 #define bfin_write(addr, val) \
 do { \
@@ -131,7 +121,8 @@ do { \
        case 1: bfin_write8(addr, val);  break; \
        case 2: bfin_write16(addr, val); break; \
        case 4: bfin_write32(addr, val); break; \
-       default: BUG(); \
+       default: \
+               BFIN_BUG(); \
        } \
 } while (0)