From a261a5c7c813a14a95d6ac5f2176323869f3ea96 Mon Sep 17 00:00:00 2001 From: Jesse Gilles Date: Mon, 7 Mar 2011 16:35:15 -0600 Subject: added mtcdp-embedded machine type --- .../mtcdp-embedded/linux-2.6.32.3-at25.patch | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 recipes/linux/linux-2.6.32/mtcdp-embedded/linux-2.6.32.3-at25.patch (limited to 'recipes/linux/linux-2.6.32/mtcdp-embedded/linux-2.6.32.3-at25.patch') diff --git a/recipes/linux/linux-2.6.32/mtcdp-embedded/linux-2.6.32.3-at25.patch b/recipes/linux/linux-2.6.32/mtcdp-embedded/linux-2.6.32.3-at25.patch new file mode 100644 index 0000000000..3aa9096b2b --- /dev/null +++ b/recipes/linux/linux-2.6.32/mtcdp-embedded/linux-2.6.32.3-at25.patch @@ -0,0 +1,37 @@ +diff -uprN -X linux-2.6.32.3/Documentation/dontdiff linux-2.6.32.3-vanilla/drivers/misc/eeprom/at25.c linux-2.6.32.3/drivers/misc/eeprom/at25.c +--- linux-2.6.32.3-vanilla/drivers/misc/eeprom/at25.c 2010-01-06 17:07:45.000000000 -0600 ++++ linux-2.6.32.3/drivers/misc/eeprom/at25.c 2010-10-27 11:05:36.000000000 -0500 +@@ -147,6 +147,7 @@ at25_ee_write(struct at25_data *at25, co + unsigned written = 0; + unsigned buf_size; + u8 *bounce; ++ int a8; + + if (unlikely(off >= at25->bin.size)) + return -EFBIG; +@@ -163,6 +164,11 @@ at25_ee_write(struct at25_data *at25, co + if (!bounce) + return -ENOMEM; + ++ if (!strcmp(at25->chip.name, "at25040b")) ++ a8 = 1; ++ else ++ a8 = 0; ++ + /* For write, rollover is within the page ... so we write at + * most one page, then manually roll over to the next page. + */ +@@ -183,6 +189,13 @@ at25_ee_write(struct at25_data *at25, co + break; + } + ++ if (a8) { ++ if (offset & BIT(8)) ++ bounce[0] |= BIT(3); ++ else ++ bounce[0] &= ~BIT(3); ++ } ++ + /* 8/16/24-bit address is written MSB first */ + switch (at25->addrlen) { + default: /* case 3 */ -- cgit v1.2.3