diff options
-rw-r--r-- | arch/mips/au1000/mtx-1/Makefile | 3 | ||||
-rw-r--r-- | arch/mips/au1000/mtx-1/board_setup.c | 63 | ||||
-rw-r--r-- | arch/mips/au1000/mtx-1/init.c | 11 | ||||
-rw-r--r-- | arch/mips/au1000/mtx-1/irqmap.c | 18 | ||||
-rw-r--r-- | arch/mips/au1000/mtx-1/platform.c | 3 |
5 files changed, 46 insertions, 52 deletions
diff --git a/arch/mips/au1000/mtx-1/Makefile b/arch/mips/au1000/mtx-1/Makefile index 85a90941de4f..7c67b3d33bec 100644 --- a/arch/mips/au1000/mtx-1/Makefile +++ b/arch/mips/au1000/mtx-1/Makefile | |||
@@ -1,7 +1,6 @@ | |||
1 | # | 1 | # |
2 | # Copyright 2003 MontaVista Software Inc. | 2 | # Copyright 2003 MontaVista Software Inc. |
3 | # Author: MontaVista Software, Inc. | 3 | # Author: MontaVista Software, Inc. <source@mvista.com> |
4 | # ppopov@mvista.com or source@mvista.com | ||
5 | # Bruno Randolf <bruno.randolf@4g-systems.biz> | 4 | # Bruno Randolf <bruno.randolf@4g-systems.biz> |
6 | # | 5 | # |
7 | # Makefile for 4G Systems MTX-1 board. | 6 | # Makefile for 4G Systems MTX-1 board. |
diff --git a/arch/mips/au1000/mtx-1/board_setup.c b/arch/mips/au1000/mtx-1/board_setup.c index 5736354829c6..3f8079186cf2 100644 --- a/arch/mips/au1000/mtx-1/board_setup.c +++ b/arch/mips/au1000/mtx-1/board_setup.c | |||
@@ -3,9 +3,8 @@ | |||
3 | * BRIEF MODULE DESCRIPTION | 3 | * BRIEF MODULE DESCRIPTION |
4 | * 4G Systems MTX-1 board setup. | 4 | * 4G Systems MTX-1 board setup. |
5 | * | 5 | * |
6 | * Copyright 2003 MontaVista Software Inc. | 6 | * Copyright 2003, 2008 MontaVista Software Inc. |
7 | * Author: MontaVista Software, Inc. | 7 | * Author: MontaVista Software, Inc. <source@mvista.com> |
8 | * ppopov@mvista.com or source@mvista.com | ||
9 | * Bruno Randolf <bruno.randolf@4g-systems.biz> | 8 | * Bruno Randolf <bruno.randolf@4g-systems.biz> |
10 | * | 9 | * |
11 | * This program is free software; you can redistribute it and/or modify it | 10 | * This program is free software; you can redistribute it and/or modify it |
@@ -34,7 +33,7 @@ | |||
34 | #include <asm/mach-au1x00/au1000.h> | 33 | #include <asm/mach-au1x00/au1000.h> |
35 | 34 | ||
36 | extern int (*board_pci_idsel)(unsigned int devsel, int assert); | 35 | extern int (*board_pci_idsel)(unsigned int devsel, int assert); |
37 | int mtx1_pci_idsel(unsigned int devsel, int assert); | 36 | int mtx1_pci_idsel(unsigned int devsel, int assert); |
38 | 37 | ||
39 | void board_reset(void) | 38 | void board_reset(void) |
40 | { | 39 | { |
@@ -45,36 +44,36 @@ void board_reset(void) | |||
45 | void __init board_setup(void) | 44 | void __init board_setup(void) |
46 | { | 45 | { |
47 | #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) | 46 | #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) |
48 | // enable USB power switch | 47 | /* Enable USB power switch */ |
49 | au_writel( au_readl(GPIO2_DIR) | 0x10, GPIO2_DIR ); | 48 | au_writel(au_readl(GPIO2_DIR) | 0x10, GPIO2_DIR); |
50 | au_writel( 0x100000, GPIO2_OUTPUT ); | 49 | au_writel(0x100000, GPIO2_OUTPUT); |
51 | #endif /* defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) */ | 50 | #endif /* defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) */ |
52 | 51 | ||
53 | #ifdef CONFIG_PCI | 52 | #ifdef CONFIG_PCI |
54 | #if defined(__MIPSEB__) | 53 | #if defined(__MIPSEB__) |
55 | au_writel(0xf | (2<<6) | (1<<4), Au1500_PCI_CFG); | 54 | au_writel(0xf | (2 << 6) | (1 << 4), Au1500_PCI_CFG); |
56 | #else | 55 | #else |
57 | au_writel(0xf, Au1500_PCI_CFG); | 56 | au_writel(0xf, Au1500_PCI_CFG); |
58 | #endif | 57 | #endif |
59 | #endif | 58 | #endif |
60 | 59 | ||
61 | // initialize sys_pinfunc: | 60 | /* Initialize sys_pinfunc */ |
62 | au_writel( SYS_PF_NI2, SYS_PINFUNC ); | 61 | au_writel(SYS_PF_NI2, SYS_PINFUNC); |
63 | 62 | ||
64 | // initialize GPIO | 63 | /* Initialize GPIO */ |
65 | au_writel( 0xFFFFFFFF, SYS_TRIOUTCLR ); | 64 | au_writel(0xFFFFFFFF, SYS_TRIOUTCLR); |
66 | au_writel( 0x00000001, SYS_OUTPUTCLR ); // set M66EN (PCI 66MHz) to OFF | 65 | au_writel(0x00000001, SYS_OUTPUTCLR); /* set M66EN (PCI 66MHz) to OFF */ |
67 | au_writel( 0x00000008, SYS_OUTPUTSET ); // set PCI CLKRUN# to OFF | 66 | au_writel(0x00000008, SYS_OUTPUTSET); /* set PCI CLKRUN# to OFF */ |
68 | au_writel( 0x00000002, SYS_OUTPUTSET ); // set EXT_IO3 ON | 67 | au_writel(0x00000002, SYS_OUTPUTSET); /* set EXT_IO3 ON */ |
69 | au_writel( 0x00000020, SYS_OUTPUTCLR ); // set eth PHY TX_ER to OFF | 68 | au_writel(0x00000020, SYS_OUTPUTCLR); /* set eth PHY TX_ER to OFF */ |
70 | 69 | ||
71 | // enable LED and set it to green | 70 | /* Enable LED and set it to green */ |
72 | au_writel( au_readl(GPIO2_DIR) | 0x1800, GPIO2_DIR ); | 71 | au_writel(au_readl(GPIO2_DIR) | 0x1800, GPIO2_DIR); |
73 | au_writel( 0x18000800, GPIO2_OUTPUT ); | 72 | au_writel(0x18000800, GPIO2_OUTPUT); |
74 | 73 | ||
75 | board_pci_idsel = mtx1_pci_idsel; | 74 | board_pci_idsel = mtx1_pci_idsel; |
76 | 75 | ||
77 | printk("4G Systems MTX-1 Board\n"); | 76 | printk(KERN_INFO "4G Systems MTX-1 Board\n"); |
78 | } | 77 | } |
79 | 78 | ||
80 | int | 79 | int |
@@ -82,20 +81,18 @@ mtx1_pci_idsel(unsigned int devsel, int assert) | |||
82 | { | 81 | { |
83 | #define MTX_IDSEL_ONLY_0_AND_3 0 | 82 | #define MTX_IDSEL_ONLY_0_AND_3 0 |
84 | #if MTX_IDSEL_ONLY_0_AND_3 | 83 | #if MTX_IDSEL_ONLY_0_AND_3 |
85 | if (devsel != 0 && devsel != 3) { | 84 | if (devsel != 0 && devsel != 3) { |
86 | printk("*** not 0 or 3\n"); | 85 | printk(KERN_ERR "*** not 0 or 3\n"); |
87 | return 0; | 86 | return 0; |
88 | } | 87 | } |
89 | #endif | 88 | #endif |
90 | 89 | ||
91 | if (assert && devsel != 0) { | 90 | if (assert && devsel != 0) |
92 | // suppress signal to cardbus | 91 | /* Suppress signal to Cardbus */ |
93 | au_writel( 0x00000002, SYS_OUTPUTCLR ); // set EXT_IO3 OFF | 92 | au_writel(0x00000002, SYS_OUTPUTCLR); /* set EXT_IO3 OFF */ |
94 | } | 93 | else |
95 | else { | 94 | au_writel(0x00000002, SYS_OUTPUTSET); /* set EXT_IO3 ON */ |
96 | au_writel( 0x00000002, SYS_OUTPUTSET ); // set EXT_IO3 ON | 95 | au_sync_udelay(1); |
97 | } | 96 | return 1; |
98 | au_sync_udelay(1); | ||
99 | return 1; | ||
100 | } | 97 | } |
101 | 98 | ||
diff --git a/arch/mips/au1000/mtx-1/init.c b/arch/mips/au1000/mtx-1/init.c index c015cbce1cca..33a4aebe0cba 100644 --- a/arch/mips/au1000/mtx-1/init.c +++ b/arch/mips/au1000/mtx-1/init.c | |||
@@ -3,9 +3,8 @@ | |||
3 | * BRIEF MODULE DESCRIPTION | 3 | * BRIEF MODULE DESCRIPTION |
4 | * 4G Systems MTX-1 board setup | 4 | * 4G Systems MTX-1 board setup |
5 | * | 5 | * |
6 | * Copyright 2003 MontaVista Software Inc. | 6 | * Copyright 2003, 2008 MontaVista Software Inc. |
7 | * Author: MontaVista Software, Inc. | 7 | * Author: MontaVista Software, Inc. <source@mvista.com> |
8 | * ppopov@mvista.com or source@mvista.com | ||
9 | * Bruno Randolf <bruno.randolf@4g-systems.biz> | 8 | * Bruno Randolf <bruno.randolf@4g-systems.biz> |
10 | * | 9 | * |
11 | * This program is free software; you can redistribute it and/or modify it | 10 | * This program is free software; you can redistribute it and/or modify it |
@@ -47,8 +46,8 @@ void __init prom_init(void) | |||
47 | unsigned long memsize; | 46 | unsigned long memsize; |
48 | 47 | ||
49 | prom_argc = fw_arg0; | 48 | prom_argc = fw_arg0; |
50 | prom_argv = (char **) fw_arg1; | 49 | prom_argv = (char **)fw_arg1; |
51 | prom_envp = (char **) fw_arg2; | 50 | prom_envp = (char **)fw_arg2; |
52 | 51 | ||
53 | prom_init_cmdline(); | 52 | prom_init_cmdline(); |
54 | 53 | ||
@@ -56,6 +55,6 @@ void __init prom_init(void) | |||
56 | if (!memsize_str) | 55 | if (!memsize_str) |
57 | memsize = 0x04000000; | 56 | memsize = 0x04000000; |
58 | else | 57 | else |
59 | memsize = simple_strtol(memsize_str, NULL, 0); | 58 | memsize = strict_strtol(memsize_str, 0, NULL); |
60 | add_memory_region(0, memsize, BOOT_MEM_RAM); | 59 | add_memory_region(0, memsize, BOOT_MEM_RAM); |
61 | } | 60 | } |
diff --git a/arch/mips/au1000/mtx-1/irqmap.c b/arch/mips/au1000/mtx-1/irqmap.c index 78d70c42c9db..f2bf02951e9c 100644 --- a/arch/mips/au1000/mtx-1/irqmap.c +++ b/arch/mips/au1000/mtx-1/irqmap.c | |||
@@ -31,18 +31,18 @@ | |||
31 | #include <asm/mach-au1x00/au1000.h> | 31 | #include <asm/mach-au1x00/au1000.h> |
32 | 32 | ||
33 | char irq_tab_alchemy[][5] __initdata = { | 33 | char irq_tab_alchemy[][5] __initdata = { |
34 | [0] = { -1, INTA, INTA, INTX, INTX}, /* IDSEL 00 - AdapterA-Slot0 (top) */ | 34 | [0] = { -1, INTA, INTA, INTX, INTX }, /* IDSEL 00 - AdapterA-Slot0 (top) */ |
35 | [1] = { -1, INTB, INTA, INTX, INTX}, /* IDSEL 01 - AdapterA-Slot1 (bottom) */ | 35 | [1] = { -1, INTB, INTA, INTX, INTX }, /* IDSEL 01 - AdapterA-Slot1 (bottom) */ |
36 | [2] = { -1, INTC, INTD, INTX, INTX}, /* IDSEL 02 - AdapterB-Slot0 (top) */ | 36 | [2] = { -1, INTC, INTD, INTX, INTX }, /* IDSEL 02 - AdapterB-Slot0 (top) */ |
37 | [3] = { -1, INTD, INTC, INTX, INTX}, /* IDSEL 03 - AdapterB-Slot1 (bottom) */ | 37 | [3] = { -1, INTD, INTC, INTX, INTX }, /* IDSEL 03 - AdapterB-Slot1 (bottom) */ |
38 | [4] = { -1, INTA, INTB, INTX, INTX}, /* IDSEL 04 - AdapterC-Slot0 (top) */ | 38 | [4] = { -1, INTA, INTB, INTX, INTX }, /* IDSEL 04 - AdapterC-Slot0 (top) */ |
39 | [5] = { -1, INTB, INTA, INTX, INTX}, /* IDSEL 05 - AdapterC-Slot1 (bottom) */ | 39 | [5] = { -1, INTB, INTA, INTX, INTX }, /* IDSEL 05 - AdapterC-Slot1 (bottom) */ |
40 | [6] = { -1, INTC, INTD, INTX, INTX}, /* IDSEL 06 - AdapterD-Slot0 (top) */ | 40 | [6] = { -1, INTC, INTD, INTX, INTX }, /* IDSEL 06 - AdapterD-Slot0 (top) */ |
41 | [7] = { -1, INTD, INTC, INTX, INTX}, /* IDSEL 07 - AdapterD-Slot1 (bottom) */ | 41 | [7] = { -1, INTD, INTC, INTX, INTX }, /* IDSEL 07 - AdapterD-Slot1 (bottom) */ |
42 | }; | 42 | }; |
43 | 43 | ||
44 | struct au1xxx_irqmap __initdata au1xxx_irq_map[] = { | 44 | struct au1xxx_irqmap __initdata au1xxx_irq_map[] = { |
45 | { AU1500_GPIO_204, INTC_INT_HIGH_LEVEL, 0}, | 45 | { AU1500_GPIO_204, INTC_INT_HIGH_LEVEL, 0 }, |
46 | { AU1500_GPIO_201, INTC_INT_LOW_LEVEL, 0 }, | 46 | { AU1500_GPIO_201, INTC_INT_LOW_LEVEL, 0 }, |
47 | { AU1500_GPIO_202, INTC_INT_LOW_LEVEL, 0 }, | 47 | { AU1500_GPIO_202, INTC_INT_LOW_LEVEL, 0 }, |
48 | { AU1500_GPIO_203, INTC_INT_LOW_LEVEL, 0 }, | 48 | { AU1500_GPIO_203, INTC_INT_LOW_LEVEL, 0 }, |
diff --git a/arch/mips/au1000/mtx-1/platform.c b/arch/mips/au1000/mtx-1/platform.c index a7edbf0829ac..9807be37c32f 100644 --- a/arch/mips/au1000/mtx-1/platform.c +++ b/arch/mips/au1000/mtx-1/platform.c | |||
@@ -21,11 +21,10 @@ | |||
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/leds.h> | 23 | #include <linux/leds.h> |
24 | #include <linux/gpio.h> | ||
24 | #include <linux/gpio_keys.h> | 25 | #include <linux/gpio_keys.h> |
25 | #include <linux/input.h> | 26 | #include <linux/input.h> |
26 | 27 | ||
27 | #include <asm/gpio.h> | ||
28 | |||
29 | static struct gpio_keys_button mtx1_gpio_button[] = { | 28 | static struct gpio_keys_button mtx1_gpio_button[] = { |
30 | { | 29 | { |
31 | .gpio = 207, | 30 | .gpio = 207, |