Brian Swetland | 9e73c84 | 2007-11-26 04:12:13 -0800 | [diff] [blame] | 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> |
Russell King | fced80c | 2008-09-06 12:10:45 +0100 | [diff] [blame^] | 21 | #include <linux/io.h> |
| 22 | #include <linux/delay.h> |
Brian Swetland | 9e73c84 | 2007-11-26 04:12:13 -0800 | [diff] [blame] | 23 | |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 24 | #include <mach/hardware.h> |
Brian Swetland | 9e73c84 | 2007-11-26 04:12:13 -0800 | [diff] [blame] | 25 | #include <asm/mach-types.h> |
| 26 | #include <asm/mach/arch.h> |
| 27 | #include <asm/mach/map.h> |
| 28 | #include <asm/mach/flash.h> |
| 29 | |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 30 | #include <mach/board.h> |
| 31 | #include <mach/msm_iomap.h> |
Brian Swetland | 9e73c84 | 2007-11-26 04:12:13 -0800 | [diff] [blame] | 32 | |
Brian Swetland | 9e73c84 | 2007-11-26 04:12:13 -0800 | [diff] [blame] | 33 | #include <linux/mtd/nand.h> |
| 34 | #include <linux/mtd/partitions.h> |
| 35 | |
| 36 | static struct resource smc91x_resources[] = { |
| 37 | [0] = { |
| 38 | .start = 0x9C004300, |
| 39 | .end = 0x9C004400, |
| 40 | .flags = IORESOURCE_MEM, |
| 41 | }, |
| 42 | [1] = { |
| 43 | .start = MSM_GPIO_TO_INT(49), |
| 44 | .end = MSM_GPIO_TO_INT(49), |
| 45 | .flags = IORESOURCE_IRQ, |
| 46 | }, |
| 47 | }; |
| 48 | |
| 49 | static struct platform_device smc91x_device = { |
| 50 | .name = "smc91x", |
| 51 | .id = 0, |
| 52 | .num_resources = ARRAY_SIZE(smc91x_resources), |
| 53 | .resource = smc91x_resources, |
| 54 | }; |
| 55 | |
| 56 | static void mddi0_panel_power(int on) |
| 57 | { |
| 58 | } |
| 59 | |
| 60 | static struct msm_mddi_platform_data msm_mddi0_pdata = { |
| 61 | .panel_power = mddi0_panel_power, |
| 62 | .has_vsync_irq = 0, |
| 63 | }; |
| 64 | |
| 65 | static struct platform_device msm_mddi0_device = { |
| 66 | .name = "msm_mddi", |
| 67 | .id = 0, |
| 68 | .dev = { |
| 69 | .platform_data = &msm_mddi0_pdata |
| 70 | }, |
| 71 | }; |
| 72 | |
| 73 | static struct platform_device msm_serial0_device = { |
| 74 | .name = "msm_serial", |
| 75 | .id = 0, |
| 76 | }; |
| 77 | |
| 78 | static struct platform_device *devices[] __initdata = { |
| 79 | &msm_serial0_device, |
| 80 | &msm_mddi0_device, |
| 81 | &smc91x_device, |
| 82 | }; |
| 83 | |
| 84 | extern struct sys_timer msm_timer; |
| 85 | |
| 86 | static void __init halibut_init_irq(void) |
| 87 | { |
| 88 | msm_init_irq(); |
| 89 | } |
| 90 | |
| 91 | static void __init halibut_init(void) |
| 92 | { |
| 93 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
| 94 | msm_add_devices(); |
| 95 | } |
| 96 | |
| 97 | static void __init halibut_map_io(void) |
| 98 | { |
| 99 | msm_map_common_io(); |
| 100 | } |
| 101 | |
| 102 | MACHINE_START(HALIBUT, "Halibut Board (QCT SURF7200A)") |
| 103 | |
| 104 | /* UART for LL DEBUG */ |
| 105 | .phys_io = MSM_UART1_PHYS, |
| 106 | .io_pg_offst = ((MSM_UART1_BASE) >> 18) & 0xfffc, |
| 107 | |
| 108 | .boot_params = 0x10000100, |
| 109 | .map_io = halibut_map_io, |
| 110 | .init_irq = halibut_init_irq, |
| 111 | .init_machine = halibut_init, |
| 112 | .timer = &msm_timer, |
| 113 | MACHINE_END |