11/*
2- * Copyright (c) 2016-2018 ARM Limited
2+ * Copyright (c) 2016-2019 Arm Limited
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
@@ -166,7 +166,6 @@ enum phy_reg_bctrl_reg_bits_t{
166166 * \brief TX Command A bit definitions
167167 *
168168 */
169-
170169#define TX_CMD_DATA_START_OFFSET_BYTES_POS 16U
171170#define TX_CMD_DATA_START_OFFSET_BYTES_MASK 0x1FU
172171
@@ -186,7 +185,19 @@ enum tx_command_a_bits_t{
186185 *
187186 */
188187enum rx_fifo_status_bits_t {
189- RX_FIFO_STATUS_ERROR_INDEX = 15U
188+ RX_FIFO_STATUS_CRC_ERROR_INDEX = 1U ,
189+ RX_FIFO_STATUS_DRIBBLING_BIT_INDEX = 2U ,
190+ RX_FIFO_STATUS_MII_ERROR_INDEX = 3U ,
191+ RX_FIFO_STATUS_REC_WD_TIMEOUT_INDEX = 4U ,
192+ RX_FIFO_STATUS_FRAME_TYPE_INDEX = 5U ,
193+ RX_FIFO_STATUS_COLLISION_SEEN_INDEX = 6U ,
194+ RX_FIFO_STATUS_FRAME_TOO_LONG_INDEX = 7U ,
195+ RX_FIFO_STATUS_MULTICAST_INDEX = 10U ,
196+ RX_FIFO_STATUS_RUNT_FRAME_INDEX = 11U ,
197+ RX_FIFO_STATUS_LENGTH_ERROR_INDEX = 12U ,
198+ RX_FIFO_STATUS_BROADCAST_FRAME_INDEX = 13U ,
199+ RX_FIFO_STATUS_ERROR_INDEX = 15U ,
200+ RX_FIFO_STATUS_FILTERING_FAIL_INDEX = 30U ,
190201};
191202#define RX_FIFO_STATUS_PKT_LENGTH_POS 16U
192203#define RX_FIFO_STATUS_PKT_LENGTH_MASK 0x3FFFU
@@ -299,7 +310,7 @@ static void fill_tx_fifo(const struct smsc9220_eth_dev_t* dev,
299310 data += remainder_bytes ;
300311
301312 while (size_bytes > 0 ) {
302- /* Keep the same endianness in data than in the temp variable */
313+ /* Keep the same endianness in data as in the temp variable */
303314 tx_data_port_tmp_ptr [0 ] = data [0 ];
304315 tx_data_port_tmp_ptr [1 ] = data [1 ];
305316 tx_data_port_tmp_ptr [2 ] = data [2 ];
@@ -323,7 +334,7 @@ static void empty_rx_fifo(const struct smsc9220_eth_dev_t* dev,
323334 size_bytes -= remainder_bytes ;
324335
325336 while (size_bytes > 0 ) {
326- /* Keep the same endianness in data than in the temp variable */
337+ /* Keep the same endianness in data as in the temp variable */
327338 rx_data_port_tmp = register_map -> rx_data_port ;
328339 data [0 ] = rx_data_port_tmp_ptr [0 ];
329340 data [1 ] = rx_data_port_tmp_ptr [1 ];
@@ -740,7 +751,6 @@ int smsc9220_check_id(const struct smsc9220_eth_dev_t* dev)
740751 return ((GET_BIT_FIELD (id , CHIP_ID_MASK , CHIP_ID_POS ) == CHIP_ID ) ? 0 : 1 );
741752}
742753
743-
744754void smsc9220_enable_interrupt (const struct smsc9220_eth_dev_t * dev ,
745755 enum smsc9220_interrupt_source source )
746756{
@@ -817,7 +827,6 @@ enum smsc9220_error_t smsc9220_read_mac_address(
817827 return SMSC9220_ERROR_PARAM ;
818828 }
819829
820- /* Read current mac address. */
821830 if (smsc9220_mac_regread (dev , SMSC9220_MAC_REG_OFFSET_ADDRH , & mac_high )) {
822831 return SMSC9220_ERROR_INTERNAL ;
823832 }
@@ -947,10 +956,7 @@ enum smsc9220_error_t smsc9220_send_by_chunks(
947956{
948957 struct smsc9220_eth_reg_map_t * register_map =
949958 (struct smsc9220_eth_reg_map_t * )dev -> cfg -> base ;
950-
951- /* signing this is the first segment of the packet to be sent */
952959 bool is_first_segment = false;
953- /* signing this is the last segment of the packet to be sent */
954960 bool is_last_segment = false;
955961 uint32_t txcmd_a , txcmd_b = 0 ;
956962 uint32_t tx_buffer_free_space = 0 ;
@@ -1029,7 +1035,6 @@ uint32_t smsc9220_get_rxfifo_data_used_space(const struct
10291035uint32_t smsc9220_receive_by_chunks (const struct smsc9220_eth_dev_t * dev ,
10301036 char * data , uint32_t dlen )
10311037{
1032-
10331038 uint32_t rxfifo_inf = 0 ;
10341039 uint32_t rxfifo_stat = 0 ;
10351040 uint32_t packet_length_byte = 0 ;
0 commit comments