From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from smtp12.smtpout.orange.fr ([80.12.242.134] helo=smtp.smtpout.orange.fr) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Y8wCJ-00013Z-Mp for barebox@lists.infradead.org; Wed, 07 Jan 2015 19:23:20 +0000 From: Robert Jarzmik Date: Wed, 7 Jan 2015 20:22:39 +0100 Message-Id: <1420658559-17527-1-git-send-email-robert.jarzmik@free.fr> 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 v2] mtd: nand: add mrvl-nand driver To: barebox@lists.infradead.org, Ezequiel Garcia , Sascha Hauer VGhlIGRyaXZlciBpcyB0YWtlbiBmcm9tIHRoZSBMaW51eCBrZXJuZWwsIHdpdGggdGhlIGZvbGxv d2luZyBjaGFuZ2VzIDoKIC0gYWxsIERNQSByZW1vdmVkCiAtIGFsbCBhc3luY2hyb25vdXMgaGFu ZGxpbmcgcmVtb3ZlZCwgaW5jbHVkaW5nIHRoZSBpbnRlcnJ1cHQgaGFuZGxlciwKICAgYW5kIHRo ZSBhc3luY2hyb25vdXMgc3RhdGUgaGFuZGxpbmcKIC0gcHhhIGFybWFkYSBzdXBwb3J0IHJlbW92 ZWQKCk1vc3QgdGhlIGtlcm5lbCBzdHJ1Y3R1cmUgd2FzIGtlcHQsIHRvIGVhc2UgdXAgZnV0dXJl IGZpeGVzIGludGVncmF0aW9uCmZyb20gdGhlIGtlcm5lbCBkcml2ZXIuCgpUaGUgZHJpdmVyIGlz IHRlc3RlZCBvbiBhIHB4YTN4eCBzeXN0ZW0gZGV2ZWxvcG1lbnQKYm9hcmQgKGFrYS4genlsb25p dGUpLCBhbmQgcmVhZGluZywgd3JpdGluZywgZXJhc2luZywgYW5kIGJhZ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kX2NoaXAJY2hpcDsKKwlzdHJ1Y3QgbXRkX3BhcnRpdGlvbgkqcGFydHM7CisJ c3RydWN0IGRldmljZV9kCQkqZGV2OworCisJLyogY2FsY3VsYXRlZCBmcm9tIG1ydmxfbmFuZF9m bGFzaCBkYXRhICovCisJdW5zaWduZWQgaW50CQljb2xfYWRkcl9jeWNsZXM7CisJdW5zaWduZWQg aW50CQlyb3dfYWRkcl9jeWNsZXM7CisJc2l6ZV90CQkJcmVhZF9pZF9ieXRlczsKKworCXZvaWQg X19pb21lbQkJKm1taW9fYmFzZTsKKworCXVuc2lnbmVkIGludAkJYnVmX3N0YXJ0OworCXVuc2ln bmVkIGludAkJYnVmX2NvdW50OworCXVuc2lnbmVkIGludAkJYnVmX3NpemU7CisKKwl1bnNpZ25l ZCBjaGFyCQkqZGF0YV9idWZmOworCisJaW50CQkJa2VlcF9jb25maWc7CisJaW50CQkJZWNjX3N0 cmVuZ3RoOworCWludAkJCWVjY19zdGVwOworCisJaW50CQkJY3M7CQkvKiBzZWxlY3RlZCBjaGlw IDAvMSAqLworCWludAkJCXVzZV9lY2M7CS8qIHVzZSBIVyBFQ0MgPyAqLworCWludAkJCXVzZV9z cGFyZTsJLyogdXNlIHNwYXJlID8gKi8KKwlpbnQJCQlmbGFzaF9iYnQ7CisKKwl1bnNpZ25lZCBp bnQJCWRhdGFfc2l6ZTsJLyogZGF0YSB0byBiZSByZWFkIGZyb20gRklGTyAqLworCXVuc2lnbmVk IGludAkJY2h1bmtfc2l6ZTsJLyogc3BsaXQgY29tbWFuZHMgY2h1bmsgc2l6ZSAqLworCXVuc2ln bmVkIGludAkJb29iX3NpemU7CisJdW5zaWduZWQgaW50CQlzcGFyZV9zaXplOworCXVuc2lnbmVk IGludAkJZWNjX3NpemU7CisJdW5zaWduZWQgaW50CQltYXhfYml0ZmxpcHM7CisJaW50CQkJY21k X29uZ29pbmc7CisKKwkvKiBjYWNoZWQgcmVnaXN0ZXIgdmFsdWUgKi8KKwl1aW50MzJ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