From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Robert ABEL <rabel@cit-ec.uni-bielefeld.de>,
balbi@ti.com, rogerq@ti.com, linux-omap@vger.kernel.org
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
tony@atomide.com, linux@arm.linux.org.uk
Subject: Re: [PATCH 4/8] ARM OMAP2+ GPMC: change get_gpmc_timing_reg output for DTS
Date: Thu, 26 Feb 2015 18:06:18 +0300 [thread overview]
Message-ID: <54EF366A.2050108@cogentembedded.com> (raw)
In-Reply-To: <1424961956-29353-5-git-send-email-rabel@cit-ec.uni-bielefeld.de>
Hello.
On 02/26/2015 05:45 PM, Robert ABEL wrote:
> DTS output was formatted to require additional work when copy-pasting into DTS.
> Nano-second timings were replaced with interval of values that produce the same
> number of clock ticks.
> Signed-off-by: Robert ABEL <rabel@cit-ec.uni-bielefeld.de>
> ---
> drivers/memory/omap-gpmc.c | 35 ++++++++++++++++++++++++++---------
> 1 file changed, 26 insertions(+), 9 deletions(-)
> diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
> index dbb6753..9340e7a 100644
> --- a/drivers/memory/omap-gpmc.c
> +++ b/drivers/memory/omap-gpmc.c
> @@ -337,32 +337,49 @@ static void gpmc_cs_bool_timings(int cs, const struct gpmc_bool_timings *p)
> }
>
> #ifdef DEBUG
> +/**
> + * get_gpmc_timing_reg - read a timing parameter and print DTS settings for it.
> + * @cs Chip Select Region
Documentation/kernel-doc-nano-HOWTO.txt requires colons after the
parameter names, doesn't it?
> + * @reg GPMC_CS_CONFIGn register offset.
> + * @st_bit Start Bit
> + * @end_bit End Bit. Must be >= @st_bit.
> + * @name DTS node name, w/o "gpmc,"
> + * @raw Raw Format Option.
> + * raw format: gpmc,name = <value>
> + * tick format: gpmc,name = <value> /‍*(x ns -- y ns]; x ticks *‍/
> + * Where (x ns -- y ns] is the half-open interval from x ns to y ns that
> + * result in the same tick value.
> + * @noval Parameter values equal to 0 are not printed.
> + * @shift Parameter value left shifts @shift, which is then printed instead of value.
> + *
You should also describe the meaning of the function's result in a
"Return:" section.
> + */
> static int get_gpmc_timing_reg(int cs, int reg, int st_bit, int end_bit,
> bool raw, bool noval, int shift,
> const char *name)
> {
> u32 l;
> - int nr_bits, max_value, mask;
> + int nr_bits;
> + int mask;
>
> l = gpmc_cs_read_reg(cs, reg);
> nr_bits = end_bit - st_bit + 1;
> - max_value = (1 << nr_bits) - 1;
> - mask = max_value << st_bit;
> - l = (l & mask) >> st_bit;
> + mask = (1 << nr_bits) - 1;
BIT(nr_bits) - 1, perhaps?
WBR, Sergei
next prev parent reply other threads:[~2015-02-26 15:06 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-26 14:45 [PATCH 0/8] ARM OMAP2+ GPMC: fixes and bus children Robert ABEL
2015-02-26 14:45 ` [PATCH 1/8] ARM OMAP2+ GPMC: don't undef DEBUG Robert ABEL
2015-02-26 14:45 ` [PATCH 2/8] ARM OMAP2+ GPMC: add bus children Robert ABEL
2015-02-27 10:24 ` Roger Quadros
2015-02-27 15:08 ` Robert Abel
2015-03-03 10:09 ` Roger Quadros
2015-03-03 10:43 ` Robert Abel
2015-02-26 14:45 ` [PATCH 4/8] ARM OMAP2+ GPMC: fix debug output alignment Robert ABEL
2015-02-26 14:45 ` [PATCH 4/8] ARM OMAP2+ GPMC: change get_gpmc_timing_reg output for DTS Robert ABEL
2015-02-26 15:06 ` Sergei Shtylyov [this message]
2015-02-27 14:17 ` Robert Abel
2015-02-27 14:23 ` Sergei Shtylyov
2015-02-27 15:51 ` Tony Lindgren
2015-02-27 10:43 ` Roger Quadros
2015-02-27 14:05 ` Robert Abel
2015-02-26 14:45 ` [PATCH 5/8] ARM OMAP2+ GPMC: always program GPMCFCLKDIVIDER Robert ABEL
2015-02-26 14:45 ` [PATCH 6/8] ARM OMAP2+ GPMC: calculate GPMCFCLKDIVIDER based on WAITMONITORINGTIME Robert ABEL
2015-02-26 14:45 ` [PATCH 7/8] ARM OMAP2+ GPMC: fix WAITMONITORINGTIME divider bug Robert ABEL
2015-02-26 14:45 ` [PATCH 8/8] ARM OMAP2+ GPMC: fix programming/showing reserved timing parameters Robert ABEL
2015-03-03 12:53 ` [PATCH 0/8] ARM OMAP2+ GPMC: fixes and bus children Roger Quadros
2015-03-03 12:55 ` Roger Quadros
2015-03-03 12:59 ` Robert Abel
2015-03-06 0:59 ` Tony Lindgren
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=54EF366A.2050108@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=balbi@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=rabel@cit-ec.uni-bielefeld.de \
--cc=rogerq@ti.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).