From patchwork Wed Feb 4 08:26:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 436196 X-Patchwork-Delegate: sjg@chromium.org 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 8D166140216 for ; Wed, 4 Feb 2015 20:32:46 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AC88C4B6D1; Wed, 4 Feb 2015 10:30:49 +0100 (CET) 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 sOCxgWqnSsUR; Wed, 4 Feb 2015 10:30:49 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 558D2AB58E; Wed, 4 Feb 2015 10:28:26 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 47F174A02F for ; Wed, 4 Feb 2015 09:26:54 +0100 (CET) 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 YyJRjLaAJ42S for ; Wed, 4 Feb 2015 09:26:54 +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 mail-pa0-f41.google.com (mail-pa0-f41.google.com [209.85.220.41]) by theia.denx.de (Postfix) with ESMTPS id C13004A02E for ; Wed, 4 Feb 2015 09:26:51 +0100 (CET) Received: by mail-pa0-f41.google.com with SMTP id kq14so786680pab.0 for ; Wed, 04 Feb 2015 00:26:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:in-reply-to:references; bh=sDeJNOIvMC3Y30WdHBfrCvjVnr1FoCxwn9Mb5nZqqcY=; b=vLFJX1EoMlqr7xPua13SNtpDNfArfW8R7UbLaOkp85Y4Iuj4fErxl3tOCfZ6Q4eE+r vtuRr2YnPEVjgLP5VQrgLqsZ42zjzo3Alaqw/JoCf5budLcM6yIq02fkzzt/HwTvaHuJ VLB50A8B+7G5SY2nB8D5hjpks2MYJ/L/W1tziVca9iV7awUp9oRb5wHPRICrZYOFnNkL o9YrzUyaXrsnXxTba9B1jDqV+H8c2wNKfGydGEUpG5MMQDQ7lR2Qwlzvg7JNntZBhMbV VedJHU1/PwO+V5O9Lki0gLrF2iE1dUBq/6DGLgBtPscUX9sh1cI2Xo+y+XtrqwKRZKa6 ypqg== X-Received: by 10.70.22.234 with SMTP id h10mr44952460pdf.118.1423038409871; Wed, 04 Feb 2015 00:26:49 -0800 (PST) Received: from localhost ([106.120.101.38]) by mx.google.com with ESMTPSA id go1sm487986pbd.75.2015.02.04.00.26.48 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 04 Feb 2015 00:26:49 -0800 (PST) From: Bin Meng To: Simon Glass , U-Boot Mailing List Date: Wed, 4 Feb 2015 16:26:13 +0800 Message-Id: <1423038374-2530-6-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1423038374-2530-1-git-send-email-bmeng.cn@gmail.com> References: <1423038374-2530-1-git-send-email-bmeng.cn@gmail.com> Subject: [U-Boot] [PATCH 5/6] x86: Add SD/MMC support to quark/galileo X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Intel Galileo board has a microSD slot which is routed from Quark SoC SDIO controller. Enable SD/MMC support so that we can use an SD card. Signed-off-by: Bin Meng Acked-by: Simon Glass --- arch/x86/cpu/quark/quark.c | 11 +++++++++++ include/configs/galileo.h | 7 +++++++ 2 files changed, 18 insertions(+) diff --git a/arch/x86/cpu/quark/quark.c b/arch/x86/cpu/quark/quark.c index 0d593d9..dccf7ac 100644 --- a/arch/x86/cpu/quark/quark.c +++ b/arch/x86/cpu/quark/quark.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include @@ -13,6 +14,10 @@ #include #include +static struct pci_device_id mmc_supported[] = { + { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_QRK_SDIO }, +}; + /* * TODO: * @@ -105,3 +110,9 @@ void reset_cpu(ulong addr) /* cold reset */ outb(0x08, PORT_RESET); } + +int cpu_mmc_init(bd_t *bis) +{ + return pci_mmc_init("Quark SDHCI", mmc_supported, + ARRAY_SIZE(mmc_supported)); +} diff --git a/include/configs/galileo.h b/include/configs/galileo.h index bead2fc..d745f4e 100644 --- a/include/configs/galileo.h +++ b/include/configs/galileo.h @@ -50,4 +50,11 @@ #undef CONFIG_VIDEO #undef CONFIG_CFB_CONSOLE +/* SD/MMC support */ +#define CONFIG_MMC +#define CONFIG_SDHCI +#define CONFIG_GENERIC_MMC +#define CONFIG_MMC_SDMA +#define CONFIG_CMD_MMC + #endif /* __CONFIG_H */