David Howells | b920de1 | 2008-02-08 04:19:31 -0800 | [diff] [blame] | 1 | /* DMA mapping routines for the MN10300 arch |
| 2 | * |
| 3 | * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved. |
| 4 | * Written by David Howells (dhowells@redhat.com) |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU General Public Licence |
| 8 | * as published by the Free Software Foundation; either version |
| 9 | * 2 of the Licence, or (at your option) any later version. |
| 10 | */ |
| 11 | #ifndef _ASM_DMA_MAPPING_H |
| 12 | #define _ASM_DMA_MAPPING_H |
| 13 | |
David Howells | b920de1 | 2008-02-08 04:19:31 -0800 | [diff] [blame] | 14 | #include <asm/cache.h> |
| 15 | #include <asm/io.h> |
| 16 | |
Christoph Hellwig | f151341 | 2016-01-20 15:01:50 -0800 | [diff] [blame] | 17 | extern struct dma_map_ops mn10300_dma_ops; |
FUJITA Tomonori | 06db881 | 2010-03-10 15:23:33 -0800 | [diff] [blame] | 18 | |
Christoph Hellwig | f151341 | 2016-01-20 15:01:50 -0800 | [diff] [blame] | 19 | static inline struct dma_map_ops *get_dma_ops(struct device *dev) |
David Howells | b920de1 | 2008-02-08 04:19:31 -0800 | [diff] [blame] | 20 | { |
Christoph Hellwig | f151341 | 2016-01-20 15:01:50 -0800 | [diff] [blame] | 21 | return &mn10300_dma_ops; |
David Howells | b920de1 | 2008-02-08 04:19:31 -0800 | [diff] [blame] | 22 | } |
| 23 | |
David Howells | b920de1 | 2008-02-08 04:19:31 -0800 | [diff] [blame] | 24 | static inline |
| 25 | void dma_cache_sync(void *vaddr, size_t size, |
| 26 | enum dma_data_direction direction) |
| 27 | { |
| 28 | mn10300_dcache_flush_inv(); |
| 29 | } |
| 30 | |
David Howells | b920de1 | 2008-02-08 04:19:31 -0800 | [diff] [blame] | 31 | #endif |