Skip to contentSkip to conversation

add mcf5307 support

PATCH Superseded Angelo Dureghello 2 participants 4 messages Aug 10, 2011 m68k architecture

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 add mcf5307 support

Cpu architecture files.

#       new file:   arch/m68k/cpu/mcf530x/Makefile
#       new file:   arch/m68k/cpu/mcf530x/config.mk
#       new file:   arch/m68k/cpu/mcf530x/cpu.c
#       new file:   arch/m68k/cpu/mcf530x/cpu.h
#       new file:   arch/m68k/cpu/mcf530x/cpu_init.c
#       new file:   arch/m68k/cpu/mcf530x/interrupts.c
#       new file:   arch/m68k/cpu/mcf530x/speed.c
#       new file:   arch/m68k/cpu/mcf530x/start.S

---

arch/m68k/cpu/mcf530x/Makefile new file +48 -0
new file mode 100644
index 0000000..3c5a1c2
@@ -0,0 +1,48 @@
+#
+# Copyright (c) 2011 Angelo Dureghello <[email protected]>
+#
+# 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
+
+# CFLAGS += -DET_DEBUG
+
+LIB	= $(obj)lib$(CPU).o
+
+START	= start.o
+COBJS	= interrupts.o cpu.o speed.o cpu_init.o
+
+SRCS	:= $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS	:= $(addprefix $(obj),$(SOBJS) $(COBJS))
+START	:= $(addprefix $(obj),$(START))
+
+all:	$(obj).depend $(START) $(LIB)
+
+$(LIB):	$(OBJS)
+	$(call cmd_link_o_target, $(OBJS))
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
arch/m68k/cpu/mcf530x/config.mk new file +25 -0
new file mode 100644
index 0000000..2ba1644
@@ -0,0 +1,25 @@
+#
+# Copyright (c) 2011 Angelo Dureghello <[email protected]>
+#
+# 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
+#
+
+PLATFORM_RELFLAGS += -ffixed-d7 -msep-data
+
+PLATFORM_CPPFLAGS += -m5307 -fPIC
arch/m68k/cpu/mcf530x/cpu.c new file +48 -0

48 lines not on this page · raw message

arch/m68k/cpu/mcf530x/cpu.h new file +33 -0
new file mode 100644
index 0000000..c1227eb
@@ -0,0 +1,33 @@
+/*
+ *  cpu.h
+ *
+ *  Copyright (c) 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., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#ifndef _CPU_H_
+#define _CPU_H_
+
+#include <command.h>
+
+/* Use this to create board specific reset functions */
+void board_reset(void) __attribute__((__weak__));
+
+#endif /* _CPU_H_ */
arch/m68k/cpu/mcf530x/cpu_init.c new file +164 -0

164 lines not on this page · raw message

arch/m68k/cpu/mcf530x/interrupts.c new file +42 -0

42 lines not on this page · raw message

arch/m68k/cpu/mcf530x/speed.c new file +36 -0
new file mode 100644
index 0000000..426bd9e
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2011 Angelo Dureghello <[email protected]>
+ *
+ * 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 <common.h>
+#include <asm/processor.h>
+#include <asm/immap.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+/* get_clocks() fills in gd->cpu_clock and gd->bus_clk */
+int get_clocks (void)
+{
+	gd->cpu_clk = CONFIG_SYS_CLK;
+	gd->bus_clk = gd->cpu_clk / 2;
+
+	return (0);
+}
arch/m68k/cpu/mcf530x/start.S new file +253 -0

253 lines not on this page · raw message

#1 lore raw

PATCH 1/3 add mcf5307 support

Hi Angelo,

Quoted 11 lines

Cpu architecture files.

#       new file:   arch/m68k/cpu/mcf530x/Makefile
#       new file:   arch/m68k/cpu/mcf530x/config.mk
#       new file:   arch/m68k/cpu/mcf530x/cpu.c
#       new file:   arch/m68k/cpu/mcf530x/cpu.h
#       new file:   arch/m68k/cpu/mcf530x/cpu_init.c
#       new file:   arch/m68k/cpu/mcf530x/interrupts.c
#       new file:   arch/m68k/cpu/mcf530x/speed.c
#       new file:   arch/m68k/cpu/mcf530x/start.S
Quoted 1 line

Which files are added is a detail already contained in the patch itself, it does not need to be included additionally.

To find out how other people handle commits, simply use "git log" in the u-boot directory and give some consideration to its output.

Cheers
Detlev

Signature · 9 lines
Helena ist verh?ltnism??ig leicht zu besetzen.  Eine Frau, zarteste Jugend
mit sinnlicher Reife verbindend;  ?u?erst intelligent,  indes von durchaus
weiblicher Denkart; phlegmatisch, aber sensibel; un?bertrefflich sch?n und
dabei von sehr pers?nlichem Charme - mehr wird da nicht verlangt.
                                               -- Peter Hacks
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
#2 lore raw

PATCH 1/3 add mcf5307 support

Hi Detlev,

i don't have big experience with git, generally i use cvs/svn.

I am posting changes/additions i have here in my local tree, since i am not an u-boot developer i don't think i am allowed to commit anything in the server repository.

so "git format-patch -n --cover-letter" don't give any output.

Quoted 24 lines · Detlev Zundel

Hi Angelo,

Quoted 11 lines

Cpu architecture files.

#       new file:   arch/m68k/cpu/mcf530x/Makefile
#       new file:   arch/m68k/cpu/mcf530x/config.mk
#       new file:   arch/m68k/cpu/mcf530x/cpu.c
#       new file:   arch/m68k/cpu/mcf530x/cpu.h
#       new file:   arch/m68k/cpu/mcf530x/cpu_init.c
#       new file:   arch/m68k/cpu/mcf530x/interrupts.c
#       new file:   arch/m68k/cpu/mcf530x/speed.c
#       new file:   arch/m68k/cpu/mcf530x/start.S
Quoted 1 line

Which files are added is a detail already contained in the patch itself, it does not need to be included additionally.

To find out how other people handle commits, simply use "git log" in the u-boot directory and give some consideration to its output.

Cheers
Detlev

#3 lore raw

PATCH 1/3 add mcf5307 support

Hi Angelo,

Quoted 1 line

i don't have big experience with git, generally i use cvs/svn.

No problem, we all have to learn new things.

Quoted 3 lines

I am posting changes/additions i have here in my local tree, since i am not an u-boot developer i don't think i am allowed to commit anything in the server repository.

git is a distributed version control. The idea is that everybody carries a local copy of the revision history and commits changes to this local repository. Once ready, the changes are sent upstream and git even helps noticing changes that were introduced upstream which originated locally.

Quoted 1 line

so "git format-patch -n --cover-letter" don't give any output.

Commit the changes that you have locally with "git commit" and use "git format-patch -n --cover-letter <last-mainline-commit>" where <last-mainline-commit>" designates one of the possible ways to name a git commit, i.e. either a hash or a symbolic notation like HEAD~3. "man gitworkflows" may be a nice thing to read at this stage.

Cheers
Detlev

Signature · 8 lines
WARNING: The external boundaries of India as depicted in map(s) are neither
correct nor authentic.  Other external boundaries as depicted in the map(s)
may neither be correct nor authentic.
                                                 -- Garmin MapSource manual
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de