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.87 #1 (Red Hat Linux)) id 1chjLF-0002hN-A6 for barebox@lists.infradead.org; Sat, 25 Feb 2017 20:53:25 +0000 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Sat, 25 Feb 2017 21:52:39 +0100 Message-Id: <20170225205242.18106-2-u.kleine-koenig@pengutronix.de> In-Reply-To: <20170225205242.18106-1-u.kleine-koenig@pengutronix.de> References: <20170225205242.18106-1-u.kleine-koenig@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 1/4] mvebu: get initial position of register window from image header To: barebox@lists.infradead.org QSBwcm9ibGVtIHdoZW4gdXNpbmcgMm5kIHN0YWdlIGJvb3Rpbmcgb24gbXZlYnUgaXMgdGhhdCB0 aGUgZmlyc3QgYm9vdGxvYWRlcgphbHJlYWR5IHN3aXRjaGVkIHRoZSByZWdpc3RlciB3aW5kb3cg bG9jYXRpb24gZnJvbSAweGQwMDAwMDAwIHRvCjB4ZjEwMDAwMDAgYnkgd3JpdGluZyB0byAweGQw MDAwMDgwLiBXaGVuIHRoZSBzZWNvbmQgYm9vdGxvYWRlciBhbHNvCnRyaWVzIHRvIGRvIHRoaXMg c3dpdGNoIGl0IHdyaXRlcyB0byB0aGUgd3JvbmcgbG9jYXRpb24gcmVzdWx0aW5nIGluIGFuCmV4 Y2VwdGlvbiBhbmQgc28gYSBib290IGZhaWx1cmUuCgpGb3IgdGhpcyByZWFzb24gdGhlIGJhc2Ug YWRkcmVzcyBvZiB0aGUgcmVnaXN0ZXIgd2luZG93IGlzIHBhc3NlZCBpbiB0aGUKYm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