* Enabling spidev in MCSPI1
@ 2010-01-13 13:00 Philip Balister
2010-01-13 13:33 ` Hemanth V
2010-01-13 20:36 ` Paul Walmsley
0 siblings, 2 replies; 4+ messages in thread
From: Philip Balister @ 2010-01-13 13:00 UTC (permalink / raw)
To: linux-omap@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 537 bytes --]
I'm trying to enable spidev on mcspi1, but when I do, the kernel while
booting after the kernel is uncompressed. No useful messages are
displayed. This is with a current git.
I've attached the diff I use to add the spi driver to the board file.
(OVero + Summit).
With the #if 0 inplace the kernel boots, enable that code and it fails.
+#if 0
+ spi_register_board_info(overo_mcspi_board_info,
+ ARRAY_SIZE(overo_mcspi_board_info));
+#endif
Does anyone see anything obviously wrong with what I am doing?
Philip
[-- Attachment #2: spidev.diff --]
[-- Type: text/plain, Size: 1237 bytes --]
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index d192dd9..804d88f 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -33,6 +33,8 @@
#include <linux/mtd/nand.h>
#include <linux/mtd/partitions.h>
+#include <linux/spi/spi.h>
+
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/flash.h>
@@ -184,6 +186,16 @@ static inline void __init overo_init_smsc911x(void)
static inline void __init overo_init_smsc911x(void) { return; }
#endif
+static struct spi_board_info overo_mcspi_board_info[] = {
+ {
+ .modalias = "spidev",
+ .max_speed_hz = 12000000, // 12 MHz
+ .bus_num = 1,
+ .chip_select = 0,
+ .mode = SPI_MODE_1,
+ },
+};
+
static struct mtd_partition overo_nand_partitions[] = {
{
.name = "xloader",
@@ -424,7 +436,10 @@ static void __init overo_init(void)
usb_ehci_init(&ehci_pdata);
overo_ads7846_init();
overo_init_smsc911x();
-
+#if 0
+ spi_register_board_info(overo_mcspi_board_info,
+ ARRAY_SIZE(overo_mcspi_board_info));
+#endif
/* Ensure SDRC pins are mux'd for self-refresh */
omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: Enabling spidev in MCSPI1
2010-01-13 13:00 Enabling spidev in MCSPI1 Philip Balister
@ 2010-01-13 13:33 ` Hemanth V
2010-01-13 20:36 ` Paul Walmsley
1 sibling, 0 replies; 4+ messages in thread
From: Hemanth V @ 2010-01-13 13:33 UTC (permalink / raw)
To: Philip Balister; +Cc: linux-omap@vger.kernel.org
> I'm trying to enable spidev on mcspi1, but when I do, the kernel while
> booting after the kernel is uncompressed. No useful messages are
> displayed. This is with a current git.
>
> I've attached the diff I use to add the spi driver to the board file.
> (OVero + Summit).
>
> With the #if 0 inplace the kernel boots, enable that code and it fails.
>
> +#if 0
> + spi_register_board_info(overo_mcspi_board_info,
> + ARRAY_SIZE(overo_mcspi_board_info));
> +#endif
>
> Does anyone see anything obviously wrong with what I am doing?
>
Is SPI1 also used for touchscreen on your board, if so it might be conflicting
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Enabling spidev in MCSPI1
2010-01-13 13:00 Enabling spidev in MCSPI1 Philip Balister
2010-01-13 13:33 ` Hemanth V
@ 2010-01-13 20:36 ` Paul Walmsley
2010-01-15 13:43 ` Philip Balister
1 sibling, 1 reply; 4+ messages in thread
From: Paul Walmsley @ 2010-01-13 20:36 UTC (permalink / raw)
To: Philip Balister; +Cc: linux-omap@vger.kernel.org
Hi Philip,
On Wed, 13 Jan 2010, Philip Balister wrote:
> I'm trying to enable spidev on mcspi1, but when I do, the kernel while booting
> after the kernel is uncompressed. No useful messages are displayed. This is
> with a current git.
>
> I've attached the diff I use to add the spi driver to the board file. (OVero +
> Summit).
Maybe try enabling early printk support if you haven't already?
http://www.mail-archive.com/linux-omap@vger.kernel.org/msg21017.html
- Paul
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Enabling spidev in MCSPI1
2010-01-13 20:36 ` Paul Walmsley
@ 2010-01-15 13:43 ` Philip Balister
0 siblings, 0 replies; 4+ messages in thread
From: Philip Balister @ 2010-01-15 13:43 UTC (permalink / raw)
To: Paul Walmsley; +Cc: linux-omap@vger.kernel.org
On 01/13/2010 03:36 PM, Paul Walmsley wrote:
> Hi Philip,
>
> On Wed, 13 Jan 2010, Philip Balister wrote:
>
>> I'm trying to enable spidev on mcspi1, but when I do, the kernel while booting
>> after the kernel is uncompressed. No useful messages are displayed. This is
>> with a current git.
>>
>> I've attached the diff I use to add the spi driver to the board file. (OVero +
>> Summit).
>
> Maybe try enabling early printk support if you haven't already?
>
> http://www.mail-archive.com/linux-omap@vger.kernel.org/msg21017.html
I think the early printk stuff was stopping me seeing the message ....
Unfortunately, I found the conflicting driver, the 7846 touchscreen
driver, and disabled it, so the kernel boots again. (Before I could boot
with debugging messages enabled)
I suspect the kernel should not crash if two drivers try to claim the
spi device. If someone is interested, I can reanable the bad
configuration and try to collect better data.
Philip
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-01-15 13:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-13 13:00 Enabling spidev in MCSPI1 Philip Balister
2010-01-13 13:33 ` Hemanth V
2010-01-13 20:36 ` Paul Walmsley
2010-01-15 13:43 ` Philip Balister
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox