aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm63xx/files/drivers/mtd
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2008-11-15 11:30:22 +0000
committerFlorian Fainelli <florian@openwrt.org>2008-11-15 11:30:22 +0000
commit0d4286b0b3a6ea201346bee09a2fe0cf35844333 (patch)
tree2fbeae9cefc6857e775d67e1b0e06e7e5d04d519 /target/linux/brcm63xx/files/drivers/mtd
parentcb126cd576724db0bf8e1abf6dce2ecb764169da (diff)
downloadupstream-0d4286b0b3a6ea201346bee09a2fe0cf35844333.tar.gz
upstream-0d4286b0b3a6ea201346bee09a2fe0cf35844333.tar.bz2
upstream-0d4286b0b3a6ea201346bee09a2fe0cf35844333.zip
This patch is for broadcom 96348GW-11 boards, to get USB and Ethernet working. Also it patches mtd map driver for bcm96xx boards to be sure that CFE1CFE1 code is detected when booting from CFE. (#4201)
SVN-Revision: 13213
Diffstat (limited to 'target/linux/brcm63xx/files/drivers/mtd')
-rw-r--r--target/linux/brcm63xx/files/drivers/mtd/maps/bcm963xx-flash.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/target/linux/brcm63xx/files/drivers/mtd/maps/bcm963xx-flash.c b/target/linux/brcm63xx/files/drivers/mtd/maps/bcm963xx-flash.c
index 504dfac849..9543c172a4 100644
--- a/target/linux/brcm63xx/files/drivers/mtd/maps/bcm963xx-flash.c
+++ b/target/linux/brcm63xx/files/drivers/mtd/maps/bcm963xx-flash.c
@@ -177,13 +177,14 @@ static int bcm963xx_detect_cfe(struct mtd_info *master)
{
int idoffset = 0x4e0;
static char idstring[8] = "CFE1CFE1";
- char buf[8];
+ char buf[9];
int ret;
size_t retlen;
ret = master->read(master, idoffset, 8, &retlen, (void *)buf);
+ buf[retlen] = 0;
printk("bcm963xx: Read Signature value of %s\n", buf);
- return strcmp(idstring,buf);
+ return strncmp(idstring,buf,8);
}
static int __init bcm963xx_mtd_init(void)