Commit 8f3937761bf260e71e7c199cf6547535ae7e90b9

Authored by Stephen Warren
Committed by Stefano Babic
1 parent 1b097cff51

ARM: mx6: use common CPU errata config options

Now that U-Boot has common CONFIG_ options to work around some ARM CPU
errata, enable the relevant options on MX6, and remove the custom
lowlevel_init.S, since it's just duplicated code now.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Jason Liu <r64343@freescale.com>

Showing 8 changed files with 37 additions and 37 deletions Side-by-side Diff

arch/arm/cpu/armv7/Makefile
... ... @@ -32,7 +32,7 @@
32 32 COBJS += cpu.o
33 33 COBJS += syslib.o
34 34  
35   -ifneq ($(CONFIG_AM33XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX)$(CONFIG_TEGRA),)
  35 +ifneq ($(CONFIG_AM33XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX)$(CONFIG_TEGRA)$(CONFIG_MX6),)
36 36 SOBJS += lowlevel_init.o
37 37 endif
38 38  
arch/arm/cpu/armv7/mx6/Makefile
... ... @@ -28,7 +28,6 @@
28 28 LIB = $(obj)lib$(SOC).o
29 29  
30 30 COBJS = soc.o clock.o
31   -SOBJS = lowlevel_init.o
32 31  
33 32 SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
34 33 OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
arch/arm/cpu/armv7/mx6/lowlevel_init.S
1   -/*
2   - * Copyright (C) 2010-2011 Freescale Semiconductor, Inc.
3   - *
4   - * This program is free software; you can redistribute it and/or
5   - * modify it under the terms of the GNU General Public License as
6   - * published by the Free Software Foundation; either version 2 of
7   - * the License, or (at your option) any later version.
8   - *
9   - * This program is distributed in the hope that it will be useful,
10   - * but WITHOUT ANY WARRANTY; without even the implied warranty of
11   - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12   - * GNU General Public License for more details.
13   - *
14   - * You should have received a copy of the GNU General Public License
15   - * along with this program; if not, write to the Free Software
16   - * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
17   - * MA 02111-1307 USA
18   - */
19   -.section ".text.init", "x"
20   -
21   -#include <linux/linkage.h>
22   -
23   -.macro init_arm_errata
24   - /* ARM erratum ID #743622 */
25   - mrc p15, 0, r10, c15, c0, 1 /* read diagnostic register */
26   - orr r10, r10, #1 << 6 /* set bit #6 */
27   - /* ARM erratum ID #751472 */
28   - orr r10, r10, #1 << 11 /* set bit #11 */
29   - mcr p15, 0, r10, c15, c0, 1 /* write diagnostic register */
30   -.endm
31   -
32   -ENTRY(lowlevel_init)
33   - init_arm_errata
34   - mov pc, lr
35   -ENDPROC(lowlevel_init)
arch/arm/cpu/armv7/mx6/soc.c
... ... @@ -205,4 +205,8 @@
205 205 {"esdhc4", MAKE_CFGVAL(0x40, 0x38, 0x00, 0x00)},
206 206 {NULL, 0},
207 207 };
  208 +
  209 +void s_init(void)
  210 +{
  211 +}
include/configs/mx6_common.h
  1 +/*
  2 + * Copyright (c) 2013, NVIDIA CORPORATION. All rights reserved.
  3 + *
  4 + * This program is free software; you can redistribute it and/or modify it
  5 + * under the terms and conditions of the GNU General Public License,
  6 + * version 2, as published by the Free Software Foundation.
  7 + *
  8 + * This program is distributed in the hope it will be useful, but WITHOUT
  9 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  10 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  11 + * more details.
  12 + *
  13 + * You should have received a copy of the GNU General Public License
  14 + * along with this program. If not, see <http://www.gnu.org/licenses/>.
  15 + */
  16 +
  17 +#ifndef __MX6_COMMON_H
  18 +#define __MX6_COMMON_H
  19 +
  20 +#define CONFIG_ARM_ERRATA_743622
  21 +#define CONFIG_ARM_ERRATA_751472
  22 +
  23 +#endif
include/configs/mx6qarm2.h
... ... @@ -24,6 +24,9 @@
24 24  
25 25 #define CONFIG_MX6
26 26 #define CONFIG_MX6Q
  27 +
  28 +#include "mx6_common.h"
  29 +
27 30 #define CONFIG_DISPLAY_CPUINFO
28 31 #define CONFIG_DISPLAY_BOARDINFO
29 32  
include/configs/mx6qsabre_common.h
... ... @@ -19,6 +19,9 @@
19 19  
20 20 #define CONFIG_MX6
21 21 #define CONFIG_MX6Q
  22 +
  23 +#include "mx6_common.h"
  24 +
22 25 #define CONFIG_DISPLAY_CPUINFO
23 26 #define CONFIG_DISPLAY_BOARDINFO
24 27  
include/configs/mx6qsabrelite.h
... ... @@ -24,6 +24,9 @@
24 24  
25 25 #define CONFIG_MX6
26 26 #define CONFIG_MX6Q
  27 +
  28 +#include "mx6_common.h"
  29 +
27 30 #define CONFIG_DISPLAY_CPUINFO
28 31 #define CONFIG_DISPLAY_BOARDINFO
29 32