Changeset 10871


Ignore:
Timestamp:
11/11/08 18:43:02 (5 years ago)
Author:
BrainSlayer
Message:

enhance board detection

Location:
src/linux/ar531x/linux-2.6.23/arch/mips/atheros/ar5315
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/linux/ar531x/linux-2.6.23/arch/mips/atheros/ar5315/Makefile

    r8169 r10871  
    99# 
    1010 
    11 obj-y := board.o irq.o 
     11obj-y := board.o irq.o  
  • src/linux/ar531x/linux-2.6.23/arch/mips/atheros/ar5315/board.c

    r9404 r10871  
    2727#include <asm/irq.h> 
    2828#include <asm/io.h> 
    29 #include "../ar531x.h" 
     29#include "ar531x.h" 
    3030 
    3131static int is_5315 = 0; 
     
    196196        bcfg = (struct ar531x_boarddata *) board_config; 
    197197 
    198 #if 0 
    199         { 
    200         /* Detect the hardware based on the device ID */ 
    201         u32 devid = sysRegRead(AR5315_SREV) & AR5315_REV_MAJ >> AR5315_REV_MAJ_S; 
    202                 switch(devid) { 
    203                 case 0x9: 
    204                         mips_machtype = MACH_ATHEROS_AR2317; 
    205                         break; 
    206                 /* FIXME: how can we detect AR2316? */ 
    207                 case 0x8: 
    208                 default: 
    209                         mips_machtype = MACH_ATHEROS_AR2315; 
    210                         break; 
    211                 } 
    212         } 
    213 #endif 
    214198 
    215199        config = (struct ar531x_config *) kzalloc(sizeof(struct ar531x_config), GFP_KERNEL); 
     
    343327        add_memory_region(0, memsize, BOOT_MEM_RAM); 
    344328 
    345         /* Initialize it to AR2315 for now. Real detection will be done 
    346          * in ar5315_init_devices() */ 
    347         mips_machtype = MACH_ATHEROS_AR2315; 
     329        /* Detect the hardware based on the device ID */ 
     330        devid = sysRegRead(AR5315_SREV) & AR5315_REV_CHIP; 
     331        switch(devid) { 
     332                case 0x90: 
     333                case 0x91: 
     334                        mips_machtype = MACH_ATHEROS_AR2317; 
     335                        break; 
     336                default: 
     337                        mips_machtype = MACH_ATHEROS_AR2315; 
     338                        break; 
     339        } 
    348340} 
    349341 
  • src/linux/ar531x/linux-2.6.23/arch/mips/atheros/ar5315/irq.c

    r8224 r10871  
    2424#include <asm/irq_cpu.h> 
    2525#include <asm/io.h> 
    26 #include "../ar531x.h" 
     26#include "ar531x.h" 
    2727 
    2828static u32 gpiointmask = 0, gpiointval = 0; 
Note: See TracChangeset for help on using the changeset viewer.