From patchwork Fri Dec 30 12:47:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 89335 Delivered-To: patches@linaro.org Received: by 10.140.20.101 with SMTP id 92csp6424514qgi; Fri, 30 Dec 2016 04:47:50 -0800 (PST) X-Received: by 10.25.40.212 with SMTP id o203mr16141815lfo.1.1483102070247; Fri, 30 Dec 2016 04:47:50 -0800 (PST) Return-Path: Received: from mail-lf0-x22e.google.com (mail-lf0-x22e.google.com. [2a00:1450:4010:c07::22e]) by mx.google.com with ESMTPS id n89si821348lfi.103.2016.12.30.04.47.50 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Dec 2016 04:47:50 -0800 (PST) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c07::22e as permitted sender) client-ip=2a00:1450:4010:c07::22e; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c07::22e as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by mail-lf0-x22e.google.com with SMTP id b14so236433618lfg.2 for ; Fri, 30 Dec 2016 04:47:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=I/AdI9K8z0KML8Iwj0ovyHAKBbXg2c1BPROqzVoBtCI=; b=E7WKfsHblYDCsgwawUtxDNY3zq2we/T5ZSGSjB4U8XeZ5TlnuH/ZvnRlE2d/Wsjk2K t2WIZ6uJRT7iaY50LVnWzhnRTeddeT/XBysj2ghIi1pa/Tga6cLiG1+qdf0+SbZMkrr8 lsyMT59kRIrAsmSl8NShf0LkjCtH8GO64l4rU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=I/AdI9K8z0KML8Iwj0ovyHAKBbXg2c1BPROqzVoBtCI=; b=ImuqAeZUTYQQ/DHZZDkILw8uTbF5rooFzlTVMS83I1P4co5wc9hLC4VzZXY1L/wOUA l+bvDVvosVPXOabeoPMKxECWeevgs5MzFK2b0tgyt96woR/xbfZFjWHABAbcfHPYpZOY 18swuxksdee1/YYM1Z57avc/Fw1o8CtYSkb/5qFanuEsjj2zHXwdVGUexsVHHEms9spz 2QMvAQnNywcwz7tx/oSCCvkyUs47NGLmuBv5d1WuSXxrkSFyvNi0kUVO7RmFbIvgRaaV HlaOZFLPXLprMEgLjUGphaOhQmjCBVdZByZkG06DRMgf2H8PZ1G3cej02foMt9YFCmSh dRHw== X-Gm-Message-State: AIkVDXJYWwc76dI65SExP3zInePcuG2n4S5/bK3GY7knHF1g28Toc/jrCoE2H0rJFy7379P/1So= X-Received: by 10.25.160.20 with SMTP id j20mr6010916lfe.66.1483102069853; Fri, 30 Dec 2016 04:47:49 -0800 (PST) Return-Path: Received: from localhost.localdomain (h-155-4-221-67.na.cust.bahnhof.se. [155.4.221.67]) by smtp.gmail.com with ESMTPSA id a79sm7450069ljb.46.2016.12.30.04.47.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Dec 2016 04:47:48 -0800 (PST) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Jaehoon Chung , Adrian Hunter , Linus Walleij , linux-sh@vger.kernel.org, Simon Horman , Yoshinori Sato , Rich Felker Subject: [PATCH 01/21] sh: sh7724: Don't use a public mmc header for MMC_PROGRESS* Date: Fri, 30 Dec 2016 13:47:14 +0100 Message-Id: <1483102054-1752-2-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1483102054-1752-1-git-send-email-ulf.hansson@linaro.org> References: <1483102054-1752-1-git-send-email-ulf.hansson@linaro.org> The enum that specifies the MMC_PROGRESS* types, is a sh mmcif specific thing and has no relevance in a public mmc header. Currently it's used only by the sh romImage MMCIF boot, so let's instead define the enum in there and rename the types to MMCIF_* to show this. Cc: linux-sh@vger.kernel.org Cc: Simon Horman Cc: Yoshinori Sato Cc: Rich Felker Signed-off-by: Ulf Hansson --- arch/sh/boot/romimage/mmcif-sh7724.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) -- 1.9.1 Reviewed-by: Simon Horman Reviewed-by: Linus Walleij diff --git a/arch/sh/boot/romimage/mmcif-sh7724.c b/arch/sh/boot/romimage/mmcif-sh7724.c index 16b1225..6595b6b4 100644 --- a/arch/sh/boot/romimage/mmcif-sh7724.c +++ b/arch/sh/boot/romimage/mmcif-sh7724.c @@ -9,7 +9,6 @@ */ #include -#include #include #define MMCIF_BASE (void __iomem *)0xa4ca0000 @@ -22,6 +21,13 @@ #define HIZCRC 0xa405015c #define DRVCRA 0xa405018a +enum { + MMCIF_PROGRESS_ENTER, + MMCIF_PROGRESS_INIT, + MMCIF_PROGRESS_LOAD, + MMCIF_PROGRESS_DONE +}; + /* SH7724 specific MMCIF loader * * loads the romImage from an MMC card starting from block 512 @@ -30,7 +36,7 @@ */ asmlinkage void mmcif_loader(unsigned char *buf, unsigned long no_bytes) { - mmcif_update_progress(MMC_PROGRESS_ENTER); + mmcif_update_progress(MMCIF_PROGRESS_ENTER); /* enable clock to the MMCIF hardware block */ __raw_writel(__raw_readl(MSTPCR2) & ~0x20000000, MSTPCR2); @@ -53,12 +59,12 @@ asmlinkage void mmcif_loader(unsigned char *buf, unsigned long no_bytes) /* high drive capability for MMC pins */ __raw_writew(__raw_readw(DRVCRA) | 0x3000, DRVCRA); - mmcif_update_progress(MMC_PROGRESS_INIT); + mmcif_update_progress(MMCIF_PROGRESS_INIT); /* setup MMCIF hardware */ sh_mmcif_boot_init(MMCIF_BASE); - mmcif_update_progress(MMC_PROGRESS_LOAD); + mmcif_update_progress(MMCIF_PROGRESS_LOAD); /* load kernel via MMCIF interface */ sh_mmcif_boot_do_read(MMCIF_BASE, 512, @@ -68,5 +74,5 @@ asmlinkage void mmcif_loader(unsigned char *buf, unsigned long no_bytes) /* disable clock to the MMCIF hardware block */ __raw_writel(__raw_readl(MSTPCR2) | 0x20000000, MSTPCR2); - mmcif_update_progress(MMC_PROGRESS_DONE); + mmcif_update_progress(MMCIF_PROGRESS_DONE); }