From: Stephen Boyd <sboyd@codeaurora.org>
To: Nicolas Pitre <nico@fluxnic.net>
Cc: David Brown <davidb@codeaurora.org>,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/2] msm: Support DEBUG_LL on MSM8660 and MSM8960
Date: Wed, 28 Sep 2011 22:39:46 -0700 [thread overview]
Message-ID: <4E8404A2.10702@codeaurora.org> (raw)
In-Reply-To: <alpine.LFD.2.02.1109290012400.9106@xanadu.home>
On 9/28/2011 9:21 PM, Nicolas Pitre wrote:
> On Wed, 28 Sep 2011, Stephen Boyd wrote:
>
>
>> .macro senduart,rd,rx
>> +#ifdef CONFIG_MSM_HAS_DEBUG_UART_HS
>> + @ Clear TX_READY by writing to the UARTDM_CR register
>> + mov r12, #0x300
>> + str r12, [\rx, #0x10]
>> + @ Write 0x1 to NCF register
>> + mov r12, #0x1
>> + str r12, [\rx, #0x40]
>> + @ UARTDM reg. Read to induce delay
>> + ldr r12, [\rx, #0x08]
>> + @ Write the 1 character to UARTDM_TF
>> + str \rd, [\rx, #0x70]
> This is a really bad idea to pick a register (r12) when the calling code
> is completely unaware of that. This _will_ break on you someday.
>
> Except for the last line, why didn't you simply fold this code into the
> waituart macro instead?
We need to configure the uart to be ready for a write and it didn't seem
appropriate to put that in the waituart macro because it isn't actually
waiting for anything. I suppose putting it after the waiting is fine
though and avoids future breakage. Thanks.
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
WARNING: multiple messages have this Message-ID (diff)
From: sboyd@codeaurora.org (Stephen Boyd)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] msm: Support DEBUG_LL on MSM8660 and MSM8960
Date: Wed, 28 Sep 2011 22:39:46 -0700 [thread overview]
Message-ID: <4E8404A2.10702@codeaurora.org> (raw)
In-Reply-To: <alpine.LFD.2.02.1109290012400.9106@xanadu.home>
On 9/28/2011 9:21 PM, Nicolas Pitre wrote:
> On Wed, 28 Sep 2011, Stephen Boyd wrote:
>
>
>> .macro senduart,rd,rx
>> +#ifdef CONFIG_MSM_HAS_DEBUG_UART_HS
>> + @ Clear TX_READY by writing to the UARTDM_CR register
>> + mov r12, #0x300
>> + str r12, [\rx, #0x10]
>> + @ Write 0x1 to NCF register
>> + mov r12, #0x1
>> + str r12, [\rx, #0x40]
>> + @ UARTDM reg. Read to induce delay
>> + ldr r12, [\rx, #0x08]
>> + @ Write the 1 character to UARTDM_TF
>> + str \rd, [\rx, #0x70]
> This is a really bad idea to pick a register (r12) when the calling code
> is completely unaware of that. This _will_ break on you someday.
>
> Except for the last line, why didn't you simply fold this code into the
> waituart macro instead?
We need to configure the uart to be ready for a write and it didn't seem
appropriate to put that in the waituart macro because it isn't actually
waiting for anything. I suppose putting it after the waiting is fine
though and avoids future breakage. Thanks.
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
next prev parent reply other threads:[~2011-09-29 5:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-28 21:05 [PATCH 0/2] Update MSM DEBUG_LL support Stephen Boyd
2011-09-28 21:05 ` Stephen Boyd
2011-09-28 21:05 ` [PATCH 1/2] msm: Consolidate and move DEBUG_LL to generic ARM Kconfig Stephen Boyd
2011-09-28 21:05 ` Stephen Boyd
2011-09-28 23:50 ` David Brown
2011-09-28 23:50 ` David Brown
2011-09-28 21:05 ` [PATCH 2/2] msm: Support DEBUG_LL on MSM8660 and MSM8960 Stephen Boyd
2011-09-28 21:05 ` Stephen Boyd
2011-09-29 4:21 ` Nicolas Pitre
2011-09-29 4:21 ` Nicolas Pitre
2011-09-29 5:39 ` Stephen Boyd [this message]
2011-09-29 5:39 ` Stephen Boyd
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=4E8404A2.10702@codeaurora.org \
--to=sboyd@codeaurora.org \
--cc=davidb@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nico@fluxnic.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.