RE: [PATCH v2] omap: serial: fix non-empty uart fifo read abort

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




>-----Original Message-----
>From: Tony Lindgren [mailto:tony@xxxxxxxxxxx]
>Sent: Friday, December 04, 2009 1:04 PM
>To: Pandita, Vikram
>Cc: linux-omap@xxxxxxxxxxxxxxx; Cousson, Benoit
>Subject: Re: [PATCH v2] omap: serial: fix non-empty uart fifo read abort
>
<snip>
>> +
>> +#ifdef CONFIG_ARCH_OMAP4
>> +		/* Never read empty UART fifo on omap4 */
>> +		p->serial_in = serial_in_override;
>> +#else
>> +		/* OMAP2/3 */
>> +		/* Never read empty UART fifo on UARTs with IP rev >=0x52 */
>> +		if ((serial_read_reg(uart->p, UART_OMAP_MVER) & 0xFF)
>> +				>= UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV)
>> +			uart->p->serial_in = serial_in_override;
>> +#endif
>>  	}
>>  }
>
>We need to avoid ifdef else stuff, that just causes problems compiling
>in support for many omaps. In theory, we should be able to compile in
>support for all omaps starting with 16xx with v5 options..
>
>Using cpu_is_omapxxxx() should do the trick here.

The intent was to have check entirely based of UART IP revision.
That worked fine for omap3xxx. But omap4 has totally different IP revision register (as per commit message)

But I can see the point, and v3 of patch I can replace:
#ifdef CONFIG_ARCH_OMAP4 by cpu_is_omap44xx()

I tried following what was done in current serial.c file of many #ifdef CONFIG_ARCH_OMAP4


>
>Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux