blob: 3ce10ae0f3975d1aa5fe87d172e630d70c04af77 [file] [log] [blame]
Dmitry Baryshkovd6315942008-06-22 12:01:58 +01001/*
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
Ian Molton25d6cbd82008-08-10 23:32:07 +020017#ifndef MFD_TC6393XB_H
18#define MFD_TC6393XB_H
Dmitry Baryshkovd6315942008-06-22 12:01:58 +010019
20/* Also one should provide the CK3P6MI clock */
21struct tc6393xb_platform_data {
22 u16 scr_pll2cr; /* PLL2 Control */
23 u16 scr_gper; /* GP Enable */
Dmitry Baryshkovd6315942008-06-22 12:01:58 +010024
25 int (*enable)(struct platform_device *dev);
26 int (*disable)(struct platform_device *dev);
27 int (*suspend)(struct platform_device *dev);
28 int (*resume)(struct platform_device *dev);
29
Ian Molton25d6cbd82008-08-10 23:32:07 +020030 int irq_base; /* base for subdevice irqs */
Dmitry Baryshkovd6315942008-06-22 12:01:58 +010031 int gpio_base;
Dmitry Baryshkov1c1b6ff2008-09-24 23:36:23 +020032 int (*setup)(struct platform_device *dev);
33 void (*teardown)(struct platform_device *dev);
Dmitry Baryshkovf024ff12008-06-27 10:37:57 +010034
35 struct tmio_nand_data *nand_data;
Dmitry Baryshkovf98a0bd2008-09-24 23:46:10 +020036
37 unsigned resume_restore : 1; /* make special actions
38 to preserve the state
39 on suspend/resume */
Dmitry Baryshkovd6315942008-06-22 12:01:58 +010040};
41
42/*
43 * Relative to irq_base
44 */
45#define IRQ_TC6393_NAND 0
46#define IRQ_TC6393_MMC 1
Dmitry Baryshkovd6315942008-06-22 12:01:58 +010047
48#define TC6393XB_NR_IRQS 8
49
50#endif