Skip to content

Commit b0189cd

Browse files
committed
Merge branch 'next/devel2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc
* 'next/devel2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc: (47 commits) OMAP: Add debugfs node to show the summary of all clocks OMAP2+: hwmod: Follow the recommended PRCM module enable sequence OMAP2+: clock: allow per-SoC clock init code to prevent clockdomain calls from clock code OMAP2+: clockdomain: Add per clkdm lock to prevent concurrent state programming OMAP2+: PM: idle clkdms only if already in idle OMAP2+: clockdomain: add clkdm_in_hwsup() OMAP2+: clockdomain: Add 2 APIs to control clockdomain from hwmod framework OMAP: clockdomain: Remove redundant call to pwrdm_wait_transition() OMAP4: hwmod: Introduce the module control in hwmod control OMAP4: cm: Add two new APIs for modulemode control OMAP4: hwmod data: Add modulemode entry in omap_hwmod structure OMAP4: hwmod data: Add PRM context register offset OMAP4: prm: Remove deprecated functions OMAP4: prm: Replace warm reset API with the offset based version OMAP4: hwmod: Replace RSTCTRL absolute address with offset macros OMAP: hwmod: Wait the idle status to be disabled OMAP4: hwmod: Replace CLKCTRL absolute address with offset macros OMAP2+: hwmod: Init clkdm field at boot time OMAP4: hwmod data: Add clock domain attribute OMAP4: clock data: Add missing divider selection for auxclks ...
2 parents 69f1d1a + bc574e1 commit b0189cd

51 files changed

Lines changed: 3575 additions & 1380 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎arch/arm/mach-omap2/board-4430sdp.c‎

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,11 +345,40 @@ static struct platform_device sdp4430_lcd_device = {
345345
.id = -1,
346346
};
347347

348+
static struct regulator_consumer_supply sdp4430_vbat_supply[] = {
349+
REGULATOR_SUPPLY("vddvibl", "twl6040-vibra"),
350+
REGULATOR_SUPPLY("vddvibr", "twl6040-vibra"),
351+
};
352+
353+
static struct regulator_init_data sdp4430_vbat_data = {
354+
.constraints = {
355+
.always_on = 1,
356+
},
357+
.num_consumer_supplies = ARRAY_SIZE(sdp4430_vbat_supply),
358+
.consumer_supplies = sdp4430_vbat_supply,
359+
};
360+
361+
static struct fixed_voltage_config sdp4430_vbat_pdata = {
362+
.supply_name = "VBAT",
363+
.microvolts = 3750000,
364+
.init_data = &sdp4430_vbat_data,
365+
.gpio = -EINVAL,
366+
};
367+
368+
static struct platform_device sdp4430_vbat = {
369+
.name = "reg-fixed-voltage",
370+
.id = -1,
371+
.dev = {
372+
.platform_data = &sdp4430_vbat_pdata,
373+
},
374+
};
375+
348376
static struct platform_device *sdp4430_devices[] __initdata = {
349377
&sdp4430_lcd_device,
350378
&sdp4430_gpio_keys_device,
351379
&sdp4430_leds_gpio,
352380
&sdp4430_leds_pwm,
381+
&sdp4430_vbat,
353382
};
354383

355384
static struct omap_lcd_config sdp4430_lcd_config __initdata = {
@@ -505,7 +534,33 @@ static struct regulator_init_data sdp4430_vusim = {
505534
},
506535
};
507536

