aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/lantiq/xway/prom-ase.c
diff options
context:
space:
mode:
authorNicholas Bellinger <nab@linux-iscsi.org>2011-06-23 20:20:51 +0000
committerNicholas Bellinger <nab@linux-iscsi.org>2011-06-23 20:20:51 +0000
commit74d83b7eedab14e4b963a2220ff76f98fa6d4cb8 (patch)
treeff4b10ebd9cf1a057c4b1a703732858a539faff7 /arch/mips/lantiq/xway/prom-ase.c
parent[SCSI] target: Convert TASK_ATTR to scsi_tcq.h definitions (diff)
parentLinux 3.0-rc4 (diff)
downloadlinux-dev-74d83b7eedab14e4b963a2220ff76f98fa6d4cb8.tar.xz
linux-dev-74d83b7eedab14e4b963a2220ff76f98fa6d4cb8.zip
Merge tag 'v3.0-rc4' of /pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-linus
Diffstat (limited to 'arch/mips/lantiq/xway/prom-ase.c')
-rw-r--r--arch/mips/lantiq/xway/prom-ase.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/arch/mips/lantiq/xway/prom-ase.c b/arch/mips/lantiq/xway/prom-ase.c
new file mode 100644
index 000000000000..abe49f4db57f
--- /dev/null
+++ b/arch/mips/lantiq/xway/prom-ase.c
@@ -0,0 +1,39 @@
+/*
+ * 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.
+ *
+ * Copyright (C) 2010 John Crispin <blogic@openwrt.org>
+ */
+
+#include <linux/module.h>
+#include <linux/clk.h>
+#include <asm/bootinfo.h>
+#include <asm/time.h>
+
+#include <lantiq_soc.h>
+
+#include "../prom.h"
+
+#define SOC_AMAZON_SE "Amazon_SE"
+
+#define PART_SHIFT 12
+#define PART_MASK 0x0FFFFFFF
+#define REV_SHIFT 28
+#define REV_MASK 0xF0000000
+
+void __init ltq_soc_detect(struct ltq_soc_info *i)
+{
+ i->partnum = (ltq_r32(LTQ_MPS_CHIPID) & PART_MASK) >> PART_SHIFT;
+ i->rev = (ltq_r32(LTQ_MPS_CHIPID) & REV_MASK) >> REV_SHIFT;
+ switch (i->partnum) {
+ case SOC_ID_AMAZON_SE:
+ i->name = SOC_AMAZON_SE;
+ i->type = SOC_TYPE_AMAZON_SE;
+ break;
+
+ default:
+ unreachable();
+ break;
+ }
+}