From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 6/7] Tegra30: Add generic Tegra30 build support
Date: Wed, 03 Oct 2012 16:27:29 -0600 [thread overview]
Message-ID: <506CBBD1.7080205@wwwdotorg.org> (raw)
In-Reply-To: <CA+m5__JTEN2fDbJCEOGm4GYnkMjPG51WvvNNynus0VhLTR8mhQ@mail.gmail.com>
On 10/03/2012 03:56 PM, Tom Warren wrote:
> Stephen,
>
> On Wed, Oct 3, 2012 at 1:38 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
>> On 10/02/2012 04:45 PM, Tom Warren wrote:
>>> This patch adds basic Tegra30 (T30) build support - no specific
>>> board is targeted.
>>>
>>
>>> diff --git a/board/nvidia/common/board.c b/board/nvidia/common/board.c
>>
>>> +#ifdef CONFIG_USB_EHCI_TEGRA
>>> +#include <asm/arch/usb.h>
>>> +#endif
>>
>> That seems unrelated.
>
> It's related because I don't have a usb.h file for Tegra30 yet (not
> used/needed), and this is a common file, so I have to #ifdef the
> inclusion or Cardhu won't build. I could put an empty usb.h file in
> arch-tegra30, but I don't like that approach and there's a need for
> this if someone turns off USB support in a Tegra20 build. The code
> further down in the file uses the same #ifdef.
Ah right, that makes sense.
>>> +#ifdef CONFIG_TEGRA30
>>> +#include <asm/arch/pinmux-config-common.h>
>>> +#endif
>> ...
>>> /*
>>> + * Routine: pinmux_init
>>> + * Description: Do individual peripheral pinmux configs
>>> + */
>>> +static void pinmux_init(void)
>>> +{
>>> +#if defined(CONFIG_TEGRA30)
>>> + pinmux_config_table(tegra3_pinmux_common,
>>> + ARRAY_SIZE(tegra3_pinmux_common));
>>> +
>>> + pinmux_config_table(unused_pins_lowpower,
>>> + ARRAY_SIZE(unused_pins_lowpower));
>>> +#endif
>>> +}
>>
>> I think that should be done by the Cardhu board file, since the data is
>> Cardhu-specific.
>
> If I move pinmux_init to cardhu.c, I'll need matching (empty) funcs in
> all the other board files, since it's called in board_early_init_f
> later in board.c. Or it could be made a weak function that's only
> overridden in cardhu files. But all this is more that I wanted to
> change in this first pass of T30/Cardhu support - I didn't want to
> touch any of the Tegra20 builds that I didn't have to.
A weak function certainly seems the way to go; all (or at least most of)
the other per-device pinmux/GPIO setup functions are all implemented
this way now.
next prev parent reply other threads:[~2012-10-03 22:27 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-02 22:45 [U-Boot] [PATCH 0/7] Add T30 Cardhu support Tom Warren
2012-10-02 22:45 ` [U-Boot] [PATCH 1/7] Tegra30: Add AVP (arm720t) files Tom Warren
2012-10-03 18:23 ` Stephen Warren
2012-10-03 20:15 ` Tom Warren
2012-10-04 1:11 ` Simon Glass
2012-10-04 0:57 ` Simon Glass
2012-10-02 22:45 ` [U-Boot] [PATCH 2/7] Tegra30: Add CPU (armv7) files Tom Warren
2012-10-03 18:26 ` Stephen Warren
2012-10-03 20:03 ` Tom Warren
2012-10-02 22:45 ` [U-Boot] [PATCH 3/7] Tegra30: Add common CPU (shared) files Tom Warren
2012-10-03 19:49 ` Stephen Warren
2012-10-03 20:27 ` Tom Warren
2012-10-02 22:45 ` [U-Boot] [PATCH 4/7] Tegra30: Add arch-tegra30 include files Tom Warren
2012-10-03 20:31 ` Stephen Warren
2012-10-03 21:48 ` Tom Warren
2012-10-03 22:32 ` Stephen Warren
2012-10-02 22:45 ` [U-Boot] [PATCH 5/7] Tegra30: Cardhu: Add DT files Tom Warren
2012-10-03 0:07 ` Lucas Stach
2012-10-03 16:05 ` Tom Warren
2012-10-03 20:36 ` Stephen Warren
2012-10-03 21:49 ` Tom Warren
2012-10-02 22:45 ` [U-Boot] [PATCH 6/7] Tegra30: Add generic Tegra30 build support Tom Warren
2012-10-03 20:38 ` Stephen Warren
2012-10-03 21:56 ` Tom Warren
2012-10-03 22:27 ` Stephen Warren [this message]
2012-10-02 22:45 ` [U-Boot] [PATCH 7/7] Tegra30: Add/enable Cardhu build (T30 reference board) Tom Warren
2012-10-03 20:46 ` Stephen Warren
2012-10-03 21:05 ` Tom Warren
2012-10-03 16:46 ` [U-Boot] [PATCH 0/7] Add T30 Cardhu support Stephen Warren
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=506CBBD1.7080205@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--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.