From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iqv3X-0004PV-Tf for barebox@lists.infradead.org; Mon, 13 Jan 2020 08:26:41 +0000 References: <20200109072855.14154-1-antonynpavlov@gmail.com> <20200109072855.14154-3-antonynpavlov@gmail.com> From: Oleksij Rempel Message-ID: Date: Mon, 13 Jan 2020 09:26:36 +0100 MIME-Version: 1.0 In-Reply-To: <20200109072855.14154-3-antonynpavlov@gmail.com> Content-Language: en-US List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: base64 Content-Type: text/plain; charset="utf-8"; Format="flowed" 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: Antony Pavlov , barebox@lists.infradead.org Cc: Peter Mamonov CgpPbiAwOS4wMS4yMCAwODoyOCwgQW50b255IFBhdmxvdiB3cm90ZToKPiBUT0RPOiBmaXggd2Fy bmluZ3MKPiAKPiBhcmNoL21pcHMvaW5jbHVkZS9hc20vZG1hLW1hcHBpbmcuaDogSW4gZnVuY3Rp b24g4oCYZG1hX2ZyZWVfY29oZXJlbnTigJk6Cj4gYXJjaC9taXBzL2luY2x1ZGUvYXNtL2RtYS1t YXBwaW5nLmg6MzE6MjE6IHdhcm5pbmc6IHBhc3NpbmcgYXJndW1lbnQgMSBvZiDigJhwaHlzX3Rv X3ZpcnTigJkKPiBtYWtlcyBpbnRlZ2VyIGZyb20gcG9pbnRlciB3aXRob3V0IGEgY2FzdCBbLVdp bnQtY29udmVyc2lvbl0KPiAgICAgZnJlZShwaHlzX3RvX3ZpcnQodmFkZHIpKTsKPiAgICAgICAg ICAgICAgICAgICAgICAgXn5+fn4KPiBJbiBmaWxlIGluY2x1ZGVkIGZyb20gaW5j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