2 * This program is free software; you can redistribute it and/or modify it
3 * under the terms of the GNU General Public License version 2 as published
4 * by the Free Software Foundation.
6 * Copyright (C) 2010 John Crispin <blogic@openwrt.org>
9 #include <linux/module.h>
10 #include <linux/clk.h>
11 #include <asm/bootinfo.h>
14 #include <lantiq_soc.h>
18 #define SOC_DANUBE "Danube"
19 #define SOC_TWINPASS "Twinpass"
23 #define PART_MASK 0x0FFFFFFF
25 #define REV_MASK 0xF0000000
27 void __init
ltq_soc_detect(struct ltq_soc_info
*i
)
29 i
->partnum
= (ltq_r32(LTQ_MPS_CHIPID
) & PART_MASK
) >> PART_SHIFT
;
30 i
->rev
= (ltq_r32(LTQ_MPS_CHIPID
) & REV_MASK
) >> REV_SHIFT
;
35 i
->type
= SOC_TYPE_DANUBE
;
39 i
->name
= SOC_TWINPASS
;
40 i
->type
= SOC_TYPE_DANUBE
;
47 i
->type
= SOC_TYPE_AR9
;