Skip to contentSkip to conversation

MX51: Add initial support for the Freescale MX51

PATCH New Stefano Babic 2 participants 5 messages Jan 20, 2010 – Mar 5, 2010 Arm/actions semi architecture

lore
Share & tools
lore
#0 lore raw

PATCH v3 2/11 MX51: Add initial support for the Freescale MX51

The patch add initial support for the Freescale i.MX51 processor (family arm cortex_a8).

---
 cpu/arm_cortexa8/mx51/Makefile        |   48 ++++++
 cpu/arm_cortexa8/mx51/clock.c         |  293 +++++++++++++++++++++++++++++++++
 cpu/arm_cortexa8/mx51/iomux.c         |  165 ++++++++++++++++++
 cpu/arm_cortexa8/mx51/lowlevel_init.S |  289 ++++++++++++++++++++++++++++++++
 cpu/arm_cortexa8/mx51/soc.c           |  109 ++++++++++++
 cpu/arm_cortexa8/mx51/timer.c         |  119 +++++++++++++
 cpu/arm_cortexa8/mx51/u-boot.lds      |   61 +++++++
 include/asm-arm/arch-mx51/clock.h     |   31 ++++
 8 files changed, 1115 insertions(+), 0 deletions(-)
 create mode 100644 cpu/arm_cortexa8/mx51/Makefile
 create mode 100644 cpu/arm_cortexa8/mx51/clock.c
 create mode 100644 cpu/arm_cortexa8/mx51/iomux.c
 create mode 100644 cpu/arm_cortexa8/mx51/lowlevel_init.S
 create mode 100644 cpu/arm_cortexa8/mx51/soc.c
 create mode 100644 cpu/arm_cortexa8/mx51/timer.c
 create mode 100644 cpu/arm_cortexa8/mx51/u-boot.lds
 create mode 100644 include/asm-arm/arch-mx51/clock.h
cpu/arm_cortexa8/mx51/Makefile new file +48 -0
new file mode 100644
index 0000000..4d82293
@@ -0,0 +1,48 @@
+#
+# (C) Copyright 2000-2006
+# Wolfgang Denk, DENX Software Engineering, wd at denx.de.
+#
+# (C) Copyright 2009 Freescale Semiconductor, Inc.
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# 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
+#
+
+include $(TOPDIR)/config.mk
+
+LIB	= $(obj)lib$(SOC).a
+
+COBJS	= soc.o clock.o iomux.o timer.o
+SOBJS = lowlevel_init.o
+
+SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS	:= $(addprefix $(obj),$(SOBJS) $(COBJS))
+
+all:	$(obj).depend $(LIB)
+
+$(LIB):	$(OBJS)
+	$(AR) $(ARFLAGS) $@ $(OBJS)
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
cpu/arm_cortexa8/mx51/clock.c new file +293 -0

293 lines not on this page · raw message

cpu/arm_cortexa8/mx51/iomux.c new file +165 -0

165 lines not on this page · raw message

cpu/arm_cortexa8/mx51/lowlevel_init.S new file +289 -0

289 lines not on this page · raw message

cpu/arm_cortexa8/mx51/soc.c new file +109 -0

109 lines not on this page · raw message

cpu/arm_cortexa8/mx51/timer.c new file +119 -0

119 lines not on this page · raw message

cpu/arm_cortexa8/mx51/u-boot.lds new file +61 -0

61 lines not on this page · raw message

include/asm-arm/arch-mx51/clock.h new file +31 -0
new file mode 100644
index 0000000..449a191
@@ -0,0 +1,31 @@
+/*
+ * (C) Copyright 2009
+ * Stefano Babic, DENX Software Engineering, sbabic at denx.de.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * 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
+ */
+
+#ifndef __ASM_ARCH_CLOCK_H
+#define __ASM_ARCH_CLOCK_H
+unsigned int imx_decode_pll(unsigned int pll, unsigned int f_ref);
+
+ulong imx_get_uartclk(void);
+ulong imx_get_fecclk(void);
+
+#endif /* __ASM_ARCH_CLOCK_H */
Signature · 1 line
1.6.3.3
#1 lore raw

