MIPS: Add VCT board series support (Part 1/3)
PATCH 1/1 MIPS: Add VCT board series support (Part 1/3)
This patch adds support for the Micronas VCT board series. Currently the following platforms are supported:
vct_premium
vct_premium_small
vct_premium_onenand
vct_premium_onenand_small
vct_platinum
vct_platinum_small
vct_platinum_onenand
vct_platinum_onenand_small
vct_platinumavc
vct_platinumavc_small
vct_platinumavc_onenand
vct_platinumavc_onenand_small
One speciality of the VCT board is that it can't access NOR FLASH memory-mapped. It has to use special access functions for this.
--- board/micronas/vct/Makefile | 56 +++++ board/micronas/vct/config.mk | 31 +++ board/micronas/vct/ebi.c | 48 +++++ board/micronas/vct/ebi_nor_flash.c | 131 ++++++++++++ board/micronas/vct/ebi_onenand.c | 168 +++++++++++++++ board/micronas/vct/ebi_smc911x.c | 94 +++++++++ board/micronas/vct/gpio.c | 88 ++++++++ board/micronas/vct/smc_eeprom.c | 394 ++++++++++++++++++++++++++++++++++++ board/micronas/vct/top.c | 289 ++++++++++++++++++++++++++ board/micronas/vct/u-boot.lds | 70 +++++++ board/micronas/vct/vct.c | 117 +++++++++++ 11 files changed, 1486 insertions(+), 0 deletions(-) create mode 100644 board/micronas/vct/Makefile create mode 100644 board/micronas/vct/config.mk create mode 100644 board/micronas/vct/ebi.c create mode 100644 board/micronas/vct/ebi_nor_flash.c create mode 100644 board/micronas/vct/ebi_onenand.c create mode 100644 board/micronas/vct/ebi_smc911x.c create mode 100644 board/micronas/vct/gpio.c create mode 100644 board/micronas/vct/smc_eeprom.c create mode 100644 board/micronas/vct/top.c create mode 100644 board/micronas/vct/u-boot.lds create mode 100644 board/micronas/vct/vct.c
board/micronas/vct/Makefile new file +56 -0
@@ -0,0 +1,56 @@ +# +# (C) Copyright 2008 Stefan Roese <[email protected]>, DENX Software Engineering +# +# 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$(BOARD).a + +COBJS-y := $(BOARD).o +COBJS-y += ebi.o +COBJS-$(CONFIG_VCT_NOR) += ebi_nor_flash.o +COBJS-$(CONFIG_VCT_ONENAND) += ebi_onenand.o +COBJS-$(CONFIG_DRIVER_SMC911X) += ebi_smc911x.o smc_eeprom.o +COBJS-y += gpio.o +COBJS-y += top.o + +COBJS := $(sort $(COBJS-y)) +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB): $(OBJS) $(SOBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) + +clean: + rm -f $(SOBJS) $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak $(obj).depend + +######################################################################### + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +#########################################################################
board/micronas/vct/config.mk new file +31 -0
@@ -0,0 +1,31 @@ +# +# (C) Copyright 2008 Stefan Roese <[email protected]>, DENX Software Engineering +# +# 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 +# + +# +# vct_xxx boards with MIPS 4Kc CPU core +# + +sinclude $(TOPDIR)/board/$(BOARDDIR)/config.tmp + +ifndef TEXT_BASE +TEXT_BASE = 0x87000000 +endif
board/micronas/vct/ebi.c new file +48 -0
48 lines not on this page · raw message
board/micronas/vct/ebi_nor_flash.c new file +131 -0
131 lines not on this page · raw message
board/micronas/vct/ebi_onenand.c new file +168 -0
168 lines not on this page · raw message
board/micronas/vct/ebi_smc911x.c new file +94 -0
94 lines not on this page · raw message
board/micronas/vct/gpio.c new file +88 -0
88 lines not on this page · raw message
board/micronas/vct/smc_eeprom.c new file +394 -0
394 lines not on this page · raw message
board/micronas/vct/top.c new file +289 -0
289 lines not on this page · raw message
board/micronas/vct/u-boot.lds new file +70 -0
70 lines not on this page · raw message
board/micronas/vct/vct.c new file +117 -0
117 lines not on this page · raw message
Signature · 1 line
1.6.0.5
PATCH 1/1 MIPS: Add VCT board series support (Part 1/3)
Quoted 16 lines · Stefan Roese
This patch adds support for the Micronas VCT board series. Currently the following platforms are supported:
vct_premium
vct_premium_small
vct_premium_onenand
vct_premium_onenand_small
vct_platinum
vct_platinum_small
vct_platinum_onenand
vct_platinum_onenand_small
vct_platinumavc
vct_platinumavc_small
vct_platinumavc_onenand
vct_platinumavc_onenand_small
Quoted 5 lines
One speciality of the VCT board is that it can't access NOR FLASH memory-mapped. It has to use special access functions for this.
Signed-off-by Stefan Roese <[email protected]>---
... stuff deleted...
Quoted 23 lines
board/micronas/vct/u-boot.lds new file +17
-0@@ -0,0 +1,70 @@ +/* + * (C) Copyright 2003 + * Wolfgang Denk 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. + *
board/micronas/vct/u-boot.lds line 27
Quoted 10 lines
board/micronas/vct/u-boot.lds new file +10
-0+ * 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 + */ + +/* +OUTPUT_FORMAT("elf32-bigmips", "elf32-bigmips", "elf32-bigmips") +*/ +OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradbigmips")
I believe that this should be:
OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradlittlemips")
as the parameters are for default, big, little endian compilation.
Quoted 17 lines
board/micronas/vct/u-boot.lds new file +17
-0+OUTPUT_ARCH(mips) +ENTRY(_start) +SECTIONS +{ + . = 0x00000000; + + . = ALIGN(4); + .text : + { + *(.text) + } + + . = ALIGN(4); + .rodata : { *(.rodata) } + + . = ALIGN(4); + .data : { *(.data) }
board/micronas/vct/u-boot.lds line 54
Quoted 10 lines
board/micronas/vct/u-boot.lds new file +10
-0+ + . = .; + _gp = ALIGN(16) + 0x7ff0; + + .got : { + __got_start = .; + *(.got) + __got_end = .; + } +
I would force alignment here for sdata
board/micronas/vct/u-boot.lds line 56
Quoted 2 lines
board/micronas/vct/u-boot.lds new file +2
-0+ .sdata : { *(.sdata) } +
and here
board/micronas/vct/u-boot.lds line 62
Quoted 6 lines
board/micronas/vct/u-boot.lds new file +6
-0+ .u_boot_cmd : { + __u_boot_cmd_start = .; + *(.u_boot_cmd) + __u_boot_cmd_end = .; + } +
uboot_end_data is assumed to be word aligned in cpu/mips/start.S, enforce the alignment here
board/micronas/vct/u-boot.lds line 67
Quoted 5 lines
board/micronas/vct/u-boot.lds new file +5
-0+ uboot_end_data = .; + num_got_entries = (__got_end - __got_start) >> 2; + + . = ALIGN(4); + .sbss (NOLOAD) : { *(.sbss) }
I believe .bss is also expected to be word aligned
Quoted 3 lines
board/micronas/vct/u-boot.lds new file +3
-0+ .bss (NOLOAD) : { *(.bss) } + uboot_end = .; +}
PATCH 1/1 MIPS: Add VCT board series support (Part 1/3)
Quoted 5 lines · Andrew Dyer
Quoted 4 lines · Stefan Roese
This patch adds support for the Micronas VCT board series. Currently the following platforms are supported:
vct_premium
<snip>
Quoted 8 lines
Quoted 5 lines
board/micronas/vct/u-boot.lds new file +4
-0+/* +OUTPUT_FORMAT("elf32-bigmips", "elf32-bigmips", "elf32-bigmips") +*/ +OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips","elf32-tradbigmips")
I believe that this should be:
Quoted 4 lines
OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradlittlemips")as the parameters are for default, big, little endian compilation.
I copied this from another MIPS platform (purple). So other existing ports will have the same problem.
I'll fix this in the next patch version.
Quoted 21 lines
Quoted 21 lines
board/micronas/vct/u-boot.lds new file +21
-0+OUTPUT_ARCH(mips) +ENTRY(_start) +SECTIONS +{ + . = 0x00000000; + + . = ALIGN(4); + .text : + { + *(.text) + } + + . = ALIGN(4); + .rodata : { *(.rodata) } + + . = ALIGN(4); + .data : { *(.data) } + + . = .; + _gp = ALIGN(16) + 0x7ff0; +
Quoted 8 lines
board/micronas/vct/u-boot.lds line 54
Quoted 6 lines
board/micronas/vct/u-boot.lds new file +6
-0+ .got : { + __got_start = .; + *(.got) + __got_end = .; + } +I would force alignment here for sdata
ok.
Quoted 4 lines
board/micronas/vct/u-boot.lds line 56
Quoted 2 lines
board/micronas/vct/u-boot.lds new file +2
-0+ .sdata : { *(.sdata) } +and here
ok.
Quoted 9 lines
board/micronas/vct/u-boot.lds line 62
Quoted 6 lines
board/micronas/vct/u-boot.lds new file +6
-0+ .u_boot_cmd : { + __u_boot_cmd_start = .; + *(.u_boot_cmd) + __u_boot_cmd_end = .; + } +
uboot_end_datais assumed to be word aligned incpu/mips/start.S, enforce the alignment here
ok.
Quoted 7 lines
board/micronas/vct/u-boot.lds line 67
Quoted 5 lines
board/micronas/vct/u-boot.lds new file +5
-0+ uboot_end_data = .; + num_got_entries = (__got_end - __got_start) >> 2; + + . = ALIGN(4); + .sbss (NOLOAD) : { *(.sbss) }I believe .bss is also expected to be word aligned
ok.
Quoted 3 lines
board/micronas/vct/u-boot.lds line 70
Quoted 3 lines
board/micronas/vct/u-boot.lds new file +3
-0+ .bss (NOLOAD) : { *(.bss) } + uboot_end = .; +}
I'll fix this in the next patch version.
Thanks.
Stefan
=====================================================================
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
=====================================================================