116-sidewinder_fis_location.patch 889 B

123456789101112131415161718192021222324252627282930
  1. --- a/drivers/mtd/redboot.c
  2. +++ b/drivers/mtd/redboot.c
  3. @@ -30,6 +30,8 @@
  4. #include <linux/mtd/partitions.h>
  5. #include <linux/module.h>
  6. +#include <asm/mach-types.h>
  7. +
  8. struct fis_image_desc {
  9. unsigned char name[16]; // Null terminated name
  10. uint32_t flash_base; // Address within FLASH of image
  11. @@ -47,7 +49,8 @@ struct fis_list {
  12. struct fis_list *next;
  13. };
  14. -static int directory = CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK;
  15. +int directory = CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK;
  16. +
  17. module_param(directory, int, 0);
  18. static inline int redboot_checksum(struct fis_image_desc *img)
  19. @@ -75,6 +78,8 @@ static int parse_redboot_partitions(stru
  20. #ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED
  21. static char nullstring[] = "unallocated";
  22. #endif
  23. + if (machine_is_sidewinder())
  24. + directory = -5;
  25. if ( directory < 0 ) {
  26. offset = master->size + directory * master->erasesize;