aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2008-07-12 16:43:01 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-07-12 16:43:01 -0400
commit7fecc34e07e02b4d9dab1a1f4bf7fdac0a656b9b (patch)
tree110d24e6394dbd98cb33d80a5587cd18c8315e0b /include/linux
parenta9da4f7ed6a702996ac9d1bbaf1a3969a4c092b3 (diff)
parent938870491f0cad030b358af47e28d124b72702d1 (diff)
Merge branch 'pxa-tosa' into pxa
Conflicts: arch/arm/mach-pxa/Kconfig arch/arm/mach-pxa/tosa.c arch/arm/mach-pxa/spitz.c
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mfd/core.h55
-rw-r--r--include/linux/mfd/tc6393xb.h49
-rw-r--r--include/linux/mfd/tmio.h17
3 files changed, 121 insertions, 0 deletions
diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h
new file mode 100644
index 00000000000..bb3dd054592
--- /dev/null
+++ b/include/linux/mfd/core.h
@@ -0,0 +1,55 @@
1#ifndef MFD_CORE_H
2#define MFD_CORE_H
3/*
4 * drivers/mfd/mfd-core.h
5 *
6 * core MFD support
7 * Copyright (c) 2006 Ian Molton
8 * Copyright (c) 2007 Dmitry Baryshkov
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 *
14 */
15
16#include <linux/platform_device.h>
17
18/*
19 * This struct describes the MFD part ("cell").
20 * After registration the copy of this structure will become the platform data
21 * of the resulting platform_device
22 */
23struct mfd_cell {
24 const char *name;
25
26 int (*enable)(struct platform_device *dev);
27 int (*disable)(struct platform_device *dev);
28 int (*suspend)(struct platform_device *dev);
29 int (*resume)(struct platform_device *dev);
30
31 void *driver_data; /* driver-specific data */
32
33 /*
34 * This resources can be specified relatievly to the parent device.
35 * For accessing device you should use resources from device
36 */
37 int num_resources;
38 const struct resource *resources;
39};
40
41static inline struct mfd_cell *
42mfd_get_cell(struct platform_device *pdev)
43{
44 return (struct mfd_cell *)pdev->dev.platform_data;
45}
46
47extern int mfd_add_devices(
48 struct platform_device *parent,
49 const struct mfd_cell *cells, int n_devs,
50 struct resource *mem_base,
51 int irq_base);
52
53extern void mfd_remove_devices(struct platform_device *parent);
54
55#endif
diff --git a/include/linux/mfd/tc6393xb.h b/include/linux/mfd/tc6393xb.h
new file mode 100644
index 00000000000..7cc824a58f7
--- /dev/null
+++ b/include/linux/mfd/tc6393xb.h
@@ -0,0 +1,49 @@
1/*
2 * Toshiba TC6393XB SoC support
3 *
4 * Copyright(c) 2005-2006 Chris Humbert
5 * Copyright(c) 2005 Dirk Opfer
6 * Copyright(c) 2005 Ian Molton <spyro@f2s.com>
7 * Copyright(c) 2007 Dmitry Baryshkov
8 *
9 * Based on code written by Sharp/Lineo for 2.4 kernels
10 * Based on locomo.c
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
15 */
16
17#ifndef TC6393XB_H
18#define TC6393XB_H
19
20/* Also one should provide the CK3P6MI clock */
21struct tc6393xb_platform_data {
22 u16 scr_pll2cr; /* PLL2 Control */
23 u16 scr_gper; /* GP Enable */
24 u32 scr_gpo_doecr; /* GPO Data OE Control */
25 u32 scr_gpo_dsr; /* GPO Data Set */
26
27 int (*enable)(struct platform_device *dev);
28 int (*disable)(struct platform_device *dev);
29 int (*suspend)(struct platform_device *dev);
30 int (*resume)(struct platform_device *dev);
31
32 int irq_base; /* a base for cascaded irq */
33 int gpio_base;
34
35 struct tmio_nand_data *nand_data;
36};
37
38/*
39 * Relative to irq_base
40 */
41#define IRQ_TC6393_NAND 0
42#define IRQ_TC6393_MMC 1
43#define IRQ_TC6393_OHCI 2
44#define IRQ_TC6393_SERIAL 3
45#define IRQ_TC6393_FB 4
46
47#define TC6393XB_NR_IRQS 8
48
49#endif
diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h
new file mode 100644
index 00000000000..9438d8c9ac1
--- /dev/null
+++ b/include/linux/mfd/tmio.h
@@ -0,0 +1,17 @@
1#ifndef MFD_TMIO_H
2#define MFD_TMIO_H
3
4/*
5 * data for the NAND controller
6 */
7struct tmio_nand_data {
8 struct nand_bbt_descr *badblock_pattern;
9 struct mtd_partition *partition;
10 unsigned int num_partitions;
11};
12
13#define TMIO_NAND_CONFIG "tmio-nand-config"
14#define TMIO_NAND_CONTROL "tmio-nand-control"
15#define TMIO_NAND_IRQ "tmio-nand"
16
17#endif