From: Florian Fainelli Date: Sun, 8 Nov 2009 22:49:28 +0000 (+0000) Subject: move headers to arch/x86/include/asm/, patch from sn9 X-Git-Tag: reboot~21932 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=685d84af2c96f82e2ad0668ff0e5973ab2bca3d3;p=openwrt%2Fstaging%2Flynxis.git move headers to arch/x86/include/asm/, patch from sn9 SVN-Revision: 18347 --- diff --git a/target/linux/rdc/files-2.6.30/arch/x86/include/asm/mach-rdc321x/gpio.h b/target/linux/rdc/files-2.6.30/arch/x86/include/asm/mach-rdc321x/gpio.h deleted file mode 100644 index 873bffe302..0000000000 --- a/target/linux/rdc/files-2.6.30/arch/x86/include/asm/mach-rdc321x/gpio.h +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef _ASM_X86_MACH_RDC321X_GPIO_H -#define _ASM_X86_MACH_RDC321X_GPIO_H - -#include - -extern int rdc_gpio_get_value(unsigned gpio); -extern void rdc_gpio_set_value(unsigned gpio, int value); -extern int rdc_gpio_direction_input(unsigned gpio); -extern int rdc_gpio_direction_output(unsigned gpio, int value); -extern int rdc_gpio_request(unsigned gpio, const char *label); -extern void rdc_gpio_free(unsigned gpio); - -/* Wrappers for the arch-neutral GPIO API */ - -static inline int gpio_request(unsigned gpio, const char *label) -{ - return rdc_gpio_request(gpio, label); -} - -static inline void gpio_free(unsigned gpio) -{ - might_sleep(); - rdc_gpio_free(gpio); -} - -static inline int gpio_direction_input(unsigned gpio) -{ - return rdc_gpio_direction_input(gpio); -} - -static inline int gpio_direction_output(unsigned gpio, int value) -{ - return rdc_gpio_direction_output(gpio, value); -} - -static inline int gpio_get_value(unsigned gpio) -{ - return rdc_gpio_get_value(gpio); -} - -static inline void gpio_set_value(unsigned gpio, int value) -{ - rdc_gpio_set_value(gpio, value); -} - -static inline int gpio_to_irq(unsigned gpio) -{ - return gpio; -} - -static inline int irq_to_gpio(unsigned irq) -{ - return irq; -} - -/* For cansleep */ -#include - -#endif /* _ASM_X86_MACH_RDC321X_GPIO_H */ diff --git a/target/linux/rdc/files-2.6.30/arch/x86/include/asm/mach-rdc321x/rdc321x_defs.h b/target/linux/rdc/files-2.6.30/arch/x86/include/asm/mach-rdc321x/rdc321x_defs.h deleted file mode 100644 index c8e9c8bed3..0000000000 --- a/target/linux/rdc/files-2.6.30/arch/x86/include/asm/mach-rdc321x/rdc321x_defs.h +++ /dev/null @@ -1,12 +0,0 @@ -#define PFX "rdc321x: " - -/* General purpose configuration and data registers */ -#define RDC3210_CFGREG_ADDR 0x0CF8 -#define RDC3210_CFGREG_DATA 0x0CFC - -#define RDC321X_GPIO_CTRL_REG1 0x48 -#define RDC321X_GPIO_CTRL_REG2 0x84 -#define RDC321X_GPIO_DATA_REG1 0x4c -#define RDC321X_GPIO_DATA_REG2 0x88 - -#define RDC321X_MAX_GPIO 58 diff --git a/target/linux/rdc/files-2.6.30/arch/x86/include/asm/rdc321x_gpio.h b/target/linux/rdc/files-2.6.30/arch/x86/include/asm/rdc321x_gpio.h new file mode 100644 index 0000000000..873bffe302 --- /dev/null +++ b/target/linux/rdc/files-2.6.30/arch/x86/include/asm/rdc321x_gpio.h @@ -0,0 +1,59 @@ +#ifndef _ASM_X86_MACH_RDC321X_GPIO_H +#define _ASM_X86_MACH_RDC321X_GPIO_H + +#include + +extern int rdc_gpio_get_value(unsigned gpio); +extern void rdc_gpio_set_value(unsigned gpio, int value); +extern int rdc_gpio_direction_input(unsigned gpio); +extern int rdc_gpio_direction_output(unsigned gpio, int value); +extern int rdc_gpio_request(unsigned gpio, const char *label); +extern void rdc_gpio_free(unsigned gpio); + +/* Wrappers for the arch-neutral GPIO API */ + +static inline int gpio_request(unsigned gpio, const char *label) +{ + return rdc_gpio_request(gpio, label); +} + +static inline void gpio_free(unsigned gpio) +{ + might_sleep(); + rdc_gpio_free(gpio); +} + +static inline int gpio_direction_input(unsigned gpio) +{ + return rdc_gpio_direction_input(gpio); +} + +static inline int gpio_direction_output(unsigned gpio, int value) +{ + return rdc_gpio_direction_output(gpio, value); +} + +static inline int gpio_get_value(unsigned gpio) +{ + return rdc_gpio_get_value(gpio); +} + +static inline void gpio_set_value(unsigned gpio, int value) +{ + rdc_gpio_set_value(gpio, value); +} + +static inline int gpio_to_irq(unsigned gpio) +{ + return gpio; +} + +static inline int irq_to_gpio(unsigned irq) +{ + return irq; +} + +/* For cansleep */ +#include + +#endif /* _ASM_X86_MACH_RDC321X_GPIO_H */ diff --git a/target/linux/rdc/files-2.6.30/arch/x86/mach-rdc321x/gpio.c b/target/linux/rdc/files-2.6.30/arch/x86/mach-rdc321x/gpio.c index c7eff5d2c0..92df2201df 100644 --- a/target/linux/rdc/files-2.6.30/arch/x86/mach-rdc321x/gpio.c +++ b/target/linux/rdc/files-2.6.30/arch/x86/mach-rdc321x/gpio.c @@ -26,8 +26,8 @@ #include #include -#include -#include +#include +#include /* spin lock to protect our private copy of GPIO data register plus diff --git a/target/linux/rdc/files-2.6.30/arch/x86/mach-rdc321x/platform.c b/target/linux/rdc/files-2.6.30/arch/x86/mach-rdc321x/platform.c index 5393996343..e319c02b33 100644 --- a/target/linux/rdc/files-2.6.30/arch/x86/mach-rdc321x/platform.c +++ b/target/linux/rdc/files-2.6.30/arch/x86/mach-rdc321x/platform.c @@ -36,7 +36,7 @@ #include #include -#include +#include /* Flash */ #ifdef CONFIG_MTD_R8610 diff --git a/target/linux/rdc/patches-2.6.30/002-platform_support.patch b/target/linux/rdc/patches-2.6.30/002-platform_support.patch index 74fa95dbea..3e6394fb27 100644 --- a/target/linux/rdc/patches-2.6.30/002-platform_support.patch +++ b/target/linux/rdc/patches-2.6.30/002-platform_support.patch @@ -1,11 +1,12 @@ ---- a/arch/x86/Makefile -+++ b/arch/x86/Makefile -@@ -124,6 +124,10 @@ core-y += $(fcore-y) +Index: linux-2.6.30.9/arch/x86/Makefile +=================================================================== +--- linux-2.6.30.9.orig/arch/x86/Makefile 2009-11-06 07:29:13.739468521 -0800 ++++ linux-2.6.30.9/arch/x86/Makefile 2009-11-06 07:30:29.383510569 -0800 +@@ -124,6 +124,9 @@ # Xen paravirtualization support core-$(CONFIG_XEN) += arch/x86/xen/ +# RDC R-321X support -+cflags-$(CONFIG_X86_RDC321X) := -Iarch/x86/include/asm/mach-rdc321x +core-$(CONFIG_X86_RDC321X) += arch/x86/mach-rdc321x/ + # lguest paravirtualization support