[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [microblaze-uclinux] Adding SPI Driver causes Kernel to Hang
- To: <microblaze-uclinux@xxxxxxxxxxxxxx>
- Subject: RE: [microblaze-uclinux] Adding SPI Driver causes Kernel to Hang
- From: Matt Staniszewski <matt.staniszewski@xxxxxxxxx>
- Date: Thu, 26 Feb 2009 09:07:57 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:mime-version :content-class:from:subject:date:importance:x-priority:to :content-transfer-encoding:content-type; bh=EC9JR/G1VxdDthiWPfKadFwQn5D48Hk0rpm7622lzdw=; b=dp93VbeFbXZPuQiUTjmZ7hBKaHdYBQ7RFayf5DOFdXjlJ2TraPhJ9Ctt+LNjlywE5H HmLwrn+BhuNx9qSNv17l+taJbjRy6oCp1g4nbrlQQQtk9YCJYquP06ZjxcEG/SLd4L93 D13Df6+enuOV+H/UFg/HHDOMp3JYANnlrPpGI=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:mime-version:content-class:from:subject:date:importance :x-priority:to:content-transfer-encoding:content-type; b=epUDTRLtWhqscsl6cFIhIzGotGmnZ1cNsXW+P9WTgUt7hWubXaZK9BcOOHwEvt91y3 NvUBEFCPrFEnNFg4DdKsW9Gn7fI8NvB2zj/umFrO9qMvXh5JMVPwZQ9juuUmXH6AlIE8 HTk3TbzIhO+KiB32uaM79vsIcgOh9IYKt5C7U=
- Importance: normal
- Reply-to: microblaze-uclinux@xxxxxxxxxxxxxx
- Sender: owner-microblaze-uclinux@xxxxxxxxxxxxxx
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 --
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/