public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Lucas Stach <dev@lynxeye.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] tegra: add funcmux entry for NAND attached to KBC
Date: Fri, 28 Sep 2012 01:04:27 +0200	[thread overview]
Message-ID: <1348787067-12672-1-git-send-email-dev@lynxeye.de> (raw)

Secondary config for the Flash attachment.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
---
 arch/arm/cpu/tegra20-common/funcmux.c       | 19 ++++++++++++++++++-
 arch/arm/include/asm/arch-tegra20/funcmux.h |  1 +
 2 Dateien ge?ndert, 19 Zeilen hinzugef?gt(+), 1 Zeile entfernt(-)

diff --git a/arch/arm/cpu/tegra20-common/funcmux.c b/arch/arm/cpu/tegra20-common/funcmux.c
index b2129ad..00b8029 100644
--- a/arch/arm/cpu/tegra20-common/funcmux.c
+++ b/arch/arm/cpu/tegra20-common/funcmux.c
@@ -235,9 +235,26 @@ int funcmux_select(enum periph_id id, int config)
 		break;
 
 	case PERIPH_ID_NDFLASH:
-		if (config == FUNCMUX_NDFLASH_ATC) {
+		switch (config) {
+		case FUNCMUX_NDFLASH_ATC:
 			pinmux_set_func(PINGRP_ATC, PMUX_FUNC_NAND);
 			pinmux_tristate_disable(PINGRP_ATC);
+			break;
+		case FUNCMUX_NDFLASH_KBC_8_BIT:
+			pinmux_set_func(PINGRP_KBCA, PMUX_FUNC_NAND);
+			pinmux_set_func(PINGRP_KBCC, PMUX_FUNC_NAND);
+			pinmux_set_func(PINGRP_KBCD, PMUX_FUNC_NAND);
+			pinmux_set_func(PINGRP_KBCE, PMUX_FUNC_NAND);
+			pinmux_set_func(PINGRP_KBCF, PMUX_FUNC_NAND);
+
+			pinmux_tristate_disable(PINGRP_KBCA);
+			pinmux_tristate_disable(PINGRP_KBCC);
+			pinmux_tristate_disable(PINGRP_KBCD);
+			pinmux_tristate_disable(PINGRP_KBCE);
+			pinmux_tristate_disable(PINGRP_KBCF);
+
+			bad_config = 0;
+			break;
 		}
 		break;
 
diff --git a/arch/arm/include/asm/arch-tegra20/funcmux.h b/arch/arm/include/asm/arch-tegra20/funcmux.h
index bd511db..c986b93 100644
--- a/arch/arm/include/asm/arch-tegra20/funcmux.h
+++ b/arch/arm/include/asm/arch-tegra20/funcmux.h
@@ -60,6 +60,7 @@ enum {
 
 	/* NAND flags */
 	FUNCMUX_NDFLASH_ATC = 0,
+	FUNCMUX_NDFLASH_KBC_8_BIT,
 };
 
 /**
-- 
1.7.11.4

             reply	other threads:[~2012-09-27 23:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-27 23:04 Lucas Stach [this message]
2012-09-27 23:15 ` [U-Boot] [PATCH] tegra: add funcmux entry for NAND attached to KBC Stephen Warren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1348787067-12672-1-git-send-email-dev@lynxeye.de \
    --to=dev@lynxeye.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox