From patchwork Tue Jan 11 14:05:09 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lei Wen X-Patchwork-Id: 78387 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 10286B70A3 for ; Wed, 12 Jan 2011 00:58:12 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7FEAA2812F; Tue, 11 Jan 2011 14:57:41 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aqfZ7zycb0R0; Tue, 11 Jan 2011 14:57:41 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7CB0928132; Tue, 11 Jan 2011 14:57:17 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BB72F2810B for ; Tue, 11 Jan 2011 14:57:10 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5Gwjkg4daobh for ; Tue, 11 Jan 2011 14:57:10 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from dakia2.marvell.com (dakia2.marvell.com [65.219.4.35]) by theia.denx.de (Postfix) with ESMTPS id A5098280E1 for ; Tue, 11 Jan 2011 14:57:03 +0100 (CET) X-ASG-Debug-ID: 1294754222-082e7f900001-4l7tJC Received: from maili.marvell.com (maili.marvell.com [10.68.76.51]) by dakia2.marvell.com with ESMTP id Rfwrow1w0aB2zbsN; Tue, 11 Jan 2011 05:57:02 -0800 (PST) X-Barracuda-Envelope-From: leiwen@marvell.com Received: from localhost (unknown [10.38.164.83]) by maili.marvell.com (Postfix) with ESMTP id CED598A410; Tue, 11 Jan 2011 05:57:01 -0800 (PST) From: Lei Wen To: Wolfgang Denk , "u-boot@lists.denx.de" , Prafulla Wadaskar , Yu Tang , Ashish Karkare , Prabhanjan Sarnaik , Lei Wen X-ASG-Orig-Subj: [PATCH V4 4/5] mvmfp: add MFP configuration support for PANTHEON Date: Tue, 11 Jan 2011 22:05:09 +0800 X-ASG-Orig-Subj: [PATCH V4 4/5] mvmfp: add MFP configuration support for PANTHEON Message-Id: <1294754710-7834-5-git-send-email-leiwen@marvell.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1294754710-7834-1-git-send-email-leiwen@marvell.com> References: <1294754710-7834-1-git-send-email-leiwen@marvell.com> X-Barracuda-Connect: maili.marvell.com[10.68.76.51] X-Barracuda-Start-Time: 1294754222 X-Barracuda-URL: http://10.68.76.222:80/cgi-mod/mark.cgi X-Barracuda-Spam-Score: -1002.00 X-Barracuda-Spam-Status: No, SCORE=-1002.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=1000.0 Subject: [U-Boot] [PATCH V4 4/5] mvmfp: add MFP configuration support for PANTHEON X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de This patch adds the support MFP support for Marvell PANTHEON SoCs Signed-off-by: Lei Wen --- V2: V3: Fix copyright claim year. V4: Add change log to each patch. arch/arm/include/asm/arch-pantheon/mfp.h | 42 ++++++++++++++++++++++++++++++ drivers/gpio/mvmfp.c | 2 + 2 files changed, 44 insertions(+), 0 deletions(-) create mode 100644 arch/arm/include/asm/arch-pantheon/mfp.h diff --git a/arch/arm/include/asm/arch-pantheon/mfp.h b/arch/arm/include/asm/arch-pantheon/mfp.h new file mode 100644 index 0000000..170dcbb --- /dev/null +++ b/arch/arm/include/asm/arch-pantheon/mfp.h @@ -0,0 +1,42 @@ +/* + * Based on arch/arm/include/asm/arch-armada100/mfp.h + * (C) Copyright 2011 + * Marvell Semiconductor + * Written-by: Lei Wen + * + * 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., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301 USA + */ + +#ifndef __PANTHEON_MFP_H +#define __PANTHEON_MFP_H + +/* + * Frequently used MFP Configuration macros for all PANTHEON family of +SoCs + * + * offset, pull,pF, drv,dF, edge,eF ,afn,aF + */ +/* UART2 */ +#define MFP47_UART2_RXD MFP_REG(0x198) | MFP_AF6 | MFP_DRIVE_MEDIUM +#define MFP48_UART2_TXD MFP_REG(0x19c) | MFP_AF6 | MFP_DRIVE_MEDIUM + +/* More macros can be defined here... */ + +#define MFP_PIN_MAX 117 +#endif diff --git a/drivers/gpio/mvmfp.c b/drivers/gpio/mvmfp.c index 5646ed4..e7830c6 100644 --- a/drivers/gpio/mvmfp.c +++ b/drivers/gpio/mvmfp.c @@ -28,6 +28,8 @@ #include #ifdef CONFIG_ARMADA100 #include +#elif defined(CONFIG_PANTHEON) +#include #else #error Unsupported SoC... #endif