Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 340090
b: refs/heads/master
c: 8644933
h: refs/heads/master
v: v3
  • Loading branch information
Alexander Shiyan authored and Olof Johansson committed Nov 21, 2012
1 parent 87e63e7 commit 7684d96
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 287 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: ea7d1bc97d91e9b83436a6188cde987aab79aacf
refs/heads/master: 86449336dd3c6e0edf97b971db2daa88917c1d7e
84 changes: 84 additions & 0 deletions trunk/arch/arm/mach-clps711x/cdb89712.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
#include <linux/interrupt.h>
#include <linux/platform_device.h>

#include <linux/mtd/physmap.h>
#include <linux/mtd/plat-ram.h>
#include <linux/mtd/partitions.h>

#include <mach/hardware.h>
#include <asm/pgtable.h>
#include <asm/page.h>
Expand All @@ -44,8 +48,88 @@ static struct resource cdb89712_cs8900_resource[] __initdata = {
DEFINE_RES_IRQ(CDB89712_CS8900_IRQ),
};

static struct mtd_partition cdb89712_flash_partitions[] __initdata = {
{
.name = "Flash",
.offset = 0,
.size = MTDPART_SIZ_FULL,
},
};

static struct physmap_flash_data cdb89712_flash_pdata __initdata = {
.width = 4,
.probe_type = "map_rom",
.parts = cdb89712_flash_partitions,
.nr_parts = ARRAY_SIZE(cdb89712_flash_partitions),
};

static struct resource cdb89712_flash_resources[] __initdata = {
DEFINE_RES_MEM(CS0_PHYS_BASE, SZ_8M),
};

static struct platform_device cdb89712_flash_pdev __initdata = {
.name = "physmap-flash",
.id = 0,
.resource = cdb89712_flash_resources,
.num_resources = ARRAY_SIZE(cdb89712_flash_resources),
.dev = {
.platform_data = &cdb89712_flash_pdata,
},
};

static struct mtd_partition cdb89712_bootrom_partitions[] __initdata = {
{
.name = "BootROM",
.offset = 0,
.size = MTDPART_SIZ_FULL,
},
};

static struct physmap_flash_data cdb89712_bootrom_pdata __initdata = {
.width = 4,
.probe_type = "map_rom",
.parts = cdb89712_bootrom_partitions,
.nr_parts = ARRAY_SIZE(cdb89712_bootrom_partitions),
};

static struct resource cdb89712_bootrom_resources[] __initdata = {
DEFINE_RES_NAMED(CS7_PHYS_BASE, SZ_128, "BOOTROM", IORESOURCE_MEM |
IORESOURCE_CACHEABLE | IORESOURCE_READONLY),
};

static struct platform_device cdb89712_bootrom_pdev __initdata = {
.name = "physmap-flash",
.id = 1,
.resource = cdb89712_bootrom_resources,
.num_resources = ARRAY_SIZE(cdb89712_bootrom_resources),
.dev = {
.platform_data = &cdb89712_bootrom_pdata,
},
};

static struct platdata_mtd_ram cdb89712_sram_pdata __initdata = {
.bankwidth = 4,
};

static struct resource cdb89712_sram_resources[] __initdata = {
DEFINE_RES_MEM(CLPS711X_SRAM_BASE, CLPS711X_SRAM_SIZE),
};

static struct platform_device cdb89712_sram_pdev __initdata = {
.name = "mtd-ram",
.id = 0,
.resource = cdb89712_sram_resources,
.num_resources = ARRAY_SIZE(cdb89712_sram_resources),
.dev = {
.platform_data = &cdb89712_sram_pdata,
},
};

static void __init cdb89712_init(void)
{
platform_device_register(&cdb89712_flash_pdev);
platform_device_register(&cdb89712_bootrom_pdev);
platform_device_register(&cdb89712_sram_pdev);
platform_device_register_simple("cs89x0", 0, cdb89712_cs8900_resource,
ARRAY_SIZE(cdb89712_cs8900_resource));
}
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/arm/mach-clps711x/include/mach/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@
#define CS7_PHYS_BASE (0x00000000)
#endif

#define CLPS711X_SRAM_BASE CS6_PHYS_BASE
#define CLPS711X_SRAM_SIZE (48 * 1024)

#if defined (CONFIG_ARCH_EDB7211)

/* The extra 8 lines of the keyboard matrix are wired to chip select 3 */
Expand Down
7 changes: 0 additions & 7 deletions trunk/drivers/mtd/maps/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -324,13 +324,6 @@ config MTD_SOLUTIONENGINE
This enables access to the flash chips on the Hitachi SolutionEngine and
similar boards. Say 'Y' if you are building a kernel for such a board.

config MTD_CDB89712
tristate "Cirrus CDB89712 evaluation board mappings"
depends on MTD_CFI && ARCH_CDB89712
help
This enables access to the flash or ROM chips on the CDB89712 board.
If you have such a board, say 'Y'.

config MTD_SA1100
tristate "CFI Flash device mapped on StrongARM SA11x0"
depends on MTD_CFI && ARCH_SA1100
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/mtd/maps/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ obj-$(CONFIG_MTD) += map_funcs.o
endif

# Chip mappings
obj-$(CONFIG_MTD_CDB89712) += cdb89712.o
obj-$(CONFIG_MTD_CFI_FLAGADM) += cfi_flagadm.o
obj-$(CONFIG_MTD_DC21285) += dc21285.o
obj-$(CONFIG_MTD_DILNETPC) += dilnetpc.o
Expand Down
Loading

0 comments on commit 7684d96

Please sign in to comment.