diff options
author | Frank Gevaerts <frank@gevaerts.be> | 2008-04-20 18:43:47 +0000 |
---|---|---|
committer | Frank Gevaerts <frank@gevaerts.be> | 2008-04-20 18:43:47 +0000 |
commit | 7a2d9ddb08edb65b39bb3276dd60aec4ce7e8d87 (patch) | |
tree | 599cff1325bca86d777b65eb183245bd5717cac4 | |
parent | 850a11250a8c5b6825b080ff843f30fd68cb71f6 (diff) | |
download | rockbox-7a2d9ddb08edb65b39bb3276dd60aec4ce7e8d87.tar.gz rockbox-7a2d9ddb08edb65b39bb3276dd60aec4ce7e8d87.zip |
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
-rwxr-xr-x | firmware/export/imx31l.h | 1 | ||||
-rw-r--r-- | firmware/export/pp5020.h | 2 | ||||
-rw-r--r-- | firmware/target/arm/imx31/app.lds | 1 | ||||
-rw-r--r-- | firmware/target/arm/ipod/app.lds | 19 | ||||
-rw-r--r-- | firmware/target/arm/iriver/app.lds | 19 | ||||
-rw-r--r-- | firmware/target/arm/olympus/app.lds | 19 | ||||
-rw-r--r-- | firmware/target/arm/sandisk/app.lds | 19 | ||||
-rw-r--r-- | firmware/target/arm/usb-drv-arc.c | 9 |
8 files changed, 52 insertions, 37 deletions
diff --git a/firmware/export/imx31l.h b/firmware/export/imx31l.h index 9544603412..aea4b9e151 100755 --- a/firmware/export/imx31l.h +++ b/firmware/export/imx31l.h | |||
@@ -34,6 +34,7 @@ | |||
34 | #define FRAME_SIZE (240*320*2) | 34 | #define FRAME_SIZE (240*320*2) |
35 | 35 | ||
36 | #define DEVBSS_ATTR __attribute__((section(".devbss"),nocommon)) | 36 | #define DEVBSS_ATTR __attribute__((section(".devbss"),nocommon)) |
37 | #define QHARRAY_ATTR __attribute__((section(".qharray"),nocommon)) | ||
37 | 38 | ||
38 | /* | 39 | /* |
39 | * AIPS 1 | 40 | * AIPS 1 |
diff --git a/firmware/export/pp5020.h b/firmware/export/pp5020.h index 163511928d..52acb2f21b 100644 --- a/firmware/export/pp5020.h +++ b/firmware/export/pp5020.h | |||
@@ -21,6 +21,8 @@ | |||
21 | 21 | ||
22 | /* All info gleaned and/or copied from the iPodLinux project. */ | 22 | /* All info gleaned and/or copied from the iPodLinux project. */ |
23 | 23 | ||
24 | #define QHARRAY_ATTR __attribute__((section(".qharray"),nocommon)) | ||
25 | |||
24 | /* DRAM starts at 0x10000000, but in Rockbox we remap it to 0x00000000 */ | 26 | /* DRAM starts at 0x10000000, but in Rockbox we remap it to 0x00000000 */ |
25 | #define DRAM_START 0x10000000 | 27 | #define DRAM_START 0x10000000 |
26 | 28 | ||
diff --git a/firmware/target/arm/imx31/app.lds b/firmware/target/arm/imx31/app.lds index 7a7bd550d1..3725daca04 100644 --- a/firmware/target/arm/imx31/app.lds +++ b/firmware/target/arm/imx31/app.lds | |||
@@ -152,6 +152,7 @@ SECTIONS | |||
152 | .devbss (NOLOAD) : | 152 | .devbss (NOLOAD) : |
153 | { | 153 | { |
154 | _devbssdata = .; | 154 | _devbssdata = .; |
155 | *(.qharray) | ||
155 | *(.devbss*) | 156 | *(.devbss*) |
156 | _devbssend = .; | 157 | _devbssend = .; |
157 | } > DEVBSS | 158 | } > DEVBSS |
diff --git a/firmware/target/arm/ipod/app.lds b/firmware/target/arm/ipod/app.lds index bf5eae0515..ccd23eb31b 100644 --- a/firmware/target/arm/ipod/app.lds +++ b/firmware/target/arm/ipod/app.lds | |||
@@ -104,7 +104,16 @@ SECTIONS | |||
104 | 104 | ||
105 | _vectorscopy = LOADADDR(.vectors); | 105 | _vectorscopy = LOADADDR(.vectors); |
106 | 106 | ||
107 | .iram IRAMORIG : | 107 | .ibss IRAMORIG (NOLOAD) : |
108 | { | ||
109 | _iedata = .; | ||
110 | *(.qharray) | ||
111 | *(.ibss) | ||
112 | . = ALIGN(0x4); | ||
113 | _iend = .; | ||
114 | } > IRAM | ||
115 | |||
116 | .iram _iend : | ||
108 | { | 117 | { |
109 | _iramstart = .; | 118 | _iramstart = .; |
110 | *(.icode) | 119 | *(.icode) |
@@ -116,14 +125,6 @@ SECTIONS | |||
116 | 125 | ||
117 | _iramcopy = LOADADDR(.iram); | 126 | _iramcopy = LOADADDR(.iram); |
118 | 127 | ||
119 | .ibss (NOLOAD) : | ||
120 | { | ||
121 | _iedata = .; | ||
122 | *(.ibss) | ||
123 | . = ALIGN(0x4); | ||
124 | _iend = .; | ||
125 | } > IRAM | ||
126 | |||
127 | .idle_stacks (NOLOAD) : | 128 | .idle_stacks (NOLOAD) : |
128 | { | 129 | { |
129 | *(.idle_stacks) | 130 | *(.idle_stacks) |
diff --git a/firmware/target/arm/iriver/app.lds b/firmware/target/arm/iriver/app.lds index bf5eae0515..ccd23eb31b 100644 --- a/firmware/target/arm/iriver/app.lds +++ b/firmware/target/arm/iriver/app.lds | |||
@@ -104,7 +104,16 @@ SECTIONS | |||
104 | 104 | ||
105 | _vectorscopy = LOADADDR(.vectors); | 105 | _vectorscopy = LOADADDR(.vectors); |
106 | 106 | ||
107 | .iram IRAMORIG : | 107 | .ibss IRAMORIG (NOLOAD) : |
108 | { | ||
109 | _iedata = .; | ||
110 | *(.qharray) | ||
111 | *(.ibss) | ||
112 | . = ALIGN(0x4); | ||
113 | _iend = .; | ||
114 | } > IRAM | ||
115 | |||
116 | .iram _iend : | ||
108 | { | 117 | { |
109 | _iramstart = .; | 118 | _iramstart = .; |
110 | *(.icode) | 119 | *(.icode) |
@@ -116,14 +125,6 @@ SECTIONS | |||
116 | 125 | ||
117 | _iramcopy = LOADADDR(.iram); | 126 | _iramcopy = LOADADDR(.iram); |
118 | 127 | ||
119 | .ibss (NOLOAD) : | ||
120 | { | ||
121 | _iedata = .; | ||
122 | *(.ibss) | ||
123 | . = ALIGN(0x4); | ||
124 | _iend = .; | ||
125 | } > IRAM | ||
126 | |||
127 | .idle_stacks (NOLOAD) : | 128 | .idle_stacks (NOLOAD) : |
128 | { | 129 | { |
129 | *(.idle_stacks) | 130 | *(.idle_stacks) |
diff --git a/firmware/target/arm/olympus/app.lds b/firmware/target/arm/olympus/app.lds index bf5eae0515..ccd23eb31b 100644 --- a/firmware/target/arm/olympus/app.lds +++ b/firmware/target/arm/olympus/app.lds | |||
@@ -104,7 +104,16 @@ SECTIONS | |||
104 | 104 | ||
105 | _vectorscopy = LOADADDR(.vectors); | 105 | _vectorscopy = LOADADDR(.vectors); |
106 | 106 | ||
107 | .iram IRAMORIG : | 107 | .ibss IRAMORIG (NOLOAD) : |
108 | { | ||
109 | _iedata = .; | ||
110 | *(.qharray) | ||
111 | *(.ibss) | ||
112 | . = ALIGN(0x4); | ||
113 | _iend = .; | ||
114 | } > IRAM | ||
115 | |||
116 | .iram _iend : | ||
108 | { | 117 | { |
109 | _iramstart = .; | 118 | _iramstart = .; |
110 | *(.icode) | 119 | *(.icode) |
@@ -116,14 +125,6 @@ SECTIONS | |||
116 | 125 | ||
117 | _iramcopy = LOADADDR(.iram); | 126 | _iramcopy = LOADADDR(.iram); |
118 | 127 | ||
119 | .ibss (NOLOAD) : | ||
120 | { | ||
121 | _iedata = .; | ||
122 | *(.ibss) | ||
123 | . = ALIGN(0x4); | ||
124 | _iend = .; | ||
125 | } > IRAM | ||
126 | |||
127 | .idle_stacks (NOLOAD) : | 128 | .idle_stacks (NOLOAD) : |
128 | { | 129 | { |
129 | *(.idle_stacks) | 130 | *(.idle_stacks) |
diff --git a/firmware/target/arm/sandisk/app.lds b/firmware/target/arm/sandisk/app.lds index bf5eae0515..ccd23eb31b 100644 --- a/firmware/target/arm/sandisk/app.lds +++ b/firmware/target/arm/sandisk/app.lds | |||
@@ -104,7 +104,16 @@ SECTIONS | |||
104 | 104 | ||
105 | _vectorscopy = LOADADDR(.vectors); | 105 | _vectorscopy = LOADADDR(.vectors); |
106 | 106 | ||
107 | .iram IRAMORIG : | 107 | .ibss IRAMORIG (NOLOAD) : |
108 | { | ||
109 | _iedata = .; | ||
110 | *(.qharray) | ||
111 | *(.ibss) | ||
112 | . = ALIGN(0x4); | ||
113 | _iend = .; | ||
114 | } > IRAM | ||
115 | |||
116 | .iram _iend : | ||
108 | { | 117 | { |
109 | _iramstart = .; | 118 | _iramstart = .; |
110 | *(.icode) | 119 | *(.icode) |
@@ -116,14 +125,6 @@ SECTIONS | |||
116 | 125 | ||
117 | _iramcopy = LOADADDR(.iram); | 126 | _iramcopy = LOADADDR(.iram); |
118 | 127 | ||
119 | .ibss (NOLOAD) : | ||
120 | { | ||
121 | _iedata = .; | ||
122 | *(.ibss) | ||
123 | . = ALIGN(0x4); | ||
124 | _iend = .; | ||
125 | } > IRAM | ||
126 | |||
127 | .idle_stacks (NOLOAD) : | 128 | .idle_stacks (NOLOAD) : |
128 | { | 129 | { |
129 | *(.idle_stacks) | 130 | *(.idle_stacks) |
diff --git a/firmware/target/arm/usb-drv-arc.c b/firmware/target/arm/usb-drv-arc.c index a2f8819962..92955e1ac2 100644 --- a/firmware/target/arm/usb-drv-arc.c +++ b/firmware/target/arm/usb-drv-arc.c | |||
@@ -338,8 +338,15 @@ struct queue_head { | |||
338 | unsigned int wait; /* for softwate use, indicates if the transfer is blocking */ | 338 | unsigned int wait; /* for softwate use, indicates if the transfer is blocking */ |
339 | } __attribute__((packed)); | 339 | } __attribute__((packed)); |
340 | 340 | ||
341 | #if CONFIG_CPU == IMX31L | ||
342 | static struct queue_head qh_array[NUM_ENDPOINTS*2] | ||
343 | QHARRAY_ATTR __attribute__((aligned (2048))); | ||
344 | #else | ||
345 | /* This still needs to be 2048 byte aligned, but QHARRAY_ATTR should take | ||
346 | care of that */ | ||
341 | static struct queue_head qh_array[NUM_ENDPOINTS*2] | 347 | static struct queue_head qh_array[NUM_ENDPOINTS*2] |
342 | USBDEVBSS_ATTR __attribute__((aligned (2048))); | 348 | QHARRAY_ATTR __attribute__((aligned (4))); |
349 | #endif | ||
343 | 350 | ||
344 | static struct wakeup transfer_completion_signal[NUM_ENDPOINTS*2] | 351 | static struct wakeup transfer_completion_signal[NUM_ENDPOINTS*2] |
345 | SHAREDBSS_ATTR; | 352 | SHAREDBSS_ATTR; |