Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347186
b: refs/heads/master
c: 4e4fb63
h: refs/heads/master
v: v3
  • Loading branch information
Jonas Gorski authored and Artem Bityutskiy committed Nov 21, 2012
1 parent 77b5c8f commit ad9dcea
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 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: e190401ba1ca20d76f22c1f0aada0abd5bdc1afe
refs/heads/master: 4e4fb63955650e39ccfbd376733fa258adfb1e5d
11 changes: 7 additions & 4 deletions trunk/drivers/mtd/bcm63xxpart.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@

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

#define BCM63XX_MIN_CFE_SIZE 0x10000 /* always at least 64KiB */
#define BCM63XX_MIN_NVRAM_SIZE 0x10000 /* always at least 64KiB */
#define BCM63XX_CFE_BLOCK_SIZE 0x10000 /* always at least 64KiB */

#define BCM63XX_CFE_MAGIC_OFFSET 0x4e0

Expand Down Expand Up @@ -79,15 +78,19 @@ static int bcm63xx_parse_cfe_partitions(struct mtd_info *master,
unsigned int rootfsaddr, kerneladdr, spareaddr;
unsigned int rootfslen, kernellen, sparelen, totallen;
unsigned int cfelen, nvramlen;
unsigned int cfe_erasesize;
int i;
u32 computed_crc;
bool rootfs_first = false;

if (bcm63xx_detect_cfe(master))
return -EINVAL;

cfelen = max_t(uint32_t, master->erasesize, BCM63XX_MIN_CFE_SIZE);
nvramlen = max_t(uint32_t, master->erasesize, BCM63XX_MIN_NVRAM_SIZE);
cfe_erasesize = max_t(uint32_t, master->erasesize,
BCM63XX_CFE_BLOCK_SIZE);

cfelen = cfe_erasesize;
nvramlen = cfe_erasesize;

/* Allocate memory for buffer */
buf = vmalloc(sizeof(struct bcm_tag));
Expand Down

0 comments on commit ad9dcea

Please sign in to comment.