Skip to content

Commit

Permalink
Merge tag 'davinci-for-v3.8/fixes' of git://gitorious.org/linux-davin…
Browse files Browse the repository at this point in the history
…ci/linux-davinci into next/fixes-non-critical

From Sekhar Nori:

These changes include a fix in uncompress.h which is
triggered only when using DT and other fixes found
by automated scripts and a correction in comment text.

* tag 'davinci-for-v3.8/fixes' of git://gitorious.org/linux-davinci/linux-davinci:
  ARM: davinci: fix return value check by using IS_ERR in tnetv107x_devices_init()
  ARM: davinci: uncompress.h: bail out if uart not initialized
  ARM: davinci: serial.h: fix uart number in the comment
  ARM: davinci: dm644x evm: move pointer dereference below NULL check
  • Loading branch information
Olof Johansson committed Nov 6, 2012
2 parents eb04507 + 5a6a861 commit 98fb96a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
5 changes: 3 additions & 2 deletions arch/arm/mach-davinci/board-dm644x-evm.c
Original file line number Diff line number Diff line change
Expand Up @@ -519,13 +519,11 @@ static int dm6444evm_msp430_get_pins(void)
char buf[4];
struct i2c_msg msg[2] = {
{
.addr = dm6446evm_msp->addr,
.flags = 0,
.len = 2,
.buf = (void __force *)txbuf,
},
{
.addr = dm6446evm_msp->addr,
.flags = I2C_M_RD,
.len = 4,
.buf = buf,
Expand All @@ -536,6 +534,9 @@ static int dm6444evm_msp430_get_pins(void)
if (!dm6446evm_msp)
return -ENXIO;

msg[0].addr = dm6446evm_msp->addr;
msg[1].addr = dm6446evm_msp->addr;

/* Command 4 == get input state, returns port 2 and port3 data
* S Addr W [A] len=2 [A] cmd=4 [A]
* RS Addr R [A] [len=4] A [cmd=4] A [port2] A [port3] N P
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-davinci/devices-tnetv107x.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ void __init tnetv107x_devices_init(struct tnetv107x_device_info *info)
* complete sample conversion in time.
*/
tsc_clk = clk_get(NULL, "sys_tsc_clk");
if (tsc_clk) {
if (!IS_ERR(tsc_clk)) {
error = clk_set_rate(tsc_clk, 5000000);
WARN_ON(error < 0);
clk_put(tsc_clk);
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-davinci/include/mach/serial.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

#ifndef __ASSEMBLY__
struct davinci_uart_config {
/* Bit field of UARTs present; bit 0 --> UART1 */
/* Bit field of UARTs present; bit 0 --> UART0 */
unsigned int enabled_uarts;
};

Expand Down
6 changes: 6 additions & 0 deletions arch/arm/mach-davinci/include/mach/uncompress.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,19 @@ u32 *uart;
/* PORT_16C550A, in polled non-fifo mode */
static void putc(char c)
{
if (!uart)
return;

while (!(uart[UART_LSR] & UART_LSR_THRE))
barrier();
uart[UART_TX] = c;
}

static inline void flush(void)
{
if (!uart)
return;

while (!(uart[UART_LSR] & UART_LSR_THRE))
barrier();
}
Expand Down

0 comments on commit 98fb96a

Please sign in to comment.