Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 167192
b: refs/heads/master
c: 7036c61
h: refs/heads/master
v: v3
  • Loading branch information
Mike Frysinger committed Oct 8, 2009
1 parent fd40a5a commit 237d4bd
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 26 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: 50c4c0861a0a60cd4f414457fdbfc8d9a1eb1e31
refs/heads/master: 7036c61fe043af6b701e10d6426ec22259bd1e3b
66 changes: 41 additions & 25 deletions trunk/arch/blackfin/mach-bf533/boards/ezkit.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/mtd/plat-ram.h>
#include <linux/mtd/physmap.h>
#include <linux/spi/spi.h>
#include <linux/spi/flash.h>
#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
Expand Down Expand Up @@ -71,54 +72,69 @@ static struct platform_device smc91x_device = {
};
#endif

#if defined(CONFIG_MTD_PSD4256G) || defined(CONFIG_MTD_PSD4256G_MODULE)
static const char *map_probes[] = {
"stm_flash",
NULL,
#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
static struct mtd_partition ezkit_partitions_a[] = {
{
.name = "bootloader(nor a)",
.size = 0x40000,
.offset = 0,
}, {
.name = "linux kernel(nor a)",
.size = MTDPART_SIZ_FULL,
.offset = MTDPART_OFS_APPEND,
},
};

static struct platdata_mtd_ram stm_pri_data_a = {
.mapname = "Flash A Primary",
.map_probes = map_probes,
.bankwidth = 2,
static struct physmap_flash_data ezkit_flash_data_a = {
.width = 2,
.parts = ezkit_partitions_a,
.nr_parts = ARRAY_SIZE(ezkit_partitions_a),
};

static struct resource stm_pri_resource_a = {
static struct resource ezkit_flash_resource_a = {
.start = 0x20000000,
.end = 0x200fffff,
.flags = IORESOURCE_MEM,
};

static struct platform_device stm_pri_device_a = {
.name = "mtd-ram",
static struct platform_device ezkit_flash_device_a = {
.name = "physmap-flash",
.id = 0,
.dev = {
.platform_data = &stm_pri_data_a,
.platform_data = &ezkit_flash_data_a,
},
.num_resources = 1,
.resource = &stm_pri_resource_a,
.resource = &ezkit_flash_resource_a,
};

static struct mtd_partition ezkit_partitions_b[] = {
{
.name = "file system(nor b)",
.size = MTDPART_SIZ_FULL,
.offset = MTDPART_OFS_APPEND,
},
};

static struct platdata_mtd_ram stm_pri_data_b = {
.mapname = "Flash B Primary",
.map_probes = map_probes,
.bankwidth = 2,
static struct physmap_flash_data ezkit_flash_data_b = {
.width = 2,
.parts = ezkit_partitions_b,
.nr_parts = ARRAY_SIZE(ezkit_partitions_b),
};

static struct resource stm_pri_resource_b = {
static struct resource ezkit_flash_resource_b = {
.start = 0x20100000,
.end = 0x201fffff,
.flags = IORESOURCE_MEM,
};

static struct platform_device stm_pri_device_b = {
.name = "mtd-ram",
static struct platform_device ezkit_flash_device_b = {
.name = "physmap-flash",
.id = 4,
.dev = {
.platform_data = &stm_pri_data_b,
.platform_data = &ezkit_flash_data_b,
},
.num_resources = 1,
.resource = &stm_pri_resource_b,
.resource = &ezkit_flash_resource_b,
};
#endif

Expand Down Expand Up @@ -445,9 +461,9 @@ static struct platform_device *ezkit_devices[] __initdata = {

&bfin_dpmc,

#if defined(CONFIG_MTD_PSD4256G) || defined(CONFIG_MTD_PSD4256G_MODULE)
&stm_pri_device_a,
&stm_pri_device_b,
#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
&ezkit_flash_device_a,
&ezkit_flash_device_b,
#endif

#if defined(CONFIG_MTD_PLATRAM) || defined(CONFIG_MTD_PLATRAM_MODULE)
Expand Down

0 comments on commit 237d4bd

Please sign in to comment.