Patchwork Support for PCM Pm39LV020 and Pm39LV040

login
register
about
Submitter Anders Juel Jensen
Date 2010-01-20 16:49:13
Message ID <201001201749.14058.andersjjensen@gmail.com>
Download mbox | patch
Permalink /patch/824/
State Accepted
Commit r988
Headers show

Comments

Anders Juel Jensen - 2010-01-20 16:49:13
update to block_erasers

Signed-off-by Anders Juel Jensen
--
On Sunday 17 January 2010 05:53:00 Sean Nelson wrote:
> Could you please redo patch to use block_erasers?
> 

if this is done right i will add the 512 version too
/Anders
Carl-Daniel Hailfinger - 2010-01-20 17:24:46
On 20.01.2010 17:49, Anders Juel Jensen wrote:
> update to block_erasers
>
> Signed-off-by Anders Juel Jensen
>   

Your original Signed-off-by: statement (with : and mail address) had the
format we want. No need to worry, someone will fix up on commit.


> On Sunday 17 January 2010 05:53:00 Sean Nelson wrote:
>   
>> Could you please redo patch to use block_erasers?
>>
>>     
>
> if this is done right i will add the 512 version too
>   

That would be nice.


> Index: flashchips.c
> ===================================================================
> --- flashchips.c	(revision 876)
> +++ flashchips.c	(working copy)
> @@ -3372,6 +3372,64 @@
>  
>  	{
>  		.vendor		= "PMC",
> +		.name		= "Pm39LV020",
> +		.bustype	= CHIP_BUSTYPE_PARALLEL,
> +		.manufacture_id	= PMC_ID_NOPREFIX,
> +		.model_id	= PMC_39F020,
> +		.total_size	= 256,
> +		.page_size	= 4096,
> +		.tested		= TEST_UNTESTED,
> +		.probe		= probe_jedec,
>   

Ahem. While you're correct that the command sequence is JEDEC, it seems
the PMC chips use a reduced address scheme of 0x555 and 0x2aa, so
probe_jedec is not really correct. Same problem for the erase functions.
Before you redo the patch, let us merge Sean's last eraseblock patch,
and then finish the infrastructure for reduced addresses. That way, your
patch only has to set .feature_bits and can keep the reast as it was in
this submission.


> +		.probe_timing	= TIMING_ZERO,	/* Datasheet has no timing info specified */
> +		.erase		= NULL,
> +		.block_erasers =
> +		{
> +			{
> +				.eraseblocks = { {4 * 1024, 64} },
> +				.block_erase = erase_sector_jedec,
> +			}, {
> +				.eraseblocks = { {64 * 1024, 4} },
> +				.block_erase = erase_block_jedec,
> +			}, {
> +				.eraseblocks = { {256 * 1024, 1} },
> +				.block_erase = erase_chip_block_jedec,
>   

Looks good.


> +			}
> +		},
> +		.write		= write_49f002,
> +		.read		= read_memmapped,
> +	},
> +
> +	{
> +		.vendor		= "PMC",
> +		.name		= "Pm39LV040",
> +		.bustype	= CHIP_BUSTYPE_PARALLEL,
> +		.manufacture_id	= PMC_ID_NOPREFIX,
> +		.model_id	= PMC_39F040,
> +		.total_size	= 512,
> +		.page_size	= 4096,
> +		.tested		= TEST_UNTESTED,
> +		.probe		= probe_jedec,
> +		.probe_timing	= TIMING_ZERO,	/* Datasheet has no timing info specified */
> +		.erase		= NULL,
> +		.block_erasers =
> +		{
> +			{
> +				.eraseblocks = { {4 * 1024, 128} },
> +				.block_erase = erase_sector_jedec,
> +			}, {
> +				.eraseblocks = { {64 * 1024, 8} },
> +				.block_erase = erase_block_jedec,
> +			}, {
> +				.eraseblocks = { {512 * 1024, 1} },
> +				.block_erase = erase_chip_block_jedec,
>   

Looks good as well.


> +			}
> +		},
> +		.write		= write_49f002,
> +		.read		= read_memmapped,
> +	},
> +	
> +	{
> +		.vendor		= "PMC",
>  		.name		= "Pm49FL002",
>  		.bustype	= CHIP_BUSTYPE_LPC|CHIP_BUSTYPE_FWH, /* A/A Mux*/
>  		.manufacture_id	= PMC_ID_NOPREFIX,
>   


Regards,
Carl-Daniel
Carl-Daniel Hailfinger - 2010-02-04 00:21:54
Hi Anders,

could you please resubmit your patch? AFAICS all required infrastructure
should be in place now.

Regards,
Carl-Daniel
Carl-Daniel Hailfinger - 2010-03-27 23:25:41
Hi Anders,

you wrote that you planned to do the Pm39LV512 as well. It would be cool
if you could send a patch for that, and also for the Pm39F* family.

On 20.01.2010 18:24, Carl-Daniel Hailfinger wrote:
> On 20.01.2010 17:49, Anders Juel Jensen wrote:
>   
>> if this is done right i will add the 512 version too
>>     
>
> That would be nice.
>
>
>   
>> Index: flashchips.c
>> ===================================================================
>> --- flashchips.c	(revision 876)
>> +++ flashchips.c	(working copy)
>> @@ -3372,6 +3372,64 @@
>>  
>>  	{
>>  		.vendor		= "PMC",
>> +		.name		= "Pm39LV020",
>> +		.bustype	= CHIP_BUSTYPE_PARALLEL,
>> +		.manufacture_id	= PMC_ID_NOPREFIX,
>> +		.model_id	= PMC_39F020,
>>     

This ID was incorrect. Pm39LV020 and Pm39F020 have different IDs. I
fixed it for the commit.


>> +		.total_size	= 256,
>> +		.page_size	= 4096,
>> +		.tested		= TEST_UNTESTED,
>> +		.probe		= probe_jedec,
>>   
>>     
>
> Ahem. While you're correct that the command sequence is JEDEC, it seems
> the PMC chips use a reduced address scheme of 0x555 and 0x2aa, so
> probe_jedec is not really correct. Same problem for the erase functions.
> Before you redo the patch, let us merge Sean's last eraseblock patch,
> and then finish the infrastructure for reduced addresses. That way, your
> patch only has to set .feature_bits and can keep the reast as it was in
> this submission.
>   

I fixed it for the commit.


>> +		.probe_timing	= TIMING_ZERO,	/* Datasheet has no timing info specified */
>> +		.erase		= NULL,
>> +		.block_erasers =
>> +		{
>> +			{
>> +				.eraseblocks = { {4 * 1024, 64} },
>> +				.block_erase = erase_sector_jedec,
>> +			}, {
>> +				.eraseblocks = { {64 * 1024, 4} },
>> +				.block_erase = erase_block_jedec,
>> +			}, {
>> +				.eraseblocks = { {256 * 1024, 1} },
>> +				.block_erase = erase_chip_block_jedec,
>>   
>>     
>
> Looks good.
>
>
>   
>> +			}
>> +		},
>> +		.write		= write_49f002,
>> +		.read		= read_memmapped,
>> +	},
>> +
>> +	{
>> +		.vendor		= "PMC",
>> +		.name		= "Pm39LV040",
>> +		.bustype	= CHIP_BUSTYPE_PARALLEL,
>> +		.manufacture_id	= PMC_ID_NOPREFIX,
>> +		.model_id	= PMC_39F040,
>>     

Wrong ID again. Fixed for the commit.


>> +		.total_size	= 512,
>> +		.page_size	= 4096,
>> +		.tested		= TEST_UNTESTED,
>> +		.probe		= probe_jedec,
>> +		.probe_timing	= TIMING_ZERO,	/* Datasheet has no timing info specified */
>> +		.erase		= NULL,
>> +		.block_erasers =
>> +		{
>> +			{
>> +				.eraseblocks = { {4 * 1024, 128} },
>> +				.block_erase = erase_sector_jedec,
>> +			}, {
>> +				.eraseblocks = { {64 * 1024, 8} },
>> +				.block_erase = erase_block_jedec,
>> +			}, {
>> +				.eraseblocks = { {512 * 1024, 1} },
>> +				.block_erase = erase_chip_block_jedec,
>>   
>>     
>
> Looks good as well.
>
>
>   
>> +			}
>> +		},
>> +		.write		= write_49f002,
>> +		.read		= read_memmapped,
>> +	},
>> +	
>> +	{
>> +		.vendor		= "PMC",
>>  		.name		= "Pm49FL002",
>>  		.bustype	= CHIP_BUSTYPE_LPC|CHIP_BUSTYPE_FWH, /* A/A Mux*/
>>  		.manufacture_id	= PMC_ID_NOPREFIX,
>>     

Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

Committed in r988 with the changes outlined above.

Regards,
Carl-Daniel

Patch

Index: flashchips.c
===================================================================
--- flashchips.c	(revision 876)
+++ flashchips.c	(working copy)
@@ -3372,6 +3372,64 @@ 
 
 	{
 		.vendor		= "PMC",
+		.name		= "Pm39LV020",
+		.bustype	= CHIP_BUSTYPE_PARALLEL,
+		.manufacture_id	= PMC_ID_NOPREFIX,
+		.model_id	= PMC_39F020,
+		.total_size	= 256,
+		.page_size	= 4096,
+		.tested		= TEST_UNTESTED,
+		.probe		= probe_jedec,
+		.probe_timing	= TIMING_ZERO,	/* Datasheet has no timing info specified */
+		.erase		= NULL,
+		.block_erasers =
+		{
+			{
+				.eraseblocks = { {4 * 1024, 64} },
+				.block_erase = erase_sector_jedec,
+			}, {
+				.eraseblocks = { {64 * 1024, 4} },
+				.block_erase = erase_block_jedec,
+			}, {
+				.eraseblocks = { {256 * 1024, 1} },
+				.block_erase = erase_chip_block_jedec,
+			}
+		},
+		.write		= write_49f002,
+		.read		= read_memmapped,
+	},
+
+	{
+		.vendor		= "PMC",
+		.name		= "Pm39LV040",
+		.bustype	= CHIP_BUSTYPE_PARALLEL,
+		.manufacture_id	= PMC_ID_NOPREFIX,
+		.model_id	= PMC_39F040,
+		.total_size	= 512,
+		.page_size	= 4096,
+		.tested		= TEST_UNTESTED,
+		.probe		= probe_jedec,
+		.probe_timing	= TIMING_ZERO,	/* Datasheet has no timing info specified */
+		.erase		= NULL,
+		.block_erasers =
+		{
+			{
+				.eraseblocks = { {4 * 1024, 128} },
+				.block_erase = erase_sector_jedec,
+			}, {
+				.eraseblocks = { {64 * 1024, 8} },
+				.block_erase = erase_block_jedec,
+			}, {
+				.eraseblocks = { {512 * 1024, 1} },
+				.block_erase = erase_chip_block_jedec,
+			}
+		},
+		.write		= write_49f002,
+		.read		= read_memmapped,
+	},
+	
+	{
+		.vendor		= "PMC",
 		.name		= "Pm49FL002",
 		.bustype	= CHIP_BUSTYPE_LPC|CHIP_BUSTYPE_FWH, /* A/A Mux*/
 		.manufacture_id	= PMC_ID_NOPREFIX,