From 2b22c034d04d3632a339d14d5803c8f94e412608 Mon Sep 17 00:00:00 2001 From: Alejandro Martinez Ruiz Date: Mon, 22 Oct 2007 21:36:44 +0200 Subject: [MIPS] Converting most array size calculations to use ARRAY_SIZE(). Signed-off-by: Alejandro Martinez Ruiz Signed-off-by: Ralf Baechle --- arch/mips/au1000/common/dbdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/mips/au1000') diff --git a/arch/mips/au1000/common/dbdma.c b/arch/mips/au1000/common/dbdma.c index edf91f41a78..428ed275a0f 100644 --- a/arch/mips/au1000/common/dbdma.c +++ b/arch/mips/au1000/common/dbdma.c @@ -179,7 +179,7 @@ static dbdev_tab_t dbdev_tab[] = { { 0, 0, 0, 0, 0, 0, 0 }, }; -#define DBDEV_TAB_SIZE (sizeof(dbdev_tab) / sizeof(dbdev_tab_t)) +#define DBDEV_TAB_SIZE ARRAY_SIZE(dbdev_tab) static chan_tab_t *chan_tab_ptr[NUM_DBDMA_CHANS]; -- cgit v1.2.3 From 7f3f4900619743f4e3af21e9228748c3d692a2c2 Mon Sep 17 00:00:00 2001 From: Yoichi Yuasa Date: Fri, 26 Oct 2007 22:42:31 +0900 Subject: [MIPS] remove unused mips_machtype Removed unused mips_machtype. These are only set but not used. Signed-off-by: Yoichi Yuasa Signed-off-by: Ralf Baechle --- arch/mips/au1000/db1x00/init.c | 11 ----------- arch/mips/au1000/mtx-1/init.c | 2 -- arch/mips/au1000/pb1000/init.c | 2 -- arch/mips/au1000/pb1100/init.c | 2 -- arch/mips/au1000/pb1200/init.c | 2 -- arch/mips/au1000/pb1500/init.c | 2 -- arch/mips/au1000/pb1550/init.c | 2 -- arch/mips/au1000/xxs1500/init.c | 2 -- 8 files changed, 25 deletions(-) (limited to 'arch/mips/au1000') diff --git a/arch/mips/au1000/db1x00/init.c b/arch/mips/au1000/db1x00/init.c index 43298fd9459..e822c123eab 100644 --- a/arch/mips/au1000/db1x00/init.c +++ b/arch/mips/au1000/db1x00/init.c @@ -57,17 +57,6 @@ void __init prom_init(void) prom_argv = (char **) fw_arg1; prom_envp = (char **) fw_arg2; - /* Set the platform # */ -#if defined(CONFIG_MIPS_DB1550) - mips_machtype = MACH_DB1550; -#elif defined(CONFIG_MIPS_DB1500) - mips_machtype = MACH_DB1500; -#elif defined(CONFIG_MIPS_DB1100) - mips_machtype = MACH_DB1100; -#else - mips_machtype = MACH_DB1000; -#endif - prom_init_cmdline(); memsize_str = prom_getenv("memsize"); diff --git a/arch/mips/au1000/mtx-1/init.c b/arch/mips/au1000/mtx-1/init.c index cdeae3212a2..e700fd312a2 100644 --- a/arch/mips/au1000/mtx-1/init.c +++ b/arch/mips/au1000/mtx-1/init.c @@ -54,8 +54,6 @@ void __init prom_init(void) prom_argv = (char **) fw_arg1; prom_envp = (char **) fw_arg2; - mips_machtype = MACH_MTX1; /* set the platform # */ - prom_init_cmdline(); memsize_str = prom_getenv("memsize"); diff --git a/arch/mips/au1000/pb1000/init.c b/arch/mips/au1000/pb1000/init.c index ddccaf6997d..2515b9fb24a 100644 --- a/arch/mips/au1000/pb1000/init.c +++ b/arch/mips/au1000/pb1000/init.c @@ -52,8 +52,6 @@ void __init prom_init(void) prom_argv = (char **) fw_arg1; prom_envp = (char **) fw_arg2; - mips_machtype = MACH_PB1000; - prom_init_cmdline(); memsize_str = prom_getenv("memsize"); if (!memsize_str) { diff --git a/arch/mips/au1000/pb1100/init.c b/arch/mips/au1000/pb1100/init.c index c93fd39b4ab..490c3801c27 100644 --- a/arch/mips/au1000/pb1100/init.c +++ b/arch/mips/au1000/pb1100/init.c @@ -53,8 +53,6 @@ void __init prom_init(void) prom_argv = (char **) fw_arg1; prom_envp = (char **) fw_arg3; - mips_machtype = MACH_PB1100; - prom_init_cmdline(); memsize_str = prom_getenv("memsize"); diff --git a/arch/mips/au1000/pb1200/init.c b/arch/mips/au1000/pb1200/init.c index c251570749e..069ed45f04f 100644 --- a/arch/mips/au1000/pb1200/init.c +++ b/arch/mips/au1000/pb1200/init.c @@ -53,8 +53,6 @@ void __init prom_init(void) prom_argv = (char **) fw_arg1; prom_envp = (char **) fw_arg2; - mips_machtype = MACH_PB1200; - prom_init_cmdline(); memsize_str = prom_getenv("memsize"); if (!memsize_str) { diff --git a/arch/mips/au1000/pb1500/init.c b/arch/mips/au1000/pb1500/init.c index 507d4b20416..db558c96704 100644 --- a/arch/mips/au1000/pb1500/init.c +++ b/arch/mips/au1000/pb1500/init.c @@ -53,8 +53,6 @@ void __init prom_init(void) prom_argv = (char **) fw_arg1; prom_envp = (char **) fw_arg2; - mips_machtype = MACH_PB1500; - prom_init_cmdline(); memsize_str = prom_getenv("memsize"); if (!memsize_str) { diff --git a/arch/mips/au1000/pb1550/init.c b/arch/mips/au1000/pb1550/init.c index b03eee601e3..b716363ea56 100644 --- a/arch/mips/au1000/pb1550/init.c +++ b/arch/mips/au1000/pb1550/init.c @@ -53,8 +53,6 @@ void __init prom_init(void) prom_argv = (char **) fw_arg1; prom_envp = (char **) fw_arg2; - mips_machtype = MACH_PB1550; - prom_init_cmdline(); memsize_str = prom_getenv("memsize"); if (!memsize_str) { diff --git a/arch/mips/au1000/xxs1500/init.c b/arch/mips/au1000/xxs1500/init.c index 6532939f377..7e6878c1b0a 100644 --- a/arch/mips/au1000/xxs1500/init.c +++ b/arch/mips/au1000/xxs1500/init.c @@ -52,8 +52,6 @@ void __init prom_init(void) prom_argv = (char **) fw_arg1; prom_envp = (char **) fw_arg2; - mips_machtype = MACH_XXS1500; /* set the platform # */ - prom_init_cmdline(); memsize_str = prom_getenv("memsize"); -- cgit v1.2.3 From 2206583dd5e370c3c3a30f7e67272e44abab9093 Mon Sep 17 00:00:00 2001 From: Yoichi Yuasa Date: Thu, 1 Nov 2007 21:35:39 +0900 Subject: [MIPS] clean up au1xxx_irqmap.c include files Clean up au1xxx_irqmap.c include files. Signed-off-by: Yoichi Yuasa Signed-off-by: Ralf Baechle --- arch/mips/au1000/common/au1xxx_irqmap.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) (limited to 'arch/mips/au1000') diff --git a/arch/mips/au1000/common/au1xxx_irqmap.c b/arch/mips/au1000/common/au1xxx_irqmap.c index 98a4e34b024..37a10a01de9 100644 --- a/arch/mips/au1000/common/au1xxx_irqmap.c +++ b/arch/mips/au1000/common/au1xxx_irqmap.c @@ -25,27 +25,10 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include -#include -#include -#include -#include -#include +#include /* The IC0 interrupt table. This is processor, rather than * board dependent, so no reason to keep this info in the board -- cgit v1.2.3 From f6ed10ab972b00cd57567a2ac9e393226840e458 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Mon, 7 Jan 2008 19:00:46 +0100 Subject: [MIPS] MTX-1: Add GPIO system button This patch adds support for the GPIO connected system button on the MTX-1 boards. Default configuration is updated accordingly. Signed-off-by: Florian Fainelli Signed-off-by: Ralf Baechle --- arch/mips/au1000/mtx-1/platform.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'arch/mips/au1000') diff --git a/arch/mips/au1000/mtx-1/platform.c b/arch/mips/au1000/mtx-1/platform.c index 49c0fb409fe..ce8637b3afa 100644 --- a/arch/mips/au1000/mtx-1/platform.c +++ b/arch/mips/au1000/mtx-1/platform.c @@ -22,9 +22,32 @@ #include #include #include +#include +#include #include +static struct gpio_keys_button mtx1_gpio_button[] = { + { + .gpio = 207, + .code = BTN_0, + .desc = "System button", + } +}; + +static struct gpio_keys_platform_data mtx1_buttons_data = { + .buttons = mtx1_gpio_button, + .nbuttons = ARRAY_SIZE(mtx1_gpio_button), +}; + +static struct platform_device mtx1_button = { + .name = "gpio-keys", + .id = -1, + .dev = { + .platform_data = &mtx1_buttons_data, + } +}; + static struct resource mtx1_wdt_res[] = { [0] = { .start = 15, @@ -66,11 +89,13 @@ static struct platform_device mtx1_gpio_leds = { static struct __initdata platform_device * mtx1_devs[] = { &mtx1_gpio_leds, - &mtx1_wdt + &mtx1_wdt, + &mtx1_button }; static int __init mtx1_register_devices(void) { + gpio_direction_input(207); return platform_add_devices(mtx1_devs, ARRAY_SIZE(mtx1_devs)); } -- cgit v1.2.3