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.80.1 #2 (Red Hat Linux)) id 1Ze1jZ-00051J-Lq for barebox@lists.infradead.org; Mon, 21 Sep 2015 14:06:46 +0000 From: Enrico Jorns Date: Mon, 21 Sep 2015 16:04:42 +0200 Message-Id: <1442844284-27870-3-git-send-email-ejo@pengutronix.de> In-Reply-To: <1442844284-27870-1-git-send-email-ejo@pengutronix.de> References: <1442844284-27870-1-git-send-email-ejo@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 2/4] mtd nand_denali: Add denali nand driver To: barebox@lists.infradead.org Cc: Enrico Jorns VGhlIGRyaXZlciBpcyBiYXNlZCBvbiB0aGUgZGVuYWxpIGRyaXZlciBmcm9tIHRoZSBsaW51eCBr ZXJuZWwKClNpZ25lZC1vZmYtYnk6IEVucmljbyBKb3JucyA8ZWpvQHBlbmd1dHJvbml4LmRlPgot LS0KIGRyaXZlcnMvbXRkL25hbmQvS2NvbmZpZyAgICAgICAgICB8ICAgMjYgKwogZHJpdmVycy9t dGQvbmFuZC9NYWtlZmlsZSAgICAgICAgIHwgICAgMyArCiBkcml2ZXJzL210ZC9uYW5kL2RlbmFs aS5oICAgICAgICAgfCAgNDk5ICsrKysrKysrKysrKwogZHJpdmVycy9tdGQvbmFuZC9uYW5kX2Rl bmFsaS5jICAgIHwgMTU1OSArKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrCiBk cml2ZXJzL210ZC9uYW5kL25hbmRfZGVuYWxpX2R0LmMgfCAgMTAxICsrKwogNSBmaWxlcyBjaGFu Z2VkLCAyMTg4IGluc2VydGlvbnMoK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AwCisjZGVmaW5lIE1PREVfMTAgICAgMHgwODAwMDAwMAorI2RlZmlu ZSBNT0RFXzExICAgIDB4MEMwMDAwMDAKKworCisjZGVmaW5lIERBVEFfVFJBTlNGRVJfTU9ERSAg ICAgICAgICAgICAgMAorI2RlZmluZSBQUk9URUNUSU9OX1BFUl9CTE9DSyAgICAgICAgICAgIDEK KyNkZWZpbmUgTE9BRF9XQUlUX0NPVU5UICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIFBST0dS QU1fV0FJVF9DT1VOVCAgICAgICAgICAgICAgMworI2RlZmluZSBFUkFTRV9XQUlUX0NPVU5UICAg ICAgICAgICAgICAgIDQKKyNkZWZpbmUgSU5UX01PTklUT1JfQ1lDTEVfQ09VTlQgICAgICAgICA1 CisjZGVmaW5lIFJFQURfQlVTWV9QSU5fRU5BQkxFRCAgICAgICAgICAgNgorI2RlZmluZSBNVUxU SVBMQU5FX09QRVJBVElPTl9TVVBQT1JUICAgIDcKKyNkZWZpbmUgUFJFX0ZFVENIX01PREUgICAg ICAgICAgICAgICAgICA4CisjZGVmaW5lIENFX0RPTlRfQ0FSRV9TVVBQT1JUICAgICAgICAgICAg OQorI2RlZmluZSBDT1BZQkFDS19TVVBQT1JUICAgICAgICAgICAgICAgIDEwCisjZGVmaW5lIENB Q0hFX1dSSVRFX1NVUFBPUlQgICAgICAgICAgICAgMTEKKyNkZWZpbmUgQ0FDSEVfUkVBRF9TVVBQ T1JUICAgICAgICAgICAgICAxMgorI2RlZmluZSBOVU1fUEFHRVNfSU5fQkxPQ0sgICAgICAgICAg ICAgIDEzCisjZGVmaW5lIEVDQ19FTkFCTEVfU0VMRUNUICAgICAgICAgICAgICAgMTQKKyNkZWZp bmUgV1JJVEVfRU5BQkxFXzJfUkVBRF9FTkFCTEUgICAgICAxNQorI2RlZmluZSBBRERSRVNTXzJf REFUQSAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFJFQURfRU5BQkxFXzJfV1JJVEVfRU5B QkxFICAgIC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