[U-Boot] [PATCH 7/9] Tegra30: Add config files (common and Cardhu)

Simon Glass
2012-09-18T19:46:13Z

Hi Tom,

On Wed, Sep 12, 2012 at 3:10 PM, Tom Warren <twarren.nvidia@gmail.com> wrote:
> Signed-off-by: Tom Warren <twarren@nvidia.com>
> ---
> include/configs/cardhu.h | 52 +++++++++++
> include/configs/tegra30-common.h | 188 ++++++++++++++++++++++++++++++++++++++
> 2 files changed, 240 insertions(+), 0 deletions(-)
> create mode 100644 include/configs/cardhu.h
> create mode 100644 include/configs/tegra30-common.h
>
> diff --git a/include/configs/cardhu.h b/include/configs/cardhu.h
> new file mode 100644
> index 0000000..bfadbff
> --- /dev/null
> +++ b/include/configs/cardhu.h
> @@ -0,0 +1,52 @@
> +/*
> + * (C) Copyright 2010-2012
> + * NVIDIA Corporation <www.nvidia.com>
> + *
> + * See file CREDITS for list of people who contributed to this
> + * project.
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License as
> + * published by the Free Software Foundation; either version 2 of
> + * the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
> + * MA 02111-1307 USA
> + */
> +
> +#ifndef __CONFIG_H
> +#define __CONFIG_H
> +
> +#include <asm/sizes.h>
> +
> +#include "tegra30-common.h"
> +
> +/* Enable fdt support for Cardhu. Flash the image in u-boot-dtb.bin */
> +#define CONFIG_DEFAULT_DEVICE_TREE tegra30-cardhu
> +#define CONFIG_OF_CONTROL
> +#define CONFIG_OF_SEPARATE
> +
> +/* High-level configuration options */
> +#define V_PROMPT "Tegra30 (Cardhu) # "
> +#define CONFIG_TEGRA_BOARD_STRING "NVIDIA Cardhu"
> +
> +/* Board-specific serial config */
> +#define CONFIG_SERIAL_MULTI
> +#define CONFIG_TEGRA_ENABLE_UARTA
> +#define CONFIG_SYS_NS16550_COM1 NV_PA_APB_UARTA_BASE
> +
> +#define CONFIG_MACH_TYPE MACH_TYPE_CARDHU
> +
> +#define CONFIG_BOARD_EARLY_INIT_F
> +#define CONFIG_ENV_IS_NOWHERE
> +
> +#include "tegra-common-post.h"
> +
> +#endif /* __CONFIG_H */
> diff --git a/include/configs/tegra30-common.h b/include/configs/tegra30-common.h
> new file mode 100644
> index 0000000..b23823d
> --- /dev/null
> +++ b/include/configs/tegra30-common.h
> @@ -0,0 +1,188 @@
> +/*
> + * (C) Copyright 2010-2012
> + * NVIDIA Corporation <www.nvidia.com>
> + *
> + * See file CREDITS for list of people who contributed to this
> + * project.
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License as
> + * published by the Free Software Foundation; either version 2 of
> + * the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
> + * MA 02111-1307 USA
> + */
> +
> +#ifndef __TEGRA30_COMMON_H
> +#define __TEGRA30_COMMON_H
> +#include <asm/sizes.h>
> +
> +/*
> + * QUOTE(m) will evaluate to a string version of the value of the macro m
> + * passed in. The extra level of indirection here is to first evaluate the
> + * macro m before applying the quoting operator.
> + */
> +#define QUOTE_(m) #m
> +#define QUOTE(m) QUOTE_(m)
> +
> +/*
> + * High Level Configuration Options
> + */
> +#define CONFIG_ARMCORTEXA9 /* This is an ARM V7 CPU core */
> +#define CONFIG_TEGRA30 /* in a NVidia Tegra30 core */
> +#define CONFIG_TEGRA /* which is a Tegra generic machine */
> +#define CONFIG_SYS_L2CACHE_OFF /* No L2 cache */
> +
> +#define CONFIG_SYS_CACHELINE_SIZE 32
> +
> +#include <asm/arch/tegra30.h> /* get chip and board defs */
> +
> +/*
> + * Display CPU and Board information
> + */
> +#define CONFIG_DISPLAY_CPUINFO
> +#define CONFIG_DISPLAY_BOARDINFO
> +
> +#define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
> +#define CONFIG_OF_LIBFDT /* enable passing of devicetree */

Do you think there should be a tegra-common.h, included by
tegra20-common and tegra30-common? That was the approach we talk in
the Chromium tree.

Regards,
Simon