From: Jean-Christophe PLAGNIOL-VILLARD Date: Mon, 1 Jun 2009 17:09:04 +0200 Subject: [U-Boot] [PATCH] ARM Cortex A8: Move OMAP3 specific reset handler to OMAP3 code In-Reply-To: <4A22A8BD.4020302@googlemail.com> References: <1243668623-7994-1-git-send-email-dirk.behme@googlemail.com> <20090531115103.GA20818@game.jcrosoft.org> <4A22A8BD.4020302@googlemail.com> Message-ID: <20090601150904.GB6399@game.jcrosoft.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 17:56 Sun 31 May , Dirk Behme wrote: > Dear Jean-Christophe, > > Jean-Christophe PLAGNIOL-VILLARD wrote: >> On 09:30 Sat 30 May , Dirk Behme wrote: >>> Reset is SoC specific and not ARM Cortex A8 generic. Move it from generic >>> code to OMAP3 SoC specific file. >>> >>> CC: "Kim, Heung Jun" >>> Signed-off-by: Dirk Behme >>> >>> --- >>> >>> This patches fixes the second issue found by riverful in >>> >>> http://lists.denx.de/pipermail/u-boot/2009-May/053433.html >>> >>> The first issue is fixed by >>> >>> http://lists.denx.de/pipermail/u-boot/2009-May/053444.html >>> >>> cpu/arm_cortexa8/omap3/lowlevel_init.S | 12 ++++++++++++ >>> cpu/arm_cortexa8/start.S | 14 -------------- >>> 2 files changed, 12 insertions(+), 14 deletions(-) >>> >>> Index: u-boot-arm/cpu/arm_cortexa8/omap3/lowlevel_init.S >>> =================================================================== >>> --- u-boot-arm.orig/cpu/arm_cortexa8/omap3/lowlevel_init.S >>> +++ u-boot-arm/cpu/arm_cortexa8/omap3/lowlevel_init.S >>> @@ -181,6 +181,18 @@ lowlevel_init: >>> /* back to arch calling code */ >>> mov pc, lr >>> +.global reset_cpu >>> +reset_cpu: >>> + ldr r1, rstctl @ get addr for global reset >>> + @ reg >>> + mov r3, #0x2 @ full reset pll + mpu >>> + str r3, [r1] @ force reset >>> + mov r0, r0 >>> +_loop_forever: >>> + b _loop_forever >>> +rstctl: >>> + .word PRM_RSTCTRL >>> + >> please move this to reset.S other wise fine > > Most probably your idea is that each file should only contain > functionality which fits 100% (120%?) what the file name implies (?). > While from general point of view this is correct, it makes no sense to > create new files again and again just to follow this rule. We already > created a cache.c on your request, now you request a new file reset.S > for ~5 assembly lines. This new file would contain more comments (e.g. > GPL header) than useful code. the idea is different here I want to have only code in lowlevel_init.S that can be disable by CONFIG_SKIP_LOWLEVEL_INIT and do it via Makefile Best Regards, J.