All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/3] tegra: add GMC/GMD funcmux entry for SFLASH
@ 2012-06-12 18:33 Stephen Warren
  2012-06-12 18:33 ` [U-Boot] [PATCH 2/3] tegra: add pin_mux_spi() board initialization function Stephen Warren
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Stephen Warren @ 2012-06-12 18:33 UTC (permalink / raw)
  To: u-boot

From: Stephen Warren <swarren@nvidia.com>

This is used on TrimSlice.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
 arch/arm/cpu/armv7/tegra2/funcmux.c        |   10 ++++++++++
 arch/arm/include/asm/arch-tegra2/funcmux.h |    3 +++
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/arch/arm/cpu/armv7/tegra2/funcmux.c b/arch/arm/cpu/armv7/tegra2/funcmux.c
index 455d010..4a31a4c 100644
--- a/arch/arm/cpu/armv7/tegra2/funcmux.c
+++ b/arch/arm/cpu/armv7/tegra2/funcmux.c
@@ -224,6 +224,16 @@ int funcmux_select(enum periph_id id, int config)
 		}
 		break;
 
+	case PERIPH_ID_SPI1:
+		if (config == FUNCMUX_SPI1_GMC_GMD) {
+			pinmux_set_func(PINGRP_GMC, PMUX_FUNC_SFLASH);
+			pinmux_set_func(PINGRP_GMD, PMUX_FUNC_SFLASH);
+
+			pinmux_tristate_disable(PINGRP_GMC);
+			pinmux_tristate_disable(PINGRP_GMD);
+		}
+		break;
+
 	default:
 		debug("%s: invalid periph_id %d", __func__, id);
 		return -1;
diff --git a/arch/arm/include/asm/arch-tegra2/funcmux.h b/arch/arm/include/asm/arch-tegra2/funcmux.h
index 3cbc7d2..dcd512f 100644
--- a/arch/arm/include/asm/arch-tegra2/funcmux.h
+++ b/arch/arm/include/asm/arch-tegra2/funcmux.h
@@ -54,6 +54,9 @@ enum {
 
 	/* USB configs */
 	FUNCMUX_USB2_ULPI = 0,
+
+	/* Serial Flash configs */
+	FUNCMUX_SPI1_GMC_GMD = 0,
 };
 
 /**
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH 2/3] tegra: add pin_mux_spi() board initialization function
  2012-06-12 18:33 [U-Boot] [PATCH 1/3] tegra: add GMC/GMD funcmux entry for SFLASH Stephen Warren
@ 2012-06-12 18:33 ` Stephen Warren
  2012-06-12 18:33 ` [U-Boot] [PATCH 3/3] tegra: trimslice: set up serial flash pinmux Stephen Warren
  2012-06-27 19:50 ` [U-Boot] [PATCH 1/3] tegra: add GMC/GMD funcmux entry for SFLASH Tom Warren
  2 siblings, 0 replies; 4+ messages in thread
From: Stephen Warren @ 2012-06-12 18:33 UTC (permalink / raw)
  To: u-boot

From: Stephen Warren <swarren@nvidia.com>

Boards can override this to set up the pinmux correctly to access serial
flash.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
 board/nvidia/common/board.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/board/nvidia/common/board.c b/board/nvidia/common/board.c
index fc8b928..e65fc9e 100644
--- a/board/nvidia/common/board.c
+++ b/board/nvidia/common/board.c
@@ -64,6 +64,12 @@ void __pin_mux_usb(void)
 
 void pin_mux_usb(void) __attribute__((weak, alias("__pin_mux_usb")));
 
