uboot/drivers/net/sk98lin/u-boot_compat.h
<<
>>
Prefs
   1/*
   2 * (C) Copyright 2003
   3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
   4 *
   5 * See file CREDITS for list of people who contributed to this
   6 * project.
   7 *
   8 * This program is free software; you can redistribute it and/or
   9 * modify it under the terms of the GNU General Public License as
  10 * published by the Free Software Foundation; either version 2 of
  11 * the License, or (at your option) any later version.
  12 *
  13 * This program is distributed in the hope that it will be useful,
  14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16 * GNU General Public License for more details.
  17 *
  18 * You should have received a copy of the GNU General Public License
  19 * along with this program; if not, write to the Free Software
  20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  21 * MA 02111-1307 USA
  22 */
  23
  24#ifndef _UBOOT_COMPAT_H__
  25#define _UBOOT_COMPAT_H__
  26
  27
  28#include <pci.h>
  29#include <pci_ids.h>
  30#include <common.h>
  31#include <malloc.h>
  32#include <net.h>
  33
  34#define __initdata
  35#define __init
  36#define __exit
  37
  38#define netif_stop_queue(x)
  39#define netif_wake_queue(x)
  40#define netif_running(x)                0
  41#define unregister_netdev(x)
  42#define remove_proc_entry(x,y)
  43
  44#define dev_addr                        enetaddr
  45
  46#define spin_lock_irqsave(x,y) y = 0;
  47#define spin_lock_init(x)
  48#define spin_lock(x)
  49#define spin_unlock_irqrestore(x,y)
  50#define spin_unlock(x)
  51
  52
  53#define ENODEV                          1
  54#define EAGAIN                          2
  55#define EBUSY                           3
  56
  57#define HZ                              CONFIG_SYS_HZ
  58
  59
  60#define printk                          printf
  61#define KERN_ERR
  62#define KERN_WARNING
  63#define KERN_INFO
  64
  65#define MOD_INC_USE_COUNT
  66#define MOD_DEC_USE_COUNT
  67
  68
  69#define kmalloc(x,y)                    malloc(x)
  70#define kfree(x)                        free(x)
  71#define GFP_ATOMIC                      0
  72
  73#define pci_alloc_consistent(x,y,z)     (void *)(*(dma_addr_t *)(z) = (dma_addr_t)malloc(y))
  74#define pci_free_consistent(x,y,z,d)    free(z)
  75#define pci_dma_sync_single(x,y,z,d)
  76#define pci_unmap_page(x,y,z,d)
  77#define pci_unmap_single(x,y,z,d)
  78#define pci_present()                   1
  79
  80struct sk_buff
  81{
  82        u8 * data;
  83        u32 len;
  84        u8 * data_unaligned;
  85};
  86
  87struct sk_buff * alloc_skb(u32 size, int dummy);
  88void dev_kfree_skb_any(struct sk_buff *skb);
  89void skb_reserve(struct sk_buff *skb, unsigned int len);
  90void skb_put(struct sk_buff *skb, unsigned int len);
  91
  92#define dev_kfree_skb                           dev_kfree_skb_any
  93#define dev_kfree_skb_irq                       dev_kfree_skb_any
  94
  95#define eth_copy_and_sum(dest,src,len,base)     memcpy(dest->data,src,len);
  96
  97
  98#endif  /* _UBOOT_COMPAT_H__ */
  99