Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
0597007f
Commit
0597007f
authored
Jun 11, 2007
by
Pierre Ossman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sdio: basic parsing of FBR
Signed-off-by:
Pierre Ossman
<
drzeus@drzeus.cx
>
parent
35c66c19
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
0 deletions
+43
-0
drivers/mmc/core/sdio.c
drivers/mmc/core/sdio.c
+38
-0
include/linux/mmc/sdio_func.h
include/linux/mmc/sdio_func.h
+5
-0
No files found.
drivers/mmc/core/sdio.c
View file @
0597007f
...
@@ -23,8 +23,34 @@
...
@@ -23,8 +23,34 @@
#include "sd_ops.h"
#include "sd_ops.h"
#include "sdio_ops.h"
#include "sdio_ops.h"
static
int
sdio_read_fbr
(
struct
sdio_func
*
func
)
{
int
ret
;
unsigned
char
data
;
ret
=
mmc_io_rw_direct
(
func
->
card
,
0
,
0
,
func
->
num
*
0x100
+
SDIO_FBR_STD_IF
,
0
,
&
data
);
if
(
ret
)
goto
out
;
data
&=
0x0f
;
if
(
data
==
0x0f
)
{
ret
=
mmc_io_rw_direct
(
func
->
card
,
0
,
0
,
func
->
num
*
0x100
+
SDIO_FBR_STD_IF_EXT
,
0
,
&
data
);
if
(
ret
)
goto
out
;
}
func
->
class
=
data
;
out:
return
ret
;
}
static
int
sdio_init_func
(
struct
mmc_card
*
card
,
unsigned
int
fn
)
static
int
sdio_init_func
(
struct
mmc_card
*
card
,
unsigned
int
fn
)
{
{
int
ret
;
struct
sdio_func
*
func
;
struct
sdio_func
*
func
;
BUG_ON
(
fn
>
SDIO_MAX_FUNCS
);
BUG_ON
(
fn
>
SDIO_MAX_FUNCS
);
...
@@ -35,9 +61,21 @@ static int sdio_init_func(struct mmc_card *card, unsigned int fn)
...
@@ -35,9 +61,21 @@ static int sdio_init_func(struct mmc_card *card, unsigned int fn)
func
->
num
=
fn
;
func
->
num
=
fn
;
ret
=
sdio_read_fbr
(
func
);
if
(
ret
)
goto
fail
;
card
->
sdio_func
[
fn
-
1
]
=
func
;
card
->
sdio_func
[
fn
-
1
]
=
func
;
return
0
;
return
0
;
fail:
/*
* It is okay to remove the function here even though we hold
* the host lock as we haven't registered the device yet.
*/
sdio_remove_func
(
func
);
return
ret
;
}
}
static
int
sdio_read_cccr
(
struct
mmc_card
*
card
)
static
int
sdio_read_cccr
(
struct
mmc_card
*
card
)
...
...
include/linux/mmc/sdio_func.h
View file @
0597007f
...
@@ -21,6 +21,11 @@ struct sdio_func {
...
@@ -21,6 +21,11 @@ struct sdio_func {
struct
mmc_card
*
card
;
/* the card this device belongs to */
struct
mmc_card
*
card
;
/* the card this device belongs to */
struct
device
dev
;
/* the device */
struct
device
dev
;
/* the device */
unsigned
int
num
;
/* function number */
unsigned
int
num
;
/* function number */
unsigned
char
class
;
/* standard interface class */
unsigned
short
vendor
;
/* vendor id */
unsigned
short
device
;
/* device id */
unsigned
int
state
;
/* function state */
unsigned
int
state
;
/* function state */
#define SDIO_STATE_PRESENT (1<<0)
/* present in sysfs */
#define SDIO_STATE_PRESENT (1<<0)
/* present in sysfs */
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment