Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 191731
b: refs/heads/master
c: 99e6a23
h: refs/heads/master
i:
  191729: d8e464b
  191727: 462a619
v: v3
  • Loading branch information
Mika Westerberg authored and Russell King committed Apr 14, 2010
1 parent 91878a4 commit 83e5e5f
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b370e082e7c4bd47195b2ec117ceeadd9286d8c0
refs/heads/master: 99e6a23adfadc2da2006f3715c4332c3bf502c07
14 changes: 14 additions & 0 deletions trunk/arch/arm/mach-ep93xx/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,20 @@ void ep93xx_devcfg_set_clear(unsigned int set_bits, unsigned int clear_bits)
}
EXPORT_SYMBOL(ep93xx_devcfg_set_clear);

/**
* ep93xx_chip_revision() - returns the EP93xx chip revision
*
* See <mach/platform.h> for more information.
*/
unsigned int ep93xx_chip_revision(void)
{
unsigned int v;

v = __raw_readl(EP93XX_SYSCON_SYSCFG);
v &= EP93XX_SYSCON_SYSCFG_REV_MASK;
v >>= EP93XX_SYSCON_SYSCFG_REV_SHIFT;
return v;
}

/*************************************************************************
* EP93xx peripheral handling
Expand Down
8 changes: 8 additions & 0 deletions trunk/arch/arm/mach-ep93xx/include/mach/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ static inline void ep93xx_devcfg_clear_bits(unsigned int bits)
ep93xx_devcfg_set_clear(0x00, bits);
}

#define EP93XX_CHIP_REV_D0 3
#define EP93XX_CHIP_REV_D1 4
#define EP93XX_CHIP_REV_E0 5
#define EP93XX_CHIP_REV_E1 6
#define EP93XX_CHIP_REV_E2 7

unsigned int ep93xx_chip_revision(void);

void ep93xx_register_eth(struct ep93xx_eth_data *data, int copy_addr);
void ep93xx_register_i2c(struct i2c_gpio_platform_data *data,
struct i2c_board_info *devices, int num);
Expand Down

0 comments on commit 83e5e5f

Please sign in to comment.