mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Antony Pavlov <antonynpavlov@gmail.com>
To: barebox@lists.infradead.org
Cc: Antony Pavlov <antony@niisi.msk.ru>, Peter Mamonov <pmamonov@gmail.com>
Subject: [RFC 4/9] MIPS: add trivial dma support
Date: Fri, 28 Aug 2015 01:24:05 +0300	[thread overview]
Message-ID: <1440714250-28080-5-git-send-email-antonynpavlov@gmail.com> (raw)
In-Reply-To: <1440714250-28080-1-git-send-email-antonynpavlov@gmail.com>

From: Antony Pavlov <antony@niisi.msk.ru>

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
 arch/mips/Kconfig                   |  1 +
 arch/mips/include/asm/dma-mapping.h |  1 +
 arch/mips/include/asm/dma.h         |  5 +++++
 arch/mips/lib/Makefile              |  1 +
 arch/mips/lib/dma-default.c         | 28 ++++++++++++++++++++++++++++
 5 files changed, 36 insertions(+)

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index aeb5c04..e806baa 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -6,6 +6,7 @@ config MIPS
 	select HAS_KALLSYMS
 	select HAVE_CONFIGURABLE_MEMORY_LAYOUT
 	select HAVE_CONFIGURABLE_TEXT_BASE
+	select HAS_DMA
 	default y
 
 config SYS_SUPPORTS_BIG_ENDIAN
diff --git a/arch/mips/include/asm/dma-mapping.h b/arch/mips/include/asm/dma-mapping.h
index 6395112..eb516a1 100644
--- a/arch/mips/include/asm/dma-mapping.h
+++ b/arch/mips/include/asm/dma-mapping.h
@@ -1,6 +1,7 @@
 #ifndef _ASM_DMA_MAPPING_H
 #define _ASM_DMA_MAPPING_H
 
+#include <common.h>
 #include <xfuncs.h>
 #include <asm/addrspace.h>
 #include <asm/types.h>
diff --git a/arch/mips/include/asm/dma.h b/arch/mips/include/asm/dma.h
index 30a58c7..f68df13 100644
--- a/arch/mips/include/asm/dma.h
+++ b/arch/mips/include/asm/dma.h
@@ -10,4 +10,9 @@
 
 #include "asm/dma-mapping.h"
 
+void dma_sync_single_for_cpu(unsigned long address, size_t size,
+					   enum dma_data_direction dir);
+void dma_sync_single_for_device(unsigned long address, size_t size,
+					      enum dma_data_direction dir);
+
 #endif /* __ASM_DMA_H */
diff --git a/arch/mips/lib/Makefile b/arch/mips/lib/Makefile
index 71c4f6b..d2fc3f8 100644
--- a/arch/mips/lib/Makefile
+++ b/arch/mips/lib/Makefile
@@ -6,6 +6,7 @@ obj-y += ashrdi3.o
 obj-y += cpu-probe.o
 obj-y += traps.o
 obj-y += genex.o
+obj-y += dma-default.o
 
 obj-$(CONFIG_CPU_MIPS32) += c-r4k.o
 obj-$(CONFIG_CPU_MIPS64) += c-r4k.o
diff --git a/arch/mips/lib/dma-default.c b/arch/mips/lib/dma-default.c
new file mode 100644
index 0000000..5e77ae1
--- /dev/null
+++ b/arch/mips/lib/dma-default.c
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2015 Antony Pavlov <antonynpavlov@gmail.com>
+ *
+ * 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 version 2
+ * as published by the Free Software Foundation.
+ *
+ * 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.
+ *
+ */
+
+#include <dma.h>
+
+void dma_sync_single_for_cpu(unsigned long address, size_t size,
+			     enum dma_data_direction dir)
+{
+}
+
+void dma_sync_single_for_device(unsigned long address, size_t size,
+				enum dma_data_direction dir)
+{
+}
-- 
2.5.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2015-08-27 22:24 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-27 22:24 [RFC 0/9] ehci-hcd.c: make it works on big-endian mips (AR9331) Antony Pavlov
2015-08-27 22:24 ` [RFC 1/9] WIP: make ehci-hcd.c happy on big-endian MIPS Antony Pavlov
2015-08-27 22:24 ` [RFC 2/9] WIP: fix drivers/usb/core/usb.c Antony Pavlov
2015-08-28  6:11   ` Sascha Hauer
2015-08-28 15:51     ` Antony Pavlov
2015-08-31  6:45       ` Sascha Hauer
2015-08-27 22:24 ` [RFC 3/9] MIPS: add virt_to_phys() and phys_to_virt() Antony Pavlov
2015-08-28  6:34   ` Sascha Hauer
2015-08-28 15:46     ` Antony Pavlov
2015-09-04  6:20       ` Sascha Hauer
2015-09-04  7:27         ` Antony Pavlov
2015-09-04  8:44           ` Sascha Hauer
2015-12-06 14:50         ` Antony Pavlov
2015-12-07 10:27           ` Sascha Hauer
2015-12-08  9:11             ` Antony Pavlov
2015-12-08 11:46             ` Peter Mamonov
2015-12-09 13:03               ` Sascha Hauer
2015-08-27 22:24 ` Antony Pavlov [this message]
2015-08-27 22:24 ` [RFC 5/9] ehci-hcd.c: make it works on mips Antony Pavlov
2015-08-27 22:24 ` [RFC 6/9] usb: ehci: drop unusable CONFIG_EHCI_MMIO_BIG_ENDIAN condition Antony Pavlov
2015-08-27 22:24 ` [RFC 7/9] usb: ehci: add big-endian registers support Antony Pavlov
2015-08-28  6:19   ` Sascha Hauer
2015-08-28 15:49     ` Antony Pavlov
2015-08-27 22:24 ` [RFC 8/9] MIPS: tplink-mr3020: select big-endian EHCI support Antony Pavlov
2015-08-27 22:24 ` [RFC 9/9] MIPS: tplink-mr3020_defconfig: enable usb stuff Antony Pavlov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1440714250-28080-5-git-send-email-antonynpavlov@gmail.com \
    --to=antonynpavlov@gmail.com \
    --cc=antony@niisi.msk.ru \
    --cc=barebox@lists.infradead.org \
    --cc=pmamonov@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox