diff options
author | Brian Swetland <swetland@google.com> | 2007-11-26 07:12:13 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-01-26 09:39:14 -0500 |
commit | 9e73c84c89b7c91ad5d6a141c58efbbe139f6b6c (patch) | |
tree | c8e7e77f4eb307ccec8751853fee2ee8c464506a /arch/arm/mach-msm | |
parent | 3e4ea3728a38b224d8b35ff8a9281407f603aa20 (diff) |
[ARM] msm: board file for MACH_HALIBUT (QCT MSM7200A)
Add support for the Qualcomm MSM7200A eval board.
Common devices are defined in common.c, to avoid excessive
cut'n'pasting them into other board files.
Signed-off-by: Brian Swetland <swetland@google.com>
Diffstat (limited to 'arch/arm/mach-msm')
-rw-r--r-- | arch/arm/mach-msm/Kconfig | 18 | ||||
-rw-r--r-- | arch/arm/mach-msm/Makefile | 5 | ||||
-rw-r--r-- | arch/arm/mach-msm/board-halibut.c | 114 | ||||
-rw-r--r-- | arch/arm/mach-msm/common.c | 116 |
4 files changed, 253 insertions, 0 deletions
diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig new file mode 100644 index 000000000000..3553babbbf05 --- /dev/null +++ b/arch/arm/mach-msm/Kconfig | |||
@@ -0,0 +1,18 @@ | |||
1 | if ARCH_MSM7X00A | ||
2 | |||
3 | comment "MSM7X00A Board Type" | ||
4 | depends on ARCH_MSM7X00A | ||
5 | |||
6 | config MACH_HALIBUT | ||
7 | depends on ARCH_MSM7X00A | ||
8 | default y | ||
9 | bool "Halibut Board (QCT SURF7200A)" | ||
10 | help | ||
11 | Support for the Qualcomm SURF7200A eval board. | ||
12 | |||
13 | config MSM7X00A_IDLE | ||
14 | depends on ARCH_MSM7X00A | ||
15 | default y | ||
16 | bool "Idle Support for MSM7X00A" | ||
17 | |||
18 | endif | ||
diff --git a/arch/arm/mach-msm/Makefile b/arch/arm/mach-msm/Makefile index a42d1a019cd2..fcca853d6485 100644 --- a/arch/arm/mach-msm/Makefile +++ b/arch/arm/mach-msm/Makefile | |||
@@ -1,2 +1,7 @@ | |||
1 | obj-y += io.o idle.o irq.o timer.o | 1 | obj-y += io.o idle.o irq.o timer.o |
2 | 2 | ||
3 | # Common code for board init | ||
4 | obj-y += common.o | ||
5 | |||
6 | obj-$(CONFIG_MACH_HALIBUT) += board-halibut.o | ||
7 | |||
diff --git a/arch/arm/mach-msm/board-halibut.c b/arch/arm/mach-msm/board-halibut.c new file mode 100644 index 000000000000..86dfb2b5261c --- /dev/null +++ b/arch/arm/mach-msm/board-halibut.c | |||
@@ -0,0 +1,114 @@ | |||
1 | /* linux/arch/arm/mach-msm/board-halibut.c | ||
2 | * | ||
3 | * Copyright (C) 2007 Google, Inc. | ||
4 | * Author: Brian Swetland <swetland@google.com> | ||
5 | * | ||
6 | * This software is licensed under the terms of the GNU General Public | ||
7 | * License version 2, as published by the Free Software Foundation, and | ||
8 | * may be copied, distributed, and modified under those terms. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | */ | ||
16 | |||
17 | #include <linux/kernel.h> | ||
18 | #include <linux/init.h> | ||
19 | #include <linux/platform_device.h> | ||
20 | #include <linux/input.h> | ||
21 | |||
22 | #include <asm/hardware.h> | ||
23 | #include <asm/mach-types.h> | ||
24 | #include <asm/mach/arch.h> | ||
25 | #include <asm/mach/map.h> | ||
26 | #include <asm/mach/flash.h> | ||
27 | |||
28 | #include <asm/arch/board.h> | ||
29 | #include <asm/arch/msm_iomap.h> | ||
30 | |||
31 | #include <asm/io.h> | ||
32 | #include <asm/delay.h> | ||
33 | |||
34 | #include <linux/mtd/nand.h> | ||
35 | #include <linux/mtd/partitions.h> | ||
36 | |||
37 | static struct resource smc91x_resources[] = { | ||
38 | [0] = { | ||
39 | .start = 0x9C004300, | ||
40 | .end = 0x9C004400, | ||
41 | .flags = IORESOURCE_MEM, | ||
42 | }, | ||
43 | [1] = { | ||
44 | .start = MSM_GPIO_TO_INT(49), | ||
45 | .end = MSM_GPIO_TO_INT(49), | ||
46 | .flags = IORESOURCE_IRQ, | ||
47 | }, | ||
48 | }; | ||
49 | |||
50 | static struct platform_device smc91x_device = { | ||
51 | .name = "smc91x", | ||
52 | .id = 0, | ||
53 | .num_resources = ARRAY_SIZE(smc91x_resources), | ||
54 | .resource = smc91x_resources, | ||
55 | }; | ||
56 | |||
57 | static void mddi0_panel_power(int on) | ||
58 | { | ||
59 | } | ||
60 | |||
61 | static struct msm_mddi_platform_data msm_mddi0_pdata = { | ||
62 | .panel_power = mddi0_panel_power, | ||
63 | .has_vsync_irq = 0, | ||
64 | }; | ||
65 | |||
66 | static struct platform_device msm_mddi0_device = { | ||
67 | .name = "msm_mddi", | ||
68 | .id = 0, | ||
69 | .dev = { | ||
70 | .platform_data = &msm_mddi0_pdata | ||
71 | }, | ||
72 | }; | ||
73 | |||
74 | static struct platform_device msm_serial0_device = { | ||
75 | .name = "msm_serial", | ||
76 | .id = 0, | ||
77 | }; | ||
78 | |||
79 | static struct platform_device *devices[] __initdata = { | ||
80 | &msm_serial0_device, | ||
81 | &msm_mddi0_device, | ||
82 | &smc91x_device, | ||
83 | }; | ||
84 | |||
85 | extern struct sys_timer msm_timer; | ||
86 | |||
87 | static void __init halibut_init_irq(void) | ||
88 | { | ||
89 | msm_init_irq(); | ||
90 | } | ||
91 | |||
92 | static void __init halibut_init(void) | ||
93 | { | ||
94 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
95 | msm_add_devices(); | ||
96 | } | ||
97 | |||
98 | static void __init halibut_map_io(void) | ||
99 | { | ||
100 | msm_map_common_io(); | ||
101 | } | ||
102 | |||
103 | MACHINE_START(HALIBUT, "Halibut Board (QCT SURF7200A)") | ||
104 | |||
105 | /* UART for LL DEBUG */ | ||
106 | .phys_io = MSM_UART1_PHYS, | ||
107 | .io_pg_offst = ((MSM_UART1_BASE) >> 18) & 0xfffc, | ||
108 | |||
109 | .boot_params = 0x10000100, | ||
110 | .map_io = halibut_map_io, | ||
111 | .init_irq = halibut_init_irq, | ||
112 | .init_machine = halibut_init, | ||
113 | .timer = &msm_timer, | ||
114 | MACHINE_END | ||
diff --git a/arch/arm/mach-msm/common.c b/arch/arm/mach-msm/common.c new file mode 100644 index 000000000000..3f5d3362f887 --- /dev/null +++ b/arch/arm/mach-msm/common.c | |||
@@ -0,0 +1,116 @@ | |||
1 | /* linux/arch/arm/mach-msm/common.c | ||
2 | * | ||
3 | * Common setup code for MSM7K Boards | ||
4 | * | ||
5 | * Copyright (C) 2007 Google, Inc. | ||
6 | * Author: Brian Swetland <swetland@google.com> | ||
7 | * | ||
8 | * This software is licensed under the terms of the GNU General Public | ||
9 | * License version 2, as published by the Free Software Foundation, and | ||
10 | * may be copied, distributed, and modified under those terms. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | */ | ||
18 | |||
19 | #include <linux/kernel.h> | ||
20 | #include <linux/init.h> | ||
21 | #include <linux/platform_device.h> | ||
22 | |||
23 | #include <asm/mach/flash.h> | ||
24 | #include <asm/io.h> | ||
25 | |||
26 | #include <asm/setup.h> | ||
27 | |||
28 | #include <linux/mtd/nand.h> | ||
29 | #include <linux/mtd/partitions.h> | ||
30 | |||
31 | #include <asm/arch/msm_iomap.h> | ||
32 | |||
33 | #include <asm/arch/board.h> | ||
34 | |||
35 | struct flash_platform_data msm_nand_data = { | ||
36 | .parts = 0, | ||
37 | .nr_parts = 0, | ||
38 | }; | ||
39 | |||
40 | static struct resource msm_nand_resources[] = { | ||
41 | [0] = { | ||
42 | .start = 7, | ||
43 | .end = 7, | ||
44 | .flags = IORESOURCE_DMA, | ||
45 | }, | ||
46 | }; | ||
47 | |||
48 | static struct platform_device msm_nand_device = { | ||
49 | .name = "msm_nand", | ||
50 | .id = -1, | ||
51 | .num_resources = ARRAY_SIZE(msm_nand_resources), | ||
52 | .resource = msm_nand_resources, | ||
53 | .dev = { | ||
54 | .platform_data = &msm_nand_data, | ||
55 | }, | ||
56 | }; | ||
57 | |||
58 | static struct platform_device msm_smd_device = { | ||
59 | .name = "msm_smd", | ||
60 | .id = -1, | ||
61 | }; | ||
62 | |||
63 | static struct resource msm_i2c_resources[] = { | ||
64 | { | ||
65 | .start = MSM_I2C_BASE, | ||
66 | .end = MSM_I2C_BASE + MSM_I2C_SIZE - 1, | ||
67 | .flags = IORESOURCE_MEM, | ||
68 | }, | ||
69 | { | ||
70 | .start = INT_PWB_I2C, | ||
71 | .end = INT_PWB_I2C, | ||
72 | .flags = IORESOURCE_IRQ, | ||
73 | }, | ||
74 | }; | ||
75 | |||
76 | static struct platform_device msm_i2c_device = { | ||
77 | .name = "msm_i2c", | ||
78 | .id = 0, | ||
79 | .num_resources = ARRAY_SIZE(msm_i2c_resources), | ||
80 | .resource = msm_i2c_resources, | ||
81 | }; | ||
82 | |||
83 | static struct resource usb_resources[] = { | ||
84 | { | ||
85 | .start = MSM_HSUSB_PHYS, | ||
86 | .end = MSM_HSUSB_PHYS + MSM_HSUSB_SIZE, | ||
87 | .flags = IORESOURCE_MEM, | ||
88 | }, | ||
89 | { | ||
90 | .start = INT_USB_HS, | ||
91 | .end = INT_USB_HS, | ||
92 | .flags = IORESOURCE_IRQ, | ||
93 | }, | ||
94 | }; | ||
95 | |||
96 | static struct platform_device msm_hsusb_device = { | ||
97 | .name = "msm_hsusb", | ||
98 | .id = -1, | ||
99 | .num_resources = ARRAY_SIZE(usb_resources), | ||
100 | .resource = usb_resources, | ||
101 | .dev = { | ||
102 | .coherent_dma_mask = 0xffffffff, | ||
103 | }, | ||
104 | }; | ||
105 | |||
106 | static struct platform_device *devices[] __initdata = { | ||
107 | &msm_nand_device, | ||
108 | &msm_smd_device, | ||
109 | &msm_i2c_device, | ||
110 | &msm_hsusb_device, | ||
111 | }; | ||
112 | |||
113 | void __init msm_add_devices(void) | ||
114 | { | ||
115 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
116 | } | ||