LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Closed Thread
  Search this Thread
Old 08-01-2013, 06:04 AM   #1
pravinchanm
LQ Newbie
 
Registered: Mar 2012
Posts: 4

Rep: Reputation: Disabled
SDIO Host Driver from User space


Hi all,

I tried to write a SDIO host driver to send commands to the SDIO device. When I included the header files like "linux/mmc/sdio.h" and all other relevant header files to SDIO. It is throwing error on compilation when i simply created the instance for the structure "struct mmc_host *mmc".

Warning : Kernel header files should not be accessed from user space.
Followed by the above lot of errors.

I am using Ubuntu 12.04 64bit machine. I had the vub300 USB to SDIO card driver pre installed. When I connected USB to SDIO host controller the card is detected as the memory device.

For compilation : gcc /usr/src/-I/usr/src/linux-headers-3.5.0-36/arch/x86/include/ -I/usr/src/linux-headers-3.5.0-36/include -o host.exe mmc_host.c

Previously I had developed the UART driver by simply including the file termios.h and the simple read() write() of ttyS0 device. Now also I am expecting to do so for SDIO device.

Kindly help me to develop a SDIO host driver to send various commands like (CMD52) (CMD53) to interface with the SDIO device.


#include<stdio.h>

#include"linux/mmc/host.h"
#include"linux/mmc/sdio_func.h"
#include"linux/mmc/sdio_ids.h"

struct mmc_host func;

void main()
{
}
 
Old 08-01-2013, 07:08 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,121

Rep: Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270Reputation: 2270
duplicate of http://www.linuxquestions.org/questi...ce-4175471713/
 
Old 08-01-2013, 09:34 AM   #3
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,542
Blog Entries: 23

Rep: Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943
Moderator Response

Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. Thread http://www.linuxquestions.org/questi...ce-4175471713/ is being closed because it is a duplicate.
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SDIO Host Driver from User space pravinchanm Linux - Software 1 08-01-2013 07:09 AM
Wireless LAN SDIO card - Wrong SDIO driver loaded [i.MX31] Robert_A Programming 2 03-14-2011 12:14 PM
what is the difference between kernel space driver and user space driver? boidi Linux - Newbie 1 07-23-2010 01:35 AM
SDIO host clock speed in FC 2.6.31 kernel IntelInAbhi Linux - Networking 1 03-26-2010 02:46 PM
Sharing Memory between driver space and user space ian b davidson Programming 1 11-10-2008 07:35 AM


All times are GMT -5. The time now is 03:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration