From patchwork Thu Nov 17 10:10:23 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 126173 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 A10E8B71ED for ; Thu, 17 Nov 2011 21:10:52 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BDBEF28842; Thu, 17 Nov 2011 11:10:50 +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 ibV0zdSBPx6e; Thu, 17 Nov 2011 11:10:50 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B0B6A28890; Thu, 17 Nov 2011 11:10:46 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 22DF128890 for ; Thu, 17 Nov 2011 11:10:44 +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 vmJZOyKoEaSl for ; Thu, 17 Nov 2011 11:10:43 +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 moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.10]) by theia.denx.de (Postfix) with ESMTP id 8C27428842 for ; Thu, 17 Nov 2011 11:10:43 +0100 (CET) Received: from benhur.adnet.avionic-design.de (p548E12B2.dip0.t-ipconnect.de [84.142.18.178]) by mrelayeu.kundenserver.de (node=mreu3) with ESMTP (Nemesis) id 0MEOzM-1RgOCG2kAa-00G5Wp; Thu, 17 Nov 2011 11:10:41 +0100 Received: from mailbox.adnet.avionic-design.de (add-virt-zarafa.adnet.avionic-design.de [172.20.129.9]) by benhur.adnet.avionic-design.de (Postfix) with ESMTP id C1AA12C411D; Thu, 17 Nov 2011 11:10:41 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mailbox.adnet.avionic-design.de (Postfix) with ESMTP id 27AD72A281D6; Thu, 17 Nov 2011 11:10:40 +0100 (CET) X-Virus-Scanned: amavisd-new at avionic-design.de Received: from mailbox.adnet.avionic-design.de ([127.0.0.1]) by localhost (mailbox.avionic-design.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ea0E7EvkFY0v; Thu, 17 Nov 2011 11:10:27 +0100 (CET) Received: from localhost (avionic-0098.adnet.avionic-design.de [172.20.31.233]) (Authenticated sender: thierry.reding) by mailbox.adnet.avionic-design.de (Postfix) with ESMTPA id AE3FA2A281B4; Thu, 17 Nov 2011 11:10:27 +0100 (CET) From: Thierry Reding To: Tom Warren , Simon Glass Date: Thu, 17 Nov 2011 11:10:23 +0100 Message-Id: <1321524626-6000-2-git-send-email-thierry.reding@avionic-design.de> X-Mailer: git-send-email 1.7.7.3 In-Reply-To: <1321524626-6000-1-git-send-email-thierry.reding@avionic-design.de> References: <1321524626-6000-1-git-send-email-thierry.reding@avionic-design.de> X-Provags-ID: V02:K0:lopmxcLS7bAexrFSnDJbAZv46GECdegX/3HSkmb2H6t f3Akj3KpIEwLLTrpc96MpxonbDZyWf6Dot+AeWMXgUEGhejYK5 0NjBsYzULtZMXm+RG/3g3lBdgT7Vk0lfzx2uedQDoms8Hg0D3q 8+JiREyRj8ZKoYBmXkXdAbCIc/C2/swjbCwQgZoqWp0Gz7QVjm SPe2paHUdJs+TgIL+T/ckjwERGA/C9d27BMGxkq31ElSw7fE4K iclQkicRIg55iWAS5x4CGtXoec6stqPqSvNIWG0bY75mhCthOe 2KDo61kE5TyRdWea4l2HStpk3jnyz0uSkMxgfErW5Mg6YRrKPv sakjCUjjbO8Pwo1EpEpW9eYxi/lrlmd5O/NZnLP0OmF8i196g+ AYOan9JTNffBixuxShgbbxUEV39Pg0vDTvsq0uvuFa1ujZpt9G jHWch Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH v3 1/4] tegra2: Move tegra2_mmc_init() prototype to public header. 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 tegra2_mmc_init() is implemented by the Tegra2 MMC driver. Since most of the Tegra2-based boards will need to call it, this commit exports it in the new public asm/arch/mmc.h header file to prevent each board from providing its own prototype. Signed-off-by: Thierry Reding Acked-by: Stephen Warren Tested-by: Stephen Warren Acked-by: Simon Glass --- arch/arm/include/asm/arch-tegra2/mmc.h | 27 +++++++++++++++++++++++++++ board/nvidia/common/board.h | 1 - board/nvidia/harmony/harmony.c | 2 +- board/nvidia/seaboard/seaboard.c | 2 +- drivers/mmc/tegra2_mmc.h | 2 -- 5 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 arch/arm/include/asm/arch-tegra2/mmc.h diff --git a/arch/arm/include/asm/arch-tegra2/mmc.h b/arch/arm/include/asm/arch-tegra2/mmc.h new file mode 100644 index 0000000..c1f12db --- /dev/null +++ b/arch/arm/include/asm/arch-tegra2/mmc.h @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2011, Google Inc. All rights reserved. + * 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 _TEGRA2_MMC_H_ +#define _TEGRA2_MMC_H_ + +int tegra2_mmc_init(int dev_index, int bus_width, int pwr_gpio, int cd_gpio); + +#endif /* TEGRA2_MMC_H_ */ diff --git a/board/nvidia/common/board.h b/board/nvidia/common/board.h index 1f57086..d0cc03a 100644 --- a/board/nvidia/common/board.h +++ b/board/nvidia/common/board.h @@ -25,6 +25,5 @@ #define _BOARD_H_ void gpio_config_uart(void); -int tegra2_mmc_init(int dev_index, int bus_width, int pwr_gpio, int cd_gpio); #endif /* BOARD_H */ diff --git a/board/nvidia/harmony/harmony.c b/board/nvidia/harmony/harmony.c index 3cbe820..d5e147d 100644 --- a/board/nvidia/harmony/harmony.c +++ b/board/nvidia/harmony/harmony.c @@ -25,11 +25,11 @@ #include #include #include +#include #include #ifdef CONFIG_TEGRA2_MMC #include #endif -#include "../common/board.h" /* * Routine: gpio_config_uart diff --git a/board/nvidia/seaboard/seaboard.c b/board/nvidia/seaboard/seaboard.c index aa77f12..7618d14 100644 --- a/board/nvidia/seaboard/seaboard.c +++ b/board/nvidia/seaboard/seaboard.c @@ -25,11 +25,11 @@ #include #include #include +#include #include #ifdef CONFIG_TEGRA2_MMC #include #endif -#include "../common/board.h" /* * Routine: gpio_config_uart_seaboard diff --git a/drivers/mmc/tegra2_mmc.h b/drivers/mmc/tegra2_mmc.h index b2f6c5b..67c00db 100644 --- a/drivers/mmc/tegra2_mmc.h +++ b/drivers/mmc/tegra2_mmc.h @@ -127,7 +127,5 @@ struct mmc_host { int cd_gpio; /* Change Detect GPIO */ }; -int tegra2_mmc_init(int dev_index, int bus_width, int pwr_gpio, int cd_gpio); - #endif /* __ASSEMBLY__ */ #endif /* __TEGRA2_MMC_H_ */