-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v2: Fixes from Mike Rapoport - remove unused header files (mach/dma.h and mach/nand.h) - remove tegra 1 references from Makefile.boot v2: fixes from Russell King - remove mach/io.h include from mach/iomap.h - fix whitespace in Kconfig v2: from Colin Cross - fix invalid immediate in debug-macro.S v3: - allow selection of multiple boards Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: Erik Gilling <konkers@android.com>
- Loading branch information
Erik Gilling
committed
Aug 5, 2010
1 parent
cdd854b
commit c5f8006
Showing
20 changed files
with
923 additions
and
1 deletion.
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
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,49 @@ | ||
if ARCH_TEGRA | ||
|
||
comment "NVIDIA Tegra options" | ||
|
||
choice | ||
prompt "Select Tegra processor family for target system" | ||
|
||
config ARCH_TEGRA_2x_SOC | ||
bool "Tegra 2 family" | ||
select CPU_V7 | ||
select ARM_GIC | ||
help | ||
Support for NVIDIA Tegra AP20 and T20 processors, based on the | ||
ARM CortexA9MP CPU and the ARM PL310 L2 cache controller | ||
|
||
endchoice | ||
|
||
comment "Tegra board type" | ||
|
||
config MACH_HARMONY | ||
bool "Harmony board" | ||
help | ||
Support for nVidia Harmony development platform | ||
|
||
choice | ||
prompt "Low-level debug console UART" | ||
default TEGRA_DEBUG_UART_NONE | ||
|
||
config TEGRA_DEBUG_UART_NONE | ||
bool "None" | ||
|
||
config TEGRA_DEBUG_UARTA | ||
bool "UART-A" | ||
|
||
config TEGRA_DEBUG_UARTB | ||
bool "UART-B" | ||
|
||
config TEGRA_DEBUG_UARTC | ||
bool "UART-C" | ||
|
||
config TEGRA_DEBUG_UARTD | ||
bool "UART-D" | ||
|
||
config TEGRA_DEBUG_UARTE | ||
bool "UART-E" | ||
|
||
endchoice | ||
|
||
endif |
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 += common.o | ||
obj-y += io.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,3 @@ | ||
zreladdr-$(CONFIG_ARCH_TEGRA_2x_SOC) := 0x00008000 | ||
params_phys-$(CONFIG_ARCH_TEGRA_2x_SOC) := 0x00000100 | ||
initrd_phys-$(CONFIG_ARCH_TEGRA_2x_SOC) := 0x00800000 |
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,32 @@ | ||
/* | ||
* arch/arm/mach-tegra/board.h | ||
* | ||
* Copyright (C) 2010 Google, Inc. | ||
* | ||
* Author: | ||
* Colin Cross <ccross@google.com> | ||
* Erik Gilling <konkers@google.com> | ||
* | ||
* This software is licensed under the terms of the GNU General Public | ||
* License version 2, as published by the Free Software Foundation, and | ||
* may be copied, distributed, and modified under those terms. | ||
* | ||
* 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. | ||
* | ||
*/ | ||
|
||
#ifndef __MACH_TEGRA_BOARD_H | ||
#define __MACH_TEGRA_BOARD_H | ||
|
||
#include <linux/types.h> | ||
|
||
void __init tegra_common_init(void); | ||
void __init tegra_map_common_io(void); | ||
void __init tegra_init_irq(void); | ||
void __init tegra_init_clock(void); | ||
|
||
extern struct sys_timer tegra_timer; | ||
#endif |
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,44 @@ | ||
/* | ||
* arch/arm/mach-tegra/board-harmony.c | ||
* | ||
* Copyright (C) 2010 Google, Inc. | ||
* | ||
* Author: | ||
* Colin Cross <ccross@android.com> | ||
* | ||
* This software is licensed under the terms of the GNU General Public | ||
* License version 2, as published by the Free Software Foundation, and | ||
* may be copied, distributed, and modified under those terms. | ||
* | ||
* 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. | ||
* | ||
*/ | ||
|
||
#include <linux/init.h> | ||
#include <linux/io.h> | ||
|
||
#include <asm/hardware/cache-l2x0.h> | ||
|
||
#include <mach/iomap.h> | ||
|
||
#include "board.h" | ||
|
||
void __init tegra_init_cache(void) | ||
{ | ||
#ifdef CONFIG_CACHE_L2X0 | ||
void __iomem *p = IO_ADDRESS(TEGRA_ARM_PERIF_BASE) + 0x3000; | ||
|
||
writel(0x331, p + L2X0_TAG_LATENCY_CTRL); | ||
writel(0x441, p + L2X0_DATA_LATENCY_CTRL); | ||
|
||
l2x0_init(p, 0x6C080001, 0x8200c3fe); | ||
#endif | ||
} | ||
|
||
void __init tegra_common_init(void) | ||
{ | ||
tegra_init_cache(); | ||
} |
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,30 @@ | ||
/* | ||
* arch/arm/mach-realview/include/mach/barriers.h | ||
* | ||
* Copyright (C) 2010 ARM Ltd. | ||
* Written by Catalin Marinas <catalin.marinas@arm.com> | ||
* | ||
* 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. | ||
* | ||
* 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 | ||
*/ | ||
|
||
#ifndef __MACH_BARRIERS_H | ||
#define __MACH_BARRIERS_H | ||
|
||
#include <asm/outercache.h> | ||
|
||
#define rmb() dmb() | ||
#define wmb() do { dsb(); outer_sync(); } while (0) | ||
#define mb() wmb() | ||
|
||
#endif /* __MACH_BARRIERS_H */ |
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,46 @@ | ||
/* | ||
* arch/arm/mach-tegra/include/mach/debug-macro.S | ||
* | ||
* Copyright (C) 2010 Google, Inc. | ||
* | ||
* Author: | ||
* Colin Cross <ccross@google.com> | ||
* Erik Gilling <konkers@google.com> | ||
* | ||
* This software is licensed under the terms of the GNU General Public | ||
* License version 2, as published by the Free Software Foundation, and | ||
* may be copied, distributed, and modified under those terms. | ||
* | ||
* 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. | ||
* | ||
*/ | ||
|
||
#include <mach/io.h> | ||
|
||
.macro addruart,rx, tmp | ||
mrc p15, 0, \rx, c1, c0 | ||
tst \rx, #1 @ MMU enabled? | ||
ldreq \rx, =IO_APB_PHYS @ physical | ||
ldrne \rx, =IO_APB_VIRT @ virtual | ||
#if defined(CONFIG_TEGRA_DEBUG_UART_NONE) | ||
#error "A debug UART must be selected in the kernel config to use DEBUG_LL" | ||
#elif defined(CONFIG_TEGRA_DEBUG_UARTA) | ||
orr \rx, \rx, #0x6000 | ||
#elif defined(CONFIG_TEGRA_DEBUG_UARTB) | ||
ldr \tmp, =0x6040 | ||
orr \rx, \rx, \tmp | ||
#elif defined(CONFIG_TEGRA_DEBUG_UARTC) | ||
orr \rx, \rx, #0x6200 | ||
#elif defined(CONFIG_TEGRA_DEBUG_UARTD) | ||
orr \rx, \rx, #0x6300 | ||
#elif defined(CONFIG_TEGRA_DEBUG_UARTE) | ||
orr \rx, \rx, #0x6400 | ||
#endif | ||
.endm | ||
|
||
#define UART_SHIFT 2 | ||
#include <asm/hardware/debug-8250.S> | ||
|
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,118 @@ | ||
/* arch/arm/mach-tegra/include/mach/entry-macro.S | ||
* | ||
* Copyright (C) 2009 Palm, Inc. | ||
* | ||
* This software is licensed under the terms of the GNU General Public | ||
* License version 2, as published by the Free Software Foundation, and | ||
* may be copied, distributed, and modified under those terms. | ||
* | ||
* 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. | ||
* | ||
*/ | ||
#include <mach/iomap.h> | ||
#include <mach/io.h> | ||
|
||
#if defined(CONFIG_ARM_GIC) | ||
|
||
#include <asm/hardware/gic.h> | ||
|
||
/* Uses the GIC interrupt controller built into the cpu */ | ||
#define ICTRL_BASE (IO_CPU_VIRT + 0x100) | ||
|
||
.macro disable_fiq | ||
.endm | ||
|
||
.macro get_irqnr_preamble, base, tmp | ||
movw \base, #(ICTRL_BASE & 0x0000ffff) | ||
movt \base, #((ICTRL_BASE & 0xffff0000) >> 16) | ||
.endm | ||
|
||
.macro arch_ret_to_user, tmp1, tmp2 | ||
.endm | ||
|
||
/* | ||
* The interrupt numbering scheme is defined in the | ||
* interrupt controller spec. To wit: | ||
* | ||
* Interrupts 0-15 are IPI | ||
* 16-28 are reserved | ||
* 29-31 are local. We allow 30 to be used for the watchdog. | ||
* 32-1020 are global | ||
* 1021-1022 are reserved | ||
* 1023 is "spurious" (no interrupt) | ||
* | ||
* For now, we ignore all local interrupts so only return an interrupt | ||
* if it's between 30 and 1020. The test_for_ipi routine below will | ||
* pick up on IPIs. | ||
* | ||
* A simple read from the controller will tell us the number of the | ||
* highest priority enabled interrupt. We then just need to check | ||
* whether it is in the valid range for an IRQ (30-1020 inclusive). | ||
*/ | ||
|
||
.macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
|
||
/* bits 12-10 = src CPU, 9-0 = int # */ | ||
ldr \irqstat, [\base, #GIC_CPU_INTACK] | ||
|
||
ldr \tmp, =1021 | ||
|
||
bic \irqnr, \irqstat, #0x1c00 | ||
|
||
cmp \irqnr, #29 | ||
cmpcc \irqnr, \irqnr | ||
cmpne \irqnr, \tmp | ||
cmpcs \irqnr, \irqnr | ||
|
||
.endm | ||
|
||
/* We assume that irqstat (the raw value of the IRQ acknowledge | ||
* register) is preserved from the macro above. | ||
* If there is an IPI, we immediately signal end of interrupt on the | ||
* controller, since this requires the original irqstat value which | ||
* we won't easily be able to recreate later. | ||
*/ | ||
|
||
.macro test_for_ipi, irqnr, irqstat, base, tmp | ||
bic \irqnr, \irqstat, #0x1c00 | ||
cmp \irqnr, #16 | ||
strcc \irqstat, [\base, #GIC_CPU_EOI] | ||
cmpcs \irqnr, \irqnr | ||
.endm | ||
|
||
/* As above, this assumes that irqstat and base are preserved.. */ | ||
|
||
.macro test_for_ltirq, irqnr, irqstat, base, tmp | ||
bic \irqnr, \irqstat, #0x1c00 | ||
mov \tmp, #0 | ||
cmp \irqnr, #29 | ||
moveq \tmp, #1 | ||
streq \irqstat, [\base, #GIC_CPU_EOI] | ||
cmp \tmp, #0 | ||
.endm | ||
|
||
#else | ||
/* legacy interrupt controller for AP16 */ | ||
.macro disable_fiq | ||
.endm | ||
|
||
.macro get_irqnr_preamble, base, tmp | ||
@ enable imprecise aborts | ||
cpsie a | ||
@ EVP base at 0xf010f000 | ||
mov \base, #0xf0000000 | ||
orr \base, #0x00100000 | ||
orr \base, #0x0000f000 | ||
.endm | ||
|
||
.macro arch_ret_to_user, tmp1, tmp2 | ||
.endm | ||
|
||
.macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
ldr \irqnr, [\base, #0x20] @ EVT_IRQ_STS | ||
cmp \irqnr, #0x80 | ||
.endm | ||
#endif |
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,24 @@ | ||
/* | ||
* arch/arm/mach-tegra/include/mach/hardware.h | ||
* | ||
* Copyright (C) 2010 Google, Inc. | ||
* | ||
* Author: | ||
* Colin Cross <ccross@google.com> | ||
* Erik Gilling <konkers@google.com> | ||
* | ||
* This software is licensed under the terms of the GNU General Public | ||
* License version 2, as published by the Free Software Foundation, and | ||
* may be copied, distributed, and modified under those terms. | ||
* | ||
* 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. | ||
* | ||
*/ | ||
|
||
#ifndef __MACH_TEGRA_HARDWARE_H | ||
#define __MACH_TEGRA_HARDWARE_H | ||
|
||
#endif |
Oops, something went wrong.