| * 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/export.h> |
| #include <asm/bootinfo.h> |
| #define SOC_DANUBE "Danube" |
| #define SOC_TWINPASS "Twinpass" |
| #define PART_MASK 0x0FFFFFFF |
| #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; |
| i->type = SOC_TYPE_DANUBE; |
| i->type = SOC_TYPE_DANUBE; |