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