Path: blob/master/arch/mips/lantiq/xway/prom-ase.c
10818 views
/*1* This program is free software; you can redistribute it and/or modify it2* under the terms of the GNU General Public License version 2 as published3* by the Free Software Foundation.4*5* Copyright (C) 2010 John Crispin <[email protected]>6*/78#include <linux/module.h>9#include <linux/clk.h>10#include <asm/bootinfo.h>11#include <asm/time.h>1213#include <lantiq_soc.h>1415#include "../prom.h"1617#define SOC_AMAZON_SE "Amazon_SE"1819#define PART_SHIFT 1220#define PART_MASK 0x0FFFFFFF21#define REV_SHIFT 2822#define REV_MASK 0xF00000002324void __init ltq_soc_detect(struct ltq_soc_info *i)25{26i->partnum = (ltq_r32(LTQ_MPS_CHIPID) & PART_MASK) >> PART_SHIFT;27i->rev = (ltq_r32(LTQ_MPS_CHIPID) & REV_MASK) >> REV_SHIFT;28switch (i->partnum) {29case SOC_ID_AMAZON_SE:30i->name = SOC_AMAZON_SE;31i->type = SOC_TYPE_AMAZON_SE;32break;3334default:35unreachable();36break;37}38}394041