Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
reform-boundary-uboot
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jack Humbert
reform-boundary-uboot
Commits
5f9518b2
Commit
5f9518b2
authored
8 years ago
by
Tom Rini
Browse files
Options
Downloads
Plain Diff
Merge
git://git.denx.de/u-boot-mmc
parents
7d67bb1d
17c9a1c1
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
drivers/mmc/omap_hsmmc.c
+73
-27
73 additions, 27 deletions
drivers/mmc/omap_hsmmc.c
with
73 additions
and
27 deletions
drivers/mmc/omap_hsmmc.c
+
73
−
27
View file @
5f9518b2
...
@@ -56,9 +56,16 @@ DECLARE_GLOBAL_DATA_PTR;
...
@@ -56,9 +56,16 @@ DECLARE_GLOBAL_DATA_PTR;
#define SYSCTL_SRC (1 << 25)
#define SYSCTL_SRC (1 << 25)
#define SYSCTL_SRD (1 << 26)
#define SYSCTL_SRD (1 << 26)
struct
omap_hsmmc_plat
{
struct
mmc_config
cfg
;
struct
mmc
mmc
;
};
struct
omap_hsmmc_data
{
struct
omap_hsmmc_data
{
struct
hsmmc
*
base_addr
;
struct
hsmmc
*
base_addr
;
#ifndef CONFIG_DM_MMC
struct
mmc_config
cfg
;
struct
mmc_config
cfg
;
#endif
#ifdef OMAP_HSMMC_USE_GPIO
#ifdef OMAP_HSMMC_USE_GPIO
#ifdef CONFIG_DM_MMC
#ifdef CONFIG_DM_MMC
struct
gpio_desc
cd_gpio
;
/* Change Detect GPIO */
struct
gpio_desc
cd_gpio
;
/* Change Detect GPIO */
...
@@ -78,7 +85,25 @@ static int mmc_read_data(struct hsmmc *mmc_base, char *buf, unsigned int size);
...
@@ -78,7 +85,25 @@ static int mmc_read_data(struct hsmmc *mmc_base, char *buf, unsigned int size);
static
int
mmc_write_data
(
struct
hsmmc
*
mmc_base
,
const
char
*
buf
,
static
int
mmc_write_data
(
struct
hsmmc
*
mmc_base
,
const
char
*
buf
,
unsigned
int
siz
);
unsigned
int
siz
);
#if defined(OMAP_HSMMC_USE_GPIO) && !defined(CONFIG_DM_MMC)
static
inline
struct
omap_hsmmc_data
*
omap_hsmmc_get_data
(
struct
mmc
*
mmc
)
{
#ifdef CONFIG_DM_MMC
return
dev_get_priv
(
mmc
->
dev
);
#else
return
(
struct
omap_hsmmc_data
*
)
mmc
->
priv
;
#endif
}
static
inline
struct
mmc_config
*
omap_hsmmc_get_cfg
(
struct
mmc
*
mmc
)
{
#ifdef CONFIG_DM_MMC
struct
omap_hsmmc_plat
*
plat
=
dev_get_platdata
(
mmc
->
dev
);
return
&
plat
->
cfg
;
#else
return
&
((
struct
omap_hsmmc_data
*
)
mmc
->
priv
)
->
cfg
;
#endif
}
#if defined(OMAP_HSMMC_USE_GPIO) && !defined(CONFIG_DM_MMC)
static
int
omap_mmc_setup_gpio_in
(
int
gpio
,
const
char
*
label
)
static
int
omap_mmc_setup_gpio_in
(
int
gpio
,
const
char
*
label
)
{
{
int
ret
;
int
ret
;
...
@@ -102,6 +127,7 @@ static int omap_mmc_setup_gpio_in(int gpio, const char *label)
...
@@ -102,6 +127,7 @@ static int omap_mmc_setup_gpio_in(int gpio, const char *label)
static
unsigned
char
mmc_board_init
(
struct
mmc
*
mmc
)
static
unsigned
char
mmc_board_init
(
struct
mmc
*
mmc
)
{
{
#if defined(CONFIG_OMAP34XX)
#if defined(CONFIG_OMAP34XX)
struct
mmc_config
*
cfg
=
omap_hsmmc_get_cfg
(
mmc
);
t2_t
*
t2_base
=
(
t2_t
*
)
T2_BASE
;
t2_t
*
t2_base
=
(
t2_t
*
)
T2_BASE
;
struct
prcm
*
prcm_base
=
(
struct
prcm
*
)
PRCM_BASE
;
struct
prcm
*
prcm_base
=
(
struct
prcm
*
)
PRCM_BASE
;
u32
pbias_lite
;
u32
pbias_lite
;
...
@@ -142,7 +168,7 @@ static unsigned char mmc_board_init(struct mmc *mmc)
...
@@ -142,7 +168,7 @@ static unsigned char mmc_board_init(struct mmc *mmc)
&
t2_base
->
devconf1
);
&
t2_base
->
devconf1
);
/* Change from default of 52MHz to 26MHz if necessary */
/* Change from default of 52MHz to 26MHz if necessary */
if
(
!
(
mmc
->
cfg
->
host_caps
&
MMC_MODE_HS_52MHz
))
if
(
!
(
cfg
->
host_caps
&
MMC_MODE_HS_52MHz
))
writel
(
readl
(
&
t2_base
->
ctl_prog_io1
)
&
~
CTLPROGIO1SPEEDCTRL
,
writel
(
readl
(
&
t2_base
->
ctl_prog_io1
)
&
~
CTLPROGIO1SPEEDCTRL
,
&
t2_base
->
ctl_prog_io1
);
&
t2_base
->
ctl_prog_io1
);
...
@@ -157,7 +183,7 @@ static unsigned char mmc_board_init(struct mmc *mmc)
...
@@ -157,7 +183,7 @@ static unsigned char mmc_board_init(struct mmc *mmc)
#if defined(CONFIG_OMAP54XX) || defined(CONFIG_OMAP44XX)
#if defined(CONFIG_OMAP54XX) || defined(CONFIG_OMAP44XX)
/* PBIAS config needed for MMC1 only */
/* PBIAS config needed for MMC1 only */
if
(
mmc
->
block_dev
.
devnum
==
0
)
if
(
mmc
_get_blk_desc
(
mmc
)
->
devnum
==
0
)
vmmc_pbias_config
(
LDO_VOLT_3V0
);
vmmc_pbias_config
(
LDO_VOLT_3V0
);
#endif
#endif
...
@@ -194,12 +220,13 @@ void mmc_init_stream(struct hsmmc *mmc_base)
...
@@ -194,12 +220,13 @@ void mmc_init_stream(struct hsmmc *mmc_base)
static
int
omap_hsmmc_init_setup
(
struct
mmc
*
mmc
)
static
int
omap_hsmmc_init_setup
(
struct
mmc
*
mmc
)
{
{
struct
omap_hsmmc_data
*
priv
=
omap_hsmmc_get_data
(
mmc
);
struct
hsmmc
*
mmc_base
;
struct
hsmmc
*
mmc_base
;
unsigned
int
reg_val
;
unsigned
int
reg_val
;
unsigned
int
dsor
;
unsigned
int
dsor
;
ulong
start
;
ulong
start
;
mmc_base
=
((
struct
omap_hsmmc_data
*
)
mmc
->
priv
)
->
base_addr
;
mmc_base
=
priv
->
base_addr
;
mmc_board_init
(
mmc
);
mmc_board_init
(
mmc
);
writel
(
readl
(
&
mmc_base
->
sysconfig
)
|
MMC_SOFTRESET
,
writel
(
readl
(
&
mmc_base
->
sysconfig
)
|
MMC_SOFTRESET
,
...
@@ -304,11 +331,12 @@ static void mmc_reset_controller_fsm(struct hsmmc *mmc_base, u32 bit)
...
@@ -304,11 +331,12 @@ static void mmc_reset_controller_fsm(struct hsmmc *mmc_base, u32 bit)
static
int
omap_hsmmc_send_cmd
(
struct
mmc
*
mmc
,
struct
mmc_cmd
*
cmd
,
static
int
omap_hsmmc_send_cmd
(
struct
mmc
*
mmc
,
struct
mmc_cmd
*
cmd
,
struct
mmc_data
*
data
)
struct
mmc_data
*
data
)
{
{
struct
omap_hsmmc_data
*
priv
=
omap_hsmmc_get_data
(
mmc
);
struct
hsmmc
*
mmc_base
;
struct
hsmmc
*
mmc_base
;
unsigned
int
flags
,
mmc_stat
;
unsigned
int
flags
,
mmc_stat
;
ulong
start
;
ulong
start
;
mmc_base
=
((
struct
omap_hsmmc_data
*
)
mmc
->
priv
)
->
base_addr
;
mmc_base
=
priv
->
base_addr
;
start
=
get_timer
(
0
);
start
=
get_timer
(
0
);
while
((
readl
(
&
mmc_base
->
pstate
)
&
(
DATI_MASK
|
CMDI_MASK
))
!=
0
)
{
while
((
readl
(
&
mmc_base
->
pstate
)
&
(
DATI_MASK
|
CMDI_MASK
))
!=
0
)
{
if
(
get_timer
(
0
)
-
start
>
MAX_RETRY_MS
)
{
if
(
get_timer
(
0
)
-
start
>
MAX_RETRY_MS
)
{
...
@@ -533,11 +561,12 @@ static int mmc_write_data(struct hsmmc *mmc_base, const char *buf,
...
@@ -533,11 +561,12 @@ static int mmc_write_data(struct hsmmc *mmc_base, const char *buf,
static
int
omap_hsmmc_set_ios
(
struct
mmc
*
mmc
)
static
int
omap_hsmmc_set_ios
(
struct
mmc
*
mmc
)
{
{
struct
omap_hsmmc_data
*
priv
=
omap_hsmmc_get_data
(
mmc
);
struct
hsmmc
*
mmc_base
;
struct
hsmmc
*
mmc_base
;
unsigned
int
dsor
=
0
;
unsigned
int
dsor
=
0
;
ulong
start
;
ulong
start
;
mmc_base
=
((
struct
omap_hsmmc_data
*
)
mmc
->
priv
)
->
base_addr
;
mmc_base
=
priv
->
base_addr
;
/* configue bus width */
/* configue bus width */
switch
(
mmc
->
bus_width
)
{
switch
(
mmc
->
bus_width
)
{
case
8
:
case
8
:
...
@@ -591,7 +620,7 @@ static int omap_hsmmc_set_ios(struct mmc *mmc)
...
@@ -591,7 +620,7 @@ static int omap_hsmmc_set_ios(struct mmc *mmc)
#ifdef CONFIG_DM_MMC
#ifdef CONFIG_DM_MMC
static
int
omap_hsmmc_getcd
(
struct
mmc
*
mmc
)
static
int
omap_hsmmc_getcd
(
struct
mmc
*
mmc
)
{
{
struct
omap_hsmmc_data
*
priv
=
mmc
->
priv
;
struct
omap_hsmmc_data
*
priv
=
omap_hsmmc_get_data
(
mmc
)
;
int
value
;
int
value
;
value
=
dm_gpio_get_value
(
&
priv
->
cd_gpio
);
value
=
dm_gpio_get_value
(
&
priv
->
cd_gpio
);
...
@@ -606,7 +635,7 @@ static int omap_hsmmc_getcd(struct mmc *mmc)
...
@@ -606,7 +635,7 @@ static int omap_hsmmc_getcd(struct mmc *mmc)
static
int
omap_hsmmc_getwp
(
struct
mmc
*
mmc
)
static
int
omap_hsmmc_getwp
(
struct
mmc
*
mmc
)
{
{
struct
omap_hsmmc_data
*
priv
=
mmc
->
priv
;
struct
omap_hsmmc_data
*
priv
=
omap_hsmmc_get_data
(
mmc
)
;
int
value
;
int
value
;
value
=
dm_gpio_get_value
(
&
priv
->
wp_gpio
);
value
=
dm_gpio_get_value
(
&
priv
->
wp_gpio
);
...
@@ -618,11 +647,11 @@ static int omap_hsmmc_getwp(struct mmc *mmc)
...
@@ -618,11 +647,11 @@ static int omap_hsmmc_getwp(struct mmc *mmc)
#else
#else
static
int
omap_hsmmc_getcd
(
struct
mmc
*
mmc
)
static
int
omap_hsmmc_getcd
(
struct
mmc
*
mmc
)
{
{
struct
omap_hsmmc_data
*
priv
_data
=
mmc
->
priv
;
struct
omap_hsmmc_data
*
priv
=
omap_hsmmc_get_data
(
mmc
)
;
int
cd_gpio
;
int
cd_gpio
;
/* if no CD return as 1 */
/* if no CD return as 1 */
cd_gpio
=
priv
_data
->
cd_gpio
;
cd_gpio
=
priv
->
cd_gpio
;
if
(
cd_gpio
<
0
)
if
(
cd_gpio
<
0
)
return
1
;
return
1
;
...
@@ -632,11 +661,11 @@ static int omap_hsmmc_getcd(struct mmc *mmc)
...
@@ -632,11 +661,11 @@ static int omap_hsmmc_getcd(struct mmc *mmc)
static
int
omap_hsmmc_getwp
(
struct
mmc
*
mmc
)
static
int
omap_hsmmc_getwp
(
struct
mmc
*
mmc
)
{
{
struct
omap_hsmmc_data
*
priv
_data
=
mmc
->
priv
;
struct
omap_hsmmc_data
*
priv
=
omap_hsmmc_get_data
(
mmc
)
;
int
wp_gpio
;
int
wp_gpio
;
/* if no WP return as 0 */
/* if no WP return as 0 */
wp_gpio
=
priv
_data
->
wp_gpio
;
wp_gpio
=
priv
->
wp_gpio
;
if
(
wp_gpio
<
0
)
if
(
wp_gpio
<
0
)
return
0
;
return
0
;
...
@@ -661,23 +690,23 @@ int omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max, int cd_gpio,
...
@@ -661,23 +690,23 @@ int omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max, int cd_gpio,
int
wp_gpio
)
int
wp_gpio
)
{
{
struct
mmc
*
mmc
;
struct
mmc
*
mmc
;
struct
omap_hsmmc_data
*
priv
_data
;
struct
omap_hsmmc_data
*
priv
;
struct
mmc_config
*
cfg
;
struct
mmc_config
*
cfg
;
uint
host_caps_val
;
uint
host_caps_val
;
priv
_data
=
malloc
(
sizeof
(
*
priv
_data
));
priv
=
malloc
(
sizeof
(
*
priv
));
if
(
priv
_data
==
NULL
)
if
(
priv
==
NULL
)
return
-
1
;
return
-
1
;
host_caps_val
=
MMC_MODE_4BIT
|
MMC_MODE_HS_52MHz
|
MMC_MODE_HS
;
host_caps_val
=
MMC_MODE_4BIT
|
MMC_MODE_HS_52MHz
|
MMC_MODE_HS
;
switch
(
dev_index
)
{
switch
(
dev_index
)
{
case
0
:
case
0
:
priv
_data
->
base_addr
=
(
struct
hsmmc
*
)
OMAP_HSMMC1_BASE
;
priv
->
base_addr
=
(
struct
hsmmc
*
)
OMAP_HSMMC1_BASE
;
break
;
break
;
#ifdef OMAP_HSMMC2_BASE
#ifdef OMAP_HSMMC2_BASE
case
1
:
case
1
:
priv
_data
->
base_addr
=
(
struct
hsmmc
*
)
OMAP_HSMMC2_BASE
;
priv
->
base_addr
=
(
struct
hsmmc
*
)
OMAP_HSMMC2_BASE
;
#if (defined(CONFIG_OMAP44XX) || defined(CONFIG_OMAP54XX) || \
#if (defined(CONFIG_OMAP44XX) || defined(CONFIG_OMAP54XX) || \
defined(CONFIG_DRA7XX) || defined(CONFIG_AM33XX) || \
defined(CONFIG_DRA7XX) || defined(CONFIG_AM33XX) || \
defined(CONFIG_AM43XX) || defined(CONFIG_SOC_KEYSTONE)) && \
defined(CONFIG_AM43XX) || defined(CONFIG_SOC_KEYSTONE)) && \
...
@@ -689,7 +718,7 @@ int omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max, int cd_gpio,
...
@@ -689,7 +718,7 @@ int omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max, int cd_gpio,
#endif
#endif
#ifdef OMAP_HSMMC3_BASE
#ifdef OMAP_HSMMC3_BASE
case
2
:
case
2
:
priv
_data
->
base_addr
=
(
struct
hsmmc
*
)
OMAP_HSMMC3_BASE
;
priv
->
base_addr
=
(
struct
hsmmc
*
)
OMAP_HSMMC3_BASE
;
#if defined(CONFIG_DRA7XX) && defined(CONFIG_HSMMC3_8BIT)
#if defined(CONFIG_DRA7XX) && defined(CONFIG_HSMMC3_8BIT)
/* Enable 8-bit interface for eMMC on DRA7XX */
/* Enable 8-bit interface for eMMC on DRA7XX */
host_caps_val
|=
MMC_MODE_8BIT
;
host_caps_val
|=
MMC_MODE_8BIT
;
...
@@ -697,16 +726,16 @@ int omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max, int cd_gpio,
...
@@ -697,16 +726,16 @@ int omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max, int cd_gpio,
break
;
break
;
#endif
#endif
default:
default:
priv
_data
->
base_addr
=
(
struct
hsmmc
*
)
OMAP_HSMMC1_BASE
;
priv
->
base_addr
=
(
struct
hsmmc
*
)
OMAP_HSMMC1_BASE
;
return
1
;
return
1
;
}
}
#ifdef OMAP_HSMMC_USE_GPIO
#ifdef OMAP_HSMMC_USE_GPIO
/* on error gpio values are set to -1, which is what we want */
/* on error gpio values are set to -1, which is what we want */
priv
_data
->
cd_gpio
=
omap_mmc_setup_gpio_in
(
cd_gpio
,
"mmc_cd"
);
priv
->
cd_gpio
=
omap_mmc_setup_gpio_in
(
cd_gpio
,
"mmc_cd"
);
priv
_data
->
wp_gpio
=
omap_mmc_setup_gpio_in
(
wp_gpio
,
"mmc_wp"
);
priv
->
wp_gpio
=
omap_mmc_setup_gpio_in
(
wp_gpio
,
"mmc_wp"
);
#endif
#endif
cfg
=
&
priv
_data
->
cfg
;
cfg
=
&
priv
->
cfg
;
cfg
->
name
=
"OMAP SD/MMC"
;
cfg
->
name
=
"OMAP SD/MMC"
;
cfg
->
ops
=
&
omap_hsmmc_ops
;
cfg
->
ops
=
&
omap_hsmmc_ops
;
...
@@ -737,7 +766,7 @@ int omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max, int cd_gpio,
...
@@ -737,7 +766,7 @@ int omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max, int cd_gpio,
if
((
get_cpu_family
()
==
CPU_OMAP34XX
)
&&
(
get_cpu_rev
()
<=
CPU_3XX_ES21
))
if
((
get_cpu_family
()
==
CPU_OMAP34XX
)
&&
(
get_cpu_rev
()
<=
CPU_3XX_ES21
))
cfg
->
b_max
=
1
;
cfg
->
b_max
=
1
;
#endif
#endif
mmc
=
mmc_create
(
cfg
,
priv
_data
);
mmc
=
mmc_create
(
cfg
,
priv
);
if
(
mmc
==
NULL
)
if
(
mmc
==
NULL
)
return
-
1
;
return
-
1
;
...
@@ -747,14 +776,14 @@ int omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max, int cd_gpio,
...
@@ -747,14 +776,14 @@ int omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max, int cd_gpio,
static
int
omap_hsmmc_ofdata_to_platdata
(
struct
udevice
*
dev
)
static
int
omap_hsmmc_ofdata_to_platdata
(
struct
udevice
*
dev
)
{
{
struct
omap_hsmmc_data
*
priv
=
dev_get_priv
(
dev
);
struct
omap_hsmmc_data
*
priv
=
dev_get_priv
(
dev
);
struct
omap_hsmmc_plat
*
plat
=
dev_get_platdata
(
dev
);
struct
mmc_config
*
cfg
=
&
plat
->
cfg
;
const
void
*
fdt
=
gd
->
fdt_blob
;
const
void
*
fdt
=
gd
->
fdt_blob
;
int
node
=
dev_of_offset
(
dev
);
int
node
=
dev_of_offset
(
dev
);
struct
mmc_config
*
cfg
;
int
val
;
int
val
;
priv
->
base_addr
=
map_physmem
(
dev_get_addr
(
dev
),
sizeof
(
struct
hsmmc
*
),
priv
->
base_addr
=
map_physmem
(
dev_get_addr
(
dev
),
sizeof
(
struct
hsmmc
*
),
MAP_NOCACHE
);
MAP_NOCACHE
);
cfg
=
&
priv
->
cfg
;
cfg
->
host_caps
=
MMC_MODE_HS_52MHz
|
MMC_MODE_HS
;
cfg
->
host_caps
=
MMC_MODE_HS_52MHz
|
MMC_MODE_HS
;
val
=
fdtdec_get_int
(
fdt
,
node
,
"bus-width"
,
-
1
);
val
=
fdtdec_get_int
(
fdt
,
node
,
"bus-width"
,
-
1
);
...
@@ -786,20 +815,33 @@ static int omap_hsmmc_ofdata_to_platdata(struct udevice *dev)
...
@@ -786,20 +815,33 @@ static int omap_hsmmc_ofdata_to_platdata(struct udevice *dev)
return
0
;
return
0
;
}
}
#ifdef CONFIG_BLK
static
int
omap_hsmmc_bind
(
struct
udevice
*
dev
)
{
struct
omap_hsmmc_plat
*
plat
=
dev_get_platdata
(
dev
);
return
mmc_bind
(
dev
,
&
plat
->
mmc
,
&
plat
->
cfg
);
}
#endif
static
int
omap_hsmmc_probe
(
struct
udevice
*
dev
)
static
int
omap_hsmmc_probe
(
struct
udevice
*
dev
)
{
{
struct
omap_hsmmc_plat
*
plat
=
dev_get_platdata
(
dev
);
struct
mmc_uclass_priv
*
upriv
=
dev_get_uclass_priv
(
dev
);
struct
mmc_uclass_priv
*
upriv
=
dev_get_uclass_priv
(
dev
);
struct
omap_hsmmc_data
*
priv
=
dev_get_priv
(
dev
);
struct
omap_hsmmc_data
*
priv
=
dev_get_priv
(
dev
);
struct
mmc_config
*
cfg
;
struct
mmc_config
*
cfg
=
&
plat
->
cfg
;
struct
mmc
*
mmc
;
struct
mmc
*
mmc
;
cfg
=
&
priv
->
cfg
;
cfg
->
name
=
"OMAP SD/MMC"
;
cfg
->
name
=
"OMAP SD/MMC"
;
cfg
->
ops
=
&
omap_hsmmc_ops
;
cfg
->
ops
=
&
omap_hsmmc_ops
;
#ifdef CONFIG_BLK
mmc
=
&
plat
->
mmc
;
#else
mmc
=
mmc_create
(
cfg
,
priv
);
mmc
=
mmc_create
(
cfg
,
priv
);
if
(
mmc
==
NULL
)
if
(
mmc
==
NULL
)
return
-
1
;
return
-
1
;
#endif
#ifdef OMAP_HSMMC_USE_GPIO
#ifdef OMAP_HSMMC_USE_GPIO
gpio_request_by_name
(
dev
,
"cd-gpios"
,
0
,
&
priv
->
cd_gpio
,
GPIOD_IS_IN
);
gpio_request_by_name
(
dev
,
"cd-gpios"
,
0
,
&
priv
->
cd_gpio
,
GPIOD_IS_IN
);
...
@@ -824,7 +866,11 @@ U_BOOT_DRIVER(omap_hsmmc) = {
...
@@ -824,7 +866,11 @@ U_BOOT_DRIVER(omap_hsmmc) = {
.
id
=
UCLASS_MMC
,
.
id
=
UCLASS_MMC
,
.
of_match
=
omap_hsmmc_ids
,
.
of_match
=
omap_hsmmc_ids
,
.
ofdata_to_platdata
=
omap_hsmmc_ofdata_to_platdata
,
.
ofdata_to_platdata
=
omap_hsmmc_ofdata_to_platdata
,
#ifdef CONFIG_BLK
.
bind
=
omap_hsmmc_bind
,
#endif
.
probe
=
omap_hsmmc_probe
,
.
probe
=
omap_hsmmc_probe
,
.
priv_auto_alloc_size
=
sizeof
(
struct
omap_hsmmc_data
),
.
priv_auto_alloc_size
=
sizeof
(
struct
omap_hsmmc_data
),
.
platdata_auto_alloc_size
=
sizeof
(
struct
omap_hsmmc_plat
),
};
};
#endif
#endif
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment