diff options
Diffstat (limited to 'arch/arm/mach-ixp4xx/include')
| -rw-r--r-- | arch/arm/mach-ixp4xx/include/mach/gpio.h | 76 | ||||
| -rw-r--r-- | arch/arm/mach-ixp4xx/include/mach/memory.h | 17 | ||||
| -rw-r--r-- | arch/arm/mach-ixp4xx/include/mach/system.h | 44 | ||||
| -rw-r--r-- | arch/arm/mach-ixp4xx/include/mach/vmalloc.h | 5 |
4 files changed, 142 insertions, 0 deletions
diff --git a/arch/arm/mach-ixp4xx/include/mach/gpio.h b/arch/arm/mach-ixp4xx/include/mach/gpio.h new file mode 100644 index 00000000000..a5f87ded2f2 --- /dev/null +++ b/arch/arm/mach-ixp4xx/include/mach/gpio.h | |||
| @@ -0,0 +1,76 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/mach-ixp4xx/include/mach/gpio.h | ||
| 3 | * | ||
| 4 | * IXP4XX GPIO wrappers for arch-neutral GPIO calls | ||
| 5 | * | ||
| 6 | * Written by Milan Svoboda <msvoboda@ra.rockwell.com> | ||
| 7 | * Based on PXA implementation by Philipp Zabel <philipp.zabel@gmail.com> | ||
| 8 | * | ||
| 9 | * This program is free software; you can redistribute it and/or modify | ||
| 10 | * it under the terms of the GNU General Public License as published by | ||
| 11 | * the Free Software Foundation; either version 2 of the License, or | ||
| 12 | * (at your option) any later version. | ||
| 13 | * | ||
| 14 | * This program is distributed in the hope that it will be useful, | ||
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 17 | * GNU General Public License for more details. | ||
| 18 | * | ||
| 19 | * You should have received a copy of the GNU General Public License | ||
| 20 | * along with this program; if not, write to the Free Software | ||
| 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 22 | * | ||
| 23 | */ | ||
| 24 | |||
| 25 | #ifndef __ASM_ARCH_IXP4XX_GPIO_H | ||
| 26 | #define __ASM_ARCH_IXP4XX_GPIO_H | ||
| 27 | |||
| 28 | #include <linux/kernel.h> | ||
| 29 | #include <mach/hardware.h> | ||
| 30 | |||
| 31 | static inline int gpio_request(unsigned gpio, const char *label) | ||
| 32 | { | ||
| 33 | return 0; | ||
| 34 | } | ||
| 35 | |||
| 36 | static inline void gpio_free(unsigned gpio) | ||
| 37 | { | ||
| 38 | might_sleep(); | ||
| 39 | |||
| 40 | return; | ||
| 41 | } | ||
| 42 | |||
| 43 | static inline int gpio_direction_input(unsigned gpio) | ||
| 44 | { | ||
| 45 | gpio_line_config(gpio, IXP4XX_GPIO_IN); | ||
| 46 | return 0; | ||
| 47 | } | ||
| 48 | |||
| 49 | static inline int gpio_direction_output(unsigned gpio, int level) | ||
| 50 | { | ||
| 51 | gpio_line_set(gpio, level); | ||
| 52 | gpio_line_config(gpio, IXP4XX_GPIO_OUT); | ||
| 53 | return 0; | ||
| 54 | } | ||
| 55 | |||
| 56 | static inline int gpio_get_value(unsigned gpio) | ||
| 57 | { | ||
| 58 | int value; | ||
| 59 | |||
| 60 | gpio_line_get(gpio, &value); | ||
| 61 | |||
| 62 | return value; | ||
| 63 | } | ||
| 64 | |||
| 65 | static inline void gpio_set_value(unsigned gpio, int value) | ||
| 66 | { | ||
| 67 | gpio_line_set(gpio, value); | ||
| 68 | } | ||
| 69 | |||
| 70 | #include <asm-generic/gpio.h> /* cansleep wrappers */ | ||
| 71 | |||
| 72 | extern int gpio_to_irq(int gpio); | ||
| 73 | extern int irq_to_gpio(unsigned int irq); | ||
| 74 | |||
| 75 | #endif | ||
| 76 | |||
diff --git a/arch/arm/mach-ixp4xx/include/mach/memory.h b/arch/arm/mach-ixp4xx/include/mach/memory.h new file mode 100644 index 00000000000..4caf1761f1e --- /dev/null +++ b/arch/arm/mach-ixp4xx/include/mach/memory.h | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/mach-ixp4xx/include/mach/memory.h | ||
| 3 | * | ||
| 4 | * Copyright (c) 2001-2004 MontaVista Software, Inc. | ||
| 5 | */ | ||
| 6 | |||
| 7 | #ifndef __ASM_ARCH_MEMORY_H | ||
| 8 | #define __ASM_ARCH_MEMORY_H | ||
| 9 | |||
| 10 | #include <asm/sizes.h> | ||
| 11 | |||
| 12 | /* | ||
| 13 | * Physical DRAM offset. | ||
| 14 | */ | ||
| 15 | #define PLAT_PHYS_OFFSET UL(0x00000000) | ||
| 16 | |||
| 17 | #endif | ||
diff --git a/arch/arm/mach-ixp4xx/include/mach/system.h b/arch/arm/mach-ixp4xx/include/mach/system.h new file mode 100644 index 00000000000..54c0af7fa2d --- /dev/null +++ b/arch/arm/mach-ixp4xx/include/mach/system.h | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/mach-ixp4xx/include/mach/system.h | ||
| 3 | * | ||
| 4 | * Copyright (C) 2002 Intel Corporation. | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | * | ||
| 10 | */ | ||
| 11 | |||
| 12 | #include <mach/hardware.h> | ||
| 13 | |||
| 14 | static inline void arch_idle(void) | ||
| 15 | { | ||
| 16 | /* ixp4xx does not implement the XScale PWRMODE register, | ||
| 17 | * so it must not call cpu_do_idle() here. | ||
| 18 | */ | ||
| 19 | #if 0 | ||
| 20 | cpu_do_idle(); | ||
| 21 | #endif | ||
| 22 | } | ||
| 23 | |||
| 24 | |||
| 25 | static inline void arch_reset(char mode, const char *cmd) | ||
| 26 | { | ||
| 27 | if ( 1 && mode == 's') { | ||
| 28 | /* Jump into ROM at address 0 */ | ||
| 29 | cpu_reset(0); | ||
| 30 | } else { | ||
| 31 | /* Use on-chip reset capability */ | ||
| 32 | |||
| 33 | /* set the "key" register to enable access to | ||
| 34 | * "timer" and "enable" registers | ||
| 35 | */ | ||
| 36 | *IXP4XX_OSWK = IXP4XX_WDT_KEY; | ||
| 37 | |||
| 38 | /* write 0 to the timer register for an immediate reset */ | ||
| 39 | *IXP4XX_OSWT = 0; | ||
| 40 | |||
| 41 | *IXP4XX_OSWE = IXP4XX_WDT_RESET_ENABLE | IXP4XX_WDT_COUNT_ENABLE; | ||
| 42 | } | ||
| 43 | } | ||
| 44 | |||
diff --git a/arch/arm/mach-ixp4xx/include/mach/vmalloc.h b/arch/arm/mach-ixp4xx/include/mach/vmalloc.h new file mode 100644 index 00000000000..9bcd64d5985 --- /dev/null +++ b/arch/arm/mach-ixp4xx/include/mach/vmalloc.h | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/mach-ixp4xx/include/mach/vmalloc.h | ||
| 3 | */ | ||
| 4 | #define VMALLOC_END (0xff000000UL) | ||
| 5 | |||
