From 5b9f1b9e4aa51af5712cf1d90552ace57d9f486b Mon Sep 17 00:00:00 2001 From: notaz Date: Fri, 3 Aug 2012 00:43:56 +0300 Subject: frontend/pollux: wiz: move tables to upper memory to free some RAM --- frontend/pl_gun_ts.h | 1 + frontend/plat_pollux.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) (limited to 'frontend') diff --git a/frontend/pl_gun_ts.h b/frontend/pl_gun_ts.h index 4e15f00..4e3d195 100644 --- a/frontend/pl_gun_ts.h +++ b/frontend/pl_gun_ts.h @@ -13,5 +13,6 @@ int pl_gun_ts_get_fd(struct tsdev *ts); #define pl_gun_ts_init() NULL #define pl_gun_ts_update(...) do {} while (0) +#define pl_set_gun_rect(...) do {} while (0) #endif diff --git a/frontend/plat_pollux.c b/frontend/plat_pollux.c index 589049c..1dafb7c 100644 --- a/frontend/plat_pollux.c +++ b/frontend/plat_pollux.c @@ -653,6 +653,22 @@ void plat_finish(void) close(memdev); } +/* WIZ RAM lack workaround */ +void *memtab_mmap(void *addr, size_t size) +{ + void *ret; + + if (gp2x_dev_id != GP2X_DEV_WIZ) + return mmap(addr, size, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED, -1, 0); + + ret = mmap(addr, size, PROT_READ | PROT_WRITE, + MAP_SHARED | MAP_FIXED, memdev, 0x03000000); + if (ret != MAP_FAILED) + warm_change_cb_range(WCB_C_BIT | WCB_B_BIT, 1, ret, size); + return ret; +} + /* Caanoo stuff, perhaps move later */ static const char * const caanoo_keys[KEY_MAX + 1] = { [0 ... KEY_MAX] = NULL, -- cgit v1.2.3