537+
static struct twl4030_codec_data twl6040_codec = {
538+
/* single-step ramp for headset and handsfree */
539+
.hs_left_step = 0x0f,
540+
.hs_right_step = 0x0f,
541+
.hf_left_step = 0x1d,
542+
.hf_right_step = 0x1d,
543+
};
544+
545+
static struct twl4030_vibra_data twl6040_vibra = {
546+
.vibldrv_res = 8,
547+
.vibrdrv_res = 3,
548+
.viblmotor_res = 10,
549+
.vibrmotor_res = 10,
550+
.vddvibl_uV = 0, /* fixed volt supply - VBAT */
551+
.vddvibr_uV = 0, /* fixed volt supply - VBAT */
552+
};
553+
554+
static struct twl4030_audio_data twl6040_audio = {
555+
.codec = &twl6040_codec,
556+
.vibra = &twl6040_vibra,
557+
.audpwron_gpio = 127,
558+
.naudint_irq = OMAP44XX_IRQ_SYS_2N,
559+
.irq_base = TWL6040_CODEC_IRQ_BASE,
560+
};
561+
508562
static struct twl4030_platform_data sdp4430_twldata = {
563+
.audio = &twl6040_audio,
509564
/* Regulators */
510565
.vusim = &sdp4430_vusim,
511566
.vaux1 = &sdp4430_vaux1,

‎arch/arm/mach-omap2/board-rx51-peripherals.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -864,11 +864,11 @@ static struct twl4030_power_data rx51_t2scripts_data __initdata = {
864864
.resource_config = twl4030_rconfig,
865865
};
866866

867-
struct twl4030_codec_vibra_data rx51_vibra_data __initdata = {
867+
struct twl4030_vibra_data rx51_vibra_data __initdata = {
868868
.coexist = 0,
869869
};
870870

871-
struct twl4030_codec_data rx51_codec_data __initdata = {
871+
struct twl4030_audio_data rx51_audio_data __initdata = {
872872
.audio_mclk = 26000000,
873873
.vibra = &rx51_vibra_data,
874874
};
@@ -878,7 +878,7 @@ static struct twl4030_platform_data rx51_twldata __initdata = {
878878
.gpio = &rx51_gpio_data,
879879
.keypad = &rx51_kp_data,
880880
.power = &rx51_t2scripts_data,
881-
.codec = &rx51_codec_data,
881+
.audio = &rx51_audio_data,
882882

883883
.vaux1 = &rx51_vaux1,
884884
.vaux2 = &rx51_vaux2,

‎arch/arm/mach-omap2/board-zoom-peripherals.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -274,12 +274,12 @@ static int __init omap_i2c_init(void)
274274
TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
275275

276276
if (machine_is_omap_zoom2()) {
277-
struct twl4030_codec_audio_data *audio_data;
278-
audio_data = zoom_twldata.codec->audio;
277+
struct twl4030_codec_data *codec_data;
278+
codec_data = zoom_twldata.audio->codec;
279279

280-
audio_data->ramp_delay_value = 3; /* 161 ms */
281-
audio_data->hs_extmute = 1;
282-
audio_data->set_hs_extmute = zoom2_set_hs_extmute;
280+
codec_data->ramp_delay_value = 3; /* 161 ms */
281+
codec_data->hs_extmute = 1;
282+
codec_data->set_hs_extmute = zoom2_set_hs_extmute;
283283
}
284284
omap_pmic_init(1, 2400, "twl5030", INT_34XX_SYS_NIRQ, &zoom_twldata);
285285
omap_register_i2c_bus(2, 400, NULL, 0);

‎arch/arm/mach-omap2/clock.c‎

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@
3737

3838
u8 cpu_mask;
3939

40+
/*
41+
* clkdm_control: if true, then when a clock is enabled in the
42+
* hardware, its clockdomain will first be enabled; and when a clock
43+
* is disabled in the hardware, its clockdomain will be disabled
44+
* afterwards.
45+
*/
46+
static bool clkdm_control = true;
47+
4048
/*
4149
* OMAP2+ specific clock functions
4250
*/
@@ -99,6 +107,19 @@ void omap2_init_clk_clkdm(struct clk *clk)
99107
}
100108
}
101109

110+
/**
111+
* omap2_clk_disable_clkdm_control - disable clkdm control on clk enable/disable
112+
*
113+
* Prevent the OMAP clock code from calling into the clockdomain code
114+
* when a hardware clock in that clockdomain is enabled or disabled.
115+
* Intended to be called at init time from omap*_clk_init(). No
116+
* return value.
117+
*/
118+
void __init omap2_clk_disable_clkdm_control(void)
119+
{
120+
clkdm_control = false;
121+
}
122+
102123
/**
103124
* omap2_clk_dflt_find_companion - find companion clock to @clk
104125
* @clk: struct clk * to find the companion clock of
@@ -268,7 +289,7 @@ void omap2_clk_disable(struct clk *clk)
268289
clk->ops->disable(clk);
269290
}
270291

271-
if (clk->clkdm)
292+
if (clkdm_control && clk->clkdm)
272293
clkdm_clk_disable(clk->clkdm, clk);
273294

274295
if (clk->parent)
@@ -308,7 +329,7 @@ int omap2_clk_enable(struct clk *clk)
308329
}
309330
}
310331

311-
if (clk->clkdm) {
332+
if (clkdm_control && clk->clkdm) {
312333
ret = clkdm_clk_enable(clk->clkdm, clk);
313334
if (ret) {
314335
WARN(1, "clock: %s: could not enable clockdomain %s: "
@@ -330,7 +351,7 @@ int omap2_clk_enable(struct clk *clk)
330351
return 0;
331352

332353
oce_err3:
333-
if (clk->clkdm)
354+
if (clkdm_control && clk->clkdm)
334355
clkdm_clk_disable(clk->clkdm, clk);
335356
oce_err2:
336357
if (clk->parent)

‎arch/arm/mach-omap2/clock.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
#ifndef __ARCH_ARM_MACH_OMAP2_CLOCK_H
1717
#define __ARCH_ARM_MACH_OMAP2_CLOCK_H
1818

19+
#include <linux/kernel.h>
20+
1921
#include <plat/clock.h>
2022

2123
/* CM_CLKSEL2_PLL.CORE_CLK_SRC bits (2XXX) */
@@ -72,6 +74,7 @@ void omap2_clk_disable_unused(struct clk *clk);
7274
#endif
7375

7476
void omap2_init_clk_clkdm(struct clk *clk);
77+
void __init omap2_clk_disable_clkdm_control(void);
7578

7679
/* clkt_clksel.c public functions */
7780
u32 omap2_clksel_round_rate_div(struct clk *clk, unsigned long target_rate,

‎arch/arm/mach-omap2/clock2420_data.c‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1805,9 +1805,9 @@ static struct omap_clk omap2420_clks[] = {
18051805
CLK(NULL, "gfx_ick", &gfx_ick, CK_242X),
18061806
/* DSS domain clocks */
18071807
CLK("omapdss_dss", "ick", &dss_ick, CK_242X),
1808-
CLK("omapdss_dss", "fck", &dss1_fck, CK_242X),
1809-
CLK("omapdss_dss", "sys_clk", &dss2_fck, CK_242X),
1810-
CLK("omapdss_dss", "tv_clk", &dss_54m_fck, CK_242X),
1808+
CLK(NULL, "dss1_fck", &dss1_fck, CK_242X),
1809+
CLK(NULL, "dss2_fck", &dss2_fck, CK_242X),
1810+
CLK(NULL, "dss_54m_fck", &dss_54m_fck, CK_242X),
18111811
/* L3 domain clocks */
18121812
CLK(NULL, "core_l3_ck", &core_l3_ck, CK_242X),
18131813
CLK(NULL, "ssi_fck", &ssi_ssr_sst_fck, CK_242X),
@@ -1844,13 +1844,13 @@ static struct omap_clk omap2420_clks[] = {
18441844
CLK(NULL, "gpt12_ick", &gpt12_ick, CK_242X),
18451845
CLK(NULL, "gpt12_fck", &gpt12_fck, CK_242X),
18461846
CLK("omap-mcbsp.1", "ick", &mcbsp1_ick, CK_242X),
1847-
CLK("omap-mcbsp.1", "fck", &mcbsp1_fck, CK_242X),
1847+
CLK(NULL, "mcbsp1_fck", &mcbsp1_fck, CK_242X),
18481848
CLK("omap-mcbsp.2", "ick", &mcbsp2_ick, CK_242X),
1849-
CLK("omap-mcbsp.2", "fck", &mcbsp2_fck, CK_242X),
1849+
CLK(NULL, "mcbsp2_fck", &mcbsp2_fck, CK_242X),
18501850
CLK("omap2_mcspi.1", "ick", &mcspi1_ick, CK_242X),
1851-
CLK("omap2_mcspi.1", "fck", &mcspi1_fck, CK_242X),
1851+
CLK(NULL, "mcspi1_fck", &mcspi1_fck, CK_242X),
18521852
CLK("omap2_mcspi.2", "ick", &mcspi2_ick, CK_242X),
1853-
CLK("omap2_mcspi.2", "fck", &mcspi2_fck, CK_242X),
1853+
CLK(NULL, "mcspi2_fck", &mcspi2_fck, CK_242X),
18541854
CLK(NULL, "uart1_ick", &uart1_ick, CK_242X),
18551855
CLK(NULL, "uart1_fck", &uart1_fck, CK_242X),
18561856
CLK(NULL, "uart2_ick", &uart2_ick, CK_242X),
@@ -1860,7 +1860,7 @@ static struct omap_clk omap2420_clks[] = {
18601860
CLK(NULL, "gpios_ick", &gpios_ick, CK_242X),
18611861
CLK(NULL, "gpios_fck", &gpios_fck, CK_242X),
18621862
CLK("omap_wdt", "ick", &mpu_wdt_ick, CK_242X),
1863-
CLK("omap_wdt", "fck", &mpu_wdt_fck, CK_242X),
1863+
CLK(NULL, "mpu_wdt_fck", &mpu_wdt_fck, CK_242X),
18641864
CLK(NULL, "sync_32k_ick", &sync_32k_ick, CK_242X),
18651865
CLK(NULL, "wdt1_ick", &wdt1_ick, CK_242X),
18661866
CLK(NULL, "omapctrl_ick", &omapctrl_ick, CK_242X),
@@ -1880,11 +1880,11 @@ static struct omap_clk omap2420_clks[] = {
18801880
CLK(NULL, "eac_ick", &eac_ick, CK_242X),
18811881
CLK(NULL, "eac_fck", &eac_fck, CK_242X),
18821882
CLK("omap_hdq.0", "ick", &hdq_ick, CK_242X),
1883-
CLK("omap_hdq.1", "fck", &hdq_fck, CK_242X),
1883+
CLK("omap_hdq.0", "fck", &hdq_fck, CK_242X),
18841884
CLK("omap_i2c.1", "ick", &i2c1_ick, CK_242X),
1885-
CLK("omap_i2c.1", "fck", &i2c1_fck, CK_242X),
1885+
CLK(NULL, "i2c1_fck", &i2c1_fck, CK_242X),
18861886
CLK("omap_i2c.2", "ick", &i2c2_ick, CK_242X),
1887-
CLK("omap_i2c.2", "fck", &i2c2_fck, CK_242X),
1887+
CLK(NULL, "i2c2_fck", &i2c2_fck, CK_242X),
18881888
CLK(NULL, "gpmc_fck", &gpmc_fck, CK_242X),
18891889
CLK(NULL, "sdma_fck", &sdma_fck, CK_242X),
18901890
CLK(NULL, "sdma_ick", &sdma_ick, CK_242X),

‎arch/arm/mach-omap2/clock2430_data.c‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1895,9 +1895,9 @@ static struct omap_clk omap2430_clks[] = {
18951895
CLK(NULL, "mdm_osc_ck", &mdm_osc_ck, CK_243X),
18961896
/* DSS domain clocks */
18971897
CLK("omapdss_dss", "ick", &dss_ick, CK_243X),
1898-
CLK("omapdss_dss", "fck", &dss1_fck, CK_243X),
1899-
CLK("omapdss_dss", "sys_clk", &dss2_fck, CK_243X),
1900-
CLK("omapdss_dss", "tv_clk", &dss_54m_fck, CK_243X),
1898+
CLK(NULL, "dss1_fck", &dss1_fck, CK_243X),
1899+
CLK(NULL, "dss2_fck", &dss2_fck, CK_243X),
1900+
CLK(NULL, "dss_54m_fck", &dss_54m_fck, CK_243X),
19011901
/* L3 domain clocks */
19021902
CLK(NULL, "core_l3_ck", &core_l3_ck, CK_243X),
19031903
CLK(NULL, "ssi_fck", &ssi_ssr_sst_fck, CK_243X),
@@ -1934,21 +1934,21 @@ static struct omap_clk omap2430_clks[] = {
19341934
CLK(NULL, "gpt12_ick", &gpt12_ick, CK_243X),
19351935
CLK(NULL, "gpt12_fck", &gpt12_fck, CK_243X),
19361936
CLK("omap-mcbsp.1", "ick", &mcbsp1_ick, CK_243X),
1937-
CLK("omap-mcbsp.1", "fck", &mcbsp1_fck, CK_243X),
1937+
CLK(NULL, "mcbsp1_fck", &mcbsp1_fck, CK_243X),
19381938
CLK("omap-mcbsp.2", "ick", &mcbsp2_ick, CK_243X),
1939-
CLK("omap-mcbsp.2", "fck", &mcbsp2_fck, CK_243X),
1939+
CLK(NULL, "mcbsp2_fck", &mcbsp2_fck, CK_243X),
19401940
CLK("omap-mcbsp.3", "ick", &mcbsp3_ick, CK_243X),
1941-
CLK("omap-mcbsp.3", "fck", &mcbsp3_fck, CK_243X),
1941+
CLK(NULL, "mcbsp3_fck", &mcbsp3_fck, CK_243X),
19421942
CLK("omap-mcbsp.4", "ick", &mcbsp4_ick, CK_243X),
1943-
CLK("omap-mcbsp.4", "fck", &mcbsp4_fck, CK_243X),
1943+
CLK(NULL, "mcbsp4_fck", &mcbsp4_fck, CK_243X),
19441944
CLK("omap-mcbsp.5", "ick", &mcbsp5_ick, CK_243X),
1945-
CLK("omap-mcbsp.5", "fck", &mcbsp5_fck, CK_243X),
1945+
CLK(NULL, "mcbsp5_fck", &mcbsp5_fck, CK_243X),
19461946
CLK("omap2_mcspi.1", "ick", &mcspi1_ick, CK_243X),
1947-
CLK("omap2_mcspi.1", "fck", &mcspi1_fck, CK_243X),
1947+
CLK(NULL, "mcspi1_fck", &mcspi1_fck, CK_243X),
19481948
CLK("omap2_mcspi.2", "ick", &mcspi2_ick, CK_243X),
1949-
CLK("omap2_mcspi.2", "fck", &mcspi2_fck, CK_243X),
1949+
CLK(NULL, "mcspi2_fck", &mcspi2_fck, CK_243X),
19501950
CLK("omap2_mcspi.3", "ick", &mcspi3_ick, CK_243X),
1951-
CLK("omap2_mcspi.3", "fck", &mcspi3_fck, CK_243X),
1951+
CLK(NULL, "mcspi3_fck", &mcspi3_fck, CK_243X),
19521952
CLK(NULL, "uart1_ick", &uart1_ick, CK_243X),
19531953
CLK(NULL, "uart1_fck", &uart1_fck, CK_243X),
19541954
CLK(NULL, "uart2_ick", &uart2_ick, CK_243X),
@@ -1958,7 +1958,7 @@ static struct omap_clk omap2430_clks[] = {
19581958
CLK(NULL, "gpios_ick", &gpios_ick, CK_243X),
19591959
CLK(NULL, "gpios_fck", &gpios_fck, CK_243X),
19601960
CLK("omap_wdt", "ick", &mpu_wdt_ick, CK_243X),
1961-
CLK("omap_wdt", "fck", &mpu_wdt_fck, CK_243X),
1961+
CLK(NULL, "mpu_wdt_fck", &mpu_wdt_fck, CK_243X),
19621962
CLK(NULL, "sync_32k_ick", &sync_32k_ick, CK_243X),
19631963
CLK(NULL, "wdt1_ick", &wdt1_ick, CK_243X),
19641964
CLK(NULL, "omapctrl_ick", &omapctrl_ick, CK_243X),
@@ -1975,9 +1975,9 @@ static struct omap_clk omap2430_clks[] = {
19751975
CLK("omap_hdq.0", "ick", &hdq_ick, CK_243X),
19761976
CLK("omap_hdq.1", "fck", &hdq_fck, CK_243X),
19771977
CLK("omap_i2c.1", "ick", &i2c1_ick, CK_243X),
1978-
CLK("omap_i2c.1", "fck", &i2chs1_fck, CK_243X),
1978+
CLK(NULL, "i2chs1_fck", &i2chs1_fck, CK_243X),
19791979
CLK("omap_i2c.2", "ick", &i2c2_ick, CK_243X),
1980-
CLK("omap_i2c.2", "fck", &i2chs2_fck, CK_243X),
1980+
CLK(NULL, "i2chs2_fck", &i2chs2_fck, CK_243X),
19811981
CLK(NULL, "gpmc_fck", &gpmc_fck, CK_243X),
19821982
CLK(NULL, "sdma_fck", &sdma_fck, CK_243X),
19831983
CLK(NULL, "sdma_ick", &sdma_ick, CK_243X),
@@ -1990,9 +1990,9 @@ static struct omap_clk omap2430_clks[] = {
19901990
CLK(NULL, "usb_fck", &usb_fck, CK_243X),
19911991
CLK("musb-omap2430", "ick", &usbhs_ick, CK_243X),
19921992
CLK("omap_hsmmc.0", "ick", &mmchs1_ick, CK_243X),
1993-
CLK("omap_hsmmc.0", "fck", &mmchs1_fck, CK_243X),
1993+
CLK(NULL, "mmchs1_fck", &mmchs1_fck, CK_243X),
19941994
CLK("omap_hsmmc.1", "ick", &mmchs2_ick, CK_243X),
1995-
CLK("omap_hsmmc.1", "fck", &mmchs2_fck, CK_243X),
1995+
CLK(NULL, "mmchs2_fck", &mmchs2_fck, CK_243X),
19961996
CLK(NULL, "gpio5_ick", &gpio5_ick, CK_243X),
19971997
CLK(NULL, "gpio5_fck", &gpio5_fck, CK_243X),
19981998
CLK(NULL, "mdm_intc_ick", &mdm_intc_ick, CK_243X),

0 commit comments

Comments
 (0)