diff options
author | Srikant Patnaik | 2015-01-11 12:28:04 +0530 |
---|---|---|
committer | Srikant Patnaik | 2015-01-11 12:28:04 +0530 |
commit | 871480933a1c28f8a9fed4c4d34d06c439a7a422 (patch) | |
tree | 8718f573808810c2a1e8cb8fb6ac469093ca2784 /ANDROID_3.4.5/arch/arm/mach-wmt/pm_cpai.c | |
parent | 9d40ac5867b9aefe0722bc1f110b965ff294d30d (diff) | |
download | FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.tar.gz FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.tar.bz2 FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.zip |
Moved, renamed, and deleted files
The original directory structure was scattered and unorganized.
Changes are basically to make it look like kernel structure.
Diffstat (limited to 'ANDROID_3.4.5/arch/arm/mach-wmt/pm_cpai.c')
-rwxr-xr-x | ANDROID_3.4.5/arch/arm/mach-wmt/pm_cpai.c | 165 |
1 files changed, 0 insertions, 165 deletions
diff --git a/ANDROID_3.4.5/arch/arm/mach-wmt/pm_cpai.c b/ANDROID_3.4.5/arch/arm/mach-wmt/pm_cpai.c deleted file mode 100755 index e2576aa4..00000000 --- a/ANDROID_3.4.5/arch/arm/mach-wmt/pm_cpai.c +++ /dev/null @@ -1,165 +0,0 @@ -/*++ -linux/arch/arm/mach-wmt/board.c - -Copyright (c) 2012 WonderMedia Technologies, Inc. - -This program is free software: you can redistribute it and/or modify it under the -terms of the GNU General Public License as published by the Free Software Foundation, -either version 2 of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. See the GNU General Public License for more details. -You should have received a copy of the GNU General Public License along with -this program. If not, see <http://www.gnu.org/licenses/>. - -WonderMedia Technologies, Inc. -10F, 529, Chung-Cheng Road, Hsin-Tien, Taipei 231, R.O.C. ---*/ -#define fail -1 -#include <mach/hardware.h> -#include <mach/irqs.h> -#include <linux/sysctl.h> - -extern unsigned int wmt_i2c0_speed_mode; -extern unsigned int wmt_i2c1_speed_mode; - -#if 0 -static int PM_USB_PostSuspend(void) -{ - return 0; -} - - -static int PM_USB_PreResume(void) -{ - unsigned int tmp32; - unsigned char tmp8; - - /* EHCI PCI configuration seting */ - /* set bus master */ - *(volatile unsigned char*) 0xd8007804 = 0x17; - tmp8 = *(volatile unsigned char*) 0xd8007804; - if (tmp8 != 0x17) { - printk("PM_USB_init : 0xd8007104 = %02x\n", tmp8); - return fail; - } - - /* set interrupt line */ - *(volatile unsigned char*) 0xd800783c = 0x2b; - tmp8 = *(volatile unsigned char*) 0xd800783c; - if (tmp8 != 0x2b) { - printk("PM_USB_init : 0xd800713c = %02x\n", tmp8); - return fail; - } - - /* enable AHB master cut data to 16/8/4 DW align */ - tmp32 = *(volatile unsigned char*) 0xd800784c; - tmp32 &= 0xfffdffff; - *(volatile unsigned char*) 0xd800784c = tmp32; - tmp32 = *(volatile unsigned char*) 0xd800784c; - if ((tmp32&0x00020000) != 0x00000000) - printk("[EHCI] Programming EHCI PCI Configuration Offset Address : 4ch fail! \n"); - - - /* UHCI PCI configuration setting */ - /* set bus master */ - *(volatile unsigned char*) 0xd8007a04 = 0x07; - tmp8 = *(volatile unsigned char*) 0xd8007a04; - if (tmp8 != 0x07) { - printk("PM_USB_init : 0xd8007304 = %02x\n", tmp8); - return fail; - } - - /* set interrupt line */ - *(volatile unsigned char*) 0xd8007a3c = 0x2b; - tmp8 = *(volatile unsigned char*) 0xd8007a3c; - if (tmp8 != 0x2b) { - printk("PM_USB_init : 0xd800733c = %02x\n", tmp8); - return fail; - } - - return 0; -} -#endif - -#if 0 -static char MACVeeRom[32] = {0xFF}; -static void PM_MAC_PreResume(void) -{ - int i = 0; - *((volatile unsigned char*)0xd8004104) = 0x4; - - /* restore VEE */ - for (i = 0; i < 8; i++) - *(volatile unsigned long *)(0xd800415C + i*4) = *((int *)MACVeeRom + i); - - /* reload VEE */ - *(volatile unsigned char*)0xd800417C |= 0x01; - - /* reload */ - *(volatile unsigned char*)0xd8004074 |= 0xa0; - - /* check reload VEE complete */ - while ((*(volatile unsigned char*)0xd800417C & 0x02) != 0x02); - - return; -} -static void PM_MAC_PostSuspend(void) -{ - int i = 0; - - /*save VEE*/ - for (i = 0; i < 32; i++) - MACVeeRom[i] = *((volatile unsigned char*)0xd800415C + i); - - return; -} -#endif - - -inline unsigned int wmt_read_oscr(void); -static u32 cyc_mark = 0; -#define PRIVATE_TIMER_CTRL (MPCORE_PRIVATE_MEM + 0x600) -#define PRIVATE_TIMER_INTSTAT (MPCORE_PRIVATE_MEM + 0x60C) -#define GIC_PEN_CLR (0xFE019280) - -static void wmt_timer_postsuspend(void) -{ - cyc_mark = wmt_read_oscr(); - if (REG32_VAL(PRIVATE_TIMER_INTSTAT)) { - REG32_VAL(PRIVATE_TIMER_INTSTAT) = 0x1; - REG32_VAL(GIC_PEN_CLR) = 0x20000000; - } -} - -static void wmt_timer_preresume(void) -{ - // set saved counter value - OSCR_VAL = cyc_mark; -} - -int PM_device_PreResume(void) -{ - int result; - /* PM_MAC_PreResume(); */ - wmt_timer_preresume(); - - /* - result = PM_USB_PreResume(); - if (!result) - goto FAIL; - */ - - return 0; -/* FAIL: */ - return result; -} - - -int PM_device_PostSuspend(void) -{ - /* PM_MAC_PostSuspend(); */ - wmt_timer_postsuspend(); - return 0; -} |