From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peng Fan Date: Thu, 27 Aug 2015 16:15:34 +0800 Subject: [U-Boot] [PATCH] arm: imx: imx-common: init: move arch init common setup In-Reply-To: References: <1440631663-15353-1-git-send-email-aalonso@freescale.com> <1440631663-15353-2-git-send-email-aalonso@freescale.com> <20150827013946.GB25841@shlinux2> Message-ID: <20150827081530.GA15868@shlinux2> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, Aug 27, 2015 at 10:00:57AM +0100, Peter Robinson wrote: >On Thu, Aug 27, 2015 at 2:39 AM, Peng Fan wrote: >> Hi Adrian, >> >> Since this is only for mx6, why move the code to imx-common? >> " >>> ifeq ($(SOC),$(filter $(SOC),mx6)) >>>-obj-y += cache.o >>>+obj-y += cache.o init.o >> " >> >> Also many pieces of code are only for imx6, imx7 do not need them for now, such as >> the ldo ramp part. >> >> I think basic imx7 support do not need such a big change, if we do need to >> consolidate code for common usage, we can do this when we need to add more >> stuff. > >Personally I think it's better off being done from the outset else it >never gets done and we end up in the situation we were for imx6. I agree that we'd better remove duplicated code and consolidate code for common usage to make it cleaner and easy to maintian. But from the current patch, clear_ldo_ramp set_ldo_voltage set_ahb_rate clear_mmdc_ch_mask init_bandgap set_preclk_from_osc are all imx6 specific, imx7 do not have the implementation for these functions for now. The goal of arch_cpu_init is for different SoC usage from my understanding, I think it should be there for different SoCs. The following functions can be consolidated for common usage. boot_mode_apply init_src init_aips The Makefile part shows only for imx6 "ifeq ($(SOC),$(filter $(SOC),mx6))", from this patch. Then why move most code mainly imx6 specific to imx-common? If we do need such a patch for now, init_aips and boot_mode_apply and init_src may can be consolidated for common usage for imx6/7. But anyway I prefer a small cleanup patch to do this after basic imx7 upstreamed. Regards, Peng. > >Peter --