Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sami Nurmenniemi
u-boot-stm32
Commits
fbbaf013
Commit
fbbaf013
authored
Sep 17, 2011
by
Yuri Tikhonov
Browse files
RT72064. stm3220g-eval: the very basic port
Stubs for stm3220g-eval port. Signed-off-by:
Yuri Tikhonov
<
yur@emcraft.com
>
parent
9a4a14e5
Changes
15
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
fbbaf013
...
...
@@ -3200,6 +3200,9 @@ a2f-hoermann-brd_config : unconfig
@
$(MKCONFIG)
$
(
@:_config
=)
arm arm_cortexm3 a2f-hoermann-brd
\
hoermann a2f
stm3220g-eval_config
:
unconfig
@
$(MKCONFIG)
$
(
@:_config
=)
arm arm_cortexm3 stm3220g-eval stm stm32f2
#########################################################################
## XScale Systems
#########################################################################
...
...
board/stm/stm3220g-eval/Makefile
0 → 100644
View file @
fbbaf013
#
# (C) Copyright 2011
#
# Yuri Tikhonov, Emcraft Systems, yur@emcraft.com
#
# 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
:=
board.o
SRCS
:=
$(COBJS:.o=.c)
OBJS
:=
$(
addprefix
$(obj)
,
$(COBJS)
)
$(LIB)
:
$(obj).depend $(OBJS)
$(AR)
$(ARFLAGS)
$@
$(OBJS)
clean
:
rm
-f
$(OBJS)
distclean
:
clean
rm
-f
$(LIB)
core
*
.bak
$(obj)
.depend
#########################################################################
# defines $(obj).depend target
include
$(SRCTREE)/rules.mk
sinclude
$(obj).depend
board/stm/stm3220g-eval/board.c
0 → 100644
View file @
fbbaf013
/*
* (C) Copyright 2011
*
* Yuri Tikhonov, Emcraft Systems, yur@emcraft.com
*
* 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
*/
/*
* Board specific code for the STMicroelectronic STM3220G-EVAL board
*/
#include
<common.h>
DECLARE_GLOBAL_DATA_PTR
;
/*
* Early hardware init.
*/
int
board_init
(
void
)
{
/*
* TBD
*/
return
0
;
}
/*
* Dump pertinent info to the console.
*/
int
checkboard
(
void
)
{
printf
(
"Board: STM3220G-EVAL board %s
\n
"
,
CONFIG_SYS_BOARD_REV_STR
);
return
0
;
}
/*
* Configure board specific parts.
*/
int
misc_init_r
(
void
)
{
/*
* TBD
*/
return
0
;
}
/*
* Setup dynamic RAM.
*/
int
dram_init
(
void
)
{
/*
* TBD
*/
return
0
;
}
cpu/arm_cortexm3/cpu.c
View file @
fbbaf013
...
...
@@ -52,6 +52,8 @@ int arch_cpu_init(void)
*/
#if defined(CONFIG_SYS_A2F)
gd
->
bd
->
bi_arch_number
=
MACH_TYPE_A2F
;
#elif defined(CONFIG_SYS_STM32F2)
gd
->
bd
->
bi_arch_number
=
MACH_TYPE_STM32F2
;
#else
# error "Unknown Cortex-M3 SOC."
#endif
...
...
cpu/arm_cortexm3/stm32f2/Makefile
0 → 100644
View file @
fbbaf013
#
# (C) Copyright 2000-2003
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
#
# (C) Copyright 2011
# Port to STM32F2
# Yuri Tikhonov, Emcraft Systems, yur@emcraft.com.
#
# 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
:=
clock.o cpu.o envm.o timer.o wdt.o
SOBJS
:=
SRCS
:=
$(COBJS:.o=.c)
OBJS
:=
$(
addprefix
$(obj)
,
$(COBJS)
)
SOBJS
:=
$(
addprefix
$(obj)
,
$(SOBJS)
)
$(LIB)
:
$(obj).depend $(OBJS) $(SOBJS)
$(AR)
$(ARFLAGS)
$@
$(OBJS)
clean
:
rm
-f
$(SOBJS)
$(OBJS)
distclean
:
rm
-f
$(LIB)
core
*
.bak
$(obj)
.depend
#########################################################################
# defines $(obj).depend target
include
$(SRCTREE)/rules.mk
sinclude
$(obj).depend
#########################################################################
cpu/arm_cortexm3/stm32f2/clock.c
0 → 100644
View file @
fbbaf013
/*
* (C) Copyright 2011
*
* Yuri Tikhonov, Emcraft Systems, yur@emcraft.com
*
* 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
"clock.h"
/*
* Initialize the reference clocks.
*/
void
clock_init
(
void
)
{
/*
* TBD
*/
return
;
}
cpu/arm_cortexm3/stm32f2/cpu.c
0 → 100644
View file @
fbbaf013
/*
* (C) Copyright 2011
*
* Yuri Tikhonov, Emcraft Systems, yur@emcraft.com
*
* 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>
/*
* Print the CPU specific information
*/
int
print_cpuinfo
(
void
)
{
printf
(
"CPU: %s
\n
"
,
"STM32 F2 series (Cortex-M3)"
);
return
0
;
}
/*
* Perform the low-level reset.
* Note that we need for this function to reside in RAM since it
* will be used to self-upgrade U-boot in eNMV.
*/
void
__attribute__
((
section
(
".ramcode"
)))
__attribute__
((
long_call
))
reset_cpu
(
ulong
addr
)
{
/*
* TBD
*/
return
;
}
/*
* Dump the registers on an exception we don't know how to process.
*/
unsigned
char
cortex_m3_irq_vec_get
(
void
)
{
/*
* TBD
*/
return
0
;
}
cpu/arm_cortexm3/stm32f2/envm.c
0 → 100644
View file @
fbbaf013
/*
* (C) Copyright 2011
*
* Yuri Tikhonov, Emcraft Systems, yur@emcraft.com
*
* 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
"envm.h"
/*
* Initialize internal Flash interface
*/
void
envm_init
(
void
)
{
/*
* TBD
*/
return
;
}
/*
* Write a data buffer to internal Flash.
* Note that we need for this function to reside in RAM since it
* will be used to self-upgrade U-boot in internal Flash.
*/
unsigned
int
__attribute__
((
section
(
".ramcode"
)))
__attribute__
((
long_call
))
envm_write
(
unsigned
int
offset
,
void
*
buf
,
unsigned
int
size
)
{
/*
* TBD
*/
return
0
;
}
cpu/arm_cortexm3/stm32f2/timer.c
0 → 100644
View file @
fbbaf013
/*
* (C) Copyright 2011
*
* Yuri Tikhonov, Emcraft Systems, yur@emcraft.com
*
* 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>
/*
* Init timer.
*/
int
timer_init
(
void
)
{
/*
* TBD
*/
return
0
;
}
/*
* Return difference between timer ticks and 'base'.
*/
unsigned
long
get_timer
(
unsigned
long
base
)
{
/*
* TBD
*/
return
0
;
}
/*
* Reset timer.
*/
void
reset_timer
(
void
)
{
/*
* TBD
*/
return
0
;
}
/*
* Delay for 'usec' useconds.
*/
void
__udelay
(
unsigned
long
usec
)
{
/*
* TBD
*/
return
0
;
}
/*
* This function is derived from PowerPC code (timebase clock frequency).
* On ARM it returns the number of timer ticks per second.
*/
unsigned
long
get_tbclk
(
void
)
{
/*
* TBD
*/
return
0
;
}
cpu/arm_cortexm3/stm32f2/wdt.c
0 → 100644
View file @
fbbaf013
/*
* (C) Copyright 2011
*
* Yuri Tikhonov, Emcraft Systems, yur@emcraft.com
*
* 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
"wdt.h"
/*
* Strobe the WDT.
*/
void
wdt_strobe
(
void
)
{
/*
* TBD
*/
return
;
}
/*
* Disable the WDT.
*/
void
wdt_disable
(
void
)
{
/*
* TBD
*/
return
;
}
/*
* Enable the WDT.
*/
void
wdt_enable
(
void
)
{
/*
* TBD
*/
return
;
}
drivers/serial/Makefile
View file @
fbbaf013
...
...
@@ -28,6 +28,7 @@ LIB := $(obj)libserial.a
COBJS-$(CONFIG_ARM_DCC)
+=
arm_dcc.o
COBJS-$(CONFIG_AT91RM9200_USART)
+=
at91rm9200_usart.o
COBJS-$(CONFIG_ATMEL_USART)
+=
atmel_usart.o
COBJS-$(CONFIG_STM32F2_USART)
+=
stm32f2_usart.o
COBJS-$(CONFIG_MCFUART)
+=
mcfuart.o
COBJS-$(CONFIG_NS9750_UART)
+=
ns9750_serial.o
COBJS-$(CONFIG_SYS_NS16550)
+=
ns16550.o
...
...
drivers/serial/stm32f2_usart.c
0 → 100644
View file @
fbbaf013
/*
* (C) Copyright 2011
*
* Yuri Tikhonov, Emcraft Systems, yur@emcraft.com
*
* 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
*/
/*
* STM32 F2 USART driver
*/
#include
<common.h>
/*
* Initialize the serial port.
*/
int
serial_init
(
void
)
{
/*
* TBD
*/
return
0
;
}
/*
* Set new baudrate.
*/
void
serial_setbrg
(
void
)
{
/*
* TBD
*/
return
;
}
/*
* Read a single character from the serial port.
*/
int
serial_getc
(
void
)
{
/*
* TBD
*/
return
0
;
}
/*
* Put a single character to the serial port.
*/
void
serial_putc
(
const
char
c
)
{
/*
* TBD
*/
return
;
}
/*
* Put a string ('\0'-terminated) to the serial port.
*/
void
serial_puts
(
const
char
*
s
)
{
while
(
*
s
)
serial_putc
(
*
s
++
);
}
/*
* Test whether a character in in the RX buffer.
*/
int
serial_tstc
(
void
)
{
/*
* TBD
*/
return
0
;
}
include/asm-arm/mach-types.h
View file @
fbbaf013
...
...
@@ -2700,6 +2700,7 @@ extern unsigned int __machine_arch_type;
#define MACH_TYPE_IGEP0030 2717
#define MACH_TYPE_AXELL_H40_H50_CTRL 2718
#define MACH_TYPE_A2F 3344
#define MACH_TYPE_STM32F2 3345
#ifdef CONFIG_ARCH_EBSA110
# ifdef machine_arch_type
...
...
include/common.h
View file @
fbbaf013
...
...
@@ -462,7 +462,7 @@ int checkdcache (void);
void
upmconfig
(
unsigned
int
,
unsigned
int
*
,
unsigned
int
);
ulong
get_tbclk
(
void
);
void
#if defined(CONFIG_SYS_A2F)
#if defined(CONFIG_SYS_A2F)
|| defined(CONFIG_SYS_STM32F2)
__attribute__
((
section
(
".ramcode"
)))
__attribute__
((
long_call
))
#endif
...
...
include/configs/stm3220g-eval.h
0 → 100644
View file @
fbbaf013
/*
* (C) Copyright 2011
*
* Yuri Tikhonov, Emcraft Systems, yur@emcraft.com
*
* 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.
*