Patchworkβ Support for IBM/Lenovo Thinkpad T60 Flash

login
register
about
Submitter Joerg Mayer
Date 2012-05-05 00:27:20
Message ID <20120505002719.GA27135@rhrk.uni-kl.de>
Download mbox | patch
Permalink /patch/3621/
State Rejected
Headers show

Comments

Joerg Mayer - 2012-05-05 00:27:20
Hello,

some time (> 1 year?) ago I asked on flashrom about support for the T60
and the attached patch was sent as part of the answer. The other part of
the answer was that whoever sent this patch was not happy with it.
Unfortunately I didn't keep the mail(s) and have forgotten the reason
for this. Google also didn't really help. What I found was a similar but
not identical mail on coreboot:
http://www.coreboot.org/pipermail/coreboot/2010-December/062303.html
As the T60 is one of the few Laptop models that are supported by coreboot
and I'd like to update to it I have two requests:
1) would someone be willing to update the patch to the current flashrom
   codebase (I tried this and was able to read, but I don't trust it as
   the change was done without understanding what the changes did).
2) if possible integrate this into flashrom to make using coreboot easier.
3) (of 2) would it be useful to integrate bucts into flashrom or move it
   to coreboot/utils/?

Thanks
    Jörg
Stefan Tauner - 2012-08-25 04:21:38
On Sat, 5 May 2012 02:27:20 +0200
Joerg Mayer <jmayer@loplof.de> wrote:

> Hello,
> 
> some time (> 1 year?) ago I asked on flashrom about support for the T60
> and the attached patch was sent as part of the answer. The other part of
> the answer was that whoever sent this patch was not happy with it.
> Unfortunately I didn't keep the mail(s) and have forgotten the reason
> for this. Google also didn't really help. What I found was a similar but
> not identical mail on coreboot:
> http://www.coreboot.org/pipermail/coreboot/2010-December/062303.html
> As the T60 is one of the few Laptop models that are supported by coreboot
> and I'd like to update to it I have two requests:
> 1) would someone be willing to update the patch to the current flashrom
>    codebase (I tried this and was able to read, but I don't trust it as
>    the change was done without understanding what the changes did).
> 2) if possible integrate this into flashrom to make using coreboot easier.
> 3) (of 2) would it be useful to integrate bucts into flashrom or move it
>    to coreboot/utils/?

Hello Jörg,

I have described the reason why patching is needed, how to do it and
why it is not possible to integrate this patch into flashrom in the
coreboot-wiki:
http://www.coreboot.org/Lenovo_x60x

Patch

Index: flashcips.c
===================================================================
--- flashchips.c
+++ flashchips.c
@@ -4702,6 +4702,31 @@  struct flashchip flashchips[] = {
 
 	{
 		.vendor		= "ST",
+		.name		= "M25P16.RES",
+		.bustype	= CHIP_BUSTYPE_SPI,
+		.manufacture_id	= ST_ID,
+		.model_id	= ST_M25P16_RES,
+		.total_size	= 2048,
+		.page_size	= 256,
+		.tested		= TEST_UNTESTED,
+		.probe		= probe_spi_res,
+		.probe_timing	= TIMING_ZERO,
+		.block_erasers	=
+		{
+			{
+				.eraseblocks = { {64 * 1024, 32} },
+				.block_erase = spi_block_erase_d8,
+			}, {
+				.eraseblocks = { {2 * 1024 * 1024, 1} },
+				.block_erase = spi_block_erase_c7,
+			}
+		},
+		.write		= spi_chip_write_256,
+		.read		= spi_chip_read,
+	},
+
+	{
+		.vendor		= "ST",
 		.name		= "M25P32",
 		.bustype	= CHIP_BUSTYPE_SPI,
 		.manufacture_id	= ST_ID,
Index: flashcips.g
===================================================================
--- flashchips.h
+++ flashchips.h
@@ -447,6 +447,7 @@ 
 #define ST_M25P40_RES		0x12
 #define ST_M25P80		0x2014
 #define ST_M25P16		0x2015
+#define ST_M25P16_RES		0x14
 #define ST_M25P32		0x2016
 #define ST_M25P64		0x2017
 #define ST_M25P128		0x2018