lwip_echo_server: Add support for A53
Add support for A53: - Add __aarch64__ in conditional compilation - Disable data cache as lwip is not working on A53 with caches enabled Signed-off-by: Harini Katakam <harinik@xilinx.com> Acked-by: Anirudha Sarangi <anirudh@xilinx.com>
This commit is contained in:
parent
243210232c
commit
1ec39318a8
6 changed files with 14 additions and 8 deletions
|
@ -35,7 +35,7 @@
|
||||||
|
|
||||||
#include "lwip/err.h"
|
#include "lwip/err.h"
|
||||||
#include "lwip/tcp.h"
|
#include "lwip/tcp.h"
|
||||||
#ifdef __arm__
|
#if defined (__arm__) || defined (__aarch64__)
|
||||||
#include "xil_printf.h"
|
#include "xil_printf.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
|
|
||||||
/***************************** Include Files *********************************/
|
/***************************** Include Files *********************************/
|
||||||
#include "xparameters.h"
|
#include "xparameters.h"
|
||||||
#ifdef __arm__
|
#if defined (__arm__) || defined(__aarch64__)
|
||||||
#if XPAR_GIGE_PCS_PMA_SGMII_CORE_PRESENT == 1 || \
|
#if XPAR_GIGE_PCS_PMA_SGMII_CORE_PRESENT == 1 || \
|
||||||
XPAR_GIGE_PCS_PMA_1000BASEX_CORE_PRESENT == 1
|
XPAR_GIGE_PCS_PMA_1000BASEX_CORE_PRESENT == 1
|
||||||
#include "xil_exception.h"
|
#include "xil_exception.h"
|
||||||
|
|
|
@ -38,11 +38,12 @@
|
||||||
|
|
||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
#include "platform_config.h"
|
#include "platform_config.h"
|
||||||
#ifdef __arm__
|
#if defined (__arm__) || defined(__aarch64__)
|
||||||
#include "xil_printf.h"
|
#include "xil_printf.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "lwip/tcp.h"
|
#include "lwip/tcp.h"
|
||||||
|
#include "xil_cache.h"
|
||||||
|
|
||||||
#if LWIP_DHCP==1
|
#if LWIP_DHCP==1
|
||||||
#include "lwip/dhcp.h"
|
#include "lwip/dhcp.h"
|
||||||
|
@ -85,7 +86,7 @@ print_ip_settings(struct ip_addr *ip, struct ip_addr *mask, struct ip_addr *gw)
|
||||||
print_ip("Gateway : ", gw);
|
print_ip("Gateway : ", gw);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __arm__
|
#if defined (__arm__) || defined(__aarch64__)
|
||||||
#if XPAR_GIGE_PCS_PMA_SGMII_CORE_PRESENT == 1 || XPAR_GIGE_PCS_PMA_1000BASEX_CORE_PRESENT == 1
|
#if XPAR_GIGE_PCS_PMA_SGMII_CORE_PRESENT == 1 || XPAR_GIGE_PCS_PMA_1000BASEX_CORE_PRESENT == 1
|
||||||
int ProgramSi5324(void);
|
int ProgramSi5324(void);
|
||||||
int ProgramSfpPhy(void);
|
int ProgramSfpPhy(void);
|
||||||
|
@ -93,6 +94,11 @@ int ProgramSfpPhy(void);
|
||||||
#endif
|
#endif
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#if __aarch64__
|
||||||
|
Xil_DCacheDisable();
|
||||||
|
#endif
|
||||||
|
|
||||||
struct ip_addr ipaddr, netmask, gw;
|
struct ip_addr ipaddr, netmask, gw;
|
||||||
|
|
||||||
/* the mac address of the board. this should be unique per board */
|
/* the mac address of the board. this should be unique per board */
|
||||||
|
@ -100,7 +106,7 @@ int main()
|
||||||
{ 0x00, 0x0a, 0x35, 0x00, 0x01, 0x02 };
|
{ 0x00, 0x0a, 0x35, 0x00, 0x01, 0x02 };
|
||||||
|
|
||||||
echo_netif = &server_netif;
|
echo_netif = &server_netif;
|
||||||
#ifdef __arm__
|
#if defined (__arm__) || defined(__aarch64__)
|
||||||
#if XPAR_GIGE_PCS_PMA_SGMII_CORE_PRESENT == 1 || XPAR_GIGE_PCS_PMA_1000BASEX_CORE_PRESENT == 1
|
#if XPAR_GIGE_PCS_PMA_SGMII_CORE_PRESENT == 1 || XPAR_GIGE_PCS_PMA_1000BASEX_CORE_PRESENT == 1
|
||||||
ProgramSi5324();
|
ProgramSi5324();
|
||||||
ProgramSfpPhy();
|
ProgramSfpPhy();
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
* </pre>
|
* </pre>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef __arm__
|
#if defined (__arm__) || defined (__aarch64__)
|
||||||
|
|
||||||
#include "xparameters.h"
|
#include "xparameters.h"
|
||||||
#include "xparameters_ps.h" /* defines XPAR values */
|
#include "xparameters_ps.h" /* defines XPAR values */
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
|
|
||||||
/***************************** Include Files *********************************/
|
/***************************** Include Files *********************************/
|
||||||
#include "xparameters.h"
|
#include "xparameters.h"
|
||||||
#ifdef __arm__
|
#if defined (__arm__) || defined(__aarch64__)
|
||||||
#if XPAR_GIGE_PCS_PMA_SGMII_CORE_PRESENT == 1 || \
|
#if XPAR_GIGE_PCS_PMA_SGMII_CORE_PRESENT == 1 || \
|
||||||
XPAR_GIGE_PCS_PMA_1000BASEX_CORE_PRESENT == 1
|
XPAR_GIGE_PCS_PMA_1000BASEX_CORE_PRESENT == 1
|
||||||
#include "xil_printf.h"
|
#include "xil_printf.h"
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
|
|
||||||
/***************************** Include Files *********************************/
|
/***************************** Include Files *********************************/
|
||||||
#include "xparameters.h"
|
#include "xparameters.h"
|
||||||
#ifdef __arm__
|
#if defined (__arm__) || defined(__aarch64__)
|
||||||
#if XPAR_GIGE_PCS_PMA_SGMII_CORE_PRESENT == 1 || \
|
#if XPAR_GIGE_PCS_PMA_SGMII_CORE_PRESENT == 1 || \
|
||||||
XPAR_GIGE_PCS_PMA_1000BASEX_CORE_PRESENT == 1
|
XPAR_GIGE_PCS_PMA_1000BASEX_CORE_PRESENT == 1
|
||||||
#include "xil_printf.h"
|
#include "xil_printf.h"
|
||||||
|
|
Loading…
Add table
Reference in a new issue