From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 16/28] ddr: altera: sdram: Clean up sdram_mmr_init_full() part 4
Date: Wed, 5 Aug 2015 18:12:32 +0200 [thread overview]
Message-ID: <201508051812.32931.marex@denx.de> (raw)
In-Reply-To: <55C232FC.5050807@opensource.altera.com>
On Wednesday, August 05, 2015 at 05:59:56 PM, Dinh Nguyen wrote:
> On 8/1/15 4:34 PM, Marek Vasut wrote:
> > Merge sdr_set_*() functions which are just setting registers among
> > the sea of register setting in sdram_mmr_init_full(). There is no
> > need to keep them separate this way, there is nothing special about
> > them.
> >
> > Signed-off-by: Marek Vasut <marex@denx.de>
> > ---
> >
> > drivers/ddr/altera/sdram.c | 98
> > +++++++++++++++++----------------------------- 1 file changed, 36
> > insertions(+), 62 deletions(-)
> >
> > diff --git a/drivers/ddr/altera/sdram.c b/drivers/ddr/altera/sdram.c
> > index 595f2a4..199e8b8 100644
> > --- a/drivers/ddr/altera/sdram.c
> > +++ b/drivers/ddr/altera/sdram.c
> > @@ -501,24 +501,6 @@ static void set_sdr_ctrlcfg(struct
> > socfpga_sdram_config *cfg)
> >
> > writel(ctrl_cfg, &sdr_ctrl->ctrl_cfg);
> >
> > }
>
> <snip>
>
> > @@ -586,7 +530,22 @@ unsigned sdram_mmr_init_full(unsigned int
> > sdr_phy_reg)
> >
> > writel(rows, &sysmgr_regs->iswgrp_handoff[4]);
> >
> > set_sdr_ctrlcfg(cfg);
> >
> > - set_sdr_dram_timing(cfg);
> > +
> > + debug("Configuring DRAMTIMING1\n");
> > + writel(cfg->dram_timing1, &sdr_ctrl->dram_timing1);
> > +
> > + debug("Configuring DRAMTIMING2\n");
> > + writel(cfg->dram_timing2, &sdr_ctrl->dram_timing2);
> > +
> > + debug("Configuring DRAMTIMING3\n");
> > + writel(cfg->dram_timing3, &sdr_ctrl->dram_timing3);
> > +
> > + debug("Configuring DRAMTIMING4\n");
> > + writel(cfg->dram_timing4, &sdr_ctrl->dram_timing4);
> > +
> > + debug("Configuring LOWPWRTIMING\n");
> > + writel(cfg->lowpwr_timing, &sdr_ctrl->lowpwr_timing);
> > +
>
> I don't think we need all of these debug prints?
Me neither ;-) I think there's waaaay too many (useless) debug() prints
throughout the entire DDR driver, not only here. I tried to preserve the
debug prints in their pristine state so far.
I think that in sequencer.c, the debug prints cause even more mess,
since there is a lot of code only to cater for printing debug stuff.
All kinda of variables get computed only to be used in some debug()
print and then discarded. I think a lot of code could be removed from
there if we discard those debug() prints.
I'd be happy if someone does a debug() print cleanup once things settle.
Would you like to prepare the patches ? :-)
Best regards,
Marek Vasut
next prev parent reply other threads:[~2015-08-05 16:12 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-01 21:34 [U-Boot] [PATCH 00/28] socfpga: sdram.c cleanups Marek Vasut
2015-08-01 21:34 ` [U-Boot] [PATCH 01/28] ddr: altera: sdram: Switch to generic_hweight32() Marek Vasut
2015-08-01 21:34 ` [U-Boot] [PATCH 02/28] ddr: altera: sdram: Clean up compute_errata_rows() part 1 Marek Vasut
2015-08-01 21:34 ` [U-Boot] [PATCH 03/28] ddr: altera: sdram: Clean up compute_errata_rows() part 2 Marek Vasut
2015-08-01 21:34 ` [U-Boot] [PATCH 04/28] ddr: altera: sdram: Clean up set_sdr_ctrlcfg() Marek Vasut
2015-08-01 21:34 ` [U-Boot] [PATCH 05/28] ddr: altera: sdram: Clean up set_sdr_dram_timing*() Marek Vasut
2015-08-01 21:34 ` [U-Boot] [PATCH 06/28] ddr: altera: sdram: Clean up set_sdr_addr_rw() Marek Vasut
2015-08-01 21:34 ` [U-Boot] [PATCH 07/28] ddr: altera: sdram: Clean up set_sdr_static_cfg() Marek Vasut
2015-08-01 21:34 ` [U-Boot] [PATCH 08/28] ddr: altera: sdram: Clean up set_sdr_fifo_cfg() Marek Vasut
2015-08-01 21:34 ` [U-Boot] [PATCH 09/28] ddr: altera: sdram: Clean up set_sdr_mp_weight() Marek Vasut
2015-08-01 21:34 ` [U-Boot] [PATCH 10/28] ddr: altera: sdram: Clean up set_sdr_mp_pacing() Marek Vasut
2015-08-01 21:34 ` [U-Boot] [PATCH 11/28] ddr: altera: sdram: Clean up set_sdr_mp_threshold() Marek Vasut
2015-08-01 21:34 ` [U-Boot] [PATCH 12/28] ddr: altera: sdram: Introduce socfpga_sdram_config() structure Marek Vasut
2015-08-01 21:34 ` [U-Boot] [PATCH 13/28] ddr: altera: sdram: Clean up sdram_mmr_init_full() part 1 Marek Vasut
2015-08-01 21:34 ` [U-Boot] [PATCH 14/28] ddr: altera: sdram: Clean up sdram_mmr_init_full() part 2 Marek Vasut
2015-08-01 21:34 ` [U-Boot] [PATCH 15/28] ddr: altera: sdram: Clean up sdram_mmr_init_full() part 3 Marek Vasut
2015-08-01 21:34 ` [U-Boot] [PATCH 16/28] ddr: altera: sdram: Clean up sdram_mmr_init_full() part 4 Marek Vasut
2015-08-05 15:59 ` Dinh Nguyen
2015-08-05 16:12 ` Marek Vasut [this message]
2015-08-01 21:34 ` [U-Boot] [PATCH 17/28] ddr: altera: sdram: Clean up sdram_mmr_init_full() part 5 Marek Vasut
2015-08-01 21:34 ` [U-Boot] [PATCH 18/28] ddr: altera: sdram: Clean up sdram_mmr_init_full() part 6 Marek Vasut
2015-08-01 21:34 ` [U-Boot] [PATCH 19/28] ddr: altera: sdram: Clean up sdram_mmr_init_full() part 7 Marek Vasut
2015-08-01 21:34 ` [U-Boot] [PATCH 20/28] ddr: altera: sdram: Clean up sdram_mmr_init_full() part 8 Marek Vasut
2015-08-01 21:34 ` [U-Boot] [PATCH 21/28] ddr: altera: sdram: Introduce socfpga_sdram_get_config() Marek Vasut
2015-08-01 21:34 ` [U-Boot] [PATCH 22/28] ddr: altera: sdram: Clean up sdram_calculate_size() part 1 Marek Vasut
2015-08-01 21:34 ` [U-Boot] [PATCH 23/28] ddr: altera: sdram: Clean up sdram_calculate_size() part 2 Marek Vasut
2015-08-01 21:34 ` [U-Boot] [PATCH 24/28] ddr: altera: sdram: Clean up sdram_write_verify() Marek Vasut
2015-08-01 21:34 ` [U-Boot] [PATCH 25/28] ddr: altera: sdram: Add missing kerneldoc Marek Vasut
2015-08-01 21:34 ` [U-Boot] [PATCH 26/28] ddr: altera: sdram: Minor cleanup in sdram_set_rule() Marek Vasut
2015-08-01 21:34 ` [U-Boot] [PATCH 27/28] ddr: altera: sdram: Minor cleanup in sdram_get_rule() Marek Vasut
2015-08-01 21:34 ` [U-Boot] [PATCH 28/28] ddr: altera: sdram: Make sdram_start and sdram_end into u32 Marek Vasut
2015-08-03 17:51 ` [U-Boot] [PATCH 00/28] socfpga: sdram.c cleanups Marek Vasut
2015-08-05 16:26 ` Dinh Nguyen
2015-08-05 19:46 ` Marek Vasut
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=201508051812.32931.marex@denx.de \
--to=marex@denx.de \
--cc=u-boot@lists.denx.de \
/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