RT-AC66 3.0.0.4.374.130 core
[tomato.git] / release / src-rt-6.x / linux / linux-2.6 / include / asm-arm / arch-s3c2410 / hardware.h
blob6dadf58ff9847842c0644787f23a7e687f91d5d4
1 /* linux/include/asm-arm/arch-s3c2410/hardware.h
3 * Copyright (c) 2003 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
6 * S3C2410 - hardware
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
13 #ifndef __ASM_ARCH_HARDWARE_H
14 #define __ASM_ARCH_HARDWARE_H
16 #ifndef __ASM_HARDWARE_H
17 #error "Do not include this directly, instead #include <asm/hardware.h>"
18 #endif
20 #ifndef __ASSEMBLY__
22 /* external functions for GPIO support
24 * These allow various different clients to access the same GPIO
25 * registers without conflicting. If your driver only owns the entire
26 * GPIO register, then it is safe to ioremap/__raw_{read|write} to it.
29 /* s3c2410_gpio_cfgpin
31 * set the configuration of the given pin to the value passed.
33 * eg:
34 * s3c2410_gpio_cfgpin(S3C2410_GPA0, S3C2410_GPA0_ADDR0);
35 * s3c2410_gpio_cfgpin(S3C2410_GPE8, S3C2410_GPE8_SDDAT1);
38 extern void s3c2410_gpio_cfgpin(unsigned int pin, unsigned int function);
40 extern unsigned int s3c2410_gpio_getcfg(unsigned int pin);
42 /* s3c2410_gpio_getirq
44 * turn the given pin number into the corresponding IRQ number
46 * returns:
47 * < 0 = no interrupt for this pin
48 * >=0 = interrupt number for the pin
51 extern int s3c2410_gpio_getirq(unsigned int pin);
53 #ifdef CONFIG_CPU_S3C2400
55 extern int s3c2400_gpio_getirq(unsigned int pin);
57 #endif /* CONFIG_CPU_S3C2400 */
59 /* s3c2410_gpio_irqfilter
61 * set the irq filtering on the given pin
63 * on = 0 => disable filtering
64 * 1 => enable filtering
66 * config = S3C2410_EINTFLT_PCLK or S3C2410_EINTFLT_EXTCLK orred with
67 * width of filter (0 through 63)
72 extern int s3c2410_gpio_irqfilter(unsigned int pin, unsigned int on,
73 unsigned int config);
75 /* s3c2410_gpio_pullup
77 * configure the pull-up control on the given pin
79 * to = 1 => disable the pull-up
80 * 0 => enable the pull-up
82 * eg;
84 * s3c2410_gpio_pullup(S3C2410_GPB0, 0);
85 * s3c2410_gpio_pullup(S3C2410_GPE8, 0);
88 extern void s3c2410_gpio_pullup(unsigned int pin, unsigned int to);
90 extern void s3c2410_gpio_setpin(unsigned int pin, unsigned int to);
92 extern unsigned int s3c2410_gpio_getpin(unsigned int pin);
94 extern unsigned int s3c2410_modify_misccr(unsigned int clr, unsigned int chg);
96 #ifdef CONFIG_CPU_S3C2440
98 extern int s3c2440_set_dsc(unsigned int pin, unsigned int value);
100 #endif /* CONFIG_CPU_S3C2440 */
103 #endif /* __ASSEMBLY__ */
105 #include <asm/sizes.h>
106 #include <asm/arch/map.h>
108 /* machine specific hardware definitions should go after this */
110 /* currently here until moved into config (todo) */
111 #define CONFIG_NO_MULTIWORD_IO
113 #endif /* __ASM_ARCH_HARDWARE_H */