From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-lj1-x242.google.com ([2a00:1450:4864:20::242]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ipSFZ-0005fL-6W for barebox@lists.infradead.org; Thu, 09 Jan 2020 07:29:02 +0000 Received: by mail-lj1-x242.google.com with SMTP id z22so6114741ljg.1 for ; Wed, 08 Jan 2020 23:29:00 -0800 (PST) From: Antony Pavlov Date: Thu, 9 Jan 2020 10:28:52 +0300 Message-Id: <20200109072855.14154-3-antonynpavlov@gmail.com> In-Reply-To: <20200109072855.14154-1-antonynpavlov@gmail.com> References: <20200109072855.14154-1-antonynpavlov@gmail.com> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [RFC 2/5] WIP: MIPS: implement dma mapping functions To: barebox@lists.infradead.org Cc: Oleksij Rempel , Peter Mamonov VE9ETzogZml4IHdhcm5pbmdzCgphcmNoL21pcHMvaW5jbHVkZS9hc20vZG1hLW1hcHBpbmcuaDog SW4gZnVuY3Rpb24g4oCYZG1hX2ZyZWVfY29oZXJlbnTigJk6CmFyY2gvbWlwcy9pbmNsdWRlL2Fz bS9kbWEtbWFwcGluZy5oOjMxOjIxOiB3YXJuaW5nOiBwYXNzaW5nIGFyZ3VtZW50IDEgb2Yg4oCY cGh5c190b192aXJ04oCZCm1ha2VzIGludGVnZXIgZnJvbSBwb2ludGVyIHdpdGhvdXQgYSBjYXN0 IFstV2ludC1jb252ZXJzaW9uXQogICBmcmVlKHBoeXNfdG9fdmlydCh2YWRkcikpOwogICAgICAg ICAgICAgICAgICAgICBefn5+fgpJbiBmaWxlIGluY2x1ZGVkIGZyb20gaW5jbHVkZS9jb21tb24u aDozMzowLAogICAgICAgICAgICAgICAgIGZyb20gZHJpd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