summaryrefslogtreecommitdiffhomepage
path: root/contrib/userspace-nvram/sdinitvals.h
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2009-04-21 21:59:59 +0000
committerJo-Philipp Wich <jow@openwrt.org>2009-04-21 21:59:59 +0000
commit18193fa5e9790e5c48ac42bb99f7477be2aed7f9 (patch)
tree8ebeed64d6a23d1726f0411b7822f337974b8d6a /contrib/userspace-nvram/sdinitvals.h
parenta2b916ab736802050b19562b7c163e3f3bb1566f (diff)
contrib: add a userspace port of the Broadcom NVRAM kernel api, allows NVRAM manipulation on bcm47xx
Diffstat (limited to 'contrib/userspace-nvram/sdinitvals.h')
-rw-r--r--contrib/userspace-nvram/sdinitvals.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/contrib/userspace-nvram/sdinitvals.h b/contrib/userspace-nvram/sdinitvals.h
new file mode 100644
index 000000000..5a289adec
--- /dev/null
+++ b/contrib/userspace-nvram/sdinitvals.h
@@ -0,0 +1,30 @@
+/*
+ * SDRAM init values
+ *
+ * Copyright 2007, Broadcom Corporation
+ * Copyright 2009, OpenWrt.org
+ * All Rights Reserved.
+ *
+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
+ *
+ */
+
+#ifndef _sdinitvals_h_
+#define _sdinitvals_h_
+
+/* SDRAM refresh control (refresh) register bits */
+#define SDRAM_REF(p) (((p)&0xff) | SDRAM_REF_EN) /* Refresh period */
+#define SDRAM_REF_EN 0x8000 /* Writing 1 enables periodic refresh */
+
+/* SDRAM Core default Init values (OCP ID 0x803) */
+#define MEM4MX16X2 0x419 /* 16 MB */
+
+#define SDRAM_INIT MEM4MX16X2
+#define SDRAM_BURSTFULL 0x0000 /* Use full page bursts */
+#define SDRAM_CONFIG SDRAM_BURSTFULL
+#define SDRAM_REFRESH SDRAM_REF(0x40)
+
+#endif /* _sdinitvals_h_ */