public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Peng Fan <b51431@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] arm: imx: imx-common: init: move arch init common setup
Date: Thu, 27 Aug 2015 16:15:34 +0800	[thread overview]
Message-ID: <20150827081530.GA15868@shlinux2> (raw)
In-Reply-To: <CALeDE9N+yQDjRoVBrFTGmOPPBbdmvNREjZVcX1QZP5iOTk6mhg@mail.gmail.com>

On Thu, Aug 27, 2015 at 10:00:57AM +0100, Peter Robinson wrote:
>On Thu, Aug 27, 2015 at 2:39 AM, Peng Fan <b51431@freescale.com> 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

-- 

  reply	other threads:[~2015-08-27  8:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-26 23:27 [U-Boot] [PATCH] arm: imx: common rework cache settings for imx6 Adrian Alonso
2015-08-26 23:27 ` [U-Boot] [PATCH] arm: imx: imx-common: init: move arch init common setup Adrian Alonso
2015-08-27  1:39   ` Peng Fan
2015-08-27  9:00     ` Peter Robinson
2015-08-27  8:15       ` Peng Fan [this message]
2015-08-27 16:31         ` Alonso Adrian
2015-08-27 20:12           ` Otavio Salvador
2015-08-27  1:34 ` [U-Boot] [PATCH] arm: imx: common rework cache settings for imx6 Peng Fan
2015-08-27 15:44   ` Alonso Adrian

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=20150827081530.GA15868@shlinux2 \
    --to=b51431@freescale.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox