303-spi-board-info.patch 947 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. @@ -207,6 +208,9 @@ int __init board_register_devices(void)
  12. bcm63xx_hsspi_register();
  13. + if (board.num_spis)
  14. + spi_register_board_info(board.spis, board.num_spis);
  15. +
  16. bcm63xx_flash_register();
  17. bcm63xx_led_data.num_leds = ARRAY_SIZE(board.leds);
  18. --- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
  19. +++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
  20. @@ -53,6 +53,10 @@ struct board_info {
  21. /* External PHY reset GPIO flags from gpio.h */
  22. unsigned long ephy_reset_gpio_flags;
  23. +
  24. + /* Additional platform devices */
  25. + struct spi_board_info *spis;
  26. + unsigned int num_spis;
  27. };
  28. #endif /* ! BOARD_BCM963XX_H_ */