From mboxrd@z Thu Jan 1 00:00:00 1970 From: York Sun Date: Wed, 3 Sep 2014 11:36:53 -0700 Subject: [U-Boot] [PATCH v6] mx6: add support of multi-processor command In-Reply-To: <54075D6A.2080802@huau-gabriel.fr> References: <1403375369-3882-1-git-send-email-contact@huau-gabriel.fr> <1406399743-20315-1-git-send-email-contact@huau-gabriel.fr> <53D6690E.7010506@denx.de> <54075720.5030907@freescale.com> <54075D6A.2080802@huau-gabriel.fr> Message-ID: <54075FC5.1060405@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 09/03/2014 11:26 AM, Gabriel Huau wrote: > Hi York, > > On 09/03/2014 11:00 AM, York Sun wrote: >> On 07/28/2014 08:15 AM, Stefano Babic wrote: >>> Hi Gabriel, >>> >>> On 26/07/2014 20:35, Gabriel Huau wrote: >>>> This allows u-boot to load different OS or Bare Metal application on >>>> different cores of the i.MX6 SoC. >>>> For example: running Android on cpu0 and a RT OS like QNX/FreeRTOS on cpu1. >>>> >>>> Signed-off-by: Gabriel Huau >>>> --- >>>> Changes for v2: >>>> - Add a commit log message to explain the purpose of this patch >>>> Changes for v3: >>>> - Remove unnecessary check for unsigned values when they are negative >>>> Changes for v4: >>>> - Add CONFIG_MP to the common mx6 configuration >>>> - Get the number of CPUs dynamically instead of using a macro >>>> Changes for v5: >>>> - Rebase on the last update of the tree (conflicts solved) >>>> Changes for v6: >>>> - Remove useless switch case >>>> - Update board_f to not depend on mp.h unnecessary >>>> - Fix build warnings >>>> - Update commit message >>>> >> >> >>>> --- a/common/board_f.c >>>> +++ b/common/board_f.c >>>> @@ -34,6 +34,9 @@ >>>> #ifdef CONFIG_MPC5xxx >>>> #include >>>> #endif >>>> +#if (defined(CONFIG_MPC86xx) || defined(CONFIG_E500)) >>>> +#include >>>> +#endif >>>> >>>> #include >>>> #include >>>> @@ -43,9 +46,6 @@ >>>> #include >>>> #include >>>> #include >>>> -#ifdef CONFIG_MP >>>> -#include >>>> -#endif >>>> #include >>>> #ifdef CONFIG_X86 >>>> #include >>>> @@ -381,7 +381,7 @@ static int setup_dest_addr(void) >>>> gd->ram_top = board_get_usable_ram_top(gd->mon_len); >>>> gd->relocaddr = gd->ram_top; >>>> debug("Ram top: %08lX\n", (ulong)gd->ram_top); >>>> -#if defined(CONFIG_MP) && (defined(CONFIG_MPC86xx) || defined(CONFIG_E500)) >>>> +#if (defined(CONFIG_MPC86xx) || defined(CONFIG_E500)) >> I didn't notice this patch until it got merged. Why dropping CONFIG_MP here? >> This change breaks these boards >> >> MPC8536DS MPC8536DS_36BIT MPC8536DS_SDCARD MPC8536DS_SPIFLASH qemu-ppce500 >> >> York > > Sorry, I didn't see the break for these boards. > 'asm/mp.h' is used only for the powerpc board and using CONFIG_MP force > the other architecture (or board) to create an empty header. > As this header was here to use only specific features (not generic), I > removed it and put the include guards only for the boards needed. > > Can't we add these boards to the board_f.c? > I don't mind to change the guard for asm/mp.h. But you shouldn't remove the guard for the function call. Not all powerpc SoCs support SMP. You could use +#if defined(CONFIG_MP) && (defined(CONFIG_MPC86xx) || defined(CONFIG_E500)) +#include +#endif York