4 struct mb862xx_l1_cfg
{
16 #define MB862XX_BASE 'M'
17 #define MB862XX_L1_GET_CFG _IOR(MB862XX_BASE, 0, struct mb862xx_l1_cfg*)
18 #define MB862XX_L1_SET_CFG _IOW(MB862XX_BASE, 1, struct mb862xx_l1_cfg*)
19 #define MB862XX_L1_ENABLE _IOW(MB862XX_BASE, 2, int)
20 #define MB862XX_L1_CAP_CTL _IOW(MB862XX_BASE, 3, int)
24 #define PCI_VENDOR_ID_FUJITSU_LIMITED 0x10cf
25 #define PCI_DEVICE_ID_FUJITSU_CORALP 0x2019
26 #define PCI_DEVICE_ID_FUJITSU_CORALPA 0x201e
27 #define PCI_DEVICE_ID_FUJITSU_CARMINE 0x202b
29 #define GC_MMR_CORALP_EVB_VAL 0x11d7fa13
40 struct mb862xx_gc_mode
{
41 struct fb_videomode def_mode
; /* mode of connected display */
42 unsigned int def_bpp
; /* default depth */
43 unsigned long max_vram
; /* connected SDRAM size */
44 unsigned long ccf
; /* gdc clk */
45 unsigned long mmr
; /* memory mode for SDRAM */
49 struct mb862xxfb_par
{
50 struct fb_info
*info
; /* fb info head */
53 struct resource
*res
; /* framebuffer/mmio resource */
55 resource_size_t fb_base_phys
; /* fb base, 36-bit PPC440EPx */
56 resource_size_t mmio_base_phys
; /* io base addr */
57 void __iomem
*fb_base
; /* remapped framebuffer */
58 void __iomem
*mmio_base
; /* remapped registers */
59 size_t mapped_vram
; /* length of remapped vram */
60 size_t mmio_len
; /* length of register region */
61 unsigned long cap_buf
; /* capture buffers offset */
62 size_t cap_len
; /* length of capture buffers */
64 void __iomem
*host
; /* relocatable reg. bases */
74 void __iomem
*dram_ctrl
;
78 unsigned int type
; /* GDC type */
79 unsigned int refclk
; /* disp. reference clock */
80 struct mb862xx_gc_mode
*gc_mode
; /* GDC mode init data */
81 int pre_init
; /* don't init display if 1 */
82 struct i2c_adapter
*adap
; /* GDC I2C bus adapter */
85 struct mb862xx_l1_cfg l1_cfg
;
88 u32 pseudo_palette
[16];
91 extern void mb862xxfb_init_accel(struct fb_info
*info
, int xres
);
92 #ifdef CONFIG_FB_MB862XX_I2C
93 extern int mb862xx_i2c_init(struct mb862xxfb_par
*par
);
94 extern void mb862xx_i2c_exit(struct mb862xxfb_par
*par
);
96 static inline int mb862xx_i2c_init(struct mb862xxfb_par
*par
) { return 0; }
97 static inline void mb862xx_i2c_exit(struct mb862xxfb_par
*par
) { }
100 #if defined(CONFIG_FB_MB862XX_LIME) && defined(CONFIG_FB_MB862XX_PCI_GDC)
101 #error "Select Lime GDC or CoralP/Carmine support, but not both together"
103 #if defined(CONFIG_FB_MB862XX_LIME)
104 #define gdc_read __raw_readl
105 #define gdc_write __raw_writel
107 #define gdc_read readl
108 #define gdc_write writel
111 #define inreg(type, off) \
112 gdc_read((par->type + (off)))
114 #define outreg(type, off, val) \
115 gdc_write((val), (par->type + (off)))
117 #define pack(a, b) (((a) << 16) | (b))
119 #endif /* __KERNEL__ */