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 | |
Brian Swetland | bcc0f6a | 2008-09-10 14:00:53 -0700 | [diff] [blame^] | 36 | #include "devices.h" |
| 37 | |
Brian Swetland | 9e73c84 | 2007-11-26 04:12:13 -0800 | [diff] [blame] | 38 | static struct resource smc91x_resources[] = { |
| 39 | [0] = { |
| 40 | .start = 0x9C004300, |
| 41 | .end = 0x9C004400, |
| 42 | .flags = IORESOURCE_MEM, |
| 43 | }, |
| 44 | [1] = { |
| 45 | .start = MSM_GPIO_TO_INT(49), |
| 46 | .end = MSM_GPIO_TO_INT(49), |
| 47 | .flags = IORESOURCE_IRQ, |
| 48 | }, |
| 49 | }; |
| 50 | |
| 51 | static struct platform_device smc91x_device = { |
| 52 | .name = "smc91x", |
| 53 | .id = 0, |
| 54 | .num_resources = ARRAY_SIZE(smc91x_resources), |
| 55 | .resource = smc91x_resources, |
| 56 | }; |
| 57 | |
Brian Swetland | 9e73c84 | 2007-11-26 04:12:13 -0800 | [diff] [blame] | 58 | static struct platform_device *devices[] __initdata = { |
Brian Swetland | bcc0f6a | 2008-09-10 14:00:53 -0700 | [diff] [blame^] | 59 | &msm_device_uart3, |
| 60 | &msm_device_smd, |
| 61 | &msm_device_nand, |
| 62 | &msm_device_hsusb, |
| 63 | &msm_device_i2c, |
Brian Swetland | 9e73c84 | 2007-11-26 04:12:13 -0800 | [diff] [blame] | 64 | &smc91x_device, |
| 65 | }; |
| 66 | |
| 67 | extern struct sys_timer msm_timer; |
| 68 | |
| 69 | static void __init halibut_init_irq(void) |
| 70 | { |
| 71 | msm_init_irq(); |
| 72 | } |
| 73 | |
| 74 | static void __init halibut_init(void) |
| 75 | { |
| 76 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
Brian Swetland | 9e73c84 | 2007-11-26 04:12:13 -0800 | [diff] [blame] | 77 | } |
| 78 | |
| 79 | static void __init halibut_map_io(void) |
| 80 | { |
| 81 | msm_map_common_io(); |
| 82 | } |
| 83 | |
| 84 | MACHINE_START(HALIBUT, "Halibut Board (QCT SURF7200A)") |
Brian Swetland | 9e73c84 | 2007-11-26 04:12:13 -0800 | [diff] [blame] | 85 | .boot_params = 0x10000100, |
| 86 | .map_io = halibut_map_io, |
| 87 | .init_irq = halibut_init_irq, |
| 88 | .init_machine = halibut_init, |
| 89 | .timer = &msm_timer, |
| 90 | MACHINE_END |