Skip to content

Commit 2cb85a7

Browse files
committed
Merge branch 'omap-for-v3.8/fixes-for-merge-window' into omap-for-v3.8/fixes-for-merge-window-v2
2 parents d7dde8c + d9ba573 commit 2cb85a7

24 files changed

Lines changed: 64 additions & 182 deletions

‎arch/arm/boot/dts/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ dtb-$(CONFIG_ARCH_OMAP2PLUS) += omap2420-h4.dtb \
107107
omap3-evm.dtb \
108108
omap3-tobi.dtb \
109109
omap4-panda.dtb \
110+
omap4-panda-a4.dtb \
110111
omap4-panda-es.dtb \
111112
omap4-var-som.dtb \
112113
omap4-sdp.dtb \

‎arch/arm/boot/dts/omap2420-h4.dts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515

1616
memory {
1717
device_type = "memory";
18-
reg = <0x80000000 0x84000000>; /* 64 MB */
18+
reg = <0x80000000 0x4000000>; /* 64 MB */
1919
};
2020
};

‎arch/arm/mach-omap2/Kconfig‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ config SOC_HAS_OMAP2_SDRC
2626

2727
config SOC_HAS_REALTIME_COUNTER
2828
bool "Real time free running counter"
29+
depends on SOC_OMAP5
30+
default y
2931

3032
config ARCH_OMAP2
3133
bool "TI OMAP2"
@@ -79,7 +81,6 @@ config SOC_OMAP5
7981
select ARM_GIC
8082
select CPU_V7
8183
select HAVE_SMP
82-
select SOC_HAS_REALTIME_COUNTER
8384
select COMMON_CLK
8485

8586
comment "OMAP Core Type"

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ static struct omap_dss_device sdp3430_lcd_device = {
157157

158158
static struct tfp410_platform_data dvi_panel = {
159159
.power_down_gpio = -1,
160+
.i2c_bus_num = -1,
160161
};
161162

162163
static struct omap_dss_device sdp3430_dvi_device = {

‎arch/arm/mach-omap2/board-am3517evm.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ static struct omap_dss_device am3517_evm_tv_device = {
208208

209209
static struct tfp410_platform_data dvi_panel = {
210210
.power_down_gpio = -1,
211+
.i2c_bus_num = -1,
211212
};
212213

213214
static struct omap_dss_device am3517_evm_dvi_device = {

‎arch/arm/mach-omap2/board-cm-t35.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ static struct omap_dss_device cm_t35_lcd_device = {
241241

242242
static struct tfp410_platform_data dvi_panel = {
243243
.power_down_gpio = CM_T35_DVI_EN_GPIO,
244+
.i2c_bus_num = -1,
244245
};
245246

246247
static struct omap_dss_device cm_t35_dvi_device = {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ static struct omap_dss_device devkit8000_lcd_device = {
141141

142142
static struct tfp410_platform_data dvi_panel = {
143143
.power_down_gpio = -1,
144+
.i2c_bus_num = 1,
144145
};
145146

146147
static struct omap_dss_device devkit8000_dvi_device = {

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

Lines changed: 20 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -27,26 +27,22 @@
2727
#include <linux/io.h>
2828
#include <linux/input/matrix_keypad.h>
2929
#include <linux/mfd/menelaus.h>
30+
#include <linux/omap-dma.h>
3031

3132
#include <asm/mach-types.h>
3233
#include <asm/mach/arch.h>
3334
#include <asm/mach/map.h>
3435

35-
#include <linux/omap-dma.h>
36-
#include <plat/debug-devices.h>
37-
3836
#include <video/omapdss.h>
3937
#include <video/omap-panel-generic-dpi.h>
4038

4139
#include "common.h"
4240
#include "mux.h"
4341
#include "control.h"
4442
#include "gpmc.h"
43+
#include "gpmc-smc91x.h"
4544

4645
#define H4_FLASH_CS 0
47-
#define H4_SMC91X_CS 1
48-
49-
#define H4_ETHR_GPIO_IRQ 92
5046

5147
#if defined(CONFIG_KEYBOARD_MATRIX) || defined(CONFIG_KEYBOARD_MATRIX_MODULE)
5248
static const uint32_t board_matrix_keys[] = {
@@ -250,71 +246,31 @@ static u32 is_gpmc_muxed(void)
250246
return 0;
251247
}
252248

253-
static inline void __init h4_init_debug(void)
254-
{
255-
int eth_cs;
256-
unsigned long cs_mem_base;
257-
unsigned int muxed, rate;
258-
struct clk *gpmc_fck;
259-
260-
eth_cs = H4_SMC91X_CS;
249+
#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91x_MODULE)
261250

262-
gpmc_fck = clk_get(NULL, "gpmc_fck"); /* Always on ENABLE_ON_INIT */
263-
if (IS_ERR(gpmc_fck)) {
264-
WARN_ON(1);
265-
return;
266-
}
267-
268-
clk_prepare_enable(gpmc_fck);
269-
rate = clk_get_rate(gpmc_fck);
270-
clk_disable_unprepare(gpmc_fck);
271-
clk_put(gpmc_fck);
251+
static struct omap_smc91x_platform_data board_smc91x_data = {
252+
.cs = 1,
253+
.gpio_irq = 92,
254+
.flags = GPMC_TIMINGS_SMC91C96 | IORESOURCE_IRQ_LOWLEVEL,
255+
};
272256

257+
static void __init board_smc91x_init(void)
258+
{
273259
if (is_gpmc_muxed())
274-
muxed = 0x200;
275-
else
276-
muxed = 0;
277-
278-
/* Make sure CS1 timings are correct */
279-
gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG1,
280-
0x00011000 | muxed);
281-
282-
if (rate >= 160000000) {
283-
gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG2, 0x001f1f01);
284-
gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG3, 0x00080803);
285-
gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG4, 0x1c0b1c0a);
286-
gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG5, 0x041f1F1F);
287-
gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG6, 0x000004C4);
288-
} else if (rate >= 130000000) {
289-
gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG2, 0x001f1f00);
290-
gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG3, 0x00080802);
291-
gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG4, 0x1C091C09);
292-
gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG5, 0x041f1F1F);
293-
gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG6, 0x000004C4);
294-
} else {/* rate = 100000000 */
295-
gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG2, 0x001f1f00);
296-
gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG3, 0x00080802);
297-
gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG4, 0x1C091C09);
298-
gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG5, 0x031A1F1F);
299-
gpmc_cs_write_reg(eth_cs, GPMC_CS_CONFIG6, 0x000003C2);
300-
}
301-
302-
if (gpmc_cs_request(eth_cs, SZ_16M, &cs_mem_base) < 0) {
303-
printk(KERN_ERR "Failed to request GPMC mem for smc91x\n");
304-
goto out;
305-
}
260+
board_smc91x_data.flags |= GPMC_MUX_ADD_DATA;
306261

