Skip to content
GitLab
Menu
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
5d429cc1
Commit
5d429cc1
authored
Nov 08, 2011
by
Alexander Potashev
Browse files
RT73025. ea-lpc1788: the very basic port
Stubs for ea-lpc1788 port.
parent
b142172d
Changes
15
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
5d429cc1
...
...
@@ -3203,6 +3203,9 @@ a2f-hoermann-brd_config : unconfig
stm3220g-eval_config
:
unconfig
@
$(MKCONFIG)
$
(
@:_config
=)
arm arm_cortexm3 stm3220g-eval stm stm32
ea-lpc1788_config
:
unconfig
@
$(MKCONFIG)
$
(
@:_config
=)
arm arm_cortexm3 ea-lpc1788 nxp lpc178x
#########################################################################
## XScale Systems
#########################################################################
...
...
board/nxp/ea-lpc1788/Makefile
0 → 100644
View file @
5d429cc1
#
# (C) Copyright 2011
#
# Alexander Potashev, Emcraft Systems, aspotashev@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/nxp/ea-lpc1788/board.c
0 → 100644
View file @
5d429cc1
/*
* (C) Copyright 2011
*
* Alexander Potashev, Emcraft Systems, aspotashev@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 Embedded Artists LPC1788 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: EA-LPC1788 board %s
\n
"
,
CONFIG_SYS_BOARD_REV_STR
);
return
0
;
}
/*
* Configure board specific parts.
*/
int
misc_init_r
(
void
)
{
/* TBD */
return
0
;
}
/*
* Setup external RAM.
*/
int
dram_init
(
void
)
{
/* TBD */
return
0
;
}
cpu/arm_cortexm3/cpu.c
View file @
5d429cc1
...
...
@@ -54,6 +54,8 @@ int arch_cpu_init(void)
gd
->
bd
->
bi_arch_number
=
MACH_TYPE_A2F
;
#elif defined(CONFIG_SYS_STM32)
gd
->
bd
->
bi_arch_number
=
MACH_TYPE_STM32
;
#elif defined(CONFIG_SYS_LPC178X)
gd
->
bd
->
bi_arch_number
=
MACH_TYPE_LPC178X
;
#else
# error "Unsupported Cortex-M3 SOC."
#endif
...
...
cpu/arm_cortexm3/lpc178x/Makefile
0 → 100644
View file @
5d429cc1
#
# (C) Copyright 2000-2003
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
#
# (C) Copyright 2011
# Port to EA-LPC1788
# Alexander Potashev, Emcraft Systems, aspotashev@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 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/lpc178x/clock.c
0 → 100644
View file @
5d429cc1
/*
* (C) Copyright 2011
*
* Alexander Potashev, Emcraft Systems, aspotashev@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"
/*
* Clock values
*/
static
u32
clock_val
[
CLOCK_END
];
/*
* Initialize the reference clocks.
*/
void
clock_init
(
void
)
{
/*
* TBD
*/
return
;
}
/*
* Return a clock value for the specified clock.
* Note that we need this function in RAM because it will be used
* during self-upgrade of U-boot into eNMV.
* @param clck id of the clock
* @returns frequency of the clock
*/
unsigned
long
__attribute__
((
section
(
".ramcode"
)))
__attribute__
((
long_call
))
clock_get
(
enum
clock
clck
)
{
return
clock_val
[
clck
];
}
cpu/arm_cortexm3/lpc178x/cpu.c
0 → 100644
View file @
5d429cc1
/*
* (C) Copyright 2011
*
* Alexander Potashev, Emcraft Systems, aspotashev@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 <asm/arch/lpc178x.h>
#include "clock.h"
/*
* Print the CPU specific information
*/
int
print_cpuinfo
(
void
)
{
printf
(
"CPU : %s
\n
"
,
"LPC178x/7x series (Cortex-M3)"
);
return
0
;
}
cpu/arm_cortexm3/lpc178x/envm.c
0 → 100644
View file @
5d429cc1
/*
* (C) Copyright 2011
*
* Alexander Potashev, Emcraft Systems, aspotashev@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/lpc178x/wdt.c
0 → 100644
View file @
5d429cc1
/*
* (C) Copyright 2011
*
* Alexander Potashev, Emcraft Systems, aspotashev@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 @
5d429cc1
...
...
@@ -53,6 +53,7 @@ COBJS-$(CONFIG_S3C44B0_SERIAL) += serial_s3c44b0.o
COBJS-$(CONFIG_XILINX_UARTLITE)
+=
serial_xuartlite.o
COBJS-$(CONFIG_SCIF_CONSOLE)
+=
serial_sh.o
COBJS-$(CONFIG_STM32_USART_CONSOLE)
+=
stm32_usart.o
COBJS-$(CONFIG_LPC178X_UART_CONSOLE)
+=
lpc178x_uart.o
COBJS-$(CONFIG_USB_TTY)
+=
usbtty.o
COBJS
:=
$(
sort
$
(
COBJS-y
))
...
...
drivers/serial/lpc178x_uart.c
0 → 100644
View file @
5d429cc1
/*
* (C) Copyright 2011
*
* Alexander Potashev, Emcraft Systems, aspotashev@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
*/
/*
* EA-LPC178X UART 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/arch-lpc178x/lpc178x.h
0 → 100644
View file @
5d429cc1
/*
* (C) Copyright 2011
*
* Alexander Potashev, Emcraft Systems, aspotashev@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
*/
/*
* LPC178X processor definitions
*/
#ifndef _MACH_LPC178X_H_
#define _MACH_LPC178X_H_
/*
* Clocks enumeration
*/
enum
clock
{
CLOCK_SYSTICK
,
/* Systimer clock frequency expressed in Hz */
CLOCK_END
/* for internal usage */
};
/******************************************************************************
* FIXME: get rid of this
******************************************************************************/
/*
* Return a clock value for the specified clock.
* Note that we need this function in RAM because it will be used
* during self-upgrade of U-boot into eNMV.
* @param clck id of the clock
* @returns frequency of the clock
*/
unsigned
long
__attribute__
((
section
(
".ramcode"
)))
__attribute__
((
long_call
))
clock_get
(
enum
clock
clck
);
#endif
/* _MACH_LPC178X_H_ */
include/asm-arm/mach-types.h
View file @
5d429cc1
...
...
@@ -2701,6 +2701,7 @@ extern unsigned int __machine_arch_type;
#define MACH_TYPE_AXELL_H40_H50_CTRL 2718
#define MACH_TYPE_A2F 3344
#define MACH_TYPE_STM32 3750
#define MACH_TYPE_LPC178X 3855
#ifdef CONFIG_ARCH_EBSA110
# ifdef machine_arch_type
...
...
include/common.h
View file @
5d429cc1
...
...
@@ -119,6 +119,9 @@ typedef volatile unsigned char vu_char;
#ifdef CONFIG_SYS_STM32
#include <asm/arch-stm32/stm32.h>
#endif
#ifdef CONFIG_SYS_LPC178X
#include <asm/arch-lpc178x/lpc178x.h>
#endif
#include <part.h>
#include <flash.h>
...
...
@@ -468,7 +471,8 @@ int checkdcache (void);
void
upmconfig
(
unsigned
int
,
unsigned
int
*
,
unsigned
int
);
ulong
get_tbclk
(
void
);
void
#if defined(CONFIG_SYS_A2F) || defined(CONFIG_SYS_STM32)
#if defined(CONFIG_SYS_A2F) || defined(CONFIG_SYS_STM32) || \
defined(CONFIG_SYS_LPC178X)
__attribute__
((
section
(
".ramcode"
)))
__attribute__
((
long_call
))
#endif
...
...
include/configs/ea-lpc1788.h
0 → 100644
View file @
5d429cc1
/*
* (C) Copyright 2011
*
* Alexander Potashev, Emcraft Systems, aspotashev@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
*/
/*
* Configuration settings for the Embedded Artists LPC1788 board.
*/
#ifndef __CONFIG_H
#define __CONFIG_H
/*
* Disable debug messages
*/
#undef DEBUG
/*
* This is an ARM Cortex-M3 CPU core
*/
#define CONFIG_SYS_ARMCORTEXM3
/*
* This is the EA LPC1788 device
*/
#define CONFIG_SYS_LPC178X
/*
* Enable GPIO driver