eth_read(void *opaque, target_phys_addr_t addr, unsigned int size)

{

	struct fs_eth *eth = opaque;

	uint32_t r = 0;



	addr >>= 2;



	switch (addr) {

		case R_STAT:

			r = eth->mdio_bus.mdio & 1;

			break;

	default:

		r = eth->regs[addr];

		D(printf ("%s %x\n", __func__, addr * 4));

		break;

	}

	return r;

}

eth_read(void *opaque, target_phys_addr_t addr, unsigned int size)

{

	struct fs_eth *eth = opaque;

	uint32_t r = 0;



	addr >>= 2;



	switch (addr) {

		case R_STAT:

			r = eth->mdio_bus.mdio & 1;

			break;

	default:

		r = eth->regs[addr];

		D(printf ("%s %x\n", __func__, addr * 4));

		break;

	}

	return r;

}

FUNC_0(void *VAR_0, target_phys_addr_t VAR_1, unsigned int VAR_2)

{

	struct fs_eth *VAR_3 = VAR_0;

	uint32_t r = 0;



	VAR_1 >>= 2;



	switch (VAR_1) {

		case R_STAT:

			r = VAR_3->mdio_bus.mdio & 1;

			break;

	default:

		r = VAR_3->regs[VAR_1];

		D(printf ("%s %x\n", __func__, VAR_1 * 4));

		break;

	}

	return r;

}

FUNC_0(void *VAR_0, target_phys_addr_t VAR_1, unsigned int VAR_2)
{ struct fs_eth *VAR_3 = VAR_0; uint32_t r = 0; VAR_1 >>= 2; switch (VAR_1) { case R_STAT:
r = VAR_3->mdio_bus.mdio & 1; break; default:
r = VAR_3->regs[VAR_1]; D(printf ("%s %x\n", __func__, VAR_1 * 4)); break; } return r; }