ARM: add Tegra support
This patch adds basic support for Nvidia Tegra2 platform.
From 13fac106b9383478a3337e443a946286998536d7 Mon Sep 17 00:00:00 2001
From: Mike Rapoport <[email protected]>
Date: Tue, 9 Mar 2010 18:35:45 +0200
Subject: [PATCH] ARM: add Tegra support
--- arch/arm/Kconfig | 13 + arch/arm/Makefile | 1 + arch/arm/mach-tegra/Kconfig | 27 + arch/arm/mach-tegra/Makefile | 12 + arch/arm/mach-tegra/Makefile.boot | 1 + arch/arm/mach-tegra/board-harmony.c | 93 +++ arch/arm/mach-tegra/clock.c | 105 +++ arch/arm/mach-tegra/clock.h | 84 +++ arch/arm/mach-tegra/common.h | 26 + arch/arm/mach-tegra/gpio.c | 335 ++++++++++ arch/arm/mach-tegra/include/mach/clkdev.h | 29 + arch/arm/mach-tegra/include/mach/debug-macro.S | 29 + arch/arm/mach-tegra/include/mach/entry-macro.S | 113 ++++ arch/arm/mach-tegra/include/mach/gpio.h | 44 ++ arch/arm/mach-tegra/include/mach/hardware.h | 58 ++ arch/arm/mach-tegra/include/mach/io.h | 35 + arch/arm/mach-tegra/include/mach/irqs.h | 169 +++++ arch/arm/mach-tegra/include/mach/memory.h | 24 + arch/arm/mach-tegra/include/mach/system.h | 34 + arch/arm/mach-tegra/include/mach/tegra.h | 110 ++++ arch/arm/mach-tegra/include/mach/timex.h | 22 + arch/arm/mach-tegra/include/mach/uncompress.h | 46 ++ arch/arm/mach-tegra/include/mach/vmalloc.h | 22 + arch/arm/mach-tegra/io.c | 73 +++ arch/arm/mach-tegra/irq.c | 31 + arch/arm/mach-tegra/tegra2_clocks.c | 809 ++++++++++++++++++++++++ arch/arm/mach-tegra/timer.c | 182 ++++++ 27 files changed, 2527 insertions(+), 0 deletions(-)
create mode 100644 arch/arm/mach-tegra/Kconfig
create mode 100644 arch/arm/mach-tegra/Makefile
create mode 100644 arch/arm/mach-tegra/Makefile.boot create mode 100644 arch/arm/mach-tegra/board-harmony.c create mode 100644 arch/arm/mach-tegra/clock.c
create mode 100644 arch/arm/mach-tegra/clock.h
create mode 100644 arch/arm/mach-tegra/common.h
create mode 100644 arch/arm/mach-tegra/gpio.c
create mode 100644 arch/arm/mach-tegra/include/mach/clkdev.h create mode 100644 arch/arm/mach-tegra/include/mach/debug-macro.S create mode 100644 arch/arm/mach-tegra/include/mach/entry-macro.S create mode 100644 arch/arm/mach-tegra/include/mach/gpio.h create mode 100644 arch/arm/mach-tegra/include/mach/hardware.h create mode 100644 arch/arm/mach-tegra/include/mach/io.h create mode 100644 arch/arm/mach-tegra/include/mach/irqs.h create mode 100644 arch/arm/mach-tegra/include/mach/memory.h create mode 100644 arch/arm/mach-tegra/include/mach/system.h create mode 100644 arch/arm/mach-tegra/include/mach/tegra.h create mode 100644 arch/arm/mach-tegra/include/mach/timex.h create mode 100644 arch/arm/mach-tegra/include/mach/uncompress.h create mode 100644 arch/arm/mach-tegra/include/mach/vmalloc.h create mode 100644 arch/arm/mach-tegra/io.c
create mode 100644 arch/arm/mach-tegra/irq.c
create mode 100644 arch/arm/mach-tegra/tegra2_clocks.c create mode 100644 arch/arm/mach-tegra/timer.c
arch/arm/Kconfig +13 -0
@@ -750,6 +750,17 @@ config ARCH_U8500 help Support for ST-Ericsson's Ux500 architecture +config ARCH_TEGRA + bool "NVIDIA Tegra" + select GENERIC_TIME + select GENERIC_CLOCKEVENTS + select GENERIC_GPIO + select HAVE_CLK + select COMMON_CLKDEV + help + This enables support for NVIDIA Tegra based systems (Tegra APX, + Tegra 6xx and Tegra 2 series). + endchoice source "arch/arm/mach-aaec2000/Kconfig"
@@ -852,6 +863,8 @@ if ARCH_S5PC1XX source "arch/arm/mach-s5pc100/Kconfig" endif +source "arch/arm/mach-tegra/Kconfig" + source "arch/arm/mach-u300/Kconfig" source "arch/arm/mach-ux500/Kconfig"
arch/arm/Makefile +1 -0
@@ -167,6 +167,7 @@ machine-$(CONFIG_ARCH_SA1100) := sa1100 machine-$(CONFIG_ARCH_SHARK) := shark machine-$(CONFIG_ARCH_STMP378X) := stmp378x machine-$(CONFIG_ARCH_STMP37XX) := stmp37xx +machine-$(CONFIG_ARCH_TEGRA) := tegra machine-$(CONFIG_ARCH_U300) := u300 machine-$(CONFIG_ARCH_U8500) := ux500 machine-$(CONFIG_ARCH_VERSATILE) := versatile
arch/arm/mach-tegra/Kconfig new file +27 -0
@@ -0,0 +1,27 @@ +if ARCH_TEGRA + +comment "NVIDIA Tegra options" + +choice + prompt "Tegra processor family" + +config ARCH_TEGRA_2x_SOC + bool "Tegra 2 family" + select CPU_V7 + select ARM_GIC + select ARCH_REQUIRE_GPIOLIB + 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-based boards" + +config MACH_HARMONY + bool "Harmony board" + help + Support for nVidia Harmony development platform + +endif
arch/arm/mach-tegra/Makefile new file +12 -0
@@ -0,0 +1,12 @@ +# +# Makefile for the linux kernel. +# + +# Common support +obj-y += irq.o io.o + +# SoC-specific support +obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += clock.o tegra2_clocks.o timer.o gpio.o + +# Board-specific support +obj-$(CONFIG_MACH_HARMONY) += board-harmony.o
arch/arm/mach-tegra/Makefile.boot new file +1 -0
@@ -0,0 +1 @@ +zreladdr-y := 0x00008000
arch/arm/mach-tegra/board-harmony.c new file +93 -0
93 lines not on this page · raw message
arch/arm/mach-tegra/clock.c new file +105 -0
105 lines not on this page · raw message
arch/arm/mach-tegra/clock.h new file +84 -0
84 lines not on this page · raw message
arch/arm/mach-tegra/common.h new file +26 -0
@@ -0,0 +1,26 @@ +/* +* arch/arm/mach-tegra/include/mach/board.h +* +* Copyright (C) 2010 Google, 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. +* +*/ + +#ifndef __MACH_TEGRA_BOARD_H +#define __MACH_TEGRA_BOARD_H + +extern struct sys_timer tegra_timer; + +void __init tegra_map_common_io (void ); +void __init tegra_init_irq (void ); +void __init tegra_init_clock (void ); + +#endif
arch/arm/mach-tegra/gpio.c new file +335 -0
335 lines not on this page · raw message
arch/arm/mach-tegra/include/mach/clkdev.h new file +29 -0
@@ -0,0 +1,29 @@ +/* +* arch/arm/mach-tegra/include/mach/clkdev.h +* +* Copyright (C) 2010 Google, 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. +* +*/ + +#ifndef __MACH_CLKDEV_H +#define __MACH_CLKDEV_H + +static inline int __clk_get (struct clk *clk) +{ +return 1 ; +} + +static inline void __clk_put (struct clk *clk) +{ +} + +#endif
arch/arm/mach-tegra/include/mach/debug-macro.S new file +29 -0
@@ -0,0 +1,29 @@ +/* + * arch/arm/mach-tegra/include/mach/debug-macro.S + * + * Copyright (C) 2010 Google, 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/hardware.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 + orr \rx, \rx, #0x6300 @ UART D + .endm + +#define UART_SHIFT 2 +#include <asm/hardware/debug-8250.S> +
arch/arm/mach-tegra/include/mach/entry-macro.S new file +113 -0
113 lines not on this page · raw message
arch/arm/mach-tegra/include/mach/gpio.h new file +44 -0
44 lines not on this page · raw message
arch/arm/mach-tegra/include/mach/hardware.h new file +58 -0
58 lines not on this page · raw message
arch/arm/mach-tegra/include/mach/io.h new file +35 -0
@@ -0,0 +1,35 @@ +/* +* arch/arm/mach-tegra/include/mach/io.h +* +* Copyright (C) 2010 Google, 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. +* +*/ + +#ifndef __MACH_TEGRA_IO_H +#define __MACH_TEGRA_IO_H + +#define IO_SPACE_LIMIT 0xffffffff + +#define __io (a) __typesafe_io(a) +#define __mem_pci (a) (a) + +#ifndef __ASSEMBLER__ + +#define __arch_ioremap (p, s, t) tegra_ioremap(p, s, t) +#define __arch_iounmap (v) tegra_iounmap(v) + +void __iomem *tegra_ioremap (unsigned long phys,size_t size,unsigned int type); +void tegra_iounmap (volatile void __iomem *addr); + +#endif + +#endif
arch/arm/mach-tegra/include/mach/irqs.h new file +169 -0
169 lines not on this page · raw message
arch/arm/mach-tegra/include/mach/memory.h new file +24 -0
@@ -0,0 +1,24 @@ +/* +* arch/arm/mach-tegra/include/mach/memory.h +* +* Copyright (C) 2010 Google, 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. +* +*/ + +#ifndef __MACH_TEGRA_MEMORY_H +#define __MACH_TEGRA_MEMORY_H + +/* physical offset of RAM */ +#define PHYS_OFFSET UL(0) + +#endif +
arch/arm/mach-tegra/include/mach/system.h new file +34 -0
@@ -0,0 +1,34 @@ +/* +* arch/arm/mach-tegra/include/mach/system.h +* +* Copyright (C) 2010 Google, 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. +* +*/ + +#ifndef __MACH_TEGRA_SYSTEM_H +#define __MACH_TEGRA_SYSTEM_H + +#include <mach/hardware.h> + +static inline void arch_idle (void ) +{ +} + +static inline void arch_reset (char mode,const char *cmd) +{ +void __iomem *reset =IO_ADDRESS (TEGRA_CLK_RESET_BASE +0x04 ); +u32 reg =readl (reset); + reg |=0x04 ; +writel (reg, reset); +} + +#endif
arch/arm/mach-tegra/include/mach/tegra.h new file +110 -0
110 lines not on this page · raw message
arch/arm/mach-tegra/include/mach/timex.h new file +22 -0
@@ -0,0 +1,22 @@ +/* +* arch/arm/mach-tegra/include/mach/timex.h +* +* Copyright (C) 2010 Google, 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. +* +*/ + +#ifndef __MACH_TEGRA_TIMEX_H +#define __MACH_TEGRA_TIMEX_H + +#define CLOCK_TICK_RATE 1000000 + +#endif
arch/arm/mach-tegra/include/mach/uncompress.h new file +46 -0
46 lines not on this page · raw message
arch/arm/mach-tegra/include/mach/vmalloc.h new file +22 -0
@@ -0,0 +1,22 @@ +/* +* arch/arm/mach-tegra/include/mach/vmalloc.h +* +* Copyright (C) 2010 Google, 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. +* +*/ + +#ifndef __MACH_TEGRA_VMALLOC_H +#define __MACH_TEGRA_VMALLOC_H + +#define VMALLOC_END ((PAGE_OFFSET) + 0x38000000) + +#endif
arch/arm/mach-tegra/io.c new file +73 -0
73 lines not on this page · raw message
arch/arm/mach-tegra/irq.c new file +31 -0
@@ -0,0 +1,31 @@ +/* +* arch/arm/mach-tegra/irq.c +* +* Copyright (C) 2010 Google, 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 <linux/kernel.h> +#include <linux/irq.h> + +#include <asm/hardware/gic.h> + +#include <mach/hardware.h> + +#include "common.h" + +void __init tegra_init_irq (void ) +{ +gic_dist_init (0 ,IO_ADDRESS (TEGRA_ARM_INT_DIST_BASE ),29 ); +gic_cpu_init (0 ,IO_ADDRESS (TEGRA_ARM_PERIF_BASE +0x100 )); +tegra_init_clock (); +}
arch/arm/mach-tegra/tegra2_clocks.c new file +809 -0
809 lines not on this page · raw message
arch/arm/mach-tegra/timer.c new file +182 -0
182 lines not on this page · raw message
Signature · 8 lines
1.6.4.4 -- Sincerely yours, Mike.
Quoted 9 lines · Mike Rapoport
This patch adds basic support for Nvidia Tegra2 platform.
From
13fac106b9383478a3337e443a946286998536d7Mon Sep 17 00:00:00 2001
From: Mike Rapoport <[email protected]>
Date: Tue, 9 Mar 2010 18:35:45 +0200
Subject: [PATCH] ARM: add Tegra supportSigned-off-by Mike Rapoport <[email protected]>---
Any comments on this?
Signature · 2 lines
Sincerely yours, Mike.
Quoted 8 lines · Mike Rapoport
Quoted 7 lines · Mike Rapoport
This patch adds basic support for Nvidia Tegra2 platform.
From
13fac106b9383478a3337e443a946286998536d7Mon Sep 17 00:00:00 2001
From: Mike Rapoport <[email protected]>
Date: Tue, 9 Mar 2010 18:35:45 +0200
Subject: [PATCH] ARM: add Tegra support
Quoted 4 lines
Quoted 2 lines
Signed-off-by Mike Rapoport <[email protected]>---
Any comments on this?
I like it. I will try to get around to test this today.
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100315/116fea53/attachment.sig>
Quoted 9 lines · Thierry Reding
Quoted 8 lines · Mike Rapoport
Quoted 7 lines · Mike Rapoport
This patch adds basic support for Nvidia Tegra2 platform.
From
13fac106b9383478a3337e443a946286998536d7Mon Sep 17 00:00:00 2001
From: Mike Rapoport <[email protected]>
Date: Tue, 9 Mar 2010 18:35:45 +0200
Subject: [PATCH] ARM: add Tegra support
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
Signed-off-by Mike Rapoport <[email protected]>---
Any comments on this?
I like it. I will try to get around to test this today.
So this seems to work well. I'm able to boot a kernel built with this patch and run a basic initial ramdisk. Do you have any kind of roadmap of what you are currently working on? I'd rather not duplicate any work you're already doing.
Thierry
Hi Mike,
Hopefully I've quoted enough context to associate the comments below back to their original source:
arch/arm/mach-tegra/clock.c line 51
Quoted 7 lines
arch/arm/mach-tegra/clock.c new file +4
-0+ } + } + c->refcnt++; +err:
The reference counting in this file is not thread safe.
arch/arm/mach-tegra/tegra2_clocks.c line 102
Quoted 11 lines
arch/arm/mach-tegra/tegra2_clocks.c new file +7
-0+/* clk_m functions */ +static unsigned long tegra2_clk_m_autodetect_rate (struct clk *c) +{ +u32 clk_autodetect; +u32 auto_clk_ctl =clk_readl (0x50 ) & ~(3 <<30 ); + +}
The switch statement here doesn't provide enough tolerance for variability in the source oscillator or crystal; there should be a range of +-2-3 units to cover variability & jitter.
arch/arm/mach-tegra/gpio.c line 149
Quoted 8 lines
arch/arm/mach-tegra/gpio.c new file +5
-0+static int tegra_gpio_irq_set_type (unsigned int irq,unsigned int type) +{ +int gpio = irq -INT_GPIO_BASE ; +struct tegra_gpio_bank *bank =get_irq_data (irq); +int port =GPIO_PORT (gpio);
This should be get_irq_chip_data(irq)
arch/arm/mach-tegra/include/mach/uncompress.h line 27
Quoted 8 lines
arch/arm/mach-tegra/include/mach/uncompress.h new file +5
-0+ +static void putc (int c) +{ +volatile u8 *uart = (volatile u8 *)(TEGRA_UARTD_BASE ); +int shift =2 ;
UARTD as the serial console is Harmony-specific; the specific UART should either be protected by a MACH_HARMONY ifdef or hoisted to a MACH_HARMONY-only header-file.
arch/arm/mach-tegra/include/mach/debug-macro.S line 25
Quoted 6 lines
arch/arm/mach-tegra/include/mach/debug-macro.S new file +3
-0+ ldrne \rx, =IO_APB_VIRT @ virtual + orr \rx, \rx, #0x6300 @ UART D + .endm
Same comment as above re: UARTD.
- Gary
-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
Quoted 9 lines · Mike Rapoport
arch/arm/Kconfig +1
-0@@ -750,6 +750,17 @@ config ARCH_U8500 help Support for ST-Ericsson's Ux500 architecture +config ARCH_TEGRA
arch/arm/Kconfig config ARCH_U8500 · line 763
Quoted 10 lines
arch/arm/Kconfig +10
-0+ bool "NVIDIA Tegra" + select GENERIC_TIME + select GENERIC_CLOCKEVENTS + select GENERIC_GPIO + select HAVE_CLK + select COMMON_CLKDEV + help + This enables support for NVIDIA Tegra based systems (Tegra APX, + Tegra 6xx and Tegra 2 series). +
Please don't blindly add to the end of a sorted list; this causes disgusting merge conflicts. Please add to the correct place in the list instead.
"NVIDIA" belongs after "Nuvoton NUC93X CPU" but before "Philips Nexperia PNX4008 Mobile".
arch/arm/Kconfig config ARCH_U8500 · line 766
Quoted 3 lines
arch/arm/Kconfig +3
-0+static struct platform_device debug_uart = { + .name = "serial8250", + .id = 0,
PLAT8250_DEV_xxx please.
arch/arm/Kconfig config ARCH_U8500
Quoted 8 lines
arch/arm/Kconfig +8
-0+static void __init tegra_harmony_fixup(struct machine_desc *desc, + struct tag *tags, + char **cmdline, struct meminfo *mi) +{ + mi->nr_banks = 2; + mi->bank[0].start = PHYS_OFFSET; + mi->bank[0].node = PHYS_TO_NID(PHYS_OFFSET); + mi->bank[0].size = (448*1024*1024);
Parens aren't required.
Quoted 16 lines
arch/arm/mach-tegra/include/mach/vmalloc.h new file +10
-0@@ -0,0 +1,22 @@ +/* +* arch/arm/mach-tegra/include/mach/vmalloc.h +* +* Copyright (C) 2010 Google, 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,
arch/arm/mach-tegra/include/mach/vmalloc.h line 20
Quoted 10 lines
arch/arm/mach-tegra/include/mach/vmalloc.h new file +10
-0+* 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_VMALLOC_H +#define __MACH_TEGRA_VMALLOC_H + +#define VMALLOC_END ((PAGE_OFFSET) + 0x38000000)
So if PAGE_OFFSET were to be 0xe0000000, this would still be valid? And what if PAGE_OFFSET were 0x80000000 ?
Wouldn't it be better to define it in terms of the maximum address as defined by the hardware maps - so that selecting 2GB of userspace gives you more kernel space?
Quoted 1 line · Mike Rapoport
This patch adds basic support for Nvidia Tegra2 platform.
This code seems to be our port fromgit://android.git.kernel.org/kernel/tegra.git with some features removed, minor cleanups, and many trivial changes. These changes make it difficult for us to track improvements and bug fixes in either direction. We're happy that other people are interested in our work however are disappointed that our opinions were not sought before making these changes and posting nor was any attribution given to the work's authors.
We're still in the process here at Google of cleaning up the port for submission. We should have our changes rebased on 34-rc1 without the android-common code by the end of the day. We've been maintaining a patchstack which separates out the functional subsystems. Would people here prefer to see that or a collapsed patch like this one.
Specific issues with this patch with respect to our work:
Lots of trival changes like moving files around, renaming variables, and re-wording/re-formating comments (sometimes changing the meaning of the comment incorrectly)
Removal of SMP, L2 cache, and pinmux support.
Removal of the gpio_names header. Because tegra does not define GPIOs numerically, it is impossible to convert a gpio name (i.e. PN6) from a schematic to a GPIO number without consulting and interpreting the datasheet.
Removal of the tegra_gpio_enable and tegra_gpio_disable functions. Because of the way pin muxing is implemented in tegra, gpio configuration does not map into the pinmuxing subsystem.
Removal of pr_debug lines from the clock code.
Changing the way peripheral clocks are defined to use two separate tables which are required to be kept in sync by hand.
Removal of some pll entries.
-Erik
cover Tegra2 support
Here's the cleaned up patch stack as promised. We've incorporated the feedback from Gary and Russel.
I've pushed these patches to the linux-tegra-2.6.34-rc1 branch atgit://android.git.kernel.org/kernel/tegra.git
Cheers,
Erik
PATCH 1/10 tegra: initial tegra support
From: Erik Gilling <[email protected]>
--- arch/arm/Kconfig | 13 ++ arch/arm/Makefile | 1 + arch/arm/mach-tegra/Kconfig | 53 ++++++ arch/arm/mach-tegra/Makefile | 2 + arch/arm/mach-tegra/Makefile.boot | 7 + arch/arm/mach-tegra/board.h | 32 ++++ arch/arm/mach-tegra/common.c | 44 +++++ arch/arm/mach-tegra/include/mach/barriers.h | 30 ++++ arch/arm/mach-tegra/include/mach/debug-macro.S | 45 +++++ arch/arm/mach-tegra/include/mach/dma.h | 24 +++ arch/arm/mach-tegra/include/mach/entry-macro.S | 118 ++++++++++++++ arch/arm/mach-tegra/include/mach/hardware.h | 24 +++ arch/arm/mach-tegra/include/mach/io.h | 79 +++++++++ arch/arm/mach-tegra/include/mach/iomap.h | 204 ++++++++++++++++++++++++ arch/arm/mach-tegra/include/mach/memory.h | 28 ++++ arch/arm/mach-tegra/include/mach/nand.h | 54 +++++++ arch/arm/mach-tegra/include/mach/system.h | 39 +++++ arch/arm/mach-tegra/include/mach/timex.h | 26 +++ arch/arm/mach-tegra/include/mach/uncompress.h | 78 +++++++++ arch/arm/mach-tegra/include/mach/vmalloc.h | 28 ++++ arch/arm/mach-tegra/io.c | 78 +++++++++ arch/arm/mm/Kconfig | 2 +- 22 files changed, 1008 insertions(+), 1 deletions(-) create mode 100644 arch/arm/mach-tegra/Kconfig create mode 100644 arch/arm/mach-tegra/Makefile create mode 100644 arch/arm/mach-tegra/Makefile.boot create mode 100644 arch/arm/mach-tegra/board.h create mode 100644 arch/arm/mach-tegra/common.c create mode 100644 arch/arm/mach-tegra/include/mach/barriers.h create mode 100644 arch/arm/mach-tegra/include/mach/debug-macro.S create mode 100644 arch/arm/mach-tegra/include/mach/dma.h create mode 100644 arch/arm/mach-tegra/include/mach/entry-macro.S create mode 100644 arch/arm/mach-tegra/include/mach/hardware.h create mode 100644 arch/arm/mach-tegra/include/mach/io.h create mode 100644 arch/arm/mach-tegra/include/mach/iomap.h create mode 100644 arch/arm/mach-tegra/include/mach/memory.h create mode 100644 arch/arm/mach-tegra/include/mach/nand.h create mode 100644 arch/arm/mach-tegra/include/mach/system.h create mode 100644 arch/arm/mach-tegra/include/mach/timex.h create mode 100644 arch/arm/mach-tegra/include/mach/uncompress.h create mode 100644 arch/arm/mach-tegra/include/mach/vmalloc.h create mode 100644 arch/arm/mach-tegra/io.c
arch/arm/Kconfig +13 -0
@@ -570,6 +570,17 @@ config ARCH_NUC93X Support for Nuvoton (Winbond logic dept.) NUC93X MCU,The NUC93X is a low-power and high performance MPEG-4/JPEG multimedia controller chip. +config ARCH_TEGRA + bool "NVIDIA Tegra" + select GENERIC_TIME + select GENERIC_CLOCKEVENTS + select GENERIC_GPIO + select HAVE_CLK + select ARCH_HAS_BARRIERS if CACHE_L2X0 + help + This enables support for NVIDIA Tegra based systems (Tegra APX, + Tegra 6xx and Tegra 2 series). + config ARCH_PNX4008 bool "Philips Nexperia PNX4008 Mobile" select CPU_ARM926T
@@ -852,6 +863,8 @@ if ARCH_S5PC1XX source "arch/arm/mach-s5pc100/Kconfig" endif +source "arch/arm/mach-tegra/Kconfig" + source "arch/arm/mach-u300/Kconfig" source "arch/arm/mach-ux500/Kconfig"
arch/arm/Makefile +1 -0
@@ -167,6 +167,7 @@ machine-$(CONFIG_ARCH_SA1100) := sa1100 machine-$(CONFIG_ARCH_SHARK) := shark machine-$(CONFIG_ARCH_STMP378X) := stmp378x machine-$(CONFIG_ARCH_STMP37XX) := stmp37xx +machine-$(CONFIG_ARCH_TEGRA) := tegra machine-$(CONFIG_ARCH_U300) := u300 machine-$(CONFIG_ARCH_U8500) := ux500 machine-$(CONFIG_ARCH_VERSATILE) := versatile
arch/arm/mach-tegra/Kconfig new file +53 -0
53 lines not on this page · raw message
arch/arm/mach-tegra/Makefile new file +2 -0
@@ -0,0 +1,2 @@ +obj-y += common.o +obj-y += io.o
arch/arm/mach-tegra/Makefile.boot new file +7 -0
@@ -0,0 +1,7 @@ +zreladdr-$(CONFIG_ARCH_TEGRA_1x_SOC) := 0x00008000 +params_phys-$(CONFIG_ARCH_TEGRA_1x_SOC) := 0x00000100 +initrd_phys-$(CONFIG_ARCH_TEGRA_1x_SOC) := 0x00800000 + +zreladdr-$(CONFIG_ARCH_TEGRA_2x_SOC) := 0x00008000 +params_phys-$(CONFIG_ARCH_TEGRA_2x_SOC) := 0x00000100 +initrd_phys-$(CONFIG_ARCH_TEGRA_2x_SOC) := 0x00800000
arch/arm/mach-tegra/board.h new file +32 -0
@@ -0,0 +1,32 @@ +/* +* arch/arm/mach-tegra/board.h +* +* Copyright (C) 2010 Google, Inc. +* +* Author: +* Colin Cross <[email protected]> +* Erik Gilling <[email protected]> +* +* 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
arch/arm/mach-tegra/common.c new file +44 -0
44 lines not on this page · raw message
arch/arm/mach-tegra/include/mach/barriers.h new file +30 -0
@@ -0,0 +1,30 @@ +/* +* arch/arm/mach-realview/include/mach/barriers.h +* +* Copyright (C) 2010 ARM Ltd. +* Written by Catalin Marinas <[email protected]> +* +* 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 */
arch/arm/mach-tegra/include/mach/debug-macro.S new file +45 -0
45 lines not on this page · raw message
arch/arm/mach-tegra/include/mach/dma.h new file +24 -0
@@ -0,0 +1,24 @@ +/* +* arch/arm/mach-tegra/include/mach/dma.h +* +* Copyright (C) 2010 Google, Inc. +* +* Author: +* Colin Cross <[email protected]> +* Erik Gilling <[email protected]> +* +* 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_DMA_H +#define __MACH_TEGRA_DMA_H + +#endif
arch/arm/mach-tegra/include/mach/entry-macro.S new file +118 -0
118 lines not on this page · raw message
arch/arm/mach-tegra/include/mach/hardware.h new file +24 -0
@@ -0,0 +1,24 @@ +/* +* arch/arm/mach-tegra/include/mach/hardware.h +* +* Copyright (C) 2010 Google, Inc. +* +* Author: +* Colin Cross <[email protected]> +* Erik Gilling <[email protected]> +* +* 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
arch/arm/mach-tegra/include/mach/io.h new file +79 -0
79 lines not on this page · raw message
arch/arm/mach-tegra/include/mach/iomap.h new file +204 -0
204 lines not on this page · raw message
arch/arm/mach-tegra/include/mach/memory.h new file +28 -0
@@ -0,0 +1,28 @@ +/* +* arch/arm/mach-tegra/include/mach/memory.h +* +* Copyright (C) 2010 Google, Inc. +* +* Author: +* Colin Cross <[email protected]> +* Erik Gilling <[email protected]> +* +* 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_MEMORY_H +#define __MACH_TEGRA_MEMORY_H + +/* physical offset of RAM */ +#define PHYS_OFFSET UL(0) + +#endif +
arch/arm/mach-tegra/include/mach/nand.h new file +54 -0
54 lines not on this page · raw message
arch/arm/mach-tegra/include/mach/system.h new file +39 -0
@@ -0,0 +1,39 @@ +/* +* arch/arm/mach-tegra/include/mach/system.h +* +* Copyright (C) 2010 Google, Inc. +* +* Author: +* Colin Cross <[email protected]> +* Erik Gilling <[email protected]> +* +* 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_SYSTEM_H +#define __MACH_TEGRA_SYSTEM_H + +#include <mach/hardware.h> +#include <mach/iomap.h> + +static inline void arch_idle (void ) +{ +} + +static inline void arch_reset (char mode,const char *cmd) +{ +void __iomem *reset =IO_ADDRESS (TEGRA_CLK_RESET_BASE +0x04 ); +u32 reg =readl (reset); + reg |=0x04 ; +writel (reg, reset); +} + +#endif
arch/arm/mach-tegra/include/mach/timex.h new file +26 -0
@@ -0,0 +1,26 @@ +/* +* arch/arm/mach-tegra/include/mach/timex.h +* +* Copyright (C) 2010 Google, Inc. +* +* Author: +* Colin Cross <[email protected]> +* Erik Gilling <[email protected]> +* +* 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_TIMEX_H +#define __MACH_TEGRA_TIMEX_H + +#define CLOCK_TICK_RATE 1000000 + +#endif
arch/arm/mach-tegra/include/mach/uncompress.h new file +78 -0
78 lines not on this page · raw message
arch/arm/mach-tegra/include/mach/vmalloc.h new file +28 -0
@@ -0,0 +1,28 @@ +/* +* arch/arm/mach-tegra/include/mach/vmalloc.h +* +* Copyright (C) 2010 Google, Inc. +* +* Author: +* Colin Cross <[email protected]> +* Erik Gilling <[email protected]> +* +* 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_VMALLOC_H +#define __MACH_TEGRA_VMALLOC_H + +#include <asm/sizes.h> + +#define VMALLOC_END 0xFE000000 + +#endif
arch/arm/mach-tegra/io.c new file +78 -0
78 lines not on this page · raw message
arch/arm/mm/Kconfig +1 -1
@@ -754,7 +754,7 @@ config CACHE_FEROCEON_L2_WRITETHROUGH config CACHE_L2X0 bool "Enable the L2x0 outer cache controller" depends on REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP || MACH_REALVIEW_PB1176 || \ - REALVIEW_EB_A9MP || ARCH_MX35 || ARCH_MX31 || MACH_REALVIEW_PBX || ARCH_NOMADIK || ARCH_OMAP4 + REALVIEW_EB_A9MP || ARCH_MX35 || ARCH_MX31 || MACH_REALVIEW_PBX || ARCH_NOMADIK || ARCH_OMAP4 || ARCH_TEGRA default y select OUTER_CACHE help
Signature · 1 line
1.6.5.6
PATCH 2/10 tegra: Add IRQ support
From: Erik Gilling <[email protected]>
--- arch/arm/mach-tegra/Makefile | 1 + arch/arm/mach-tegra/include/mach/irqs.h | 173 +++++++++++++++++++++++++++++++ arch/arm/mach-tegra/irq.c | 34 ++++++ 3 files changed, 208 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-tegra/include/mach/irqs.h create mode 100644 arch/arm/mach-tegra/irq.c
arch/arm/mach-tegra/Makefile +1 -0
@@ -1,2 +1,3 @@ obj-y += common.o obj-y += io.o +obj-y += irq.o
arch/arm/mach-tegra/include/mach/irqs.h new file +173 -0
173 lines not on this page · raw message
arch/arm/mach-tegra/irq.c new file +34 -0
@@ -0,0 +1,34 @@ +/* +* Copyright (C) 2010 Google, Inc. +* +* Author: +* Colin Cross <[email protected]> +* +* 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/kernel.h> +#include <linux/init.h> +#include <linux/interrupt.h> +#include <linux/irq.h> +#include <asm/hardware/gic.h> +#include <asm/io.h> + +#include <mach/io.h> +#include <mach/iomap.h> + +#include "board.h" + +void __init tegra_init_irq (void ) +{ +gic_dist_init (0 ,IO_ADDRESS (TEGRA_ARM_INT_DIST_BASE ),29 ); +gic_cpu_init (0 ,IO_ADDRESS (TEGRA_ARM_PERIF_BASE +0x100 )); +}
Signature · 1 line
1.6.5.6
PATCH 3/10 tegra: Add clock support
From: Colin Cross <[email protected]>
--- arch/arm/Kconfig | 1 + arch/arm/mach-tegra/Makefile | 2 + arch/arm/mach-tegra/clock.c | 191 +++++++ arch/arm/mach-tegra/clock.h | 103 ++++ arch/arm/mach-tegra/common.c | 1 + arch/arm/mach-tegra/include/mach/clkdev.h | 32 ++ arch/arm/mach-tegra/tegra2_clocks.c | 837 +++++++++++++++++++++++++++++ 7 files changed, 1167 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-tegra/clock.c create mode 100644 arch/arm/mach-tegra/clock.h create mode 100644 arch/arm/mach-tegra/include/mach/clkdev.h create mode 100644 arch/arm/mach-tegra/tegra2_clocks.c
arch/arm/Kconfig +1 -0
@@ -576,6 +576,7 @@ config ARCH_TEGRA select GENERIC_CLOCKEVENTS select GENERIC_GPIO select HAVE_CLK + select COMMON_CLKDEV select ARCH_HAS_BARRIERS if CACHE_L2X0 help This enables support for NVIDIA Tegra based systems (Tegra APX,
arch/arm/mach-tegra/Makefile +2 -0
@@ -1,3 +1,5 @@ obj-y += common.o obj-y += io.o obj-y += irq.o +obj-y += clock.o +obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra2_clocks.o
arch/arm/mach-tegra/clock.c new file +191 -0
191 lines not on this page · raw message
arch/arm/mach-tegra/clock.h new file +103 -0
103 lines not on this page · raw message
arch/arm/mach-tegra/common.c +1 -0
@@ -40,5 +40,6 @@ void __init tegra_init_cache(void)void __init tegra_common_init (void ) { +tegra_init_clock ();tegra_init_cache (); }
arch/arm/mach-tegra/include/mach/clkdev.h new file +32 -0
@@ -0,0 +1,32 @@ +/* +* arch/arm/mach-tegra/include/mach/clkdev.h +* +* Copyright (C) 2010 Google, Inc. +* +* Author: +* Colin Cross <[email protected]> +* +* 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_CLKDEV_H +#define __MACH_CLKDEV_H + +static inline int __clk_get (struct clk *clk) +{ +return 1 ; +} + +static inline void __clk_put (struct clk *clk) +{ +} + +#endif
arch/arm/mach-tegra/tegra2_clocks.c new file +837 -0
837 lines not on this page · raw message
Signature · 1 line
1.6.5.6
PATCH 4/10 tegra: SMP support
From: Colin Cross <[email protected]>
--- arch/arm/Kconfig | 12 ++- arch/arm/mach-tegra/Makefile | 2 + arch/arm/mach-tegra/headsmp.S | 61 +++++++++++++ arch/arm/mach-tegra/hotplug.c | 140 ++++++++++++++++++++++++++++ arch/arm/mach-tegra/include/mach/smp.h | 30 ++++++ arch/arm/mach-tegra/localtimer.c | 25 +++++ arch/arm/mach-tegra/platsmp.c | 156 ++++++++++++++++++++++++++++++++ 7 files changed, 422 insertions(+), 4 deletions(-) create mode 100644 arch/arm/mach-tegra/headsmp.S create mode 100644 arch/arm/mach-tegra/hotplug.c create mode 100644 arch/arm/mach-tegra/include/mach/smp.h create mode 100644 arch/arm/mach-tegra/localtimer.c create mode 100644 arch/arm/mach-tegra/platsmp.c
arch/arm/Kconfig +8 -4
@@ -1045,10 +1045,12 @@ source "kernel/time/Kconfig" config SMP bool "Symmetric Multi-Processing (EXPERIMENTAL)" depends on EXPERIMENTAL && (REALVIEW_EB_ARM11MP || REALVIEW_EB_A9MP ||\ - MACH_REALVIEW_PB11MP || MACH_REALVIEW_PBX || ARCH_OMAP4 || ARCH_U8500) + MACH_REALVIEW_PB11MP || MACH_REALVIEW_PBX || ARCH_OMAP4 || \ + ARCH_U8500 || ARCH_TEGRA) depends on GENERIC_CLOCKEVENTS select USE_GENERIC_SMP_HELPERS - select HAVE_ARM_SCU if (ARCH_REALVIEW || ARCH_OMAP4 || ARCH_U8500) + select HAVE_ARM_SCU if (ARCH_REALVIEW || ARCH_OMAP4 || ARCH_U8500 || \ + ARCH_TEGRA) help This enables support for systems with more than one CPU. If you have a system with only one CPU, like most personal computers, say N. If
@@ -1117,9 +1119,11 @@ config HOTPLUG_CPU config LOCAL_TIMERS bool "Use local timer interrupts" depends on SMP && (REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP || \ - REALVIEW_EB_A9MP || MACH_REALVIEW_PBX || ARCH_OMAP4 || ARCH_U8500) + REALVIEW_EB_A9MP || MACH_REALVIEW_PBX || ARCH_OMAP4 || \ + ARCH_U8500 || ARCH_TEGRA) default y - select HAVE_ARM_TWD if (ARCH_REALVIEW || ARCH_OMAP4 || ARCH_U8500) + select HAVE_ARM_TWD if (ARCH_REALVIEW || ARCH_OMAP4 || ARCH_U8500 || \ + ARCH_TEGRA) help Enable support for local timers on SMP platforms, rather then the legacy IPI broadcast method. Local timers allows the system
arch/arm/mach-tegra/Makefile +2 -0
@@ -3,3 +3,5 @@ obj-y += io.o obj-y += irq.o obj-y += clock.o obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra2_clocks.o +obj-$(CONFIG_SMP) += platsmp.o localtimer.o headsmp.o +obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
arch/arm/mach-tegra/headsmp.S new file +61 -0
61 lines not on this page · raw message
arch/arm/mach-tegra/hotplug.c new file +140 -0
140 lines not on this page · raw message
arch/arm/mach-tegra/include/mach/smp.h new file +30 -0
@@ -0,0 +1,30 @@ +#ifndef ASMARM_ARCH_SMP_H +#define ASMARM_ARCH_SMP_H + + +#include <asm/hardware/gic.h> + +#define hard_smp_processor_id () \ + ({ \ + unsigned int cpunum; \ + __asm__("mrc p15, 0, %0, c0, c0, 5" \ + : "=r" (cpunum)); \ + cpunum &= 0x0F; \ + }) + +/* +* We use IRQ1 as the IPI +*/ +static inline void smp_cross_call (const struct cpumask *mask) +{ +gic_raise_softirq (mask,1 ); +} + +/* +* Do nothing on MPcore. +*/ +static inline void smp_cross_call_done (cpumask_t callmap) +{ +} + +#endif
arch/arm/mach-tegra/localtimer.c new file +25 -0
@@ -0,0 +1,25 @@ +/* +* arch/arm/mach-tegra/localtimer.c +* +* Copyright (C) 2002 ARM Ltd. +* All Rights Reserved +* +* 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 <linux/smp.h> +#include <linux/clockchips.h> +#include <asm/irq.h> +#include <asm/smp_twd.h> +#include <asm/localtimer.h> + +/* +* Setup the local clock events for a CPU. +*/ +void __cpuinit local_timer_setup (struct clock_event_device *evt) +{ + evt->irq =IRQ_LOCALTIMER ; +twd_timer_setup (evt); +}
arch/arm/mach-tegra/platsmp.c new file +156 -0
156 lines not on this page · raw message
Signature · 1 line
1.6.5.6
PATCH 5/10 tegra: Add timer support
From: Colin Cross <[email protected]>
--- arch/arm/mach-tegra/Makefile | 1 + arch/arm/mach-tegra/timer.c | 185 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 186 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-tegra/timer.c
arch/arm/mach-tegra/Makefile +1 -0
@@ -2,6 +2,7 @@ obj-y += common.o obj-y += io.o obj-y += irq.o obj-y += clock.o +obj-y += timer.o obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra2_clocks.o obj-$(CONFIG_SMP) += platsmp.o localtimer.o headsmp.o obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
arch/arm/mach-tegra/timer.c new file +185 -0
185 lines not on this page · raw message
Signature · 1 line
1.6.5.6
PATCH 6/10 tegra: add GPIO support
From: Erik Gilling <[email protected]>
--- arch/arm/mach-tegra/Kconfig | 1 + arch/arm/mach-tegra/Makefile | 1 + arch/arm/mach-tegra/gpio.c | 348 +++++++++++++++++++++++++ arch/arm/mach-tegra/include/mach/gpio-names.h | 247 ++++++++++++++++++ arch/arm/mach-tegra/include/mach/gpio.h | 51 ++++ 5 files changed, 648 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-tegra/gpio.c create mode 100644 arch/arm/mach-tegra/include/mach/gpio-names.h create mode 100644 arch/arm/mach-tegra/include/mach/gpio.h
arch/arm/mach-tegra/Kconfig +1 -0
@@ -9,6 +9,7 @@ config ARCH_TEGRA_2x_SOC bool "Tegra 2 family" select CPU_V7 select ARM_GIC + select ARCH_REQUIRE_GPIOLIB help Support for NVIDIA Tegra AP20 and T20 processors, based on the ARM CortexA9MP CPU and the ARM PL310 L2 cache controller
arch/arm/mach-tegra/Makefile +1 -0
@@ -3,6 +3,7 @@ obj-y += io.o obj-y += irq.o obj-y += clock.o obj-y += timer.o +obj-y += gpio.o obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra2_clocks.o obj-$(CONFIG_SMP) += platsmp.o localtimer.o headsmp.o obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
arch/arm/mach-tegra/gpio.c new file +348 -0
348 lines not on this page · raw message
arch/arm/mach-tegra/include/mach/gpio-names.h new file +247 -0
247 lines not on this page · raw message
arch/arm/mach-tegra/include/mach/gpio.h new file +51 -0
51 lines not on this page · raw message
Signature · 1 line
1.6.5.6
PATCH 7/10 tegra: add pinmux support
From: Erik Gilling <[email protected]>
--- arch/arm/mach-tegra/Makefile | 2 + arch/arm/mach-tegra/include/mach/pinmux.h | 241 +++++++++++++ arch/arm/mach-tegra/pinmux.c | 548 +++++++++++++++++++++++++++++ 3 files changed, 791 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-tegra/include/mach/pinmux.h create mode 100644 arch/arm/mach-tegra/pinmux.c
arch/arm/mach-tegra/Makefile +2 -0
@@ -4,6 +4,8 @@ obj-y += irq.o obj-y += clock.o obj-y += timer.o obj-y += gpio.o +obj-y += pinmux.o +obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += clock.o obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra2_clocks.o obj-$(CONFIG_SMP) += platsmp.o localtimer.o headsmp.o obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
arch/arm/mach-tegra/include/mach/pinmux.h new file +241 -0
241 lines not on this page · raw message
arch/arm/mach-tegra/pinmux.c new file +548 -0
548 lines not on this page · raw message
Signature · 1 line
1.6.5.6
PATCH 8/10 tegra: Add framebuffer driver
From: Colin Cross <[email protected]>
--- arch/arm/mach-tegra/include/mach/tegra_fb.h | 24 + drivers/video/Kconfig | 11 + drivers/video/Makefile | 1 + drivers/video/tegrafb.c | 620 +++++++++++++++++++++++++++ 4 files changed, 656 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-tegra/include/mach/tegra_fb.h create mode 100644 drivers/video/tegrafb.c
arch/arm/mach-tegra/include/mach/tegra_fb.h new file +24 -0
@@ -0,0 +1,24 @@ +/* +* arch/arm/mach-tegra/include/mach/tegra_fb.h +* +* Copyright (C) 2010 Google, Inc. +* Author: Colin Cross <[email protected]> +* +* 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. +* +*/ + +struct tegra_fb_lcd_data { +int fb_xres; +int fb_yres; +int lcd_xres; +int lcd_yres; +int bits_per_pixel; +};
drivers/video/Kconfig +11 -0
@@ -1074,6 +1074,17 @@ config FB_RIVA_BACKLIGHT help Say Y here if you want to control the backlight of your display. +config FB_TEGRA + tristate "NVIDIA Tegra SoC display support" + depends on ARCH_TEGRA && FB = y + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + default FB + help + This driver supports the NVIDIA Tegra systems-on-a-chip. This + driver can not be compiled as a module. + config FB_I810 tristate "Intel 810/815 support (EXPERIMENTAL)" depends on EXPERIMENTAL && FB && PCI && X86_32 && AGP_INTEL
drivers/video/Makefile +1 -0
@@ -129,6 +129,7 @@ obj-$(CONFIG_XEN_FBDEV_FRONTEND) += xen-fbfront.o obj-$(CONFIG_FB_CARMINE) += carminefb.o obj-$(CONFIG_FB_MB862XX) += mb862xx/ obj-$(CONFIG_FB_MSM) += msm/ +obj-$(CONFIG_FB_TEGRA) += tegrafb.o # Platform or fallback drivers go here obj-$(CONFIG_FB_UVESA) += uvesafb.o
drivers/video/tegrafb.c new file +620 -0
620 lines not on this page · raw message
Signature · 1 line
1.6.5.6
PATCH 9/10 tegra: harmony: Add harmony board file
From: Colin Cross <[email protected]>
--- arch/arm/mach-tegra/Makefile | 4 + arch/arm/mach-tegra/board-harmony-panel.c | 75 ++++++++++++++ arch/arm/mach-tegra/board-harmony-pinmux.c | 144 ++++++++++++++++++++++++++++ arch/arm/mach-tegra/board-harmony.c | 129 +++++++++++++++++++++++++ arch/arm/mach-tegra/board-harmony.h | 22 ++++ 5 files changed, 374 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-tegra/board-harmony-panel.c create mode 100644 arch/arm/mach-tegra/board-harmony-pinmux.c create mode 100644 arch/arm/mach-tegra/board-harmony.c create mode 100644 arch/arm/mach-tegra/board-harmony.h
arch/arm/mach-tegra/Makefile +4 -0
@@ -9,3 +9,7 @@ obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += clock.o obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra2_clocks.o obj-$(CONFIG_SMP) += platsmp.o localtimer.o headsmp.o obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o + +obj-${CONFIG_MACH_HARMONY} += board-harmony.o +obj-${CONFIG_MACH_HARMONY} += board-harmony-pinmux.o +obj-${CONFIG_MACH_HARMONY} += board-harmony-panel.o
arch/arm/mach-tegra/board-harmony-panel.c new file +75 -0
75 lines not on this page · raw message
arch/arm/mach-tegra/board-harmony-pinmux.c new file +144 -0
144 lines not on this page · raw message
arch/arm/mach-tegra/board-harmony.c new file +129 -0
129 lines not on this page · raw message
arch/arm/mach-tegra/board-harmony.h new file +22 -0
@@ -0,0 +1,22 @@ +/* +* arch/arm/mach-tegra/board-harmony.h +* +* Copyright (C) 2010 Google, 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. +* +*/ + +#ifndef _MACH_TEGRA_BOARD_HARMONY_H +#define _MACH_TEGRA_BOARD_HARMONY_H + +void harmony_pinmux_init (void ); + +#endif
Signature · 1 line
1.6.5.6
PATCH 10/10 tegra: Add harmony_defconfig
From: Colin Cross <[email protected]>
--- arch/arm/configs/harmony_defconfig | 1569 ++++++++++++++++++++++++++++++++++++ 1 files changed, 1569 insertions(+), 0 deletions(-) create mode 100644 arch/arm/configs/harmony_defconfig
arch/arm/configs/harmony_defconfig new file +1569 -0
@@ -0,0 +1,1569 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.34-rc1 +# Mon Mar 15 21:20:01 2010 +# +CONFIG_ARM=y +CONFIG_SYS_SUPPORTS_APM_EMULATION=y +CONFIG_GENERIC_GPIO=y +CONFIG_GENERIC_TIME=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_HAVE_PROC_CPU=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_GENERIC_LOCKBREAK=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y +CONFIG_VECTORS_BASE=0xffff0000 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" +CONFIG_CONSTRUCTORS=y + +# +# General setup +# +CONFIG_EXPERIMENTAL=y +CONFIG_LOCK_KERNEL=y +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_LOCALVERSION="" +CONFIG_LOCALVERSION_AUTO=y +CONFIG_HAVE_KERNEL_GZIP=y +CONFIG_HAVE_KERNEL_LZO=y +CONFIG_KERNEL_GZIP=y +# CONFIG_KERNEL_BZIP2 is not set +# CONFIG_KERNEL_LZMA is not set +# CONFIG_KERNEL_LZO is not set +CONFIG_SWAP=y +# CONFIG_SYSVIPC is not set +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +# CONFIG_TASKSTATS is not set +# CONFIG_AUDIT is not set + +# +# RCU Subsystem +# +CONFIG_TREE_RCU=y +# CONFIG_TREE_PREEMPT_RCU is not set +# CONFIG_TINY_RCU is not set +# CONFIG_RCU_TRACE is not set +CONFIG_RCU_FANOUT=32 +# CONFIG_RCU_FANOUT_EXACT is not set +# CONFIG_RCU_FAST_NO_HZ is not set +# CONFIG_TREE_RCU_TRACE is not set +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=17 +CONFIG_CGROUPS=y +CONFIG_CGROUP_DEBUG=y +# CONFIG_CGROUP_NS is not set +CONFIG_CGROUP_FREEZER=y +# CONFIG_CGROUP_DEVICE is not set +# CONFIG_CPUSETS is not set +CONFIG_CGROUP_CPUACCT=y +CONFIG_RESOURCE_COUNTERS=y +# CONFIG_CGROUP_MEM_RES_CTLR is not set +CONFIG_CGROUP_SCHED=y +CONFIG_FAIR_GROUP_SCHED=y +CONFIG_RT_GROUP_SCHED=y +# CONFIG_SYSFS_DEPRECATED_V2 is not set +# CONFIG_RELAY is not set +# CONFIG_NAMESPACES is not set +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_RD_GZIP=y +# CONFIG_RD_BZIP2 is not set +# CONFIG_RD_LZMA is not set +# CONFIG_RD_LZO is not set +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SYSCTL=y +CONFIG_ANON_INODES=y +CONFIG_EMBEDDED=y +CONFIG_UID16=y +# CONFIG_SYSCTL_SYSCALL is not set +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +# CONFIG_ELF_CORE is not set +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y +CONFIG_EVENTFD=y +CONFIG_SHMEM=y +CONFIG_AIO=y +CONFIG_HAVE_PERF_EVENTS=y +CONFIG_PERF_USE_VMALLOC=y + +# +# Kernel Performance Events And Counters +# +# CONFIG_PERF_EVENTS is not set +# CONFIG_PERF_COUNTERS is not set +CONFIG_VM_EVENT_COUNTERS=y +CONFIG_COMPAT_BRK=y +CONFIG_SLAB=y +# CONFIG_SLUB is not set +# CONFIG_SLOB is not set +# CONFIG_PROFILING is not set +CONFIG_HAVE_OPROFILE=y +# CONFIG_KPROBES is not set +CONFIG_HAVE_KPROBES=y +CONFIG_HAVE_KRETPROBES=y +CONFIG_USE_GENERIC_SMP_HELPERS=y +CONFIG_HAVE_CLK=y + +# +# GCOV-based kernel profiling +# +# CONFIG_GCOV_KERNEL is not set +# CONFIG_SLOW_WORK is not set +CONFIG_HAVE_GENERIC_DMA_COHERENT=y +CONFIG_SLABINFO=y +CONFIG_RT_MUTEXES=y +CONFIG_BASE_SMALL=0 +CONFIG_MODULES=y +# CONFIG_MODULE_FORCE_LOAD is not set +CONFIG_MODULE_UNLOAD=y +CONFIG_MODULE_FORCE_UNLOAD=y +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +CONFIG_STOP_MACHINE=y +CONFIG_BLOCK=y +CONFIG_LBDAF=y +# CONFIG_BLK_DEV_BSG is not set +# CONFIG_BLK_DEV_INTEGRITY is not set +# CONFIG_BLK_CGROUP is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +# CONFIG_IOSCHED_DEADLINE is not set +# CONFIG_IOSCHED_CFQ is not set +# CONFIG_DEFAULT_DEADLINE is not set +# CONFIG_DEFAULT_CFQ is not set +CONFIG_DEFAULT_NOOP=y +CONFIG_DEFAULT_IOSCHED="noop" +# CONFIG_INLINE_SPIN_TRYLOCK is not set +# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set +# CONFIG_INLINE_SPIN_LOCK is not set +# CONFIG_INLINE_SPIN_LOCK_BH is not set +# CONFIG_INLINE_SPIN_LOCK_IRQ is not set +# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set +# CONFIG_INLINE_SPIN_UNLOCK is not set +# CONFIG_INLINE_SPIN_UNLOCK_BH is not set +# CONFIG_INLINE_SPIN_UNLOCK_IRQ is not set +# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set +# CONFIG_INLINE_READ_TRYLOCK is not set +# CONFIG_INLINE_READ_LOCK is not set +# CONFIG_INLINE_READ_LOCK_BH is not set +# CONFIG_INLINE_READ_LOCK_IRQ is not set +# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set +# CONFIG_INLINE_READ_UNLOCK is not set +# CONFIG_INLINE_READ_UNLOCK_BH is not set +# CONFIG_INLINE_READ_UNLOCK_IRQ is not set +# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set +# CONFIG_INLINE_WRITE_TRYLOCK is not set +# CONFIG_INLINE_WRITE_LOCK is not set +# CONFIG_INLINE_WRITE_LOCK_BH is not set +# CONFIG_INLINE_WRITE_LOCK_IRQ is not set +# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set +# CONFIG_INLINE_WRITE_UNLOCK is not set +# CONFIG_INLINE_WRITE_UNLOCK_BH is not set +# CONFIG_INLINE_WRITE_UNLOCK_IRQ is not set +# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set +# CONFIG_MUTEX_SPIN_ON_OWNER is not set +CONFIG_FREEZER=y + +# +# System Type +# +CONFIG_MMU=y +# CONFIG_ARCH_AAEC2000 is not set +# CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_REALVIEW is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_AT91 is not set +# CONFIG_ARCH_CLPS711X is not set +# CONFIG_ARCH_GEMINI is not set +# CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_EP93XX is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +# CONFIG_ARCH_MXC is not set +# CONFIG_ARCH_STMP3XXX is not set +# CONFIG_ARCH_NETX is not set +# CONFIG_ARCH_H720X is not set +# CONFIG_ARCH_NOMADIK is not set +# CONFIG_ARCH_IOP13XX is not set +# CONFIG_ARCH_IOP32X is not set +# CONFIG_ARCH_IOP33X is not set +# CONFIG_ARCH_IXP23XX is not set +# CONFIG_ARCH_IXP2000 is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_DOVE is not set +# CONFIG_ARCH_KIRKWOOD is not set +# CONFIG_ARCH_LOKI is not set +# CONFIG_ARCH_MV78XX0 is not set +# CONFIG_ARCH_ORION5X is not set +# CONFIG_ARCH_MMP is not set +# CONFIG_ARCH_KS8695 is not set +# CONFIG_ARCH_NS9XXX is not set +# CONFIG_ARCH_W90X900 is not set +# CONFIG_ARCH_NUC93X is not set +CONFIG_ARCH_TEGRA=y +# CONFIG_ARCH_PNX4008 is not set +# CONFIG_ARCH_PXA is not set +# CONFIG_ARCH_MSM is not set +# CONFIG_ARCH_RPC is not set +# CONFIG_ARCH_SA1100 is not set +# CONFIG_ARCH_S3C2410 is not set +# CONFIG_ARCH_S3C64XX is not set +# CONFIG_ARCH_S5PC1XX is not set +# CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_LH7A40X is not set +# CONFIG_ARCH_U300 is not set +# CONFIG_ARCH_DAVINCI is not set +# CONFIG_ARCH_OMAP is not set +# CONFIG_ARCH_BCMRING is not set +# CONFIG_ARCH_U8500 is not set + +# +# NVIDIA Tegra options +# +CONFIG_ARCH_TEGRA_2x_SOC=y +CONFIG_MACH_HARMONY=y +CONFIG_TEGRA_DEBUG_UART_NONE=y +# CONFIG_TEGRA_DEBUG_UARTA is not set +# CONFIG_TEGRA_DEBUG_UARTB is not set +# CONFIG_TEGRA_DEBUG_UARTC is not set +# CONFIG_TEGRA_DEBUG_UARTD is not set +# CONFIG_TEGRA_DEBUG_UARTE is not set + +# +# Processor Type +# +CONFIG_CPU_32v6K=y +CONFIG_CPU_V7=y +CONFIG_CPU_32v7=y +CONFIG_CPU_ABRT_EV7=y +CONFIG_CPU_PABRT_V7=y +CONFIG_CPU_CACHE_V7=y +CONFIG_CPU_CACHE_VIPT=y +CONFIG_CPU_COPY_V6=y +CONFIG_CPU_TLB_V7=y +CONFIG_CPU_HAS_ASID=y +CONFIG_CPU_CP15=y +CONFIG_CPU_CP15_MMU=y + +# +# Processor Features +# +CONFIG_ARM_THUMB=y +# CONFIG_ARM_THUMBEE is not set +# CONFIG_CPU_ICACHE_DISABLE is not set +# CONFIG_CPU_DCACHE_DISABLE is not set +# CONFIG_CPU_BPREDICT_DISABLE is not set +CONFIG_HAS_TLS_REG=y +CONFIG_OUTER_CACHE=y +CONFIG_CACHE_L2X0=y +CONFIG_ARM_L1_CACHE_SHIFT=5 +CONFIG_CPU_HAS_PMU=y +# CONFIG_ARM_ERRATA_430973 is not set +# CONFIG_ARM_ERRATA_458693 is not set +# CONFIG_ARM_ERRATA_460075 is not set +CONFIG_ARM_GIC=y +CONFIG_COMMON_CLKDEV=y + +# +# Bus support +# +# CONFIG_PCI_SYSCALL is not set +# CONFIG_ARCH_SUPPORTS_MSI is not set +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +CONFIG_TICK_ONESHOT=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y +CONFIG_SMP=y +CONFIG_HAVE_ARM_SCU=y +CONFIG_HAVE_ARM_TWD=y +CONFIG_VMSPLIT_3G=y +# CONFIG_VMSPLIT_2G is not set +# CONFIG_VMSPLIT_1G is not set +CONFIG_PAGE_OFFSET=0xC0000000 +CONFIG_NR_CPUS=2 +CONFIG_HOTPLUG_CPU=y +CONFIG_LOCAL_TIMERS=y +# CONFIG_PREEMPT_NONE is not set +# CONFIG_PREEMPT_VOLUNTARY is not set +CONFIG_PREEMPT=y +CONFIG_HZ=100 +# CONFIG_THUMB2_KERNEL is not set +CONFIG_AEABI=y +# CONFIG_OABI_COMPAT is not set +# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set +# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set +CONFIG_HIGHMEM=y +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +# CONFIG_DISCONTIGMEM_MANUAL is not set +# CONFIG_SPARSEMEM_MANUAL is not set +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +CONFIG_PAGEFLAGS_EXTENDED=y +CONFIG_SPLIT_PTLOCK_CPUS=4 +# CONFIG_PHYS_ADDR_T_64BIT is not set +CONFIG_ZONE_DMA_FLAG=0 +CONFIG_BOUNCE=y +CONFIG_VIRT_TO_BUS=y +# CONFIG_KSM is not set +CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 +CONFIG_ALIGNMENT_TRAP=y +# CONFIG_UACCESS_WITH_MEMCPY is not set + +# +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="mem=448M at 0M console=ttyS0,115200n8 earlyprintk init=/bin/ash" +# CONFIG_XIP_KERNEL is not set +# CONFIG_KEXEC is not set + +# +# CPU Power Management +# +# CONFIG_CPU_IDLE is not set + +# +# Floating point emulation +# + +# +# At least one emulation must be selected +# +CONFIG_VFP=y +CONFIG_VFPv3=y +# CONFIG_NEON is not set + +# +# Userspace binary formats +# +CONFIG_BINFMT_ELF=y +CONFIG_HAVE_AOUT=y +# CONFIG_BINFMT_AOUT is not set +# CONFIG_BINFMT_MISC is not set + +# +# Power management options +# +CONFIG_PM=y +# CONFIG_PM_DEBUG is not set +CONFIG_PM_SLEEP_SMP=y +CONFIG_PM_SLEEP=y +CONFIG_SUSPEND=y +CONFIG_SUSPEND_FREEZER=y +# CONFIG_APM_EMULATION is not set +# CONFIG_PM_RUNTIME is not set +CONFIG_PM_OPS=y +CONFIG_ARCH_SUSPEND_POSSIBLE=y +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_XFRM=y +# CONFIG_XFRM_USER is not set +# CONFIG_XFRM_SUB_POLICY is not set +# CONFIG_XFRM_MIGRATE is not set +# CONFIG_XFRM_STATISTICS is not set +CONFIG_XFRM_IPCOMP=y +CONFIG_NET_KEY=y +# CONFIG_NET_KEY_MIGRATE is not set +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_FIB_HASH=y +# CONFIG_IP_PNP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +CONFIG_INET_ESP=y +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set +CONFIG_INET_TUNNEL=y +CONFIG_INET_XFRM_MODE_TRANSPORT=y +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +# CONFIG_INET_DIAG is not set +# CONFIG_TCP_CONG_ADVANCED is not set +CONFIG_TCP_CONG_CUBIC=y +CONFIG_DEFAULT_TCP_CONG="cubic" +# CONFIG_TCP_MD5SIG is not set +CONFIG_IPV6=y +CONFIG_IPV6_PRIVACY=y +CONFIG_IPV6_ROUTER_PREF=y +# CONFIG_IPV6_ROUTE_INFO is not set +CONFIG_IPV6_OPTIMISTIC_DAD=y +CONFIG_INET6_AH=y +CONFIG_INET6_ESP=y +CONFIG_INET6_IPCOMP=y +CONFIG_IPV6_MIP6=y +CONFIG_INET6_XFRM_TUNNEL=y +CONFIG_INET6_TUNNEL=y +CONFIG_INET6_XFRM_MODE_TRANSPORT=y +CONFIG_INET6_XFRM_MODE_TUNNEL=y +CONFIG_INET6_XFRM_MODE_BEET=y +# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set +CONFIG_IPV6_SIT=y +# CONFIG_IPV6_SIT_6RD is not set +CONFIG_IPV6_NDISC_NODETYPE=y +CONFIG_IPV6_TUNNEL=y +CONFIG_IPV6_MULTIPLE_TABLES=y +# CONFIG_IPV6_SUBTREES is not set +# CONFIG_IPV6_MROUTE is not set +# CONFIG_NETWORK_SECMARK is not set +# CONFIG_NETFILTER is not set +# CONFIG_IP_DCCP is not set +# CONFIG_IP_SCTP is not set +# CONFIG_RDS is not set +# CONFIG_TIPC is not set +# CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +# CONFIG_NET_DSA is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_PHONET is not set +# CONFIG_IEEE802154 is not set +# CONFIG_NET_SCHED is not set +# CONFIG_DCB is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +# CONFIG_CAN is not set +# CONFIG_IRDA is not set +CONFIG_BT=y +CONFIG_BT_L2CAP=y +CONFIG_BT_SCO=y +CONFIG_BT_RFCOMM=y +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=y +# CONFIG_BT_BNEP_MC_FILTER is not set +# CONFIG_BT_BNEP_PROTO_FILTER is not set +CONFIG_BT_HIDP=y + +# +# Bluetooth device drivers +# +# CONFIG_BT_HCIBTSDIO is not set +CONFIG_BT_HCIUART=y +CONFIG_BT_HCIUART_H4=y +# CONFIG_BT_HCIUART_BCSP is not set +CONFIG_BT_HCIUART_LL=y +# CONFIG_BT_HCIVHCI is not set +# CONFIG_BT_MRVL is not set +# CONFIG_AF_RXRPC is not set +CONFIG_FIB_RULES=y +CONFIG_WIRELESS=y +# CONFIG_CFG80211 is not set +# CONFIG_LIB80211 is not set + +# +# CFG80211 needs to be enabled for MAC80211 +# +# CONFIG_WIMAX is not set +CONFIG_RFKILL=y +# CONFIG_RFKILL_INPUT is not set +# CONFIG_NET_9P is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_UEVENT_HELPER_PATH="" +# CONFIG_DEVTMPFS is not set +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=y +# CONFIG_FIRMWARE_IN_KERNEL is not set +CONFIG_EXTRA_FIRMWARE="" +# CONFIG_DEBUG_DRIVER is not set +# CONFIG_DEBUG_DEVRES is not set +# CONFIG_SYS_HYPERVISOR is not set +# CONFIG_CONNECTOR is not set +CONFIG_MTD=y +# CONFIG_MTD_DEBUG is not set +# CONFIG_MTD_TESTS is not set +# CONFIG_MTD_CONCAT is not set +CONFIG_MTD_PARTITIONS=y +# CONFIG_MTD_REDBOOT_PARTS is not set +CONFIG_MTD_CMDLINE_PARTS=y +# CONFIG_MTD_AFS_PARTS is not set +# CONFIG_MTD_AR7_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLKDEVS=y +CONFIG_MTD_BLOCK=y +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set +# CONFIG_RFD_FTL is not set +# CONFIG_SSFDC is not set +# CONFIG_MTD_OOPS is not set + +# +# RAM/ROM/Flash chip drivers +# +# CONFIG_MTD_CFI is not set +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +# CONFIG_MTD_PLATRAM is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLOCK2MTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set +# CONFIG_MTD_NAND is not set +# CONFIG_MTD_ONENAND is not set + +# +# LPDDR flash memory drivers +# +# CONFIG_MTD_LPDDR is not set + +# +# UBI - Unsorted block images +# +# CONFIG_MTD_UBI is not set +# CONFIG_PARPORT is not set +CONFIG_BLK_DEV=y +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=y +# CONFIG_BLK_DEV_CRYPTOLOOP is not set + +# +# DRBD disabled because PROC_FS, INET or CONNECTOR not selected +# +# CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_RAM is not set +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_ATA_OVER_ETH is not set +# CONFIG_MG_DISK is not set +CONFIG_MISC_DEVICES=y +# CONFIG_AD525X_DPOT is not set +# CONFIG_ICS932S401 is not set +# CONFIG_ENCLOSURE_SERVICES is not set +# CONFIG_ISL29003 is not set +# CONFIG_DS1682 is not set +# CONFIG_C2PORT is not set + +# +# EEPROM support +# +# CONFIG_EEPROM_AT24 is not set +# CONFIG_EEPROM_LEGACY is not set +# CONFIG_EEPROM_MAX6875 is not set +# CONFIG_EEPROM_93CX6 is not set +# CONFIG_IWMC3200TOP is not set +CONFIG_HAVE_IDE=y +# CONFIG_IDE is not set + +# +# SCSI device support +# +# CONFIG_RAID_ATTRS is not set +# CONFIG_SCSI is not set +# CONFIG_SCSI_DMA is not set +# CONFIG_SCSI_NETLINK is not set +# CONFIG_ATA is not set +CONFIG_MD=y +# CONFIG_BLK_DEV_MD is not set +CONFIG_BLK_DEV_DM=y +CONFIG_DM_DEBUG=y +CONFIG_DM_CRYPT=y +# CONFIG_DM_SNAPSHOT is not set +# CONFIG_DM_MIRROR is not set +# CONFIG_DM_ZERO is not set +# CONFIG_DM_MULTIPATH is not set +# CONFIG_DM_DELAY is not set +CONFIG_DM_UEVENT=y +CONFIG_NETDEVICES=y +CONFIG_DUMMY=y +# CONFIG_BONDING is not set +# CONFIG_MACVLAN is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set +# CONFIG_VETH is not set +# CONFIG_PHYLIB is not set +CONFIG_NET_ETHERNET=y +CONFIG_MII=y +# CONFIG_AX88796 is not set +CONFIG_SMC91X=y +# CONFIG_DM9000 is not set +# CONFIG_ETHOC is not set +# CONFIG_SMC911X is not set +# CONFIG_SMSC911X is not set +# CONFIG_DNET is not set +# CONFIG_IBM_NEW_EMAC_ZMII is not set +# CONFIG_IBM_NEW_EMAC_RGMII is not set +# CONFIG_IBM_NEW_EMAC_TAH is not set +# CONFIG_IBM_NEW_EMAC_EMAC4 is not set +# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set +# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set +# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set +# CONFIG_B44 is not set +# CONFIG_KS8842 is not set +# CONFIG_KS8851_MLL is not set +CONFIG_NETDEV_1000=y +CONFIG_NETDEV_10000=y +CONFIG_WLAN=y +# CONFIG_HOSTAP is not set + +# +# Enable WiMAX (Networking options) to see the WiMAX drivers +# +# CONFIG_WAN is not set +CONFIG_PPP=y +# CONFIG_PPP_MULTILINK is not set +# CONFIG_PPP_FILTER is not set +CONFIG_PPP_ASYNC=y +# CONFIG_PPP_SYNC_TTY is not set +CONFIG_PPP_DEFLATE=y +CONFIG_PPP_BSDCOMP=y +CONFIG_PPP_MPPE=y +# CONFIG_PPPOE is not set +# CONFIG_PPPOL2TP is not set +# CONFIG_SLIP is not set +CONFIG_SLHC=y +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_ISDN is not set +# CONFIG_PHONE is not set + +# +# Input device support +# +CONFIG_INPUT=y +# CONFIG_INPUT_FF_MEMLESS is not set +# CONFIG_INPUT_POLLDEV is not set +# CONFIG_INPUT_SPARSEKMAP is not set + +# +# Userland interfaces +# +# CONFIG_INPUT_MOUSEDEV is not set +# CONFIG_INPUT_JOYDEV is not set +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TABLET is not set +CONFIG_INPUT_TOUCHSCREEN=y +# CONFIG_TOUCHSCREEN_AD7879_I2C is not set +# CONFIG_TOUCHSCREEN_AD7879 is not set +# CONFIG_TOUCHSCREEN_DYNAPRO is not set +# CONFIG_TOUCHSCREEN_EETI is not set +# CONFIG_TOUCHSCREEN_FUJITSU is not set +# CONFIG_TOUCHSCREEN_GUNZE is not set +# CONFIG_TOUCHSCREEN_ELO is not set +# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set +# CONFIG_TOUCHSCREEN_MCS5000 is not set +# CONFIG_TOUCHSCREEN_MTOUCH is not set +# CONFIG_TOUCHSCREEN_INEXIO is not set +# CONFIG_TOUCHSCREEN_MK712 is not set +# CONFIG_TOUCHSCREEN_PENMOUNT is not set +# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set +# CONFIG_TOUCHSCREEN_TOUCHWIN is not set +# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set +# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set +# CONFIG_TOUCHSCREEN_TSC2007 is not set +# CONFIG_TOUCHSCREEN_W90X900 is not set +CONFIG_INPUT_MISC=y +# CONFIG_INPUT_ATI_REMOTE is not set +# CONFIG_INPUT_ATI_REMOTE2 is not set +# CONFIG_INPUT_KEYSPAN_REMOTE is not set +# CONFIG_INPUT_POWERMATE is not set +# CONFIG_INPUT_YEALINK is not set +# CONFIG_INPUT_CM109 is not set +CONFIG_INPUT_UINPUT=y +# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set + +# +# Hardware I/O ports +# +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +# CONFIG_VT is not set +# CONFIG_DEVKMEM is not set +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=4 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4 +# CONFIG_SERIAL_8250_EXTENDED is not set + +# +# Non-8250 serial port support +# +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +# CONFIG_SERIAL_TIMBERDALE is not set +CONFIG_UNIX98_PTYS=y +# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set +# CONFIG_LEGACY_PTYS is not set +# CONFIG_IPMI_HANDLER is not set +# CONFIG_HW_RANDOM is not set +# CONFIG_R3964 is not set +# CONFIG_RAW_DRIVER is not set +# CONFIG_TCG_TPM is not set +CONFIG_I2C=y +CONFIG_I2C_BOARDINFO=y +CONFIG_I2C_COMPAT=y +# CONFIG_I2C_CHARDEV is not set +CONFIG_I2C_HELPER_AUTO=y + +# +# I2C Hardware Bus support +# + +# +# I2C system bus drivers (mostly embedded / system-on-chip) +# +# CONFIG_I2C_DESIGNWARE is not set +# CONFIG_I2C_GPIO is not set +# CONFIG_I2C_OCORES is not set +# CONFIG_I2C_SIMTEC is not set +# CONFIG_I2C_XILINX is not set + +# +# External I2C/SMBus adapter drivers +# +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_TAOS_EVM is not set + +# +# Other I2C/SMBus bus drivers +# +# CONFIG_I2C_PCA_PLATFORM is not set +# CONFIG_I2C_STUB is not set + +# +# Miscellaneous I2C Chip support +# +# CONFIG_SENSORS_TSL2550 is not set +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +# CONFIG_I2C_DEBUG_CHIP is not set +# CONFIG_SPI is not set + +# +# PPS support +# +# CONFIG_PPS is not set +CONFIG_ARCH_REQUIRE_GPIOLIB=y +CONFIG_GPIOLIB=y +# CONFIG_DEBUG_GPIO is not set +# CONFIG_GPIO_SYSFS is not set + +# +# Memory mapped GPIO expanders: +# +# CONFIG_GPIO_IT8761E is not set + +# +# I2C GPIO expanders: +# +# CONFIG_GPIO_MAX7300 is not set +# CONFIG_GPIO_MAX732X is not set +# CONFIG_GPIO_PCA953X is not set +# CONFIG_GPIO_PCF857X is not set +# CONFIG_GPIO_ADP5588 is not set + +# +# PCI GPIO expanders: +# + +# +# SPI GPIO expanders: +# + +# +# AC97 GPIO expanders: +# +CONFIG_W1=y + +# +# 1-wire Bus Masters +# +CONFIG_W1_MASTER_DS2482=y +# CONFIG_W1_MASTER_DS1WM is not set +# CONFIG_W1_MASTER_GPIO is not set + +# +# 1-wire Slaves +# +# CONFIG_W1_SLAVE_THERM is not set +# CONFIG_W1_SLAVE_SMEM is not set +# CONFIG_W1_SLAVE_DS2431 is not set +# CONFIG_W1_SLAVE_DS2433 is not set +# CONFIG_W1_SLAVE_DS2760 is not set +# CONFIG_W1_SLAVE_BQ27000 is not set +CONFIG_POWER_SUPPLY=y +# CONFIG_POWER_SUPPLY_DEBUG is not set +CONFIG_PDA_POWER=y +# CONFIG_BATTERY_DS2760 is not set +# CONFIG_BATTERY_DS2782 is not set +# CONFIG_BATTERY_BQ27x00 is not set +# CONFIG_BATTERY_MAX17040 is not set +# CONFIG_HWMON is not set +# CONFIG_THERMAL is not set +# CONFIG_WATCHDOG is not set +CONFIG_SSB_POSSIBLE=y + +# +# Sonics Silicon Backplane +# +# CONFIG_SSB is not set + +# +# Multifunction device drivers +# +# CONFIG_MFD_CORE is not set +# CONFIG_MFD_88PM860X is not set +# CONFIG_MFD_SM501 is not set +# CONFIG_MFD_ASIC3 is not set +# CONFIG_HTC_EGPIO is not set +# CONFIG_HTC_PASIC3 is not set +# CONFIG_HTC_I2CPLD is not set +# CONFIG_TPS65010 is not set +# CONFIG_TWL4030_CORE is not set +# CONFIG_MFD_TMIO is not set +# CONFIG_MFD_T7L66XB is not set +# CONFIG_MFD_TC6387XB is not set +# CONFIG_MFD_TC6393XB is not set +# CONFIG_PMIC_DA903X is not set +# CONFIG_PMIC_ADP5520 is not set +# CONFIG_MFD_MAX8925 is not set +# CONFIG_MFD_WM8400 is not set +# CONFIG_MFD_WM831X is not set +# CONFIG_MFD_WM8350_I2C is not set +# CONFIG_MFD_WM8994 is not set +# CONFIG_MFD_PCF50633 is not set +# CONFIG_AB3100_CORE is not set +CONFIG_REGULATOR=y +CONFIG_REGULATOR_DEBUG=y +# CONFIG_REGULATOR_DUMMY is not set +# CONFIG_REGULATOR_FIXED_VOLTAGE is not set +# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set +# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set +# CONFIG_REGULATOR_BQ24022 is not set +# CONFIG_REGULATOR_MAX1586 is not set +# CONFIG_REGULATOR_MAX8649 is not set +# CONFIG_REGULATOR_MAX8660 is not set +# CONFIG_REGULATOR_LP3971 is not set +CONFIG_REGULATOR_TPS65023=y +# CONFIG_REGULATOR_TPS6507X is not set +CONFIG_MEDIA_SUPPORT=y + +# +# Multimedia core support +# +CONFIG_VIDEO_DEV=y +CONFIG_VIDEO_V4L2_COMMON=y +# CONFIG_VIDEO_ALLOW_V4L1 is not set +CONFIG_VIDEO_V4L1_COMPAT=y +# CONFIG_DVB_CORE is not set +CONFIG_VIDEO_MEDIA=y + +# +# Multimedia drivers +# +CONFIG_IR_CORE=y +CONFIG_VIDEO_IR=y +# CONFIG_MEDIA_ATTACH is not set +CONFIG_MEDIA_TUNER=y +# CONFIG_MEDIA_TUNER_CUSTOMISE is not set +CONFIG_MEDIA_TUNER_SIMPLE=y +CONFIG_MEDIA_TUNER_TDA8290=y +CONFIG_MEDIA_TUNER_TDA9887=y +CONFIG_MEDIA_TUNER_TEA5761=y +CONFIG_MEDIA_TUNER_TEA5767=y +CONFIG_MEDIA_TUNER_MT20XX=y +CONFIG_MEDIA_TUNER_XC2028=y +CONFIG_MEDIA_TUNER_XC5000=y +CONFIG_MEDIA_TUNER_MC44S803=y +CONFIG_VIDEO_V4L2=y +CONFIG_VIDEO_CAPTURE_DRIVERS=y +# CONFIG_VIDEO_ADV_DEBUG is not set +# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set +CONFIG_VIDEO_HELPER_CHIPS_AUTO=y +CONFIG_VIDEO_IR_I2C=y +# CONFIG_VIDEO_VIVI is not set +# CONFIG_VIDEO_SAA5246A is not set +# CONFIG_VIDEO_SAA5249 is not set +# CONFIG_SOC_CAMERA is not set +CONFIG_RADIO_ADAPTERS=y +# CONFIG_I2C_SI4713 is not set +# CONFIG_RADIO_SI4713 is not set +# CONFIG_RADIO_SI470X is not set +# CONFIG_RADIO_TEA5764 is not set +# CONFIG_RADIO_SAA7706H is not set +# CONFIG_RADIO_TEF6862 is not set +CONFIG_DAB=y + +# +# Graphics support +# +# CONFIG_VGASTATE is not set +CONFIG_VIDEO_OUTPUT_CONTROL=y +CONFIG_FB=y +# CONFIG_FIRMWARE_EDID is not set +# CONFIG_FB_DDC is not set +# CONFIG_FB_BOOT_VESA_SUPPORT is not set +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set +# CONFIG_FB_SYS_FILLRECT is not set +# CONFIG_FB_SYS_COPYAREA is not set +# CONFIG_FB_SYS_IMAGEBLIT is not set +# CONFIG_FB_FOREIGN_ENDIAN is not set +# CONFIG_FB_SYS_FOPS is not set +# CONFIG_FB_SVGALIB is not set +# CONFIG_FB_MACMODES is not set +# CONFIG_FB_BACKLIGHT is not set +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set + +# +# Frame buffer hardware drivers +# +# CONFIG_FB_S1D13XXX is not set +CONFIG_FB_TEGRA=y +# CONFIG_FB_VIRTUAL is not set +# CONFIG_FB_METRONOME is not set +# CONFIG_FB_MB862XX is not set +# CONFIG_FB_BROADSHEET is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set + +# +# Display device support +# +# CONFIG_DISPLAY_SUPPORT is not set +# CONFIG_LOGO is not set +# CONFIG_SOUND is not set +CONFIG_HID_SUPPORT=y +CONFIG_HID=y +# CONFIG_HIDRAW is not set +# CONFIG_HID_PID is not set + +# +# Special HID drivers +# +# CONFIG_HID_APPLE is not set +# CONFIG_HID_MAGICMOUSE is not set +# CONFIG_HID_WACOM is not set +CONFIG_USB_SUPPORT=y +CONFIG_USB_ARCH_HAS_HCD=y +# CONFIG_USB_ARCH_HAS_OHCI is not set +# CONFIG_USB_ARCH_HAS_EHCI is not set +# CONFIG_USB is not set +# CONFIG_USB_OTG_WHITELIST is not set +# CONFIG_USB_OTG_BLACKLIST_HUB is not set +# CONFIG_USB_MUSB_HDRC is not set +# CONFIG_USB_GADGET_MUSB_HDRC is not set + +# +# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may +# +CONFIG_USB_GADGET=y +CONFIG_USB_GADGET_DEBUG=y +CONFIG_USB_GADGET_DEBUG_FILES=y +CONFIG_USB_GADGET_DEBUG_FS=y +CONFIG_USB_GADGET_VBUS_DRAW=500 +CONFIG_USB_GADGET_SELECTED=y +# CONFIG_USB_GADGET_AT91 is not set +# CONFIG_USB_GADGET_ATMEL_USBA is not set +# CONFIG_USB_GADGET_FSL_USB2 is not set +# CONFIG_USB_GADGET_LH7A40X is not set +# CONFIG_USB_GADGET_OMAP is not set +# CONFIG_USB_GADGET_PXA25X is not set +CONFIG_USB_GADGET_R8A66597=y +CONFIG_USB_R8A66597=y +# CONFIG_USB_GADGET_PXA27X is not set +# CONFIG_USB_GADGET_S3C_HSOTG is not set +# CONFIG_USB_GADGET_IMX is not set +# CONFIG_USB_GADGET_S3C2410 is not set +# CONFIG_USB_GADGET_M66592 is not set +# CONFIG_USB_GADGET_AMD5536UDC is not set +# CONFIG_USB_GADGET_FSL_QE is not set +# CONFIG_USB_GADGET_CI13XXX is not set +# CONFIG_USB_GADGET_NET2280 is not set +# CONFIG_USB_GADGET_GOKU is not set +# CONFIG_USB_GADGET_LANGWELL is not set +# CONFIG_USB_GADGET_DUMMY_HCD is not set +CONFIG_USB_GADGET_DUALSPEED=y +# CONFIG_USB_ZERO is not set +# CONFIG_USB_AUDIO is not set +# CONFIG_USB_ETH is not set +# CONFIG_USB_GADGETFS is not set +# CONFIG_USB_FILE_STORAGE is not set +# CONFIG_USB_MASS_STORAGE is not set +# CONFIG_USB_G_SERIAL is not set +# CONFIG_USB_MIDI_GADGET is not set +# CONFIG_USB_G_PRINTER is not set +# CONFIG_USB_CDC_COMPOSITE is not set +# CONFIG_USB_G_NOKIA is not set +# CONFIG_USB_G_MULTI is not set + +# +# OTG and related infrastructure +# +# CONFIG_USB_GPIO_VBUS is not set +# CONFIG_USB_ULPI is not set +# CONFIG_NOP_USB_XCEIV is not set +CONFIG_MMC=y +# CONFIG_MMC_DEBUG is not set +CONFIG_MMC_UNSAFE_RESUME=y + +# +# MMC/SD/SDIO Card Drivers +# +CONFIG_MMC_BLOCK=y +# CONFIG_MMC_BLOCK_BOUNCE is not set +# CONFIG_SDIO_UART is not set +# CONFIG_MMC_TEST is not set + +# +# MMC/SD/SDIO Host Controller Drivers +# +# CONFIG_MMC_SDHCI is not set +# CONFIG_MEMSTICK is not set +# CONFIG_NEW_LEDS is not set +# CONFIG_ACCESSIBILITY is not set +CONFIG_RTC_LIB=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_HCTOSYS=y +CONFIG_RTC_HCTOSYS_DEVICE="rtc0" +# CONFIG_RTC_DEBUG is not set + +# +# RTC interfaces +# +# CONFIG_RTC_INTF_SYSFS is not set +# CONFIG_RTC_INTF_PROC is not set +# CONFIG_RTC_INTF_DEV is not set +# CONFIG_RTC_DRV_TEST is not set + +# +# I2C RTC drivers +# +# CONFIG_RTC_DRV_DS1307 is not set +# CONFIG_RTC_DRV_DS1374 is not set +# CONFIG_RTC_DRV_DS1672 is not set +# CONFIG_RTC_DRV_MAX6900 is not set +# CONFIG_RTC_DRV_RS5C372 is not set +# CONFIG_RTC_DRV_ISL1208 is not set +# CONFIG_RTC_DRV_X1205 is not set +# CONFIG_RTC_DRV_PCF8563 is not set +# CONFIG_RTC_DRV_PCF8583 is not set +# CONFIG_RTC_DRV_M41T80 is not set +# CONFIG_RTC_DRV_BQ32K is not set +# CONFIG_RTC_DRV_S35390A is not set +# CONFIG_RTC_DRV_FM3130 is not set +# CONFIG_RTC_DRV_RX8581 is not set +# CONFIG_RTC_DRV_RX8025 is not set + +# +# SPI RTC drivers +# + +# +# Platform RTC drivers +# +# CONFIG_RTC_DRV_CMOS is not set +# CONFIG_RTC_DRV_DS1286 is not set +# CONFIG_RTC_DRV_DS1511 is not set +# CONFIG_RTC_DRV_DS1553 is not set +# CONFIG_RTC_DRV_DS1742 is not set +# CONFIG_RTC_DRV_STK17TA8 is not set +# CONFIG_RTC_DRV_M48T86 is not set +# CONFIG_RTC_DRV_M48T35 is not set +# CONFIG_RTC_DRV_M48T59 is not set +# CONFIG_RTC_DRV_MSM6242 is not set +# CONFIG_RTC_DRV_BQ4802 is not set +# CONFIG_RTC_DRV_RP5C01 is not set +# CONFIG_RTC_DRV_V3020 is not set + +# +# on-CPU RTC drivers +# +# CONFIG_DMADEVICES is not set +# CONFIG_AUXDISPLAY is not set +# CONFIG_UIO is not set + +# +# TI VLYNQ +# +CONFIG_STAGING=y +# CONFIG_STAGING_EXCLUDE_BUILD is not set +# CONFIG_ECHO is not set + +# +# Qualcomm MSM Camera And Video +# + +# +# Camera Sensor Selection +# +# CONFIG_INPUT_GPIO is not set +# CONFIG_POHMELFS is not set + +# +# RAR Register Driver +# +# CONFIG_RAR_REGISTER is not set +# CONFIG_IIO is not set +# CONFIG_RAMZSWAP is not set +# CONFIG_BATMAN_ADV is not set +# CONFIG_STRIP is not set +# CONFIG_FB_SM7XX is not set + +# +# File systems +# +CONFIG_EXT2_FS=y +CONFIG_EXT2_FS_XATTR=y +CONFIG_EXT2_FS_POSIX_ACL=y +CONFIG_EXT2_FS_SECURITY=y +# CONFIG_EXT2_FS_XIP is not set +CONFIG_EXT3_FS=y +# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set +CONFIG_EXT3_FS_XATTR=y +CONFIG_EXT3_FS_POSIX_ACL=y +CONFIG_EXT3_FS_SECURITY=y +# CONFIG_EXT4_FS is not set +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set +CONFIG_FS_MBCACHE=y +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +CONFIG_FS_POSIX_ACL=y +# CONFIG_XFS_FS is not set +# CONFIG_GFS2_FS is not set +# CONFIG_OCFS2_FS is not set +# CONFIG_BTRFS_FS is not set +# CONFIG_NILFS2_FS is not set +CONFIG_FILE_LOCKING=y +CONFIG_FSNOTIFY=y +# CONFIG_DNOTIFY is not set +CONFIG_INOTIFY=y +CONFIG_INOTIFY_USER=y +# CONFIG_QUOTA is not set +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_FUSE_FS is not set + +# +# Caches +# +# CONFIG_FSCACHE is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +# CONFIG_MSDOS_FS is not set +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_SYSCTL=y +CONFIG_PROC_PAGE_MONITOR=y +CONFIG_SYSFS=y +CONFIG_TMPFS=y +# CONFIG_TMPFS_POSIX_ACL is not set +# CONFIG_HUGETLB_PAGE is not set +# CONFIG_CONFIGFS_FS is not set +CONFIG_MISC_FILESYSTEMS=y +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_JFFS2_FS is not set +# CONFIG_LOGFS is not set +# CONFIG_CRAMFS is not set +# CONFIG_SQUASHFS is not set +# CONFIG_VXFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_OMFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set +CONFIG_NETWORK_FILESYSTEMS=y +# CONFIG_NFS_FS is not set +# CONFIG_NFSD is not set +# CONFIG_SMB_FS is not set +# CONFIG_CIFS is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=y +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +# CONFIG_NLS_CODEPAGE_850 is not set +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set +CONFIG_NLS_ISO8859_1=y +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +# CONFIG_NLS_UTF8 is not set +# CONFIG_DLM is not set + +# +# Kernel hacking +# +CONFIG_PRINTK_TIME=y +CONFIG_ENABLE_WARN_DEPRECATED=y +CONFIG_ENABLE_MUST_CHECK=y +CONFIG_FRAME_WARN=1024 +CONFIG_MAGIC_SYSRQ=y +# CONFIG_STRIP_ASM_SYMS is not set +# CONFIG_UNUSED_SYMBOLS is not set +CONFIG_DEBUG_FS=y +# CONFIG_HEADERS_CHECK is not set +CONFIG_DEBUG_KERNEL=y +# CONFIG_DEBUG_SHIRQ is not set +CONFIG_DETECT_SOFTLOCKUP=y +# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 +CONFIG_DETECT_HUNG_TASK=y +# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set +CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0 +CONFIG_SCHED_DEBUG=y +CONFIG_SCHEDSTATS=y +CONFIG_TIMER_STATS=y +# CONFIG_DEBUG_OBJECTS is not set +CONFIG_DEBUG_SLAB=y +# CONFIG_DEBUG_SLAB_LEAK is not set +# CONFIG_DEBUG_KMEMLEAK is not set +# CONFIG_DEBUG_PREEMPT is not set +# CONFIG_DEBUG_RT_MUTEXES is not set +# CONFIG_RT_MUTEX_TESTER is not set +# CONFIG_DEBUG_SPINLOCK is not set +CONFIG_DEBUG_MUTEXES=y +# CONFIG_DEBUG_LOCK_ALLOC is not set +# CONFIG_PROVE_LOCKING is not set +# CONFIG_LOCK_STAT is not set +CONFIG_DEBUG_SPINLOCK_SLEEP=y +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set +# CONFIG_DEBUG_KOBJECT is not set +# CONFIG_DEBUG_HIGHMEM is not set +CONFIG_DEBUG_BUGVERBOSE=y +CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_VM=y +# CONFIG_DEBUG_WRITECOUNT is not set +# CONFIG_DEBUG_MEMORY_INIT is not set +# CONFIG_DEBUG_LIST is not set +CONFIG_DEBUG_SG=y +# CONFIG_DEBUG_NOTIFIERS is not set +# CONFIG_DEBUG_CREDENTIALS is not set +# CONFIG_BOOT_PRINTK_DELAY is not set +# CONFIG_RCU_TORTURE_TEST is not set +# CONFIG_RCU_CPU_STALL_DETECTOR is not set +# CONFIG_BACKTRACE_SELF_TEST is not set +# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set +# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set +# CONFIG_LKDTM is not set +# CONFIG_FAULT_INJECTION is not set +# CONFIG_SYSCTL_SYSCALL_CHECK is not set +# CONFIG_PAGE_POISONING is not set +CONFIG_HAVE_FUNCTION_TRACER=y +CONFIG_TRACING_SUPPORT=y +CONFIG_FTRACE=y +# CONFIG_FUNCTION_TRACER is not set +# CONFIG_IRQSOFF_TRACER is not set +# CONFIG_PREEMPT_TRACER is not set +# CONFIG_SCHED_TRACER is not set +# CONFIG_ENABLE_DEFAULT_TRACERS is not set +# CONFIG_BOOT_TRACER is not set +CONFIG_BRANCH_PROFILE_NONE=y +# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set +# CONFIG_PROFILE_ALL_BRANCHES is not set +# CONFIG_STACK_TRACER is not set +# CONFIG_KMEMTRACE is not set +# CONFIG_WORKQUEUE_TRACER is not set +# CONFIG_BLK_DEV_IO_TRACE is not set +# CONFIG_DYNAMIC_DEBUG is not set +# CONFIG_SAMPLES is not set +CONFIG_HAVE_ARCH_KGDB=y +# CONFIG_KGDB is not set +CONFIG_ARM_UNWIND=y +# CONFIG_DEBUG_USER is not set +# CONFIG_DEBUG_ERRORS is not set +# CONFIG_DEBUG_STACK_USAGE is not set +# CONFIG_DEBUG_LL is not set +# CONFIG_OC_ETM is not set + +# +# Security options +# +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set +# CONFIG_SECURITYFS is not set +# CONFIG_DEFAULT_SECURITY_SELINUX is not set +# CONFIG_DEFAULT_SECURITY_SMACK is not set +# CONFIG_DEFAULT_SECURITY_TOMOYO is not set +CONFIG_DEFAULT_SECURITY_DAC=y +CONFIG_DEFAULT_SECURITY="" +CONFIG_CRYPTO=y + +# +# Crypto core or helper +# +CONFIG_CRYPTO_ALGAPI=y +CONFIG_CRYPTO_ALGAPI2=y +CONFIG_CRYPTO_AEAD=y +CONFIG_CRYPTO_AEAD2=y +CONFIG_CRYPTO_BLKCIPHER=y +CONFIG_CRYPTO_BLKCIPHER2=y +CONFIG_CRYPTO_HASH=y +CONFIG_CRYPTO_HASH2=y +CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_PCOMP=y +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_MANAGER2=y +# CONFIG_CRYPTO_GF128MUL is not set +# CONFIG_CRYPTO_NULL is not set +# CONFIG_CRYPTO_PCRYPT is not set +CONFIG_CRYPTO_WORKQUEUE=y +# CONFIG_CRYPTO_CRYPTD is not set +CONFIG_CRYPTO_AUTHENC=y +# CONFIG_CRYPTO_TEST is not set + +# +# Authenticated Encryption with Associated Data +# +# CONFIG_CRYPTO_CCM is not set +# CONFIG_CRYPTO_GCM is not set +# CONFIG_CRYPTO_SEQIV is not set + +# +# Block modes +# +CONFIG_CRYPTO_CBC=y +# CONFIG_CRYPTO_CTR is not set +# CONFIG_CRYPTO_CTS is not set +CONFIG_CRYPTO_ECB=y +# CONFIG_CRYPTO_LRW is not set +# CONFIG_CRYPTO_PCBC is not set +# CONFIG_CRYPTO_XTS is not set + +# +# Hash modes +# +CONFIG_CRYPTO_HMAC=y +# CONFIG_CRYPTO_XCBC is not set +# CONFIG_CRYPTO_VMAC is not set + +# +# Digest +# +# CONFIG_CRYPTO_CRC32C is not set +# CONFIG_CRYPTO_GHASH is not set +# CONFIG_CRYPTO_MD4 is not set +CONFIG_CRYPTO_MD5=y +# CONFIG_CRYPTO_MICHAEL_MIC is not set +# CONFIG_CRYPTO_RMD128 is not set +# CONFIG_CRYPTO_RMD160 is not set +# CONFIG_CRYPTO_RMD256 is not set +# CONFIG_CRYPTO_RMD320 is not set +CONFIG_CRYPTO_SHA1=y +# CONFIG_CRYPTO_SHA256 is not set +# CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_TGR192 is not set +# CONFIG_CRYPTO_WP512 is not set + +# +# Ciphers +# +CONFIG_CRYPTO_AES=y +# CONFIG_CRYPTO_ANUBIS is not set +CONFIG_CRYPTO_ARC4=y +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_CAMELLIA is not set +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +CONFIG_CRYPTO_DES=y +# CONFIG_CRYPTO_FCRYPT is not set +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_SALSA20 is not set +# CONFIG_CRYPTO_SEED is not set +# CONFIG_CRYPTO_SERPENT is not set +# CONFIG_CRYPTO_TEA is not set +CONFIG_CRYPTO_TWOFISH=y +CONFIG_CRYPTO_TWOFISH_COMMON=y + +# +# Compression +# +CONFIG_CRYPTO_DEFLATE=y +# CONFIG_CRYPTO_ZLIB is not set +# CONFIG_CRYPTO_LZO is not set + +# +# Random Number Generation +# +# CONFIG_CRYPTO_ANSI_CPRNG is not set +CONFIG_CRYPTO_HW=y +# CONFIG_BINARY_PRINTF is not set + +# +# Library routines +# +CONFIG_BITREVERSE=y +CONFIG_GENERIC_FIND_LAST_BIT=y +CONFIG_CRC_CCITT=y +CONFIG_CRC16=y +# CONFIG_CRC_T10DIF is not set +# CONFIG_CRC_ITU_T is not set +CONFIG_CRC32=y +# CONFIG_CRC7 is not set +# CONFIG_LIBCRC32C is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y +CONFIG_DECOMPRESS_GZIP=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y +CONFIG_HAS_DMA=y +CONFIG_NLATTR=y
Signature · 1 line
1.6.5.6
PATCH 9/10 tegra: harmony: Add harmony board file
In reply to konkers at google.comQuoted 10 lines · konkers at google.com
From: Colin Cross <[email protected]>
Signed-off-by Colin Cross <[email protected]>Signed-off-by Erik Gilling <[email protected]>--- arch/arm/mach-tegra/Makefile | 4 + arch/arm/mach-tegra/board-harmony-panel.c | 75 ++++++++++++++ arch/arm/mach-tegra/board-harmony-pinmux.c | 144 ++++++++++++++++++++++++++++ arch/arm/mach-tegra/board-harmony.c | 129 +++++++++++++++++++++++++ arch/arm/mach-tegra/board-harmony.h | 22 ++++
I think that both panel definition and pinmux can be in the board-harmony.c and thus the board-harmony.h is not needed.
Quoted 412 lines
5 files changed, 374 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-tegra/board-harmony-panel.c create mode 100644 arch/arm/mach-tegra/board-harmony-pinmux.c create mode 100644 arch/arm/mach-tegra/board-harmony.c create mode 100644 arch/arm/mach-tegra/board-harmony.harch/arm/mach-tegra/Makefile +4
-0@@ -9,3 +9,7 @@ obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += clock.o obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra2_clocks.o obj-$(CONFIG_SMP) += platsmp.o localtimer.o headsmp.o obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o + +obj-${CONFIG_MACH_HARMONY} += board-harmony.o +obj-${CONFIG_MACH_HARMONY} += board-harmony-pinmux.o +obj-${CONFIG_MACH_HARMONY} += board-harmony-panel.oarch/arm/mach-tegra/board-harmony-panel.c new file +75
-0@@ -0,0 +1,75 @@ +/* +* arch/arm/mach-tegra/board-harmony-panel.c +* +* Copyright (C) 2010 Google, 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 <linux/resource.h> +#include <linux/platform_device.h> +#include <asm/mach-types.h> +#include <mach/irqs.h> +#include <mach/iomap.h> +#include <mach/tegra_fb.h> + +/* Framebuffer */ +static struct resource fb_resource[] = { + [0 ] = { + .start =INT_DISPLAY_GENERAL , + .end =INT_DISPLAY_GENERAL , + .flags =IORESOURCE_IRQ , + }, + [1 ] = { + .start =TEGRA_DISPLAY_BASE , + .end =TEGRA_DISPLAY_BASE +TEGRA_DISPLAY_SIZE -1 , + .flags =IORESOURCE_MEM , + }, + [2 ] = { + .start =0x1c012000 , + .end =0x1c012000 +0x500000 -1 , + .flags =IORESOURCE_MEM , + }, +}; + +static struct tegra_fb_lcd_data tegra_fb_lcd_platform_data = { + .lcd_xres =1024 , + .lcd_yres =600 , + .fb_xres =1024 , + .fb_yres =600 , + .bits_per_pixel =16 , +}; + +static struct platform_device tegra_fb_device = { + .name ="tegrafb" , + .id =0 , + .resource = fb_resource, + .num_resources =ARRAY_SIZE (fb_resource), + .dev = { + .platform_data = &tegra_fb_lcd_platform_data, + }, +}; + +static int __init harmony_init_panel (void ) { +int ret; + +if (!machine_is_harmony ()) +return 0 ; + + ret =platform_device_register (&tegra_fb_device); +if (ret !=0 ) +return ret; + +return 0 ; +} + +device_initcall (harmony_init_panel); +arch/arm/mach-tegra/board-harmony-pinmux.c new file +144
-0@@ -0,0 +1,144 @@ +/* +* arch/arm/mach-tegra/board-harmony-pinmux.c +* +* Copyright (C) 2010 Google, 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 <linux/kernel.h> +#include <mach/pinmux.h> + +#include "board-harmony.h" + +static struct tegra_pingroup_config harmony_pinmux[] = { + {TEGRA_PINGROUP_ATA ,TEGRA_MUX_IDE ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_ATB ,TEGRA_MUX_SDIO4 ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_ATC ,TEGRA_MUX_NAND ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_ATD ,TEGRA_MUX_GMI ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_ATE ,TEGRA_MUX_GMI ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_CDEV1 ,TEGRA_MUX_OSC ,TEGRA_PUPD_PULL_DOWN ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_CDEV2 ,TEGRA_MUX_PLLP_OUT4 ,TEGRA_PUPD_PULL_DOWN ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_CRTP ,TEGRA_MUX_CRT ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_CSUS ,TEGRA_MUX_VI_SENSOR_CLK ,TEGRA_PUPD_PULL_DOWN ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_DAP1 ,TEGRA_MUX_DAP1 ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_DAP2 ,TEGRA_MUX_DAP2 ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_DAP3 ,TEGRA_MUX_DAP3 ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_DAP4 ,TEGRA_MUX_DAP4 ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_DDC ,TEGRA_MUX_I2C2 ,TEGRA_PUPD_PULL_UP ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_DTA ,TEGRA_MUX_SDIO2 ,TEGRA_PUPD_PULL_UP ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_DTB ,TEGRA_MUX_RSVD1 ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_DTC ,TEGRA_MUX_RSVD1 ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_DTD ,TEGRA_MUX_SDIO2 ,TEGRA_PUPD_PULL_UP ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_DTE ,TEGRA_MUX_RSVD1 ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_DTF ,TEGRA_MUX_I2C3 ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_GMA ,TEGRA_MUX_SDIO4 ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_GMB ,TEGRA_MUX_GMI ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_GMC ,TEGRA_MUX_UARTD ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_GMD ,TEGRA_MUX_GMI ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_GME ,TEGRA_MUX_SDIO4 ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_GPU ,TEGRA_MUX_GMI ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_GPU7 ,TEGRA_MUX_RTCK ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_GPV ,TEGRA_MUX_PCIE ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_HDINT ,TEGRA_MUX_HDMI ,TEGRA_PUPD_PULL_UP ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_I2CP ,TEGRA_MUX_I2C ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_IRRX ,TEGRA_MUX_UARTA ,TEGRA_PUPD_PULL_UP ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_IRTX ,TEGRA_MUX_UARTA ,TEGRA_PUPD_PULL_UP ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_KBCA ,TEGRA_MUX_KBC ,TEGRA_PUPD_PULL_UP ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_KBCB ,TEGRA_MUX_KBC ,TEGRA_PUPD_PULL_UP ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_KBCC ,TEGRA_MUX_KBC ,TEGRA_PUPD_PULL_UP ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_KBCD ,TEGRA_MUX_KBC ,TEGRA_PUPD_PULL_UP ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_KBCE ,TEGRA_MUX_KBC ,TEGRA_PUPD_PULL_UP ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_KBCF ,TEGRA_MUX_KBC ,TEGRA_PUPD_PULL_UP ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_LCSN ,TEGRA_MUX_DISPLAYA ,TEGRA_PUPD_PULL_UP ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_LD0 ,TEGRA_MUX_DISPLAYA ,TEGRA_PUPD_PULL_DOWN ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_LD1 ,TEGRA_MUX_DISPLAYA ,TEGRA_PUPD_PULL_DOWN ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_LD10 ,TEGRA_MUX_DISPLAYA ,TEGRA_PUPD_PULL_DOWN ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_LD11 ,TEGRA_MUX_DISPLAYA ,TEGRA_PUPD_PULL_DOWN ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_LD12 ,TEGRA_MUX_DISPLAYA ,TEGRA_PUPD_PULL_DOWN ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_LD13 ,TEGRA_MUX_DISPLAYA ,TEGRA_PUPD_PULL_DOWN ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_LD14 ,TEGRA_MUX_DISPLAYA ,TEGRA_PUPD_PULL_DOWN ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_LD15 ,TEGRA_MUX_DISPLAYA ,TEGRA_PUPD_PULL_DOWN ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_LD16 ,TEGRA_MUX_DISPLAYA ,TEGRA_PUPD_PULL_DOWN ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_LD17 ,TEGRA_MUX_DISPLAYA ,TEGRA_PUPD_PULL_DOWN ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_LD2 ,TEGRA_MUX_DISPLAYA ,TEGRA_PUPD_PULL_DOWN ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_LD3 ,TEGRA_MUX_DISPLAYA ,TEGRA_PUPD_PULL_DOWN ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_LD4 ,TEGRA_MUX_DISPLAYA ,TEGRA_PUPD_PULL_DOWN ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_LD5 ,TEGRA_MUX_DISPLAYA ,TEGRA_PUPD_PULL_DOWN ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_LD6 ,TEGRA_MUX_DISPLAYA ,TEGRA_PUPD_PULL_DOWN ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_LD7 ,TEGRA_MUX_DISPLAYA ,TEGRA_PUPD_PULL_DOWN ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_LD8 ,TEGRA_MUX_DISPLAYA ,TEGRA_PUPD_PULL_DOWN ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_LD9 ,TEGRA_MUX_DISPLAYA ,TEGRA_PUPD_PULL_DOWN ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_LDC ,TEGRA_MUX_DISPLAYA ,TEGRA_PUPD_PULL_UP ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_LDI ,TEGRA_MUX_DISPLAYA ,TEGRA_PUPD_PULL_DOWN ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_LHP0 ,TEGRA_MUX_DISPLAYA ,TEGRA_PUPD_PULL_DOWN ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_LHP1 ,TEGRA_MUX_DISPLAYA ,TEGRA_PUPD_PULL_DOWN ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_LHP2 ,TEGRA_MUX_DISPLAYA ,TEGRA_PUPD_PULL_DOWN ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_LHS ,TEGRA_MUX_DISPLAYA ,TEGRA_PUPD_PULL_UP ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_LM0 ,TEGRA_MUX_DISPLAYA ,TEGRA_PUPD_PULL_UP ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_LM1 ,TEGRA_MUX_DISPLAYA ,TEGRA_PUPD_PULL_UP ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_LPP ,TEGRA_MUX_DISPLAYA ,TEGRA_PUPD_PULL_DOWN ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_LPW0 ,TEGRA_MUX_DISPLAYA ,TEGRA_PUPD_PULL_UP ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_LPW1 ,TEGRA_MUX_DISPLAYA ,TEGRA_PUPD_PULL_UP ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_LPW2 ,TEGRA_MUX_DISPLAYA ,TEGRA_PUPD_PULL_UP ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_LSC0 ,TEGRA_MUX_DISPLAYA ,TEGRA_PUPD_PULL_UP ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_LSC1 ,TEGRA_MUX_DISPLAYA ,TEGRA_PUPD_PULL_UP ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_LSCK ,TEGRA_MUX_DISPLAYA ,TEGRA_PUPD_PULL_UP ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_LSDA ,TEGRA_MUX_DISPLAYA ,TEGRA_PUPD_PULL_UP ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_LSDI ,TEGRA_MUX_DISPLAYA ,TEGRA_PUPD_PULL_UP ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_LSPI ,TEGRA_MUX_DISPLAYA ,TEGRA_PUPD_PULL_UP ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_LVP0 ,TEGRA_MUX_DISPLAYA ,TEGRA_PUPD_PULL_UP ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_LVP1 ,TEGRA_MUX_DISPLAYA ,TEGRA_PUPD_PULL_DOWN ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_LVS ,TEGRA_MUX_DISPLAYA ,TEGRA_PUPD_PULL_UP ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_OWC ,TEGRA_MUX_RSVD2 ,TEGRA_PUPD_PULL_UP ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_PMC ,TEGRA_MUX_PWR_ON ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_PTA ,TEGRA_MUX_HDMI ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_RM ,TEGRA_MUX_I2C ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_SDB ,TEGRA_MUX_PWM ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_SDC ,TEGRA_MUX_PWM ,TEGRA_PUPD_PULL_UP ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_SDD ,TEGRA_MUX_PWM ,TEGRA_PUPD_PULL_UP ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_SDIO1 ,TEGRA_MUX_SDIO1 ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_SLXA ,TEGRA_MUX_PCIE ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_SLXC ,TEGRA_MUX_SPDIF ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_SLXD ,TEGRA_MUX_SPDIF ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_SLXK ,TEGRA_MUX_PCIE ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_SPDI ,TEGRA_MUX_RSVD2 ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_SPDO ,TEGRA_MUX_RSVD2 ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_SPIA ,TEGRA_MUX_GMI ,TEGRA_PUPD_PULL_DOWN ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_SPIB ,TEGRA_MUX_GMI ,TEGRA_PUPD_PULL_DOWN ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_SPIC ,TEGRA_MUX_GMI ,TEGRA_PUPD_PULL_UP ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_SPID ,TEGRA_MUX_SPI1 ,TEGRA_PUPD_PULL_DOWN ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_SPIE ,TEGRA_MUX_SPI1 ,TEGRA_PUPD_PULL_UP ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_SPIF ,TEGRA_MUX_SPI1 ,TEGRA_PUPD_PULL_DOWN ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_SPIG ,TEGRA_MUX_SPI2_ALT ,TEGRA_PUPD_PULL_UP ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_SPIH ,TEGRA_MUX_SPI2_ALT ,TEGRA_PUPD_PULL_UP ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_UAA ,TEGRA_MUX_ULPI ,TEGRA_PUPD_PULL_UP ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_UAB ,TEGRA_MUX_ULPI ,TEGRA_PUPD_PULL_UP ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_UAC ,TEGRA_MUX_RSVD2 ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_UAD ,TEGRA_MUX_IRDA ,TEGRA_PUPD_PULL_UP ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_UCA ,TEGRA_MUX_UARTC ,TEGRA_PUPD_PULL_UP ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_UCB ,TEGRA_MUX_UARTC ,TEGRA_PUPD_PULL_UP ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_UDA ,TEGRA_MUX_ULPI ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_TRISTATE }, + {TEGRA_PINGROUP_CK32 ,TEGRA_MUX_NONE ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_DDRC ,TEGRA_MUX_NONE ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_PMCA ,TEGRA_MUX_NONE ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_PMCB ,TEGRA_MUX_NONE ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_PMCC ,TEGRA_MUX_NONE ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_PMCD ,TEGRA_MUX_NONE ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_PMCE ,TEGRA_MUX_NONE ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_XM2C ,TEGRA_MUX_NONE ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_NORMAL }, + {TEGRA_PINGROUP_XM2D ,TEGRA_MUX_NONE ,TEGRA_PUPD_NORMAL ,TEGRA_TRI_NORMAL }, +}; + +void harmony_pinmux_init (void ) +{ +tegra_pinmux_config_table (harmony_pinmux,ARRAY_SIZE (harmony_pinmux)); +}arch/arm/mach-tegra/board-harmony.c new file +129
-0@@ -0,0 +1,129 @@ +/* +* arch/arm/mach-tegra/board-harmony.c +* +* Copyright (C) 2010 Google, 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 <linux/kernel.h> +#include <linux/init.h> +#include <linux/platform_device.h> +#include <linux/serial_8250.h> +#include <linux/clk.h> +#include <linux/dma-mapping.h> +#include <linux/pda_power.h> + +#include <asm/mach-types.h> +#include <asm/mach/arch.h> +#include <asm/mach/time.h> +#include <asm/setup.h> + +#include <mach/io.h> +#include <mach/iomap.h> +#include <mach/irqs.h> +#include <mach/iomap.h> + +#include "board.h" +#include "board-harmony.h" + +/* NVidia bootloader tags */ +#define ATAG_NVIDIA 0x41000801 + +#define ATAG_NVIDIA_RM 0x1 +#define ATAG_NVIDIA_DISPLAY 0x2 +#define ATAG_NVIDIA_FRAMEBUFFER 0x3 +#define ATAG_NVIDIA_CHIPSHMOO 0x4 +#define ATAG_NVIDIA_CHIPSHMOOPHYS 0x5 +#define ATAG_NVIDIA_PRESERVED_MEM_0 0x10000 +#define ATAG_NVIDIA_PRESERVED_MEM_N 2 +#define ATAG_NVIDIA_FORCE_32 0x7fffffff + +struct tag_tegra { +__u32 bootarg_key; +__u32 bootarg_len; +char bootarg[1 ]; +}; + +static int __init parse_tag_nvidia (const struct tag *tag) +{ + +return 0 ; +} +__tagtable (ATAG_NVIDIA , parse_tag_nvidia); + +static struct plat_serial8250_port debug_uart_platform_data[] = { + { + .membase =IO_ADDRESS (TEGRA_UARTD_BASE ), + .mapbase =TEGRA_UARTD_BASE , + .irq =INT_UARTD , + .flags =UPF_BOOT_AUTOCONF , + .iotype =UPIO_MEM , + .regshift =2 , + .uartclk =216000000 /16 *16 , + }, { + .flags =0 + } +}; + +static struct platform_device debug_uart = { + .name ="serial8250" , + .id =PLAT8250_DEV_PLATFORM , + .dev = { + .platform_data = debug_uart_platform_data, + }, +}; + +static struct platform_device *harmony_devices[]__initdata = { + &debug_uart, +}; + +static void __init tegra_harmony_fixup (struct machine_desc *desc,struct tag *tags, +char **cmdline,struct meminfo *mi) +{ + mi->nr_banks =2 ; + mi->bank[0 ].start =PHYS_OFFSET ; + mi->bank[0 ].node =PHYS_TO_NID (PHYS_OFFSET ); + mi->bank[0 ].size =448 *SZ_1M ; + mi->bank[1 ].start =SZ_512M ; + mi->bank[1 ].node =PHYS_TO_NID (SZ_512M ); + mi->bank[1 ].size =SZ_512M ; +} + +static void __init tegra_harmony_init (void ) +{ +struct clk *clk; + +tegra_common_init (); + + clk =clk_get_sys (NULL ,"pll_p" ); +clk_enable (clk); +clk_set_rate (clk,216000000 ); + + clk =clk_get_sys ("uart.3" ,NULL ); +clk_set_rate (clk,216000000 ); +clk_enable (clk); + +harmony_pinmux_init (); + +platform_add_devices (harmony_devices,ARRAY_SIZE (harmony_devices)); +} + +MACHINE_START (HARMONY ,"harmony" ) + .boot_params = 0x00000100, + .phys_io = IO_APB_PHYS, + .io_pg_offst = ((IO_APB_VIRT) >> 18) & 0xfffc, + .fixup = tegra_harmony_fixup, + .init_irq = tegra_init_irq, + .init_machine = tegra_harmony_init, + .map_io = tegra_map_common_io, + .timer = &tegra_timer, +MACHINE_END arch/arm/mach-tegra/board-harmony.h new file +22
-0@@ -0,0 +1,22 @@ +/* +* arch/arm/mach-tegra/board-harmony.h +* +* Copyright (C) 2010 Google, 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. +* +*/ + +#ifndef _MACH_TEGRA_BOARD_HARMONY_H +#define _MACH_TEGRA_BOARD_HARMONY_H + +void harmony_pinmux_init (void ); + +#endif
Signature · 2 lines
Sincerely yours, Mike.
PATCH 9/10 tegra: harmony: Add harmony board file
Quoted 3 lines · Mike Rapoport
I think that both panel definition and pinmux can be in the
board-harmony.cand thus theboard-harmony.his not needed.
In our experience board files get sufficiently cluttered with platform device definitions, callbacks, and fixups that splitting them apart make them much easer to deal with. See the sholes support at
http://android.git.kernel.org/?p=kernel/omap.git;a=tree;f=arch/arm/mach-omap2;hb=android-omap-2.6.32
.
-Erik
PATCH 9/10 tegra: harmony: Add harmony board file
Quoted 10 lines · Erik Gilling
Quoted 3 lines · Mike Rapoport
I think that both panel definition and pinmux can be in the
board-harmony.cand thus theboard-harmony.his not needed.In our experience board files get sufficiently cluttered with platform device definitions, callbacks, and fixups that splitting them apart make them much easer to deal with. See the sholes support at
http://android.git.kernel.org/?p=kernel/omap.git;a=tree;f=arch/arm/mach-omap2;hb=android-omap-2.6.32
.
I'm not sure that staring over with several small files for different board features is that necessary. If the board file becomes bloated than it'd make sense to split it. But a board file with three platform device definitions and mux table is not that big...
Quoted 1 line
-Erik
--
Sincerely yours,
Mike.
PATCH 8/10 tegra: Add framebuffer driver
In reply to konkers at google.comHi Colin, Erik,
Interesting work.
I'd recommend CCing linux-fbdev as well in future so that fbdev folks can also get a chance to review your new fbdev driver.
Quoted 33 lines · On Tue, Mar 16, 2010 at 2:41 PM, <[email protected]> wrote:
From: Colin Cross <[email protected]>
Signed-off-by Colin Cross <[email protected]>Signed-off-by Erik Gilling <[email protected]>---
?arch/arm/mach-tegra/include/mach/tegra_fb.h | ? 24 + ?drivers/video/Kconfig ? ? ? ? ? ? ? ? ? ? ? | ? 11 + ?drivers/video/Makefile ? ? ? ? ? ? ? ? ? ? ?| ? ?1 + ?drivers/video/tegrafb.c ? ? ? ? ? ? ? ? ? ? | ?620 +++++++++++++++++++++++++++?4 files changed, 656 insertions(+), 0 deletions(-) ?create mode 100644
arch/arm/mach-tegra/include/mach/tegra_fb.h?create mode 100644drivers/video/tegrafb.carch/arm/mach-tegra/include/mach/tegra_fb.h new file +14
-0@@ -0,0 +1,24 @@ +/* +* arch/arm/mach-tegra/include/mach/tegra_fb.h +* +* Copyright (C) 2010 Google, Inc. +* Author: Colin Cross <[email protected]> +* +* 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.
arch/arm/mach-tegra/include/mach/tegra_fb.h line 24
Quoted 10 lines
arch/arm/mach-tegra/include/mach/tegra_fb.h new file +10
-0+* +*/ + +struct tegra_fb_lcd_data { + ? ? ? int ? ? fb_xres; + ? ? ? int ? ? fb_yres; + ? ? ? int ? ? lcd_xres; + ? ? ? int ? ? lcd_yres; + ? ? ? int ? ? bits_per_pixel; +};
I'm trying to understand what's the difference between fb and lcd *res.
Quoted 8 lines
drivers/video/Kconfig +0
-0@@ -1074,6 +1074,17 @@ config FB_RIVA_BACKLIGHT? ? ? ?help
? ? ? ? ?Say Y here if you want to control the backlight of your display.
Quoted 10 lines
+config
FB_TEGRA
+ ? ? ? tristate "NVIDIA Tegra SoC display support"
+ ? ? ? depends onARCH_TEGRA&& FB = y
+ ? ? ? selectFB_CFB_FILLRECT
+ ? ? ? selectFB_CFB_COPYAREA
+ ? ? ? selectFB_CFB_IMAGEBLIT
+ ? ? ? default FB
+ ? ? ? help
+ ? ? ? ? This driver supports the NVIDIA Tegra systems-on-a-chip. ?This
+ ? ? ? ? driver can not be compiled as a module.
Out of curiosity, why not?
Quoted 46 lines
+
?configFB_I810
? ? ? ?tristate "Intel 810/815 support (EXPERIMENTAL)" ? ? ? ?depends on EXPERIMENTAL && FB && PCI &&X86_32&&AGP_INTELdrivers/video/Makefile +0
-0@@ -129,6 +129,7 @@ obj-$(CONFIG_XEN_FBDEV_FRONTEND) ?+= xen-fbfront.o?obj-$(CONFIG_FB_CARMINE) ? ? ? ? ?+= carminefb.o
?obj-$(CONFIG_FB_MB862XX) ? ? ? ? += mb862xx/
?obj-$(CONFIG_FB_MSM) ? ? ? ? ? ? ?+= msm/
+obj-$(CONFIG_FB_TEGRA) ? ? ? ? ? ?+= tegrafb.o?# Platform or fallback drivers go here
?obj-$(CONFIG_FB_UVESA) ? ? ? ? ? ?+= uvesafb.odrivers/video/tegrafb.c new file +24
-0@@ -0,0 +1,620 @@ +/* +* drivers/video/tegrafb.c +* +* Copyright (C) 2010 Google, Inc. +* Author: Colin Cross <[email protected]> +* ? ? ? ? Travis Geiselbrecht <[email protected]> +* +* 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/fb.h> +#include <linux/module.h> +#include <linux/kernel.h> +#include <linux/errno.h> +#include <linux/string.h> +#include <linux/mm.h>
drivers/video/tegrafb.c line 34
Quoted 10 lines
drivers/video/tegrafb.c new file +10
-0+#include <linux/slab.h> +#include <linux/delay.h> +#include <linux/platform_device.h> +#include <linux/interrupt.h> +#include <linux/clk.h> +#include <linux/wait.h> +#include <asm/cacheflush.h> +#include <mach/tegra_fb.h> + +#define DEBUG 1
You want to enable Debug by default for everyone?
drivers/video/tegrafb.c line 46
Quoted 12 lines
drivers/video/tegrafb.c new file +12
-0+ +struct tegra_fb_info { + ? ? ? struct clk *clk; + ? ? ? struct resource *reg_mem; + ? ? ? struct resource *fb_mem; + ? ? ? void __iomem *reg_base; + ? ? ? wait_queue_head_t event_wq; + ? ? ? unsigned int wait_condition; + ? ? ? int lcd_xres; + ? ? ? int lcd_yres; + ? ? ? int irq; +};
I think a comment about lcd_.res would help us understand what its used for and how it differs from fb_.res. How come it is being duplicated in multiple structures?
drivers/video/tegrafb.c line 345
Quoted 9 lines
drivers/video/tegrafb.c new file +9
-0+static int tegra_fb_cursor (struct fb_info *info,struct fb_cursor *cursor) +{ + ? ? ? return 0; +} + +static int tegra_fb_sync (struct fb_info *info) +{ + ? ? ? return 0; +}
Out of curiosity, why populate these functions if they don't do anything?
drivers/video/tegrafb.c line 348
Quoted 3 lines
drivers/video/tegrafb.c new file +3
-0+ +#ifdef DEBUG +#define DUMP_REG (a) pr_info("%-32s\t%03x\t%08x\n", #a, a, tegra_fb_readl(tegra_fb, a));
Could pr_debug be useful above?
drivers/video/tegrafb.c line 61
Quoted 3 lines
drivers/video/tegrafb.c new file +3
-0+static struct fb_ops tegra_fb_ops = { + ? ? ? .fb_cursor = tegra_fb_cursor, + ? ? ? .fb_sync = tegra_fb_sync,
These 2 were the empty functions from above. I'm guessing this isn't needed.
Quoted 4 lines
drivers/video/tegrafb.c new file +4
-0+ +static int tegra_plat_remove (struct platform_device *pdev) +{ + ? ? ? struct fb_info *fb = platform_get_drvdata(pdev);
drivers/video/tegrafb.c line 75
Quoted 10 lines
drivers/video/tegrafb.c new file +10
-0+ ? ? ? struct tegra_fb_info *tegra_fb = fb->par; + ? ? ? clk_disable(tegra_fb->clk); + ? ? ? iounmap(fb->screen_base); + ? ? ? release_resource(tegra_fb->fb_mem); + ? ? ? iounmap(tegra_fb->reg_base); + ? ? ? release_resource(tegra_fb->reg_mem); + ? ? ? framebuffer_release(fb); + ? ? ? return 0; +} +
I didn't read through carefully but shouldn't there be an unregister_framebuffer in above? Wouldn't the above cause a free while the structures could still in use by fb*?
Thanks,
jaya
PATCH 8/10 tegra: Add framebuffer driver
(Sorry about the HTML - resending in plain text for the linux-fbdev list)
Hi Jaya, thanks for your comments.
Quoted 6 lines · Jaya Kumar
Hi Colin, Erik,
Interesting work.
I'd recommend CCing linux-fbdev as well in future so that fbdev folks can also get a chance to review your new fbdev driver.
Will do
Quoted 9 lines
+struct
tegra_fb_lcd_data{arch/arm/mach-tegra/include/mach/tegra_fb.h line 24
Quoted 6 lines
arch/arm/mach-tegra/include/mach/tegra_fb.h new file +6
-0+int fb_xres; +int fb_yres; +int lcd_xres; +int lcd_yres; +int bits_per_pixel; +};I'm trying to understand what's the difference between fb and lcd *res.
fb res is the resolution of the framebuffer driver as seen by userspace.
lcd res is the resolution of the screen connected to the Tegra pins. If
they are different, the Tegra display block can do scaling on the output.
Generally they will be the same. I'll add a comment to the lcd resolution.
Quoted 11 lines
drivers/video/Kconfig config FB_RIVA_BACKLIGHT · line 1086
Quoted 10 lines
drivers/video/Kconfig +10
-0+config FB_TEGRA + tristate "NVIDIA Tegra SoC display support" + depends on ARCH_TEGRA && FB = y + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + default FB + help + This driver supports the NVIDIA Tegra systems-on-a-chip. This + driver can not be compiled as a module.
Quoted 2 lines
Out of curiosity, why not?
Oversight, the option is tristate, so I'll remove this text.
Quoted 3 lines
Quoted 1 line
+#define DEBUG 1
You want to enable Debug by default for everyone?
Oops, I'll take it out
Quoted 7 lines
Quoted 7 lines
drivers/video/tegrafb.c new file +7
-0+struct tegra_fb_info { +struct clk *clk; +struct resource *reg_mem; +struct resource *fb_mem; +void __iomem *reg_base; +wait_queue_head_t event_wq; +unsigned int wait_condition;
Quoted 8 lines
drivers/video/tegrafb.c line 122
Quoted 4 lines
drivers/video/tegrafb.c new file +4
-0+int lcd_xres; +int lcd_yres; +int irq; +};I think a comment about lcd_.res would help us understand what its used for and how it differs from fb_.res. How come it is being duplicated in multiple structures?
The tegra_fb_lcd_data struct is passed in as platform_data, and used to
initialize the state in the tegra_fb_info struct.
Quoted 12 lines
+static int
tegra_fb_cursor(struct fb_info *info, struct fb_cursor *cursor)drivers/video/tegrafb.c line 345
Quoted 8 lines
drivers/video/tegrafb.c new file +8
-0+{ +return 0 ; +} + +static int tegra_fb_sync (struct fb_info *info) +{ +return 0 ; +}Out of curiosity, why populate these functions if they don't do anything?
They were placeholders, I'll remove them until they get implemented.
Quoted 7 lines
drivers/video/tegrafb.c
Quoted 3 lines
drivers/video/tegrafb.c new file +3
-0+ +#ifdef DEBUG +#define DUMP_REG (a) pr_info("%-32s\t%03x\t%08x\n", #a, a,
tegra_fb_readl(tegra_fb, a));Could
pr_debugbe useful above?
The dump_regs function still needs to be inside the #ifdef DEBUG, but I'll change the pr_info to pr_debug to lower the log level.
Quoted 6 lines
drivers/video/tegrafb.c line 414
Quoted 3 lines
drivers/video/tegrafb.c new file +3
-0+static struct fb_ops tegra_fb_ops = { + .fb_cursor = tegra_fb_cursor, + .fb_sync = tegra_fb_sync,These 2 were the empty functions from above. I'm guessing this isn't needed.
Removed
Quoted 10 lines
Quoted 10 lines
drivers/video/tegrafb.c new file +10
-0+ +static int tegra_plat_remove (struct platform_device *pdev) +{ +struct fb_info *fb =platform_get_drvdata (pdev); +struct tegra_fb_info *tegra_fb = fb->par; +clk_disable (tegra_fb->clk); +iounmap (fb->screen_base); +release_resource (tegra_fb->fb_mem); +iounmap (tegra_fb->reg_base); +release_resource (tegra_fb->reg_mem);
Quoted 9 lines
drivers/video/tegrafb.c line 593
Quoted 4 lines
drivers/video/tegrafb.c new file +4
-0+framebuffer_release (fb); +return 0 ; +} +I didn't read through carefully but shouldn't there be an
unregister_framebufferin above? Wouldn't the above cause a free while the structures could still in use by fb*?
Good catch - unregister_framebuffer should be the first call. We generally don't use modules much, so compiling as a module has been tested, but not running as a module.
Thanks,
Colin
PATCH 8/10 tegra: Add framebuffer driver
In reply to konkers at google.comQuoted 22 lines · konkers at google.com
drivers/video/tegrafb.c new file +22
-0+static int tegra_fb_set_par (struct fb_info *info) +{ +struct tegra_fb_info *tegra_fb = info->par; +struct fb_var_screeninfo *var = &info->var; +struct fb_fix_screeninfo *fix = &info->fix; +u32 color_depth; +unsigned int h_dda; +unsigned int v_dda; + +/* we only support RGB ordering for now */ +switch (var->bits_per_pixel) { +case 32 : +case 24 : + var->red.offset =0 ; + var->red.length =8 ; + var->green.offset =8 ; + var->green.length =8 ; + var->blue.offset =16 ; + var->blue.length =8 ; + color_depth =DC_COLOR_DEPTH_B8G8R8A8 ; +break ; +case 16 :
drivers/video/tegrafb.c line 255
Quoted 10 lines
drivers/video/tegrafb.c new file +10
-0+ var->red.offset =11 ; + var->red.length =5 ; + var->green.offset =5 ; + var->green.length =6 ; + var->blue.offset =0 ; + var->blue.length =5 ; + color_depth =DC_COLOR_DEPTH_B5G6R5 ; +break ; +default : +return -1 ;
Is this really -EPERM, "Operation not permitted"? Please use a proper errno code rather than just thinking "Oh, I'll use -1 because its easier".
PATCH 8/10 tegra: Add framebuffer driver
Quoted 28 lines · Russell King - ARM Linux
Quoted 27 lines · konkers at google.com
(quoted diff) +27
-0+static int tegra_fb_set_par(struct fb_info *info) +{ + ? ? struct tegra_fb_info *tegra_fb = info->par; + ? ? struct fb_var_screeninfo *var = &info->var; + ? ? struct fb_fix_screeninfo *fix = &info->fix; + ? ? u32 color_depth; + ? ? unsigned int h_dda; + ? ? unsigned int v_dda; + + ? ? /* we only support RGB ordering for now */ + ? ? switch (var->bits_per_pixel) { + ? ? case 32: + ? ? case 24: + ? ? ? ? ? ? var->red.offset = 0; + ? ? ? ? ? ? var->red.length = 8; + ? ? ? ? ? ? var->green.offset = 8; + ? ? ? ? ? ? var->green.length = 8; + ? ? ? ? ? ? var->blue.offset = 16; + ? ? ? ? ? ? var->blue.length = 8; + ? ? ? ? ? ? color_depth = DC_COLOR_DEPTH_B8G8R8A8; + ? ? ? ? ? ? break; + ? ? case 16: + ? ? ? ? ? ? var->red.offset = 11; + ? ? ? ? ? ? var->red.length = 5; + ? ? ? ? ? ? var->green.offset = 5; + ? ? ? ? ? ? var->green.length = 6; + ? ? ? ? ? ? var->blue.offset = 0;
Quoted 8 lines
Quoted 5 lines
+ ? ? ? ? ? ?
var->blue.length= 5;
+ ? ? ? ? ? ?color_depth=DC_COLOR_DEPTH_B5G6R5;
+ ? ? ? ? ? ? break;
+ ? ? default:
+ ? ? ? ? ? ? return -1;Is this really
-EPERM, "Operation not permitted"? ?Please use a proper errno code rather than just thinking "Oh, I'll use -1 because its easier".
Replaced with -EINVAL
Thanks for the review,
Colin Cross
PATCH 6/10 tegra: add GPIO support
In reply to konkers at google.comQuoted 135 lines · konkers at google.com
From: Erik Gilling <[email protected]>
Signed-off-by Erik Gilling <[email protected]>Signed-off-by Colin Cross <[email protected]>Cc Gary King <[email protected]>--- arch/arm/mach-tegra/Kconfig | 1 + arch/arm/mach-tegra/Makefile | 1 + arch/arm/mach-tegra/gpio.c | 348 +++++++++++++++++++++++++ arch/arm/mach-tegra/include/mach/gpio-names.h | 247 ++++++++++++++++++ arch/arm/mach-tegra/include/mach/gpio.h | 51 ++++ 5 files changed, 648 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-tegra/gpio.c create mode 100644 arch/arm/mach-tegra/include/mach/gpio-names.h create mode 100644 arch/arm/mach-tegra/include/mach/gpio.harch/arm/mach-tegra/Kconfig +1
-0@@ -9,6 +9,7 @@ config ARCH_TEGRA_2x_SOC bool "Tegra 2 family" select CPU_V7 select ARM_GIC + select ARCH_REQUIRE_GPIOLIB help Support for NVIDIA Tegra AP20 and T20 processors, based on the ARM CortexA9MP CPU and the ARM PL310 L2 cache controllerarch/arm/mach-tegra/Makefile +1
-0@@ -3,6 +3,7 @@ obj-y += io.o obj-y += irq.o obj-y += clock.o obj-y += timer.o +obj-y += gpio.o obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra2_clocks.o obj-$(CONFIG_SMP) += platsmp.o localtimer.o headsmp.o obj-$(CONFIG_HOTPLUG_CPU) += hotplug.oarch/arm/mach-tegra/gpio.c new file +89
-0@@ -0,0 +1,348 @@ +/* +* arch/arm/mach-tegra/gpio.c +* +* Copyright (c) 2010 Google, Inc +* +* Author: +* Erik Gilling <[email protected]> +* +* 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/irq.h> + +#include <asm/io.h> +#include <asm/gpio.h> + +#include <mach/iomap.h> + +#define GPIO_BANK (x) ((x) >> 5) +#define GPIO_PORT (x) (((x) >> 3) & 0x3) +#define GPIO_BIT (x) ((x) & 0x7) + +#define GPIO_REG (x) (IO_TO_VIRT(TEGRA_GPIO_BASE) + \ + GPIO_BANK(x) * 0x80 + \ + GPIO_PORT(x) * 4) + +#define GPIO_CNF (x) (GPIO_REG(x) + 0x00) +#define GPIO_OE (x) (GPIO_REG(x) + 0x10) +#define GPIO_OUT (x) (GPIO_REG(x) + 0X20) +#define GPIO_IN (x) (GPIO_REG(x) + 0x30) +#define GPIO_INT_STA (x) (GPIO_REG(x) + 0x40) +#define GPIO_INT_ENB (x) (GPIO_REG(x) + 0x50) +#define GPIO_INT_LVL (x) (GPIO_REG(x) + 0x60) +#define GPIO_INT_CLR (x) (GPIO_REG(x) + 0x70) + +#define GPIO_MSK_CNF (x) (GPIO_REG(x) + 0x800) +#define GPIO_MSK_OE (x) (GPIO_REG(x) + 0x810) +#define GPIO_MSK_OUT (x) (GPIO_REG(x) + 0X820) +#define GPIO_MSK_INT_STA (x) (GPIO_REG(x) + 0x840) +#define GPIO_MSK_INT_ENB (x) (GPIO_REG(x) + 0x850) +#define GPIO_MSK_INT_LVL (x) (GPIO_REG(x) + 0x860) + +#define GPIO_INT_LVL_MASK 0x010101 +#define GPIO_INT_LVL_EDGE_RISING 0x000101 +#define GPIO_INT_LVL_EDGE_FALLING 0x000100 +#define GPIO_INT_LVL_EDGE_BOTH 0x010100 +#define GPIO_INT_LVL_LEVEL_HIGH 0x000001 +#define GPIO_INT_LVL_LEVEL_LOW 0x000000 + +struct tegra_gpio_bank { +int bank; +int irq; +spinlock_t lvl_lock[4 ]; +}; + + +static struct tegra_gpio_bank tegra_gpio_banks[] = { + {.bank =0 , .irq =INT_GPIO1 }, + {.bank =1 , .irq =INT_GPIO2 }, + {.bank =2 , .irq =INT_GPIO3 }, + {.bank =3 , .irq =INT_GPIO4 }, + {.bank =4 , .irq =INT_GPIO5 }, + {.bank =5 , .irq =INT_GPIO6 }, + {.bank =6 , .irq =INT_GPIO7 }, +}; + +static int tegra_gpio_compose (int bank,int port,int bit) +{ +return (bank <<5 ) | ((port &0x3 ) <<3 ) | (bit &0x7 ); +} + +static void tegra_gpio_mask_write (u32 reg,int gpio,int value) +{ +u32 val; + + val =0x100 <<GPIO_BIT (gpio); +if (value) + val |=1 <<GPIO_BIT (gpio); +__raw_writel (val, reg); +}
arch/arm/mach-tegra/gpio.c line 99
Quoted 10 lines
arch/arm/mach-tegra/gpio.c new file +10
-0+ +void tegra_gpio_enable (int gpio) +{ +tegra_gpio_mask_write (GPIO_MSK_CNF (gpio), gpio,1 ); +} + +void tegra_gpio_disable (int gpio) +{ +tegra_gpio_mask_write (GPIO_MSK_CNF (gpio), gpio,0 ); +}
Can you please elaborate why these two are required? They are not referenced anywhere ...
arch/arm/mach-tegra/include/mach/gpio-names.h
Quoted 253 lines
arch/arm/mach-tegra/gpio.c new file +248
-0+static void tegra_gpio_set (struct gpio_chip *chip,unsigned offset,int value) +{ +tegra_gpio_mask_write (GPIO_MSK_OUT (offset), offset, value); +} + +static int tegra_gpio_get (struct gpio_chip *chip,unsigned offset) +{ +return (__raw_readl (GPIO_IN (offset)) >>GPIO_BIT (offset)) &0x1 ; +} + +static int tegra_gpio_direction_input (struct gpio_chip *chip,unsigned offset) +{ +tegra_gpio_mask_write (GPIO_MSK_OE (offset), offset,0 ); +return 0 ; +} + +static int tegra_gpio_direction_output (struct gpio_chip *chip,unsigned offset, +int value) +{ +tegra_gpio_set (chip, offset, value); +tegra_gpio_mask_write (GPIO_MSK_OE (offset), offset,1 ); +return 0 ; +} + + + +static struct gpio_chip tegra_gpio_chip = { + .label ="tegra-gpio" , + .direction_input = tegra_gpio_direction_input, + .get = tegra_gpio_get, + .direction_output = tegra_gpio_direction_output, + .set = tegra_gpio_set, + .base =0 , + .ngpio =ARCH_NR_GPIOS , +}; + +static void tegra_gpio_irq_ack (unsigned int irq) +{ +int gpio = irq -INT_GPIO_BASE ; + +__raw_writel (1 <<GPIO_BIT (gpio),GPIO_INT_CLR (gpio)); +} + +static void tegra_gpio_irq_mask (unsigned int irq) +{ +int gpio = irq -INT_GPIO_BASE ; + +tegra_gpio_mask_write (GPIO_MSK_INT_ENB (gpio), gpio,0 ); +} + +static void tegra_gpio_irq_unmask (unsigned int irq) +{ +int gpio = irq -INT_GPIO_BASE ; + +tegra_gpio_mask_write (GPIO_MSK_INT_ENB (gpio), gpio,1 ); +} + +static int tegra_gpio_irq_set_type (unsigned int irq,unsigned int type) +{ +int gpio = irq -INT_GPIO_BASE ; +struct tegra_gpio_bank *bank =get_irq_chip_data (irq); +int port =GPIO_PORT (gpio); +int lvl_type; +int val; +unsigned long flags; + +switch (type) { +case IRQ_TYPE_EDGE_RISING : + lvl_type =GPIO_INT_LVL_EDGE_RISING ; +break ; + +case IRQ_TYPE_EDGE_FALLING : + lvl_type =GPIO_INT_LVL_EDGE_FALLING ; +break ; + +case IRQ_TYPE_EDGE_BOTH : + lvl_type =GPIO_INT_LVL_EDGE_BOTH ; +break ; + +case IRQ_TYPE_LEVEL_HIGH : + lvl_type =GPIO_INT_LVL_LEVEL_HIGH ; +break ; + +case IRQ_TYPE_LEVEL_LOW : + lvl_type =GPIO_INT_LVL_LEVEL_LOW ; +break ; + +default : +return -EINVAL ; + } + +spin_lock_irqsave (&bank->lvl_lock[port], flags); + + val =__raw_readl (GPIO_INT_LVL (gpio)); + val &= ~(GPIO_INT_LVL_MASK <<GPIO_BIT (gpio)); + val |= lvl_type <<GPIO_BIT (gpio); +__raw_writel (val,GPIO_INT_LVL (gpio)); + +spin_unlock_irqrestore (&bank->lvl_lock[port], flags); + +if (type & (IRQ_TYPE_LEVEL_LOW |IRQ_TYPE_LEVEL_HIGH )) +__set_irq_handler_unlocked (irq, handle_level_irq); +else if (type & (IRQ_TYPE_EDGE_FALLING |IRQ_TYPE_EDGE_RISING )) +__set_irq_handler_unlocked (irq, handle_edge_irq); + +return 0 ; +} + +static void tegra_gpio_irq_handler (unsigned int irq,struct irq_desc *desc) +{ +struct tegra_gpio_bank *bank; +int port; +int pin; +int unmasked =0 ; + + desc->chip->ack (irq); + + bank =get_irq_data (irq); + +for (port =0 ; port <4 ; port++) { +int gpio =tegra_gpio_compose (bank->bank, port,0 ); +unsigned long sta =__raw_readl (GPIO_INT_STA (gpio)) & +__raw_readl (GPIO_INT_ENB (gpio)); +u32 lvl =__raw_readl (GPIO_INT_LVL (gpio)); + +for_each_bit (pin, &sta,8 ) { +__raw_writel (1 << pin,GPIO_INT_CLR (gpio)); + +/* if gpio is edge triggered, clear condition +* before executing the hander so that we don't +* miss edges +*/ +if (lvl & (0x100 << pin)) { + unmasked =1 ; + desc->chip->unmask (irq); + } + +generic_handle_irq (gpio_to_irq (gpio + pin)); + } + } + +if (!unmasked) + desc->chip->unmask (irq); + +} + + +static struct irq_chip tegra_gpio_irq_chip = { + .name ="GPIO" , + .ack = tegra_gpio_irq_ack, + .mask = tegra_gpio_irq_mask, + .unmask = tegra_gpio_irq_unmask, + .set_type = tegra_gpio_irq_set_type, +}; + + +/* This lock class tells lockdep that GPIO irqs are in a different +* category than their parents, so it won't report false recursion. +*/ +static struct lock_class_key gpio_lock_class; + +static int __init tegra_gpio_init (void ) +{ +struct tegra_gpio_bank *bank; +int i; +int j; + +for (i =0 ; i <7 ; i++) { +for (j =0 ; j <4 ; j++) { +int gpio =tegra_gpio_compose (i, j,0 ); +__raw_writel (0x00 ,GPIO_INT_ENB (gpio)); + } + } + +gpiochip_add (&tegra_gpio_chip); + +for (i =INT_GPIO_BASE ; i < (INT_GPIO_BASE +ARCH_NR_GPIOS ); i++) { + bank = &tegra_gpio_banks[GPIO_BANK (irq_to_gpio (i))]; + +lockdep_set_class (&irq_desc[i].lock, &gpio_lock_class); +set_irq_chip_data (i, bank); +set_irq_chip (i, &tegra_gpio_irq_chip); +set_irq_handler (i, handle_simple_irq); +set_irq_flags (i,IRQF_VALID ); + } + +for (i =0 ; i <ARRAY_SIZE (tegra_gpio_banks); i++) { + bank = &tegra_gpio_banks[i]; + +set_irq_chained_handler (bank->irq, tegra_gpio_irq_handler); +set_irq_data (bank->irq, bank); + +for (j =0 ; j <4 ; j++) +spin_lock_init (&bank->lvl_lock[j]); + } + +return 0 ; +} + +postcore_initcall (tegra_gpio_init); + +#ifdef CONFIG_DEBUG_FS + +#include <linux/debugfs.h> +#include <linux/seq_file.h> + +static int dbg_gpio_show (struct seq_file *s,void *unused) +{ +int i; +int j; + +for (i =0 ; i <7 ; i++) { +for (j =0 ; j <4 ; j++) { +int gpio =tegra_gpio_compose (i, j,0 ); +seq_printf (s,"%d:%d %02x %02x %02x %02x %02x %02x %06x\n" , + i, j, +__raw_readl (GPIO_CNF (gpio)), +__raw_readl (GPIO_OE (gpio)), +__raw_readl (GPIO_OUT (gpio)), +__raw_readl (GPIO_IN (gpio)), +__raw_readl (GPIO_INT_STA (gpio)), +__raw_readl (GPIO_INT_ENB (gpio)), +__raw_readl (GPIO_INT_LVL (gpio))); + } + } +return 0 ; +} + +static int dbg_gpio_open (struct inode *inode,struct file *file) +{ +return single_open (file, dbg_gpio_show, &inode->i_private); +} + +static const struct file_operations debug_fops = { + .open = dbg_gpio_open, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; + +static int __init tegra_gpio_debuginit (void ) +{ + (void )debugfs_create_file ("tegra_gpio" ,S_IRUGO , +NULL ,NULL , &debug_fops); +return 0 ; +} +late_initcall (tegra_gpio_debuginit); +#endif arch/arm/mach-tegra/include/mach/gpio-names.h new file +0
-0
I'm still not convinced that gpio-names.h is needed, although it may be hadny for board gpio defines. Anyway, I'd put it into arch/arm/mach-tegra rather than arch/arm/mach-tegra/include/mach because
it shouldn't be available for anything except arch/arm/mach-tegra.
Quoted 272 lines
arch/arm/mach-tegra/include/mach/gpio-names.h new file +247
-0@@ -0,0 +1,247 @@ +/* +* arch/arm/mach-tegra/include/mach/gpio-names.h +* +* Copyright (c) 2010 Google, Inc +* +* Author: +* Erik Gilling <[email protected]> +* +* 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_GPIO_NAMES_H +#define __MACH_TEGRA_GPIO_NAMES_H + +#define TEGRA_GPIO_PA0 0 +#define TEGRA_GPIO_PA1 1 +#define TEGRA_GPIO_PA2 2 +#define TEGRA_GPIO_PA3 3 +#define TEGRA_GPIO_PA4 4 +#define TEGRA_GPIO_PA5 5 +#define TEGRA_GPIO_PA6 6 +#define TEGRA_GPIO_PA7 7 +#define TEGRA_GPIO_PB0 8 +#define TEGRA_GPIO_PB1 9 +#define TEGRA_GPIO_PB2 10 +#define TEGRA_GPIO_PB3 11 +#define TEGRA_GPIO_PB4 12 +#define TEGRA_GPIO_PB5 13 +#define TEGRA_GPIO_PB6 14 +#define TEGRA_GPIO_PB7 15 +#define TEGRA_GPIO_PC0 16 +#define TEGRA_GPIO_PC1 17 +#define TEGRA_GPIO_PC2 18 +#define TEGRA_GPIO_PC3 19 +#define TEGRA_GPIO_PC4 20 +#define TEGRA_GPIO_PC5 21 +#define TEGRA_GPIO_PC6 22 +#define TEGRA_GPIO_PC7 23 +#define TEGRA_GPIO_PD0 24 +#define TEGRA_GPIO_PD1 25 +#define TEGRA_GPIO_PD2 26 +#define TEGRA_GPIO_PD3 27 +#define TEGRA_GPIO_PD4 28 +#define TEGRA_GPIO_PD5 29 +#define TEGRA_GPIO_PD6 30 +#define TEGRA_GPIO_PD7 31 +#define TEGRA_GPIO_PE0 32 +#define TEGRA_GPIO_PE1 33 +#define TEGRA_GPIO_PE2 34 +#define TEGRA_GPIO_PE3 35 +#define TEGRA_GPIO_PE4 36 +#define TEGRA_GPIO_PE5 37 +#define TEGRA_GPIO_PE6 38 +#define TEGRA_GPIO_PE7 39 +#define TEGRA_GPIO_PF0 40 +#define TEGRA_GPIO_PF1 41 +#define TEGRA_GPIO_PF2 42 +#define TEGRA_GPIO_PF3 43 +#define TEGRA_GPIO_PF4 44 +#define TEGRA_GPIO_PF5 45 +#define TEGRA_GPIO_PF6 46 +#define TEGRA_GPIO_PF7 47 +#define TEGRA_GPIO_PG0 48 +#define TEGRA_GPIO_PG1 49 +#define TEGRA_GPIO_PG2 50 +#define TEGRA_GPIO_PG3 51 +#define TEGRA_GPIO_PG4 52 +#define TEGRA_GPIO_PG5 53 +#define TEGRA_GPIO_PG6 54 +#define TEGRA_GPIO_PG7 55 +#define TEGRA_GPIO_PH0 56 +#define TEGRA_GPIO_PH1 57 +#define TEGRA_GPIO_PH2 58 +#define TEGRA_GPIO_PH3 59 +#define TEGRA_GPIO_PH4 60 +#define TEGRA_GPIO_PH5 61 +#define TEGRA_GPIO_PH6 62 +#define TEGRA_GPIO_PH7 63 +#define TEGRA_GPIO_PI0 64 +#define TEGRA_GPIO_PI1 65 +#define TEGRA_GPIO_PI2 66 +#define TEGRA_GPIO_PI3 67 +#define TEGRA_GPIO_PI4 68 +#define TEGRA_GPIO_PI5 69 +#define TEGRA_GPIO_PI6 70 +#define TEGRA_GPIO_PI7 71 +#define TEGRA_GPIO_PJ0 72 +#define TEGRA_GPIO_PJ1 73 +#define TEGRA_GPIO_PJ2 74 +#define TEGRA_GPIO_PJ3 75 +#define TEGRA_GPIO_PJ4 76 +#define TEGRA_GPIO_PJ5 77 +#define TEGRA_GPIO_PJ6 78 +#define TEGRA_GPIO_PJ7 79 +#define TEGRA_GPIO_PK0 80 +#define TEGRA_GPIO_PK1 81 +#define TEGRA_GPIO_PK2 82 +#define TEGRA_GPIO_PK3 83 +#define TEGRA_GPIO_PK4 84 +#define TEGRA_GPIO_PK5 85 +#define TEGRA_GPIO_PK6 86 +#define TEGRA_GPIO_PK7 87 +#define TEGRA_GPIO_PL0 88 +#define TEGRA_GPIO_PL1 89 +#define TEGRA_GPIO_PL2 90 +#define TEGRA_GPIO_PL3 91 +#define TEGRA_GPIO_PL4 92 +#define TEGRA_GPIO_PL5 93 +#define TEGRA_GPIO_PL6 94 +#define TEGRA_GPIO_PL7 95 +#define TEGRA_GPIO_PM0 96 +#define TEGRA_GPIO_PM1 97 +#define TEGRA_GPIO_PM2 98 +#define TEGRA_GPIO_PM3 99 +#define TEGRA_GPIO_PM4 100 +#define TEGRA_GPIO_PM5 101 +#define TEGRA_GPIO_PM6 102 +#define TEGRA_GPIO_PM7 103 +#define TEGRA_GPIO_PN0 104 +#define TEGRA_GPIO_PN1 105 +#define TEGRA_GPIO_PN2 106 +#define TEGRA_GPIO_PN3 107 +#define TEGRA_GPIO_PN4 108 +#define TEGRA_GPIO_PN5 109 +#define TEGRA_GPIO_PN6 110 +#define TEGRA_GPIO_PN7 111 +#define TEGRA_GPIO_PO0 112 +#define TEGRA_GPIO_PO1 113 +#define TEGRA_GPIO_PO2 114 +#define TEGRA_GPIO_PO3 115 +#define TEGRA_GPIO_PO4 116 +#define TEGRA_GPIO_PO5 117 +#define TEGRA_GPIO_PO6 118 +#define TEGRA_GPIO_PO7 119 +#define TEGRA_GPIO_PP0 120 +#define TEGRA_GPIO_PP1 121 +#define TEGRA_GPIO_PP2 122 +#define TEGRA_GPIO_PP3 123 +#define TEGRA_GPIO_PP4 124 +#define TEGRA_GPIO_PP5 125 +#define TEGRA_GPIO_PP6 126 +#define TEGRA_GPIO_PP7 127 +#define TEGRA_GPIO_PQ0 128 +#define TEGRA_GPIO_PQ1 129 +#define TEGRA_GPIO_PQ2 130 +#define TEGRA_GPIO_PQ3 131 +#define TEGRA_GPIO_PQ4 132 +#define TEGRA_GPIO_PQ5 133 +#define TEGRA_GPIO_PQ6 134 +#define TEGRA_GPIO_PQ7 135 +#define TEGRA_GPIO_PR0 136 +#define TEGRA_GPIO_PR1 137 +#define TEGRA_GPIO_PR2 138 +#define TEGRA_GPIO_PR3 139 +#define TEGRA_GPIO_PR4 140 +#define TEGRA_GPIO_PR5 141 +#define TEGRA_GPIO_PR6 142 +#define TEGRA_GPIO_PR7 143 +#define TEGRA_GPIO_PS0 144 +#define TEGRA_GPIO_PS1 145 +#define TEGRA_GPIO_PS2 146 +#define TEGRA_GPIO_PS3 147 +#define TEGRA_GPIO_PS4 148 +#define TEGRA_GPIO_PS5 149 +#define TEGRA_GPIO_PS6 150 +#define TEGRA_GPIO_PS7 151 +#define TEGRA_GPIO_PT0 152 +#define TEGRA_GPIO_PT1 153 +#define TEGRA_GPIO_PT2 154 +#define TEGRA_GPIO_PT3 155 +#define TEGRA_GPIO_PT4 156 +#define TEGRA_GPIO_PT5 157 +#define TEGRA_GPIO_PT6 158 +#define TEGRA_GPIO_PT7 159 +#define TEGRA_GPIO_PU0 160 +#define TEGRA_GPIO_PU1 161 +#define TEGRA_GPIO_PU2 162 +#define TEGRA_GPIO_PU3 163 +#define TEGRA_GPIO_PU4 164 +#define TEGRA_GPIO_PU5 165 +#define TEGRA_GPIO_PU6 166 +#define TEGRA_GPIO_PU7 167 +#define TEGRA_GPIO_PV0 168 +#define TEGRA_GPIO_PV1 169 +#define TEGRA_GPIO_PV2 170 +#define TEGRA_GPIO_PV3 171 +#define TEGRA_GPIO_PV4 172 +#define TEGRA_GPIO_PV5 173 +#define TEGRA_GPIO_PV6 174 +#define TEGRA_GPIO_PV7 175 +#define TEGRA_GPIO_PW0 176 +#define TEGRA_GPIO_PW1 177 +#define TEGRA_GPIO_PW2 178 +#define TEGRA_GPIO_PW3 179 +#define TEGRA_GPIO_PW4 180 +#define TEGRA_GPIO_PW5 181 +#define TEGRA_GPIO_PW6 182 +#define TEGRA_GPIO_PW7 183 +#define TEGRA_GPIO_PX0 184 +#define TEGRA_GPIO_PX1 185 +#define TEGRA_GPIO_PX2 186 +#define TEGRA_GPIO_PX3 187 +#define TEGRA_GPIO_PX4 188 +#define TEGRA_GPIO_PX5 189 +#define TEGRA_GPIO_PX6 190 +#define TEGRA_GPIO_PX7 191 +#define TEGRA_GPIO_PY0 192 +#define TEGRA_GPIO_PY1 193 +#define TEGRA_GPIO_PY2 194 +#define TEGRA_GPIO_PY3 195 +#define TEGRA_GPIO_PY4 196 +#define TEGRA_GPIO_PY5 197 +#define TEGRA_GPIO_PY6 198 +#define TEGRA_GPIO_PY7 199 +#define TEGRA_GPIO_PZ0 200 +#define TEGRA_GPIO_PZ1 201 +#define TEGRA_GPIO_PZ2 202 +#define TEGRA_GPIO_PZ3 203 +#define TEGRA_GPIO_PZ4 204 +#define TEGRA_GPIO_PZ5 205 +#define TEGRA_GPIO_PZ6 206 +#define TEGRA_GPIO_PZ7 207 +#define TEGRA_GPIO_PAA0 208 +#define TEGRA_GPIO_PAA1 209 +#define TEGRA_GPIO_PAA2 210 +#define TEGRA_GPIO_PAA3 211 +#define TEGRA_GPIO_PAA4 212 +#define TEGRA_GPIO_PAA5 213 +#define TEGRA_GPIO_PAA6 214 +#define TEGRA_GPIO_PAA7 215 +#define TEGRA_GPIO_PBB0 216 +#define TEGRA_GPIO_PBB1 217 +#define TEGRA_GPIO_PBB2 218 +#define TEGRA_GPIO_PBB3 219 +#define TEGRA_GPIO_PBB4 220 +#define TEGRA_GPIO_PBB5 221 +#define TEGRA_GPIO_PBB6 222 +#define TEGRA_GPIO_PBB7 223 + +#endif arch/arm/mach-tegra/include/mach/gpio.h new file +18
-0@@ -0,0 +1,51 @@ +/* +* arch/arm/mach-tegra/include/mach/gpio.h +* +* Copyright (C) 2010 Google, Inc. +* +* Author: +* Erik Gilling <[email protected]> +* +* 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. +* +*/
arch/arm/mach-tegra/include/mach/gpio.h line 28
Quoted 10 lines
arch/arm/mach-tegra/include/mach/gpio.h new file +10
-0+ +#ifndef __MACH_TEGRA_GPIO_H +#define __MACH_TEGRA_GPIO_H + +#include <mach/irqs.h> + +#define ARCH_NR_GPIOS INT_GPIO_NR + +#include <asm-generic/gpio.h> +#include <mach/gpio-names.h>
gpio-names can be directly included by the board files that use it
Quoted 22 lines
arch/arm/mach-tegra/include/mach/gpio.h new file +22
-0+#define gpio_get_value __gpio_get_value +#define gpio_set_value __gpio_set_value +#define gpio_cansleep __gpio_cansleep + +static inline int gpio_to_irq (unsigned int gpio) +{ +if (gpio <ARCH_NR_GPIOS ) +return INT_GPIO_BASE + gpio; +return -EINVAL ; +} + +static inline int irq_to_gpio (unsigned int irq) +{ +if ((irq >=INT_GPIO_BASE ) && (irq <INT_GPIO_BASE +INT_GPIO_NR )) +return irq -INT_GPIO_BASE ; +return -EINVAL ; +} + +void tegra_gpio_enable (int gpio); +void tegra_gpio_disable (int gpio); + +#endif
Signature · 2 lines
Sincerely yours, Mike.
PATCH 6/10 tegra: add GPIO support
Quoted 13 lines · Mike Rapoport
arch/arm/mach-tegra/gpio.c line 99
Quoted 9 lines · konkers at google.com
arch/arm/mach-tegra/gpio.c new file +9
-0+void tegra_gpio_enable (int gpio) +{ + ? ? ? tegra_gpio_mask_write(GPIO_MSK_CNF(gpio), gpio, 1); +} + +void tegra_gpio_disable (int gpio) +{ + ? ? ? tegra_gpio_mask_write(GPIO_MSK_CNF(gpio), gpio, 0); +}Can you please elaborate why these two are required? They are not referenced anywhere ...
These are needed to switch a pin/pad from peripheral mode to gpio mode. Since tegra does peripheral muxing by pingroup but gpio muxing by pin this does not fit into the pinmux code. It's intended to be used in board files much like pin muxing.
Quoted 6 lines
Quoted 1 line
+++
b/arch/arm/mach-tegra/include/mach/gpio-names.hI'm still not convinced that
gpio-names.his needed, although it may be hadny for board gpio defines. Anyway, I'd put it intoarch/arm/mach-tegrarather thanarch/arm/mach-tegra/include/machbecause ?it shouldn't be available for anything exceptarch/arm/mach-tegra.
The tegra architecture does not define GPIOs numerically so treating them as integers has no useful meaning. It's true that these should only be used in the board files. I'll move the file into arch/arm/mach-tegra.
-Erik
PATCH 3/10 tegra: Add clock support
In reply to konkers at google.comQuoted 23 lines · konkers at google.com
From: Colin Cross <[email protected]>
Signed-off-by Colin Cross <[email protected]>Signed-off-by Erik Gilling <[email protected]>--- arch/arm/Kconfig | 1 + arch/arm/mach-tegra/Makefile | 2 + arch/arm/mach-tegra/clock.c | 191 +++++++ arch/arm/mach-tegra/clock.h | 103 ++++ arch/arm/mach-tegra/common.c | 1 + arch/arm/mach-tegra/include/mach/clkdev.h | 32 ++ arch/arm/mach-tegra/tegra2_clocks.c | 837 +++++++++++++++++++++++++++++ 7 files changed, 1167 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-tegra/clock.c create mode 100644 arch/arm/mach-tegra/clock.h create mode 100644 arch/arm/mach-tegra/include/mach/clkdev.h create mode 100644 arch/arm/mach-tegra/tegra2_clocks.carch/arm/Kconfig +0
-0
arch/arm/Kconfig config ARCH_TEGRA · line 579
Quoted 4 lines
arch/arm/Kconfig +1
-0@@ -576,6 +576,7 @@ config ARCH_TEGRA select GENERIC_CLOCKEVENTS select GENERIC_GPIO select HAVE_CLK + select COMMON_CLKDEV
These should be indented using tabs, not spaces.
arch/arm/Kconfig config ARCH_TEGRA
Quoted 10 lines
arch/arm/Kconfig +10
-0+/** + * clk_preinit - initialize any fields in the struct clk before clk init + * @clk: struct clk * to initialize + * + * Initialize any struct clk fields needed before normal clk initialization + * can run. No return value. + */ +void clk_preinit(struct clk *c) +{ + c->lock = __SPIN_LOCK_UNLOCKED(c->lock);
spin_lock_init(&c->lock);
arch/arm/Kconfig
Quoted 9 lines
arch/arm/Kconfig +9
-0+int clk_set_parent(struct clk *c, struct clk *parent) +{ + unsigned long flags; + int ret = 0; + spin_lock_irqsave(&c->lock, flags); + if (c->ops && c->ops->set_parent) + ret = c->ops->set_parent(c, parent); + else + BUG();
Does this condition really justify crashing the kernel? Why not just return an error?
arch/arm/Kconfig
Quoted 9 lines
arch/arm/Kconfig +9
-0+int clk_set_rate(struct clk *c, unsigned long rate) +{ + int ret = 0; + unsigned long flags; + spin_lock_irqsave(&c->lock, flags); + if (c->ops && c->ops->set_rate) + ret = c->ops->set_rate(c, rate); + else + BUG();
Ditto.
arch/arm/Kconfig
Quoted 11 lines
arch/arm/Kconfig +11
-0+unsigned long clk_get_rate(struct clk *c) +{ + int ret = 0; + unsigned long flags; + spin_lock_irqsave(&c->lock, flags); + if (c->ops && c->ops->get_rate) + ret = c->ops->get_rate(c); + else if (c->parent) + ret = clk_get_rate(c->parent); + else + BUG();
Ditto.
Quoted 28 lines
arch/arm/Kconfig +28
-0+/* PLL Functions */ +static int tegra2_pll_clk_set_rate(struct clk *c, unsigned long rate) +{ + u32 val; + unsigned long input_rate; + const struct clk_pll_table *sel; + + pr_debug("%s on clock %s\n", __func__, c->name); + /* BUG_ON(c->refcnt != 0); */ + + input_rate = clk_get_rate(c->parent); + for (sel = c->pll_table; sel->input_rate != 0; sel++) { + if (sel->input_rate == input_rate && sel->output_rate == rate) { + c->n = sel->n; + c->m = sel->m; + c->p = sel->p; + c->cpcon = sel->cpcon; + val = clk_readl(c->reg + PLL_BASE); + if (c->flags & PLL_FIXED) + val |= PLL_BASE_OVERRIDE; + val &= ~(PLL_BASE_DIVP_MASK | PLL_BASE_DIVN_MASK | + PLL_BASE_DIVM_MASK); + val |= (c->m << PLL_BASE_DIVM_SHIFT) | + (c->n << PLL_BASE_DIVN_SHIFT); + BUG_ON(c->p > 2); + if (c->p == 2) + val |= 1 << PLL_BASE_DIVP_SHIFT; + clk_writel(val, c->reg + PLL_BASE);
arch/arm/Kconfig
Quoted 10 lines
arch/arm/Kconfig +10
-0+ c->rate = rate; + + if (c->flags & PLL_HAS_CPCON) { + val = c->cpcon << PLL_MISC_CPCON_SHIFT; + clk_writel(val, c->reg + PLL_MISC); + } + return 0; + } + } + return 1;
What's this 'return 1' on error and 'return 0' on success? The clk API uses standard Linux error codes, which are negative constants on error. Please use a standard constant from the errno.h headers.
PATCH 3/10 tegra: Add clock support
Quoted 19 lines · Russell King - ARM Linux
Quoted 18 lines · konkers at google.com
From: Colin Cross <[email protected]>
Signed-off-by Colin Cross <[email protected]>Signed-off-by Erik Gilling <[email protected]>---
?arch/arm/Kconfig ? ? ? ? ? ? ? ? ? ? ? ? ?| ? ?1 + ?arch/arm/mach-tegra/Makefile ? ? ? ? ? ? ?| ? ?2 + ?arch/arm/mach-tegra/clock.c ? ? ? ? ? ? ? | ?191 +++++++ ?arch/arm/mach-tegra/clock.h ? ? ? ? ? ? ? | ?103 ++++ ?arch/arm/mach-tegra/common.c ? ? ? ? ? ? ?| ? ?1 + ?arch/arm/mach-tegra/include/mach/clkdev.h | ? 32 ++ ?arch/arm/mach-tegra/tegra2_clocks.c ? ? ? | ?837 +++++++++++++++++++++++++++++?7 files changed, 1167 insertions(+), 0 deletions(-) ?create mode 100644
arch/arm/mach-tegra/clock.c?create mode 100644arch/arm/mach-tegra/clock.h?create mode 100644arch/arm/mach-tegra/include/mach/clkdev.h?create mode 100644arch/arm/mach-tegra/tegra2_clocks.c
Quoted 11 lines
Quoted 9 lines
arch/arm/Kconfig +0
-0@@ -576,6 +576,7 @@ config ARCH_TEGRA? ? ? ? ?select
GENERIC_CLOCKEVENTS
? ? ? ? ?selectGENERIC_GPIO
? ? ? ? ?selectHAVE_CLK
+ ? ? ? ?selectCOMMON_CLKDEVThese should be indented using tabs, not spaces.
Fixed
Quoted 4 lines
Quoted 4 lines
+/**
+ *clk_preinit- initialize any fields in the struct clk before clk init
+ * @clk: struct clk * to initialize
+ *
Quoted 8 lines
arch/arm/Kconfig
Quoted 6 lines
+ * Initialize any struct clk fields needed before normal clk initialization
+ * can run. ?No return value.
+ */arch/arm/Kconfig +3
-0+void clk_preinit(struct clk *c) +{ + ? ? c->lock = __SPIN_LOCK_UNLOCKED(c->lock);? ? ? ?spin_lock_init(&c->lock);
Fixed
Quoted 4 lines
Quoted 4 lines
arch/arm/Kconfig +4
-0+int clk_set_parent(struct clk *c, struct clk *parent) +{ + ? ? unsigned long flags; + ? ? int ret = 0;
Quoted 8 lines
Quoted 5 lines
+ ? ?
spin_lock_irqsave(&c->lock, flags);
+ ? ? if (c->ops&&c->ops->set_parent)
+ ? ? ? ? ? ? ret =c->ops->set_parent(c, parent);
+ ? ? else
+ ? ? ? ? ? ?BUG();Does this condition really justify crashing the kernel? ?Why not just return an error?
Changed to return -ENOSYS
Quoted 60 lines
arch/arm/Kconfig
Quoted 9 lines
arch/arm/Kconfig +9
-0+int clk_set_rate(struct clk *c, unsigned long rate) +{ + ? ? int ret = 0; + ? ? unsigned long flags; + ? ? spin_lock_irqsave(&c->lock, flags); + ? ? if (c->ops && c->ops->set_rate) + ? ? ? ? ? ? ret = c->ops->set_rate(c, rate); + ? ? else + ? ? ? ? ? ? BUG();Ditto.
arch/arm/Kconfig
Quoted 11 lines
arch/arm/Kconfig +11
-0+unsigned long clk_get_rate(struct clk *c) +{ + ? ? int ret = 0; + ? ? unsigned long flags; + ? ? spin_lock_irqsave(&c->lock, flags); + ? ? if (c->ops && c->ops->get_rate) + ? ? ? ? ? ? ret = c->ops->get_rate(c); + ? ? else if (c->parent) + ? ? ? ? ? ? ret = clk_get_rate(c->parent); + ? ? else + ? ? ? ? ? ? BUG();Ditto.
Quoted 34 lines
arch/arm/Kconfig +34
-0+/* PLL Functions */ +static int tegra2_pll_clk_set_rate(struct clk *c, unsigned long rate) +{ + ? ? u32 val; + ? ? unsigned long input_rate; + ? ? const struct clk_pll_table *sel; + + ? ? pr_debug("%s on clock %s\n", __func__, c->name); + ? ? /* BUG_ON(c->refcnt != 0); */ + + ? ? input_rate = clk_get_rate(c->parent); + ? ? for (sel = c->pll_table; sel->input_rate != 0; sel++) { + ? ? ? ? ? ? if (sel->input_rate == input_rate && sel->output_rate == rate) { + ? ? ? ? ? ? ? ? ? ? c->n = sel->n; + ? ? ? ? ? ? ? ? ? ? c->m = sel->m; + ? ? ? ? ? ? ? ? ? ? c->p = sel->p; + ? ? ? ? ? ? ? ? ? ? c->cpcon = sel->cpcon; + ? ? ? ? ? ? ? ? ? ? val = clk_readl(c->reg + PLL_BASE); + ? ? ? ? ? ? ? ? ? ? if (c->flags & PLL_FIXED) + ? ? ? ? ? ? ? ? ? ? ? ? ? ? val |= PLL_BASE_OVERRIDE; + ? ? ? ? ? ? ? ? ? ? val &= ~(PLL_BASE_DIVP_MASK | PLL_BASE_DIVN_MASK | + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?PLL_BASE_DIVM_MASK); + ? ? ? ? ? ? ? ? ? ? val |= (c->m << PLL_BASE_DIVM_SHIFT) | + ? ? ? ? ? ? ? ? ? ? ? ? ? ? (c->n << PLL_BASE_DIVN_SHIFT); + ? ? ? ? ? ? ? ? ? ? BUG_ON(c->p > 2); + ? ? ? ? ? ? ? ? ? ? if (c->p == 2) + ? ? ? ? ? ? ? ? ? ? ? ? ? ? val |= 1 << PLL_BASE_DIVP_SHIFT; + ? ? ? ? ? ? ? ? ? ? clk_writel(val, c->reg + PLL_BASE); + ? ? ? ? ? ? ? ? ? ? c->rate = rate; + + ? ? ? ? ? ? ? ? ? ? if (c->flags & PLL_HAS_CPCON) { + ? ? ? ? ? ? ? ? ? ? ? ? ? ? val = c->cpcon << PLL_MISC_CPCON_SHIFT; + ? ? ? ? ? ? ? ? ? ? ? ? ? ? clk_writel(val, c->reg + PLL_MISC); + ? ? ? ? ? ? ? ? ? ? }
Quoted 8 lines
Quoted 4 lines
+ ? ? ? ? ? ? ? ? ? ? return 0;
+ ? ? ? ? ? ? }
+ ? ? }
+ ? ? return 1;What's this 'return 1' on error and 'return 0' on ?success? ?The clk API uses standard Linux error codes, which are negative constants on error. Please use a standard constant from the
errno.hheaders.
Fixed, along with all the other improper return values in tegra2_clocks.c
Thanks for the review,
Colin
PATCH 1/10 tegra: initial tegra support
In reply to konkers at google.comQuoted 164 lines · konkers at google.com
From: Erik Gilling <[email protected]>
Signed-off-by Colin Cross <[email protected]>Signed-off-by Erik Gilling <[email protected]>--- arch/arm/Kconfig | 13 ++ arch/arm/Makefile | 1 + arch/arm/mach-tegra/Kconfig | 53 ++++++ arch/arm/mach-tegra/Makefile | 2 + arch/arm/mach-tegra/Makefile.boot | 7 + arch/arm/mach-tegra/board.h | 32 ++++ arch/arm/mach-tegra/common.c | 44 +++++ arch/arm/mach-tegra/include/mach/barriers.h | 30 ++++ arch/arm/mach-tegra/include/mach/debug-macro.S | 45 +++++ arch/arm/mach-tegra/include/mach/dma.h | 24 +++ arch/arm/mach-tegra/include/mach/entry-macro.S | 118 ++++++++++++++ arch/arm/mach-tegra/include/mach/hardware.h | 24 +++ arch/arm/mach-tegra/include/mach/io.h | 79 +++++++++ arch/arm/mach-tegra/include/mach/iomap.h | 204 ++++++++++++++++++++++++ arch/arm/mach-tegra/include/mach/memory.h | 28 ++++ arch/arm/mach-tegra/include/mach/nand.h | 54 +++++++ arch/arm/mach-tegra/include/mach/system.h | 39 +++++ arch/arm/mach-tegra/include/mach/timex.h | 26 +++ arch/arm/mach-tegra/include/mach/uncompress.h | 78 +++++++++ arch/arm/mach-tegra/include/mach/vmalloc.h | 28 ++++ arch/arm/mach-tegra/io.c | 78 +++++++++ arch/arm/mm/Kconfig | 2 +- 22 files changed, 1008 insertions(+), 1 deletions(-) create mode 100644 arch/arm/mach-tegra/Kconfig create mode 100644 arch/arm/mach-tegra/Makefile create mode 100644 arch/arm/mach-tegra/Makefile.boot create mode 100644 arch/arm/mach-tegra/board.h create mode 100644 arch/arm/mach-tegra/common.c create mode 100644 arch/arm/mach-tegra/include/mach/barriers.h create mode 100644 arch/arm/mach-tegra/include/mach/debug-macro.S create mode 100644 arch/arm/mach-tegra/include/mach/dma.h create mode 100644 arch/arm/mach-tegra/include/mach/entry-macro.S create mode 100644 arch/arm/mach-tegra/include/mach/hardware.h create mode 100644 arch/arm/mach-tegra/include/mach/io.h create mode 100644 arch/arm/mach-tegra/include/mach/iomap.h create mode 100644 arch/arm/mach-tegra/include/mach/memory.h create mode 100644 arch/arm/mach-tegra/include/mach/nand.h create mode 100644 arch/arm/mach-tegra/include/mach/system.h create mode 100644 arch/arm/mach-tegra/include/mach/timex.h create mode 100644 arch/arm/mach-tegra/include/mach/uncompress.h create mode 100644 arch/arm/mach-tegra/include/mach/vmalloc.h create mode 100644 arch/arm/mach-tegra/io.carch/arm/Kconfig +13
-0@@ -570,6 +570,17 @@ config ARCH_NUC93X Support for Nuvoton (Winbond logic dept.) NUC93X MCU,The NUC93X is a low-power and high performance MPEG-4/JPEG multimedia controller chip. +config ARCH_TEGRA + bool "NVIDIA Tegra" + select GENERIC_TIME + select GENERIC_CLOCKEVENTS + select GENERIC_GPIO + select HAVE_CLK + select ARCH_HAS_BARRIERS if CACHE_L2X0 + help + This enables support for NVIDIA Tegra based systems (Tegra APX, + Tegra 6xx and Tegra 2 series). + config ARCH_PNX4008 bool "Philips Nexperia PNX4008 Mobile" select CPU_ARM926T@@ -852,6 +863,8 @@ if ARCH_S5PC1XX source "arch/arm/mach-s5pc100/Kconfig" endif +source "arch/arm/mach-tegra/Kconfig" + source "arch/arm/mach-u300/Kconfig" source "arch/arm/mach-ux500/Kconfig"arch/arm/Makefile +1
-0@@ -167,6 +167,7 @@ machine-$(CONFIG_ARCH_SA1100) := sa1100 machine-$(CONFIG_ARCH_SHARK) := shark machine-$(CONFIG_ARCH_STMP378X) := stmp378x machine-$(CONFIG_ARCH_STMP37XX) := stmp37xx +machine-$(CONFIG_ARCH_TEGRA) := tegra machine-$(CONFIG_ARCH_U300) := u300 machine-$(CONFIG_ARCH_U8500) := ux500 machine-$(CONFIG_ARCH_VERSATILE) := versatilearch/arm/mach-tegra/Kconfig new file +53
-0@@ -0,0 +1,53 @@ +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 + + +choice + prompt "Select Tegra-based product" + +config MACH_HARMONY + bool "Harmony board" + help + Support for nVidia Harmony development platform + +endchoice + +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 + +endifarch/arm/mach-tegra/Makefile new file +2
-0@@ -0,0 +1,2 @@ +obj-y += common.o +obj-y += io.oarch/arm/mach-tegra/Makefile.boot new file +0
-0
arch/arm/mach-tegra/Makefile.boot line 3
Quoted 3 lines
arch/arm/mach-tegra/Makefile.boot new file +3
-0@@ -0,0 +1,7 @@ +zreladdr-$(CONFIG_ARCH_TEGRA_1x_SOC) := 0x00008000 +params_phys-$(CONFIG_ARCH_TEGRA_1x_SOC) := 0x00000100 +initrd_phys-$(CONFIG_ARCH_TEGRA_1x_SOC) := 0x00800000
Are there any plans to support Tegra 1? If not, these are not needed
arch/arm/mach-tegra/board.h
Quoted 8 lines
arch/arm/mach-tegra/Makefile.boot new file +3
-0+zreladdr-$(CONFIG_ARCH_TEGRA_2x_SOC) := 0x00008000 +params_phys-$(CONFIG_ARCH_TEGRA_2x_SOC) := 0x00000100 +initrd_phys-$(CONFIG_ARCH_TEGRA_2x_SOC) := 0x00800000arch/arm/mach-tegra/board.h new file +0
-0
I think "common.h" would be a better name.
Quoted 185 lines
arch/arm/mach-tegra/board.h new file +32
-0@@ -0,0 +1,32 @@ +/* +* arch/arm/mach-tegra/board.h +* +* Copyright (C) 2010 Google, Inc. +* +* Author: +* Colin Cross <[email protected]> +* Erik Gilling <[email protected]> +* +* 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 arch/arm/mach-tegra/common.c new file +44
-0@@ -0,0 +1,44 @@ +/* +* arch/arm/mach-tegra/board-harmony.c +* +* Copyright (C) 2010 Google, Inc. +* +* Author: +* Colin Cross <[email protected]> +* +* 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 (); +}arch/arm/mach-tegra/include/mach/barriers.h new file +30
-0@@ -0,0 +1,30 @@ +/* +* arch/arm/mach-realview/include/mach/barriers.h +* +* Copyright (C) 2010 ARM Ltd. +* Written by Catalin Marinas <[email protected]> +* +* 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 */ arch/arm/mach-tegra/include/mach/debug-macro.S new file +45
-0@@ -0,0 +1,45 @@ +/* + * arch/arm/mach-tegra/include/mach/debug-macro.S + * + * Copyright (C) 2010 Google, Inc. + * + * Author: + * Colin Cross <[email protected]> + * Erik Gilling <[email protected]> + * + * 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) + orr \rx, \rx, #0x6040 +#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> +arch/arm/mach-tegra/include/mach/dma.h new file +9
-0@@ -0,0 +1,24 @@ +/* +* arch/arm/mach-tegra/include/mach/dma.h +* +* Copyright (C) 2010 Google, Inc. +* +* Author: +* Colin Cross <[email protected]> +* Erik Gilling <[email protected]> +*
arch/arm/mach-tegra/include/mach/dma.h line 19
Quoted 10 lines
arch/arm/mach-tegra/include/mach/dma.h new file +10
-0+* 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. +* +*/
Is this empty header required?
Quoted 212 lines
arch/arm/mach-tegra/include/mach/dma.h new file +4
-0+#ifndef __MACH_TEGRA_DMA_H +#define __MACH_TEGRA_DMA_H + +#endif arch/arm/mach-tegra/include/mach/entry-macro.S new file +118
-0@@ -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 +#endifarch/arm/mach-tegra/include/mach/hardware.h new file +24
-0@@ -0,0 +1,24 @@ +/* +* arch/arm/mach-tegra/include/mach/hardware.h +* +* Copyright (C) 2010 Google, Inc. +* +* Author: +* Colin Cross <[email protected]> +* Erik Gilling <[email protected]> +* +* 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 arch/arm/mach-tegra/include/mach/io.h new file +48
-0@@ -0,0 +1,79 @@ +/* +* arch/arm/mach-tegra/include/mach/io.h +* +* Copyright (C) 2010 Google, Inc. +* +* Author: +* Colin Cross <[email protected]> +* Erik Gilling <[email protected]> +* +* 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_IO_H +#define __MACH_TEGRA_IO_H + +#define IO_SPACE_LIMIT 0xffffffff + +/* On TEGRA, many peripherals are very closely packed in +* two 256MB io windows (that actually only use about 64KB +* at the start of each). +* +* We will just map the first 1MB of each window (to minimize +* pt entries needed) and provide a macro to transform physical +* io addresses to an appropriate void __iomem *. +* +*/ + +#define IO_CPU_PHYS 0x50040000 +#define IO_CPU_VIRT 0xFE000000 +#define IO_CPU_SIZE SZ_16K + +#define IO_PPSB_PHYS 0x60000000 +#define IO_PPSB_VIRT 0xFE200000 +#define IO_PPSB_SIZE SZ_1M + +#define IO_APB_PHYS 0x70000000 +#define IO_APB_VIRT 0xFE300000 +#define IO_APB_SIZE SZ_1M + +#define IO_TO_VIRT_BETWEEN (p, st, sz) ((p) >= (st) && (p) < ((st) + (sz)))
arch/arm/mach-tegra/include/mach/io.h line 58
Quoted 10 lines
arch/arm/mach-tegra/include/mach/io.h new file +10
-0+#define IO_TO_VIRT_XLATE (p, pst, vst) (((p) - (pst) + (vst))) + +#define IO_TO_VIRT (n) ( \ + IO_TO_VIRT_BETWEEN((n), IO_PPSB_PHYS, IO_PPSB_SIZE) ? \ + IO_TO_VIRT_XLATE((n), IO_PPSB_PHYS, IO_PPSB_VIRT) : \ + IO_TO_VIRT_BETWEEN((n), IO_APB_PHYS, IO_APB_SIZE) ? \ + IO_TO_VIRT_XLATE((n), IO_APB_PHYS, IO_APB_VIRT) : \ + IO_TO_VIRT_BETWEEN((n), IO_CPU_PHYS, IO_CPU_SIZE) ? \ + IO_TO_VIRT_XLATE((n), IO_CPU_PHYS, IO_CPU_VIRT) : \ + 0)
Many other arhces put similar defines in the mach/hardware.h. I really cannot tell what way is better.
Russell, any comment here?
arch/arm/mach-tegra/include/mach/nand.h
Quoted 269 lines
arch/arm/mach-tegra/include/mach/io.h new file +20
-0+#ifndef __ASSEMBLER__ + +#define __arch_ioremap (p, s, t) tegra_ioremap(p, s, t) +#define __arch_iounmap (v) tegra_iounmap(v) + +void __iomem *tegra_ioremap (unsigned long phys,size_t size,unsigned int type); +void tegra_iounmap (volatile void __iomem *addr); + +#define IO_ADDRESS (n) ((void __iomem *) IO_TO_VIRT(n)) + +static inline void __iomem *__io (unsigned long addr) +{ +return (void __iomem *)addr; +} +#define __io (a) __io(a) +#define __mem_pci (a) (a) + +#endif + +#endif arch/arm/mach-tegra/include/mach/iomap.h new file +204
-0@@ -0,0 +1,204 @@ +/* +* arch/arm/mach-tegra/include/mach/iomap.h +* +* Copyright (C) 2010 Google, Inc. +* +* Author: +* Colin Cross <[email protected]> +* Erik Gilling <[email protected]> +* +* 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_IOMAP_H +#define __MACH_TEGRA_IOMAP_H + +#include <mach/io.h> +#include <asm/sizes.h> + +#define TEGRA_ARM_PERIF_BASE 0x50040000 +#define TEGRA_ARM_PERIF_SIZE SZ_8K + +#define TEGRA_ARM_INT_DIST_BASE 0x50041000 +#define TEGRA_ARM_INT_DIST_SIZE SZ_4K + +#define TEGRA_DISPLAY_BASE 0x54200000 +#define TEGRA_DISPLAY_SIZE SZ_256K + +#define TEGRA_DISPLAY2_BASE 0x54240000 +#define TEGRA_DISPLAY2_SIZE SZ_256K + +#define TEGRA_PRIMARY_ICTLR_BASE 0x60004000 +#define TEGRA_PRIMARY_ICTLR_SIZE SZ_64 + +#define TEGRA_SECONDARY_ICTLR_BASE 0x60004100 +#define TEGRA_SECONDARY_ICTLR_SIZE SZ_64 + +#define TEGRA_TERTIARY_ICTLR_BASE 0x60004200 +#define TEGRA_TERTIARY_ICTLR_SIZE SZ_64 + +#define TEGRA_QUATERNARY_ICTLR_BASE 0x60004300 +#define TEGRA_QUATERNARY_ICTLR_SIZE SZ_64 + +#define TEGRA_TMR1_BASE 0x60005000 +#define TEGRA_TMR1_SIZE SZ_8 + +#define TEGRA_TMR2_BASE 0x60005008 +#define TEGRA_TMR2_SIZE SZ_8 + +#define TEGRA_TMRUS_BASE 0x60005010 +#define TEGRA_TMRUS_SIZE SZ_64 + +#define TEGRA_TMR3_BASE 0x60005050 +#define TEGRA_TMR3_SIZE SZ_8 + +#define TEGRA_TMR4_BASE 0x60005058 +#define TEGRA_TMR4_SIZE SZ_8 + +#define TEGRA_CLK_RESET_BASE 0x60006000 +#define TEGRA_CLK_RESET_SIZE SZ_4K + +#define TEGRA_FLOW_CTRL_BASE 0x60007000 +#define TEGRA_FLOW_CTRL_SIZE 20 + +#define TEGRA_STATMON_BASE 0x6000C4000 +#define TEGRA_STATMON_SIZE SZ_1K + +#define TEGRA_GPIO_BASE 0x6000D000 +#define TEGRA_GPIO_SIZE SZ_4K + +#define TEGRA_EXCEPTION_VECTORS_BASE 0x6000F000 +#define TEGRA_EXCEPTION_VECTORS_SIZE SZ_4K + +#define TEGRA_APB_MISC_BASE 0x70000000 +#define TEGRA_APB_MISC_SIZE SZ_4K + +#define TEGRA_AC97_BASE 0x70002000 +#define TEGRA_AC97_SIZE SZ_512 + +#define TEGRA_SPDIF_BASE 0x70002400 +#define TEGRA_SPDIF_SIZE SZ_512 + +#define TEGRA_I2S1_BASE 0x70002800 +#define TEGRA_I2S1_SIZE SZ_256 + +#define TEGRA_I2S2_BASE 0x70002A00 +#define TEGRA_I2S2_SIZE SZ_256 + +#define TEGRA_UARTA_BASE 0x70006000 +#define TEGRA_UARTA_SIZE SZ_64 + +#define TEGRA_UARTB_BASE 0x70006040 +#define TEGRA_UARTB_SIZE SZ_64 + +#define TEGRA_UARTC_BASE 0x70006200 +#define TEGRA_UARTC_SIZE SZ_256 + +#define TEGRA_UARTD_BASE 0x70006300 +#define TEGRA_UARTD_SIZE SZ_256 + +#define TEGRA_UARTE_BASE 0x70006400 +#define TEGRA_UARTE_SIZE SZ_256 + +#define TEGRA_NAND_BASE 0x70008000 +#define TEGRA_NAND_SIZE SZ_256 + +#define TEGRA_HSMMC_BASE 0x70008500 +#define TEGRA_HSMMC_SIZE SZ_256 + +#define TEGRA_SNOR_BASE 0x70009000 +#define TEGRA_SNOR_SIZE SZ_4K + +#define TEGRA_PWFM_BASE 0x7000A000 +#define TEGRA_PWFM_SIZE SZ_256 + +#define TEGRA_MIPI_BASE 0x7000B000 +#define TEGRA_MIPI_SIZE SZ_256 + +#define TEGRA_I2C_BASE 0x7000C000 +#define TEGRA_I2C_SIZE SZ_256 + +#define TEGRA_TWC_BASE 0x7000C100 +#define TEGRA_TWC_SIZE SZ_256 + +#define TEGRA_SPI_BASE 0x7000C380 +#define TEGRA_SPI_SIZE 48 + +#define TEGRA_I2C2_BASE 0x7000C400 +#define TEGRA_I2C2_SIZE SZ_256 + +#define TEGRA_I2C3_BASE 0x7000C500 +#define TEGRA_I2C3_SIZE SZ_256 + +#define TEGRA_OWR_BASE 0x7000D000 +#define TEGRA_OWR_SIZE 80 + +#define TEGRA_DVC_BASE 0x7000D000 +#define TEGRA_DVC_SIZE SZ_512 + +#define TEGRA_SPI1_BASE 0x7000D400 +#define TEGRA_SPI1_SIZE SZ_512 + +#define TEGRA_SPI2_BASE 0x7000D600 +#define TEGRA_SPI2_SIZE SZ_512 + +#define TEGRA_SPI3_BASE 0x7000D800 +#define TEGRA_SPI3_SIZE SZ_512 + +#define TEGRA_SPI4_BASE 0x7000DA00 +#define TEGRA_SPI4_SIZE SZ_512 + +#define TEGRA_RTC_BASE 0x7000E000 +#define TEGRA_RTC_SIZE SZ_256 + +#define TEGRA_KBC_BASE 0x7000E200 +#define TEGRA_KBC_SIZE SZ_256 + +#define TEGRA_PMC_BASE 0x7000E400 +#define TEGRA_PMC_SIZE SZ_256 + +#define TEGRA_MC_BASE 0x7000F000 +#define TEGRA_MC_SIZE SZ_1K + +#define TEGRA_EMC_BASE 0x7000F400 +#define TEGRA_EMC_SIZE SZ_1K + +#define TEGRA_FUSE_BASE 0x7000F800 +#define TEGRA_FUSE_SIZE SZ_1K + +#define TEGRA_KFUSE_BASE 0x7000FC00 +#define TEGRA_KFUSE_SIZE SZ_1K + +#define TEGRA_CSITE_BASE 0x70040000 +#define TEGRA_CSITE_SIZE SZ_256K + +#define TEGRA_USB_BASE 0xC5000000 +#define TEGRA_USB_SIZE SZ_16K + +#define TEGRA_USB1_BASE 0xC5004000 +#define TEGRA_USB1_SIZE SZ_16K + +#define TEGRA_USB2_BASE 0xC5008000 +#define TEGRA_USB2_SIZE SZ_16K + +#define TEGRA_SDMMC1_BASE 0xC8000000 +#define TEGRA_SDMMC1_SIZE SZ_512 + +#define TEGRA_SDMMC2_BASE 0xC8000200 +#define TEGRA_SDMMC2_SIZE SZ_512 + +#define TEGRA_SDMMC3_BASE 0xC8000400 +#define TEGRA_SDMMC3_SIZE SZ_512 + +#define TEGRA_SDMMC4_BASE 0xC8000600 +#define TEGRA_SDMMC4_SIZE SZ_512 + +#endif arch/arm/mach-tegra/include/mach/memory.h new file +28
-0@@ -0,0 +1,28 @@ +/* +* arch/arm/mach-tegra/include/mach/memory.h +* +* Copyright (C) 2010 Google, Inc. +* +* Author: +* Colin Cross <[email protected]> +* Erik Gilling <[email protected]> +* +* 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_MEMORY_H +#define __MACH_TEGRA_MEMORY_H + +/* physical offset of RAM */ +#define PHYS_OFFSET UL(0) + +#endif +arch/arm/mach-tegra/include/mach/nand.h new file +0
-0
I think this should be added together with NAND controller driver, rather than in the initial chunk
Quoted 347 lines
arch/arm/mach-tegra/include/mach/nand.h new file +54
-0@@ -0,0 +1,54 @@ +/* +* arch/arm/mach-tegra/include/mach/nand.h +* +* Copyright (C) 2010 Google, Inc. +* +* Author: +* Colin Cross <[email protected]> +* Dima Zavin <[email protected]> +* +* 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_NAND_H +#define __MACH_TEGRA_NAND_H + +struct tegra_nand_chip_parms { +uint8_t vendor_id; +uint8_t device_id; +uint32_t flags; + +uint32_t capacity; + +/* all timing info is in nanoseconds */ +struct { +uint32_t trp; +uint32_t trh; +uint32_t twp; +uint32_t twh; +uint32_t tcs; +uint32_t twhr; +uint32_t tcr_tar_trr; +uint32_t twb; +uint32_t trp_resp; +uint32_t tadl; + } timing; +}; + +struct tegra_nand_platform { +uint8_t max_chips; +struct tegra_nand_chip_parms *chip_parms; +unsigned int nr_chip_parms; +struct mtd_partition *parts; +unsigned int nr_parts; +}; + +#endif arch/arm/mach-tegra/include/mach/system.h new file +39
-0@@ -0,0 +1,39 @@ +/* +* arch/arm/mach-tegra/include/mach/system.h +* +* Copyright (C) 2010 Google, Inc. +* +* Author: +* Colin Cross <[email protected]> +* Erik Gilling <[email protected]> +* +* 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_SYSTEM_H +#define __MACH_TEGRA_SYSTEM_H + +#include <mach/hardware.h> +#include <mach/iomap.h> + +static inline void arch_idle (void ) +{ +} + +static inline void arch_reset (char mode,const char *cmd) +{ +void __iomem *reset =IO_ADDRESS (TEGRA_CLK_RESET_BASE +0x04 ); +u32 reg =readl (reset); + reg |=0x04 ; +writel (reg, reset); +} + +#endif arch/arm/mach-tegra/include/mach/timex.h new file +26
-0@@ -0,0 +1,26 @@ +/* +* arch/arm/mach-tegra/include/mach/timex.h +* +* Copyright (C) 2010 Google, Inc. +* +* Author: +* Colin Cross <[email protected]> +* Erik Gilling <[email protected]> +* +* 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_TIMEX_H +#define __MACH_TEGRA_TIMEX_H + +#define CLOCK_TICK_RATE 1000000 + +#endif arch/arm/mach-tegra/include/mach/uncompress.h new file +78
-0@@ -0,0 +1,78 @@ +/* +* arch/arm/mach-tegra/include/mach/uncompress.h +* +* Copyright (C) 2010 Google, Inc. +* +* Author: +* Colin Cross <[email protected]> +* Erik Gilling <[email protected]> +* +* 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_UNCOMPRESS_H +#define __MACH_TEGRA_UNCOMPRESS_H + +#include <linux/types.h> +#include <linux/serial_reg.h> + +#include <mach/iomap.h> + +#if defined(CONFIG_TEGRA_DEBUG_UARTA ) +#define DEBUG_UART_BASE TEGRA_UARTA_BASE +#elif defined(CONFIG_TEGRA_DEBUG_UARTB ) +#define DEBUG_UART_BASE TEGRA_UARTB_BASE +#elif defined(CONFIG_TEGRA_DEBUG_UARTC ) +#define DEBUG_UART_BASE TEGRA_UARTC_BASE +#elif defined(CONFIG_TEGRA_DEBUG_UARTD ) +#define DEBUG_UART_BASE TEGRA_UARTD_BASE +#elif defined(CONFIG_TEGRA_DEBUG_UARTE ) +#define DEBUG_UART_BASE TEGRA_UARTE_BASE +#else +#define DEBUG_UART_BASE NULL +#endif + +static void putc (int c) +{ +volatile u8 *uart = (volatile u8 *)DEBUG_UART_BASE ; +int shift =2 ; + +if (uart ==NULL ) +return ; + +while (!(uart[UART_LSR << shift] &UART_LSR_THRE )) +barrier (); + uart[UART_TX << shift] = c; +} + +static inline void flush (void ) +{ +} + +static inline void arch_decomp_setup (void ) +{ +volatile u8 *uart = (volatile u8 *)DEBUG_UART_BASE ; +int shift =2 ; + +if (uart ==NULL ) +return ; + + uart[UART_LCR << shift] |=UART_LCR_DLAB ; + uart[UART_DLL << shift] =0x75 ; + uart[UART_DLM << shift] =0x0 ; + uart[UART_LCR << shift] =3 ; +} + +static inline void arch_decomp_wdog (void ) +{ +} + +#endif arch/arm/mach-tegra/include/mach/vmalloc.h new file +28
-0@@ -0,0 +1,28 @@ +/* +* arch/arm/mach-tegra/include/mach/vmalloc.h +* +* Copyright (C) 2010 Google, Inc. +* +* Author: +* Colin Cross <[email protected]> +* Erik Gilling <[email protected]> +* +* 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_VMALLOC_H +#define __MACH_TEGRA_VMALLOC_H + +#include <asm/sizes.h> + +#define VMALLOC_END 0xFE000000 + +#endif arch/arm/mach-tegra/io.c new file +78
-0@@ -0,0 +1,78 @@ +/* +* arch/arm/mach-tegra/io.c +* +* Copyright (C) 2010 Google, Inc. +* +* Author: +* Colin Cross <[email protected]> +* Erik Gilling <[email protected]> +* +* 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/kernel.h> +#include <linux/module.h> +#include <linux/init.h> +#include <linux/mm.h> + +#include <mach/hardware.h> +#include <asm/io.h> +#include <asm/page.h> +#include <asm/mach/map.h> + +#include "board.h" + +static struct map_desc tegra_io_desc[]__initdata = { + { + .virtual =IO_PPSB_VIRT , + .pfn =__phys_to_pfn (IO_PPSB_PHYS ), + .length =IO_PPSB_SIZE , + .type =MT_DEVICE , + }, + { + .virtual =IO_APB_VIRT , + .pfn =__phys_to_pfn (IO_APB_PHYS ), + .length =IO_APB_SIZE , + .type =MT_DEVICE , + }, + { + .virtual =IO_CPU_VIRT , + .pfn =__phys_to_pfn (IO_CPU_PHYS ), + .length =IO_CPU_SIZE , + .type =MT_DEVICE , + }, +}; + +void __init tegra_map_common_io (void ) +{ +iotable_init (tegra_io_desc,ARRAY_SIZE (tegra_io_desc)); +} + +/* +* Intercept ioremap() requests for addresses in our fixed mapping regions. +*/ +void __iomem *tegra_ioremap (unsigned long p,size_t size,unsigned int type) +{ +void __iomem *v =IO_ADDRESS (p); +if (v ==NULL ) + v =__arm_ioremap (p, size, type); +return v; +} +EXPORT_SYMBOL (tegra_ioremap); + +void tegra_iounmap (volatile void __iomem *addr) +{ +unsigned long virt = (unsigned long )addr; + +if (virt >=VMALLOC_START && virt <VMALLOC_END ) +__iounmap (addr); +} +EXPORT_SYMBOL (tegra_iounmap);arch/arm/mm/Kconfig +1
-1@@ -754,7 +754,7 @@ config CACHE_FEROCEON_L2_WRITETHROUGH config CACHE_L2X0 bool "Enable the L2x0 outer cache controller" depends on REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP || MACH_REALVIEW_PB1176 || \ - REALVIEW_EB_A9MP || ARCH_MX35 || ARCH_MX31 || MACH_REALVIEW_PBX || ARCH_NOMADIK || ARCH_OMAP4 + REALVIEW_EB_A9MP || ARCH_MX35 || ARCH_MX31 || MACH_REALVIEW_PBX || ARCH_NOMADIK || ARCH_OMAP4 || ARCH_TEGRA default y select OUTER_CACHE help
Signature · 2 lines
Sincerely yours, Mike.
cover Tegra2 support
In reply to konkers at google.comQuoted 5 lines · konkers at google.com
Here's the cleaned up patch stack as promised. We've incorporated the feedback from Gary and Russel.
I've pushed these patches to the linux-tegra-2.6.34-rc1 branch at
git://android.git.kernel.org/kernel/tegra.git
Please change all the mach/io.h and asm/io.h to linux/io.h, and mach/gpio.h and asm/gpio.h to linux/gpio.h.
cover Tegra2 support
Quoted 9 lines · Russell King - ARM Linux
Quoted 5 lines · konkers at google.com
Here's the cleaned up patch stack as promised. ?We've incorporated the feedback from Gary and Russel.
I've pushed these patches to the linux-tegra-2.6.34-rc1 branch at
git://android.git.kernel.org/kernel/tegra.gitPlease change all the
mach/io.handasm/io.htolinux/io.h, andmach/gpio.handasm/gpio.htolinux/gpio.h.
Thanks, Will do.
-Erik
cover Tegra2 support
In reply to Russell King - ARM LinuxQuoted 9 lines · Russell King - ARM Linux
Quoted 5 lines · konkers at google.com
Here's the cleaned up patch stack as promised. ?We've incorporated the feedback from Gary and Russel.
I've pushed these patches to the linux-tegra-2.6.34-rc1 branch at
git://android.git.kernel.org/kernel/tegra.gitPlease change all the
mach/io.handasm/io.htolinux/io.h, andmach/gpio.handasm/gpio.htolinux/gpio.h.
I assume I want to use asm/io.h in entry-macro.S and debug-macro.S, yes?
-Erik
cover Tegra2 support
Quoted 6 lines · Erik Gilling
Quoted 4 lines · Russell King - ARM Linux
Quoted 3 lines · konkers at google.com
Here's the cleaned up patch stack as promised. ?We've incorporated the feedback from Gary and Russel.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
I've pushed these patches to the linux-tegra-2.6.34-rc1 branch at
git://android.git.kernel.org/kernel/tegra.gitPlease change all the
mach/io.handasm/io.htolinux/io.h, andmach/gpio.handasm/gpio.htolinux/gpio.h.I assume I want to use
asm/io.hinentry-macro.Sanddebug-macro.S, yes?
Nevermind. I, apparently, misunderstand what include/asm is used for.
I thought it was for files safe to include in assembly. asm/io.h is
clearly not. It seems I need to use mach/io.h in these two files.
-Erik
Quoted 8 lines · Erik Gilling
Quoted 1 line · Mike Rapoport
This patch adds basic support for Nvidia Tegra2 platform.
This code seems to be our port from
git://android.git.kernel.org/kernel/tegra.gitwith some features removed, minor cleanups, and many trivial changes. These changes make it difficult for us to track improvements and bug fixes in either direction.
Neither Nvidia nor Google showed any movements towards the mainline and it was completely not clear if such plans exist at all. I've posted the patch a week ago and there were no comments from you since then. I'd be glad to see Tegra support in the mainline whether it'd be my patch or yours. I did my best to bring the basic Tegra support to a state that it can be merged into the mainline and I'll be happy to contribute to that support in the future.
Quoted 4 lines
We're happy that other people are interested in our work however are disappointed that our opinions were not sought before making these changes and posting nor was any attribution given to the work's authors.
My apologies. Indeed, I should have make it clear that my work is based on git://android.git.kernel.org/kernel/tegra.git
Quoted 9 lines
We're still in the process here at Google of cleaning up the port for submission. We should have our changes rebased on 34-rc1 without the android-common code by the end of the day. We've been maintaining a patchstack which separates out the functional subsystems. Would people here prefer to see that or a collapsed patch like this one.
Specific issues with this patch with respect to our work:
Lots of trival changes like moving files around, renaming variables,
I've moved the things around because in my opinion they belong to the places were I've put them.
Quoted 2 lines
and re-wording/re-formating comments (sometimes changing the meaning of the comment incorrectly)
You are little bit exaggerating here. The wording was changed only in one comment and it doesn't seam to me to change the meaning.
Quoted 1 line
Removal of SMP, L2 cache, and pinmux support.
I've intended to add SMP, L2 and pinmux after the first hunk would be merged.
Quoted 4 lines
Removal of the
gpio_namesheader. Because tegra does not define GPIOs numerically, it is impossible to convert a gpio name (i.e. PN6) from a schematic to a GPIO number without consulting and interpreting the datasheet.
The gpio_names header could have been added later, although I don't agree that it is essential to have it at all. Usually board file create their own defines for GPIOs that reflect actual GPIO usage, e.g. SOME_DEVICE_RST.
Quoted 3 lines
Removal of the
tegra_gpio_enableandtegra_gpio_disablefunctions. Because of the way pin muxing is implemented in tegra, gpio configuration does not map into the pinmuxing subsystem.
I've removed these functions because they were not referenced by any other code.
Quoted 1 line
Removal of
pr_debuglines from the clock code.
I don't think that keeping pr_debug in each function is really good idea.
Quoted 2 lines
Changing the way peripheral clocks are defined to use two separate tables which are required to be kept in sync by hand.
Having static clocks definition has its advantages. It simplifies the initialization code and saves several CPU cycles on boot. However, I agree that your approach may be better from the maintainability POV.
Quoted 1 line
Removal of some pll entries.
The plls were reordered, but I think none was removed.
Quoted 1 line
-Erik
Signature · 2 lines
Sincerely yours, Mike.
Quoted 12 lines · Mike Rapoport
Quoted 10 lines · Erik Gilling
Quoted 2 lines · Mike Rapoport
This patch adds basic support for Nvidia Tegra2 platform.
This code seems to be our port from
git://android.git.kernel.org/kernel/tegra.gitwith some features removed, minor cleanups, and many trivial changes. ?These changes make it difficult for us to track improvements and bug fixes in either direction.
Quoted 3 lines
Neither Nvidia nor Google showed any movements towards the mainline and it was completely not clear if such plans exist at all. I've posted the patch a week ago and there were no comments from you since then.
It does help if you cc the authors when sending revised patches out for commentary (as git-send-email does by default, etc), since it's easy to miss things on high traffic lists like lkml or lakml. We first noticed the patch you sent out late Sunday evening, and Erik sent a reply out the following afternoon.
Brian
Hi Brian,
Quoted 13 lines · Brian Swetland
Quoted 11 lines · Mike Rapoport
Quoted 7 lines · Erik Gilling
Quoted 1 line · Mike Rapoport
This patch adds basic support for Nvidia Tegra2 platform.
This code seems to be our port from
git://android.git.kernel.org/kernel/tegra.gitwith some features removed, minor cleanups, and many trivial changes. These changes make it difficult for us to track improvements and bug fixes in either direction.Neither Nvidia nor Google showed any movements towards the mainline and it was completely not clear if such plans exist at all. I've posted the patch a week ago and there were no comments from you since then.
Quoted 5 lines
It does help if you cc the authors when sending revised patches out for commentary (as git-send-email does by default, etc), since it's easy to miss things on high traffic lists like lkml or lakml. We first noticed the patch you sent out late Sunday evening, and Erik sent a reply out the following afternoon.
Agree. I should have cc'ed Eric and Colin. Still, I'd expect more constructive comments than those Eric has sent.
Quoted 1 line
Brian
Signature · 2 lines
Sincerely yours, Mike.