1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
/**
* header for onedram driver
*
* Copyright (C) 2010 Samsung Electronics. All rights reserved.
*
* 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.
*
* 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, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
#ifndef __ONEDRAM_H__
#define __ONEDRAM_H__
#include <linux/ioport.h>
#include <linux/types.h>
struct onedram_platform_data {
void (*cfg_gpio)(void);
};
extern int onedram_register_handler(void (*handler)(u32, void *), void *data);
extern int onedram_unregister_handler(void (*handler)(u32, void *));
extern struct resource* onedram_request_region(resource_size_t start,
resource_size_t size, const char *name);
extern void onedram_release_region(resource_size_t start,
resource_size_t size);
extern int onedram_read_mailbox(u32 *);
extern int onedram_write_mailbox(u32);
extern int onedram_get_auth(u32 cmd);
extern int onedram_put_auth(int release);
extern int onedram_rel_sem(void);
extern int onedram_read_sem(void);
extern void onedram_get_vbase(void **);
#define ONEDRAM_GET_AUTH _IOW('o', 0x20, u32)
#define ONEDRAM_PUT_AUTH _IO('o', 0x21)
#define ONEDRAM_REL_SEM _IO('o', 0x22)
#endif /* __ONEDRAM_H__ */
|