Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 123771
b: refs/heads/master
c: 3620c0d
h: refs/heads/master
i:
  123769: ff69c9e
  123767: 257d77b
v: v3
  • Loading branch information
Sascha Hauer committed Dec 16, 2008
1 parent ca556c0 commit acbc785
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4a7b98d7e7f1c05331bfa82e2427f896e57de35b
refs/heads/master: 3620c0dccfd35cd39324508d8c962d10f9a44ead
37 changes: 37 additions & 0 deletions trunk/arch/arm/mach-mx2/pcm038.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include <linux/platform_device.h>
#include <linux/mtd/physmap.h>
#include <linux/mtd/plat-ram.h>
#include <asm/mach/arch.h>
#include <asm/mach-types.h>
#include <mach/common.h>
Expand All @@ -30,6 +31,31 @@

#include "devices.h"

/*
* Phytec's PCM038 comes with 2MiB battery buffered SRAM,
* 16 bit width
*/

static struct platdata_mtd_ram pcm038_sram_data = {
.bankwidth = 2,
};

static struct resource pcm038_sram_resource = {
.start = CS1_BASE_ADDR,
.end = CS1_BASE_ADDR + 512 * 1024 - 1,
.flags = IORESOURCE_MEM,
};

static struct platform_device pcm038_sram_mtd_device = {
.name = "mtd-ram",
.id = 0,
.dev = {
.platform_data = &pcm038_sram_data,
},
.num_resources = 1,
.resource = &pcm038_sram_resource,
};

/*
* Phytec's phyCORE-i.MX27 comes with 32MiB flash,
* 16 bit width
Expand Down Expand Up @@ -164,11 +190,22 @@ static void gpio_fec_inactive(void)
static struct platform_device *platform_devices[] __initdata = {
&pcm038_nor_mtd_device,
&mxc_w1_master_device,
&pcm038_sram_mtd_device,
};

/* On pcm038 there's a sram attached to CS1, we enable the chipselect here and
* setup other stuffs to access the sram. */
static void __init pcm038_init_sram(void)
{
__raw_writel(0x0000d843, CSCR_U(1));
__raw_writel(0x22252521, CSCR_L(1));
__raw_writel(0x22220a00, CSCR_A(1));
}

static void __init pcm038_init(void)
{
gpio_fec_active();
pcm038_init_sram();

mxc_register_device(&mxc_uart_device0, &uart_pdata[0]);
mxc_register_device(&mxc_uart_device1, &uart_pdata[1]);
Expand Down

0 comments on commit acbc785

Please sign in to comment.