1 /* linux/arch/arm/plat-s5p/dev-onenand.c
3 * Copyright 2010 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com
6 * Copyright (c) 2008-2010 Samsung Electronics
7 * Kyungmin Park <kyungmin.park@samsung.com>
9 * S5P series device definition for OneNAND devices
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
16 #include <linux/kernel.h>
17 #include <linux/platform_device.h>
18 #include <linux/mtd/mtd.h>
19 #include <linux/mtd/onenand.h>
21 #include <mach/irqs.h>
24 static struct resource s5p_onenand_resources
[] = {
26 .start
= S5P_PA_ONENAND
,
27 .end
= S5P_PA_ONENAND
+ SZ_128K
- 1,
28 .flags
= IORESOURCE_MEM
,
31 .start
= S5P_PA_ONENAND_DMA
,
32 .end
= S5P_PA_ONENAND_DMA
+ SZ_8K
- 1,
33 .flags
= IORESOURCE_MEM
,
36 .start
= IRQ_ONENAND_AUDI
,
37 .end
= IRQ_ONENAND_AUDI
,
38 .flags
= IORESOURCE_IRQ
,
42 struct platform_device s5p_device_onenand
= {
43 .name
= "s5pc110-onenand",
45 .num_resources
= ARRAY_SIZE(s5p_onenand_resources
),
46 .resource
= s5p_onenand_resources
,
49 void s5p_onenand_set_platdata(struct onenand_platform_data
*pdata
)
51 struct onenand_platform_data
*pd
;
53 pd
= kmemdup(pdata
, sizeof(struct onenand_platform_data
), GFP_KERNEL
);
55 printk(KERN_ERR
"%s: no memory for platform data\n", __func__
);
56 s5p_device_onenand
.dev
.platform_data
= pd
;