From: Chin Liang See Date: Fri, 28 Jun 2013 11:22:37 -0500 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 In-Reply-To: <20130628114423.GE22234@amd.pavel.ucw.cz> References: <0BB3B561D7068A4E89FD8E9ABFB538BEB3B2E44331@PG-ITMSG03.altera.priv.altera.com> <20130628114423.GE22234@amd.pavel.ucw.cz> Message-ID: <1372436557.3106.16.camel@drezykow-VirtualBox.altera.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Pavel, On Fri, 2013-06-28 at 13:44 +0200, ZY - pavel wrote: > Hi! > > > socfpga: Consolidating reset code into reset_manager.c. Also separating > > reset configuration for virtual target and real hardware Cyclone V > > development kit > > > > Signed-off-by: Chin Liang See > > > +++ b/arch/arm/cpu/armv7/socfpga/reset_manager.c > > @@ -0,0 +1,50 @@ > > +/* > > + * Copyright Altera Corporation (C) <2013>. All rights reserved > > + * > > + * This program is free software; you can redistribute it and/or > > +modify it > > + * under the terms and conditions of the GNU General Public > > I sense some word wrapping... Noted and will send new patch > > > @@ -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. :) Thanks Chin Liang > Thanks, > Pavel