Skip to content

Commit

Permalink
mv64361: Add dummy gigabit ethernet PHY access registers
Browse files Browse the repository at this point in the history
We don't emulate the gigabit ethernet part of the chip but the MorphOS
driver accesses these and expects to get some valid looking result
otherwise it hangs. Add some minimal dummy implementation to avoid rhis.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Acked-by: Cédric Le Goater <clg@kaod.org>
Message-ID: <20230605215145.29458746335@zero.eik.bme.hu>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
  • Loading branch information
zbalaton authored and danielhb committed Jul 7, 2023
1 parent 28eafc1 commit 32be62a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions hw/pci-host/mv64361.c
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,12 @@ static uint64_t mv64361_read(void *opaque, hwaddr addr, unsigned int size)
}
}
break;
case MV64340_ETH_PHY_ADDR:
ret = 0x98;
break;
case MV64340_ETH_SMI:
ret = BIT(27);
break;
case MV64340_CUNIT_ARBITER_CONTROL_REG:
ret = 0x11ff0000 | (s->gpp_int_level << 10);
break;
Expand Down
3 changes: 3 additions & 0 deletions hw/pci-host/mv643xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,9 @@
/* Ethernet Unit Registers */
/****************************************/

#define MV64340_ETH_PHY_ADDR 0x2000
#define MV64340_ETH_SMI 0x2004

/*******************************************/
/* CUNIT Registers */
/*******************************************/
Expand Down

0 comments on commit 32be62a

Please sign in to comment.