mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
ARM: SoC platform updates for 4.17
This release brings up a new platform based on the old ARM9 core: the Nuvoton NPCM is used as a baseboard management controller, competing with the better known ASpeed AST2xx series. Another important change is the addition of ARMv7-A based chips in mach-stm32. The older parts in this platform are ARMv7-M based microcontrollers, now they are expanding to general-purpose workloads. The other changes are the usual defconfig updates to enable additional drivers, lesser bugfixes. The largest updates as often are the ongoing OMAP cleanups, but we also have a number of changes for the older PXA and davinci platforms this time. For the Renesas shmobile/r-car platform, some new infrastructure is needed to make the watchdog work correctly. Supporting Multiprocessing on Allwinner A80 required a significant amount of new code, but is not doing anything unexpected. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJaxibSAAoJEGCrR//JCVInPwcP/2ZdLMXXXaJBM+rCRPhT+vR1 FsKqcTCC5RHbVcKW+N54nmlsqofy2GadlmyfOdrFXtbf+Sm2dRNsDrHDOhvoPp37 fwBd0wGw0PLjNE8SEPp/ldtFe11Dbg0WGBzJ4PAPJgt1W4hvW8//VzVW1XsiRrVc 9SlZ66DwR95UQ5pwy+dfE8f9A/WW4XaMq0UHQ3/deQ/Te/64b/C6CJtT3W73WAlR 83UHgkwq3WvI+hhvg4QX9H0Q6dcK2JLUWsAB0xnZP8Q8t30NdDpl61uZL0A4Mh9Y 38lPhUjPUyUpsGrOttmMEQNzbAk4m/nzQxByYYmhkx3x+mlhjdA9KNavxDYVxXN2 1tzz62wst8pLePqVt2UsFqsaruJGMuTIooOdc5iCjG1c2N2kQGdBsuOvLjYu9kV6 XPTfvvAYkMo9rC0MbdPuobG+h/WrYHuc9SD2Mnt+kNaw1yJL08fWENjSuwP7kheb 2A5jdAFNrGqgcrWMsQOw8eYYC7z7WojkLq0kHrBbwIlVD7KIZurv2fm/iVo4+xPH Gig5HuehMUtVYAf+Q1KWFlqS01fXMErt2pDGI5f1mNumXCB5kdWoSKbU8lOg03f8 ZqBHlfly+QDMOx0qfkxFX+phHPWHTOC+45yHK2Xq+n9urXmQbzYZxTzq5zCu6jcm 4yH0jaykoHODGNLIt50f =HD9V -----END PGP SIGNATURE----- Merge tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC platform updates from Arnd Bergmann: "This release brings up a new platform based on the old ARM9 core: the Nuvoton NPCM is used as a baseboard management controller, competing with the better known ASpeed AST2xx series. Another important change is the addition of ARMv7-A based chips in mach-stm32. The older parts in this platform are ARMv7-M based microcontrollers, now they are expanding to general-purpose workloads. The other changes are the usual defconfig updates to enable additional drivers, lesser bugfixes. The largest updates as often are the ongoing OMAP cleanups, but we also have a number of changes for the older PXA and davinci platforms this time. For the Renesas shmobile/r-car platform, some new infrastructure is needed to make the watchdog work correctly. Supporting Multiprocessing on Allwinner A80 required a significant amount of new code, but is not doing anything unexpected" * tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (179 commits) arm: npcm: modify configuration for the NPCM7xx BMC. MAINTAINERS: update entry for ARM/berlin ARM: omap2: fix am43xx build without L2X0 ARM: davinci: da8xx: simplify CFGCHIP regmap_config ARM: davinci: da8xx: fix oops in USB PHY driver due to stack allocated platform_data ARM: multi_v7_defconfig: add NXP FlexCAN IP support ARM: multi_v7_defconfig: enable thermal driver for i.MX devices ARM: multi_v7_defconfig: add RN5T618 PMIC family support ARM: multi_v7_defconfig: add NXP graphics drivers ARM: multi_v7_defconfig: add GPMI NAND controller support ARM: multi_v7_defconfig: add OCOTP driver for NXP SoCs ARM: multi_v7_defconfig: configure I2C driver built-in arm64: defconfig: add CONFIG_UNIPHIER_THERMAL and CONFIG_SNI_AVE ARM: imx: fix imx6sll-only build ARM: imx: select ARM_CPU_SUSPEND for CPU_IDLE as well ARM: mxs_defconfig: Re-sync defconfig ARM: imx_v4_v5_defconfig: Use the generic fsl-asoc-card driver ARM: imx_v4_v5_defconfig: Re-sync defconfig arm64: defconfig: enable stmmac ethernet to defconfig ARM: EXYNOS: Simplify code in coupled CPU idle hot path ...
This commit is contained in:
commit
167569343f
189 changed files with 4973 additions and 3960 deletions
|
|
@ -23,6 +23,7 @@
|
|||
#include <linux/mutex.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/platform_data/dmtimer-omap.h>
|
||||
#include <linux/platform_data/pwm_omap_dmtimer.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
|
|
@ -37,7 +38,7 @@ struct pwm_omap_dmtimer_chip {
|
|||
struct pwm_chip chip;
|
||||
struct mutex mutex;
|
||||
pwm_omap_dmtimer *dm_timer;
|
||||
struct pwm_omap_dmtimer_pdata *pdata;
|
||||
const struct omap_dm_timer_ops *pdata;
|
||||
struct platform_device *dm_timer_pdev;
|
||||
};
|
||||
|
||||
|
|
@ -242,19 +243,35 @@ static int pwm_omap_dmtimer_probe(struct platform_device *pdev)
|
|||
{
|
||||
struct device_node *np = pdev->dev.of_node;
|
||||
struct device_node *timer;
|
||||
struct platform_device *timer_pdev;
|
||||
struct pwm_omap_dmtimer_chip *omap;
|
||||
struct pwm_omap_dmtimer_pdata *pdata;
|
||||
struct dmtimer_platform_data *timer_pdata;
|
||||
const struct omap_dm_timer_ops *pdata;
|
||||
pwm_omap_dmtimer *dm_timer;
|
||||
u32 v;
|
||||
int status;
|
||||
int ret = 0;
|
||||
|
||||
pdata = dev_get_platdata(&pdev->dev);
|
||||
if (!pdata) {
|
||||
dev_err(&pdev->dev, "Missing dmtimer platform data\n");
|
||||
return -EINVAL;
|
||||
timer = of_parse_phandle(np, "ti,timers", 0);
|
||||
if (!timer)
|
||||
return -ENODEV;
|
||||
|
||||
timer_pdev = of_find_device_by_node(timer);
|
||||
if (!timer_pdev) {
|
||||
dev_err(&pdev->dev, "Unable to find Timer pdev\n");
|
||||
ret = -ENODEV;
|
||||
goto put;
|
||||
}
|
||||
|
||||
if (!pdata->request_by_node ||
|
||||
timer_pdata = dev_get_platdata(&timer_pdev->dev);
|
||||
if (!timer_pdata) {
|
||||
dev_err(&pdev->dev, "dmtimer pdata structure NULL\n");
|
||||
ret = -EINVAL;
|
||||
goto put;
|
||||
}
|
||||
|
||||
pdata = timer_pdata->timer_ops;
|
||||
|
||||
if (!pdata || !pdata->request_by_node ||
|
||||
!pdata->free ||
|
||||
!pdata->enable ||
|
||||
!pdata->disable ||
|
||||
|
|
@ -267,21 +284,26 @@ static int pwm_omap_dmtimer_probe(struct platform_device *pdev)
|
|||
!pdata->set_prescaler ||
|
||||
!pdata->write_counter) {
|
||||
dev_err(&pdev->dev, "Incomplete dmtimer pdata structure\n");
|
||||
return -EINVAL;
|
||||
ret = -EINVAL;
|
||||
goto put;
|
||||
}
|
||||
|
||||
timer = of_parse_phandle(np, "ti,timers", 0);
|
||||
if (!timer)
|
||||
return -ENODEV;
|
||||
|
||||
if (!of_get_property(timer, "ti,timer-pwm", NULL)) {
|
||||
dev_err(&pdev->dev, "Missing ti,timer-pwm capability\n");
|
||||
return -ENODEV;
|
||||
ret = -ENODEV;
|
||||
goto put;
|
||||
}
|
||||
|
||||
dm_timer = pdata->request_by_node(timer);
|
||||
if (!dm_timer)
|
||||
return -EPROBE_DEFER;
|
||||
if (!dm_timer) {
|
||||
ret = -EPROBE_DEFER;
|
||||
goto put;
|
||||
}
|
||||
|
||||
put:
|
||||
of_node_put(timer);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
omap = devm_kzalloc(&pdev->dev, sizeof(*omap), GFP_KERNEL);
|
||||
if (!omap) {
|
||||
|
|
@ -291,13 +313,7 @@ static int pwm_omap_dmtimer_probe(struct platform_device *pdev)
|
|||
|
||||
omap->pdata = pdata;
|
||||
omap->dm_timer = dm_timer;
|
||||
|
||||
omap->dm_timer_pdev = of_find_device_by_node(timer);
|
||||
if (!omap->dm_timer_pdev) {
|
||||
dev_err(&pdev->dev, "Unable to find timer pdev\n");
|
||||
omap->pdata->free(dm_timer);
|
||||
return -EINVAL;
|
||||
}
|
||||
omap->dm_timer_pdev = timer_pdev;
|
||||
|
||||
/*
|
||||
* Ensure that the timer is stopped before we allow PWM core to call
|
||||
|
|
@ -322,11 +338,11 @@ static int pwm_omap_dmtimer_probe(struct platform_device *pdev)
|
|||
|
||||
mutex_init(&omap->mutex);
|
||||
|
||||
status = pwmchip_add(&omap->chip);
|
||||
if (status < 0) {
|
||||
ret = pwmchip_add(&omap->chip);
|
||||
if (ret < 0) {
|
||||
dev_err(&pdev->dev, "failed to register PWM\n");
|
||||
omap->pdata->free(omap->dm_timer);
|
||||
return status;
|
||||
return ret;
|
||||
}
|
||||
|
||||
platform_set_drvdata(pdev, omap);
|
||||
|
|
|
|||
Loading…
Reference in a new issue