tc6393xb.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. #ifndef MFD_TC6393XB_H
  17. #define MFD_TC6393XB_H
  18. #include <linux/fb.h>
  19. /* Also one should provide the CK3P6MI clock */
  20. struct tc6393xb_platform_data {
  21. u16 scr_pll2cr; /* PLL2 Control */
  22. u16 scr_gper; /* GP Enable */
  23. int (*enable)(struct platform_device *dev);
  24. int (*disable)(struct platform_device *dev);
  25. int (*suspend)(struct platform_device *dev);
  26. int (*resume)(struct platform_device *dev);
  27. int irq_base; /* base for subdevice irqs */
  28. int gpio_base;
  29. int (*setup)(struct platform_device *dev);
  30. void (*teardown)(struct platform_device *dev);
  31. struct tmio_nand_data *nand_data;
  32. struct tmio_fb_data *fb_data;
  33. unsigned resume_restore : 1; /* make special actions
  34. to preserve the state
  35. on suspend/resume */
  36. };
  37. extern int tc6393xb_lcd_mode(struct platform_device *fb,
  38. const struct fb_videomode *mode);
  39. extern int tc6393xb_lcd_set_power(struct platform_device *fb, bool on);
  40. /*
  41. * Relative to irq_base
  42. */
  43. #define IRQ_TC6393_NAND 0
  44. #define IRQ_TC6393_MMC 1
  45. #define IRQ_TC6393_OHCI 2
  46. #define IRQ_TC6393_FB 4
  47. #define TC6393XB_NR_IRQS 8
  48. #endif