Skip to content

Instantly share code, notes, and snippets.

@psyke83
Created August 16, 2012 01:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save psyke83/3365222 to your computer and use it in GitHub Desktop.
Save psyke83/3365222 to your computer and use it in GitHub Desktop.
msm_nand.c - patch to allow onenand detection on GT-I5500
diff --git a/drivers/mtd/devices/msm_nand.c b/drivers/mtd/devices/msm_nand.c
index 92b5862..3ad151c 100755
--- a/drivers/mtd/devices/msm_nand.c
+++ b/drivers/mtd/devices/msm_nand.c
@@ -4066,10 +4066,10 @@ uint32_t flash_onenand_probe(struct msm_nand_chip *chip)
"==========================\n");
if ((onenand_info.manufacturer_id != 0x00EC)
- || ((onenand_info.device_id & 0x0040) != 0x0040)
+ || ((onenand_info.device_id & 0x0050) != 0x0050)
|| (onenand_info.data_buf_size != 0x0800)
|| (onenand_info.boot_buf_size != 0x0200)
- || (onenand_info.num_of_buffers != 0x0201)
+ || (onenand_info.num_of_buffers != 0x0101)
|| (onenand_info.technology != 0)) {
pr_info("%s: Detected an unsupported device\n"
@@ -6764,7 +6764,7 @@ int msm_nand_scan(struct mtd_info *mtd, int maxchips)
uint8_t index;
/* Probe the Flash device for ONFI compliance */
-#if defined (CONFIG_MACH_COOPER)
+#if defined (CONFIG_MACH_COOPER) || defined (CONFIG_MACH_EUROPA)
/* Read the Flash ID from the Nand Flash Device */
flash_id = flash_read_id(chip);
for (index = 1; index < ARRAY_SIZE(supported_flash); index++)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment