From patchwork Wed Jun 15 06:13:55 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 881082 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p5F6DFdg023854 for ; Wed, 15 Jun 2011 06:13:57 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751020Ab1FOGN4 (ORCPT ); Wed, 15 Jun 2011 02:13:56 -0400 Received: from relmlor3.renesas.com ([210.160.252.173]:54708 "EHLO relmlor3.renesas.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750887Ab1FOGN4 (ORCPT ); Wed, 15 Jun 2011 02:13:56 -0400 Received: from relmlir1.idc.renesas.com ([10.200.68.151]) by relmlor3.idc.renesas.com ( SJSMS) with ESMTP id <0LMT00HGAIN7Z790@relmlor3.idc.renesas.com> for linux-sh@vger.kernel.org; Wed, 15 Jun 2011 15:13:55 +0900 (JST) Received: from relmlac1.idc.renesas.com ([10.200.69.21]) by relmlir1.idc.renesas.com (SJSMS) with ESMTP id <0LMT00J2OIN6LZF0@relmlir1.idc.renesas.com> for linux-sh@vger.kernel.org; Wed, 15 Jun 2011 15:13:55 +0900 (JST) Received: by relmlac1.idc.renesas.com (Postfix, from userid 0) id 70A3F80088; Wed, 15 Jun 2011 15:13:55 +0900 (JST) Received: from relmlac1.idc.renesas.com (localhost [127.0.0.1]) by relmlac1.idc.renesas.com (Postfix) with ESMTP id 6AD37800BE; Wed, 15 Jun 2011 15:13:55 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac1.idc.renesas.com with ESMTP id RAH25929; Wed, 15 Jun 2011 15:13:55 +0900 Date: Wed, 15 Jun 2011 15:13:55 +0900 X-IronPort-AV: E=Sophos; i="4.65,369,1304262000"; d="scan'208"; a="32088474" Received: from unknown (HELO PG10870.renesas.com) ([172.30.8.159]) by relmlii1.idc.renesas.com with ESMTP; Wed, 15 Jun 2011 15:13:55 +0900 Message-id: To: Paul Mundt Cc: Magnus , Linux-SH , Guennadi , Kuninori Morimoto In-reply-to: References: From: Kuninori Morimoto Subject: [PATCH 1/5] dmaengine: shdma: tidyup addr definition User-Agent: SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-2022-JP-2?B?U2Fuag==?= =?ISO-2022-JP-2?B?GyQoRCtXGyhC?=) APEL/10.6 Emacs/23.2 (i386-mingw-nt5.1.2600) MULE/6.0 (HANACHIRUSATO) MIME-version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-type: text/plain; charset=US-ASCII 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.6 (demeter2.kernel.org [140.211.167.43]); Wed, 15 Jun 2011 06:13:57 +0000 (UTC) "void __iomem *" is useful Signed-off-by: Kuninori Morimoto --- drivers/dma/shdma.c | 16 ++++++++-------- drivers/dma/shdma.h | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/dma/shdma.c b/drivers/dma/shdma.c index 2a638f9..8bb77b5 100644 --- a/drivers/dma/shdma.c +++ b/drivers/dma/shdma.c @@ -60,22 +60,22 @@ static void sh_dmae_chan_ld_cleanup(struct sh_dmae_chan *sh_chan, bool all); static void sh_dmae_writel(struct sh_dmae_chan *sh_dc, u32 data, u32 reg) { - __raw_writel(data, sh_dc->base + reg / sizeof(u32)); + __raw_writel(data, sh_dc->base + reg); } static u32 sh_dmae_readl(struct sh_dmae_chan *sh_dc, u32 reg) { - return __raw_readl(sh_dc->base + reg / sizeof(u32)); + return __raw_readl(sh_dc->base + reg); } static u16 dmaor_read(struct sh_dmae_device *shdev) { - return __raw_readw(shdev->chan_reg + DMAOR / sizeof(u32)); + return __raw_readw(shdev->chan_reg + DMAOR); } static void dmaor_write(struct sh_dmae_device *shdev, u16 data) { - __raw_writew(data, shdev->chan_reg + DMAOR / sizeof(u32)); + __raw_writew(data, shdev->chan_reg + DMAOR); } /* @@ -213,7 +213,7 @@ static int dmae_set_dmars(struct sh_dmae_chan *sh_chan, u16 val) struct sh_dmae_device, common); struct sh_dmae_pdata *pdata = shdev->pdata; const struct sh_dmae_channel *chan_pdata = &pdata->channel[sh_chan->id]; - u16 __iomem *addr = shdev->dmars; + void __iomem *addr = shdev->dmars; int shift = chan_pdata->dmars_bit; if (dmae_is_busy(sh_chan)) @@ -221,8 +221,8 @@ static int dmae_set_dmars(struct sh_dmae_chan *sh_chan, u16 val) /* in the case of a missing DMARS resource use first memory window */ if (!addr) - addr = (u16 __iomem *)shdev->chan_reg; - addr += chan_pdata->dmars / sizeof(u16); + addr = (void __iomem *)shdev->chan_reg; + addr += chan_pdata->dmars; __raw_writew((__raw_readw(addr) & (0xff00 >> shift)) | (val << shift), addr); @@ -1016,7 +1016,7 @@ static int __devinit sh_dmae_chan_probe(struct sh_dmae_device *shdev, int id, new_sh_chan->dev = shdev->common.dev; new_sh_chan->id = id; new_sh_chan->irq = irq; - new_sh_chan->base = shdev->chan_reg + chan_pdata->offset / sizeof(u32); + new_sh_chan->base = shdev->chan_reg + chan_pdata->offset; /* Init DMA tasklet */ tasklet_init(&new_sh_chan->tasklet, dmae_do_tasklet, diff --git a/drivers/dma/shdma.h b/drivers/dma/shdma.h index 5ae9fc5..7f5c58f 100644 --- a/drivers/dma/shdma.h +++ b/drivers/dma/shdma.h @@ -35,7 +35,7 @@ struct sh_dmae_chan { int xmit_shift; /* log_2(bytes_per_xfer) */ int irq; int id; /* Raw id of this channel */ - u32 __iomem *base; + void __iomem *base; char dev_id[16]; /* unique name per DMAC of channel */ int pm_error; }; @@ -45,8 +45,8 @@ struct sh_dmae_device { struct sh_dmae_chan *chan[SH_DMAC_MAX_CHANNELS]; struct sh_dmae_pdata *pdata; struct list_head node; - u32 __iomem *chan_reg; - u16 __iomem *dmars; + void __iomem *chan_reg; + void __iomem *dmars; }; #define to_sh_chan(chan) container_of(chan, struct sh_dmae_chan, common)