Thread (28 messages) 28 messages, 7 authors, 2011-11-24

[PATCH V3 3/6] MTD : add the database for the NANDs

STALE5426d

From: dedekind1@gmail.com (Artem Bityutskiy)
Date: 2011-03-31 10:10:48

Revision v3 of 25 in this series.

Revisions (25)
  1. v1 [diff vs current]
  2. v1 [diff vs current]
  3. v1 [diff vs current]
  4. v1 [diff vs current]
  5. v1 [diff vs current]
  6. v2 [diff vs current]
  7. v2 [diff vs current]
  8. v2 [diff vs current]
  9. v3 [diff vs current]
  10. v3 [diff vs current]
  11. v3 [diff vs current]
  12. v3 [diff vs current]
  13. v1 [diff vs current]
  14. v2 [diff vs current]
  15. v1 [diff vs current]
  16. v3 current
  17. v4 [diff vs current]
  18. v5 [diff vs current]
  19. v6 [diff vs current]
  20. v7 [diff vs current]
  21. v8 [diff vs current]
  22. v9 [diff vs current]
  23. v10 [diff vs current]
  24. v11 [diff vs current]
  25. v12 [diff vs current]
Hi,

On Wed, 2011-03-30 at 17:05 +0800, Huang Shijie wrote:
quoted
On Wednesday 30 March 2011 10:40:10 Huang Shijie wrote:
quoted
This is a new database for the NANDs which is searched by the id_bytes.
drivers/mtd//nand/nand_base.c will be able to detect all of your chips listed
below based on the ids present in drivers/mtd/nand/nand_ids.c
yes.

But I will use the new database to replace the old one.

I will  submit new patches to modify the generic code if my driver is 
accepted.
Sorry, but this is not how the opensource community works. The common
practice everywhere in the kernel is that if the generic code/framework
is too limiting, you first change the framework, then start using it. We
do not do things like - I'll first create my custom solution, and then I
promise I will change the framework.

Again, this is not just MTD, this is everywhere in the kernel. This is
how linux goes forward - we force people to improve common code and
accept their drivers, and everyone benefits form this. Yes, this is more
work for you, of course, sorry :-)
quoted
If you have new chips to support in the future, you should add them in
drivers/mtd/nand/nand_ids.c and not keep this file.
The data structure  nand_flash_dev{} does not contain enough information.
So I want to the nand_device_info{} to replace it in future.
Just add this information, if it is of generic nature (like SLC/MLC
flag, required ECC strength, etc).
quoted
I still do not understand why this would be needed, is it because the generic
code does not provide enough informations for your driver?
yes.

IMHO, the generic code is somehow trapped in a wrong way. :(
Fix this please :-)
Paring the id bytes is not sufficient to get all the information you 
need which is faced by me.
Fix this too :-)
What's more, I think the paring code is ugly, see the nand_get_flash_type().
You are welcome to fix this. There is _a lot_ of ugly code in MTD
because no one loves it. Give it some love :-)
Why not create a new database which contains all the necessary 
information for a nand, and can be easy
find by the id bytes as the keyword?
You can create this database by extending/improving/cleaning up the
existing code base with a nice series of patches.

-- 
Best Regards,
Artem Bityutskiy (????? ????????)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help