forked from skristiansson/linux
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds support for the Atmel AVR32 architecture as well as the AT32AP7000 CPU and the AT32STK1000 development board. AVR32 is a new high-performance 32-bit RISC microprocessor core, designed for cost-sensitive embedded applications, with particular emphasis on low power consumption and high code density. The AVR32 architecture is not binary compatible with earlier 8-bit AVR architectures. The AVR32 architecture, including the instruction set, is described by the AVR32 Architecture Manual, available from http://www.atmel.com/dyn/resources/prod_documents/doc32000.pdf The Atmel AT32AP7000 is the first CPU implementing the AVR32 architecture. It features a 7-stage pipeline, 16KB instruction and data caches and a full Memory Management Unit. It also comes with a large set of integrated peripherals, many of which are shared with the AT91 ARM-based controllers from Atmel. Full data sheet is available from http://www.atmel.com/dyn/resources/prod_documents/doc32003.pdf while the CPU core implementation including caches and MMU is documented by the AVR32 AP Technical Reference, available from http://www.atmel.com/dyn/resources/prod_documents/doc32001.pdf Information about the AT32STK1000 development board can be found at http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3918 including a BSP CD image with an earlier version of this patch, development tools (binaries and source/patches) and a root filesystem image suitable for booting from SD card. Alternatively, there's a preliminary "getting started" guide available at http://avr32linux.org/twiki/bin/view/Main/GettingStarted which provides links to the sources and patches you will need in order to set up a cross-compiling environment for avr32-linux. This patch, as well as the other patches included with the BSP and the toolchain patches, is actively supported by Atmel Corporation. [dmccr@us.ibm.com: Fix more pxx_page macro locations] [bunk@stusta.de: fix `make defconfig'] Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Dave McCracken <dmccr@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
- Loading branch information
Haavard Skinnemoen
authored and
Linus Torvalds
committed
Sep 26, 2006
1 parent
53e62d3
commit 5f97f7f
Showing
176 changed files
with
18,124 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,196 @@ | ||
# | ||
# For a description of the syntax of this configuration file, | ||
# see Documentation/kbuild/kconfig-language.txt. | ||
# | ||
|
||
mainmenu "Linux Kernel Configuration" | ||
|
||
config AVR32 | ||
bool | ||
default y | ||
# With EMBEDDED=n, we get lots of stuff automatically selected | ||
# that we usually don't need on AVR32. | ||
select EMBEDDED | ||
help | ||
AVR32 is a high-performance 32-bit RISC microprocessor core, | ||
designed for cost-sensitive embedded applications, with particular | ||
emphasis on low power consumption and high code density. | ||
|
||
There is an AVR32 Linux project with a web page at | ||
http://avr32linux.org/. | ||
|
||
config UID16 | ||
bool | ||
|
||
config GENERIC_HARDIRQS | ||
bool | ||
default y | ||
|
||
config HARDIRQS_SW_RESEND | ||
bool | ||
default y | ||
|
||
config GENERIC_IRQ_PROBE | ||
bool | ||
default y | ||
|
||
config RWSEM_GENERIC_SPINLOCK | ||
bool | ||
default y | ||
|
||
config GENERIC_TIME | ||
bool | ||
default y | ||
|
||
config RWSEM_XCHGADD_ALGORITHM | ||
bool | ||
|
||
config GENERIC_BUST_SPINLOCK | ||
bool | ||
|
||
config GENERIC_HWEIGHT | ||
bool | ||
default y | ||
|
||
config GENERIC_CALIBRATE_DELAY | ||
bool | ||
default y | ||
|
||
source "init/Kconfig" | ||
|
||
menu "System Type and features" | ||
|
||
config SUBARCH_AVR32B | ||
bool | ||
config MMU | ||
bool | ||
config PERFORMANCE_COUNTERS | ||
bool | ||
|
||
config PLATFORM_AT32AP | ||
bool | ||
select SUBARCH_AVR32B | ||
select MMU | ||
select PERFORMANCE_COUNTERS | ||
|
||
choice | ||
prompt "AVR32 CPU type" | ||
default CPU_AT32AP7000 | ||
|
||
config CPU_AT32AP7000 | ||
bool "AT32AP7000" | ||
select PLATFORM_AT32AP | ||
endchoice | ||
|
||
# | ||
# CPU Daughterboards for ATSTK1000 | ||
config BOARD_ATSTK1002 | ||
bool | ||
|
||
choice | ||
prompt "AVR32 board type" | ||
default BOARD_ATSTK1000 | ||
|
||
config BOARD_ATSTK1000 | ||
bool "ATSTK1000 evaluation board" | ||
select BOARD_ATSTK1002 if CPU_AT32AP7000 | ||
endchoice | ||
|
||
choice | ||
prompt "Boot loader type" | ||
default LOADER_U_BOOT | ||
|
||
config LOADER_U_BOOT | ||
bool "U-Boot (or similar) bootloader" | ||
endchoice | ||
|
||
config LOAD_ADDRESS | ||
hex | ||
default 0x10000000 if LOADER_U_BOOT=y && CPU_AT32AP7000=y | ||
|
||
config ENTRY_ADDRESS | ||
hex | ||
default 0x90000000 if LOADER_U_BOOT=y && CPU_AT32AP7000=y | ||
|
||
config PHYS_OFFSET | ||
hex | ||
default 0x10000000 if CPU_AT32AP7000=y | ||
|
||
source "kernel/Kconfig.preempt" | ||
|
||
config HAVE_ARCH_BOOTMEM_NODE | ||
bool | ||
default n | ||
|
||
config ARCH_HAVE_MEMORY_PRESENT | ||
bool | ||
default n | ||
|
||
config NEED_NODE_MEMMAP_SIZE | ||
bool | ||
default n | ||
|
||
config ARCH_FLATMEM_ENABLE | ||
bool | ||
default y | ||
|
||
config ARCH_DISCONTIGMEM_ENABLE | ||
bool | ||
default n | ||
|
||
config ARCH_SPARSEMEM_ENABLE | ||
bool | ||
default n | ||
|
||
source "mm/Kconfig" | ||
|
||
config OWNERSHIP_TRACE | ||
bool "Ownership trace support" | ||
default y | ||
help | ||
Say Y to generate an Ownership Trace message on every context switch, | ||
enabling Nexus-compliant debuggers to keep track of the PID of the | ||
currently executing task. | ||
|
||
# FPU emulation goes here | ||
|
||
source "kernel/Kconfig.hz" | ||
|
||
config CMDLINE | ||
string "Default kernel command line" | ||
default "" | ||
help | ||
If you don't have a boot loader capable of passing a command line string | ||
to the kernel, you may specify one here. As a minimum, you should specify | ||
the memory size and the root device (e.g., mem=8M, root=/dev/nfs). | ||
|
||
endmenu | ||
|
||
menu "Bus options" | ||
|
||
config PCI | ||
bool | ||
|
||
source "drivers/pci/Kconfig" | ||
|
||
source "drivers/pcmcia/Kconfig" | ||
|
||
endmenu | ||
|
||
menu "Executable file formats" | ||
source "fs/Kconfig.binfmt" | ||
endmenu | ||
|
||
source "net/Kconfig" | ||
|
||
source "drivers/Kconfig" | ||
|
||
source "fs/Kconfig" | ||
|
||
source "arch/avr32/Kconfig.debug" | ||
|
||
source "security/Kconfig" | ||
|
||
source "crypto/Kconfig" | ||
|
||
source "lib/Kconfig" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
menu "Kernel hacking" | ||
|
||
config TRACE_IRQFLAGS_SUPPORT | ||
bool | ||
default y | ||
|
||
source "lib/Kconfig.debug" | ||
|
||
config KPROBES | ||
bool "Kprobes" | ||
depends on DEBUG_KERNEL | ||
help | ||
Kprobes allows you to trap at almost any kernel address and | ||
execute a callback function. register_kprobe() establishes | ||
a probepoint and specifies the callback. Kprobes is useful | ||
for kernel debugging, non-intrusive instrumentation and testing. | ||
If in doubt, say "N". | ||
|
||
endmenu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# | ||
# This file is subject to the terms and conditions of the GNU General Public | ||
# License. See the file "COPYING" in the main directory of this archive | ||
# for more details. | ||
# | ||
# Copyright (C) 2004-2006 Atmel Corporation. | ||
|
||
# Default target when executing plain make | ||
.PHONY: all | ||
all: uImage vmlinux.elf linux.lst | ||
|
||
KBUILD_DEFCONFIG := atstk1002_defconfig | ||
|
||
CFLAGS += -pipe -fno-builtin -mno-pic | ||
AFLAGS += -mrelax -mno-pic | ||
CFLAGS_MODULE += -mno-relax | ||
LDFLAGS_vmlinux += --relax | ||
|
||
cpuflags-$(CONFIG_CPU_AP7000) += -mcpu=ap7000 | ||
|
||
CFLAGS += $(cpuflags-y) | ||
AFLAGS += $(cpuflags-y) | ||
|
||
CHECKFLAGS += -D__avr32__ | ||
|
||
LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) | ||
|
||
head-$(CONFIG_LOADER_U_BOOT) += arch/avr32/boot/u-boot/head.o | ||
head-y += arch/avr32/kernel/head.o | ||
core-$(CONFIG_PLATFORM_AT32AP) += arch/avr32/mach-at32ap/ | ||
core-$(CONFIG_BOARD_ATSTK1000) += arch/avr32/boards/atstk1000/ | ||
core-$(CONFIG_LOADER_U_BOOT) += arch/avr32/boot/u-boot/ | ||
core-y += arch/avr32/kernel/ | ||
core-y += arch/avr32/mm/ | ||
libs-y += arch/avr32/lib/ #$(LIBGCC) | ||
|
||
archincdir-$(CONFIG_PLATFORM_AT32AP) := arch-at32ap | ||
|
||
include/asm-avr32/.arch: $(wildcard include/config/platform/*.h) include/config/auto.conf | ||
@echo ' SYMLINK include/asm-avr32/arch -> include/asm-avr32/$(archincdir-y)' | ||
ifneq ($(KBUILD_SRC),) | ||
$(Q)mkdir -p include/asm-avr32 | ||
$(Q)ln -fsn $(srctree)/include/asm-avr32/$(archincdir-y) include/asm-avr32/arch | ||
else | ||
$(Q)ln -fsn $(archincdir-y) include/asm-avr32/arch | ||
endif | ||
@touch $@ | ||
|
||
archprepare: include/asm-avr32/.arch | ||
|
||
BOOT_TARGETS := vmlinux.elf vmlinux.bin uImage uImage.srec | ||
|
||
.PHONY: $(BOOT_TARGETS) install | ||
|
||
boot := arch/$(ARCH)/boot/images | ||
|
||
KBUILD_IMAGE := $(boot)/uImage | ||
vmlinux.elf: KBUILD_IMAGE := $(boot)/vmlinux.elf | ||
vmlinux.cso: KBUILD_IMAGE := $(boot)/vmlinux.cso | ||
uImage.srec: KBUILD_IMAGE := $(boot)/uImage.srec | ||
uImage: KBUILD_IMAGE := $(boot)/uImage | ||
|
||
quiet_cmd_listing = LST $@ | ||
cmd_listing = avr32-linux-objdump $(OBJDUMPFLAGS) -lS $< > $@ | ||
quiet_cmd_disasm = DIS $@ | ||
cmd_disasm = avr32-linux-objdump $(OBJDUMPFLAGS) -d $< > $@ | ||
|
||
vmlinux.elf vmlinux.bin uImage.srec uImage vmlinux.cso: vmlinux | ||
$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ | ||
|
||
install: vmlinux | ||
$(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) $@ | ||
|
||
linux.s: vmlinux | ||
$(call if_changed,disasm) | ||
|
||
linux.lst: vmlinux | ||
$(call if_changed,listing) | ||
|
||
define archhelp | ||
@echo '* vmlinux.elf - ELF image with load address 0' | ||
@echo ' vmlinux.cso - PathFinder CSO image' | ||
@echo ' uImage - Create a bootable image for U-Boot' | ||
endef |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
obj-y += setup.o spi.o | ||
obj-$(CONFIG_BOARD_ATSTK1002) += atstk1002.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* ATSTK1002 daughterboard-specific init code | ||
* | ||
* Copyright (C) 2005-2006 Atmel Corporation | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2 as | ||
* published by the Free Software Foundation. | ||
*/ | ||
#include <linux/init.h> | ||
|
||
#include <asm/arch/board.h> | ||
|
||
struct eth_platform_data __initdata eth0_data = { | ||
.valid = 1, | ||
.mii_phy_addr = 0x10, | ||
.is_rmii = 0, | ||
.hw_addr = { 0x6a, 0x87, 0x71, 0x14, 0xcd, 0xcb }, | ||
}; | ||
|
||
extern struct lcdc_platform_data atstk1000_fb0_data; | ||
|
||
static int __init atstk1002_init(void) | ||
{ | ||
at32_add_system_devices(); | ||
|
||
at32_add_device_usart(1); /* /dev/ttyS0 */ | ||
at32_add_device_usart(2); /* /dev/ttyS1 */ | ||
at32_add_device_usart(3); /* /dev/ttyS2 */ | ||
|
||
at32_add_device_eth(0, ð0_data); | ||
at32_add_device_spi(0); | ||
at32_add_device_lcdc(0, &atstk1000_fb0_data); | ||
|
||
return 0; | ||
} | ||
postcore_initcall(atstk1002_init); |
Oops, something went wrong.