141-mtd-bcm47xxpart-limit-scanned-flash-area-on-BCM47XX-.patch 1.2 KB

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