Skip to content

Commit 075cb10

Browse files
committed
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap
* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (31 commits) ARM: OMAP: Fix export.h or module.h includes ARM: OMAP: omap_device: Include linux/export.h ARM: OMAP2: Fix H4 matrix keyboard warning ARM: OMAP1: Remove unused omap-alsa.h ARM: OMAP1: Fix warnings about enabling 32 KiHz timer ARM: OMAP2+: timer: Remove omap_device_pm_latency ARM: OMAP2+: clock data: Remove redundant timer clkdev ARM: OMAP: Devkit8000: Remove double omap_mux_init_gpio ARM: OMAP: usb: musb: OMAP: Delete unused function MAINTAINERS: Update linux-omap git repository ARM: OMAP: change get_context_loss_count ret value to int ARM: OMAP4: hsmmc: configure SDMMC1_DR0 properly ARM: OMAP4: hsmmc: Fix Pbias configuration on regulator OFF ARM: OMAP3: hwmod: fix variant registration and remove SmartReflex from common list ARM: OMAP: I2C: Fix omap_register_i2c_bus() return value on success ARM: OMAP: dmtimer: Include linux/module.h ARM: OMAP2+: l3-noc: Include linux/module.h ARM: OMAP2+: devices: Fixes for McPDM ARM: OMAP: Fix errors and warnings when building for one board ARM: OMAP3: PM: restrict erratum i443 handling to OMAP3430 only ...
2 parents a3fbbde + d30cc16 commit 075cb10

Some content is hidden

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

42 files changed

+345
-402
lines changed

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4673,7 +4673,7 @@ L: [email protected]
46734673
W: http://www.muru.com/linux/omap/
46744674
W: http://linux.omap.com/
46754675
Q: http://patchwork.kernel.org/project/linux-omap/list/
4676-
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git
4676+
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git
46774677
S: Maintained
46784678
F: arch/arm/*omap*/
46794679

arch/arm/mach-omap1/board-palmz71.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
#include <plat/irda.h>
4343
#include <plat/keypad.h>
4444
#include <plat/common.h>
45-
#include <plat/omap-alsa.h>
4645

4746
#include <linux/spi/spi.h>
4847
#include <linux/spi/ads7846.h>

arch/arm/mach-omap1/pm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ void omap1_pm_idle(void)
116116
return;
117117
}
118118

119-
#ifdef CONFIG_OMAP_MPU_TIMER
119+
#if defined(CONFIG_OMAP_MPU_TIMER) && !defined(CONFIG_OMAP_DM_TIMER)
120120
#warning Enable 32kHz OS timer in order to allow sleep states in idle
121121
use_idlect1 = use_idlect1 & ~(1 << 9);
122122
#else

