0003-grasshopper-mmc.patch 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. diff -Naur linux-4.7.3/arch/avr32/boards/grasshopper/Kconfig linux-4.7.3.grasshopper/arch/avr32/boards/grasshopper/Kconfig
  2. --- linux-4.7.3/arch/avr32/boards/grasshopper/Kconfig 2016-09-20 11:22:36.665693605 +0200
  3. +++ linux-4.7.3.grasshopper/arch/avr32/boards/grasshopper/Kconfig 2016-09-20 11:22:45.803816861 +0200
  4. @@ -34,4 +34,14 @@
  5. help
  6. Enabling PWM channel 3 will exclude the power LED from LED API.
  7. +config BOARD_GRASSHOPPER_MMC
  8. + bool "Enable MMC slot"
  9. + depends on MMC_ATMELMCI
  10. + default n
  11. +
  12. +config BOARD_GRASSHOPPER_MMCLED
  13. + bool "Show MMC acces on LED8"
  14. + depends on BOARD_GRASSHOPPER_MMC
  15. + default n
  16. +
  17. endif # BOARD_GRASSHOPPER
  18. diff -Naur linux-4.7.3/arch/avr32/boards/grasshopper/led.c linux-4.7.3.grasshopper/arch/avr32/boards/grasshopper/led.c
  19. --- linux-4.7.3/arch/avr32/boards/grasshopper/led.c 2016-09-20 11:17:36.448644161 +0200
  20. +++ linux-4.7.3.grasshopper/arch/avr32/boards/grasshopper/led.c 2016-09-20 11:25:30.690040822 +0200
  21. @@ -62,6 +62,9 @@
  22. {
  23. .name = "led8:green",
  24. .gpio = GPIO_PIN_PA(30),
  25. +#ifdef CONFIG_BOARD_GRASSHOPPER_MMCLED
  26. + .default_trigger = "mmc0",
  27. +#endif
  28. },
  29. };
  30. diff -Naur linux-4.7.3/arch/avr32/boards/grasshopper/setup.c linux-4.7.3.grasshopper/arch/avr32/boards/grasshopper/setup.c
  31. --- linux-4.7.3/arch/avr32/boards/grasshopper/setup.c 2016-09-20 10:32:24.571984951 +0200
  32. +++ linux-4.7.3.grasshopper/arch/avr32/boards/grasshopper/setup.c 2016-09-20 11:23:52.197712372 +0200
  33. @@ -130,7 +130,7 @@
  34. #endif
  35. /* MCI */
  36. -#ifdef CONFIG_MMC_ATMELMCI
  37. +#ifdef CONFIG_BOARD_GRASSHOPPER_MMC
  38. static struct mci_platform_data __initdata mci0_data = {
  39. .slot[0] = {
  40. .bus_width = 4,
  41. @@ -168,8 +168,8 @@
  42. ATMEL_LCDC_PRI_CONTROL | ATMEL_LCDC_PRI_24BIT);
  43. #endif
  44. -#ifdef CONFIG_MMC_ATMELMCI
  45. -// at32_add_device_mci(0, &mci0_data); /* MMC/SD */
  46. +#ifdef CONFIG_BOARD_GRASSHOPPER_MMC
  47. + at32_add_device_mci(0, &mci0_data); /* MMC/SD */
  48. #endif
  49. // printk("registering penirq gpio-pin...\n");