Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 116116
b: refs/heads/master
c: 4018ffc
h: refs/heads/master
v: v3
  • Loading branch information
Luca Santini authored and Paul Mundt committed Sep 12, 2008
1 parent adced9a commit 0320c9d
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 2 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: 2641dc92b3c7f979c7e4820cff2e765664358982
refs/heads/master: 4018ffcfdf84faf17fbadcd29ea5eced26f9d9cb
50 changes: 49 additions & 1 deletion trunk/arch/sh/boards/board-edosk7760.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <linux/smc91x.h>
#include <linux/interrupt.h>
#include <linux/i2c.h>
#include <linux/mtd/physmap.h>
#include <asm/machvec.h>
#include <asm/io.h>
#include <asm/addrspace.h>
Expand All @@ -40,6 +41,52 @@

#define ETHERNET_IRQ 5

/* NOR flash */
static struct mtd_partition edosk7760_nor_flash_partitions[] = {
{
.name = "bootloader",
.offset = 0,
.size = (1 * 1024 * 1024), /*1MB*/
.mask_flags = MTD_WRITEABLE, /* Read-only */
}, {
.name = "kernel",
.offset = MTDPART_OFS_APPEND,
.size = (2 * 1024 * 1024), /*2MB*/
}, {
.name = "fs",
.offset = MTDPART_OFS_APPEND,
.size = (26 * 1024 * 1024),
}, {
.name = "other",
.offset = MTDPART_OFS_APPEND,
.size = MTDPART_SIZ_FULL,
},
};

static struct physmap_flash_data edosk7760_nor_flash_data = {
.width = 4,
.parts = edosk7760_nor_flash_partitions,
.nr_parts = ARRAY_SIZE(edosk7760_nor_flash_partitions),
};

static struct resource edosk7760_nor_flash_resources[] = {
[0] = {
.name = "NOR Flash",
.start = 0x00000000,
.end = (32 * 1024 * 1024) -1, /* 32MB*/
.flags = IORESOURCE_MEM,
}
};

static struct platform_device edosk7760_nor_flash_device = {
.name = "physmap-flash",
.resource = edosk7760_nor_flash_resources,
.num_resources = ARRAY_SIZE(edosk7760_nor_flash_resources),
.dev = {
.platform_data = &edosk7760_nor_flash_data,
},
};

/* i2c initialization functions */
static struct sh7760_i2c_platdata i2c_pd = {
.speed_khz = 400,
Expand Down Expand Up @@ -121,9 +168,10 @@ static struct platform_device smc91x_dev = {

/* platform init code */
static struct platform_device *edosk7760_devices[] __initdata = {
&smc91x_dev,
&edosk7760_nor_flash_device,
&sh7760_i2c0_dev,
&sh7760_i2c1_dev,
&smc91x_dev,
};

static int __init init_edosk7760_devices(void)
Expand Down

0 comments on commit 0320c9d

Please sign in to comment.