~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to arch/arm/plat-samsung/dev-onenand.c

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno, Martin Michlmayr
  • Date: 2011-04-06 13:53:30 UTC
  • mfrom: (43.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20110406135330-wjufxhd0tvn3zx4z
Tags: 2.6.38-3
[ Ben Hutchings ]
* [ppc64] Add to linux-tools package architectures (Closes: #620124)
* [amd64] Save cr4 to mmu_cr4_features at boot time (Closes: #620284)
* appletalk: Fix bugs introduced when removing use of BKL
* ALSA: Fix yet another race in disconnection
* cciss: Fix lost command issue
* ath9k: Fix kernel panic in AR2427
* ses: Avoid kernel panic when lun 0 is not mapped
* PCI/ACPI: Report ASPM support to BIOS if not disabled from command line

[ Aurelien Jarno ]
* rtlwifi: fix build when PCI is not enabled.

[ Martin Michlmayr ]
* rtlwifi: Eliminate udelay calls with too large values (Closes: #620204)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * linux/arch/arm/plat-samsung/dev-onenand.c
 
3
 *
 
4
 *  Copyright (c) 2008-2010 Samsung Electronics
 
5
 *  Kyungmin Park <kyungmin.park@samsung.com>
 
6
 *
 
7
 * S3C64XX/S5PC100 series device definition for OneNAND devices
 
8
 *
 
9
 * This program is free software; you can redistribute it and/or modify
 
10
 * it under the terms of the GNU General Public License version 2 as
 
11
 * published by the Free Software Foundation.
 
12
 */
 
13
 
 
14
#include <linux/kernel.h>
 
15
#include <linux/platform_device.h>
 
16
#include <linux/mtd/mtd.h>
 
17
#include <linux/mtd/onenand.h>
 
18
 
 
19
#include <mach/irqs.h>
 
20
#include <mach/map.h>
 
21
 
 
22
static struct resource s3c_onenand_resources[] = {
 
23
        [0] = {
 
24
                .start  = S3C_PA_ONENAND,
 
25
                .end    = S3C_PA_ONENAND + 0x400 - 1,
 
26
                .flags  = IORESOURCE_MEM,
 
27
        },
 
28
        [1] = {
 
29
                .start  = S3C_PA_ONENAND_BUF,
 
30
                .end    = S3C_PA_ONENAND_BUF + S3C_SZ_ONENAND_BUF - 1,
 
31
                .flags  = IORESOURCE_MEM,
 
32
        },
 
33
        [2] = {
 
34
                .start  = IRQ_ONENAND,
 
35
                .end    = IRQ_ONENAND,
 
36
                .flags  = IORESOURCE_IRQ,
 
37
        },
 
38
};
 
39
 
 
40
struct platform_device s3c_device_onenand = {
 
41
        .name           = "samsung-onenand",
 
42
        .id             = 0,
 
43
        .num_resources  = ARRAY_SIZE(s3c_onenand_resources),
 
44
        .resource       = s3c_onenand_resources,
 
45
};
 
46
 
 
47
void s3c_onenand_set_platdata(struct onenand_platform_data *pdata)
 
48
{
 
49
        struct onenand_platform_data *pd;
 
50
 
 
51
        pd = kmemdup(pdata, sizeof(struct onenand_platform_data), GFP_KERNEL);
 
52
        if (!pd)
 
53
                printk(KERN_ERR "%s: no memory for platform data\n", __func__);
 
54
        s3c_device_onenand.dev.platform_data = pd;
 
55
}