From 9ca8dbcc65cfc63d6f5ef3312a33184e1d726e00 Mon Sep 17 00:00:00 2001 From: Yunhong Jiang Date: Tue, 4 Aug 2015 12:17:53 -0700 Subject: Add the rt linux 4.1.3-rt3 as base Import the rt linux 4.1.3-rt3 as OPNFV kvm base. It's from git://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git linux-4.1.y-rt and the base is: commit 0917f823c59692d751951bf5ea699a2d1e2f26a2 Author: Sebastian Andrzej Siewior Date: Sat Jul 25 12:13:34 2015 +0200 Prepare v4.1.3-rt3 Signed-off-by: Sebastian Andrzej Siewior We lose all the git history this way and it's not good. We should apply another opnfv project repo in future. Change-Id: I87543d81c9df70d99c5001fbdf646b202c19f423 Signed-off-by: Yunhong Jiang --- kernel/arch/avr32/boards/atstk1000/Kconfig | 109 ++++++++ kernel/arch/avr32/boards/atstk1000/Makefile | 5 + kernel/arch/avr32/boards/atstk1000/atstk1000.h | 17 ++ kernel/arch/avr32/boards/atstk1000/atstk1002.c | 330 +++++++++++++++++++++++++ kernel/arch/avr32/boards/atstk1000/atstk1003.c | 162 ++++++++++++ kernel/arch/avr32/boards/atstk1000/atstk1004.c | 164 ++++++++++++ kernel/arch/avr32/boards/atstk1000/flash.c | 98 ++++++++ kernel/arch/avr32/boards/atstk1000/setup.c | 127 ++++++++++ 8 files changed, 1012 insertions(+) create mode 100644 kernel/arch/avr32/boards/atstk1000/Kconfig create mode 100644 kernel/arch/avr32/boards/atstk1000/Makefile create mode 100644 kernel/arch/avr32/boards/atstk1000/atstk1000.h create mode 100644 kernel/arch/avr32/boards/atstk1000/atstk1002.c create mode 100644 kernel/arch/avr32/boards/atstk1000/atstk1003.c create mode 100644 kernel/arch/avr32/boards/atstk1000/atstk1004.c create mode 100644 kernel/arch/avr32/boards/atstk1000/flash.c create mode 100644 kernel/arch/avr32/boards/atstk1000/setup.c (limited to 'kernel/arch/avr32/boards/atstk1000') diff --git a/kernel/arch/avr32/boards/atstk1000/Kconfig b/kernel/arch/avr32/boards/atstk1000/Kconfig new file mode 100644 index 000000000..8dc48214f --- /dev/null +++ b/kernel/arch/avr32/boards/atstk1000/Kconfig @@ -0,0 +1,109 @@ +# STK1000 customization + +if BOARD_ATSTK1000 + +choice + prompt "ATSTK1000 CPU daughterboard type" + default BOARD_ATSTK1002 + +config BOARD_ATSTK1002 + bool "ATSTK1002" + select CPU_AT32AP7000 + +config BOARD_ATSTK1003 + bool "ATSTK1003" + select CPU_AT32AP7001 + +config BOARD_ATSTK1004 + bool "ATSTK1004" + select CPU_AT32AP7002 + +config BOARD_ATSTK1006 + bool "ATSTK1006" + select CPU_AT32AP7000 + +endchoice + + +config BOARD_ATSTK100X_CUSTOM + bool "Non-default STK1002/STK1003/STK1004 jumper settings" + help + You will normally leave the jumpers on the CPU card at their + default settings. If you need to use certain peripherals, + you will need to change some of those jumpers. + +if BOARD_ATSTK100X_CUSTOM + +config BOARD_ATSTK100X_SW1_CUSTOM + bool "SW1: use SSC1 (not SPI0)" + help + This also prevents using the external DAC as an audio interface, + and means you can't initialize the on-board QVGA display. + +config BOARD_ATSTK100X_SW2_CUSTOM + bool "SW2: use IRDA or TIMER0 (not UART-A, MMC/SD, and PS2-A)" + help + If you change this you'll want an updated boot loader putting + the console on UART-C not UART-A. + +config BOARD_ATSTK100X_SW3_CUSTOM + bool "SW3: use TIMER1 (not SSC0 and GCLK)" + help + This also prevents using the external DAC as an audio interface. + +config BOARD_ATSTK100X_SW4_CUSTOM + bool "SW4: use ISI/Camera (not GPIOs, SPI1, and PS2-B)" + help + To use the camera interface you'll need a custom card (on the + PCI-format connector) connect a video sensor. + +config BOARD_ATSTK1002_SW5_CUSTOM + bool "SW5: use MACB1 (not LCDC)" + depends on BOARD_ATSTK1002 + +config BOARD_ATSTK1002_SW6_CUSTOM + bool "SW6: more GPIOs (not MACB0)" + depends on BOARD_ATSTK1002 + +endif # custom + +config BOARD_ATSTK100X_SPI1 + bool "Configure SPI1 controller" + depends on !BOARD_ATSTK100X_SW4_CUSTOM + help + All the signals for the second SPI controller are available on + GPIO lines and accessed through the J1 jumper block. Say "y" + here to configure that SPI controller. + +config BOARD_ATSTK1000_J2_LED + bool + default BOARD_ATSTK1000_J2_LED8 || BOARD_ATSTK1000_J2_RGB + +choice + prompt "LEDs connected to J2:" + depends on LEDS_GPIO && !BOARD_ATSTK100X_SW4_CUSTOM + optional + help + Select this if you have jumpered the J2 jumper block to the + LED0..LED7 amber leds, or to the RGB leds, using a ten-pin + IDC cable. A default "heartbeat" trigger is provided, but + you can of course override this. + +config BOARD_ATSTK1000_J2_LED8 + bool "LED0..LED7" + help + Select this if J2 is jumpered to LED0..LED7 amber leds. + +config BOARD_ATSTK1000_J2_RGB + bool "RGB leds" + help + Select this if J2 is jumpered to the RGB leds. + +endchoice + +config BOARD_ATSTK1000_EXTDAC + bool + depends on !BOARD_ATSTK100X_SW1_CUSTOM && !BOARD_ATSTK100X_SW3_CUSTOM + default y + +endif # stk 1000 diff --git a/kernel/arch/avr32/boards/atstk1000/Makefile b/kernel/arch/avr32/boards/atstk1000/Makefile new file mode 100644 index 000000000..edecee037 --- /dev/null +++ b/kernel/arch/avr32/boards/atstk1000/Makefile @@ -0,0 +1,5 @@ +obj-y += setup.o flash.o +obj-$(CONFIG_BOARD_ATSTK1002) += atstk1002.o +obj-$(CONFIG_BOARD_ATSTK1003) += atstk1003.o +obj-$(CONFIG_BOARD_ATSTK1004) += atstk1004.o +obj-$(CONFIG_BOARD_ATSTK1006) += atstk1002.o diff --git a/kernel/arch/avr32/boards/atstk1000/atstk1000.h b/kernel/arch/avr32/boards/atstk1000/atstk1000.h new file mode 100644 index 000000000..653cc09e5 --- /dev/null +++ b/kernel/arch/avr32/boards/atstk1000/atstk1000.h @@ -0,0 +1,17 @@ +/* + * ATSTK1000 setup code: Daughterboard interface + * + * Copyright (C) 2007 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. + */ +#ifndef __ARCH_AVR32_BOARDS_ATSTK1000_ATSTK1000_H +#define __ARCH_AVR32_BOARDS_ATSTK1000_ATSTK1000_H + +extern struct atmel_lcdfb_pdata atstk1000_lcdc_data; + +void atstk1000_setup_j2_leds(void); + +#endif /* __ARCH_AVR32_BOARDS_ATSTK1000_ATSTK1000_H */ diff --git a/kernel/arch/avr32/boards/atstk1000/atstk1002.c b/kernel/arch/avr32/boards/atstk1000/atstk1002.c new file mode 100644 index 000000000..6c80aba7b --- /dev/null +++ b/kernel/arch/avr32/boards/atstk1000/atstk1002.c @@ -0,0 +1,330 @@ +/* + * ATSTK1002/ATSTK1006 daughterboard-specific init code + * + * Copyright (C) 2005-2007 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include