b8bcc0292339f16be6245a64935db3b4a6e6ecee
[firefly-linux-kernel-4.4.55.git] / arch / arm / mach-rk2928 / pm.c
1 #include <linux/clk.h>
2 #include <linux/delay.h>
3 #include <linux/err.h>
4 #include <linux/kernel.h>
5 #include <linux/init.h>
6 #include <linux/pm.h>
7 #include <linux/suspend.h>
8 #include <linux/random.h>
9 #include <linux/crc32.h>
10 #include <linux/io.h>
11 #include <linux/wakelock.h>
12 #include <asm/cacheflush.h>
13 #include <asm/tlbflush.h>
14 #include <asm/hardware/cache-l2x0.h>
15 #include <asm/hardware/gic.h>
16
17 #include <mach/system.h>
18 #include <mach/sram.h>
19 #include <mach/gpio.h>
20
21 void __sramfunc sram_printch(char byte)
22 {
23 #ifdef DEBUG_UART_BASE
24         writel_relaxed(byte, DEBUG_UART_BASE);
25         dsb();
26
27         /* loop check LSR[6], Transmitter Empty bit */
28         while (!(readl_relaxed(DEBUG_UART_BASE + 0x14) & 0x40))
29                 barrier();
30
31         if (byte == '\n')
32                 sram_printch('\r');
33 #endif
34 }
35