1 #ifndef __ARCH_ARM_MACH_OMAP2_SDRC_H
2 #define __ARCH_ARM_MACH_OMAP2_SDRC_H
5 * OMAP2 SDRC register definitions
7 * Copyright (C) 2007 Texas Instruments, Inc.
8 * Copyright (C) 2007 Nokia Corporation
10 * Written by Paul Walmsley
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.
17 #include <linux/kernel.h>
18 #include <asm/arch/io.h>
21 #define OMAP_SDRC_REGADDR(reg) (void __iomem *)IO_ADDRESS(OMAP2_SDRC_BASE + reg)
23 /* SDRC register offsets - read/write with sdrc_{read,write}_reg() */
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
34 /* SDRC global register get/set */
36 static void __attribute__((unused)) sdrc_write_reg(u32 val, u16 reg)
38 pr_debug("sdrc_write_reg: writing 0x%0x to 0x%0x\n", val,
39 (u32)OMAP_SDRC_REGADDR(reg));
41 __raw_writel(val, OMAP_SDRC_REGADDR(reg));
44 static u32 __attribute__((unused)) sdrc_read_reg(u16 reg)
46 return __raw_readl(OMAP_SDRC_REGADDR(reg));