summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryemao <leafy.myeh@allwinnertech.com>2013-03-02 11:02:55 +0400
committershuge <shuge@allwinnertech.com>2013-03-02 11:02:55 +0400
commit3d9925b58e4362fcb8ce61a1e3be348c383c6047 (patch)
tree68ad4c80de9f73d0a36f98f30e64c461fb01f046
parent6804dfa98a1e810530620343f05a5dceea4f8aad (diff)
downloadlinux-sunxi-3d9925b58e4362fcb8ce61a1e3be348c383c6047.tar.xz
standby: fix normal standby serial pm driver
-rwxr-xr-xarch/arm/mach-sun6i/pm/mem_serial.c7
-rwxr-xr-xarch/arm/mach-sun6i/pm/mem_serial.h1
-rwxr-xr-xarch/arm/mach-sun6i/pm/standby/standby.c1
3 files changed, 8 insertions, 1 deletions
diff --git a/arch/arm/mach-sun6i/pm/mem_serial.c b/arch/arm/mach-sun6i/pm/mem_serial.c
index 2ad49d598a2d..b830e5297bca 100755
--- a/arch/arm/mach-sun6i/pm/mem_serial.c
+++ b/arch/arm/mach-sun6i/pm/mem_serial.c
@@ -121,7 +121,6 @@ __u32 serial_gets_nommu(char* buf, __u32 n)
void serial_init(void)
{
-
__u32 p2clk;
__u32 df;
__u32 lcr;
@@ -144,6 +143,12 @@ void serial_init(void)
for( i = 0; i < 100; i++ );
*reg |= (1 << (16 + port));
// config uart gpio
+ //de-assert uart reset
+ reg = (volatile unsigned int *)(CCU_UART_RESET_VA);
+ *reg &= ~(1 << (16 + port));
+ for( i = 0; i < 100; i++ );
+ *reg |= (1 << (16 + port));
+
// config tx gpio
//fpga not need care gpio config;
reg = (volatile unsigned int *)(0xf1c20800 + 0x104);
diff --git a/arch/arm/mach-sun6i/pm/mem_serial.h b/arch/arm/mach-sun6i/pm/mem_serial.h
index 34ae480a6a5d..a80ba7252c32 100755
--- a/arch/arm/mach-sun6i/pm/mem_serial.h
+++ b/arch/arm/mach-sun6i/pm/mem_serial.h
@@ -46,6 +46,7 @@
#define CCU_UART_RESET_PA (0x01c202D8)
#define CCU_UART_VA (0xF1c2006C)
+#define CCU_UART_RESET_VA (0xF1c202D8)
void serial_init(void);
__s32 serial_puts(const char *string);
diff --git a/arch/arm/mach-sun6i/pm/standby/standby.c b/arch/arm/mach-sun6i/pm/standby/standby.c
index 1d2f0636ada9..dfeffb619c98 100755
--- a/arch/arm/mach-sun6i/pm/standby/standby.c
+++ b/arch/arm/mach-sun6i/pm/standby/standby.c
@@ -71,6 +71,7 @@ int main(struct aw_pm_info *arg)
{
char *tmpPtr = (char *)&__bss_start;
+ serial_init();
if(!arg){
/* standby parameter is invalid */
return -1;