1
0

040-0001-mtd-bcm47xxpart-limit-scanned-flash-area-on-BCM47XX-.patch 1.3 KB

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