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.90_1 #2 (Red Hat Linux)) id 1fQUWc-0002Q8-DT for barebox@lists.infradead.org; Wed, 06 Jun 2018 09:14:55 +0000 Message-ID: <1528276465.26063.10.camel@pengutronix.de> From: Lucas Stach Date: Wed, 06 Jun 2018 11:14:25 +0200 In-Reply-To: <20180605181021.10467-1-o.rempel@pengutronix.de> References: <20180605181021.10467-1-o.rempel@pengutronix.de> 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: [PATCH v1 1/3] MIPS: ath79: provide driver for Atheros ART partition To: Oleksij Rempel , barebox@lists.infradead.org Cc: Oleksij Rempel QW0gRGllbnN0YWcsIGRlbiAwNS4wNi4yMDE4LCAyMDoxMCArMDIwMCBzY2hyaWViIE9sZWtzaWog UmVtcGVsOgo+ID4gRnJvbTogT2xla3NpaiBSZW1wZWwgPGxpbnV4QHJlbXBlbC1wcml2YXQuZGU+ Cj4gCj4gdGhpcyBwYXJ0aXRpb24gY29udGFpbnMgY2FsaWJyYXRpb24gZGF0YSBmb3IgV2lGaSBh bmQKPiBzb21lIGJvYXJkIHNwZWNpZmljIGRhdGEsIGxpa2UgTUFDIGFkZHJlc3MuCj4gCj4gRm9y IG5vdyB3ZSBjYXJlIG9ubHkgYWJvdXQgTUFDLgoKSSB0aGluayB5b3UgbWVudGlvbmVkIHRoYXQg dGhpcyBwYXJ0aXRpb24gaGFzIHNvbWUga2luZCBvZiBDUkMuIFdvdWxkCmJlIG5pY2UgdG8gaGFu ZGxlIHRoaXMsIGFzIGl0IHdvdWxkIGFkZCBhIGJpdCBtb3JlIHJvYnVzdG5lc3MuCgo+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