diff options
Diffstat (limited to 'firmware/export')
-rw-r--r-- | firmware/export/config.h | 2 | ||||
-rw-r--r-- | firmware/export/config/sansafuzeplus.h | 2 | ||||
-rw-r--r-- | firmware/export/imx233.h | 30 |
3 files changed, 30 insertions, 4 deletions
diff --git a/firmware/export/config.h b/firmware/export/config.h index 57e6bb8a59..e1ce15a562 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h | |||
@@ -937,7 +937,7 @@ Lyre prototype 1 */ | |||
937 | 937 | ||
938 | #endif /* CPU_PP */ | 938 | #endif /* CPU_PP */ |
939 | 939 | ||
940 | #if CONFIG_CPU == IMX31L | 940 | #if CONFIG_CPU == IMX31L || CONFIG_CPU == IMX233 |
941 | #define NOCACHEBSS_ATTR __attribute__((section(".ncbss"),nocommon)) | 941 | #define NOCACHEBSS_ATTR __attribute__((section(".ncbss"),nocommon)) |
942 | #define NOCACHEDATA_ATTR __attribute__((section(".ncdata"),nocommon)) | 942 | #define NOCACHEDATA_ATTR __attribute__((section(".ncdata"),nocommon)) |
943 | #endif | 943 | #endif |
diff --git a/firmware/export/config/sansafuzeplus.h b/firmware/export/config/sansafuzeplus.h index 971ff019b6..13ad3af8ed 100644 --- a/firmware/export/config/sansafuzeplus.h +++ b/firmware/export/config/sansafuzeplus.h | |||
@@ -172,7 +172,7 @@ | |||
172 | #define USB_VENDOR_ID 0x0781 | 172 | #define USB_VENDOR_ID 0x0781 |
173 | #define USB_PRODUCT_ID 0x74e1 | 173 | #define USB_PRODUCT_ID 0x74e1 |
174 | #define HAVE_USB_HID_MOUSE | 174 | #define HAVE_USB_HID_MOUSE |
175 | //#define HAVE_BOOTLOADER_USB_MODE | 175 | #define HAVE_BOOTLOADER_USB_MODE |
176 | 176 | ||
177 | /* The fuze+ actually interesting partition table does not use 512-byte sector | 177 | /* The fuze+ actually interesting partition table does not use 512-byte sector |
178 | * (usually 2048 logical sector size) */ | 178 | * (usually 2048 logical sector size) */ |
diff --git a/firmware/export/imx233.h b/firmware/export/imx233.h index d9ea06a420..2a2097b5d7 100644 --- a/firmware/export/imx233.h +++ b/firmware/export/imx233.h | |||
@@ -21,17 +21,41 @@ | |||
21 | #ifndef __IMX233_H__ | 21 | #ifndef __IMX233_H__ |
22 | #define __IMX233_H__ | 22 | #define __IMX233_H__ |
23 | 23 | ||
24 | /* | ||
25 | * Chip Memory Map: | ||
26 | * 0x00000000 - 0x00007fff: on chip ram | ||
27 | * 0x40000000 - 0x5fffffff: dram (512Mb max) | ||
28 | * 0x80000000 - 0x80100000: memory mapped registers | ||
29 | * We use the following map: | ||
30 | * 0x60000000 - 0x7fffffff: dram (cached) | ||
31 | * 0x90000000 - 0xafffffff: dram (buffered) | ||
32 | * everything else : identity mapped (uncached) | ||
33 | * | ||
34 | * As a side note it's important to notice that uncached dram is identity mapped | ||
35 | */ | ||
36 | |||
24 | #define IRAM_ORIG 0 | 37 | #define IRAM_ORIG 0 |
25 | #define IRAM_SIZE 0x8000 | 38 | #define IRAM_SIZE 0x8000 |
26 | #define DRAM_ORIG 0x40000000 | 39 | #define DRAM_ORIG 0x40000000 |
27 | #define DRAM_SIZE (MEMORYSIZE * 0x100000) | 40 | #define DRAM_SIZE (MEMORYSIZE * 0x100000) |
28 | 41 | ||
42 | #define UNCACHED_DRAM_ADDR 0x40000000 | ||
43 | #define CACHED_DRAM_ADDR 0x60000000 | ||
44 | #define BUFFERED_DRAM_ADDR 0x90000000 | ||
45 | #define CACHEALIGN_SIZE 32 | ||
46 | |||
47 | #define PHYSICAL_ADDR(a) \ | ||
48 | ((typeof(a))((uintptr_t)(a) >= CACHED_DRAM_ADDR ? \ | ||
49 | ((uintptr_t)(a) - CACHED_DRAM_ADDR + UNCACHED_DRAM_ADDR) \ | ||
50 | :(uintptr_t)(a))) | ||
51 | #define UNCACHED_ADDR(a) PHYSICAL_ADDR(a) | ||
52 | |||
29 | #define TTB_BASE_ADDR (DRAM_ORIG + DRAM_SIZE - TTB_SIZE) | 53 | #define TTB_BASE_ADDR (DRAM_ORIG + DRAM_SIZE - TTB_SIZE) |
30 | #define TTB_SIZE 0x4000 | 54 | #define TTB_SIZE 0x4000 |
31 | #define TTB_BASE ((unsigned long *)TTB_BASE_ADDR) | 55 | #define TTB_BASE ((unsigned long *)TTB_BASE_ADDR) |
32 | #define FRAME_SIZE (LCD_WIDTH * LCD_HEIGHT * LCD_DEPTH / 8) | 56 | #define FRAME_SIZE (LCD_WIDTH * LCD_HEIGHT * LCD_DEPTH / 8) |
33 | #define LCD_FRAME_ADDR (DRAM_ORIG + DRAM_SIZE - TTB_SIZE - FRAME_SIZE) | 57 | #define FRAME_PHYS_ADDR (DRAM_ORIG + DRAM_SIZE - TTB_SIZE - FRAME_SIZE) |
34 | #define FRAME ((unsigned short *)LCD_FRAME_ADDR) | 58 | #define FRAME ((void *)(FRAME_PHYS_ADDR - UNCACHED_DRAM_ADDR + BUFFERED_DRAM_ADDR)) |
35 | 59 | ||
36 | /* USBOTG */ | 60 | /* USBOTG */ |
37 | #define USB_QHARRAY_ATTR __attribute__((section(".qharray"),nocommon,aligned(2048))) | 61 | #define USB_QHARRAY_ATTR __attribute__((section(".qharray"),nocommon,aligned(2048))) |
@@ -52,5 +76,7 @@ | |||
52 | 76 | ||
53 | #define CACHEALIGN_BITS 4 | 77 | #define CACHEALIGN_BITS 4 |
54 | 78 | ||
79 | #define __XTRACT(reg, field) ((reg & reg##__##field##_BM) >> reg##__##field##_BP) | ||
80 | #define __XTRACT_EX(val, field) (((val) & field##_BM) >> field##_BP) | ||
55 | 81 | ||
56 | #endif /* __IMX233_H__ */ | 82 | #endif /* __IMX233_H__ */ |