Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758678Ab1EZW6V (ORCPT ); Thu, 26 May 2011 18:58:21 -0400 Received: from mail-iw0-f174.google.com ([209.85.214.174]:42178 "EHLO mail-iw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757352Ab1EZW6U convert rfc822-to-8bit (ORCPT ); Thu, 26 May 2011 18:58:20 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=kfrnRSsDoO/cMgtjR4v+9jspZw6MstOxGzhEGCefs2JUNQAby2FlA2LlEg0IIzbiMV 3hoFj6gL1b4DkrBsFbL2+d7Llpqp1tF3tKAcoT944WlWkB8vVddEB5sLvZcmx71WpynK GrAXlbe6qi32IfglVum3X0zjOQ1MsCL+UHfx8= MIME-Version: 1.0 In-Reply-To: <0D753D10438DA54287A00B027084269764D3319EC4@AUSP01VMBX24.collaborationhost.net> References: <20110525195413.GC2996@acer> <20110526043344.GA2749@acer> <20110526183800.GE2957@acer> <0D753D10438DA54287A00B027084269764D3319EC4@AUSP01VMBX24.collaborationhost.net> Date: Fri, 27 May 2011 00:58:19 +0200 X-Google-Sender-Auth: 6wOio3qGihJr6InUsC0bMV5JbXE Message-ID: Subject: Re: [PATCH 1/5] dmaengine: add ep93xx DMA support From: Linus Walleij To: H Hartley Sweeten Cc: Mika Westerberg , "linux-arm-kernel@lists.infradead.org" , Vinod Koul , "linux-kernel@vger.kernel.org" , "ryan@bluewatersys.com" , Dan Williams , Grant Likely , spi mailing list Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1758 Lines: 58 2011/5/26 H Hartley Sweeten : > I think the biggest hurdle with using the amba-pl022 driver is that the ep93xx > spi peripheral does not have the registers with the pid and cid id's. ?Without > those I don't think the amba bus driver will be able to match the device to > the driver. This is not a problem. We have this code to dynamically create and register a device with a specific periphid on ux500. It worked even before my recent patches to amba's bus.c if you have only zeroes in these registers: struct amba_device * dbx500_add_amba_device(const char *name, resource_size_t base, int irq, void *pdata, unsigned int periphid) { struct amba_device *dev; int ret; dev = kzalloc(sizeof *dev, GFP_KERNEL); if (!dev) return ERR_PTR(-ENOMEM); dev->dev.init_name = name; dev->res.start = base; dev->res.end = base + SZ_4K - 1; dev->res.flags = IORESOURCE_MEM; dev->dma_mask = DMA_BIT_MASK(32); dev->dev.coherent_dma_mask = DMA_BIT_MASK(32); dev->irq[0] = irq; dev->irq[1] = NO_IRQ; dev->periphid = periphid; dev->dev.platform_data = pdata; ret = amba_device_register(dev, &iomem_resource); if (ret) { kfree(dev); return ERR_PTR(ret); } return dev; } I'd recommend coming up with some clever numbering scheme with invented vendor ID. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/