From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from s250.sam-solutions.net ([217.21.49.219]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WLstt-0005mw-As for barebox@lists.infradead.org; Fri, 07 Mar 2014 11:25:18 +0000 Received: from s246.sam-solutions.net ([217.21.35.55]) by s250.sam-solutions.net with esmtps (TLSv1:RC4-MD5:128) (Exim 4.77) (envelope-from ) id 1WLstT-0004V9-96 for barebox@lists.infradead.org; Fri, 07 Mar 2014 14:24:47 +0300 Message-ID: <5319AA25.5050803@sam-solutions.net> Date: Fri, 7 Mar 2014 14:14:45 +0300 From: Dmitry Lavnikevich MIME-Version: 1.0 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: [PATCH 1/5] mtd: Update internal API to support 64-bit device size To: barebox@lists.infradead.org Cc: Grigory Milev , Dmitry Lavnikevich TVREIGludGVybmFsIEFQSSBwcmVzZW50bHkgdXNlcyAzMi1iaXQgdmFsdWVzIHRvIHJlcHJlc2Vu dCBkZXZpY2UKc2l6ZS4gVGhpcyBwYXRjaCB1cGRhdGVzIHRoZW0gdG8gNjQtYml0cyBidXQgbGVh dmVzIHRoZSBleHRlcm5hbCBBUEkKdW5jaGFuZ2VkLgoKSW4gZ2VuZXJhbCwgY2hhbmdpbmcgZnJv bSAzMi1iaXQgdG8gNjQtYml0IHZhbHVlcyBjYXVzZSBsaXR0bGUKb3Igbm8gY2hhbmdlcyB0byB0 aGUgbWFqb3JpdHkgb2YgdGhlIGNvZGUgd2l0aCB0aGUgZm9sbG93aW5nCmV4Y2VwdGlvbnM6CiAg IC0gcHJpbnRrIG1lc3NhZ2UgZm9ybWF0czsKICAgLSBkaXZpc2lvbiBhbmQgbW9kdWx1cyBvZiA2 NC1iaXQgdmFsdWVzIChtdGRfZGl2X2J5X3diLAogICAgIG10ZF9kaXZfYnlfZWIgbWF5IGJlIHVz ZWQgaW4gc29tZSBvZiBzdWNoIGNhc2VzKS4KCldhcyB0ZXN0ZWQgb24gcGh5RkxFWCBpLk1YNi4K ClNpZ25lZC1vZmYtYnk6IERtaXRyeSBMYXZuaWtldmljaCA8ZC5sYXZuaWtldmljaEBzYW0tc29s dXRpb25zLmNvbT4KU2lnbmVkLW9mZi1ieTogR3JpZ29yeSBNaWxldiA8Zy5taWxldkBzYW0tc29s dXRpb25zLmNvbT4KLS0tCiAgY29tbWFuZHMvbmFuZHRlc3QuYyAgICAgICAgICAgICAgICAgfCAg MiArLQogIGNvbW1hbmRzL3BhcnRpdGlvbi5jICAgICAgICAgICAgICAgIHwgMTEgKysrKysrLS0t LS0KICBkcml2ZXJzL210ZC9jb3JlLmMgICAgICAgICAgICAgICAgICB8ICAyICstCiAgZHJpdmVy cy9tdGQvZGV2aWNlcy9tMjVwODAuYyAgICAgICAgfCAgNSArKystLQogIGRyaXZlcnMvbXRkL2Rl dmljZXMvbXRkX2RhdGFmbGFzaC5jIHwgIDIgKy0KICBkcml2ZXJzL210ZC9tdGRvb2IuYyAgICAg ICAgICAgICAgICB8ICAyICstCiAgZHJpdmVycy9tdGQvbXRkcmF3LmMgICAgICAgICAgICAgICAg fCAgMiArLQogIGluY2x1ZGUvbGludXgvbXRkL210ZC1hYmkuaCAgICAgICAgIHwgMTIgKysrKysr KysrKystCiAgaW5jbHVkZS9saW51eC9tdGQvbXRkLmggICAgICAgICAgICAgfCAgOSArKysrKysr Ky0KICBsaWIvbGlibXRkLmMgICAgICAgICAgICAgICAgICAgICAgICB8IDEwICsrKysrLS0tLS0K ICAxMCBmaWxlcyBjaGFuZ2VkLCAzOCBpbnNlcnRpb25zKCspLCAxOSBkZWxldGlvbnMoLSkKCmRp ZmYgLS1naXQgYS9jb21tYW5kcy9uYW5kdGVzdC5jIGIvY29tbWFuZHMvbmFuZHRlc3QuYw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