diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2008-06-04 09:31:15 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2008-06-06 09:30:32 +0200 |
commit | f3351ebd7864b83b1f5f3cdc7c8a9f9110cb562f (patch) | |
tree | d552d362afb4ffd949dba5e758e9e8fbfe73b9a1 /arch | |
parent | 3cde41fb901f1c6157c7e3e845239b279e5a2cb0 (diff) | |
download | barebox-f3351ebd7864b83b1f5f3cdc7c8a9f9110cb562f.tar.gz barebox-f3351ebd7864b83b1f5f3cdc7c8a9f9110cb562f.tar.xz |
add basic at91sam9260 support. Currently only second stage
bootloader is supported:
- No SDRAM initialisation
- No UART init / baudrate change
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/Kconfig | 27 | ||||
-rw-r--r-- | arch/arm/Makefile | 3 | ||||
-rw-r--r-- | arch/arm/mach-at91sam9/Makefile | 3 | ||||
-rw-r--r-- | arch/arm/mach-at91sam9/clocksource.c | 77 |
4 files changed, 100 insertions, 10 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index f516ee27c1..38dfa0498c 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -10,21 +10,15 @@ config ARCH_TEXT_BASE default 0xa0000000 if MACH_PCM038 default 0xa0000000 if MACH_IMX27ADS default 0x87f00000 if MACH_PCM037 + default 0x23f00000 if MACH_AT91SAM9260_EK config BOARDINFO default "Synertronixx scb9328" if MACH_SCB9328 - -config BOARDINFO default "Hilscher Netx nxdb500" if MACH_NXDB500 - -config BOARDINFO default "Phytec phyCORE-i.MX27" if MACH_PCM038 - -config BOARDINFO default "Freescale i.MX27 ADS" if MACH_IMX27ADS - -config BOARDINFO default "Phytec phyCORE-i.MX31" if MACH_PCM037 + default "Atmel 91SAM9260-EK" if MACH_AT91SAM9260_EK config BOARD_LINKER_SCRIPT bool @@ -81,7 +75,14 @@ config ARCH_NETX config ARCH_OMAP bool -# ARM versions used varies on based on OMAP versions + +config ARCH_AT91SAM9 + bool + select ARM926EJS + +config ARCH_AT91SAM9260 + bool + select ARCH_AT91SAM9 choice prompt "Select your board" @@ -141,7 +142,7 @@ config MACH_PCM037 bool "phyCORE-i.MX31" select ARCH_IMX31 help - Say Y here if your are using Phytec's phyCORE-i.MX31 (pcm037) equipped + Say Y here if you are using Phytec's phyCORE-i.MX31 (pcm037) equipped with a Freescale i.MX31 Processor config MACH_OMAP @@ -150,6 +151,12 @@ config MACH_OMAP help Say Y if you are using Texas Instrument's OMAP based platforms +config MACH_AT91SAM9260_EK + bool "Atmel AT91SAM9260-EK" + select ARCH_AT91SAM9260 + help + Say y here if you are using Atmel's AT91SAM9260-EK Evaluation board + endchoice config IMX_CLKO diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 0956f2f323..3fe69bb2de 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -6,6 +6,7 @@ machine-$(CONFIG_ARCH_IMX) := imx machine-$(CONFIG_ARCH_NETX) := netx machine-$(CONFIG_ARCH_AT91RM9200) := at91rm9200 machine-$(CONFIG_ARCH_OMAP) := omap +machine-$(CONFIG_ARCH_AT91SAM9) := at91sam9 board-$(CONFIG_MACH_MX1ADS) := mx1ads board-$(CONFIG_MACH_ECO920) := eco920 board-$(CONFIG_MACH_SCB9328) := scb9328 @@ -14,6 +15,8 @@ board-$(CONFIG_MACH_IMX27ADS) := imx27ads board-$(CONFIG_MACH_NXDB500) := netx board-$(CONFIG_MACH_PCM037) := pcm037 board-$(CONFIG_MACH_OMAP) := omap +board-$(CONFIG_MACH_AT91SAM9260_EK):= at91sam9260ek + # FIXME "cpu-y" never used on ARM! cpu-$(CONFIG_ARM920T) := arm920t cpu-$(CONFIG_ARM926EJS) := arm926ejs diff --git a/arch/arm/mach-at91sam9/Makefile b/arch/arm/mach-at91sam9/Makefile new file mode 100644 index 0000000000..b6c1cc1526 --- /dev/null +++ b/arch/arm/mach-at91sam9/Makefile @@ -0,0 +1,3 @@ +obj-y += clocksource.o + + diff --git a/arch/arm/mach-at91sam9/clocksource.c b/arch/arm/mach-at91sam9/clocksource.c new file mode 100644 index 0000000000..dfd2ecda9d --- /dev/null +++ b/arch/arm/mach-at91sam9/clocksource.c @@ -0,0 +1,77 @@ +/* + * (C) Copyright 2002 + * Sysgo Real-Time Solutions, GmbH <www.elinos.com> + * Marius Groeger <mgroeger@sysgo.de> + * + * (C) Copyright 2002 + * Sysgo Real-Time Solutions, GmbH <www.elinos.com> + * Alex Zuepke <azu@sysgo.de> + * + * (C) Copyright 2002 + * Gary Jennejohn, DENX Software Engineering, <gj@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 <common.h> +#include <init.h> +#include <clock.h> +#include <asm/hardware.h> +#include <asm/arch/at91_pit.h> +#include <asm/arch/at91_pmc.h> +#include <asm/arch/io.h> + +uint64_t at91sam9_clocksource_read(void) +{ + return at91_sys_read(AT91_PIT_PIIR); +} + +static struct clocksource cs = { + .read = at91sam9_clocksource_read, + .mask = 0xffffffff, + .shift = 10, +}; + +static int clocksource_init (void) +{ + /* + * Enable PITC Clock + * The clock is already enabled for system controller in boot + */ + at91_sys_write(AT91_PMC_PCER, 1 << AT91_ID_SYS); + + /* Enable PITC */ + at91_sys_write(AT91_PIT_MR, 0xfffff | AT91_PIT_PITEN); + + cs.mult = clocksource_hz2mult(1000000 * 6, cs.shift); + + init_clock(&cs); + + return 0; +} + +core_initcall(clocksource_init); + +/* + * Reset the cpu by setting up the watchdog timer and let it time out + */ +void reset_cpu (ulong ignored) +{ +} +EXPORT_SYMBOL(reset_cpu); |