aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/au1000
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-01-29 06:48:03 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-01-29 06:48:03 -0500
commit21af0297c7e56024a5ccc4d8ad2a590f9ec371ba (patch)
tree5d288c1877b1ae9fbe24aa7fabd79565e73d3d2f /arch/mips/au1000
parent5ea293a9048d3a58cb0c840fa719d85ad14cba47 (diff)
parenta9d2517c7a5c8028fbc5296d3af3c75597d3d180 (diff)
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (68 commits) [MIPS] remove Documentation/mips/GT64120.README [MIPS] Malta: remaining bits of the board support code cleanup [MIPS] Malta: make the helper function static [MIPS] Malta: fix braces at single statement blocks [MIPS] Malta, Atlas: move an extern function declaration to the header file [MIPS] Malta: Use C89 style for comments [MIPS] Malta: else should follow close brace in malta_int.c [MIPS] Malta: remove a superfluous comment [MIPS] Malta: include <linux/cpu.h> instead of <asm/cpu.h> [MIPS] Malta, Atlas, Sead: remove an extern from .c files [MIPS] Malta: fix oversized lines in malta_int.c [MIPS] Malta: remove a dead function declaration [MIPS] Malta: use tabs not spaces [MIPS] Malta: set up the screen info in a separate function [MIPS] Malta: check the PCI clock frequency in a separate function [MIPS] Malta: use the KERN_ facility level in printk() [MIPS] Malta: use Linux kernel style for structure initialization [MIPS]: constify function pointer tables [MIPS] compat: handle argument endianess of sys32_(f)truncate64 with merge_64 [MIPS] Cobalt 64-bits kernels can be safely unmarked experimental ...
Diffstat (limited to 'arch/mips/au1000')
-rw-r--r--arch/mips/au1000/common/au1xxx_irqmap.c21
-rw-r--r--arch/mips/au1000/common/dbdma.c2
-rw-r--r--arch/mips/au1000/db1x00/init.c11
-rw-r--r--arch/mips/au1000/mtx-1/init.c2
-rw-r--r--arch/mips/au1000/mtx-1/platform.c27
-rw-r--r--arch/mips/au1000/pb1000/init.c2
-rw-r--r--arch/mips/au1000/pb1100/init.c2
-rw-r--r--arch/mips/au1000/pb1200/init.c2
-rw-r--r--arch/mips/au1000/pb1500/init.c2
-rw-r--r--arch/mips/au1000/pb1550/init.c2
-rw-r--r--arch/mips/au1000/xxs1500/init.c2
11 files changed, 29 insertions, 46 deletions
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 @@
25 * with this program; if not, write to the Free Software Foundation, Inc., 25 * with this program; if not, write to the Free Software Foundation, Inc.,
26 * 675 Mass Ave, Cambridge, MA 02139, USA. 26 * 675 Mass Ave, Cambridge, MA 02139, USA.
27 */ 27 */
28#include <linux/errno.h>
29#include <linux/init.h> 28#include <linux/init.h>
30#include <linux/irq.h> 29#include <linux/kernel.h>
31#include <linux/kernel_stat.h>
32#include <linux/module.h>
33#include <linux/signal.h>
34#include <linux/sched.h>
35#include <linux/types.h>
36#include <linux/interrupt.h>
37#include <linux/ioport.h>
38#include <linux/timex.h>
39#include <linux/slab.h>
40#include <linux/random.h>
41#include <linux/delay.h>
42#include <linux/bitops.h>
43 30
44#include <asm/bootinfo.h> 31#include <au1000.h>
45#include <asm/io.h>
46#include <asm/mipsregs.h>
47#include <asm/system.h>
48#include <asm/mach-au1x00/au1000.h>
49 32
50/* The IC0 interrupt table. This is processor, rather than 33/* The IC0 interrupt table. This is processor, rather than
51 * board dependent, so no reason to keep this info in the board 34 * board dependent, so no reason to keep this info in the board
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[] = {
179 { 0, 0, 0, 0, 0, 0, 0 }, 179 { 0, 0, 0, 0, 0, 0, 0 },
180}; 180};
181 181
182#define DBDEV_TAB_SIZE (sizeof(dbdev_tab) / sizeof(dbdev_tab_t)) 182#define DBDEV_TAB_SIZE ARRAY_SIZE(dbdev_tab)
183 183
184static chan_tab_t *chan_tab_ptr[NUM_DBDMA_CHANS]; 184static chan_tab_t *chan_tab_ptr[NUM_DBDMA_CHANS];
185 185
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)
57 prom_argv = (char **) fw_arg1; 57 prom_argv = (char **) fw_arg1;
58 prom_envp = (char **) fw_arg2; 58 prom_envp = (char **) fw_arg2;
59 59
60 /* Set the platform # */
61#if defined(CONFIG_MIPS_DB1550)
62 mips_machtype = MACH_DB1550;
63#elif defined(CONFIG_MIPS_DB1500)
64 mips_machtype = MACH_DB1500;
65#elif defined(CONFIG_MIPS_DB1100)
66 mips_machtype = MACH_DB1100;
67#else
68 mips_machtype = MACH_DB1000;
69#endif
70
71 prom_init_cmdline(); 60 prom_init_cmdline();
72 61
73 memsize_str = prom_getenv("memsize"); 62 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)
54 prom_argv = (char **) fw_arg1; 54 prom_argv = (char **) fw_arg1;
55 prom_envp = (char **) fw_arg2; 55 prom_envp = (char **) fw_arg2;
56 56
57 mips_machtype = MACH_MTX1; /* set the platform # */
58
59 prom_init_cmdline(); 57 prom_init_cmdline();
60 58
61 memsize_str = prom_getenv("memsize"); 59 memsize_str = prom_getenv("memsize");
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 @@
22#include <linux/types.h> 22#include <linux/types.h>
23#include <linux/platform_device.h> 23#include <linux/platform_device.h>
24#include <linux/leds.h> 24#include <linux/leds.h>
25#include <linux/gpio_keys.h>
26#include <linux/input.h>
25 27
26#include <asm/gpio.h> 28#include <asm/gpio.h>
27 29
30static struct gpio_keys_button mtx1_gpio_button[] = {
31 {
32 .gpio = 207,
33 .code = BTN_0,
34 .desc = "System button",
35 }
36};
37
38static struct gpio_keys_platform_data mtx1_buttons_data = {
39 .buttons = mtx1_gpio_button,
40 .nbuttons = ARRAY_SIZE(mtx1_gpio_button),
41};
42
43static struct platform_device mtx1_button = {
44 .name = "gpio-keys",
45 .id = -1,
46 .dev = {
47 .platform_data = &mtx1_buttons_data,
48 }
49};
50
28static struct resource mtx1_wdt_res[] = { 51static struct resource mtx1_wdt_res[] = {
29 [0] = { 52 [0] = {
30 .start = 15, 53 .start = 15,
@@ -66,11 +89,13 @@ static struct platform_device mtx1_gpio_leds = {
66 89
67static struct __initdata platform_device * mtx1_devs[] = { 90static struct __initdata platform_device * mtx1_devs[] = {
68 &mtx1_gpio_leds, 91 &mtx1_gpio_leds,
69 &mtx1_wdt 92 &mtx1_wdt,
93 &mtx1_button
70}; 94};
71 95
72static int __init mtx1_register_devices(void) 96static int __init mtx1_register_devices(void)
73{ 97{
98 gpio_direction_input(207);
74 return platform_add_devices(mtx1_devs, ARRAY_SIZE(mtx1_devs)); 99 return platform_add_devices(mtx1_devs, ARRAY_SIZE(mtx1_devs));
75} 100}
76 101
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)
52 prom_argv = (char **) fw_arg1; 52 prom_argv = (char **) fw_arg1;
53 prom_envp = (char **) fw_arg2; 53 prom_envp = (char **) fw_arg2;
54 54
55 mips_machtype = MACH_PB1000;
56
57 prom_init_cmdline(); 55 prom_init_cmdline();
58 memsize_str = prom_getenv("memsize"); 56 memsize_str = prom_getenv("memsize");
59 if (!memsize_str) { 57 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)
53 prom_argv = (char **) fw_arg1; 53 prom_argv = (char **) fw_arg1;
54 prom_envp = (char **) fw_arg3; 54 prom_envp = (char **) fw_arg3;
55 55
56 mips_machtype = MACH_PB1100;
57
58 prom_init_cmdline(); 56 prom_init_cmdline();
59 57
60 memsize_str = prom_getenv("memsize"); 58 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)
53 prom_argv = (char **) fw_arg1; 53 prom_argv = (char **) fw_arg1;
54 prom_envp = (char **) fw_arg2; 54 prom_envp = (char **) fw_arg2;
55 55
56 mips_machtype = MACH_PB1200;
57
58 prom_init_cmdline(); 56 prom_init_cmdline();
59 memsize_str = prom_getenv("memsize"); 57 memsize_str = prom_getenv("memsize");
60 if (!memsize_str) { 58 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)
53 prom_argv = (char **) fw_arg1; 53 prom_argv = (char **) fw_arg1;
54 prom_envp = (char **) fw_arg2; 54 prom_envp = (char **) fw_arg2;
55 55
56 mips_machtype = MACH_PB1500;
57
58 prom_init_cmdline(); 56 prom_init_cmdline();
59 memsize_str = prom_getenv("memsize"); 57 memsize_str = prom_getenv("memsize");
60 if (!memsize_str) { 58 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)
53 prom_argv = (char **) fw_arg1; 53 prom_argv = (char **) fw_arg1;
54 prom_envp = (char **) fw_arg2; 54 prom_envp = (char **) fw_arg2;
55 55
56 mips_machtype = MACH_PB1550;
57
58 prom_init_cmdline(); 56 prom_init_cmdline();
59 memsize_str = prom_getenv("memsize"); 57 memsize_str = prom_getenv("memsize");
60 if (!memsize_str) { 58 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)
52 prom_argv = (char **) fw_arg1; 52 prom_argv = (char **) fw_arg1;
53 prom_envp = (char **) fw_arg2; 53 prom_envp = (char **) fw_arg2;
54 54
55 mips_machtype = MACH_XXS1500; /* set the platform # */
56
57 prom_init_cmdline(); 55 prom_init_cmdline();
58 56
59 memsize_str = prom_getenv("memsize"); 57 memsize_str = prom_getenv("memsize");