Writing random ASCII character in general is not a good idea.
Now I write a space/backspace combination which at least does
not set my shell to 'garbage output mode'.
The whole thing is suboptimal as we don't want USB set-up code
in the kernel and we don't want to do waiting using printf.
We should really re-write those wait functions to use deferred events...
#define USB_DELAY_RECOVERY 10\r
\r
#define USB_WAIT(ms) \\r
- for (uint32_t wait_i = 0; wait_i < 4*(ms); wait_i++) {printf("%c", 0xE);};\r
+ for (uint32_t wait_i = 0; wait_i < 2*(ms); wait_i++) { printf("%c", 0x20); printf("%c", 0x08); };\r
\r
\r
/*\r
&sysctrl_padconf_core_base, gpio62_mux);
/* delay to give the hardware time to reset TODO: propper delay*/
- for (int j = 0; j < 4000; j++) {
- printf("%c", 0xE);
+ for (int j = 0; j < 2000; j++) {
+ printf("%c", 0x20);
+ printf("%c", 0x08);
}
hsusb_init();
/* enable the USB HUB */
omap44xx_gpio_setdataout_wr(&gpio_2_base, (1UL << HSUSB_HUB_RESET));
- for (int j = 0; j < 4000; j++) {
- printf("%c", 0xE);
+ for (int j = 0; j < 2000; j++) {
+ printf("%c", 0x20);
+ printf("%c", 0x08);
}
printf(" > performing softreset on the USB PHY\n");
/* wait till the request is done */
while (*((volatile uint32_t*) (tmp + 0x00A4)) & (1 << 31)) {
- printf("%c", 0xE);
-
}
/* compare the result */
/* wait till request is done */
while (*((volatile uint32_t*) (tmp + 0x00A4)) & (1 << 31)) {
- printf("%c", 0xE);
}
/* compare the values */