307-
udelay(100);
262+
omap_mux_init_gpio(board_smc91x_data.gpio_irq, OMAP_PIN_INPUT);
263+
gpmc_smc91x_init(&board_smc91x_data);
264+
}
308265

309-
omap_mux_init_gpio(92, 0);
310-
if (debug_card_init(cs_mem_base, H4_ETHR_GPIO_IRQ) < 0)
311-
gpmc_cs_free(eth_cs);
266+
#else
312267

313-
out:
314-
clk_disable_unprepare(gpmc_fck);
315-
clk_put(gpmc_fck);
268+
static inline void board_smc91x_init(void)
269+
{
316270
}
317271

272+
#endif
273+
318274
static void __init h4_init_flash(void)
319275
{
320276
unsigned long base;
@@ -371,6 +327,7 @@ static void __init omap_h4_init(void)
371327
omap_serial_init();
372328
omap_sdrc_init(NULL, NULL);
373329
h4_init_flash();
330+
board_smc91x_init();
374331

375332
omap_display_init(&h4_dss_data);
376333
}

‎arch/arm/mach-omap2/board-omap3evm.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ static struct omap_dss_device omap3_evm_tv_device = {
240240

241241
static struct tfp410_platform_data dvi_panel = {
242242
.power_down_gpio = OMAP3EVM_DVI_PANEL_EN_GPIO,
243+
.i2c_bus_num = -1,
243244
};
244245

245246
static struct omap_dss_device omap3_evm_dvi_device = {

‎arch/arm/mach-omap2/board-omap3stalker.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ static struct omap_dss_device omap3_stalker_tv_device = {
118118

119119
static struct tfp410_platform_data dvi_panel = {
120120
.power_down_gpio = DSS_ENABLE_GPIO,
121+
.i2c_bus_num = -1,
121122
};
122123

123124
static struct omap_dss_device omap3_stalker_dvi_device = {

0 commit comments

Comments
 (0)