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
8235ee00
Commit
8235ee00
authored
Feb 14, 2009
by
Nicolas Pitre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ARM] Kirkwood: SDIO driver registration for DB6281 and RD6281
Signed-off-by:
Nicolas Pitre
<
nico@marvell.com
>
parent
75bb6b9a
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
98 additions
and
0 deletions
+98
-0
arch/arm/mach-kirkwood/common.c
arch/arm/mach-kirkwood/common.c
+45
-0
arch/arm/mach-kirkwood/common.h
arch/arm/mach-kirkwood/common.h
+2
-0
arch/arm/mach-kirkwood/db88f6281-bp-setup.c
arch/arm/mach-kirkwood/db88f6281-bp-setup.c
+15
-0
arch/arm/mach-kirkwood/include/mach/kirkwood.h
arch/arm/mach-kirkwood/include/mach/kirkwood.h
+2
-0
arch/arm/mach-kirkwood/rd88f6281-setup.c
arch/arm/mach-kirkwood/rd88f6281-setup.c
+13
-0
arch/arm/plat-orion/include/plat/mvsdio.h
arch/arm/plat-orion/include/plat/mvsdio.h
+21
-0
No files found.
arch/arm/mach-kirkwood/common.c
View file @
8235ee00
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#include <mach/kirkwood.h>
#include <mach/kirkwood.h>
#include <plat/cache-feroceon-l2.h>
#include <plat/cache-feroceon-l2.h>
#include <plat/ehci-orion.h>
#include <plat/ehci-orion.h>
#include <plat/mvsdio.h>
#include <plat/mv_xor.h>
#include <plat/mv_xor.h>
#include <plat/orion_nand.h>
#include <plat/orion_nand.h>
#include <plat/time.h>
#include <plat/time.h>
...
@@ -295,6 +296,50 @@ void __init kirkwood_sata_init(struct mv_sata_platform_data *sata_data)
...
@@ -295,6 +296,50 @@ void __init kirkwood_sata_init(struct mv_sata_platform_data *sata_data)
}
}
/*****************************************************************************
* SD/SDIO/MMC
****************************************************************************/
static
struct
resource
mvsdio_resources
[]
=
{
[
0
]
=
{
.
start
=
SDIO_PHYS_BASE
,
.
end
=
SDIO_PHYS_BASE
+
SZ_1K
-
1
,
.
flags
=
IORESOURCE_MEM
,
},
[
1
]
=
{
.
start
=
IRQ_KIRKWOOD_SDIO
,
.
end
=
IRQ_KIRKWOOD_SDIO
,
.
flags
=
IORESOURCE_IRQ
,
},
};
static
u64
mvsdio_dmamask
=
0xffffffffUL
;
static
struct
platform_device
kirkwood_sdio
=
{
.
name
=
"mvsdio"
,
.
id
=
-
1
,
.
dev
=
{
.
dma_mask
=
&
mvsdio_dmamask
,
.
coherent_dma_mask
=
0xffffffff
,
},
.
num_resources
=
ARRAY_SIZE
(
mvsdio_resources
),
.
resource
=
mvsdio_resources
,
};
void
__init
kirkwood_sdio_init
(
struct
mvsdio_platform_data
*
mvsdio_data
)
{
u32
dev
,
rev
;
kirkwood_pcie_id
(
&
dev
,
&
rev
);
if
(
rev
==
0
)
/* catch all Kirkwood Z0's */
mvsdio_data
->
clock
=
100000000
;
else
mvsdio_data
->
clock
=
200000000
;
mvsdio_data
->
dram
=
&
kirkwood_mbus_dram_info
;
kirkwood_sdio
.
dev
.
platform_data
=
mvsdio_data
;
platform_device_register
(
&
kirkwood_sdio
);
}
/*****************************************************************************
/*****************************************************************************
* SPI
* SPI
****************************************************************************/
****************************************************************************/
...
...
arch/arm/mach-kirkwood/common.h
View file @
8235ee00
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
struct
dsa_platform_data
;
struct
dsa_platform_data
;
struct
mv643xx_eth_platform_data
;
struct
mv643xx_eth_platform_data
;
struct
mv_sata_platform_data
;
struct
mv_sata_platform_data
;
struct
mvsdio_platform_data
;
/*
/*
* Basic Kirkwood init functions used early by machine-setup.
* Basic Kirkwood init functions used early by machine-setup.
...
@@ -35,6 +36,7 @@ void kirkwood_ge00_switch_init(struct dsa_platform_data *d, int irq);
...
@@ -35,6 +36,7 @@ void kirkwood_ge00_switch_init(struct dsa_platform_data *d, int irq);
void
kirkwood_pcie_init
(
void
);
void
kirkwood_pcie_init
(
void
);
void
kirkwood_rtc_init
(
void
);
void
kirkwood_rtc_init
(
void
);
void
kirkwood_sata_init
(
struct
mv_sata_platform_data
*
sata_data
);
void
kirkwood_sata_init
(
struct
mv_sata_platform_data
*
sata_data
);
void
kirkwood_sdio_init
(
struct
mvsdio_platform_data
*
mvsdio_data
);
void
kirkwood_spi_init
(
void
);
void
kirkwood_spi_init
(
void
);
void
kirkwood_uart0_init
(
void
);
void
kirkwood_uart0_init
(
void
);
void
kirkwood_uart1_init
(
void
);
void
kirkwood_uart1_init
(
void
);
...
...
arch/arm/mach-kirkwood/db88f6281-bp-setup.c
View file @
8235ee00
...
@@ -22,7 +22,9 @@
...
@@ -22,7 +22,9 @@
#include <asm/mach/arch.h>
#include <asm/mach/arch.h>
#include <asm/mach/pci.h>
#include <asm/mach/pci.h>
#include <mach/kirkwood.h>
#include <mach/kirkwood.h>
#include <plat/mvsdio.h>
#include "common.h"
#include "common.h"
#include "mpp.h"
static
struct
mv643xx_eth_platform_data
db88f6281_ge00_data
=
{
static
struct
mv643xx_eth_platform_data
db88f6281_ge00_data
=
{
.
phy_addr
=
MV643XX_ETH_PHY_ADDR
(
8
),
.
phy_addr
=
MV643XX_ETH_PHY_ADDR
(
8
),
...
@@ -32,18 +34,31 @@ static struct mv_sata_platform_data db88f6281_sata_data = {
...
@@ -32,18 +34,31 @@ static struct mv_sata_platform_data db88f6281_sata_data = {
.
n_ports
=
2
,
.
n_ports
=
2
,
};
};
static
struct
mvsdio_platform_data
db88f6281_mvsdio_data
=
{
.
gpio_write_protect
=
37
,
.
gpio_card_detect
=
38
,
};
static
unsigned
int
db88f6281_mpp_config
[]
__initdata
=
{
MPP37_GPIO
,
MPP38_GPIO
,
0
};
static
void
__init
db88f6281_init
(
void
)
static
void
__init
db88f6281_init
(
void
)
{
{
/*
/*
* Basic setup. Needs to be called early.
* Basic setup. Needs to be called early.
*/
*/
kirkwood_init
();
kirkwood_init
();
kirkwood_mpp_conf
(
db88f6281_mpp_config
);
kirkwood_ehci_init
();
kirkwood_ehci_init
();
kirkwood_ge00_init
(
&
db88f6281_ge00_data
);
kirkwood_ge00_init
(
&
db88f6281_ge00_data
);
kirkwood_rtc_init
();
kirkwood_rtc_init
();
kirkwood_sata_init
(
&
db88f6281_sata_data
);
kirkwood_sata_init
(
&
db88f6281_sata_data
);
kirkwood_uart0_init
();
kirkwood_uart0_init
();
kirkwood_sdio_init
(
&
db88f6281_mvsdio_data
);
}
}
static
int
__init
db88f6281_pci_init
(
void
)
static
int
__init
db88f6281_pci_init
(
void
)
...
...
arch/arm/mach-kirkwood/include/mach/kirkwood.h
View file @
8235ee00
...
@@ -116,5 +116,7 @@
...
@@ -116,5 +116,7 @@
#define SATA_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x80000)
#define SATA_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x80000)
#define SDIO_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x90000)
#endif
#endif
arch/arm/mach-kirkwood/rd88f6281-setup.c
View file @
8235ee00
...
@@ -24,8 +24,10 @@
...
@@ -24,8 +24,10 @@
#include <asm/mach/arch.h>
#include <asm/mach/arch.h>
#include <asm/mach/pci.h>
#include <asm/mach/pci.h>
#include <mach/kirkwood.h>
#include <mach/kirkwood.h>
#include <plat/mvsdio.h>
#include <plat/orion_nand.h>
#include <plat/orion_nand.h>
#include "common.h"
#include "common.h"
#include "mpp.h"
static
struct
mtd_partition
rd88f6281_nand_parts
[]
=
{
static
struct
mtd_partition
rd88f6281_nand_parts
[]
=
{
{
{
...
@@ -91,6 +93,15 @@ static struct mv_sata_platform_data rd88f6281_sata_data = {
...
@@ -91,6 +93,15 @@ static struct mv_sata_platform_data rd88f6281_sata_data = {
.
n_ports
=
2
,
.
n_ports
=
2
,
};
};
static
struct
mvsdio_platform_data
rd88f6281_mvsdio_data
=
{
.
gpio_card_detect
=
28
,
};
static
unsigned
int
rd88f6281_mpp_config
[]
__initdata
=
{
MPP28_GPIO
,
0
};
static
void
__init
rd88f6281_init
(
void
)
static
void
__init
rd88f6281_init
(
void
)
{
{
u32
dev
,
rev
;
u32
dev
,
rev
;
...
@@ -99,6 +110,7 @@ static void __init rd88f6281_init(void)
...
@@ -99,6 +110,7 @@ static void __init rd88f6281_init(void)
* Basic setup. Needs to be called early.
* Basic setup. Needs to be called early.
*/
*/
kirkwood_init
();
kirkwood_init
();
kirkwood_mpp_conf
(
rd88f6281_mpp_config
);
kirkwood_ehci_init
();
kirkwood_ehci_init
();
...
@@ -114,6 +126,7 @@ static void __init rd88f6281_init(void)
...
@@ -114,6 +126,7 @@ static void __init rd88f6281_init(void)
kirkwood_rtc_init
();
kirkwood_rtc_init
();
kirkwood_sata_init
(
&
rd88f6281_sata_data
);
kirkwood_sata_init
(
&
rd88f6281_sata_data
);
kirkwood_sdio_init
(
&
rd88f6281_mvsdio_data
);
kirkwood_uart0_init
();
kirkwood_uart0_init
();
kirkwood_xor0_init
();
kirkwood_xor0_init
();
kirkwood_xor1_init
();
kirkwood_xor1_init
();
...
...
arch/arm/plat-orion/include/plat/mvsdio.h
0 → 100644
View file @
8235ee00
/*
* arch/arm/plat-orion/include/plat/mvsdio.h
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
* warranty of any kind, whether express or implied.
*/
#ifndef __MACH_MVSDIO_H
#define __MACH_MVSDIO_H
#include <linux/mbus.h>
struct
mvsdio_platform_data
{
struct
mbus_dram_target_info
*
dram
;
unsigned
int
clock
;
int
gpio_card_detect
;
int
gpio_write_protect
;
};
#endif
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