diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-02-25 15:41:34 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-02-25 15:41:34 -0500 |
commit | 2a2d10f386c1bacabe1a530c06dc8488eac419e5 (patch) | |
tree | 4606a4a3bafa42a8aa70e001d35883956a0f0589 /arch/arm | |
parent | 2f68ffd11aa76b251921976c982b814df9ebe890 (diff) | |
parent | c499546f43f2c31b681271ef7db922839fcde5fe (diff) |
Merge branch 'for-rmk' of git://git.marvell.com/orion into devel-stable
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/configs/mv78xx0_defconfig | 1 | ||||
-rw-r--r-- | arch/arm/include/asm/cacheflush.h | 3 | ||||
-rw-r--r-- | arch/arm/kernel/setup.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-gemini/gpio.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/Kconfig | 6 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/sheevaplug-setup.c | 50 | ||||
-rw-r--r-- | arch/arm/mach-mv78xx0/Kconfig | 6 | ||||
-rw-r--r-- | arch/arm/mach-mv78xx0/Makefile | 3 | ||||
-rw-r--r-- | arch/arm/mach-mv78xx0/buffalo-wxl-setup.c | 155 | ||||
-rw-r--r-- | arch/arm/mach-mv78xx0/mpp.c | 96 | ||||
-rw-r--r-- | arch/arm/mach-mv78xx0/mpp.h | 347 | ||||
-rw-r--r-- | arch/arm/mach-omap2/mmc-twl4030.c | 7 | ||||
-rw-r--r-- | arch/arm/tools/mach-types | 46 |
14 files changed, 717 insertions, 9 deletions
diff --git a/arch/arm/configs/mv78xx0_defconfig b/arch/arm/configs/mv78xx0_defconfig index 6afa2c108eaa..da4710dd1da1 100644 --- a/arch/arm/configs/mv78xx0_defconfig +++ b/arch/arm/configs/mv78xx0_defconfig | |||
@@ -176,6 +176,7 @@ CONFIG_ARCH_MV78XX0=y | |||
176 | # | 176 | # |
177 | CONFIG_MACH_DB78X00_BP=y | 177 | CONFIG_MACH_DB78X00_BP=y |
178 | CONFIG_MACH_RD78X00_MASA=y | 178 | CONFIG_MACH_RD78X00_MASA=y |
179 | CONFIG_MACH_TERASTATION_WXL=y | ||
179 | CONFIG_PLAT_ORION=y | 180 | CONFIG_PLAT_ORION=y |
180 | 181 | ||
181 | # | 182 | # |
diff --git a/arch/arm/include/asm/cacheflush.h b/arch/arm/include/asm/cacheflush.h index c77d2fa1f6e5..8113bb5fb66e 100644 --- a/arch/arm/include/asm/cacheflush.h +++ b/arch/arm/include/asm/cacheflush.h | |||
@@ -42,7 +42,8 @@ | |||
42 | #endif | 42 | #endif |
43 | 43 | ||
44 | #if defined(CONFIG_CPU_ARM920T) || defined(CONFIG_CPU_ARM922T) || \ | 44 | #if defined(CONFIG_CPU_ARM920T) || defined(CONFIG_CPU_ARM922T) || \ |
45 | defined(CONFIG_CPU_ARM925T) || defined(CONFIG_CPU_ARM1020) | 45 | defined(CONFIG_CPU_ARM925T) || defined(CONFIG_CPU_ARM1020) || \ |
46 | defined(CONFIG_CPU_ARM1026) | ||
46 | # define MULTI_CACHE 1 | 47 | # define MULTI_CACHE 1 |
47 | #endif | 48 | #endif |
48 | 49 | ||
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index c6c57b640b6b..621acad8ea43 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -102,6 +102,7 @@ struct cpu_cache_fns cpu_cache; | |||
102 | #endif | 102 | #endif |
103 | #ifdef CONFIG_OUTER_CACHE | 103 | #ifdef CONFIG_OUTER_CACHE |
104 | struct outer_cache_fns outer_cache; | 104 | struct outer_cache_fns outer_cache; |
105 | EXPORT_SYMBOL(outer_cache); | ||
105 | #endif | 106 | #endif |
106 | 107 | ||
107 | struct stack { | 108 | struct stack { |
diff --git a/arch/arm/mach-gemini/gpio.c b/arch/arm/mach-gemini/gpio.c index e7263854bc7b..fe3bd5ac8b10 100644 --- a/arch/arm/mach-gemini/gpio.c +++ b/arch/arm/mach-gemini/gpio.c | |||
@@ -86,7 +86,7 @@ static int gpio_set_irq_type(unsigned int irq, unsigned int type) | |||
86 | unsigned int reg_both, reg_level, reg_type; | 86 | unsigned int reg_both, reg_level, reg_type; |
87 | 87 | ||
88 | reg_type = __raw_readl(base + GPIO_INT_TYPE); | 88 | reg_type = __raw_readl(base + GPIO_INT_TYPE); |
89 | reg_level = __raw_readl(base + GPIO_INT_BOTH_EDGE); | 89 | reg_level = __raw_readl(base + GPIO_INT_LEVEL); |
90 | reg_both = __raw_readl(base + GPIO_INT_BOTH_EDGE); | 90 | reg_both = __raw_readl(base + GPIO_INT_BOTH_EDGE); |
91 | 91 | ||
92 | switch (type) { | 92 | switch (type) { |
@@ -117,7 +117,7 @@ static int gpio_set_irq_type(unsigned int irq, unsigned int type) | |||
117 | } | 117 | } |
118 | 118 | ||
119 | __raw_writel(reg_type, base + GPIO_INT_TYPE); | 119 | __raw_writel(reg_type, base + GPIO_INT_TYPE); |
120 | __raw_writel(reg_level, base + GPIO_INT_BOTH_EDGE); | 120 | __raw_writel(reg_level, base + GPIO_INT_LEVEL); |
121 | __raw_writel(reg_both, base + GPIO_INT_BOTH_EDGE); | 121 | __raw_writel(reg_both, base + GPIO_INT_BOTH_EDGE); |
122 | 122 | ||
123 | gpio_ack_irq(irq); | 123 | gpio_ack_irq(irq); |
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig index edc9aeb6e6b2..17879a876be6 100644 --- a/arch/arm/mach-kirkwood/Kconfig +++ b/arch/arm/mach-kirkwood/Kconfig | |||
@@ -32,6 +32,12 @@ config MACH_SHEEVAPLUG | |||
32 | Say 'Y' here if you want your kernel to support the | 32 | Say 'Y' here if you want your kernel to support the |
33 | Marvell SheevaPlug Reference Board. | 33 | Marvell SheevaPlug Reference Board. |
34 | 34 | ||
35 | config MACH_ESATA_SHEEVAPLUG | ||
36 | bool "Marvell eSATA SheevaPlug Reference Board" | ||
37 | help | ||
38 | Say 'Y' here if you want your kernel to support the | ||
39 | Marvell eSATA SheevaPlug Reference Board. | ||
40 | |||
35 | config MACH_TS219 | 41 | config MACH_TS219 |
36 | bool "QNAP TS-110, TS-119, TS-210, TS-219 and TS-219P Turbo NAS" | 42 | bool "QNAP TS-110, TS-119, TS-210, TS-219 and TS-219P Turbo NAS" |
37 | help | 43 | help |
diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile index 55b4ccf3729b..a5530e36ba3e 100644 --- a/arch/arm/mach-kirkwood/Makefile +++ b/arch/arm/mach-kirkwood/Makefile | |||
@@ -5,6 +5,7 @@ obj-$(CONFIG_MACH_RD88F6192_NAS) += rd88f6192-nas-setup.o | |||
5 | obj-$(CONFIG_MACH_RD88F6281) += rd88f6281-setup.o | 5 | obj-$(CONFIG_MACH_RD88F6281) += rd88f6281-setup.o |
6 | obj-$(CONFIG_MACH_MV88F6281GTW_GE) += mv88f6281gtw_ge-setup.o | 6 | obj-$(CONFIG_MACH_MV88F6281GTW_GE) += mv88f6281gtw_ge-setup.o |
7 | obj-$(CONFIG_MACH_SHEEVAPLUG) += sheevaplug-setup.o | 7 | obj-$(CONFIG_MACH_SHEEVAPLUG) += sheevaplug-setup.o |
8 | obj-$(CONFIG_MACH_ESATA_SHEEVAPLUG) += sheevaplug-setup.o | ||
8 | obj-$(CONFIG_MACH_TS219) += ts219-setup.o tsx1x-common.o | 9 | obj-$(CONFIG_MACH_TS219) += ts219-setup.o tsx1x-common.o |
9 | obj-$(CONFIG_MACH_TS41X) += ts41x-setup.o tsx1x-common.o | 10 | obj-$(CONFIG_MACH_TS41X) += ts41x-setup.o tsx1x-common.o |
10 | obj-$(CONFIG_MACH_OPENRD) += openrd-setup.o | 11 | obj-$(CONFIG_MACH_OPENRD) += openrd-setup.o |
diff --git a/arch/arm/mach-kirkwood/sheevaplug-setup.c b/arch/arm/mach-kirkwood/sheevaplug-setup.c index c7319eeac8bb..a00879d34d54 100644 --- a/arch/arm/mach-kirkwood/sheevaplug-setup.c +++ b/arch/arm/mach-kirkwood/sheevaplug-setup.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/ata_platform.h> | ||
14 | #include <linux/mtd/partitions.h> | 15 | #include <linux/mtd/partitions.h> |
15 | #include <linux/mv643xx_eth.h> | 16 | #include <linux/mv643xx_eth.h> |
16 | #include <linux/gpio.h> | 17 | #include <linux/gpio.h> |
@@ -42,10 +43,19 @@ static struct mv643xx_eth_platform_data sheevaplug_ge00_data = { | |||
42 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), | 43 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), |
43 | }; | 44 | }; |
44 | 45 | ||
46 | static struct mv_sata_platform_data sheeva_esata_sata_data = { | ||
47 | .n_ports = 2, | ||
48 | }; | ||
49 | |||
45 | static struct mvsdio_platform_data sheevaplug_mvsdio_data = { | 50 | static struct mvsdio_platform_data sheevaplug_mvsdio_data = { |
46 | /* unfortunately the CD signal has not been connected */ | 51 | /* unfortunately the CD signal has not been connected */ |
47 | }; | 52 | }; |
48 | 53 | ||
54 | static struct mvsdio_platform_data sheeva_esata_mvsdio_data = { | ||
55 | .gpio_write_protect = 44, /* MPP44 used as SD write protect */ | ||
56 | .gpio_card_detect = 47, /* MPP47 used as SD card detect */ | ||
57 | }; | ||
58 | |||
49 | static struct gpio_led sheevaplug_led_pins[] = { | 59 | static struct gpio_led sheevaplug_led_pins[] = { |
50 | { | 60 | { |
51 | .name = "plug:green:health", | 61 | .name = "plug:green:health", |
@@ -74,13 +84,26 @@ static unsigned int sheevaplug_mpp_config[] __initdata = { | |||
74 | 0 | 84 | 0 |
75 | }; | 85 | }; |
76 | 86 | ||
87 | static unsigned int sheeva_esata_mpp_config[] __initdata = { | ||
88 | MPP29_GPIO, /* USB Power Enable */ | ||
89 | MPP44_GPIO, /* SD Write Protect */ | ||
90 | MPP47_GPIO, /* SD Card Detect */ | ||
91 | MPP49_GPIO, /* LED Green */ | ||
92 | 0 | ||
93 | }; | ||
94 | |||
77 | static void __init sheevaplug_init(void) | 95 | static void __init sheevaplug_init(void) |
78 | { | 96 | { |
79 | /* | 97 | /* |
80 | * Basic setup. Needs to be called early. | 98 | * Basic setup. Needs to be called early. |
81 | */ | 99 | */ |
82 | kirkwood_init(); | 100 | kirkwood_init(); |
83 | kirkwood_mpp_conf(sheevaplug_mpp_config); | 101 | |
102 | /* setup gpio pin select */ | ||
103 | if (machine_is_sheeva_esata()) | ||
104 | kirkwood_mpp_conf(sheeva_esata_mpp_config); | ||
105 | else | ||
106 | kirkwood_mpp_conf(sheevaplug_mpp_config); | ||
84 | 107 | ||
85 | kirkwood_uart0_init(); | 108 | kirkwood_uart0_init(); |
86 | kirkwood_nand_init(ARRAY_AND_SIZE(sheevaplug_nand_parts), 25); | 109 | kirkwood_nand_init(ARRAY_AND_SIZE(sheevaplug_nand_parts), 25); |
@@ -91,11 +114,21 @@ static void __init sheevaplug_init(void) | |||
91 | kirkwood_ehci_init(); | 114 | kirkwood_ehci_init(); |
92 | 115 | ||
93 | kirkwood_ge00_init(&sheevaplug_ge00_data); | 116 | kirkwood_ge00_init(&sheevaplug_ge00_data); |
94 | kirkwood_sdio_init(&sheevaplug_mvsdio_data); | 117 | |
118 | /* honor lower power consumption for plugs with out eSATA */ | ||
119 | if (machine_is_sheeva_esata()) | ||
120 | kirkwood_sata_init(&sheeva_esata_sata_data); | ||
121 | |||
122 | /* enable sd wp and sd cd on plugs with esata */ | ||
123 | if (machine_is_sheeva_esata()) | ||
124 | kirkwood_sdio_init(&sheeva_esata_mvsdio_data); | ||
125 | else | ||
126 | kirkwood_sdio_init(&sheevaplug_mvsdio_data); | ||
95 | 127 | ||
96 | platform_device_register(&sheevaplug_leds); | 128 | platform_device_register(&sheevaplug_leds); |
97 | } | 129 | } |
98 | 130 | ||
131 | #ifdef CONFIG_MACH_SHEEVAPLUG | ||
99 | MACHINE_START(SHEEVAPLUG, "Marvell SheevaPlug Reference Board") | 132 | MACHINE_START(SHEEVAPLUG, "Marvell SheevaPlug Reference Board") |
100 | /* Maintainer: shadi Ammouri <shadi@marvell.com> */ | 133 | /* Maintainer: shadi Ammouri <shadi@marvell.com> */ |
101 | .phys_io = KIRKWOOD_REGS_PHYS_BASE, | 134 | .phys_io = KIRKWOOD_REGS_PHYS_BASE, |
@@ -106,3 +139,16 @@ MACHINE_START(SHEEVAPLUG, "Marvell SheevaPlug Reference Board") | |||
106 | .init_irq = kirkwood_init_irq, | 139 | .init_irq = kirkwood_init_irq, |
107 | .timer = &kirkwood_timer, | 140 | .timer = &kirkwood_timer, |
108 | MACHINE_END | 141 | MACHINE_END |
142 | #endif | ||
143 | |||
144 | #ifdef CONFIG_MACH_ESATA_SHEEVAPLUG | ||
145 | MACHINE_START(ESATA_SHEEVAPLUG, "Marvell eSATA SheevaPlug Reference Board") | ||
146 | .phys_io = KIRKWOOD_REGS_PHYS_BASE, | ||
147 | .io_pg_offst = ((KIRKWOOD_REGS_VIRT_BASE) >> 18) & 0xfffc, | ||
148 | .boot_params = 0x00000100, | ||
149 | .init_machine = sheevaplug_init, | ||
150 | .map_io = kirkwood_map_io, | ||
151 | .init_irq = kirkwood_init_irq, | ||
152 | .timer = &kirkwood_timer, | ||
153 | MACHINE_END | ||
154 | #endif | ||
diff --git a/arch/arm/mach-mv78xx0/Kconfig b/arch/arm/mach-mv78xx0/Kconfig index 6fbe68fe4412..f2d309d0619e 100644 --- a/arch/arm/mach-mv78xx0/Kconfig +++ b/arch/arm/mach-mv78xx0/Kconfig | |||
@@ -14,6 +14,12 @@ config MACH_RD78X00_MASA | |||
14 | Say 'Y' here if you want your kernel to support the | 14 | Say 'Y' here if you want your kernel to support the |
15 | Marvell RD-78x00-mASA Reference Design. | 15 | Marvell RD-78x00-mASA Reference Design. |
16 | 16 | ||
17 | config MACH_TERASTATION_WXL | ||
18 | bool "Buffalo WLX (Terastation Duo) NAS" | ||
19 | help | ||
20 | Say 'Y' here if you want your kernel to support the | ||
21 | Buffalo WXL Nas. | ||
22 | |||
17 | endmenu | 23 | endmenu |
18 | 24 | ||
19 | endif | 25 | endif |
diff --git a/arch/arm/mach-mv78xx0/Makefile b/arch/arm/mach-mv78xx0/Makefile index da628b7f3bb6..67a13f9bfe64 100644 --- a/arch/arm/mach-mv78xx0/Makefile +++ b/arch/arm/mach-mv78xx0/Makefile | |||
@@ -1,3 +1,4 @@ | |||
1 | obj-y += common.o addr-map.o irq.o pcie.o | 1 | obj-y += common.o addr-map.o mpp.o irq.o pcie.o |
2 | obj-$(CONFIG_MACH_DB78X00_BP) += db78x00-bp-setup.o | 2 | obj-$(CONFIG_MACH_DB78X00_BP) += db78x00-bp-setup.o |
3 | obj-$(CONFIG_MACH_RD78X00_MASA) += rd78x00-masa-setup.o | 3 | obj-$(CONFIG_MACH_RD78X00_MASA) += rd78x00-masa-setup.o |
4 | obj-$(CONFIG_MACH_TERASTATION_WXL) += buffalo-wxl-setup.o | ||
diff --git a/arch/arm/mach-mv78xx0/buffalo-wxl-setup.c b/arch/arm/mach-mv78xx0/buffalo-wxl-setup.c new file mode 100644 index 000000000000..61e5e583603b --- /dev/null +++ b/arch/arm/mach-mv78xx0/buffalo-wxl-setup.c | |||
@@ -0,0 +1,155 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-mv78xx0/buffalo-wxl-setup.c | ||
3 | * | ||
4 | * Buffalo WXL (Terastation Duo) Setup routines | ||
5 | * | ||
6 | * sebastien requiem <sebastien@requiem.fr> | ||
7 | * | ||
8 | * This file is licensed under the terms of the GNU General Public | ||
9 | * License version 2. This program is licensed "as is" without any | ||
10 | * warranty of any kind, whether express or implied. | ||
11 | */ | ||
12 | |||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/init.h> | ||
15 | #include <linux/platform_device.h> | ||
16 | #include <linux/ata_platform.h> | ||
17 | #include <linux/mv643xx_eth.h> | ||
18 | #include <linux/ethtool.h> | ||
19 | #include <linux/i2c.h> | ||
20 | #include <mach/mv78xx0.h> | ||
21 | #include <asm/mach-types.h> | ||
22 | #include <asm/mach/arch.h> | ||
23 | #include "common.h" | ||
24 | #include "mpp.h" | ||
25 | |||
26 | |||
27 | /* This arch has 2 Giga Ethernet */ | ||
28 | |||
29 | static struct mv643xx_eth_platform_data db78x00_ge00_data = { | ||
30 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), | ||
31 | }; | ||
32 | |||
33 | static struct mv643xx_eth_platform_data db78x00_ge01_data = { | ||
34 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), | ||
35 | }; | ||
36 | |||
37 | |||
38 | /* 2 SATA controller supporting HotPlug */ | ||
39 | |||
40 | static struct mv_sata_platform_data db78x00_sata_data = { | ||
41 | .n_ports = 2, | ||
42 | }; | ||
43 | |||
44 | static struct i2c_board_info __initdata db78x00_i2c_rtc = { | ||
45 | I2C_BOARD_INFO("ds1338", 0x68), | ||
46 | }; | ||
47 | |||
48 | |||
49 | static unsigned int wxl_mpp_config[] __initdata = { | ||
50 | MPP0_GE1_TXCLK, | ||
51 | MPP1_GE1_TXCTL, | ||
52 | MPP2_GE1_RXCTL, | ||
53 | MPP3_GE1_RXCLK, | ||
54 | MPP4_GE1_TXD0, | ||
55 | MPP5_GE1_TXD1, | ||
56 | MPP6_GE1_TXD2, | ||
57 | MPP7_GE1_TXD3, | ||
58 | MPP8_GE1_RXD0, | ||
59 | MPP9_GE1_RXD1, | ||
60 | MPP10_GE1_RXD2, | ||
61 | MPP11_GE1_RXD3, | ||
62 | MPP12_GPIO, | ||
63 | MPP13_SYSRST_OUTn, | ||
64 | MPP14_SATA1_ACTn, | ||
65 | MPP15_SATA0_ACTn, | ||
66 | MPP16_GPIO, | ||
67 | MPP17_GPIO, | ||
68 | MPP18_GPIO, | ||
69 | MPP19_GPIO, | ||
70 | MPP20_GPIO, | ||
71 | MPP21_GPIO, | ||
72 | MPP22_GPIO, | ||
73 | MPP23_GPIO, | ||
74 | MPP24_UA2_TXD, | ||
75 | MPP25_UA2_RXD, | ||
76 | MPP26_UA2_CTSn, | ||
77 | MPP27_UA2_RTSn, | ||
78 | MPP28_GPIO, | ||
79 | MPP29_SYSRST_OUTn, | ||
80 | MPP30_GPIO, | ||
81 | MPP31_GPIO, | ||
82 | MPP32_GPIO, | ||
83 | MPP33_GPIO, | ||
84 | MPP34_GPIO, | ||
85 | MPP35_GPIO, | ||
86 | MPP36_GPIO, | ||
87 | MPP37_GPIO, | ||
88 | MPP38_GPIO, | ||
89 | MPP39_GPIO, | ||
90 | MPP40_UNUSED, | ||
91 | MPP41_UNUSED, | ||
92 | MPP42_UNUSED, | ||
93 | MPP43_UNUSED, | ||
94 | MPP44_UNUSED, | ||
95 | MPP45_UNUSED, | ||
96 | MPP46_UNUSED, | ||
97 | MPP47_UNUSED, | ||
98 | MPP48_SATA1_ACTn, | ||
99 | MPP49_SATA0_ACTn, | ||
100 | 0 | ||
101 | }; | ||
102 | |||
103 | |||
104 | static void __init wxl_init(void) | ||
105 | { | ||
106 | /* | ||
107 | * Basic MV78xx0 setup. Needs to be called early. | ||
108 | */ | ||
109 | mv78xx0_init(); | ||
110 | mv78xx0_mpp_conf(wxl_mpp_config); | ||
111 | |||
112 | /* | ||
113 | * Partition on-chip peripherals between the two CPU cores. | ||
114 | */ | ||
115 | mv78xx0_ehci0_init(); | ||
116 | mv78xx0_ehci1_init(); | ||
117 | mv78xx0_ehci2_init(); | ||
118 | mv78xx0_ge00_init(&db78x00_ge00_data); | ||
119 | mv78xx0_ge01_init(&db78x00_ge01_data); | ||
120 | mv78xx0_sata_init(&db78x00_sata_data); | ||
121 | mv78xx0_uart0_init(); | ||
122 | mv78xx0_uart1_init(); | ||
123 | mv78xx0_uart2_init(); | ||
124 | mv78xx0_uart3_init(); | ||
125 | mv78xx0_i2c_init(); | ||
126 | i2c_register_board_info(0, &db78x00_i2c_rtc, 1); | ||
127 | } | ||
128 | |||
129 | static int __init wxl_pci_init(void) | ||
130 | { | ||
131 | if (machine_is_terastation_wxl()) { | ||
132 | /* | ||
133 | * Assign the x16 PCIe slot on the board to CPU core | ||
134 | * #0, and let CPU core #1 have the four x1 slots. | ||
135 | */ | ||
136 | if (mv78xx0_core_index() == 0) | ||
137 | mv78xx0_pcie_init(0, 1); | ||
138 | else | ||
139 | mv78xx0_pcie_init(1, 0); | ||
140 | } | ||
141 | |||
142 | return 0; | ||
143 | } | ||
144 | subsys_initcall(wxl_pci_init); | ||
145 | |||
146 | MACHINE_START(TERASTATION_WXL, "Buffalo Nas WXL") | ||
147 | /* Maintainer: Sebastien Requiem <sebastien@requiem.fr> */ | ||
148 | .phys_io = MV78XX0_REGS_PHYS_BASE, | ||
149 | .io_pg_offst = ((MV78XX0_REGS_VIRT_BASE) >> 18) & 0xfffc, | ||
150 | .boot_params = 0x00000100, | ||
151 | .init_machine = wxl_init, | ||
152 | .map_io = mv78xx0_map_io, | ||
153 | .init_irq = mv78xx0_init_irq, | ||
154 | .timer = &mv78xx0_timer, | ||
155 | MACHINE_END | ||
diff --git a/arch/arm/mach-mv78xx0/mpp.c b/arch/arm/mach-mv78xx0/mpp.c new file mode 100644 index 000000000000..354ac514eb89 --- /dev/null +++ b/arch/arm/mach-mv78xx0/mpp.c | |||
@@ -0,0 +1,96 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-mv78x00/mpp.c | ||
3 | * | ||
4 | * MPP functions for Marvell MV78x00 SoCs | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/mbus.h> | ||
14 | #include <linux/io.h> | ||
15 | #include <asm/gpio.h> | ||
16 | #include <mach/hardware.h> | ||
17 | #include "common.h" | ||
18 | #include "mpp.h" | ||
19 | |||
20 | static unsigned int __init mv78xx0_variant(void) | ||
21 | { | ||
22 | u32 dev, rev; | ||
23 | |||
24 | mv78xx0_pcie_id(&dev, &rev); | ||
25 | |||
26 | if (dev == MV78100_DEV_ID && rev >= MV78100_REV_A0) | ||
27 | return MPP_78100_A0_MASK; | ||
28 | |||
29 | printk(KERN_ERR "MPP setup: unknown mv78x00 variant " | ||
30 | "(dev %#x rev %#x)\n", dev, rev); | ||
31 | return 0; | ||
32 | } | ||
33 | |||
34 | #define MPP_CTRL(i) (DEV_BUS_VIRT_BASE + (i) * 4) | ||
35 | #define MPP_NR_REGS (1 + MPP_MAX/8) | ||
36 | |||
37 | void __init mv78xx0_mpp_conf(unsigned int *mpp_list) | ||
38 | { | ||
39 | u32 mpp_ctrl[MPP_NR_REGS]; | ||
40 | unsigned int variant_mask; | ||
41 | int i; | ||
42 | |||
43 | variant_mask = mv78xx0_variant(); | ||
44 | if (!variant_mask) | ||
45 | return; | ||
46 | |||
47 | /* Initialize gpiolib. */ | ||
48 | orion_gpio_init(); | ||
49 | |||
50 | printk(KERN_DEBUG "initial MPP regs:"); | ||
51 | for (i = 0; i < MPP_NR_REGS; i++) { | ||
52 | mpp_ctrl[i] = readl(MPP_CTRL(i)); | ||
53 | printk(" %08x", mpp_ctrl[i]); | ||
54 | } | ||
55 | printk("\n"); | ||
56 | |||
57 | while (*mpp_list) { | ||
58 | unsigned int num = MPP_NUM(*mpp_list); | ||
59 | unsigned int sel = MPP_SEL(*mpp_list); | ||
60 | int shift, gpio_mode; | ||
61 | |||
62 | if (num > MPP_MAX) { | ||
63 | printk(KERN_ERR "mv78xx0_mpp_conf: invalid MPP " | ||
64 | "number (%u)\n", num); | ||
65 | continue; | ||
66 | } | ||
67 | if (!(*mpp_list & variant_mask)) { | ||
68 | printk(KERN_WARNING | ||
69 | "mv78xx0_mpp_conf: requested MPP%u config " | ||
70 | "unavailable on this hardware\n", num); | ||
71 | continue; | ||
72 | } | ||
73 | |||
74 | shift = (num & 7) << 2; | ||
75 | mpp_ctrl[num / 8] &= ~(0xf << shift); | ||
76 | mpp_ctrl[num / 8] |= sel << shift; | ||
77 | |||
78 | gpio_mode = 0; | ||
79 | if (*mpp_list & MPP_INPUT_MASK) | ||
80 | gpio_mode |= GPIO_INPUT_OK; | ||
81 | if (*mpp_list & MPP_OUTPUT_MASK) | ||
82 | gpio_mode |= GPIO_OUTPUT_OK; | ||
83 | if (sel != 0) | ||
84 | gpio_mode = 0; | ||
85 | orion_gpio_set_valid(num, gpio_mode); | ||
86 | |||
87 | mpp_list++; | ||
88 | } | ||
89 | |||
90 | printk(KERN_DEBUG " final MPP regs:"); | ||
91 | for (i = 0; i < MPP_NR_REGS; i++) { | ||
92 | writel(mpp_ctrl[i], MPP_CTRL(i)); | ||
93 | printk(" %08x", mpp_ctrl[i]); | ||
94 | } | ||
95 | printk("\n"); | ||
96 | } | ||
diff --git a/arch/arm/mach-mv78xx0/mpp.h b/arch/arm/mach-mv78xx0/mpp.h new file mode 100644 index 000000000000..80840b781eaa --- /dev/null +++ b/arch/arm/mach-mv78xx0/mpp.h | |||
@@ -0,0 +1,347 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-mv78xx0/mpp.h -- Multi Purpose Pins | ||
3 | * | ||
4 | * | ||
5 | * sebastien requiem <sebastien@requiem.fr> | ||
6 | * | ||
7 | * This file is licensed under the terms of the GNU General Public | ||
8 | * License version 2. This program is licensed "as is" without any | ||
9 | * warranty of any kind, whether express or implied. | ||
10 | */ | ||
11 | |||
12 | #ifndef __MV78X00_MPP_H | ||
13 | #define __MV78X00_MPP_H | ||
14 | |||
15 | #define MPP(_num, _sel, _in, _out, _78100_A0) (\ | ||
16 | /* MPP number */ ((_num) & 0xff) | \ | ||
17 | /* MPP select value */ (((_sel) & 0xf) << 8) | \ | ||
18 | /* may be input signal */ ((!!(_in)) << 12) | \ | ||
19 | /* may be output signal */ ((!!(_out)) << 13) | \ | ||
20 | /* available on A0 */ ((!!(_78100_A0)) << 14)) | ||
21 | |||
22 | #define MPP_NUM(x) ((x) & 0xff) | ||
23 | #define MPP_SEL(x) (((x) >> 8) & 0xf) | ||
24 | |||
25 | /* num sel i o 78100_A0 */ | ||
26 | |||
27 | #define MPP_INPUT_MASK MPP(0, 0x0, 1, 0, 0) | ||
28 | #define MPP_OUTPUT_MASK MPP(0, 0x0, 0, 1, 0) | ||
29 | |||
30 | #define MPP_78100_A0_MASK MPP(0, 0x0, 0, 0, 1) | ||
31 | |||
32 | #define MPP0_GPIO MPP(0, 0x0, 1, 1, 1) | ||
33 | #define MPP0_GE0_COL MPP(0, 0x1, 1, 0, 1) | ||
34 | #define MPP0_GE1_TXCLK MPP(0, 0x2, 0, 1, 1) | ||
35 | #define MPP0_UNUSED MPP(0, 0x3, 0, 0, 1) | ||
36 | |||
37 | #define MPP1_GPIO MPP(1, 0x0, 1, 1, 1) | ||
38 | #define MPP1_GE0_RXERR MPP(1, 0x1, 1, 0, 1) | ||
39 | #define MPP1_GE1_TXCTL MPP(1, 0x2, 0, 1, 1) | ||
40 | #define MPP1_UNUSED MPP(1, 0x3, 0, 0, 1) | ||
41 | |||
42 | #define MPP2_GPIO MPP(2, 0x0, 1, 1, 1) | ||
43 | #define MPP2_GE0_CRS MPP(2, 0x1, 1, 0, 1) | ||
44 | #define MPP2_GE1_RXCTL MPP(2, 0x2, 1, 0, 1) | ||
45 | #define MPP2_UNUSED MPP(2, 0x3, 0, 0, 1) | ||
46 | |||
47 | #define MPP3_GPIO MPP(3, 0x0, 1, 1, 1) | ||
48 | #define MPP3_GE0_TXERR MPP(3, 0x1, 0, 1, 1) | ||
49 | #define MPP3_GE1_RXCLK MPP(3, 0x2, 1, 0, 1) | ||
50 | #define MPP3_UNUSED MPP(3, 0x3, 0, 0, 1) | ||
51 | |||
52 | #define MPP4_GPIO MPP(4, 0x0, 1, 1, 1) | ||
53 | #define MPP4_GE0_TXD4 MPP(4, 0x1, 0, 1, 1) | ||
54 | #define MPP4_GE1_TXD0 MPP(4, 0x2, 0, 1, 1) | ||
55 | #define MPP4_UNUSED MPP(4, 0x3, 0, 0, 1) | ||
56 | |||
57 | #define MPP5_GPIO MPP(5, 0x0, 1, 1, 1) | ||
58 | #define MPP5_GE0_TXD5 MPP(5, 0x1, 0, 1, 1) | ||
59 | #define MPP5_GE1_TXD1 MPP(5, 0x2, 0, 1, 1) | ||
60 | #define MPP5_UNUSED MPP(5, 0x3, 0, 0, 1) | ||
61 | |||
62 | #define MPP6_GPIO MPP(6, 0x0, 1, 1, 1) | ||
63 | #define MPP6_GE0_TXD6 MPP(6, 0x1, 0, 1, 1) | ||
64 | #define MPP6_GE1_TXD2 MPP(6, 0x2, 0, 1, 1) | ||
65 | #define MPP6_UNUSED MPP(6, 0x3, 0, 0, 1) | ||
66 | |||
67 | #define MPP7_GPIO MPP(7, 0x0, 1, 1, 1) | ||
68 | #define MPP7_GE0_TXD7 MPP(7, 0x1, 0, 1, 1) | ||
69 | #define MPP7_GE1_TXD3 MPP(7, 0x2, 0, 1, 1) | ||
70 | #define MPP7_UNUSED MPP(7, 0x3, 0, 0, 1) | ||
71 | |||
72 | #define MPP8_GPIO MPP(8, 0x0, 1, 1, 1) | ||
73 | #define MPP8_GE0_RXD4 MPP(8, 0x1, 1, 0, 1) | ||
74 | #define MPP8_GE1_RXD0 MPP(8, 0x2, 1, 0, 1) | ||
75 | #define MPP8_UNUSED MPP(8, 0x3, 0, 0, 1) | ||
76 | |||
77 | #define MPP9_GPIO MPP(9, 0x0, 1, 1, 1) | ||
78 | #define MPP9_GE0_RXD5 MPP(9, 0x1, 1, 0, 1) | ||
79 | #define MPP9_GE1_RXD1 MPP(9, 0x2, 1, 0, 1) | ||
80 | #define MPP9_UNUSED MPP(9, 0x3, 0, 0, 1) | ||
81 | |||
82 | #define MPP10_GPIO MPP(10, 0x0, 1, 1, 1) | ||
83 | #define MPP10_GE0_RXD6 MPP(10, 0x1, 1, 0, 1) | ||
84 | #define MPP10_GE1_RXD2 MPP(10, 0x2, 1, 0, 1) | ||
85 | #define MPP10_UNUSED MPP(10, 0x3, 0, 0, 1) | ||
86 | |||
87 | #define MPP11_GPIO MPP(11, 0x0, 1, 1, 1) | ||
88 | #define MPP11_GE0_RXD7 MPP(11, 0x1, 1, 0, 1) | ||
89 | #define MPP11_GE1_RXD3 MPP(11, 0x2, 1, 0, 1) | ||
90 | #define MPP11_UNUSED MPP(11, 0x3, 0, 0, 1) | ||
91 | |||
92 | #define MPP12_GPIO MPP(12, 0x0, 1, 1, 1) | ||
93 | #define MPP12_M_BB MPP(12, 0x3, 1, 0, 1) | ||
94 | #define MPP12_UA0_CTSn MPP(12, 0x4, 1, 0, 1) | ||
95 | #define MPP12_NAND_FLASH_REn0 MPP(12, 0x5, 0, 1, 1) | ||
96 | #define MPP12_TDM0_SCSn MPP(12, 0X6, 0, 1, 1) | ||
97 | #define MPP12_UNUSED MPP(12, 0x1, 0, 0, 1) | ||
98 | |||
99 | #define MPP13_GPIO MPP(13, 0x0, 1, 1, 1) | ||
100 | #define MPP13_SYSRST_OUTn MPP(13, 0x3, 0, 1, 1) | ||
101 | #define MPP13_UA0_RTSn MPP(13, 0x4, 0, 1, 1) | ||
102 | #define MPP13_NAN_FLASH_WEn0 MPP(13, 0x5, 0, 1, 1) | ||
103 | #define MPP13_TDM_SCLK MPP(13, 0x6, 0, 1, 1) | ||
104 | #define MPP13_UNUSED MPP(13, 0x1, 0, 0, 1) | ||
105 | |||
106 | #define MPP14_GPIO MPP(14, 0x0, 1, 1, 1) | ||
107 | #define MPP14_SATA1_ACTn MPP(14, 0x3, 0, 1, 1) | ||
108 | #define MPP14_UA1_CTSn MPP(14, 0x4, 1, 0, 1) | ||
109 | #define MPP14_NAND_FLASH_REn1 MPP(14, 0x5, 0, 1, 1) | ||
110 | #define MPP14_TDM_SMOSI MPP(14, 0x6, 0, 1, 1) | ||
111 | #define MPP14_UNUSED MPP(14, 0x1, 0, 0, 1) | ||
112 | |||
113 | #define MPP15_GPIO MPP(15, 0x0, 1, 1, 1) | ||
114 | #define MPP15_SATA0_ACTn MPP(15, 0x3, 0, 1, 1) | ||
115 | #define MPP15_UA1_RTSn MPP(15, 0x4, 0, 1, 1) | ||
116 | #define MPP15_NAND_FLASH_WEn1 MPP(15, 0x5, 0, 1, 1) | ||
117 | #define MPP15_TDM_SMISO MPP(15, 0x6, 1, 0, 1) | ||
118 | #define MPP15_UNUSED MPP(15, 0x1, 0, 0, 1) | ||
119 | |||
120 | #define MPP16_GPIO MPP(16, 0x0, 1, 1, 1) | ||
121 | #define MPP16_SATA1_PRESENTn MPP(16, 0x3, 0, 1, 1) | ||
122 | #define MPP16_UA2_TXD MPP(16, 0x4, 0, 1, 1) | ||
123 | #define MPP16_NAND_FLASH_REn3 MPP(16, 0x5, 0, 1, 1) | ||
124 | #define MPP16_TDM_INTn MPP(16, 0x6, 1, 0, 1) | ||
125 | #define MPP16_UNUSED MPP(16, 0x1, 0, 0, 1) | ||
126 | |||
127 | |||
128 | #define MPP17_GPIO MPP(17, 0x0, 1, 1, 1) | ||
129 | #define MPP17_SATA0_PRESENTn MPP(17, 0x3, 0, 1, 1) | ||
130 | #define MPP17_UA2_RXD MPP(17, 0x4, 1, 0, 1) | ||
131 | #define MPP17_NAND_FLASH_WEn3 MPP(17, 0x5, 0, 1, 1) | ||
132 | #define MPP17_TDM_RSTn MPP(17, 0x6, 0, 1, 1) | ||
133 | #define MPP17_UNUSED MPP(17, 0x1, 0, 0, 1) | ||
134 | |||
135 | |||
136 | #define MPP18_GPIO MPP(18, 0x0, 1, 1, 1) | ||
137 | #define MPP18_UA0_CTSn MPP(18, 0x4, 1, 0, 1) | ||
138 | #define MPP18_BOOT_FLASH_REn MPP(18, 0x5, 0, 1, 1) | ||
139 | #define MPP18_UNUSED MPP(18, 0x1, 0, 0, 1) | ||
140 | |||
141 | |||
142 | |||
143 | #define MPP19_GPIO MPP(19, 0x0, 1, 1, 1) | ||
144 | #define MPP19_UA0_CTSn MPP(19, 0x4, 0, 1, 1) | ||
145 | #define MPP19_BOOT_FLASH_WEn MPP(19, 0x5, 0, 1, 1) | ||
146 | #define MPP19_UNUSED MPP(19, 0x1, 0, 0, 1) | ||
147 | |||
148 | |||
149 | #define MPP20_GPIO MPP(20, 0x0, 1, 1, 1) | ||
150 | #define MPP20_UA1_CTSs MPP(20, 0x4, 1, 0, 1) | ||
151 | #define MPP20_TDM_PCLK MPP(20, 0x6, 1, 1, 0) | ||
152 | #define MPP20_UNUSED MPP(20, 0x1, 0, 0, 1) | ||
153 | |||
154 | |||
155 | |||
156 | #define MPP21_GPIO MPP(21, 0x0, 1, 1, 1) | ||
157 | #define MPP21_UA1_CTSs MPP(21, 0x4, 0, 1, 1) | ||
158 | #define MPP21_TDM_FSYNC MPP(21, 0x6, 1, 1, 0) | ||
159 | #define MPP21_UNUSED MPP(21, 0x1, 0, 0, 1) | ||
160 | |||
161 | |||
162 | |||
163 | #define MPP22_GPIO MPP(22, 0x0, 1, 1, 1) | ||
164 | #define MPP22_UA3_TDX MPP(22, 0x4, 0, 1, 1) | ||
165 | #define MPP22_NAND_FLASH_REn2 MPP(22, 0x5, 0, 1, 1) | ||
166 | #define MPP22_TDM_DRX MPP(22, 0x6, 1, 0, 1) | ||
167 | #define MPP22_UNUSED MPP(22, 0x1, 0, 0, 1) | ||
168 | |||
169 | |||
170 | |||
171 | #define MPP23_GPIO MPP(23, 0x0, 1, 1, 1) | ||
172 | #define MPP23_UA3_RDX MPP(23, 0x4, 1, 0, 1) | ||
173 | #define MPP23_NAND_FLASH_WEn2 MPP(23, 0x5, 0, 1, 1) | ||
174 | #define MPP23_TDM_DTX MPP(23, 0x6, 0, 1, 1) | ||
175 | #define MPP23_UNUSED MPP(23, 0x1, 0, 0, 1) | ||
176 | |||
177 | |||
178 | #define MPP24_GPIO MPP(24, 0x0, 1, 1, 1) | ||
179 | #define MPP24_UA2_TXD MPP(24, 0x4, 0, 1, 1) | ||
180 | #define MPP24_TDM_INTn MPP(24, 0x6, 1, 0, 1) | ||
181 | #define MPP24_UNUSED MPP(24, 0x1, 0, 0, 1) | ||
182 | |||
183 | |||
184 | #define MPP25_GPIO MPP(25, 0x0, 1, 1, 1) | ||
185 | #define MPP25_UA2_RXD MPP(25, 0x4, 1, 0, 1) | ||
186 | #define MPP25_TDM_RSTn MPP(25, 0x6, 0, 1, 1) | ||
187 | #define MPP25_UNUSED MPP(25, 0x1, 0, 0, 1) | ||
188 | |||
189 | |||
190 | #define MPP26_GPIO MPP(26, 0x0, 1, 1, 1) | ||
191 | #define MPP26_UA2_CTSn MPP(26, 0x4, 1, 0, 1) | ||
192 | #define MPP26_TDM_PCLK MPP(26, 0x6, 1, 1, 1) | ||
193 | #define MPP26_UNUSED MPP(26, 0x1, 0, 0, 1) | ||
194 | |||
195 | |||
196 | #define MPP27_GPIO MPP(27, 0x0, 1, 1, 1) | ||
197 | #define MPP27_UA2_RTSn MPP(27, 0x4, 0, 1, 1) | ||
198 | #define MPP27_TDM_FSYNC MPP(27, 0x6, 1, 1, 1) | ||
199 | #define MPP27_UNUSED MPP(27, 0x1, 0, 0, 1) | ||
200 | |||
201 | |||
202 | #define MPP28_GPIO MPP(28, 0x0, 1, 1, 1) | ||
203 | #define MPP28_UA3_TXD MPP(28, 0x4, 0, 1, 1) | ||
204 | #define MPP28_TDM_DRX MPP(28, 0x6, 1, 0, 1) | ||
205 | #define MPP28_UNUSED MPP(28, 0x1, 0, 0, 1) | ||
206 | |||
207 | #define MPP29_GPIO MPP(29, 0x0, 1, 1, 1) | ||
208 | #define MPP29_UA3_RXD MPP(29, 0x4, 1, 0, 1) | ||
209 | #define MPP29_SYSRST_OUTn MPP(29, 0x5, 0, 1, 1) | ||
210 | #define MPP29_TDM_DTX MPP(29, 0x6, 0, 1, 1) | ||
211 | #define MPP29_UNUSED MPP(29, 0x1, 0, 0, 1) | ||
212 | |||
213 | #define MPP30_GPIO MPP(30, 0x0, 1, 1, 1) | ||
214 | #define MPP30_UA3_CTSn MPP(30, 0x4, 1, 0, 1) | ||
215 | #define MPP30_UNUSED MPP(30, 0x1, 0, 0, 1) | ||
216 | |||
217 | #define MPP31_GPIO MPP(31, 0x0, 1, 1, 1) | ||
218 | #define MPP31_UA3_RTSn MPP(31, 0x4, 0, 1, 1) | ||
219 | #define MPP31_TDM1_SCSn MPP(31, 0x6, 0, 1, 1) | ||
220 | #define MPP31_UNUSED MPP(31, 0x1, 0, 0, 1) | ||
221 | |||
222 | |||
223 | #define MPP32_GPIO MPP(32, 0x1, 1, 1, 1) | ||
224 | #define MPP32_UA3_TDX MPP(32, 0x4, 0, 1, 1) | ||
225 | #define MPP32_SYSRST_OUTn MPP(32, 0x5, 0, 1, 1) | ||
226 | #define MPP32_TDM0_RXQ MPP(32, 0x6, 0, 1, 1) | ||
227 | #define MPP32_UNUSED MPP(32, 0x3, 0, 0, 1) | ||
228 | |||
229 | |||
230 | #define MPP33_GPIO MPP(33, 0x1, 1, 1, 1) | ||
231 | #define MPP33_UA3_RDX MPP(33, 0x4, 1, 0, 1) | ||
232 | #define MPP33_TDM0_TXQ MPP(33, 0x6, 0, 1, 1) | ||
233 | #define MPP33_UNUSED MPP(33, 0x3, 0, 0, 1) | ||
234 | |||
235 | |||
236 | |||
237 | #define MPP34_GPIO MPP(34, 0x1, 1, 1, 1) | ||
238 | #define MPP34_UA2_TDX MPP(34, 0x4, 0, 1, 1) | ||
239 | #define MPP34_TDM1_RXQ MPP(34, 0x6, 0, 1, 1) | ||
240 | #define MPP34_UNUSED MPP(34, 0x3, 0, 0, 1) | ||
241 | |||
242 | |||
243 | |||
244 | #define MPP35_GPIO MPP(35, 0x1, 1, 1, 1) | ||
245 | #define MPP35_UA2_RDX MPP(35, 0x4, 1, 0, 1) | ||
246 | #define MPP35_TDM1_TXQ MPP(35, 0x6, 0, 1, 1) | ||
247 | #define MPP35_UNUSED MPP(35, 0x3, 0, 0, 1) | ||
248 | |||
249 | #define MPP36_GPIO MPP(36, 0x1, 1, 1, 1) | ||
250 | #define MPP36_UA0_CTSn MPP(36, 0x2, 1, 0, 1) | ||
251 | #define MPP36_UA2_TDX MPP(36, 0x4, 0, 1, 1) | ||
252 | #define MPP36_TDM0_SCSn MPP(36, 0x6, 0, 1, 1) | ||
253 | #define MPP36_UNUSED MPP(36, 0x3, 0, 0, 1) | ||
254 | |||
255 | |||
256 | #define MPP37_GPIO MPP(37, 0x1, 1, 1, 1) | ||
257 | #define MPP37_UA0_RTSn MPP(37, 0x2, 0, 1, 1) | ||
258 | #define MPP37_UA2_RXD MPP(37, 0x4, 1, 0, 1) | ||
259 | #define MPP37_SYSRST_OUTn MPP(37, 0x5, 0, 1, 1) | ||
260 | #define MPP37_TDM_SCLK MPP(37, 0x6, 0, 1, 1) | ||
261 | #define MPP37_UNUSED MPP(37, 0x3, 0, 0, 1) | ||
262 | |||
263 | |||
264 | |||
265 | |||
266 | #define MPP38_GPIO MPP(38, 0x1, 1, 1, 1) | ||
267 | #define MPP38_UA1_CTSn MPP(38, 0x2, 1, 0, 1) | ||
268 | #define MPP38_UA3_TXD MPP(38, 0x4, 0, 1, 1) | ||
269 | #define MPP38_SYSRST_OUTn MPP(38, 0x5, 0, 1, 1) | ||
270 | #define MPP38_TDM_SMOSI MPP(38, 0x6, 0, 1, 1) | ||
271 | #define MPP38_UNUSED MPP(38, 0x3, 0, 0, 1) | ||
272 | |||
273 | |||
274 | |||
275 | |||
276 | #define MPP39_GPIO MPP(39, 0x1, 1, 1, 1) | ||
277 | #define MPP39_UA1_RTSn MPP(39, 0x2, 0, 1, 1) | ||
278 | #define MPP39_UA3_RXD MPP(39, 0x4, 1, 0, 1) | ||
279 | #define MPP39_SYSRST_OUTn MPP(39, 0x5, 0, 1, 1) | ||
280 | #define MPP39_TDM_SMISO MPP(39, 0x6, 1, 0, 1) | ||
281 | #define MPP39_UNUSED MPP(39, 0x3, 0, 0, 1) | ||
282 | |||
283 | |||
284 | |||
285 | #define MPP40_GPIO MPP(40, 0x1, 1, 1, 1) | ||
286 | #define MPP40_TDM_INTn MPP(40, 0x6, 1, 0, 1) | ||
287 | #define MPP40_UNUSED MPP(40, 0x0, 0, 0, 1) | ||
288 | |||
289 | |||
290 | |||
291 | #define MPP41_GPIO MPP(41, 0x1, 1, 1, 1) | ||
292 | #define MPP41_TDM_RSTn MPP(41, 0x6, 0, 1, 1) | ||
293 | #define MPP41_UNUSED MPP(41, 0x0, 0, 0, 1) | ||
294 | |||
295 | |||
296 | |||
297 | #define MPP42_GPIO MPP(42, 0x1, 1, 1, 1) | ||
298 | #define MPP42_TDM_PCLK MPP(42, 0x6, 1, 1, 1) | ||
299 | #define MPP42_UNUSED MPP(42, 0x0, 0, 0, 1) | ||
300 | |||
301 | |||
302 | |||
303 | #define MPP43_GPIO MPP(43, 0x1, 1, 1, 1) | ||
304 | #define MPP43_TDM_FSYNC MPP(43, 0x6, 1, 1, 1) | ||
305 | #define MPP43_UNUSED MPP(43, 0x0, 0, 0, 1) | ||
306 | |||
307 | |||
308 | |||
309 | #define MPP44_GPIO MPP(44, 0x1, 1, 1, 1) | ||
310 | #define MPP44_TDM_DRX MPP(44, 0x6, 1, 0, 1) | ||
311 | #define MPP44_UNUSED MPP(44, 0x0, 0, 0, 1) | ||
312 | |||
313 | |||
314 | |||
315 | #define MPP45_GPIO MPP(45, 0x1, 1, 1, 1) | ||
316 | #define MPP45_SATA0_ACTn MPP(45, 0x3, 0, 1, 1) | ||
317 | #define MPP45_TDM_DRX MPP(45, 0x6, 0, 1, 1) | ||
318 | #define MPP45_UNUSED MPP(45, 0x0, 0, 0, 1) | ||
319 | |||
320 | |||
321 | #define MPP46_GPIO MPP(46, 0x1, 1, 1, 1) | ||
322 | #define MPP46_TDM_SCSn MPP(46, 0x6, 0, 1, 1) | ||
323 | #define MPP46_UNUSED MPP(46, 0x0, 0, 0, 1) | ||
324 | |||
325 | |||
326 | #define MPP47_GPIO MPP(47, 0x1, 1, 1, 1) | ||
327 | #define MPP47_UNUSED MPP(47, 0x0, 0, 0, 1) | ||
328 | |||
329 | |||
330 | |||
331 | #define MPP48_GPIO MPP(48, 0x1, 1, 1, 1) | ||
332 | #define MPP48_SATA1_ACTn MPP(48, 0x3, 0, 1, 1) | ||
333 | #define MPP48_UNUSED MPP(48, 0x2, 0, 0, 1) | ||
334 | |||
335 | |||
336 | |||
337 | #define MPP49_GPIO MPP(49, 0x1, 1, 1, 1) | ||
338 | #define MPP49_SATA0_ACTn MPP(49, 0x3, 0, 1, 1) | ||
339 | #define MPP49_M_BB MPP(49, 0x4, 1, 0, 1) | ||
340 | #define MPP49_UNUSED MPP(49, 0x2, 0, 0, 1) | ||
341 | |||
342 | |||
343 | #define MPP_MAX 49 | ||
344 | |||
345 | void mv78xx0_mpp_conf(unsigned int *mpp_list); | ||
346 | |||
347 | #endif | ||
diff --git a/arch/arm/mach-omap2/mmc-twl4030.c b/arch/arm/mach-omap2/mmc-twl4030.c index 0c3c72d934bf..8afe9dd3f150 100644 --- a/arch/arm/mach-omap2/mmc-twl4030.c +++ b/arch/arm/mach-omap2/mmc-twl4030.c | |||
@@ -408,6 +408,7 @@ void __init twl4030_mmc_init(struct twl4030_hsmmc_info *controllers) | |||
408 | { | 408 | { |
409 | struct twl4030_hsmmc_info *c; | 409 | struct twl4030_hsmmc_info *c; |
410 | int nr_hsmmc = ARRAY_SIZE(hsmmc_data); | 410 | int nr_hsmmc = ARRAY_SIZE(hsmmc_data); |
411 | int i; | ||
411 | 412 | ||
412 | if (cpu_is_omap2430()) { | 413 | if (cpu_is_omap2430()) { |
413 | control_pbias_offset = OMAP243X_CONTROL_PBIAS_LITE; | 414 | control_pbias_offset = OMAP243X_CONTROL_PBIAS_LITE; |
@@ -434,7 +435,7 @@ void __init twl4030_mmc_init(struct twl4030_hsmmc_info *controllers) | |||
434 | mmc = kzalloc(sizeof(struct omap_mmc_platform_data), GFP_KERNEL); | 435 | mmc = kzalloc(sizeof(struct omap_mmc_platform_data), GFP_KERNEL); |
435 | if (!mmc) { | 436 | if (!mmc) { |
436 | pr_err("Cannot allocate memory for mmc device!\n"); | 437 | pr_err("Cannot allocate memory for mmc device!\n"); |
437 | return; | 438 | goto done; |
438 | } | 439 | } |
439 | 440 | ||
440 | if (c->name) | 441 | if (c->name) |
@@ -532,6 +533,10 @@ void __init twl4030_mmc_init(struct twl4030_hsmmc_info *controllers) | |||
532 | continue; | 533 | continue; |
533 | c->dev = mmc->dev; | 534 | c->dev = mmc->dev; |
534 | } | 535 | } |
536 | |||
537 | done: | ||
538 | for (i = 0; i < nr_hsmmc; i++) | ||
539 | kfree(hsmmc_data[i]); | ||
535 | } | 540 | } |
536 | 541 | ||
537 | #endif | 542 | #endif |
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types index 5a79fc6ee818..31c2f4c30a95 100644 --- a/arch/arm/tools/mach-types +++ b/arch/arm/tools/mach-types | |||
@@ -12,7 +12,7 @@ | |||
12 | # | 12 | # |
13 | # http://www.arm.linux.org.uk/developer/machines/?action=new | 13 | # http://www.arm.linux.org.uk/developer/machines/?action=new |
14 | # | 14 | # |
15 | # Last update: Thu Jan 28 22:15:54 2010 | 15 | # Last update: Sat Feb 20 14:16:15 2010 |
16 | # | 16 | # |
17 | # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number | 17 | # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number |
18 | # | 18 | # |
@@ -2257,7 +2257,7 @@ oratisalog MACH_ORATISALOG ORATISALOG 2268 | |||
2257 | oratismadi MACH_ORATISMADI ORATISMADI 2269 | 2257 | oratismadi MACH_ORATISMADI ORATISMADI 2269 |
2258 | oratisot16 MACH_ORATISOT16 ORATISOT16 2270 | 2258 | oratisot16 MACH_ORATISOT16 ORATISOT16 2270 |
2259 | oratisdesk MACH_ORATISDESK ORATISDESK 2271 | 2259 | oratisdesk MACH_ORATISDESK ORATISDESK 2271 |
2260 | v2_ca9 MACH_V2P_CA9 V2P_CA9 2272 | 2260 | vexpress MACH_VEXPRESS VEXPRESS 2272 |
2261 | sintexo MACH_SINTEXO SINTEXO 2273 | 2261 | sintexo MACH_SINTEXO SINTEXO 2273 |
2262 | cm3389 MACH_CM3389 CM3389 2274 | 2262 | cm3389 MACH_CM3389 CM3389 2274 |
2263 | omap3_cio MACH_OMAP3_CIO OMAP3_CIO 2275 | 2263 | omap3_cio MACH_OMAP3_CIO OMAP3_CIO 2275 |
@@ -2636,3 +2636,45 @@ hw90240 MACH_HW90240 HW90240 2648 | |||
2636 | dm365_leopard MACH_DM365_LEOPARD DM365_LEOPARD 2649 | 2636 | dm365_leopard MACH_DM365_LEOPARD DM365_LEOPARD 2649 |
2637 | mityomapl138 MACH_MITYOMAPL138 MITYOMAPL138 2650 | 2637 | mityomapl138 MACH_MITYOMAPL138 MITYOMAPL138 2650 |
2638 | scat110 MACH_SCAT110 SCAT110 2651 | 2638 | scat110 MACH_SCAT110 SCAT110 2651 |
2639 | acer_a1 MACH_ACER_A1 ACER_A1 2652 | ||
2640 | cmcontrol MACH_CMCONTROL CMCONTROL 2653 | ||
2641 | pelco_lamar MACH_PELCO_LAMAR PELCO_LAMAR 2654 | ||
2642 | rfp43 MACH_RFP43 RFP43 2655 | ||
2643 | sk86r0301 MACH_SK86R0301 SK86R0301 2656 | ||
2644 | ctpxa MACH_CTPXA CTPXA 2657 | ||
2645 | epb_arm9_a MACH_EPB_ARM9_A EPB_ARM9_A 2658 | ||
2646 | guruplug MACH_GURUPLUG GURUPLUG 2659 | ||
2647 | spear310 MACH_SPEAR310 SPEAR310 2660 | ||
2648 | spear320 MACH_SPEAR320 SPEAR320 2661 | ||
2649 | robotx MACH_ROBOTX ROBOTX 2662 | ||
2650 | lsxhl MACH_LSXHL LSXHL 2663 | ||
2651 | smartlite MACH_SMARTLITE SMARTLITE 2664 | ||
2652 | cws2 MACH_CWS2 CWS2 2665 | ||
2653 | m619 MACH_M619 M619 2666 | ||
2654 | smartview MACH_SMARTVIEW SMARTVIEW 2667 | ||
2655 | lsa_salsa MACH_LSA_SALSA LSA_SALSA 2668 | ||
2656 | kizbox MACH_KIZBOX KIZBOX 2669 | ||
2657 | htccharmer MACH_HTCCHARMER HTCCHARMER 2670 | ||
2658 | guf_neso_lt MACH_GUF_NESO_LT GUF_NESO_LT 2671 | ||
2659 | pm9g45 MACH_PM9G45 PM9G45 2672 | ||
2660 | htcpanther MACH_HTCPANTHER HTCPANTHER 2673 | ||
2661 | htcpanther_cdma MACH_HTCPANTHER_CDMA HTCPANTHER_CDMA 2674 | ||
2662 | reb01 MACH_REB01 REB01 2675 | ||
2663 | aquila MACH_AQUILA AQUILA 2676 | ||
2664 | spark_sls_hw2 MACH_SPARK_SLS_HW2 SPARK_SLS_HW2 2677 | ||
2665 | sheeva_esata MACH_ESATA_SHEEVAPLUG ESATA_SHEEVAPLUG 2678 | ||
2666 | surf7x30 MACH_SURF7X30 SURF7X30 2679 | ||
2667 | micro2440 MACH_MICRO2440 MICRO2440 2680 | ||
2668 | am2440 MACH_AM2440 AM2440 2681 | ||
2669 | tq2440 MACH_TQ2440 TQ2440 2682 | ||
2670 | lpc2478oem MACH_LPC2478OEM LPC2478OEM 2683 | ||
2671 | ak880x MACH_AK880X AK880X 2684 | ||
2672 | cobra3530 MACH_COBRA3530 COBRA3530 2685 | ||
2673 | pmppb MACH_PMPPB PMPPB 2686 | ||
2674 | u6715 MACH_U6715 U6715 2687 | ||
2675 | axar1500_sender MACH_AXAR1500_SENDER AXAR1500_SENDER 2688 | ||
2676 | g30_dvb MACH_G30_DVB G30_DVB 2689 | ||
2677 | vc088x MACH_VC088X VC088X 2690 | ||
2678 | mioa702 MACH_MIOA702 MIOA702 2691 | ||
2679 | hpmin MACH_HPMIN HPMIN 2692 | ||
2680 | ak880xak MACH_AK880XAK AK880XAK 2693 | ||