|
@@ -1,54 +0,0 @@
|
|
|
-/*
|
|
|
- * Copyright (c) 2010 Broadcom Corporation
|
|
|
- *
|
|
|
- * Permission to use, copy, modify, and/or distribute this software for any
|
|
|
- * purpose with or without fee is hereby granted, provided that the above
|
|
|
- * copyright notice and this permission notice appear in all copies.
|
|
|
- *
|
|
|
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
|
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
|
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
|
|
- * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
|
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
|
|
|
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
|
|
- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
|
- */
|
|
|
-
|
|
|
-#include <linux/delay.h>
|
|
|
-#include <linux/fs.h>
|
|
|
-#ifdef mips
|
|
|
-#include <asm/paccess.h>
|
|
|
-#endif /* mips */
|
|
|
-#include <linux/module.h>
|
|
|
-#include <linux/pci.h>
|
|
|
-#include <linux/netdevice.h>
|
|
|
-#include <linux/sched.h>
|
|
|
-#include <bcmdefs.h>
|
|
|
-#include <osl.h>
|
|
|
-#include <bcmutils.h>
|
|
|
-#include <pcicfg.h>
|
|
|
-
|
|
|
-
|
|
|
-#define OS_HANDLE_MAGIC 0x1234abcd /* Magic # to recognise osh */
|
|
|
-#define BCM_MEM_FILENAME_LEN 24 /* Mem. filename length */
|
|
|
-
|
|
|
-struct osl_info *osl_attach(void *pdev, uint bustype)
|
|
|
-{
|
|
|
- struct osl_info *osh;
|
|
|
-
|
|
|
- osh = kmalloc(sizeof(struct osl_info), GFP_ATOMIC);
|
|
|
- ASSERT(osh);
|
|
|
-
|
|
|
- memset(osh, 0, sizeof(struct osl_info));
|
|
|
- osh->magic = OS_HANDLE_MAGIC;
|
|
|
- return osh;
|
|
|
-}
|
|
|
-
|
|
|
-void osl_detach(struct osl_info *osh)
|
|
|
-{
|
|
|
- if (osh == NULL)
|
|
|
- return;
|
|
|
-
|
|
|
- ASSERT(osh->magic == OS_HANDLE_MAGIC);
|
|
|
- kfree(osh);
|
|
|
-}
|