From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-lf1-x143.google.com ([2a00:1450:4864:20::143]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1irTLE-0004mI-Mx for barebox@lists.infradead.org; Tue, 14 Jan 2020 21:03:16 +0000 Received: by mail-lf1-x143.google.com with SMTP id m30so10942034lfp.8 for ; Tue, 14 Jan 2020 13:03:09 -0800 (PST) Date: Wed, 15 Jan 2020 00:03:04 +0300 From: Antony Pavlov Message-Id: <20200115000304.1df0bac7ea06713dec0749cc@gmail.com> In-Reply-To: References: <20200109072855.14154-1-antonynpavlov@gmail.com> <20200109072855.14154-3-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: Re: [RFC 2/5] WIP: MIPS: implement dma mapping functions To: Oleksij Rempel Cc: barebox@lists.infradead.org, Peter Mamonov T24gTW9uLCAxMyBKYW4gMjAyMCAwOToyNjozNiArMDEwMApPbGVrc2lqIFJlbXBlbCA8by5yZW1w ZWxAcGVuZ3V0cm9uaXguZGU+IHdyb3RlOgoKPiBPbiAwOS4wMS4yMCAwODoyOCwgQW50b255IFBh dmxvdiB3cm90ZToKPiA+IFRPRE86IGZpeCB3YXJuaW5ncwo+ID4gCj4gPiBhcmNoL21pcHMvaW5j bHVkZS9hc20vZG1hLW1hcHBpbmcuaDogSW4gZnVuY3Rpb24g4oCYZG1hX2ZyZWVfY29oZXJlbnTi gJk6Cj4gPiBhcmNoL21pcHMvaW5jbHVkZS9hc20vZG1hLW1hcHBpbmcuaDozMToyMTogd2Fybmlu ZzogcGFzc2luZyBhcmd1bWVudCAxIG9mIOKAmHBoeXNfdG9fdmlydOKAmQo+ID4gbWFrZXMgaW50 ZWdlciBmcm9tIHBvaW50Z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