android_kernel_lge_bullhead/arch/arm/mach-msm/board-8909.c

90 lines
2.4 KiB
C

/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include <linux/kernel.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_platform.h>
#include <linux/of_fdt.h>
#include <linux/of_irq.h>
#include <asm/mach/arch.h>
#include <soc/qcom/socinfo.h>
#include <mach/board.h>
#include <mach/msm_memtypes.h>
#include <soc/qcom/rpm-smd.h>
#include <soc/qcom/smd.h>
#include <soc/qcom/smem.h>
#include <soc/qcom/spm.h>
#include <soc/qcom/pm.h>
#include "board-dt.h"
#include "platsmp.h"
static void __init msm8909_dt_reserve(void)
{
of_scan_flat_dt(dt_scan_for_memory_reserve, NULL);
}
static void __init msm8909_map_io(void)
{
msm_map_msm8909_io();
}
static struct of_dev_auxdata msm8909_auxdata_lookup[] __initdata = {
{}
};
/*
* Used to satisfy dependencies for devices that need to be
* run early or in a particular order. Most likely your device doesn't fall
* into this category, and thus the driver should not be added here. The
* EPROBE_DEFER can satisfy most dependency problems.
*/
void __init msm8909_add_drivers(void)
{
msm_smd_init();
msm_rpm_driver_init();
msm_spm_device_init();
msm_pm_sleep_status_init();
}
static void __init msm8909_init(void)
{
struct of_dev_auxdata *adata = msm8909_auxdata_lookup;
/*
* populate devices from DT first so smem probe will get called as part
* of msm_smem_init. socinfo_init needs smem support so call
* msm_smem_init before it.
*/
of_platform_populate(NULL, of_default_bus_match_table, adata, NULL);
msm_smem_init();
if (socinfo_init() < 0)
pr_err("%s: socinfo_init() failed\n", __func__);
msm8909_add_drivers();
}
static const char *msm8909_dt_match[] __initconst = {
"qcom,msm8909",
NULL
};
DT_MACHINE_START(MSM8909_DT,
"Qualcomm Technologies, Inc. MSM 8909 (Flattened Device Tree)")
.map_io = msm8909_map_io,
.init_machine = msm8909_init,
.dt_compat = msm8909_dt_match,
.reserve = msm8909_dt_reserve,
.smp = &msm8916_smp_ops,
MACHINE_END