diff options
Diffstat (limited to 'arch/nios2/include/asm')
-rw-r--r-- | arch/nios2/include/asm/dma-mapping.h | 14 | ||||
-rw-r--r-- | arch/nios2/include/asm/io.h | 4 | ||||
-rw-r--r-- | arch/nios2/include/asm/nios2-io.h | 4 | ||||
-rw-r--r-- | arch/nios2/include/asm/nios2.h | 4 | ||||
-rw-r--r-- | arch/nios2/include/asm/opcodes.h | 4 | ||||
-rw-r--r-- | arch/nios2/include/asm/ptrace.h | 4 | ||||
-rw-r--r-- | arch/nios2/include/asm/string.h | 4 | ||||
-rw-r--r-- | arch/nios2/include/asm/system.h | 4 |
8 files changed, 13 insertions, 29 deletions
diff --git a/arch/nios2/include/asm/dma-mapping.h b/arch/nios2/include/asm/dma-mapping.h index 9819a973e7..620c207a03 100644 --- a/arch/nios2/include/asm/dma-mapping.h +++ b/arch/nios2/include/asm/dma-mapping.h @@ -6,7 +6,6 @@ #include <asm/cache.h> - /* dma_alloc_coherent() return cache-line aligned allocation which is mapped * to uncached io region. * @@ -14,6 +13,7 @@ * 0x80000000 for nommu, 0xe0000000 for mmu */ +#if (DCACHE_SIZE != 0) static inline void *dma_alloc_coherent(size_t len, unsigned long *handle) { void *addr = malloc(len + DCACHE_LINE_SIZE); @@ -25,11 +25,23 @@ static inline void *dma_alloc_coherent(size_t len, unsigned long *handle) ~(DCACHE_LINE_SIZE - 1) & ~(IO_REGION_BASE); return (void *)(*handle | IO_REGION_BASE); } +#else +static inline void *dma_alloc_coherent(size_t len, unsigned long *handle) +{ + void *addr = malloc(len); + if (!addr) + return 0; + *handle = (unsigned long)addr; + return (void *)(*handle | IO_REGION_BASE); +} +#endif +#if (DCACHE_SIZE != 0) #define dma_alloc dma_alloc static inline void *dma_alloc(size_t size) { return xmemalign(DCACHE_LINE_SIZE, ALIGN(size, DCACHE_LINE_SIZE)); } +#endif #endif /* __ASM_NIOS2_DMA_MAPPING_H */ diff --git a/arch/nios2/include/asm/io.h b/arch/nios2/include/asm/io.h index 502edf6458..a88f0e2716 100644 --- a/arch/nios2/include/asm/io.h +++ b/arch/nios2/include/asm/io.h @@ -15,10 +15,6 @@ * 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 __ASM_NIOS2_IO_H_ diff --git a/arch/nios2/include/asm/nios2-io.h b/arch/nios2/include/asm/nios2-io.h index d8a4c678ec..cc8a9453e3 100644 --- a/arch/nios2/include/asm/nios2-io.h +++ b/arch/nios2/include/asm/nios2-io.h @@ -15,10 +15,6 @@ * 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 */ /************************************************************************* diff --git a/arch/nios2/include/asm/nios2.h b/arch/nios2/include/asm/nios2.h index 7c9eb65284..a2d8e22140 100644 --- a/arch/nios2/include/asm/nios2.h +++ b/arch/nios2/include/asm/nios2.h @@ -15,10 +15,6 @@ * 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 __NIOS2_H__ diff --git a/arch/nios2/include/asm/opcodes.h b/arch/nios2/include/asm/opcodes.h index 211f8ba9dd..21792dc7ec 100644 --- a/arch/nios2/include/asm/opcodes.h +++ b/arch/nios2/include/asm/opcodes.h @@ -15,10 +15,6 @@ * 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 __ASM_NIOS2_OPCODES_H_ diff --git a/arch/nios2/include/asm/ptrace.h b/arch/nios2/include/asm/ptrace.h index 5430880142..b0b47cbe09 100644 --- a/arch/nios2/include/asm/ptrace.h +++ b/arch/nios2/include/asm/ptrace.h @@ -15,10 +15,6 @@ * 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 __ASM_NIOS2_PTRACE_H_ diff --git a/arch/nios2/include/asm/string.h b/arch/nios2/include/asm/string.h index 7d150af119..28acf0fc0a 100644 --- a/arch/nios2/include/asm/string.h +++ b/arch/nios2/include/asm/string.h @@ -15,10 +15,6 @@ * 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 __ASM_NIOS2_STRING_H_ #define __ASM_NIOS2_STRING_H_ diff --git a/arch/nios2/include/asm/system.h b/arch/nios2/include/asm/system.h index 086d92bb0c..0f870d8456 100644 --- a/arch/nios2/include/asm/system.h +++ b/arch/nios2/include/asm/system.h @@ -15,10 +15,6 @@ * 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 __ASM_NIOS2_SYSTEM_H_ #define __ASM_NIOS2_SYSTEM_H_ |