Do the CONFIG_USBOTG define correctly

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12382 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jonathan Gordon 2007-02-18 04:57:28 +00:00
parent 00d249ab67
commit ac61951452
3 changed files with 11 additions and 7 deletions

View file

@ -95,11 +95,11 @@
#include "lcd-remote.h"
#endif
#if defined(CONFIG_USBOTG) && CONFIG_USBOTG == USBOTG_ISP1362
#if CONFIG_USBOTG == USBOTG_ISP1362
#include "isp1362.h"
#endif
#if defined(CONFIG_USBOTG) && CONFIG_USBOTG == USBOTG_M5636
#if CONFIG_USBOTG == USBOTG_M5636
#include "m5636.h"
#endif
@ -350,9 +350,9 @@ static void init(void)
adc_init();
usb_init();
#if defined(CONFIG_USBOTG) && CONFIG_USBOTG == USBOTG_ISP1362
#if CONFIG_USBOTG == USBOTG_ISP1362
isp1362_init();
#elif defined(CONFIG_USBOTG) && CONFIG_USBOTG == USBOTG_M5636
#elif CONFIG_USBOTG == USBOTG_M5636
m5636_init();
#endif

View file

@ -222,6 +222,10 @@
#define CONFIG_TUNER 0
#endif
#ifndef CONFIG_USBOTG
#define CONFIG_USBOTG 0
#endif
/* Enable the directory cache and tagcache in RAM if we have
* plenty of RAM. Both features can be enabled independently. */
#if ((defined(MEMORYSIZE) && (MEMORYSIZE > 8)) || MEM > 8) && \

View file

@ -85,7 +85,7 @@ void set_cpu_frequency(long frequency)
PLLCR = 0x018ae025 | (PLLCR & 0x70400000);
CSCR0 = 0x00001180; /* Flash: 4 wait states */
CSCR1 = 0x00001580; /* LCD: 5 wait states */
#if defined(CONFIG_USBOTG) && CONFIG_USBOTG == USBOTG_ISP1362
#if CONFIG_USBOTG == USBOTG_ISP1362
CSCR3 = 0x00002180; /* USBOTG: 8 wait states */
#endif
while(!(PLLCR & 0x80000000)) {}; /* Wait until the PLL has locked.
@ -112,7 +112,7 @@ void set_cpu_frequency(long frequency)
PLLCR = 0x038be025 | (PLLCR & 0x70400000);
CSCR0 = 0x00000580; /* Flash: 1 wait state */
CSCR1 = 0x00000180; /* LCD: 0 wait states */
#if defined(CONFIG_USBOTG) && CONFIG_USBOTG == USBOTG_ISP1362
#if CONFIG_USBOTG == USBOTG_ISP1362
CSCR3 = 0x00000580; /* USBOTG: 1 wait state */
#endif
while(!(PLLCR & 0x80000000)) {}; /* Wait until the PLL has locked.
@ -139,7 +139,7 @@ void set_cpu_frequency(long frequency)
PLLCR = 0x00800200 | (PLLCR & 0x70400000);
CSCR0 = 0x00000180; /* Flash: 0 wait states */
CSCR1 = 0x00000180; /* LCD: 0 wait states */
#if defined(CONFIG_USBOTG) && CONFIG_USBOTG == USBOTG_ISP1362
#if CONFIG_USBOTG == USBOTG_ISP1362
CSCR3 = 0x00000180; /* USBOTG: 0 wait states */
#endif
DCR = (0x8000 | DEFAULT_REFRESH_TIMER); /* Refresh timer */