Date: Fri, 24 May 2013 14:51:58 +0400 From: Alexander Fedorov <alexander.fedorov@rtlservice.com> To: current@freebsd.org Subject: Re: [PATCH] NAND Framework ONFI chip detection Message-ID: <CAOcOT_y3Lfkmj4RJGt2%2Bi1CKe9cJoCoDOdqa0iKxSDwFgQ_6kQ@mail.gmail.com> In-Reply-To: <CAOcOT_z9wCPj7yf-TjGjdyQf7mEQZug0ppAGGZMwpe2H5Sgxbg@mail.gmail.com> References: <CAOcOT_z9wCPj7yf-TjGjdyQf7mEQZug0ppAGGZMwpe2H5Sgxbg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--089e0118289e8b1e9704dd749619 Content-Type: text/plain; charset=ISO-8859-1 Hi, current! I received a positive feedback from Grzegorz Bernacki (semihalf). He said that my patch is ok. Can anyone commit a proposed patch? 2013/5/21 Alexander Fedorov <alexander.fedorov@rtlservice.com>: > Hi all! > > I'm writing NAND Flash controller driver for my Hackberry board. > And I found that NAND Framework does not properly detecting ONFI > compiliant chips. > > First, ONFI specification says (p. 40 > http://www.onfi.org/~/media/ONFI/specs/ONFI_1_0_Gold.pdf): > >>The ONFI signature is the ASCII encoding of 'ONFI' where 'O' = 4Fh, 'N' = 4Eh, 'F' = 46h, 'I' = 49h. > > But, current code check it for 'o', 'n', 'f', 'I'. > > Second, function "onfi_read_parameter" (nand_generic.c) read > parameters page using this construction: >>NANDBUS_READ_BUFFER(nandbus, params, sizeof(struct onfi_params)); > > So, structure onfi_params must be declared as packed. > > Proposed patch solves the problem for me. > Is this patch ok? --089e0118289e8b1e9704dd749619 Content-Type: application/octet-stream; name="nand_framework_onfi_probing.patch" Content-Disposition: attachment; filename="nand_framework_onfi_probing.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hh38xdmz1 SW5kZXg6IG5hbmQuaAo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBuYW5kLmgJKHJldmlzaW9uIDI1MDg1NykKKysr IG5hbmQuaAkod29ya2luZyBjb3B5KQpAQCAtMjE5LDcgKzIxOSw3IEBACiAJdWludDE2X3QJdmVu ZG9yX3JldjsKIAl1aW50OF90CQl2ZW5kb3Jfc3BlY1s4XTsKIAl1aW50MTZfdAljcmM7Ci19Owor fV9fYXR0cmlidXRlX18oKHBhY2tlZCkpOwogCiBzdHJ1Y3QgbmFuZF9lY2NfZGF0YSB7CiAJaW50 CWVjY3NpemU7CQkvKiBOdW1iZXIgb2YgZGF0YSBieXRlcyBwZXIgRUNDIHN0ZXAgKi8KSW5kZXg6 IG5hbmRidXMuYwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09Ci0tLSBuYW5kYnVzLmMJKHJldmlzaW9uIDI1MDg1NykKKysr IG5hbmRidXMuYwkod29ya2luZyBjb3B5KQpAQCAtMzMxLDcgKzMzMSw3IEBACiBuYW5kX3Byb2Jl X29uZmkoZGV2aWNlX3QgYnVzLCB1aW50OF90ICpvbmZpX2NvbXBsaWFudCkKIHsKIAlkZXZpY2Vf dCBuZmM7Ci0JY2hhciBvbmZpX2lkW10gPSB7J28nLCAnbicsICdmJywgJ2knLCAnXDAnfTsKKwlj aGFyIG9uZmlfaWRbXSA9IHsnTycsICdOJywgJ0YnLCAnSScsICdcMCd9OwogCWludCBpOwogCiAJ bmFuZF9kZWJ1ZyhOREJHX0JVUywicHJvYmluZyBPTkZJIik7Cg== --089e0118289e8b1e9704dd749619--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOcOT_y3Lfkmj4RJGt2%2Bi1CKe9cJoCoDOdqa0iKxSDwFgQ_6kQ>