PATCH v5 2/11 MX51: Add initial support for the Freescale MX51

The patch add initial support for the Freescale i.MX51 processor (family arm cortex_a8).

---
Changes since last version:

Removed warnings during compilation due to missing prototypes. Added missed prototype in sys_proto.h (as already done for other architectures - omap3).

 cpu/arm_cortexa8/mx51/Makefile        |   48 ++++++
 cpu/arm_cortexa8/mx51/clock.c         |  294 +++++++++++++++++++++++++++++++++
 cpu/arm_cortexa8/mx51/iomux.c         |  165 ++++++++++++++++++
 cpu/arm_cortexa8/mx51/lowlevel_init.S |  289 ++++++++++++++++++++++++++++++++
 cpu/arm_cortexa8/mx51/soc.c           |  114 +++++++++++++
 cpu/arm_cortexa8/mx51/timer.c         |  119 +++++++++++++
 cpu/arm_cortexa8/mx51/u-boot.lds      |   61 +++++++
 include/asm-arm/arch-mx51/clock.h     |   43 +++++
 include/asm-arm/arch-mx51/sys_proto.h |   29 ++++
 9 files changed, 1162 insertions(+), 0 deletions(-)
 create mode 100644 cpu/arm_cortexa8/mx51/Makefile
 create mode 100644 cpu/arm_cortexa8/mx51/clock.c
 create mode 100644 cpu/arm_cortexa8/mx51/iomux.c
 create mode 100644 cpu/arm_cortexa8/mx51/lowlevel_init.S
 create mode 100644 cpu/arm_cortexa8/mx51/soc.c
 create mode 100644 cpu/arm_cortexa8/mx51/timer.c
 create mode 100644 cpu/arm_cortexa8/mx51/u-boot.lds
 create mode 100644 include/asm-arm/arch-mx51/clock.h
 create mode 100644 include/asm-arm/arch-mx51/sys_proto.h
cpu/arm_cortexa8/mx51/Makefile new file +48 -0
new file mode 100644
index 0000000..4d82293
@@ -0,0 +1,48 @@
+#
+# (C) Copyright 2000-2006
+# Wolfgang Denk, DENX Software Engineering, wd at denx.de.
+#
+# (C) Copyright 2009 Freescale Semiconductor, Inc.
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# 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
+#
+
+include $(TOPDIR)/config.mk
+
+LIB	= $(obj)lib$(SOC).a
+
+COBJS	= soc.o clock.o iomux.o timer.o
+SOBJS = lowlevel_init.o
+
+SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS	:= $(addprefix $(obj),$(SOBJS) $(COBJS))
+
+all:	$(obj).depend $(LIB)
+
+$(LIB):	$(OBJS)
+	$(AR) $(ARFLAGS) $@ $(OBJS)
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
cpu/arm_cortexa8/mx51/clock.c new file +294 -0

294 lines not on this page · raw message

cpu/arm_cortexa8/mx51/iomux.c new file +165 -0

165 lines not on this page · raw message

cpu/arm_cortexa8/mx51/lowlevel_init.S new file +289 -0

289 lines not on this page · raw message

cpu/arm_cortexa8/mx51/soc.c new file +114 -0

114 lines not on this page · raw message

cpu/arm_cortexa8/mx51/timer.c new file +119 -0

119 lines not on this page · raw message

cpu/arm_cortexa8/mx51/u-boot.lds new file +61 -0

61 lines not on this page · raw message

include/asm-arm/arch-mx51/clock.h new file +43 -0

43 lines not on this page · raw message