arch/arm/mach-omap2/board-devkit8000.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,6 @@ static int devkit8000_twl_gpio_setup(struct device *dev,
226226
{
227227
int ret;
228228

229-
omap_mux_init_gpio(29, OMAP_PIN_INPUT);
230229
/* gpio + 0 is "mmc0_cd" (input/IRQ) */
231230
mmc[0].gpio_cd = gpio + 0;
232231
omap2_hsmmc_init(mmc);

arch/arm/mach-omap2/board-generic.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
* XXX: Still needed to boot until the i2c & twl driver is adapted to
2929
* device-tree
3030
*/
31+
#ifdef CONFIG_ARCH_OMAP4
3132
static struct twl4030_platform_data sdp4430_twldata = {
3233
.irq_base = TWL6030_IRQ_BASE,
3334
.irq_end = TWL6030_IRQ_END,
@@ -37,7 +38,9 @@ static void __init omap4_i2c_init(void)
3738
{
3839
omap4_pmic_init("twl6030", &sdp4430_twldata);
3940
}
41+
#endif
4042

43+
#ifdef CONFIG_ARCH_OMAP3
4144
static struct twl4030_platform_data beagle_twldata = {
4245
.irq_base = TWL4030_IRQ_BASE,
4346
.irq_end = TWL4030_IRQ_END,
@@ -47,6 +50,7 @@ static void __init omap3_i2c_init(void)
4750
{
4851
omap3_pmic_init("twl4030", &beagle_twldata);
4952
}
53+
#endif
5054

5155
static struct of_device_id omap_dt_match_table[] __initdata = {
5256
{ .compatible = "simple-bus", },
@@ -72,17 +76,21 @@ static void __init omap_generic_init(void)
7276
of_platform_populate(NULL, omap_dt_match_table, NULL, NULL);
7377
}
7478

79+
#ifdef CONFIG_ARCH_OMAP4
7580
static void __init omap4_init(void)
7681
{
7782
omap4_i2c_init();
7883
omap_generic_init();
7984
}
85+
#endif
8086

87+
#ifdef CONFIG_ARCH_OMAP3
8188
static void __init omap3_init(void)
8289
{
8390
omap3_i2c_init();
8491
omap_generic_init();
8592
}
93+
#endif
8694

8795
#if defined(CONFIG_SOC_OMAP2420)
8896
static const char *omap242x_boards_compat[] __initdata = {

arch/arm/mach-omap2/board-h4.c

Lines changed: 69 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include <linux/err.h>
2626
#include <linux/clk.h>
2727
#include <linux/io.h>
28+
#include <linux/input/matrix_keypad.h>
2829

2930
#include <mach/hardware.h>
3031
#include <asm/mach-types.h>
@@ -34,7 +35,6 @@
3435
#include <plat/usb.h>
3536
#include <plat/board.h>
3637
#include <plat/common.h>
37-
#include <plat/keypad.h>
3838
#include <plat/menelaus.h>
3939
#include <plat/dma.h>
4040
#include <plat/gpmc.h>
@@ -50,10 +50,8 @@
5050

5151
#define H4_ETHR_GPIO_IRQ 92
5252

53-
static unsigned int row_gpios[6] = { 88, 89, 124, 11, 6, 96 };
54-
static unsigned int col_gpios[7] = { 90, 91, 100, 36, 12, 97, 98 };
55-
56-
static const unsigned int h4_keymap[] = {
53+
#if defined(CONFIG_KEYBOARD_MATRIX) || defined(CONFIG_KEYBOARD_MATRIX_MODULE)
54+
static const uint32_t board_matrix_keys[] = {
5755
KEY(0, 0, KEY_LEFT),
5856
KEY(1, 0, KEY_RIGHT),
5957
KEY(2, 0, KEY_A),
@@ -86,6 +84,71 @@ static const unsigned int h4_keymap[] = {
8684
KEY(4, 5, KEY_ENTER),
8785
};
8886

87+
static const struct matrix_keymap_data board_keymap_data = {
88+
.keymap = board_matrix_keys,
89+
.keymap_size = ARRAY_SIZE(board_matrix_keys),
90+
};
91+
92+
static unsigned int board_keypad_row_gpios[] = {
93+
88, 89, 124, 11, 6, 96
94+
};
95+
96+
static unsigned int board_keypad_col_gpios[] = {
97+
90, 91, 100, 36, 12, 97, 98
98+
};
99+
100+
static struct matrix_keypad_platform_data board_keypad_platform_data = {
101+
.keymap_data = &board_keymap_data,
102+
.row_gpios = board_keypad_row_gpios,
103+
.num_row_gpios = ARRAY_SIZE(board_keypad_row_gpios),
104+
.col_gpios = board_keypad_col_gpios,
105+
.num_col_gpios = ARRAY_SIZE(board_keypad_col_gpios),
106+
.active_low = 1,
107+
108+
.debounce_ms = 20,
109+
.col_scan_delay_us = 5,
110+
};
111+
112+
static struct platform_device board_keyboard = {
113+
.name = "matrix-keypad",
114+
.id = -1,
115+
.dev = {
116+
.platform_data = &board_keypad_platform_data,
117+
},
118+
};
119+
static void __init board_mkp_init(void)
120+
{
121+
omap_mux_init_gpio(88, OMAP_PULL_ENA | OMAP_PULL_UP);
122+
omap_mux_init_gpio(89, OMAP_PULL_ENA | OMAP_PULL_UP);
123+
omap_mux_init_gpio(124, OMAP_PULL_ENA | OMAP_PULL_UP);
124+
omap_mux_init_signal("mcbsp2_dr.gpio_11", OMAP_PULL_ENA | OMAP_PULL_UP);
125+
if (omap_has_menelaus()) {
126+
omap_mux_init_signal("sdrc_a14.gpio0",
127+
OMAP_PULL_ENA | OMAP_PULL_UP);
128+
omap_mux_init_signal("vlynq_rx0.gpio_15", 0);
129+
omap_mux_init_signal("gpio_98", 0);
130+
board_keypad_row_gpios[5] = 0;
131+
board_keypad_col_gpios[2] = 15;
132+
board_keypad_col_gpios[6] = 18;
133+
} else {
134+
omap_mux_init_signal("gpio_96", OMAP_PULL_ENA | OMAP_PULL_UP);
135+
omap_mux_init_signal("gpio_100", 0);
136+
omap_mux_init_signal("gpio_98", 0);
137+
}
138+
omap_mux_init_signal("gpio_90", 0);
139+
omap_mux_init_signal("gpio_91", 0);
140+
omap_mux_init_signal("gpio_36", 0);
141+
omap_mux_init_signal("mcbsp2_clkx.gpio_12", 0);
142+
omap_mux_init_signal("gpio_97", 0);
143+
144+
platform_device_register(&board_keyboard);
145+
}
146+
#else
147+
static inline void board_mkp_init(void)
148+
{
149+
}
150+
#endif
151+
89152
static struct mtd_partition h4_partitions[] = {
90153
/* bootloader (U-Boot, etc) in first sector */
91154
{
@@ -137,31 +200,8 @@ static struct platform_device h4_flash_device = {
137200
.resource = &h4_flash_resource,
138201
};
139202

140-
static const struct matrix_keymap_data h4_keymap_data = {
141-
.keymap = h4_keymap,
142-
.keymap_size = ARRAY_SIZE(h4_keymap),
143-
};
144-
145-
static struct omap_kp_platform_data h4_kp_data = {
146-
.rows = 6,
147-
.cols = 7,
148-
.keymap_data = &h4_keymap_data,
149-
.rep = true,
150-
.row_gpios = row_gpios,
151-
.col_gpios = col_gpios,
152-
};
153-
154-
static struct platform_device h4_kp_device = {
155-
.name = "omap-keypad",
156-
.id = -1,
157-
.dev = {
158-
.platform_data = &h4_kp_data,
159-
},
160-
};
161-
162203
static struct platform_device *h4_devices[] __initdata = {
163204
&h4_flash_device,
164-
&h4_kp_device,
165205
};
166206

167207
static struct panel_generic_dpi_data h4_panel_data = {
@@ -336,31 +376,7 @@ static void __init omap_h4_init(void)
336376
* if not needed.
337377
*/
338378

339-
#if defined(CONFIG_KEYBOARD_OMAP) || defined(CONFIG_KEYBOARD_OMAP_MODULE)
340-
omap_mux_init_gpio(88, OMAP_PULL_ENA | OMAP_PULL_UP);
341-
omap_mux_init_gpio(89, OMAP_PULL_ENA | OMAP_PULL_UP);
342-
omap_mux_init_gpio(124, OMAP_PULL_ENA | OMAP_PULL_UP);
343-
omap_mux_init_signal("mcbsp2_dr.gpio_11", OMAP_PULL_ENA | OMAP_PULL_UP);
344-
if (omap_has_menelaus()) {
345-
omap_mux_init_signal("sdrc_a14.gpio0",
346-
OMAP_PULL_ENA | OMAP_PULL_UP);
347-
omap_mux_init_signal("vlynq_rx0.gpio_15", 0);
348-
omap_mux_init_signal("gpio_98", 0);
349-
row_gpios[5] = 0;
350-
col_gpios[2] = 15;
351-
col_gpios[6] = 18;
352-
} else {
353-
omap_mux_init_signal("gpio_96", OMAP_PULL_ENA | OMAP_PULL_UP);
354-
omap_mux_init_signal("gpio_100", 0);
355-
omap_mux_init_signal("gpio_98", 0);
356-
}
357-
omap_mux_init_signal("gpio_90", 0);
358-
omap_mux_init_signal("gpio_91", 0);
359-
omap_mux_init_signal("gpio_36", 0);
360-
omap_mux_init_signal("mcbsp2_clkx.gpio_12", 0);
361-
omap_mux_init_signal("gpio_97", 0);
362-
#endif
363-
379+
board_mkp_init();
364380
i2c_register_board_info(1, h4_i2c_board_info,
365381
ARRAY_SIZE(h4_i2c_board_info));
366382

arch/arm/mach-omap2/clkt_dpll.c

Lines changed: 35 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,19 @@
4646
(DPLL_SCALE_FACTOR / DPLL_SCALE_BASE))
4747

4848
/* DPLL valid Fint frequency band limits - from 34xx TRM Section 4.7.6.2 */
49-
#define DPLL_FINT_BAND1_MIN 750000
50-
#define DPLL_FINT_BAND1_MAX 2100000
51-
#define DPLL_FINT_BAND2_MIN 7500000
52-
#define DPLL_FINT_BAND2_MAX 21000000
49+
#define OMAP3430_DPLL_FINT_BAND1_MIN 750000
50+
#define OMAP3430_DPLL_FINT_BAND1_MAX 2100000
51+
#define OMAP3430_DPLL_FINT_BAND2_MIN 7500000
52+
#define OMAP3430_DPLL_FINT_BAND2_MAX 21000000
53+
54+
/*
55+
* DPLL valid Fint frequency range for OMAP36xx and OMAP4xxx.
56+
* From device data manual section 4.3 "DPLL and DLL Specifications".
57+
*/
58+
#define OMAP3PLUS_DPLL_FINT_JTYPE_MIN 500000
59+
#define OMAP3PLUS_DPLL_FINT_JTYPE_MAX 2500000
60+
#define OMAP3PLUS_DPLL_FINT_MIN 32000
61+
#define OMAP3PLUS_DPLL_FINT_MAX 52000000
5362

5463
/* _dpll_test_fint() return codes */
5564
#define DPLL_FINT_UNDERFLOW -1
@@ -71,33 +80,43 @@
7180
static int _dpll_test_fint(struct clk *clk, u8 n)
7281
{
7382
struct dpll_data *dd;
74-
long fint;
83+
long fint, fint_min, fint_max;
7584
int ret = 0;
7685

7786
dd = clk->dpll_data;
7887

7988
/* DPLL divider must result in a valid jitter correction val */
8089
fint = clk->parent->rate / n;
81-
if (fint < DPLL_FINT_BAND1_MIN) {
8290

91+
if (cpu_is_omap24xx()) {
92+
/* Should not be called for OMAP2, so warn if it is called */
93+
WARN(1, "No fint limits available for OMAP2!\n");
94+
return DPLL_FINT_INVALID;
95+
} else if (cpu_is_omap3430()) {
96+
fint_min = OMAP3430_DPLL_FINT_BAND1_MIN;
97+
fint_max = OMAP3430_DPLL_FINT_BAND2_MAX;
98+
} else if (dd->flags & DPLL_J_TYPE) {
99+
fint_min = OMAP3PLUS_DPLL_FINT_JTYPE_MIN;
100+
fint_max = OMAP3PLUS_DPLL_FINT_JTYPE_MAX;
101+
} else {
102+
fint_min = OMAP3PLUS_DPLL_FINT_MIN;
103+
fint_max = OMAP3PLUS_DPLL_FINT_MAX;
104+
}
105+
106+
if (fint < fint_min) {
83107
pr_debug("rejecting n=%d due to Fint failure, "
84108
"lowering max_divider\n", n);
85109
dd->max_divider = n;
86110
ret = DPLL_FINT_UNDERFLOW;
87-
88-
} else if (fint > DPLL_FINT_BAND1_MAX &&
89-
fint < DPLL_FINT_BAND2_MIN) {
90-
91-
pr_debug("rejecting n=%d due to Fint failure\n", n);
92-
ret = DPLL_FINT_INVALID;
93-
94-
} else if (fint > DPLL_FINT_BAND2_MAX) {
95-
111+
} else if (fint > fint_max) {
96112
pr_debug("rejecting n=%d due to Fint failure, "
97113
"boosting min_divider\n", n);
98114
dd->min_divider = n;
99115
ret = DPLL_FINT_INVALID;
100-
116+
} else if (cpu_is_omap3430() && fint > OMAP3430_DPLL_FINT_BAND1_MAX &&
117+
fint < OMAP3430_DPLL_FINT_BAND2_MIN) {
118+
pr_debug("rejecting n=%d due to Fint failure\n", n);
119+
ret = DPLL_FINT_INVALID;
101120
}
102121

103122
return ret;

arch/arm/mach-omap2/clock.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ void omap3_noncore_dpll_disable(struct clk *clk);
6666
int omap4_dpllmx_gatectrl_read(struct clk *clk);
6767
void omap4_dpllmx_allow_gatectrl(struct clk *clk);
6868
void omap4_dpllmx_deny_gatectrl(struct clk *clk);
69+
long omap4_dpll_regm4xen_round_rate(struct clk *clk, unsigned long target_rate);
70+
unsigned long omap4_dpll_regm4xen_recalc(struct clk *clk);
6971

7072
#ifdef CONFIG_OMAP_RESET_CLOCKS
7173
void omap2_clk_disable_unused(struct clk *clk);

arch/arm/mach-omap2/clock2420_data.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1898,18 +1898,6 @@ static struct omap_clk omap2420_clks[] = {
18981898
CLK(NULL, "pka_ick", &pka_ick, CK_242X),
18991899
CLK(NULL, "usb_fck", &usb_fck, CK_242X),
19001900
CLK("musb-hdrc", "fck", &osc_ck, CK_242X),
1901-
CLK("omap_timer.1", "fck", &gpt1_fck, CK_242X),
1902-
CLK("omap_timer.2", "fck", &gpt2_fck, CK_242X),
1903-
CLK("omap_timer.3", "fck", &gpt3_fck, CK_242X),
1904-
CLK("omap_timer.4", "fck", &gpt4_fck, CK_242X),
1905-
CLK("omap_timer.5", "fck", &gpt5_fck, CK_242X),
1906-
CLK("omap_timer.6", "fck", &gpt6_fck, CK_242X),
1907-
CLK("omap_timer.7", "fck", &gpt7_fck, CK_242X),
1908-
CLK("omap_timer.8", "fck", &gpt8_fck, CK_242X),
1909-
CLK("omap_timer.9", "fck", &gpt9_fck, CK_242X),
1910-
CLK("omap_timer.10", "fck", &gpt10_fck, CK_242X),
1911-
CLK("omap_timer.11", "fck", &gpt11_fck, CK_242X),
1912-
CLK("omap_timer.12", "fck", &gpt12_fck, CK_242X),
19131901
CLK("omap_timer.1", "32k_ck", &func_32k_ck, CK_243X),
19141902
CLK("omap_timer.2", "32k_ck", &func_32k_ck, CK_243X),
19151903
CLK("omap_timer.3", "32k_ck", &func_32k_ck, CK_243X),

arch/arm/mach-omap2/clock2430_data.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1998,18 +1998,6 @@ static struct omap_clk omap2430_clks[] = {
19981998
CLK(NULL, "mdm_intc_ick", &mdm_intc_ick, CK_243X),
19991999
CLK("omap_hsmmc.0", "mmchsdb_fck", &mmchsdb1_fck, CK_243X),
20002000
CLK("omap_hsmmc.1", "mmchsdb_fck", &mmchsdb2_fck, CK_243X),
2001-
CLK("omap_timer.1", "fck", &gpt1_fck, CK_243X),
2002-
CLK("omap_timer.2", "fck", &gpt2_fck, CK_243X),
2003-
CLK("omap_timer.3", "fck", &gpt3_fck, CK_243X),
2004-
CLK("omap_timer.4", "fck", &gpt4_fck, CK_243X),
2005-
CLK("omap_timer.5", "fck", &gpt5_fck, CK_243X),
2006-
CLK("omap_timer.6", "fck", &gpt6_fck, CK_243X),
2007-
CLK("omap_timer.7", "fck", &gpt7_fck, CK_243X),
2008-
CLK("omap_timer.8", "fck", &gpt8_fck, CK_243X),
2009-
CLK("omap_timer.9", "fck", &gpt9_fck, CK_243X),
2010-
CLK("omap_timer.10", "fck", &gpt10_fck, CK_243X),
2011-
CLK("omap_timer.11", "fck", &gpt11_fck, CK_243X),
2012-
CLK("omap_timer.12", "fck", &gpt12_fck, CK_243X),
20132001
CLK("omap_timer.1", "32k_ck", &func_32k_ck, CK_243X),
20142002
CLK("omap_timer.2", "32k_ck", &func_32k_ck, CK_243X),
20152003
CLK("omap_timer.3", "32k_ck", &func_32k_ck, CK_243X),

arch/arm/mach-omap2/clock3xxx_data.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3464,18 +3464,6 @@ static struct omap_clk omap3xxx_clks[] = {
34643464
CLK("musb-am35x", "fck", &hsotgusb_fck_am35xx, CK_AM35XX),
34653465
CLK(NULL, "hecc_ck", &hecc_ck, CK_AM35XX),
34663466
CLK(NULL, "uart4_ick", &uart4_ick_am35xx, CK_AM35XX),
3467-
CLK("omap_timer.1", "fck", &gpt1_fck, CK_3XXX),
3468-
CLK("omap_timer.2", "fck", &gpt2_fck, CK_3XXX),
3469-
CLK("omap_timer.3", "fck", &gpt3_fck, CK_3XXX),
3470-
CLK("omap_timer.4", "fck", &gpt4_fck, CK_3XXX),
3471-
CLK("omap_timer.5", "fck", &gpt5_fck, CK_3XXX),
3472-
CLK("omap_timer.6", "fck", &gpt6_fck, CK_3XXX),
3473-
CLK("omap_timer.7", "fck", &gpt7_fck, CK_3XXX),
3474-
CLK("omap_timer.8", "fck", &gpt8_fck, CK_3XXX),
3475-
CLK("omap_timer.9", "fck", &gpt9_fck, CK_3XXX),
3476-
CLK("omap_timer.10", "fck", &gpt10_fck, CK_3XXX),
3477-
CLK("omap_timer.11", "fck", &gpt11_fck, CK_3XXX),
3478-
CLK("omap_timer.12", "fck", &gpt12_fck, CK_3XXX),
34793467
CLK("omap_timer.1", "32k_ck", &omap_32k_fck, CK_3XXX),
34803468
CLK("omap_timer.2", "32k_ck", &omap_32k_fck, CK_3XXX),
34813469
CLK("omap_timer.3", "32k_ck", &omap_32k_fck, CK_3XXX),

0 commit comments

Comments
 (0)