1
0
Fork 0
forked from len0rd/rockbox

move some data around to place qh_array at the start of iram. This saves up to about 2k iram on PP

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17194 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Frank Gevaerts 2008-04-20 18:43:47 +00:00
parent 850a11250a
commit 7a2d9ddb08
8 changed files with 52 additions and 37 deletions

View file

@ -34,6 +34,7 @@
#define FRAME_SIZE (240*320*2) #define FRAME_SIZE (240*320*2)
#define DEVBSS_ATTR __attribute__((section(".devbss"),nocommon)) #define DEVBSS_ATTR __attribute__((section(".devbss"),nocommon))
#define QHARRAY_ATTR __attribute__((section(".qharray"),nocommon))
/* /*
* AIPS 1 * AIPS 1

View file

@ -21,6 +21,8 @@
/* All info gleaned and/or copied from the iPodLinux project. */ /* All info gleaned and/or copied from the iPodLinux project. */
#define QHARRAY_ATTR __attribute__((section(".qharray"),nocommon))
/* DRAM starts at 0x10000000, but in Rockbox we remap it to 0x00000000 */ /* DRAM starts at 0x10000000, but in Rockbox we remap it to 0x00000000 */
#define DRAM_START 0x10000000 #define DRAM_START 0x10000000

View file

@ -152,6 +152,7 @@ SECTIONS
.devbss (NOLOAD) : .devbss (NOLOAD) :
{ {
_devbssdata = .; _devbssdata = .;
*(.qharray)
*(.devbss*) *(.devbss*)
_devbssend = .; _devbssend = .;
} > DEVBSS } > DEVBSS

View file

@ -104,7 +104,16 @@ SECTIONS
_vectorscopy = LOADADDR(.vectors); _vectorscopy = LOADADDR(.vectors);
.iram IRAMORIG : .ibss IRAMORIG (NOLOAD) :
{
_iedata = .;
*(.qharray)
*(.ibss)
. = ALIGN(0x4);
_iend = .;
} > IRAM
.iram _iend :
{ {
_iramstart = .; _iramstart = .;
*(.icode) *(.icode)
@ -116,14 +125,6 @@ SECTIONS
_iramcopy = LOADADDR(.iram); _iramcopy = LOADADDR(.iram);
.ibss (NOLOAD) :
{
_iedata = .;
*(.ibss)
. = ALIGN(0x4);
_iend = .;
} > IRAM
.idle_stacks (NOLOAD) : .idle_stacks (NOLOAD) :
{ {
*(.idle_stacks) *(.idle_stacks)

View file

@ -104,7 +104,16 @@ SECTIONS
_vectorscopy = LOADADDR(.vectors); _vectorscopy = LOADADDR(.vectors);
.iram IRAMORIG : .ibss IRAMORIG (NOLOAD) :
{
_iedata = .;
*(.qharray)
*(.ibss)
. = ALIGN(0x4);
_iend = .;
} > IRAM
.iram _iend :
{ {
_iramstart = .; _iramstart = .;
*(.icode) *(.icode)
@ -116,14 +125,6 @@ SECTIONS
_iramcopy = LOADADDR(.iram); _iramcopy = LOADADDR(.iram);
.ibss (NOLOAD) :
{
_iedata = .;
*(.ibss)
. = ALIGN(0x4);
_iend = .;
} > IRAM
.idle_stacks (NOLOAD) : .idle_stacks (NOLOAD) :
{ {
*(.idle_stacks) *(.idle_stacks)

View file

@ -104,7 +104,16 @@ SECTIONS
_vectorscopy = LOADADDR(.vectors); _vectorscopy = LOADADDR(.vectors);
.iram IRAMORIG : .ibss IRAMORIG (NOLOAD) :
{
_iedata = .;
*(.qharray)
*(.ibss)
. = ALIGN(0x4);
_iend = .;
} > IRAM
.iram _iend :
{ {
_iramstart = .; _iramstart = .;
*(.icode) *(.icode)
@ -116,14 +125,6 @@ SECTIONS
_iramcopy = LOADADDR(.iram); _iramcopy = LOADADDR(.iram);
.ibss (NOLOAD) :
{
_iedata = .;
*(.ibss)
. = ALIGN(0x4);
_iend = .;
} > IRAM
.idle_stacks (NOLOAD) : .idle_stacks (NOLOAD) :
{ {
*(.idle_stacks) *(.idle_stacks)

View file

@ -104,7 +104,16 @@ SECTIONS
_vectorscopy = LOADADDR(.vectors); _vectorscopy = LOADADDR(.vectors);
.iram IRAMORIG : .ibss IRAMORIG (NOLOAD) :
{
_iedata = .;
*(.qharray)
*(.ibss)
. = ALIGN(0x4);
_iend = .;
} > IRAM
.iram _iend :
{ {
_iramstart = .; _iramstart = .;
*(.icode) *(.icode)
@ -116,14 +125,6 @@ SECTIONS
_iramcopy = LOADADDR(.iram); _iramcopy = LOADADDR(.iram);
.ibss (NOLOAD) :
{
_iedata = .;
*(.ibss)
. = ALIGN(0x4);
_iend = .;
} > IRAM
.idle_stacks (NOLOAD) : .idle_stacks (NOLOAD) :
{ {
*(.idle_stacks) *(.idle_stacks)

View file

@ -338,8 +338,15 @@ struct queue_head {
unsigned int wait; /* for softwate use, indicates if the transfer is blocking */ unsigned int wait; /* for softwate use, indicates if the transfer is blocking */
} __attribute__((packed)); } __attribute__((packed));
#if CONFIG_CPU == IMX31L
static struct queue_head qh_array[NUM_ENDPOINTS*2] static struct queue_head qh_array[NUM_ENDPOINTS*2]
USBDEVBSS_ATTR __attribute__((aligned (2048))); QHARRAY_ATTR __attribute__((aligned (2048)));
#else
/* This still needs to be 2048 byte aligned, but QHARRAY_ATTR should take
care of that */
static struct queue_head qh_array[NUM_ENDPOINTS*2]
QHARRAY_ATTR __attribute__((aligned (4)));
#endif
static struct wakeup transfer_completion_signal[NUM_ENDPOINTS*2] static struct wakeup transfer_completion_signal[NUM_ENDPOINTS*2]
SHAREDBSS_ATTR; SHAREDBSS_ATTR;