mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
ARM: driver updates for 3.14
Updates of SoC-near drivers and other driver updates that makes more sense to
take through our tree.
The largest part of this is a conversion of device registration for some
renesas shmobile/sh devices over to use resources. This has required
coordination with the corresponding arch/sh changes, and we've agreed
to merge the arch/sh changes through our tree.
Added in this branch is support for Trusted Foundations secure firmware,
which is what is used on many of the commercial Nvidia Tegra products
that are in the market, including the Nvidia Shield. The code is local
to arch/arm at this time since it's uncertain whether it will be shared
with arm64 longer-term, if needed we will refactor later.
A couple of new RTC drivers used on ARM boards, merged through our tree
on request by the RTC maintainer.
... plus a bunch of smaller updates across the board, gpio conversions
for davinci, etc.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQIcBAABAgAGBQJS4ViqAAoJEIwa5zzehBx3m4QP/07VXVE77RFRyly5Bky5AaMY
zo7ZpoJyg/IT9lxtSAQDhbQq49tKZQVS16oJ7LWXzjAyCY9XrVDX2IkcuqudmYSy
Xtx+R0jZGK4czqljgjwdHgNCSwugCmO/kgNY3h8ar53dTmGIFiq5boPeMDizRTGD
g3sgYuQbIqepcHd2jUjJSBXNyvZIlwBJ4wDyZgxRfzyM7unS8T46BpYNJz0esAL+
0DwIk0nv1eJ6LI0aEL+7bgFaitjUNLpcrroToi1IiIEJuTvZY4AuBjAKt5/181zL
i1ugimsHahmbwNclAmUimc0rtW4Nn+YHGa8WpYiQ9O7+kPFsYkfLRplHPOjaUBPz
r76ucgBMGH6i04tvstwlONznO4NhkACWmb4wrfJfRoDTglELLoOd6QGAYKyRublH
SnrKKmuXzBvtmj2zgUU+S0ka9LdYrjzxoSYprrXQpDr89pUs/AZrlAm9yRjQ3hGw
0eL9UsDFtYAQwCQtPvin2bjKRgNNDbgdwNYNbA7n8jvE/uZ4rlYr3Ot+oxdfs75e
K4fY6JwtbZxQVcOU25M3WBYXLl0V61ZISFa16XhYC2hjzgMZ3bfmFUn+TW9C8V4V
03QqtFyT3FP+VfA3QUS3PuBxALT0HWXmDqp0VJc6UCiXX2InWR+uZQp7a30EawOZ
WHLqgf+nT3bD3kfagCZN
=JJlw
-----END PGP SIGNATURE-----
Merge tag 'drivers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM driver updates from Olof Johansson:
"Updates of SoC-near drivers and other driver updates that makes more
sense to take through our tree.
The largest part of this is a conversion of device registration for
some renesas shmobile/sh devices over to use resources. This has
required coordination with the corresponding arch/sh changes, and
we've agreed to merge the arch/sh changes through our tree.
Added in this branch is support for Trusted Foundations secure
firmware, which is what is used on many of the commercial Nvidia Tegra
products that are in the market, including the Nvidia Shield. The
code is local to arch/arm at this time since it's uncertain whether it
will be shared with arm64 longer-term, if needed we will refactor
later.
A couple of new RTC drivers used on ARM boards, merged through our
tree on request by the RTC maintainer.
... plus a bunch of smaller updates across the board, gpio conversions
for davinci, etc"
* tag 'drivers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (45 commits)
watchdog: davinci: rename platform driver to davinci-wdt
tty: serial: Limit msm_serial_hs driver to platforms that use it
mmc: msm_sdcc: Limit driver to platforms that use it
usb: phy: msm: Move mach dependent code to platform data
clk: versatile: fixup IM-PD1 clock implementation
clk: versatile: pass a name to ICST clock provider
ARM: integrator: pass parent IRQ to the SIC
irqchip: versatile FPGA: support cascaded interrupts from DT
gpio: davinci: don't create irq_domain in case of unbanked irqs
gpio: davinci: use chained_irq_enter/chained_irq_exit API
gpio: davinci: add OF support
gpio: davinci: remove unused variable intc_irq_num
gpio: davinci: convert to use irqdomain support.
gpio: introduce GPIO_DAVINCI kconfig option
gpio: davinci: get rid of DAVINCI_N_GPIO
gpio: davinci: use {readl|writel}_relaxed() instead of __raw_*
serial: sh-sci: Add OF support
serial: sh-sci: Add device tree bindings documentation
serial: sh-sci: Remove platform data mapbase and irqs fields
serial: sh-sci: Remove platform data scbrr_algo_id field
...
This commit is contained in:
commit
0ba3307a8e
87 changed files with 2914 additions and 753 deletions
|
|
@ -119,6 +119,7 @@ static const struct clk_ops icst_ops = {
|
|||
|
||||
struct clk *icst_clk_register(struct device *dev,
|
||||
const struct clk_icst_desc *desc,
|
||||
const char *name,
|
||||
void __iomem *base)
|
||||
{
|
||||
struct clk *clk;
|
||||
|
|
@ -130,7 +131,7 @@ struct clk *icst_clk_register(struct device *dev,
|
|||
pr_err("could not allocate ICST clock!\n");
|
||||
return ERR_PTR(-ENOMEM);
|
||||
}
|
||||
init.name = "icst";
|
||||
init.name = name;
|
||||
init.ops = &icst_ops;
|
||||
init.flags = CLK_IS_ROOT;
|
||||
init.parent_names = NULL;
|
||||
|
|
|
|||
|
|
@ -15,4 +15,5 @@ struct clk_icst_desc {
|
|||
|
||||
struct clk *icst_clk_register(struct device *dev,
|
||||
const struct clk_icst_desc *desc,
|
||||
const char *name,
|
||||
void __iomem *base);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Clock driver for the ARM Integrator/IM-PD1 board
|
||||
* Copyright (C) 2012 Linus Walleij
|
||||
* Copyright (C) 2012-2013 Linus Walleij
|
||||
*
|
||||
* 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
|
||||
|
|
@ -18,20 +18,28 @@
|
|||
#include "clk-icst.h"
|
||||
|
||||
struct impd1_clk {
|
||||
struct clk *vcoclk;
|
||||
char *vco1name;
|
||||
struct clk *vco1clk;
|
||||
char *vco2name;
|
||||
struct clk *vco2clk;
|
||||
struct clk *mmciclk;
|
||||
char *uartname;
|
||||
struct clk *uartclk;
|
||||
struct clk_lookup *clks[3];
|
||||
char *spiname;
|
||||
struct clk *spiclk;
|
||||
char *scname;
|
||||
struct clk *scclk;
|
||||
struct clk_lookup *clks[6];
|
||||
};
|
||||
|
||||
/* One entry for each connected IM-PD1 LM */
|
||||
static struct impd1_clk impd1_clks[4];
|
||||
|
||||
/*
|
||||
* There are two VCO's on the IM-PD1 but only one is used by the
|
||||
* kernel, that is why we are only implementing the control of
|
||||
* IMPD1_OSC1 here.
|
||||
* There are two VCO's on the IM-PD1
|
||||
*/
|
||||
|
||||
static const struct icst_params impd1_vco_params = {
|
||||
static const struct icst_params impd1_vco1_params = {
|
||||
.ref = 24000000, /* 24 MHz */
|
||||
.vco_max = ICST525_VCO_MAX_3V,
|
||||
.vco_min = ICST525_VCO_MIN,
|
||||
|
|
@ -44,11 +52,29 @@ static const struct icst_params impd1_vco_params = {
|
|||
};
|
||||
|
||||
static const struct clk_icst_desc impd1_icst1_desc = {
|
||||
.params = &impd1_vco_params,
|
||||
.params = &impd1_vco1_params,
|
||||
.vco_offset = IMPD1_OSC1,
|
||||
.lock_offset = IMPD1_LOCK,
|
||||
};
|
||||
|
||||
static const struct icst_params impd1_vco2_params = {
|
||||
.ref = 24000000, /* 24 MHz */
|
||||
.vco_max = ICST525_VCO_MAX_3V,
|
||||
.vco_min = ICST525_VCO_MIN,
|
||||
.vd_min = 12,
|
||||
.vd_max = 519,
|
||||
.rd_min = 3,
|
||||
.rd_max = 120,
|
||||
.s2div = icst525_s2div,
|
||||
.idx2s = icst525_idx2s,
|
||||
};
|
||||
|
||||
static const struct clk_icst_desc impd1_icst2_desc = {
|
||||
.params = &impd1_vco2_params,
|
||||
.vco_offset = IMPD1_OSC2,
|
||||
.lock_offset = IMPD1_LOCK,
|
||||
};
|
||||
|
||||
/**
|
||||
* integrator_impd1_clk_init() - set up the integrator clock tree
|
||||
* @base: base address of the logic module (LM)
|
||||
|
|
@ -66,16 +92,39 @@ void integrator_impd1_clk_init(void __iomem *base, unsigned int id)
|
|||
}
|
||||
imc = &impd1_clks[id];
|
||||
|
||||
clk = icst_clk_register(NULL, &impd1_icst1_desc, base);
|
||||
imc->vcoclk = clk;
|
||||
imc->vco1name = kasprintf(GFP_KERNEL, "lm%x-vco1", id);
|
||||
clk = icst_clk_register(NULL, &impd1_icst1_desc, imc->vco1name, base);
|
||||
imc->vco1clk = clk;
|
||||
imc->clks[0] = clkdev_alloc(clk, NULL, "lm%x:01000", id);
|
||||
|
||||
/* UART reference clock */
|
||||
clk = clk_register_fixed_rate(NULL, "uartclk", NULL, CLK_IS_ROOT,
|
||||
14745600);
|
||||
/* VCO2 is also called "CLK2" */
|
||||
imc->vco2name = kasprintf(GFP_KERNEL, "lm%x-vco2", id);
|
||||
clk = icst_clk_register(NULL, &impd1_icst2_desc, imc->vco2name, base);
|
||||
imc->vco2clk = clk;
|
||||
|
||||
/* MMCI uses CLK2 right off */
|
||||
imc->clks[1] = clkdev_alloc(clk, NULL, "lm%x:00700", id);
|
||||
|
||||
/* UART reference clock divides CLK2 by a fixed factor 4 */
|
||||
imc->uartname = kasprintf(GFP_KERNEL, "lm%x-uartclk", id);
|
||||
clk = clk_register_fixed_factor(NULL, imc->uartname, imc->vco2name,
|
||||
CLK_IGNORE_UNUSED, 1, 4);
|
||||
imc->uartclk = clk;
|
||||
imc->clks[1] = clkdev_alloc(clk, NULL, "lm%x:00100", id);
|
||||
imc->clks[2] = clkdev_alloc(clk, NULL, "lm%x:00200", id);
|
||||
imc->clks[2] = clkdev_alloc(clk, NULL, "lm%x:00100", id);
|
||||
imc->clks[3] = clkdev_alloc(clk, NULL, "lm%x:00200", id);
|
||||
|
||||
/* SPI PL022 clock divides CLK2 by a fixed factor 64 */
|
||||
imc->spiname = kasprintf(GFP_KERNEL, "lm%x-spiclk", id);
|
||||
clk = clk_register_fixed_factor(NULL, imc->spiname, imc->vco2name,
|
||||
CLK_IGNORE_UNUSED, 1, 64);
|
||||
imc->clks[4] = clkdev_alloc(clk, NULL, "lm%x:00300", id);
|
||||
|
||||
/* Smart Card clock divides CLK2 by a fixed factor 4 */
|
||||
imc->scname = kasprintf(GFP_KERNEL, "lm%x-scclk", id);
|
||||
clk = clk_register_fixed_factor(NULL, imc->scname, imc->vco2name,
|
||||
CLK_IGNORE_UNUSED, 1, 4);
|
||||
imc->scclk = clk;
|
||||
imc->clks[5] = clkdev_alloc(clk, NULL, "lm%x:00600", id);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(imc->clks); i++)
|
||||
clkdev_add(imc->clks[i]);
|
||||
|
|
@ -92,6 +141,13 @@ void integrator_impd1_clk_exit(unsigned int id)
|
|||
|
||||
for (i = 0; i < ARRAY_SIZE(imc->clks); i++)
|
||||
clkdev_drop(imc->clks[i]);
|
||||
clk_unregister(imc->spiclk);
|
||||
clk_unregister(imc->uartclk);
|
||||
clk_unregister(imc->vcoclk);
|
||||
clk_unregister(imc->vco2clk);
|
||||
clk_unregister(imc->vco1clk);
|
||||
kfree(imc->scname);
|
||||
kfree(imc->spiname);
|
||||
kfree(imc->uartname);
|
||||
kfree(imc->vco2name);
|
||||
kfree(imc->vco1name);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ void __init integrator_clk_init(bool is_cp)
|
|||
clk_register_clkdev(clk, NULL, "sp804");
|
||||
|
||||
/* ICST VCO clock used on the Integrator/CP CLCD */
|
||||
clk = icst_clk_register(NULL, &cp_icst_desc,
|
||||
clk = icst_clk_register(NULL, &cp_icst_desc, "icst",
|
||||
__io_address(INTEGRATOR_HDR_BASE));
|
||||
clk_register_clkdev(clk, NULL, "clcd");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -84,9 +84,11 @@ void __init realview_clk_init(void __iomem *sysbase, bool is_pb1176)
|
|||
|
||||
/* ICST VCO clock */
|
||||
if (is_pb1176)
|
||||
clk = icst_clk_register(NULL, &realview_osc0_desc, sysbase);
|
||||
clk = icst_clk_register(NULL, &realview_osc0_desc,
|
||||
"osc0", sysbase);
|
||||
else
|
||||
clk = icst_clk_register(NULL, &realview_osc4_desc, sysbase);
|
||||
clk = icst_clk_register(NULL, &realview_osc4_desc,
|
||||
"osc4", sysbase);
|
||||
|
||||
clk_register_clkdev(clk, NULL, "dev:clcd");
|
||||
clk_register_clkdev(clk, NULL, "issp:clcd");
|
||||
|
|
|
|||
Loading…
Reference in a new issue