include/asm-arm/arch-mx51/sys_proto.h new file +29 -0
new file mode 100644
index 0000000..598c54d
@@ -0,0 +1,29 @@
+/*
+ * (C) Copyright 2009
+ * Stefano Babic, DENX Software Engineering, sbabic at denx.de.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * 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
+ */
+
+#ifndef _SYS_PROTO_H_
+#define _SYS_PROTO_H_
+
+u32 get_cpu_rev(void);
+
+#endif
Signature · 1 line
1.6.3.3
#2 lore raw

PATCH v5 2/11 MX51: Add initial support for theFreescale MX51

Quoted 50 lines

-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Stefano Babic
Sent: 2010?3?5? 3:19
To: u-boot at lists.denx.de
Subject: [U-Boot] [PATCH V5 02/11] MX51: Add initial support for theFreescale MX51

The patch add initial support for the Freescale i.MX51 processor (family arm cortex_a8).

---
Changes since last version:

Removed warnings during compilation due to missing prototypes. Added missed prototype in sys_proto.h (as already done for other architectures - omap3).

 cpu/arm_cortexa8/mx51/Makefile        |   48 ++++++
 cpu/arm_cortexa8/mx51/clock.c         |  294 
+++++++++++++++++++++++++++++++++
 cpu/arm_cortexa8/mx51/iomux.c         |  165 ++++++++++++++++++
 cpu/arm_cortexa8/mx51/lowlevel_init.S |  289 
++++++++++++++++++++++++++++++++
 cpu/arm_cortexa8/mx51/soc.c           |  114 +++++++++++++
 cpu/arm_cortexa8/mx51/timer.c         |  119 +++++++++++++
 cpu/arm_cortexa8/mx51/u-boot.lds      |   61 +++++++
 include/asm-arm/arch-mx51/clock.h     |   43 +++++
 include/asm-arm/arch-mx51/sys_proto.h |   29 ++++
 9 files changed, 1162 insertions(+), 0 deletions(-)  create 

mode 100644 cpu/arm_cortexa8/mx51/Makefile create mode 100644 cpu/arm_cortexa8/mx51/clock.c create mode 100644 cpu/arm_cortexa8/mx51/iomux.c create mode 100644 cpu/arm_cortexa8/mx51/lowlevel_init.S

 create mode 100644 cpu/arm_cortexa8/mx51/soc.c  create mode 

100644 cpu/arm_cortexa8/mx51/timer.c create mode 100644 cpu/arm_cortexa8/mx51/u-boot.lds create mode 100644 include/asm-arm/arch-mx51/clock.h create mode 100644 include/asm-arm/arch-mx51/sys_proto.h

cpu/arm_cortexa8/mx51/lowlevel_init.S new file +0 -0
new file mode 100644
index 0000000..680a90e

cpu/arm_cortexa8/mx51/lowlevel_init.S line 280

Quoted 6 lines
cpu/arm_cortexa8/mx51/lowlevel_init.S new file +5 -0
 
+
+	init_clock
+
+	/* return from mxc_nand_load */
+	/* r12 saved upper lr*/

Remove the comments "/* return from mxc_nand_load */" since it does not support external NAND boot.

Quoted 9 lines
cpu/arm_cortexa8/mx51/lowlevel_init.S new file +2 -0
+	mov pc,lr
+

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#3 lore raw

PATCH v5 2/11 MX51: Add initial support for theFreescale MX51

Quoted 3 lines · Liu Hui-R64343 wrote:

cpu/arm_cortexa8/mx51/lowlevel_init.S line 280

Quoted 2 lines
cpu/arm_cortexa8/mx51/lowlevel_init.S new file +2 -0
+	/* return from mxc_nand_load */
+	/* r12 saved upper lr*/

Remove the comments "/* return from mxc_nand_load */" since it does not support external NAND boot.

Dropped, thanks.

Regards,
Stefano

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================
#4 lore raw

PATCH v6 2/11 MX51: Add initial support for the Freescale MX51

In reply to Stefano Babic

The patch add initial support for the Freescale i.MX51 processor (family arm cortex_a8).

---

Changes since last version:

