Path: blob/master/arch/arm/mach-msm/board-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*16*/17#include <linux/kernel.h>18#include <linux/platform_device.h>19#include <linux/io.h>20#include <linux/irq.h>21#include <linux/clkdev.h>2223#include <asm/mach-types.h>24#include <asm/mach/arch.h>25#include <asm/hardware/gic.h>2627#include <mach/board.h>28#include <mach/msm_iomap.h>2930#include "devices.h"3132static void __init msm8960_map_io(void)33{34msm_map_msm8960_io();35}3637static void __init msm8960_init_irq(void)38{39unsigned int i;40gic_init(0, GIC_PPI_START, MSM_QGIC_DIST_BASE,41(void *)MSM_QGIC_CPU_BASE);4243/* Edge trigger PPIs except AVS_SVICINT and AVS_SVICINTSWDONE */44writel(0xFFFFD7FF, MSM_QGIC_DIST_BASE + GIC_DIST_CONFIG + 4);4546if (machine_is_msm8960_rumi3())47writel(0x0000FFFF, MSM_QGIC_DIST_BASE + GIC_DIST_ENABLE_SET);4849/* FIXME: Not installing AVS_SVICINT and AVS_SVICINTSWDONE yet50* as they are configured as level, which does not play nice with51* handle_percpu_irq.52*/53for (i = GIC_PPI_START; i < GIC_SPI_START; i++) {54if (i != AVS_SVICINT && i != AVS_SVICINTSWDONE)55irq_set_handler(i, handle_percpu_irq);56}57}5859static struct platform_device *sim_devices[] __initdata = {60&msm8960_device_uart_gsbi2,61};6263static struct platform_device *rumi3_devices[] __initdata = {64&msm8960_device_uart_gsbi5,65};6667static void __init msm8960_sim_init(void)68{69platform_add_devices(sim_devices, ARRAY_SIZE(sim_devices));70}7172static void __init msm8960_rumi3_init(void)73{74platform_add_devices(rumi3_devices, ARRAY_SIZE(rumi3_devices));75}7677MACHINE_START(MSM8960_SIM, "QCT MSM8960 SIMULATOR")78.map_io = msm8960_map_io,79.init_irq = msm8960_init_irq,80.timer = &msm_timer,81.init_machine = msm8960_sim_init,82MACHINE_END8384MACHINE_START(MSM8960_RUMI3, "QCT MSM8960 RUMI3")85.map_io = msm8960_map_io,86.init_irq = msm8960_init_irq,87.timer = &msm_timer,88.init_machine = msm8960_rumi3_init,89MACHINE_END90919293