Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 206a1a82 authored by Ben Dooks's avatar Ben Dooks
Browse files

ARM: Merge for-2635-4/onenand

Merge branch 'for-2635-4/onenand' into for-2635-4/partial2

Conflicts:
	arch/arm/mach-s5pc100/cpu.c
	arch/arm/mach-s5pc100/include/mach/map.h
	arch/arm/mach-s5pv210/Makefile
parents 6aeaad51 999304be
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -35,6 +35,11 @@ config S3C64XX_SETUP_SDHCI
	  Internal configuration for default SDHCI setup for S3C6400 and
	  S3C6410 SoCs.

config S3C64XX_DEV_ONENAND1
	bool
	help
	  Compile in platform device definition for OneNAND1 controller

# platform specific device setup

config S3C64XX_SETUP_I2C0
+1 −0
Original line number Diff line number Diff line
@@ -62,3 +62,4 @@ obj-y += dev-uart.o
obj-y				+= dev-audio.o
obj-$(CONFIG_S3C64XX_DEV_SPI)	+= dev-spi.o
obj-$(CONFIG_S3C64XX_DEV_TS)	+= dev-ts.o
obj-$(CONFIG_S3C64XX_DEV_ONENAND1)	+= dev-onenand1.o
+55 −0
Original line number Diff line number Diff line
/*
 * linux/arch/arm/mach-s3c64xx/dev-onenand1.c
 *
 *  Copyright (c) 2008-2010 Samsung Electronics
 *  Kyungmin Park <kyungmin.park@samsung.com>
 *
 * S3C64XX series device definition for OneNAND devices
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */

#include <linux/kernel.h>
#include <linux/platform_device.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/onenand.h>

#include <mach/irqs.h>
#include <mach/map.h>

static struct resource s3c64xx_onenand1_resources[] = {
	[0] = {
		.start	= S3C64XX_PA_ONENAND1,
		.end	= S3C64XX_PA_ONENAND1 + 0x400 - 1,
		.flags	= IORESOURCE_MEM,
	},
	[1] = {
		.start	= S3C64XX_PA_ONENAND1_BUF,
		.end	= S3C64XX_PA_ONENAND1_BUF + S3C64XX_SZ_ONENAND1_BUF - 1,
		.flags	= IORESOURCE_MEM,
	},
	[2] = {
		.start	= IRQ_ONENAND1,
		.end	= IRQ_ONENAND1,
		.flags	= IORESOURCE_IRQ,
	},
};

struct platform_device s3c64xx_device_onenand1 = {
	.name		= "samsung-onenand",
	.id		= 1,
	.num_resources	= ARRAY_SIZE(s3c64xx_onenand1_resources),
	.resource	= s3c64xx_onenand1_resources,
};

void s3c64xx_onenand1_set_platdata(struct onenand_platform_data *pdata)
{
	struct onenand_platform_data *pd;

	pd = kmemdup(pdata, sizeof(struct onenand_platform_data), GFP_KERNEL);
	if (!pd)
		printk(KERN_ERR "%s: no memory for platform data\n", __func__);
	s3c64xx_device_onenand1.dev.platform_data = pd;
}
+4 −0
Original line number Diff line number Diff line
@@ -212,5 +212,9 @@

#define NR_IRQS	(IRQ_BOARD_END + 1)

/* Compatibility */

#define IRQ_ONENAND	IRQ_ONENAND0

#endif /* __ASM_MACH_S3C64XX_IRQS_H */
+13 −0
Original line number Diff line number Diff line
@@ -52,6 +52,16 @@

#define S3C64XX_PA_SROM		(0x70000000)

#define S3C64XX_PA_ONENAND0	(0x70100000)
#define S3C64XX_PA_ONENAND0_BUF	(0x20000000)
#define S3C64XX_SZ_ONENAND0_BUF (SZ_64M)

/* NAND and OneNAND1 controllers occupy the same register region
   (depending on SoC POP version) */
#define S3C64XX_PA_ONENAND1	(0x70200000)
#define S3C64XX_PA_ONENAND1_BUF	(0x28000000)
#define S3C64XX_SZ_ONENAND1_BUF	(SZ_64M)

#define S3C64XX_PA_NAND		(0x70200000)
#define S3C64XX_PA_FB		(0x77100000)
#define S3C64XX_PA_USB_HSOTG	(0x7C000000)
@@ -99,6 +109,9 @@
#define S3C_PA_IIC		S3C64XX_PA_IIC0
#define S3C_PA_IIC1		S3C64XX_PA_IIC1
#define S3C_PA_NAND		S3C64XX_PA_NAND
#define S3C_PA_ONENAND		S3C64XX_PA_ONENAND0
#define S3C_PA_ONENAND_BUF	S3C64XX_PA_ONENAND0_BUF
#define S3C_SZ_ONENAND_BUF	S3C64XX_SZ_ONENAND0_BUF
#define S3C_PA_FB		S3C64XX_PA_FB
#define S3C_PA_USBHOST		S3C64XX_PA_USBHOST
#define S3C_PA_USB_HSOTG	S3C64XX_PA_USB_HSOTG
Loading