]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
ARM: mx6: use common CPU errata config options
authorStephen Warren <swarren@nvidia.com>
Tue, 26 Feb 2013 12:28:29 +0000 (12:28 +0000)
committerStefano Babic <sbabic@denx.de>
Thu, 7 Mar 2013 17:20:37 +0000 (18:20 +0100)
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>
arch/arm/cpu/armv7/Makefile
arch/arm/cpu/armv7/mx6/Makefile
arch/arm/cpu/armv7/mx6/lowlevel_init.S [deleted file]
arch/arm/cpu/armv7/mx6/soc.c
include/configs/mx6_common.h [new file with mode: 0644]
include/configs/mx6qarm2.h
include/configs/mx6qsabre_common.h
include/configs/mx6qsabrelite.h

index ee8c2b3fa573e2f138b2bcaa3a6823c0f9a61cc8..4668b3cf2fe1cfa64189944c1d16f71007aab3f0 100644 (file)
@@ -32,7 +32,7 @@ COBJS += cache_v7.o
 COBJS  += cpu.o
 COBJS  += syslib.o
 
-ifneq ($(CONFIG_AM33XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX)$(CONFIG_TEGRA),)
+ifneq ($(CONFIG_AM33XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX)$(CONFIG_TEGRA)$(CONFIG_MX6),)
 SOBJS  += lowlevel_init.o
 endif
 
index cbce411cca6f09df423b30ac747898e9df88fa71..4f9ca6890c87e6c2191f9e1b9928ee05dddc99f2 100644 (file)
@@ -28,7 +28,6 @@ include $(TOPDIR)/config.mk
 LIB    = $(obj)lib$(SOC).o
 
 COBJS  = soc.o clock.o
-SOBJS   = lowlevel_init.o
 
 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(SOBJS) $(COBJS))
diff --git a/arch/arm/cpu/armv7/mx6/lowlevel_init.S b/arch/arm/cpu/armv7/mx6/lowlevel_init.S
deleted file mode 100644 (file)
index 7b60ca7..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (C) 2010-2011 Freescale Semiconductor, Inc.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-.section ".text.init", "x"
-
-#include <linux/linkage.h>
-
-.macro init_arm_errata
-       /* ARM erratum ID #743622 */
-       mrc     p15, 0, r10, c15, c0, 1         /* read diagnostic register */
-       orr     r10, r10, #1 << 6               /* set bit #6 */
-       /* ARM erratum ID #751472 */
-       orr     r10, r10, #1 << 11              /* set bit #11 */
-       mcr     p15, 0, r10, c15, c0, 1         /* write diagnostic register */
-.endm
-
-ENTRY(lowlevel_init)
-       init_arm_errata
-       mov pc, lr
-ENDPROC(lowlevel_init)
index efe4136bc3b2f773cf2a28b449e9ce82d6e7a79f..193ba1240fb3e04b37e21aacf927c7ffd1900fad 100644 (file)
@@ -205,3 +205,7 @@ const struct boot_mode soc_boot_modes[] = {
        {"esdhc4",      MAKE_CFGVAL(0x40, 0x38, 0x00, 0x00)},
        {NULL,          0},
 };
+
+void s_init(void)
+{
+}
diff --git a/include/configs/mx6_common.h b/include/configs/mx6_common.h
new file mode 100644 (file)
index 0000000..b333937
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2013, NVIDIA CORPORATION.  All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __MX6_COMMON_H
+#define __MX6_COMMON_H
+
+#define CONFIG_ARM_ERRATA_743622
+#define CONFIG_ARM_ERRATA_751472
+
+#endif
index 138e4601807db08ec7231ca54c1b70c882ec678f..bd52cde56ba31ee4b800420cbe08d22de30162d2 100644 (file)
@@ -24,6 +24,9 @@
 
 #define CONFIG_MX6
 #define CONFIG_MX6Q
+
+#include "mx6_common.h"
+
 #define CONFIG_DISPLAY_CPUINFO
 #define CONFIG_DISPLAY_BOARDINFO
 
index f7e8779b40cff7b9d8f81c91f02ba06cc592c9a7..9eda9ed91a4927a5297dde5c294a949370dd65d5 100644 (file)
@@ -19,6 +19,9 @@
 
 #define CONFIG_MX6
 #define CONFIG_MX6Q
+
+#include "mx6_common.h"
+
 #define CONFIG_DISPLAY_CPUINFO
 #define CONFIG_DISPLAY_BOARDINFO
 
index c8c3ccc9265828801c33c2f2bec339d186e546a4..5dc8255cec29ea3dc6380c89b0b9734937c281c0 100644 (file)
@@ -24,6 +24,9 @@
 
 #define CONFIG_MX6
 #define CONFIG_MX6Q
+
+#include "mx6_common.h"
+
 #define CONFIG_DISPLAY_CPUINFO
 #define CONFIG_DISPLAY_BOARDINFO