From: Chin Liang See <clsee@altera.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/1] socfpga: Consolidating reset code into reset_manager.c. Also separating reset configuration for virtual target and real hardware Cyclone V development kit
Date: Mon, 1 Jul 2013 08:43:39 -0500 [thread overview]
Message-ID: <1372686219.12363.3.camel@drezykow-VirtualBox.altera.com> (raw)
In-Reply-To: <20130701104615.GC26322@amd.pavel.ucw.cz>
Hi Pavel,
On Mon, 2013-07-01 at 12:46 +0200, ZY - pavel wrote:
> Hi!
>
> > > > @@ -21,6 +21,7 @@
> > > > void reset_cpu(ulong addr);
> > > > void reset_deassert_peripherals_handoff(void);
> > > >
> > > > +#if defined(CONFIG_SOCFPGA_VIRTUAL_TARGET)
> > > > struct socfpga_reset_manager {
> > > > u32 padding1;
> > > > u32 ctrl;
> > > > @@ -31,7 +32,23 @@ struct socfpga_reset_manager {
> > > > u32 per2_mod_reset;
> > > > u32 brg_mod_reset;
> > > > };
> > > > +#else
> > > > +struct socfpga_reset_manager {
> > > > + u32 status;
> > > > + u32 ctrl;
> > > > + u32 counts;
> > > > + u32 padding1;
> > > > + u32 mpu_mod_reset;
> > > > + u32 per_mod_reset;
> > > > + u32 per2_mod_reset;
> > > > + u32 brg_mod_reset;
> > > > +};
> > > > +#endif
> > > >
> > >
> > > Is it really needed to have two definitions of the struct? AFAICT,
> > > structures are same, except that some padding fields have names on
> > > real hardware. Thus, if we simply use "real-hardware" version on the
> > > emulator, it should work. Perhaps with some comments "this is not
> > > emulated on virtual target"...?
> >
> > We decided to leave the Virtual Platform code support within existing
> > code. We need to do that as we have some discrepancy between the real
> > hardware and the virtual platform. But this is only applicable for
> > Altera specific IP. :)
>
> That is okay... But notice that structure is same on both real
> hardware and virtual platform... (Just some fields have "paddingX"
> instead of name on virtual platform). If you remove the #ifdef it will
> work just fine.
>
> (You could add /* this is unimplemented on virtual platform */, or
> maybe even per-field ifdef. It will still be more readable.)
Oh.. I got your point now :)
Its a good suggestion and let me do it for next revision.
Chin Liang
>
> Thanks,
> Pavel
next prev parent reply other threads:[~2013-07-01 13:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAEM3b1DJTdP2QQMtH4_L4J7EJJqCzgRXrrzoR5d7P7j0YGQXOA@mail.gmail.com>
[not found] ` <0BB3B561D7068A4E89FD8E9ABFB538BEB3B2E44331@PG-ITMSG03.altera.priv.altera.com>
2013-06-27 13:27 ` [U-Boot] [PATCH 1/1] socfpga: Consolidating reset code into reset_manager.c. Also separating reset configuration for virtual target and real hardware Cyclone V development kit Chin Liang See
2013-06-28 11:44 ` Pavel Machek
2013-06-28 16:22 ` Chin Liang See
2013-06-28 20:48 ` [U-Boot] [PATCH v2 " Chin Liang See
2013-06-28 22:49 ` Wolfgang Denk
2013-07-01 10:46 ` [U-Boot] [PATCH " Pavel Machek
2013-07-01 13:43 ` Chin Liang See [this message]
2013-07-02 11:52 ` Pavel Machek
2013-07-01 14:16 ` [U-Boot] [PATCH v2 1/1] socfpga: Creating driver for Reset Manager Chin Liang See
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=1372686219.12363.3.camel@drezykow-VirtualBox.altera.com \
--to=clsee@altera.com \
--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 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.