From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1R71zb-0004P2-SY for barebox@lists.infradead.org; Fri, 23 Sep 2011 09:24:27 +0000 From: Sascha Hauer Date: Fri, 23 Sep 2011 11:24:16 +0200 Message-Id: <1316769860-24549-9-git-send-email-s.hauer@pengutronix.de> In-Reply-To: <1316769860-24549-1-git-send-email-s.hauer@pengutronix.de> References: <1316769860-24549-1-git-send-email-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-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 08/12] cfi flash: fix flash_make_cmd for big endian access To: barebox@lists.infradead.org VGhpcyBpcyBicm9rZW4gb24gYmlnIGVuZGlhbiBzeXN0ZW1zIHNpbmNlOgoKOTQzYjI3MSBjZmlf Zmxhc2g6IHN1cHBvcnQgb2YgdTMyIGNtZAoKSSBsb29rZWQgb3ZlciBpdCBhbmQgSSAqdGhpbmsq IHRoYXQgdGhlIGZ1bmN0aW9uIHdhcyBjb3JyZWN0CmZvciBib3RoIGJpZyBhbmQgbGl0dGxlIGVu ZGlhbiBzeXN0ZW1zIGJlZm9yZSB0aGlzIHBhdGNoLgpUbyBzdXBwb3J0IHUzMiBjbWQgd2Ugb25s eSBoYXZlIHRvIGNoYW5nZSB0aGUgZGF0YSB0eXBlIG9mCnRoZSBjb21tYW5kIGZyb20gdTggdG8g dTMyLgoKU2lnbmVkLW9mZi1ieTogU2FzY2hhIEhhdWVyIDxzLmhhdWVyQHBlbmd1dHJvbml4LmRl PgpDYzogVGVyZXNhIEfDoW1leiA8dC5nYW1lekBwaHl0ZWMuZGU+Ci0tLQogZHJ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