Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 167894
b: refs/heads/master
c: 8834541
h: refs/heads/master
v: v3
  • Loading branch information
Magnus Damm authored and Paul Mundt committed Oct 26, 2009
1 parent 837a3d8 commit a169d22
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 60339fad5c68c9c533cd14e67194ff8f727c41d9
refs/heads/master: 88345411df1eb5a24272955a53856e001f960a06
4 changes: 0 additions & 4 deletions trunk/arch/sh/boards/mach-rsk/devices-rsk7203.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@
#include <linux/types.h>
#include <linux/platform_device.h>
#include <linux/interrupt.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/mtd/physmap.h>
#include <linux/mtd/map.h>
#include <linux/smsc911x.h>
#include <linux/gpio.h>
#include <linux/leds.h>
Expand Down
23 changes: 14 additions & 9 deletions trunk/arch/sh/boards/mach-rsk/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,12 @@
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/mtd/physmap.h>
#ifdef CONFIG_MTD
#include <linux/mtd/map.h>
#endif
#include <asm/machvec.h>
#include <asm/io.h>

static const char *probes[] = { "cmdlinepart", NULL };

static struct mtd_partition *parsed_partitions;

static struct mtd_partition rsk_partitions[] = {
{
.name = "Bootloader",
Expand All @@ -41,6 +39,8 @@ static struct mtd_partition rsk_partitions[] = {
};

static struct physmap_flash_data flash_data = {
.parts = rsk_partitions,
.nr_parts = ARRAY_SIZE(rsk_partitions),
.width = 2,
};

Expand All @@ -60,14 +60,19 @@ static struct platform_device flash_device = {
},
};

static struct mtd_info *flash_mtd;
#ifdef CONFIG_MTD
static const char *probes[] = { "cmdlinepart", NULL };

static struct map_info rsk_flash_map = {
.name = "RSK+ Flash",
.size = 0x400000,
.bankwidth = 2,
};

static struct mtd_info *flash_mtd;

static struct mtd_partition *parsed_partitions;

static void __init set_mtd_partitions(void)
{
int nr_parts = 0;
Expand All @@ -77,14 +82,14 @@ static void __init set_mtd_partitions(void)
nr_parts = parse_mtd_partitions(flash_mtd, probes,
&parsed_partitions, 0);
/* If there is no partition table, used the hard coded table */
if (nr_parts <= 0) {
flash_data.parts = rsk_partitions;
flash_data.nr_parts = ARRAY_SIZE(rsk_partitions);
} else {
if (nr_parts > 0) {
flash_data.nr_parts = nr_parts;
flash_data.parts = parsed_partitions;
}
}
#else
static inline void set_mtd_partitions(void) {}
#endif

static struct platform_device *rsk_devices[] __initdata = {
&flash_device,
Expand Down

0 comments on commit a169d22

Please sign in to comment.