1 From 2a36a5c30eab9cd1c9d2d08bd27cd763325d70c5 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
3 Date: Sat, 5 Dec 2015 02:09:43 +0100
4 Subject: [PATCH] mtd: bcm47xxpart: limit scanned flash area on BCM47XX (MIPS)
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
10 We allowed using bcm47xxpart on BCM5301X arch with commit:
11 9e3afa5f5c7 ("mtd: bcm47xxpart: allow enabling on ARCH_BCM_5301X")
13 BCM5301X devices may contain some partitions in higher memory, e.g.
14 Netgear R8000 has board_data at 0x2600000. To detect them we should
15 use size limit on MIPS only.
17 Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
18 Signed-off-by: Brian Norris <computersforpeace@gmail.com>
20 drivers/mtd/bcm47xxpart.c | 4 ++--
21 1 file changed, 2 insertions(+), 2 deletions(-)
23 --- a/drivers/mtd/bcm47xxpart.c
24 +++ b/drivers/mtd/bcm47xxpart.c
25 @@ -118,8 +118,8 @@ static int bcm47xxpart_parse(struct mtd_
26 /* Parse block by block looking for magics */
27 for (offset = 0; offset <= master->size - blocksize;
28 offset += blocksize) {
29 - /* Nothing more in higher memory */
30 - if (offset >= 0x2000000)
31 + /* Nothing more in higher memory on BCM47XX (MIPS) */
32 + if (config_enabled(CONFIG_BCM47XX) && offset >= 0x2000000)
35 if (curr_part >= BCM47XXPART_MAX_PARTS) {