From: Nishanth Menon <menon.nishanth@gmail.com>
To: "Pandita, Vikram" <vikram.pandita@ti.com>
Cc: Tony Lindgren <tony@atomide.com>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"Cousson, Benoit" <b-cousson@ti.com>
Subject: Re: [PATCH v2] omap: serial: fix non-empty uart fifo read abort
Date: Fri, 04 Dec 2009 22:16:08 +0200 [thread overview]
Message-ID: <4B196E08.8010701@gmail.com> (raw)
In-Reply-To: <FCCFB4CDC6E5564B9182F639FC35608702FAA0C9FC@dbde02.ent.ti.com>
Pandita, Vikram said the following on 12/04/2009 09:15 PM:
>
>> -----Original Message-----
>> From: Tony Lindgren [mailto:tony@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 majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
prev parent reply other threads:[~2009-12-04 20:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-03 23:29 [PATCH v2] omap: serial: fix non-empty uart fifo read abort Vikram Pandita
2009-12-04 19:04 ` Tony Lindgren
2009-12-04 19:15 ` Pandita, Vikram
2009-12-04 20:16 ` Nishanth Menon [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B196E08.8010701@gmail.com \
--to=menon.nishanth@gmail.com \
--cc=b-cousson@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=tony@atomide.com \
--cc=vikram.pandita@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox