303-spi-board-info.patch 996 B

123456789101112131415161718192021222324252627282930313233
  1. --- a/arch/mips/bcm63xx/boards/board_common.c
  2. +++ b/arch/mips/bcm63xx/boards/board_common.c
  3. @@ -13,6 +13,7 @@
  4. #include <linux/platform_device.h>
  5. #include <linux/ssb/ssb.h>
  6. #include <linux/gpio_keys.h>
  7. +#include <linux/spi/spi.h>
  8. #include <asm/addrspace.h>
  9. #include <bcm63xx_board.h>
  10. #include <bcm63xx_cpu.h>
  11. @@ -225,6 +226,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. /* count number of LEDs defined by this device */
  19. --- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
  20. +++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
  21. @@ -61,6 +61,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_ */