Blackfin: mass clean up of copyright/licensing info
[safe/jmp/linux-2.6] / arch / blackfin / include / asm / uaccess.h
index 97729be..c03b853 100644 (file)
@@ -1,4 +1,7 @@
-/* Changes made by Lineo Inc.    May 2001
+/*
+ * Copyright 2004-2009 Analog Devices Inc.
+ *
+ * Licensed under the GPL-2 or later.
  *
  * Based on: include/asm-m68knommu/uaccess.h
  */
@@ -59,12 +62,8 @@ static inline int is_in_rom(unsigned long addr)
 #ifndef CONFIG_ACCESS_CHECK
 static inline int _access_ok(unsigned long addr, unsigned long size) { return 1; }
 #else
-#ifdef CONFIG_ACCESS_OK_L1
-extern int _access_ok(unsigned long addr, unsigned long size)__attribute__((l1_text));
-#else
 extern int _access_ok(unsigned long addr, unsigned long size);
 #endif
-#endif
 
 /*
  * The exception table consists of pairs of addresses: the first is the
@@ -83,9 +82,6 @@ struct exception_table_entry {
        unsigned long insn, fixup;
 };
 
-/* Returns 0 if exception not found and fixup otherwise.  */
-extern unsigned long search_exception_table(unsigned long);
-
 /*
  * These are the main single-value transfer routines.  They automatically
  * use the right size if we just have the right pointer type.
@@ -272,4 +268,26 @@ __clear_user(void *to, unsigned long n)
 
 #define clear_user(to, n) __clear_user(to, n)
 
+/* How to interpret these return values:
+ *     CORE:      can be accessed by core load or dma memcpy
+ *     CORE_ONLY: can only be accessed by core load
+ *     DMA:       can only be accessed by dma memcpy
+ *     IDMA:      can only be accessed by interprocessor dma memcpy (BF561)
+ *     ITEST:     can be accessed by isram memcpy or dma memcpy
+ */
+enum {
+       BFIN_MEM_ACCESS_CORE = 0,
+       BFIN_MEM_ACCESS_CORE_ONLY,
+       BFIN_MEM_ACCESS_DMA,
+       BFIN_MEM_ACCESS_IDMA,
+       BFIN_MEM_ACCESS_ITEST,
+};
+/**
+ *     bfin_mem_access_type() - what kind of memory access is required
+ *     @addr:   the address to check
+ *     @size:   number of bytes needed
+ *     @return: <0 is error, >=0 is BFIN_MEM_ACCESS_xxx enum (see above)
+ */
+int bfin_mem_access_type(unsigned long addr, unsigned long size);
+
 #endif                         /* _BLACKFIN_UACCESS_H */