Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * Toshiba TC6393XB SoC support
0004  *
0005  * Copyright(c) 2005-2006 Chris Humbert
0006  * Copyright(c) 2005 Dirk Opfer
0007  * Copyright(c) 2005 Ian Molton <spyro@f2s.com>
0008  * Copyright(c) 2007 Dmitry Baryshkov
0009  *
0010  * Based on code written by Sharp/Lineo for 2.4 kernels
0011  * Based on locomo.c
0012  */
0013 
0014 #ifndef MFD_TC6393XB_H
0015 #define MFD_TC6393XB_H
0016 
0017 #include <linux/fb.h>
0018 
0019 /* Also one should provide the CK3P6MI clock */
0020 struct tc6393xb_platform_data {
0021     u16 scr_pll2cr; /* PLL2 Control */
0022     u16 scr_gper;   /* GP Enable */
0023 
0024     int (*enable)(struct platform_device *dev);
0025     void    (*disable)(struct platform_device *dev);
0026     int (*suspend)(struct platform_device *dev);
0027     int (*resume)(struct platform_device *dev);
0028 
0029     int irq_base;   /* base for subdevice irqs */
0030 
0031     struct tmio_nand_data   *nand_data;
0032     struct tmio_fb_data *fb_data;
0033 
0034     unsigned resume_restore : 1; /* make special actions
0035                     to preserve the state
0036                     on suspend/resume */
0037 };
0038 
0039 extern int tc6393xb_lcd_mode(struct platform_device *fb,
0040                  const struct fb_videomode *mode);
0041 extern int tc6393xb_lcd_set_power(struct platform_device *fb, bool on);
0042 
0043 /*
0044  * Relative to irq_base
0045  */
0046 #define IRQ_TC6393_NAND     0
0047 #define IRQ_TC6393_MMC      1
0048 #define IRQ_TC6393_OHCI     2
0049 #define IRQ_TC6393_FB       4
0050 
0051 #define TC6393XB_NR_IRQS    8
0052 
0053 #endif