From patchwork Sun Jan 9 09:30:15 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 466381 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 p099UdRC030439 for ; Sun, 9 Jan 2011 09:30:40 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751185Ab1AIJaj (ORCPT ); Sun, 9 Jan 2011 04:30:39 -0500 Received: from kirsty.vergenet.net ([202.4.237.240]:36548 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750908Ab1AIJai (ORCPT ); Sun, 9 Jan 2011 04:30:38 -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 CBD4424050; Sun, 9 Jan 2011 20:30:35 +1100 (EST) Received: by ayumi.akashicho.tokyo.vergenet.net (Postfix, from userid 7100) id 2B91CEDE161; Sun, 9 Jan 2011 18:30:33 +0900 (JST) From: Simon Horman To: linux-mmc@vger.kernel.org, vger.kernel.org@vergenet.net, linux-arm-kernel@lists.arm.linux.org.uk Cc: Russell King - ARM Linux , Chris Ball , Yusuke Goda , Kuninori Morimoto , Paul Mundt , Simon Horman , Magnus Damm , Kuninori Morimoto Subject: [PATCH] ARM: mach-shmobile: mackerel: Add zboot MMCIF support Date: Sun, 9 Jan 2011 18:30:15 +0900 Message-Id: <1294565415-20901-1-git-send-email-horms@verge.net.au> X-Mailer: git-send-email 1.7.2.3 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Sun, 09 Jan 2011 09:30:40 +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..e07fb3f --- /dev/null +++ b/arch/arm/mach-shmobile/include/mach/mmcif-mackerel.h @@ -0,0 +1,39 @@ +#ifndef MMCIF_MACKEREL_H +#define MMCIF_MACKEREL_H + +#define PORT0CR 0xe6051000 +#define PORT1CR 0xe6051001 +#define PORT2CR 0xe6051002 +#define PORT159CR 0xe605009f + +#define PORTR031_000DR 0xe6055000 +#define PORTL159_128DR 0xe6054010 + +static inline void mmcif_init_progress(void) +{ + /* Initialise LEDS0-3 + * registers: PORT0CR-PORT2CR,PORT159CR (LED0-LED3 Control) + * value: 0x10 - enable output + */ + __raw_writeb(0x10, PORT0CR); + __raw_writeb(0x10, PORT1CR); + __raw_writeb(0x10, PORT2CR); + __raw_writeb(0x10, PORT159CR); +} + +static inline void mmcif_update_progress(int n) +{ + unsigned a = 0, b = 0; + + if (n < 3) + a = 1 << n; + else + b = 1 << 31; + + __raw_writel((__raw_readl(PORTR031_000DR) & ~0x7) | a, + PORTR031_000DR); + __raw_writel((__raw_readl(PORTL159_128DR) & ~(1 << 31)) | b, + PORTL159_128DR); +} + +#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