Mips: Refactoring of CPU and SoC code
cover Mips: Refactoring of CPU and SoC code
All current Mips CPUs and SoCs are based on Mips32 arch. The complete code resides in the global arch/mips/cpu directory. All SoC specific code resides in this directory too. This is not suitable if other Mips architectures like Mips64 or Octeon or new SoCs should be supported in the future.
This patch series refactors the Mips CPU directory and put all current code into an own mips32 subdirectory. Furthermore the SoC specific code of IncaIP, Purple and Au1x00 is moved to separate SoC subdirectories.
Daniel Schwierzeck (6):
Mips: Move content of arch/mips/cpu to arch/mips/cpu/mips32
Mips: Purple: Adapt u-boot.lds to changed CPU directory layout
Mips: IncaIP: Move all IncaIP specific code to separate subdirectory
Mips: Purple: Move all Purple specific code to separate subdirectory
Mips: Au1x00: Move all Au1x00 specific code to separate subdirectory
Mips: Update setting of endianess and CPU optimization flags
arch/mips/cpu/config.mk | 39 ---------------
arch/mips/cpu/{ => mips32}/Makefile | 5 --
arch/mips/cpu/mips32/au1x00/Makefile | 45 +++++++++++++++++
arch/mips/cpu/{ => mips32/au1x00}/au1x00_eth.c | 0
arch/mips/cpu/{ => mips32/au1x00}/au1x00_serial.c | 0
.../mips/cpu/{ => mips32/au1x00}/au1x00_usb_ohci.c | 0
.../mips/cpu/{ => mips32/au1x00}/au1x00_usb_ohci.h | 0
arch/mips/cpu/mips32/au1x00/config.mk | 24 +++++++++
arch/mips/cpu/{ => mips32}/cache.S | 0
arch/mips/cpu/mips32/config.mk | 32 ++++++++++++
arch/mips/cpu/{ => mips32}/cpu.c | 0
arch/mips/cpu/mips32/incaip/Makefile | 46 +++++++++++++++++
arch/mips/cpu/{ => mips32/incaip}/asc_serial.c | 0
arch/mips/cpu/{ => mips32/incaip}/asc_serial.h | 0
arch/mips/cpu/mips32/incaip/config.mk | 24 +++++++++
arch/mips/cpu/{ => mips32/incaip}/incaip_clock.c | 0
arch/mips/cpu/{ => mips32/incaip}/incaip_wdt.S | 0
arch/mips/cpu/{ => mips32}/interrupts.c | 0
arch/mips/cpu/mips32/purple/Makefile | 45 +++++++++++++++++
arch/mips/cpu/{ => mips32/purple}/asc_serial.c | 0
arch/mips/cpu/{ => mips32/purple}/asc_serial.h | 0
arch/mips/cpu/mips32/purple/config.mk | 24 +++++++++
arch/mips/cpu/{ => mips32}/start.S | 0
board/purple/u-boot.lds | 2 +-
boards.cfg | 52 ++++++++++----------
25 files changed, 267 insertions(+), 71 deletions(-)
delete mode 100644 arch/mips/cpu/config.mk
rename arch/mips/cpu/{ => mips32}/Makefile (87%)
create mode 100644 arch/mips/cpu/mips32/au1x00/Makefile
rename arch/mips/cpu/{ => mips32/au1x00}/au1x00_eth.c (100%)
rename arch/mips/cpu/{ => mips32/au1x00}/au1x00_serial.c (100%)
rename arch/mips/cpu/{ => mips32/au1x00}/au1x00_usb_ohci.c (100%)
rename arch/mips/cpu/{ => mips32/au1x00}/au1x00_usb_ohci.h (100%)
create mode 100644 arch/mips/cpu/mips32/au1x00/config.mk
rename arch/mips/cpu/{ => mips32}/cache.S (100%)
create mode 100644 arch/mips/cpu/mips32/config.mk
rename arch/mips/cpu/{ => mips32}/cpu.c (100%)
create mode 100644 arch/mips/cpu/mips32/incaip/Makefile
copy arch/mips/cpu/{ => mips32/incaip}/asc_serial.c (100%)
copy arch/mips/cpu/{ => mips32/incaip}/asc_serial.h (100%)
create mode 100644 arch/mips/cpu/mips32/incaip/config.mk
rename arch/mips/cpu/{ => mips32/incaip}/incaip_clock.c (100%)
rename arch/mips/cpu/{ => mips32/incaip}/incaip_wdt.S (100%)
rename arch/mips/cpu/{ => mips32}/interrupts.c (100%)
create mode 100644 arch/mips/cpu/mips32/purple/Makefile
rename arch/mips/cpu/{ => mips32/purple}/asc_serial.c (100%)
rename arch/mips/cpu/{ => mips32/purple}/asc_serial.h (100%)
create mode 100644 arch/mips/cpu/mips32/purple/config.mk
rename arch/mips/cpu/{ => mips32}/start.S (100%)--
1.7.4.1
RFC PATCH 1/6 Mips: Move content of arch/mips/cpu to arch/mips/cpu/mips32
All current CPUs and SoCs are based on Mips32 arch. The complete code resides in the global arch/mips/cpu directory. This is not suitable if other Mips architectures like Mips64 or Octeon should be supported in the future.
To achieve this the current CPU code is moved to its own mips32 subdirectory. All Mips32 boards have to use mips32 as config switch in board.cfg.
---
arch/mips/cpu/{ => mips32}/Makefile | 0
arch/mips/cpu/{ => mips32}/asc_serial.c | 0
arch/mips/cpu/{ => mips32}/asc_serial.h | 0
arch/mips/cpu/{ => mips32}/au1x00_eth.c | 0
arch/mips/cpu/{ => mips32}/au1x00_serial.c | 0
arch/mips/cpu/{ => mips32}/au1x00_usb_ohci.c | 0
arch/mips/cpu/{ => mips32}/au1x00_usb_ohci.h | 0
arch/mips/cpu/{ => mips32}/cache.S | 0
arch/mips/cpu/{ => mips32}/config.mk | 0
arch/mips/cpu/{ => mips32}/cpu.c | 0
arch/mips/cpu/{ => mips32}/incaip_clock.c | 0
arch/mips/cpu/{ => mips32}/incaip_wdt.S | 0
arch/mips/cpu/{ => mips32}/interrupts.c | 0
arch/mips/cpu/{ => mips32}/start.S | 0
boards.cfg | 52 +++++++++++++-------------
15 files changed, 26 insertions(+), 26 deletions(-)
rename arch/mips/cpu/{ => mips32}/Makefile (100%)
rename arch/mips/cpu/{ => mips32}/asc_serial.c (100%)
rename arch/mips/cpu/{ => mips32}/asc_serial.h (100%)
rename arch/mips/cpu/{ => mips32}/au1x00_eth.c (100%)
rename arch/mips/cpu/{ => mips32}/au1x00_serial.c (100%)
rename arch/mips/cpu/{ => mips32}/au1x00_usb_ohci.c (100%)
rename arch/mips/cpu/{ => mips32}/au1x00_usb_ohci.h (100%)
rename arch/mips/cpu/{ => mips32}/cache.S (100%)
rename arch/mips/cpu/{ => mips32}/config.mk (100%)
rename arch/mips/cpu/{ => mips32}/cpu.c (100%)
rename arch/mips/cpu/{ => mips32}/incaip_clock.c (100%)
rename arch/mips/cpu/{ => mips32}/incaip_wdt.S (100%)
rename arch/mips/cpu/{ => mips32}/interrupts.c (100%)
rename arch/mips/cpu/{ => mips32}/start.S (100%)arch/mips/cpu/mips32/Makefile renamed from arch/mips/cpu/Makefile +0 -0
arch/mips/cpu/mips32/asc_serial.c renamed from arch/mips/cpu/asc_serial.c +0 -0
arch/mips/cpu/mips32/asc_serial.h renamed from arch/mips/cpu/asc_serial.h +0 -0
arch/mips/cpu/mips32/au1x00_eth.c renamed from arch/mips/cpu/au1x00_eth.c +0 -0
arch/mips/cpu/mips32/au1x00_serial.c renamed from arch/mips/cpu/au1x00_serial.c +0 -0
arch/mips/cpu/mips32/au1x00_usb_ohci.c renamed from arch/mips/cpu/au1x00_usb_ohci.c +0 -0
arch/mips/cpu/mips32/au1x00_usb_ohci.h renamed from arch/mips/cpu/au1x00_usb_ohci.h +0 -0
arch/mips/cpu/mips32/cache.S renamed from arch/mips/cpu/cache.S +0 -0
arch/mips/cpu/mips32/config.mk renamed from arch/mips/cpu/config.mk +0 -0
arch/mips/cpu/mips32/cpu.c renamed from arch/mips/cpu/cpu.c +0 -0
arch/mips/cpu/mips32/incaip_clock.c renamed from arch/mips/cpu/incaip_clock.c +0 -0
arch/mips/cpu/mips32/incaip_wdt.S renamed from arch/mips/cpu/incaip_wdt.S +0 -0
arch/mips/cpu/mips32/interrupts.c renamed from arch/mips/cpu/interrupts.c +0 -0
arch/mips/cpu/mips32/start.S renamed from arch/mips/cpu/start.S +0 -0
boards.cfg +26 -26
58 lines not on this page · raw message
--
1.7.4.1
RFC PATCH 1/6 Mips: Move content of arch/mips/cpu to arch/mips/cpu/mips32
Quoted 1 line · daniel.schwierzeck at googlemail.com
All current CPUs and SoCs are based on Mips32 arch. The complete
Is that true? What about purple SoC? IIUC It's based on MIPS 5Kc and capable of 64-bit, which MIPS32 is 32-bit only architecture.
Quoted 3 lines
code resides in the global
arch/mips/cpudirectory. This is not suitable if other Mips architectures like Mips64 or Octeon should be supported in the future.
Just for the record.
Personally, Octeon is sort of a special case. It's based on MIPS64 architecture, and definitely a MIPS SoC, but not usual MIPS machine. As Aaron already mentioned before, we have very few files sharable with other MIPS machines even in the Linux kernel case. I think it will take long time the Octeon port gets merged to upstream, regard- less of my opinions, because they have a lot of things need to be resolved prior to Octeon itself.
Quoted 6 lines
To achieve this the current CPU code is moved to its own mips32 subdirectory. All Mips32 boards have to use mips32 as config switch in board.cfg.
Signed-off-by Daniel Schwierzeck<[email protected]>Cc Shinya Kuribayashi<[email protected]>
RFC PATCH 1/6 Mips: Move content of arch/mips/cpu to arch/mips/cpu/mips32
Hi Shinya,
Quoted 5 lines · Shinya Kuribayashi
Quoted 1 line · daniel.schwierzeck at googlemail.com
All current CPUs and SoCs are based on Mips32 arch. The complete
Is that true? What about purple SoC? IIUC It's based on MIPS 5Kc and capable of 64-bit, which MIPS32 is 32-bit only architecture.
that was an assumption. I could not find any information about Purple. This patch series is a suggestion. Maybe there are better approaches like arch/mips/cpu/{mips4k|mips5k|mips24k|...|octeon}.
Quoted 7 lines
Quoted 4 lines
code resides in the global
arch/mips/cpudirectory. This is not suitable if other Mips architectures like Mips64 or Octeon should be supported in the future.Just for the record.
Quoted 7 lines
Personally, Octeon is sort of a special case. It's based on MIPS64 architecture, and definitely a MIPS SoC, but not usual MIPS machine. As Aaron already mentioned before, we have very few files sharable with other MIPS machines even in the Linux kernel case. I think it will take long time the Octeon port gets merged to upstream, regard- less of my opinions, because they have a lot of things need to be resolved prior to Octeon itself.
My original intention was cleaning up the MIPS CPU directory as preparation to support new SoCs. I included this patch because Aaron asked for this separation some weeks ago but no one answered or commented ;) However I posted this series to get some feedback if such a change is wanted or acceptable. If so I prepare a new patch series. At least I hope the SoC separation is acceptable.
Cheers,
Daniel
RFC PATCH 1/6 Mips: Move content of arch/mips/cpu to arch/mips/cpu/mips32
Dear Daniel Schwierzeck,
Quoted 9 lines · In message <[email protected]> you wrote:
Quoted 5 lines
Quoted 2 lines
All current CPUs and SoCs are based on Mips32 arch. The complete
Is that true? What about purple SoC? IIUC It's based on MIPS 5Kc and capable of 64-bit, which MIPS32 is 32-bit only architecture.
that was an assumption. I could not find any information about Purple. This patch series is a suggestion. Maybe there are better approaches like arch/mips/cpu/{mips4k|mips5k|mips24k|...|octeon}.
Purple is (better: was) indeed a 64 bit system.
OTOH, the purple board has not been actively maintained for several years, and I'm not aware of anybody who still has access to the hardware. If it should cause trouble, it would probably most appropriate to drop the purple support.
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 No one can guarantee the actions of another. -- Spock, "Day of the Dove", stardate unknown
RFC PATCH 1/6 Mips: Move content of arch/mips/cpu to arch/mips/cpu/mips32
Hello Wolfgang,
2011/3/13 Wolfgang Denk <[email protected]>:
Quoted 13 lines
Dear Daniel Schwierzeck,
Quoted 9 lines · In message <[email protected]> you wrote:
Quoted 5 lines
Quoted 2 lines
All current CPUs and SoCs are based on Mips32 arch. The complete
Is that true? What about purple SoC? IIUC It's based on MIPS 5Kc and capable of 64-bit, which MIPS32 is 32-bit only architecture.
that was an assumption. I could not find any information about Purple. This patch series is a suggestion. Maybe there are better approaches like arch/mips/cpu/{mips4k|mips5k|mips24k|...|octeon}.
Quoted 7 lines
Purple is (better: was) indeed a 64 bit system.
OTOH, the purple board has not been actively maintained for several years, and I'm not aware of anybody who still has access to the hardware. ?If it should cause trouble, it would probably most appropriate to drop the purple support.
shall I include an additional patch that drops Purple support and do you agree to the refactoring of the CPU directory itself?
Best regards,
Daniel
RFC PATCH 1/6 Mips: Move content of arch/mips/cpu to arch/mips/cpu/mips32
Dear Daniel Schwierzeck,
Quoted 7 lines · In message <[email protected]> you…
Quoted 5 lines
OTOH, the purple board has not been actively maintained for several years, and I'm not aware of anybody who still has access to the hardware. =C2=A0If it should cause trouble, it would probably most appropriate to drop the purple support.
shall I include an additional patch that drops Purple support and do you agree
Yes, please, if it reduces the effort for you now.
Quoted 1 line
to the refactoring of the CPU directory itself?
Sorry, I didn't have much time to read it / think about it yet.
Best regards,
Wolfgang Denk
Signature · 4 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 Drawing on my fine command of language, I said nothing.
RFC PATCH 1/6 Mips: Move content of arch/mips/cpu to arch/mips/cpu/mips32
In reply to Daniel SchwierzeckSeperating the SOCs solves most of my problems with the exception of board.c, but then again, we're rather a special case there due to some of the stuff we do.
Not counting our SDK we have around 27Kloc for our platform, a large chunk of that being DDR2/3 memory initialization code. Our SDK currently weighs in at 764Kloc, most of which isn't needed by U-Boot (lots of autogenerated hardware definition files for all our chips).
-Aaron
Quoted 36 lines · Daniel Schwierzeck
Hi Shinya,
Quoted 5 lines · Shinya Kuribayashi
Quoted 1 line · daniel.schwierzeck at googlemail.com
All current CPUs and SoCs are based on Mips32 arch. The complete
Is that true? What about purple SoC? IIUC It's based on MIPS 5Kc and capable of 64-bit, which MIPS32 is 32-bit only architecture.
that was an assumption. I could not find any information about Purple. This patch series is a suggestion. Maybe there are better approaches like arch/mips/cpu/{mips4k|mips5k|mips24k|...|octeon}.
Quoted 6 lines
Quoted 3 lines
code resides in the global
arch/mips/cpudirectory. This is not suitable if other Mips architectures like Mips64 or Octeon should be supported in the future.Just for the record.
Quoted 7 lines
Personally, Octeon is sort of a special case. It's based on MIPS64 architecture, and definitely a MIPS SoC, but not usual MIPS machine. As Aaron already mentioned before, we have very few files sharable with other MIPS machines even in the Linux kernel case. I think it will take long time the Octeon port gets merged to upstream, regard- less of my opinions, because they have a lot of things need to be resolved prior to Octeon itself.
My original intention was cleaning up the MIPS CPU directory as preparation to support new SoCs. I included this patch because Aaron asked for this separation some weeks ago but no one answered or commented ;) However I posted this series to get some feedback if such a change is wanted or acceptable. If so I prepare a new patch series. At least I hope the SoC separation is acceptable.
Cheers,
Daniel
RFC PATCH 2/6 Mips: Purple: Adapt u-boot.lds to changed CPU directory layout
In reply to daniel.schwierzeck at googlemail.comThis fixes a linker error introduced by the previous commit.
--- board/purple/u-boot.lds | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
board/purple/u-boot.lds +1 -1
@@ -34,7 +34,7 @@ SECTIONS . = ALIGN(4); .text : { - arch/mips/cpu/start.o (.text) + arch/mips/cpu/mips32/start.o (.text) board/purple/lowlevel_init.o (.text) . = DEFINED(env_offset) ? env_offset : .; common/env_embedded.o (.ppcenv)
--
1.7.4.1
RFC PATCH 2/6 Mips: Purple: Adapt u-boot.lds to changed CPU directory layout
Quoted 1 line · daniel.schwierzeck at googlemail.com
This fixes a linker error introduced by the previous commit.
If so, such fix should be made along with that previous commit.
RFC PATCH 3/6 Mips: IncaIP: Move all IncaIP specific code to separate subdirectory
In reply to daniel.schwierzeck at googlemail.comIncaIP is a SoC and its specific code should reside in an own SoC subdirectory.
Shinya Kuribayashi <[email protected]>
---
arch/mips/cpu/mips32/Makefile | 2 -
arch/mips/cpu/mips32/incaip/Makefile | 46 +++
arch/mips/cpu/mips32/incaip/asc_serial.c | 368 ++++++++++++++++++++++
arch/mips/cpu/mips32/incaip/asc_serial.h | 177 +++++++++++
arch/mips/cpu/mips32/incaip/config.mk | 22 ++
arch/mips/cpu/mips32/{ => incaip}/incaip_clock.c | 0
arch/mips/cpu/mips32/{ => incaip}/incaip_wdt.S | 0
boards.cfg | 8 +-
8 files changed, 617 insertions(+), 6 deletions(-)
create mode 100644 arch/mips/cpu/mips32/incaip/Makefile
create mode 100644 arch/mips/cpu/mips32/incaip/asc_serial.c
create mode 100644 arch/mips/cpu/mips32/incaip/asc_serial.h
create mode 100644 arch/mips/cpu/mips32/incaip/config.mk
rename arch/mips/cpu/mips32/{ => incaip}/incaip_clock.c (100%)
rename arch/mips/cpu/mips32/{ => incaip}/incaip_wdt.S (100%)arch/mips/cpu/mips32/Makefile +0 -2
@@ -29,8 +29,6 @@ START = start.o SOBJS-y = cache.o COBJS-y = cpu.o interrupts.o -SOBJS-$(CONFIG_INCA_IP) += incaip_wdt.o -COBJS-$(CONFIG_INCA_IP) += asc_serial.o incaip_clock.o COBJS-$(CONFIG_PURPLE) += asc_serial.o COBJS-$(CONFIG_SOC_AU1X00) += au1x00_eth.o au1x00_serial.o au1x00_usb_ohci.o
arch/mips/cpu/mips32/incaip/Makefile new file +46 -0
46 lines not on this page · raw message
arch/mips/cpu/mips32/incaip/asc_serial.c new file +368 -0
368 lines not on this page · raw message
arch/mips/cpu/mips32/incaip/asc_serial.h new file +177 -0
177 lines not on this page · raw message
arch/mips/cpu/mips32/incaip/config.mk new file +22 -0
@@ -0,0 +1,22 @@ +# +# (C) Copyright 2011 +# Wolfgang Denk, 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 +#
arch/mips/cpu/mips32/incaip/incaip_clock.c renamed from arch/mips/cpu/mips32/incaip_clock.c +0 -0
arch/mips/cpu/mips32/incaip/incaip_wdt.S renamed from arch/mips/cpu/mips32/incaip_wdt.S +0 -0
boards.cfg +4 -4
@@ -223,10 +223,10 @@ dbau1500 mips mips32 dbau1x00 - dbau1550 mips mips32 dbau1x00 - - dbau1x00:DBAU1550 dbau1550_el mips mips32 dbau1x00 - - dbau1x00:DBAU1550 gth2 mips mips32 -incaip mips mips32 -incaip_100MHz mips mips32 incaip - - incaip:CPU_CLOCK_RATE=100000000 -incaip_133MHz mips mips32 incaip - - incaip:CPU_CLOCK_RATE=133000000 -incaip_150MHz mips mips32 incaip - - incaip:CPU_CLOCK_RATE=150000000 +incaip mips mips32 incaip - incaip +incaip_100MHz mips mips32 incaip - incaip incaip:CPU_CLOCK_RATE=100000000 +incaip_133MHz mips mips32 incaip - incaip incaip:CPU_CLOCK_RATE=133000000 +incaip_150MHz mips mips32 incaip - incaip incaip:CPU_CLOCK_RATE=150000000 pb1000 mips mips32 pb1x00 - - pb1x00:PB1000 purple mips mips32 qemu_mips mips mips32 qemu-mips - - qemu-mips
--
1.7.4.1
RFC PATCH 4/6 Mips: Purple: Move all Purple specific code to separate subdirectory
In reply to daniel.schwierzeck at googlemail.comPurple is a SoC and its specific code should reside in an own SoC subdirectory.
Shinya Kuribayashi <[email protected]>
---
arch/mips/cpu/mips32/Makefile | 1 -
arch/mips/cpu/mips32/purple/Makefile | 45 ++++++++++++++++++++++++
arch/mips/cpu/mips32/{ => purple}/asc_serial.c | 0
arch/mips/cpu/mips32/{ => purple}/asc_serial.h | 0
arch/mips/cpu/mips32/purple/config.mk | 22 +++++++++++
boards.cfg | 2 +-
6 files changed, 68 insertions(+), 2 deletions(-)
create mode 100644 arch/mips/cpu/mips32/purple/Makefile
rename arch/mips/cpu/mips32/{ => purple}/asc_serial.c (100%)
rename arch/mips/cpu/mips32/{ => purple}/asc_serial.h (100%)
create mode 100644 arch/mips/cpu/mips32/purple/config.mkarch/mips/cpu/mips32/Makefile +0 -1
@@ -29,7 +29,6 @@ START = start.o SOBJS-y = cache.o COBJS-y = cpu.o interrupts.o -COBJS-$(CONFIG_PURPLE) += asc_serial.o COBJS-$(CONFIG_SOC_AU1X00) += au1x00_eth.o au1x00_serial.o au1x00_usb_ohci.o SRCS := $(START:.o=.S) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
arch/mips/cpu/mips32/purple/Makefile new file +45 -0
45 lines not on this page · raw message
arch/mips/cpu/mips32/purple/asc_serial.c renamed from arch/mips/cpu/mips32/asc_serial.c +0 -0
arch/mips/cpu/mips32/purple/asc_serial.h renamed from arch/mips/cpu/mips32/asc_serial.h +0 -0
arch/mips/cpu/mips32/purple/config.mk new file +22 -0
@@ -0,0 +1,22 @@ +# +# (C) Copyright 2011 +# 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 +#
boards.cfg +1 -1
@@ -228,7 +228,7 @@ incaip_100MHz mips mips32 incaip - incaip_133MHz mips mips32 incaip - incaip incaip:CPU_CLOCK_RATE=133000000 incaip_150MHz mips mips32 incaip - incaip incaip:CPU_CLOCK_RATE=150000000 pb1000 mips mips32 pb1x00 - - pb1x00:PB1000 -purple mips mips32 +purple mips mips32 - - purple qemu_mips mips mips32 qemu-mips - - qemu-mips tb0229 mips mips32 vct_premium mips mips32 vct micronas - vct:VCT_PREMIUM
--
1.7.4.1
RFC PATCH 5/6 Mips: Au1x00: Move all Au1x00 specific code to separate subdirectory
In reply to daniel.schwierzeck at googlemail.comFrom: Daniel Schwierzeck <[email protected]>
Au1x00 is a SoC and its specific code should reside in an own SoC subdirectory.
Shinya Kuribayashi <[email protected]>
---
arch/mips/cpu/mips32/Makefile | 2 -
arch/mips/cpu/mips32/au1x00/Makefile | 45 ++++++++++++++++++++
arch/mips/cpu/mips32/{ => au1x00}/au1x00_eth.c | 0
arch/mips/cpu/mips32/{ => au1x00}/au1x00_serial.c | 0
.../mips/cpu/mips32/{ => au1x00}/au1x00_usb_ohci.c | 0
.../mips/cpu/mips32/{ => au1x00}/au1x00_usb_ohci.h | 0
arch/mips/cpu/mips32/au1x00/config.mk | 22 ++++++++++
boards.cfg | 14 +++---
8 files changed, 74 insertions(+), 9 deletions(-)
create mode 100644 arch/mips/cpu/mips32/au1x00/Makefile
rename arch/mips/cpu/mips32/{ => au1x00}/au1x00_eth.c (100%)
rename arch/mips/cpu/mips32/{ => au1x00}/au1x00_serial.c (100%)
rename arch/mips/cpu/mips32/{ => au1x00}/au1x00_usb_ohci.c (100%)
rename arch/mips/cpu/mips32/{ => au1x00}/au1x00_usb_ohci.h (100%)
create mode 100644 arch/mips/cpu/mips32/au1x00/config.mkarch/mips/cpu/mips32/Makefile +0 -2
@@ -29,8 +29,6 @@ START = start.o SOBJS-y = cache.o COBJS-y = cpu.o interrupts.o -COBJS-$(CONFIG_SOC_AU1X00) += au1x00_eth.o au1x00_serial.o au1x00_usb_ohci.o - SRCS := $(START:.o=.S) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) OBJS := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y)) START := $(addprefix $(obj),$(START))
arch/mips/cpu/mips32/au1x00/Makefile new file +45 -0
45 lines not on this page · raw message
arch/mips/cpu/mips32/au1x00/au1x00_eth.c renamed from arch/mips/cpu/mips32/au1x00_eth.c +0 -0
arch/mips/cpu/mips32/au1x00/au1x00_serial.c renamed from arch/mips/cpu/mips32/au1x00_serial.c +0 -0
arch/mips/cpu/mips32/au1x00/au1x00_usb_ohci.c renamed from arch/mips/cpu/mips32/au1x00_usb_ohci.c +0 -0
arch/mips/cpu/mips32/au1x00/au1x00_usb_ohci.h renamed from arch/mips/cpu/mips32/au1x00_usb_ohci.h +0 -0
arch/mips/cpu/mips32/au1x00/config.mk new file +22 -0
@@ -0,0 +1,22 @@ +# +# (C) Copyright 2011 +# 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 +#
boards.cfg +7 -7
@@ -217,17 +217,17 @@ M5282EVB m68k mcf52x2 m5282evb freesca M53017EVB m68k mcf52x2 m53017evb freescale EP2500 m68k mcf52x2 ep2500 Mercury microblaze-generic microblaze microblaze microblaze-generic xilinx -dbau1000 mips mips32 dbau1x00 - - dbau1x00:DBAU1000 -dbau1100 mips mips32 dbau1x00 - - dbau1x00:DBAU1100 -dbau1500 mips mips32 dbau1x00 - - dbau1x00:DBAU1500 -dbau1550 mips mips32 dbau1x00 - - dbau1x00:DBAU1550 -dbau1550_el mips mips32 dbau1x00 - - dbau1x00:DBAU1550 -gth2 mips mips32 +dbau1000 mips mips32 dbau1x00 - au1x00 dbau1x00:DBAU1000 +dbau1100 mips mips32 dbau1x00 - au1x00 dbau1x00:DBAU1100 +dbau1500 mips mips32 dbau1x00 - au1x00 dbau1x00:DBAU1500 +dbau1550 mips mips32 dbau1x00 - au1x00 dbau1x00:DBAU1550 +dbau1550_el mips mips32 dbau1x00 - au1x00 dbau1x00:DBAU1550 +gth2 mips mips32 - - au1x00 incaip mips mips32 incaip - incaip incaip_100MHz mips mips32 incaip - incaip incaip:CPU_CLOCK_RATE=100000000 incaip_133MHz mips mips32 incaip - incaip incaip:CPU_CLOCK_RATE=133000000 incaip_150MHz mips mips32 incaip - incaip incaip:CPU_CLOCK_RATE=150000000 -pb1000 mips mips32 pb1x00 - - pb1x00:PB1000 +pb1000 mips mips32 pb1x00 - au1x00 pb1x00:PB1000 purple mips mips32 - - purple qemu_mips mips mips32 qemu-mips - - qemu-mips tb0229 mips mips32
Signature · 1 line
1.7.4.1
RFC PATCH 6/6 Mips: Update setting of endianess and CPU optimization flags
In reply to daniel.schwierzeck at googlemail.comThe current Mips CPU config.mk code always expects a Mips 4kc core and toolchain. This is not appropiate for other toolchains and CPUs/SoCs.
Replace the current MIPSFLAGS code by cc-option macro and use -march=mips32r2 as default optimization level for all Mips32 CPUs. Replace the endianess determination code from toolchain prefix by a more generic one inspired by the Linux arch/mips/Makefile. Move the -mtune setting to the SoC specific config.mk makefiles.
--- arch/mips/cpu/mips32/au1x00/config.mk | 2 ++ arch/mips/cpu/mips32/config.mk | 21 +++++++-------------- arch/mips/cpu/mips32/incaip/config.mk | 2 ++ arch/mips/cpu/mips32/purple/config.mk | 2 ++ 4 files changed, 13 insertions(+), 14 deletions(-)
arch/mips/cpu/mips32/au1x00/config.mk +2 -0
@@ -20,3 +20,5 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, # MA 02111-1307 USA # + +PLATFORM_CPPFLAGS += $(call cc-option,-mtune=4kc)
arch/mips/cpu/mips32/config.mk +7 -14
@@ -20,20 +20,13 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, # MA 02111-1307 USA # -v=$(shell $(AS) --version | grep 'GNU assembler' | egrep -o '2\.[0-9\.]+' | cut -d. -f2) -MIPSFLAGS:=$(shell \ -if [ "$v" -lt "14" ]; then \ - echo "-mcpu=4kc"; \ -else \ - echo "-march=4kc -mtune=4kc"; \ -fi) -ifneq (,$(findstring 4KCle,$(CROSS_COMPILE))) -ENDIANNESS = -EL -else -ENDIANNESS = -EB -endif +# Optimization flags for all Mips32 CPUs +MIPSFLAGS = $(call cc-option,-march=mips32r2,-mips32r2 -Wa,-mips32r2) -MIPSFLAGS += $(ENDIANNESS) +# Determine endianess from toolchain prefix +ENDIANESS = $(shell $(CC) -dumpmachine | \ + grep -q 'mips.*el-.*' && echo -EL || echo -EB) + +PLATFORM_CPPFLAGS += $(MIPSFLAGS) $(ENDIANESS) -PLATFORM_CPPFLAGS += $(MIPSFLAGS)
arch/mips/cpu/mips32/incaip/config.mk +2 -0
@@ -20,3 +20,5 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, # MA 02111-1307 USA # + +PLATFORM_CPPFLAGS += $(call cc-option,-mtune=4kc)
arch/mips/cpu/mips32/purple/config.mk +2 -0
@@ -20,3 +20,5 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, # MA 02111-1307 USA # + +PLATFORM_CPPFLAGS += $(call cc-option,-mtune=4kc)
--
1.7.4.1
cover Mips: Refactoring of CPU and SoC code
In reply to daniel.schwierzeck at googlemail.comQuoted 3 lines · daniel.schwierzeck at googlemail.com
This patch series refactors the Mips CPU directory and put all current code into an own mips32 subdirectory. Furthermore the SoC specific code of IncaIP, Purple and Au1x00 is moved to separate SoC subdirectories.
Personally I'm not a big fan of current arch/<arch>/cpu/ directory usages in the U-Boot tree. But that's a matter of personal preference, and I've already ended up regarding this area a few years ago. Not having strong opinions now.
When they get ready for merge, please let me know. Then I'll queue them up for the next release, thanks.
cover Mips: Refactoring of CPU and SoC code
In reply to daniel.schwierzeck at googlemail.comBy the way, please use MIPS: next time, not Mips:
Thanks in advance,