]> pilppa.org Git - linux-2.6-omap-h63xx.git/blob - arch/arm/mach-omap2/sdrc.h
Merge omap-upstream
[linux-2.6-omap-h63xx.git] / arch / arm / mach-omap2 / sdrc.h
1 #ifndef __ARCH_ARM_MACH_OMAP2_SDRC_H
2 #define __ARCH_ARM_MACH_OMAP2_SDRC_H
3
4 /*
5  * OMAP2 SDRC register definitions
6  *
7  * Copyright (C) 2007 Texas Instruments, Inc.
8  * Copyright (C) 2007 Nokia Corporation
9  *
10  * Written by Paul Walmsley
11  *
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License version 2 as
14  * published by the Free Software Foundation.
15  */
16
17 #include <linux/kernel.h>
18 #include <asm/arch/io.h>
19
20
21 #define OMAP_SDRC_REGADDR(reg)  (void __iomem *)IO_ADDRESS(OMAP2_SDRC_BASE + reg)
22
23 /* SDRC register offsets - read/write with sdrc_{read,write}_reg() */
24
25 #define SDRC_SYSCONFIG          0x010
26 #define SDRC_DLLA_CTRL          0x060
27 #define SDRC_DLLA_STATUS        0x064
28 #define SDRC_DLLB_CTRL          0x068
29 #define SDRC_DLLB_STATUS        0x06C
30 #define SDRC_POWER              0x070
31 #define SDRC_MR_0               0x084
32
33
34 /* SDRC global register get/set */
35
36 static void __attribute__((unused)) sdrc_write_reg(u32 val, u16 reg)
37 {
38         pr_debug("sdrc_write_reg: writing 0x%0x to 0x%0x\n", val,
39                  (u32)OMAP_SDRC_REGADDR(reg));
40
41         __raw_writel(val, OMAP_SDRC_REGADDR(reg));
42 }
43
44 static u32 __attribute__((unused)) sdrc_read_reg(u16 reg)
45 {
46         return __raw_readl(OMAP_SDRC_REGADDR(reg));
47 }
48
49 #endif