+void __pin_mux_spi(void)
+{
+}
+
+void pin_mux_spi(void) __attribute__((weak, alias("__pin_mux_spi")));
+
 /*
  * Routine: power_det_init
  * Description: turn off power detects
@@ -95,6 +101,7 @@ int board_init(void)
 	gpio_config_uart();
 #endif
 #ifdef CONFIG_TEGRA_SPI
+	pin_mux_spi();
 	spi_init();
 #endif
 	/* boot param addr */
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH 3/3] tegra: trimslice: set up serial flash pinmux
  2012-06-12 18:33 [U-Boot] [PATCH 1/3] tegra: add GMC/GMD funcmux entry for SFLASH Stephen Warren
  2012-06-12 18:33 ` [U-Boot] [PATCH 2/3] tegra: add pin_mux_spi() board initialization function Stephen Warren
@ 2012-06-12 18:33 ` Stephen Warren
  2012-06-27 19:50 ` [U-Boot] [PATCH 1/3] tegra: add GMC/GMD funcmux entry for SFLASH Tom Warren
  2 siblings, 0 replies; 4+ messages in thread
From: Stephen Warren @ 2012-06-12 18:33 UTC (permalink / raw)
  To: u-boot

From: Stephen Warren <swarren@nvidia.com>

When Trimslice is booted from serial flash, the boot ROM does this, so
U-Boot doesn't need to. However, booting from the SD slot for recovery
purposes, the boot ROM does not set up the pinmux for serial flash. Add
code to U-Boot to set this up, so that an SD-based recovery U-Boot image
can upgrade the U-Boot in serial flash.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
 board/compulab/trimslice/trimslice.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/board/compulab/trimslice/trimslice.c b/board/compulab/trimslice/trimslice.c
index f15fbd7..1ac15f8 100644
--- a/board/compulab/trimslice/trimslice.c
+++ b/board/compulab/trimslice/trimslice.c
@@ -42,6 +42,11 @@ void gpio_config_uart(void)
 {
 }
 
+void pin_mux_spi(void)
+{
+	funcmux_select(PERIPH_ID_SPI1, FUNCMUX_SPI1_GMC_GMD);
+}
+
 /*
  * Routine: pin_mux_mmc
  * Description: setup the pin muxes/tristate values for the SDMMC(s)
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH 1/3] tegra: add GMC/GMD funcmux entry for SFLASH
  2012-06-12 18:33 [U-Boot] [PATCH 1/3] tegra: add GMC/GMD funcmux entry for SFLASH Stephen Warren
  2012-06-12 18:33 ` [U-Boot] [PATCH 2/3] tegra: add pin_mux_spi() board initialization function Stephen Warren
  2012-06-12 18:33 ` [U-Boot] [PATCH 3/3] tegra: trimslice: set up serial flash pinmux Stephen Warren
@ 2012-06-27 19:50 ` Tom Warren
  2 siblings, 0 replies; 4+ messages in thread
From: Tom Warren @ 2012-06-27 19:50 UTC (permalink / raw)
  To: u-boot

Stephen,

> -----Original Message-----
> From: Stephen Warren [mailto:swarren at wwwdotorg.org]
> Sent: Tuesday, June 12, 2012 11:34 AM
> To: Tom Warren
> Cc: u-boot at lists.denx.de; Stephen Warren
> Subject: [PATCH 1/3] tegra: add GMC/GMD funcmux entry for SFLASH

This series (3 patches) has been applied to u-boot-tegra/master. Thanks!

Tom
> 
> From: Stephen Warren <swarren@nvidia.com>
> 
> This is used on TrimSlice.
> 
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
> ---
>  arch/arm/cpu/armv7/tegra2/funcmux.c        |   10 ++++++++++
>  arch/arm/include/asm/arch-tegra2/funcmux.h |    3 +++
>  2 files changed, 13 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/cpu/armv7/tegra2/funcmux.c
> b/arch/arm/cpu/armv7/tegra2/funcmux.c
> index 455d010..4a31a4c 100644
> --- a/arch/arm/cpu/armv7/tegra2/funcmux.c
> +++ b/arch/arm/cpu/armv7/tegra2/funcmux.c
> @@ -224,6 +224,16 @@ int funcmux_select(enum periph_id id, int config)
>  		}
>  		break;
> 
> +	case PERIPH_ID_SPI1:
> +		if (config == FUNCMUX_SPI1_GMC_GMD) {
> +			pinmux_set_func(PINGRP_GMC, PMUX_FUNC_SFLASH);
> +			pinmux_set_func(PINGRP_GMD, PMUX_FUNC_SFLASH);
> +
> +			pinmux_tristate_disable(PINGRP_GMC);
> +			pinmux_tristate_disable(PINGRP_GMD);
> +		}
> +		break;
> +
>  	default:
>  		debug("%s: invalid periph_id %d", __func__, id);
>  		return -1;
> diff --git a/arch/arm/include/asm/arch-tegra2/funcmux.h
> b/arch/arm/include/asm/arch-tegra2/funcmux.h
> index 3cbc7d2..dcd512f 100644
> --- a/arch/arm/include/asm/arch-tegra2/funcmux.h
> +++ b/arch/arm/include/asm/arch-tegra2/funcmux.h
> @@ -54,6 +54,9 @@ enum {
> 
>  	/* USB configs */
>  	FUNCMUX_USB2_ULPI = 0,
> +
> +	/* Serial Flash configs */
> +	FUNCMUX_SPI1_GMC_GMD = 0,
>  };
> 
>  /**
> --
> 1.7.0.4
-- 
nvpublic

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-06-27 19:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-12 18:33 [U-Boot] [PATCH 1/3] tegra: add GMC/GMD funcmux entry for SFLASH Stephen Warren
2012-06-12 18:33 ` [U-Boot] [PATCH 2/3] tegra: add pin_mux_spi() board initialization function Stephen Warren
2012-06-12 18:33 ` [U-Boot] [PATCH 3/3] tegra: trimslice: set up serial flash pinmux Stephen Warren
2012-06-27 19:50 ` [U-Boot] [PATCH 1/3] tegra: add GMC/GMD funcmux entry for SFLASH Tom Warren

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.