905-BCM53573-minor-hacks.patch 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. From 6f1c62440eb6846cb8045d7a5480ec7bbe47c96f Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <[email protected]>
  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 <[email protected]>
  9. ---
  10. --- a/arch/arm/boot/dts/bcm53573.dtsi
  11. +++ b/arch/arm/boot/dts/bcm53573.dtsi
  12. @@ -53,6 +53,7 @@
  13. <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
  14. <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
  15. <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
  16. + clocks = <&ilp>;
  17. };
  18. clocks {
  19. --- a/drivers/bcma/main.c
  20. +++ b/drivers/bcma/main.c
  21. @@ -330,14 +330,6 @@ static int bcma_register_devices(struct
  22. }
  23. #endif
  24. -#ifdef CONFIG_BCMA_SFLASH
  25. - if (bus->drv_cc.sflash.present) {
  26. - err = platform_device_register(&bcma_sflash_dev);
  27. - if (err)
  28. - bcma_err(bus, "Error registering serial flash\n");
  29. - }
  30. -#endif
  31. -
  32. #ifdef CONFIG_BCMA_NFLASH
  33. if (bus->drv_cc.nflash.present) {
  34. err = platform_device_register(&bcma_nflash_dev);
  35. @@ -415,6 +407,14 @@ int bcma_bus_register(struct bcma_bus *b
  36. bcma_register_core(bus, core);
  37. }
  38. +#ifdef CONFIG_BCMA_SFLASH
  39. + if (bus->drv_cc.sflash.present) {
  40. + err = platform_device_register(&bcma_sflash_dev);
  41. + if (err)
  42. + bcma_err(bus, "Error registering serial flash\n");
  43. + }
  44. +#endif
  45. +
  46. /* Try to get SPROM */
  47. err = bcma_sprom_get(bus);
  48. if (err == -ENOENT) {
  49. --- a/drivers/clocksource/arm_arch_timer.c
  50. +++ b/drivers/clocksource/arm_arch_timer.c
  51. @@ -17,6 +17,7 @@
  52. #include <linux/smp.h>
  53. #include <linux/cpu.h>
  54. #include <linux/cpu_pm.h>
  55. +#include <linux/clk.h>
  56. #include <linux/clockchips.h>
  57. #include <linux/clocksource.h>
  58. #include <linux/interrupt.h>
  59. @@ -919,6 +920,16 @@ static void arch_timer_of_configure_rate
  60. if (of_property_read_u32(np, "clock-frequency", &arch_timer_rate))
  61. arch_timer_rate = rate;
  62. + /* Get clk rate through clk driver if present */
  63. + if (!arch_timer_rate) {
  64. + struct clk *clk = of_clk_get(np, 0);
  65. +
  66. + if (!IS_ERR(clk)) {
  67. + if (!clk_prepare_enable(clk))
  68. + arch_timer_rate = clk_get_rate(clk);
  69. + }
  70. + }
  71. +
  72. /* Check the timer frequency. */
  73. if (arch_timer_rate == 0)
  74. pr_warn("frequency not available\n");