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 1jdAQb-0001qp-6U for barebox@lists.infradead.org; Mon, 25 May 2020 10:34:04 +0000 From: Sascha Hauer Date: Mon, 25 May 2020 12:33:32 +0200 Message-Id: <20200525103349.19449-4-s.hauer@pengutronix.de> In-Reply-To: <20200525103349.19449-1-s.hauer@pengutronix.de> References: <20200525103349.19449-1-s.hauer@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: [PATCH 03/20] fastboot: split generic code from USB gadget To: Barebox List Cc: Edmund Henniges , =?UTF-8?q?Daniel=20Gl=C3=B6ckner?= RnJvbTogRWRtdW5kIEhlbm5pZ2VzIDxlaEBlbWxpeC5jb20+CgpUaGUgZmFzdGJvb3Qgc3BlY2lm aWNhdGlvbiBkZXNjcmliZXMgb3RoZXIgcHJvdG9jb2xzIGJleW9uZCBVU0IuIEFsbG93CnRoZXNl IHRvIHJldXNlIHRoZSBnZW5lcmljIHBhcnRzIG9mIHRoZSBleGlzdGluZyBmYXN0Ym9vdCBjb2Rl IHdoZW4gdGhleQphcmUgaW1wbGVtZW50ZWQuCgpNb3N0IG9mIHRoZSBjaGFuZ2VzIGluIGNvbW1v bi9mYXN0Ym9vdC5jIGFyZSBkdWUgdG8gdGhlIHJlbmFtaW5nIG9mIHN0cnVjdApmX2Zhc3Rib290 ICpmX2ZiIHRvIHN0cnVjdCBmYXN0Ym9vdCAqZmIuCgpTaWduZWQtb2ZmLWJ5OiBFZG11bmQgSGVu bmlnZXMgPGVoQGVtbGl4LmNvbT4KU2lnbmVkLW9mZi1ieTogRGFuaWVsIEds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