diff options
author | Dima Zavin <dima@android.com> | 2011-09-14 16:06:56 -0700 |
---|---|---|
committer | Dima Zavin <dima@android.com> | 2011-09-15 10:19:04 -0700 |
commit | 2be38e3944c64e2824e51e0a0be01dbdc7f2ba40 (patch) | |
tree | cd502a25754d1e4835489726f1511bcb84645b87 /arch/arm/mach-omap2 | |
parent | fb078e6047a5e40b75eea869f56f61b09bee2662 (diff) | |
download | kernel_samsung_tuna-2be38e3944c64e2824e51e0a0be01dbdc7f2ba40.zip kernel_samsung_tuna-2be38e3944c64e2824e51e0a0be01dbdc7f2ba40.tar.gz kernel_samsung_tuna-2be38e3944c64e2824e51e0a0be01dbdc7f2ba40.tar.bz2 |
ARM: omap4: tuna: don't mux uart1 rts/cts on < sample4
Change-Id: I8b1f9984a2f0e03225c298ff0bb48533590c2e02
Signed-off-by: Dima Zavin <dima@android.com>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r-- | arch/arm/mach-omap2/board-tuna.c | 31 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-tuna.h | 1 |
2 files changed, 29 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/board-tuna.c b/arch/arm/mach-omap2/board-tuna.c index 74dee01..6e19cba 100644 --- a/arch/arm/mach-omap2/board-tuna.c +++ b/arch/arm/mach-omap2/board-tuna.c @@ -336,6 +336,8 @@ static int uart1_rts_ctrl_write(struct file *file, const char __user *buffer, { char buf[10] = {0,}; + if (omap4_tuna_get_revision() < TUNA_REV_SAMPLE_4) + return -ENXIO; if (count > sizeof(buf) - 1) return -EINVAL; if (copy_from_user(buf, buffer, count)) @@ -820,7 +822,8 @@ static struct omap_board_mux board_wkup_mux[] __initdata = { #define board_wkup_mux NULL #endif -static struct omap_device_pad tuna_uart1_pads[] __initdata = { +/* sample4+ adds gps rts/cts lines */ +static struct omap_device_pad tuna_uart1_pads_sample4[] __initdata = { { .name = "mcspi1_cs3.uart1_rts", .flags = OMAP_DEVICE_PAD_REMUX, @@ -843,6 +846,18 @@ static struct omap_device_pad tuna_uart1_pads[] __initdata = { }, }; +static struct omap_device_pad tuna_uart1_pads[] __initdata = { + { + .name = "uart3_cts_rctx.uart1_tx", + .enable = OMAP_PIN_OUTPUT | OMAP_MUX_MODE1, + }, + { + .name = "mcspi1_cs1.uart1_rx", + .flags = OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP, + .enable = OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE1, + .idle = OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE1, + }, +}; static struct omap_device_pad tuna_uart2_pads[] __initdata = { { @@ -899,8 +914,18 @@ static struct omap_uart_port_info tuna_uart2_info __initdata = { static inline void __init board_serial_init(void) { - omap_serial_init_port_pads(0, tuna_uart1_pads, - ARRAY_SIZE(tuna_uart1_pads), NULL); + struct omap_device_pad *uart1_pads; + int uart1_pads_sz; + + if (omap4_tuna_get_revision() >= TUNA_REV_SAMPLE_4) { + uart1_pads = tuna_uart1_pads_sample4; + uart1_pads_sz = ARRAY_SIZE(tuna_uart1_pads_sample4); + } else { + uart1_pads = tuna_uart1_pads; + uart1_pads_sz = ARRAY_SIZE(tuna_uart1_pads); + } + + omap_serial_init_port_pads(0, uart1_pads, uart1_pads_sz, NULL); omap_serial_init_port_pads(1, tuna_uart2_pads, ARRAY_SIZE(tuna_uart2_pads), &tuna_uart2_info); omap_serial_init_port_pads(2, tuna_uart3_pads, diff --git a/arch/arm/mach-omap2/board-tuna.h b/arch/arm/mach-omap2/board-tuna.h index 8d42ef1..1326810 100644 --- a/arch/arm/mach-omap2/board-tuna.h +++ b/arch/arm/mach-omap2/board-tuna.h @@ -16,6 +16,7 @@ #define TUNA_REV_MASK 0xf #define TUNA_REV_03 0x3 +#define TUNA_REV_SAMPLE_4 0x3 #define TUNA_TYPE_TORO 0x10 #define TUNA_TYPE_MAGURO 0x00 |