4 #include <asm/system.h>
5 #include <linux/mfd/glamo.h>
7 /* for the time being, we put the on-screen framebuffer into the lowest
8 * VRAM space. This should make the code easily compatible with the various
9 * 2MB/4MB/8MB variants of the Smedia chips */
10 #define GLAMO_OFFSET_VRAM 0x800000
11 #define GLAMO_OFFSET_FB (GLAMO_OFFSET_VRAM)
13 /* we only allocate the minimum possible size for the framebuffer to make
14 * sure we have sufficient memory for other functions of the chip */
15 //#define GLAMO_FB_SIZE (640*480*4) /* == 0x12c000 */
16 #define GLAMO_INTERNAL_RAM_SIZE 0x800000
17 #define GLAMO_MMC_BUFFER_SIZE (64 * 1024)
18 #define GLAMO_FB_SIZE (GLAMO_INTERNAL_RAM_SIZE - GLAMO_MMC_BUFFER_SIZE)
22 int irq_works
; /* 0 means PCB does not support Glamo IRQ */
24 struct resource
*mem_core
;
26 struct platform_device
*pdev
;
27 struct glamo_platform_data
*pdata
;
31 u32 engine_enabled_bitfield
;
32 u32 engine_enabled_bitfield_suspend
;
41 int glamo_run_script(struct glamo_core
*glamo
,
42 struct glamo_script
*script
, int len
, int may_sleep
);
44 int glamo_engine_enable(struct glamo_core
*glamo
, enum glamo_engine engine
);
45 int glamo_engine_disable(struct glamo_core
*glamo
, enum glamo_engine engine
);
46 void glamo_engine_reset(struct glamo_core
*glamo
, enum glamo_engine engine
);
47 int glamo_engine_reclock(struct glamo_core
*glamo
,
48 enum glamo_engine engine
, int ps
);
50 void glamo_engine_clkreg_set(struct glamo_core
*glamo
,
51 enum glamo_engine engine
,
52 u_int16_t mask
, u_int16_t val
);
54 u_int16_t
glamo_engine_clkreg_get(struct glamo_core
*glamo
,
55 enum glamo_engine engine
);
56 #endif /* __GLAMO_CORE_H */