M467: Fix EMAC compile error with IAR

pull/15337/head
Chun-Chieh Li 2022-03-08 14:13:00 +08:00
parent 679c747ba0
commit ec2c15533e
2 changed files with 4 additions and 4 deletions

View File

@ -52,14 +52,14 @@ void plat_delay(uint32_t delay)
static void mdio_write(int addr, int reg, int data) static void mdio_write(int addr, int reg, int data)
{ {
synopGMACdevice *gmacdev = &GMACdev[NU_M460_INTF]; synopGMACdevice *gmacdev = &GMACdev[NU_M460_INTF];
synopGMAC_write_phy_reg(gmacdev->MacBase, addr, reg, data); synopGMAC_write_phy_reg((u32 *) gmacdev->MacBase, addr, reg, data);
} }
static int mdio_read(int addr, int reg) static int mdio_read(int addr, int reg)
{ {
synopGMACdevice *gmacdev = &GMACdev[NU_M460_INTF]; synopGMACdevice *gmacdev = &GMACdev[NU_M460_INTF];
uint16_t data; uint16_t data;
synopGMAC_read_phy_reg(gmacdev->MacBase, addr, reg, &data); synopGMAC_read_phy_reg((u32 *) gmacdev->MacBase, addr, reg, &data);
return data; return data;
} }
@ -554,7 +554,7 @@ uint8_t *numaker_eth_get_tx_buf(void)
return (NULL); return (NULL);
} else { } else {
dump_desc(txdesc); dump_desc(txdesc);
return (txdesc->buffer1); return (uint8_t *) (txdesc->buffer1);
} }
} }

View File

@ -493,7 +493,7 @@ s32 synop_handle_received_data(int intf, u8 **buf) // Chris, to get RX buff
#endif #endif
} }
#else #else
*buf = (u32)((u64)dma_addr1); *buf = (u8 *)(u32)((u64)dma_addr1);
#endif #endif
rb->rdy = 1; rb->rdy = 1;
rb->len = len; rb->len = len;