blob: 626e448205c543ed8d6b2cd3a361d07d67719c4a [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 Molton25d6cbd2008-08-10 23:32:07 +020017#ifndef MFD_TC6393XB_H
18#define MFD_TC6393XB_H
Dmitry Baryshkovd6315942008-06-22 12:01:58 +010019
Dmitry Baryshkov9e78cfe2008-10-04 00:50:36 +020020#include <linux/fb.h>
21
Dmitry Baryshkovd6315942008-06-22 12:01:58 +010022/* Also one should provide the CK3P6MI clock */
23struct tc6393xb_platform_data {
24 u16 scr_pll2cr; /* PLL2 Control */
25 u16 scr_gper; /* GP Enable */
Dmitry Baryshkovd6315942008-06-22 12:01:58 +010026
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
Ian Molton25d6cbd2008-08-10 23:32:07 +020032 int irq_base; /* base for subdevice irqs */
Dmitry Baryshkovd6315942008-06-22 12:01:58 +010033 int gpio_base;
Dmitry Baryshkov1c1b6ff2008-09-24 23:36:23 +020034 int (*setup)(struct platform_device *dev);
35 void (*teardown)(struct platform_device *dev);
Dmitry Baryshkovf024ff12008-06-27 10:37:57 +010036
37 struct tmio_nand_data *nand_data;
Dmitry Baryshkov9e78cfe2008-10-04 00:50:36 +020038 struct tmio_fb_data *fb_data;
Dmitry Baryshkovf98a0bd2008-09-24 23:46:10 +020039
40 unsigned resume_restore : 1; /* make special actions
41 to preserve the state
42 on suspend/resume */
Dmitry Baryshkovd6315942008-06-22 12:01:58 +010043};
44
Dmitry Baryshkov9e78cfe2008-10-04 00:50:36 +020045extern int tc6393xb_lcd_mode(struct platform_device *fb,
46 const struct fb_videomode *mode);
47extern int tc6393xb_lcd_set_power(struct platform_device *fb, bool on);
48
Dmitry Baryshkovd6315942008-06-22 12:01:58 +010049/*
50 * Relative to irq_base
51 */
52#define IRQ_TC6393_NAND 0
53#define IRQ_TC6393_MMC 1
Dmitry Baryshkov51a55622008-10-03 20:11:36 +020054#define IRQ_TC6393_OHCI 2
Dmitry Baryshkov9e78cfe2008-10-04 00:50:36 +020055#define IRQ_TC6393_FB 4
Dmitry Baryshkovd6315942008-06-22 12:01:58 +010056
57#define TC6393XB_NR_IRQS 8
58
59#endif