Re: [U-Boot] [PATCH v2 01/13] tegra: remove support for UART SPI switch

2013-03-21 Thread Simon Glass
Hi Stephen,

On Tue, Mar 19, 2013 at 12:13 PM, Stephen Warren swar...@wwwdotorg.org wrote:
 On 03/19/2013 01:01 PM, Simon Glass wrote:
 Hi Allen,

 On Sat, Mar 16, 2013 at 9:58 PM, Allen Martin amar...@nvidia.com wrote:
 This feature was only used for tegra20 seaboard that had a pinmux
 conflict on the SPI pins.  These boards were never manufactured, so
 remove this support to clean up SPI driver.

 Signed-off-by: Allen Martin amar...@nvidia.com
 ---
  arch/arm/include/asm/arch-tegra/board.h|3 +-
  .../arm/include/asm/arch-tegra20/uart-spi-switch.h |   46 ---
  board/nvidia/common/board.c|3 -
  board/nvidia/common/common.mk  |1 -
  board/nvidia/common/uart-spi-switch.c  |  125 
 
  board/nvidia/seaboard/seaboard.c   |2 +-
  drivers/spi/tegra_spi.c|   25 +---
  7 files changed, 3 insertions(+), 202 deletions(-)
  delete mode 100644 arch/arm/include/asm/arch-tegra20/uart-spi-switch.h
  delete mode 100644 board/nvidia/common/uart-spi-switch.c

 OK, maybe I need to get the T114 booting and stop using the seaboard?

 Seaboard still works perfectly after this patch (or should; I assume
 Allen tested it!). The only issue is that you can't use SPI; the
 assumption being that you store the BCT/bootloader in eMMC rather than
 SPI and hence have no need to use SPI. SPI can be tested on other
 Tegra20 board designs, such as TrimSlice (or perhaps Kaen/Aebl if
 they're still around!)

OK that's no problem I think.

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


Re: [U-Boot] [PATCH v2 01/13] tegra: remove support for UART SPI switch

2013-03-19 Thread Stephen Warren
On 03/16/2013 10:58 PM, Allen Martin wrote:
 This feature was only used for tegra20 seaboard that had a pinmux
 conflict on the SPI pins.  These boards were never manufactured, so
 remove this support to clean up SPI driver.

 diff --git a/drivers/spi/tegra_spi.c b/drivers/spi/tegra_spi.c

 @@ -175,16 +168,8 @@ int spi_claim_bus(struct spi_slave *slave)
*/
   pinmux_set_func(PINGRP_GMD, PMUX_FUNC_SFLASH);
   pinmux_tristate_disable(PINGRP_LSPI);
 + pinmux_set_func(PINGRP_GMC, PMUX_FUNC_SFLASH);

As a note for future cleanup, all this pinmux stuff should be moved out
of the SPI driver into the board file's initialization functions.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 01/13] tegra: remove support for UART SPI switch

2013-03-19 Thread Simon Glass
Hi Allen,

On Sat, Mar 16, 2013 at 9:58 PM, Allen Martin amar...@nvidia.com wrote:
 This feature was only used for tegra20 seaboard that had a pinmux
 conflict on the SPI pins.  These boards were never manufactured, so
 remove this support to clean up SPI driver.

 Signed-off-by: Allen Martin amar...@nvidia.com
 ---
  arch/arm/include/asm/arch-tegra/board.h|3 +-
  .../arm/include/asm/arch-tegra20/uart-spi-switch.h |   46 ---
  board/nvidia/common/board.c|3 -
  board/nvidia/common/common.mk  |1 -
  board/nvidia/common/uart-spi-switch.c  |  125 
 
  board/nvidia/seaboard/seaboard.c   |2 +-
  drivers/spi/tegra_spi.c|   25 +---
  7 files changed, 3 insertions(+), 202 deletions(-)
  delete mode 100644 arch/arm/include/asm/arch-tegra20/uart-spi-switch.h
  delete mode 100644 board/nvidia/common/uart-spi-switch.c

OK, maybe I need to get the T114 booting and stop using the seaboard?

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


Re: [U-Boot] [PATCH v2 01/13] tegra: remove support for UART SPI switch

2013-03-19 Thread Stephen Warren
On 03/19/2013 01:01 PM, Simon Glass wrote:
 Hi Allen,
 
 On Sat, Mar 16, 2013 at 9:58 PM, Allen Martin amar...@nvidia.com wrote:
 This feature was only used for tegra20 seaboard that had a pinmux
 conflict on the SPI pins.  These boards were never manufactured, so
 remove this support to clean up SPI driver.

 Signed-off-by: Allen Martin amar...@nvidia.com
 ---
  arch/arm/include/asm/arch-tegra/board.h|3 +-
  .../arm/include/asm/arch-tegra20/uart-spi-switch.h |   46 ---
  board/nvidia/common/board.c|3 -
  board/nvidia/common/common.mk  |1 -
  board/nvidia/common/uart-spi-switch.c  |  125 
 
  board/nvidia/seaboard/seaboard.c   |2 +-
  drivers/spi/tegra_spi.c|   25 +---
  7 files changed, 3 insertions(+), 202 deletions(-)
  delete mode 100644 arch/arm/include/asm/arch-tegra20/uart-spi-switch.h
  delete mode 100644 board/nvidia/common/uart-spi-switch.c
 
 OK, maybe I need to get the T114 booting and stop using the seaboard?

Seaboard still works perfectly after this patch (or should; I assume
Allen tested it!). The only issue is that you can't use SPI; the
assumption being that you store the BCT/bootloader in eMMC rather than
SPI and hence have no need to use SPI. SPI can be tested on other
Tegra20 board designs, such as TrimSlice (or perhaps Kaen/Aebl if
they're still around!)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2 01/13] tegra: remove support for UART SPI switch

2013-03-16 Thread Allen Martin
This feature was only used for tegra20 seaboard that had a pinmux
conflict on the SPI pins.  These boards were never manufactured, so
remove this support to clean up SPI driver.

Signed-off-by: Allen Martin amar...@nvidia.com
---
 arch/arm/include/asm/arch-tegra/board.h|3 +-
 .../arm/include/asm/arch-tegra20/uart-spi-switch.h |   46 ---
 board/nvidia/common/board.c|3 -
 board/nvidia/common/common.mk  |1 -
 board/nvidia/common/uart-spi-switch.c  |  125 
 board/nvidia/seaboard/seaboard.c   |2 +-
 drivers/spi/tegra_spi.c|   25 +---
 7 files changed, 3 insertions(+), 202 deletions(-)
 delete mode 100644 arch/arm/include/asm/arch-tegra20/uart-spi-switch.h
 delete mode 100644 board/nvidia/common/uart-spi-switch.c

diff --git a/arch/arm/include/asm/arch-tegra/board.h 
b/arch/arm/include/asm/arch-tegra/board.h
index 3db0d93..1a66990 100644
--- a/arch/arm/include/asm/arch-tegra/board.h
+++ b/arch/arm/include/asm/arch-tegra/board.h
@@ -25,8 +25,7 @@
 #define _TEGRA_BOARD_H_
 
 /* Set up pinmux to make UART usable */
-void gpio_config_uart(void);  /* CONFIG_SPI_UART_SWITCH */
-void gpio_early_init_uart(void);  /*!CONFIG_SPI_UART_SWITCH */
+void gpio_early_init_uart(void);
 
 /* Set up early UART output */
 void board_init_uart_f(void);
diff --git a/arch/arm/include/asm/arch-tegra20/uart-spi-switch.h 
b/arch/arm/include/asm/arch-tegra20/uart-spi-switch.h
deleted file mode 100644
index 82ac180..000
--- a/arch/arm/include/asm/arch-tegra20/uart-spi-switch.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2011 The Chromium OS Authors.
- * 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 _UART_SPI_SWITCH_H
-#define _UART_SPI_SWITCH_H
-
-#if defined(CONFIG_SPI_UART_SWITCH)
-/*
- * Signal that we are about to use the UART. This unfortunate hack is
- * required by Seaboard, which cannot use its console and SPI at the same
- * time! If the board file provides this, the board config will declare it.
- * Let this be a lesson for others.
- */
-void pinmux_select_uart(void);
-
-/*
- * Signal that we are about the use the SPI bus.
- */
-void pinmux_select_spi(void);
-
-#else /* not CONFIG_SPI_UART_SWITCH */
-
-static inline void pinmux_select_uart(void) {}
-static inline void pinmux_select_spi(void) {}
-
-#endif
-
-#endif
diff --git a/board/nvidia/common/board.c b/board/nvidia/common/board.c
index 7d9f361..b6e6566 100644
--- a/board/nvidia/common/board.c
+++ b/board/nvidia/common/board.c
@@ -132,9 +132,6 @@ int board_init(void)
clock_init();
clock_verify();
 
-#ifdef CONFIG_SPI_UART_SWITCH
-   gpio_config_uart();
-#endif
 #if defined(CONFIG_TEGRA_SPI) || defined(CONFIG_TEGRA_SLINK)
pin_mux_spi();
spi_init();
diff --git a/board/nvidia/common/common.mk b/board/nvidia/common/common.mk
index bd6202c..d9bcb85 100644
--- a/board/nvidia/common/common.mk
+++ b/board/nvidia/common/common.mk
@@ -1,4 +1,3 @@
 # common options for all tegra boards
 COBJS-y+= ../../nvidia/common/board.o
-COBJS-$(CONFIG_SPI_UART_SWITCH) += ../../nvidia/common/uart-spi-switch.o
 COBJS-$(CONFIG_TEGRA_CLOCK_SCALING) += ../../nvidia/common/emc.o
diff --git a/board/nvidia/common/uart-spi-switch.c 
b/board/nvidia/common/uart-spi-switch.c
deleted file mode 100644
index e9d445d..000
--- a/board/nvidia/common/uart-spi-switch.c
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright (c) 2011 The Chromium OS Authors.
- *
- * 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,