ARM: OMAP3: Add assembly startup and sys_info common files
PATCH 4/11 ARM: OMAP3: Add assembly startup and sys_info common files
Subject: [PATCH 04/11 v1] ARM: OMAP3: Add assembly startup and sys_info common files
From: Dirk Behme <[email protected]>
Add assembly startup and sys_info common files
--- cpu/omap3/Makefile | 44 +++ cpu/omap3/config.mk | 36 +++ cpu/omap3/lowlevel_init.S | 360 +++++++++++++++++++++++++++++++ cpu/omap3/start.S | 522 ++++++++++++++++++++++++++++++++++++++++++++++ cpu/omap3/sys_info.c | 314 +++++++++++++++++++++++++++ 5 files changed, 1276 insertions(+)
cpu/omap3/Makefile new file +44 -0
@@ -0,0 +1,44 @@ +# +# (C) Copyright 2000-2003 +# Wolfgang Denk, DENX Software Engineering, wd 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 +# + +include $(TOPDIR)/config.mk + +LIB = lib$(CPU).a + +START := start.o +SOBJS := lowlevel_init.o +OBJS := sys_info.o + +all: .depend $(START) $(LIB) + +$(LIB): $(OBJS) $(SOBJS) + $(AR) crv $@ $(OBJS) $(SOBJS) + +######################################################################### + +.depend: Makefile $(START:.o=.S) $(OBJS:.o=.c) $(SOBJS:.o=.S) + $(CC) -M $(CFLAGS) $(START:.o=.S) $(OBJS:.o=.c) $(SOBJS:.o=.S) > $@ + +sinclude .depend + +#########################################################################
cpu/omap3/config.mk new file +36 -0
@@ -0,0 +1,36 @@ +# +# (C) Copyright 2002 +# Gary Jennejohn, DENX Software Engineering, <[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 += -fno-strict-aliasing -fno-common -ffixed-r8 \ + -msoft-float + +# Make ARMv5 to allow more compilers to work, even though its v7a. +PLATFORM_CPPFLAGS += -march=armv5 +# ========================================================================= +# +# Supply options according to compiler version +# +# ========================================================================= +PLATFORM_CPPFLAGS +=$(call cc-option) +PLATFORM_CPPFLAGS +=$(call cc-option,-mno-thumb-interwork,) +PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,\ + $(call cc-option,-malignment-traps,))
cpu/omap3/start.S new file +522 -0
522 lines not on this page · raw message
cpu/omap3/lowlevel_init.S new file +360 -0
360 lines not on this page · raw message
cpu/omap3/sys_info.c new file +314 -0
314 lines not on this page · raw message
PATCH 4/11 ARM: OMAP3: Add assembly startup and sys_info common files
Hi
2008/9/14 <[email protected]>:
Quoted 4 lines
From: Dirk Behme <[email protected]>
Add assembly startup and
sys_infocommon files
Quoted 8 lines
Signed-off-by Dirk Behme <[email protected]>--- cpu/omap3/Makefile | 44 +++ cpu/omap3/config.mk | 36 +++ cpu/omap3/lowlevel_init.S | 360 +++++++++++++++++++++++++++++++ cpu/omap3/start.S | 522 ++++++++++++++++++++++++++++++++++++++++++++++ cpu/omap3/sys_info.c | 314 +++++++++++++++++++++++++++
Is omap3 is a cpu? Isn't OMAP3 a SoC-family containing ARM Cortex-A8 CPUs and the directory therefore should be something like cpu/arm_cortexa8/omap3 or cpu/cortexa8/omap3?
Regards, Magnus
PATCH 4/11 ARM: OMAP3: Add assembly startup and sys_info common files
Quoted 18 lines · Magnus Lilja
Hi
2008/9/14 <[email protected]>:
Quoted 4 lines
From: Dirk Behme <[email protected]>
Add assembly startup and
sys_infocommon filesQuoted 8 lines
Signed-off-by Dirk Behme <[email protected]>---
cpu/omap3/Makefile | 44 +++ cpu/omap3/config.mk | 36 +++ cpu/omap3/lowlevel_init.S | 360 +++++++++++++++++++++++++++++++ cpu/omap3/start.S | 522 ++++++++++++++++++++++++++++++++++++++++++++++ cpu/omap3/sys_info.c | 314 +++++++++++++++++++++++++++
Quoted 3 lines
Is omap3 is a cpu? Isn't OMAP3 a SoC-family containing ARM Cortex-A8 CPUs and the directory therefore should be something like cpu/arm_cortexa8/omap3 or cpu/cortexa8/omap3?
Yes, from strict technical point of view you are correct. Cortex A8 is the 'CPU' and OMAP3 is the SoC.
But what do we win adding an additional directory layer cpu/arm_cortexa8/omap3? Let's assume we will see an additional Cortex-A8 core xxx in the future. Then we would have
a)
cpu/omap3/
cpu/xxx/
*or*
b)
cpu/arm_cortexa8/omap3
cpu/arm_cortexa8/xxx
What's better?
Anyway, I will do what is wanted here :)
If U-Boot maintainers want cpu/arm_cortexa8/xxx, I wonder if we could do this using git to move the files once the patches are applied? It seems easier to move the files to an other directory using git instead of flooding this list with new patches just to change directories. Any proposals?
Thanks
Dirk
PATCH 4/11 ARM: OMAP3: Add assembly startup and sys_info common files
Dear Dirk Behme,
Quoted 4 lines · In message <[email protected]> you wrote:
Yes, from strict technical point of view you are correct. Cortex A8 is the 'CPU' and OMAP3 is the SoC.
Quoted 8 lines
But what do we win adding an additional directory layer cpu/arm_cortexa8/omap3? Let's assume we will see an additional Cortex-A8 core xxx in the future. Then we would have
a)
cpu/omap3/
cpu/xxx/
... which probably means code duplication.
Quoted 8 lines
*or*
b)
cpu/arm_cortexa8/omap3
cpu/arm_cortexa8/xxxWhat's better?
Instead, we might probably have just a "cpu/arm_cortexa8/" with common code for "omap3" and "xxx" ?
Quoted 2 lines
If U-Boot maintainers want cpu/arm_cortexa8/xxx, I wonder if we could do this using git to move the files once the patches are applied? It
I think we shoud try and start without the xxx part.
Best regards,
Wolfgang Denk
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-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de The human race is a race of cowards; and I am not only marching in that procession but carrying a banner. - Mark Twain
PATCH 4/11 ARM: OMAP3: Add assembly startup and sys_info common files
Dear Wolfgang,
Quoted 1 line · Wolfgang Denk
Dear Dirk Behme,
Just Dirk ;)
Quoted 22 lines
Quoted 11 lines · In message <[email protected]> you wrote:
Yes, from strict technical point of view you are correct. Cortex A8 is the 'CPU' and OMAP3 is the SoC.
But what do we win adding an additional directory layer cpu/arm_cortexa8/omap3? Let's assume we will see an additional Cortex-A8 core xxx in the future. Then we would have
a)
cpu/omap3/
cpu/xxx/... which probably means code duplication.
Quoted 4 lines
*or*
b)
Quoted 8 lines
Quoted 4 lines
cpu/arm_cortexa8/omap3
cpu/arm_cortexa8/xxxWhat's better?
Instead, we might probably have just a "cpu/arm_cortexa8/" with common code for "omap3" and "xxx" ?
Hmm, sorry, I'm not sure I completely understood.
Do you want to say that you want a directory "cpu/arm_cortexa8/" where the common files for Corex-A8 CPUs are located and then a directory "cpu/arm_cortexa8/omap3" where the OMAP3 common stuff is stored?
If this is correct, from theory I completely agree. *But*: From practical point of view regarding the patch we are talking about here, we just don't know what Corex-A8 CPU common code might be. As I know there is no "xxx" (with xxx != OMAP3) yet, so it's hard to know what will be common. So we moved all OMAP3 common code for all three buards we currently support to omap3 directory.
So for the time being, I propose to create /cpu/arm_cortexa8/omap3 with all files in this directory and no files in /cpu/arm_cortexa8 yet. This can change later, files from omap3/ can move to /cpu/arm_cortexa8/ when we get more Cortex-A8 SoCs/chips and get an idea what might be common.
Quoted 4 lines
Quoted 2 lines
If U-Boot maintainers want cpu/arm_cortexa8/xxx, I wonder if we could do this using git to move the files once the patches are applied? It
I think we shoud try and start without the xxx part.
Yes, as "xxx" doesn't exist yet ;)
But my question here was if we can do directory moves/renames in git after/while patch is applied or if new patches with directory changes are needed on mailing list? Directory move/rename is easy in git, while doing this with patches to mailing list may result in unnecessary traffic.
Thanks
Dirk
PATCH 4/11 ARM: OMAP3: Add assembly startup and sys_info common files
Dear Dirk,
Quoted 5 lines · In message <[email protected]> you wrote:
Quoted 1 line · Wolfgang Denk
Dear Dirk Behme,
Just Dirk ;)
Sorry, my MUA is not that clever (yet). And in many cases I don't have time enough to manually edit this. [If you have a clever replcomps setup (i. e. more clever than "Dear %(friendly {from}),") that would be definitely welcome.]
Quoted 8 lines
Quoted 2 lines
Instead, we might probably have just a "cpu/arm_cortexa8/" with common code for "omap3" and "xxx" ?
Hmm, sorry, I'm not sure I completely understood.
Do you want to say that you want a directory "cpu/arm_cortexa8/" where the common files for Corex-A8 CPUs are located and then a directory "cpu/arm_cortexa8/omap3" where the OMAP3 common stuff is stored?
Yes.
Quoted 6 lines
If this is correct, from theory I completely agree. *But*: From practical point of view regarding the patch we are talking about here, we just don't know what Corex-A8 CPU common code might be. As I know there is no "xxx" (with xxx != OMAP3) yet, so it's hard to know what will be common. So we moved all OMAP3 common code for all three buards we currently support to omap3 directory.
You are a pessimist. You think everything is OMAP3 specific.
I am an optimist. I think everything is common code. At least that's the way it should be :-)
So my suggestion is to put all code into cpu/arm_cortexa8/, unless
you are not absolutely sure that some file is strictly
cpu/arm_cortexa8/omap3 only.
If this assessment later turns out to be wrong, it is much easier to split the file into SoC specific parts that to factor out the common parts from N different SoC implementations.
Quoted 5 lines
So for the time being, I propose to create /cpu/arm_cortexa8/omap3 with all files in this directory and no files in /cpu/arm_cortexa8 yet. This can change later, files from omap3/ can move to /cpu/arm_cortexa8/ when we get more Cortex-A8 SoCs/chips and get an idea what might be common.
Nope. I disagree. Thjsi way will cause much more maitnenance effort and result in lots of duplicated code.
Quoted 5 lines
But my question here was if we can do directory moves/renames in git after/while patch is applied or if new patches with directory changes are needed on mailing list? Directory move/rename is easy in git, while doing this with patches to mailing list may result in unnecessary traffic.
It makes no difference. Just make sure to tell git to create patches
that contain renames. See options like '-M' and '-C' to
git-format-patch.
Best regards,
Wolfgang Denk
Signature · 7 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de We're all sorry for the other guy when he loses his job to a machine. But when it comes to your job -- that's different. And it always will be different. -- McCoy, "The Ultimate Computer", stardate 4729.4