Skip to content

Commit

Permalink
ARM: OMAP2+: craneboard: support NAND device
Browse files Browse the repository at this point in the history
 This patch enables the NAND device on the AM3517 Craneboard.

 MTD partitions are created as below.
 0x000000000000-0x000000080000 : "X-Loader"
 0x000000080000-0x000000240000 : "U-Boot"
 0x000000240000-0x000000280000 : "U-Boot Env"
 0x000000280000-0x000000780000 : "Kernel"
 0x000000780000-0x000010000000 : "File System"

Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
  • Loading branch information
Kim Milo authored and Tony Lindgren committed Feb 1, 2013
1 parent ff95793 commit d58eb6b
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions arch/arm/mach-omap2/board-am3517crane.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,17 @@
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/gpio.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/partitions.h>

#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>

#include "common.h"
#include "common-board-devices.h"
#include "board-flash.h"

#include "am35xx-emac.h"
#include "mux.h"
Expand All @@ -51,13 +56,46 @@ static struct usbhs_omap_board_data usbhs_bdata __initdata = {
.reset_gpio_port[2] = -EINVAL
};

static struct mtd_partition crane_nand_partitions[] = {
{
.name = "X-Loader",
.offset = 0,
.size = 4 * NAND_BLOCK_SIZE,
.mask_flags = MTD_WRITEABLE,
},
{
.name = "U-Boot",
.offset = MTDPART_OFS_APPEND,
.size = 14 * NAND_BLOCK_SIZE,
.mask_flags = MTD_WRITEABLE,
},
{
.name = "U-Boot Env",
.offset = MTDPART_OFS_APPEND,
.size = 2 * NAND_BLOCK_SIZE,
},
{
.name = "Kernel",
.offset = MTDPART_OFS_APPEND,
.size = 40 * NAND_BLOCK_SIZE,
},
{
.name = "File System",
.offset = MTDPART_OFS_APPEND,
.size = MTDPART_SIZ_FULL,
},
};

static void __init am3517_crane_init(void)
{
int ret;

omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
omap_serial_init();
omap_sdrc_init(NULL, NULL);
board_nand_init(crane_nand_partitions,
ARRAY_SIZE(crane_nand_partitions), 0,
NAND_BUSWIDTH_16, NULL);

/* Configure GPIO for EHCI port */
if (omap_mux_init_gpio(GPIO_USB_NRESET, OMAP_PIN_OUTPUT)) {
Expand Down

0 comments on commit d58eb6b

Please sign in to comment.