From b5ee9002583fc14e6d45a04c18f208987a8fbced Mon Sep 17 00:00:00 2001 From: Nicolas Pitre Date: Fri, 5 Sep 2008 21:53:30 -0400 Subject: [ARM] remove a common set of __virt_to_bus definitions Let's provide an overridable default instead of having every machine class define __virt_to_bus and __bus_to_virt to the same thing. What most platforms are using is bus_addr == phys_addr so such is the default. One exception is ebsa110 which has no DMA what so ever, so the actual definition is not important except only for proper compilation. Also added a comment about the special footbridge bus translation. Let's also remove comments alluding to set_dma_addr which is not (and should not) be commonly used. Signed-off-by: Nicolas Pitre Signed-off-by: Russell King --- arch/arm/mach-mv78xx0/include/mach/memory.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'arch/arm/mach-mv78xx0/include') diff --git a/arch/arm/mach-mv78xx0/include/mach/memory.h b/arch/arm/mach-mv78xx0/include/mach/memory.h index 9e47a14..e663042 100644 --- a/arch/arm/mach-mv78xx0/include/mach/memory.h +++ b/arch/arm/mach-mv78xx0/include/mach/memory.h @@ -7,8 +7,4 @@ #define PHYS_OFFSET UL(0x00000000) -#define __virt_to_bus(x) __virt_to_phys(x) -#define __bus_to_virt(x) __phys_to_virt(x) - - #endif -- cgit v1.1 From dcea83adc666061864b82c96e059dffe7268b512 Mon Sep 17 00:00:00 2001 From: Russell King Date: Sat, 29 Nov 2008 11:40:28 +0000 Subject: [ARM] Hide ISA DMA API when ISA_DMA_API is unset When ISA_DMA_API is unset, we're not implementing the ISA DMA API, so there's no point in publishing the prototypes via asm/dma.h, nor including the machine dependent parts of that API. This allows us to remove a lot of mach/dma.h files which don't contain any useful code. Unfortunately though, some platforms put their own private non-ISA definitions into mach/dma.h, so we leave these behind and fix the appropriate #include statments. Signed-off-by: Russell King --- arch/arm/mach-mv78xx0/include/mach/dma.h | 1 - 1 file changed, 1 deletion(-) delete mode 100644 arch/arm/mach-mv78xx0/include/mach/dma.h (limited to 'arch/arm/mach-mv78xx0/include') diff --git a/arch/arm/mach-mv78xx0/include/mach/dma.h b/arch/arm/mach-mv78xx0/include/mach/dma.h deleted file mode 100644 index 40a8c17..0000000 --- a/arch/arm/mach-mv78xx0/include/mach/dma.h +++ /dev/null @@ -1 +0,0 @@ -/* empty */ -- cgit v1.1 From b95a13d79c0e92c9c844fa8aa089c9bd2ed10705 Mon Sep 17 00:00:00 2001 From: Lennert Buytenhek Date: Mon, 20 Oct 2008 01:51:04 +0200 Subject: [ARM] mv78xx0: implement GPIO and GPIO interrupt support Signed-off-by: Lennert Buytenhek Signed-off-by: Nicolas Pitre --- arch/arm/mach-mv78xx0/include/mach/gpio.h | 40 ++++++++++++++++++++++++++++ arch/arm/mach-mv78xx0/include/mach/irqs.h | 4 +-- arch/arm/mach-mv78xx0/include/mach/mv78xx0.h | 3 --- 3 files changed, 41 insertions(+), 6 deletions(-) create mode 100644 arch/arm/mach-mv78xx0/include/mach/gpio.h (limited to 'arch/arm/mach-mv78xx0/include') diff --git a/arch/arm/mach-mv78xx0/include/mach/gpio.h b/arch/arm/mach-mv78xx0/include/mach/gpio.h new file mode 100644 index 0000000..d9d1535 --- /dev/null +++ b/arch/arm/mach-mv78xx0/include/mach/gpio.h @@ -0,0 +1,40 @@ +/* + * arch/asm-arm/mach-mv78xx0/include/mach/gpio.h + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without any + * warranty of any kind, whether express or implied. + */ + +#ifndef __ASM_ARCH_GPIO_H +#define __ASM_ARCH_GPIO_H + +#include +#include +#include /* cansleep wrappers */ + +extern int mv78xx0_core_index(void); + +#define GPIO_MAX 32 +#define GPIO_OUT(pin) (DEV_BUS_VIRT_BASE + 0x0100) +#define GPIO_IO_CONF(pin) (DEV_BUS_VIRT_BASE + 0x0104) +#define GPIO_BLINK_EN(pin) (DEV_BUS_VIRT_BASE + 0x0108) +#define GPIO_IN_POL(pin) (DEV_BUS_VIRT_BASE + 0x010c) +#define GPIO_DATA_IN(pin) (DEV_BUS_VIRT_BASE + 0x0110) +#define GPIO_EDGE_CAUSE(pin) (DEV_BUS_VIRT_BASE + 0x0114) +#define GPIO_MASK_OFF (mv78xx0_core_index() ? 0x18 : 0) +#define GPIO_EDGE_MASK(pin) (DEV_BUS_VIRT_BASE + 0x0118 + GPIO_MASK_OFF) +#define GPIO_LEVEL_MASK(pin) (DEV_BUS_VIRT_BASE + 0x011c + GPIO_MASK_OFF) + +static inline int gpio_to_irq(int pin) +{ + return pin + IRQ_MV78XX0_GPIO_START; +} + +static inline int irq_to_gpio(int irq) +{ + return irq - IRQ_MV78XX0_GPIO_START; +} + + +#endif diff --git a/arch/arm/mach-mv78xx0/include/mach/irqs.h b/arch/arm/mach-mv78xx0/include/mach/irqs.h index bebc330..fa1d422 100644 --- a/arch/arm/mach-mv78xx0/include/mach/irqs.h +++ b/arch/arm/mach-mv78xx0/include/mach/irqs.h @@ -11,8 +11,6 @@ #ifndef __ASM_ARCH_IRQS_H #define __ASM_ARCH_IRQS_H -#include "mv78xx0.h" /* need GPIO_MAX */ - /* * MV78xx0 Low Interrupt Controller */ @@ -88,7 +86,7 @@ * MV78XX0 General Purpose Pins */ #define IRQ_MV78XX0_GPIO_START 96 -#define NR_GPIO_IRQS GPIO_MAX +#define NR_GPIO_IRQS 32 #define NR_IRQS (IRQ_MV78XX0_GPIO_START + NR_GPIO_IRQS) diff --git a/arch/arm/mach-mv78xx0/include/mach/mv78xx0.h b/arch/arm/mach-mv78xx0/include/mach/mv78xx0.h index ee9c559..e930ea5 100644 --- a/arch/arm/mach-mv78xx0/include/mach/mv78xx0.h +++ b/arch/arm/mach-mv78xx0/include/mach/mv78xx0.h @@ -122,7 +122,4 @@ #define SATA_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0xa0000) -#define GPIO_MAX 32 - - #endif -- cgit v1.1