Path: blob/master/arch/arm/mach-msm/devices-msm8960.c
10817 views
/* Copyright (c) 2011, Code Aurora Forum. All rights reserved.1*2* This program is free software; you can redistribute it and/or modify3* it under the terms of the GNU General Public License version 2 and4* only version 2 as published by the Free Software Foundation.5*6* This program is distributed in the hope that it will be useful,7* but WITHOUT ANY WARRANTY; without even the implied warranty of8* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the9* GNU General Public License for more details.10*11* You should have received a copy of the GNU General Public License12* along with this program; if not, write to the Free Software13* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA14* 02110-1301, USA.15*/1617#include <linux/kernel.h>18#include <linux/platform_device.h>1920#include <linux/dma-mapping.h>21#include <mach/irqs-8960.h>22#include <mach/board.h>2324#include "devices.h"2526#define MSM_GSBI2_PHYS 0x1610000027#define MSM_UART2DM_PHYS (MSM_GSBI2_PHYS + 0x40000)2829#define MSM_GSBI5_PHYS 0x1640000030#define MSM_UART5DM_PHYS (MSM_GSBI5_PHYS + 0x40000)3132static struct resource resources_uart_gsbi2[] = {33{34.start = GSBI2_UARTDM_IRQ,35.end = GSBI2_UARTDM_IRQ,36.flags = IORESOURCE_IRQ,37},38{39.start = MSM_UART2DM_PHYS,40.end = MSM_UART2DM_PHYS + PAGE_SIZE - 1,41.name = "uart_resource",42.flags = IORESOURCE_MEM,43},44{45.start = MSM_GSBI2_PHYS,46.end = MSM_GSBI2_PHYS + PAGE_SIZE - 1,47.name = "gsbi_resource",48.flags = IORESOURCE_MEM,49},50};5152struct platform_device msm8960_device_uart_gsbi2 = {53.name = "msm_serial",54.id = 0,55.num_resources = ARRAY_SIZE(resources_uart_gsbi2),56.resource = resources_uart_gsbi2,57};5859static struct resource resources_uart_gsbi5[] = {60{61.start = GSBI5_UARTDM_IRQ,62.end = GSBI5_UARTDM_IRQ,63.flags = IORESOURCE_IRQ,64},65{66.start = MSM_UART5DM_PHYS,67.end = MSM_UART5DM_PHYS + PAGE_SIZE - 1,68.name = "uart_resource",69.flags = IORESOURCE_MEM,70},71{72.start = MSM_GSBI5_PHYS,73.end = MSM_GSBI5_PHYS + PAGE_SIZE - 1,74.name = "gsbi_resource",75.flags = IORESOURCE_MEM,76},77};7879struct platform_device msm8960_device_uart_gsbi5 = {80.name = "msm_serial",81.id = 0,82.num_resources = ARRAY_SIZE(resources_uart_gsbi5),83.resource = resources_uart_gsbi5,84};858687