Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347145
b: refs/heads/master
c: db6364a
h: refs/heads/master
i:
  347143: 0fd86cd
v: v3
  • Loading branch information
Linus Walleij authored and Artem Bityutskiy committed Nov 15, 2012
1 parent 4f40e4f commit ac161ae
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 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: 6d7b42a447f92eb3e7e410bbf62042693eb040f7
refs/heads/master: db6364a650edcb076786092c7f85f1e1cdae8b20
21 changes: 17 additions & 4 deletions trunk/arch/arm/mach-nomadik/board-nhk8815.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,32 @@
#include <plat/mtu.h>
#include <plat/pincfg.h>

#include <mach/fsmc.h>

#include "cpu-8815.h"

/* Initial value for SRC control register: all timers use MXTAL/8 source */
#define SRC_CR_INIT_MASK 0x00007fff
#define SRC_CR_INIT_VAL 0x2aaa8000

#define ALE_OFF 0x1000000
#define CLE_OFF 0x800000

/* These addresses span 16MB, so use three individual pages */
static struct resource nhk8815_nand_resources[] = {
{
.name = "nand_data",
.start = 0x40000000,
.end = 0x40000000 + SZ_16K - 1,
.flags = IORESOURCE_MEM,
}, {
.name = "nand_addr",
.start = 0x40000000 + ALE_OFF,
.end = 0x40000000 +ALE_OFF + SZ_16K - 1,
.flags = IORESOURCE_MEM,
}, {
.name = "nand_cmd",
.start = 0x40000000 + CLE_OFF,
.end = 0x40000000 + CLE_OFF + SZ_16K - 1,
.flags = IORESOURCE_MEM,
}, {
.name = "fsmc_regs",
.start = NOMADIK_FSMC_BASE,
Expand Down Expand Up @@ -105,8 +116,6 @@ static struct fsmc_nand_platform_data nhk8815_nand_platform_data = {
.partitions = nhk8815_partitions,
.nr_partitions = ARRAY_SIZE(nhk8815_partitions),
.width = FSMC_NAND_BW8,
.ale_off = 0x1000000,
.cle_off = 0x800000,
};

static struct platform_device nhk8815_nand_device = {
Expand Down Expand Up @@ -171,6 +180,10 @@ static struct platform_device nhk8815_onenand_device = {
.num_resources = ARRAY_SIZE(nhk8815_onenand_resource),
};

/* bus control reg. and bus timing reg. for CS0..CS3 */
#define FSMC_BCR(x) (NOMADIK_FSMC_VA + (x << 3))
#define FSMC_BTR(x) (NOMADIK_FSMC_VA + (x << 3) + 0x04)

static void __init nhk8815_onenand_init(void)
{
#ifdef CONFIG_MTD_ONENAND
Expand Down

0 comments on commit ac161ae

Please sign in to comment.