From patchwork Tue Jul 9 10:46:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 2825243 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8231F9F968 for ; Tue, 9 Jul 2013 11:09:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5131820163 for ; Tue, 9 Jul 2013 11:09:53 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 281BD20161 for ; Tue, 9 Jul 2013 11:09:52 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UwVSn-0004uB-Ag; Tue, 09 Jul 2013 10:48:12 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UwVRN-0004q7-EM; Tue, 09 Jul 2013 10:46:37 +0000 Received: from mail-pd0-x231.google.com ([2607:f8b0:400e:c02::231]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UwVRL-0004pN-3V for linux-arm-kernel@lists.infradead.org; Tue, 09 Jul 2013 10:46:35 +0000 Received: by mail-pd0-f177.google.com with SMTP id p10so5069945pdj.8 for ; Tue, 09 Jul 2013 03:46:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:subject; bh=rtVRo9wmzy6sQtS65wZAs2p5skc9vCza9knoT3+F9tk=; b=eFMTVxebSOSBVDF2kje9rvPEZOopZ64bfij3naoz+K0O7b5FBd0bNVeVucWgVIzimf YMElMeZZ4tN+O6NHZtX6dhq8fcZAwIsPoZF7thqJbovZo37j22EjUKc9b4gjrZDvcaBV CvcUkcz4gTh2n+JiqFT84zErQ9gSjsTTNQwKPVxqGOCfwRxy2Tbd1Pll4aEIgFbfmTvr RWTLURb7k1nGAjlqhRyhcTpq81vDhcS2DE0EgTxaiV9JgyKeuF4cw+7KJZc95mo+erDc N02+M9lZauVFiK7eONboyK6OZTUQ/Yl/QxBENkvgsE9TUZDMFgMUCXz2SL0AQqAWIoIs zwag== X-Received: by 10.68.17.169 with SMTP id p9mr25799960pbd.17.1373366771397; Tue, 09 Jul 2013 03:46:11 -0700 (PDT) Received: from [127.0.0.1] (ac230065.ppp.asahi-net.or.jp. [183.77.230.65]) by mx.google.com with ESMTPSA id fr1sm27597528pbb.26.2013.07.09.03.46.08 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 09 Jul 2013 03:46:10 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Date: Tue, 09 Jul 2013 19:46:16 +0900 Message-Id: <20130709104616.1929.47755.sendpatchset@w520> Subject: [PATCH] ARM: shmobile: MULTIPLATFORM KZM9D with no clocks prototype hack X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130709_064635_245849_F00A764A X-CRM114-Status: GOOD ( 10.22 ) X-Spam-Score: -2.0 (--) Cc: arnd@arndb.de, Magnus Damm , horms@verge.net.au, laurent.pinchart@ideasonboard.com, olof@lixom.net, shinya.kuribayashi.px@renesas.com, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Magnus Damm Ugly prototype hack to allow boot of KZM9D without clock framework in case of ARCH_SHMOBILE_MULTI. Obviously not for upstream merge, but may be useful for people working on common clock framework. Not-even-remotely-signed-off-by: Magnus Damm --- drivers/clocksource/em_sti.c | 14 ++++++++++---- drivers/tty/serial/8250/8250_em.c | 13 ++++++++++--- 2 files changed, 20 insertions(+), 7 deletions(-) --- 0001/drivers/clocksource/em_sti.c +++ work/drivers/clocksource/em_sti.c 2013-07-09 13:04:04.000000000 +0900 @@ -77,6 +77,7 @@ static int em_sti_enable(struct em_sti_p { int ret; +#if 0 /* enable clock */ ret = clk_enable(p->clk); if (ret) { @@ -86,7 +87,9 @@ static int em_sti_enable(struct em_sti_p /* configure channel, periodic mode and maximum timeout */ p->rate = clk_get_rate(p->clk); - +#else + p->rate = 32768; +#endif /* reset the counter */ em_sti_write(p, STI_SET_H, 0x40000000); em_sti_write(p, STI_SET_L, 0x00000000); @@ -105,9 +108,10 @@ static void em_sti_disable(struct em_sti { /* mask interrupts */ em_sti_write(p, STI_INTENCLR, 3); - +#if 0 /* stop clock */ clk_disable(p->clk); +#endif } static cycle_t em_sti_count(struct em_sti_priv *p) @@ -348,7 +352,7 @@ static int em_sti_probe(struct platform_ ret = -ENXIO; goto err0; } - +#if 0 /* get hold of clock */ p->clk = clk_get(&pdev->dev, "sclk"); if (IS_ERR(p->clk)) { @@ -356,7 +360,7 @@ static int em_sti_probe(struct platform_ ret = PTR_ERR(p->clk); goto err1; } - +#endif if (request_irq(irq, em_sti_interrupt, IRQF_TIMER | IRQF_IRQPOLL | IRQF_NOBALANCING, dev_name(&pdev->dev), p)) { @@ -371,7 +375,9 @@ static int em_sti_probe(struct platform_ return 0; err2: +#if 0 clk_put(p->clk); +#endif err1: iounmap(p->base); err0: --- 0001/drivers/tty/serial/8250/8250_em.c +++ work/drivers/tty/serial/8250/8250_em.c 2013-07-09 13:04:04.000000000 +0900 @@ -108,14 +108,14 @@ static int serial8250_em_probe(struct pl ret = -ENOMEM; goto err0; } - +#if 0 priv->sclk = clk_get(&pdev->dev, "sclk"); if (IS_ERR(priv->sclk)) { dev_err(&pdev->dev, "unable to get clock\n"); ret = PTR_ERR(priv->sclk); goto err1; } - +#endif memset(&up, 0, sizeof(up)); up.port.mapbase = regs->start; up.port.irq = irq->start; @@ -123,9 +123,12 @@ static int serial8250_em_probe(struct pl up.port.flags = UPF_BOOT_AUTOCONF | UPF_FIXED_PORT | UPF_IOREMAP; up.port.dev = &pdev->dev; up.port.private_data = priv; - +#if 0 clk_enable(priv->sclk); up.port.uartclk = clk_get_rate(priv->sclk); +#else + up.port.uartclk = 114688000; +#endif up.port.iotype = UPIO_MEM32; up.port.serial_in = serial8250_em_serial_in; @@ -144,8 +147,10 @@ static int serial8250_em_probe(struct pl return 0; err2: +#if 0 clk_disable(priv->sclk); clk_put(priv->sclk); +#endif err1: kfree(priv); err0: @@ -157,8 +162,10 @@ static int serial8250_em_remove(struct p struct serial8250_em_priv *priv = platform_get_drvdata(pdev); serial8250_unregister_port(priv->line); +#if 0 clk_disable(priv->sclk); clk_put(priv->sclk); +#endif kfree(priv); return 0; }