Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54050
b: refs/heads/master
c: 53b2e01
h: refs/heads/master
v: v3
  • Loading branch information
Vladimir Barinov authored and Russell King committed Apr 21, 2007
1 parent 23a38e3 commit cdc44ad
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 49 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 45fba0846f5a5a48ed3c394aa4f8ca93699e7655
refs/heads/master: 53b2e01be55f3c140e2704cf8d5f99ddba0ff823
31 changes: 31 additions & 0 deletions trunk/include/asm-arm/arch-ixp4xx/cpu.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* include/asm-arm/arch-ixp4xx/cpu.h
*
* IXP4XX cpu type detection
*
* Copyright (C) 2007 MontaVista Software, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/

#ifndef __ASM_ARCH_CPU_H__
#define __ASM_ARCH_CPU_H__

extern unsigned int processor_id;
/* Processor id value in CP15 Register 0 */
#define IXP425_PROCESSOR_ID_VALUE 0x690541c0
#define IXP435_PROCESSOR_ID_VALUE 0x69054040
#define IXP465_PROCESSOR_ID_VALUE 0x69054200
#define IXP4XX_PROCESSOR_ID_MASK 0xfffffff0

#define cpu_is_ixp42x() ((processor_id & IXP4XX_PROCESSOR_ID_MASK) == \
IXP425_PROCESSOR_ID_VALUE)
#define cpu_is_ixp43x() ((processor_id & IXP4XX_PROCESSOR_ID_MASK) == \
IXP435_PROCESSOR_ID_VALUE)
#define cpu_is_ixp46x() ((processor_id & IXP4XX_PROCESSOR_ID_MASK) == \
IXP465_PROCESSOR_ID_VALUE)

#endif /* _ASM_ARCH_CPU_H */
7 changes: 2 additions & 5 deletions trunk/include/asm-arm/arch-ixp4xx/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,8 @@

#define pcibios_assign_all_busses() 1

#if defined(CONFIG_CPU_IXP46X) && !defined(__ASSEMBLY__)
extern unsigned int processor_id;
#define cpu_is_ixp465() ((processor_id & 0xffffffc0) == 0x69054200)
#else
#define cpu_is_ixp465() (0)
#ifndef __ASSEMBLER__
#include <asm/arch/cpu.h>
#endif

/* Register locations and bits */
Expand Down
43 changes: 0 additions & 43 deletions trunk/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -607,47 +607,4 @@

#define DCMD_LENGTH 0x01fff /* length mask (max = 8K - 1) */

/* Processor id value in CP15 Register 0 */
#define IXP425_PROCESSOR_ID_VALUE 0x690541c0
#define IXP435_PROCESSOR_ID_VALUE 0x69054040
#define IXP465_PROCESSOR_ID_VALUE 0x69054200
#define IXP4XX_PROCESSOR_ID_MASK 0xfffffff0

#ifndef __ASSEMBLY__
static inline int cpu_is_ixp42x(void)
{
extern unsigned int processor_id;

if ((processor_id & IXP4XX_PROCESSOR_ID_MASK) ==
IXP425_PROCESSOR_ID_VALUE )
return 1;

return 0;
}

static inline int cpu_is_ixp43x(void)
{
#ifdef CONFIG_CPU_IXP43X
extern unsigned int processor_id;

if ((processor_id & IXP4XX_PROCESSOR_ID_MASK) ==
IXP435_PROCESSOR_ID_VALUE )
return 1;
#endif
return 0;
}

static inline int cpu_is_ixp46x(void)
{
#ifdef CONFIG_CPU_IXP46X
extern unsigned int processor_id;

if ((processor_id & IXP4XX_PROCESSOR_ID_MASK) ==
IXP465_PROCESSOR_ID_VALUE )
return 1;
#endif
return 0;
}
#endif

#endif

0 comments on commit cdc44ad

Please sign in to comment.