Advertisement
Guest User

Untitled

a guest
May 29th, 2015
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.39 KB | None | 0 0
  1. diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi
  2. index ff70c58..734cef2 100644
  3. --- a/arch/arm/boot/dts/bcm2708_common.dtsi
  4. +++ b/arch/arm/boot/dts/bcm2708_common.dtsi
  5. @@ -84,9 +84,57 @@
  6. status = "disabled";
  7. };
  8.  
  9. + usb: usb@7e980000 {
  10. + compatible = "brcm,bcm2708-usb";
  11. + reg = <0x7e980000 0x10000>,
  12. + <0x7e006000 0x1000>;
  13. + interrupts = <2 0>,
  14. + <1 9>;
  15. + };
  16. +
  17. + fb: fb {
  18. + compatible = "brcm,bcm2708-fb";
  19. + };
  20. +
  21. leds: leds {
  22. compatible = "gpio-leds";
  23. };
  24. +
  25. + thermal {
  26. + compatible = "brcm,bcm2835-thermal";
  27. + };
  28. +
  29. + audio@0 {
  30. + compatible = "brcm,bcm2835-audio";
  31. + };
  32. +
  33. + audio@1 {
  34. + compatible = "brcm,bcm2835-audio";
  35. + };
  36. +
  37. + audio@2 {
  38. + compatible = "brcm,bcm2835-audio";
  39. + };
  40. +
  41. + audio@3 {
  42. + compatible = "brcm,bcm2835-audio";
  43. + };
  44. +
  45. + audio@4 {
  46. + compatible = "brcm,bcm2835-audio";
  47. + };
  48. +
  49. + audio@5 {
  50. + compatible = "brcm,bcm2835-audio";
  51. + };
  52. +
  53. + audio@6 {
  54. + compatible = "brcm,bcm2835-audio";
  55. + };
  56. +
  57. + audio@7 {
  58. + compatible = "brcm,bcm2835-audio";
  59. + };
  60. };
  61.  
  62. clocks {
  63. diff --git a/arch/arm/mach-bcm2709/bcm2709.c b/arch/arm/mach-bcm2709/bcm2709.c
  64. index 56d16a4..afd7b01 100644
  65. --- a/arch/arm/mach-bcm2709/bcm2709.c
  66. +++ b/arch/arm/mach-bcm2709/bcm2709.c
  67. @@ -903,8 +903,8 @@ void __init bcm2709_init(void)
  68. #ifdef SYSTEM_TIMER
  69. bcm_register_device(&bcm2708_systemtimer_device);
  70. #endif
  71. - bcm_register_device(&bcm2708_fb_device);
  72. - bcm_register_device(&bcm2708_usb_device);
  73. + bcm_register_device_dt(&bcm2708_fb_device);
  74. + bcm_register_device_dt(&bcm2708_usb_device);
  75. bcm_register_device(&bcm2708_uart1_device);
  76. bcm_register_device(&bcm2708_powerman_device);
  77.  
  78. @@ -913,7 +913,7 @@ void __init bcm2709_init(void)
  79. #endif
  80. bcm2709_init_led();
  81. for (i = 0; i < ARRAY_SIZE(bcm2708_alsa_devices); i++)
  82. - bcm_register_device(&bcm2708_alsa_devices[i]);
  83. + bcm_register_device_dt(&bcm2708_alsa_devices[i]);
  84.  
  85. bcm_register_device_dt(&bcm2708_spi_device);
  86.  
  87. @@ -927,7 +927,7 @@ void __init bcm2709_init(void)
  88. }
  89.  
  90. bcm_register_device(&bcm2835_hwmon_device);
  91. - bcm_register_device(&bcm2835_thermal_device);
  92. + bcm_register_device_dt(&bcm2835_thermal_device);
  93.  
  94. #if defined(CONFIG_SND_BCM2708_SOC_I2S) || defined(CONFIG_SND_BCM2708_SOC_I2S_MODULE)
  95. bcm_register_device_dt(&bcm2708_i2s_device);
  96. diff --git a/drivers/thermal/bcm2835-thermal.c b/drivers/thermal/bcm2835-thermal.c
  97. index 85fceb5..21a1010 100644
  98. --- a/drivers/thermal/bcm2835-thermal.c
  99. +++ b/drivers/thermal/bcm2835-thermal.c
  100. @@ -167,12 +167,18 @@ static struct thermal_zone_device_ops ops = {
  101. .get_mode = bcm2835_get_mode,
  102. };
  103.  
  104. -/* Thermal Driver */
  105. +static const struct of_device_id bcm2835_thermal_of_match_table[] = {
  106. + { .compatible = "brcm,bcm2835-thermal", },
  107. + {},
  108. +};
  109. +MODULE_DEVICE_TABLE(of, bcm2835_thermal_of_match_table);
  110. +
  111. static struct platform_driver bcm2835_thermal_driver = {
  112. .probe = bcm2835_thermal_probe,
  113. .remove = bcm2835_thermal_remove,
  114. .driver = {
  115. .name = "bcm2835_thermal",
  116. + .of_match_table = bcm2835_thermal_of_match_table,
  117. .owner = THIS_MODULE,
  118. },
  119. };
  120. diff --git a/drivers/usb/host/dwc_otg/dwc_otg_driver.c b/drivers/usb/host/dwc_otg/dwc_otg_driver.c
  121. index dc7cd32..53307f0 100644
  122. --- a/drivers/usb/host/dwc_otg/dwc_otg_driver.c
  123. +++ b/drivers/usb/host/dwc_otg/dwc_otg_driver.c
  124. @@ -1043,9 +1043,16 @@ static struct platform_device_id platform_ids[] = {
  125. };
  126. MODULE_DEVICE_TABLE(platform, platform_ids);
  127.  
  128. +static const struct of_device_id dwc_otg_of_match_table[] = {
  129. + { .compatible = "brcm,bcm2708-usb", },
  130. + {},
  131. +};
  132. +MODULE_DEVICE_TABLE(of, dwc_otg_of_match_table);
  133. +
  134. static struct platform_driver dwc_otg_driver = {
  135. .driver = {
  136. .name = (char *)dwc_driver_name,
  137. + .of_match_table = dwc_otg_of_match_table,
  138. },
  139. .id_table = platform_ids,
  140.  
  141. diff --git a/drivers/video/fbdev/bcm2708_fb.c b/drivers/video/fbdev/bcm2708_fb.c
  142. index f632750..1d61f68 100644
  143. --- a/drivers/video/fbdev/bcm2708_fb.c
  144. +++ b/drivers/video/fbdev/bcm2708_fb.c
  145. @@ -781,11 +781,18 @@ static int bcm2708_fb_remove(struct platform_device *dev)
  146. return 0;
  147. }
  148.  
  149. +static const struct of_device_id bcm2708_fb_of_match_table[] = {
  150. + { .compatible = "brcm,bcm2708-fb", },
  151. + {},
  152. +};
  153. +MODULE_DEVICE_TABLE(of, bcm2708_fb_of_match_table);
  154. +
  155. static struct platform_driver bcm2708_fb_driver = {
  156. .probe = bcm2708_fb_probe,
  157. .remove = bcm2708_fb_remove,
  158. .driver = {
  159. .name = DRIVER_NAME,
  160. + .of_match_table = bcm2708_fb_of_match_table,
  161. .owner = THIS_MODULE,
  162. },
  163. };
  164. diff --git a/sound/arm/bcm2835.c b/sound/arm/bcm2835.c
  165. old mode 100755
  166. new mode 100644
  167. index 7ed5079..95abab6
  168. --- a/sound/arm/bcm2835.c
  169. +++ b/sound/arm/bcm2835.c
  170. @@ -1,3 +1,5 @@
  171. +#define AUDIO_DEBUG_ENABLE
  172. +#define AUDIO_VERBOSE_DEBUG_ENABLE
  173. /*****************************************************************************
  174. * Copyright 2011 Broadcom Corporation. All rights reserved.
  175. *
  176. @@ -224,6 +226,12 @@ static int snd_bcm2835_alsa_resume(struct platform_device *pdev)
  177.  
  178. #endif
  179.  
  180. +static const struct of_device_id snd_bcm2835_of_match_table[] = {
  181. + { .compatible = "brcm,bcm2835-audio", },
  182. + {},
  183. +};
  184. +MODULE_DEVICE_TABLE(of, snd_bcm2835_of_match_table);
  185. +
  186. static struct platform_driver bcm2835_alsa0_driver = {
  187. .probe = snd_bcm2835_alsa_probe,
  188. .remove = snd_bcm2835_alsa_remove,
  189. @@ -233,6 +241,7 @@ static struct platform_driver bcm2835_alsa0_driver = {
  190. #endif
  191. .driver = {
  192. .name = "bcm2835_AUD0",
  193. + .of_match_table = snd_bcm2835_of_match_table,
  194. .owner = THIS_MODULE,
  195. },
  196. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement