~ubuntu-branches/ubuntu/quantal/linux-linaro-mx51/quantal

« back to all changes in this revision

Viewing changes to arch/mips/lantiq/xway/prom-ase.c

  • Committer: Package Import Robot
  • Author(s): John Rigby, John Rigby
  • Date: 2011-09-26 10:44:23 UTC
  • Revision ID: package-import@ubuntu.com-20110926104423-3o58a3c1bj7x00rs
Tags: 3.0.0-1007.9
[ John Rigby ]

Enable crypto modules and remove crypto-modules from
exclude-module files
LP: #826021

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
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.
 
5
 *
 
6
 *  Copyright (C) 2010 John Crispin <blogic@openwrt.org>
 
7
 */
 
8
 
 
9
#include <linux/module.h>
 
10
#include <linux/clk.h>
 
11
#include <asm/bootinfo.h>
 
12
#include <asm/time.h>
 
13
 
 
14
#include <lantiq_soc.h>
 
15
 
 
16
#include "../prom.h"
 
17
 
 
18
#define SOC_AMAZON_SE   "Amazon_SE"
 
19
 
 
20
#define PART_SHIFT      12
 
21
#define PART_MASK       0x0FFFFFFF
 
22
#define REV_SHIFT       28
 
23
#define REV_MASK        0xF0000000
 
24
 
 
25
void __init ltq_soc_detect(struct ltq_soc_info *i)
 
26
{
 
27
        i->partnum = (ltq_r32(LTQ_MPS_CHIPID) & PART_MASK) >> PART_SHIFT;
 
28
        i->rev = (ltq_r32(LTQ_MPS_CHIPID) & REV_MASK) >> REV_SHIFT;
 
29
        switch (i->partnum) {
 
30
        case SOC_ID_AMAZON_SE:
 
31
                i->name = SOC_AMAZON_SE;
 
32
                i->type = SOC_TYPE_AMAZON_SE;
 
33
                break;
 
34
 
 
35
        default:
 
36
                unreachable();
 
37
                break;
 
38
        }
 
39
}