Thread (32 messages) 32 messages, 3 authors, 2015-07-20

[PATCH v5 05/12] mtd: pxa3xx_nand: rework flash detection and timing setup

From: ezequiel@vanguardiasur.com.ar (Ezequiel Garcia)
Date: 2015-05-16 21:26:38
Also in: lkml


On 05/12/2015 11:39 AM, Antoine Tenart wrote:
Ezequiel,

On Mon, May 11, 2015 at 07:10:56PM -0300, Ezequiel Garcia wrote:
quoted
On 05/11/2015 11:58 AM, Antoine Tenart wrote:
[..]
quoted
-
-	/* calculate flash information */
-	host->read_id_bytes = (f->page_size == 2048) ? 4 : 2;
-
[..]
quoted
@@ -1732,6 +1669,7 @@ static int alloc_nand_resource(struct platform_device *pdev)
 		host->mtd = mtd;
 		host->cs = cs;
 		host->info_data = info;
+		host->read_id_bytes = 4;
Are you sure this is correct? The value is set according to the page
size before this patch.
Before reading the ID, the pxa3xx driver uses a default configuration,
builtin_flash_types[0], which defines a page size of 2048 leading to set
host->read_id_bytes to 4.

I'm using this default value here.

There might be an issue, as host->read_id_bytes isn't updated after
reading the ID (and getting the actual page size). I don't know if this
can be a problem. I can modify pxa3xx_nand_config_flash() to update
host->read_id_bytes if needed. What do you think?
Well, once the device is detected, READ_ID shouldn't be used, so I'm not
sure what's the point of that.

-- 
Ezequiel Garcia, VanguardiaSur
www.vanguardiasur.com.ar
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help