From: Stephen Warren <swarren@nvidia.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Tegra: Change Tegra20 to Tegra in common code, prep for T30
Date: Thu, 06 Sep 2012 20:49:30 -0600 [thread overview]
Message-ID: <504960BA.3030606@nvidia.com> (raw)
In-Reply-To: <1346966878-31374-1-git-send-email-twarren@nvidia.com>
On 09/06/2012 03:27 PM, Tom Warren wrote:
> Convert TEGRA20_ defines to either TEGRA_ or NV_PA_ where appropriate.
> Convert tegra20_ source file and function names to tegra_, also.
>
> Upcoming Tegra30 port will use common code/defines/names where possible.
>
> Signed-off-by: Tom Warren <twarren@nvidia.com>
I think this is basically OK so,
Acked-by: Stephen Warren <swarren@nvidia.com>
Just a few small comments/thoughts below...
> diff --git a/arch/arm/cpu/tegra20-common/board.c b/arch/arm/cpu/tegra20-common/board.c
> static int uart_configs[] = {
> -#if defined(CONFIG_TEGRA20_UARTA_UAA_UAB)
> +#if defined(CONFIG_TEGRA_UARTA_UAA_UAB)
> FUNCMUX_UART1_UAA_UAB,
> -#elif defined(CONFIG_TEGRA20_UARTA_GPU)
> +#elif defined(CONFIG_TEGRA_UARTA_GPU)
> FUNCMUX_UART1_GPU,
> -#elif defined(CONFIG_TEGRA20_UARTA_SDIO1)
> +#elif defined(CONFIG_TEGRA_UARTA_SDIO1)
> FUNCMUX_UART1_SDIO1,
> #else
> FUNCMUX_UART1_IRRX_IRTX,
All those options probably are Tegra20-specific, because the set of
pin-/group-names isn't the same on Tegra20 and Tegra30, so the same
options won't be available. Still, this probably won't actually cause
any name collisions, so it's probably OK to rename these.
> diff --git a/arch/arm/include/asm/arch-tegra20/tegra20.h b/arch/arm/include/asm/arch-tegra20/tegra20.h
> #define NV_PA_GPIO_BASE 0x6000D000
> #define NV_PA_EVP_BASE 0x6000F000
> #define NV_PA_APB_MISC_BASE 0x70000000
> -#define TEGRA20_APB_MISC_GP_BASE (NV_PA_APB_MISC_BASE + 0x0800)
> +#define NV_PA_APB_MISC_GP_BASE (NV_PA_APB_MISC_BASE + 0x0800)
> #define NV_PA_APB_UARTA_BASE (NV_PA_APB_MISC_BASE + 0x6000)
> #define NV_PA_APB_UARTB_BASE (NV_PA_APB_MISC_BASE + 0x6040)
> #define NV_PA_APB_UARTC_BASE (NV_PA_APB_MISC_BASE + 0x6200)
> #define NV_PA_APB_UARTD_BASE (NV_PA_APB_MISC_BASE + 0x6300)
> #define NV_PA_APB_UARTE_BASE (NV_PA_APB_MISC_BASE + 0x6400)
> -#define TEGRA20_NAND_BASE (NV_PA_APB_MISC_BASE + 0x8000)
> -#define TEGRA20_SPI_BASE (NV_PA_APB_MISC_BASE + 0xC380)
> -#define TEGRA20_PMC_BASE (NV_PA_APB_MISC_BASE + 0xE400)
> -#define TEGRA20_FUSE_BASE (NV_PA_APB_MISC_BASE + 0xF800)
> +#define NV_PA_NAND_BASE (NV_PA_APB_MISC_BASE + 0x8000)
> +#define NV_PA_SPI_BASE (NV_PA_APB_MISC_BASE + 0xC380)
> +#define NV_PA_PMC_BASE (NV_PA_APB_MISC_BASE + 0xE400)
> +#define NV_PA_FUSE_BASE (NV_PA_APB_MISC_BASE + 0xF800)
> #define NV_PA_CSITE_BASE 0x70040000
> #define TEGRA_USB1_BASE 0xC5000000
> #define TEGRA_USB3_BASE 0xC5008000
> #define TEGRA_USB_ADDR_MASK 0xFFFFC000
Many of these values will be different between Tegra20 and Tegra30.
Hence, the values are all SoC-specific. I suppose you're planning on
having both tegra20.h and tegra30.h define the same set of names, just
with different values? I guess that's fine. It's plausible that
different SoCs might have a different number of instances of some
controllers. I suppose most of these defines should eventually be
replaced by device tree anyway though.
next prev parent reply other threads:[~2012-09-07 2:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-06 21:27 [U-Boot] [PATCH] Tegra: Change Tegra20 to Tegra in common code, prep for T30 Tom Warren
2012-09-07 2:49 ` Stephen Warren [this message]
2012-09-07 16:39 ` Tom 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=504960BA.3030606@nvidia.com \
--to=swarren@nvidia.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