mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Antony Pavlov <antonynpavlov@gmail.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: November spi changes
Date: Wed, 25 Dec 2013 12:02:33 +0400	[thread overview]
Message-ID: <20131225120233.367089bd40dc188f67cd58a6@gmail.com> (raw)

Hi!

I'm working on adding SPI driver for Atheros 933x.

I'm using this code for registering spi flash:

=========================================================
static struct flash_platform_data spi_boot_flash_data = {
	.name		= "spi",
	.type		= "s25sl032p",
};

static struct spi_board_info spi_devs[] __initdata = {
	{
		/* boot: Spansion S25FL032P SPI flash */
		.name		= "m25p80",
		.max_speed_hz	= 104 * 1000 * 1000,
		.bus_num	= 0,
		.chip_select	= 0,
		.mode		= SPI_MODE_3,
		.platform_data	= &spi_boot_flash_data,
	},
};

...

	spi_register_board_info(spi_devs, ARRAY_SIZE(spi_devs));
=========================================================

If I rebase Atheros 933x over barebox-2013.11.0 then this code
works fine.

If I rebase Atheros 933x over barebox-2013.12.0 then I get
"Ooops" in get_param_by_name(dev=spi, name=size)

=========================================
Board: TP Link WR720N
m25p80 m25p800: s25sl032p (4096 Kbytes)
register_device: already registered spi

Ooops, TLB miss on load or ifetch!

...

### ERROR ### Please RESET the board ###
=========================================

Changing this

=========================================================
static struct flash_platform_data spi_boot_flash_data = {
	.name		= "spi",
	.type		= "s25sl032p",
};
=========================================================

to

=========================================================
static struct flash_platform_data spi_boot_flash_data = {
	.name		= "spi0",
	.type		= "s25sl032p",
};
=========================================================

solves the problem.

Sascha, please, comment this message.

-- 
Best regards,
  Antony Pavlov

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2013-12-25  7:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-25  8:02 Antony Pavlov [this message]
2014-01-06  9:20 ` 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=20131225120233.367089bd40dc188f67cd58a6@gmail.com \
    --to=antonynpavlov@gmail.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /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