From patchwork Thu Dec 23 01:48:11 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 428911 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBN1mMgV026264 for ; Thu, 23 Dec 2010 01:48:23 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751881Ab0LWBsW (ORCPT ); Wed, 22 Dec 2010 20:48:22 -0500 Received: from kirsty.vergenet.net ([202.4.237.240]:51747 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752123Ab0LWBsV (ORCPT ); Wed, 22 Dec 2010 20:48:21 -0500 Received: from ayumi.akashicho.tokyo.vergenet.net (219-109-213-121.bitcat.net [219.109.213.121]) by kirsty.vergenet.net (Postfix) with ESMTP id D9FF424050; Thu, 23 Dec 2010 12:48:19 +1100 (EST) Received: by ayumi.akashicho.tokyo.vergenet.net (Postfix, from userid 7100) id E634FEDE0BB; Thu, 23 Dec 2010 10:48:17 +0900 (JST) From: Simon Horman To: linux-mmc@vger.kernel.org, linux-sh@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Kuninori Morimoto , Magnus Damm , Paul Mundt , Simon Horman Subject: [PATCH] [patch v2] ARM: mach-shmobile: mackerel: Add zboot MMCIF support Date: Thu, 23 Dec 2010 10:48:11 +0900 Message-Id: <1293068891-25526-1-git-send-email-horms@verge.net.au> X-Mailer: git-send-email 1.7.2.3 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Thu, 23 Dec 2010 01:48:23 +0000 (UTC) diff --git a/arch/arm/mach-shmobile/include/mach/mmcif-mackerel.h b/arch/arm/mach-shmobile/include/mach/mmcif-mackerel.h new file mode 100644 index 0000000..34253c1 --- /dev/null +++ b/arch/arm/mach-shmobile/include/mach/mmcif-mackerel.h @@ -0,0 +1,29 @@ +#ifndef MMCIF_MACKEREL_H +#define MMCIF_MACKEREL_H + +#define PORT0CR 0xe6051001 +#define PORT1CR 0xe6051002 +#define PORT2CR 0xe6051003 +#define PORT3CR 0xe6051004 + +#define PORTR031_000DR 0xe6055000 + +static inline void mmcif_init_progress(void) +{ + /* Initialise LEDS0-3 + * registers: PORT0CR-PORT1CR (LED0-LED3 Control) + * value: 0x10 - enable output + */ + __raw_writeb(0x10, PORT0CR); + __raw_writeb(0x10, PORT1CR); + __raw_writeb(0x10, PORT2CR); + __raw_writeb(0x10, PORT3CR); +} + +static inline void mmcif_update_progress(int n) +{ + __raw_writel((__raw_readl(PORTR031_000DR) & 0xf) | + (1 << n), PORTR031_000DR); +} + +#endif /* MMCIF_MACKEREL_H */ diff --git a/arch/arm/mach-shmobile/include/mach/mmcif.h b/arch/arm/mach-shmobile/include/mach/mmcif.h index 0812f1e..f4dc327 100644 --- a/arch/arm/mach-shmobile/include/mach/mmcif.h +++ b/arch/arm/mach-shmobile/include/mach/mmcif.h @@ -9,6 +9,8 @@ #ifdef CONFIG_MACH_AP4EVB #include "mach/mmcif-ap4eb.h" +#elif CONFIG_MACH_MACKEREL +#include "mach/mmcif-mackerel.h" #else #error "unsupported board." #endif