Comments by Liu Hui:
Removed comment on NAND (not yet supported) from lowlevel_init.S

Moved is_soc_rev() to soc specific code from board code.

 cpu/arm_cortexa8/mx51/Makefile        |   48 ++++++
 cpu/arm_cortexa8/mx51/clock.c         |  294 +++++++++++++++++++++++++++++++++
 cpu/arm_cortexa8/mx51/iomux.c         |  166 +++++++++++++++++++
 cpu/arm_cortexa8/mx51/lowlevel_init.S |  288 ++++++++++++++++++++++++++++++++
 cpu/arm_cortexa8/mx51/soc.c           |  114 +++++++++++++
 cpu/arm_cortexa8/mx51/timer.c         |  119 +++++++++++++
 cpu/arm_cortexa8/mx51/u-boot.lds      |   61 +++++++
 include/asm-arm/arch-mx51/clock.h     |   43 +++++
 include/asm-arm/arch-mx51/sys_proto.h |   30 ++++
 9 files changed, 1163 insertions(+), 0 deletions(-)
 create mode 100644 cpu/arm_cortexa8/mx51/Makefile
 create mode 100644 cpu/arm_cortexa8/mx51/clock.c
 create mode 100644 cpu/arm_cortexa8/mx51/iomux.c
 create mode 100644 cpu/arm_cortexa8/mx51/lowlevel_init.S
 create mode 100644 cpu/arm_cortexa8/mx51/soc.c
 create mode 100644 cpu/arm_cortexa8/mx51/timer.c
 create mode 100644 cpu/arm_cortexa8/mx51/u-boot.lds
 create mode 100644 include/asm-arm/arch-mx51/clock.h
 create mode 100644 include/asm-arm/arch-mx51/sys_proto.h
cpu/arm_cortexa8/mx51/Makefile new file +48 -0
new file mode 100644
index 0000000..4d82293
@@ -0,0 +1,48 @@
+#
+# (C) Copyright 2000-2006
+# Wolfgang Denk, DENX Software Engineering, wd at denx.de.
+#
+# (C) Copyright 2009 Freescale Semiconductor, Inc.
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# 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
+#
+
+include $(TOPDIR)/config.mk
+
+LIB	= $(obj)lib$(SOC).a
+
+COBJS	= soc.o clock.o iomux.o timer.o
+SOBJS = lowlevel_init.o
+
+SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS	:= $(addprefix $(obj),$(SOBJS) $(COBJS))
+
+all:	$(obj).depend $(LIB)
+
+$(LIB):	$(OBJS)
+	$(AR) $(ARFLAGS) $@ $(OBJS)
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
cpu/arm_cortexa8/mx51/clock.c new file +294 -0

294 lines not on this page · raw message

cpu/arm_cortexa8/mx51/iomux.c new file +166 -0

166 lines not on this page · raw message

cpu/arm_cortexa8/mx51/lowlevel_init.S new file +288 -0

288 lines not on this page · raw message

cpu/arm_cortexa8/mx51/soc.c new file +114 -0

114 lines not on this page · raw message

cpu/arm_cortexa8/mx51/timer.c new file +119 -0

119 lines not on this page · raw message

cpu/arm_cortexa8/mx51/u-boot.lds new file +61 -0

61 lines not on this page · raw message

include/asm-arm/arch-mx51/clock.h new file +43 -0

43 lines not on this page · raw message

include/asm-arm/arch-mx51/sys_proto.h new file +30 -0
new file mode 100644
index 0000000..bf500a8
@@ -0,0 +1,30 @@
+/*
+ * (C) Copyright 2009
+ * Stefano Babic, DENX Software Engineering, sbabic at denx.de.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * 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
+ */
+
+#ifndef _SYS_PROTO_H_
+#define _SYS_PROTO_H_
+
+u32 get_cpu_rev(void);
+#define is_soc_rev(rev)	((get_cpu_rev() & 0xFF) - rev)
+
+#endif
Signature · 1 line
1.6.3.3