OSHW-DEIMOS/SOFTWARE/A64-TERES/linux-a64/drivers/soc/allwinner/pm/standby/standby.h
Dimitar Gamishev f9b0e7a283 linux
2017-10-13 14:07:04 +03:00

31 lines
930 B
C

#ifndef _STANDBY_H
#define _STANDBY_H
/*
* Copyright (c) 2011-2015 yanggq.young@allwinnertech.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.
*/
#include <linux/types.h>
#include <linux/power/aw_pm.h>
#include <linux/power/axp_depend.h>
#include "common.h"
#ifndef IO_ADDRESS
#define IO_ADDRESS(x) ((x) + 0xf0000000)
#endif
#define readb(addr) (*((volatile unsigned char *)(addr)))
#define readw(addr) (*((volatile unsigned short *)(addr)))
#define readl(addr) (*((volatile unsigned long *)(addr)))
#define writeb(v, addr) (*((volatile unsigned char *)(addr)) = (unsigned char)(v))
#define writew(v, addr) (*((volatile unsigned short *)(addr)) = (unsigned short)(v))
#define writel(v, addr) (*((volatile unsigned long *)(addr)) = (unsigned long)(v))
#endif /*_PM_H*/