Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
361778d6
Commit
361778d6
authored
Jun 05, 2009
by
Eric Miao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ARM] pxa/littleton: add support for the Micro-SD slot (MMC1)
Signed-off-by:
Eric Miao
<
eric.y.miao@gmail.com
>
parent
f6394e26
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
63 additions
and
0 deletions
+63
-0
arch/arm/mach-pxa/littleton.c
arch/arm/mach-pxa/littleton.c
+63
-0
No files found.
arch/arm/mach-pxa/littleton.c
View file @
361778d6
...
...
@@ -42,6 +42,7 @@
#include <mach/pxa300.h>
#include <mach/pxafb.h>
#include <mach/ssp.h>
#include <mach/mmc.h>
#include <mach/pxa2xx_spi.h>
#include <plat/i2c.h>
#include <mach/pxa27x_keypad.h>
...
...
@@ -50,6 +51,8 @@
#include "generic.h"
#define GPIO_MMC1_CARD_DETECT mfp_to_gpio(MFP_PIN_GPIO15)
/* Littleton MFP configurations */
static
mfp_cfg_t
littleton_mfp_cfg
[]
__initdata
=
{
/* LCD */
...
...
@@ -98,6 +101,15 @@ static mfp_cfg_t littleton_mfp_cfg[] __initdata = {
GPIO123_KP_MKOUT_2
,
GPIO124_KP_MKOUT_3
,
GPIO125_KP_MKOUT_4
,
/* MMC1 */
GPIO3_MMC1_DAT0
,
GPIO4_MMC1_DAT1
,
GPIO5_MMC1_DAT2
,
GPIO6_MMC1_DAT3
,
GPIO7_MMC1_CLK
,
GPIO8_MMC1_CMD
,
GPIO15_GPIO
,
/* card detect */
};
static
struct
resource
smc91x_resources
[]
=
{
...
...
@@ -252,6 +264,56 @@ static void __init littleton_init_keypad(void)
static
inline
void
littleton_init_keypad
(
void
)
{}
#endif
#if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE)
static
int
littleton_mci_init
(
struct
device
*
dev
,
irq_handler_t
littleton_detect_int
,
void
*
data
)
{
int
err
,
gpio_cd
=
GPIO_MMC1_CARD_DETECT
;
err
=
gpio_request
(
gpio_cd
,
"mmc card detect"
);
if
(
err
)
goto
err_request_cd
;
gpio_direction_input
(
gpio_cd
);
err
=
request_irq
(
gpio_to_irq
(
gpio_cd
),
littleton_detect_int
,
IRQF_TRIGGER_RISING
|
IRQF_TRIGGER_FALLING
,
"mmc card detect"
,
data
);
if
(
err
)
{
dev_err
(
dev
,
"failed to request card detect IRQ
\n
"
);
goto
err_request_irq
;
}
return
0
;
err_request_irq:
gpio_free
(
gpio_cd
);
err_request_cd:
return
err
;
}
static
void
littleton_mci_exit
(
struct
device
*
dev
,
void
*
data
)
{
int
gpio_cd
=
GPIO_MMC1_CARD_DETECT
;
free_irq
(
gpio_to_irq
(
gpio_cd
),
data
);
gpio_free
(
gpio_cd
);
}
static
struct
pxamci_platform_data
littleton_mci_platform_data
=
{
.
detect_delay
=
20
,
.
ocr_mask
=
MMC_VDD_32_33
|
MMC_VDD_33_34
,
.
init
=
littleton_mci_init
,
.
exit
=
littleton_mci_exit
,
};
static
void
__init
littleton_init_mmc
(
void
)
{
pxa_set_mci_info
(
&
littleton_mci_platform_data
);
}
#else
static
inline
void
littleton_init_mmc
(
void
)
{}
#endif
#if defined(CONFIG_MTD_NAND_PXA3xx) || defined(CONFIG_MTD_NAND_PXA3xx_MODULE)
static
struct
mtd_partition
littleton_nand_partitions
[]
=
{
[
0
]
=
{
...
...
@@ -392,6 +454,7 @@ static void __init littleton_init(void)
littleton_init_spi
();
littleton_init_i2c
();
littleton_init_mmc
();
littleton_init_lcd
();
littleton_init_keypad
();
littleton_init_nand
();
...
...
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