Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
lede-mikrotik
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
Johannes Rudolph
lede-mikrotik
Commits
44bf7c7c
Commit
44bf7c7c
authored
12 years ago
by
Gabor Juhos
Browse files
Options
Downloads
Patches
Plain Diff
ar71xx: define MTD partitions for RB2011
SVN-Revision: 33345
parent
6ae5ec16
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
target/linux/ar71xx/files/arch/mips/ath79/mach-rb2011.c
+42
-1
42 additions, 1 deletion
target/linux/ar71xx/files/arch/mips/ath79/mach-rb2011.c
with
42 additions
and
1 deletion
target/linux/ar71xx/files/arch/mips/ath79/mach-rb2011.c
+
42
−
1
View file @
44bf7c7c
...
@@ -11,6 +11,10 @@
...
@@ -11,6 +11,10 @@
#include
<linux/phy.h>
#include
<linux/phy.h>
#include
<linux/platform_device.h>
#include
<linux/platform_device.h>
#include
<linux/ar8216_platform.h>
#include
<linux/ar8216_platform.h>
#include
<linux/mtd/mtd.h>
#include
<linux/mtd/partitions.h>
#include
<linux/spi/spi.h>
#include
<linux/spi/flash.h>
#include
<asm/mach-ath79/ar71xx_regs.h>
#include
<asm/mach-ath79/ar71xx_regs.h>
...
@@ -19,6 +23,43 @@
...
@@ -19,6 +23,43 @@
#include
"dev-m25p80.h"
#include
"dev-m25p80.h"
#include
"machtypes.h"
#include
"machtypes.h"
#define RB_ROUTERBOOT_OFFSET 0x0000
#define RB_ROUTERBOOT_SIZE 0xb000
#define RB_HARD_CFG_OFFSET 0xb000
#define RB_HARD_CFG_SIZE 0x1000
#define RB_BIOS_OFFSET 0xd000
#define RB_BIOS_SIZE 0x2000
#define RB_SOFT_CFG_OFFSET 0xf000
#define RB_SOFT_CFG_SIZE 0x1000
static
struct
mtd_partition
rb2011_spi_partitions
[]
=
{
{
.
name
=
"routerboot"
,
.
offset
=
RB_ROUTERBOOT_OFFSET
,
.
size
=
RB_ROUTERBOOT_SIZE
,
.
mask_flags
=
MTD_WRITEABLE
,
},
{
.
name
=
"hard_config"
,
.
offset
=
RB_HARD_CFG_OFFSET
,
.
size
=
RB_HARD_CFG_SIZE
,
.
mask_flags
=
MTD_WRITEABLE
,
},
{
.
name
=
"bios"
,
.
offset
=
RB_BIOS_OFFSET
,
.
size
=
RB_BIOS_SIZE
,
.
mask_flags
=
MTD_WRITEABLE
,
},
{
.
name
=
"soft_config"
,
.
offset
=
RB_SOFT_CFG_OFFSET
,
.
size
=
RB_SOFT_CFG_SIZE
,
}
};
static
struct
flash_platform_data
rb2011_spi_flash_data
=
{
.
parts
=
rb2011_spi_partitions
,
.
nr_parts
=
ARRAY_SIZE
(
rb2011_spi_partitions
),
};
static
struct
ar8327_pad_cfg
rb2011_ar8327_pad0_cfg
=
{
static
struct
ar8327_pad_cfg
rb2011_ar8327_pad0_cfg
=
{
.
mode
=
AR8327_PAD_MAC_RGMII
,
.
mode
=
AR8327_PAD_MAC_RGMII
,
.
txclk_delay_en
=
true
,
.
txclk_delay_en
=
true
,
...
@@ -65,7 +106,7 @@ static void __init rb2011_gmac_setup(void)
...
@@ -65,7 +106,7 @@ static void __init rb2011_gmac_setup(void)
static
void
__init
rb2011_setup
(
void
)
static
void
__init
rb2011_setup
(
void
)
{
{
ath79_register_m25p80
(
NULL
);
ath79_register_m25p80
(
&
rb2011_spi_flash_data
);
rb2011_gmac_setup
();
rb2011_gmac_setup
();
...
...
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