diff options
author | stefano babic <sbabic@denx.de> | 2007-08-30 23:01:49 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2007-09-07 01:06:19 +0200 |
commit | 5e5803e119de3bebd76fc9a57baac0b5aeccc8a3 (patch) | |
tree | dcdeb0a116eda5af5cd878054c509d1cf535a6a1 /drivers | |
parent | 80172c6181c912fbb34ea3ba0c22b232b419b47f (diff) |
PXA270: Added support for TrizepsIV board.
This patch add support for the Trizeps IV module (520Mhz).
Signed-off-by: Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/dm9000x.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/dm9000x.c b/drivers/dm9000x.c index e0d531bd917..6131b5c3570 100644 --- a/drivers/dm9000x.c +++ b/drivers/dm9000x.c @@ -99,7 +99,7 @@ void eth_halt(void); static int dm9000_probe(void); static u16 phy_read(int); static void phy_write(int, u16); -static u16 read_srom_word(int); +u16 read_srom_word(int); static u8 DM9000_ior(int); static void DM9000_iow(int reg, u8 value); @@ -537,7 +537,7 @@ eth_rx(void) /* Read a word data from SROM */ -static u16 +u16 read_srom_word(int offset) { DM9000_iow(DM9000_EPAR, offset); @@ -547,6 +547,18 @@ read_srom_word(int offset) return (DM9000_ior(DM9000_EPDRL) + (DM9000_ior(DM9000_EPDRH) << 8)); } +void +write_srom_word(int offset, u16 val) +{ + DM9000_iow(DM9000_EPAR, offset); + DM9000_iow(DM9000_EPDRH, ((val >> 8) & 0xff)); + DM9000_iow(DM9000_EPDRL, (val & 0xff)); + DM9000_iow(DM9000_EPCR, 0x12); + udelay(8000); + DM9000_iow(DM9000_EPCR, 0); +} + + /* Read a byte from I/O port */ |