All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 03/10] sunxi: Introduce a hidden ARCH_SUN6I Kconfig bool
Date: Wed, 15 Apr 2015 09:35:56 +0200	[thread overview]
Message-ID: <552E14DC.60101@redhat.com> (raw)
In-Reply-To: <CAOMqctQyLutSmZ2JeskY8YorhKMcF=93rQH3LKABuooPHTExmQ@mail.gmail.com>

Hi,

On 15-04-15 08:51, Michal Suchanek wrote:
> On 14 April 2015 at 18:06, Hans de Goede <hdegoede@redhat.com> wrote:
>> sun6i and newer (derived) SoCs such as the sun8i-a23, sun8i-a33 and sun9i
>> have a various things in common, like having separate ahb reset control
>> registers, the SID living inside the pmic, custom pmic busses, new style
>> watchdog, etc.
>>
>> This commit introduces a new hidden ARCH_SUN6I Kconfig bool which can be
>> used to check for these features avoiding the need for an ever growing list
>> of "#if defined CONFIG_MACH_SUN?I" conditionals as we add support for more
>> "new style" sunxi SoCs.
>>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>> ---
>>   arch/arm/cpu/armv7/sunxi/board.c            | 18 +++++++++---------
>>   arch/arm/cpu/armv7/sunxi/cpu_info.c         |  2 +-
>>   arch/arm/cpu/armv7/sunxi/usbc.c             |  4 ++--
>>   arch/arm/include/asm/arch-sunxi/cpu_sun4i.h | 12 ++++++------
>>   arch/arm/include/asm/arch-sunxi/mmc.h       |  3 +--
>>   arch/arm/include/asm/arch-sunxi/timer.h     |  8 ++++----
>>   board/sunxi/Kconfig                         |  9 +++++++++
>>   board/sunxi/gmac.c                          |  6 +++---
>>   drivers/mmc/sunxi_mmc.c                     |  3 +--
>>   drivers/video/sunxi_display.c               | 10 +++++-----
>>   10 files changed, 41 insertions(+), 34 deletions(-)
>>
>> diff --git a/arch/arm/cpu/armv7/sunxi/board.c b/arch/arm/cpu/armv7/sunxi/board.c
>> index 6471c6b..30d5974 100644
>> --- a/arch/arm/cpu/armv7/sunxi/board.c
>> +++ b/arch/arm/cpu/armv7/sunxi/board.c
>> @@ -173,7 +173,15 @@ void board_init_f(ulong dummy)
>>
>>   void reset_cpu(ulong addr)
>>   {
>> -#if defined(CONFIG_MACH_SUN4I) || defined(CONFIG_MACH_SUN5I) || defined(CONFIG_MACH_SUN7I)
>> +#ifdef CONFIG_ARCH_SUN6I
>
> Hello,
>
> this looks wrong.
>
> Either this is ARCH_SUNXI and it coverts all or it's ARCH_SUN6I and
> then SUN4I and SUN5I should still be checked separately.

Look closer, the blocks before / after the #else are swapped to avoid needing
to use #ifndef without good reason as that is ugly.

>
>
>> diff --git a/arch/arm/include/asm/arch-sunxi/timer.h b/arch/arm/include/asm/arch-sunxi/timer.h
>> index 9a5e488..a6cc443 100644
>> --- a/arch/arm/include/asm/arch-sunxi/timer.h
>> +++ b/arch/arm/include/asm/arch-sunxi/timer.h
>> @@ -67,7 +67,10 @@ struct sunxi_timer_reg {
>>          struct sunxi_timer timer[6];    /* We have 6 timers */
>>          u8 res2[16];
>>          struct sunxi_avs avs;
>> -#if defined(CONFIG_MACH_SUN4I) || defined(CONFIG_MACH_SUN5I) || defined(CONFIG_MACH_SUN7I)
>> +#ifdef CONFIG_ARCH_SUN6I

Same here.

Regards,

Hans

  reply	other threads:[~2015-04-15  7:35 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-14 16:06 [U-Boot] [PATCH 01/10] sunxi: Also set Auxiliary Ctl SMP bit in SPL Hans de Goede
2015-04-14 16:06 ` [U-Boot] [PATCH 02/10] sunxi: usbc: Remove unused irq field Hans de Goede
2015-04-15 19:41   ` Ian Campbell
2015-04-14 16:06 ` [U-Boot] [PATCH 03/10] sunxi: Introduce a hidden ARCH_SUN6I Kconfig bool Hans de Goede
2015-04-15  6:51   ` Michal Suchanek
2015-04-15  7:35     ` Hans de Goede [this message]
2015-04-15  8:01       ` Michal Suchanek
2015-04-15  8:07         ` Hans de Goede
2015-04-15  8:45           ` Michal Suchanek
2015-04-15 19:47             ` Ian Campbell
2015-04-16  7:23               ` Hans de Goede
2015-04-17 11:06                 ` Ian Campbell
2015-04-15  7:00   ` Michal Suchanek
2015-04-15  7:36     ` Hans de Goede
2015-04-14 16:06 ` [U-Boot] [PATCH 04/10] sunxi: s/sun8i/sun8i_a23/ Hans de Goede
2015-04-15 19:49   ` Ian Campbell
2015-04-16  7:24     ` Hans de Goede
2015-04-14 16:06 ` [U-Boot] [PATCH 05/10] sunxi: Add support for A33 PLL11 (second DRAM pll) Hans de Goede
2015-04-15 19:50   ` Ian Campbell
2015-04-14 16:06 ` [U-Boot] [PATCH 06/10] sunxi: Add a33 dram init code Hans de Goede
2015-04-15 19:56   ` Ian Campbell
2015-04-16  7:27     ` Hans de Goede
2015-04-16  9:09       ` Ian Campbell
2015-04-26 18:31         ` Hans de Goede
2015-05-02 13:37           ` Ian Campbell
2015-04-14 16:06 ` [U-Boot] [PATCH 07/10] sunxi: Fix end of kernel memory alignment for A33 Hans de Goede
2015-04-15 19:57   ` Ian Campbell
2015-04-16  7:32     ` Hans de Goede
2015-04-16 17:35       ` Mark Rutland
2015-04-16 19:12         ` Hans de Goede
2015-04-17 10:20           ` Mark Rutland
2015-04-24 18:32             ` Hans de Goede
2015-04-28  9:33               ` Mark Rutland
2015-04-14 16:06 ` [U-Boot] [PATCH 08/10] sunxi: Add basic A33 basic support Hans de Goede
2015-04-15 20:00   ` Ian Campbell
2015-04-16  7:35     ` Hans de Goede
2015-04-17 11:07       ` Ian Campbell
2015-04-14 16:07 ` [U-Boot] [PATCH 09/10] sunxi: Add softwinner astar mid756 A33 tablet board defconfig Hans de Goede
2015-04-15 20:01   ` Ian Campbell
2015-05-04 15:48     ` Chen-Yu Tsai
2015-05-04 16:54       ` Hans de Goede
2015-04-14 16:07 ` [U-Boot] [PATCH 10/10] sunxi: Add Ippo_q8h_v1_2_a33_1024x600 defconfig Hans de Goede
2015-04-15 20:01   ` Ian Campbell
2015-04-15 19:41 ` [U-Boot] [PATCH 01/10] sunxi: Also set Auxiliary Ctl SMP bit in SPL Ian Campbell

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=552E14DC.60101@redhat.com \
    --to=hdegoede@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.