303-spi-board-info.patch 995 B

123456789101112131415161718192021222324252627282930313233
  1. --- a/arch/mips/bcm63xx/boards/board_common.c
  2. +++ b/arch/mips/bcm63xx/boards/board_common.c
  3. @@ -12,6 +12,7 @@
  4. #include <linux/string.h>
  5. #include <linux/platform_device.h>
  6. #include <linux/ssb/ssb.h>
  7. +#include <linux/spi/spi.h>
  8. #include <asm/addrspace.h>
  9. #include <bcm63xx_board.h>
  10. #include <bcm63xx_cpu.h>
  11. @@ -209,6 +210,9 @@ int __init board_register_devices(void)
  12. if (board.num_devs)
  13. platform_add_devices(board.devs, board.num_devs);
  14. + if (board.num_spis)
  15. + spi_register_board_info(board.spis, board.num_spis);
  16. +
  17. bcm63xx_flash_register();
  18. bcm63xx_led_data.num_leds = ARRAY_SIZE(board.leds);
  19. --- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
  20. +++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
  21. @@ -57,6 +57,10 @@ struct board_info {
  22. /* Additional platform devices */
  23. struct platform_device **devs;
  24. unsigned int num_devs;
  25. +
  26. + /* Additional platform devices */
  27. + struct spi_board_info *spis;
  28. + unsigned int num_spis;
  29. };
  30. #endif /* ! BOARD_BCM963XX_H_ */