tc6393xb.h 1.3 KB
Newer Older
1
/* SPDX-License-Identifier: GPL-2.0-only */
2 3 4 5 6 7 8 9 10 11 12 13
/*
 * Toshiba TC6393XB SoC support
 *
 * Copyright(c) 2005-2006 Chris Humbert
 * Copyright(c) 2005 Dirk Opfer
 * Copyright(c) 2005 Ian Molton <spyro@f2s.com>
 * Copyright(c) 2007 Dmitry Baryshkov
 *
 * Based on code written by Sharp/Lineo for 2.4 kernels
 * Based on locomo.c
 */

I
Ian Molton 已提交
14 15
#ifndef MFD_TC6393XB_H
#define MFD_TC6393XB_H
16

17 18
#include <linux/fb.h>

19 20 21 22 23 24 25 26 27 28
/* Also one should provide the CK3P6MI clock */
struct tc6393xb_platform_data {
	u16	scr_pll2cr;	/* PLL2 Control */
	u16	scr_gper;	/* GP Enable */

	int	(*enable)(struct platform_device *dev);
	int	(*disable)(struct platform_device *dev);
	int	(*suspend)(struct platform_device *dev);
	int	(*resume)(struct platform_device *dev);

I
Ian Molton 已提交
29
	int	irq_base;	/* base for subdevice irqs */
30 31

	struct tmio_nand_data	*nand_data;
32
	struct tmio_fb_data	*fb_data;
33 34 35 36

	unsigned resume_restore : 1; /* make special actions
					to preserve the state
					on suspend/resume */
37 38
};

39 40 41 42
extern int tc6393xb_lcd_mode(struct platform_device *fb,
			     const struct fb_videomode *mode);
extern int tc6393xb_lcd_set_power(struct platform_device *fb, bool on);

43 44 45 46 47
/*
 * Relative to irq_base
 */
#define	IRQ_TC6393_NAND		0
#define	IRQ_TC6393_MMC		1
D
Dmitry Baryshkov 已提交
48
#define	IRQ_TC6393_OHCI		2
49
#define	IRQ_TC6393_FB		4
50 51 52 53

#define	TC6393XB_NR_IRQS	8

#endif