This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
code optimizations
- To: "'eCos Discussion'" <ecos-discuss at sourceware dot cygnus dot com>
- Subject: [ECOS] code optimizations
- From: "Trenton D. Adams" <tadams at extremeeng dot com>
- Date: Thu, 23 Aug 2001 09:32:20 -0600
- Organization: Extreme Engineering
Here's some output from my stepping through my pc-controller driver I'm
making. Notice how the code jumps back and forth? This shouldn't
happen should it? My hardware is supposed to be initialized in a
specific order, not jump around. If this occurs during debug, it would
occur during a normal run too, wouldn't it? I know we talked about this
before, but this just seems really weird to me! I never did show anyone
this before so I thought I would give it a try.
How do I make the config tool allow me to specify different compiler
options for my driver? Is it a CDL thing?
195 *(unsigned *)PMPCON |= 0x0002; // +12V DC-DC
converter on
(gdb) next
197 *(unsigned *)SYSCON2 |= SYSCON2_PCMCIA1; // PCMCIA Slot 1
on
(gdb) next
198
(gdb) list
193 *(unsigned *)PEDDR |= 0x02; // +5V on
194 *(unsigned *)PEDR |= 0x02; // +5V on
195 *(unsigned *)PMPCON |= 0x0002; // +12V DC-DC
converter on
196 *(unsigned *)SYSCON1 |= SYSCON1_EXCKEN; // EXPCLK on
197 *(unsigned *)SYSCON2 |= SYSCON2_PCMCIA1; // PCMCIA Slot 1
on
198
199 // Disable byte swapping and notify when 2 slots in fifo are
ready
200 *(unsigned*)PCSICR &=
201 ~(PCSICR_ENDIAN_CONVERSION |
PCSICR_TRANSQUEUE_THRHOLD_CTRL);
202
(gdb) next
201 ~(PCSICR_ENDIAN_CONVERSION |
PCSICR_TRANSQUEUE_THRHOLD_CTRL);
(gdb) next
204 PCPMR_AUTO_POWERDOWN_ON_REMOVAL |
(gdb) next
194 *(unsigned *)PEDR |= 0x02; // +5V on
(gdb) list
189 static int int_init = 0;
190 unsigned long new_state = 0;
191
192 // Initialize the controller
193 *(unsigned *)PEDDR |= 0x02; // +5V on
194 *(unsigned *)PEDR |= 0x02; // +5V on
195 *(unsigned *)PMPCON |= 0x0002; // +12V DC-DC
converter on
196 *(unsigned *)SYSCON1 |= SYSCON1_EXCKEN; // EXPCLK on
197 *(unsigned *)SYSCON2 |= SYSCON2_PCMCIA1; // PCMCIA Slot 1
on
198
(gdb) next
204 PCPMR_AUTO_POWERDOWN_ON_REMOVAL |
(gdb) list
199 // Disable byte swapping and notify when 2 slots in fifo are
ready
200 *(unsigned*)PCSICR &=
201 ~(PCSICR_ENDIAN_CONVERSION |
PCSICR_TRANSQUEUE_THRHOLD_CTRL);
202
203 *(unsigned*)PCPMR |= 0x3<<10 | // weak pull-up
204 PCPMR_AUTO_POWERDOWN_ON_REMOVAL |
205 PCPMR_AUTO_DISABLE_ON_REMOVAL |
206 PCPMR_STANDBY_DISABLE |
207 PCPMR_STANDBY_CARD_ACCESS |
208 PCPMR_PDREQ_GPIO_ENABLE |
(gdb) next
194 *(unsigned *)PEDR |= 0x02; // +5V on
(gdb) next
196 *(unsigned *)SYSCON1 |= SYSCON1_EXCKEN; // EXPCLK on
(gdb) next
195 *(unsigned *)PMPCON |= 0x0002; // +12V DC-DC
converter on
(gdb) next
196 *(unsigned *)SYSCON1 |= SYSCON1_EXCKEN; // EXPCLK on
(gdb) next
195 *(unsigned *)PMPCON |= 0x0002; // +12V DC-DC
converter on
(gdb) next
196 *(unsigned *)SYSCON1 |= SYSCON1_EXCKEN; // EXPCLK on
(gdb) next
189 static int int_init = 0;
(gdb) next
197 *(unsigned *)SYSCON2 |= SYSCON2_PCMCIA1; // PCMCIA Slot 1
on
(gdb) next
212
(gdb) list
207 PCPMR_STANDBY_CARD_ACCESS |
208 PCPMR_PDREQ_GPIO_ENABLE |
209 PCPMR_AUTO_IDLE;
210
211 *(unsigned*)PCCICR |= PCCICR_CARD_RESETOUTPUT_ENABLE;
212
213 cyg_thread_delay (5);
214
215 new_state = *(unsigned*)PCCIILR;
216
(gdb) next
198
(gdb) next
197 *(unsigned *)SYSCON2 |= SYSCON2_PCMCIA1; // PCMCIA Slot 1
on
(gdb) next
198
(gdb) next
212
(gdb) next
201 ~(PCSICR_ENDIAN_CONVERSION |
PCSICR_TRANSQUEUE_THRHOLD_CTRL);
(gdb) next
214
(gdb) next
204 PCPMR_AUTO_POWERDOWN_ON_REMOVAL |
(gdb) next
201 ~(PCSICR_ENDIAN_CONVERSION |
PCSICR_TRANSQUEUE_THRHOLD_CTRL);
(gdb) next
204 PCPMR_AUTO_POWERDOWN_ON_REMOVAL |
(gdb) next
212
(gdb) next
204 PCPMR_AUTO_POWERDOWN_ON_REMOVAL |
(gdb) next
212
(gdb) next
Trenton D. Adams
Extreme Engineering
#17, 6025 - 12 St. SE
Calgary, Alberta, Canada
T2H 2K1
Phone: 403 640 9494 ext-208
Fax: 403 640 9599
http://www.extremeeng.com