Advertisement
Guest User

Untitled

a guest
Oct 4th, 2022
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 23.06 KB | None | 0 0
  1. commit 1582485964f53ad275ec48cb9f2f519c65fbe117
  2. Author: Arnd Bergmann <arnd@arndb.de>
  3. Date:   Mon Oct 3 22:15:51 2022 +0200
  4.  
  5.     experimental: make armv6 build together with armv5
  6.    
  7.     Signed-off-by: Arnd Bergmann <arnd@arndb.de>
  8.  
  9. diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
  10. index b9bac8f7bc5d..2552ac97c0fd 100644
  11. --- a/arch/arm/Kconfig
  12. +++ b/arch/arm/Kconfig
  13. @@ -340,45 +340,37 @@ comment "CPU Core family selection"
  14.  
  15.  config ARCH_MULTI_V4
  16.     bool "ARMv4 based platforms (FA526, StrongARM)"
  17. -   depends on !ARCH_MULTI_V6_V7
  18. -   select ARCH_MULTI_V4_V5
  19. +   depends on !ARCH_MULTI_V7
  20.     select CPU_FA526 if !(CPU_SA110 || CPU_SA1100)
  21.  
  22.  config ARCH_MULTI_V4T
  23.     bool "ARMv4T based platforms (ARM720T, ARM920T, ...)"
  24. -   depends on !ARCH_MULTI_V6_V7
  25. -   select ARCH_MULTI_V4_V5
  26. +   depends on !ARCH_MULTI_V7
  27.     select CPU_ARM920T if !(CPU_ARM7TDMI || CPU_ARM720T || \
  28.         CPU_ARM740T || CPU_ARM9TDMI || CPU_ARM922T || \
  29.         CPU_ARM925T || CPU_ARM940T)
  30.  
  31.  config ARCH_MULTI_V5
  32.     bool "ARMv5 based platforms (ARM926T, XSCALE, PJ1, ...)"
  33. -   depends on !ARCH_MULTI_V6_V7
  34. -   select ARCH_MULTI_V4_V5
  35. +   depends on !ARCH_MULTI_V7
  36.     select CPU_ARM926T if !(CPU_ARM946E || CPU_ARM1020 || \
  37.         CPU_ARM1020E || CPU_ARM1022 || CPU_ARM1026 || \
  38.         CPU_XSCALE || CPU_XSC3 || CPU_MOHAWK || CPU_FEROCEON)
  39.  
  40. -config ARCH_MULTI_V4_V5
  41. -   bool
  42. -
  43.  config ARCH_MULTI_V6
  44.     bool "ARMv6 based platforms (ARM11)"
  45. -   select ARCH_MULTI_V6_V7
  46. +   depends on !ARCH_MULTI_V7
  47. +   select MIGHT_HAVE_CACHE_L2X0
  48.     select CPU_V6K
  49.  
  50.  config ARCH_MULTI_V7
  51.     bool "ARMv7 based platforms (Cortex-A, PJ4, Scorpion, Krait)"
  52. +   depends on BROKEN
  53.     default y
  54. -   select ARCH_MULTI_V6_V7
  55. +   select MIGHT_HAVE_CACHE_L2X0
  56.     select CPU_V7
  57.     select HAVE_SMP
  58.  
  59. -config ARCH_MULTI_V6_V7
  60. -   bool
  61. -   select MIGHT_HAVE_CACHE_L2X0
  62. -
  63.  config ARCH_MULTI_CPU_AUTO
  64.     def_bool !(ARCH_MULTI_V4 || ARCH_MULTI_V4T || ARCH_MULTI_V6_V7)
  65.     select ARCH_MULTI_V5
  66. @@ -948,7 +940,7 @@ config HAVE_SMP
  67.  
  68.  config SMP
  69.     bool "Symmetric Multi-Processing"
  70. -   depends on CPU_V6K || CPU_V7
  71. +   depends on CPU_V7
  72.     depends on HAVE_SMP
  73.     depends on MMU || ARM_MPU
  74.     select IRQ_WORK
  75. diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
  76. index c39303e5c234..d4d5c17ab1cb 100644
  77. --- a/arch/arm/kernel/entry-armv.S
  78. +++ b/arch/arm/kernel/entry-armv.S
  79. @@ -910,7 +910,7 @@ __kuser_helper_start:
  80.  
  81.  __kuser_cmpxchg64:             @ 0xffff0f60
  82.  
  83. -#if defined(CONFIG_CPU_32v6K)
  84. +#ifdef CONFIG_CPU_v7
  85.  
  86.     stmfd   sp!, {r4, r5, r6, r7}
  87.     ldrd    r4, r5, [r0]            @ load old val
  88. @@ -927,7 +927,7 @@ __kuser_cmpxchg64:              @ 0xffff0f60
  89.     ldmfd   sp!, {r4, r5, r6, r7}
  90.     usr_ret lr
  91.  
  92. -#elif !defined(CONFIG_SMP)
  93. +#else
  94.  
  95.  #ifdef CONFIG_MMU
  96.  
  97. @@ -972,8 +972,6 @@ kuser_cmpxchg64_fixup:
  98.     usr_ret lr
  99.  #endif
  100.  
  101. -#else
  102. -#error "incoherent kernel configuration"
  103.  #endif
  104.  
  105.     kuser_pad __kuser_cmpxchg64, 64
  106. diff --git a/arch/arm/kernel/entry-header.S b/arch/arm/kernel/entry-header.S
  107. index 99411fa91350..a5f072e9fcaa 100644
  108. --- a/arch/arm/kernel/entry-header.S
  109. +++ b/arch/arm/kernel/entry-header.S
  110. @@ -222,7 +222,7 @@
  111.  #ifndef CONFIG_THUMB2_KERNEL
  112.     @ ARM mode SVC restore
  113.     msr spsr_cxsf, \rpsr
  114. -#if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_32v6K)
  115. +#if defined(CONFIG_CPU_V7)
  116.     @ We must avoid clrex due to Cortex-A15 erratum #830321
  117.     sub r0, sp, #4          @ uninhabited address
  118.     strex   r1, r2, [r0]            @ clear the exclusive monitor
  119. @@ -291,18 +291,12 @@
  120.  
  121.  
  122.     .macro  restore_user_regs, fast = 0, offset = 0
  123. -#if defined(CONFIG_CPU_32v6K) && \
  124. -    (!defined(CONFIG_CPU_V6) || defined(CONFIG_SMP))
  125. -#ifdef CONFIG_CPU_V6
  126. -ALT_SMP(nop)
  127. -ALT_UP_B(.L1_\@)
  128. -#endif
  129. +#if defined(CONFIG_TLS_REGISTER)
  130.     @ The TLS register update is deferred until return to user space so we
  131.     @ can use it for other things while running in the kernel
  132.     mrc p15, 0, r1, c13, c0, 3      @ get current_thread_info pointer
  133.     ldr r1, [r1, #TI_TP_VALUE]
  134.     mcr p15, 0, r1, c13, c0, 3      @ set TLS register
  135. -.L1_\@:
  136.  #endif
  137.  
  138.     uaccess_enable r1, isb=0
  139. @@ -314,7 +308,7 @@ ALT_UP_B(.L1_\@)
  140.     tst r1, #PSR_I_BIT | 0x0f
  141.     bne 1f
  142.     msr spsr_cxsf, r1           @ save in spsr_svc
  143. -#if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_32v6K)
  144. +#if defined(CONFIG_CPU_V7)
  145.     @ We must avoid clrex due to Cortex-A15 erratum #830321
  146.     strex   r1, r2, [r2]            @ clear the exclusive monitor
  147.  #endif
  148. diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig
  149. index 8789d93a7c04..2660767212f2 100644
  150. --- a/arch/arm/mach-bcm/Kconfig
  151. +++ b/arch/arm/mach-bcm/Kconfig
  152. @@ -1,7 +1,7 @@
  153.  # SPDX-License-Identifier: GPL-2.0
  154.  menuconfig ARCH_BCM
  155.     bool "Broadcom SoC Support"
  156. -   depends on ARCH_MULTI_V6_V7
  157. +   depends on ARCH_MULTI_V6 || ARCH_MULTI_V7
  158.     help
  159.       This enables support for Broadcom ARM based SoC chips
  160.  
  161. diff --git a/arch/arm/mach-davinci/common.h b/arch/arm/mach-davinci/common.h
  162. index b4fd0e9acf6c..b2a96cdf88da 100644
  163. --- a/arch/arm/mach-davinci/common.h
  164. +++ b/arch/arm/mach-davinci/common.h
  165. @@ -67,7 +67,7 @@ int davinci_pm_init(void);
  166.  static inline int davinci_pm_init(void) { return 0; }
  167.  #endif
  168.  
  169. -void __init pdata_quirks_init(void);
  170. +void __init davinci_pdata_quirks_init(void);
  171.  
  172.  #define SRAM_SIZE  SZ_128K
  173.  
  174. diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c
  175. index 45763a9b37ee..16c1b3e6c20a 100644
  176. --- a/arch/arm/mach-davinci/da8xx-dt.c
  177. +++ b/arch/arm/mach-davinci/da8xx-dt.c
  178. @@ -15,7 +15,7 @@
  179.  static void __init da850_init_machine(void)
  180.  {
  181.     davinci_pm_init();
  182. -   pdata_quirks_init();
  183. +   davinci_pdata_quirks_init();
  184.  }
  185.  
  186.  static const char *const da850_boards_compat[] __initconst = {
  187. diff --git a/arch/arm/mach-davinci/pdata-quirks.c b/arch/arm/mach-davinci/pdata-quirks.c
  188. index b8b5f1a5e092..a22ba00a0fba 100644
  189. --- a/arch/arm/mach-davinci/pdata-quirks.c
  190. +++ b/arch/arm/mach-davinci/pdata-quirks.c
  191. @@ -206,7 +206,7 @@ static struct pdata_init pdata_quirks[] __initdata = {
  192.     { /* sentinel */ },
  193.  };
  194.  
  195. -void __init pdata_quirks_init(void)
  196. +void __init davinci_pdata_quirks_init(void)
  197.  {
  198.     pdata_quirks_check(pdata_quirks);
  199.  }
  200. diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
  201. index ab767f059929..c15b31afcfdf 100644
  202. --- a/arch/arm/mach-imx/Kconfig
  203. +++ b/arch/arm/mach-imx/Kconfig
  204. @@ -2,7 +2,7 @@
  205.  menuconfig ARCH_MXC
  206.     bool "Freescale i.MX family"
  207.     depends on ((ARCH_MULTI_V4T || ARCH_MULTI_V5) && CPU_LITTLE_ENDIAN) || \
  208. -       ARCH_MULTI_V6_V7 || ARM_SINGLE_ARMV7M
  209. +       ARCH_MULTI_V6 || ARCH_MULTI_V7 || ARM_SINGLE_ARMV7M
  210.     select CLKSRC_IMX_GPT
  211.     select GENERIC_IRQ_CHIP
  212.     select GPIOLIB
  213. diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c
  214. index 83381e23fab9..bd0232e59e64 100644
  215. --- a/arch/arm/mach-omap1/clock.c
  216. +++ b/arch/arm/mach-omap1/clock.c
  217. @@ -236,7 +236,7 @@ int omap1_select_table_rate(struct omap1_clk *clk, unsigned long rate, unsigned
  218.     ref_rate = ck_ref_p->rate;
  219.  
  220.     for (ptr = omap1_rate_table; ptr->rate; ptr++) {
  221. -       if (!(ptr->flags & cpu_mask))
  222. +       if (!(ptr->flags & omap1_cpu_mask))
  223.             continue;
  224.  
  225.         if (ptr->xtal != ref_rate)
  226. @@ -333,7 +333,7 @@ long omap1_round_to_table_rate(struct omap1_clk *clk, unsigned long rate, unsign
  227.     highest_rate = -EINVAL;
  228.  
  229.     for (ptr = omap1_rate_table; ptr->rate; ptr++) {
  230. -       if (!(ptr->flags & cpu_mask))
  231. +       if (!(ptr->flags & omap1_cpu_mask))
  232.             continue;
  233.  
  234.         if (ptr->xtal != ref_rate)
  235. diff --git a/arch/arm/mach-omap1/clock.h b/arch/arm/mach-omap1/clock.h
  236. index 16cfb2e86ee4..0147537ff2c5 100644
  237. --- a/arch/arm/mach-omap1/clock.h
  238. +++ b/arch/arm/mach-omap1/clock.h
  239. @@ -185,7 +185,7 @@ extern const struct clkops clkops_uart_16xx;
  240.  extern const struct clkops clkops_generic;
  241.  
  242.  /* used for passing SoC type to omap1_{select,round_to}_table_rate() */
  243. -extern u32 cpu_mask;
  244. +extern u32 omap1_cpu_mask;
  245.  
  246.  extern const struct clk_ops omap1_clk_null_ops;
  247.  extern const struct clk_ops omap1_clk_gate_ops;
  248. diff --git a/arch/arm/mach-omap1/clock_data.c b/arch/arm/mach-omap1/clock_data.c
  249. index c58d200e4816..9cc2cc9625f3 100644
  250. --- a/arch/arm/mach-omap1/clock_data.c
  251. +++ b/arch/arm/mach-omap1/clock_data.c
  252. @@ -689,7 +689,7 @@ static void __init omap1_show_rates(void)
  253.           arm_ck.rate / 1000000, (arm_ck.rate / 100000) % 10);
  254.  }
  255.  
  256. -u32 cpu_mask;
  257. +u32 omap1_cpu_mask;
  258.  
  259.  int __init omap1_clk_init(void)
  260.  {
  261. @@ -713,15 +713,15 @@ int __init omap1_clk_init(void)
  262.     /* By default all idlect1 clocks are allowed to idle */
  263.     arm_idlect1_mask = ~0;
  264.  
  265. -   cpu_mask = 0;
  266. +   omap1_cpu_mask = 0;
  267.     if (cpu_is_omap1710())
  268. -       cpu_mask |= CK_1710;
  269. +       omap1_cpu_mask |= CK_1710;
  270.     if (cpu_is_omap16xx())
  271. -       cpu_mask |= CK_16XX;
  272. +       omap1_cpu_mask |= CK_16XX;
  273.     if (cpu_is_omap1510())
  274. -       cpu_mask |= CK_1510;
  275. +       omap1_cpu_mask |= CK_1510;
  276.     if (cpu_is_omap310())
  277. -       cpu_mask |= CK_310;
  278. +       omap1_cpu_mask |= CK_310;
  279.  
  280.     /* Pointers to these clocks are needed by code in clock.c */
  281.     api_ck_p = &api_ck.clk;
  282. @@ -788,7 +788,7 @@ int __init omap1_clk_init(void)
  283.     omap_writew(0x0000, ARM_IDLECT2);   /* Turn LCD clock off also */
  284.  
  285.     for (c = omap_clks; c < omap_clks + ARRAY_SIZE(omap_clks); c++) {
  286. -       if (!(c->cpu & cpu_mask))
  287. +       if (!(c->cpu & omap1_cpu_mask))
  288.             continue;
  289.  
  290.         if (c->lk.clk_hw->init) { /* NULL if provider already registered */
  291. diff --git a/arch/arm/mach-omap1/id.c b/arch/arm/mach-omap1/id.c
  292. index c3bb1b71fdf3..796e764d181b 100644
  293. --- a/arch/arm/mach-omap1/id.c
  294. +++ b/arch/arm/mach-omap1/id.c
  295. @@ -59,11 +59,11 @@ static struct omap_id omap_ids[] __initdata = {
  296.     { .jtag_id = 0xb5f7, .die_rev = 0x2, .omap_id = 0x03330100, .type = 0x17100000},
  297.  };
  298.  
  299. -unsigned int omap_rev(void)
  300. +unsigned int omap1_rev(void)
  301.  {
  302.     return omap_revision;
  303.  }
  304. -EXPORT_SYMBOL(omap_rev);
  305. +EXPORT_SYMBOL(omap1_rev);
  306.  
  307.  /*
  308.   * Get OMAP type from PROD_ID.
  309. diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c
  310. index 9761d8404949..dbc33be2fd63 100644
  311. --- a/arch/arm/mach-omap1/pm.c
  312. +++ b/arch/arm/mach-omap1/pm.c
  313. @@ -202,7 +202,7 @@ void omap1_pm_suspend(void)
  314.     unsigned long arg0 = 0, arg1 = 0;
  315.  
  316.     printk(KERN_INFO "PM: OMAP%x is trying to enter deep sleep...\n",
  317. -       omap_rev());
  318. +       omap1_rev());
  319.  
  320.     omap_serial_wake_trigger(1);
  321.  
  322. @@ -381,7 +381,7 @@ void omap1_pm_suspend(void)
  323.     omap_serial_wake_trigger(0);
  324.  
  325.     printk(KERN_INFO "PM: OMAP%x is re-starting from deep sleep...\n",
  326. -       omap_rev());
  327. +       omap1_rev());
  328.  }
  329.  
  330.  #ifdef CONFIG_DEBUG_FS
  331. @@ -588,10 +588,10 @@ static int __init omap_pm_init(void)
  332.      * memory the MPU can see when it wakes up.
  333.      */
  334.     if (cpu_is_omap15xx()) {
  335. -       omap_sram_suspend = omap_sram_push(omap1510_cpu_suspend,
  336. +       omap_sram_suspend = omap1_sram_push(omap1510_cpu_suspend,
  337.                            omap1510_cpu_suspend_sz);
  338.     } else if (cpu_is_omap16xx()) {
  339. -       omap_sram_suspend = omap_sram_push(omap1610_cpu_suspend,
  340. +       omap_sram_suspend = omap1_sram_push(omap1610_cpu_suspend,
  341.                            omap1610_cpu_suspend_sz);
  342.     }
  343.  
  344. diff --git a/arch/arm/mach-omap1/sram-init.c b/arch/arm/mach-omap1/sram-init.c
  345. index 79b5a24420f6..7a5b244aacda 100644
  346. --- a/arch/arm/mach-omap1/sram-init.c
  347. +++ b/arch/arm/mach-omap1/sram-init.c
  348. @@ -56,7 +56,7 @@ static void *omap_sram_push_address(unsigned long size)
  349.     return (void __force *)omap_sram_ceil;
  350.  }
  351.  
  352. -void *omap_sram_push(void *funcp, unsigned long size)
  353. +void *omap1_sram_push(void *funcp, unsigned long size)
  354.  {
  355.     void *sram;
  356.     unsigned long base;
  357. @@ -140,7 +140,7 @@ int __init omap1_sram_init(void)
  358.  {
  359.     omap_detect_and_map_sram();
  360.     _omap_sram_reprogram_clock =
  361. -           omap_sram_push(omap1_sram_reprogram_clock,
  362. +           omap1_sram_push(omap1_sram_reprogram_clock,
  363.                     omap1_sram_reprogram_clock_sz);
  364.  
  365.     return 0;
  366. diff --git a/arch/arm/mach-omap1/sram.h b/arch/arm/mach-omap1/sram.h
  367. index f45e6dd6d7e5..539c756b7a0f 100644
  368. --- a/arch/arm/mach-omap1/sram.h
  369. +++ b/arch/arm/mach-omap1/sram.h
  370. @@ -3,7 +3,7 @@
  371.  extern void omap_sram_reprogram_clock(u32 dpllctl, u32 ckctl);
  372.  
  373.  int omap1_sram_init(void);
  374. -void *omap_sram_push(void *funcp, unsigned long size);
  375. +void *omap1_sram_push(void *funcp, unsigned long size);
  376.  
  377.  /* Do not use these */
  378.  extern void omap1_sram_reprogram_clock(u32 ckctl, u32 dpllctl);
  379. diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
  380. index 1610c567a6a3..853409b341a3 100644
  381. --- a/arch/arm/mach-omap2/board-generic.c
  382. +++ b/arch/arm/mach-omap2/board-generic.c
  383. @@ -28,7 +28,7 @@ static const struct of_device_id omap_dt_match_table[] __initconst = {
  384.  
  385.  static void __init __maybe_unused omap_generic_init(void)
  386.  {
  387. -   pdata_quirks_init(omap_dt_match_table);
  388. +   omap_pdata_quirks_init(omap_dt_match_table);
  389.     omap_soc_device_init();
  390.  }
  391.  
  392. diff --git a/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c b/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c
  393. index edf046b470ba..ae9f920f4623 100644
  394. --- a/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c
  395. +++ b/arch/arm/mach-omap2/clkt2xxx_virt_prcm_set.c
  396. @@ -77,7 +77,7 @@ long omap2_round_to_table_rate(struct clk_hw *hw, unsigned long rate,
  397.     highest_rate = -EINVAL;
  398.  
  399.     for (ptr = rate_table; ptr->mpu_speed; ptr++) {
  400. -       if (!(ptr->flags & cpu_mask))
  401. +       if (!(ptr->flags & omap2_cpu_mask))
  402.             continue;
  403.         if (ptr->xtal_speed != sys_ck_rate)
  404.             continue;
  405. @@ -101,7 +101,7 @@ int omap2_select_table_rate(struct clk_hw *hw, unsigned long rate,
  406.     unsigned long flags;
  407.  
  408.     for (prcm = rate_table; prcm->mpu_speed; prcm++) {
  409. -       if (!(prcm->flags & cpu_mask))
  410. +       if (!(prcm->flags & omap2_cpu_mask))
  411.             continue;
  412.  
  413.         if (prcm->xtal_speed != sys_ck_rate)
  414. @@ -174,7 +174,7 @@ void omap2xxx_clkt_vps_check_bootloader_rates(void)
  415.  
  416.     rate = omap2xxx_clk_get_core_rate();
  417.     for (prcm = rate_table; prcm->mpu_speed; prcm++) {
  418. -       if (!(prcm->flags & cpu_mask))
  419. +       if (!(prcm->flags & omap2_cpu_mask))
  420.             continue;
  421.         if (prcm->xtal_speed != sys_ck_rate)
  422.             continue;
  423. diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c
  424. index 3c1d12dc8ff3..66d077fae77c 100644
  425. --- a/arch/arm/mach-omap2/clock.c
  426. +++ b/arch/arm/mach-omap2/clock.c
  427. @@ -36,7 +36,7 @@
  428.  #include "cm-regbits-34xx.h"
  429.  #include "common.h"
  430.  
  431. -u16 cpu_mask;
  432. +u16 omap2_cpu_mask;
  433.  
  434.  /* DPLL valid Fint frequency band limits - from 34xx TRM Section 4.7.6.2 */
  435.  #define OMAP3430_DPLL_FINT_BAND1_MIN   750000
  436. diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h
  437. index bbe4b32891bb..d028ee22f001 100644
  438. --- a/arch/arm/mach-omap2/clock.h
  439. +++ b/arch/arm/mach-omap2/clock.h
  440. @@ -63,7 +63,7 @@
  441.  
  442.  extern struct ti_clk_ll_ops omap_clk_ll_ops;
  443.  
  444. -extern u16 cpu_mask;
  445. +extern u16 omap2_cpu_mask;
  446.  
  447.  extern const struct clkops clkops_omap2_dflt_wait;
  448.  extern const struct clkops clkops_omap2_dflt;
  449. diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
  450. index bd5981945239..6cb87d2fb446 100644
  451. --- a/arch/arm/mach-omap2/common.h
  452. +++ b/arch/arm/mach-omap2/common.h
  453. @@ -344,7 +344,7 @@ static inline void omap5_secondary_hyp_startup(void)
  454.  
  455.  struct omap_system_dma_plat_info;
  456.  
  457. -void pdata_quirks_init(const struct of_device_id *);
  458. +void omap_pdata_quirks_init(const struct of_device_id *);
  459.  void omap_auxdata_legacy_init(struct device *dev);
  460.  void omap_pcs_legacy_init(int irq, void (*rearm)(void));
  461.  extern struct omap_system_dma_plat_info dma_plat_info;
  462. diff --git a/arch/arm/mach-omap2/omap-headsmp.S b/arch/arm/mach-omap2/omap-headsmp.S
  463. index 1762f919941f..ada360847c21 100644
  464. --- a/arch/arm/mach-omap2/omap-headsmp.S
  465. +++ b/arch/arm/mach-omap2/omap-headsmp.S
  466. @@ -16,6 +16,8 @@
  467.  #include <linux/init.h>
  468.  #include <asm/assembler.h>
  469.  
  470. +.arch armv6k
  471. +
  472.  #include "omap44xx.h"
  473.  
  474.  /* Physical address needed since MMU not enabled yet on secondary core */
  475. diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
  476. index 5b99d602c87b..59ca82ce81d7 100644
  477. --- a/arch/arm/mach-omap2/pdata-quirks.c
  478. +++ b/arch/arm/mach-omap2/pdata-quirks.c
  479. @@ -545,7 +545,7 @@ pdata_quirks_init_clocks(const struct of_device_id *omap_dt_match_table)
  480.     }
  481.  }
  482.  
  483. -void __init pdata_quirks_init(const struct of_device_id *omap_dt_match_table)
  484. +void __init omap_pdata_quirks_init(const struct of_device_id *omap_dt_match_table)
  485.  {
  486.     /*
  487.      * We still need this for omap2420 and omap3 PM to work, others are
  488. diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c
  489. index 6953c47d8dc6..87ef7f28a1f7 100644
  490. --- a/arch/arm/mach-omap2/pm24xx.c
  491. +++ b/arch/arm/mach-omap2/pm24xx.c
  492. @@ -303,7 +303,7 @@ int __init omap2_pm_init(void)
  493.      * memory the MPU can see when it wakes up after the entire
  494.      * chip enters idle.
  495.      */
  496. -   omap2_sram_suspend = omap_sram_push(omap24xx_cpu_suspend,
  497. +   omap2_sram_suspend = omap2_sram_push(omap24xx_cpu_suspend,
  498.                         omap24xx_cpu_suspend_sz);
  499.  
  500.     arm_pm_idle = omap2_pm_idle;
  501. diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
  502. index d73c7b692116..d41d43a51061 100644
  503. --- a/arch/arm/mach-omap2/pm34xx.c
  504. +++ b/arch/arm/mach-omap2/pm34xx.c
  505. @@ -428,7 +428,7 @@ static int __init pwrdms_setup(struct powerdomain *pwrdm, void *unused)
  506.   */
  507.  void omap_push_sram_idle(void)
  508.  {
  509. -   omap3_do_wfi_sram = omap_sram_push(omap3_do_wfi, omap3_do_wfi_sz);
  510. +   omap3_do_wfi_sram = omap2_sram_push(omap3_do_wfi, omap3_do_wfi_sz);
  511.  }
  512.  
  513.  static void __init pm_errata_configure(void)
  514. diff --git a/arch/arm/mach-omap2/sram.c b/arch/arm/mach-omap2/sram.c
  515. index 39cf270da718..355ef415aa9e 100644
  516. --- a/arch/arm/mach-omap2/sram.c
  517. +++ b/arch/arm/mach-omap2/sram.c
  518. @@ -78,7 +78,7 @@ static void *omap_sram_push_address(unsigned long size)
  519.     return (void __force *)omap_sram_ceil;
  520.  }
  521.  
  522. -void *omap_sram_push(void *funcp, unsigned long size)
  523. +void *omap2_sram_push(void *funcp, unsigned long size)
  524.  {
  525.     void *sram;
  526.     unsigned long base;
  527. @@ -252,13 +252,13 @@ u32 omap2_set_prcm(u32 dpll_ctrl_val, u32 sdrc_rfr_val, int bypass)
  528.  #ifdef CONFIG_SOC_OMAP2420
  529.  static int __init omap242x_sram_init(void)
  530.  {
  531. -   _omap2_sram_ddr_init = omap_sram_push(omap242x_sram_ddr_init,
  532. +   _omap2_sram_ddr_init = omap2_sram_push(omap242x_sram_ddr_init,
  533.                     omap242x_sram_ddr_init_sz);
  534.  
  535. -   _omap2_sram_reprogram_sdrc = omap_sram_push(omap242x_sram_reprogram_sdrc,
  536. +   _omap2_sram_reprogram_sdrc = omap2_sram_push(omap242x_sram_reprogram_sdrc,
  537.                         omap242x_sram_reprogram_sdrc_sz);
  538.  
  539. -   _omap2_set_prcm = omap_sram_push(omap242x_sram_set_prcm,
  540. +   _omap2_set_prcm = omap2_sram_push(omap242x_sram_set_prcm,
  541.                      omap242x_sram_set_prcm_sz);
  542.  
  543.     return 0;
  544. @@ -273,13 +273,13 @@ static inline int omap242x_sram_init(void)
  545.  #ifdef CONFIG_SOC_OMAP2430
  546.  static int __init omap243x_sram_init(void)
  547.  {
  548. -   _omap2_sram_ddr_init = omap_sram_push(omap243x_sram_ddr_init,
  549. +   _omap2_sram_ddr_init = omap2_sram_push(omap243x_sram_ddr_init,
  550.                     omap243x_sram_ddr_init_sz);
  551.  
  552. -   _omap2_sram_reprogram_sdrc = omap_sram_push(omap243x_sram_reprogram_sdrc,
  553. +   _omap2_sram_reprogram_sdrc = omap2_sram_push(omap243x_sram_reprogram_sdrc,
  554.                         omap243x_sram_reprogram_sdrc_sz);
  555.  
  556. -   _omap2_set_prcm = omap_sram_push(omap243x_sram_set_prcm,
  557. +   _omap2_set_prcm = omap2_sram_push(omap243x_sram_set_prcm,
  558.                      omap243x_sram_set_prcm_sz);
  559.  
  560.     return 0;
  561. diff --git a/arch/arm/mach-omap2/sram.h b/arch/arm/mach-omap2/sram.h
  562. index 271062f23482..9de6012a9860 100644
  563. --- a/arch/arm/mach-omap2/sram.h
  564. +++ b/arch/arm/mach-omap2/sram.h
  565. @@ -15,7 +15,7 @@ extern void omap3_sram_restore_context(void);
  566.  
  567.  extern int __init omap_sram_init(void);
  568.  
  569. -extern void *omap_sram_push(void *funcp, unsigned long size);
  570. +extern void *omap2_sram_push(void *funcp, unsigned long size);
  571.  
  572.  /* Do not use these */
  573.  extern void omap24xx_sram_reprogram_clock(u32 ckctl, u32 dpllctl);
  574. diff --git a/arch/arm/mach-omap2/sram242x.S b/arch/arm/mach-omap2/sram242x.S
  575. index 92ef21ac2ac1..ed6267105d31 100644
  576. --- a/arch/arm/mach-omap2/sram242x.S
  577. +++ b/arch/arm/mach-omap2/sram242x.S
  578. @@ -24,6 +24,8 @@
  579.  #include "cm2xxx.h"
  580.  #include "sdrc.h"
  581.  
  582. +   .arch armv6
  583. +
  584.     .text
  585.  
  586.     .align  3
  587. diff --git a/arch/arm/mach-omap2/sram243x.S b/arch/arm/mach-omap2/sram243x.S
  588. index faf03b7f08f5..acd696b40b5c 100644
  589. --- a/arch/arm/mach-omap2/sram243x.S
  590. +++ b/arch/arm/mach-omap2/sram243x.S
  591. @@ -24,6 +24,8 @@
  592.  #include "cm2xxx.h"
  593.  #include "sdrc.h"
  594.  
  595. +   .arch armv6
  596. +
  597.     .text
  598.  
  599.     .align  3
  600. diff --git a/arch/arm/mm/copypage-v6.c b/arch/arm/mm/copypage-v6.c
  601. index d8a115de5507..127073ec7349 100644
  602. --- a/arch/arm/mm/copypage-v6.c
  603. +++ b/arch/arm/mm/copypage-v6.c
  604. @@ -56,7 +56,8 @@ static void v6_clear_user_highpage_nonaliasing(struct page *page, unsigned long
  605.   */
  606.  static void discard_old_kernel_data(void *kto)
  607.  {
  608. -   __asm__("mcrr   p15, 0, %1, %0, c6  @ 0xec401f06"
  609. +   __asm__(".arch armv6\n"
  610. +   "    mcrr   p15, 0, %1, %0, c6  @ 0xec401f06"
  611.        :
  612.        : "r" (kto),
  613.          "r" ((unsigned long)kto + PAGE_SIZE - 1)
  614. diff --git a/arch/arm/mm/flush.c b/arch/arm/mm/flush.c
  615. index 7ff9feea13a6..7f49585b5a42 100644
  616. --- a/arch/arm/mm/flush.c
  617. +++ b/arch/arm/mm/flush.c
  618. @@ -42,7 +42,8 @@ static void flush_pfn_alias(unsigned long pfn, unsigned long vaddr)
  619.  
  620.     set_top_pte(to, pfn_pte(pfn, PAGE_KERNEL));
  621.  
  622. -   asm(    "mcrr   p15, 0, %1, %0, c14\n"
  623. +   asm(    ".arch armv6\n"
  624. +   "   mcrr    p15, 0, %1, %0, c14\n"
  625.     "   mcr p15, 0, %2, c7, c10, 4"
  626.         :
  627.         : "r" (to), "r" (to + PAGE_SIZE - 1), "r" (zero)
  628. diff --git a/arch/arm/probes/kprobes/test-arm.c b/arch/arm/probes/kprobes/test-arm.c
  629. index a0dae35ffacd..a17cf57155d3 100644
  630. --- a/arch/arm/probes/kprobes/test-arm.c
  631. +++ b/arch/arm/probes/kprobes/test-arm.c
  632. @@ -466,7 +466,7 @@ void kprobe_arm_test_cases(void)
  633.  #if __LINUX_ARM_ARCH__ >= 6
  634.     TEST_UNSUPPORTED("ldrex r2, [sp]")
  635.  #endif
  636. -#if (__LINUX_ARM_ARCH__ >= 7) || defined(CONFIG_CPU_32v6K)
  637. +#if __LINUX_ARM_ARCH__ >= 7
  638.     TEST_UNSUPPORTED("strexd    r0, r2, r3, [sp]")
  639.     TEST_UNSUPPORTED("ldrexd    r2, r3, [sp]")
  640.     TEST_UNSUPPORTED("strexb    r0, r2, [sp]")
  641. diff --git a/include/linux/soc/ti/omap1-soc.h b/include/linux/soc/ti/omap1-soc.h
  642. index a42d9aa68648..cbc1a1833acb 100644
  643. --- a/include/linux/soc/ti/omap1-soc.h
  644. +++ b/include/linux/soc/ti/omap1-soc.h
  645. @@ -38,17 +38,17 @@
  646.  #endif
  647.  
  648.  /*
  649. - * omap_rev bits:
  650. + * omap1_rev bits:
  651.   * CPU id bits (0730, 1510, 1710, 2422...) [31:16]
  652.   * CPU revision    (See _REV_ defined in cpu.h)    [15:08]
  653.   * CPU class bits (15xx, 16xx, 24xx, 34xx...)  [07:00]
  654.   */
  655. -unsigned int omap_rev(void);
  656. +unsigned int omap1_rev(void);
  657.  
  658.  /*
  659.   * Get the CPU revision for OMAP devices
  660.   */
  661. -#define GET_OMAP_REVISION()    ((omap_rev() >> 8) & 0xff)
  662. +#define GET_OMAP_REVISION()    ((omap1_rev() >> 8) & 0xff)
  663.  
  664.  /*
  665.   * Macros to group OMAP into cpu classes.
  666. @@ -56,7 +56,7 @@ unsigned int omap_rev(void);
  667.   * cpu_is_omap15xx():  True for OMAP1510, OMAP5910 and OMAP310
  668.   * cpu_is_omap16xx():  True for OMAP1610, OMAP5912 and OMAP1710
  669.   */
  670. -#define GET_OMAP_CLASS (omap_rev() & 0xff)
  671. +#define GET_OMAP_CLASS (omap1_rev() & 0xff)
  672.  
  673.  #define IS_OMAP_CLASS(class, id)           \
  674.  static inline int is_omap ##class (void)       \
  675. @@ -64,7 +64,7 @@ static inline int is_omap ##class (void)      \
  676.     return (GET_OMAP_CLASS == (id)) ? 1 : 0;    \
  677.  }
  678.  
  679. -#define GET_OMAP_SUBCLASS  ((omap_rev() >> 20) & 0x0fff)
  680. +#define GET_OMAP_SUBCLASS  ((omap1_rev() >> 20) & 0x0fff)
  681.  
  682.  #define IS_OMAP_SUBCLASS(subclass, id)         \
  683.  static inline int is_omap ##subclass (void)        \
  684. @@ -109,7 +109,7 @@ IS_OMAP_CLASS(16xx, 0x16)
  685.   * cpu_is_omap1621():  True for OMAP1621
  686.   * cpu_is_omap1710():  True for OMAP1710
  687.   */
  688. -#define GET_OMAP_TYPE  ((omap_rev() >> 16) & 0xffff)
  689. +#define GET_OMAP_TYPE  ((omap1_rev() >> 16) & 0xffff)
  690.  
  691.  #define IS_OMAP_TYPE(type, id)             \
  692.  static inline int is_omap ##type (void)            \
  693.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement