Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282854
b: refs/heads/master
c: f2d9739
h: refs/heads/master
v: v3
  • Loading branch information
Jonas Gorski authored and David Woodhouse committed Jan 9, 2012
1 parent 70912bb commit 717c746
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f9fbcdc357f37d6c82a75a89c64efbe8bd5274e1
refs/heads/master: f2d9739b8e0bc9bdcc972950dd433b5083edf72f
22 changes: 17 additions & 5 deletions trunk/drivers/mtd/bcm63xxpart.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,34 @@
#include <linux/mtd/partitions.h>

#include <asm/mach-bcm63xx/bcm963xx_tag.h>
#include <asm/mach-bcm63xx/board_bcm963xx.h>

#define BCM63XX_EXTENDED_SIZE 0xBFC00000 /* Extended flash address */

#define BCM63XX_CFE_MAGIC_OFFSET 0x4e0

static int bcm63xx_detect_cfe(struct mtd_info *master)
{
int idoffset = 0x4e0;
static char idstring[8] = "CFE1CFE1";
char buf[9];
int ret;
size_t retlen;

ret = master->read(master, idoffset, 8, &retlen, (void *)buf);
ret = master->read(master, BCM963XX_CFE_VERSION_OFFSET, 5, &retlen,
(void *)buf);
buf[retlen] = 0;

if (ret)
return ret;

if (strncmp("cfe-v", buf, 5) == 0)
return 0;

/* very old CFE's do not have the cfe-v string, so check for magic */
ret = master->read(master, BCM63XX_CFE_MAGIC_OFFSET, 8, &retlen,
(void *)buf);
buf[retlen] = 0;
pr_info("Read Signature value of %s\n", buf);

return strncmp(idstring, buf, 8);
return strncmp("CFE1CFE1", buf, 8);
}

static int bcm63xx_parse_cfe_partitions(struct mtd_info *master,
Expand Down

0 comments on commit 717c746

Please sign in to comment.