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
18365d18
Commit
18365d18
authored
Aug 09, 2008
by
Lennert Buytenhek
Committed by
Lennert Buytenhek
Aug 09, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ARM] Kirkwood: instantiate the orion_spi driver in the platform code
Signed-off-by:
Lennert Buytenhek
<
buytenh@marvell.com
>
parent
60296c71
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
0 deletions
+54
-0
arch/arm/mach-kirkwood/common.c
arch/arm/mach-kirkwood/common.c
+32
-0
arch/arm/mach-kirkwood/common.h
arch/arm/mach-kirkwood/common.h
+1
-0
arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
+21
-0
No files found.
arch/arm/mach-kirkwood/common.c
View file @
18365d18
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
#include <linux/mbus.h>
#include <linux/mbus.h>
#include <linux/mv643xx_eth.h>
#include <linux/mv643xx_eth.h>
#include <linux/ata_platform.h>
#include <linux/ata_platform.h>
#include <linux/spi/orion_spi.h>
#include <asm/page.h>
#include <asm/page.h>
#include <asm/timex.h>
#include <asm/timex.h>
#include <asm/mach/map.h>
#include <asm/mach/map.h>
...
@@ -196,6 +197,37 @@ void __init kirkwood_sata_init(struct mv_sata_platform_data *sata_data)
...
@@ -196,6 +197,37 @@ void __init kirkwood_sata_init(struct mv_sata_platform_data *sata_data)
}
}
/*****************************************************************************
* SPI
****************************************************************************/
static
struct
orion_spi_info
kirkwood_spi_plat_data
=
{
.
tclk
=
KIRKWOOD_TCLK
,
};
static
struct
resource
kirkwood_spi_resources
[]
=
{
{
.
start
=
SPI_PHYS_BASE
,
.
end
=
SPI_PHYS_BASE
+
SZ_512
-
1
,
.
flags
=
IORESOURCE_MEM
,
},
};
static
struct
platform_device
kirkwood_spi
=
{
.
name
=
"orion_spi"
,
.
id
=
0
,
.
resource
=
kirkwood_spi_resources
,
.
dev
=
{
.
platform_data
=
&
kirkwood_spi_plat_data
,
},
.
num_resources
=
ARRAY_SIZE
(
kirkwood_spi_resources
),
};
void
__init
kirkwood_spi_init
()
{
platform_device_register
(
&
kirkwood_spi
);
}
/*****************************************************************************
/*****************************************************************************
* UART0
* UART0
****************************************************************************/
****************************************************************************/
...
...
arch/arm/mach-kirkwood/common.h
View file @
18365d18
...
@@ -33,6 +33,7 @@ void kirkwood_ge00_init(struct mv643xx_eth_platform_data *eth_data);
...
@@ -33,6 +33,7 @@ void kirkwood_ge00_init(struct mv643xx_eth_platform_data *eth_data);
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_spi_init
(
void
);
void
kirkwood_uart0_init
(
void
);
void
kirkwood_uart0_init
(
void
);
void
kirkwood_uart1_init
(
void
);
void
kirkwood_uart1_init
(
void
);
void
kirkwood_xor0_init
(
void
);
void
kirkwood_xor0_init
(
void
);
...
...
arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
View file @
18365d18
...
@@ -18,6 +18,9 @@
...
@@ -18,6 +18,9 @@
#include <linux/timer.h>
#include <linux/timer.h>
#include <linux/ata_platform.h>
#include <linux/ata_platform.h>
#include <linux/mv643xx_eth.h>
#include <linux/mv643xx_eth.h>
#include <linux/spi/flash.h>
#include <linux/spi/spi.h>
#include <linux/spi/orion_spi.h>
#include <asm/mach-types.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/arch.h>
#include <asm/mach/pci.h>
#include <asm/mach/pci.h>
...
@@ -34,6 +37,21 @@ static struct mv_sata_platform_data rd88f6192_sata_data = {
...
@@ -34,6 +37,21 @@ static struct mv_sata_platform_data rd88f6192_sata_data = {
.
n_ports
=
2
,
.
n_ports
=
2
,
};
};
static
const
struct
flash_platform_data
rd88F6192_spi_slave_data
=
{
.
type
=
"m25p128"
,
};
static
struct
spi_board_info
__initdata
rd88F6192_spi_slave_info
[]
=
{
{
.
modalias
=
"m25p80"
,
.
platform_data
=
&
rd88F6192_spi_slave_data
,
.
irq
=
-
1
,
.
max_speed_hz
=
20000000
,
.
bus_num
=
0
,
.
chip_select
=
0
,
},
};
static
void
__init
rd88f6192_init
(
void
)
static
void
__init
rd88f6192_init
(
void
)
{
{
/*
/*
...
@@ -45,6 +63,9 @@ static void __init rd88f6192_init(void)
...
@@ -45,6 +63,9 @@ static void __init rd88f6192_init(void)
kirkwood_ge00_init
(
&
rd88f6192_ge00_data
);
kirkwood_ge00_init
(
&
rd88f6192_ge00_data
);
kirkwood_rtc_init
();
kirkwood_rtc_init
();
kirkwood_sata_init
(
&
rd88f6192_sata_data
);
kirkwood_sata_init
(
&
rd88f6192_sata_data
);
spi_register_board_info
(
rd88F6192_spi_slave_info
,
ARRAY_SIZE
(
rd88F6192_spi_slave_info
));
kirkwood_spi_init
();
kirkwood_uart0_init
();
kirkwood_uart0_init
();
kirkwood_xor0_init
();
kirkwood_xor0_init
();
kirkwood_xor1_init
();
kirkwood_xor1_init
();
...
...
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