Loading arch/arm/mach-msm/board-ferrum.c 0 → 100644 +89 −0 Original line number Diff line number Diff line /* 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 msmferrum_dt_reserve(void) { of_scan_flat_dt(dt_scan_for_memory_reserve, NULL); } static void __init msmferrum_map_io(void) { msm_map_msmferrum_io(); } static struct of_dev_auxdata msmferrum_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 msmferrum_add_drivers(void) { msm_smd_init(); msm_rpm_driver_init(); msm_spm_device_init(); msm_pm_sleep_status_init(); } static void __init msmferrum_init(void) { struct of_dev_auxdata *adata = msmferrum_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__); msmferrum_add_drivers(); } static const char *msmferrum_dt_match[] __initconst = { "qcom,msmferrum", NULL }; DT_MACHINE_START(MSMFERRUM_DT, "Qualcomm Technologies, Inc. MSM FERRUM (Flattened Device Tree)") .map_io = msmferrum_map_io, .init_machine = msmferrum_init, .dt_compat = msmferrum_dt_match, .reserve = msmferrum_dt_reserve, .smp = &msm8916_smp_ops, MACHINE_END arch/arm/mach-msm/include/mach/board.h +1 −0 Original line number Diff line number Diff line Loading @@ -646,6 +646,7 @@ void apq8084_init_gpiomux(void); void msm9625_init_gpiomux(void); void mdm9630_init_gpiomux(void); void msm_map_msm8916_io(void); void msm_map_msmferrum_io(void); void msm_map_msm8226_io(void); void msm8226_init_irq(void); void msm8226_init_gpiomux(void); Loading arch/arm/mach-msm/include/mach/msm_iomap-ferrum.h 0 → 100644 +33 −0 Original line number Diff line number Diff line /* 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. */ #ifndef __ASM_ARCH_MSM_IOMAP_FERRUM_H #define __ASM_ARCH_MSM_IOMAP_FERRUM_H /* Physical base address and size of peripherals. * Ordered by the virtual base addresses they will be mapped at. * * If you add or remove entries here, you'll want to edit the * io desc array in arch/arm/mach-msm/io.c to reflect your * changes. * */ #define MSMFERRUM_APCS_GCC_PHYS 0xB011000 #define MSMFERRUM_APCS_GCC_SIZE SZ_4K #ifdef CONFIG_DEBUG_MSMFERRUM_UART #define MSM_DEBUG_UART_BASE IOMEM(0xFA0B0000) #define MSM_DEBUG_UART_PHYS 0x78B0000 #endif #endif arch/arm/mach-msm/include/mach/msm_iomap.h +1 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,7 @@ #include "msm_iomap-8974.h" #include "msm_iomap-8084.h" #include "msm_iomap-8916.h" #include "msm_iomap-ferrum.h" #include "msm_iomap-8226.h" #include "msm_iomap-8610.h" #include "msm_iomap-9630.h" Loading arch/arm/mach-msm/io.c +14 −0 Original line number Diff line number Diff line Loading @@ -103,6 +103,20 @@ void __init msm_map_mdm9630_io(void) } #endif /* CONFIG_ARCH_MDM9630 */ #ifdef CONFIG_ARCH_MSMFERRUM static struct map_desc msmferrum_io_desc[] __initdata = { MSM_CHIP_DEVICE(APCS_GCC, MSMFERRUM), #ifdef CONFIG_DEBUG_MSMFERRUM_UART MSM_DEVICE(DEBUG_UART), #endif }; void __init msm_map_msmferrum_io(void) { iotable_init(msmferrum_io_desc, ARRAY_SIZE(msmferrum_io_desc)); } #endif /* CONFIG_ARCH_MSMFERRUM */ #ifdef CONFIG_ARCH_MSM8916 static struct map_desc msm8916_io_desc[] __initdata = { MSM_CHIP_DEVICE(APCS_GCC, MSM8916), Loading Loading
arch/arm/mach-msm/board-ferrum.c 0 → 100644 +89 −0 Original line number Diff line number Diff line /* 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 msmferrum_dt_reserve(void) { of_scan_flat_dt(dt_scan_for_memory_reserve, NULL); } static void __init msmferrum_map_io(void) { msm_map_msmferrum_io(); } static struct of_dev_auxdata msmferrum_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 msmferrum_add_drivers(void) { msm_smd_init(); msm_rpm_driver_init(); msm_spm_device_init(); msm_pm_sleep_status_init(); } static void __init msmferrum_init(void) { struct of_dev_auxdata *adata = msmferrum_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__); msmferrum_add_drivers(); } static const char *msmferrum_dt_match[] __initconst = { "qcom,msmferrum", NULL }; DT_MACHINE_START(MSMFERRUM_DT, "Qualcomm Technologies, Inc. MSM FERRUM (Flattened Device Tree)") .map_io = msmferrum_map_io, .init_machine = msmferrum_init, .dt_compat = msmferrum_dt_match, .reserve = msmferrum_dt_reserve, .smp = &msm8916_smp_ops, MACHINE_END
arch/arm/mach-msm/include/mach/board.h +1 −0 Original line number Diff line number Diff line Loading @@ -646,6 +646,7 @@ void apq8084_init_gpiomux(void); void msm9625_init_gpiomux(void); void mdm9630_init_gpiomux(void); void msm_map_msm8916_io(void); void msm_map_msmferrum_io(void); void msm_map_msm8226_io(void); void msm8226_init_irq(void); void msm8226_init_gpiomux(void); Loading
arch/arm/mach-msm/include/mach/msm_iomap-ferrum.h 0 → 100644 +33 −0 Original line number Diff line number Diff line /* 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. */ #ifndef __ASM_ARCH_MSM_IOMAP_FERRUM_H #define __ASM_ARCH_MSM_IOMAP_FERRUM_H /* Physical base address and size of peripherals. * Ordered by the virtual base addresses they will be mapped at. * * If you add or remove entries here, you'll want to edit the * io desc array in arch/arm/mach-msm/io.c to reflect your * changes. * */ #define MSMFERRUM_APCS_GCC_PHYS 0xB011000 #define MSMFERRUM_APCS_GCC_SIZE SZ_4K #ifdef CONFIG_DEBUG_MSMFERRUM_UART #define MSM_DEBUG_UART_BASE IOMEM(0xFA0B0000) #define MSM_DEBUG_UART_PHYS 0x78B0000 #endif #endif
arch/arm/mach-msm/include/mach/msm_iomap.h +1 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,7 @@ #include "msm_iomap-8974.h" #include "msm_iomap-8084.h" #include "msm_iomap-8916.h" #include "msm_iomap-ferrum.h" #include "msm_iomap-8226.h" #include "msm_iomap-8610.h" #include "msm_iomap-9630.h" Loading
arch/arm/mach-msm/io.c +14 −0 Original line number Diff line number Diff line Loading @@ -103,6 +103,20 @@ void __init msm_map_mdm9630_io(void) } #endif /* CONFIG_ARCH_MDM9630 */ #ifdef CONFIG_ARCH_MSMFERRUM static struct map_desc msmferrum_io_desc[] __initdata = { MSM_CHIP_DEVICE(APCS_GCC, MSMFERRUM), #ifdef CONFIG_DEBUG_MSMFERRUM_UART MSM_DEVICE(DEBUG_UART), #endif }; void __init msm_map_msmferrum_io(void) { iotable_init(msmferrum_io_desc, ARRAY_SIZE(msmferrum_io_desc)); } #endif /* CONFIG_ARCH_MSMFERRUM */ #ifdef CONFIG_ARCH_MSM8916 static struct map_desc msm8916_io_desc[] __initdata = { MSM_CHIP_DEVICE(APCS_GCC, MSM8916), Loading