From 55d308bc948d6a475c3b7c689099add504567a35 Mon Sep 17 00:00:00 2001 From: "Jayachandran C." Date: Tue, 31 Aug 2010 04:18:47 +0000 Subject: [PATCH] Add the workaround for 4xx lite boards after it was lost in the last board.c update. --- sys/mips/rmi/board.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/sys/mips/rmi/board.c b/sys/mips/rmi/board.c index ea5f3c9c4f2a..26658a5cc0db 100644 --- a/sys/mips/rmi/board.c +++ b/sys/mips/rmi/board.c @@ -188,6 +188,23 @@ xls_board_specific_overrides(struct xlr_board_info* board) blk1->gmac_port[1].mdint_id = 0; blk1->gmac_port[2].mdint_id = 0; blk1->gmac_port[3].mdint_id = 0; + + /* If we have a 4xx lite chip, don't enable the + * GMACs which are disabled in hardware */ + if (xlr_is_xls4xx_lite()) { + xlr_reg_t *mmio = xlr_io_mmio(XLR_IO_GPIO_OFFSET); + uint32_t tmp; + + /* Port 6 & 7 are not enabled on the condor 4xx, figure + * this out from the GPIO fuse bank */ + tmp = xlr_read_reg(mmio, 35); + if ((tmp & (3 << 28)) != 0) { + blk1->enabled = 0x3; + blk1->gmac_port[2].valid = 0; + blk1->gmac_port[3].valid = 0; + blk1->num_ports = 2; + } + } break; case RMI_XLR_BOARD_ARIZONA_VIII: