From: Amit Virdi <amit.virdi@st.com>
To: Wolfgang Grandegger <wg@grandegger.com>
Cc: "linux-can@vger.kernel.org" <linux-can@vger.kernel.org>,
"mkl@pengutronix.de" <mkl@pengutronix.de>,
Bhupesh SHARMA <bhupesh.sharma@st.com>,
"anilkumar@ti.com" <anilkumar@ti.com>,
spear-devel <spear-devel@list.st.com>
Subject: Re: [PATCH 2/3] can: c_can: Provide generic interface to configure c-can message objects
Date: Thu, 20 Dec 2012 16:23:04 +0530 [thread overview]
Message-ID: <50D2EE10.6090208@st.com> (raw)
In-Reply-To: <50D2E7DE.5030808@grandegger.com>
On 12/20/2012 3:56 PM, Wolfgang Grandegger wrote:
> On 12/20/2012 11:05 AM, Amit Virdi wrote:
>> Depending on the underlying platform, the configuration of the c-can
>> message objects can change. For e.g. in some systems, it makes more
>> sense to receive many message objects and transmit very few. In any
>> case, providing flexibility in configuring the message objects is highly
>> desirable.
>>
>> The total number of message objects for C_CAN controller is fixed at 32.
>> The receive message objects are assigned higher priority so they begin
>> with message object#1. So, in order to configure the message object the
>> driver just needs two parameters - rx_split (for differentiating between
>> lower bucket and higher bucket) and tx_num.
>
> What is your motivation to make this configurable?
> Why is the current default not good enough?
By default the number of receive message objects is kept equal to the
number of transmit message objects (16). However, we had some practical
use cases in which it was expected that the controller would receive
more number of message objects than it would transmit. The current
configuration didn't result in an efficient behavior. Maybe, Bhupesh can
elaborate this point in more detail.
>
>> However, if the user doesn't specify these parameters, then the message
>> objects are configured with default parameters with equal distribution
>> of receive and transmit message objects (16 each).
>>
>> Signed-off-by: Amit Virdi<amit.virdi@st.com>
>> Cc: Bhupesh Sharma<bhupesh.sharma@st.com>
>> Reviewed-by: Shiraz Hashim<shiraz.hashim@st.com>
>> ---
>> .../devicetree/bindings/net/can/c_can.txt | 55 ++++++++++--
>> drivers/net/can/c_can/c_can.c | 100 ++++++++++++---------
>> drivers/net/can/c_can/c_can.h | 16 +++-
>> drivers/net/can/c_can/c_can_platform.c | 47 +++++++++-
>> 4 files changed, 168 insertions(+), 50 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/net/can/c_can.txt b/Documentation/devicetree/bindings/net/can/c_can.txt
>> index 7d645cb..4ddd127 100644
>> --- a/Documentation/devicetree/bindings/net/can/c_can.txt
>> +++ b/Documentation/devicetree/bindings/net/can/c_can.txt
>> @@ -8,20 +8,25 @@ Required properties:
>> registers map
>> - interrupts : property with a value describing the interrupt
>> number
>> -
>> Optional properties:
>> +
>> - ti,hwmods : Must be "d_can<n>" or "c_can<n>", n being the
>> instance number
>> +- rx_split : Receive message objects lying in the lower bucket
>> +- tx_num : Total number of transmit message objects
>> - reg_alignment : Signifies register alignment. Must be either of
>> 1. 0x8 or 0x10 - If registers are 16-bit aligned
>> 2. 0x18 - If registers are 32-bit aligned
>> Default is 32-bit alignment.
>
> I would prefer "reg_alignment" in bytes. 0x4 is much more readable than
> 0x18.
>
Ok, that's true. I'll modify it in V2.
[..]
Regards
Amit Virdi
next prev parent reply other threads:[~2012-12-20 10:53 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-20 10:05 [PATCH 0/3] c_can: Update can support Amit Virdi
2012-12-20 10:05 ` [PATCH 1/3] can: c_can: Correct register alignment info passing through DT Amit Virdi
2012-12-20 13:59 ` Marc Kleine-Budde
2013-01-16 7:40 ` Amit Virdi
2012-12-20 10:05 ` [PATCH 2/3] can: c_can: Provide generic interface to configure c-can message objects Amit Virdi
2012-12-20 10:26 ` Wolfgang Grandegger
2012-12-20 10:53 ` Amit Virdi [this message]
2012-12-20 11:06 ` Bhupesh SHARMA
2012-12-20 11:12 ` Wolfgang Grandegger
2012-12-20 11:18 ` Amit Virdi
2012-12-20 12:20 ` Wolfgang Grandegger
2012-12-20 14:04 ` Marc Kleine-Budde
2012-12-20 20:13 ` Wolfgang Grandegger
2013-01-16 7:45 ` Amit Virdi
2013-01-16 8:25 ` Bhupesh SHARMA
2013-01-16 9:01 ` Wolfgang Grandegger
2013-01-16 9:03 ` Wolfgang Grandegger
2013-01-16 9:11 ` Amit Virdi
2012-12-20 10:05 ` [PATCH 3/3] can: c_can: Enable clock before first use Amit Virdi
2012-12-20 14:07 ` Marc Kleine-Budde
2013-01-16 8:03 ` Amit Virdi
2013-01-16 9:54 ` AnilKumar, Chimata
2013-01-16 13:53 ` Rafael J. Wysocki
2012-12-20 13:57 ` [PATCH 0/3] c_can: Update can support Marc Kleine-Budde
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=50D2EE10.6090208@st.com \
--to=amit.virdi@st.com \
--cc=anilkumar@ti.com \
--cc=bhupesh.sharma@st.com \
--cc=linux-can@vger.kernel.org \
--cc=mkl@pengutronix.de \
--cc=spear-devel@list.st.com \
--cc=wg@grandegger.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).