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

2012-09-18 Thread Simon Glass
Hi Tom,

On Wed, Sep 12, 2012 at 3:10 PM, Tom Warren twarren.nvi...@gmail.com wrote:
 Signed-off-by: Tom Warren twar...@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 000..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_COM1NV_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 000..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
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


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

2012-09-18 Thread Tom Warren
Simon,

On Tue, Sep 18, 2012 at 12:46 PM, Simon Glass s...@chromium.org wrote:
 Hi Tom,

 On Wed, Sep 12, 2012 at 3:10 PM, Tom Warren twarren.nvi...@gmail.com wrote:
 Signed-off-by: Tom Warren twar...@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 000..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_COM1NV_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 000..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.

There can be. There's already a tegra-common-post.h header for boot
stuff. I'll take a look.

Thanks

 Regards,
 Simon
___
U-Boot mailing list
U-Boot@lists.denx.de

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

2012-09-13 Thread Stephen Warren
On 09/12/2012 04:10 PM, Tom Warren wrote:

 diff --git a/include/configs/tegra30-common.h 
 b/include/configs/tegra30-common.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)

Seems like a good candidate for a common header (not Tegra-common, but
across all of U-Boot).

 +#define CONFIG_SYS_BAUDRATE_TABLE{4800, 9600, 19200, 38400, 57600,\
 + 115200}

IIRC, that's the default now and can be removed. There may be other
variables the comment applies to - Tom Rini would know better since he
pointed them out in my RPi patches.

 +#define CONFIG_SYS_LOAD_ADDR (0x80A00800)/* default */

Hmmm. I notice that both here and the equivalent Tegra20 file, we define
both CONFIG_LOADADDR and CONFIG_SYS_LOAD_ADDR. Should we actually be
defining both, and with different values (is one unused?).
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


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

2012-09-13 Thread Tom Rini
On 09/13/2012 03:33 PM, Stephen Warren wrote:
 On 09/12/2012 04:10 PM, Tom Warren wrote:
 
 diff --git a/include/configs/tegra30-common.h 
 b/include/configs/tegra30-common.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)
 
 Seems like a good candidate for a common header (not Tegra-common, but
 across all of U-Boot).

This is __stringify() that Marek needs to address Wolfgang's comment on
still, iirc.

 +#define CONFIG_SYS_BAUDRATE_TABLE   {4800, 9600, 19200, 38400, 57600,\
 +115200}
 
 IIRC, that's the default now and can be removed. There may be other
 variables the comment applies to - Tom Rini would know better since he
 pointed them out in my RPi patches.

That and the hush prompt one if it's there need to go.

-- 
Tom
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


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

2012-09-13 Thread Marek Vasut
Dear Tom Rini,

 On 09/13/2012 03:33 PM, Stephen Warren wrote:
  On 09/12/2012 04:10 PM, Tom Warren wrote:
  diff --git a/include/configs/tegra30-common.h
  b/include/configs/tegra30-common.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)
  
  Seems like a good candidate for a common header (not Tegra-common, but
  across all of U-Boot).
 
 This is __stringify() that Marek needs to address Wolfgang's comment on
 still, iirc.

I need to roll out the stringify patches ... the issues should be fixed.

  +#define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600,\
  +  115200}
  
  IIRC, that's the default now and can be removed. There may be other
  variables the comment applies to - Tom Rini would know better since he
  pointed them out in my RPi patches.
 
 That and the hush prompt one if it's there need to go.

Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot