Reload the current playlist after reboot even if it has ended. (FS#11644)
[kugel-rb.git] / firmware / export / imx233.h
blobd9ea06a4205afc91b41d40e42b574e4661ea5fdb
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2011 by Amaury Pouly
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
21 #ifndef __IMX233_H__
22 #define __IMX233_H__
24 #define IRAM_ORIG 0
25 #define IRAM_SIZE 0x8000
26 #define DRAM_ORIG 0x40000000
27 #define DRAM_SIZE (MEMORYSIZE * 0x100000)
29 #define TTB_BASE_ADDR (DRAM_ORIG + DRAM_SIZE - TTB_SIZE)
30 #define TTB_SIZE 0x4000
31 #define TTB_BASE ((unsigned long *)TTB_BASE_ADDR)
32 #define FRAME_SIZE (LCD_WIDTH * LCD_HEIGHT * LCD_DEPTH / 8)
33 #define LCD_FRAME_ADDR (DRAM_ORIG + DRAM_SIZE - TTB_SIZE - FRAME_SIZE)
34 #define FRAME ((unsigned short *)LCD_FRAME_ADDR)
36 /* USBOTG */
37 #define USB_QHARRAY_ATTR __attribute__((section(".qharray"),nocommon,aligned(2048)))
38 #define USB_NUM_ENDPOINTS 5
39 #define USB_DEVBSS_ATTR NOCACHEBSS_ATTR
40 #define USB_BASE 0x80080000
42 #define QHARRAY_SIZE ((64*USB_NUM_ENDPOINTS*2 + 2047) & (0xffffffff - 2047))
43 #define QHARRAY_PHYS_ADDR ((FRAME_PHYS_ADDR - QHARRAY_SIZE) & (0xffffffff - 2047))
46 #define __REG_SET(reg) (*((volatile uint32_t *)(&reg + 1)))
47 #define __REG_CLR(reg) (*((volatile uint32_t *)(&reg + 2)))
48 #define __REG_TOG(reg) (*((volatile uint32_t *)(&reg + 3)))
50 #define __BLOCK_SFTRST (1 << 31)
51 #define __BLOCK_CLKGATE (1 << 30)
53 #define CACHEALIGN_BITS 4
56 #endif /* __IMX233_H__ */