From: David Vrabel <dvrabel@arcom.com>
To: stephen@streetfiresound.com
Cc: linux-kernel@vger.kernel.org, david-b@pacbell.net
Subject: Re: [PATCH] spi: Add PXA2xx SSP SPI Driver
Date: Tue, 07 Feb 2006 11:50:08 +0000 [thread overview]
Message-ID: <43E88970.2020107@arcom.com> (raw)
In-Reply-To: <43e80ec3.oEr+gtyMVtunRTyE%stephen@streetfiresound.com>
stephen@streetfiresound.com wrote:
> From: Stephen Street <stephen@streetfiresound.com>
>
> The driver turns a PXA2xx synchronous serial port (SSP) into a SPI master
> controller (see Documentation/spi/spi_summary). The driver has the following
> features:
I've not tested this on my PXA27x platform yet (I'll try and get this
done this tomorrow) but a few comments.
> --- linux-2.6.16-rc2/drivers/spi/pxa2xx_spi.c 1969-12-31 16:00:00.000000000 -0800
> +++ linux-spi/drivers/spi/pxa2xx_spi.c 2006-02-06 18:39:45.339334630 -0800
> +#define CLOCK_SPEED_HZ 3686400
PXA27x has a clock speed of 13000000 Hz.
> + chip->cr0 = SSCR0_SerClkDiv((CLOCK_SPEED_HZ / spi->max_speed_hz) + 2)
Consider spi->max_speed_hz == CLOCK_SPEED_HZ which gives a divisor of 3
(when it should be 1).
You need SSCR0_SerClkDiv(CLOCK_SPEED_HZ / (spi->max_speed_hz + 1) + 1)
for the correct divisor and for proper rounding.
> + /* Attach to IRQ */
> + irq = platform_get_irq(pdev, 0);
> + if (irq == 0) {
> + dev_err(&pdev->dev, "irq resource not defined\n");
> + status = -ENODEV;
> + goto out_error_master_alloc;
> + }
Greg K-H has a patch pending that makes platform_get_irq() return -ENXIO
instead of 0 on error. This is required for SSP3 on the PXA27x which
uses IRQ 0.
> + /* Release IRQ */
> + irq = platform_get_irq(pdev, 0);
> + if (irq != 0)
> + free_irq(irq, drv_data);
Similarly.
David Vrabel
--
David Vrabel, Design Engineer
Arcom, Clifton Road Tel: +44 (0)1223 411200 ext. 3233
Cambridge CB1 7EA, UK Web: http://www.arcom.com/
next prev parent reply other threads:[~2006-02-07 11:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-07 3:06 [PATCH] spi: Add PXA2xx SSP SPI Driver stephen
2006-02-07 4:22 ` [PATCH] pxa2xx_spi, board support for Lubbock David Brownell
2006-02-07 11:50 ` David Vrabel [this message]
2006-02-07 15:05 ` [PATCH] spi: Add PXA2xx SSP SPI Driver David Vrabel
2006-02-07 21:27 ` Stephen Street
2006-02-07 21:17 ` Stephen Street
2006-02-10 1:38 ` [PATCH] spi: Updated " Stephen Street
2006-02-10 2:18 ` Andrew Morton
2006-02-10 23:07 ` Stephen Street
2006-02-10 23:49 ` Andrew Morton
2006-02-10 17:40 ` Nicolas Pitre
2006-02-10 22:19 ` Stephen Street
2006-02-10 22:45 ` Nicolas Pitre
2006-02-10 23:22 ` Stephen Street
2006-02-14 1:35 ` [PATCH] spi: Code Review " Stephen Street
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43E88970.2020107@arcom.com \
--to=dvrabel@arcom.com \
--cc=david-b@pacbell.net \
--cc=linux-kernel@vger.kernel.org \
--cc=stephen@streetfiresound.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.