From patchwork Fri Mar 19 04:46:38 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 86873 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2J4kT6m016443 for ; Fri, 19 Mar 2010 04:46:38 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751099Ab0CSEqh (ORCPT ); Fri, 19 Mar 2010 00:46:37 -0400 Received: from mail-yw0-f198.google.com ([209.85.211.198]:59935 "EHLO mail-yw0-f198.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751087Ab0CSEqh (ORCPT ); Fri, 19 Mar 2010 00:46:37 -0400 Received: by ywh36 with SMTP id 36so474233ywh.4 for ; Thu, 18 Mar 2010 21:46:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:date:message-id :in-reply-to:references:subject; bh=nw6/M6DCW1MmO9+yojNd5Qu8cheTFapPXm6Lrqszf3k=; b=pYi7xU5aj3Wn3hlOrXjL4+uLCp7OT5LHiAXArqO9dhnGPyQ+Tq7T/6cDYrst1vnmgK ZednKiVEeJnq4WOmYk20QH9Hr7w7hVOCQIfD/9ox9el5q3vDXWFzpOw99dc+vXHOCquu +OQxdaJeFOGwtl0a8xow1ImvICtJKUKEYAxuE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:in-reply-to:references:subject; b=cCWyZi74UyqHhiDydypNffqCIYfP3KQaFBgfGWFW74Ba9r67HvN4vnGfFSnVhIAkQx /2n+XfCFclQL/eNtGv06aV8aqgKO7u4S4zbzdR511xi/ny7CDGuGiNnhzBORnraijogm jKUyv1X8tcBgnXBTlnUWiPAGWVeYOVGukfxvE= Received: by 10.100.242.3 with SMTP id p3mr6007382anh.161.1268973996270; Thu, 18 Mar 2010 21:46:36 -0700 (PDT) Received: from [127.0.0.1] (49.14.32.202.bf.2iij.net [202.32.14.49]) by mx.google.com with ESMTPS id 14sm456685gxk.15.2010.03.18.21.46.34 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 18 Mar 2010 21:46:35 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: Magnus Damm , lethal@linux-sh.org, dan.j.williams@intel.com, iwamatsu@nigauri.org, g.liakhovetski@gmx.de Date: Fri, 19 Mar 2010 13:46:38 +0900 Message-Id: <20100319044638.17051.97049.sendpatchset@t400s> In-Reply-To: <20100319044630.17051.16445.sendpatchset@t400s> References: <20100319044630.17051.16445.sendpatchset@t400s> Subject: [PATCH 01/05] dmaengine: shdma: Remove sh_dmae_slave_chan_id enum 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 (demeter.kernel.org [140.211.167.41]); Fri, 19 Mar 2010 04:46:38 +0000 (UTC) --- 0001/arch/sh/include/asm/dmaengine.h +++ work/arch/sh/include/asm/dmaengine.h 2010-03-18 23:30:46.000000000 +0900 @@ -17,7 +17,7 @@ #define SH_DMAC_MAX_CHANNELS 6 -enum sh_dmae_slave_chan_id { +enum { SHDMA_SLAVE_SCIF0_TX, SHDMA_SLAVE_SCIF0_RX, SHDMA_SLAVE_SCIF1_TX, @@ -38,7 +38,7 @@ enum sh_dmae_slave_chan_id { }; struct sh_dmae_slave_config { - enum sh_dmae_slave_chan_id slave_id; + unsigned int slave_id; dma_addr_t addr; u32 chcr; char mid_rid; @@ -68,7 +68,7 @@ struct device; /* Used by slave DMA clients to request DMA to/from a specific peripheral */ struct sh_dmae_slave { - enum sh_dmae_slave_chan_id slave_id; /* Set by the platform */ + unsigned int slave_id; /* Set by the platform */ struct device *dma_dev; /* Set by the platform */ struct sh_dmae_slave_config *config; /* Set by the driver */ }; --- 0001/arch/sh/include/asm/siu.h +++ work/arch/sh/include/asm/siu.h 2010-03-19 13:25:31.000000000 +0900 @@ -17,10 +17,10 @@ struct device; struct siu_platform { struct device *dma_dev; - enum sh_dmae_slave_chan_id dma_slave_tx_a; - enum sh_dmae_slave_chan_id dma_slave_rx_a; - enum sh_dmae_slave_chan_id dma_slave_tx_b; - enum sh_dmae_slave_chan_id dma_slave_rx_b; + unsigned int dma_slave_tx_a; + unsigned int dma_slave_rx_a; + unsigned int dma_slave_tx_b; + unsigned int dma_slave_rx_b; }; #endif /* ASM_SIU_H */ --- 0001/drivers/dma/shdma.c +++ work/drivers/dma/shdma.c 2010-03-18 23:30:46.000000000 +0900 @@ -266,7 +266,7 @@ static struct sh_desc *sh_dmae_get_desc( } static struct sh_dmae_slave_config *sh_dmae_find_slave( - struct sh_dmae_chan *sh_chan, enum sh_dmae_slave_chan_id slave_id) + struct sh_dmae_chan *sh_chan, struct sh_dmae_slave *param) { struct dma_device *dma_dev = sh_chan->common.device; struct sh_dmae_device *shdev = container_of(dma_dev, @@ -274,11 +274,11 @@ static struct sh_dmae_slave_config *sh_d struct sh_dmae_pdata *pdata = shdev->pdata; int i; - if ((unsigned)slave_id >= SHDMA_SLAVE_NUMBER) + if (param->slave_id >= SHDMA_SLAVE_NUMBER) return NULL; for (i = 0; i < pdata->slave_num; i++) - if (pdata->slave[i].slave_id == slave_id) + if (pdata->slave[i].slave_id == param->slave_id) return pdata->slave + i; return NULL; @@ -299,7 +299,7 @@ static int sh_dmae_alloc_chan_resources( if (param) { struct sh_dmae_slave_config *cfg; - cfg = sh_dmae_find_slave(sh_chan, param->slave_id); + cfg = sh_dmae_find_slave(sh_chan, param); if (!cfg) return -EINVAL; --- 0001/drivers/serial/sh-sci.c +++ work/drivers/serial/sh-sci.c 2010-03-18 23:30:46.000000000 +0900 @@ -91,8 +91,8 @@ struct sci_port { struct dma_chan *chan_rx; #ifdef CONFIG_SERIAL_SH_SCI_DMA struct device *dma_dev; - enum sh_dmae_slave_chan_id slave_tx; - enum sh_dmae_slave_chan_id slave_rx; + unsigned int slave_tx; + unsigned int slave_rx; struct dma_async_tx_descriptor *desc_tx; struct dma_async_tx_descriptor *desc_rx[2]; dma_cookie_t cookie_tx; --- 0002/include/linux/serial_sci.h +++ work/include/linux/serial_sci.h 2010-03-18 23:30:46.000000000 +0900 @@ -33,8 +33,8 @@ struct plat_sci_port { char *clk; /* clock string */ struct device *dma_dev; #ifdef CONFIG_SERIAL_SH_SCI_DMA - enum sh_dmae_slave_chan_id dma_slave_tx; - enum sh_dmae_slave_chan_id dma_slave_rx; + unsigned int dma_slave_tx; + unsigned int dma_slave_rx; #endif };