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/export.h>
10 #include <linux/clk.h>
11 #include <asm/bootinfo.h>
14 #include <lantiq_soc.h>
19 #define SOC_DANUBE "Danube"
20 #define SOC_TWINPASS "Twinpass"
21 #define SOC_AMAZON_SE "Amazon_SE"
27 #define PART_MASK 0x0FFFFFFF
29 #define REV_MASK 0xF0000000
32 void __init ltq_soc_detect(struct ltq_soc_info *i)
34 i->partnum = (ltq_r32(LTQ_MPS_CHIPID) & PART_MASK) >> PART_SHIFT;
35 i->rev = (ltq_r32(LTQ_MPS_CHIPID) & REV_MASK) >> REV_SHIFT;
36 sprintf(i->rev_type, "1.%d", i->rev);
41 i->type = SOC_TYPE_DANUBE;
45 i->name = SOC_TWINPASS;
46 i->type = SOC_TYPE_DANUBE;
54 i->type = SOC_TYPE_AR9;
60 i->type = SOC_TYPE_AR9;
63 case SOC_ID_AMAZON_SE_1:
64 case SOC_ID_AMAZON_SE_2:
65 i->name = SOC_AMAZON_SE;
66 i->type = SOC_TYPE_AMAZON_SE;
68 panic("ase is only supported for non pci kernels");
76 i->type = SOC_TYPE_VR9_1;
82 i->type = SOC_TYPE_VR9_1;
88 i->type = SOC_TYPE_VR9_2;
94 i->type = SOC_TYPE_VR9_2;
102 void __init ltq_soc_setup(void)
105 ltq_register_ase_asc();