summaryrefslogtreecommitdiff
path: root/cpu
diff options
context:
space:
mode:
Diffstat (limited to 'cpu')
-rw-r--r--cpu/mpc5xxx/ide.c24
-rw-r--r--cpu/mpc5xxx/usb_ohci.c8
2 files changed, 11 insertions, 21 deletions
diff --git a/cpu/mpc5xxx/ide.c b/cpu/mpc5xxx/ide.c
index 05eb8bc..4718869 100644
--- a/cpu/mpc5xxx/ide.c
+++ b/cpu/mpc5xxx/ide.c
@@ -29,7 +29,9 @@
#define CALC_TIMING(t) (t + period - 1) / period
-#define GPIO_PSC1_4 0x01000000ul
+#ifdef CONFIG_IDE_RESET
+extern void init_ide_reset (void);
+#endif
int ide_preinit (void)
{
@@ -70,24 +72,10 @@ int ide_preinit (void)
*(vu_long *) MPC5XXX_ATA_PIO2 = reg;
-#if defined (CONFIG_ICECUBE) && defined (CONFIG_IDE_RESET)
- /* Configure PSC1_4 as GPIO output for ATA reset */
- *(vu_long *) MPC5XXX_WU_GPIO_DATA |= GPIO_PSC1_4;
- *(vu_long *) MPC5XXX_WU_GPIO_ENABLE |= GPIO_PSC1_4;
- *(vu_long *) MPC5XXX_WU_GPIO_DIR |= GPIO_PSC1_4;
-#endif /* defined (CONFIG_ICECUBE) && defined (CONFIG_IDE_RESET) */
+#ifdef CONFIG_IDE_RESET
+ init_ide_reset ();
+#endif /* CONFIG_IDE_RESET */
return (0);
}
-
-#if defined (CONFIG_ICECUBE) && defined (CONFIG_IDE_RESET)
-void ide_set_reset (int idereset)
-{
- if (idereset) {
- *(vu_long *) MPC5XXX_WU_GPIO_DATA &= ~GPIO_PSC1_4;
- } else {
- *(vu_long *) MPC5XXX_WU_GPIO_DATA |= GPIO_PSC1_4;
- }
-}
-#endif /* defined (CONFIG_ICECUBE) && defined (CONFIG_IDE_RESET) */
#endif /* CFG_CMD_IDE */
diff --git a/cpu/mpc5xxx/usb_ohci.c b/cpu/mpc5xxx/usb_ohci.c
index 5fcb376..97ecb91 100644
--- a/cpu/mpc5xxx/usb_ohci.c
+++ b/cpu/mpc5xxx/usb_ohci.c
@@ -1532,10 +1532,12 @@ int usb_lowlevel_init(void)
{
/* Set the USB Clock */
- *(vu_long *)MPC5XXX_CDM_48_FDC = 0x0001bbbb;
- *(vu_long *)MPC5XXX_GPS_PORT_CONFIG &= ~0x00800000;
+ *(vu_long *)MPC5XXX_CDM_48_FDC = CONFIG_USB_CDMFDC5xxx;
+
+ /* remove all USB bits first before ORing in ours */
+ *(vu_long *)MPC5XXX_GPS_PORT_CONFIG &= ~0x00807000;
/* Activate USB port */
- *(vu_long *)MPC5XXX_GPS_PORT_CONFIG |= 0x00001000;
+ *(vu_long *)MPC5XXX_GPS_PORT_CONFIG |= CONFIG_USB_GPSCFG5xxx;
memset (&gohci, 0, sizeof (ohci_t));
memset (&urb_priv, 0, sizeof (urb_priv_t));