Hi Nicolas,
Sorry for the misunderstanding. This started out as a user app, but looks like it has become a kernel driver.
Where should I be developing this so that it would be considered part of the kernel? I'm new to kernel driver development, so I'd appreciate any guidance. Thanks!
Matt
-----Original Message-----
From: Nicolas Schier <schier@xxxxxx>
Sent: Thursday, February 26, 2009 12:27 AM
To: microblaze-uclinux@xxxxxxxxxxxxxx
Subject: Re: [microblaze-uclinux] Adding SPI Driver causes Kernel to Hang
Hi Matt,
> I found out that I was actually missing a required #define. In order
> to get
> types.h to register types such as u32, I need to include the
> following in my
> code:
>
> #define __KERNEL__
The __KERNEL__ define is there to prevent user space applications from
using internal kernel stuff. To define __KERNEL__ on your own is only
rarely a good solution to whatever problem you want to solve.
> As a side note, I'm doing all my development on this C source file in
> the
> user-apps directory, not the kernel directory. Moving the source files over
> to the kernel source then compiling had no effect.
It seems to be a misunderstanding. I supposed you were trying write a
kernel driver. The standard SPI interface does no more support a char
device as user space interface, thus you will need to write a kernel
driver to access your SPI devices. The code snips I have presented were
actually copied from a kernel driver that connects to the SPI subsystem
(using "xilinx_spi").
> Any suggestions? I'm glad to see that people are interested, I
> really hope
> to get this working. Thanks.
>
> Matt
>
Regards,
Nicolas
--
gpg public key: ID 0xACBC3B35, jabber: nicolas@xxxxxxxxx
-- frykten for herren er opphav til kunnskap --