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 1WMyj3-00033d-D4 for barebox@lists.infradead.org; Mon, 10 Mar 2014 11:50:37 +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 1WMyii-000371-2A for barebox@lists.infradead.org; Mon, 10 Mar 2014 14:50:12 +0300 From: Dmitry Lavnikevich Date: Mon, 10 Mar 2014 14:39:49 +0300 Message-ID: <1394451593-3090-1-git-send-email-d.lavnikevich@sam-solutions.com> 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/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 LSBwcmludGsgbWVzc2FnZSBmb3JtYXRzOwogIC0gZGl2aXNpb24gYW5kIG1vZHVsdXMgb2YgNjQt Yml0IHZhbHVlcyAobXRkX2Rpdl9ieV93YiwKICAgIG10ZF9kaXZfYnlfZWIgbWF5IGJlIHVzZWQg aW4gc29tZSBvZiBzdWNoIGNhc2VzKS4KCldhcyB0ZXN0ZWQgb24gcGh5RkxFWCBpLk1YNi4KClNp Z25lZC1vZmYtYnk6IERtaXRyeSBMYXZuaWtldmljaCA8ZC5sYXZuaWtldmljaEBzYW0tc29sdXRp b25zLmNvbT4KU2lnbmVkLW9mZi1ieTogR3JpZ29yeSBNaWxldiA8Zy5taWxldkBzYW0tc29sdXRp b25zLmNvbT4KLS0tCiBjb21tYW5kcy9uYW5kdGVzdC5jICAgICAgICAgICAgICAgICB8ICAyICst CiBjb21tYW5kcy9wYXJ0aXRpb24uYyAgICAgICAgICAgICAgICB8IDExICsrKysrKy0tLS0tCiBk cml2ZXJzL210ZC9jb3JlLmMgICAgICAgICAgICAgICAgICB8ICAyICstCiBkcml2ZXJzL210ZC9k ZXZpY2VzL20yNXA4MC5jICAgICAgICB8ICA1ICsrKy0tCiBkcml2ZXJzL210ZC9kZXZpY2VzL210 ZF9kYXRhZmxhc2guYyB8ICAyICstCiBkcml2ZXJzL210ZC9tdGRvb2IuYyAgICAgICAgICAgICAg ICB8ICAyICstCiBkcml2ZXJzL210ZC9tdGRyYXcuYyAgICAgICAgICAgICAgICB8ICAyICstCiBp bmNsdWRlL2xpbnV4L210ZC9tdGQtYWJpLmggICAgICAgICB8IDEyICsrKysrKysrKysrLQogaW5j bHVkZS9saW51eC9tdGQvbXRkLmggICAgICAgICAgICAgfCAgOSArKysrKysrKy0KIGxpYi9saWJt dGQuYyAgICAgICAgICAgICAgICAgICAgICAgIHwgMTAgKysrKystLS0tLQogMTAgZmlsZXMgY2hh bmdlZCwgMzggaW5zZXJ0aW9ucygrKSwgMTkgZGVsZXRpb25zKC0pCgpkaWZmIC0tZ2l0IGEvY29t bWFuZHMvbmFuZHRlc3QuYyBiL2NvbW1hbmRzL25hbmR0ZXN0LmMKaW5kZXggMGRhNTQ0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