005-v6.5-03-mips-ralink-rt288x-remove-clock-related-code.patch 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. From ffcdf47379eae86dc8f8f02c62994dacf2c9038e Mon Sep 17 00:00:00 2001
  2. From: Sergio Paracuellos <[email protected]>
  3. Date: Mon, 19 Jun 2023 06:09:35 +0200
  4. Subject: [PATCH 3/9] mips: ralink: rt288x: remove clock related code
  5. A properly clock driver for ralink SoCs has been added. Hence there is no
  6. need to have clock related code in 'arch/mips/ralink' folder anymore.
  7. Signed-off-by: Sergio Paracuellos <[email protected]>
  8. Signed-off-by: Thomas Bogendoerfer <[email protected]>
  9. ---
  10. arch/mips/include/asm/mach-ralink/rt288x.h | 10 ----------
  11. arch/mips/ralink/rt288x.c | 31 ------------------------------
  12. 2 files changed, 41 deletions(-)
  13. --- a/arch/mips/include/asm/mach-ralink/rt288x.h
  14. +++ b/arch/mips/include/asm/mach-ralink/rt288x.h
  15. @@ -17,7 +17,6 @@
  16. #define SYSC_REG_CHIP_NAME1 0x04
  17. #define SYSC_REG_CHIP_ID 0x0c
  18. #define SYSC_REG_SYSTEM_CONFIG 0x10
  19. -#define SYSC_REG_CLKCFG 0x30
  20. #define RT2880_CHIP_NAME0 0x38325452
  21. #define RT2880_CHIP_NAME1 0x20203038
  22. @@ -26,15 +25,6 @@
  23. #define CHIP_ID_ID_SHIFT 8
  24. #define CHIP_ID_REV_MASK 0xff
  25. -#define SYSTEM_CONFIG_CPUCLK_SHIFT 20
  26. -#define SYSTEM_CONFIG_CPUCLK_MASK 0x3
  27. -#define SYSTEM_CONFIG_CPUCLK_250 0x0
  28. -#define SYSTEM_CONFIG_CPUCLK_266 0x1
  29. -#define SYSTEM_CONFIG_CPUCLK_280 0x2
  30. -#define SYSTEM_CONFIG_CPUCLK_300 0x3
  31. -
  32. -#define CLKCFG_SRAM_CS_N_WDT BIT(9)
  33. -
  34. #define RT2880_SDRAM_BASE 0x08000000
  35. #define RT2880_MEM_SIZE_MIN 2
  36. #define RT2880_MEM_SIZE_MAX 128
  37. --- a/arch/mips/ralink/rt288x.c
  38. +++ b/arch/mips/ralink/rt288x.c
  39. @@ -17,37 +17,6 @@
  40. #include "common.h"
  41. -void __init ralink_clk_init(void)
  42. -{
  43. - unsigned long cpu_rate, wmac_rate = 40000000;
  44. - u32 t = rt_sysc_r32(SYSC_REG_SYSTEM_CONFIG);
  45. - t = ((t >> SYSTEM_CONFIG_CPUCLK_SHIFT) & SYSTEM_CONFIG_CPUCLK_MASK);
  46. -
  47. - switch (t) {
  48. - case SYSTEM_CONFIG_CPUCLK_250:
  49. - cpu_rate = 250000000;
  50. - break;
  51. - case SYSTEM_CONFIG_CPUCLK_266:
  52. - cpu_rate = 266666667;
  53. - break;
  54. - case SYSTEM_CONFIG_CPUCLK_280:
  55. - cpu_rate = 280000000;
  56. - break;
  57. - case SYSTEM_CONFIG_CPUCLK_300:
  58. - cpu_rate = 300000000;
  59. - break;
  60. - }
  61. -
  62. - ralink_clk_add("cpu", cpu_rate);
  63. - ralink_clk_add("300100.timer", cpu_rate / 2);
  64. - ralink_clk_add("300120.watchdog", cpu_rate / 2);
  65. - ralink_clk_add("300500.uart", cpu_rate / 2);
  66. - ralink_clk_add("300900.i2c", cpu_rate / 2);
  67. - ralink_clk_add("300c00.uartlite", cpu_rate / 2);
  68. - ralink_clk_add("400000.ethernet", cpu_rate / 2);
  69. - ralink_clk_add("480000.wmac", wmac_rate);
  70. -}
  71. -
  72. void __init ralink_of_remap(void)
  73. {
  74. rt_sysc_membase = plat_of_remap_node("ralink,rt2880-sysc");