]> git.ipfire.org Git - thirdparty/u-boot.git/blobdiff - drivers/net/fm/fm.h
SPDX: Convert all of our single license tags to Linux Kernel style
[thirdparty/u-boot.git] / drivers / net / fm / fm.h
index 316e06e17e4db68f49ba33395d78e6e885e94bc5..e5deaf52c5a190ffc4bf2f5106c89d72a652a549 100644 (file)
@@ -1,16 +1,15 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
 /*
  * Copyright 2009-2011 Freescale Semiconductor, Inc.
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #ifndef __FM_H__
 #define __FM_H__
 
 #include <common.h>
+#include <phy.h>
 #include <fm_eth.h>
-#include <asm/fsl_enet.h>
-#include <asm/fsl_fman.h>
+#include <fsl_fman.h>
 
 /* Port ID */
 #define OH_PORT_ID_BASE                0x01
 #define MIIM_TIMEOUT    0xFFFF
 
 struct fm_muram {
-       u32 base;
-       u32 top;
-       u32 size;
-       u32 alloc;
+       void *base;
+       void *top;
+       size_t size;
+       void *alloc;
 };
 #define FM_MURAM_RES_SIZE      0x01000
 
@@ -88,15 +87,15 @@ struct fm_port_global_pram {
 #define PRAM_MODE_GLOBAL       0x20000000
 #define PRAM_MODE_GRACEFUL_STOP        0x00800000
 
-#if defined(CONFIG_P1017) || defined(CONFIG_P1023)
+#if defined(CONFIG_ARCH_P1023)
 #define FM_FREE_POOL_SIZE      0x2000 /* 8K bytes */
 #else
 #define FM_FREE_POOL_SIZE      0x20000 /* 128K bytes */
 #endif
 #define FM_FREE_POOL_ALIGN     256
 
-u32 fm_muram_alloc(int fm_idx, u32 size, u32 align);
-u32 fm_muram_base(int fm_idx);
+void *fm_muram_alloc(int fm_idx, size_t size, ulong align);
+void *fm_muram_base(int fm_idx);
 int fm_init_common(int index, struct ccsr_fman *reg);
 int fm_eth_initialize(struct ccsr_fman *reg, struct fm_eth_info *info);
 phy_interface_t fman_port_enet_if(enum fm_port port);