From: Kevin Hilman <khilman@ti.com>
To: "Hiremath, Vaibhav" <hvaibhav@ti.com>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"tony@atomide.com" <tony@atomide.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"paul@pwsan.com" <paul@pwsan.com>,
"Mohammed, Afzal" <afzal@ti.com>
Subject: Re: [PATCH-V4 3/3] arm:omap:am33xx: Add low level debugging support
Date: Thu, 01 Dec 2011 07:00:31 -0800 [thread overview]
Message-ID: <87pqg8s5f4.fsf@ti.com> (raw)
In-Reply-To: <79CD15C6BA57404B839C016229A409A80474A5@DBDE01.ent.ti.com> (Vaibhav Hiremath's message of "Thu, 1 Dec 2011 10:52:52 +0000")
"Hiremath, Vaibhav" <hvaibhav@ti.com> writes:
>> Vaibhav Hiremath <hvaibhav@ti.com> writes:
>>
>> > From: Afzal Mohammed <afzal@ti.com>
>> >
>> > Add support for low level debugging on AM335X EVM (AM33XX family).
>> > Currently only support for UART1 console, which is used on AM335X EVM
>> > is added.
>> >
>> > Signed-off-by: Afzal Mohammed <afzal@ti.com>
>> > Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
>>
>> One minor comment below...
>>
>> > ---
>> > arch/arm/mach-omap2/include/mach/debug-macro.S | 17 ++++++++++++++++-
>> > arch/arm/plat-omap/include/plat/serial.h | 4 ++++
>> > arch/arm/plat-omap/include/plat/uncompress.h | 6 ++++++
>> > 3 files changed, 26 insertions(+), 1 deletions(-)
>> >
>> > diff --git a/arch/arm/mach-omap2/include/mach/debug-macro.S
>> b/arch/arm/mach-omap2/include/mach/debug-macro.S
>> > index 13f98e5..ce543ae 100644
>> > --- a/arch/arm/mach-omap2/include/mach/debug-macro.S
>> > +++ b/arch/arm/mach-omap2/include/mach/debug-macro.S
>> > @@ -72,6 +72,8 @@ omap_uart_lsr: .word 0
>> > beq 82f @ configure UART2
>> > cmp \rp, #TI816XUART3 @ ti816x UART offsets different
>> > beq 83f @ configure UART3
>> > + cmp \rp, #AM33XXUART1 @ AM33XX UART offsets different
>> > + beq 84f @ configure UART1
>> > cmp \rp, #ZOOM_UART @ only on zoom2/3
>> > beq 95f @ configure ZOOM_UART
>> >
>> > @@ -100,7 +102,9 @@ omap_uart_lsr: .word 0
>> > b 98f
>> > 83: mov \rp, #UART_OFFSET(TI816X_UART3_BASE)
>> > b 98f
>> > -
>> > +84: ldr \rp, =AM33XX_UART1_BASE
>> > + and \rp, \rp, #0x00ffffff
>> > + b 97f
>> > 95: ldr \rp, =ZOOM_UART_BASE
>> > str \rp, [\tmp, #0] @ omap_uart_phys
>> > ldr \rp, =ZOOM_UART_VIRT
>> > @@ -110,6 +114,17 @@ omap_uart_lsr: .word 0
>> > b 10b
>> >
>> > /* Store both phys and virt address for the uart */
>>
>> Please update this comment to clarify that this block is for AM33xx
>> only, and update the following one as the catch all.
>>
> Ok, will update.
>
>> > +97: add \rp, \rp, #0x44000000 @ phys base
>> > + str \rp, [\tmp, #0] @ omap_uart_phys
>> > + sub \rp, \rp, #0x44000000 @ phys base
>> > + add \rp, \rp, #0xf9000000 @ virt base
>> > + str \rp, [\tmp, #4] @ omap_uart_virt
>> > + mov \rp, #(UART_LSR << OMAP_PORT_SHIFT)
>> > + str \rp, [\tmp, #8] @ omap_uart_lsr
>>
>> The last 3 lines are unnecessarily duplicated. They can be shared with
>> the common block that follows. IOW, only the base addresses are
>> different, the rest of the operations are shared.
>>
> I thought about this, but then code looks complex & ugly, just to save
> duplication of 3 lines. So I added separate code for AM33xx devices.
Yeah, you're right.
Your original version is better. Please just update the comments
around the 2 blocks then.
Thanks,
Kevin
next prev parent reply other threads:[~2011-12-01 15:00 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-10 17:40 [PATCH-V4 0/3] Introducing TI's New SoC/board AM335XEVM Vaibhav Hiremath
2011-11-10 17:40 ` [PATCH-V4 1/3] arm:omap:am33xx: Update common OMAP machine specific sources Vaibhav Hiremath
2011-11-10 17:40 ` [PATCH-V4 2/3] arm:omap:am33xx: Add AM335XEVM machine support Vaibhav Hiremath
2011-11-10 17:40 ` [PATCH-V4 3/3] arm:omap:am33xx: Add low level debugging support Vaibhav Hiremath
2011-11-30 23:33 ` Kevin Hilman
2011-12-01 10:52 ` Hiremath, Vaibhav
2011-12-01 15:00 ` Kevin Hilman [this message]
2011-11-30 23:39 ` [PATCH-V4 0/3] Introducing TI's New SoC/board AM335XEVM Kevin Hilman
2011-12-01 11:07 ` Hiremath, Vaibhav
2011-12-01 15:10 ` Kevin Hilman
2011-12-02 4:36 ` Mohammed, Afzal
2011-12-02 17:33 ` Kevin Hilman
2011-12-20 12:15 ` Hiremath, Vaibhav
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=87pqg8s5f4.fsf@ti.com \
--to=khilman@ti.com \
--cc=afzal@ti.com \
--cc=hvaibhav@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=paul@pwsan.com \
--cc=tony@atomide.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;
as well as URLs for NNTP newsgroup(s).