summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Gilles <jgilles@multitech.com>2011-09-28 15:06:46 -0500
committerJesse Gilles <jgilles@multitech.com>2011-09-28 15:06:46 -0500
commitf2d4c0e55ff00d81398ba3566ea90e886bb59875 (patch)
tree4d270def45dd441e43d2b8680bb8e87fc8a3a1a1
parent2384c15db31728b885aa1de4a8879eebe8e210e4 (diff)
linux-2.6.35: mt100eocg - add function for output pin with pullup to at91 gpio
-rw-r--r--multitech/recipes/linux/linux-2.6.35/mt100eocg/linux-2.6.35.14-at91-gpio-pullup.patch43
-rw-r--r--multitech/recipes/linux/linux_2.6.35.bbappend3
2 files changed, 45 insertions, 1 deletions
diff --git a/multitech/recipes/linux/linux-2.6.35/mt100eocg/linux-2.6.35.14-at91-gpio-pullup.patch b/multitech/recipes/linux/linux-2.6.35/mt100eocg/linux-2.6.35.14-at91-gpio-pullup.patch
new file mode 100644
index 0000000..d967838
--- /dev/null
+++ b/multitech/recipes/linux/linux-2.6.35/mt100eocg/linux-2.6.35.14-at91-gpio-pullup.patch
@@ -0,0 +1,43 @@
+Index: linux-2.6.35/arch/arm/mach-at91/gpio.c
+===================================================================
+--- linux-2.6.35.orig/arch/arm/mach-at91/gpio.c 2011-09-27 14:36:06.587267689 -0500
++++ linux-2.6.35/arch/arm/mach-at91/gpio.c 2011-09-27 14:42:50.997576753 -0500
+@@ -202,6 +202,26 @@
+ }
+ EXPORT_SYMBOL(at91_set_gpio_output);
+
++/*
++ * configure pin for output and enable/disable pullup
++ */
++int __init_or_module at91_set_gpio_output_with_pullup(unsigned pin, int value, int use_pullup)
++{
++ void __iomem *pio = pin_to_controller(pin);
++ unsigned mask = pin_to_mask(pin);
++
++ if (!pio)
++ return -EINVAL;
++
++ __raw_writel(mask, pio + PIO_IDR);
++ __raw_writel(mask, pio + (use_pullup ? PIO_PUER : PIO_PUDR));
++ __raw_writel(mask, pio + (value ? PIO_SODR : PIO_CODR));
++ __raw_writel(mask, pio + PIO_OER);
++ __raw_writel(mask, pio + PIO_PER);
++ return 0;
++}
++EXPORT_SYMBOL(at91_set_gpio_output_with_pullup);
++
+
+ /*
+ * enable/disable the glitch filter; mostly used with IRQ handling.
+Index: linux-2.6.35/arch/arm/mach-at91/include/mach/gpio.h
+===================================================================
+--- linux-2.6.35.orig/arch/arm/mach-at91/include/mach/gpio.h
++++ linux-2.6.35/arch/arm/mach-at91/include/mach/gpio.h
+@@ -194,6 +194,7 @@ extern int __init_or_module at91_set_A_p
+ extern int __init_or_module at91_set_B_periph(unsigned pin, int use_pullup);
+ extern int __init_or_module at91_set_gpio_input(unsigned pin, int use_pullup);
+ extern int __init_or_module at91_set_gpio_output(unsigned pin, int value);
++extern int __init_or_module at91_set_gpio_output_with_pullup(unsigned pin, int value, int use_pullup);
+ extern int __init_or_module at91_set_deglitch(unsigned pin, int is_on);
+ extern int __init_or_module at91_set_multi_drive(unsigned pin, int is_on);
+
diff --git a/multitech/recipes/linux/linux_2.6.35.bbappend b/multitech/recipes/linux/linux_2.6.35.bbappend
index a594697..a256488 100644
--- a/multitech/recipes/linux/linux_2.6.35.bbappend
+++ b/multitech/recipes/linux/linux_2.6.35.bbappend
@@ -1,7 +1,7 @@
FILESEXTRA := "${THISDIR}"
FILESPATHBASE =. "${FILESEXTRA}:"
-PR .= ".corecdp3"
+PR .= ".corecdp4"
STABLEV = "14"
SRC_URI_mtcdp = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${PV}.tar.bz2;name=kernel \
@@ -19,6 +19,7 @@ SRC_URI_mt100eocg = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${PV}.tar.b
${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/longterm/v${PV}/patch-${PV}.${STABLEV}.bz2;apply=yes;name=stablepatch \
file://defconfig \
file://linux-2.6.35.14-mach-at91-mt100eocg.patch \
+ file://linux-2.6.35.14-at91-gpio-pullup.patch \
file://linux-2.6.35-sierra-1.7.40.patch \
file://linux-2.6.32.3-atmel_spi.patch \
file://linux-2.6.32.3-at25.patch \