From: Sascha Hauer <s.hauer@pengutronix.de>
To: Alexander Shiyan <shc_work@mail.ru>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/6] mc13xxx: Define maximum SPI clock frequency global to driver
Date: Thu, 19 Jul 2012 19:55:12 +0200 [thread overview]
Message-ID: <20120719175512.GD30009@pengutronix.de> (raw)
In-Reply-To: <1342711817-866-1-git-send-email-shc_work@mail.ru>
On Thu, Jul 19, 2012 at 07:30:12PM +0400, Alexander Shiyan wrote:
> This patch provide setup for SPI clk frequency global to driver.
> For MC13783 maximum clock frequency is 20 MHz,
> for MC13892 maximum clock frequency is 26 MHz,
> so we define 20 MHz as a maximum SPI clk.
>
> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
> ---
> arch/arm/boards/ccxmx51/ccxmx51.c | 1 -
> arch/arm/boards/freescale-mx51-pdk/board.c | 1 -
> arch/arm/boards/pcm038/pcm038.c | 1 -
> drivers/mfd/mc13xxx.c | 1 +
> 4 files changed, 1 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/boards/ccxmx51/ccxmx51.c b/arch/arm/boards/ccxmx51/ccxmx51.c
> index f494174..f309e0c 100644
> --- a/arch/arm/boards/ccxmx51/ccxmx51.c
> +++ b/arch/arm/boards/ccxmx51/ccxmx51.c
> @@ -191,7 +191,6 @@ static struct spi_imx_master ecspi_0_data = {
> static const struct spi_board_info ccxmx51_spi_board_info[] = {
> {
> .name = "mc13xxx-spi",
> - .max_speed_hz = 6000000,
> .bus_num = 0,
> .chip_select = 0,
> },
> diff --git a/arch/arm/boards/freescale-mx51-pdk/board.c b/arch/arm/boards/freescale-mx51-pdk/board.c
> index 3a568d0..7c2c8fe 100644
> --- a/arch/arm/boards/freescale-mx51-pdk/board.c
> +++ b/arch/arm/boards/freescale-mx51-pdk/board.c
> @@ -117,7 +117,6 @@ static struct spi_imx_master spi_0_data = {
> static const struct spi_board_info mx51_babbage_spi_board_info[] = {
> {
> .name = "mc13xxx-spi",
> - .max_speed_hz = 300000,
> .bus_num = 0,
> .chip_select = 0,
> },
> diff --git a/arch/arm/boards/pcm038/pcm038.c b/arch/arm/boards/pcm038/pcm038.c
> index badc978..fa82b02 100644
> --- a/arch/arm/boards/pcm038/pcm038.c
> +++ b/arch/arm/boards/pcm038/pcm038.c
> @@ -59,7 +59,6 @@ static struct spi_imx_master pcm038_spi_0_data = {
> static struct spi_board_info pcm038_spi_board_info[] = {
> {
> .name = "mc13xxx-spi",
> - .max_speed_hz = 3000000,
> .bus_num = 0,
> .chip_select = 0,
> }
> diff --git a/drivers/mfd/mc13xxx.c b/drivers/mfd/mc13xxx.c
> index 2934e9d..8bb0d00 100644
> --- a/drivers/mfd/mc13xxx.c
> +++ b/drivers/mfd/mc13xxx.c
> @@ -297,6 +297,7 @@ static int mc_probe(struct device_d *dev, enum mc13xxx_mode mode)
> mc_dev->spi = dev->type_data;
> mc_dev->spi->mode = SPI_MODE_0 | SPI_CS_HIGH;
> mc_dev->spi->bits_per_word = 32;
> + mc_dev->spi->max_speed_hz = 20000000;
The values indeed look quite arbitrary, but it may be that a hardware
design does not support such high frequencies. Maybe better
if (!mc_dev->spi->max_speed_hz)
mc_dev->spi->max_speed_hz = 20000000
?
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2012-07-19 17:55 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-19 15:30 Alexander Shiyan
2012-07-19 15:30 ` [PATCH 2/6] i.MX: Removed unused declaration for imx_iim_get_mac Alexander Shiyan
2012-07-19 15:30 ` [PATCH 3/6] mc13xxx: Added dummy definition for mc13xxx_get() if CONFIG_MFD_MC13XXX is not set Alexander Shiyan
2012-07-19 17:56 ` Sascha Hauer
2012-07-20 8:08 ` Re[2]: " Alexander Shiyan
2012-07-19 15:30 ` [PATCH 4/6] tx51: Unused mc13xxx.h include removed Alexander Shiyan
2012-07-19 15:30 ` [PATCH 5/6] PCM970: Add MMC support Alexander Shiyan
2012-07-19 15:30 ` [PATCH 6/6] PCM038: Read UID from fuses and pass this value to kernel as serial number Alexander Shiyan
2012-07-19 18:12 ` Sascha Hauer
2012-07-19 18:48 ` Re[2]: " Alexander Shiyan
2012-07-19 18:49 ` Alexander Shiyan
2012-07-19 17:55 ` Sascha Hauer [this message]
2012-07-20 8:05 ` Re[2]: [PATCH 1/6] mc13xxx: Define maximum SPI clock frequency global to driver Alexander Shiyan
2012-07-20 8:11 ` Sascha Hauer
2012-07-20 8:17 ` Re[2]: " Alexander Shiyan
2012-07-20 7:46 ` Sascha Hauer
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=20120719175512.GD30009@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=shc_work@mail.ru \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox