diff options
author | Arnd Bergmann <arnd@arndb.de> | 2011-10-31 23:25:41 +0100 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2011-10-31 23:25:41 +0100 |
commit | 3e965b176341b78620f7404fd8b7f9a0d061f8a2 (patch) | |
tree | a2dbf06d6ae20fbe417b70f0a471cc4f93ff0a71 /arch/arm/mach-tegra/include | |
parent | 034ee299122c6b145d6d3cafb9ef5c329a4ab990 (diff) | |
parent | 5839fec9d8db35b2b07359b18a77295418e239ad (diff) |
Merge branch 'next/fixes' into next/cleanup
Conflicts:
arch/arm/mach-mxs/include/mach/gpio.h
arch/arm/plat-mxc/include/mach/gpio.h
drivers/video/omap/lcd_apollon.c
drivers/video/omap/lcd_ldp.c
drivers/video/omap/lcd_overo.c
Diffstat (limited to 'arch/arm/mach-tegra/include')
-rw-r--r-- | arch/arm/mach-tegra/include/mach/debug-macro.S | 2 | ||||
-rw-r--r-- | arch/arm/mach-tegra/include/mach/gpio-tegra.h (renamed from arch/arm/mach-tegra/include/mach/memory.h) | 25 | ||||
-rw-r--r-- | arch/arm/mach-tegra/include/mach/gpio.h | 60 |
3 files changed, 19 insertions, 68 deletions
diff --git a/arch/arm/mach-tegra/include/mach/debug-macro.S b/arch/arm/mach-tegra/include/mach/debug-macro.S index e0ebe65c165..619abc63aee 100644 --- a/arch/arm/mach-tegra/include/mach/debug-macro.S +++ b/arch/arm/mach-tegra/include/mach/debug-macro.S @@ -21,7 +21,7 @@ #include <mach/io.h> #include <mach/iomap.h> - .macro addruart, rp, rv + .macro addruart, rp, rv, tmp ldr \rp, =IO_APB_PHYS @ physical ldr \rv, =IO_APB_VIRT @ virtual orr \rp, \rp, #(TEGRA_DEBUG_UART_BASE & 0xFF) diff --git a/arch/arm/mach-tegra/include/mach/memory.h b/arch/arm/mach-tegra/include/mach/gpio-tegra.h index 537db3aa81a..87d37fdf508 100644 --- a/arch/arm/mach-tegra/include/mach/memory.h +++ b/arch/arm/mach-tegra/include/mach/gpio-tegra.h @@ -1,10 +1,9 @@ /* - * arch/arm/mach-tegra/include/mach/memory.h + * arch/arm/mach-tegra/include/mach/gpio.h * * Copyright (C) 2010 Google, Inc. * * Author: - * Colin Cross <ccross@google.com> * Erik Gilling <konkers@google.com> * * This software is licensed under the terms of the GNU General Public @@ -18,11 +17,23 @@ * */ -#ifndef __MACH_TEGRA_MEMORY_H -#define __MACH_TEGRA_MEMORY_H +#ifndef __MACH_TEGRA_GPIO_TEGRA_H +#define __MACH_TEGRA_GPIO_TEGRA_H -/* physical offset of RAM */ -#define PLAT_PHYS_OFFSET UL(0) +#include <linux/types.h> +#include <mach/irqs.h> -#endif +#define TEGRA_NR_GPIOS INT_GPIO_NR + +#define TEGRA_GPIO_TO_IRQ(gpio) (INT_GPIO_BASE + (gpio)) + +struct tegra_gpio_table { + int gpio; /* GPIO number */ + bool enable; /* Enable for GPIO at init? */ +}; +void tegra_gpio_config(struct tegra_gpio_table *table, int num); +void tegra_gpio_enable(int gpio); +void tegra_gpio_disable(int gpio); + +#endif diff --git a/arch/arm/mach-tegra/include/mach/gpio.h b/arch/arm/mach-tegra/include/mach/gpio.h index 196f114dc24..e69de29bb2d 100644 --- a/arch/arm/mach-tegra/include/mach/gpio.h +++ b/arch/arm/mach-tegra/include/mach/gpio.h @@ -1,60 +0,0 @@ -/* - * arch/arm/mach-tegra/include/mach/gpio.h - * - * Copyright (C) 2010 Google, Inc. - * - * Author: - * Erik Gilling <konkers@google.com> - * - * This software is licensed under the terms of the GNU General Public - * License version 2, as published by the Free Software Foundation, and - * may be copied, distributed, and modified under those terms. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ - -#ifndef __MACH_TEGRA_GPIO_H -#define __MACH_TEGRA_GPIO_H - -#include <linux/init.h> -#include <mach/irqs.h> - -#define TEGRA_NR_GPIOS INT_GPIO_NR - -#include <asm-generic/gpio.h> - -#define gpio_get_value __gpio_get_value -#define gpio_set_value __gpio_set_value -#define gpio_cansleep __gpio_cansleep - -#define TEGRA_GPIO_TO_IRQ(gpio) (INT_GPIO_BASE + (gpio)) -#define TEGRA_IRQ_TO_GPIO(irq) ((irq) - INT_GPIO_BASE) - -static inline int gpio_to_irq(unsigned int gpio) -{ - if (gpio < TEGRA_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; -} - -struct tegra_gpio_table { - int gpio; /* GPIO number */ - bool enable; /* Enable for GPIO at init? */ -}; - -void tegra_gpio_config(struct tegra_gpio_table *table, int num); -void tegra_gpio_enable(int gpio); -void tegra_gpio_disable(int gpio); - -#endif |