public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Michal Simek <monstr@monstr.eu>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 12/14] microblaze: Move architecture to use generic board init
Date: Fri, 30 Jan 2015 11:13:02 +0100	[thread overview]
Message-ID: <54CB592E.6020705@monstr.eu> (raw)
In-Reply-To: <CAPnjgZ0ZgMmHgT8G=bmzovdtRC4GFr3DBJ-oW+9apcFNkVwehA@mail.gmail.com>

Hi Simon,

On 01/29/2015 04:45 PM, Simon Glass wrote:
> Hi Michal,
> 
> 
> On 29 January 2015 at 07:20, Michal Simek <michal.simek@xilinx.com> wrote:
>> Hi Simon,
>>
>> On 01/29/2015 03:15 AM, Simon Glass wrote:
>>> Hi Michal,
>>>
>>> On 27 January 2015 at 08:20, Michal Simek <michal.simek@xilinx.com> wrote:
>>>> Compile code with -fPIC to get GOT. Do not build SPL
>>>> with fPIC because it increasing SPL size for nothing.
>>>>
>>>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>>>> ---
>>>>
>>
>> ...
>>
>>>> -#if defined(CONFIG_MIPS) || defined(CONFIG_PPC)
>>>> +#if defined(CONFIG_MIPS) || defined(CONFIG_PPC) || defined(CONFIG_MICROBLAZE)
>>>>  static int init_func_ram(void)
>>>>  {
>>>
>>> Can you use dram_init() instead?
>>
>> No problem will do it in v2.
>>
>> Where dram_init(void) should be declared?
>> I see that others have it in arch header. Maybe better to have
>> it in any shared location.
> 
> Yes a shared location makes sense.

I have sent patch for it. Please review.

> 
>>
>>>> --- a/common/board_r.c
>>>> +++ b/common/board_r.c
>>>> @@ -829,7 +829,7 @@ init_fnc_t init_sequence_r[] = {
>>>>  #if defined(CONFIG_ARM)
>>>>         initr_enable_interrupts,
>>>>  #endif
>>>> -#ifdef CONFIG_X86
>>>> +#if defined(CONFIG_X86) || defined(CONFIG_MICROBLAZE)
>>>>         timer_init,             /* initialize timer */
>>>>  #endif
>>>
>>> Could you use interrupt_init() immediately before?
>>
>> What do you mean by that?
>> Do you want to do timer_init in interrupt_init()?
> 
> Yes, then if we remove it from x86 also we can drop both #ifdefs. Do
> you see any drawback with that?

timer_init looks like standard function which is used by x86 (board_r), arm, mips, blackfin.
(board_f)

Based on board_r.c PPC is doing timer_init in cpu_init_r.

For Microblaze my preference is to use this location because timer code is using
interrupts which are initialized above.

Adding timer_init to interrupt_init doesn't look right because then interrupt_init will hide
one init step.

Thanks,
Michal

-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150130/08b3fadb/attachment.sig>

  reply	other threads:[~2015-01-30 10:13 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-27 15:20 [U-Boot] [PATCH 01/14] microblaze: Fix stack usage in interrupt handler Michal Simek
2015-01-27 15:20 ` [U-Boot] [PATCH 02/14] microblaze: Show return address from exception Michal Simek
2015-01-27 15:20 ` [U-Boot] [PATCH 03/14] microblaze: Fix coding style in exception.c Michal Simek
2015-01-27 15:20 ` [U-Boot] [PATCH 04/14] microblaze: Remove DEBUG_INT macro and use debug() instead Michal Simek
2015-01-27 15:20 ` [U-Boot] [PATCH 05/14] microblaze: Fix coding style Michal Simek
2015-01-27 15:20 ` [U-Boot] [PATCH 06/14] microblaze: Add debug message about enabling interrupts Michal Simek
2015-01-27 15:20 ` [U-Boot] [PATCH 07/14] microblaze: Remove unneeded data section adding from DTB Michal Simek
2015-01-27 15:20 ` [U-Boot] [PATCH 08/14] microblaze: Use standard interrupt_init() function Michal Simek
2015-01-27 15:20 ` [U-Boot] [PATCH 09/14] microblaze: Remove unused asm label Michal Simek
2015-01-27 15:20 ` [U-Boot] [PATCH 10/14] microblaze: Fix gd_t address which is placed at the end of BRAM Michal Simek
2015-01-27 15:20 ` [U-Boot] [PATCH 11/14] microblaze: Enable SPL_NOR support when FLASH_BASE is setup Michal Simek
2015-01-27 15:20 ` [U-Boot] [PATCH 12/14] microblaze: Move architecture to use generic board init Michal Simek
2015-01-29  2:15   ` Simon Glass
2015-01-29 14:20     ` Michal Simek
2015-01-29 15:45       ` Simon Glass
2015-01-30 10:13         ` Michal Simek [this message]
2015-01-30 16:29           ` Simon Glass
2015-01-27 15:20 ` [U-Boot] [PATCH 13/14] microblaze: Speedup code copy Michal Simek
2015-01-27 15:20 ` [U-Boot] [PATCH 14/14] bdinfo: Show information about fdt blob via bdinfo Michal Simek

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=54CB592E.6020705@monstr.eu \
    --to=monstr@monstr.eu \
    --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