905-BCM53573-minor-hacks.patch 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. From 6f1c62440eb6846cb8045d7a5480ec7bbe47c96f Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
  3. Date: Mon, 15 Aug 2016 10:30:41 +0200
  4. Subject: [PATCH] BCM53573 minor hacks
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
  9. ---
  10. --- a/arch/arm/boot/dts/bcm53573.dtsi
  11. +++ b/arch/arm/boot/dts/bcm53573.dtsi
  12. @@ -48,6 +48,15 @@
  13. };
  14. };
  15. + timer {
  16. + compatible = "arm,armv7-timer";
  17. + interrupts = <GIC_PPI 13 0>,
  18. + <GIC_PPI 14 0>,
  19. + <GIC_PPI 11 0>,
  20. + <GIC_PPI 10 0>;
  21. + clocks = <&ilp>;
  22. + };
  23. +
  24. clocks {
  25. #address-cells = <1>;
  26. #size-cells = <1>;
  27. --- a/drivers/bcma/main.c
  28. +++ b/drivers/bcma/main.c
  29. @@ -352,14 +352,6 @@ static int bcma_register_devices(struct
  30. }
  31. #endif
  32. -#ifdef CONFIG_BCMA_SFLASH
  33. - if (bus->drv_cc.sflash.present) {
  34. - err = platform_device_register(&bcma_sflash_dev);
  35. - if (err)
  36. - bcma_err(bus, "Error registering serial flash\n");
  37. - }
  38. -#endif
  39. -
  40. #ifdef CONFIG_BCMA_NFLASH
  41. if (bus->drv_cc.nflash.present) {
  42. err = platform_device_register(&bcma_nflash_dev);
  43. @@ -440,6 +432,14 @@ int bcma_bus_register(struct bcma_bus *b
  44. bcma_register_core(bus, core);
  45. }
  46. +#ifdef CONFIG_BCMA_SFLASH
  47. + if (bus->drv_cc.sflash.present) {
  48. + err = platform_device_register(&bcma_sflash_dev);
  49. + if (err)
  50. + bcma_err(bus, "Error registering serial flash\n");
  51. + }
  52. +#endif
  53. +
  54. /* Try to get SPROM */
  55. err = bcma_sprom_get(bus);
  56. if (err == -ENOENT) {
  57. --- a/drivers/clocksource/arm_arch_timer.c
  58. +++ b/drivers/clocksource/arm_arch_timer.c
  59. @@ -14,6 +14,7 @@
  60. #include <linux/smp.h>
  61. #include <linux/cpu.h>
  62. #include <linux/cpu_pm.h>
  63. +#include <linux/clk.h>
  64. #include <linux/clockchips.h>
  65. #include <linux/clocksource.h>
  66. #include <linux/interrupt.h>
  67. @@ -376,6 +377,16 @@ arch_timer_detect_rate(void __iomem *cnt
  68. arch_timer_rate = arch_timer_get_cntfrq();
  69. }
  70. + /* Get clk rate through clk driver if present */
  71. + if (!arch_timer_rate) {
  72. + struct clk *clk = of_clk_get(np, 0);
  73. +
  74. + if (!IS_ERR(clk)) {
  75. + if (!clk_prepare_enable(clk))
  76. + arch_timer_rate = clk_get_rate(clk);
  77. + }
  78. + }
  79. +
  80. /* Check the timer frequency. */
  81. if (arch_timer_rate == 0)
  82. pr_warn("Architected timer frequency not available\n");