From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Emil Velikov <emil.l.velikov@gmail.com>
Cc: Dave Airlie <airlied@redhat.com>,
ML dri-devel <dri-devel@lists.freedesktop.org>,
Egbert Eich <eich@suse.com>
Subject: Re: [PATCH 2/2] drm/ast: Support AST2500
Date: Fri, 17 Feb 2017 08:17:02 +1100 [thread overview]
Message-ID: <1487279822.23576.88.camel@kernel.crashing.org> (raw)
In-Reply-To: <CACvgo53uiGxGRRteGGCaGMDyYsyEi3j8CZeVszFdthAU0iXfcQ@mail.gmail.com>
On Thu, 2017-02-16 at 17:33 +0000, Emil Velikov wrote:
> > +static bool ast_dram_init_2500(struct ast_private *ast)
> > +{
> > + u32 data;
> > + u32 max_tries = 5;
> > +
> > + do {
> > + if (max_tries-- == 0)
> > + return false;
> > + set_mpll_2500(ast);
> > + reset_mmc_2500(ast);
> > + ddr_init_common_2500(ast);
> > +
> > + data = ast_mindwm(ast, 0x1E6E2070);
> > + if (data & 0x01000000)
> > + ddr4_init_2500(ast, ast2500_ddr4_1600_timing_table);
> > + else
> > + ddr3_init_2500(ast, ast2500_ddr3_1600_timing_table);
> > + } while (!ddr_test_2500(ast));
> > +
> > + ast_moutdwm(ast, 0x1E6E2040, ast_mindwm(ast, 0x1E6E2040) | 0x41);
> > +
> > + /* Patch code */
> > + data = ast_mindwm(ast, 0x1E6E200C) & 0xF9FFFFFF;
> > + ast_moutdwm(ast, 0x1E6E200C, data | 0x10000000);
> > +
> > + return true;
>
> Drop the return type - function always returns true ?
> I think there were a few other functions that could do the same.
It's not. I added a timeout with a return false ;-)
Cheers,
Ben.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2017-02-16 21:17 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-16 9:09 [PATCH 2/2] drm/ast: Support AST2500 Benjamin Herrenschmidt
2017-02-16 11:40 ` Benjamin Herrenschmidt
2017-02-16 17:33 ` Emil Velikov
2017-02-16 21:09 ` Benjamin Herrenschmidt
2017-02-17 21:27 ` Emil Velikov
2017-02-17 21:36 ` Benjamin Herrenschmidt
2017-02-18 14:55 ` Emil Velikov
2017-02-18 3:41 ` Benjamin Herrenschmidt
2017-02-18 15:43 ` Emil Velikov
2017-02-18 22:22 ` Benjamin Herrenschmidt
2017-02-20 15:21 ` Emil Velikov
2017-02-16 21:12 ` Benjamin Herrenschmidt
2017-02-16 21:14 ` Benjamin Herrenschmidt
2017-02-16 21:16 ` Benjamin Herrenschmidt
2017-02-16 21:17 ` Benjamin Herrenschmidt [this message]
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=1487279822.23576.88.camel@kernel.crashing.org \
--to=benh@kernel.crashing.org \
--cc=airlied@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=eich@suse.com \
--cc=emil.l.velikov@gmail.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 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.