1 /* linux/include/asm-arm/arch-s3c2410/hardware.h
3 * (c) 2003 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
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
18 /* external functions for GPIO support
20 * These allow various different clients to access the same GPIO
21 * registers without conflicting. If your driver only owns the entire
22 * GPIO register, then it is safe to ioremap/__raw_{read|write} to it.
25 /* s3c2410_gpio_cfgpin
27 * set the configuration of the given pin to the value passed.
30 * s3c2410_gpio_cfgpin(S3C2410_GPA0, S3C2410_GPA0_ADDR0);
31 * s3c2410_gpio_cfgpin(S3C2410_GPE8, S3C2410_GPE8_SDDAT1);
34 extern void s3c2410_gpio_cfgpin(unsigned int pin
, unsigned int function
);
36 extern unsigned int s3c2410_gpio_getcfg(unsigned int pin
);
38 /* s3c2410_gpio_getirq
40 * turn the given pin number into the corresponding IRQ number
43 * < 0 = no interrupt for this pin
44 * >=0 = interrupt number for the pin
47 extern int s3c2410_gpio_getirq(unsigned int pin
);
49 #ifdef CONFIG_CPU_S3C2400
51 extern int s3c2400_gpio_getirq(unsigned int pin
);
53 #endif /* CONFIG_CPU_S3C2400 */
55 /* s3c2410_gpio_irqfilter
57 * set the irq filtering on the given pin
59 * on = 0 => disable filtering
60 * 1 => enable filtering
62 * config = S3C2410_EINTFLT_PCLK or S3C2410_EINTFLT_EXTCLK orred with
63 * width of filter (0 through 63)
68 extern int s3c2410_gpio_irqfilter(unsigned int pin
, unsigned int on
,
71 /* s3c2410_gpio_pullup
73 * configure the pull-up control on the given pin
75 * to = 1 => disable the pull-up
76 * 0 => enable the pull-up
80 * s3c2410_gpio_pullup(S3C2410_GPB0, 0);
81 * s3c2410_gpio_pullup(S3C2410_GPE8, 0);
84 extern void s3c2410_gpio_pullup(unsigned int pin
, unsigned int to
);
86 extern void s3c2410_gpio_setpin(unsigned int pin
, unsigned int to
);
88 extern unsigned int s3c2410_gpio_getpin(unsigned int pin
);
90 extern unsigned int s3c2410_modify_misccr(unsigned int clr
, unsigned int chg
);
92 #ifdef CONFIG_CPU_S3C2440
94 extern int s3c2440_set_dsc(unsigned int pin
, unsigned int value
);
96 #endif /* CONFIG_CPU_S3C2440 */
99 #endif /* __ASSEMBLY__ */
101 #include <asm/sizes.h>
102 #include <asm/arch/map.h>
104 /* machine specific hardware definitions should go after this */
106 /* currently here until moved into config (todo) */
107 #define CONFIG_NO_MULTIWORD_IO
109 #endif /* __ASM_ARCH_HARDWARE_H */