mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
ARM: SoC platform changes for 3.19
New and updated SoC support, notable changes include:
* bcm: brcmstb SMP support
* bcm: initial iproc/cygnus support
* exynos: Exynos4415 SoC support
* exynos: PMU and suspend support for Exynos5420
* exynos: PMU support for Exynos3250
* exynos: pm related maintenance
* imx: new LS1021A SoC support
* imx: vybrid 610 global timer support
* integrator: convert to using multiplatform configuration
* mediatek: earlyprintk support for mt8127/mt8135
* meson: meson8 soc and l2 cache controller support
* mvebu: Armada 38x CPU hotplug support
* mvebu: drop support for prerelease Armada 375 Z1 stepping
* mvebu: extended suspend support, now works on Armada 370/XP
* omap: hwmod related maintenance
* omap: prcm cleanup
* pxa: initial pxa27x DT handling
* rockchip: SMP support for rk3288
* rockchip: add cpu frequency scaling support
* shmobile: r8a7740 power domain support
* shmobile: various small restart, timer, pci apmu changes
* sunxi: Allwinner A80 (sun9i) earlyprintk support
* ux500: power domain support
Overall, a significant chunk of changes, coming mostly from
the usual suspects: omap, shmobile, samsung and mvebu, all of
which already contain a lot of platform specific code in
arch/arm.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iQIVAwUAVIcjyGCrR//JCVInAQJJCRAA1Tm+HZGiAiTvXEAcm/T9tIA08uqtawHt
cqyEAUyrnE8QxE4EhUd2pTw4EunVusqKF5EsDxOzw7b3ukUdLAWZE7bqBOSIJLqn
hrfsQQ8dXLbyC7T/CHPnBVeM+pn9LiIc9qzpZ0YToiMnHBBI4vKFQntBjd31yoRE
hN08I6AmDjQolOzzlqR1fuM0uZaKiHIcytdauTt3Vfqgg7FTHcTy3u1kClHTR1Lp
m/KuDothGpR5OKjSnUQz7EO5V3KJEnaKey8z2xM1a7DLLAvJ6r2+DUaDopv9Dbz1
W/V3H7fi5tLvillVa8xmlmzqWZbPc1xw8MWqvHZSWIMRZqloAHpC1VWKn0ZuH4SW
5Bj4ubSrpYjJxjKYfrxtjmuzru3A2jWBNTSP5A4nsny0C3AUsXkfRmRS0VNdegF8
sUdQ1MF8vEMpQT3QPH88+ccFHeIgqbcayhKqLPf7r8q0kwlym5N7Y2amU2A/O6qz
+324r+yzfSA70VgJZ5EhXxWVDOPB4Lc8EtoWnH6T/kjncIMwzEsbEbyB3X1OaREW
pVn3PNo06VjHLYoiHX+8G99pOFR/JZvaQs6jGCXLs+Orjp5WfP+kafkWqcB5GAKU
Pfd3AQsl6rKAITdu0XsTdPiICNS4CmBiWYPepQsTa3pQaNgB7fwZNQKelNRIdGc+
dF1lnQ7CXLQ=
=lFoH
-----END PGP SIGNATURE-----
Merge tag 'soc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC platform changes from Arnd Bergmann:
"New and updated SoC support, notable changes include:
- bcm:
brcmstb SMP support
initial iproc/cygnus support
- exynos:
Exynos4415 SoC support
PMU and suspend support for Exynos5420
PMU support for Exynos3250
pm related maintenance
- imx:
new LS1021A SoC support
vybrid 610 global timer support
- integrator:
convert to using multiplatform configuration
- mediatek:
earlyprintk support for mt8127/mt8135
- meson:
meson8 soc and l2 cache controller support
- mvebu:
Armada 38x CPU hotplug support
drop support for prerelease Armada 375 Z1 stepping
extended suspend support, now works on Armada 370/XP
- omap:
hwmod related maintenance
prcm cleanup
- pxa:
initial pxa27x DT handling
- rockchip:
SMP support for rk3288
add cpu frequency scaling support
- shmobile:
r8a7740 power domain support
various small restart, timer, pci apmu changes
- sunxi:
Allwinner A80 (sun9i) earlyprintk support
- ux500:
power domain support
Overall, a significant chunk of changes, coming mostly from the usual
suspects: omap, shmobile, samsung and mvebu, all of which already
contain a lot of platform specific code in arch/arm"
* tag 'soc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (187 commits)
ARM: mvebu: use the cpufreq-dt platform_data for independent clocks
soc: integrator: Add terminating entry for integrator_cm_match
ARM: mvebu: add SDRAM controller description for Armada XP
ARM: mvebu: adjust mbus controller description on Armada 370/XP
ARM: mvebu: add suspend/resume DT information for Armada XP GP
ARM: mvebu: synchronize secondary CPU clocks on resume
ARM: mvebu: make sure MMU is disabled in armada_370_xp_cpu_resume
ARM: mvebu: Armada XP GP specific suspend/resume code
ARM: mvebu: reserve the first 10 KB of each memory bank for suspend/resume
ARM: mvebu: implement suspend/resume support for Armada XP
clk: mvebu: add suspend/resume for gatable clocks
bus: mvebu-mbus: provide a mechanism to save SDRAM window configuration
bus: mvebu-mbus: suspend/resume support
clocksource: time-armada-370-xp: add suspend/resume support
irqchip: armada-370-xp: Add suspend/resume support
ARM: add lolevel debug support for asm9260
ARM: add mach-asm9260
ARM: EXYNOS: use u8 for val[] in struct exynos_pmu_conf
power: reset: imx-snvs-poweroff: add power off driver for i.mx6
ARM: imx: temporarily remove CONFIG_SOC_FSL from LS1021A
...
This commit is contained in:
commit
6cd94d5e57
214 changed files with 6329 additions and 2353 deletions
|
|
@ -1,6 +1,15 @@
|
|||
#
|
||||
# ARM Versatile SoC drivers
|
||||
#
|
||||
config SOC_INTEGRATOR_CM
|
||||
bool "SoC bus device for the ARM Integrator platform core modules"
|
||||
depends on ARCH_INTEGRATOR
|
||||
select SOC_BUS
|
||||
help
|
||||
Include support for the SoC bus on the ARM Integrator platform
|
||||
core modules providing some sysfs information about the ASIC
|
||||
variant.
|
||||
|
||||
config SOC_REALVIEW
|
||||
bool "SoC bus device for the ARM RealView platforms"
|
||||
depends on ARCH_REALVIEW
|
||||
|
|
|
|||
|
|
@ -1 +1,2 @@
|
|||
obj-$(CONFIG_SOC_INTEGRATOR_CM) += soc-integrator.o
|
||||
obj-$(CONFIG_SOC_REALVIEW) += soc-realview.o
|
||||
|
|
|
|||
155
drivers/soc/versatile/soc-integrator.c
Normal file
155
drivers/soc/versatile/soc-integrator.c
Normal file
|
|
@ -0,0 +1,155 @@
|
|||
/*
|
||||
* Copyright (C) 2014 Linaro Ltd.
|
||||
*
|
||||
* Author: Linus Walleij <linus.walleij@linaro.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
*/
|
||||
#include <linux/init.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/sys_soc.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/mfd/syscon.h>
|
||||
#include <linux/regmap.h>
|
||||
#include <linux/of.h>
|
||||
|
||||
#define INTEGRATOR_HDR_ID_OFFSET 0x00
|
||||
|
||||
static u32 integrator_coreid;
|
||||
|
||||
static const struct of_device_id integrator_cm_match[] = {
|
||||
{ .compatible = "arm,core-module-integrator", },
|
||||
{ }
|
||||
};
|
||||
|
||||
static const char *integrator_arch_str(u32 id)
|
||||
{
|
||||
switch ((id >> 16) & 0xff) {
|
||||
case 0x00:
|
||||
return "ASB little-endian";
|
||||
case 0x01:
|
||||
return "AHB little-endian";
|
||||
case 0x03:
|
||||
return "AHB-Lite system bus, bi-endian";
|
||||
case 0x04:
|
||||
return "AHB";
|
||||
case 0x08:
|
||||
return "AHB system bus, ASB processor bus";
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
}
|
||||
|
||||
static const char *integrator_fpga_str(u32 id)
|
||||
{
|
||||
switch ((id >> 12) & 0xf) {
|
||||
case 0x01:
|
||||
return "XC4062";
|
||||
case 0x02:
|
||||
return "XC4085";
|
||||
case 0x03:
|
||||
return "XVC600";
|
||||
case 0x04:
|
||||
return "EPM7256AE (Altera PLD)";
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
}
|
||||
|
||||
static ssize_t integrator_get_manf(struct device *dev,
|
||||
struct device_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
return sprintf(buf, "%02x\n", integrator_coreid >> 24);
|
||||
}
|
||||
|
||||
static struct device_attribute integrator_manf_attr =
|
||||
__ATTR(manufacturer, S_IRUGO, integrator_get_manf, NULL);
|
||||
|
||||
static ssize_t integrator_get_arch(struct device *dev,
|
||||
struct device_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
return sprintf(buf, "%s\n", integrator_arch_str(integrator_coreid));
|
||||
}
|
||||
|
||||
static struct device_attribute integrator_arch_attr =
|
||||
__ATTR(arch, S_IRUGO, integrator_get_arch, NULL);
|
||||
|
||||
static ssize_t integrator_get_fpga(struct device *dev,
|
||||
struct device_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
return sprintf(buf, "%s\n", integrator_fpga_str(integrator_coreid));
|
||||
}
|
||||
|
||||
static struct device_attribute integrator_fpga_attr =
|
||||
__ATTR(fpga, S_IRUGO, integrator_get_fpga, NULL);
|
||||
|
||||
static ssize_t integrator_get_build(struct device *dev,
|
||||
struct device_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
return sprintf(buf, "%02x\n", (integrator_coreid >> 4) & 0xFF);
|
||||
}
|
||||
|
||||
static struct device_attribute integrator_build_attr =
|
||||
__ATTR(build, S_IRUGO, integrator_get_build, NULL);
|
||||
|
||||
static int __init integrator_soc_init(void)
|
||||
{
|
||||
static struct regmap *syscon_regmap;
|
||||
struct soc_device *soc_dev;
|
||||
struct soc_device_attribute *soc_dev_attr;
|
||||
struct device_node *np;
|
||||
struct device *dev;
|
||||
u32 val;
|
||||
int ret;
|
||||
|
||||
np = of_find_matching_node(NULL, integrator_cm_match);
|
||||
if (!np)
|
||||
return -ENODEV;
|
||||
|
||||
syscon_regmap = syscon_node_to_regmap(np);
|
||||
if (IS_ERR(syscon_regmap))
|
||||
return PTR_ERR(syscon_regmap);
|
||||
|
||||
ret = regmap_read(syscon_regmap, INTEGRATOR_HDR_ID_OFFSET,
|
||||
&val);
|
||||
if (ret)
|
||||
return -ENODEV;
|
||||
integrator_coreid = val;
|
||||
|
||||
soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL);
|
||||
if (!soc_dev_attr)
|
||||
return -ENOMEM;
|
||||
|
||||
soc_dev_attr->soc_id = "Integrator";
|
||||
soc_dev_attr->machine = "Integrator";
|
||||
soc_dev_attr->family = "Versatile";
|
||||
soc_dev = soc_device_register(soc_dev_attr);
|
||||
if (IS_ERR(soc_dev)) {
|
||||
kfree(soc_dev_attr);
|
||||
return -ENODEV;
|
||||
}
|
||||
dev = soc_device_to_device(soc_dev);
|
||||
|
||||
device_create_file(dev, &integrator_manf_attr);
|
||||
device_create_file(dev, &integrator_arch_attr);
|
||||
device_create_file(dev, &integrator_fpga_attr);
|
||||
device_create_file(dev, &integrator_build_attr);
|
||||
|
||||
dev_info(dev, "Detected ARM core module:\n");
|
||||
dev_info(dev, " Manufacturer: %02x\n", (val >> 24));
|
||||
dev_info(dev, " Architecture: %s\n", integrator_arch_str(val));
|
||||
dev_info(dev, " FPGA: %s\n", integrator_fpga_str(val));
|
||||
dev_info(dev, " Build: %02x\n", (val >> 4) & 0xFF);
|
||||
dev_info(dev, " Rev: %c\n", ('A' + (val & 0x03)));
|
||||
|
||||
return 0;
|
||||
}
|
||||
device_initcall(integrator_soc_init);
|
||||
Loading…
Reference in a new issue