Path: blob/master/arch/arm/mach-msm/board-msm8x60.c
10817 views
/* Copyright (c) 2010, 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*/1718#include <linux/kernel.h>19#include <linux/platform_device.h>20#include <linux/io.h>21#include <linux/irq.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>293031static void __init msm8x60_map_io(void)32{33msm_map_msm8x60_io();34}3536static void __init msm8x60_init_irq(void)37{38unsigned int i;3940gic_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);4546/* RUMI does not adhere to GIC spec by enabling STIs by default.47* Enable/clear is supposed to be RO for STIs, but is RW on RUMI.48*/49if (!machine_is_msm8x60_sim())50writel(0x0000FFFF, MSM_QGIC_DIST_BASE + GIC_DIST_ENABLE_SET);5152/* FIXME: Not installing AVS_SVICINT and AVS_SVICINTSWDONE yet53* as they are configured as level, which does not play nice with54* handle_percpu_irq.55*/56for (i = GIC_PPI_START; i < GIC_SPI_START; i++) {57if (i != AVS_SVICINT && i != AVS_SVICINTSWDONE)58irq_set_handler(i, handle_percpu_irq);59}60}6162static void __init msm8x60_init(void)63{64}6566MACHINE_START(MSM8X60_RUMI3, "QCT MSM8X60 RUMI3")67.map_io = msm8x60_map_io,68.init_irq = msm8x60_init_irq,69.init_machine = msm8x60_init,70.timer = &msm_timer,71MACHINE_END7273MACHINE_START(MSM8X60_SURF, "QCT MSM8X60 SURF")74.map_io = msm8x60_map_io,75.init_irq = msm8x60_init_irq,76.init_machine = msm8x60_init,77.timer = &msm_timer,78MACHINE_END7980MACHINE_START(MSM8X60_SIM, "QCT MSM8X60 SIMULATOR")81.map_io = msm8x60_map_io,82.init_irq = msm8x60_init_irq,83.init_machine = msm8x60_init,84.timer = &msm_timer,85MACHINE_END8687MACHINE_START(MSM8X60_FFA, "QCT MSM8X60 FFA")88.map_io = msm8x60_map_io,89.init_irq = msm8x60_init_irq,90.init_machine = msm8x60_init,91.timer = &msm_timer,92MACHINE_END939495