Pandita, Vikram said the following on 12/04/2009 09:15 PM:
>   
>> -----Original Message-----
>> From: Tony Lindgren [mailto:t...@atomide.com]
>> Sent: Friday, December 04, 2009 1:04 PM
>> To: Pandita, Vikram
>> Cc: linux-omap@vger.kernel.org; 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
>   
a cleanup patch could be welcome as well :)
>
>   
>> Tony
>>     
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>   

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

Reply via email to