summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorWenyou Yang <wenyou.yang@atmel.com>2016-06-08 12:15:10 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-06-07 22:19:59 -0700
commit7150bc9b4d43471fa37b26f5839892d4cf1fe09b (patch)
treef5b75ed7bd53693c71578e8ade5f3ae9511a460e /include
parent62c32e4641e7c5f6e0cad72bea0c8645c33d51b6 (diff)
usb: ohci-at91: Forcibly suspend ports while USB suspend
In order to the save power consumption, as a workaround, suspend forcibly the USB PORTA/B/C via set the SUSPEND_A/B/C bits of OHCI Interrupt Configuration Register in the SFRs while OHCI USB suspend. This suspend operation must be done before the USB clock is disabled, resume after the USB clock is enabled. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/soc/at91/at91_sfr.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/include/soc/at91/at91_sfr.h b/include/soc/at91/at91_sfr.h
new file mode 100644
index 000000000000..04a3a1eee22e
--- /dev/null
+++ b/include/soc/at91/at91_sfr.h
@@ -0,0 +1,29 @@
+/*
+ * Header file for the Atmel DDR/SDR SDRAM Controller
+ *
+ * Copyright (C) 2016 Atmel Corporation
+ *
+ * Author: Wenyou Yang <wenyou.yang@atmel.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+#ifndef __AT91_SFR_H__
+#define __AT91_SFR_H__
+
+#define SFR_DDRCFG 0x04 /* DDR Configuration Register */
+/* 0x08 ~ 0x0c: Reserved */
+#define SFR_OHCIICR 0x10 /* OHCI Interrupt Configuration Register */
+#define SFR_OHCIISR 0x14 /* OHCI Interrupt Status Register */
+
+#define SFR_OHCIICR_SUSPEND_A BIT(8)
+#define SFR_OHCIICR_SUSPEND_B BIT(9)
+#define SFR_OHCIICR_SUSPEND_C BIT(10)
+
+#define SFR_OHCIICR_USB_SUSPEND (SFR_OHCIICR_SUSPEND_A | \
+ SFR_OHCIICR_SUSPEND_B | \
+ SFR_OHCIICR_SUSPEND_C)
+
+#endif