Skip to content

Commit 1f29cb1

Browse files
nomisralfbaechle
authored andcommitted
MIPS: bcm963xx: Move extended flash address to bcm_tag header file
The extended flash address needs to be subtracted from bcm_tag flash image offsets. Move this value to the bcm_tag header file. Renamed define name to consistently use bcm963xx for flash layout which should be considered a property of the board and not the SoC (i.e. bcm63xx could theoretically be used on a board without CFE or any flash). Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Brian Norris <computersforpeace@gmail.com> Cc: Kevin Cernekee <cernekee@gmail.com> Cc: Florian Fainelli <f.fainelli@gmail.com> Cc: Jonas Gorski <jogo@openwrt.org> Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org> Cc: MIPS Mailing List <linux-mips@linux-mips.org> Cc: MTD Maling List <linux-mtd@lists.infradead.org> Patchwork: https://patchwork.linux-mips.org/patch/11833/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
1 parent 8fce60b commit 1f29cb1

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

drivers/mtd/bcm63xxpart.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@
3737
#include <asm/mach-bcm63xx/bcm63xx_nvram.h>
3838
#include <asm/mach-bcm63xx/board_bcm963xx.h>
3939

40-
#define BCM63XX_EXTENDED_SIZE 0xBFC00000 /* Extended flash address */
41-
4240
#define BCM63XX_CFE_BLOCK_SIZE SZ_64K /* always at least 64KiB */
4341

4442
#define BCM63XX_CFE_MAGIC_OFFSET 0x4e0
@@ -123,8 +121,8 @@ static int bcm63xx_parse_cfe_partitions(struct mtd_info *master,
123121
pr_info("CFE boot tag found with version %s and board type %s\n",
124122
tagversion, boardid);
125123

126-
kerneladdr = kerneladdr - BCM63XX_EXTENDED_SIZE;
127-
rootfsaddr = rootfsaddr - BCM63XX_EXTENDED_SIZE;
124+
kerneladdr = kerneladdr - BCM963XX_EXTENDED_SIZE;
125+
rootfsaddr = rootfsaddr - BCM963XX_EXTENDED_SIZE;
128126
spareaddr = roundup(totallen, master->erasesize) + cfelen;
129127

130128
if (rootfsaddr < kerneladdr) {

include/linux/bcm963xx_tag.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@
2828
"DWV-S0", \
2929
}
3030

31+
/* Extended flash address, needs to be subtracted
32+
* from bcm_tag flash image offsets.
33+
*/
34+
#define BCM963XX_EXTENDED_SIZE 0xBFC00000
35+
3136
/*
3237
* The broadcom firmware assumes the rootfs starts the image,
3338
* therefore uses the rootfs start (flash_image_address)

0 commit comments

Comments
 (0)