tegra: Add NAND support to funcmux
authorSimon Glass <sjg@chromium.org>
Sun, 29 Jul 2012 20:53:26 +0000 (20:53 +0000)
committerTom Warren <twarren@nvidia.com>
Fri, 7 Sep 2012 20:54:30 +0000 (13:54 -0700)
Add selection of NAND flash pins to the funcmux.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
arch/arm/cpu/tegra20-common/funcmux.c
arch/arm/include/asm/arch-tegra20/funcmux.h

index 8cfed645ce9909b494aaee1097e3c59b1b9fd6ad..b2129adf2fec76da8cc0072583da09cbe645f636 100644 (file)
@@ -234,6 +234,13 @@ int funcmux_select(enum periph_id id, int config)
                }
                break;
 
+       case PERIPH_ID_NDFLASH:
+               if (config == FUNCMUX_NDFLASH_ATC) {
+                       pinmux_set_func(PINGRP_ATC, PMUX_FUNC_NAND);
+                       pinmux_tristate_disable(PINGRP_ATC);
+               }
+               break;
+
        default:
                debug("%s: invalid periph_id %d", __func__, id);
                return -1;
index 258f7b641a62b8c3a090c022432235b1f8eafddf..bd511db8532d5d157a9e4dbf440109998a3d3ea9 100644 (file)
@@ -57,6 +57,9 @@ enum {
 
        /* Serial Flash configs */
        FUNCMUX_SPI1_GMC_GMD = 0,
+
+       /* NAND flags */
+       FUNCMUX_NDFLASH_ATC = 0,
 };
 
 /**